From e7806b135f92e629f7158ba2e46dc1f7bb76a5ff Mon Sep 17 00:00:00 2001 From: Mike Walker Date: Tue, 8 Aug 2017 11:08:28 -0400 Subject: [PATCH 0001/3316] Adds domain and domain-iam-role-name parameters to resource aws_db_instance. --- aws/resource_aws_db_instance.go | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 3009d32e083..3fa120370d4 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -350,6 +350,18 @@ func resourceAwsDbInstance() *schema.Resource { Computed: true, }, + "domain": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "domain_iam_role_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "tags": tagsSchema(), }, } @@ -660,6 +672,14 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) } + if attr, ok := d.GetOk("domain"); ok { + opts.Domain = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("domain_iam_role_name"); ok { + opts.DomainIAMRoleName = aws.String(attr.(string)) + } + log.Printf("[DEBUG] DB Instance create configuration: %#v", opts) var err error err = resource.Retry(5*time.Minute, func() *resource.RetryError { @@ -776,6 +796,11 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("monitoring_role_arn", v.MonitoringRoleArn) } + if v.DomainMemberships != nil { + d.Set("domain", v.DomainMemberships[0].Domain) + d.Set("domain-iam-role-name", v.DomainMemberships[0].IAMRoleName) + } + // list tags for resource // set tags conn := meta.(*AWSClient).rdsconn @@ -1028,6 +1053,18 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("domain") && !d.IsNewResource() { + d.SetPartial("domain") + req.Domain = aws.String(d.Get("domain").(string)) + requestUpdate = true + } + + if d.HasChange("domain_iam_role_name") && !d.IsNewResource() { + d.SetPartial("domain_iam_role_name") + req.DomainIAMRoleName = aws.String(d.Get("domain_iam_role_name").(string)) + requestUpdate = true + } + log.Printf("[DEBUG] Send DB Instance Modification request: %t", requestUpdate) if requestUpdate { log.Printf("[DEBUG] DB Instance Modification request: %s", req) From 450e7fef2b1a67833a992838a140370d75a0c2e6 Mon Sep 17 00:00:00 2001 From: Florian Sellmayr Date: Wed, 18 Oct 2017 00:02:52 +0200 Subject: [PATCH 0002/3316] Set ipv6 properties even if no ipv6 is enabled in vpc to allow usage in conditionals (fixes #688) --- aws/resource_aws_vpc.go | 9 +++++---- aws/resource_aws_vpc_test.go | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index 9fa19f1592d..30f6b88101a 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -182,15 +182,16 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { // Tags d.Set("tags", tagsToMap(vpc.Tags)) + // Make sure those values are set, if an IPv6 block exists it'll be set in the loop + d.Set("assign_generated_ipv6_cidr_block", false) + d.Set("ipv6_association_id", "") + d.Set("ipv6_cidr_block", "") + for _, a := range vpc.Ipv6CidrBlockAssociationSet { if *a.Ipv6CidrBlockState.State == "associated" { //we can only ever have 1 IPv6 block associated at once d.Set("assign_generated_ipv6_cidr_block", true) d.Set("ipv6_association_id", a.AssociationId) d.Set("ipv6_cidr_block", a.Ipv6CidrBlock) - } else { - d.Set("assign_generated_ipv6_cidr_block", false) - d.Set("ipv6_association_id", "") // we blank these out to remove old entries - d.Set("ipv6_cidr_block", "") } } diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index 9d1a68f3a79..d73007df287 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -83,6 +83,9 @@ func TestAccAWSVpc_basic(t *testing.T) { testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), resource.TestCheckResourceAttr( "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), + // ipv6 should be empty if disabled so we can still use the property in conditionals + resource.TestCheckResourceAttr( + "aws_vpc.foo", "ipv6_cidr_block", ""), resource.TestCheckResourceAttrSet( "aws_vpc.foo", "default_route_table_id"), resource.TestCheckResourceAttr( From 18b34deeacc4afd30597fa619b06568817d73f7e Mon Sep 17 00:00:00 2001 From: Mathieu Fenniak Date: Sun, 15 Oct 2017 18:06:10 -0600 Subject: [PATCH 0003/3316] Add appversion_lifecycle to aws_elastic_beanstalk_application --- ...ource_aws_elastic_beanstalk_application.go | 114 ++++++++++++++- ..._aws_elastic_beanstalk_application_test.go | 132 ++++++++++++++++++ aws/structure.go | 30 ++++ ...lastic_beanstalk_application.html.markdown | 15 +- 4 files changed, 289 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_elastic_beanstalk_application.go b/aws/resource_aws_elastic_beanstalk_application.go index dd7b7a671f1..10840c084a8 100644 --- a/aws/resource_aws_elastic_beanstalk_application.go +++ b/aws/resource_aws_elastic_beanstalk_application.go @@ -34,6 +34,31 @@ func resourceAwsElasticBeanstalkApplication() *schema.Resource { Optional: true, ForceNew: false, }, + "appversion_lifecycle": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_role": { + Type: schema.TypeString, + Required: true, + }, + "max_age_in_days": { + Type: schema.TypeInt, + Optional: true, + }, + "max_count": { + Type: schema.TypeInt, + Optional: true, + }, + "delete_source_from_s3": { + Type: schema.TypeBool, + Optional: true, + }, + }, + }, + }, }, } } @@ -52,13 +77,17 @@ func resourceAwsElasticBeanstalkApplicationCreate(d *schema.ResourceData, meta i Description: aws.String(description), } - _, err := beanstalkConn.CreateApplication(req) + app, err := beanstalkConn.CreateApplication(req) if err != nil { return err } d.SetId(name) + if err = resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn, d, app.Application); err != nil { + return err + } + return resourceAwsElasticBeanstalkApplicationRead(d, meta) } @@ -71,6 +100,12 @@ func resourceAwsElasticBeanstalkApplicationUpdate(d *schema.ResourceData, meta i } } + if d.HasChange("appversion_lifecycle") { + if err := resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn, d, nil); err != nil { + return err + } + } + return resourceAwsElasticBeanstalkApplicationRead(d, meta) } @@ -88,6 +123,78 @@ func resourceAwsElasticBeanstalkApplicationDescriptionUpdate(beanstalkConn *elas return err } +func resourceAwsElasticBeanstalkApplicationAppversionLifecycleUpdate(beanstalkConn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData, app *elasticbeanstalk.ApplicationDescription) error { + name := d.Get("name").(string) + appversion_lifecycles := d.Get("appversion_lifecycle").([]interface{}) + var appversion_lifecycle map[string]interface{} = nil + if len(appversion_lifecycles) == 1 { + appversion_lifecycle = appversion_lifecycles[0].(map[string]interface{}) + } + + if appversion_lifecycle == nil && app != nil && app.ResourceLifecycleConfig.ServiceRole == nil { + // We want appversion lifecycle management to be disabled, and it currently is, and there's no way to reproduce + // this state in a UpdateApplicationResourceLifecycle service call (fails w/ ServiceRole is not a valid arn). So, + // in this special case we just do nothing. + log.Printf("[DEBUG] Elastic Beanstalk application: %s, update appversion_lifecycle is anticipated no-op", name) + return nil + } + + log.Printf("[DEBUG] Elastic Beanstalk application: %s, update appversion_lifecycle: %v", name, appversion_lifecycle) + + rlc := &elasticbeanstalk.ApplicationResourceLifecycleConfig{ + ServiceRole: nil, + VersionLifecycleConfig: &elasticbeanstalk.ApplicationVersionLifecycleConfig{ + MaxCountRule: &elasticbeanstalk.MaxCountRule{ + Enabled: aws.Bool(false), + }, + MaxAgeRule: &elasticbeanstalk.MaxAgeRule{ + Enabled: aws.Bool(false), + }, + }, + } + + if appversion_lifecycle != nil { + service_role, ok := appversion_lifecycle["service_role"] + if ok { + rlc.ServiceRole = aws.String(service_role.(string)) + } + + rlc.VersionLifecycleConfig = &elasticbeanstalk.ApplicationVersionLifecycleConfig{ + MaxCountRule: &elasticbeanstalk.MaxCountRule{ + Enabled: aws.Bool(false), + }, + MaxAgeRule: &elasticbeanstalk.MaxAgeRule{ + Enabled: aws.Bool(false), + }, + } + + max_age_in_days, ok := appversion_lifecycle["max_age_in_days"] + if ok && max_age_in_days != 0 { + rlc.VersionLifecycleConfig.MaxAgeRule = &elasticbeanstalk.MaxAgeRule{ + Enabled: aws.Bool(true), + DeleteSourceFromS3: aws.Bool(appversion_lifecycle["delete_source_from_s3"].(bool)), + MaxAgeInDays: aws.Int64(int64(max_age_in_days.(int))), + } + } + + max_count, ok := appversion_lifecycle["max_count"] + if ok && max_count != 0 { + rlc.VersionLifecycleConfig.MaxCountRule = &elasticbeanstalk.MaxCountRule{ + Enabled: aws.Bool(true), + DeleteSourceFromS3: aws.Bool(appversion_lifecycle["delete_source_from_s3"].(bool)), + MaxCount: aws.Int64(int64(max_count.(int))), + } + } + } + + _, err := beanstalkConn.UpdateApplicationResourceLifecycle(&elasticbeanstalk.UpdateApplicationResourceLifecycleInput{ + ApplicationName: aws.String(name), + ResourceLifecycleConfig: rlc, + }) + + return err +} + func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta interface{}) error { a, err := getBeanstalkApplication(d, meta) if err != nil { @@ -99,6 +206,11 @@ func resourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta int d.Set("name", a.ApplicationName) d.Set("description", a.Description) + + if a.ResourceLifecycleConfig != nil { + d.Set("appversion_lifecycle", flattenResourceLifecycleConfig(a.ResourceLifecycleConfig)) + } + return nil } diff --git a/aws/resource_aws_elastic_beanstalk_application_test.go b/aws/resource_aws_elastic_beanstalk_application_test.go index 2780fe276a5..ba4597e5e7f 100644 --- a/aws/resource_aws_elastic_beanstalk_application_test.go +++ b/aws/resource_aws_elastic_beanstalk_application_test.go @@ -92,6 +92,64 @@ func TestAccAWSBeanstalkApp_basic(t *testing.T) { }) } +func TestAccAWSBeanstalkApp_appversionlifecycle(t *testing.T) { + var app elasticbeanstalk.ApplicationDescription + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckBeanstalkAppDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccBeanstalkAppConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckBeanstalkAppExists("aws_elastic_beanstalk_application.tftest", &app), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.service_role"), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_age_in_days"), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_count"), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.delete_source_from_s3"), + ), + }, + resource.TestStep{ + Config: testAccBeanstalkAppConfigWithMaxAge, + Check: resource.ComposeTestCheckFunc( + testAccCheckBeanstalkAppExists("aws_elastic_beanstalk_application.tftest", &app), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.#", "1"), + resource.TestCheckResourceAttrPair( + "aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.service_role", + "aws_iam_role.beanstalk_service", "arn"), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_age_in_days", "90"), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_count", "0"), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.delete_source_from_s3", "true"), + ), + }, + resource.TestStep{ + Config: testAccBeanstalkAppConfigWithMaxCount, + Check: resource.ComposeTestCheckFunc( + testAccCheckBeanstalkAppExists("aws_elastic_beanstalk_application.tftest", &app), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.#", "1"), + resource.TestCheckResourceAttrPair( + "aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.service_role", + "aws_iam_role.beanstalk_service", "arn"), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_age_in_days", "0"), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_count", "10"), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.delete_source_from_s3", "false"), + ), + }, + resource.TestStep{ + Config: testAccBeanstalkAppConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckBeanstalkAppExists("aws_elastic_beanstalk_application.tftest", &app), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.service_role"), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_age_in_days"), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.max_count"), + resource.TestCheckNoResourceAttr("aws_elastic_beanstalk_application.tftest", "appversion_lifecycle.0.delete_source_from_s3"), + ), + }, + }, + }) +} + func testAccCheckBeanstalkAppDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).elasticbeanstalkconn @@ -161,3 +219,77 @@ resource "aws_elastic_beanstalk_application" "tftest" { description = "tf-test-desc" } ` + +const testAccBeanstalkAppServiceRole = ` +resource "aws_iam_role" "beanstalk_service" { + name = "tf-test-service-role" + + assume_role_policy = < Date: Wed, 15 Nov 2017 14:11:10 -0800 Subject: [PATCH 0004/3316] Add 'aws_sqs_queue' data source --- aws/data_source_aws_sqs_queue.go | 56 +++++++++++++++++++++ aws/data_source_aws_sqs_queue_test.go | 70 ++++++++++++++++++++++++++ aws/provider.go | 1 + website/aws.erb | 3 ++ website/docs/d/sqs_queue.html.markdown | 30 +++++++++++ 5 files changed, 160 insertions(+) create mode 100644 aws/data_source_aws_sqs_queue.go create mode 100644 aws/data_source_aws_sqs_queue_test.go create mode 100644 website/docs/d/sqs_queue.html.markdown diff --git a/aws/data_source_aws_sqs_queue.go b/aws/data_source_aws_sqs_queue.go new file mode 100644 index 00000000000..a27f931faa7 --- /dev/null +++ b/aws/data_source_aws_sqs_queue.go @@ -0,0 +1,56 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sqs" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsSqsQueue() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSqsQueueRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "url": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sqsconn + target := d.Get("name").(string) + + urlOutput, err := conn.GetQueueUrl(&sqs.GetQueueUrlInput{ + QueueName: aws.String(target), + }) + if err != nil { + return errwrap.Wrapf("Error getting queue URL: {{err}}", err) + } + + queueURL := *urlOutput.QueueUrl + + attributesOutput, err := conn.GetQueueAttributes(&sqs.GetQueueAttributesInput{ + QueueUrl: &queueURL, + AttributeNames: []*string{aws.String(sqs.QueueAttributeNameQueueArn)}, + }) + if err != nil { + return errwrap.Wrapf("Error getting queue attributes: {{err}}", err) + } + + d.Set("arn", *attributesOutput.Attributes[sqs.QueueAttributeNameQueueArn]) + d.Set("url", queueURL) + d.SetId(queueURL) + + return nil +} diff --git a/aws/data_source_aws_sqs_queue_test.go b/aws/data_source_aws_sqs_queue_test.go new file mode 100644 index 00000000000..4687407d13b --- /dev/null +++ b/aws/data_source_aws_sqs_queue_test.go @@ -0,0 +1,70 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccDataSourceAwsSqsQueue(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDataSourceAwsSqsQueueConfig, + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsSqsQueueCheck("data.aws_sqs_queue.by_name"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsSqsQueueCheck(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("root module has no resource called %s", name) + } + + sqsQueueRs, ok := s.RootModule().Resources["aws_sqs_queue.tf_test"] + if !ok { + return fmt.Errorf("can't find aws_sqs_queue.tf_test in state") + } + + attr := rs.Primary.Attributes + + if attr["name"] != sqsQueueRs.Primary.Attributes["name"] { + return fmt.Errorf( + "name is %s; want %s", + attr["name"], + sqsQueueRs.Primary.Attributes["name"], + ) + } + + return nil + } +} + +const testAccDataSourceAwsSqsQueueConfig = ` +provider "aws" { + region = "us-west-2" +} + +resource "aws_sqs_queue" "tf_wrong1" { + name = "wrong1" +} +resource "aws_sqs_queue" "tf_test" { + name = "tf_test" +} +resource "aws_sqs_queue" "tf_wrong2" { + name = "wrong2" +} + +data "aws_sqs_queue" "by_name" { + name = "${aws_sqs_queue.tf_test.name}" +} +` diff --git a/aws/provider.go b/aws/provider.go index 219efe2fe33..37242fb2e9b 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -214,6 +214,7 @@ func Provider() terraform.ResourceProvider { "aws_s3_bucket": dataSourceAwsS3Bucket(), "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), "aws_sns_topic": dataSourceAwsSnsTopic(), + "aws_sqs_queue": dataSourceAwsSqsQueue(), "aws_ssm_parameter": dataSourceAwsSsmParameter(), "aws_subnet": dataSourceAwsSubnet(), "aws_subnet_ids": dataSourceAwsSubnetIDs(), diff --git a/website/aws.erb b/website/aws.erb index 71453affcc6..50d5136ac5f 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -193,6 +193,9 @@ > aws_security_group + > + aws_sqs_queue + > aws_sns_topic diff --git a/website/docs/d/sqs_queue.html.markdown b/website/docs/d/sqs_queue.html.markdown new file mode 100644 index 00000000000..9023f3ee5ef --- /dev/null +++ b/website/docs/d/sqs_queue.html.markdown @@ -0,0 +1,30 @@ +--- +layout: "aws" +page_title: "AWS: aws_sqs_queue" +sidebar_current: "docs-aws-datasource-sqs-queue" +description: |- + Get information on an Amazon Simple Queue Service (SQS) Queue +--- + +# aws\_sqs\_queue + +Use this data source to get the ARN and URL of queue in AWS Simple Queue Service (SQS). +By using this data source, you can reference SQS queues without having to hardcode +the ARNs as input. + +## Example Usage + +```hcl +data "aws_sqs_queue" "example" { + name = "queue" +} +``` + +## Argument Reference + +* `name` - (Required) The name of the queue to match. + +## Attributes Reference + +* `arn` - The Amazon Resource Name (ARN) of the queue. +* `url` - The URL of the queue. From 0be3f1b4d57c8695115d8cecf017d3935dbe4b80 Mon Sep 17 00:00:00 2001 From: Blaine Schanfeldt Date: Wed, 22 Nov 2017 11:47:16 -0800 Subject: [PATCH 0005/3316] Updated documentation to reflect ALB requires path and matcher Followup to #2251, 1.3.0 (November 16, 2017) --- website/docs/r/lb_target_group.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/lb_target_group.html.markdown b/website/docs/r/lb_target_group.html.markdown index 0a9db3d6755..18c3370d7f4 100644 --- a/website/docs/r/lb_target_group.html.markdown +++ b/website/docs/r/lb_target_group.html.markdown @@ -56,13 +56,13 @@ Stickiness Blocks (`stickiness`) support the following: Health Check Blocks (`health_check`) support the following: * `interval` - (Optional) The approximate amount of time, in seconds, between health checks of an individual target. Minimum value 5 seconds, Maximum value 300 seconds. Default 30 seconds. -* `path` - (Optional) The destination for the health check request. Default `/`. +* `path` - (Required for HTTP/HTTPS ALB) The destination for the health check request. Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP). * `port` - (Optional) The port to use to connect with the target. Valid values are either ports 1-65536, or `traffic-port`. Defaults to `traffic-port`. * `protocol` - (Optional) The protocol to use to connect with the target. Defaults to `HTTP`. * `timeout` - (Optional) The amount of time, in seconds, during which no response means a failed health check. Defaults to 5 seconds. * `healthy_threshold` - (Optional) The number of consecutive health checks successes required before considering an unhealthy target healthy. Defaults to 3. * `unhealthy_threshold` - (Optional) The number of consecutive health check failures required before considering the target unhealthy. Defaults to 3. -* `matcher` (Optional) The HTTP codes to use when checking for a successful response from a target. Defaults to `200`. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299"). +* `matcher` (Required for HTTP/HTTPS ALB) The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299"). Applies to Application Load Balancers only (HTTP/HTTPS), not Network Load Balancers (TCP). ## Attributes Reference From 757fa204c161907edbab5bce0de9b8d8af893cd6 Mon Sep 17 00:00:00 2001 From: enm10k Date: Tue, 28 Nov 2017 22:17:15 +0900 Subject: [PATCH 0006/3316] Fix DiffSuppressFunc in aws/resource_aws_network_acl_rule.go --- aws/resource_aws_network_acl_rule.go | 11 ++-- aws/resource_aws_network_acl_rule_test.go | 63 +++++++++++++++++++++++ 2 files changed, 71 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_network_acl_rule.go b/aws/resource_aws_network_acl_rule.go index d3aa099fce6..4b32a53f5f9 100644 --- a/aws/resource_aws_network_acl_rule.go +++ b/aws/resource_aws_network_acl_rule.go @@ -42,10 +42,15 @@ func resourceAwsNetworkAclRule() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "all" && new == "-1" || old == "-1" && new == "all" { - return true + pi := protocolIntegers() + if val, ok := pi[old]; ok { + old = strconv.Itoa(val) } - return false + if val, ok := pi[new]; ok { + new = strconv.Itoa(val) + } + + return old == new }, }, "rule_action": { diff --git a/aws/resource_aws_network_acl_rule_test.go b/aws/resource_aws_network_acl_rule_test.go index 357d37cbbdc..123c45068cb 100644 --- a/aws/resource_aws_network_acl_rule_test.go +++ b/aws/resource_aws_network_acl_rule_test.go @@ -85,6 +85,25 @@ func TestAccAWSNetworkAclRule_allProtocol(t *testing.T) { }) } +func TestAccAWSNetworkAclRule_tcpProtocol(t *testing.T) { + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNetworkAclRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNetworkAclRuleTcpProtocolConfig, + ExpectNonEmptyPlan: false, + }, + { + Config: testAccAWSNetworkAclRuleTcpProtocolConfigNoRealUpdate, + ExpectNonEmptyPlan: false, + }, + }, + }) +} + func TestResourceAWSNetworkAclRule_validateICMPArgumentValue(t *testing.T) { type testCases struct { Value string @@ -352,6 +371,28 @@ resource "aws_network_acl_rule" "baz" { } ` +const testAccAWSNetworkAclRuleTcpProtocolConfigNoRealUpdate = ` +resource "aws_vpc" "foo" { + cidr_block = "10.3.0.0/16" + tags { + Name = "testAccAWSNetworkAclRuleTcpProtocolConfigNoRealUpdate" + } +} +resource "aws_network_acl" "bar" { + vpc_id = "${aws_vpc.foo.id}" +} +resource "aws_network_acl_rule" "baz" { + network_acl_id = "${aws_network_acl.bar.id}" + rule_number = 150 + egress = false + protocol = "tcp" + rule_action = "allow" + cidr_block = "0.0.0.0/0" + from_port = 22 + to_port = 22 +} +` + const testAccAWSNetworkAclRuleAllProtocolConfig = ` resource "aws_vpc" "foo" { cidr_block = "10.3.0.0/16" @@ -374,6 +415,28 @@ resource "aws_network_acl_rule" "baz" { } ` +const testAccAWSNetworkAclRuleTcpProtocolConfig = ` +resource "aws_vpc" "foo" { + cidr_block = "10.3.0.0/16" + tags { + Name = "testAccAWSNetworkAclRuleTcpProtocolConfig" + } +} +resource "aws_network_acl" "bar" { + vpc_id = "${aws_vpc.foo.id}" +} +resource "aws_network_acl_rule" "baz" { + network_acl_id = "${aws_network_acl.bar.id}" + rule_number = 150 + egress = false + protocol = "6" + rule_action = "allow" + cidr_block = "0.0.0.0/0" + from_port = 22 + to_port = 22 +} +` + const testAccAWSNetworkAclRuleIpv6Config = ` resource "aws_vpc" "foo" { cidr_block = "10.3.0.0/16" From 840970d2f95d6749aa100cc2b3374a9ce8775cc9 Mon Sep 17 00:00:00 2001 From: Marcin Muszynski Date: Thu, 30 Nov 2017 15:36:38 +1100 Subject: [PATCH 0007/3316] Examples: ecs-alb - alb_target_group port switch --- examples/ecs-alb/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ecs-alb/main.tf b/examples/ecs-alb/main.tf index d19950bd4b9..5f7e9b7dc25 100644 --- a/examples/ecs-alb/main.tf +++ b/examples/ecs-alb/main.tf @@ -291,7 +291,7 @@ resource "aws_iam_role_policy" "instance" { resource "aws_alb_target_group" "test" { name = "tf-example-ecs-ghost" - port = 80 + port = 8080 protocol = "HTTP" vpc_id = "${aws_vpc.main.id}" } From 89c8a140afce2bc728b7e3e07c526f961c02f875 Mon Sep 17 00:00:00 2001 From: Chris Minton Date: Thu, 16 Nov 2017 00:19:03 +0000 Subject: [PATCH 0008/3316] Update RDS Option groups to allow version option --- aws/resource_aws_db_option_group.go | 9 ++ aws/resource_aws_db_option_group_test.go | 116 +++++++++++++++++++ aws/structure.go | 8 ++ website/docs/r/db_option_group.html.markdown | 1 + 4 files changed, 134 insertions(+) diff --git a/aws/resource_aws_db_option_group.go b/aws/resource_aws_db_option_group.go index 258572bb2e7..76203408d3f 100644 --- a/aws/resource_aws_db_option_group.go +++ b/aws/resource_aws_db_option_group.go @@ -107,6 +107,10 @@ func resourceAwsDbOptionGroup() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, }, + "version": { + Type: schema.TypeString, + Optional: true, + }, }, }, Set: resourceAwsDbOptionHash, @@ -353,6 +357,11 @@ func resourceAwsDbOptionHash(v interface{}) int { for _, sgRaw := range m["db_security_group_memberships"].(*schema.Set).List() { buf.WriteString(fmt.Sprintf("%s-", sgRaw.(string))) } + + if _, ok := m["version"]; ok { + buf.WriteString(fmt.Sprintf("%s-", m["version"].(string))) + } + return hashcode.String(buf.String()) } diff --git a/aws/resource_aws_db_option_group_test.go b/aws/resource_aws_db_option_group_test.go index 3723c546103..4be8f13aaae 100644 --- a/aws/resource_aws_db_option_group_test.go +++ b/aws/resource_aws_db_option_group_test.go @@ -262,6 +262,44 @@ func TestAccAWSDBOptionGroup_sqlServerOptionsUpdate(t *testing.T) { }) } +func TestAccAWSDBOptionGroup_OracleOptionsUpdate(t *testing.T) { + var v rds.OptionGroup + rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBOptionGroupOracleEEOptionSettings(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBOptionGroupExists("aws_db_option_group.bar", &v), + resource.TestCheckResourceAttr( + "aws_db_option_group.bar", "name", rName), + resource.TestCheckResourceAttr( + "aws_db_option_group.bar", "option.#", "1"), + resource.TestCheckResourceAttr( + "aws_db_option_group.bar", "option.0.version", "12.1.0.4.v1"), + ), + }, + + { + Config: testAccAWSDBOptionGroupOracleEEOptionSettings_update(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBOptionGroupExists("aws_db_option_group.bar", &v), + resource.TestCheckResourceAttr( + "aws_db_option_group.bar", "name", rName), + resource.TestCheckResourceAttr( + "aws_db_option_group.bar", "option.#", "1"), + resource.TestCheckResourceAttr( + "aws_db_option_group.bar", "option.0.version", "12.1.0.5.v1"), + ), + }, + }, + }) +} + func TestAccAWSDBOptionGroup_multipleOptions(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) @@ -493,6 +531,84 @@ resource "aws_db_option_group" "bar" { `, r) } +func testAccAWSDBOptionGroupOracleEEOptionSettings(r string) string { + return fmt.Sprintf(` +resource "aws_security_group" "foo" { + name = "terraform-test-issue_748" + description = "SG for test of issue 748" +} + +resource "aws_db_option_group" "bar" { + name = "%s" + option_group_description = "Test option group for terraform issue 748" + engine_name = "oracle-ee" + major_engine_version = "12.1" + + option { + option_name = "OEM_AGENT" + port = "3872" + version = "12.1.0.4.v1" + + vpc_security_group_memberships = ["${aws_security_group.foo.id}"] + + option_settings { + name = "OMS_PORT" + value = "4903" + } + + option_settings { + name = "OMS_HOST" + value = "oem.host.value" + } + + option_settings { + name = "AGENT_REGISTRATION_PASSWORD" + value = "password" + } + } +} +`, r) +} + +func testAccAWSDBOptionGroupOracleEEOptionSettings_update(r string) string { + return fmt.Sprintf(` +resource "aws_security_group" "foo" { + name = "terraform-test-issue_748" + description = "SG for test of issue 748" +} + +resource "aws_db_option_group" "bar" { + name = "%s" + option_group_description = "Test option group for terraform issue 748" + engine_name = "oracle-ee" + major_engine_version = "12.1" + + option { + option_name = "OEM_AGENT" + port = "3872" + version = "12.1.0.5.v1" + + vpc_security_group_memberships = ["${aws_security_group.foo.id}"] + + option_settings { + name = "OMS_PORT" + value = "4903" + } + + option_settings { + name = "OMS_HOST" + value = "oem.host.value" + } + + option_settings { + name = "AGENT_REGISTRATION_PASSWORD" + value = "password" + } + } +} +`, r) +} + func testAccAWSDBOptionGroupMultipleOptions(r string) string { return fmt.Sprintf(` resource "aws_db_option_group" "bar" { diff --git a/aws/structure.go b/aws/structure.go index 2aee465c24a..66832ab5055 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -341,6 +341,10 @@ func expandOptionConfiguration(configured []interface{}) ([]*rds.OptionConfigura o.OptionSettings = expandOptionSetting(raw.(*schema.Set).List()) } + if raw, ok := data["version"]; ok && raw.(string) != "" { + o.OptionVersion = aws.String(raw.(string)) + } + option = append(option, o) } @@ -635,6 +639,10 @@ func flattenOptions(list []*rds.Option) []map[string]interface{} { if i.Port != nil { r["port"] = int(*i.Port) } + r["version"] = "" + if i.OptionVersion != nil { + r["version"] = strings.ToLower(*i.OptionVersion) + } if i.VpcSecurityGroupMemberships != nil { vpcs := make([]string, 0, len(i.VpcSecurityGroupMemberships)) for _, vpc := range i.VpcSecurityGroupMemberships { diff --git a/website/docs/r/db_option_group.html.markdown b/website/docs/r/db_option_group.html.markdown index 8feb74b14d9..fd9fa7b1dd0 100644 --- a/website/docs/r/db_option_group.html.markdown +++ b/website/docs/r/db_option_group.html.markdown @@ -51,6 +51,7 @@ Option blocks support the following: * `option_name` - (Required) The Name of the Option (e.g. MEMCACHED). * `option_settings` - (Optional) A list of option settings to apply. * `port` - (Optional) The Port number when connecting to the Option (e.g. 11211). +* `version` - (Optional) The OptionVersion string when connecting to the Option (e.g. 13.1.0.0). * `db_security_group_memberships` - (Optional) A list of DB Security Groups for which the option is enabled. * `vpc_security_group_memberships` - (Optional) A list of VPC Security Groups for which the option is enabled. From 340bb2ada1c1fff97ff89780f58bb9365037cb83 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sat, 21 Oct 2017 21:39:45 -0400 Subject: [PATCH 0009/3316] Add redshift cluster data source --- aws/data_source_aws_redshift_cluster.go | 266 ++++++++++++++++++ aws/data_source_aws_redshift_cluster_test.go | 195 +++++++++++++ aws/provider.go | 1 + website/docs/d/redshift_cluster.html.markdown | 84 ++++++ 4 files changed, 546 insertions(+) create mode 100644 aws/data_source_aws_redshift_cluster.go create mode 100644 aws/data_source_aws_redshift_cluster_test.go create mode 100644 website/docs/d/redshift_cluster.html.markdown diff --git a/aws/data_source_aws_redshift_cluster.go b/aws/data_source_aws_redshift_cluster.go new file mode 100644 index 00000000000..9e39744be63 --- /dev/null +++ b/aws/data_source_aws_redshift_cluster.go @@ -0,0 +1,266 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsRedshiftCluster() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsRedshiftClusterRead, + + Schema: map[string]*schema.Schema{ + + "cluster_identifier": { + Type: schema.TypeString, + Required: true, + }, + + "allow_version_upgrade": { + Type: schema.TypeBool, + Computed: true, + }, + + "automated_snapshot_retention_period": { + Type: schema.TypeInt, + Computed: true, + }, + + "availability_zone": { + Type: schema.TypeString, + Computed: true, + }, + + "bucket_name": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_parameter_group_name": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_public_key": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_revision_number": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_security_groups": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "cluster_subnet_group_name": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_type": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_version": { + Type: schema.TypeString, + Computed: true, + }, + + "database_name": { + Type: schema.TypeString, + Computed: true, + }, + + "elastic_ip": { + Type: schema.TypeString, + Computed: true, + }, + + "enable_logging": { + Type: schema.TypeBool, + Computed: true, + }, + + "encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "enhanced_vpc_routing": { + Type: schema.TypeBool, + Computed: true, + }, + + "iam_roles": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + + "master_username": { + Type: schema.TypeString, + Computed: true, + }, + + "node_type": { + Type: schema.TypeString, + Computed: true, + }, + + "number_of_nodes": { + Type: schema.TypeInt, + Computed: true, + }, + + "port": { + Type: schema.TypeInt, + Computed: true, + }, + + "preferred_maintenance_window": { + Type: schema.TypeString, + Computed: true, + }, + + "publicly_accessible": { + Type: schema.TypeBool, + Computed: true, + }, + + "s3_key_prefix": { + Type: schema.TypeString, + Computed: true, + }, + + "tags": tagsSchema(), + + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + + "vpc_security_group_ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + cluster := d.Get("cluster_identifier").(string) + + log.Printf("[INFO] Reading Redshift Cluster Information: %s", cluster) + + resp, err := conn.DescribeClusters(&redshift.DescribeClustersInput{ + ClusterIdentifier: aws.String(cluster), + }) + + if err != nil { + return fmt.Errorf("Error describing Redshift Cluster: %s, error: %#v", cluster, err) + } + + rsc := *resp.Clusters[0] + + d.SetId(cluster) + d.Set("allow_version_upgrade", rsc.AllowVersionUpgrade) + d.Set("automated_snapshot_retention_period", rsc.AutomatedSnapshotRetentionPeriod) + d.Set("availability_zone", rsc.AvailabilityZone) + d.Set("cluster_identifier", rsc.ClusterIdentifier) + d.Set("cluster_parameter_group_name", rsc.ClusterParameterGroups[0].ParameterGroupName) + d.Set("cluster_public_key", rsc.ClusterPublicKey) + d.Set("cluster_revision_number", rsc.ClusterRevisionNumber) + + var csg []string + for _, g := range rsc.ClusterSecurityGroups { + csg = append(csg, *g.ClusterSecurityGroupName) + } + if err := d.Set("cluster_security_groups", csg); err != nil { + return fmt.Errorf("[DEBUG] Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", cluster, err) + } + + d.Set("cluster_subnet_group_name", rsc.ClusterSubnetGroupName) + + if len(rsc.ClusterNodes) > 1 { + d.Set("cluster_type", "multi-node") + } else { + d.Set("cluster_type", "single-node") + } + + d.Set("cluster_version", rsc.ClusterVersion) + d.Set("database_name", rsc.DBName) + + if rsc.ElasticIpStatus != nil { + d.Set("elastic_ip", rsc.ElasticIpStatus.ElasticIp) + } + + d.Set("encrypted", rsc.Encrypted) + d.Set("endpoint", rsc.Endpoint.Address) + d.Set("enhanced_vpc_routing", rsc.EnhancedVpcRouting) + + var iamRoles []string + for _, i := range rsc.IamRoles { + iamRoles = append(iamRoles, *i.IamRoleArn) + } + if err := d.Set("iam_roles", iamRoles); err != nil { + return fmt.Errorf("[DEBUG] Error saving IAM Roles to state for Redshift Cluster (%s): %s", cluster, err) + } + + d.Set("kms_key_id", rsc.KmsKeyId) + d.Set("master_username", rsc.MasterUsername) + d.Set("node_type", rsc.NodeType) + d.Set("number_of_nodes", rsc.NumberOfNodes) + d.Set("port", rsc.Endpoint.Port) + d.Set("preferred_maintenance_window", rsc.PreferredMaintenanceWindow) + d.Set("publicly_accessible", rsc.PubliclyAccessible) + d.Set("tags", tagsToMapRedshift(rsc.Tags)) + d.Set("vpc_id", rsc.VpcId) + + var vpcg []string + for _, g := range rsc.VpcSecurityGroups { + vpcg = append(vpcg, *g.VpcSecurityGroupId) + } + if err := d.Set("vpc_security_group_ids", vpcg); err != nil { + return fmt.Errorf("[DEBUG] Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", cluster, err) + } + + log.Printf("[INFO] Reading Redshift Cluster Logging Status: %s", cluster) + loggingStatus, loggingErr := conn.DescribeLoggingStatus(&redshift.DescribeLoggingStatusInput{ + ClusterIdentifier: aws.String(cluster), + }) + + if loggingErr != nil { + return loggingErr + } + + if *loggingStatus.LoggingEnabled { + d.Set("enable_logging", loggingStatus.LoggingEnabled) + d.Set("bucket_name", loggingStatus.BucketName) + d.Set("s3_key_prefix", loggingStatus.S3KeyPrefix) + } + + return nil +} diff --git a/aws/data_source_aws_redshift_cluster_test.go b/aws/data_source_aws_redshift_cluster_test.go new file mode 100644 index 00000000000..7568c547330 --- /dev/null +++ b/aws/data_source_aws_redshift_cluster_test.go @@ -0,0 +1,195 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSDataSourceRedshiftCluster_basic(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSDataSourceRedshiftClusterConfig(rInt), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "allow_version_upgrade"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "automated_snapshot_retention_period"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "availability_zone"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "cluster_identifier"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "cluster_parameter_group_name"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "cluster_public_key"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "cluster_revision_number"), + resource.TestCheckResourceAttr("data.aws_redshift_cluster.test", "cluster_type", "single-node"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "cluster_version"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "database_name"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "encrypted"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "endpoint"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "master_username"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "node_type"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "number_of_nodes"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "port"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "preferred_maintenance_window"), + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "publicly_accessible"), + ), + }, + }, + }) +} + +func TestAccAWSDataSourceRedshiftCluster_vpc(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSDataSourceRedshiftClusterConfigWithVpc(rInt), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_redshift_cluster.test", "vpc_id"), + resource.TestCheckResourceAttr("data.aws_redshift_cluster.test", "vpc_security_group_ids.#", "1"), + resource.TestCheckResourceAttr("data.aws_redshift_cluster.test", "cluster_type", "multi-node"), + resource.TestCheckResourceAttr("data.aws_redshift_cluster.test", "cluster_subnet_group_name", fmt.Sprintf("tf-redshift-subnet-group-%d", rInt)), + ), + }, + }, + }) +} + +func TestAccAWSDataSourceRedshiftCluster_logging(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSDataSourceRedshiftClusterConfigWithLogging(rInt), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_redshift_cluster.test", "enable_logging", "true"), + resource.TestCheckResourceAttr("data.aws_redshift_cluster.test", "bucket_name", fmt.Sprintf("tf-redshift-logging-%d", rInt)), + resource.TestCheckResourceAttr("data.aws_redshift_cluster.test", "s3_key_prefix", "cluster-logging/"), + ), + }, + }, + }) +} + +func testAccAWSDataSourceRedshiftClusterConfig(rInt int) string { + return fmt.Sprintf(` +resource "aws_redshift_cluster" "test" { + cluster_identifier = "tf-redshift-cluster-%d" + + database_name = "testdb" + master_username = "foo" + master_password = "Password1" + node_type = "dc1.large" + cluster_type = "single-node" + skip_final_snapshot = true +} + +data "aws_redshift_cluster" "test" { + cluster_identifier = "${aws_redshift_cluster.test.cluster_identifier}" +} +`, rInt) +} + +func testAccAWSDataSourceRedshiftClusterConfigWithVpc(rInt int) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_subnet" "foo" { + cidr_block = "10.1.1.0/24" + availability_zone = "us-west-2a" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_subnet" "bar" { + cidr_block = "10.1.2.0/24" + availability_zone = "us-west-2b" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_redshift_subnet_group" "test" { + name = "tf-redshift-subnet-group-%d" + subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] +} + +resource "aws_security_group" "test" { + name = "tf-redshift-sg-%d" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_redshift_cluster" "test" { + cluster_identifier = "tf-redshift-cluster-%d" + + database_name = "testdb" + master_username = "foo" + master_password = "Password1" + node_type = "dc1.large" + cluster_type = "multi-node" + number_of_nodes = 2 + publicly_accessible = false + cluster_subnet_group_name = "${aws_redshift_subnet_group.test.name}" + vpc_security_group_ids = ["${aws_security_group.test.id}"] + skip_final_snapshot = true +} + +data "aws_redshift_cluster" "test" { + cluster_identifier = "${aws_redshift_cluster.test.cluster_identifier}" +} +`, rInt, rInt, rInt) +} + +func testAccAWSDataSourceRedshiftClusterConfigWithLogging(rInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "tf-redshift-logging-%d" + force_destroy = true + policy = < Date: Sun, 22 Oct 2017 08:59:45 -0400 Subject: [PATCH 0010/3316] Add datasource website link --- website/aws.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/aws.erb b/website/aws.erb index d78bb7461c4..cabd968f5ba 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -182,6 +182,9 @@ > aws_rds_cluster + > + aws_redshift_cluster + > aws_redshift_service_account From ba0532318f2ceb018a7c4a4868abb954ccdec10e Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Fri, 15 Dec 2017 22:17:06 -0800 Subject: [PATCH 0011/3316] r/aws_lambda_function: Make it possible to remove dead_letter_config by removing the block. --- aws/resource_aws_lambda_function.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index d16988346c6..fa64f2871b5 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -565,13 +565,14 @@ func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) e } if d.HasChange("dead_letter_config") { dlcMaps := d.Get("dead_letter_config").([]interface{}) + configReq.DeadLetterConfig = &lambda.DeadLetterConfig{ + TargetArn: aws.String(""), + } if len(dlcMaps) == 1 { // Schema guarantees either 0 or 1 dlcMap := dlcMaps[0].(map[string]interface{}) - configReq.DeadLetterConfig = &lambda.DeadLetterConfig{ - TargetArn: aws.String(dlcMap["target_arn"].(string)), - } - configUpdate = true + configReq.DeadLetterConfig.TargetArn = aws.String(dlcMap["target_arn"].(string)) } + configUpdate = true } if d.HasChange("tracing_config") { tracingConfig := d.Get("tracing_config").([]interface{}) From 27a651121cabf0af07ac0c829beaab3e65e2ee82 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 20 Dec 2017 10:37:40 -0600 Subject: [PATCH 0012/3316] Initial attempt --- aws/resource_aws_db_instance.go | 117 ++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 3009d32e083..e2cdf8a309b 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -431,6 +431,123 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("Error creating DB Instance: %s", err) } + } else if _, ok := d.GetOk("backup_s3"); ok { + opts := rds.RestoreDBInstanceFromDBSnapshotInput{ + DBInstanceClass: aws.String(d.Get("instance_class").(string)), + DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), + S3BucketName: aws.String(d.Get("backup_s3").Get("bucket_name").(string)), + S3Prefix: aws.String(d.Get("backup_s3").Get("bucket_prefix").(string)), + S3IngestionRoleArn: aws.String(d.Get("backup_s3").Get("role_arn").(string)), + AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), + PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), + Tags: tags, + CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), + } + + if attr, ok := d.GetOk("name"); ok { + // "Note: This parameter [DBName] doesn't apply to the MySQL, PostgreSQL, or MariaDB engines." + // https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html + switch strings.ToLower(d.Get("engine").(string)) { + case "mysql", "postgres", "mariadb": + // skip + default: + opts.DBName = aws.String(attr.(string)) + } + } + + if attr, ok := d.GetOk("availability_zone"); ok { + opts.AvailabilityZone = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + opts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine"); ok { + opts.Engine = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("iops"); ok { + opts.Iops = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("license_model"); ok { + opts.LicenseModel = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("multi_az"); ok { + opts.MultiAZ = aws.Bool(attr.(bool)) + } + + if attr, ok := d.GetOk("option_group_name"); ok { + opts.OptionGroupName = aws.String(attr.(string)) + + } + + if attr, ok := d.GetOk("port"); ok { + opts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("tde_credential_arn"); ok { + opts.TdeCredentialArn = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("storage_type"); ok { + opts.StorageType = aws.String(attr.(string)) + } + + log.Printf("[DEBUG] DB Instance restore from snapshot configuration: %s", opts) + _, err := conn.RestoreDBInstanceFromDBSnapshot(&opts) + if err != nil { + return fmt.Errorf("Error creating DB Instance: %s", err) + } + + var sgUpdate bool + var passwordUpdate bool + + if _, ok := d.GetOk("password"); ok { + passwordUpdate = true + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + sgUpdate = true + } + if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { + sgUpdate = true + } + if sgUpdate || passwordUpdate { + log.Printf("[INFO] DB is restoring from snapshot with default security, but custom security should be set, will now update after snapshot is restored!") + + // wait for instance to get up and then modify security + d.SetId(d.Get("identifier").(string)) + + log.Printf("[INFO] DB Instance ID: %s", d.Id()) + + log.Println( + "[INFO] Waiting for DB Instance to be available") + + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating", "backing-up", "modifying", "resetting-master-credentials", + "maintenance", "renaming", "rebooting", "upgrading"}, + Target: []string{"available"}, + Refresh: resourceAwsDbInstanceStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, // Wait 30 secs before starting + } + + // Wait, catching any errors + _, err := stateConf.WaitForState() + if err != nil { + return err + } + + err = resourceAwsDbInstanceUpdate(d, meta) + if err != nil { + return err + } + + } } else if _, ok := d.GetOk("snapshot_identifier"); ok { opts := rds.RestoreDBInstanceFromDBSnapshotInput{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), From 0631ac1ef74bac0b8ad9c64df57801d428af2575 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 20 Dec 2017 11:43:59 -0600 Subject: [PATCH 0013/3316] Fixed differences between remote provider and our branch --- aws/resource_aws_db_instance.go | 53 ++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 5f2b6bf3dd1..98b6f16888d 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -218,6 +218,35 @@ func resourceAwsDbInstance() *schema.Resource { }, }, + "s3_import": { + Type: schema.TypeSet, + Optional: true, + ConflictsWith: []string{ + "snapshot_identifier", + "replicate_source_db", + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_name": { + Type: schema.TypeString, + Required: true, + Optional: false, + ForceNew: true, + }, + "bucket_prefix": { + Type: schema.TypeString, + Required: true, + Optional: false, + }, + "ingestion_role": { + Type: schema.TypeString, + Required: true, + Optional: false, + }, + }, + }, + }, + "skip_final_snapshot": { Type: schema.TypeBool, Optional: true, @@ -432,12 +461,14 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error creating DB Instance: %s", err) } } else if _, ok := d.GetOk("backup_s3"); ok { - opts := rds.RestoreDBInstanceFromDBSnapshotInput{ + + record := d.Get("s3_import").(map[string]interface{}) + opts := rds.RestoreDBInstanceFromS3Input{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), - S3BucketName: aws.String(d.Get("backup_s3").Get("bucket_name").(string)), - S3Prefix: aws.String(d.Get("backup_s3").Get("bucket_prefix").(string)), - S3IngestionRoleArn: aws.String(d.Get("backup_s3").Get("role_arn").(string)), + S3BucketName: aws.String(record["bucket_name"].(string)), + S3Prefix: aws.String(record["bucket_prefix"].(string)), + S3IngestionRoleArn: aws.String(record["role_arn"].(string)), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), Tags: tags, @@ -488,16 +519,12 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.Port = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("tde_credential_arn"); ok { - opts.TdeCredentialArn = aws.String(attr.(string)) - } - if attr, ok := d.GetOk("storage_type"); ok { opts.StorageType = aws.String(attr.(string)) } log.Printf("[DEBUG] DB Instance restore from snapshot configuration: %s", opts) - _, err := conn.RestoreDBInstanceFromDBSnapshot(&opts) + _, err := conn.RestoreDBInstanceFromS3(&opts) if err != nil { return fmt.Errorf("Error creating DB Instance: %s", err) } @@ -527,10 +554,9 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error "[INFO] Waiting for DB Instance to be available") stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying", "resetting-master-credentials", - "maintenance", "renaming", "rebooting", "upgrading"}, - Target: []string{"available"}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(d, meta), + Pending: resourceAwsDbInstanceCreatePendingStates, + Target: []string{"available", "storage-optimization"}, + Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, // Wait 30 secs before starting @@ -602,7 +628,6 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error if attr, ok := d.GetOk("port"); ok { opts.Port = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("tde_credential_arn"); ok { opts.TdeCredentialArn = aws.String(attr.(string)) } From 0c85bbab86f42e4735832275d5c093f050163285 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 20 Dec 2017 16:33:26 -0600 Subject: [PATCH 0014/3316] Initial work on restore --- aws/resource_aws_db_instance.go | 47 ++++++++++++++++++++++--- aws/resource_aws_db_instance_test.go | 51 ++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 98b6f16888d..bc5f6435686 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -221,6 +221,7 @@ func resourceAwsDbInstance() *schema.Resource { "s3_import": { Type: schema.TypeSet, Optional: true, + MaxItems: 1, ConflictsWith: []string{ "snapshot_identifier", "replicate_source_db", @@ -243,6 +244,18 @@ func resourceAwsDbInstance() *schema.Resource { Required: true, Optional: false, }, + "source_engine": { + Type: schema.TypeString, + Required: false, + Optional: true, + Default: "mysql", + }, + "source_engine_version": { + Type: schema.TypeString, + Required: false, + Optional: true, + Default: "5.6", + }, }, }, }, @@ -460,15 +473,19 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("Error creating DB Instance: %s", err) } - } else if _, ok := d.GetOk("backup_s3"); ok { - - record := d.Get("s3_import").(map[string]interface{}) + } else if v, ok := d.GetOk("s3_import"); ok { + record := v.(*schema.Set).List()[0].(map[string]interface{}) opts := rds.RestoreDBInstanceFromS3Input{ + AllocatedStorage: aws.Int64(int64(d.Get("allocated_storage").(int))), DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), S3BucketName: aws.String(record["bucket_name"].(string)), S3Prefix: aws.String(record["bucket_prefix"].(string)), - S3IngestionRoleArn: aws.String(record["role_arn"].(string)), + S3IngestionRoleArn: aws.String(record["ingestion_role"].(string)), + MasterUsername: aws.String(d.Get("username").(string)), + MasterUserPassword: aws.String(d.Get("password").(string)), + SourceEngine: aws.String(record["source_engine"].(string)), + SourceEngineVersion: aws.String(record["source_engine_version"].(string)), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), Tags: tags, @@ -485,6 +502,28 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBName = aws.String(attr.(string)) } } + attr := d.Get("backup_retention_period") + opts.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) + if attr, ok := d.GetOk("backup_window"); ok { + opts.PreferredBackupWindow = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + var s []*string + for _, v := range attr.List() { + s = append(s, aws.String(v.(string))) + } + opts.VpcSecurityGroupIds = s + } + + if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { + var s []*string + for _, v := range attr.List() { + s = append(s, aws.String(v.(string))) + } + opts.DBSecurityGroups = s + } + if attr, ok := d.GetOk("availability_zone"); ok { opts.AvailabilityZone = aws.String(attr.(string)) diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index 6dfb8e15e2f..b9600754d45 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -312,6 +312,29 @@ func TestAccAWSDBInstance_snapshot(t *testing.T) { }) } +func TestAccAWSDBInstance_s3(t *testing.T) { + var snap rds.DBInstance + bucket := acctest.RandString(5) + prefix := acctest.RandString(5) + role := acctest.RandString(5) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + // testAccCheckAWSDBInstanceSnapshot verifies a database snapshot is + // created, and subequently deletes it + CheckDestroy: testAccCheckAWSDBInstanceNoSnapshot, + Steps: []resource.TestStep{ + { + Config: testAccSnapshotInstanceConfigWithS3Import(bucket, prefix, role), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists("aws_db_instance.s3", &snap), + ), + }, + }, + }) +} + func TestAccAWSDBInstance_enhancedMonitoring(t *testing.T) { var dbInstance rds.DBInstance rName := acctest.RandString(5) @@ -954,6 +977,34 @@ resource "aws_db_instance" "snapshot" { }`, acctest.RandInt()) } +func testAccSnapshotInstanceConfigWithS3Import(name string, prefix string, role string) string { + return fmt.Sprintf(` +resource "aws_db_instance" "s3" { + identifier = "test-db-instance-from-s3-import" + + allocated_storage = 5 + engine = "mysql" + engine_version = "5.6.35" + instance_class = "db.t2.micro" + name = "baz" + password = "barbarbarbar" + publicly_accessible = true + username = "foo" + backup_retention_period = 1 + + parameter_group_name = "default.mysql5.6" + + copy_tags_to_snapshot = true + final_snapshot_identifier = "foobarbaz-test-terraform-final-snapshot-%d" + s3_import { + bucket_name = "%s" + bucket_prefix = "%s" + ingestion_role = "%s" + } +} +`, name, prefix, role) +} + func testAccSnapshotInstanceConfigWithSnapshot(rInt int) string { return fmt.Sprintf(` resource "aws_db_instance" "snapshot" { From b581dedff93b5cbdb5b4c5d6bc3def3d3c9eeaed Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 20 Dec 2017 17:09:42 -0600 Subject: [PATCH 0015/3316] Moved to use more of the CreateDBInstance vs. RestoreDB due to how s3 restores work --- aws/resource_aws_db_instance.go | 177 ++++++++++++++++++-------------- 1 file changed, 100 insertions(+), 77 deletions(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index bc5f6435686..902eddf6175 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -474,41 +474,73 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error creating DB Instance: %s", err) } } else if v, ok := d.GetOk("s3_import"); ok { + + if _, ok := d.GetOk("allocated_storage"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "allocated_storage": required field is not set`, d.Get("name").(string)) + } + if _, ok := d.GetOk("engine"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "engine": required field is not set`, d.Get("name").(string)) + } + if _, ok := d.GetOk("password"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "password": required field is not set`, d.Get("name").(string)) + } + if _, ok := d.GetOk("username"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "username": required field is not set`, d.Get("name").(string)) + } + record := v.(*schema.Set).List()[0].(map[string]interface{}) opts := rds.RestoreDBInstanceFromS3Input{ AllocatedStorage: aws.Int64(int64(d.Get("allocated_storage").(int))), + AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), + CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), + DBName: aws.String(d.Get("name").(string)), DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + EngineVersion: aws.String(d.Get("engine_version").(string)), S3BucketName: aws.String(record["bucket_name"].(string)), S3Prefix: aws.String(record["bucket_prefix"].(string)), S3IngestionRoleArn: aws.String(record["ingestion_role"].(string)), MasterUsername: aws.String(d.Get("username").(string)), MasterUserPassword: aws.String(d.Get("password").(string)), + PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), SourceEngine: aws.String(record["source_engine"].(string)), SourceEngineVersion: aws.String(record["source_engine_version"].(string)), - AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), Tags: tags, - CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), } - if attr, ok := d.GetOk("name"); ok { - // "Note: This parameter [DBName] doesn't apply to the MySQL, PostgreSQL, or MariaDB engines." - // https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html - switch strings.ToLower(d.Get("engine").(string)) { - case "mysql", "postgres", "mariadb": - // skip - default: - opts.DBName = aws.String(attr.(string)) - } + if attr, ok := d.GetOk("multi_az"); ok { + opts.MultiAZ = aws.Bool(attr.(bool)) + + } + + if _, ok := d.GetOk("character_set_name"); ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "character_set_name" doesn't work with with restores"`, d.Get("name").(string)) + } + if _, ok := d.GetOk("timezone"); ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "timezone" doesn't work with with restores"`, d.Get("name").(string)) } - attr := d.Get("backup_retention_period") - opts.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) - if attr, ok := d.GetOk("backup_window"); ok { - opts.PreferredBackupWindow = aws.String(attr.(string)) - } - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + attr := d.Get("backup_retention_period") + opts.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) + + if attr, ok := d.GetOk("maintenance_window"); ok { + opts.PreferredMaintenanceWindow = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("backup_window"); ok { + opts.PreferredBackupWindow = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("license_model"); ok { + opts.LicenseModel = aws.String(attr.(string)) + } + if attr, ok := d.GetOk("parameter_group_name"); ok { + opts.DBParameterGroupName = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { var s []*string for _, v := range attr.List() { s = append(s, aws.String(v.(string))) @@ -523,96 +555,87 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } opts.DBSecurityGroups = s } - - - if attr, ok := d.GetOk("availability_zone"); ok { - opts.AvailabilityZone = aws.String(attr.(string)) + if attr, ok := d.GetOk("storage_type"); ok { + opts.StorageType = aws.String(attr.(string)) } if attr, ok := d.GetOk("db_subnet_group_name"); ok { opts.DBSubnetGroupName = aws.String(attr.(string)) } - if attr, ok := d.GetOk("engine"); ok { - opts.Engine = aws.String(attr.(string)) - } - if attr, ok := d.GetOk("iops"); ok { opts.Iops = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("license_model"); ok { - opts.LicenseModel = aws.String(attr.(string)) + if attr, ok := d.GetOk("port"); ok { + opts.Port = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("multi_az"); ok { - opts.MultiAZ = aws.Bool(attr.(bool)) + if attr, ok := d.GetOk("availability_zone"); ok { + opts.AvailabilityZone = aws.String(attr.(string)) } - if attr, ok := d.GetOk("option_group_name"); ok { - opts.OptionGroupName = aws.String(attr.(string)) - + if attr, ok := d.GetOk("monitoring_role_arn"); ok { + opts.MonitoringRoleArn = aws.String(attr.(string)) } - if attr, ok := d.GetOk("port"); ok { - opts.Port = aws.Int64(int64(attr.(int))) + if attr, ok := d.GetOk("monitoring_interval"); ok { + opts.MonitoringInterval = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("storage_type"); ok { - opts.StorageType = aws.String(attr.(string)) + if attr, ok := d.GetOk("option_group_name"); ok { + opts.OptionGroupName = aws.String(attr.(string)) } - log.Printf("[DEBUG] DB Instance restore from snapshot configuration: %s", opts) - _, err := conn.RestoreDBInstanceFromS3(&opts) - if err != nil { - return fmt.Errorf("Error creating DB Instance: %s", err) + if attr, ok := d.GetOk("kms_key_id"); ok { + opts.KmsKeyId = aws.String(attr.(string)) } - var sgUpdate bool - var passwordUpdate bool - - if _, ok := d.GetOk("password"); ok { - passwordUpdate = true + if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { + opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) } - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - sgUpdate = true - } - if attr := d.Get("security_group_names").(*schema.Set); attr.Len() > 0 { - sgUpdate = true + log.Printf("[DEBUG] DB Instance S3 Restore configuration: %#v", opts) + var err error + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err = conn.RestoreDBInstanceFromS3(&opts) + if err != nil { + if awsErr, ok := err.(awserr.Error); ok { + if awsErr.Code() == "InvalidParameterValue" && strings.Contains(awsErr.Message(), "ENHANCED_MONITORING") { + return resource.RetryableError(awsErr) + } + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error creating DB Instance: %s", err) } - if sgUpdate || passwordUpdate { - log.Printf("[INFO] DB is restoring from snapshot with default security, but custom security should be set, will now update after snapshot is restored!") - // wait for instance to get up and then modify security - d.SetId(d.Get("identifier").(string)) + d.SetId(d.Get("identifier").(string)) - log.Printf("[INFO] DB Instance ID: %s", d.Id()) - - log.Println( - "[INFO] Waiting for DB Instance to be available") + log.Printf("[INFO] DB Instance ID: %s", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsDbInstanceCreatePendingStates, - Target: []string{"available", "storage-optimization"}, - Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, // Wait 30 secs before starting - } + log.Println( + "[INFO] Waiting for DB Instance to be available") - // Wait, catching any errors - _, err := stateConf.WaitForState() - if err != nil { - return err - } - - err = resourceAwsDbInstanceUpdate(d, meta) - if err != nil { - return err - } + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsDbInstanceCreatePendingStates, + Target: []string{"available", "storage-optimization"}, + Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, // Wait 30 secs before starting + } + // Wait, catching any errors + _, err = stateConf.WaitForState() + if err != nil { + return err } + + return resourceAwsDbInstanceRead(d, meta) } else if _, ok := d.GetOk("snapshot_identifier"); ok { opts := rds.RestoreDBInstanceFromDBSnapshotInput{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), From 5fbaa97c5730bfa1712b0ce47d0b8936521063fa Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 20 Dec 2017 17:24:40 -0600 Subject: [PATCH 0016/3316] Add docs, made prefix optional --- aws/resource_aws_db_instance.go | 5 +++-- website/docs/r/db_instance.html.markdown | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 902eddf6175..ed0b082f594 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -236,8 +236,9 @@ func resourceAwsDbInstance() *schema.Resource { }, "bucket_prefix": { Type: schema.TypeString, - Required: true, - Optional: false, + Required: false, + Optional: true, + Default: "", }, "ingestion_role": { Type: schema.TypeString, diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 93788540fe9..f5dbdc20598 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -160,11 +160,33 @@ for more information. is provided) Username for the master DB user. * `vpc_security_group_ids` - (Optional) List of VPC security groups to associate. +* `s3_import` - (Optional) Restore from a Percona Xtrabackup in S3. See [Importing Data into an Amazon RDS MySQL DB Instance](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html) ~> **NOTE:** Removing the `replicate_source_db` attribute from an existing RDS Replicate database managed by Terraform will promote the database to a fully standalone database. + +#### S3 Import Options +Full details on the core parameters and impacts are in the API Docs: [RestoreDBInstanceFromS3](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromS3.html). Sample +```hcl +resource "aws_db_instance" "db" { + s3_import { + bucket_name = "mybucket" + bucket_prefix = "backups" + ingestion_role = "arn:aws:iam::1234567890:role/role-xtrabackup-rds-restore" + } +} +``` +* `bucket_name` - (Required) The bucket name where your backup is stored +* `bucket_prefix` - (Optional) Can be blank, but is the path to your backup +* `ingestion_role` - (Required) Role applied to load the data. +* `source_engine` - (Defaults to 'mysql') Source engine for the backup +* `source_engine_version` - (Defaults to '5.6') Version of the source engine used to make the backup + +This will NOT recreate the resource if the S3 object changes in someway. It's only used to initial the database + + ## Attributes Reference The following attributes are exported: From 37996e073ac0f1f426d75c88dd0b5d0860a00ec0 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 20 Dec 2017 17:26:16 -0600 Subject: [PATCH 0017/3316] Fixed formatting --- aws/resource_aws_db_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index ed0b082f594..9bfd0edcef4 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -238,7 +238,7 @@ func resourceAwsDbInstance() *schema.Resource { Type: schema.TypeString, Required: false, Optional: true, - Default: "", + Default: "", }, "ingestion_role": { Type: schema.TypeString, From ba05f2cd6692670e9d155b90322e500cb73ea133 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 20 Dec 2017 17:35:09 -0600 Subject: [PATCH 0018/3316] Fixed missing copy paste on parameter to test --- aws/resource_aws_db_instance_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index b9600754d45..da9e8c85809 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -995,7 +995,7 @@ resource "aws_db_instance" "s3" { parameter_group_name = "default.mysql5.6" copy_tags_to_snapshot = true - final_snapshot_identifier = "foobarbaz-test-terraform-final-snapshot-%d" + final_snapshot_identifier = "foobarbaz-test-terraform-final-snapshot" s3_import { bucket_name = "%s" bucket_prefix = "%s" From 48c17ffd08985f3a777489d8261a67b661ececee Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Fri, 22 Dec 2017 07:02:54 +1100 Subject: [PATCH 0019/3316] Allow the use of a statement_id_prefix --- aws/resource_aws_lambda_permission.go | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_lambda_permission.go b/aws/resource_aws_lambda_permission.go index f5b60e75096..c39d7f34cba 100644 --- a/aws/resource_aws_lambda_permission.go +++ b/aws/resource_aws_lambda_permission.go @@ -61,7 +61,15 @@ func resourceAwsLambdaPermission() *schema.Resource { }, "statement_id": { Type: schema.TypeString, - Required: true, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"statement_id_prefix"}, + ValidateFunc: validatePolicyStatementId, + }, + "statement_id_prefix": { + Type: schema.TypeString, + Optional: true, ForceNew: true, ValidateFunc: validatePolicyStatementId, }, @@ -74,6 +82,15 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) functionName := d.Get("function_name").(string) + var statementId string + if v, ok := d.GetOk("statement_id"); ok { + statementId = v.(string) + } else if v, ok := d.GetOk("statement_id_prefix"); ok { + statementId = resource.PrefixedUniqueId(v.(string)) + } else { + statementId = resource.UniqueId() + } + // There is a bug in the API (reported and acknowledged by AWS) // which causes some permissions to be ignored when API calls are sent in parallel // We work around this bug via mutex @@ -84,7 +101,7 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) Action: aws.String(d.Get("action").(string)), FunctionName: aws.String(functionName), Principal: aws.String(d.Get("principal").(string)), - StatementId: aws.String(d.Get("statement_id").(string)), + StatementId: aws.String(statementId), } if v, ok := d.GetOk("qualifier"); ok { From b9825aab4b370ce8d88589a5548b1f8c5297e845 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Fri, 22 Dec 2017 07:17:02 +1100 Subject: [PATCH 0020/3316] Add a test for generated statement_id with prefix --- aws/resource_aws_lambda_permission_test.go | 65 +++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_lambda_permission_test.go b/aws/resource_aws_lambda_permission_test.go index 4acc6b52fef..f2e654fa720 100644 --- a/aws/resource_aws_lambda_permission_test.go +++ b/aws/resource_aws_lambda_permission_test.go @@ -194,7 +194,7 @@ func TestAccAWSLambdaPermission_withRawFunctionName(t *testing.T) { { Config: testAccAWSLambdaPermissionConfig_withRawFunctionName, Check: resource.ComposeTestCheckFunc( - testAccCheckLambdaPermissionExists("aws_lambda_permission.with_raw_func_name", &statement), + testAccCheckLambdaPermissionExists("aws_lambda_permission.", &statement), resource.TestCheckResourceAttr("aws_lambda_permission.with_raw_func_name", "action", "lambda:InvokeFunction"), resource.TestCheckResourceAttr("aws_lambda_permission.with_raw_func_name", "principal", "events.amazonaws.com"), resource.TestCheckResourceAttr("aws_lambda_permission.with_raw_func_name", "statement_id", "AllowExecutionWithRawFuncName"), @@ -205,6 +205,31 @@ func TestAccAWSLambdaPermission_withRawFunctionName(t *testing.T) { }) } + +func TestAccAWSLambdaPermission_withStatementIdPrefix(t *testing.T) { + var statement LambdaPolicyStatement + endsWithFuncName := regexp.MustCompile(":function:lambda_function_name_perm$") + startsWithPrefix := regexp.MustCompile("^AllowExecutionWithStatementIdPrefix-") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLambdaPermissionConfig_withStatementIdPrefix, + Check: resource.ComposeTestCheckFunc( + testAccCheckLambdaPermissionExists("aws_lambda_permission.with_statement_id_prefix", &statement), + resource.TestCheckResourceAttr("aws_lambda_permission.with_statement_id_prefix", "action", "lambda:InvokeFunction"), + resource.TestCheckResourceAttr("aws_lambda_permission.with_statement_id_prefix", "principal", "events.amazonaws.com"), + resource.TestMatchResourceAttr("aws_lambda_permission.with_statement_id_prefix", "statement_id", startsWithPrefix), + resource.TestMatchResourceAttr("aws_lambda_permission.with_statement_id_prefix", "function_name", endsWithFuncName), + ), + }, + }, + }) +} + func TestAccAWSLambdaPermission_withQualifier(t *testing.T) { var statement LambdaPolicyStatement endsWithFuncName := regexp.MustCompile(":function:lambda_function_name_perm_qualifier$") @@ -570,6 +595,44 @@ EOF } ` + + +var testAccAWSLambdaPermissionConfig_withStatementIdPrefix = ` +resource "aws_lambda_permission" "with_statement_id_prefix" { + statement_id_prefix = "AllowExecutionWithStatementIdPrefix-" + action = "lambda:InvokeFunction" + function_name = "${aws_lambda_function.test_lambda.arn}" + principal = "events.amazonaws.com" +} + +resource "aws_lambda_function" "test_lambda" { + filename = "test-fixtures/lambdatest.zip" + function_name = "lambda_function_name_perm" + role = "${aws_iam_role.iam_for_lambda.arn}" + handler = "exports.handler" + runtime = "nodejs4.3" +} + +resource "aws_iam_role" "iam_for_lambda" { + name = "%s" + assume_role_policy = < Date: Fri, 22 Dec 2017 07:19:30 +1100 Subject: [PATCH 0021/3316] Update documentation to advertise the prefix --- website/docs/r/lambda_permission.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/r/lambda_permission.html.markdown b/website/docs/r/lambda_permission.html.markdown index 87ad3d23930..f8783a0562b 100644 --- a/website/docs/r/lambda_permission.html.markdown +++ b/website/docs/r/lambda_permission.html.markdown @@ -112,12 +112,13 @@ EOF ## Argument Reference + * `statement_id` - (Optional) A unique statement identifier. By default generated by Terraform. + * `statement_id_prefix` - (Optional) A unique statement identifier. Conflicts with `statement_id`. * `action` - (Required) The AWS Lambda action you want to allow in this statement. (e.g. `lambda:InvokeFunction`) * `function_name` - (Required) Name of the Lambda function whose resource policy you are updating * `principal` - (Required) The principal who is getting this permission. e.g. `s3.amazonaws.com`, an AWS account ID, or any valid AWS service principal such as `events.amazonaws.com` or `sns.amazonaws.com`. - * `statement_id` - (Required) A unique statement identifier. * `qualifier` - (Optional) Query parameter to specify function version or alias name. The permission will then apply to the specific qualified ARN. e.g. `arn:aws:lambda:aws-region:acct-id:function:function-name:2` From 42e00c686d46b905a124ae38553728e3220fc99b Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Fri, 22 Dec 2017 07:20:48 +1100 Subject: [PATCH 0022/3316] Fix accidental removal --- aws/resource_aws_lambda_permission_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_lambda_permission_test.go b/aws/resource_aws_lambda_permission_test.go index f2e654fa720..30f4ce8fe61 100644 --- a/aws/resource_aws_lambda_permission_test.go +++ b/aws/resource_aws_lambda_permission_test.go @@ -194,7 +194,7 @@ func TestAccAWSLambdaPermission_withRawFunctionName(t *testing.T) { { Config: testAccAWSLambdaPermissionConfig_withRawFunctionName, Check: resource.ComposeTestCheckFunc( - testAccCheckLambdaPermissionExists("aws_lambda_permission.", &statement), + testAccCheckLambdaPermissionExists("aws_lambda_permission.with_raw_func_name", &statement), resource.TestCheckResourceAttr("aws_lambda_permission.with_raw_func_name", "action", "lambda:InvokeFunction"), resource.TestCheckResourceAttr("aws_lambda_permission.with_raw_func_name", "principal", "events.amazonaws.com"), resource.TestCheckResourceAttr("aws_lambda_permission.with_raw_func_name", "statement_id", "AllowExecutionWithRawFuncName"), From daefe5b7bdf921f340c282443b5b5193478942ba Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Fri, 22 Dec 2017 07:29:03 +1100 Subject: [PATCH 0023/3316] Force the ID to be the statementId generated --- aws/resource_aws_lambda_permission.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_lambda_permission.go b/aws/resource_aws_lambda_permission.go index c39d7f34cba..aa8ebcc810d 100644 --- a/aws/resource_aws_lambda_permission.go +++ b/aws/resource_aws_lambda_permission.go @@ -144,7 +144,7 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Created new Lambda permission, but no Statement was included") } - d.SetId(d.Get("statement_id").(string)) + d.SetId(statementId) err = resource.Retry(5*time.Minute, func() *resource.RetryError { // IAM is eventually cosistent :/ From 2f2dbf92227763ddd21cefa3b0db273350da849b Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Fri, 22 Dec 2017 07:37:23 +1100 Subject: [PATCH 0024/3316] Fix format --- aws/resource_aws_lambda_permission.go | 4 ++-- aws/resource_aws_lambda_permission_test.go | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_lambda_permission.go b/aws/resource_aws_lambda_permission.go index aa8ebcc810d..67b5ac787fa 100644 --- a/aws/resource_aws_lambda_permission.go +++ b/aws/resource_aws_lambda_permission.go @@ -60,12 +60,12 @@ func resourceAwsLambdaPermission() *schema.Resource { ValidateFunc: validateArn, }, "statement_id": { - Type: schema.TypeString, + Type: schema.TypeString, Optional: true, Computed: true, ForceNew: true, ConflictsWith: []string{"statement_id_prefix"}, - ValidateFunc: validatePolicyStatementId, + ValidateFunc: validatePolicyStatementId, }, "statement_id_prefix": { Type: schema.TypeString, diff --git a/aws/resource_aws_lambda_permission_test.go b/aws/resource_aws_lambda_permission_test.go index 30f4ce8fe61..f2b3d877cc6 100644 --- a/aws/resource_aws_lambda_permission_test.go +++ b/aws/resource_aws_lambda_permission_test.go @@ -205,7 +205,6 @@ func TestAccAWSLambdaPermission_withRawFunctionName(t *testing.T) { }) } - func TestAccAWSLambdaPermission_withStatementIdPrefix(t *testing.T) { var statement LambdaPolicyStatement endsWithFuncName := regexp.MustCompile(":function:lambda_function_name_perm$") @@ -595,8 +594,6 @@ EOF } ` - - var testAccAWSLambdaPermissionConfig_withStatementIdPrefix = ` resource "aws_lambda_permission" "with_statement_id_prefix" { statement_id_prefix = "AllowExecutionWithStatementIdPrefix-" From a17d14ee43fe3eb03c3f3fbd56d19c81c121fe41 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 23 Dec 2017 02:40:21 +1100 Subject: [PATCH 0025/3316] Add support of prefixes for aws_cloudwatch_event_rule --- aws/resource_aws_cloudwatch_event_rule.go | 23 +++++++++++-- ...resource_aws_cloudwatch_event_rule_test.go | 32 +++++++++++++++++++ .../r/cloudwatch_event_rule.html.markdown | 5 +-- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_cloudwatch_event_rule.go b/aws/resource_aws_cloudwatch_event_rule.go index e079a56c761..888a87a5a48 100644 --- a/aws/resource_aws_cloudwatch_event_rule.go +++ b/aws/resource_aws_cloudwatch_event_rule.go @@ -26,8 +26,16 @@ func resourceAwsCloudWatchEventRule() *schema.Resource { Schema: map[string]*schema.Schema{ "name": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateCloudWatchEventRuleName, + }, + "name_prefix": &schema.Schema{ Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, ValidateFunc: validateCloudWatchEventRuleName, }, @@ -99,7 +107,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface } d.Set("arn", out.RuleArn) - d.SetId(d.Get("name").(string)) + d.SetId(input.Name) log.Printf("[INFO] CloudWatch Event Rule %q created", *out.RuleArn) @@ -220,8 +228,17 @@ func resourceAwsCloudWatchEventRuleDelete(d *schema.ResourceData, meta interface } func buildPutRuleInputStruct(d *schema.ResourceData) (*events.PutRuleInput, error) { + var name String + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + name = resource.PrefixedUniqueId(v.(string)) + } else { + name = resource.UniqueId() + } + input := events.PutRuleInput{ - Name: aws.String(d.Get("name").(string)), + Name: aws.String(name), } if v, ok := d.GetOk("description"); ok { input.Description = aws.String(v.(string)) diff --git a/aws/resource_aws_cloudwatch_event_rule_test.go b/aws/resource_aws_cloudwatch_event_rule_test.go index e69489777f8..b857b6d0bad 100644 --- a/aws/resource_aws_cloudwatch_event_rule_test.go +++ b/aws/resource_aws_cloudwatch_event_rule_test.go @@ -37,6 +37,26 @@ func TestAccAWSCloudWatchEventRule_basic(t *testing.T) { }) } +func TestAccAWSCloudWatchEventRule_prefix(t *testing.T) { + var rule events.DescribeRuleOutput + startsWithPrefix := regexp.MustCompile("^tf-acc-cw-event-rule-prefix-") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCloudWatchEventRuleDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSCloudWatchEventRuleConfig_prefix, + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudWatchEventRuleExists("aws_cloudwatch_event_rule.foo", &rule), + resource.TestMatchResourceAttr("aws_cloudwatch_event_rule.foo", "name", startsWithPrefix), + ), + }, + }, + }) +} + func TestAccAWSCloudWatchEventRule_full(t *testing.T) { var rule events.DescribeRuleOutput @@ -252,6 +272,18 @@ resource "aws_cloudwatch_event_rule" "foo" { } ` +var testAccAWSCloudWatchEventRuleConfig_prefix = ` +resource "aws_cloudwatch_event_rule" "moobar" { + name_prefix = "tf-acc-cw-event-rule-prefix-" + schedule_expression = "rate(5 minutes)" + event_pattern = < Date: Sat, 23 Dec 2017 02:50:22 +1100 Subject: [PATCH 0026/3316] Name is a pointer to a string --- aws/resource_aws_cloudwatch_event_rule.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_cloudwatch_event_rule.go b/aws/resource_aws_cloudwatch_event_rule.go index 888a87a5a48..788ca1c561f 100644 --- a/aws/resource_aws_cloudwatch_event_rule.go +++ b/aws/resource_aws_cloudwatch_event_rule.go @@ -107,7 +107,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface } d.Set("arn", out.RuleArn) - d.SetId(input.Name) + d.SetId(*input.Name) log.Printf("[INFO] CloudWatch Event Rule %q created", *out.RuleArn) From d1ecaccde4f4201df66a66b7c7256090b5155879 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 23 Dec 2017 02:50:34 +1100 Subject: [PATCH 0027/3316] string not String --- aws/resource_aws_cloudwatch_event_rule.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_cloudwatch_event_rule.go b/aws/resource_aws_cloudwatch_event_rule.go index 788ca1c561f..f17ddd230b7 100644 --- a/aws/resource_aws_cloudwatch_event_rule.go +++ b/aws/resource_aws_cloudwatch_event_rule.go @@ -228,7 +228,7 @@ func resourceAwsCloudWatchEventRuleDelete(d *schema.ResourceData, meta interface } func buildPutRuleInputStruct(d *schema.ResourceData) (*events.PutRuleInput, error) { - var name String + var name string if v, ok := d.GetOk("name"); ok { name = v.(string) } else if v, ok := d.GetOk("name_prefix"); ok { From 2faa21b80dc8b4f2bed9133bfdecd534690a767e Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 23 Dec 2017 03:06:24 +1100 Subject: [PATCH 0028/3316] Import regexp --- aws/resource_aws_cloudwatch_event_rule_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_cloudwatch_event_rule_test.go b/aws/resource_aws_cloudwatch_event_rule_test.go index b857b6d0bad..8d76f7907b3 100644 --- a/aws/resource_aws_cloudwatch_event_rule_test.go +++ b/aws/resource_aws_cloudwatch_event_rule_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "testing" + "regexp" "github.com/aws/aws-sdk-go/aws" events "github.com/aws/aws-sdk-go/service/cloudwatchevents" From f8696603f6abb5b3cea07d84fa545b5165ced4e3 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 23 Dec 2017 03:19:26 +1100 Subject: [PATCH 0029/3316] Fix formatting --- aws/resource_aws_cloudwatch_event_rule_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_cloudwatch_event_rule_test.go b/aws/resource_aws_cloudwatch_event_rule_test.go index 8d76f7907b3..27bcdd70d56 100644 --- a/aws/resource_aws_cloudwatch_event_rule_test.go +++ b/aws/resource_aws_cloudwatch_event_rule_test.go @@ -2,8 +2,8 @@ package aws import ( "fmt" - "testing" "regexp" + "testing" "github.com/aws/aws-sdk-go/aws" events "github.com/aws/aws-sdk-go/service/cloudwatchevents" From 698036acc6d5d64ebb9707eef4f0ed8a6e2c9468 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 23 Dec 2017 03:53:50 +1100 Subject: [PATCH 0030/3316] Add support of prefixes for aws_db_event_subscription --- aws/resource_aws_db_event_subscription.go | 18 ++++++- ...resource_aws_db_event_subscription_test.go | 54 +++++++++++++++++++ .../r/db_event_subscription.html.markdown | 3 +- 3 files changed, 72 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_db_event_subscription.go b/aws/resource_aws_db_event_subscription.go index 9e725ce2d89..1a4ce4809a8 100644 --- a/aws/resource_aws_db_event_subscription.go +++ b/aws/resource_aws_db_event_subscription.go @@ -23,8 +23,15 @@ func resourceAwsDbEventSubscription() *schema.Resource { }, Schema: map[string]*schema.Schema{ "name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateDbEventSubscriptionName, + }, + "name_prefix": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, ValidateFunc: validateDbEventSubscriptionName, }, @@ -66,7 +73,14 @@ func resourceAwsDbEventSubscription() *schema.Resource { func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { rdsconn := meta.(*AWSClient).rdsconn - name := d.Get("name").(string) + var name string + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + name = resource.PrefixedUniqueId(v.(string)) + } else { + name = resource.UniqueId() + } tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) sourceIdsSet := d.Get("source_ids").(*schema.Set) diff --git a/aws/resource_aws_db_event_subscription_test.go b/aws/resource_aws_db_event_subscription_test.go index c6dfde77374..51c3a05debb 100644 --- a/aws/resource_aws_db_event_subscription_test.go +++ b/aws/resource_aws_db_event_subscription_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -51,6 +52,35 @@ func TestAccAWSDBEventSubscription_basicUpdate(t *testing.T) { }) } + +func TestAccAWSDBEventSubscription_withPrefix(t *testing.T) { + var v rds.EventSubscription + rInt := acctest.RandInt() + startsWithPrefix := regexp.MustCompile("^tf-acc-test-rds-event-subs-") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBEventSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBEventSubscriptionConfigWithPrefix(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBEventSubscriptionExists("aws_db_event_subscription.bar", &v), + resource.TestCheckResourceAttr( + "aws_db_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr( + "aws_db_event_subscription.bar", "source_type", "db-instance"), + resource.TestMatchResourceAttr( + "aws_db_event_subscription.bar", "name", startsWithPrefix), + resource.TestCheckResourceAttr( + "aws_db_event_subscription.bar", "tags.Name", "name"), + ), + }, + }, + }) +} + func TestAccAWSDBEventSubscription_withSourceIds(t *testing.T) { var v rds.EventSubscription rInt := acctest.RandInt() @@ -186,6 +216,30 @@ resource "aws_db_event_subscription" "bar" { }`, rInt, rInt) } + +func testAccAWSDBEventSubscriptionConfigWithPrefix(rInt int) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "aws_sns_topic" { + name = "tf-acc-test-rds-event-subs-sns-topic-%d" +} + +resource "aws_db_event_subscription" "bar" { + name_prefix = "tf-acc-test-rds-event-subs-" + sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + source_type = "db-instance" + event_categories = [ + "availability", + "backup", + "creation", + "deletion", + "maintenance" + ] + tags { + Name = "name" + } +}`, rInt, rInt) +} + func testAccAWSDBEventSubscriptionConfigUpdate(rInt int) string { return fmt.Sprintf(` resource "aws_sns_topic" "aws_sns_topic" { diff --git a/website/docs/r/db_event_subscription.html.markdown b/website/docs/r/db_event_subscription.html.markdown index d3d853a855b..6410e03b7a8 100644 --- a/website/docs/r/db_event_subscription.html.markdown +++ b/website/docs/r/db_event_subscription.html.markdown @@ -53,7 +53,8 @@ resource "aws_db_event_subscription" "default" { The following arguments are supported: -* `name` - (Required) The name of the DB event subscription. +* `name` - (Optional) The name of the DB event subscription. By default generated by Terraform. +* `name_prefix` - (Optional) The name of the DB event subscription. Conflicts with `name`. * `sns_topic` - (Required) The SNS topic to send events to. * `source_ids` - (Optional) A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. * `source_type` - (Optional) The type of source that will be generating the events. From a1e8ee38b96b3752f8dda5d8f42aaf0df5ae2449 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 23 Dec 2017 03:57:09 +1100 Subject: [PATCH 0031/3316] Fix format --- aws/resource_aws_db_event_subscription_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/aws/resource_aws_db_event_subscription_test.go b/aws/resource_aws_db_event_subscription_test.go index 51c3a05debb..5bd2559bfda 100644 --- a/aws/resource_aws_db_event_subscription_test.go +++ b/aws/resource_aws_db_event_subscription_test.go @@ -52,7 +52,6 @@ func TestAccAWSDBEventSubscription_basicUpdate(t *testing.T) { }) } - func TestAccAWSDBEventSubscription_withPrefix(t *testing.T) { var v rds.EventSubscription rInt := acctest.RandInt() @@ -216,7 +215,6 @@ resource "aws_db_event_subscription" "bar" { }`, rInt, rInt) } - func testAccAWSDBEventSubscriptionConfigWithPrefix(rInt int) string { return fmt.Sprintf(` resource "aws_sns_topic" "aws_sns_topic" { From 47d2b50d801b8aa4ac0ab04e39ca48eacc6c0759 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Sat, 23 Dec 2017 04:25:32 +1100 Subject: [PATCH 0032/3316] Fix printf call --- aws/resource_aws_db_event_subscription_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_db_event_subscription_test.go b/aws/resource_aws_db_event_subscription_test.go index 5bd2559bfda..d559007cac2 100644 --- a/aws/resource_aws_db_event_subscription_test.go +++ b/aws/resource_aws_db_event_subscription_test.go @@ -235,7 +235,7 @@ resource "aws_db_event_subscription" "bar" { tags { Name = "name" } -}`, rInt, rInt) +}`, rInt) } func testAccAWSDBEventSubscriptionConfigUpdate(rInt int) string { From b98ad628e1e4cb20eee4ae7439925c2a10c0ff17 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sun, 31 Dec 2017 23:17:39 +0900 Subject: [PATCH 0033/3316] Support type for environment_variable --- aws/resource_aws_codebuild_project.go | 19 +++++++++++++++++++ .../docs/r/codebuild_project.html.markdown | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 32745251606..94e05f2e3b6 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -95,6 +95,21 @@ func resourceAwsCodeBuildProject() *schema.Resource { Type: schema.TypeString, Required: true, }, + "type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validType := []string{"PARAMETER_STORE", "PLAINTEXT"} + for _, str := range validType { + if value == str { + return + } + } + errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) + return + }, + }, }, }, }, @@ -314,6 +329,10 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm projectEnvironmentVar.Value = &v } + if v := config["type"].(string); v != "" { + projectEnvironmentVar.Type = &v + } + projectEnvironmentVariables = append(projectEnvironmentVariables, projectEnvironmentVar) } diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index bb6a0c22bb0..14a732568d8 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -134,6 +134,7 @@ The following arguments are supported: `environment_variable` supports the following: * `name` - (Required) The environment variable's name or key. * `value` - (Required) The environment variable's value. +* `type` - (Optional) The type of environment variable. Valid values: `PARAMETER_STORE`, `PLAINTEXT`. `source` supports the following: @@ -156,4 +157,3 @@ The following attributes are exported: * `encryption_key` - The AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for encrypting the build project's build output artifacts. * `name` - The projects name. * `service_role` - The ARN of the IAM service role. - From 19e67631092b8a1fd49817719c521503954b9976 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Mon, 1 Jan 2018 01:07:57 +0900 Subject: [PATCH 0034/3316] wip --- aws/provider.go | 1 + aws/resource_aws_codebuild_webhook.go | 84 +++++++++++++ aws/resource_aws_codebuild_webhook_test.go | 78 ++++++++++++ website/aws.erb | 4 + .../docs/r/codebuild_webhook.html.markdown | 118 ++++++++++++++++++ 5 files changed, 285 insertions(+) create mode 100644 aws/resource_aws_codebuild_webhook.go create mode 100644 aws/resource_aws_codebuild_webhook_test.go create mode 100644 website/docs/r/codebuild_webhook.html.markdown diff --git a/aws/provider.go b/aws/provider.go index e4c80bfcceb..2e6bb9ab60e 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -301,6 +301,7 @@ func Provider() terraform.ResourceProvider { "aws_codecommit_repository": resourceAwsCodeCommitRepository(), "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), "aws_codebuild_project": resourceAwsCodeBuildProject(), + "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), "aws_codepipeline": resourceAwsCodePipeline(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_db_event_subscription": resourceAwsDbEventSubscription(), diff --git a/aws/resource_aws_codebuild_webhook.go b/aws/resource_aws_codebuild_webhook.go new file mode 100644 index 00000000000..07785d181d9 --- /dev/null +++ b/aws/resource_aws_codebuild_webhook.go @@ -0,0 +1,84 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codebuild" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCodeBuildWebhook() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCodeBuildWebhookCreate, + Read: resourceAwsCodeBuildWebhookRead, + Delete: resourceAwsCodeBuildWebhookDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "url": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsCodeBuildWebhookCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + resp, err := conn.CreateWebhook(&codebuild.CreateWebhookInput{ + ProjectName: aws.String(d.Get("name").(string)), + }) + if err != nil { + return err + } + + d.SetId(d.Get("name").(string)) + d.Set("url", resp.Webhook.Url) + return nil +} + +func resourceAwsCodeBuildWebhookRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + resp, err := conn.BatchGetProjects(&codebuild.BatchGetProjectsInput{ + Names: []*string{ + aws.String(d.Id()), + }, + }) + + if err != nil { + return err + } + + if len(resp.Projects) == 0 { + d.SetId("") + return nil + } + + project := resp.Projects[0] + d.Set("url", project.Webhook.Url) + return nil +} + +func resourceAwsCodeBuildWebhookDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + _, err := conn.DeleteWebhook(&codebuild.DeleteWebhookInput{ + ProjectName: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, codebuild.ErrCodeResourceNotFoundException, "") { + d.SetId("") + return nil + } + return err + } + + d.SetId("") + return nil +} diff --git a/aws/resource_aws_codebuild_webhook_test.go b/aws/resource_aws_codebuild_webhook_test.go new file mode 100644 index 00000000000..170ff3feb91 --- /dev/null +++ b/aws/resource_aws_codebuild_webhook_test.go @@ -0,0 +1,78 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codebuild" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsCodeBuildWebhook_basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsCodeBuildWebhookDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCodeBuildWebhookConfig_basic(acctest.RandString(5)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsCodeBuildWebhookExists("aws_codebuild_webhook.test"), + resource.TestCheckResourceAttrSet("aws_codebuild_webhook.test", "url"), + ), + }, + }, + }) +} + +func testAccCheckAwsCodeBuildWebhookDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).codebuildconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_codebuild_webhook" { + continue + } + + resp, err := conn.BatchGetProjects(&codebuild.BatchGetProjectsInput{ + Names: []*string{ + aws.String(rs.Primary.ID), + }, + }) + + if err != nil { + return err + } + + if len(resp.Projects) == 0 { + return nil + } + + project := resp.Projects[0] + if project.Webhook != nil && project.Webhook.Url != nil { + return fmt.Errorf("Found CodeBuild Webhook: %s", rs.Primary.ID) + } + } + return nil +} + +func testAccCheckAwsCodeBuildWebhookExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + return nil + } +} + +func testAccCodeBuildWebhookConfig_basic(rName string) string { + return fmt.Sprintf(testAccAWSCodeBuildProjectConfig_basic(rName) + ` +resource "aws_codebuild_webhook" "test" { + name = "${aws_codebuild_project.foo.name}" +} +`) +} diff --git a/website/aws.erb b/website/aws.erb index 5bf9ba7af53..758e0035f73 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -427,6 +427,10 @@ aws_codebuild_project + > + aws_codebuild_webhook + + diff --git a/website/docs/r/codebuild_webhook.html.markdown b/website/docs/r/codebuild_webhook.html.markdown new file mode 100644 index 00000000000..37c52e96766 --- /dev/null +++ b/website/docs/r/codebuild_webhook.html.markdown @@ -0,0 +1,118 @@ +--- +layout: "aws" +page_title: "AWS: aws_codebuild_webhook" +sidebar_current: "docs-aws-resource-codebuild-webhook" +description: |- + Provides a CodeBuild Webhook resource. +--- + +# aws_codebuild_webhook + +Provides a CodeBuild Webhook resource. + +## Example Usage + +```hcl +resource "aws_iam_role" "codebuild_role" { + name = "codebuild-role-" + + assume_role_policy = < Date: Thu, 4 Jan 2018 17:50:33 +0900 Subject: [PATCH 0035/3316] wip --- aws/resource_aws_api_gateway_stage.go | 15 ++++++++++ aws/resource_aws_api_gateway_stage_test.go | 33 +++++++++++++++------- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index 7ce0abda3c5..1cbfe5d2bdb 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -58,6 +58,7 @@ func resourceAwsApiGatewayStage() *schema.Resource { Type: schema.TypeMap, Optional: true, }, + "tags": tagsSchema(), }, } } @@ -95,6 +96,13 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) } input.Variables = aws.StringMap(variables) } + if vars, ok := d.GetOk("tags"); ok { + newMap := make(map[string]string, len(vars.(map[string]interface{}))) + for k, v := range vars.(map[string]interface{}) { + newMap[k] = v.(string) + } + input.Tags = aws.StringMap(newMap) + } out, err := conn.CreateStage(&input) if err != nil { @@ -172,6 +180,7 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er d.Set("description", stage.Description) d.Set("documentation_version", stage.DocumentationVersion) d.Set("variables", aws.StringValueMap(stage.Variables)) + d.Set("tags", aws.StringValueMap(stage.Tags)) return nil } @@ -232,6 +241,12 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) newV := n.(map[string]interface{}) operations = append(operations, diffVariablesOps("/variables/", oldV, newV)...) } + // if d.HasChange("tags") { + // o, n := d.GetChange("tags") + // oldV := o.(map[string]interface{}) + // newV := n.(map[string]interface{}) + // operations = append(operations, diffVariablesOps("/tags/", oldV, newV)...) + // } input := apigateway.UpdateStageInput{ RestApiId: aws.String(d.Get("rest_api_id").(string)), diff --git a/aws/resource_aws_api_gateway_stage_test.go b/aws/resource_aws_api_gateway_stage_test.go index c64ac1c6d06..f3d3f40bd37 100644 --- a/aws/resource_aws_api_gateway_stage_test.go +++ b/aws/resource_aws_api_gateway_stage_test.go @@ -7,12 +7,14 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAccAWSAPIGatewayStage_basic(t *testing.T) { var conf apigateway.Stage + rName := acctest.RandString(5) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -20,29 +22,32 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) { CheckDestroy: testAccCheckAWSAPIGatewayStageDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSAPIGatewayStageConfig_basic(), + Config: testAccAWSAPIGatewayStageConfig_basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "stage_name", "prod"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_enabled", "true"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_size", "0.5"), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "1"), ), }, resource.TestStep{ - Config: testAccAWSAPIGatewayStageConfig_updated(), + Config: testAccAWSAPIGatewayStageConfig_updated(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "stage_name", "prod"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_enabled", "false"), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "1"), ), }, resource.TestStep{ - Config: testAccAWSAPIGatewayStageConfig_basic(), + Config: testAccAWSAPIGatewayStageConfig_basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "stage_name", "prod"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_enabled", "true"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_size", "0.5"), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "1"), ), }, }, @@ -108,9 +113,10 @@ func testAccCheckAWSAPIGatewayStageDestroy(s *terraform.State) error { return nil } -const testAccAWSAPIGatewayStageConfig_base = ` +func testAccAWSAPIGatewayStageConfig_base(rName string) string { + return fmt.Sprintf(` resource "aws_api_gateway_rest_api" "test" { - name = "tf-acc-test" + name = "tf-acc-test-%s" } resource "aws_api_gateway_resource" "test" { @@ -161,10 +167,11 @@ resource "aws_api_gateway_deployment" "dev" { "a" = "2" } } -` +`, rName) +} -func testAccAWSAPIGatewayStageConfig_basic() string { - return testAccAWSAPIGatewayStageConfig_base + ` +func testAccAWSAPIGatewayStageConfig_basic(rName string) string { + return testAccAWSAPIGatewayStageConfig_base(rName) + ` resource "aws_api_gateway_stage" "test" { rest_api_id = "${aws_api_gateway_rest_api.test.id}" stage_name = "prod" @@ -175,12 +182,15 @@ resource "aws_api_gateway_stage" "test" { one = "1" two = "2" } + tags { + Name = "tf-test" + } } ` } -func testAccAWSAPIGatewayStageConfig_updated() string { - return testAccAWSAPIGatewayStageConfig_base + ` +func testAccAWSAPIGatewayStageConfig_updated(rName string) string { + return testAccAWSAPIGatewayStageConfig_base(rName) + ` resource "aws_api_gateway_stage" "test" { rest_api_id = "${aws_api_gateway_rest_api.test.id}" stage_name = "prod" @@ -191,6 +201,9 @@ resource "aws_api_gateway_stage" "test" { one = "1" three = "3" } + tags { + Name = "tf-test" + } } ` } From 197abd84f457949dd516ce48eb54547da588a061 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Thu, 4 Jan 2018 18:24:10 +0900 Subject: [PATCH 0036/3316] Implement setTagsAPIGatewayStage --- aws/resource_aws_api_gateway_stage.go | 12 ++++---- aws/tags_apigateway.go | 44 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 aws/tags_apigateway.go diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index 1cbfe5d2bdb..710e6528603 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -189,6 +189,12 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).apigateway d.Partial(true) + + if tagErr := setTagsAPIGatewayStage(conn, d, "hoge"); tagErr != nil { + return tagErr + } + d.SetPartial("tags") + operations := make([]*apigateway.PatchOperation, 0) waitForCache := false if d.HasChange("cache_cluster_enabled") { @@ -241,12 +247,6 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) newV := n.(map[string]interface{}) operations = append(operations, diffVariablesOps("/variables/", oldV, newV)...) } - // if d.HasChange("tags") { - // o, n := d.GetChange("tags") - // oldV := o.(map[string]interface{}) - // newV := n.(map[string]interface{}) - // operations = append(operations, diffVariablesOps("/tags/", oldV, newV)...) - // } input := apigateway.UpdateStageInput{ RestApiId: aws.String(d.Get("rest_api_id").(string)), diff --git a/aws/tags_apigateway.go b/aws/tags_apigateway.go new file mode 100644 index 00000000000..9168d39e2af --- /dev/null +++ b/aws/tags_apigateway.go @@ -0,0 +1,44 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/schema" +) + +func setTagsAPIGatewayStage(conn *apigateway.APIGateway, d *schema.ResourceData, arn string) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsGeneric(o, n) + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + keys := make([]*string, 0, len(remove)) + for k := range remove { + keys = append(keys, aws.String(k)) + } + + _, err := conn.UntagResource(&apigateway.UntagResourceInput{ + ResourceArn: aws.String(arn), + TagKeys: keys, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagResource(&apigateway.TagResourceInput{ + ResourceArn: aws.String(arn), + Tags: create, + }) + if err != nil { + return err + } + } + } + return nil +} From ddfc3539d961a8b7acab275231c0d3174943a42c Mon Sep 17 00:00:00 2001 From: HandcraftedBits Date: Thu, 4 Jan 2018 15:09:29 -0500 Subject: [PATCH 0037/3316] Add regional support for aws_api_gateway_rest_api and aws_api_gateway_domain_name. --- aws/resource_aws_api_gateway_domain_name.go | 83 +++++++++++++++++-- aws/resource_aws_api_gateway_rest_api.go | 32 +++++++ aws/resource_aws_api_gateway_rest_api_test.go | 23 ++++- .../r/api_gateway_domain_name.html.markdown | 42 +++++++--- .../docs/r/api_gateway_rest_api.html.markdown | 3 + 5 files changed, 163 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_api_gateway_domain_name.go b/aws/resource_aws_api_gateway_domain_name.go index d06298503ee..157b53cdaf7 100644 --- a/aws/resource_aws_api_gateway_domain_name.go +++ b/aws/resource_aws_api_gateway_domain_name.go @@ -28,20 +28,20 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { Type: schema.TypeString, ForceNew: true, Optional: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn", "regional_certificate_name"}, }, "certificate_chain": { Type: schema.TypeString, ForceNew: true, Optional: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn", "regional_certificate_name"}, }, "certificate_name": { Type: schema.TypeString, Optional: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn", "regional_certificate_name"}, }, "certificate_private_key": { @@ -49,7 +49,7 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { ForceNew: true, Optional: true, Sensitive: true, - ConflictsWith: []string{"certificate_arn"}, + ConflictsWith: []string{"certificate_arn", "regional_certificate_arn", "regional_certificate_name"}, }, "domain_name": { @@ -61,7 +61,7 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { "certificate_arn": { Type: schema.TypeString, Optional: true, - ConflictsWith: []string{"certificate_body", "certificate_chain", "certificate_name", "certificate_private_key"}, + ConflictsWith: []string{"certificate_body", "certificate_chain", "certificate_name", "certificate_private_key", "regional_certificate_arn", "regional_certificate_name"}, }, "cloudfront_domain_name": { @@ -78,12 +78,35 @@ func resourceAwsApiGatewayDomainName() *schema.Resource { Type: schema.TypeString, Computed: true, }, + + "regional_certificate_arn": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"certificate_arn", "certificate_body", "certificate_chain", "certificate_name", "certificate_private_key"}, + }, + + "regional_certificate_name": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"certificate_arn", "certificate_body", "certificate_chain", "certificate_name", "certificate_private_key"}, + }, + + "regional_domain_name": { + Type: schema.TypeString, + Computed: true, + }, + + "regional_zone_id": { + Type: schema.TypeString, + Computed: true, + }, }, } } func resourceAwsApiGatewayDomainNameCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).apigateway + endpointType := apigateway.EndpointTypeEdge log.Printf("[DEBUG] Creating API Gateway Domain Name") params := &apigateway.CreateDomainNameInput{ @@ -110,6 +133,20 @@ func resourceAwsApiGatewayDomainNameCreate(d *schema.ResourceData, meta interfac params.CertificatePrivateKey = aws.String(v.(string)) } + if v, ok := d.GetOk("regional_certificate_arn"); ok { + endpointType = apigateway.EndpointTypeRegional + params.RegionalCertificateArn = aws.String(v.(string)) + } + + if v, ok := d.GetOk("regional_certificate_name"); ok { + endpointType = apigateway.EndpointTypeRegional + params.RegionalCertificateName = aws.String(v.(string)) + } + + params.EndpointConfiguration = &apigateway.EndpointConfiguration{ + Types: []*string{aws.String(endpointType)}, + } + domainName, err := conn.CreateDomainName(params) if err != nil { return fmt.Errorf("Error creating API Gateway Domain Name: %s", err) @@ -118,6 +155,8 @@ func resourceAwsApiGatewayDomainNameCreate(d *schema.ResourceData, meta interfac d.SetId(*domainName.DomainName) d.Set("cloudfront_domain_name", domainName.DistributionDomainName) d.Set("cloudfront_zone_id", cloudFrontRoute53ZoneID) + d.Set("regional_domain_name", domainName.RegionalDomainName) + d.Set("regional_zone_id", domainName.RegionalHostedZoneId) return resourceAwsApiGatewayDomainNameRead(d, meta) } @@ -146,14 +185,18 @@ func resourceAwsApiGatewayDomainNameRead(d *schema.ResourceData, meta interface{ d.Set("cloudfront_domain_name", domainName.DistributionDomainName) d.Set("domain_name", domainName.DomainName) d.Set("certificate_arn", domainName.CertificateArn) + d.Set("regional_certificate_arn", domainName.RegionalCertificateArn) + d.Set("regional_certificate_name", domainName.RegionalCertificateName) return nil } func resourceAwsApiGatewayDomainNameUpdateOperations(d *schema.ResourceData) []*apigateway.PatchOperation { + endpointType := "" operations := make([]*apigateway.PatchOperation, 0) if d.HasChange("certificate_name") { + endpointType = apigateway.EndpointTypeEdge operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("replace"), Path: aws.String("/certificateName"), @@ -162,6 +205,7 @@ func resourceAwsApiGatewayDomainNameUpdateOperations(d *schema.ResourceData) []* } if d.HasChange("certificate_arn") { + endpointType = apigateway.EndpointTypeEdge operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("replace"), Path: aws.String("/certificateArn"), @@ -169,6 +213,35 @@ func resourceAwsApiGatewayDomainNameUpdateOperations(d *schema.ResourceData) []* }) } + if d.HasChange("regional_certificate_name") { + endpointType = apigateway.EndpointTypeRegional + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/regionalCertificateName"), + Value: aws.String(d.Get("regional_certificate_name").(string)), + }) + } + + if d.HasChange("regional_certificate_arn") { + endpointType = apigateway.EndpointTypeRegional + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/regionalCertificateArn"), + Value: aws.String(d.Get("regional_certificate_arn").(string)), + }) + } + + // If the certificate name or ARN is changed it's possible that we've changed from one endpoint type to another, so + // we'll always update the endpoint type in that case. + + if endpointType != "" { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/endpointConfiguration/types/0"), + Value: aws.String(endpointType), + }) + } + return operations } diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index 0d5ae48e3e4..f7b93fcbe13 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -51,6 +51,13 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { Type: schema.TypeString, Computed: true, }, + + "endpoint_type": { + Type: schema.TypeString, + Optional: true, + Default: "EDGE", + ValidateFunc: validateAwsApiGatewayEndpointType, + }, }, } } @@ -67,6 +74,9 @@ func resourceAwsApiGatewayRestApiCreate(d *schema.ResourceData, meta interface{} params := &apigateway.CreateRestApiInput{ Name: aws.String(d.Get("name").(string)), Description: description, + EndpointConfiguration: &apigateway.EndpointConfiguration{ + Types: []*string{aws.String(d.Get("endpoint_type").(string))}, + }, } binaryMediaTypes, binaryMediaTypesOk := d.GetOk("binary_media_types") @@ -193,6 +203,14 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api } } + if d.HasChange("endpoint_type") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/endpointConfiguration/types/0"), + Value: aws.String(d.Get("endpoint_type").(string)), + }) + } + return operations } @@ -246,3 +264,17 @@ func resourceAwsApiGatewayRestApiDelete(d *schema.ResourceData, meta interface{} return resource.NonRetryableError(err) }) } + +func validateAwsApiGatewayEndpointType(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + types := map[string]bool{ + apigateway.EndpointTypeRegional: true, + apigateway.EndpointTypeEdge: true, + } + + if !types[value] { + errors = append(errors, fmt.Errorf("Endpoint type %s is invalid. Valid types are 'EDGE' and 'REGIONAL'", value)) + } + + return +} diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 5950fa3e628..b50369ee30a 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -23,6 +23,7 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayRestAPIExists("aws_api_gateway_rest_api.test", &conf), testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "bar"), + testAccCheckAWSAPIGatewayRestAPIEndpointConfiguration(&conf, apigateway.EndpointTypeRegional), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "bar"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", ""), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), @@ -36,6 +37,7 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPIExists("aws_api_gateway_rest_api.test", &conf), testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "test"), testAccCheckAWSAPIGatewayRestAPIDescriptionAttribute(&conf, "test"), + testAccCheckAWSAPIGatewayRestAPIEndpointConfiguration(&conf, apigateway.EndpointTypeEdge), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "test"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", "test"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), @@ -61,6 +63,7 @@ func TestAccAWSAPIGatewayRestApi_openapi(t *testing.T) { testAccCheckAWSAPIGatewayRestAPIExists("aws_api_gateway_rest_api.test", &conf), testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "test"), testAccCheckAWSAPIGatewayRestAPIRoutes(&conf, []string{"/", "/test"}), + testAccCheckAWSAPIGatewayRestAPIEndpointConfiguration(&conf, apigateway.EndpointTypeEdge), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "test"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", ""), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), @@ -74,6 +77,7 @@ func TestAccAWSAPIGatewayRestApi_openapi(t *testing.T) { testAccCheckAWSAPIGatewayRestAPIExists("aws_api_gateway_rest_api.test", &conf), testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "test"), testAccCheckAWSAPIGatewayRestAPIRoutes(&conf, []string{"/", "/update"}), + testAccCheckAWSAPIGatewayRestAPIEndpointConfiguration(&conf, apigateway.EndpointTypeRegional), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "test"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), ), @@ -188,9 +192,20 @@ func testAccCheckAWSAPIGatewayRestAPIDestroy(s *terraform.State) error { return nil } +func testAccCheckAWSAPIGatewayRestAPIEndpointConfiguration(conf *apigateway.RestApi, endpointType string) resource.TestCheckFunc { + return func(s *terraform.State) error { + if *conf.EndpointConfiguration.Types[0] != endpointType { + return fmt.Errorf("Wrong endpoint type: %q", *conf.EndpointConfiguration.Types[0]) + } + + return nil + } +} + const testAccAWSAPIGatewayRestAPIConfig = ` resource "aws_api_gateway_rest_api" "test" { - name = "bar" + name = "bar" + endpoint_type = "REGIONAL" } ` @@ -198,7 +213,8 @@ const testAccAWSAPIGatewayRestAPIUpdateConfig = ` resource "aws_api_gateway_rest_api" "test" { name = "test" description = "test" - binary_media_types = ["application/octet-stream"] + binary_media_types = ["application/octet-stream"] + endpoint_type = "EDGE" } ` @@ -243,7 +259,8 @@ EOF const testAccAWSAPIGatewayRestAPIUpdateConfigOpenAPI = ` resource "aws_api_gateway_rest_api" "test" { - name = "test" + name = "test" + endpoint_type = "REGIONAL" body = < **Note:** All arguments including the private key will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). @@ -59,15 +63,27 @@ The following arguments are supported: * `domain_name` - (Required) The fully-qualified domain name to register * `certificate_name` - (Optional) The unique name to use when registering this - cert as an IAM server certificate. Conflicts with `certificate_arn`. Required if `certificate_arn` is not set. + certificate as an IAM server certificate. Conflicts with `certificate_arn`, `regional_certificate_arn`, and + `regional_certificate_name`. Required if `certificate_arn` is not set. * `certificate_body` - (Optional) The certificate issued for the domain name - being registered, in PEM format. Conflicts with `certificate_arn`. + being registered, in PEM format. Conflicts with `certificate_arn`, `regional_certificate_arn`, and + `regional_certificate_name`. * `certificate_chain` - (Optional) The certificate for the CA that issued the certificate, along with any intermediate CA certificates required to - create an unbroken chain to a certificate trusted by the intended API clients. Conflicts with `certificate_arn`. + create an unbroken chain to a certificate trusted by the intended API clients. Conflicts with `certificate_arn`, + `regional_certificate_arn`, and `regional_certificate_name`. * `certificate_private_key` - (Optional) The private key associated with the - domain certificate given in `certificate_body`. Conflicts with `certificate_arn`. -* `certificate_arn` - (Optional) The ARN for an AWS-managed certificate. Conflicts with `certificate_name`, `certificate_body`, `certificate_chain` and `certificate_private_key`. + domain certificate given in `certificate_body`. Conflicts with `certificate_arn`, `regional_certificate_arn`, and `regional_certificate_name`. +* `certificate_arn` - (Optional) The ARN for an AWS-managed certificate. Used when an edge-optimized domain name is + desired. Conflicts with `certificate_name`, `certificate_body`, `certificate_chain`, `certificate_private_key`, + `regional_certificate_arn`, and `regional_certificate_name`. +* `regional_certificate_arn` - (Optional) The ARN for an AWS-managed certificate. Used when a regional domain name is + desired. Conflicts with `certificate_arn`, `certificate_name`, `certificate_body`, `certificate_chain`, and + `certificate_private_key`. +* `regional_certificate_name` - (Optional) The unique name to use when registering this certificate as an IAM server + certificate. Conflicts with `certificate_arn`, `certificate_name`, `certificate_body`, `certificate_chain`, and + `certificate_private_key`. + ## Attributes Reference @@ -77,5 +93,7 @@ In addition to the arguments, the following attributes are exported: * `certificate_upload_date` - The upload date associated with the domain certificate. * `cloudfront_domain_name` - The hostname created by Cloudfront to represent the distribution that implements this domain name mapping. -* `cloudfront_zone_id` - For convenience, the hosted zone id (`Z2FDTNDATAQYW2`) +* `cloudfront_zone_id` - For convenience, the hosted zone ID (`Z2FDTNDATAQYW2`) that can be used to create a Route53 alias record for the distribution. +* `regional_domain_name` - The hostname for the custom domain's regional endpoint. +* `regional_zone_id` - The hosted zone ID that can be used to create a Route53 alias record for the regional endpoint. \ No newline at end of file diff --git a/website/docs/r/api_gateway_rest_api.html.markdown b/website/docs/r/api_gateway_rest_api.html.markdown index c0fdb61f62a..6f59c3eaa12 100644 --- a/website/docs/r/api_gateway_rest_api.html.markdown +++ b/website/docs/r/api_gateway_rest_api.html.markdown @@ -27,6 +27,9 @@ The following arguments are supported: * `description` - (Optional) The description of the REST API * `binary_media_types` - (Optional) The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads. * `body` - (Optional) An OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. +* `endpoint_type` - (Optional) The type of endpoint to create, either `EDGE` or `REGIONAL`. If unspecified, defaults to + `EDGE`. Refer to the [documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/create-regional-api.html) for + more information on the difference between edge-optimized and regional APIs. __Note__: If the `body` argument is provided, the OpenAPI specification will be used to configure the resources, methods and integrations for the Rest API. If this argument is provided, the following resources should not be managed as separate ones, as updates may cause manual resource updates to be overwritten: From fa9a86706f4d80103b646760caf2383e90586c6d Mon Sep 17 00:00:00 2001 From: Tommy Wang Date: Fri, 5 Jan 2018 15:57:45 -0600 Subject: [PATCH 0038/3316] fallback to session-derived credentials --- aws/config.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/aws/config.go b/aws/config.go index 86eb60f4f9b..d3681ef004f 100644 --- a/aws/config.go +++ b/aws/config.go @@ -265,16 +265,21 @@ func (c *Config) Client() (interface{}, error) { cp, err := creds.Get() if err != nil { if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoCredentialProviders" { - // If a profile wasn't specified then error out - if c.Profile == "" { + // The session may still be able to resolve credentials from shared config. + sess, err := session.NewSession() + if err != nil { return nil, errors.New(`No valid credential sources found for AWS Provider. Please see https://terraform.io/docs/providers/aws/index.html for more information on providing credentials for the AWS Provider`) } - // add the profile and enable share config file usage - log.Printf("[INFO] AWS Auth using Profile: %q", c.Profile) - opt.Profile = c.Profile - opt.SharedConfigState = session.SharedConfigEnable + _, err = sess.Config.Credentials.Get() + if err != nil { + return nil, errors.New(`No valid credential sources found for AWS Provider. + Please see https://terraform.io/docs/providers/aws/index.html for more information on + providing credentials for the AWS Provider`) + } + log.Printf("[INFO] Using session-derived AWS Auth") + opt.Config.Credentials = sess.Config.Credentials } else { return nil, fmt.Errorf("Error loading credentials for AWS Provider: %s", err) } From 8195acf3957b1c961ad5db8ef2f508e48178300b Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 9 Jan 2018 15:03:15 +0000 Subject: [PATCH 0039/3316] test/aws_config_*: Add sweepers --- ..._aws_config_configuration_recorder_test.go | 47 +++++++++++++++++++ ...source_aws_config_delivery_channel_test.go | 43 +++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/aws/resource_aws_config_configuration_recorder_test.go b/aws/resource_aws_config_configuration_recorder_test.go index 8180f669408..395f2288857 100644 --- a/aws/resource_aws_config_configuration_recorder_test.go +++ b/aws/resource_aws_config_configuration_recorder_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "regexp" "testing" @@ -12,6 +13,52 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_config_configuration_recorder", &resource.Sweeper{ + Name: "aws_config_configuration_recorder", + F: testSweepConfigConfigurationRecorder, + }) +} + +func testSweepConfigConfigurationRecorder(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).configconn + + req := &configservice.DescribeConfigurationRecordersInput{} + resp, err := conn.DescribeConfigurationRecorders(req) + if err != nil { + return fmt.Errorf("Error describing Configuration Recorders: %s", err) + } + + if len(resp.ConfigurationRecorders) == 0 { + log.Print("[DEBUG] No AWS Config Configuration Recorder to sweep") + return nil + } + + for _, cr := range resp.ConfigurationRecorders { + _, err := conn.StopConfigurationRecorder(&configservice.StopConfigurationRecorderInput{ + ConfigurationRecorderName: cr.Name, + }) + if err != nil { + return err + } + + _, err = conn.DeleteConfigurationRecorder(&configservice.DeleteConfigurationRecorderInput{ + ConfigurationRecorderName: cr.Name, + }) + if err != nil { + return fmt.Errorf( + "Error deleting Configuration Recorder (%s): %s", + *cr.Name, err) + } + } + + return nil +} + func testAccConfigConfigurationRecorder_basic(t *testing.T) { var cr configservice.ConfigurationRecorder rInt := acctest.RandInt() diff --git a/aws/resource_aws_config_delivery_channel_test.go b/aws/resource_aws_config_delivery_channel_test.go index 83f0da00a21..64f701c790a 100644 --- a/aws/resource_aws_config_delivery_channel_test.go +++ b/aws/resource_aws_config_delivery_channel_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "regexp" "testing" @@ -12,6 +13,48 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_config_delivery_channel", &resource.Sweeper{ + Name: "aws_config_delivery_channel", + Dependencies: []string{ + "aws_config_configuration_recorder", + }, + F: testSweepConfigDeliveryChannels, + }) +} + +func testSweepConfigDeliveryChannels(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).configconn + + req := &configservice.DescribeDeliveryChannelsInput{} + resp, err := conn.DescribeDeliveryChannels(req) + if err != nil { + return fmt.Errorf("Error describing Delivery Channels: %s", err) + } + + if len(resp.DeliveryChannels) == 0 { + log.Print("[DEBUG] No AWS Config Delivery Channel to sweep") + return nil + } + + for _, dc := range resp.DeliveryChannels { + _, err := conn.DeleteDeliveryChannel(&configservice.DeleteDeliveryChannelInput{ + DeliveryChannelName: dc.Name, + }) + if err != nil { + return fmt.Errorf( + "Error deleting Delivery Channel (%s): %s", + *dc.Name, err) + } + } + + return nil +} + func testAccConfigDeliveryChannel_basic(t *testing.T) { var dc configservice.DeliveryChannel rInt := acctest.RandInt() From 99bef5d3236665e122fe078bb222f6d037c55d7a Mon Sep 17 00:00:00 2001 From: Jimmy Date: Tue, 9 Jan 2018 16:22:54 -0500 Subject: [PATCH 0040/3316] Ensure Elem is always either a *Schema or *Resource --- aws/data_source_aws_ecs_container_definition.go | 4 ++-- aws/data_source_aws_vpc_peering_connection.go | 4 ++-- aws/resource_aws_api_gateway_deployment.go | 2 +- aws/resource_aws_api_gateway_gateway_response.go | 4 ++-- aws/resource_aws_api_gateway_integration.go | 4 ++-- aws/resource_aws_api_gateway_integration_response.go | 4 ++-- aws/resource_aws_api_gateway_method.go | 4 ++-- aws/resource_aws_api_gateway_method_response.go | 4 ++-- aws/resource_aws_batch_job_definition.go | 2 +- aws/resource_aws_lambda_function.go | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/aws/data_source_aws_ecs_container_definition.go b/aws/data_source_aws_ecs_container_definition.go index 9bb99cdaeda..914d582649a 100644 --- a/aws/data_source_aws_ecs_container_definition.go +++ b/aws/data_source_aws_ecs_container_definition.go @@ -53,12 +53,12 @@ func dataSourceAwsEcsContainerDefinition() *schema.Resource { "docker_labels": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "environment": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, } diff --git a/aws/data_source_aws_vpc_peering_connection.go b/aws/data_source_aws_vpc_peering_connection.go index a78e35f03e7..cf4dbf54d3c 100644 --- a/aws/data_source_aws_vpc_peering_connection.go +++ b/aws/data_source_aws_vpc_peering_connection.go @@ -67,12 +67,12 @@ func dataSourceAwsVpcPeeringConnection() *schema.Resource { "accepter": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, }, "requester": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, }, "filter": ec2CustomFiltersSchema(), "tags": tagsSchemaComputed(), diff --git a/aws/resource_aws_api_gateway_deployment.go b/aws/resource_aws_api_gateway_deployment.go index 4e291b780e8..aef612a6ed6 100644 --- a/aws/resource_aws_api_gateway_deployment.go +++ b/aws/resource_aws_api_gateway_deployment.go @@ -47,7 +47,7 @@ func resourceAwsApiGatewayDeployment() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "created_date": { diff --git a/aws/resource_aws_api_gateway_gateway_response.go b/aws/resource_aws_api_gateway_gateway_response.go index 105d1227f24..bf9639960d1 100644 --- a/aws/resource_aws_api_gateway_gateway_response.go +++ b/aws/resource_aws_api_gateway_gateway_response.go @@ -39,13 +39,13 @@ func resourceAwsApiGatewayGatewayResponse() *schema.Resource { "response_templates": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, "response_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, }, diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 6e0390362ea..e4658455f16 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -70,12 +70,12 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { "request_templates": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "request_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, ConflictsWith: []string{"request_parameters_in_json"}, }, diff --git a/aws/resource_aws_api_gateway_integration_response.go b/aws/resource_aws_api_gateway_integration_response.go index 88cf85176bb..a37e37209a7 100644 --- a/aws/resource_aws_api_gateway_integration_response.go +++ b/aws/resource_aws_api_gateway_integration_response.go @@ -53,12 +53,12 @@ func resourceAwsApiGatewayIntegrationResponse() *schema.Resource { "response_templates": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "response_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, ConflictsWith: []string{"response_parameters_in_json"}, }, diff --git a/aws/resource_aws_api_gateway_method.go b/aws/resource_aws_api_gateway_method.go index fdbc451098a..d39e3e62f12 100644 --- a/aws/resource_aws_api_gateway_method.go +++ b/aws/resource_aws_api_gateway_method.go @@ -60,12 +60,12 @@ func resourceAwsApiGatewayMethod() *schema.Resource { "request_models": &schema.Schema{ Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "request_parameters": &schema.Schema{ Type: schema.TypeMap, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, Optional: true, ConflictsWith: []string{"request_parameters_in_json"}, }, diff --git a/aws/resource_aws_api_gateway_method_response.go b/aws/resource_aws_api_gateway_method_response.go index caedc77d3d8..7bb250e4768 100644 --- a/aws/resource_aws_api_gateway_method_response.go +++ b/aws/resource_aws_api_gateway_method_response.go @@ -52,12 +52,12 @@ func resourceAwsApiGatewayMethodResponse() *schema.Resource { "response_models": &schema.Schema{ Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "response_parameters": &schema.Schema{ Type: schema.TypeMap, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, Optional: true, ConflictsWith: []string{"response_parameters_in_json"}, }, diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index 0bea6ff8ebb..2fcf4ee8f88 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -39,7 +39,7 @@ func resourceAwsBatchJobDefinition() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "retry_strategy": { Type: schema.TypeList, diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index d16988346c6..8c55a48ee8a 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -170,7 +170,7 @@ func resourceAwsLambdaFunction() *schema.Resource { "variables": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, From 36382deae08935c13fb5a7e78fe3b4840192fecf Mon Sep 17 00:00:00 2001 From: Tommy Wang Date: Wed, 10 Jan 2018 12:48:13 -0600 Subject: [PATCH 0041/3316] add support for profile within provider configuration --- aws/config.go | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/aws/config.go b/aws/config.go index d3681ef004f..c4cbbdf7893 100644 --- a/aws/config.go +++ b/aws/config.go @@ -265,21 +265,27 @@ func (c *Config) Client() (interface{}, error) { cp, err := creds.Get() if err != nil { if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoCredentialProviders" { - // The session may still be able to resolve credentials from shared config. - sess, err := session.NewSession() - if err != nil { - return nil, errors.New(`No valid credential sources found for AWS Provider. - Please see https://terraform.io/docs/providers/aws/index.html for more information on - providing credentials for the AWS Provider`) - } - _, err = sess.Config.Credentials.Get() - if err != nil { - return nil, errors.New(`No valid credential sources found for AWS Provider. - Please see https://terraform.io/docs/providers/aws/index.html for more information on - providing credentials for the AWS Provider`) + // If a profile wasn't specified, the session may still be able to resolve credentials from shared config. + if c.Profile == "" { + sess, err := session.NewSession() + if err != nil { + return nil, errors.New(`No valid credential sources found for AWS Provider. + Please see https://terraform.io/docs/providers/aws/index.html for more information on + providing credentials for the AWS Provider`) + } + _, err = sess.Config.Credentials.Get() + if err != nil { + return nil, errors.New(`No valid credential sources found for AWS Provider. + Please see https://terraform.io/docs/providers/aws/index.html for more information on + providing credentials for the AWS Provider`) + } + log.Printf("[INFO] Using session-derived AWS Auth") + opt.Config.Credentials = sess.Config.Credentials + } else { + log.Printf("[INFO] AWS Auth using Profile: %q", c.Profile) + opt.Profile = c.Profile + opt.SharedConfigState = session.SharedConfigEnable } - log.Printf("[INFO] Using session-derived AWS Auth") - opt.Config.Credentials = sess.Config.Credentials } else { return nil, fmt.Errorf("Error loading credentials for AWS Provider: %s", err) } From 6821dbaad3f99cde8e251bdd9dd2e5d3be1ea612 Mon Sep 17 00:00:00 2001 From: Ian Dillon Date: Thu, 11 Jan 2018 15:03:47 -0500 Subject: [PATCH 0042/3316] d/security_groups: Adds aws_security_groups data source. --- aws/data_source_aws_security_groups.go | 98 +++++++++++++++++++ aws/data_source_aws_security_groups_test.go | 99 ++++++++++++++++++++ aws/provider.go | 1 + website/aws.erb | 3 + website/docs/d/security_groups.html.markdown | 52 ++++++++++ 5 files changed, 253 insertions(+) create mode 100644 aws/data_source_aws_security_groups.go create mode 100644 aws/data_source_aws_security_groups_test.go create mode 100644 website/docs/d/security_groups.html.markdown diff --git a/aws/data_source_aws_security_groups.go b/aws/data_source_aws_security_groups.go new file mode 100644 index 00000000000..603d655375e --- /dev/null +++ b/aws/data_source_aws_security_groups.go @@ -0,0 +1,98 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "log" +) + +func dataSourceAwsSecurityGroups() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSecurityGroupsRead, + + Schema: map[string]*schema.Schema{ + "filter": dataSourceFiltersSchema(), + "tags": tagsSchemaComputed(), + + "ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "vpc_ids": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsSecurityGroupsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + req := &ec2.DescribeSecurityGroupsInput{} + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + + if !filtersOk && !tagsOk { + return fmt.Errorf("One of filters or tags must be assigned") + } + + if filtersOk { + req.Filters = append(req.Filters, + buildAwsDataSourceFilters(filters.(*schema.Set))...) + } + if tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + + log.Printf("[DEBUG] Reading Security Groups with request: %s", req) + + var ids, vpc_ids []string + nextToken := "" + for { + if nextToken != "" { + req.NextToken = aws.String(nextToken) + } + + resp, err := conn.DescribeSecurityGroups(req) + if err != nil { + return err + } + + for _, sg := range resp.SecurityGroups { + ids = append(ids, *sg.GroupId) + vpc_ids = append(vpc_ids, *sg.VpcId) + } + + if resp.NextToken == nil { + break + } + nextToken = *resp.NextToken + } + + if len(ids) < 1 { + return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") + } + + log.Printf("[DEBUG] Found %d securuity groups via given filter: %s", len(ids), req) + + d.SetId(resource.UniqueId()) + err := d.Set("ids", ids) + if err != nil { + return err + } + + err = d.Set("vpc_ids", vpc_ids) + if err != nil { + return err + } + + return nil +} diff --git a/aws/data_source_aws_security_groups_test.go b/aws/data_source_aws_security_groups_test.go new file mode 100644 index 00000000000..1fa14d6a3b7 --- /dev/null +++ b/aws/data_source_aws_security_groups_test.go @@ -0,0 +1,99 @@ +package aws + +import ( + "fmt" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "testing" +) + +func TestAccDataSourceAwsSecurityGroups_tag(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecurityGroupsConfig_tag(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_security_groups.by_tag", "ids.#", "3"), + resource.TestCheckResourceAttr("data.aws_security_groups.by_tag", "vpc_ids.#", "3"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsSecurityGroups_filter(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecurityGroupsConfig_filter(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_security_groups.by_filter", "ids.#", "3"), + resource.TestCheckResourceAttr("data.aws_security_groups.by_filter", "vpc_ids.#", "3"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsSecurityGroupsConfig_tag(rInt int) string { + return fmt.Sprintf(` + resource "aws_vpc" "test_tag" { + cidr_block = "172.16.0.0/16" + tags { + Name = "terraform-testacc-security-group-data-source" + } + } + + resource "aws_security_group" "test" { + count = 3 + vpc_id = "${aws_vpc.test_tag.id}" + name = "tf-%[1]d-${count.index}" + tags { + Seed = "%[1]d" + } + } + + data "aws_security_groups" "by_tag" { + tags { + Seed = "${aws_security_group.test.0.tags["Seed"]}" + } + } +`, rInt) +} + +func testAccDataSourceAwsSecurityGroupsConfig_filter(rInt int) string { + return fmt.Sprintf(` + resource "aws_vpc" "test_filter" { + cidr_block = "172.16.0.0/16" + tags { + Name = "terraform-testacc-security-group-data-source" + } + } + + resource "aws_security_group" "test" { + count = 3 + vpc_id = "${aws_vpc.test_filter.id}" + name = "tf-%[1]d-${count.index}" + tags { + Seed = "%[1]d" + } + } + + data "aws_security_groups" "by_filter" { + filter { + name = "vpc-id" + values = ["${aws_vpc.test_filter.id}"] + } + filter { + name = "group-name" + values = ["tf-${aws_security_group.test.0.tags["Seed"]}-*"] + } + } +`, rInt) +} diff --git a/aws/provider.go b/aws/provider.go index b3b3ac340c2..a625b64c735 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -221,6 +221,7 @@ func Provider() terraform.ResourceProvider { "aws_subnet": dataSourceAwsSubnet(), "aws_subnet_ids": dataSourceAwsSubnetIDs(), "aws_security_group": dataSourceAwsSecurityGroup(), + "aws_security_groups": dataSourceAwsSecurityGroups(), "aws_vpc": dataSourceAwsVpc(), "aws_vpc_endpoint": dataSourceAwsVpcEndpoint(), "aws_vpc_endpoint_service": dataSourceAwsVpcEndpointService(), diff --git a/website/aws.erb b/website/aws.erb index ee605f3fb6f..7cf651488bb 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -203,6 +203,9 @@ > aws_security_group + > + aws_security_group + > aws_sns_topic diff --git a/website/docs/d/security_groups.html.markdown b/website/docs/d/security_groups.html.markdown new file mode 100644 index 00000000000..46adbb2ab33 --- /dev/null +++ b/website/docs/d/security_groups.html.markdown @@ -0,0 +1,52 @@ +--- +layout: "aws" +page_title: "AWS: aws_security_groups" +sidebar_current: "docs-aws-datasource-security-groups" +description: |- + Get information about a set of Security Groups. +--- + +# Data Source: aws_security_groups + +Use this data source to get IDs and VPC membership of Security Groups that are created +outside of Terraform. + +## Example Usage +```hcl +data "aws_security_groups" "test" { + tags { + Application = "k8s", + Environment = "dev" + } +} +``` + +```hcl +data "aws_security_groups" "test" { + filter { + name = "group-name" + values = ["*nodes*"] + } + filter { + name = "vpc-id" + values = ["${var.vpc_id}"] + } +} +``` + +## Argument Reference + +* `tags` - (Optional) A mapping of tags, each pair of which must exactly match for +desired security groups. + +* `filter` - (Optional) One or more name/value pairs to use as filters. There are +several valid keys, for a full reference, check out +[describe-security-groups in the AWS CLI reference][1]. + +## Attributes Reference + +* `ids` - IDs of the matches security groups. +* `vpc_ids` - The VPC IDs of the matched security groups. The data source's tag or filter *will span VPCs* +unless the `vpc-id` filter is also used. + +[1]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-security-groups.html From 58e149342397bf582767d4c10daa95e409fe75d0 Mon Sep 17 00:00:00 2001 From: Robin Joseph Date: Fri, 29 Dec 2017 16:24:29 -0600 Subject: [PATCH 0043/3316] New Resource: aws_swf_domain --- aws/config.go | 3 + aws/provider.go | 1 + aws/resource_aws_swf_domain.go | 126 ++++++++++++++++++++++++ aws/resource_aws_swf_domain_test.go | 90 +++++++++++++++++ website/aws.erb | 10 ++ website/docs/r/swf_domain.html.markdown | 48 +++++++++ 6 files changed, 278 insertions(+) create mode 100644 aws/resource_aws_swf_domain.go create mode 100644 aws/resource_aws_swf_domain_test.go create mode 100644 website/docs/r/swf_domain.html.markdown diff --git a/aws/config.go b/aws/config.go index c9a1081e2e7..3eeecebf423 100644 --- a/aws/config.go +++ b/aws/config.go @@ -76,6 +76,7 @@ import ( "github.com/aws/aws-sdk-go/service/sqs" "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/aws-sdk-go/service/sts" + "github.com/aws/aws-sdk-go/service/swf" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" "github.com/davecgh/go-spew/spew" @@ -195,6 +196,7 @@ type AWSClient struct { sdconn *servicediscovery.ServiceDiscovery sfnconn *sfn.SFN ssmconn *ssm.SSM + swfconn *swf.SWF wafconn *waf.WAF wafregionalconn *wafregional.WAFRegional iotconn *iot.IoT @@ -444,6 +446,7 @@ func (c *Config) Client() (interface{}, error) { client.snsconn = sns.New(awsSnsSess) client.sqsconn = sqs.New(awsSqsSess) client.ssmconn = ssm.New(sess) + client.swfconn = swf.New(sess) client.wafconn = waf.New(sess) client.wafregionalconn = wafregional.New(sess) client.batchconn = batch.New(sess) diff --git a/aws/provider.go b/aws/provider.go index 81a1dc110aa..c4419c0baa9 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -499,6 +499,7 @@ func Provider() terraform.ResourceProvider { "aws_sfn_state_machine": resourceAwsSfnStateMachine(), "aws_default_subnet": resourceAwsDefaultSubnet(), "aws_subnet": resourceAwsSubnet(), + "aws_swf_domain": resourceAwsSwfDomain(), "aws_volume_attachment": resourceAwsVolumeAttachment(), "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), diff --git a/aws/resource_aws_swf_domain.go b/aws/resource_aws_swf_domain.go new file mode 100644 index 00000000000..cf155c7d041 --- /dev/null +++ b/aws/resource_aws_swf_domain.go @@ -0,0 +1,126 @@ +package aws + +import ( + "fmt" + "strconv" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/swf" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSwfDomain() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSwfDomainCreate, + Read: resourceAwsSwfDomainRead, + Delete: resourceAwsSwfDomainDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + }, + "name_prefix": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "workflow_execution_retention_period_in_days": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value, err := strconv.Atoi(v.(string)) + if err != nil || value > 90 || value < 0 { + es = append(es, fmt.Errorf( + "%q must be between 0 and 90 days inclusive", k)) + } + return + }, + }, + }, + } +} + +func resourceAwsSwfDomainCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).swfconn + + var name string + + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + name = resource.PrefixedUniqueId(v.(string)) + } else { + name = resource.UniqueId() + } + d.Set("name", name) + + input := &swf.RegisterDomainInput{ + Name: aws.String(name), + WorkflowExecutionRetentionPeriodInDays: aws.String(d.Get("workflow_execution_retention_period_in_days").(string)), + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + _, err := conn.RegisterDomain(input) + if err != nil { + return err + } + + d.SetId(name) + + return resourceAwsSwfDomainRead(d, meta) +} + +func resourceAwsSwfDomainRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).swfconn + + input := &swf.DescribeDomainInput{ + Name: aws.String(d.Id()), + } + + resp, err := conn.DescribeDomain(input) + if err != nil { + return err + } + + info := resp.DomainInfo + config := resp.Configuration + d.Set("name", info.Name) + d.Set("description", info.Description) + d.Set("workflow_execution_retention_period_in_days", config.WorkflowExecutionRetentionPeriodInDays) + + return nil +} + +func resourceAwsSwfDomainDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).swfconn + + input := &swf.DeprecateDomainInput{ + Name: aws.String(d.Get("name").(string)), + } + + _, err := conn.DeprecateDomain(input) + if err != nil { + return err + } + + d.SetId("") + + return nil +} diff --git a/aws/resource_aws_swf_domain_test.go b/aws/resource_aws_swf_domain_test.go new file mode 100644 index 00000000000..ad16c159e0e --- /dev/null +++ b/aws/resource_aws_swf_domain_test.go @@ -0,0 +1,90 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/swf" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsSwfDomain_basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSwfDomainDestroy, + Steps: []resource.TestStep{ + { + Config: fmt.Sprintf(testAccAwsSwfDomainConfig, "test_swf_domain_"), + Check: testAccCheckAwsSwfDomainExists("aws_swf_domain.test"), + }, + }, + }) +} + +func testAccCheckAwsSwfDomainDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).swfconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_swf_domain" { + continue + } + + name := rs.Primary.ID + input := &swf.DescribeDomainInput{ + Name: aws.String(name), + } + + resp, err := conn.DescribeDomain(input) + if err != nil { + return err + } + + if *resp.DomainInfo.Status != "DEPRECATED" { + return fmt.Errorf(`SWF Domain %s status is %s instead of "DEPRECATED". Failing!`, name, *resp.DomainInfo.Status) + } + } + + return nil +} + +func testAccCheckAwsSwfDomainExists(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("SWF Domain not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("SWF Domain name not set") + } + + name := rs.Primary.ID + conn := testAccProvider.Meta().(*AWSClient).swfconn + + input := &swf.DescribeDomainInput{ + Name: aws.String(name), + } + + resp, err := conn.DescribeDomain(input) + if err != nil { + return fmt.Errorf("SWF Domain %s not found in AWS", name) + } + + if *resp.DomainInfo.Status != "REGISTERED" { + return fmt.Errorf(`SWF Domain %s status is %s instead of "REGISTERED". Failing!`, name, *resp.DomainInfo.Status) + } + return nil + } +} + +const testAccAwsSwfDomainConfig = ` +resource "aws_swf_domain" "test" { + name_prefix = "%s" + workflow_execution_retention_period_in_days = 1 +} +` diff --git a/website/aws.erb b/website/aws.erb index 6975f28532c..cec9acd2631 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1615,6 +1615,16 @@ + > + SWF Resources + + > VPC Resources diff --git a/website/docs/r/swf_domain.html.markdown b/website/docs/r/swf_domain.html.markdown new file mode 100644 index 00000000000..13e63feaa94 --- /dev/null +++ b/website/docs/r/swf_domain.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "aws" +page_title: "AWS: aws_swf_domain" +sidebar_current: "docs-aws-resource-swf-domain" +description: |- + Provides an SWF Domain resource +--- + +# aws_swf_domain + +Provides an SWF Domain resource. + +## Example Usage + +To register a basic SWF domain: + +```hcl +resource "aws_swf_domain" "foo" { + name = "foo" + description = "Terraform SWF Domain" + workflow_execution_retention_period_in_days = 30 +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Optional, Forces new resource) The name of the domain. If omitted, Terraform will assign a random, unique name. +* `name_prefix` - (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts with `name`. +* `description` - (Optional, Forces new resource) The domain description. +* `workflow_execution_retention_period_in_days` - (Required, Forces new resource) Length of time that SWF will continue to retain information about the workflow execution after the workflow execution is complete, must be between 0 and 90 days. + +## Attributes Reference + +The following attributes are exported: + +* `name` - The name of the parameter. +* `description` - The domain description. +* `workflow_execution_retention_period_in_days` - Length of time that SWF will continue to retain information about the workflow execution after the workflow execution is complete. + +## Import + +SWF Domains can be imported using the `name`, e.g. + +``` +$ terraform import aws_swf_domain.foo test-domain +``` From d5a473d72ad0e647fa20d06bde6537ab0eae56f5 Mon Sep 17 00:00:00 2001 From: dennisatspaceape Date: Sun, 14 Jan 2018 17:10:12 +0000 Subject: [PATCH 0044/3316] Added support for Kinesis Extended S3 Configuration Backup Mode --- ...ce_aws_kinesis_firehose_delivery_stream.go | 37 +++++++++++++++++-- ...s_kinesis_firehose_delivery_stream_test.go | 19 ++++++++-- ...sis_firehose_delivery_stream.html.markdown | 2 + 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index eaef7ff3190..9aeaaecc447 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -269,15 +269,15 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De elasticsearchConfList[0] = elasticsearchConfiguration d.Set("elasticsearch_configuration", elasticsearchConfList) d.Set("s3_configuration", flattenFirehoseS3Configuration(*destination.ElasticsearchDestinationDescription.S3DestinationDescription)) - } else if destination.S3DestinationDescription != nil { + } else if d.Get("destination").(string) == "s3" { d.Set("destination", "s3") d.Set("s3_configuration", flattenFirehoseS3Configuration(*destination.S3DestinationDescription)) - } else if destination.ExtendedS3DestinationDescription != nil { + } else { d.Set("destination", "extended_s3") extendedS3Configuration := map[string]interface{}{ - "buffering_interval": *destination.ExtendedS3DestinationDescription.BufferingHints.IntervalInSeconds, - "buffering_size": *destination.ExtendedS3DestinationDescription.BufferingHints.SizeInMBs, + "buffer_interval": *destination.ExtendedS3DestinationDescription.BufferingHints.IntervalInSeconds, + "buffer_size": *destination.ExtendedS3DestinationDescription.BufferingHints.SizeInMBs, "bucket_arn": *destination.ExtendedS3DestinationDescription.BucketARN, "role_arn": *destination.ExtendedS3DestinationDescription.RoleARN, "compression_format": *destination.ExtendedS3DestinationDescription.CompressionFormat, @@ -291,6 +291,9 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De if destination.ExtendedS3DestinationDescription.ProcessingConfiguration != nil { extendedS3Configuration["processing_configuration"] = flattenProcessingConfiguration(*destination.ExtendedS3DestinationDescription.ProcessingConfiguration) } + if destination.ExtendedS3DestinationDescription.S3BackupDescription != nil { + extendedS3Configuration["s3_backup_configuration"] = flattenFirehoseS3Configuration(*destination.ExtendedS3DestinationDescription.S3BackupDescription) + } extendedS3ConfList := make([]map[string]interface{}, 1) extendedS3ConfList[0] = extendedS3Configuration d.Set("extended_s3_configuration", extendedS3ConfList) @@ -423,6 +426,22 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Optional: true, }, + "s3_backup_mode": { + Type: schema.TypeString, + Optional: true, + Default: "Disabled", + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if value != "Disabled" && value != "Enabled" { + errors = append(errors, fmt.Errorf( + "%q must be one of 'Disabled', 'Enabled'", k)) + } + return + }, + }, + + "s3_backup_configuration": s3ConfigurationSchema(), + "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), "processing_configuration": processingConfigurationSchema(), @@ -719,6 +738,11 @@ func createExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) } + if s3BackupMode, ok := s3["s3_backup_mode"]; ok { + configuration.S3BackupMode = aws.String(s3BackupMode.(string)) + configuration.S3BackupConfiguration = expandS3BackupConfig(d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{})) + } + return configuration } @@ -794,6 +818,11 @@ func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) } + if s3BackupMode, ok := s3["s3_backup_mode"]; ok { + configuration.S3BackupMode = aws.String(s3BackupMode.(string)) + configuration.S3BackupUpdate = updateS3BackupConfig(d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{})) + } + return configuration } diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index 4f1d80074a9..d44fd88d3da 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -230,6 +230,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates(t *testing.T) { }, }, }, + S3BackupMode: aws.String("Enabled"), } resource.Test(t, resource.TestCase{ @@ -420,12 +421,15 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del // destination. For simplicity, our test only have a single S3 or // Redshift destination, so at this time it's safe to match on the first // one - var match, processingConfigMatch bool + var match, processingConfigMatch, matchS3BackupMode bool for _, d := range stream.Destinations { if d.ExtendedS3DestinationDescription != nil { if *d.ExtendedS3DestinationDescription.BufferingHints.SizeInMBs == *es.BufferingHints.SizeInMBs { match = true } + if *d.ExtendedS3DestinationDescription.S3BackupMode == *es.S3BackupMode { + matchS3BackupMode = true + } processingConfigMatch = len(es.ProcessingConfiguration.Processors) == len(d.ExtendedS3DestinationDescription.ProcessingConfiguration.Processors) } @@ -436,6 +440,9 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del if !processingConfigMatch { return fmt.Errorf("Mismatch extended s3 ProcessingConfiguration.Processors count, expected: %s, got: %s", es, stream.Destinations) } + if !matchS3BackupMode { + return fmt.Errorf("Mismatch extended s3 S3BackupMode, expected: %s, got: %s", es, stream.Destinations) + } } if redshiftConfig != nil { @@ -865,7 +872,12 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { parameter_value = "${aws_lambda_function.lambda_function_test.arn}:$LATEST" }] }] - }] + }], + s3_backup_mode = "Disabled", + s3_backup_configuration { + role_arn = "${aws_iam_role.firehose.arn}" + bucket_arn = "${aws_s3_bucket.bucket.arn}" + } } } ` @@ -934,7 +946,8 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { }] buffer_size = 10 buffer_interval = 400 - compression_format = "GZIP" + compression_format = "GZIP", + s3_backup_mode = "Enabled" } } ` diff --git a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown index f355de95506..60660d6d4ac 100644 --- a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown +++ b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown @@ -244,6 +244,8 @@ be used. The `extended_s3_configuration` object supports the same fields from `s3_configuration` as well as the following: * `processing_configuration` - (Optional) The data processing configuration. More details are given below. +* `s3_backup_mode` - (Optional) The Amazon S3 backup mode. Valid values are `Disabled` and `Enabled`. Default value is `Disabled`. +* `s3_backup_configuration` - (Optional) The configuration for backup in Amazon S3. Required if `s3_backup_mode` is `Enabled`. Supports the same fields as `s3_configuration` object. The `redshift_configuration` object supports the following: From 76aee794e258837ffe63c4184cea7362c5b37e8c Mon Sep 17 00:00:00 2001 From: Darren Haken Date: Thu, 18 Jan 2018 10:47:01 +0000 Subject: [PATCH 0045/3316] WIP - Add AWS Glue Crawler Move back to creating an acceptance test for the required fields on a crawler. Having issues working out how to declare the schema for the Targets in the Resource Schema. Failing acceptance test claims its something to do with the syntax of the test. --- aws/provider.go | 1 + aws/resource_aws_glue_catalog_crawler.go | 310 ++++++++++++++++++ aws/resource_aws_glue_catalog_crawler_test.go | 168 ++++++++++ 3 files changed, 479 insertions(+) create mode 100644 aws/resource_aws_glue_catalog_crawler.go create mode 100644 aws/resource_aws_glue_catalog_crawler_test.go diff --git a/aws/provider.go b/aws/provider.go index 81a1dc110aa..d88f8f081f1 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -359,6 +359,7 @@ func Provider() terraform.ResourceProvider { "aws_flow_log": resourceAwsFlowLog(), "aws_glacier_vault": resourceAwsGlacierVault(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_crawler": resourceAwsGlueCrawler(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), "aws_guardduty_member": resourceAwsGuardDutyMember(), "aws_iam_access_key": resourceAwsIamAccessKey(), diff --git a/aws/resource_aws_glue_catalog_crawler.go b/aws/resource_aws_glue_catalog_crawler.go new file mode 100644 index 00000000000..94090116688 --- /dev/null +++ b/aws/resource_aws_glue_catalog_crawler.go @@ -0,0 +1,310 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "log" + + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsGlueCatalogCrawler() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueCatalogCrawlerCreate, + Read: resourceAwsGlueCatalogCrawlerRead, + Update: resourceAwsGlueCatalogCrawlerUpdate, + Delete: resourceAwsGlueCatalogCrawlerDelete, + Exists: resourceAwsGlueCatalogCrawlerExists, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "database_name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "role": { + Type: schema.TypeString, + Required: true, + }, + //"description": { + // Type: schema.TypeString, + // Optional: true, + //}, + //"schedule": { + // Type: schema.TypeString, + // //TODO: Write a validate function on cron + // //ValidateFunc: validateCron, + //}, + //"classifiers": { + // Type: schema.TypeList, + // Optional: true, + //}, + //"schema_change_policy": { + // Type: schema.TypeSet, + // Optional: true, + // Elem: &schema.Resource{ + // Schema: map[string]*schema.Schema{ + // "delete_behavior": { + // Type: schema.TypeString, + // Optional: true, + // //ValidateFunc: validateDeletion, + // //TODO: Write a validate function to ensure value matches enum + // }, + // "update_behavior": { + // Type: schema.TypeString, + // Optional: true, + // //ValidateFunc: validateUpdate, + // //TODO: Write a validate function to ensure value matches enum + // }, + // }, + // }, + //}, + //"table_prefix": { + // Type: schema.TypeString, + // Optional: true, + //}, + "targets": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "jdbc_targets": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "connection_name": { + Type: schema.TypeString, + }, + "path": { + Type: schema.TypeString, + }, + "exclusions": { + Type: schema.TypeList, + }, + }, + }, + }, + "s3_targets": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "path": { + Type: schema.TypeList, + }, + "exclusions": { + Type: schema.TypeList, + }, + }, + }, + }, + }, + }, + }, + //"configuration": { + // Type: schema.TypeString, + // Optional: true, + // DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + // ValidateFunc: validateJsonString, + //}, + }, + } +} + +func resourceAwsGlueCatalogCrawlerCreate(resource *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + name := resource.Get("name").(string) + + _, err := glueConn.CreateCrawler(createCrawlerInput(name, resource)) + + if err != nil { + return fmt.Errorf("error creating Glue crawler: %s", err) + } + resource.SetId(fmt.Sprintf("%s", name)) + + return resourceAwsGlueCatalogCrawlerUpdate(resource, meta) +} + +func createCrawlerInput(crawlerName string, resource *schema.ResourceData) *glue.CreateCrawlerInput { + crawlerInput := &glue.CreateCrawlerInput{ + Name: aws.String(crawlerName), + DatabaseName: aws.String(resource.Get("database_name").(string)), + Role: aws.String(resource.Get("role").(string)), + Targets: createCrawlerTargets(resource.Get("targets")), + } + //if description, ok := resource.GetOk("description"); ok { + // crawlerInput.Description = aws.String(description.(string)) + //} + //if schedule, ok := resource.GetOk("schedule"); ok { + // crawlerInput.Description = aws.String(schedule.(string)) + //} + //if classifiers, ok := resource.GetOk("classifiers"); ok { + // crawlerInput.Classifiers = expandStringList(classifiers.(*schema.Set).List()) + //} + //if v, ok := resource.GetOk("schema_change_policy"); ok { + // crawlerInput.SchemaChangePolicy = createSchemaPolicy(v) + //} + //if tablePrefix, ok := resource.GetOk("table_prefix"); ok { + // crawlerInput.TablePrefix = aws.String(tablePrefix.(string)) + //} + //if targets, ok := resource.GetOk("targets"); ok { + // crawlerInput.Targets = createCrawlerTargets(targets) + //} + //if configuration, ok := resource.GetOk("configuration"); ok { + // crawlerInput.Configuration = aws.String(configuration.(string)) + //} + return crawlerInput +} + +func createSchemaPolicy(v interface{}) *glue.SchemaChangePolicy { + schemaAttributes := v.(map[string]interface{}) + schemaPolicy := &glue.SchemaChangePolicy{} + + if updateBehavior, ok := schemaAttributes["update_behavior"]; ok { + schemaPolicy.UpdateBehavior = aws.String(updateBehavior.(string)) + } + + if deleteBehavior, ok := schemaAttributes["delete_behavior"]; ok { + schemaPolicy.DeleteBehavior = aws.String(deleteBehavior.(string)) + } + return schemaPolicy +} + +func createCrawlerTargets(v interface{}) *glue.CrawlerTargets { + attributes := v.(map[string]interface{}) + crawlerTargets := &glue.CrawlerTargets{} + + if jdbcTargetsResource, ok := attributes["jdbc_targets"]; ok { + jdbcTargets := jdbcTargetsResource.(*schema.Set).List() + var configsOut []*glue.JdbcTarget + + for _, jdbcTarget := range jdbcTargets { + attributes := jdbcTarget.(map[string]interface{}) + + target := &glue.JdbcTarget{ + ConnectionName: aws.String(attributes["connection_name"].(string)), + Path: aws.String(attributes["path"].(string)), + } + + if exclusions, ok := attributes["exclusions"]; ok { + target.Exclusions = expandStringList(exclusions.(*schema.Set).List()) + } + + configsOut = append(configsOut, target) + } + + crawlerTargets.JdbcTargets = configsOut + } + + if s3Targets, ok := attributes["s3_targets"]; ok { + targets := s3Targets.(*schema.Set).List() + var configsOut []*glue.S3Target + + for _, target := range targets { + attributes := target.(map[string]interface{}) + + target := &glue.S3Target{ + Path: aws.String(attributes["path"].(string)), + } + + if exclusions, ok := attributes["exclusions"]; ok { + target.Exclusions = expandStringList(exclusions.(*schema.Set).List()) + } + + configsOut = append(configsOut, target) + } + crawlerTargets.S3Targets = configsOut + } + + return crawlerTargets +} + +func resourceAwsGlueCatalogCrawlerUpdate(resource *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + name := resource.Get("name").(string) + + crawlerInput := glue.UpdateCrawlerInput(*createCrawlerInput(name, resource)) + + if _, err := glueConn.UpdateCrawler(&crawlerInput); err != nil { + return err + } + + return resourceAwsGlueCatalogCrawlerRead(resource, meta) +} + +func resourceAwsGlueCatalogCrawlerRead(resource *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + name := resource.Get("name").(string) + + input := &glue.GetCrawlerInput{ + Name: aws.String(name), + } + + crawlerOutput, err := glueConn.GetCrawler(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Crawler (%s) not found, removing from state", resource.Id()) + resource.SetId("") + } + + return fmt.Errorf("error reading Glue crawler: %s", err.Error()) + } + + resource.Set("name", crawlerOutput.Crawler.Name) + resource.Set("database_name", crawlerOutput.Crawler.DatabaseName) + resource.Set("role", crawlerOutput.Crawler.Role) + //resource.Set("description", crawler.Description) + //resource.Set("schedule", crawler.Schedule) + + //var classifiers []string + //if len(crawler.Classifiers) > 0 { + // for _, value := range crawler.Classifiers { + // classifiers = append(classifiers, *value) + // } + //} + //resource.Set("classifiers", crawler.Classifiers) + + //if crawlerOutput.Crawler.SchemaChangePolicy != nil { + // schemaPolicy := map[string]string{ + // "delete_behavior": *crawlerOutput.Crawler.SchemaChangePolicy.DeleteBehavior, + // "update_behavior": *crawlerOutput.Crawler.SchemaChangePolicy.UpdateBehavior, + // } + // resource.Set("schema_change_policy", schemaPolicy) + //} + // + //resource.Set("table_prefix", crawlerOutput.Crawler.TablePrefix) + + return nil +} + +func resourceAwsGlueCatalogCrawlerDelete(d *schema.ResourceData, meta interface{}) error { + glueConn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + log.Printf("[DEBUG] deleting Glue crawler: %s", name) + _, err := glueConn.DeleteCrawler(&glue.DeleteCrawlerInput{ + Name: aws.String(name), + }) + if err != nil { + return fmt.Errorf("error deleting Glue crawler: %s", err.Error()) + } + return nil +} + +func resourceAwsGlueCatalogCrawlerExists(d *schema.ResourceData, meta interface{}) (bool, error) { + glueConn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + input := &glue.GetCrawlerInput{ + Name: aws.String(name), + } + + _, err := glueConn.GetCrawler(input) + return err == nil, err +} diff --git a/aws/resource_aws_glue_catalog_crawler_test.go b/aws/resource_aws_glue_catalog_crawler_test.go new file mode 100644 index 00000000000..c14b8491b44 --- /dev/null +++ b/aws/resource_aws_glue_catalog_crawler_test.go @@ -0,0 +1,168 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + "testing" +) + +func TestAccAWSGlueCrawler_full(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccGuardDutyDetectorConfigBasic, + Check: resource.ComposeTestCheckFunc( + checkGlueCatalogCrawlerExists("aws_glue_catalog_crawler.test", "tf-test"), + resource.TestCheckResourceAttr( + "aws_glue_catalog_crawler.test", + "name", + "tf-test", + ), + resource.TestCheckResourceAttr( + "aws_glue_catalog_crawler.test", + "database_name", + "db-name", + ), + resource.TestCheckResourceAttr( + "aws_glue_catalog_crawler.test", + "role", + "default", + ), + ), + }, + }, + }) +} + +//func testAccCheckGlueDatabaseDestroy(s *terraform.State) error { +// conn := testAccProvider.Meta().(*AWSClient).glueconn +// +// for _, rs := range s.RootModule().Resources { +// if rs.Type != "aws_glue_catalog_database" { +// continue +// } +// +// catalogId, dbName := readAwsGlueCatalogID(rs.Primary.ID) +// +// input := &glue.GetDatabaseInput{ +// CatalogId: aws.String(catalogId), +// Name: aws.String(dbName), +// } +// if _, err := conn.GetDatabase(input); err != nil { +// //Verify the error is what we want +// if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { +// continue +// } +// +// return err +// } +// return fmt.Errorf("still exists") +// } +// return nil +//} + +//func testAccGlueCatalogDatabase_basic(rInt int) string { +// return fmt.Sprintf(` +//resource "aws_glue_catalog_database" "test" { +// name = "my_test_catalog_database_%d" +//} +//`, rInt) +//} + +//func testAccGlueCatalogDatabase_full(rInt int, desc string) string { +// return fmt.Sprintf(` +//resource "aws_glue_catalog_database" "test" { +// name = "my_test_catalog_database_%d" +// description = "%s" +// location_uri = "my-location" +// parameters { +// param1 = "value1" +// param2 = true +// param3 = 50 +// } +//} +//`, rInt, desc) +//} + +//func testAccCheckGlueCatalogDatabaseExists(name string) resource.TestCheckFunc { +// return func(s *terraform.State) error { +// rs, ok := s.RootModule().Resources[name] +// if !ok { +// return fmt.Errorf("Not found: %s", name) +// } +// +// if rs.Primary.ID == "" { +// return fmt.Errorf("No ID is set") +// } +// +// catalogId, dbName := readAwsGlueCatalogID(rs.Primary.ID) +// +// glueconn := testAccProvider.Meta().(*AWSClient).glueconn +// out, err := glueconn.GetDatabase(&glue.GetDatabaseInput{ +// CatalogId: aws.String(catalogId), +// Name: aws.String(dbName), +// }) +// +// if err != nil { +// return err +// } +// +// if out.Database == nil { +// return fmt.Errorf("No Glue Database Found") +// } +// +// if *out.Database.Name != dbName { +// return fmt.Errorf("Glue Database Mismatch - existing: %q, state: %q", +// *out.Database.Name, dbName) +// } +// +// return nil +// } +//} + +func checkGlueCatalogCrawlerExists(name string, crawlerName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("not found: %s", name) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("no ID is set") + } + + glueConn := testAccProvider.Meta().(*AWSClient).glueconn + out, err := glueConn.GetCrawler(&glue.GetCrawlerInput{ + Name: aws.String(crawlerName), + }) + + if err != nil { + return err + } + + if out.Crawler == nil { + return fmt.Errorf("no Glue Crawler found") + } + + return nil + } +} + +const testAccGuardDutyDetectorConfigBasic = ` +resource "aws_glue_catalog_crawler" "tf-test" { + name = "tf-test" + database_name = "db_name" + role = "glue_role" + targets { + s3_target = [ + { + path = "s3://bucket" + } + ] + } +` From 2c8c24776b9c479d06cb49e593adbb684c333535 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sun, 4 Feb 2018 00:15:35 +0900 Subject: [PATCH 0046/3316] New Data Source: aws_workspaces_bundle --- aws/config.go | 3 + aws/data_source_aws_workspaces_bundle.go | 118 ++++++++++++++++++ aws/data_source_aws_workspaces_bundle_test.go | 32 +++++ aws/provider.go | 1 + website/aws.erb | 3 + .../docs/d/workspaces_bundle.html.markdown | 48 +++++++ 6 files changed, 205 insertions(+) create mode 100644 aws/data_source_aws_workspaces_bundle.go create mode 100644 aws/data_source_aws_workspaces_bundle_test.go create mode 100644 website/docs/d/workspaces_bundle.html.markdown diff --git a/aws/config.go b/aws/config.go index 7a657d1fbf5..e91db72f9fe 100644 --- a/aws/config.go +++ b/aws/config.go @@ -80,6 +80,7 @@ import ( "github.com/aws/aws-sdk-go/service/sts" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/aws/aws-sdk-go/service/workspaces" "github.com/davecgh/go-spew/spew" "github.com/hashicorp/errwrap" "github.com/hashicorp/go-cleanhttp" @@ -206,6 +207,7 @@ type AWSClient struct { athenaconn *athena.Athena dxconn *directconnect.DirectConnect mediastoreconn *mediastore.MediaStore + wsconn *workspaces.WorkSpaces } func (c *AWSClient) S3() *s3.S3 { @@ -451,6 +453,7 @@ func (c *Config) Client() (interface{}, error) { client.athenaconn = athena.New(sess) client.dxconn = directconnect.New(sess) client.mediastoreconn = mediastore.New(sess) + client.wsconn = workspaces.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/aws/data_source_aws_workspaces_bundle.go b/aws/data_source_aws_workspaces_bundle.go new file mode 100644 index 00000000000..aeb5dd37e6e --- /dev/null +++ b/aws/data_source_aws_workspaces_bundle.go @@ -0,0 +1,118 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/workspaces" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsWorkspaceBundle() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsWorkspaceBundleRead, + + Schema: map[string]*schema.Schema{ + "bundle_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "owner": { + Type: schema.TypeString, + Computed: true, + }, + "compute_type": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "user_storage": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "capacity": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "root_storage": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "capacity": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsWorkspaceBundleRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wsconn + + bundleID := d.Get("bundle_id").(string) + input := &workspaces.DescribeWorkspaceBundlesInput{ + BundleIds: []*string{aws.String(bundleID)}, + } + + resp, err := conn.DescribeWorkspaceBundles(input) + if err != nil { + return err + } + + if len(resp.Bundles) != 1 { + return fmt.Errorf("The number of Workspace Bundle (%s) should be 1, but %d", bundleID, len(resp.Bundles)) + } + + bundle := resp.Bundles[0] + d.SetId(bundleID) + d.Set("description", bundle.Description) + d.Set("name", bundle.Name) + d.Set("owner", bundle.Owner) + if bundle.ComputeType != nil { + r := map[string]interface{}{ + "name": *bundle.ComputeType.Name, + } + ct := []map[string]interface{}{r} + d.Set("compute_type", ct) + } + if bundle.RootStorage != nil { + r := map[string]interface{}{ + "capacity": *bundle.RootStorage.Capacity, + } + rs := []map[string]interface{}{r} + d.Set("root_storage", rs) + } + if bundle.UserStorage != nil { + r := map[string]interface{}{ + "capacity": *bundle.UserStorage.Capacity, + } + us := []map[string]interface{}{r} + d.Set("user_storage", us) + } + + return nil +} diff --git a/aws/data_source_aws_workspaces_bundle_test.go b/aws/data_source_aws_workspaces_bundle_test.go new file mode 100644 index 00000000000..41daa092a45 --- /dev/null +++ b/aws/data_source_aws_workspaces_bundle_test.go @@ -0,0 +1,32 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAwsWorkspaceBundle_basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDataSourceAwsWorkspaceBundleConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_workspaces_bundle.test", "bundle_id", "wsb-b0s22j3d7"), + resource.TestCheckResourceAttrSet( + "data.aws_workspaces_bundle.test", "name"), + resource.TestCheckResourceAttrSet( + "data.aws_workspaces_bundle.test", "owner"), + ), + }, + }, + }) +} + +const testAccDataSourceAwsWorkspaceBundleConfig = ` +data "aws_workspaces_bundle" "test" { + bundle_id = "wsb-b0s22j3d7" +} +` diff --git a/aws/provider.go b/aws/provider.go index 60ac4a0db40..0c3db688e31 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -227,6 +227,7 @@ func Provider() terraform.ResourceProvider { "aws_vpc_endpoint_service": dataSourceAwsVpcEndpointService(), "aws_vpc_peering_connection": dataSourceAwsVpcPeeringConnection(), "aws_vpn_gateway": dataSourceAwsVpnGateway(), + "aws_workspaces_bundle": dataSourceAwsWorkspaceBundle(), // Adding the Aliases for the ALB -> LB Rename "aws_lb": dataSourceAwsLb(), diff --git a/website/aws.erb b/website/aws.erb index 07b8c9301c4..26a761cf0b7 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -233,6 +233,9 @@ > aws_vpn_gateway + > + aws_workspaces_bundle + diff --git a/website/docs/d/workspaces_bundle.html.markdown b/website/docs/d/workspaces_bundle.html.markdown new file mode 100644 index 00000000000..1b61a8b4ef9 --- /dev/null +++ b/website/docs/d/workspaces_bundle.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "aws" +page_title: "AWS: aws_workspaces_bundle" +sidebar_current: "docs-aws-datasource-workspaces-bundle" +description: |- + Get information on a Workspaces Bundle. +--- + +# aws_workspaces_bundle + +Use this data source to get information about a Workspaces Bundle. + +## Example Usage + +```hcl +data "aws_workspaces_bundle" "example" { + bundle_id = "wsb-b0s22j3d7" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `bundle_id` – (Required, ForceNew) The ID of the bundle. + +## Attributes Reference + +The following attributes are exported: + +* `description` – The description of the bundle. +* `name` – The name of the bundle. +* `owner` – The owner of the bundle. +* `compute_type` – The compute type. See supported fields below. +* `root_storage` – The root volume. See supported fields below. +* `user_storage` – The user storage. See supported fields below. + +### `compute_type` + +* `name` - The name of the compute type. + +### `root_storage` + +* `capacity` - The size of the root volume. + +### `user_storage` + +* `capacity` - The size of the user storage. From 48d738ab8444a0d50f56f6a2609b4169f0b8b984 Mon Sep 17 00:00:00 2001 From: Daniel del Castillo Date: Thu, 8 Feb 2018 10:45:11 +0000 Subject: [PATCH 0047/3316] [issue-3288] Add configurable DeliveryPolicy to SNS subscription resource --- aws/resource_aws_sns_topic_subscription.go | 57 +++--- ...esource_aws_sns_topic_subscription_test.go | 171 ++++++++++++++++-- .../r/sns_topic_subscription.html.markdown | 2 + 3 files changed, 197 insertions(+), 33 deletions(-) diff --git a/aws/resource_aws_sns_topic_subscription.go b/aws/resource_aws_sns_topic_subscription.go index a1c499c53d9..b64bcb6f12b 100644 --- a/aws/resource_aws_sns_topic_subscription.go +++ b/aws/resource_aws_sns_topic_subscription.go @@ -26,6 +26,7 @@ var SNSSubscriptionAttributeMap = map[string]string{ "protocol": "Protocol", "raw_message_delivery": "RawMessageDelivery", "filter_policy": "FilterPolicy", + "delivery_policy": "DeliveryPolicy", } func resourceAwsSnsTopicSubscription() *schema.Resource { @@ -66,8 +67,14 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { ForceNew: true, }, "delivery_policy": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateJsonString, + DiffSuppressFunc: suppressEquivalentJsonDiffs, + StateFunc: func(v interface{}) string { + json, _ := structure.NormalizeJsonString(v) + return json + }, }, "raw_message_delivery": { Type: schema.TypeBool, @@ -127,34 +134,27 @@ func resourceAwsSnsTopicSubscriptionUpdate(d *schema.ResourceData, meta interfac attrValue = "true" } - req := &sns.SetSubscriptionAttributesInput{ - SubscriptionArn: aws.String(d.Id()), - AttributeName: aws.String("RawMessageDelivery"), - AttributeValue: aws.String(attrValue), - } - _, err := snsconn.SetSubscriptionAttributes(req) - - if err != nil { - return fmt.Errorf("Unable to set raw message delivery attribute on subscription") + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "raw_message_delivery", attrValue); err != nil { + return err } } if d.HasChange("filter_policy") { - _, n := d.GetChange("filter_policy") + _, f := d.GetChange("filter_policy") - attrValue := n.(string) - - req := &sns.SetSubscriptionAttributesInput{ - SubscriptionArn: aws.String(d.Id()), - AttributeName: aws.String("FilterPolicy"), - AttributeValue: aws.String(attrValue), + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "filter_policy", f.(string)); err != nil { + return err } - _, err := snsconn.SetSubscriptionAttributes(req) + } - if err != nil { - return fmt.Errorf("Unable to set filter policy attribute on subscription: %s", err) + if d.HasChange("delivery_policy") { + _, dp := d.GetChange("delivery_policy") + + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "delivery_policy", dp.(string)); err != nil { + return err } } + return resourceAwsSnsTopicSubscriptionRead(d, meta) } @@ -328,3 +328,18 @@ func obfuscateEndpoint(endpoint string) string { } return obfuscatedEndpoint } + +func snsSubscriptionAttributeUpdate(snsconn *sns.SNS, tfId string, tfName string, val string) error { + awsAttrName := SNSSubscriptionAttributeMap[tfName] + req := &sns.SetSubscriptionAttributesInput{ + SubscriptionArn: aws.String(tfId), + AttributeName: aws.String(awsAttrName), + AttributeValue: aws.String(val), + } + _, err := snsconn.SetSubscriptionAttributes(req) + + if err != nil { + return fmt.Errorf("Unable to set %s attribute on subscription", awsAttrName) + } + return nil +} diff --git a/aws/resource_aws_sns_topic_subscription_test.go b/aws/resource_aws_sns_topic_subscription_test.go index df9170614df..ea65afab944 100644 --- a/aws/resource_aws_sns_topic_subscription_test.go +++ b/aws/resource_aws_sns_topic_subscription_test.go @@ -53,6 +53,29 @@ func TestAccAWSSNSTopicSubscription_filterPolicy(t *testing.T) { }, }) } + +func TestAccAWSSNSTopicSubscription_deliveryPolicy(t *testing.T) { + ri := acctest.RandInt() + deliveryPolicy1 := `{"healthyRetryPolicy": {"numRetries": 5}}` + deliveryPolicy2 := `{"healthyRetryPolicy": {"numRetries": 11}}` + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSNSTopicSubscriptionConfig_deliveryPolicy(ri, strconv.Quote(deliveryPolicy1)), + Check: resource.TestCheckResourceAttr("aws_sns_topic_subscription.test_subscription", "delivery_policy", deliveryPolicy1), + }, + { + Config: testAccAWSSNSTopicSubscriptionConfig_deliveryPolicy(ri, strconv.Quote(deliveryPolicy2)), + Check: resource.TestCheckResourceAttr("aws_sns_topic_subscription.test_subscription", "delivery_policy", deliveryPolicy2), + }, + }, + }) +} + func TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint(t *testing.T) { ri := acctest.RandInt() @@ -164,17 +187,17 @@ func TestObfuscateEndpointPassword(t *testing.T) { func testAccAWSSNSTopicSubscriptionConfig(i int) string { return fmt.Sprintf(` resource "aws_sns_topic" "test_topic" { - name = "terraform-test-topic-%d" + name = "terraform-test-topic-%d" } resource "aws_sqs_queue" "test_queue" { - name = "terraform-subscription-test-queue-%d" + name = "terraform-subscription-test-queue-%d" } resource "aws_sns_topic_subscription" "test_subscription" { - topic_arn = "${aws_sns_topic.test_topic.arn}" - protocol = "sqs" - endpoint = "${aws_sqs_queue.test_queue.arn}" + topic_arn = "${aws_sns_topic.test_topic.arn}" + protocol = "sqs" + endpoint = "${aws_sqs_queue.test_queue.arn}" } `, i, i) } @@ -182,22 +205,146 @@ resource "aws_sns_topic_subscription" "test_subscription" { func testAccAWSSNSTopicSubscriptionConfig_filterPolicy(i int, policy string) string { return fmt.Sprintf(` resource "aws_sns_topic" "test_topic" { - name = "terraform-test-topic-%d" + name = "terraform-test-topic-%d" } resource "aws_sqs_queue" "test_queue" { - name = "terraform-subscription-test-queue-%d" + name = "terraform-subscription-test-queue-%d" } resource "aws_sns_topic_subscription" "test_subscription" { - topic_arn = "${aws_sns_topic.test_topic.arn}" - protocol = "sqs" - endpoint = "${aws_sqs_queue.test_queue.arn}" - filter_policy = %s - } + topic_arn = "${aws_sns_topic.test_topic.arn}" + protocol = "sqs" + endpoint = "${aws_sqs_queue.test_queue.arn}" + filter_policy = %s +} `, i, i, policy) } +func testAccAWSSNSTopicSubscriptionConfig_deliveryPolicy(i int, policy string) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "test_topic" { + name = "tf-acc-test-sns-%d" +} + +resource "aws_api_gateway_rest_api" "test" { + name = "tf-acc-test-sns-%d" + description = "Terraform Acceptance test for SNS subscription" +} + +resource "aws_api_gateway_method" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_rest_api.test.root_resource_id}" + http_method = "POST" + authorization = "NONE" +} + +resource "aws_api_gateway_method_response" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_rest_api.test.root_resource_id}" + http_method = "${aws_api_gateway_method.test.http_method}" + status_code = "200" + + response_parameters { + "method.response.header.Access-Control-Allow-Origin" = true + } +} + +resource "aws_api_gateway_integration" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_rest_api.test.root_resource_id}" + http_method = "${aws_api_gateway_method.test.http_method}" + integration_http_method = "POST" + type = "AWS" + uri = "${aws_lambda_function.lambda.invoke_arn}" +} + +resource "aws_api_gateway_integration_response" "test" { + depends_on = ["aws_api_gateway_integration.test"] + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_rest_api.test.root_resource_id}" + http_method = "${aws_api_gateway_method.test.http_method}" + status_code = "${aws_api_gateway_method_response.test.status_code}" + + response_parameters { + "method.response.header.Access-Control-Allow-Origin" = "'*'" + } +} + +resource "aws_iam_role" "iam_for_lambda" { + name = "tf-acc-test-sns-%d" + + assume_role_policy = < Date: Thu, 8 Feb 2018 17:48:31 +0000 Subject: [PATCH 0048/3316] [issue-3288] Add configurable DeliveryPolicy to SNS subscription resource --- aws/resource_aws_sns_topic_subscription.go | 20 +++++++++---------- ...esource_aws_sns_topic_subscription_test.go | 4 ++-- .../r/sns_topic_subscription.html.markdown | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_sns_topic_subscription.go b/aws/resource_aws_sns_topic_subscription.go index b64bcb6f12b..1979866bb7c 100644 --- a/aws/resource_aws_sns_topic_subscription.go +++ b/aws/resource_aws_sns_topic_subscription.go @@ -140,17 +140,17 @@ func resourceAwsSnsTopicSubscriptionUpdate(d *schema.ResourceData, meta interfac } if d.HasChange("filter_policy") { - _, f := d.GetChange("filter_policy") + _, n := d.GetChange("filter_policy") - if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "filter_policy", f.(string)); err != nil { + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "filter_policy", n.(string)); err != nil { return err } } if d.HasChange("delivery_policy") { - _, dp := d.GetChange("delivery_policy") + _, n := d.GetChange("delivery_policy") - if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "delivery_policy", dp.(string)); err != nil { + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "delivery_policy", n.(string)); err != nil { return err } } @@ -329,17 +329,17 @@ func obfuscateEndpoint(endpoint string) string { return obfuscatedEndpoint } -func snsSubscriptionAttributeUpdate(snsconn *sns.SNS, tfId string, tfName string, val string) error { - awsAttrName := SNSSubscriptionAttributeMap[tfName] +func snsSubscriptionAttributeUpdate(snsconn *sns.SNS, subscriptionArn, attributeName, attributeValue string) error { + awsAttributeName := SNSSubscriptionAttributeMap[attributeName] req := &sns.SetSubscriptionAttributesInput{ - SubscriptionArn: aws.String(tfId), - AttributeName: aws.String(awsAttrName), - AttributeValue: aws.String(val), + SubscriptionArn: aws.String(subscriptionArn), + AttributeName: aws.String(awsAttributeName), + AttributeValue: aws.String(attributeValue), } _, err := snsconn.SetSubscriptionAttributes(req) if err != nil { - return fmt.Errorf("Unable to set %s attribute on subscription", awsAttrName) + return fmt.Errorf("Unable to set %s attribute on subscription: %s", attributeName, err) } return nil } diff --git a/aws/resource_aws_sns_topic_subscription_test.go b/aws/resource_aws_sns_topic_subscription_test.go index ea65afab944..938668175da 100644 --- a/aws/resource_aws_sns_topic_subscription_test.go +++ b/aws/resource_aws_sns_topic_subscription_test.go @@ -56,8 +56,8 @@ func TestAccAWSSNSTopicSubscription_filterPolicy(t *testing.T) { func TestAccAWSSNSTopicSubscription_deliveryPolicy(t *testing.T) { ri := acctest.RandInt() - deliveryPolicy1 := `{"healthyRetryPolicy": {"numRetries": 5}}` - deliveryPolicy2 := `{"healthyRetryPolicy": {"numRetries": 11}}` + deliveryPolicy1 := `{"healthyRetryPolicy": {"minDelayTarget": 5, "maxDelayTarget": 20, "numRetries": 5}}` + deliveryPolicy2 := `{"healthyRetryPolicy": {"minDelayTarget": 3, "maxDelayTarget": 78, "numRetries": 11}}` resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/website/docs/r/sns_topic_subscription.html.markdown b/website/docs/r/sns_topic_subscription.html.markdown index cc227a2a8b7..a75a30664db 100644 --- a/website/docs/r/sns_topic_subscription.html.markdown +++ b/website/docs/r/sns_topic_subscription.html.markdown @@ -242,8 +242,8 @@ The following arguments are supported: * `endpoint_auto_confirms` - (Optional) Boolean indicating whether the end point is capable of [auto confirming subscription](http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html#SendMessageToHttp.prepare) e.g., PagerDuty (default is false) * `confirmation_timeout_in_minutes` - (Optional) Integer indicating number of minutes to wait in retying mode for fetching subscription arn before marking it as failure. Only applicable for http and https protocols (default is 1 minute). * `raw_message_delivery` - (Optional) Boolean indicating whether or not to enable raw message delivery (the original message is directly passed, not wrapped in JSON with the original message in the message property) (default is false). -* `filter_policy` - (Optional) JSON String with the filter policy that will be used in the subscription to filter messages seen by the target resource. Refer to the SNS docs for more details. -* `delivery_policy` - (Optional) JSON String with the delivery policy (retries, backoff, etc.) that will be used in the subscription - this only applies to HTTP/S subscriptions. Refer to the SNS docs for more details. +* `filter_policy` - (Optional) JSON String with the filter policy that will be used in the subscription to filter messages seen by the target resource. Refer to the [SNS docs](https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html) for more details. +* `delivery_policy` - (Optional) JSON String with the delivery policy (retries, backoff, etc.) that will be used in the subscription - this only applies to HTTP/S subscriptions. Refer to the [SNS docs](https://docs.aws.amazon.com/sns/latest/dg/DeliveryPolicies.html) for more details. ### Protocols supported From 0df85b80208c0c77ff35c01325436d28deda02b4 Mon Sep 17 00:00:00 2001 From: eggsbenjamin Date: Sat, 10 Feb 2018 01:26:33 +0000 Subject: [PATCH 0049/3316] routing_config added && tested --- aws/resource_aws_lambda_alias.go | 59 ++++++++++++ aws/resource_aws_lambda_alias_test.go | 110 ++++++++++++++++++++-- aws/test-fixtures/lambdatest_modified.zip | Bin 0 -> 393 bytes website/docs/r/lambda_alias.html.markdown | 14 ++- 4 files changed, 176 insertions(+), 7 deletions(-) create mode 100644 aws/test-fixtures/lambdatest_modified.zip diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index 083225f3ad2..b622120242f 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" "strings" @@ -39,6 +40,20 @@ func resourceAwsLambdaAlias() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "routing_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "additional_version_weights": { + Type: schema.TypeMap, + Optional: true, + Elem: schema.TypeFloat, + }, + }, + }, + }, }, } } @@ -60,6 +75,23 @@ func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) erro Name: aws.String(aliasName), } + if v, ok := d.GetOk("routing_config"); ok { + routingConfigs := v.([]interface{}) + routingConfig, ok := routingConfigs[0].(map[string]interface{}) + + if !ok { + return errors.New("At least one field is expected inside routing_config") + } + + if additionalVersionWeights, ok := routingConfig["additional_version_weights"]; ok { + weights := readAdditionalVersionWeights(additionalVersionWeights.(map[string]interface{})) + + params.RoutingConfig = &lambda.AliasRoutingConfiguration{ + AdditionalVersionWeights: aws.Float64Map(weights), + } + } + } + aliasConfiguration, err := conn.CreateAlias(params) if err != nil { return fmt.Errorf("Error creating Lambda alias: %s", err) @@ -97,6 +129,7 @@ func resourceAwsLambdaAliasRead(d *schema.ResourceData, meta interface{}) error d.Set("function_version", aliasConfiguration.FunctionVersion) d.Set("name", aliasConfiguration.Name) d.Set("arn", aliasConfiguration.AliasArn) + d.Set("routing_config", aliasConfiguration.RoutingConfig) return nil } @@ -137,6 +170,23 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro Name: aws.String(d.Get("name").(string)), } + if v, ok := d.GetOk("routing_config"); ok { + routingConfigs := v.([]interface{}) + routingConfig, ok := routingConfigs[0].(map[string]interface{}) + + if !ok { + return errors.New("At least one field is expected inside routing_config") + } + + if additionalVersionWeights, ok := routingConfig["additional_version_weights"]; ok { + weights := readAdditionalVersionWeights(additionalVersionWeights.(map[string]interface{})) + + params.RoutingConfig = &lambda.AliasRoutingConfiguration{ + AdditionalVersionWeights: aws.Float64Map(weights), + } + } + } + _, err := conn.UpdateAlias(params) if err != nil { return fmt.Errorf("Error updating Lambda alias: %s", err) @@ -144,3 +194,12 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro return nil } + +func readAdditionalVersionWeights(avw map[string]interface{}) map[string]float64 { + weights := make(map[string]float64) + for k, v := range avw { + weights[k] = v.(float64) + } + + return weights +} diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index f359157594d..0ebfe969caf 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -36,6 +36,16 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), ), }, + resource.TestStep{ + Config: testAccAwsLambdaAliasConfigWithRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasRoutingConfig(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), + ), + }, }, }) } @@ -104,6 +114,20 @@ func testAccCheckAwsLambdaAttributes(mapping *lambda.AliasConfiguration) resourc } } +func testAccCheckAwsLambdaAliasRoutingConfig(mapping *lambda.AliasConfiguration) resource.TestCheckFunc { + return func(s *terraform.State) error { + routingConfig := mapping.RoutingConfig + + if routingConfig == nil { + return fmt.Errorf("Could not read Lambda alias routing config") + } + if len(routingConfig.AdditionalVersionWeights) != 1 { + return fmt.Errorf("Could not read Lambda alias additional version weights") + } + return nil + } +} + func testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName string) string { return fmt.Sprintf(` resource "aws_iam_role" "iam_for_lambda" { @@ -154,17 +178,91 @@ resource "aws_iam_policy_attachment" "policy_attachment_for_role" { } resource "aws_lambda_function" "lambda_function_test_create" { - filename = "test-fixtures/lambdatest.zip" - function_name = "%s" - role = "${aws_iam_role.iam_for_lambda.arn}" - handler = "exports.example" - runtime = "nodejs4.3" + filename = "test-fixtures/lambdatest.zip" + function_name = "%s" + role = "${aws_iam_role.iam_for_lambda.arn}" + handler = "exports.example" + runtime = "nodejs4.3" + source_code_hash = "${base64sha256(file("test-fixtures/lambdatest.zip"))}" + publish = "true" +} + +resource "aws_lambda_alias" "lambda_alias_test" { + name = "%s" + description = "a sample description" + function_name = "${aws_lambda_function.lambda_function_test_create.arn}" + function_version = "1" +}`, roleName, policyName, attachmentName, funcName, aliasName) +} + +func testAccAwsLambdaAliasConfigWithRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "iam_for_lambda" { + name = "%s" + + assume_role_policy = <OJa?gvY~ve$s@rcjZ{i^GYGG=J_P3HE-I{;5w)*eo4bN>_!f Date: Sat, 10 Feb 2018 01:37:10 +0000 Subject: [PATCH 0050/3316] fmt'd --- aws/resource_aws_lambda_alias_test.go | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index 0ebfe969caf..7e1c02e4755 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -178,11 +178,11 @@ resource "aws_iam_policy_attachment" "policy_attachment_for_role" { } resource "aws_lambda_function" "lambda_function_test_create" { - filename = "test-fixtures/lambdatest.zip" - function_name = "%s" - role = "${aws_iam_role.iam_for_lambda.arn}" - handler = "exports.example" - runtime = "nodejs4.3" + filename = "test-fixtures/lambdatest.zip" + function_name = "%s" + role = "${aws_iam_role.iam_for_lambda.arn}" + handler = "exports.example" + runtime = "nodejs4.3" source_code_hash = "${base64sha256(file("test-fixtures/lambdatest.zip"))}" publish = "true" } @@ -245,11 +245,11 @@ resource "aws_iam_policy_attachment" "policy_attachment_for_role" { } resource "aws_lambda_function" "lambda_function_test_create" { - filename = "test-fixtures/lambdatest_modified.zip" - function_name = "%s" - role = "${aws_iam_role.iam_for_lambda.arn}" - handler = "exports.example" - runtime = "nodejs4.3" + filename = "test-fixtures/lambdatest_modified.zip" + function_name = "%s" + role = "${aws_iam_role.iam_for_lambda.arn}" + handler = "exports.example" + runtime = "nodejs4.3" source_code_hash = "${base64sha256(file("test-fixtures/lambdatest_modified.zip"))}" publish = "true" } @@ -259,10 +259,10 @@ resource "aws_lambda_alias" "lambda_alias_test" { description = "a sample description" function_name = "${aws_lambda_function.lambda_function_test_create.arn}" function_version = "1" - routing_config = { - additional_version_weights = { - "2" = 0.5 - } - } + routing_config = { + additional_version_weights = { + "2" = 0.5 + } + } }`, roleName, policyName, attachmentName, funcName, aliasName) } From 9410ea5cf97a3f44a18738fb75d8ecb45373f7ac Mon Sep 17 00:00:00 2001 From: eggsbenjamin Date: Sat, 10 Feb 2018 01:54:16 +0000 Subject: [PATCH 0051/3316] removed newlines --- aws/resource_aws_lambda_alias.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index b622120242f..73785594dc3 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -78,7 +78,6 @@ func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) erro if v, ok := d.GetOk("routing_config"); ok { routingConfigs := v.([]interface{}) routingConfig, ok := routingConfigs[0].(map[string]interface{}) - if !ok { return errors.New("At least one field is expected inside routing_config") } @@ -173,7 +172,6 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro if v, ok := d.GetOk("routing_config"); ok { routingConfigs := v.([]interface{}) routingConfig, ok := routingConfigs[0].(map[string]interface{}) - if !ok { return errors.New("At least one field is expected inside routing_config") } From fef5efff27ea260d072e3c693ad727adc24ffb28 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 10 Feb 2018 18:13:05 +0900 Subject: [PATCH 0052/3316] update --- aws/resource_aws_codebuild_project.go | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 94e05f2e3b6..ef49f17c052 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCodeBuildProject() *schema.Resource { @@ -98,17 +99,10 @@ func resourceAwsCodeBuildProject() *schema.Resource { "type": { Type: schema.TypeString, Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - validType := []string{"PARAMETER_STORE", "PLAINTEXT"} - for _, str := range validType { - if value == str { - return - } - } - errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) - return - }, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.EnvironmentVariableTypeParameterStore, + codebuild.EnvironmentVariableTypePlaintext, + }, false), }, }, }, From 6086430ea2d13b8fcac3b7380c3834dbd48f224e Mon Sep 17 00:00:00 2001 From: eggsbenjamin Date: Sat, 10 Feb 2018 12:04:34 +0000 Subject: [PATCH 0053/3316] added dedicated test case, fix removal bug --- aws/resource_aws_lambda_alias.go | 12 ++---- aws/resource_aws_lambda_alias_test.go | 57 +++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index 73785594dc3..7a864d8f009 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -73,6 +73,7 @@ func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) erro FunctionName: aws.String(functionName), FunctionVersion: aws.String(d.Get("function_version").(string)), Name: aws.String(aliasName), + RoutingConfig: &lambda.AliasRoutingConfiguration{}, } if v, ok := d.GetOk("routing_config"); ok { @@ -84,10 +85,7 @@ func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) erro if additionalVersionWeights, ok := routingConfig["additional_version_weights"]; ok { weights := readAdditionalVersionWeights(additionalVersionWeights.(map[string]interface{})) - - params.RoutingConfig = &lambda.AliasRoutingConfiguration{ - AdditionalVersionWeights: aws.Float64Map(weights), - } + params.RoutingConfig.AdditionalVersionWeights = aws.Float64Map(weights) } } @@ -167,6 +165,7 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro FunctionName: aws.String(d.Get("function_name").(string)), FunctionVersion: aws.String(d.Get("function_version").(string)), Name: aws.String(d.Get("name").(string)), + RoutingConfig: &lambda.AliasRoutingConfiguration{}, } if v, ok := d.GetOk("routing_config"); ok { @@ -178,10 +177,7 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro if additionalVersionWeights, ok := routingConfig["additional_version_weights"]; ok { weights := readAdditionalVersionWeights(additionalVersionWeights.(map[string]interface{})) - - params.RoutingConfig = &lambda.AliasRoutingConfiguration{ - AdditionalVersionWeights: aws.Float64Map(weights), - } + params.RoutingConfig.AdditionalVersionWeights = aws.Float64Map(weights) } } diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index 7e1c02e4755..0447f754f77 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -28,7 +28,35 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { CheckDestroy: testAccCheckAwsLambdaAliasDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), + Config: testAccAwsLambdaAliasConfigWithoutRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), + ), + }, + }, + }) +} + +func TestAccAWSLambdaAlias_routingConfig(t *testing.T) { + var conf lambda.AliasConfiguration + + rString := acctest.RandString(8) + roleName := fmt.Sprintf("tf_acc_role_lambda_alias_basic_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_alias_basic_%s", rString) + attachmentName := fmt.Sprintf("tf_acc_attachment_%s", rString) + funcName := fmt.Sprintf("tf_acc_lambda_func_alias_basic_%s", rString) + aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsLambdaAliasDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAwsLambdaAliasConfigWithoutRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), testAccCheckAwsLambdaAttributes(&conf), @@ -41,7 +69,17 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), testAccCheckAwsLambdaAttributes(&conf), - testAccCheckAwsLambdaAliasRoutingConfig(&conf), + testAccCheckAwsLambdaAliasRoutingConfigExists(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), + ), + }, + resource.TestStep{ + Config: testAccAwsLambdaAliasConfigWithoutRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasRoutingConfigDoesNotExist(&conf), resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), ), @@ -114,7 +152,7 @@ func testAccCheckAwsLambdaAttributes(mapping *lambda.AliasConfiguration) resourc } } -func testAccCheckAwsLambdaAliasRoutingConfig(mapping *lambda.AliasConfiguration) resource.TestCheckFunc { +func testAccCheckAwsLambdaAliasRoutingConfigExists(mapping *lambda.AliasConfiguration) resource.TestCheckFunc { return func(s *terraform.State) error { routingConfig := mapping.RoutingConfig @@ -128,7 +166,18 @@ func testAccCheckAwsLambdaAliasRoutingConfig(mapping *lambda.AliasConfiguration) } } -func testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName string) string { +func testAccCheckAwsLambdaAliasRoutingConfigDoesNotExist(mapping *lambda.AliasConfiguration) resource.TestCheckFunc { + return func(s *terraform.State) error { + routingConfig := mapping.RoutingConfig + + if routingConfig != nil { + return fmt.Errorf("Lambda alias routing config still exists after removal") + } + return nil + } +} + +func testAccAwsLambdaAliasConfigWithoutRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName string) string { return fmt.Sprintf(` resource "aws_iam_role" "iam_for_lambda" { name = "%s" From 93933d4b402bf1c2b1c3ba0b1d9deb41abd6708b Mon Sep 17 00:00:00 2001 From: dennisatspaceape Date: Tue, 13 Feb 2018 18:54:33 +0000 Subject: [PATCH 0054/3316] Fixed ExtendedS3Updates test case --- ...urce_aws_kinesis_firehose_delivery_stream_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index e4b8534d336..4e397b6932e 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -964,11 +964,7 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { }] }] }], - s3_backup_mode = "Disabled", - s3_backup_configuration { - role_arn = "${aws_iam_role.firehose.arn}" - bucket_arn = "${aws_s3_bucket.bucket.arn}" - } + s3_backup_mode = "Disabled" } } ` @@ -1064,8 +1060,12 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { }] buffer_size = 10 buffer_interval = 400 - compression_format = "GZIP", + compression_format = "GZIP" s3_backup_mode = "Enabled" + s3_backup_configuration { + role_arn = "${aws_iam_role.firehose.arn}" + bucket_arn = "${aws_s3_bucket.bucket.arn}" + } } } ` From c88866b7a741d049423e6400cb97aaa305620d38 Mon Sep 17 00:00:00 2001 From: Craig Genner Date: Sat, 17 Feb 2018 12:40:21 +0000 Subject: [PATCH 0055/3316] documentation for acm alternative domain dns validation --- .../acm_certificate_validation.html.markdown | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/website/docs/r/acm_certificate_validation.html.markdown b/website/docs/r/acm_certificate_validation.html.markdown index 9278da40655..fcb7107a1f4 100644 --- a/website/docs/r/acm_certificate_validation.html.markdown +++ b/website/docs/r/acm_certificate_validation.html.markdown @@ -52,6 +52,64 @@ resource "aws_lb_listener" "front_end" { } ``` +### Alternative Domains DNS Validation with Route 53 + +```hcl +resource "aws_acm_certificate" "cert" { + domain_name = "example.com" + subject_alternative_names = ["www.example.com","example.org"] + validation_method = "DNS" +} + +data "aws_route53_zone" "zone" { + name = "example.com." + private_zone = false +} + +data "aws_route53_zone" "zone_alt" { + name = "example.org." + private_zone = false +} + +resource "aws_route53_record" "cert_validation" { + name = "${aws_acm_certificate.cert.domain_validation_options.0.resource_record_name}" + type = "${aws_acm_certificate.cert.domain_validation_options.0.resource_record_type}" + zone_id = "${data.aws_route53_zone.zone.id}" + records = ["${aws_acm_certificate.cert.domain_validation_options.0.resource_record_value}"] + ttl = 60 +} + +resource "aws_route53_record" "cert_validation_alt1" { + name = "${aws_acm_certificate.cert.domain_validation_options.1.resource_record_name}" + type = "${aws_acm_certificate.cert.domain_validation_options.1.resource_record_type}" + zone_id = "${data.aws_route53_zone.zone.id}" + records = ["${aws_acm_certificate.cert.domain_validation_options.1.resource_record_value}"] + ttl = 60 +} + +resource "aws_route53_record" "cert_validation_alt2" { + name = "${aws_acm_certificate.cert.domain_validation_options.2.resource_record_name}" + type = "${aws_acm_certificate.cert.domain_validation_options.2.resource_record_type}" + zone_id = "${data.aws_route53_zone.zone_alt.id}" + records = ["${aws_acm_certificate.cert.domain_validation_options.2.resource_record_value}"] + ttl = 60 +} + +resource "aws_acm_certificate_validation" "cert" { + certificate_arn = "${aws_acm_certificate.cert.arn}" + validation_record_fqdns = [ + "${aws_route53_record.cert_validation.fqdn}", + "${aws_route53_record.cert_validation_alt1.fqdn}", + "${aws_route53_record.cert_validation_alt2.fqdn}" + ] +} + +resource "aws_lb_listener" "front_end" { + # [...] + certificate_arn = "${aws_acm_certificate_validation.cert.certificate_arn}" +} +``` + ### Email Validation In this situation, the resource is simply a waiter for manual email approval of ACM certificates. From ef884bdd8cd0e21f4d4e0420bf0b73227bb046ef Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 18 Feb 2018 11:36:35 +0100 Subject: [PATCH 0056/3316] Fixed invalid nested type definitions --- aws/data_source_aws_ecs_container_definition.go | 4 ++-- aws/data_source_aws_vpc_peering_connection.go | 4 ++-- aws/resource_aws_api_gateway_deployment.go | 2 +- aws/resource_aws_api_gateway_gateway_response.go | 4 ++-- aws/resource_aws_api_gateway_integration.go | 4 ++-- aws/resource_aws_api_gateway_integration_response.go | 4 ++-- aws/resource_aws_api_gateway_method.go | 4 ++-- aws/resource_aws_api_gateway_method_response.go | 4 ++-- aws/resource_aws_batch_job_definition.go | 2 +- aws/resource_aws_glue_catalog_database.go | 2 +- aws/resource_aws_lambda_function.go | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/aws/data_source_aws_ecs_container_definition.go b/aws/data_source_aws_ecs_container_definition.go index 9bb99cdaeda..914d582649a 100644 --- a/aws/data_source_aws_ecs_container_definition.go +++ b/aws/data_source_aws_ecs_container_definition.go @@ -53,12 +53,12 @@ func dataSourceAwsEcsContainerDefinition() *schema.Resource { "docker_labels": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "environment": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, } diff --git a/aws/data_source_aws_vpc_peering_connection.go b/aws/data_source_aws_vpc_peering_connection.go index a78e35f03e7..cf4dbf54d3c 100644 --- a/aws/data_source_aws_vpc_peering_connection.go +++ b/aws/data_source_aws_vpc_peering_connection.go @@ -67,12 +67,12 @@ func dataSourceAwsVpcPeeringConnection() *schema.Resource { "accepter": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, }, "requester": { Type: schema.TypeMap, Computed: true, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, }, "filter": ec2CustomFiltersSchema(), "tags": tagsSchemaComputed(), diff --git a/aws/resource_aws_api_gateway_deployment.go b/aws/resource_aws_api_gateway_deployment.go index 4e291b780e8..aef612a6ed6 100644 --- a/aws/resource_aws_api_gateway_deployment.go +++ b/aws/resource_aws_api_gateway_deployment.go @@ -47,7 +47,7 @@ func resourceAwsApiGatewayDeployment() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "created_date": { diff --git a/aws/resource_aws_api_gateway_gateway_response.go b/aws/resource_aws_api_gateway_gateway_response.go index 105d1227f24..bf9639960d1 100644 --- a/aws/resource_aws_api_gateway_gateway_response.go +++ b/aws/resource_aws_api_gateway_gateway_response.go @@ -39,13 +39,13 @@ func resourceAwsApiGatewayGatewayResponse() *schema.Resource { "response_templates": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, "response_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, }, diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 64622c319e0..6eb4f45885a 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -69,12 +69,12 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { "request_templates": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "request_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, ConflictsWith: []string{"request_parameters_in_json"}, }, diff --git a/aws/resource_aws_api_gateway_integration_response.go b/aws/resource_aws_api_gateway_integration_response.go index 88cf85176bb..a37e37209a7 100644 --- a/aws/resource_aws_api_gateway_integration_response.go +++ b/aws/resource_aws_api_gateway_integration_response.go @@ -53,12 +53,12 @@ func resourceAwsApiGatewayIntegrationResponse() *schema.Resource { "response_templates": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "response_parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, ConflictsWith: []string{"response_parameters_in_json"}, }, diff --git a/aws/resource_aws_api_gateway_method.go b/aws/resource_aws_api_gateway_method.go index fdbc451098a..d39e3e62f12 100644 --- a/aws/resource_aws_api_gateway_method.go +++ b/aws/resource_aws_api_gateway_method.go @@ -60,12 +60,12 @@ func resourceAwsApiGatewayMethod() *schema.Resource { "request_models": &schema.Schema{ Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "request_parameters": &schema.Schema{ Type: schema.TypeMap, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, Optional: true, ConflictsWith: []string{"request_parameters_in_json"}, }, diff --git a/aws/resource_aws_api_gateway_method_response.go b/aws/resource_aws_api_gateway_method_response.go index caedc77d3d8..7bb250e4768 100644 --- a/aws/resource_aws_api_gateway_method_response.go +++ b/aws/resource_aws_api_gateway_method_response.go @@ -52,12 +52,12 @@ func resourceAwsApiGatewayMethodResponse() *schema.Resource { "response_models": &schema.Schema{ Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "response_parameters": &schema.Schema{ Type: schema.TypeMap, - Elem: schema.TypeBool, + Elem: &schema.Schema{Type: schema.TypeBool}, Optional: true, ConflictsWith: []string{"response_parameters_in_json"}, }, diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index 1bef71db799..d82c9d2e38b 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -40,7 +40,7 @@ func resourceAwsBatchJobDefinition() *schema.Resource { Type: schema.TypeMap, Optional: true, ForceNew: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, "retry_strategy": { Type: schema.TypeList, diff --git a/aws/resource_aws_glue_catalog_database.go b/aws/resource_aws_glue_catalog_database.go index 1f040be1b61..9fde86994c1 100644 --- a/aws/resource_aws_glue_catalog_database.go +++ b/aws/resource_aws_glue_catalog_database.go @@ -44,7 +44,7 @@ func resourceAwsGlueCatalogDatabase() *schema.Resource { }, "parameters": { Type: schema.TypeMap, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, Optional: true, }, }, diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index 9d73e192b5a..0ac95d1fe71 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -170,7 +170,7 @@ func resourceAwsLambdaFunction() *schema.Resource { "variables": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, From b2db7591ddc7e6d6f7cd4c58d612e0d0d4f3338c Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Wed, 21 Feb 2018 01:39:57 +0900 Subject: [PATCH 0057/3316] Fix update --- aws/resource_aws_cognito_user_pool.go | 70 ++++---- aws/resource_aws_cognito_user_pool_test.go | 185 ++++++++++++++++++++- 2 files changed, 223 insertions(+), 32 deletions(-) diff --git a/aws/resource_aws_cognito_user_pool.go b/aws/resource_aws_cognito_user_pool.go index 5f24243e401..7c570610d56 100644 --- a/aws/resource_aws_cognito_user_pool.go +++ b/aws/resource_aws_cognito_user_pool.go @@ -688,8 +688,9 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) UserPoolId: aws.String(d.Id()), } - if d.HasChange("admin_create_user_config") { - configs := d.Get("admin_create_user_config").([]interface{}) + //if d.HasChange + if v, ok := d.GetOk("admin_create_user_config"); ok { + configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) if ok && config != nil { @@ -697,18 +698,22 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - if d.HasChange("auto_verified_attributes") { - params.AutoVerifiedAttributes = expandStringList(d.Get("auto_verified_attributes").(*schema.Set).List()) + //if d.HasChange("auto_verified_attributes") { + if v, ok := d.GetOk("auto_verified_attributes"); ok { + params.AutoVerifiedAttributes = expandStringList(v.(*schema.Set).List()) } + //} - if d.HasChange("device_configuration") { - configs := d.Get("device_configuration").([]interface{}) + //if d.HasChange("device_configuration") { + if v, ok := d.GetOk("device_configuration"); ok { + configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) if ok && config != nil { params.DeviceConfiguration = expandCognitoUserPoolDeviceConfiguration(config) } } + //} if v, ok := d.GetOk("email_configuration"); ok { configs := v.([]interface{}) @@ -729,25 +734,26 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - if d.HasChange("email_verification_subject") { - v := d.Get("email_verification_subject").(string) + //if d.HasChange("email_verification_subject") { + if v, ok := d.GetOk("email_verification_subject"); ok { // This is to prevent removing default message since the API disallows it - if v == "" { + if v.(string) == "" { return errors.New("email_verification_subject cannot be set to nil") } - params.EmailVerificationSubject = aws.String(v) + params.EmailVerificationSubject = aws.String(v.(string)) } + //} - if d.HasChange("email_verification_message") { - v := d.Get("email_verification_message").(string) - + //if d.HasChange("email_verification_message") { + if v, ok := d.GetOk("email_verification_message"); ok { // This is to prevent removing default message since the API disallows it - if v == "" { + if v.(string) == "" { return errors.New("email_verification_message cannot be set to nil") } - params.EmailVerificationMessage = aws.String(v) + params.EmailVerificationMessage = aws.String(v.(string)) } + //} if v, ok := d.GetOk("lambda_config"); ok { configs := v.([]interface{}) @@ -758,9 +764,11 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - if d.HasChange("mfa_configuration") { - params.MfaConfiguration = aws.String(d.Get("mfa_configuration").(string)) + //if d.HasChange("mfa_configuration") { + if v, ok := d.GetOk("mfa_configuration"); ok { + params.MfaConfiguration = aws.String(v.(string)) } + //} if v, ok := d.GetOk("password_policy"); ok { configs := v.([]interface{}) @@ -773,37 +781,43 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - if d.HasChange("sms_authentication_message") { - params.SmsAuthenticationMessage = aws.String(d.Get("sms_authentication_message").(string)) + //if d.HasChange("sms_authentication_message") { + if v, ok := d.GetOk("sms_authentication_message"); ok { + params.SmsAuthenticationMessage = aws.String(v.(string)) } + //} - if d.HasChange("sms_configuration") { - configs := d.Get("sms_configuration").([]interface{}) + //if d.HasChange("sms_configuration") { + if v, ok := d.GetOk("sms_configuration"); ok { + configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) if ok && config != nil { params.SmsConfiguration = expandCognitoUserPoolSmsConfiguration(config) } } + //} - if d.HasChange("verification_message_template") { - configs := d.Get("verification_message_template").([]interface{}) + //if d.HasChange("verification_message_template") { + if v, ok := d.GetOk("verification_message_template"); ok { + configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) if ok && config != nil { params.VerificationMessageTemplate = expandCognitoUserPoolVerificationMessageTemplate(config) } } + //} - if d.HasChange("sms_verification_message") { - v := d.Get("sms_verification_message").(string) - + //if d.HasChange("sms_verification_message") { + if v, ok := d.GetOk("sms_verification_message"); ok { // This is to prevent removing default message since the API disallows it - if v == "" { + if v.(string) == "" { return errors.New("sms_verification_message cannot be set to nil") } - params.SmsVerificationMessage = aws.String(v) + params.SmsVerificationMessage = aws.String(v.(string)) } + //} if v, ok := d.GetOk("tags"); ok { params.UserPoolTags = tagsFromMapGeneric(v.(map[string]interface{})) diff --git a/aws/resource_aws_cognito_user_pool_test.go b/aws/resource_aws_cognito_user_pool_test.go index 825bbac6fb0..204e7da41cd 100644 --- a/aws/resource_aws_cognito_user_pool_test.go +++ b/aws/resource_aws_cognito_user_pool_test.go @@ -463,6 +463,94 @@ func TestAccAWSCognitoUserPool_withVerificationMessageTemplate(t *testing.T) { }) } +func TestAccAWSCognitoUserPool_update(t *testing.T) { + name := acctest.RandString(5) + optionalMfa := "OPTIONAL" + offMfa := "OFF" + authenticationMessage := fmt.Sprintf("%s {####}", acctest.RandString(10)) + updatedAuthenticationMessage := fmt.Sprintf("%s {####}", acctest.RandString(10)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCognitoUserPoolConfig_update(name, optionalMfa, authenticationMessage), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserPoolExists("aws_cognito_user_pool.pool"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "auto_verified_attributes.#", "1"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "mfa_configuration", optionalMfa), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "email_verification_message", "Foo {####} Bar"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "email_verification_subject", "FooBar {####}"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_verification_message", "{####} Baz"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_authentication_message", authenticationMessage), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.unused_account_validity_days", "6"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.allow_admin_create_user_only", "true"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.email_message", "Your username is {username} and temporary password is {####}. "), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.email_subject", "FooBar {####}"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.sms_message", "Your username is {username} and temporary password is {####}."), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "device_configuration.0.challenge_required_on_new_device", "true"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "device_configuration.0.device_only_remembered_on_user_prompt", "false"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "verification_message_template.0.default_email_option", "CONFIRM_WITH_CODE"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_configuration.#", "1"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.pool", "sms_configuration.0.external_id"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.pool", "sms_configuration.0.sns_caller_arn"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "tags.Name", "Foo"), + ), + }, + { + Config: testAccAWSCognitoUserPoolConfig_update(name, optionalMfa, updatedAuthenticationMessage), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserPoolExists("aws_cognito_user_pool.pool"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "auto_verified_attributes.#", "1"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "mfa_configuration", optionalMfa), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "email_verification_message", "Foo {####} Bar"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "email_verification_subject", "FooBar {####}"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_verification_message", "{####} Baz"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_authentication_message", updatedAuthenticationMessage), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.unused_account_validity_days", "6"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.allow_admin_create_user_only", "true"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.email_message", "Your username is {username} and temporary password is {####}. "), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.email_subject", "FooBar {####}"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.sms_message", "Your username is {username} and temporary password is {####}."), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "device_configuration.0.challenge_required_on_new_device", "true"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "device_configuration.0.device_only_remembered_on_user_prompt", "false"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "verification_message_template.0.default_email_option", "CONFIRM_WITH_CODE"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_configuration.#", "1"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.pool", "sms_configuration.0.external_id"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.pool", "sms_configuration.0.sns_caller_arn"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "tags.Name", "Foo"), + ), + }, + { + Config: testAccAWSCognitoUserPoolConfig_update(name, offMfa, updatedAuthenticationMessage), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserPoolExists("aws_cognito_user_pool.pool"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "auto_verified_attributes.#", "1"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "mfa_configuration", offMfa), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "email_verification_message", "Foo {####} Bar"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "email_verification_subject", "FooBar {####}"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_verification_message", "{####} Baz"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_authentication_message", updatedAuthenticationMessage), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.unused_account_validity_days", "6"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.allow_admin_create_user_only", "true"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.email_message", "Your username is {username} and temporary password is {####}. "), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.email_subject", "FooBar {####}"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "admin_create_user_config.0.invite_message_template.0.sms_message", "Your username is {username} and temporary password is {####}."), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "device_configuration.0.challenge_required_on_new_device", "true"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "device_configuration.0.device_only_remembered_on_user_prompt", "false"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "verification_message_template.0.default_email_option", "CONFIRM_WITH_CODE"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "sms_configuration.#", "1"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.pool", "sms_configuration.0.external_id"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.pool", "sms_configuration.0.sns_caller_arn"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "tags.Name", "Foo"), + ), + }, + }, + }) +} + func testAccCheckAWSCognitoUserPoolDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).cognitoidpconn @@ -563,7 +651,6 @@ func testAccAWSCognitoUserPoolConfig_withDeviceConfiguration(name string) string resource "aws_cognito_user_pool" "pool" { name = "terraform-test-pool-%s" - device_configuration { challenge_required_on_new_device = true device_only_remembered_on_user_prompt = false @@ -576,7 +663,6 @@ func testAccAWSCognitoUserPoolConfig_withDeviceConfigurationUpdated(name string) resource "aws_cognito_user_pool" "pool" { name = "terraform-test-pool-%s" - device_configuration { challenge_required_on_new_device = false device_only_remembered_on_user_prompt = true @@ -588,7 +674,6 @@ func testAccAWSCognitoUserPoolConfig_withEmailVerificationMessage(name, subject, return fmt.Sprintf(` resource "aws_cognito_user_pool" "pool" { name = "terraform-test-pool-%s" - email_verification_subject = "%s" email_verification_message = "%s" @@ -602,7 +687,6 @@ func testAccAWSCognitoUserPoolConfig_withSmsVerificationMessage(name, authentica return fmt.Sprintf(` resource "aws_cognito_user_pool" "pool" { name = "terraform-test-pool-%s" - sms_authentication_message = "%s" sms_verification_message = "%s" }`, name, authenticationMessage, verificationMessage) @@ -952,3 +1036,96 @@ resource "aws_cognito_user_pool" "pool" { } }`, name) } + +func testAccAWSCognitoUserPoolConfig_update(name string, mfaconfig, smsAuthMsg string) string { + return fmt.Sprintf(` +data "aws_caller_identity" "current" {} + +resource "aws_iam_role" "main" { + name = "test-role-%s" + path = "/service-role/" + + assume_role_policy = < Date: Wed, 21 Feb 2018 13:29:39 -0700 Subject: [PATCH 0058/3316] Update docs to reflect API behavior The documentation stated that `delete_on_termination` field for each `network_interface` could be set to `true` or `false`. However the behavior of the API does not allow this, specifically the API will respond with an error if `delete_on_termination` is set to true with a `network_interface_id` being specified: Currently it is documented that `network_interface_id` is a required field, which implies that there is no way to successfully apply with `delete_on_termination` set to true. Therefore the line of documentation for `delete_on_termination` is not valid. --- website/docs/r/instance.html.markdown | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index 2a691b0ea46..f367ac769f4 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -173,7 +173,6 @@ Each `network_interface` block supports the following: * `device_index` - (Required) The integer index of the network interface attachment. Limited by instance type. * `network_interface_id` - (Required) The ID of the network interface to attach. -* `delete_on_termination` - (Optional) Whether or not to delete the network interface on instance termination. Defaults to `false`. ### Example From 0caccdd6c5b6229923eb194a719104279a9ac825 Mon Sep 17 00:00:00 2001 From: Nathaniel Schweinberg Date: Wed, 21 Feb 2018 12:48:30 -0800 Subject: [PATCH 0059/3316] add acceptance test to verify scale in and scale out works on aws_appautoscaling_policy --- ...resource_aws_appautoscaling_policy_test.go | 161 +++++++++++++++++- 1 file changed, 160 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_appautoscaling_policy_test.go b/aws/resource_aws_appautoscaling_policy_test.go index 8400ced6eb4..0115cf4bb43 100644 --- a/aws/resource_aws_appautoscaling_policy_test.go +++ b/aws/resource_aws_appautoscaling_policy_test.go @@ -74,6 +74,62 @@ func TestAccAWSAppautoScalingPolicy_nestedSchema(t *testing.T) { }) } +func TestAccAWSAppautoScalingPolicy_scaleOutAndIn(t *testing.T) { + var policy applicationautoscaling.ScalingPolicy + + randClusterName := fmt.Sprintf("cluster%s", acctest.RandString(10)) + randPolicyNamePrefix := fmt.Sprintf("terraform-test-foobar-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSAppautoscalingPolicyScaleOutAndInConfig(randClusterName, randPolicyNamePrefix), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAppautoscalingPolicyExists("aws_appautoscaling_policy.foobar_out", &policy), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.adjustment_type", "PercentChangeInCapacity"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.cooldown", "60"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.#", "3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.scaling_adjustment", "3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_lower_bound", "3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_upper_bound", ""), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990028.scaling_adjustment", "2"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_upper_bound", "3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_lower_bound", "1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.scaling_adjustment", "1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_upper_bound", "1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_lower_bound", ""), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "name", fmt.Sprintf("%s-out", randPolicyNamePrefix)), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "policy_type", "StepScaling"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "resource_id", fmt.Sprintf("service/%s/foobar", randClusterName)), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "service_namespace", "ecs"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "scalable_dimension", "ecs:service:DesiredCount"), + testAccCheckAWSAppautoscalingPolicyExists("aws_appautoscaling_policy.foobar_in", &policy), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.adjustment_type", "PercentChangeInCapacity"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.cooldown", "60"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.#", "3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.scaling_adjustment", "-1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_lower_bound", "-1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_upper_bound", ""), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990028.scaling_adjustment", "-2"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_upper_bound", "-1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_lower_bound", "-3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990029.scaling_adjustment", "-3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_upper_bound", "-3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_lower_bound", ""), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "name", fmt.Sprintf("%s-in", randPolicyNamePrefix)), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "policy_type", "StepScaling"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "resource_id", fmt.Sprintf("service/%s/foobar", randClusterName)), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "service_namespace", "ecs"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "scalable_dimension", "ecs:service:DesiredCount"), + ), + }, + }, + }) +} + func TestAccAWSAppautoScalingPolicy_spotFleetRequest(t *testing.T) { var policy applicationautoscaling.ScalingPolicy @@ -451,7 +507,7 @@ resource "aws_appautoscaling_policy" "dynamo_test" { predefined_metric_specification { predefined_metric_type = "DynamoDBWriteCapacityUtilization" } - + scale_in_cooldown = 10 scale_out_cooldown = 10 target_value = 70 @@ -604,3 +660,106 @@ resource "aws_appautoscaling_policy" "read" { } `, tableName, namePrefix, namePrefix) } + +func testAccAWSAppautoscalingPolicyScaleOutAndInConfig( + randClusterName string, + randPolicyNamePrefix string) string { + return fmt.Sprintf(` +resource "aws_ecs_cluster" "foo" { + name = "%s" +} + +resource "aws_ecs_task_definition" "task" { + family = "foobar" + container_definitions = < Date: Wed, 21 Feb 2018 12:49:18 -0800 Subject: [PATCH 0060/3316] revert directly supporting floats in aws_appautoscaling_policy to allow scaling in with multiple steps. should fix https://github.com/terraform-providers/terraform-provider-aws/issues/2063 --- aws/resource_aws_appautoscaling_policy.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_appautoscaling_policy.go b/aws/resource_aws_appautoscaling_policy.go index e56c09760e2..d41ad60f2eb 100644 --- a/aws/resource_aws_appautoscaling_policy.go +++ b/aws/resource_aws_appautoscaling_policy.go @@ -85,14 +85,12 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "metric_interval_lower_bound": &schema.Schema{ - Type: schema.TypeFloat, + Type: schema.TypeString, Optional: true, - Default: -1, }, "metric_interval_upper_bound": &schema.Schema{ - Type: schema.TypeFloat, + Type: schema.TypeString, Optional: true, - Default: -1, }, "scaling_adjustment": &schema.Schema{ Type: schema.TypeInt, @@ -371,10 +369,6 @@ func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicati if data["metric_interval_lower_bound"] != "" { bound := data["metric_interval_lower_bound"] switch bound := bound.(type) { - case float64: - if bound >= 0 { - a.MetricIntervalLowerBound = aws.Float64(bound) - } case string: f, err := strconv.ParseFloat(bound, 64) if err != nil { @@ -390,10 +384,6 @@ func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicati if data["metric_interval_upper_bound"] != "" { bound := data["metric_interval_upper_bound"] switch bound := bound.(type) { - case float64: - if bound >= 0 { - a.MetricIntervalUpperBound = aws.Float64(bound) - } case string: f, err := strconv.ParseFloat(bound, 64) if err != nil { From 490ff2c3132d56666da2fbafdddc48f0886b8153 Mon Sep 17 00:00:00 2001 From: Nathaniel Schweinberg Date: Wed, 21 Feb 2018 14:56:02 -0800 Subject: [PATCH 0061/3316] add 0 upper and lower bounds to appautoscaling policy config tests --- aws/resource_aws_appautoscaling_policy_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/resource_aws_appautoscaling_policy_test.go b/aws/resource_aws_appautoscaling_policy_test.go index 0115cf4bb43..a5a9517eb7e 100644 --- a/aws/resource_aws_appautoscaling_policy_test.go +++ b/aws/resource_aws_appautoscaling_policy_test.go @@ -725,6 +725,7 @@ resource "aws_appautoscaling_policy" "foobar_out" { step_adjustment { metric_interval_upper_bound = 1 + metric_interval_lower_bound = 0 scaling_adjustment = 1 } @@ -744,6 +745,7 @@ resource "aws_appautoscaling_policy" "foobar_in" { metric_aggregation_type = "Average" step_adjustment { + metric_interval_upper_bound = 0 metric_interval_lower_bound = -1 scaling_adjustment = -1 } From e25722218c9ffc93cc7d868d2472f3c6c754678d Mon Sep 17 00:00:00 2001 From: Nathaniel Schweinberg Date: Wed, 21 Feb 2018 14:56:26 -0800 Subject: [PATCH 0062/3316] reorganize appautoscaling policy test ressource attribute check order --- aws/resource_aws_appautoscaling_policy_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_appautoscaling_policy_test.go b/aws/resource_aws_appautoscaling_policy_test.go index a5a9517eb7e..16017a20ba0 100644 --- a/aws/resource_aws_appautoscaling_policy_test.go +++ b/aws/resource_aws_appautoscaling_policy_test.go @@ -92,15 +92,15 @@ func TestAccAWSAppautoScalingPolicy_scaleOutAndIn(t *testing.T) { resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.adjustment_type", "PercentChangeInCapacity"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.cooldown", "60"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.#", "3"), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.scaling_adjustment", "3"), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_lower_bound", "3"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_upper_bound", ""), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990028.scaling_adjustment", "2"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_lower_bound", "3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990027.scaling_adjustment", "3"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_upper_bound", "3"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_lower_bound", "1"), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.scaling_adjustment", "1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990028.scaling_adjustment", "2"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_upper_bound", "1"), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_lower_bound", ""), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_lower_bound", "0"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "step_scaling_policy_configuration.0.step_adjustment.2252990029.scaling_adjustment", "1"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "name", fmt.Sprintf("%s-out", randPolicyNamePrefix)), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "policy_type", "StepScaling"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_out", "resource_id", fmt.Sprintf("service/%s/foobar", randClusterName)), @@ -110,15 +110,15 @@ func TestAccAWSAppautoScalingPolicy_scaleOutAndIn(t *testing.T) { resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.adjustment_type", "PercentChangeInCapacity"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.cooldown", "60"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.#", "3"), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.scaling_adjustment", "-1"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_upper_bound", "0"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_lower_bound", "-1"), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.metric_interval_upper_bound", ""), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990028.scaling_adjustment", "-2"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990027.scaling_adjustment", "-1"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_upper_bound", "-1"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990028.metric_interval_lower_bound", "-3"), - resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990029.scaling_adjustment", "-3"), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990028.scaling_adjustment", "-2"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_upper_bound", "-3"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990029.metric_interval_lower_bound", ""), + resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "step_scaling_policy_configuration.0.step_adjustment.2252990029.scaling_adjustment", "-3"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "name", fmt.Sprintf("%s-in", randPolicyNamePrefix)), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "policy_type", "StepScaling"), resource.TestCheckResourceAttr("aws_appautoscaling_policy.foobar_in", "resource_id", fmt.Sprintf("service/%s/foobar", randClusterName)), From bda7048da638113929495dacb57521f60503e0f0 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Thu, 22 Feb 2018 18:24:01 +0900 Subject: [PATCH 0063/3316] Delete comment --- aws/resource_aws_cognito_user_pool.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/aws/resource_aws_cognito_user_pool.go b/aws/resource_aws_cognito_user_pool.go index 7c570610d56..0c4b4e4d55f 100644 --- a/aws/resource_aws_cognito_user_pool.go +++ b/aws/resource_aws_cognito_user_pool.go @@ -688,7 +688,6 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) UserPoolId: aws.String(d.Id()), } - //if d.HasChange if v, ok := d.GetOk("admin_create_user_config"); ok { configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) @@ -698,13 +697,10 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - //if d.HasChange("auto_verified_attributes") { if v, ok := d.GetOk("auto_verified_attributes"); ok { params.AutoVerifiedAttributes = expandStringList(v.(*schema.Set).List()) } - //} - //if d.HasChange("device_configuration") { if v, ok := d.GetOk("device_configuration"); ok { configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) @@ -713,7 +709,6 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) params.DeviceConfiguration = expandCognitoUserPoolDeviceConfiguration(config) } } - //} if v, ok := d.GetOk("email_configuration"); ok { configs := v.([]interface{}) @@ -734,7 +729,6 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - //if d.HasChange("email_verification_subject") { if v, ok := d.GetOk("email_verification_subject"); ok { // This is to prevent removing default message since the API disallows it @@ -743,9 +737,7 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } params.EmailVerificationSubject = aws.String(v.(string)) } - //} - //if d.HasChange("email_verification_message") { if v, ok := d.GetOk("email_verification_message"); ok { // This is to prevent removing default message since the API disallows it if v.(string) == "" { @@ -753,7 +745,6 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } params.EmailVerificationMessage = aws.String(v.(string)) } - //} if v, ok := d.GetOk("lambda_config"); ok { configs := v.([]interface{}) @@ -764,11 +755,9 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - //if d.HasChange("mfa_configuration") { if v, ok := d.GetOk("mfa_configuration"); ok { params.MfaConfiguration = aws.String(v.(string)) } - //} if v, ok := d.GetOk("password_policy"); ok { configs := v.([]interface{}) @@ -781,13 +770,10 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } } - //if d.HasChange("sms_authentication_message") { if v, ok := d.GetOk("sms_authentication_message"); ok { params.SmsAuthenticationMessage = aws.String(v.(string)) } - //} - //if d.HasChange("sms_configuration") { if v, ok := d.GetOk("sms_configuration"); ok { configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) @@ -796,9 +782,7 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) params.SmsConfiguration = expandCognitoUserPoolSmsConfiguration(config) } } - //} - //if d.HasChange("verification_message_template") { if v, ok := d.GetOk("verification_message_template"); ok { configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) @@ -807,9 +791,7 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) params.VerificationMessageTemplate = expandCognitoUserPoolVerificationMessageTemplate(config) } } - //} - //if d.HasChange("sms_verification_message") { if v, ok := d.GetOk("sms_verification_message"); ok { // This is to prevent removing default message since the API disallows it if v.(string) == "" { @@ -817,7 +799,6 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) } params.SmsVerificationMessage = aws.String(v.(string)) } - //} if v, ok := d.GetOk("tags"); ok { params.UserPoolTags = tagsFromMapGeneric(v.(map[string]interface{})) From f8da78bd4d643c18ae97f7253f579e45a070554a Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Thu, 22 Feb 2018 23:24:25 +0900 Subject: [PATCH 0064/3316] test, docs --- aws/resource_aws_api_gateway_stage.go | 9 ++++++++- aws/resource_aws_api_gateway_stage_test.go | 3 ++- website/docs/r/api_gateway_stage.html.markdown | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index 710e6528603..b57c3858e40 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -190,7 +190,14 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) d.Partial(true) - if tagErr := setTagsAPIGatewayStage(conn, d, "hoge"); tagErr != nil { + stageArn := arnString( + meta.(*AWSClient).partition, + meta.(*AWSClient).region, + "apigateway", + "", + fmt.Sprintf("/restapis/%s/stages/%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string)), + ) + if tagErr := setTagsAPIGatewayStage(conn, d, stageArn); tagErr != nil { return tagErr } d.SetPartial("tags") diff --git a/aws/resource_aws_api_gateway_stage_test.go b/aws/resource_aws_api_gateway_stage_test.go index f3d3f40bd37..dc3c95c6216 100644 --- a/aws/resource_aws_api_gateway_stage_test.go +++ b/aws/resource_aws_api_gateway_stage_test.go @@ -37,7 +37,7 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) { testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "stage_name", "prod"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_enabled", "false"), - resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "2"), ), }, resource.TestStep{ @@ -203,6 +203,7 @@ resource "aws_api_gateway_stage" "test" { } tags { Name = "tf-test" + ExtraName = "tf-test" } } ` diff --git a/website/docs/r/api_gateway_stage.html.markdown b/website/docs/r/api_gateway_stage.html.markdown index f32ab20d69e..3f4da3f39a6 100644 --- a/website/docs/r/api_gateway_stage.html.markdown +++ b/website/docs/r/api_gateway_stage.html.markdown @@ -76,3 +76,4 @@ The following arguments are supported: * `description` - (Optional) The description of the stage * `documentation_version` - (Optional) The version of the associated API documentation * `variables` - (Optional) A map that defines the stage variables +* `tags` - (Optional) A mapping of tags to assign to the resource. From 7999b0c0994c8bced83376dd07456a84472c77bd Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 24 Feb 2018 01:07:26 +0900 Subject: [PATCH 0065/3316] Add acctest --- aws/resource_aws_codebuild_project.go | 3 +++ aws/resource_aws_codebuild_project_test.go | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index ef49f17c052..5df8bf37fd6 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -639,6 +639,9 @@ func environmentVariablesToMap(environmentVariables []*codebuild.EnvironmentVari item := map[string]interface{}{} item["name"] = *env.Name item["value"] = *env.Value + if env.Type != nil { + item["type"] = *env.Type + } envVariables = append(envVariables, item) } } diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index e79e49a8ff2..120a02e4bc0 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -388,8 +388,9 @@ resource "aws_codebuild_project" "foo" { type = "LINUX_CONTAINER" environment_variable = { - "name" = "SOME_KEY" - "value" = "SOME_VALUE" + name = "SOME_KEY" + value = "SOME_VALUE" + type = "PLAINTEXT" } } @@ -471,8 +472,9 @@ resource "aws_codebuild_project" "foo" { type = "LINUX_CONTAINER" environment_variable = { - "name" = "SOME_OTHERKEY" - "value" = "SOME_OTHERVALUE" + name = "SOME_OTHERKEY" + value = "SOME_OTHERVALUE" + type = "PARAMETER_STORE" } } From 9926bb5a1402dbf7e2e3d7cd1876adffd215db8f Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 24 Feb 2018 01:20:26 +0900 Subject: [PATCH 0066/3316] Support import --- aws/resource_aws_appsync_graphql_api.go | 4 ++++ aws/resource_aws_appsync_graphql_api_test.go | 20 +++++++++++++++++++ .../docs/r/appsync_graphql_api.html.markdown | 8 ++++++++ 3 files changed, 32 insertions(+) diff --git a/aws/resource_aws_appsync_graphql_api.go b/aws/resource_aws_appsync_graphql_api.go index 0031c65b614..5a6b8a1e5fa 100644 --- a/aws/resource_aws_appsync_graphql_api.go +++ b/aws/resource_aws_appsync_graphql_api.go @@ -18,6 +18,10 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { Update: resourceAwsAppsyncGraphqlApiUpdate, Delete: resourceAwsAppsyncGraphqlApiDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ "authentication_type": { Type: schema.TypeString, diff --git a/aws/resource_aws_appsync_graphql_api_test.go b/aws/resource_aws_appsync_graphql_api_test.go index 6bd893786c0..f9ed7413c12 100644 --- a/aws/resource_aws_appsync_graphql_api_test.go +++ b/aws/resource_aws_appsync_graphql_api_test.go @@ -62,6 +62,26 @@ func TestAccAWSAppsyncGraphqlApi_cognito(t *testing.T) { }) } +func TestAccAWSAppsyncGraphqlApi_import(t *testing.T) { + resourceName := "aws_appsync_graphql_api.test_apikey" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAppsyncGraphqlApiConfig_apikey(acctest.RandString(5)), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAwsAppsyncGraphqlApiDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).appsyncconn for _, rs := range s.RootModule().Resources { diff --git a/website/docs/r/appsync_graphql_api.html.markdown b/website/docs/r/appsync_graphql_api.html.markdown index 6cf0918fae1..833f7a95ca6 100644 --- a/website/docs/r/appsync_graphql_api.html.markdown +++ b/website/docs/r/appsync_graphql_api.html.markdown @@ -42,3 +42,11 @@ The following attributes are exported: * `id` - API ID * `arn` - The ARN + +## Import + +AppSync GraphQL API can be imported using the GraphQL API ID, e.g. + +``` +$ terraform import aws_appsync_graphql_api.example 0123456789 +``` From 4ea9e4f6ff8bc586f6b1d641f796fc0040735524 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 24 Feb 2018 01:35:15 +0900 Subject: [PATCH 0067/3316] Support import and modify test --- aws/resource_aws_media_store_container.go | 5 ++- ...resource_aws_media_store_container_test.go | 33 ++++++++++++++++++- .../r/media_store_container.html.markdown | 8 +++++ 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_media_store_container.go b/aws/resource_aws_media_store_container.go index 7380dad1f81..201c54e0108 100644 --- a/aws/resource_aws_media_store_container.go +++ b/aws/resource_aws_media_store_container.go @@ -16,7 +16,9 @@ func resourceAwsMediaStoreContainer() *schema.Resource { Create: resourceAwsMediaStoreContainerCreate, Read: resourceAwsMediaStoreContainerRead, Delete: resourceAwsMediaStoreContainerDelete, - + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{ Type: schema.TypeString, @@ -82,6 +84,7 @@ func resourceAwsMediaStoreContainerRead(d *schema.ResourceData, meta interface{} return err } d.Set("arn", resp.Container.ARN) + d.Set("name", resp.Container.Name) d.Set("endpoint", resp.Container.Endpoint) return nil } diff --git a/aws/resource_aws_media_store_container_test.go b/aws/resource_aws_media_store_container_test.go index aa413747070..9f3af37d15f 100644 --- a/aws/resource_aws_media_store_container_test.go +++ b/aws/resource_aws_media_store_container_test.go @@ -27,6 +27,26 @@ func TestAccAWSMediaStoreContainer_basic(t *testing.T) { }) } +func TestAccAWSMediaStoreContainer_import(t *testing.T) { + resourceName := "aws_media_store_container.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMediaStoreContainerDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccMediaStoreContainerConfig(acctest.RandString(5)), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAwsMediaStoreContainerDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).mediastoreconn @@ -56,11 +76,22 @@ func testAccCheckAwsMediaStoreContainerDestroy(s *terraform.State) error { func testAccCheckAwsMediaStoreContainerExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } + conn := testAccProvider.Meta().(*AWSClient).mediastoreconn + + input := &mediastore.DescribeContainerInput{ + ContainerName: aws.String(rs.Primary.ID), + } + + _, err := conn.DescribeContainer(input) + if err != nil { + return err + } + return nil } } diff --git a/website/docs/r/media_store_container.html.markdown b/website/docs/r/media_store_container.html.markdown index 262b8e1e6b1..ad972cf4419 100644 --- a/website/docs/r/media_store_container.html.markdown +++ b/website/docs/r/media_store_container.html.markdown @@ -30,3 +30,11 @@ The following attributes are exported: * `arn` - The ARN of the container. * `endpoint` - The DNS endpoint of the container. + +## Import + +MediaStore Container can be imported using the MediaStore Container Name, e.g. + +``` +$ terraform import aws_media_store_container.example example +``` From e7a1940a8abd2e2240df1a3d9a9d9d59a4c25ade Mon Sep 17 00:00:00 2001 From: vpadronblanco Date: Fri, 23 Feb 2018 14:43:26 -0500 Subject: [PATCH 0068/3316] Commiting test --- aws/resource_aws_codebuild_project_test.go | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 4e7bb2ab99d..eb5e53e113a 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -386,6 +386,25 @@ func testAccCheckAWSCodeBuildProjectDestroy(s *terraform.State) error { return fmt.Errorf("Default error in CodeBuild Test") } +func TestAccAWSCodeBuildProject_buildBadgeUrlValidation(t *testing.T) { + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSCodebuildProjectConfig_buildBadgeUrlValidation(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.vanilla_codebuild_project"), + resource.TestMatchResourceAttr("aws_codebuild_project.vanilla_codebuild_project", "badge_url", regexp.MustCompile(`\b(https?).*\b`)), + ), + }, + }, + }) +} + func testAccAWSCodeBuildProjectConfig_basic(rName, vpcConfig, vpcResources string) string { return fmt.Sprintf(` resource "aws_iam_role" "codebuild_role" { @@ -774,3 +793,87 @@ func hclVpcConfig(subnets string) string { } `, subnets) } + +func testAccAWSCodebuildProjectConfig_buildBadgeUrlValidation(rName string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "codebuild_role" { + name = "codebuild-role-%s" + assume_role_policy = < Date: Fri, 23 Feb 2018 14:43:43 -0500 Subject: [PATCH 0069/3316] Commiting web documentation --- website/docs/r/codebuild_project.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index d9679b5d796..c94ef1a2843 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -128,6 +128,7 @@ The following arguments are supported: * `environment` - (Required) Information about the project's build environment. Environment blocks are documented below. * `source` - (Required) Information about the project's input source code. Source blocks are documented below. * `vpc_config` - (Optional) Configuration for the builds to run inside a VPC. VPC config blocks are documented below. +* `badge_enabled` - (Optional) Generates a publicly-accessible URL for the projects build badge. `artifacts` supports the following: @@ -178,3 +179,4 @@ The following attributes are exported: * `encryption_key` - The AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for encrypting the build project's build output artifacts. * `name` - The projects name. * `service_role` - The ARN of the IAM service role. +* `badge_url` - The URL of the build badge From 2e359b243d7ef887f7ca8c285450d1fda0a483a3 Mon Sep 17 00:00:00 2001 From: vpadronblanco Date: Fri, 23 Feb 2018 14:44:12 -0500 Subject: [PATCH 0070/3316] Commiting support for badge build and exporting badge_url --- aws/resource_aws_codebuild_project.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index eb6afb70b6d..fc928d4cad7 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -180,6 +180,16 @@ func resourceAwsCodeBuildProject() *schema.Resource { Default: "60", ValidateFunc: validateAwsCodeBuildTimeout, }, + "badge_enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "badge_url": { + Type: schema.TypeString, + Computed: true, + Optional: true, + }, "tags": tagsSchema(), "vpc_config": { Type: schema.TypeList, @@ -246,6 +256,10 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) params.VpcConfig = expandCodeBuildVpcConfig(v.([]interface{})) } + if v, ok := d.GetOk("badge_enabled"); ok { + params.BadgeEnabled = aws.Bool(v.(bool)) + } + if v, ok := d.GetOk("tags"); ok { params.Tags = tagsFromMapCodeBuild(v.(map[string]interface{})) } @@ -451,6 +465,7 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e d.Set("name", project.Name) d.Set("service_role", project.ServiceRole) d.Set("build_timeout", project.TimeoutInMinutes) + d.Set("badge_url", project.Badge.BadgeRequestUrl) if err := d.Set("tags", tagsToMapCodeBuild(project.Tags)); err != nil { return err @@ -501,6 +516,10 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) params.TimeoutInMinutes = aws.Int64(int64(d.Get("build_timeout").(int))) } + if d.HasChange("badge_enabled") { + params.BadgeEnabled = aws.Bool(d.Get("badge_enabled").(bool)) + } + // The documentation clearly says "The replacement set of tags for this build project." // But its a slice of pointers so if not set for every update, they get removed. params.Tags = tagsFromMapCodeBuild(d.Get("tags").(map[string]interface{})) From c6e0fd6dfad3ce873d460b8750d94c65de6edac4 Mon Sep 17 00:00:00 2001 From: vpadronblanco Date: Fri, 23 Feb 2018 15:02:08 -0500 Subject: [PATCH 0071/3316] Adding test for tags in data source --- aws/data_source_aws_eip_test.go | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/aws/data_source_aws_eip_test.go b/aws/data_source_aws_eip_test.go index d5d0c6ac708..16c0d0176f8 100644 --- a/aws/data_source_aws_eip_test.go +++ b/aws/data_source_aws_eip_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) @@ -58,6 +59,22 @@ func testAccDataSourceAwsEipCheck(name string) resource.TestCheckFunc { } } +func TestAccDataSourceAwsEip_tags(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDataSourceAwsEip_tags_config(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_eip.test", "tags.%", "2"), + ), + }, + }, + }) +} + const testAccDataSourceAwsEipConfig = ` provider "aws" { region = "us-west-2" @@ -75,3 +92,26 @@ data "aws_eip" "by_public_ip" { public_ip = "${aws_eip.test.public_ip}" } ` + +func testAccDataSourceAwsEip_tags_config(rInt int) string { + return fmt.Sprintf( + ` +provider "aws" { + region = "us-west-2" +} + +resource "aws_eip" "test" { + tags { + test_tag = "hello tag" + random_tag = "%d" + } +} + +data "aws_eip" "by_tag" { + tags { + test_tag = "${aws_eip.test.tags["test_tag"]}" + random_tag = "%d" + } +} +`, rInt) +} From 70f0923be1616666246f4d17caf27a078b895e2f Mon Sep 17 00:00:00 2001 From: vpadronblanco Date: Fri, 23 Feb 2018 15:02:31 -0500 Subject: [PATCH 0072/3316] Adding web documentation for tags in data source --- website/docs/d/eip.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/d/eip.html.markdown b/website/docs/d/eip.html.markdown index 9a6535eedb4..a4d12591368 100644 --- a/website/docs/d/eip.html.markdown +++ b/website/docs/d/eip.html.markdown @@ -42,6 +42,8 @@ Elastic IP whose data will be exported as attributes. * `public_ip` - (Optional) The public IP of the specific EIP to retrieve. +* `tags` - (Optional) A mapping of tags, each pair of which must exactly match a pair on the desired Elastic IP + ## Attributes Reference All of the argument attributes are also exported as result attributes. This From 756052cb1fc983228e77ae4a9d1ca523a662244c Mon Sep 17 00:00:00 2001 From: vpadronblanco Date: Fri, 23 Feb 2018 15:02:53 -0500 Subject: [PATCH 0073/3316] Adding support for tags in EIP data source --- aws/data_source_aws_eip.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aws/data_source_aws_eip.go b/aws/data_source_aws_eip.go index f461a374e8b..70ab4f22fe7 100644 --- a/aws/data_source_aws_eip.go +++ b/aws/data_source_aws_eip.go @@ -24,6 +24,7 @@ func dataSourceAwsEip() *schema.Resource { Optional: true, Computed: true, }, + "tags": tagsSchemaComputed(), }, } } @@ -32,6 +33,7 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn req := &ec2.DescribeAddressesInput{} + req.Filters = []*ec2.Filter{} if id, ok := d.GetOk("id"); ok { req.AllocationIds = []*string{aws.String(id.(string))} @@ -41,6 +43,12 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { req.PublicIps = []*string{aws.String(public_ip.(string))} } + if tags, ok := d.GetOk("tags"); ok { + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + log.Printf("[DEBUG] Reading EIP: %s", req) resp, err := conn.DescribeAddresses(req) if err != nil { @@ -57,6 +65,7 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { d.SetId(*eip.AllocationId) d.Set("public_ip", eip.PublicIp) + d.Set("tags", tagsToMap(eip.Tags)) return nil } From 70cd4e959e56ce078c8169a4caee9904a6a06c7c Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 24 Feb 2018 10:08:21 +0900 Subject: [PATCH 0074/3316] New Resource: media_store_container_policy --- aws/provider.go | 1 + ...source_aws_media_store_container_policy.go | 103 +++++++++++++ ...e_aws_media_store_container_policy_test.go | 144 ++++++++++++++++++ website/aws.erb | 3 + ...media_store_container_policy.html.markdown | 57 +++++++ 5 files changed, 308 insertions(+) create mode 100644 aws/resource_aws_media_store_container_policy.go create mode 100644 aws/resource_aws_media_store_container_policy_test.go create mode 100644 website/docs/r/media_store_container_policy.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 81bd9ffc877..167afb4cae9 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -433,6 +433,7 @@ func Provider() terraform.ResourceProvider { "aws_mq_broker": resourceAwsMqBroker(), "aws_mq_configuration": resourceAwsMqConfiguration(), "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), "aws_nat_gateway": resourceAwsNatGateway(), "aws_network_acl": resourceAwsNetworkAcl(), "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), diff --git a/aws/resource_aws_media_store_container_policy.go b/aws/resource_aws_media_store_container_policy.go new file mode 100644 index 00000000000..b3469fe9c2e --- /dev/null +++ b/aws/resource_aws_media_store_container_policy.go @@ -0,0 +1,103 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/mediastore" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsMediaStoreContainerPolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsMediaStoreContainerPolicyPut, + Read: resourceAwsMediaStoreContainerPolicyRead, + Update: resourceAwsMediaStoreContainerPolicyPut, + Delete: resourceAwsMediaStoreContainerPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "container_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "policy": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateIAMPolicyJson, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + }, + }, + } +} + +func resourceAwsMediaStoreContainerPolicyPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediastoreconn + + input := &mediastore.PutContainerPolicyInput{ + ContainerName: aws.String(d.Get("container_name").(string)), + Policy: aws.String(d.Get("policy").(string)), + } + + _, err := conn.PutContainerPolicy(input) + if err != nil { + return err + } + + d.SetId(d.Get("container_name").(string)) + return resourceAwsMediaStoreContainerPolicyRead(d, meta) +} + +func resourceAwsMediaStoreContainerPolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediastoreconn + + input := &mediastore.GetContainerPolicyInput{ + ContainerName: aws.String(d.Id()), + } + + resp, err := conn.GetContainerPolicy(input) + if err != nil { + if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { + log.Printf("[WARN] MediaContainer Policy %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if isAWSErr(err, mediastore.ErrCodePolicyNotFoundException, "") { + log.Printf("[WARN] MediaContainer Policy %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("container_name", d.Id()) + d.Set("policy", resp.Policy) + return nil +} + +func resourceAwsMediaStoreContainerPolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediastoreconn + + input := &mediastore.DeleteContainerPolicyInput{ + ContainerName: aws.String(d.Id()), + } + + _, err := conn.DeleteContainerPolicy(input) + if err != nil { + if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { + return nil + } + if isAWSErr(err, mediastore.ErrCodePolicyNotFoundException, "") { + return nil + } + // if isAWSErr(err, mediastore.ErrCodeContainerInUseException, "Container must be ACTIVE in order to perform this operation") { + // return nil + // } + return err + } + + return nil +} diff --git a/aws/resource_aws_media_store_container_policy_test.go b/aws/resource_aws_media_store_container_policy_test.go new file mode 100644 index 00000000000..8c8cd359ef1 --- /dev/null +++ b/aws/resource_aws_media_store_container_policy_test.go @@ -0,0 +1,144 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/mediastore" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSMediaStoreContainerPolicy_basic(t *testing.T) { + rname := acctest.RandString(5) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMediaStoreContainerPolicyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccMediaStoreContainerPolicyConfig(rname, acctest.RandString(5)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsMediaStoreContainerPolicyExists("aws_media_store_container_policy.test"), + resource.TestCheckResourceAttrSet("aws_media_store_container_policy.test", "container_name"), + resource.TestCheckResourceAttrSet("aws_media_store_container_policy.test", "policy"), + ), + }, + { + Config: testAccMediaStoreContainerPolicyConfig(rname, acctest.RandString(5)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsMediaStoreContainerPolicyExists("aws_media_store_container_policy.test"), + resource.TestCheckResourceAttrSet("aws_media_store_container_policy.test", "container_name"), + resource.TestCheckResourceAttrSet("aws_media_store_container_policy.test", "policy"), + ), + }, + }, + }) +} + +func TestAccAWSMediaStoreContainerPolicy_import(t *testing.T) { + resourceName := "aws_media_store_container_policy.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsMediaStoreContainerPolicyDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccMediaStoreContainerPolicyConfig(acctest.RandString(5), acctest.RandString(5)), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsMediaStoreContainerPolicyDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).mediastoreconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_media_store_container_policy" { + continue + } + + input := &mediastore.GetContainerPolicyInput{ + ContainerName: aws.String(rs.Primary.ID), + } + + _, err := conn.GetContainerPolicy(input) + if err != nil { + if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { + return nil + } + if isAWSErr(err, mediastore.ErrCodePolicyNotFoundException, "") { + return nil + } + if isAWSErr(err, mediastore.ErrCodeContainerInUseException, "Container must be ACTIVE in order to perform this operation") { + return nil + } + return err + } + + return fmt.Errorf("Expected MediaStore Container Policy to be destroyed, %s found", rs.Primary.ID) + } + return nil +} + +func testAccCheckAwsMediaStoreContainerPolicyExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + conn := testAccProvider.Meta().(*AWSClient).mediastoreconn + + input := &mediastore.GetContainerPolicyInput{ + ContainerName: aws.String(rs.Primary.ID), + } + + _, err := conn.GetContainerPolicy(input) + if err != nil { + return err + } + + return nil + } +} + +func testAccMediaStoreContainerPolicyConfig(rName, sid string) string { + return fmt.Sprintf(` +data "aws_region" "current" {} + +data "aws_caller_identity" "current" {} + +resource "aws_media_store_container" "test" { + name = "tf_mediastore_%s" +} + +resource "aws_media_store_container_policy" "test" { + container_name = "${aws_media_store_container.test.name}" + policy = <> aws_media_store_container + > + aws_media_store_container_policy + diff --git a/website/docs/r/media_store_container_policy.html.markdown b/website/docs/r/media_store_container_policy.html.markdown new file mode 100644 index 00000000000..0f38e6368de --- /dev/null +++ b/website/docs/r/media_store_container_policy.html.markdown @@ -0,0 +1,57 @@ +--- +layout: "aws" +page_title: "AWS: aws_media_store_container_policy" +sidebar_current: "docs-aws-resource-media-store-container-policy" +description: |- + Provides a MediaStore Container Policy. +--- + +# aws_media_store_container_policy + +Provides a MediaStore Container Policy. + +## Example Usage + +```hcl +data "aws_region" "current" {} + +data "aws_caller_identity" "current" {} + +resource "aws_media_store_container" "example" { + name = "example" +} + +resource "aws_media_store_container_policy" "example" { + container_name = "${aws_media_store_container.example.name}" + policy = < Date: Sun, 18 Jun 2017 20:58:13 -0400 Subject: [PATCH 0075/3316] Add resource to create an AWS Organizations member account. --- aws/import_aws_organizations_account_test.go | 30 +++ aws/provider.go | 1 + aws/resource_aws_organizations_account.go | 224 ++++++++++++++++++ ...resource_aws_organizations_account_test.go | 102 ++++++++ aws/resource_aws_organizations_test.go | 4 + website/aws.erb | 3 + .../r/organizations_account.html.markdown | 42 ++++ 7 files changed, 406 insertions(+) create mode 100644 aws/import_aws_organizations_account_test.go create mode 100644 aws/resource_aws_organizations_account.go create mode 100644 aws/resource_aws_organizations_account_test.go create mode 100644 website/docs/r/organizations_account.html.markdown diff --git a/aws/import_aws_organizations_account_test.go b/aws/import_aws_organizations_account_test.go new file mode 100644 index 00000000000..d1af7f5036a --- /dev/null +++ b/aws/import_aws_organizations_account_test.go @@ -0,0 +1,30 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func testAccAwsOrganizationsAccount_importBasic(t *testing.T) { + resourceName := "aws_organizations_account.test" + name := "my_new_account" + email := "foo@bar.org" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOrganizationsAccountDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOrganizationsAccountConfig(name, email), + }, + + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/aws/provider.go b/aws/provider.go index 3f328c6761b..71561459e1b 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -456,6 +456,7 @@ func Provider() terraform.ResourceProvider { "aws_opsworks_permission": resourceAwsOpsworksPermission(), "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), "aws_placement_group": resourceAwsPlacementGroup(), "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), "aws_rds_cluster": resourceAwsRDSCluster(), diff --git a/aws/resource_aws_organizations_account.go b/aws/resource_aws_organizations_account.go new file mode 100644 index 00000000000..56a98426e66 --- /dev/null +++ b/aws/resource_aws_organizations_account.go @@ -0,0 +1,224 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/organizations" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsOrganizationsAccount() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsOrganizationsAccountCreate, + Read: resourceAwsOrganizationsAccountRead, + Delete: resourceAwsOrganizationsAccountDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "joined_method": { + Type: schema.TypeString, + Computed: true, + }, + "joined_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 50), + }, + "email": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAwsOrganizationsAccountEmail, + }, + "iam_user_access_to_billing": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{organizations.IAMUserAccessToBillingAllow, organizations.IAMUserAccessToBillingDeny}, true), + }, + "role_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateAwsOrganizationsAccountRoleName, + }, + }, + } +} + +func resourceAwsOrganizationsAccountCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + // Create the account + createOpts := &organizations.CreateAccountInput{ + AccountName: aws.String(d.Get("name").(string)), + Email: aws.String(d.Get("email").(string)), + } + if role, ok := d.GetOk("role_name"); ok { + createOpts.RoleName = aws.String(role.(string)) + } + + if iam_user, ok := d.GetOk("iam_user_access_to_billing"); ok { + createOpts.IamUserAccessToBilling = aws.String(iam_user.(string)) + } + + log.Printf("[DEBUG] Account create config: %#v", createOpts) + + var err error + var resp *organizations.CreateAccountOutput + err = resource.Retry(4*time.Minute, func() *resource.RetryError { + resp, err = conn.CreateAccount(createOpts) + + if err != nil { + ec2err, ok := err.(awserr.Error) + if !ok { + return resource.NonRetryableError(err) + } + if isAWSErr(ec2err, organizations.ErrCodeFinalizingOrganizationException, "") { + log.Printf("[DEBUG] Trying to create account again: %q", ec2err.Message()) + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + }) + + if err != nil { + return fmt.Errorf("Error creating account: %s", err) + } + log.Printf("[DEBUG] Account create response: %#v", resp) + + requestId := *resp.CreateAccountStatus.Id + + // Wait for the account to become available + log.Printf("[DEBUG] Waiting for account request (%s) to succeed", requestId) + + stateConf := &resource.StateChangeConf{ + Pending: []string{organizations.CreateAccountStateInProgress}, + Target: []string{organizations.CreateAccountStateSucceeded}, + Refresh: resourceAwsOrganizationsAccountStateRefreshFunc(conn, requestId), + PollInterval: 10 * time.Second, + Timeout: 5 * time.Minute, + } + stateResp, stateErr := stateConf.WaitForState() + if stateErr != nil { + return fmt.Errorf( + "Error waiting for account request (%s) to become available: %s", + requestId, stateErr) + } + + // Store the ID + accountId := stateResp.(*organizations.CreateAccountStatus).AccountId + d.SetId(*accountId) + + return resourceAwsOrganizationsAccountRead(d, meta) +} + +func resourceAwsOrganizationsAccountRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + describeOpts := &organizations.DescribeAccountInput{ + AccountId: aws.String(d.Id()), + } + resp, err := conn.DescribeAccount(describeOpts) + if err != nil { + if isAWSErr(err, organizations.ErrCodeAccountNotFoundException, "") { + log.Printf("[WARN] Account does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("arn", resp.Account.Arn) + d.Set("joined_method", resp.Account.JoinedMethod) + d.Set("joined_timestamp", resp.Account.JoinedTimestamp) + d.Set("name", resp.Account.Name) + d.Set("status", resp.Account.Status) + return nil +} + +func resourceAwsOrganizationsAccountDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARN] Organization member accounts must be deleted from the web console.") + return nil +} + +// resourceAwsOrganizationsAccountStateRefreshFunc returns a resource.StateRefreshFunc +// that is used to watch a CreateAccount request +func resourceAwsOrganizationsAccountStateRefreshFunc(conn *organizations.Organizations, id string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + opts := &organizations.DescribeCreateAccountStatusInput{ + CreateAccountRequestId: aws.String(id), + } + resp, err := conn.DescribeCreateAccountStatus(opts) + if err != nil { + if isAWSErr(err, organizations.ErrCodeCreateAccountStatusNotFoundException, "") { + resp = nil + } else { + log.Printf("Error on OrganizationAccountStateRefresh: %s", err) + return nil, "", err + } + } + + if resp == nil { + // Sometimes AWS just has consistency issues and doesn't see + // our account yet. Return an empty state. + return nil, "", nil + } + + accountStatus := resp.CreateAccountStatus + if *accountStatus.State == organizations.CreateAccountStateFailed { + return nil, *accountStatus.State, fmt.Errorf(*accountStatus.FailureReason) + } + return accountStatus, *accountStatus.State, nil + } +} + +func validateAwsOrganizationsAccountEmail(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[^\s@]+@[^\s@]+\.[^\s@]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must be a valid email address", value)) + } + + if len(value) < 6 { + errors = append(errors, fmt.Errorf( + "%q cannot be less than 6 characters", value)) + } + + if len(value) > 64 { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than 64 characters", value)) + } + + return +} + +func validateAwsOrganizationsAccountRoleName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[\w+=,.@-]{1,64}$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-", value)) + } + + return +} diff --git a/aws/resource_aws_organizations_account_test.go b/aws/resource_aws_organizations_account_test.go new file mode 100644 index 00000000000..518d1901aec --- /dev/null +++ b/aws/resource_aws_organizations_account_test.go @@ -0,0 +1,102 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/service/organizations" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func testAccAwsOrganizationsAccount_basic(t *testing.T) { + var account organizations.Account + + test_email, ok := os.LookupEnv("TEST_AWS_ORGANIZATION_ACCOUNT_EMAIL") + + if !ok { + t.Skip("'TEST_AWS_ORGANIZATION_ACCOUNT_EMAIL' not set, skipping test.") + } + + name := "my_new_account" + email := test_email + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOrganizationsAccountDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOrganizationsAccountConfig(name, email), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsOrganizationsAccountExists("aws_organizations_account.test", &account), + ), + }, + }, + }) +} + +func testAccCheckAwsOrganizationsAccountDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).organizationsconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_organizations_account" { + continue + } + + params := &organizations.DescribeAccountInput{ + AccountId: &rs.Primary.ID, + } + + resp, err := conn.DescribeAccount(params) + + if err != nil || resp == nil { + return nil + } + + if resp.Account != nil { + return fmt.Errorf("Bad: Account still exists: %q", rs.Primary.ID) + } + } + + return nil + +} + +func testAccCheckAwsOrganizationsAccountExists(n string, a *organizations.Account) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + conn := testAccProvider.Meta().(*AWSClient).organizationsconn + params := &organizations.DescribeAccountInput{ + AccountId: &rs.Primary.ID, + } + + resp, err := conn.DescribeAccount(params) + + if err != nil || resp == nil { + return nil + } + + if resp.Account == nil { + return fmt.Errorf("Bad: Account %q does not exist", rs.Primary.ID) + } + + a = resp.Account + + return nil + } +} + +func testAccAwsOrganizationsAccountConfig(name, email string) string { + return fmt.Sprintf(` +resource "aws_organizations_account" "test" { + name = "%s" + email = "%s" +} +`, name, email) +} diff --git a/aws/resource_aws_organizations_test.go b/aws/resource_aws_organizations_test.go index 33fef61b690..5f90ea3bced 100644 --- a/aws/resource_aws_organizations_test.go +++ b/aws/resource_aws_organizations_test.go @@ -11,6 +11,10 @@ func TestAccAWSOrganizations(t *testing.T) { "importBasic": testAccAwsOrganizationsOrganization_importBasic, "consolidatedBilling": testAccAwsOrganizationsOrganization_consolidatedBilling, }, + "Account": { + "basic": testAccAwsOrganizationsAccount_basic, + "importBasic": testAccAwsOrganizationsAccount_importBasic, + }, } for group, m := range testCases { diff --git a/website/aws.erb b/website/aws.erb index 235f8f196c1..212ef870bee 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1377,6 +1377,9 @@ > aws_organizations_organization + > + aws_organizations_account + diff --git a/website/docs/r/organizations_account.html.markdown b/website/docs/r/organizations_account.html.markdown new file mode 100644 index 00000000000..7c029eabbff --- /dev/null +++ b/website/docs/r/organizations_account.html.markdown @@ -0,0 +1,42 @@ +--- +layout: "aws" +page_title: "AWS: aws_organizations_account +sidebar_current: "docs-aws-resource-organizations-account|" +description: |- + Provides a resource to create a member account in the current AWS Organization. +--- + +# aws\_organizations\_account + +-> **Note:** Account creation must be done from the organization's master account. + +-> **Note:** AWS member accounts must be deleted manually by following these steps: 1) Perform a root account password recovery for the email address that was specified for the account in Organizations. 2) Login to the account as that root user. 3) Navigate to "My Organization" in the account menu top-right. 4) Leave the organization. 5) Once the account has successfully left the organization, delete the account as usual. + + +Provides a resource to create a member account in the current organization. + +## Example Usage: + +```hcl +resource "aws_organizations_account" "account" { + name = "my_new_account" + email = "john@doe.org" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) A friendly name for the member account. +* `email` - (Required) The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. +* `iam_user_access_to_billing` - (Optional) If set to ALLOW, the new account enables IAM users to access account billing information if they have the required permissions. If set to DENY, then only the root user of the new account can access account billing information. +* `role_name` - (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. + +## Import + +The AWS member account can be imported by using the `account_id`, e.g. + +``` +$ terraform import aws_organization_account.my_org 111111111111 +``` From aa8b83ffa94ae17be48ce4f321d84fdd9b7700eb Mon Sep 17 00:00:00 2001 From: a a Date: Sun, 25 Feb 2018 13:32:18 +0000 Subject: [PATCH 0076/3316] =?UTF-8?q?fixes=20#2825=20supports=20classic=20?= =?UTF-8?q?EIP=E2=80=99s=20in=20data.aws=5Feip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aws/data_source_aws_eip.go | 8 ++++- aws/data_source_aws_eip_test.go | 62 +++++++++++++++++++++++--------- website/docs/d/eip.html.markdown | 6 ++-- 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/aws/data_source_aws_eip.go b/aws/data_source_aws_eip.go index f461a374e8b..d08a6cb7de6 100644 --- a/aws/data_source_aws_eip.go +++ b/aws/data_source_aws_eip.go @@ -55,7 +55,13 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { eip := resp.Addresses[0] - d.SetId(*eip.AllocationId) + if *eip.Domain == "vpc" { + d.SetId(*eip.AllocationId) + } else { + log.Printf("[DEBUG] Reading EIP, has no AllocationId, this means we have a Classic EIP, the id will also be the public ip : %s", req) + d.SetId(*eip.PublicIp) + } + d.Set("public_ip", eip.PublicIp) return nil diff --git a/aws/data_source_aws_eip_test.go b/aws/data_source_aws_eip_test.go index d5d0c6ac708..45cf5f25832 100644 --- a/aws/data_source_aws_eip_test.go +++ b/aws/data_source_aws_eip_test.go @@ -8,32 +8,47 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccDataSourceAwsEip_basic(t *testing.T) { +func TestAccDataSourceAwsEip_classic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccDataSourceAwsEipConfig, + Config: testAccDataSourceAwsEipClassicConfig, Check: resource.ComposeTestCheckFunc( - testAccDataSourceAwsEipCheck("data.aws_eip.by_id"), - testAccDataSourceAwsEipCheck("data.aws_eip.by_public_ip"), + testAccDataSourceAwsEipCheck("data.aws_eip.test_classic", "aws_eip.test_classic"), ), }, }, }) } -func testAccDataSourceAwsEipCheck(name string) resource.TestCheckFunc { +func TestAccDataSourceAwsEip_vpc(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDataSourceAwsEipVPCConfig, + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsEipCheck("data.aws_eip.test_vpc_by_id", "aws_eip.test_vpc"), + testAccDataSourceAwsEipCheck("data.aws_eip.test_vpc_by_public_ip", "aws_eip.test_vpc"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsEipCheck(data_path string, resource_path string) resource.TestCheckFunc { return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[data_path] if !ok { - return fmt.Errorf("root module has no resource called %s", name) + return fmt.Errorf("root module has no resource called %s", data_path) } - eipRs, ok := s.RootModule().Resources["aws_eip.test"] + eipRs, ok := s.RootModule().Resources[resource_path] if !ok { - return fmt.Errorf("can't find aws_eip.test in state") + return fmt.Errorf("can't find %s in state", resource_path) } attr := rs.Primary.Attributes @@ -58,20 +73,33 @@ func testAccDataSourceAwsEipCheck(name string) resource.TestCheckFunc { } } -const testAccDataSourceAwsEipConfig = ` +const testAccDataSourceAwsEipClassicConfig = ` provider "aws" { region = "us-west-2" } -resource "aws_eip" "wrong1" {} -resource "aws_eip" "test" {} -resource "aws_eip" "wrong2" {} +resource "aws_eip" "test_classic" {} + +data "aws_eip" "test_classic" { + public_ip = "${aws_eip.test_classic.public_ip}" +} + +` + +const testAccDataSourceAwsEipVPCConfig = ` +provider "aws" { + region = "us-west-2" +} + +resource "aws_eip" "test_vpc" { + vpc = true +} -data "aws_eip" "by_id" { - id = "${aws_eip.test.id}" +data "aws_eip" "test_vpc_by_id" { + id = "${aws_eip.test_vpc.id}" } -data "aws_eip" "by_public_ip" { - public_ip = "${aws_eip.test.public_ip}" +data "aws_eip" "test_vpc_by_public_ip" { + public_ip = "${aws_eip.test_vpc.public_ip}" } ` diff --git a/website/docs/d/eip.html.markdown b/website/docs/d/eip.html.markdown index 9a6535eedb4..770194688c6 100644 --- a/website/docs/d/eip.html.markdown +++ b/website/docs/d/eip.html.markdown @@ -16,7 +16,7 @@ public IP as an input variable and needs to determine the other. ## Example Usage The following example shows how one might accept a public IP as a variable -and use this data source to obtain the allocation ID. +and use this data source to obtain the allocation ID when using an VPC EIP. ```hcl variable "instance_id" {} @@ -32,13 +32,15 @@ resource "aws_eip_association" "proxy_eip" { } ``` +Classic EIP's do not have an allocation_id, only use `public_ip` in the `data "aws_eip"` block. + ## Argument Reference The arguments of this data source act as filters for querying the available Elastic IPs in the current region. The given filters must match exactly one Elastic IP whose data will be exported as attributes. -* `id` - (Optional) The allocation id of the specific EIP to retrieve. +* `id` - (Optional) The allocation id of the specific VPC EIP to retrieve. If a classic EIP is required, do NOT set `id`, only set `public_ip` * `public_ip` - (Optional) The public IP of the specific EIP to retrieve. From ec0a43c09444d7a940a896083f94ceb9507b8b05 Mon Sep 17 00:00:00 2001 From: Richard Bowden Date: Sun, 25 Feb 2018 16:39:30 +0000 Subject: [PATCH 0077/3316] fixes #3423 adds filter to data source aws_eip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this addes the ability to search for EIP’s via tags or other attribute that EIP’s can use in a filter. This did highlight a known issue with regrads to how terraform eval’s data sources before they should if be the resourse is a computed value. This is only an issue if the data block is referencing a resource that is created at the same time. If referencing a pre exiting resource this does not happen. the test config testAccDataSourceAwsEipFilterConfig makes a interpol ref to force terraform to eval the data block after the resource has either been created or read in `values = ["${aws_eip.test.tags.Name}”]` see the following links https://github.com/hashicorp/terraform/issues/10603 https://github.com/hashicorp/terraform/issues/17173 --- aws/data_source_aws_eip.go | 19 ++++++++++++++--- aws/data_source_aws_eip_test.go | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/aws/data_source_aws_eip.go b/aws/data_source_aws_eip.go index d08a6cb7de6..c2df4602be2 100644 --- a/aws/data_source_aws_eip.go +++ b/aws/data_source_aws_eip.go @@ -14,6 +14,7 @@ func dataSourceAwsEip() *schema.Resource { Read: dataSourceAwsEipRead, Schema: map[string]*schema.Schema{ + "filter": dataSourceFiltersSchema(), "id": { Type: schema.TypeString, Optional: true, @@ -31,14 +32,26 @@ func dataSourceAwsEip() *schema.Resource { func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + filters, filtersOk := d.GetOk("filter") + id, idOk := d.GetOk("id") + publicIP, publicIPOk := d.GetOk("public_ip") + + if (idOk || publicIPOk) && filtersOk { + return fmt.Errorf("filter cannot be used when id or public_ip is set") + } + req := &ec2.DescribeAddressesInput{} - if id, ok := d.GetOk("id"); ok { + if idOk { req.AllocationIds = []*string{aws.String(id.(string))} } - if public_ip := d.Get("public_ip"); public_ip != "" { - req.PublicIps = []*string{aws.String(public_ip.(string))} + if publicIPOk { + req.PublicIps = []*string{aws.String(publicIP.(string))} + } + + if filtersOk { + req.Filters = buildAwsDataSourceFilters(filters.(*schema.Set)) } log.Printf("[DEBUG] Reading EIP: %s", req) diff --git a/aws/data_source_aws_eip_test.go b/aws/data_source_aws_eip_test.go index 45cf5f25832..ceae6c83317 100644 --- a/aws/data_source_aws_eip_test.go +++ b/aws/data_source_aws_eip_test.go @@ -39,6 +39,21 @@ func TestAccDataSourceAwsEip_vpc(t *testing.T) { }) } +func TestAccDataSourceAwsEip_filter(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDataSourceAwsEipFilterConfig, + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsEipCheck("data.aws_eip.by_filter", "aws_eip.test"), + ), + }, + }, + }) +} + func testAccDataSourceAwsEipCheck(data_path string, resource_path string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[data_path] @@ -103,3 +118,24 @@ data "aws_eip" "test_vpc_by_public_ip" { public_ip = "${aws_eip.test_vpc.public_ip}" } ` + +const testAccDataSourceAwsEipFilterConfig = ` +provider "aws" { + region = "us-west-2" +} + +resource "aws_eip" "test" { + vpc = true + + tags { + Name = "testeip" + } +} + +data "aws_eip" "by_filter" { + filter { + name = "tag:Name" + values = ["${aws_eip.test.tags.Name}"] + } +} +` From 10f42ab58fab2a3d36d33b4be8f009ea8c73ce45 Mon Sep 17 00:00:00 2001 From: Richard Bowden Date: Sun, 25 Feb 2018 16:50:32 +0000 Subject: [PATCH 0078/3316] updates docs for data aws_eip filter --- website/docs/d/eip.html.markdown | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/website/docs/d/eip.html.markdown b/website/docs/d/eip.html.markdown index 770194688c6..8237e00cc37 100644 --- a/website/docs/d/eip.html.markdown +++ b/website/docs/d/eip.html.markdown @@ -18,6 +18,7 @@ public IP as an input variable and needs to determine the other. The following example shows how one might accept a public IP as a variable and use this data source to obtain the allocation ID when using an VPC EIP. +### ip or id ```hcl variable "instance_id" {} variable "public_ip" {} @@ -32,6 +33,35 @@ resource "aws_eip_association" "proxy_eip" { } ``` +### filter + +```hcl +variable "instance_id" {} + +resource "aws_eip" "proxy_ip" { + vpc = true + + tags { + Name = "proxy" + } +} + +data "aws_eip" "by_filter" { + filter { + name = "tag:Name" + values = ["${aws_eip.test.tags.Name}"] + } +} + +resource "aws_eip_association" "proxy_eip" { + instance_id = "${var.instance_id}" + allocation_id = "${data.aws_eip.proxy_ip.id}" +} + +``` + +~> **NOTE:** if using `data "aws_eip"` on a none pre exsiting EIP, ensure you reference the tag of the EIP by interpolation as shown in the example. + Classic EIP's do not have an allocation_id, only use `public_ip` in the `data "aws_eip"` block. ## Argument Reference @@ -44,6 +74,12 @@ Elastic IP whose data will be exported as attributes. * `public_ip` - (Optional) The public IP of the specific EIP to retrieve. +* `filter` - (Optional) One or more name/value pairs to use as filters. There are +several valid keys, for a full reference, check out +[describe-addresses in the AWS CLI reference][1]. + +~> **NOTE:** `filter` cannot be used when `id` or `public_ip` is being used. + ## Attributes Reference All of the argument attributes are also exported as result attributes. This From 046ecefb9f32a6d3840233b815d1f2828cb4c731 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Sun, 25 Feb 2018 13:42:02 -0500 Subject: [PATCH 0079/3316] Must set ForceNew:true since there is no update method defined. --- aws/resource_aws_organizations_account.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_organizations_account.go b/aws/resource_aws_organizations_account.go index 56a98426e66..e15a5274ff1 100644 --- a/aws/resource_aws_organizations_account.go +++ b/aws/resource_aws_organizations_account.go @@ -41,21 +41,25 @@ func resourceAwsOrganizationsAccount() *schema.Resource { Computed: true, }, "name": { + ForceNew: true, Type: schema.TypeString, Required: true, ValidateFunc: validation.StringLenBetween(1, 50), }, "email": { + ForceNew: true, Type: schema.TypeString, Required: true, ValidateFunc: validateAwsOrganizationsAccountEmail, }, "iam_user_access_to_billing": { + ForceNew: true, Type: schema.TypeString, Optional: true, ValidateFunc: validation.StringInSlice([]string{organizations.IAMUserAccessToBillingAllow, organizations.IAMUserAccessToBillingDeny}, true), }, "role_name": { + ForceNew: true, Type: schema.TypeString, Optional: true, ValidateFunc: validateAwsOrganizationsAccountRoleName, From ecbf076b68c84904a0f24ed5876d13bd3a1c77cf Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Sun, 25 Feb 2018 13:42:35 -0500 Subject: [PATCH 0080/3316] Fix up some conditions in the tests based on previous feedback. --- aws/resource_aws_organizations_account_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_organizations_account_test.go b/aws/resource_aws_organizations_account_test.go index 518d1901aec..fe965d71a0f 100644 --- a/aws/resource_aws_organizations_account_test.go +++ b/aws/resource_aws_organizations_account_test.go @@ -51,11 +51,11 @@ func testAccCheckAwsOrganizationsAccountDestroy(s *terraform.State) error { resp, err := conn.DescribeAccount(params) - if err != nil || resp == nil { - return nil + if err != nil { + return err } - if resp.Account != nil { + if resp == nil && resp.Account != nil { return fmt.Errorf("Bad: Account still exists: %q", rs.Primary.ID) } } @@ -78,12 +78,12 @@ func testAccCheckAwsOrganizationsAccountExists(n string, a *organizations.Accoun resp, err := conn.DescribeAccount(params) - if err != nil || resp == nil { - return nil + if err != nil { + return err } - if resp.Account == nil { - return fmt.Errorf("Bad: Account %q does not exist", rs.Primary.ID) + if resp == nil || resp.Account == nil { + return fmt.Errorf("Account %q does not exist", rs.Primary.ID) } a = resp.Account From aa5debedde92e6926d01ca4cb56e001bbac736c2 Mon Sep 17 00:00:00 2001 From: vpadronblanco Date: Wed, 28 Feb 2018 14:50:17 -0500 Subject: [PATCH 0081/3316] test config changed for data source to depend on resource --- aws/data_source_aws_eip_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/data_source_aws_eip_test.go b/aws/data_source_aws_eip_test.go index 16c0d0176f8..9aeff70b755 100644 --- a/aws/data_source_aws_eip_test.go +++ b/aws/data_source_aws_eip_test.go @@ -112,6 +112,7 @@ data "aws_eip" "by_tag" { test_tag = "${aws_eip.test.tags["test_tag"]}" random_tag = "%d" } + depends_on = ["aws_eip.test"] } `, rInt) } From b614fc66d5d2fbf1c502aad0616ae4a18e6b5c00 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 28 Feb 2018 15:24:58 +1100 Subject: [PATCH 0082/3316] Ignore the VPC configuration for a Lambda function if it is empty I have a `lambda_function` module, which supports both EC2 classic and VPC. The problem I have, however, is that there is no way to specify a null configuration for `vpc_config`. This pull request changes the behavior so that the following Terraform configuration is //ignored//, instead of failing with an error (the current behavior): ``` resource "aws_lambda_function" "test" { # ... vpc_config { security_group_ids = [] subnet_ids = [] } } ``` See also #1187 and #1190. --- aws/resource_aws_lambda_function.go | 26 ++++++++++++++- aws/resource_aws_lambda_function_test.go | 41 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index 6050df8d806..fee37d5e007 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -139,6 +139,31 @@ func resourceAwsLambdaFunction() *schema.Resource { }, }, }, + + // Suppress diffs if the VPC configuration is empty. + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if v, ok := d.GetOk("vpc_config"); ok { + configs := v.([]interface{}) + config, ok := configs[0].(map[string]interface{}) + + if !ok { + return true + } + + if config == nil { + return true + } + + securityGroups := config["security_group_ids"].(*schema.Set) + subnets := config["subnet_ids"].(*schema.Set) + + if securityGroups.Len() == 0 && subnets.Len() == 0 { + return true + } + } + + return false + }, }, "arn": { Type: schema.TypeString, @@ -291,7 +316,6 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e } if v, ok := d.GetOk("vpc_config"); ok { - configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) diff --git a/aws/resource_aws_lambda_function_test.go b/aws/resource_aws_lambda_function_test.go index 29f2774089c..4013e47516b 100644 --- a/aws/resource_aws_lambda_function_test.go +++ b/aws/resource_aws_lambda_function_test.go @@ -586,6 +586,31 @@ func TestAccAWSLambdaFunction_VPC_withInvocation(t *testing.T) { }) } +func TestAccAWSLambdaFunction_EmptyVpcConfig(t *testing.T) { + var conf lambda.GetFunctionOutput + + rString := acctest.RandString(8) + funcName := fmt.Sprintf("tf_acc_lambda_func_empty_vpc_config_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_func_empty_vpc_config_%s", rString) + roleName := fmt.Sprintf("tf_acc_role_lambda_func_empty_vpc_config_%s", rString) + sgName := fmt.Sprintf("tf_acc_sg_lambda_func_empty_vpc_config_%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckLambdaFunctionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLambdaConfigWithEmptyVpcConfig(funcName, policyName, roleName, sgName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaFunctionExists("aws_lambda_function.test", funcName, &conf), + resource.TestCheckResourceAttr("aws_lambda_function.test", "vpc_config.#", "0"), + ), + }, + }, + }) +} + func TestAccAWSLambdaFunction_s3(t *testing.T) { var conf lambda.GetFunctionOutput @@ -1668,6 +1693,22 @@ resource "aws_security_group" "sg_for_lambda_2" { `, funcName, sgName2) } +func testAccAWSLambdaConfigWithEmptyVpcConfig(funcName, policyName, roleName, sgName string) string { + return fmt.Sprintf(baseAccAWSLambdaConfig(policyName, roleName, sgName)+` +resource "aws_lambda_function" "test" { + filename = "test-fixtures/lambdatest.zip" + function_name = "%s" + role = "${aws_iam_role.iam_for_lambda.arn}" + handler = "exports.example" + runtime = "nodejs4.3" + + vpc_config { + subnet_ids = [] + security_group_ids = [] + } +}`, funcName) +} + func testAccAWSLambdaConfigS3(bucketName, roleName, funcName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "lambda_bucket" { From 8c52fe19f0bde205dadf24c929f81f1d37fac576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Socha?= Date: Fri, 2 Mar 2018 15:49:12 +0100 Subject: [PATCH 0083/3316] Start work on new resource aws_cognito_identity_provider --- aws/provider.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/provider.go b/aws/provider.go index 6aa0203b3ac..a77b4ee93f2 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -304,6 +304,7 @@ func Provider() terraform.ResourceProvider { "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), + "aws_cognito_identity_provider": resourceAwsCognitoIdentityProvider(), "aws_cognito_user_group": resourceAwsCognitoUserGroup(), "aws_cognito_user_pool": resourceAwsCognitoUserPool(), "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), From 158741fb8660888ad3cf8b0a0cf0b1f1e5b2234c Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:01:57 -0500 Subject: [PATCH 0084/3316] Remove separate import test since running acceptance tests for this resource will be challenging. --- aws/import_aws_organizations_account_test.go | 30 ------------------- ...resource_aws_organizations_account_test.go | 5 ++++ aws/resource_aws_organizations_test.go | 3 +- 3 files changed, 6 insertions(+), 32 deletions(-) delete mode 100644 aws/import_aws_organizations_account_test.go diff --git a/aws/import_aws_organizations_account_test.go b/aws/import_aws_organizations_account_test.go deleted file mode 100644 index d1af7f5036a..00000000000 --- a/aws/import_aws_organizations_account_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package aws - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/resource" -) - -func testAccAwsOrganizationsAccount_importBasic(t *testing.T) { - resourceName := "aws_organizations_account.test" - name := "my_new_account" - email := "foo@bar.org" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsOrganizationsAccountDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAwsOrganizationsAccountConfig(name, email), - }, - - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/aws/resource_aws_organizations_account_test.go b/aws/resource_aws_organizations_account_test.go index fe965d71a0f..c2dcb353010 100644 --- a/aws/resource_aws_organizations_account_test.go +++ b/aws/resource_aws_organizations_account_test.go @@ -33,6 +33,11 @@ func testAccAwsOrganizationsAccount_basic(t *testing.T) { testAccCheckAwsOrganizationsAccountExists("aws_organizations_account.test", &account), ), }, + { + ResourceName: "aws_organizations_account.test", + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/aws/resource_aws_organizations_test.go b/aws/resource_aws_organizations_test.go index 5f90ea3bced..5804aeb009f 100644 --- a/aws/resource_aws_organizations_test.go +++ b/aws/resource_aws_organizations_test.go @@ -12,8 +12,7 @@ func TestAccAWSOrganizations(t *testing.T) { "consolidatedBilling": testAccAwsOrganizationsOrganization_consolidatedBilling, }, "Account": { - "basic": testAccAwsOrganizationsAccount_basic, - "importBasic": testAccAwsOrganizationsAccount_importBasic, + "basic": testAccAwsOrganizationsAccount_basic, }, } From df173f8c1db4d1426b07b5fa9d1845118dbd7956 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:02:49 -0500 Subject: [PATCH 0085/3316] Alphabetize navigation items. --- website/aws.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/aws.erb b/website/aws.erb index 212ef870bee..a3bc388f8e5 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1374,12 +1374,12 @@ Organizations Resources From 187ed10c6f815aacc395884349191ce283a13933 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:03:40 -0500 Subject: [PATCH 0086/3316] Provide clearer notes based on review feedback. Link to AWS Organizations documentation rather than spell it out. --- website/docs/r/organizations_account.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/r/organizations_account.html.markdown b/website/docs/r/organizations_account.html.markdown index 7c029eabbff..eb3d6537f55 100644 --- a/website/docs/r/organizations_account.html.markdown +++ b/website/docs/r/organizations_account.html.markdown @@ -6,11 +6,11 @@ description: |- Provides a resource to create a member account in the current AWS Organization. --- -# aws\_organizations\_account +# aws_organizations_account --> **Note:** Account creation must be done from the organization's master account. +~> **Note:** Account management must be done from the organization's master account. --> **Note:** AWS member accounts must be deleted manually by following these steps: 1) Perform a root account password recovery for the email address that was specified for the account in Organizations. 2) Login to the account as that root user. 3) Navigate to "My Organization" in the account menu top-right. 4) Leave the organization. 5) Once the account has successfully left the organization, delete the account as usual. +~> **Note:** Deleting this Terraform resource will only remove an AWS account from an organization. Terraform will not close the account. The member account must be prepared to be a standalone account beforehand. See the [AWS Organizations documentation](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html) for more information. Provides a resource to create a member account in the current organization. From 911290de3bacd089223e0f16f4410480d9555c96 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:05:20 -0500 Subject: [PATCH 0087/3316] Fix refactoring gone wrong. Should have just used isAWSErr helper but accidentally left in the old awserr check. --- aws/resource_aws_organizations_account.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_organizations_account.go b/aws/resource_aws_organizations_account.go index e15a5274ff1..6aadf9ce694 100644 --- a/aws/resource_aws_organizations_account.go +++ b/aws/resource_aws_organizations_account.go @@ -7,7 +7,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/organizations" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -92,12 +91,8 @@ func resourceAwsOrganizationsAccountCreate(d *schema.ResourceData, meta interfac resp, err = conn.CreateAccount(createOpts) if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - if isAWSErr(ec2err, organizations.ErrCodeFinalizingOrganizationException, "") { - log.Printf("[DEBUG] Trying to create account again: %q", ec2err.Message()) + if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { + log.Printf("[DEBUG] Trying to create account again: %q", err.Error()) return resource.RetryableError(err) } From c381d4c612f8f0b24d5163e257b564c1a5c10363 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:06:23 -0500 Subject: [PATCH 0088/3316] Add in a Delete method so that the AWS error can be presented to the user rather than issuing a pointless warning. --- aws/resource_aws_organizations_account.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_organizations_account.go b/aws/resource_aws_organizations_account.go index 6aadf9ce694..eb7eb02f2bb 100644 --- a/aws/resource_aws_organizations_account.go +++ b/aws/resource_aws_organizations_account.go @@ -157,7 +157,19 @@ func resourceAwsOrganizationsAccountRead(d *schema.ResourceData, meta interface{ } func resourceAwsOrganizationsAccountDelete(d *schema.ResourceData, meta interface{}) error { - log.Printf("[WARN] Organization member accounts must be deleted from the web console.") + conn := meta.(*AWSClient).organizationsconn + + input := &organizations.RemoveAccountFromOrganizationInput{ + AccountId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Removing AWS account from organization: %s", input) + _, err := conn.RemoveAccountFromOrganization(input) + if err != nil { + if isAWSErr(err, organizations.ErrCodeAccountNotFoundException, "") { + return nil + } + return err + } return nil } From 0c58762791399e23705fd36b4e81c60a669775b7 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:07:05 -0500 Subject: [PATCH 0089/3316] Randomize the name and email inputs for acceptance test account creation. --- aws/resource_aws_organizations_account_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_organizations_account_test.go b/aws/resource_aws_organizations_account_test.go index c2dcb353010..97fa2130529 100644 --- a/aws/resource_aws_organizations_account_test.go +++ b/aws/resource_aws_organizations_account_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/aws/aws-sdk-go/service/organizations" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) @@ -13,14 +14,15 @@ import ( func testAccAwsOrganizationsAccount_basic(t *testing.T) { var account organizations.Account - test_email, ok := os.LookupEnv("TEST_AWS_ORGANIZATION_ACCOUNT_EMAIL") + orgsEmailDomain, ok := os.LookupEnv("TEST_AWS_ORGANIZATION_ACCOUNT_EMAIL_DOMAIN") if !ok { - t.Skip("'TEST_AWS_ORGANIZATION_ACCOUNT_EMAIL' not set, skipping test.") + t.Skip("'TEST_AWS_ORGANIZATION_ACCOUNT_EMAIL_DOMAIN' not set, skipping test.") } - name := "my_new_account" - email := test_email + rInt := acctest.RandInt() + name := fmt.Sprintf("tf_acctest_%s", rInt) + email := fmt.Sprintf("tf-acctest+%d@%s", rInt, orgsEmailDomain) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, From ea7573f5d79e3dfa54f5e186c1705661b832ed03 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:07:31 -0500 Subject: [PATCH 0090/3316] Test that all the resources are set and that some are set correctly. --- aws/resource_aws_organizations_account_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aws/resource_aws_organizations_account_test.go b/aws/resource_aws_organizations_account_test.go index 97fa2130529..db1223f4373 100644 --- a/aws/resource_aws_organizations_account_test.go +++ b/aws/resource_aws_organizations_account_test.go @@ -33,6 +33,12 @@ func testAccAwsOrganizationsAccount_basic(t *testing.T) { Config: testAccAwsOrganizationsAccountConfig(name, email), Check: resource.ComposeTestCheckFunc( testAccCheckAwsOrganizationsAccountExists("aws_organizations_account.test", &account), + resource.TestCheckResourceAttrSet("aws_organizations_account.test", "arn"), + resource.TestCheckResourceAttrSet("aws_organizations_account.test", "joined_method"), + resource.TestCheckResourceAttrSet("aws_organizations_account.test", "joined_timestamp"), + resource.TestCheckResourceAttr("aws_organizations_account.test", "name", name), + resource.TestCheckResourceAttr("aws_organizations_account.test", "email", email), + resource.TestCheckResourceAttrSet("aws_organizations_account.test", "status"), ), }, { From e607c48b5ceff841099c024714025d02614811d8 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:08:15 -0500 Subject: [PATCH 0091/3316] Return nil instead of an error if the account has already been destroyed. --- aws/resource_aws_organizations_account_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aws/resource_aws_organizations_account_test.go b/aws/resource_aws_organizations_account_test.go index db1223f4373..b7020c40e0e 100644 --- a/aws/resource_aws_organizations_account_test.go +++ b/aws/resource_aws_organizations_account_test.go @@ -65,6 +65,9 @@ func testAccCheckAwsOrganizationsAccountDestroy(s *terraform.State) error { resp, err := conn.DescribeAccount(params) if err != nil { + if isAWSErr(err, organizations.ErrCodeAccountNotFoundException, "") { + return nil + } return err } From 3380f0094e6ffc7c089998478af75b3d18cd34d6 Mon Sep 17 00:00:00 2001 From: Altay Aliyev Date: Fri, 2 Mar 2018 17:29:44 +0100 Subject: [PATCH 0092/3316] rebased with upstream/master --- aws/resource_aws_dms_endpoint.go | 151 ++++++++++---- aws/resource_aws_dms_endpoint_test.go | 228 ++++++++++++++-------- website/docs/r/dms_endpoint.html.markdown | 6 +- 3 files changed, 272 insertions(+), 113 deletions(-) diff --git a/aws/resource_aws_dms_endpoint.go b/aws/resource_aws_dms_endpoint.go index 7bce1c2310c..efb952f316d 100644 --- a/aws/resource_aws_dms_endpoint.go +++ b/aws/resource_aws_dms_endpoint.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "strings" "time" @@ -71,6 +72,7 @@ func resourceAwsDmsEndpoint() *schema.Resource { "redshift", "sybase", "sqlserver", + "s3", }, false), }, "extra_connection_attributes": { @@ -79,11 +81,12 @@ func resourceAwsDmsEndpoint() *schema.Resource { Optional: true, }, "kms_key_arn": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ValidateFunc: validateArn, + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"bucket_name", "bucket_folder"}, + ValidateFunc: validateArn, }, "password": { Type: schema.TypeString, @@ -117,6 +120,14 @@ func resourceAwsDmsEndpoint() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "bucket_name": { + Type: schema.TypeString, + Optional: true, + }, + "bucket_folder": { + Type: schema.TypeString, + Optional: true, + }, }, } } @@ -131,12 +142,42 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), } + switch d.Get("engine_name").(string) { // if dynamodb then add required params - if d.Get("engine_name").(string) == "dynamodb" { + case "dynamodb": request.DynamoDbSettings = &dms.DynamoDbSettings{ ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), } - } else { + case "s3": + request.S3Settings = &dms.S3Settings{ + BucketName: aws.String(d.Get("bucket_name").(string)), + BucketFolder: aws.String(d.Get("bucket_folder").(string)), + ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), + + // By default extra variables (should be set): + CompressionType: aws.String("GZIP"), + CsvDelimiter: aws.String(","), + CsvRowDelimiter: aws.String("\\n"), + } + + // if extra_connection_attributes is set. Then parse the varaiables. + if v, ok := d.GetOk("extra_connection_attributes"); ok { + elems := strings.Split(v.(string), ";") + if len(elems) > 0 { + for _, elem := range elems { + vals := strings.Split(elem, "=") + if strings.Contains(strings.ToLower(vals[0]), "compressiontype") { + request.S3Settings.CompressionType = aws.String(vals[1]) + } else if strings.Contains(strings.ToLower(vals[0]), "csvdelimiter") { + request.S3Settings.CsvDelimiter = aws.String(vals[1]) + } else if strings.Contains(strings.ToLower(vals[0]), "csvrowdelimiter") { + request.S3Settings.CsvRowDelimiter = aws.String(vals[1]) + } + } + } + } + + default: request.Password = aws.String(d.Get("password").(string)) request.Port = aws.Int64(int64(d.Get("port").(int))) request.ServerName = aws.String(d.Get("server_name").(string)) @@ -148,17 +189,17 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro if v, ok := d.GetOk("extra_connection_attributes"); ok { request.ExtraConnectionAttributes = aws.String(v.(string)) } + if v, ok := d.GetOk("kms_key_arn"); ok { + request.KmsKeyId = aws.String(v.(string)) + } + if v, ok := d.GetOk("ssl_mode"); ok { + request.SslMode = aws.String(v.(string)) + } } if v, ok := d.GetOk("certificate_arn"); ok { request.CertificateArn = aws.String(v.(string)) } - if v, ok := d.GetOk("kms_key_arn"); ok { - request.KmsKeyId = aws.String(v.(string)) - } - if v, ok := d.GetOk("ssl_mode"); ok { - request.SslMode = aws.String(v.(string)) - } log.Println("[DEBUG] DMS create endpoint:", request) @@ -228,6 +269,11 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } hasChanges := false + if d.HasChange("endpoint_type") { + request.EndpointType = aws.String(d.Get("endpoint_type").(string)) + hasChanges = true + } + if d.HasChange("certificate_arn") { request.CertificateArn = aws.String(d.Get("certificate_arn").(string)) hasChanges = true @@ -238,26 +284,50 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro hasChanges = true } - if d.HasChange("service_access_role") { - request.DynamoDbSettings = &dms.DynamoDbSettings{ - ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), - } - hasChanges = true - } - - if d.HasChange("endpoint_type") { - request.EndpointType = aws.String(d.Get("endpoint_type").(string)) - hasChanges = true - } - if d.HasChange("engine_name") { request.EngineName = aws.String(d.Get("engine_name").(string)) hasChanges = true } - if d.HasChange("extra_connection_attributes") { - request.ExtraConnectionAttributes = aws.String(d.Get("extra_connection_attributes").(string)) - hasChanges = true + switch d.Get("engine_name").(string) { + case "dynamodb": + if d.HasChange("service_access_role") { + request.DynamoDbSettings = &dms.DynamoDbSettings{ + ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), + } + hasChanges = true + } + case "s3": + if d.HasChange("service_access_role") || d.HasChange("bucket_name") || d.HasChange("bucket_folder") || d.HasChange("extra_connection_attributes") { + request.S3Settings = &dms.S3Settings{ + ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), + BucketFolder: aws.String(d.Get("bucket_folder").(string)), + BucketName: aws.String(d.Get("bucket_name").(string)), + } + + elems := strings.Split(d.Get("extra_connection_attributes").(string), ";") + if len(elems) > 0 { + for _, elem := range elems { + vals := strings.Split(elem, "=") + if strings.Contains(strings.ToLower(vals[0]), "compressiontype") { + request.S3Settings.CompressionType = aws.String(vals[1]) + } else if strings.Contains(strings.ToLower(vals[0]), "csvdelimiter") { + request.S3Settings.CsvDelimiter = aws.String(vals[1]) + } else if strings.Contains(strings.ToLower(vals[0]), "csvrowdelimiter") { + request.S3Settings.CsvRowDelimiter = aws.String(vals[1]) + } + } + } + + hasChanges = true + + goto DONE + } + default: + if d.HasChange("extra_connection_attributes") { + request.ExtraConnectionAttributes = aws.String(d.Get("extra_connection_attributes").(string)) + hasChanges = true + } } if d.HasChange("password") { @@ -292,6 +362,7 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } } +DONE: if hasChanges { log.Println("[DEBUG] DMS update endpoint:", request) @@ -333,22 +404,36 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi d.Set("endpoint_type", strings.ToLower(*endpoint.EndpointType)) d.Set("engine_name", endpoint.EngineName) - if *endpoint.EngineName == "dynamodb" { + switch *endpoint.EngineName { + case "dynamodb": if endpoint.DynamoDbSettings != nil { d.Set("service_access_role", endpoint.DynamoDbSettings.ServiceAccessRoleArn) } else { d.Set("service_access_role", "") } - } else { + case "s3": + if endpoint.S3Settings != nil { + d.Set("service_access_role", endpoint.S3Settings.ServiceAccessRoleArn) + d.Set("bucket_folder", endpoint.S3Settings.BucketFolder) + d.Set("bucket_name", endpoint.S3Settings.BucketName) + d.Set("extra_connection_attributes", + aws.String(fmt.Sprintf("compressionType=%s;csvDelimiter=%s;csvRowDelimiter=%s", + *endpoint.S3Settings.CompressionType, *endpoint.S3Settings.CsvDelimiter, *endpoint.S3Settings.CsvRowDelimiter))) + } else { + d.Set("service_access_role", "") + d.Set("bucket_folder", "") + d.Set("bucket_name", "") + d.Set("extra_connection_attributes", "") + } + default: d.Set("database_name", endpoint.DatabaseName) d.Set("extra_connection_attributes", endpoint.ExtraConnectionAttributes) d.Set("port", endpoint.Port) d.Set("server_name", endpoint.ServerName) d.Set("username", endpoint.Username) + d.Set("kms_key_arn", endpoint.KmsKeyId) + d.Set("ssl_mode", endpoint.SslMode) } - d.Set("kms_key_arn", endpoint.KmsKeyId) - d.Set("ssl_mode", endpoint.SslMode) - return nil } diff --git a/aws/resource_aws_dms_endpoint_test.go b/aws/resource_aws_dms_endpoint_test.go index b094e4b5eb8..6097e557268 100644 --- a/aws/resource_aws_dms_endpoint_test.go +++ b/aws/resource_aws_dms_endpoint_test.go @@ -50,7 +50,39 @@ func TestAccAWSDmsEndpointBasic(t *testing.T) { }) } -func TestAccAWSDmsEndpointDynamoDb(t *testing.T) { +func TestAccAwsDmsEndpointS3(t *testing.T) { + resourceName := "aws_dms_endpoint.dms_point" + randId := acctest.RandString(8) + "-s3" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointS3Config(randId), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "endpoint_arn"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + { + Config: dmsEndpointS3ConfigUpdate(randId), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + ), + }, + }, + }) +} + +func TestAccAwsDmsEndpointDynamoDb(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-dynamodb" @@ -174,125 +206,165 @@ resource "aws_dms_endpoint" "dms_endpoint" { `, randId) } -func dmsEndpointDynamoDbConfig(randId string) string { +func dmsEndpointTargetConfig(randId string, engineName string, actionList string) string { return fmt.Sprintf(` resource "aws_dms_endpoint" "dms_endpoint" { - endpoint_id = "tf-test-dms-endpoint-%[1]s" - endpoint_type = "target" - engine_name = "dynamodb" - service_access_role = "${aws_iam_role.iam_role.arn}" - ssl_mode = "none" - tags { - Name = "tf-test-dynamodb-endpoint-%[1]s" - Update = "to-update" - Remove = "to-remove" - } +endpoint_id = "tf-test-dms-endpoint-%[1]s" +endpoint_type = "target" +engine_name = "%[2]s" +service_access_role = "${aws_iam_role.iam_role.arn}" +ssl_mode = "none" +tags { + Name = "tf-test-%[2]s-endpoint-%[1]s" + Update = "to-update" + Remove = "to-remove" +} - depends_on = ["aws_iam_role_policy.dms_dynamodb_access"] +depends_on = ["aws_iam_role_policy.dms_%[2]s_access"] } resource "aws_iam_role" "iam_role" { - name = "tf-test-iam-dynamodb-role-%[1]s" +name = "tf-test-iam-%[2]s-role-%[1]s" - assume_role_policy = <///. ## Attributes Reference From 76cb602c3910e11fdb1c95765114198e9ff22d8d Mon Sep 17 00:00:00 2001 From: Yamil Asusta Date: Sun, 4 Mar 2018 22:21:54 -0400 Subject: [PATCH 0093/3316] New Data Source: ECS Service --- aws/data_source_aws_ecs_service.go | 83 ++++++++++++++++++++++++ aws/data_source_aws_ecs_service_test.go | 62 ++++++++++++++++++ aws/provider.go | 1 + website/docs/d/ecs_service.html.markdown | 65 +++++++++++++++++++ 4 files changed, 211 insertions(+) create mode 100644 aws/data_source_aws_ecs_service.go create mode 100644 aws/data_source_aws_ecs_service_test.go create mode 100644 website/docs/d/ecs_service.html.markdown diff --git a/aws/data_source_aws_ecs_service.go b/aws/data_source_aws_ecs_service.go new file mode 100644 index 00000000000..cd4b4f04d47 --- /dev/null +++ b/aws/data_source_aws_ecs_service.go @@ -0,0 +1,83 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ecs" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsEcsService() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEcsServiceRead, + + Schema: map[string]*schema.Schema{ + "service_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "desired_count": { + Type: schema.TypeInt, + Optional: true, + }, + "launch_type": { + Type: schema.TypeString, + Optional: true, + }, + "task_definition": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func dataSourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecsconn + + params := &ecs.DescribeServicesInput{ + Cluster: aws.String(d.Get("cluster_arn").(string)), + Services: []*string{aws.String(d.Get("service_name").(string))}, + } + + log.Printf("[DEBUG] Reading ECS Service: %s", params) + desc, err := conn.DescribeServices(params) + + if err != nil { + return err + } + + for _, service := range desc.Services { + if aws.StringValue(service.ClusterArn) != d.Get("cluster_arn").(string) { + continue + } + if aws.StringValue(service.ServiceName) != d.Get("service_name").(string) { + continue + } + d.SetId(aws.StringValue(service.ServiceArn)) + d.Set("service_name", service.ServiceName) + d.Set("arn", service.ServiceArn) + d.Set("cluster_arn", service.ClusterArn) + d.Set("desired_count", service.DesiredCount) + d.Set("launch_type", service.LaunchType) + d.Set("task_definition", service.TaskDefinition) + } + + if d.Id() == "" { + return fmt.Errorf("service with name %q in cluster %q not found", d.Get("service_name").(string), d.Get("cluster_arn").(string)) + } + + return nil +} diff --git a/aws/data_source_aws_ecs_service_test.go b/aws/data_source_aws_ecs_service_test.go new file mode 100644 index 00000000000..f29ba7009dd --- /dev/null +++ b/aws/data_source_aws_ecs_service_test.go @@ -0,0 +1,62 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSEcsDataSource_ecsService(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAwsEcsServiceDataSourceConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_ecs_service.default", "service_name", "mongodb"), + resource.TestCheckResourceAttr("data.aws_ecs_service.default", "desired_count", "1"), + resource.TestCheckResourceAttr("data.aws_ecs_service.default", "launch_type", "EC2"), + resource.TestCheckResourceAttrSet("data.aws_ecs_service.default", "arn"), + resource.TestCheckResourceAttrSet("data.aws_ecs_service.default", "task_definition"), + ), + }, + }, + }) +} + +var testAccCheckAwsEcsServiceDataSourceConfig = fmt.Sprintf(` +resource "aws_ecs_cluster" "default" { + name = "default-%d" +} + +resource "aws_ecs_task_definition" "mongo" { + family = "mongodb" + container_definitions = < Date: Mon, 5 Mar 2018 06:38:49 -0800 Subject: [PATCH 0094/3316] Adding processing_configuration to Elasticsearch section This is a partial fix for the issue listed below. The problem currently is that you can add an extended_s3_configuration to the aws_kinesis_firehose_delivery_stream and set the destionation to 'extended_s3' if you want data transformation to be enabled for S3, but you can't do the same if your destination is 'elastisearch' - this commit fixes that. Support Kinesis Firehose Data Transformation #513 https://github.com/terraform-providers/terraform-provider-aws/issues/513 --- ...source_aws_kinesis_firehose_delivery_stream.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 1d4762f5fc0..e6de5e2f040 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -289,6 +289,7 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De } else if destination.ElasticsearchDestinationDescription != nil { d.Set("destination", "elasticsearch") + roleArn := *destination.ElasticsearchDestinationDescription.RoleARN elasticsearchConfiguration := map[string]interface{}{ "buffering_interval": *destination.ElasticsearchDestinationDescription.BufferingHints.IntervalInSeconds, "buffering_size": *destination.ElasticsearchDestinationDescription.BufferingHints.SizeInMBs, @@ -305,6 +306,10 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De elasticsearchConfiguration["cloudwatch_logging_options"] = flattenCloudwatchLoggingOptions(*v) } + if v := destination.ElasticsearchDestinationDescription.ProcessingConfiguration; v != nil { + elasticsearchConfiguration["processing_configuration"] = flattenProcessingConfiguration(*v, roleArn) + } + elasticsearchConfList := make([]map[string]interface{}, 1) elasticsearchConfList[0] = elasticsearchConfiguration d.Set("elasticsearch_configuration", elasticsearchConfList) @@ -679,6 +684,8 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { }, "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), + + "processing_configuration": processingConfigurationSchema(), }, }, }, @@ -1107,6 +1114,10 @@ func createElasticsearchConfig(d *schema.ResourceData, s3Config *firehose.S3Dest config.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(es) } + if _, ok := es["processing_configuration"]; ok { + config.ProcessingConfiguration = extractProcessingConfiguration(es) + } + if indexRotationPeriod, ok := es["index_rotation_period"]; ok { config.IndexRotationPeriod = aws.String(indexRotationPeriod.(string)) } @@ -1140,6 +1151,10 @@ func updateElasticsearchConfig(d *schema.ResourceData, s3Update *firehose.S3Dest update.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(es) } + if _, ok := es["processing_configuration"]; ok { + update.ProcessingConfiguration = extractProcessingConfiguration(es) + } + if indexRotationPeriod, ok := es["index_rotation_period"]; ok { update.IndexRotationPeriod = aws.String(indexRotationPeriod.(string)) } From 2b51929dc429189af3487d0d8f96b5e18bc5cb46 Mon Sep 17 00:00:00 2001 From: James Renfro Date: Mon, 5 Mar 2018 06:38:49 -0800 Subject: [PATCH 0095/3316] Adding processing_configuration to Elasticsearch section This is a partial fix for the issue listed below. The problem currently is that you can add an extended_s3_configuration to the aws_kinesis_firehose_delivery_stream and set the destionation to 'extended_s3' if you want data transformation to be enabled for S3, but you can't do the same if your destination is 'elastisearch' - this commit fixes that. Support Kinesis Firehose Data Transformation #513 https://github.com/terraform-providers/terraform-provider-aws/issues/513 --- ...source_aws_kinesis_firehose_delivery_stream.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 1d4762f5fc0..e6de5e2f040 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -289,6 +289,7 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De } else if destination.ElasticsearchDestinationDescription != nil { d.Set("destination", "elasticsearch") + roleArn := *destination.ElasticsearchDestinationDescription.RoleARN elasticsearchConfiguration := map[string]interface{}{ "buffering_interval": *destination.ElasticsearchDestinationDescription.BufferingHints.IntervalInSeconds, "buffering_size": *destination.ElasticsearchDestinationDescription.BufferingHints.SizeInMBs, @@ -305,6 +306,10 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De elasticsearchConfiguration["cloudwatch_logging_options"] = flattenCloudwatchLoggingOptions(*v) } + if v := destination.ElasticsearchDestinationDescription.ProcessingConfiguration; v != nil { + elasticsearchConfiguration["processing_configuration"] = flattenProcessingConfiguration(*v, roleArn) + } + elasticsearchConfList := make([]map[string]interface{}, 1) elasticsearchConfList[0] = elasticsearchConfiguration d.Set("elasticsearch_configuration", elasticsearchConfList) @@ -679,6 +684,8 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { }, "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), + + "processing_configuration": processingConfigurationSchema(), }, }, }, @@ -1107,6 +1114,10 @@ func createElasticsearchConfig(d *schema.ResourceData, s3Config *firehose.S3Dest config.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(es) } + if _, ok := es["processing_configuration"]; ok { + config.ProcessingConfiguration = extractProcessingConfiguration(es) + } + if indexRotationPeriod, ok := es["index_rotation_period"]; ok { config.IndexRotationPeriod = aws.String(indexRotationPeriod.(string)) } @@ -1140,6 +1151,10 @@ func updateElasticsearchConfig(d *schema.ResourceData, s3Update *firehose.S3Dest update.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(es) } + if _, ok := es["processing_configuration"]; ok { + update.ProcessingConfiguration = extractProcessingConfiguration(es) + } + if indexRotationPeriod, ok := es["index_rotation_period"]; ok { update.IndexRotationPeriod = aws.String(indexRotationPeriod.(string)) } From 6a52044c6d1fe4ba859479d9fc385502a05e1de7 Mon Sep 17 00:00:00 2001 From: James Renfro Date: Mon, 5 Mar 2018 07:09:55 -0800 Subject: [PATCH 0096/3316] Adjusting documentation to include processing_configuration for elasticsearch destination --- ...esis_firehose_delivery_stream.html.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown index 0b850d23490..18017b8d858 100644 --- a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown +++ b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown @@ -203,6 +203,23 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { role_arn = "${aws_iam_role.firehose_role.arn}" index_name = "test" type_name = "test" + + processing_configuration = [ + { + enabled = "true" + processors = [ + { + type = "Lambda" + parameters = [ + { + parameter_name = "LambdaArn" + parameter_value = "${aws_lambda_function.lambda_processor.arn}:$LATEST" + } + ] + } + ] + } + ] } } ``` @@ -295,6 +312,7 @@ The `elasticsearch_configuration` object supports the following: * `s3_backup_mode` - (Optional) Defines how documents should be delivered to Amazon S3. Valid values are `FailedDocumentsOnly` and `AllDocuments`. Default value is `FailedDocumentsOnly`. * `type_name` - (Required) The Elasticsearch type name with maximum length of 100 characters. * `cloudwatch_logging_options` - (Optional) The CloudWatch Logging Options for the delivery stream. More details are given below +* `processing_configuration` - (Optional) The data processing configuration. More details are given below. The `splunk_configuration` objects supports the following: From b28556e77754c991c5e1c721a553a6cab20b9c50 Mon Sep 17 00:00:00 2001 From: vpadronblanco Date: Mon, 5 Mar 2018 10:19:38 -0500 Subject: [PATCH 0097/3316] resolved issue with testing file --- aws/data_source_aws_eip_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/data_source_aws_eip_test.go b/aws/data_source_aws_eip_test.go index 9aeff70b755..718effd36ed 100644 --- a/aws/data_source_aws_eip_test.go +++ b/aws/data_source_aws_eip_test.go @@ -68,7 +68,7 @@ func TestAccDataSourceAwsEip_tags(t *testing.T) { resource.TestStep{ Config: testAccDataSourceAwsEip_tags_config(rInt), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_eip.test", "tags.%", "2"), + testAccDataSourceAwsEipCheck("data.aws_eip.by_tag"), ), }, }, @@ -112,7 +112,7 @@ data "aws_eip" "by_tag" { test_tag = "${aws_eip.test.tags["test_tag"]}" random_tag = "%d" } - depends_on = ["aws_eip.test"] + public_ip = "${aws_eip.test.public_ip}" } -`, rInt) +`, rInt, rInt) } From 7756cf2549ddba225e8353054ee104332cf9b4b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Socha?= Date: Tue, 6 Mar 2018 10:31:53 +0100 Subject: [PATCH 0098/3316] Add code --- aws/resource_aws_cognito_identity_provider.go | 185 ++++++++++++++++++ ...urce_aws_cognito_identity_provider_test.go | 81 ++++++++ aws/structure.go | 17 ++ 3 files changed, 283 insertions(+) create mode 100644 aws/resource_aws_cognito_identity_provider.go create mode 100644 aws/resource_aws_cognito_identity_provider_test.go diff --git a/aws/resource_aws_cognito_identity_provider.go b/aws/resource_aws_cognito_identity_provider.go new file mode 100644 index 00000000000..806bc3851cb --- /dev/null +++ b/aws/resource_aws_cognito_identity_provider.go @@ -0,0 +1,185 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCognitoIdentityProvider() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCognitoIdentityProviderCreate, + Read: resourceAwsCognitoIdentityProviderRead, + Update: resourceAwsCognitoIdentityProviderUpdate, + Delete: resourceAwsCognitoIdentityProviderDelete, + + Timeouts: &schema.ResourceTimeout{ + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "attribute_mapping": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + "idp_identifiers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + "provider_details": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + "provider_name": { + Type: schema.TypeString, + Required: true, + }, + + "provider_type": { + Type: schema.TypeString, + Required: true, + }, + + "user_pool_id": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func resourceAwsCognitoIdentityProviderCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Print("[DEBUG] Creating Cognito Identity Provider") + + name := aws.String(d.Get("provider_name").(string)) + params := &cognitoidentityprovider.CreateIdentityProviderInput{ + ProviderName: name, + ProviderType: aws.String(d.Get("provider_type").(string)), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), + } + + if v, ok := d.GetOk("attribute_mapping"); ok { + params.AttributeMapping = expandCognitoIdentityProviderMap(v.(map[string]interface{})) + } + + if v, ok := d.GetOk("provider_details"); ok { + params.ProviderDetails = expandCognitoIdentityProviderMap(v.(map[string]interface{})) + } + + if v, ok := d.GetOk("idp_identifiers"); ok { + params.IdpIdentifiers = expandStringList(v.([]interface{})) + } + + _, err := conn.CreateIdentityProvider(params) + if err != nil { + return fmt.Errorf("Error creating Cognito Identity Provider: %s", err) + } + + d.SetId(*name) + + return resourceAwsCognitoIdentityProviderRead(d, meta) +} + +func resourceAwsCognitoIdentityProviderRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Printf("[DEBUG] Reading Cognito Identity Provider: %s", d.Id()) + + ret, err := conn.DescribeIdentityProvider(&cognitoidentityprovider.DescribeIdentityProviderInput{ + ProviderName: aws.String(d.Id()), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), + }) + + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { + d.SetId("") + return nil + } + return err + } + + ip := ret.IdentityProvider + d.Set("provider_name", ip.ProviderName) + d.Set("provider_type", ip.ProviderType) + d.Set("user_pool_id", ip.UserPoolId) + + if err := d.Set("attribute_mapping", flattenCognitoIdentityProviderMap(ip.AttributeMapping)); err != nil { + return fmt.Errorf("[DEBUG] Error setting attribute_mapping error: %#v", err) + } + + if err := d.Set("provider_details", flattenCognitoIdentityProviderMap(ip.ProviderDetails)); err != nil { + return fmt.Errorf("[DEBUG] Error setting provider_details error: %#v", err) + } + + if err := d.Set("idp_identifiers", flattenStringList(ip.IdpIdentifiers)); err != nil { + return fmt.Errorf("[DEBUG] Error setting idp_identifiers error: %#v", err) + } + + return nil +} + +func resourceAwsCognitoIdentityProviderUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Print("[DEBUG] Updating Cognito Identity Provider") + + params := &cognitoidentityprovider.UpdateIdentityProviderInput{ + UserPoolId: aws.String(d.Get("UserPoolId").(string)), + ProviderName: aws.String(d.Id()), + } + + if d.HasChange("attribute_mapping") { + params.AttributeMapping = expandCognitoIdentityProviderMap(d.Get("attribute_mapping").(map[string]interface{})) + } + + if d.HasChange("provider_details") { + params.ProviderDetails = expandCognitoIdentityProviderMap(d.Get("provider_details").(map[string]interface{})) + } + + if d.HasChange("idp_identifiers") { + params.IdpIdentifiers = expandStringList(d.Get("supported_login_providers").([]interface{})) + } + + _, err := conn.UpdateIdentityProvider(params) + if err != nil { + return fmt.Errorf("Error updating Cognito Identity Provider: %s", err) + } + + return resourceAwsCognitoIdentityProviderRead(d, meta) +} + +func resourceAwsCognitoIdentityProviderDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + log.Printf("[DEBUG] Deleting Cognito Identity Provider: %s", d.Id()) + + return resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + _, err := conn.DeleteIdentityProvider(&cognitoidentityprovider.DeleteIdentityProviderInput{ + ProviderName: aws.String(d.Id()), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), + }) + + if err == nil { + d.SetId("") + return nil + } + + return resource.NonRetryableError(err) + }) +} diff --git a/aws/resource_aws_cognito_identity_provider_test.go b/aws/resource_aws_cognito_identity_provider_test.go new file mode 100644 index 00000000000..52e6fd9885c --- /dev/null +++ b/aws/resource_aws_cognito_identity_provider_test.go @@ -0,0 +1,81 @@ +package aws + +import ( + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSCognitoIdentityProvider_basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCognitoIdentityProviderDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCognitoIdentityProviderConfig_basic(), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_name", "gprovider"), + ), + }, + }, + }) +} + +func testAccCheckAWSCognitoIdentityProviderDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).cognitoidpconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_cognito_identity_provider" { + continue + } + + _, err := conn.DescribeIdentityProvider(&cognitoidentityprovider.DescribeIdentityProviderInput{ + ProviderName: aws.String(rs.Primary.ID), + UserPoolId: aws.String(rs.Primary.Attributes["user_pool_id"]), + }) + + if err != nil { + if wserr, ok := err.(awserr.Error); ok && wserr.Code() == "ResourceNotFoundException" { + return nil + } + return err + } + } + + return nil +} + +func testAccAWSCognitoIdentityProviderConfig_basic() string { + return ` + +resource "aws_cognito_user_pool" "tf_test_pool" { + name = "tfmytestpool" + auto_verified_attributes = ["email"] +} + +resource "aws_cognito_identity_provider" "tf_test_provider" { + user_pool_id = "${aws_cognito_user_pool.tf_test_pool.id}" + provider_name = "gprovider" + provider_type = "Google" + + provider_details { + attributes_url = "https://people.googleapis.com/v1/people/me?personFields=" + authorize_scopes = "email" + token_request_method = "POST" + token_url = "https://www.googleapis.com/oauth2/v4/token" + client_id = "239432985801-nq4c0l7cdpa16sa2cnlvr5mcgdt0gkug.apps.googleusercontent.com" + client_secret = "client_secret" + } + + attribute_mapping { + email = "email" + username = "sub" + } +} +` +} diff --git a/aws/structure.go b/aws/structure.go index 39a0ad00db5..ad8c68fdcd2 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -3035,6 +3035,23 @@ func flattenCognitoIdentityPoolRoles(config map[string]*string) map[string]strin return m } +func expandCognitoIdentityProviderMap(config map[string]interface{}) map[string]*string { + m := map[string]*string{} + for k, v := range config { + s := v.(string) + m[k] = &s + } + return m +} + +func flattenCognitoIdentityProviderMap(config map[string]*string) map[string]string { + m := map[string]string{} + for k, v := range config { + m[k] = *v + } + return m +} + func expandCognitoIdentityPoolRoleMappingsAttachment(rms []interface{}) map[string]*cognitoidentity.RoleMapping { values := make(map[string]*cognitoidentity.RoleMapping, 0) From a8b5a3d19619f2c0a6f7f128b824eb6244f24500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Socha?= Date: Tue, 6 Mar 2018 11:47:16 +0100 Subject: [PATCH 0099/3316] Add documentation --- .../r/cognito_identity_provider.html.markdown | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 website/docs/r/cognito_identity_provider.html.markdown diff --git a/website/docs/r/cognito_identity_provider.html.markdown b/website/docs/r/cognito_identity_provider.html.markdown new file mode 100644 index 00000000000..86969b29bea --- /dev/null +++ b/website/docs/r/cognito_identity_provider.html.markdown @@ -0,0 +1,51 @@ +--- +layout: "aws" +page_title: "AWS: aws_cognito_identity_provider" +side_bar_current: "docs-aws-resource-cognito-identity-provider" +description: |- + Provides a Cognito User Identity Provider resource. +--- + +# aws_cognito_identity_provider + +Provides a Cognito User Identity Provider resource. + +## Example Usage + +### Basic configuration + +```hcl +resource "aws_cognito_user_pool" "example" { + name = "example-pool" + auto_verified_attributes = ["email"] +} + +resource "aws_cognito_identity_provider" "example_provider" { + user_pool_id = "${aws_cognito_user_pool.example.id}" + provider_name = "example_name" + provider_type = "Google" + + provider_details { + authorize_scopes = "email" + client_id = "your client_id" + client_secret = "your client_secret" + } + + attribute_mapping { + email = "email" + username = "sub" + } +} +``` + + +## Argument Reference + +The following arguments are supported: + +* `user_pool_id` (Required) - The user pool id +* `provider_name` (Required) - The provider name +* `provider_type` (Required) - The provider type. [See AWS API for valid values](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-ProviderType) +* `attribute_mapping` (Optional) - The map of attribute mapping of user pool attributes. [AttributeMapping in AWS API documentation](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-AttributeMapping) +* `idp_identifiers` (Optional) - The list of identity providers. +* `provider_details` (Optional) - The map of identity details, sucha as access token From 17ac7cc9b41c78bfa64080f344235c54774a7dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Socha?= Date: Wed, 7 Mar 2018 23:51:47 +0100 Subject: [PATCH 0100/3316] Cleanup code, add extra tests, fix typos in manual --- aws/resource_aws_cognito_identity_provider.go | 7 +---- ...urce_aws_cognito_identity_provider_test.go | 26 ++++++++++++++----- .../r/cognito_identity_provider.html.markdown | 8 +++++- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_cognito_identity_provider.go b/aws/resource_aws_cognito_identity_provider.go index 806bc3851cb..3e9a8b6be21 100644 --- a/aws/resource_aws_cognito_identity_provider.go +++ b/aws/resource_aws_cognito_identity_provider.go @@ -27,9 +27,6 @@ func resourceAwsCognitoIdentityProvider() *schema.Resource { "attribute_mapping": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, }, "idp_identifiers": { @@ -43,9 +40,7 @@ func resourceAwsCognitoIdentityProvider() *schema.Resource { "provider_details": { Type: schema.TypeMap, Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, + Computed: true, }, "provider_name": { diff --git a/aws/resource_aws_cognito_identity_provider_test.go b/aws/resource_aws_cognito_identity_provider_test.go index 52e6fd9885c..4e4cd86df1a 100644 --- a/aws/resource_aws_cognito_identity_provider_test.go +++ b/aws/resource_aws_cognito_identity_provider_test.go @@ -19,7 +19,18 @@ func TestAccAWSCognitoIdentityProvider_basic(t *testing.T) { { Config: testAccAWSCognitoIdentityProviderConfig_basic(), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_name", "gprovider"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_name", "Google"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_type", "Google"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.%", "9"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.authorize_scopes", "email"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.authorize_url", "https://accounts.google.com/o/oauth2/v2/auth"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.client_id", "test-url.apps.googleusercontent.com"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.client_secret", "client_secret"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.attributes_url", "https://people.googleapis.com/v1/people/me?personFields="), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.attributes_url_add_attributes", "true"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.token_request_method", "POST"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.token_url", "https://www.googleapis.com/oauth2/v4/token"), + resource.TestCheckResourceAttr("aws_cognito_identity_provider.tf_test_provider", "provider_details.oidc_issuer", "https://accounts.google.com"), ), }, }, @@ -60,16 +71,19 @@ resource "aws_cognito_user_pool" "tf_test_pool" { resource "aws_cognito_identity_provider" "tf_test_provider" { user_pool_id = "${aws_cognito_user_pool.tf_test_pool.id}" - provider_name = "gprovider" + provider_name = "Google" provider_type = "Google" provider_details { - attributes_url = "https://people.googleapis.com/v1/people/me?personFields=" authorize_scopes = "email" - token_request_method = "POST" - token_url = "https://www.googleapis.com/oauth2/v4/token" - client_id = "239432985801-nq4c0l7cdpa16sa2cnlvr5mcgdt0gkug.apps.googleusercontent.com" + client_id = "test-url.apps.googleusercontent.com" client_secret = "client_secret" + attributes_url = "https://people.googleapis.com/v1/people/me?personFields=" + attributes_url_add_attributes = "true" + authorize_url = "https://accounts.google.com/o/oauth2/v2/auth" + oidc_issuer = "https://accounts.google.com" + token_request_method = "POST" + token_url = "https://www.googleapis.com/oauth2/v4/token" } attribute_mapping { diff --git a/website/docs/r/cognito_identity_provider.html.markdown b/website/docs/r/cognito_identity_provider.html.markdown index 86969b29bea..338c46f5c5b 100644 --- a/website/docs/r/cognito_identity_provider.html.markdown +++ b/website/docs/r/cognito_identity_provider.html.markdown @@ -48,4 +48,10 @@ The following arguments are supported: * `provider_type` (Required) - The provider type. [See AWS API for valid values](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-ProviderType) * `attribute_mapping` (Optional) - The map of attribute mapping of user pool attributes. [AttributeMapping in AWS API documentation](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateIdentityProvider.html#CognitoUserPools-CreateIdentityProvider-request-AttributeMapping) * `idp_identifiers` (Optional) - The list of identity providers. -* `provider_details` (Optional) - The map of identity details, sucha as access token +* `provider_details` (Optional) - The map of identity details, such as access token + +## Timeouts + +`aws_cognito_identity_provider` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: +- `delete` - (Default `5 minutes`) Used for provider deletion From a4cb8ca5938ce0d92989a34a1463147fae20e62a Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Thu, 8 Mar 2018 18:46:34 +0100 Subject: [PATCH 0101/3316] ValidateFunc: health_check_grace_period_seconds and network_mode for ecs_* --- aws/resource_aws_ecs_service.go | 11 ++----- aws/resource_aws_ecs_service_test.go | 4 +-- aws/resource_aws_ecs_task_definition.go | 32 +++++++------------- aws/resource_aws_ecs_task_definition_test.go | 25 --------------- 4 files changed, 15 insertions(+), 57 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index fa72419e4a5..65d61a2a27b 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) var taskDefinitionRE = regexp.MustCompile("^([a-zA-Z0-9_-]+):([0-9]+)$") @@ -54,7 +55,7 @@ func resourceAwsEcsService() *schema.Resource { "health_check_grace_period_seconds": { Type: schema.TypeInt, Optional: true, - ValidateFunc: validateAwsEcsServiceHealthCheckGracePeriodSeconds, + ValidateFunc: validation.IntBetween(0, 1800), }, "launch_type": { @@ -701,11 +702,3 @@ func parseTaskDefinition(taskDefinition string) (string, string, error) { return matches[0][1], matches[0][2], nil } - -func validateAwsEcsServiceHealthCheckGracePeriodSeconds(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if (value < 0) || (value > 1800) { - errors = append(errors, fmt.Errorf("%q must be between 0 and 1800", k)) - } - return -} diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index 60ec6bcf6ab..603b26225aa 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -254,12 +254,12 @@ func TestAccAWSEcsService_healthCheckGracePeriodSeconds(t *testing.T) { { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, roleName, policyName, tgName, lbName, svcName, -1), - ExpectError: regexp.MustCompile(`must be between 0 and 1800`), + ExpectError: regexp.MustCompile(`expected health_check_grace_period_seconds to be in the range`), }, { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, roleName, policyName, tgName, lbName, svcName, 1801), - ExpectError: regexp.MustCompile(`must be between 0 and 1800`), + ExpectError: regexp.MustCompile(`expected health_check_grace_period_seconds to be in the range`), }, { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, diff --git a/aws/resource_aws_ecs_task_definition.go b/aws/resource_aws_ecs_task_definition.go index c03695fa052..7d039eae890 100644 --- a/aws/resource_aws_ecs_task_definition.go +++ b/aws/resource_aws_ecs_task_definition.go @@ -4,13 +4,13 @@ import ( "bytes" "fmt" "log" - "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsEcsTaskDefinition() *schema.Resource { @@ -79,11 +79,16 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { }, "network_mode": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateAwsEcsTaskDefinitionNetworkMode, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ecs.NetworkModeBridge, + ecs.NetworkModeHost, + ecs.NetworkModeAwsvpc, + ecs.NetworkModeNone, + }, false), }, "volume": { @@ -139,21 +144,6 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { } } -func validateAwsEcsTaskDefinitionNetworkMode(v interface{}, k string) (ws []string, errors []error) { - value := strings.ToLower(v.(string)) - validTypes := map[string]struct{}{ - "bridge": {}, - "host": {}, - "awsvpc": {}, - "none": {}, - } - - if _, ok := validTypes[value]; !ok { - errors = append(errors, fmt.Errorf("ECS Task Definition network_mode %q is invalid, must be `bridge`, `host`, `awsvpc` or `none`", value)) - } - return -} - func validateAwsEcsTaskDefinitionContainerDefinitions(v interface{}, k string) (ws []string, errors []error) { value := v.(string) _, err := expandEcsContainerDefinitions(value) diff --git a/aws/resource_aws_ecs_task_definition_test.go b/aws/resource_aws_ecs_task_definition_test.go index f9008c49d4b..a5b91e79db4 100644 --- a/aws/resource_aws_ecs_task_definition_test.go +++ b/aws/resource_aws_ecs_task_definition_test.go @@ -279,31 +279,6 @@ func testAccCheckAWSTaskDefinitionConstraintsAttrs(def *ecs.TaskDefinition) reso return nil } } -func TestValidateAwsEcsTaskDefinitionNetworkMode(t *testing.T) { - validNames := []string{ - "bridge", - "host", - "none", - } - for _, v := range validNames { - _, errors := validateAwsEcsTaskDefinitionNetworkMode(v, "network_mode") - if len(errors) != 0 { - t.Fatalf("%q should be a valid AWS ECS Task Definition Network Mode: %q", v, errors) - } - } - - invalidNames := []string{ - "bridged", - "-docker", - } - for _, v := range invalidNames { - _, errors := validateAwsEcsTaskDefinitionNetworkMode(v, "network_mode") - if len(errors) == 0 { - t.Fatalf("%q should be an invalid AWS ECS Task Definition Network Mode", v) - } - } -} - func TestValidateAwsEcsTaskDefinitionContainerDefinitions(t *testing.T) { validDefinitions := []string{ testValidateAwsEcsTaskDefinitionValidContainerDefinitions, From 3330e2a469bf86d7f50aba9e5b7a9c430445c449 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sun, 11 Mar 2018 15:53:38 +0100 Subject: [PATCH 0102/3316] resource/autoscaling_policy: cleanup code --- aws/resource_aws_autoscaling_policy.go | 58 ++++++++++----------- aws/resource_aws_autoscaling_policy_test.go | 16 +++--- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/aws/resource_aws_autoscaling_policy.go b/aws/resource_aws_autoscaling_policy.go index 303c863b179..a9d7b8d630a 100644 --- a/aws/resource_aws_autoscaling_policy.go +++ b/aws/resource_aws_autoscaling_policy.go @@ -21,73 +21,73 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { Delete: resourceAwsAutoscalingPolicyDelete, Schema: map[string]*schema.Schema{ - "arn": &schema.Schema{ + "arn": { Type: schema.TypeString, Computed: true, }, - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "adjustment_type": &schema.Schema{ + "adjustment_type": { Type: schema.TypeString, Optional: true, }, - "autoscaling_group_name": &schema.Schema{ + "autoscaling_group_name": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "policy_type": &schema.Schema{ + "policy_type": { Type: schema.TypeString, Optional: true, Default: "SimpleScaling", // preserve AWS's default to make validation easier. }, - "cooldown": &schema.Schema{ + "cooldown": { Type: schema.TypeInt, Optional: true, }, - "estimated_instance_warmup": &schema.Schema{ + "estimated_instance_warmup": { Type: schema.TypeInt, Optional: true, }, - "metric_aggregation_type": &schema.Schema{ + "metric_aggregation_type": { Type: schema.TypeString, Optional: true, Computed: true, }, - "min_adjustment_magnitude": &schema.Schema{ + "min_adjustment_magnitude": { Type: schema.TypeInt, Optional: true, ValidateFunc: validation.IntAtLeast(1), }, - "min_adjustment_step": &schema.Schema{ + "min_adjustment_step": { Type: schema.TypeInt, Optional: true, Deprecated: "Use min_adjustment_magnitude instead, otherwise you may see a perpetual diff on this resource.", ConflictsWith: []string{"min_adjustment_magnitude"}, }, - "scaling_adjustment": &schema.Schema{ + "scaling_adjustment": { Type: schema.TypeInt, Optional: true, ConflictsWith: []string{"step_adjustment"}, }, - "step_adjustment": &schema.Schema{ + "step_adjustment": { Type: schema.TypeSet, Optional: true, ConflictsWith: []string{"scaling_adjustment"}, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "metric_interval_lower_bound": &schema.Schema{ + "metric_interval_lower_bound": { Type: schema.TypeString, Optional: true, }, - "metric_interval_upper_bound": &schema.Schema{ + "metric_interval_upper_bound": { Type: schema.TypeString, Optional: true, }, - "scaling_adjustment": &schema.Schema{ + "scaling_adjustment": { Type: schema.TypeInt, Required: true, }, @@ -95,77 +95,77 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { }, Set: resourceAwsAutoscalingScalingAdjustmentHash, }, - "target_tracking_configuration": &schema.Schema{ + "target_tracking_configuration": { Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "predefined_metric_specification": &schema.Schema{ + "predefined_metric_specification": { Type: schema.TypeList, Optional: true, MaxItems: 1, ConflictsWith: []string{"target_tracking_configuration.0.customized_metric_specification"}, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "predefined_metric_type": &schema.Schema{ + "predefined_metric_type": { Type: schema.TypeString, Required: true, }, - "resource_label": &schema.Schema{ + "resource_label": { Type: schema.TypeString, Optional: true, }, }, }, }, - "customized_metric_specification": &schema.Schema{ + "customized_metric_specification": { Type: schema.TypeList, Optional: true, MaxItems: 1, ConflictsWith: []string{"target_tracking_configuration.0.predefined_metric_specification"}, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "metric_dimension": &schema.Schema{ + "metric_dimension": { Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, }, - "value": &schema.Schema{ + "value": { Type: schema.TypeString, Required: true, }, }, }, }, - "metric_name": &schema.Schema{ + "metric_name": { Type: schema.TypeString, Required: true, }, - "namespace": &schema.Schema{ + "namespace": { Type: schema.TypeString, Required: true, }, - "statistic": &schema.Schema{ + "statistic": { Type: schema.TypeString, Required: true, }, - "unit": &schema.Schema{ + "unit": { Type: schema.TypeString, Optional: true, }, }, }, }, - "target_value": &schema.Schema{ + "target_value": { Type: schema.TypeFloat, Required: true, }, - "disable_scale_in": &schema.Schema{ + "disable_scale_in": { Type: schema.TypeBool, Optional: true, Default: false, diff --git a/aws/resource_aws_autoscaling_policy_test.go b/aws/resource_aws_autoscaling_policy_test.go index 3e4ad5d3cf9..61df8caeee3 100644 --- a/aws/resource_aws_autoscaling_policy_test.go +++ b/aws/resource_aws_autoscaling_policy_test.go @@ -25,7 +25,7 @@ func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSAutoscalingPolicyConfig(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), @@ -58,7 +58,7 @@ func TestAccAWSAutoscalingPolicy_disappears(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSAutoscalingPolicyConfig(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), @@ -118,7 +118,7 @@ func TestAccAWSAutoscalingPolicy_upgrade(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSAutoscalingPolicyConfig_upgrade_614(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), @@ -128,7 +128,7 @@ func TestAccAWSAutoscalingPolicy_upgrade(t *testing.T) { ExpectNonEmptyPlan: true, }, - resource.TestStep{ + { Config: testAccAWSAutoscalingPolicyConfig_upgrade_615(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), @@ -150,7 +150,7 @@ func TestAccAWSAutoscalingPolicy_TargetTrack_Predefined(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAwsAutoscalingPolicyConfig_TargetTracking_Predefined(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.test", &policy), @@ -170,7 +170,7 @@ func TestAccAWSAutoscalingPolicy_TargetTrack_Custom(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAwsAutoscalingPolicyConfig_TargetTracking_Custom(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.test", &policy), @@ -189,7 +189,7 @@ func TestAccAWSAutoscalingPolicy_zerovalue(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSAutoscalingPolicyConfig_zerovalue(acctest.RandString(5)), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &simplepolicy), @@ -391,7 +391,7 @@ func TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSAutoscalingPolicyConfig_SimpleScalingStepAdjustment(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), From a3d379e72d55f1b1d3261e5554be121abe784e48 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sun, 11 Mar 2018 20:55:20 +0100 Subject: [PATCH 0103/3316] resource/autoscaling_policy: cleanup acceptance test --- aws/resource_aws_autoscaling_policy_test.go | 392 ++++++++------------ 1 file changed, 154 insertions(+), 238 deletions(-) diff --git a/aws/resource_aws_autoscaling_policy_test.go b/aws/resource_aws_autoscaling_policy_test.go index 61df8caeee3..78e9a32a66e 100644 --- a/aws/resource_aws_autoscaling_policy_test.go +++ b/aws/resource_aws_autoscaling_policy_test.go @@ -18,7 +18,7 @@ import ( func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { var policy autoscaling.ScalingPolicy - name := fmt.Sprintf("terraform-test-foobar-%s", acctest.RandString(5)) + name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -26,22 +26,32 @@ func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSAutoscalingPolicyConfig(name), + Config: testAccAWSAutoscalingPolicyConfig_basic(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "adjustment_type", "ChangeInCapacity"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "policy_type", "SimpleScaling"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "cooldown", "300"), - resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "name", "foobar_simple"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "name", name+"-foobar_simple"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "scaling_adjustment", "2"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "autoscaling_group_name", name), testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_step", &policy), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "adjustment_type", "ChangeInCapacity"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "policy_type", "StepScaling"), - resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "name", "foobar_step"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "name", name+"-foobar_step"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "metric_aggregation_type", "Minimum"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "estimated_instance_warmup", "200"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "autoscaling_group_name", name), + testAccCheckScalingPolicyExists("aws_autoscaling_policy.ecs_general_purpose_scale_out", &policy), + resource.TestCheckResourceAttr("aws_autoscaling_policy.ecs_general_purpose_scale_out", "name", "memory-reservation-high"), + ), + }, + { + Config: testAccAWSAutoscalingPolicyConfig_basicUpdate(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckScalingPolicyExists("aws_autoscaling_policy.ecs_general_purpose_scale_out", &policy), + resource.TestCheckResourceAttr("aws_autoscaling_policy.ecs_general_purpose_scale_out", "name", "memory-reservation-high"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.ecs_general_purpose_scale_out", "step_adjustment.#", "1"), ), }, }, @@ -51,7 +61,7 @@ func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { func TestAccAWSAutoscalingPolicy_disappears(t *testing.T) { var policy autoscaling.ScalingPolicy - name := fmt.Sprintf("terraform-test-foobar-%s", acctest.RandString(5)) + name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -59,7 +69,7 @@ func TestAccAWSAutoscalingPolicy_disappears(t *testing.T) { CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSAutoscalingPolicyConfig(name), + Config: testAccAWSAutoscalingPolicyConfig_basic(name), Check: resource.ComposeTestCheckFunc( testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), testAccCheckScalingPolicyDisappears(&policy), @@ -111,7 +121,7 @@ func testAccCheckScalingPolicyDisappears(conf *autoscaling.ScalingPolicy) resour func TestAccAWSAutoscalingPolicy_upgrade(t *testing.T) { var policy autoscaling.ScalingPolicy - name := acctest.RandString(5) + name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -127,7 +137,6 @@ func TestAccAWSAutoscalingPolicy_upgrade(t *testing.T) { ), ExpectNonEmptyPlan: true, }, - { Config: testAccAWSAutoscalingPolicyConfig_upgrade_615(name), Check: resource.ComposeTestCheckFunc( @@ -140,10 +149,32 @@ func TestAccAWSAutoscalingPolicy_upgrade(t *testing.T) { }) } +func TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment(t *testing.T) { + var policy autoscaling.ScalingPolicy + + name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAutoscalingPolicyConfig_SimpleScalingStepAdjustment(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "adjustment_type", "ExactCapacity"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "scaling_adjustment", "0"), + ), + }, + }, + }) +} + func TestAccAWSAutoscalingPolicy_TargetTrack_Predefined(t *testing.T) { var policy autoscaling.ScalingPolicy - name := acctest.RandString(5) + name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -163,7 +194,7 @@ func TestAccAWSAutoscalingPolicy_TargetTrack_Predefined(t *testing.T) { func TestAccAWSAutoscalingPolicy_TargetTrack_Custom(t *testing.T) { var policy autoscaling.ScalingPolicy - name := acctest.RandString(5) + name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -256,42 +287,50 @@ func testAccCheckAWSAutoscalingPolicyDestroy(s *terraform.State) error { return nil } -func testAccAWSAutoscalingPolicyConfig(name string) string { +func testAccAWSAutoscalingPolicyConfig_base(name string) string { return fmt.Sprintf(` -resource "aws_launch_configuration" "foobar" { +data "aws_ami" "amzn" { + most_recent = true + owners = ["amazon"] + + filter { + name = "name" + values = ["amzn2-ami-hvm-*"] + } +} + +data "aws_availability_zones" "available" {} + +resource "aws_launch_configuration" "test" { name = "%s" - image_id = "ami-21f78e11" - instance_type = "t1.micro" + image_id = "${data.aws_ami.amzn.id}" + instance_type = "t2.micro" } -resource "aws_autoscaling_group" "foobar" { - availability_zones = ["us-west-2a"] +resource "aws_autoscaling_group" "test" { + availability_zones = ["${data.aws_availability_zones.available.names}"] name = "%s" - max_size = 5 - min_size = 2 - health_check_grace_period = 300 - health_check_type = "ELB" + max_size = 0 + min_size = 0 force_delete = true - termination_policies = ["OldestInstance"] - launch_configuration = "${aws_launch_configuration.foobar.name}" - tag { - key = "Foo" - value = "foo-bar" - propagate_at_launch = true - } + launch_configuration = "${aws_launch_configuration.test.name}" +} +`, name, name) } +func testAccAWSAutoscalingPolicyConfig_basic(name string) string { + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "foobar_simple" + name = "%s-foobar_simple" adjustment_type = "ChangeInCapacity" cooldown = 300 policy_type = "SimpleScaling" scaling_adjustment = 2 - autoscaling_group_name = "${aws_autoscaling_group.foobar.name}" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } resource "aws_autoscaling_policy" "foobar_step" { - name = "foobar_step" + name = "%s-foobar_step" adjustment_type = "ChangeInCapacity" policy_type = "StepScaling" estimated_instance_warmup = 200 @@ -300,180 +339,116 @@ resource "aws_autoscaling_policy" "foobar_step" { scaling_adjustment = 1 metric_interval_lower_bound = 2.0 } - autoscaling_group_name = "${aws_autoscaling_group.foobar.name}" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" +} + +resource "aws_autoscaling_policy" "ecs_general_purpose_scale_out" { + name = "memory-reservation-high" + + autoscaling_group_name = "${aws_autoscaling_group.test.name}" + estimated_instance_warmup = 60 + + adjustment_type = "PercentChangeInCapacity" + policy_type = "StepScaling" + + metric_aggregation_type = "Maximum" + + step_adjustment { + scaling_adjustment = 100 + metric_interval_lower_bound = 0 + } } `, name, name) } -func testAccAWSAutoscalingPolicyConfig_upgrade_614(name string) string { - return fmt.Sprintf(` -resource "aws_launch_configuration" "foobar" { - name = "tf-test-%s" - image_id = "ami-21f78e11" - instance_type = "t1.micro" -} - -resource "aws_autoscaling_group" "foobar" { - availability_zones = ["us-west-2a"] - name = "terraform-test-%s" - max_size = 5 - min_size = 1 - health_check_grace_period = 300 - health_check_type = "ELB" - force_delete = true - termination_policies = ["OldestInstance"] - launch_configuration = "${aws_launch_configuration.foobar.name}" - - tag { - key = "Foo" - value = "foo-bar" - propagate_at_launch = true +func testAccAWSAutoscalingPolicyConfig_basicUpdate(name string) string { + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` +resource "aws_autoscaling_policy" "foobar_simple" { + name = "%s-foobar_simple" + adjustment_type = "ChangeInCapacity" + cooldown = 300 + policy_type = "SimpleScaling" + scaling_adjustment = 2 + autoscaling_group_name = "${aws_autoscaling_group.test.name}" +} + +resource "aws_autoscaling_policy" "foobar_step" { + name = "%s-foobar_step" + adjustment_type = "ChangeInCapacity" + policy_type = "StepScaling" + estimated_instance_warmup = 200 + metric_aggregation_type = "Minimum" + step_adjustment { + scaling_adjustment = 1 + metric_interval_lower_bound = 2.0 + } + autoscaling_group_name = "${aws_autoscaling_group.test.name}" +} + +resource "aws_autoscaling_policy" "ecs_general_purpose_scale_out" { + name = "memory-reservation-high" + + autoscaling_group_name = "${aws_autoscaling_group.test.name}" + estimated_instance_warmup = 60 + + adjustment_type = "PercentChangeInCapacity" + policy_type = "StepScaling" + + metric_aggregation_type = "Maximum" + + step_adjustment { + scaling_adjustment = 10 + metric_interval_lower_bound = 0 } } +`, name, name) +} +func testAccAWSAutoscalingPolicyConfig_upgrade_614(name string) string { + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "foobar_simple_%s" + name = "%s-foobar_simple" adjustment_type = "PercentChangeInCapacity" cooldown = 300 policy_type = "SimpleScaling" scaling_adjustment = 2 min_adjustment_step = 1 - autoscaling_group_name = "${aws_autoscaling_group.foobar.name}" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } -`, name, name, name) +`, name) } func testAccAWSAutoscalingPolicyConfig_upgrade_615(name string) string { - return fmt.Sprintf(` -resource "aws_launch_configuration" "foobar" { - name = "tf-test-%s" - image_id = "ami-21f78e11" - instance_type = "t1.micro" -} - -resource "aws_autoscaling_group" "foobar" { - availability_zones = ["us-west-2a"] - name = "terraform-test-%s" - max_size = 5 - min_size = 1 - health_check_grace_period = 300 - health_check_type = "ELB" - force_delete = true - termination_policies = ["OldestInstance"] - launch_configuration = "${aws_launch_configuration.foobar.name}" - - tag { - key = "Foo" - value = "foo-bar" - propagate_at_launch = true - } -} - + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "foobar_simple_%s" + name = "%s-foobar_simple" adjustment_type = "PercentChangeInCapacity" cooldown = 300 policy_type = "SimpleScaling" scaling_adjustment = 2 min_adjustment_magnitude = 1 - autoscaling_group_name = "${aws_autoscaling_group.foobar.name}" -} -`, name, name, name) + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } - -func TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment(t *testing.T) { - var policy autoscaling.ScalingPolicy - - name := acctest.RandString(5) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSAutoscalingPolicyConfig_SimpleScalingStepAdjustment(name), - Check: resource.ComposeTestCheckFunc( - testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), - resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "adjustment_type", "ExactCapacity"), - resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "scaling_adjustment", "0"), - ), - }, - }, - }) +`, name) } func testAccAWSAutoscalingPolicyConfig_SimpleScalingStepAdjustment(name string) string { - return fmt.Sprintf(` -resource "aws_launch_configuration" "foobar" { - name = "tf-test-%s" - image_id = "ami-21f78e11" - instance_type = "t1.micro" -} - -resource "aws_autoscaling_group" "foobar" { - availability_zones = ["us-west-2a"] - name = "terraform-test-%s" - max_size = 5 - min_size = 0 - health_check_grace_period = 300 - health_check_type = "ELB" - force_delete = true - termination_policies = ["OldestInstance"] - launch_configuration = "${aws_launch_configuration.foobar.name}" - - tag { - key = "Foo" - value = "foo-bar" - propagate_at_launch = true - } -} - + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "foobar_simple_%s" + name = "%s-foobar_simple" adjustment_type = "ExactCapacity" cooldown = 300 policy_type = "SimpleScaling" scaling_adjustment = 0 - autoscaling_group_name = "${aws_autoscaling_group.foobar.name}" -} -`, name, name, name) -} - -func testAccAwsAutoscalingPolicyConfig_TargetTracking_Predefined(rName string) string { - return fmt.Sprintf(` -data "aws_ami" "amzn" { - most_recent = true - owners = ["amazon"] - - filter { - name = "name" - values = ["amzn-ami-hvm-*-x86_64-gp2"] - } -} - -data "aws_availability_zones" "test" {} - -resource "aws_launch_configuration" "test" { - name = "tf-test-%s" - image_id = "${data.aws_ami.amzn.id}" - instance_type = "t2.micro" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } - -resource "aws_autoscaling_group" "test" { - availability_zones = ["${data.aws_availability_zones.test.names[0]}"] - name = "tf-test-%s" - max_size = 5 - min_size = 0 - health_check_grace_period = 300 - health_check_type = "ELB" - force_delete = true - termination_policies = ["OldestInstance"] - launch_configuration = "${aws_launch_configuration.test.name}" +`, name) } +func testAccAwsAutoscalingPolicyConfig_TargetTracking_Predefined(name string) string { + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "test" { - name = "tf-as-%s" + name = "%s-test" policy_type = "TargetTrackingScaling" autoscaling_group_name = "${aws_autoscaling_group.test.name}" @@ -484,43 +459,13 @@ resource "aws_autoscaling_policy" "test" { target_value = 40.0 } } -`, rName, rName, rName) -} - -func testAccAwsAutoscalingPolicyConfig_TargetTracking_Custom(rName string) string { - return fmt.Sprintf(` -data "aws_ami" "amzn" { - most_recent = true - owners = ["amazon"] - - filter { - name = "name" - values = ["amzn-ami-hvm-*-x86_64-gp2"] - } -} - -data "aws_availability_zones" "test" {} - -resource "aws_launch_configuration" "test" { - name = "tf-test-%s" - image_id = "${data.aws_ami.amzn.id}" - instance_type = "t2.micro" -} - -resource "aws_autoscaling_group" "test" { - availability_zones = ["${data.aws_availability_zones.test.names[0]}"] - name = "tf-test-%s" - max_size = 5 - min_size = 0 - health_check_grace_period = 300 - health_check_type = "ELB" - force_delete = true - termination_policies = ["OldestInstance"] - launch_configuration = "${aws_launch_configuration.test.name}" +`, name) } +func testAccAwsAutoscalingPolicyConfig_TargetTracking_Custom(name string) string { + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "test" { - name = "tf-as-%s" + name = "%s-test" policy_type = "TargetTrackingScaling" autoscaling_group_name = "${aws_autoscaling_group.test.name}" @@ -537,51 +482,22 @@ resource "aws_autoscaling_policy" "test" { target_value = 40.0 } } -`, rName, rName, rName) +`, name) } func testAccAWSAutoscalingPolicyConfig_zerovalue(name string) string { - return fmt.Sprintf(` -data "aws_ami" "amzn" { - most_recent = true - owners = ["amazon"] - filter { - name = "name" - values = ["amzn-ami-hvm-*-x86_64-gp2"] - } -} - -resource "aws_launch_configuration" "foobar" { - name = "tf-test-%s" - image_id = "${data.aws_ami.amzn.id}" - instance_type = "t2.micro" -} - -data "aws_availability_zones" "test" {} - -resource "aws_autoscaling_group" "foobar" { - availability_zones = ["${data.aws_availability_zones.test.names[0]}"] - name = "terraform-test-%s" - max_size = 5 - min_size = 0 - health_check_grace_period = 300 - health_check_type = "ELB" - force_delete = true - termination_policies = ["OldestInstance"] - launch_configuration = "${aws_launch_configuration.foobar.name}" -} - + return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "foobar_simple_%s" + name = "%s-foobar_simple" adjustment_type = "ExactCapacity" cooldown = 0 policy_type = "SimpleScaling" scaling_adjustment = 0 - autoscaling_group_name = "${aws_autoscaling_group.foobar.name}" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } resource "aws_autoscaling_policy" "foobar_step" { - name = "foobar_step_%s" + name = "%s-foobar_step" adjustment_type = "PercentChangeInCapacity" policy_type = "StepScaling" estimated_instance_warmup = 0 @@ -591,7 +507,7 @@ resource "aws_autoscaling_policy" "foobar_step" { metric_interval_lower_bound = 2.0 } min_adjustment_magnitude = 1 - autoscaling_group_name = "${aws_autoscaling_group.foobar.name}" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } -`, name, name, name, name) +`, name, name) } From 738e6ae6eea70db4f847790f895b8f87870a73e3 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sun, 11 Mar 2018 21:18:32 +0100 Subject: [PATCH 0104/3316] resource/autoscaling_policy: set parameters based on policy type --- aws/resource_aws_autoscaling_policy.go | 104 +++++------ aws/resource_aws_autoscaling_policy_test.go | 182 +++++++++----------- 2 files changed, 121 insertions(+), 165 deletions(-) diff --git a/aws/resource_aws_autoscaling_policy.go b/aws/resource_aws_autoscaling_policy.go index a9d7b8d630a..8c4f2159678 100644 --- a/aws/resource_aws_autoscaling_policy.go +++ b/aws/resource_aws_autoscaling_policy.go @@ -43,6 +43,11 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { Type: schema.TypeString, Optional: true, Default: "SimpleScaling", // preserve AWS's default to make validation easier. + ValidateFunc: validation.StringInSlice([]string{ + "SimpleScaling", + "StepScaling", + "TargetTrackingScaling", + }, false), }, "cooldown": { Type: schema.TypeInt, @@ -281,32 +286,54 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling PolicyName: aws.String(d.Get("name").(string)), } - if v, ok := d.GetOk("adjustment_type"); ok { + // get policy_type first as parameter support depends on policy type + policyType := d.Get("policy_type") + params.PolicyType = aws.String(policyType.(string)) + + // This parameter is supported if the policy type is SimpleScaling or StepScaling. + if v, ok := d.GetOk("adjustment_type"); ok && (policyType == "SimpleScaling" || policyType == "StepScaling") { params.AdjustmentType = aws.String(v.(string)) } - if v, ok := d.GetOkExists("cooldown"); ok { + // This parameter is supported if the policy type is SimpleScaling. + if v, ok := d.GetOkExists("cooldown"); ok && policyType == "SimpleScaling" { params.Cooldown = aws.Int64(int64(v.(int))) } - if v, ok := d.GetOkExists("estimated_instance_warmup"); ok { + // This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. + if v, ok := d.GetOkExists("estimated_instance_warmup"); ok && (policyType == "StepScaling" || policyType == "TargetTrackingScaling") { params.EstimatedInstanceWarmup = aws.Int64(int64(v.(int))) } - if v, ok := d.GetOk("metric_aggregation_type"); ok { + // This parameter is supported if the policy type is StepScaling. + if v, ok := d.GetOk("metric_aggregation_type"); ok && policyType == "StepScaling" { params.MetricAggregationType = aws.String(v.(string)) } - if v, ok := d.GetOk("policy_type"); ok { - params.PolicyType = aws.String(v.(string)) + // MinAdjustmentMagnitude is supported if the policy type is SimpleScaling or StepScaling. + // MinAdjustmentStep is available for backward compatibility. Use MinAdjustmentMagnitude instead. + if v, ok := d.GetOkExists("min_adjustment_magnitude"); ok && v.(int) != 0 && (policyType == "SimpleScaling" || policyType == "StepScaling") { + params.MinAdjustmentMagnitude = aws.Int64(int64(v.(int))) + } else if v, ok := d.GetOkExists("min_adjustment_step"); ok && v.(int) != 0 && (policyType == "SimpleScaling" || policyType == "StepScaling") { + params.MinAdjustmentStep = aws.Int64(int64(v.(int))) } + // This parameter is required if the policy type is SimpleScaling and not supported otherwise. //if policy_type=="SimpleScaling" then scaling_adjustment is required and 0 is allowed - if v, ok := d.GetOkExists("scaling_adjustment"); ok || *params.PolicyType == "SimpleScaling" { + if policyType == "SimpleScaling" { + v, ok := d.GetOkExists("scaling_adjustment") + if !ok { + return params, fmt.Errorf("scaling_adjustment is required for policy type SimpleScaling") + } params.ScalingAdjustment = aws.Int64(int64(v.(int))) } - if v, ok := d.GetOk("step_adjustment"); ok { + // This parameter is required if the policy type is StepScaling and not supported otherwise. + if policyType == "StepScaling" { + v, ok := d.GetOk("step_adjustment") + if !ok { + return params, fmt.Errorf("step_adjustment is required for policy type StepScaling") + } steps, err := expandStepAdjustments(v.(*schema.Set).List()) if err != nil { return params, fmt.Errorf("metric_interval_lower_bound and metric_interval_upper_bound must be strings!") @@ -314,64 +341,15 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling params.StepAdjustments = steps } - if v, ok := d.GetOkExists("min_adjustment_magnitude"); ok { - // params.MinAdjustmentMagnitude = aws.Int64(int64(d.Get("min_adjustment_magnitude").(int))) - params.MinAdjustmentMagnitude = aws.Int64(int64(v.(int))) - } else if v, ok := d.GetOkExists("min_adjustment_step"); ok { - // params.MinAdjustmentStep = aws.Int64(int64(d.Get("min_adjustment_step").(int))) - params.MinAdjustmentStep = aws.Int64(int64(v.(int))) - } - - if v, ok := d.GetOk("target_tracking_configuration"); ok { + // This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise. + if policyType == "TargetTrackingScaling" { + v, ok := d.GetOk("target_tracking_configuration") + if !ok { + return params, fmt.Errorf("target_tracking_configuration is required for policy type TargetTrackingScaling") + } params.TargetTrackingConfiguration = expandTargetTrackingConfiguration(v.([]interface{})) } - // Validate our final input to confirm it won't error when sent to AWS. - // First, SimpleScaling policy types... - if *params.PolicyType == "SimpleScaling" && params.StepAdjustments != nil { - return params, fmt.Errorf("SimpleScaling policy types cannot use step_adjustments!") - } - if *params.PolicyType == "SimpleScaling" && params.MetricAggregationType != nil { - return params, fmt.Errorf("SimpleScaling policy types cannot use metric_aggregation_type!") - } - if *params.PolicyType == "SimpleScaling" && params.EstimatedInstanceWarmup != nil { - return params, fmt.Errorf("SimpleScaling policy types cannot use estimated_instance_warmup!") - } - if *params.PolicyType == "SimpleScaling" && params.TargetTrackingConfiguration != nil { - return params, fmt.Errorf("SimpleScaling policy types cannot use target_tracking_configuration!") - } - - // Second, StepScaling policy types... - if *params.PolicyType == "StepScaling" && params.ScalingAdjustment != nil { - return params, fmt.Errorf("StepScaling policy types cannot use scaling_adjustment!") - } - if *params.PolicyType == "StepScaling" && params.Cooldown != nil { - return params, fmt.Errorf("StepScaling policy types cannot use cooldown!") - } - if *params.PolicyType == "StepScaling" && params.TargetTrackingConfiguration != nil { - return params, fmt.Errorf("StepScaling policy types cannot use target_tracking_configuration!") - } - - // Third, TargetTrackingScaling policy types... - if *params.PolicyType == "TargetTrackingScaling" && params.AdjustmentType != nil { - return params, fmt.Errorf("TargetTrackingScaling policy types cannot use adjustment_type!") - } - if *params.PolicyType == "TargetTrackingScaling" && params.Cooldown != nil { - return params, fmt.Errorf("TargetTrackingScaling policy types cannot use cooldown!") - } - if *params.PolicyType == "TargetTrackingScaling" && params.MetricAggregationType != nil { - return params, fmt.Errorf("TargetTrackingScaling policy types cannot use metric_aggregation_type!") - } - if *params.PolicyType == "TargetTrackingScaling" && params.MinAdjustmentMagnitude != nil { - return params, fmt.Errorf("TargetTrackingScaling policy types cannot use min_adjustment_magnitude!") - } - if *params.PolicyType == "TargetTrackingScaling" && params.ScalingAdjustment != nil { - return params, fmt.Errorf("TargetTrackingScaling policy types cannot use scaling_adjustment!") - } - if *params.PolicyType == "TargetTrackingScaling" && params.StepAdjustments != nil { - return params, fmt.Errorf("TargetTrackingScaling policy types cannot use step_adjustments!") - } - return params, nil } diff --git a/aws/resource_aws_autoscaling_policy_test.go b/aws/resource_aws_autoscaling_policy_test.go index 78e9a32a66e..6989ca4ec22 100644 --- a/aws/resource_aws_autoscaling_policy_test.go +++ b/aws/resource_aws_autoscaling_policy_test.go @@ -42,16 +42,19 @@ func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "metric_aggregation_type", "Minimum"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "estimated_instance_warmup", "200"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "autoscaling_group_name", name), - testAccCheckScalingPolicyExists("aws_autoscaling_policy.ecs_general_purpose_scale_out", &policy), - resource.TestCheckResourceAttr("aws_autoscaling_policy.ecs_general_purpose_scale_out", "name", "memory-reservation-high"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "step_adjustment.2042107634.scaling_adjustment", "1"), ), }, { Config: testAccAWSAutoscalingPolicyConfig_basicUpdate(name), Check: resource.ComposeTestCheckFunc( - testAccCheckScalingPolicyExists("aws_autoscaling_policy.ecs_general_purpose_scale_out", &policy), - resource.TestCheckResourceAttr("aws_autoscaling_policy.ecs_general_purpose_scale_out", "name", "memory-reservation-high"), - resource.TestCheckResourceAttr("aws_autoscaling_policy.ecs_general_purpose_scale_out", "step_adjustment.#", "1"), + testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_simple", &policy), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "policy_type", "SimpleScaling"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_simple", "cooldown", "30"), + testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_step", &policy), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "policy_type", "StepScaling"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "estimated_instance_warmup", "20"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "step_adjustment.997979330.scaling_adjustment", "10"), ), }, }, @@ -302,18 +305,18 @@ data "aws_ami" "amzn" { data "aws_availability_zones" "available" {} resource "aws_launch_configuration" "test" { - name = "%s" - image_id = "${data.aws_ami.amzn.id}" - instance_type = "t2.micro" + name = "%s" + image_id = "${data.aws_ami.amzn.id}" + instance_type = "t2.micro" } resource "aws_autoscaling_group" "test" { - availability_zones = ["${data.aws_availability_zones.available.names}"] - name = "%s" - max_size = 0 - min_size = 0 - force_delete = true - launch_configuration = "${aws_launch_configuration.test.name}" + availability_zones = ["${data.aws_availability_zones.available.names}"] + name = "%s" + max_size = 0 + min_size = 0 + force_delete = true + launch_configuration = "${aws_launch_configuration.test.name}" } `, name, name) } @@ -321,42 +324,27 @@ resource "aws_autoscaling_group" "test" { func testAccAWSAutoscalingPolicyConfig_basic(name string) string { return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "%s-foobar_simple" - adjustment_type = "ChangeInCapacity" - cooldown = 300 - policy_type = "SimpleScaling" - scaling_adjustment = 2 - autoscaling_group_name = "${aws_autoscaling_group.test.name}" + name = "%s-foobar_simple" + adjustment_type = "ChangeInCapacity" + cooldown = 300 + policy_type = "SimpleScaling" + scaling_adjustment = 2 + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } resource "aws_autoscaling_policy" "foobar_step" { - name = "%s-foobar_step" - adjustment_type = "ChangeInCapacity" - policy_type = "StepScaling" - estimated_instance_warmup = 200 - metric_aggregation_type = "Minimum" - step_adjustment { - scaling_adjustment = 1 - metric_interval_lower_bound = 2.0 - } - autoscaling_group_name = "${aws_autoscaling_group.test.name}" -} - -resource "aws_autoscaling_policy" "ecs_general_purpose_scale_out" { - name = "memory-reservation-high" - - autoscaling_group_name = "${aws_autoscaling_group.test.name}" - estimated_instance_warmup = 60 - - adjustment_type = "PercentChangeInCapacity" - policy_type = "StepScaling" - - metric_aggregation_type = "Maximum" + name = "%s-foobar_step" + adjustment_type = "ChangeInCapacity" + policy_type = "StepScaling" + estimated_instance_warmup = 200 + metric_aggregation_type = "Minimum" step_adjustment { - scaling_adjustment = 100 - metric_interval_lower_bound = 0 + scaling_adjustment = 1 + metric_interval_lower_bound = 2.0 } + + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } `, name, name) } @@ -364,42 +352,27 @@ resource "aws_autoscaling_policy" "ecs_general_purpose_scale_out" { func testAccAWSAutoscalingPolicyConfig_basicUpdate(name string) string { return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "%s-foobar_simple" - adjustment_type = "ChangeInCapacity" - cooldown = 300 - policy_type = "SimpleScaling" - scaling_adjustment = 2 - autoscaling_group_name = "${aws_autoscaling_group.test.name}" + name = "%s-foobar_simple" + adjustment_type = "ChangeInCapacity" + cooldown = 30 + policy_type = "SimpleScaling" + scaling_adjustment = 2 + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } resource "aws_autoscaling_policy" "foobar_step" { - name = "%s-foobar_step" - adjustment_type = "ChangeInCapacity" - policy_type = "StepScaling" - estimated_instance_warmup = 200 - metric_aggregation_type = "Minimum" - step_adjustment { - scaling_adjustment = 1 - metric_interval_lower_bound = 2.0 - } - autoscaling_group_name = "${aws_autoscaling_group.test.name}" -} - -resource "aws_autoscaling_policy" "ecs_general_purpose_scale_out" { - name = "memory-reservation-high" - - autoscaling_group_name = "${aws_autoscaling_group.test.name}" - estimated_instance_warmup = 60 - - adjustment_type = "PercentChangeInCapacity" - policy_type = "StepScaling" - - metric_aggregation_type = "Maximum" + name = "%s-foobar_step" + adjustment_type = "ChangeInCapacity" + policy_type = "StepScaling" + estimated_instance_warmup = 20 + metric_aggregation_type = "Minimum" step_adjustment { scaling_adjustment = 10 - metric_interval_lower_bound = 0 + metric_interval_lower_bound = 2.0 } + + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } `, name, name) } @@ -435,12 +408,12 @@ resource "aws_autoscaling_policy" "foobar_simple" { func testAccAWSAutoscalingPolicyConfig_SimpleScalingStepAdjustment(name string) string { return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "%s-foobar_simple" - adjustment_type = "ExactCapacity" - cooldown = 300 - policy_type = "SimpleScaling" - scaling_adjustment = 0 - autoscaling_group_name = "${aws_autoscaling_group.test.name}" + name = "%s-foobar_simple" + adjustment_type = "ExactCapacity" + cooldown = 300 + policy_type = "SimpleScaling" + scaling_adjustment = 0 + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } `, name) } @@ -448,14 +421,15 @@ resource "aws_autoscaling_policy" "foobar_simple" { func testAccAwsAutoscalingPolicyConfig_TargetTracking_Predefined(name string) string { return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "test" { - name = "%s-test" - policy_type = "TargetTrackingScaling" - autoscaling_group_name = "${aws_autoscaling_group.test.name}" + name = "%s-test" + policy_type = "TargetTrackingScaling" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" target_tracking_configuration { predefined_metric_specification { predefined_metric_type = "ASGAverageCPUUtilization" } + target_value = 40.0 } } @@ -465,20 +439,22 @@ resource "aws_autoscaling_policy" "test" { func testAccAwsAutoscalingPolicyConfig_TargetTracking_Custom(name string) string { return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "test" { - name = "%s-test" - policy_type = "TargetTrackingScaling" - autoscaling_group_name = "${aws_autoscaling_group.test.name}" + name = "%s-test" + policy_type = "TargetTrackingScaling" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" target_tracking_configuration { customized_metric_specification { metric_dimension { - name = "fuga" + name = "fuga" value = "fuga" } + metric_name = "hoge" - namespace = "hoge" - statistic = "Average" + namespace = "hoge" + statistic = "Average" } + target_value = 40.0 } } @@ -488,26 +464,28 @@ resource "aws_autoscaling_policy" "test" { func testAccAWSAutoscalingPolicyConfig_zerovalue(name string) string { return testAccAWSAutoscalingPolicyConfig_base(name) + fmt.Sprintf(` resource "aws_autoscaling_policy" "foobar_simple" { - name = "%s-foobar_simple" - adjustment_type = "ExactCapacity" - cooldown = 0 - policy_type = "SimpleScaling" - scaling_adjustment = 0 - autoscaling_group_name = "${aws_autoscaling_group.test.name}" + name = "%s-foobar_simple" + adjustment_type = "ExactCapacity" + cooldown = 0 + policy_type = "SimpleScaling" + scaling_adjustment = 0 + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } resource "aws_autoscaling_policy" "foobar_step" { - name = "%s-foobar_step" - adjustment_type = "PercentChangeInCapacity" - policy_type = "StepScaling" + name = "%s-foobar_step" + adjustment_type = "PercentChangeInCapacity" + policy_type = "StepScaling" estimated_instance_warmup = 0 - metric_aggregation_type = "Minimum" - step_adjustment { - scaling_adjustment = 1 + metric_aggregation_type = "Minimum" + + step_adjustment { + scaling_adjustment = 1 metric_interval_lower_bound = 2.0 - } + } + min_adjustment_magnitude = 1 - autoscaling_group_name = "${aws_autoscaling_group.test.name}" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" } `, name, name) } From eb6a4e3f739f421785c5cb6d6c23e98693de2671 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Mon, 12 Mar 2018 13:48:40 +0100 Subject: [PATCH 0105/3316] resource/autoscaling_policy: raise error on unsupported arguments --- aws/resource_aws_autoscaling_policy.go | 56 +++++++++++++++++--------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_autoscaling_policy.go b/aws/resource_aws_autoscaling_policy.go index 8c4f2159678..1289667cbc8 100644 --- a/aws/resource_aws_autoscaling_policy.go +++ b/aws/resource_aws_autoscaling_policy.go @@ -186,11 +186,11 @@ func resourceAwsAutoscalingPolicyCreate(d *schema.ResourceData, meta interface{} autoscalingconn := meta.(*AWSClient).autoscalingconn params, err := getAwsAutoscalingPutScalingPolicyInput(d) + log.Printf("[DEBUG] AutoScaling PutScalingPolicy on Create: %#v", params) if err != nil { return err } - log.Printf("[DEBUG] AutoScaling PutScalingPolicy: %#v", params) resp, err := autoscalingconn.PutScalingPolicy(¶ms) if err != nil { return fmt.Errorf("Error putting scaling policy: %s", err) @@ -241,11 +241,11 @@ func resourceAwsAutoscalingPolicyUpdate(d *schema.ResourceData, meta interface{} autoscalingconn := meta.(*AWSClient).autoscalingconn params, inputErr := getAwsAutoscalingPutScalingPolicyInput(d) + log.Printf("[DEBUG] AutoScaling PutScalingPolicy on Update: %#v", params) if inputErr != nil { return inputErr } - log.Printf("[DEBUG] Autoscaling Update Scaling Policy: %#v", params) _, err := autoscalingconn.PutScalingPolicy(¶ms) if err != nil { return err @@ -296,13 +296,23 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling } // This parameter is supported if the policy type is SimpleScaling. - if v, ok := d.GetOkExists("cooldown"); ok && policyType == "SimpleScaling" { + if v, ok := d.GetOkExists("cooldown"); ok { + // 0 is allowed as placeholder even if policyType is not supported params.Cooldown = aws.Int64(int64(v.(int))) + if v.(int) != 0 && policyType != "SimpleScaling" { + return params, fmt.Errorf("cooldown is only supported for policy type SimpleScaling") + } } // This parameter is supported if the policy type is StepScaling or TargetTrackingScaling. - if v, ok := d.GetOkExists("estimated_instance_warmup"); ok && (policyType == "StepScaling" || policyType == "TargetTrackingScaling") { - params.EstimatedInstanceWarmup = aws.Int64(int64(v.(int))) + if v, ok := d.GetOkExists("estimated_instance_warmup"); ok { + // 0 is NOT allowed as placeholder if policyType is not supported + if policyType == "StepScaling" || policyType == "TargetTrackingScaling" { + params.EstimatedInstanceWarmup = aws.Int64(int64(v.(int))) + } + if v.(int) != 0 && policyType != "StepScaling" && policyType != "TargetTrackingScaling" { + return params, fmt.Errorf("estimated_instance_warmup is only supported for policy type StepScaling and TargetTrackingScaling") + } } // This parameter is supported if the policy type is StepScaling. @@ -320,34 +330,40 @@ func getAwsAutoscalingPutScalingPolicyInput(d *schema.ResourceData) (autoscaling // This parameter is required if the policy type is SimpleScaling and not supported otherwise. //if policy_type=="SimpleScaling" then scaling_adjustment is required and 0 is allowed - if policyType == "SimpleScaling" { - v, ok := d.GetOkExists("scaling_adjustment") - if !ok { - return params, fmt.Errorf("scaling_adjustment is required for policy type SimpleScaling") + if v, ok := d.GetOkExists("scaling_adjustment"); ok { + // 0 is NOT allowed as placeholder if policyType is not supported + if policyType == "SimpleScaling" { + params.ScalingAdjustment = aws.Int64(int64(v.(int))) + } + if v.(int) != 0 && policyType != "SimpleScaling" { + return params, fmt.Errorf("scaling_adjustment is only supported for policy type SimpleScaling") } - params.ScalingAdjustment = aws.Int64(int64(v.(int))) + } else if !ok && policyType == "SimpleScaling" { + return params, fmt.Errorf("scaling_adjustment is required for policy type SimpleScaling") } // This parameter is required if the policy type is StepScaling and not supported otherwise. - if policyType == "StepScaling" { - v, ok := d.GetOk("step_adjustment") - if !ok { - return params, fmt.Errorf("step_adjustment is required for policy type StepScaling") - } + if v, ok := d.GetOk("step_adjustment"); ok { steps, err := expandStepAdjustments(v.(*schema.Set).List()) if err != nil { return params, fmt.Errorf("metric_interval_lower_bound and metric_interval_upper_bound must be strings!") } params.StepAdjustments = steps + if len(steps) != 0 && policyType != "StepScaling" { + return params, fmt.Errorf("step_adjustment is only supported for policy type StepScaling") + } + } else if !ok && policyType == "StepScaling" { + return params, fmt.Errorf("step_adjustment is required for policy type StepScaling") } // This parameter is required if the policy type is TargetTrackingScaling and not supported otherwise. - if policyType == "TargetTrackingScaling" { - v, ok := d.GetOk("target_tracking_configuration") - if !ok { - return params, fmt.Errorf("target_tracking_configuration is required for policy type TargetTrackingScaling") - } + if v, ok := d.GetOk("target_tracking_configuration"); ok { params.TargetTrackingConfiguration = expandTargetTrackingConfiguration(v.([]interface{})) + if policyType != "TargetTrackingScaling" { + return params, fmt.Errorf("target_tracking_configuration is only supported for policy type TargetTrackingScaling") + } + } else if !ok && policyType == "TargetTrackingScaling" { + return params, fmt.Errorf("target_tracking_configuration is required for policy type TargetTrackingScaling") } return params, nil From f7486935aa24380c2800942cf7e9e9d9f312e351 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Mon, 12 Mar 2018 13:52:26 +0100 Subject: [PATCH 0106/3316] resource/autoscaling_policy: add test cases for #3689 --- aws/resource_aws_autoscaling_policy_test.go | 55 ++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_autoscaling_policy_test.go b/aws/resource_aws_autoscaling_policy_test.go index 6989ca4ec22..6333cf96a54 100644 --- a/aws/resource_aws_autoscaling_policy_test.go +++ b/aws/resource_aws_autoscaling_policy_test.go @@ -43,6 +43,15 @@ func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "estimated_instance_warmup", "200"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "autoscaling_group_name", name), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "step_adjustment.2042107634.scaling_adjustment", "1"), + testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_target_tracking", &policy), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "policy_type", "TargetTrackingScaling"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "name", name+"-foobar_target_tracking"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "autoscaling_group_name", name), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.#", "1"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.customized_metric_specification.#", "0"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.predefined_metric_specification.#", "1"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.predefined_metric_specification.0.predefined_metric_type", "ASGAverageCPUUtilization"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.target_value", "40"), ), }, { @@ -55,6 +64,13 @@ func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "policy_type", "StepScaling"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "estimated_instance_warmup", "20"), resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_step", "step_adjustment.997979330.scaling_adjustment", "10"), + testAccCheckScalingPolicyExists("aws_autoscaling_policy.foobar_target_tracking", &policy), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "policy_type", "TargetTrackingScaling"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.#", "1"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.customized_metric_specification.#", "1"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.customized_metric_specification.0.statistic", "Average"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.predefined_metric_specification.#", "0"), + resource.TestCheckResourceAttr("aws_autoscaling_policy.foobar_target_tracking", "target_tracking_configuration.0.target_value", "70"), ), }, }, @@ -346,7 +362,21 @@ resource "aws_autoscaling_policy" "foobar_step" { autoscaling_group_name = "${aws_autoscaling_group.test.name}" } -`, name, name) + +resource "aws_autoscaling_policy" "foobar_target_tracking" { + name = "%s-foobar_target_tracking" + policy_type = "TargetTrackingScaling" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" + + target_tracking_configuration { + predefined_metric_specification { + predefined_metric_type = "ASGAverageCPUUtilization" + } + + target_value = 40.0 + } +} +`, name, name, name) } func testAccAWSAutoscalingPolicyConfig_basicUpdate(name string) string { @@ -374,7 +404,28 @@ resource "aws_autoscaling_policy" "foobar_step" { autoscaling_group_name = "${aws_autoscaling_group.test.name}" } -`, name, name) + +resource "aws_autoscaling_policy" "foobar_target_tracking" { + name = "%s-foobar_target_tracking" + policy_type = "TargetTrackingScaling" + autoscaling_group_name = "${aws_autoscaling_group.test.name}" + + target_tracking_configuration { + customized_metric_specification { + metric_dimension { + name = "fuga" + value = "fuga" + } + + metric_name = "hoge" + namespace = "hoge" + statistic = "Average" + } + + target_value = 70.0 + } +} +`, name, name, name) } func testAccAWSAutoscalingPolicyConfig_upgrade_614(name string) string { From b0ba213c50ce55cf6e5341d184f537a600cbef5e Mon Sep 17 00:00:00 2001 From: Darren Haken Date: Tue, 13 Mar 2018 16:29:42 +0000 Subject: [PATCH 0107/3316] WIP - Finally got a failing test with the bare min of crawler --- aws/provider.go | 2 +- aws/resource_aws_glue_catalog_crawler.go | 170 ++++++++++-------- aws/resource_aws_glue_catalog_crawler_test.go | 15 +- 3 files changed, 105 insertions(+), 82 deletions(-) diff --git a/aws/provider.go b/aws/provider.go index bf9030509e7..daa51f49c31 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -376,7 +376,7 @@ func Provider() terraform.ResourceProvider { "aws_gamelift_fleet": resourceAwsGameliftFleet(), "aws_glacier_vault": resourceAwsGlacierVault(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_crawler": resourceAwsGlueCrawler(), + "aws_glue_catalog_crawler": resourceAwsGlueCatalogCrawler(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), diff --git a/aws/resource_aws_glue_catalog_crawler.go b/aws/resource_aws_glue_catalog_crawler.go index 94090116688..f6ad5711c49 100644 --- a/aws/resource_aws_glue_catalog_crawler.go +++ b/aws/resource_aws_glue_catalog_crawler.go @@ -68,45 +68,46 @@ func resourceAwsGlueCatalogCrawler() *schema.Resource { // Type: schema.TypeString, // Optional: true, //}, - "targets": { - Type: schema.TypeSet, - Required: true, + "s3_target": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "jdbc_targets": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "connection_name": { - Type: schema.TypeString, - }, - "path": { - Type: schema.TypeString, - }, - "exclusions": { - Type: schema.TypeList, - }, - }, - }, - }, - "s3_targets": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "path": { - Type: schema.TypeList, - }, - "exclusions": { - Type: schema.TypeList, - }, - }, - }, + "path": { + Type: schema.TypeString, + Required: true, }, + //"exclusions": { + // Type: schema.TypeSet, + // Optional: true, + // Elem: schema.TypeString, + //}, }, }, }, + //"jdbc_targets": { + // Type: schema.TypeList, + // Optional: true, + // MinItems: 1, + // Elem: &schema.Resource{ + // Schema: map[string]*schema.Schema{ + // "connection_name": { + // Type: schema.TypeString, + // Required: true, + // }, + // "path": { + // Type: schema.TypeString, + // Required: true, + // }, + // "exclusions": { + // Type: schema.TypeSet, + // Optional: true, + // Elem: schema.TypeString, + // }, + // }, + // }, + //}, //"configuration": { // Type: schema.TypeString, // Optional: true, @@ -136,7 +137,7 @@ func createCrawlerInput(crawlerName string, resource *schema.ResourceData) *glue Name: aws.String(crawlerName), DatabaseName: aws.String(resource.Get("database_name").(string)), Role: aws.String(resource.Get("role").(string)), - Targets: createCrawlerTargets(resource.Get("targets")), + Targets: createCrawlerTargets(resource), } //if description, ok := resource.GetOk("description"); ok { // crawlerInput.Description = aws.String(description.(string)) @@ -176,53 +177,80 @@ func createSchemaPolicy(v interface{}) *glue.SchemaChangePolicy { return schemaPolicy } -func createCrawlerTargets(v interface{}) *glue.CrawlerTargets { - attributes := v.(map[string]interface{}) +func createCrawlerTargets(d *schema.ResourceData) *glue.CrawlerTargets { + //attributes := d.(map[string]interface{}) crawlerTargets := &glue.CrawlerTargets{} - if jdbcTargetsResource, ok := attributes["jdbc_targets"]; ok { - jdbcTargets := jdbcTargetsResource.(*schema.Set).List() - var configsOut []*glue.JdbcTarget - - for _, jdbcTarget := range jdbcTargets { - attributes := jdbcTarget.(map[string]interface{}) - - target := &glue.JdbcTarget{ - ConnectionName: aws.String(attributes["connection_name"].(string)), - Path: aws.String(attributes["path"].(string)), - } - - if exclusions, ok := attributes["exclusions"]; ok { - target.Exclusions = expandStringList(exclusions.(*schema.Set).List()) - } - - configsOut = append(configsOut, target) - } + //if jdbcTargetsResource, ok := attributes["jdbc_targets"]; ok { + // jdbcTargets := jdbcTargetsResource.(*schema.Set).List() + // var configsOut []*glue.JdbcTarget + // + // for _, jdbcTarget := range jdbcTargets { + // attributes := jdbcTarget.(map[string]interface{}) + // + // target := &glue.JdbcTarget{ + // ConnectionName: aws.String(attributes["connection_name"].(string)), + // Path: aws.String(attributes["path"].(string)), + // } + // + // if exclusions, ok := attributes["exclusions"]; ok { + // target.Exclusions = expandStringList(exclusions.(*schema.Set).List()) + // } + // + // configsOut = append(configsOut, target) + // } + // + // crawlerTargets.JdbcTargets = configsOut + //} - crawlerTargets.JdbcTargets = configsOut + if v, ok := d.GetOk("s3_target"); ok { + crawlerTargets.S3Targets = expandS3Targets(v.([]interface{})) } - if s3Targets, ok := attributes["s3_targets"]; ok { - targets := s3Targets.(*schema.Set).List() - var configsOut []*glue.S3Target - - for _, target := range targets { - attributes := target.(map[string]interface{}) + //if s3Targets, ok := attributes["s3_target"]; ok { + // targets := s3Targets.(*schema.Set).List() + // var configsOut []*glue.S3Target + // + // for _, target := range targets { + // attributes := target.(map[string]interface{}) + // + // target := &glue.S3Target{ + // Path: aws.String(attributes["path"].(string)), + // } + // + // if exclusions, ok := attributes["exclusions"]; ok { + // target.Exclusions = expandStringList(exclusions.(*schema.Set).List()) + // } + // + // configsOut = append(configsOut, target) + // } + // crawlerTargets.S3Targets = configsOut + //} - target := &glue.S3Target{ - Path: aws.String(attributes["path"].(string)), - } + return crawlerTargets +} - if exclusions, ok := attributes["exclusions"]; ok { - target.Exclusions = expandStringList(exclusions.(*schema.Set).List()) - } +func expandS3Targets(cfgs []interface{}) []*glue.S3Target { + if len(cfgs) < 1 { + return []*glue.S3Target{} + } - configsOut = append(configsOut, target) - } - crawlerTargets.S3Targets = configsOut + perms := make([]*glue.S3Target, len(cfgs), len(cfgs)) + for i, rawCfg := range cfgs { + cfg := rawCfg.(map[string]interface{}) + perms[i] = expandS3Target(cfg) } + return perms +} - return crawlerTargets +func expandS3Target(cfg map[string]interface{}) *glue.S3Target { + return &glue.S3Target{ + Path: aws.String(cfg["path"].(string)), + //FromPort: aws.Int64(int64(cfg["from_port"].(int))), + //IpRange: aws.String(cfg["ip_range"].(string)), + //Protocol: aws.String(cfg["protocol"].(string)), + //ToPort: aws.Int64(int64(cfg["to_port"].(int))), + } } func resourceAwsGlueCatalogCrawlerUpdate(resource *schema.ResourceData, meta interface{}) error { diff --git a/aws/resource_aws_glue_catalog_crawler_test.go b/aws/resource_aws_glue_catalog_crawler_test.go index c14b8491b44..ab24d65a517 100644 --- a/aws/resource_aws_glue_catalog_crawler_test.go +++ b/aws/resource_aws_glue_catalog_crawler_test.go @@ -153,16 +153,11 @@ func checkGlueCatalogCrawlerExists(name string, crawlerName string) resource.Tes } } -const testAccGuardDutyDetectorConfigBasic = ` -resource "aws_glue_catalog_crawler" "tf-test" { - name = "tf-test" +const testAccGuardDutyDetectorConfigBasic = `resource "aws_glue_catalog_crawler" "test" { + name = "test" database_name = "db_name" role = "glue_role" - targets { - s3_target = [ - { - path = "s3://bucket" - } - ] + s3_target { + path = "s3://bucket" } -` +}` From 5680139c78e9a1d33171c7efd2bfd3d6b07a547c Mon Sep 17 00:00:00 2001 From: Michael Ossareh Date: Tue, 13 Mar 2018 18:20:41 -0500 Subject: [PATCH 0108/3316] Update cognito docs for verification by link If you use `{####}` in `email_message_by_link` you're returned an ambiguous message from the API: "the message is empty". This is because the placeholder needs to be, specifically, `{##VERIFY EMAIL##}`. I'm not clear on why the regexp in the validation* funcs do not catch this, and currently do not have the time to dig into that. However I figured I'd submit a doc improvement to save other folks time on this one. --- website/docs/r/cognito_user_pool.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/cognito_user_pool.markdown b/website/docs/r/cognito_user_pool.markdown index 10894d58faa..0513cc6d3a7 100644 --- a/website/docs/r/cognito_user_pool.markdown +++ b/website/docs/r/cognito_user_pool.markdown @@ -113,8 +113,8 @@ The following arguments are supported: #### Verification Message Template * `default_email_option` (Optional) - The default email option. Must be either `CONFIRM_WITH_CODE` or `CONFIRM_WITH_LINK`. Defaults to `CONFIRM_WITH_CODE`. - * `email_message` (Optional) - The email message template. Must contain the `{####}` placeholder. **NOTE:** - If `email_verification_message` and `verification_message_template.email_message` are specified and the values are different, either one is prioritized and updated. - * `email_message_by_link` (Optional) - The email message template for sending a confirmation link to the user. + * `email_message` (Optional) - The email message template. Must contain the `{####}` placeholder.. **NOTE:** - If `email_verification_message` and `verification_message_template.email_message` are specified and the values are different, either one is prioritized and updated. + * `email_message_by_link` (Optional) - The email message template for sending a confirmation link to the user, it must contain the `{##VERIFY EMAIL##}` placeholder. * `email_subject` (Optional) - The subject line for the email message template. **NOTE:** - If `email_verification_subject` and `verification_message_template.email_subject` are specified and the values are different, either one is prioritized and updated. * `email_subject_by_link` (Optional) - The subject line for the email message template for sending a confirmation link to the user. * `sms_message` (Optional) - The SMS message template. Must contain the `{####}` placeholder. From f37ddad29b59cca85ceb732fc101141b4b570f54 Mon Sep 17 00:00:00 2001 From: Michael Ossareh Date: Wed, 14 Mar 2018 14:32:26 -0500 Subject: [PATCH 0109/3316] Fixed typo Accidentally introduced a ".." during editing. Fixed. --- website/docs/r/cognito_user_pool.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/cognito_user_pool.markdown b/website/docs/r/cognito_user_pool.markdown index 0513cc6d3a7..093e9fe611f 100644 --- a/website/docs/r/cognito_user_pool.markdown +++ b/website/docs/r/cognito_user_pool.markdown @@ -113,7 +113,7 @@ The following arguments are supported: #### Verification Message Template * `default_email_option` (Optional) - The default email option. Must be either `CONFIRM_WITH_CODE` or `CONFIRM_WITH_LINK`. Defaults to `CONFIRM_WITH_CODE`. - * `email_message` (Optional) - The email message template. Must contain the `{####}` placeholder.. **NOTE:** - If `email_verification_message` and `verification_message_template.email_message` are specified and the values are different, either one is prioritized and updated. + * `email_message` (Optional) - The email message template. Must contain the `{####}` placeholder. **NOTE:** - If `email_verification_message` and `verification_message_template.email_message` are specified and the values are different, either one is prioritized and updated. * `email_message_by_link` (Optional) - The email message template for sending a confirmation link to the user, it must contain the `{##VERIFY EMAIL##}` placeholder. * `email_subject` (Optional) - The subject line for the email message template. **NOTE:** - If `email_verification_subject` and `verification_message_template.email_subject` are specified and the values are different, either one is prioritized and updated. * `email_subject_by_link` (Optional) - The subject line for the email message template for sending a confirmation link to the user. From cc36c1d6c312b0e2cc024f97bb35ba6b59c3f8c2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 15 Mar 2018 02:07:59 -0400 Subject: [PATCH 0110/3316] resource/aws_cognito_user_pool: Fix schema attribute handling --- aws/resource_aws_cognito_user_pool.go | 19 ++ aws/resource_aws_cognito_user_pool_test.go | 6 +- aws/structure.go | 285 +++++++++++++++++++-- aws/structure_test.go | 137 ++++++++++ 4 files changed, 418 insertions(+), 29 deletions(-) diff --git a/aws/resource_aws_cognito_user_pool.go b/aws/resource_aws_cognito_user_pool.go index b3ca5380063..2c7b0f6f5a6 100644 --- a/aws/resource_aws_cognito_user_pool.go +++ b/aws/resource_aws_cognito_user_pool.go @@ -284,6 +284,7 @@ func resourceAwsCognitoUserPool() *schema.Resource { "attribute_data_type": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ cognitoidentityprovider.AttributeDataTypeString, cognitoidentityprovider.AttributeDataTypeNumber, @@ -294,29 +295,35 @@ func resourceAwsCognitoUserPool() *schema.Resource { "developer_only_attribute": { Type: schema.TypeBool, Optional: true, + ForceNew: true, }, "mutable": { Type: schema.TypeBool, Optional: true, + ForceNew: true, }, "name": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validateCognitoUserPoolSchemaName, }, "number_attribute_constraints": { Type: schema.TypeList, Optional: true, + ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "min_value": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "max_value": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, }, }, @@ -324,20 +331,24 @@ func resourceAwsCognitoUserPool() *schema.Resource { "required": { Type: schema.TypeBool, Optional: true, + ForceNew: true, }, "string_attribute_constraints": { Type: schema.TypeList, Optional: true, + ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "min_length": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "max_length": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, }, }, @@ -675,6 +686,14 @@ func resourceAwsCognitoUserPoolRead(d *schema.ResourceData, meta interface{}) er } } + var configuredSchema []interface{} + if v, ok := d.GetOk("schema"); ok { + configuredSchema = v.(*schema.Set).List() + } + if err := d.Set("schema", flattenCognitoUserPoolSchema(expandCognitoUserPoolSchema(configuredSchema), resp.UserPool.SchemaAttributes)); err != nil { + return fmt.Errorf("Failed setting schema: %s", err) + } + if err := d.Set("sms_configuration", flattenCognitoUserPoolSmsConfiguration(resp.UserPool.SmsConfiguration)); err != nil { return fmt.Errorf("Failed setting sms_configuration: %s", err) } diff --git a/aws/resource_aws_cognito_user_pool_test.go b/aws/resource_aws_cognito_user_pool_test.go index 825bbac6fb0..ea6ab9895ac 100644 --- a/aws/resource_aws_cognito_user_pool_test.go +++ b/aws/resource_aws_cognito_user_pool_test.go @@ -403,7 +403,6 @@ func TestAccAWSCognitoUserPool_withSchemaAttributes(t *testing.T) { { Config: testAccAWSCognitoUserPoolConfig_withSchemaAttributesUpdated(name), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.#", "2"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.#", "2"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2078884933.attribute_data_type", "String"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2078884933.developer_only_attribute", "false"), @@ -425,6 +424,11 @@ func TestAccAWSCognitoUserPool_withSchemaAttributes(t *testing.T) { resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2718111653.string_attribute_constraints.#", "0"), ), }, + { + ResourceName: "aws_cognito_user_pool.main", + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/aws/structure.go b/aws/structure.go index c46d1520a74..4d3d896fe81 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -2767,65 +2767,294 @@ func expandCognitoUserPoolSchema(inputs []interface{}) []*cognitoidentityprovide return configs } -func flattenCognitoUserPoolSchema(inputs []*cognitoidentityprovider.SchemaAttributeType) []map[string]interface{} { - values := make([]map[string]interface{}, len(inputs), len(inputs)) - - for i, input := range inputs { - value := make(map[string]interface{}) +func cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input *cognitoidentityprovider.SchemaAttributeType) bool { + if input == nil { + return false + } + + // All standard attributes always returned by API + // https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#cognito-user-pools-standard-attributes + var standardAttributes = []cognitoidentityprovider.SchemaAttributeType{ + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("address"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("birthdate"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("10"), + MinLength: aws.String("10"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(false), + Name: aws.String("email"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeBoolean), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("email_verified"), + Required: aws.Bool(false), + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("gender"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("given_name"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("family_name"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("locale"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("middle_name"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("name"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("nickname"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("phone_number"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeBoolean), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("phone_number_verified"), + Required: aws.Bool(false), + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("picture"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("preferred_username"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("profile"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(false), + Name: aws.String("sub"), + Required: aws.Bool(true), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("1"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeNumber), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("updated_at"), + NumberAttributeConstraints: &cognitoidentityprovider.NumberAttributeConstraintsType{ + MinValue: aws.String("0"), + }, + Required: aws.Bool(false), + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("website"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + { + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("zoneinfo"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("2048"), + MinLength: aws.String("0"), + }, + }, + } + for _, standardAttribute := range standardAttributes { + if reflect.DeepEqual(*input, standardAttribute) { + return true + } + } + return false +} + +func flattenCognitoUserPoolSchema(configuredAttributes, inputs []*cognitoidentityprovider.SchemaAttributeType) []map[string]interface{} { + values := make([]map[string]interface{}, 0) + for _, input := range inputs { if input == nil { - return nil - } - - if input.AttributeDataType != nil { - value["attribute_data_type"] = *input.AttributeDataType + continue } - if input.DeveloperOnlyAttribute != nil { - value["developer_only_attribute"] = *input.DeveloperOnlyAttribute + // The API returns all standard attributes + // https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#cognito-user-pools-standard-attributes + // Ignore setting them in state if they are unconfigured to prevent a huge and unexpected diff + configured := false + if configuredAttributes != nil { + for _, configuredAttribute := range configuredAttributes { + if reflect.DeepEqual(input, configuredAttribute) { + configured = true + } + } } - - if input.Mutable != nil { - value["mutable"] = *input.Mutable + if !configured && cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input) { + continue } - if input.Name != nil { - value["name"] = *input.Name + var value = map[string]interface{}{ + "attribute_data_type": aws.StringValue(input.AttributeDataType), + "developer_only_attribute": aws.BoolValue(input.DeveloperOnlyAttribute), + "mutable": aws.BoolValue(input.Mutable), + "name": strings.TrimPrefix(aws.StringValue(input.Name), "dev:custom:"), + "required": aws.BoolValue(input.Required), } if input.NumberAttributeConstraints != nil { subvalue := make(map[string]interface{}) if input.NumberAttributeConstraints.MinValue != nil { - subvalue["min_value"] = input.NumberAttributeConstraints.MinValue + subvalue["min_value"] = aws.StringValue(input.NumberAttributeConstraints.MinValue) } if input.NumberAttributeConstraints.MaxValue != nil { - subvalue["max_value"] = input.NumberAttributeConstraints.MaxValue + subvalue["max_value"] = aws.StringValue(input.NumberAttributeConstraints.MaxValue) } - value["number_attribute_constraints"] = subvalue - } - - if input.Required != nil { - value["required"] = *input.Required + value["number_attribute_constraints"] = []map[string]interface{}{subvalue} } if input.StringAttributeConstraints != nil { subvalue := make(map[string]interface{}) if input.StringAttributeConstraints.MinLength != nil { - subvalue["min_length"] = input.StringAttributeConstraints.MinLength + subvalue["min_length"] = aws.StringValue(input.StringAttributeConstraints.MinLength) } if input.StringAttributeConstraints.MaxLength != nil { - subvalue["max_length"] = input.StringAttributeConstraints.MaxLength + subvalue["max_length"] = aws.StringValue(input.StringAttributeConstraints.MaxLength) } - value["string_attribute_constraints"] = subvalue + value["string_attribute_constraints"] = []map[string]interface{}{subvalue} } - values[i] = value + values = append(values, value) } return values diff --git a/aws/structure_test.go b/aws/structure_test.go index 10b7202784b..b4f4c6e4604 100644 --- a/aws/structure_test.go +++ b/aws/structure_test.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elasticache" "github.com/aws/aws-sdk-go/service/elb" @@ -1259,6 +1260,142 @@ func TestNormalizeCloudFormationTemplate(t *testing.T) { } } +func TestCognitoUserPoolSchemaAttributeMatchesStandardAttribute(t *testing.T) { + cases := []struct { + Input *cognitoidentityprovider.SchemaAttributeType + Expected bool + }{ + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("birthdate"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("10"), + MinLength: aws.String("10"), + }, + }, + Expected: true, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(true), + Mutable: aws.Bool(true), + Name: aws.String("birthdate"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("10"), + MinLength: aws.String("10"), + }, + }, + Expected: false, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(false), + Name: aws.String("birthdate"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("10"), + MinLength: aws.String("10"), + }, + }, + Expected: false, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("non-existent"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("10"), + MinLength: aws.String("10"), + }, + }, + Expected: false, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("birthdate"), + Required: aws.Bool(true), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("10"), + MinLength: aws.String("10"), + }, + }, + Expected: false, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("birthdate"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("999"), + MinLength: aws.String("10"), + }, + }, + Expected: false, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("birthdate"), + Required: aws.Bool(false), + StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ + MaxLength: aws.String("10"), + MinLength: aws.String("999"), + }, + }, + Expected: false, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeBoolean), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("email_verified"), + Required: aws.Bool(false), + }, + Expected: true, + }, + { + Input: &cognitoidentityprovider.SchemaAttributeType{ + AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeNumber), + DeveloperOnlyAttribute: aws.Bool(false), + Mutable: aws.Bool(true), + Name: aws.String("updated_at"), + NumberAttributeConstraints: &cognitoidentityprovider.NumberAttributeConstraintsType{ + MinValue: aws.String("0"), + }, + Required: aws.Bool(false), + }, + Expected: true, + }, + } + + for _, tc := range cases { + output := cognitoUserPoolSchemaAttributeMatchesStandardAttribute(tc.Input) + if output != tc.Expected { + t.Fatalf("Expected %t match with standard attribute on input: \n\n%#v\n\n", tc.Expected, tc.Input) + } + } +} + func TestCanonicalXML(t *testing.T) { cases := []struct { Name string From 1b0babfdca213ad8f1dba8db4418956ee5d1e9ff Mon Sep 17 00:00:00 2001 From: Darren Haken Date: Thu, 15 Mar 2018 14:06:42 +0000 Subject: [PATCH 0111/3316] WIP with failing test --- aws/resource_aws_glue_catalog_crawler_test.go | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_glue_catalog_crawler_test.go b/aws/resource_aws_glue_catalog_crawler_test.go index ab24d65a517..00fc5871f1a 100644 --- a/aws/resource_aws_glue_catalog_crawler_test.go +++ b/aws/resource_aws_glue_catalog_crawler_test.go @@ -153,11 +153,37 @@ func checkGlueCatalogCrawlerExists(name string, crawlerName string) resource.Tes } } -const testAccGuardDutyDetectorConfigBasic = `resource "aws_glue_catalog_crawler" "test" { - name = "test" - database_name = "db_name" - role = "glue_role" - s3_target { +const testAccGuardDutyDetectorConfigBasic = ` + resource "aws_glue_catalog_crawler" "test" { + name = "test" + database_name = "db_name" + role = "${aws_iam_role.glue.name}" + s3_target { path = "s3://bucket" + } } -}` + + resource "aws_iam_role_policy_attachment" "aws-glue-service-role-default-policy-attachment" { + policy_arn = "arn:aws:iam::aws:policy/AWSGlueServiceRole" + role = "${aws_iam_role.glue.name}" + } + + resource "aws_iam_role" "glue" { + name = "AWSGlueServiceRoleDefault" + assume_role_policy = < Date: Sat, 17 Feb 2018 13:48:05 +0100 Subject: [PATCH 0112/3316] resource/api_gateway_integration: drop custom ValidateFunc for argument 'type' --- aws/resource_aws_api_gateway_integration.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index bfbfb05dd54..ac455c16486 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -7,6 +7,8 @@ import ( "strings" "time" + "strings" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" From 128e1e622986b08f5d0fc2e0d1536af50f7dd632 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 17 Feb 2018 13:49:23 +0100 Subject: [PATCH 0113/3316] resource/api_gateway_integration: support vpc link --- aws/resource_aws_api_gateway_integration.go | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index ac455c16486..0b3d9df008d 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -57,6 +57,21 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { }, false), }, + "connection_type": { + Type: schema.TypeString, + Optional: true, + Default: apigateway.ConnectionTypeInternet, + ValidateFunc: validation.StringInSlice([]string{ + apigateway.ConnectionTypeInternet, + apigateway.ConnectionTypeVpcLink, + }, false), + }, + + "connection_id": { + Type: schema.TypeString, + Optional: true, + }, + "uri": { Type: schema.TypeString, Optional: true, @@ -133,14 +148,26 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa conn := meta.(*AWSClient).apigateway log.Print("[DEBUG] Creating API Gateway Integration") + + connectionType := aws.String(d.Get("connection_type").(string)) + var connectionId *string + if *connectionType == apigateway.ConnectionTypeVpcLink { + if _, ok := d.GetOk("connection_id"); !ok { + return fmt.Errorf("connection_id required when connection_type set to VPC_LINK") + } + connectionId = aws.String(d.Get("connection_id").(string)) + } + var integrationHttpMethod *string if v, ok := d.GetOk("integration_http_method"); ok { integrationHttpMethod = aws.String(v.(string)) } + var uri *string if v, ok := d.GetOk("uri"); ok { uri = aws.String(v.(string)) } + templates := make(map[string]string) for k, v := range d.Get("request_templates").(map[string]interface{}) { templates[k] = v.(string) @@ -202,6 +229,8 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa CacheKeyParameters: cacheKeyParameters, PassthroughBehavior: passthroughBehavior, ContentHandling: contentHandling, + ConnectionType: connectionType, + ConnectionId: connectionId, }) if err != nil { return fmt.Errorf("Error creating API Gateway Integration: %s", err) From cc5dbd1fdd9f57aa131ec5d549f0f1fffed645a4 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 17 Feb 2018 13:51:17 +0100 Subject: [PATCH 0114/3316] resource/api_gateway_integration: add acceptance test for vpc link --- ...source_aws_api_gateway_integration_test.go | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/aws/resource_aws_api_gateway_integration_test.go b/aws/resource_aws_api_gateway_integration_test.go index 37b55313801..f476a8eb10f 100644 --- a/aws/resource_aws_api_gateway_integration_test.go +++ b/aws/resource_aws_api_gateway_integration_test.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) @@ -214,6 +215,29 @@ func TestAccAWSAPIGatewayIntegration_cache_key_parameters(t *testing.T) { }) } +func TestAccAWSAPIGatewayIntegration_vpcLink(t *testing.T) { + var conf apigateway.Integration + + rName := fmt.Sprintf("tf-acctest-apigw-int-%s", acctest.RandString(7)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayIntegrationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayIntegrationConfigVpcLink(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayIntegrationExists("aws_api_gateway_integration.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "type", "HTTP"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "connection_type", "VPC_LINK"), + resource.TestCheckResourceAttrSet("aws_api_gateway_integration.test", "connection_id"), + ), + }, + }, + }) +} + func testAccCheckAWSAPIGatewayIntegrationExists(n string, res *apigateway.Integration) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -587,3 +611,84 @@ resource "aws_api_gateway_integration" "test" { content_handling = "CONVERT_TO_TEXT" } ` + +func testAccAWSAPIGatewayIntegrationConfigVpcLink(rName string) string { + return fmt.Sprintf(` +variable "name" { + default = "%s" +} + +resource "aws_api_gateway_rest_api" "test" { + name = "${var.name}" +} + +resource "aws_api_gateway_resource" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + parent_id = "${aws_api_gateway_rest_api.test.root_resource_id}" + path_part = "test" +} + +resource "aws_api_gateway_method" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_resource.test.id}" + http_method = "GET" + authorization = "NONE" + + request_models = { + "application/json" = "Error" + } +} + +resource "aws_api_gateway_integration" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_resource.test.id}" + http_method = "${aws_api_gateway_method.test.http_method}" + + request_templates = { + "application/json" = "" + "application/xml" = "#set($inputRoot = $input.path('$'))\n{ }" + } + + request_parameters = { + "integration.request.header.X-Authorization" = "'static'" + "integration.request.header.X-Foo" = "'Bar'" + } + + type = "HTTP" + uri = "https://www.google.de" + integration_http_method = "GET" + passthrough_behavior = "WHEN_NO_MATCH" + content_handling = "CONVERT_TO_TEXT" + + connection_type = "VPC_LINK" + connection_id = "${aws_api_gateway_vpc_link.test.id}" +} + +resource "aws_lb" "test" { + name = "${var.name}" + internal = true + load_balancer_type = "network" + subnets = ["${aws_subnet.test.id}"] +} + +resource "aws_vpc" "test" { + cidr_block = "10.10.0.0/16" + tags { + Name = "${var.name}" + } +} + +data "aws_availability_zones" "test" {} + +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.10.0.0/24" + availability_zone = "${data.aws_availability_zones.test.names[0]}" +} + +resource "aws_api_gateway_vpc_link" "test" { + name = "${var.name}" + target_arns = ["${aws_lb.test.arn}"] +} +`, rName) +} From 75db1c485d77eea0e464bd6e0a0d721f5807b11e Mon Sep 17 00:00:00 2001 From: kaofelix Date: Wed, 3 Jan 2018 23:21:37 +0100 Subject: [PATCH 0115/3316] r/aws_codebuild_project: Add cache options --- aws/resource_aws_codebuild_project.go | 91 ++++++++++++++++++++++ aws/resource_aws_codebuild_project_test.go | 30 ++++++- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index eb6afb70b6d..cd432d6c1fa 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -59,6 +59,25 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, Set: resourceAwsCodeBuildProjectArtifactsHash, }, + "cache": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateAwsCodeBuildCacheType, + }, + "location": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + Set: resourceAwsCodeBuildProjectCacheHash, + }, "description": { Type: schema.TypeString, Optional: true, @@ -226,6 +245,10 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) Artifacts: &projectArtifacts, } + if v, ok := d.GetOk("cache"); ok { + params.Cache = expandProjectCache(v.(*schema.Set)) + } + if v, ok := d.GetOk("description"); ok { params.Description = aws.String(v.(string)) } @@ -312,6 +335,19 @@ func expandProjectArtifacts(d *schema.ResourceData) codebuild.ProjectArtifacts { return projectArtifacts } +func expandProjectCache(s *schema.Set) *codebuild.ProjectCache { + var projectCache *codebuild.ProjectCache + + data := s.List()[0].(map[string]interface{}) + + projectCache = &codebuild.ProjectCache{ + Type: aws.String(data["type"].(string)), + Location: aws.String(data["location"].(string)), + } + + return projectCache +} + func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironment { configs := d.Get("environment").(*schema.Set).List() @@ -438,6 +474,10 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e return err } + if err := d.Set("cache", schema.NewSet(resourceAwsCodeBuildProjectCacheHash, flattenAwsCodebuildProjectCache(project.Cache))); err != nil { + return err + } + if err := d.Set("source", flattenAwsCodeBuildProjectSource(project.Source)); err != nil { return err } @@ -485,6 +525,16 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) params.VpcConfig = expandCodeBuildVpcConfig(d.Get("vpc_config").([]interface{})) } + if d.HasChange("cache") { + if v, ok := d.GetOk("cache"); ok { + params.Cache = expandProjectCache(v.(*schema.Set)) + } else { + params.Cache = &codebuild.ProjectCache{ + Type: aws.String("NO_CACHE"), + } + } + } + if d.HasChange("description") { params.Description = aws.String(d.Get("description").(string)) } @@ -567,6 +617,20 @@ func flattenAwsCodeBuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) return &artifactSet } +func flattenAwsCodebuildProjectCache(cache *codebuild.ProjectCache) []interface{} { + values := map[string]interface{}{} + + if cache.Type != nil { + values["type"] = *cache.Type + } + + if cache.Location != nil { + values["location"] = *cache.Location + } + + return []interface{}{values} +} + func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnvironment) []interface{} { envConfig := map[string]interface{}{} @@ -630,6 +694,21 @@ func resourceAwsCodeBuildProjectArtifactsHash(v interface{}) int { return hashcode.String(buf.String()) } +func resourceAwsCodeBuildProjectCacheHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + + if m["type"] != nil { + buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) + } + + if m["location"] != nil { + buf.WriteString(fmt.Sprintf("%s-", m["location"].(string))) + } + + return hashcode.String(buf.String()) +} + func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) @@ -789,6 +868,18 @@ func validateAwsCodeBuildEnvironmentType(v interface{}, k string) (ws []string, return } +func validateAwsCodeBuildCacheType(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + types := map[string]bool{ + "S3": true, + } + + if !types[value] { + errors = append(errors, fmt.Errorf("CodeBuild: Cache Type can only be S3")) + } + return +} + func validateAwsCodeBuildSourceType(v interface{}, k string) (ws []string, errors []error) { value := v.(string) types := map[string]bool{ diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 1dd088595a2..80097d4c636 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -172,6 +172,24 @@ func TestAWSCodeBuildProject_artifactsNamespaceTypeValidation(t *testing.T) { } } +func TestAWSCodeBuildProject_cacheTypeValidation(t *testing.T) { + cases := []struct { + Value string + ErrCount int + }{ + {Value: "S3", ErrCount: 0}, + {Value: "XYZ", ErrCount: 1}, + } + + for _, tc := range cases { + _, errors := validateAwsCodeBuildCacheType(tc.Value, "aws_codebuild_project") + + if len(errors) != tc.ErrCount { + t.Fatalf("Expected the AWS CodeBuild project artifacts type to trigger a validation error") + } + } +} + func longTestData() string { data := ` test-test-test-test-test-test-test-test-test-test- @@ -388,6 +406,11 @@ func testAccCheckAWSCodeBuildProjectDestroy(s *terraform.State) error { func testAccAWSCodeBuildProjectConfig_basic(rName, vpcConfig, vpcResources string) string { return fmt.Sprintf(` +resource "aws_s3_bucket" "foo" { + bucket = "tf-test-codebuild-%s" + acl = "private" +} + resource "aws_iam_role" "codebuild_role" { name = "codebuild-role-%s" assume_role_policy = < Date: Thu, 4 Jan 2018 09:47:10 +0100 Subject: [PATCH 0116/3316] r/aws_codebuild_project: Add documentation cache option --- website/docs/r/codebuild_project.html.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index d9679b5d796..476e28128de 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -13,6 +13,11 @@ Provides a CodeBuild Project resource. ## Example Usage ```hcl +resource "aws_s3_bucket" "foo" { + bucket = "test-bucket" + acl = "private" +} + resource "aws_iam_role" "codebuild_role" { name = "codebuild-role-" @@ -73,6 +78,11 @@ resource "aws_codebuild_project" "foo" { type = "NO_ARTIFACTS" } + cache { + type = "S3" + location = "${aws_s3_bucket.foo.bucket}" + } + environment { compute_type = "BUILD_GENERAL1_SMALL" image = "aws/codebuild/nodejs:6.3.1" @@ -125,6 +135,7 @@ The following arguments are supported: * `build_timeout` - (Optional) How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed. The default is 60 minutes. * `tags` - (Optional) A mapping of tags to assign to the resource. * `artifacts` - (Required) Information about the project's build output artifacts. Artifact blocks are documented below. +* `cache` - (Optional) Information about the cache storage for the project. Cache blocks are documented below. * `environment` - (Required) Information about the project's build environment. Environment blocks are documented below. * `source` - (Required) Information about the project's input source code. Source blocks are documented below. * `vpc_config` - (Optional) Configuration for the builds to run inside a VPC. VPC config blocks are documented below. @@ -138,6 +149,11 @@ The following arguments are supported: * `packaging` - (Optional) The type of build output artifact to create. If `type` is set to `S3`, valid values for this parameter are: `NONE` or `ZIP` * `path` - (Optional) If `type` is set to `S3`, this is the path to the output artifact +`cache` supports the following: + +* `type` - (Required) The type of storage that will be used for the AWS CodeBuild project cache. The only valid value is `S3`. +* `location` - (Required) The location where the AWS CodeBuild project stores cached resources. Has to be an S3 bucket. + `environment` supports the following: * `compute_type` - (Required) Information about the compute resources the build project will use. Available values for this parameter are: `BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM` or `BUILD_GENERAL1_LARGE` From 8246aff516758b2ab59aa27818425b3978b6bbd3 Mon Sep 17 00:00:00 2001 From: kaofelix Date: Thu, 4 Jan 2018 10:47:14 +0100 Subject: [PATCH 0117/3316] r/aws_codebuild_project: Do not display NO_CACHE value in the plan --- aws/resource_aws_codebuild_project.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index cd432d6c1fa..605ede509a7 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -621,7 +621,11 @@ func flattenAwsCodebuildProjectCache(cache *codebuild.ProjectCache) []interface{ values := map[string]interface{}{} if cache.Type != nil { - values["type"] = *cache.Type + if *cache.Type == "NO_CACHE" { + values["type"] = "" + } else { + values["type"] = *cache.Type + } } if cache.Location != nil { From b3a3bf4dbcac5d34bf9250a735b55ebeeeb32526 Mon Sep 17 00:00:00 2001 From: kaofelix Date: Thu, 4 Jan 2018 10:48:29 +0100 Subject: [PATCH 0118/3316] r/aws_codebuild_project: Fix acceptance test --- aws/resource_aws_codebuild_project_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 80097d4c636..1fd7d3dfd6e 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -514,6 +514,11 @@ resource "aws_codebuild_project" "foo" { func testAccAWSCodeBuildProjectConfig_basicUpdated(rName string) string { return fmt.Sprintf(` +resource "aws_s3_bucket" "foo" { + bucket = "tf-test-codebuild-%s" + acl = "private" +} + resource "aws_iam_role" "codebuild_role" { name = "codebuild-role-%s" assume_role_policy = < Date: Thu, 4 Jan 2018 10:48:57 +0100 Subject: [PATCH 0119/3316] r/aws_codebuild_project: Fix indentation in code samples --- aws/resource_aws_codebuild_project_test.go | 4 ++-- website/docs/r/codebuild_project.html.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 1fd7d3dfd6e..daaa2f60b03 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -483,7 +483,7 @@ resource "aws_codebuild_project" "foo" { } cache { - type = "S3" + type = "S3" location = "${aws_s3_bucket.foo.bucket}" } @@ -578,7 +578,7 @@ resource "aws_codebuild_project" "foo" { } cache { - type = "S3" + type = "S3" location = "${aws_s3_bucket.foo.bucket}" } diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index 476e28128de..b536e622f76 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -79,7 +79,7 @@ resource "aws_codebuild_project" "foo" { } cache { - type = "S3" + type = "S3" location = "${aws_s3_bucket.foo.bucket}" } From 536dea9dc3b8d86c4c4d30072dcafcd3a6f091d6 Mon Sep 17 00:00:00 2001 From: kaofelix Date: Mon, 8 Jan 2018 10:14:52 +0100 Subject: [PATCH 0120/3316] r/aws_codebuild_project: Move cache type validator to validators.go --- aws/resource_aws_codebuild_project.go | 12 ---- aws/resource_aws_codebuild_project_test.go | 18 ------ aws/validators.go | 65 ++++++++++++++++++++++ aws/validators_test.go | 18 ++++++ 4 files changed, 83 insertions(+), 30 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 605ede509a7..61532b648ba 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -872,18 +872,6 @@ func validateAwsCodeBuildEnvironmentType(v interface{}, k string) (ws []string, return } -func validateAwsCodeBuildCacheType(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - types := map[string]bool{ - "S3": true, - } - - if !types[value] { - errors = append(errors, fmt.Errorf("CodeBuild: Cache Type can only be S3")) - } - return -} - func validateAwsCodeBuildSourceType(v interface{}, k string) (ws []string, errors []error) { value := v.(string) types := map[string]bool{ diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index daaa2f60b03..7694e48c748 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -172,24 +172,6 @@ func TestAWSCodeBuildProject_artifactsNamespaceTypeValidation(t *testing.T) { } } -func TestAWSCodeBuildProject_cacheTypeValidation(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - {Value: "S3", ErrCount: 0}, - {Value: "XYZ", ErrCount: 1}, - } - - for _, tc := range cases { - _, errors := validateAwsCodeBuildCacheType(tc.Value, "aws_codebuild_project") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the AWS CodeBuild project artifacts type to trigger a validation error") - } - } -} - func longTestData() string { data := ` test-test-test-test-test-test-test-test-test-test- diff --git a/aws/validators.go b/aws/validators.go index 79fc3c2f165..3e314d18e0f 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -20,6 +20,8 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" "github.com/hashicorp/terraform/helper/validation" + "github.com/aws/aws-sdk-go/service/gamelift" + "github.com/aws/aws-sdk-go/service/guardduty" ) // When released, replace all usage with upstream validation function: @@ -1656,6 +1658,69 @@ func validateAwsElastiCacheReplicationGroupAuthToken(v interface{}, k string) (w return } +func validateAwsCodeBuildCacheType(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + types := map[string]bool{ + "S3": true, + } + + if !types[value] { + errors = append(errors, fmt.Errorf("CodeBuild: Cache Type can only be S3")) + } + 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 +} + +func validateGuardDutyIpsetFormat(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validType := []string{ + guardduty.IpSetFormatTxt, + guardduty.IpSetFormatStix, + guardduty.IpSetFormatOtxCsv, + guardduty.IpSetFormatAlienVault, + guardduty.IpSetFormatProofPoint, + guardduty.IpSetFormatFireEye, + } + for _, str := range validType { + if value == str { + return + } + } + errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) + return +} + +func validateGuardDutyThreatIntelSetFormat(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + validType := []string{ + guardduty.ThreatIntelSetFormatTxt, + guardduty.ThreatIntelSetFormatStix, + guardduty.ThreatIntelSetFormatOtxCsv, + guardduty.ThreatIntelSetFormatAlienVault, + guardduty.ThreatIntelSetFormatProofPoint, + guardduty.ThreatIntelSetFormatFireEye, + } + for _, str := range validType { + if value == str { + return + } + } + errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) + return +} + func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { enabled := d.Get("stream_enabled").(bool) if enabled { diff --git a/aws/validators_test.go b/aws/validators_test.go index f241c0e20e9..8b6635edf51 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -2503,6 +2503,24 @@ func TestValidateCognitoUserPoolDomain(t *testing.T) { } } +func TestValidateAwsCodeBuildCacheType(t *testing.T) { + cases := []struct { + Value string + ErrCount int + }{ + {Value: "S3", ErrCount: 0}, + {Value: "XYZ", ErrCount: 1}, + } + + for _, tc := range cases { + _, errors := validateAwsCodeBuildCacheType(tc.Value, "aws_codebuild_project") + + if len(errors) != tc.ErrCount { + t.Fatalf("Expected the AWS CodeBuild project artifacts type to trigger a validation error") + } + } +} + func TestValidateCognitoUserGroupName(t *testing.T) { validValues := []string{ "foo", From 0090b9fc79028712396adae438eb5086b8cafc4e Mon Sep 17 00:00:00 2001 From: kaofelix Date: Mon, 8 Jan 2018 14:42:25 +0100 Subject: [PATCH 0121/3316] r/aws_codebuild_project: Make cache option into a *schema.List instead of *schema.Set --- aws/resource_aws_codebuild_project.go | 28 ++++++--------------------- aws/validators.go | 4 ++-- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 61532b648ba..0ea733a898b 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -60,7 +60,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { Set: resourceAwsCodeBuildProjectArtifactsHash, }, "cache": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -76,7 +76,6 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, }, }, - Set: resourceAwsCodeBuildProjectCacheHash, }, "description": { Type: schema.TypeString, @@ -246,7 +245,7 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) } if v, ok := d.GetOk("cache"); ok { - params.Cache = expandProjectCache(v.(*schema.Set)) + params.Cache = expandProjectCache(v.([]interface{})) } if v, ok := d.GetOk("description"); ok { @@ -335,10 +334,10 @@ func expandProjectArtifacts(d *schema.ResourceData) codebuild.ProjectArtifacts { return projectArtifacts } -func expandProjectCache(s *schema.Set) *codebuild.ProjectCache { +func expandProjectCache(s []interface{}) *codebuild.ProjectCache { var projectCache *codebuild.ProjectCache - data := s.List()[0].(map[string]interface{}) + data := s[0].(map[string]interface{}) projectCache = &codebuild.ProjectCache{ Type: aws.String(data["type"].(string)), @@ -474,7 +473,7 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e return err } - if err := d.Set("cache", schema.NewSet(resourceAwsCodeBuildProjectCacheHash, flattenAwsCodebuildProjectCache(project.Cache))); err != nil { + if err := d.Set("cache", flattenAwsCodebuildProjectCache(project.Cache)); err != nil { return err } @@ -527,7 +526,7 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) if d.HasChange("cache") { if v, ok := d.GetOk("cache"); ok { - params.Cache = expandProjectCache(v.(*schema.Set)) + params.Cache = expandProjectCache(v.([]interface{})) } else { params.Cache = &codebuild.ProjectCache{ Type: aws.String("NO_CACHE"), @@ -698,21 +697,6 @@ func resourceAwsCodeBuildProjectArtifactsHash(v interface{}) int { return hashcode.String(buf.String()) } -func resourceAwsCodeBuildProjectCacheHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - - if m["type"] != nil { - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - } - - if m["location"] != nil { - buf.WriteString(fmt.Sprintf("%s-", m["location"].(string))) - } - - return hashcode.String(buf.String()) -} - func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) diff --git a/aws/validators.go b/aws/validators.go index 3e314d18e0f..1cc0aeb3ab3 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -15,13 +15,13 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/aws/aws-sdk-go/service/gamelift" + "github.com/aws/aws-sdk-go/service/guardduty" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" "github.com/hashicorp/terraform/helper/validation" - "github.com/aws/aws-sdk-go/service/gamelift" - "github.com/aws/aws-sdk-go/service/guardduty" ) // When released, replace all usage with upstream validation function: From da1c51da464095aee63547999a3cb127f0136985 Mon Sep 17 00:00:00 2001 From: Simon Westcott Date: Fri, 16 Mar 2018 13:45:36 +0000 Subject: [PATCH 0122/3316] Update ASG group resource to support service-linked roles --- aws/resource_aws_autoscaling_group.go | 14 ++++++ aws/resource_aws_autoscaling_group_test.go | 54 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/aws/resource_aws_autoscaling_group.go b/aws/resource_aws_autoscaling_group.go index 89719dce1c0..31e51c19528 100644 --- a/aws/resource_aws_autoscaling_group.go +++ b/aws/resource_aws_autoscaling_group.go @@ -242,6 +242,11 @@ func resourceAwsAutoscalingGroup() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeMap}, ConflictsWith: []string{"tag"}, }, + + "service_linked_role_arn": { + Type: schema.TypeString, + Optional: true, + }, }, } } @@ -393,6 +398,10 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) createOpts.TargetGroupARNs = expandStringList(v.(*schema.Set).List()) } + if v, ok := d.GetOk("service_linked_role_arn"); ok { + createOpts.ServiceLinkedRoleARN = aws.String(v.(string)) + } + log.Printf("[DEBUG] AutoScaling Group create configuration: %#v", createOpts) _, err := conn.CreateAutoScalingGroup(&createOpts) if err != nil { @@ -468,6 +477,7 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e d.Set("max_size", g.MaxSize) d.Set("placement_group", g.PlacementGroup) d.Set("name", g.AutoScalingGroupName) + d.Set("service_linked_role_arn", g.ServiceLinkedRoleARN) var tagList, tagsList []*autoscaling.TagDescription var tagOk, tagsOk bool @@ -714,6 +724,10 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) } } + if d.HasChange("service_linked_role_arn") { + opts.ServiceLinkedRoleARN = aws.String(d.Get("service_linked_role_arn").(string)) + } + return resourceAwsAutoscalingGroupRead(d, meta) } diff --git a/aws/resource_aws_autoscaling_group_test.go b/aws/resource_aws_autoscaling_group_test.go index a472fc88435..6c21d213345 100644 --- a/aws/resource_aws_autoscaling_group_test.go +++ b/aws/resource_aws_autoscaling_group_test.go @@ -474,6 +474,26 @@ func TestAccAWSAutoScalingGroup_withMetrics(t *testing.T) { }) } +func TestAccAWSAutoScalingGroup_serviceLinkedRoleARN(t *testing.T) { + var group autoscaling.Group + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSAutoScalingGroupConfig_withServiceLinkedRoleARN, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAutoScalingGroupExists("aws_autoscaling_group.bar", &group), + resource.TestCheckResourceAttrSet( + "aws_autoscaling_group.bar", "service_linked_role_arn"), + ), + }, + }, + }) +} + func TestAccAWSAutoScalingGroup_ALB_TargetGroups(t *testing.T) { var group autoscaling.Group var tg elbv2.TargetGroup @@ -1434,6 +1454,40 @@ resource "aws_autoscaling_group" "bar" { `, name, name) } +const testAccAWSAutoScalingGroupConfig_withServiceLinkedRoleARN = ` +data "aws_ami" "test_ami" { + most_recent = true + + filter { + name = "owner-alias" + values = ["amazon"] + } + + filter { + name = "name" + values = ["amzn-ami-hvm-*-x86_64-gp2"] + } +} + +data "aws_iam_role" "autoscaling_service_linked_role" { + name = "AWSServiceRoleForAutoScaling" +} + +resource "aws_launch_configuration" "foobar" { + image_id = "${data.aws_ami.test_ami.id}" + instance_type = "t2.micro" +} + +resource "aws_autoscaling_group" "bar" { + availability_zones = ["us-west-2a"] + desired_capacity = 0 + max_size = 0 + min_size = 0 + launch_configuration = "${aws_launch_configuration.foobar.name}" + service_linked_role_arn = "${data.aws_iam_role.autoscaling_service_linked_role.arn}" +} +` + const testAccAWSAutoscalingMetricsCollectionConfig_allMetricsCollected = ` data "aws_ami" "test_ami" { most_recent = true From ad50670ee02a0daebb820b86ba25f95e0b600bf9 Mon Sep 17 00:00:00 2001 From: Simon Westcott Date: Fri, 16 Mar 2018 13:46:08 +0000 Subject: [PATCH 0123/3316] Docs update for ASG service-linked role --- website/docs/r/autoscaling_group.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/r/autoscaling_group.html.markdown b/website/docs/r/autoscaling_group.html.markdown index ddd2f9ff788..f9774aab010 100644 --- a/website/docs/r/autoscaling_group.html.markdown +++ b/website/docs/r/autoscaling_group.html.markdown @@ -172,6 +172,7 @@ Note that if you suspend either the `Launch` or `Terminate` process types, it ca * `protect_from_scale_in` (Optional) Allows setting instance protection. The autoscaling group will not select instances with this setting for terminination during scale in events. +* `service_linked_role_arn` (Optional) The ARN of the service-linked role that the ASG will use to call other AWS services Tags support the following: From fb73d9c2b7aac961ad4699f0f5b6392485e27204 Mon Sep 17 00:00:00 2001 From: tuomov-tieto Date: Sat, 17 Mar 2018 11:32:06 +0200 Subject: [PATCH 0124/3316] aws_dynamodb_table_item update with range key --- aws/resource_aws_dynamodb_table_item_test.go | 49 ++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/aws/resource_aws_dynamodb_table_item_test.go b/aws/resource_aws_dynamodb_table_item_test.go index d18c2b7771e..acbb03644a9 100644 --- a/aws/resource_aws_dynamodb_table_item_test.go +++ b/aws/resource_aws_dynamodb_table_item_test.go @@ -177,6 +177,55 @@ func TestAccAWSDynamoDbTableItem_update(t *testing.T) { }) } +func TestAccAWSDynamoDbTableItem_updateWithRangeKey(t *testing.T) { + var conf dynamodb.GetItemOutput + + tableName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + hashKey := "hashKey" + rangeKey := "rangeKey" + + itemBefore := `{ + "hashKey": {"S": "before"}, + "rangeKey": {"S": "rangeBefore"}, + "value": {"S": "valueBefore"} +}` + itemAfter := `{ + "hashKey": {"S": "before"}, + "rangeKey": {"S": "rangeAfter"}, + "value": {"S": "valueAfter"} +}` + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDynamoDbItemDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDynamoDbItemConfigWithRangeKey(tableName, hashKey, rangeKey, itemBefore), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDynamoDbTableItemExists("aws_dynamodb_table_item.test", &conf), + testAccCheckAWSDynamoDbTableItemCount(tableName, 1), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "hash_key", hashKey), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "range_key", rangeKey), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "table_name", tableName), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "item", itemBefore+"\n"), + ), + }, + { + Config: testAccAWSDynamoDbItemConfigWithRangeKey(tableName, hashKey, rangeKey, itemAfter), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDynamoDbTableItemExists("aws_dynamodb_table_item.test", &conf), + testAccCheckAWSDynamoDbTableItemCount(tableName, 1), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "hash_key", hashKey), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "range_key", rangeKey), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "table_name", tableName), + resource.TestCheckResourceAttr("aws_dynamodb_table_item.test", "item", itemAfter+"\n"), + ), + }, + }, + }) +} + func testAccCheckAWSDynamoDbItemDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).dynamodbconn From 74ca872cfc9c96dba31427f6117be950c9c83ab5 Mon Sep 17 00:00:00 2001 From: tuomov-tieto Date: Sat, 17 Mar 2018 11:33:23 +0200 Subject: [PATCH 0125/3316] Consider changing range_key a destructive update --- aws/resource_aws_dynamodb_table_item.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_dynamodb_table_item.go b/aws/resource_aws_dynamodb_table_item.go index 764bf8b12d9..8d7588c4014 100644 --- a/aws/resource_aws_dynamodb_table_item.go +++ b/aws/resource_aws_dynamodb_table_item.go @@ -105,9 +105,9 @@ func resourceAwsDynamoDbTableItemUpdate(d *schema.ResourceData, meta interface{} updates := map[string]*dynamodb.AttributeValueUpdate{} for key, value := range attributes { - // Hash keys are not updatable, so we'll basically create + // Hash keys and range keys are not updatable, so we'll basically create // a new record and delete the old one below - if key == hashKey { + if key == hashKey || key == rangeKey { continue } updates[key] = &dynamodb.AttributeValueUpdate{ From a87807c2b5511d13b80d968b2963bf427d4e16fb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 17 Mar 2018 13:13:51 -0400 Subject: [PATCH 0126/3316] resource/aws_lb: Correctly set subnet_mappings in state --- aws/resource_aws_lb.go | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index f6d978b34ed..48cfc0cc029 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -617,6 +617,23 @@ func flattenSubnetsFromAvailabilityZones(availabilityZones []*elbv2.Availability return result } +func flattenSubnetMappingsFromAvailabilityZones(availabilityZones []*elbv2.AvailabilityZone) []map[string]interface{} { + l := make([]map[string]interface{}, 0) + for _, availabilityZone := range availabilityZones { + for _, loadBalancerAddress := range availabilityZone.LoadBalancerAddresses { + m := make(map[string]interface{}, 0) + m["subnet_id"] = *availabilityZone.SubnetId + + if loadBalancerAddress.AllocationId != nil { + m["allocation_id"] = *loadBalancerAddress.AllocationId + } + + l = append(l, m) + } + } + return l +} + func lbSuffixFromARN(arn *string) string { if arn == nil { return "" @@ -640,29 +657,19 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo d.Set("name", lb.LoadBalancerName) d.Set("internal", (lb.Scheme != nil && *lb.Scheme == "internal")) d.Set("security_groups", flattenStringList(lb.SecurityGroups)) - d.Set("subnets", flattenSubnetsFromAvailabilityZones(lb.AvailabilityZones)) d.Set("vpc_id", lb.VpcId) d.Set("zone_id", lb.CanonicalHostedZoneId) d.Set("dns_name", lb.DNSName) d.Set("ip_address_type", lb.IpAddressType) d.Set("load_balancer_type", lb.Type) - subnetMappings := make([]interface{}, 0) - for _, az := range lb.AvailabilityZones { - subnetMappingRaw := make([]map[string]interface{}, len(az.LoadBalancerAddresses)) - for _, subnet := range az.LoadBalancerAddresses { - subnetMap := make(map[string]interface{}, 0) - subnetMap["subnet_id"] = *az.SubnetId - - if subnet.AllocationId != nil { - subnetMap["allocation_id"] = *subnet.AllocationId - } + if err := d.Set("subnets", flattenSubnetsFromAvailabilityZones(lb.AvailabilityZones)); err != nil { + return fmt.Errorf("error setting subnets: %s", err) + } - subnetMappingRaw = append(subnetMappingRaw, subnetMap) - } - subnetMappings = append(subnetMappings, subnetMappingRaw) + if err := d.Set("subnet_mapping", flattenSubnetMappingsFromAvailabilityZones(lb.AvailabilityZones)); err != nil { + return fmt.Errorf("error setting subnet_mapping: %s", err) } - d.Set("subnet_mapping", subnetMappings) respTags, err := elbconn.DescribeTags(&elbv2.DescribeTagsInput{ ResourceArns: []*string{lb.LoadBalancerArn}, From 4d338ea076c0850118d51c1f869e1888a8d5ba7b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 17 Mar 2018 14:11:01 -0400 Subject: [PATCH 0127/3316] resource/aws_batch_compute_environment: Correctly set compute_resources in state --- aws/resource_aws_batch_compute_environment.go | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_batch_compute_environment.go b/aws/resource_aws_batch_compute_environment.go index 06955e0a6c1..0c7758f6e81 100644 --- a/aws/resource_aws_batch_compute_environment.go +++ b/aws/resource_aws_batch_compute_environment.go @@ -266,8 +266,10 @@ func resourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interfa d.Set("state", computeEnvironment.State) d.Set("type", computeEnvironment.Type) - if *(computeEnvironment.Type) == "MANAGED" { - d.Set("compute_resources", flattenComputeResources(computeEnvironment.ComputeResources)) + if aws.StringValue(computeEnvironment.Type) == batch.CETypeManaged { + if err := d.Set("compute_resources", flattenBatchComputeResources(computeEnvironment.ComputeResources)); err != nil { + return fmt.Errorf("error setting compute_resources: %s", err) + } } d.Set("arn", computeEnvironment.ComputeEnvironmentArn) @@ -279,23 +281,23 @@ func resourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interfa return nil } -func flattenComputeResources(computeResource *batch.ComputeResource) []map[string]interface{} { +func flattenBatchComputeResources(computeResource *batch.ComputeResource) []map[string]interface{} { result := make([]map[string]interface{}, 0) m := make(map[string]interface{}) - m["bid_percentage"] = computeResource.BidPercentage - m["desired_vcpus"] = computeResource.DesiredvCpus - m["ec2_key_pair"] = computeResource.Ec2KeyPair - m["image_id"] = computeResource.ImageId - m["instance_role"] = computeResource.InstanceRole + m["bid_percentage"] = int(aws.Int64Value(computeResource.BidPercentage)) + m["desired_vcpus"] = int(aws.Int64Value(computeResource.DesiredvCpus)) + m["ec2_key_pair"] = aws.StringValue(computeResource.Ec2KeyPair) + m["image_id"] = aws.StringValue(computeResource.ImageId) + m["instance_role"] = aws.StringValue(computeResource.InstanceRole) m["instance_type"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.InstanceTypes)) - m["max_vcpus"] = computeResource.MaxvCpus - m["min_vcpus"] = computeResource.MinvCpus + m["max_vcpus"] = int(aws.Int64Value(computeResource.MaxvCpus)) + m["min_vcpus"] = int(aws.Int64Value(computeResource.MinvCpus)) m["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.SecurityGroupIds)) - m["spot_iam_fleet_role"] = computeResource.SpotIamFleetRole + m["spot_iam_fleet_role"] = aws.StringValue(computeResource.SpotIamFleetRole) m["subnets"] = schema.NewSet(schema.HashString, flattenStringList(computeResource.Subnets)) m["tags"] = tagsToMapGeneric(computeResource.Tags) - m["type"] = computeResource.Type + m["type"] = aws.StringValue(computeResource.Type) result = append(result, m) return result From 28bc253beb0fc574e81af3425042b678b291a474 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 17 Mar 2018 14:16:56 -0400 Subject: [PATCH 0128/3316] resource/aws_lb: Mark subnet_mapping attribute Computed: true --- aws/resource_aws_lb.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index 48cfc0cc029..1b8344ecfe3 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -96,6 +96,7 @@ func resourceAwsLb() *schema.Resource { "subnet_mapping": { Type: schema.TypeSet, Optional: true, + Computed: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ From 5e7fa7eb40fa20181936121c65cf0f32735ecea9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 17 Mar 2018 14:27:50 -0400 Subject: [PATCH 0129/3316] resource/aws_cloudformation_stack: Remove setting non-existent arn attribute --- aws/resource_aws_cloudformation_stack.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/resource_aws_cloudformation_stack.go b/aws/resource_aws_cloudformation_stack.go index c6a17a703c8..43e9472e842 100644 --- a/aws/resource_aws_cloudformation_stack.go +++ b/aws/resource_aws_cloudformation_stack.go @@ -308,7 +308,6 @@ func resourceAwsCloudFormationStackRead(d *schema.ResourceData, meta interface{} log.Printf("[DEBUG] Received CloudFormation stack: %s", stack) d.Set("name", stack.StackName) - d.Set("arn", stack.StackId) d.Set("iam_role_arn", stack.RoleARN) if stack.TimeoutInMinutes != nil { From 62e0b8a21f09877d33b9bd2c3862fcd2cdf36dc5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 17 Mar 2018 14:31:48 -0400 Subject: [PATCH 0130/3316] tests/resource/aws_cloudformation_stack: Append Stack to function names --- aws/resource_aws_cloudformation_stack_test.go | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/aws/resource_aws_cloudformation_stack_test.go b/aws/resource_aws_cloudformation_stack_test.go index 174dd6293b8..b91cfa18953 100644 --- a/aws/resource_aws_cloudformation_stack_test.go +++ b/aws/resource_aws_cloudformation_stack_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSCloudFormation_importBasic(t *testing.T) { +func TestAccAWSCloudFormationStack_importBasic(t *testing.T) { stackName := fmt.Sprintf("tf-acc-test-basic-%s", acctest.RandString(10)) resourceName := "aws_cloudformation_stack.network" @@ -22,7 +22,7 @@ func TestAccAWSCloudFormation_importBasic(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig(stackName), + Config: testAccAWSCloudFormationStackConfig(stackName), }, { ResourceName: resourceName, @@ -33,7 +33,7 @@ func TestAccAWSCloudFormation_importBasic(t *testing.T) { }) } -func TestAccAWSCloudFormation_basic(t *testing.T) { +func TestAccAWSCloudFormationStack_basic(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-basic-%s", acctest.RandString(10)) @@ -43,7 +43,7 @@ func TestAccAWSCloudFormation_basic(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig(stackName), + Config: testAccAWSCloudFormationStackConfig(stackName), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.network", &stack), ), @@ -52,7 +52,7 @@ func TestAccAWSCloudFormation_basic(t *testing.T) { }) } -func TestAccAWSCloudFormation_yaml(t *testing.T) { +func TestAccAWSCloudFormationStack_yaml(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-yaml-%s", acctest.RandString(10)) @@ -62,7 +62,7 @@ func TestAccAWSCloudFormation_yaml(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig_yaml(stackName), + Config: testAccAWSCloudFormationStackConfig_yaml(stackName), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.yaml", &stack), ), @@ -71,7 +71,7 @@ func TestAccAWSCloudFormation_yaml(t *testing.T) { }) } -func TestAccAWSCloudFormation_defaultParams(t *testing.T) { +func TestAccAWSCloudFormationStack_defaultParams(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-default-params-%s", acctest.RandString(10)) @@ -81,7 +81,7 @@ func TestAccAWSCloudFormation_defaultParams(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig_defaultParams(stackName), + Config: testAccAWSCloudFormationStackConfig_defaultParams(stackName), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.asg-demo", &stack), ), @@ -90,7 +90,7 @@ func TestAccAWSCloudFormation_defaultParams(t *testing.T) { }) } -func TestAccAWSCloudFormation_allAttributes(t *testing.T) { +func TestAccAWSCloudFormationStack_allAttributes(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-all-attributes-%s", acctest.RandString(10)) @@ -101,7 +101,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig_allAttributesWithBodies(stackName), + Config: testAccAWSCloudFormationStackConfig_allAttributesWithBodies(stackName), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.full", &stack), resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "name", stackName), @@ -119,7 +119,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) { ), }, { - Config: testAccAWSCloudFormationConfig_allAttributesWithBodies_modified(stackName), + Config: testAccAWSCloudFormationStackConfig_allAttributesWithBodies_modified(stackName), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.full", &stack), resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "name", stackName), @@ -141,7 +141,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) { } // Regression for https://github.com/hashicorp/terraform/issues/4332 -func TestAccAWSCloudFormation_withParams(t *testing.T) { +func TestAccAWSCloudFormationStack_withParams(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-with-params-%s", acctest.RandString(10)) @@ -151,13 +151,13 @@ func TestAccAWSCloudFormation_withParams(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig_withParams(stackName), + Config: testAccAWSCloudFormationStackConfig_withParams(stackName), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.with_params", &stack), ), }, { - Config: testAccAWSCloudFormationConfig_withParams_modified(stackName), + Config: testAccAWSCloudFormationStackConfig_withParams_modified(stackName), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.with_params", &stack), ), @@ -167,7 +167,7 @@ func TestAccAWSCloudFormation_withParams(t *testing.T) { } // Regression for https://github.com/hashicorp/terraform/issues/4534 -func TestAccAWSCloudFormation_withUrl_withParams(t *testing.T) { +func TestAccAWSCloudFormationStack_withUrl_withParams(t *testing.T) { var stack cloudformation.Stack rName := fmt.Sprintf("tf-acc-test-with-url-and-params-%s", acctest.RandString(10)) @@ -177,13 +177,13 @@ func TestAccAWSCloudFormation_withUrl_withParams(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig_templateUrl_withParams(rName, "tf-cf-stack.json", "11.0.0.0/16"), + Config: testAccAWSCloudFormationStackConfig_templateUrl_withParams(rName, "tf-cf-stack.json", "11.0.0.0/16"), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.with-url-and-params", &stack), ), }, { - Config: testAccAWSCloudFormationConfig_templateUrl_withParams(rName, "tf-cf-stack.json", "13.0.0.0/16"), + Config: testAccAWSCloudFormationStackConfig_templateUrl_withParams(rName, "tf-cf-stack.json", "13.0.0.0/16"), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.with-url-and-params", &stack), ), @@ -192,7 +192,7 @@ func TestAccAWSCloudFormation_withUrl_withParams(t *testing.T) { }) } -func TestAccAWSCloudFormation_withUrl_withParams_withYaml(t *testing.T) { +func TestAccAWSCloudFormationStack_withUrl_withParams_withYaml(t *testing.T) { var stack cloudformation.Stack rName := fmt.Sprintf("tf-acc-test-with-params-and-yaml-%s", acctest.RandString(10)) @@ -202,7 +202,7 @@ func TestAccAWSCloudFormation_withUrl_withParams_withYaml(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig_templateUrl_withParams_withYaml(rName, "tf-cf-stack.yaml", "13.0.0.0/16"), + Config: testAccAWSCloudFormationStackConfig_templateUrl_withParams_withYaml(rName, "tf-cf-stack.yaml", "13.0.0.0/16"), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.with-url-and-params-and-yaml", &stack), ), @@ -212,7 +212,7 @@ func TestAccAWSCloudFormation_withUrl_withParams_withYaml(t *testing.T) { } // Test for https://github.com/hashicorp/terraform/issues/5653 -func TestAccAWSCloudFormation_withUrl_withParams_noUpdate(t *testing.T) { +func TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate(t *testing.T) { var stack cloudformation.Stack rName := fmt.Sprintf("tf-acc-test-with-params-no-update-%s", acctest.RandString(10)) @@ -222,13 +222,13 @@ func TestAccAWSCloudFormation_withUrl_withParams_noUpdate(t *testing.T) { CheckDestroy: testAccCheckAWSCloudFormationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudFormationConfig_templateUrl_withParams(rName, "tf-cf-stack-1.json", "11.0.0.0/16"), + Config: testAccAWSCloudFormationStackConfig_templateUrl_withParams(rName, "tf-cf-stack-1.json", "11.0.0.0/16"), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.with-url-and-params", &stack), ), }, { - Config: testAccAWSCloudFormationConfig_templateUrl_withParams(rName, "tf-cf-stack-2.json", "11.0.0.0/16"), + Config: testAccAWSCloudFormationStackConfig_templateUrl_withParams(rName, "tf-cf-stack-2.json", "11.0.0.0/16"), Check: resource.ComposeTestCheckFunc( testAccCheckCloudFormationStackExists("aws_cloudformation_stack.with-url-and-params", &stack), ), @@ -288,7 +288,7 @@ func testAccCheckAWSCloudFormationDestroy(s *terraform.State) error { return nil } -func testAccAWSCloudFormationConfig(stackName string) string { +func testAccAWSCloudFormationStackConfig(stackName string) string { return fmt.Sprintf(` resource "aws_cloudformation_stack" "network" { name = "%s" @@ -320,7 +320,7 @@ STACK }`, stackName) } -func testAccAWSCloudFormationConfig_yaml(stackName string) string { +func testAccAWSCloudFormationStackConfig_yaml(stackName string) string { return fmt.Sprintf(` resource "aws_cloudformation_stack" "yaml" { name = "%s" @@ -346,7 +346,7 @@ STACK }`, stackName) } -func testAccAWSCloudFormationConfig_defaultParams(stackName string) string { +func testAccAWSCloudFormationStackConfig_defaultParams(stackName string) string { return fmt.Sprintf(` resource "aws_cloudformation_stack" "asg-demo" { name = "%s" @@ -402,7 +402,7 @@ BODY `, stackName) } -var testAccAWSCloudFormationConfig_allAttributesWithBodies_tpl = ` +var testAccAWSCloudFormationStackConfig_allAttributesWithBodies_tpl = ` resource "aws_cloudformation_stack" "full" { name = "%s" template_body = < Date: Sat, 17 Mar 2018 15:49:13 -0400 Subject: [PATCH 0131/3316] tests/resource/aws_cloudformation_stack: Standardize and randomize testing --- aws/resource_aws_cloudformation_stack_test.go | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/aws/resource_aws_cloudformation_stack_test.go b/aws/resource_aws_cloudformation_stack_test.go index b91cfa18953..af214f55f88 100644 --- a/aws/resource_aws_cloudformation_stack_test.go +++ b/aws/resource_aws_cloudformation_stack_test.go @@ -291,7 +291,7 @@ func testAccCheckAWSCloudFormationDestroy(s *terraform.State) error { func testAccAWSCloudFormationStackConfig(stackName string) string { return fmt.Sprintf(` resource "aws_cloudformation_stack" "network" { - name = "%s" + name = "%[1]s" template_body = < Date: Sun, 18 Mar 2018 22:59:19 +0000 Subject: [PATCH 0132/3316] [WIP]New Resource: appsync_api_key --- aws/provider.go | 1 + aws/resource_aws_appsync_api_key.go | 166 +++++++++++++++++++++++ aws/resource_aws_appsync_api_key_test.go | 145 ++++++++++++++++++++ 3 files changed, 312 insertions(+) create mode 100644 aws/resource_aws_appsync_api_key.go create mode 100644 aws/resource_aws_appsync_api_key_test.go diff --git a/aws/provider.go b/aws/provider.go index b7054c3a081..dd512e59517 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -275,6 +275,7 @@ func Provider() terraform.ResourceProvider { "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), + "aws_appsync_api_key": resourceAwsAppsyncApiKey(), "aws_athena_database": resourceAwsAthenaDatabase(), "aws_athena_named_query": resourceAwsAthenaNamedQuery(), "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), diff --git a/aws/resource_aws_appsync_api_key.go b/aws/resource_aws_appsync_api_key.go new file mode 100644 index 00000000000..809f1304d4b --- /dev/null +++ b/aws/resource_aws_appsync_api_key.go @@ -0,0 +1,166 @@ +package aws + +import ( + "fmt" + "regexp" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appsync" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsAppsyncApiKey() *schema.Resource { + + return &schema.Resource{ + Create: resourceAwsAppsyncApiKeyCreate, + Read: resourceAwsAppsyncApiKeyRead, + Update: resourceAwsAppsyncApiKeyUpdate, + Delete: resourceAwsAppsyncApiKeyDelete, + + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + Default: "Managed by Terraform", + }, + "appsync_api_id": { + Type: schema.TypeString, + Required: true, + }, + "valid_till_date": { + Type: schema.TypeString, + ConflictsWith: []string{"validity_period_days"}, + Optional: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value := v.(string) + // reference - http://www.regexlib.com/REDetails.aspx?regexp_id=409 + if !regexp.MustCompile(`^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$`).MatchString(value) { + es = append(es, fmt.Errorf( + "only dd/mm/yyyy in %q", k)) + } + return + }, + }, + "validity_period_days": { + Type: schema.TypeInt, + ConflictsWith: []string{"valid_till_date"}, + Optional: true, + }, + "expiry_date": { + Type: schema.TypeString, + Computed: true, + }, + "key": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsAppsyncApiKeyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + params := &appsync.CreateApiKeyInput{ + ApiId: aws.String(d.Get("appsync_api_id").(string)), + Description: aws.String(d.Get("description").(string)), + } + layout := "02/01/2006 15:04:05 -0700 MST" + if v, ok := d.GetOk("validity_period_days"); ok { + params.Expires = aws.Int64(time.Now().Add(time.Hour * 24 * time.Duration(v.(int))).Unix()) + } + if v, ok := d.GetOk("valid_till_date"); ok { + tx := strings.Split(time.Now().Format(layout), " ") + tx[0] = v.(string) + t, _ := time.Parse(layout, strings.Join(tx, " ")) + params.Expires = aws.Int64(t.Unix()) + } + + resp, err := conn.CreateApiKey(params) + if err != nil { + return err + } + + d.SetId(*resp.ApiKey.Id) + return resourceAwsAppsyncApiKeyRead(d, meta) +} + +func resourceAwsAppsyncApiKeyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.ListApiKeysInput{ + ApiId: aws.String(d.Get("appsync_api_id").(string)), + } + + resp, err := conn.ListApiKeys(input) + if err != nil { + return err + } + var key appsync.ApiKey + for _, v := range resp.ApiKeys { + if *v.Id == d.Id() { + key = *v + } + } + + d.Set("key", key.Id) + d.Set("description", key.Description) + d.Set("expiry_date", time.Unix(*key.Expires, 0).String()) + return nil +} + +func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + params := &appsync.UpdateApiKeyInput{ + ApiId: aws.String(d.Get("appsync_api_id").(string)), + Id: aws.String(d.Id()), + } + if d.HasChange("description") { + params.Description = aws.String(d.Get("description").(string)) + } + if v, ok := d.GetOk("validity_period_days"); ok { + + if d.HasChange("validity_period_days") { + params.Expires = aws.Int64(time.Now().Add(time.Hour * 24 * time.Duration(v.(int))).Unix()) + } + } + if v, ok := d.GetOk("valid_till_date"); ok { + layout := "02/01/2006 15:04:05 -0700 MST" + if d.HasChange("valid_till_date") { + tx := strings.Split(time.Now().Format(layout), " ") + tx[0] = v.(string) + t, _ := time.Parse(layout, strings.Join(tx, " ")) + params.Expires = aws.Int64(t.Unix()) + + } + } + + _, err := conn.UpdateApiKey(params) + if err != nil { + return err + } + + return resourceAwsAppsyncApiKeyRead(d, meta) + return nil +} + +func resourceAwsAppsyncApiKeyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.DeleteApiKeyInput{ + ApiId: aws.String(d.Get("appsync_api_id").(string)), + Id: aws.String(d.Id()), + } + _, err := conn.DeleteApiKey(input) + if err != nil { + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + return nil + } + return err + } + + return nil +} diff --git a/aws/resource_aws_appsync_api_key_test.go b/aws/resource_aws_appsync_api_key_test.go new file mode 100644 index 00000000000..b280a67b903 --- /dev/null +++ b/aws/resource_aws_appsync_api_key_test.go @@ -0,0 +1,145 @@ +package aws + +import ( + "fmt" + "strings" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appsync" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsAppsyncApiKey_basic(t *testing.T) { + // sample date to test + dateAfterOneYear := time.Now().Add(time.Hour * 24 * time.Duration(360)).Format("02/01/2006") + // test sample date against time of expiry + layout := "02/01/2006 15:04:05 -0700 MST" + tx := strings.Split(time.Now().Format(layout), " ") + tx[0] = dateAfterOneYear + timeAfterOneYear, _ := time.Parse(layout, strings.Join(tx, " ")) + + thirtyDays := "30" + timeAfterThirdyDays := time.Now().Add(time.Hour * 24 * 30) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncApiKeyConfigValidTillDate(dateAfterOneYear), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncApiKeyExistsTillDate( + "aws_appsync_graphql_api.test1", + "aws_appsync_api_key.test_valid_till_date", + timeAfterOneYear.Unix(), + ), + ), + }, + { + Config: testAccAppsyncApiKeyConfigValidityPeriodDays(thirtyDays), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncApiKeyExistsTillDate( + "aws_appsync_graphql_api.test2", + "aws_appsync_api_key.test_validity_period_days", + timeAfterThirdyDays.Unix(), + ), + ), + }, + }, + }) +} + +func testAccCheckAwsAppsyncApiKeyDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).appsyncconn + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_appsync_api_key" { + continue + } + + describe, err := conn.ListApiKeys(&appsync.ListApiKeysInput{}) + + if err == nil { + if len(describe.ApiKeys) != 0 && + *describe.ApiKeys[0].Id == rs.Primary.ID { + return fmt.Errorf("Appsync ApiKey still exists") + } + return err + } + + } + return nil +} + +func testAccCheckAwsAppsyncApiKeyExistsTillDate(GqlApiName string, ApiKeyName string, date int64) resource.TestCheckFunc { + return func(s *terraform.State) error { + rsGql, ok := s.RootModule().Resources[GqlApiName] + if !ok { + return fmt.Errorf("Gql Not found in state: %s", GqlApiName) + } + + rsApiKey, ok := s.RootModule().Resources[ApiKeyName] + if !ok { + return fmt.Errorf("Key Not found in state: %s", ApiKeyName) + } + + conn := testAccProvider.Meta().(*AWSClient).appsyncconn + + input := &appsync.ListApiKeysInput{ + ApiId: aws.String(rsGql.Primary.ID), + } + + resp, err := conn.ListApiKeys(input) + if err != nil { + return err + } + var key appsync.ApiKey + for _, v := range resp.ApiKeys { + if *v.Id == *aws.String(rsApiKey.Primary.ID) { + key = *v + } + } + if key.Id == nil { + return fmt.Errorf("Key Not found: %s %s", ApiKeyName, *aws.String(rsApiKey.Primary.ID)) + } + // aws when they create, slight difference will be in the minutes, so better check date + if time.Unix(*key.Expires, 0).Format("02/01/2006") != time.Unix(date, 0).Format("02/01/2006") { + + return fmt.Errorf("Expiry date got is: %s and expected is %s", time.Unix(*key.Expires, 0).Format("02/01/2006"), + time.Unix(date, 0).Format("02/01/2006")) + } + + return nil + } +} + +func testAccAppsyncApiKeyConfigValidTillDate(rDate string) string { + return fmt.Sprintf(` +resource "aws_appsync_graphql_api" "test1" { + authentication_type = "API_KEY" + name = "tf_appsync_test1" +} +resource "aws_appsync_api_key" "test_valid_till_date" { + appsync_api_id = "${aws_appsync_graphql_api.test1.id}" + valid_till_date = "%s" +} + +`, rDate) +} + +func testAccAppsyncApiKeyConfigValidityPeriodDays(rDays string) string { + return fmt.Sprintf(` +resource "aws_appsync_graphql_api" "test2" { + authentication_type = "API_KEY" + name = "tf_appsync_test2" +} + +resource "aws_appsync_api_key" "test_validity_period_days" { + appsync_api_id = "${aws_appsync_graphql_api.test2.id}" + validity_period_days = %s +} + +`, rDays) +} From f05211a1d29cc4144a87de9c5608015fa9eca95e Mon Sep 17 00:00:00 2001 From: Lucid Programmer Date: Sun, 18 Mar 2018 23:55:30 +0000 Subject: [PATCH 0133/3316] docs for website --- website/docs/r/appsync_api_key.html.markdown | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 website/docs/r/appsync_api_key.html.markdown diff --git a/website/docs/r/appsync_api_key.html.markdown b/website/docs/r/appsync_api_key.html.markdown new file mode 100644 index 00000000000..cc569a9c35a --- /dev/null +++ b/website/docs/r/appsync_api_key.html.markdown @@ -0,0 +1,45 @@ +--- +layout: "aws" +page_title: "AWS: aws_appsync_api_key" +sidebar_current: "docs-aws-resource-appsync-api-key" +description: |- + Provides an AppSync API Key. +--- + +# aws_appsync_api_key + +Provides an AppSync API Key. + +## Example Usage + +```hcl +resource "aws_appsync_graphql_api" "example" { + authentication_type = "API_KEY" + name = "example" +} +resource "aws_appsync_api_key" "self" { + appsync_api_id = "${aws_appsync_graphql_api.example.id}" + validity_period_days = 364 +} +resource "aws_appsync_api_key" "partner" { + appsync_api_id = "${aws_appsync_graphql_api.example.id}" + valid_till_date = "30/11/2018" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `appsync_api_id` - (Required) The ID of the associated AppSync API +* `description` - (Optional) The API key description. Defaults to "Managed by Terraform". +* `validity_period_days` - (Optional) The number of days of validity from date of creation, (aws supports less than 365 days). By default, it is 7 days. +* `valid_till_date` - (Optional) The date till the key should be valid, use the format dd/mm/yyyy. + + +## Attributes Reference + +The following attributes are exported: + +* `id` - API ID +* `key` - The API key From 09bea43e23f27211401525964111bb50f51f1c1c Mon Sep 17 00:00:00 2001 From: Lucid Programmer Date: Mon, 19 Mar 2018 00:22:58 +0000 Subject: [PATCH 0134/3316] fix vet error & add aws.erb --- aws/resource_aws_appsync_api_key.go | 2 +- website/aws.erb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_appsync_api_key.go b/aws/resource_aws_appsync_api_key.go index 809f1304d4b..111ee9c041e 100644 --- a/aws/resource_aws_appsync_api_key.go +++ b/aws/resource_aws_appsync_api_key.go @@ -144,7 +144,7 @@ func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) er } return resourceAwsAppsyncApiKeyRead(d, meta) - return nil + } func resourceAwsAppsyncApiKeyDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/website/aws.erb b/website/aws.erb index c9dfcc8a0a5..d12364a92b1 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -361,6 +361,9 @@ > aws_appsync_graphql_api + > + aws_appsync_api_key + From 05a41d2bbc7359f8e0401e663fc0b368f5734c20 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 17 Feb 2018 14:02:38 +0100 Subject: [PATCH 0135/3316] resource/api_gateway_integration: update document for vpc link --- aws/resource_aws_api_gateway_integration.go | 2 - .../r/api_gateway_integration.html.markdown | 69 ++++++++++++++++++- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 0b3d9df008d..3f66ad011ac 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -7,8 +7,6 @@ import ( "strings" "time" - "strings" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" diff --git a/website/docs/r/api_gateway_integration.html.markdown b/website/docs/r/api_gateway_integration.html.markdown index 9a940daa20d..0282b0b0b02 100644 --- a/website/docs/r/api_gateway_integration.html.markdown +++ b/website/docs/r/api_gateway_integration.html.markdown @@ -130,6 +130,71 @@ POLICY } ``` +## VPC Link + +```hcl +variable "name" {} +variable "subnet_id" {} + +resource "aws_lb" "test" { + name = "${var.name}" + internal = true + load_balancer_type = "network" + subnets = ["${var.subnet_id}"] +} + +resource "aws_api_gateway_vpc_link" "test" { + name = "${var.name}" + target_arns = ["${aws_lb.test.arn}"] +} + +resource "aws_api_gateway_rest_api" "test" { + name = "${var.name}" +} + +resource "aws_api_gateway_resource" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + parent_id = "${aws_api_gateway_rest_api.test.root_resource_id}" + path_part = "test" +} + +resource "aws_api_gateway_method" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_resource.test.id}" + http_method = "GET" + authorization = "NONE" + + request_models = { + "application/json" = "Error" + } +} + +resource "aws_api_gateway_integration" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_resource.test.id}" + http_method = "${aws_api_gateway_method.test.http_method}" + + request_templates = { + "application/json" = "" + "application/xml" = "#set($inputRoot = $input.path('$'))\n{ }" + } + + request_parameters = { + "integration.request.header.X-Authorization" = "'static'" + "integration.request.header.X-Foo" = "'Bar'" + } + + type = "HTTP" + uri = "https://www.google.de" + integration_http_method = "GET" + passthrough_behavior = "WHEN_NO_MATCH" + content_handling = "CONVERT_TO_TEXT" + + connection_type = "VPC_LINK" + connection_id = "${aws_api_gateway_vpc_link.test.id}" +} +``` + ## Argument Reference The following arguments are supported: @@ -143,7 +208,9 @@ The following arguments are supported: **Required** if `type` is `AWS`, `AWS_PROXY`, `HTTP` or `HTTP_PROXY`. Not all methods are compatible with all `AWS` integrations. e.g. Lambda function [can only be invoked](https://github.com/awslabs/aws-apigateway-importer/issues/9#issuecomment-129651005) via `POST`. -* `type` - (Required) The integration input's [type](https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/). Valid values are `HTTP` (for HTTP backends), `MOCK` (not calling any real backend), `AWS` (for AWS services), `AWS_PROXY` (for Lambda proxy integration) and `HTTP_PROXY` (for HTTP proxy integration). +* `type` - (Required) The integration input's [type](https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/). Valid values are `HTTP` (for HTTP backends), `MOCK` (not calling any real backend), `AWS` (for AWS services), `AWS_PROXY` (for Lambda proxy integration) and `HTTP_PROXY` (for HTTP proxy integration). An `HTTP` or `HTTP_PROXY` integration with a `connection_type` of `VPC_LINK` is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC. +* `connection_type` - (Optional) The integration input's [connectionType](https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#connectionType). Valid values are `INTERNET` (default for connections through the public routable internet), and `VPC_LINK` (for private connections between API Gateway and a network load balancer in a VPC). +* `connection_id` - (Optional) The id of the VpcLink used for the integration. **Required** if `connection_type` is `VPC_LINK` * `uri` - (Optional) The input's URI (HTTP, AWS). **Required** if `type` is `HTTP` or `AWS`. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form `arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}`. `region`, `subdomain` and `service` are used to determine the right endpoint. e.g. `arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations` From 7550c00dd57a8d2a16258f404c380f96f153ae3d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 19 Mar 2018 09:26:40 -0400 Subject: [PATCH 0136/3316] resource/aws_elasticache_*: Allow port to be optional --- aws/import_aws_elasticache_cluster_test.go | 36 ----- aws/resource_aws_elasticache_cluster.go | 17 +- aws/resource_aws_elasticache_cluster_test.go | 149 ++++++++++++++++-- ...ource_aws_elasticache_replication_group.go | 5 +- .../docs/r/elasticache_cluster.html.markdown | 3 +- ...lasticache_replication_group.html.markdown | 2 +- 6 files changed, 156 insertions(+), 56 deletions(-) delete mode 100644 aws/import_aws_elasticache_cluster_test.go diff --git a/aws/import_aws_elasticache_cluster_test.go b/aws/import_aws_elasticache_cluster_test.go deleted file mode 100644 index 6128ddf9503..00000000000 --- a/aws/import_aws_elasticache_cluster_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package aws - -import ( - "os" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccAWSElasticacheCluster_importBasic(t *testing.T) { - oldvar := os.Getenv("AWS_DEFAULT_REGION") - os.Setenv("AWS_DEFAULT_REGION", "us-east-1") - defer os.Setenv("AWS_DEFAULT_REGION", oldvar) - - name := acctest.RandString(10) - - resourceName := "aws_elasticache_cluster.bar" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccAWSElasticacheClusterConfigBasic(name), - }, - - resource.TestStep{ - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 9e778189b49..9f3f3c368b4 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -102,8 +102,15 @@ func resourceAwsElastiCacheCommonSchema() map[string]*schema.Schema { }, "port": { Type: schema.TypeInt, - Required: true, + Optional: true, ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Supress default memcached/redis ports when not defined + if !d.IsNewResource() && new == "0" && (old == "6379" || old == "11211") { + return true + } + return false + }, }, "notification_topic_arn": { Type: schema.TypeString, @@ -221,7 +228,6 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ numNodes := int64(d.Get("num_cache_nodes").(int)) // 2 engine := d.Get("engine").(string) // memcached engineVersion := d.Get("engine_version").(string) // 1.4.14 - port := int64(d.Get("port").(int)) // e.g) 11211 subnetGroupName := d.Get("subnet_group_name").(string) securityNameSet := d.Get("security_group_names").(*schema.Set) securityIdSet := d.Get("security_group_ids").(*schema.Set) @@ -236,7 +242,6 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ NumCacheNodes: aws.Int64(numNodes), Engine: aws.String(engine), EngineVersion: aws.String(engineVersion), - Port: aws.Int64(port), CacheSubnetGroupName: aws.String(subnetGroupName), CacheSecurityGroupNames: securityNames, SecurityGroupIds: securityIds, @@ -248,6 +253,10 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ req.CacheParameterGroupName = aws.String(v.(string)) } + if v, ok := d.GetOk("port"); ok { + req.Port = aws.Int64(int64(v.(int))) + } + if v, ok := d.GetOk("snapshot_retention_limit"); ok { req.SnapshotRetentionLimit = aws.Int64(int64(v.(int))) } @@ -352,6 +361,8 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) d.Set("port", c.ConfigurationEndpoint.Port) d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *c.ConfigurationEndpoint.Address, *c.ConfigurationEndpoint.Port))) d.Set("cluster_address", aws.String(fmt.Sprintf("%s", *c.ConfigurationEndpoint.Address))) + } else if len(c.CacheNodes) > 0 { + d.Set("port", int(aws.Int64Value(c.CacheNodes[0].Endpoint.Port))) } if c.ReplicationGroupId != nil { diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 8dbe2da6d32..29565686ab8 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -2,6 +2,8 @@ package aws import ( "fmt" + "os" + "strconv" "strings" "testing" @@ -13,7 +15,108 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSElasticacheCluster_basic(t *testing.T) { +func TestAccAWSElasticacheCluster_Engine_Memcached_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var ec elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_Engine_Memcached(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &ec), + resource.TestCheckResourceAttr(resourceName, "cache_nodes.0.id", "0001"), + resource.TestCheckResourceAttrSet(resourceName, "configuration_endpoint"), + resource.TestCheckResourceAttrSet(resourceName, "cluster_address"), + resource.TestCheckResourceAttr(resourceName, "engine", "memcached"), + resource.TestCheckResourceAttr(resourceName, "port", "11211"), + ), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_Engine_Redis_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var ec elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_Engine_Redis(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &ec), + resource.TestCheckResourceAttr(resourceName, "cache_nodes.0.id", "0001"), + resource.TestCheckResourceAttr(resourceName, "engine", "redis"), + resource.TestCheckResourceAttr(resourceName, "port", "6379"), + ), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_Port_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var ec elasticache.CacheCluster + port := 11212 + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_Port(rName, port), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &ec), + resource.TestCheckResourceAttr(resourceName, "cache_nodes.0.id", "0001"), + resource.TestCheckResourceAttrSet(resourceName, "configuration_endpoint"), + resource.TestCheckResourceAttrSet(resourceName, "cluster_address"), + resource.TestCheckResourceAttr(resourceName, "engine", "memcached"), + resource.TestCheckResourceAttr(resourceName, "port", strconv.Itoa(port)), + ), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_SecurityGroup(t *testing.T) { var ec elasticache.CacheCluster resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,7 +124,7 @@ func TestAccAWSElasticacheCluster_basic(t *testing.T) { CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSElasticacheClusterConfig, + Config: testAccAWSElasticacheClusterConfig_SecurityGroup, Check: resource.ComposeTestCheckFunc( testAccCheckAWSElasticacheSecurityGroupExists("aws_elasticache_security_group.bar"), testAccCheckAWSElasticacheClusterExists("aws_elasticache_cluster.bar", &ec), @@ -219,24 +322,44 @@ func testAccCheckAWSElasticacheClusterExists(n string, v *elasticache.CacheClust } } -func testAccAWSElasticacheClusterConfigBasic(clusterId string) string { +func testAccAWSElasticacheClusterConfig_Engine_Memcached(rName string) string { return fmt.Sprintf(` -provider "aws" { - region = "us-east-1" +resource "aws_elasticache_cluster" "bar" { + cluster_id = "%s" + engine = "memcached" + node_type = "cache.m1.small" + num_cache_nodes = 1 + parameter_group_name = "default.memcached1.4" +} +`, rName) } +func testAccAWSElasticacheClusterConfig_Engine_Redis(rName string) string { + return fmt.Sprintf(` resource "aws_elasticache_cluster" "bar" { - cluster_id = "tf-%s" - engine = "memcached" - node_type = "cache.m1.small" - num_cache_nodes = 1 - port = 11211 - parameter_group_name = "default.memcached1.4" + cluster_id = "%s" + engine = "redis" + node_type = "cache.m1.small" + num_cache_nodes = 1 + parameter_group_name = "default.redis3.2" +} +`, rName) +} + +func testAccAWSElasticacheClusterConfig_Port(rName string, port int) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + cluster_id = "%s" + engine = "memcached" + node_type = "cache.m1.small" + num_cache_nodes = 1 + parameter_group_name = "default.memcached1.4" + port = %d } -`, clusterId) +`, rName, port) } -var testAccAWSElasticacheClusterConfig = fmt.Sprintf(` +var testAccAWSElasticacheClusterConfig_SecurityGroup = fmt.Sprintf(` provider "aws" { region = "us-east-1" } diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index 03d387e3c61..55f75d70912 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -133,7 +133,6 @@ func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta i AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), CacheNodeType: aws.String(d.Get("node_type").(string)), Engine: aws.String(d.Get("engine").(string)), - Port: aws.Int64(int64(d.Get("port").(int))), Tags: tags, } @@ -151,6 +150,10 @@ func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta i params.CacheParameterGroupName = aws.String(v.(string)) } + if v, ok := d.GetOk("port"); ok { + params.Port = aws.Int64(int64(v.(int))) + } + if v, ok := d.GetOk("subnet_group_name"); ok { params.CacheSubnetGroupName = aws.String(v.(string)) } diff --git a/website/docs/r/elasticache_cluster.html.markdown b/website/docs/r/elasticache_cluster.html.markdown index ac9ae93529d..efcad38dcc6 100644 --- a/website/docs/r/elasticache_cluster.html.markdown +++ b/website/docs/r/elasticache_cluster.html.markdown @@ -64,8 +64,7 @@ the highest numbered nodes will be removed. * `parameter_group_name` – (Required) Name of the parameter group to associate with this cache cluster -* `port` – (Required) The port number on which each of the cache nodes will -accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. +* `port` – (Optional) The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. * `subnet_group_name` – (Optional, VPC only) Name of the subnet group to be used for the cache cluster. diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index 4603c9a5889..e8fc983a8e4 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -69,7 +69,7 @@ The following arguments are supported: * `auth_token` - (Optional) The password used to access a password protected server. Can be specified only if `transit_encryption_enabled = true`. * `engine_version` - (Optional) The version number of the cache engine to be used for the cache clusters in this replication group. * `parameter_group_name` - (Optional) The name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. -* `port` – (Required) The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. +* `port` – (Optional) The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. * `subnet_group_name` - (Optional) The name of the cache subnet group to be used for the replication group. * `security_group_names` - (Optional) A list of cache security group names to associate with this replication group. * `security_group_ids` - (Optional) One or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud From 3328e7cf27dce626f80f558b8846125e43561b05 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 20 Mar 2018 13:53:06 +0000 Subject: [PATCH 0137/3316] tests: Add sweeper for aws_elb --- aws/resource_aws_elb_test.go | 56 +++++++++++++++++++++++++++++++++ aws/resource_aws_subnet_test.go | 3 ++ 2 files changed, 59 insertions(+) diff --git a/aws/resource_aws_elb_test.go b/aws/resource_aws_elb_test.go index b6b1b0f82c3..7d95c773ba2 100644 --- a/aws/resource_aws_elb_test.go +++ b/aws/resource_aws_elb_test.go @@ -2,10 +2,12 @@ package aws import ( "fmt" + "log" "math/rand" "reflect" "regexp" "sort" + "strings" "testing" "time" @@ -17,6 +19,60 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_elb", &resource.Sweeper{ + Name: "aws_elb", + F: testSweepELBs, + }) +} + +func testSweepELBs(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).elbconn + + prefixes := []string{ + "test-elb-", + } + + return conn.DescribeLoadBalancersPages(&elb.DescribeLoadBalancersInput{}, func(out *elb.DescribeLoadBalancersOutput, isLast bool) bool { + if len(out.LoadBalancerDescriptions) == 0 { + log.Println("[INFO] No ELBs found for sweeping") + return false + } + + for _, lb := range out.LoadBalancerDescriptions { + skip := true + for _, prefix := range prefixes { + if strings.HasPrefix(*lb.LoadBalancerName, prefix) { + skip = false + break + } + } + if skip { + log.Printf("[INFO] Skipping ELB: %s", *lb.LoadBalancerName) + continue + } + log.Printf("[INFO] Deleting ELB: %s", *lb.LoadBalancerName) + + _, err := conn.DeleteLoadBalancer(&elb.DeleteLoadBalancerInput{ + LoadBalancerName: lb.LoadBalancerName, + }) + if err != nil { + log.Printf("[ERROR] Failed to delete ELB %s: %s", *lb.LoadBalancerName, err) + continue + } + err = cleanupELBNetworkInterfaces(client.(*AWSClient).ec2conn, *lb.LoadBalancerName) + if err != nil { + log.Printf("[WARN] Failed to cleanup ENIs for ELB %q: %s", *lb.LoadBalancerName, err) + } + } + return !isLast + }) +} + func TestAccAWSELB_basic(t *testing.T) { var conf elb.LoadBalancerDescription diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index 3168fad5340..b3ac98b3424 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -17,6 +17,9 @@ func init() { resource.AddTestSweepers("aws_subnet", &resource.Sweeper{ Name: "aws_subnet", F: testSweepSubnets, + Dependencies: []string{ + "aws_elb", + }, }) } From 3be70f707a6d398910eb5927f7a9fe88bc52188b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 03:01:40 -0400 Subject: [PATCH 0138/3316] resource/aws_elasticache_cluster: Introduce initial CustomizeDiff * Support plan time validation of az_mode * Support plan time validation of node_type requiring VPC for cache.t2 instances * Support plan time validation of num_cache_nodes > 1 for redis * ForceNew memcached on node_type changes * ForceNew on engine_version downgrades --- aws/resource_aws_elasticache_cluster.go | 85 +++- aws/resource_aws_elasticache_cluster_test.go | 387 +++++++++++++++++++ 2 files changed, 469 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 9e778189b49..f874e3a9782 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" "sort" @@ -10,6 +11,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elasticache" + gversion "github.com/hashicorp/go-version" + "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -151,6 +154,10 @@ func resourceAwsElasticacheCluster() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elasticache.AZModeCrossAz, + elasticache.AZModeSingleAz, + }, false), } resourceSchema["availability_zone"] = &schema.Schema{ @@ -210,6 +217,81 @@ func resourceAwsElasticacheCluster() *schema.Resource { }, Schema: resourceSchema, + + CustomizeDiff: customdiff.Sequence( + func(diff *schema.ResourceDiff, v interface{}) error { + // Plan time validation for az_mode + // InvalidParameterCombination: Must specify at least two cache nodes in order to specify AZ Mode of 'cross-az'. + azMode, azModeOk := diff.GetOk("az_mode") + numCacheNodes, numCacheNodesOk := diff.GetOk("num_cache_nodes") + if azModeOk && numCacheNodesOk && azMode.(string) == elasticache.AZModeCrossAz && numCacheNodes.(int) == 1 { + return errors.New(`az_mode "cross-az" is not supported with num_cache_nodes = 1`) + } + return nil + }, + func(diff *schema.ResourceDiff, v interface{}) error { + // Plan time validation for engine_version + // InvalidParameterCombination: Cannot modify memcached from 1.4.33 to 1.4.24 + // InvalidParameterCombination: Cannot modify redis from 3.2.6 to 3.2.4 + if diff.Id() != "" && diff.HasChange("engine_version") { + o, n := diff.GetChange("engine_version") + oVersion, err := gversion.NewVersion(o.(string)) + if err != nil { + return err + } + nVersion, err := gversion.NewVersion(n.(string)) + if err != nil { + return err + } + if nVersion.LessThan(oVersion) { + return diff.ForceNew("engine_version") + } + } + return nil + }, + func(diff *schema.ResourceDiff, v interface{}) error { + // Plan time validation for node_type + // InvalidParameterCombination: Instance type cache.t2.micro can only be created in a VPC. + nodeType, nodeTypeOk := diff.GetOk("node_type") + if !nodeTypeOk { + return nil + } + vpcOnlyNodeTypes := []string{ + "cache.t2.micro", + "cache.t2.small", + "cache.t2.medium", + } + _, subnetGroupNameOk := diff.GetOk("subnet_group_name") + if !subnetGroupNameOk { + for _, vpcOnlyNodeType := range vpcOnlyNodeTypes { + if nodeType == vpcOnlyNodeType { + return fmt.Errorf("node_type %q can only be created in a VPC", nodeType) + } + } + } + return nil + }, + func(diff *schema.ResourceDiff, v interface{}) error { + // Plan time validation for num_cache_nodes + // InvalidParameterValue: Cannot create a Redis cluster with a NumCacheNodes parameter greater than 1. + engine, engineOk := diff.GetOk("engine") + numCacheNodes, numCacheNodesOk := diff.GetOk("num_cache_nodes") + if engineOk && numCacheNodesOk && engine.(string) == "redis" && numCacheNodes.(int) > 1 { + return errors.New(`engine "redis" does not support num_cache_nodes > 1`) + } + return nil + }, + func(diff *schema.ResourceDiff, v interface{}) error { + // Engine memcached does not currently support vertical scaling + // InvalidParameterCombination: Scaling is not supported for engine memcached + // https://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Scaling.Memcached.html#Scaling.Memcached.Vertically + engine, engineOk := diff.GetOk("engine") + if diff.Id() != "" && engineOk && engine.(string) == "memcached" && diff.HasChange("node_type") { + return diff.ForceNew("node_type") + } + return nil + }, + ), } } @@ -480,9 +562,6 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ oraw, nraw := d.GetChange("num_cache_nodes") o := oraw.(int) n := nraw.(int) - if v, ok := d.GetOk("az_mode"); ok && v.(string) == "cross-az" && n == 1 { - return fmt.Errorf("[WARN] Error updateing Elasticache cluster (%s), error: Cross-AZ mode is not supported in a single cache node.", d.Id()) - } if n < o { log.Printf("[INFO] Cluster %s is marked for Decreasing cache nodes from %d to %d", d.Id(), o, n) nodesToRemove := getCacheNodesToRemove(d, o, o-n) diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 8dbe2da6d32..25957192a7e 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -1,7 +1,10 @@ package aws import ( + "errors" "fmt" + "os" + "regexp" "strings" "testing" @@ -152,6 +155,268 @@ func TestAccAWSElasticacheCluster_multiAZInVpc(t *testing.T) { }) } +func TestAccAWSElasticacheCluster_AZMode_Memcached_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var cluster elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_AZMode_Memcached_Ec2Classic(rName, "unknown"), + ExpectError: regexp.MustCompile(`expected az_mode to be one of .*, got unknown`), + }, + { + Config: testAccAWSElasticacheClusterConfig_AZMode_Memcached_Ec2Classic(rName, "cross-az"), + ExpectError: regexp.MustCompile(`az_mode "cross-az" is not supported with num_cache_nodes = 1`), + }, + { + Config: testAccAWSElasticacheClusterConfig_AZMode_Memcached_Ec2Classic(rName, "single-az"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "az_mode", "single-az"), + ), + }, + { + Config: testAccAWSElasticacheClusterConfig_AZMode_Memcached_Ec2Classic(rName, "cross-az"), + ExpectError: regexp.MustCompile(`az_mode "cross-az" is not supported with num_cache_nodes = 1`), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_AZMode_Redis_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var cluster elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_AZMode_Redis_Ec2Classic(rName, "unknown"), + ExpectError: regexp.MustCompile(`expected az_mode to be one of .*, got unknown`), + }, + { + Config: testAccAWSElasticacheClusterConfig_AZMode_Redis_Ec2Classic(rName, "cross-az"), + ExpectError: regexp.MustCompile(`az_mode "cross-az" is not supported with num_cache_nodes = 1`), + }, + { + Config: testAccAWSElasticacheClusterConfig_AZMode_Redis_Ec2Classic(rName, "single-az"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &cluster), + resource.TestCheckResourceAttr(resourceName, "az_mode", "single-az"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_EngineVersion_Memcached_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var pre, mid, post elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_EngineVersion_Memcached_Ec2Classic(rName, "1.4.33"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &pre), + resource.TestCheckResourceAttr(resourceName, "engine_version", "1.4.33"), + ), + }, + { + Config: testAccAWSElasticacheClusterConfig_EngineVersion_Memcached_Ec2Classic(rName, "1.4.24"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &mid), + testAccCheckAWSElasticacheClusterRecreated(&pre, &mid), + resource.TestCheckResourceAttr(resourceName, "engine_version", "1.4.24"), + ), + }, + { + Config: testAccAWSElasticacheClusterConfig_EngineVersion_Memcached_Ec2Classic(rName, "1.4.34"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &post), + testAccCheckAWSElasticacheClusterNotRecreated(&mid, &post), + resource.TestCheckResourceAttr(resourceName, "engine_version", "1.4.34"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_EngineVersion_Redis_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var pre, mid, post elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_EngineVersion_Redis_Ec2Classic(rName, "3.2.6"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &pre), + resource.TestCheckResourceAttr(resourceName, "engine_version", "3.2.6"), + ), + }, + { + Config: testAccAWSElasticacheClusterConfig_EngineVersion_Redis_Ec2Classic(rName, "3.2.4"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &mid), + testAccCheckAWSElasticacheClusterRecreated(&pre, &mid), + resource.TestCheckResourceAttr(resourceName, "engine_version", "3.2.4"), + ), + }, + { + Config: testAccAWSElasticacheClusterConfig_EngineVersion_Redis_Ec2Classic(rName, "3.2.10"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &post), + testAccCheckAWSElasticacheClusterNotRecreated(&mid, &post), + resource.TestCheckResourceAttr(resourceName, "engine_version", "3.2.10"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_NodeTypeResize_Memcached_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var pre, post elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.t2.micro"), + ExpectError: regexp.MustCompile(`node_type "cache.t2.micro" can only be created in a VPC`), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.t2.small"), + ExpectError: regexp.MustCompile(`node_type "cache.t2.small" can only be created in a VPC`), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.t2.medium"), + ExpectError: regexp.MustCompile(`node_type "cache.t2.medium" can only be created in a VPC`), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.m3.medium"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &pre), + resource.TestCheckResourceAttr(resourceName, "node_type", "cache.m3.medium"), + ), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.m3.large"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &post), + testAccCheckAWSElasticacheClusterRecreated(&pre, &post), + resource.TestCheckResourceAttr(resourceName, "node_type", "cache.m3.large"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_NodeTypeResize_Redis_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var pre, post elasticache.CacheCluster + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + resourceName := "aws_elasticache_cluster.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.t2.micro"), + ExpectError: regexp.MustCompile(`node_type "cache.t2.micro" can only be created in a VPC`), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.t2.small"), + ExpectError: regexp.MustCompile(`node_type "cache.t2.small" can only be created in a VPC`), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.t2.medium"), + ExpectError: regexp.MustCompile(`node_type "cache.t2.medium" can only be created in a VPC`), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.m3.medium"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &pre), + resource.TestCheckResourceAttr(resourceName, "node_type", "cache.m3.medium"), + ), + }, + { + Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.m3.large"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheClusterExists(resourceName, &post), + testAccCheckAWSElasticacheClusterNotRecreated(&pre, &post), + resource.TestCheckResourceAttr(resourceName, "node_type", "cache.m3.large"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_NumCacheNodes_Redis_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_NumCacheNodes_Redis_Ec2Classic(rName, 2), + ExpectError: regexp.MustCompile(`engine "redis" does not support num_cache_nodes > 1`), + }, + }, + }) +} + func testAccCheckAWSElasticacheClusterAttributes(v *elasticache.CacheCluster) resource.TestCheckFunc { return func(s *terraform.State) error { if v.NotificationConfiguration == nil { @@ -166,6 +431,26 @@ func testAccCheckAWSElasticacheClusterAttributes(v *elasticache.CacheCluster) re } } +func testAccCheckAWSElasticacheClusterNotRecreated(i, j *elasticache.CacheCluster) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.TimeValue(i.CacheClusterCreateTime) != aws.TimeValue(j.CacheClusterCreateTime) { + return errors.New("Elasticache Cluster was recreated") + } + + return nil + } +} + +func testAccCheckAWSElasticacheClusterRecreated(i, j *elasticache.CacheCluster) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.TimeValue(i.CacheClusterCreateTime) == aws.TimeValue(j.CacheClusterCreateTime) { + return errors.New("Elasticache Cluster was not recreated") + } + + return nil + } +} + func testAccCheckAWSElasticacheClusterDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).elasticacheconn @@ -526,3 +811,105 @@ resource "aws_elasticache_cluster" "bar" { ] } `, acctest.RandInt(), acctest.RandInt(), acctest.RandString(10)) + +func testAccAWSElasticacheClusterConfig_AZMode_Memcached_Ec2Classic(rName, azMode string) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + apply_immediately = true + az_mode = "%[2]s" + cluster_id = "%[1]s" + engine = "memcached" + node_type = "cache.m3.medium" + num_cache_nodes = 1 + parameter_group_name = "default.memcached1.4" + port = 11211 +} +`, rName, azMode) +} + +func testAccAWSElasticacheClusterConfig_AZMode_Redis_Ec2Classic(rName, azMode string) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + apply_immediately = true + az_mode = "%[2]s" + cluster_id = "%[1]s" + engine = "redis" + node_type = "cache.m3.medium" + num_cache_nodes = 1 + parameter_group_name = "default.redis3.2" + port = 6379 +} +`, rName, azMode) +} + +func testAccAWSElasticacheClusterConfig_EngineVersion_Memcached_Ec2Classic(rName, engineVersion string) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + apply_immediately = true + cluster_id = "%[1]s" + engine = "memcached" + engine_version = "%[2]s" + node_type = "cache.m3.medium" + num_cache_nodes = 1 + parameter_group_name = "default.memcached1.4" + port = 11211 +} +`, rName, engineVersion) +} + +func testAccAWSElasticacheClusterConfig_EngineVersion_Redis_Ec2Classic(rName, engineVersion string) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + apply_immediately = true + cluster_id = "%[1]s" + engine = "redis" + engine_version = "%[2]s" + node_type = "cache.m3.medium" + num_cache_nodes = 1 + parameter_group_name = "default.redis3.2" + port = 6379 +} +`, rName, engineVersion) +} + +func testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, nodeType string) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + apply_immediately = true + cluster_id = "%[1]s" + engine = "memcached" + node_type = "%[2]s" + num_cache_nodes = 1 + parameter_group_name = "default.memcached1.4" + port = 11211 +} +`, rName, nodeType) +} + +func testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, nodeType string) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + apply_immediately = true + cluster_id = "%[1]s" + engine = "redis" + node_type = "%[2]s" + num_cache_nodes = 1 + parameter_group_name = "default.redis3.2" + port = 6379 +} +`, rName, nodeType) +} + +func testAccAWSElasticacheClusterConfig_NumCacheNodes_Redis_Ec2Classic(rName string, numCacheNodes int) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "bar" { + apply_immediately = true + cluster_id = "%[1]s" + engine = "redis" + node_type = "cache.m3.medium" + num_cache_nodes = %[2]d + parameter_group_name = "default.redis3.2" + port = 6379 +} +`, rName, numCacheNodes) +} From b50aec8a9dfde79124b320bbfc8f37d9f88f81ea Mon Sep 17 00:00:00 2001 From: Laurent Brucher Date: Wed, 21 Mar 2018 10:19:15 +0100 Subject: [PATCH 0139/3316] Add a resource to allow setting SNS SMS preferences --- aws/provider.go | 1 + aws/resource_aws_sns_sms_preferences.go | 159 +++++++++++++++++ aws/resource_aws_sns_sms_preferences_test.go | 160 ++++++++++++++++++ .../docs/r/sns_sms_peferences.html.markdown | 30 ++++ 4 files changed, 350 insertions(+) create mode 100644 aws/resource_aws_sns_sms_preferences.go create mode 100644 aws/resource_aws_sns_sms_preferences_test.go create mode 100644 website/docs/r/sns_sms_peferences.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 964c86e3bbc..6cb6a386767 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -519,6 +519,7 @@ func Provider() terraform.ResourceProvider { "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), "aws_sns_topic": resourceAwsSnsTopic(), "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), diff --git a/aws/resource_aws_sns_sms_preferences.go b/aws/resource_aws_sns_sms_preferences.go new file mode 100644 index 00000000000..6863196767e --- /dev/null +++ b/aws/resource_aws_sns_sms_preferences.go @@ -0,0 +1,159 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sns" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSnsSmsPreferences() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSnsSmsPreferencesSet, + Read: resourceAwsSnsSmsPreferencesGet, + Update: resourceAwsSnsSmsPreferencesSet, + Delete: resourceAwsSnsSmsPreferencesDelete, + + Schema: map[string]*schema.Schema{ + "monthly_spend_limit": { + Type: schema.TypeString, + Optional: true, + }, + + "delivery_status_iam_role_arn": { + Type: schema.TypeString, + Optional: true, + }, + + "delivery_status_success_sampling_rate": { + Type: schema.TypeString, + Optional: true, + }, + + "default_sender_id": { + Type: schema.TypeString, + Optional: true, + }, + + "default_sms_type": { + Type: schema.TypeString, + Optional: true, + }, + + "usage_report_s3_bucket": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +const resourceId = "aws_sns_sms_id" + +var SMSAttributeMap = map[string]string{ + "monthly_spend_limit": "MonthlySpendLimit", + "delivery_status_iam_role_arn": "DeliveryStatusIAMRole", + "delivery_status_success_sampling_rate": "DeliveryStatusSuccessSamplingRate", + "default_sender_id": "DefaultSenderID", + "default_sms_type": "DefaultSMSType", + "usage_report_s3_bucket": "UsageReportS3Bucket", +} + +var SMSAttributeDefaultValues = map[string]string{ + "monthly_spend_limit": "", + "delivery_status_iam_role_arn": "", + "delivery_status_success_sampling_rate": "", + "default_sender_id": "", + "default_sms_type": "", + "usage_report_s3_bucket": "", +} + +func resourceAwsSnsSmsPreferencesSet(d *schema.ResourceData, meta interface{}) error { + snsconn := meta.(*AWSClient).snsconn + + log.Printf("[DEBUG] SNS Set SMS preferences") + + monthlySpendLimit := d.Get("monthly_spend_limit").(string) + monthlySpendLimitInt, _ := strconv.Atoi(monthlySpendLimit) + deliveryStatusIamRoleArn := d.Get("delivery_status_iam_role_arn").(string) + deliveryStatusSuccessSamplingRate := d.Get("delivery_status_success_sampling_rate").(string) + deliveryStatusSuccessSamplingRateInt, _ := strconv.Atoi(deliveryStatusSuccessSamplingRate) + defaultSenderId := d.Get("default_sender_id").(string) + defaultSmsType := d.Get("default_sms_type").(string) + usageReportS3Bucket := d.Get("usage_report_s3_bucket").(string) + + // Validation + if monthlySpendLimitInt < 0 { + return fmt.Errorf("Error setting SMS preferences: monthly spend limit value [%d] must be >= 0!", monthlySpendLimitInt) + } + if deliveryStatusSuccessSamplingRateInt < 0 || deliveryStatusSuccessSamplingRateInt > 100 { + return fmt.Errorf("Error setting SMS preferences: default percentage of success to sample value [%d] must be between 0 and 100!", deliveryStatusSuccessSamplingRateInt) + } + if defaultSmsType != "" && defaultSmsType != "Promotional" && defaultSmsType != "Transactional" { + return fmt.Errorf("Error setting SMS preferences: default SMS type value [%s] is invalid!", defaultSmsType) + } + + // Set preferences + params := &sns.SetSMSAttributesInput{ + Attributes: map[string]*string{ + "MonthlySpendLimit": aws.String(monthlySpendLimit), + "DeliveryStatusIAMRole": aws.String(deliveryStatusIamRoleArn), + "DeliveryStatusSuccessSamplingRate": aws.String(deliveryStatusSuccessSamplingRate), + "DefaultSenderID": aws.String(defaultSenderId), + "DefaultSMSType": aws.String(defaultSmsType), + "UsageReportS3Bucket": aws.String(usageReportS3Bucket), + }, + } + + if _, err := snsconn.SetSMSAttributes(params); err != nil { + return fmt.Errorf("Error setting SMS preferences: %s", err) + } + + d.SetId(resourceId) + return nil +} + +func resourceAwsSnsSmsPreferencesGet(d *schema.ResourceData, meta interface{}) error { + snsconn := meta.(*AWSClient).snsconn + + // Fetch ALL attributes + attrs, err := snsconn.GetSMSAttributes(&sns.GetSMSAttributesInput{}) + if err != nil { + return err + } + + // Reset with default values first + for tfAttrName, defValue := range SMSAttributeDefaultValues { + d.Set(tfAttrName, defValue) + } + + // Apply existing settings + if attrs.Attributes != nil && len(attrs.Attributes) > 0 { + attrmap := attrs.Attributes + for tfAttrName, snsAttrName := range SMSAttributeMap { + d.Set(tfAttrName, attrmap[snsAttrName]) + } + } + + return nil +} + +func resourceAwsSnsSmsPreferencesDelete(d *schema.ResourceData, meta interface{}) error { + snsconn := meta.(*AWSClient).snsconn + + // Reset the attributes to their default value + attrs := map[string]*string{} + for tfAttrName, defValue := range SMSAttributeDefaultValues { + attrs[SMSAttributeMap[tfAttrName]] = &defValue + } + + params := &sns.SetSMSAttributesInput{Attributes: attrs} + if _, err := snsconn.SetSMSAttributes(params); err != nil { + return fmt.Errorf("Error resetting SMS preferences: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_sns_sms_preferences_test.go b/aws/resource_aws_sns_sms_preferences_test.go new file mode 100644 index 00000000000..10a749eb9ea --- /dev/null +++ b/aws/resource_aws_sns_sms_preferences_test.go @@ -0,0 +1,160 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSSNSSMSPreferences_empty(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSSNSSMSPreferences_empty, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_success_sampling_rate"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "default_sender_id"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "default_sms_type"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "usage_report_s3_bucket"), + ), + }, + }, + }) +} + +func TestAccAWSSNSSMSPreferences_defaultSMSType(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSSNSSMSPreferences_defSMSType, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_success_sampling_rate"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "default_sender_id"), + resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "default_sms_type", "Transactional"), + resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "usage_report_s3_bucket"), + ), + }, + }, + }) +} + +func TestAccAWSSNSSMSPreferences_almostAll(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSSNSSMSPreferences_almostAll, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit", "1"), + resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "default_sms_type", "Transactional"), + resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "usage_report_s3_bucket", "some-bucket"), + ), + }, + }, + }) +} + +func TestAccAWSSNSSMSPreferences_deliveryRole(t *testing.T) { + arnRole := regexp.MustCompile(`^arn:aws:iam::\d+:role/test_smsdelivery_role$`) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSSNSSMSPreferences_deliveryRole, + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn", arnRole), + resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_success_sampling_rate", "75"), + ), + }, + }, + }) +} + +func testAccCheckAWSSNSSMSPrefsDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_sns_sms_preferences" { + continue + } + + return fmt.Errorf("SNS SMS Preferences resource exists when it should be destroyed!") + } + + return nil +} + +const testAccAWSSNSSMSPreferences_empty = ` +resource "aws_sns_sms_preferences" "test_pref" {} +` +const testAccAWSSNSSMSPreferences_defSMSType = ` +resource "aws_sns_sms_preferences" "test_pref" { + default_sms_type = "Transactional" +} +` +const testAccAWSSNSSMSPreferences_almostAll = ` +resource "aws_sns_sms_preferences" "test_pref" { + monthly_spend_limit = "1", + default_sms_type = "Transactional", + usage_report_s3_bucket = "some-bucket", +} +` +const testAccAWSSNSSMSPreferences_deliveryRole = ` +resource "aws_iam_role" "test_smsdelivery_role" { + name = "test_smsdelivery_role" + path = "/" + assume_role_policy = < Date: Wed, 21 Mar 2018 11:09:36 -0400 Subject: [PATCH 0140/3316] tests/resource/aws_elasticache_cluster: Remove redundant resource.TestStep type declarations in slices --- aws/resource_aws_elasticache_cluster_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 29565686ab8..da3f9b4d9c3 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -40,7 +40,7 @@ func TestAccAWSElasticacheCluster_Engine_Memcached_Ec2Classic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "port", "11211"), ), }, - resource.TestStep{ + { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, @@ -72,7 +72,7 @@ func TestAccAWSElasticacheCluster_Engine_Redis_Ec2Classic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "port", "6379"), ), }, - resource.TestStep{ + { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, @@ -107,7 +107,7 @@ func TestAccAWSElasticacheCluster_Port_Ec2Classic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "port", strconv.Itoa(port)), ), }, - resource.TestStep{ + { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, From dc0a6abf2e57e62f44f6d620b1454a70f7dde9c1 Mon Sep 17 00:00:00 2001 From: Lucid Programmer Date: Wed, 21 Mar 2018 15:53:04 +0000 Subject: [PATCH 0141/3316] incorporating review comments --- aws/resource_aws_appsync_api_key.go | 132 +++++++++++------------ aws/resource_aws_appsync_api_key_test.go | 87 +++++---------- 2 files changed, 93 insertions(+), 126 deletions(-) diff --git a/aws/resource_aws_appsync_api_key.go b/aws/resource_aws_appsync_api_key.go index 111ee9c041e..1285e67eeaa 100644 --- a/aws/resource_aws_appsync_api_key.go +++ b/aws/resource_aws_appsync_api_key.go @@ -2,13 +2,14 @@ package aws import ( "fmt" - "regexp" + "log" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appsync" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsAppsyncApiKey() *schema.Resource { @@ -25,32 +26,14 @@ func resourceAwsAppsyncApiKey() *schema.Resource { Optional: true, Default: "Managed by Terraform", }, - "appsync_api_id": { + "api_id": { Type: schema.TypeString, Required: true, }, - "valid_till_date": { - Type: schema.TypeString, - ConflictsWith: []string{"validity_period_days"}, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { - value := v.(string) - // reference - http://www.regexlib.com/REDetails.aspx?regexp_id=409 - if !regexp.MustCompile(`^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$`).MatchString(value) { - es = append(es, fmt.Errorf( - "only dd/mm/yyyy in %q", k)) - } - return - }, - }, - "validity_period_days": { - Type: schema.TypeInt, - ConflictsWith: []string{"valid_till_date"}, - Optional: true, - }, - "expiry_date": { - Type: schema.TypeString, - Computed: true, + "expires": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "key": { Type: schema.TypeString, @@ -64,78 +47,82 @@ func resourceAwsAppsyncApiKey() *schema.Resource { func resourceAwsAppsyncApiKeyCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn params := &appsync.CreateApiKeyInput{ - ApiId: aws.String(d.Get("appsync_api_id").(string)), + ApiId: aws.String(d.Get("api_id").(string)), Description: aws.String(d.Get("description").(string)), } - layout := "02/01/2006 15:04:05 -0700 MST" - if v, ok := d.GetOk("validity_period_days"); ok { - params.Expires = aws.Int64(time.Now().Add(time.Hour * 24 * time.Duration(v.(int))).Unix()) - } - if v, ok := d.GetOk("valid_till_date"); ok { - tx := strings.Split(time.Now().Format(layout), " ") - tx[0] = v.(string) - t, _ := time.Parse(layout, strings.Join(tx, " ")) + if v, ok := d.GetOk("expires"); ok { + t, _ := time.Parse(time.RFC3339, v.(string)) params.Expires = aws.Int64(t.Unix()) } - resp, err := conn.CreateApiKey(params) if err != nil { return err } - d.SetId(*resp.ApiKey.Id) + d.SetId(fmt.Sprintf("%s:%s", d.Get("api_id").(string), *resp.ApiKey.Id)) return resourceAwsAppsyncApiKeyRead(d, meta) } func resourceAwsAppsyncApiKeyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn - - input := &appsync.ListApiKeysInput{ - ApiId: aws.String(d.Get("appsync_api_id").(string)), + var listKeys func(*appsync.ListApiKeysInput) (*appsync.ApiKey, error) + ApiId, Id, er := decodeAppSyncApiKeyId(d.Id()) + if er != nil { + return er } - - resp, err := conn.ListApiKeys(input) + listKeys = func(input *appsync.ListApiKeysInput) (*appsync.ApiKey, error) { + resp, err := conn.ListApiKeys(input) + if err != nil { + return nil, err + } + for _, v := range resp.ApiKeys { + if *v.Id == Id { + return v, nil + } + } + if resp.NextToken != nil { + listKeys(&appsync.ListApiKeysInput{ + ApiId: aws.String(ApiId), + NextToken: resp.NextToken, + }) + } + return nil, nil + } + key, err := listKeys( + &appsync.ListApiKeysInput{ + ApiId: aws.String(ApiId), + }) if err != nil { return err } - var key appsync.ApiKey - for _, v := range resp.ApiKeys { - if *v.Id == d.Id() { - key = *v - } + if key == nil { + log.Printf("[WARN] AppSync API Key %q not found, removing from state", d.Id()) + d.SetId("") + return nil } d.Set("key", key.Id) d.Set("description", key.Description) - d.Set("expiry_date", time.Unix(*key.Expires, 0).String()) + d.Set("expires", time.Unix(*key.Expires, 0).Format(time.RFC3339)) return nil } func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn - + ApiId, Id, er := decodeAppSyncApiKeyId(d.Id()) + if er != nil { + return er + } params := &appsync.UpdateApiKeyInput{ - ApiId: aws.String(d.Get("appsync_api_id").(string)), - Id: aws.String(d.Id()), + ApiId: aws.String(ApiId), + Id: aws.String(Id), } if d.HasChange("description") { params.Description = aws.String(d.Get("description").(string)) } - if v, ok := d.GetOk("validity_period_days"); ok { - - if d.HasChange("validity_period_days") { - params.Expires = aws.Int64(time.Now().Add(time.Hour * 24 * time.Duration(v.(int))).Unix()) - } - } - if v, ok := d.GetOk("valid_till_date"); ok { - layout := "02/01/2006 15:04:05 -0700 MST" - if d.HasChange("valid_till_date") { - tx := strings.Split(time.Now().Format(layout), " ") - tx[0] = v.(string) - t, _ := time.Parse(layout, strings.Join(tx, " ")) - params.Expires = aws.Int64(t.Unix()) - - } + if d.HasChange("expires") { + t, _ := time.Parse(time.RFC3339, d.Get("expires").(string)) + params.Expires = aws.Int64(t.Unix()) } _, err := conn.UpdateApiKey(params) @@ -149,10 +136,13 @@ func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) er func resourceAwsAppsyncApiKeyDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn - + ApiId, Id, er := decodeAppSyncApiKeyId(d.Id()) + if er != nil { + return er + } input := &appsync.DeleteApiKeyInput{ - ApiId: aws.String(d.Get("appsync_api_id").(string)), - Id: aws.String(d.Id()), + ApiId: aws.String(ApiId), + Id: aws.String(Id), } _, err := conn.DeleteApiKey(input) if err != nil { @@ -164,3 +154,11 @@ func resourceAwsAppsyncApiKeyDelete(d *schema.ResourceData, meta interface{}) er return nil } + +func decodeAppSyncApiKeyId(id string) (string, string, error) { + parts := strings.Split(id, ":") + if len(parts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected API-ID:API-KEY-ID", id) + } + return parts[0], parts[1], nil +} diff --git a/aws/resource_aws_appsync_api_key_test.go b/aws/resource_aws_appsync_api_key_test.go index b280a67b903..030d0dd9b8d 100644 --- a/aws/resource_aws_appsync_api_key_test.go +++ b/aws/resource_aws_appsync_api_key_test.go @@ -14,37 +14,19 @@ import ( func TestAccAwsAppsyncApiKey_basic(t *testing.T) { // sample date to test - dateAfterOneYear := time.Now().Add(time.Hour * 24 * time.Duration(360)).Format("02/01/2006") - // test sample date against time of expiry - layout := "02/01/2006 15:04:05 -0700 MST" - tx := strings.Split(time.Now().Format(layout), " ") - tx[0] = dateAfterOneYear - timeAfterOneYear, _ := time.Parse(layout, strings.Join(tx, " ")) - - thirtyDays := "30" - timeAfterThirdyDays := time.Now().Add(time.Hour * 24 * 30) + dateAfterOneYear := time.Now().Add(time.Hour * 24 * time.Duration(364)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncApiKeyConfigValidTillDate(dateAfterOneYear), - Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncApiKeyExistsTillDate( - "aws_appsync_graphql_api.test1", - "aws_appsync_api_key.test_valid_till_date", - timeAfterOneYear.Unix(), - ), - ), - }, - { - Config: testAccAppsyncApiKeyConfigValidityPeriodDays(thirtyDays), + Config: testAccAppsyncApiKeyConfigBasic(dateAfterOneYear.Format(time.RFC3339)), + ResourceName: "aws_appsync_api_key.test", Check: resource.ComposeTestCheckFunc( testAccCheckAwsAppsyncApiKeyExistsTillDate( - "aws_appsync_graphql_api.test2", - "aws_appsync_api_key.test_validity_period_days", - timeAfterThirdyDays.Unix(), + "aws_appsync_api_key.test", + dateAfterOneYear.Unix(), ), ), }, @@ -58,46 +40,48 @@ func testAccCheckAwsAppsyncApiKeyDestroy(s *terraform.State) error { if rs.Type != "aws_appsync_api_key" { continue } - - describe, err := conn.ListApiKeys(&appsync.ListApiKeysInput{}) - + ApiId, _, er := decodeAppSyncApiKeyId(rs.Primary.ID) + if er != nil { + return er + } + describe, err := conn.ListApiKeys(&appsync.ListApiKeysInput{ApiId: aws.String(ApiId)}) if err == nil { - if len(describe.ApiKeys) != 0 && - *describe.ApiKeys[0].Id == rs.Primary.ID { + if len(describe.ApiKeys) != 0 { return fmt.Errorf("Appsync ApiKey still exists") } - return err } + return nil + } return nil } -func testAccCheckAwsAppsyncApiKeyExistsTillDate(GqlApiName string, ApiKeyName string, date int64) resource.TestCheckFunc { +func testAccCheckAwsAppsyncApiKeyExistsTillDate(ApiKeyName string, date int64) resource.TestCheckFunc { return func(s *terraform.State) error { - rsGql, ok := s.RootModule().Resources[GqlApiName] - if !ok { - return fmt.Errorf("Gql Not found in state: %s", GqlApiName) - } rsApiKey, ok := s.RootModule().Resources[ApiKeyName] if !ok { return fmt.Errorf("Key Not found in state: %s", ApiKeyName) } + ApiId, Id, er := decodeAppSyncApiKeyId(rsApiKey.Primary.ID) + if er != nil { + return er + } conn := testAccProvider.Meta().(*AWSClient).appsyncconn - input := &appsync.ListApiKeysInput{ - ApiId: aws.String(rsGql.Primary.ID), + ApiId: aws.String(ApiId), } resp, err := conn.ListApiKeys(input) if err != nil { return err } + var key appsync.ApiKey for _, v := range resp.ApiKeys { - if *v.Id == *aws.String(rsApiKey.Primary.ID) { + if *v.Id == *aws.String(Id) { key = *v } } @@ -115,31 +99,16 @@ func testAccCheckAwsAppsyncApiKeyExistsTillDate(GqlApiName string, ApiKeyName st } } -func testAccAppsyncApiKeyConfigValidTillDate(rDate string) string { +func testAccAppsyncApiKeyConfigBasic(rDate string) string { return fmt.Sprintf(` -resource "aws_appsync_graphql_api" "test1" { +resource "aws_appsync_graphql_api" "test" { authentication_type = "API_KEY" - name = "tf_appsync_test1" -} -resource "aws_appsync_api_key" "test_valid_till_date" { - appsync_api_id = "${aws_appsync_graphql_api.test1.id}" - valid_till_date = "%s" + name = "tf_appsync_test" } - -`, rDate) -} - -func testAccAppsyncApiKeyConfigValidityPeriodDays(rDays string) string { - return fmt.Sprintf(` -resource "aws_appsync_graphql_api" "test2" { - authentication_type = "API_KEY" - name = "tf_appsync_test2" -} - -resource "aws_appsync_api_key" "test_validity_period_days" { - appsync_api_id = "${aws_appsync_graphql_api.test2.id}" - validity_period_days = %s +resource "aws_appsync_api_key" "test" { + api_id = "${aws_appsync_graphql_api.test.id}" + expires = "%sT00:00:00Z" } -`, rDays) +`, strings.Split(rDate, "T")[0]) } From 0e4a09faf6a3a7c04f20c52afdfced12955dbf13 Mon Sep 17 00:00:00 2001 From: Matt Lavin Date: Wed, 21 Mar 2018 13:27:40 -0400 Subject: [PATCH 0142/3316] resource/aws_s3_bucket_object: mark version_id as recomputed if a new object will be uploaded --- aws/resource_aws_lambda_function_test.go | 6 ------ aws/resource_aws_s3_bucket_object.go | 9 ++++++++ aws/resource_aws_s3_bucket_object_test.go | 25 +++++++++++++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_lambda_function_test.go b/aws/resource_aws_lambda_function_test.go index 48cb7161a0a..5de7c88a32d 100644 --- a/aws/resource_aws_lambda_function_test.go +++ b/aws/resource_aws_lambda_function_test.go @@ -751,17 +751,11 @@ func TestAccAWSLambdaFunction_s3Update_basic(t *testing.T) { ), }, { - ExpectNonEmptyPlan: true, PreConfig: func() { // Upload 2nd version testAccCreateZipFromFiles(map[string]string{"test-fixtures/lambda_func_modified.js": "lambda.js"}, zipFile) }, Config: genAWSLambdaFunctionConfig_s3(bucketName, key, path, roleName, funcName), - }, - // Extra step because of missing ComputedWhen - // See https://github.com/hashicorp/terraform/pull/4846 & https://github.com/hashicorp/terraform/pull/5330 - { - Config: genAWSLambdaFunctionConfig_s3(bucketName, key, path, roleName, funcName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaFunctionExists("aws_lambda_function.lambda_function_s3", funcName, &conf), testAccCheckAwsLambdaFunctionName(&conf, funcName), diff --git a/aws/resource_aws_s3_bucket_object.go b/aws/resource_aws_s3_bucket_object.go index f9165eafde6..fc49419cc5a 100644 --- a/aws/resource_aws_s3_bucket_object.go +++ b/aws/resource_aws_s3_bucket_object.go @@ -27,6 +27,8 @@ func resourceAwsS3BucketObject() *schema.Resource { Update: resourceAwsS3BucketObjectPut, Delete: resourceAwsS3BucketObjectDelete, + CustomizeDiff: updateComputedAttributes, + Schema: map[string]*schema.Schema{ "bucket": { Type: schema.TypeString, @@ -151,6 +153,13 @@ func resourceAwsS3BucketObject() *schema.Resource { } } +func updateComputedAttributes(d *schema.ResourceDiff, meta interface{}) error { + if d.HasChange("etag") { + d.SetNewComputed("version_id") + } + return nil +} + func resourceAwsS3BucketObjectPut(d *schema.ResourceData, meta interface{}) error { s3conn := meta.(*AWSClient).s3conn diff --git a/aws/resource_aws_s3_bucket_object_test.go b/aws/resource_aws_s3_bucket_object_test.go index 9d83b675ac0..84971ab508f 100644 --- a/aws/resource_aws_s3_bucket_object_test.go +++ b/aws/resource_aws_s3_bucket_object_test.go @@ -227,12 +227,29 @@ func TestAccAWSS3BucketObject_updatesWithVersioning(t *testing.T) { testAccCheckAWSS3BucketObjectExists("aws_s3_bucket_object.object", &modifiedObj), resource.TestCheckResourceAttr("aws_s3_bucket_object.object", "etag", "00b8c73b1b50e7cc932362c7225b8e29"), testAccCheckAWSS3BucketObjectVersionIdDiffers(&originalObj, &modifiedObj), + testAccCheckResourceAttrMatchesVersionId("data.template_file.object_version", "rendered", &modifiedObj), ), }, }, }) } +func testAccCheckResourceAttrMatchesVersionId(resourceName string, attribute string, object *s3.GetObjectOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not Found: %s", resourceName) + } + + attrValue := aws.String(rs.Primary.Attributes[attribute]) + if *attrValue != *object.VersionId { + return fmt.Errorf("Expected Version IDs to be the same, but they were different (%s vs %s)", *attrValue, *object.VersionId) + } + + return nil + } +} + func testAccCheckAWSS3BucketObjectVersionIdDiffers(first, second *s3.GetObjectOutput) resource.TestCheckFunc { return func(s *terraform.State) error { if first.VersionId == nil { @@ -634,6 +651,14 @@ resource "aws_s3_bucket_object" "object" { source = "%s" etag = "${md5(file("%s"))}" } + +data "template_file" "object_version" { + template = "$${object_version}" + + vars { + object_version = "${aws_s3_bucket_object.object.version_id}" + } +} `, randInt, source, source) } From 09d4f4ce96100b682a83cf3ae8bf589e6f36b65a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 13:47:47 -0400 Subject: [PATCH 0143/3316] resource/aws_batch_*: Add test sweepers --- aws/resource_aws_batch_compute_environment.go | 18 ++-- ...urce_aws_batch_compute_environment_test.go | 90 +++++++++++++++++++ aws/resource_aws_batch_job_queue_test.go | 88 ++++++++++++++++++ 3 files changed, 183 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_batch_compute_environment.go b/aws/resource_aws_batch_compute_environment.go index 06955e0a6c1..92466691a85 100644 --- a/aws/resource_aws_batch_compute_environment.go +++ b/aws/resource_aws_batch_compute_environment.go @@ -228,7 +228,7 @@ func resourceAwsBatchComputeEnvironmentCreate(d *schema.ResourceData, meta inter stateConf := &resource.StateChangeConf{ Pending: []string{batch.CEStatusCreating}, Target: []string{batch.CEStatusValid}, - Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(d, meta), + Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironmentName, conn), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 5 * time.Second, } @@ -320,7 +320,7 @@ func resourceAwsBatchComputeEnvironmentDelete(d *schema.ResourceData, meta inter stateConf := &resource.StateChangeConf{ Pending: []string{batch.CEStatusUpdating}, Target: []string{batch.CEStatusValid}, - Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(d, meta), + Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironmentName, conn), Timeout: d.Timeout(schema.TimeoutDelete), MinTimeout: 5 * time.Second, } @@ -339,7 +339,7 @@ func resourceAwsBatchComputeEnvironmentDelete(d *schema.ResourceData, meta inter stateConfForDelete := &resource.StateChangeConf{ Pending: []string{batch.CEStatusDeleting}, Target: []string{batch.CEStatusDeleted}, - Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(d, meta), + Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(computeEnvironmentName, conn), Timeout: d.Timeout(schema.TimeoutDelete), MinTimeout: 5 * time.Second, } @@ -390,12 +390,8 @@ func resourceAwsBatchComputeEnvironmentUpdate(d *schema.ResourceData, meta inter return resourceAwsBatchComputeEnvironmentRead(d, meta) } -func resourceAwsBatchComputeEnvironmentStatusRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { +func resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironmentName string, conn *batch.Batch) resource.StateRefreshFunc { return func() (interface{}, string, error) { - conn := meta.(*AWSClient).batchconn - - computeEnvironmentName := d.Get("compute_environment_name").(string) - result, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{ ComputeEnvironments: []*string{ aws.String(computeEnvironmentName), @@ -414,12 +410,8 @@ func resourceAwsBatchComputeEnvironmentStatusRefreshFunc(d *schema.ResourceData, } } -func resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { +func resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(computeEnvironmentName string, conn *batch.Batch) resource.StateRefreshFunc { return func() (interface{}, string, error) { - conn := meta.(*AWSClient).batchconn - - computeEnvironmentName := d.Get("compute_environment_name").(string) - result, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{ ComputeEnvironments: []*string{ aws.String(computeEnvironmentName), diff --git a/aws/resource_aws_batch_compute_environment_test.go b/aws/resource_aws_batch_compute_environment_test.go index 031131caf4e..2b19ec2b097 100644 --- a/aws/resource_aws_batch_compute_environment_test.go +++ b/aws/resource_aws_batch_compute_environment_test.go @@ -2,8 +2,11 @@ package aws import ( "fmt" + "log" "regexp" + "strings" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" @@ -12,6 +15,93 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_batch_compute_environment", &resource.Sweeper{ + Name: "aws_batch_compute_environment", + Dependencies: []string{ + "aws_batch_job_queue", + }, + F: testSweepBatchComputeEnvironments, + }) +} + +func testSweepBatchComputeEnvironments(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).batchconn + + prefixes := []string{ + "tf_acc", + } + + out, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{}) + if err != nil { + return fmt.Errorf("Error retrieving Batch Compute Environments: %s", err) + } + for _, computeEnvironment := range out.ComputeEnvironments { + name := computeEnvironment.ComputeEnvironmentName + skip := true + for _, prefix := range prefixes { + if strings.HasPrefix(*name, prefix) { + skip = false + break + } + } + if skip { + log.Printf("[INFO] Skipping Batch Compute Environment: %s", *name) + continue + } + + log.Printf("[INFO] Disabling Batch Compute Environment: %s", *name) + + updateInput := &batch.UpdateComputeEnvironmentInput{ + ComputeEnvironment: name, + State: aws.String(batch.CEStateDisabled), + } + if _, err := conn.UpdateComputeEnvironment(updateInput); err != nil { + log.Printf("[ERROR] Failed to disable Batch Compute Environment %s: %s", *name, err) + continue + } + + stateConfForDisable := &resource.StateChangeConf{ + Pending: []string{batch.CEStatusUpdating}, + Target: []string{batch.CEStatusValid}, + Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(*name, conn), + Timeout: 20 * time.Minute, + MinTimeout: 5 * time.Second, + } + if _, err := stateConfForDisable.WaitForState(); err != nil { + log.Printf("[ERROR] Failed to wait for disable of Batch Compute Environment %s: %s", *name, err) + continue + } + + log.Printf("[INFO] Deleting Batch Compute Environment: %s", *name) + + deleteInput := &batch.DeleteComputeEnvironmentInput{ + ComputeEnvironment: name, + } + if _, err := conn.DeleteComputeEnvironment(deleteInput); err != nil { + log.Printf("[ERROR] Failed to delete Batch Compute Environment %s: %s", *name, err) + continue + } + + stateConfForDelete := &resource.StateChangeConf{ + Pending: []string{batch.CEStatusDeleting}, + Target: []string{batch.CEStatusDeleted}, + Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(*name, conn), + Timeout: 20 * time.Minute, + MinTimeout: 5 * time.Second, + } + if _, err := stateConfForDelete.WaitForState(); err != nil { + log.Printf("[ERROR] Failed to wait for deletion of Batch Compute Environment %s: %s", *name, err) + } + } + + return nil +} + func TestAccAWSBatchComputeEnvironment_createEc2(t *testing.T) { rInt := acctest.RandInt() diff --git a/aws/resource_aws_batch_job_queue_test.go b/aws/resource_aws_batch_job_queue_test.go index f3592c385d9..99965ddcaf1 100644 --- a/aws/resource_aws_batch_job_queue_test.go +++ b/aws/resource_aws_batch_job_queue_test.go @@ -6,13 +6,101 @@ import ( "strconv" "strings" "testing" + "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_batch_job_queue", &resource.Sweeper{ + Name: "aws_batch_job_queue", + F: testSweepBatchJobQueues, + }) +} + +func testSweepBatchJobQueues(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).batchconn + + prefixes := []string{ + "tf_acc", + } + + out, err := conn.DescribeJobQueues(&batch.DescribeJobQueuesInput{}) + if err != nil { + return fmt.Errorf("Error retrieving Batch Job Queues: %s", err) + } + for _, jobQueue := range out.JobQueues { + name := jobQueue.JobQueueName + skip := true + for _, prefix := range prefixes { + if strings.HasPrefix(*name, prefix) { + skip = false + break + } + } + if skip { + log.Printf("[INFO] Skipping Batch Job Queue: %s", *name) + continue + } + + log.Printf("[INFO] Disabling Batch Job Queue: %s", *name) + + updateInput := &batch.UpdateJobQueueInput{ + JobQueue: name, + State: aws.String(batch.JQStateDisabled), + } + if _, err := conn.UpdateJobQueue(updateInput); err != nil { + log.Printf("[ERROR] Failed to disable Batch Job Queue %s: %s", *name, err) + continue + } + + stateConfForDisable := &resource.StateChangeConf{ + Pending: []string{batch.JQStatusUpdating}, + Target: []string{batch.JQStatusValid}, + Refresh: batchJobQueueRefreshStatusFunc(conn, *name), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + if _, err := stateConfForDisable.WaitForState(); err != nil { + log.Printf("[ERROR] Failed to wait for disable of Batch Job Queue %s: %s", *name, err) + continue + } + + log.Printf("[INFO] Deleting Batch Job Queue: %s", *name) + + deleteInput := &batch.DeleteJobQueueInput{ + JobQueue: name, + } + if _, err := conn.DeleteJobQueue(deleteInput); err != nil { + log.Printf("[ERROR] Failed to delete Batch Job Queue %s: %s", *name, err) + continue + } + + stateConfForDelete := &resource.StateChangeConf{ + Pending: []string{batch.JQStateDisabled, batch.JQStatusDeleting}, + Target: []string{batch.JQStatusDeleted}, + Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(*name, conn), + Timeout: 10 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + if _, err := stateConfForDelete.WaitForState(); err != nil { + log.Printf("[ERROR] Failed to wait for deletion of Batch Job Queue %s: %s", *name, err) + } + } + + return nil +} + func TestAccAWSBatchJobQueue_basic(t *testing.T) { var jq batch.JobQueueDetail ri := acctest.RandInt() From b583b26f4c7c5f8f7c3159a0e78205c565cc22ec Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 12:15:26 -0400 Subject: [PATCH 0144/3316] resource/aws_elasticache_cluster: Implement short-circuiting logic in CustomizeDiff --- aws/resource_aws_elasticache_cluster.go | 64 +++++++++++++------------ 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index f874e3a9782..78011b4b769 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -222,32 +222,34 @@ func resourceAwsElasticacheCluster() *schema.Resource { func(diff *schema.ResourceDiff, v interface{}) error { // Plan time validation for az_mode // InvalidParameterCombination: Must specify at least two cache nodes in order to specify AZ Mode of 'cross-az'. - azMode, azModeOk := diff.GetOk("az_mode") - numCacheNodes, numCacheNodesOk := diff.GetOk("num_cache_nodes") - if azModeOk && numCacheNodesOk && azMode.(string) == elasticache.AZModeCrossAz && numCacheNodes.(int) == 1 { - return errors.New(`az_mode "cross-az" is not supported with num_cache_nodes = 1`) + if v, ok := diff.GetOk("az_mode"); !ok || v.(string) != elasticache.AZModeCrossAz { + return nil } - return nil + if v, ok := diff.GetOk("num_cache_nodes"); !ok || v.(int) != 1 { + return nil + } + return errors.New(`az_mode "cross-az" is not supported with num_cache_nodes = 1`) }, func(diff *schema.ResourceDiff, v interface{}) error { // Plan time validation for engine_version // InvalidParameterCombination: Cannot modify memcached from 1.4.33 to 1.4.24 // InvalidParameterCombination: Cannot modify redis from 3.2.6 to 3.2.4 - if diff.Id() != "" && diff.HasChange("engine_version") { - o, n := diff.GetChange("engine_version") - oVersion, err := gversion.NewVersion(o.(string)) - if err != nil { - return err - } - nVersion, err := gversion.NewVersion(n.(string)) - if err != nil { - return err - } - if nVersion.LessThan(oVersion) { - return diff.ForceNew("engine_version") - } + if diff.Id() == "" || !diff.HasChange("engine_version") { + return nil } - return nil + o, n := diff.GetChange("engine_version") + oVersion, err := gversion.NewVersion(o.(string)) + if err != nil { + return err + } + nVersion, err := gversion.NewVersion(n.(string)) + if err != nil { + return err + } + if nVersion.GreaterThan(oVersion) { + return nil + } + return diff.ForceNew("engine_version") }, func(diff *schema.ResourceDiff, v interface{}) error { // Plan time validation for node_type @@ -261,8 +263,7 @@ func resourceAwsElasticacheCluster() *schema.Resource { "cache.t2.small", "cache.t2.medium", } - _, subnetGroupNameOk := diff.GetOk("subnet_group_name") - if !subnetGroupNameOk { + if _, ok := diff.GetOk("subnet_group_name"); !ok { for _, vpcOnlyNodeType := range vpcOnlyNodeTypes { if nodeType == vpcOnlyNodeType { return fmt.Errorf("node_type %q can only be created in a VPC", nodeType) @@ -274,22 +275,25 @@ func resourceAwsElasticacheCluster() *schema.Resource { func(diff *schema.ResourceDiff, v interface{}) error { // Plan time validation for num_cache_nodes // InvalidParameterValue: Cannot create a Redis cluster with a NumCacheNodes parameter greater than 1. - engine, engineOk := diff.GetOk("engine") - numCacheNodes, numCacheNodesOk := diff.GetOk("num_cache_nodes") - if engineOk && numCacheNodesOk && engine.(string) == "redis" && numCacheNodes.(int) > 1 { - return errors.New(`engine "redis" does not support num_cache_nodes > 1`) + if v, ok := diff.GetOk("engine"); !ok || v.(string) == "memcached" { + return nil } - return nil + if v, ok := diff.GetOk("num_cache_nodes"); !ok || v.(int) == 1 { + return nil + } + return errors.New(`engine "redis" does not support num_cache_nodes > 1`) }, func(diff *schema.ResourceDiff, v interface{}) error { // Engine memcached does not currently support vertical scaling // InvalidParameterCombination: Scaling is not supported for engine memcached // https://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Scaling.Memcached.html#Scaling.Memcached.Vertically - engine, engineOk := diff.GetOk("engine") - if diff.Id() != "" && engineOk && engine.(string) == "memcached" && diff.HasChange("node_type") { - return diff.ForceNew("node_type") + if diff.Id() == "" || !diff.HasChange("node_type") { + return nil } - return nil + if v, ok := diff.GetOk("engine"); !ok || v.(string) == "redis" { + return nil + } + return diff.ForceNew("node_type") }, ), } From 61fe3b2891d2f86405b2630b9639a8e4f85389b3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 14:51:20 -0400 Subject: [PATCH 0145/3316] Update CHANGELOG for #3857 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31b446ea9b3..2600f432f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,11 @@ ENHANCEMENTS: * provider: Treat additional IAM policy scenarios with empty principal trees as equivalent [GH-3832] * resource/aws_cloudfront_distribution: Validate origin `domain_name` and `origin_id` at plan time [GH-3767] * resource/aws_eip: Support configurable timeouts [GH-3769] +* resource/aws_elasticache_cluster: Support plan time validation of az_mode [GH-3857] +* resource/aws_elasticache_cluster: Support plan time validation of node_type requiring VPC for cache.t2 instances [GH-3857] +* resource/aws_elasticache_cluster: Support plan time validation of num_cache_nodes > 1 for redis [GH-3857] +* resource/aws_elasticache_cluster: ForceNew on node_type changes for memcached engine [GH-3857] +* resource/aws_elasticache_cluster: ForceNew on engine_version downgrades [GH-3857] * resource/aws_emr_cluster: Add step support [GH-3673] * resource/aws_instance: Support optionally fetching encrypted Windows password data [GH-2219] * resource/aws_launch_configuration: Validate `user_data` length during plan [GH-2973] From c25cfebce6d569d56e3d5b0c6c1f4bb1c269a7d0 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 15 Mar 2018 11:42:07 -0400 Subject: [PATCH 0146/3316] implement wafregional size constraint set begin moving helpers/common code to helper file --- aws/provider.go | 1 + aws/resource_aws_waf_size_constraint_set.go | 100 +------------ ...rce_aws_wafregional_size_constraint_set.go | 137 ++++++++++++++++++ aws/waf_helpers.go | 108 ++++++++++++++ 4 files changed, 248 insertions(+), 98 deletions(-) create mode 100644 aws/resource_aws_wafregional_size_constraint_set.go create mode 100644 aws/waf_helpers.go diff --git a/aws/provider.go b/aws/provider.go index 50a421d1efc..b88b90e7cb4 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -556,6 +556,7 @@ func Provider() terraform.ResourceProvider { "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), "aws_wafregional_rule": resourceAwsWafRegionalRule(), diff --git a/aws/resource_aws_waf_size_constraint_set.go b/aws/resource_aws_waf_size_constraint_set.go index 8df37ab855b..da64599b033 100644 --- a/aws/resource_aws_waf_size_constraint_set.go +++ b/aws/resource_aws_waf_size_constraint_set.go @@ -17,50 +17,7 @@ func resourceAwsWafSizeConstraintSet() *schema.Resource { Update: resourceAwsWafSizeConstraintSetUpdate, Delete: resourceAwsWafSizeConstraintSetDelete, - Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "size_constraints": &schema.Schema{ - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "field_to_match": { - Type: schema.TypeSet, - Required: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "data": { - Type: schema.TypeString, - Optional: true, - }, - "type": { - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - "comparison_operator": &schema.Schema{ - Type: schema.TypeString, - Required: true, - }, - "size": &schema.Schema{ - Type: schema.TypeInt, - Required: true, - }, - "text_transformation": &schema.Schema{ - Type: schema.TypeString, - Required: true, - }, - }, - }, - }, - }, + Schema: wafSizeConstraintSetSchema(), } } @@ -98,7 +55,7 @@ func resourceAwsWafSizeConstraintSetRead(d *schema.ResourceData, meta interface{ resp, err := conn.GetSizeConstraintSet(params) if err != nil { if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) + log.Printf("[WARN] WAF SizeConstraintSet (%s) not found, removing from state", d.Id()) d.SetId("") return nil } @@ -174,56 +131,3 @@ func updateSizeConstraintSetResource(id string, oldS, newS []interface{}, conn * return nil } - -func flattenWafSizeConstraints(sc []*waf.SizeConstraint) []interface{} { - out := make([]interface{}, len(sc), len(sc)) - for i, c := range sc { - m := make(map[string]interface{}) - m["comparison_operator"] = *c.ComparisonOperator - if c.FieldToMatch != nil { - m["field_to_match"] = flattenFieldToMatch(c.FieldToMatch) - } - m["size"] = *c.Size - m["text_transformation"] = *c.TextTransformation - out[i] = m - } - return out -} - -func diffWafSizeConstraints(oldS, newS []interface{}) []*waf.SizeConstraintSetUpdate { - updates := make([]*waf.SizeConstraintSetUpdate, 0) - - for _, os := range oldS { - constraint := os.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newS, constraint); contains { - newS = append(newS[:idx], newS[idx+1:]...) - continue - } - - updates = append(updates, &waf.SizeConstraintSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - SizeConstraint: &waf.SizeConstraint{ - FieldToMatch: expandFieldToMatch(constraint["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - ComparisonOperator: aws.String(constraint["comparison_operator"].(string)), - Size: aws.Int64(int64(constraint["size"].(int))), - TextTransformation: aws.String(constraint["text_transformation"].(string)), - }, - }) - } - - for _, ns := range newS { - constraint := ns.(map[string]interface{}) - - updates = append(updates, &waf.SizeConstraintSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - SizeConstraint: &waf.SizeConstraint{ - FieldToMatch: expandFieldToMatch(constraint["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), - ComparisonOperator: aws.String(constraint["comparison_operator"].(string)), - Size: aws.Int64(int64(constraint["size"].(int))), - TextTransformation: aws.String(constraint["text_transformation"].(string)), - }, - }) - } - return updates -} diff --git a/aws/resource_aws_wafregional_size_constraint_set.go b/aws/resource_aws_wafregional_size_constraint_set.go new file mode 100644 index 00000000000..aa9729094dd --- /dev/null +++ b/aws/resource_aws_wafregional_size_constraint_set.go @@ -0,0 +1,137 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegionalSizeConstraintSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegionalSizeConstraintSetCreate, + Read: resourceAwsWafRegionalSizeConstraintSetRead, + Update: resourceAwsWafRegionalSizeConstraintSetUpdate, + Delete: resourceAwsWafRegionalSizeConstraintSetDelete, + + Schema: wafSizeConstraintSetSchema(), + } +} + +func resourceAwsWafRegionalSizeConstraintSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + name := d.Get("name").(string) + + log.Printf("[INFO] Creating SizeConstraintSet: %s", name) + + wr := newWafRegionalRetryer(conn, region) + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateSizeConstraintSetInput{ + ChangeToken: token, + Name: aws.String(name), + } + + return conn.CreateSizeConstraintSet(params) + }) + if err != nil { + return errwrap.Wrapf("[ERROR] Error creating SizeConstraintSet: {{err}}", err) + } + resp := out.(*waf.CreateSizeConstraintSetOutput) + + d.SetId(*resp.SizeConstraintSet.SizeConstraintSetId) + + return resourceAwsWafRegionalSizeConstraintSetUpdate(d, meta) +} + +func resourceAwsWafRegionalSizeConstraintSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + + log.Printf("[INFO] Reading SizeConstraintSet: %s", d.Get("name").(string)) + params := &waf.GetSizeConstraintSetInput{ + SizeConstraintSetId: aws.String(d.Id()), + } + + resp, err := conn.GetSizeConstraintSet(params) + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { + log.Printf("[WARN] WAF SizeConstraintSet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("name", resp.SizeConstraintSet.Name) + d.Set("size_constraints", flattenWafSizeConstraints(resp.SizeConstraintSet.SizeConstraints)) + + return nil +} + +func resourceAwsWafRegionalSizeConstraintSetUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*AWSClient) + + if d.HasChange("size_constraints") { + o, n := d.GetChange("size_constraints") + oldS, newS := o.(*schema.Set).List(), n.(*schema.Set).List() + + if err := updateRegionalSizeConstraintSetResource(d.Id(), oldS, newS, client.wafregionalconn, client.region); err != nil { + return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) + } + } + + return resourceAwsWafRegionalSizeConstraintSetRead(d, meta) +} + +func resourceAwsWafRegionalSizeConstraintSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + oldConstraints := d.Get("size_constraints").(*schema.Set).List() + + if len(oldConstraints) > 0 { + noConstraints := []interface{}{} + if err := updateRegionalSizeConstraintSetResource(d.Id(), oldConstraints, noConstraints, conn, region); err != nil { + return errwrap.Wrapf("[ERROR] Error deleting SizeConstraintSet: {{err}}", err) + } + } + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteSizeConstraintSetInput{ + ChangeToken: token, + SizeConstraintSetId: aws.String(d.Id()), + } + return conn.DeleteSizeConstraintSet(req) + }) + if err != nil { + return errwrap.Wrapf("[ERROR] Error deleting SizeConstraintSet: {{err}}", err) + } + + return nil +} + +func updateRegionalSizeConstraintSetResource(id string, oldS, newS []interface{}, conn *wafregional.WAFRegional, region string) error { + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateSizeConstraintSetInput{ + ChangeToken: token, + SizeConstraintSetId: aws.String(id), + Updates: diffWafSizeConstraints(oldS, newS), + } + + log.Printf("[INFO] Updating SizeConstraintSet: %s", req) + return conn.UpdateSizeConstraintSet(req) + }) + if err != nil { + return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) + } + + return nil +} diff --git a/aws/waf_helpers.go b/aws/waf_helpers.go new file mode 100644 index 00000000000..20f11a5df34 --- /dev/null +++ b/aws/waf_helpers.go @@ -0,0 +1,108 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/schema" +) + +func wafSizeConstraintSetSchema() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "size_constraints": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": { + Type: schema.TypeSet, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data": { + Type: schema.TypeString, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "comparison_operator": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "size": &schema.Schema{ + Type: schema.TypeInt, + Required: true, + }, + "text_transformation": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + } +} + +func diffWafSizeConstraints(oldS, newS []interface{}) []*waf.SizeConstraintSetUpdate { + updates := make([]*waf.SizeConstraintSetUpdate, 0) + + for _, os := range oldS { + constraint := os.(map[string]interface{}) + + if idx, contains := sliceContainsMap(newS, constraint); contains { + newS = append(newS[:idx], newS[idx+1:]...) + continue + } + + updates = append(updates, &waf.SizeConstraintSetUpdate{ + Action: aws.String(waf.ChangeActionDelete), + SizeConstraint: &waf.SizeConstraint{ + FieldToMatch: expandFieldToMatch(constraint["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + ComparisonOperator: aws.String(constraint["comparison_operator"].(string)), + Size: aws.Int64(int64(constraint["size"].(int))), + TextTransformation: aws.String(constraint["text_transformation"].(string)), + }, + }) + } + + for _, ns := range newS { + constraint := ns.(map[string]interface{}) + + updates = append(updates, &waf.SizeConstraintSetUpdate{ + Action: aws.String(waf.ChangeActionInsert), + SizeConstraint: &waf.SizeConstraint{ + FieldToMatch: expandFieldToMatch(constraint["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + ComparisonOperator: aws.String(constraint["comparison_operator"].(string)), + Size: aws.Int64(int64(constraint["size"].(int))), + TextTransformation: aws.String(constraint["text_transformation"].(string)), + }, + }) + } + return updates +} + +func flattenWafSizeConstraints(sc []*waf.SizeConstraint) []interface{} { + out := make([]interface{}, len(sc), len(sc)) + for i, c := range sc { + m := make(map[string]interface{}) + m["comparison_operator"] = *c.ComparisonOperator + if c.FieldToMatch != nil { + m["field_to_match"] = flattenFieldToMatch(c.FieldToMatch) + } + m["size"] = *c.Size + m["text_transformation"] = *c.TextTransformation + out[i] = m + } + return out +} From b66fcae6c9a9198d546b82588edec7eb75c7b61f Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 15 Mar 2018 17:01:39 -0400 Subject: [PATCH 0147/3316] implement acceptance tests --- aws/provider.go | 2 +- ...ws_wafregional_size_constraint_set_test.go | 341 ++++++++++++++++++ 2 files changed, 342 insertions(+), 1 deletion(-) create mode 100644 aws/resource_aws_wafregional_size_constraint_set_test.go diff --git a/aws/provider.go b/aws/provider.go index b88b90e7cb4..f3d71cbc66f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -556,7 +556,7 @@ func Provider() terraform.ResourceProvider { "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), "aws_wafregional_rule": resourceAwsWafRegionalRule(), diff --git a/aws/resource_aws_wafregional_size_constraint_set_test.go b/aws/resource_aws_wafregional_size_constraint_set_test.go new file mode 100644 index 00000000000..52896980083 --- /dev/null +++ b/aws/resource_aws_wafregional_size_constraint_set_test.go @@ -0,0 +1,341 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/acctest" +) + +func TestAccAWSWafRegionalSizeConstraintSet_basic(t *testing.T) { + var v waf.SizeConstraintSet + sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegionalSizeConstraintSetConfig(sizeConstraintSet), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &v), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "name", sizeConstraintSet), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.comparison_operator", "EQ"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.field_to_match.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.field_to_match.281401076.data", ""), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.field_to_match.281401076.type", "BODY"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.size", "4096"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.text_transformation", "NONE"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalSizeConstraintSet_changeNameForceNew(t *testing.T) { + var before, after waf.SizeConstraintSet + sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) + sizeConstraintSetNewName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalSizeConstraintSetConfig(sizeConstraintSet), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &before), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "name", sizeConstraintSet), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.#", "1"), + ), + }, + { + Config: testAccAWSWafRegionalSizeConstraintSetConfigChangeName(sizeConstraintSetNewName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &after), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "name", sizeConstraintSetNewName), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.#", "1"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalSizeConstraintSet_disappears(t *testing.T) { + var v waf.SizeConstraintSet + sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalSizeConstraintSetConfig(sizeConstraintSet), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &v), + testAccCheckAWSWafRegionalSizeConstraintSetDisappears(&v), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSWafRegionalSizeConstraintSet_changeConstraints(t *testing.T) { + var before, after waf.SizeConstraintSet + setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalSizeConstraintSetConfig(setName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &before), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "name", setName), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.comparison_operator", "EQ"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.field_to_match.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.field_to_match.281401076.data", ""), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.field_to_match.281401076.type", "BODY"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.size", "4096"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.2029852522.text_transformation", "NONE"), + ), + }, + { + Config: testAccAWSWafRegionalSizeConstraintSetConfig_changeConstraints(setName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &after), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "name", setName), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.3222308386.comparison_operator", "GE"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.3222308386.field_to_match.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.3222308386.field_to_match.281401076.data", ""), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.3222308386.field_to_match.281401076.type", "BODY"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.3222308386.size", "1024"), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.3222308386.text_transformation", "NONE"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalSizeConstraintSet_noConstraints(t *testing.T) { + var ipset waf.SizeConstraintSet + setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalSizeConstraintSetConfig_noConstraints(setName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &ipset), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "name", setName), + resource.TestCheckResourceAttr( + "aws_wafregional_size_constraint_set.size_constraint_set", "size_constraints.#", "0"), + ), + }, + }, + }) +} + +func testAccCheckAWSWafRegionalSizeConstraintSetDisappears(v *waf.SizeConstraintSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + region := testAccProvider.Meta().(*AWSClient).region + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateSizeConstraintSetInput{ + ChangeToken: token, + SizeConstraintSetId: v.SizeConstraintSetId, + } + + for _, sizeConstraint := range v.SizeConstraints { + sizeConstraintUpdate := &waf.SizeConstraintSetUpdate{ + Action: aws.String("DELETE"), + SizeConstraint: &waf.SizeConstraint{ + FieldToMatch: sizeConstraint.FieldToMatch, + ComparisonOperator: sizeConstraint.ComparisonOperator, + Size: sizeConstraint.Size, + TextTransformation: sizeConstraint.TextTransformation, + }, + } + req.Updates = append(req.Updates, sizeConstraintUpdate) + } + return conn.UpdateSizeConstraintSet(req) + }) + if err != nil { + return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteSizeConstraintSetInput{ + ChangeToken: token, + SizeConstraintSetId: v.SizeConstraintSetId, + } + return conn.DeleteSizeConstraintSet(opts) + }) + if err != nil { + return err + } + return nil + } +} + +func testAccCheckAWSWafRegionalSizeConstraintSetExists(n string, v *waf.SizeConstraintSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF SizeConstraintSet ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetSizeConstraintSet(&waf.GetSizeConstraintSetInput{ + SizeConstraintSetId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.SizeConstraintSet.SizeConstraintSetId == rs.Primary.ID { + *v = *resp.SizeConstraintSet + return nil + } + + return fmt.Errorf("WAF SizeConstraintSet (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSWafRegionalSizeConstraintSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_byte_match_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetSizeConstraintSet( + &waf.GetSizeConstraintSetInput{ + SizeConstraintSetId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.SizeConstraintSet.SizeConstraintSetId == rs.Primary.ID { + return fmt.Errorf("WAF SizeConstraintSet %s still exists", rs.Primary.ID) + } + } + + // Return nil if the SizeConstraintSet is already destroyed + if awsErr, ok := err.(awserr.Error); ok { + if awsErr.Code() == "WAFNonexistentItemException" { + return nil + } + } + + return err + } + + return nil +} + +func testAccAWSWafRegionalSizeConstraintSetConfig(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_size_constraint_set" "size_constraint_set" { + name = "%s" + size_constraints { + text_transformation = "NONE" + comparison_operator = "EQ" + size = "4096" + field_to_match { + type = "BODY" + } + } +}`, name) +} + +func testAccAWSWafRegionalSizeConstraintSetConfigChangeName(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_size_constraint_set" "size_constraint_set" { + name = "%s" + size_constraints { + text_transformation = "NONE" + comparison_operator = "EQ" + size = "4096" + field_to_match { + type = "BODY" + } + } +}`, name) +} + +func testAccAWSWafRegionalSizeConstraintSetConfig_changeConstraints(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_size_constraint_set" "size_constraint_set" { + name = "%s" + size_constraints { + text_transformation = "NONE" + comparison_operator = "GE" + size = "1024" + field_to_match { + type = "BODY" + } + } +}`, name) +} + +func testAccAWSWafRegionalSizeConstraintSetConfig_noConstraints(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_size_constraint_set" "size_constraint_set" { + name = "%s" +}`, name) +} From 4d45b3feb10aadd7c00047d5e177bf7caa9c1058 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Fri, 16 Mar 2018 10:56:58 -0400 Subject: [PATCH 0148/3316] wafregional size constraint set docs --- aws/resource_aws_waf_size_constraint_set.go | 4 +- ...source_aws_waf_size_constraint_set_test.go | 7 +- ...rce_aws_wafregional_size_constraint_set.go | 32 ++++----- ...ws_wafregional_size_constraint_set_test.go | 37 +++++----- website/aws.erb | 4 ++ .../r/waf_size_constraint_set.html.markdown | 2 - ...regional_size_constraint_set.html.markdown | 72 +++++++++++++++++++ 7 files changed, 111 insertions(+), 47 deletions(-) create mode 100644 website/docs/r/wafregional_size_constraint_set.html.markdown diff --git a/aws/resource_aws_waf_size_constraint_set.go b/aws/resource_aws_waf_size_constraint_set.go index da64599b033..cc622854938 100644 --- a/aws/resource_aws_waf_size_constraint_set.go +++ b/aws/resource_aws_waf_size_constraint_set.go @@ -74,9 +74,9 @@ func resourceAwsWafSizeConstraintSetUpdate(d *schema.ResourceData, meta interfac if d.HasChange("size_constraints") { o, n := d.GetChange("size_constraints") - oldS, newS := o.(*schema.Set).List(), n.(*schema.Set).List() + oldConstraints, newConstraints := o.(*schema.Set).List(), n.(*schema.Set).List() - err := updateSizeConstraintSetResource(d.Id(), oldS, newS, conn) + err := updateSizeConstraintSetResource(d.Id(), oldConstraints, newConstraints, conn) if err != nil { return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) } diff --git a/aws/resource_aws_waf_size_constraint_set_test.go b/aws/resource_aws_waf_size_constraint_set_test.go index dcfac5d203f..f239215cef0 100644 --- a/aws/resource_aws_waf_size_constraint_set_test.go +++ b/aws/resource_aws_waf_size_constraint_set_test.go @@ -162,7 +162,7 @@ func TestAccAWSWafSizeConstraintSet_changeConstraints(t *testing.T) { } func TestAccAWSWafSizeConstraintSet_noConstraints(t *testing.T) { - var ipset waf.SizeConstraintSet + var contraints waf.SizeConstraintSet setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ @@ -173,7 +173,7 @@ func TestAccAWSWafSizeConstraintSet_noConstraints(t *testing.T) { { Config: testAccAWSWafSizeConstraintSetConfig_noConstraints(setName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafSizeConstraintSetExists("aws_waf_size_constraint_set.size_constraint_set", &ipset), + testAccCheckAWSWafSizeConstraintSetExists("aws_waf_size_constraint_set.size_constraint_set", &contraints), resource.TestCheckResourceAttr( "aws_waf_size_constraint_set.size_constraint_set", "name", setName), resource.TestCheckResourceAttr( @@ -258,9 +258,6 @@ func testAccCheckAWSWafSizeConstraintSetExists(n string, v *waf.SizeConstraintSe func testAccCheckAWSWafSizeConstraintSetDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_waf_byte_match_set" { - continue - } conn := testAccProvider.Meta().(*AWSClient).wafconn resp, err := conn.GetSizeConstraintSet( diff --git a/aws/resource_aws_wafregional_size_constraint_set.go b/aws/resource_aws_wafregional_size_constraint_set.go index aa9729094dd..6298666db34 100644 --- a/aws/resource_aws_wafregional_size_constraint_set.go +++ b/aws/resource_aws_wafregional_size_constraint_set.go @@ -1,13 +1,12 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -28,7 +27,7 @@ func resourceAwsWafRegionalSizeConstraintSetCreate(d *schema.ResourceData, meta name := d.Get("name").(string) - log.Printf("[INFO] Creating SizeConstraintSet: %s", name) + log.Printf("[INFO] Creating WAF Regional SizeConstraintSet: %s", name) wr := newWafRegionalRetryer(conn, region) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { @@ -40,7 +39,7 @@ func resourceAwsWafRegionalSizeConstraintSetCreate(d *schema.ResourceData, meta return conn.CreateSizeConstraintSet(params) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating SizeConstraintSet: {{err}}", err) + return fmt.Errorf("[ERROR] Error creating WAF Regional SizeConstraintSet: %s", err) } resp := out.(*waf.CreateSizeConstraintSetOutput) @@ -52,19 +51,18 @@ func resourceAwsWafRegionalSizeConstraintSetCreate(d *schema.ResourceData, meta func resourceAwsWafRegionalSizeConstraintSetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafregionalconn - log.Printf("[INFO] Reading SizeConstraintSet: %s", d.Get("name").(string)) + log.Printf("[INFO] Reading WAF Regional SizeConstraintSet: %s", d.Get("name").(string)) params := &waf.GetSizeConstraintSetInput{ SizeConstraintSetId: aws.String(d.Id()), } resp, err := conn.GetSizeConstraintSet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF SizeConstraintSet (%s) not found, removing from state", d.Id()) + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAF Regional SizeConstraintSet (%s) not found, removing from state", d.Id()) d.SetId("") return nil } - return err } @@ -79,10 +77,10 @@ func resourceAwsWafRegionalSizeConstraintSetUpdate(d *schema.ResourceData, meta if d.HasChange("size_constraints") { o, n := d.GetChange("size_constraints") - oldS, newS := o.(*schema.Set).List(), n.(*schema.Set).List() + oldConstraints, newConstraints := o.(*schema.Set).List(), n.(*schema.Set).List() - if err := updateRegionalSizeConstraintSetResource(d.Id(), oldS, newS, client.wafregionalconn, client.region); err != nil { - return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) + if err := updateRegionalSizeConstraintSetResource(d.Id(), oldConstraints, newConstraints, client.wafregionalconn, client.region); err != nil { + return fmt.Errorf("[ERROR] Error updating WAF Regional SizeConstraintSet: %s", err) } } @@ -98,7 +96,7 @@ func resourceAwsWafRegionalSizeConstraintSetDelete(d *schema.ResourceData, meta if len(oldConstraints) > 0 { noConstraints := []interface{}{} if err := updateRegionalSizeConstraintSetResource(d.Id(), oldConstraints, noConstraints, conn, region); err != nil { - return errwrap.Wrapf("[ERROR] Error deleting SizeConstraintSet: {{err}}", err) + return fmt.Errorf("[ERROR] Error deleting WAF Regional SizeConstraintSet: %s", err) } } @@ -111,26 +109,26 @@ func resourceAwsWafRegionalSizeConstraintSetDelete(d *schema.ResourceData, meta return conn.DeleteSizeConstraintSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting SizeConstraintSet: {{err}}", err) + return fmt.Errorf("[ERROR] Error deleting WAF Regional SizeConstraintSet: %s", err) } return nil } -func updateRegionalSizeConstraintSetResource(id string, oldS, newS []interface{}, conn *wafregional.WAFRegional, region string) error { +func updateRegionalSizeConstraintSetResource(id string, oldConstraints, newConstraints []interface{}, conn *wafregional.WAFRegional, region string) error { wr := newWafRegionalRetryer(conn, region) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSizeConstraintSetInput{ ChangeToken: token, SizeConstraintSetId: aws.String(id), - Updates: diffWafSizeConstraints(oldS, newS), + Updates: diffWafSizeConstraints(oldConstraints, newConstraints), } - log.Printf("[INFO] Updating SizeConstraintSet: %s", req) + log.Printf("[INFO] Updating WAF Regional SizeConstraintSet: %s", req) return conn.UpdateSizeConstraintSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) + return fmt.Errorf("[ERROR] Error updating WAF Regional SizeConstraintSet: %s", err) } return nil diff --git a/aws/resource_aws_wafregional_size_constraint_set_test.go b/aws/resource_aws_wafregional_size_constraint_set_test.go index 52896980083..6fffe6b784b 100644 --- a/aws/resource_aws_wafregional_size_constraint_set_test.go +++ b/aws/resource_aws_wafregional_size_constraint_set_test.go @@ -8,14 +8,14 @@ import ( "github.com/hashicorp/terraform/terraform" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/acctest" ) func TestAccAWSWafRegionalSizeConstraintSet_basic(t *testing.T) { - var v waf.SizeConstraintSet + var constraints waf.SizeConstraintSet sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ @@ -26,7 +26,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_basic(t *testing.T) { resource.TestStep{ Config: testAccAWSWafRegionalSizeConstraintSetConfig(sizeConstraintSet), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &v), + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &constraints), resource.TestCheckResourceAttr( "aws_wafregional_size_constraint_set.size_constraint_set", "name", sizeConstraintSet), resource.TestCheckResourceAttr( @@ -84,7 +84,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_changeNameForceNew(t *testing.T) { } func TestAccAWSWafRegionalSizeConstraintSet_disappears(t *testing.T) { - var v waf.SizeConstraintSet + var constraints waf.SizeConstraintSet sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ @@ -95,8 +95,8 @@ func TestAccAWSWafRegionalSizeConstraintSet_disappears(t *testing.T) { { Config: testAccAWSWafRegionalSizeConstraintSetConfig(sizeConstraintSet), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &v), - testAccCheckAWSWafRegionalSizeConstraintSetDisappears(&v), + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &constraints), + testAccCheckAWSWafRegionalSizeConstraintSetDisappears(&constraints), ), ExpectNonEmptyPlan: true, }, @@ -162,7 +162,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_changeConstraints(t *testing.T) { } func TestAccAWSWafRegionalSizeConstraintSet_noConstraints(t *testing.T) { - var ipset waf.SizeConstraintSet + var constraints waf.SizeConstraintSet setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ @@ -173,7 +173,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_noConstraints(t *testing.T) { { Config: testAccAWSWafRegionalSizeConstraintSetConfig_noConstraints(setName), Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &ipset), + testAccCheckAWSWafRegionalSizeConstraintSetExists("aws_wafregional_size_constraint_set.size_constraint_set", &constraints), resource.TestCheckResourceAttr( "aws_wafregional_size_constraint_set.size_constraint_set", "name", setName), resource.TestCheckResourceAttr( @@ -184,7 +184,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_noConstraints(t *testing.T) { }) } -func testAccCheckAWSWafRegionalSizeConstraintSetDisappears(v *waf.SizeConstraintSet) resource.TestCheckFunc { +func testAccCheckAWSWafRegionalSizeConstraintSetDisappears(constraints *waf.SizeConstraintSet) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafregionalconn region := testAccProvider.Meta().(*AWSClient).region @@ -193,10 +193,10 @@ func testAccCheckAWSWafRegionalSizeConstraintSetDisappears(v *waf.SizeConstraint _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSizeConstraintSetInput{ ChangeToken: token, - SizeConstraintSetId: v.SizeConstraintSetId, + SizeConstraintSetId: constraints.SizeConstraintSetId, } - for _, sizeConstraint := range v.SizeConstraints { + for _, sizeConstraint := range constraints.SizeConstraints { sizeConstraintUpdate := &waf.SizeConstraintSetUpdate{ Action: aws.String("DELETE"), SizeConstraint: &waf.SizeConstraint{ @@ -217,7 +217,7 @@ func testAccCheckAWSWafRegionalSizeConstraintSetDisappears(v *waf.SizeConstraint _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { opts := &waf.DeleteSizeConstraintSetInput{ ChangeToken: token, - SizeConstraintSetId: v.SizeConstraintSetId, + SizeConstraintSetId: constraints.SizeConstraintSetId, } return conn.DeleteSizeConstraintSet(opts) }) @@ -228,7 +228,7 @@ func testAccCheckAWSWafRegionalSizeConstraintSetDisappears(v *waf.SizeConstraint } } -func testAccCheckAWSWafRegionalSizeConstraintSetExists(n string, v *waf.SizeConstraintSet) resource.TestCheckFunc { +func testAccCheckAWSWafRegionalSizeConstraintSetExists(n string, constraints *waf.SizeConstraintSet) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -249,7 +249,7 @@ func testAccCheckAWSWafRegionalSizeConstraintSetExists(n string, v *waf.SizeCons } if *resp.SizeConstraintSet.SizeConstraintSetId == rs.Primary.ID { - *v = *resp.SizeConstraintSet + *constraints = *resp.SizeConstraintSet return nil } @@ -259,9 +259,6 @@ func testAccCheckAWSWafRegionalSizeConstraintSetExists(n string, v *waf.SizeCons func testAccCheckAWSWafRegionalSizeConstraintSetDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_wafregional_byte_match_set" { - continue - } conn := testAccProvider.Meta().(*AWSClient).wafregionalconn resp, err := conn.GetSizeConstraintSet( @@ -276,10 +273,8 @@ func testAccCheckAWSWafRegionalSizeConstraintSetDestroy(s *terraform.State) erro } // Return nil if the SizeConstraintSet is already destroyed - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "WAFNonexistentItemException" { - return nil - } + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + return nil } return err diff --git a/website/aws.erb b/website/aws.erb index 2ae53058fc4..3c508c44a42 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1515,6 +1515,10 @@ aws_wafregional_ipset + > + aws_wafregional_size_constraint_set + + > aws_wafregional_sql_injection_match_set diff --git a/website/docs/r/waf_size_constraint_set.html.markdown b/website/docs/r/waf_size_constraint_set.html.markdown index 68a37152e2f..38210375774 100644 --- a/website/docs/r/waf_size_constraint_set.html.markdown +++ b/website/docs/r/waf_size_constraint_set.html.markdown @@ -65,8 +65,6 @@ The following arguments are supported: See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html) for all supported values. -## Remarks - ## Attributes Reference The following attributes are exported: diff --git a/website/docs/r/wafregional_size_constraint_set.html.markdown b/website/docs/r/wafregional_size_constraint_set.html.markdown new file mode 100644 index 00000000000..3ac73e1a0ad --- /dev/null +++ b/website/docs/r/wafregional_size_constraint_set.html.markdown @@ -0,0 +1,72 @@ +--- +layout: "aws" +page_title: "AWS: wafregional_size_constraint_set" +sidebar_current: "docs-aws-resource-wafregional-size-constraint-set" +description: |- + Provides an AWS WAF Regional Size Constraint Set resource for use with ALB. +--- + +# aws_wafregional_size_constraint_set + +Provides a WAF Regional Size Constraint Set Resource for use with Application Load Balancer. + +## Example Usage + +```hcl +resource "aws_wafregional_size_constraint_set" "size_constraint_set" { + name = "tfsize_constraints" + + size_constraints { + text_transformation = "NONE" + comparison_operator = "EQ" + size = "4096" + + field_to_match { + type = "BODY" + } + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name or description of the Size Constraint Set. +* `size_constraints` - (Optional) Specifies the parts of web requests that you want to inspect the size of. + +## Nested Blocks + +### `size_constraints` + +#### Arguments + +* `field_to_match` - (Required) Specifies where in a web request to look for the size constraint. +* `comparison_operator` - (Required) The type of comparison you want to perform. + e.g. `EQ`, `NE`, `LT`, `GT`. + See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-ComparisonOperator) for all supported values. +* `size` - (Required) The size in bytes that you want to compare against the size of the specified `field_to_match`. + Valid values are between 0 - 21474836480 bytes (0 - 20 GB). +* `text_transformation` - (Required) Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + If you specify a transformation, AWS WAF performs the transformation on `field_to_match` before inspecting a request for a match. + e.g. `CMD_LINE`, `HTML_ENTITY_DECODE` or `NONE`. + See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-TextTransformation) + for all supported values. + **Note:** if you choose `BODY` as `type`, you must choose `NONE` because CloudFront forwards only the first 8192 bytes for inspection. + +### `field_to_match` + +#### Arguments + +* `data` - (Optional) When `type` is `HEADER`, enter the name of the header that you want to search, e.g. `User-Agent` or `Referer`. + If `type` is any other value, omit this field. +* `type` - (Required) The part of the web request that you want AWS WAF to search for a specified string. + e.g. `HEADER`, `METHOD` or `BODY`. + See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html) + for all supported values. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Size Constraint Set. From fad1841411924809978a89c52ba58d2a313caf23 Mon Sep 17 00:00:00 2001 From: "Brian M. Carr" Date: Tue, 14 Nov 2017 07:50:42 -0600 Subject: [PATCH 0149/3316] 2218 : allow aws_elasticache_cache_cluster to be created with a replication group id --- aws/resource_aws_elasticache_cluster.go | 118 ++++++++++++++++-------- 1 file changed, 80 insertions(+), 38 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 78011b4b769..8a7caa98d37 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -30,11 +30,14 @@ func resourceAwsElastiCacheCommonSchema() map[string]*schema.Schema { }, "node_type": { Type: schema.TypeString, - Required: true, + Optional: true, + Computed: true, }, "engine": { Type: schema.TypeString, - Required: true, + Optional: true, + //Computed: true, Set in resourceAwsElasticacheCluster because this Schema is used in resource_aws_elasticache_replication_group with a default value. + ForceNew: true, }, "engine_version": { Type: schema.TypeString, @@ -105,8 +108,9 @@ func resourceAwsElastiCacheCommonSchema() map[string]*schema.Schema { }, "port": { Type: schema.TypeInt, - Required: true, ForceNew: true, + Optional: true, + Computed: true, }, "notification_topic_arn": { Type: schema.TypeString, @@ -132,6 +136,8 @@ func resourceAwsElastiCacheCommonSchema() map[string]*schema.Schema { func resourceAwsElasticacheCluster() *schema.Resource { resourceSchema := resourceAwsElastiCacheCommonSchema() + resourceSchema["engine"].Computed = true + resourceSchema["cluster_id"] = &schema.Schema{ Type: schema.TypeString, Required: true, @@ -147,7 +153,8 @@ func resourceAwsElasticacheCluster() *schema.Resource { resourceSchema["num_cache_nodes"] = &schema.Schema{ Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, } resourceSchema["az_mode"] = &schema.Schema{ @@ -177,11 +184,6 @@ func resourceAwsElasticacheCluster() *schema.Resource { Computed: true, } - resourceSchema["replication_group_id"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - resourceSchema["cache_nodes"] = &schema.Schema{ Type: schema.TypeList, Computed: true, @@ -207,6 +209,33 @@ func resourceAwsElasticacheCluster() *schema.Resource { }, } + resourceSchema["replication_group_id"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{ + "availability_zone", + "availability_zones", + "az_mode", + "node_type", + "engine", + "engine_version", + "maintenance_window", + "notification_topic_arn", + "num_cache_nodes", + "parameter_group_name", + "port", + "security_group_names", + "security_group_ids", + "snapshot_arns", + "snapshot_name", + "snapshot_retention_limit", + "snapshot_window", + "subnet_group_name", + }, + Computed: true, + } + return &schema.Resource{ Create: resourceAwsElasticacheClusterCreate, Read: resourceAwsElasticacheClusterRead, @@ -302,31 +331,48 @@ func resourceAwsElasticacheCluster() *schema.Resource { func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - clusterId := d.Get("cluster_id").(string) - nodeType := d.Get("node_type").(string) // e.g) cache.m1.small - numNodes := int64(d.Get("num_cache_nodes").(int)) // 2 - engine := d.Get("engine").(string) // memcached - engineVersion := d.Get("engine_version").(string) // 1.4.14 - port := int64(d.Get("port").(int)) // e.g) 11211 - subnetGroupName := d.Get("subnet_group_name").(string) - securityNameSet := d.Get("security_group_names").(*schema.Set) - securityIdSet := d.Get("security_group_ids").(*schema.Set) - - securityNames := expandStringList(securityNameSet.List()) - securityIds := expandStringList(securityIdSet.List()) - tags := tagsFromMapEC(d.Get("tags").(map[string]interface{})) - - req := &elasticache.CreateCacheClusterInput{ - CacheClusterId: aws.String(clusterId), - CacheNodeType: aws.String(nodeType), - NumCacheNodes: aws.Int64(numNodes), - Engine: aws.String(engine), - EngineVersion: aws.String(engineVersion), - Port: aws.Int64(port), - CacheSubnetGroupName: aws.String(subnetGroupName), - CacheSecurityGroupNames: securityNames, - SecurityGroupIds: securityIds, - Tags: tags, + req := &elasticache.CreateCacheClusterInput{} + + if v, ok := d.GetOk("replication_group_id"); ok { + req.ReplicationGroupId = aws.String(v.(string)) + } else { + securityNameSet := d.Get("security_group_names").(*schema.Set) + securityIdSet := d.Get("security_group_ids").(*schema.Set) + securityNames := expandStringList(securityNameSet.List()) + securityIds := expandStringList(securityIdSet.List()) + tags := tagsFromMapEC(d.Get("tags").(map[string]interface{})) + + req.CacheSecurityGroupNames = securityNames + req.SecurityGroupIds = securityIds + req.Tags = tags + } + + if v, ok := d.GetOk("cluster_id"); ok { + req.CacheClusterId = aws.String(v.(string)) + } + + if v, ok := d.GetOk("node_type"); ok { + req.CacheNodeType = aws.String(v.(string)) + } + + if v, ok := d.GetOk("num_cache_nodes"); ok { + req.NumCacheNodes = aws.Int64(v.(int64)) + } + + if v, ok := d.GetOk("engine"); ok { + req.Engine = aws.String(v.(string)) + } + + if v, ok := d.GetOk("engine_version"); ok { + req.EngineVersion = aws.String(v.(string)) + } + + if v, ok := d.GetOk("port"); ok { + req.Port = aws.Int64(v.(int64)) + } + + if v, ok := d.GetOk("subnet_group_name"); ok { + req.CacheSubnetGroupName = aws.String(v.(string)) } // parameter groups are optional and can be defaulted by AWS @@ -375,10 +421,6 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ req.PreferredAvailabilityZones = azs } - if v, ok := d.GetOk("replication_group_id"); ok { - req.ReplicationGroupId = aws.String(v.(string)) - } - resp, err := conn.CreateCacheCluster(req) if err != nil { return fmt.Errorf("Error creating Elasticache: %s", err) From c4b733547e0fcdf55e3ea26df1755ca637cf3217 Mon Sep 17 00:00:00 2001 From: "Brian M. Carr" Date: Tue, 14 Nov 2017 12:08:02 -0600 Subject: [PATCH 0150/3316] #2218 : update docs --- .../docs/r/elasticache_cluster.html.markdown | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/website/docs/r/elasticache_cluster.html.markdown b/website/docs/r/elasticache_cluster.html.markdown index ac9ae93529d..8fdabf777ec 100644 --- a/website/docs/r/elasticache_cluster.html.markdown +++ b/website/docs/r/elasticache_cluster.html.markdown @@ -21,6 +21,11 @@ phase because a modification has not yet taken place. You can use the brief downtime as the server reboots. See the AWS Docs on [Modifying an ElastiCache Cache Cluster][2] for more information. +~> **Note:** when creating an ElastiCache Cache Cluster, you must either provide a `replication_group_id` +to an existing ElastiCache Replication Group or all of the `engine`, `port`, `node_type`, and +`num_cache_nodes` arguments. When providing a replication_group_id, the new Cache Cluster inherits all +of the properties of the Replication Group; no other options may be specified in your resource config. + ## Example Usage ```hcl @@ -34,6 +39,15 @@ resource "aws_elasticache_cluster" "bar" { } ``` +or + +```hcl +resource "aws_elasticache_cluster" "bar" { + cluster_id = "cluster-example" + replication_group_id = "cluster-repl-group" +} +``` + ## Argument Reference The following arguments are supported: @@ -41,7 +55,7 @@ The following arguments are supported: * `cluster_id` – (Required) Group identifier. ElastiCache converts this name to lowercase -* `engine` – (Required) Name of the cache engine to be used for this cache cluster. +* `engine` – (Conditional, if no replication_group_id is provided) Name of the cache engine to be used for this cache cluster. Valid values for this parameter are `memcached` or `redis` * `engine_version` – (Optional) Version number of the cache engine to be used. @@ -52,19 +66,19 @@ in the AWS Documentation center for supported versions on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` -* `node_type` – (Required) The compute and memory capacity of the nodes. See +* `node_type` – (Conditional, if no replication_group_id is provided) The compute and memory capacity of the nodes. See [Available Cache Node Types](https://aws.amazon.com/elasticache/details#Available_Cache_Node_Types) for supported node types -* `num_cache_nodes` – (Required) The initial number of cache nodes that the +* `num_cache_nodes` – (Conditional, if no replication_group_id is provided) The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. If this number is reduced on subsequent runs, the highest numbered nodes will be removed. -* `parameter_group_name` – (Required) Name of the parameter group to associate +* `parameter_group_name` – (Conditional, if no replication_group_id is provided) Name of the parameter group to associate with this cache cluster -* `port` – (Required) The port number on which each of the cache nodes will +* `port` – (Conditional, if no replication_group_id is provided) The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. * `subnet_group_name` – (Optional, VPC only) Name of the subnet group to be used From cf53d3a13d3063374a081a27019682bb467771a5 Mon Sep 17 00:00:00 2001 From: Genevieve LEsperance Date: Wed, 21 Mar 2018 19:04:24 -0700 Subject: [PATCH 0151/3316] Retry acm certificate delete when in use exception. --- aws/resource_aws_acm_certificate.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_acm_certificate.go b/aws/resource_aws_acm_certificate.go index 4b2c06b3624..c045f62d7b6 100644 --- a/aws/resource_aws_acm_certificate.go +++ b/aws/resource_aws_acm_certificate.go @@ -229,11 +229,23 @@ func convertValidationOptions(certificate *acm.CertificateDetail) ([]map[string] func resourceAwsAcmCertificateDelete(d *schema.ResourceData, meta interface{}) error { acmconn := meta.(*AWSClient).acmconn + log.Printf("[INFO] Deleting ACM Certificate: %s", d.Id()) + params := &acm.DeleteCertificateInput{ CertificateArn: aws.String(d.Id()), } - _, err := acmconn.DeleteCertificate(params) + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + _, err := acmconn.DeleteCertificate(params) + if err != nil { + if isAWSErr(err, acm.ErrCodeResourceInUseException, "") { + log.Printf("[WARN] Conflict deleting certificate in use: %s, retrying", err.Error()) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil && !isAWSErr(err, acm.ErrCodeResourceNotFoundException, "") { return fmt.Errorf("Error deleting certificate: %s", err) From d256c7765e77e47c6617e1fd7e0b5757dd58719f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 22:21:59 -0400 Subject: [PATCH 0152/3316] resource/aws_elasticache_cluster: Add port attribute fix for Redis, add replication_group_id acceptance tests and documentation --- aws/resource_aws_elasticache_cluster.go | 8 +- aws/resource_aws_elasticache_cluster_test.go | 207 ++++++++++++++++++ .../docs/r/elasticache_cluster.html.markdown | 68 +++--- 3 files changed, 250 insertions(+), 33 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 8a7caa98d37..3879426c8e1 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -217,16 +217,16 @@ func resourceAwsElasticacheCluster() *schema.Resource { "availability_zone", "availability_zones", "az_mode", - "node_type", - "engine", "engine_version", + "engine", "maintenance_window", + "node_type", "notification_topic_arn", "num_cache_nodes", "parameter_group_name", "port", - "security_group_names", "security_group_ids", + "security_group_names", "snapshot_arns", "snapshot_name", "snapshot_retention_limit", @@ -480,6 +480,8 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) d.Set("port", c.ConfigurationEndpoint.Port) d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *c.ConfigurationEndpoint.Address, *c.ConfigurationEndpoint.Port))) d.Set("cluster_address", aws.String(fmt.Sprintf("%s", *c.ConfigurationEndpoint.Address))) + } else if len(c.CacheNodes) > 0 { + d.Set("port", int(aws.Int64Value(c.CacheNodes[0].Endpoint.Port))) } if c.ReplicationGroupId != nil { diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 25957192a7e..fd4ca98bde0 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -417,6 +417,165 @@ func TestAccAWSElasticacheCluster_NumCacheNodes_Redis_Ec2Classic(t *testing.T) { }) } +func TestAccAWSElasticacheCluster_ReplicationGroupID_InvalidAttributes(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "availability_zone", "us-east-1a"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with availability_zone`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "availability_zones", "${list(\"us-east-1a\", \"us-east-1c\")}"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with availability_zones`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "az_mode", "single-az"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with az_mode`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "engine_version", "3.2.10"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with engine_version`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "engine", "redis"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with engine`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "maintenance_window", "sun:05:00-sun:09:00"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with maintenance_window`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "node_type", "cache.m3.medium"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with node_type`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "notification_topic_arn", "arn:aws:sns:us-east-1:123456789012:topic/non-existent"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with notification_topic_arn`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "num_cache_nodes", "1"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with num_cache_nodes`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "parameter_group_name", "non-existent"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with parameter_group_name`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "port", "6379"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with port`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "security_group_ids", "${list(\"sg-12345678\", \"sg-87654321\")}"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with security_group_ids`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "security_group_names", "${list(\"group1\", \"group2\")}"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with security_group_names`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "snapshot_arns", "${list(\"arn:aws:s3:::my_bucket/snapshot1.rdb\")}"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with snapshot_arns`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "snapshot_name", "arn:aws:s3:::my_bucket/snapshot1.rdb"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with snapshot_name`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "snapshot_retention_limit", "0"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with snapshot_retention_limit`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "snapshot_window", "05:00-09:00"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with snapshot_window`), + }, + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, "subnet_group_name", "group1"), + ExpectError: regexp.MustCompile(`"replication_group_id": conflicts with subnet_group_name`), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_ReplicationGroupID_SingleReplica_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var cluster elasticache.CacheCluster + var replicationGroup elasticache.ReplicationGroup + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(7)) + clusterResourceName := "aws_elasticache_cluster.replica" + replicationGroupResourceName := "aws_elasticache_replication_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_Replica_Ec2Classic(rName, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(replicationGroupResourceName, &replicationGroup), + testAccCheckAWSElasticacheClusterExists(clusterResourceName, &cluster), + testAccCheckAWSElasticacheClusterReplicationGroupIDAttribute(&cluster, &replicationGroup), + resource.TestCheckResourceAttr(clusterResourceName, "engine", "redis"), + resource.TestCheckResourceAttr(clusterResourceName, "node_type", "cache.m3.medium"), + resource.TestCheckResourceAttr(clusterResourceName, "parameter_group_name", "default.redis3.2"), + resource.TestCheckResourceAttr(clusterResourceName, "port", "6379"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheCluster_ReplicationGroupID_MultipleReplica_Ec2Classic(t *testing.T) { + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + var cluster1, cluster2 elasticache.CacheCluster + var replicationGroup elasticache.ReplicationGroup + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(7)) + clusterResourceName1 := "aws_elasticache_cluster.0.replica" + clusterResourceName2 := "aws_elasticache_cluster.1.replica" + replicationGroupResourceName := "aws_elasticache_replication_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheClusterConfig_ReplicationGroupID_Replica_Ec2Classic(rName, 2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(replicationGroupResourceName, &replicationGroup), + testAccCheckAWSElasticacheClusterExists(clusterResourceName1, &cluster1), + testAccCheckAWSElasticacheClusterExists(clusterResourceName2, &cluster2), + testAccCheckAWSElasticacheClusterReplicationGroupIDAttribute(&cluster1, &replicationGroup), + testAccCheckAWSElasticacheClusterReplicationGroupIDAttribute(&cluster2, &replicationGroup), + resource.TestCheckResourceAttr(clusterResourceName1, "engine", "redis"), + resource.TestCheckResourceAttr(clusterResourceName1, "node_type", "cache.m3.medium"), + resource.TestCheckResourceAttr(clusterResourceName1, "parameter_group_name", "default.redis3.2"), + resource.TestCheckResourceAttr(clusterResourceName1, "port", "6379"), + resource.TestCheckResourceAttr(clusterResourceName2, "engine", "redis"), + resource.TestCheckResourceAttr(clusterResourceName2, "node_type", "cache.m3.medium"), + resource.TestCheckResourceAttr(clusterResourceName2, "parameter_group_name", "default.redis3.2"), + resource.TestCheckResourceAttr(clusterResourceName2, "port", "6379"), + ), + }, + }, + }) +} + func testAccCheckAWSElasticacheClusterAttributes(v *elasticache.CacheCluster) resource.TestCheckFunc { return func(s *terraform.State) error { if v.NotificationConfiguration == nil { @@ -431,6 +590,20 @@ func testAccCheckAWSElasticacheClusterAttributes(v *elasticache.CacheCluster) re } } +func testAccCheckAWSElasticacheClusterReplicationGroupIDAttribute(cluster *elasticache.CacheCluster, replicationGroup *elasticache.ReplicationGroup) resource.TestCheckFunc { + return func(s *terraform.State) error { + if cluster.ReplicationGroupId == nil { + return errors.New("expected cluster ReplicationGroupId to be set") + } + + if aws.StringValue(cluster.ReplicationGroupId) != aws.StringValue(replicationGroup.ReplicationGroupId) { + return errors.New("expected cluster ReplicationGroupId to equal replication group ID") + } + + return nil + } +} + func testAccCheckAWSElasticacheClusterNotRecreated(i, j *elasticache.CacheCluster) resource.TestCheckFunc { return func(s *terraform.State) error { if aws.TimeValue(i.CacheClusterCreateTime) != aws.TimeValue(j.CacheClusterCreateTime) { @@ -913,3 +1086,37 @@ resource "aws_elasticache_cluster" "bar" { } `, rName, numCacheNodes) } + +func testAccAWSElasticacheClusterConfig_ReplicationGroupID_InvalidAttribute(rName, attrName, attrValue string) string { + return fmt.Sprintf(` +resource "aws_elasticache_cluster" "replica" { + cluster_id = "%[1]s" + replication_group_id = "non-existent-id" + %[2]s = "%[3]s" +} +`, rName, attrName, attrValue) +} + +func testAccAWSElasticacheClusterConfig_ReplicationGroupID_Replica_Ec2Classic(rName string, count int) string { + return fmt.Sprintf(` +resource "aws_elasticache_replication_group" "test" { + replication_group_description = "Terraform Acceptance Testing" + replication_group_id = "%[1]s" + node_type = "cache.m3.medium" + number_cache_clusters = 1 + parameter_group_name = "default.redis3.2" + port = 6379 + + lifecycle { + ignore_changes = ["number_cache_clusters"] + } +} + +resource "aws_elasticache_cluster" "replica" { + count = %[2]d + + cluster_id = "%[1]s${count.index}" + replication_group_id = "${aws_elasticache_replication_group.test.id}" +} +`, rName, count) +} diff --git a/website/docs/r/elasticache_cluster.html.markdown b/website/docs/r/elasticache_cluster.html.markdown index 8fdabf777ec..b6a068de9c4 100644 --- a/website/docs/r/elasticache_cluster.html.markdown +++ b/website/docs/r/elasticache_cluster.html.markdown @@ -8,43 +8,51 @@ description: |- # aws_elasticache_cluster -Provides an ElastiCache Cluster resource. +Provides an ElastiCache Cluster resource, which manages a Memcached cluster or Redis instance. -Changes to a Cache Cluster can occur when you manually change a -parameter, such as `node_type`, and are reflected in the next maintenance -window. Because of this, Terraform may report a difference in its planning -phase because a modification has not yet taken place. You can use the -`apply_immediately` flag to instruct the service to apply the change immediately -(see documentation below). - -~> **Note:** using `apply_immediately` can result in a -brief downtime as the server reboots. See the AWS Docs on -[Modifying an ElastiCache Cache Cluster][2] for more information. - -~> **Note:** when creating an ElastiCache Cache Cluster, you must either provide a `replication_group_id` -to an existing ElastiCache Replication Group or all of the `engine`, `port`, `node_type`, and -`num_cache_nodes` arguments. When providing a replication_group_id, the new Cache Cluster inherits all -of the properties of the Replication Group; no other options may be specified in your resource config. +~> **Note:** When you change an attribute, such as `node_type`, by default +it is applied in the next maintenance window. Because of this, Terraform may report +a difference in its planning phase because the actual modification has not yet taken +place. You can use the `apply_immediately` flag to instruct the service to apply the +change immediately. Using `apply_immediately` can result in a brief downtime as the server reboots. +See the AWS Docs on [Modifying an ElastiCache Cache Cluster][2] for more information. ## Example Usage +### Memcached Cluster + ```hcl -resource "aws_elasticache_cluster" "bar" { +resource "aws_elasticache_cluster" "example" { cluster_id = "cluster-example" engine = "memcached" - node_type = "cache.t2.micro" + node_type = "cache.m3.medium" + num_cache_nodes = 2 + parameter_group_name = "default.memcached1.4" port = 11211 +} +``` + +### Redis Instance + +```hcl +resource "aws_elasticache_cluster" "example" { + cluster_id = "cluster-example" + engine = "redis" + node_type = "cache.m3.medium" num_cache_nodes = 1 - parameter_group_name = "default.memcached1.4" + parameter_group_name = "default.redis3.2" + port = 6379 } ``` -or +### Redis Cluster Mode Disabled Read Replica Instance + +These inherit their settings from the replication group. ```hcl -resource "aws_elasticache_cluster" "bar" { +resource "aws_elasticache_cluster" "replica" { cluster_id = "cluster-example" - replication_group_id = "cluster-repl-group" + replication_group_id = "${aws_elasticache_replication_group.example.id}" } ``` @@ -55,7 +63,9 @@ The following arguments are supported: * `cluster_id` – (Required) Group identifier. ElastiCache converts this name to lowercase -* `engine` – (Conditional, if no replication_group_id is provided) Name of the cache engine to be used for this cache cluster. +* `replication_group_id` - (Optional) The ID of the replication group to which this cluster should belong. If this parameter is specified, the cluster is added to the specified replication group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group. + +* `engine` – (Required unless `replication_group_id` is provided) Name of the cache engine to be used for this cache cluster. Valid values for this parameter are `memcached` or `redis` * `engine_version` – (Optional) Version number of the cache engine to be used. @@ -66,19 +76,19 @@ in the AWS Documentation center for supported versions on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` -* `node_type` – (Conditional, if no replication_group_id is provided) The compute and memory capacity of the nodes. See +* `node_type` – (Required unless `replication_group_id` is provided) The compute and memory capacity of the nodes. See [Available Cache Node Types](https://aws.amazon.com/elasticache/details#Available_Cache_Node_Types) for supported node types -* `num_cache_nodes` – (Conditional, if no replication_group_id is provided) The initial number of cache nodes that the +* `num_cache_nodes` – (Required unless `replication_group_id` is provided) The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. If this number is reduced on subsequent runs, the highest numbered nodes will be removed. -* `parameter_group_name` – (Conditional, if no replication_group_id is provided) Name of the parameter group to associate +* `parameter_group_name` – (Required unless `replication_group_id` is provided) Name of the parameter group to associate with this cache cluster -* `port` – (Conditional, if no replication_group_id is provided) The port number on which each of the cache nodes will +* `port` – (Required unless `replication_group_id` is provided) The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. * `subnet_group_name` – (Optional, VPC only) Name of the subnet group to be used @@ -122,11 +132,9 @@ SNS topic to send ElastiCache notifications to. Example: * `tags` - (Optional) A mapping of tags to assign to the resource -~> **NOTE:** Snapshotting functionality is not compatible with t2 instance types. - ## Attributes Reference -The following attributes are exported: +The following additional attributes are exported: * `cache_nodes` - List of node objects including `id`, `address`, `port` and `availability_zone`. Referenceable e.g. as `${aws_elasticache_cluster.bar.cache_nodes.0.address}` From 3f1e9eb1fc9e46d51983f098ec81ee00713fa6f8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 22:42:33 -0400 Subject: [PATCH 0153/3316] docs/resource/aws_elasticache_replication_group: Add aws_elasticache_cluster replication_group_id information --- ...lasticache_replication_group.html.markdown | 42 ++++++++++++++++--- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index 4603c9a5889..aa78c685b30 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -12,22 +12,52 @@ Provides an ElastiCache Replication Group resource. ## Example Usage -### Redis Master with One Replica +### Redis Cluster Mode Disabled + +To create a single shard primary with single read replica: ```hcl -resource "aws_elasticache_replication_group" "bar" { +resource "aws_elasticache_replication_group" "example" { + automatic_failover_enabled = true + availability_zones = ["us-west-2a", "us-west-2b"] replication_group_id = "tf-rep-group-1" replication_group_description = "test description" - node_type = "cache.m1.small" + node_type = "cache.m3.medium" number_cache_clusters = 2 - port = 6379 parameter_group_name = "default.redis3.2" - availability_zones = ["us-west-2a", "us-west-2b"] + port = 6379 +} +``` + +Additional read replicas can be added or removed with the [`aws_elasticache_cluster` resource](/docs/providers/aws/r/elasticache_cluster.html) and its `replication_group_id` attribute. In this situation, you will need to utilize the [lifecycle configuration block](/docs/configuration/resources.html) with `ignore_changes` to prevent replication group recreation. + +```hcl +resource "aws_elasticache_replication_group" "example" { automatic_failover_enabled = true + availability_zones = ["us-west-2a", "us-west-2b"] + replication_group_id = "tf-rep-group-1" + replication_group_description = "test description" + node_type = "cache.m3.medium" + number_cache_clusters = 2 + parameter_group_name = "default.redis3.2" + port = 6379 + + lifecycle { + ignore_changes = ["number_cache_clusters"] + } +} + +resource "aws_elasticache_cluster" "replica" { + count = 1 + + cluster_id = "tf-rep-group-1-${count.index}" + replication_group_id = "${aws_elasticache_replication_group.example.id}" } ``` -### Native Redis Cluster 2 Masters 2 Replicas +### Redis Cluster Mode Enabled + +To create two shards with a primary and a single read replica each: ```hcl resource "aws_elasticache_replication_group" "baz" { From 975d30880e7688bb988f032b1b9cc319c1ee1d99 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 22:52:41 -0400 Subject: [PATCH 0154/3316] resource/aws_elasticache_cluster: Fix panic: interface conversion: interface {} is int, not int64 --- aws/resource_aws_elasticache_cluster.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 3879426c8e1..7703238b72e 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -356,7 +356,7 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ } if v, ok := d.GetOk("num_cache_nodes"); ok { - req.NumCacheNodes = aws.Int64(v.(int64)) + req.NumCacheNodes = aws.Int64(int64(v.(int))) } if v, ok := d.GetOk("engine"); ok { @@ -368,7 +368,7 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ } if v, ok := d.GetOk("port"); ok { - req.Port = aws.Int64(v.(int64)) + req.Port = aws.Int64(int64(v.(int))) } if v, ok := d.GetOk("subnet_group_name"); ok { From c2152522b25093a81ff38fdf65d555b1c5b5e1fa Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 22 Mar 2018 10:34:41 -0400 Subject: [PATCH 0155/3316] add type check in acceptance test teardown --- aws/resource_aws_waf_size_constraint_set_test.go | 3 +++ aws/resource_aws_wafregional_size_constraint_set_test.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/aws/resource_aws_waf_size_constraint_set_test.go b/aws/resource_aws_waf_size_constraint_set_test.go index f239215cef0..6a5833f6767 100644 --- a/aws/resource_aws_waf_size_constraint_set_test.go +++ b/aws/resource_aws_waf_size_constraint_set_test.go @@ -258,6 +258,9 @@ func testAccCheckAWSWafSizeConstraintSetExists(n string, v *waf.SizeConstraintSe func testAccCheckAWSWafSizeConstraintSetDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_waf_size_contraint_set" { + continue + } conn := testAccProvider.Meta().(*AWSClient).wafconn resp, err := conn.GetSizeConstraintSet( diff --git a/aws/resource_aws_wafregional_size_constraint_set_test.go b/aws/resource_aws_wafregional_size_constraint_set_test.go index 6fffe6b784b..0c92b560f2a 100644 --- a/aws/resource_aws_wafregional_size_constraint_set_test.go +++ b/aws/resource_aws_wafregional_size_constraint_set_test.go @@ -259,6 +259,9 @@ func testAccCheckAWSWafRegionalSizeConstraintSetExists(n string, constraints *wa func testAccCheckAWSWafRegionalSizeConstraintSetDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_size_contraint_set" { + continue + } conn := testAccProvider.Meta().(*AWSClient).wafregionalconn resp, err := conn.GetSizeConstraintSet( From 89876a47b98d55f7a91b8e745c15246a3bcbf390 Mon Sep 17 00:00:00 2001 From: appilon Date: Thu, 22 Mar 2018 10:44:43 -0400 Subject: [PATCH 0156/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2600f432f1b..a6b90eef4b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ FEATURES: * **New Resource:** `aws_waf_geo_match_set` [GH-3275] * **New Resource:** `aws_wafregional_rule` [GH-3756] +* **New Resource:** `aws_wafregional_size_constraint_set` [GH-3796] * **New Resource:** `aws_wafregional_sql_injection_match_set` [GH-1013] * **New Resource:** `aws_wafregional_web_acl` [GH-3754] * **New Resource:** `aws_wafregional_xss_match_set` [GH-1014] From 3cc4ed47944eb5e2b66e5d5004310c08e8d22327 Mon Sep 17 00:00:00 2001 From: GriffithBeliever Date: Thu, 22 Mar 2018 17:48:47 +0200 Subject: [PATCH 0157/3316] changed docs of aws_appautoscaling_target to show which parts of the resource_id need to be inputed by the user --- website/docs/r/appautoscaling_target.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/r/appautoscaling_target.html.markdown b/website/docs/r/appautoscaling_target.html.markdown index 1343d5d5eda..584f36a8ddc 100644 --- a/website/docs/r/appautoscaling_target.html.markdown +++ b/website/docs/r/appautoscaling_target.html.markdown @@ -18,7 +18,7 @@ Provides an Application AutoScaling ScalableTarget resource. resource "aws_appautoscaling_target" "dynamodb_table_read_target" { max_capacity = 100 min_capacity = 5 - resource_id = "table/tableName" + resource_id = "table/${aws_dynamodb_table.table_name.name}" role_arn = "${data.aws_iam_role.DynamoDBAutoscaleRole.arn}" scalable_dimension = "dynamodb:table:ReadCapacityUnits" service_namespace = "dynamodb" @@ -31,7 +31,7 @@ resource "aws_appautoscaling_target" "dynamodb_table_read_target" { resource "aws_appautoscaling_target" "dynamodb_index_read_target" { max_capacity = 100 min_capacity = 5 - resource_id = "table/tableName/index/indexName" + resource_id = "table/${aws_dynamodb_table.table.name}/index/${var.index_name}" role_arn = "${data.aws_iam_role.DynamoDBAutoscaleRole.arn}" scalable_dimension = "dynamodb:index:ReadCapacityUnits" service_namespace = "dynamodb" @@ -44,7 +44,7 @@ resource "aws_appautoscaling_target" "dynamodb_index_read_target" { resource "aws_appautoscaling_target" "ecs_target" { max_capacity = 4 min_capacity = 1 - resource_id = "service/clusterName/serviceName" + resource_id = "service/${var.cluster_name}/${var.service_name}" role_arn = "${var.ecs_iam_role}" scalable_dimension = "ecs:service:DesiredCount" service_namespace = "ecs" From 9d042a9ef0bcd0b4ffe951e483fbb88f8d74bb58 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 22 Mar 2018 12:30:56 -0400 Subject: [PATCH 0158/3316] tests/resource/aws_elasticache_cluster: Fix resource name references in multiple replica test --- aws/resource_aws_elasticache_cluster_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index fd4ca98bde0..8353821b792 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -545,8 +545,8 @@ func TestAccAWSElasticacheCluster_ReplicationGroupID_MultipleReplica_Ec2Classic( var cluster1, cluster2 elasticache.CacheCluster var replicationGroup elasticache.ReplicationGroup rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(7)) - clusterResourceName1 := "aws_elasticache_cluster.0.replica" - clusterResourceName2 := "aws_elasticache_cluster.1.replica" + clusterResourceName1 := "aws_elasticache_cluster.replica.0" + clusterResourceName2 := "aws_elasticache_cluster.replica.1" replicationGroupResourceName := "aws_elasticache_replication_group.test" resource.Test(t, resource.TestCase{ From 4ba1b236bf1c1f77d56f1101d0b4a9de726536e9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 22 Mar 2018 12:48:10 -0400 Subject: [PATCH 0159/3316] docs/resource/aws_db_instance: Document engine_version DiffSuppressFunc support --- website/docs/r/db_instance.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 1a5d4a04a32..96d55357a80 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -89,7 +89,9 @@ be created in the VPC associated with the DB subnet group. If unspecified, will be created in the `default` VPC, or in EC2 Classic, if available. * `engine` - (Required unless a `snapshot_identifier` or `replicate_source_db` is provided) The database engine to use. -* `engine_version` - (Optional) The engine version to use. +* `engine_version` - (Optional) The engine version to use. If `auto_minor_version_upgrade` +is enabled, you can provide a prefix of the version such as `5.7` (for `5.7.10`) and +this attribute will ignore differences in the patch version automatically (e.g. `5.7.17`). * `final_snapshot_identifier` - (Optional) The name of your final DB snapshot when this DB instance is deleted. If omitted, no final snapshot will be made. * `iam_database_authentication_enabled` - (Optional) Specifies whether or From d3d7ce424e050993deaa3ae1b5f37a36cb4ecf63 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 22 Mar 2018 13:03:21 -0400 Subject: [PATCH 0160/3316] Update CHANGELOG for #3868 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6b90eef4b2..7a4a5de256b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ENHANCEMENTS: * provider: Treat IAM policies with account ID principals as equivalent to IAM account root ARN [GH-3832] * provider: Treat additional IAM policy scenarios with empty principal trees as equivalent [GH-3832] +* resource/aws_acm_certificate: Retry on ResourceInUseException during deletion for eventual consistency [GH-3868] * resource/aws_cloudfront_distribution: Validate origin `domain_name` and `origin_id` at plan time [GH-3767] * resource/aws_eip: Support configurable timeouts [GH-3769] * resource/aws_elasticache_cluster: Support plan time validation of az_mode [GH-3857] From 938130ab9c408f5ada3385e62ff7b8cccc7e50ed Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 22 Mar 2018 13:44:20 -0400 Subject: [PATCH 0161/3316] tests/resource/aws_subnet: Add sweeper dependency on aws_batch_compute_environment --- aws/resource_aws_subnet_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index 3168fad5340..1a7068d84ab 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -16,7 +16,10 @@ import ( func init() { resource.AddTestSweepers("aws_subnet", &resource.Sweeper{ Name: "aws_subnet", - F: testSweepSubnets, + Dependencies: []string{ + "aws_batch_compute_environment", + }, + F: testSweepSubnets, }) } From ba3672799edf6c7d73dd99fcfa8fe3e836f88471 Mon Sep 17 00:00:00 2001 From: jammerful Date: Thu, 22 Mar 2018 15:08:30 -0400 Subject: [PATCH 0162/3316] resource/aws_security_group: Fix Missing Id Error Make security groups more resilient to eventual consistency errors by adding retries on the existence function in read and update. See: https://github.com/hashicorp/terraform/issues/6991 --- aws/resource_aws_security_group.go | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_security_group.go b/aws/resource_aws_security_group.go index 346bc725d04..f487e5fc394 100644 --- a/aws/resource_aws_security_group.go +++ b/aws/resource_aws_security_group.go @@ -257,17 +257,7 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er log.Printf("[INFO] Security Group ID: %s", d.Id()) // Wait for the security group to truly exist - log.Printf( - "[DEBUG] Waiting for Security Group (%s) to exist", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{""}, - Target: []string{"exists"}, - Refresh: SGStateRefreshFunc(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), - } - - resp, err := stateConf.WaitForState() + resp, err := waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) if err != nil { return fmt.Errorf( "Error waiting for Security Group (%s) to become available: %s", @@ -342,11 +332,12 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - sgRaw, _, err := SGStateRefreshFunc(conn, d.Id())() + sgRaw, err := waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) if err != nil { return err } if sgRaw == nil { + log.Printf("[WARN] Security group (%s) not found, removing from state", d.Id()) d.SetId("") return nil } @@ -393,11 +384,12 @@ func resourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) erro func resourceAwsSecurityGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - sgRaw, _, err := SGStateRefreshFunc(conn, d.Id())() + sgRaw, err := waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) if err != nil { return err } if sgRaw == nil { + log.Printf("[WARN] Security group (%s) not found, removing from state", d.Id()) d.SetId("") return nil } @@ -840,6 +832,18 @@ func SGStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { } } +func waitForSgToExist(conn *ec2.EC2, id string, timeout time.Duration) (interface{}, error) { + log.Printf("[DEBUG] Waiting for Security Group (%s) to exist", id) + stateConf := &resource.StateChangeConf{ + Pending: []string{""}, + Target: []string{"exists"}, + Refresh: SGStateRefreshFunc(conn, id), + Timeout: timeout, + } + + return stateConf.WaitForState() +} + // matchRules receives the group id, type of rules, and the local / remote maps // of rules. We iterate through the local set of rules trying to find a matching // remote rule, which may be structured differently because of how AWS From e6ef3e792114e58d5b9114a0444a4cd03fad3b2c Mon Sep 17 00:00:00 2001 From: GriffithBeliever Date: Fri, 23 Mar 2018 00:34:43 +0200 Subject: [PATCH 0163/3316] added minor changes to original solution --- website/docs/r/appautoscaling_target.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/r/appautoscaling_target.html.markdown b/website/docs/r/appautoscaling_target.html.markdown index 584f36a8ddc..273ce3d59e2 100644 --- a/website/docs/r/appautoscaling_target.html.markdown +++ b/website/docs/r/appautoscaling_target.html.markdown @@ -18,7 +18,7 @@ Provides an Application AutoScaling ScalableTarget resource. resource "aws_appautoscaling_target" "dynamodb_table_read_target" { max_capacity = 100 min_capacity = 5 - resource_id = "table/${aws_dynamodb_table.table_name.name}" + resource_id = "table/${aws_dynamodb_table.example.name}" role_arn = "${data.aws_iam_role.DynamoDBAutoscaleRole.arn}" scalable_dimension = "dynamodb:table:ReadCapacityUnits" service_namespace = "dynamodb" @@ -31,7 +31,7 @@ resource "aws_appautoscaling_target" "dynamodb_table_read_target" { resource "aws_appautoscaling_target" "dynamodb_index_read_target" { max_capacity = 100 min_capacity = 5 - resource_id = "table/${aws_dynamodb_table.table.name}/index/${var.index_name}" + resource_id = "table/${aws_dynamodb_table.example.name}/index/${var.index_name}" role_arn = "${data.aws_iam_role.DynamoDBAutoscaleRole.arn}" scalable_dimension = "dynamodb:index:ReadCapacityUnits" service_namespace = "dynamodb" @@ -44,7 +44,7 @@ resource "aws_appautoscaling_target" "dynamodb_index_read_target" { resource "aws_appautoscaling_target" "ecs_target" { max_capacity = 4 min_capacity = 1 - resource_id = "service/${var.cluster_name}/${var.service_name}" + resource_id = "service/${aws_ecs_cluster.example.name}/${aws_ecs_service.example.name}" role_arn = "${var.ecs_iam_role}" scalable_dimension = "ecs:service:DesiredCount" service_namespace = "ecs" From ef5be04163dab28665430851204d8e7f6bfef091 Mon Sep 17 00:00:00 2001 From: Pascal van Buijtene Date: Fri, 23 Mar 2018 08:27:40 +0100 Subject: [PATCH 0164/3316] New Resource: aws_wafregional_web_acl_association (#3755) * Add support for aws_wafregional_web_acl_association * Formatting and updating code * Updating docs * Fix documentation markup * Apply review comments * Test with multiple associations * Order items in sidebar alphabetically * Fix indentation in example + test --- aws/provider.go | 1 + ...rce_aws_wafregional_web_acl_association.go | 128 +++++++++++++ ...ws_wafregional_web_acl_association_test.go | 177 ++++++++++++++++++ website/aws.erb | 5 + ...regional_web_acl_association.html.markdown | 93 +++++++++ 5 files changed, 404 insertions(+) create mode 100644 aws/resource_aws_wafregional_web_acl_association.go create mode 100644 aws/resource_aws_wafregional_web_acl_association_test.go create mode 100644 website/docs/r/wafregional_web_acl_association.html.markdown diff --git a/aws/provider.go b/aws/provider.go index f3d71cbc66f..42de2ffeab1 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -561,6 +561,7 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), "aws_wafregional_rule": resourceAwsWafRegionalRule(), "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), "aws_batch_job_definition": resourceAwsBatchJobDefinition(), "aws_batch_job_queue": resourceAwsBatchJobQueue(), diff --git a/aws/resource_aws_wafregional_web_acl_association.go b/aws/resource_aws_wafregional_web_acl_association.go new file mode 100644 index 00000000000..559a8d0417c --- /dev/null +++ b/aws/resource_aws_wafregional_web_acl_association.go @@ -0,0 +1,128 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegionalWebAclAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegionalWebAclAssociationCreate, + Read: resourceAwsWafRegionalWebAclAssociationRead, + Delete: resourceAwsWafRegionalWebAclAssociationDelete, + + Schema: map[string]*schema.Schema{ + "web_acl_id": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "resource_arn": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsWafRegionalWebAclAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + + log.Printf( + "[INFO] Creating WAF Regional Web ACL association: %s => %s", + d.Get("web_acl_id").(string), + d.Get("resource_arn").(string)) + + params := &wafregional.AssociateWebACLInput{ + WebACLId: aws.String(d.Get("web_acl_id").(string)), + ResourceArn: aws.String(d.Get("resource_arn").(string)), + } + + // create association and wait on retryable error + // no response body + var err error + err = resource.Retry(2*time.Minute, func() *resource.RetryError { + _, err = conn.AssociateWebACL(params) + if err != nil { + if isAWSErr(err, wafregional.ErrCodeWAFUnavailableEntityException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return err + } + + // Store association id + d.SetId(fmt.Sprintf("%s:%s", *params.WebACLId, *params.ResourceArn)) + + return nil +} + +func resourceAwsWafRegionalWebAclAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + + webAclId, resourceArn := resourceAwsWafRegionalWebAclAssociationParseId(d.Id()) + + // List all resources for Web ACL and see if we get a match + params := &wafregional.ListResourcesForWebACLInput{ + WebACLId: aws.String(webAclId), + } + + resp, err := conn.ListResourcesForWebACL(params) + if err != nil { + return err + } + + // Find match + found := false + for _, listResourceArn := range resp.ResourceArns { + if resourceArn == *listResourceArn { + found = true + break + } + } + if !found { + log.Printf("[WARN] WAF Regional Web ACL association (%s) not found, removing from state", d.Id()) + d.SetId("") + } + + return nil +} + +func resourceAwsWafRegionalWebAclAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + + _, resourceArn := resourceAwsWafRegionalWebAclAssociationParseId(d.Id()) + + log.Printf("[INFO] Deleting WAF Regional Web ACL association: %s", resourceArn) + + params := &wafregional.DisassociateWebACLInput{ + ResourceArn: aws.String(resourceArn), + } + + // If action successful HTTP 200 response with an empty body + _, err := conn.DisassociateWebACL(params) + if err != nil { + return err + } + + return nil +} + +func resourceAwsWafRegionalWebAclAssociationParseId(id string) (webAclId, resourceArn string) { + parts := strings.SplitN(id, ":", 2) + webAclId = parts[0] + resourceArn = parts[1] + return +} diff --git a/aws/resource_aws_wafregional_web_acl_association_test.go b/aws/resource_aws_wafregional_web_acl_association_test.go new file mode 100644 index 00000000000..c92a2db55d2 --- /dev/null +++ b/aws/resource_aws_wafregional_web_acl_association_test.go @@ -0,0 +1,177 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/terraform" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/wafregional" +) + +func TestAccAWSWafRegionalWebAclAssociation_basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckWafRegionalWebAclAssociationDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccCheckWafRegionalWebAclAssociationConfig_basic, + Check: resource.ComposeTestCheckFunc( + testAccCheckWafRegionalWebAclAssociationExists("aws_wafregional_web_acl_association.foo"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalWebAclAssociation_multipleAssociations(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckWafRegionalWebAclAssociationDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccCheckWafRegionalWebAclAssociationConfig_multipleAssociations, + Check: resource.ComposeTestCheckFunc( + testAccCheckWafRegionalWebAclAssociationExists("aws_wafregional_web_acl_association.foo"), + testAccCheckWafRegionalWebAclAssociationExists("aws_wafregional_web_acl_association.bar"), + ), + }, + }, + }) +} + +func testAccCheckWafRegionalWebAclAssociationDestroy(s *terraform.State) error { + return testAccCheckWafRegionalWebAclAssociationDestroyWithProvider(s, testAccProvider) +} + +func testAccCheckWafRegionalWebAclAssociationDestroyWithProvider(s *terraform.State, provider *schema.Provider) error { + conn := provider.Meta().(*AWSClient).wafregionalconn + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_web_acl_association" { + continue + } + + webAclId, resourceArn := resourceAwsWafRegionalWebAclAssociationParseId(rs.Primary.ID) + + resp, err := conn.ListResourcesForWebACL(&wafregional.ListResourcesForWebACLInput{WebACLId: aws.String(webAclId)}) + if err != nil { + found := false + for _, listResourceArn := range resp.ResourceArns { + if resourceArn == *listResourceArn { + found = true + break + } + } + if found { + return fmt.Errorf("WebACL: %v is still associated to resource: %v", webAclId, resourceArn) + } + } + } + return nil +} + +func testAccCheckWafRegionalWebAclAssociationExists(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + return testAccCheckWafRegionalWebAclAssociationExistsWithProvider(s, n, testAccProvider) + } +} + +func testAccCheckWafRegionalWebAclAssociationExistsWithProvider(s *terraform.State, n string, provider *schema.Provider) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WebACL association ID is set") + } + + webAclId, resourceArn := resourceAwsWafRegionalWebAclAssociationParseId(rs.Primary.ID) + + conn := provider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.ListResourcesForWebACL(&wafregional.ListResourcesForWebACLInput{WebACLId: aws.String(webAclId)}) + if err != nil { + return fmt.Errorf("List Web ACL err: %v", err) + } + + found := false + for _, listResourceArn := range resp.ResourceArns { + if resourceArn == *listResourceArn { + found = true + break + } + } + + if !found { + return fmt.Errorf("Web ACL association not found") + } + + return nil +} + +const testAccCheckWafRegionalWebAclAssociationConfig_basic = ` +resource "aws_wafregional_rule" "foo" { + name = "foo" + metric_name = "foo" +} + +resource "aws_wafregional_web_acl" "foo" { + name = "foo" + metric_name = "foo" + default_action { + type = "ALLOW" + } + rule { + action { + type = "COUNT" + } + priority = 100 + rule_id = "${aws_wafregional_rule.foo.id}" + } +} + +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" +} + +data "aws_availability_zones" "available" {} + +resource "aws_subnet" "foo" { + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "10.1.1.0/24" + availability_zone = "${data.aws_availability_zones.available.names[0]}" +} + +resource "aws_subnet" "bar" { + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "10.1.2.0/24" + availability_zone = "${data.aws_availability_zones.available.names[1]}" +} + +resource "aws_alb" "foo" { + internal = true + subnets = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] +} + +resource "aws_wafregional_web_acl_association" "foo" { + resource_arn = "${aws_alb.foo.arn}" + web_acl_id = "${aws_wafregional_web_acl.foo.id}" +} +` + +const testAccCheckWafRegionalWebAclAssociationConfig_multipleAssociations = testAccCheckWafRegionalWebAclAssociationConfig_basic + ` +resource "aws_alb" "bar" { + internal = true + subnets = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] +} + +resource "aws_wafregional_web_acl_association" "bar" { + resource_arn = "${aws_alb.bar.arn}" + web_acl_id = "${aws_wafregional_web_acl.foo.id}" +} +` diff --git a/website/aws.erb b/website/aws.erb index 3c508c44a42..4b53b411a60 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1531,9 +1531,14 @@ aws_wafregional_web_acl + > + aws_wafregional_web_acl_association + + > aws_wafregional_xss_match_set + diff --git a/website/docs/r/wafregional_web_acl_association.html.markdown b/website/docs/r/wafregional_web_acl_association.html.markdown new file mode 100644 index 00000000000..6e2a7e420b0 --- /dev/null +++ b/website/docs/r/wafregional_web_acl_association.html.markdown @@ -0,0 +1,93 @@ +--- +layout: "aws" +page_title: "AWS: aws_wafregional_web_acl_association" +sidebar_current: "docs-aws-resource-wafregional-web-acl-association" +description: |- + Provides a resource to create an association between a WAF Regional WebACL and Application Load Balancer. +--- + +# aws_wafregional_web_acl_association + +Provides a resource to create an association between a WAF Regional WebACL and Application Load Balancer. + +-> **Note:** An Application Load Balancer can only be associated with one WAF Regional WebACL. + +## Example Usage + +```hcl +resource "aws_wafregional_ipset" "ipset" { + name = "tfIPSet" + + ip_set_descriptor { + type = "IPV4" + value = "192.0.7.0/24" + } +} + +resource "aws_wafregional_rule" "foo" { + name = "tfWAFRule" + metric_name = "tfWAFRule" + + predicate { + data_id = "${aws_wafregional_ipset.ipset.id}" + negated = false + type = "IPMatch" + } +} + +resource "aws_wafregional_web_acl" "foo" { + name = "foo" + metric_name = "foo" + default_action { + type = "ALLOW" + } + rule { + action { + type = "BLOCK" + } + priority = 1 + rule_id = "${aws_wafregional_rule.foo.id}" + } +} + +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" +} + +data "aws_availability_zones" "available" {} + +resource "aws_subnet" "foo" { + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "10.1.1.0/24" + availability_zone = "${data.aws_availability_zones.available.names[0]}" +} + +resource "aws_subnet" "bar" { + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "10.1.2.0/24" + availability_zone = "${data.aws_availability_zones.available.names[1]}" +} + +resource "aws_alb" "foo" { + internal = true + subnets = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] +} + +resource "aws_wafregional_web_acl_association" "foo" { + resource_arn = "${aws_alb.foo.arn}" + web_acl_id = "${aws_wafregional_web_acl.foo.id}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `web_acl_id` - (Required) The ID of the WAF Regional WebACL to create an association. +* `resource_arn` - (Required) Application Load Balancer ARN to associate with. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the association From 511bc3e7670c8a885bc4860a2b1bfb2f6dc50d80 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 23 Mar 2018 07:28:06 +0000 Subject: [PATCH 0165/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a4a5de256b..4ad13a5c9cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ FEATURES: * **New Resource:** `aws_wafregional_size_constraint_set` [GH-3796] * **New Resource:** `aws_wafregional_sql_injection_match_set` [GH-1013] * **New Resource:** `aws_wafregional_web_acl` [GH-3754] +* **New Resource:** `aws_wafregional_web_acl_association` [GH-3755] * **New Resource:** `aws_wafregional_xss_match_set` [GH-1014] * **New Resource:** `aws_kms_grant` [GH-3038] From 71a627ed05eebf5e7a1e510519a6ea0cbfe68b76 Mon Sep 17 00:00:00 2001 From: Matt Lavin Date: Fri, 23 Mar 2018 08:53:11 -0400 Subject: [PATCH 0166/3316] resource/aws_api_gateway_deployment: Do not delete stages in use by other deployments --- aws/resource_aws_api_gateway_deployment.go | 26 +++++- ...esource_aws_api_gateway_deployment_test.go | 87 ++++++++++++++++++- 2 files changed, 105 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_api_gateway_deployment.go b/aws/resource_aws_api_gateway_deployment.go index 4e291b780e8..56a210f0738 100644 --- a/aws/resource_aws_api_gateway_deployment.go +++ b/aws/resource_aws_api_gateway_deployment.go @@ -172,14 +172,32 @@ func resourceAwsApiGatewayDeploymentDelete(d *schema.ResourceData, meta interfac return resource.Retry(5*time.Minute, func() *resource.RetryError { log.Printf("[DEBUG] schema is %#v", d) - if _, err := conn.DeleteStage(&apigateway.DeleteStageInput{ + + stage, err := conn.GetStage(&apigateway.GetStageInput{ StageName: aws.String(d.Get("stage_name").(string)), RestApiId: aws.String(d.Get("rest_api_id").(string)), - }); err == nil { - return nil + }) + if err != nil { + return resource.RetryableError(err) + } + + // If the stage has been updated to point at a different deployment, then + // the stage should not be removed then this deployment is deleted. + var shouldDeleteStage = true + if *stage.DeploymentId != d.Id() { + shouldDeleteStage = false + } + + if shouldDeleteStage { + if _, err := conn.DeleteStage(&apigateway.DeleteStageInput{ + StageName: aws.String(d.Get("stage_name").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), + }); err == nil { + return nil + } } - _, err := conn.DeleteDeployment(&apigateway.DeleteDeploymentInput{ + _, err = conn.DeleteDeployment(&apigateway.DeleteDeploymentInput{ DeploymentId: aws.String(d.Id()), RestApiId: aws.String(d.Get("rest_api_id").(string)), }) diff --git a/aws/resource_aws_api_gateway_deployment_test.go b/aws/resource_aws_api_gateway_deployment_test.go index 7cf58a4e47e..57a0c0f7181 100644 --- a/aws/resource_aws_api_gateway_deployment_test.go +++ b/aws/resource_aws_api_gateway_deployment_test.go @@ -37,6 +37,49 @@ func TestAccAWSAPIGatewayDeployment_basic(t *testing.T) { }) } +func TestAccAWSAPIGatewayDeployment_createBeforeDestoryUpdate(t *testing.T) { + var conf apigateway.Deployment + var stage apigateway.Stage + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayDeploymentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayDeploymentCreateBeforeDestroyConfig("description1", "https://www.google.com"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayDeploymentExists("aws_api_gateway_deployment.test", &conf), + resource.TestCheckResourceAttr( + "aws_api_gateway_deployment.test", "stage_name", "test"), + resource.TestCheckResourceAttr( + "aws_api_gateway_deployment.test", "description", "description1"), + resource.TestCheckResourceAttr( + "aws_api_gateway_deployment.test", "variables.a", "2"), + resource.TestCheckResourceAttrSet( + "aws_api_gateway_deployment.test", "created_date"), + testAccCheckAWSAPIGatewayDeploymentStageExists("test", &stage), + ), + }, + { + Config: testAccAWSAPIGatewayDeploymentCreateBeforeDestroyConfig("description2", "https://www.google.de"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayDeploymentExists("aws_api_gateway_deployment.test", &conf), + resource.TestCheckResourceAttr( + "aws_api_gateway_deployment.test", "stage_name", "test"), + resource.TestCheckResourceAttr( + "aws_api_gateway_deployment.test", "description", "description2"), + resource.TestCheckResourceAttr( + "aws_api_gateway_deployment.test", "variables.a", "2"), + resource.TestCheckResourceAttrSet( + "aws_api_gateway_deployment.test", "created_date"), + testAccCheckAWSAPIGatewayDeploymentStageExists("test", &stage), + ), + }, + }, + }) +} + func testAccCheckAWSAPIGatewayDeploymentExists(n string, res *apigateway.Deployment) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -69,6 +112,27 @@ func testAccCheckAWSAPIGatewayDeploymentExists(n string, res *apigateway.Deploym } } +func testAccCheckAWSAPIGatewayDeploymentStageExists(stageName string, res *apigateway.Stage) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).apigateway + + restApiId := aws.String(s.RootModule().Resources["aws_api_gateway_rest_api.test"].Primary.ID) + + req := &apigateway.GetStageInput{ + StageName: &stageName, + RestApiId: restApiId, + } + stage, err := conn.GetStage(req) + if err != nil { + return err + } + + *res = *stage + + return nil + } +} + func testAccCheckAWSAPIGatewayDeploymentDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).apigateway @@ -103,7 +167,8 @@ func testAccCheckAWSAPIGatewayDeploymentDestroy(s *terraform.State) error { return nil } -const testAccAWSAPIGatewayDeploymentConfig = ` +func buildAPIGatewayDeploymentConfig(description, url, extras string) string { + return fmt.Sprintf(` resource "aws_api_gateway_rest_api" "test" { name = "test" } @@ -134,7 +199,7 @@ resource "aws_api_gateway_integration" "test" { http_method = "${aws_api_gateway_method.test.http_method}" type = "HTTP" - uri = "https://www.google.de" + uri = "%s" integration_http_method = "GET" } @@ -150,10 +215,24 @@ resource "aws_api_gateway_deployment" "test" { rest_api_id = "${aws_api_gateway_rest_api.test.id}" stage_name = "test" - description = "This is a test" + description = "%s" + stage_description = "%s" + + %s variables = { "a" = "2" } } -` +`, url, description, description, extras) +} + +var testAccAWSAPIGatewayDeploymentConfig = buildAPIGatewayDeploymentConfig("This is a test", "https://www.google.de", "") + +func testAccAWSAPIGatewayDeploymentCreateBeforeDestroyConfig(description string, url string) string { + return buildAPIGatewayDeploymentConfig(description, url, ` + lifecycle { + create_before_destroy = true + } + `) +} From e772e546c465e91d27fb704126635aa888a730ae Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 23 Mar 2018 09:29:29 -0400 Subject: [PATCH 0167/3316] docs/resource/aws_autoscaling_group: Clarify usage of availability_zones Also updates the examples to use vpc_zone_identifier instead of availability_zones as VPC usage should be more common than EC2-Classic usage. --- website/docs/r/autoscaling_group.html.markdown | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/website/docs/r/autoscaling_group.html.markdown b/website/docs/r/autoscaling_group.html.markdown index ddd2f9ff788..470847db370 100644 --- a/website/docs/r/autoscaling_group.html.markdown +++ b/website/docs/r/autoscaling_group.html.markdown @@ -19,7 +19,6 @@ resource "aws_placement_group" "test" { } resource "aws_autoscaling_group" "bar" { - availability_zones = ["us-east-1a"] name = "foobar3-terraform-test" max_size = 5 min_size = 2 @@ -29,6 +28,7 @@ resource "aws_autoscaling_group" "bar" { force_delete = true placement_group = "${aws_placement_group.test.id}" launch_configuration = "${aws_launch_configuration.foobar.name}" + vpc_zone_identifier = ["${aws_subnet.example1.id}", "${aws_subnet.example2.id}"] initial_lifecycle_hook { name = "foobar" @@ -83,11 +83,11 @@ variable extra_tags { } resource "aws_autoscaling_group" "bar" { - availability_zones = ["us-east-1a"] name = "foobar3-terraform-test" max_size = 5 min_size = 2 launch_configuration = "${aws_launch_configuration.foobar.name}" + vpc_zone_identifier = ["${aws_subnet.example1.id}", "${aws_subnet.example2.id}"] tags = [ { @@ -122,8 +122,7 @@ The following arguments are supported: * `max_size` - (Required) The maximum size of the auto scale group. * `min_size` - (Required) The minimum size of the auto scale group. (See also [Waiting for Capacity](#waiting-for-capacity) below.) -* `availability_zones` - (Optional) A list of AZs to launch resources in. - Required only if you do not specify any `vpc_zone_identifier` +* `availability_zones` - (Required only for EC2-Classic) A list of one or more availability zones for the group. This parameter should not be specified when using `vpc_zone_identifier`. * `default_cooldown` - (Optional) The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. * `launch_configuration` - (Required) The name of the launch configuration to use. * `initial_lifecycle_hook` - (Optional) One or more From 0a97a6939b9850414588985f7197a86000f79bc7 Mon Sep 17 00:00:00 2001 From: Simon Westcott Date: Fri, 23 Mar 2018 15:00:01 +0000 Subject: [PATCH 0168/3316] Mark service_linked_role_arn as computed --- aws/resource_aws_autoscaling_group.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_autoscaling_group.go b/aws/resource_aws_autoscaling_group.go index 31e51c19528..272a8828d88 100644 --- a/aws/resource_aws_autoscaling_group.go +++ b/aws/resource_aws_autoscaling_group.go @@ -246,6 +246,7 @@ func resourceAwsAutoscalingGroup() *schema.Resource { "service_linked_role_arn": { Type: schema.TypeString, Optional: true, + Computed: true, }, }, } From 2e41ac6c589befcaf299892ce70392097751884e Mon Sep 17 00:00:00 2001 From: jammerful Date: Fri, 23 Mar 2018 11:17:44 -0400 Subject: [PATCH 0169/3316] aws/resource_aws_security_group: Only Use waitForSgToExist if Resource is New --- aws/resource_aws_security_group.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_security_group.go b/aws/resource_aws_security_group.go index f487e5fc394..70fe956045d 100644 --- a/aws/resource_aws_security_group.go +++ b/aws/resource_aws_security_group.go @@ -332,10 +332,18 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - sgRaw, err := waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) + var sgRaw interface{} + var err error + if d.IsNewResource() { + sgRaw, err = waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) + } else { + sgRaw, _, err = SGStateRefreshFunc(conn, d.Id())() + } + if err != nil { return err } + if sgRaw == nil { log.Printf("[WARN] Security group (%s) not found, removing from state", d.Id()) d.SetId("") @@ -384,7 +392,14 @@ func resourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) erro func resourceAwsSecurityGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - sgRaw, err := waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) + var sgRaw interface{} + var err error + if d.IsNewResource() { + sgRaw, err = waitForSgToExist(conn, d.Id(), d.Timeout(schema.TimeoutRead)) + } else { + sgRaw, _, err = SGStateRefreshFunc(conn, d.Id())() + } + if err != nil { return err } From afd69d0596fab51e9b0d7eb43a046b792a885f32 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 23 Mar 2018 14:09:32 -0400 Subject: [PATCH 0170/3316] Update CHANGELOG for #3812 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ad13a5c9cc..81c72c5316a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ENHANCEMENTS: * provider: Treat IAM policies with account ID principals as equivalent to IAM account root ARN [GH-3832] * provider: Treat additional IAM policy scenarios with empty principal trees as equivalent [GH-3832] * resource/aws_acm_certificate: Retry on ResourceInUseException during deletion for eventual consistency [GH-3868] +* resource/aws_autoscaling_group: Add `service_linked_role_arn` argument [GH-3812] * resource/aws_cloudfront_distribution: Validate origin `domain_name` and `origin_id` at plan time [GH-3767] * resource/aws_eip: Support configurable timeouts [GH-3769] * resource/aws_elasticache_cluster: Support plan time validation of az_mode [GH-3857] From 941ce367bb4fd7e3e572b229f8ec06636b25851e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 23 Mar 2018 16:16:21 -0400 Subject: [PATCH 0171/3316] resource/aws_lb_listener: Retry CertificateNotFound errors on update for IAM eventual consistency --- aws/resource_aws_lb_listener.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index 27182b06ef0..e8200f9dbec 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -127,16 +127,12 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error var err error log.Printf("[DEBUG] Creating LB listener for ARN: %s", d.Get("load_balancer_arn").(string)) resp, err = elbconn.CreateListener(params) - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "CertificateNotFound" { - log.Printf("[WARN] Got an error while trying to create LB listener for ARN: %s: %s", lbArn, err) + if err != nil { + if isAWSErr(err, elbv2.ErrCodeCertificateNotFoundException, "") { return resource.RetryableError(err) } - } - if err != nil { return resource.NonRetryableError(err) } - return nil }) @@ -232,7 +228,16 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error } } - _, err := elbconn.ModifyListener(params) + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := elbconn.ModifyListener(params) + if err != nil { + if isAWSErr(err, elbv2.ErrCodeCertificateNotFoundException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { return errwrap.Wrapf("Error modifying LB Listener: {{err}}", err) } From 6915ae6058a95e2781cc67920f0b607633deb4b0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 23 Mar 2018 16:29:18 -0400 Subject: [PATCH 0172/3316] docs/resource/aws_opsworks_instance: Add missing ec_instance_id attribute --- website/docs/r/opsworks_instance.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/r/opsworks_instance.html.markdown b/website/docs/r/opsworks_instance.html.markdown index 731c65fd692..315e338c7a4 100644 --- a/website/docs/r/opsworks_instance.html.markdown +++ b/website/docs/r/opsworks_instance.html.markdown @@ -120,6 +120,7 @@ The following attributes are exported: * `id` - The id of the OpsWorks instance. * `agent_version` - The AWS OpsWorks agent version. * `availability_zone` - The availability zone of the instance. +* `ec2_instance_id` - EC2 instance ID * `ssh_key_name` - The key name of the instance * `public_dns` - The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC From a11f675898dba55ee8ef4538e4a30aca43ecee14 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Fri, 23 Mar 2018 20:33:44 +0000 Subject: [PATCH 0173/3316] v1.12.0 --- CHANGELOG.md | 82 ++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c72c5316a..2f58fdf8fde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,56 +1,56 @@ -## 1.12.0 (Unreleased) +## 1.12.0 (March 23, 2018) NOTES: -* provider: For resources implementing the IAM policy equivalence library (https://github.com/jen20/awspolicyequivalence/) on an attribute via `suppressEquivalentAwsPolicyDiffs`, the dependency has been updated, which should mark additional IAM policies as equivalent. [GH-3832] +* provider: For resources implementing the IAM policy equivalence library (https://github.com/jen20/awspolicyequivalence/) on an attribute via `suppressEquivalentAwsPolicyDiffs`, the dependency has been updated, which should mark additional IAM policies as equivalent. ([#3832](https://github.com/terraform-providers/terraform-provider-aws/issues/3832)) FEATURES: -* **New Resource:** `aws_waf_geo_match_set` [GH-3275] -* **New Resource:** `aws_wafregional_rule` [GH-3756] -* **New Resource:** `aws_wafregional_size_constraint_set` [GH-3796] -* **New Resource:** `aws_wafregional_sql_injection_match_set` [GH-1013] -* **New Resource:** `aws_wafregional_web_acl` [GH-3754] -* **New Resource:** `aws_wafregional_web_acl_association` [GH-3755] -* **New Resource:** `aws_wafregional_xss_match_set` [GH-1014] -* **New Resource:** `aws_kms_grant` [GH-3038] +* **New Resource:** `aws_waf_geo_match_set` ([#3275](https://github.com/terraform-providers/terraform-provider-aws/issues/3275)) +* **New Resource:** `aws_wafregional_rule` ([#3756](https://github.com/terraform-providers/terraform-provider-aws/issues/3756)) +* **New Resource:** `aws_wafregional_size_constraint_set` ([#3796](https://github.com/terraform-providers/terraform-provider-aws/issues/3796)) +* **New Resource:** `aws_wafregional_sql_injection_match_set` ([#1013](https://github.com/terraform-providers/terraform-provider-aws/issues/1013)) +* **New Resource:** `aws_wafregional_web_acl` ([#3754](https://github.com/terraform-providers/terraform-provider-aws/issues/3754)) +* **New Resource:** `aws_wafregional_web_acl_association` ([#3755](https://github.com/terraform-providers/terraform-provider-aws/issues/3755)) +* **New Resource:** `aws_wafregional_xss_match_set` ([#1014](https://github.com/terraform-providers/terraform-provider-aws/issues/1014)) +* **New Resource:** `aws_kms_grant` ([#3038](https://github.com/terraform-providers/terraform-provider-aws/issues/3038)) ENHANCEMENTS: -* provider: Treat IAM policies with account ID principals as equivalent to IAM account root ARN [GH-3832] -* provider: Treat additional IAM policy scenarios with empty principal trees as equivalent [GH-3832] -* resource/aws_acm_certificate: Retry on ResourceInUseException during deletion for eventual consistency [GH-3868] -* resource/aws_autoscaling_group: Add `service_linked_role_arn` argument [GH-3812] -* resource/aws_cloudfront_distribution: Validate origin `domain_name` and `origin_id` at plan time [GH-3767] -* resource/aws_eip: Support configurable timeouts [GH-3769] -* resource/aws_elasticache_cluster: Support plan time validation of az_mode [GH-3857] -* resource/aws_elasticache_cluster: Support plan time validation of node_type requiring VPC for cache.t2 instances [GH-3857] -* resource/aws_elasticache_cluster: Support plan time validation of num_cache_nodes > 1 for redis [GH-3857] -* resource/aws_elasticache_cluster: ForceNew on node_type changes for memcached engine [GH-3857] -* resource/aws_elasticache_cluster: ForceNew on engine_version downgrades [GH-3857] -* resource/aws_emr_cluster: Add step support [GH-3673] -* resource/aws_instance: Support optionally fetching encrypted Windows password data [GH-2219] -* resource/aws_launch_configuration: Validate `user_data` length during plan [GH-2973] -* resource/aws_lb_target_group: Validate health check threshold for TCP protocol during plan [GH-3782] -* resource/aws_security_group: Add arn attribute [GH-3751] -* resource/aws_ses_domain_identity: Support trailing period in domain name [GH-3840] -* resource/aws_sqs_queue: Support lack of ListQueueTags for all non-standard AWS implementations [GH-3794] -* resource/aws_ssm_document: Add `document_format` argument to support YAML [GH-3814] -* resource/aws_api_gateway_rest_api: Add support for content encoding [GH-3642] -* resource/aws_s3_bucket_object: New `content_base64` argument allows uploading raw binary data created in-memory, rather than reading from disk as with `source`. [GH-3788] +* provider: Treat IAM policies with account ID principals as equivalent to IAM account root ARN ([#3832](https://github.com/terraform-providers/terraform-provider-aws/issues/3832)) +* provider: Treat additional IAM policy scenarios with empty principal trees as equivalent ([#3832](https://github.com/terraform-providers/terraform-provider-aws/issues/3832)) +* resource/aws_acm_certificate: Retry on ResourceInUseException during deletion for eventual consistency ([#3868](https://github.com/terraform-providers/terraform-provider-aws/issues/3868)) +* resource/aws_autoscaling_group: Add `service_linked_role_arn` argument ([#3812](https://github.com/terraform-providers/terraform-provider-aws/issues/3812)) +* resource/aws_cloudfront_distribution: Validate origin `domain_name` and `origin_id` at plan time ([#3767](https://github.com/terraform-providers/terraform-provider-aws/issues/3767)) +* resource/aws_eip: Support configurable timeouts ([#3769](https://github.com/terraform-providers/terraform-provider-aws/issues/3769)) +* resource/aws_elasticache_cluster: Support plan time validation of az_mode ([#3857](https://github.com/terraform-providers/terraform-provider-aws/issues/3857)) +* resource/aws_elasticache_cluster: Support plan time validation of node_type requiring VPC for cache.t2 instances ([#3857](https://github.com/terraform-providers/terraform-provider-aws/issues/3857)) +* resource/aws_elasticache_cluster: Support plan time validation of num_cache_nodes > 1 for redis ([#3857](https://github.com/terraform-providers/terraform-provider-aws/issues/3857)) +* resource/aws_elasticache_cluster: ForceNew on node_type changes for memcached engine ([#3857](https://github.com/terraform-providers/terraform-provider-aws/issues/3857)) +* resource/aws_elasticache_cluster: ForceNew on engine_version downgrades ([#3857](https://github.com/terraform-providers/terraform-provider-aws/issues/3857)) +* resource/aws_emr_cluster: Add step support ([#3673](https://github.com/terraform-providers/terraform-provider-aws/issues/3673)) +* resource/aws_instance: Support optionally fetching encrypted Windows password data ([#2219](https://github.com/terraform-providers/terraform-provider-aws/issues/2219)) +* resource/aws_launch_configuration: Validate `user_data` length during plan ([#2973](https://github.com/terraform-providers/terraform-provider-aws/issues/2973)) +* resource/aws_lb_target_group: Validate health check threshold for TCP protocol during plan ([#3782](https://github.com/terraform-providers/terraform-provider-aws/issues/3782)) +* resource/aws_security_group: Add arn attribute ([#3751](https://github.com/terraform-providers/terraform-provider-aws/issues/3751)) +* resource/aws_ses_domain_identity: Support trailing period in domain name ([#3840](https://github.com/terraform-providers/terraform-provider-aws/issues/3840)) +* resource/aws_sqs_queue: Support lack of ListQueueTags for all non-standard AWS implementations ([#3794](https://github.com/terraform-providers/terraform-provider-aws/issues/3794)) +* resource/aws_ssm_document: Add `document_format` argument to support YAML ([#3814](https://github.com/terraform-providers/terraform-provider-aws/issues/3814)) +* resource/aws_api_gateway_rest_api: Add support for content encoding ([#3642](https://github.com/terraform-providers/terraform-provider-aws/issues/3642)) +* resource/aws_s3_bucket_object: New `content_base64` argument allows uploading raw binary data created in-memory, rather than reading from disk as with `source`. ([#3788](https://github.com/terraform-providers/terraform-provider-aws/issues/3788)) BUG FIXES: -* resource/aws_api_gateway_client_certificate: Export `*_date` fields correctly [GH-3805] -* resource/aws_cognito_user_pool: Detect `auto_verified_attributes` changes [GH-3786] -* resource/aws_cognito_user_pool_client: Fix `callback_urls` updates [GH-3404] -* resource/aws_db_instance: Support `incompatible-parameters` and `storage-full` state [GH-3708] -* resource/aws_ecs_task_definition: Correctly read `volume` attribute into Terraform state [GH-3823] -* resource/aws_kinesis_firehose_delivery_stream: Prevent crash on malformed ID for import [GH-3834] -* resource/aws_lambda_function: Only retry IAM eventual consistency errors for one minute [GH-3765] -* resource/aws_ssm_association: Prevent AssociationDoesNotExist error [GH-3776] -* resource/aws_vpc_endpoint: Prevent perpertual diff in non-standard partitions [GH-3317] -* resource/aws_dynamodb_table: Update and validate attributes correctly [GH-3194] +* resource/aws_api_gateway_client_certificate: Export `*_date` fields correctly ([#3805](https://github.com/terraform-providers/terraform-provider-aws/issues/3805)) +* resource/aws_cognito_user_pool: Detect `auto_verified_attributes` changes ([#3786](https://github.com/terraform-providers/terraform-provider-aws/issues/3786)) +* resource/aws_cognito_user_pool_client: Fix `callback_urls` updates ([#3404](https://github.com/terraform-providers/terraform-provider-aws/issues/3404)) +* resource/aws_db_instance: Support `incompatible-parameters` and `storage-full` state ([#3708](https://github.com/terraform-providers/terraform-provider-aws/issues/3708)) +* resource/aws_ecs_task_definition: Correctly read `volume` attribute into Terraform state ([#3823](https://github.com/terraform-providers/terraform-provider-aws/issues/3823)) +* resource/aws_kinesis_firehose_delivery_stream: Prevent crash on malformed ID for import ([#3834](https://github.com/terraform-providers/terraform-provider-aws/issues/3834)) +* resource/aws_lambda_function: Only retry IAM eventual consistency errors for one minute ([#3765](https://github.com/terraform-providers/terraform-provider-aws/issues/3765)) +* resource/aws_ssm_association: Prevent AssociationDoesNotExist error ([#3776](https://github.com/terraform-providers/terraform-provider-aws/issues/3776)) +* resource/aws_vpc_endpoint: Prevent perpertual diff in non-standard partitions ([#3317](https://github.com/terraform-providers/terraform-provider-aws/issues/3317)) +* resource/aws_dynamodb_table: Update and validate attributes correctly ([#3194](https://github.com/terraform-providers/terraform-provider-aws/issues/3194)) ## 1.11.0 (March 09, 2018) From ac1aeb664234889ea3b790220b2d4e35032048a8 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Fri, 23 Mar 2018 20:39:48 +0000 Subject: [PATCH 0174/3316] Cleanup after v1.12.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f58fdf8fde..5a02b0c3463 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.13.0 (Unreleased) ## 1.12.0 (March 23, 2018) NOTES: From 03de834dca13a8583858a547b4ae603b63346877 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 23 Mar 2018 16:47:03 -0400 Subject: [PATCH 0175/3316] Lexicographically sort v1.12.0 items --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a02b0c3463..315a9451ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ NOTES: FEATURES: +* **New Resource:** `aws_kms_grant` ([#3038](https://github.com/terraform-providers/terraform-provider-aws/issues/3038)) * **New Resource:** `aws_waf_geo_match_set` ([#3275](https://github.com/terraform-providers/terraform-provider-aws/issues/3275)) * **New Resource:** `aws_wafregional_rule` ([#3756](https://github.com/terraform-providers/terraform-provider-aws/issues/3756)) * **New Resource:** `aws_wafregional_size_constraint_set` ([#3796](https://github.com/terraform-providers/terraform-provider-aws/issues/3796)) @@ -14,13 +15,13 @@ FEATURES: * **New Resource:** `aws_wafregional_web_acl` ([#3754](https://github.com/terraform-providers/terraform-provider-aws/issues/3754)) * **New Resource:** `aws_wafregional_web_acl_association` ([#3755](https://github.com/terraform-providers/terraform-provider-aws/issues/3755)) * **New Resource:** `aws_wafregional_xss_match_set` ([#1014](https://github.com/terraform-providers/terraform-provider-aws/issues/1014)) -* **New Resource:** `aws_kms_grant` ([#3038](https://github.com/terraform-providers/terraform-provider-aws/issues/3038)) ENHANCEMENTS: * provider: Treat IAM policies with account ID principals as equivalent to IAM account root ARN ([#3832](https://github.com/terraform-providers/terraform-provider-aws/issues/3832)) * provider: Treat additional IAM policy scenarios with empty principal trees as equivalent ([#3832](https://github.com/terraform-providers/terraform-provider-aws/issues/3832)) * resource/aws_acm_certificate: Retry on ResourceInUseException during deletion for eventual consistency ([#3868](https://github.com/terraform-providers/terraform-provider-aws/issues/3868)) +* resource/aws_api_gateway_rest_api: Add support for content encoding ([#3642](https://github.com/terraform-providers/terraform-provider-aws/issues/3642)) * resource/aws_autoscaling_group: Add `service_linked_role_arn` argument ([#3812](https://github.com/terraform-providers/terraform-provider-aws/issues/3812)) * resource/aws_cloudfront_distribution: Validate origin `domain_name` and `origin_id` at plan time ([#3767](https://github.com/terraform-providers/terraform-provider-aws/issues/3767)) * resource/aws_eip: Support configurable timeouts ([#3769](https://github.com/terraform-providers/terraform-provider-aws/issues/3769)) @@ -37,7 +38,6 @@ ENHANCEMENTS: * resource/aws_ses_domain_identity: Support trailing period in domain name ([#3840](https://github.com/terraform-providers/terraform-provider-aws/issues/3840)) * resource/aws_sqs_queue: Support lack of ListQueueTags for all non-standard AWS implementations ([#3794](https://github.com/terraform-providers/terraform-provider-aws/issues/3794)) * resource/aws_ssm_document: Add `document_format` argument to support YAML ([#3814](https://github.com/terraform-providers/terraform-provider-aws/issues/3814)) -* resource/aws_api_gateway_rest_api: Add support for content encoding ([#3642](https://github.com/terraform-providers/terraform-provider-aws/issues/3642)) * resource/aws_s3_bucket_object: New `content_base64` argument allows uploading raw binary data created in-memory, rather than reading from disk as with `source`. ([#3788](https://github.com/terraform-providers/terraform-provider-aws/issues/3788)) BUG FIXES: @@ -46,12 +46,12 @@ BUG FIXES: * resource/aws_cognito_user_pool: Detect `auto_verified_attributes` changes ([#3786](https://github.com/terraform-providers/terraform-provider-aws/issues/3786)) * resource/aws_cognito_user_pool_client: Fix `callback_urls` updates ([#3404](https://github.com/terraform-providers/terraform-provider-aws/issues/3404)) * resource/aws_db_instance: Support `incompatible-parameters` and `storage-full` state ([#3708](https://github.com/terraform-providers/terraform-provider-aws/issues/3708)) +* resource/aws_dynamodb_table: Update and validate attributes correctly ([#3194](https://github.com/terraform-providers/terraform-provider-aws/issues/3194)) * resource/aws_ecs_task_definition: Correctly read `volume` attribute into Terraform state ([#3823](https://github.com/terraform-providers/terraform-provider-aws/issues/3823)) * resource/aws_kinesis_firehose_delivery_stream: Prevent crash on malformed ID for import ([#3834](https://github.com/terraform-providers/terraform-provider-aws/issues/3834)) * resource/aws_lambda_function: Only retry IAM eventual consistency errors for one minute ([#3765](https://github.com/terraform-providers/terraform-provider-aws/issues/3765)) * resource/aws_ssm_association: Prevent AssociationDoesNotExist error ([#3776](https://github.com/terraform-providers/terraform-provider-aws/issues/3776)) * resource/aws_vpc_endpoint: Prevent perpertual diff in non-standard partitions ([#3317](https://github.com/terraform-providers/terraform-provider-aws/issues/3317)) -* resource/aws_dynamodb_table: Update and validate attributes correctly ([#3194](https://github.com/terraform-providers/terraform-provider-aws/issues/3194)) ## 1.11.0 (March 09, 2018) From d90c725787afb6a8705aebf2a04e0b1398da6ebb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 23 Mar 2018 16:55:33 -0400 Subject: [PATCH 0176/3316] docs/resource/aws_waf_rule: Fix broken links --- website/docs/r/waf_rule.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/waf_rule.html.markdown b/website/docs/r/waf_rule.html.markdown index 8876b8c849b..7c3eef74ddc 100644 --- a/website/docs/r/waf_rule.html.markdown +++ b/website/docs/r/waf_rule.html.markdown @@ -50,7 +50,7 @@ The following arguments are supported: #### Arguments * `negated` - (Required) Set this to `false` if you want to allow, block, or count requests - based on the settings in the specified [waf_byte_match_set](/docs/providers/aws/r/waf_byte_match_set.html), [waf_ipset](/docs/providers/aws/r/waf_ipset.html), [aws_waf_size_constraint_set](/docs/providers/aws/r/aws_waf_size_constraint_set.html), [aws_waf_sql_injection_match_set](/docs/providers/aws/r/aws_waf_sql_injection_match_set.html) or [aws_waf_xss_match_set](/docs/providers/aws/r/aws_waf_xss_match_set.html). + based on the settings in the specified [waf_byte_match_set](/docs/providers/aws/r/waf_byte_match_set.html), [waf_ipset](/docs/providers/aws/r/waf_ipset.html), [aws_waf_size_constraint_set](/docs/providers/aws/r/waf_size_constraint_set.html), [aws_waf_sql_injection_match_set](/docs/providers/aws/r/waf_sql_injection_match_set.html) or [aws_waf_xss_match_set](/docs/providers/aws/r/waf_xss_match_set.html). For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address. If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses _except_ `192.0.2.44`. * `data_id` - (Required) A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID. From 980784ab9f7f20b5b477216a3c89a8565e5818db Mon Sep 17 00:00:00 2001 From: Lucid Programmer Date: Sat, 24 Mar 2018 02:34:27 +0000 Subject: [PATCH 0177/3316] updated docs --- website/docs/r/appsync_api_key.html.markdown | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/docs/r/appsync_api_key.html.markdown b/website/docs/r/appsync_api_key.html.markdown index cc569a9c35a..b3483b0acba 100644 --- a/website/docs/r/appsync_api_key.html.markdown +++ b/website/docs/r/appsync_api_key.html.markdown @@ -31,10 +31,9 @@ resource "aws_appsync_api_key" "partner" { The following arguments are supported: -* `appsync_api_id` - (Required) The ID of the associated AppSync API +* `api_id` - (Required) The ID of the associated AppSync API * `description` - (Optional) The API key description. Defaults to "Managed by Terraform". -* `validity_period_days` - (Optional) The number of days of validity from date of creation, (aws supports less than 365 days). By default, it is 7 days. -* `valid_till_date` - (Optional) The date till the key should be valid, use the format dd/mm/yyyy. +* `expires` - (Optional) RFC3339 string representation of the expiry date. By default, it is 7 days from the date of creation. ## Attributes Reference From 4ace375f13dbe072c0fedcc5060bf4cffe6a37d7 Mon Sep 17 00:00:00 2001 From: Lucid Programmer Date: Sat, 24 Mar 2018 04:16:14 +0000 Subject: [PATCH 0178/3316] expires example --- website/docs/r/appsync_api_key.html.markdown | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/website/docs/r/appsync_api_key.html.markdown b/website/docs/r/appsync_api_key.html.markdown index b3483b0acba..7a6c5505f1f 100644 --- a/website/docs/r/appsync_api_key.html.markdown +++ b/website/docs/r/appsync_api_key.html.markdown @@ -18,13 +18,10 @@ resource "aws_appsync_graphql_api" "example" { name = "example" } resource "aws_appsync_api_key" "self" { - appsync_api_id = "${aws_appsync_graphql_api.example.id}" - validity_period_days = 364 -} -resource "aws_appsync_api_key" "partner" { - appsync_api_id = "${aws_appsync_graphql_api.example.id}" - valid_till_date = "30/11/2018" + api_id = "${aws_appsync_graphql_api.example.id}" + expires = "2018-05-03T04:21:15+01:00" } + ``` ## Argument Reference From 76d141de9243f239545fa2afd19e54f84813f831 Mon Sep 17 00:00:00 2001 From: Lucid Programmer Date: Sat, 24 Mar 2018 04:19:52 +0000 Subject: [PATCH 0179/3316] id attribute format in docs --- website/docs/r/appsync_api_key.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/appsync_api_key.html.markdown b/website/docs/r/appsync_api_key.html.markdown index 7a6c5505f1f..86b016f1ce2 100644 --- a/website/docs/r/appsync_api_key.html.markdown +++ b/website/docs/r/appsync_api_key.html.markdown @@ -37,5 +37,5 @@ The following arguments are supported: The following attributes are exported: -* `id` - API ID +* `id` - API Key ID (Formatted as ApiId:Key) * `key` - The API key From 0c0ceb21da3e1f5f149b895b2a33d6189223aa53 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 24 Mar 2018 15:56:25 +0900 Subject: [PATCH 0180/3316] deps: Bump aws-sdk-go@v1.13.20 --- .../aws/aws-sdk-go/aws/client/client.go | 6 + .../github.com/aws/aws-sdk-go/aws/config.go | 3 + .../aws/aws-sdk-go/aws/endpoints/decode.go | 45 - .../aws/aws-sdk-go/aws/endpoints/defaults.go | 15 +- .../aws/aws-sdk-go/aws/endpoints/endpoints.go | 4 + .../aws/aws-sdk-go/aws/endpoints/v3model.go | 12 +- .../aws/aws-sdk-go/aws/session/session.go | 22 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../service/applicationautoscaling/service.go | 6 +- .../aws/aws-sdk-go/service/appsync/service.go | 6 +- .../service/cloudwatchevents/api.go | 36 +- .../aws/aws-sdk-go/service/codebuild/api.go | 244 ++++- .../aws/aws-sdk-go/service/codebuild/doc.go | 2 + .../aws-sdk-go/service/configservice/api.go | 386 +++++++- .../aws/aws-sdk-go/service/ecs/api.go | 201 +++- .../service/elasticbeanstalk/api.go | 247 ++++- .../service/elasticbeanstalk/errors.go | 2 +- .../aws/aws-sdk-go/service/glue/api.go | 18 +- .../aws-sdk-go/service/guardduty/service.go | 6 +- .../aws/aws-sdk-go/service/iot/service.go | 6 +- .../lexmodelbuildingservice/service.go | 6 +- .../service/mediaconvert/service.go | 6 +- .../aws/aws-sdk-go/service/medialive/api.go | 413 +++++++- .../aws-sdk-go/service/medialive/service.go | 6 +- .../service/mediapackage/service.go | 6 +- .../aws-sdk-go/service/mediastore/service.go | 6 +- .../service/mediastoredata/service.go | 6 +- .../aws/aws-sdk-go/service/mq/service.go | 6 +- .../aws/aws-sdk-go/service/rds/api.go | 12 +- .../aws-sdk-go/service/s3/customizations.go | 7 +- .../aws-sdk-go/service/sagemaker/service.go | 6 +- .../aws/aws-sdk-go/service/ses/service.go | 6 +- vendor/vendor.json | 930 +++++++++--------- 33 files changed, 2039 insertions(+), 646 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 788fe6e279b..3271a18e80e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -15,6 +15,12 @@ type Config struct { Endpoint string SigningRegion string SigningName string + + // States that the signing name did not come from a modeled source but + // was derived based on other data. Used by service client constructors + // to determine if the signin name can be overriden based on metadata the + // service has. + SigningNameDerived bool } // ConfigProvider provides a generic way for a service client to receive diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index 2b162251694..5421b5d4e9b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -151,6 +151,9 @@ type Config struct { // with accelerate. S3UseAccelerate *bool + // S3DisableContentMD5Validation config option is temporarily disabled, + // For S3 GetObject API calls, #1837. + // // Set this to `true` to disable the S3 service client from automatically // adding the ContentMD5 to S3 Object Put and Upload API calls. This option // will also disable the SDK from performing object ContentMD5 validation diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go index 83505ad1bcf..74f72de0735 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "io" - "os" "github.com/aws/aws-sdk-go/aws/awserr" ) @@ -85,35 +84,11 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol custAddEC2Metadata(p) custAddS3DualStack(p) custRmIotDataService(p) - - custFixCloudHSMv2SigningName(p) - custFixRuntimeSagemakerSigningName(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 @@ -147,26 +122,6 @@ func custRmIotDataService(p *partition) { delete(p.Services, "data.iot") } -func custFixRuntimeSagemakerSigningName(p *partition) { - // Workaround for aws/aws-sdk-go#1836 - - s, ok := p.Services["runtime.sagemaker"] - if !ok { - return - } - - if len(s.Defaults.CredentialScope.Service) != 0 { - fmt.Fprintf(os.Stderr, "runtime.sagemaker signing name already set, ignoring override.\n") - // If the value is already set don't override - return - } - - s.Defaults.CredentialScope.Service = "sagemaker" - fmt.Fprintf(os.Stderr, "sagemaker signing name not set, overriding.\n") - - p.Services["runtime.sagemaker"] = s -} - type decodeModelError struct { awsError } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 17a3c01499f..44678a2e52f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -1002,6 +1002,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1422,12 +1423,17 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1447,11 +1453,13 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1715,11 +1723,7 @@ var awsPartition = partition{ }, }, "runtime.sagemaker": service{ - Defaults: endpoint{ - CredentialScope: credentialScope{ - Service: "sagemaker", - }, - }, + Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, @@ -1907,6 +1911,7 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index 9c3eedb48d5..d6be83c1921 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -347,6 +347,10 @@ type ResolvedEndpoint struct { // The service name that should be used for signing requests. SigningName string + // States that the signing name for this endpoint was derived from metadata + // passed in, but was not explicitly modeled. + SigningNameDerived bool + // The signing method that should be used for signing requests. SigningMethod string } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go index 13d968a249e..ff6f76db6eb 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go @@ -226,16 +226,20 @@ func (e endpoint) resolve(service, region, dnsSuffix string, defs []endpoint, op if len(signingRegion) == 0 { signingRegion = region } + signingName := e.CredentialScope.Service + var signingNameDerived bool if len(signingName) == 0 { signingName = service + signingNameDerived = true } return ResolvedEndpoint{ - URL: u, - SigningRegion: signingRegion, - SigningName: signingName, - SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), + URL: u, + SigningRegion: signingRegion, + SigningName: signingName, + SigningNameDerived: signingNameDerived, + SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 4bf7a155849..259b5c0fecc 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -571,11 +571,12 @@ func (s *Session) clientConfigWithErr(serviceName string, cfgs ...*aws.Config) ( } return client.Config{ - Config: s.Config, - Handlers: s.Handlers, - Endpoint: resolved.URL, - SigningRegion: resolved.SigningRegion, - SigningName: resolved.SigningName, + Config: s.Config, + Handlers: s.Handlers, + Endpoint: resolved.URL, + SigningRegion: resolved.SigningRegion, + SigningNameDerived: resolved.SigningNameDerived, + SigningName: resolved.SigningName, }, err } @@ -595,10 +596,11 @@ func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Conf } return client.Config{ - Config: s.Config, - Handlers: s.Handlers, - Endpoint: resolved.URL, - SigningRegion: resolved.SigningRegion, - SigningName: resolved.SigningName, + Config: s.Config, + Handlers: s.Handlers, + Endpoint: resolved.URL, + SigningRegion: resolved.SigningRegion, + SigningNameDerived: resolved.SigningNameDerived, + SigningName: resolved.SigningName, } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 5ff5b287b26..68002110547 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.15" +const SDKVersion = "1.13.20" diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go index 56103ee27ec..909c1b80e8d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go @@ -45,14 +45,14 @@ const ( // svc := applicationautoscaling.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApplicationAutoScaling { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "application-autoscaling" + } 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) *ApplicationAutoScaling { - if len(signingName) == 0 { - signingName = "application-autoscaling" - } svc := &ApplicationAutoScaling{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go index cdc4698e8e4..6af2be6d9a8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go @@ -45,14 +45,14 @@ const ( // svc := appsync.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *AppSync { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "appsync" + } return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) } // newClient creates, initializes and returns a new service client instance. func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *AppSync { - if len(signingName) == 0 { - signingName = "appsync" - } svc := &AppSync{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 0a933b7474e..0bd8f97bb60 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -1054,7 +1054,7 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // // * Amazon SNS topics // -// * Amazon SQS queues +// * Amazon SQS queues, including FIFO queues // // * The default event bus of another AWS account // @@ -3275,6 +3275,31 @@ func (s *RunCommandTarget) SetValues(v []*string) *RunCommandTarget { return s } +// This structure includes the custom parameter to be used when the target is +// an SQS FIFO queue. +type SqsParameters struct { + _ struct{} `type:"structure"` + + // The FIFO message group ID to use as the target. + MessageGroupId *string `type:"string"` +} + +// String returns the string representation +func (s SqsParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SqsParameters) GoString() string { + return s.String() +} + +// SetMessageGroupId sets the MessageGroupId field's value. +func (s *SqsParameters) SetMessageGroupId(v string) *SqsParameters { + s.MessageGroupId = &v + return s +} + // Targets are the resources to be invoked when a rule is triggered. Target // types include EC2 instances, AWS Lambda functions, Amazon Kinesis streams, // Amazon ECS tasks, AWS Step Functions state machines, Run Command, and built-in @@ -3331,6 +3356,9 @@ type Target struct { // Parameters used when you are using the rule to invoke Amazon EC2 Run Command. RunCommandParameters *RunCommandParameters `type:"structure"` + + // Contains the message group ID to use when the target is a FIFO queue. + SqsParameters *SqsParameters `type:"structure"` } // String returns the string representation @@ -3453,6 +3481,12 @@ func (s *Target) SetRunCommandParameters(v *RunCommandParameters) *Target { return s } +// SetSqsParameters sets the SqsParameters field's value. +func (s *Target) SetSqsParameters(v *SqsParameters) *Target { + s.SqsParameters = v + return s +} + type TestEventPatternInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 433c34bfff3..3beb528addc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -1247,6 +1247,91 @@ func (c *CodeBuild) UpdateProjectWithContext(ctx aws.Context, input *UpdateProje return out, req.Send() } +const opUpdateWebhook = "UpdateWebhook" + +// UpdateWebhookRequest generates a "aws/request.Request" representing the +// client's request for the UpdateWebhook operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateWebhook for more information on using the UpdateWebhook +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateWebhookRequest method. +// req, resp := client.UpdateWebhookRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateWebhook +func (c *CodeBuild) UpdateWebhookRequest(input *UpdateWebhookInput) (req *request.Request, output *UpdateWebhookOutput) { + op := &request.Operation{ + Name: opUpdateWebhook, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateWebhookInput{} + } + + output = &UpdateWebhookOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateWebhook API operation for AWS CodeBuild. +// +// Updates the webhook associated with an AWS CodeBuild build project. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeBuild's +// API operation UpdateWebhook for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The input value that was provided is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified AWS resource cannot be found. +// +// * ErrCodeOAuthProviderException "OAuthProviderException" +// There was a problem with the underlying OAuth provider. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/UpdateWebhook +func (c *CodeBuild) UpdateWebhook(input *UpdateWebhookInput) (*UpdateWebhookOutput, error) { + req, out := c.UpdateWebhookRequest(input) + return out, req.Send() +} + +// UpdateWebhookWithContext is the same as UpdateWebhook with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateWebhook for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeBuild) UpdateWebhookWithContext(ctx aws.Context, input *UpdateWebhookInput, opts ...request.Option) (*UpdateWebhookOutput, error) { + req, out := c.UpdateWebhookRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type BatchDeleteBuildsInput struct { _ struct{} `type:"structure"` @@ -1531,7 +1616,7 @@ type Build struct { // about any current build phase that is not yet complete. Phases []*BuildPhase `locationName:"phases" type:"list"` - // The name of the build project. + // The name of the AWS CodeBuild project. ProjectName *string `locationName:"projectName" min:"1" type:"string"` // Information about the source code to be built. @@ -2107,7 +2192,13 @@ func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { type CreateWebhookInput struct { _ struct{} `type:"structure"` - // The name of the build project. + // A regular expression used to determine which branches in a repository are + // built when a webhook is triggered. If the name of a branch matches the regular + // expression, then it is built. If it doesn't match, then it is not. If branchFilter + // is empty, then all branches are built. + BranchFilter *string `locationName:"branchFilter" type:"string"` + + // The name of the AWS CodeBuild project. // // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` @@ -2139,6 +2230,12 @@ func (s *CreateWebhookInput) Validate() error { return nil } +// SetBranchFilter sets the BranchFilter field's value. +func (s *CreateWebhookInput) SetBranchFilter(v string) *CreateWebhookInput { + s.BranchFilter = &v + return s +} + // SetProjectName sets the ProjectName field's value. func (s *CreateWebhookInput) SetProjectName(v string) *CreateWebhookInput { s.ProjectName = &v @@ -2227,7 +2324,7 @@ func (s DeleteProjectOutput) GoString() string { type DeleteWebhookInput struct { _ struct{} `type:"structure"` - // The name of the build project. + // The name of the AWS CodeBuild project. // // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` @@ -2467,7 +2564,8 @@ func (s *EnvironmentVariable) SetValue(v string) *EnvironmentVariable { type InvalidateProjectCacheInput struct { _ struct{} `type:"structure"` - // The name of the build project that the cache will be reset for. + // The name of the AWS CodeBuild build project that the cache will be reset + // for. // // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` @@ -2530,7 +2628,7 @@ type ListBuildsForProjectInput struct { // until no more next tokens are returned. NextToken *string `locationName:"nextToken" type:"string"` - // The name of the build project. + // The name of the AWS CodeBuild project. // // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` @@ -3414,17 +3512,15 @@ type ProjectEnvironment struct { // Image is a required field Image *string `locationName:"image" min:"1" type:"string" required:"true"` - // If set to true, enables running the Docker daemon inside a Docker container; - // otherwise, false or not specified (the default). This value must be set to - // true only if this build project will be used to build Docker images, and - // the specified build environment image is not one provided by AWS CodeBuild - // with Docker support. Otherwise, all associated builds that attempt to interact - // with the Docker daemon will fail. Note that you must also start the Docker - // daemon so that your builds can interact with it as needed. One way to do - // this is to initialize the Docker daemon in the install phase of your build - // spec by running the following build commands. (Do not run the following build - // commands if the specified build environment image is provided by AWS CodeBuild - // with Docker support.) + // Enables running the Docker daemon inside a Docker container. Set to true + // only if the build project is be used to build Docker images, and the specified + // build environment image is not provided by AWS CodeBuild with Docker support. + // Otherwise, all associated builds that attempt to interact with the Docker + // daemon will fail. Note that you must also start the Docker daemon so that + // builds can interact with it. One way to do this is to initialize the Docker + // daemon during the install phase of your build spec by running the following + // build commands. (Do not run the following build commands if the specified + // build environment image is provided by AWS CodeBuild with Docker support.) // // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 // --storage-driver=overlay& - timeout -t 15 sh -c "until docker info; do echo @@ -3737,7 +3833,7 @@ type StartBuildInput struct { // 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. + // The name of the AWS CodeBuild build project to start running a build. // // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` @@ -4215,6 +4311,93 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { return s } +type UpdateWebhookInput struct { + _ struct{} `type:"structure"` + + // A regular expression used to determine which branches in a repository are + // built when a webhook is triggered. If the name of a branch matches the regular + // expression, then it is built. If it doesn't match, then it is not. If branchFilter + // is empty, then all branches are built. + BranchFilter *string `locationName:"branchFilter" type:"string"` + + // The name of the AWS CodeBuild project. + // + // ProjectName is a required field + ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` + + // A boolean value that specifies whether the associated repository's secret + // token should be updated. + RotateSecret *bool `locationName:"rotateSecret" type:"boolean"` +} + +// String returns the string representation +func (s UpdateWebhookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateWebhookInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateWebhookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateWebhookInput"} + if s.ProjectName == nil { + invalidParams.Add(request.NewErrParamRequired("ProjectName")) + } + if s.ProjectName != nil && len(*s.ProjectName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("ProjectName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBranchFilter sets the BranchFilter field's value. +func (s *UpdateWebhookInput) SetBranchFilter(v string) *UpdateWebhookInput { + s.BranchFilter = &v + return s +} + +// SetProjectName sets the ProjectName field's value. +func (s *UpdateWebhookInput) SetProjectName(v string) *UpdateWebhookInput { + s.ProjectName = &v + return s +} + +// SetRotateSecret sets the RotateSecret field's value. +func (s *UpdateWebhookInput) SetRotateSecret(v bool) *UpdateWebhookInput { + s.RotateSecret = &v + return s +} + +type UpdateWebhookOutput struct { + _ struct{} `type:"structure"` + + // Information about a repository's webhook that is associated with a project + // in AWS CodeBuild. + Webhook *Webhook `locationName:"webhook" type:"structure"` +} + +// String returns the string representation +func (s UpdateWebhookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateWebhookOutput) GoString() string { + return s.String() +} + +// SetWebhook sets the Webhook field's value. +func (s *UpdateWebhookOutput) SetWebhook(v *Webhook) *UpdateWebhookOutput { + s.Webhook = v + return s +} + // Information about the VPC configuration that AWS CodeBuild will access. type VpcConfig struct { _ struct{} `type:"structure"` @@ -4275,12 +4458,19 @@ func (s *VpcConfig) SetVpcId(v string) *VpcConfig { type Webhook struct { _ struct{} `type:"structure"` - // This is the server endpoint that will receive the webhook payload. + // A regular expression used to determine which branches in a repository are + // built when a webhook is triggered. If the name of a branch matches the regular + // expression, then it is built. If it doesn't match, then it is not. If branchFilter + // is empty, then all branches are built. + BranchFilter *string `locationName:"branchFilter" type:"string"` + + // A timestamp indicating the last time a repository's secret token was modified. + LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp" timestampFormat:"unix"` + + // The CodeBuild endpoint where webhook events are sent. 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. + // The secret token of the associated repository. Secret *string `locationName:"secret" min:"1" type:"string"` // The URL to the webhook. @@ -4297,6 +4487,18 @@ func (s Webhook) GoString() string { return s.String() } +// SetBranchFilter sets the BranchFilter field's value. +func (s *Webhook) SetBranchFilter(v string) *Webhook { + s.BranchFilter = &v + return s +} + +// SetLastModifiedSecret sets the LastModifiedSecret field's value. +func (s *Webhook) SetLastModifiedSecret(v time.Time) *Webhook { + s.LastModifiedSecret = &v + return s +} + // SetPayloadUrl sets the PayloadUrl field's value. func (s *Webhook) SetPayloadUrl(v string) *Webhook { s.PayloadUrl = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go index 5bab7179bba..91c473e1dfd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go @@ -33,6 +33,8 @@ // begin automatically rebuilding the source code every time a code change // is pushed to the repository. // +// * UpdateWebhook: Changes the settings of an existing webhook. +// // * DeleteProject: Deletes a build project. // // * DeleteWebhook: For an existing AWS CodeBuild build project that has diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index 7348923f3df..d12bd418f82 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -13,6 +13,97 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opBatchGetResourceConfig = "BatchGetResourceConfig" + +// BatchGetResourceConfigRequest generates a "aws/request.Request" representing the +// client's request for the BatchGetResourceConfig operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchGetResourceConfig for more information on using the BatchGetResourceConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchGetResourceConfigRequest method. +// req, resp := client.BatchGetResourceConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetResourceConfig +func (c *ConfigService) BatchGetResourceConfigRequest(input *BatchGetResourceConfigInput) (req *request.Request, output *BatchGetResourceConfigOutput) { + op := &request.Operation{ + Name: opBatchGetResourceConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchGetResourceConfigInput{} + } + + output = &BatchGetResourceConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchGetResourceConfig API operation for AWS Config. +// +// Returns the current configuration for one or more requested resources. The +// operation also returns a list of resources that are not processed in the +// current request. If there are no unprocessed resources, the operation returns +// an empty unprocessedResourceKeys list. +// +// The API does not return results for deleted resources. +// +// The API does not return any tags for the requested resources. This information +// is filtered out of the supplementaryConfiguration section of the API response. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation BatchGetResourceConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. +// +// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" +// There are no configuration recorders available to provide the role needed +// to describe your resources. Create a configuration recorder. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetResourceConfig +func (c *ConfigService) BatchGetResourceConfig(input *BatchGetResourceConfigInput) (*BatchGetResourceConfigOutput, error) { + req, out := c.BatchGetResourceConfigRequest(input) + return out, req.Send() +} + +// BatchGetResourceConfigWithContext is the same as BatchGetResourceConfig with the addition of +// the ability to pass a context and additional request options. +// +// See BatchGetResourceConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) BatchGetResourceConfigWithContext(ctx aws.Context, input *BatchGetResourceConfigInput, opts ...request.Option) (*BatchGetResourceConfigOutput, error) { + req, out := c.BatchGetResourceConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteConfigRule = "DeleteConfigRule" // DeleteConfigRuleRequest generates a "aws/request.Request" representing the @@ -2639,6 +2730,237 @@ func (c *ConfigService) StopConfigurationRecorderWithContext(ctx aws.Context, in return out, req.Send() } +// The detailed configuration of a specified resource. +type BaseConfigurationItem struct { + _ struct{} `type:"structure"` + + // The 12 digit AWS account ID associated with the resource. + AccountId *string `locationName:"accountId" type:"string"` + + // The Amazon Resource Name (ARN) of the resource. + Arn *string `locationName:"arn" type:"string"` + + // The Availability Zone associated with the resource. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The region where the resource resides. + AwsRegion *string `locationName:"awsRegion" type:"string"` + + // The description of the resource configuration. + Configuration *string `locationName:"configuration" type:"string"` + + // The time when the configuration recording was initiated. + ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp" timestampFormat:"unix"` + + // The configuration item status. + ConfigurationItemStatus *string `locationName:"configurationItemStatus" type:"string" enum:"ConfigurationItemStatus"` + + // An identifier that indicates the ordering of the configuration items of a + // resource. + ConfigurationStateId *string `locationName:"configurationStateId" type:"string"` + + // The time stamp when the resource was created. + ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp" timestampFormat:"unix"` + + // The ID of the resource (for example., sg-xxxxxx). + ResourceId *string `locationName:"resourceId" type:"string"` + + // The custom name of the resource, if available. + ResourceName *string `locationName:"resourceName" type:"string"` + + // The type of AWS resource. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // Configuration attributes that AWS Config returns for certain resource types + // to supplement the information returned for the configuration parameter. + SupplementaryConfiguration map[string]*string `locationName:"supplementaryConfiguration" type:"map"` + + // The version number of the resource configuration. + Version *string `locationName:"version" type:"string"` +} + +// String returns the string representation +func (s BaseConfigurationItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaseConfigurationItem) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *BaseConfigurationItem) SetAccountId(v string) *BaseConfigurationItem { + s.AccountId = &v + return s +} + +// SetArn sets the Arn field's value. +func (s *BaseConfigurationItem) SetArn(v string) *BaseConfigurationItem { + s.Arn = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *BaseConfigurationItem) SetAvailabilityZone(v string) *BaseConfigurationItem { + s.AvailabilityZone = &v + return s +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *BaseConfigurationItem) SetAwsRegion(v string) *BaseConfigurationItem { + s.AwsRegion = &v + return s +} + +// SetConfiguration sets the Configuration field's value. +func (s *BaseConfigurationItem) SetConfiguration(v string) *BaseConfigurationItem { + s.Configuration = &v + return s +} + +// SetConfigurationItemCaptureTime sets the ConfigurationItemCaptureTime field's value. +func (s *BaseConfigurationItem) SetConfigurationItemCaptureTime(v time.Time) *BaseConfigurationItem { + s.ConfigurationItemCaptureTime = &v + return s +} + +// SetConfigurationItemStatus sets the ConfigurationItemStatus field's value. +func (s *BaseConfigurationItem) SetConfigurationItemStatus(v string) *BaseConfigurationItem { + s.ConfigurationItemStatus = &v + return s +} + +// SetConfigurationStateId sets the ConfigurationStateId field's value. +func (s *BaseConfigurationItem) SetConfigurationStateId(v string) *BaseConfigurationItem { + s.ConfigurationStateId = &v + return s +} + +// SetResourceCreationTime sets the ResourceCreationTime field's value. +func (s *BaseConfigurationItem) SetResourceCreationTime(v time.Time) *BaseConfigurationItem { + s.ResourceCreationTime = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *BaseConfigurationItem) SetResourceId(v string) *BaseConfigurationItem { + s.ResourceId = &v + return s +} + +// SetResourceName sets the ResourceName field's value. +func (s *BaseConfigurationItem) SetResourceName(v string) *BaseConfigurationItem { + s.ResourceName = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *BaseConfigurationItem) SetResourceType(v string) *BaseConfigurationItem { + s.ResourceType = &v + return s +} + +// SetSupplementaryConfiguration sets the SupplementaryConfiguration field's value. +func (s *BaseConfigurationItem) SetSupplementaryConfiguration(v map[string]*string) *BaseConfigurationItem { + s.SupplementaryConfiguration = v + return s +} + +// SetVersion sets the Version field's value. +func (s *BaseConfigurationItem) SetVersion(v string) *BaseConfigurationItem { + s.Version = &v + return s +} + +type BatchGetResourceConfigInput struct { + _ struct{} `type:"structure"` + + // A list of resource keys to be processed with the current request. Each element + // in the list consists of the resource type and resource ID. + // + // ResourceKeys is a required field + ResourceKeys []*ResourceKey `locationName:"resourceKeys" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchGetResourceConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetResourceConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetResourceConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetResourceConfigInput"} + if s.ResourceKeys == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceKeys")) + } + if s.ResourceKeys != nil && len(s.ResourceKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceKeys", 1)) + } + if s.ResourceKeys != nil { + for i, v := range s.ResourceKeys { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceKeys", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceKeys sets the ResourceKeys field's value. +func (s *BatchGetResourceConfigInput) SetResourceKeys(v []*ResourceKey) *BatchGetResourceConfigInput { + s.ResourceKeys = v + return s +} + +type BatchGetResourceConfigOutput struct { + _ struct{} `type:"structure"` + + // A list that contains the current configuration of one or more resources. + BaseConfigurationItems []*BaseConfigurationItem `locationName:"baseConfigurationItems" type:"list"` + + // A list of resource keys that were not processed with the current response. + // The unprocessesResourceKeys value is in the same form as ResourceKeys, so + // the value can be directly provided to a subsequent BatchGetResourceConfig + // operation. If there are no unprocessed resource keys, the response contains + // an empty unprocessedResourceKeys list. + UnprocessedResourceKeys []*ResourceKey `locationName:"unprocessedResourceKeys" min:"1" type:"list"` +} + +// String returns the string representation +func (s BatchGetResourceConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetResourceConfigOutput) GoString() string { + return s.String() +} + +// SetBaseConfigurationItems sets the BaseConfigurationItems field's value. +func (s *BatchGetResourceConfigOutput) SetBaseConfigurationItems(v []*BaseConfigurationItem) *BatchGetResourceConfigOutput { + s.BaseConfigurationItems = v + return s +} + +// SetUnprocessedResourceKeys sets the UnprocessedResourceKeys field's value. +func (s *BatchGetResourceConfigOutput) SetUnprocessedResourceKeys(v []*ResourceKey) *BatchGetResourceConfigOutput { + s.UnprocessedResourceKeys = v + return s +} + // Indicates whether an AWS resource or AWS Config rule is compliant and provides // the number of contributors that affect the compliance. type Compliance struct { @@ -4231,7 +4553,7 @@ type DescribeComplianceByResourceInput struct { // Filters the results by compliance. // - // The allowed values are COMPLIANT, NON_COMPLIANT, and INSUFFICIENT_DATA. + // The allowed values are COMPLIANT and NON_COMPLIANT. ComplianceTypes []*string `type:"list"` // The maximum number of evaluation results returned on each page. The default @@ -6154,6 +6476,60 @@ func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier { return s } +// The details that identify a resource within AWS Config, including the resource +// type and resource ID. +type ResourceKey struct { + _ struct{} `type:"structure"` + + // The ID of the resource (for example., sg-xxxxxx). + // + // ResourceId is a required field + ResourceId *string `locationName:"resourceId" type:"string" required:"true"` + + // The resource type. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" type:"string" required:"true" enum:"ResourceType"` +} + +// String returns the string representation +func (s ResourceKey) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceKey) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceKey) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceKey"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *ResourceKey) SetResourceId(v string) *ResourceKey { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ResourceKey) SetResourceType(v string) *ResourceKey { + s.ResourceType = &v + return s +} + // Defines which resources trigger an evaluation for an AWS Config rule. The // scope can include one or more resource types, a combination of a tag key // and value, or a combination of one resource type and one resource ID. Specify @@ -6327,6 +6703,11 @@ type SourceDetail struct { // By default, rules with a periodic trigger are evaluated every 24 hours. To // change the frequency, specify a valid value for the MaximumExecutionFrequency // parameter. + // + // Based on the valid value you choose, AWS Config runs evaluations once for + // each valid value. For example, if you choose Three_Hours, AWS Config runs + // evaluations once every three hours. In this case, Three_Hours is the frequency + // of this rule. MaximumExecutionFrequency *string `type:"string" enum:"MaximumExecutionFrequency"` // The type of notification that triggers AWS Config to run an evaluation for @@ -6347,7 +6728,8 @@ type SourceDetail struct { // when AWS Config delivers a configuration snapshot. // // If you want your custom rule to be triggered by configuration changes, specify - // both ConfigurationItemChangeNotification and OversizedConfigurationItemChangeNotification. + // two SourceDetail objects, one for ConfigurationItemChangeNotification and + // one for OversizedConfigurationItemChangeNotification. MessageType *string `type:"string" enum:"MessageType"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 6f7d523e239..8d8d3bff80d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -3439,8 +3439,17 @@ func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Requ // in a service by specifying the cluster that the service is running in and // a new desiredCount parameter. // -// You can use UpdateService to modify your task definition and deploy a new -// version of your service. +// If you have updated the Docker image of your application, you can create +// a new task definition with that image and deploy it to your service. The +// service scheduler uses the minimum healthy percent and maximum percent parameters +// (in the service's deployment configuration) to determine the deployment strategy. +// +// If your updated Docker image uses the same tag as what is in the existing +// task definition for your service (for example, my_image:latest), you do not +// need to create a new revision of your task definition. You can update the +// service using the forceNewDeployment option. The new tasks launched by the +// deployment pull the current image/tag combination from your repository when +// they start. // // You can also update the deployment configuration of a service. When a deployment // is triggered by updating the task definition of a service, the service scheduler @@ -3754,10 +3763,12 @@ type AwsVpcConfiguration struct { AssignPublicIp *string `locationName:"assignPublicIp" type:"string" enum:"AssignPublicIp"` // The security groups associated with the task or service. If you do not specify - // a security group, the default security group for the VPC is used. + // a security group, the default security group for the VPC is used. There is + // a limit of 5 security groups able to be specified per AwsVpcConfiguration. SecurityGroups []*string `locationName:"securityGroups" type:"list"` - // The subnets associated with the task or service. + // The subnets associated with the task or service. There is a limit of 10 subnets + // able to be specified per AwsVpcConfiguration. // // Subnets is a required field Subnets []*string `locationName:"subnets" type:"list" required:"true"` @@ -4686,18 +4697,22 @@ type ContainerInstance struct { // The Unix time stamp for when the container instance was registered. RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" timestampFormat:"unix"` - // For most resource types, this parameter describes the registered resources - // on the container instance that are in use by current tasks. For port resource - // types, this parameter describes the ports that were reserved by the Amazon - // ECS container agent when it registered the container instance with Amazon - // ECS. + // For CPU and memory resource types, this parameter describes the amount of + // each resource that was available on the container instance when the container + // agent registered it with Amazon ECS; this value represents the total amount + // of CPU and memory that can be allocated on this container instance to tasks. + // For port resource types, this parameter describes the ports that were reserved + // by the Amazon ECS container agent when it registered the container instance + // with Amazon ECS. RegisteredResources []*Resource `locationName:"registeredResources" type:"list"` - // For most resource types, this parameter describes the remaining resources - // of the container instance that are available for new tasks. For port resource - // types, this parameter describes the ports that are reserved by the Amazon - // ECS container agent and any containers that have reserved port mappings; - // any port that is not specified here is available for new tasks. + // For CPU and memory resource types, this parameter describes the remaining + // CPU and memory on the that has not already been allocated to tasks (and is + // therefore available for new tasks). For port resource types, this parameter + // describes the ports that were reserved by the Amazon ECS container agent + // (at instance registration time) and any task containers that have reserved + // port mappings on the host (with the host or bridge network mode). Any port + // that is not specified here is available for new tasks. RemainingResources []*Resource `locationName:"remainingResources" type:"list"` // The number of tasks on the container instance that are in the RUNNING status. @@ -5114,6 +5129,10 @@ type CreateServiceInput struct { // ServiceName is a required field ServiceName *string `locationName:"serviceName" type:"string" required:"true"` + // The details of the service discovery registries you want to assign to this + // service. For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguideservice-discovery.html). + ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"` + // The family and revision (family:revision) or full ARN of the task definition // to run in your service. If a revision is not specified, the latest ACTIVE // revision is used. @@ -5234,6 +5253,12 @@ func (s *CreateServiceInput) SetServiceName(v string) *CreateServiceInput { return s } +// SetServiceRegistries sets the ServiceRegistries field's value. +func (s *CreateServiceInput) SetServiceRegistries(v []*ServiceRegistry) *CreateServiceInput { + s.ServiceRegistries = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *CreateServiceInput) SetTaskDefinition(v string) *CreateServiceInput { s.TaskDefinition = &v @@ -6663,6 +6688,14 @@ type LinuxParameters struct { // container instance, log in to your container instance and run the following // command: sudo docker version | grep "Server API version" InitProcessEnabled *bool `locationName:"initProcessEnabled" type:"boolean"` + + // The value for the size of the /dev/shm volume. This parameter maps to the + // --shm-size option to docker run (https://docs.docker.com/engine/reference/run/). + SharedMemorySize *int64 `locationName:"sharedMemorySize" type:"integer"` + + // The container path, mount options, and size of the tmpfs mount. This parameter + // maps to the --tmpfs option to docker run (https://docs.docker.com/engine/reference/run/). + Tmpfs []*Tmpfs `locationName:"tmpfs" type:"list"` } // String returns the string representation @@ -6688,6 +6721,16 @@ func (s *LinuxParameters) Validate() error { } } } + if s.Tmpfs != nil { + for i, v := range s.Tmpfs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tmpfs", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -6713,6 +6756,18 @@ func (s *LinuxParameters) SetInitProcessEnabled(v bool) *LinuxParameters { return s } +// SetSharedMemorySize sets the SharedMemorySize field's value. +func (s *LinuxParameters) SetSharedMemorySize(v int64) *LinuxParameters { + s.SharedMemorySize = &v + return s +} + +// SetTmpfs sets the Tmpfs field's value. +func (s *LinuxParameters) SetTmpfs(v []*Tmpfs) *LinuxParameters { + s.Tmpfs = v + return s +} + type ListAttributesInput struct { _ struct{} `type:"structure"` @@ -8816,6 +8871,8 @@ type Service struct { // within a region or across multiple regions. ServiceName *string `locationName:"serviceName" type:"string"` + ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"` + // The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE. Status *string `locationName:"status" type:"string"` @@ -8943,6 +9000,12 @@ func (s *Service) SetServiceName(v string) *Service { return s } +// SetServiceRegistries sets the ServiceRegistries field's value. +func (s *Service) SetServiceRegistries(v []*ServiceRegistry) *Service { + s.ServiceRegistries = v + return s +} + // SetStatus sets the Status field's value. func (s *Service) SetStatus(v string) *Service { s.Status = &v @@ -8997,6 +9060,41 @@ func (s *ServiceEvent) SetMessage(v string) *ServiceEvent { return s } +// Details of the service registry. +type ServiceRegistry struct { + _ struct{} `type:"structure"` + + // The port value used if your Service Discovery service specified an SRV record. + Port *int64 `locationName:"port" type:"integer"` + + // The Amazon Resource Name (ARN) of the Service Registry. The currently supported + // service registry is Amazon Route 53 Auto Naming Service. For more information, + // see Service (https://docs.aws.amazon.com/Route53/latest/APIReference/API_autonaming_Service.html). + RegistryArn *string `locationName:"registryArn" type:"string"` +} + +// String returns the string representation +func (s ServiceRegistry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceRegistry) GoString() string { + return s.String() +} + +// SetPort sets the Port field's value. +func (s *ServiceRegistry) SetPort(v int64) *ServiceRegistry { + s.Port = &v + return s +} + +// SetRegistryArn sets the RegistryArn field's value. +func (s *ServiceRegistry) SetRegistryArn(v string) *ServiceRegistry { + s.RegistryArn = &v + return s +} + type StartTaskInput struct { _ struct{} `type:"structure"` @@ -10145,6 +10243,74 @@ func (s *TaskOverride) SetTaskRoleArn(v string) *TaskOverride { return s } +// The container path, mount options, and size of the tmpfs mount. +type Tmpfs struct { + _ struct{} `type:"structure"` + + // The absolute file path where the tmpfs volume will be mounted. + // + // ContainerPath is a required field + ContainerPath *string `locationName:"containerPath" type:"string" required:"true"` + + // The list of tmpfs volume mount options. + // + // Valid values: "defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" + // | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | + // "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" + // | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" + // | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" + MountOptions []*string `locationName:"mountOptions" type:"list"` + + // The size of the tmpfs volume. + // + // Size is a required field + Size *int64 `locationName:"size" type:"integer" required:"true"` +} + +// String returns the string representation +func (s Tmpfs) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tmpfs) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tmpfs) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tmpfs"} + if s.ContainerPath == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerPath")) + } + if s.Size == nil { + invalidParams.Add(request.NewErrParamRequired("Size")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerPath sets the ContainerPath field's value. +func (s *Tmpfs) SetContainerPath(v string) *Tmpfs { + s.ContainerPath = &v + return s +} + +// SetMountOptions sets the MountOptions field's value. +func (s *Tmpfs) SetMountOptions(v []*string) *Tmpfs { + s.MountOptions = v + return s +} + +// SetSize sets the Size field's value. +func (s *Tmpfs) SetSize(v int64) *Tmpfs { + s.Size = &v + return s +} + // The ulimit settings to pass to the container. type Ulimit struct { _ struct{} `type:"structure"` @@ -10396,8 +10562,11 @@ type UpdateServiceInput struct { // service. DesiredCount *int64 `locationName:"desiredCount" type:"integer"` - // Whether to force a new deployment of the service. By default, --no-force-new-deployment - // is assumed unless otherwise specified. + // Whether to force a new deployment of the service. Deployments are not forced + // by default. You can use this option to trigger a new deployment with no service + // definition changes. For example, you can update a service's tasks to use + // a newer Docker image with the same image/tag combination (my_image:latest) + // or to roll Fargate tasks onto a newer platform version. ForceNewDeployment *bool `locationName:"forceNewDeployment" type:"boolean"` // The period of time, in seconds, that the Amazon ECS service scheduler should diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index 14f972572a5..bf8f66b12e6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -71,7 +71,7 @@ func (c *ElasticBeanstalk) AbortEnvironmentUpdateRequest(input *AbortEnvironment // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/AbortEnvironmentUpdate @@ -318,7 +318,7 @@ func (c *ElasticBeanstalk) ComposeEnvironmentsRequest(input *ComposeEnvironments // The specified account has reached its limit of environments. // // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/ComposeEnvironments @@ -500,7 +500,7 @@ func (c *ElasticBeanstalk) CreateApplicationVersionRequest(input *CreateApplicat // The specified account has reached its limit of application versions. // // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeS3LocationNotInServiceRegionException "S3LocationNotInServiceRegionException" @@ -603,7 +603,7 @@ func (c *ElasticBeanstalk) CreateConfigurationTemplateRequest(input *CreateConfi // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeTooManyBucketsException "TooManyBucketsException" @@ -693,7 +693,7 @@ func (c *ElasticBeanstalk) CreateEnvironmentRequest(input *CreateEnvironmentInpu // The specified account has reached its limit of environments. // // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateEnvironment @@ -773,7 +773,7 @@ func (c *ElasticBeanstalk) CreatePlatformVersionRequest(input *CreatePlatformVer // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeServiceException "ServiceException" @@ -870,7 +870,7 @@ func (c *ElasticBeanstalk) CreateStorageLocationRequest(input *CreateStorageLoca // The specified account does not have a subscription to Amazon S3. // // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/CreateStorageLocation @@ -1045,7 +1045,7 @@ func (c *ElasticBeanstalk) DeleteApplicationVersionRequest(input *DeleteApplicat // version. The application version was deleted successfully. // // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeOperationInProgressException "OperationInProgressFailure" @@ -1312,7 +1312,7 @@ func (c *ElasticBeanstalk) DeletePlatformVersionRequest(input *DeletePlatformVer // effects an element in this activity is already in progress. // // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeServiceException "ServiceException" @@ -1344,6 +1344,89 @@ func (c *ElasticBeanstalk) DeletePlatformVersionWithContext(ctx aws.Context, inp return out, req.Send() } +const opDescribeAccountAttributes = "DescribeAccountAttributes" + +// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccountAttributes operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAccountAttributesRequest method. +// req, resp := client.DescribeAccountAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeAccountAttributes +func (c *ElasticBeanstalk) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { + op := &request.Operation{ + Name: opDescribeAccountAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAccountAttributesInput{} + } + + output = &DescribeAccountAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAccountAttributes API operation for AWS Elastic Beanstalk. +// +// Returns attributes related to AWS Elastic Beanstalk that are associated with +// the calling AWS account. +// +// The result currently has one set of attributes—resource quotas. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elastic Beanstalk's +// API operation DescribeAccountAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" +// The specified account does not have sufficient privileges for one or more +// AWS services. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeAccountAttributes +func (c *ElasticBeanstalk) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { + req, out := c.DescribeAccountAttributesRequest(input) + return out, req.Send() +} + +// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAccountAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticBeanstalk) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { + req, out := c.DescribeAccountAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeApplicationVersions = "DescribeApplicationVersions" // DescribeApplicationVersionsRequest generates a "aws/request.Request" representing the @@ -1964,7 +2047,7 @@ func (c *ElasticBeanstalk) DescribeEnvironmentResourcesRequest(input *DescribeEn // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/DescribeEnvironmentResources @@ -2334,7 +2417,7 @@ func (c *ElasticBeanstalk) DescribePlatformVersionRequest(input *DescribePlatfor // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeServiceException "ServiceException" @@ -2492,7 +2575,7 @@ func (c *ElasticBeanstalk) ListPlatformVersionsRequest(input *ListPlatformVersio // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeServiceException "ServiceException" @@ -2580,7 +2663,7 @@ func (c *ElasticBeanstalk) ListTagsForResourceRequest(input *ListTagsForResource // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" @@ -2670,7 +2753,7 @@ func (c *ElasticBeanstalk) RebuildEnvironmentRequest(input *RebuildEnvironmentIn // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/RebuildEnvironment @@ -3071,7 +3154,7 @@ func (c *ElasticBeanstalk) TerminateEnvironmentRequest(input *TerminateEnvironme // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/TerminateEnvironment @@ -3228,7 +3311,7 @@ func (c *ElasticBeanstalk) UpdateApplicationResourceLifecycleRequest(input *Upda // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk-2010-12-01/UpdateApplicationResourceLifecycle @@ -3393,7 +3476,7 @@ func (c *ElasticBeanstalk) UpdateConfigurationTemplateRequest(input *UpdateConfi // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeTooManyBucketsException "TooManyBucketsException" @@ -3486,7 +3569,7 @@ func (c *ElasticBeanstalk) UpdateEnvironmentRequest(input *UpdateEnvironmentInpu // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeTooManyBucketsException "TooManyBucketsException" @@ -3589,7 +3672,7 @@ func (c *ElasticBeanstalk) UpdateTagsForResourceRequest(input *UpdateTagsForReso // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeOperationInProgressException "OperationInProgressFailure" @@ -3691,7 +3774,7 @@ func (c *ElasticBeanstalk) ValidateConfigurationSettingsRequest(input *ValidateC // // Returned Error Codes: // * ErrCodeInsufficientPrivilegesException "InsufficientPrivilegesException" -// The specified account does not have sufficient privileges for one of more +// The specified account does not have sufficient privileges for one or more // AWS services. // // * ErrCodeTooManyBucketsException "TooManyBucketsException" @@ -6192,6 +6275,43 @@ func (s *Deployment) SetVersionLabel(v string) *Deployment { return s } +type DescribeAccountAttributesInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeAccountAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAttributesInput) GoString() string { + return s.String() +} + +type DescribeAccountAttributesOutput struct { + _ struct{} `type:"structure"` + + // The Elastic Beanstalk resource quotas associated with the calling AWS account. + ResourceQuotas *ResourceQuotas `type:"structure"` +} + +// String returns the string representation +func (s DescribeAccountAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAttributesOutput) GoString() string { + return s.String() +} + +// SetResourceQuotas sets the ResourceQuotas field's value. +func (s *DescribeAccountAttributesOutput) SetResourceQuotas(v *ResourceQuotas) *DescribeAccountAttributesOutput { + s.ResourceQuotas = v + return s +} + // Request to describe application versions. type DescribeApplicationVersionsInput struct { _ struct{} `type:"structure"` @@ -9527,6 +9647,93 @@ func (s RequestEnvironmentInfoOutput) GoString() string { return s.String() } +// The AWS Elastic Beanstalk quota information for a single resource type in +// an AWS account. It reflects the resource's limits for this account. +type ResourceQuota struct { + _ struct{} `type:"structure"` + + // The maximum number of instances of this Elastic Beanstalk resource type that + // an AWS account can use. + Maximum *int64 `type:"integer"` +} + +// String returns the string representation +func (s ResourceQuota) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceQuota) GoString() string { + return s.String() +} + +// SetMaximum sets the Maximum field's value. +func (s *ResourceQuota) SetMaximum(v int64) *ResourceQuota { + s.Maximum = &v + return s +} + +// A set of per-resource AWS Elastic Beanstalk quotas associated with an AWS +// account. They reflect Elastic Beanstalk resource limits for this account. +type ResourceQuotas struct { + _ struct{} `type:"structure"` + + // The quota for applications in the AWS account. + ApplicationQuota *ResourceQuota `type:"structure"` + + // The quota for application versions in the AWS account. + ApplicationVersionQuota *ResourceQuota `type:"structure"` + + // The quota for configuration templates in the AWS account. + ConfigurationTemplateQuota *ResourceQuota `type:"structure"` + + // The quota for custom platforms in the AWS account. + CustomPlatformQuota *ResourceQuota `type:"structure"` + + // The quota for environments in the AWS account. + EnvironmentQuota *ResourceQuota `type:"structure"` +} + +// String returns the string representation +func (s ResourceQuotas) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceQuotas) GoString() string { + return s.String() +} + +// SetApplicationQuota sets the ApplicationQuota field's value. +func (s *ResourceQuotas) SetApplicationQuota(v *ResourceQuota) *ResourceQuotas { + s.ApplicationQuota = v + return s +} + +// SetApplicationVersionQuota sets the ApplicationVersionQuota field's value. +func (s *ResourceQuotas) SetApplicationVersionQuota(v *ResourceQuota) *ResourceQuotas { + s.ApplicationVersionQuota = v + return s +} + +// SetConfigurationTemplateQuota sets the ConfigurationTemplateQuota field's value. +func (s *ResourceQuotas) SetConfigurationTemplateQuota(v *ResourceQuota) *ResourceQuotas { + s.ConfigurationTemplateQuota = v + return s +} + +// SetCustomPlatformQuota sets the CustomPlatformQuota field's value. +func (s *ResourceQuotas) SetCustomPlatformQuota(v *ResourceQuota) *ResourceQuotas { + s.CustomPlatformQuota = v + return s +} + +// SetEnvironmentQuota sets the EnvironmentQuota field's value. +func (s *ResourceQuotas) SetEnvironmentQuota(v *ResourceQuota) *ResourceQuotas { + s.EnvironmentQuota = v + return s +} + type RestartAppServerInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go index 6373e870ae7..adb0f27e3dd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/errors.go @@ -13,7 +13,7 @@ const ( // ErrCodeInsufficientPrivilegesException for service response error code // "InsufficientPrivilegesException". // - // The specified account does not have sufficient privileges for one of more + // The specified account does not have sufficient privileges for one or more // AWS services. ErrCodeInsufficientPrivilegesException = "InsufficientPrivilegesException" diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index 3e172586c27..7a2eed5a48e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -9893,9 +9893,7 @@ type CreateDevEndpointInput struct { NumberOfNodes *int64 `type:"integer"` // The public key to use for authentication. - // - // PublicKey is a required field - PublicKey *string `type:"string" required:"true"` + PublicKey *string `type:"string"` // The IAM role for the DevEndpoint. // @@ -9925,9 +9923,6 @@ func (s *CreateDevEndpointInput) Validate() error { if s.EndpointName == nil { invalidParams.Add(request.NewErrParamRequired("EndpointName")) } - if s.PublicKey == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKey")) - } if s.RoleArn == nil { invalidParams.Add(request.NewErrParamRequired("RoleArn")) } @@ -12011,7 +12006,10 @@ type DevEndpoint struct { // The number of AWS Glue Data Processing Units (DPUs) allocated to this DevEndpoint. NumberOfNodes *int64 `type:"integer"` - // The public address used by this DevEndpoint. + // The private address used by this DevEndpoint. + PrivateAddress *string `type:"string"` + + // The public VPC address used by this DevEndpoint. PublicAddress *string `type:"string"` // The public key to be used by this DevEndpoint for authentication. @@ -12103,6 +12101,12 @@ func (s *DevEndpoint) SetNumberOfNodes(v int64) *DevEndpoint { return s } +// SetPrivateAddress sets the PrivateAddress field's value. +func (s *DevEndpoint) SetPrivateAddress(v string) *DevEndpoint { + s.PrivateAddress = &v + return s +} + // SetPublicAddress sets the PublicAddress field's value. func (s *DevEndpoint) SetPublicAddress(v string) *DevEndpoint { s.PublicAddress = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go index 995709381aa..54c24d4f75f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go @@ -45,14 +45,14 @@ const ( // svc := guardduty.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *GuardDuty { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "guardduty" + } 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) *GuardDuty { - if len(signingName) == 0 { - signingName = "guardduty" - } svc := &GuardDuty{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go b/vendor/github.com/aws/aws-sdk-go/service/iot/service.go index 530757a190c..1f03372ac9e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/service.go @@ -45,14 +45,14 @@ const ( // svc := iot.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoT { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "execute-api" + } 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) *IoT { - if len(signingName) == 0 { - signingName = "execute-api" - } svc := &IoT{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go index 8948604660b..cc122d1a2a3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go @@ -45,14 +45,14 @@ const ( // svc := lexmodelbuildingservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *LexModelBuildingService { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "lex" + } 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) *LexModelBuildingService { - if len(signingName) == 0 { - signingName = "lex" - } svc := &LexModelBuildingService{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go index 57088839281..b5610d35864 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go @@ -45,14 +45,14 @@ const ( // svc := mediaconvert.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaConvert { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediaconvert" + } 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) *MediaConvert { - if len(signingName) == 0 { - signingName = "mediaconvert" - } svc := &MediaConvert{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go index e99fae51ec0..73755a7f813 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go @@ -64,10 +64,10 @@ func (c *MediaLive) CreateChannelRequest(input *CreateChannelInput) (req *reques // API operation CreateChannel for usage and error information. // // Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// // * ErrCodeUnprocessableEntityException "UnprocessableEntityException" // +// * ErrCodeBadRequestException "BadRequestException" +// // * ErrCodeInternalServerErrorException "InternalServerErrorException" // // * ErrCodeForbiddenException "ForbiddenException" @@ -1492,10 +1492,10 @@ func (c *MediaLive) UpdateChannelRequest(input *UpdateChannelInput) (req *reques // API operation UpdateChannel for usage and error information. // // Returned Error Codes: -// * ErrCodeBadRequestException "BadRequestException" -// // * ErrCodeUnprocessableEntityException "UnprocessableEntityException" // +// * ErrCodeBadRequestException "BadRequestException" +// // * ErrCodeInternalServerErrorException "InternalServerErrorException" // // * ErrCodeForbiddenException "ForbiddenException" @@ -1528,6 +1528,186 @@ func (c *MediaLive) UpdateChannelWithContext(ctx aws.Context, input *UpdateChann return out, req.Send() } +const opUpdateInput = "UpdateInput" + +// UpdateInputRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInput operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateInput for more information on using the UpdateInput +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateInputRequest method. +// req, resp := client.UpdateInputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInput +func (c *MediaLive) UpdateInputRequest(input *UpdateInputInput) (req *request.Request, output *UpdateInputOutput) { + op := &request.Operation{ + Name: opUpdateInput, + HTTPMethod: "PUT", + HTTPPath: "/prod/inputs/{inputId}", + } + + if input == nil { + input = &UpdateInputInput{} + } + + output = &UpdateInputOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateInput API operation for AWS Elemental MediaLive. +// +// Updates an input. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation UpdateInput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInput +func (c *MediaLive) UpdateInput(input *UpdateInputInput) (*UpdateInputOutput, error) { + req, out := c.UpdateInputRequest(input) + return out, req.Send() +} + +// UpdateInputWithContext is the same as UpdateInput with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateInput for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) UpdateInputWithContext(ctx aws.Context, input *UpdateInputInput, opts ...request.Option) (*UpdateInputOutput, error) { + req, out := c.UpdateInputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateInputSecurityGroup = "UpdateInputSecurityGroup" + +// UpdateInputSecurityGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInputSecurityGroup operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateInputSecurityGroup for more information on using the UpdateInputSecurityGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateInputSecurityGroupRequest method. +// req, resp := client.UpdateInputSecurityGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputSecurityGroup +func (c *MediaLive) UpdateInputSecurityGroupRequest(input *UpdateInputSecurityGroupInput) (req *request.Request, output *UpdateInputSecurityGroupOutput) { + op := &request.Operation{ + Name: opUpdateInputSecurityGroup, + HTTPMethod: "PUT", + HTTPPath: "/prod/inputSecurityGroups/{inputSecurityGroupId}", + } + + if input == nil { + input = &UpdateInputSecurityGroupInput{} + } + + output = &UpdateInputSecurityGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateInputSecurityGroup API operation for AWS Elemental MediaLive. +// +// Update an Input Security Group's Whilelists. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation UpdateInputSecurityGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputSecurityGroup +func (c *MediaLive) UpdateInputSecurityGroup(input *UpdateInputSecurityGroupInput) (*UpdateInputSecurityGroupOutput, error) { + req, out := c.UpdateInputSecurityGroupRequest(input) + return out, req.Send() +} + +// UpdateInputSecurityGroupWithContext is the same as UpdateInputSecurityGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateInputSecurityGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) UpdateInputSecurityGroupWithContext(ctx aws.Context, input *UpdateInputSecurityGroupInput, opts ...request.Option) (*UpdateInputSecurityGroupOutput, error) { + req, out := c.UpdateInputSecurityGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type AacSettings struct { _ struct{} `type:"structure"` @@ -4447,6 +4627,10 @@ type DescribeInputSecurityGroupOutput struct { Id *string `locationName:"id" type:"string"` + Inputs []*string `locationName:"inputs" type:"list"` + + State *string `locationName:"state" type:"string" enum:"InputSecurityGroupState"` + WhitelistRules []*InputWhitelistRule `locationName:"whitelistRules" type:"list"` } @@ -4472,6 +4656,18 @@ func (s *DescribeInputSecurityGroupOutput) SetId(v string) *DescribeInputSecurit return s } +// SetInputs sets the Inputs field's value. +func (s *DescribeInputSecurityGroupOutput) SetInputs(v []*string) *DescribeInputSecurityGroupOutput { + s.Inputs = v + return s +} + +// SetState sets the State field's value. +func (s *DescribeInputSecurityGroupOutput) SetState(v string) *DescribeInputSecurityGroupOutput { + s.State = &v + return s +} + // SetWhitelistRules sets the WhitelistRules field's value. func (s *DescribeInputSecurityGroupOutput) SetWhitelistRules(v []*InputWhitelistRule) *DescribeInputSecurityGroupOutput { s.WhitelistRules = v @@ -7305,6 +7501,12 @@ type InputSecurityGroup struct { // The Id of the Input Security Group Id *string `locationName:"id" type:"string"` + // The list of inputs currently using this Input Security Group. + Inputs []*string `locationName:"inputs" type:"list"` + + // The current state of the Input Security Group. + State *string `locationName:"state" type:"string" enum:"InputSecurityGroupState"` + // Whitelist rules and their sync status WhitelistRules []*InputWhitelistRule `locationName:"whitelistRules" type:"list"` } @@ -7331,6 +7533,18 @@ func (s *InputSecurityGroup) SetId(v string) *InputSecurityGroup { return s } +// SetInputs sets the Inputs field's value. +func (s *InputSecurityGroup) SetInputs(v []*string) *InputSecurityGroup { + s.Inputs = v + return s +} + +// SetState sets the State field's value. +func (s *InputSecurityGroup) SetState(v string) *InputSecurityGroup { + s.State = &v + return s +} + // SetWhitelistRules sets the WhitelistRules field's value. func (s *InputSecurityGroup) SetWhitelistRules(v []*InputWhitelistRule) *InputSecurityGroup { s.WhitelistRules = v @@ -7624,7 +7838,7 @@ func (s *InputWhitelistRule) SetCidr(v string) *InputWhitelistRule { type InputWhitelistRuleCidr struct { _ struct{} `type:"structure"` - // The IPv4 CIDR to whitelist + // The IPv4 CIDR to whitelist. Cidr *string `locationName:"cidr" type:"string"` } @@ -10347,6 +10561,8 @@ type UpdateChannelInput struct { EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` Name *string `locationName:"name" type:"string"` @@ -10375,6 +10591,16 @@ func (s *UpdateChannelInput) Validate() error { invalidParams.AddNested("EncoderSettings", err.(request.ErrInvalidParams)) } } + if s.InputAttachments != nil { + for i, v := range s.InputAttachments { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputAttachments", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10400,6 +10626,12 @@ func (s *UpdateChannelInput) SetEncoderSettings(v *EncoderSettings) *UpdateChann return s } +// SetInputAttachments sets the InputAttachments field's value. +func (s *UpdateChannelInput) SetInputAttachments(v []*InputAttachment) *UpdateChannelInput { + s.InputAttachments = v + return s +} + // SetInputSpecification sets the InputSpecification field's value. func (s *UpdateChannelInput) SetInputSpecification(v *InputSpecification) *UpdateChannelInput { s.InputSpecification = v @@ -10440,6 +10672,163 @@ func (s *UpdateChannelOutput) SetChannel(v *Channel) *UpdateChannelOutput { return s } +type UpdateInputInput struct { + _ struct{} `type:"structure"` + + Destinations []*InputDestinationRequest `locationName:"destinations" type:"list"` + + // InputId is a required field + InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` + + InputSecurityGroups []*string `locationName:"inputSecurityGroups" type:"list"` + + Name *string `locationName:"name" type:"string"` + + Sources []*InputSourceRequest `locationName:"sources" type:"list"` +} + +// String returns the string representation +func (s UpdateInputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInputInput"} + if s.InputId == nil { + invalidParams.Add(request.NewErrParamRequired("InputId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinations sets the Destinations field's value. +func (s *UpdateInputInput) SetDestinations(v []*InputDestinationRequest) *UpdateInputInput { + s.Destinations = v + return s +} + +// SetInputId sets the InputId field's value. +func (s *UpdateInputInput) SetInputId(v string) *UpdateInputInput { + s.InputId = &v + return s +} + +// SetInputSecurityGroups sets the InputSecurityGroups field's value. +func (s *UpdateInputInput) SetInputSecurityGroups(v []*string) *UpdateInputInput { + s.InputSecurityGroups = v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateInputInput) SetName(v string) *UpdateInputInput { + s.Name = &v + return s +} + +// SetSources sets the Sources field's value. +func (s *UpdateInputInput) SetSources(v []*InputSourceRequest) *UpdateInputInput { + s.Sources = v + return s +} + +type UpdateInputOutput struct { + _ struct{} `type:"structure"` + + Input *Input `locationName:"input" type:"structure"` +} + +// String returns the string representation +func (s UpdateInputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputOutput) GoString() string { + return s.String() +} + +// SetInput sets the Input field's value. +func (s *UpdateInputOutput) SetInput(v *Input) *UpdateInputOutput { + s.Input = v + return s +} + +type UpdateInputSecurityGroupInput struct { + _ struct{} `type:"structure"` + + // InputSecurityGroupId is a required field + InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` + + WhitelistRules []*InputWhitelistRuleCidr `locationName:"whitelistRules" type:"list"` +} + +// String returns the string representation +func (s UpdateInputSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputSecurityGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInputSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInputSecurityGroupInput"} + if s.InputSecurityGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. +func (s *UpdateInputSecurityGroupInput) SetInputSecurityGroupId(v string) *UpdateInputSecurityGroupInput { + s.InputSecurityGroupId = &v + return s +} + +// SetWhitelistRules sets the WhitelistRules field's value. +func (s *UpdateInputSecurityGroupInput) SetWhitelistRules(v []*InputWhitelistRuleCidr) *UpdateInputSecurityGroupInput { + s.WhitelistRules = v + return s +} + +type UpdateInputSecurityGroupOutput struct { + _ struct{} `type:"structure"` + + // An Input Security Group + SecurityGroup *InputSecurityGroup `locationName:"securityGroup" type:"structure"` +} + +// String returns the string representation +func (s UpdateInputSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputSecurityGroupOutput) GoString() string { + return s.String() +} + +// SetSecurityGroup sets the SecurityGroup field's value. +func (s *UpdateInputSecurityGroupOutput) SetSecurityGroup(v *InputSecurityGroup) *UpdateInputSecurityGroupOutput { + s.SecurityGroup = v + return s +} + type ValidationError struct { _ struct{} `type:"structure"` @@ -11927,6 +12316,20 @@ const ( InputResolutionUhd = "UHD" ) +const ( + // InputSecurityGroupStateIdle is a InputSecurityGroupState enum value + InputSecurityGroupStateIdle = "IDLE" + + // InputSecurityGroupStateInUse is a InputSecurityGroupState enum value + InputSecurityGroupStateInUse = "IN_USE" + + // InputSecurityGroupStateUpdating is a InputSecurityGroupState enum value + InputSecurityGroupStateUpdating = "UPDATING" + + // InputSecurityGroupStateDeleted is a InputSecurityGroupState enum value + InputSecurityGroupStateDeleted = "DELETED" +) + const ( // InputSourceEndBehaviorContinue is a InputSourceEndBehavior enum value InputSourceEndBehaviorContinue = "CONTINUE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go index 96e7506c17f..af727d2a32d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go @@ -45,14 +45,14 @@ const ( // svc := medialive.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaLive { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "medialive" + } 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) *MediaLive { - if len(signingName) == 0 { - signingName = "medialive" - } svc := &MediaLive{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go index 2447a2092bf..d5aa3cca94e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go @@ -45,14 +45,14 @@ const ( // svc := mediapackage.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaPackage { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediapackage" + } 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) *MediaPackage { - if len(signingName) == 0 { - signingName = "mediapackage" - } svc := &MediaPackage{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go index fa36fb91063..23ce93615c5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go @@ -45,14 +45,14 @@ const ( // svc := mediastore.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaStore { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediastore" + } 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) *MediaStore { - if len(signingName) == 0 { - signingName = "mediastore" - } svc := &MediaStore{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go index 8947fd8ce45..e4116d9cf5b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go @@ -45,14 +45,14 @@ const ( // svc := mediastoredata.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaStoreData { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediastore" + } 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) *MediaStoreData { - if len(signingName) == 0 { - signingName = "mediastore" - } svc := &MediaStoreData{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go b/vendor/github.com/aws/aws-sdk-go/service/mq/service.go index 91b17544c4d..455e3622f1d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mq/service.go @@ -45,14 +45,14 @@ const ( // svc := mq.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *MQ { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mq" + } 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) *MQ { - if len(signingName) == 0 { - signingName = "mq" - } svc := &MQ{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 4c6754ecf4c..5851584e29b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -12060,9 +12060,13 @@ type CreateDBInstanceInput struct { // // MariaDB // + // * 10.2.12 (supported in all AWS Regions) + // // * 10.2.11 (supported in all AWS Regions) // - // 10.1.26 (supported in all AWS Regions) + // 10.1.31 (supported in all AWS Regions) + // + // * 10.1.26 (supported in all AWS Regions) // // * 10.1.23 (supported in all AWS Regions) // @@ -12070,6 +12074,8 @@ type CreateDBInstanceInput struct { // // * 10.1.14 (supported in all AWS Regions except us-east-2) // + // * 10.0.34 (supported in all AWS Regions) + // // * 10.0.32 (supported in all AWS Regions) // // * 10.0.31 (supported in all AWS Regions) @@ -12127,12 +12133,16 @@ type CreateDBInstanceInput struct { // // MySQL // + // * 5.7.21 (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.39(supported in all AWS Regions) + // // 5.6.37(supported in all AWS Regions) // // 5.6.35(supported in all AWS Regions) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go index 8cfd7c8bbbe..a55beab96db 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go @@ -44,9 +44,10 @@ func defaultInitRequestFn(r *request.Request) { r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError) case opPutObject, opUploadPart: r.Handlers.Build.PushBack(computeBodyHashes) - case opGetObject: - r.Handlers.Build.PushBack(askForTxEncodingAppendMD5) - r.Handlers.Unmarshal.PushBack(useMD5ValidationReader) + // Disabled until #1837 root issue is resolved. + // case opGetObject: + // r.Handlers.Build.PushBack(askForTxEncodingAppendMD5) + // r.Handlers.Unmarshal.PushBack(useMD5ValidationReader) } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go index fac6d92bae3..c3e00b8374c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go @@ -45,14 +45,14 @@ const ( // svc := sagemaker.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *SageMaker { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "sagemaker" + } 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) *SageMaker { - if len(signingName) == 0 { - signingName = "sagemaker" - } svc := &SageMaker{ Client: client.New( cfg, diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go b/vendor/github.com/aws/aws-sdk-go/service/ses/service.go index b078893079f..b71b2322e11 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/service.go @@ -45,14 +45,14 @@ const ( // svc := ses.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *SES { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "ses" + } 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) *SES { - if len(signingName) == 0 { - signingName = "ses" - } svc := &SES{ Client: client.New( cfg, diff --git a/vendor/vendor.json b/vendor/vendor.json index f4dbca1794c..14828416e2f 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,884 +39,884 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "q4osc1RWwXEKwVApYRUuSwMdxkU=", + "checksumSHA1": "oS1f9+6Y4byjgyIKEpnzkxYU1MY=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "qPamnqpz6piw78HJjvluOegQfGE=", + "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "YAa4mUoL6J81yCT+QzeWF3EEo8A=", + "checksumSHA1": "taM7fdw8T0L8klF96JgAHvKobIw=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "xXfBg4kOE6+Z4sABLqdR49OlSNA=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "NSUxDbxBtCToRUoMRUKn61WJWmE=", + "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "Ih4il2OyFyaSuoMv6hhvPUN8Gn4=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "DPl/OkvEUjrd+XKqX73l6nUNw3U=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "Lhn7o6Ua6s/dgjol0ATOiRBIMxA=", + "checksumSHA1": "tsOPYVkOiuYDJTziSRkP7p1TL70=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "eXdYovPaIY64heZE1nczTsNRvtw=", + "checksumSHA1": "lyjaWzlpAp6CacdNZTe351CRp5c=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "wrOVdI/6ZTZ/H0Kxjh3bBEZtVzk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "GhemRVzpnrN6HAgm1NdAgESY8CQ=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "P5gDOoqIdVjMU77e5Nhy48QLpS4=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "BrC9UCeefniH5UN7x0PFr8A9l6Y=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "EoaTzMilW+OIi5eETJUpd+giyTc=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "yuFNzmUIWppfji/Xx6Aao0EE4cY=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "0nPnGWlegQG7bn/iIIfjJFoljyU=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "XJAlmauOOHsHEUW7n0XO/eEpcWI=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "VTc9UOMqIwuhWJ6oGQDsMkTW09I=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "ItXljM1vG/0goVleodRgbfYgyxQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "e23yBAf38AKW/Fve77BO4WgMq4c=", + "checksumSHA1": "x25KEvGmuQ0Uuoduo/CVe37ELC8=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "HHct8eQygkIJ+vrQpKhB0IEDymQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "22txzj8ItH1+lzyyLlFz/vtRV2I=", + "checksumSHA1": "LHcxaQJ77WMlug2cnyXlTzJJUSo=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "AQwpqKKc52nnI5F50K73Zx5luoQ=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "wvXGTyWPjtgC4OjXb80IxYdpqmE=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "V1Y05qfjN4xOCy+GnPWSCqIeZb4=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "Ju8efcqcIgggB7N8io/as9ERVdc=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "jeCyZm4iJmOLbVOe/70QNkII+qU=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "fPHmnn5kgs8BB73v8Pz/7frfnmo=", + "checksumSHA1": "OhbpZoCd+Vg3pLOEE0MVH9T22eY=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "45sgs1urdRiXDb35iuAhQPzl0e4=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "bu1R1eKCK2fc5+hMcXmagr3iIik=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "EaEfUc3nt1sS/cdfSYGq+JtSVKs=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "LRdh5oXUe2yURIk5FDH6ceEZGMo=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "a7itHIwtyXtOGQ0KsiefmsHgu4s=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "8JiVrxMjFSdBOfVWCy1QU+JzB08=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "SOmBkudpfGbt3Pb3I1bzuXV9FvQ=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "PcnSiFF2p2xOsvITrsglyWp20YA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "T38/mnajk0fqAPXT1Qq1DG+cJ6g=", + "checksumSHA1": "VRx8MtqfED2uZVOi6ldb5P145TI=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "4XmkiujbDA68x39KGgURR1+uPiQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "o73xT1zFo3C+giQwKcRj02OAZhM=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "1U0w3+W7kvH901jSftehitrRHCg=", + "checksumSHA1": "C6OWsuCjBYnqjR5PwDFEA8l1hWg=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "VYGtTaSiajfKOVTbi9/SNmbiIac=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "SZ7yLDZ6RvMhpWe0Goyem64kgyA=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "iRI32eUYQfumh0LybzZ+5iWV3jE=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "ufCsoZUQK13j8Y+m25yxhC2XteQ=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "5x77vwxya74Qu5YEq75/lhyYkqY=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "t7BmfpJqmQ7Y0EYcj/CR9Aup9go=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "h37wXo80exgME9QqHkeLTyG88ZM=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "20HMsQ2tH47zknjFIUQLi/ZOBvc=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "M01rYrldc6zwbpAeaLX5UJ6b25g=", + "checksumSHA1": "K1s4cEA/LcK+NAZAFUDOr/dW9IY=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "VRaMYP1928z+aLVk2qX5OPFaobk=", + "checksumSHA1": "tU7rdC0LAUOKNp2uERUXi3hU1sQ=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "I8CWKTI9BLrIF9ZKf6SpWhG+LXM=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "45gdBZuM7PWLQzWuBasytvZZpK0=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "88bf507ASfaFmQHmjidwQ6uRPJ8=", + "checksumSHA1": "skj7upwPc4zfJbYT+iPY+cmumG0=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "DfzNze8B3ME2tV3TtXP7eQXUjD0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "Vqq049R2eveVD15emT9vKTyBsIg=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "lAgaKbwpyflY7+t4V3EeH18RwgA=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "j89kyJh2GGvR24TptSP3OsO2fho=", + "checksumSHA1": "shckWClBSciJH+cFYCY5kDCbBXI=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "2dy15/1bnS80cwKZiwnEai1d7O8=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "8qaF9hO9gXBfjhqcgPKx9yrz9wk=", + "checksumSHA1": "998zv0rs9SBCd9EoAnIi9cKv7uo=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "TJfSeycacPHDkVi7by9+qkpS2Rg=", + "checksumSHA1": "/Oo64hSOdIKbN4dmZ7EAQRfr12w=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "Uc40skINWoBmH5LglPNfoKxET0g=", + "checksumSHA1": "mzoPurfrAAB102onq4FPlwZ5Bec=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "kEZmPI9Y9+05SWuRCdtt+QkqwLI=", + "checksumSHA1": "yXPMyEsghtSFxu9AbiTFCzisGrQ=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "1hKLl5dLV28iH5rMfOPlWmD+oXk=", + "checksumSHA1": "wU7VITDzy1ubXo+zrG4HNyl5GJI=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "3QV+ZVkQ8g8JkNkftwHaOCevyqM=", + "checksumSHA1": "kMMVqLsxKIzBQeDyWJ0N2U/PKLc=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "QuOSKqV8nFvvzN4wcsToltMFI1Y=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "vSNXu8VAbPuFoTTjtVEpldKDZHA=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "HUlP17axe1KXCHIc8vHlrvQPD2s=", + "checksumSHA1": "g5UtpGido/A6wsB7pDwY+RQ3Ha8=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "/F1EdnLahy5V5+EjvRQ3C0JhIyw=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "p2x3SXLzi1PXnyMpPUJUntpS1hQ=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "8p50HAyOFQoF/q0uQaNLKFt+AXA=", + "checksumSHA1": "/MR2uoycqymJLdO3Bu1pTkZCpDY=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "ft2RlaOgFMy5hkGg6okKx01eBFs=", + "checksumSHA1": "XSHs3VHLi/mXGDN0zLO/NNCVpw4=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "JrQMIue45k6Nk738T347pe9X0c0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "fmnQo2GajqI9eEn6tcEGiJ9A66E=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { - "checksumSHA1": "8LeTeLzNs+0vNxTeOjMCtSrSwqo=", + "checksumSHA1": "j+R3E5MeBM87zbLVQhcuqlHsxes=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "u3AMeFxtHGtiJCxDeIm4dAwzBIc=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "B3CgAFSREebpsFoFOo4vrQ6u04w=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "9Qj8yLl67q9uxBUCc0PT20YiP1M=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "XmEJe50M8MddNEkwbZoC+YvRjgg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "ULmsQAt5z5ZxGHZC/r7enBs1HvM=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "tH1Pzc7jUUGJv47Cy6uuWl/86bU=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "Uw4pOUxSMbx4xBHUcOUkNhtnywE=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "dBDZ2w/7ZEdk2UZ6PWFmk/cGSPw=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "hOobCqlfwCl/iPGetELNIDsns1U=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "FVK4fHBkjOIaCRIY4DleqSKtZKs=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "62465d4996f172ae426fdcec7a6a053062cf8995", - "revisionTime": "2018-03-15T19:52:51Z", - "version": "v1.13.15", - "versionExact": "v1.13.15" + "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", + "revisionTime": "2018-03-23T20:51:09Z", + "version": "v1.13.20", + "versionExact": "v1.13.20" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 5e0bd59573213d7216ff38fc2acbda167ee9b129 Mon Sep 17 00:00:00 2001 From: Jack Bruno Date: Sat, 24 Mar 2018 15:22:25 -0600 Subject: [PATCH 0181/3316] Add service config for Lex to ease separation of PRs for Lex resources --- aws/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aws/config.go b/aws/config.go index d357fb40635..df1b493cd0b 100644 --- a/aws/config.go +++ b/aws/config.go @@ -64,6 +64,7 @@ import ( "github.com/aws/aws-sdk-go/service/kinesis" "github.com/aws/aws-sdk-go/service/kms" "github.com/aws/aws-sdk-go/service/lambda" + "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" "github.com/aws/aws-sdk-go/service/lightsail" "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/mq" @@ -214,6 +215,7 @@ type AWSClient struct { dxconn *directconnect.DirectConnect mediastoreconn *mediastore.MediaStore appsyncconn *appsync.AppSync + lexmodelconn *lexmodelbuildingservice.LexModelBuildingService } func (c *AWSClient) S3() *s3.S3 { @@ -443,6 +445,7 @@ func (c *Config) Client() (interface{}, error) { client.kinesisconn = kinesis.New(awsKinesisSess) client.kmsconn = kms.New(awsKmsSess) client.lambdaconn = lambda.New(awsLambdaSess) + client.lexmodelconn = lexmodelbuildingservice.New(sess) client.lightsailconn = lightsail.New(sess) client.mqconn = mq.New(sess) client.opsworksconn = opsworks.New(sess) From eadb89549f00a16ad416026d284f8d8199bd0c90 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 26 Mar 2018 10:57:06 +0100 Subject: [PATCH 0182/3316] docs: Sort WAF(regional) links in sidebar --- website/aws.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/website/aws.erb b/website/aws.erb index 4b53b411a60..39911e116cc 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1476,14 +1476,14 @@ aws_waf_ipset - > - aws_waf_rule - - > aws_waf_rate_based_rule + > + aws_waf_rule + + > aws_waf_size_constraint_set @@ -1515,6 +1515,10 @@ aws_wafregional_ipset + > + aws_wafregional_rule + + > aws_wafregional_size_constraint_set @@ -1523,10 +1527,6 @@ aws_wafregional_sql_injection_match_set - > - aws_wafregional_rule - - > aws_wafregional_web_acl From 104d15833df6ff97d013117b52364eb22fea5a76 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 08:57:39 -0400 Subject: [PATCH 0183/3316] resource/aws_opsworks_instance: Remove Optional from ec2_instance_id attribute --- aws/resource_aws_opsworks_instance.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/resource_aws_opsworks_instance.go b/aws/resource_aws_opsworks_instance.go index ea0fcdb86de..e5183e8487e 100644 --- a/aws/resource_aws_opsworks_instance.go +++ b/aws/resource_aws_opsworks_instance.go @@ -99,7 +99,6 @@ func resourceAwsOpsworksInstance() *schema.Resource { "ec2_instance_id": { Type: schema.TypeString, - Optional: true, Computed: true, }, From 3bc0feeefdcd9a3f7d5a1711900c6385fbd85a94 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 26 Mar 2018 14:11:44 +0100 Subject: [PATCH 0184/3316] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 315a9451ed8..f793ec819af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.13.0 (Unreleased) + +ENHANCEMENTS: + +* resource/appsync_graphql_api: Support import [GH-3500] + ## 1.12.0 (March 23, 2018) NOTES: From 54732a5a1ae8c85477e0211f1d887f4a7ceb4175 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 09:15:09 -0400 Subject: [PATCH 0185/3316] tests/resource/aws_cloudformation_stack: Revert back to Primary_CF_VPC naming so we can sweep these separately --- aws/resource_aws_cloudformation_stack_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_cloudformation_stack_test.go b/aws/resource_aws_cloudformation_stack_test.go index af214f55f88..25a243a40d9 100644 --- a/aws/resource_aws_cloudformation_stack_test.go +++ b/aws/resource_aws_cloudformation_stack_test.go @@ -300,7 +300,7 @@ resource "aws_cloudformation_stack" "network" { "Properties" : { "CidrBlock" : "10.0.0.0/16", "Tags" : [ - {"Key": "Name", "Value": "%[1]s"} + {"Key": "Name", "Value": "Primary_CF_VPC"} ] } } @@ -333,7 +333,7 @@ Resources: Tags: - Key: Name - Value: %[1]s + Value: Primary_CF_VPC Outputs: DefaultSgId: @@ -379,7 +379,7 @@ resource "aws_cloudformation_stack" "asg-demo" { "Tags": [ { "Key": "Name", - "Value": "%[1]s" + "Value": "Primary_CF_VPC" } ] } @@ -535,7 +535,7 @@ resource "aws_cloudformation_stack" "with_params" { "Properties" : { "CidrBlock" : {"Ref": "VpcCIDR"}, "Tags" : [ - {"Key": "Name", "Value": "%[1]s"} + {"Key": "Name", "Value": "Primary_CF_VPC"} ] } } From fde210719dfc932909be9fab3795801bb01acf8b Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 10 Dec 2017 22:16:50 -0500 Subject: [PATCH 0186/3316] create launch template resource --- aws/provider.go | 1 + aws/resource_aws_launch_template.go | 970 +++++++++++++++++++++++ aws/resource_aws_launch_template_test.go | 199 +++++ aws/validators.go | 12 + aws/validators_test.go | 42 + 5 files changed, 1224 insertions(+) create mode 100644 aws/resource_aws_launch_template.go create mode 100644 aws/resource_aws_launch_template_test.go diff --git a/aws/provider.go b/aws/provider.go index 42de2ffeab1..5cfec0832d3 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -422,6 +422,7 @@ func Provider() terraform.ResourceProvider { "aws_lambda_alias": resourceAwsLambdaAlias(), "aws_lambda_permission": resourceAwsLambdaPermission(), "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), "aws_lightsail_domain": resourceAwsLightsailDomain(), "aws_lightsail_instance": resourceAwsLightsailInstance(), "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go new file mode 100644 index 00000000000..b80303444ac --- /dev/null +++ b/aws/resource_aws_launch_template.go @@ -0,0 +1,970 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +const awsSpotInstanceTimeLayout = "2006-01-02T15:04:05Z" + +func resourceAwsLaunchTemplate() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsLaunchTemplateCreate, + Read: resourceAwsLaunchTemplateRead, + Update: resourceAwsLaunchTemplateUpdate, + Delete: resourceAwsLaunchTemplateDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateLaunchTemplateName, + }, + + "name_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateLaunchTemplateName, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 255 characters", k)) + } + return + }, + }, + + "client_token": { + Type: schema.TypeString, + Computed: true, + }, + + "default_version": { + Type: schema.TypeInt, + Computed: true, + }, + + "latest_version": { + Type: schema.TypeInt, + Computed: true, + }, + + "block_device_mappings": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "device_name": { + Type: schema.TypeString, + Optional: true, + }, + "no_device": { + Type: schema.TypeString, + Optional: true, + }, + "virtual_name": { + Type: schema.TypeString, + Optional: true, + }, + "ebs": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_on_termination": { + Type: schema.TypeBool, + Optional: true, + }, + "encrypted": { + Type: schema.TypeBool, + Optional: true, + }, + "iops": { + Type: schema.TypeInt, + Optional: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + }, + "snapshot_id": { + Type: schema.TypeString, + Optional: true, + }, + "volume_size": { + Type: schema.TypeInt, + Optional: true, + }, + "volume_type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + + "credit_specification": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cpu_credits": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "disable_api_termination": { + Type: schema.TypeBool, + Optional: true, + }, + + "ebs_optimized": { + Type: schema.TypeBool, + Optional: true, + }, + + "elastic_gpu_specifications": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "iam_instance_profile": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "image_id": { + Type: schema.TypeString, + Optional: true, + }, + + "instance_initiated_shutdown_behavior": { + Type: schema.TypeString, + Optional: true, + }, + + "instance_market_options": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "market_type": { + Type: schema.TypeString, + Optional: true, + }, + "spot_options": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "block_duration_minutes": { + Type: schema.TypeInt, + Optional: true, + }, + "instance_interruption_behavior": { + Type: schema.TypeString, + Optional: true, + }, + "max_price": { + Type: schema.TypeString, + Optional: true, + }, + "spot_instance_type": { + Type: schema.TypeString, + Optional: true, + }, + "valid_until": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + + "instance_type": { + Type: schema.TypeString, + Optional: true, + }, + + "kernel_id": { + Type: schema.TypeString, + Optional: true, + }, + + "key_name": { + Type: schema.TypeString, + Optional: true, + }, + + "monitoring": { + Type: schema.TypeBool, + Optional: true, + }, + + "network_interfaces": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "associate_public_ip_address": { + Type: schema.TypeBool, + Optional: true, + }, + "delete_on_termination": { + Type: schema.TypeBool, + Optional: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "device_index": { + Type: schema.TypeInt, + Optional: true, + }, + "security_groups": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "ipv6_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "ipv6_addresses": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "network_interface_id": { + Type: schema.TypeString, + Computed: true, + }, + "private_ip_address": { + Type: schema.TypeString, + Optional: true, + }, + "ipv4_addresses": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "ipv4_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "subnet_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "placement": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "affinity": { + Type: schema.TypeString, + Optional: true, + }, + "availability_zone": { + Type: schema.TypeString, + Optional: true, + }, + "group_name": { + Type: schema.TypeString, + Optional: true, + }, + "host_id": { + Type: schema.TypeString, + Optional: true, + }, + "spread_domain": { + Type: schema.TypeString, + Optional: true, + }, + "tenancy": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "ram_disk_id": { + Type: schema.TypeString, + Optional: true, + }, + + "security_group_names": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "vpc_security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "tag_specifications": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_type": { + Type: schema.TypeString, + Optional: true, + }, + "tags": tagsSchema(), + }, + }, + }, + + "user_data": { + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func resourceAwsLaunchTemplateCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + var ltName string + if v, ok := d.GetOk("name"); ok { + ltName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + ltName = resource.PrefixedUniqueId(v.(string)) + } else { + ltName = resource.UniqueId() + } + + launchTemplateData, err := buildLaunchTemplateData(d, meta) + if err != nil { + return err + } + + launchTemplateDataOpts := &ec2.RequestLaunchTemplateData{ + BlockDeviceMappings: launchTemplateData.BlockDeviceMappings, + CreditSpecification: launchTemplateData.CreditSpecification, + DisableApiTermination: launchTemplateData.DisableApiTermination, + EbsOptimized: launchTemplateData.EbsOptimized, + ElasticGpuSpecifications: launchTemplateData.ElasticGpuSpecifications, + IamInstanceProfile: launchTemplateData.IamInstanceProfile, + ImageId: launchTemplateData.ImageId, + InstanceInitiatedShutdownBehavior: launchTemplateData.InstanceInitiatedShutdownBehavior, + InstanceMarketOptions: launchTemplateData.InstanceMarketOptions, + InstanceType: launchTemplateData.InstanceType, + KernelId: launchTemplateData.KernelId, + KeyName: launchTemplateData.KeyName, + Monitoring: launchTemplateData.Monitoring, + NetworkInterfaces: launchTemplateData.NetworkInterfaces, + Placement: launchTemplateData.Placement, + RamDiskId: launchTemplateData.RamDiskId, + SecurityGroups: launchTemplateData.SecurityGroups, + SecurityGroupIds: launchTemplateData.SecurityGroupIds, + TagSpecifications: launchTemplateData.TagSpecifications, + UserData: launchTemplateData.UserData, + } + + launchTemplateOpts := &ec2.CreateLaunchTemplateInput{ + ClientToken: aws.String(resource.UniqueId()), + LaunchTemplateName: aws.String(ltName), + LaunchTemplateData: launchTemplateDataOpts, + } + + resp, err := conn.CreateLaunchTemplate(launchTemplateOpts) + if err != nil { + return err + } + + launchTemplate := resp.LaunchTemplate + d.SetId(*launchTemplate.LaunchTemplateId) + + log.Printf("[DEBUG] Launch Template created: %q (version %d)", + *launchTemplate.LaunchTemplateId, *launchTemplate.LatestVersionNumber) + + return resourceAwsLaunchTemplateUpdate(d, meta) +} + +func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + log.Printf("[DEBUG] Reading launch template %s", d.Id()) + + dlt, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ + LaunchTemplateIds: []*string{aws.String(d.Id())}, + }) + if err != nil { + return fmt.Errorf("Error getting launch template: %s", err) + } + if len(dlt.LaunchTemplates) == 0 { + d.SetId("") + return nil + } + if *dlt.LaunchTemplates[0].LaunchTemplateId != d.Id() { + return fmt.Errorf("Unable to find launch template: %#v", dlt.LaunchTemplates) + } + + log.Printf("[DEBUG] Found launch template %s", d.Id()) + + lt := dlt.LaunchTemplates[0] + d.Set("name", lt.LaunchTemplateName) + d.Set("latest_version", lt.LatestVersionNumber) + d.Set("default_version", lt.DefaultVersionNumber) + d.Set("tags", tagsToMap(lt.Tags)) + + version := strconv.Itoa(int(*lt.LatestVersionNumber)) + dltv, err := conn.DescribeLaunchTemplateVersions(&ec2.DescribeLaunchTemplateVersionsInput{ + LaunchTemplateId: aws.String(d.Id()), + Versions: []*string{aws.String(version)}, + }) + if err != nil { + return err + } + + log.Printf("[DEBUG] Received launch template version %q (version %d)", d.Id(), *lt.LatestVersionNumber) + + ltData := dltv.LaunchTemplateVersions[0].LaunchTemplateData + + d.Set("disable_api_termination", ltData.DisableApiTermination) + d.Set("ebs_optimized", ltData.EbsOptimized) + d.Set("image_id", ltData.ImageId) + d.Set("instance_initiated_shutdown_behavior", ltData.InstanceInitiatedShutdownBehavior) + d.Set("instance_type", ltData.InstanceType) + d.Set("kernel_id", ltData.KernelId) + d.Set("key_name", ltData.KeyName) + d.Set("monitoring", ltData.Monitoring) + d.Set("ram_dist_id", ltData.RamDiskId) + d.Set("user_data", ltData.UserData) + + if err := d.Set("block_device_mappings", getBlockDeviceMappings(ltData.BlockDeviceMappings)); err != nil { + return err + } + + if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { + return err + } + + if err := d.Set("elastic_gpu_specifications", getElasticGpuSpecifications(ltData.ElasticGpuSpecifications)); err != nil { + return err + } + + if err := d.Set("iam_instance_profile", getIamInstanceProfile(ltData.IamInstanceProfile)); err != nil { + return err + } + + if err := d.Set("instance_market_options", getInstanceMarketOptions(ltData.InstanceMarketOptions)); err != nil { + return err + } + + if err := d.Set("network_interfaces", getNetworkInterfaces(ltData.NetworkInterfaces)); err != nil { + return err + } + + if err := d.Set("placement", getPlacement(ltData.Placement)); err != nil { + return err + } + + if err := d.Set("tag_specifications", getTagSpecifications(ltData.TagSpecifications)); err != nil { + return err + } + + return nil +} + +func resourceAwsLaunchTemplateUpdate(d *schema.ResourceData, meta interface{}) error { + return resourceAwsLaunchTemplateRead(d, meta) +} + +func resourceAwsLaunchTemplateDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + log.Printf("[DEBUG] Launch Template destroy: %v", d.Id()) + _, err := conn.DeleteLaunchTemplate(&ec2.DeleteLaunchTemplateInput{ + LaunchTemplateId: aws.String(d.Id()), + }) + if err != nil { + return err + } + + log.Printf("[DEBUG] Launch Template deleted: %v", d.Id()) + return nil +} + +func getBlockDeviceMappings(m []*ec2.LaunchTemplateBlockDeviceMapping) []interface{} { + s := []interface{}{} + for _, v := range m { + mapping := map[string]interface{}{ + "device_name": *v.DeviceName, + "virtual_name": *v.VirtualName, + } + if v.NoDevice != nil { + mapping["no_device"] = *v.NoDevice + } + if v.Ebs != nil { + ebs := map[string]interface{}{ + "delete_on_termination": *v.Ebs.DeleteOnTermination, + "encrypted": *v.Ebs.Encrypted, + "volume_size": *v.Ebs.VolumeSize, + "volume_type": *v.Ebs.VolumeType, + } + if v.Ebs.Iops != nil { + ebs["iops"] = *v.Ebs.Iops + } + if v.Ebs.KmsKeyId != nil { + ebs["kms_key_id"] = *v.Ebs.KmsKeyId + } + if v.Ebs.SnapshotId != nil { + ebs["snapshot_id"] = *v.Ebs.SnapshotId + } + + mapping["ebs"] = ebs + } + s = append(s, mapping) + } + return s +} + +func getCreditSpecification(cs *ec2.CreditSpecification) []interface{} { + s := []interface{}{} + if cs != nil { + s = append(s, map[string]interface{}{ + "cpu_credits": *cs.CpuCredits, + }) + } + return s +} + +func getElasticGpuSpecifications(e []*ec2.ElasticGpuSpecificationResponse) []interface{} { + s := []interface{}{} + for _, v := range e { + s = append(s, map[string]interface{}{ + "type": *v.Type, + }) + } + return s +} + +func getIamInstanceProfile(i *ec2.LaunchTemplateIamInstanceProfileSpecification) []interface{} { + s := []interface{}{} + if i != nil { + s = append(s, map[string]interface{}{ + "arn": *i.Arn, + "name": *i.Name, + }) + } + return s +} + +func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []interface{} { + s := []interface{}{} + if m != nil { + spot := []interface{}{} + so := m.SpotOptions + if so != nil { + spot = append(spot, map[string]interface{}{ + "block_duration_minutes": *so.BlockDurationMinutes, + "instance_interruption_behavior": *so.InstanceInterruptionBehavior, + "max_price": *so.MaxPrice, + "spot_instance_type": *so.SpotInstanceType, + "valid_until": *so.ValidUntil, + }) + } + s = append(s, map[string]interface{}{ + "market_type": *m.MarketType, + "spot_options": spot, + }) + } + return s +} + +func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecification) []interface{} { + s := []interface{}{} + for _, v := range n { + var ipv6Addresses []string + var ipv4Addresses []string + + networkInterface := map[string]interface{}{ + "associate_public_ip_address": *v.AssociatePublicIpAddress, + "delete_on_termination": *v.DeleteOnTermination, + "description": *v.Description, + "device_index": int(*v.DeviceIndex), + "ipv6_address_count": int(*v.Ipv6AddressCount), + "network_interface_id": *v.NetworkInterfaceId, + "private_ip_address": *v.PrivateIpAddress, + "ipv4_address_count": int(*v.SecondaryPrivateIpAddressCount), + "subnet_id": *v.SubnetId, + } + + for _, address := range v.Ipv6Addresses { + ipv6Addresses = append(ipv6Addresses, *address.Ipv6Address) + } + networkInterface["ipv6_addresses"] = ipv6Addresses + + for _, address := range v.PrivateIpAddresses { + ipv4Addresses = append(ipv4Addresses, *address.PrivateIpAddress) + } + networkInterface["ipv4_addresses"] = ipv4Addresses + + s = append(s, networkInterface) + } + return s +} + +func getPlacement(p *ec2.LaunchTemplatePlacement) []interface{} { + s := []interface{}{} + if p != nil { + s = append(s, map[string]interface{}{ + "affinity": *p.Affinity, + "availability_zone": *p.AvailabilityZone, + "group_name": *p.GroupName, + "host_id": *p.HostId, + "spread_domain": *p.SpreadDomain, + "tenancy": *p.Tenancy, + }) + } + return s +} + +func getTagSpecifications(t []*ec2.LaunchTemplateTagSpecification) []interface{} { + s := []interface{}{} + for _, v := range t { + s = append(s, map[string]interface{}{ + "resource_type": v.ResourceType, + "tags": tagsToMap(v.Tags), + }) + } + return s +} + +type launchTemplateOpts struct { + BlockDeviceMappings []*ec2.LaunchTemplateBlockDeviceMappingRequest + CreditSpecification *ec2.CreditSpecificationRequest + DisableApiTermination *bool + EbsOptimized *bool + ElasticGpuSpecifications []*ec2.ElasticGpuSpecification + IamInstanceProfile *ec2.LaunchTemplateIamInstanceProfileSpecificationRequest + ImageId *string + InstanceInitiatedShutdownBehavior *string + InstanceMarketOptions *ec2.LaunchTemplateInstanceMarketOptionsRequest + InstanceType *string + KernelId *string + KeyName *string + Monitoring *ec2.LaunchTemplatesMonitoringRequest + NetworkInterfaces []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest + Placement *ec2.LaunchTemplatePlacementRequest + RamDiskId *string + SecurityGroupIds []*string + SecurityGroups []*string + TagSpecifications []*ec2.LaunchTemplateTagSpecificationRequest + UserData *string +} + +func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*launchTemplateOpts, error) { + opts := &launchTemplateOpts{ + DisableApiTermination: aws.Bool(d.Get("disable_api_termination").(bool)), + EbsOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), + ImageId: aws.String(d.Get("image_id").(string)), + InstanceInitiatedShutdownBehavior: aws.String(d.Get("instance_initiated_shutdown_behavior").(string)), + InstanceType: aws.String(d.Get("instance_type").(string)), + KernelId: aws.String(d.Get("kernel_id").(string)), + KeyName: aws.String(d.Get("key_name").(string)), + RamDiskId: aws.String(d.Get("ram_disk_id").(string)), + UserData: aws.String(d.Get("user_data").(string)), + } + + if v, ok := d.GetOk("block_device_mappings"); ok { + var blockDeviceMappings []*ec2.LaunchTemplateBlockDeviceMappingRequest + bdms := v.(*schema.Set).List() + + for _, bdm := range bdms { + blockDeviceMap := bdm.(map[string]interface{}) + blockDeviceMappings = append(blockDeviceMappings, readBlockDeviceMappingFromConfig(blockDeviceMap)) + } + opts.BlockDeviceMappings = blockDeviceMappings + } + + if v, ok := d.GetOk("credit_specification"); ok { + cs := v.(*schema.Set).List() + + if len(cs) > 0 { + csData := cs[0].(map[string]interface{}) + csr := &ec2.CreditSpecificationRequest{ + CpuCredits: aws.String(csData["cpu_credits"].(string)), + } + opts.CreditSpecification = csr + } + } + + if v, ok := d.GetOk("elastic_gpu_specifications"); ok { + var elasticGpuSpecifications []*ec2.ElasticGpuSpecification + egsList := v.(*schema.Set).List() + + for _, egs := range egsList { + elasticGpuSpecification := egs.(map[string]interface{}) + elasticGpuSpecifications = append(elasticGpuSpecifications, &ec2.ElasticGpuSpecification{ + Type: aws.String(elasticGpuSpecification["type"].(string)), + }) + } + opts.ElasticGpuSpecifications = elasticGpuSpecifications + } + + if v, ok := d.GetOk("iam_instance_profile"); ok { + iip := v.(*schema.Set).List() + + if len(iip) > 0 { + iipData := iip[0].(map[string]interface{}) + iamInstanceProfile := &ec2.LaunchTemplateIamInstanceProfileSpecificationRequest{ + Arn: aws.String(iipData["arn"].(string)), + Name: aws.String(iipData["name"].(string)), + } + opts.IamInstanceProfile = iamInstanceProfile + } + } + + if v, ok := d.GetOk("instance_market_options"); ok { + imo := v.(*schema.Set).List() + + if len(imo) > 0 { + imoData := imo[0].(map[string]interface{}) + spotOptions := &ec2.LaunchTemplateSpotMarketOptionsRequest{} + + if v := imoData["spot_options"]; v != nil { + so := v.(map[string]interface{}) + spotOptions.BlockDurationMinutes = aws.Int64(int64(so["block_duration_minutes"].(int))) + spotOptions.InstanceInterruptionBehavior = aws.String(so["instance_interruption_behavior"].(string)) + spotOptions.MaxPrice = aws.String(so["max_price"].(string)) + spotOptions.SpotInstanceType = aws.String(so["spot_instance_type"].(string)) + + t, err := time.Parse(awsSpotInstanceTimeLayout, so["valid_until"].(string)) + if err != nil { + return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) + } + spotOptions.ValidUntil = aws.Time(t) + } + + instanceMarketOptions := &ec2.LaunchTemplateInstanceMarketOptionsRequest{ + MarketType: aws.String(imoData["market_type"].(string)), + SpotOptions: spotOptions, + } + + opts.InstanceMarketOptions = instanceMarketOptions + } + } + + if v, ok := d.GetOk("monitoring"); ok { + monitoring := &ec2.LaunchTemplatesMonitoringRequest{ + Enabled: aws.Bool(v.(bool)), + } + opts.Monitoring = monitoring + } + + if v, ok := d.GetOk("network_interfaces"); ok { + var networkInterfaces []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest + niList := v.(*schema.Set).List() + + for _, ni := range niList { + var ipv4Addresses []*ec2.PrivateIpAddressSpecification + var ipv6Addresses []*ec2.InstanceIpv6AddressRequest + ni := ni.(map[string]interface{}) + + privateIpAddress := ni["private_ip_address"].(string) + networkInterface := &ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{ + AssociatePublicIpAddress: aws.Bool(ni["associate_public_ip_address"].(bool)), + DeleteOnTermination: aws.Bool(ni["delete_on_termination"].(bool)), + Description: aws.String(ni["description"].(string)), + DeviceIndex: aws.Int64(int64(ni["device_index"].(int))), + NetworkInterfaceId: aws.String(ni["network_interface_id"].(string)), + PrivateIpAddress: aws.String(privateIpAddress), + SubnetId: aws.String(ni["subnet_id"].(string)), + } + + ipv6AddressList := ni["ipv6_addresses"].(*schema.Set).List() + for _, address := range ipv6AddressList { + ipv6Addresses = append(ipv6Addresses, &ec2.InstanceIpv6AddressRequest{ + Ipv6Address: aws.String(address.(string)), + }) + } + networkInterface.Ipv6AddressCount = aws.Int64(int64(len(ipv6AddressList))) + networkInterface.Ipv6Addresses = ipv6Addresses + + ipv4AddressList := ni["ipv4_addresses"].(*schema.Set).List() + for _, address := range ipv4AddressList { + privateIp := &ec2.PrivateIpAddressSpecification{ + Primary: aws.Bool(address.(string) == privateIpAddress), + PrivateIpAddress: aws.String(address.(string)), + } + ipv4Addresses = append(ipv4Addresses, privateIp) + } + networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(len(ipv4AddressList))) + networkInterface.PrivateIpAddresses = ipv4Addresses + + networkInterfaces = append(networkInterfaces, networkInterface) + } + opts.NetworkInterfaces = networkInterfaces + } + + if v, ok := d.GetOk("placement"); ok { + p := v.(*schema.Set).List() + + if len(p) > 0 { + pData := p[0].(map[string]interface{}) + placement := &ec2.LaunchTemplatePlacementRequest{ + Affinity: aws.String(pData["affinity"].(string)), + AvailabilityZone: aws.String(pData["availability_zone"].(string)), + GroupName: aws.String(pData["group_name"].(string)), + HostId: aws.String(pData["host_id"].(string)), + SpreadDomain: aws.String(pData["spread_domain"].(string)), + Tenancy: aws.String(pData["tenancy"].(string)), + } + opts.Placement = placement + } + } + + if v, ok := d.GetOk("tag_specifications"); ok { + var tagSpecifications []*ec2.LaunchTemplateTagSpecificationRequest + t := v.(*schema.Set).List() + + for _, ts := range t { + tsData := ts.(map[string]interface{}) + tags := tagsFromMap(tsData) + tagSpecification := &ec2.LaunchTemplateTagSpecificationRequest{ + ResourceType: aws.String(tsData["resource_type"].(string)), + Tags: tags, + } + tagSpecifications = append(tagSpecifications, tagSpecification) + } + opts.TagSpecifications = tagSpecifications + } + + return opts, nil +} + +func readBlockDeviceMappingFromConfig(bdm map[string]interface{}) *ec2.LaunchTemplateBlockDeviceMappingRequest { + blockDeviceMapping := &ec2.LaunchTemplateBlockDeviceMappingRequest{} + + if v := bdm["device_name"]; v != nil { + blockDeviceMapping.DeviceName = aws.String(v.(string)) + } + + if v := bdm["no_device"]; v != nil { + blockDeviceMapping.NoDevice = aws.String(v.(string)) + } + + if v := bdm["virtual_name"]; v != nil { + blockDeviceMapping.VirtualName = aws.String(v.(string)) + } + + if v := bdm["ebs"]; v.(*schema.Set).Len() > 0 { + ebs := v.(*schema.Set).List() + if len(ebs) > 0 { + ebsData := ebs[0] + //log.Printf("ebsData: %+v\n", ebsData) + blockDeviceMapping.Ebs = readEbsBlockDeviceFromConfig(ebsData.(map[string]interface{})) + } + } + + //log.Printf("block device mapping: %+v\n", *blockDeviceMapping) + return blockDeviceMapping +} + +func readEbsBlockDeviceFromConfig(ebs map[string]interface{}) *ec2.LaunchTemplateEbsBlockDeviceRequest { + ebsDevice := &ec2.LaunchTemplateEbsBlockDeviceRequest{} + + if v := ebs["delete_on_termination"]; v != nil { + ebsDevice.DeleteOnTermination = aws.Bool(v.(bool)) + } + + if v := ebs["encrypted"]; v != nil { + ebsDevice.Encrypted = aws.Bool(v.(bool)) + } + + if v := ebs["iops"]; v != nil { + ebsDevice.Iops = aws.Int64(int64(v.(int))) + } + + if v := ebs["kms_key_id"]; v != nil { + ebsDevice.KmsKeyId = aws.String(v.(string)) + } + + if v := ebs["snapshot_id"]; v != nil { + ebsDevice.SnapshotId = aws.String(v.(string)) + } + + if v := ebs["volume_size"]; v != nil { + ebsDevice.VolumeSize = aws.Int64(int64(v.(int))) + } + + if v := ebs["volume_type"]; v != nil { + ebsDevice.VolumeType = aws.String(v.(string)) + } + + return ebsDevice +} diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go new file mode 100644 index 00000000000..68ad8fb7f3d --- /dev/null +++ b/aws/resource_aws_launch_template_test.go @@ -0,0 +1,199 @@ +package aws + +import ( + "fmt" + "log" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSLaunchTemplate_basic(t *testing.T) { + var template ec2.LaunchTemplate + resName := "aws_launch_template.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_basic, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resName, &template), + resource.TestCheckResourceAttr(resName, "default_version", "1"), + resource.TestCheckResourceAttr(resName, "latest_version", "1"), + ), + }, + }, + }) +} + +func TestAccAWSLaunchTemplate_data(t *testing.T) { + var template ec2.LaunchTemplate + resName := "aws_launch_template.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_data, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resName, &template), + resource.TestCheckResourceAttr(resName, "block_device_mappings.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttrSet(resName, "disable_api_termination"), + resource.TestCheckResourceAttr(resName, "elastic_gpu_specifications.#", "1"), + resource.TestCheckResourceAttr(resName, "iam_instance_profile.#", "1"), + resource.TestCheckResourceAttrSet(resName, "image_id"), + resource.TestCheckResourceAttrSet(resName, "instance_initiated_shutdown_behavior"), + resource.TestCheckResourceAttr(resName, "instance_market_options.#", "1"), + resource.TestCheckResourceAttrSet(resName, "instance_type"), + resource.TestCheckResourceAttrSet(resName, "kernel_id"), + resource.TestCheckResourceAttrSet(resName, "key_name"), + resource.TestCheckResourceAttrSet(resName, "monitoring"), + resource.TestCheckResourceAttr(resName, "network_interfaces.#", "1"), + resource.TestCheckResourceAttr(resName, "placement.#", "1"), + resource.TestCheckResourceAttrSet(resName, "ram_disk_id"), + resource.TestCheckResourceAttr(resName, "vpc_security_group_ids.#", "1"), + resource.TestCheckResourceAttr(resName, "tag_specifications.#", "1"), + resource.TestCheckResourceAttr(resName, "tags.#", "1"), + ), + }, + }, + }) +} + +func testAccCheckAWSLaunchTemplateExists(n string, t *ec2.LaunchTemplate) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Launch Template ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + resp, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ + LaunchTemplateIds: []*string{aws.String(rs.Primary.ID)}, + }) + if err != nil { + return err + } + + if len(resp.LaunchTemplates) != 1 || *resp.LaunchTemplates[0].LaunchTemplateId != rs.Primary.ID { + return fmt.Errorf("Launch Template not found") + } + + *t = *resp.LaunchTemplates[0] + + return nil + } +} + +func testAccCheckAWSLaunchTemplateDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_launch_template" { + continue + } + + resp, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ + LaunchTemplateIds: []*string{aws.String(rs.Primary.ID)}, + }) + + if err == nil { + if len(resp.LaunchTemplates) != 0 && *resp.LaunchTemplates[0].LaunchTemplateId == rs.Primary.ID { + return fmt.Errorf("Launch Template still exists") + } + } + + ae, ok := err.(awserr.Error) + if !ok { + return err + } + if ae.Code() != "InvalidLaunchTemplateId.NotFound" { + log.Printf("aws error code: %s", ae.Code()) + return err + } + } + + return nil +} + +const testAccAWSLaunchTemplateConfig_basic = ` +resource "aws_launch_template" "foo" { + name = "foo" +} +` + +const testAccAWSLaunchTemplateConfig_data = ` +resource "aws_launch_template" "foo" { + name = "foo" + + block_device_mappings { + device_name = "test" + } + + credit_specification { + cpu_credits = "standard" + } + + disable_api_termination = true + + ebs_optimized = true + + elastic_gpu_specifications { + type = "test" + } + + iam_instance_profile { + name = "test" + } + + image_id = "ami-test" + + instance_initiated_shutdown_behavior = "test" + + instance_market_options { + market_type = "test" + } + + instance_type = "t2.micro" + + kernel_id = "test" + + key_name = "test" + + monitoring = true + + network_interfaces { + associate_public_ip_address = true + } + + placement { + availability_zone = "test" + } + + ram_disk_id = "test" + + vpc_security_group_ids = ["test"] + + tag_specifications { + resource_type = "instance" + tags { + Name = "test" + } + } +} +` diff --git a/aws/validators.go b/aws/validators.go index a20a0321941..05b0ab4ef91 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1740,3 +1740,15 @@ func validateDynamoDbTableAttributes(d *schema.ResourceDiff) error { return nil } + +func validateLaunchTemplateName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if strings.HasSuffix(k, "prefix") && len(value) > 99 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 99 characters, name is limited to 125", k)) + } else if !strings.HasSuffix(k, "prefix") && len(value) > 125 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 125 characters", k)) + } else if !regexp.MustCompile(`^[0-9a-zA-Z()./_]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q can only alphanumeric characters and ()./_ symbols", k)) + } + return +} diff --git a/aws/validators_test.go b/aws/validators_test.go index e32679e35cc..3b52c162907 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -2521,3 +2521,45 @@ func TestValidateAmazonSideAsn(t *testing.T) { } } } + +func TestValidateLaunchTemplateName(t *testing.T) { + validNames := []string{ + "fooBAR123", + "(./_)", + } + for _, v := range validNames { + _, errors := validateLaunchTemplateName(v, "name") + if len(errors) != 0 { + t.Fatalf("%q should be a valid Launch Template name: %q", v, errors) + } + } + + invalidNames := []string{ + "tf", + strings.Repeat("W", 126), // > 125 + "invalid-", + "invalid*", + "invalid\name", + "inavalid&", + "invalid+", + "invalid!", + "invalid:", + "invalid;", + } + for _, v := range invalidNames { + _, errors := validateLaunchTemplateName(v, "name") + if len(errors) == 0 { + t.Fatalf("%q should be an invalid Launch Template name: %q", v, errors) + } + } + + invalidNamePrefixes := []string{ + strings.Repeat("W", 100), // > 99 + } + for _, v := range invalidNamePrefixes { + _, errors := validateLaunchTemplateName(v, "name_prefix") + if len(errors) == 0 { + t.Fatalf("%q should be an invalid Launch Template name prefix: %q", v, errors) + } + } +} \ No newline at end of file From 237439ad59c47cfbd2af867cde5017b6b95d55f7 Mon Sep 17 00:00:00 2001 From: kl4w Date: Tue, 23 Jan 2018 22:03:21 -0500 Subject: [PATCH 0187/3316] implement update function --- aws/resource_aws_launch_template.go | 158 ++++++++++++----------- aws/resource_aws_launch_template_test.go | 1 - aws/validators_test.go | 2 +- 3 files changed, 83 insertions(+), 78 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index b80303444ac..2f8c9338fd0 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -410,33 +410,10 @@ func resourceAwsLaunchTemplateCreate(d *schema.ResourceData, meta interface{}) e return err } - launchTemplateDataOpts := &ec2.RequestLaunchTemplateData{ - BlockDeviceMappings: launchTemplateData.BlockDeviceMappings, - CreditSpecification: launchTemplateData.CreditSpecification, - DisableApiTermination: launchTemplateData.DisableApiTermination, - EbsOptimized: launchTemplateData.EbsOptimized, - ElasticGpuSpecifications: launchTemplateData.ElasticGpuSpecifications, - IamInstanceProfile: launchTemplateData.IamInstanceProfile, - ImageId: launchTemplateData.ImageId, - InstanceInitiatedShutdownBehavior: launchTemplateData.InstanceInitiatedShutdownBehavior, - InstanceMarketOptions: launchTemplateData.InstanceMarketOptions, - InstanceType: launchTemplateData.InstanceType, - KernelId: launchTemplateData.KernelId, - KeyName: launchTemplateData.KeyName, - Monitoring: launchTemplateData.Monitoring, - NetworkInterfaces: launchTemplateData.NetworkInterfaces, - Placement: launchTemplateData.Placement, - RamDiskId: launchTemplateData.RamDiskId, - SecurityGroups: launchTemplateData.SecurityGroups, - SecurityGroupIds: launchTemplateData.SecurityGroupIds, - TagSpecifications: launchTemplateData.TagSpecifications, - UserData: launchTemplateData.UserData, - } - launchTemplateOpts := &ec2.CreateLaunchTemplateInput{ ClientToken: aws.String(resource.UniqueId()), LaunchTemplateName: aws.String(ltName), - LaunchTemplateData: launchTemplateDataOpts, + LaunchTemplateData: launchTemplateData, } resp, err := conn.CreateLaunchTemplate(launchTemplateOpts) @@ -540,6 +517,26 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err } func resourceAwsLaunchTemplateUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + if !d.IsNewResource() { + launchTemplateData, err := buildLaunchTemplateData(d, meta) + if err != nil { + return err + } + + launchTemplateVersionOpts := &ec2.CreateLaunchTemplateVersionInput{ + ClientToken: aws.String(resource.UniqueId()), + LaunchTemplateId: aws.String(d.Id()), + LaunchTemplateData: launchTemplateData, + } + + _, createErr := conn.CreateLaunchTemplateVersion(launchTemplateVersionOpts) + if createErr != nil { + return createErr + } + } + return resourceAwsLaunchTemplateRead(d, meta) } @@ -626,6 +623,9 @@ func getIamInstanceProfile(i *ec2.LaunchTemplateIamInstanceProfileSpecification) func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []interface{} { s := []interface{}{} if m != nil { + mo := map[string]interface{}{ + "market_type": *m.MarketType, + } spot := []interface{}{} so := m.SpotOptions if so != nil { @@ -636,11 +636,9 @@ func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []inte "spot_instance_type": *so.SpotInstanceType, "valid_until": *so.ValidUntil, }) + mo["spot_options"] = spot } - s = append(s, map[string]interface{}{ - "market_type": *m.MarketType, - "spot_options": spot, - }) + s = append(s, mo) } return s } @@ -666,12 +664,16 @@ func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecifi for _, address := range v.Ipv6Addresses { ipv6Addresses = append(ipv6Addresses, *address.Ipv6Address) } - networkInterface["ipv6_addresses"] = ipv6Addresses + if len(ipv6Addresses) > 0 { + networkInterface["ipv6_addresses"] = ipv6Addresses + } for _, address := range v.PrivateIpAddresses { ipv4Addresses = append(ipv4Addresses, *address.PrivateIpAddress) } - networkInterface["ipv4_addresses"] = ipv4Addresses + if len(ipv4Addresses) > 0 { + networkInterface["ipv4_addresses"] = ipv4Addresses + } s = append(s, networkInterface) } @@ -697,47 +699,48 @@ func getTagSpecifications(t []*ec2.LaunchTemplateTagSpecification) []interface{} s := []interface{}{} for _, v := range t { s = append(s, map[string]interface{}{ - "resource_type": v.ResourceType, + "resource_type": *v.ResourceType, "tags": tagsToMap(v.Tags), }) } return s } -type launchTemplateOpts struct { - BlockDeviceMappings []*ec2.LaunchTemplateBlockDeviceMappingRequest - CreditSpecification *ec2.CreditSpecificationRequest - DisableApiTermination *bool - EbsOptimized *bool - ElasticGpuSpecifications []*ec2.ElasticGpuSpecification - IamInstanceProfile *ec2.LaunchTemplateIamInstanceProfileSpecificationRequest - ImageId *string - InstanceInitiatedShutdownBehavior *string - InstanceMarketOptions *ec2.LaunchTemplateInstanceMarketOptionsRequest - InstanceType *string - KernelId *string - KeyName *string - Monitoring *ec2.LaunchTemplatesMonitoringRequest - NetworkInterfaces []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest - Placement *ec2.LaunchTemplatePlacementRequest - RamDiskId *string - SecurityGroupIds []*string - SecurityGroups []*string - TagSpecifications []*ec2.LaunchTemplateTagSpecificationRequest - UserData *string -} +func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.RequestLaunchTemplateData, error) { + opts := &ec2.RequestLaunchTemplateData{ + UserData: aws.String(d.Get("user_data").(string)), + } + + if v, ok := d.GetOk("image_id"); ok { + opts.ImageId = aws.String(v.(string)) + } + + if v, ok := d.GetOk("instance_initiated_shutdown_behavior"); ok { + opts.InstanceInitiatedShutdownBehavior = aws.String(v.(string)) + } + + if v, ok := d.GetOk("instance_type"); ok { + opts.InstanceType = aws.String(v.(string)) + } + + if v, ok := d.GetOk("kernel_id"); ok { + opts.KernelId = aws.String(v.(string)) + } -func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*launchTemplateOpts, error) { - opts := &launchTemplateOpts{ - DisableApiTermination: aws.Bool(d.Get("disable_api_termination").(bool)), - EbsOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), - ImageId: aws.String(d.Get("image_id").(string)), - InstanceInitiatedShutdownBehavior: aws.String(d.Get("instance_initiated_shutdown_behavior").(string)), - InstanceType: aws.String(d.Get("instance_type").(string)), - KernelId: aws.String(d.Get("kernel_id").(string)), - KeyName: aws.String(d.Get("key_name").(string)), - RamDiskId: aws.String(d.Get("ram_disk_id").(string)), - UserData: aws.String(d.Get("user_data").(string)), + if v, ok := d.GetOk("key_name"); ok { + opts.KeyName = aws.String(v.(string)) + } + + if v, ok := d.GetOk("ram_disk_id"); ok { + opts.RamDiskId = aws.String(v.(string)) + } + + if v, ok := d.GetOk("disable_api_termination"); ok { + opts.DisableApiTermination = aws.Bool(v.(bool)) + } + + if v, ok := d.GetOk("ebs_optimized"); ok { + opts.EbsOptimized = aws.Bool(v.(bool)) } if v, ok := d.GetOk("block_device_mappings"); ok { @@ -796,18 +799,21 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*launchT imoData := imo[0].(map[string]interface{}) spotOptions := &ec2.LaunchTemplateSpotMarketOptionsRequest{} - if v := imoData["spot_options"]; v != nil { - so := v.(map[string]interface{}) - spotOptions.BlockDurationMinutes = aws.Int64(int64(so["block_duration_minutes"].(int))) - spotOptions.InstanceInterruptionBehavior = aws.String(so["instance_interruption_behavior"].(string)) - spotOptions.MaxPrice = aws.String(so["max_price"].(string)) - spotOptions.SpotInstanceType = aws.String(so["spot_instance_type"].(string)) - - t, err := time.Parse(awsSpotInstanceTimeLayout, so["valid_until"].(string)) - if err != nil { - return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) + if v, ok := imoData["spot_options"]; ok { + vL := v.(*schema.Set).List() + for _, v := range vL { + so := v.(map[string]interface{}) + spotOptions.BlockDurationMinutes = aws.Int64(int64(so["block_duration_minutes"].(int))) + spotOptions.InstanceInterruptionBehavior = aws.String(so["instance_interruption_behavior"].(string)) + spotOptions.MaxPrice = aws.String(so["max_price"].(string)) + spotOptions.SpotInstanceType = aws.String(so["spot_instance_type"].(string)) + + t, err := time.Parse(awsSpotInstanceTimeLayout, so["valid_until"].(string)) + if err != nil { + return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) + } + spotOptions.ValidUntil = aws.Time(t) } - spotOptions.ValidUntil = aws.Time(t) } instanceMarketOptions := &ec2.LaunchTemplateInstanceMarketOptionsRequest{ @@ -894,7 +900,7 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*launchT for _, ts := range t { tsData := ts.(map[string]interface{}) - tags := tagsFromMap(tsData) + tags := tagsFromMap(tsData["tags"].(map[string]interface{})) tagSpecification := &ec2.LaunchTemplateTagSpecificationRequest{ ResourceType: aws.String(tsData["resource_type"].(string)), Tags: tags, diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index 68ad8fb7f3d..4f1a6970f84 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -63,7 +63,6 @@ func TestAccAWSLaunchTemplate_data(t *testing.T) { resource.TestCheckResourceAttrSet(resName, "ram_disk_id"), resource.TestCheckResourceAttr(resName, "vpc_security_group_ids.#", "1"), resource.TestCheckResourceAttr(resName, "tag_specifications.#", "1"), - resource.TestCheckResourceAttr(resName, "tags.#", "1"), ), }, }, diff --git a/aws/validators_test.go b/aws/validators_test.go index 3b52c162907..6ae30ec98aa 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -2562,4 +2562,4 @@ func TestValidateLaunchTemplateName(t *testing.T) { t.Fatalf("%q should be an invalid Launch Template name prefix: %q", v, errors) } } -} \ No newline at end of file +} From 50eae6dad3cef185bf14cfefd698af65574d7ce6 Mon Sep 17 00:00:00 2001 From: kl4w Date: Tue, 23 Jan 2018 22:18:52 -0500 Subject: [PATCH 0188/3316] name cannot be less than 3 chars --- aws/validators.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aws/validators.go b/aws/validators.go index 05b0ab4ef91..34fd7ab0232 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1743,7 +1743,9 @@ func validateDynamoDbTableAttributes(d *schema.ResourceDiff) error { func validateLaunchTemplateName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) - if strings.HasSuffix(k, "prefix") && len(value) > 99 { + if len(value) < 3 { + errors = append(errors, fmt.Errorf("%q cannot be less than 3 characters", k)) + } else if strings.HasSuffix(k, "prefix") && len(value) > 99 { errors = append(errors, fmt.Errorf("%q cannot be longer than 99 characters, name is limited to 125", k)) } else if !strings.HasSuffix(k, "prefix") && len(value) > 125 { errors = append(errors, fmt.Errorf("%q cannot be longer than 125 characters", k)) From aabb541850cdbb5754222683298a36ce55847963 Mon Sep 17 00:00:00 2001 From: Kash Date: Mon, 26 Feb 2018 10:17:20 -0500 Subject: [PATCH 0189/3316] add an update test --- aws/resource_aws_launch_template_test.go | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index 4f1a6970f84..a58d752e1d0 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -69,6 +69,36 @@ func TestAccAWSLaunchTemplate_data(t *testing.T) { }) } +func TestAccAWSLaunchTemplate_update(t *testing.T) { + var template ec2.LaunchTemplate + resName := "aws_launch_template.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_basic, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resName, &template), + resource.TestCheckResourceAttr(resName, "default_version", "1"), + resource.TestCheckResourceAttr(resName, "latest_version", "1"), + ), + }, + { + Config: testAccAWSLaunchTemplateConfig_data, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resName, &template), + resource.TestCheckResourceAttr(resName, "default_version", "1"), + resource.TestCheckResourceAttr(resName, "latest_version", "2"), + resource.TestCheckResourceAttrSet(resName, "image_id"), + ), + }, + }, + }) +} + func testAccCheckAWSLaunchTemplateExists(n string, t *ec2.LaunchTemplate) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] From 4a26f38be86b7e38a1af6a1b00c93e859b5ca7ff Mon Sep 17 00:00:00 2001 From: Kash Date: Thu, 1 Mar 2018 10:46:24 -0500 Subject: [PATCH 0190/3316] add documentation for launch template resource --- website/aws.erb | 4 + website/docs/r/launch_template.html.markdown | 235 +++++++++++++++++++ 2 files changed, 239 insertions(+) create mode 100644 website/docs/r/launch_template.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 39911e116cc..f7b183777ec 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -794,6 +794,10 @@ aws_launch_configuration + > + aws_launch_template + + > aws_lb_cookie_stickiness_policy diff --git a/website/docs/r/launch_template.html.markdown b/website/docs/r/launch_template.html.markdown new file mode 100644 index 00000000000..25b39af8901 --- /dev/null +++ b/website/docs/r/launch_template.html.markdown @@ -0,0 +1,235 @@ +--- +layout: "aws" +page_title: "AWS: aws_launch_template" +sidebar_current: "docs-aws-resource-launch-template" +description: |- + Provides an EC2 launch template resource. Can be used to create instances or auto scaling groups. +--- + +# aws_launch_template + +Provides an EC2 launch template resource. Can be used to create instances or auto scaling groups. + +-> **Note:** All arguments are optional except for either `name`, or `name_prefix`. + +## Example Usage + +```hcl +resource "aws_launch_template" "foo" { + name = "foo" + + block_device_mappings { + device_name = "test" + } + + credit_specification { + cpu_credits = "standard" + } + + disable_api_termination = true + + ebs_optimized = true + + elastic_gpu_specifications { + type = "test" + } + + iam_instance_profile { + name = "test" + } + + image_id = "ami-test" + + instance_initiated_shutdown_behavior = "test" + + instance_market_options { + market_type = "test" + } + + instance_type = "t2.micro" + + kernel_id = "test" + + key_name = "test" + + monitoring = true + + network_interfaces { + associate_public_ip_address = true + } + + placement { + availability_zone = "test" + } + + ram_disk_id = "test" + + vpc_security_group_ids = ["test"] + + tag_specifications { + resource_type = "instance" + tags { + Name = "test" + } + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - The name of the launch template. If you leave this blank, Terraform will auto-generate a unique name. +* `name_prefix` - Creates a unique name beginning with the specified prefix. Conflicts with `name`. +* `description` - Description of the launch template. +* `block_device_mappings` - Specify volumes to attach to the instance besides the volumes specified by the AMI. + See [Block Devices](#block-devices) below for details. +* `credit_specification` - Customize the credit specification of the instance. See [Credit + Specification](#credit-specification) below for more details. +* `disable_api_termination` - If `true`, enables [EC2 Instance + Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination) +* `ebs_optimized` - If `true`, the launched EC2 instance will be EBS-optimized. +* `elastic_gpu_specifications` - The elastic GPU to attach to the instance. See [Elastic GPU](#elastic-gpu) + below for more details. +* `iam_instance_profile` - The IAM Instance Profile to launch the instance with. See [Instance Profile](#instance-profile) + below for more details. +* `image_id` - The AMI from which to launch the instance. +* `instance_initiated_shutdown_behavior` - Shutdown behavior for the instance. Can be `stop` or `terminate`. + (Default: `stop`). +* `instance_market_options` - The market (purchasing) option for the instance. See [Market Options](#market-options) + below for details. +* `instance_type` - The type of the instance. +* `kernel_id` - The kernel ID. +* `key_name` - The key name to use for the instance. +* `monitoring` - If `true`, the launched EC2 instance will have detailed monitoring enabled. +* `network_interfaces` - Customize network interfaces to be attached at instance boot time. See [Network + Interfaces](#network-interfaces) below for more details. +* `placement` - The placement of the instance. See [Placement](#placement) below for more details. +* `ram_disk_id` - The ID of the RAM disk. +* `security_group_names` - A list of security group names to associate with. If you are creating Instances in a VPC, use + `vpc_security_group_ids` instead. +* `vpc_security_group_ids` - A list of security group IDs to associate with. +* `tag_specifications` - The tags to apply to the resources during launch. See [Tags](#tags) below for more details. +* `user_data` - The user data to provide when launching the instance. + +### Block devices + +Configure additional volumes of the instance besides specified by the AMI. It's a good idea to familiarize yourself with + [AWS's Block Device Mapping docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) + to understand the implications of using these attributes. + +Each `block_device_mappings` supports the following: + +* `device_name` - The name of the device to mount. +* `ebs` - Configure EBS volume properties. +* `no_device` - Suppresses the specified device included in the AMI's block device mapping. +* `virtual_name` - The [Instance Store Device + Name](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#InstanceStoreDeviceNames) + (e.g. `"ephemeral0"`). + +The `ebs` block supports the following: + +* `delete_on_termination` - Whether the volume should be destroyed on instance termination (Default: `true`). +* `encrypted` - Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + on the volume (Default: `false`). Cannot be used with `snapshot_id`. +* `iops` - The amount of provisioned + [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). + This must be set with a `volume_type` of `"io1"`. +* `kms_key_id` - AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. + `encrypted` must be set to `true` when this is set. +* `snapshot_id` - The Snapshot ID to mount. +* `volume_size` - The size of the volume in gigabytes. +* `volume_type` - The type of volume. Can be `"standard"`, `"gp2"`, or `"io1"`. (Default: `"standard"`). + +### Credit Specification + +Credit specification can be applied/modified to the EC2 Instance at any time. + +The `credit_specification` block supports the following: + +* `cpu_credits` - The credit option for CPU usage. Can be `"standard"` or `"unlimited"`. (Default: `"standard"`). + +### Elastic GPU + +Attach an elastic GPU the instance. + +The `elastic_gpu_specifications` block supports the following: + +* `type` - The [Elastic GPU Type](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-gpus.html#elastic-gpus-basics) + +### Instance Profile + +The [IAM Instance Profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) +to attach. + +The `iam_instance_profile` block supports the following: + +* `arn` - The Amazon Resource Name (ARN) of the instance profile. +* `name` - The name of the instance profile. + +### Market Options + +The market (purchasing) option for the instances. + +The `instance_market_options` block supports the following: + +* `market_type` - The market type. Can be `spot`. +* `spot_options` - The options for [Spot Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html) + +The `spot_options` block supports the following: + +* `block_duration_minutes` - The required duration in minutes. This value must be a multiple of 60. +* `instance_interruption_behavior` - The behavior when a Spot Instance is interrupted. Can be `hibernate`, + `stop`, or `terminate`. (Default: `terminate`). +* `max_price` - The maximum hourly price you're willing to pay for the Spot Instances. +* `spot_instance_type` - The Spot Instance request type. Can be `one-time`, or `persistent`. +* `valid_until` - The end date of the request. + + +### Network Interfaces + +Attaches one or more [Network Interfaces](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) to the instance. + +Each `network_interfaces` block supports the following: + +* `associate_public_ip_address` - Associate a public ip address with the network interface. Boolean value. +* `delete_on_termination` - Whether the network interface should be destroyed on instance termination. +* `description` - Description of the network interface. +* `device_index` - The integer index of the network interface attachment. +* `ipv6_addresses` - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. +* `network_interface_id` - The ID of the network interface to attach. +* `private_ip_address` - The primary private IPv4 address. +* `ipv4_addresses` - One or more private IPv4 addresses to associate. +* `security_groups` - A list of security group IDs to associate. +* `subnet_id` - The VPC Subnet ID to associate. + +### Placement + +The [Placement Group](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) of the instance. + +The `placement` block supports the following: + +* `affinity` - The affinity setting for an instance on a Dedicated Host. +* `availability_zone` - The Availability Zone for the instance. +* `group_name` - The name of the placement group for the instance. +* `host_id` - The ID of the Dedicated Host for the instance. +* `spread_domain` - Reserved for future use. +* `tenancy` - The tenancy of the instance (if the instance is running in a VPC). Can be `default`, `dedicated`, or `host`. + +### Tags + +The tags to apply to the resources during launch. You can tag instances and volumes. + +Each `tag_specifications` block supports the following: + +* `resource_type` - The type of resource to tag. +* `tags` - A mapping of tags to assign to the resource. + + +## Attributes Reference + +The following attributes are exported along with all argument references: + +* `id` - The ID of the launch template. +* `default_version` - The default version of the launch template. +* `latest_version` - The latest version of the launch template. From 41e3d057bd9ecfa80b1eba8c2090b13534486984 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 09:26:44 -0400 Subject: [PATCH 0191/3316] resource/aws_cognito_user_pool: Set email standard attribute to mutable --- aws/structure.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/structure.go b/aws/structure.go index 4d3d896fe81..0d176c5b45f 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -2800,7 +2800,7 @@ func cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input *cognitoidenti { AttributeDataType: aws.String(cognitoidentityprovider.AttributeDataTypeString), DeveloperOnlyAttribute: aws.Bool(false), - Mutable: aws.Bool(false), + Mutable: aws.Bool(true), Name: aws.String("email"), Required: aws.Bool(false), StringAttributeConstraints: &cognitoidentityprovider.StringAttributeConstraintsType{ From aca88da591a9dacacac8f9b259700c3421884c4b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 09:56:07 -0400 Subject: [PATCH 0192/3316] Update CHANGELOG for #3835 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f793ec819af..c1172991aad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ENHANCEMENTS: * resource/appsync_graphql_api: Support import [GH-3500] +* resource/aws_elasticache_cluster: Allow port to be optional [GH-3835] +* resource/aws_elasticache_replication_group: Allow port to be optional [GH-3835] ## 1.12.0 (March 23, 2018) From 9eaf640674e5f6d27441b10997178988940b2123 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 10:07:54 -0400 Subject: [PATCH 0193/3316] Update CHANGELOG for #3869 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1172991aad..129df625dd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * resource/appsync_graphql_api: Support import [GH-3500] * resource/aws_elasticache_cluster: Allow port to be optional [GH-3835] +* resource/aws_elasticache_cluster: Add `replication_group_id` argument [GH-3869] * resource/aws_elasticache_replication_group: Allow port to be optional [GH-3835] ## 1.12.0 (March 23, 2018) From 6c67b85ce6c622766576eff806d4680aa310369c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 10:32:34 -0400 Subject: [PATCH 0194/3316] resource/aws_lb_listener: Remove extraneous isListenerNotFound function --- aws/resource_aws_lb_listener.go | 8 +------- aws/resource_aws_lb_listener_test.go | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index e8200f9dbec..918d05250b0 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -8,7 +8,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" @@ -156,7 +155,7 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { ListenerArns: []*string{aws.String(d.Id())}, }) if err != nil { - if isListenerNotFound(err) { + if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { log.Printf("[WARN] DescribeListeners - removing %s from state", d.Id()) d.SetId("") return nil @@ -258,11 +257,6 @@ func resourceAwsLbListenerDelete(d *schema.ResourceData, meta interface{}) error return nil } -func isListenerNotFound(err error) bool { - elberr, ok := err.(awserr.Error) - return ok && elberr.Code() == "ListenerNotFound" -} - func validateLbListenerActionType() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ elbv2.ActionTypeEnumForward, diff --git a/aws/resource_aws_lb_listener_test.go b/aws/resource_aws_lb_listener_test.go index 909ad90bdb5..a92ac57410e 100644 --- a/aws/resource_aws_lb_listener_test.go +++ b/aws/resource_aws_lb_listener_test.go @@ -152,7 +152,7 @@ func testAccCheckAWSLBListenerDestroy(s *terraform.State) error { } // Verify the error - if isListenerNotFound(err) { + if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { return nil } else { return errwrap.Wrapf("Unexpected error checking LB Listener destroyed: {{err}}", err) From e02b404af063a214260a5feeee2a5c20ea11e327 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 11:11:05 -0400 Subject: [PATCH 0195/3316] resource/aws_iam_user_login_profile: Fix password_length ValidateFunc --- aws/resource_aws_iam_user_login_profile.go | 2 +- ...esource_aws_iam_user_login_profile_test.go | 58 ++++++++++++++++--- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_iam_user_login_profile.go b/aws/resource_aws_iam_user_login_profile.go index 1eb5980a4a9..ca4cf61efd4 100644 --- a/aws/resource_aws_iam_user_login_profile.go +++ b/aws/resource_aws_iam_user_login_profile.go @@ -40,7 +40,7 @@ func resourceAwsIamUserLoginProfile() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 20, - ValidateFunc: validation.StringLenBetween(4, 128), + ValidateFunc: validation.IntBetween(4, 128), }, "key_fingerprint": { diff --git a/aws/resource_aws_iam_user_login_profile_test.go b/aws/resource_aws_iam_user_login_profile_test.go index 2755f917ce6..0e55ebfea55 100644 --- a/aws/resource_aws_iam_user_login_profile_test.go +++ b/aws/resource_aws_iam_user_login_profile_test.go @@ -3,6 +3,7 @@ package aws import ( "errors" "fmt" + "strconv" "testing" "time" @@ -30,7 +31,7 @@ func TestAccAWSUserLoginProfile_basic(t *testing.T) { CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSUserLoginProfileConfig(username, "/", testPubKey1), + Config: testAccAWSUserLoginProfileConfig_Required(username, "/", testPubKey1), Check: resource.ComposeTestCheckFunc( testAccCheckAWSUserLoginProfileExists("aws_iam_user_login_profile.user", &conf), testDecryptPasswordAndTest("aws_iam_user_login_profile.user", "aws_iam_access_key.user", testPrivKey1), @@ -51,7 +52,7 @@ func TestAccAWSUserLoginProfile_keybase(t *testing.T) { CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSUserLoginProfileConfig(username, "/", "keybase:terraformacctest"), + Config: testAccAWSUserLoginProfileConfig_Required(username, "/", "keybase:terraformacctest"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSUserLoginProfileExists("aws_iam_user_login_profile.user", &conf), resource.TestCheckResourceAttrSet("aws_iam_user_login_profile.user", "encrypted_password"), @@ -72,7 +73,7 @@ func TestAccAWSUserLoginProfile_keybaseDoesntExist(t *testing.T) { Steps: []resource.TestStep{ { // We own this account but it doesn't have any key associated with it - Config: testAccAWSUserLoginProfileConfig(username, "/", "keybase:terraform_nope"), + Config: testAccAWSUserLoginProfileConfig_Required(username, "/", "keybase:terraform_nope"), ExpectError: regexp.MustCompile(`Error retrieving Public Key`), }, }, @@ -89,13 +90,35 @@ func TestAccAWSUserLoginProfile_notAKey(t *testing.T) { Steps: []resource.TestStep{ { // We own this account but it doesn't have any key associated with it - Config: testAccAWSUserLoginProfileConfig(username, "/", "lolimnotakey"), + Config: testAccAWSUserLoginProfileConfig_Required(username, "/", "lolimnotakey"), ExpectError: regexp.MustCompile(`Error encrypting Password`), }, }, }) } +func TestAccAWSUserLoginProfile_PasswordLength(t *testing.T) { + var conf iam.GetLoginProfileOutput + + passwordLength := acctest.RandIntRange(4, 128) + username := fmt.Sprintf("test-user-%d", acctest.RandInt()) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSUserLoginProfileConfig_PasswordLength(username, "/", testPubKey1, passwordLength), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserLoginProfileExists("aws_iam_user_login_profile.user", &conf), + resource.TestCheckResourceAttr("aws_iam_user_login_profile.user", "password_length", strconv.Itoa(passwordLength)), + ), + }, + }, + }) +} + func testAccCheckAWSUserLoginProfileDestroy(s *terraform.State) error { iamconn := testAccProvider.Meta().(*AWSClient).iamconn @@ -206,7 +229,7 @@ func testAccCheckAWSUserLoginProfileExists(n string, res *iam.GetLoginProfileOut } } -func testAccAWSUserLoginProfileConfig(r, p, key string) string { +func testAccAWSUserLoginProfileConfig_base(rName, path string) string { return fmt.Sprintf(` resource "aws_iam_user" "user" { name = "%s" @@ -238,13 +261,32 @@ resource "aws_iam_user_policy" "user" { resource "aws_iam_access_key" "user" { user = "${aws_iam_user.user.name}" } +`, rName, path) +} + +func testAccAWSUserLoginProfileConfig_PasswordLength(rName, path, pgpKey string, passwordLength int) string { + return fmt.Sprintf(` +%s + +resource "aws_iam_user_login_profile" "user" { + user = "${aws_iam_user.user.name}" + password_length = %d + pgp_key = < Date: Sat, 24 Mar 2018 17:20:05 +0900 Subject: [PATCH 0196/3316] resource/ecs_service: Support ServiceRegistries --- aws/resource_aws_ecs_service.go | 57 ++++++++++++ aws/resource_aws_ecs_service_test.go | 105 +++++++++++++++++++++++ website/docs/r/ecs_service.html.markdown | 10 ++- 3 files changed, 171 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 7d8b74aba70..d4f3c7ddaca 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -204,6 +204,24 @@ func resourceAwsEcsService() *schema.Resource { }, }, }, + + "service_registries": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "port": { + Type: schema.TypeInt, + Optional: true, + }, + "registry_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, } } @@ -305,6 +323,23 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.PlacementConstraints = pc } + serviceRegistries := d.Get("service_registries").(*schema.Set).List() + if len(serviceRegistries) > 0 { + srs := make([]*ecs.ServiceRegistry, 0, len(serviceRegistries)) + for _, v := range serviceRegistries { + raw := v.(map[string]interface{}) + sr := &ecs.ServiceRegistry{ + RegistryArn: aws.String(raw["registry_arn"].(string)), + } + if port, ok := raw["port"].(int); ok { + sr.Port = aws.Int64(int64(port)) + } + + srs = append(srs, sr) + } + input.ServiceRegistries = srs + } + log.Printf("[DEBUG] Creating ECS service: %s", input) // Retry due to AWS IAM & ECS eventual consistency @@ -445,6 +480,10 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("[ERR] Error setting network_configuration for (%s): %s", d.Id(), err) } + if err := d.Set("service_registries", flattenServiceRegistries(service.ServiceRegistries)); err != nil { + return fmt.Errorf("[ERR] Error setting service_registries for (%s): %s", d.Id(), err) + } + return nil } @@ -521,6 +560,24 @@ func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []map[string]interfa return results } +func flattenServiceRegistries(srs []*ecs.ServiceRegistry) []map[string]interface{} { + if len(srs) == 0 { + return nil + } + results := make([]map[string]interface{}, 0) + for _, sr := range srs { + c := make(map[string]interface{}) + if sr.Port != nil { + c["port"] = *sr.Port + } + if sr.RegistryArn != nil { + c["registry_arn"] = *sr.RegistryArn + } + results = append(results, c) + } + return results +} + func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index 5d12bcc5088..a54dc51bdb7 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -611,6 +611,30 @@ func TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration(t *testing.T) }) } +func TestAccAWSEcsService_withServiceRegistries(t *testing.T) { + var service ecs.Service + rString := acctest.RandString(8) + + clusterName := fmt.Sprintf("tf-acc-cluster-svc-w-ups-%s", rString) + tdName := fmt.Sprintf("tf-acc-td-svc-w-ups-%s", rString) + svcName := fmt.Sprintf("tf-acc-svc-w-ups-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEcsServiceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEcsService_withServiceRegistries(rString, clusterName, tdName, svcName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEcsServiceExists("aws_ecs_service.test", &service), + resource.TestCheckResourceAttr("aws_ecs_service.test", "service_registries.#", "1"), + ), + }, + }, + }) +} + func testAccCheckAWSEcsServiceDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ecsconn @@ -1688,3 +1712,84 @@ resource "aws_ecs_service" "main" { } `, sg1Name, sg2Name, clusterName, tdName, svcName, securityGroups) } + +func testAccAWSEcsService_withServiceRegistries(rName, clusterName, tdName, svcName string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "test" {} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_subnet" "test" { + count = 2 + cidr_block = "${cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)}" + availability_zone = "${data.aws_availability_zones.test.names[count.index]}" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_security_group" "test" { + name = "tf-acc-sg-%s" + vpc_id = "${aws_vpc.test.id}" + + ingress { + protocol = "-1" + from_port = 0 + to_port = 0 + cidr_blocks = ["${aws_vpc.test.cidr_block}"] + } +} + +resource "aws_service_discovery_private_dns_namespace" "test" { + name = "tf-acc-sd-%s.terraform.local" + description = "test" + vpc = "${aws_vpc.test.id}" +} + +resource "aws_service_discovery_service" "test" { + name = "tf-acc-sd-%s" + dns_config { + namespace_id = "${aws_service_discovery_private_dns_namespace.test.id}" + dns_records { + ttl = 5 + type = "SRV" + } + } +} + +resource "aws_ecs_cluster" "test" { + name = "%s" +} + +resource "aws_ecs_task_definition" "test" { + family = "%s" + network_mode = "awsvpc" + container_definitions = < **Note:** As a result of an AWS limitation, a single `load_balancer` can be attached to the ECS service at most. See [related docs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html#load-balancing-concepts). @@ -106,6 +107,13 @@ Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) +## service_registries + +`service_registries` support the following: + +* `registry_arn` - (Required) The ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(`aws_service_discovery_service`). For more information, see [Service](https://docs.aws.amazon.com/Route53/latest/APIReference/API_autonaming_Service.html) +* `port` - (Optional) The port value used if your Service Discovery service specified an SRV record. + ## Attributes Reference The following attributes are exported: @@ -122,4 +130,4 @@ ECS services can be imported using the `name` together with ecs cluster `name`, ``` $ terraform import aws_ecs_service.imported cluster-name/service-name -``` \ No newline at end of file +``` From 210740dc1af389b9597037f4582ae3e89fde5cf7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 12:38:33 -0400 Subject: [PATCH 0197/3316] Update CHANGELOG for #3919 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 129df625dd1..423898acd4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ENHANCEMENTS: * resource/aws_elasticache_cluster: Add `replication_group_id` argument [GH-3869] * resource/aws_elasticache_replication_group: Allow port to be optional [GH-3835] +BUG FIXES: + +* resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] + ## 1.12.0 (March 23, 2018) NOTES: From cedd007fb9f6f68e1ead1163ca4ad8b14c3d4e62 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 12:41:30 -0400 Subject: [PATCH 0198/3316] Update CHANGELOG for #3824 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 423898acd4a..bf00d1be798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_batch_compute_environment: Correctly set `compute_resources` in state [GH-3824] * resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] ## 1.12.0 (March 23, 2018) From 47a7b8b7cd1a5ad0d5d86b0fec58992d69001bf9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 13:03:46 -0400 Subject: [PATCH 0199/3316] Update CHANGELOG for #3789 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf00d1be798..cd6c1e0f2ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_batch_compute_environment: Correctly set `compute_resources` in state [GH-3824] +* resource/aws_cognito_user_pool: Correctly set `schema` in state [GH-3789] * resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] ## 1.12.0 (March 23, 2018) From 26083f4fa9f66b61214da2b653df8fca157c51af Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 14:01:17 -0400 Subject: [PATCH 0200/3316] Update CHANGELOG for #3901 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd6c1e0f2ee..ef3eb5503a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ BUG FIXES: * resource/aws_batch_compute_environment: Correctly set `compute_resources` in state [GH-3824] * resource/aws_cognito_user_pool: Correctly set `schema` in state [GH-3789] * resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] +* resource/aws_lb_listener: Retry CertificateNotFound errors on update for IAM eventual consistency [GH-3901] ## 1.12.0 (March 23, 2018) From 4a06602762393c818e4be585e452f02a1eec85c8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 14:33:19 -0400 Subject: [PATCH 0201/3316] resource/aws_batch_*: Refactor disable and delete functions --- aws/resource_aws_batch_compute_environment.go | 89 ++++++++++--------- ...urce_aws_batch_compute_environment_test.go | 39 +------- aws/resource_aws_batch_job_queue.go | 83 +++++++++-------- aws/resource_aws_batch_job_queue_test.go | 42 +-------- 4 files changed, 103 insertions(+), 150 deletions(-) diff --git a/aws/resource_aws_batch_compute_environment.go b/aws/resource_aws_batch_compute_environment.go index 92466691a85..896efd4c86e 100644 --- a/aws/resource_aws_batch_compute_environment.go +++ b/aws/resource_aws_batch_compute_environment.go @@ -303,52 +303,20 @@ func flattenComputeResources(computeResource *batch.ComputeResource) []map[strin func resourceAwsBatchComputeEnvironmentDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).batchconn - computeEnvironmentName := d.Get("compute_environment_name").(string) - updateInput := &batch.UpdateComputeEnvironmentInput{ - ComputeEnvironment: aws.String(computeEnvironmentName), - State: aws.String(batch.CEStateDisabled), - } - - log.Printf("[DEBUG] Delete compute environment %s.\n", updateInput) - - if _, err := conn.UpdateComputeEnvironment(updateInput); err != nil { - return err - } - - stateConf := &resource.StateChangeConf{ - Pending: []string{batch.CEStatusUpdating}, - Target: []string{batch.CEStatusValid}, - Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironmentName, conn), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 5 * time.Second, - } - if _, err := stateConf.WaitForState(); err != nil { - return err - } - - input := &batch.DeleteComputeEnvironmentInput{ - ComputeEnvironment: aws.String(computeEnvironmentName), - } - - if _, err := conn.DeleteComputeEnvironment(input); err != nil { - return err + log.Printf("[DEBUG] Disabling Batch Compute Environment: %s", computeEnvironmentName) + err := disableBatchComputeEnvironment(computeEnvironmentName, d.Timeout(schema.TimeoutDelete), conn) + if err != nil { + return fmt.Errorf("error disabling Batch Compute Environment (%s): %s", computeEnvironmentName, err) } - stateConfForDelete := &resource.StateChangeConf{ - Pending: []string{batch.CEStatusDeleting}, - Target: []string{batch.CEStatusDeleted}, - Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(computeEnvironmentName, conn), - Timeout: d.Timeout(schema.TimeoutDelete), - MinTimeout: 5 * time.Second, - } - if _, err := stateConfForDelete.WaitForState(); err != nil { - return err + log.Printf("[DEBUG] Deleting Batch Compute Environment: %s", computeEnvironmentName) + err = deleteBatchComputeEnvironment(computeEnvironmentName, d.Timeout(schema.TimeoutDelete), conn) + if err != nil { + return fmt.Errorf("error deleting Batch Compute Environment (%s): %s", computeEnvironmentName, err) } - d.SetId("") - return nil } @@ -429,3 +397,44 @@ func resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(computeEnvironmentName return result, *(computeEnvironment.Status), nil } } + +func deleteBatchComputeEnvironment(computeEnvironment string, timeout time.Duration, conn *batch.Batch) error { + input := &batch.DeleteComputeEnvironmentInput{ + ComputeEnvironment: aws.String(computeEnvironment), + } + + if _, err := conn.DeleteComputeEnvironment(input); err != nil { + return err + } + + stateChangeConf := &resource.StateChangeConf{ + Pending: []string{batch.CEStatusDeleting}, + Target: []string{batch.CEStatusDeleted}, + Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(computeEnvironment, conn), + Timeout: timeout, + MinTimeout: 5 * time.Second, + } + _, err := stateChangeConf.WaitForState() + return err +} + +func disableBatchComputeEnvironment(computeEnvironment string, timeout time.Duration, conn *batch.Batch) error { + input := &batch.UpdateComputeEnvironmentInput{ + ComputeEnvironment: aws.String(computeEnvironment), + State: aws.String(batch.CEStateDisabled), + } + + if _, err := conn.UpdateComputeEnvironment(input); err != nil { + return err + } + + stateChangeConf := &resource.StateChangeConf{ + Pending: []string{batch.CEStatusUpdating}, + Target: []string{batch.CEStatusValid}, + Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(computeEnvironment, conn), + Timeout: timeout, + MinTimeout: 5 * time.Second, + } + _, err := stateChangeConf.WaitForState() + return err +} diff --git a/aws/resource_aws_batch_compute_environment_test.go b/aws/resource_aws_batch_compute_environment_test.go index 2b19ec2b097..9225bd67ef0 100644 --- a/aws/resource_aws_batch_compute_environment_test.go +++ b/aws/resource_aws_batch_compute_environment_test.go @@ -55,47 +55,16 @@ func testSweepBatchComputeEnvironments(region string) error { } log.Printf("[INFO] Disabling Batch Compute Environment: %s", *name) - - updateInput := &batch.UpdateComputeEnvironmentInput{ - ComputeEnvironment: name, - State: aws.String(batch.CEStateDisabled), - } - if _, err := conn.UpdateComputeEnvironment(updateInput); err != nil { + err := disableBatchComputeEnvironment(*name, 20*time.Minute, conn) + if err != nil { log.Printf("[ERROR] Failed to disable Batch Compute Environment %s: %s", *name, err) continue } - stateConfForDisable := &resource.StateChangeConf{ - Pending: []string{batch.CEStatusUpdating}, - Target: []string{batch.CEStatusValid}, - Refresh: resourceAwsBatchComputeEnvironmentStatusRefreshFunc(*name, conn), - Timeout: 20 * time.Minute, - MinTimeout: 5 * time.Second, - } - if _, err := stateConfForDisable.WaitForState(); err != nil { - log.Printf("[ERROR] Failed to wait for disable of Batch Compute Environment %s: %s", *name, err) - continue - } - log.Printf("[INFO] Deleting Batch Compute Environment: %s", *name) - - deleteInput := &batch.DeleteComputeEnvironmentInput{ - ComputeEnvironment: name, - } - if _, err := conn.DeleteComputeEnvironment(deleteInput); err != nil { + err = deleteBatchComputeEnvironment(*name, 20*time.Minute, conn) + if err != nil { log.Printf("[ERROR] Failed to delete Batch Compute Environment %s: %s", *name, err) - continue - } - - stateConfForDelete := &resource.StateChangeConf{ - Pending: []string{batch.CEStatusDeleting}, - Target: []string{batch.CEStatusDeleted}, - Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(*name, conn), - Timeout: 20 * time.Minute, - MinTimeout: 5 * time.Second, - } - if _, err := stateConfForDelete.WaitForState(); err != nil { - log.Printf("[ERROR] Failed to wait for deletion of Batch Compute Environment %s: %s", *name, err) } } diff --git a/aws/resource_aws_batch_job_queue.go b/aws/resource_aws_batch_job_queue.go index 5b215b210a1..ab15da86c5f 100644 --- a/aws/resource_aws_batch_job_queue.go +++ b/aws/resource_aws_batch_job_queue.go @@ -133,64 +133,73 @@ func resourceAwsBatchJobQueueUpdate(d *schema.ResourceData, meta interface{}) er func resourceAwsBatchJobQueueDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).batchconn - sn := d.Get("name").(string) - _, err := conn.UpdateJobQueue(&batch.UpdateJobQueueInput{ - JobQueue: aws.String(sn), - State: aws.String(batch.JQStateDisabled), - }) + name := d.Get("name").(string) + + log.Printf("[DEBUG] Disabling Batch Job Queue %s", name) + err := disableBatchJobQueue(name, 10*time.Minute, conn) if err != nil { - return err + return fmt.Errorf("error disabling Batch Job Queue (%s): %s", name, err) } - // Wait until the Job Queue is disabled before deleting - stateConf := &resource.StateChangeConf{ - Pending: []string{batch.JQStatusUpdating}, - Target: []string{batch.JQStatusValid}, - Refresh: batchJobQueueRefreshStatusFunc(conn, sn), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = stateConf.WaitForState() + log.Printf("[DEBUG] Deleting Batch Job Queue %s", name) + err = deleteBatchJobQueue(name, 10*time.Minute, conn) if err != nil { - return err + return fmt.Errorf("error deleting Batch Job Queue (%s): %s", name, err) + } + + return nil +} + +func createComputeEnvironmentOrder(order []interface{}) (envs []*batch.ComputeEnvironmentOrder) { + for i, env := range order { + envs = append(envs, &batch.ComputeEnvironmentOrder{ + Order: aws.Int64(int64(i)), + ComputeEnvironment: aws.String(env.(string)), + }) } + return +} - log.Printf("[DEBUG] Trying to delete Job Queue %s", sn) - _, err = conn.DeleteJobQueue(&batch.DeleteJobQueueInput{ - JobQueue: aws.String(sn), +func deleteBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Batch) error { + _, err := conn.DeleteJobQueue(&batch.DeleteJobQueueInput{ + JobQueue: aws.String(jobQueue), }) if err != nil { return err } - deleteStateConf := &resource.StateChangeConf{ + stateChangeConf := &resource.StateChangeConf{ Pending: []string{batch.JQStateDisabled, batch.JQStatusDeleting}, Target: []string{batch.JQStatusDeleted}, - Refresh: batchJobQueueRefreshStatusFunc(conn, sn), - Timeout: 10 * time.Minute, + Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), + Timeout: timeout, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } - _, err = deleteStateConf.WaitForState() + _, err = stateChangeConf.WaitForState() + return err +} + +func disableBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Batch) error { + _, err := conn.UpdateJobQueue(&batch.UpdateJobQueueInput{ + JobQueue: aws.String(jobQueue), + State: aws.String(batch.JQStateDisabled), + }) if err != nil { - return fmt.Errorf( - "Error waiting for Job Queue (%s) to be deleted: %s", - sn, err) + return err } - d.SetId("") - return nil -} -func createComputeEnvironmentOrder(order []interface{}) (envs []*batch.ComputeEnvironmentOrder) { - for i, env := range order { - envs = append(envs, &batch.ComputeEnvironmentOrder{ - Order: aws.Int64(int64(i)), - ComputeEnvironment: aws.String(env.(string)), - }) + stateChangeConf := &resource.StateChangeConf{ + Pending: []string{batch.JQStatusUpdating}, + Target: []string{batch.JQStatusValid}, + Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), + Timeout: timeout, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, } - return + _, err = stateChangeConf.WaitForState() + return err } func getJobQueue(conn *batch.Batch, sn string) (*batch.JobQueueDetail, error) { diff --git a/aws/resource_aws_batch_job_queue_test.go b/aws/resource_aws_batch_job_queue_test.go index 99965ddcaf1..2af18c8386c 100644 --- a/aws/resource_aws_batch_job_queue_test.go +++ b/aws/resource_aws_batch_job_queue_test.go @@ -8,7 +8,6 @@ import ( "testing" "time" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" @@ -52,49 +51,16 @@ func testSweepBatchJobQueues(region string) error { } log.Printf("[INFO] Disabling Batch Job Queue: %s", *name) - - updateInput := &batch.UpdateJobQueueInput{ - JobQueue: name, - State: aws.String(batch.JQStateDisabled), - } - if _, err := conn.UpdateJobQueue(updateInput); err != nil { + err := disableBatchJobQueue(*name, 10*time.Minute, conn) + if err != nil { log.Printf("[ERROR] Failed to disable Batch Job Queue %s: %s", *name, err) continue } - stateConfForDisable := &resource.StateChangeConf{ - Pending: []string{batch.JQStatusUpdating}, - Target: []string{batch.JQStatusValid}, - Refresh: batchJobQueueRefreshStatusFunc(conn, *name), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - if _, err := stateConfForDisable.WaitForState(); err != nil { - log.Printf("[ERROR] Failed to wait for disable of Batch Job Queue %s: %s", *name, err) - continue - } - log.Printf("[INFO] Deleting Batch Job Queue: %s", *name) - - deleteInput := &batch.DeleteJobQueueInput{ - JobQueue: name, - } - if _, err := conn.DeleteJobQueue(deleteInput); err != nil { + err = deleteBatchJobQueue(*name, 10*time.Minute, conn) + if err != nil { log.Printf("[ERROR] Failed to delete Batch Job Queue %s: %s", *name, err) - continue - } - - stateConfForDelete := &resource.StateChangeConf{ - Pending: []string{batch.JQStateDisabled, batch.JQStatusDeleting}, - Target: []string{batch.JQStatusDeleted}, - Refresh: resourceAwsBatchComputeEnvironmentDeleteRefreshFunc(*name, conn), - Timeout: 10 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - if _, err := stateConfForDelete.WaitForState(); err != nil { - log.Printf("[ERROR] Failed to wait for deletion of Batch Job Queue %s: %s", *name, err) } } From 9616af65ddb04696a6e4bafb61097464ef92a77e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 15:33:39 -0400 Subject: [PATCH 0202/3316] tests/resource/aws_subnet: Add sweeper dependencies --- aws/resource_aws_subnet_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index ddf7b0d5734..043d4abe0db 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -17,9 +17,18 @@ func init() { resource.AddTestSweepers("aws_subnet", &resource.Sweeper{ Name: "aws_subnet", F: testSweepSubnets, + // When implemented, these should be moved to aws_network_interface + // and aws_network_interface set as dependency here. Dependencies: []string{ + "aws_autoscaling_group", "aws_batch_compute_environment", + "aws_beanstalk_environment", + "aws_db_instance", + "aws_elasticsearch_domain", "aws_elb", + "aws_lambda_function", + "aws_mq_broker", + "aws_redshift_cluster", }, }) } From 2905afd95e30967a0fe017910b5ab922272dd37f Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Thu, 15 Mar 2018 20:14:35 -0400 Subject: [PATCH 0203/3316] Optionally filter server certificates by path prefix. --- aws/data_source_aws_iam_server_certificate.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/aws/data_source_aws_iam_server_certificate.go b/aws/data_source_aws_iam_server_certificate.go index 29321ef43be..a628806ed41 100644 --- a/aws/data_source_aws_iam_server_certificate.go +++ b/aws/data_source_aws_iam_server_certificate.go @@ -36,6 +36,12 @@ func dataSourceAwsIAMServerCertificate() *schema.Resource { ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), }, + "path_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "latest": { Type: schema.TypeBool, Optional: true, @@ -103,8 +109,12 @@ func dataSourceAwsIAMServerCertificateRead(d *schema.ResourceData, meta interfac } var metadatas []*iam.ServerCertificateMetadata + input := &iam.ListServerCertificatesInput{} + if v, ok := d.GetOk("path_prefix"); ok { + input.PathPrefix = aws.String(v.(string)) + } log.Printf("[DEBUG] Reading IAM Server Certificate") - err := iamconn.ListServerCertificatesPages(&iam.ListServerCertificatesInput{}, func(p *iam.ListServerCertificatesOutput, lastPage bool) bool { + err := iamconn.ListServerCertificatesPages(input, func(p *iam.ListServerCertificatesOutput, lastPage bool) bool { for _, cert := range p.ServerCertificateMetadataList { if matcher(cert) { metadatas = append(metadatas, cert) From c45143346b9303cd8360209f6e85c132dfc1615c Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Mon, 26 Mar 2018 16:28:07 -0400 Subject: [PATCH 0204/3316] Add acceptance test for cert data source path prefix. --- ..._source_aws_iam_server_certificate_test.go | 35 +++++++++++++++++-- ...esource_aws_iam_server_certificate_test.go | 13 +++++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/aws/data_source_aws_iam_server_certificate_test.go b/aws/data_source_aws_iam_server_certificate_test.go index 07712b0ebf5..88370209547 100644 --- a/aws/data_source_aws_iam_server_certificate_test.go +++ b/aws/data_source_aws_iam_server_certificate_test.go @@ -46,9 +46,6 @@ func TestAccAWSDataSourceIAMServerCertificate_basic(t *testing.T) { Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckIAMServerCertificateDestroy, Steps: []resource.TestStep{ - { - Config: testAccIAMServerCertConfig(rInt), - }, { Config: testAccAwsDataIAMServerCertConfig(rInt), Check: resource.ComposeTestCheckFunc( @@ -80,6 +77,26 @@ func TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix(t *testing.T) { }) } +func TestAccAWSDataSourceIAMServerCertificate_path(t *testing.T) { + rInt := acctest.RandInt() + path := "/test-path/" + pathPrefix := "/test-path/" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckIAMServerCertificateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsDataIAMServerCertConfigPath(rInt, path, pathPrefix), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_iam_server_certificate.test", "path", path), + ), + }, + }, + }) +} + func testAccAwsDataIAMServerCertConfig(rInt int) string { return fmt.Sprintf(` %s @@ -91,6 +108,18 @@ data "aws_iam_server_certificate" "test" { `, testAccIAMServerCertConfig(rInt)) } +func testAccAwsDataIAMServerCertConfigPath(rInt int, path, pathPrefix string) string { + return fmt.Sprintf(` +%s + +data "aws_iam_server_certificate" "test" { + name = "${aws_iam_server_certificate.test_cert.name}" + path_prefix = "%s" + latest = true +} +`, testAccIAMServerCertConfig_path(rInt, path), pathPrefix) +} + var testAccAwsDataIAMServerCertConfigMatchNamePrefix = ` data "aws_iam_server_certificate" "test" { name_prefix = "MyCert" diff --git a/aws/resource_aws_iam_server_certificate_test.go b/aws/resource_aws_iam_server_certificate_test.go index 390e639e9ae..29e00362df7 100644 --- a/aws/resource_aws_iam_server_certificate_test.go +++ b/aws/resource_aws_iam_server_certificate_test.go @@ -297,6 +297,19 @@ resource "aws_iam_server_certificate" "test_cert" { `, testAccTLSServerCert) } +func testAccIAMServerCertConfig_path(rInt int, path string) string { + return fmt.Sprintf(` +%s + +resource "aws_iam_server_certificate" "test_cert" { + name = "terraform-test-cert-%d" + path = "%s" + certificate_body = "${tls_self_signed_cert.example.cert_pem}" + private_key = "${tls_private_key.example.private_key_pem}" +} +`, testAccTLSServerCert, rInt, path) +} + // iam-ssl-unix-line-endings func testAccIAMServerCertConfig_file(rInt int, fName string) string { return fmt.Sprintf(` From 22de0522f688cf2e13b7943dd67a4500d0780d4b Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Mon, 26 Mar 2018 16:36:50 -0400 Subject: [PATCH 0205/3316] Document cert data source path prefix. --- website/docs/d/iam_server_certificate.html.markdown | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/docs/d/iam_server_certificate.html.markdown b/website/docs/d/iam_server_certificate.html.markdown index cc51baa37f1..dce2fed5082 100644 --- a/website/docs/d/iam_server_certificate.html.markdown +++ b/website/docs/d/iam_server_certificate.html.markdown @@ -34,6 +34,7 @@ resource "aws_elb" "elb" { ## Argument Reference * `name_prefix` - prefix of cert to filter by +* `path_prefix` - prefix of path to filter by * `name` - exact name of the cert to lookup * `latest` - sort results by expiration date. returns the certificate with expiration date in furthest in the future. @@ -50,5 +51,3 @@ resource "aws_elb" "elb" { The terraform import function will read in certificate body, certificate chain (if it exists), id, name, path, and arn. It will not retrieve the private key which is not available through the AWS API. - - From dd9761829ae150d340a5db826d9d21b568d78ea4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 19:51:02 -0400 Subject: [PATCH 0206/3316] Update CHANGELOG for #3892 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef3eb5503a1..6be984aa68b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ BUG FIXES: * resource/aws_cognito_user_pool: Correctly set `schema` in state [GH-3789] * resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] * resource/aws_lb_listener: Retry CertificateNotFound errors on update for IAM eventual consistency [GH-3901] +* resource/aws_security_group: Retry read on creation for EC2 eventual consistency [GH-3892] ## 1.12.0 (March 23, 2018) From 36a966e79ccd327309757e7c41c3eae3d380afb9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 19:53:02 -0400 Subject: [PATCH 0207/3316] tests/resource/aws_autoscaling_group: Sweep additional groups --- aws/resource_aws_autoscaling_group_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_autoscaling_group_test.go b/aws/resource_aws_autoscaling_group_test.go index 6c21d213345..f1f0cfcb7f3 100644 --- a/aws/resource_aws_autoscaling_group_test.go +++ b/aws/resource_aws_autoscaling_group_test.go @@ -46,7 +46,7 @@ func testSweepAutoscalingGroups(region string) error { for _, asg := range resp.AutoScalingGroups { var testOptGroup bool - for _, testName := range []string{"foobar", "terraform-", "tf-test"} { + for _, testName := range []string{"foobar", "terraform-", "tf-test", "tf-asg-"} { if strings.HasPrefix(*asg.AutoScalingGroupName, testName) { testOptGroup = true break @@ -162,7 +162,7 @@ func TestAccAWSAutoScalingGroup_basic(t *testing.T) { } func TestAccAWSAutoScalingGroup_namePrefix(t *testing.T) { - nameRegexp := regexp.MustCompile("^test-") + nameRegexp := regexp.MustCompile("^tf-test-") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -251,7 +251,7 @@ func TestAccAWSAutoScalingGroup_terminationPolicies(t *testing.T) { func TestAccAWSAutoScalingGroup_tags(t *testing.T) { var group autoscaling.Group - randName := fmt.Sprintf("tfautotags-%s", acctest.RandString(5)) + randName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -360,7 +360,7 @@ func TestAccAWSAutoScalingGroup_WithLoadBalancer(t *testing.T) { func TestAccAWSAutoScalingGroup_withPlacementGroup(t *testing.T) { var group autoscaling.Group - randName := fmt.Sprintf("tf_placement_test-%s", acctest.RandString(5)) + randName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -952,7 +952,7 @@ resource "aws_autoscaling_group" "test" { desired_capacity = 0 max_size = 0 min_size = 0 - name_prefix = "test-" + name_prefix = "tf-test-" launch_configuration = "${aws_launch_configuration.test.name}" } ` From cf080529e87dd1761828b2e3154381ffc1ba3bfa Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 26 Mar 2018 20:29:20 -0400 Subject: [PATCH 0208/3316] docs/resource/aws_elasticache_*: Cross reference cluster and replication group resources --- website/docs/r/elasticache_cluster.html.markdown | 2 ++ website/docs/r/elasticache_replication_group.html.markdown | 2 ++ 2 files changed, 4 insertions(+) diff --git a/website/docs/r/elasticache_cluster.html.markdown b/website/docs/r/elasticache_cluster.html.markdown index 008bff87932..643bfc1a3a9 100644 --- a/website/docs/r/elasticache_cluster.html.markdown +++ b/website/docs/r/elasticache_cluster.html.markdown @@ -9,6 +9,8 @@ description: |- # aws_elasticache_cluster Provides an ElastiCache Cluster resource, which manages a Memcached cluster or Redis instance. +For working with Redis (Cluster Mode Enabled) replication groups, see the +[`aws_elasticache_replication_group` resource](/docs/providers/aws/r/elasticache_replication_group.html). ~> **Note:** When you change an attribute, such as `node_type`, by default it is applied in the next maintenance window. Because of this, Terraform may report diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index 75f2517d79b..6978e582149 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -9,6 +9,8 @@ description: |- # aws_elasticache_replication_group Provides an ElastiCache Replication Group resource. +For working with Memcached or single primary Redis instances (Cluster Mode Disabled), see the +[`aws_elasticache_cluster` resource](/docs/providers/aws/r/elasticache_cluster.html). ## Example Usage From dfc091f2c1482b3d6429c6fcee3bbc482d3a23c7 Mon Sep 17 00:00:00 2001 From: Argishti Rostamian Date: Mon, 26 Mar 2018 18:26:02 -0700 Subject: [PATCH 0209/3316] Fix example formatting in kinesis_firehose splunk destination --- ...sis_firehose_delivery_stream.html.markdown | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown index 0b850d23490..370058eae89 100644 --- a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown +++ b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown @@ -212,22 +212,23 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { ```hcl resource "aws_kinesis_firehose_delivery_stream" "test_stream" { - depends_on = ["aws_iam_role_policy.firehose"] - name = "terraform-kinesis-firehose-basicsplunktest-%d" + name = "terraform-kinesis-firehose-test-stream" destination = "splunk" + s3_configuration { - role_arn = "${aws_iam_role.firehose.arn}" - bucket_arn = "${aws_s3_bucket.bucket.arn}" - buffer_size = 10 - buffer_interval = 400 + role_arn = "${aws_iam_role.firehose.arn}" + bucket_arn = "${aws_s3_bucket.bucket.arn}" + buffer_size = 10 + buffer_interval = 400 compression_format = "GZIP" } + splunk_configuration { - hec_endpoint = "https://http-inputs-mydomain.splunkcloud.com:443" - hec_token = "51D4DA16-C61B-4F5F-8EC7-ED4301342A4A" + hec_endpoint = "https://http-inputs-mydomain.splunkcloud.com:443" + hec_token = "51D4DA16-C61B-4F5F-8EC7-ED4301342A4A" hec_acknowledgment_timeout = 600 - hec_endpoint_type = "Event" - s3_backup_mode = "FailedEventsOnly" + hec_endpoint_type = "Event" + s3_backup_mode = "FailedEventsOnly" } } ``` From a60862fab53ecd902734ee48e0a0f1e2c47b7c79 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 26 Mar 2018 18:37:18 -0700 Subject: [PATCH 0210/3316] Retry UpdateProject similar to CreateProject since IAM is eventually consistent --- aws/resource_aws_codebuild_project.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index d6025575bda..61f0729ae85 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -527,7 +527,22 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) // But its a slice of pointers so if not set for every update, they get removed. params.Tags = tagsFromMapCodeBuild(d.Get("tags").(map[string]interface{})) - _, err := conn.UpdateProject(params) + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + var err error + + _, err = conn.UpdateProject(params) + if err != nil { + // Work around eventual consistency of IAM + if isAWSErr(err, "InvalidInputException", "CodeBuild is not authorized to perform") { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + + }) if err != nil { return fmt.Errorf( From 20b148fed56633f6ad1a0d46ce39eb4dc6ae26db Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 26 Mar 2018 19:56:37 -0700 Subject: [PATCH 0211/3316] Support CodeBuild environment variable type, git clone depth, insecure ssl options --- aws/resource_aws_codebuild_project.go | 49 ++++++++++++-- aws/resource_aws_codebuild_project_test.go | 79 +++++++++++++++++++--- 2 files changed, 116 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 61f0729ae85..7506805bc35 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -106,6 +106,15 @@ func resourceAwsCodeBuildProject() *schema.Resource { Type: schema.TypeString, Required: true, }, + "type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.EnvironmentVariableTypePlaintext, + codebuild.EnvironmentVariableTypeParameterStore, + }, false), + Default: codebuild.EnvironmentVariableTypePlaintext, + }, }, }, }, @@ -184,6 +193,15 @@ func resourceAwsCodeBuildProject() *schema.Resource { codebuild.SourceTypeGithubEnterprise, }, false), }, + "git_clone_depth": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(0), + }, + "insecure_ssl": { + Type: schema.TypeBool, + Optional: true, + }, }, }, Required: true, @@ -373,6 +391,10 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm projectEnvironmentVar.Value = &v } + if v := config["type"].(string); v != "" { + projectEnvironmentVar.Type = &v + } + projectEnvironmentVariables = append(projectEnvironmentVariables, projectEnvironmentVar) } @@ -408,11 +430,15 @@ func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { sourceType := data["type"].(string) location := data["location"].(string) buildspec := data["buildspec"].(string) + gitCloneDepth := aws.Int64(int64(data["git_clone_depth"].(int))) + insecureSsl := aws.Bool(data["insecure_ssl"].(bool)) projectSource = codebuild.ProjectSource{ - Type: &sourceType, - Location: &location, - Buildspec: &buildspec, + Type: &sourceType, + Location: &location, + Buildspec: &buildspec, + GitCloneDepth: gitCloneDepth, + InsecureSsl: insecureSsl, } if v, ok := data["auth"]; ok { @@ -638,6 +664,14 @@ func flattenAwsCodeBuildProjectSource(source *codebuild.ProjectSource) []interfa m["location"] = *source.Location } + if source.GitCloneDepth != nil { + m["git_clone_depth"] = *source.GitCloneDepth + } + + if source.InsecureSsl != nil { + m["insecure_ssl"] = *source.InsecureSsl + } + l[0] = m return l @@ -683,7 +717,7 @@ func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { for _, e := range environmentVariables { if e != nil { // Old statefiles might have nil values in them ev := e.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s:%s-", ev["name"].(string), ev["value"].(string))) + buf.WriteString(fmt.Sprintf("%s:%s:%s-", ev["name"].(string), ev["type"].(string), ev["value"].(string))) } } @@ -701,6 +735,12 @@ func resourceAwsCodeBuildProjectSourceHash(v interface{}) int { if v, ok := m["location"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } + if v, ok := m["git_clone_depth"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(int))) + } + if v, ok := m["insecure_ssl"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(bool))) + } return hashcode.String(buf.String()) } @@ -726,6 +766,7 @@ func environmentVariablesToMap(environmentVariables []*codebuild.EnvironmentVari item := map[string]interface{}{} item["name"] = *env.Name item["value"] = *env.Value + item["type"] = *env.Type envVariables = append(envVariables, item) } } diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index e4a5ee3a657..e348814f1c8 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -28,12 +28,42 @@ func TestAccAWSCodeBuildProject_basic(t *testing.T) { testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), resource.TestCheckResourceAttr( "aws_codebuild_project.foo", "build_timeout", "5"), + resource.TestCheckResourceAttr( + "aws_codebuild_project.foo", "environment.2427541259.environment_variable.0.name", "SOME_KEY"), + // default + resource.TestCheckResourceAttr( + "aws_codebuild_project.foo", "environment.2427541259.environment_variable.0.type", "PLAINTEXT"), + resource.TestCheckResourceAttr( + "aws_codebuild_project.foo", "environment.2427541259.environment_variable.1.type", "PLAINTEXT"), + resource.TestCheckResourceAttr( + "aws_codebuild_project.foo", "environment.2427541259.environment_variable.2.type", "PARAMETER_STORE"), + // resource.TestCheckResourceAttr( + // "aws_codebuild_project.foo", "build_timeout", "5"), ), }, }, }) } +/* + environment_variable = { + "name" = "SOME_KEY" + "value" = "SOME_VALUE" + } + + environment_variable = { + "name" = "SOME_OTHER_KEY" + "value" = "SOME_OTHER_VALUE" + "type" = "PLAINTEXT" + } + + environment_variable = { + "name" = "SOME_PARAMSTORE_KEY" + "value" = "SOME_PARAMSTORE_VALUE" + "type" = "PARAMETER_STORE" + } +*/ + func TestAccAWSCodeBuildProject_vpc(t *testing.T) { name := acctest.RandString(10) @@ -83,6 +113,8 @@ func TestAccAWSCodeBuildProject_sourceAuth(t *testing.T) { authType := "OAUTH" name := acctest.RandString(10) resourceName := "aws_codebuild_project.foo" + gitCloneDepth := "5" + insecureSsl := "true" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -97,8 +129,10 @@ func TestAccAWSCodeBuildProject_sourceAuth(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_sourceAuth(name, authResource, authType), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName), - resource.TestCheckResourceAttr(resourceName, "source.1060593600.auth.2706882902.resource", authResource), - resource.TestCheckResourceAttr(resourceName, "source.1060593600.auth.2706882902.type", authType), + resource.TestCheckResourceAttr(resourceName, "source.1493867278.git_clone_depth", gitCloneDepth), + resource.TestCheckResourceAttr(resourceName, "source.1493867278.insecure_ssl", insecureSsl), + resource.TestCheckResourceAttr(resourceName, "source.1493867278.auth.2706882902.resource", authResource), + resource.TestCheckResourceAttr(resourceName, "source.1493867278.auth.2706882902.type", authType), ), }, }, @@ -313,11 +347,25 @@ resource "aws_codebuild_project" "foo" { "name" = "SOME_KEY" "value" = "SOME_VALUE" } + + environment_variable = { + "name" = "SOME_OTHER_KEY" + "value" = "SOME_OTHER_VALUE" + "type" = "PLAINTEXT" + } + + environment_variable = { + "name" = "SOME_PARAMSTORE_KEY" + "value" = "SOME_PARAMSTORE_VALUE" + "type" = "PARAMETER_STORE" + } } source { - type = "GITHUB" - location = "https://github.com/hashicorp/packer.git" + type = "GITHUB" + location = "https://github.com/hashicorp/packer.git" + git_clone_depth = 1 + insecure_ssl = true } tags { @@ -398,11 +446,24 @@ resource "aws_codebuild_project" "foo" { "name" = "SOME_OTHERKEY" "value" = "SOME_OTHERVALUE" } + + environment_variable = { + "name" = "SOME_OTHER_KEY" + "value" = "SOME_OTHER_VALUE" + "type" = "PLAINTEXT" + } + + environment_variable = { + "name" = "SOME_PARAMSTORE_KEY" + "value" = "SOME_PARAMSTORE_VALUE" + "type" = "PARAMETER_STORE" + } } source { - type = "GITHUB" - location = "https://github.com/hashicorp/packer.git" + type = "GITHUB" + location = "https://github.com/hashicorp/packer.git" + git_clone_depth = 5 } tags { @@ -567,8 +628,10 @@ resource "aws_codebuild_project" "foo" { } source { - type = "GITHUB" - location = "https://github.com/hashicorp/packer.git" + type = "GITHUB" + location = "https://github.com/hashicorp/packer.git" + git_clone_depth = "5" + insecure_ssl = "true" auth { resource = "%[2]s" From afac9424a67c7da3608b3873290c8742590e8fa1 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 26 Mar 2018 20:21:44 -0700 Subject: [PATCH 0212/3316] Fix Sprintf vet errors not passing string --- aws/resource_aws_codebuild_project.go | 5 +++-- aws/resource_aws_codebuild_project_test.go | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 7506805bc35..61b3c29957c 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "regexp" + "strconv" "time" "github.com/aws/aws-sdk-go/aws" @@ -736,10 +737,10 @@ func resourceAwsCodeBuildProjectSourceHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } if v, ok := m["git_clone_depth"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(int))) + buf.WriteString(fmt.Sprintf("%s-", strconv.Itoa(v.(int)))) } if v, ok := m["insecure_ssl"]; ok { - buf.WriteString(fmt.Sprintf("%s-", v.(bool))) + buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) } return hashcode.String(buf.String()) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index e348814f1c8..74594bb91e7 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -129,10 +129,10 @@ func TestAccAWSCodeBuildProject_sourceAuth(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_sourceAuth(name, authResource, authType), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName), - resource.TestCheckResourceAttr(resourceName, "source.1493867278.git_clone_depth", gitCloneDepth), - resource.TestCheckResourceAttr(resourceName, "source.1493867278.insecure_ssl", insecureSsl), - resource.TestCheckResourceAttr(resourceName, "source.1493867278.auth.2706882902.resource", authResource), - resource.TestCheckResourceAttr(resourceName, "source.1493867278.auth.2706882902.type", authType), + resource.TestCheckResourceAttr(resourceName, "source.2491592095.git_clone_depth", gitCloneDepth), + resource.TestCheckResourceAttr(resourceName, "source.2491592095.insecure_ssl", insecureSsl), + resource.TestCheckResourceAttr(resourceName, "source.2491592095.auth.2706882902.resource", authResource), + resource.TestCheckResourceAttr(resourceName, "source.2491592095.auth.2706882902.type", authType), ), }, }, From a61a65d6e7d934bfa4d4c9546eb69e311876fbed Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 26 Mar 2018 20:22:14 -0700 Subject: [PATCH 0213/3316] Remove unintended testing comment --- aws/resource_aws_codebuild_project_test.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 74594bb91e7..fa4204aafbc 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -45,25 +45,6 @@ func TestAccAWSCodeBuildProject_basic(t *testing.T) { }) } -/* - environment_variable = { - "name" = "SOME_KEY" - "value" = "SOME_VALUE" - } - - environment_variable = { - "name" = "SOME_OTHER_KEY" - "value" = "SOME_OTHER_VALUE" - "type" = "PLAINTEXT" - } - - environment_variable = { - "name" = "SOME_PARAMSTORE_KEY" - "value" = "SOME_PARAMSTORE_VALUE" - "type" = "PARAMETER_STORE" - } -*/ - func TestAccAWSCodeBuildProject_vpc(t *testing.T) { name := acctest.RandString(10) From e3c29ee74265a5ca892fe94a8c3824d38858ffac Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 26 Mar 2018 21:12:26 -0700 Subject: [PATCH 0214/3316] Add GHE example, document new attributes --- .../docs/r/codebuild_project.html.markdown | 62 ++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index 33ef73c13a1..fc615527c99 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -86,12 +86,67 @@ resource "aws_codebuild_project" "foo" { environment_variable { "name" = "SOME_KEY2" "value" = "SOME_VALUE2" + "type" = "PARAMETER_STORE" } } source { - type = "GITHUB" - location = "https://github.com/mitchellh/packer.git" + type = "GITHUB" + location = "https://github.com/mitchellh/packer.git" + git_clone_depth = 1 + } + + vpc_config { + vpc_id = "vpc-725fca" + + subnets = [ + "subnet-ba35d2e0", + "subnet-ab129af1", + ] + + security_group_ids = [ + "sg-f9f27d91", + "sg-e4f48g23", + ] + } + + tags { + "Environment" = "Test" + } +} + +resource "aws_codebuild_project" "github_enterprise" { + name = "test-project" + description = "test_codebuild_project" + build_timeout = "5" + service_role = "${aws_iam_role.codebuild_role.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "aws/codebuild/nodejs:6.3.1" + type = "LINUX_CONTAINER" + + environment_variable { + "name" = "SOME_KEY1" + "value" = "SOME_VALUE1" + } + + environment_variable { + "name" = "SOME_KEY2" + "value" = "SOME_VALUE2" + "type" = "PARAMETER_STORE" + } + } + + source { + type = "GITHUB_ENTERPRISE" + location = "https://somewhere/org/repo.git" + git_clone_depth = 1 + insecure_ssl = true } vpc_config { @@ -150,6 +205,7 @@ The following arguments are supported: * `name` - (Required) The environment variable's name or key. * `value` - (Required) The environment variable's value. +* `type` - (Optional) The environment variable's type. Valid values for this parameter are: `PLAINTEXT` or `PARAMETER_STORE`. `source` supports the following: @@ -157,6 +213,8 @@ The following arguments are supported: * `auth` - (Optional) Information about the authorization settings for AWS CodeBuild to access the source code to be built. Auth blocks are documented below. * `buildspec` - (Optional) The build spec declaration to use for this build project's related builds. * `location` - (Optional) The location of the source code from git or s3. +* `git_clone_depth` - (Optional) Truncate git history to this many commits. +* `insecure_ssl` - (Optional) Ignore SSL warnings when connecting to source control. `auth` supports the following: From 681377a76daf43849b5e0ae8aa8ca3cc5b7da430 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 06:18:57 -0400 Subject: [PATCH 0215/3316] resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration * Properly read cluster_mode back into Terraform state * Improves cluster_mode update plan output by migrating state from TypeSet to TypeList * Allows configurable timeouts for create, delete, and update --- ...ource_aws_elasticache_replication_group.go | 89 +++++++++++++++++-- ...s_elasticache_replication_group_migrate.go | 59 ++++++++++++ ...sticache_replication_group_migrate_test.go | 73 +++++++++++++++ ..._aws_elasticache_replication_group_test.go | 86 +++++++++++++----- ...lasticache_replication_group.html.markdown | 11 ++- 5 files changed, 286 insertions(+), 32 deletions(-) create mode 100644 aws/resource_aws_elasticache_replication_group_migrate.go create mode 100644 aws/resource_aws_elasticache_replication_group_migrate_test.go diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index 55f75d70912..4b8c30ccfed 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -63,7 +63,7 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { } resourceSchema["cluster_mode"] = &schema.Schema{ - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -76,7 +76,6 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { "num_node_groups": { Type: schema.TypeInt, Required: true, - ForceNew: true, }, }, }, @@ -118,7 +117,14 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { State: schema.ImportStatePassthrough, }, - Schema: resourceSchema, + Schema: resourceSchema, + SchemaVersion: 1, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(50 * time.Minute), + Delete: schema.DefaultTimeout(40 * time.Minute), + Update: schema.DefaultTimeout(40 * time.Minute), + }, } } @@ -213,8 +219,8 @@ func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta i } if clusterModeOk { - clusterModeAttributes := clusterMode.(*schema.Set).List() - attributes := clusterModeAttributes[0].(map[string]interface{}) + clusterModeList := clusterMode.([]interface{}) + attributes := clusterModeList[0].(map[string]interface{}) if v, ok := attributes["num_node_groups"]; ok { params.NumNodeGroups = aws.Int64(int64(v.(int))) @@ -241,7 +247,7 @@ func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta i Pending: pending, Target: []string{"available"}, Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: 50 * time.Minute, + Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } @@ -304,6 +310,13 @@ func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta int d.Set("replication_group_description", rgp.Description) d.Set("number_cache_clusters", len(rgp.MemberClusters)) + if aws.BoolValue(rgp.ClusterEnabled) { + if err := d.Set("cluster_mode", flattenElasticacheNodeGroupsToClusterMode(rgp.NodeGroups)); err != nil { + return fmt.Errorf("error setting cluster_mode attribute: %s", err) + } + } else { + d.Set("cluster_mode", []interface{}{}) + } d.Set("replication_group_id", rgp.ReplicationGroupId) if rgp.NodeGroups != nil { @@ -364,6 +377,51 @@ func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta int func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn + if d.HasChange("cluster_mode.0.num_node_groups") { + o, n := d.GetChange("cluster_mode.0.num_node_groups") + oldNumNodeGroups := o.(int) + newNumNodeGroups := n.(int) + + input := &elasticache.ModifyReplicationGroupShardConfigurationInput{ + ApplyImmediately: aws.Bool(true), + NodeGroupCount: aws.Int64(int64(newNumNodeGroups)), + ReplicationGroupId: aws.String(d.Id()), + } + + if oldNumNodeGroups > newNumNodeGroups { + // Node Group IDs are 1 indexed: 0001 through 0015 + // Loop from highest old ID until we reach highest new ID + nodeGroupsToRemove := []string{} + for i := oldNumNodeGroups; i > newNumNodeGroups; i-- { + nodeGroupID := fmt.Sprintf("%04d", i) + nodeGroupsToRemove = append(nodeGroupsToRemove, nodeGroupID) + } + input.NodeGroupsToRemove = aws.StringSlice(nodeGroupsToRemove) + } + + log.Printf("[DEBUG] Modifying Elasticache Replication Group (%s) shard configuration: %s", d.Id(), input) + _, err := conn.ModifyReplicationGroupShardConfiguration(input) + if err != nil { + return fmt.Errorf("error modifying Elasticache Replication Group shard configuration: %s", err) + } + + pending := []string{"creating", "modifying", "snapshotting"} + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: []string{"available"}, + Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), + Timeout: d.Timeout(schema.TimeoutUpdate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + log.Printf("[DEBUG] Waiting for Elasticache Replication Group (%s) shard reconfiguration completion", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for Elasticache Replication Group (%s) shard reconfiguration completion: %s", d.Id(), err) + } + } + requestUpdate := false params := &elasticache.ModifyReplicationGroupInput{ ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), @@ -451,7 +509,7 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i Pending: pending, Target: []string{"available"}, Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: 40 * time.Minute, + Timeout: d.Timeout(schema.TimeoutUpdate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } @@ -487,7 +545,7 @@ func resourceAwsElasticacheReplicationGroupDelete(d *schema.ResourceData, meta i Pending: []string{"creating", "available", "deleting"}, Target: []string{}, Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "", []string{}), - Timeout: 40 * time.Minute, + Timeout: d.Timeout(schema.TimeoutDelete), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } @@ -547,6 +605,21 @@ func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replic } } +func flattenElasticacheNodeGroupsToClusterMode(nodeGroups []*elasticache.NodeGroup) []map[string]interface{} { + m := map[string]interface{}{ + "num_node_groups": 0, + "replicas_per_node_group": 0, + } + + if len(nodeGroups) == 0 { + return []map[string]interface{}{m} + } + + m["num_node_groups"] = len(nodeGroups) + m["replicas_per_node_group"] = (len(nodeGroups[0].NodeGroupMembers) - 1) + return []map[string]interface{}{m} +} + func validateAwsElastiCacheReplicationGroupEngine(v interface{}, k string) (ws []string, errors []error) { if strings.ToLower(v.(string)) != "redis" { errors = append(errors, fmt.Errorf("The only acceptable Engine type when using Replication Groups is Redis")) diff --git a/aws/resource_aws_elasticache_replication_group_migrate.go b/aws/resource_aws_elasticache_replication_group_migrate.go new file mode 100644 index 00000000000..0daf561f413 --- /dev/null +++ b/aws/resource_aws_elasticache_replication_group_migrate.go @@ -0,0 +1,59 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/hashicorp/terraform/terraform" +) + +func resourceAwsElasticacheReplicationGroupMigrateState(v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { + switch v { + case 0: + log.Println("[INFO] Found AWS Elasticache Replication Group State v0; migrating to v1") + return migrateAwsElasticacheReplicationGroupStateV0toV1(is) + default: + return is, fmt.Errorf("Unexpected schema version: %d", v) + } +} + +func migrateAwsElasticacheReplicationGroupStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { + if is.Empty() || is.Attributes == nil { + log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") + return is, nil + } + + numCountStr, ok := is.Attributes["cluster_mode.#"] + if !ok || numCountStr == "0" { + log.Println("[DEBUG] Empty cluster_mode in InstanceState; no need to migrate.") + return is, nil + } + + for k, v := range is.Attributes { + if !strings.HasPrefix(k, "cluster_mode.") || strings.HasPrefix(k, "cluster_mode.#") { + continue + } + + // cluster_mode.HASHCODE.attr + path := strings.Split(k, ".") + if len(path) != 3 { + return is, fmt.Errorf("Found unexpected cluster_mode field: %#v", k) + } + hashcode, attr := path[1], path[2] + if hashcode == "0" { + // Skip already migrated attribute + continue + } + + if attr == "replicas_per_node_group" { + is.Attributes["cluster_mode.0.replicas_per_node_group"] = v + } + if attr == "num_node_groups" { + is.Attributes["cluster_mode.0.num_node_groups"] = v + } + delete(is.Attributes, k) + } + log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) + return is, nil +} diff --git a/aws/resource_aws_elasticache_replication_group_migrate_test.go b/aws/resource_aws_elasticache_replication_group_migrate_test.go new file mode 100644 index 00000000000..1379d539a47 --- /dev/null +++ b/aws/resource_aws_elasticache_replication_group_migrate_test.go @@ -0,0 +1,73 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/terraform" +) + +func TestAwsElasticacheReplicationGroupMigrateState(t *testing.T) { + cases := map[string]struct { + StateVersion int + Attributes map[string]string + Expected map[string]string + Meta interface{} + }{ + "v0Tov1": { + StateVersion: 0, + Attributes: map[string]string{ + "cluster_mode.#": "1", + "cluster_mode.4170186206.num_node_groups": "2", + "cluster_mode.4170186206.replicas_per_node_group": "1", + }, + Expected: map[string]string{ + "cluster_mode.#": "1", + "cluster_mode.0.num_node_groups": "2", + "cluster_mode.0.replicas_per_node_group": "1", + }, + }, + } + + for tn, tc := range cases { + is := &terraform.InstanceState{ + ID: "rg-migration", + Attributes: tc.Attributes, + } + is, err := resourceAwsElasticacheReplicationGroupMigrateState(tc.StateVersion, is, tc.Meta) + + if err != nil { + t.Fatalf("bad: %s, err: %#v", tn, err) + } + + for k, v := range tc.Expected { + if is.Attributes[k] != v { + t.Fatalf( + "bad: %s\n\n expected: %#v -> %#v\n got: %#v -> %#v\n in: %#v", + tn, k, v, k, is.Attributes[k], is.Attributes) + } + } + } +} + +func TestAwsElasticacheReplicationGroupMigrateState_empty(t *testing.T) { + var is *terraform.InstanceState + var meta interface{} + + // should handle nil + is, err := resourceAwsElasticacheReplicationGroupMigrateState(0, is, meta) + + if err != nil { + t.Fatalf("err: %#v", err) + } + if is != nil { + t.Fatalf("expected nil instancestate, got: %#v", is) + } + + // should handle non-nil but empty + is = &terraform.InstanceState{} + is, err = resourceAwsElasticacheReplicationGroupMigrateState(0, is, meta) + + if err != nil { + t.Fatalf("err: %#v", err) + } +} diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index eb441b00c06..158bdc1ad90 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -25,6 +25,8 @@ func TestAccAWSElasticacheReplicationGroup_basic(t *testing.T) { Config: testAccAWSElasticacheReplicationGroupConfig(acctest.RandString(10)), Check: resource.ComposeTestCheckFunc( testAccCheckAWSElasticacheReplicationGroupExists("aws_elasticache_replication_group.bar", &rg), + resource.TestCheckResourceAttr( + "aws_elasticache_replication_group.bar", "cluster_mode.#", "0"), resource.TestCheckResourceAttr( "aws_elasticache_replication_group.bar", "number_cache_clusters", "2"), resource.TestCheckResourceAttr( @@ -260,10 +262,10 @@ func TestAccAWSElasticacheReplicationGroup_redisClusterInVpc2(t *testing.T) { }) } -func TestAccAWSElasticacheReplicationGroup_nativeRedisCluster(t *testing.T) { +func TestAccAWSElasticacheReplicationGroup_ClusterMode_Basic(t *testing.T) { var rg elasticache.ReplicationGroup - rInt := acctest.RandInt() rName := acctest.RandString(10) + resourceName := "aws_elasticache_replication_group.bar" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -271,21 +273,59 @@ func TestAccAWSElasticacheReplicationGroup_nativeRedisCluster(t *testing.T) { CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rInt, rName), + Config: testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rName, 2, 1), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSElasticacheReplicationGroupExists("aws_elasticache_replication_group.bar", &rg), - resource.TestCheckResourceAttr( - "aws_elasticache_replication_group.bar", "number_cache_clusters", "4"), - resource.TestCheckResourceAttr( - "aws_elasticache_replication_group.bar", "cluster_mode.#", "1"), - resource.TestCheckResourceAttr( - "aws_elasticache_replication_group.bar", "cluster_mode.4170186206.num_node_groups", "2"), - resource.TestCheckResourceAttr( - "aws_elasticache_replication_group.bar", "cluster_mode.4170186206.replicas_per_node_group", "1"), - resource.TestCheckResourceAttr( - "aws_elasticache_replication_group.bar", "port", "6379"), - resource.TestCheckResourceAttrSet( - "aws_elasticache_replication_group.bar", "configuration_endpoint_address"), + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &rg), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "4"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.num_node_groups", "2"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.replicas_per_node_group", "1"), + resource.TestCheckResourceAttr(resourceName, "port", "6379"), + resource.TestCheckResourceAttrSet(resourceName, "configuration_endpoint_address"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheReplicationGroup_ClusterMode_NumNodeGroups(t *testing.T) { + var rg elasticache.ReplicationGroup + rName := acctest.RandString(10) + resourceName := "aws_elasticache_replication_group.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rName, 3, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &rg), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "6"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.num_node_groups", "3"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.replicas_per_node_group", "1"), + ), + }, + { + Config: testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rName, 1, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &rg), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "2"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.num_node_groups", "1"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.replicas_per_node_group", "1"), + ), + }, + { + Config: testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rName, 2, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &rg), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "6"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.#", "1"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.num_node_groups", "2"), + resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.replicas_per_node_group", "1"), ), }, }, @@ -977,7 +1017,7 @@ resource "aws_elasticache_replication_group" "bar" { }`, rInt, rInt, rName) } -func testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rInt int, rName string) string { +func testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rName string, numNodeGroups, replicasPerNodeGroup int) string { return fmt.Sprintf(` resource "aws_vpc" "foo" { cidr_block = "192.168.0.0/16" @@ -1005,7 +1045,7 @@ resource "aws_subnet" "bar" { } resource "aws_elasticache_subnet_group" "bar" { - name = "tf-test-cache-subnet-%03d" + name = "tf-test-%[1]s" description = "tf-test-cache-subnet-group-descr" subnet_ids = [ "${aws_subnet.foo.id}", @@ -1014,7 +1054,7 @@ resource "aws_elasticache_subnet_group" "bar" { } resource "aws_security_group" "bar" { - name = "tf-test-security-group-%03d" + name = "tf-test-%[1]s" description = "tf-test-security-group-descr" vpc_id = "${aws_vpc.foo.id}" ingress { @@ -1026,7 +1066,7 @@ resource "aws_security_group" "bar" { } resource "aws_elasticache_replication_group" "bar" { - replication_group_id = "tf-%s" + replication_group_id = "tf-%[1]s" replication_group_description = "test description" node_type = "cache.t2.micro" port = 6379 @@ -1035,10 +1075,10 @@ resource "aws_elasticache_replication_group" "bar" { parameter_group_name = "default.redis3.2.cluster.on" automatic_failover_enabled = true cluster_mode { - replicas_per_node_group = 1 - num_node_groups = 2 + num_node_groups = %[2]d + replicas_per_node_group = %[3]d } -}`, rInt, rInt, rName) +}`, rName, numNodeGroups, replicasPerNodeGroup) } func testAccAWSElasticacheReplicationGroup_EnableAtRestEncryptionConfig(rInt int, rString string) string { diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index 75f2517d79b..a57da7ee069 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -127,7 +127,7 @@ Please note that setting a `snapshot_retention_limit` is not supported on cache. Cluster Mode (`cluster_mode`) supports the following: * `replicas_per_node_group` - (Required) Specify the number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource. -* `num_node_groups` - (Required) Specify the number of node groups (shards) for this Redis replication group. Changing this number will force a new resource. +* `num_node_groups` - (Required) Specify the number of node groups (shards) for this Redis replication group. Changing this number will trigger an online resizing operation before other settings modifications. ## Attributes Reference @@ -137,6 +137,15 @@ The following attributes are exported: * `configuration_endpoint_address` - The address of the replication group configuration endpoint when cluster mode is enabled. * `primary_endpoint_address` - (Redis only) The address of the endpoint for the primary node in the replication group, if the cluster mode is disabled. +## Timeouts + +`aws_elasticache_replication_group` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) +configuration options: + +* `create` - (Default `50m`) How long to wait for a replication group to be created. +* `delete` - (Default `40m`) How long to wait for a replication group to be deleted. +* `update` - (Default `40m`) How long to wait for replication group settings to be updated. This is also separately used for online resize operation completion, if necessary. + ## Import ElastiCache Replication Groups can be imported using the `replication_group_id`, e.g. From 0727ddd9ce667b24cd98699c173cb0829458c048 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 06:46:02 -0400 Subject: [PATCH 0216/3316] deps: Bump aws-sdk-go@v1.13.21 `govendor fetch github.com/aws/aws-sdk-go/...@v1.13.21` * Adds support for DynamoDB PITR (#3927) --- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/dynamodb/api.go | 665 +++++++++++-- .../aws/aws-sdk-go/service/dynamodb/errors.go | 30 +- vendor/vendor.json | 884 +++++++++--------- 4 files changed, 1034 insertions(+), 547 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 68002110547..d9df591afa3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.20" +const SDKVersion = "1.13.21" diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index 43abb412355..bbb151259a1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -316,6 +316,9 @@ func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *reque // BatchWriteItem request. For example, you cannot put and delete the same // item in the same BatchWriteItem request. // +// * Your request contains at least two items with identical hash and range +// keys (which essentially is two put operations). +// // * There are more than 25 requests in the batch. // // * Any individual item in a batch exceeds 400 KB. @@ -455,11 +458,11 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R // // Returned Error Codes: // * ErrCodeTableNotFoundException "TableNotFoundException" -// A table with the name TableName does not currently exist within the subscriber's -// account. +// A source table with the name TableName does not currently exist within the +// subscriber's account. // // * ErrCodeTableInUseException "TableInUseException" -// A table by that name is either being created or deleted. +// A target table with the specified name is either being created or deleted. // // * ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException" // Backups have not yet been enabled for this table. @@ -473,13 +476,8 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -584,13 +582,8 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -605,8 +598,8 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req // The specified global table already exists. // // * ErrCodeTableNotFoundException "TableNotFoundException" -// A table with the name TableName does not currently exist within the subscriber's -// account. +// A source table with the name TableName does not currently exist within the +// subscriber's account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateGlobalTable func (c *DynamoDB) CreateGlobalTable(input *CreateGlobalTableInput) (*CreateGlobalTableOutput, error) { @@ -708,13 +701,8 @@ func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Req // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -815,13 +803,8 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -1050,13 +1033,8 @@ func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Req // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -1217,8 +1195,17 @@ func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBac // DescribeContinuousBackups API operation for Amazon DynamoDB. // -// Checks the status of the backup restore settings on the specified table. -// If backups are enabled, ContinuousBackupsStatus will bet set to ENABLED. +// Checks the status of continuous backups and point in time recovery on the +// specified table. Continuous backups are ENABLED on all tables at table creation. +// If point in time recovery is enabled, PointInTimeRecoveryStatus will be set +// to ENABLED. +// +// Once continuous backups and point in time recovery are enabled, you can restore +// to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. +// +// LatestRestorableDateTime is typically 5 minutes before the current time. +// You can restore your table to any point in time during the last 35 days with +// a 1-minute granularity. // // You can call DescribeContinuousBackups at a maximum rate of 10 times per // second. @@ -1232,8 +1219,8 @@ func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBac // // Returned Error Codes: // * ErrCodeTableNotFoundException "TableNotFoundException" -// A table with the name TableName does not currently exist within the subscriber's -// account. +// A source table with the name TableName does not currently exist within the +// subscriber's account. // // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. @@ -2519,7 +2506,7 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn // RestoreTableFromBackup API operation for Amazon DynamoDB. // // Creates a new table from an existing backup. Any number of users can execute -// up to 10 concurrent restores in a given account. +// up to 4 concurrent restores (any type of restore) in a given account. // // You can call RestoreTableFromBackup at a maximum rate of 10 times per second. // @@ -2546,10 +2533,10 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn // // Returned Error Codes: // * ErrCodeTableAlreadyExistsException "TableAlreadyExistsException" -// A table with the name already exists. +// A target table with the specified name already exists. // // * ErrCodeTableInUseException "TableInUseException" -// A table by that name is either being created or deleted. +// A target table with the specified name is either being created or deleted. // // * ErrCodeBackupNotFoundException "BackupNotFoundException" // Backup not found for the given BackupARN. @@ -2563,13 +2550,8 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -2602,6 +2584,136 @@ func (c *DynamoDB) RestoreTableFromBackupWithContext(ctx aws.Context, input *Res return out, req.Send() } +const opRestoreTableToPointInTime = "RestoreTableToPointInTime" + +// RestoreTableToPointInTimeRequest generates a "aws/request.Request" representing the +// client's request for the RestoreTableToPointInTime operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RestoreTableToPointInTime for more information on using the RestoreTableToPointInTime +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RestoreTableToPointInTimeRequest method. +// req, resp := client.RestoreTableToPointInTimeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime +func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointInTimeInput) (req *request.Request, output *RestoreTableToPointInTimeOutput) { + op := &request.Operation{ + Name: opRestoreTableToPointInTime, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreTableToPointInTimeInput{} + } + + output = &RestoreTableToPointInTimeOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreTableToPointInTime API operation for Amazon DynamoDB. +// +// Restores the specified table to the specified point in time within EarliestRestorableDateTime +// and LatestRestorableDateTime. You can restore your table to any point in +// time during the last 35 days with a 1-minute granularity. Any number of users +// can execute up to 4 concurrent restores (any type of restore) in a given +// account. +// +// You must manually set up the following on the restored table: +// +// * Auto scaling policies +// +// * IAM policies +// +// * Cloudwatch metrics and alarms +// +// * Tags +// +// * Stream settings +// +// * Time to Live (TTL) settings +// +// * Point in time recovery settings +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB's +// API operation RestoreTableToPointInTime for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTableAlreadyExistsException "TableAlreadyExistsException" +// A target table with the specified name already exists. +// +// * ErrCodeTableNotFoundException "TableNotFoundException" +// A source table with the name TableName does not currently exist within the +// subscriber's account. +// +// * ErrCodeTableInUseException "TableInUseException" +// A target table with the specified name is either being created or deleted. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Up to 50 CreateBackup operations are allowed per second, per account. There +// is no limit to the number of daily on-demand backups that can be taken. +// +// Up to 10 simultaneous table operations are allowed per account. These operations +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. +// +// For tables with secondary indexes, only one of those tables can be in the +// CREATING state at any point in time. Do not attempt to create more than one +// such table simultaneously. +// +// The total limit of tables in the ACTIVE state is 250. +// +// * ErrCodeInvalidRestoreTimeException "InvalidRestoreTimeException" +// An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime +// and LatestRestorableDateTime. +// +// * ErrCodePointInTimeRecoveryUnavailableException "PointInTimeRecoveryUnavailableException" +// Point in time recovery has not yet been enabled for this source table. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime +func (c *DynamoDB) RestoreTableToPointInTime(input *RestoreTableToPointInTimeInput) (*RestoreTableToPointInTimeOutput, error) { + req, out := c.RestoreTableToPointInTimeRequest(input) + return out, req.Send() +} + +// RestoreTableToPointInTimeWithContext is the same as RestoreTableToPointInTime with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreTableToPointInTime for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DynamoDB) RestoreTableToPointInTimeWithContext(ctx aws.Context, input *RestoreTableToPointInTimeInput, opts ...request.Option) (*RestoreTableToPointInTimeOutput, error) { + req, out := c.RestoreTableToPointInTimeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opScan = "Scan" // ScanRequest generates a "aws/request.Request" representing the @@ -2843,13 +2955,8 @@ func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Req // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -2956,13 +3063,8 @@ func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -3004,6 +3106,103 @@ func (c *DynamoDB) UntagResourceWithContext(ctx aws.Context, input *UntagResourc return out, req.Send() } +const opUpdateContinuousBackups = "UpdateContinuousBackups" + +// UpdateContinuousBackupsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateContinuousBackups operation. The "output" return +// value will be populated with the request's response once the request complets +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateContinuousBackups for more information on using the UpdateContinuousBackups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateContinuousBackupsRequest method. +// req, resp := client.UpdateContinuousBackupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups +func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackupsInput) (req *request.Request, output *UpdateContinuousBackupsOutput) { + op := &request.Operation{ + Name: opUpdateContinuousBackups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateContinuousBackupsInput{} + } + + output = &UpdateContinuousBackupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateContinuousBackups API operation for Amazon DynamoDB. +// +// UpdateContinuousBackups enables or disables point in time recovery for the +// specified table. A successful UpdateContinuousBackups call returns the current +// ContinuousBackupsDescription. Continuous backups are ENABLED on all tables +// at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus +// will be set to ENABLED. +// +// Once continuous backups and point in time recovery are enabled, you can restore +// to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. +// +// LatestRestorableDateTime is typically 5 minutes before the current time. +// You can restore your table to any point in time during the last 35 days with +// a 1-minute granularity. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB's +// API operation UpdateContinuousBackups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTableNotFoundException "TableNotFoundException" +// A source table with the name TableName does not currently exist within the +// subscriber's account. +// +// * ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException" +// Backups have not yet been enabled for this table. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups +func (c *DynamoDB) UpdateContinuousBackups(input *UpdateContinuousBackupsInput) (*UpdateContinuousBackupsOutput, error) { + req, out := c.UpdateContinuousBackupsRequest(input) + return out, req.Send() +} + +// UpdateContinuousBackupsWithContext is the same as UpdateContinuousBackups with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateContinuousBackups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DynamoDB) UpdateContinuousBackupsWithContext(ctx aws.Context, input *UpdateContinuousBackupsInput, opts ...request.Option) (*UpdateContinuousBackupsOutput, error) { + req, out := c.UpdateContinuousBackupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateGlobalTable = "UpdateGlobalTable" // UpdateGlobalTableRequest generates a "aws/request.Request" representing the @@ -3051,8 +3250,7 @@ func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req // Adds or removes replicas in the specified global table. The global table // must already exist to be able to use this operation. Any replica to be added // must be empty, must have the same name as the global table, must have the -// same key schema, must have DynamoDB Streams enabled, and cannot have any -// local secondary indexes (LSIs). +// same key schema, and must have DynamoDB Streams enabled. // // Although you can use UpdateGlobalTable to add replicas and remove replicas // in a single request, for simplicity we recommend that you issue separate @@ -3079,8 +3277,8 @@ func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req // The specified replica is no longer part of the global table. // // * ErrCodeTableNotFoundException "TableNotFoundException" -// A table with the name TableName does not currently exist within the subscriber's -// account. +// A source table with the name TableName does not currently exist within the +// subscriber's account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable func (c *DynamoDB) UpdateGlobalTable(input *UpdateGlobalTableInput) (*UpdateGlobalTableOutput, error) { @@ -3294,13 +3492,8 @@ func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Req // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -3428,13 +3621,8 @@ func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *r // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -4584,8 +4772,8 @@ func (s *ConsumedCapacity) SetTableName(v string) *ConsumedCapacity { return s } -// Represents the backup and restore settings on the table when the backup was -// created. +// Represents the continuous backups and point in time recovery settings on +// the table. type ContinuousBackupsDescription struct { _ struct{} `type:"structure"` @@ -4593,6 +4781,9 @@ type ContinuousBackupsDescription struct { // // ContinuousBackupsStatus is a required field ContinuousBackupsStatus *string `type:"string" required:"true" enum:"ContinuousBackupsStatus"` + + // The description of the point in time recovery settings applied to the table. + PointInTimeRecoveryDescription *PointInTimeRecoveryDescription `type:"structure"` } // String returns the string representation @@ -4611,6 +4802,12 @@ func (s *ContinuousBackupsDescription) SetContinuousBackupsStatus(v string) *Con return s } +// SetPointInTimeRecoveryDescription sets the PointInTimeRecoveryDescription field's value. +func (s *ContinuousBackupsDescription) SetPointInTimeRecoveryDescription(v *PointInTimeRecoveryDescription) *ContinuousBackupsDescription { + s.PointInTimeRecoveryDescription = v + return s +} + type CreateBackupInput struct { _ struct{} `type:"structure"` @@ -5842,8 +6039,8 @@ func (s *DescribeBackupOutput) SetBackupDescription(v *BackupDescription) *Descr type DescribeContinuousBackupsInput struct { _ struct{} `type:"structure"` - // Name of the table for which the customer wants to check the backup and restore - // settings. + // Name of the table for which the customer wants to check the continuous backups + // and point in time recovery settings. // // TableName is a required field TableName *string `min:"3" type:"string" required:"true"` @@ -7943,6 +8140,97 @@ func (s *LocalSecondaryIndexInfo) SetProjection(v *Projection) *LocalSecondaryIn return s } +// The description of the point in time settings applied to the table. +type PointInTimeRecoveryDescription struct { + _ struct{} `type:"structure"` + + // Specifies the earliest point in time you can restore your table to. It is + // equal to the maximum of point in time recovery enabled time and CurrentTime + // - PointInTimeRecoveryPeriod. + EarliestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // LatestRestorableDateTime is 5 minutes from now and there is a +/- 1 minute + // fuzziness on the restore times. + LatestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The current state of point in time recovery: + // + // * ENABLING - Point in time recovery is being enabled. + // + // * ENABLED - Point in time recovery is enabled. + // + // * DISABLED - Point in time recovery is disabled. + PointInTimeRecoveryStatus *string `type:"string" enum:"PointInTimeRecoveryStatus"` +} + +// String returns the string representation +func (s PointInTimeRecoveryDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PointInTimeRecoveryDescription) GoString() string { + return s.String() +} + +// SetEarliestRestorableDateTime sets the EarliestRestorableDateTime field's value. +func (s *PointInTimeRecoveryDescription) SetEarliestRestorableDateTime(v time.Time) *PointInTimeRecoveryDescription { + s.EarliestRestorableDateTime = &v + return s +} + +// SetLatestRestorableDateTime sets the LatestRestorableDateTime field's value. +func (s *PointInTimeRecoveryDescription) SetLatestRestorableDateTime(v time.Time) *PointInTimeRecoveryDescription { + s.LatestRestorableDateTime = &v + return s +} + +// SetPointInTimeRecoveryStatus sets the PointInTimeRecoveryStatus field's value. +func (s *PointInTimeRecoveryDescription) SetPointInTimeRecoveryStatus(v string) *PointInTimeRecoveryDescription { + s.PointInTimeRecoveryStatus = &v + return s +} + +// Represents the settings used to enable point in time recovery. +type PointInTimeRecoverySpecification struct { + _ struct{} `type:"structure"` + + // Indicates whether point in time recovery is enabled (true) or disabled (false) + // on the table. + // + // PointInTimeRecoveryEnabled is a required field + PointInTimeRecoveryEnabled *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s PointInTimeRecoverySpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PointInTimeRecoverySpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PointInTimeRecoverySpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PointInTimeRecoverySpecification"} + if s.PointInTimeRecoveryEnabled == nil { + invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoveryEnabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPointInTimeRecoveryEnabled sets the PointInTimeRecoveryEnabled field's value. +func (s *PointInTimeRecoverySpecification) SetPointInTimeRecoveryEnabled(v bool) *PointInTimeRecoverySpecification { + s.PointInTimeRecoveryEnabled = &v + return s +} + // Represents attributes that are copied (projected) from the table into an // index. These are in addition to the primary key attributes and index key // attributes, which are automatically projected. @@ -8717,9 +9005,8 @@ type QueryInput struct { // // Items with the same partition key value are stored in sorted order by sort // key. If the sort key data type is Number, the results are stored in numeric - // order. For type String, the results are stored in order of ASCII character - // code values. For type Binary, DynamoDB treats each byte of the binary data - // as unsigned. + // order. For type String, the results are stored in order of UTF-8 bytes. For + // type Binary, DynamoDB treats each byte of the binary data as unsigned. // // If ScanIndexForward is true, DynamoDB returns the results in the order in // which they are stored (by sort key value). This is the default behavior. @@ -9267,6 +9554,106 @@ func (s *RestoreTableFromBackupOutput) SetTableDescription(v *TableDescription) return s } +type RestoreTableToPointInTimeInput struct { + _ struct{} `type:"structure"` + + // Time in the past to restore the table to. + RestoreDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Name of the source table that is being restored. + // + // SourceTableName is a required field + SourceTableName *string `min:"3" type:"string" required:"true"` + + // The name of the new table to which it must be restored to. + // + // TargetTableName is a required field + TargetTableName *string `min:"3" type:"string" required:"true"` + + // Restore the table to the latest possible time. LatestRestorableDateTime is + // typically 5 minutes before the current time. + UseLatestRestorableTime *bool `type:"boolean"` +} + +// String returns the string representation +func (s RestoreTableToPointInTimeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreTableToPointInTimeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreTableToPointInTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreTableToPointInTimeInput"} + if s.SourceTableName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceTableName")) + } + if s.SourceTableName != nil && len(*s.SourceTableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("SourceTableName", 3)) + } + if s.TargetTableName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetTableName")) + } + if s.TargetTableName != nil && len(*s.TargetTableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TargetTableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRestoreDateTime sets the RestoreDateTime field's value. +func (s *RestoreTableToPointInTimeInput) SetRestoreDateTime(v time.Time) *RestoreTableToPointInTimeInput { + s.RestoreDateTime = &v + return s +} + +// SetSourceTableName sets the SourceTableName field's value. +func (s *RestoreTableToPointInTimeInput) SetSourceTableName(v string) *RestoreTableToPointInTimeInput { + s.SourceTableName = &v + return s +} + +// SetTargetTableName sets the TargetTableName field's value. +func (s *RestoreTableToPointInTimeInput) SetTargetTableName(v string) *RestoreTableToPointInTimeInput { + s.TargetTableName = &v + return s +} + +// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. +func (s *RestoreTableToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreTableToPointInTimeInput { + s.UseLatestRestorableTime = &v + return s +} + +type RestoreTableToPointInTimeOutput struct { + _ struct{} `type:"structure"` + + // Represents the properties of a table. + TableDescription *TableDescription `type:"structure"` +} + +// String returns the string representation +func (s RestoreTableToPointInTimeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreTableToPointInTimeOutput) GoString() string { + return s.String() +} + +// SetTableDescription sets the TableDescription field's value. +func (s *RestoreTableToPointInTimeOutput) SetTableDescription(v *TableDescription) *RestoreTableToPointInTimeOutput { + s.TableDescription = v + return s +} + // The description of the server-side encryption status on the specified table. type SSEDescription struct { _ struct{} `type:"structure"` @@ -10656,6 +11043,90 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +type UpdateContinuousBackupsInput struct { + _ struct{} `type:"structure"` + + // Represents the settings used to enable point in time recovery. + // + // PointInTimeRecoverySpecification is a required field + PointInTimeRecoverySpecification *PointInTimeRecoverySpecification `type:"structure" required:"true"` + + // The name of the table. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateContinuousBackupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateContinuousBackupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateContinuousBackupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateContinuousBackupsInput"} + if s.PointInTimeRecoverySpecification == nil { + invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoverySpecification")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.PointInTimeRecoverySpecification != nil { + if err := s.PointInTimeRecoverySpecification.Validate(); err != nil { + invalidParams.AddNested("PointInTimeRecoverySpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPointInTimeRecoverySpecification sets the PointInTimeRecoverySpecification field's value. +func (s *UpdateContinuousBackupsInput) SetPointInTimeRecoverySpecification(v *PointInTimeRecoverySpecification) *UpdateContinuousBackupsInput { + s.PointInTimeRecoverySpecification = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *UpdateContinuousBackupsInput) SetTableName(v string) *UpdateContinuousBackupsInput { + s.TableName = &v + return s +} + +type UpdateContinuousBackupsOutput struct { + _ struct{} `type:"structure"` + + // Represents the continuous backups and point in time recovery settings on + // the table. + ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"` +} + +// String returns the string representation +func (s UpdateContinuousBackupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateContinuousBackupsOutput) GoString() string { + return s.String() +} + +// SetContinuousBackupsDescription sets the ContinuousBackupsDescription field's value. +func (s *UpdateContinuousBackupsOutput) SetContinuousBackupsDescription(v *ContinuousBackupsDescription) *UpdateContinuousBackupsOutput { + s.ContinuousBackupsDescription = v + return s +} + // Represents the new provisioned throughput settings to be applied to a global // secondary index. type UpdateGlobalSecondaryIndexAction struct { @@ -11597,6 +12068,14 @@ const ( KeyTypeRange = "RANGE" ) +const ( + // PointInTimeRecoveryStatusEnabled is a PointInTimeRecoveryStatus enum value + PointInTimeRecoveryStatusEnabled = "ENABLED" + + // PointInTimeRecoveryStatusDisabled is a PointInTimeRecoveryStatus enum value + PointInTimeRecoveryStatusDisabled = "DISABLED" +) + const ( // ProjectionTypeAll is a ProjectionType enum value ProjectionTypeAll = "ALL" diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go index 4f898d96737..05b8470d2ee 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go @@ -47,6 +47,13 @@ const ( // An error occurred on the server side. ErrCodeInternalServerError = "InternalServerError" + // ErrCodeInvalidRestoreTimeException for service response error code + // "InvalidRestoreTimeException". + // + // An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime + // and LatestRestorableDateTime. + ErrCodeInvalidRestoreTimeException = "InvalidRestoreTimeException" + // ErrCodeItemCollectionSizeLimitExceededException for service response error code // "ItemCollectionSizeLimitExceededException". // @@ -61,13 +68,8 @@ const ( // is no limit to the number of daily on-demand backups that can be taken. // // Up to 10 simultaneous table operations are allowed per account. These operations - // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup. - // - // For tables with secondary indexes, only one of those tables can be in the - // CREATING state at any point in time. Do not attempt to create more than one - // such table simultaneously. - // - // The total limit of tables in the ACTIVE state is 250. + // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, + // and RestoreTableToPointInTime. // // For tables with secondary indexes, only one of those tables can be in the // CREATING state at any point in time. Do not attempt to create more than one @@ -76,6 +78,12 @@ const ( // The total limit of tables in the ACTIVE state is 250. ErrCodeLimitExceededException = "LimitExceededException" + // ErrCodePointInTimeRecoveryUnavailableException for service response error code + // "PointInTimeRecoveryUnavailableException". + // + // Point in time recovery has not yet been enabled for this source table. + ErrCodePointInTimeRecoveryUnavailableException = "PointInTimeRecoveryUnavailableException" + // ErrCodeProvisionedThroughputExceededException for service response error code // "ProvisionedThroughputExceededException". // @@ -117,19 +125,19 @@ const ( // ErrCodeTableAlreadyExistsException for service response error code // "TableAlreadyExistsException". // - // A table with the name already exists. + // A target table with the specified name already exists. ErrCodeTableAlreadyExistsException = "TableAlreadyExistsException" // ErrCodeTableInUseException for service response error code // "TableInUseException". // - // A table by that name is either being created or deleted. + // A target table with the specified name is either being created or deleted. ErrCodeTableInUseException = "TableInUseException" // ErrCodeTableNotFoundException for service response error code // "TableNotFoundException". // - // A table with the name TableName does not currently exist within the subscriber's - // account. + // A source table with the name TableName does not currently exist within the + // subscriber's account. ErrCodeTableNotFoundException = "TableNotFoundException" ) diff --git a/vendor/vendor.json b/vendor/vendor.json index 14828416e2f..55f617079a8 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,884 +39,884 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "oS1f9+6Y4byjgyIKEpnzkxYU1MY=", + "checksumSHA1": "y1bmVkrw6lKwgq8z+S3GzO1F5JE=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "taM7fdw8T0L8klF96JgAHvKobIw=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "xXfBg4kOE6+Z4sABLqdR49OlSNA=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "Ih4il2OyFyaSuoMv6hhvPUN8Gn4=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "DPl/OkvEUjrd+XKqX73l6nUNw3U=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "tsOPYVkOiuYDJTziSRkP7p1TL70=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "lyjaWzlpAp6CacdNZTe351CRp5c=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "wrOVdI/6ZTZ/H0Kxjh3bBEZtVzk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "GhemRVzpnrN6HAgm1NdAgESY8CQ=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "P5gDOoqIdVjMU77e5Nhy48QLpS4=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "BrC9UCeefniH5UN7x0PFr8A9l6Y=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "EoaTzMilW+OIi5eETJUpd+giyTc=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "yuFNzmUIWppfji/Xx6Aao0EE4cY=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "0nPnGWlegQG7bn/iIIfjJFoljyU=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "XJAlmauOOHsHEUW7n0XO/eEpcWI=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "VTc9UOMqIwuhWJ6oGQDsMkTW09I=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "ItXljM1vG/0goVleodRgbfYgyxQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "x25KEvGmuQ0Uuoduo/CVe37ELC8=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "HHct8eQygkIJ+vrQpKhB0IEDymQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "LHcxaQJ77WMlug2cnyXlTzJJUSo=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "AQwpqKKc52nnI5F50K73Zx5luoQ=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "wvXGTyWPjtgC4OjXb80IxYdpqmE=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "V1Y05qfjN4xOCy+GnPWSCqIeZb4=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "Ju8efcqcIgggB7N8io/as9ERVdc=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "jeCyZm4iJmOLbVOe/70QNkII+qU=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "OhbpZoCd+Vg3pLOEE0MVH9T22eY=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "45sgs1urdRiXDb35iuAhQPzl0e4=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "bu1R1eKCK2fc5+hMcXmagr3iIik=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "EaEfUc3nt1sS/cdfSYGq+JtSVKs=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "LRdh5oXUe2yURIk5FDH6ceEZGMo=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "a7itHIwtyXtOGQ0KsiefmsHgu4s=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { - "checksumSHA1": "8JiVrxMjFSdBOfVWCy1QU+JzB08=", + "checksumSHA1": "D93YWdEE2D9HtggwUKUNmV7J86E=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "SOmBkudpfGbt3Pb3I1bzuXV9FvQ=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "PcnSiFF2p2xOsvITrsglyWp20YA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "VRx8MtqfED2uZVOi6ldb5P145TI=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "4XmkiujbDA68x39KGgURR1+uPiQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "o73xT1zFo3C+giQwKcRj02OAZhM=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "C6OWsuCjBYnqjR5PwDFEA8l1hWg=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "VYGtTaSiajfKOVTbi9/SNmbiIac=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "SZ7yLDZ6RvMhpWe0Goyem64kgyA=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "iRI32eUYQfumh0LybzZ+5iWV3jE=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "ufCsoZUQK13j8Y+m25yxhC2XteQ=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "5x77vwxya74Qu5YEq75/lhyYkqY=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "t7BmfpJqmQ7Y0EYcj/CR9Aup9go=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "h37wXo80exgME9QqHkeLTyG88ZM=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "20HMsQ2tH47zknjFIUQLi/ZOBvc=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "K1s4cEA/LcK+NAZAFUDOr/dW9IY=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "tU7rdC0LAUOKNp2uERUXi3hU1sQ=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "I8CWKTI9BLrIF9ZKf6SpWhG+LXM=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "45gdBZuM7PWLQzWuBasytvZZpK0=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "skj7upwPc4zfJbYT+iPY+cmumG0=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "DfzNze8B3ME2tV3TtXP7eQXUjD0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "Vqq049R2eveVD15emT9vKTyBsIg=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "lAgaKbwpyflY7+t4V3EeH18RwgA=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "shckWClBSciJH+cFYCY5kDCbBXI=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "2dy15/1bnS80cwKZiwnEai1d7O8=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "998zv0rs9SBCd9EoAnIi9cKv7uo=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "/Oo64hSOdIKbN4dmZ7EAQRfr12w=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "mzoPurfrAAB102onq4FPlwZ5Bec=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "yXPMyEsghtSFxu9AbiTFCzisGrQ=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "wU7VITDzy1ubXo+zrG4HNyl5GJI=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "kMMVqLsxKIzBQeDyWJ0N2U/PKLc=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "QuOSKqV8nFvvzN4wcsToltMFI1Y=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "vSNXu8VAbPuFoTTjtVEpldKDZHA=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "g5UtpGido/A6wsB7pDwY+RQ3Ha8=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "/F1EdnLahy5V5+EjvRQ3C0JhIyw=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "p2x3SXLzi1PXnyMpPUJUntpS1hQ=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "/MR2uoycqymJLdO3Bu1pTkZCpDY=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "XSHs3VHLi/mXGDN0zLO/NNCVpw4=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "JrQMIue45k6Nk738T347pe9X0c0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "fmnQo2GajqI9eEn6tcEGiJ9A66E=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "j+R3E5MeBM87zbLVQhcuqlHsxes=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "u3AMeFxtHGtiJCxDeIm4dAwzBIc=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "B3CgAFSREebpsFoFOo4vrQ6u04w=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "9Qj8yLl67q9uxBUCc0PT20YiP1M=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "XmEJe50M8MddNEkwbZoC+YvRjgg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "ULmsQAt5z5ZxGHZC/r7enBs1HvM=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "tH1Pzc7jUUGJv47Cy6uuWl/86bU=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "Uw4pOUxSMbx4xBHUcOUkNhtnywE=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "dBDZ2w/7ZEdk2UZ6PWFmk/cGSPw=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "hOobCqlfwCl/iPGetELNIDsns1U=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "FVK4fHBkjOIaCRIY4DleqSKtZKs=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "c8c4e0c0514d87f930c1342fef390db5329928b7", - "revisionTime": "2018-03-23T20:51:09Z", - "version": "v1.13.20", - "versionExact": "v1.13.20" + "revision": "fb28e64a158b01377883badcc176216ac0fde3dd", + "revisionTime": "2018-03-26T21:59:32Z", + "version": "v1.13.21", + "versionExact": "v1.13.21" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From e5b8327badc5d2cc471b24b933d808d4c6b02b18 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 07:30:22 -0400 Subject: [PATCH 0217/3316] resource/aws_elasticache_*: Add test sweepers --- aws/resource_aws_elasticache_cluster.go | 75 +++++++++---------- aws/resource_aws_elasticache_cluster_test.go | 52 +++++++++++++ ...ource_aws_elasticache_replication_group.go | 60 ++++++++------- ..._aws_elasticache_replication_group_test.go | 53 +++++++++++++ aws/resource_aws_subnet_test.go | 2 + 5 files changed, 175 insertions(+), 67 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 140b3473ad8..974a29f9747 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -9,7 +9,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elasticache" gversion "github.com/hashicorp/go-version" "github.com/hashicorp/terraform/helper/customdiff" @@ -466,7 +465,7 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) res, err := conn.DescribeCacheClusters(req) if err != nil { - if eccErr, ok := err.(awserr.Error); ok && eccErr.Code() == "CacheClusterNotFound" { + if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { log.Printf("[WARN] ElastiCache Cluster (%s) not found", d.Id()) d.SetId("") return nil @@ -698,42 +697,11 @@ func (b byCacheNodeId) Less(i, j int) bool { func resourceAwsElasticacheClusterDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - req := &elasticache.DeleteCacheClusterInput{ - CacheClusterId: aws.String(d.Id()), - } - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.DeleteCacheCluster(req) - if err != nil { - awsErr, ok := err.(awserr.Error) - // The cluster may be just snapshotting, so we retry until it's ready for deletion - if ok && awsErr.Code() == "InvalidCacheClusterState" { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) + err := deleteElasticacheCluster(d.Id(), 40*time.Minute, conn) if err != nil { - return err - } - - log.Printf("[DEBUG] Waiting for deletion: %v", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "available", "deleting", "incompatible-parameters", "incompatible-network", "restore-failed", "snapshotting"}, - Target: []string{}, - Refresh: cacheClusterStateRefreshFunc(conn, d.Id(), "", []string{}), - Timeout: 40 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for elasticache (%s) to delete: %s", d.Id(), sterr) + return fmt.Errorf("error deleting Elasticache Cluster (%s): %s", d.Id(), err) } - d.SetId("") - return nil } @@ -744,9 +712,7 @@ func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, give ShowCacheNodeInfo: aws.Bool(true), }) if err != nil { - apierr := err.(awserr.Error) - log.Printf("[DEBUG] message: %v, code: %v", apierr.Message(), apierr.Code()) - if apierr.Message() == fmt.Sprintf("CacheCluster not found: %v", clusterID) { + if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { log.Printf("[DEBUG] Detect deletion") return nil, "", nil } @@ -810,6 +776,39 @@ func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, give } } +func deleteElasticacheCluster(clusterID string, timeout time.Duration, conn *elasticache.ElastiCache) error { + input := &elasticache.DeleteCacheClusterInput{ + CacheClusterId: aws.String(clusterID), + } + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteCacheCluster(input) + if err != nil { + // The cluster may be just snapshotting, so we retry until it's ready for deletion + if isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return err + } + + log.Printf("[DEBUG] Waiting for deletion: %v", clusterID) + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating", "available", "deleting", "incompatible-parameters", "incompatible-network", "restore-failed", "snapshotting"}, + Target: []string{}, + Refresh: cacheClusterStateRefreshFunc(conn, clusterID, "", []string{}), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + _, err = stateConf.WaitForState() + return err +} + func buildECARN(identifier, partition, accountid, region string) (string, error) { if partition == "" { return "", fmt.Errorf("Unable to construct ElastiCache ARN because of missing AWS partition") diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 5f17101927f..8a72ce80797 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -3,11 +3,13 @@ package aws import ( "errors" "fmt" + "log" "os" "regexp" "strconv" "strings" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -17,6 +19,56 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_elasticache_cluster", &resource.Sweeper{ + Name: "aws_elasticache_cluster", + F: testSweepElasticacheClusters, + }) +} + +func testSweepElasticacheClusters(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).elasticacheconn + + prefixes := []string{ + "tf-", + "tf-test-", + "tf-acc-test-", + } + + return conn.DescribeCacheClustersPages(&elasticache.DescribeCacheClustersInput{}, func(page *elasticache.DescribeCacheClustersOutput, isLast bool) bool { + if len(page.CacheClusters) == 0 { + log.Print("[DEBUG] No Elasticache Replicaton Groups to sweep") + return false + } + + for _, cluster := range page.CacheClusters { + id := aws.StringValue(cluster.CacheClusterId) + skip := true + for _, prefix := range prefixes { + if strings.HasPrefix(id, prefix) { + skip = false + break + } + } + if skip { + log.Printf("[INFO] Skipping Elasticache Cluster: %s", id) + continue + } + log.Printf("[INFO] Deleting Elasticache Cluster: %s", id) + err := deleteElasticacheCluster(id, 40*time.Minute, conn) + if err != nil { + log.Printf("[ERROR] Failed to delete Elasticache Cluster (%s): %s", id, err) + } + } + return !isLast + }) + return nil +} + func TestAccAWSElasticacheCluster_Engine_Memcached_Ec2Classic(t *testing.T) { oldvar := os.Getenv("AWS_DEFAULT_REGION") os.Setenv("AWS_DEFAULT_REGION", "us-east-1") diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index 55f75d70912..e432a0709b5 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -8,7 +8,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elasticache" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -263,7 +262,7 @@ func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta int res, err := conn.DescribeReplicationGroups(req) if err != nil { - if eccErr, ok := err.(awserr.Error); ok && eccErr.Code() == "ReplicationGroupNotFoundFault" { + if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { log.Printf("[WARN] Elasticache Replication Group (%s) not found", d.Id()) d.SetId("") return nil @@ -468,33 +467,9 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i func resourceAwsElasticacheReplicationGroupDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - req := &elasticache.DeleteReplicationGroupInput{ - ReplicationGroupId: aws.String(d.Id()), - } - - _, err := conn.DeleteReplicationGroup(req) + err := deleteElasticacheReplicationGroup(d.Id(), 40*time.Minute, conn) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "ReplicationGroupNotFoundFault" { - d.SetId("") - return nil - } - - return fmt.Errorf("Error deleting Elasticache replication group: %s", err) - } - - log.Printf("[DEBUG] Waiting for deletion: %v", d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "available", "deleting"}, - Target: []string{}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "", []string{}), - Timeout: 40 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for replication group (%s) to delete: %s", d.Id(), sterr) + return fmt.Errorf("error deleting Elasticache Replication Group (%s): %s", d.Id(), err) } return nil @@ -506,7 +481,7 @@ func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replic ReplicationGroupId: aws.String(replicationGroupId), }) if err != nil { - if eccErr, ok := err.(awserr.Error); ok && eccErr.Code() == "ReplicationGroupNotFoundFault" { + if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { log.Printf("[DEBUG] Replication Group Not Found") return nil, "", nil } @@ -547,6 +522,33 @@ func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replic } } +func deleteElasticacheReplicationGroup(replicationGroupID string, timeout time.Duration, conn *elasticache.ElastiCache) error { + input := &elasticache.DeleteReplicationGroupInput{ + ReplicationGroupId: aws.String(replicationGroupID), + } + + _, err := conn.DeleteReplicationGroup(input) + if err != nil { + if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { + return nil + } + return err + } + + log.Printf("[DEBUG] Waiting for deletion: %s", replicationGroupID) + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating", "available", "deleting"}, + Target: []string{}, + Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, "", []string{}), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + _, err = stateConf.WaitForState() + return err +} + func validateAwsElastiCacheReplicationGroupEngine(v interface{}, k string) (ws []string, errors []error) { if strings.ToLower(v.(string)) != "redis" { errors = append(errors, fmt.Errorf("The only acceptable Engine type when using Replication Groups is Redis")) diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index eb441b00c06..b903c176bc1 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -2,8 +2,11 @@ package aws import ( "fmt" + "log" "regexp" + "strings" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -13,6 +16,56 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_elasticache_replication_group", &resource.Sweeper{ + Name: "aws_elasticache_replication_group", + F: testSweepElasticacheReplicationGroups, + }) +} + +func testSweepElasticacheReplicationGroups(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).elasticacheconn + + prefixes := []string{ + "tf-", + "tf-test-", + "tf-acc-test-", + } + + return conn.DescribeReplicationGroupsPages(&elasticache.DescribeReplicationGroupsInput{}, func(page *elasticache.DescribeReplicationGroupsOutput, isLast bool) bool { + if len(page.ReplicationGroups) == 0 { + log.Print("[DEBUG] No Elasticache Replicaton Groups to sweep") + return false + } + + for _, replicationGroup := range page.ReplicationGroups { + id := aws.StringValue(replicationGroup.ReplicationGroupId) + skip := true + for _, prefix := range prefixes { + if strings.HasPrefix(id, prefix) { + skip = false + break + } + } + if skip { + log.Printf("[INFO] Skipping Elasticache Replication Group: %s", id) + continue + } + log.Printf("[INFO] Deleting Elasticache Replication Group: %s", id) + err := deleteElasticacheReplicationGroup(id, 40*time.Minute, conn) + if err != nil { + log.Printf("[ERROR] Failed to delete Elasticache Replication Group (%s): %s", id, err) + } + } + return !isLast + }) + return nil +} + func TestAccAWSElasticacheReplicationGroup_basic(t *testing.T) { var rg elasticache.ReplicationGroup diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index ddf7b0d5734..49c88019fd4 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -19,6 +19,8 @@ func init() { F: testSweepSubnets, Dependencies: []string{ "aws_batch_compute_environment", + "aws_elasticache_cluster", + "aws_elasticache_replication_group", "aws_elb", }, }) From f65ae94ff73f930a70500239e9b1bfda82ee92ee Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 26 Mar 2018 11:36:43 +0100 Subject: [PATCH 0218/3316] New Resource: aws_wafregional_geo_match_set --- aws/provider.go | 1 + aws/resource_aws_waf_geo_match_set.go | 47 +-- aws/resource_aws_wafregional_geo_match_set.go | 160 +++++++++ ...urce_aws_wafregional_geo_match_set_test.go | 335 ++++++++++++++++++ aws/waf_helpers.go | 45 +++ website/aws.erb | 4 + .../r/wafregional_geo_match_set.html.markdown | 54 +++ 7 files changed, 601 insertions(+), 45 deletions(-) create mode 100644 aws/resource_aws_wafregional_geo_match_set.go create mode 100644 aws/resource_aws_wafregional_geo_match_set_test.go create mode 100644 website/docs/r/wafregional_geo_match_set.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 42de2ffeab1..927eac1dc8a 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -555,6 +555,7 @@ func Provider() terraform.ResourceProvider { "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), diff --git a/aws/resource_aws_waf_geo_match_set.go b/aws/resource_aws_waf_geo_match_set.go index cc5c2dbd104..2bbd8ac7600 100644 --- a/aws/resource_aws_waf_geo_match_set.go +++ b/aws/resource_aws_waf_geo_match_set.go @@ -76,6 +76,8 @@ func resourceAwsWafGeoMatchSetRead(d *schema.ResourceData, meta interface{}) err resp, err := conn.GetGeoMatchSet(params) if err != nil { + // TODO: Replace with constant once it's available + // See https://github.com/aws/aws-sdk-go/issues/1856 if isAWSErr(err, "WAFNonexistentItemException", "") { log.Printf("[WARN] WAF GeoMatchSet (%s) not found, removing from state", d.Id()) d.SetId("") @@ -153,48 +155,3 @@ func updateGeoMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WA return nil } - -func flattenWafGeoMatchConstraint(ts []*waf.GeoMatchConstraint) []interface{} { - out := make([]interface{}, len(ts), len(ts)) - for i, t := range ts { - m := make(map[string]interface{}) - m["type"] = *t.Type - m["value"] = *t.Value - out[i] = m - } - return out -} - -func diffWafGeoMatchSetConstraints(oldT, newT []interface{}) []*waf.GeoMatchSetUpdate { - updates := make([]*waf.GeoMatchSetUpdate, 0) - - for _, od := range oldT { - constraint := od.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newT, constraint); contains { - newT = append(newT[:idx], newT[idx+1:]...) - continue - } - - updates = append(updates, &waf.GeoMatchSetUpdate{ - Action: aws.String(waf.ChangeActionDelete), - GeoMatchConstraint: &waf.GeoMatchConstraint{ - Type: aws.String(constraint["type"].(string)), - Value: aws.String(constraint["value"].(string)), - }, - }) - } - - for _, nd := range newT { - constraint := nd.(map[string]interface{}) - - updates = append(updates, &waf.GeoMatchSetUpdate{ - Action: aws.String(waf.ChangeActionInsert), - GeoMatchConstraint: &waf.GeoMatchConstraint{ - Type: aws.String(constraint["type"].(string)), - Value: aws.String(constraint["value"].(string)), - }, - }) - } - return updates -} diff --git a/aws/resource_aws_wafregional_geo_match_set.go b/aws/resource_aws_wafregional_geo_match_set.go new file mode 100644 index 00000000000..107640171ac --- /dev/null +++ b/aws/resource_aws_wafregional_geo_match_set.go @@ -0,0 +1,160 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegionalGeoMatchSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegionalGeoMatchSetCreate, + Read: resourceAwsWafRegionalGeoMatchSetRead, + Update: resourceAwsWafRegionalGeoMatchSetUpdate, + Delete: resourceAwsWafRegionalGeoMatchSetDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "geo_match_constraint": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsWafRegionalGeoMatchSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + log.Printf("[INFO] Creating WAF Regional Geo Match Set: %s", d.Get("name").(string)) + + wr := newWafRegionalRetryer(conn, region) + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateGeoMatchSetInput{ + ChangeToken: token, + Name: aws.String(d.Get("name").(string)), + } + + return conn.CreateGeoMatchSet(params) + }) + if err != nil { + return fmt.Errorf("Failed creating WAF Regional Geo Match Set: %s", err) + } + resp := out.(*waf.CreateGeoMatchSetOutput) + + d.SetId(*resp.GeoMatchSet.GeoMatchSetId) + + return resourceAwsWafRegionalGeoMatchSetUpdate(d, meta) +} + +func resourceAwsWafRegionalGeoMatchSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + log.Printf("[INFO] Reading WAF Regional Geo Match Set: %s", d.Get("name").(string)) + params := &waf.GetGeoMatchSetInput{ + GeoMatchSetId: aws.String(d.Id()), + } + + resp, err := conn.GetGeoMatchSet(params) + if err != nil { + // TODO: Replace with constant once it's available + // See https://github.com/aws/aws-sdk-go/issues/1856 + if isAWSErr(err, "WAFNonexistentItemException", "") { + log.Printf("[WARN] WAF WAF Regional Geo Match Set (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("name", resp.GeoMatchSet.Name) + d.Set("geo_match_constraint", flattenWafGeoMatchConstraint(resp.GeoMatchSet.GeoMatchConstraints)) + + return nil +} + +func resourceAwsWafRegionalGeoMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + if d.HasChange("geo_match_constraint") { + o, n := d.GetChange("geo_match_constraint") + oldConstraints, newConstraints := o.(*schema.Set).List(), n.(*schema.Set).List() + + err := updateGeoMatchSetResourceWR(d.Id(), oldConstraints, newConstraints, conn, region) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Geo Match Set: %s", err) + } + } + + return resourceAwsWafRegionalGeoMatchSetRead(d, meta) +} + +func resourceAwsWafRegionalGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + oldConstraints := d.Get("geo_match_constraint").(*schema.Set).List() + if len(oldConstraints) > 0 { + noConstraints := []interface{}{} + err := updateGeoMatchSetResourceWR(d.Id(), oldConstraints, noConstraints, conn, region) + if err != nil { + return fmt.Errorf("Error updating WAF Regional Geo Match Constraint: %s", err) + } + } + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteGeoMatchSetInput{ + ChangeToken: token, + GeoMatchSetId: aws.String(d.Id()), + } + + return conn.DeleteGeoMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regional Geo Match Set: %s", err) + } + + return nil +} + +func updateGeoMatchSetResourceWR(id string, oldConstraints, newConstraints []interface{}, conn *wafregional.WAFRegional, region string) error { + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateGeoMatchSetInput{ + ChangeToken: token, + GeoMatchSetId: aws.String(id), + Updates: diffWafGeoMatchSetConstraints(oldConstraints, newConstraints), + } + + log.Printf("[INFO] Updating WAF Regional Geo Match Set constraints: %s", req) + return conn.UpdateGeoMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Geo Match Set: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_wafregional_geo_match_set_test.go b/aws/resource_aws_wafregional_geo_match_set_test.go new file mode 100644 index 00000000000..a1f67639eee --- /dev/null +++ b/aws/resource_aws_wafregional_geo_match_set_test.go @@ -0,0 +1,335 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSWafRegionalGeoMatchSet_basic(t *testing.T) { + var v waf.GeoMatchSet + geoMatchSet := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegionalGeoMatchSetConfig(geoMatchSet), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalGeoMatchSetExists("aws_wafregional_geo_match_set.test", &v), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "name", geoMatchSet), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.#", "2"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.384465307.type", "Country"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.384465307.value", "US"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.1991628426.type", "Country"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.1991628426.value", "CA"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalGeoMatchSet_changeNameForceNew(t *testing.T) { + var before, after waf.GeoMatchSet + geoMatchSet := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + geoMatchSetNewName := fmt.Sprintf("geoMatchSetNewName-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalGeoMatchSetConfig(geoMatchSet), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalGeoMatchSetExists("aws_wafregional_geo_match_set.test", &before), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "name", geoMatchSet), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.#", "2"), + ), + }, + { + Config: testAccAWSWafRegionalGeoMatchSetConfigChangeName(geoMatchSetNewName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalGeoMatchSetExists("aws_wafregional_geo_match_set.test", &after), + testAccCheckAWSWafGeoMatchSetIdDiffers(&before, &after), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "name", geoMatchSetNewName), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.#", "2"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalGeoMatchSet_disappears(t *testing.T) { + var v waf.GeoMatchSet + geoMatchSet := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalGeoMatchSetConfig(geoMatchSet), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalGeoMatchSetExists("aws_wafregional_geo_match_set.test", &v), + testAccCheckAWSWafRegionalGeoMatchSetDisappears(&v), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSWafRegionalGeoMatchSet_changeConstraints(t *testing.T) { + var before, after waf.GeoMatchSet + setName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalGeoMatchSetConfig(setName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalGeoMatchSetExists("aws_wafregional_geo_match_set.test", &before), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "name", setName), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.#", "2"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.384465307.type", "Country"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.384465307.value", "US"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.1991628426.type", "Country"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.1991628426.value", "CA"), + ), + }, + { + Config: testAccAWSWafRegionalGeoMatchSetConfig_changeConstraints(setName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalGeoMatchSetExists("aws_wafregional_geo_match_set.test", &after), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "name", setName), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.#", "2"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.1174390936.type", "Country"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.1174390936.value", "RU"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.4046309957.type", "Country"), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.4046309957.value", "CN"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalGeoMatchSet_noConstraints(t *testing.T) { + var ipset waf.GeoMatchSet + setName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalGeoMatchSetConfig_noConstraints(setName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalGeoMatchSetExists("aws_wafregional_geo_match_set.test", &ipset), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "name", setName), + resource.TestCheckResourceAttr( + "aws_wafregional_geo_match_set.test", "geo_match_constraint.#", "0"), + ), + }, + }, + }) +} + +func testAccCheckAWSWafGeoMatchSetIdDiffers(before, after *waf.GeoMatchSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + if *before.GeoMatchSetId == *after.GeoMatchSetId { + return fmt.Errorf("Expected different IDs, given %q for both sets", *before.GeoMatchSetId) + } + return nil + } +} + +func testAccCheckAWSWafRegionalGeoMatchSetDisappears(v *waf.GeoMatchSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + region := testAccProvider.Meta().(*AWSClient).region + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateGeoMatchSetInput{ + ChangeToken: token, + GeoMatchSetId: v.GeoMatchSetId, + } + + for _, geoMatchConstraint := range v.GeoMatchConstraints { + geoMatchConstraintUpdate := &waf.GeoMatchSetUpdate{ + Action: aws.String("DELETE"), + GeoMatchConstraint: &waf.GeoMatchConstraint{ + Type: geoMatchConstraint.Type, + Value: geoMatchConstraint.Value, + }, + } + req.Updates = append(req.Updates, geoMatchConstraintUpdate) + } + return conn.UpdateGeoMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Geo Match Set: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteGeoMatchSetInput{ + ChangeToken: token, + GeoMatchSetId: v.GeoMatchSetId, + } + return conn.DeleteGeoMatchSet(opts) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regional Geo Match Set: %s", err) + } + return nil + } +} + +func testAccCheckAWSWafRegionalGeoMatchSetExists(n string, v *waf.GeoMatchSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Regional Geo Match Set ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetGeoMatchSet(&waf.GetGeoMatchSetInput{ + GeoMatchSetId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.GeoMatchSet.GeoMatchSetId == rs.Primary.ID { + *v = *resp.GeoMatchSet + return nil + } + + return fmt.Errorf("WAF Regional Geo Match Set (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSWafRegionalGeoMatchSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_geo_match_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetGeoMatchSet( + &waf.GetGeoMatchSetInput{ + GeoMatchSetId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.GeoMatchSet.GeoMatchSetId == rs.Primary.ID { + return fmt.Errorf("WAF Regional Geo Match Set %s still exists", rs.Primary.ID) + } + } + + // Return nil if the WAF Regional Geo Match Set is already destroyed + if isAWSErr(err, "WAFNonexistentItemException", "") { + return nil + } + + return err + } + + return nil +} + +func testAccAWSWafRegionalGeoMatchSetConfig(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_geo_match_set" "test" { + name = "%s" + geo_match_constraint { + type = "Country" + value = "US" + } + + geo_match_constraint { + type = "Country" + value = "CA" + } +}`, name) +} + +func testAccAWSWafRegionalGeoMatchSetConfigChangeName(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_geo_match_set" "test" { + name = "%s" + geo_match_constraint { + type = "Country" + value = "US" + } + + geo_match_constraint { + type = "Country" + value = "CA" + } +}`, name) +} + +func testAccAWSWafRegionalGeoMatchSetConfig_changeConstraints(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_geo_match_set" "test" { + name = "%s" + geo_match_constraint { + type = "Country" + value = "RU" + } + + geo_match_constraint { + type = "Country" + value = "CN" + } +}`, name) +} + +func testAccAWSWafRegionalGeoMatchSetConfig_noConstraints(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_geo_match_set" "test" { + name = "%s" +}`, name) +} diff --git a/aws/waf_helpers.go b/aws/waf_helpers.go index 20f11a5df34..bf0e6c6a8b1 100644 --- a/aws/waf_helpers.go +++ b/aws/waf_helpers.go @@ -106,3 +106,48 @@ func flattenWafSizeConstraints(sc []*waf.SizeConstraint) []interface{} { } return out } + +func flattenWafGeoMatchConstraint(ts []*waf.GeoMatchConstraint) []interface{} { + out := make([]interface{}, len(ts), len(ts)) + for i, t := range ts { + m := make(map[string]interface{}) + m["type"] = *t.Type + m["value"] = *t.Value + out[i] = m + } + return out +} + +func diffWafGeoMatchSetConstraints(oldT, newT []interface{}) []*waf.GeoMatchSetUpdate { + updates := make([]*waf.GeoMatchSetUpdate, 0) + + for _, od := range oldT { + constraint := od.(map[string]interface{}) + + if idx, contains := sliceContainsMap(newT, constraint); contains { + newT = append(newT[:idx], newT[idx+1:]...) + continue + } + + updates = append(updates, &waf.GeoMatchSetUpdate{ + Action: aws.String(waf.ChangeActionDelete), + GeoMatchConstraint: &waf.GeoMatchConstraint{ + Type: aws.String(constraint["type"].(string)), + Value: aws.String(constraint["value"].(string)), + }, + }) + } + + for _, nd := range newT { + constraint := nd.(map[string]interface{}) + + updates = append(updates, &waf.GeoMatchSetUpdate{ + Action: aws.String(waf.ChangeActionInsert), + GeoMatchConstraint: &waf.GeoMatchConstraint{ + Type: aws.String(constraint["type"].(string)), + Value: aws.String(constraint["value"].(string)), + }, + }) + } + return updates +} diff --git a/website/aws.erb b/website/aws.erb index 4b53b411a60..2b84128ace3 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1511,6 +1511,10 @@ aws_wafregional_byte_match_set + > + aws_wafregional_geo_match_set + + > aws_wafregional_ipset diff --git a/website/docs/r/wafregional_geo_match_set.html.markdown b/website/docs/r/wafregional_geo_match_set.html.markdown new file mode 100644 index 00000000000..dd08b44ca74 --- /dev/null +++ b/website/docs/r/wafregional_geo_match_set.html.markdown @@ -0,0 +1,54 @@ + +--- +layout: "aws" +page_title: "AWS: wafregional_geo_match_set" +sidebar_current: "docs-aws-resource-wafregional-geo-match-set" +description: |- + Provides a AWS WAF Regional Geo Match Set resource. +--- + +# aws_wafregional_geo_match_set + +Provides a WAF Regional Geo Match Set Resource + +## Example Usage + +```hcl +resource "aws_wafregional_geo_match_set" "geo_match_set" { + name = "geo_match_set" + + geo_match_constraint { + type = "Country" + value = "US" + } + + geo_match_constraint { + type = "Country" + value = "CA" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name or description of the Geo Match Set. +* `geo_match_constraint` - (Optional) The Geo Match Constraint objects which contain the country that you want AWS WAF to search for. + +## Nested Blocks + +### `geo_match_constraint` + +#### Arguments + +* `type` - (Required) The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value. +* `value` - (Required) The country that you want AWS WAF to search for. + This is the two-letter country code, e.g. `US`, `CA`, `RU`, `CN`, etc. + See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_GeoMatchConstraint.html) for all supported values. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Regional Geo Match Set. From 4c4a6a4e52827eb7659fba233b7dcb18a2cf914a Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Mar 2018 12:45:38 +0100 Subject: [PATCH 0219/3316] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6be984aa68b..328c1dde42c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.13.0 (Unreleased) +FEATURES: + +* **New Resource:** `aws_wafregional_geo_match_set` [GH-3915] + ENHANCEMENTS: * resource/appsync_graphql_api: Support import [GH-3500] From 7615a51565041a0a86c8fb6973e8ec366eaa494f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 07:49:03 -0400 Subject: [PATCH 0220/3316] tests/resource/aws_elasticache_cluster: Sweeper dependency on aws_elasticache_replication_group InvalidCacheClusterState: Cache cluster tf-168mc8uovj-001 is serving as primary for replication group tf-168mc8uovj and cannot be deleted. To delete the entire replication group, use DeleteReplicationGroup. --- aws/resource_aws_elasticache_cluster_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 8a72ce80797..c4ec56722b6 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -23,6 +23,9 @@ func init() { resource.AddTestSweepers("aws_elasticache_cluster", &resource.Sweeper{ Name: "aws_elasticache_cluster", F: testSweepElasticacheClusters, + Dependencies: []string{ + "aws_elasticache_replication_group", + }, }) } From 98dae1760d68c612419a207d92f6d8910f7d88b4 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 23 Mar 2018 17:22:02 +0000 Subject: [PATCH 0221/3316] New Resource: aws_waf_regex_pattern_set --- aws/provider.go | 1 + aws/resource_aws_waf_regex_pattern_set.go | 144 +++++++++++ ...resource_aws_waf_regex_pattern_set_test.go | 231 ++++++++++++++++++ aws/waf_helpers.go | 34 +++ website/aws.erb | 4 + .../r/waf_regex_pattern_set.html.markdown | 33 +++ 6 files changed, 447 insertions(+) create mode 100644 aws/resource_aws_waf_regex_pattern_set.go create mode 100644 aws/resource_aws_waf_regex_pattern_set_test.go create mode 100644 website/docs/r/waf_regex_pattern_set.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 927eac1dc8a..44abf261cc7 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -549,6 +549,7 @@ func Provider() terraform.ResourceProvider { "aws_waf_ipset": resourceAwsWafIPSet(), "aws_waf_rule": resourceAwsWafRule(), "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), "aws_waf_web_acl": resourceAwsWafWebAcl(), "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), diff --git a/aws/resource_aws_waf_regex_pattern_set.go b/aws/resource_aws_waf_regex_pattern_set.go new file mode 100644 index 00000000000..1ebbc58f69a --- /dev/null +++ b/aws/resource_aws_waf_regex_pattern_set.go @@ -0,0 +1,144 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegexPatternSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegexPatternSetCreate, + Read: resourceAwsWafRegexPatternSetRead, + Update: resourceAwsWafRegexPatternSetUpdate, + Delete: resourceAwsWafRegexPatternSetDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "regex_pattern_strings": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsWafRegexPatternSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + log.Printf("[INFO] Creating WAF Regex Pattern Set: %s", d.Get("name").(string)) + + wr := newWafRetryer(conn, "global") + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRegexPatternSetInput{ + ChangeToken: token, + Name: aws.String(d.Get("name").(string)), + } + return conn.CreateRegexPatternSet(params) + }) + if err != nil { + return fmt.Errorf("Failed creating WAF Regex Pattern Set: %s", err) + } + resp := out.(*waf.CreateRegexPatternSetOutput) + + d.SetId(*resp.RegexPatternSet.RegexPatternSetId) + + return resourceAwsWafRegexPatternSetUpdate(d, meta) +} + +func resourceAwsWafRegexPatternSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + log.Printf("[INFO] Reading WAF Regex Pattern Set: %s", d.Get("name").(string)) + params := &waf.GetRegexPatternSetInput{ + RegexPatternSetId: aws.String(d.Id()), + } + + resp, err := conn.GetRegexPatternSet(params) + if err != nil { + // TODO: Replace with a constant once available + // See https://github.com/aws/aws-sdk-go/issues/1856 + if isAWSErr(err, "WAFNonexistentItemException", "") { + log.Printf("[WARN] WAF Regex Pattern Set (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("name", resp.RegexPatternSet.Name) + d.Set("regex_pattern_strings", aws.StringValueSlice(resp.RegexPatternSet.RegexPatternStrings)) + + return nil +} + +func resourceAwsWafRegexPatternSetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + log.Printf("[INFO] Updating WAF Regex Pattern Set: %s", d.Get("name").(string)) + + if d.HasChange("regex_pattern_strings") { + o, n := d.GetChange("regex_pattern_strings") + oldPatterns, newPatterns := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateWafRegexPatternSetPatternStrings(d.Id(), oldPatterns, newPatterns, conn) + if err != nil { + return fmt.Errorf("Failed updating WAF Regex Pattern Set: %s", err) + } + } + + return resourceAwsWafRegexPatternSetRead(d, meta) +} + +func resourceAwsWafRegexPatternSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + oldPatterns := d.Get("regex_pattern_strings").(*schema.Set).List() + if len(oldPatterns) > 0 { + noPatterns := []interface{}{} + err := updateWafRegexPatternSetPatternStrings(d.Id(), oldPatterns, noPatterns, conn) + if err != nil { + return fmt.Errorf("Error updating WAF Regex Pattern Set: %s", err) + } + } + + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: aws.String(d.Id()), + } + log.Printf("[INFO] Deleting WAF Regex Pattern Set: %s", req) + return conn.DeleteRegexPatternSet(req) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regex Pattern Set: %s", err) + } + + return nil +} + +func updateWafRegexPatternSetPatternStrings(id string, oldPatterns, newPatterns []interface{}, conn *waf.WAF) error { + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: aws.String(id), + Updates: diffWafRegexPatternSetPatternStrings(oldPatterns, newPatterns), + } + + return conn.UpdateRegexPatternSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regex Pattern Set: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_waf_regex_pattern_set_test.go b/aws/resource_aws_waf_regex_pattern_set_test.go new file mode 100644 index 00000000000..ff8c7b550b9 --- /dev/null +++ b/aws/resource_aws_waf_regex_pattern_set_test.go @@ -0,0 +1,231 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSWafRegexPatternSet_basic(t *testing.T) { + var v waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegexPatternSetConfig(patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegexPatternSetExists("aws_waf_regex_pattern_set.test", &v), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.#", "2"), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.2848565413", "one"), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.3351840846", "two"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegexPatternSet_changePatterns(t *testing.T) { + var before, after waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegexPatternSetConfig(patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegexPatternSetExists("aws_waf_regex_pattern_set.test", &before), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.#", "2"), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.2848565413", "one"), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.3351840846", "two"), + ), + }, + { + Config: testAccAWSWafRegexPatternSetConfig_changePatterns(patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegexPatternSetExists("aws_waf_regex_pattern_set.test", &after), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.#", "3"), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.3351840846", "two"), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.2929247714", "three"), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.1294846542", "four"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegexPatternSet_noPatterns(t *testing.T) { + var patternSet waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegexPatternSetConfig_noPatterns(patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegexPatternSetExists("aws_waf_regex_pattern_set.test", &patternSet), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_waf_regex_pattern_set.test", "regex_pattern_strings.#", "0"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegexPatternSet_disappears(t *testing.T) { + var v waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegexPatternSetConfig(patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegexPatternSetExists("aws_waf_regex_pattern_set.test", &v), + testAccCheckAWSWafRegexPatternSetDisappears(&v), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckAWSWafRegexPatternSetDisappears(set *waf.RegexPatternSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafconn + + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: set.RegexPatternSetId, + } + + for _, pattern := range set.RegexPatternStrings { + update := &waf.RegexPatternSetUpdate{ + Action: aws.String("DELETE"), + RegexPatternString: pattern, + } + req.Updates = append(req.Updates, update) + } + + return conn.UpdateRegexPatternSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regex Pattern Set: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: set.RegexPatternSetId, + } + return conn.DeleteRegexPatternSet(opts) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regex Pattern Set: %s", err) + } + + return nil + } +} + +func testAccCheckAWSWafRegexPatternSetExists(n string, v *waf.RegexPatternSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Regex Pattern Set ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafconn + resp, err := conn.GetRegexPatternSet(&waf.GetRegexPatternSetInput{ + RegexPatternSetId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.RegexPatternSet.RegexPatternSetId == rs.Primary.ID { + *v = *resp.RegexPatternSet + return nil + } + + return fmt.Errorf("WAF Regex Pattern Set (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSWafRegexPatternSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_waf_regex_pattern_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafconn + resp, err := conn.GetRegexPatternSet(&waf.GetRegexPatternSetInput{ + RegexPatternSetId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.RegexPatternSet.RegexPatternSetId == rs.Primary.ID { + return fmt.Errorf("WAF Regex Pattern Set %s still exists", rs.Primary.ID) + } + } + + // Return nil if the Regex Pattern Set is already destroyed + if isAWSErr(err, "WAFNonexistentItemException", "") { + return nil + } + + return err + } + + return nil +} + +func testAccAWSWafRegexPatternSetConfig(name string) string { + return fmt.Sprintf(` +resource "aws_waf_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["one", "two"] +}`, name) +} + +func testAccAWSWafRegexPatternSetConfig_changePatterns(name string) string { + return fmt.Sprintf(` +resource "aws_waf_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["two", "three", "four"] +}`, name) +} + +func testAccAWSWafRegexPatternSetConfig_noPatterns(name string) string { + return fmt.Sprintf(` +resource "aws_waf_regex_pattern_set" "test" { + name = "%s" +}`, name) +} diff --git a/aws/waf_helpers.go b/aws/waf_helpers.go index bf0e6c6a8b1..315bedd1f91 100644 --- a/aws/waf_helpers.go +++ b/aws/waf_helpers.go @@ -151,3 +151,37 @@ func diffWafGeoMatchSetConstraints(oldT, newT []interface{}) []*waf.GeoMatchSetU } return updates } + +func diffWafRegexPatternSetPatternStrings(oldPatterns, newPatterns []interface{}) []*waf.RegexPatternSetUpdate { + updates := make([]*waf.RegexPatternSetUpdate, 0) + + for _, op := range oldPatterns { + if idx, contains := sliceContainsString(newPatterns, op.(string)); contains { + newPatterns = append(newPatterns[:idx], newPatterns[idx+1:]...) + continue + } + + updates = append(updates, &waf.RegexPatternSetUpdate{ + Action: aws.String(waf.ChangeActionDelete), + RegexPatternString: aws.String(op.(string)), + }) + } + + for _, np := range newPatterns { + updates = append(updates, &waf.RegexPatternSetUpdate{ + Action: aws.String(waf.ChangeActionInsert), + RegexPatternString: aws.String(np.(string)), + }) + } + return updates +} + +func sliceContainsString(slice []interface{}, s string) (int, bool) { + for idx, value := range slice { + v := value.(string) + if v == s { + return idx, true + } + } + return -1, false +} diff --git a/website/aws.erb b/website/aws.erb index df9502b5be5..b8ed67d1791 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1480,6 +1480,10 @@ aws_waf_rate_based_rule + > + aws_waf_regex_pattern_set + + > aws_waf_rule diff --git a/website/docs/r/waf_regex_pattern_set.html.markdown b/website/docs/r/waf_regex_pattern_set.html.markdown new file mode 100644 index 00000000000..ca9bcb9588e --- /dev/null +++ b/website/docs/r/waf_regex_pattern_set.html.markdown @@ -0,0 +1,33 @@ +--- +layout: "aws" +page_title: "AWS: waf_regex_pattern_set" +sidebar_current: "docs-aws-resource-waf-regex-pattern-set" +description: |- + Provides a AWS WAF Regex Pattern Set resource. +--- + +# aws_waf_regex_pattern_set + +Provides a WAF Regex Pattern Set Resource + +## Example Usage + +```hcl +resource "aws_waf_regex_pattern_set" "example" { + name = "tf_waf_regex_pattern_set" + regex_pattern_strings = ["one", "two"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name or description of the Regex Pattern Set. +* `regex_pattern_strings` - (Optional) A list of regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t`. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Regex Pattern Set. From 7d7e837cec9ccd7e345a063758fece9aed1beaa2 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Mar 2018 13:30:53 +0100 Subject: [PATCH 0222/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 328c1dde42c..2bf215d0105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ FEATURES: +* **New Resource:** `aws_waf_regex_pattern_set` [GH-3913] * **New Resource:** `aws_wafregional_geo_match_set` [GH-3915] ENHANCEMENTS: From 2c42a67aae92d817f7b8255995bf71a09b4d0ba6 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Mar 2018 13:45:54 +0100 Subject: [PATCH 0223/3316] New Resource: aws_wafregional_regex_pattern_set --- aws/provider.go | 5 +- ...ource_aws_wafregional_regex_pattern_set.go | 147 +++++++++++ ..._aws_wafregional_regex_pattern_set_test.go | 233 ++++++++++++++++++ website/aws.erb | 4 + ...afregional_regex_pattern_set.html.markdown | 33 +++ 5 files changed, 420 insertions(+), 2 deletions(-) create mode 100644 aws/resource_aws_wafregional_regex_pattern_set.go create mode 100644 aws/resource_aws_wafregional_regex_pattern_set_test.go create mode 100644 website/docs/r/wafregional_regex_pattern_set.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 44abf261cc7..e4520d346bb 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -547,9 +547,9 @@ func Provider() terraform.ResourceProvider { "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rule": resourceAwsWafRule(), "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), "aws_waf_web_acl": resourceAwsWafWebAcl(), "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), @@ -558,10 +558,11 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), diff --git a/aws/resource_aws_wafregional_regex_pattern_set.go b/aws/resource_aws_wafregional_regex_pattern_set.go new file mode 100644 index 00000000000..6f311b32585 --- /dev/null +++ b/aws/resource_aws_wafregional_regex_pattern_set.go @@ -0,0 +1,147 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegionalRegexPatternSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegionalRegexPatternSetCreate, + Read: resourceAwsWafRegionalRegexPatternSetRead, + Update: resourceAwsWafRegionalRegexPatternSetUpdate, + Delete: resourceAwsWafRegionalRegexPatternSetDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "regex_pattern_strings": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsWafRegionalRegexPatternSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + log.Printf("[INFO] Creating WAF Regional Regex Pattern Set: %s", d.Get("name").(string)) + + wr := newWafRegionalRetryer(conn, region) + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRegexPatternSetInput{ + ChangeToken: token, + Name: aws.String(d.Get("name").(string)), + } + return conn.CreateRegexPatternSet(params) + }) + if err != nil { + return fmt.Errorf("Failed creating WAF Regional Regex Pattern Set: %s", err) + } + resp := out.(*waf.CreateRegexPatternSetOutput) + + d.SetId(*resp.RegexPatternSet.RegexPatternSetId) + + return resourceAwsWafRegionalRegexPatternSetUpdate(d, meta) +} + +func resourceAwsWafRegionalRegexPatternSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + + log.Printf("[INFO] Reading WAF Regional Regex Pattern Set: %s", d.Get("name").(string)) + params := &waf.GetRegexPatternSetInput{ + RegexPatternSetId: aws.String(d.Id()), + } + + resp, err := conn.GetRegexPatternSet(params) + if err != nil { + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAF Regional Regex Pattern Set (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("name", resp.RegexPatternSet.Name) + d.Set("regex_pattern_strings", aws.StringValueSlice(resp.RegexPatternSet.RegexPatternStrings)) + + return nil +} + +func resourceAwsWafRegionalRegexPatternSetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + log.Printf("[INFO] Updating WAF Regional Regex Pattern Set: %s", d.Get("name").(string)) + + if d.HasChange("regex_pattern_strings") { + o, n := d.GetChange("regex_pattern_strings") + oldPatterns, newPatterns := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateWafRegionalRegexPatternSetPatternStringsWR(d.Id(), oldPatterns, newPatterns, conn, region) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Regex Pattern Set: %s", err) + } + } + + return resourceAwsWafRegionalRegexPatternSetRead(d, meta) +} + +func resourceAwsWafRegionalRegexPatternSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + oldPatterns := d.Get("regex_pattern_strings").(*schema.Set).List() + if len(oldPatterns) > 0 { + noPatterns := []interface{}{} + err := updateWafRegionalRegexPatternSetPatternStringsWR(d.Id(), oldPatterns, noPatterns, conn, region) + if err != nil { + return fmt.Errorf("Error updating WAF Regional Regex Pattern Set: %s", err) + } + } + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: aws.String(d.Id()), + } + log.Printf("[INFO] Deleting WAF Regional Regex Pattern Set: %s", req) + return conn.DeleteRegexPatternSet(req) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regional Regex Pattern Set: %s", err) + } + + return nil +} + +func updateWafRegionalRegexPatternSetPatternStringsWR(id string, oldPatterns, newPatterns []interface{}, conn *wafregional.WAFRegional, region string) error { + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: aws.String(id), + Updates: diffWafRegexPatternSetPatternStrings(oldPatterns, newPatterns), + } + + return conn.UpdateRegexPatternSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Regex Pattern Set: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_wafregional_regex_pattern_set_test.go b/aws/resource_aws_wafregional_regex_pattern_set_test.go new file mode 100644 index 00000000000..6ba98797e47 --- /dev/null +++ b/aws/resource_aws_wafregional_regex_pattern_set_test.go @@ -0,0 +1,233 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSWafRegionalRegexPatternSet_basic(t *testing.T) { + var patternSet waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRegexPatternSetConfig(patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRegexPatternSetExists("aws_wafregional_regex_pattern_set.test", &patternSet), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.#", "2"), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.2848565413", "one"), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.3351840846", "two"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRegexPatternSet_changePatterns(t *testing.T) { + var before, after waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRegexPatternSetConfig(patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRegexPatternSetExists("aws_wafregional_regex_pattern_set.test", &before), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.#", "2"), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.2848565413", "one"), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.3351840846", "two"), + ), + }, + { + Config: testAccAWSWafRegionalRegexPatternSetConfig_changePatterns(patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRegexPatternSetExists("aws_wafregional_regex_pattern_set.test", &after), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.#", "3"), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.3351840846", "two"), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.2929247714", "three"), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.1294846542", "four"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRegexPatternSet_noPatterns(t *testing.T) { + var patternSet waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRegexPatternSetConfig_noPatterns(patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRegexPatternSetExists("aws_wafregional_regex_pattern_set.test", &patternSet), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "name", patternSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_pattern_set.test", "regex_pattern_strings.#", "0"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRegexPatternSet_disappears(t *testing.T) { + var patternSet waf.RegexPatternSet + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexPatternSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRegexPatternSetConfig(patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRegexPatternSetExists("aws_wafregional_regex_pattern_set.test", &patternSet), + testAccCheckAWSWafRegionalRegexPatternSetDisappears(&patternSet), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckAWSWafRegionalRegexPatternSetDisappears(set *waf.RegexPatternSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + region := testAccProvider.Meta().(*AWSClient).region + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: set.RegexPatternSetId, + } + + for _, pattern := range set.RegexPatternStrings { + update := &waf.RegexPatternSetUpdate{ + Action: aws.String("DELETE"), + RegexPatternString: pattern, + } + req.Updates = append(req.Updates, update) + } + + return conn.UpdateRegexPatternSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Regex Pattern Set: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteRegexPatternSetInput{ + ChangeToken: token, + RegexPatternSetId: set.RegexPatternSetId, + } + return conn.DeleteRegexPatternSet(opts) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regional Regex Pattern Set: %s", err) + } + + return nil + } +} + +func testAccCheckAWSWafRegionalRegexPatternSetExists(n string, patternSet *waf.RegexPatternSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Regional Regex Pattern Set ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRegexPatternSet(&waf.GetRegexPatternSetInput{ + RegexPatternSetId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.RegexPatternSet.RegexPatternSetId == rs.Primary.ID { + *patternSet = *resp.RegexPatternSet + return nil + } + + return fmt.Errorf("WAF Regional Regex Pattern Set (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSWafRegionalRegexPatternSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_regex_pattern_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRegexPatternSet(&waf.GetRegexPatternSetInput{ + RegexPatternSetId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.RegexPatternSet.RegexPatternSetId == rs.Primary.ID { + return fmt.Errorf("WAF Regional Regex Pattern Set %s still exists", rs.Primary.ID) + } + } + + // Return nil if the Regex Pattern Set is already destroyed + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + return nil + } + + return err + } + + return nil +} + +func testAccAWSWafRegionalRegexPatternSetConfig(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["one", "two"] +}`, name) +} + +func testAccAWSWafRegionalRegexPatternSetConfig_changePatterns(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["two", "three", "four"] +}`, name) +} + +func testAccAWSWafRegionalRegexPatternSetConfig_noPatterns(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_regex_pattern_set" "test" { + name = "%s" +}`, name) +} diff --git a/website/aws.erb b/website/aws.erb index b8ed67d1791..34a9a2e87a5 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1523,6 +1523,10 @@ aws_wafregional_ipset + > + aws_wafregional_regex_pattern_set + + > aws_wafregional_rule diff --git a/website/docs/r/wafregional_regex_pattern_set.html.markdown b/website/docs/r/wafregional_regex_pattern_set.html.markdown new file mode 100644 index 00000000000..8c6d3283019 --- /dev/null +++ b/website/docs/r/wafregional_regex_pattern_set.html.markdown @@ -0,0 +1,33 @@ +--- +layout: "aws" +page_title: "AWS: wafregional_regex_pattern_set" +sidebar_current: "docs-aws-resource-wafregional-regex-pattern-set" +description: |- + Provides a AWS WAF Regional Regex Pattern Set resource. +--- + +# aws_wafregional_regex_pattern_set + +Provides a WAF Regional Regex Pattern Set Resource + +## Example Usage + +```hcl +resource "aws_wafregional_regex_pattern_set" "example" { + name = "example" + regex_pattern_strings = ["one", "two"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name or description of the Regex Pattern Set. +* `regex_pattern_strings` - (Optional) A list of regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t`. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Regional Regex Pattern Set. From 3b550703b6d992aefb35605c861e229358e338e3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 09:50:47 -0400 Subject: [PATCH 0224/3316] tests/resource/aws_elasticache_*: Remove unreachable sweeper returns --- aws/resource_aws_elasticache_cluster_test.go | 1 - aws/resource_aws_elasticache_replication_group_test.go | 1 - 2 files changed, 2 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index c4ec56722b6..3b14a6e5f77 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -69,7 +69,6 @@ func testSweepElasticacheClusters(region string) error { } return !isLast }) - return nil } func TestAccAWSElasticacheCluster_Engine_Memcached_Ec2Classic(t *testing.T) { diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index b903c176bc1..12ae7f2e6c8 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -63,7 +63,6 @@ func testSweepElasticacheReplicationGroups(region string) error { } return !isLast }) - return nil } func TestAccAWSElasticacheReplicationGroup_basic(t *testing.T) { From 4bf17ff090a096995f4ae29707b90a766295b4ee Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Tue, 20 Mar 2018 22:52:12 -0400 Subject: [PATCH 0225/3316] fix lb read of http2 attribute add acceptance checks on attribute tests --- aws/resource_aws_lb.go | 12 +++---- aws/resource_aws_lb_test.go | 62 +++++++++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index f6d978b34ed..a80639d04af 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -332,7 +332,7 @@ func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { switch d.Get("load_balancer_type").(string) { case "application": - if d.HasChange("access_logs") { + if d.HasChange("access_logs") || d.IsNewResource() { logs := d.Get("access_logs").([]interface{}) if len(logs) == 1 { log := logs[0].(map[string]interface{}) @@ -360,20 +360,20 @@ func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { }) } } - if d.HasChange("idle_timeout") { + if d.HasChange("idle_timeout") || d.IsNewResource() { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ Key: aws.String("idle_timeout.timeout_seconds"), Value: aws.String(fmt.Sprintf("%d", d.Get("idle_timeout").(int))), }) } - if d.HasChange("enable_http2") { + if d.HasChange("enable_http2") || d.IsNewResource() { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ Key: aws.String("routing.http2.enabled"), Value: aws.String(strconv.FormatBool(d.Get("enable_http2").(bool))), }) } case "network": - if d.HasChange("enable_cross_zone_load_balancing") { + if d.HasChange("enable_cross_zone_load_balancing") || d.IsNewResource() { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ Key: aws.String("load_balancing.cross_zone.enabled"), Value: aws.String(fmt.Sprintf("%t", d.Get("enable_cross_zone_load_balancing").(bool))), @@ -381,7 +381,7 @@ func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { } } - if d.HasChange("enable_deletion_protection") { + if d.HasChange("enable_deletion_protection") || d.IsNewResource() { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ Key: aws.String("deletion_protection.enabled"), Value: aws.String(fmt.Sprintf("%t", d.Get("enable_deletion_protection").(bool))), @@ -707,7 +707,7 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo protectionEnabled := (*attr.Value) == "true" log.Printf("[DEBUG] Setting LB Deletion Protection Enabled: %t", protectionEnabled) d.Set("enable_deletion_protection", protectionEnabled) - case "enable_http2": + case "routing.http2.enabled": http2Enabled := (*attr.Value) == "true" log.Printf("[DEBUG] Setting ALB HTTP/2 Enabled: %t", http2Enabled) d.Set("enable_http2", http2Enabled) diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 59a1dd70a07..08049cd93ac 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -279,6 +279,7 @@ func TestAccAWSLB_networkLoadbalancer_updateCrossZone(t *testing.T) { Config: testAccAWSLBConfig_networkLoadbalancer(lbName, true), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &pre), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "load_balancing.cross_zone.enabled", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_cross_zone_load_balancing", "true"), ), }, @@ -286,6 +287,7 @@ func TestAccAWSLB_networkLoadbalancer_updateCrossZone(t *testing.T) { Config: testAccAWSLBConfig_networkLoadbalancer(lbName, false), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &mid), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "load_balancing.cross_zone.enabled", "false"), resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_cross_zone_load_balancing", "false"), testAccCheckAWSlbARNs(&pre, &mid), ), @@ -294,6 +296,7 @@ func TestAccAWSLB_networkLoadbalancer_updateCrossZone(t *testing.T) { Config: testAccAWSLBConfig_networkLoadbalancer(lbName, true), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &post), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "load_balancing.cross_zone.enabled", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_cross_zone_load_balancing", "true"), testAccCheckAWSlbARNs(&mid, &post), ), @@ -313,25 +316,28 @@ func TestAccAWSLB_applicationLoadBalancer_updateHttp2(t *testing.T) { CheckDestroy: testAccCheckAWSLBDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLBConfig_enableHttp2(lbName, true), + Config: testAccAWSLBConfig_enableHttp2(lbName, false), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &pre), - resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_http2", "true"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "routing.http2.enabled", "false"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_http2", "false"), ), }, { - Config: testAccAWSLBConfig_enableHttp2(lbName, false), + Config: testAccAWSLBConfig_enableHttp2(lbName, true), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &mid), - resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_http2", "false"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "routing.http2.enabled", "true"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_http2", "true"), testAccCheckAWSlbARNs(&pre, &mid), ), }, { - Config: testAccAWSLBConfig_enableHttp2(lbName, true), + Config: testAccAWSLBConfig_enableHttp2(lbName, false), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &post), - resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_http2", "true"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "routing.http2.enabled", "false"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_http2", "false"), testAccCheckAWSlbARNs(&mid, &post), ), }, @@ -353,6 +359,7 @@ func TestAccAWSLB_applicationLoadBalancer_updateDeletionProtection(t *testing.T) Config: testAccAWSLBConfig_enableDeletionProtection(lbName, false), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &pre), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "deletion_protection.enabled", "false"), resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_deletion_protection", "false"), ), }, @@ -360,6 +367,7 @@ func TestAccAWSLB_applicationLoadBalancer_updateDeletionProtection(t *testing.T) Config: testAccAWSLBConfig_enableDeletionProtection(lbName, true), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &mid), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "deletion_protection.enabled", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_deletion_protection", "true"), testAccCheckAWSlbARNs(&pre, &mid), ), @@ -368,6 +376,7 @@ func TestAccAWSLB_applicationLoadBalancer_updateDeletionProtection(t *testing.T) Config: testAccAWSLBConfig_enableDeletionProtection(lbName, false), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &post), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "deletion_protection.enabled", "false"), resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_deletion_protection", "false"), testAccCheckAWSlbARNs(&mid, &post), ), @@ -511,6 +520,9 @@ func TestAccAWSLB_accesslogs(t *testing.T) { Config: testAccAWSLBConfig_basic(lbName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &conf), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.enabled", "false"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", ""), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", ""), resource.TestCheckResourceAttr("aws_lb.lb_test", "name", lbName), resource.TestCheckResourceAttr("aws_lb.lb_test", "internal", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "subnets.#", "2"), @@ -529,6 +541,9 @@ func TestAccAWSLB_accesslogs(t *testing.T) { Config: testAccAWSLBConfig_accessLogs(true, lbName, bucketName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &conf), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.enabled", "true"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", bucketName), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", "testAccAWSALBConfig_accessLogs"), resource.TestCheckResourceAttr("aws_lb.lb_test", "name", lbName), resource.TestCheckResourceAttr("aws_lb.lb_test", "internal", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "subnets.#", "2"), @@ -551,6 +566,9 @@ func TestAccAWSLB_accesslogs(t *testing.T) { Config: testAccAWSLBConfig_accessLogs(false, lbName, bucketName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &conf), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.enabled", "false"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", ""), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", ""), resource.TestCheckResourceAttr("aws_lb.lb_test", "name", lbName), resource.TestCheckResourceAttr("aws_lb.lb_test", "internal", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "subnets.#", "2"), @@ -637,6 +655,38 @@ func testAccCheckAWSLBExists(n string, res *elbv2.LoadBalancer) resource.TestChe } } +func testAccCheckAWSLBAttribute(n, key, value string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return errors.New("No LB ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).elbv2conn + attributesResp, err := conn.DescribeLoadBalancerAttributes(&elbv2.DescribeLoadBalancerAttributesInput{ + LoadBalancerArn: aws.String(rs.Primary.ID), + }) + if err != nil { + return errwrap.Wrapf("Error retrieving LB Attributes: {{err}}", err) + } + + for _, attr := range attributesResp.Attributes { + if *attr.Key == key { + if *attr.Value == value { + return nil + } else { + return fmt.Errorf(`LB attribute %s expected: "%s" actual: "%s"`, key, value, *attr.Value) + } + } + } + return fmt.Errorf("LB attribute %s does not exist on LB: %s", key, rs.Primary.ID) + } +} + func testAccCheckAWSLBDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).elbv2conn From 8812cde2cb932c8e2f7e508adc6b716f2245d004 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 22 Mar 2018 15:42:38 -0400 Subject: [PATCH 0226/3316] fix acceptance test --- aws/resource_aws_lb_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 08049cd93ac..2cc308173f9 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -567,8 +567,8 @@ func TestAccAWSLB_accesslogs(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &conf), testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.enabled", "false"), - testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", ""), - testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", ""), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", bucketName), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", "testAccAWSALBConfig_accessLogs"), resource.TestCheckResourceAttr("aws_lb.lb_test", "name", lbName), resource.TestCheckResourceAttr("aws_lb.lb_test", "internal", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "subnets.#", "2"), From eae5e7aaa49400e08208bf82a686cc8aa5584d74 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 10:27:36 -0400 Subject: [PATCH 0227/3316] resource/aws_spot_fleet_request: Add test sweeper --- aws/resource_aws_spot_fleet_request.go | 34 +++++++++------------ aws/resource_aws_spot_fleet_request_test.go | 33 ++++++++++++++++++++ aws/resource_aws_subnet_test.go | 1 + 3 files changed, 49 insertions(+), 19 deletions(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index a9692f9561f..e24b8db8d56 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -1118,25 +1118,21 @@ func resourceAwsSpotFleetRequestDelete(d *schema.ResourceData, meta interface{}) terminateInstances := d.Get("terminate_instances_with_expiration").(bool) log.Printf("[INFO] Cancelling spot fleet request: %s", d.Id()) - resp, err := conn.CancelSpotFleetRequests(&ec2.CancelSpotFleetRequestsInput{ - SpotFleetRequestIds: []*string{aws.String(d.Id())}, - TerminateInstances: aws.Bool(terminateInstances), - }) - + err := deleteSpotFleetRequest(d.Id(), terminateInstances, 5*time.Minute, conn) if err != nil { - return fmt.Errorf("Error cancelling spot request (%s): %s", d.Id(), err) + return fmt.Errorf("error deleting spot request (%s): %s", d.Id(), err) } - // check response successfulFleetRequestSet to make sure our request was canceled - var found bool - for _, s := range resp.SuccessfulFleetRequests { - if *s.SpotFleetRequestId == d.Id() { - found = true - } - } + return nil +} - if !found { - return fmt.Errorf("[ERR] Spot Fleet request (%s) was not found to be successfully canceled, dangling resources may exit", d.Id()) +func deleteSpotFleetRequest(spotFleetRequestID string, terminateInstances bool, timeout time.Duration, conn *ec2.EC2) error { + _, err := conn.CancelSpotFleetRequests(&ec2.CancelSpotFleetRequestsInput{ + SpotFleetRequestIds: []*string{aws.String(spotFleetRequestID)}, + TerminateInstances: aws.Bool(terminateInstances), + }) + if err != nil { + return err } // Only wait for instance termination if requested @@ -1144,20 +1140,20 @@ func resourceAwsSpotFleetRequestDelete(d *schema.ResourceData, meta interface{}) return nil } - return resource.Retry(5*time.Minute, func() *resource.RetryError { + return resource.Retry(timeout, func() *resource.RetryError { resp, err := conn.DescribeSpotFleetInstances(&ec2.DescribeSpotFleetInstancesInput{ - SpotFleetRequestId: aws.String(d.Id()), + SpotFleetRequestId: aws.String(spotFleetRequestID), }) if err != nil { return resource.NonRetryableError(err) } if len(resp.ActiveInstances) == 0 { - log.Printf("[DEBUG] Active instance count is 0 for Spot Fleet Request (%s), removing", d.Id()) + log.Printf("[DEBUG] Active instance count is 0 for Spot Fleet Request (%s), removing", spotFleetRequestID) return nil } - log.Printf("[DEBUG] Active instance count in Spot Fleet Request (%s): %d", d.Id(), len(resp.ActiveInstances)) + log.Printf("[DEBUG] Active instance count in Spot Fleet Request (%s): %d", spotFleetRequestID, len(resp.ActiveInstances)) return resource.RetryableError( fmt.Errorf("fleet still has (%d) running instances", len(resp.ActiveInstances))) diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index 2a1f6d0b51a..c4982a46933 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -14,6 +14,39 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_spot_fleet_request", &resource.Sweeper{ + Name: "aws_spot_fleet_request", + F: testSweepSpotFleetRequests, + }) +} + +func testSweepSpotFleetRequests(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).ec2conn + + return conn.DescribeSpotFleetRequestsPages(&ec2.DescribeSpotFleetRequestsInput{}, func(page *ec2.DescribeSpotFleetRequestsOutput, isLast bool) bool { + if len(page.SpotFleetRequestConfigs) == 0 { + log.Print("[DEBUG] No Spot Fleet Requests to sweep") + return false + } + + for _, config := range page.SpotFleetRequestConfigs { + id := aws.StringValue(config.SpotFleetRequestId) + + log.Printf("[INFO] Deleting Spot Fleet Request: %s", id) + err := deleteSpotFleetRequest(id, true, 5*time.Minute, conn) + if err != nil { + log.Printf("[ERROR] Failed to delete Spot Fleet Request (%s): %s", id, err) + } + } + return !isLast + }) +} + func TestAccAWSSpotFleetRequest_associatePublicIpAddress(t *testing.T) { var sfr ec2.SpotFleetRequestConfig rName := acctest.RandString(10) diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index ddf7b0d5734..6781d07f0e1 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -20,6 +20,7 @@ func init() { Dependencies: []string{ "aws_batch_compute_environment", "aws_elb", + "aws_spot_fleet_request", }, }) } From 81bc63f8a82b652f377761f3ad32d105633621aa Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Tue, 27 Mar 2018 11:05:34 -0400 Subject: [PATCH 0228/3316] use %q instead of "%s" --- aws/resource_aws_lb_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 2cc308173f9..c5b91b52406 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -679,7 +679,7 @@ func testAccCheckAWSLBAttribute(n, key, value string) resource.TestCheckFunc { if *attr.Value == value { return nil } else { - return fmt.Errorf(`LB attribute %s expected: "%s" actual: "%s"`, key, value, *attr.Value) + return fmt.Errorf("LB attribute %s expected: %q actual: %q", key, value, *attr.Value) } } } From f51e4f7f07b4a46edb23fa914316377059e0c190 Mon Sep 17 00:00:00 2001 From: appilon Date: Tue, 27 Mar 2018 11:13:57 -0400 Subject: [PATCH 0229/3316] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf215d0105..c4bf82664e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ BUG FIXES: * resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] * resource/aws_lb_listener: Retry CertificateNotFound errors on update for IAM eventual consistency [GH-3901] * resource/aws_security_group: Retry read on creation for EC2 eventual consistency [GH-3892] +* resource/aws_lb: Store correct state for http2 and ensure attributes are set on create [GH-3854] + ## 1.12.0 (March 23, 2018) From 9f091e29db7950384518ddea99faa546f8cc8aec Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Mar 2018 17:45:40 +0100 Subject: [PATCH 0230/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4bf82664e1..43102ddf632 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Resource:** `aws_waf_regex_pattern_set` [GH-3913] * **New Resource:** `aws_wafregional_geo_match_set` [GH-3915] +* **New Resource:** `aws_wafregional_regex_pattern_set` [GH-3933] ENHANCEMENTS: From 62f19101c19094223a0baed7dada63067187f80a Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 23 Mar 2018 13:47:49 +0000 Subject: [PATCH 0231/3316] New Resource: aws_waf_rule_group --- aws/provider.go | 1 + aws/resource_aws_waf_rule_group.go | 187 +++++++++ aws/resource_aws_waf_rule_group_test.go | 424 ++++++++++++++++++++ aws/waf_helpers.go | 64 +++ website/aws.erb | 4 + website/docs/r/waf_rule_group.html.markdown | 58 +++ 6 files changed, 738 insertions(+) create mode 100644 aws/resource_aws_waf_rule_group.go create mode 100644 aws/resource_aws_waf_rule_group_test.go create mode 100644 website/docs/r/waf_rule_group.html.markdown diff --git a/aws/provider.go b/aws/provider.go index e4520d346bb..c37bb3d8777 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -550,6 +550,7 @@ func Provider() terraform.ResourceProvider { "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), "aws_waf_web_acl": resourceAwsWafWebAcl(), "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), diff --git a/aws/resource_aws_waf_rule_group.go b/aws/resource_aws_waf_rule_group.go new file mode 100644 index 00000000000..16c6e74f709 --- /dev/null +++ b/aws/resource_aws_waf_rule_group.go @@ -0,0 +1,187 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRuleGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRuleGroupCreate, + Read: resourceAwsWafRuleGroupRead, + Update: resourceAwsWafRuleGroupUpdate, + Delete: resourceAwsWafRuleGroupDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "metric_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateWafMetricName, + }, + "activated_rule": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": { + Type: schema.TypeList, + MaxItems: 1, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "priority": { + Type: schema.TypeInt, + Required: true, + }, + "rule_id": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + Default: waf.WafRuleTypeRegular, + }, + }, + }, + }, + }, + } +} + +func resourceAwsWafRuleGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + wr := newWafRetryer(conn, "global") + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRuleGroupInput{ + ChangeToken: token, + MetricName: aws.String(d.Get("metric_name").(string)), + Name: aws.String(d.Get("name").(string)), + } + + return conn.CreateRuleGroup(params) + }) + if err != nil { + return err + } + resp := out.(*waf.CreateRuleGroupOutput) + d.SetId(*resp.RuleGroup.RuleGroupId) + return resourceAwsWafRuleGroupUpdate(d, meta) +} + +func resourceAwsWafRuleGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + params := &waf.GetRuleGroupInput{ + RuleGroupId: aws.String(d.Id()), + } + + resp, err := conn.GetRuleGroup(params) + if err != nil { + if isAWSErr(err, "WAFNonexistentItemException", "") { + log.Printf("[WARN] WAF Rule Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ + RuleGroupId: aws.String(d.Id()), + }) + + d.Set("activated_rule", flattenWafActivatedRules(rResp.ActivatedRules)) + d.Set("name", resp.RuleGroup.Name) + d.Set("metric_name", resp.RuleGroup.MetricName) + + return nil +} + +func resourceAwsWafRuleGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + if d.HasChange("activated_rule") { + o, n := d.GetChange("activated_rule") + oldRules, newRules := o.(*schema.Set).List(), n.(*schema.Set).List() + + err := updateWafRuleGroupResource(d.Id(), oldRules, newRules, conn) + if err != nil { + return fmt.Errorf("Error Updating WAF Rule Group: %s", err) + } + } + + return resourceAwsWafRuleGroupRead(d, meta) +} + +func resourceAwsWafRuleGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + oldRules := d.Get("activated_rule").(*schema.Set).List() + err := deleteWafRuleGroup(d.Id(), oldRules, conn) + if err != nil { + return err + } + + return nil +} + +func deleteWafRuleGroup(id string, oldRules []interface{}, conn *waf.WAF) error { + if len(oldRules) > 0 { + noRules := []interface{}{} + err := updateWafRuleGroupResource(id, oldRules, noRules, conn) + if err != nil { + return fmt.Errorf("Error updating WAF Rule Group Predicates: %s", err) + } + } + + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRuleGroupInput{ + ChangeToken: token, + RuleGroupId: aws.String(id), + } + log.Printf("[INFO] Deleting WAF Rule Group") + return conn.DeleteRuleGroup(req) + }) + if err != nil { + return fmt.Errorf("Error deleting WAF Rule Group: %s", err) + } + return nil +} + +func updateWafRuleGroupResource(id string, oldRules, newRules []interface{}, conn *waf.WAF) error { + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRuleGroupInput{ + ChangeToken: token, + RuleGroupId: aws.String(id), + Updates: diffWafRuleGroupActivatedRules(oldRules, newRules), + } + + return conn.UpdateRuleGroup(req) + }) + if err != nil { + return fmt.Errorf("Error Updating WAF Rule Group: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_waf_rule_group_test.go b/aws/resource_aws_waf_rule_group_test.go new file mode 100644 index 00000000000..7957a13a446 --- /dev/null +++ b/aws/resource_aws_waf_rule_group_test.go @@ -0,0 +1,424 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_waf_rule_group", &resource.Sweeper{ + Name: "aws_waf_rule_group", + F: testSweepWafRuleGroups, + }) +} + +func testSweepWafRuleGroups(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).wafconn + + req := &waf.ListRuleGroupsInput{} + resp, err := conn.ListRuleGroups(req) + if err != nil { + return fmt.Errorf("Error describing WAF Rule Groups: %s", err) + } + + if len(resp.RuleGroups) == 0 { + log.Print("[DEBUG] No AWS WAF Rule Groups to sweep") + return nil + } + + for _, group := range resp.RuleGroups { + if !strings.HasPrefix(*group.Name, "tfacc") { + continue + } + + rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ + RuleGroupId: group.RuleGroupId, + }) + if err != nil { + return err + } + oldRules := flattenWafActivatedRules(rResp.ActivatedRules) + err = deleteWafRuleGroup(*group.RuleGroupId, oldRules, conn) + if err != nil { + return err + } + } + + return nil +} + +func TestAccAWSWafRuleGroup_basic(t *testing.T) { + var rule waf.Rule + var group waf.RuleGroup + var idx int + + ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRuleGroupConfig(ruleName, groupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRuleExists("aws_waf_rule.test", &rule), + testAccCheckAWSWafRuleGroupExists("aws_waf_rule_group.test", &group), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "activated_rule.#", "1"), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "metric_name", groupName), + computeWafActivatedRuleWithRuleId(&rule, "COUNT", 50, &idx), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.action.0.type", &idx, "COUNT"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.priority", &idx, "50"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.type", &idx, waf.WafRuleTypeRegular), + ), + }, + }, + }) +} + +func TestAccAWSWafRuleGroup_changeNameForceNew(t *testing.T) { + var before, after waf.RuleGroup + + ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + newGroupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRuleGroupConfig(ruleName, groupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRuleGroupExists("aws_waf_rule_group.test", &before), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "activated_rule.#", "1"), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "metric_name", groupName), + ), + }, + { + Config: testAccAWSWafRuleGroupConfig(ruleName, newGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRuleGroupExists("aws_waf_rule_group.test", &after), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "name", newGroupName), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "activated_rule.#", "1"), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "metric_name", newGroupName), + ), + }, + }, + }) +} + +func TestAccAWSWafRuleGroup_disappears(t *testing.T) { + var group waf.RuleGroup + ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRuleGroupConfig(ruleName, groupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRuleGroupExists("aws_waf_rule_group.test", &group), + testAccCheckAWSWafRuleGroupDisappears(&group), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSWafRuleGroup_changeActivatedRules(t *testing.T) { + var rule0, rule1, rule2, rule3 waf.Rule + var groupBefore, groupAfter waf.RuleGroup + var idx0, idx1, idx2, idx3 int + + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + ruleName1 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + ruleName2 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + ruleName3 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRuleGroupConfig(ruleName1, groupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRuleExists("aws_waf_rule.test", &rule0), + testAccCheckAWSWafRuleGroupExists("aws_waf_rule_group.test", &groupBefore), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "activated_rule.#", "1"), + computeWafActivatedRuleWithRuleId(&rule0, "COUNT", 50, &idx0), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.action.0.type", &idx0, "COUNT"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.priority", &idx0, "50"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.type", &idx0, waf.WafRuleTypeRegular), + ), + }, + { + Config: testAccAWSWafRuleGroupConfig_changeActivatedRules(ruleName1, ruleName2, ruleName3, groupName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_waf_rule_group.test", "activated_rule.#", "3"), + testAccCheckAWSWafRuleGroupExists("aws_waf_rule_group.test", &groupAfter), + + testAccCheckAWSWafRuleExists("aws_waf_rule.test", &rule1), + computeWafActivatedRuleWithRuleId(&rule1, "BLOCK", 10, &idx1), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.action.0.type", &idx1, "BLOCK"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.priority", &idx1, "10"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.type", &idx1, waf.WafRuleTypeRegular), + + testAccCheckAWSWafRuleExists("aws_waf_rule.test2", &rule2), + computeWafActivatedRuleWithRuleId(&rule2, "COUNT", 1, &idx2), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.action.0.type", &idx2, "COUNT"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.priority", &idx2, "1"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.type", &idx2, waf.WafRuleTypeRegular), + + testAccCheckAWSWafRuleExists("aws_waf_rule.test3", &rule3), + computeWafActivatedRuleWithRuleId(&rule3, "BLOCK", 15, &idx3), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.action.0.type", &idx3, "BLOCK"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.priority", &idx3, "15"), + testCheckResourceAttrWithIndexesAddr("aws_waf_rule_group.test", "activated_rule.%d.type", &idx3, waf.WafRuleTypeRegular), + ), + }, + }, + }) +} + +// computeWafActivatedRuleWithRuleId calculates index +// which isn't static because ruleId is generated as part of the test +func computeWafActivatedRuleWithRuleId(rule *waf.Rule, actionType string, priority int, idx *int) resource.TestCheckFunc { + return func(s *terraform.State) error { + ruleResource := resourceAwsWafRuleGroup().Schema["activated_rule"].Elem.(*schema.Resource) + + m := map[string]interface{}{ + "action": []interface{}{ + map[string]interface{}{ + "type": actionType, + }, + }, + "priority": priority, + "rule_id": *rule.RuleId, + "type": waf.WafRuleTypeRegular, + } + + f := schema.HashResource(ruleResource) + *idx = f(m) + + return nil + } +} + +func TestAccAWSWafRuleGroup_noActivatedRules(t *testing.T) { + var group waf.RuleGroup + groupName := fmt.Sprintf("test%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRuleGroupConfig_noActivatedRules(groupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRuleGroupExists("aws_waf_rule_group.test", &group), + resource.TestCheckResourceAttr( + "aws_waf_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr( + "aws_waf_rule_group.test", "activated_rule.#", "0"), + ), + }, + }, + }) +} + +func testAccCheckAWSWafRuleGroupDisappears(group *waf.RuleGroup) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafconn + + rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ + RuleGroupId: group.RuleGroupId, + }) + + wr := newWafRetryer(conn, "global") + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRuleGroupInput{ + ChangeToken: token, + RuleGroupId: group.RuleGroupId, + } + + for _, rule := range rResp.ActivatedRules { + rule := &waf.RuleGroupUpdate{ + Action: aws.String("DELETE"), + ActivatedRule: rule, + } + req.Updates = append(req.Updates, rule) + } + + return conn.UpdateRuleGroup(req) + }) + if err != nil { + return fmt.Errorf("Error Updating WAF Rule Group: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteRuleGroupInput{ + ChangeToken: token, + RuleGroupId: group.RuleGroupId, + } + return conn.DeleteRuleGroup(opts) + }) + if err != nil { + return fmt.Errorf("Error Deleting WAF Rule Group: %s", err) + } + return nil + } +} + +func testAccCheckAWSWafRuleGroupDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_waf_rule_group" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafconn + resp, err := conn.GetRuleGroup(&waf.GetRuleGroupInput{ + RuleGroupId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.RuleGroup.RuleGroupId == rs.Primary.ID { + return fmt.Errorf("WAF Rule Group %s still exists", rs.Primary.ID) + } + } + + if isAWSErr(err, "WAFNonexistentItemException", "") { + return nil + } + + return err + } + + return nil +} + +func testAccCheckAWSWafRuleGroupExists(n string, group *waf.RuleGroup) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Rule Group ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafconn + resp, err := conn.GetRuleGroup(&waf.GetRuleGroupInput{ + RuleGroupId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.RuleGroup.RuleGroupId == rs.Primary.ID { + *group = *resp.RuleGroup + return nil + } + + return fmt.Errorf("WAF Rule Group (%s) not found", rs.Primary.ID) + } +} + +func testAccAWSWafRuleGroupConfig(ruleName, groupName string) string { + return fmt.Sprintf(` +resource "aws_waf_rule" "test" { + name = "%[1]s" + metric_name = "%[1]s" +} + +resource "aws_waf_rule_group" "test" { + name = "%[2]s" + metric_name = "%[2]s" + activated_rule { + action { + type = "COUNT" + } + priority = 50 + rule_id = "${aws_waf_rule.test.id}" + } +}`, ruleName, groupName) +} + +func testAccAWSWafRuleGroupConfig_changeActivatedRules(ruleName1, ruleName2, ruleName3, groupName string) string { + return fmt.Sprintf(` +resource "aws_waf_rule" "test" { + name = "%[1]s" + metric_name = "%[1]s" +} + +resource "aws_waf_rule" "test2" { + name = "%[2]s" + metric_name = "%[2]s" +} + +resource "aws_waf_rule" "test3" { + name = "%[3]s" + metric_name = "%[3]s" +} + +resource "aws_waf_rule_group" "test" { + name = "%[4]s" + metric_name = "%[4]s" + activated_rule { + action { + type = "BLOCK" + } + priority = 10 + rule_id = "${aws_waf_rule.test.id}" + } + activated_rule { + action { + type = "COUNT" + } + priority = 1 + rule_id = "${aws_waf_rule.test2.id}" + } + activated_rule { + action { + type = "BLOCK" + } + priority = 15 + rule_id = "${aws_waf_rule.test3.id}" + } +}`, ruleName1, ruleName2, ruleName3, groupName) +} + +func testAccAWSWafRuleGroupConfig_noActivatedRules(groupName string) string { + return fmt.Sprintf(` +resource "aws_waf_rule_group" "test" { + name = "%[1]s" + metric_name = "%[1]s" +}`, groupName) +} diff --git a/aws/waf_helpers.go b/aws/waf_helpers.go index 315bedd1f91..240110225d6 100644 --- a/aws/waf_helpers.go +++ b/aws/waf_helpers.go @@ -185,3 +185,67 @@ func sliceContainsString(slice []interface{}, s string) (int, bool) { } return -1, false } + +func diffWafRuleGroupActivatedRules(oldRules, newRules []interface{}) []*waf.RuleGroupUpdate { + updates := make([]*waf.RuleGroupUpdate, 0) + + for _, op := range oldRules { + rule := op.(map[string]interface{}) + + if idx, contains := sliceContainsMap(newRules, rule); contains { + newRules = append(newRules[:idx], newRules[idx+1:]...) + continue + } + + updates = append(updates, &waf.RuleGroupUpdate{ + Action: aws.String(waf.ChangeActionDelete), + ActivatedRule: expandWafActivatedRule(rule), + }) + } + + for _, np := range newRules { + rule := np.(map[string]interface{}) + + updates = append(updates, &waf.RuleGroupUpdate{ + Action: aws.String(waf.ChangeActionInsert), + ActivatedRule: expandWafActivatedRule(rule), + }) + } + return updates +} + +func flattenWafActivatedRules(activatedRules []*waf.ActivatedRule) []interface{} { + out := make([]interface{}, len(activatedRules), len(activatedRules)) + for i, ar := range activatedRules { + rule := map[string]interface{}{ + "priority": int(*ar.Priority), + "rule_id": *ar.RuleId, + "type": *ar.Type, + } + if ar.Action != nil { + rule["action"] = []interface{}{ + map[string]interface{}{ + "type": *ar.Action.Type, + }, + } + } + out[i] = rule + } + return out +} + +func expandWafActivatedRule(rule map[string]interface{}) *waf.ActivatedRule { + r := &waf.ActivatedRule{ + Priority: aws.Int64(int64(rule["priority"].(int))), + RuleId: aws.String(rule["rule_id"].(string)), + Type: aws.String(rule["type"].(string)), + } + + if a, ok := rule["action"].([]interface{}); ok && len(a) > 0 { + m := a[0].(map[string]interface{}) + r.Action = &waf.WafAction{ + Type: aws.String(m["type"].(string)), + } + } + return r +} diff --git a/website/aws.erb b/website/aws.erb index 34a9a2e87a5..3a80e83214a 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1488,6 +1488,10 @@ aws_waf_rule + > + aws_waf_rule_group + + > aws_waf_size_constraint_set diff --git a/website/docs/r/waf_rule_group.html.markdown b/website/docs/r/waf_rule_group.html.markdown new file mode 100644 index 00000000000..56c807eb089 --- /dev/null +++ b/website/docs/r/waf_rule_group.html.markdown @@ -0,0 +1,58 @@ +--- +layout: "aws" +page_title: "AWS: waf_rule_group" +sidebar_current: "docs-aws-resource-waf-rule-group" +description: |- + Provides a AWS WAF rule group resource. +--- + +# aws_waf_rule_group + +Provides a WAF Rule Group Resource + +## Example Usage + +```hcl +resource "aws_waf_rule" "example" { + name = "example" + metric_name = "example" +} + +resource "aws_waf_rule_group" "example" { + name = "example" + metric_name = "example" + activated_rule { + action { + type = "COUNT" + } + priority = 50 + rule_id = "${aws_waf_rule.example.id}" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) A friendly name of the rule group +* `metric_name` - (Required) A friendly name for the metrics from the rule group +* `activated_rule` - (Optional) A list of activated rules, see below + +## Nested Blocks + +### `activated_rule` + +#### Arguments + +* `action` - (Required) Specifies the action that CloudFront or AWS WAF takes when a web request matches the conditions in the rule. + * `type` - (Required) e.g. `BLOCK`, `ALLOW`, or `COUNT` +* `priority` - (Required) Specifies the order in which the rules are evaluated. Rules with a lower value are evaluated before rules with a higher value. +* `rule_id` - (Required) The ID of a [rule](/docs/r/waf_rule.html) +* `type` - (Optional) The rule type, either [`REGULAR`](/docs/r/waf_rule.html), [`RATE_BASED`]((/docs/r/waf_rate_based_rule.html), or `GROUP`. Defaults to `REGULAR`. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF rule group. From 79746b0e0d80aecc2605c442adb3de9e36d066ef Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Mar 2018 18:14:35 +0100 Subject: [PATCH 0232/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43102ddf632..665bb3c0e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Resource:** `aws_waf_regex_pattern_set` [GH-3913] +* **New Resource:** `aws_waf_rule_group` [GH-3898] * **New Resource:** `aws_wafregional_geo_match_set` [GH-3915] * **New Resource:** `aws_wafregional_regex_pattern_set` [GH-3933] From 34b42c3ca19dd32fde153681c494fc869031a21a Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 22 Mar 2018 10:58:15 +0000 Subject: [PATCH 0233/3316] New Resource: aws_wafregional_rate_based_rule --- aws/provider.go | 1 + aws/resource_aws_waf_rule.go | 36 -- ...esource_aws_wafregional_rate_based_rule.go | 195 +++++++++ ...ce_aws_wafregional_rate_based_rule_test.go | 404 ++++++++++++++++++ aws/waf_helpers.go | 36 ++ website/aws.erb | 4 + .../wafregional_rate_based_rule.html.markdown | 68 +++ 7 files changed, 708 insertions(+), 36 deletions(-) create mode 100644 aws/resource_aws_wafregional_rate_based_rule.go create mode 100644 aws/resource_aws_wafregional_rate_based_rule_test.go create mode 100644 website/docs/r/wafregional_rate_based_rule.html.markdown diff --git a/aws/provider.go b/aws/provider.go index c37bb3d8777..bc049799264 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -559,6 +559,7 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), "aws_wafregional_rule": resourceAwsWafRegionalRule(), "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), diff --git a/aws/resource_aws_waf_rule.go b/aws/resource_aws_waf_rule.go index 7ba42b0b921..650d2eb9a43 100644 --- a/aws/resource_aws_waf_rule.go +++ b/aws/resource_aws_waf_rule.go @@ -173,39 +173,3 @@ func updateWafRuleResource(id string, oldP, newP []interface{}, conn *waf.WAF) e return nil } - -func diffWafRulePredicates(oldP, newP []interface{}) []*waf.RuleUpdate { - updates := make([]*waf.RuleUpdate, 0) - - for _, op := range oldP { - predicate := op.(map[string]interface{}) - - if idx, contains := sliceContainsMap(newP, predicate); contains { - newP = append(newP[:idx], newP[idx+1:]...) - continue - } - - updates = append(updates, &waf.RuleUpdate{ - Action: aws.String(waf.ChangeActionDelete), - Predicate: &waf.Predicate{ - Negated: aws.Bool(predicate["negated"].(bool)), - Type: aws.String(predicate["type"].(string)), - DataId: aws.String(predicate["data_id"].(string)), - }, - }) - } - - for _, np := range newP { - predicate := np.(map[string]interface{}) - - updates = append(updates, &waf.RuleUpdate{ - Action: aws.String(waf.ChangeActionInsert), - Predicate: &waf.Predicate{ - Negated: aws.Bool(predicate["negated"].(bool)), - Type: aws.String(predicate["type"].(string)), - DataId: aws.String(predicate["data_id"].(string)), - }, - }) - } - return updates -} diff --git a/aws/resource_aws_wafregional_rate_based_rule.go b/aws/resource_aws_wafregional_rate_based_rule.go new file mode 100644 index 00000000000..7e168a50deb --- /dev/null +++ b/aws/resource_aws_wafregional_rate_based_rule.go @@ -0,0 +1,195 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsWafRegionalRateBasedRule() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegionalRateBasedRuleCreate, + Read: resourceAwsWafRegionalRateBasedRuleRead, + Update: resourceAwsWafRegionalRateBasedRuleUpdate, + Delete: resourceAwsWafRegionalRateBasedRuleDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "metric_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateWafMetricName, + }, + "predicate": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "negated": { + Type: schema.TypeBool, + Required: true, + }, + "data_id": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateMaxLength(128), + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateWafPredicatesType(), + }, + }, + }, + }, + "rate_key": { + Type: schema.TypeString, + Required: true, + }, + "rate_limit": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(2000), + }, + }, + } +} + +func resourceAwsWafRegionalRateBasedRuleCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + wr := newWafRegionalRetryer(conn, region) + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRateBasedRuleInput{ + ChangeToken: token, + MetricName: aws.String(d.Get("metric_name").(string)), + Name: aws.String(d.Get("name").(string)), + RateKey: aws.String(d.Get("rate_key").(string)), + RateLimit: aws.Int64(int64(d.Get("rate_limit").(int))), + } + + return conn.CreateRateBasedRule(params) + }) + if err != nil { + return err + } + resp := out.(*waf.CreateRateBasedRuleOutput) + d.SetId(*resp.Rule.RuleId) + return resourceAwsWafRegionalRateBasedRuleUpdate(d, meta) +} + +func resourceAwsWafRegionalRateBasedRuleRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + + params := &waf.GetRateBasedRuleInput{ + RuleId: aws.String(d.Id()), + } + + resp, err := conn.GetRateBasedRule(params) + if err != nil { + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAF Regional Rate Based Rule (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + var predicates []map[string]interface{} + + for _, predicateSet := range resp.Rule.MatchPredicates { + predicates = append(predicates, map[string]interface{}{ + "negated": *predicateSet.Negated, + "type": *predicateSet.Type, + "data_id": *predicateSet.DataId, + }) + } + + d.Set("predicate", predicates) + d.Set("name", resp.Rule.Name) + d.Set("metric_name", resp.Rule.MetricName) + d.Set("rate_key", resp.Rule.RateKey) + d.Set("rate_limit", resp.Rule.RateLimit) + + return nil +} + +func resourceAwsWafRegionalRateBasedRuleUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + if d.HasChange("predicate") { + o, n := d.GetChange("predicate") + oldP, newP := o.(*schema.Set).List(), n.(*schema.Set).List() + rateLimit := d.Get("rate_limit") + + err := updateWafRateBasedRuleResourceWR(d.Id(), oldP, newP, rateLimit, conn, region) + if err != nil { + return fmt.Errorf("Error Updating WAF Rule: %s", err) + } + } + + return resourceAwsWafRegionalRateBasedRuleRead(d, meta) +} + +func resourceAwsWafRegionalRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + oldPredicates := d.Get("predicate").(*schema.Set).List() + if len(oldPredicates) > 0 { + noPredicates := []interface{}{} + rateLimit := d.Get("rate_limit") + + err := updateWafRateBasedRuleResourceWR(d.Id(), oldPredicates, noPredicates, rateLimit, conn, region) + if err != nil { + return fmt.Errorf("Error updating WAF Regional Rate Based Rule Predicates: %s", err) + } + } + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRateBasedRuleInput{ + ChangeToken: token, + RuleId: aws.String(d.Id()), + } + log.Printf("[INFO] Deleting WAF Regional Rate Based Rule") + return conn.DeleteRateBasedRule(req) + }) + if err != nil { + return fmt.Errorf("Error deleting WAF Regional Rate Based Rule: %s", err) + } + + return nil +} + +func updateWafRateBasedRuleResourceWR(id string, oldP, newP []interface{}, rateLimit interface{}, conn *wafregional.WAFRegional, region string) error { + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRateBasedRuleInput{ + ChangeToken: token, + RuleId: aws.String(id), + Updates: diffWafRulePredicates(oldP, newP), + RateLimit: aws.Int64(int64(rateLimit.(int))), + } + + return conn.UpdateRateBasedRule(req) + }) + if err != nil { + return fmt.Errorf("Error Updating WAF Regional Rate Based Rule: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_wafregional_rate_based_rule_test.go b/aws/resource_aws_wafregional_rate_based_rule_test.go new file mode 100644 index 00000000000..aecf8a6578e --- /dev/null +++ b/aws/resource_aws_wafregional_rate_based_rule_test.go @@ -0,0 +1,404 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSWafRegionalRateBasedRule_basic(t *testing.T) { + var v waf.RateBasedRule + wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegionalRateBasedRuleConfig(wafRuleName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRateBasedRuleExists("aws_wafregional_rate_based_rule.wafrule", &v), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "name", wafRuleName), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "predicate.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "metric_name", wafRuleName), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRateBasedRule_changeNameForceNew(t *testing.T) { + var before, after waf.RateBasedRule + wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) + wafRuleNewName := fmt.Sprintf("wafrulenew%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRateBasedRuleConfig(wafRuleName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRateBasedRuleExists("aws_wafregional_rate_based_rule.wafrule", &before), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "name", wafRuleName), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "predicate.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "metric_name", wafRuleName), + ), + }, + { + Config: testAccAWSWafRegionalRateBasedRuleConfigChangeName(wafRuleNewName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRateBasedRuleExists("aws_wafregional_rate_based_rule.wafrule", &after), + testAccCheckAWSWafRateBasedRuleIdDiffers(&before, &after), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "name", wafRuleNewName), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "predicate.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "metric_name", wafRuleNewName), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRateBasedRule_disappears(t *testing.T) { + var v waf.RateBasedRule + wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRateBasedRuleConfig(wafRuleName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRateBasedRuleExists("aws_wafregional_rate_based_rule.wafrule", &v), + testAccCheckAWSWafRegionalRateBasedRuleDisappears(&v), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSWafRegionalRateBasedRule_changePredicates(t *testing.T) { + var ipset waf.IPSet + var byteMatchSet waf.ByteMatchSet + + var before, after waf.RateBasedRule + var idx int + ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRateBasedRuleConfig(ruleName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalIPSetExists("aws_wafregional_ipset.ipset", &ipset), + testAccCheckAWSWafRegionalRateBasedRuleExists("aws_wafregional_rate_based_rule.wafrule", &before), + resource.TestCheckResourceAttr("aws_wafregional_rate_based_rule.wafrule", "name", ruleName), + resource.TestCheckResourceAttr("aws_wafregional_rate_based_rule.wafrule", "predicate.#", "1"), + computeWafRegionalRateBasedRulePredicateWithIpSet(&ipset, false, "IPMatch", &idx), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rate_based_rule.wafrule", "predicate.%d.negated", &idx, "false"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rate_based_rule.wafrule", "predicate.%d.type", &idx, "IPMatch"), + ), + }, + { + Config: testAccAWSWafRegionalRateBasedRuleConfig_changePredicates(ruleName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalByteMatchSetExists("aws_wafregional_byte_match_set.set", &byteMatchSet), + testAccCheckAWSWafRegionalRateBasedRuleExists("aws_wafregional_rate_based_rule.wafrule", &after), + resource.TestCheckResourceAttr("aws_wafregional_rate_based_rule.wafrule", "name", ruleName), + resource.TestCheckResourceAttr("aws_wafregional_rate_based_rule.wafrule", "predicate.#", "1"), + computeWafRegionalRateBasedRulePredicateWithByteMatchSet(&byteMatchSet, true, "ByteMatch", &idx), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rate_based_rule.wafrule", "predicate.%d.negated", &idx, "true"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rate_based_rule.wafrule", "predicate.%d.type", &idx, "ByteMatch"), + ), + }, + }, + }) +} + +// computeWafRegionalRateBasedRulePredicateWithIpSet calculates index +// which isn't static because dataId is generated as part of the test +func computeWafRegionalRateBasedRulePredicateWithIpSet(ipSet *waf.IPSet, negated bool, pType string, idx *int) resource.TestCheckFunc { + return func(s *terraform.State) error { + predicateResource := resourceAwsWafRegionalRateBasedRule().Schema["predicate"].Elem.(*schema.Resource) + + m := map[string]interface{}{ + "data_id": *ipSet.IPSetId, + "negated": negated, + "type": pType, + } + + f := schema.HashResource(predicateResource) + *idx = f(m) + + return nil + } +} + +// computeWafRegionalRateBasedRulePredicateWithByteMatchSet calculates index +// which isn't static because dataId is generated as part of the test +func computeWafRegionalRateBasedRulePredicateWithByteMatchSet(set *waf.ByteMatchSet, negated bool, pType string, idx *int) resource.TestCheckFunc { + return func(s *terraform.State) error { + predicateResource := resourceAwsWafRegionalRateBasedRule().Schema["predicate"].Elem.(*schema.Resource) + + m := map[string]interface{}{ + "data_id": *set.ByteMatchSetId, + "negated": negated, + "type": pType, + } + + f := schema.HashResource(predicateResource) + *idx = f(m) + + return nil + } +} + +func TestAccAWSWafRegionalRateBasedRule_noPredicates(t *testing.T) { + var rule waf.RateBasedRule + ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRateBasedRuleConfig_noPredicates(ruleName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRateBasedRuleExists("aws_wafregional_rate_based_rule.wafrule", &rule), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "name", ruleName), + resource.TestCheckResourceAttr( + "aws_wafregional_rate_based_rule.wafrule", "predicate.#", "0"), + ), + }, + }, + }) +} + +func testAccCheckAWSWafRateBasedRuleIdDiffers(before, after *waf.RateBasedRule) resource.TestCheckFunc { + return func(s *terraform.State) error { + if *before.RuleId == *after.RuleId { + return fmt.Errorf("Expected different IDs, given %q for both rules", *before.RuleId) + } + return nil + } +} + +func testAccCheckAWSWafRegionalRateBasedRuleDisappears(v *waf.RateBasedRule) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + region := testAccProvider.Meta().(*AWSClient).region + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRateBasedRuleInput{ + ChangeToken: token, + RuleId: v.RuleId, + RateLimit: v.RateLimit, + } + + for _, Predicate := range v.MatchPredicates { + Predicate := &waf.RuleUpdate{ + Action: aws.String("DELETE"), + Predicate: &waf.Predicate{ + Negated: Predicate.Negated, + Type: Predicate.Type, + DataId: Predicate.DataId, + }, + } + req.Updates = append(req.Updates, Predicate) + } + + return conn.UpdateRateBasedRule(req) + }) + if err != nil { + return fmt.Errorf("Error Updating WAF Rule: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteRateBasedRuleInput{ + ChangeToken: token, + RuleId: v.RuleId, + } + return conn.DeleteRateBasedRule(opts) + }) + if err != nil { + return fmt.Errorf("Error Deleting WAF Rule: %s", err) + } + return nil + } +} + +func testAccCheckAWSWafRegionalRateBasedRuleDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_rate_based_rule" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRateBasedRule( + &waf.GetRateBasedRuleInput{ + RuleId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.Rule.RuleId == rs.Primary.ID { + return fmt.Errorf("WAF Rule %s still exists", rs.Primary.ID) + } + } + + // Return nil if the Rule is already destroyed + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + return nil + } + + return err + } + + return nil +} + +func testAccCheckAWSWafRegionalRateBasedRuleExists(n string, v *waf.RateBasedRule) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Rule ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRateBasedRule(&waf.GetRateBasedRuleInput{ + RuleId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.Rule.RuleId == rs.Primary.ID { + *v = *resp.Rule + return nil + } + + return fmt.Errorf("WAF Regional Rule (%s) not found", rs.Primary.ID) + } +} + +func testAccAWSWafRegionalRateBasedRuleConfig(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_ipset" "ipset" { + name = "%s" + ip_set_descriptor { + type = "IPV4" + value = "192.0.7.0/24" + } +} + +resource "aws_wafregional_rate_based_rule" "wafrule" { + name = "%s" + metric_name = "%s" + rate_key = "IP" + rate_limit = 2000 + predicate { + data_id = "${aws_wafregional_ipset.ipset.id}" + negated = false + type = "IPMatch" + } +}`, name, name, name) +} + +func testAccAWSWafRegionalRateBasedRuleConfigChangeName(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_ipset" "ipset" { + name = "%s" + ip_set_descriptor { + type = "IPV4" + value = "192.0.7.0/24" + } +} + +resource "aws_wafregional_rate_based_rule" "wafrule" { + name = "%s" + metric_name = "%s" + rate_key = "IP" + rate_limit = 2000 + predicate { + data_id = "${aws_wafregional_ipset.ipset.id}" + negated = false + type = "IPMatch" + } +}`, name, name, name) +} + +func testAccAWSWafRegionalRateBasedRuleConfig_changePredicates(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_ipset" "ipset" { + name = "%s" + ip_set_descriptor { + type = "IPV4" + value = "192.0.7.0/24" + } +} + +resource "aws_wafregional_byte_match_set" "set" { + name = "%s" + byte_match_tuple { + text_transformation = "NONE" + target_string = "badrefer1" + positional_constraint = "CONTAINS" + + field_to_match { + type = "HEADER" + data = "referer" + } + } +} + +resource "aws_wafregional_rate_based_rule" "wafrule" { + name = "%s" + metric_name = "%s" + rate_key = "IP" + rate_limit = 2000 + predicate { + data_id = "${aws_wafregional_byte_match_set.set.id}" + negated = true + type = "ByteMatch" + } +}`, name, name, name, name) +} + +func testAccAWSWafRegionalRateBasedRuleConfig_noPredicates(name string) string { + return fmt.Sprintf(` +resource "aws_wafregional_rate_based_rule" "wafrule" { + name = "%s" + metric_name = "%s" + rate_key = "IP" + rate_limit = 2000 +}`, name, name) +} diff --git a/aws/waf_helpers.go b/aws/waf_helpers.go index 240110225d6..609b3ead8fc 100644 --- a/aws/waf_helpers.go +++ b/aws/waf_helpers.go @@ -176,6 +176,42 @@ func diffWafRegexPatternSetPatternStrings(oldPatterns, newPatterns []interface{} return updates } +func diffWafRulePredicates(oldP, newP []interface{}) []*waf.RuleUpdate { + updates := make([]*waf.RuleUpdate, 0) + + for _, op := range oldP { + predicate := op.(map[string]interface{}) + + if idx, contains := sliceContainsMap(newP, predicate); contains { + newP = append(newP[:idx], newP[idx+1:]...) + continue + } + + updates = append(updates, &waf.RuleUpdate{ + Action: aws.String(waf.ChangeActionDelete), + Predicate: &waf.Predicate{ + Negated: aws.Bool(predicate["negated"].(bool)), + Type: aws.String(predicate["type"].(string)), + DataId: aws.String(predicate["data_id"].(string)), + }, + }) + } + + for _, np := range newP { + predicate := np.(map[string]interface{}) + + updates = append(updates, &waf.RuleUpdate{ + Action: aws.String(waf.ChangeActionInsert), + Predicate: &waf.Predicate{ + Negated: aws.Bool(predicate["negated"].(bool)), + Type: aws.String(predicate["type"].(string)), + DataId: aws.String(predicate["data_id"].(string)), + }, + }) + } + return updates +} + func sliceContainsString(slice []interface{}, s string) (int, bool) { for idx, value := range slice { v := value.(string) diff --git a/website/aws.erb b/website/aws.erb index 3a80e83214a..94356ebe354 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1527,6 +1527,10 @@ aws_wafregional_ipset + > + aws_wafregional_rate_based_rule + + > aws_wafregional_regex_pattern_set diff --git a/website/docs/r/wafregional_rate_based_rule.html.markdown b/website/docs/r/wafregional_rate_based_rule.html.markdown new file mode 100644 index 00000000000..16b165c52f4 --- /dev/null +++ b/website/docs/r/wafregional_rate_based_rule.html.markdown @@ -0,0 +1,68 @@ +--- +layout: "aws" +page_title: "AWS: wafregional_rate_based_rule" +sidebar_current: "docs-aws-resource-wafregional-rate-based-rule" +description: |- + Provides a AWS WAF Regional rate based rule resource. +--- + +# aws_wafregional_rate_based_rule + +Provides a WAF Rate Based Rule Resource + +## Example Usage + +```hcl +resource "aws_wafregional_ipset" "ipset" { + name = "tfIPSet" + + ip_set_descriptors { + type = "IPV4" + value = "192.0.7.0/24" + } +} + +resource "aws_wafregional_rate_based_rule" "wafrule" { + depends_on = ["aws_wafregional_ipset.ipset"] + name = "tfWAFRule" + metric_name = "tfWAFRule" + + rate_key = "IP" + rate_limit = 2000 + + predicate { + data_id = "${aws_wafregional_ipset.ipset.id}" + negated = false + type = "IPMatch" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `metric_name` - (Required) The name or description for the Amazon CloudWatch metric of this rule. +* `name` - (Required) The name or description of the rule. +* `rate_key` - (Required) Valid value is IP. +* `rate_limit` - (Required) The maximum number of requests, which have an identical value in the field specified by the RateKey, allowed in a five-minute period. Minimum value is 2000. +* `predicate` - (Optional) One of ByteMatchSet, IPSet, SizeConstraintSet, SqlInjectionMatchSet, or XssMatchSet objects to include in a rule. + +## Nested Blocks + +### `predicate` + +#### Arguments + +* `negated` - (Required) Set this to `false` if you want to allow, block, or count requests + based on the settings in the specified `ByteMatchSet`, `IPSet`, `SqlInjectionMatchSet`, `XssMatchSet`, or `SizeConstraintSet`. + For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address. + If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses _except_ `192.0.2.44`. +* `data_id` - (Required) A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID. +* `type` - (Required) The type of predicate in a rule, such as `ByteMatchSet` or `IPSet` + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Regional rate based rule. From dea707d6effa8c6f5fdd0e0a69dfbe5a3f82bd8b Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Mar 2018 18:18:28 +0100 Subject: [PATCH 0234/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 665bb3c0e1c..3baa4ef5623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ FEATURES: * **New Resource:** `aws_waf_regex_pattern_set` [GH-3913] * **New Resource:** `aws_waf_rule_group` [GH-3898] * **New Resource:** `aws_wafregional_geo_match_set` [GH-3915] +* **New Resource:** `aws_wafregional_rate_based_rule` [GH-3871] * **New Resource:** `aws_wafregional_regex_pattern_set` [GH-3933] ENHANCEMENTS: From a684e3d77f2e7f0b1a21a565ccf6c55a33fd06f4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 13:47:21 -0400 Subject: [PATCH 0235/3316] resource/aws_elasticache_replication_group: Mark cluster_mode Computed: true for now --- aws/resource_aws_elasticache_replication_group.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index 4b8c30ccfed..3b9ba76946a 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -65,6 +65,11 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { resourceSchema["cluster_mode"] = &schema.Schema{ Type: schema.TypeList, Optional: true, + // We allow Computed: true here since using number_cache_clusters + // and a cluster mode enabled parameter_group_name will create + // a single shard replication group with number_cache_clusters - 1 + // read replicas. Otherwise, the resource is marked ForceNew. + Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ From 673dbe7e4188f627968f97bc3255fcd289447faa Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 13:50:08 -0400 Subject: [PATCH 0236/3316] tests/resource/aws_elasticache_replication_group: Fix number_cache_clusters check in TestAccAWSElasticacheReplicationGroup_ClusterMode_NumNodeGroups --- aws/resource_aws_elasticache_replication_group_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index 158bdc1ad90..efa91c497cd 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -322,7 +322,7 @@ func TestAccAWSElasticacheReplicationGroup_ClusterMode_NumNodeGroups(t *testing. Config: testAccAWSElasticacheReplicationGroupNativeRedisClusterConfig(rName, 2, 1), Check: resource.ComposeTestCheckFunc( testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &rg), - resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "6"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "4"), resource.TestCheckResourceAttr(resourceName, "cluster_mode.#", "1"), resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.num_node_groups", "2"), resource.TestCheckResourceAttr(resourceName, "cluster_mode.0.replicas_per_node_group", "1"), From 19dece215370d4ec74ca2c9c90d3824997a2168f Mon Sep 17 00:00:00 2001 From: Jeremy Young Date: Mon, 26 Mar 2018 18:33:50 -0500 Subject: [PATCH 0237/3316] Adding support for custom Elasticsearch endpoint --- aws/config.go | 4 +++- aws/provider.go | 7 +++++++ website/docs/index.html.markdown | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/aws/config.go b/aws/config.go index df1b493cd0b..19704ef4d52 100644 --- a/aws/config.go +++ b/aws/config.go @@ -120,6 +120,7 @@ type Config struct { Ec2Endpoint string EcsEndpoint string EcrEndpoint string + EsEndpoint string ElbEndpoint string IamEndpoint string KinesisEndpoint string @@ -349,6 +350,7 @@ func (c *Config) Client() (interface{}, error) { awsEcrSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcrEndpoint)}) awsEcsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcsEndpoint)}) awsElbSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.ElbEndpoint)}) + awsEsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EsEndpoint)}) awsIamSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.IamEndpoint)}) awsLambdaSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.LambdaEndpoint)}) awsKinesisSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisEndpoint)}) @@ -435,7 +437,7 @@ func (c *Config) Client() (interface{}, error) { client.elbconn = elb.New(awsElbSess) client.elbv2conn = elbv2.New(awsElbSess) client.emrconn = emr.New(sess) - client.esconn = elasticsearch.New(sess) + client.esconn = elasticsearch.New(awsEsSess) client.firehoseconn = firehose.New(sess) client.inspectorconn = inspector.New(sess) client.gameliftconn = gamelift.New(sess) diff --git a/aws/provider.go b/aws/provider.go index 42de2ffeab1..f748da2d42f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -743,6 +743,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.EcrEndpoint = endpoints["ecr"].(string) config.EcsEndpoint = endpoints["ecs"].(string) config.ElbEndpoint = endpoints["elb"].(string) + config.EsEndpoint = endpoints["es"].(string) config.IamEndpoint = endpoints["iam"].(string) config.KinesisEndpoint = endpoints["kinesis"].(string) config.KmsEndpoint = endpoints["kms"].(string) @@ -892,6 +893,12 @@ func endpointsSchema() *schema.Schema { Default: "", Description: descriptions["elb_endpoint"], }, + "es": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["es_endpoint"], + }, "kinesis": { Type: schema.TypeString, Optional: true, diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index b768c12f40e..04daada8cbf 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -299,6 +299,10 @@ Nested `endpoints` block supports the following: URL constructed from the `region`. It's typically used to connect to custom ELB endpoints. +* `es` - (Optional) Use this to override the default endpoint + URL constructed from the `region`. It's typically used to connect to + custom Elasticsearch endpoints. + * `iam` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom IAM endpoints. From d6b00b9825c75cc7f16bf5afca8990f944749ef8 Mon Sep 17 00:00:00 2001 From: Jeremy Young Date: Tue, 27 Mar 2018 15:31:17 -0500 Subject: [PATCH 0238/3316] Add comment to provider.go --- aws/provider.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/provider.go b/aws/provider.go index f748da2d42f..c5a79687779 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -641,6 +641,8 @@ func init() { "elb_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "es_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n" + "rds_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "s3_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", From 9359b016d5351fdba8447c93248b942f21aefa74 Mon Sep 17 00:00:00 2001 From: Jeremy Young Date: Tue, 27 Mar 2018 15:33:51 -0500 Subject: [PATCH 0239/3316] Missed comma --- aws/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/provider.go b/aws/provider.go index c5a79687779..0aa3e1a26bf 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -641,7 +641,7 @@ func init() { "elb_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", - "es_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n" + "es_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "rds_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", From ee9429fb3395d49a06c9ad8f414ebbf108a802ce Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 16:45:00 -0400 Subject: [PATCH 0240/3316] Update CHANGELOG for #3941 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3baa4ef5623..7276f28c95d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ FEATURES: ENHANCEMENTS: +* provider: Support custom Elasticsearch endpoint [GH-3941] * resource/appsync_graphql_api: Support import [GH-3500] * resource/aws_elasticache_cluster: Allow port to be optional [GH-3835] * resource/aws_elasticache_cluster: Add `replication_group_id` argument [GH-3869] From 50a5a754213232127d23ce3c25760997643f93c2 Mon Sep 17 00:00:00 2001 From: Anthony Lucillo Date: Fri, 23 Mar 2018 11:11:13 -0400 Subject: [PATCH 0241/3316] Fixed bug where the update step did not detect changes to the enabled_metrics list if it was empty. --- aws/resource_aws_autoscaling_group.go | 2 ++ aws/resource_aws_autoscaling_group_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/aws/resource_aws_autoscaling_group.go b/aws/resource_aws_autoscaling_group.go index 4f4c3f2b1fc..0513ffcd48b 100644 --- a/aws/resource_aws_autoscaling_group.go +++ b/aws/resource_aws_autoscaling_group.go @@ -534,6 +534,8 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e log.Printf("[WARN] Error setting metrics for (%s): %s", d.Id(), err) } d.Set("metrics_granularity", g.EnabledMetrics[0].Granularity) + } else { + d.Set("enabled_metrics", nil) } return nil diff --git a/aws/resource_aws_autoscaling_group_test.go b/aws/resource_aws_autoscaling_group_test.go index a472fc88435..a74ec0dcfb4 100644 --- a/aws/resource_aws_autoscaling_group_test.go +++ b/aws/resource_aws_autoscaling_group_test.go @@ -128,6 +128,8 @@ func TestAccAWSAutoScalingGroup_basic(t *testing.T) { "aws_autoscaling_group.bar", "termination_policies.1", "ClosestToNextInstanceHour"), resource.TestCheckResourceAttr( "aws_autoscaling_group.bar", "protect_from_scale_in", "false"), + resource.TestCheckResourceAttr( + "aws_autoscaling_group.bar", "enabled_metrics.#", "0"), ), }, From dd78d8cc2353875d7f4a3c862da0fae50f8f489c Mon Sep 17 00:00:00 2001 From: Vlad Ungureanu Date: Tue, 27 Mar 2018 17:29:35 -0700 Subject: [PATCH 0242/3316] Fix update order for service_linked_role in aws_autoscaling_group resource --- aws/resource_aws_autoscaling_group.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_autoscaling_group.go b/aws/resource_aws_autoscaling_group.go index 422473e0a7c..13f9d3e2bf5 100644 --- a/aws/resource_aws_autoscaling_group.go +++ b/aws/resource_aws_autoscaling_group.go @@ -616,6 +616,10 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) } } + if d.HasChange("service_linked_role_arn") { + opts.ServiceLinkedRoleARN = aws.String(d.Get("service_linked_role_arn").(string)) + } + if err := setAutoscalingTags(conn, d); err != nil { return err } @@ -725,10 +729,6 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) } } - if d.HasChange("service_linked_role_arn") { - opts.ServiceLinkedRoleARN = aws.String(d.Get("service_linked_role_arn").(string)) - } - return resourceAwsAutoscalingGroupRead(d, meta) } From 3c2dcfc359d8a1fc1640bee9badb3b538acdc67d Mon Sep 17 00:00:00 2001 From: Argishti Rostamian Date: Tue, 27 Mar 2018 21:05:45 -0700 Subject: [PATCH 0243/3316] resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination lambda transformation support --- ...ce_aws_kinesis_firehose_delivery_stream.go | 18 +++++- ...s_kinesis_firehose_delivery_stream_test.go | 62 ++++++++++++++++++- ...sis_firehose_delivery_stream.html.markdown | 4 +- 3 files changed, 76 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 3534c8e6809..18cc7ef295f 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -121,9 +121,9 @@ func processingConfigurationSchema() *schema.Schema { Required: true, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { value := v.(string) - if value != "LambdaArn" && value != "NumberOfRetries" { + if value != "LambdaArn" && value != "NumberOfRetries" && value != "RoleArn" && value != "BufferSizeInMBs" && value != "BufferIntervalInSeconds" { errors = append(errors, fmt.Errorf( - "%q must be one of 'LambdaArn', 'NumberOfRetries'", k)) + "%q must be one of 'LambdaArn', 'NumberOfRetries', 'RoleArn', 'BufferSizeInMBs', 'BufferIntervalInSeconds'", k)) } return }, @@ -208,7 +208,7 @@ func flattenFirehoseS3Configuration(s3 firehose.S3DestinationDescription) []inte func flattenProcessingConfiguration(pc firehose.ProcessingConfiguration, roleArn string) []map[string]interface{} { processingConfiguration := make([]map[string]interface{}, 1) - // It is necessary to explicitely filter this out + // It is necessary to explicitly filter this out // to prevent diffs during routine use and retain the ability // to show diffs if any field has drifted defaultLambdaParams := map[string]string{ @@ -321,6 +321,10 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De "retry_duration": *destination.SplunkDestinationDescription.RetryOptions.DurationInSeconds, } + if v := destination.SplunkDestinationDescription.ProcessingConfiguration; v != nil { + splunkConfiguration["processing_configuration"] = v + } + if v := destination.SplunkDestinationDescription.CloudWatchLoggingOptions; v != nil { splunkConfiguration["cloudwatch_logging_options"] = flattenCloudwatchLoggingOptions(*v) } @@ -1170,6 +1174,10 @@ func createSplunkConfig(d *schema.ResourceData, s3Config *firehose.S3Destination S3Configuration: s3Config, } + if _, ok := splunk["processing_configuration"]; ok { + configuration.ProcessingConfiguration = extractProcessingConfiguration(splunk) + } + if _, ok := splunk["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(splunk) } @@ -1198,6 +1206,10 @@ func updateSplunkConfig(d *schema.ResourceData, s3Update *firehose.S3Destination S3Update: s3Update, } + if _, ok := splunk["processing_configuration"]; ok { + configuration.ProcessingConfiguration = extractProcessingConfiguration(splunk) + } + if _, ok := splunk["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(splunk) } diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index 78b466ddfd2..22e941137b2 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -329,15 +329,36 @@ func TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates(t *testing.T) { var stream firehose.DeliveryStreamDescription ri := acctest.RandInt() + + rString := acctest.RandString(8) + funcName := fmt.Sprintf("aws_kinesis_firehose_delivery_stream_test_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_%s", rString) + roleName := fmt.Sprintf("tf_acc_role_%s", rString) + preConfig := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_SplunkBasic, ri, ri, ri, ri) - postConfig := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_SplunkUpdates, - ri, ri, ri, ri) + postConfig := testAccFirehoseAWSLambdaConfigBasic(funcName, policyName, roleName) + + fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_SplunkUpdates, + ri, ri, ri, ri) updatedSplunkConfig := &firehose.SplunkDestinationDescription{ HECEndpointType: aws.String("Event"), HECAcknowledgmentTimeoutInSeconds: aws.Int64(600), S3BackupMode: aws.String("FailedEventsOnly"), + ProcessingConfiguration: &firehose.ProcessingConfiguration{ + Enabled: aws.Bool(true), + Processors: []*firehose.Processor{ + &firehose.Processor{ + Type: aws.String("Lambda"), + Parameters: []*firehose.ProcessorParameter{ + &firehose.ProcessorParameter{ + ParameterName: aws.String("LambdaArn"), + ParameterValue: aws.String("valueNotTested"), + }, + }, + }, + }, + }, } resource.Test(t, resource.TestCase{ @@ -544,9 +565,10 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del if splunkConfig != nil { s := splunkConfig.(*firehose.SplunkDestinationDescription) // Range over the Stream Destinations, looking for the matching Splunk destination - var matchHECEndpointType, matchHECAcknowledgmentTimeoutInSeconds, matchS3BackupMode bool + var matchHECEndpointType, matchHECAcknowledgmentTimeoutInSeconds, matchS3BackupMode, processingConfigMatch bool for _, d := range stream.Destinations { if d.SplunkDestinationDescription != nil { + if *d.SplunkDestinationDescription.HECEndpointType == *s.HECEndpointType { matchHECEndpointType = true } @@ -556,11 +578,17 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del if *d.SplunkDestinationDescription.S3BackupMode == *s.S3BackupMode { matchS3BackupMode = true } + + processingConfigMatch = len(s.ProcessingConfiguration.Processors) == len(d.SplunkDestinationDescription.ProcessingConfiguration.Processors) + } } if !matchHECEndpointType || !matchHECAcknowledgmentTimeoutInSeconds || !matchS3BackupMode { return fmt.Errorf("Mismatch Splunk HECEndpointType or HECAcknowledgmentTimeoutInSeconds or S3BackupMode, expected: %s, got: %s", s, stream.Destinations) } + if !processingConfigMatch { + return fmt.Errorf("Mismatch extended splunk ProcessingConfiguration.Processors count, expected: %s, got: %s", s, stream.Destinations) + } } } return nil @@ -1147,6 +1175,34 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { hec_acknowledgment_timeout = 600 hec_endpoint_type = "Event" s3_backup_mode = "FailedEventsOnly" + processing_configuration = [ + { + enabled = "true" + processors = [ + { + type = "Lambda" + parameters = [ + { + parameter_name = "LambdaArn" + parameter_value = "${aws_lambda_function.lambda_function_test.arn}:$LATEST" + }, + { + parameter_name = "RoleArn" + parameter_value = "${aws_iam_role.firehose.arn}" + }, + { + parameter_name = "BufferSizeInMBs" + parameter_value = 1 + }, + { + parameter_name = "BufferIntervalInSeconds" + parameter_value = 60 + } + ] + } + ] + } + ] } }` diff --git a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown index 370058eae89..3b51c96d05d 100644 --- a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown +++ b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown @@ -303,7 +303,7 @@ The `splunk_configuration` objects supports the following: * `hec_endpoint` - (Required) The HTTP Event Collector (HEC) endpoint to which Kinesis Firehose sends your data. * `hec_endpoint_type` - (Optional) The HEC endpoint type. Valid values are `Raw` or `Event`. The default value is `Raw`. * `hec_token` - The GUID that you obtain from your Splunk cluster when you create a new HEC endpoint. -* `s3_backup_mode` - (Optional) Defines how documents should be delivered to Amazon S3. Valid values are `FailedDocumentsOnly` and `AllDocuments`. Default value is `FailedDocumentsOnly`. +* `s3_backup_mode` - (Optional) Defines how documents should be delivered to Amazon S3. Valid values are `FailedEventsOnly` and `AllEvents`. Default value is `FailedEventsOnly`. * `retry_duration` - (Optional) After an initial failure to deliver to Amazon Elasticsearch, the total amount of time, in seconds between 0 to 7200, during which Firehose re-attempts delivery (including the first attempt). After this time has elapsed, the failed documents are written to Amazon S3. The default value is 300s. There will be no retry if the value is 0. * `cloudwatch_logging_options` - (Optional) The CloudWatch Logging Options for the delivery stream. More details are given below. @@ -325,7 +325,7 @@ The `processors` array objects support the following: The `parameters` array objects support the following: -* `parameter_name` - (Required) Parameter name. Valid Values: `LambdaArn`, `NumberOfRetries` +* `parameter_name` - (Required) Parameter name. Valid Values: `LambdaArn`, `NumberOfRetries`, `RoleArn`, `BufferSizeInMBs`, `BufferIntervalInSeconds` * `parameter_value` - (Required) Parameter value. Must be between 1 and 512 length (inclusive). When providing a Lambda ARN, you should specify the resource version as well. ## Attributes Reference From 0b8dca72cb241741d30eff607fbb6edc044fafd3 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 28 Mar 2018 13:20:58 +0100 Subject: [PATCH 0244/3316] New Resource: aws_wafregional_rule_group --- aws/provider.go | 1 + aws/resource_aws_wafregional_rule_group.go | 191 +++++++++ ...esource_aws_wafregional_rule_group_test.go | 401 ++++++++++++++++++ website/aws.erb | 4 + .../r/wafregional_rule_group.html.markdown | 58 +++ 5 files changed, 655 insertions(+) create mode 100644 aws/resource_aws_wafregional_rule_group.go create mode 100644 aws/resource_aws_wafregional_rule_group_test.go create mode 100644 website/docs/r/wafregional_rule_group.html.markdown diff --git a/aws/provider.go b/aws/provider.go index bc049799264..0d7bae6d7f4 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -562,6 +562,7 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), diff --git a/aws/resource_aws_wafregional_rule_group.go b/aws/resource_aws_wafregional_rule_group.go new file mode 100644 index 00000000000..c170f3ac9dc --- /dev/null +++ b/aws/resource_aws_wafregional_rule_group.go @@ -0,0 +1,191 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegionalRuleGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegionalRuleGroupCreate, + Read: resourceAwsWafRegionalRuleGroupRead, + Update: resourceAwsWafRegionalRuleGroupUpdate, + Delete: resourceAwsWafRegionalRuleGroupDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "metric_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateWafMetricName, + }, + "activated_rule": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": { + Type: schema.TypeList, + MaxItems: 1, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "priority": { + Type: schema.TypeInt, + Required: true, + }, + "rule_id": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + Default: wafregional.WafRuleTypeRegular, + }, + }, + }, + }, + }, + } +} + +func resourceAwsWafRegionalRuleGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + wr := newWafRegionalRetryer(conn, region) + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRuleGroupInput{ + ChangeToken: token, + MetricName: aws.String(d.Get("metric_name").(string)), + Name: aws.String(d.Get("name").(string)), + } + + return conn.CreateRuleGroup(params) + }) + if err != nil { + return err + } + resp := out.(*waf.CreateRuleGroupOutput) + d.SetId(*resp.RuleGroup.RuleGroupId) + return resourceAwsWafRegionalRuleGroupUpdate(d, meta) +} + +func resourceAwsWafRegionalRuleGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + + params := &waf.GetRuleGroupInput{ + RuleGroupId: aws.String(d.Id()), + } + + resp, err := conn.GetRuleGroup(params) + if err != nil { + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAF Regional Rule Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ + RuleGroupId: aws.String(d.Id()), + }) + + d.Set("activated_rule", flattenWafActivatedRules(rResp.ActivatedRules)) + d.Set("name", resp.RuleGroup.Name) + d.Set("metric_name", resp.RuleGroup.MetricName) + + return nil +} + +func resourceAwsWafRegionalRuleGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + if d.HasChange("activated_rule") { + o, n := d.GetChange("activated_rule") + oldRules, newRules := o.(*schema.Set).List(), n.(*schema.Set).List() + + err := updateWafRuleGroupResourceWR(d.Id(), oldRules, newRules, conn, region) + if err != nil { + return fmt.Errorf("Error Updating WAF Regional Rule Group: %s", err) + } + } + + return resourceAwsWafRegionalRuleGroupRead(d, meta) +} + +func resourceAwsWafRegionalRuleGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + oldRules := d.Get("activated_rule").(*schema.Set).List() + err := deleteWafRegionalRuleGroup(d.Id(), oldRules, conn, region) + if err != nil { + return err + } + + return nil +} + +func deleteWafRegionalRuleGroup(id string, oldRules []interface{}, conn *wafregional.WAFRegional, region string) error { + if len(oldRules) > 0 { + noRules := []interface{}{} + err := updateWafRuleGroupResourceWR(id, oldRules, noRules, conn, region) + if err != nil { + return fmt.Errorf("Error updating WAF Regional Rule Group Predicates: %s", err) + } + } + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRuleGroupInput{ + ChangeToken: token, + RuleGroupId: aws.String(id), + } + log.Printf("[INFO] Deleting WAF Regional Rule Group") + return conn.DeleteRuleGroup(req) + }) + if err != nil { + return fmt.Errorf("Error deleting WAF Regional Rule Group: %s", err) + } + return nil +} + +func updateWafRuleGroupResourceWR(id string, oldRules, newRules []interface{}, conn *wafregional.WAFRegional, region string) error { + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRuleGroupInput{ + ChangeToken: token, + RuleGroupId: aws.String(id), + Updates: diffWafRuleGroupActivatedRules(oldRules, newRules), + } + + return conn.UpdateRuleGroup(req) + }) + if err != nil { + return fmt.Errorf("Error Updating WAF Regional Rule Group: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_wafregional_rule_group_test.go b/aws/resource_aws_wafregional_rule_group_test.go new file mode 100644 index 00000000000..41fcbf753c9 --- /dev/null +++ b/aws/resource_aws_wafregional_rule_group_test.go @@ -0,0 +1,401 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_wafregional_rule_group", &resource.Sweeper{ + Name: "aws_wafregional_rule_group", + F: testSweepWafRegionalRuleGroups, + }) +} + +func testSweepWafRegionalRuleGroups(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).wafregionalconn + + req := &waf.ListRuleGroupsInput{} + resp, err := conn.ListRuleGroups(req) + if err != nil { + return fmt.Errorf("Error describing WAF Regional Rule Groups: %s", err) + } + + if len(resp.RuleGroups) == 0 { + log.Print("[DEBUG] No AWS WAF Regional Rule Groups to sweep") + return nil + } + + for _, group := range resp.RuleGroups { + if !strings.HasPrefix(*group.Name, "tfacc") { + continue + } + + rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ + RuleGroupId: group.RuleGroupId, + }) + if err != nil { + return err + } + oldRules := flattenWafActivatedRules(rResp.ActivatedRules) + err = deleteWafRegionalRuleGroup(*group.RuleGroupId, oldRules, conn, region) + if err != nil { + return err + } + } + + return nil +} + +func TestAccAWSWafRegionalRuleGroup_basic(t *testing.T) { + var rule waf.Rule + var group waf.RuleGroup + var idx int + + ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegionalRuleGroupConfig(ruleName, groupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRuleExists("aws_wafregional_rule.test", &rule), + testAccCheckAWSWafRegionalRuleGroupExists("aws_wafregional_rule_group.test", &group), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "activated_rule.#", "1"), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "metric_name", groupName), + computeWafActivatedRuleWithRuleId(&rule, "COUNT", 50, &idx), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.action.0.type", &idx, "COUNT"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.priority", &idx, "50"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.type", &idx, waf.WafRuleTypeRegular), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRuleGroup_changeNameForceNew(t *testing.T) { + var before, after waf.RuleGroup + + ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + newGroupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRuleGroupConfig(ruleName, groupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRuleGroupExists("aws_wafregional_rule_group.test", &before), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "activated_rule.#", "1"), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "metric_name", groupName), + ), + }, + { + Config: testAccAWSWafRegionalRuleGroupConfig(ruleName, newGroupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRuleGroupExists("aws_wafregional_rule_group.test", &after), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "name", newGroupName), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "activated_rule.#", "1"), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "metric_name", newGroupName), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRuleGroup_disappears(t *testing.T) { + var group waf.RuleGroup + ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRuleGroupConfig(ruleName, groupName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRuleGroupExists("aws_wafregional_rule_group.test", &group), + testAccCheckAWSWafRegionalRuleGroupDisappears(&group), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSWafRegionalRuleGroup_changeActivatedRules(t *testing.T) { + var rule0, rule1, rule2, rule3 waf.Rule + var groupBefore, groupAfter waf.RuleGroup + var idx0, idx1, idx2, idx3 int + + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + ruleName1 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + ruleName2 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + ruleName3 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRuleGroupConfig(ruleName1, groupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRuleExists("aws_wafregional_rule.test", &rule0), + testAccCheckAWSWafRegionalRuleGroupExists("aws_wafregional_rule_group.test", &groupBefore), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "activated_rule.#", "1"), + computeWafActivatedRuleWithRuleId(&rule0, "COUNT", 50, &idx0), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.action.0.type", &idx0, "COUNT"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.priority", &idx0, "50"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.type", &idx0, waf.WafRuleTypeRegular), + ), + }, + { + Config: testAccAWSWafRegionalRuleGroupConfig_changeActivatedRules(ruleName1, ruleName2, ruleName3, groupName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr("aws_wafregional_rule_group.test", "activated_rule.#", "3"), + testAccCheckAWSWafRegionalRuleGroupExists("aws_wafregional_rule_group.test", &groupAfter), + + testAccCheckAWSWafRegionalRuleExists("aws_wafregional_rule.test", &rule1), + computeWafActivatedRuleWithRuleId(&rule1, "BLOCK", 10, &idx1), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.action.0.type", &idx1, "BLOCK"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.priority", &idx1, "10"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.type", &idx1, waf.WafRuleTypeRegular), + + testAccCheckAWSWafRegionalRuleExists("aws_wafregional_rule.test2", &rule2), + computeWafActivatedRuleWithRuleId(&rule2, "COUNT", 1, &idx2), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.action.0.type", &idx2, "COUNT"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.priority", &idx2, "1"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.type", &idx2, waf.WafRuleTypeRegular), + + testAccCheckAWSWafRegionalRuleExists("aws_wafregional_rule.test3", &rule3), + computeWafActivatedRuleWithRuleId(&rule3, "BLOCK", 15, &idx3), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.action.0.type", &idx3, "BLOCK"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.priority", &idx3, "15"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_rule_group.test", "activated_rule.%d.type", &idx3, waf.WafRuleTypeRegular), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRuleGroup_noActivatedRules(t *testing.T) { + var group waf.RuleGroup + groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRuleGroupConfig_noActivatedRules(groupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRuleGroupExists("aws_wafregional_rule_group.test", &group), + resource.TestCheckResourceAttr( + "aws_wafregional_rule_group.test", "name", groupName), + resource.TestCheckResourceAttr( + "aws_wafregional_rule_group.test", "activated_rule.#", "0"), + ), + }, + }, + }) +} + +func testAccCheckAWSWafRegionalRuleGroupDisappears(group *waf.RuleGroup) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + region := testAccProvider.Meta().(*AWSClient).region + + rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ + RuleGroupId: group.RuleGroupId, + }) + + wr := newWafRegionalRetryer(conn, region) + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRuleGroupInput{ + ChangeToken: token, + RuleGroupId: group.RuleGroupId, + } + + for _, rule := range rResp.ActivatedRules { + rule := &waf.RuleGroupUpdate{ + Action: aws.String("DELETE"), + ActivatedRule: rule, + } + req.Updates = append(req.Updates, rule) + } + + return conn.UpdateRuleGroup(req) + }) + if err != nil { + return fmt.Errorf("Error Updating WAF Regional Rule Group: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteRuleGroupInput{ + ChangeToken: token, + RuleGroupId: group.RuleGroupId, + } + return conn.DeleteRuleGroup(opts) + }) + if err != nil { + return fmt.Errorf("Error Deleting WAF Regional Rule Group: %s", err) + } + return nil + } +} + +func testAccCheckAWSWafRegionalRuleGroupDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_rule_group" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRuleGroup(&waf.GetRuleGroupInput{ + RuleGroupId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.RuleGroup.RuleGroupId == rs.Primary.ID { + return fmt.Errorf("WAF Regional Rule Group %s still exists", rs.Primary.ID) + } + } + + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + return nil + } + + return err + } + + return nil +} + +func testAccCheckAWSWafRegionalRuleGroupExists(n string, group *waf.RuleGroup) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Regional Rule Group ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRuleGroup(&waf.GetRuleGroupInput{ + RuleGroupId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.RuleGroup.RuleGroupId == rs.Primary.ID { + *group = *resp.RuleGroup + return nil + } + + return fmt.Errorf("WAF Regional Rule Group (%s) not found", rs.Primary.ID) + } +} + +func testAccAWSWafRegionalRuleGroupConfig(ruleName, groupName string) string { + return fmt.Sprintf(` +resource "aws_wafregional_rule" "test" { + name = "%[1]s" + metric_name = "%[1]s" +} + +resource "aws_wafregional_rule_group" "test" { + name = "%[2]s" + metric_name = "%[2]s" + activated_rule { + action { + type = "COUNT" + } + priority = 50 + rule_id = "${aws_wafregional_rule.test.id}" + } +}`, ruleName, groupName) +} + +func testAccAWSWafRegionalRuleGroupConfig_changeActivatedRules(ruleName1, ruleName2, ruleName3, groupName string) string { + return fmt.Sprintf(` +resource "aws_wafregional_rule" "test" { + name = "%[1]s" + metric_name = "%[1]s" +} + +resource "aws_wafregional_rule" "test2" { + name = "%[2]s" + metric_name = "%[2]s" +} + +resource "aws_wafregional_rule" "test3" { + name = "%[3]s" + metric_name = "%[3]s" +} + +resource "aws_wafregional_rule_group" "test" { + name = "%[4]s" + metric_name = "%[4]s" + activated_rule { + action { + type = "BLOCK" + } + priority = 10 + rule_id = "${aws_wafregional_rule.test.id}" + } + activated_rule { + action { + type = "COUNT" + } + priority = 1 + rule_id = "${aws_wafregional_rule.test2.id}" + } + activated_rule { + action { + type = "BLOCK" + } + priority = 15 + rule_id = "${aws_wafregional_rule.test3.id}" + } +}`, ruleName1, ruleName2, ruleName3, groupName) +} + +func testAccAWSWafRegionalRuleGroupConfig_noActivatedRules(groupName string) string { + return fmt.Sprintf(` +resource "aws_wafregional_rule_group" "test" { + name = "%[1]s" + metric_name = "%[1]s" +}`, groupName) +} diff --git a/website/aws.erb b/website/aws.erb index 94356ebe354..61b4ffddebc 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1539,6 +1539,10 @@ aws_wafregional_rule + > + aws_wafregional_rule_group + + > aws_wafregional_size_constraint_set diff --git a/website/docs/r/wafregional_rule_group.html.markdown b/website/docs/r/wafregional_rule_group.html.markdown new file mode 100644 index 00000000000..bbd18086006 --- /dev/null +++ b/website/docs/r/wafregional_rule_group.html.markdown @@ -0,0 +1,58 @@ +--- +layout: "aws" +page_title: "AWS: wafregional_rule_group" +sidebar_current: "docs-aws-resource-wafregional-rule-group" +description: |- + Provides a AWS WAF Regional Rule Group resource. +--- + +# aws_wafregional_rule_group + +Provides a WAF Regional Rule Group Resource + +## Example Usage + +```hcl +resource "aws_wafregional_rule" "example" { + name = "example" + metric_name = "example" +} + +resource "aws_wafregional_rule_group" "example" { + name = "example" + metric_name = "example" + activated_rule { + action { + type = "COUNT" + } + priority = 50 + rule_id = "${aws_wafregional_rule.example.id}" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) A friendly name of the rule group +* `metric_name` - (Required) A friendly name for the metrics from the rule group +* `activated_rule` - (Optional) A list of activated rules, see below + +## Nested Blocks + +### `activated_rule` + +#### Arguments + +* `action` - (Required) Specifies the action that CloudFront or AWS WAF takes when a web request matches the conditions in the rule. + * `type` - (Required) e.g. `BLOCK`, `ALLOW`, or `COUNT` +* `priority` - (Required) Specifies the order in which the rules are evaluated. Rules with a lower value are evaluated before rules with a higher value. +* `rule_id` - (Required) The ID of a [rule](/docs/r/wafregional_rule.html) +* `type` - (Optional) The rule type, either [`REGULAR`](/docs/r/wafregional_rule.html), [`RATE_BASED`]((/docs/r/wafregional_rate_based_rule.html), or `GROUP`. Defaults to `REGULAR`. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Regional Rule Group. From 13e44b975f2296010afcd8c2b835f2574c897a56 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 28 Mar 2018 09:22:00 -0400 Subject: [PATCH 0245/3316] Update CHANGELOG for #3942 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7276f28c95d..f53eae93709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_autoscaling_group: Fix updating of `service_linked_role` [GH-3942] * resource/aws_batch_compute_environment: Correctly set `compute_resources` in state [GH-3824] * resource/aws_cognito_user_pool: Correctly set `schema` in state [GH-3789] * resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] From d5b0f78f2796536a8a0950f319536bea1472e27d Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 28 Mar 2018 15:12:58 +0100 Subject: [PATCH 0246/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f53eae93709..6c3a5027ed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ FEATURES: * **New Resource:** `aws_wafregional_geo_match_set` [GH-3915] * **New Resource:** `aws_wafregional_rate_based_rule` [GH-3871] * **New Resource:** `aws_wafregional_regex_pattern_set` [GH-3933] +* **New Resource:** `aws_wafregional_rule_group` [GH-3948] ENHANCEMENTS: From d29cc8fe34949b7f77aa24da0a2dc6363b263b6c Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 28 Mar 2018 15:13:49 +0100 Subject: [PATCH 0247/3316] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c3a5027ed7..be5701f2ccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ FEATURES: ENHANCEMENTS: * provider: Support custom Elasticsearch endpoint [GH-3941] -* resource/appsync_graphql_api: Support import [GH-3500] +* resource/aws_appsync_graphql_api: Support import [GH-3500] * resource/aws_elasticache_cluster: Allow port to be optional [GH-3835] * resource/aws_elasticache_cluster: Add `replication_group_id` argument [GH-3869] * resource/aws_elasticache_replication_group: Allow port to be optional [GH-3835] @@ -23,9 +23,9 @@ BUG FIXES: * resource/aws_batch_compute_environment: Correctly set `compute_resources` in state [GH-3824] * resource/aws_cognito_user_pool: Correctly set `schema` in state [GH-3789] * resource/aws_iam_user_login_profile: Fix `password_length` validation function regression from 1.12.0 [GH-3919] +* resource/aws_lb: Store correct state for http2 and ensure attributes are set on create [GH-3854] * resource/aws_lb_listener: Retry CertificateNotFound errors on update for IAM eventual consistency [GH-3901] * resource/aws_security_group: Retry read on creation for EC2 eventual consistency [GH-3892] -* resource/aws_lb: Store correct state for http2 and ensure attributes are set on create [GH-3854] ## 1.12.0 (March 23, 2018) From bcdf5cba4d4fd2ec791ec77efb9cf997e1aec83a Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Mar 2018 19:15:02 +0100 Subject: [PATCH 0248/3316] New Resource: aws_waf_regex_match_set --- aws/provider.go | 1 + aws/resource_aws_waf_regex_match_set.go | 175 +++++++++ aws/resource_aws_waf_regex_match_set_test.go | 357 ++++++++++++++++++ aws/waf_helpers.go | 77 ++++ website/aws.erb | 4 + .../docs/r/waf_regex_match_set.html.markdown | 66 ++++ 6 files changed, 680 insertions(+) create mode 100644 aws/resource_aws_waf_regex_match_set.go create mode 100644 aws/resource_aws_waf_regex_match_set_test.go create mode 100644 website/docs/r/waf_regex_match_set.html.markdown diff --git a/aws/provider.go b/aws/provider.go index bc049799264..160e9462e2f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -548,6 +548,7 @@ func Provider() terraform.ResourceProvider { "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), "aws_waf_ipset": resourceAwsWafIPSet(), "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), "aws_waf_rule": resourceAwsWafRule(), "aws_waf_rule_group": resourceAwsWafRuleGroup(), diff --git a/aws/resource_aws_waf_regex_match_set.go b/aws/resource_aws_waf_regex_match_set.go new file mode 100644 index 00000000000..ed19133fa8a --- /dev/null +++ b/aws/resource_aws_waf_regex_match_set.go @@ -0,0 +1,175 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegexMatchSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegexMatchSetCreate, + Read: resourceAwsWafRegexMatchSetRead, + Update: resourceAwsWafRegexMatchSetUpdate, + Delete: resourceAwsWafRegexMatchSetDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "regex_match_tuple": { + Type: schema.TypeSet, + Optional: true, + Set: resourceAwsWafRegexMatchSetTupleHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data": { + Type: schema.TypeString, + Optional: true, + StateFunc: func(v interface{}) string { + return strings.ToLower(v.(string)) + }, + }, + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "regex_pattern_set_id": { + Type: schema.TypeString, + Required: true, + }, + "text_transformation": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsWafRegexMatchSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + log.Printf("[INFO] Creating WAF Regex Match Set: %s", d.Get("name").(string)) + + wr := newWafRetryer(conn, "global") + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRegexMatchSetInput{ + ChangeToken: token, + Name: aws.String(d.Get("name").(string)), + } + return conn.CreateRegexMatchSet(params) + }) + if err != nil { + return fmt.Errorf("Failed creating WAF Regex Match Set: %s", err) + } + resp := out.(*waf.CreateRegexMatchSetOutput) + + d.SetId(*resp.RegexMatchSet.RegexMatchSetId) + + return resourceAwsWafRegexMatchSetUpdate(d, meta) +} + +func resourceAwsWafRegexMatchSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + log.Printf("[INFO] Reading WAF Regex Match Set: %s", d.Get("name").(string)) + params := &waf.GetRegexMatchSetInput{ + RegexMatchSetId: aws.String(d.Id()), + } + + resp, err := conn.GetRegexMatchSet(params) + if err != nil { + if isAWSErr(err, "WAFNonexistentItemException", "") { + log.Printf("[WARN] WAF Regex Match Set (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("name", resp.RegexMatchSet.Name) + d.Set("regex_match_tuple", flattenWafRegexMatchTuples(resp.RegexMatchSet.RegexMatchTuples)) + + return nil +} + +func resourceAwsWafRegexMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + log.Printf("[INFO] Updating WAF Regex Match Set: %s", d.Get("name").(string)) + + if d.HasChange("regex_match_tuple") { + o, n := d.GetChange("regex_match_tuple") + oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateRegexMatchSetResource(d.Id(), oldT, newT, conn) + if err != nil { + return fmt.Errorf("Failed updating WAF Regex Match Set: %s", err) + } + } + + return resourceAwsWafRegexMatchSetRead(d, meta) +} + +func resourceAwsWafRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafconn + + oldTuples := d.Get("regex_match_tuple").(*schema.Set).List() + if len(oldTuples) > 0 { + noTuples := []interface{}{} + err := updateRegexMatchSetResource(d.Id(), oldTuples, noTuples, conn) + if err != nil { + return fmt.Errorf("Error updating WAF Regex Match Set: %s", err) + } + } + + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: aws.String(d.Id()), + } + log.Printf("[INFO] Deleting WAF Regex Match Set: %s", req) + return conn.DeleteRegexMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regex Match Set: %s", err) + } + + return nil +} + +func updateRegexMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: aws.String(id), + Updates: diffWafRegexMatchSetTuples(oldT, newT), + } + + return conn.UpdateRegexMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regex Match Set: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_waf_regex_match_set_test.go b/aws/resource_aws_waf_regex_match_set_test.go new file mode 100644 index 00000000000..4df13bf30b3 --- /dev/null +++ b/aws/resource_aws_waf_regex_match_set_test.go @@ -0,0 +1,357 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_waf_regex_match_set", &resource.Sweeper{ + Name: "aws_waf_regex_match_set", + F: testSweepWafRegexMatchSet, + }) +} + +func testSweepWafRegexMatchSet(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).wafconn + + req := &waf.ListRegexMatchSetsInput{} + resp, err := conn.ListRegexMatchSets(req) + if err != nil { + return fmt.Errorf("Error describing WAF Regex Match Sets: %s", err) + } + + if len(resp.RegexMatchSets) == 0 { + log.Print("[DEBUG] No AWS WAF Regex Match Sets to sweep") + return nil + } + + for _, s := range resp.RegexMatchSets { + if !strings.HasPrefix(*s.Name, "tfacc") { + continue + } + + resp, err := conn.GetRegexMatchSet(&waf.GetRegexMatchSetInput{ + RegexMatchSetId: s.RegexMatchSetId, + }) + if err != nil { + return err + } + set := resp.RegexMatchSet + + oldTuples := flattenWafRegexMatchTuples(set.RegexMatchTuples) + noTuples := []interface{}{} + err = updateRegexMatchSetResource(*set.RegexMatchSetId, oldTuples, noTuples, conn) + if err != nil { + return fmt.Errorf("Error updating WAF Regex Match Set: %s", err) + } + + wr := newWafRetryer(conn, "global") + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: aws.String(*set.RegexMatchSetId), + } + log.Printf("[INFO] Deleting WAF Regex Match Set: %s", req) + return conn.DeleteRegexMatchSet(req) + }) + } + + return nil +} + +func TestAccAWSWafRegexMatchSet_basic(t *testing.T) { + var matchSet waf.RegexMatchSet + var patternSet waf.RegexPatternSet + var idx int + + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + fieldToMatch := waf.FieldToMatch{ + Data: aws.String("User-Agent"), + Type: aws.String("HEADER"), + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegexMatchSetConfig(matchSetName, patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegexMatchSetExists("aws_waf_regex_match_set.test", &matchSet), + testAccCheckAWSWafRegexPatternSetExists("aws_waf_regex_pattern_set.test", &patternSet), + computeWafRegexMatchSetTuple(&patternSet, &fieldToMatch, "NONE", &idx), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "regex_match_tuple.#", "1"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.#", &idx, "1"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.data", &idx, "user-agent"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.type", &idx, "HEADER"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.text_transformation", &idx, "NONE"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegexMatchSet_changePatterns(t *testing.T) { + var before, after waf.RegexMatchSet + var patternSet waf.RegexPatternSet + var idx1, idx2 int + + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegexMatchSetConfig(matchSetName, patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegexMatchSetExists("aws_waf_regex_match_set.test", &before), + testAccCheckAWSWafRegexPatternSetExists("aws_waf_regex_pattern_set.test", &patternSet), + computeWafRegexMatchSetTuple(&patternSet, &waf.FieldToMatch{Data: aws.String("User-Agent"), Type: aws.String("HEADER")}, "NONE", &idx1), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "regex_match_tuple.#", "1"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.#", &idx1, "1"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.data", &idx1, "user-agent"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.type", &idx1, "HEADER"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.text_transformation", &idx1, "NONE"), + ), + }, + { + Config: testAccAWSWafRegexMatchSetConfig_changePatterns(matchSetName, patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegexMatchSetExists("aws_waf_regex_match_set.test", &after), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "regex_match_tuple.#", "1"), + + computeWafRegexMatchSetTuple(&patternSet, &waf.FieldToMatch{Data: aws.String("Referer"), Type: aws.String("HEADER")}, "COMPRESS_WHITE_SPACE", &idx2), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.#", &idx2, "1"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.data", &idx2, "referer"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.type", &idx2, "HEADER"), + testCheckResourceAttrWithIndexesAddr("aws_waf_regex_match_set.test", "regex_match_tuple.%d.text_transformation", &idx2, "COMPRESS_WHITE_SPACE"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegexMatchSet_noPatterns(t *testing.T) { + var matchSet waf.RegexMatchSet + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegexMatchSetConfig_noPatterns(matchSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegexMatchSetExists("aws_waf_regex_match_set.test", &matchSet), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_waf_regex_match_set.test", "regex_match_tuple.#", "0"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegexMatchSet_disappears(t *testing.T) { + var matchSet waf.RegexMatchSet + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegexMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegexMatchSetConfig(matchSetName, patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegexMatchSetExists("aws_waf_regex_match_set.test", &matchSet), + testAccCheckAWSWafRegexMatchSetDisappears(&matchSet), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func computeWafRegexMatchSetTuple(patternSet *waf.RegexPatternSet, fieldToMatch *waf.FieldToMatch, textTransformation string, idx *int) resource.TestCheckFunc { + return func(s *terraform.State) error { + m := map[string]interface{}{ + "field_to_match": flattenFieldToMatch(fieldToMatch), + "regex_pattern_set_id": *patternSet.RegexPatternSetId, + "text_transformation": textTransformation, + } + + *idx = resourceAwsWafRegexMatchSetTupleHash(m) + + return nil + } +} + +func testAccCheckAWSWafRegexMatchSetDisappears(set *waf.RegexMatchSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafconn + + wr := newWafRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: set.RegexMatchSetId, + } + + for _, tuple := range set.RegexMatchTuples { + req.Updates = append(req.Updates, &waf.RegexMatchSetUpdate{ + Action: aws.String("DELETE"), + RegexMatchTuple: tuple, + }) + } + + return conn.UpdateRegexMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regex Match Set: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: set.RegexMatchSetId, + } + return conn.DeleteRegexMatchSet(opts) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regex Match Set: %s", err) + } + + return nil + } +} + +func testAccCheckAWSWafRegexMatchSetExists(n string, v *waf.RegexMatchSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Regex Match Set ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafconn + resp, err := conn.GetRegexMatchSet(&waf.GetRegexMatchSetInput{ + RegexMatchSetId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.RegexMatchSet.RegexMatchSetId == rs.Primary.ID { + *v = *resp.RegexMatchSet + return nil + } + + return fmt.Errorf("WAF Regex Match Set (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSWafRegexMatchSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_waf_regex_match_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafconn + resp, err := conn.GetRegexMatchSet(&waf.GetRegexMatchSetInput{ + RegexMatchSetId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.RegexMatchSet.RegexMatchSetId == rs.Primary.ID { + return fmt.Errorf("WAF Regex Match Set %s still exists", rs.Primary.ID) + } + } + + // Return nil if the Regex Pattern Set is already destroyed + if isAWSErr(err, "WAFNonexistentItemException", "") { + return nil + } + + return err + } + + return nil +} + +func testAccAWSWafRegexMatchSetConfig(matchSetName, patternSetName string) string { + return fmt.Sprintf(` +resource "aws_waf_regex_match_set" "test" { + name = "%s" + regex_match_tuple { + field_to_match { + data = "User-Agent" + type = "HEADER" + } + regex_pattern_set_id = "${aws_waf_regex_pattern_set.test.id}" + text_transformation = "NONE" + } +} + +resource "aws_waf_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["one", "two"] +} +`, matchSetName, patternSetName) +} + +func testAccAWSWafRegexMatchSetConfig_changePatterns(matchSetName, patternSetName string) string { + return fmt.Sprintf(` +resource "aws_waf_regex_match_set" "test" { + name = "%s" + + regex_match_tuple { + field_to_match { + data = "Referer" + type = "HEADER" + } + regex_pattern_set_id = "${aws_waf_regex_pattern_set.test.id}" + text_transformation = "COMPRESS_WHITE_SPACE" + } +} + +resource "aws_waf_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["one", "two"] +} +`, matchSetName, patternSetName) +} + +func testAccAWSWafRegexMatchSetConfig_noPatterns(matchSetName string) string { + return fmt.Sprintf(` +resource "aws_waf_regex_match_set" "test" { + name = "%s" +}`, matchSetName) +} diff --git a/aws/waf_helpers.go b/aws/waf_helpers.go index 609b3ead8fc..a54371af565 100644 --- a/aws/waf_helpers.go +++ b/aws/waf_helpers.go @@ -1,8 +1,13 @@ package aws import ( + "bytes" + "fmt" + "strings" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/waf" + "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" ) @@ -285,3 +290,75 @@ func expandWafActivatedRule(rule map[string]interface{}) *waf.ActivatedRule { } return r } + +func flattenWafRegexMatchTuples(tuples []*waf.RegexMatchTuple) []interface{} { + out := make([]interface{}, len(tuples), len(tuples)) + for i, t := range tuples { + m := make(map[string]interface{}) + + if t.FieldToMatch != nil { + m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) + } + m["regex_pattern_set_id"] = *t.RegexPatternSetId + m["text_transformation"] = *t.TextTransformation + + out[i] = m + } + return out +} + +func diffWafRegexMatchSetTuples(oldT, newT []interface{}) []*waf.RegexMatchSetUpdate { + updates := make([]*waf.RegexMatchSetUpdate, 0) + + for _, ot := range oldT { + tuple := ot.(map[string]interface{}) + + if idx, contains := sliceContainsMap(newT, tuple); contains { + newT = append(newT[:idx], newT[idx+1:]...) + continue + } + + ftm := tuple["field_to_match"].([]interface{}) + updates = append(updates, &waf.RegexMatchSetUpdate{ + Action: aws.String(waf.ChangeActionDelete), + RegexMatchTuple: &waf.RegexMatchTuple{ + FieldToMatch: expandFieldToMatch(ftm[0].(map[string]interface{})), + RegexPatternSetId: aws.String(tuple["regex_pattern_set_id"].(string)), + TextTransformation: aws.String(tuple["text_transformation"].(string)), + }, + }) + } + + for _, nt := range newT { + tuple := nt.(map[string]interface{}) + + ftm := tuple["field_to_match"].([]interface{}) + updates = append(updates, &waf.RegexMatchSetUpdate{ + Action: aws.String(waf.ChangeActionInsert), + RegexMatchTuple: &waf.RegexMatchTuple{ + FieldToMatch: expandFieldToMatch(ftm[0].(map[string]interface{})), + RegexPatternSetId: aws.String(tuple["regex_pattern_set_id"].(string)), + TextTransformation: aws.String(tuple["text_transformation"].(string)), + }, + }) + } + return updates +} + +func resourceAwsWafRegexMatchSetTupleHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + if v, ok := m["field_to_match"]; ok { + ftms := v.([]interface{}) + ftm := ftms[0].(map[string]interface{}) + + if v, ok := ftm["data"]; ok { + buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(v.(string)))) + } + buf.WriteString(fmt.Sprintf("%s-", ftm["type"].(string))) + } + buf.WriteString(fmt.Sprintf("%s-", m["regex_pattern_set_id"].(string))) + buf.WriteString(fmt.Sprintf("%s-", m["text_transformation"].(string))) + + return hashcode.String(buf.String()) +} diff --git a/website/aws.erb b/website/aws.erb index 94356ebe354..c26d070d638 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1480,6 +1480,10 @@ aws_waf_rate_based_rule + > + aws_waf_regex_match_set + + > aws_waf_regex_pattern_set diff --git a/website/docs/r/waf_regex_match_set.html.markdown b/website/docs/r/waf_regex_match_set.html.markdown new file mode 100644 index 00000000000..fdc164ba044 --- /dev/null +++ b/website/docs/r/waf_regex_match_set.html.markdown @@ -0,0 +1,66 @@ +--- +layout: "aws" +page_title: "AWS: waf_regex_match_set" +sidebar_current: "docs-aws-resource-waf-regex-match-set" +description: |- + Provides a AWS WAF Regex Match Set resource. +--- + +# aws_waf_regex_match_set + +Provides a WAF Regex Match Set Resource + +## Example Usage + +```hcl +resource "aws_waf_regex_match_set" "example" { + name = "example" + regex_match_tuple { + field_to_match { + data = "User-Agent" + type = "HEADER" + } + regex_pattern_set_id = "${aws_waf_regex_pattern_set.example.id}" + text_transformation = "NONE" + } +} + +resource "aws_waf_regex_pattern_set" "example" { + name = "example" + regex_pattern_strings = ["one", "two"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name or description of the Regex Match Set. +* `regex_match_tuple` - (Required) The regular expression pattern that you want AWS WAF to search for in web requests, + the location in requests that you want AWS WAF to search, and other settings. See below. + +### Nested Arguments + +#### `regex_match_tuple` + + * `field_to_match` - (Required) The part of a web request that you want to search, such as a specified header or a query string. + * `regex_pattern_set_id` - (Required) The ID of a [Regex Pattern Set](/docs/r/waf_regex_pattern_set.html). + * `text_transformation` - (Required) Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + e.g. `CMD_LINE`, `HTML_ENTITY_DECODE` or `NONE`. + See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ByteMatchTuple.html#WAF-Type-ByteMatchTuple-TextTransformation) + for all supported values. + +#### `field_to_match` + +* `data` - (Optional) When `type` is `HEADER`, enter the name of the header that you want to search, e.g. `User-Agent` or `Referer`. + If `type` is any other value, omit this field. +* `type` - (Required) The part of the web request that you want AWS WAF to search for a specified string. + e.g. `HEADER`, `METHOD` or `BODY`. + See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html) + for all supported values. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Regex Match Set. From aef0fece344d0ad7e274f3379a25c31759bcdd52 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 28 Mar 2018 15:22:10 +0100 Subject: [PATCH 0249/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be5701f2ccf..f81c90627f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ FEATURES: +* **New Resource:** `aws_waf_regex_match_set` [GH-3947] * **New Resource:** `aws_waf_regex_pattern_set` [GH-3913] * **New Resource:** `aws_waf_rule_group` [GH-3898] * **New Resource:** `aws_wafregional_geo_match_set` [GH-3915] From 3d8f4433648d151f3baba0ec2648b46e32034255 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 28 Mar 2018 12:56:42 +0100 Subject: [PATCH 0250/3316] New Resource: aws_wafregional_regex_match_set --- aws/provider.go | 1 + ...esource_aws_wafregional_regex_match_set.go | 179 +++++++++ ...ce_aws_wafregional_regex_match_set_test.go | 345 ++++++++++++++++++ website/aws.erb | 4 + .../wafregional_regex_match_set.html.markdown | 66 ++++ 5 files changed, 595 insertions(+) create mode 100644 aws/resource_aws_wafregional_regex_match_set.go create mode 100644 aws/resource_aws_wafregional_regex_match_set_test.go create mode 100644 website/docs/r/wafregional_regex_match_set.html.markdown diff --git a/aws/provider.go b/aws/provider.go index ed60e4aca6c..7948614193c 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -561,6 +561,7 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), "aws_wafregional_rule": resourceAwsWafRegionalRule(), "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), diff --git a/aws/resource_aws_wafregional_regex_match_set.go b/aws/resource_aws_wafregional_regex_match_set.go new file mode 100644 index 00000000000..b1c9d10d08d --- /dev/null +++ b/aws/resource_aws_wafregional_regex_match_set.go @@ -0,0 +1,179 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsWafRegionalRegexMatchSet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWafRegionalRegexMatchSetCreate, + Read: resourceAwsWafRegionalRegexMatchSetRead, + Update: resourceAwsWafRegionalRegexMatchSetUpdate, + Delete: resourceAwsWafRegionalRegexMatchSetDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "regex_match_tuple": { + Type: schema.TypeSet, + Optional: true, + Set: resourceAwsWafRegexMatchSetTupleHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data": { + Type: schema.TypeString, + Optional: true, + StateFunc: func(v interface{}) string { + return strings.ToLower(v.(string)) + }, + }, + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "regex_pattern_set_id": { + Type: schema.TypeString, + Required: true, + }, + "text_transformation": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsWafRegionalRegexMatchSetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + log.Printf("[INFO] Creating WAF Regional Regex Match Set: %s", d.Get("name").(string)) + + wr := newWafRegionalRetryer(conn, region) + out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + params := &waf.CreateRegexMatchSetInput{ + ChangeToken: token, + Name: aws.String(d.Get("name").(string)), + } + return conn.CreateRegexMatchSet(params) + }) + if err != nil { + return fmt.Errorf("Failed creating WAF Regional Regex Match Set: %s", err) + } + resp := out.(*waf.CreateRegexMatchSetOutput) + + d.SetId(*resp.RegexMatchSet.RegexMatchSetId) + + return resourceAwsWafRegionalRegexMatchSetUpdate(d, meta) +} + +func resourceAwsWafRegionalRegexMatchSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + log.Printf("[INFO] Reading WAF Regional Regex Match Set: %s", d.Get("name").(string)) + params := &waf.GetRegexMatchSetInput{ + RegexMatchSetId: aws.String(d.Id()), + } + + resp, err := conn.GetRegexMatchSet(params) + if err != nil { + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + log.Printf("[WARN] WAF Regional Regex Match Set (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("name", resp.RegexMatchSet.Name) + d.Set("regex_match_tuple", flattenWafRegexMatchTuples(resp.RegexMatchSet.RegexMatchTuples)) + + return nil +} + +func resourceAwsWafRegionalRegexMatchSetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + log.Printf("[INFO] Updating WAF Regional Regex Match Set: %s", d.Get("name").(string)) + + if d.HasChange("regex_match_tuple") { + o, n := d.GetChange("regex_match_tuple") + oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateRegexMatchSetResourceWR(d.Id(), oldT, newT, conn, region) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Regex Match Set: %s", err) + } + } + + return resourceAwsWafRegionalRegexMatchSetRead(d, meta) +} + +func resourceAwsWafRegionalRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).wafregionalconn + region := meta.(*AWSClient).region + + oldTuples := d.Get("regex_match_tuple").(*schema.Set).List() + if len(oldTuples) > 0 { + noTuples := []interface{}{} + err := updateRegexMatchSetResourceWR(d.Id(), oldTuples, noTuples, conn, region) + if err != nil { + return fmt.Errorf("Error updating WAF Regional Regex Match Set: %s", err) + } + } + + wr := newWafRegionalRetryer(conn, "global") + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: aws.String(d.Id()), + } + log.Printf("[INFO] Deleting WAF Regional Regex Match Set: %s", req) + return conn.DeleteRegexMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regional Regex Match Set: %s", err) + } + + return nil +} + +func updateRegexMatchSetResourceWR(id string, oldT, newT []interface{}, conn *wafregional.WAFRegional, region string) error { + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: aws.String(id), + Updates: diffWafRegexMatchSetTuples(oldT, newT), + } + + return conn.UpdateRegexMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Regex Match Set: %s", err) + } + + return nil +} diff --git a/aws/resource_aws_wafregional_regex_match_set_test.go b/aws/resource_aws_wafregional_regex_match_set_test.go new file mode 100644 index 00000000000..d6284b52d71 --- /dev/null +++ b/aws/resource_aws_wafregional_regex_match_set_test.go @@ -0,0 +1,345 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_wafregional_regex_match_set", &resource.Sweeper{ + Name: "aws_wafregional_regex_match_set", + F: testSweepWafRegionalRegexMatchSet, + }) +} + +func testSweepWafRegionalRegexMatchSet(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).wafregionalconn + + req := &waf.ListRegexMatchSetsInput{} + resp, err := conn.ListRegexMatchSets(req) + if err != nil { + return fmt.Errorf("Error describing WAF Regional Regex Match Sets: %s", err) + } + + if len(resp.RegexMatchSets) == 0 { + log.Print("[DEBUG] No AWS WAF Regional Regex Match Sets to sweep") + return nil + } + + for _, s := range resp.RegexMatchSets { + if !strings.HasPrefix(*s.Name, "tfacc") { + continue + } + + resp, err := conn.GetRegexMatchSet(&waf.GetRegexMatchSetInput{ + RegexMatchSetId: s.RegexMatchSetId, + }) + if err != nil { + return err + } + set := resp.RegexMatchSet + + oldTuples := flattenWafRegexMatchTuples(set.RegexMatchTuples) + noTuples := []interface{}{} + err = updateRegexMatchSetResourceWR(*set.RegexMatchSetId, oldTuples, noTuples, conn, region) + if err != nil { + return fmt.Errorf("Error updating WAF Regional Regex Match Set: %s", err) + } + + wr := newWafRegionalRetryer(conn, region) + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.DeleteRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: aws.String(*set.RegexMatchSetId), + } + log.Printf("[INFO] Deleting WAF Regional Regex Match Set: %s", req) + return conn.DeleteRegexMatchSet(req) + }) + } + + return nil +} + +func TestAccAWSWafRegionalRegexMatchSet_basic(t *testing.T) { + var matchSet waf.RegexMatchSet + var patternSet waf.RegexPatternSet + var idx int + + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + fieldToMatch := waf.FieldToMatch{ + Data: aws.String("User-Agent"), + Type: aws.String("HEADER"), + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegionalRegexMatchSetConfig(matchSetName, patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRegexMatchSetExists("aws_wafregional_regex_match_set.test", &matchSet), + testAccCheckAWSWafRegionalRegexPatternSetExists("aws_wafregional_regex_pattern_set.test", &patternSet), + computeWafRegexMatchSetTuple(&patternSet, &fieldToMatch, "NONE", &idx), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "regex_match_tuple.#", "1"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.#", &idx, "1"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.data", &idx, "user-agent"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.type", &idx, "HEADER"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.text_transformation", &idx, "NONE"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRegexMatchSet_changePatterns(t *testing.T) { + var before, after waf.RegexMatchSet + var patternSet waf.RegexPatternSet + var idx1, idx2 int + + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRegexMatchSetConfig(matchSetName, patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRegexMatchSetExists("aws_wafregional_regex_match_set.test", &before), + testAccCheckAWSWafRegionalRegexPatternSetExists("aws_wafregional_regex_pattern_set.test", &patternSet), + computeWafRegexMatchSetTuple(&patternSet, &waf.FieldToMatch{Data: aws.String("User-Agent"), Type: aws.String("HEADER")}, "NONE", &idx1), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "regex_match_tuple.#", "1"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.#", &idx1, "1"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.data", &idx1, "user-agent"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.type", &idx1, "HEADER"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.text_transformation", &idx1, "NONE"), + ), + }, + { + Config: testAccAWSWafRegionalRegexMatchSetConfig_changePatterns(matchSetName, patternSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRegexMatchSetExists("aws_wafregional_regex_match_set.test", &after), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "regex_match_tuple.#", "1"), + + computeWafRegexMatchSetTuple(&patternSet, &waf.FieldToMatch{Data: aws.String("Referer"), Type: aws.String("HEADER")}, "COMPRESS_WHITE_SPACE", &idx2), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.#", &idx2, "1"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.data", &idx2, "referer"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.field_to_match.0.type", &idx2, "HEADER"), + testCheckResourceAttrWithIndexesAddr("aws_wafregional_regex_match_set.test", "regex_match_tuple.%d.text_transformation", &idx2, "COMPRESS_WHITE_SPACE"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRegexMatchSet_noPatterns(t *testing.T) { + var matchSet waf.RegexMatchSet + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRegexMatchSetConfig_noPatterns(matchSetName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSWafRegionalRegexMatchSetExists("aws_wafregional_regex_match_set.test", &matchSet), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "name", matchSetName), + resource.TestCheckResourceAttr("aws_wafregional_regex_match_set.test", "regex_match_tuple.#", "0"), + ), + }, + }, + }) +} + +func TestAccAWSWafRegionalRegexMatchSet_disappears(t *testing.T) { + var matchSet waf.RegexMatchSet + matchSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + patternSetName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalRegexMatchSetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSWafRegionalRegexMatchSetConfig(matchSetName, patternSetName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalRegexMatchSetExists("aws_wafregional_regex_match_set.test", &matchSet), + testAccCheckAWSWafRegionalRegexMatchSetDisappears(&matchSet), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckAWSWafRegionalRegexMatchSetDisappears(set *waf.RegexMatchSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + region := testAccProvider.Meta().(*AWSClient).region + + wr := newWafRegionalRetryer(conn, region) + _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { + req := &waf.UpdateRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: set.RegexMatchSetId, + } + + for _, tuple := range set.RegexMatchTuples { + req.Updates = append(req.Updates, &waf.RegexMatchSetUpdate{ + Action: aws.String("DELETE"), + RegexMatchTuple: tuple, + }) + } + + return conn.UpdateRegexMatchSet(req) + }) + if err != nil { + return fmt.Errorf("Failed updating WAF Regional Regex Match Set: %s", err) + } + + _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { + opts := &waf.DeleteRegexMatchSetInput{ + ChangeToken: token, + RegexMatchSetId: set.RegexMatchSetId, + } + return conn.DeleteRegexMatchSet(opts) + }) + if err != nil { + return fmt.Errorf("Failed deleting WAF Regional Regex Match Set: %s", err) + } + + return nil + } +} + +func testAccCheckAWSWafRegionalRegexMatchSetExists(n string, v *waf.RegexMatchSet) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No WAF Regional Regex Match Set ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRegexMatchSet(&waf.GetRegexMatchSetInput{ + RegexMatchSetId: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + if *resp.RegexMatchSet.RegexMatchSetId == rs.Primary.ID { + *v = *resp.RegexMatchSet + return nil + } + + return fmt.Errorf("WAF Regional Regex Match Set (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSWafRegionalRegexMatchSetDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_wafregional_regex_match_set" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).wafregionalconn + resp, err := conn.GetRegexMatchSet(&waf.GetRegexMatchSetInput{ + RegexMatchSetId: aws.String(rs.Primary.ID), + }) + + if err == nil { + if *resp.RegexMatchSet.RegexMatchSetId == rs.Primary.ID { + return fmt.Errorf("WAF Regional Regex Match Set %s still exists", rs.Primary.ID) + } + } + + // Return nil if the Regex Pattern Set is already destroyed + if isAWSErr(err, wafregional.ErrCodeWAFNonexistentItemException, "") { + return nil + } + + return err + } + + return nil +} + +func testAccAWSWafRegionalRegexMatchSetConfig(matchSetName, patternSetName string) string { + return fmt.Sprintf(` +resource "aws_wafregional_regex_match_set" "test" { + name = "%s" + regex_match_tuple { + field_to_match { + data = "User-Agent" + type = "HEADER" + } + regex_pattern_set_id = "${aws_wafregional_regex_pattern_set.test.id}" + text_transformation = "NONE" + } +} + +resource "aws_wafregional_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["one", "two"] +} +`, matchSetName, patternSetName) +} + +func testAccAWSWafRegionalRegexMatchSetConfig_changePatterns(matchSetName, patternSetName string) string { + return fmt.Sprintf(` +resource "aws_wafregional_regex_match_set" "test" { + name = "%s" + + regex_match_tuple { + field_to_match { + data = "Referer" + type = "HEADER" + } + regex_pattern_set_id = "${aws_wafregional_regex_pattern_set.test.id}" + text_transformation = "COMPRESS_WHITE_SPACE" + } +} + +resource "aws_wafregional_regex_pattern_set" "test" { + name = "%s" + regex_pattern_strings = ["one", "two"] +} +`, matchSetName, patternSetName) +} + +func testAccAWSWafRegionalRegexMatchSetConfig_noPatterns(matchSetName string) string { + return fmt.Sprintf(` +resource "aws_wafregional_regex_match_set" "test" { + name = "%s" +}`, matchSetName) +} diff --git a/website/aws.erb b/website/aws.erb index ba331ba91b3..9a70b30b774 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1535,6 +1535,10 @@ aws_wafregional_rate_based_rule + > + aws_wafregional_regex_match_set + + > aws_wafregional_regex_pattern_set diff --git a/website/docs/r/wafregional_regex_match_set.html.markdown b/website/docs/r/wafregional_regex_match_set.html.markdown new file mode 100644 index 00000000000..d98fb4c2671 --- /dev/null +++ b/website/docs/r/wafregional_regex_match_set.html.markdown @@ -0,0 +1,66 @@ +--- +layout: "aws" +page_title: "AWS: wafregional_regex_match_set" +sidebar_current: "docs-aws-resource-wafregional-regex-match-set" +description: |- + Provides a AWS WAF Regional Regex Match Set resource. +--- + +# aws_wafregional_regex_match_set + +Provides a WAF Regional Regex Match Set Resource + +## Example Usage + +```hcl +resource "aws_wafregional_regex_match_set" "example" { + name = "example" + regex_match_tuple { + field_to_match { + data = "User-Agent" + type = "HEADER" + } + regex_pattern_set_id = "${aws_wafregional_regex_pattern_set.example.id}" + text_transformation = "NONE" + } +} + +resource "aws_wafregional_regex_pattern_set" "example" { + name = "example" + regex_pattern_strings = ["one", "two"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name or description of the Regex Match Set. +* `regex_match_tuple` - (Required) The regular expression pattern that you want AWS WAF to search for in web requests, + the location in requests that you want AWS WAF to search, and other settings. See below. + +### Nested Arguments + +#### `regex_match_tuple` + + * `field_to_match` - (Required) The part of a web request that you want to search, such as a specified header or a query string. + * `regex_pattern_set_id` - (Required) The ID of a [Regex Pattern Set](/docs/r/waf_regex_pattern_set.html). + * `text_transformation` - (Required) Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + e.g. `CMD_LINE`, `HTML_ENTITY_DECODE` or `NONE`. + See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ByteMatchTuple.html#WAF-Type-ByteMatchTuple-TextTransformation) + for all supported values. + +#### `field_to_match` + +* `data` - (Optional) When `type` is `HEADER`, enter the name of the header that you want to search, e.g. `User-Agent` or `Referer`. + If `type` is any other value, omit this field. +* `type` - (Required) The part of the web request that you want AWS WAF to search for a specified string. + e.g. `HEADER`, `METHOD` or `BODY`. + See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html) + for all supported values. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the WAF Regional Regex Match Set. From 13a8273822496f85d1b37ea82105e365e52f5a94 Mon Sep 17 00:00:00 2001 From: atsushi-ishibashi Date: Wed, 28 Mar 2018 23:38:40 +0900 Subject: [PATCH 0251/3316] New Resource: aws_appsync_datasource (#2758) * wip * add test * Add docs * modify * reflect reviews * add resource provider * Add missing protocol to endpoint --- aws/provider.go | 1 + aws/resource_aws_appsync_datasource.go | 323 +++++++++++++ aws/resource_aws_appsync_datasource_test.go | 443 ++++++++++++++++++ website/aws.erb | 3 + .../docs/r/appsync_datasource.html.markdown | 123 +++++ 5 files changed, 893 insertions(+) create mode 100644 aws/resource_aws_appsync_datasource.go create mode 100644 aws/resource_aws_appsync_datasource_test.go create mode 100644 website/docs/r/appsync_datasource.html.markdown diff --git a/aws/provider.go b/aws/provider.go index ed60e4aca6c..d70c21284fb 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -274,6 +274,7 @@ func Provider() terraform.ResourceProvider { "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), + "aws_appsync_datasource": resourceAwsAppsyncDatasource(), "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), "aws_athena_database": resourceAwsAthenaDatabase(), "aws_athena_named_query": resourceAwsAthenaNamedQuery(), diff --git a/aws/resource_aws_appsync_datasource.go b/aws/resource_aws_appsync_datasource.go new file mode 100644 index 00000000000..9d8d0bbd1e3 --- /dev/null +++ b/aws/resource_aws_appsync_datasource.go @@ -0,0 +1,323 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appsync" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAppsyncDatasource() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAppsyncDatasourceCreate, + Read: resourceAwsAppsyncDatasourceRead, + Update: resourceAwsAppsyncDatasourceUpdate, + Delete: resourceAwsAppsyncDatasourceDelete, + + Schema: map[string]*schema.Schema{ + "api_id": { + Type: schema.TypeString, + Required: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`[_A-Za-z][_0-9A-Za-z]*`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q must match [_A-Za-z][_0-9A-Za-z]*", k)) + } + return + }, + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + appsync.DataSourceTypeAwsLambda, + appsync.DataSourceTypeAmazonDynamodb, + appsync.DataSourceTypeAmazonElasticsearch, + appsync.DataSourceTypeNone, + }, true), + StateFunc: func(v interface{}) string { + return strings.ToUpper(v.(string)) + }, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "dynamodb_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region": { + Type: schema.TypeString, + Required: true, + }, + "table_name": { + Type: schema.TypeString, + Required: true, + }, + "use_caller_credentials": { + Type: schema.TypeBool, + Optional: true, + }, + }, + }, + ConflictsWith: []string{"elasticsearch_config", "lambda_config"}, + }, + "elasticsearch_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region": { + Type: schema.TypeString, + Required: true, + }, + "endpoint": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + ConflictsWith: []string{"dynamodb_config", "lambda_config"}, + }, + "lambda_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "function_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + ConflictsWith: []string{"dynamodb_config", "elasticsearch_config"}, + }, + "service_role_arn": { + Type: schema.TypeString, + Optional: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsAppsyncDatasourceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.CreateDataSourceInput{ + ApiId: aws.String(d.Get("api_id").(string)), + Name: aws.String(d.Get("name").(string)), + Type: aws.String(d.Get("type").(string)), + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("service_role_arn"); ok { + input.ServiceRoleArn = aws.String(v.(string)) + } + + ddbconfig := d.Get("dynamodb_config").([]interface{}) + if len(ddbconfig) > 0 { + input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(ddbconfig[0].(map[string]interface{})) + } + esconfig := d.Get("elasticsearch_config").([]interface{}) + if len(esconfig) > 0 { + input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(esconfig[0].(map[string]interface{})) + } + lambdaconfig := d.Get("lambda_config").([]interface{}) + if len(lambdaconfig) > 0 { + input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(lambdaconfig[0].(map[string]interface{})) + } + + resp, err := conn.CreateDataSource(input) + if err != nil { + return err + } + + d.SetId(d.Get("api_id").(string) + "-" + d.Get("name").(string)) + d.Set("arn", resp.DataSource.DataSourceArn) + return nil +} + +func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.GetDataSourceInput{ + ApiId: aws.String(d.Get("api_id").(string)), + Name: aws.String(d.Get("name").(string)), + } + + resp, err := conn.GetDataSource(input) + if err != nil { + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + log.Printf("[WARN] AppSync Datasource %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("arn", resp.DataSource.DataSourceArn) + d.Set("description", resp.DataSource.Description) + d.Set("dynamodb_config", flattenAppsyncDynamodbDataSourceConfig(resp.DataSource.DynamodbConfig)) + d.Set("elasticsearch_config", flattenAppsyncElasticsearchDataSourceConfig(resp.DataSource.ElasticsearchConfig)) + d.Set("lambda_config", flattenAppsyncLambdaDataSourceConfig(resp.DataSource.LambdaConfig)) + d.Set("name", resp.DataSource.Name) + d.Set("service_role_arn", resp.DataSource.ServiceRoleArn) + d.Set("type", resp.DataSource.Type) + + return nil +} + +func resourceAwsAppsyncDatasourceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.UpdateDataSourceInput{ + ApiId: aws.String(d.Get("api_id").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if d.HasChange("description") { + input.Description = aws.String(d.Get("description").(string)) + } + if d.HasChange("service_role_arn") { + input.ServiceRoleArn = aws.String(d.Get("service_role_arn").(string)) + } + if d.HasChange("type") { + input.Type = aws.String(d.Get("type").(string)) + } + + if d.HasChange("dynamodb_config") { + ddbconfig := d.Get("dynamodb_config").([]interface{}) + if len(ddbconfig) > 0 { + input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(ddbconfig[0].(map[string]interface{})) + } + } + if d.HasChange("elasticsearch_config") { + esconfig := d.Get("elasticsearch_config").([]interface{}) + if len(esconfig) > 0 { + input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(esconfig[0].(map[string]interface{})) + } + } + if d.HasChange("lambda_config") { + lambdaconfig := d.Get("lambda_config").([]interface{}) + if len(lambdaconfig) > 0 { + input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(lambdaconfig[0].(map[string]interface{})) + } + } + + _, err := conn.UpdateDataSource(input) + if err != nil { + return err + } + return resourceAwsAppsyncDatasourceRead(d, meta) +} + +func resourceAwsAppsyncDatasourceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).appsyncconn + + input := &appsync.DeleteDataSourceInput{ + ApiId: aws.String(d.Get("api_id").(string)), + Name: aws.String(d.Get("name").(string)), + } + + _, err := conn.DeleteDataSource(input) + if err != nil { + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func expandAppsyncDynamodbDataSourceConfig(configured map[string]interface{}) *appsync.DynamodbDataSourceConfig { + result := &appsync.DynamodbDataSourceConfig{ + AwsRegion: aws.String(configured["region"].(string)), + TableName: aws.String(configured["table_name"].(string)), + } + + if v, ok := configured["use_caller_credentials"]; ok { + result.UseCallerCredentials = aws.Bool(v.(bool)) + } + + return result +} + +func flattenAppsyncDynamodbDataSourceConfig(config *appsync.DynamodbDataSourceConfig) []map[string]interface{} { + if config == nil { + return nil + } + + result := map[string]interface{}{} + + result["region"] = *config.AwsRegion + result["table_name"] = *config.TableName + if config.UseCallerCredentials != nil { + result["use_caller_credentials"] = *config.UseCallerCredentials + } + + return []map[string]interface{}{result} +} + +func expandAppsyncElasticsearchDataSourceConfig(configured map[string]interface{}) *appsync.ElasticsearchDataSourceConfig { + result := &appsync.ElasticsearchDataSourceConfig{ + AwsRegion: aws.String(configured["region"].(string)), + Endpoint: aws.String(configured["endpoint"].(string)), + } + + return result +} + +func flattenAppsyncElasticsearchDataSourceConfig(config *appsync.ElasticsearchDataSourceConfig) []map[string]interface{} { + if config == nil { + return nil + } + + result := map[string]interface{}{} + + result["region"] = *config.AwsRegion + result["endpoint"] = *config.Endpoint + + return []map[string]interface{}{result} +} + +func expandAppsyncLambdaDataSourceConfig(configured map[string]interface{}) *appsync.LambdaDataSourceConfig { + result := &appsync.LambdaDataSourceConfig{ + LambdaFunctionArn: aws.String(configured["function_arn"].(string)), + } + + return result +} + +func flattenAppsyncLambdaDataSourceConfig(config *appsync.LambdaDataSourceConfig) []map[string]interface{} { + if config == nil { + return nil + } + + result := map[string]interface{}{} + + result["function_arn"] = *config.LambdaFunctionArn + + return []map[string]interface{}{result} +} diff --git a/aws/resource_aws_appsync_datasource_test.go b/aws/resource_aws_appsync_datasource_test.go new file mode 100644 index 00000000000..148967f0ff2 --- /dev/null +++ b/aws/resource_aws_appsync_datasource_test.go @@ -0,0 +1,443 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/appsync" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsAppsyncDatasource_ddb(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_ddb(acctest.RandString(5)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), + resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + ), + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_es(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_es(acctest.RandString(5)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), + resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + ), + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_lambda(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_lambda(acctest.RandString(5)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), + resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + ), + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_update(t *testing.T) { + rName := acctest.RandString(5) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_ddb(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), + resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + resource.TestCheckResourceAttr("aws_appsync_datasource.test", "type", "AMAZON_DYNAMODB"), + ), + }, + { + Config: testAccAppsyncDatasourceConfig_update_lambda(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), + resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + resource.TestCheckResourceAttr("aws_appsync_datasource.test", "type", "AWS_LAMBDA"), + ), + }, + }, + }) +} + +func testAccCheckAwsAppsyncDatasourceDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).appsyncconn + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_appsync_datasource" { + continue + } + + input := &appsync.GetDataSourceInput{ + ApiId: aws.String(rs.Primary.Attributes["api_id"]), + Name: aws.String(rs.Primary.Attributes["name"]), + } + + _, err := conn.GetDataSource(input) + if err != nil { + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + return nil + } + return err + } + } + return nil +} + +func testAccCheckAwsAppsyncDatasourceExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + return nil + } +} + +func testAccAppsyncDatasourceConfig_ddb(rName string) string { + return fmt.Sprintf(` +data "aws_region" "current" {} + +resource "aws_appsync_graphql_api" "test" { + authentication_type = "API_KEY" + name = "tf_appsync_%s" +} + +resource "aws_dynamodb_table" "test" { + name = "tf-ddb-%s" + read_capacity = 1 + write_capacity = 1 + hash_key = "UserId" + attribute { + name = "UserId" + type = "S" + } +} + +resource "aws_iam_role" "test" { + name = "tf-role-%s" + + assume_role_policy = <> AppSync Resources + > + Budget Resources + + + > CloudFormation Resources diff --git a/website/docs/r/glue_connection.html.markdown b/website/docs/r/glue_connection.html.markdown new file mode 100644 index 00000000000..fe1c2a3b40e --- /dev/null +++ b/website/docs/r/glue_connection.html.markdown @@ -0,0 +1,79 @@ +--- +layout: "aws" +page_title: "AWS: aws_glue_connection" +sidebar_current: "docs-aws-resource-glue-connection" +description: |- + Provides an Glue Connection resource. +--- + +# aws_glue_connection + +Provides a Glue Connection resource. + +## Example Usage + +### Non-VPC Connection + +```hcl +resource "aws_glue_connection" "example" { + connection_properties = { + JDBC_CONNECTION_URL = "jdbc:mysql://example.com/exampledatabase" + PASSWORD = "examplepassword" + USERNAME = "exampleusername" + } + + name = "example" +} +``` + +### VPC Connection + +For more information, see the [AWS Documentation](https://docs.aws.amazon.com/glue/latest/dg/populate-add-connection.html#connection-JDBC-VPC). + +```hcl +resource "aws_glue_connection" "example" { + connection_properties = { + JDBC_CONNECTION_URL = "jdbc:mysql://${aws_rds_cluster.example.endpoint}/exampledatabase" + PASSWORD = "examplepassword" + USERNAME = "exampleusername" + } + + name = "example" + + physical_connection_requirements { + security_group_id_list = ["${aws_security_group.example.id}"] + subnet_id = "${aws_subnet.example.id}" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `catalog_id` – (Optional) The ID of the Data Catalog in which to create the connection. If none is supplied, the AWS account ID is used by default. +* `connection_properties` – (Required) A map of key-value pairs used as parameters for this connection. +* `connection_type` – (Optional) The type of the connection. Defaults to `JBDC`. +* `description` – (Optional) Description of the connection. +* `match_criteria` – (Optional) A list of criteria that can be used in selecting this connection. +* `name` – (Required) The name of the connection. +* `physical_connection_requirements` - (Optional) A map of physical connection requirements, such as VPC and SecurityGroup. Defined below. + +### physical_connection_requirements + +* `security_group_id_list` - (Optional) The security group ID list used by the connection. +* `subnet_id` - (Optional) The subnet ID used by the connection. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - Catalog ID and name of the connection + +## Import + +Glue Connections can be imported using the `CATALOG-ID` (AWS account ID if not custom) and `NAME`, e.g. + +``` +$ terraform import aws_glue_connection.MyConnection 123456789012:MyConnection +``` From e97d77a95acbeeb05656f3c3b3497c7e311614ad Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 2 Apr 2018 22:29:41 -0400 Subject: [PATCH 0361/3316] Update CHANGELOG for #3932 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af00216ef5..09db9d1bbaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ ## 1.14.0 (Unreleased) +ENHANCEMENTS: + +* resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] +* resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] + BUG FIXES: +* resource/aws_elasticache_replication_group: Properly set `cluster_mode` in state [GH-3932] * resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` [GH-3989] * resource/aws_lambda_function: IAM retry for "The role defined for the function cannot be assumed by Lambda" on update [GH-3988] * resource/aws_route53_record: Fix ListResourceRecordSet pagination [GH-3900] From 9627959ceedb368a65b77dbf548434af38b37647 Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Tue, 3 Apr 2018 09:29:39 +0200 Subject: [PATCH 0362/3316] #931 use a random topic name --- aws/resource_aws_ses_identity_notification_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ses_identity_notification_test.go b/aws/resource_aws_ses_identity_notification_test.go index 6a400bfcd95..ceef318b501 100644 --- a/aws/resource_aws_ses_identity_notification_test.go +++ b/aws/resource_aws_ses_identity_notification_test.go @@ -15,6 +15,7 @@ func TestAccAwsSESIdentityNotification_basic(t *testing.T) { domain := fmt.Sprintf( "%s.terraformtesting.com", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + topicName := fmt.Sprintf("test-topic-%d", acctest.RandInt()) resource.Test(t, resource.TestCase{ PreCheck: func() { @@ -30,7 +31,7 @@ func TestAccAwsSESIdentityNotification_basic(t *testing.T) { ), }, resource.TestStep{ - Config: fmt.Sprintf(testAccAwsSESIdentityNotificationConfig_update, domain), + Config: fmt.Sprintf(testAccAwsSESIdentityNotificationConfig_update, domain, topicName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsSESIdentityNotificationExists("aws_ses_identity_notification.test"), ), @@ -118,6 +119,6 @@ resource "aws_ses_identity" "test" { } resource "aws_sns_topic" "test" { - name = "user-updates-topic" + name = "%s" } ` From 62881029e524287dd341ea9277723b8f7aaf3984 Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Tue, 3 Apr 2018 09:30:04 +0200 Subject: [PATCH 0363/3316] #931 missing domain in resource --- aws/resource_aws_ses_identity_notification_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_ses_identity_notification_test.go b/aws/resource_aws_ses_identity_notification_test.go index ceef318b501..f64cdde7405 100644 --- a/aws/resource_aws_ses_identity_notification_test.go +++ b/aws/resource_aws_ses_identity_notification_test.go @@ -99,22 +99,22 @@ func testAccCheckAwsSESIdentityNotificationExists(n string) resource.TestCheckFu const testAccAwsSESIdentityNotificationConfig_basic = ` resource "aws_ses_identity_notification" "test" { - identity = "${aws_ses_identity.test.arn}" + identity = "${aws_ses_domain_identity.test.arn}" notification_type = "Complaint" } -resource "aws_ses_identity" "test" { +resource "aws_ses_domain_identity" "test" { domain = "%s" } ` const testAccAwsSESIdentityNotificationConfig_update = ` resource "aws_ses_identity_notification" "test" { topic_arn = "${aws_sns_topic.test.arn}" - identity = "${aws_ses_identity.test.arn}" + identity = "${aws_ses_domain_identity.test.arn}" notification_type = "Complaint" } -resource "aws_ses_identity" "test" { +resource "aws_ses_domain_identity" "test" { domain = "%s" } From d2bb12b9d326067fbf2d133b41aa04e9d811e9ff Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Tue, 3 Apr 2018 09:30:35 +0200 Subject: [PATCH 0364/3316] #931 missing aws prefix --- website/docs/r/ses_identity_notification.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/ses_identity_notification.markdown b/website/docs/r/ses_identity_notification.markdown index f8b03324918..58f5c348f03 100644 --- a/website/docs/r/ses_identity_notification.markdown +++ b/website/docs/r/ses_identity_notification.markdown @@ -1,9 +1,9 @@ --- layout: "aws" -page_title: "AWS: ses_identity_notification" +page_title: "AWS: aws_ses_identity_notification" sidebar_current: "docs-aws-resource-ses-identity-notification" description: |- - Setting SES Identity Notification + Setting AWS SES Identity Notification --- # ses_identity_notification From 49b1e85994666dae007817fc0e7caac383455efc Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Tue, 3 Apr 2018 09:30:54 +0200 Subject: [PATCH 0365/3316] #931 better descriptions in howto --- website/docs/r/ses_identity_notification.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/ses_identity_notification.markdown b/website/docs/r/ses_identity_notification.markdown index 58f5c348f03..81b9588ace4 100644 --- a/website/docs/r/ses_identity_notification.markdown +++ b/website/docs/r/ses_identity_notification.markdown @@ -8,7 +8,7 @@ description: |- # ses_identity_notification -Setting SES Identity Notification for a domain +Resource for managing SES Identity Notifications ## Example Usage @@ -24,6 +24,6 @@ resource "ses_identity_notification" "test" { The following arguments are supported: -* `topic_arn` - (Optional) The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter is omitted from the request or a null value is passed, SnsTopic is cleared and publishing is disabled. +* `topic_arn` - (Optional) The Amazon Resource Name (ARN) of the Amazon SNS topic. Can be set to "" (an empty string) to disable publishing. * `notification_type` - (Required) The type of notifications that will be published to the specified Amazon SNS topic. Valid Values: *Bounce*, *Complaint* or *Delivery*. * `identity` - (Required) The identity for which the Amazon SNS topic will be set. You can specify an identity by using its name or by using its Amazon Resource Name (ARN). \ No newline at end of file From 5b4f70e1ba01caab3d302f5a23b659485b101389 Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Tue, 3 Apr 2018 09:31:20 +0200 Subject: [PATCH 0366/3316] #931 use terraform fmt, easier to read --- website/docs/r/ses_identity_notification.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/r/ses_identity_notification.markdown b/website/docs/r/ses_identity_notification.markdown index 81b9588ace4..29fca9ee9b2 100644 --- a/website/docs/r/ses_identity_notification.markdown +++ b/website/docs/r/ses_identity_notification.markdown @@ -13,10 +13,10 @@ Resource for managing SES Identity Notifications ## Example Usage ```hcl -resource "ses_identity_notification" "test" { - topic_arn = "${aws_sns_topic.example.arn}" +resource "aws_ses_identity_notification" "test" { + topic_arn = "${aws_sns_topic.example.arn}" notification_type = "Bounce" - identity = "${aws_ses_domain_identity.example.domain}" + identity = "${aws_ses_domain_identity.example.domain}" } ``` From 10db145ca981f125fc55931b686fbfe70bd829fd Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Tue, 3 Apr 2018 13:25:19 +0400 Subject: [PATCH 0367/3316] Issue #3530 Add parameters valid_from and valid_until for aws_spot_instance_request --- aws/resource_aws_spot_instance_request.go | 30 +++++++++++++++++++ .../r/spot_instance_request.html.markdown | 5 ++++ 2 files changed, 35 insertions(+) diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index 1184c53a57b..bae95de7893 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -12,6 +12,8 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) +const awsSpotInstanceRequestTimeLayout = "2006-01-02T15:04:05Z" + func resourceAwsSpotInstanceRequest() *schema.Resource { return &schema.Resource{ Create: resourceAwsSpotInstanceRequestCreate, @@ -84,6 +86,16 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { Default: "terminate", ForceNew: true, } + s["valid_from"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + } + s["valid_until"] = &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + } return s }(), } @@ -132,6 +144,22 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface spotOpts.LaunchGroup = aws.String(v.(string)) } + if v, ok := d.GetOk("valid_from"); ok { + valid_from, err := time.Parse(awsSpotInstanceRequestTimeLayout, v.(string)) + if err != nil { + return err + } + spotOpts.ValidFrom = &valid_from + } + + if v, ok := d.GetOk("valid_until"); ok { + valid_until, err := time.Parse(awsSpotInstanceRequestTimeLayout, v.(string)) + if err != nil { + return err + } + spotOpts.ValidUntil = &valid_until + } + // Make the spot instance request log.Printf("[DEBUG] Requesting spot bid opts: %s", spotOpts) @@ -236,6 +264,8 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} d.Set("block_duration_minutes", request.BlockDurationMinutes) d.Set("tags", tagsToMap(request.Tags)) d.Set("instance_interruption_behaviour", request.InstanceInterruptionBehavior) + d.Set("valid_from", aws.TimeValue(request.ValidFrom).Format(awsSpotInstanceRequestTimeLayout)) + d.Set("valid_until", aws.TimeValue(request.ValidUntil).Format(awsSpotInstanceRequestTimeLayout)) return nil } diff --git a/website/docs/r/spot_instance_request.html.markdown b/website/docs/r/spot_instance_request.html.markdown index 1b18e4d439e..cda1a4251b7 100644 --- a/website/docs/r/spot_instance_request.html.markdown +++ b/website/docs/r/spot_instance_request.html.markdown @@ -61,6 +61,11 @@ Spot Instance Requests support all the same arguments as The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration. * `instance_interruption_behavior` - (Optional) Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour. +* `valid_until` - The end date and time of the request, in UTC ISO8601 format + (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance +requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date. +* `valid_from` - The start date and time of the request, in UTC ISO8601 format + (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately. ### Timeouts From 3a22eb6f7d91dcfbaede66752a3f754b908ec39c Mon Sep 17 00:00:00 2001 From: Lars Jarek Date: Tue, 3 Apr 2018 15:32:51 +0200 Subject: [PATCH 0368/3316] Fix for tests --- aws/resource_aws_codebuild_project_test.go | 198 ++++++++++++++++++++- 1 file changed, 196 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 120a02e4bc0..9e9e8351171 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -41,6 +41,34 @@ func TestAccAWSCodeBuildProject_basic(t *testing.T) { }) } +func TestAccAWSCodeBuildProject_parameter_store_type(t *testing.T) { + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_environment_variable_plaintext_type(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr( + "aws_codebuild_project.foo", "environment.0.environment_variable.0.type", "PLAINTEXT"), + ), + }, + { + Config: testAccAWSCodeBuildProjectConfig_environment_variable_parameter_store_type(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr( + "aws_codebuild_project.foo", "environment.0.environment_variable.0.type", "PARAMETER_STORE"), + ), + }, + }, + }) +} + func TestAccAWSCodeBuildProject_default_build_timeout(t *testing.T) { name := acctest.RandString(10) @@ -390,7 +418,6 @@ resource "aws_codebuild_project" "foo" { environment_variable = { name = "SOME_KEY" value = "SOME_VALUE" - type = "PLAINTEXT" } } @@ -474,7 +501,6 @@ resource "aws_codebuild_project" "foo" { environment_variable = { name = "SOME_OTHERKEY" value = "SOME_OTHERVALUE" - type = "PARAMETER_STORE" } } @@ -572,3 +598,171 @@ resource "aws_codebuild_project" "foo" { } `, rName, rName, rName, rName) } + +func testAccAWSCodeBuildProjectConfig_environment_variable_plaintext_type(rName string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "codebuild_role" { + name = "codebuild-role-%s" + assume_role_policy = < Date: Tue, 3 Apr 2018 14:58:44 +0200 Subject: [PATCH 0369/3316] =?UTF-8?q?add=20=E2=80=9Cnodejs8.10"=20runtime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aws/resource_aws_lambda_function.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index e8f316ac628..2c1e565195d 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -103,6 +103,7 @@ func resourceAwsLambdaFunction() *schema.Resource { // lambda.RuntimeNodejs has reached end of life since October 2016 so not included here lambda.RuntimeNodejs43, lambda.RuntimeNodejs610, + "nodejs8.10", lambda.RuntimeJava8, lambda.RuntimePython27, lambda.RuntimePython36, From 7d792b8d0e1112ccbbdd61730cf5beb7e6e55a6c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Apr 2018 10:32:11 -0400 Subject: [PATCH 0370/3316] Update CHANGELOG for #4020 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09db9d1bbaa..866c6282e7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] +* resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] BUG FIXES: From 20f88345936bdd600cb39660a318a2953ef9af2a Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Tue, 3 Apr 2018 16:47:36 +0200 Subject: [PATCH 0371/3316] #931 only set topic if it is passed --- aws/resource_aws_ses_identity_notification.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ses_identity_notification.go b/aws/resource_aws_ses_identity_notification.go index 6e1c60f70dc..50e29a72252 100644 --- a/aws/resource_aws_ses_identity_notification.go +++ b/aws/resource_aws_ses_identity_notification.go @@ -48,14 +48,16 @@ func resourceAwsSesNotification() *schema.Resource { func resourceAwsSesNotificationSet(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sesConn - topic := d.Get("topic_arn").(string) notification := d.Get("notification_type").(string) identity := d.Get("identity").(string) setOpts := &ses.SetIdentityNotificationTopicInput{ Identity: aws.String(identity), NotificationType: aws.String(notification), - SnsTopic: aws.String(topic), + } + + if v, ok := d.GetOk("topic_arn"); ok && v.(string) != "" { + setOpts.SnsTopic = aws.String(v.(string)) } d.SetId(fmt.Sprintf("%s|%s", identity, notification)) From c628ee5e7d7a0cc69d78fa1ced380eef4569b5c5 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 3 Apr 2018 17:56:56 +0100 Subject: [PATCH 0372/3316] docs: Fix formatting of wafregional_geo_match_set --- website/docs/r/wafregional_geo_match_set.html.markdown | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/r/wafregional_geo_match_set.html.markdown b/website/docs/r/wafregional_geo_match_set.html.markdown index dd08b44ca74..75098b8b056 100644 --- a/website/docs/r/wafregional_geo_match_set.html.markdown +++ b/website/docs/r/wafregional_geo_match_set.html.markdown @@ -1,4 +1,3 @@ - --- layout: "aws" page_title: "AWS: wafregional_geo_match_set" From 931ff2d68b3e9fc6652e6153723a5c9bef4abe6e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Apr 2018 15:37:28 -0400 Subject: [PATCH 0373/3316] New Resource: aws_glue_job --- aws/provider.go | 1 + aws/resource_aws_glue_job.go | 326 +++++++++++++++ aws/resource_aws_glue_job_test.go | 558 ++++++++++++++++++++++++++ website/aws.erb | 3 + website/docs/r/glue_job.html.markdown | 80 ++++ 5 files changed, 968 insertions(+) create mode 100644 aws/resource_aws_glue_job.go create mode 100644 aws/resource_aws_glue_job_test.go create mode 100644 website/docs/r/glue_job.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 623446d93b5..599f40653ef 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -377,6 +377,7 @@ func Provider() terraform.ResourceProvider { "aws_gamelift_fleet": resourceAwsGameliftFleet(), "aws_glacier_vault": resourceAwsGlacierVault(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_job": resourceAwsGlueJob(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), diff --git a/aws/resource_aws_glue_job.go b/aws/resource_aws_glue_job.go new file mode 100644 index 00000000000..0c96338abdb --- /dev/null +++ b/aws/resource_aws_glue_job.go @@ -0,0 +1,326 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlueJob() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueJobCreate, + Read: resourceAwsGlueJobRead, + Update: resourceAwsGlueJobUpdate, + Delete: resourceAwsGlueJobDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "allocated_capacity": { + Type: schema.TypeInt, + Optional: true, + Default: 10, + ValidateFunc: validation.IntBetween(2, 100), + }, + "command": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Default: "glueetl", + }, + "script_location": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "connections": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "default_arguments": { + Type: schema.TypeMap, + Optional: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "execution_property": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "max_concurrent_runs": { + Type: schema.TypeInt, + Optional: true, + Default: 1, + ValidateFunc: validation.IntBetween(1, 3), + }, + }, + }, + }, + "max_retries": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 10), + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + } +} + +func resourceAwsGlueJobCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + input := &glue.CreateJobInput{ + Command: expandGlueJobCommand(d.Get("command").([]interface{})), + Name: aws.String(name), + Role: aws.String(d.Get("role_arn").(string)), + } + + if v, ok := d.GetOk("allocated_capacity"); ok { + input.AllocatedCapacity = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("connections"); ok { + input.Connections = &glue.ConnectionsList{ + Connections: expandStringList(v.([]interface{})), + } + } + + if kv, ok := d.GetOk("default_arguments"); ok { + defaultArgumentsMap := make(map[string]string) + for k, v := range kv.(map[string]interface{}) { + defaultArgumentsMap[k] = v.(string) + } + input.DefaultArguments = aws.StringMap(defaultArgumentsMap) + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("execution_property"); ok { + input.ExecutionProperty = expandGlueExecutionProperty(v.([]interface{})) + } + + if v, ok := d.GetOk("max_retries"); ok { + input.MaxRetries = aws.Int64(int64(v.(int))) + } + + log.Printf("[DEBUG] Creating Glue Job: %s", input) + _, err := conn.CreateJob(input) + if err != nil { + return fmt.Errorf("error creating Glue Job (%s): %s", name, err) + } + + d.SetId(name) + + return resourceAwsGlueJobRead(d, meta) +} + +func resourceAwsGlueJobRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + input := &glue.GetJobInput{ + JobName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Glue Job: %s", input) + output, err := conn.GetJob(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Job (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Glue Job (%s): %s", d.Id(), err) + } + + job := output.Job + if job == nil { + log.Printf("[WARN] Glue Job (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("allocated_capacity", int(aws.Int64Value(job.AllocatedCapacity))) + if err := d.Set("command", flattenGlueJobCommand(job.Command)); err != nil { + return fmt.Errorf("error setting command: %s", err) + } + if err := d.Set("connections", flattenGlueConnectionsList(job.Connections)); err != nil { + return fmt.Errorf("error setting connections: %s", err) + } + if err := d.Set("default_arguments", aws.StringValueMap(job.DefaultArguments)); err != nil { + return fmt.Errorf("error setting default_arguments: %s", err) + } + d.Set("description", job.Description) + if err := d.Set("execution_property", flattenGlueExecutionProperty(job.ExecutionProperty)); err != nil { + return fmt.Errorf("error setting execution_property: %s", err) + } + d.Set("max_retries", int(aws.Int64Value(job.MaxRetries))) + d.Set("name", job.Name) + d.Set("role_arn", job.Role) + + return nil +} + +func resourceAwsGlueJobUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + jobUpdate := &glue.JobUpdate{ + Command: expandGlueJobCommand(d.Get("command").([]interface{})), + Role: aws.String(d.Get("role_arn").(string)), + } + + if v, ok := d.GetOk("allocated_capacity"); ok { + jobUpdate.AllocatedCapacity = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("connections"); ok { + jobUpdate.Connections = &glue.ConnectionsList{ + Connections: expandStringList(v.([]interface{})), + } + } + + if kv, ok := d.GetOk("default_arguments"); ok { + defaultArgumentsMap := make(map[string]string) + for k, v := range kv.(map[string]interface{}) { + defaultArgumentsMap[k] = v.(string) + } + jobUpdate.DefaultArguments = aws.StringMap(defaultArgumentsMap) + } + + if v, ok := d.GetOk("description"); ok { + jobUpdate.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("execution_property"); ok { + jobUpdate.ExecutionProperty = expandGlueExecutionProperty(v.([]interface{})) + } + + if v, ok := d.GetOk("max_retries"); ok { + jobUpdate.MaxRetries = aws.Int64(int64(v.(int))) + } + + input := &glue.UpdateJobInput{ + JobName: aws.String(d.Id()), + JobUpdate: jobUpdate, + } + + log.Printf("[DEBUG] Updating Glue Job: %s", input) + _, err := conn.UpdateJob(input) + if err != nil { + return fmt.Errorf("error updating Glue Job (%s): %s", d.Id(), err) + } + + return nil +} + +func resourceAwsGlueJobDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + log.Printf("[DEBUG] Deleting Glue Job: %s", d.Id()) + err := deleteGlueJob(conn, d.Id()) + if err != nil { + return fmt.Errorf("error deleting Glue Job (%s): %s", d.Id(), err) + } + + return nil +} + +func deleteGlueJob(conn *glue.Glue, jobName string) error { + input := &glue.DeleteJobInput{ + JobName: aws.String(jobName), + } + + _, err := conn.DeleteJob(input) + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + return err + } + + return nil +} + +func expandGlueExecutionProperty(l []interface{}) *glue.ExecutionProperty { + m := l[0].(map[string]interface{}) + + executionProperty := &glue.ExecutionProperty{ + MaxConcurrentRuns: aws.Int64(int64(m["max_concurrent_runs"].(int))), + } + + return executionProperty +} + +func expandGlueJobCommand(l []interface{}) *glue.JobCommand { + m := l[0].(map[string]interface{}) + + jobCommand := &glue.JobCommand{ + Name: aws.String(m["name"].(string)), + ScriptLocation: aws.String(m["script_location"].(string)), + } + + return jobCommand +} + +func flattenGlueConnectionsList(connectionsList *glue.ConnectionsList) []interface{} { + if connectionsList == nil { + return []interface{}{} + } + + return flattenStringList(connectionsList.Connections) +} + +func flattenGlueExecutionProperty(executionProperty *glue.ExecutionProperty) []map[string]interface{} { + if executionProperty == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "max_concurrent_runs": int(aws.Int64Value(executionProperty.MaxConcurrentRuns)), + } + + return []map[string]interface{}{m} +} + +func flattenGlueJobCommand(jobCommand *glue.JobCommand) []map[string]interface{} { + if jobCommand == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "name": aws.StringValue(jobCommand.Name), + "script_location": aws.StringValue(jobCommand.ScriptLocation), + } + + return []map[string]interface{}{m} +} diff --git a/aws/resource_aws_glue_job_test.go b/aws/resource_aws_glue_job_test.go new file mode 100644 index 00000000000..a673696ecdd --- /dev/null +++ b/aws/resource_aws_glue_job_test.go @@ -0,0 +1,558 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_glue_job", &resource.Sweeper{ + Name: "aws_glue_job", + F: testSweepGlueJobs, + }) +} + +func testSweepGlueJobs(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).glueconn + + prefixes := []string{ + "tf-acc-test-", + } + + input := &glue.GetJobsInput{} + err = conn.GetJobsPages(input, func(page *glue.GetJobsOutput, lastPage bool) bool { + if len(page.Jobs) == 0 { + log.Printf("[INFO] No Glue Jobs to sweep") + return false + } + for _, job := range page.Jobs { + skip := true + name := job.Name + for _, prefix := range prefixes { + if strings.HasPrefix(*name, prefix) { + skip = false + break + } + } + if skip { + log.Printf("[INFO] Skipping Glue Job: %s", *name) + continue + } + + log.Printf("[INFO] Deleting Glue Job: %s", *name) + err := deleteGlueJob(conn, *name) + if err != nil { + log.Printf("[ERROR] Failed to delete Glue Job %s: %s", *name, err) + } + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("Error retrieving Glue Jobs: %s", err) + } + + return nil +} + +func TestAccAWSGlueJob_Basic(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_Required(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "command.#", "1"), + resource.TestCheckResourceAttr(resourceName, "command.0.script_location", "testscriptlocation"), + resource.TestCheckResourceAttr(resourceName, "default_arguments.%", "0"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestMatchResourceAttr(resourceName, "role_arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:iam::[^:]+:role/%s", rName))), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSGlueJob_AllocatedCapacity(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_AllocatedCapacity(rName, 1), + ExpectError: regexp.MustCompile(`expected allocated_capacity to be in the range`), + }, + { + Config: testAccAWSGlueJobConfig_AllocatedCapacity(rName, 101), + ExpectError: regexp.MustCompile(`expected allocated_capacity to be in the range`), + }, + { + Config: testAccAWSGlueJobConfig_AllocatedCapacity(rName, 2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "allocated_capacity", "2"), + ), + }, + { + Config: testAccAWSGlueJobConfig_AllocatedCapacity(rName, 100), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "allocated_capacity", "100"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSGlueJob_Command(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_Command(rName, "testscriptlocation1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "command.#", "1"), + resource.TestCheckResourceAttr(resourceName, "command.0.script_location", "testscriptlocation1"), + ), + }, + { + Config: testAccAWSGlueJobConfig_Command(rName, "testscriptlocation2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "command.#", "1"), + resource.TestCheckResourceAttr(resourceName, "command.0.script_location", "testscriptlocation2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSGlueJob_DefaultArguments(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_DefaultArguments(rName, "job-bookmark-disable", "python"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "default_arguments.%", "2"), + resource.TestCheckResourceAttr(resourceName, "default_arguments.--job-bookmark-option", "job-bookmark-disable"), + resource.TestCheckResourceAttr(resourceName, "default_arguments.--job-language", "python"), + ), + }, + { + Config: testAccAWSGlueJobConfig_DefaultArguments(rName, "job-bookmark-enable", "scala"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "default_arguments.%", "2"), + resource.TestCheckResourceAttr(resourceName, "default_arguments.--job-bookmark-option", "job-bookmark-enable"), + resource.TestCheckResourceAttr(resourceName, "default_arguments.--job-language", "scala"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSGlueJob_Description(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_Description(rName, "First Description"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "description", "First Description"), + ), + }, + { + Config: testAccAWSGlueJobConfig_Description(rName, "Second Description"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "description", "Second Description"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSGlueJob_ExecutionProperty(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_ExecutionProperty(rName, 0), + ExpectError: regexp.MustCompile(`expected execution_property.0.max_concurrent_runs to be in the range`), + }, + { + Config: testAccAWSGlueJobConfig_ExecutionProperty(rName, 4), + ExpectError: regexp.MustCompile(`expected execution_property.0.max_concurrent_runs to be in the range`), + }, + { + Config: testAccAWSGlueJobConfig_ExecutionProperty(rName, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "execution_property.#", "1"), + resource.TestCheckResourceAttr(resourceName, "execution_property.0.max_concurrent_runs", "1"), + ), + }, + { + Config: testAccAWSGlueJobConfig_ExecutionProperty(rName, 2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "execution_property.#", "1"), + resource.TestCheckResourceAttr(resourceName, "execution_property.0.max_concurrent_runs", "2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSGlueJob_MaxRetries(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_MaxRetries(rName, 11), + ExpectError: regexp.MustCompile(`expected max_retries to be in the range`), + }, + { + Config: testAccAWSGlueJobConfig_MaxRetries(rName, 0), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "max_retries", "0"), + ), + }, + { + Config: testAccAWSGlueJobConfig_MaxRetries(rName, 10), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "max_retries", "10"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSGlueJobExists(resourceName string, job *glue.Job) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Glue Job ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).glueconn + + output, err := conn.GetJob(&glue.GetJobInput{ + JobName: aws.String(rs.Primary.ID), + }) + if err != nil { + return err + } + + if output.Job == nil { + return fmt.Errorf("Glue Job (%s) not found", rs.Primary.ID) + } + + if aws.StringValue(output.Job.Name) == rs.Primary.ID { + *job = *output.Job + return nil + } + + return fmt.Errorf("Glue Job (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSGlueJobDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_glue_job" { + continue + } + + conn := testAccProvider.Meta().(*AWSClient).glueconn + + output, err := conn.GetJob(&glue.GetJobInput{ + JobName: aws.String(rs.Primary.ID), + }) + + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + + } + + job := output.Job + if job != nil && aws.StringValue(job.Name) == rs.Primary.ID { + return fmt.Errorf("Glue Job %s still exists", rs.Primary.ID) + } + + return err + } + + return nil +} + +func testAccAWSGlueJobConfig_Base(rName string) string { + return fmt.Sprintf(` +data "aws_iam_policy" "AWSGlueServiceRole" { + arn = "arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole" +} + +resource "aws_iam_role" "test" { + name = "%s" + + assume_role_policy = <> aws_glue_catalog_database + > + aws_glue_job + diff --git a/website/docs/r/glue_job.html.markdown b/website/docs/r/glue_job.html.markdown new file mode 100644 index 00000000000..2d8e6efea77 --- /dev/null +++ b/website/docs/r/glue_job.html.markdown @@ -0,0 +1,80 @@ +--- +layout: "aws" +page_title: "AWS: aws_glue_job" +sidebar_current: "docs-aws-resource-glue-job" +description: |- + Provides an Glue Job resource. +--- + +# aws_glue_job + +Provides a Glue Job resource. + +## Example Usage + +### Python Job + +```hcl +resource "aws_glue_job" "example" { + name = "example" + role_arn = "${aws_iam_role.example.arn}" + + command { + script_location = "s3://${aws_s3_bucket.example.bucket}/example.py" + } +} +``` + +### Scala Job + +```hcl +resource "aws_glue_job" "example" { + name = "example" + role_arn = "${aws_iam_role.example.arn}" + + command { + script_location = "s3://${aws_s3_bucket.example.bucket}/example.scala" + } + + default_arguments = { + "--job-language" = "scala" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `allocated_capacity` – (Optional) The number of AWS Glue data processing units (DPUs) to allocate to this Job. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. +* `command` – (Required) The command of the job. Defined below. +* `connections` – (Optional) The list of connections used for this job. +* `default_arguments` – (Optional) The map of default arguments for this job. You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue itself consumes. For information about how to specify and consume your own Job arguments, see the [Calling AWS Glue APIs in Python](http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) topic in the developer guide. For information about the key-value pairs that AWS Glue consumes to set up your job, see the [Special Parameters Used by AWS Glue](http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) topic in the developer guide. +* `description` – (Optional) Description of the job. +* `execution_property` – (Optional) Execution property of the job. Defined below. +* `max_retries` – (Optional) The maximum number of times to retry this job if it fails. +* `name` – (Required) The name you assign to this job. It must be unique in your account. +* `role` – (Required) The ARN of the IAM role associated with this job. + +### command Argument Reference + +* `name` - (Optional) The name of the job command. Defaults to `glueetl` +* `script_location` - (Required) Specifies the S3 path to a script that executes a job. + +### execution_property Argument Reference + +* `max_concurrent_runs` - (Optional) The maximum number of concurrent runs allowed for a job. The default is 1. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - Job name + +## Import + +Glue Jobs can be imported using `name`, e.g. + +``` +$ terraform import aws_glue_job.MyJob MyJob +``` From 2e82450099035c12c0f42aec3a6ae9a6d3606d4f Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Tue, 3 Apr 2018 12:31:02 -0400 Subject: [PATCH 0374/3316] suppress attributes for lb type --- aws/resource_aws_lb.go | 55 ++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index be52c472ca0..ea1053d134e 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -122,25 +122,29 @@ func resourceAwsLb() *schema.Resource { }, "access_logs": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + DiffSuppressFunc: suppressIfLBType("network"), Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "bucket": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: suppressIfLBType("network"), }, "prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + DiffSuppressFunc: suppressIfLBType("network"), }, "enabled": { - Type: schema.TypeBool, - Optional: true, - Computed: true, + Type: schema.TypeBool, + Optional: true, + Computed: true, + DiffSuppressFunc: suppressIfLBType("network"), }, }, }, @@ -153,21 +157,24 @@ func resourceAwsLb() *schema.Resource { }, "idle_timeout": { - Type: schema.TypeInt, - Optional: true, - Default: 60, + Type: schema.TypeInt, + Optional: true, + Default: 60, + DiffSuppressFunc: suppressIfLBType("network"), }, "enable_cross_zone_load_balancing": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeBool, + Optional: true, + Default: false, + DiffSuppressFunc: suppressIfLBType("application"), }, "enable_http2": { - Type: schema.TypeBool, - Optional: true, - Default: true, + Type: schema.TypeBool, + Optional: true, + Default: true, + DiffSuppressFunc: suppressIfLBType("network"), }, "ip_address_type": { @@ -196,6 +203,12 @@ func resourceAwsLb() *schema.Resource { } } +func suppressIfLBType(t string) schema.SchemaDiffSuppressFunc { + return func(k string, old string, new string, d *schema.ResourceData) bool { + return d.Get("load_balancer_type").(string) == t + } +} + func resourceAwsLbCreate(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn From f0a434799d10e692d85a33fd9b15c45f8ec73985 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Wed, 4 Apr 2018 15:33:57 +0900 Subject: [PATCH 0375/3316] Reflect reviews --- aws/resource_aws_ecs_service.go | 3 ++- website/docs/r/ecs_service.html.markdown | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index d4f3c7ddaca..380dc04a7bf 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -209,6 +209,7 @@ func resourceAwsEcsService() *schema.Resource { Type: schema.TypeSet, Optional: true, ForceNew: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "port": { @@ -331,7 +332,7 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error sr := &ecs.ServiceRegistry{ RegistryArn: aws.String(raw["registry_arn"].(string)), } - if port, ok := raw["port"].(int); ok { + if port, ok := raw["port"].(int); ok && port != 0 { sr.Port = aws.Int64(int64(port)) } diff --git a/website/docs/r/ecs_service.html.markdown b/website/docs/r/ecs_service.html.markdown index cc967dc0aeb..f7b43acedda 100644 --- a/website/docs/r/ecs_service.html.markdown +++ b/website/docs/r/ecs_service.html.markdown @@ -63,7 +63,7 @@ into consideration during task placement. The maximum number of * `placement_constraints` - (Optional) rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Defined below. * `network_configuration` - (Optional) The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. -* `service_registries` - (Optional) The service discovery registries for the service. +* `service_registries` - (Optional) The service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. -> **Note:** As a result of an AWS limitation, a single `load_balancer` can be attached to the ECS service at most. See [related docs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html#load-balancing-concepts). From 2163040be1ce2075e883fc98d6a8b4f30601f3af Mon Sep 17 00:00:00 2001 From: Lars Jarek Date: Wed, 4 Apr 2018 10:44:40 +0200 Subject: [PATCH 0376/3316] Cosmetic changes --- aws/resource_aws_codebuild_project_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index ba37e8402fa..8d77c980f67 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -338,8 +338,8 @@ resource "aws_codebuild_project" "foo" { type = "LINUX_CONTAINER" environment_variable = { - name = "SOME_KEY" - value = "SOME_VALUE" + "name" = "SOME_KEY" + "value" = "SOME_VALUE" } } @@ -423,8 +423,8 @@ resource "aws_codebuild_project" "foo" { type = "LINUX_CONTAINER" environment_variable = { - name = "SOME_OTHERKEY" - value = "SOME_OTHERVALUE" + "name" = "SOME_OTHERKEY" + "value" = "SOME_OTHERVALUE" } } @@ -523,7 +523,6 @@ resource "aws_codebuild_project" "foo" { `, rName, rName, rName, rName) } - func testAccAWSCodeBuildProjectConfig_sourceAuth(rName, authResource, authType string) string { return fmt.Sprintf(` resource "aws_iam_role" "codebuild_role" { @@ -598,6 +597,7 @@ resource "aws_codebuild_project" "foo" { source { type = "GITHUB" location = "https://github.com/hashicorp/packer.git" + auth { resource = "%[2]s" type = "%[3]s" @@ -720,9 +720,9 @@ resource "aws_codebuild_project" "foo" { type = "LINUX_CONTAINER" environment_variable = { - name = "SOME_KEY" - value = "SOME_VALUE" - type = "PLAINTEXT" + "name" = "SOME_KEY" + "value" = "SOME_VALUE" + "type" = "PLAINTEXT" } } @@ -804,9 +804,9 @@ resource "aws_codebuild_project" "foo" { type = "LINUX_CONTAINER" environment_variable = { - name = "SOME_OTHERKEY" - value = "SOME_OTHERVALUE" - type = "PARAMETER_STORE" + "name" = "SOME_OTHERKEY" + "value" = "SOME_OTHERVALUE" + "type" = "PARAMETER_STORE" } } From 7787ba44ad07dff2cf29d6575af648ca54db5e45 Mon Sep 17 00:00:00 2001 From: Lars Jarek Date: Wed, 4 Apr 2018 10:47:50 +0200 Subject: [PATCH 0377/3316] gofmt change --- aws/resource_aws_codebuild_project_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 8d77c980f67..6a879962801 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -820,4 +820,4 @@ resource "aws_codebuild_project" "foo" { } } `, rName, rName, rName, rName) -} \ No newline at end of file +} From f147424b220a26a970ecb1a20846f66fc6cac867 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 29 Mar 2018 13:03:48 +0100 Subject: [PATCH 0378/3316] Replace custom validation functions with standard helpers --- aws/resource_aws_launch_configuration.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index 823ac7df37d..5ca38a41c76 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -16,6 +16,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsLaunchConfiguration() *schema.Resource { @@ -34,14 +35,14 @@ func resourceAwsLaunchConfiguration() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(1, 255), }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateMaxLength(255 - resource.UniqueIDSuffixLength), + ValidateFunc: validation.StringLenBetween(1, 255-resource.UniqueIDSuffixLength), }, "image_id": { @@ -82,7 +83,7 @@ func resourceAwsLaunchConfiguration() *schema.Resource { return "" } }, - ValidateFunc: validateMaxLength(16384), + ValidateFunc: validation.StringLenBetween(1, 16384), }, "security_groups": { From 35d10494fc8e9c8a1944745b334145c5d5591b0f Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 29 Mar 2018 13:10:03 +0100 Subject: [PATCH 0379/3316] Replace custom awserr handling w/ isAWSErr helper --- aws/resource_aws_launch_configuration.go | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index 5ca38a41c76..b27d1860d11 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -6,11 +6,9 @@ import ( "encoding/hex" "fmt" "log" - "strings" "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/hashcode" @@ -436,27 +434,23 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface } createLaunchConfigurationOpts.LaunchConfigurationName = aws.String(lcName) - log.Printf( - "[DEBUG] autoscaling create launch configuration: %s", createLaunchConfigurationOpts) + log.Printf("[DEBUG] autoscaling create launch configuration: %s", createLaunchConfigurationOpts) // IAM profiles can take ~10 seconds to propagate in AWS: // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console err = resource.Retry(90*time.Second, func() *resource.RetryError { _, err := autoscalingconn.CreateLaunchConfiguration(&createLaunchConfigurationOpts) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if strings.Contains(awsErr.Message(), "Invalid IamInstanceProfile") { - return resource.RetryableError(err) - } - if strings.Contains(awsErr.Message(), "You are not authorized to perform this operation") { - return resource.RetryableError(err) - } + if isAWSErr(err, "ValidationError", "Invalid IamInstanceProfile") { + return resource.RetryableError(err) + } + if isAWSErr(err, "ValidationError", "You are not authorized to perform this operation") { + return resource.RetryableError(err) } return resource.NonRetryableError(err) } return nil }) - if err != nil { return fmt.Errorf("Error creating launch configuration: %s", err) } @@ -533,8 +527,7 @@ func resourceAwsLaunchConfigurationDelete(d *schema.ResourceData, meta interface LaunchConfigurationName: aws.String(d.Id()), }) if err != nil { - autoscalingerr, ok := err.(awserr.Error) - if ok && (autoscalingerr.Code() == "InvalidConfiguration.NotFound" || autoscalingerr.Code() == "ValidationError") { + if isAWSErr(err, "InvalidConfiguration.NotFound", "") { log.Printf("[DEBUG] Launch configuration (%s) not found", d.Id()) return nil } From 8bce0da7d698e02987bde35865c91ccc277fefa3 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 29 Mar 2018 13:11:22 +0100 Subject: [PATCH 0380/3316] Log WARNing when resource is gone --- aws/resource_aws_launch_configuration.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index b27d1860d11..f95b7f0f0ab 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -483,6 +483,7 @@ func resourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("Error retrieving launch configuration: %s", err) } if len(describConfs.LaunchConfigurations) == 0 { + log.Printf("[WARN] Launch Configuration (%s) not found, removing from state", d.Id()) d.SetId("") return nil } From edb698ede539aeab13781bf2d63a8b70342d520b Mon Sep 17 00:00:00 2001 From: Stephen Coe Date: Wed, 4 Apr 2018 12:18:26 +0100 Subject: [PATCH 0381/3316] fixing resource --- aws/resource_aws_iam_role.go | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index 906008f6eae..57615514cff 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsIamRole() *schema.Resource { @@ -107,21 +108,10 @@ func resourceAwsIamRole() *schema.Resource { }, "max_session_duration": { - Type: schema.TypeInt, - Optional: true, - Default: 3600, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int64) - if value > 43200 { - errors = append(errors, fmt.Errorf( - "%q cannot be greater than 43200", k)) - } - if value < 3600 { - errors = append(errors, fmt.Errorf( - "%q cannot be less than than 3600", k)) - } - return - }, + Type: schema.TypeInt, + Optional: true, + Default: 3600, + ValidateFunc: validation.IntBetween(3600, 43200), }, }, } @@ -267,15 +257,15 @@ func resourceAwsIamRoleUpdate(d *schema.ResourceData, meta interface{}) error { if d.HasChange("max_session_duration") { roleMaxDurationInput := &iam.UpdateRoleInput{ RoleName: aws.String(d.Id()), - MaxSessionDuration: aws.Int64(d.Get("assume_role_policy").(int64)), + MaxSessionDuration: aws.Int64(int64(d.Get("max_session_duration").(int))), } _, err := iamconn.UpdateRole(roleMaxDurationInput) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { d.SetId("") return nil } - return fmt.Errorf("Error Updating IAM Role (%s) Assume Role Policy: %s", d.Id(), err) + return fmt.Errorf("Error Updating IAM Role (%s) Max Session Duration: %s", d.Id(), err) } } From 862f400c1a3a5fda64dcebbf597df19e785f26f6 Mon Sep 17 00:00:00 2001 From: Stephen Coe Date: Wed, 4 Apr 2018 12:18:43 +0100 Subject: [PATCH 0382/3316] fixing test --- aws/resource_aws_iam_role_test.go | 34 +++++++------------------------ 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index 56af0ddbfbd..2c1419c01ac 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -158,7 +158,7 @@ func TestAccAWSIAMRole_force_detach_policies(t *testing.T) { }) } -func TestAccAWSIAMRole_testMaxSessionDuration(t *testing.T) { +func TestAccAWSIAMRole_MaxSessionDuration(t *testing.T) { var conf iam.GetRoleOutput rName := acctest.RandString(10) @@ -168,25 +168,27 @@ func TestAccAWSIAMRole_testMaxSessionDuration(t *testing.T) { CheckDestroy: testAccCheckAWSRoleDestroy, Steps: []resource.TestStep{ { - Config: testMaxSessionDuration(rName), + Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 3700), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists("aws_iam_role.test", &conf), testAccAddAwsIAMRolePolicy("aws_iam_role.test"), ), }, { - Config: testMaxSessionDuration_too_long(rName), + Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 43201), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists("aws_iam_role.test", &conf), testAccAddAwsIAMRolePolicy("aws_iam_role.test"), ), + ExpectError: regexp.MustCompile(`*.Max Session Duration: 43201`), }, { - Config: testMaxSessionDuration_too_short(rName), + Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 3599), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists("aws_iam_role.test", &conf), testAccAddAwsIAMRolePolicy("aws_iam_role.test"), ), + ExpectError: regexp.MustCompile(`*.Max Session Duration: 3599`), }, }, }) @@ -295,7 +297,7 @@ func testAccAddAwsIAMRolePolicy(n string) resource.TestCheckFunc { } } -func testMaxSessionDuration(rName string) string { +func testAccCheckIAMRoleConfig_MaxSessionDuration(rName string, maxSessionDuration int) string { return fmt.Sprintf(` resource "aws_iam_role" "role" { name = "test-role-%s" @@ -306,28 +308,6 @@ resource "aws_iam_role" "role" { `, rName) } -func testMaxSessionDuration_too_long(rName string) string { - return fmt.Sprintf(` -resource "aws_iam_role" "role" { - name = "test-role-%s" - path = "/" - max_session_duration = 46800 - assume_role_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"ec2.amazonaws.com\"]},\"Action\":[\"sts:AssumeRole\"]}]}" -} -`, rName) -} - -func testMaxSessionDuration_too_short(rName string) string { - return fmt.Sprintf(` -resource "aws_iam_role" "role" { - name = "test-role-%s" - path = "/" - max_session_duration = 300 - assume_role_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"ec2.amazonaws.com\"]},\"Action\":[\"sts:AssumeRole\"]}]}" -} -`, rName) -} - func testAccAWSIAMRoleConfig(rName string) string { return fmt.Sprintf(` resource "aws_iam_role" "role" { From f97095a0ed43ff0e142c4424a0beb8d03253a247 Mon Sep 17 00:00:00 2001 From: Stephen Coe Date: Wed, 4 Apr 2018 12:18:53 +0100 Subject: [PATCH 0383/3316] updating documentation --- website/docs/r/iam_role.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/iam_role.html.markdown b/website/docs/r/iam_role.html.markdown index 8bfabd5161d..8ca59561ae8 100644 --- a/website/docs/r/iam_role.html.markdown +++ b/website/docs/r/iam_role.html.markdown @@ -49,7 +49,7 @@ The following arguments are supported: See [IAM Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) for more information. * `description` - (Optional) The description of the role. -* `max_session_duration` - (Optional) Max duration of a federated role +* `max_session_duration` - (Optional) The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. ## Attributes Reference From 3ce0379da1c67aeb0e8e7f3ff194c48f423749d8 Mon Sep 17 00:00:00 2001 From: Stephen Coe Date: Wed, 4 Apr 2018 12:26:07 +0100 Subject: [PATCH 0384/3316] update regex error --- aws/resource_aws_iam_role_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index 2c1419c01ac..8cf97b3856b 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -180,7 +180,7 @@ func TestAccAWSIAMRole_MaxSessionDuration(t *testing.T) { testAccCheckAWSRoleExists("aws_iam_role.test", &conf), testAccAddAwsIAMRolePolicy("aws_iam_role.test"), ), - ExpectError: regexp.MustCompile(`*.Max Session Duration: 43201`), + ExpectError: regexp.MustCompile(`.*Max Session Duration: 43201`), }, { Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 3599), @@ -188,7 +188,7 @@ func TestAccAWSIAMRole_MaxSessionDuration(t *testing.T) { testAccCheckAWSRoleExists("aws_iam_role.test", &conf), testAccAddAwsIAMRolePolicy("aws_iam_role.test"), ), - ExpectError: regexp.MustCompile(`*.Max Session Duration: 3599`), + ExpectError: regexp.MustCompile(`.*Max Session Duration: 3599`), }, }, }) From b634c10cf5dd702bd2aaa4da4dbff2c0ced034f4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 09:44:11 -0400 Subject: [PATCH 0385/3316] Update CHANGELOG for #3944 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 866c6282e7f..8f1c8713210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] +* resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] * resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] BUG FIXES: From d933edc3d5409dc9273fe07a7373c7d79e5252f9 Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Wed, 4 Apr 2018 16:24:03 +0200 Subject: [PATCH 0386/3316] #931 Renaming resources to align with AWS API Resource action --- aws/provider.go | 2 +- ...ce_aws_ses_identity_notification_topic.go} | 38 +++++++++---------- ...s_ses_identity_notification_topic_test.go} | 34 ++++++++--------- website/aws.erb | 4 +- ... ses_identity_notification_topic.markdown} | 12 +++--- 5 files changed, 45 insertions(+), 45 deletions(-) rename aws/{resource_aws_ses_identity_notification.go => resource_aws_ses_identity_notification_topic.go} (68%) rename aws/{resource_aws_ses_identity_notification_test.go => resource_aws_ses_identity_notification_topic_test.go} (61%) rename website/docs/r/{ses_identity_notification.markdown => ses_identity_notification_topic.markdown} (70%) diff --git a/aws/provider.go b/aws/provider.go index 31f3948b15d..a10026ffeed 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -488,7 +488,7 @@ func Provider() terraform.ResourceProvider { "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification": resourceAwsSesNotification(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), "aws_ses_template": resourceAwsSesTemplate(), "aws_s3_bucket": resourceAwsS3Bucket(), "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), diff --git a/aws/resource_aws_ses_identity_notification.go b/aws/resource_aws_ses_identity_notification_topic.go similarity index 68% rename from aws/resource_aws_ses_identity_notification.go rename to aws/resource_aws_ses_identity_notification_topic.go index 50e29a72252..ac2f1c53a84 100644 --- a/aws/resource_aws_ses_identity_notification.go +++ b/aws/resource_aws_ses_identity_notification_topic.go @@ -11,12 +11,12 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) -func resourceAwsSesNotification() *schema.Resource { +func resourceAwsSesNotificationTopic() *schema.Resource { return &schema.Resource{ - Create: resourceAwsSesNotificationSet, - Read: resourceAwsSesNotificationRead, - Update: resourceAwsSesNotificationSet, - Delete: resourceAwsSesNotificationDelete, + Create: resourceAwsSesNotificationTopicSet, + Read: resourceAwsSesNotificationTopicRead, + Update: resourceAwsSesNotificationTopicSet, + Delete: resourceAwsSesNotificationTopicDelete, Schema: map[string]*schema.Schema{ "topic_arn": { @@ -46,7 +46,7 @@ func resourceAwsSesNotification() *schema.Resource { } } -func resourceAwsSesNotificationSet(d *schema.ResourceData, meta interface{}) error { +func resourceAwsSesNotificationTopicSet(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sesConn notification := d.Get("notification_type").(string) identity := d.Get("identity").(string) @@ -62,19 +62,19 @@ func resourceAwsSesNotificationSet(d *schema.ResourceData, meta interface{}) err d.SetId(fmt.Sprintf("%s|%s", identity, notification)) - log.Printf("[DEBUG] Setting SES Identity Notification: %#v", setOpts) + log.Printf("[DEBUG] Setting SES Identity Notification Topic: %#v", setOpts) if _, err := conn.SetIdentityNotificationTopic(setOpts); err != nil { - return fmt.Errorf("Error setting SES Identity Notification: %s", err) + return fmt.Errorf("Error setting SES Identity Notification Topic: %s", err) } - return resourceAwsSesNotificationRead(d, meta) + return resourceAwsSesNotificationTopicRead(d, meta) } -func resourceAwsSesNotificationRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsSesNotificationTopicRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sesConn - identity, notificationType, err := decodeSesIdentityNotificationId(d.Id()) + identity, notificationType, err := decodeSesIdentityNotificationTopicId(d.Id()) if err != nil { return err } @@ -83,12 +83,12 @@ func resourceAwsSesNotificationRead(d *schema.ResourceData, meta interface{}) er Identities: []*string{aws.String(identity)}, } - log.Printf("[DEBUG] Reading SES Identity Notification Attributes: %#v", getOpts) + log.Printf("[DEBUG] Reading SES Identity Notification Topic Attributes: %#v", getOpts) response, err := conn.GetIdentityNotificationAttributes(getOpts) if err != nil { - return fmt.Errorf("Error reading SES Identity Notification: %s", err) + return fmt.Errorf("Error reading SES Identity Notification Topic: %s", err) } notificationAttributes := response.NotificationAttributes[identity] @@ -104,10 +104,10 @@ func resourceAwsSesNotificationRead(d *schema.ResourceData, meta interface{}) er return nil } -func resourceAwsSesNotificationDelete(d *schema.ResourceData, meta interface{}) error { +func resourceAwsSesNotificationTopicDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sesConn - identity, notificationType, err := decodeSesIdentityNotificationId(d.Id()) + identity, notificationType, err := decodeSesIdentityNotificationTopicId(d.Id()) if err != nil { return err } @@ -118,16 +118,16 @@ func resourceAwsSesNotificationDelete(d *schema.ResourceData, meta interface{}) SnsTopic: nil, } - log.Printf("[DEBUG] Deleting SES Identity Notification: %#v", setOpts) + log.Printf("[DEBUG] Deleting SES Identity Notification Topic: %#v", setOpts) if _, err := conn.SetIdentityNotificationTopic(setOpts); err != nil { - return fmt.Errorf("Error deleting SES Identity Notification: %s", err) + return fmt.Errorf("Error deleting SES Identity Notification Topic: %s", err) } - return resourceAwsSesNotificationRead(d, meta) + return resourceAwsSesNotificationTopicRead(d, meta) } -func decodeSesIdentityNotificationId(id string) (string, string, error) { +func decodeSesIdentityNotificationTopicId(id string) (string, string, error) { parts := strings.Split(id, "|") if len(parts) != 2 { return "", "", fmt.Errorf("Unexpected format of ID (%q), expected IDENTITY|TYPE", id) diff --git a/aws/resource_aws_ses_identity_notification_test.go b/aws/resource_aws_ses_identity_notification_topic_test.go similarity index 61% rename from aws/resource_aws_ses_identity_notification_test.go rename to aws/resource_aws_ses_identity_notification_topic_test.go index f64cdde7405..87fdb59ac72 100644 --- a/aws/resource_aws_ses_identity_notification_test.go +++ b/aws/resource_aws_ses_identity_notification_topic_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAwsSESIdentityNotification_basic(t *testing.T) { +func TestAccAwsSESIdentityNotificationTopic_basic(t *testing.T) { domain := fmt.Sprintf( "%s.terraformtesting.com", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) @@ -22,29 +22,29 @@ func TestAccAwsSESIdentityNotification_basic(t *testing.T) { testAccPreCheck(t) }, Providers: testAccProviders, - CheckDestroy: testAccCheckAwsSESIdentityNotificationDestroy, + CheckDestroy: testAccCheckAwsSESIdentityNotificationTopicDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: fmt.Sprintf(testAccAwsSESIdentityNotificationConfig_basic, domain), + Config: fmt.Sprintf(testAccAwsSESIdentityNotificationTopicConfig_basic, domain), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsSESIdentityNotificationExists("aws_ses_identity_notification.test"), + testAccCheckAwsSESIdentityNotificationTopicExists("aws_ses_identity_notification_topic.test"), ), }, resource.TestStep{ - Config: fmt.Sprintf(testAccAwsSESIdentityNotificationConfig_update, domain, topicName), + Config: fmt.Sprintf(testAccAwsSESIdentityNotificationTopicConfig_update, domain, topicName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsSESIdentityNotificationExists("aws_ses_identity_notification.test"), + testAccCheckAwsSESIdentityNotificationTopicExists("aws_ses_identity_notification_topic.test"), ), }, }, }) } -func testAccCheckAwsSESIdentityNotificationDestroy(s *terraform.State) error { +func testAccCheckAwsSESIdentityNotificationTopicDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).sesConn for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_ses_identity_notification" { + if rs.Type != "aws_ses_identity_notification_topic" { continue } @@ -59,22 +59,22 @@ func testAccCheckAwsSESIdentityNotificationDestroy(s *terraform.State) error { } if response.NotificationAttributes[identity] != nil { - return fmt.Errorf("SES Identity Notification %s still exists. Failing!", identity) + return fmt.Errorf("SES Identity Notification Topic %s still exists. Failing!", identity) } } return nil } -func testAccCheckAwsSESIdentityNotificationExists(n string) resource.TestCheckFunc { +func testAccCheckAwsSESIdentityNotificationTopicExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { - return fmt.Errorf("SES Identity Notification not found: %s", n) + return fmt.Errorf("SES Identity Notification Topic not found: %s", n) } if rs.Primary.ID == "" { - return fmt.Errorf("SES Identity Notification identity not set") + return fmt.Errorf("SES Identity Notification Topic identity not set") } identity := rs.Primary.ID @@ -90,15 +90,15 @@ func testAccCheckAwsSESIdentityNotificationExists(n string) resource.TestCheckFu } if response.NotificationAttributes[identity] == nil { - return fmt.Errorf("SES Identity Notification %s not found in AWS", identity) + return fmt.Errorf("SES Identity Notification Topic %s not found in AWS", identity) } return nil } } -const testAccAwsSESIdentityNotificationConfig_basic = ` -resource "aws_ses_identity_notification" "test" { +const testAccAwsSESIdentityNotificationTopicConfig_basic = ` +resource "aws_ses_identity_notification_topic" "test" { identity = "${aws_ses_domain_identity.test.arn}" notification_type = "Complaint" } @@ -107,8 +107,8 @@ resource "aws_ses_domain_identity" "test" { domain = "%s" } ` -const testAccAwsSESIdentityNotificationConfig_update = ` -resource "aws_ses_identity_notification" "test" { +const testAccAwsSESIdentityNotificationTopicConfig_update = ` +resource "aws_ses_identity_notification_topic" "test" { topic_arn = "${aws_sns_topic.test.arn}" identity = "${aws_ses_domain_identity.test.arn}" notification_type = "Complaint" diff --git a/website/aws.erb b/website/aws.erb index 88644e51377..7af9c5a25e6 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1677,8 +1677,8 @@ aws_ses_event_destination - > - aws_ses_identity_notification + > + aws_ses_identity_notification_topic > diff --git a/website/docs/r/ses_identity_notification.markdown b/website/docs/r/ses_identity_notification_topic.markdown similarity index 70% rename from website/docs/r/ses_identity_notification.markdown rename to website/docs/r/ses_identity_notification_topic.markdown index 29fca9ee9b2..594bbbd6779 100644 --- a/website/docs/r/ses_identity_notification.markdown +++ b/website/docs/r/ses_identity_notification_topic.markdown @@ -1,19 +1,19 @@ --- layout: "aws" -page_title: "AWS: aws_ses_identity_notification" -sidebar_current: "docs-aws-resource-ses-identity-notification" +page_title: "AWS: aws_ses_identity_notification_topic" +sidebar_current: "docs-aws-resource-ses-identity-notification-topic" description: |- - Setting AWS SES Identity Notification + Setting AWS SES Identity Notification Topic --- -# ses_identity_notification +# ses_identity_notification_topic -Resource for managing SES Identity Notifications +Resource for managing SES Identity Notification Topics ## Example Usage ```hcl -resource "aws_ses_identity_notification" "test" { +resource "aws_ses_identity_notification_topic" "test" { topic_arn = "${aws_sns_topic.example.arn}" notification_type = "Bounce" identity = "${aws_ses_domain_identity.example.domain}" From b4aa64e94c40236bfc4b598349276442427d3eaf Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 10:30:32 -0400 Subject: [PATCH 0387/3316] Update CHANGELOG for #2987 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f1c8713210..d0d7aaaa93c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] +* resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support [GH-2987] * resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] * resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] From 7817071bfabcb2224211b9df0be108e86f006f80 Mon Sep 17 00:00:00 2001 From: Henrik Hussfelt Date: Wed, 4 Apr 2018 17:08:08 +0200 Subject: [PATCH 0388/3316] #931 Fixing issue with passing the concatenated ID, instead of identity --- aws/resource_aws_ses_identity_notification_topic_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ses_identity_notification_topic_test.go b/aws/resource_aws_ses_identity_notification_topic_test.go index 87fdb59ac72..b07ebce0769 100644 --- a/aws/resource_aws_ses_identity_notification_topic_test.go +++ b/aws/resource_aws_ses_identity_notification_topic_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "testing" "github.com/aws/aws-sdk-go/aws" @@ -48,11 +49,13 @@ func testAccCheckAwsSESIdentityNotificationTopicDestroy(s *terraform.State) erro continue } - identity := rs.Primary.ID + identity := rs.Primary.Attributes["identity"] params := &ses.GetIdentityNotificationAttributesInput{ Identities: []*string{aws.String(identity)}, } + log.Printf("[DEBUG] Testing SES Identity Notification Topic Destroy: %#v", params) + response, err := conn.GetIdentityNotificationAttributes(params) if err != nil { return err @@ -77,13 +80,15 @@ func testAccCheckAwsSESIdentityNotificationTopicExists(n string) resource.TestCh return fmt.Errorf("SES Identity Notification Topic identity not set") } - identity := rs.Primary.ID + identity := rs.Primary.Attributes["identity"] conn := testAccProvider.Meta().(*AWSClient).sesConn params := &ses.GetIdentityNotificationAttributesInput{ Identities: []*string{aws.String(identity)}, } + log.Printf("[DEBUG] Testing SES Identity Notification Topic Exists: %#v", params) + response, err := conn.GetIdentityNotificationAttributes(params) if err != nil { return err From 137b4bb034c62f5e6b4d69b7646e4e25406daef2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 11:31:13 -0400 Subject: [PATCH 0389/3316] resource/aws_cognito_user_pool: Trim custom: prefix of developer_only_attribute = false schema attributes --- aws/resource_aws_cognito_user_pool_test.go | 24 +++++++++++++++++++++- aws/structure.go | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_cognito_user_pool_test.go b/aws/resource_aws_cognito_user_pool_test.go index 4f2f14d68b3..de730b2a25a 100644 --- a/aws/resource_aws_cognito_user_pool_test.go +++ b/aws/resource_aws_cognito_user_pool_test.go @@ -403,7 +403,7 @@ func TestAccAWSCognitoUserPool_withSchemaAttributes(t *testing.T) { { Config: testAccAWSCognitoUserPoolConfig_withSchemaAttributesUpdated(name), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.#", "2"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.#", "3"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2078884933.attribute_data_type", "String"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2078884933.developer_only_attribute", "false"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2078884933.mutable", "false"), @@ -422,6 +422,15 @@ func TestAccAWSCognitoUserPool_withSchemaAttributes(t *testing.T) { resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2718111653.number_attribute_constraints.0.max_value", "6"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2718111653.required", "false"), resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2718111653.string_attribute_constraints.#", "0"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.attribute_data_type", "Number"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.developer_only_attribute", "false"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.mutable", "true"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.name", "mynondevnumber"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.number_attribute_constraints.#", "1"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.number_attribute_constraints.0.min_value", "2"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.number_attribute_constraints.0.max_value", "6"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.required", "false"), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "schema.2753746449.string_attribute_constraints.#", "0"), ), }, { @@ -916,6 +925,19 @@ resource "aws_cognito_user_pool" "main" { max_value = 6 } } + + schema { + attribute_data_type = "Number" + developer_only_attribute = false + mutable = true + name = "mynondevnumber" + required = false + + number_attribute_constraints { + min_value = 2 + max_value = 6 + } + } }`, name) } diff --git a/aws/structure.go b/aws/structure.go index 0d176c5b45f..7d013608033 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -3022,7 +3022,7 @@ func flattenCognitoUserPoolSchema(configuredAttributes, inputs []*cognitoidentit "attribute_data_type": aws.StringValue(input.AttributeDataType), "developer_only_attribute": aws.BoolValue(input.DeveloperOnlyAttribute), "mutable": aws.BoolValue(input.Mutable), - "name": strings.TrimPrefix(aws.StringValue(input.Name), "dev:custom:"), + "name": strings.TrimPrefix(strings.TrimPrefix(aws.StringValue(input.Name), "dev:"), "custom:"), "required": aws.BoolValue(input.Required), } From 2a5895689627e23dfa659dd9c7f67a9feb268bfb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 10:49:55 -0400 Subject: [PATCH 0390/3316] tests/resource/aws_kinesis_firehose_delivery_stream: Acceptance test Elasticsearch processing configuration --- ...s_kinesis_firehose_delivery_stream_test.go | 47 ++++++++++++++++--- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index 4f0f5e84874..8714432eac1 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -390,15 +390,34 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates(t *testi var stream firehose.DeliveryStreamDescription ri := acctest.RandInt() + rString := acctest.RandString(8) + funcName := fmt.Sprintf("aws_kinesis_firehose_delivery_stream_test_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_%s", rString) + roleName := fmt.Sprintf("tf_acc_role_%s", rString) preConfig := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_ElasticsearchBasic, ri, ri, ri, ri, ri, ri) - postConfig := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_ElasticsearchUpdate, - ri, ri, ri, ri, ri, ri) + postConfig := testAccFirehoseAWSLambdaConfigBasic(funcName, policyName, roleName) + + fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_ElasticsearchUpdate, + ri, ri, ri, ri, ri, ri) updatedElasticSearchConfig := &firehose.ElasticsearchDestinationDescription{ BufferingHints: &firehose.ElasticsearchBufferingHints{ IntervalInSeconds: aws.Int64(500), }, + ProcessingConfiguration: &firehose.ProcessingConfiguration{ + Enabled: aws.Bool(true), + Processors: []*firehose.Processor{ + &firehose.Processor{ + Type: aws.String("Lambda"), + Parameters: []*firehose.ProcessorParameter{ + &firehose.ProcessorParameter{ + ParameterName: aws.String("LambdaArn"), + ParameterValue: aws.String("valueNotTested"), + }, + }, + }, + }, + }, } resource.Test(t, resource.TestCase{ @@ -558,15 +577,21 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del if elasticsearchConfig != nil { es := elasticsearchConfig.(*firehose.ElasticsearchDestinationDescription) // Range over the Stream Destinations, looking for the matching Elasticsearch destination - var match bool + var match, processingConfigMatch bool for _, d := range stream.Destinations { if d.ElasticsearchDestinationDescription != nil { match = true + if es.ProcessingConfiguration != nil && d.ElasticsearchDestinationDescription.ProcessingConfiguration != nil { + processingConfigMatch = len(es.ProcessingConfiguration.Processors) == len(d.ElasticsearchDestinationDescription.ProcessingConfiguration.Processors) + } } } if !match { return fmt.Errorf("Mismatch Elasticsearch Buffering Interval, expected: %s, got: %s", es, stream.Destinations) } + if !processingConfigMatch { + return fmt.Errorf("Mismatch Elasticsearch ProcessingConfiguration.Processors count, expected: %s, got: %s", es, stream.Destinations) + } } if splunkConfig != nil { @@ -585,9 +610,9 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del if *d.SplunkDestinationDescription.S3BackupMode == *s.S3BackupMode { matchS3BackupMode = true } - - processingConfigMatch = len(s.ProcessingConfiguration.Processors) == len(d.SplunkDestinationDescription.ProcessingConfiguration.Processors) - + if s.ProcessingConfiguration != nil && d.SplunkDestinationDescription.ProcessingConfiguration != nil { + processingConfigMatch = len(s.ProcessingConfiguration.Processors) == len(d.SplunkDestinationDescription.ProcessingConfiguration.Processors) + } } } if !matchHECEndpointType || !matchHECAcknowledgmentTimeoutInSeconds || !matchS3BackupMode { @@ -1275,6 +1300,16 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream_es" { index_name = "test" type_name = "test" buffering_interval = 500 + processing_configuration = [{ + enabled = "false", + processors = [{ + type = "Lambda" + parameters = [{ + parameter_name = "LambdaArn" + parameter_value = "${aws_lambda_function.lambda_function_test.arn}:$LATEST" + }] + }] + }] } }` From 2cf7de628f77bcd4bf8183c546cf1164a4abdb60 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 12:51:45 -0400 Subject: [PATCH 0391/3316] Update CHANGELOG for #3621 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0d7aaaa93c..7326d1ab5e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] +* resource/aws_kinesis_firehose_delivery_stream: Add Elasticsearch destination processing configuration support [GH-3621] * resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support [GH-2987] * resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] * resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] From 068a348309ebac98b40f627c005cc6ede04c8199 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 14:11:26 -0400 Subject: [PATCH 0392/3316] Update CHANGELOG for #2640 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7326d1ab5e3..00b96016857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.14.0 (Unreleased) +FEATURES: + +* **New Resource:** `aws_ses_identity_notification_topic` [GH-2640] + ENHANCEMENTS: * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] From ea3411c453781d250e14671d9d6981bbdb8178ae Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 14:01:45 -0400 Subject: [PATCH 0393/3316] resource/aws_kinesis_firehose_delivery_stream: Prevent nil dereference crashes and ensure attributes are flattened correctly --- ...ce_aws_kinesis_firehose_delivery_stream.go | 282 ++++++++++-------- ...s_kinesis_firehose_delivery_stream_test.go | 2 +- 2 files changed, 162 insertions(+), 122 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 6088430a4dc..90dbd80f3ec 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -174,38 +174,156 @@ func cloudwatchLoggingOptionsHash(v interface{}) int { return hashcode.String(buf.String()) } -func flattenCloudwatchLoggingOptions(clo firehose.CloudWatchLoggingOptions) *schema.Set { +func flattenCloudwatchLoggingOptions(clo *firehose.CloudWatchLoggingOptions) *schema.Set { + if clo == nil { + return nil + } + cloudwatchLoggingOptions := map[string]interface{}{ - "enabled": *clo.Enabled, + "enabled": aws.BoolValue(clo.Enabled), } - if *clo.Enabled { - cloudwatchLoggingOptions["log_group_name"] = *clo.LogGroupName - cloudwatchLoggingOptions["log_stream_name"] = *clo.LogStreamName + if aws.BoolValue(clo.Enabled) { + cloudwatchLoggingOptions["log_group_name"] = aws.StringValue(clo.LogGroupName) + cloudwatchLoggingOptions["log_stream_name"] = aws.StringValue(clo.LogStreamName) } return schema.NewSet(cloudwatchLoggingOptionsHash, []interface{}{cloudwatchLoggingOptions}) } -func flattenFirehoseS3Configuration(s3 firehose.S3DestinationDescription) []interface{} { - s3Configuration := map[string]interface{}{ - "role_arn": *s3.RoleARN, - "bucket_arn": *s3.BucketARN, - "buffer_size": *s3.BufferingHints.SizeInMBs, - "buffer_interval": *s3.BufferingHints.IntervalInSeconds, - "compression_format": *s3.CompressionFormat, +func flattenFirehoseElasticsearchConfiguration(description *firehose.ElasticsearchDestinationDescription) []map[string]interface{} { + if description == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), + "domain_arn": aws.StringValue(description.DomainARN), + "role_arn": aws.StringValue(description.RoleARN), + "type_name": aws.StringValue(description.TypeName), + "index_name": aws.StringValue(description.IndexName), + "s3_backup_mode": aws.StringValue(description.S3BackupMode), + "index_rotation_period": aws.StringValue(description.IndexRotationPeriod), + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), + } + + if description.BufferingHints != nil { + m["buffering_interval"] = int(aws.Int64Value(description.BufferingHints.IntervalInSeconds)) + m["buffering_size"] = int(aws.Int64Value(description.BufferingHints.SizeInMBs)) + } + + if description.RetryOptions != nil { + m["retry_duration"] = int(aws.Int64Value(description.RetryOptions.DurationInSeconds)) + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseExtendedS3Configuration(description *firehose.ExtendedS3DestinationDescription) []map[string]interface{} { + if description == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "bucket_arn": aws.StringValue(description.BucketARN), + "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), + "compression_format": aws.StringValue(description.CompressionFormat), + "prefix": aws.StringValue(description.Prefix), + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), + "role_arn": aws.StringValue(description.RoleARN), + "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), + "s3_backup_mode": aws.StringValue(description.S3BackupMode), + } + + if description.BufferingHints != nil { + m["buffer_interval"] = int(aws.Int64Value(description.BufferingHints.IntervalInSeconds)) + m["buffer_size"] = int(aws.Int64Value(description.BufferingHints.SizeInMBs)) + } + + if description.EncryptionConfiguration != nil && description.EncryptionConfiguration.KMSEncryptionConfig != nil { + m["kms_key_arn"] = aws.StringValue(description.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN) + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseRedshiftConfiguration(description *firehose.RedshiftDestinationDescription, configuredPassword string) []map[string]interface{} { + if description == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), + "cluster_jdbcurl": aws.StringValue(description.ClusterJDBCURL), + "password": configuredPassword, + "role_arn": aws.StringValue(description.RoleARN), + "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), + "s3_backup_mode": aws.StringValue(description.S3BackupMode), + "username": aws.StringValue(description.Username), + } + + if description.CopyCommand != nil { + m["copy_options"] = aws.StringValue(description.CopyCommand.CopyOptions) + m["data_table_columns"] = aws.StringValue(description.CopyCommand.DataTableColumns) + m["data_table_name"] = aws.StringValue(description.CopyCommand.DataTableName) + } + + if description.RetryOptions != nil { + m["retry_duration"] = int(aws.Int64Value(description.RetryOptions.DurationInSeconds)) + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseSplunkConfiguration(description *firehose.SplunkDestinationDescription) []map[string]interface{} { + if description == nil { + return []map[string]interface{}{} + } + m := map[string]interface{}{ + "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), + "hec_acknowledgment_timeout": int(aws.Int64Value(description.HECAcknowledgmentTimeoutInSeconds)), + "hec_endpoint_type": aws.StringValue(description.HECEndpointType), + "hec_endpoint": aws.StringValue(description.HECEndpoint), + "hec_token": aws.StringValue(description.HECToken), + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, ""), + "s3_backup_mode": aws.StringValue(description.S3BackupMode), + } + + if description.RetryOptions != nil { + m["retry_duration"] = int(aws.Int64Value(description.RetryOptions.DurationInSeconds)) + } + + return []map[string]interface{}{m} +} + +func flattenFirehoseS3Configuration(description *firehose.S3DestinationDescription) []map[string]interface{} { + if description == nil { + return []map[string]interface{}{} } - if s3.CloudWatchLoggingOptions != nil { - s3Configuration["cloudwatch_logging_options"] = flattenCloudwatchLoggingOptions(*s3.CloudWatchLoggingOptions) + + m := map[string]interface{}{ + "bucket_arn": aws.StringValue(description.BucketARN), + "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), + "compression_format": aws.StringValue(description.CompressionFormat), + "prefix": aws.StringValue(description.Prefix), + "role_arn": aws.StringValue(description.RoleARN), } - if s3.EncryptionConfiguration.KMSEncryptionConfig != nil { - s3Configuration["kms_key_arn"] = *s3.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN + + if description.BufferingHints != nil { + m["buffer_interval"] = int(aws.Int64Value(description.BufferingHints.IntervalInSeconds)) + m["buffer_size"] = int(aws.Int64Value(description.BufferingHints.SizeInMBs)) } - if s3.Prefix != nil { - s3Configuration["prefix"] = *s3.Prefix + + if description.EncryptionConfiguration != nil && description.EncryptionConfiguration.KMSEncryptionConfig != nil { + m["kms_key_arn"] = aws.StringValue(description.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN) } - return []interface{}{s3Configuration} + + return []map[string]interface{}{m} } -func flattenProcessingConfiguration(pc firehose.ProcessingConfiguration, roleArn string) []map[string]interface{} { +func flattenProcessingConfiguration(pc *firehose.ProcessingConfiguration, roleArn string) []map[string]interface{} { + if pc == nil { + return []map[string]interface{}{} + } + processingConfiguration := make([]map[string]interface{}, 1) // It is necessary to explicitly filter this out @@ -220,11 +338,12 @@ func flattenProcessingConfiguration(pc firehose.ProcessingConfiguration, roleArn processors := make([]interface{}, len(pc.Processors), len(pc.Processors)) for i, p := range pc.Processors { - t := *p.Type + t := aws.StringValue(p.Type) parameters := make([]interface{}, 0) for _, params := range p.Parameters { - name, value := *params.ParameterName, *params.ParameterValue + name := aws.StringValue(params.ParameterName) + value := aws.StringValue(params.ParameterValue) if t == firehose.ProcessorTypeLambda { // Ignore defaults @@ -245,7 +364,7 @@ func flattenProcessingConfiguration(pc firehose.ProcessingConfiguration, roleArn } } processingConfiguration[0] = map[string]interface{}{ - "enabled": *pc.Enabled, + "enabled": aws.BoolValue(pc.Enabled), "processors": processors, } return processingConfiguration @@ -259,120 +378,41 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De destination := s.Destinations[0] if destination.RedshiftDestinationDescription != nil { d.Set("destination", "redshift") - password := d.Get("redshift_configuration.0.password").(string) - - redshiftConfiguration := map[string]interface{}{ - "cluster_jdbcurl": *destination.RedshiftDestinationDescription.ClusterJDBCURL, - "role_arn": *destination.RedshiftDestinationDescription.RoleARN, - "username": *destination.RedshiftDestinationDescription.Username, - "password": password, - "data_table_name": *destination.RedshiftDestinationDescription.CopyCommand.DataTableName, - "copy_options": *destination.RedshiftDestinationDescription.CopyCommand.CopyOptions, - "data_table_columns": *destination.RedshiftDestinationDescription.CopyCommand.DataTableColumns, - "s3_backup_mode": *destination.RedshiftDestinationDescription.S3BackupMode, - "retry_duration": *destination.RedshiftDestinationDescription.RetryOptions.DurationInSeconds, + configuredPassword := d.Get("redshift_configuration.0.password").(string) + if err := d.Set("redshift_configuration", flattenFirehoseRedshiftConfiguration(destination.RedshiftDestinationDescription, configuredPassword)); err != nil { + return fmt.Errorf("error setting redshift_configuration: %s", err) } - - if v := destination.RedshiftDestinationDescription.CloudWatchLoggingOptions; v != nil { - redshiftConfiguration["cloudwatch_logging_options"] = flattenCloudwatchLoggingOptions(*v) - } - - if v := destination.RedshiftDestinationDescription.S3BackupDescription; v != nil { - redshiftConfiguration["s3_backup_configuration"] = flattenFirehoseS3Configuration(*v) + if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.RedshiftDestinationDescription.S3DestinationDescription)); err != nil { + return fmt.Errorf("error setting s3_configuration: %s", err) } - - redshiftConfList := make([]map[string]interface{}, 1) - redshiftConfList[0] = redshiftConfiguration - d.Set("redshift_configuration", redshiftConfList) - d.Set("s3_configuration", flattenFirehoseS3Configuration(*destination.RedshiftDestinationDescription.S3DestinationDescription)) - } else if destination.ElasticsearchDestinationDescription != nil { d.Set("destination", "elasticsearch") - - roleArn := *destination.ElasticsearchDestinationDescription.RoleARN - elasticsearchConfiguration := map[string]interface{}{ - "buffering_interval": *destination.ElasticsearchDestinationDescription.BufferingHints.IntervalInSeconds, - "buffering_size": *destination.ElasticsearchDestinationDescription.BufferingHints.SizeInMBs, - "domain_arn": *destination.ElasticsearchDestinationDescription.DomainARN, - "role_arn": *destination.ElasticsearchDestinationDescription.RoleARN, - "type_name": *destination.ElasticsearchDestinationDescription.TypeName, - "index_name": *destination.ElasticsearchDestinationDescription.IndexName, - "s3_backup_mode": *destination.ElasticsearchDestinationDescription.S3BackupMode, - "retry_duration": *destination.ElasticsearchDestinationDescription.RetryOptions.DurationInSeconds, - "index_rotation_period": *destination.ElasticsearchDestinationDescription.IndexRotationPeriod, + if err := d.Set("elasticsearch_configuration", flattenFirehoseElasticsearchConfiguration(destination.ElasticsearchDestinationDescription)); err != nil { + return fmt.Errorf("error setting elasticsearch_configuration: %s", err) } - - if v := destination.ElasticsearchDestinationDescription.CloudWatchLoggingOptions; v != nil { - elasticsearchConfiguration["cloudwatch_logging_options"] = flattenCloudwatchLoggingOptions(*v) + if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.ElasticsearchDestinationDescription.S3DestinationDescription)); err != nil { + return fmt.Errorf("error setting s3_configuration: %s", err) } - - if v := destination.ElasticsearchDestinationDescription.ProcessingConfiguration; v != nil { - elasticsearchConfiguration["processing_configuration"] = flattenProcessingConfiguration(*v, roleArn) - } - - elasticsearchConfList := make([]map[string]interface{}, 1) - elasticsearchConfList[0] = elasticsearchConfiguration - d.Set("elasticsearch_configuration", elasticsearchConfList) - d.Set("s3_configuration", flattenFirehoseS3Configuration(*destination.ElasticsearchDestinationDescription.S3DestinationDescription)) } else if destination.SplunkDestinationDescription != nil { d.Set("destination", "splunk") - - splunkConfiguration := map[string]interface{}{ - "hec_acknowledgment_timeout": *destination.SplunkDestinationDescription.HECAcknowledgmentTimeoutInSeconds, - "hec_endpoint": *destination.SplunkDestinationDescription.HECEndpoint, - "hec_endpoint_type": *destination.SplunkDestinationDescription.HECEndpointType, - "hec_token": *destination.SplunkDestinationDescription.HECToken, - "s3_backup_mode": *destination.SplunkDestinationDescription.S3BackupMode, - "retry_duration": *destination.SplunkDestinationDescription.RetryOptions.DurationInSeconds, + if err := d.Set("splunk_configuration", flattenFirehoseSplunkConfiguration(destination.SplunkDestinationDescription)); err != nil { + return fmt.Errorf("error setting splunk_configuration: %s", err) } - - if v := destination.SplunkDestinationDescription.ProcessingConfiguration; v != nil { - splunkConfiguration["processing_configuration"] = v + if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.SplunkDestinationDescription.S3DestinationDescription)); err != nil { + return fmt.Errorf("error setting s3_configuration: %s", err) } - - if v := destination.SplunkDestinationDescription.CloudWatchLoggingOptions; v != nil { - splunkConfiguration["cloudwatch_logging_options"] = flattenCloudwatchLoggingOptions(*v) - } - - splunkConfList := make([]map[string]interface{}, 1) - splunkConfList[0] = splunkConfiguration - d.Set("splunk_configuration", splunkConfList) - d.Set("s3_configuration", flattenFirehoseS3Configuration(*destination.SplunkDestinationDescription.S3DestinationDescription)) } else if d.Get("destination").(string) == "s3" { d.Set("destination", "s3") - d.Set("s3_configuration", flattenFirehoseS3Configuration(*destination.S3DestinationDescription)) + if err := d.Set("s3_configuration", flattenFirehoseS3Configuration(destination.S3DestinationDescription)); err != nil { + return fmt.Errorf("error setting s3_configuration: %s", err) + } } else { d.Set("destination", "extended_s3") - - roleArn := *destination.ExtendedS3DestinationDescription.RoleARN - extendedS3Configuration := map[string]interface{}{ - "buffer_interval": *destination.ExtendedS3DestinationDescription.BufferingHints.IntervalInSeconds, - "buffer_size": *destination.ExtendedS3DestinationDescription.BufferingHints.SizeInMBs, - "bucket_arn": *destination.ExtendedS3DestinationDescription.BucketARN, - "role_arn": roleArn, - "compression_format": *destination.ExtendedS3DestinationDescription.CompressionFormat, - "prefix": *destination.ExtendedS3DestinationDescription.Prefix, - "s3_backup_mode": *destination.ExtendedS3DestinationDescription.S3BackupMode, - "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(*destination.ExtendedS3DestinationDescription.CloudWatchLoggingOptions), - } - - if v := destination.ExtendedS3DestinationDescription.EncryptionConfiguration.KMSEncryptionConfig; v != nil { - extendedS3Configuration["kms_key_arn"] = *v.AWSKMSKeyARN - } - - if v := destination.ExtendedS3DestinationDescription.ProcessingConfiguration; v != nil { - extendedS3Configuration["processing_configuration"] = flattenProcessingConfiguration(*v, roleArn) - } - - if v := destination.ExtendedS3DestinationDescription.S3BackupDescription; v != nil { - extendedS3Configuration["s3_backup_configuration"] = flattenFirehoseS3Configuration(*v) + if err := d.Set("extended_s3_configuration", flattenFirehoseExtendedS3Configuration(destination.ExtendedS3DestinationDescription)); err != nil { + return fmt.Errorf("error setting extended_s3_configuration: %s", err) } - - extendedS3ConfList := make([]map[string]interface{}, 1) - extendedS3ConfList[0] = extendedS3Configuration - d.Set("extended_s3_configuration", extendedS3ConfList) } - d.Set("destination_id", *destination.DestinationId) + d.Set("destination_id", destination.DestinationId) } return nil } diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index 8714432eac1..963f0b54d1c 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -1234,7 +1234,7 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { }, { parameter_name = "BufferIntervalInSeconds" - parameter_value = 60 + parameter_value = 120 } ] } From ede3af6491f287f162e0ec9f61e0b945c06aabd2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 14:57:05 -0400 Subject: [PATCH 0394/3316] resource/aws_wafregional_rule: Validate all predicate types --- aws/resource_aws_wafregional_rule.go | 12 +++++++----- website/docs/r/wafregional_rule.html.markdown | 12 ++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_wafregional_rule.go b/aws/resource_aws_wafregional_rule.go index 24bc1d11fa5..10de0664f97 100644 --- a/aws/resource_aws_wafregional_rule.go +++ b/aws/resource_aws_wafregional_rule.go @@ -48,11 +48,13 @@ func resourceAwsWafRegionalRule() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - "IPMatch", - "ByteMatch", - "SqlInjectionMatch", - "SizeConstraint", - "XssMatch", + wafregional.PredicateTypeByteMatch, + wafregional.PredicateTypeGeoMatch, + wafregional.PredicateTypeIpmatch, + wafregional.PredicateTypeRegexMatch, + wafregional.PredicateTypeSizeConstraint, + wafregional.PredicateTypeSqlInjectionMatch, + wafregional.PredicateTypeXssMatch, }, false), }, }, diff --git a/website/docs/r/wafregional_rule.html.markdown b/website/docs/r/wafregional_rule.html.markdown index e879cf89299..828d36c98a9 100644 --- a/website/docs/r/wafregional_rule.html.markdown +++ b/website/docs/r/wafregional_rule.html.markdown @@ -6,7 +6,7 @@ description: |- Provides an AWS WAF Regional rule resource for use with ALB. --- -# aws\_wafregional\_rule +# aws_wafregional_rule Provides an WAF Regional Rule Resource for use with Application Load Balancer. @@ -15,7 +15,7 @@ Provides an WAF Regional Rule Resource for use with Application Load Balancer. ```hcl resource "aws_wafregional_ipset" "ipset" { name = "tfIPSet" - + ip_set_descriptor { type = "IPV4" value = "192.0.7.0/24" @@ -25,7 +25,7 @@ resource "aws_wafregional_ipset" "ipset" { resource "aws_wafregional_rule" "wafrule" { name = "tfWAFRule" metric_name = "tfWAFRule" - + predicate { type = "IPMatch" data_id = "${aws_wafregional_ipset.ipset.id}" @@ -40,7 +40,7 @@ The following arguments are supported: * `name` - (Required) The name or description of the rule. * `metric_name` - (Required) The name or description for the Amazon CloudWatch metric of this rule. -* `predicate` - (Optional) The `ByteMatchSet`, `IPSet`, `SizeConstraintSet`, `SqlInjectionMatchSet`, or `XssMatchSet` objects to include in a rule. +* `predicate` - (Optional) The objects to include in a rule. ## Nested Fields @@ -50,9 +50,9 @@ See [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-pr #### Arguments -* `type` - (Required) The type of predicate in a rule, such as an IPSet (IPMatch) +* `type` - (Required) The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch` * `data_id` - (Required) The unique identifier of a predicate, such as the ID of a `ByteMatchSet` or `IPSet`. -* `negated` - (Required) Whether to use the settings or the negated settings that you specified in the `ByteMatchSet`, `IPSet`, `SizeConstraintSet`, `SqlInjectionMatchSet`, or `XssMatchSet` objects. +* `negated` - (Required) Whether to use the settings or the negated settings that you specified in the objects. ## Remarks From a1ffef71329eae556458008c1549106b0db78e52 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 15:25:30 -0400 Subject: [PATCH 0395/3316] deps: Bump aws-sdk-go@v1.13.28 and vendor acmpca, fms, and secretsmanager SDKs --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 35 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/acm/api.go | 355 +- .../aws/aws-sdk-go/service/acm/doc.go | 2 +- .../aws/aws-sdk-go/service/acmpca/api.go | 3840 +++++ .../aws/aws-sdk-go/service/acmpca/doc.go | 55 + .../aws/aws-sdk-go/service/acmpca/errors.go | 109 + .../aws/aws-sdk-go/service/acmpca/service.go | 95 + .../aws/aws-sdk-go/service/apigateway/api.go | 910 +- .../service/applicationautoscaling/api.go | 20 +- .../aws/aws-sdk-go/service/appsync/api.go | 54 +- .../aws/aws-sdk-go/service/athena/api.go | 22 +- .../aws/aws-sdk-go/service/autoscaling/api.go | 104 +- .../aws/aws-sdk-go/service/batch/api.go | 32 +- .../aws/aws-sdk-go/service/budgets/api.go | 26 +- .../aws/aws-sdk-go/service/cloud9/api.go | 20 +- .../aws-sdk-go/service/cloudformation/api.go | 223 +- .../aws/aws-sdk-go/service/cloudfront/api.go | 13595 ++++++++++------ .../aws/aws-sdk-go/service/cloudfront/doc.go | 2 +- .../aws-sdk-go/service/cloudfront/errors.go | 134 + .../aws-sdk-go/service/cloudfront/service.go | 2 +- .../aws/aws-sdk-go/service/cloudsearch/api.go | 48 +- .../aws/aws-sdk-go/service/cloudtrail/api.go | 28 +- .../aws/aws-sdk-go/service/cloudwatch/api.go | 634 +- .../service/cloudwatchevents/api.go | 30 +- .../aws-sdk-go/service/cloudwatchlogs/api.go | 66 +- .../aws/aws-sdk-go/service/codebuild/api.go | 32 +- .../aws/aws-sdk-go/service/codecommit/api.go | 72 +- .../aws/aws-sdk-go/service/codedeploy/api.go | 80 +- .../aws-sdk-go/service/codepipeline/api.go | 54 +- .../aws-sdk-go/service/cognitoidentity/api.go | 36 +- .../service/cognitoidentityprovider/api.go | 190 +- .../aws-sdk-go/service/configservice/api.go | 3949 ++++- .../aws-sdk-go/service/configservice/doc.go | 12 +- .../service/configservice/errors.go | 35 +- .../service/databasemigrationservice/api.go | 88 +- .../aws/aws-sdk-go/service/dax/api.go | 42 +- .../aws/aws-sdk-go/service/devicefarm/api.go | 1986 ++- .../aws-sdk-go/service/directconnect/api.go | 88 +- .../service/directoryservice/api.go | 80 +- .../aws/aws-sdk-go/service/dynamodb/api.go | 62 +- .../aws/aws-sdk-go/service/ec2/api.go | 536 +- .../aws/aws-sdk-go/service/ecr/api.go | 44 +- .../aws/aws-sdk-go/service/ecs/api.go | 62 +- .../aws/aws-sdk-go/service/efs/api.go | 22 +- .../aws/aws-sdk-go/service/elasticache/api.go | 80 +- .../service/elasticbeanstalk/api.go | 88 +- .../service/elasticsearchservice/api.go | 188 +- .../service/elastictranscoder/api.go | 34 +- .../aws/aws-sdk-go/service/elb/api.go | 58 +- .../aws/aws-sdk-go/service/elbv2/api.go | 68 +- .../aws/aws-sdk-go/service/emr/api.go | 54 +- .../aws/aws-sdk-go/service/firehose/api.go | 14 +- .../aws/aws-sdk-go/service/fms/api.go | 2466 +++ .../aws/aws-sdk-go/service/fms/doc.go | 31 + .../aws/aws-sdk-go/service/fms/errors.go | 42 + .../aws/aws-sdk-go/service/fms/service.go | 95 + .../aws/aws-sdk-go/service/gamelift/api.go | 130 +- .../aws/aws-sdk-go/service/glacier/api.go | 66 +- .../aws/aws-sdk-go/service/glue/api.go | 156 +- .../aws/aws-sdk-go/service/guardduty/api.go | 74 +- .../aws/aws-sdk-go/service/iam/api.go | 246 +- .../aws/aws-sdk-go/service/inspector/api.go | 66 +- .../aws/aws-sdk-go/service/iot/api.go | 246 +- .../aws/aws-sdk-go/service/kinesis/api.go | 46 +- .../aws/aws-sdk-go/service/kms/api.go | 70 +- .../aws/aws-sdk-go/service/lambda/api.go | 144 +- .../service/lexmodelbuildingservice/api.go | 72 +- .../aws/aws-sdk-go/service/lightsail/api.go | 142 +- .../aws-sdk-go/service/mediaconvert/api.go | 40 +- .../aws/aws-sdk-go/service/medialive/api.go | 34 +- .../aws-sdk-go/service/mediapackage/api.go | 22 +- .../aws/aws-sdk-go/service/mediastore/api.go | 20 +- .../aws-sdk-go/service/mediastoredata/api.go | 10 +- .../aws/aws-sdk-go/service/mq/api.go | 34 +- .../aws/aws-sdk-go/service/opsworks/api.go | 148 +- .../aws-sdk-go/service/organizations/api.go | 84 +- .../aws/aws-sdk-go/service/rds/api.go | 182 +- .../aws/aws-sdk-go/service/redshift/api.go | 126 +- .../aws/aws-sdk-go/service/route53/api.go | 112 +- .../aws/aws-sdk-go/service/s3/api.go | 297 +- .../aws/aws-sdk-go/service/sagemaker/api.go | 260 +- .../aws-sdk-go/service/secretsmanager/api.go | 4475 +++++ .../aws-sdk-go/service/secretsmanager/doc.go | 108 + .../service/secretsmanager/errors.go | 74 + .../service/secretsmanager/service.go | 98 + .../aws-sdk-go/service/servicecatalog/api.go | 120 +- .../service/servicediscovery/api.go | 36 +- .../aws/aws-sdk-go/service/ses/api.go | 140 +- .../aws/aws-sdk-go/service/sfn/api.go | 38 +- .../aws/aws-sdk-go/service/simpledb/api.go | 20 +- .../aws/aws-sdk-go/service/sns/api.go | 60 +- .../aws/aws-sdk-go/service/sqs/api.go | 40 +- .../aws/aws-sdk-go/service/ssm/api.go | 197 +- .../aws/aws-sdk-go/service/sts/api.go | 14 +- .../aws/aws-sdk-go/service/swf/api.go | 62 +- .../aws/aws-sdk-go/service/waf/api.go | 138 +- .../aws/aws-sdk-go/service/wafregional/api.go | 146 +- .../aws/aws-sdk-go/service/workspaces/api.go | 28 +- vendor/vendor.json | 1066 +- 100 files changed, 31390 insertions(+), 9428 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fms/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 3a68ce72907..94934998a37 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -584,16 +584,43 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "codebuild-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "codebuild-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "codebuild-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "codebuild-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "codecommit": service{ @@ -1184,6 +1211,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index b15aedcca23..8cfc7e37ed9 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.23" +const SDKVersion = "1.13.28" diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go index 6f38c0fd18e..71e24031620 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go @@ -17,7 +17,7 @@ const opAddTagsToCertificate = "AddTagsToCertificate" // AddTagsToCertificateRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -71,7 +71,7 @@ func (c *ACM) AddTagsToCertificateRequest(input *AddTagsToCertificateInput) (req // if you want to specify a relationship among those resources. For example, // you can add the same tag to an ACM certificate and an Elastic Load Balancing // load balancer to indicate that they are both used by the same website. For -// more information, see Tagging ACM certificates (http://docs.aws.amazon.com/acm/latest/userguide/tags.html). +// more information, see Tagging ACM certificates (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/tags.html). // // To remove one or more tags, use the RemoveTagsFromCertificate action. To // view all of the tags that have been applied to the certificate, use the ListTagsForCertificate @@ -125,7 +125,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -222,7 +222,7 @@ const opDescribeCertificate = "DescribeCertificate" // DescribeCertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -301,11 +301,105 @@ func (c *ACM) DescribeCertificateWithContext(ctx aws.Context, input *DescribeCer return out, req.Send() } +const opExportCertificate = "ExportCertificate" + +// ExportCertificateRequest generates a "aws/request.Request" representing the +// client's request for the ExportCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ExportCertificate for more information on using the ExportCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ExportCertificateRequest method. +// req, resp := client.ExportCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ExportCertificate +func (c *ACM) ExportCertificateRequest(input *ExportCertificateInput) (req *request.Request, output *ExportCertificateOutput) { + op := &request.Operation{ + Name: opExportCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportCertificateInput{} + } + + output = &ExportCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportCertificate API operation for AWS Certificate Manager. +// +// Exports a certificate for use anywhere. You can export the certificate, the +// certificate chain, and the encrypted private key associated with the public +// key embedded in the certificate. You must store the private key securely. +// The private key is a 2048 bit RSA key. You must provide a passphrase for +// the private key when exporting it. You can use the following OpenSSL command +// to decrypt it later. Provide the passphrase when prompted. +// +// openssl rsa -in encrypted_key.pem -out decrypted_key.pem +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager's +// API operation ExportCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified certificate cannot be found in the caller's account or the +// caller's account cannot be found. +// +// * ErrCodeRequestInProgressException "RequestInProgressException" +// The certificate request is in process and the certificate in your account +// has not yet been issued. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/ExportCertificate +func (c *ACM) ExportCertificate(input *ExportCertificateInput) (*ExportCertificateOutput, error) { + req, out := c.ExportCertificateRequest(input) + return out, req.Send() +} + +// ExportCertificateWithContext is the same as ExportCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See ExportCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACM) ExportCertificateWithContext(ctx aws.Context, input *ExportCertificateInput, opts ...request.Option) (*ExportCertificateOutput, error) { + req, out := c.ExportCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetCertificate = "GetCertificate" // GetCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -397,7 +491,7 @@ const opImportCertificate = "ImportCertificate" // ImportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -438,15 +532,15 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // ImportCertificate API operation for AWS Certificate Manager. // // Imports a certificate into AWS Certificate Manager (ACM) to use with services -// that are integrated with ACM. Note that integrated services (http://docs.aws.amazon.com/acm/latest/userguide/acm-services.html) +// that are integrated with ACM. Note that integrated services (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-services.html) // allow only certificate types and keys they support to be associated with // their resources. Further, their support differs depending on whether the // certificate is imported into IAM or into ACM. For more information, see the // documentation for each service. For more information about importing certificates -// into ACM, see Importing Certificates (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) +// into ACM, see Importing Certificates (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/import-certificate.html) // in the AWS Certificate Manager User Guide. // -// ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) +// ACM does not provide managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) // for certificates that you import. // // Note the following guidelines when importing third party certificates: @@ -526,7 +620,7 @@ const opListCertificates = "ListCertificates" // ListCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -658,7 +752,7 @@ const opListTagsForCertificate = "ListTagsForCertificate" // ListTagsForCertificateRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -744,7 +838,7 @@ const opRemoveTagsFromCertificate = "RemoveTagsFromCertificate" // RemoveTagsFromCertificateRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -840,7 +934,7 @@ const opRequestCertificate = "RequestCertificate" // RequestCertificateRequest generates a "aws/request.Request" representing the // client's request for the RequestCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -883,17 +977,20 @@ func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *re // Requests an ACM certificate for use with other AWS services. To request an // ACM certificate, you must specify the fully qualified domain name (FQDN) // for your site in the DomainName parameter. You can also specify additional -// FQDNs in the SubjectAlternativeNames parameter if users can reach your site -// by using other names. +// FQDNs in the SubjectAlternativeNames parameter. // -// For each domain name you specify, email is sent to the domain owner to request +// Each domain name that you specify must be validated to verify that you own +// or control the domain. You can use DNS validation (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html) +// or email validation (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). +// We recommend that you use DNS validation. +// +// If you choose email validation, email is sent to the domain owner to request // approval to issue the certificate. Email is sent to three registered contact // addresses in the WHOIS database and to five common system administration // addresses formed from the DomainName you enter or the optional ValidationDomain -// parameter. For more information, see Validate Domain Ownership (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate.html). +// parameter. For more information, see Validate with Email (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). // // After receiving approval from the domain owner, the ACM certificate is issued. -// For more information, see the AWS Certificate Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/). // // 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 @@ -909,6 +1006,9 @@ func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *re // * ErrCodeInvalidDomainValidationOptionsException "InvalidDomainValidationOptionsException" // One or more values in the DomainValidationOption structure is incorrect. // +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/RequestCertificate func (c *ACM) RequestCertificate(input *RequestCertificateInput) (*RequestCertificateOutput, error) { req, out := c.RequestCertificateRequest(input) @@ -935,7 +1035,7 @@ const opResendValidationEmail = "ResendValidationEmail" // ResendValidationEmailRequest generates a "aws/request.Request" representing the // client's request for the ResendValidationEmail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -987,7 +1087,7 @@ func (c *ACM) ResendValidationEmailRequest(input *ResendValidationEmailInput) (r // more than 72 hours have elapsed since your original request or since your // last attempt to resend validation mail, you must request a new certificate. // For more information about setting up your contact email addresses, see Configure -// Email for your Domain (http://docs.aws.amazon.com/acm/latest/userguide/setup-email.html). +// Email for your Domain (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/setup-email.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1036,7 +1136,7 @@ const opUpdateCertificateOptions = "UpdateCertificateOptions" // UpdateCertificateOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificateOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1081,7 +1181,7 @@ func (c *ACM) UpdateCertificateOptionsRequest(input *UpdateCertificateOptionsInp // Updates a certificate. Currently, you can use this function to specify whether // to opt in to or out of recording your certificate in a certificate transparency // log. For more information, see Opting Out of Certificate Transparency Logging -// (acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). +// (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-bestpractices.html#best-practices-transparency). // // 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 @@ -1095,9 +1195,6 @@ func (c *ACM) UpdateCertificateOptionsRequest(input *UpdateCertificateOptionsInp // The specified certificate cannot be found in the caller's account or the // caller's account cannot be found. // -// * ErrCodeInvalidArnException "InvalidArnException" -// The requested Amazon Resource Name (ARN) does not refer to an existing resource. -// // * ErrCodeLimitExceededException "LimitExceededException" // An ACM limit has been exceeded. // @@ -1227,6 +1324,12 @@ type CertificateDetail struct { // in the AWS General Reference. CertificateArn *string `min:"20" type:"string"` + // The Amazon Resource Name (ARN) of the ACM PCA private certificate authority + // (CA) that issued the certificate. This has the following format: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + CertificateAuthorityArn *string `min:"20" type:"string"` + // The time at which the certificate was requested. This value exists only when // the certificate type is AMAZON_ISSUED. CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"` @@ -1247,7 +1350,7 @@ type CertificateDetail struct { // The reason the certificate request failed. This value exists only when the // certificate status is FAILED. For more information, see Certificate Request - // Failed (http://docs.aws.amazon.com/acm/latest/userguide/troubleshooting.html#troubleshooting-failed) + // Failed (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/troubleshooting.html#troubleshooting-failed) // in the AWS Certificate Manager User Guide. FailureReason *string `type:"string" enum:"FailureReason"` @@ -1284,11 +1387,14 @@ type CertificateDetail struct { // Value that specifies whether to add the certificate to a transparency log. // Certificate transparency makes it possible to detect SSL certificates that // have been mistakenly or maliciously issued. A browser might respond to certificate - // that has not been logged by showing an error message. The logs are cryptographicaly + // that has not been logged by showing an error message. The logs are cryptographically // secure. Options *CertificateOptions `type:"structure"` - // Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) + // Specifies whether the certificate is eligible for renewal. + RenewalEligibility *string `type:"string" enum:"RenewalEligibility"` + + // Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) // for the certificate. This field exists only when the certificate type is // AMAZON_ISSUED. RenewalSummary *RenewalSummary `type:"structure"` @@ -1323,10 +1429,10 @@ type CertificateDetail struct { // The source of the certificate. For certificates provided by ACM, this value // is AMAZON_ISSUED. For certificates that you imported with ImportCertificate, - // this value is IMPORTED. ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) + // this value is IMPORTED. ACM does not provide managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) // for imported certificates. For more information about the differences between // certificates that you import and those that ACM provides, see Importing Certificates - // (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) + // (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/import-certificate.html) // in the AWS Certificate Manager User Guide. Type *string `type:"string" enum:"CertificateType"` } @@ -1347,6 +1453,12 @@ func (s *CertificateDetail) SetCertificateArn(v string) *CertificateDetail { return s } +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *CertificateDetail) SetCertificateAuthorityArn(v string) *CertificateDetail { + s.CertificateAuthorityArn = &v + return s +} + // SetCreatedAt sets the CreatedAt field's value. func (s *CertificateDetail) SetCreatedAt(v time.Time) *CertificateDetail { s.CreatedAt = &v @@ -1431,6 +1543,12 @@ func (s *CertificateDetail) SetOptions(v *CertificateOptions) *CertificateDetail return s } +// SetRenewalEligibility sets the RenewalEligibility field's value. +func (s *CertificateDetail) SetRenewalEligibility(v string) *CertificateDetail { + s.RenewalEligibility = &v + return s +} + // SetRenewalSummary sets the RenewalSummary field's value. func (s *CertificateDetail) SetRenewalSummary(v *RenewalSummary) *CertificateDetail { s.RenewalSummary = v @@ -1491,7 +1609,7 @@ func (s *CertificateDetail) SetType(v string) *CertificateDetail { // be recorded in a log. Certificates that are not logged typically generate // a browser error. Transparency makes it possible for you to detect SSL/TLS // certificates that have been mistakenly or maliciously issued for your domain. -// For general information, see ACM Concepts (acm/latest/userguide/acm-concepts.html). +// For general information, see Certificate Transparency Logging (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-concepts.html#concept-transparency). type CertificateOptions struct { _ struct{} `type:"structure"` @@ -1697,7 +1815,7 @@ type DomainValidation struct { DomainName *string `min:"1" type:"string" required:"true"` // Contains the CNAME record that you add to your DNS database for domain validation. - // For more information, see Use DNS to Validate Domain Ownership (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html). + // For more information, see Use DNS to Validate Domain Ownership (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html). ResourceRecord *ResourceRecord `type:"structure"` // The domain name that ACM used to send domain validation emails. @@ -1841,6 +1959,115 @@ func (s *DomainValidationOption) SetValidationDomain(v string) *DomainValidation return s } +type ExportCertificateInput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) of the issued certificate. This must be of + // the form: + // + // arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012 + // + // CertificateArn is a required field + CertificateArn *string `min:"20" type:"string" required:"true"` + + // Passphrase to associate with the encrypted exported private key. If you want + // to later decrypt the private key, you must have the passphrase. You can use + // the following OpenSSL command to decrypt a private key: + // + // openssl rsa -in encrypted_key.pem -out decrypted_key.pem + // + // Passphrase is automatically base64 encoded/decoded by the SDK. + // + // Passphrase is a required field + Passphrase []byte `min:"4" type:"blob" required:"true"` +} + +// String returns the string representation +func (s ExportCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportCertificateInput"} + if s.CertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateArn")) + } + if s.CertificateArn != nil && len(*s.CertificateArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20)) + } + if s.Passphrase == nil { + invalidParams.Add(request.NewErrParamRequired("Passphrase")) + } + if s.Passphrase != nil && len(s.Passphrase) < 4 { + invalidParams.Add(request.NewErrParamMinLen("Passphrase", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *ExportCertificateInput) SetCertificateArn(v string) *ExportCertificateInput { + s.CertificateArn = &v + return s +} + +// SetPassphrase sets the Passphrase field's value. +func (s *ExportCertificateInput) SetPassphrase(v []byte) *ExportCertificateInput { + s.Passphrase = v + return s +} + +type ExportCertificateOutput struct { + _ struct{} `type:"structure"` + + // The base64 PEM-encoded certificate. + Certificate *string `min:"1" type:"string"` + + // The base64 PEM-encoded certificate chain. This does not include the certificate + // that you are exporting. + CertificateChain *string `min:"1" type:"string"` + + // The PEM-encoded private key associated with the public key in the certificate. + PrivateKey *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ExportCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificate sets the Certificate field's value. +func (s *ExportCertificateOutput) SetCertificate(v string) *ExportCertificateOutput { + s.Certificate = &v + return s +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *ExportCertificateOutput) SetCertificateChain(v string) *ExportCertificateOutput { + s.CertificateChain = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *ExportCertificateOutput) SetPrivateKey(v string) *ExportCertificateOutput { + s.PrivateKey = &v + return s +} + // The Extended Key Usage X.509 v3 extension defines one or more purposes for // which the public key can be used. This is in addition to or in place of the // basic purposes specified by the Key Usage extension. @@ -2420,14 +2647,14 @@ func (s RemoveTagsFromCertificateOutput) GoString() string { return s.String() } -// Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) +// Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) // for the certificate. This structure exists only when the certificate type // is AMAZON_ISSUED. type RenewalSummary struct { _ struct{} `type:"structure"` // Contains information about the validation of each domain name in the certificate, - // as it pertains to ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html). + // as it pertains to ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html). // This is different from the initial validation that occurs as a result of // the RequestCertificate request. This field exists only when the certificate // type is AMAZON_ISSUED. @@ -2435,7 +2662,7 @@ type RenewalSummary struct { // DomainValidationOptions is a required field DomainValidationOptions []*DomainValidation `min:"1" type:"list" required:"true"` - // The status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) + // The status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) // of the certificate. // // RenewalStatus is a required field @@ -2467,6 +2694,15 @@ func (s *RenewalSummary) SetRenewalStatus(v string) *RenewalSummary { type RequestCertificateInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the private certificate authority (CA) + // that will be used to issue the certificate. For more information about private + // CAs, see the AWS Certificate Manager Private Certificate Authority (PCA) + // (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm-pca/latest/userguide/PcaWelcome.html) + // user guide. The ARN must have the following form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + CertificateAuthorityArn *string `min:"20" type:"string"` + // Fully qualified domain name (FQDN), such as www.example.com, of the site // that you want to secure with an ACM Certificate. Use an asterisk (*) to create // a wildcard certificate that protects several sites in the same domain. For @@ -2495,8 +2731,8 @@ type RequestCertificateInput struct { // to a certificate transparency log. Certificate transparency makes it possible // to detect SSL/TLS certificates that have been mistakenly or maliciously issued. // Certificates that have not been logged typically produce an error message - // in a browser. For more information, see Opting Out of Certificate Transparency - // Logging (acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). + // in a browser. For more information, see Opting Out of Certificate Transparency + // Logging (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-bestpractices.html#best-practices-transparency). Options *CertificateOptions `type:"structure"` // Additional FQDNs to be included in the Subject Alternative Name extension @@ -2505,7 +2741,7 @@ type RequestCertificateInput struct { // site by using either name. The maximum number of domain names that you can // add to an ACM certificate is 100. However, the initial limit is 10 domain // names. If you need more than 10 names, you must request a limit increase. - // For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). + // For more information, see Limits (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-limits.html). // // The maximum length of a SAN DNS name is 253 octets. The name is made up of // multiple labels separated by periods. No label can be longer than 63 octets. @@ -2523,7 +2759,10 @@ type RequestCertificateInput struct { // the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets. SubjectAlternativeNames []*string `min:"1" type:"list"` - // The method you want to use to validate your domain. + // The method you want to use to validate that you own or control domain. You + // can validate with DNS (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html) + // or validate with email (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). + // We recommend that you use DNS validation. ValidationMethod *string `type:"string" enum:"ValidationMethod"` } @@ -2540,6 +2779,9 @@ func (s RequestCertificateInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *RequestCertificateInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RequestCertificateInput"} + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 20)) + } if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } @@ -2572,6 +2814,12 @@ func (s *RequestCertificateInput) Validate() error { return nil } +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *RequestCertificateInput) SetCertificateAuthorityArn(v string) *RequestCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + // SetDomainName sets the DomainName field's value. func (s *RequestCertificateInput) SetDomainName(v string) *RequestCertificateInput { s.DomainName = &v @@ -2959,6 +3207,9 @@ const ( // CertificateTypeAmazonIssued is a CertificateType enum value CertificateTypeAmazonIssued = "AMAZON_ISSUED" + + // CertificateTypePrivate is a CertificateType enum value + CertificateTypePrivate = "PRIVATE" ) const ( @@ -3026,6 +3277,24 @@ const ( // FailureReasonCaaError is a FailureReason enum value FailureReasonCaaError = "CAA_ERROR" + // FailureReasonPcaLimitExceeded is a FailureReason enum value + FailureReasonPcaLimitExceeded = "PCA_LIMIT_EXCEEDED" + + // FailureReasonPcaInvalidArn is a FailureReason enum value + FailureReasonPcaInvalidArn = "PCA_INVALID_ARN" + + // FailureReasonPcaInvalidState is a FailureReason enum value + FailureReasonPcaInvalidState = "PCA_INVALID_STATE" + + // FailureReasonPcaRequestFailed is a FailureReason enum value + FailureReasonPcaRequestFailed = "PCA_REQUEST_FAILED" + + // FailureReasonPcaResourceNotFound is a FailureReason enum value + FailureReasonPcaResourceNotFound = "PCA_RESOURCE_NOT_FOUND" + + // FailureReasonPcaInvalidArgs is a FailureReason enum value + FailureReasonPcaInvalidArgs = "PCA_INVALID_ARGS" + // FailureReasonOther is a FailureReason enum value FailureReasonOther = "OTHER" ) @@ -3090,6 +3359,14 @@ const ( RecordTypeCname = "CNAME" ) +const ( + // RenewalEligibilityEligible is a RenewalEligibility enum value + RenewalEligibilityEligible = "ELIGIBLE" + + // RenewalEligibilityIneligible is a RenewalEligibility enum value + RenewalEligibilityIneligible = "INELIGIBLE" +) + const ( // RenewalStatusPendingAutoRenewal is a RenewalStatus enum value RenewalStatusPendingAutoRenewal = "PENDING_AUTO_RENEWAL" diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go index 8a183a969ee..a8e67c4240d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go @@ -7,7 +7,7 @@ // // You can use ACM to manage SSL/TLS certificates for your AWS-based websites // and applications. For general information about using ACM, see the AWS Certificate -// Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/). +// Manager User Guide (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/). // // See https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go new file mode 100644 index 00000000000..c6a2d319b10 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -0,0 +1,3840 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCreateCertificateAuthority = "CreateCertificateAuthority" + +// CreateCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the CreateCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCertificateAuthority for more information on using the CreateCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCertificateAuthorityRequest method. +// req, resp := client.CreateCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority +func (c *ACMPCA) CreateCertificateAuthorityRequest(input *CreateCertificateAuthorityInput) (req *request.Request, output *CreateCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opCreateCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCertificateAuthorityInput{} + } + + output = &CreateCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Creates a private subordinate certificate authority (CA). You must specify +// the CA configuration, the revocation configuration, the CA type, and an optional +// idempotency token. The CA configuration specifies the name of the algorithm +// and key size to be used to create the CA private key, the type of signing +// algorithm that the CA uses to sign, and X.500 subject information. The CRL +// (certificate revocation list) configuration specifies the CRL expiration +// period in days (the validity period of the CRL), the Amazon S3 bucket that +// will contain the CRL, and a CNAME alias for the S3 bucket that is included +// in certificates issued by the CA. If successful, this function returns the +// Amazon Resource Name (ARN) of the CA. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation CreateCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeInvalidPolicyException "InvalidPolicyException" +// The S3 bucket policy is not valid. The policy must give ACM PCA rights to +// read from and write to the bucket and find the bucket location. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// An ACM PCA limit has been exceeded. See the exception message returned to +// determine the limit that was exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority +func (c *ACMPCA) CreateCertificateAuthority(input *CreateCertificateAuthorityInput) (*CreateCertificateAuthorityOutput, error) { + req, out := c.CreateCertificateAuthorityRequest(input) + return out, req.Send() +} + +// CreateCertificateAuthorityWithContext is the same as CreateCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) CreateCertificateAuthorityWithContext(ctx aws.Context, input *CreateCertificateAuthorityInput, opts ...request.Option) (*CreateCertificateAuthorityOutput, error) { + req, out := c.CreateCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCertificateAuthorityAuditReport = "CreateCertificateAuthorityAuditReport" + +// CreateCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the +// client's request for the CreateCertificateAuthorityAuditReport operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCertificateAuthorityAuditReport for more information on using the CreateCertificateAuthorityAuditReport +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCertificateAuthorityAuditReportRequest method. +// req, resp := client.CreateCertificateAuthorityAuditReportRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport +func (c *ACMPCA) CreateCertificateAuthorityAuditReportRequest(input *CreateCertificateAuthorityAuditReportInput) (req *request.Request, output *CreateCertificateAuthorityAuditReportOutput) { + op := &request.Operation{ + Name: opCreateCertificateAuthorityAuditReport, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCertificateAuthorityAuditReportInput{} + } + + output = &CreateCertificateAuthorityAuditReportOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority. +// +// Creates an audit report that lists every time that the your CA private key +// is used. The report is saved in the Amazon S3 bucket that you specify on +// input. The IssueCertificate and RevokeCertificate functions use the private +// key. You can generate a new report every 30 minutes. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation CreateCertificateAuthorityAuditReport for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport +func (c *ACMPCA) CreateCertificateAuthorityAuditReport(input *CreateCertificateAuthorityAuditReportInput) (*CreateCertificateAuthorityAuditReportOutput, error) { + req, out := c.CreateCertificateAuthorityAuditReportRequest(input) + return out, req.Send() +} + +// CreateCertificateAuthorityAuditReportWithContext is the same as CreateCertificateAuthorityAuditReport with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCertificateAuthorityAuditReport for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) CreateCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *CreateCertificateAuthorityAuditReportInput, opts ...request.Option) (*CreateCertificateAuthorityAuditReportOutput, error) { + req, out := c.CreateCertificateAuthorityAuditReportRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCertificateAuthority = "DeleteCertificateAuthority" + +// DeleteCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCertificateAuthority for more information on using the DeleteCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteCertificateAuthorityRequest method. +// req, resp := client.DeleteCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority +func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAuthorityInput) (req *request.Request, output *DeleteCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opDeleteCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteCertificateAuthorityInput{} + } + + output = &DeleteCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Deletes the private certificate authority (CA) that you created or started +// to create by calling the CreateCertificateAuthority function. This action +// requires that you enter an ARN (Amazon Resource Name) for the private CA +// that you want to delete. You can find the ARN by calling the ListCertificateAuthorities +// function. You can delete the CA if you are waiting for it to be created (the +// Status field of the CertificateAuthority is CREATING) or if the CA has been +// created but you haven't yet imported the signed certificate (the Status is +// PENDING_CERTIFICATE) into ACM PCA. If you've already imported the certificate, +// you cannot delete the CA unless it has been disabled for more than 30 days. +// To disable a CA, call the UpdateCertificateAuthority function and set the +// CertificateAuthorityStatus argument to DISABLED. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation DeleteCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority +func (c *ACMPCA) DeleteCertificateAuthority(input *DeleteCertificateAuthorityInput) (*DeleteCertificateAuthorityOutput, error) { + req, out := c.DeleteCertificateAuthorityRequest(input) + return out, req.Send() +} + +// DeleteCertificateAuthorityWithContext is the same as DeleteCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) DeleteCertificateAuthorityWithContext(ctx aws.Context, input *DeleteCertificateAuthorityInput, opts ...request.Option) (*DeleteCertificateAuthorityOutput, error) { + req, out := c.DeleteCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCertificateAuthority = "DescribeCertificateAuthority" + +// DescribeCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCertificateAuthority for more information on using the DescribeCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCertificateAuthorityRequest method. +// req, resp := client.DescribeCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority +func (c *ACMPCA) DescribeCertificateAuthorityRequest(input *DescribeCertificateAuthorityInput) (req *request.Request, output *DescribeCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opDescribeCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCertificateAuthorityInput{} + } + + output = &DescribeCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists information about your private certificate authority (CA). You specify +// the private CA on input by its ARN (Amazon Resource Name). The output contains +// the status of your CA. This can be any of the following: +// +// * CREATING: ACM PCA is creating your private certificate authority. +// +// * PENDING_CERTIFICATE: The certificate is pending. You must use your on-premises +// root or subordinate CA to sign your private CA CSR and then import it +// into PCA. +// +// * ACTIVE: Your private CA is active. +// +// * DISABLED: Your private CA has been disabled. +// +// * EXPIRED: Your private CA certificate has expired. +// +// * FAILED: Your private CA has failed. Your CA can fail for problems such +// a network outage or backend AWS failure or other errors. A failed CA can +// never return to the pending state. You must create a new CA. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation DescribeCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority +func (c *ACMPCA) DescribeCertificateAuthority(input *DescribeCertificateAuthorityInput) (*DescribeCertificateAuthorityOutput, error) { + req, out := c.DescribeCertificateAuthorityRequest(input) + return out, req.Send() +} + +// DescribeCertificateAuthorityWithContext is the same as DescribeCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) DescribeCertificateAuthorityWithContext(ctx aws.Context, input *DescribeCertificateAuthorityInput, opts ...request.Option) (*DescribeCertificateAuthorityOutput, error) { + req, out := c.DescribeCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCertificateAuthorityAuditReport = "DescribeCertificateAuthorityAuditReport" + +// DescribeCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCertificateAuthorityAuditReport operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCertificateAuthorityAuditReport for more information on using the DescribeCertificateAuthorityAuditReport +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCertificateAuthorityAuditReportRequest method. +// req, resp := client.DescribeCertificateAuthorityAuditReportRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport +func (c *ACMPCA) DescribeCertificateAuthorityAuditReportRequest(input *DescribeCertificateAuthorityAuditReportInput) (req *request.Request, output *DescribeCertificateAuthorityAuditReportOutput) { + op := &request.Operation{ + Name: opDescribeCertificateAuthorityAuditReport, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCertificateAuthorityAuditReportInput{} + } + + output = &DescribeCertificateAuthorityAuditReportOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists information about a specific audit report created by calling the CreateCertificateAuthorityAuditReport +// function. Audit information is created every time the certificate authority +// (CA) private key is used. The private key is used when you call the IssueCertificate +// function or the RevokeCertificate function. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation DescribeCertificateAuthorityAuditReport for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport +func (c *ACMPCA) DescribeCertificateAuthorityAuditReport(input *DescribeCertificateAuthorityAuditReportInput) (*DescribeCertificateAuthorityAuditReportOutput, error) { + req, out := c.DescribeCertificateAuthorityAuditReportRequest(input) + return out, req.Send() +} + +// DescribeCertificateAuthorityAuditReportWithContext is the same as DescribeCertificateAuthorityAuditReport with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCertificateAuthorityAuditReport for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) DescribeCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *DescribeCertificateAuthorityAuditReportInput, opts ...request.Option) (*DescribeCertificateAuthorityAuditReportOutput, error) { + req, out := c.DescribeCertificateAuthorityAuditReportRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCertificate = "GetCertificate" + +// GetCertificateRequest generates a "aws/request.Request" representing the +// client's request for the GetCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCertificate for more information on using the GetCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCertificateRequest method. +// req, resp := client.GetCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate +func (c *ACMPCA) GetCertificateRequest(input *GetCertificateInput) (req *request.Request, output *GetCertificateOutput) { + op := &request.Operation{ + Name: opGetCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCertificateInput{} + } + + output = &GetCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Retrieves a certificate from your private CA. The ARN of the certificate +// is returned when you call the IssueCertificate function. You must specify +// both the ARN of your private CA and the ARN of the issued certificate when +// calling the GetCertificate function. You can retrieve the certificate if +// it is in the ISSUED state. You can call the CreateCertificateAuthorityAuditReport +// function to create a report that contains information about all of the certificates +// issued and revoked by your private CA. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation GetCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate +func (c *ACMPCA) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) { + req, out := c.GetCertificateRequest(input) + return out, req.Send() +} + +// GetCertificateWithContext is the same as GetCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See GetCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) GetCertificateWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.Option) (*GetCertificateOutput, error) { + req, out := c.GetCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCertificateAuthorityCertificate = "GetCertificateAuthorityCertificate" + +// GetCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the +// client's request for the GetCertificateAuthorityCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCertificateAuthorityCertificate for more information on using the GetCertificateAuthorityCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCertificateAuthorityCertificateRequest method. +// req, resp := client.GetCertificateAuthorityCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate +func (c *ACMPCA) GetCertificateAuthorityCertificateRequest(input *GetCertificateAuthorityCertificateInput) (req *request.Request, output *GetCertificateAuthorityCertificateOutput) { + op := &request.Operation{ + Name: opGetCertificateAuthorityCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCertificateAuthorityCertificateInput{} + } + + output = &GetCertificateAuthorityCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Retrieves the certificate and certificate chain for your private certificate +// authority (CA). Both the certificate and the chain are base64 PEM-encoded. +// The chain does not include the CA certificate. Each certificate in the chain +// signs the one before it. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation GetCertificateAuthorityCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate +func (c *ACMPCA) GetCertificateAuthorityCertificate(input *GetCertificateAuthorityCertificateInput) (*GetCertificateAuthorityCertificateOutput, error) { + req, out := c.GetCertificateAuthorityCertificateRequest(input) + return out, req.Send() +} + +// GetCertificateAuthorityCertificateWithContext is the same as GetCertificateAuthorityCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See GetCertificateAuthorityCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) GetCertificateAuthorityCertificateWithContext(ctx aws.Context, input *GetCertificateAuthorityCertificateInput, opts ...request.Option) (*GetCertificateAuthorityCertificateOutput, error) { + req, out := c.GetCertificateAuthorityCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCertificateAuthorityCsr = "GetCertificateAuthorityCsr" + +// GetCertificateAuthorityCsrRequest generates a "aws/request.Request" representing the +// client's request for the GetCertificateAuthorityCsr operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCertificateAuthorityCsr for more information on using the GetCertificateAuthorityCsr +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCertificateAuthorityCsrRequest method. +// req, resp := client.GetCertificateAuthorityCsrRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr +func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorityCsrInput) (req *request.Request, output *GetCertificateAuthorityCsrOutput) { + op := &request.Operation{ + Name: opGetCertificateAuthorityCsr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetCertificateAuthorityCsrInput{} + } + + output = &GetCertificateAuthorityCsrOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCertificateAuthorityCsr API operation for AWS Certificate Manager Private Certificate Authority. +// +// Retrieves the certificate signing request (CSR) for your private certificate +// authority (CA). The CSR is created when you call the CreateCertificateAuthority +// function. Take the CSR to your on-premises X.509 infrastructure and sign +// it by using your root or a subordinate CA. Then import the signed certificate +// back into ACM PCA by calling the ImportCertificateAuthorityCertificate function. +// The CSR is returned as a base64 PEM-encoded string. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation GetCertificateAuthorityCsr for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr +func (c *ACMPCA) GetCertificateAuthorityCsr(input *GetCertificateAuthorityCsrInput) (*GetCertificateAuthorityCsrOutput, error) { + req, out := c.GetCertificateAuthorityCsrRequest(input) + return out, req.Send() +} + +// GetCertificateAuthorityCsrWithContext is the same as GetCertificateAuthorityCsr with the addition of +// the ability to pass a context and additional request options. +// +// See GetCertificateAuthorityCsr for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) GetCertificateAuthorityCsrWithContext(ctx aws.Context, input *GetCertificateAuthorityCsrInput, opts ...request.Option) (*GetCertificateAuthorityCsrOutput, error) { + req, out := c.GetCertificateAuthorityCsrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opImportCertificateAuthorityCertificate = "ImportCertificateAuthorityCertificate" + +// ImportCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the +// client's request for the ImportCertificateAuthorityCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ImportCertificateAuthorityCertificate for more information on using the ImportCertificateAuthorityCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ImportCertificateAuthorityCertificateRequest method. +// req, resp := client.ImportCertificateAuthorityCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate +func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCertificateAuthorityCertificateInput) (req *request.Request, output *ImportCertificateAuthorityCertificateOutput) { + op := &request.Operation{ + Name: opImportCertificateAuthorityCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportCertificateAuthorityCertificateInput{} + } + + output = &ImportCertificateAuthorityCertificateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// ImportCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Imports your signed private CA certificate into ACM PCA. Before you can call +// this function, you must create the private certificate authority by calling +// the CreateCertificateAuthority function. You must then generate a certificate +// signing request (CSR) by calling the GetCertificateAuthorityCsr function. +// Take the CSR to your on-premises CA and use the root certificate or a subordinate +// certificate to sign it. Create a certificate chain and copy the signed certificate +// and the certificate chain to your working directory. +// +// Your certificate chain must not include the private CA certificate that you +// are importing. +// +// Your on-premises CA certificate must be the last certificate in your chain. +// The subordinate certificate, if any, that your root CA signed must be next +// to last. The subordinate certificate signed by the preceding subordinate +// CA must come next, and so on until your chain is built. +// +// The chain must be PEM-encoded. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation ImportCertificateAuthorityCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeMalformedCertificateException "MalformedCertificateException" +// One or more fields in the certificate are invalid. +// +// * ErrCodeCertificateMismatchException "CertificateMismatchException" +// The certificate authority certificate you are importing does not comply with +// conditions specified in the certificate that signed it. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate +func (c *ACMPCA) ImportCertificateAuthorityCertificate(input *ImportCertificateAuthorityCertificateInput) (*ImportCertificateAuthorityCertificateOutput, error) { + req, out := c.ImportCertificateAuthorityCertificateRequest(input) + return out, req.Send() +} + +// ImportCertificateAuthorityCertificateWithContext is the same as ImportCertificateAuthorityCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See ImportCertificateAuthorityCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) ImportCertificateAuthorityCertificateWithContext(ctx aws.Context, input *ImportCertificateAuthorityCertificateInput, opts ...request.Option) (*ImportCertificateAuthorityCertificateOutput, error) { + req, out := c.ImportCertificateAuthorityCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opIssueCertificate = "IssueCertificate" + +// IssueCertificateRequest generates a "aws/request.Request" representing the +// client's request for the IssueCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See IssueCertificate for more information on using the IssueCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the IssueCertificateRequest method. +// req, resp := client.IssueCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate +func (c *ACMPCA) IssueCertificateRequest(input *IssueCertificateInput) (req *request.Request, output *IssueCertificateOutput) { + op := &request.Operation{ + Name: opIssueCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IssueCertificateInput{} + } + + output = &IssueCertificateOutput{} + req = c.newRequest(op, input, output) + return +} + +// IssueCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Uses your private certificate authority (CA) to issue a client certificate. +// This function returns the Amazon Resource Name (ARN) of the certificate. +// You can retrieve the certificate by calling the GetCertificate function and +// specifying the ARN. +// +// You cannot use the ACM ListCertificateAuthorities function to retrieve the +// ARNs of the certificates that you issue by using ACM PCA. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation IssueCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// An ACM PCA limit has been exceeded. See the exception message returned to +// determine the limit that was exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeMalformedCSRException "MalformedCSRException" +// The certificate signing request is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate +func (c *ACMPCA) IssueCertificate(input *IssueCertificateInput) (*IssueCertificateOutput, error) { + req, out := c.IssueCertificateRequest(input) + return out, req.Send() +} + +// IssueCertificateWithContext is the same as IssueCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See IssueCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) IssueCertificateWithContext(ctx aws.Context, input *IssueCertificateInput, opts ...request.Option) (*IssueCertificateOutput, error) { + req, out := c.IssueCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListCertificateAuthorities = "ListCertificateAuthorities" + +// ListCertificateAuthoritiesRequest generates a "aws/request.Request" representing the +// client's request for the ListCertificateAuthorities operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListCertificateAuthorities for more information on using the ListCertificateAuthorities +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListCertificateAuthoritiesRequest method. +// req, resp := client.ListCertificateAuthoritiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities +func (c *ACMPCA) ListCertificateAuthoritiesRequest(input *ListCertificateAuthoritiesInput) (req *request.Request, output *ListCertificateAuthoritiesOutput) { + op := &request.Operation{ + Name: opListCertificateAuthorities, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListCertificateAuthoritiesInput{} + } + + output = &ListCertificateAuthoritiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListCertificateAuthorities API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists the private certificate authorities that you created by using the CreateCertificateAuthority +// function. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation ListCertificateAuthorities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The token specified in the NextToken argument is not valid. Use the token +// returned from your previous call to ListCertificateAuthorities. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities +func (c *ACMPCA) ListCertificateAuthorities(input *ListCertificateAuthoritiesInput) (*ListCertificateAuthoritiesOutput, error) { + req, out := c.ListCertificateAuthoritiesRequest(input) + return out, req.Send() +} + +// ListCertificateAuthoritiesWithContext is the same as ListCertificateAuthorities with the addition of +// the ability to pass a context and additional request options. +// +// See ListCertificateAuthorities for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) ListCertificateAuthoritiesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, opts ...request.Option) (*ListCertificateAuthoritiesOutput, error) { + req, out := c.ListCertificateAuthoritiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTags = "ListTags" + +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTags for more information on using the ListTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTags +func (c *ACMPCA) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for AWS Certificate Manager Private Certificate Authority. +// +// Lists the tags, if any, that are associated with your private CA. Tags are +// labels that you can use to identify and organize your CAs. Each tag consists +// of a key and an optional value. Call the TagCertificateAuthority function +// to add one or more tags to your CA. Call the UntagCertificateAuthority function +// to remove tags. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation ListTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTags +func (c *ACMPCA) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + return out, req.Send() +} + +// ListTagsWithContext is the same as ListTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRevokeCertificate = "RevokeCertificate" + +// RevokeCertificateRequest generates a "aws/request.Request" representing the +// client's request for the RevokeCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RevokeCertificate for more information on using the RevokeCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RevokeCertificateRequest method. +// req, resp := client.RevokeCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate +func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *request.Request, output *RevokeCertificateOutput) { + op := &request.Operation{ + Name: opRevokeCertificate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RevokeCertificateInput{} + } + + output = &RevokeCertificateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RevokeCertificate API operation for AWS Certificate Manager Private Certificate Authority. +// +// Revokes a certificate that you issued by calling the IssueCertificate function. +// If you enable a certificate revocation list (CRL) when you create or update +// your private CA, information about the revoked certificates will be included +// in the CRL. ACM PCA writes the CRL to an S3 bucket that you specify. For +// more information about revocation, see the CrlConfiguration structure. ACM +// PCA also writes revocation information to the audit report. For more information, +// see CreateCertificateAuthorityAuditReport. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation RevokeCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeRequestAlreadyProcessedException "RequestAlreadyProcessedException" +// Your request has already been completed. +// +// * ErrCodeRequestInProgressException "RequestInProgressException" +// Your request is already in progress. +// +// * ErrCodeRequestFailedException "RequestFailedException" +// The request has failed for an unspecified reason. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate +func (c *ACMPCA) RevokeCertificate(input *RevokeCertificateInput) (*RevokeCertificateOutput, error) { + req, out := c.RevokeCertificateRequest(input) + return out, req.Send() +} + +// RevokeCertificateWithContext is the same as RevokeCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) RevokeCertificateWithContext(ctx aws.Context, input *RevokeCertificateInput, opts ...request.Option) (*RevokeCertificateOutput, error) { + req, out := c.RevokeCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagCertificateAuthority = "TagCertificateAuthority" + +// TagCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the TagCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagCertificateAuthority for more information on using the TagCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagCertificateAuthorityRequest method. +// req, resp := client.TagCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority +func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityInput) (req *request.Request, output *TagCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opTagCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagCertificateAuthorityInput{} + } + + output = &TagCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Adds one or more tags to your private CA. Tags are labels that you can use +// to identify and organize your AWS resources. Each tag consists of a key and +// an optional value. You specify the private CA on input by its Amazon Resource +// Name (ARN). You specify the tag by using a key-value pair. You can apply +// a tag to just one private CA if you want to identify a specific characteristic +// of that CA, or you can apply the same tag to multiple private CAs if you +// want to filter for a common relationship among those CAs. To remove one or +// more tags, use the UntagCertificateAuthority function. Call the ListTags +// function to see what tags are associated with your CA. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation TagCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidTagException "InvalidTagException" +// The tag associated with the CA is not valid. The invalid argument is contained +// in the message field. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// You can associate up to 50 tags with a private CA. Exception information +// is contained in the exception message field. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority +func (c *ACMPCA) TagCertificateAuthority(input *TagCertificateAuthorityInput) (*TagCertificateAuthorityOutput, error) { + req, out := c.TagCertificateAuthorityRequest(input) + return out, req.Send() +} + +// TagCertificateAuthorityWithContext is the same as TagCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See TagCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) TagCertificateAuthorityWithContext(ctx aws.Context, input *TagCertificateAuthorityInput, opts ...request.Option) (*TagCertificateAuthorityOutput, error) { + req, out := c.TagCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagCertificateAuthority = "UntagCertificateAuthority" + +// UntagCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the UntagCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagCertificateAuthority for more information on using the UntagCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagCertificateAuthorityRequest method. +// req, resp := client.UntagCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority +func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthorityInput) (req *request.Request, output *UntagCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opUntagCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagCertificateAuthorityInput{} + } + + output = &UntagCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Remove one or more tags from your private CA. A tag consists of a key-value +// pair. If you do not specify the value portion of the tag when calling this +// function, the tag will be removed regardless of value. If you specify a value, +// the tag is removed only if it is associated with the specified value. To +// add tags to a private CA, use the TagCertificateAuthority. Call the ListTags +// function to see what tags are associated with your CA. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation UntagCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidTagException "InvalidTagException" +// The tag associated with the CA is not valid. The invalid argument is contained +// in the message field. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority +func (c *ACMPCA) UntagCertificateAuthority(input *UntagCertificateAuthorityInput) (*UntagCertificateAuthorityOutput, error) { + req, out := c.UntagCertificateAuthorityRequest(input) + return out, req.Send() +} + +// UntagCertificateAuthorityWithContext is the same as UntagCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See UntagCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) UntagCertificateAuthorityWithContext(ctx aws.Context, input *UntagCertificateAuthorityInput, opts ...request.Option) (*UntagCertificateAuthorityOutput, error) { + req, out := c.UntagCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCertificateAuthority = "UpdateCertificateAuthority" + +// UpdateCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCertificateAuthority for more information on using the UpdateCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCertificateAuthorityRequest method. +// req, resp := client.UpdateCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority +func (c *ACMPCA) UpdateCertificateAuthorityRequest(input *UpdateCertificateAuthorityInput) (req *request.Request, output *UpdateCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opUpdateCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateCertificateAuthorityInput{} + } + + output = &UpdateCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Updates the status or configuration of a private certificate authority (CA). +// Your private CA must be in the ACTIVE or DISABLED state before you can update +// it. You can disable a private CA that is in the ACTIVE state or make a CA +// that is in the DISABLED state active again. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation UpdateCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// A previous update to your private CA is still ongoing. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidArgsException "InvalidArgsException" +// One or more of the specified arguments was not valid. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidPolicyException "InvalidPolicyException" +// The S3 bucket policy is not valid. The policy must give ACM PCA rights to +// read from and write to the bucket and find the bucket location. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority +func (c *ACMPCA) UpdateCertificateAuthority(input *UpdateCertificateAuthorityInput) (*UpdateCertificateAuthorityOutput, error) { + req, out := c.UpdateCertificateAuthorityRequest(input) + return out, req.Send() +} + +// UpdateCertificateAuthorityWithContext is the same as UpdateCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) UpdateCertificateAuthorityWithContext(ctx aws.Context, input *UpdateCertificateAuthorityInput, opts ...request.Option) (*UpdateCertificateAuthorityOutput, error) { + req, out := c.UpdateCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Contains information about the certificate subject. The certificate can be +// one issued by your private certificate authority (CA) or it can be your private +// CA certificate. The Subject field in the certificate identifies the entity +// that owns or controls the public key in the certificate. The entity can be +// a user, computer, device, or service. The Subject must contain an X.500 distinguished +// name (DN). A DN is a sequence of relative distinguished names (RDNs). The +// RDNs are separated by commas in the certificate. The DN must be unique for +// each for each entity, but your private CA can issue more than one certificate +// with the same DN to the same entity. +type ASN1Subject struct { + _ struct{} `type:"structure"` + + // Fully qualified domain name (FQDN) associated with the certificate subject. + CommonName *string `type:"string"` + + // Two digit code that specifies the country in which the certificate subject + // located. + Country *string `type:"string"` + + // Disambiguating information for the certificate subject. + DistinguishedNameQualifier *string `type:"string"` + + // Typically a qualifier appended to the name of an individual. Examples include + // Jr. for junior, Sr. for senior, and III for third. + GenerationQualifier *string `type:"string"` + + // First name. + GivenName *string `type:"string"` + + // Concatenation that typically contains the first letter of the GivenName, + // the first letter of the middle name if one exists, and the first letter of + // the SurName. + Initials *string `type:"string"` + + // The locality (such as a city or town) in which the certificate subject is + // located. + Locality *string `type:"string"` + + // Legal name of the organization with which the certificate subject is affiliated. + Organization *string `type:"string"` + + // A subdivision or unit of the organization (such as sales or finance) with + // which the certificate subject is affiliated. + OrganizationalUnit *string `type:"string"` + + // Typically a shortened version of a longer GivenName. For example, Jonathan + // is often shortened to John. Elizabeth is often shortened to Beth, Liz, or + // Eliza. + Pseudonym *string `type:"string"` + + // The certificate serial number. + SerialNumber *string `type:"string"` + + // State in which the subject of the certificate is located. + State *string `type:"string"` + + // Family name. In the US and the UK for example, the surname of an individual + // is ordered last. In Asian cultures the surname is typically ordered first. + Surname *string `type:"string"` + + // A title such as Mr. or Ms. which is pre-pended to the name to refer formally + // to the certificate subject. + Title *string `type:"string"` +} + +// String returns the string representation +func (s ASN1Subject) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ASN1Subject) GoString() string { + return s.String() +} + +// SetCommonName sets the CommonName field's value. +func (s *ASN1Subject) SetCommonName(v string) *ASN1Subject { + s.CommonName = &v + return s +} + +// SetCountry sets the Country field's value. +func (s *ASN1Subject) SetCountry(v string) *ASN1Subject { + s.Country = &v + return s +} + +// SetDistinguishedNameQualifier sets the DistinguishedNameQualifier field's value. +func (s *ASN1Subject) SetDistinguishedNameQualifier(v string) *ASN1Subject { + s.DistinguishedNameQualifier = &v + return s +} + +// SetGenerationQualifier sets the GenerationQualifier field's value. +func (s *ASN1Subject) SetGenerationQualifier(v string) *ASN1Subject { + s.GenerationQualifier = &v + return s +} + +// SetGivenName sets the GivenName field's value. +func (s *ASN1Subject) SetGivenName(v string) *ASN1Subject { + s.GivenName = &v + return s +} + +// SetInitials sets the Initials field's value. +func (s *ASN1Subject) SetInitials(v string) *ASN1Subject { + s.Initials = &v + return s +} + +// SetLocality sets the Locality field's value. +func (s *ASN1Subject) SetLocality(v string) *ASN1Subject { + s.Locality = &v + return s +} + +// SetOrganization sets the Organization field's value. +func (s *ASN1Subject) SetOrganization(v string) *ASN1Subject { + s.Organization = &v + return s +} + +// SetOrganizationalUnit sets the OrganizationalUnit field's value. +func (s *ASN1Subject) SetOrganizationalUnit(v string) *ASN1Subject { + s.OrganizationalUnit = &v + return s +} + +// SetPseudonym sets the Pseudonym field's value. +func (s *ASN1Subject) SetPseudonym(v string) *ASN1Subject { + s.Pseudonym = &v + return s +} + +// SetSerialNumber sets the SerialNumber field's value. +func (s *ASN1Subject) SetSerialNumber(v string) *ASN1Subject { + s.SerialNumber = &v + return s +} + +// SetState sets the State field's value. +func (s *ASN1Subject) SetState(v string) *ASN1Subject { + s.State = &v + return s +} + +// SetSurname sets the Surname field's value. +func (s *ASN1Subject) SetSurname(v string) *ASN1Subject { + s.Surname = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *ASN1Subject) SetTitle(v string) *ASN1Subject { + s.Title = &v + return s +} + +// Contains information about your private certificate authority (CA). Your +// private CA can issue and revoke X.509 digital certificates. Digital certificates +// verify that the entity named in the certificate Subject field owns or controls +// the public key contained in the Subject Public Key Info field. Call the CreateCertificateAuthority +// function to create your private CA. You must then call the GetCertificateAuthorityCertificate +// function to retrieve a private CA certificate signing request (CSR). Take +// the CSR to your on-premises CA and sign it with the root CA certificate or +// a subordinate certificate. Call the ImportCertificateAuthorityCertificate +// function to import the signed certificate into AWS Certificate Manager (ACM). +type CertificateAuthority struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) for your private certificate authority (CA). The + // format is 12345678-1234-1234-1234-123456789012. + Arn *string `min:"5" type:"string"` + + // Your private CA configuration. + CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure"` + + // Date and time at which your private CA was created. + CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Reason the request to create your private CA failed. + FailureReason *string `type:"string" enum:"FailureReason"` + + // Date and time at which your private CA was last updated. + LastStateChangeAt *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Date and time after which your private CA certificate is not valid. + NotAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Date and time before which your private CA certificate is not valid. + NotBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Information about the certificate revocation list (CRL) created and maintained + // by your private CA. + RevocationConfiguration *RevocationConfiguration `type:"structure"` + + // Serial number of your private CA. + Serial *string `type:"string"` + + // Status of your private CA. + Status *string `type:"string" enum:"CertificateAuthorityStatus"` + + // Type of your private CA. + Type *string `type:"string" enum:"CertificateAuthorityType"` +} + +// String returns the string representation +func (s CertificateAuthority) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthority) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CertificateAuthority) SetArn(v string) *CertificateAuthority { + s.Arn = &v + return s +} + +// SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value. +func (s *CertificateAuthority) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CertificateAuthority { + s.CertificateAuthorityConfiguration = v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *CertificateAuthority) SetCreatedAt(v time.Time) *CertificateAuthority { + s.CreatedAt = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *CertificateAuthority) SetFailureReason(v string) *CertificateAuthority { + s.FailureReason = &v + return s +} + +// SetLastStateChangeAt sets the LastStateChangeAt field's value. +func (s *CertificateAuthority) SetLastStateChangeAt(v time.Time) *CertificateAuthority { + s.LastStateChangeAt = &v + return s +} + +// SetNotAfter sets the NotAfter field's value. +func (s *CertificateAuthority) SetNotAfter(v time.Time) *CertificateAuthority { + s.NotAfter = &v + return s +} + +// SetNotBefore sets the NotBefore field's value. +func (s *CertificateAuthority) SetNotBefore(v time.Time) *CertificateAuthority { + s.NotBefore = &v + return s +} + +// SetRevocationConfiguration sets the RevocationConfiguration field's value. +func (s *CertificateAuthority) SetRevocationConfiguration(v *RevocationConfiguration) *CertificateAuthority { + s.RevocationConfiguration = v + return s +} + +// SetSerial sets the Serial field's value. +func (s *CertificateAuthority) SetSerial(v string) *CertificateAuthority { + s.Serial = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CertificateAuthority) SetStatus(v string) *CertificateAuthority { + s.Status = &v + return s +} + +// SetType sets the Type field's value. +func (s *CertificateAuthority) SetType(v string) *CertificateAuthority { + s.Type = &v + return s +} + +// Contains configuration information for your private certificate authority +// (CA). This includes information about the class of public key algorithm and +// the key pair that your private CA creates when it issues a certificate, the +// signature algorithm it uses used when issuing certificates, and its X.500 +// distinguished name. You must specify this information when you call the CreateCertificateAuthority +// function. +type CertificateAuthorityConfiguration struct { + _ struct{} `type:"structure"` + + // Type of the public key algorithm and size, in bits, of the key pair that + // your key pair creates when it issues a certificate. + // + // KeyAlgorithm is a required field + KeyAlgorithm *string `type:"string" required:"true" enum:"KeyAlgorithm"` + + // Name of the algorithm your private CA uses to sign certificate requests. + // + // SigningAlgorithm is a required field + SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"` + + // Structure that contains X.500 distinguished name information for your private + // CA. + // + // Subject is a required field + Subject *ASN1Subject `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CertificateAuthorityConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthorityConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CertificateAuthorityConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CertificateAuthorityConfiguration"} + if s.KeyAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("KeyAlgorithm")) + } + if s.SigningAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm")) + } + if s.Subject == nil { + invalidParams.Add(request.NewErrParamRequired("Subject")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyAlgorithm sets the KeyAlgorithm field's value. +func (s *CertificateAuthorityConfiguration) SetKeyAlgorithm(v string) *CertificateAuthorityConfiguration { + s.KeyAlgorithm = &v + return s +} + +// SetSigningAlgorithm sets the SigningAlgorithm field's value. +func (s *CertificateAuthorityConfiguration) SetSigningAlgorithm(v string) *CertificateAuthorityConfiguration { + s.SigningAlgorithm = &v + return s +} + +// SetSubject sets the Subject field's value. +func (s *CertificateAuthorityConfiguration) SetSubject(v *ASN1Subject) *CertificateAuthorityConfiguration { + s.Subject = v + return s +} + +type CreateCertificateAuthorityAuditReportInput struct { + _ struct{} `type:"structure"` + + // Format in which to create the report. This can be either JSON or CSV. + // + // AuditReportResponseFormat is a required field + AuditReportResponseFormat *string `type:"string" required:"true" enum:"AuditReportResponseFormat"` + + // Amazon Resource Name (ARN) of the CA to be audited. This is of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Name of the S3 bucket that will contain the audit report. + // + // S3BucketName is a required field + S3BucketName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityAuditReportInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityAuditReportInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCertificateAuthorityAuditReportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityAuditReportInput"} + if s.AuditReportResponseFormat == nil { + invalidParams.Add(request.NewErrParamRequired("AuditReportResponseFormat")) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.S3BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("S3BucketName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuditReportResponseFormat sets the AuditReportResponseFormat field's value. +func (s *CreateCertificateAuthorityAuditReportInput) SetAuditReportResponseFormat(v string) *CreateCertificateAuthorityAuditReportInput { + s.AuditReportResponseFormat = &v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *CreateCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityAuditReportInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *CreateCertificateAuthorityAuditReportInput) SetS3BucketName(v string) *CreateCertificateAuthorityAuditReportInput { + s.S3BucketName = &v + return s +} + +type CreateCertificateAuthorityAuditReportOutput struct { + _ struct{} `type:"structure"` + + // An alphanumeric string that contains a report identifier. + AuditReportId *string `min:"36" type:"string"` + + // The key that uniquely identifies the report file in your S3 bucket. + S3Key *string `type:"string"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityAuditReportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityAuditReportOutput) GoString() string { + return s.String() +} + +// SetAuditReportId sets the AuditReportId field's value. +func (s *CreateCertificateAuthorityAuditReportOutput) SetAuditReportId(v string) *CreateCertificateAuthorityAuditReportOutput { + s.AuditReportId = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *CreateCertificateAuthorityAuditReportOutput) SetS3Key(v string) *CreateCertificateAuthorityAuditReportOutput { + s.S3Key = &v + return s +} + +type CreateCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // Name and bit size of the private key algorithm, the name of the signing algorithm, + // and X.500 certificate subject information. + // + // CertificateAuthorityConfiguration is a required field + CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure" required:"true"` + + // The type of the certificate authority. Currently, this must be SUBORDINATE. + // + // CertificateAuthorityType is a required field + CertificateAuthorityType *string `type:"string" required:"true" enum:"CertificateAuthorityType"` + + // Alphanumeric string that can be used to distinguish between calls to CreateCertificateAuthority. + // Idempotency tokens time out after five minutes. Therefore, if you call CreateCertificateAuthority + // multiple times with the same idempotency token within a five minute period, + // ACM PCA recognizes that you are requesting only one certificate and will + // issue only one. If you change the idempotency token for each call, however, + // ACM PCA recognizes that you are requesting multiple certificates. + IdempotencyToken *string `min:"1" type:"string"` + + // Contains a Boolean value that you can use to enable a certification revocation + // list (CRL) for the CA, the name of the S3 bucket to which ACM PCA will write + // the CRL, and an optional CNAME alias that you can use to hide the name of + // your bucket in the CRL Distribution Points extension of your CA certificate. + // For more information, see the CrlConfiguration structure. + RevocationConfiguration *RevocationConfiguration `type:"structure"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityInput"} + if s.CertificateAuthorityConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityConfiguration")) + } + if s.CertificateAuthorityType == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityType")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.CertificateAuthorityConfiguration != nil { + if err := s.CertificateAuthorityConfiguration.Validate(); err != nil { + invalidParams.AddNested("CertificateAuthorityConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.RevocationConfiguration != nil { + if err := s.RevocationConfiguration.Validate(); err != nil { + invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value. +func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CreateCertificateAuthorityInput { + s.CertificateAuthorityConfiguration = v + return s +} + +// SetCertificateAuthorityType sets the CertificateAuthorityType field's value. +func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityType(v string) *CreateCertificateAuthorityInput { + s.CertificateAuthorityType = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateCertificateAuthorityInput) SetIdempotencyToken(v string) *CreateCertificateAuthorityInput { + s.IdempotencyToken = &v + return s +} + +// SetRevocationConfiguration sets the RevocationConfiguration field's value. +func (s *CreateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *CreateCertificateAuthorityInput { + s.RevocationConfiguration = v + return s +} + +type CreateCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // If successful, the Amazon Resource Name (ARN) of the certificate authority + // (CA). This is of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + CertificateAuthorityArn *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s CreateCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *CreateCertificateAuthorityOutput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityOutput { + s.CertificateAuthorityArn = &v + return s +} + +// Contains configuration information for a certificate revocation list (CRL). +// Your private certificate authority (CA) creates base CRLs. Delta CRLs are +// not supported. You can enable CRLs for your new or an existing private CA +// by setting the Enabled parameter to true. Your private CA writes CRLs to +// an S3 bucket that you specify in the S3BucketName parameter. You can hide +// the name of your bucket by specifying a value for the CustomCname parameter. +// Your private CA copies the CNAME or the S3 bucket name to the CRL Distribution +// Points extension of each certificate it issues. Your S3 bucket policy must +// give write permission to ACM PCA. +// +// Your private CA uses the value in the ExpirationInDays parameter to calculate +// the nextUpdate field in the CRL. The CRL is refreshed at 1/2 the age of next +// update or when a certificate is revoked. When a certificate is revoked, it +// is recorded in the next CRL that is generated and in the next audit report. +// Only time valid certificates are listed in the CRL. Expired certificates +// are not included. +// +// CRLs contain the following fields: +// +// * Version: The current version number defined in RFC 5280 is V2. The integer +// value is 0x1. +// +// * Signature Algorithm: The name of the algorithm used to sign the CRL. +// +// * Issuer: The X.500 distinguished name of your private CA that issued +// the CRL. +// +// * Last Update: The issue date and time of this CRL. +// +// * Next Update: The day and time by which the next CRL will be issued. +// +// * Revoked Certificates: List of revoked certificates. Each list item contains +// the following information. +// +// Serial Number: The serial number, in hexadecimal format, of the revoked certificate. +// +// Revocation Date: Date and time the certificate was revoked. +// +// CRL Entry Extensions: Optional extensions for the CRL entry. +// +// X509v3 CRL Reason Code: Reason the certificate was revoked. +// +// * CRL Extensions: Optional extensions for the CRL. +// +// X509v3 Authority Key Identifier: Identifies the public key associated with +// the private key used to sign the certificate. +// +// X509v3 CRL Number:: Decimal sequence number for the CRL. +// +// * Signature Algorithm: Algorithm used by your private CA to sign the CRL. +// +// * Signature Value: Signature computed over the CRL. +// +// Certificate revocation lists created by ACM PCA are DER-encoded. You can +// use the following OpenSSL command to list a CRL. +// +// openssl crl -inform DER -text -in crl_path -noout +type CrlConfiguration struct { + _ struct{} `type:"structure"` + + // Name inserted into the certificate CRL Distribution Points extension that + // enables the use of an alias for the CRL distribution point. Use this value + // if you don't want the name of your S3 bucket to be public. + CustomCname *string `type:"string"` + + // Boolean value that specifies whether certificate revocation lists (CRLs) + // are enabled. You can use this value to enable certificate revocation for + // a new CA when you call the CreateCertificateAuthority function or for an + // existing CA when you call the UpdateCertificateAuthority function. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` + + // Number of days until a certificate expires. + ExpirationInDays *int64 `min:"1" type:"integer"` + + // Name of the S3 bucket that contains the CRL. If you do not provide a value + // for the CustomCname argument, the name of your S3 bucket is placed into the + // CRL Distribution Points extension of the issued certificate. You can change + // the name of your bucket by calling the UpdateCertificateAuthority function. + // You must specify a bucket policy that allows ACM PCA to write the CRL to + // your bucket. + S3BucketName *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s CrlConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CrlConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CrlConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CrlConfiguration"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.ExpirationInDays != nil && *s.ExpirationInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("ExpirationInDays", 1)) + } + if s.S3BucketName != nil && len(*s.S3BucketName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomCname sets the CustomCname field's value. +func (s *CrlConfiguration) SetCustomCname(v string) *CrlConfiguration { + s.CustomCname = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *CrlConfiguration) SetEnabled(v bool) *CrlConfiguration { + s.Enabled = &v + return s +} + +// SetExpirationInDays sets the ExpirationInDays field's value. +func (s *CrlConfiguration) SetExpirationInDays(v int64) *CrlConfiguration { + s.ExpirationInDays = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *CrlConfiguration) SetS3BucketName(v string) *CrlConfiguration { + s.S3BucketName = &v + return s +} + +type DeleteCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *DeleteCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DeleteCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +type DeleteCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCertificateAuthorityOutput) GoString() string { + return s.String() +} + +type DescribeCertificateAuthorityAuditReportInput struct { + _ struct{} `type:"structure"` + + // The report ID returned by calling the CreateCertificateAuthorityAuditReport + // function. + // + // AuditReportId is a required field + AuditReportId *string `min:"36" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the private CA. This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityAuditReportInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityAuditReportInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCertificateAuthorityAuditReportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityAuditReportInput"} + if s.AuditReportId == nil { + invalidParams.Add(request.NewErrParamRequired("AuditReportId")) + } + if s.AuditReportId != nil && len(*s.AuditReportId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("AuditReportId", 36)) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuditReportId sets the AuditReportId field's value. +func (s *DescribeCertificateAuthorityAuditReportInput) SetAuditReportId(v string) *DescribeCertificateAuthorityAuditReportInput { + s.AuditReportId = &v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *DescribeCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityAuditReportInput { + s.CertificateAuthorityArn = &v + return s +} + +type DescribeCertificateAuthorityAuditReportOutput struct { + _ struct{} `type:"structure"` + + // Specifies whether report creation is in progress, has succeeded, or has failed. + AuditReportStatus *string `type:"string" enum:"AuditReportStatus"` + + // The date and time at which the report was created. + CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Name of the S3 bucket that contains the report. + S3BucketName *string `type:"string"` + + // S3 key that uniquely identifies the report file in your S3 bucket. + S3Key *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityAuditReportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityAuditReportOutput) GoString() string { + return s.String() +} + +// SetAuditReportStatus sets the AuditReportStatus field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetAuditReportStatus(v string) *DescribeCertificateAuthorityAuditReportOutput { + s.AuditReportStatus = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetCreatedAt(v time.Time) *DescribeCertificateAuthorityAuditReportOutput { + s.CreatedAt = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3BucketName(v string) *DescribeCertificateAuthorityAuditReportOutput { + s.S3BucketName = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3Key(v string) *DescribeCertificateAuthorityAuditReportOutput { + s.S3Key = &v + return s +} + +type DescribeCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *DescribeCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +type DescribeCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // A CertificateAuthority structure that contains information about your private + // CA. + CertificateAuthority *CertificateAuthority `type:"structure"` +} + +// String returns the string representation +func (s DescribeCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthority sets the CertificateAuthority field's value. +func (s *DescribeCertificateAuthorityOutput) SetCertificateAuthority(v *CertificateAuthority) *DescribeCertificateAuthorityOutput { + s.CertificateAuthority = v + return s +} + +type GetCertificateAuthorityCertificateInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of your private CA. This is of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCertificateAuthorityCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCertificateInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *GetCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +type GetCertificateAuthorityCertificateOutput struct { + _ struct{} `type:"structure"` + + // Base64-encoded certificate authority (CA) certificate. + Certificate *string `type:"string"` + + // Base64-encoded certificate chain that includes any intermediate certificates + // and chains up to root on-premises certificate that you used to sign your + // private CA certificate. The chain does not include your private CA certificate. + CertificateChain *string `type:"string"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificate sets the Certificate field's value. +func (s *GetCertificateAuthorityCertificateOutput) SetCertificate(v string) *GetCertificateAuthorityCertificateOutput { + s.Certificate = &v + return s +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *GetCertificateAuthorityCertificateOutput) SetCertificateChain(v string) *GetCertificateAuthorityCertificateOutput { + s.CertificateChain = &v + return s +} + +type GetCertificateAuthorityCsrInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + // function. This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCsrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCsrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCertificateAuthorityCsrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCsrInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *GetCertificateAuthorityCsrInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCsrInput { + s.CertificateAuthorityArn = &v + return s +} + +type GetCertificateAuthorityCsrOutput struct { + _ struct{} `type:"structure"` + + // The base64 PEM-encoded certificate signing request (CSR) for your private + // CA certificate. + Csr *string `type:"string"` +} + +// String returns the string representation +func (s GetCertificateAuthorityCsrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateAuthorityCsrOutput) GoString() string { + return s.String() +} + +// SetCsr sets the Csr field's value. +func (s *GetCertificateAuthorityCsrOutput) SetCsr(v string) *GetCertificateAuthorityCsrOutput { + s.Csr = &v + return s +} + +type GetCertificateInput struct { + _ struct{} `type:"structure"` + + // The ARN of the issued certificate. The ARN contains the certificate serial + // number and must be in the following form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 + // + // CertificateArn is a required field + CertificateArn *string `min:"5" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCertificateInput"} + if s.CertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateArn")) + } + if s.CertificateArn != nil && len(*s.CertificateArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 5)) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *GetCertificateInput) SetCertificateArn(v string) *GetCertificateInput { + s.CertificateArn = &v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *GetCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +type GetCertificateOutput struct { + _ struct{} `type:"structure"` + + // The base64 PEM-encoded certificate specified by the CertificateArn parameter. + Certificate *string `type:"string"` + + // The base64 PEM-encoded certificate chain that chains up to the on-premises + // root CA certificate that you used to sign your private CA certificate. + CertificateChain *string `type:"string"` +} + +// String returns the string representation +func (s GetCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificate sets the Certificate field's value. +func (s *GetCertificateOutput) SetCertificate(v string) *GetCertificateOutput { + s.Certificate = &v + return s +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *GetCertificateOutput) SetCertificateChain(v string) *GetCertificateOutput { + s.CertificateChain = &v + return s +} + +type ImportCertificateAuthorityCertificateInput struct { + _ struct{} `type:"structure"` + + // The PEM-encoded certificate for your private CA. This must be signed by using + // your on-premises CA. + // + // Certificate is automatically base64 encoded/decoded by the SDK. + // + // Certificate is a required field + Certificate []byte `min:"1" type:"blob" required:"true"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // A PEM-encoded file that contains all of your certificates, other than the + // certificate you're importing, chaining up to your root CA. Your on-premises + // root certificate is the last in the chain, and each certificate in the chain + // signs the one preceding. + // + // CertificateChain is automatically base64 encoded/decoded by the SDK. + // + // CertificateChain is a required field + CertificateChain []byte `type:"blob" required:"true"` +} + +// String returns the string representation +func (s ImportCertificateAuthorityCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportCertificateAuthorityCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportCertificateAuthorityCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportCertificateAuthorityCertificateInput"} + if s.Certificate == nil { + invalidParams.Add(request.NewErrParamRequired("Certificate")) + } + if s.Certificate != nil && len(s.Certificate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Certificate", 1)) + } + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.CertificateChain == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateChain")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificate sets the Certificate field's value. +func (s *ImportCertificateAuthorityCertificateInput) SetCertificate(v []byte) *ImportCertificateAuthorityCertificateInput { + s.Certificate = v + return s +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *ImportCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *ImportCertificateAuthorityCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetCertificateChain sets the CertificateChain field's value. +func (s *ImportCertificateAuthorityCertificateInput) SetCertificateChain(v []byte) *ImportCertificateAuthorityCertificateInput { + s.CertificateChain = v + return s +} + +type ImportCertificateAuthorityCertificateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ImportCertificateAuthorityCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportCertificateAuthorityCertificateOutput) GoString() string { + return s.String() +} + +type IssueCertificateInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // The certificate signing request (CSR) for the certificate you want to issue. + // You can use the following OpenSSL command to create the CSR and a 2048 bit + // RSA private key. + // + // openssl req -new -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem + // -out csr/test_cert_.csr + // + // If you have a configuration file, you can use the following OpenSSL command. + // The usr_cert block in the configuration file contains your X509 version 3 + // extensions. + // + // openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey rsa:2048 + // -days -365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csr + // + // Csr is automatically base64 encoded/decoded by the SDK. + // + // Csr is a required field + Csr []byte `min:"1" type:"blob" required:"true"` + + // Custom string that can be used to distinguish between calls to the IssueCertificate + // function. Idempotency tokens time out after one hour. Therefore, if you call + // IssueCertificate multiple times with the same idempotency token within 5 + // minutes, ACM PCA recognizes that you are requesting only one certificate + // and will issue only one. If you change the idempotency token for each call, + // PCA recognizes that you are requesting multiple certificates. + IdempotencyToken *string `min:"1" type:"string"` + + // The name of the algorithm that will be used to sign the certificate to be + // issued. + // + // SigningAlgorithm is a required field + SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"` + + // The type of the validity period. + // + // Validity is a required field + Validity *Validity `type:"structure" required:"true"` +} + +// String returns the string representation +func (s IssueCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IssueCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IssueCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IssueCertificateInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.Csr == nil { + invalidParams.Add(request.NewErrParamRequired("Csr")) + } + if s.Csr != nil && len(s.Csr) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Csr", 1)) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.SigningAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm")) + } + if s.Validity == nil { + invalidParams.Add(request.NewErrParamRequired("Validity")) + } + if s.Validity != nil { + if err := s.Validity.Validate(); err != nil { + invalidParams.AddNested("Validity", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *IssueCertificateInput) SetCertificateAuthorityArn(v string) *IssueCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetCsr sets the Csr field's value. +func (s *IssueCertificateInput) SetCsr(v []byte) *IssueCertificateInput { + s.Csr = v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *IssueCertificateInput) SetIdempotencyToken(v string) *IssueCertificateInput { + s.IdempotencyToken = &v + return s +} + +// SetSigningAlgorithm sets the SigningAlgorithm field's value. +func (s *IssueCertificateInput) SetSigningAlgorithm(v string) *IssueCertificateInput { + s.SigningAlgorithm = &v + return s +} + +// SetValidity sets the Validity field's value. +func (s *IssueCertificateInput) SetValidity(v *Validity) *IssueCertificateInput { + s.Validity = v + return s +} + +type IssueCertificateOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the issued certificate and the certificate + // serial number. This is of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 + CertificateArn *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s IssueCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IssueCertificateOutput) GoString() string { + return s.String() +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *IssueCertificateOutput) SetCertificateArn(v string) *IssueCertificateOutput { + s.CertificateArn = &v + return s +} + +type ListCertificateAuthoritiesInput struct { + _ struct{} `type:"structure"` + + // Use this parameter when paginating results to specify the maximum number + // of items to return in the response on each page. If additional items exist + // beyond the number you specify, the NextToken element is sent in the response. + // Use this NextToken value in a subsequent request to retrieve additional items. + MaxResults *int64 `min:"1" type:"integer"` + + // Use this parameter when paginating results in a subsequent request after + // you receive a response with truncated results. Set it to the value of the + // NextToken parameter from the response you just received. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListCertificateAuthoritiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCertificateAuthoritiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListCertificateAuthoritiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListCertificateAuthoritiesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListCertificateAuthoritiesInput) SetMaxResults(v int64) *ListCertificateAuthoritiesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCertificateAuthoritiesInput) SetNextToken(v string) *ListCertificateAuthoritiesInput { + s.NextToken = &v + return s +} + +type ListCertificateAuthoritiesOutput struct { + _ struct{} `type:"structure"` + + // Summary information about each certificate authority you have created. + CertificateAuthorities []*CertificateAuthority `type:"list"` + + // When the list is truncated, this value is present and should be used for + // the NextToken parameter in a subsequent pagination request. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListCertificateAuthoritiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCertificateAuthoritiesOutput) GoString() string { + return s.String() +} + +// SetCertificateAuthorities sets the CertificateAuthorities field's value. +func (s *ListCertificateAuthoritiesOutput) SetCertificateAuthorities(v []*CertificateAuthority) *ListCertificateAuthoritiesOutput { + s.CertificateAuthorities = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCertificateAuthoritiesOutput) SetNextToken(v string) *ListCertificateAuthoritiesOutput { + s.NextToken = &v + return s +} + +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + // function. This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Use this parameter when paginating results to specify the maximum number + // of items to return in the response. If additional items exist beyond the + // number you specify, the NextToken element is sent in the response. Use this + // NextToken value in a subsequent request to retrieve additional items. + MaxResults *int64 `min:"1" type:"integer"` + + // Use this parameter when paginating results in a subsequent request after + // you receive a response with truncated results. Set it to the value of NextToken + // from the response you just received. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *ListTagsInput) SetCertificateAuthorityArn(v string) *ListTagsInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { + s.NextToken = &v + return s +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + // When the list is truncated, this value is present and should be used for + // the NextToken parameter in a subsequent pagination request. + NextToken *string `min:"1" type:"string"` + + // The tags associated with your private CA. + Tags []*Tag `min:"1" type:"list"` +} + +// String returns the string representation +func (s ListTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { + s.Tags = v + return s +} + +// Certificate revocation information used by the CreateCertificateAuthority +// and UpdateCertificateAuthority functions. Your private certificate authority +// (CA) can create and maintain a certificate revocation list (CRL). A CRL contains +// information about certificates revoked by your CA. For more information, +// see RevokeCertificate. +type RevocationConfiguration struct { + _ struct{} `type:"structure"` + + // Configuration of the certificate revocation list (CRL), if any, maintained + // by your private CA. + CrlConfiguration *CrlConfiguration `type:"structure"` +} + +// String returns the string representation +func (s RevocationConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevocationConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevocationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevocationConfiguration"} + if s.CrlConfiguration != nil { + if err := s.CrlConfiguration.Validate(); err != nil { + invalidParams.AddNested("CrlConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCrlConfiguration sets the CrlConfiguration field's value. +func (s *RevocationConfiguration) SetCrlConfiguration(v *CrlConfiguration) *RevocationConfiguration { + s.CrlConfiguration = v + return s +} + +type RevokeCertificateInput struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the private CA that issued the certificate + // to be revoked. This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Serial number of the certificate to be revoked. This must be in hexadecimal + // format. You can retrieve the serial number by calling GetCertificate with + // the Amazon Resource Name (ARN) of the certificate you want and the ARN of + // your private CA. The GetCertificate function retrieves the certificate in + // the PEM format. You can use the following OpenSSL command to list the certificate + // in text format and copy the hexadecimal serial number. + // + // openssl x509 -in file_path -text -noout + // + // You can also copy the serial number from the console or use the DescribeCertificate + // (http://docs.aws.amazon.comacm/latest/APIReferenceAPI_DescribeCertificate.html) + // function in the AWS Certificate Manager API Reference. + // + // CertificateSerial is a required field + CertificateSerial *string `type:"string" required:"true"` + + // Specifies why you revoked the certificate. + // + // RevocationReason is a required field + RevocationReason *string `type:"string" required:"true" enum:"RevocationReason"` +} + +// String returns the string representation +func (s RevokeCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeCertificateInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.CertificateSerial == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateSerial")) + } + if s.RevocationReason == nil { + invalidParams.Add(request.NewErrParamRequired("RevocationReason")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *RevokeCertificateInput) SetCertificateAuthorityArn(v string) *RevokeCertificateInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetCertificateSerial sets the CertificateSerial field's value. +func (s *RevokeCertificateInput) SetCertificateSerial(v string) *RevokeCertificateInput { + s.CertificateSerial = &v + return s +} + +// SetRevocationReason sets the RevocationReason field's value. +func (s *RevokeCertificateInput) SetRevocationReason(v string) *RevokeCertificateInput { + s.RevocationReason = &v + return s +} + +type RevokeCertificateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RevokeCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeCertificateOutput) GoString() string { + return s.String() +} + +// Tags are labels that you can use to identify and organize your private CAs. +// Each tag consists of a key and an optional value. You can associate up to +// 50 tags with a private CA. To add one or more tags to a private CA, call +// the TagCertificateAuthority function. To remove a tag, call the UntagCertificateAuthority +// function. +type Tag struct { + _ struct{} `type:"structure"` + + // Key (name) of the tag. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // Value of the tag. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // List of tags to be associated with the CA. + // + // Tags is a required field + Tags []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *TagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *TagCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagCertificateAuthorityInput) SetTags(v []*Tag) *TagCertificateAuthorityInput { + s.Tags = v + return s +} + +type TagCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagCertificateAuthorityOutput) GoString() string { + return s.String() +} + +type UntagCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. + // This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // List of tags to be removed from the CA. + // + // Tags is a required field + Tags []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *UntagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UntagCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *UntagCertificateAuthorityInput) SetTags(v []*Tag) *UntagCertificateAuthorityInput { + s.Tags = v + return s +} + +type UntagCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagCertificateAuthorityOutput) GoString() string { + return s.String() +} + +type UpdateCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the private CA that issued the certificate + // to be revoked. This must be of the form: + // + // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // Revocation information for your private CA. + RevocationConfiguration *RevocationConfiguration `type:"structure"` + + // Status of your private CA. + Status *string `type:"string" enum:"CertificateAuthorityStatus"` +} + +// String returns the string representation +func (s UpdateCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + if s.RevocationConfiguration != nil { + if err := s.RevocationConfiguration.Validate(); err != nil { + invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *UpdateCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UpdateCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +// SetRevocationConfiguration sets the RevocationConfiguration field's value. +func (s *UpdateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *UpdateCertificateAuthorityInput { + s.RevocationConfiguration = v + return s +} + +// SetStatus sets the Status field's value. +func (s *UpdateCertificateAuthorityInput) SetStatus(v string) *UpdateCertificateAuthorityInput { + s.Status = &v + return s +} + +type UpdateCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// Length of time for which the certificate issued by your private certificate +// authority (CA), or by the private CA itself, is valid in days, months, or +// years. You can issue a certificate by calling the IssueCertificate function. +type Validity struct { + _ struct{} `type:"structure"` + + // Specifies whether the Value parameter represents days, months, or years. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"ValidityPeriodType"` + + // Time period. + // + // Value is a required field + Value *int64 `min:"1" type:"long" required:"true"` +} + +// String returns the string representation +func (s Validity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Validity) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Validity) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Validity"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && *s.Value < 1 { + invalidParams.Add(request.NewErrParamMinValue("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetType sets the Type field's value. +func (s *Validity) SetType(v string) *Validity { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Validity) SetValue(v int64) *Validity { + s.Value = &v + return s +} + +const ( + // AuditReportResponseFormatJson is a AuditReportResponseFormat enum value + AuditReportResponseFormatJson = "JSON" + + // AuditReportResponseFormatCsv is a AuditReportResponseFormat enum value + AuditReportResponseFormatCsv = "CSV" +) + +const ( + // AuditReportStatusCreating is a AuditReportStatus enum value + AuditReportStatusCreating = "CREATING" + + // AuditReportStatusSuccess is a AuditReportStatus enum value + AuditReportStatusSuccess = "SUCCESS" + + // AuditReportStatusFailed is a AuditReportStatus enum value + AuditReportStatusFailed = "FAILED" +) + +const ( + // CertificateAuthorityStatusCreating is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusCreating = "CREATING" + + // CertificateAuthorityStatusPendingCertificate is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusPendingCertificate = "PENDING_CERTIFICATE" + + // CertificateAuthorityStatusActive is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusActive = "ACTIVE" + + // CertificateAuthorityStatusDisabled is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusDisabled = "DISABLED" + + // CertificateAuthorityStatusExpired is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusExpired = "EXPIRED" + + // CertificateAuthorityStatusFailed is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusFailed = "FAILED" +) + +const ( + // CertificateAuthorityTypeSubordinate is a CertificateAuthorityType enum value + CertificateAuthorityTypeSubordinate = "SUBORDINATE" +) + +const ( + // FailureReasonRequestTimedOut is a FailureReason enum value + FailureReasonRequestTimedOut = "REQUEST_TIMED_OUT" + + // FailureReasonUnsupportedAlgorithm is a FailureReason enum value + FailureReasonUnsupportedAlgorithm = "UNSUPPORTED_ALGORITHM" + + // FailureReasonOther is a FailureReason enum value + FailureReasonOther = "OTHER" +) + +const ( + // KeyAlgorithmRsa2048 is a KeyAlgorithm enum value + KeyAlgorithmRsa2048 = "RSA_2048" + + // KeyAlgorithmRsa4096 is a KeyAlgorithm enum value + KeyAlgorithmRsa4096 = "RSA_4096" + + // KeyAlgorithmEcPrime256v1 is a KeyAlgorithm enum value + KeyAlgorithmEcPrime256v1 = "EC_prime256v1" + + // KeyAlgorithmEcSecp384r1 is a KeyAlgorithm enum value + KeyAlgorithmEcSecp384r1 = "EC_secp384r1" +) + +const ( + // RevocationReasonUnspecified is a RevocationReason enum value + RevocationReasonUnspecified = "UNSPECIFIED" + + // RevocationReasonKeyCompromise is a RevocationReason enum value + RevocationReasonKeyCompromise = "KEY_COMPROMISE" + + // RevocationReasonCertificateAuthorityCompromise is a RevocationReason enum value + RevocationReasonCertificateAuthorityCompromise = "CERTIFICATE_AUTHORITY_COMPROMISE" + + // RevocationReasonAffiliationChanged is a RevocationReason enum value + RevocationReasonAffiliationChanged = "AFFILIATION_CHANGED" + + // RevocationReasonSuperseded is a RevocationReason enum value + RevocationReasonSuperseded = "SUPERSEDED" + + // RevocationReasonCessationOfOperation is a RevocationReason enum value + RevocationReasonCessationOfOperation = "CESSATION_OF_OPERATION" + + // RevocationReasonPrivilegeWithdrawn is a RevocationReason enum value + RevocationReasonPrivilegeWithdrawn = "PRIVILEGE_WITHDRAWN" + + // RevocationReasonAACompromise is a RevocationReason enum value + RevocationReasonAACompromise = "A_A_COMPROMISE" +) + +const ( + // SigningAlgorithmSha256withecdsa is a SigningAlgorithm enum value + SigningAlgorithmSha256withecdsa = "SHA256WITHECDSA" + + // SigningAlgorithmSha384withecdsa is a SigningAlgorithm enum value + SigningAlgorithmSha384withecdsa = "SHA384WITHECDSA" + + // SigningAlgorithmSha512withecdsa is a SigningAlgorithm enum value + SigningAlgorithmSha512withecdsa = "SHA512WITHECDSA" + + // SigningAlgorithmSha256withrsa is a SigningAlgorithm enum value + SigningAlgorithmSha256withrsa = "SHA256WITHRSA" + + // SigningAlgorithmSha384withrsa is a SigningAlgorithm enum value + SigningAlgorithmSha384withrsa = "SHA384WITHRSA" + + // SigningAlgorithmSha512withrsa is a SigningAlgorithm enum value + SigningAlgorithmSha512withrsa = "SHA512WITHRSA" +) + +const ( + // ValidityPeriodTypeEndDate is a ValidityPeriodType enum value + ValidityPeriodTypeEndDate = "END_DATE" + + // ValidityPeriodTypeAbsolute is a ValidityPeriodType enum value + ValidityPeriodTypeAbsolute = "ABSOLUTE" + + // ValidityPeriodTypeDays is a ValidityPeriodType enum value + ValidityPeriodTypeDays = "DAYS" + + // ValidityPeriodTypeMonths is a ValidityPeriodType enum value + ValidityPeriodTypeMonths = "MONTHS" + + // ValidityPeriodTypeYears is a ValidityPeriodType enum value + ValidityPeriodTypeYears = "YEARS" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go new file mode 100644 index 00000000000..f20c964ff94 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go @@ -0,0 +1,55 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package acmpca provides the client and types for making API +// requests to AWS Certificate Manager Private Certificate Authority. +// +// You can use the ACM PCA API to create a private certificate authority (CA). +// You must first call the CreateCertificateAuthority function. If successful, +// the function returns an Amazon Resource Name (ARN) for your private CA. Use +// this ARN as input to the GetCertificateAuthorityCsr function to retrieve +// the certificate signing request (CSR) for your private CA certificate. Sign +// the CSR using the root or an intermediate CA in your on-premises PKI hierarchy, +// and call the ImportCertificateAuthorityCertificate to import your signed +// private CA certificate into ACM PCA. +// +// Use your private CA to issue and revoke certificates. These are private certificates +// that identify and secure client computers, servers, applications, services, +// devices, and users over SSLS/TLS connections within your organization. Call +// the IssueCertificate function to issue a certificate. Call the RevokeCertificate +// function to revoke a certificate. +// +// Certificates issued by your private CA can be trusted only within your organization, +// not publicly. +// +// Your private CA can optionally create a certificate revocation list (CRL) +// to track the certificates you revoke. To create a CRL, you must specify a +// RevocationConfiguration object when you call the CreateCertificateAuthority +// function. ACM PCA writes the CRL to an S3 bucket that you specify. You must +// specify a bucket policy that grants ACM PCA write permission. +// +// You can also call the CreateCertificateAuthorityAuditReport to create an +// optional audit report that lists every time the CA private key is used. The +// private key is used for signing when the IssueCertificate or RevokeCertificate +// function is called. +// +// See https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22 for more information on this service. +// +// See acmpca package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/acmpca/ +// +// Using the Client +// +// To contact AWS Certificate Manager Private Certificate Authority with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Certificate Manager Private Certificate Authority client ACMPCA for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/acmpca/#New +package acmpca diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go new file mode 100644 index 00000000000..2614b5a42f3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go @@ -0,0 +1,109 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +const ( + + // ErrCodeCertificateMismatchException for service response error code + // "CertificateMismatchException". + // + // The certificate authority certificate you are importing does not comply with + // conditions specified in the certificate that signed it. + ErrCodeCertificateMismatchException = "CertificateMismatchException" + + // ErrCodeConcurrentModificationException for service response error code + // "ConcurrentModificationException". + // + // A previous update to your private CA is still ongoing. + ErrCodeConcurrentModificationException = "ConcurrentModificationException" + + // ErrCodeInvalidArgsException for service response error code + // "InvalidArgsException". + // + // One or more of the specified arguments was not valid. + ErrCodeInvalidArgsException = "InvalidArgsException" + + // ErrCodeInvalidArnException for service response error code + // "InvalidArnException". + // + // The requested Amazon Resource Name (ARN) does not refer to an existing resource. + ErrCodeInvalidArnException = "InvalidArnException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The token specified in the NextToken argument is not valid. Use the token + // returned from your previous call to ListCertificateAuthorities. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidPolicyException for service response error code + // "InvalidPolicyException". + // + // The S3 bucket policy is not valid. The policy must give ACM PCA rights to + // read from and write to the bucket and find the bucket location. + ErrCodeInvalidPolicyException = "InvalidPolicyException" + + // ErrCodeInvalidStateException for service response error code + // "InvalidStateException". + // + // The private CA is in a state during which a report cannot be generated. + ErrCodeInvalidStateException = "InvalidStateException" + + // ErrCodeInvalidTagException for service response error code + // "InvalidTagException". + // + // The tag associated with the CA is not valid. The invalid argument is contained + // in the message field. + ErrCodeInvalidTagException = "InvalidTagException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // An ACM PCA limit has been exceeded. See the exception message returned to + // determine the limit that was exceeded. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeMalformedCSRException for service response error code + // "MalformedCSRException". + // + // The certificate signing request is invalid. + ErrCodeMalformedCSRException = "MalformedCSRException" + + // ErrCodeMalformedCertificateException for service response error code + // "MalformedCertificateException". + // + // One or more fields in the certificate are invalid. + ErrCodeMalformedCertificateException = "MalformedCertificateException" + + // ErrCodeRequestAlreadyProcessedException for service response error code + // "RequestAlreadyProcessedException". + // + // Your request has already been completed. + ErrCodeRequestAlreadyProcessedException = "RequestAlreadyProcessedException" + + // ErrCodeRequestFailedException for service response error code + // "RequestFailedException". + // + // The request has failed for an unspecified reason. + ErrCodeRequestFailedException = "RequestFailedException" + + // ErrCodeRequestInProgressException for service response error code + // "RequestInProgressException". + // + // Your request is already in progress. + ErrCodeRequestInProgressException = "RequestInProgressException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // A resource such as a private CA, S3 bucket, certificate, or audit report + // cannot be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // You can associate up to 50 tags with a private CA. Exception information + // is contained in the exception message field. + ErrCodeTooManyTagsException = "TooManyTagsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go new file mode 100644 index 00000000000..2040a19f6d5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go @@ -0,0 +1,95 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +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" +) + +// ACMPCA provides the API operation methods for making requests to +// AWS Certificate Manager Private Certificate Authority. See this package's package overview docs +// for details on the service. +// +// ACMPCA methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type ACMPCA 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 = "acm-pca" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the ACMPCA 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 ACMPCA client from just a session. +// svc := acmpca.New(mySession) +// +// // Create a ACMPCA client with additional configuration +// svc := acmpca.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *ACMPCA { + 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) *ACMPCA { + svc := &ACMPCA{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-08-22", + JSONVersion: "1.1", + TargetPrefix: "ACMPrivateCA", + }, + 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 ACMPCA operation and runs any +// custom request initialization. +func (c *ACMPCA) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index 656830a9a16..95cf464ad4f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -16,7 +16,7 @@ const opCreateApiKey = "CreateApiKey" // CreateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateApiKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -112,7 +112,7 @@ const opCreateAuthorizer = "CreateAuthorizer" // CreateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the CreateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -204,7 +204,7 @@ const opCreateBasePathMapping = "CreateBasePathMapping" // CreateBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the CreateBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -295,7 +295,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -394,7 +394,7 @@ const opCreateDocumentationPart = "CreateDocumentationPart" // CreateDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the CreateDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -486,7 +486,7 @@ const opCreateDocumentationVersion = "CreateDocumentationVersion" // CreateDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -578,7 +578,7 @@ const opCreateDomainName = "CreateDomainName" // CreateDomainNameRequest generates a "aws/request.Request" representing the // client's request for the CreateDomainName operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -666,7 +666,7 @@ const opCreateModel = "CreateModel" // CreateModelRequest generates a "aws/request.Request" representing the // client's request for the CreateModel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -760,7 +760,7 @@ const opCreateRequestValidator = "CreateRequestValidator" // CreateRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the CreateRequestValidator operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -850,7 +850,7 @@ const opCreateResource = "CreateResource" // CreateResourceRequest generates a "aws/request.Request" representing the // client's request for the CreateResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -944,7 +944,7 @@ const opCreateRestApi = "CreateRestApi" // CreateRestApiRequest generates a "aws/request.Request" representing the // client's request for the CreateRestApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1031,7 +1031,7 @@ const opCreateStage = "CreateStage" // CreateStageRequest generates a "aws/request.Request" representing the // client's request for the CreateStage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1126,7 +1126,7 @@ const opCreateUsagePlan = "CreateUsagePlan" // CreateUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the CreateUsagePlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1221,7 +1221,7 @@ const opCreateUsagePlanKey = "CreateUsagePlanKey" // CreateUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateUsagePlanKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1312,7 +1312,7 @@ const opCreateVpcLink = "CreateVpcLink" // CreateVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcLink operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1399,7 +1399,7 @@ const opDeleteApiKey = "DeleteApiKey" // DeleteApiKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteApiKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1484,7 +1484,7 @@ const opDeleteAuthorizer = "DeleteAuthorizer" // DeleteAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DeleteAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1579,7 +1579,7 @@ const opDeleteBasePathMapping = "DeleteBasePathMapping" // DeleteBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the DeleteBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1672,7 +1672,7 @@ const opDeleteClientCertificate = "DeleteClientCertificate" // DeleteClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteClientCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1761,7 +1761,7 @@ const opDeleteDeployment = "DeleteDeployment" // DeleteDeploymentRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1851,7 +1851,7 @@ const opDeleteDocumentationPart = "DeleteDocumentationPart" // DeleteDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1942,7 +1942,7 @@ const opDeleteDocumentationVersion = "DeleteDocumentationVersion" // DeleteDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2033,7 +2033,7 @@ const opDeleteDomainName = "DeleteDomainName" // DeleteDomainNameRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomainName operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2118,7 +2118,7 @@ const opDeleteGatewayResponse = "DeleteGatewayResponse" // DeleteGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2212,7 +2212,7 @@ const opDeleteIntegration = "DeleteIntegration" // DeleteIntegrationRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntegration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2301,7 +2301,7 @@ const opDeleteIntegrationResponse = "DeleteIntegrationResponse" // DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2394,7 +2394,7 @@ const opDeleteMethod = "DeleteMethod" // DeleteMethodRequest generates a "aws/request.Request" representing the // client's request for the DeleteMethod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2483,7 +2483,7 @@ const opDeleteMethodResponse = "DeleteMethodResponse" // DeleteMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteMethodResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2576,7 +2576,7 @@ const opDeleteModel = "DeleteModel" // DeleteModelRequest generates a "aws/request.Request" representing the // client's request for the DeleteModel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2669,7 +2669,7 @@ const opDeleteRequestValidator = "DeleteRequestValidator" // DeleteRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the DeleteRequestValidator operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2762,7 +2762,7 @@ const opDeleteResource = "DeleteResource" // DeleteResourceRequest generates a "aws/request.Request" representing the // client's request for the DeleteResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2855,7 +2855,7 @@ const opDeleteRestApi = "DeleteRestApi" // DeleteRestApiRequest generates a "aws/request.Request" representing the // client's request for the DeleteRestApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2944,7 +2944,7 @@ const opDeleteStage = "DeleteStage" // DeleteStageRequest generates a "aws/request.Request" representing the // client's request for the DeleteStage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3033,7 +3033,7 @@ const opDeleteUsagePlan = "DeleteUsagePlan" // DeleteUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the DeleteUsagePlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3122,7 +3122,7 @@ const opDeleteUsagePlanKey = "DeleteUsagePlanKey" // DeleteUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteUsagePlanKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3216,7 +3216,7 @@ const opDeleteVpcLink = "DeleteVpcLink" // DeleteVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcLink operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3305,7 +3305,7 @@ const opFlushStageAuthorizersCache = "FlushStageAuthorizersCache" // FlushStageAuthorizersCacheRequest generates a "aws/request.Request" representing the // client's request for the FlushStageAuthorizersCache operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3394,7 +3394,7 @@ const opFlushStageCache = "FlushStageCache" // FlushStageCacheRequest generates a "aws/request.Request" representing the // client's request for the FlushStageCache operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3483,7 +3483,7 @@ const opGenerateClientCertificate = "GenerateClientCertificate" // GenerateClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the GenerateClientCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3566,7 +3566,7 @@ const opGetAccount = "GetAccount" // GetAccountRequest generates a "aws/request.Request" representing the // client's request for the GetAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3649,7 +3649,7 @@ const opGetApiKey = "GetApiKey" // GetApiKeyRequest generates a "aws/request.Request" representing the // client's request for the GetApiKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3732,7 +3732,7 @@ const opGetApiKeys = "GetApiKeys" // GetApiKeysRequest generates a "aws/request.Request" representing the // client's request for the GetApiKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3872,7 +3872,7 @@ const opGetAuthorizer = "GetAuthorizer" // GetAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3957,7 +3957,7 @@ const opGetAuthorizers = "GetAuthorizers" // GetAuthorizersRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4046,7 +4046,7 @@ const opGetBasePathMapping = "GetBasePathMapping" // GetBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the GetBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4129,7 +4129,7 @@ const opGetBasePathMappings = "GetBasePathMappings" // GetBasePathMappingsRequest generates a "aws/request.Request" representing the // client's request for the GetBasePathMappings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4268,7 +4268,7 @@ const opGetClientCertificate = "GetClientCertificate" // GetClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetClientCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4351,7 +4351,7 @@ const opGetClientCertificates = "GetClientCertificates" // GetClientCertificatesRequest generates a "aws/request.Request" representing the // client's request for the GetClientCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4491,7 +4491,7 @@ const opGetDeployment = "GetDeployment" // GetDeploymentRequest generates a "aws/request.Request" representing the // client's request for the GetDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4578,7 +4578,7 @@ const opGetDeployments = "GetDeployments" // GetDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the GetDeployments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4722,7 +4722,7 @@ const opGetDocumentationPart = "GetDocumentationPart" // GetDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4803,7 +4803,7 @@ const opGetDocumentationParts = "GetDocumentationParts" // GetDocumentationPartsRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationParts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4888,7 +4888,7 @@ const opGetDocumentationVersion = "GetDocumentationVersion" // GetDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4969,7 +4969,7 @@ const opGetDocumentationVersions = "GetDocumentationVersions" // GetDocumentationVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5054,7 +5054,7 @@ const opGetDomainName = "GetDomainName" // GetDomainNameRequest generates a "aws/request.Request" representing the // client's request for the GetDomainName operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5142,7 +5142,7 @@ const opGetDomainNames = "GetDomainNames" // GetDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the GetDomainNames operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5282,7 +5282,7 @@ const opGetExport = "GetExport" // GetExportRequest generates a "aws/request.Request" representing the // client's request for the GetExport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5373,7 +5373,7 @@ const opGetGatewayResponse = "GetGatewayResponse" // GetGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the GetGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5456,7 +5456,7 @@ const opGetGatewayResponses = "GetGatewayResponses" // GetGatewayResponsesRequest generates a "aws/request.Request" representing the // client's request for the GetGatewayResponses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5546,7 +5546,7 @@ const opGetIntegration = "GetIntegration" // GetIntegrationRequest generates a "aws/request.Request" representing the // client's request for the GetIntegration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5629,7 +5629,7 @@ const opGetIntegrationResponse = "GetIntegrationResponse" // GetIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the GetIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5712,7 +5712,7 @@ const opGetMethod = "GetMethod" // GetMethodRequest generates a "aws/request.Request" representing the // client's request for the GetMethod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5795,7 +5795,7 @@ const opGetMethodResponse = "GetMethodResponse" // GetMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the GetMethodResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5878,7 +5878,7 @@ const opGetModel = "GetModel" // GetModelRequest generates a "aws/request.Request" representing the // client's request for the GetModel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5961,7 +5961,7 @@ const opGetModelTemplate = "GetModelTemplate" // GetModelTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetModelTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6049,7 +6049,7 @@ const opGetModels = "GetModels" // GetModelsRequest generates a "aws/request.Request" representing the // client's request for the GetModels operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6192,7 +6192,7 @@ const opGetRequestValidator = "GetRequestValidator" // GetRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the GetRequestValidator operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6275,7 +6275,7 @@ const opGetRequestValidators = "GetRequestValidators" // GetRequestValidatorsRequest generates a "aws/request.Request" representing the // client's request for the GetRequestValidators operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6362,7 +6362,7 @@ const opGetResource = "GetResource" // GetResourceRequest generates a "aws/request.Request" representing the // client's request for the GetResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6445,7 +6445,7 @@ const opGetResources = "GetResources" // GetResourcesRequest generates a "aws/request.Request" representing the // client's request for the GetResources operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6588,7 +6588,7 @@ const opGetRestApi = "GetRestApi" // GetRestApiRequest generates a "aws/request.Request" representing the // client's request for the GetRestApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6671,7 +6671,7 @@ const opGetRestApis = "GetRestApis" // GetRestApisRequest generates a "aws/request.Request" representing the // client's request for the GetRestApis operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6811,7 +6811,7 @@ const opGetSdk = "GetSdk" // GetSdkRequest generates a "aws/request.Request" representing the // client's request for the GetSdk operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6902,7 +6902,7 @@ const opGetSdkType = "GetSdkType" // GetSdkTypeRequest generates a "aws/request.Request" representing the // client's request for the GetSdkType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6983,7 +6983,7 @@ const opGetSdkTypes = "GetSdkTypes" // GetSdkTypesRequest generates a "aws/request.Request" representing the // client's request for the GetSdkTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7061,7 +7061,7 @@ const opGetStage = "GetStage" // GetStageRequest generates a "aws/request.Request" representing the // client's request for the GetStage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7144,7 +7144,7 @@ const opGetStages = "GetStages" // GetStagesRequest generates a "aws/request.Request" representing the // client's request for the GetStages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7227,7 +7227,7 @@ const opGetTags = "GetTags" // GetTagsRequest generates a "aws/request.Request" representing the // client's request for the GetTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7317,7 +7317,7 @@ const opGetUsage = "GetUsage" // GetUsageRequest generates a "aws/request.Request" representing the // client's request for the GetUsage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7460,7 +7460,7 @@ const opGetUsagePlan = "GetUsagePlan" // GetUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7547,7 +7547,7 @@ const opGetUsagePlanKey = "GetUsagePlanKey" // GetUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlanKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7634,7 +7634,7 @@ const opGetUsagePlanKeys = "GetUsagePlanKeys" // GetUsagePlanKeysRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlanKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7778,7 +7778,7 @@ const opGetUsagePlans = "GetUsagePlans" // GetUsagePlansRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlans operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7925,7 +7925,7 @@ const opGetVpcLink = "GetVpcLink" // GetVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the GetVpcLink operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8008,7 +8008,7 @@ const opGetVpcLinks = "GetVpcLinks" // GetVpcLinksRequest generates a "aws/request.Request" representing the // client's request for the GetVpcLinks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8148,7 +8148,7 @@ const opImportApiKeys = "ImportApiKeys" // ImportApiKeysRequest generates a "aws/request.Request" representing the // client's request for the ImportApiKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8242,7 +8242,7 @@ const opImportDocumentationParts = "ImportDocumentationParts" // ImportDocumentationPartsRequest generates a "aws/request.Request" representing the // client's request for the ImportDocumentationParts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8330,7 +8330,7 @@ const opImportRestApi = "ImportRestApi" // ImportRestApiRequest generates a "aws/request.Request" representing the // client's request for the ImportRestApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8422,7 +8422,7 @@ const opPutGatewayResponse = "PutGatewayResponse" // PutGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the PutGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8513,7 +8513,7 @@ const opPutIntegration = "PutIntegration" // PutIntegrationRequest generates a "aws/request.Request" representing the // client's request for the PutIntegration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8604,7 +8604,7 @@ const opPutIntegrationResponse = "PutIntegrationResponse" // PutIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the PutIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8698,7 +8698,7 @@ const opPutMethod = "PutMethod" // PutMethodRequest generates a "aws/request.Request" representing the // client's request for the PutMethod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8792,7 +8792,7 @@ const opPutMethodResponse = "PutMethodResponse" // PutMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the PutMethodResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8886,7 +8886,7 @@ const opPutRestApi = "PutRestApi" // PutRestApiRequest generates a "aws/request.Request" representing the // client's request for the PutRestApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8983,7 +8983,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9023,7 +9023,7 @@ func (c *APIGateway) TagResourceRequest(input *TagResourceInput) (req *request.R // TagResource API operation for Amazon API Gateway. // -// Adds or updates Tags on a gievn resource. +// Adds or updates a tag on a given resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9079,7 +9079,7 @@ const opTestInvokeAuthorizer = "TestInvokeAuthorizer" // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9169,7 +9169,7 @@ const opTestInvokeMethod = "TestInvokeMethod" // TestInvokeMethodRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeMethod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9257,7 +9257,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9297,7 +9297,7 @@ func (c *APIGateway) UntagResourceRequest(input *UntagResourceInput) (req *reque // UntagResource API operation for Amazon API Gateway. // -// Removes Tags from a given resource. +// Removes a tag from a given resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9350,7 +9350,7 @@ const opUpdateAccount = "UpdateAccount" // UpdateAccountRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9437,7 +9437,7 @@ const opUpdateApiKey = "UpdateApiKey" // UpdateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateApiKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9528,7 +9528,7 @@ const opUpdateAuthorizer = "UpdateAuthorizer" // UpdateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9617,7 +9617,7 @@ const opUpdateBasePathMapping = "UpdateBasePathMapping" // UpdateBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the UpdateBasePathMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9708,7 +9708,7 @@ const opUpdateClientCertificate = "UpdateClientCertificate" // UpdateClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateClientCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9795,7 +9795,7 @@ const opUpdateDeployment = "UpdateDeployment" // UpdateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9886,7 +9886,7 @@ const opUpdateDocumentationPart = "UpdateDocumentationPart" // UpdateDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentationPart operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9978,7 +9978,7 @@ const opUpdateDocumentationVersion = "UpdateDocumentationVersion" // UpdateDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentationVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10067,7 +10067,7 @@ const opUpdateDomainName = "UpdateDomainName" // UpdateDomainNameRequest generates a "aws/request.Request" representing the // client's request for the UpdateDomainName operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10158,7 +10158,7 @@ const opUpdateGatewayResponse = "UpdateGatewayResponse" // UpdateGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateGatewayResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10245,7 +10245,7 @@ const opUpdateIntegration = "UpdateIntegration" // UpdateIntegrationRequest generates a "aws/request.Request" representing the // client's request for the UpdateIntegration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10336,7 +10336,7 @@ const opUpdateIntegrationResponse = "UpdateIntegrationResponse" // UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateIntegrationResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10427,7 +10427,7 @@ const opUpdateMethod = "UpdateMethod" // UpdateMethodRequest generates a "aws/request.Request" representing the // client's request for the UpdateMethod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10518,7 +10518,7 @@ const opUpdateMethodResponse = "UpdateMethodResponse" // UpdateMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateMethodResponse operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10612,7 +10612,7 @@ const opUpdateModel = "UpdateModel" // UpdateModelRequest generates a "aws/request.Request" representing the // client's request for the UpdateModel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10703,7 +10703,7 @@ const opUpdateRequestValidator = "UpdateRequestValidator" // UpdateRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the UpdateRequestValidator operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10790,7 +10790,7 @@ const opUpdateResource = "UpdateResource" // UpdateResourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10881,7 +10881,7 @@ const opUpdateRestApi = "UpdateRestApi" // UpdateRestApiRequest generates a "aws/request.Request" representing the // client's request for the UpdateRestApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10972,7 +10972,7 @@ const opUpdateStage = "UpdateStage" // UpdateStageRequest generates a "aws/request.Request" representing the // client's request for the UpdateStage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11063,7 +11063,7 @@ const opUpdateUsage = "UpdateUsage" // UpdateUsageRequest generates a "aws/request.Request" representing the // client's request for the UpdateUsage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11151,7 +11151,7 @@ const opUpdateUsagePlan = "UpdateUsagePlan" // UpdateUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the UpdateUsagePlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11242,7 +11242,7 @@ const opUpdateVpcLink = "UpdateVpcLink" // UpdateVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the UpdateVpcLink operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11623,11 +11623,11 @@ type Authorizer struct { // The identifier for the authorizer resource. Id *string `locationName:"id" type:"string"` - // The identity source for which authorization is requested. For a TOKEN authorizer, - // this is required and specifies the request header mapping expression for - // the custom header holding the authorization token submitted by the client. - // For example, if the token header name is Auth, the header mapping expression - // is method.request.header.Auth. + // The identity source for which authorization is requested. For a TOKEN or + // COGNITO_USER_POOLS authorizer, this is required and specifies the request + // header mapping expression for the custom header holding the authorization + // token submitted by the client. For example, if the token header name is Auth, + // the header mapping expression is method.request.header.Auth. // For the REQUEST authorizer, this is required when authorization caching is // enabled. The value is a comma-separated string of one or more mapping expressions // of the specified request parameters. For example, if an Auth header, a Name @@ -11640,16 +11640,14 @@ type Authorizer struct { // response without calling the Lambda function. The valid value is a string // of comma-separated mapping expressions of the specified request parameters. // When the authorization caching is not enabled, this property is optional. - // - // For a COGNITO_USER_POOLS authorizer, this property is not used. IdentitySource *string `locationName:"identitySource" type:"string"` // A validation expression for the incoming identity token. For TOKEN authorizers, - // this value is a regular expression. API Gateway will match the incoming token - // from the client against the specified regular expression. It will invoke - // the authorizer's Lambda function there is a match. Otherwise, it will return - // a 401 Unauthorized response without calling the Lambda function. The validation - // expression does not apply to the REQUEST authorizer. + // this value is a regular expression. API Gateway will match the aud field + // of the incoming token from the client against the specified regular expression. + // It will invoke the authorizer's Lambda function when there is a match. Otherwise, + // it will return a 401 Unauthorized response without calling the Lambda function. + // The validation expression does not apply to the REQUEST authorizer. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` // [Required] The name of the authorizer. @@ -11660,10 +11658,10 @@ type Authorizer struct { // For a TOKEN or REQUEST authorizer, this is not defined. ProviderARNs []*string `locationName:"providerARNs" type:"list"` - // [Required] The authorizer type. Valid values are TOKEN for a Lambda function - // using a single authorization token submitted in a custom header, REQUEST - // for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS - // for using an Amazon Cognito user pool. + // The authorizer type. Valid values are TOKEN for a Lambda function using a + // single authorization token submitted in a custom header, REQUEST for a Lambda + // function using incoming request parameters, and COGNITO_USER_POOLS for using + // an Amazon Cognito user pool. Type *string `locationName:"type" type:"string" enum:"AuthorizerType"` } @@ -12016,11 +12014,11 @@ type CreateAuthorizerInput struct { // is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. AuthorizerUri *string `locationName:"authorizerUri" type:"string"` - // The identity source for which authorization is requested. For a TOKEN authorizer, - // this is required and specifies the request header mapping expression for - // the custom header holding the authorization token submitted by the client. - // For example, if the token header name is Auth, the header mapping expression - // is method.request.header.Auth. + // The identity source for which authorization is requested. For a TOKEN or + // COGNITO_USER_POOLS authorizer, this is required and specifies the request + // header mapping expression for the custom header holding the authorization + // token submitted by the client. For example, if the token header name is Auth, + // the header mapping expression is method.request.header.Auth. // For the REQUEST authorizer, this is required when authorization caching is // enabled. The value is a comma-separated string of one or more mapping expressions // of the specified request parameters. For example, if an Auth header, a Name @@ -12033,16 +12031,14 @@ type CreateAuthorizerInput struct { // response without calling the Lambda function. The valid value is a string // of comma-separated mapping expressions of the specified request parameters. // When the authorization caching is not enabled, this property is optional. - // - // For a COGNITO_USER_POOLS authorizer, this property is not used. IdentitySource *string `locationName:"identitySource" type:"string"` // A validation expression for the incoming identity token. For TOKEN authorizers, - // this value is a regular expression. API Gateway will match the incoming token - // from the client against the specified regular expression. It will invoke - // the authorizer's Lambda function there is a match. Otherwise, it will return - // a 401 Unauthorized response without calling the Lambda function. The validation - // expression does not apply to the REQUEST authorizer. + // this value is a regular expression. API Gateway will match the aud field + // of the incoming token from the client against the specified regular expression. + // It will invoke the authorizer's Lambda function when there is a match. Otherwise, + // it will return a 401 Unauthorized response without calling the Lambda function. + // The validation expression does not apply to the REQUEST authorizer. IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` // [Required] The name of the authorizer. @@ -12055,7 +12051,7 @@ type CreateAuthorizerInput struct { // For a TOKEN or REQUEST authorizer, this is not defined. ProviderARNs []*string `locationName:"providerARNs" type:"list"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -12168,12 +12164,12 @@ type CreateBasePathMappingInput struct { // a base path name after the domain name. BasePath *string `locationName:"basePath" type:"string"` - // The domain name of the BasePathMapping resource to create. + // [Required] The domain name of the BasePathMapping resource to create. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `locationName:"restApiId" type:"string" required:"true"` @@ -12252,7 +12248,7 @@ type CreateDeploymentInput struct { // The description for the Deployment resource to create. Description *string `locationName:"description" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -12516,7 +12512,7 @@ type CreateDomainNameInput struct { // key. CertificatePrivateKey *string `locationName:"certificatePrivateKey" type:"string"` - // (Required) The name of the DomainName resource. + // [Required] The name of the DomainName resource. // // DomainName is a required field DomainName *string `locationName:"domainName" type:"string" required:"true"` @@ -12616,7 +12612,7 @@ func (s *CreateDomainNameInput) SetRegionalCertificateName(v string) *CreateDoma type CreateModelInput struct { _ struct{} `type:"structure"` - // The content-type for the model. + // [Required] The content-type for the model. // // ContentType is a required field ContentType *string `locationName:"contentType" type:"string" required:"true"` @@ -12624,18 +12620,18 @@ type CreateModelInput struct { // The description of the model. Description *string `locationName:"description" type:"string"` - // The name of the model. Must be alphanumeric. + // [Required] The name of the model. Must be alphanumeric. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // The RestApi identifier under which the Model will be created. + // [Required] The RestApi identifier under which the Model will be created. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The schema for the model. For application/json models, this should be JSON-schema - // draft v4 (http://json-schema.org/documentation.html) model. + // The schema for the model. For application/json models, this should be JSON + // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Schema *string `locationName:"schema" type:"string"` } @@ -12705,7 +12701,7 @@ type CreateRequestValidatorInput struct { // The name of the to-be-created RequestValidator. Name *string `locationName:"name" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -12770,7 +12766,7 @@ func (s *CreateRequestValidatorInput) SetValidateRequestParameters(v bool) *Crea type CreateResourceInput struct { _ struct{} `type:"structure"` - // The parent resource's identifier. + // [Required] The parent resource's identifier. // // ParentId is a required field ParentId *string `location:"uri" locationName:"parent_id" type:"string" required:"true"` @@ -12780,7 +12776,7 @@ type CreateResourceInput struct { // PathPart is a required field PathPart *string `locationName:"pathPart" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -12837,8 +12833,8 @@ func (s *CreateResourceInput) SetRestApiId(v string) *CreateResourceInput { type CreateRestApiInput struct { _ struct{} `type:"structure"` - // The source of the API key for metring requests according to a usage plan. - // Valid values are HEADER to read the API key from the X-API-Key header of + // The source of the API key for metering requests according to a usage plan. + // Valid values are: HEADER to read the API key from the X-API-Key header of // a request. // AUTHORIZER to read the API key from the UsageIdentifierKey from a custom // authorizer. @@ -12858,18 +12854,22 @@ type CreateRestApiInput struct { // the API. EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` - // A nullable integer used to enable (non-negative between 0 and 10485760 (10M) - // bytes, inclusive) or disable (null) compression on an API. When compression - // is enabled, compression or decompression are not applied on the payload if - // the payload size is smaller than this value. Setting it to zero allows compression - // for any payload size. + // A nullable integer that is used to enable compression (with non-negative + // between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with + // a null value) on an API. When compression is enabled, compression or decompression + // is not applied on the payload if the payload size is smaller than this value. + // Setting it to zero allows compression for any payload size. MinimumCompressionSize *int64 `locationName:"minimumCompressionSize" type:"integer"` - // The name of the RestApi. + // [Required] The name of the RestApi. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` + // A stringified JSON policy document that applies to this RestApi regardless + // of the caller and Method + Policy *string `locationName:"policy" type:"string"` + // A version identifier for the API. Version *string `locationName:"version" type:"string"` } @@ -12939,6 +12939,12 @@ func (s *CreateRestApiInput) SetName(v string) *CreateRestApiInput { return s } +// SetPolicy sets the Policy field's value. +func (s *CreateRestApiInput) SetPolicy(v string) *CreateRestApiInput { + s.Policy = &v + return s +} + // SetVersion sets the Version field's value. func (s *CreateRestApiInput) SetVersion(v string) *CreateRestApiInput { s.Version = &v @@ -12969,7 +12975,7 @@ type CreateStageInput struct { // The version of the associated API documentation. DocumentationVersion *string `locationName:"documentationVersion" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -12979,9 +12985,9 @@ type CreateStageInput struct { // StageName is a required field StageName *string `locationName:"stageName" type:"string" required:"true"` - // Key/Value map of strings. Valid character set is [a-zA-Z+-=._:/]. Tag key - // can be up to 128 characters and must not start with "aws:". Tag value can - // be up to 256 characters. + // The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. + // The tag key can be up to 128 characters and must not start with aws:. The + // tag value can be up to 256 characters. Tags map[string]*string `locationName:"tags" type:"map"` // A map that defines the stage variables for the new Stage resource. Variable @@ -13091,7 +13097,7 @@ type CreateUsagePlanInput struct { // The description of the usage plan. Description *string `locationName:"description" type:"string"` - // The name of the usage plan. + // [Required] The name of the usage plan. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` @@ -13161,18 +13167,18 @@ func (s *CreateUsagePlanInput) SetThrottle(v *ThrottleSettings) *CreateUsagePlan type CreateUsagePlanKeyInput struct { _ struct{} `type:"structure"` - // The identifier of a UsagePlanKey resource for a plan customer. + // [Required] The identifier of a UsagePlanKey resource for a plan customer. // // KeyId is a required field KeyId *string `locationName:"keyId" type:"string" required:"true"` - // The type of a UsagePlanKey resource for a plan customer. + // [Required] The type of a UsagePlanKey resource for a plan customer. // // KeyType is a required field KeyType *string `locationName:"keyType" type:"string" required:"true"` - // The Id of the UsagePlan resource representing the usage plan containing the - // to-be-created UsagePlanKey resource representing a plan customer. + // [Required] The Id of the UsagePlan resource representing the usage plan containing + // the to-be-created UsagePlanKey resource representing a plan customer. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -13296,7 +13302,7 @@ func (s *CreateVpcLinkInput) SetTargetArns(v []*string) *CreateVpcLinkInput { type DeleteApiKeyInput struct { _ struct{} `type:"structure"` - // The identifier of the ApiKey resource to be deleted. + // [Required] The identifier of the ApiKey resource to be deleted. // // ApiKey is a required field ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"` @@ -13349,12 +13355,12 @@ func (s DeleteApiKeyOutput) GoString() string { type DeleteAuthorizerInput struct { _ struct{} `type:"structure"` - // The identifier of the Authorizer resource. + // [Required] The identifier of the Authorizer resource. // // AuthorizerId is a required field AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -13416,12 +13422,12 @@ func (s DeleteAuthorizerOutput) GoString() string { type DeleteBasePathMappingInput struct { _ struct{} `type:"structure"` - // The base path name of the BasePathMapping resource to delete. + // [Required] The base path name of the BasePathMapping resource to delete. // // BasePath is a required field BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"` - // The domain name of the BasePathMapping resource to delete. + // [Required] The domain name of the BasePathMapping resource to delete. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` @@ -13483,7 +13489,7 @@ func (s DeleteBasePathMappingOutput) GoString() string { type DeleteClientCertificateInput struct { _ struct{} `type:"structure"` - // The identifier of the ClientCertificate resource to be deleted. + // [Required] The identifier of the ClientCertificate resource to be deleted. // // ClientCertificateId is a required field ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` @@ -13536,12 +13542,12 @@ func (s DeleteClientCertificateOutput) GoString() string { type DeleteDeploymentInput struct { _ struct{} `type:"structure"` - // The identifier of the Deployment resource to delete. + // [Required] The identifier of the Deployment resource to delete. // // DeploymentId is a required field DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -13737,7 +13743,7 @@ func (s DeleteDocumentationVersionOutput) GoString() string { type DeleteDomainNameInput struct { _ struct{} `type:"structure"` - // The name of the DomainName resource to be deleted. + // [Required] The name of the DomainName resource to be deleted. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` @@ -13791,8 +13797,8 @@ func (s DeleteDomainNameOutput) GoString() string { type DeleteGatewayResponseInput struct { _ struct{} `type:"structure"` - // The response type of the associated GatewayResponse. Valid values are ACCESS_DENIED - // + // [Required] The response type of the associated GatewayResponse. Valid values + // are ACCESS_DENIED // API_CONFIGURATION_ERROR // AUTHORIZER_FAILURE // AUTHORIZER_CONFIGURATION_ERROR @@ -13811,12 +13817,12 @@ type DeleteGatewayResponseInput struct { // RESOURCE_NOT_FOUND // THROTTLED // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPES + // UNSUPPORTED_MEDIA_TYPE // // ResponseType is a required field ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -13878,17 +13884,17 @@ func (s DeleteGatewayResponseOutput) GoString() string { type DeleteIntegrationInput struct { _ struct{} `type:"structure"` - // Specifies a delete integration request's HTTP method. + // [Required] Specifies a delete integration request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // Specifies a delete integration request's resource identifier. + // [Required] Specifies a delete integration request's resource identifier. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -13959,22 +13965,22 @@ func (s DeleteIntegrationOutput) GoString() string { type DeleteIntegrationResponseInput struct { _ struct{} `type:"structure"` - // Specifies a delete integration response request's HTTP method. + // [Required] Specifies a delete integration response request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // Specifies a delete integration response request's resource identifier. + // [Required] Specifies a delete integration response request's resource identifier. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // Specifies a delete integration response request's status code. + // [Required] Specifies a delete integration response request's status code. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -14054,17 +14060,17 @@ func (s DeleteIntegrationResponseOutput) GoString() string { type DeleteMethodInput struct { _ struct{} `type:"structure"` - // The HTTP verb of the Method resource. + // [Required] The HTTP verb of the Method resource. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // The Resource identifier for the Method resource. + // [Required] The Resource identifier for the Method resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -14135,22 +14141,22 @@ func (s DeleteMethodOutput) GoString() string { type DeleteMethodResponseInput struct { _ struct{} `type:"structure"` - // The HTTP verb of the Method resource. + // [Required] The HTTP verb of the Method resource. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // The Resource identifier for the MethodResponse resource. + // [Required] The Resource identifier for the MethodResponse resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The status code identifier for the MethodResponse resource. + // [Required] The status code identifier for the MethodResponse resource. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -14230,12 +14236,12 @@ func (s DeleteMethodResponseOutput) GoString() string { type DeleteModelInput struct { _ struct{} `type:"structure"` - // The name of the model to delete. + // [Required] The name of the model to delete. // // ModelName is a required field ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -14302,7 +14308,7 @@ type DeleteRequestValidatorInput struct { // RequestValidatorId is a required field RequestValidatorId *string `location:"uri" locationName:"requestvalidator_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -14364,12 +14370,12 @@ func (s DeleteRequestValidatorOutput) GoString() string { type DeleteResourceInput struct { _ struct{} `type:"structure"` - // The identifier of the Resource resource. + // [Required] The identifier of the Resource resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -14431,7 +14437,7 @@ func (s DeleteResourceOutput) GoString() string { type DeleteRestApiInput struct { _ struct{} `type:"structure"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -14484,12 +14490,12 @@ func (s DeleteRestApiOutput) GoString() string { type DeleteStageInput struct { _ struct{} `type:"structure"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The name of the Stage resource to delete. + // [Required] The name of the Stage resource to delete. // // StageName is a required field StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` @@ -14551,7 +14557,7 @@ func (s DeleteStageOutput) GoString() string { type DeleteUsagePlanInput struct { _ struct{} `type:"structure"` - // The Id of the to-be-deleted usage plan. + // [Required] The Id of the to-be-deleted usage plan. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -14591,13 +14597,13 @@ func (s *DeleteUsagePlanInput) SetUsagePlanId(v string) *DeleteUsagePlanInput { type DeleteUsagePlanKeyInput struct { _ struct{} `type:"structure"` - // The Id of the UsagePlanKey resource to be deleted. + // [Required] The Id of the UsagePlanKey resource to be deleted. // // KeyId is a required field KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"` - // The Id of the UsagePlan resource representing the usage plan containing the - // to-be-deleted UsagePlanKey resource representing a plan customer. + // [Required] The Id of the UsagePlan resource representing the usage plan containing + // the to-be-deleted UsagePlanKey resource representing a plan customer. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -14933,12 +14939,11 @@ type DocumentationPartLocation struct { // of the parent entity exactly. StatusCode *string `locationName:"statusCode" type:"string"` - // The type of API entity to which the documentation content applies. It is - // a valid and required field for API entity types of API, AUTHORIZER, MODEL, - // RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, - // RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not - // apply to any entity of the API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, - // or RESOURCE type. + // [Required] The type of API entity to which the documentation content applies. + // Valid values are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, + // QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, + // and RESPONSE_BODY. Content inheritance does not apply to any entity of the + // API, AUTHORIZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"DocumentationPartType"` @@ -15087,7 +15092,7 @@ type DomainName struct { // and AWS Regions and Endpoints for API Gateway (http://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). DistributionHostedZoneId *string `locationName:"distributionHostedZoneId" type:"string"` - // The name of the DomainName resource. + // The custom domain name as an API host name, for example, my-api.example.com. DomainName *string `locationName:"domainName" type:"string"` // The endpoint configuration of this DomainName showing the endpoint types @@ -15289,12 +15294,12 @@ func (s FlushStageAuthorizersCacheOutput) GoString() string { type FlushStageCacheInput struct { _ struct{} `type:"structure"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The name of the stage to flush its cache. + // [Required] The name of the stage to flush its cache. // // StageName is a required field StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` @@ -15395,7 +15400,7 @@ func (s GetAccountInput) GoString() string { type GetApiKeyInput struct { _ struct{} `type:"structure"` - // The identifier of the ApiKey resource. + // [Required] The identifier of the ApiKey resource. // // ApiKey is a required field ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"` @@ -15452,7 +15457,8 @@ type GetApiKeysInput struct { // key values. IncludeValues *bool `location:"querystring" locationName:"includeValues" type:"boolean"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The name of queried API keys. @@ -15550,12 +15556,12 @@ func (s *GetApiKeysOutput) SetWarnings(v []*string) *GetApiKeysOutput { type GetAuthorizerInput struct { _ struct{} `type:"structure"` - // The identifier of the Authorizer resource. + // [Required] The identifier of the Authorizer resource. // // AuthorizerId is a required field AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -15603,13 +15609,14 @@ func (s *GetAuthorizerInput) SetRestApiId(v string) *GetAuthorizerInput { type GetAuthorizersInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. Position *string `location:"querystring" locationName:"position" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -15694,15 +15701,15 @@ func (s *GetAuthorizersOutput) SetPosition(v string) *GetAuthorizersOutput { type GetBasePathMappingInput struct { _ struct{} `type:"structure"` - // The base path name that callers of the API must provide as part of the URL - // after the domain name. This value must be unique for all of the mappings - // across a single API. Leave this blank if you do not want callers to specify - // any base path name after the domain name. + // [Required] The base path name that callers of the API must provide as part + // of the URL after the domain name. This value must be unique for all of the + // mappings across a single API. Leave this blank if you do not want callers + // to specify any base path name after the domain name. // // BasePath is a required field BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"` - // The domain name of the BasePathMapping resource to be described. + // [Required] The domain name of the BasePathMapping resource to be described. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` @@ -15750,13 +15757,13 @@ func (s *GetBasePathMappingInput) SetDomainName(v string) *GetBasePathMappingInp type GetBasePathMappingsInput struct { _ struct{} `type:"structure"` - // The domain name of a BasePathMapping resource. + // [Required] The domain name of a BasePathMapping resource. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` - // The maximum number of returned results per page. The value is 25 by default - // and could be between 1 - 500. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -15842,7 +15849,7 @@ func (s *GetBasePathMappingsOutput) SetPosition(v string) *GetBasePathMappingsOu type GetClientCertificateInput struct { _ struct{} `type:"structure"` - // The identifier of the ClientCertificate resource to be described. + // [Required] The identifier of the ClientCertificate resource to be described. // // ClientCertificateId is a required field ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` @@ -15881,8 +15888,8 @@ func (s *GetClientCertificateInput) SetClientCertificateId(v string) *GetClientC type GetClientCertificatesInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. The value is 25 by default - // and could be between 1 - 500. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -15949,7 +15956,7 @@ func (s *GetClientCertificatesOutput) SetPosition(v string) *GetClientCertificat type GetDeploymentInput struct { _ struct{} `type:"structure"` - // The identifier of the Deployment resource to get information about. + // [Required] The identifier of the Deployment resource to get information about. // // DeploymentId is a required field DeploymentId *string `location:"uri" locationName:"deployment_id" type:"string" required:"true"` @@ -15963,7 +15970,7 @@ type GetDeploymentInput struct { // list containing only the "apisummary" string. For example, GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary. Embed []*string `location:"querystring" locationName:"embed" type:"list"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -16017,14 +16024,14 @@ func (s *GetDeploymentInput) SetRestApiId(v string) *GetDeploymentInput { type GetDeploymentsInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. The value is 25 by default - // and could be between 1 - 500. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. Position *string `location:"querystring" locationName:"position" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -16172,7 +16179,8 @@ func (s *GetDocumentationPartInput) SetRestApiId(v string) *GetDocumentationPart type GetDocumentationPartsInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The status of the API documentation parts to retrieve. Valid values are DOCUMENTED @@ -16354,7 +16362,8 @@ func (s *GetDocumentationVersionInput) SetRestApiId(v string) *GetDocumentationV type GetDocumentationVersionsInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -16449,7 +16458,7 @@ func (s *GetDocumentationVersionsOutput) SetPosition(v string) *GetDocumentation type GetDomainNameInput struct { _ struct{} `type:"structure"` - // The name of the DomainName resource. + // [Required] The name of the DomainName resource. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` @@ -16488,8 +16497,8 @@ func (s *GetDomainNameInput) SetDomainName(v string) *GetDomainNameInput { type GetDomainNamesInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. The value is 25 by default - // and could be between 1 - 500. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -16561,7 +16570,7 @@ type GetExportInput struct { // be specified in the Accept header for direct API requests. Accepts *string `location:"header" locationName:"Accept" type:"string"` - // The type of export. Currently only 'swagger' is supported. + // [Required] The type of export. Currently only 'swagger' is supported. // // ExportType is a required field ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"` @@ -16575,12 +16584,12 @@ type GetExportInput struct { // tool Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The name of the Stage that will be exported. + // [Required] The name of the Stage that will be exported. // // StageName is a required field StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` @@ -16692,8 +16701,8 @@ func (s *GetExportOutput) SetContentType(v string) *GetExportOutput { type GetGatewayResponseInput struct { _ struct{} `type:"structure"` - // The response type of the associated GatewayResponse. Valid values are ACCESS_DENIED - // + // [Required] The response type of the associated GatewayResponse. Valid values + // are ACCESS_DENIED // API_CONFIGURATION_ERROR // AUTHORIZER_FAILURE // AUTHORIZER_CONFIGURATION_ERROR @@ -16712,12 +16721,12 @@ type GetGatewayResponseInput struct { // RESOURCE_NOT_FOUND // THROTTLED // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPES + // UNSUPPORTED_MEDIA_TYPE // // ResponseType is a required field ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -16768,15 +16777,16 @@ func (s *GetGatewayResponseInput) SetRestApiId(v string) *GetGatewayResponseInpu type GetGatewayResponsesInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. The GatewayResponses collection - // does not support pagination and the limit does not apply here. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. The GatewayResponses collection does not support + // pagination and the limit does not apply here. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. The GatewayResponse // collection does not support pagination and the position does not apply here. Position *string `location:"querystring" locationName:"position" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17018,17 +17028,17 @@ func (s *GetGatewayResponsesOutput) SetPosition(v string) *GetGatewayResponsesOu type GetIntegrationInput struct { _ struct{} `type:"structure"` - // Specifies a get integration request's HTTP method. + // [Required] Specifies a get integration request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // Specifies a get integration request's resource identifier + // [Required] Specifies a get integration request's resource identifier // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17085,22 +17095,22 @@ func (s *GetIntegrationInput) SetRestApiId(v string) *GetIntegrationInput { type GetIntegrationResponseInput struct { _ struct{} `type:"structure"` - // Specifies a get integration response request's HTTP method. + // [Required] Specifies a get integration response request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // Specifies a get integration response request's resource identifier. + // [Required] Specifies a get integration response request's resource identifier. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // Specifies a get integration response request's status code. + // [Required] Specifies a get integration response request's status code. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -17166,17 +17176,17 @@ func (s *GetIntegrationResponseInput) SetStatusCode(v string) *GetIntegrationRes type GetMethodInput struct { _ struct{} `type:"structure"` - // Specifies the method request's HTTP method type. + // [Required] Specifies the method request's HTTP method type. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // The Resource identifier for the Method resource. + // [Required] The Resource identifier for the Method resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17233,22 +17243,22 @@ func (s *GetMethodInput) SetRestApiId(v string) *GetMethodInput { type GetMethodResponseInput struct { _ struct{} `type:"structure"` - // The HTTP verb of the Method resource. + // [Required] The HTTP verb of the Method resource. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // The Resource identifier for the MethodResponse resource. + // [Required] The Resource identifier for the MethodResponse resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The status code for the MethodResponse resource. + // [Required] The status code for the MethodResponse resource. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -17319,12 +17329,12 @@ type GetModelInput struct { // is false. Flatten *bool `location:"querystring" locationName:"flatten" type:"boolean"` - // The name of the model as an identifier. + // [Required] The name of the model as an identifier. // // ModelName is a required field ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` - // The RestApi identifier under which the Model exists. + // [Required] The RestApi identifier under which the Model exists. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17378,12 +17388,12 @@ func (s *GetModelInput) SetRestApiId(v string) *GetModelInput { type GetModelTemplateInput struct { _ struct{} `type:"structure"` - // The name of the model for which to generate a template. + // [Required] The name of the model for which to generate a template. // // ModelName is a required field ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17458,14 +17468,14 @@ func (s *GetModelTemplateOutput) SetValue(v string) *GetModelTemplateOutput { type GetModelsInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. The value is 25 by default - // and could be between 1 - 500. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. Position *string `location:"querystring" locationName:"position" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17555,7 +17565,7 @@ type GetRequestValidatorInput struct { // RequestValidatorId is a required field RequestValidatorId *string `location:"uri" locationName:"requestvalidator_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17603,13 +17613,14 @@ func (s *GetRequestValidatorInput) SetRestApiId(v string) *GetRequestValidatorIn type GetRequestValidatorsInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. Position *string `location:"querystring" locationName:"position" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17706,12 +17717,12 @@ type GetResourceInput struct { // /restapis/{restapi_id}/resources/{resource_id}?embed=methods. Embed []*string `location:"querystring" locationName:"embed" type:"list"` - // The identifier for the Resource resource. + // [Required] The identifier for the Resource resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17773,14 +17784,14 @@ type GetResourcesInput struct { // /restapis/{restapi_id}/resources?embed=methods. Embed []*string `location:"querystring" locationName:"embed" type:"list"` - // The maximum number of returned results per page. The value is 25 by default - // and could be between 1 - 500. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. Position *string `location:"querystring" locationName:"position" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17871,7 +17882,7 @@ func (s *GetResourcesOutput) SetPosition(v string) *GetResourcesOutput { type GetRestApiInput struct { _ struct{} `type:"structure"` - // The identifier of the RestApi resource. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -17910,8 +17921,8 @@ func (s *GetRestApiInput) SetRestApiId(v string) *GetRestApiInput { type GetRestApisInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. The value is 25 by default - // and could be between 1 - 500. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -17986,18 +17997,18 @@ type GetSdkInput struct { // named serviceName and javaPackageName are required. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The language for the generated SDK. Currently java, javascript, android, - // objectivec (for iOS), swift (for iOS), and ruby are supported. + // [Required] The language for the generated SDK. Currently java, javascript, + // android, objectivec (for iOS), swift (for iOS), and ruby are supported. // // SdkType is a required field SdkType *string `location:"uri" locationName:"sdk_type" type:"string" required:"true"` - // The name of the Stage that the SDK will use. + // [Required] The name of the Stage that the SDK will use. // // StageName is a required field StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` @@ -18102,7 +18113,7 @@ func (s *GetSdkOutput) SetContentType(v string) *GetSdkOutput { type GetSdkTypeInput struct { _ struct{} `type:"structure"` - // The identifier of the queried SdkType instance. + // [Required] The identifier of the queried SdkType instance. // // Id is a required field Id *string `location:"uri" locationName:"sdktype_id" type:"string" required:"true"` @@ -18141,7 +18152,8 @@ func (s *GetSdkTypeInput) SetId(v string) *GetSdkTypeInput { type GetSdkTypesInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -18206,12 +18218,12 @@ func (s *GetSdkTypesOutput) SetPosition(v string) *GetSdkTypesOutput { type GetStageInput struct { _ struct{} `type:"structure"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The name of the Stage resource to get information about. + // [Required] The name of the Stage resource to get information about. // // StageName is a required field StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` @@ -18262,7 +18274,7 @@ type GetStagesInput struct { // The stages' deployment identifiers. DeploymentId *string `location:"querystring" locationName:"deploymentId" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -18334,14 +18346,15 @@ type GetTagsInput struct { _ struct{} `type:"structure"` // (Not currently supported) The maximum number of returned results per page. + // The default value is 25 and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // (Not currently supported) The current pagination position in the paged result // set. Position *string `location:"querystring" locationName:"position" type:"string"` - // [Required] The ARN of a resource that can be tagged. At present, Stage is - // the only taggable resource. + // [Required] The ARN of a resource that can be tagged. The resource ARN must + // be URL-encoded. At present, Stage is the only taggable resource. // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` @@ -18388,11 +18401,11 @@ func (s *GetTagsInput) SetResourceArn(v string) *GetTagsInput { return s } -// A collection of Tags associated with a given resource. +// The collection of tags. Each tag element is associated with a given resource. type GetTagsOutput struct { _ struct{} `type:"structure"` - // A collection of Tags associated with a given resource. + // The collection of tags. Each tag element is associated with a given resource. Tags map[string]*string `locationName:"tags" type:"map"` } @@ -18417,7 +18430,7 @@ func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput { type GetUsageInput struct { _ struct{} `type:"structure"` - // The ending date (e.g., 2016-12-31) of the usage data. + // [Required] The ending date (e.g., 2016-12-31) of the usage data. // // EndDate is a required field EndDate *string `location:"querystring" locationName:"endDate" type:"string" required:"true"` @@ -18425,18 +18438,19 @@ type GetUsageInput struct { // The Id of the API key associated with the resultant usage data. KeyId *string `location:"querystring" locationName:"keyId" type:"string"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. Position *string `location:"querystring" locationName:"position" type:"string"` - // The starting date (e.g., 2016-01-01) of the usage data. + // [Required] The starting date (e.g., 2016-01-01) of the usage data. // // StartDate is a required field StartDate *string `location:"querystring" locationName:"startDate" type:"string" required:"true"` - // The Id of the usage plan associated with the usage data. + // [Required] The Id of the usage plan associated with the usage data. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -18511,7 +18525,7 @@ func (s *GetUsageInput) SetUsagePlanId(v string) *GetUsageInput { type GetUsagePlanInput struct { _ struct{} `type:"structure"` - // The identifier of the UsagePlan resource to be retrieved. + // [Required] The identifier of the UsagePlan resource to be retrieved. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -18550,14 +18564,14 @@ func (s *GetUsagePlanInput) SetUsagePlanId(v string) *GetUsagePlanInput { type GetUsagePlanKeyInput struct { _ struct{} `type:"structure"` - // The key Id of the to-be-retrieved UsagePlanKey resource representing a plan - // customer. + // [Required] The key Id of the to-be-retrieved UsagePlanKey resource representing + // a plan customer. // // KeyId is a required field KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"` - // The Id of the UsagePlan resource representing the usage plan containing the - // to-be-retrieved UsagePlanKey resource representing a plan customer. + // [Required] The Id of the UsagePlan resource representing the usage plan containing + // the to-be-retrieved UsagePlanKey resource representing a plan customer. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -18606,7 +18620,8 @@ func (s *GetUsagePlanKeyInput) SetUsagePlanId(v string) *GetUsagePlanKeyInput { type GetUsagePlanKeysInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // A query parameter specifying the name of the to-be-returned usage plan keys. @@ -18615,8 +18630,8 @@ type GetUsagePlanKeysInput struct { // The current pagination position in the paged result set. Position *string `location:"querystring" locationName:"position" type:"string"` - // The Id of the UsagePlan resource representing the usage plan containing the - // to-be-retrieved UsagePlanKey resource representing a plan customer. + // [Required] The Id of the UsagePlan resource representing the usage plan containing + // the to-be-retrieved UsagePlanKey resource representing a plan customer. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -18711,7 +18726,8 @@ type GetUsagePlansInput struct { // The identifier of the API key associated with the usage plans. KeyId *string `location:"querystring" locationName:"keyId" type:"string"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -18824,7 +18840,8 @@ func (s *GetVpcLinkInput) SetVpcLinkId(v string) *GetVpcLinkInput { type GetVpcLinksInput struct { _ struct{} `type:"structure"` - // The maximum number of returned results per page. + // The maximum number of returned results per page. The default value is 25 + // and the maximum value is 500. Limit *int64 `location:"querystring" locationName:"limit" type:"integer"` // The current pagination position in the paged result set. @@ -19107,9 +19124,9 @@ func (s *ImportDocumentationPartsOutput) SetWarnings(v []*string) *ImportDocumen type ImportRestApiInput struct { _ struct{} `type:"structure" payload:"Body"` - // The POST request body containing external API definitions. Currently, only - // Swagger definition JSON files are supported. The maximum size of the API - // definition file is 2MB. + // [Required] The POST request body containing external API definitions. Currently, + // only Swagger definition JSON files are supported. The maximum size of the + // API definition file is 2MB. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19611,13 +19628,13 @@ type Method struct { ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` // A list of authorization scopes configured on the method. The scopes are used - // with a COGNITO_USER_POOL authorizer to authorize the method invocation. The - // authorization works by matching the method scopes against the scopes parsed - // from the access token in the incoming request. The method invocation is authorized - // if any method scopes matches a claimed scope in the access token. Otherwise, - // the invocation is not authorized. When the method scope is configured, the - // client must provide an access token instead of an identity token for authorization - // purposes. + // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + // The authorization works by matching the method scopes against the scopes + // parsed from the access token in the incoming request. The method invocation + // is authorized if any method scopes matches a claimed scope in the access + // token. Otherwise, the invocation is not authorized. When the method scope + // is configured, the client must provide an access token instead of an identity + // token for authorization purposes. AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` // The method's authorization type. Valid values are NONE for open access, AWS_IAM @@ -20070,12 +20087,12 @@ type Model struct { // The name of the model. Must be an alphanumeric string. Name *string `locationName:"name" type:"string"` - // The schema for the model. For application/json models, this should be JSON-schema - // draft v4 (http://json-schema.org/documentation.html) model. Do not include - // "\*/" characters in the description of any properties because such "\*/" - // characters may be interpreted as the closing marker for comments in some - // languages, such as Java or JavaScript, causing the installation of your API's - // SDK generated by API Gateway to fail. + // The schema for the model. For application/json models, this should be JSON + // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. + // Do not include "\*/" characters in the description of any properties because + // such "\*/" characters may be interpreted as the closing marker for comments + // in some languages, such as Java or JavaScript, causing the installation of + // your API's SDK generated by API Gateway to fail. Schema *string `locationName:"schema" type:"string"` } @@ -20203,8 +20220,8 @@ type PutGatewayResponseInput struct { // pairs. ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - // The response type of the associated GatewayResponse. Valid values are ACCESS_DENIED - // + // [Required] The response type of the associated GatewayResponse. Valid values + // are ACCESS_DENIED // API_CONFIGURATION_ERROR // AUTHORIZER_FAILURE // AUTHORIZER_CONFIGURATION_ERROR @@ -20223,12 +20240,12 @@ type PutGatewayResponseInput struct { // RESOURCE_NOT_FOUND // THROTTLED // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPES + // UNSUPPORTED_MEDIA_TYPE // // ResponseType is a required field ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -20331,7 +20348,7 @@ type PutIntegrationInput struct { // Specifies whether credentials are required for a put integration. Credentials *string `locationName:"credentials" type:"string"` - // Specifies a put integration request's HTTP method. + // [Required] Specifies a put integration request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -20371,12 +20388,12 @@ type PutIntegrationInput struct { // value. RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` - // Specifies a put integration request's resource ID. + // [Required] Specifies a put integration request's resource ID. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -20385,7 +20402,7 @@ type PutIntegrationInput struct { // milliseconds or 29 seconds. TimeoutInMillis *int64 `locationName:"timeoutInMillis" type:"integer"` - // Specifies a put integration input's type. + // [Required] Specifies a put integration input's type. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"IntegrationType"` @@ -20559,12 +20576,12 @@ type PutIntegrationResponseInput struct { // from the integration response to the method response without modification. ContentHandling *string `locationName:"contentHandling" type:"string" enum:"ContentHandlingStrategy"` - // Specifies a put integration response request's HTTP method. + // [Required] Specifies a put integration response request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // Specifies a put integration response request's resource identifier. + // [Required] Specifies a put integration response request's resource identifier. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` @@ -20584,7 +20601,7 @@ type PutIntegrationResponseInput struct { // Specifies a put integration response's templates. ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -20592,8 +20609,8 @@ type PutIntegrationResponseInput struct { // Specifies the selection pattern of a put integration response. SelectionPattern *string `locationName:"selectionPattern" type:"string"` - // Specifies the status code that is used to map the integration response to - // an existing MethodResponse. + // [Required] Specifies the status code that is used to map the integration + // response to an existing MethodResponse. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -20687,27 +20704,28 @@ type PutMethodInput struct { ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` // A list of authorization scopes configured on the method. The scopes are used - // with a COGNITO_USER_POOL authorizer to authorize the method invocation. The - // authorization works by matching the method scopes against the scopes parsed - // from the access token in the incoming request. The method invocation is authorized - // if any method scopes matches a claimed scope in the access token. Otherwise, - // the invocation is not authorized. When the method scope is configured, the - // client must provide an access token instead of an identity token for authorization - // purposes. + // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + // The authorization works by matching the method scopes against the scopes + // parsed from the access token in the incoming request. The method invocation + // is authorized if any method scopes matches a claimed scope in the access + // token. Otherwise, the invocation is not authorized. When the method scope + // is configured, the client must provide an access token instead of an identity + // token for authorization purposes. AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` - // The method's authorization type. Valid values are NONE for open access, AWS_IAM - // for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS - // for using a Cognito user pool. + // [Required] The method's authorization type. Valid values are NONE for open + // access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom + // authorizer, or COGNITO_USER_POOLS for using a Cognito user pool. // // AuthorizationType is a required field AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true"` // Specifies the identifier of an Authorizer to use on this Method, if the type - // is CUSTOM. + // is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by + // API Gateway when you created the authorizer. AuthorizerId *string `locationName:"authorizerId" type:"string"` - // Specifies the method request's HTTP method type. + // [Required] Specifies the method request's HTTP method type. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -20735,12 +20753,12 @@ type PutMethodInput struct { // The identifier of a RequestValidator for validating the method request. RequestValidatorId *string `locationName:"requestValidatorId" type:"string"` - // The Resource identifier for the new Method resource. + // [Required] The Resource identifier for the new Method resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -20848,12 +20866,12 @@ func (s *PutMethodInput) SetRestApiId(v string) *PutMethodInput { type PutMethodResponseInput struct { _ struct{} `type:"structure"` - // The HTTP verb of the Method resource. + // [Required] The HTTP verb of the Method resource. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` - // The Resource identifier for the Method resource. + // [Required] The Resource identifier for the Method resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` @@ -20876,12 +20894,12 @@ type PutMethodResponseInput struct { // where JSON-expression is a valid JSON expression without the $ prefix.) ResponseParameters map[string]*bool `locationName:"responseParameters" type:"map"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The method response's status code. + // [Required] The method response's status code. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -20960,9 +20978,9 @@ func (s *PutMethodResponseInput) SetStatusCode(v string) *PutMethodResponseInput type PutRestApiInput struct { _ struct{} `type:"structure" payload:"Body"` - // The PUT request body containing external API definitions. Currently, only - // Swagger definition JSON files are supported. The maximum size of the API - // definition file is 2MB. + // [Required] The PUT request body containing external API definitions. Currently, + // only Swagger definition JSON files are supported. The maximum size of the + // API definition file is 2MB. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -20981,7 +20999,7 @@ type PutRestApiInput struct { // ignore=documentation --body 'file:///path/to/imported-api-body.json. Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -21211,8 +21229,8 @@ func (s *Resource) SetResourceMethods(v map[string]*Method) *Resource { type RestApi struct { _ struct{} `type:"structure"` - // The source of the API key for metring requests according to a usage plan. - // Valid values are HEADER to read the API key from the X-API-Key header of + // The source of the API key for metering requests according to a usage plan. + // Valid values are: HEADER to read the API key from the X-API-Key header of // a request. // AUTHORIZER to read the API key from the UsageIdentifierKey from a custom // authorizer. @@ -21236,16 +21254,20 @@ type RestApi struct { // API Gateway. Id *string `locationName:"id" type:"string"` - // A nullable integer used to enable (non-negative between 0 and 10485760 (10M) - // bytes, inclusive) or disable (null) compression on an API. When compression - // is enabled, compression or decompression are not applied on the payload if - // the payload size is smaller than this value. Setting it to zero allows compression - // for any payload size. + // A nullable integer that is used to enable compression (with non-negative + // between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with + // a null value) on an API. When compression is enabled, compression or decompression + // is not applied on the payload if the payload size is smaller than this value. + // Setting it to zero allows compression for any payload size. MinimumCompressionSize *int64 `locationName:"minimumCompressionSize" type:"integer"` // The API's name. Name *string `locationName:"name" type:"string"` + // A stringified JSON policy document that applies to this RestApi regardless + // of the caller and Method + Policy *string `locationName:"policy" type:"string"` + // A version identifier for the API. Version *string `locationName:"version" type:"string"` @@ -21312,6 +21334,12 @@ func (s *RestApi) SetName(v string) *RestApi { return s } +// SetPolicy sets the Policy field's value. +func (s *RestApi) SetPolicy(v string) *RestApi { + s.Policy = &v + return s +} + // SetVersion sets the Version field's value. func (s *RestApi) SetVersion(v string) *RestApi { s.Version = &v @@ -21486,7 +21514,7 @@ type Stage struct { // (URI) of a call to API Gateway. StageName *string `locationName:"stageName" type:"string"` - // A collection of Tags associated with a given resource. + // The collection of tags. Each tag element is associated with a given resource. Tags map[string]*string `locationName:"tags" type:"map"` // A map that defines the stage variables for a Stage resource. Variable names @@ -21628,19 +21656,19 @@ func (s *StageKey) SetStageName(v string) *StageKey { return s } -// Adds or updates Tags on a gievn resource. +// Adds or updates a tag on a given resource. type TagResourceInput struct { _ struct{} `type:"structure"` - // [Required] The ARN of a resource that can be tagged. At present, Stage is - // the only taggable resource. + // [Required] The ARN of a resource that can be tagged. The resource ARN must + // be URL-encoded. At present, Stage is the only taggable resource. // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` - // [Required] Key/Value map of strings. Valid character set is [a-zA-Z+-=._:/]. - // Tag key can be up to 128 characters and must not start with "aws:". Tag value - // can be up to 256 characters. + // [Required] The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. + // The tag key can be up to 128 characters and must not start with aws:. The + // tag value can be up to 256 characters. // // Tags is a required field Tags map[string]*string `locationName:"tags" type:"map" required:"true"` @@ -21705,7 +21733,7 @@ type TestInvokeAuthorizerInput struct { // [Optional] A key-value map of additional context variables. AdditionalContext map[string]*string `locationName:"additionalContext" type:"map"` - // Specifies a test invoke authorizer request's Authorizer ID. + // [Required] Specifies a test invoke authorizer request's Authorizer ID. // // AuthorizerId is a required field AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` @@ -21722,7 +21750,7 @@ type TestInvokeAuthorizerInput struct { // request. Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -21895,7 +21923,7 @@ type TestInvokeMethodInput struct { // A key-value map of headers to simulate an incoming invocation request. Headers map[string]*string `locationName:"headers" type:"map"` - // Specifies a test invoke method request's HTTP method. + // [Required] Specifies a test invoke method request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -21904,12 +21932,12 @@ type TestInvokeMethodInput struct { // Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` - // Specifies a test invoke method request's resource ID. + // [Required] Specifies a test invoke method request's resource ID. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -22093,17 +22121,17 @@ func (s *ThrottleSettings) SetRateLimit(v float64) *ThrottleSettings { return s } -// Removes Tags from a given resource. +// Removes a tag from a given resource. type UntagResourceInput struct { _ struct{} `type:"structure"` - // [Required] The ARN of a resource that can be tagged. At present, Stage is - // the only taggable resource. + // [Required] The ARN of a resource that can be tagged. The resource ARN must + // be URL-encoded. At present, Stage is the only taggable resource. // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resource_arn" type:"string" required:"true"` - // The Tag keys to delete. + // [Required] The Tag keys to delete. // // TagKeys is a required field TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` @@ -22190,7 +22218,7 @@ func (s *UpdateAccountInput) SetPatchOperations(v []*PatchOperation) *UpdateAcco type UpdateApiKeyInput struct { _ struct{} `type:"structure"` - // The identifier of the ApiKey resource to be updated. + // [Required] The identifier of the ApiKey resource to be updated. // // ApiKey is a required field ApiKey *string `location:"uri" locationName:"api_Key" type:"string" required:"true"` @@ -22239,7 +22267,7 @@ func (s *UpdateApiKeyInput) SetPatchOperations(v []*PatchOperation) *UpdateApiKe type UpdateAuthorizerInput struct { _ struct{} `type:"structure"` - // The identifier of the Authorizer resource. + // [Required] The identifier of the Authorizer resource. // // AuthorizerId is a required field AuthorizerId *string `location:"uri" locationName:"authorizer_id" type:"string" required:"true"` @@ -22248,7 +22276,7 @@ type UpdateAuthorizerInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -22302,12 +22330,12 @@ func (s *UpdateAuthorizerInput) SetRestApiId(v string) *UpdateAuthorizerInput { type UpdateBasePathMappingInput struct { _ struct{} `type:"structure"` - // The base path of the BasePathMapping resource to change. + // [Required] The base path of the BasePathMapping resource to change. // // BasePath is a required field BasePath *string `location:"uri" locationName:"base_path" type:"string" required:"true"` - // The domain name of the BasePathMapping resource to change. + // [Required] The domain name of the BasePathMapping resource to change. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` @@ -22365,7 +22393,7 @@ func (s *UpdateBasePathMappingInput) SetPatchOperations(v []*PatchOperation) *Up type UpdateClientCertificateInput struct { _ struct{} `type:"structure"` - // The identifier of the ClientCertificate resource to be updated. + // [Required] The identifier of the ClientCertificate resource to be updated. // // ClientCertificateId is a required field ClientCertificateId *string `location:"uri" locationName:"clientcertificate_id" type:"string" required:"true"` @@ -22424,7 +22452,7 @@ type UpdateDeploymentInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -22604,7 +22632,7 @@ func (s *UpdateDocumentationVersionInput) SetRestApiId(v string) *UpdateDocument type UpdateDomainNameInput struct { _ struct{} `type:"structure"` - // The name of the DomainName resource to be changed. + // [Required] The name of the DomainName resource to be changed. // // DomainName is a required field DomainName *string `location:"uri" locationName:"domain_name" type:"string" required:"true"` @@ -22657,8 +22685,8 @@ type UpdateGatewayResponseInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The response type of the associated GatewayResponse. Valid values are ACCESS_DENIED - // + // [Required] The response type of the associated GatewayResponse. Valid values + // are ACCESS_DENIED // API_CONFIGURATION_ERROR // AUTHORIZER_FAILURE // AUTHORIZER_CONFIGURATION_ERROR @@ -22677,12 +22705,12 @@ type UpdateGatewayResponseInput struct { // RESOURCE_NOT_FOUND // THROTTLED // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPES + // UNSUPPORTED_MEDIA_TYPE // // ResponseType is a required field ResponseType *string `location:"uri" locationName:"response_type" type:"string" required:"true" enum:"GatewayResponseType"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -22809,7 +22837,7 @@ type UpdateGatewayResponseOutput struct { // RESOURCE_NOT_FOUND // THROTTLED // UNAUTHORIZED - // UNSUPPORTED_MEDIA_TYPES + // UNSUPPORTED_MEDIA_TYPE ResponseType *string `locationName:"responseType" type:"string" enum:"GatewayResponseType"` // The HTTP status code for this GatewayResponse. @@ -22860,7 +22888,7 @@ func (s *UpdateGatewayResponseOutput) SetStatusCode(v string) *UpdateGatewayResp type UpdateIntegrationInput struct { _ struct{} `type:"structure"` - // Represents an update integration request's HTTP method. + // [Required] Represents an update integration request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -22869,12 +22897,12 @@ type UpdateIntegrationInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // Represents an update integration request's resource identifier. + // [Required] Represents an update integration request's resource identifier. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -22937,7 +22965,7 @@ func (s *UpdateIntegrationInput) SetRestApiId(v string) *UpdateIntegrationInput type UpdateIntegrationResponseInput struct { _ struct{} `type:"structure"` - // Specifies an update integration response request's HTTP method. + // [Required] Specifies an update integration response request's HTTP method. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -22946,17 +22974,17 @@ type UpdateIntegrationResponseInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // Specifies an update integration response request's resource identifier. + // [Required] Specifies an update integration response request's resource identifier. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // Specifies an update integration response request's status code. + // [Required] Specifies an update integration response request's status code. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -23028,7 +23056,7 @@ func (s *UpdateIntegrationResponseInput) SetStatusCode(v string) *UpdateIntegrat type UpdateMethodInput struct { _ struct{} `type:"structure"` - // The HTTP verb of the Method resource. + // [Required] The HTTP verb of the Method resource. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -23037,12 +23065,12 @@ type UpdateMethodInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The Resource identifier for the Method resource. + // [Required] The Resource identifier for the Method resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -23105,7 +23133,7 @@ func (s *UpdateMethodInput) SetRestApiId(v string) *UpdateMethodInput { type UpdateMethodResponseInput struct { _ struct{} `type:"structure"` - // The HTTP verb of the Method resource. + // [Required] The HTTP verb of the Method resource. // // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` @@ -23114,17 +23142,17 @@ type UpdateMethodResponseInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The Resource identifier for the MethodResponse resource. + // [Required] The Resource identifier for the MethodResponse resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The status code for the MethodResponse resource. + // [Required] The status code for the MethodResponse resource. // // StatusCode is a required field StatusCode *string `location:"uri" locationName:"status_code" type:"string" required:"true"` @@ -23196,7 +23224,7 @@ func (s *UpdateMethodResponseInput) SetStatusCode(v string) *UpdateMethodRespons type UpdateModelInput struct { _ struct{} `type:"structure"` - // The name of the model to update. + // [Required] The name of the model to update. // // ModelName is a required field ModelName *string `location:"uri" locationName:"model_name" type:"string" required:"true"` @@ -23205,7 +23233,7 @@ type UpdateModelInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -23268,7 +23296,7 @@ type UpdateRequestValidatorInput struct { // RequestValidatorId is a required field RequestValidatorId *string `location:"uri" locationName:"requestvalidator_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -23387,12 +23415,12 @@ type UpdateResourceInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The identifier of the Resource resource. + // [Required] The identifier of the Resource resource. // // ResourceId is a required field ResourceId *string `location:"uri" locationName:"resource_id" type:"string" required:"true"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -23450,7 +23478,7 @@ type UpdateRestApiInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` @@ -23499,12 +23527,12 @@ type UpdateStageInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The string identifier of the associated RestApi. + // [Required] The string identifier of the associated RestApi. // // RestApiId is a required field RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` - // The name of the Stage resource to change information about. + // [Required] The name of the Stage resource to change information about. // // StageName is a required field StageName *string `location:"uri" locationName:"stage_name" type:"string" required:"true"` @@ -23559,8 +23587,8 @@ func (s *UpdateStageInput) SetStageName(v string) *UpdateStageInput { type UpdateUsageInput struct { _ struct{} `type:"structure"` - // The identifier of the API key associated with the usage plan in which a temporary - // extension is granted to the remaining quota. + // [Required] The identifier of the API key associated with the usage plan in + // which a temporary extension is granted to the remaining quota. // // KeyId is a required field KeyId *string `location:"uri" locationName:"keyId" type:"string" required:"true"` @@ -23569,7 +23597,7 @@ type UpdateUsageInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The Id of the usage plan associated with the usage data. + // [Required] The Id of the usage plan associated with the usage data. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -23627,7 +23655,7 @@ type UpdateUsagePlanInput struct { // the order specified in this list. PatchOperations []*PatchOperation `locationName:"patchOperations" type:"list"` - // The Id of the to-be-updated usage plan. + // [Required] The Id of the to-be-updated usage plan. // // UsagePlanId is a required field UsagePlanId *string `location:"uri" locationName:"usageplanId" type:"string" required:"true"` @@ -24020,10 +24048,10 @@ const ( ApiKeysFormatCsv = "csv" ) -// [Required] The authorizer type. Valid values are TOKEN for a Lambda function -// using a single authorization token submitted in a custom header, REQUEST -// for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS -// for using an Amazon Cognito user pool. +// The authorizer type. Valid values are TOKEN for a Lambda function using a +// single authorization token submitted in a custom header, REQUEST for a Lambda +// function using incoming request parameters, and COGNITO_USER_POOLS for using +// an Amazon Cognito user pool. const ( // AuthorizerTypeToken is a AuthorizerType enum value AuthorizerTypeToken = "TOKEN" diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go index f7d739be7da..1586778ca8b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go @@ -15,7 +15,7 @@ const opDeleteScalingPolicy = "DeleteScalingPolicy" // DeleteScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -115,7 +115,7 @@ const opDeleteScheduledAction = "DeleteScheduledAction" // DeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -209,7 +209,7 @@ const opDeregisterScalableTarget = "DeregisterScalableTarget" // DeregisterScalableTargetRequest generates a "aws/request.Request" representing the // client's request for the DeregisterScalableTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -308,7 +308,7 @@ const opDescribeScalableTargets = "DescribeScalableTargets" // DescribeScalableTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalableTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -460,7 +460,7 @@ const opDescribeScalingActivities = "DescribeScalingActivities" // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingActivities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -614,7 +614,7 @@ const opDescribeScalingPolicies = "DescribeScalingPolicies" // DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -774,7 +774,7 @@ const opDescribeScheduledActions = "DescribeScheduledActions" // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledActions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -870,7 +870,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -988,7 +988,7 @@ const opPutScheduledAction = "PutScheduledAction" // PutScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the PutScheduledAction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1100,7 +1100,7 @@ const opRegisterScalableTarget = "RegisterScalableTarget" // RegisterScalableTargetRequest generates a "aws/request.Request" representing the // client's request for the RegisterScalableTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go index ce553365c91..5ed7f6e2a50 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go @@ -12,7 +12,7 @@ const opCreateApiKey = "CreateApiKey" // CreateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateApiKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -115,7 +115,7 @@ const opCreateDataSource = "CreateDataSource" // CreateDataSourceRequest generates a "aws/request.Request" representing the // client's request for the CreateDataSource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -209,7 +209,7 @@ const opCreateGraphqlApi = "CreateGraphqlApi" // CreateGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the CreateGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -308,7 +308,7 @@ const opCreateResolver = "CreateResolver" // CreateResolverRequest generates a "aws/request.Request" representing the // client's request for the CreateResolver operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -401,7 +401,7 @@ const opCreateType = "CreateType" // CreateTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -495,7 +495,7 @@ const opDeleteApiKey = "DeleteApiKey" // DeleteApiKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteApiKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -585,7 +585,7 @@ const opDeleteDataSource = "DeleteDataSource" // DeleteDataSourceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDataSource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -679,7 +679,7 @@ const opDeleteGraphqlApi = "DeleteGraphqlApi" // DeleteGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the DeleteGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -773,7 +773,7 @@ const opDeleteResolver = "DeleteResolver" // DeleteResolverRequest generates a "aws/request.Request" representing the // client's request for the DeleteResolver operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -863,7 +863,7 @@ const opDeleteType = "DeleteType" // DeleteTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -957,7 +957,7 @@ const opGetDataSource = "GetDataSource" // GetDataSourceRequest generates a "aws/request.Request" representing the // client's request for the GetDataSource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1051,7 +1051,7 @@ const opGetGraphqlApi = "GetGraphqlApi" // GetGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the GetGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1141,7 +1141,7 @@ const opGetIntrospectionSchema = "GetIntrospectionSchema" // GetIntrospectionSchemaRequest generates a "aws/request.Request" representing the // client's request for the GetIntrospectionSchema operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1230,7 +1230,7 @@ const opGetResolver = "GetResolver" // GetResolverRequest generates a "aws/request.Request" representing the // client's request for the GetResolver operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1317,7 +1317,7 @@ const opGetSchemaCreationStatus = "GetSchemaCreationStatus" // GetSchemaCreationStatusRequest generates a "aws/request.Request" representing the // client's request for the GetSchemaCreationStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1407,7 +1407,7 @@ const opGetType = "GetType" // GetTypeRequest generates a "aws/request.Request" representing the // client's request for the GetType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1501,7 +1501,7 @@ const opListApiKeys = "ListApiKeys" // ListApiKeysRequest generates a "aws/request.Request" representing the // client's request for the ListApiKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1591,7 +1591,7 @@ const opListDataSources = "ListDataSources" // ListDataSourcesRequest generates a "aws/request.Request" representing the // client's request for the ListDataSources operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1681,7 +1681,7 @@ const opListGraphqlApis = "ListGraphqlApis" // ListGraphqlApisRequest generates a "aws/request.Request" representing the // client's request for the ListGraphqlApis operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1767,7 +1767,7 @@ const opListResolvers = "ListResolvers" // ListResolversRequest generates a "aws/request.Request" representing the // client's request for the ListResolvers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1857,7 +1857,7 @@ const opListTypes = "ListTypes" // ListTypesRequest generates a "aws/request.Request" representing the // client's request for the ListTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1951,7 +1951,7 @@ const opStartSchemaCreation = "StartSchemaCreation" // StartSchemaCreationRequest generates a "aws/request.Request" representing the // client's request for the StartSchemaCreation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2047,7 +2047,7 @@ const opUpdateApiKey = "UpdateApiKey" // UpdateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateApiKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2143,7 +2143,7 @@ const opUpdateDataSource = "UpdateDataSource" // UpdateDataSourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateDataSource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2237,7 +2237,7 @@ const opUpdateGraphqlApi = "UpdateGraphqlApi" // UpdateGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the UpdateGraphqlApi operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2331,7 +2331,7 @@ const opUpdateResolver = "UpdateResolver" // UpdateResolverRequest generates a "aws/request.Request" representing the // client's request for the UpdateResolver operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2421,7 +2421,7 @@ const opUpdateType = "UpdateType" // UpdateTypeRequest generates a "aws/request.Request" representing the // client's request for the UpdateType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go index 198a0dfbb39..535a9905566 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go @@ -14,7 +14,7 @@ const opBatchGetNamedQuery = "BatchGetNamedQuery" // BatchGetNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the BatchGetNamedQuery operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -104,7 +104,7 @@ const opBatchGetQueryExecution = "BatchGetQueryExecution" // BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the BatchGetQueryExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -192,7 +192,7 @@ const opCreateNamedQuery = "CreateNamedQuery" // CreateNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the CreateNamedQuery operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -280,7 +280,7 @@ const opDeleteNamedQuery = "DeleteNamedQuery" // DeleteNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the DeleteNamedQuery operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -368,7 +368,7 @@ const opGetNamedQuery = "GetNamedQuery" // GetNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the GetNamedQuery operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -452,7 +452,7 @@ const opGetQueryExecution = "GetQueryExecution" // GetQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetQueryExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -537,7 +537,7 @@ const opGetQueryResults = "GetQueryResults" // GetQueryResultsRequest generates a "aws/request.Request" representing the // client's request for the GetQueryResults operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -679,7 +679,7 @@ const opListNamedQueries = "ListNamedQueries" // ListNamedQueriesRequest generates a "aws/request.Request" representing the // client's request for the ListNamedQueries operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -823,7 +823,7 @@ const opListQueryExecutions = "ListQueryExecutions" // ListQueryExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListQueryExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -967,7 +967,7 @@ const opStartQueryExecution = "StartQueryExecution" // StartQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartQueryExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1058,7 +1058,7 @@ const opStopQueryExecution = "StopQueryExecution" // StopQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopQueryExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index 7cb3085b437..1f1826493ba 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -17,7 +17,7 @@ const opAttachInstances = "AttachInstances" // AttachInstancesRequest generates a "aws/request.Request" representing the // client's request for the AttachInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -116,7 +116,7 @@ const opAttachLoadBalancerTargetGroups = "AttachLoadBalancerTargetGroups" // AttachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerTargetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -206,7 +206,7 @@ const opAttachLoadBalancers = "AttachLoadBalancers" // AttachLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -299,7 +299,7 @@ const opCompleteLifecycleAction = "CompleteLifecycleAction" // CompleteLifecycleActionRequest generates a "aws/request.Request" representing the // client's request for the CompleteLifecycleAction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -401,7 +401,7 @@ const opCreateAutoScalingGroup = "CreateAutoScalingGroup" // CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -503,7 +503,7 @@ const opCreateLaunchConfiguration = "CreateLaunchConfiguration" // CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -602,7 +602,7 @@ const opCreateOrUpdateTags = "CreateOrUpdateTags" // CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateOrUpdateTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -702,7 +702,7 @@ const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup" // DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -805,7 +805,7 @@ const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration" // DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -894,7 +894,7 @@ const opDeleteLifecycleHook = "DeleteLifecycleHook" // DeleteLifecycleHookRequest generates a "aws/request.Request" representing the // client's request for the DeleteLifecycleHook operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -977,7 +977,7 @@ const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration" // DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotificationConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1059,7 +1059,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1147,7 +1147,7 @@ const opDeleteScheduledAction = "DeleteScheduledAction" // DeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1229,7 +1229,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1314,7 +1314,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1398,7 +1398,7 @@ const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes" // DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAdjustmentTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1478,7 +1478,7 @@ const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups" // DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1617,7 +1617,7 @@ const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances" // DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1756,7 +1756,7 @@ const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationT // DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1836,7 +1836,7 @@ const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations" // DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1975,7 +1975,7 @@ const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes" // DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLifecycleHookTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2055,7 +2055,7 @@ const opDescribeLifecycleHooks = "DescribeLifecycleHooks" // DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the // client's request for the DescribeLifecycleHooks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2135,7 +2135,7 @@ const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups" // DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2215,7 +2215,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2298,7 +2298,7 @@ const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes" // DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeMetricCollectionTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2381,7 +2381,7 @@ const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations // DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotificationConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2521,7 +2521,7 @@ const opDescribePolicies = "DescribePolicies" // DescribePoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribePolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2663,7 +2663,7 @@ const opDescribeScalingActivities = "DescribeScalingActivities" // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingActivities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2802,7 +2802,7 @@ const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes" // DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingProcessTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2882,7 +2882,7 @@ const opDescribeScheduledActions = "DescribeScheduledActions" // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledActions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3022,7 +3022,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3170,7 +3170,7 @@ const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes" // DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTerminationPolicyTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3250,7 +3250,7 @@ const opDetachInstances = "DetachInstances" // DetachInstancesRequest generates a "aws/request.Request" representing the // client's request for the DetachInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3345,7 +3345,7 @@ const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups" // DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancerTargetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3425,7 +3425,7 @@ const opDetachLoadBalancers = "DetachLoadBalancers" // DetachLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3514,7 +3514,7 @@ const opDisableMetricsCollection = "DisableMetricsCollection" // DisableMetricsCollectionRequest generates a "aws/request.Request" representing the // client's request for the DisableMetricsCollection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3596,7 +3596,7 @@ const opEnableMetricsCollection = "EnableMetricsCollection" // EnableMetricsCollectionRequest generates a "aws/request.Request" representing the // client's request for the EnableMetricsCollection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3680,7 +3680,7 @@ const opEnterStandby = "EnterStandby" // EnterStandbyRequest generates a "aws/request.Request" representing the // client's request for the EnterStandby operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3764,7 +3764,7 @@ const opExecutePolicy = "ExecutePolicy" // ExecutePolicyRequest generates a "aws/request.Request" representing the // client's request for the ExecutePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3850,7 +3850,7 @@ const opExitStandby = "ExitStandby" // ExitStandbyRequest generates a "aws/request.Request" representing the // client's request for the ExitStandby operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3934,7 +3934,7 @@ const opPutLifecycleHook = "PutLifecycleHook" // PutLifecycleHookRequest generates a "aws/request.Request" representing the // client's request for the PutLifecycleHook operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4049,7 +4049,7 @@ const opPutNotificationConfiguration = "PutNotificationConfiguration" // PutNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutNotificationConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4147,7 +4147,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4243,7 +4243,7 @@ const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction" // PutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the // client's request for the PutScheduledUpdateGroupAction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4339,7 +4339,7 @@ const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat" // RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the RecordLifecycleActionHeartbeat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4442,7 +4442,7 @@ const opResumeProcesses = "ResumeProcesses" // ResumeProcessesRequest generates a "aws/request.Request" representing the // client's request for the ResumeProcesses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4532,7 +4532,7 @@ const opSetDesiredCapacity = "SetDesiredCapacity" // SetDesiredCapacityRequest generates a "aws/request.Request" representing the // client's request for the SetDesiredCapacity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4621,7 +4621,7 @@ const opSetInstanceHealth = "SetInstanceHealth" // SetInstanceHealthRequest generates a "aws/request.Request" representing the // client's request for the SetInstanceHealth operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4706,7 +4706,7 @@ const opSetInstanceProtection = "SetInstanceProtection" // SetInstanceProtectionRequest generates a "aws/request.Request" representing the // client's request for the SetInstanceProtection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4794,7 +4794,7 @@ const opSuspendProcesses = "SuspendProcesses" // SuspendProcessesRequest generates a "aws/request.Request" representing the // client's request for the SuspendProcesses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4889,7 +4889,7 @@ const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGro // TerminateInstanceInAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the TerminateInstanceInAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4977,7 +4977,7 @@ const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup" // UpdateAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateAutoScalingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go index 9921afa192f..3ba37aab666 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go @@ -14,7 +14,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -102,7 +102,7 @@ const opCreateComputeEnvironment = "CreateComputeEnvironment" // CreateComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the CreateComputeEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -207,7 +207,7 @@ const opCreateJobQueue = "CreateJobQueue" // CreateJobQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateJobQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -299,7 +299,7 @@ const opDeleteComputeEnvironment = "DeleteComputeEnvironment" // DeleteComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the DeleteComputeEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -387,7 +387,7 @@ const opDeleteJobQueue = "DeleteJobQueue" // DeleteJobQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteJobQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -476,7 +476,7 @@ const opDeregisterJobDefinition = "DeregisterJobDefinition" // DeregisterJobDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DeregisterJobDefinition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -560,7 +560,7 @@ const opDescribeComputeEnvironments = "DescribeComputeEnvironments" // DescribeComputeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeComputeEnvironments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -648,7 +648,7 @@ const opDescribeJobDefinitions = "DescribeJobDefinitions" // DescribeJobDefinitionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobDefinitions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -733,7 +733,7 @@ const opDescribeJobQueues = "DescribeJobQueues" // DescribeJobQueuesRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobQueues operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -817,7 +817,7 @@ const opDescribeJobs = "DescribeJobs" // DescribeJobsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -901,7 +901,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -987,7 +987,7 @@ const opRegisterJobDefinition = "RegisterJobDefinition" // RegisterJobDefinitionRequest generates a "aws/request.Request" representing the // client's request for the RegisterJobDefinition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1071,7 +1071,7 @@ const opSubmitJob = "SubmitJob" // SubmitJobRequest generates a "aws/request.Request" representing the // client's request for the SubmitJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1156,7 +1156,7 @@ const opTerminateJob = "TerminateJob" // TerminateJobRequest generates a "aws/request.Request" representing the // client's request for the TerminateJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1242,7 +1242,7 @@ const opUpdateComputeEnvironment = "UpdateComputeEnvironment" // UpdateComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateComputeEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1326,7 +1326,7 @@ const opUpdateJobQueue = "UpdateJobQueue" // UpdateJobQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateJobQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go index 25c50c880f1..31c43d56fb9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go @@ -15,7 +15,7 @@ const opCreateBudget = "CreateBudget" // CreateBudgetRequest generates a "aws/request.Request" representing the // client's request for the CreateBudget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -102,7 +102,7 @@ const opCreateNotification = "CreateNotification" // CreateNotificationRequest generates a "aws/request.Request" representing the // client's request for the CreateNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -193,7 +193,7 @@ const opCreateSubscriber = "CreateSubscriber" // CreateSubscriberRequest generates a "aws/request.Request" representing the // client's request for the CreateSubscriber operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -284,7 +284,7 @@ const opDeleteBudget = "DeleteBudget" // DeleteBudgetRequest generates a "aws/request.Request" representing the // client's request for the DeleteBudget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -371,7 +371,7 @@ const opDeleteNotification = "DeleteNotification" // DeleteNotificationRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -458,7 +458,7 @@ const opDeleteSubscriber = "DeleteSubscriber" // DeleteSubscriberRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubscriber operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -544,7 +544,7 @@ const opDescribeBudget = "DescribeBudget" // DescribeBudgetRequest generates a "aws/request.Request" representing the // client's request for the DescribeBudget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -628,7 +628,7 @@ const opDescribeBudgets = "DescribeBudgets" // DescribeBudgetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeBudgets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -718,7 +718,7 @@ const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget" // DescribeNotificationsForBudgetRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotificationsForBudget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -808,7 +808,7 @@ const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification // DescribeSubscribersForNotificationRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubscribersForNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -898,7 +898,7 @@ const opUpdateBudget = "UpdateBudget" // UpdateBudgetRequest generates a "aws/request.Request" representing the // client's request for the UpdateBudget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -984,7 +984,7 @@ const opUpdateNotification = "UpdateNotification" // UpdateNotificationRequest generates a "aws/request.Request" representing the // client's request for the UpdateNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1071,7 +1071,7 @@ const opUpdateSubscriber = "UpdateSubscriber" // UpdateSubscriberRequest generates a "aws/request.Request" representing the // client's request for the UpdateSubscriber operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go index 9cda728ffe4..1494b5c0285 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go @@ -14,7 +14,7 @@ const opCreateEnvironmentEC2 = "CreateEnvironmentEC2" // CreateEnvironmentEC2Request generates a "aws/request.Request" representing the // client's request for the CreateEnvironmentEC2 operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -113,7 +113,7 @@ const opCreateEnvironmentMembership = "CreateEnvironmentMembership" // CreateEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the CreateEnvironmentMembership operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -210,7 +210,7 @@ const opDeleteEnvironment = "DeleteEnvironment" // DeleteEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -308,7 +308,7 @@ const opDeleteEnvironmentMembership = "DeleteEnvironmentMembership" // DeleteEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironmentMembership operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -405,7 +405,7 @@ const opDescribeEnvironmentMemberships = "DescribeEnvironmentMemberships" // DescribeEnvironmentMembershipsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentMemberships operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -559,7 +559,7 @@ const opDescribeEnvironmentStatus = "DescribeEnvironmentStatus" // DescribeEnvironmentStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -656,7 +656,7 @@ const opDescribeEnvironments = "DescribeEnvironments" // DescribeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -753,7 +753,7 @@ const opListEnvironments = "ListEnvironments" // ListEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the ListEnvironments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -906,7 +906,7 @@ const opUpdateEnvironment = "UpdateEnvironment" // UpdateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1003,7 +1003,7 @@ const opUpdateEnvironmentMembership = "UpdateEnvironmentMembership" // UpdateEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironmentMembership operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 8a07b648e56..673b3636ceb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -17,7 +17,7 @@ const opCancelUpdateStack = "CancelUpdateStack" // CancelUpdateStackRequest generates a "aws/request.Request" representing the // client's request for the CancelUpdateStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -101,7 +101,7 @@ const opContinueUpdateRollback = "ContinueUpdateRollback" // ContinueUpdateRollbackRequest generates a "aws/request.Request" representing the // client's request for the ContinueUpdateRollback operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -192,7 +192,7 @@ const opCreateChangeSet = "CreateChangeSet" // CreateChangeSetRequest generates a "aws/request.Request" representing the // client's request for the CreateChangeSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -300,7 +300,7 @@ const opCreateStack = "CreateStack" // CreateStackRequest generates a "aws/request.Request" representing the // client's request for the CreateStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -393,7 +393,7 @@ const opCreateStackInstances = "CreateStackInstances" // CreateStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the CreateStackInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -494,7 +494,7 @@ const opCreateStackSet = "CreateStackSet" // CreateStackSetRequest generates a "aws/request.Request" representing the // client's request for the CreateStackSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -581,7 +581,7 @@ const opDeleteChangeSet = "DeleteChangeSet" // DeleteChangeSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteChangeSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -666,7 +666,7 @@ const opDeleteStack = "DeleteStack" // DeleteStackRequest generates a "aws/request.Request" representing the // client's request for the DeleteStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -749,7 +749,7 @@ const opDeleteStackInstances = "DeleteStackInstances" // DeleteStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the DeleteStackInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -842,7 +842,7 @@ const opDeleteStackSet = "DeleteStackSet" // DeleteStackSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteStackSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -929,7 +929,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1004,7 +1004,7 @@ const opDescribeChangeSet = "DescribeChangeSet" // DescribeChangeSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeChangeSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1087,7 +1087,7 @@ const opDescribeStackEvents = "DescribeStackEvents" // DescribeStackEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1222,7 +1222,7 @@ const opDescribeStackInstance = "DescribeStackInstance" // DescribeStackInstanceRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1308,7 +1308,7 @@ const opDescribeStackResource = "DescribeStackResource" // DescribeStackResourceRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1385,7 +1385,7 @@ const opDescribeStackResources = "DescribeStackResources" // DescribeStackResourcesRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackResources operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1476,7 +1476,7 @@ const opDescribeStackSet = "DescribeStackSet" // DescribeStackSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1555,7 +1555,7 @@ const opDescribeStackSetOperation = "DescribeStackSetOperation" // DescribeStackSetOperationRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSetOperation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1637,7 +1637,7 @@ const opDescribeStacks = "DescribeStacks" // DescribeStacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeStacks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1770,7 +1770,7 @@ const opEstimateTemplateCost = "EstimateTemplateCost" // EstimateTemplateCostRequest generates a "aws/request.Request" representing the // client's request for the EstimateTemplateCost operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1846,7 +1846,7 @@ const opExecuteChangeSet = "ExecuteChangeSet" // ExecuteChangeSetRequest generates a "aws/request.Request" representing the // client's request for the ExecuteChangeSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1949,7 +1949,7 @@ const opGetStackPolicy = "GetStackPolicy" // GetStackPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetStackPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2024,7 +2024,7 @@ const opGetTemplate = "GetTemplate" // GetTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2110,7 +2110,7 @@ const opGetTemplateSummary = "GetTemplateSummary" // GetTemplateSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetTemplateSummary operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2200,7 +2200,7 @@ const opListChangeSets = "ListChangeSets" // ListChangeSetsRequest generates a "aws/request.Request" representing the // client's request for the ListChangeSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2276,7 +2276,7 @@ const opListExports = "ListExports" // ListExportsRequest generates a "aws/request.Request" representing the // client's request for the ListExports operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2412,7 +2412,7 @@ const opListImports = "ListImports" // ListImportsRequest generates a "aws/request.Request" representing the // client's request for the ListImports operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2548,7 +2548,7 @@ const opListStackInstances = "ListStackInstances" // ListStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListStackInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2629,7 +2629,7 @@ const opListStackResources = "ListStackResources" // ListStackResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListStackResources operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2762,7 +2762,7 @@ const opListStackSetOperationResults = "ListStackSetOperationResults" // ListStackSetOperationResultsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSetOperationResults operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2844,7 +2844,7 @@ const opListStackSetOperations = "ListStackSetOperations" // ListStackSetOperationsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSetOperations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2923,7 +2923,7 @@ const opListStackSets = "ListStackSets" // ListStackSetsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2998,7 +2998,7 @@ const opListStacks = "ListStacks" // ListStacksRequest generates a "aws/request.Request" representing the // client's request for the ListStacks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3132,7 +3132,7 @@ const opSetStackPolicy = "SetStackPolicy" // SetStackPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetStackPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3208,7 +3208,7 @@ const opSignalResource = "SignalResource" // SignalResourceRequest generates a "aws/request.Request" representing the // client's request for the SignalResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3289,7 +3289,7 @@ const opStopStackSetOperation = "StopStackSetOperation" // StopStackSetOperationRequest generates a "aws/request.Request" representing the // client's request for the StopStackSetOperation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3374,7 +3374,7 @@ const opUpdateStack = "UpdateStack" // UpdateStackRequest generates a "aws/request.Request" representing the // client's request for the UpdateStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3465,7 +3465,7 @@ const opUpdateStackInstances = "UpdateStackInstances" // UpdateStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the UpdateStackInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3578,7 +3578,7 @@ const opUpdateStackSet = "UpdateStackSet" // UpdateStackSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateStackSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3676,7 +3676,7 @@ const opUpdateTerminationProtection = "UpdateTerminationProtection" // UpdateTerminationProtectionRequest generates a "aws/request.Request" representing the // client's request for the UpdateTerminationProtection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3758,7 +3758,7 @@ const opValidateTemplate = "ValidateTemplate" // ValidateTemplateRequest generates a "aws/request.Request" representing the // client's request for the ValidateTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5125,6 +5125,16 @@ func (s *CreateStackOutput) SetStackId(v string) *CreateStackOutput { type CreateStackSetInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Number (ARN) of the IAM role to use to create this stack + // set. + // + // Specify an IAM role only if you are using customized administrator roles + // to control which users or groups can manage specific stack sets within the + // same administrator account. For more information, see Define Permissions + // for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // in the AWS CloudFormation User Guide. + AdministrationRoleARN *string `min:"20" type:"string"` + // A list of values that you must specify before AWS CloudFormation can create // certain stack sets. Some stack set templates might include resources that // can affect permissions in your AWS account—for example, by creating new AWS @@ -5229,6 +5239,9 @@ func (s CreateStackSetInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateStackSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateStackSetInput"} + if s.AdministrationRoleARN != nil && len(*s.AdministrationRoleARN) < 20 { + invalidParams.Add(request.NewErrParamMinLen("AdministrationRoleARN", 20)) + } if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) } @@ -5261,6 +5274,12 @@ func (s *CreateStackSetInput) Validate() error { return nil } +// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. +func (s *CreateStackSetInput) SetAdministrationRoleARN(v string) *CreateStackSetInput { + s.AdministrationRoleARN = &v + return s +} + // SetCapabilities sets the Capabilities field's value. func (s *CreateStackSetInput) SetCapabilities(v []*string) *CreateStackSetInput { s.Capabilities = v @@ -8527,38 +8546,21 @@ func (s *ResourceTargetDefinition) SetRequiresRecreation(v string) *ResourceTarg // Rollback triggers enable you to have AWS CloudFormation monitor the state // of your application during stack creation and updating, and to roll back // that operation if the application breaches the threshold of any of the alarms -// you've specified. For each rollback trigger you create, you specify the Cloudwatch -// alarm that CloudFormation should monitor. CloudFormation monitors the specified -// alarms during the stack create or update operation, and for the specified -// amount of time after all resources have been deployed. If any of the alarms -// goes to ALERT state during the stack operation or the monitoring period, -// CloudFormation rolls back the entire stack operation. If the monitoring period -// expires without any alarms going to ALERT state, CloudFormation proceeds -// to dispose of old resources as usual. -// -// By default, CloudFormation only rolls back stack operations if an alarm goes -// to ALERT state, not INSUFFICIENT_DATA state. To have CloudFormation roll -// back the stack operation if an alarm goes to INSUFFICIENT_DATA state as well, -// edit the CloudWatch alarm to treat missing data as breaching. For more information, -// see Configuring How CloudWatch Alarms Treats Missing Data (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html). -// -// AWS CloudFormation does not monitor rollback triggers when it rolls back -// a stack during an update operation. +// you've specified. For more information, see Monitor and Roll Back Stack Operations +// (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-rollback-triggers.html). type RollbackConfiguration struct { _ struct{} `type:"structure"` // The amount of time, in minutes, during which CloudFormation should monitor // all the rollback triggers after the stack creation or update operation deploys - // all necessary resources. If any of the alarms goes to ALERT state during - // the stack operation or this monitoring period, CloudFormation rolls back - // the entire stack operation. Then, for update operations, if the monitoring - // period expires without any alarms going to ALERT state CloudFormation proceeds - // to dispose of old resources as usual. + // all necessary resources. + // + // The default is 0 minutes. // // If you specify a monitoring period but do not specify any rollback triggers, // CloudFormation still waits the specified period of time before cleaning up - // old resources for update operations. You can use this monitoring period to - // perform any manual stack validation desired, and manually cancel the stack + // old resources after update operations. You can use this monitoring period + // to perform any manual stack validation desired, and manually cancel the stack // creation or update (using CancelUpdateStack (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CancelUpdateStack.html), // for example) as necessary. // @@ -8576,20 +8578,20 @@ type RollbackConfiguration struct { // parameter, those triggers replace any list of triggers previously specified // for the stack. This means: // - // * If you don't specify this parameter, AWS CloudFormation uses the rollback - // triggers previously specified for this stack, if any. + // * To use the rollback triggers previously specified for this stack, if + // any, don't specify this parameter. // - // * If you specify any rollback triggers using this parameter, you must - // specify all the triggers that you want used for this stack, even triggers - // you've specifed before (for example, when creating the stack or during - // a previous stack update). Any triggers that you don't include in the updated - // list of triggers are no longer applied to the stack. + // * To specify new or updated rollback triggers, you must specify all the + // triggers that you want used for this stack, even triggers you've specifed + // before (for example, when creating the stack or during a previous stack + // update). Any triggers that you don't include in the updated list of triggers + // are no longer applied to the stack. // - // * If you specify an empty list, AWS CloudFormation removes all currently - // specified triggers. + // * To remove all currently specified triggers, specify an empty list for + // this parameter. // - // If a specified Cloudwatch alarm is missing, the entire stack operation fails - // and is rolled back. + // If a specified trigger is missing, the entire stack operation fails and is + // rolled back. RollbackTriggers []*RollbackTrigger `type:"list"` } @@ -8636,7 +8638,7 @@ func (s *RollbackConfiguration) SetRollbackTriggers(v []*RollbackTrigger) *Rollb } // A rollback trigger AWS CloudFormation monitors during creation and updating -// of stacks. If any of the alarms you specify goes to ALERT state during the +// of stacks. If any of the alarms you specify goes to ALARM state during the // stack operation or within the specified monitoring period afterwards, CloudFormation // rolls back the entire stack operation. type RollbackTrigger struct { @@ -8644,6 +8646,9 @@ type RollbackTrigger struct { // The Amazon Resource Name (ARN) of the rollback trigger. // + // If a specified trigger is missing, the entire stack operation fails and is + // rolled back. + // // Arn is a required field Arn *string `type:"string" required:"true"` @@ -9755,6 +9760,15 @@ func (s *StackResourceSummary) SetResourceType(v string) *StackResourceSummary { type StackSet struct { _ struct{} `type:"structure"` + // The Amazon Resource Number (ARN) of the IAM role used to create or update + // the stack set. + // + // Use customized administrator roles to control which users or groups can manage + // specific stack sets within the same administrator account. For more information, + // see Define Permissions for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // in the AWS CloudFormation User Guide. + AdministrationRoleARN *string `min:"20" type:"string"` + // The capabilities that are allowed in the stack set. Some stack set templates // might include resources that can affect permissions in your AWS account—for // example, by creating new AWS Identity and Access Management (IAM) users. @@ -9769,6 +9783,9 @@ type StackSet struct { // A list of input parameters for a stack set. Parameters []*Parameter `type:"list"` + // The Amazon Resource Number (ARN) of the stack set. + StackSetARN *string `type:"string"` + // The ID of the stack set. StackSetId *string `type:"string"` @@ -9797,6 +9814,12 @@ func (s StackSet) GoString() string { return s.String() } +// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. +func (s *StackSet) SetAdministrationRoleARN(v string) *StackSet { + s.AdministrationRoleARN = &v + return s +} + // SetCapabilities sets the Capabilities field's value. func (s *StackSet) SetCapabilities(v []*string) *StackSet { s.Capabilities = v @@ -9815,6 +9838,12 @@ func (s *StackSet) SetParameters(v []*Parameter) *StackSet { return s } +// SetStackSetARN sets the StackSetARN field's value. +func (s *StackSet) SetStackSetARN(v string) *StackSet { + s.StackSetARN = &v + return s +} + // SetStackSetId sets the StackSetId field's value. func (s *StackSet) SetStackSetId(v string) *StackSet { s.StackSetId = &v @@ -9855,6 +9884,15 @@ type StackSetOperation struct { // itself, as well as all associated stack set instances. Action *string `type:"string" enum:"StackSetOperationAction"` + // The Amazon Resource Number (ARN) of the IAM role used to perform this stack + // set operation. + // + // Use customized administrator roles to control which users or groups can manage + // specific stack sets within the same administrator account. For more information, + // see Define Permissions for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // in the AWS CloudFormation User Guide. + AdministrationRoleARN *string `min:"20" type:"string"` + // The time at which the operation was initiated. Note that the creation times // for the stack set operation might differ from the creation time of the individual // stacks themselves. This is because AWS CloudFormation needs to perform preparatory @@ -9920,6 +9958,12 @@ func (s *StackSetOperation) SetAction(v string) *StackSetOperation { return s } +// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. +func (s *StackSetOperation) SetAdministrationRoleARN(v string) *StackSetOperation { + s.AdministrationRoleARN = &v + return s +} + // SetCreationTimestamp sets the CreationTimestamp field's value. func (s *StackSetOperation) SetCreationTimestamp(v time.Time) *StackSetOperation { s.CreationTimestamp = &v @@ -11124,6 +11168,22 @@ func (s *UpdateStackOutput) SetStackId(v string) *UpdateStackOutput { type UpdateStackSetInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Number (ARN) of the IAM role to use to update this stack + // set. + // + // Specify an IAM role only if you are using customized administrator roles + // to control which users or groups can manage specific stack sets within the + // same administrator account. For more information, see Define Permissions + // for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // in the AWS CloudFormation User Guide. + // + // If you specify a customized administrator role, AWS CloudFormation uses that + // role to update the stack. If you do not specify a customized administrator + // role, AWS CloudFormation performs the update using the role previously associated + // with the stack set, so long as you have permissions to perform operations + // on the stack set. + AdministrationRoleARN *string `min:"20" type:"string"` + // A list of values that you must specify before AWS CloudFormation can create // certain stack sets. Some stack set templates might include resources that // can affect permissions in your AWS account—for example, by creating new AWS @@ -11255,6 +11315,9 @@ func (s UpdateStackSetInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateStackSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateStackSetInput"} + if s.AdministrationRoleARN != nil && len(*s.AdministrationRoleARN) < 20 { + invalidParams.Add(request.NewErrParamMinLen("AdministrationRoleARN", 20)) + } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } @@ -11292,6 +11355,12 @@ func (s *UpdateStackSetInput) Validate() error { return nil } +// SetAdministrationRoleARN sets the AdministrationRoleARN field's value. +func (s *UpdateStackSetInput) SetAdministrationRoleARN(v string) *UpdateStackSetInput { + s.AdministrationRoleARN = &v + return s +} + // SetCapabilities sets the Capabilities field's value. func (s *UpdateStackSetInput) SetCapabilities(v []*string) *UpdateStackSetInput { s.Capabilities = v diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index e7749972f54..afc3cf2eaa4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -13,11 +13,11 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/restxml" ) -const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2017_03_25" +const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2017_10_30" // CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -38,12 +38,12 @@ const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateCloudFrontOriginAccessIdentity func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opCreateCloudFrontOriginAccessIdentity, HTTPMethod: "POST", - HTTPPath: "/2017-03-25/origin-access-identity/cloudfront", + HTTPPath: "/2017-10-30/origin-access-identity/cloudfront", } if input == nil { @@ -92,7 +92,7 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCl // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateCloudFrontOriginAccessIdentity func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) { req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -114,11 +114,11 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opCreateDistribution = "CreateDistribution2017_03_25" +const opCreateDistribution = "CreateDistribution2017_10_30" // CreateDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -139,12 +139,12 @@ const opCreateDistribution = "CreateDistribution2017_03_25" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistribution func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) { op := &request.Operation{ Name: opCreateDistribution, HTTPMethod: "POST", - HTTPPath: "/2017-03-25/distribution", + HTTPPath: "/2017-10-30/distribution", } if input == nil { @@ -287,7 +287,18 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // // * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistribution +// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" +// The specified configuration for field-level encryption doesn't exist. +// +// * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" +// The specified configuration for field-level encryption can't be associated +// with the specified cache behavior. +// +// * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" +// The maximum number of distributions have been associated with the specified +// configuration for field-level encryption. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistribution func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) return out, req.Send() @@ -309,11 +320,11 @@ func (c *CloudFront) CreateDistributionWithContext(ctx aws.Context, input *Creat return out, req.Send() } -const opCreateDistributionWithTags = "CreateDistributionWithTags2017_03_25" +const opCreateDistributionWithTags = "CreateDistributionWithTags2017_10_30" // CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateDistributionWithTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -334,12 +345,12 @@ const opCreateDistributionWithTags = "CreateDistributionWithTags2017_03_25" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistributionWithTags func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) { op := &request.Operation{ Name: opCreateDistributionWithTags, HTTPMethod: "POST", - HTTPPath: "/2017-03-25/distribution?WithTags", + HTTPPath: "/2017-10-30/distribution?WithTags", } if input == nil { @@ -483,7 +494,18 @@ func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistribution // // * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistributionWithTags +// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" +// The specified configuration for field-level encryption doesn't exist. +// +// * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" +// The specified configuration for field-level encryption can't be associated +// with the specified cache behavior. +// +// * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" +// The maximum number of distributions have been associated with the specified +// configuration for field-level encryption. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateDistributionWithTags func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) { req, out := c.CreateDistributionWithTagsRequest(input) return out, req.Send() @@ -505,11 +527,216 @@ func (c *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, inpu return out, req.Send() } -const opCreateInvalidation = "CreateInvalidation2017_03_25" +const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2017_10_30" + +// CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the +// client's request for the CreateFieldLevelEncryptionConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFieldLevelEncryptionConfig for more information on using the CreateFieldLevelEncryptionConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFieldLevelEncryptionConfigRequest method. +// req, resp := client.CreateFieldLevelEncryptionConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionConfig +func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldLevelEncryptionConfigInput) (req *request.Request, output *CreateFieldLevelEncryptionConfigOutput) { + op := &request.Operation{ + Name: opCreateFieldLevelEncryptionConfig, + HTTPMethod: "POST", + HTTPPath: "/2017-10-30/field-level-encryption", + } + + if input == nil { + input = &CreateFieldLevelEncryptionConfigInput{} + } + + output = &CreateFieldLevelEncryptionConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFieldLevelEncryptionConfig API operation for Amazon CloudFront. +// +// Create a new field-level encryption configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation CreateFieldLevelEncryptionConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInconsistentQuantities "InconsistentQuantities" +// The value of Quantity and the size of Items don't match. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" +// The specified profile for field-level encryption doesn't exist. +// +// * ErrCodeFieldLevelEncryptionConfigAlreadyExists "FieldLevelEncryptionConfigAlreadyExists" +// The specified configuration for field-level encryption already exists. +// +// * ErrCodeTooManyFieldLevelEncryptionConfigs "TooManyFieldLevelEncryptionConfigs" +// The maximum number of configurations for field-level encryption have been +// created. +// +// * ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" +// The maximum number of query arg profiles for field-level encryption have +// been created. +// +// * ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" +// The maximum number of content type profiles for field-level encryption have +// been created. +// +// * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" +// No profile specified for the field-level encryption query argument. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionConfig +func (c *CloudFront) CreateFieldLevelEncryptionConfig(input *CreateFieldLevelEncryptionConfigInput) (*CreateFieldLevelEncryptionConfigOutput, error) { + req, out := c.CreateFieldLevelEncryptionConfigRequest(input) + return out, req.Send() +} + +// CreateFieldLevelEncryptionConfigWithContext is the same as CreateFieldLevelEncryptionConfig with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFieldLevelEncryptionConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) CreateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionConfigInput, opts ...request.Option) (*CreateFieldLevelEncryptionConfigOutput, error) { + req, out := c.CreateFieldLevelEncryptionConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2017_10_30" + +// CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the +// client's request for the CreateFieldLevelEncryptionProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFieldLevelEncryptionProfile for more information on using the CreateFieldLevelEncryptionProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFieldLevelEncryptionProfileRequest method. +// req, resp := client.CreateFieldLevelEncryptionProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionProfile +func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateFieldLevelEncryptionProfileInput) (req *request.Request, output *CreateFieldLevelEncryptionProfileOutput) { + op := &request.Operation{ + Name: opCreateFieldLevelEncryptionProfile, + HTTPMethod: "POST", + HTTPPath: "/2017-10-30/field-level-encryption-profile", + } + + if input == nil { + input = &CreateFieldLevelEncryptionProfileInput{} + } + + output = &CreateFieldLevelEncryptionProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFieldLevelEncryptionProfile API operation for Amazon CloudFront. +// +// Create a field-level encryption profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation CreateFieldLevelEncryptionProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInconsistentQuantities "InconsistentQuantities" +// The value of Quantity and the size of Items don't match. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" +// The specified public key doesn't exist. +// +// * ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" +// The specified profile for field-level encryption already exists. +// +// * ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" +// The maximum size of a profile for field-level encryption was exceeded. +// +// * ErrCodeTooManyFieldLevelEncryptionProfiles "TooManyFieldLevelEncryptionProfiles" +// The maximum number of profiles for field-level encryption have been created. +// +// * ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" +// The maximum number of encryption entities for field-level encryption have +// been created. +// +// * ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" +// The maximum number of field patterns for field-level encryption have been +// created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateFieldLevelEncryptionProfile +func (c *CloudFront) CreateFieldLevelEncryptionProfile(input *CreateFieldLevelEncryptionProfileInput) (*CreateFieldLevelEncryptionProfileOutput, error) { + req, out := c.CreateFieldLevelEncryptionProfileRequest(input) + return out, req.Send() +} + +// CreateFieldLevelEncryptionProfileWithContext is the same as CreateFieldLevelEncryptionProfile with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFieldLevelEncryptionProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) CreateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionProfileInput, opts ...request.Option) (*CreateFieldLevelEncryptionProfileOutput, error) { + req, out := c.CreateFieldLevelEncryptionProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateInvalidation = "CreateInvalidation2017_10_30" // CreateInvalidationRequest generates a "aws/request.Request" representing the // client's request for the CreateInvalidation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -530,12 +757,12 @@ const opCreateInvalidation = "CreateInvalidation2017_03_25" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateInvalidation func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) { op := &request.Operation{ Name: opCreateInvalidation, HTTPMethod: "POST", - HTTPPath: "/2017-03-25/distribution/{DistributionId}/invalidation", + HTTPPath: "/2017-10-30/distribution/{DistributionId}/invalidation", } if input == nil { @@ -581,7 +808,7 @@ func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) ( // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateInvalidation func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) { req, out := c.CreateInvalidationRequest(input) return out, req.Send() @@ -603,11 +830,98 @@ func (c *CloudFront) CreateInvalidationWithContext(ctx aws.Context, input *Creat return out, req.Send() } -const opCreateStreamingDistribution = "CreateStreamingDistribution2017_03_25" +const opCreatePublicKey = "CreatePublicKey2017_10_30" + +// CreatePublicKeyRequest generates a "aws/request.Request" representing the +// client's request for the CreatePublicKey operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePublicKey for more information on using the CreatePublicKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePublicKeyRequest method. +// req, resp := client.CreatePublicKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreatePublicKey +func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *request.Request, output *CreatePublicKeyOutput) { + op := &request.Operation{ + Name: opCreatePublicKey, + HTTPMethod: "POST", + HTTPPath: "/2017-10-30/public-key", + } + + if input == nil { + input = &CreatePublicKeyInput{} + } + + output = &CreatePublicKeyOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePublicKey API operation for Amazon CloudFront. +// +// Add a new public key to CloudFront to use, for example, for field-level encryption. +// You can add a maximum of 10 public keys with one AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation CreatePublicKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodePublicKeyAlreadyExists "PublicKeyAlreadyExists" +// The specified public key already exists. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeTooManyPublicKeys "TooManyPublicKeys" +// The maximum number of public keys for field-level encryption have been created. +// To create a new public key, delete one of the existing keys. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreatePublicKey +func (c *CloudFront) CreatePublicKey(input *CreatePublicKeyInput) (*CreatePublicKeyOutput, error) { + req, out := c.CreatePublicKeyRequest(input) + return out, req.Send() +} + +// CreatePublicKeyWithContext is the same as CreatePublicKey with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePublicKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) CreatePublicKeyWithContext(ctx aws.Context, input *CreatePublicKeyInput, opts ...request.Option) (*CreatePublicKeyOutput, error) { + req, out := c.CreatePublicKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateStreamingDistribution = "CreateStreamingDistribution2017_10_30" // CreateStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -628,12 +942,12 @@ const opCreateStreamingDistribution = "CreateStreamingDistribution2017_03_25" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistribution func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) { op := &request.Operation{ Name: opCreateStreamingDistribution, HTTPMethod: "POST", - HTTPPath: "/2017-03-25/streaming-distribution", + HTTPPath: "/2017-10-30/streaming-distribution", } if input == nil { @@ -720,7 +1034,7 @@ func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDi // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistribution func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) { req, out := c.CreateStreamingDistributionRequest(input) return out, req.Send() @@ -742,11 +1056,11 @@ func (c *CloudFront) CreateStreamingDistributionWithContext(ctx aws.Context, inp return out, req.Send() } -const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2017_03_25" +const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2017_10_30" // CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistributionWithTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -767,12 +1081,12 @@ const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTa // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistributionWithTags func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) { op := &request.Operation{ Name: opCreateStreamingDistributionWithTags, HTTPMethod: "POST", - HTTPPath: "/2017-03-25/streaming-distribution?WithTags", + HTTPPath: "/2017-10-30/streaming-distribution?WithTags", } if input == nil { @@ -834,7 +1148,7 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStr // // * ErrCodeInvalidTagging "InvalidTagging" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/CreateStreamingDistributionWithTags func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) { req, out := c.CreateStreamingDistributionWithTagsRequest(input) return out, req.Send() @@ -856,11 +1170,11 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsWithContext(ctx aws.Cont return out, req.Send() } -const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2017_03_25" +const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2017_10_30" // DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -881,12 +1195,12 @@ const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteCloudFrontOriginAccessIdentity func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opDeleteCloudFrontOriginAccessIdentity, HTTPMethod: "DELETE", - HTTPPath: "/2017-03-25/origin-access-identity/cloudfront/{Id}", + HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}", } if input == nil { @@ -927,7 +1241,7 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCl // // * ErrCodeOriginAccessIdentityInUse "OriginAccessIdentityInUse" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteCloudFrontOriginAccessIdentity func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -949,11 +1263,11 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opDeleteDistribution = "DeleteDistribution2017_03_25" +const opDeleteDistribution = "DeleteDistribution2017_10_30" // DeleteDistributionRequest generates a "aws/request.Request" representing the // client's request for the DeleteDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -974,12 +1288,12 @@ const opDeleteDistribution = "DeleteDistribution2017_03_25" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteDistribution func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) { op := &request.Operation{ Name: opDeleteDistribution, HTTPMethod: "DELETE", - HTTPPath: "/2017-03-25/distribution/{Id}", + HTTPPath: "/2017-10-30/distribution/{Id}", } if input == nil { @@ -1020,7 +1334,7 @@ func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) ( // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteDistribution func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) { req, out := c.DeleteDistributionRequest(input) return out, req.Send() @@ -1042,156 +1356,438 @@ func (c *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *Delet return out, req.Send() } -const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole2017_03_25" +const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2017_10_30" -// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceLinkedRole operation. The "output" return -// value will be populated with the request's response once the request complets +// DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFieldLevelEncryptionConfig operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole +// See DeleteFieldLevelEncryptionConfig for more information on using the DeleteFieldLevelEncryptionConfig // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DeleteServiceLinkedRoleRequest method. -// req, resp := client.DeleteServiceLinkedRoleRequest(params) +// // Example sending a request using the DeleteFieldLevelEncryptionConfigRequest method. +// req, resp := client.DeleteFieldLevelEncryptionConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRole -func (c *CloudFront) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionConfig +func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldLevelEncryptionConfigInput) (req *request.Request, output *DeleteFieldLevelEncryptionConfigOutput) { op := &request.Operation{ - Name: opDeleteServiceLinkedRole, + Name: opDeleteFieldLevelEncryptionConfig, HTTPMethod: "DELETE", - HTTPPath: "/2017-03-25/service-linked-role/{RoleName}", + HTTPPath: "/2017-10-30/field-level-encryption/{Id}", } if input == nil { - input = &DeleteServiceLinkedRoleInput{} + input = &DeleteFieldLevelEncryptionConfigInput{} } - output = &DeleteServiceLinkedRoleOutput{} + output = &DeleteFieldLevelEncryptionConfigOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// DeleteServiceLinkedRole API operation for Amazon CloudFront. +// DeleteFieldLevelEncryptionConfig API operation for Amazon CloudFront. +// +// Remove a field-level encryption configuration. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation DeleteServiceLinkedRole for usage and error information. +// API operation DeleteFieldLevelEncryptionConfig for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// * ErrCodeResourceInUse "ResourceInUse" +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. // -// * ErrCodeNoSuchResource "NoSuchResource" +// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" +// The specified configuration for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRole -func (c *CloudFront) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// * ErrCodeFieldLevelEncryptionConfigInUse "FieldLevelEncryptionConfigInUse" +// The specified configuration for field-level encryption is in use. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionConfig +func (c *CloudFront) DeleteFieldLevelEncryptionConfig(input *DeleteFieldLevelEncryptionConfigInput) (*DeleteFieldLevelEncryptionConfigOutput, error) { + req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) return out, req.Send() } -// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of +// DeleteFieldLevelEncryptionConfigWithContext is the same as DeleteFieldLevelEncryptionConfig with the addition of // the ability to pass a context and additional request options. // -// See DeleteServiceLinkedRole for details on how to use this API operation. +// See DeleteFieldLevelEncryptionConfig for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) +func (c *CloudFront) DeleteFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionConfigInput, opts ...request.Option) (*DeleteFieldLevelEncryptionConfigOutput, error) { + req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteStreamingDistribution = "DeleteStreamingDistribution2017_03_25" +const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2017_10_30" -// DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFieldLevelEncryptionProfile operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteStreamingDistribution for more information on using the DeleteStreamingDistribution +// See DeleteFieldLevelEncryptionProfile for more information on using the DeleteFieldLevelEncryptionProfile // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DeleteStreamingDistributionRequest method. -// req, resp := client.DeleteStreamingDistributionRequest(params) +// // Example sending a request using the DeleteFieldLevelEncryptionProfileRequest method. +// req, resp := client.DeleteFieldLevelEncryptionProfileRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteStreamingDistribution -func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionProfile +func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteFieldLevelEncryptionProfileInput) (req *request.Request, output *DeleteFieldLevelEncryptionProfileOutput) { op := &request.Operation{ - Name: opDeleteStreamingDistribution, + Name: opDeleteFieldLevelEncryptionProfile, HTTPMethod: "DELETE", - HTTPPath: "/2017-03-25/streaming-distribution/{Id}", + HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}", } if input == nil { - input = &DeleteStreamingDistributionInput{} + input = &DeleteFieldLevelEncryptionProfileInput{} } - output = &DeleteStreamingDistributionOutput{} + output = &DeleteFieldLevelEncryptionProfileOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// DeleteStreamingDistribution API operation for Amazon CloudFront. +// DeleteFieldLevelEncryptionProfile API operation for Amazon CloudFront. // -// Delete a streaming distribution. To delete an RTMP distribution using the -// CloudFront API, perform the following steps. +// Remove a field-level encryption profile. // -// To delete an RTMP distribution using the CloudFront API: +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. // -// Disable the RTMP distribution. +// See the AWS API reference guide for Amazon CloudFront's +// API operation DeleteFieldLevelEncryptionProfile for usage and error information. // -// Submit a GET Streaming Distribution Config request to get the current configuration -// and the Etag header for the distribution. +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. // -// Update the XML document that was returned in the response to your GET Streaming -// Distribution Config request to change the value of Enabled to false. +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. // -// Submit a PUT Streaming Distribution Config request to update the configuration -// for your distribution. In the request body, include the XML document that -// you updated in Step 3. Then set the value of the HTTP If-Match header to -// the value of the ETag header that CloudFront returned when you submitted -// the GET Streaming Distribution Config request in Step 2. +// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" +// The specified profile for field-level encryption doesn't exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// * ErrCodeFieldLevelEncryptionProfileInUse "FieldLevelEncryptionProfileInUse" +// The specified profile for field-level encryption is in use. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteFieldLevelEncryptionProfile +func (c *CloudFront) DeleteFieldLevelEncryptionProfile(input *DeleteFieldLevelEncryptionProfileInput) (*DeleteFieldLevelEncryptionProfileOutput, error) { + req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) + return out, req.Send() +} + +// DeleteFieldLevelEncryptionProfileWithContext is the same as DeleteFieldLevelEncryptionProfile with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFieldLevelEncryptionProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) DeleteFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionProfileInput, opts ...request.Option) (*DeleteFieldLevelEncryptionProfileOutput, error) { + req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePublicKey = "DeletePublicKey2017_10_30" + +// DeletePublicKeyRequest generates a "aws/request.Request" representing the +// client's request for the DeletePublicKey operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePublicKey for more information on using the DeletePublicKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePublicKeyRequest method. +// req, resp := client.DeletePublicKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeletePublicKey +func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *request.Request, output *DeletePublicKeyOutput) { + op := &request.Operation{ + Name: opDeletePublicKey, + HTTPMethod: "DELETE", + HTTPPath: "/2017-10-30/public-key/{Id}", + } + + if input == nil { + input = &DeletePublicKeyInput{} + } + + output = &DeletePublicKeyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePublicKey API operation for Amazon CloudFront. +// +// Remove a public key you previously added to CloudFront. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation DeletePublicKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodePublicKeyInUse "PublicKeyInUse" +// The specified public key is in use. +// +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. +// +// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" +// The specified public key doesn't exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeletePublicKey +func (c *CloudFront) DeletePublicKey(input *DeletePublicKeyInput) (*DeletePublicKeyOutput, error) { + req, out := c.DeletePublicKeyRequest(input) + return out, req.Send() +} + +// DeletePublicKeyWithContext is the same as DeletePublicKey with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePublicKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePublicKeyInput, opts ...request.Option) (*DeletePublicKeyOutput, error) { + req, out := c.DeletePublicKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole2017_10_30" + +// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteServiceLinkedRole operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteServiceLinkedRoleRequest method. +// req, resp := client.DeleteServiceLinkedRoleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteServiceLinkedRole +func (c *CloudFront) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { + op := &request.Operation{ + Name: opDeleteServiceLinkedRole, + HTTPMethod: "DELETE", + HTTPPath: "/2017-10-30/service-linked-role/{RoleName}", + } + + if input == nil { + input = &DeleteServiceLinkedRoleInput{} + } + + output = &DeleteServiceLinkedRoleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteServiceLinkedRole API operation for Amazon CloudFront. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation DeleteServiceLinkedRole for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeResourceInUse "ResourceInUse" +// +// * ErrCodeNoSuchResource "NoSuchResource" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteServiceLinkedRole +func (c *CloudFront) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { + req, out := c.DeleteServiceLinkedRoleRequest(input) + return out, req.Send() +} + +// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteServiceLinkedRole for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { + req, out := c.DeleteServiceLinkedRoleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteStreamingDistribution = "DeleteStreamingDistribution2017_10_30" + +// DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteStreamingDistribution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteStreamingDistribution for more information on using the DeleteStreamingDistribution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteStreamingDistributionRequest method. +// req, resp := client.DeleteStreamingDistributionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteStreamingDistribution +func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) { + op := &request.Operation{ + Name: opDeleteStreamingDistribution, + HTTPMethod: "DELETE", + HTTPPath: "/2017-10-30/streaming-distribution/{Id}", + } + + if input == nil { + input = &DeleteStreamingDistributionInput{} + } + + output = &DeleteStreamingDistributionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteStreamingDistribution API operation for Amazon CloudFront. +// +// Delete a streaming distribution. To delete an RTMP distribution using the +// CloudFront API, perform the following steps. +// +// To delete an RTMP distribution using the CloudFront API: +// +// Disable the RTMP distribution. +// +// Submit a GET Streaming Distribution Config request to get the current configuration +// and the Etag header for the distribution. +// +// Update the XML document that was returned in the response to your GET Streaming +// Distribution Config request to change the value of Enabled to false. +// +// Submit a PUT Streaming Distribution Config request to update the configuration +// for your distribution. In the request body, include the XML document that +// you updated in Step 3. Then set the value of the HTTP If-Match header to +// the value of the ETag header that CloudFront returned when you submitted +// the GET Streaming Distribution Config request in Step 2. // // Review the response to the PUT Streaming Distribution Config request to confirm // that the distribution was successfully disabled. @@ -1234,7 +1830,7 @@ func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDi // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteStreamingDistribution func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) { req, out := c.DeleteStreamingDistributionRequest(input) return out, req.Send() @@ -1256,11 +1852,11 @@ func (c *CloudFront) DeleteStreamingDistributionWithContext(ctx aws.Context, inp return out, req.Send() } -const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2017_03_25" +const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2017_10_30" // GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1281,12 +1877,12 @@ const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentity func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opGetCloudFrontOriginAccessIdentity, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/origin-access-identity/cloudfront/{Id}", + HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}", } if input == nil { @@ -1316,7 +1912,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFro // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentity func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) { req, out := c.GetCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -1338,11 +1934,11 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityWithContext(ctx aws.Contex return out, req.Send() } -const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2017_03_25" +const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2017_10_30" // GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1363,12 +1959,12 @@ const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentityConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentityConfig func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) { op := &request.Operation{ Name: opGetCloudFrontOriginAccessIdentityConfig, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/origin-access-identity/cloudfront/{Id}/config", + HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}/config", } if input == nil { @@ -1398,7 +1994,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCl // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentityConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetCloudFrontOriginAccessIdentityConfig func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input) return out, req.Send() @@ -1420,11 +2016,11 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigWithContext(ctx aws. return out, req.Send() } -const opGetDistribution = "GetDistribution2017_03_25" +const opGetDistribution = "GetDistribution2017_10_30" // GetDistributionRequest generates a "aws/request.Request" representing the // client's request for the GetDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1445,12 +2041,12 @@ const opGetDistribution = "GetDistribution2017_03_25" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistribution func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) { op := &request.Operation{ Name: opGetDistribution, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/distribution/{Id}", + HTTPPath: "/2017-10-30/distribution/{Id}", } if input == nil { @@ -1480,7 +2076,7 @@ func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *r // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistribution func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) { req, out := c.GetDistributionRequest(input) return out, req.Send() @@ -1502,11 +2098,11 @@ func (c *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistr return out, req.Send() } -const opGetDistributionConfig = "GetDistributionConfig2017_03_25" +const opGetDistributionConfig = "GetDistributionConfig2017_10_30" // GetDistributionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetDistributionConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1527,12 +2123,12 @@ const opGetDistributionConfig = "GetDistributionConfig2017_03_25" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistributionConfig func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) { op := &request.Operation{ Name: opGetDistributionConfig, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/distribution/{Id}/config", + HTTPPath: "/2017-10-30/distribution/{Id}/config", } if input == nil { @@ -1562,7 +2158,7 @@ func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigIn // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetDistributionConfig func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) { req, out := c.GetDistributionConfigRequest(input) return out, req.Send() @@ -1584,2039 +2180,5343 @@ func (c *CloudFront) GetDistributionConfigWithContext(ctx aws.Context, input *Ge return out, req.Send() } -const opGetInvalidation = "GetInvalidation2017_03_25" +const opGetFieldLevelEncryption = "GetFieldLevelEncryption2017_10_30" -// GetInvalidationRequest generates a "aws/request.Request" representing the -// client's request for the GetInvalidation operation. The "output" return -// value will be populated with the request's response once the request complets +// GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the +// client's request for the GetFieldLevelEncryption operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetInvalidation for more information on using the GetInvalidation +// See GetFieldLevelEncryption for more information on using the GetFieldLevelEncryption // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetInvalidationRequest method. -// req, resp := client.GetInvalidationRequest(params) +// // Example sending a request using the GetFieldLevelEncryptionRequest method. +// req, resp := client.GetFieldLevelEncryptionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetInvalidation -func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryption +func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncryptionInput) (req *request.Request, output *GetFieldLevelEncryptionOutput) { op := &request.Operation{ - Name: opGetInvalidation, + Name: opGetFieldLevelEncryption, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/distribution/{DistributionId}/invalidation/{Id}", + HTTPPath: "/2017-10-30/field-level-encryption/{Id}", } if input == nil { - input = &GetInvalidationInput{} + input = &GetFieldLevelEncryptionInput{} } - output = &GetInvalidationOutput{} + output = &GetFieldLevelEncryptionOutput{} req = c.newRequest(op, input, output) return } -// GetInvalidation API operation for Amazon CloudFront. +// GetFieldLevelEncryption API operation for Amazon CloudFront. // -// Get the information about an invalidation. +// Get the field-level encryption configuration information. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation GetInvalidation for usage and error information. +// API operation GetFieldLevelEncryption for usage and error information. // // Returned Error Codes: -// * ErrCodeNoSuchInvalidation "NoSuchInvalidation" -// The specified invalidation does not exist. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetInvalidation -func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) { - req, out := c.GetInvalidationRequest(input) +// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" +// The specified configuration for field-level encryption doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryption +func (c *CloudFront) GetFieldLevelEncryption(input *GetFieldLevelEncryptionInput) (*GetFieldLevelEncryptionOutput, error) { + req, out := c.GetFieldLevelEncryptionRequest(input) return out, req.Send() } -// GetInvalidationWithContext is the same as GetInvalidation with the addition of +// GetFieldLevelEncryptionWithContext is the same as GetFieldLevelEncryption with the addition of // the ability to pass a context and additional request options. // -// See GetInvalidation for details on how to use this API operation. +// See GetFieldLevelEncryption for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.Option) (*GetInvalidationOutput, error) { - req, out := c.GetInvalidationRequest(input) +func (c *CloudFront) GetFieldLevelEncryptionWithContext(ctx aws.Context, input *GetFieldLevelEncryptionInput, opts ...request.Option) (*GetFieldLevelEncryptionOutput, error) { + req, out := c.GetFieldLevelEncryptionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetStreamingDistribution = "GetStreamingDistribution2017_03_25" +const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2017_10_30" -// GetStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the GetStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the +// client's request for the GetFieldLevelEncryptionConfig operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetStreamingDistribution for more information on using the GetStreamingDistribution +// See GetFieldLevelEncryptionConfig for more information on using the GetFieldLevelEncryptionConfig // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetStreamingDistributionRequest method. -// req, resp := client.GetStreamingDistributionRequest(params) +// // Example sending a request using the GetFieldLevelEncryptionConfigRequest method. +// req, resp := client.GetFieldLevelEncryptionConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistribution -func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionConfig +func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEncryptionConfigInput) (req *request.Request, output *GetFieldLevelEncryptionConfigOutput) { op := &request.Operation{ - Name: opGetStreamingDistribution, + Name: opGetFieldLevelEncryptionConfig, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/streaming-distribution/{Id}", + HTTPPath: "/2017-10-30/field-level-encryption/{Id}/config", } if input == nil { - input = &GetStreamingDistributionInput{} + input = &GetFieldLevelEncryptionConfigInput{} } - output = &GetStreamingDistributionOutput{} + output = &GetFieldLevelEncryptionConfigOutput{} req = c.newRequest(op, input, output) return } -// GetStreamingDistribution API operation for Amazon CloudFront. +// GetFieldLevelEncryptionConfig API operation for Amazon CloudFront. // -// Gets information about a specified RTMP distribution, including the distribution -// configuration. +// Get the field-level encryption configuration information. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation GetStreamingDistribution for usage and error information. +// API operation GetFieldLevelEncryptionConfig for usage and error information. // // Returned Error Codes: -// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistribution -func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) { - req, out := c.GetStreamingDistributionRequest(input) +// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" +// The specified configuration for field-level encryption doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionConfig +func (c *CloudFront) GetFieldLevelEncryptionConfig(input *GetFieldLevelEncryptionConfigInput) (*GetFieldLevelEncryptionConfigOutput, error) { + req, out := c.GetFieldLevelEncryptionConfigRequest(input) return out, req.Send() } -// GetStreamingDistributionWithContext is the same as GetStreamingDistribution with the addition of +// GetFieldLevelEncryptionConfigWithContext is the same as GetFieldLevelEncryptionConfig with the addition of // the ability to pass a context and additional request options. // -// See GetStreamingDistribution for details on how to use this API operation. +// See GetFieldLevelEncryptionConfig for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.Option) (*GetStreamingDistributionOutput, error) { - req, out := c.GetStreamingDistributionRequest(input) +func (c *CloudFront) GetFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionConfigOutput, error) { + req, out := c.GetFieldLevelEncryptionConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2017_03_25" +const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2017_10_30" -// GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetStreamingDistributionConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the +// client's request for the GetFieldLevelEncryptionProfile operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetStreamingDistributionConfig for more information on using the GetStreamingDistributionConfig +// See GetFieldLevelEncryptionProfile for more information on using the GetFieldLevelEncryptionProfile // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetStreamingDistributionConfigRequest method. -// req, resp := client.GetStreamingDistributionConfigRequest(params) +// // Example sending a request using the GetFieldLevelEncryptionProfileRequest method. +// req, resp := client.GetFieldLevelEncryptionProfileRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistributionConfig -func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfile +func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelEncryptionProfileInput) (req *request.Request, output *GetFieldLevelEncryptionProfileOutput) { op := &request.Operation{ - Name: opGetStreamingDistributionConfig, + Name: opGetFieldLevelEncryptionProfile, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/streaming-distribution/{Id}/config", + HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}", } if input == nil { - input = &GetStreamingDistributionConfigInput{} + input = &GetFieldLevelEncryptionProfileInput{} } - output = &GetStreamingDistributionConfigOutput{} + output = &GetFieldLevelEncryptionProfileOutput{} req = c.newRequest(op, input, output) return } -// GetStreamingDistributionConfig API operation for Amazon CloudFront. +// GetFieldLevelEncryptionProfile API operation for Amazon CloudFront. // -// Get the configuration information about a streaming distribution. +// Get the field-level encryption profile information. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation GetStreamingDistributionConfig for usage and error information. +// API operation GetFieldLevelEncryptionProfile for usage and error information. // // Returned Error Codes: -// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistributionConfig -func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) { - req, out := c.GetStreamingDistributionConfigRequest(input) +// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" +// The specified profile for field-level encryption doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfile +func (c *CloudFront) GetFieldLevelEncryptionProfile(input *GetFieldLevelEncryptionProfileInput) (*GetFieldLevelEncryptionProfileOutput, error) { + req, out := c.GetFieldLevelEncryptionProfileRequest(input) return out, req.Send() } -// GetStreamingDistributionConfigWithContext is the same as GetStreamingDistributionConfig with the addition of +// GetFieldLevelEncryptionProfileWithContext is the same as GetFieldLevelEncryptionProfile with the addition of // the ability to pass a context and additional request options. // -// See GetStreamingDistributionConfig for details on how to use this API operation. +// See GetFieldLevelEncryptionProfile for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, input *GetStreamingDistributionConfigInput, opts ...request.Option) (*GetStreamingDistributionConfigOutput, error) { - req, out := c.GetStreamingDistributionConfigRequest(input) +func (c *CloudFront) GetFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileOutput, error) { + req, out := c.GetFieldLevelEncryptionProfileRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2017_03_25" +const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2017_10_30" -// ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the -// client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return -// value will be populated with the request's response once the request complets +// GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the +// client's request for the GetFieldLevelEncryptionProfileConfig operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListCloudFrontOriginAccessIdentities for more information on using the ListCloudFrontOriginAccessIdentities +// See GetFieldLevelEncryptionProfileConfig for more information on using the GetFieldLevelEncryptionProfileConfig // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListCloudFrontOriginAccessIdentitiesRequest method. -// req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params) +// // Example sending a request using the GetFieldLevelEncryptionProfileConfigRequest method. +// req, resp := client.GetFieldLevelEncryptionProfileConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListCloudFrontOriginAccessIdentities -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfileConfig +func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetFieldLevelEncryptionProfileConfigInput) (req *request.Request, output *GetFieldLevelEncryptionProfileConfigOutput) { op := &request.Operation{ - Name: opListCloudFrontOriginAccessIdentities, + Name: opGetFieldLevelEncryptionProfileConfig, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/origin-access-identity/cloudfront", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "CloudFrontOriginAccessIdentityList.IsTruncated", - }, + HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}/config", } if input == nil { - input = &ListCloudFrontOriginAccessIdentitiesInput{} + input = &GetFieldLevelEncryptionProfileConfigInput{} } - output = &ListCloudFrontOriginAccessIdentitiesOutput{} + output = &GetFieldLevelEncryptionProfileConfigOutput{} req = c.newRequest(op, input, output) return } -// ListCloudFrontOriginAccessIdentities API operation for Amazon CloudFront. +// GetFieldLevelEncryptionProfileConfig API operation for Amazon CloudFront. // -// Lists origin access identities. +// Get the field-level encryption profile configuration information. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation ListCloudFrontOriginAccessIdentities for usage and error information. +// API operation GetFieldLevelEncryptionProfileConfig for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListCloudFrontOriginAccessIdentities -func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { - req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) +// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" +// The specified profile for field-level encryption doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetFieldLevelEncryptionProfileConfig +func (c *CloudFront) GetFieldLevelEncryptionProfileConfig(input *GetFieldLevelEncryptionProfileConfigInput) (*GetFieldLevelEncryptionProfileConfigOutput, error) { + req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) return out, req.Send() } -// ListCloudFrontOriginAccessIdentitiesWithContext is the same as ListCloudFrontOriginAccessIdentities with the addition of +// GetFieldLevelEncryptionProfileConfigWithContext is the same as GetFieldLevelEncryptionProfileConfig with the addition of // the ability to pass a context and additional request options. // -// See ListCloudFrontOriginAccessIdentities for details on how to use this API operation. +// See GetFieldLevelEncryptionProfileConfig for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, opts ...request.Option) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { - req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) +func (c *CloudFront) GetFieldLevelEncryptionProfileConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileConfigOutput, error) { + req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCloudFrontOriginAccessIdentities method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListCloudFrontOriginAccessIdentities operation. -// pageNum := 0 -// err := client.ListCloudFrontOriginAccessIdentitiesPages(params, -// func(page *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error { - return c.ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCloudFrontOriginAccessIdentitiesPagesWithContext same as ListCloudFrontOriginAccessIdentitiesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCloudFrontOriginAccessIdentitiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCloudFrontOriginAccessIdentitiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListCloudFrontOriginAccessIdentitiesOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDistributions = "ListDistributions2017_03_25" +const opGetInvalidation = "GetInvalidation2017_10_30" -// ListDistributionsRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributions operation. The "output" return -// value will be populated with the request's response once the request complets +// GetInvalidationRequest generates a "aws/request.Request" representing the +// client's request for the GetInvalidation operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListDistributions for more information on using the ListDistributions +// See GetInvalidation for more information on using the GetInvalidation // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListDistributionsRequest method. -// req, resp := client.ListDistributionsRequest(params) +// // Example sending a request using the GetInvalidationRequest method. +// req, resp := client.GetInvalidationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributions -func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetInvalidation +func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) { op := &request.Operation{ - Name: opListDistributions, + Name: opGetInvalidation, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/distribution", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"DistributionList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "DistributionList.IsTruncated", - }, + HTTPPath: "/2017-10-30/distribution/{DistributionId}/invalidation/{Id}", } if input == nil { - input = &ListDistributionsInput{} + input = &GetInvalidationInput{} } - output = &ListDistributionsOutput{} + output = &GetInvalidationOutput{} req = c.newRequest(op, input, output) return } -// ListDistributions API operation for Amazon CloudFront. +// GetInvalidation API operation for Amazon CloudFront. // -// List distributions. +// Get the information about an invalidation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation ListDistributions for usage and error information. +// API operation GetInvalidation for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. +// * ErrCodeNoSuchInvalidation "NoSuchInvalidation" +// The specified invalidation does not exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributions -func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) { - req, out := c.ListDistributionsRequest(input) +// * ErrCodeNoSuchDistribution "NoSuchDistribution" +// The specified distribution does not exist. +// +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetInvalidation +func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) { + req, out := c.GetInvalidationRequest(input) return out, req.Send() } -// ListDistributionsWithContext is the same as ListDistributions with the addition of +// GetInvalidationWithContext is the same as GetInvalidation with the addition of // the ability to pass a context and additional request options. // -// See ListDistributions for details on how to use this API operation. +// See GetInvalidation for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) ListDistributionsWithContext(ctx aws.Context, input *ListDistributionsInput, opts ...request.Option) (*ListDistributionsOutput, error) { - req, out := c.ListDistributionsRequest(input) +func (c *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.Option) (*GetInvalidationOutput, error) { + req, out := c.GetInvalidationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListDistributionsPages iterates over the pages of a ListDistributions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDistributions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListDistributions operation. -// pageNum := 0 -// err := client.ListDistributionsPages(params, -// func(page *ListDistributionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool) error { - return c.ListDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDistributionsPagesWithContext same as ListDistributionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDistributionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDistributionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListDistributionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2017_03_25" +const opGetPublicKey = "GetPublicKey2017_10_30" -// ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByWebACLId operation. The "output" return -// value will be populated with the request's response once the request complets +// GetPublicKeyRequest generates a "aws/request.Request" representing the +// client's request for the GetPublicKey operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListDistributionsByWebACLId for more information on using the ListDistributionsByWebACLId +// See GetPublicKey for more information on using the GetPublicKey // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListDistributionsByWebACLIdRequest method. -// req, resp := client.ListDistributionsByWebACLIdRequest(params) +// // Example sending a request using the GetPublicKeyRequest method. +// req, resp := client.GetPublicKeyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributionsByWebACLId -func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKey +func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput) { op := &request.Operation{ - Name: opListDistributionsByWebACLId, + Name: opGetPublicKey, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/distributionsByWebACLId/{WebACLId}", + HTTPPath: "/2017-10-30/public-key/{Id}", } if input == nil { - input = &ListDistributionsByWebACLIdInput{} + input = &GetPublicKeyInput{} } - output = &ListDistributionsByWebACLIdOutput{} + output = &GetPublicKeyOutput{} req = c.newRequest(op, input, output) return } -// ListDistributionsByWebACLId API operation for Amazon CloudFront. +// GetPublicKey API operation for Amazon CloudFront. // -// List the distributions that are associated with a specified AWS WAF web ACL. +// Get the public key information. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation ListDistributionsByWebACLId for usage and error information. +// API operation GetPublicKey for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. // -// * ErrCodeInvalidWebACLId "InvalidWebACLId" +// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" +// The specified public key doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributionsByWebACLId -func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) { - req, out := c.ListDistributionsByWebACLIdRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKey +func (c *CloudFront) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) { + req, out := c.GetPublicKeyRequest(input) return out, req.Send() } -// ListDistributionsByWebACLIdWithContext is the same as ListDistributionsByWebACLId with the addition of +// GetPublicKeyWithContext is the same as GetPublicKey with the addition of // the ability to pass a context and additional request options. // -// See ListDistributionsByWebACLId for details on how to use this API operation. +// See GetPublicKey for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, input *ListDistributionsByWebACLIdInput, opts ...request.Option) (*ListDistributionsByWebACLIdOutput, error) { - req, out := c.ListDistributionsByWebACLIdRequest(input) +func (c *CloudFront) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKeyInput, opts ...request.Option) (*GetPublicKeyOutput, error) { + req, out := c.GetPublicKeyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListInvalidations = "ListInvalidations2017_03_25" +const opGetPublicKeyConfig = "GetPublicKeyConfig2017_10_30" -// ListInvalidationsRequest generates a "aws/request.Request" representing the -// client's request for the ListInvalidations operation. The "output" return -// value will be populated with the request's response once the request complets +// GetPublicKeyConfigRequest generates a "aws/request.Request" representing the +// client's request for the GetPublicKeyConfig operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListInvalidations for more information on using the ListInvalidations +// See GetPublicKeyConfig for more information on using the GetPublicKeyConfig // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListInvalidationsRequest method. -// req, resp := client.ListInvalidationsRequest(params) +// // Example sending a request using the GetPublicKeyConfigRequest method. +// req, resp := client.GetPublicKeyConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListInvalidations -func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKeyConfig +func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) (req *request.Request, output *GetPublicKeyConfigOutput) { op := &request.Operation{ - Name: opListInvalidations, + Name: opGetPublicKeyConfig, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/distribution/{DistributionId}/invalidation", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"InvalidationList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "InvalidationList.IsTruncated", - }, + HTTPPath: "/2017-10-30/public-key/{Id}/config", } if input == nil { - input = &ListInvalidationsInput{} + input = &GetPublicKeyConfigInput{} } - output = &ListInvalidationsOutput{} + output = &GetPublicKeyConfigOutput{} req = c.newRequest(op, input, output) return } -// ListInvalidations API operation for Amazon CloudFront. +// GetPublicKeyConfig API operation for Amazon CloudFront. // -// Lists invalidation batches. +// Return public key configuration informaation // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation ListInvalidations for usage and error information. +// API operation GetPublicKeyConfig for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListInvalidations -func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) { - req, out := c.ListInvalidationsRequest(input) +// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" +// The specified public key doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetPublicKeyConfig +func (c *CloudFront) GetPublicKeyConfig(input *GetPublicKeyConfigInput) (*GetPublicKeyConfigOutput, error) { + req, out := c.GetPublicKeyConfigRequest(input) return out, req.Send() } -// ListInvalidationsWithContext is the same as ListInvalidations with the addition of +// GetPublicKeyConfigWithContext is the same as GetPublicKeyConfig with the addition of // the ability to pass a context and additional request options. // -// See ListInvalidations for details on how to use this API operation. +// See GetPublicKeyConfig for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) ListInvalidationsWithContext(ctx aws.Context, input *ListInvalidationsInput, opts ...request.Option) (*ListInvalidationsOutput, error) { - req, out := c.ListInvalidationsRequest(input) +func (c *CloudFront) GetPublicKeyConfigWithContext(ctx aws.Context, input *GetPublicKeyConfigInput, opts ...request.Option) (*GetPublicKeyConfigOutput, error) { + req, out := c.GetPublicKeyConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListInvalidationsPages iterates over the pages of a ListInvalidations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInvalidations method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListInvalidations operation. -// pageNum := 0 -// err := client.ListInvalidationsPages(params, -// func(page *ListInvalidationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool) error { - return c.ListInvalidationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInvalidationsPagesWithContext same as ListInvalidationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInvalidationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInvalidationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListInvalidationsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListStreamingDistributions = "ListStreamingDistributions2017_03_25" +const opGetStreamingDistribution = "GetStreamingDistribution2017_10_30" -// ListStreamingDistributionsRequest generates a "aws/request.Request" representing the -// client's request for the ListStreamingDistributions operation. The "output" return -// value will be populated with the request's response once the request complets +// GetStreamingDistributionRequest generates a "aws/request.Request" representing the +// client's request for the GetStreamingDistribution operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListStreamingDistributions for more information on using the ListStreamingDistributions +// See GetStreamingDistribution for more information on using the GetStreamingDistribution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListStreamingDistributionsRequest method. -// req, resp := client.ListStreamingDistributionsRequest(params) +// // Example sending a request using the GetStreamingDistributionRequest method. +// req, resp := client.GetStreamingDistributionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListStreamingDistributions -func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistribution +func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) { op := &request.Operation{ - Name: opListStreamingDistributions, + Name: opGetStreamingDistribution, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/streaming-distribution", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"StreamingDistributionList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "StreamingDistributionList.IsTruncated", - }, + HTTPPath: "/2017-10-30/streaming-distribution/{Id}", } if input == nil { - input = &ListStreamingDistributionsInput{} + input = &GetStreamingDistributionInput{} } - output = &ListStreamingDistributionsOutput{} + output = &GetStreamingDistributionOutput{} req = c.newRequest(op, input, output) return } -// ListStreamingDistributions API operation for Amazon CloudFront. +// GetStreamingDistribution API operation for Amazon CloudFront. // -// List streaming distributions. +// Gets information about a specified RTMP distribution, including the distribution +// configuration. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation ListStreamingDistributions for usage and error information. +// API operation GetStreamingDistribution for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. +// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" +// The specified streaming distribution does not exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListStreamingDistributions -func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) { - req, out := c.ListStreamingDistributionsRequest(input) +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistribution +func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) { + req, out := c.GetStreamingDistributionRequest(input) return out, req.Send() } -// ListStreamingDistributionsWithContext is the same as ListStreamingDistributions with the addition of +// GetStreamingDistributionWithContext is the same as GetStreamingDistribution with the addition of // the ability to pass a context and additional request options. // -// See ListStreamingDistributions for details on how to use this API operation. +// See GetStreamingDistribution for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) ListStreamingDistributionsWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, opts ...request.Option) (*ListStreamingDistributionsOutput, error) { - req, out := c.ListStreamingDistributionsRequest(input) +func (c *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.Option) (*GetStreamingDistributionOutput, error) { + req, out := c.GetStreamingDistributionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStreamingDistributions method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListStreamingDistributions operation. -// pageNum := 0 -// err := client.ListStreamingDistributionsPages(params, -// func(page *ListStreamingDistributionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool) error { - return c.ListStreamingDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStreamingDistributionsPagesWithContext same as ListStreamingDistributionsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStreamingDistributionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStreamingDistributionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListStreamingDistributionsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource2017_03_25" +const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2017_10_30" -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the +// client's request for the GetStreamingDistributionConfig operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsForResource for more information on using the ListTagsForResource +// See GetStreamingDistributionConfig for more information on using the GetStreamingDistributionConfig // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) +// // Example sending a request using the GetStreamingDistributionConfigRequest method. +// req, resp := client.GetStreamingDistributionConfigRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListTagsForResource -func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistributionConfig +func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) { op := &request.Operation{ - Name: opListTagsForResource, + Name: opGetStreamingDistributionConfig, HTTPMethod: "GET", - HTTPPath: "/2017-03-25/tagging", + HTTPPath: "/2017-10-30/streaming-distribution/{Id}/config", } if input == nil { - input = &ListTagsForResourceInput{} + input = &GetStreamingDistributionConfigInput{} } - output = &ListTagsForResourceOutput{} + output = &GetStreamingDistributionConfigOutput{} req = c.newRequest(op, input, output) return } -// ListTagsForResource API operation for Amazon CloudFront. +// GetStreamingDistributionConfig API operation for Amazon CloudFront. // -// List tags for a CloudFront resource. +// Get the configuration information about a streaming distribution. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation ListTagsForResource for usage and error information. +// API operation GetStreamingDistributionConfig for usage and error information. // // Returned Error Codes: +// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" +// The specified streaming distribution does not exist. +// // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeInvalidTagging "InvalidTagging" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListTagsForResource -func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/GetStreamingDistributionConfig +func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) { + req, out := c.GetStreamingDistributionConfigRequest(input) return out, req.Send() } -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// GetStreamingDistributionConfigWithContext is the same as GetStreamingDistributionConfig with the addition of // the ability to pass a context and additional request options. // -// See ListTagsForResource for details on how to use this API operation. +// See GetStreamingDistributionConfig for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +func (c *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, input *GetStreamingDistributionConfigInput, opts ...request.Option) (*GetStreamingDistributionConfigOutput, error) { + req, out := c.GetStreamingDistributionConfigRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource2017_03_25" +const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2017_10_30" -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the +// client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TagResource for more information on using the TagResource +// See ListCloudFrontOriginAccessIdentities for more information on using the ListCloudFrontOriginAccessIdentities // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) +// // Example sending a request using the ListCloudFrontOriginAccessIdentitiesRequest method. +// req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/TagResource -func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListCloudFrontOriginAccessIdentities +func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) { op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/2017-03-25/tagging?Operation=Tag", + Name: opListCloudFrontOriginAccessIdentities, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/origin-access-identity/cloudfront", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"}, + LimitToken: "MaxItems", + TruncationToken: "CloudFrontOriginAccessIdentityList.IsTruncated", + }, } if input == nil { - input = &TagResourceInput{} + input = &ListCloudFrontOriginAccessIdentitiesInput{} } - output = &TagResourceOutput{} + output = &ListCloudFrontOriginAccessIdentitiesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// TagResource API operation for Amazon CloudFront. +// ListCloudFrontOriginAccessIdentities API operation for Amazon CloudFront. // -// Add tags to a CloudFront resource. +// Lists origin access identities. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation TagResource for usage and error information. +// API operation ListCloudFrontOriginAccessIdentities for usage and error information. // // Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// * ErrCodeInvalidTagging "InvalidTagging" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/TagResource -func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListCloudFrontOriginAccessIdentities +func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { + req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) return out, req.Send() } -// TagResourceWithContext is the same as TagResource with the addition of +// ListCloudFrontOriginAccessIdentitiesWithContext is the same as ListCloudFrontOriginAccessIdentities with the addition of // the ability to pass a context and additional request options. // -// See TagResource for details on how to use this API operation. +// See ListCloudFrontOriginAccessIdentities for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, opts ...request.Option) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { + req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUntagResource = "UntagResource2017_03_25" +// ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListCloudFrontOriginAccessIdentities method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListCloudFrontOriginAccessIdentities operation. +// pageNum := 0 +// err := client.ListCloudFrontOriginAccessIdentitiesPages(params, +// func(page *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error { + return c.ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListCloudFrontOriginAccessIdentitiesPagesWithContext same as ListCloudFrontOriginAccessIdentitiesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListCloudFrontOriginAccessIdentitiesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListCloudFrontOriginAccessIdentitiesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListCloudFrontOriginAccessIdentitiesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListDistributions = "ListDistributions2017_10_30" + +// ListDistributionsRequest generates a "aws/request.Request" representing the +// client's request for the ListDistributions operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UntagResource for more information on using the UntagResource +// See ListDistributions for more information on using the ListDistributions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) +// // Example sending a request using the ListDistributionsRequest method. +// req, resp := client.ListDistributionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UntagResource -func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributions +func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) { op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/2017-03-25/tagging?Operation=Untag", + Name: opListDistributions, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/distribution", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"DistributionList.NextMarker"}, + LimitToken: "MaxItems", + TruncationToken: "DistributionList.IsTruncated", + }, } if input == nil { - input = &UntagResourceInput{} + input = &ListDistributionsInput{} } - output = &UntagResourceOutput{} + output = &ListDistributionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// UntagResource API operation for Amazon CloudFront. +// ListDistributions API operation for Amazon CloudFront. // -// Remove tags from a CloudFront resource. +// List distributions. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation UntagResource for usage and error information. +// API operation ListDistributions for usage and error information. // // Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// * ErrCodeInvalidTagging "InvalidTagging" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UntagResource -func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributions +func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) { + req, out := c.ListDistributionsRequest(input) return out, req.Send() } -// UntagResourceWithContext is the same as UntagResource with the addition of +// ListDistributionsWithContext is the same as ListDistributions with the addition of // the ability to pass a context and additional request options. // -// See UntagResource for details on how to use this API operation. +// See ListDistributions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +func (c *CloudFront) ListDistributionsWithContext(ctx aws.Context, input *ListDistributionsInput, opts ...request.Option) (*ListDistributionsOutput, error) { + req, out := c.ListDistributionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2017_03_25" +// ListDistributionsPages iterates over the pages of a ListDistributions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDistributions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListDistributions operation. +// pageNum := 0 +// err := client.ListDistributionsPages(params, +// func(page *ListDistributionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool) error { + return c.ListDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDistributionsPagesWithContext same as ListDistributionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDistributionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListDistributionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListDistributionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2017_10_30" -// UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the +// client's request for the ListDistributionsByWebACLId operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateCloudFrontOriginAccessIdentity for more information on using the UpdateCloudFrontOriginAccessIdentity +// See ListDistributionsByWebACLId for more information on using the ListDistributionsByWebACLId // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params) +// // Example sending a request using the ListDistributionsByWebACLIdRequest method. +// req, resp := client.ListDistributionsByWebACLIdRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateCloudFrontOriginAccessIdentity -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributionsByWebACLId +func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) { op := &request.Operation{ - Name: opUpdateCloudFrontOriginAccessIdentity, - HTTPMethod: "PUT", - HTTPPath: "/2017-03-25/origin-access-identity/cloudfront/{Id}/config", + Name: opListDistributionsByWebACLId, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/distributionsByWebACLId/{WebACLId}", } if input == nil { - input = &UpdateCloudFrontOriginAccessIdentityInput{} + input = &ListDistributionsByWebACLIdInput{} } - output = &UpdateCloudFrontOriginAccessIdentityOutput{} + output = &ListDistributionsByWebACLIdOutput{} req = c.newRequest(op, input, output) return } -// UpdateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. +// ListDistributionsByWebACLId API operation for Amazon CloudFront. // -// Update an origin access identity. +// List the distributions that are associated with a specified AWS WAF web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateCloudFrontOriginAccessIdentity for usage and error information. +// API operation ListDistributionsByWebACLId for usage and error information. // // Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. +// * ErrCodeInvalidWebACLId "InvalidWebACLId" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateCloudFrontOriginAccessIdentity -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListDistributionsByWebACLId +func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) { + req, out := c.ListDistributionsByWebACLIdRequest(input) return out, req.Send() } -// UpdateCloudFrontOriginAccessIdentityWithContext is the same as UpdateCloudFrontOriginAccessIdentity with the addition of +// ListDistributionsByWebACLIdWithContext is the same as ListDistributionsByWebACLId with the addition of // the ability to pass a context and additional request options. // -// See UpdateCloudFrontOriginAccessIdentity for details on how to use this API operation. +// See ListDistributionsByWebACLId for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *UpdateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) +func (c *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, input *ListDistributionsByWebACLIdInput, opts ...request.Option) (*ListDistributionsByWebACLIdOutput, error) { + req, out := c.ListDistributionsByWebACLIdRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateDistribution = "UpdateDistribution2017_03_25" +const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2017_10_30" -// UpdateDistributionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the +// client's request for the ListFieldLevelEncryptionConfigs operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateDistribution for more information on using the UpdateDistribution +// See ListFieldLevelEncryptionConfigs for more information on using the ListFieldLevelEncryptionConfigs // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateDistributionRequest method. -// req, resp := client.UpdateDistributionRequest(params) +// // Example sending a request using the ListFieldLevelEncryptionConfigsRequest method. +// req, resp := client.ListFieldLevelEncryptionConfigsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateDistribution -func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionConfigs +func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLevelEncryptionConfigsInput) (req *request.Request, output *ListFieldLevelEncryptionConfigsOutput) { op := &request.Operation{ - Name: opUpdateDistribution, - HTTPMethod: "PUT", - HTTPPath: "/2017-03-25/distribution/{Id}/config", + Name: opListFieldLevelEncryptionConfigs, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/field-level-encryption", } if input == nil { - input = &UpdateDistributionInput{} + input = &ListFieldLevelEncryptionConfigsInput{} } - output = &UpdateDistributionOutput{} + output = &ListFieldLevelEncryptionConfigsOutput{} req = c.newRequest(op, input, output) return } -// UpdateDistribution API operation for Amazon CloudFront. +// ListFieldLevelEncryptionConfigs API operation for Amazon CloudFront. // -// Updates the configuration for a web distribution. Perform the following steps. +// List all field-level encryption configurations that have been created in +// CloudFront for this account. // -// For information about updating a distribution using the CloudFront console, -// see Creating or Updating a Web Distribution Using the CloudFront Console -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) -// in the Amazon CloudFront Developer Guide. +// 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. // -// To update a web distribution using the CloudFront API +// See the AWS API reference guide for Amazon CloudFront's +// API operation ListFieldLevelEncryptionConfigs for usage and error information. // -// Submit a GetDistributionConfig request to get the current configuration and -// an Etag header for the distribution. +// Returned Error Codes: +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. // -// If you update the distribution again, you need to get a new Etag header. +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionConfigs +func (c *CloudFront) ListFieldLevelEncryptionConfigs(input *ListFieldLevelEncryptionConfigsInput) (*ListFieldLevelEncryptionConfigsOutput, error) { + req, out := c.ListFieldLevelEncryptionConfigsRequest(input) + return out, req.Send() +} + +// ListFieldLevelEncryptionConfigsWithContext is the same as ListFieldLevelEncryptionConfigs with the addition of +// the ability to pass a context and additional request options. // -// Update the XML document that was returned in the response to your GetDistributionConfig -// request to include the desired changes. You can't change the value of CallerReference. -// If you try to change this value, CloudFront returns an IllegalUpdate error. +// See ListFieldLevelEncryptionConfigs for details on how to use this API operation. // -// The new configuration replaces the existing configuration; the values that -// you specify in an UpdateDistribution request are not merged into the existing -// configuration. When you add, delete, or replace values in an element that -// allows multiple values (for example, CNAME), you must specify all of the -// values that you want to appear in the updated distribution. In addition, -// you must update the corresponding Quantity element. +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListFieldLevelEncryptionConfigsWithContext(ctx aws.Context, input *ListFieldLevelEncryptionConfigsInput, opts ...request.Option) (*ListFieldLevelEncryptionConfigsOutput, error) { + req, out := c.ListFieldLevelEncryptionConfigsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2017_10_30" + +// ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the +// client's request for the ListFieldLevelEncryptionProfiles operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// Submit an UpdateDistribution request to update the configuration for your -// distribution: +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// In the request body, include the XML document that you updated in Step 2. -// The request body must include an XML document with a DistributionConfig element. +// See ListFieldLevelEncryptionProfiles for more information on using the ListFieldLevelEncryptionProfiles +// API call, and error handling. // -// Set the value of the HTTP If-Match header to the value of the ETag header -// that CloudFront returned when you submitted the GetDistributionConfig request -// in Step 1. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// Review the response to the UpdateDistribution request to confirm that the -// configuration was successfully updated. // -// Optional: Submit a GetDistribution request to confirm that your changes have -// propagated. When propagation is complete, the value of Status is Deployed. +// // Example sending a request using the ListFieldLevelEncryptionProfilesRequest method. +// req, resp := client.ListFieldLevelEncryptionProfilesRequest(params) // -// Beginning with the 2012-05-05 version of the CloudFront API, we made substantial -// changes to the format of the XML document that you include in the request -// body when you create or update a distribution. With previous versions of -// the API, we discovered that it was too easy to accidentally delete one or -// more values for an element that accepts multiple values, for example, CNAMEs -// and trusted signers. Our changes for the 2012-05-05 release are intended -// to prevent these accidental deletions and to notify you when there's a mismatch -// between the number of values you say you're specifying in the Quantity element -// and the number of values you're actually specifying. +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionProfiles +func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLevelEncryptionProfilesInput) (req *request.Request, output *ListFieldLevelEncryptionProfilesOutput) { + op := &request.Operation{ + Name: opListFieldLevelEncryptionProfiles, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/field-level-encryption-profile", + } + + if input == nil { + input = &ListFieldLevelEncryptionProfilesInput{} + } + + output = &ListFieldLevelEncryptionProfilesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFieldLevelEncryptionProfiles API operation for Amazon CloudFront. +// +// Request a list of field-level encryption profiles that have been created +// in CloudFront for this account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateDistribution for usage and error information. +// API operation ListFieldLevelEncryptionProfiles for usage and error information. // // Returned Error Codes: -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. -// -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. -// -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// * ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. -// -// * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// * ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// * ErrCodeInvalidErrorCode "InvalidErrorCode" -// -// * ErrCodeInvalidResponseCode "InvalidResponseCode" -// // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// -// * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// -// * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// * ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// * ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// * ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// -// * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// * ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// * ErrCodeInvalidLocationCode "InvalidLocationCode" -// -// * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// -// * ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// -// * ErrCodeInvalidWebACLId "InvalidWebACLId" -// -// * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// -// * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// -// * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// -// * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda function associations per owner to be exceeded. -// -// * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda function associations than are allowed -// per distribution. -// -// * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda function association is invalid. -// -// * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// -// * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateDistribution -func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) { - req, out := c.UpdateDistributionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListFieldLevelEncryptionProfiles +func (c *CloudFront) ListFieldLevelEncryptionProfiles(input *ListFieldLevelEncryptionProfilesInput) (*ListFieldLevelEncryptionProfilesOutput, error) { + req, out := c.ListFieldLevelEncryptionProfilesRequest(input) return out, req.Send() } -// UpdateDistributionWithContext is the same as UpdateDistribution with the addition of +// ListFieldLevelEncryptionProfilesWithContext is the same as ListFieldLevelEncryptionProfiles with the addition of // the ability to pass a context and additional request options. // -// See UpdateDistribution for details on how to use this API operation. +// See ListFieldLevelEncryptionProfiles for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *UpdateDistributionInput, opts ...request.Option) (*UpdateDistributionOutput, error) { - req, out := c.UpdateDistributionRequest(input) +func (c *CloudFront) ListFieldLevelEncryptionProfilesWithContext(ctx aws.Context, input *ListFieldLevelEncryptionProfilesInput, opts ...request.Option) (*ListFieldLevelEncryptionProfilesOutput, error) { + req, out := c.ListFieldLevelEncryptionProfilesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateStreamingDistribution = "UpdateStreamingDistribution2017_03_25" +const opListInvalidations = "ListInvalidations2017_10_30" -// UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStreamingDistribution operation. The "output" return -// value will be populated with the request's response once the request complets +// ListInvalidationsRequest generates a "aws/request.Request" representing the +// client's request for the ListInvalidations operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateStreamingDistribution for more information on using the UpdateStreamingDistribution +// See ListInvalidations for more information on using the ListInvalidations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateStreamingDistributionRequest method. -// req, resp := client.UpdateStreamingDistributionRequest(params) +// // Example sending a request using the ListInvalidationsRequest method. +// req, resp := client.ListInvalidationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateStreamingDistribution -func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListInvalidations +func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) { op := &request.Operation{ - Name: opUpdateStreamingDistribution, - HTTPMethod: "PUT", - HTTPPath: "/2017-03-25/streaming-distribution/{Id}/config", + Name: opListInvalidations, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/distribution/{DistributionId}/invalidation", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"InvalidationList.NextMarker"}, + LimitToken: "MaxItems", + TruncationToken: "InvalidationList.IsTruncated", + }, } if input == nil { - input = &UpdateStreamingDistributionInput{} + input = &ListInvalidationsInput{} } - output = &UpdateStreamingDistributionOutput{} + output = &ListInvalidationsOutput{} req = c.newRequest(op, input, output) return } -// UpdateStreamingDistribution API operation for Amazon CloudFront. +// ListInvalidations API operation for Amazon CloudFront. // -// Update a streaming distribution. +// Lists invalidation batches. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudFront's -// API operation UpdateStreamingDistribution for usage and error information. +// API operation ListInvalidations for usage and error information. // // Returned Error Codes: +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeNoSuchDistribution "NoSuchDistribution" +// The specified distribution does not exist. +// // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListInvalidations +func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) { + req, out := c.ListInvalidationsRequest(input) + return out, req.Send() +} + +// ListInvalidationsWithContext is the same as ListInvalidations with the addition of +// the ability to pass a context and additional request options. // -// * ErrCodeIllegalUpdate "IllegalUpdate" -// Origin and CallerReference cannot be updated. +// See ListInvalidations for details on how to use this API operation. // -// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid for the distribution. +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListInvalidationsWithContext(ctx aws.Context, input *ListInvalidationsInput, opts ...request.Option) (*ListInvalidationsOutput, error) { + req, out := c.ListInvalidationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListInvalidationsPages iterates over the pages of a ListInvalidations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. // -// * ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. +// See ListInvalidations method for more information on how to use this operation. // -// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. +// Note: This operation can generate multiple requests to a service. // -// * ErrCodePreconditionFailed "PreconditionFailed" -// The precondition given in one or more of the request-header fields evaluated -// to false. +// // Example iterating over at most 3 pages of a ListInvalidations operation. +// pageNum := 0 +// err := client.ListInvalidationsPages(params, +// func(page *ListInvalidationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) // -// * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" +func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool) error { + return c.ListInvalidationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListInvalidationsPagesWithContext same as ListInvalidationsPages except +// it takes a Context and allows setting request options on the pages. // -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListInvalidationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListInvalidationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListInvalidationsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListPublicKeys = "ListPublicKeys2017_10_30" + +// ListPublicKeysRequest generates a "aws/request.Request" representing the +// client's request for the ListPublicKeys operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. +// See ListPublicKeys for more information on using the ListPublicKeys +// API call, and error handling. // -// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// * ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateStreamingDistribution -func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) { - req, out := c.UpdateStreamingDistributionRequest(input) +// // Example sending a request using the ListPublicKeysRequest method. +// req, resp := client.ListPublicKeysRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListPublicKeys +func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) { + op := &request.Operation{ + Name: opListPublicKeys, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/public-key", + } + + if input == nil { + input = &ListPublicKeysInput{} + } + + output = &ListPublicKeysOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPublicKeys API operation for Amazon CloudFront. +// +// List all public keys that have been added to CloudFront for this account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation ListPublicKeys for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListPublicKeys +func (c *CloudFront) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) { + req, out := c.ListPublicKeysRequest(input) return out, req.Send() } -// UpdateStreamingDistributionWithContext is the same as UpdateStreamingDistribution with the addition of +// ListPublicKeysWithContext is the same as ListPublicKeys with the addition of // the ability to pass a context and additional request options. // -// See UpdateStreamingDistribution for details on how to use this API operation. +// See ListPublicKeys for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudFront) UpdateStreamingDistributionWithContext(ctx aws.Context, input *UpdateStreamingDistributionInput, opts ...request.Option) (*UpdateStreamingDistributionOutput, error) { - req, out := c.UpdateStreamingDistributionRequest(input) +func (c *CloudFront) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) { + req, out := c.ListPublicKeysRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// A complex type that lists the AWS accounts, if any, that you included in -// the TrustedSigners complex type for this distribution. These are the accounts -// that you want to allow to create signed URLs for private content. +const opListStreamingDistributions = "ListStreamingDistributions2017_10_30" + +// ListStreamingDistributionsRequest generates a "aws/request.Request" representing the +// client's request for the ListStreamingDistributions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. // -// The Signer complex type lists the AWS account number of the trusted signer -// or self if the signer is the AWS account that created the distribution. The -// Signer element also includes the IDs of any active CloudFront key pairs that -// are associated with the trusted signer's AWS account. If no KeyPairId element -// appears for a Signer, that signer can't create signed URLs. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) -// in the Amazon CloudFront Developer Guide. -type ActiveTrustedSigners struct { - _ struct{} `type:"structure"` - - // Enabled is true if any of the AWS accounts listed in the TrustedSigners complex - // type for this RTMP distribution have active CloudFront key pairs. If not, - // Enabled is false. - // - // For more information, see ActiveTrustedSigners. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` +// See ListStreamingDistributions for more information on using the ListStreamingDistributions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListStreamingDistributionsRequest method. +// req, resp := client.ListStreamingDistributionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListStreamingDistributions +func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) { + op := &request.Operation{ + Name: opListStreamingDistributions, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/streaming-distribution", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"StreamingDistributionList.NextMarker"}, + LimitToken: "MaxItems", + TruncationToken: "StreamingDistributionList.IsTruncated", + }, + } - // A complex type that contains one Signer complex type for each trusted signer - // that is specified in the TrustedSigners complex type. - // - // For more information, see ActiveTrustedSigners. - Items []*Signer `locationNameList:"Signer" type:"list"` + if input == nil { + input = &ListStreamingDistributionsInput{} + } - // A complex type that contains one Signer complex type for each trusted signer - // specified in the TrustedSigners complex type. - // - // For more information, see ActiveTrustedSigners. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + output = &ListStreamingDistributionsOutput{} + req = c.newRequest(op, input, output) + return } -// String returns the string representation -func (s ActiveTrustedSigners) String() string { - return awsutil.Prettify(s) +// ListStreamingDistributions API operation for Amazon CloudFront. +// +// List streaming distributions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation ListStreamingDistributions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListStreamingDistributions +func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) { + req, out := c.ListStreamingDistributionsRequest(input) + return out, req.Send() } -// GoString returns the string representation -func (s ActiveTrustedSigners) GoString() string { - return s.String() +// ListStreamingDistributionsWithContext is the same as ListStreamingDistributions with the addition of +// the ability to pass a context and additional request options. +// +// See ListStreamingDistributions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListStreamingDistributionsWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, opts ...request.Option) (*ListStreamingDistributionsOutput, error) { + req, out := c.ListStreamingDistributionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } -// SetEnabled sets the Enabled field's value. -func (s *ActiveTrustedSigners) SetEnabled(v bool) *ActiveTrustedSigners { - s.Enabled = &v - return s +// ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListStreamingDistributions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListStreamingDistributions operation. +// pageNum := 0 +// err := client.ListStreamingDistributionsPages(params, +// func(page *ListStreamingDistributionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool) error { + return c.ListStreamingDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) } -// SetItems sets the Items field's value. -func (s *ActiveTrustedSigners) SetItems(v []*Signer) *ActiveTrustedSigners { - s.Items = v - return s -} +// ListStreamingDistributionsPagesWithContext same as ListStreamingDistributionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListStreamingDistributionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListStreamingDistributionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } -// SetQuantity sets the Quantity field's value. -func (s *ActiveTrustedSigners) SetQuantity(v int64) *ActiveTrustedSigners { - s.Quantity = &v - return s -} - -// A complex type that contains information about CNAMEs (alternate domain names), -// if any, for this distribution. -type Aliases struct { - _ struct{} `type:"structure"` - - // A complex type that contains the CNAME aliases, if any, that you want to - // associate with this distribution. - Items []*string `locationNameList:"CNAME" type:"list"` - - // The number of CNAME aliases, if any, that you want to associate with this - // distribution. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} - -// String returns the string representation -func (s Aliases) String() string { - return awsutil.Prettify(s) + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListStreamingDistributionsOutput), !p.HasNextPage()) + } + return p.Err() } -// GoString returns the string representation -func (s Aliases) GoString() string { - return s.String() -} +const opListTagsForResource = "ListTagsForResource2017_10_30" -// Validate inspects the fields of the type to determine if they are valid. -func (s *Aliases) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Aliases"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListTagsForResource +func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/2017-10-30/tagging", } - if invalidParams.Len() > 0 { - return invalidParams + if input == nil { + input = &ListTagsForResourceInput{} } - return nil -} - -// SetItems sets the Items field's value. -func (s *Aliases) SetItems(v []*string) *Aliases { - s.Items = v - return s -} -// SetQuantity sets the Quantity field's value. -func (s *Aliases) SetQuantity(v int64) *Aliases { - s.Quantity = &v - return s + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return } -// A complex type that controls which HTTP methods CloudFront processes and -// forwards to your Amazon S3 bucket or your custom origin. There are three -// choices: +// ListTagsForResource API operation for Amazon CloudFront. // -// * CloudFront forwards only GET and HEAD requests. +// List tags for a CloudFront resource. // -// * CloudFront forwards only GET, HEAD, and OPTIONS requests. +// 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. // -// * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE -// requests. +// See the AWS API reference guide for Amazon CloudFront's +// API operation ListTagsForResource for usage and error information. // -// If you pick the third choice, you may need to restrict access to your Amazon -// S3 bucket or to your custom origin so users can't perform operations that -// you don't want them to. For example, you might not want users to have permissions -// to delete objects from your origin. -type AllowedMethods struct { - _ struct{} `type:"structure"` - - // A complex type that controls whether CloudFront caches the response to requests - // using the specified HTTP methods. There are two choices: - // - // * CloudFront caches responses to GET and HEAD requests. - // - // * CloudFront caches responses to GET, HEAD, and OPTIONS requests. - // - // If you pick the second choice for your Amazon S3 Origin, you may need to - // forward Access-Control-Request-Method, Access-Control-Request-Headers, and - // Origin headers for the responses to be cached correctly. - CachedMethods *CachedMethods `type:"structure"` - - // A complex type that contains the HTTP methods that you want CloudFront to - // process and forward to your origin. - // - // Items is a required field - Items []*string `locationNameList:"Method" type:"list" required:"true"` - - // The number of HTTP methods that you want CloudFront to forward to your origin. - // Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS - // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests). - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidTagging "InvalidTagging" +// +// * ErrCodeNoSuchResource "NoSuchResource" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/ListTagsForResource +func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() } -// String returns the string representation -func (s AllowedMethods) String() string { - return awsutil.Prettify(s) +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } -// GoString returns the string representation -func (s AllowedMethods) GoString() string { - return s.String() -} +const opTagResource = "TagResource2017_10_30" -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllowedMethods) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.CachedMethods != nil { - if err := s.CachedMethods.Validate(); err != nil { - invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams)) - } +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/TagResource +func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/2017-10-30/tagging?Operation=Tag", } - if invalidParams.Len() > 0 { - return invalidParams + if input == nil { + input = &TagResourceInput{} } - return nil -} - -// SetCachedMethods sets the CachedMethods field's value. -func (s *AllowedMethods) SetCachedMethods(v *CachedMethods) *AllowedMethods { - s.CachedMethods = v - return s -} - -// SetItems sets the Items field's value. -func (s *AllowedMethods) SetItems(v []*string) *AllowedMethods { - s.Items = v - return s -} -// SetQuantity sets the Quantity field's value. -func (s *AllowedMethods) SetQuantity(v int64) *AllowedMethods { - s.Quantity = &v - return s + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return } -// A complex type that describes how CloudFront processes requests. +// TagResource API operation for Amazon CloudFront. // -// You must create at least as many cache behaviors (including the default cache -// behavior) as you have origins if you want CloudFront to distribute objects -// from all of the origins. Each cache behavior specifies the one origin from -// which you want CloudFront to get objects. If you have two origins and only -// the default cache behavior, the default cache behavior will cause CloudFront -// to get objects from one of the origins, but the other origin is never used. +// Add tags to a CloudFront resource. // -// For the current limit on the number of cache behaviors that you can add to -// a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) -// in the AWS General Reference. +// 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. // -// If you don't want to specify any cache behaviors, include only an empty CacheBehaviors -// element. Don't include an empty CacheBehavior element, or CloudFront returns -// a MalformedXML error. +// See the AWS API reference guide for Amazon CloudFront's +// API operation TagResource for usage and error information. // -// To delete all cache behaviors in an existing distribution, update the distribution -// configuration and include only an empty CacheBehaviors element. +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. // -// To add, change, or remove one or more cache behaviors, update the distribution +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidTagging "InvalidTagging" +// +// * ErrCodeNoSuchResource "NoSuchResource" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/TagResource +func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource2017_10_30" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UntagResource +func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/2017-10-30/tagging?Operation=Untag", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon CloudFront. +// +// Remove tags from a CloudFront resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidTagging "InvalidTagging" +// +// * ErrCodeNoSuchResource "NoSuchResource" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UntagResource +func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2017_10_30" + +// UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCloudFrontOriginAccessIdentity for more information on using the UpdateCloudFrontOriginAccessIdentity +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCloudFrontOriginAccessIdentityRequest method. +// req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateCloudFrontOriginAccessIdentity +func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) { + op := &request.Operation{ + Name: opUpdateCloudFrontOriginAccessIdentity, + HTTPMethod: "PUT", + HTTPPath: "/2017-10-30/origin-access-identity/cloudfront/{Id}/config", + } + + if input == nil { + input = &UpdateCloudFrontOriginAccessIdentityInput{} + } + + output = &UpdateCloudFrontOriginAccessIdentityOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. +// +// Update an origin access identity. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation UpdateCloudFrontOriginAccessIdentity for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeIllegalUpdate "IllegalUpdate" +// Origin and CallerReference cannot be updated. +// +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. +// +// * ErrCodeMissingBody "MissingBody" +// This operation requires a body. Ensure that the body is present and the Content-Type +// header is set. +// +// * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" +// The specified origin access identity does not exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInconsistentQuantities "InconsistentQuantities" +// The value of Quantity and the size of Items don't match. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateCloudFrontOriginAccessIdentity +func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { + req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) + return out, req.Send() +} + +// UpdateCloudFrontOriginAccessIdentityWithContext is the same as UpdateCloudFrontOriginAccessIdentity with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCloudFrontOriginAccessIdentity for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *UpdateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { + req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDistribution = "UpdateDistribution2017_10_30" + +// UpdateDistributionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDistribution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDistribution for more information on using the UpdateDistribution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDistributionRequest method. +// req, resp := client.UpdateDistributionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateDistribution +func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) { + op := &request.Operation{ + Name: opUpdateDistribution, + HTTPMethod: "PUT", + HTTPPath: "/2017-10-30/distribution/{Id}/config", + } + + if input == nil { + input = &UpdateDistributionInput{} + } + + output = &UpdateDistributionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDistribution API operation for Amazon CloudFront. +// +// Updates the configuration for a web distribution. Perform the following steps. +// +// For information about updating a distribution using the CloudFront console, +// see Creating or Updating a Web Distribution Using the CloudFront Console +// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) +// in the Amazon CloudFront Developer Guide. +// +// To update a web distribution using the CloudFront API +// +// Submit a GetDistributionConfig request to get the current configuration and +// an Etag header for the distribution. +// +// If you update the distribution again, you need to get a new Etag header. +// +// Update the XML document that was returned in the response to your GetDistributionConfig +// request to include the desired changes. You can't change the value of CallerReference. +// If you try to change this value, CloudFront returns an IllegalUpdate error. +// +// The new configuration replaces the existing configuration; the values that +// you specify in an UpdateDistribution request are not merged into the existing +// configuration. When you add, delete, or replace values in an element that +// allows multiple values (for example, CNAME), you must specify all of the +// values that you want to appear in the updated distribution. In addition, +// you must update the corresponding Quantity element. +// +// Submit an UpdateDistribution request to update the configuration for your +// distribution: +// +// In the request body, include the XML document that you updated in Step 2. +// The request body must include an XML document with a DistributionConfig element. +// +// Set the value of the HTTP If-Match header to the value of the ETag header +// that CloudFront returned when you submitted the GetDistributionConfig request +// in Step 1. +// +// Review the response to the UpdateDistribution request to confirm that the +// configuration was successfully updated. +// +// Optional: Submit a GetDistribution request to confirm that your changes have +// propagated. When propagation is complete, the value of Status is Deployed. +// +// Beginning with the 2012-05-05 version of the CloudFront API, we made substantial +// changes to the format of the XML document that you include in the request +// body when you create or update a distribution. With previous versions of +// the API, we discovered that it was too easy to accidentally delete one or +// more values for an element that accepts multiple values, for example, CNAMEs +// and trusted signers. Our changes for the 2012-05-05 release are intended +// to prevent these accidental deletions and to notify you when there's a mismatch +// between the number of values you say you're specifying in the Quantity element +// and the number of values you're actually specifying. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation UpdateDistribution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" +// +// * ErrCodeIllegalUpdate "IllegalUpdate" +// Origin and CallerReference cannot be updated. +// +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. +// +// * ErrCodeMissingBody "MissingBody" +// This operation requires a body. Ensure that the body is present and the Content-Type +// header is set. +// +// * ErrCodeNoSuchDistribution "NoSuchDistribution" +// The specified distribution does not exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" +// Your request contains more CNAMEs than are allowed per distribution. +// +// * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" +// The default root object file name is too big or contains an invalid character. +// +// * ErrCodeInvalidRelativePath "InvalidRelativePath" +// The relative path is too big, is not URL-encoded, or does not begin with +// a slash (/). +// +// * ErrCodeInvalidErrorCode "InvalidErrorCode" +// +// * ErrCodeInvalidResponseCode "InvalidResponseCode" +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" +// The origin access identity is not valid or doesn't exist. +// +// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" +// Your request contains more trusted signers than are allowed per distribution. +// +// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" +// One or more of your trusted signers don't exist. +// +// * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" +// +// * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" +// +// * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" +// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS +// protocol in your request, or omit the RequiredProtocols element from your +// distribution configuration. +// +// * ErrCodeNoSuchOrigin "NoSuchOrigin" +// No origin exists with the specified Origin Id. +// +// * ErrCodeTooManyOrigins "TooManyOrigins" +// You cannot create more origins for the distribution. +// +// * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" +// You cannot create more cache behaviors for the distribution. +// +// * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" +// Your request contains more cookie names in the whitelist than are allowed +// per cache behavior. +// +// * ErrCodeInvalidForwardCookies "InvalidForwardCookies" +// Your request contains forward cookies option which doesn't match with the +// expectation for the whitelisted list of cookie names. Either list of cookie +// names has been specified when not allowed or list of cookie names is missing +// when expected. +// +// * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" +// +// * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" +// +// * ErrCodeInconsistentQuantities "InconsistentQuantities" +// The value of Quantity and the size of Items don't match. +// +// * ErrCodeTooManyCertificates "TooManyCertificates" +// You cannot create anymore custom SSL/TLS certificates. +// +// * ErrCodeInvalidLocationCode "InvalidLocationCode" +// +// * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" +// +// * ErrCodeInvalidTTLOrder "InvalidTTLOrder" +// +// * ErrCodeInvalidWebACLId "InvalidWebACLId" +// +// * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" +// +// * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" +// +// * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" +// +// * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" +// Processing your request would cause the maximum number of distributions with +// Lambda function associations per owner to be exceeded. +// +// * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" +// Your request contains more Lambda function associations than are allowed +// per distribution. +// +// * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" +// The specified Lambda function association is invalid. +// +// * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" +// +// * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" +// +// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" +// The specified configuration for field-level encryption doesn't exist. +// +// * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" +// The specified configuration for field-level encryption can't be associated +// with the specified cache behavior. +// +// * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" +// The maximum number of distributions have been associated with the specified +// configuration for field-level encryption. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateDistribution +func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) { + req, out := c.UpdateDistributionRequest(input) + return out, req.Send() +} + +// UpdateDistributionWithContext is the same as UpdateDistribution with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDistribution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *UpdateDistributionInput, opts ...request.Option) (*UpdateDistributionOutput, error) { + req, out := c.UpdateDistributionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2017_10_30" + +// UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFieldLevelEncryptionConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFieldLevelEncryptionConfig for more information on using the UpdateFieldLevelEncryptionConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFieldLevelEncryptionConfigRequest method. +// req, resp := client.UpdateFieldLevelEncryptionConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionConfig +func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldLevelEncryptionConfigInput) (req *request.Request, output *UpdateFieldLevelEncryptionConfigOutput) { + op := &request.Operation{ + Name: opUpdateFieldLevelEncryptionConfig, + HTTPMethod: "PUT", + HTTPPath: "/2017-10-30/field-level-encryption/{Id}/config", + } + + if input == nil { + input = &UpdateFieldLevelEncryptionConfigInput{} + } + + output = &UpdateFieldLevelEncryptionConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFieldLevelEncryptionConfig API operation for Amazon CloudFront. +// +// Update a field-level encryption configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation UpdateFieldLevelEncryptionConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeIllegalUpdate "IllegalUpdate" +// Origin and CallerReference cannot be updated. +// +// * ErrCodeInconsistentQuantities "InconsistentQuantities" +// The value of Quantity and the size of Items don't match. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. +// +// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" +// The specified profile for field-level encryption doesn't exist. +// +// * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" +// The specified configuration for field-level encryption doesn't exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// * ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" +// The maximum number of query arg profiles for field-level encryption have +// been created. +// +// * ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" +// The maximum number of content type profiles for field-level encryption have +// been created. +// +// * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" +// No profile specified for the field-level encryption query argument. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionConfig +func (c *CloudFront) UpdateFieldLevelEncryptionConfig(input *UpdateFieldLevelEncryptionConfigInput) (*UpdateFieldLevelEncryptionConfigOutput, error) { + req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) + return out, req.Send() +} + +// UpdateFieldLevelEncryptionConfigWithContext is the same as UpdateFieldLevelEncryptionConfig with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFieldLevelEncryptionConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) UpdateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionConfigInput, opts ...request.Option) (*UpdateFieldLevelEncryptionConfigOutput, error) { + req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2017_10_30" + +// UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFieldLevelEncryptionProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFieldLevelEncryptionProfile for more information on using the UpdateFieldLevelEncryptionProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFieldLevelEncryptionProfileRequest method. +// req, resp := client.UpdateFieldLevelEncryptionProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionProfile +func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateFieldLevelEncryptionProfileInput) (req *request.Request, output *UpdateFieldLevelEncryptionProfileOutput) { + op := &request.Operation{ + Name: opUpdateFieldLevelEncryptionProfile, + HTTPMethod: "PUT", + HTTPPath: "/2017-10-30/field-level-encryption-profile/{Id}/config", + } + + if input == nil { + input = &UpdateFieldLevelEncryptionProfileInput{} + } + + output = &UpdateFieldLevelEncryptionProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFieldLevelEncryptionProfile API operation for Amazon CloudFront. +// +// Update a field-level encryption profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation UpdateFieldLevelEncryptionProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" +// The specified profile for field-level encryption already exists. +// +// * ErrCodeIllegalUpdate "IllegalUpdate" +// Origin and CallerReference cannot be updated. +// +// * ErrCodeInconsistentQuantities "InconsistentQuantities" +// The value of Quantity and the size of Items don't match. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. +// +// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" +// The specified public key doesn't exist. +// +// * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" +// The specified profile for field-level encryption doesn't exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// * ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" +// The maximum size of a profile for field-level encryption was exceeded. +// +// * ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" +// The maximum number of encryption entities for field-level encryption have +// been created. +// +// * ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" +// The maximum number of field patterns for field-level encryption have been +// created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateFieldLevelEncryptionProfile +func (c *CloudFront) UpdateFieldLevelEncryptionProfile(input *UpdateFieldLevelEncryptionProfileInput) (*UpdateFieldLevelEncryptionProfileOutput, error) { + req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) + return out, req.Send() +} + +// UpdateFieldLevelEncryptionProfileWithContext is the same as UpdateFieldLevelEncryptionProfile with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFieldLevelEncryptionProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) UpdateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionProfileInput, opts ...request.Option) (*UpdateFieldLevelEncryptionProfileOutput, error) { + req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdatePublicKey = "UpdatePublicKey2017_10_30" + +// UpdatePublicKeyRequest generates a "aws/request.Request" representing the +// client's request for the UpdatePublicKey operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdatePublicKey for more information on using the UpdatePublicKey +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdatePublicKeyRequest method. +// req, resp := client.UpdatePublicKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdatePublicKey +func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *request.Request, output *UpdatePublicKeyOutput) { + op := &request.Operation{ + Name: opUpdatePublicKey, + HTTPMethod: "PUT", + HTTPPath: "/2017-10-30/public-key/{Id}/config", + } + + if input == nil { + input = &UpdatePublicKeyInput{} + } + + output = &UpdatePublicKeyOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdatePublicKey API operation for Amazon CloudFront. +// +// Update public key information. Note that the only value you can change is +// the comment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation UpdatePublicKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeCannotChangeImmutablePublicKeyFields "CannotChangeImmutablePublicKeyFields" +// You can't change the value of a public key. +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. +// +// * ErrCodeIllegalUpdate "IllegalUpdate" +// Origin and CallerReference cannot be updated. +// +// * ErrCodeNoSuchPublicKey "NoSuchPublicKey" +// The specified public key doesn't exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdatePublicKey +func (c *CloudFront) UpdatePublicKey(input *UpdatePublicKeyInput) (*UpdatePublicKeyOutput, error) { + req, out := c.UpdatePublicKeyRequest(input) + return out, req.Send() +} + +// UpdatePublicKeyWithContext is the same as UpdatePublicKey with the addition of +// the ability to pass a context and additional request options. +// +// See UpdatePublicKey for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) UpdatePublicKeyWithContext(ctx aws.Context, input *UpdatePublicKeyInput, opts ...request.Option) (*UpdatePublicKeyOutput, error) { + req, out := c.UpdatePublicKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateStreamingDistribution = "UpdateStreamingDistribution2017_10_30" + +// UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateStreamingDistribution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateStreamingDistribution for more information on using the UpdateStreamingDistribution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateStreamingDistributionRequest method. +// req, resp := client.UpdateStreamingDistributionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateStreamingDistribution +func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) { + op := &request.Operation{ + Name: opUpdateStreamingDistribution, + HTTPMethod: "PUT", + HTTPPath: "/2017-10-30/streaming-distribution/{Id}/config", + } + + if input == nil { + input = &UpdateStreamingDistributionInput{} + } + + output = &UpdateStreamingDistributionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateStreamingDistribution API operation for Amazon CloudFront. +// +// Update a streaming distribution. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudFront's +// API operation UpdateStreamingDistribution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDenied "AccessDenied" +// Access denied. +// +// * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" +// +// * ErrCodeIllegalUpdate "IllegalUpdate" +// Origin and CallerReference cannot be updated. +// +// * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" +// The If-Match version is missing or not valid for the distribution. +// +// * ErrCodeMissingBody "MissingBody" +// This operation requires a body. Ensure that the body is present and the Content-Type +// header is set. +// +// * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" +// The specified streaming distribution does not exist. +// +// * ErrCodePreconditionFailed "PreconditionFailed" +// The precondition given in one or more of the request-header fields evaluated +// to false. +// +// * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" +// +// * ErrCodeInvalidArgument "InvalidArgument" +// The argument is invalid. +// +// * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" +// The origin access identity is not valid or doesn't exist. +// +// * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" +// Your request contains more trusted signers than are allowed per distribution. +// +// * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" +// One or more of your trusted signers don't exist. +// +// * ErrCodeInconsistentQuantities "InconsistentQuantities" +// The value of Quantity and the size of Items don't match. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/UpdateStreamingDistribution +func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) { + req, out := c.UpdateStreamingDistributionRequest(input) + return out, req.Send() +} + +// UpdateStreamingDistributionWithContext is the same as UpdateStreamingDistribution with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateStreamingDistribution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudFront) UpdateStreamingDistributionWithContext(ctx aws.Context, input *UpdateStreamingDistributionInput, opts ...request.Option) (*UpdateStreamingDistributionOutput, error) { + req, out := c.UpdateStreamingDistributionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A complex type that lists the AWS accounts, if any, that you included in +// the TrustedSigners complex type for this distribution. These are the accounts +// that you want to allow to create signed URLs for private content. +// +// The Signer complex type lists the AWS account number of the trusted signer +// or self if the signer is the AWS account that created the distribution. The +// Signer element also includes the IDs of any active CloudFront key pairs that +// are associated with the trusted signer's AWS account. If no KeyPairId element +// appears for a Signer, that signer can't create signed URLs. +// +// For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) +// in the Amazon CloudFront Developer Guide. +type ActiveTrustedSigners struct { + _ struct{} `type:"structure"` + + // Enabled is true if any of the AWS accounts listed in the TrustedSigners complex + // type for this RTMP distribution have active CloudFront key pairs. If not, + // Enabled is false. + // + // For more information, see ActiveTrustedSigners. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` + + // A complex type that contains one Signer complex type for each trusted signer + // that is specified in the TrustedSigners complex type. + // + // For more information, see ActiveTrustedSigners. + Items []*Signer `locationNameList:"Signer" type:"list"` + + // A complex type that contains one Signer complex type for each trusted signer + // specified in the TrustedSigners complex type. + // + // For more information, see ActiveTrustedSigners. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s ActiveTrustedSigners) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActiveTrustedSigners) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *ActiveTrustedSigners) SetEnabled(v bool) *ActiveTrustedSigners { + s.Enabled = &v + return s +} + +// SetItems sets the Items field's value. +func (s *ActiveTrustedSigners) SetItems(v []*Signer) *ActiveTrustedSigners { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *ActiveTrustedSigners) SetQuantity(v int64) *ActiveTrustedSigners { + s.Quantity = &v + return s +} + +// A complex type that contains information about CNAMEs (alternate domain names), +// if any, for this distribution. +type Aliases struct { + _ struct{} `type:"structure"` + + // A complex type that contains the CNAME aliases, if any, that you want to + // associate with this distribution. + Items []*string `locationNameList:"CNAME" type:"list"` + + // The number of CNAME aliases, if any, that you want to associate with this + // distribution. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s Aliases) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Aliases) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Aliases) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Aliases"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *Aliases) SetItems(v []*string) *Aliases { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *Aliases) SetQuantity(v int64) *Aliases { + s.Quantity = &v + return s +} + +// A complex type that controls which HTTP methods CloudFront processes and +// forwards to your Amazon S3 bucket or your custom origin. There are three +// choices: +// +// * CloudFront forwards only GET and HEAD requests. +// +// * CloudFront forwards only GET, HEAD, and OPTIONS requests. +// +// * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE +// requests. +// +// If you pick the third choice, you may need to restrict access to your Amazon +// S3 bucket or to your custom origin so users can't perform operations that +// you don't want them to. For example, you might not want users to have permissions +// to delete objects from your origin. +type AllowedMethods struct { + _ struct{} `type:"structure"` + + // A complex type that controls whether CloudFront caches the response to requests + // using the specified HTTP methods. There are two choices: + // + // * CloudFront caches responses to GET and HEAD requests. + // + // * CloudFront caches responses to GET, HEAD, and OPTIONS requests. + // + // If you pick the second choice for your Amazon S3 Origin, you may need to + // forward Access-Control-Request-Method, Access-Control-Request-Headers, and + // Origin headers for the responses to be cached correctly. + CachedMethods *CachedMethods `type:"structure"` + + // A complex type that contains the HTTP methods that you want CloudFront to + // process and forward to your origin. + // + // Items is a required field + Items []*string `locationNameList:"Method" type:"list" required:"true"` + + // The number of HTTP methods that you want CloudFront to forward to your origin. + // Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS + // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests). + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s AllowedMethods) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllowedMethods) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllowedMethods) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.CachedMethods != nil { + if err := s.CachedMethods.Validate(); err != nil { + invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCachedMethods sets the CachedMethods field's value. +func (s *AllowedMethods) SetCachedMethods(v *CachedMethods) *AllowedMethods { + s.CachedMethods = v + return s +} + +// SetItems sets the Items field's value. +func (s *AllowedMethods) SetItems(v []*string) *AllowedMethods { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *AllowedMethods) SetQuantity(v int64) *AllowedMethods { + s.Quantity = &v + return s +} + +// A complex type that describes how CloudFront processes requests. +// +// You must create at least as many cache behaviors (including the default cache +// behavior) as you have origins if you want CloudFront to distribute objects +// from all of the origins. Each cache behavior specifies the one origin from +// which you want CloudFront to get objects. If you have two origins and only +// the default cache behavior, the default cache behavior will cause CloudFront +// to get objects from one of the origins, but the other origin is never used. +// +// For the current limit on the number of cache behaviors that you can add to +// a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) +// in the AWS General Reference. +// +// If you don't want to specify any cache behaviors, include only an empty CacheBehaviors +// element. Don't include an empty CacheBehavior element, or CloudFront returns +// a MalformedXML error. +// +// To delete all cache behaviors in an existing distribution, update the distribution +// configuration and include only an empty CacheBehaviors element. +// +// To add, change, or remove one or more cache behaviors, update the distribution // configuration and specify all of the cache behaviors that you want to include // in the updated distribution. // -// For more information about cache behaviors, see Cache Behaviors (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) +// For more information about cache behaviors, see Cache Behaviors (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) +// in the Amazon CloudFront Developer Guide. +type CacheBehavior struct { + _ struct{} `type:"structure"` + + // A complex type that controls which HTTP methods CloudFront processes and + // forwards to your Amazon S3 bucket or your custom origin. There are three + // choices: + // + // * CloudFront forwards only GET and HEAD requests. + // + // * CloudFront forwards only GET, HEAD, and OPTIONS requests. + // + // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE + // requests. + // + // If you pick the third choice, you may need to restrict access to your Amazon + // S3 bucket or to your custom origin so users can't perform operations that + // you don't want them to. For example, you might not want users to have permissions + // to delete objects from your origin. + AllowedMethods *AllowedMethods `type:"structure"` + + // Whether you want CloudFront to automatically compress certain files for this + // cache behavior. If so, specify true; if not, specify false. For more information, + // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) + // in the Amazon CloudFront Developer Guide. + Compress *bool `type:"boolean"` + + // The default amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. The value that you specify applies only when + // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control + // s-maxage, and Expires to objects. For more information, see Specifying How + // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) + // in the Amazon CloudFront Developer Guide. + DefaultTTL *int64 `type:"long"` + + FieldLevelEncryptionId *string `type:"string"` + + // A complex type that specifies how CloudFront handles query strings and cookies. + // + // ForwardedValues is a required field + ForwardedValues *ForwardedValues `type:"structure" required:"true"` + + // A complex type that contains zero or more Lambda function associations for + // a cache behavior. + LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` + + // The maximum amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. The value that you specify applies only when + // your origin adds HTTP headers such as Cache-Control max-age, Cache-Control + // s-maxage, and Expires to objects. For more information, see Specifying How + // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) + // in the Amazon CloudFront Developer Guide. + MaxTTL *int64 `type:"long"` + + // The minimum amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. For more information, see Specifying How Long + // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) + // in the Amazon Amazon CloudFront Developer Guide. + // + // You must specify 0 for MinTTL if you configure CloudFront to forward all + // headers to your origin (under Headers, if you specify 1 for Quantity and + // * for Name). + // + // MinTTL is a required field + MinTTL *int64 `type:"long" required:"true"` + + // The pattern (for example, images/*.jpg) that specifies which requests to + // apply the behavior to. When CloudFront receives a viewer request, the requested + // path is compared with path patterns in the order in which cache behaviors + // are listed in the distribution. + // + // You can optionally include a slash (/) at the beginning of the path pattern. + // For example, /images/*.jpg. CloudFront behavior is the same with or without + // the leading /. + // + // The path pattern for the default cache behavior is * and cannot be changed. + // If the request for an object does not match the path pattern for any cache + // behaviors, CloudFront applies the behavior in the default cache behavior. + // + // For more information, see Path Pattern (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern) + // in the Amazon CloudFront Developer Guide. + // + // PathPattern is a required field + PathPattern *string `type:"string" required:"true"` + + // Indicates whether you want to distribute media files in the Microsoft Smooth + // Streaming format using the origin that is associated with this cache behavior. + // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, + // you can still distribute other content using this cache behavior if the content + // matches the value of PathPattern. + SmoothStreaming *bool `type:"boolean"` + + // The value of ID for the origin that you want CloudFront to route requests + // to when a request matches the path pattern either for a cache behavior or + // for the default cache behavior. + // + // TargetOriginId is a required field + TargetOriginId *string `type:"string" required:"true"` + + // A complex type that specifies the AWS accounts, if any, that you want to + // allow to create signed URLs for private content. + // + // If you want to require signed URLs in requests for objects in the target + // origin that match the PathPattern for this cache behavior, specify true for + // Enabled, and specify the applicable values for Quantity and Items. For more + // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) + // in the Amazon Amazon CloudFront Developer Guide. + // + // If you don't want to require signed URLs in requests for objects that match + // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. + // + // To add, change, or remove one or more trusted signers, change Enabled to + // true (if it's currently false), change Quantity as applicable, and specify + // all of the trusted signers that you want to include in the updated distribution. + // + // TrustedSigners is a required field + TrustedSigners *TrustedSigners `type:"structure" required:"true"` + + // The protocol that viewers can use to access the files in the origin specified + // by TargetOriginId when a request matches the path pattern in PathPattern. + // You can specify the following options: + // + // * allow-all: Viewers can use HTTP or HTTPS. + // + // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns + // an HTTP status code of 301 (Moved Permanently) to the viewer along with + // the HTTPS URL. The viewer then resubmits the request using the new URL. + // + // + // * https-only: If a viewer sends an HTTP request, CloudFront returns an + // HTTP status code of 403 (Forbidden). + // + // For more information about requiring the HTTPS protocol, see Using an HTTPS + // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) + // in the Amazon CloudFront Developer Guide. + // + // The only way to guarantee that viewers retrieve an object that was fetched + // from the origin using HTTPS is never to use any other protocol to fetch the + // object. If you have recently changed from HTTP to HTTPS, we recommend that + // you clear your objects' cache because cached objects are protocol agnostic. + // That means that an edge location will return an object from the cache regardless + // of whether the current request protocol matches the protocol used previously. + // For more information, see Specifying How Long Objects and Errors Stay in + // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) + // in the Amazon CloudFront Developer Guide. + // + // ViewerProtocolPolicy is a required field + ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` +} + +// String returns the string representation +func (s CacheBehavior) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CacheBehavior) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CacheBehavior) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"} + if s.ForwardedValues == nil { + invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) + } + if s.MinTTL == nil { + invalidParams.Add(request.NewErrParamRequired("MinTTL")) + } + if s.PathPattern == nil { + invalidParams.Add(request.NewErrParamRequired("PathPattern")) + } + if s.TargetOriginId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) + } + if s.TrustedSigners == nil { + invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) + } + if s.ViewerProtocolPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) + } + if s.AllowedMethods != nil { + if err := s.AllowedMethods.Validate(); err != nil { + invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) + } + } + if s.ForwardedValues != nil { + if err := s.ForwardedValues.Validate(); err != nil { + invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) + } + } + if s.LambdaFunctionAssociations != nil { + if err := s.LambdaFunctionAssociations.Validate(); err != nil { + invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) + } + } + if s.TrustedSigners != nil { + if err := s.TrustedSigners.Validate(); err != nil { + invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllowedMethods sets the AllowedMethods field's value. +func (s *CacheBehavior) SetAllowedMethods(v *AllowedMethods) *CacheBehavior { + s.AllowedMethods = v + return s +} + +// SetCompress sets the Compress field's value. +func (s *CacheBehavior) SetCompress(v bool) *CacheBehavior { + s.Compress = &v + return s +} + +// SetDefaultTTL sets the DefaultTTL field's value. +func (s *CacheBehavior) SetDefaultTTL(v int64) *CacheBehavior { + s.DefaultTTL = &v + return s +} + +// SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value. +func (s *CacheBehavior) SetFieldLevelEncryptionId(v string) *CacheBehavior { + s.FieldLevelEncryptionId = &v + return s +} + +// SetForwardedValues sets the ForwardedValues field's value. +func (s *CacheBehavior) SetForwardedValues(v *ForwardedValues) *CacheBehavior { + s.ForwardedValues = v + return s +} + +// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. +func (s *CacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *CacheBehavior { + s.LambdaFunctionAssociations = v + return s +} + +// SetMaxTTL sets the MaxTTL field's value. +func (s *CacheBehavior) SetMaxTTL(v int64) *CacheBehavior { + s.MaxTTL = &v + return s +} + +// SetMinTTL sets the MinTTL field's value. +func (s *CacheBehavior) SetMinTTL(v int64) *CacheBehavior { + s.MinTTL = &v + return s +} + +// SetPathPattern sets the PathPattern field's value. +func (s *CacheBehavior) SetPathPattern(v string) *CacheBehavior { + s.PathPattern = &v + return s +} + +// SetSmoothStreaming sets the SmoothStreaming field's value. +func (s *CacheBehavior) SetSmoothStreaming(v bool) *CacheBehavior { + s.SmoothStreaming = &v + return s +} + +// SetTargetOriginId sets the TargetOriginId field's value. +func (s *CacheBehavior) SetTargetOriginId(v string) *CacheBehavior { + s.TargetOriginId = &v + return s +} + +// SetTrustedSigners sets the TrustedSigners field's value. +func (s *CacheBehavior) SetTrustedSigners(v *TrustedSigners) *CacheBehavior { + s.TrustedSigners = v + return s +} + +// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. +func (s *CacheBehavior) SetViewerProtocolPolicy(v string) *CacheBehavior { + s.ViewerProtocolPolicy = &v + return s +} + +// A complex type that contains zero or more CacheBehavior elements. +type CacheBehaviors struct { + _ struct{} `type:"structure"` + + // Optional: A complex type that contains cache behaviors for this distribution. + // If Quantity is 0, you can omit Items. + Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"` + + // The number of cache behaviors for this distribution. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s CacheBehaviors) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CacheBehaviors) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CacheBehaviors) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *CacheBehaviors) SetItems(v []*CacheBehavior) *CacheBehaviors { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors { + s.Quantity = &v + return s +} + +// A complex type that controls whether CloudFront caches the response to requests +// using the specified HTTP methods. There are two choices: +// +// * CloudFront caches responses to GET and HEAD requests. +// +// * CloudFront caches responses to GET, HEAD, and OPTIONS requests. +// +// If you pick the second choice for your Amazon S3 Origin, you may need to +// forward Access-Control-Request-Method, Access-Control-Request-Headers, and +// Origin headers for the responses to be cached correctly. +type CachedMethods struct { + _ struct{} `type:"structure"` + + // A complex type that contains the HTTP methods that you want CloudFront to + // cache responses to. + // + // Items is a required field + Items []*string `locationNameList:"Method" type:"list" required:"true"` + + // The number of HTTP methods for which you want CloudFront to cache responses. + // Valid values are 2 (for caching responses to GET and HEAD requests) and 3 + // (for caching responses to GET, HEAD, and OPTIONS requests). + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s CachedMethods) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CachedMethods) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CachedMethods) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CachedMethods"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *CachedMethods) SetItems(v []*string) *CachedMethods { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *CachedMethods) SetQuantity(v int64) *CachedMethods { + s.Quantity = &v + return s +} + +// A field-level encryption content type profile. +type ContentTypeProfile struct { + _ struct{} `type:"structure"` + + // The content type for a field-level encryption content type-profile mapping. + // + // ContentType is a required field + ContentType *string `type:"string" required:"true"` + + // The format for a field-level encryption content type-profile mapping. + // + // Format is a required field + Format *string `type:"string" required:"true" enum:"Format"` + + // The profile ID for a field-level encryption content type-profile mapping. + ProfileId *string `type:"string"` +} + +// String returns the string representation +func (s ContentTypeProfile) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContentTypeProfile) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContentTypeProfile) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfile"} + if s.ContentType == nil { + invalidParams.Add(request.NewErrParamRequired("ContentType")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContentType sets the ContentType field's value. +func (s *ContentTypeProfile) SetContentType(v string) *ContentTypeProfile { + s.ContentType = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *ContentTypeProfile) SetFormat(v string) *ContentTypeProfile { + s.Format = &v + return s +} + +// SetProfileId sets the ProfileId field's value. +func (s *ContentTypeProfile) SetProfileId(v string) *ContentTypeProfile { + s.ProfileId = &v + return s +} + +// The configuration for a field-level encryption content type-profile mapping. +type ContentTypeProfileConfig struct { + _ struct{} `type:"structure"` + + // The configuration for a field-level encryption content type-profile. + ContentTypeProfiles *ContentTypeProfiles `type:"structure"` + + // The setting in a field-level encryption content type-profile mapping that + // specifies what to do when an unknown content type is provided for the profile. + // If true, content is forwarded without being encrypted when the content type + // is unknown. If false (the default), an error is returned when the content + // type is unknown. + // + // ForwardWhenContentTypeIsUnknown is a required field + ForwardWhenContentTypeIsUnknown *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s ContentTypeProfileConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContentTypeProfileConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContentTypeProfileConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfileConfig"} + if s.ForwardWhenContentTypeIsUnknown == nil { + invalidParams.Add(request.NewErrParamRequired("ForwardWhenContentTypeIsUnknown")) + } + if s.ContentTypeProfiles != nil { + if err := s.ContentTypeProfiles.Validate(); err != nil { + invalidParams.AddNested("ContentTypeProfiles", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContentTypeProfiles sets the ContentTypeProfiles field's value. +func (s *ContentTypeProfileConfig) SetContentTypeProfiles(v *ContentTypeProfiles) *ContentTypeProfileConfig { + s.ContentTypeProfiles = v + return s +} + +// SetForwardWhenContentTypeIsUnknown sets the ForwardWhenContentTypeIsUnknown field's value. +func (s *ContentTypeProfileConfig) SetForwardWhenContentTypeIsUnknown(v bool) *ContentTypeProfileConfig { + s.ForwardWhenContentTypeIsUnknown = &v + return s +} + +// Field-level encryption content type-profile. +type ContentTypeProfiles struct { + _ struct{} `type:"structure"` + + // Items in a field-level encryption content type-profile mapping. + Items []*ContentTypeProfile `locationNameList:"ContentTypeProfile" type:"list"` + + // The number of field-level encryption content type-profile mappings. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s ContentTypeProfiles) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContentTypeProfiles) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContentTypeProfiles) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfiles"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *ContentTypeProfiles) SetItems(v []*ContentTypeProfile) *ContentTypeProfiles { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *ContentTypeProfiles) SetQuantity(v int64) *ContentTypeProfiles { + s.Quantity = &v + return s +} + +// A complex type that specifies whether you want CloudFront to forward cookies +// to the origin and, if so, which ones. For more information about forwarding +// cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies +// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) +// in the Amazon CloudFront Developer Guide. +type CookieNames struct { + _ struct{} `type:"structure"` + + // A complex type that contains one Name element for each cookie that you want + // CloudFront to forward to the origin for this cache behavior. + Items []*string `locationNameList:"Name" type:"list"` + + // The number of different cookies that you want CloudFront to forward to the + // origin for this cache behavior. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s CookieNames) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CookieNames) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CookieNames) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CookieNames"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *CookieNames) SetItems(v []*string) *CookieNames { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *CookieNames) SetQuantity(v int64) *CookieNames { + s.Quantity = &v + return s +} + +// A complex type that specifies whether you want CloudFront to forward cookies +// to the origin and, if so, which ones. For more information about forwarding +// cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies +// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) +// in the Amazon CloudFront Developer Guide. +type CookiePreference struct { + _ struct{} `type:"structure"` + + // Specifies which cookies to forward to the origin for this cache behavior: + // all, none, or the list of cookies specified in the WhitelistedNames complex + // type. + // + // Amazon S3 doesn't process cookies. When the cache behavior is forwarding + // requests to an Amazon S3 origin, specify none for the Forward element. + // + // Forward is a required field + Forward *string `type:"string" required:"true" enum:"ItemSelection"` + + // Required if you specify whitelist for the value of Forward:. A complex type + // that specifies how many different cookies you want CloudFront to forward + // to the origin for this cache behavior and, if you want to forward selected + // cookies, the names of those cookies. + // + // If you specify all or none for the value of Forward, omit WhitelistedNames. + // If you change the value of Forward from whitelist to all or none and you + // don't delete the WhitelistedNames element and its child elements, CloudFront + // deletes them automatically. + // + // For the current limit on the number of cookie names that you can whitelist + // for each cache behavior, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) + // in the AWS General Reference. + WhitelistedNames *CookieNames `type:"structure"` +} + +// String returns the string representation +func (s CookiePreference) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CookiePreference) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CookiePreference) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CookiePreference"} + if s.Forward == nil { + invalidParams.Add(request.NewErrParamRequired("Forward")) + } + if s.WhitelistedNames != nil { + if err := s.WhitelistedNames.Validate(); err != nil { + invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetForward sets the Forward field's value. +func (s *CookiePreference) SetForward(v string) *CookiePreference { + s.Forward = &v + return s +} + +// SetWhitelistedNames sets the WhitelistedNames field's value. +func (s *CookiePreference) SetWhitelistedNames(v *CookieNames) *CookiePreference { + s.WhitelistedNames = v + return s +} + +// The request to create a new origin access identity. +type CreateCloudFrontOriginAccessIdentityInput struct { + _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` + + // The current configuration information for the identity. + // + // CloudFrontOriginAccessIdentityConfig is a required field + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateCloudFrontOriginAccessIdentityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"} + if s.CloudFrontOriginAccessIdentityConfig == nil { + invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) + } + if s.CloudFrontOriginAccessIdentityConfig != nil { + if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { + invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. +func (s *CreateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *CreateCloudFrontOriginAccessIdentityInput { + s.CloudFrontOriginAccessIdentityConfig = v + return s +} + +// The returned result of the corresponding request. +type CreateCloudFrontOriginAccessIdentityOutput struct { + _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` + + // The origin access identity's information. + CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` + + // The current version of the origin access identity created. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The fully qualified URI of the new origin access identity just created. For + // example: https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A. + Location *string `location:"header" locationName:"Location" type:"string"` +} + +// String returns the string representation +func (s CreateCloudFrontOriginAccessIdentityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFrontOriginAccessIdentityOutput) GoString() string { + return s.String() +} + +// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. +func (s *CreateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *CreateCloudFrontOriginAccessIdentityOutput { + s.CloudFrontOriginAccessIdentity = v + return s +} + +// SetETag sets the ETag field's value. +func (s *CreateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *CreateCloudFrontOriginAccessIdentityOutput { + s.ETag = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateCloudFrontOriginAccessIdentityOutput) SetLocation(v string) *CreateCloudFrontOriginAccessIdentityOutput { + s.Location = &v + return s +} + +// The request to create a new distribution. +type CreateDistributionInput struct { + _ struct{} `type:"structure" payload:"DistributionConfig"` + + // The distribution's configuration information. + // + // DistributionConfig is a required field + DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateDistributionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDistributionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"} + if s.DistributionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) + } + if s.DistributionConfig != nil { + if err := s.DistributionConfig.Validate(); err != nil { + invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDistributionConfig sets the DistributionConfig field's value. +func (s *CreateDistributionInput) SetDistributionConfig(v *DistributionConfig) *CreateDistributionInput { + s.DistributionConfig = v + return s +} + +// The returned result of the corresponding request. +type CreateDistributionOutput struct { + _ struct{} `type:"structure" payload:"Distribution"` + + // The distribution's information. + Distribution *Distribution `type:"structure"` + + // The current version of the distribution created. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The fully qualified URI of the new distribution resource just created. For + // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5. + Location *string `location:"header" locationName:"Location" type:"string"` +} + +// String returns the string representation +func (s CreateDistributionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDistributionOutput) GoString() string { + return s.String() +} + +// SetDistribution sets the Distribution field's value. +func (s *CreateDistributionOutput) SetDistribution(v *Distribution) *CreateDistributionOutput { + s.Distribution = v + return s +} + +// SetETag sets the ETag field's value. +func (s *CreateDistributionOutput) SetETag(v string) *CreateDistributionOutput { + s.ETag = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateDistributionOutput) SetLocation(v string) *CreateDistributionOutput { + s.Location = &v + return s +} + +// The request to create a new distribution with tags. +type CreateDistributionWithTagsInput struct { + _ struct{} `type:"structure" payload:"DistributionConfigWithTags"` + + // The distribution's configuration information. + // + // DistributionConfigWithTags is a required field + DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateDistributionWithTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDistributionWithTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDistributionWithTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDistributionWithTagsInput"} + if s.DistributionConfigWithTags == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionConfigWithTags")) + } + if s.DistributionConfigWithTags != nil { + if err := s.DistributionConfigWithTags.Validate(); err != nil { + invalidParams.AddNested("DistributionConfigWithTags", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDistributionConfigWithTags sets the DistributionConfigWithTags field's value. +func (s *CreateDistributionWithTagsInput) SetDistributionConfigWithTags(v *DistributionConfigWithTags) *CreateDistributionWithTagsInput { + s.DistributionConfigWithTags = v + return s +} + +// The returned result of the corresponding request. +type CreateDistributionWithTagsOutput struct { + _ struct{} `type:"structure" payload:"Distribution"` + + // The distribution's information. + Distribution *Distribution `type:"structure"` + + // The current version of the distribution created. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The fully qualified URI of the new distribution resource just created. For + // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5. + Location *string `location:"header" locationName:"Location" type:"string"` +} + +// String returns the string representation +func (s CreateDistributionWithTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDistributionWithTagsOutput) GoString() string { + return s.String() +} + +// SetDistribution sets the Distribution field's value. +func (s *CreateDistributionWithTagsOutput) SetDistribution(v *Distribution) *CreateDistributionWithTagsOutput { + s.Distribution = v + return s +} + +// SetETag sets the ETag field's value. +func (s *CreateDistributionWithTagsOutput) SetETag(v string) *CreateDistributionWithTagsOutput { + s.ETag = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateDistributionWithTagsOutput) SetLocation(v string) *CreateDistributionWithTagsOutput { + s.Location = &v + return s +} + +type CreateFieldLevelEncryptionConfigInput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"` + + // The request to create a new field-level encryption configuration. + // + // FieldLevelEncryptionConfig is a required field + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateFieldLevelEncryptionConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFieldLevelEncryptionConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFieldLevelEncryptionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionConfigInput"} + if s.FieldLevelEncryptionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig")) + } + if s.FieldLevelEncryptionConfig != nil { + if err := s.FieldLevelEncryptionConfig.Validate(); err != nil { + invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. +func (s *CreateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *CreateFieldLevelEncryptionConfigInput { + s.FieldLevelEncryptionConfig = v + return s +} + +type CreateFieldLevelEncryptionConfigOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryption"` + + // The current version of the field level encryption configuration. For example: + // E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Returned when you create a new field-level encryption configuration. + FieldLevelEncryption *FieldLevelEncryption `type:"structure"` + + // The fully qualified URI of the new configuration resource just created. For + // example: https://cloudfront.amazonaws.com/2010-11-01/field-level-encryption-config/EDFDVBD632BHDS5. + Location *string `location:"header" locationName:"Location" type:"string"` +} + +// String returns the string representation +func (s CreateFieldLevelEncryptionConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFieldLevelEncryptionConfigOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *CreateFieldLevelEncryptionConfigOutput) SetETag(v string) *CreateFieldLevelEncryptionConfigOutput { + s.ETag = &v + return s +} + +// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. +func (s *CreateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *CreateFieldLevelEncryptionConfigOutput { + s.FieldLevelEncryption = v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateFieldLevelEncryptionConfigOutput) SetLocation(v string) *CreateFieldLevelEncryptionConfigOutput { + s.Location = &v + return s +} + +type CreateFieldLevelEncryptionProfileInput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"` + + // The request to create a field-level encryption profile. + // + // FieldLevelEncryptionProfileConfig is a required field + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateFieldLevelEncryptionProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFieldLevelEncryptionProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFieldLevelEncryptionProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionProfileInput"} + if s.FieldLevelEncryptionProfileConfig == nil { + invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) + } + if s.FieldLevelEncryptionProfileConfig != nil { + if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil { + invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. +func (s *CreateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *CreateFieldLevelEncryptionProfileInput { + s.FieldLevelEncryptionProfileConfig = v + return s +} + +type CreateFieldLevelEncryptionProfileOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` + + // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Returned when you create a new field-level encryption profile. + FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"` + + // The fully qualified URI of the new profile resource just created. For example: + // https://cloudfront.amazonaws.com/2010-11-01/field-level-encryption-profile/EDFDVBD632BHDS5. + Location *string `location:"header" locationName:"Location" type:"string"` +} + +// String returns the string representation +func (s CreateFieldLevelEncryptionProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFieldLevelEncryptionProfileOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *CreateFieldLevelEncryptionProfileOutput) SetETag(v string) *CreateFieldLevelEncryptionProfileOutput { + s.ETag = &v + return s +} + +// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. +func (s *CreateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *CreateFieldLevelEncryptionProfileOutput { + s.FieldLevelEncryptionProfile = v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateFieldLevelEncryptionProfileOutput) SetLocation(v string) *CreateFieldLevelEncryptionProfileOutput { + s.Location = &v + return s +} + +// The request to create an invalidation. +type CreateInvalidationInput struct { + _ struct{} `type:"structure" payload:"InvalidationBatch"` + + // The distribution's id. + // + // DistributionId is a required field + DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` + + // The batch information for the invalidation. + // + // InvalidationBatch is a required field + InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateInvalidationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInvalidationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInvalidationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"} + if s.DistributionId == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionId")) + } + if s.InvalidationBatch == nil { + invalidParams.Add(request.NewErrParamRequired("InvalidationBatch")) + } + if s.InvalidationBatch != nil { + if err := s.InvalidationBatch.Validate(); err != nil { + invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDistributionId sets the DistributionId field's value. +func (s *CreateInvalidationInput) SetDistributionId(v string) *CreateInvalidationInput { + s.DistributionId = &v + return s +} + +// SetInvalidationBatch sets the InvalidationBatch field's value. +func (s *CreateInvalidationInput) SetInvalidationBatch(v *InvalidationBatch) *CreateInvalidationInput { + s.InvalidationBatch = v + return s +} + +// The returned result of the corresponding request. +type CreateInvalidationOutput struct { + _ struct{} `type:"structure" payload:"Invalidation"` + + // The invalidation's information. + Invalidation *Invalidation `type:"structure"` + + // The fully qualified URI of the distribution and invalidation batch request, + // including the Invalidation ID. + Location *string `location:"header" locationName:"Location" type:"string"` +} + +// String returns the string representation +func (s CreateInvalidationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInvalidationOutput) GoString() string { + return s.String() +} + +// SetInvalidation sets the Invalidation field's value. +func (s *CreateInvalidationOutput) SetInvalidation(v *Invalidation) *CreateInvalidationOutput { + s.Invalidation = v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateInvalidationOutput) SetLocation(v string) *CreateInvalidationOutput { + s.Location = &v + return s +} + +type CreatePublicKeyInput struct { + _ struct{} `type:"structure" payload:"PublicKeyConfig"` + + // The request to add a public key to CloudFront. + // + // PublicKeyConfig is a required field + PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreatePublicKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePublicKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePublicKeyInput"} + if s.PublicKeyConfig == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig")) + } + if s.PublicKeyConfig != nil { + if err := s.PublicKeyConfig.Validate(); err != nil { + invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPublicKeyConfig sets the PublicKeyConfig field's value. +func (s *CreatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *CreatePublicKeyInput { + s.PublicKeyConfig = v + return s +} + +type CreatePublicKeyOutput struct { + _ struct{} `type:"structure" payload:"PublicKey"` + + // The current version of the public key. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The fully qualified URI of the new public key resource just created. For + // example: https://cloudfront.amazonaws.com/2010-11-01/cloudfront-public-key/EDFDVBD632BHDS5. + Location *string `location:"header" locationName:"Location" type:"string"` + + // Returned when you add a public key. + PublicKey *PublicKey `type:"structure"` +} + +// String returns the string representation +func (s CreatePublicKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePublicKeyOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *CreatePublicKeyOutput) SetETag(v string) *CreatePublicKeyOutput { + s.ETag = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreatePublicKeyOutput) SetLocation(v string) *CreatePublicKeyOutput { + s.Location = &v + return s +} + +// SetPublicKey sets the PublicKey field's value. +func (s *CreatePublicKeyOutput) SetPublicKey(v *PublicKey) *CreatePublicKeyOutput { + s.PublicKey = v + return s +} + +// The request to create a new streaming distribution. +type CreateStreamingDistributionInput struct { + _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` + + // The streaming distribution's configuration information. + // + // StreamingDistributionConfig is a required field + StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateStreamingDistributionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStreamingDistributionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStreamingDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"} + if s.StreamingDistributionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) + } + if s.StreamingDistributionConfig != nil { + if err := s.StreamingDistributionConfig.Validate(); err != nil { + invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. +func (s *CreateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *CreateStreamingDistributionInput { + s.StreamingDistributionConfig = v + return s +} + +// The returned result of the corresponding request. +type CreateStreamingDistributionOutput struct { + _ struct{} `type:"structure" payload:"StreamingDistribution"` + + // The current version of the streaming distribution created. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The fully qualified URI of the new streaming distribution resource just created. + // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8. + Location *string `location:"header" locationName:"Location" type:"string"` + + // The streaming distribution's information. + StreamingDistribution *StreamingDistribution `type:"structure"` +} + +// String returns the string representation +func (s CreateStreamingDistributionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStreamingDistributionOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *CreateStreamingDistributionOutput) SetETag(v string) *CreateStreamingDistributionOutput { + s.ETag = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateStreamingDistributionOutput) SetLocation(v string) *CreateStreamingDistributionOutput { + s.Location = &v + return s +} + +// SetStreamingDistribution sets the StreamingDistribution field's value. +func (s *CreateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionOutput { + s.StreamingDistribution = v + return s +} + +// The request to create a new streaming distribution with tags. +type CreateStreamingDistributionWithTagsInput struct { + _ struct{} `type:"structure" payload:"StreamingDistributionConfigWithTags"` + + // The streaming distribution's configuration information. + // + // StreamingDistributionConfigWithTags is a required field + StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s CreateStreamingDistributionWithTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStreamingDistributionWithTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStreamingDistributionWithTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionWithTagsInput"} + if s.StreamingDistributionConfigWithTags == nil { + invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfigWithTags")) + } + if s.StreamingDistributionConfigWithTags != nil { + if err := s.StreamingDistributionConfigWithTags.Validate(); err != nil { + invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStreamingDistributionConfigWithTags sets the StreamingDistributionConfigWithTags field's value. +func (s *CreateStreamingDistributionWithTagsInput) SetStreamingDistributionConfigWithTags(v *StreamingDistributionConfigWithTags) *CreateStreamingDistributionWithTagsInput { + s.StreamingDistributionConfigWithTags = v + return s +} + +// The returned result of the corresponding request. +type CreateStreamingDistributionWithTagsOutput struct { + _ struct{} `type:"structure" payload:"StreamingDistribution"` + + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The fully qualified URI of the new streaming distribution resource just created. + // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8. + Location *string `location:"header" locationName:"Location" type:"string"` + + // The streaming distribution's information. + StreamingDistribution *StreamingDistribution `type:"structure"` +} + +// String returns the string representation +func (s CreateStreamingDistributionWithTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStreamingDistributionWithTagsOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *CreateStreamingDistributionWithTagsOutput) SetETag(v string) *CreateStreamingDistributionWithTagsOutput { + s.ETag = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *CreateStreamingDistributionWithTagsOutput) SetLocation(v string) *CreateStreamingDistributionWithTagsOutput { + s.Location = &v + return s +} + +// SetStreamingDistribution sets the StreamingDistribution field's value. +func (s *CreateStreamingDistributionWithTagsOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionWithTagsOutput { + s.StreamingDistribution = v + return s +} + +// A complex type that controls: +// +// * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range +// with custom error messages before returning the response to the viewer. +// +// +// * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. +// +// For more information about custom error pages, see Customizing Error Responses +// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) +// in the Amazon CloudFront Developer Guide. +type CustomErrorResponse struct { + _ struct{} `type:"structure"` + + // The minimum amount of time, in seconds, that you want CloudFront to cache + // the HTTP status code specified in ErrorCode. When this time period has elapsed, + // CloudFront queries your origin to see whether the problem that caused the + // error has been resolved and the requested object is now available. + // + // If you don't want to specify a value, include an empty element, , + // in the XML document. + // + // For more information, see Customizing Error Responses (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) + // in the Amazon CloudFront Developer Guide. + ErrorCachingMinTTL *int64 `type:"long"` + + // The HTTP status code for which you want to specify a custom error page and/or + // a caching duration. + // + // ErrorCode is a required field + ErrorCode *int64 `type:"integer" required:"true"` + + // The HTTP status code that you want CloudFront to return to the viewer along + // with the custom error page. There are a variety of reasons that you might + // want CloudFront to return a status code different from the status code that + // your origin returned to CloudFront, for example: + // + // * Some Internet devices (some firewalls and corporate proxies, for example) + // intercept HTTP 4xx and 5xx and prevent the response from being returned + // to the viewer. If you substitute 200, the response typically won't be + // intercepted. + // + // * If you don't care about distinguishing among different client errors + // or server errors, you can specify 400 or 500 as the ResponseCode for all + // 4xx or 5xx errors. + // + // * You might want to return a 200 status code (OK) and static website so + // your customers don't know that your website is down. + // + // If you specify a value for ResponseCode, you must also specify a value for + // ResponsePagePath. If you don't want to specify a value, include an empty + // element, , in the XML document. + ResponseCode *string `type:"string"` + + // The path to the custom error page that you want CloudFront to return to a + // viewer when your origin returns the HTTP status code specified by ErrorCode, + // for example, /4xx-errors/403-forbidden.html. If you want to store your objects + // and your custom error pages in different locations, your distribution must + // include a cache behavior for which the following is true: + // + // * The value of PathPattern matches the path to your custom error messages. + // For example, suppose you saved custom error pages for 4xx errors in an + // Amazon S3 bucket in a directory named /4xx-errors. Your distribution must + // include a cache behavior for which the path pattern routes requests for + // your custom error pages to that location, for example, /4xx-errors/*. + // + // + // * The value of TargetOriginId specifies the value of the ID element for + // the origin that contains your custom error pages. + // + // If you specify a value for ResponsePagePath, you must also specify a value + // for ResponseCode. If you don't want to specify a value, include an empty + // element, , in the XML document. + // + // We recommend that you store custom error pages in an Amazon S3 bucket. If + // you store custom error pages on an HTTP server and the server starts to return + // 5xx errors, CloudFront can't get the files that you want to return to viewers + // because the origin server is unavailable. + ResponsePagePath *string `type:"string"` +} + +// String returns the string representation +func (s CustomErrorResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomErrorResponse) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomErrorResponse) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"} + if s.ErrorCode == nil { + invalidParams.Add(request.NewErrParamRequired("ErrorCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetErrorCachingMinTTL sets the ErrorCachingMinTTL field's value. +func (s *CustomErrorResponse) SetErrorCachingMinTTL(v int64) *CustomErrorResponse { + s.ErrorCachingMinTTL = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *CustomErrorResponse) SetErrorCode(v int64) *CustomErrorResponse { + s.ErrorCode = &v + return s +} + +// SetResponseCode sets the ResponseCode field's value. +func (s *CustomErrorResponse) SetResponseCode(v string) *CustomErrorResponse { + s.ResponseCode = &v + return s +} + +// SetResponsePagePath sets the ResponsePagePath field's value. +func (s *CustomErrorResponse) SetResponsePagePath(v string) *CustomErrorResponse { + s.ResponsePagePath = &v + return s +} + +// A complex type that controls: +// +// * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range +// with custom error messages before returning the response to the viewer. +// +// * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. +// +// For more information about custom error pages, see Customizing Error Responses +// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) +// in the Amazon CloudFront Developer Guide. +type CustomErrorResponses struct { + _ struct{} `type:"structure"` + + // A complex type that contains a CustomErrorResponse element for each HTTP + // status code for which you want to specify a custom error page and/or a caching + // duration. + Items []*CustomErrorResponse `locationNameList:"CustomErrorResponse" type:"list"` + + // The number of HTTP status codes for which you want to specify a custom error + // page and/or a caching duration. If Quantity is 0, you can omit Items. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s CustomErrorResponses) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomErrorResponses) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomErrorResponses) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *CustomErrorResponses) SetItems(v []*CustomErrorResponse) *CustomErrorResponses { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *CustomErrorResponses) SetQuantity(v int64) *CustomErrorResponses { + s.Quantity = &v + return s +} + +// A complex type that contains the list of Custom Headers for each origin. +type CustomHeaders struct { + _ struct{} `type:"structure"` + + // Optional: A list that contains one OriginCustomHeader element for each custom + // header that you want CloudFront to forward to the origin. If Quantity is + // 0, omit Items. + Items []*OriginCustomHeader `locationNameList:"OriginCustomHeader" type:"list"` + + // The number of custom headers, if any, for this distribution. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s CustomHeaders) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomHeaders) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomHeaders) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *CustomHeaders) SetItems(v []*OriginCustomHeader) *CustomHeaders { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *CustomHeaders) SetQuantity(v int64) *CustomHeaders { + s.Quantity = &v + return s +} + +// A customer origin. +type CustomOriginConfig struct { + _ struct{} `type:"structure"` + + // The HTTP port the custom origin listens on. + // + // HTTPPort is a required field + HTTPPort *int64 `type:"integer" required:"true"` + + // The HTTPS port the custom origin listens on. + // + // HTTPSPort is a required field + HTTPSPort *int64 `type:"integer" required:"true"` + + // You can create a custom keep-alive timeout. All timeout units are in seconds. + // The default keep-alive timeout is 5 seconds, but you can configure custom + // timeout lengths using the CloudFront API. The minimum timeout length is 1 + // second; the maximum is 60 seconds. + // + // If you need to increase the maximum time limit, contact the AWS Support Center + // (https://console.aws.amazon.com/support/home#/). + OriginKeepaliveTimeout *int64 `type:"integer"` + + // The origin protocol policy to apply to your origin. + // + // OriginProtocolPolicy is a required field + OriginProtocolPolicy *string `type:"string" required:"true" enum:"OriginProtocolPolicy"` + + // You can create a custom origin read timeout. All timeout units are in seconds. + // The default origin read timeout is 30 seconds, but you can configure custom + // timeout lengths using the CloudFront API. The minimum timeout length is 4 + // seconds; the maximum is 60 seconds. + // + // If you need to increase the maximum time limit, contact the AWS Support Center + // (https://console.aws.amazon.com/support/home#/). + OriginReadTimeout *int64 `type:"integer"` + + // The SSL/TLS protocols that you want CloudFront to use when communicating + // with your origin over HTTPS. + OriginSslProtocols *OriginSslProtocols `type:"structure"` +} + +// String returns the string representation +func (s CustomOriginConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomOriginConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CustomOriginConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"} + if s.HTTPPort == nil { + invalidParams.Add(request.NewErrParamRequired("HTTPPort")) + } + if s.HTTPSPort == nil { + invalidParams.Add(request.NewErrParamRequired("HTTPSPort")) + } + if s.OriginProtocolPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy")) + } + if s.OriginSslProtocols != nil { + if err := s.OriginSslProtocols.Validate(); err != nil { + invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHTTPPort sets the HTTPPort field's value. +func (s *CustomOriginConfig) SetHTTPPort(v int64) *CustomOriginConfig { + s.HTTPPort = &v + return s +} + +// SetHTTPSPort sets the HTTPSPort field's value. +func (s *CustomOriginConfig) SetHTTPSPort(v int64) *CustomOriginConfig { + s.HTTPSPort = &v + return s +} + +// SetOriginKeepaliveTimeout sets the OriginKeepaliveTimeout field's value. +func (s *CustomOriginConfig) SetOriginKeepaliveTimeout(v int64) *CustomOriginConfig { + s.OriginKeepaliveTimeout = &v + return s +} + +// SetOriginProtocolPolicy sets the OriginProtocolPolicy field's value. +func (s *CustomOriginConfig) SetOriginProtocolPolicy(v string) *CustomOriginConfig { + s.OriginProtocolPolicy = &v + return s +} + +// SetOriginReadTimeout sets the OriginReadTimeout field's value. +func (s *CustomOriginConfig) SetOriginReadTimeout(v int64) *CustomOriginConfig { + s.OriginReadTimeout = &v + return s +} + +// SetOriginSslProtocols sets the OriginSslProtocols field's value. +func (s *CustomOriginConfig) SetOriginSslProtocols(v *OriginSslProtocols) *CustomOriginConfig { + s.OriginSslProtocols = v + return s +} + +// A complex type that describes the default cache behavior if you don't specify +// a CacheBehavior element or if files don't match any of the values of PathPattern +// in CacheBehavior elements. You must create exactly one default cache behavior. +type DefaultCacheBehavior struct { + _ struct{} `type:"structure"` + + // A complex type that controls which HTTP methods CloudFront processes and + // forwards to your Amazon S3 bucket or your custom origin. There are three + // choices: + // + // * CloudFront forwards only GET and HEAD requests. + // + // * CloudFront forwards only GET, HEAD, and OPTIONS requests. + // + // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE + // requests. + // + // If you pick the third choice, you may need to restrict access to your Amazon + // S3 bucket or to your custom origin so users can't perform operations that + // you don't want them to. For example, you might not want users to have permissions + // to delete objects from your origin. + AllowedMethods *AllowedMethods `type:"structure"` + + // Whether you want CloudFront to automatically compress certain files for this + // cache behavior. If so, specify true; if not, specify false. For more information, + // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) + // in the Amazon CloudFront Developer Guide. + Compress *bool `type:"boolean"` + + // The default amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. The value that you specify applies only when + // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control + // s-maxage, and Expires to objects. For more information, see Specifying How + // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) + // in the Amazon CloudFront Developer Guide. + DefaultTTL *int64 `type:"long"` + + FieldLevelEncryptionId *string `type:"string"` + + // A complex type that specifies how CloudFront handles query strings and cookies. + // + // ForwardedValues is a required field + ForwardedValues *ForwardedValues `type:"structure" required:"true"` + + // A complex type that contains zero or more Lambda function associations for + // a cache behavior. + LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` + + MaxTTL *int64 `type:"long"` + + // The minimum amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. For more information, see Specifying How Long + // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) + // in the Amazon Amazon CloudFront Developer Guide. + // + // You must specify 0 for MinTTL if you configure CloudFront to forward all + // headers to your origin (under Headers, if you specify 1 for Quantity and + // * for Name). + // + // MinTTL is a required field + MinTTL *int64 `type:"long" required:"true"` + + // Indicates whether you want to distribute media files in the Microsoft Smooth + // Streaming format using the origin that is associated with this cache behavior. + // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, + // you can still distribute other content using this cache behavior if the content + // matches the value of PathPattern. + SmoothStreaming *bool `type:"boolean"` + + // The value of ID for the origin that you want CloudFront to route requests + // to when a request matches the path pattern either for a cache behavior or + // for the default cache behavior. + // + // TargetOriginId is a required field + TargetOriginId *string `type:"string" required:"true"` + + // A complex type that specifies the AWS accounts, if any, that you want to + // allow to create signed URLs for private content. + // + // If you want to require signed URLs in requests for objects in the target + // origin that match the PathPattern for this cache behavior, specify true for + // Enabled, and specify the applicable values for Quantity and Items. For more + // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) + // in the Amazon Amazon CloudFront Developer Guide. + // + // If you don't want to require signed URLs in requests for objects that match + // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. + // + // To add, change, or remove one or more trusted signers, change Enabled to + // true (if it's currently false), change Quantity as applicable, and specify + // all of the trusted signers that you want to include in the updated distribution. + // + // TrustedSigners is a required field + TrustedSigners *TrustedSigners `type:"structure" required:"true"` + + // The protocol that viewers can use to access the files in the origin specified + // by TargetOriginId when a request matches the path pattern in PathPattern. + // You can specify the following options: + // + // * allow-all: Viewers can use HTTP or HTTPS. + // + // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns + // an HTTP status code of 301 (Moved Permanently) to the viewer along with + // the HTTPS URL. The viewer then resubmits the request using the new URL. + // + // * https-only: If a viewer sends an HTTP request, CloudFront returns an + // HTTP status code of 403 (Forbidden). + // + // For more information about requiring the HTTPS protocol, see Using an HTTPS + // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) + // in the Amazon CloudFront Developer Guide. + // + // The only way to guarantee that viewers retrieve an object that was fetched + // from the origin using HTTPS is never to use any other protocol to fetch the + // object. If you have recently changed from HTTP to HTTPS, we recommend that + // you clear your objects' cache because cached objects are protocol agnostic. + // That means that an edge location will return an object from the cache regardless + // of whether the current request protocol matches the protocol used previously. + // For more information, see Specifying How Long Objects and Errors Stay in + // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) + // in the Amazon CloudFront Developer Guide. + // + // ViewerProtocolPolicy is a required field + ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` +} + +// String returns the string representation +func (s DefaultCacheBehavior) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefaultCacheBehavior) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DefaultCacheBehavior) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"} + if s.ForwardedValues == nil { + invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) + } + if s.MinTTL == nil { + invalidParams.Add(request.NewErrParamRequired("MinTTL")) + } + if s.TargetOriginId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) + } + if s.TrustedSigners == nil { + invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) + } + if s.ViewerProtocolPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) + } + if s.AllowedMethods != nil { + if err := s.AllowedMethods.Validate(); err != nil { + invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) + } + } + if s.ForwardedValues != nil { + if err := s.ForwardedValues.Validate(); err != nil { + invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) + } + } + if s.LambdaFunctionAssociations != nil { + if err := s.LambdaFunctionAssociations.Validate(); err != nil { + invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) + } + } + if s.TrustedSigners != nil { + if err := s.TrustedSigners.Validate(); err != nil { + invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllowedMethods sets the AllowedMethods field's value. +func (s *DefaultCacheBehavior) SetAllowedMethods(v *AllowedMethods) *DefaultCacheBehavior { + s.AllowedMethods = v + return s +} + +// SetCompress sets the Compress field's value. +func (s *DefaultCacheBehavior) SetCompress(v bool) *DefaultCacheBehavior { + s.Compress = &v + return s +} + +// SetDefaultTTL sets the DefaultTTL field's value. +func (s *DefaultCacheBehavior) SetDefaultTTL(v int64) *DefaultCacheBehavior { + s.DefaultTTL = &v + return s +} + +// SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value. +func (s *DefaultCacheBehavior) SetFieldLevelEncryptionId(v string) *DefaultCacheBehavior { + s.FieldLevelEncryptionId = &v + return s +} + +// SetForwardedValues sets the ForwardedValues field's value. +func (s *DefaultCacheBehavior) SetForwardedValues(v *ForwardedValues) *DefaultCacheBehavior { + s.ForwardedValues = v + return s +} + +// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. +func (s *DefaultCacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *DefaultCacheBehavior { + s.LambdaFunctionAssociations = v + return s +} + +// SetMaxTTL sets the MaxTTL field's value. +func (s *DefaultCacheBehavior) SetMaxTTL(v int64) *DefaultCacheBehavior { + s.MaxTTL = &v + return s +} + +// SetMinTTL sets the MinTTL field's value. +func (s *DefaultCacheBehavior) SetMinTTL(v int64) *DefaultCacheBehavior { + s.MinTTL = &v + return s +} + +// SetSmoothStreaming sets the SmoothStreaming field's value. +func (s *DefaultCacheBehavior) SetSmoothStreaming(v bool) *DefaultCacheBehavior { + s.SmoothStreaming = &v + return s +} + +// SetTargetOriginId sets the TargetOriginId field's value. +func (s *DefaultCacheBehavior) SetTargetOriginId(v string) *DefaultCacheBehavior { + s.TargetOriginId = &v + return s +} + +// SetTrustedSigners sets the TrustedSigners field's value. +func (s *DefaultCacheBehavior) SetTrustedSigners(v *TrustedSigners) *DefaultCacheBehavior { + s.TrustedSigners = v + return s +} + +// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. +func (s *DefaultCacheBehavior) SetViewerProtocolPolicy(v string) *DefaultCacheBehavior { + s.ViewerProtocolPolicy = &v + return s +} + +// Deletes a origin access identity. +type DeleteCloudFrontOriginAccessIdentityInput struct { + _ struct{} `type:"structure"` + + // The origin access identity's ID. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header you received from a previous GET or PUT request. + // For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` +} + +// String returns the string representation +func (s DeleteCloudFrontOriginAccessIdentityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DeleteCloudFrontOriginAccessIdentityInput) SetId(v string) *DeleteCloudFrontOriginAccessIdentityInput { + s.Id = &v + return s +} + +// SetIfMatch sets the IfMatch field's value. +func (s *DeleteCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *DeleteCloudFrontOriginAccessIdentityInput { + s.IfMatch = &v + return s +} + +type DeleteCloudFrontOriginAccessIdentityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCloudFrontOriginAccessIdentityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string { + return s.String() +} + +// This action deletes a web distribution. To delete a web distribution using +// the CloudFront API, perform the following steps. +// +// To delete a web distribution using the CloudFront API: +// +// Disable the web distribution +// +// Submit a GET Distribution Config request to get the current configuration +// and the Etag header for the distribution. +// +// Update the XML document that was returned in the response to your GET Distribution +// Config request to change the value of Enabled to false. +// +// Submit a PUT Distribution Config request to update the configuration for +// your distribution. In the request body, include the XML document that you +// updated in Step 3. Set the value of the HTTP If-Match header to the value +// of the ETag header that CloudFront returned when you submitted the GET Distribution +// Config request in Step 2. +// +// Review the response to the PUT Distribution Config request to confirm that +// the distribution was successfully disabled. +// +// Submit a GET Distribution request to confirm that your changes have propagated. +// When propagation is complete, the value of Status is Deployed. +// +// Submit a DELETE Distribution request. Set the value of the HTTP If-Match +// header to the value of the ETag header that CloudFront returned when you +// submitted the GET Distribution Config request in Step 6. +// +// Review the response to your DELETE Distribution request to confirm that the +// distribution was successfully deleted. +// +// For information about deleting a distribution using the CloudFront console, +// see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) // in the Amazon CloudFront Developer Guide. -type CacheBehavior struct { +type DeleteDistributionInput struct { _ struct{} `type:"structure"` - // A complex type that controls which HTTP methods CloudFront processes and - // forwards to your Amazon S3 bucket or your custom origin. There are three - // choices: - // - // * CloudFront forwards only GET and HEAD requests. - // - // * CloudFront forwards only GET, HEAD, and OPTIONS requests. + // The distribution ID. // - // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE - // requests. + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header that you received when you disabled the distribution. + // For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` +} + +// String returns the string representation +func (s DeleteDistributionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDistributionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DeleteDistributionInput) SetId(v string) *DeleteDistributionInput { + s.Id = &v + return s +} + +// SetIfMatch sets the IfMatch field's value. +func (s *DeleteDistributionInput) SetIfMatch(v string) *DeleteDistributionInput { + s.IfMatch = &v + return s +} + +type DeleteDistributionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDistributionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDistributionOutput) GoString() string { + return s.String() +} + +type DeleteFieldLevelEncryptionConfigInput struct { + _ struct{} `type:"structure"` + + // The ID of the configuration you want to delete from CloudFront. // - // If you pick the third choice, you may need to restrict access to your Amazon - // S3 bucket or to your custom origin so users can't perform operations that - // you don't want them to. For example, you might not want users to have permissions - // to delete objects from your origin. - AllowedMethods *AllowedMethods `type:"structure"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header that you received when retrieving the configuration + // identity to delete. For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` +} + +// String returns the string representation +func (s DeleteFieldLevelEncryptionConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFieldLevelEncryptionConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFieldLevelEncryptionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DeleteFieldLevelEncryptionConfigInput) SetId(v string) *DeleteFieldLevelEncryptionConfigInput { + s.Id = &v + return s +} + +// SetIfMatch sets the IfMatch field's value. +func (s *DeleteFieldLevelEncryptionConfigInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionConfigInput { + s.IfMatch = &v + return s +} + +type DeleteFieldLevelEncryptionConfigOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteFieldLevelEncryptionConfigOutput) String() string { + return awsutil.Prettify(s) +} - // Whether you want CloudFront to automatically compress certain files for this - // cache behavior. If so, specify true; if not, specify false. For more information, - // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) - // in the Amazon CloudFront Developer Guide. - Compress *bool `type:"boolean"` +// GoString returns the string representation +func (s DeleteFieldLevelEncryptionConfigOutput) GoString() string { + return s.String() +} - // The default amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Specifying How - // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - DefaultTTL *int64 `type:"long"` +type DeleteFieldLevelEncryptionProfileInput struct { + _ struct{} `type:"structure"` - // A complex type that specifies how CloudFront handles query strings and cookies. + // Request the ID of the profile you want to delete from CloudFront. // - // ForwardedValues is a required field - ForwardedValues *ForwardedValues `type:"structure" required:"true"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - // A complex type that contains zero or more Lambda function associations for - // a cache behavior. - LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` + // The value of the ETag header that you received when retrieving the profile + // to delete. For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` +} - // The maximum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin adds HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Specifying How - // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - MaxTTL *int64 `type:"long"` +// String returns the string representation +func (s DeleteFieldLevelEncryptionProfileInput) String() string { + return awsutil.Prettify(s) +} - // The minimum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. For more information, see Specifying How Long - // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // You must specify 0 for MinTTL if you configure CloudFront to forward all - // headers to your origin (under Headers, if you specify 1 for Quantity and - // * for Name). - // - // MinTTL is a required field - MinTTL *int64 `type:"long" required:"true"` +// GoString returns the string representation +func (s DeleteFieldLevelEncryptionProfileInput) GoString() string { + return s.String() +} - // The pattern (for example, images/*.jpg) that specifies which requests to - // apply the behavior to. When CloudFront receives a viewer request, the requested - // path is compared with path patterns in the order in which cache behaviors - // are listed in the distribution. - // - // You can optionally include a slash (/) at the beginning of the path pattern. - // For example, /images/*.jpg. CloudFront behavior is the same with or without - // the leading /. - // - // The path pattern for the default cache behavior is * and cannot be changed. - // If the request for an object does not match the path pattern for any cache - // behaviors, CloudFront applies the behavior in the default cache behavior. - // - // For more information, see Path Pattern (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern) - // in the Amazon CloudFront Developer Guide. - // - // PathPattern is a required field - PathPattern *string `type:"string" required:"true"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFieldLevelEncryptionProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionProfileInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } - // Indicates whether you want to distribute media files in the Microsoft Smooth - // Streaming format using the origin that is associated with this cache behavior. - // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, - // you can still distribute other content using this cache behavior if the content - // matches the value of PathPattern. - SmoothStreaming *bool `type:"boolean"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The value of ID for the origin that you want CloudFront to route requests - // to when a request matches the path pattern either for a cache behavior or - // for the default cache behavior. - // - // TargetOriginId is a required field - TargetOriginId *string `type:"string" required:"true"` +// SetId sets the Id field's value. +func (s *DeleteFieldLevelEncryptionProfileInput) SetId(v string) *DeleteFieldLevelEncryptionProfileInput { + s.Id = &v + return s +} - // A complex type that specifies the AWS accounts, if any, that you want to - // allow to create signed URLs for private content. - // - // If you want to require signed URLs in requests for objects in the target - // origin that match the PathPattern for this cache behavior, specify true for - // Enabled, and specify the applicable values for Quantity and Items. For more - // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // If you don't want to require signed URLs in requests for objects that match - // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. - // - // To add, change, or remove one or more trusted signers, change Enabled to - // true (if it's currently false), change Quantity as applicable, and specify - // all of the trusted signers that you want to include in the updated distribution. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" required:"true"` +// SetIfMatch sets the IfMatch field's value. +func (s *DeleteFieldLevelEncryptionProfileInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionProfileInput { + s.IfMatch = &v + return s +} - // The protocol that viewers can use to access the files in the origin specified - // by TargetOriginId when a request matches the path pattern in PathPattern. - // You can specify the following options: - // - // * allow-all: Viewers can use HTTP or HTTPS. - // - // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns - // an HTTP status code of 301 (Moved Permanently) to the viewer along with - // the HTTPS URL. The viewer then resubmits the request using the new URL. - // - // - // * https-only: If a viewer sends an HTTP request, CloudFront returns an - // HTTP status code of 403 (Forbidden). - // - // For more information about requiring the HTTPS protocol, see Using an HTTPS - // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) - // in the Amazon CloudFront Developer Guide. - // - // The only way to guarantee that viewers retrieve an object that was fetched - // from the origin using HTTPS is never to use any other protocol to fetch the - // object. If you have recently changed from HTTP to HTTPS, we recommend that - // you clear your objects' cache because cached objects are protocol agnostic. - // That means that an edge location will return an object from the cache regardless - // of whether the current request protocol matches the protocol used previously. - // For more information, see Specifying How Long Objects and Errors Stay in - // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. +type DeleteFieldLevelEncryptionProfileOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteFieldLevelEncryptionProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFieldLevelEncryptionProfileOutput) GoString() string { + return s.String() +} + +type DeletePublicKeyInput struct { + _ struct{} `type:"structure"` + + // The ID of the public key you want to remove from CloudFront. // - // ViewerProtocolPolicy is a required field - ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header that you received when retrieving the public + // key identity to delete. For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` } // String returns the string representation -func (s CacheBehavior) String() string { +func (s DeletePublicKeyInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheBehavior) GoString() string { +func (s DeletePublicKeyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CacheBehavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"} - if s.ForwardedValues == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) - } - if s.MinTTL == nil { - invalidParams.Add(request.NewErrParamRequired("MinTTL")) - } - if s.PathPattern == nil { - invalidParams.Add(request.NewErrParamRequired("PathPattern")) - } - if s.TargetOriginId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) - } - if s.TrustedSigners == nil { - invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) - } - if s.ViewerProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) - } - if s.AllowedMethods != nil { - if err := s.AllowedMethods.Validate(); err != nil { - invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) - } - } - if s.ForwardedValues != nil { - if err := s.ForwardedValues.Validate(); err != nil { - invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) - } - } - if s.LambdaFunctionAssociations != nil { - if err := s.LambdaFunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) - } - } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) - } +func (s *DeletePublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePublicKeyInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { @@ -3625,117 +7525,111 @@ func (s *CacheBehavior) Validate() error { return nil } -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *CacheBehavior) SetAllowedMethods(v *AllowedMethods) *CacheBehavior { - s.AllowedMethods = v +// SetId sets the Id field's value. +func (s *DeletePublicKeyInput) SetId(v string) *DeletePublicKeyInput { + s.Id = &v return s } -// SetCompress sets the Compress field's value. -func (s *CacheBehavior) SetCompress(v bool) *CacheBehavior { - s.Compress = &v +// SetIfMatch sets the IfMatch field's value. +func (s *DeletePublicKeyInput) SetIfMatch(v string) *DeletePublicKeyInput { + s.IfMatch = &v return s } -// SetDefaultTTL sets the DefaultTTL field's value. -func (s *CacheBehavior) SetDefaultTTL(v int64) *CacheBehavior { - s.DefaultTTL = &v - return s +type DeletePublicKeyOutput struct { + _ struct{} `type:"structure"` } -// SetForwardedValues sets the ForwardedValues field's value. -func (s *CacheBehavior) SetForwardedValues(v *ForwardedValues) *CacheBehavior { - s.ForwardedValues = v - return s +// String returns the string representation +func (s DeletePublicKeyOutput) String() string { + return awsutil.Prettify(s) } -// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. -func (s *CacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *CacheBehavior { - s.LambdaFunctionAssociations = v - return s +// GoString returns the string representation +func (s DeletePublicKeyOutput) GoString() string { + return s.String() } -// SetMaxTTL sets the MaxTTL field's value. -func (s *CacheBehavior) SetMaxTTL(v int64) *CacheBehavior { - s.MaxTTL = &v - return s +type DeleteServiceLinkedRoleInput struct { + _ struct{} `type:"structure"` + + // RoleName is a required field + RoleName *string `location:"uri" locationName:"RoleName" type:"string" required:"true"` } -// SetMinTTL sets the MinTTL field's value. -func (s *CacheBehavior) SetMinTTL(v int64) *CacheBehavior { - s.MinTTL = &v - return s +// String returns the string representation +func (s DeleteServiceLinkedRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceLinkedRoleInput) GoString() string { + return s.String() } -// SetPathPattern sets the PathPattern field's value. -func (s *CacheBehavior) SetPathPattern(v string) *CacheBehavior { - s.PathPattern = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServiceLinkedRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSmoothStreaming sets the SmoothStreaming field's value. -func (s *CacheBehavior) SetSmoothStreaming(v bool) *CacheBehavior { - s.SmoothStreaming = &v +// SetRoleName sets the RoleName field's value. +func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { + s.RoleName = &v return s } -// SetTargetOriginId sets the TargetOriginId field's value. -func (s *CacheBehavior) SetTargetOriginId(v string) *CacheBehavior { - s.TargetOriginId = &v - return s +type DeleteServiceLinkedRoleOutput struct { + _ struct{} `type:"structure"` } -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *CacheBehavior) SetTrustedSigners(v *TrustedSigners) *CacheBehavior { - s.TrustedSigners = v - return s +// String returns the string representation +func (s DeleteServiceLinkedRoleOutput) String() string { + return awsutil.Prettify(s) } -// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. -func (s *CacheBehavior) SetViewerProtocolPolicy(v string) *CacheBehavior { - s.ViewerProtocolPolicy = &v - return s +// GoString returns the string representation +func (s DeleteServiceLinkedRoleOutput) GoString() string { + return s.String() } -// A complex type that contains zero or more CacheBehavior elements. -type CacheBehaviors struct { +// The request to delete a streaming distribution. +type DeleteStreamingDistributionInput struct { _ struct{} `type:"structure"` - // Optional: A complex type that contains cache behaviors for this distribution. - // If Quantity is 0, you can omit Items. - Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"` - - // The number of cache behaviors for this distribution. + // The distribution ID. // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header that you received when you disabled the streaming + // distribution. For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` } // String returns the string representation -func (s CacheBehaviors) String() string { +func (s DeleteStreamingDistributionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CacheBehaviors) GoString() string { +func (s DeleteStreamingDistributionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CacheBehaviors) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } +func (s *DeleteStreamingDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { @@ -3744,509 +7638,627 @@ func (s *CacheBehaviors) Validate() error { return nil } -// SetItems sets the Items field's value. -func (s *CacheBehaviors) SetItems(v []*CacheBehavior) *CacheBehaviors { - s.Items = v +// SetId sets the Id field's value. +func (s *DeleteStreamingDistributionInput) SetId(v string) *DeleteStreamingDistributionInput { + s.Id = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors { - s.Quantity = &v +// SetIfMatch sets the IfMatch field's value. +func (s *DeleteStreamingDistributionInput) SetIfMatch(v string) *DeleteStreamingDistributionInput { + s.IfMatch = &v return s } -// A complex type that controls whether CloudFront caches the response to requests -// using the specified HTTP methods. There are two choices: -// -// * CloudFront caches responses to GET and HEAD requests. -// -// * CloudFront caches responses to GET, HEAD, and OPTIONS requests. -// -// If you pick the second choice for your Amazon S3 Origin, you may need to -// forward Access-Control-Request-Method, Access-Control-Request-Headers, and -// Origin headers for the responses to be cached correctly. -type CachedMethods struct { +type DeleteStreamingDistributionOutput struct { _ struct{} `type:"structure"` +} - // A complex type that contains the HTTP methods that you want CloudFront to - // cache responses to. +// String returns the string representation +func (s DeleteStreamingDistributionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteStreamingDistributionOutput) GoString() string { + return s.String() +} + +// The distribution's information. +type Distribution struct { + _ struct{} `type:"structure"` + + // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, + // where 123456789012 is your AWS account ID. // - // Items is a required field - Items []*string `locationNameList:"Method" type:"list" required:"true"` + // ARN is a required field + ARN *string `type:"string" required:"true"` - // The number of HTTP methods for which you want CloudFront to cache responses. - // Valid values are 2 (for caching responses to GET and HEAD requests) and 3 - // (for caching responses to GET, HEAD, and OPTIONS requests). + // CloudFront automatically adds this element to the response only if you've + // set up the distribution to serve private content with signed URLs. The element + // lists the key pair IDs that CloudFront is aware of for each trusted signer. + // The Signer child element lists the AWS account number of the trusted signer + // (or an empty Self element if the signer is you). The Signer element also + // includes the IDs of any active key pairs associated with the trusted signer's + // AWS account. If no KeyPairId element appears for a Signer, that signer can't + // create working signed URLs. // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // ActiveTrustedSigners is a required field + ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"` + + // The current configuration information for the distribution. Send a GET request + // to the /CloudFront API version/distribution ID/config resource. + // + // DistributionConfig is a required field + DistributionConfig *DistributionConfig `type:"structure" required:"true"` + + // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The identifier for the distribution. For example: EDFDVBD632BHDS5. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The number of invalidation batches currently in progress. + // + // InProgressInvalidationBatches is a required field + InProgressInvalidationBatches *int64 `type:"integer" required:"true"` + + // The date and time the distribution was last modified. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // This response element indicates the current status of the distribution. When + // the status is Deployed, the distribution's information is fully propagated + // to all CloudFront edge locations. + // + // Status is a required field + Status *string `type:"string" required:"true"` } // String returns the string representation -func (s CachedMethods) String() string { +func (s Distribution) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CachedMethods) GoString() string { +func (s Distribution) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CachedMethods) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CachedMethods"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } +// SetARN sets the ARN field's value. +func (s *Distribution) SetARN(v string) *Distribution { + s.ARN = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetActiveTrustedSigners sets the ActiveTrustedSigners field's value. +func (s *Distribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *Distribution { + s.ActiveTrustedSigners = v + return s } -// SetItems sets the Items field's value. -func (s *CachedMethods) SetItems(v []*string) *CachedMethods { - s.Items = v +// SetDistributionConfig sets the DistributionConfig field's value. +func (s *Distribution) SetDistributionConfig(v *DistributionConfig) *Distribution { + s.DistributionConfig = v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *Distribution) SetDomainName(v string) *Distribution { + s.DomainName = &v + return s +} + +// SetId sets the Id field's value. +func (s *Distribution) SetId(v string) *Distribution { + s.Id = &v + return s +} + +// SetInProgressInvalidationBatches sets the InProgressInvalidationBatches field's value. +func (s *Distribution) SetInProgressInvalidationBatches(v int64) *Distribution { + s.InProgressInvalidationBatches = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *Distribution) SetLastModifiedTime(v time.Time) *Distribution { + s.LastModifiedTime = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *Distribution) SetStatus(v string) *Distribution { + s.Status = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *CachedMethods) SetQuantity(v int64) *CachedMethods { - s.Quantity = &v - return s -} +// A distribution configuration. +type DistributionConfig struct { + _ struct{} `type:"structure"` + + // A complex type that contains information about CNAMEs (alternate domain names), + // if any, for this distribution. + Aliases *Aliases `type:"structure"` + + // A complex type that contains zero or more CacheBehavior elements. + CacheBehaviors *CacheBehaviors `type:"structure"` + + // A unique value (for example, a date-time stamp) that ensures that the request + // can't be replayed. + // + // If the value of CallerReference is new (regardless of the content of the + // DistributionConfig object), CloudFront creates a new distribution. + // + // If CallerReference is a value you already sent in a previous request to create + // a distribution, and if the content of the DistributionConfig is identical + // to the original request (ignoring white space), CloudFront returns the same + // the response that it returned to the original request. + // + // If CallerReference is a value you already sent in a previous request to create + // a distribution but the content of the DistributionConfig is different from + // the original request, CloudFront returns a DistributionAlreadyExists error. + // + // CallerReference is a required field + CallerReference *string `type:"string" required:"true"` + + // Any comments you want to include about the distribution. + // + // If you don't want to specify a comment, include an empty Comment element. + // + // To delete an existing comment, update the distribution configuration and + // include an empty Comment element. + // + // To add or change a comment, update the distribution configuration and specify + // the new comment. + // + // Comment is a required field + Comment *string `type:"string" required:"true"` -// A complex type that specifies whether you want CloudFront to forward cookies -// to the origin and, if so, which ones. For more information about forwarding -// cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) -// in the Amazon CloudFront Developer Guide. -type CookieNames struct { - _ struct{} `type:"structure"` + // A complex type that controls the following: + // + // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range + // with custom error messages before returning the response to the viewer. + // + // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. + // + // For more information about custom error pages, see Customizing Error Responses + // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) + // in the Amazon CloudFront Developer Guide. + CustomErrorResponses *CustomErrorResponses `type:"structure"` - // A complex type that contains one Name element for each cookie that you want - // CloudFront to forward to the origin for this cache behavior. - Items []*string `locationNameList:"Name" type:"list"` + // A complex type that describes the default cache behavior if you don't specify + // a CacheBehavior element or if files don't match any of the values of PathPattern + // in CacheBehavior elements. You must create exactly one default cache behavior. + // + // DefaultCacheBehavior is a required field + DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` - // The number of different cookies that you want CloudFront to forward to the - // origin for this cache behavior. + // The object that you want CloudFront to request from your origin (for example, + // index.html) when a viewer requests the root URL for your distribution (http://www.example.com) + // instead of an object in your distribution (http://www.example.com/product-description.html). + // Specifying a default root object avoids exposing the contents of your distribution. // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` -} + // Specify only the object name, for example, index.html. Don't add a / before + // the object name. + // + // If you don't want to specify a default root object when you create a distribution, + // include an empty DefaultRootObject element. + // + // To delete the default root object from an existing distribution, update the + // distribution configuration and include an empty DefaultRootObject element. + // + // To replace the default root object, update the distribution configuration + // and specify the new object. + // + // For more information about the default root object, see Creating a Default + // Root Object (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) + // in the Amazon CloudFront Developer Guide. + DefaultRootObject *string `type:"string"` -// String returns the string representation -func (s CookieNames) String() string { - return awsutil.Prettify(s) -} + // From this field, you can enable or disable the selected distribution. + // + // If you specify false for Enabled but you specify values for Bucket and Prefix, + // the values are automatically deleted. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` -// GoString returns the string representation -func (s CookieNames) GoString() string { - return s.String() -} + // (Optional) Specify the maximum HTTP version that you want viewers to use + // to communicate with CloudFront. The default value for new web distributions + // is http2. Viewers that don't support HTTP/2 automatically use an earlier + // HTTP version. + // + // For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or + // later, and must support Server Name Identification (SNI). + // + // In general, configuring CloudFront to communicate with viewers using HTTP/2 + // reduces latency. You can improve performance by optimizing for HTTP/2. For + // more information, do an Internet search for "http/2 optimization." + HttpVersion *string `type:"string" enum:"HttpVersion"` -// Validate inspects the fields of the type to determine if they are valid. -func (s *CookieNames) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CookieNames"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } + // If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address + // for your distribution, specify true. If you specify false, CloudFront responds + // to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. + // This allows viewers to submit a second request, for an IPv4 address for your + // distribution. + // + // In general, you should enable IPv6 if you have users on IPv6 networks who + // want to access your content. However, if you're using signed URLs or signed + // cookies to restrict access to your content, and if you're using a custom + // policy that includes the IpAddress parameter to restrict the IP addresses + // that can access your content, don't enable IPv6. If you want to restrict + // access to some content by IP address and not restrict access to other content + // (or restrict access but not by IP address), you can create two distributions. + // For more information, see Creating a Signed URL Using a Custom Policy (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) + // in the Amazon CloudFront Developer Guide. + // + // If you're using an Amazon Route 53 alias resource record set to route traffic + // to your CloudFront distribution, you need to create a second alias resource + // record set when both of the following are true: + // + // * You enable IPv6 for the distribution + // + // * You're using alternate domain names in the URLs for your objects + // + // For more information, see Routing Traffic to an Amazon CloudFront Web Distribution + // by Using Your Domain Name (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) + // in the Amazon Route 53 Developer Guide. + // + // If you created a CNAME resource record set, either with Amazon Route 53 or + // with another DNS service, you don't need to make any changes. A CNAME record + // will route traffic to your distribution regardless of the IP address format + // of the viewer request. + IsIPV6Enabled *bool `type:"boolean"` - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} + // A complex type that controls whether access logs are written for the distribution. + // + // For more information about logging, see Access Logs (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) + // in the Amazon CloudFront Developer Guide. + Logging *LoggingConfig `type:"structure"` -// SetItems sets the Items field's value. -func (s *CookieNames) SetItems(v []*string) *CookieNames { - s.Items = v - return s -} + // A complex type that contains information about origins for this distribution. + // + // Origins is a required field + Origins *Origins `type:"structure" required:"true"` -// SetQuantity sets the Quantity field's value. -func (s *CookieNames) SetQuantity(v int64) *CookieNames { - s.Quantity = &v - return s -} + // The price class that corresponds with the maximum price that you want to + // pay for CloudFront service. If you specify PriceClass_All, CloudFront responds + // to requests for your objects from all CloudFront edge locations. + // + // If you specify a price class other than PriceClass_All, CloudFront serves + // your objects from the CloudFront edge location that has the lowest latency + // among the edge locations in your price class. Viewers who are in or near + // regions that are excluded from your specified price class may encounter slower + // performance. + // + // For more information about price classes, see Choosing the Price Class for + // a CloudFront Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) + // in the Amazon CloudFront Developer Guide. For information about CloudFront + // pricing, including how price classes map to CloudFront regions, see Amazon + // CloudFront Pricing (https://aws.amazon.com/cloudfront/pricing/). + PriceClass *string `type:"string" enum:"PriceClass"` -// A complex type that specifies whether you want CloudFront to forward cookies -// to the origin and, if so, which ones. For more information about forwarding -// cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) -// in the Amazon CloudFront Developer Guide. -type CookiePreference struct { - _ struct{} `type:"structure"` + // A complex type that identifies ways in which you want to restrict distribution + // of your content. + Restrictions *Restrictions `type:"structure"` - // Specifies which cookies to forward to the origin for this cache behavior: - // all, none, or the list of cookies specified in the WhitelistedNames complex - // type. + // A complex type that specifies the following: + // + // * Whether you want viewers to use HTTP or HTTPS to request your objects. + // + // * If you want viewers to use HTTPS, whether you're using an alternate + // domain name such as example.com or the CloudFront domain name for your + // distribution, such as d111111abcdef8.cloudfront.net. + // + // * If you're using an alternate domain name, whether AWS Certificate Manager + // (ACM) provided the certificate, or you purchased a certificate from a + // third-party certificate authority and imported it into ACM or uploaded + // it to the IAM certificate store. + // + // You must specify only one of the following values: + // + // * ViewerCertificate$ACMCertificateArn + // + // * ViewerCertificate$IAMCertificateId + // + // * ViewerCertificate$CloudFrontDefaultCertificate + // + // Don't specify false for CloudFrontDefaultCertificate. + // + // If you want viewers to use HTTP instead of HTTPS to request your objects: + // Specify the following value: + // + // true + // + // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache + // behaviors. + // + // If you want viewers to use HTTPS to request your objects: Choose the type + // of certificate that you want to use based on whether you're using an alternate + // domain name for your objects or the CloudFront domain name: + // + // * If you're using an alternate domain name, such as example.com: Specify + // one of the following values, depending on whether ACM provided your certificate + // or you purchased your certificate from third-party certificate authority: + // + // ARN for ACM SSL/TLS certificate where + // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate + // that you want to use for this distribution. + // + // IAM certificate ID where IAM certificate + // ID is the ID that IAM returned when you added the certificate to the IAM + // certificate store. + // + // If you specify ACMCertificateArn or IAMCertificateId, you must also specify + // a value for SSLSupportMethod. + // + // If you choose to use an ACM certificate or a certificate in the IAM certificate + // store, we recommend that you use only an alternate domain name in your + // object URLs (https://example.com/logo.jpg). If you use the domain name + // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) + // and the viewer supports SNI, then CloudFront behaves normally. However, + // if the browser does not support SNI, the user's experience depends on + // the value that you choose for SSLSupportMethod: + // + // vip: The viewer displays a warning because there is a mismatch between the + // CloudFront domain name and the domain name in your SSL/TLS certificate. // - // Amazon S3 doesn't process cookies. When the cache behavior is forwarding - // requests to an Amazon S3 origin, specify none for the Forward element. + // sni-only: CloudFront drops the connection with the browser without returning + // the object. // - // Forward is a required field - Forward *string `type:"string" required:"true" enum:"ItemSelection"` - - // Required if you specify whitelist for the value of Forward:. A complex type - // that specifies how many different cookies you want CloudFront to forward - // to the origin for this cache behavior and, if you want to forward selected - // cookies, the names of those cookies. + // * If you're using the CloudFront domain name for your distribution, such + // as d111111abcdef8.cloudfront.net: Specify the following value: // - // If you specify all or none for the value of Forward, omit WhitelistedNames. - // If you change the value of Forward from whitelist to all or none and you - // don't delete the WhitelistedNames element and its child elements, CloudFront - // deletes them automatically. + // true // - // For the current limit on the number of cookie names that you can whitelist - // for each cache behavior, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) - // in the AWS General Reference. - WhitelistedNames *CookieNames `type:"structure"` + // If you want viewers to use HTTPS, you must also specify one of the following + // values in your cache behaviors: + // + // * https-only + // + // * redirect-to-https + // + // You can also optionally require that CloudFront use HTTPS to communicate + // with your origin by specifying one of the following values for the applicable + // origins: + // + // * https-only + // + // * match-viewer + // + // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) + // in the Amazon CloudFront Developer Guide. + ViewerCertificate *ViewerCertificate `type:"structure"` + + // A unique identifier that specifies the AWS WAF web ACL, if any, to associate + // with this distribution. + // + // AWS WAF is a web application firewall that lets you monitor the HTTP and + // HTTPS requests that are forwarded to CloudFront, and lets you control access + // to your content. Based on conditions that you specify, such as the IP addresses + // that requests originate from or the values of query strings, CloudFront responds + // to requests either with the requested content or with an HTTP 403 status + // code (Forbidden). You can also configure CloudFront to return a custom error + // page when a request is blocked. For more information about AWS WAF, see the + // AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). + WebACLId *string `type:"string"` } // String returns the string representation -func (s CookiePreference) String() string { +func (s DistributionConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CookiePreference) GoString() string { +func (s DistributionConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CookiePreference) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CookiePreference"} - if s.Forward == nil { - invalidParams.Add(request.NewErrParamRequired("Forward")) +func (s *DistributionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) } - if s.WhitelistedNames != nil { - if err := s.WhitelistedNames.Validate(); err != nil { - invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams)) - } + if s.Comment == nil { + invalidParams.Add(request.NewErrParamRequired("Comment")) } - - if invalidParams.Len() > 0 { - return invalidParams + if s.DefaultCacheBehavior == nil { + invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior")) } - return nil -} - -// SetForward sets the Forward field's value. -func (s *CookiePreference) SetForward(v string) *CookiePreference { - s.Forward = &v - return s -} - -// SetWhitelistedNames sets the WhitelistedNames field's value. -func (s *CookiePreference) SetWhitelistedNames(v *CookieNames) *CookiePreference { - s.WhitelistedNames = v - return s -} - -// The request to create a new origin access identity. -type CreateCloudFrontOriginAccessIdentityInput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` - - // The current configuration information for the identity. - // - // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` -} - -// String returns the string representation -func (s CreateCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"} - if s.CloudFrontOriginAccessIdentityConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) } - if s.CloudFrontOriginAccessIdentityConfig != nil { - if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { - invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) + if s.Origins == nil { + invalidParams.Add(request.NewErrParamRequired("Origins")) + } + if s.Aliases != nil { + if err := s.Aliases.Validate(); err != nil { + invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) } } - - if invalidParams.Len() > 0 { - return invalidParams + if s.CacheBehaviors != nil { + if err := s.CacheBehaviors.Validate(); err != nil { + invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams)) + } } - return nil -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *CreateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *CreateCloudFrontOriginAccessIdentityInput { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the origin access identity created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new origin access identity just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A. - Location *string `location:"header" locationName:"Location" type:"string"` -} - -// String returns the string representation -func (s CreateCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *CreateCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *CreateCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetLocation(v string) *CreateCloudFrontOriginAccessIdentityOutput { - s.Location = &v - return s -} - -// The request to create a new distribution. -type CreateDistributionInput struct { - _ struct{} `type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` -} - -// String returns the string representation -func (s CreateDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) + if s.CustomErrorResponses != nil { + if err := s.CustomErrorResponses.Validate(); err != nil { + invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams)) + } } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) + if s.DefaultCacheBehavior != nil { + if err := s.DefaultCacheBehavior.Validate(); err != nil { + invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams)) } } - - if invalidParams.Len() > 0 { - return invalidParams + if s.Logging != nil { + if err := s.Logging.Validate(); err != nil { + invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) + } + } + if s.Origins != nil { + if err := s.Origins.Validate(); err != nil { + invalidParams.AddNested("Origins", err.(request.ErrInvalidParams)) + } + } + if s.Restrictions != nil { + if err := s.Restrictions.Validate(); err != nil { + invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams)) + } } - return nil -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *CreateDistributionInput) SetDistributionConfig(v *DistributionConfig) *CreateDistributionInput { - s.DistributionConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - // The fully qualified URI of the new distribution resource just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5. - Location *string `location:"header" locationName:"Location" type:"string"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// String returns the string representation -func (s CreateDistributionOutput) String() string { - return awsutil.Prettify(s) +// SetAliases sets the Aliases field's value. +func (s *DistributionConfig) SetAliases(v *Aliases) *DistributionConfig { + s.Aliases = v + return s } -// GoString returns the string representation -func (s CreateDistributionOutput) GoString() string { - return s.String() +// SetCacheBehaviors sets the CacheBehaviors field's value. +func (s *DistributionConfig) SetCacheBehaviors(v *CacheBehaviors) *DistributionConfig { + s.CacheBehaviors = v + return s } -// SetDistribution sets the Distribution field's value. -func (s *CreateDistributionOutput) SetDistribution(v *Distribution) *CreateDistributionOutput { - s.Distribution = v +// SetCallerReference sets the CallerReference field's value. +func (s *DistributionConfig) SetCallerReference(v string) *DistributionConfig { + s.CallerReference = &v return s } -// SetETag sets the ETag field's value. -func (s *CreateDistributionOutput) SetETag(v string) *CreateDistributionOutput { - s.ETag = &v +// SetComment sets the Comment field's value. +func (s *DistributionConfig) SetComment(v string) *DistributionConfig { + s.Comment = &v return s } -// SetLocation sets the Location field's value. -func (s *CreateDistributionOutput) SetLocation(v string) *CreateDistributionOutput { - s.Location = &v +// SetCustomErrorResponses sets the CustomErrorResponses field's value. +func (s *DistributionConfig) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionConfig { + s.CustomErrorResponses = v return s } -// The request to create a new distribution with tags. -type CreateDistributionWithTagsInput struct { - _ struct{} `type:"structure" payload:"DistributionConfigWithTags"` - - // The distribution's configuration information. - // - // DistributionConfigWithTags is a required field - DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` +// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. +func (s *DistributionConfig) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionConfig { + s.DefaultCacheBehavior = v + return s } -// String returns the string representation -func (s CreateDistributionWithTagsInput) String() string { - return awsutil.Prettify(s) +// SetDefaultRootObject sets the DefaultRootObject field's value. +func (s *DistributionConfig) SetDefaultRootObject(v string) *DistributionConfig { + s.DefaultRootObject = &v + return s } -// GoString returns the string representation -func (s CreateDistributionWithTagsInput) GoString() string { - return s.String() +// SetEnabled sets the Enabled field's value. +func (s *DistributionConfig) SetEnabled(v bool) *DistributionConfig { + s.Enabled = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDistributionWithTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDistributionWithTagsInput"} - if s.DistributionConfigWithTags == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfigWithTags")) - } - if s.DistributionConfigWithTags != nil { - if err := s.DistributionConfigWithTags.Validate(); err != nil { - invalidParams.AddNested("DistributionConfigWithTags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetHttpVersion sets the HttpVersion field's value. +func (s *DistributionConfig) SetHttpVersion(v string) *DistributionConfig { + s.HttpVersion = &v + return s } -// SetDistributionConfigWithTags sets the DistributionConfigWithTags field's value. -func (s *CreateDistributionWithTagsInput) SetDistributionConfigWithTags(v *DistributionConfigWithTags) *CreateDistributionWithTagsInput { - s.DistributionConfigWithTags = v +// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. +func (s *DistributionConfig) SetIsIPV6Enabled(v bool) *DistributionConfig { + s.IsIPV6Enabled = &v return s } -// The returned result of the corresponding request. -type CreateDistributionWithTagsOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new distribution resource just created. For - // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5. - Location *string `location:"header" locationName:"Location" type:"string"` +// SetLogging sets the Logging field's value. +func (s *DistributionConfig) SetLogging(v *LoggingConfig) *DistributionConfig { + s.Logging = v + return s } -// String returns the string representation -func (s CreateDistributionWithTagsOutput) String() string { - return awsutil.Prettify(s) +// SetOrigins sets the Origins field's value. +func (s *DistributionConfig) SetOrigins(v *Origins) *DistributionConfig { + s.Origins = v + return s } -// GoString returns the string representation -func (s CreateDistributionWithTagsOutput) GoString() string { - return s.String() +// SetPriceClass sets the PriceClass field's value. +func (s *DistributionConfig) SetPriceClass(v string) *DistributionConfig { + s.PriceClass = &v + return s } -// SetDistribution sets the Distribution field's value. -func (s *CreateDistributionWithTagsOutput) SetDistribution(v *Distribution) *CreateDistributionWithTagsOutput { - s.Distribution = v +// SetRestrictions sets the Restrictions field's value. +func (s *DistributionConfig) SetRestrictions(v *Restrictions) *DistributionConfig { + s.Restrictions = v return s } -// SetETag sets the ETag field's value. -func (s *CreateDistributionWithTagsOutput) SetETag(v string) *CreateDistributionWithTagsOutput { - s.ETag = &v +// SetViewerCertificate sets the ViewerCertificate field's value. +func (s *DistributionConfig) SetViewerCertificate(v *ViewerCertificate) *DistributionConfig { + s.ViewerCertificate = v return s } -// SetLocation sets the Location field's value. -func (s *CreateDistributionWithTagsOutput) SetLocation(v string) *CreateDistributionWithTagsOutput { - s.Location = &v +// SetWebACLId sets the WebACLId field's value. +func (s *DistributionConfig) SetWebACLId(v string) *DistributionConfig { + s.WebACLId = &v return s } -// The request to create an invalidation. -type CreateInvalidationInput struct { - _ struct{} `type:"structure" payload:"InvalidationBatch"` +// A distribution Configuration and a list of tags to be associated with the +// distribution. +type DistributionConfigWithTags struct { + _ struct{} `type:"structure"` - // The distribution's id. + // A distribution configuration. // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` + // DistributionConfig is a required field + DistributionConfig *DistributionConfig `type:"structure" required:"true"` - // The batch information for the invalidation. + // A complex type that contains zero or more Tag elements. // - // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` + // Tags is a required field + Tags *Tags `type:"structure" required:"true"` } // String returns the string representation -func (s CreateInvalidationInput) String() string { +func (s DistributionConfigWithTags) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInvalidationInput) GoString() string { +func (s DistributionConfigWithTags) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInvalidationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) +func (s *DistributionConfigWithTags) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DistributionConfigWithTags"} + if s.DistributionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) } - if s.InvalidationBatch == nil { - invalidParams.Add(request.NewErrParamRequired("InvalidationBatch")) + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) } - if s.InvalidationBatch != nil { - if err := s.InvalidationBatch.Validate(); err != nil { - invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams)) + if s.DistributionConfig != nil { + if err := s.DistributionConfig.Validate(); err != nil { + invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + if err := s.Tags.Validate(); err != nil { + invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) } } @@ -4256,451 +8268,435 @@ func (s *CreateInvalidationInput) Validate() error { return nil } -// SetDistributionId sets the DistributionId field's value. -func (s *CreateInvalidationInput) SetDistributionId(v string) *CreateInvalidationInput { - s.DistributionId = &v +// SetDistributionConfig sets the DistributionConfig field's value. +func (s *DistributionConfigWithTags) SetDistributionConfig(v *DistributionConfig) *DistributionConfigWithTags { + s.DistributionConfig = v return s } -// SetInvalidationBatch sets the InvalidationBatch field's value. -func (s *CreateInvalidationInput) SetInvalidationBatch(v *InvalidationBatch) *CreateInvalidationInput { - s.InvalidationBatch = v +// SetTags sets the Tags field's value. +func (s *DistributionConfigWithTags) SetTags(v *Tags) *DistributionConfigWithTags { + s.Tags = v return s } -// The returned result of the corresponding request. -type CreateInvalidationOutput struct { - _ struct{} `type:"structure" payload:"Invalidation"` +// A distribution list. +type DistributionList struct { + _ struct{} `type:"structure"` - // The invalidation's information. - Invalidation *Invalidation `type:"structure"` + // A flag that indicates whether more distributions remain to be listed. If + // your results were truncated, you can make a follow-up pagination request + // using the Marker request parameter to retrieve more distributions in the + // list. + // + // IsTruncated is a required field + IsTruncated *bool `type:"boolean" required:"true"` - // The fully qualified URI of the distribution and invalidation batch request, - // including the Invalidation ID. - Location *string `location:"header" locationName:"Location" type:"string"` + // A complex type that contains one DistributionSummary element for each distribution + // that was created by the current AWS account. + Items []*DistributionSummary `locationNameList:"DistributionSummary" type:"list"` + + // The value you provided for the Marker request parameter. + // + // Marker is a required field + Marker *string `type:"string" required:"true"` + + // The value you provided for the MaxItems request parameter. + // + // MaxItems is a required field + MaxItems *int64 `type:"integer" required:"true"` + + // If IsTruncated is true, this element is present and contains the value you + // can use for the Marker request parameter to continue listing your distributions + // where they left off. + NextMarker *string `type:"string"` + + // The number of distributions that were created by the current AWS account. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s DistributionList) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DistributionList) GoString() string { + return s.String() +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *DistributionList) SetIsTruncated(v bool) *DistributionList { + s.IsTruncated = &v + return s +} + +// SetItems sets the Items field's value. +func (s *DistributionList) SetItems(v []*DistributionSummary) *DistributionList { + s.Items = v + return s } -// String returns the string representation -func (s CreateInvalidationOutput) String() string { - return awsutil.Prettify(s) +// SetMarker sets the Marker field's value. +func (s *DistributionList) SetMarker(v string) *DistributionList { + s.Marker = &v + return s } -// GoString returns the string representation -func (s CreateInvalidationOutput) GoString() string { - return s.String() +// SetMaxItems sets the MaxItems field's value. +func (s *DistributionList) SetMaxItems(v int64) *DistributionList { + s.MaxItems = &v + return s } -// SetInvalidation sets the Invalidation field's value. -func (s *CreateInvalidationOutput) SetInvalidation(v *Invalidation) *CreateInvalidationOutput { - s.Invalidation = v +// SetNextMarker sets the NextMarker field's value. +func (s *DistributionList) SetNextMarker(v string) *DistributionList { + s.NextMarker = &v return s } -// SetLocation sets the Location field's value. -func (s *CreateInvalidationOutput) SetLocation(v string) *CreateInvalidationOutput { - s.Location = &v +// SetQuantity sets the Quantity field's value. +func (s *DistributionList) SetQuantity(v int64) *DistributionList { + s.Quantity = &v return s } -// The request to create a new streaming distribution. -type CreateStreamingDistributionInput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` +// A summary of the information about a CloudFront distribution. +type DistributionSummary struct { + _ struct{} `type:"structure"` - // The streaming distribution's configuration information. + // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, + // where 123456789012 is your AWS account ID. // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` -} + // ARN is a required field + ARN *string `type:"string" required:"true"` -// String returns the string representation -func (s CreateStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} + // A complex type that contains information about CNAMEs (alternate domain names), + // if any, for this distribution. + // + // Aliases is a required field + Aliases *Aliases `type:"structure" required:"true"` -// GoString returns the string representation -func (s CreateStreamingDistributionInput) GoString() string { - return s.String() -} + // A complex type that contains zero or more CacheBehavior elements. + // + // CacheBehaviors is a required field + CacheBehaviors *CacheBehaviors `type:"structure" required:"true"` -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"} - if s.StreamingDistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) - } - if s.StreamingDistributionConfig != nil { - if err := s.StreamingDistributionConfig.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) - } - } + // The comment originally specified when this distribution was created. + // + // Comment is a required field + Comment *string `type:"string" required:"true"` - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} + // A complex type that contains zero or more CustomErrorResponses elements. + // + // CustomErrorResponses is a required field + CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"` -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *CreateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *CreateStreamingDistributionInput { - s.StreamingDistributionConfig = v - return s -} + // A complex type that describes the default cache behavior if you don't specify + // a CacheBehavior element or if files don't match any of the values of PathPattern + // in CacheBehavior elements. You must create exactly one default cache behavior. + // + // DefaultCacheBehavior is a required field + DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` -// The returned result of the corresponding request. -type CreateStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` + // The domain name that corresponds to the distribution, for example, d111111abcdef8.cloudfront.net. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` - // The current version of the streaming distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` + // Whether the distribution is enabled to accept user requests for content. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` - // The fully qualified URI of the new streaming distribution resource just created. - // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8. - Location *string `location:"header" locationName:"Location" type:"string"` + // Specify the maximum HTTP version that you want viewers to use to communicate + // with CloudFront. The default value for new web distributions is http2. Viewers + // that don't support HTTP/2 will automatically use an earlier version. + // + // HttpVersion is a required field + HttpVersion *string `type:"string" required:"true" enum:"HttpVersion"` - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `type:"structure"` -} + // The identifier for the distribution. For example: EDFDVBD632BHDS5. + // + // Id is a required field + Id *string `type:"string" required:"true"` -// String returns the string representation -func (s CreateStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} + // Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for + // your distribution. + // + // IsIPV6Enabled is a required field + IsIPV6Enabled *bool `type:"boolean" required:"true"` -// GoString returns the string representation -func (s CreateStreamingDistributionOutput) GoString() string { - return s.String() -} + // The date and time the distribution was last modified. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` -// SetETag sets the ETag field's value. -func (s *CreateStreamingDistributionOutput) SetETag(v string) *CreateStreamingDistributionOutput { - s.ETag = &v - return s -} + // A complex type that contains information about origins for this distribution. + // + // Origins is a required field + Origins *Origins `type:"structure" required:"true"` -// SetLocation sets the Location field's value. -func (s *CreateStreamingDistributionOutput) SetLocation(v string) *CreateStreamingDistributionOutput { - s.Location = &v - return s -} + // PriceClass is a required field + PriceClass *string `type:"string" required:"true" enum:"PriceClass"` -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *CreateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionOutput { - s.StreamingDistribution = v - return s -} + // A complex type that identifies ways in which you want to restrict distribution + // of your content. + // + // Restrictions is a required field + Restrictions *Restrictions `type:"structure" required:"true"` -// The request to create a new streaming distribution with tags. -type CreateStreamingDistributionWithTagsInput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfigWithTags"` + // The current status of the distribution. When the status is Deployed, the + // distribution's information is propagated to all CloudFront edge locations. + // + // Status is a required field + Status *string `type:"string" required:"true"` + + // A complex type that specifies the following: + // + // * Whether you want viewers to use HTTP or HTTPS to request your objects. + // + // * If you want viewers to use HTTPS, whether you're using an alternate + // domain name such as example.com or the CloudFront domain name for your + // distribution, such as d111111abcdef8.cloudfront.net. + // + // * If you're using an alternate domain name, whether AWS Certificate Manager + // (ACM) provided the certificate, or you purchased a certificate from a + // third-party certificate authority and imported it into ACM or uploaded + // it to the IAM certificate store. + // + // You must specify only one of the following values: + // + // * ViewerCertificate$ACMCertificateArn + // + // * ViewerCertificate$IAMCertificateId + // + // * ViewerCertificate$CloudFrontDefaultCertificate + // + // Don't specify false for CloudFrontDefaultCertificate. + // + // If you want viewers to use HTTP instead of HTTPS to request your objects: + // Specify the following value: + // + // true + // + // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache + // behaviors. + // + // If you want viewers to use HTTPS to request your objects: Choose the type + // of certificate that you want to use based on whether you're using an alternate + // domain name for your objects or the CloudFront domain name: + // + // * If you're using an alternate domain name, such as example.com: Specify + // one of the following values, depending on whether ACM provided your certificate + // or you purchased your certificate from third-party certificate authority: + // + // ARN for ACM SSL/TLS certificate where + // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate + // that you want to use for this distribution. + // + // IAM certificate ID where IAM certificate + // ID is the ID that IAM returned when you added the certificate to the IAM + // certificate store. + // + // If you specify ACMCertificateArn or IAMCertificateId, you must also specify + // a value for SSLSupportMethod. + // + // If you choose to use an ACM certificate or a certificate in the IAM certificate + // store, we recommend that you use only an alternate domain name in your + // object URLs (https://example.com/logo.jpg). If you use the domain name + // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) + // and the viewer supports SNI, then CloudFront behaves normally. However, + // if the browser does not support SNI, the user's experience depends on + // the value that you choose for SSLSupportMethod: + // + // vip: The viewer displays a warning because there is a mismatch between the + // CloudFront domain name and the domain name in your SSL/TLS certificate. + // + // sni-only: CloudFront drops the connection with the browser without returning + // the object. + // + // * If you're using the CloudFront domain name for your distribution, such + // as d111111abcdef8.cloudfront.net: Specify the following value: + // + // true + // + // If you want viewers to use HTTPS, you must also specify one of the following + // values in your cache behaviors: + // + // * https-only + // + // * redirect-to-https + // + // You can also optionally require that CloudFront use HTTPS to communicate + // with your origin by specifying one of the following values for the applicable + // origins: + // + // * https-only + // + // * match-viewer + // + // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) + // in the Amazon CloudFront Developer Guide. + // + // ViewerCertificate is a required field + ViewerCertificate *ViewerCertificate `type:"structure" required:"true"` - // The streaming distribution's configuration information. + // The Web ACL Id (if any) associated with the distribution. // - // StreamingDistributionConfigWithTags is a required field - StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` + // WebACLId is a required field + WebACLId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateStreamingDistributionWithTagsInput) String() string { +func (s DistributionSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateStreamingDistributionWithTagsInput) GoString() string { +func (s DistributionSummary) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamingDistributionWithTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionWithTagsInput"} - if s.StreamingDistributionConfigWithTags == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfigWithTags")) - } - if s.StreamingDistributionConfigWithTags != nil { - if err := s.StreamingDistributionConfigWithTags.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamingDistributionConfigWithTags sets the StreamingDistributionConfigWithTags field's value. -func (s *CreateStreamingDistributionWithTagsInput) SetStreamingDistributionConfigWithTags(v *StreamingDistributionConfigWithTags) *CreateStreamingDistributionWithTagsInput { - s.StreamingDistributionConfigWithTags = v +// SetARN sets the ARN field's value. +func (s *DistributionSummary) SetARN(v string) *DistributionSummary { + s.ARN = &v return s } -// The returned result of the corresponding request. -type CreateStreamingDistributionWithTagsOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new streaming distribution resource just created. - // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8. - Location *string `location:"header" locationName:"Location" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `type:"structure"` -} - -// String returns the string representation -func (s CreateStreamingDistributionWithTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateStreamingDistributionWithTagsOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetETag(v string) *CreateStreamingDistributionWithTagsOutput { - s.ETag = &v +// SetAliases sets the Aliases field's value. +func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary { + s.Aliases = v return s } -// SetLocation sets the Location field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetLocation(v string) *CreateStreamingDistributionWithTagsOutput { - s.Location = &v +// SetCacheBehaviors sets the CacheBehaviors field's value. +func (s *DistributionSummary) SetCacheBehaviors(v *CacheBehaviors) *DistributionSummary { + s.CacheBehaviors = v return s } -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionWithTagsOutput { - s.StreamingDistribution = v +// SetComment sets the Comment field's value. +func (s *DistributionSummary) SetComment(v string) *DistributionSummary { + s.Comment = &v return s } -// A complex type that controls: -// -// * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range -// with custom error messages before returning the response to the viewer. -// -// -// * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. -// -// For more information about custom error pages, see Customizing Error Responses -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) -// in the Amazon CloudFront Developer Guide. -type CustomErrorResponse struct { - _ struct{} `type:"structure"` - - // The minimum amount of time, in seconds, that you want CloudFront to cache - // the HTTP status code specified in ErrorCode. When this time period has elapsed, - // CloudFront queries your origin to see whether the problem that caused the - // error has been resolved and the requested object is now available. - // - // If you don't want to specify a value, include an empty element, , - // in the XML document. - // - // For more information, see Customizing Error Responses (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) - // in the Amazon CloudFront Developer Guide. - ErrorCachingMinTTL *int64 `type:"long"` - - // The HTTP status code for which you want to specify a custom error page and/or - // a caching duration. - // - // ErrorCode is a required field - ErrorCode *int64 `type:"integer" required:"true"` - - // The HTTP status code that you want CloudFront to return to the viewer along - // with the custom error page. There are a variety of reasons that you might - // want CloudFront to return a status code different from the status code that - // your origin returned to CloudFront, for example: - // - // * Some Internet devices (some firewalls and corporate proxies, for example) - // intercept HTTP 4xx and 5xx and prevent the response from being returned - // to the viewer. If you substitute 200, the response typically won't be - // intercepted. - // - // * If you don't care about distinguishing among different client errors - // or server errors, you can specify 400 or 500 as the ResponseCode for all - // 4xx or 5xx errors. - // - // * You might want to return a 200 status code (OK) and static website so - // your customers don't know that your website is down. - // - // If you specify a value for ResponseCode, you must also specify a value for - // ResponsePagePath. If you don't want to specify a value, include an empty - // element, , in the XML document. - ResponseCode *string `type:"string"` - - // The path to the custom error page that you want CloudFront to return to a - // viewer when your origin returns the HTTP status code specified by ErrorCode, - // for example, /4xx-errors/403-forbidden.html. If you want to store your objects - // and your custom error pages in different locations, your distribution must - // include a cache behavior for which the following is true: - // - // * The value of PathPattern matches the path to your custom error messages. - // For example, suppose you saved custom error pages for 4xx errors in an - // Amazon S3 bucket in a directory named /4xx-errors. Your distribution must - // include a cache behavior for which the path pattern routes requests for - // your custom error pages to that location, for example, /4xx-errors/*. - // - // - // * The value of TargetOriginId specifies the value of the ID element for - // the origin that contains your custom error pages. - // - // If you specify a value for ResponsePagePath, you must also specify a value - // for ResponseCode. If you don't want to specify a value, include an empty - // element, , in the XML document. - // - // We recommend that you store custom error pages in an Amazon S3 bucket. If - // you store custom error pages on an HTTP server and the server starts to return - // 5xx errors, CloudFront can't get the files that you want to return to viewers - // because the origin server is unavailable. - ResponsePagePath *string `type:"string"` -} - -// String returns the string representation -func (s CustomErrorResponse) String() string { - return awsutil.Prettify(s) +// SetCustomErrorResponses sets the CustomErrorResponses field's value. +func (s *DistributionSummary) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionSummary { + s.CustomErrorResponses = v + return s } -// GoString returns the string representation -func (s CustomErrorResponse) GoString() string { - return s.String() +// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. +func (s *DistributionSummary) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionSummary { + s.DefaultCacheBehavior = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomErrorResponse) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"} - if s.ErrorCode == nil { - invalidParams.Add(request.NewErrParamRequired("ErrorCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDomainName sets the DomainName field's value. +func (s *DistributionSummary) SetDomainName(v string) *DistributionSummary { + s.DomainName = &v + return s } -// SetErrorCachingMinTTL sets the ErrorCachingMinTTL field's value. -func (s *CustomErrorResponse) SetErrorCachingMinTTL(v int64) *CustomErrorResponse { - s.ErrorCachingMinTTL = &v +// SetEnabled sets the Enabled field's value. +func (s *DistributionSummary) SetEnabled(v bool) *DistributionSummary { + s.Enabled = &v return s } -// SetErrorCode sets the ErrorCode field's value. -func (s *CustomErrorResponse) SetErrorCode(v int64) *CustomErrorResponse { - s.ErrorCode = &v +// SetHttpVersion sets the HttpVersion field's value. +func (s *DistributionSummary) SetHttpVersion(v string) *DistributionSummary { + s.HttpVersion = &v return s } -// SetResponseCode sets the ResponseCode field's value. -func (s *CustomErrorResponse) SetResponseCode(v string) *CustomErrorResponse { - s.ResponseCode = &v +// SetId sets the Id field's value. +func (s *DistributionSummary) SetId(v string) *DistributionSummary { + s.Id = &v return s } -// SetResponsePagePath sets the ResponsePagePath field's value. -func (s *CustomErrorResponse) SetResponsePagePath(v string) *CustomErrorResponse { - s.ResponsePagePath = &v +// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. +func (s *DistributionSummary) SetIsIPV6Enabled(v bool) *DistributionSummary { + s.IsIPV6Enabled = &v return s } -// A complex type that controls: -// -// * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range -// with custom error messages before returning the response to the viewer. -// -// * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. -// -// For more information about custom error pages, see Customizing Error Responses -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) -// in the Amazon CloudFront Developer Guide. -type CustomErrorResponses struct { - _ struct{} `type:"structure"` - - // A complex type that contains a CustomErrorResponse element for each HTTP - // status code for which you want to specify a custom error page and/or a caching - // duration. - Items []*CustomErrorResponse `locationNameList:"CustomErrorResponse" type:"list"` - - // The number of HTTP status codes for which you want to specify a custom error - // page and/or a caching duration. If Quantity is 0, you can omit Items. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DistributionSummary) SetLastModifiedTime(v time.Time) *DistributionSummary { + s.LastModifiedTime = &v + return s } -// String returns the string representation -func (s CustomErrorResponses) String() string { - return awsutil.Prettify(s) +// SetOrigins sets the Origins field's value. +func (s *DistributionSummary) SetOrigins(v *Origins) *DistributionSummary { + s.Origins = v + return s } -// GoString returns the string representation -func (s CustomErrorResponses) GoString() string { - return s.String() +// SetPriceClass sets the PriceClass field's value. +func (s *DistributionSummary) SetPriceClass(v string) *DistributionSummary { + s.PriceClass = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomErrorResponses) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } +// SetRestrictions sets the Restrictions field's value. +func (s *DistributionSummary) SetRestrictions(v *Restrictions) *DistributionSummary { + s.Restrictions = v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetStatus sets the Status field's value. +func (s *DistributionSummary) SetStatus(v string) *DistributionSummary { + s.Status = &v + return s } -// SetItems sets the Items field's value. -func (s *CustomErrorResponses) SetItems(v []*CustomErrorResponse) *CustomErrorResponses { - s.Items = v +// SetViewerCertificate sets the ViewerCertificate field's value. +func (s *DistributionSummary) SetViewerCertificate(v *ViewerCertificate) *DistributionSummary { + s.ViewerCertificate = v return s } -// SetQuantity sets the Quantity field's value. -func (s *CustomErrorResponses) SetQuantity(v int64) *CustomErrorResponses { - s.Quantity = &v +// SetWebACLId sets the WebACLId field's value. +func (s *DistributionSummary) SetWebACLId(v string) *DistributionSummary { + s.WebACLId = &v return s } -// A complex type that contains the list of Custom Headers for each origin. -type CustomHeaders struct { +// Complex data type for field-level encryption profiles that includes all of +// the encryption entities. +type EncryptionEntities struct { _ struct{} `type:"structure"` - // Optional: A list that contains one OriginCustomHeader element for each custom - // header that you want CloudFront to forward to the origin. If Quantity is - // 0, omit Items. - Items []*OriginCustomHeader `locationNameList:"OriginCustomHeader" type:"list"` + // An array of field patterns in a field-level encryption content type-profile + // mapping. + Items []*EncryptionEntity `locationNameList:"EncryptionEntity" type:"list"` - // The number of custom headers, if any, for this distribution. + // Number of field pattern items in a field-level encryption content type-profile + // mapping. // // Quantity is a required field Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s CustomHeaders) String() string { +func (s EncryptionEntities) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CustomHeaders) GoString() string { +func (s EncryptionEntities) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CustomHeaders) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"} +func (s *EncryptionEntities) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionEntities"} if s.Quantity == nil { invalidParams.Add(request.NewErrParamRequired("Quantity")) } @@ -4722,84 +8718,70 @@ func (s *CustomHeaders) Validate() error { } // SetItems sets the Items field's value. -func (s *CustomHeaders) SetItems(v []*OriginCustomHeader) *CustomHeaders { +func (s *EncryptionEntities) SetItems(v []*EncryptionEntity) *EncryptionEntities { s.Items = v return s } // SetQuantity sets the Quantity field's value. -func (s *CustomHeaders) SetQuantity(v int64) *CustomHeaders { +func (s *EncryptionEntities) SetQuantity(v int64) *EncryptionEntities { s.Quantity = &v return s } -// A customer origin. -type CustomOriginConfig struct { +// Complex data type for field-level encryption profiles that includes the encryption +// key and field pattern specifications. +type EncryptionEntity struct { _ struct{} `type:"structure"` - // The HTTP port the custom origin listens on. - // - // HTTPPort is a required field - HTTPPort *int64 `type:"integer" required:"true"` - - // The HTTPS port the custom origin listens on. - // - // HTTPSPort is a required field - HTTPSPort *int64 `type:"integer" required:"true"` - - // You can create a custom keep-alive timeout. All timeout units are in seconds. - // The default keep-alive timeout is 5 seconds, but you can configure custom - // timeout lengths using the CloudFront API. The minimum timeout length is 1 - // second; the maximum is 60 seconds. + // Field patterns in a field-level encryption content type profile specify the + // fields that you want to be encrypted. You can provide the full field name, + // or any beginning characters followed by a wildcard (*). You can't overlap + // field patterns. For example, you can't have both ABC* and AB*. Note that + // field patterns are case-sensitive. // - // If you need to increase the maximum time limit, contact the AWS Support Center - // (https://console.aws.amazon.com/support/home#/). - OriginKeepaliveTimeout *int64 `type:"integer"` + // FieldPatterns is a required field + FieldPatterns *FieldPatterns `type:"structure" required:"true"` - // The origin protocol policy to apply to your origin. + // The provider associated with the public key being used for encryption. This + // value must also be provided with the private key for applications to be able + // to decrypt data. // - // OriginProtocolPolicy is a required field - OriginProtocolPolicy *string `type:"string" required:"true" enum:"OriginProtocolPolicy"` + // ProviderId is a required field + ProviderId *string `type:"string" required:"true"` - // You can create a custom origin read timeout. All timeout units are in seconds. - // The default origin read timeout is 30 seconds, but you can configure custom - // timeout lengths using the CloudFront API. The minimum timeout length is 4 - // seconds; the maximum is 60 seconds. + // The public key associated with a set of field-level encryption patterns, + // to be used when encrypting the fields that match the patterns. // - // If you need to increase the maximum time limit, contact the AWS Support Center - // (https://console.aws.amazon.com/support/home#/). - OriginReadTimeout *int64 `type:"integer"` - - // The SSL/TLS protocols that you want CloudFront to use when communicating - // with your origin over HTTPS. - OriginSslProtocols *OriginSslProtocols `type:"structure"` + // PublicKeyId is a required field + PublicKeyId *string `type:"string" required:"true"` } // String returns the string representation -func (s CustomOriginConfig) String() string { +func (s EncryptionEntity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CustomOriginConfig) GoString() string { +func (s EncryptionEntity) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CustomOriginConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"} - if s.HTTPPort == nil { - invalidParams.Add(request.NewErrParamRequired("HTTPPort")) +func (s *EncryptionEntity) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionEntity"} + if s.FieldPatterns == nil { + invalidParams.Add(request.NewErrParamRequired("FieldPatterns")) } - if s.HTTPSPort == nil { - invalidParams.Add(request.NewErrParamRequired("HTTPSPort")) + if s.ProviderId == nil { + invalidParams.Add(request.NewErrParamRequired("ProviderId")) } - if s.OriginProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy")) + if s.PublicKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKeyId")) } - if s.OriginSslProtocols != nil { - if err := s.OriginSslProtocols.Validate(); err != nil { - invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams)) + if s.FieldPatterns != nil { + if err := s.FieldPatterns.Validate(); err != nil { + invalidParams.AddNested("FieldPatterns", err.(request.ErrInvalidParams)) } } @@ -4809,214 +8791,123 @@ func (s *CustomOriginConfig) Validate() error { return nil } -// SetHTTPPort sets the HTTPPort field's value. -func (s *CustomOriginConfig) SetHTTPPort(v int64) *CustomOriginConfig { - s.HTTPPort = &v - return s -} - -// SetHTTPSPort sets the HTTPSPort field's value. -func (s *CustomOriginConfig) SetHTTPSPort(v int64) *CustomOriginConfig { - s.HTTPSPort = &v - return s -} - -// SetOriginKeepaliveTimeout sets the OriginKeepaliveTimeout field's value. -func (s *CustomOriginConfig) SetOriginKeepaliveTimeout(v int64) *CustomOriginConfig { - s.OriginKeepaliveTimeout = &v - return s -} - -// SetOriginProtocolPolicy sets the OriginProtocolPolicy field's value. -func (s *CustomOriginConfig) SetOriginProtocolPolicy(v string) *CustomOriginConfig { - s.OriginProtocolPolicy = &v +// SetFieldPatterns sets the FieldPatterns field's value. +func (s *EncryptionEntity) SetFieldPatterns(v *FieldPatterns) *EncryptionEntity { + s.FieldPatterns = v return s } -// SetOriginReadTimeout sets the OriginReadTimeout field's value. -func (s *CustomOriginConfig) SetOriginReadTimeout(v int64) *CustomOriginConfig { - s.OriginReadTimeout = &v +// SetProviderId sets the ProviderId field's value. +func (s *EncryptionEntity) SetProviderId(v string) *EncryptionEntity { + s.ProviderId = &v return s } -// SetOriginSslProtocols sets the OriginSslProtocols field's value. -func (s *CustomOriginConfig) SetOriginSslProtocols(v *OriginSslProtocols) *CustomOriginConfig { - s.OriginSslProtocols = v +// SetPublicKeyId sets the PublicKeyId field's value. +func (s *EncryptionEntity) SetPublicKeyId(v string) *EncryptionEntity { + s.PublicKeyId = &v return s } -// A complex type that describes the default cache behavior if you don't specify -// a CacheBehavior element or if files don't match any of the values of PathPattern -// in CacheBehavior elements. You must create exactly one default cache behavior. -type DefaultCacheBehavior struct { +// A complex data type that includes the profile configurations and other options +// specified for field-level encryption. +type FieldLevelEncryption struct { _ struct{} `type:"structure"` - // A complex type that controls which HTTP methods CloudFront processes and - // forwards to your Amazon S3 bucket or your custom origin. There are three - // choices: + // A complex data type that includes the profile configurations specified for + // field-level encryption. // - // * CloudFront forwards only GET and HEAD requests. - // - // * CloudFront forwards only GET, HEAD, and OPTIONS requests. - // - // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE - // requests. - // - // If you pick the third choice, you may need to restrict access to your Amazon - // S3 bucket or to your custom origin so users can't perform operations that - // you don't want them to. For example, you might not want users to have permissions - // to delete objects from your origin. - AllowedMethods *AllowedMethods `type:"structure"` - - // Whether you want CloudFront to automatically compress certain files for this - // cache behavior. If so, specify true; if not, specify false. For more information, - // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) - // in the Amazon CloudFront Developer Guide. - Compress *bool `type:"boolean"` - - // The default amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Specifying How - // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - DefaultTTL *int64 `type:"long"` + // FieldLevelEncryptionConfig is a required field + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `type:"structure" required:"true"` - // A complex type that specifies how CloudFront handles query strings and cookies. + // The configuration ID for a field-level encryption configuration which includes + // a set of profiles that specify certain selected data fields to be encrypted + // by specific public keys. // - // ForwardedValues is a required field - ForwardedValues *ForwardedValues `type:"structure" required:"true"` - - // A complex type that contains zero or more Lambda function associations for - // a cache behavior. - LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` - - MaxTTL *int64 `type:"long"` + // Id is a required field + Id *string `type:"string" required:"true"` - // The minimum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. For more information, see Specifying How Long - // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // You must specify 0 for MinTTL if you configure CloudFront to forward all - // headers to your origin (under Headers, if you specify 1 for Quantity and - // * for Name). + // The last time the field-level encryption configuration was changed. // - // MinTTL is a required field - MinTTL *int64 `type:"long" required:"true"` + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` +} - // Indicates whether you want to distribute media files in the Microsoft Smooth - // Streaming format using the origin that is associated with this cache behavior. - // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, - // you can still distribute other content using this cache behavior if the content - // matches the value of PathPattern. - SmoothStreaming *bool `type:"boolean"` +// String returns the string representation +func (s FieldLevelEncryption) String() string { + return awsutil.Prettify(s) +} - // The value of ID for the origin that you want CloudFront to route requests - // to when a request matches the path pattern either for a cache behavior or - // for the default cache behavior. - // - // TargetOriginId is a required field - TargetOriginId *string `type:"string" required:"true"` +// GoString returns the string representation +func (s FieldLevelEncryption) GoString() string { + return s.String() +} - // A complex type that specifies the AWS accounts, if any, that you want to - // allow to create signed URLs for private content. - // - // If you want to require signed URLs in requests for objects in the target - // origin that match the PathPattern for this cache behavior, specify true for - // Enabled, and specify the applicable values for Quantity and Items. For more - // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // If you don't want to require signed URLs in requests for objects that match - // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. - // - // To add, change, or remove one or more trusted signers, change Enabled to - // true (if it's currently false), change Quantity as applicable, and specify - // all of the trusted signers that you want to include in the updated distribution. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" required:"true"` +// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. +func (s *FieldLevelEncryption) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *FieldLevelEncryption { + s.FieldLevelEncryptionConfig = v + return s +} - // The protocol that viewers can use to access the files in the origin specified - // by TargetOriginId when a request matches the path pattern in PathPattern. - // You can specify the following options: - // - // * allow-all: Viewers can use HTTP or HTTPS. - // - // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns - // an HTTP status code of 301 (Moved Permanently) to the viewer along with - // the HTTPS URL. The viewer then resubmits the request using the new URL. - // - // * https-only: If a viewer sends an HTTP request, CloudFront returns an - // HTTP status code of 403 (Forbidden). - // - // For more information about requiring the HTTPS protocol, see Using an HTTPS - // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html) - // in the Amazon CloudFront Developer Guide. - // - // The only way to guarantee that viewers retrieve an object that was fetched - // from the origin using HTTPS is never to use any other protocol to fetch the - // object. If you have recently changed from HTTP to HTTPS, we recommend that - // you clear your objects' cache because cached objects are protocol agnostic. - // That means that an edge location will return an object from the cache regardless - // of whether the current request protocol matches the protocol used previously. - // For more information, see Specifying How Long Objects and Errors Stay in - // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. +// SetId sets the Id field's value. +func (s *FieldLevelEncryption) SetId(v string) *FieldLevelEncryption { + s.Id = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *FieldLevelEncryption) SetLastModifiedTime(v time.Time) *FieldLevelEncryption { + s.LastModifiedTime = &v + return s +} + +// A complex data type that includes the profile configurations specified for +// field-level encryption. +type FieldLevelEncryptionConfig struct { + _ struct{} `type:"structure"` + + // A unique number that ensures the request can't be replayed. // - // ViewerProtocolPolicy is a required field - ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` + // CallerReference is a required field + CallerReference *string `type:"string" required:"true"` + + // An optional comment about the configuration. + Comment *string `type:"string"` + + // A complex data type that specifies when to forward content if a content type + // isn't recognized and profiles to use as by default in a request if a query + // argument doesn't specify a profile to use. + ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"` + + // A complex data type that specifies when to forward content if a profile isn't + // found and the profile that can be provided as a query argument in a request. + QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"` } // String returns the string representation -func (s DefaultCacheBehavior) String() string { +func (s FieldLevelEncryptionConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DefaultCacheBehavior) GoString() string { +func (s FieldLevelEncryptionConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DefaultCacheBehavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"} - if s.ForwardedValues == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardedValues")) - } - if s.MinTTL == nil { - invalidParams.Add(request.NewErrParamRequired("MinTTL")) - } - if s.TargetOriginId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) - } - if s.TrustedSigners == nil { - invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) - } - if s.ViewerProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) - } - if s.AllowedMethods != nil { - if err := s.AllowedMethods.Validate(); err != nil { - invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) - } - } - if s.ForwardedValues != nil { - if err := s.ForwardedValues.Validate(); err != nil { - invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) - } +func (s *FieldLevelEncryptionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionConfig"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) } - if s.LambdaFunctionAssociations != nil { - if err := s.LambdaFunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) + if s.ContentTypeProfileConfig != nil { + if err := s.ContentTypeProfileConfig.Validate(); err != nil { + invalidParams.AddNested("ContentTypeProfileConfig", err.(request.ErrInvalidParams)) } } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) + if s.QueryArgProfileConfig != nil { + if err := s.QueryArgProfileConfig.Validate(); err != nil { + invalidParams.AddNested("QueryArgProfileConfig", err.(request.ErrInvalidParams)) } } @@ -5026,198 +8917,189 @@ func (s *DefaultCacheBehavior) Validate() error { return nil } -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *DefaultCacheBehavior) SetAllowedMethods(v *AllowedMethods) *DefaultCacheBehavior { - s.AllowedMethods = v +// SetCallerReference sets the CallerReference field's value. +func (s *FieldLevelEncryptionConfig) SetCallerReference(v string) *FieldLevelEncryptionConfig { + s.CallerReference = &v return s } -// SetCompress sets the Compress field's value. -func (s *DefaultCacheBehavior) SetCompress(v bool) *DefaultCacheBehavior { - s.Compress = &v +// SetComment sets the Comment field's value. +func (s *FieldLevelEncryptionConfig) SetComment(v string) *FieldLevelEncryptionConfig { + s.Comment = &v return s } -// SetDefaultTTL sets the DefaultTTL field's value. -func (s *DefaultCacheBehavior) SetDefaultTTL(v int64) *DefaultCacheBehavior { - s.DefaultTTL = &v +// SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value. +func (s *FieldLevelEncryptionConfig) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionConfig { + s.ContentTypeProfileConfig = v return s } -// SetForwardedValues sets the ForwardedValues field's value. -func (s *DefaultCacheBehavior) SetForwardedValues(v *ForwardedValues) *DefaultCacheBehavior { - s.ForwardedValues = v +// SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value. +func (s *FieldLevelEncryptionConfig) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionConfig { + s.QueryArgProfileConfig = v return s } -// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. -func (s *DefaultCacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *DefaultCacheBehavior { - s.LambdaFunctionAssociations = v - return s +// List of field-level encrpytion configurations. +type FieldLevelEncryptionList struct { + _ struct{} `type:"structure"` + + // An array of field-level encryption items. + Items []*FieldLevelEncryptionSummary `locationNameList:"FieldLevelEncryptionSummary" type:"list"` + + // The maximum number of elements you want in the response body. + // + // MaxItems is a required field + MaxItems *int64 `type:"integer" required:"true"` + + // If there are more elements to be listed, this element is present and contains + // the value that you can use for the Marker request parameter to continue listing + // your configurations where you left off. + NextMarker *string `type:"string"` + + // The number of field-level encryption items. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } -// SetMaxTTL sets the MaxTTL field's value. -func (s *DefaultCacheBehavior) SetMaxTTL(v int64) *DefaultCacheBehavior { - s.MaxTTL = &v - return s +// String returns the string representation +func (s FieldLevelEncryptionList) String() string { + return awsutil.Prettify(s) } -// SetMinTTL sets the MinTTL field's value. -func (s *DefaultCacheBehavior) SetMinTTL(v int64) *DefaultCacheBehavior { - s.MinTTL = &v - return s +// GoString returns the string representation +func (s FieldLevelEncryptionList) GoString() string { + return s.String() } -// SetSmoothStreaming sets the SmoothStreaming field's value. -func (s *DefaultCacheBehavior) SetSmoothStreaming(v bool) *DefaultCacheBehavior { - s.SmoothStreaming = &v +// SetItems sets the Items field's value. +func (s *FieldLevelEncryptionList) SetItems(v []*FieldLevelEncryptionSummary) *FieldLevelEncryptionList { + s.Items = v return s } -// SetTargetOriginId sets the TargetOriginId field's value. -func (s *DefaultCacheBehavior) SetTargetOriginId(v string) *DefaultCacheBehavior { - s.TargetOriginId = &v +// SetMaxItems sets the MaxItems field's value. +func (s *FieldLevelEncryptionList) SetMaxItems(v int64) *FieldLevelEncryptionList { + s.MaxItems = &v return s } -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *DefaultCacheBehavior) SetTrustedSigners(v *TrustedSigners) *DefaultCacheBehavior { - s.TrustedSigners = v +// SetNextMarker sets the NextMarker field's value. +func (s *FieldLevelEncryptionList) SetNextMarker(v string) *FieldLevelEncryptionList { + s.NextMarker = &v return s } -// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. -func (s *DefaultCacheBehavior) SetViewerProtocolPolicy(v string) *DefaultCacheBehavior { - s.ViewerProtocolPolicy = &v +// SetQuantity sets the Quantity field's value. +func (s *FieldLevelEncryptionList) SetQuantity(v int64) *FieldLevelEncryptionList { + s.Quantity = &v return s } -// Deletes a origin access identity. -type DeleteCloudFrontOriginAccessIdentityInput struct { +// A complex data type for field-level encryption profiles. +type FieldLevelEncryptionProfile struct { _ struct{} `type:"structure"` - // The origin access identity's ID. + // A complex data type that includes the profile name and the encryption entities + // for the field-level encryption profile. + // + // FieldLevelEncryptionProfileConfig is a required field + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `type:"structure" required:"true"` + + // The ID for a field-level encryption profile configuration which includes + // a set of profiles that specify certain selected data fields to be encrypted + // by specific public keys. // // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + Id *string `type:"string" required:"true"` - // The value of the ETag header you received from a previous GET or PUT request. - // For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` + // The last time the field-level encryption profile was updated. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` } // String returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityInput) String() string { +func (s FieldLevelEncryptionProfile) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string { +func (s FieldLevelEncryptionProfile) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. +func (s *FieldLevelEncryptionProfile) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *FieldLevelEncryptionProfile { + s.FieldLevelEncryptionProfileConfig = v + return s } // SetId sets the Id field's value. -func (s *DeleteCloudFrontOriginAccessIdentityInput) SetId(v string) *DeleteCloudFrontOriginAccessIdentityInput { +func (s *FieldLevelEncryptionProfile) SetId(v string) *FieldLevelEncryptionProfile { s.Id = &v return s } -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *DeleteCloudFrontOriginAccessIdentityInput { - s.IfMatch = &v +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *FieldLevelEncryptionProfile) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfile { + s.LastModifiedTime = &v return s } -type DeleteCloudFrontOriginAccessIdentityOutput struct { +// A complex data type of profiles for the field-level encryption. +type FieldLevelEncryptionProfileConfig struct { _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} -// GoString returns the string representation -func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} + // A unique number that ensures the request can't be replayed. + // + // CallerReference is a required field + CallerReference *string `type:"string" required:"true"` -// This action deletes a web distribution. To delete a web distribution using -// the CloudFront API, perform the following steps. -// -// To delete a web distribution using the CloudFront API: -// -// Disable the web distribution -// -// Submit a GET Distribution Config request to get the current configuration -// and the Etag header for the distribution. -// -// Update the XML document that was returned in the response to your GET Distribution -// Config request to change the value of Enabled to false. -// -// Submit a PUT Distribution Config request to update the configuration for -// your distribution. In the request body, include the XML document that you -// updated in Step 3. Set the value of the HTTP If-Match header to the value -// of the ETag header that CloudFront returned when you submitted the GET Distribution -// Config request in Step 2. -// -// Review the response to the PUT Distribution Config request to confirm that -// the distribution was successfully disabled. -// -// Submit a GET Distribution request to confirm that your changes have propagated. -// When propagation is complete, the value of Status is Deployed. -// -// Submit a DELETE Distribution request. Set the value of the HTTP If-Match -// header to the value of the ETag header that CloudFront returned when you -// submitted the GET Distribution Config request in Step 6. -// -// Review the response to your DELETE Distribution request to confirm that the -// distribution was successfully deleted. -// -// For information about deleting a distribution using the CloudFront console, -// see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) -// in the Amazon CloudFront Developer Guide. -type DeleteDistributionInput struct { - _ struct{} `type:"structure"` + // An optional comment for the field-level encryption profile. + Comment *string `type:"string"` - // The distribution ID. + // A complex data type of encryption entities for the field-level encryption + // profile that include the public key ID, provider, and field patterns for + // specifying which fields to encrypt with this key. // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + // EncryptionEntities is a required field + EncryptionEntities *EncryptionEntities `type:"structure" required:"true"` - // The value of the ETag header that you received when you disabled the distribution. - // For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` + // Profile name for the field-level encryption profile. + // + // Name is a required field + Name *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteDistributionInput) String() string { +func (s FieldLevelEncryptionProfileConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDistributionInput) GoString() string { +func (s FieldLevelEncryptionProfileConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) +func (s *FieldLevelEncryptionProfileConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionProfileConfig"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.EncryptionEntities == nil { + invalidParams.Add(request.NewErrParamRequired("EncryptionEntities")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.EncryptionEntities != nil { + if err := s.EncryptionEntities.Validate(); err != nil { + invalidParams.AddNested("EncryptionEntities", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -5226,593 +9108,643 @@ func (s *DeleteDistributionInput) Validate() error { return nil } -// SetId sets the Id field's value. -func (s *DeleteDistributionInput) SetId(v string) *DeleteDistributionInput { - s.Id = &v +// SetCallerReference sets the CallerReference field's value. +func (s *FieldLevelEncryptionProfileConfig) SetCallerReference(v string) *FieldLevelEncryptionProfileConfig { + s.CallerReference = &v return s } -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteDistributionInput) SetIfMatch(v string) *DeleteDistributionInput { - s.IfMatch = &v +// SetComment sets the Comment field's value. +func (s *FieldLevelEncryptionProfileConfig) SetComment(v string) *FieldLevelEncryptionProfileConfig { + s.Comment = &v return s } -type DeleteDistributionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteDistributionOutput) String() string { - return awsutil.Prettify(s) +// SetEncryptionEntities sets the EncryptionEntities field's value. +func (s *FieldLevelEncryptionProfileConfig) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileConfig { + s.EncryptionEntities = v + return s } -// GoString returns the string representation -func (s DeleteDistributionOutput) GoString() string { - return s.String() +// SetName sets the Name field's value. +func (s *FieldLevelEncryptionProfileConfig) SetName(v string) *FieldLevelEncryptionProfileConfig { + s.Name = &v + return s } -type DeleteServiceLinkedRoleInput struct { +// List of field-level encryption profiles. +type FieldLevelEncryptionProfileList struct { _ struct{} `type:"structure"` - // RoleName is a required field - RoleName *string `location:"uri" locationName:"RoleName" type:"string" required:"true"` + // The field-level encryption profile items. + Items []*FieldLevelEncryptionProfileSummary `locationNameList:"FieldLevelEncryptionProfileSummary" type:"list"` + + // The maximum number of field-level encryption profiles you want in the response + // body. + // + // MaxItems is a required field + MaxItems *int64 `type:"integer" required:"true"` + + // If there are more elements to be listed, this element is present and contains + // the value that you can use for the Marker request parameter to continue listing + // your profiles where you left off. + NextMarker *string `type:"string"` + + // The number of field-level encryption profiles. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s DeleteServiceLinkedRoleInput) String() string { +func (s FieldLevelEncryptionProfileList) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteServiceLinkedRoleInput) GoString() string { +func (s FieldLevelEncryptionProfileList) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceLinkedRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { - s.RoleName = &v +// SetItems sets the Items field's value. +func (s *FieldLevelEncryptionProfileList) SetItems(v []*FieldLevelEncryptionProfileSummary) *FieldLevelEncryptionProfileList { + s.Items = v return s } -type DeleteServiceLinkedRoleOutput struct { - _ struct{} `type:"structure"` +// SetMaxItems sets the MaxItems field's value. +func (s *FieldLevelEncryptionProfileList) SetMaxItems(v int64) *FieldLevelEncryptionProfileList { + s.MaxItems = &v + return s } -// String returns the string representation -func (s DeleteServiceLinkedRoleOutput) String() string { - return awsutil.Prettify(s) +// SetNextMarker sets the NextMarker field's value. +func (s *FieldLevelEncryptionProfileList) SetNextMarker(v string) *FieldLevelEncryptionProfileList { + s.NextMarker = &v + return s } -// GoString returns the string representation -func (s DeleteServiceLinkedRoleOutput) GoString() string { - return s.String() +// SetQuantity sets the Quantity field's value. +func (s *FieldLevelEncryptionProfileList) SetQuantity(v int64) *FieldLevelEncryptionProfileList { + s.Quantity = &v + return s } -// The request to delete a streaming distribution. -type DeleteStreamingDistributionInput struct { +// The field-level encryption profile summary. +type FieldLevelEncryptionProfileSummary struct { _ struct{} `type:"structure"` - // The distribution ID. + // An optional comment for the field-level encryption profile summary. + Comment *string `type:"string"` + + // A complex data type of encryption entities for the field-level encryption + // profile that include the public key ID, provider, and field patterns for + // specifying which fields to encrypt with this key. + // + // EncryptionEntities is a required field + EncryptionEntities *EncryptionEntities `type:"structure" required:"true"` + + // ID for the field-level encryption profile summary. // // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + Id *string `type:"string" required:"true"` - // The value of the ETag header that you received when you disabled the streaming - // distribution. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` + // The time when the the field-level encryption profile summary was last updated. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // Name for the field-level encryption profile summary. + // + // Name is a required field + Name *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteStreamingDistributionInput) String() string { +func (s FieldLevelEncryptionProfileSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteStreamingDistributionInput) GoString() string { +func (s FieldLevelEncryptionProfileSummary) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } +// SetComment sets the Comment field's value. +func (s *FieldLevelEncryptionProfileSummary) SetComment(v string) *FieldLevelEncryptionProfileSummary { + s.Comment = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetEncryptionEntities sets the EncryptionEntities field's value. +func (s *FieldLevelEncryptionProfileSummary) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileSummary { + s.EncryptionEntities = v + return s } // SetId sets the Id field's value. -func (s *DeleteStreamingDistributionInput) SetId(v string) *DeleteStreamingDistributionInput { +func (s *FieldLevelEncryptionProfileSummary) SetId(v string) *FieldLevelEncryptionProfileSummary { s.Id = &v return s } -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteStreamingDistributionInput) SetIfMatch(v string) *DeleteStreamingDistributionInput { - s.IfMatch = &v +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *FieldLevelEncryptionProfileSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfileSummary { + s.LastModifiedTime = &v return s } -type DeleteStreamingDistributionOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteStreamingDistributionOutput) GoString() string { - return s.String() +// SetName sets the Name field's value. +func (s *FieldLevelEncryptionProfileSummary) SetName(v string) *FieldLevelEncryptionProfileSummary { + s.Name = &v + return s } -// The distribution's information. -type Distribution struct { +// A summary of a field-level encryption item. +type FieldLevelEncryptionSummary struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, - // where 123456789012 is your AWS account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // CloudFront automatically adds this element to the response only if you've - // set up the distribution to serve private content with signed URLs. The element - // lists the key pair IDs that CloudFront is aware of for each trusted signer. - // The Signer child element lists the AWS account number of the trusted signer - // (or an empty Self element if the signer is you). The Signer element also - // includes the IDs of any active key pairs associated with the trusted signer's - // AWS account. If no KeyPairId element appears for a Signer, that signer can't - // create working signed URLs. - // - // ActiveTrustedSigners is a required field - ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"` - - // The current configuration information for the distribution. Send a GET request - // to the /CloudFront API version/distribution ID/config resource. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `type:"structure" required:"true"` + // An optional comment about the field-level encryption item. + Comment *string `type:"string"` - // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` + // A summary of a content type-profile mapping. + ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"` - // The identifier for the distribution. For example: EDFDVBD632BHDS5. + // The unique ID of a field-level encryption item. // // Id is a required field Id *string `type:"string" required:"true"` - // The number of invalidation batches currently in progress. - // - // InProgressInvalidationBatches is a required field - InProgressInvalidationBatches *int64 `type:"integer" required:"true"` - - // The date and time the distribution was last modified. + // The last time that the summary of field-level encryption items was modified. // // LastModifiedTime is a required field LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` - // This response element indicates the current status of the distribution. When - // the status is Deployed, the distribution's information is fully propagated - // to all CloudFront edge locations. - // - // Status is a required field - Status *string `type:"string" required:"true"` + // A summary of a query argument-profile mapping. + QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"` } // String returns the string representation -func (s Distribution) String() string { +func (s FieldLevelEncryptionSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Distribution) GoString() string { +func (s FieldLevelEncryptionSummary) GoString() string { return s.String() } -// SetARN sets the ARN field's value. -func (s *Distribution) SetARN(v string) *Distribution { - s.ARN = &v - return s -} - -// SetActiveTrustedSigners sets the ActiveTrustedSigners field's value. -func (s *Distribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *Distribution { - s.ActiveTrustedSigners = v - return s -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *Distribution) SetDistributionConfig(v *DistributionConfig) *Distribution { - s.DistributionConfig = v +// SetComment sets the Comment field's value. +func (s *FieldLevelEncryptionSummary) SetComment(v string) *FieldLevelEncryptionSummary { + s.Comment = &v return s } -// SetDomainName sets the DomainName field's value. -func (s *Distribution) SetDomainName(v string) *Distribution { - s.DomainName = &v +// SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value. +func (s *FieldLevelEncryptionSummary) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionSummary { + s.ContentTypeProfileConfig = v return s } // SetId sets the Id field's value. -func (s *Distribution) SetId(v string) *Distribution { +func (s *FieldLevelEncryptionSummary) SetId(v string) *FieldLevelEncryptionSummary { s.Id = &v return s } -// SetInProgressInvalidationBatches sets the InProgressInvalidationBatches field's value. -func (s *Distribution) SetInProgressInvalidationBatches(v int64) *Distribution { - s.InProgressInvalidationBatches = &v - return s -} - // SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *Distribution) SetLastModifiedTime(v time.Time) *Distribution { +func (s *FieldLevelEncryptionSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionSummary { s.LastModifiedTime = &v return s } -// SetStatus sets the Status field's value. -func (s *Distribution) SetStatus(v string) *Distribution { - s.Status = &v +// SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value. +func (s *FieldLevelEncryptionSummary) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionSummary { + s.QueryArgProfileConfig = v return s } -// A distribution configuration. -type DistributionConfig struct { +// A complex data type that includes the field patterns to match for field-level +// encryption. +type FieldPatterns struct { _ struct{} `type:"structure"` - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this distribution. - Aliases *Aliases `type:"structure"` - - // A complex type that contains zero or more CacheBehavior elements. - CacheBehaviors *CacheBehaviors `type:"structure"` + // An array of the field-level encryption field patterns. + Items []*string `locationNameList:"FieldPattern" type:"list"` - // A unique value (for example, a date-time stamp) that ensures that the request - // can't be replayed. - // - // If the value of CallerReference is new (regardless of the content of the - // DistributionConfig object), CloudFront creates a new distribution. - // - // If CallerReference is a value you already sent in a previous request to create - // a distribution, and if the content of the DistributionConfig is identical - // to the original request (ignoring white space), CloudFront returns the same - // the response that it returned to the original request. - // - // If CallerReference is a value you already sent in a previous request to create - // a distribution but the content of the DistributionConfig is different from - // the original request, CloudFront returns a DistributionAlreadyExists error. + // The number of field-level encryption field patterns. // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} - // Any comments you want to include about the distribution. - // - // If you don't want to specify a comment, include an empty Comment element. - // - // To delete an existing comment, update the distribution configuration and - // include an empty Comment element. - // - // To add or change a comment, update the distribution configuration and specify - // the new comment. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` +// String returns the string representation +func (s FieldPatterns) String() string { + return awsutil.Prettify(s) +} - // A complex type that controls the following: - // - // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range - // with custom error messages before returning the response to the viewer. - // - // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. - // - // For more information about custom error pages, see Customizing Error Responses - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) - // in the Amazon CloudFront Developer Guide. - CustomErrorResponses *CustomErrorResponses `type:"structure"` +// GoString returns the string representation +func (s FieldPatterns) GoString() string { + return s.String() +} - // A complex type that describes the default cache behavior if you don't specify - // a CacheBehavior element or if files don't match any of the values of PathPattern - // in CacheBehavior elements. You must create exactly one default cache behavior. - // - // DefaultCacheBehavior is a required field - DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *FieldPatterns) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FieldPatterns"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } - // The object that you want CloudFront to request from your origin (for example, - // index.html) when a viewer requests the root URL for your distribution (http://www.example.com) - // instead of an object in your distribution (http://www.example.com/product-description.html). - // Specifying a default root object avoids exposing the contents of your distribution. - // - // Specify only the object name, for example, index.html. Don't add a / before - // the object name. - // - // If you don't want to specify a default root object when you create a distribution, - // include an empty DefaultRootObject element. - // - // To delete the default root object from an existing distribution, update the - // distribution configuration and include an empty DefaultRootObject element. - // - // To replace the default root object, update the distribution configuration - // and specify the new object. - // - // For more information about the default root object, see Creating a Default - // Root Object (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) - // in the Amazon CloudFront Developer Guide. - DefaultRootObject *string `type:"string"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // From this field, you can enable or disable the selected distribution. - // - // If you specify false for Enabled but you specify values for Bucket and Prefix, - // the values are automatically deleted. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` +// SetItems sets the Items field's value. +func (s *FieldPatterns) SetItems(v []*string) *FieldPatterns { + s.Items = v + return s +} - // (Optional) Specify the maximum HTTP version that you want viewers to use - // to communicate with CloudFront. The default value for new web distributions - // is http2. Viewers that don't support HTTP/2 automatically use an earlier - // HTTP version. - // - // For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or - // later, and must support Server Name Identification (SNI). - // - // In general, configuring CloudFront to communicate with viewers using HTTP/2 - // reduces latency. You can improve performance by optimizing for HTTP/2. For - // more information, do an Internet search for "http/2 optimization." - HttpVersion *string `type:"string" enum:"HttpVersion"` +// SetQuantity sets the Quantity field's value. +func (s *FieldPatterns) SetQuantity(v int64) *FieldPatterns { + s.Quantity = &v + return s +} - // If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address - // for your distribution, specify true. If you specify false, CloudFront responds - // to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. - // This allows viewers to submit a second request, for an IPv4 address for your - // distribution. - // - // In general, you should enable IPv6 if you have users on IPv6 networks who - // want to access your content. However, if you're using signed URLs or signed - // cookies to restrict access to your content, and if you're using a custom - // policy that includes the IpAddress parameter to restrict the IP addresses - // that can access your content, don't enable IPv6. If you want to restrict - // access to some content by IP address and not restrict access to other content - // (or restrict access but not by IP address), you can create two distributions. - // For more information, see Creating a Signed URL Using a Custom Policy (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) +// A complex type that specifies how CloudFront handles query strings and cookies. +type ForwardedValues struct { + _ struct{} `type:"structure"` + + // A complex type that specifies whether you want CloudFront to forward cookies + // to the origin and, if so, which ones. For more information about forwarding + // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies + // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) // in the Amazon CloudFront Developer Guide. // - // If you're using an Amazon Route 53 alias resource record set to route traffic - // to your CloudFront distribution, you need to create a second alias resource - // record set when both of the following are true: - // - // * You enable IPv6 for the distribution + // Cookies is a required field + Cookies *CookiePreference `type:"structure" required:"true"` + + // A complex type that specifies the Headers, if any, that you want CloudFront + // to base caching on for this cache behavior. + Headers *Headers `type:"structure"` + + // Indicates whether you want CloudFront to forward query strings to the origin + // that is associated with this cache behavior and cache based on the query + // string parameters. CloudFront behavior depends on the value of QueryString + // and on the values that you specify for QueryStringCacheKeys, if any: // - // * You're using alternate domain names in the URLs for your objects + // If you specify true for QueryString and you don't specify any values for + // QueryStringCacheKeys, CloudFront forwards all query string parameters to + // the origin and caches based on all query string parameters. Depending on + // how many query string parameters and values you have, this can adversely + // affect performance because CloudFront must forward more requests to the origin. // - // For more information, see Routing Traffic to an Amazon CloudFront Web Distribution - // by Using Your Domain Name (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) - // in the Amazon Route 53 Developer Guide. + // If you specify true for QueryString and you specify one or more values for + // QueryStringCacheKeys, CloudFront forwards all query string parameters to + // the origin, but it only caches based on the query string parameters that + // you specify. // - // If you created a CNAME resource record set, either with Amazon Route 53 or - // with another DNS service, you don't need to make any changes. A CNAME record - // will route traffic to your distribution regardless of the IP address format - // of the viewer request. - IsIPV6Enabled *bool `type:"boolean"` - - // A complex type that controls whether access logs are written for the distribution. + // If you specify false for QueryString, CloudFront doesn't forward any query + // string parameters to the origin, and doesn't cache based on query string + // parameters. // - // For more information about logging, see Access Logs (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) + // For more information, see Configuring CloudFront to Cache Based on Query + // String Parameters (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) // in the Amazon CloudFront Developer Guide. - Logging *LoggingConfig `type:"structure"` - - // A complex type that contains information about origins for this distribution. // - // Origins is a required field - Origins *Origins `type:"structure" required:"true"` + // QueryString is a required field + QueryString *bool `type:"boolean" required:"true"` - // The price class that corresponds with the maximum price that you want to - // pay for CloudFront service. If you specify PriceClass_All, CloudFront responds - // to requests for your objects from all CloudFront edge locations. - // - // If you specify a price class other than PriceClass_All, CloudFront serves - // your objects from the CloudFront edge location that has the lowest latency - // among the edge locations in your price class. Viewers who are in or near - // regions that are excluded from your specified price class may encounter slower - // performance. - // - // For more information about price classes, see Choosing the Price Class for - // a CloudFront Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - // in the Amazon CloudFront Developer Guide. For information about CloudFront - // pricing, including how price classes map to CloudFront regions, see Amazon - // CloudFront Pricing (https://aws.amazon.com/cloudfront/pricing/). - PriceClass *string `type:"string" enum:"PriceClass"` + // A complex type that contains information about the query string parameters + // that you want CloudFront to use for caching for this cache behavior. + QueryStringCacheKeys *QueryStringCacheKeys `type:"structure"` +} - // A complex type that identifies ways in which you want to restrict distribution - // of your content. - Restrictions *Restrictions `type:"structure"` +// String returns the string representation +func (s ForwardedValues) String() string { + return awsutil.Prettify(s) +} - // A complex type that specifies the following: - // - // * Whether you want viewers to use HTTP or HTTPS to request your objects. - // - // * If you want viewers to use HTTPS, whether you're using an alternate - // domain name such as example.com or the CloudFront domain name for your - // distribution, such as d111111abcdef8.cloudfront.net. - // - // * If you're using an alternate domain name, whether AWS Certificate Manager - // (ACM) provided the certificate, or you purchased a certificate from a - // third-party certificate authority and imported it into ACM or uploaded - // it to the IAM certificate store. - // - // You must specify only one of the following values: - // - // * ViewerCertificate$ACMCertificateArn - // - // * ViewerCertificate$IAMCertificateId - // - // * ViewerCertificate$CloudFrontDefaultCertificate - // - // Don't specify false for CloudFrontDefaultCertificate. - // - // If you want viewers to use HTTP instead of HTTPS to request your objects: - // Specify the following value: - // - // true - // - // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache - // behaviors. - // - // If you want viewers to use HTTPS to request your objects: Choose the type - // of certificate that you want to use based on whether you're using an alternate - // domain name for your objects or the CloudFront domain name: - // - // * If you're using an alternate domain name, such as example.com: Specify - // one of the following values, depending on whether ACM provided your certificate - // or you purchased your certificate from third-party certificate authority: - // - // ARN for ACM SSL/TLS certificate where - // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate - // that you want to use for this distribution. - // - // IAM certificate ID where IAM certificate - // ID is the ID that IAM returned when you added the certificate to the IAM - // certificate store. - // - // If you specify ACMCertificateArn or IAMCertificateId, you must also specify - // a value for SSLSupportMethod. - // - // If you choose to use an ACM certificate or a certificate in the IAM certificate - // store, we recommend that you use only an alternate domain name in your - // object URLs (https://example.com/logo.jpg). If you use the domain name - // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) - // and the viewer supports SNI, then CloudFront behaves normally. However, - // if the browser does not support SNI, the user's experience depends on - // the value that you choose for SSLSupportMethod: - // - // vip: The viewer displays a warning because there is a mismatch between the - // CloudFront domain name and the domain name in your SSL/TLS certificate. - // - // sni-only: CloudFront drops the connection with the browser without returning - // the object. - // - // * If you're using the CloudFront domain name for your distribution, such - // as d111111abcdef8.cloudfront.net: Specify the following value: - // - // true - // - // If you want viewers to use HTTPS, you must also specify one of the following - // values in your cache behaviors: +// GoString returns the string representation +func (s ForwardedValues) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ForwardedValues) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"} + if s.Cookies == nil { + invalidParams.Add(request.NewErrParamRequired("Cookies")) + } + if s.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + if s.Cookies != nil { + if err := s.Cookies.Validate(); err != nil { + invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams)) + } + } + if s.Headers != nil { + if err := s.Headers.Validate(); err != nil { + invalidParams.AddNested("Headers", err.(request.ErrInvalidParams)) + } + } + if s.QueryStringCacheKeys != nil { + if err := s.QueryStringCacheKeys.Validate(); err != nil { + invalidParams.AddNested("QueryStringCacheKeys", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCookies sets the Cookies field's value. +func (s *ForwardedValues) SetCookies(v *CookiePreference) *ForwardedValues { + s.Cookies = v + return s +} + +// SetHeaders sets the Headers field's value. +func (s *ForwardedValues) SetHeaders(v *Headers) *ForwardedValues { + s.Headers = v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *ForwardedValues) SetQueryString(v bool) *ForwardedValues { + s.QueryString = &v + return s +} + +// SetQueryStringCacheKeys sets the QueryStringCacheKeys field's value. +func (s *ForwardedValues) SetQueryStringCacheKeys(v *QueryStringCacheKeys) *ForwardedValues { + s.QueryStringCacheKeys = v + return s +} + +// A complex type that controls the countries in which your content is distributed. +// CloudFront determines the location of your users using MaxMind GeoIP databases. +type GeoRestriction struct { + _ struct{} `type:"structure"` + + // A complex type that contains a Location element for each country in which + // you want CloudFront either to distribute your content (whitelist) or not + // distribute your content (blacklist). // - // * https-only + // The Location element is a two-letter, uppercase country code for a country + // that you want to include in your blacklist or whitelist. Include one Location + // element for each country. // - // * redirect-to-https + // CloudFront and MaxMind both use ISO 3166 country codes. For the current list + // of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on + // the International Organization for Standardization website. You can also + // refer to the country list on the CloudFront console, which includes both + // country names and codes. + Items []*string `locationNameList:"Location" type:"list"` + + // When geo restriction is enabled, this is the number of countries in your + // whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0, + // and you can omit Items. // - // You can also optionally require that CloudFront use HTTPS to communicate - // with your origin by specifying one of the following values for the applicable - // origins: + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` + + // The method that you want to use to restrict distribution of your content + // by country: // - // * https-only + // * none: No geo restriction is enabled, meaning access to content is not + // restricted by client geo location. // - // * match-viewer + // * blacklist: The Location elements specify the countries in which you + // don't want CloudFront to distribute your content. // - // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) - // in the Amazon CloudFront Developer Guide. - ViewerCertificate *ViewerCertificate `type:"structure"` - - // A unique identifier that specifies the AWS WAF web ACL, if any, to associate - // with this distribution. + // * whitelist: The Location elements specify the countries in which you + // want CloudFront to distribute your content. // - // AWS WAF is a web application firewall that lets you monitor the HTTP and - // HTTPS requests that are forwarded to CloudFront, and lets you control access - // to your content. Based on conditions that you specify, such as the IP addresses - // that requests originate from or the values of query strings, CloudFront responds - // to requests either with the requested content or with an HTTP 403 status - // code (Forbidden). You can also configure CloudFront to return a custom error - // page when a request is blocked. For more information about AWS WAF, see the - // AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). - WebACLId *string `type:"string"` + // RestrictionType is a required field + RestrictionType *string `type:"string" required:"true" enum:"GeoRestrictionType"` } // String returns the string representation -func (s DistributionConfig) String() string { +func (s GeoRestriction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DistributionConfig) GoString() string { +func (s GeoRestriction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DistributionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.DefaultCacheBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Origins == nil { - invalidParams.Add(request.NewErrParamRequired("Origins")) +func (s *GeoRestriction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) } - if s.Aliases != nil { - if err := s.Aliases.Validate(); err != nil { - invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) - } + if s.RestrictionType == nil { + invalidParams.Add(request.NewErrParamRequired("RestrictionType")) } - if s.CacheBehaviors != nil { - if err := s.CacheBehaviors.Validate(); err != nil { - invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams)) - } + + if invalidParams.Len() > 0 { + return invalidParams } - if s.CustomErrorResponses != nil { - if err := s.CustomErrorResponses.Validate(); err != nil { - invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams)) - } + return nil +} + +// SetItems sets the Items field's value. +func (s *GeoRestriction) SetItems(v []*string) *GeoRestriction { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *GeoRestriction) SetQuantity(v int64) *GeoRestriction { + s.Quantity = &v + return s +} + +// SetRestrictionType sets the RestrictionType field's value. +func (s *GeoRestriction) SetRestrictionType(v string) *GeoRestriction { + s.RestrictionType = &v + return s +} + +// The origin access identity's configuration information. For more information, +// see CloudFrontOriginAccessIdentityConfigComplexType. +type GetCloudFrontOriginAccessIdentityConfigInput struct { + _ struct{} `type:"structure"` + + // The identity's ID. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCloudFrontOriginAccessIdentityConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } - if s.DefaultCacheBehavior != nil { - if err := s.DefaultCacheBehavior.Validate(); err != nil { - invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams)) - } + + if invalidParams.Len() > 0 { + return invalidParams } - if s.Logging != nil { - if err := s.Logging.Validate(); err != nil { - invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) - } + return nil +} + +// SetId sets the Id field's value. +func (s *GetCloudFrontOriginAccessIdentityConfigInput) SetId(v string) *GetCloudFrontOriginAccessIdentityConfigInput { + s.Id = &v + return s +} + +// The returned result of the corresponding request. +type GetCloudFrontOriginAccessIdentityConfigOutput struct { + _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` + + // The origin access identity's configuration information. + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` + + // The current version of the configuration. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` +} + +// String returns the string representation +func (s GetCloudFrontOriginAccessIdentityConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFrontOriginAccessIdentityConfigOutput) GoString() string { + return s.String() +} + +// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. +func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *GetCloudFrontOriginAccessIdentityConfigOutput { + s.CloudFrontOriginAccessIdentityConfig = v + return s +} + +// SetETag sets the ETag field's value. +func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityConfigOutput { + s.ETag = &v + return s +} + +// The request to get an origin access identity's information. +type GetCloudFrontOriginAccessIdentityInput struct { + _ struct{} `type:"structure"` + + // The identity's ID. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCloudFrontOriginAccessIdentityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFrontOriginAccessIdentityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } - if s.Origins != nil { - if err := s.Origins.Validate(); err != nil { - invalidParams.AddNested("Origins", err.(request.ErrInvalidParams)) - } + + if invalidParams.Len() > 0 { + return invalidParams } - if s.Restrictions != nil { - if err := s.Restrictions.Validate(); err != nil { - invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams)) - } + return nil +} + +// SetId sets the Id field's value. +func (s *GetCloudFrontOriginAccessIdentityInput) SetId(v string) *GetCloudFrontOriginAccessIdentityInput { + s.Id = &v + return s +} + +// The returned result of the corresponding request. +type GetCloudFrontOriginAccessIdentityOutput struct { + _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` + + // The origin access identity's information. + CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` + + // The current version of the origin access identity's information. For example: + // E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` +} + +// String returns the string representation +func (s GetCloudFrontOriginAccessIdentityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFrontOriginAccessIdentityOutput) GoString() string { + return s.String() +} + +// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. +func (s *GetCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *GetCloudFrontOriginAccessIdentityOutput { + s.CloudFrontOriginAccessIdentity = v + return s +} + +// SetETag sets the ETag field's value. +func (s *GetCloudFrontOriginAccessIdentityOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityOutput { + s.ETag = &v + return s +} + +// The request to get a distribution configuration. +type GetDistributionConfigInput struct { + _ struct{} `type:"structure"` + + // The distribution's ID. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDistributionConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDistributionConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDistributionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { @@ -5821,146 +9753,141 @@ func (s *DistributionConfig) Validate() error { return nil } -// SetAliases sets the Aliases field's value. -func (s *DistributionConfig) SetAliases(v *Aliases) *DistributionConfig { - s.Aliases = v +// SetId sets the Id field's value. +func (s *GetDistributionConfigInput) SetId(v string) *GetDistributionConfigInput { + s.Id = &v return s } -// SetCacheBehaviors sets the CacheBehaviors field's value. -func (s *DistributionConfig) SetCacheBehaviors(v *CacheBehaviors) *DistributionConfig { - s.CacheBehaviors = v - return s +// The returned result of the corresponding request. +type GetDistributionConfigOutput struct { + _ struct{} `type:"structure" payload:"DistributionConfig"` + + // The distribution's configuration information. + DistributionConfig *DistributionConfig `type:"structure"` + + // The current version of the configuration. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` } -// SetCallerReference sets the CallerReference field's value. -func (s *DistributionConfig) SetCallerReference(v string) *DistributionConfig { - s.CallerReference = &v - return s +// String returns the string representation +func (s GetDistributionConfigOutput) String() string { + return awsutil.Prettify(s) } -// SetComment sets the Comment field's value. -func (s *DistributionConfig) SetComment(v string) *DistributionConfig { - s.Comment = &v - return s +// GoString returns the string representation +func (s GetDistributionConfigOutput) GoString() string { + return s.String() } -// SetCustomErrorResponses sets the CustomErrorResponses field's value. -func (s *DistributionConfig) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionConfig { - s.CustomErrorResponses = v +// SetDistributionConfig sets the DistributionConfig field's value. +func (s *GetDistributionConfigOutput) SetDistributionConfig(v *DistributionConfig) *GetDistributionConfigOutput { + s.DistributionConfig = v return s } -// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. -func (s *DistributionConfig) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionConfig { - s.DefaultCacheBehavior = v +// SetETag sets the ETag field's value. +func (s *GetDistributionConfigOutput) SetETag(v string) *GetDistributionConfigOutput { + s.ETag = &v return s } -// SetDefaultRootObject sets the DefaultRootObject field's value. -func (s *DistributionConfig) SetDefaultRootObject(v string) *DistributionConfig { - s.DefaultRootObject = &v - return s +// The request to get a distribution's information. +type GetDistributionInput struct { + _ struct{} `type:"structure"` + + // The distribution's ID. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } -// SetEnabled sets the Enabled field's value. -func (s *DistributionConfig) SetEnabled(v bool) *DistributionConfig { - s.Enabled = &v - return s +// String returns the string representation +func (s GetDistributionInput) String() string { + return awsutil.Prettify(s) } -// SetHttpVersion sets the HttpVersion field's value. -func (s *DistributionConfig) SetHttpVersion(v string) *DistributionConfig { - s.HttpVersion = &v - return s +// GoString returns the string representation +func (s GetDistributionInput) GoString() string { + return s.String() } -// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. -func (s *DistributionConfig) SetIsIPV6Enabled(v bool) *DistributionConfig { - s.IsIPV6Enabled = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetLogging sets the Logging field's value. -func (s *DistributionConfig) SetLogging(v *LoggingConfig) *DistributionConfig { - s.Logging = v +// SetId sets the Id field's value. +func (s *GetDistributionInput) SetId(v string) *GetDistributionInput { + s.Id = &v return s } -// SetOrigins sets the Origins field's value. -func (s *DistributionConfig) SetOrigins(v *Origins) *DistributionConfig { - s.Origins = v - return s +// The returned result of the corresponding request. +type GetDistributionOutput struct { + _ struct{} `type:"structure" payload:"Distribution"` + + // The distribution's information. + Distribution *Distribution `type:"structure"` + + // The current version of the distribution's information. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` } -// SetPriceClass sets the PriceClass field's value. -func (s *DistributionConfig) SetPriceClass(v string) *DistributionConfig { - s.PriceClass = &v - return s +// String returns the string representation +func (s GetDistributionOutput) String() string { + return awsutil.Prettify(s) } -// SetRestrictions sets the Restrictions field's value. -func (s *DistributionConfig) SetRestrictions(v *Restrictions) *DistributionConfig { - s.Restrictions = v - return s +// GoString returns the string representation +func (s GetDistributionOutput) GoString() string { + return s.String() } -// SetViewerCertificate sets the ViewerCertificate field's value. -func (s *DistributionConfig) SetViewerCertificate(v *ViewerCertificate) *DistributionConfig { - s.ViewerCertificate = v +// SetDistribution sets the Distribution field's value. +func (s *GetDistributionOutput) SetDistribution(v *Distribution) *GetDistributionOutput { + s.Distribution = v return s } -// SetWebACLId sets the WebACLId field's value. -func (s *DistributionConfig) SetWebACLId(v string) *DistributionConfig { - s.WebACLId = &v +// SetETag sets the ETag field's value. +func (s *GetDistributionOutput) SetETag(v string) *GetDistributionOutput { + s.ETag = &v return s } -// A distribution Configuration and a list of tags to be associated with the -// distribution. -type DistributionConfigWithTags struct { +type GetFieldLevelEncryptionConfigInput struct { _ struct{} `type:"structure"` - // A distribution configuration. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `type:"structure" required:"true"` - - // A complex type that contains zero or more Tag elements. + // Request the ID for the field-level encryption configuration information. // - // Tags is a required field - Tags *Tags `type:"structure" required:"true"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } // String returns the string representation -func (s DistributionConfigWithTags) String() string { +func (s GetFieldLevelEncryptionConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DistributionConfigWithTags) GoString() string { +func (s GetFieldLevelEncryptionConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DistributionConfigWithTags) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DistributionConfigWithTags"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - if err := s.Tags.Validate(); err != nil { - invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) - } +func (s *GetFieldLevelEncryptionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { @@ -5969,488 +9896,500 @@ func (s *DistributionConfigWithTags) Validate() error { return nil } -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *DistributionConfigWithTags) SetDistributionConfig(v *DistributionConfig) *DistributionConfigWithTags { - s.DistributionConfig = v +// SetId sets the Id field's value. +func (s *GetFieldLevelEncryptionConfigInput) SetId(v string) *GetFieldLevelEncryptionConfigInput { + s.Id = &v return s } -// SetTags sets the Tags field's value. -func (s *DistributionConfigWithTags) SetTags(v *Tags) *DistributionConfigWithTags { - s.Tags = v - return s -} +type GetFieldLevelEncryptionConfigOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"` -// A distribution list. -type DistributionList struct { - _ struct{} `type:"structure"` + // The current version of the field level encryption configuration. For example: + // E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` - // A flag that indicates whether more distributions remain to be listed. If - // your results were truncated, you can make a follow-up pagination request - // using the Marker request parameter to retrieve more distributions in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` + // Return the field-level encryption configuration information. + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `type:"structure"` +} - // A complex type that contains one DistributionSummary element for each distribution - // that was created by the current AWS account. - Items []*DistributionSummary `locationNameList:"DistributionSummary" type:"list"` +// String returns the string representation +func (s GetFieldLevelEncryptionConfigOutput) String() string { + return awsutil.Prettify(s) +} - // The value you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` +// GoString returns the string representation +func (s GetFieldLevelEncryptionConfigOutput) GoString() string { + return s.String() +} - // The value you provided for the MaxItems request parameter. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` +// SetETag sets the ETag field's value. +func (s *GetFieldLevelEncryptionConfigOutput) SetETag(v string) *GetFieldLevelEncryptionConfigOutput { + s.ETag = &v + return s +} + +// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. +func (s *GetFieldLevelEncryptionConfigOutput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *GetFieldLevelEncryptionConfigOutput { + s.FieldLevelEncryptionConfig = v + return s +} - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your distributions - // where they left off. - NextMarker *string `type:"string"` +type GetFieldLevelEncryptionInput struct { + _ struct{} `type:"structure"` - // The number of distributions that were created by the current AWS account. + // Request the ID for the field-level encryption configuration information. // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } // String returns the string representation -func (s DistributionList) String() string { +func (s GetFieldLevelEncryptionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DistributionList) GoString() string { +func (s GetFieldLevelEncryptionInput) GoString() string { return s.String() } -// SetIsTruncated sets the IsTruncated field's value. -func (s *DistributionList) SetIsTruncated(v bool) *DistributionList { - s.IsTruncated = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFieldLevelEncryptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetItems sets the Items field's value. -func (s *DistributionList) SetItems(v []*DistributionSummary) *DistributionList { - s.Items = v +// SetId sets the Id field's value. +func (s *GetFieldLevelEncryptionInput) SetId(v string) *GetFieldLevelEncryptionInput { + s.Id = &v return s } -// SetMarker sets the Marker field's value. -func (s *DistributionList) SetMarker(v string) *DistributionList { - s.Marker = &v - return s +type GetFieldLevelEncryptionOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryption"` + + // The current version of the field level encryption configuration. For example: + // E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Return the field-level encryption configuration information. + FieldLevelEncryption *FieldLevelEncryption `type:"structure"` } -// SetMaxItems sets the MaxItems field's value. -func (s *DistributionList) SetMaxItems(v int64) *DistributionList { - s.MaxItems = &v - return s +// String returns the string representation +func (s GetFieldLevelEncryptionOutput) String() string { + return awsutil.Prettify(s) } -// SetNextMarker sets the NextMarker field's value. -func (s *DistributionList) SetNextMarker(v string) *DistributionList { - s.NextMarker = &v +// GoString returns the string representation +func (s GetFieldLevelEncryptionOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *GetFieldLevelEncryptionOutput) SetETag(v string) *GetFieldLevelEncryptionOutput { + s.ETag = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *DistributionList) SetQuantity(v int64) *DistributionList { - s.Quantity = &v +// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. +func (s *GetFieldLevelEncryptionOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *GetFieldLevelEncryptionOutput { + s.FieldLevelEncryption = v return s } -// A summary of the information about a CloudFront distribution. -type DistributionSummary struct { +type GetFieldLevelEncryptionProfileConfigInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, - // where 123456789012 is your AWS account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this distribution. - // - // Aliases is a required field - Aliases *Aliases `type:"structure" required:"true"` - - // A complex type that contains zero or more CacheBehavior elements. - // - // CacheBehaviors is a required field - CacheBehaviors *CacheBehaviors `type:"structure" required:"true"` - - // The comment originally specified when this distribution was created. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // A complex type that contains zero or more CustomErrorResponses elements. - // - // CustomErrorResponses is a required field - CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"` - - // A complex type that describes the default cache behavior if you don't specify - // a CacheBehavior element or if files don't match any of the values of PathPattern - // in CacheBehavior elements. You must create exactly one default cache behavior. + // Get the ID for the field-level encryption profile configuration information. // - // DefaultCacheBehavior is a required field - DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` +} - // The domain name that corresponds to the distribution, for example, d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` +// String returns the string representation +func (s GetFieldLevelEncryptionProfileConfigInput) String() string { + return awsutil.Prettify(s) +} - // Whether the distribution is enabled to accept user requests for content. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` +// GoString returns the string representation +func (s GetFieldLevelEncryptionProfileConfigInput) GoString() string { + return s.String() +} - // Specify the maximum HTTP version that you want viewers to use to communicate - // with CloudFront. The default value for new web distributions is http2. Viewers - // that don't support HTTP/2 will automatically use an earlier version. - // - // HttpVersion is a required field - HttpVersion *string `type:"string" required:"true" enum:"HttpVersion"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFieldLevelEncryptionProfileConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } - // The identifier for the distribution. For example: EDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for - // your distribution. - // - // IsIPV6Enabled is a required field - IsIPV6Enabled *bool `type:"boolean" required:"true"` +// SetId sets the Id field's value. +func (s *GetFieldLevelEncryptionProfileConfigInput) SetId(v string) *GetFieldLevelEncryptionProfileConfigInput { + s.Id = &v + return s +} - // The date and time the distribution was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` +type GetFieldLevelEncryptionProfileConfigOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"` - // A complex type that contains information about origins for this distribution. - // - // Origins is a required field - Origins *Origins `type:"structure" required:"true"` + // The current version of the field-level encryption profile configuration result. + // For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` - // PriceClass is a required field - PriceClass *string `type:"string" required:"true" enum:"PriceClass"` + // Return the field-level encryption profile configuration information. + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `type:"structure"` +} - // A complex type that identifies ways in which you want to restrict distribution - // of your content. - // - // Restrictions is a required field - Restrictions *Restrictions `type:"structure" required:"true"` +// String returns the string representation +func (s GetFieldLevelEncryptionProfileConfigOutput) String() string { + return awsutil.Prettify(s) +} - // The current status of the distribution. When the status is Deployed, the - // distribution's information is propagated to all CloudFront edge locations. - // - // Status is a required field - Status *string `type:"string" required:"true"` +// GoString returns the string representation +func (s GetFieldLevelEncryptionProfileConfigOutput) GoString() string { + return s.String() +} - // A complex type that specifies the following: - // - // * Whether you want viewers to use HTTP or HTTPS to request your objects. - // - // * If you want viewers to use HTTPS, whether you're using an alternate - // domain name such as example.com or the CloudFront domain name for your - // distribution, such as d111111abcdef8.cloudfront.net. - // - // * If you're using an alternate domain name, whether AWS Certificate Manager - // (ACM) provided the certificate, or you purchased a certificate from a - // third-party certificate authority and imported it into ACM or uploaded - // it to the IAM certificate store. - // - // You must specify only one of the following values: - // - // * ViewerCertificate$ACMCertificateArn - // - // * ViewerCertificate$IAMCertificateId - // - // * ViewerCertificate$CloudFrontDefaultCertificate - // - // Don't specify false for CloudFrontDefaultCertificate. - // - // If you want viewers to use HTTP instead of HTTPS to request your objects: - // Specify the following value: - // - // true - // - // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache - // behaviors. - // - // If you want viewers to use HTTPS to request your objects: Choose the type - // of certificate that you want to use based on whether you're using an alternate - // domain name for your objects or the CloudFront domain name: - // - // * If you're using an alternate domain name, such as example.com: Specify - // one of the following values, depending on whether ACM provided your certificate - // or you purchased your certificate from third-party certificate authority: - // - // ARN for ACM SSL/TLS certificate where - // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate - // that you want to use for this distribution. - // - // IAM certificate ID where IAM certificate - // ID is the ID that IAM returned when you added the certificate to the IAM - // certificate store. - // - // If you specify ACMCertificateArn or IAMCertificateId, you must also specify - // a value for SSLSupportMethod. - // - // If you choose to use an ACM certificate or a certificate in the IAM certificate - // store, we recommend that you use only an alternate domain name in your - // object URLs (https://example.com/logo.jpg). If you use the domain name - // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg) - // and the viewer supports SNI, then CloudFront behaves normally. However, - // if the browser does not support SNI, the user's experience depends on - // the value that you choose for SSLSupportMethod: - // - // vip: The viewer displays a warning because there is a mismatch between the - // CloudFront domain name and the domain name in your SSL/TLS certificate. - // - // sni-only: CloudFront drops the connection with the browser without returning - // the object. - // - // * If you're using the CloudFront domain name for your distribution, such - // as d111111abcdef8.cloudfront.net: Specify the following value: - // - // true - // - // If you want viewers to use HTTPS, you must also specify one of the following - // values in your cache behaviors: - // - // * https-only - // - // * redirect-to-https - // - // You can also optionally require that CloudFront use HTTPS to communicate - // with your origin by specifying one of the following values for the applicable - // origins: - // - // * https-only - // - // * match-viewer - // - // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS) - // in the Amazon CloudFront Developer Guide. - // - // ViewerCertificate is a required field - ViewerCertificate *ViewerCertificate `type:"structure" required:"true"` +// SetETag sets the ETag field's value. +func (s *GetFieldLevelEncryptionProfileConfigOutput) SetETag(v string) *GetFieldLevelEncryptionProfileConfigOutput { + s.ETag = &v + return s +} - // The Web ACL Id (if any) associated with the distribution. +// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. +func (s *GetFieldLevelEncryptionProfileConfigOutput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *GetFieldLevelEncryptionProfileConfigOutput { + s.FieldLevelEncryptionProfileConfig = v + return s +} + +type GetFieldLevelEncryptionProfileInput struct { + _ struct{} `type:"structure"` + + // Get the ID for the field-level encryption profile information. // - // WebACLId is a required field - WebACLId *string `type:"string" required:"true"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } // String returns the string representation -func (s DistributionSummary) String() string { +func (s GetFieldLevelEncryptionProfileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DistributionSummary) GoString() string { +func (s GetFieldLevelEncryptionProfileInput) GoString() string { return s.String() } -// SetARN sets the ARN field's value. -func (s *DistributionSummary) SetARN(v string) *DistributionSummary { - s.ARN = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFieldLevelEncryptionProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetAliases sets the Aliases field's value. -func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary { - s.Aliases = v +// SetId sets the Id field's value. +func (s *GetFieldLevelEncryptionProfileInput) SetId(v string) *GetFieldLevelEncryptionProfileInput { + s.Id = &v return s } -// SetCacheBehaviors sets the CacheBehaviors field's value. -func (s *DistributionSummary) SetCacheBehaviors(v *CacheBehaviors) *DistributionSummary { - s.CacheBehaviors = v - return s +type GetFieldLevelEncryptionProfileOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` + + // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Return the field-level encryption profile information. + FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"` } -// SetComment sets the Comment field's value. -func (s *DistributionSummary) SetComment(v string) *DistributionSummary { - s.Comment = &v - return s +// String returns the string representation +func (s GetFieldLevelEncryptionProfileOutput) String() string { + return awsutil.Prettify(s) } -// SetCustomErrorResponses sets the CustomErrorResponses field's value. -func (s *DistributionSummary) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionSummary { - s.CustomErrorResponses = v - return s +// GoString returns the string representation +func (s GetFieldLevelEncryptionProfileOutput) GoString() string { + return s.String() } -// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. -func (s *DistributionSummary) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionSummary { - s.DefaultCacheBehavior = v +// SetETag sets the ETag field's value. +func (s *GetFieldLevelEncryptionProfileOutput) SetETag(v string) *GetFieldLevelEncryptionProfileOutput { + s.ETag = &v return s } -// SetDomainName sets the DomainName field's value. -func (s *DistributionSummary) SetDomainName(v string) *DistributionSummary { - s.DomainName = &v +// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. +func (s *GetFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *GetFieldLevelEncryptionProfileOutput { + s.FieldLevelEncryptionProfile = v return s } -// SetEnabled sets the Enabled field's value. -func (s *DistributionSummary) SetEnabled(v bool) *DistributionSummary { - s.Enabled = &v - return s +// The request to get an invalidation's information. +type GetInvalidationInput struct { + _ struct{} `type:"structure"` + + // The distribution's ID. + // + // DistributionId is a required field + DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` + + // The identifier for the invalidation request, for example, IDFDVBD632BHDS5. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } -// SetHttpVersion sets the HttpVersion field's value. -func (s *DistributionSummary) SetHttpVersion(v string) *DistributionSummary { - s.HttpVersion = &v +// String returns the string representation +func (s GetInvalidationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInvalidationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetInvalidationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"} + if s.DistributionId == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDistributionId sets the DistributionId field's value. +func (s *GetInvalidationInput) SetDistributionId(v string) *GetInvalidationInput { + s.DistributionId = &v return s } // SetId sets the Id field's value. -func (s *DistributionSummary) SetId(v string) *DistributionSummary { +func (s *GetInvalidationInput) SetId(v string) *GetInvalidationInput { s.Id = &v return s } -// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. -func (s *DistributionSummary) SetIsIPV6Enabled(v bool) *DistributionSummary { - s.IsIPV6Enabled = &v - return s +// The returned result of the corresponding request. +type GetInvalidationOutput struct { + _ struct{} `type:"structure" payload:"Invalidation"` + + // The invalidation's information. For more information, see Invalidation Complex + // Type (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/InvalidationDatatype.html). + Invalidation *Invalidation `type:"structure"` } -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DistributionSummary) SetLastModifiedTime(v time.Time) *DistributionSummary { - s.LastModifiedTime = &v - return s +// String returns the string representation +func (s GetInvalidationOutput) String() string { + return awsutil.Prettify(s) } -// SetOrigins sets the Origins field's value. -func (s *DistributionSummary) SetOrigins(v *Origins) *DistributionSummary { - s.Origins = v - return s +// GoString returns the string representation +func (s GetInvalidationOutput) GoString() string { + return s.String() } -// SetPriceClass sets the PriceClass field's value. -func (s *DistributionSummary) SetPriceClass(v string) *DistributionSummary { - s.PriceClass = &v +// SetInvalidation sets the Invalidation field's value. +func (s *GetInvalidationOutput) SetInvalidation(v *Invalidation) *GetInvalidationOutput { + s.Invalidation = v return s } -// SetRestrictions sets the Restrictions field's value. -func (s *DistributionSummary) SetRestrictions(v *Restrictions) *DistributionSummary { - s.Restrictions = v - return s +type GetPublicKeyConfigInput struct { + _ struct{} `type:"structure"` + + // Request the ID for the public key configuration. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } -// SetStatus sets the Status field's value. -func (s *DistributionSummary) SetStatus(v string) *DistributionSummary { - s.Status = &v +// String returns the string representation +func (s GetPublicKeyConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicKeyConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPublicKeyConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *GetPublicKeyConfigInput) SetId(v string) *GetPublicKeyConfigInput { + s.Id = &v return s } -// SetViewerCertificate sets the ViewerCertificate field's value. -func (s *DistributionSummary) SetViewerCertificate(v *ViewerCertificate) *DistributionSummary { - s.ViewerCertificate = v +type GetPublicKeyConfigOutput struct { + _ struct{} `type:"structure" payload:"PublicKeyConfig"` + + // The current version of the public key configuration. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Return the result for the public key configuration. + PublicKeyConfig *PublicKeyConfig `type:"structure"` +} + +// String returns the string representation +func (s GetPublicKeyConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicKeyConfigOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *GetPublicKeyConfigOutput) SetETag(v string) *GetPublicKeyConfigOutput { + s.ETag = &v return s } -// SetWebACLId sets the WebACLId field's value. -func (s *DistributionSummary) SetWebACLId(v string) *DistributionSummary { - s.WebACLId = &v +// SetPublicKeyConfig sets the PublicKeyConfig field's value. +func (s *GetPublicKeyConfigOutput) SetPublicKeyConfig(v *PublicKeyConfig) *GetPublicKeyConfigOutput { + s.PublicKeyConfig = v return s } -// A complex type that specifies how CloudFront handles query strings and cookies. -type ForwardedValues struct { +type GetPublicKeyInput struct { _ struct{} `type:"structure"` - // A complex type that specifies whether you want CloudFront to forward cookies - // to the origin and, if so, which ones. For more information about forwarding - // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) - // in the Amazon CloudFront Developer Guide. + // Request the ID for the public key. // - // Cookies is a required field - Cookies *CookiePreference `type:"structure" required:"true"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` +} - // A complex type that specifies the Headers, if any, that you want CloudFront - // to base caching on for this cache behavior. - Headers *Headers `type:"structure"` +// String returns the string representation +func (s GetPublicKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *GetPublicKeyInput) SetId(v string) *GetPublicKeyInput { + s.Id = &v + return s +} + +type GetPublicKeyOutput struct { + _ struct{} `type:"structure" payload:"PublicKey"` + + // The current version of the public key. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Return the public key. + PublicKey *PublicKey `type:"structure"` +} + +// String returns the string representation +func (s GetPublicKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicKeyOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *GetPublicKeyOutput) SetETag(v string) *GetPublicKeyOutput { + s.ETag = &v + return s +} + +// SetPublicKey sets the PublicKey field's value. +func (s *GetPublicKeyOutput) SetPublicKey(v *PublicKey) *GetPublicKeyOutput { + s.PublicKey = v + return s +} + +// To request to get a streaming distribution configuration. +type GetStreamingDistributionConfigInput struct { + _ struct{} `type:"structure"` - // Indicates whether you want CloudFront to forward query strings to the origin - // that is associated with this cache behavior and cache based on the query - // string parameters. CloudFront behavior depends on the value of QueryString - // and on the values that you specify for QueryStringCacheKeys, if any: - // - // If you specify true for QueryString and you don't specify any values for - // QueryStringCacheKeys, CloudFront forwards all query string parameters to - // the origin and caches based on all query string parameters. Depending on - // how many query string parameters and values you have, this can adversely - // affect performance because CloudFront must forward more requests to the origin. - // - // If you specify true for QueryString and you specify one or more values for - // QueryStringCacheKeys, CloudFront forwards all query string parameters to - // the origin, but it only caches based on the query string parameters that - // you specify. - // - // If you specify false for QueryString, CloudFront doesn't forward any query - // string parameters to the origin, and doesn't cache based on query string - // parameters. - // - // For more information, see Configuring CloudFront to Cache Based on Query - // String Parameters (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) - // in the Amazon CloudFront Developer Guide. + // The streaming distribution's ID. // - // QueryString is a required field - QueryString *bool `type:"boolean" required:"true"` - - // A complex type that contains information about the query string parameters - // that you want CloudFront to use for caching for this cache behavior. - QueryStringCacheKeys *QueryStringCacheKeys `type:"structure"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } // String returns the string representation -func (s ForwardedValues) String() string { +func (s GetStreamingDistributionConfigInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ForwardedValues) GoString() string { +func (s GetStreamingDistributionConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ForwardedValues) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"} - if s.Cookies == nil { - invalidParams.Add(request.NewErrParamRequired("Cookies")) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.Cookies != nil { - if err := s.Cookies.Validate(); err != nil { - invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams)) - } - } - if s.Headers != nil { - if err := s.Headers.Validate(); err != nil { - invalidParams.AddNested("Headers", err.(request.ErrInvalidParams)) - } - } - if s.QueryStringCacheKeys != nil { - if err := s.QueryStringCacheKeys.Validate(); err != nil { - invalidParams.AddNested("QueryStringCacheKeys", err.(request.ErrInvalidParams)) - } +func (s *GetStreamingDistributionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { @@ -6459,91 +10398,70 @@ func (s *ForwardedValues) Validate() error { return nil } -// SetCookies sets the Cookies field's value. -func (s *ForwardedValues) SetCookies(v *CookiePreference) *ForwardedValues { - s.Cookies = v +// SetId sets the Id field's value. +func (s *GetStreamingDistributionConfigInput) SetId(v string) *GetStreamingDistributionConfigInput { + s.Id = &v return s } -// SetHeaders sets the Headers field's value. -func (s *ForwardedValues) SetHeaders(v *Headers) *ForwardedValues { - s.Headers = v - return s +// The returned result of the corresponding request. +type GetStreamingDistributionConfigOutput struct { + _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` + + // The current version of the configuration. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The streaming distribution's configuration information. + StreamingDistributionConfig *StreamingDistributionConfig `type:"structure"` } -// SetQueryString sets the QueryString field's value. -func (s *ForwardedValues) SetQueryString(v bool) *ForwardedValues { - s.QueryString = &v +// String returns the string representation +func (s GetStreamingDistributionConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetStreamingDistributionConfigOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *GetStreamingDistributionConfigOutput) SetETag(v string) *GetStreamingDistributionConfigOutput { + s.ETag = &v return s } -// SetQueryStringCacheKeys sets the QueryStringCacheKeys field's value. -func (s *ForwardedValues) SetQueryStringCacheKeys(v *QueryStringCacheKeys) *ForwardedValues { - s.QueryStringCacheKeys = v +// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. +func (s *GetStreamingDistributionConfigOutput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *GetStreamingDistributionConfigOutput { + s.StreamingDistributionConfig = v return s } -// A complex type that controls the countries in which your content is distributed. -// CloudFront determines the location of your users using MaxMind GeoIP databases. -type GeoRestriction struct { +// The request to get a streaming distribution's information. +type GetStreamingDistributionInput struct { _ struct{} `type:"structure"` - // A complex type that contains a Location element for each country in which - // you want CloudFront either to distribute your content (whitelist) or not - // distribute your content (blacklist). - // - // The Location element is a two-letter, uppercase country code for a country - // that you want to include in your blacklist or whitelist. Include one Location - // element for each country. - // - // CloudFront and MaxMind both use ISO 3166 country codes. For the current list - // of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on - // the International Organization for Standardization website. You can also - // refer to the country list on the CloudFront console, which includes both - // country names and codes. - Items []*string `locationNameList:"Location" type:"list"` - - // When geo restriction is enabled, this is the number of countries in your - // whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0, - // and you can omit Items. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` - - // The method that you want to use to restrict distribution of your content - // by country: - // - // * none: No geo restriction is enabled, meaning access to content is not - // restricted by client geo location. - // - // * blacklist: The Location elements specify the countries in which you - // don't want CloudFront to distribute your content. - // - // * whitelist: The Location elements specify the countries in which you - // want CloudFront to distribute your content. + // The streaming distribution's ID. // - // RestrictionType is a required field - RestrictionType *string `type:"string" required:"true" enum:"GeoRestrictionType"` + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` } // String returns the string representation -func (s GeoRestriction) String() string { +func (s GetStreamingDistributionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GeoRestriction) GoString() string { +func (s GetStreamingDistributionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GeoRestriction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.RestrictionType == nil { - invalidParams.Add(request.NewErrParamRequired("RestrictionType")) +func (s *GetStreamingDistributionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { @@ -6552,50 +10470,112 @@ func (s *GeoRestriction) Validate() error { return nil } -// SetItems sets the Items field's value. -func (s *GeoRestriction) SetItems(v []*string) *GeoRestriction { - s.Items = v +// SetId sets the Id field's value. +func (s *GetStreamingDistributionInput) SetId(v string) *GetStreamingDistributionInput { + s.Id = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *GeoRestriction) SetQuantity(v int64) *GeoRestriction { - s.Quantity = &v +// The returned result of the corresponding request. +type GetStreamingDistributionOutput struct { + _ struct{} `type:"structure" payload:"StreamingDistribution"` + + // The current version of the streaming distribution's information. For example: + // E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // The streaming distribution's information. + StreamingDistribution *StreamingDistribution `type:"structure"` +} + +// String returns the string representation +func (s GetStreamingDistributionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetStreamingDistributionOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *GetStreamingDistributionOutput) SetETag(v string) *GetStreamingDistributionOutput { + s.ETag = &v return s } -// SetRestrictionType sets the RestrictionType field's value. -func (s *GeoRestriction) SetRestrictionType(v string) *GeoRestriction { - s.RestrictionType = &v +// SetStreamingDistribution sets the StreamingDistribution field's value. +func (s *GetStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *GetStreamingDistributionOutput { + s.StreamingDistribution = v return s } -// The origin access identity's configuration information. For more information, -// see CloudFrontOriginAccessIdentityConfigComplexType. -type GetCloudFrontOriginAccessIdentityConfigInput struct { +// A complex type that specifies the request headers, if any, that you want +// CloudFront to base caching on for this cache behavior. +// +// For the headers that you specify, CloudFront caches separate versions of +// a specified object based on the header values in viewer requests. For example, +// suppose viewer requests for logo.jpg contain a custom product header that +// has a value of either acme or apex, and you configure CloudFront to cache +// your content based on values in the product header. CloudFront forwards the +// product header to the origin and caches the response from the origin once +// for each header value. For more information about caching based on header +// values, see How CloudFront Forwards and Caches Headers (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) +// in the Amazon CloudFront Developer Guide. +type Headers struct { _ struct{} `type:"structure"` - // The identity's ID. + // A list that contains one Name element for each header that you want CloudFront + // to use for caching in this cache behavior. If Quantity is 0, omit Items. + Items []*string `locationNameList:"Name" type:"list"` + + // The number of different headers that you want CloudFront to base caching + // on for this cache behavior. You can configure each cache behavior in a web + // distribution to do one of the following: // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + // * Forward all headers to your origin: Specify 1 for Quantity and * for + // Name. + // + // CloudFront doesn't cache the objects that are associated with this cache + // behavior. Instead, CloudFront sends every request to the origin. + // + // * Forward a whitelist of headers you specify: Specify the number of headers + // that you want CloudFront to base caching on. Then specify the header names + // in Name elements. CloudFront caches your objects based on the values in + // the specified headers. + // + // * Forward only the default headers: Specify 0 for Quantity and omit Items. + // In this configuration, CloudFront doesn't cache based on the values in + // the request headers. + // + // Regardless of which option you choose, CloudFront forwards headers to your + // origin based on whether the origin is an S3 bucket or a custom origin. See + // the following documentation: + // + // * S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates + // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorS3Origin.html#request-s3-removed-headers) + // + // * Custom origin: See HTTP Request Headers and CloudFront Behavior (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-headers-behavior) + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigInput) String() string { +func (s Headers) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string { +func (s Headers) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) +func (s *Headers) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Headers"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) } if invalidParams.Len() > 0 { @@ -6604,70 +10584,133 @@ func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error { return nil } -// SetId sets the Id field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigInput) SetId(v string) *GetCloudFrontOriginAccessIdentityConfigInput { - s.Id = &v +// SetItems sets the Items field's value. +func (s *Headers) SetItems(v []*string) *Headers { + s.Items = v return s } -// The returned result of the corresponding request. -type GetCloudFrontOriginAccessIdentityConfigOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` +// SetQuantity sets the Quantity field's value. +func (s *Headers) SetQuantity(v int64) *Headers { + s.Quantity = &v + return s +} - // The origin access identity's configuration information. - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` +// An invalidation. +type Invalidation struct { + _ struct{} `type:"structure"` - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` + // The date and time the invalidation request was first made. + // + // CreateTime is a required field + CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // The identifier for the invalidation request. For example: IDFDVBD632BHDS5. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The current invalidation information for the batch request. + // + // InvalidationBatch is a required field + InvalidationBatch *InvalidationBatch `type:"structure" required:"true"` + + // The status of the invalidation request. When the invalidation batch is finished, + // the status is Completed. + // + // Status is a required field + Status *string `type:"string" required:"true"` } // String returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigOutput) String() string { +func (s Invalidation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityConfigOutput) GoString() string { +func (s Invalidation) GoString() string { return s.String() } -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *GetCloudFrontOriginAccessIdentityConfigOutput { - s.CloudFrontOriginAccessIdentityConfig = v +// SetCreateTime sets the CreateTime field's value. +func (s *Invalidation) SetCreateTime(v time.Time) *Invalidation { + s.CreateTime = &v return s } -// SetETag sets the ETag field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityConfigOutput { - s.ETag = &v +// SetId sets the Id field's value. +func (s *Invalidation) SetId(v string) *Invalidation { + s.Id = &v return s } -// The request to get an origin access identity's information. -type GetCloudFrontOriginAccessIdentityInput struct { +// SetInvalidationBatch sets the InvalidationBatch field's value. +func (s *Invalidation) SetInvalidationBatch(v *InvalidationBatch) *Invalidation { + s.InvalidationBatch = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Invalidation) SetStatus(v string) *Invalidation { + s.Status = &v + return s +} + +// An invalidation batch. +type InvalidationBatch struct { _ struct{} `type:"structure"` - // The identity's ID. + // A value that you specify to uniquely identify an invalidation request. CloudFront + // uses the value to prevent you from accidentally resubmitting an identical + // request. Whenever you create a new invalidation request, you must specify + // a new value for CallerReference and change other values in the request as + // applicable. One way to ensure that the value of CallerReference is unique + // is to use a timestamp, for example, 20120301090000. // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + // If you make a second invalidation request with the same value for CallerReference, + // and if the rest of the request is the same, CloudFront doesn't create a new + // invalidation request. Instead, CloudFront returns information about the invalidation + // request that you previously created with the same CallerReference. + // + // If CallerReference is a value you already sent in a previous invalidation + // batch request but the content of any Path is different from the original + // request, CloudFront returns an InvalidationBatchAlreadyExists error. + // + // CallerReference is a required field + CallerReference *string `type:"string" required:"true"` + + // A complex type that contains information about the objects that you want + // to invalidate. For more information, see Specifying the Objects to Invalidate + // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) + // in the Amazon CloudFront Developer Guide. + // + // Paths is a required field + Paths *Paths `type:"structure" required:"true"` } // String returns the string representation -func (s GetCloudFrontOriginAccessIdentityInput) String() string { +func (s InvalidationBatch) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityInput) GoString() string { +func (s InvalidationBatch) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) +func (s *InvalidationBatch) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.Paths == nil { + invalidParams.Add(request.NewErrParamRequired("Paths")) + } + if s.Paths != nil { + if err := s.Paths.Validate(); err != nil { + invalidParams.AddNested("Paths", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -6676,223 +10719,250 @@ func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error { return nil } -// SetId sets the Id field's value. -func (s *GetCloudFrontOriginAccessIdentityInput) SetId(v string) *GetCloudFrontOriginAccessIdentityInput { - s.Id = &v +// SetCallerReference sets the CallerReference field's value. +func (s *InvalidationBatch) SetCallerReference(v string) *InvalidationBatch { + s.CallerReference = &v return s } -// The returned result of the corresponding request. -type GetCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the origin access identity's information. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` +// SetPaths sets the Paths field's value. +func (s *InvalidationBatch) SetPaths(v *Paths) *InvalidationBatch { + s.Paths = v + return s } -// String returns the string representation -func (s GetCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} +// The InvalidationList complex type describes the list of invalidation objects. +// For more information about invalidation, see Invalidating Objects (Web Distributions +// Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) +// in the Amazon CloudFront Developer Guide. +type InvalidationList struct { + _ struct{} `type:"structure"` -// GoString returns the string representation -func (s GetCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} + // A flag that indicates whether more invalidation batch requests remain to + // be listed. If your results were truncated, you can make a follow-up pagination + // request using the Marker request parameter to retrieve more invalidation + // batches in the list. + // + // IsTruncated is a required field + IsTruncated *bool `type:"boolean" required:"true"` -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *GetCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *GetCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} + // A complex type that contains one InvalidationSummary element for each invalidation + // batch created by the current AWS account. + Items []*InvalidationSummary `locationNameList:"InvalidationSummary" type:"list"` -// SetETag sets the ETag field's value. -func (s *GetCloudFrontOriginAccessIdentityOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} + // The value that you provided for the Marker request parameter. + // + // Marker is a required field + Marker *string `type:"string" required:"true"` -// The request to get a distribution configuration. -type GetDistributionConfigInput struct { - _ struct{} `type:"structure"` + // The value that you provided for the MaxItems request parameter. + // + // MaxItems is a required field + MaxItems *int64 `type:"integer" required:"true"` - // The distribution's ID. + // If IsTruncated is true, this element is present and contains the value that + // you can use for the Marker request parameter to continue listing your invalidation + // batches where they left off. + NextMarker *string `type:"string"` + + // The number of invalidation batches that were created by the current AWS account. // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s GetDistributionConfigInput) String() string { +func (s InvalidationList) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDistributionConfigInput) GoString() string { +func (s InvalidationList) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDistributionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetDistributionConfigInput) SetId(v string) *GetDistributionConfigInput { - s.Id = &v +// SetIsTruncated sets the IsTruncated field's value. +func (s *InvalidationList) SetIsTruncated(v bool) *InvalidationList { + s.IsTruncated = &v return s } -// The returned result of the corresponding request. -type GetDistributionConfigOutput struct { - _ struct{} `type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - DistributionConfig *DistributionConfig `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` -} - -// String returns the string representation -func (s GetDistributionConfigOutput) String() string { - return awsutil.Prettify(s) +// SetItems sets the Items field's value. +func (s *InvalidationList) SetItems(v []*InvalidationSummary) *InvalidationList { + s.Items = v + return s } -// GoString returns the string representation -func (s GetDistributionConfigOutput) GoString() string { - return s.String() +// SetMarker sets the Marker field's value. +func (s *InvalidationList) SetMarker(v string) *InvalidationList { + s.Marker = &v + return s } -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *GetDistributionConfigOutput) SetDistributionConfig(v *DistributionConfig) *GetDistributionConfigOutput { - s.DistributionConfig = v +// SetMaxItems sets the MaxItems field's value. +func (s *InvalidationList) SetMaxItems(v int64) *InvalidationList { + s.MaxItems = &v return s } -// SetETag sets the ETag field's value. -func (s *GetDistributionConfigOutput) SetETag(v string) *GetDistributionConfigOutput { - s.ETag = &v +// SetNextMarker sets the NextMarker field's value. +func (s *InvalidationList) SetNextMarker(v string) *InvalidationList { + s.NextMarker = &v return s } -// The request to get a distribution's information. -type GetDistributionInput struct { +// SetQuantity sets the Quantity field's value. +func (s *InvalidationList) SetQuantity(v int64) *InvalidationList { + s.Quantity = &v + return s +} + +// A summary of an invalidation request. +type InvalidationSummary struct { _ struct{} `type:"structure"` - // The distribution's ID. + // CreateTime is a required field + CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // The unique ID for an invalidation request. // // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + Id *string `type:"string" required:"true"` + + // The status of an invalidation request. + // + // Status is a required field + Status *string `type:"string" required:"true"` } // String returns the string representation -func (s GetDistributionInput) String() string { +func (s InvalidationSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDistributionInput) GoString() string { +func (s InvalidationSummary) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCreateTime sets the CreateTime field's value. +func (s *InvalidationSummary) SetCreateTime(v time.Time) *InvalidationSummary { + s.CreateTime = &v + return s } // SetId sets the Id field's value. -func (s *GetDistributionInput) SetId(v string) *GetDistributionInput { +func (s *InvalidationSummary) SetId(v string) *InvalidationSummary { s.Id = &v return s } -// The returned result of the corresponding request. -type GetDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` +// SetStatus sets the Status field's value. +func (s *InvalidationSummary) SetStatus(v string) *InvalidationSummary { + s.Status = &v + return s +} - // The distribution's information. - Distribution *Distribution `type:"structure"` +// A complex type that lists the active CloudFront key pairs, if any, that are +// associated with AwsAccountNumber. +// +// For more information, see ActiveTrustedSigners. +type KeyPairIds struct { + _ struct{} `type:"structure"` - // The current version of the distribution's information. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` + // A complex type that lists the active CloudFront key pairs, if any, that are + // associated with AwsAccountNumber. + // + // For more information, see ActiveTrustedSigners. + Items []*string `locationNameList:"KeyPairId" type:"list"` + + // The number of active CloudFront key pairs for AwsAccountNumber. + // + // For more information, see ActiveTrustedSigners. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s GetDistributionOutput) String() string { +func (s KeyPairIds) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDistributionOutput) GoString() string { +func (s KeyPairIds) GoString() string { return s.String() } -// SetDistribution sets the Distribution field's value. -func (s *GetDistributionOutput) SetDistribution(v *Distribution) *GetDistributionOutput { - s.Distribution = v +// SetItems sets the Items field's value. +func (s *KeyPairIds) SetItems(v []*string) *KeyPairIds { + s.Items = v return s } -// SetETag sets the ETag field's value. -func (s *GetDistributionOutput) SetETag(v string) *GetDistributionOutput { - s.ETag = &v +// SetQuantity sets the Quantity field's value. +func (s *KeyPairIds) SetQuantity(v int64) *KeyPairIds { + s.Quantity = &v return s } -// The request to get an invalidation's information. -type GetInvalidationInput struct { +// A complex type that contains a Lambda function association. +type LambdaFunctionAssociation struct { _ struct{} `type:"structure"` - // The distribution's ID. + // Specifies the event type that triggers a Lambda function invocation. You + // can specify the following values: // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` + // * viewer-request: The function executes when CloudFront receives a request + // from a viewer and before it checks to see whether the requested object + // is in the edge cache. + // + // * origin-request: The function executes only when CloudFront forwards + // a request to your origin. When the requested object is in the edge cache, + // the function doesn't execute. + // + // * origin-response: The function executes after CloudFront receives a response + // from the origin and before it caches the object in the response. When + // the requested object is in the edge cache, the function doesn't execute. + // + // If the origin returns an HTTP status code other than HTTP 200 (OK), the function + // doesn't execute. + // + // * viewer-response: The function executes before CloudFront returns the + // requested object to the viewer. The function executes regardless of whether + // the object was already in the edge cache. + // + // If the origin returns an HTTP status code other than HTTP 200 (OK), the function + // doesn't execute. + // + // EventType is a required field + EventType *string `type:"string" required:"true" enum:"EventType"` - // The identifier for the invalidation request, for example, IDFDVBD632BHDS5. + // The ARN of the Lambda function. You must specify the ARN of a function version; + // you can't specify a Lambda alias or $LATEST. // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + // LambdaFunctionARN is a required field + LambdaFunctionARN *string `type:"string" required:"true"` } // String returns the string representation -func (s GetInvalidationInput) String() string { +func (s LambdaFunctionAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInvalidationInput) GoString() string { +func (s LambdaFunctionAssociation) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInvalidationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) +func (s *LambdaFunctionAssociation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociation"} + if s.EventType == nil { + invalidParams.Add(request.NewErrParamRequired("EventType")) } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) + if s.LambdaFunctionARN == nil { + invalidParams.Add(request.NewErrParamRequired("LambdaFunctionARN")) } if invalidParams.Len() > 0 { @@ -6901,140 +10971,187 @@ func (s *GetInvalidationInput) Validate() error { return nil } -// SetDistributionId sets the DistributionId field's value. -func (s *GetInvalidationInput) SetDistributionId(v string) *GetInvalidationInput { - s.DistributionId = &v +// SetEventType sets the EventType field's value. +func (s *LambdaFunctionAssociation) SetEventType(v string) *LambdaFunctionAssociation { + s.EventType = &v return s } -// SetId sets the Id field's value. -func (s *GetInvalidationInput) SetId(v string) *GetInvalidationInput { - s.Id = &v +// SetLambdaFunctionARN sets the LambdaFunctionARN field's value. +func (s *LambdaFunctionAssociation) SetLambdaFunctionARN(v string) *LambdaFunctionAssociation { + s.LambdaFunctionARN = &v return s } -// The returned result of the corresponding request. -type GetInvalidationOutput struct { - _ struct{} `type:"structure" payload:"Invalidation"` +// A complex type that specifies a list of Lambda functions associations for +// a cache behavior. +// +// If you want to invoke one or more Lambda functions triggered by requests +// that match the PathPattern of the cache behavior, specify the applicable +// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation +// items in this list (one for each possible value of EventType) and each EventType +// can be associated with the Lambda function only once. +// +// If you don't want to invoke any Lambda functions for the requests that match +// PathPattern, specify 0 for Quantity and omit Items. +type LambdaFunctionAssociations struct { + _ struct{} `type:"structure"` - // The invalidation's information. For more information, see Invalidation Complex - // Type (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/InvalidationDatatype.html). - Invalidation *Invalidation `type:"structure"` + // Optional: A complex type that contains LambdaFunctionAssociation items for + // this cache behavior. If Quantity is 0, you can omit Items. + Items []*LambdaFunctionAssociation `locationNameList:"LambdaFunctionAssociation" type:"list"` + + // The number of Lambda function associations for this cache behavior. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s GetInvalidationOutput) String() string { +func (s LambdaFunctionAssociations) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInvalidationOutput) GoString() string { +func (s LambdaFunctionAssociations) GoString() string { return s.String() } -// SetInvalidation sets the Invalidation field's value. -func (s *GetInvalidationOutput) SetInvalidation(v *Invalidation) *GetInvalidationOutput { - s.Invalidation = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *LambdaFunctionAssociations) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociations"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *LambdaFunctionAssociations) SetItems(v []*LambdaFunctionAssociation) *LambdaFunctionAssociations { + s.Items = v return s } -// To request to get a streaming distribution configuration. -type GetStreamingDistributionConfigInput struct { +// SetQuantity sets the Quantity field's value. +func (s *LambdaFunctionAssociations) SetQuantity(v int64) *LambdaFunctionAssociations { + s.Quantity = &v + return s +} + +// The request to list origin access identities. +type ListCloudFrontOriginAccessIdentitiesInput struct { _ struct{} `type:"structure"` - // The streaming distribution's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + // Use this when paginating results to indicate where to begin in your list + // of origin access identities. The results include identities in the list that + // occur after the marker. To get the next page of results, set the Marker to + // the value of the NextMarker from the current page's response (which is also + // the ID of the last identity on that page). + Marker *string `location:"querystring" locationName:"Marker" type:"string"` + + // The maximum number of origin access identities you want in the response body. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` } // String returns the string representation -func (s GetStreamingDistributionConfigInput) String() string { +func (s ListCloudFrontOriginAccessIdentitiesInput) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s GetStreamingDistributionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStreamingDistributionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// GoString returns the string representation +func (s ListCloudFrontOriginAccessIdentitiesInput) GoString() string { + return s.String() } -// SetId sets the Id field's value. -func (s *GetStreamingDistributionConfigInput) SetId(v string) *GetStreamingDistributionConfigInput { - s.Id = &v +// SetMarker sets the Marker field's value. +func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMarker(v string) *ListCloudFrontOriginAccessIdentitiesInput { + s.Marker = &v return s } -// The returned result of the corresponding request. -type GetStreamingDistributionConfigOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` +// SetMaxItems sets the MaxItems field's value. +func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMaxItems(v int64) *ListCloudFrontOriginAccessIdentitiesInput { + s.MaxItems = &v + return s +} - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` +// The returned result of the corresponding request. +type ListCloudFrontOriginAccessIdentitiesOutput struct { + _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityList"` - // The streaming distribution's configuration information. - StreamingDistributionConfig *StreamingDistributionConfig `type:"structure"` + // The CloudFrontOriginAccessIdentityList type. + CloudFrontOriginAccessIdentityList *OriginAccessIdentityList `type:"structure"` } // String returns the string representation -func (s GetStreamingDistributionConfigOutput) String() string { +func (s ListCloudFrontOriginAccessIdentitiesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStreamingDistributionConfigOutput) GoString() string { +func (s ListCloudFrontOriginAccessIdentitiesOutput) GoString() string { return s.String() } -// SetETag sets the ETag field's value. -func (s *GetStreamingDistributionConfigOutput) SetETag(v string) *GetStreamingDistributionConfigOutput { - s.ETag = &v - return s -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *GetStreamingDistributionConfigOutput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *GetStreamingDistributionConfigOutput { - s.StreamingDistributionConfig = v +// SetCloudFrontOriginAccessIdentityList sets the CloudFrontOriginAccessIdentityList field's value. +func (s *ListCloudFrontOriginAccessIdentitiesOutput) SetCloudFrontOriginAccessIdentityList(v *OriginAccessIdentityList) *ListCloudFrontOriginAccessIdentitiesOutput { + s.CloudFrontOriginAccessIdentityList = v return s } -// The request to get a streaming distribution's information. -type GetStreamingDistributionInput struct { +// The request to list distributions that are associated with a specified AWS +// WAF web ACL. +type ListDistributionsByWebACLIdInput struct { _ struct{} `type:"structure"` - // The streaming distribution's ID. + // Use Marker and MaxItems to control pagination of results. If you have more + // than MaxItems distributions that satisfy the request, the response includes + // a NextMarker element. To get the next page of results, submit another request. + // For the value of Marker, specify the value of NextMarker from the last response. + // (For the first request, omit Marker.) + Marker *string `location:"querystring" locationName:"Marker" type:"string"` + + // The maximum number of distributions that you want CloudFront to return in + // the response body. The maximum and default values are both 100. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` + + // The ID of the AWS WAF web ACL that you want to list the associated distributions. + // If you specify "null" for the ID, the request returns a list of the distributions + // that aren't associated with a web ACL. // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + // WebACLId is a required field + WebACLId *string `location:"uri" locationName:"WebACLId" type:"string" required:"true"` } // String returns the string representation -func (s GetStreamingDistributionInput) String() string { +func (s ListDistributionsByWebACLIdInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStreamingDistributionInput) GoString() string { +func (s ListDistributionsByWebACLIdInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) +func (s *ListDistributionsByWebACLIdInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"} + if s.WebACLId == nil { + invalidParams.Add(request.NewErrParamRequired("WebACLId")) } if invalidParams.Len() > 0 { @@ -7043,538 +11160,462 @@ func (s *GetStreamingDistributionInput) Validate() error { return nil } -// SetId sets the Id field's value. -func (s *GetStreamingDistributionInput) SetId(v string) *GetStreamingDistributionInput { - s.Id = &v +// SetMarker sets the Marker field's value. +func (s *ListDistributionsByWebACLIdInput) SetMarker(v string) *ListDistributionsByWebACLIdInput { + s.Marker = &v return s } -// The returned result of the corresponding request. -type GetStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` +// SetMaxItems sets the MaxItems field's value. +func (s *ListDistributionsByWebACLIdInput) SetMaxItems(v int64) *ListDistributionsByWebACLIdInput { + s.MaxItems = &v + return s +} - // The current version of the streaming distribution's information. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` +// SetWebACLId sets the WebACLId field's value. +func (s *ListDistributionsByWebACLIdInput) SetWebACLId(v string) *ListDistributionsByWebACLIdInput { + s.WebACLId = &v + return s +} - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `type:"structure"` +// The response to a request to list the distributions that are associated with +// a specified AWS WAF web ACL. +type ListDistributionsByWebACLIdOutput struct { + _ struct{} `type:"structure" payload:"DistributionList"` + + // The DistributionList type. + DistributionList *DistributionList `type:"structure"` } // String returns the string representation -func (s GetStreamingDistributionOutput) String() string { +func (s ListDistributionsByWebACLIdOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStreamingDistributionOutput) GoString() string { +func (s ListDistributionsByWebACLIdOutput) GoString() string { return s.String() } -// SetETag sets the ETag field's value. -func (s *GetStreamingDistributionOutput) SetETag(v string) *GetStreamingDistributionOutput { - s.ETag = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *GetStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *GetStreamingDistributionOutput { - s.StreamingDistribution = v +// SetDistributionList sets the DistributionList field's value. +func (s *ListDistributionsByWebACLIdOutput) SetDistributionList(v *DistributionList) *ListDistributionsByWebACLIdOutput { + s.DistributionList = v return s } -// A complex type that specifies the request headers, if any, that you want -// CloudFront to base caching on for this cache behavior. -// -// For the headers that you specify, CloudFront caches separate versions of -// a specified object based on the header values in viewer requests. For example, -// suppose viewer requests for logo.jpg contain a custom product header that -// has a value of either acme or apex, and you configure CloudFront to cache -// your content based on values in the product header. CloudFront forwards the -// product header to the origin and caches the response from the origin once -// for each header value. For more information about caching based on header -// values, see How CloudFront Forwards and Caches Headers (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) -// in the Amazon CloudFront Developer Guide. -type Headers struct { +// The request to list your distributions. +type ListDistributionsInput struct { _ struct{} `type:"structure"` - // A list that contains one Name element for each header that you want CloudFront - // to use for caching in this cache behavior. If Quantity is 0, omit Items. - Items []*string `locationNameList:"Name" type:"list"` + // Use this when paginating results to indicate where to begin in your list + // of distributions. The results include distributions in the list that occur + // after the marker. To get the next page of results, set the Marker to the + // value of the NextMarker from the current page's response (which is also the + // ID of the last distribution on that page). + Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // The number of different headers that you want CloudFront to base caching - // on for this cache behavior. You can configure each cache behavior in a web - // distribution to do one of the following: - // - // * Forward all headers to your origin: Specify 1 for Quantity and * for - // Name. - // - // CloudFront doesn't cache the objects that are associated with this cache - // behavior. Instead, CloudFront sends every request to the origin. - // - // * Forward a whitelist of headers you specify: Specify the number of headers - // that you want CloudFront to base caching on. Then specify the header names - // in Name elements. CloudFront caches your objects based on the values in - // the specified headers. - // - // * Forward only the default headers: Specify 0 for Quantity and omit Items. - // In this configuration, CloudFront doesn't cache based on the values in - // the request headers. - // - // Regardless of which option you choose, CloudFront forwards headers to your - // origin based on whether the origin is an S3 bucket or a custom origin. See - // the following documentation: - // - // * S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorS3Origin.html#request-s3-removed-headers) - // - // * Custom origin: See HTTP Request Headers and CloudFront Behavior (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-headers-behavior) - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // The maximum number of distributions you want in the response body. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` } // String returns the string representation -func (s Headers) String() string { +func (s ListDistributionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Headers) GoString() string { +func (s ListDistributionsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *Headers) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Headers"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMarker sets the Marker field's value. +func (s *ListDistributionsInput) SetMarker(v string) *ListDistributionsInput { + s.Marker = &v + return s } -// SetItems sets the Items field's value. -func (s *Headers) SetItems(v []*string) *Headers { - s.Items = v +// SetMaxItems sets the MaxItems field's value. +func (s *ListDistributionsInput) SetMaxItems(v int64) *ListDistributionsInput { + s.MaxItems = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *Headers) SetQuantity(v int64) *Headers { - s.Quantity = &v - return s +// The returned result of the corresponding request. +type ListDistributionsOutput struct { + _ struct{} `type:"structure" payload:"DistributionList"` + + // The DistributionList type. + DistributionList *DistributionList `type:"structure"` } -// An invalidation. -type Invalidation struct { - _ struct{} `type:"structure"` +// String returns the string representation +func (s ListDistributionsOutput) String() string { + return awsutil.Prettify(s) +} - // The date and time the invalidation request was first made. - // - // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` +// GoString returns the string representation +func (s ListDistributionsOutput) GoString() string { + return s.String() +} - // The identifier for the invalidation request. For example: IDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` +// SetDistributionList sets the DistributionList field's value. +func (s *ListDistributionsOutput) SetDistributionList(v *DistributionList) *ListDistributionsOutput { + s.DistributionList = v + return s +} - // The current invalidation information for the batch request. - // - // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `type:"structure" required:"true"` +type ListFieldLevelEncryptionConfigsInput struct { + _ struct{} `type:"structure"` - // The status of the invalidation request. When the invalidation batch is finished, - // the status is Completed. - // - // Status is a required field - Status *string `type:"string" required:"true"` + // Use this when paginating results to indicate where to begin in your list + // of configurations. The results include configurations in the list that occur + // after the marker. To get the next page of results, set the Marker to the + // value of the NextMarker from the current page's response (which is also the + // ID of the last configuration on that page). + Marker *string `location:"querystring" locationName:"Marker" type:"string"` + + // The maximum number of field-level encryption configurations you want in the + // response body. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` } // String returns the string representation -func (s Invalidation) String() string { +func (s ListFieldLevelEncryptionConfigsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Invalidation) GoString() string { +func (s ListFieldLevelEncryptionConfigsInput) GoString() string { return s.String() } -// SetCreateTime sets the CreateTime field's value. -func (s *Invalidation) SetCreateTime(v time.Time) *Invalidation { - s.CreateTime = &v +// SetMarker sets the Marker field's value. +func (s *ListFieldLevelEncryptionConfigsInput) SetMarker(v string) *ListFieldLevelEncryptionConfigsInput { + s.Marker = &v return s } -// SetId sets the Id field's value. -func (s *Invalidation) SetId(v string) *Invalidation { - s.Id = &v +// SetMaxItems sets the MaxItems field's value. +func (s *ListFieldLevelEncryptionConfigsInput) SetMaxItems(v int64) *ListFieldLevelEncryptionConfigsInput { + s.MaxItems = &v return s } -// SetInvalidationBatch sets the InvalidationBatch field's value. -func (s *Invalidation) SetInvalidationBatch(v *InvalidationBatch) *Invalidation { - s.InvalidationBatch = v - return s +type ListFieldLevelEncryptionConfigsOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionList"` + + // Returns a list of all field-level encryption configurations that have been + // created in CloudFront for this account. + FieldLevelEncryptionList *FieldLevelEncryptionList `type:"structure"` } -// SetStatus sets the Status field's value. -func (s *Invalidation) SetStatus(v string) *Invalidation { - s.Status = &v +// String returns the string representation +func (s ListFieldLevelEncryptionConfigsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFieldLevelEncryptionConfigsOutput) GoString() string { + return s.String() +} + +// SetFieldLevelEncryptionList sets the FieldLevelEncryptionList field's value. +func (s *ListFieldLevelEncryptionConfigsOutput) SetFieldLevelEncryptionList(v *FieldLevelEncryptionList) *ListFieldLevelEncryptionConfigsOutput { + s.FieldLevelEncryptionList = v return s } -// An invalidation batch. -type InvalidationBatch struct { +type ListFieldLevelEncryptionProfilesInput struct { _ struct{} `type:"structure"` - // A value that you specify to uniquely identify an invalidation request. CloudFront - // uses the value to prevent you from accidentally resubmitting an identical - // request. Whenever you create a new invalidation request, you must specify - // a new value for CallerReference and change other values in the request as - // applicable. One way to ensure that the value of CallerReference is unique - // is to use a timestamp, for example, 20120301090000. - // - // If you make a second invalidation request with the same value for CallerReference, - // and if the rest of the request is the same, CloudFront doesn't create a new - // invalidation request. Instead, CloudFront returns information about the invalidation - // request that you previously created with the same CallerReference. - // - // If CallerReference is a value you already sent in a previous invalidation - // batch request but the content of any Path is different from the original - // request, CloudFront returns an InvalidationBatchAlreadyExists error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` + // Use this when paginating results to indicate where to begin in your list + // of profiles. The results include profiles in the list that occur after the + // marker. To get the next page of results, set the Marker to the value of the + // NextMarker from the current page's response (which is also the ID of the + // last profile on that page). + Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // A complex type that contains information about the objects that you want - // to invalidate. For more information, see Specifying the Objects to Invalidate - // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) - // in the Amazon CloudFront Developer Guide. - // - // Paths is a required field - Paths *Paths `type:"structure" required:"true"` + // The maximum number of field-level encryption profiles you want in the response + // body. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` } // String returns the string representation -func (s InvalidationBatch) String() string { +func (s ListFieldLevelEncryptionProfilesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InvalidationBatch) GoString() string { +func (s ListFieldLevelEncryptionProfilesInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *InvalidationBatch) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Paths == nil { - invalidParams.Add(request.NewErrParamRequired("Paths")) - } - if s.Paths != nil { - if err := s.Paths.Validate(); err != nil { - invalidParams.AddNested("Paths", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMarker sets the Marker field's value. +func (s *ListFieldLevelEncryptionProfilesInput) SetMarker(v string) *ListFieldLevelEncryptionProfilesInput { + s.Marker = &v + return s } -// SetCallerReference sets the CallerReference field's value. -func (s *InvalidationBatch) SetCallerReference(v string) *InvalidationBatch { - s.CallerReference = &v +// SetMaxItems sets the MaxItems field's value. +func (s *ListFieldLevelEncryptionProfilesInput) SetMaxItems(v int64) *ListFieldLevelEncryptionProfilesInput { + s.MaxItems = &v return s } -// SetPaths sets the Paths field's value. -func (s *InvalidationBatch) SetPaths(v *Paths) *InvalidationBatch { - s.Paths = v - return s +type ListFieldLevelEncryptionProfilesOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileList"` + + // Returns a list of the field-level encryption profiles that have been created + // in CloudFront for this account. + FieldLevelEncryptionProfileList *FieldLevelEncryptionProfileList `type:"structure"` } -// The InvalidationList complex type describes the list of invalidation objects. -// For more information about invalidation, see Invalidating Objects (Web Distributions -// Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) -// in the Amazon CloudFront Developer Guide. -type InvalidationList struct { - _ struct{} `type:"structure"` +// String returns the string representation +func (s ListFieldLevelEncryptionProfilesOutput) String() string { + return awsutil.Prettify(s) +} - // A flag that indicates whether more invalidation batch requests remain to - // be listed. If your results were truncated, you can make a follow-up pagination - // request using the Marker request parameter to retrieve more invalidation - // batches in the list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` +// GoString returns the string representation +func (s ListFieldLevelEncryptionProfilesOutput) GoString() string { + return s.String() +} - // A complex type that contains one InvalidationSummary element for each invalidation - // batch created by the current AWS account. - Items []*InvalidationSummary `locationNameList:"InvalidationSummary" type:"list"` +// SetFieldLevelEncryptionProfileList sets the FieldLevelEncryptionProfileList field's value. +func (s *ListFieldLevelEncryptionProfilesOutput) SetFieldLevelEncryptionProfileList(v *FieldLevelEncryptionProfileList) *ListFieldLevelEncryptionProfilesOutput { + s.FieldLevelEncryptionProfileList = v + return s +} - // The value that you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` +// The request to list invalidations. +type ListInvalidationsInput struct { + _ struct{} `type:"structure"` - // The value that you provided for the MaxItems request parameter. + // The distribution's ID. // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` + // DistributionId is a required field + DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - // If IsTruncated is true, this element is present and contains the value that - // you can use for the Marker request parameter to continue listing your invalidation - // batches where they left off. - NextMarker *string `type:"string"` + // Use this parameter when paginating results to indicate where to begin in + // your list of invalidation batches. Because the results are returned in decreasing + // order from most recent to oldest, the most recent results are on the first + // page, the second page will contain earlier results, and so on. To get the + // next page of results, set Marker to the value of the NextMarker from the + // current page's response. This value is the same as the ID of the last invalidation + // batch on that page. + Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // The number of invalidation batches that were created by the current AWS account. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // The maximum number of invalidation batches that you want in the response + // body. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` } // String returns the string representation -func (s InvalidationList) String() string { +func (s ListInvalidationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InvalidationList) GoString() string { +func (s ListInvalidationsInput) GoString() string { return s.String() } -// SetIsTruncated sets the IsTruncated field's value. -func (s *InvalidationList) SetIsTruncated(v bool) *InvalidationList { - s.IsTruncated = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInvalidationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"} + if s.DistributionId == nil { + invalidParams.Add(request.NewErrParamRequired("DistributionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetItems sets the Items field's value. -func (s *InvalidationList) SetItems(v []*InvalidationSummary) *InvalidationList { - s.Items = v +// SetDistributionId sets the DistributionId field's value. +func (s *ListInvalidationsInput) SetDistributionId(v string) *ListInvalidationsInput { + s.DistributionId = &v return s } // SetMarker sets the Marker field's value. -func (s *InvalidationList) SetMarker(v string) *InvalidationList { +func (s *ListInvalidationsInput) SetMarker(v string) *ListInvalidationsInput { s.Marker = &v return s } // SetMaxItems sets the MaxItems field's value. -func (s *InvalidationList) SetMaxItems(v int64) *InvalidationList { +func (s *ListInvalidationsInput) SetMaxItems(v int64) *ListInvalidationsInput { s.MaxItems = &v return s } -// SetNextMarker sets the NextMarker field's value. -func (s *InvalidationList) SetNextMarker(v string) *InvalidationList { - s.NextMarker = &v - return s +// The returned result of the corresponding request. +type ListInvalidationsOutput struct { + _ struct{} `type:"structure" payload:"InvalidationList"` + + // Information about invalidation batches. + InvalidationList *InvalidationList `type:"structure"` } -// SetQuantity sets the Quantity field's value. -func (s *InvalidationList) SetQuantity(v int64) *InvalidationList { - s.Quantity = &v +// String returns the string representation +func (s ListInvalidationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInvalidationsOutput) GoString() string { + return s.String() +} + +// SetInvalidationList sets the InvalidationList field's value. +func (s *ListInvalidationsOutput) SetInvalidationList(v *InvalidationList) *ListInvalidationsOutput { + s.InvalidationList = v return s } -// A summary of an invalidation request. -type InvalidationSummary struct { +type ListPublicKeysInput struct { _ struct{} `type:"structure"` - // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` - - // The unique ID for an invalidation request. - // - // Id is a required field - Id *string `type:"string" required:"true"` + // Use this when paginating results to indicate where to begin in your list + // of public keys. The results include public keys in the list that occur after + // the marker. To get the next page of results, set the Marker to the value + // of the NextMarker from the current page's response (which is also the ID + // of the last public key on that page). + Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // The status of an invalidation request. - // - // Status is a required field - Status *string `type:"string" required:"true"` + // The maximum number of public keys you want in the response body. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` } // String returns the string representation -func (s InvalidationSummary) String() string { +func (s ListPublicKeysInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InvalidationSummary) GoString() string { +func (s ListPublicKeysInput) GoString() string { return s.String() } -// SetCreateTime sets the CreateTime field's value. -func (s *InvalidationSummary) SetCreateTime(v time.Time) *InvalidationSummary { - s.CreateTime = &v +// SetMarker sets the Marker field's value. +func (s *ListPublicKeysInput) SetMarker(v string) *ListPublicKeysInput { + s.Marker = &v return s } -// SetId sets the Id field's value. -func (s *InvalidationSummary) SetId(v string) *InvalidationSummary { - s.Id = &v +// SetMaxItems sets the MaxItems field's value. +func (s *ListPublicKeysInput) SetMaxItems(v int64) *ListPublicKeysInput { + s.MaxItems = &v return s } -// SetStatus sets the Status field's value. -func (s *InvalidationSummary) SetStatus(v string) *InvalidationSummary { - s.Status = &v - return s +type ListPublicKeysOutput struct { + _ struct{} `type:"structure" payload:"PublicKeyList"` + + // Returns a list of all public keys that have been added to CloudFront for + // this account. + PublicKeyList *PublicKeyList `type:"structure"` } -// A complex type that lists the active CloudFront key pairs, if any, that are -// associated with AwsAccountNumber. -// -// For more information, see ActiveTrustedSigners. -type KeyPairIds struct { +// String returns the string representation +func (s ListPublicKeysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPublicKeysOutput) GoString() string { + return s.String() +} + +// SetPublicKeyList sets the PublicKeyList field's value. +func (s *ListPublicKeysOutput) SetPublicKeyList(v *PublicKeyList) *ListPublicKeysOutput { + s.PublicKeyList = v + return s +} + +// The request to list your streaming distributions. +type ListStreamingDistributionsInput struct { _ struct{} `type:"structure"` - // A complex type that lists the active CloudFront key pairs, if any, that are - // associated with AwsAccountNumber. - // - // For more information, see ActiveTrustedSigners. - Items []*string `locationNameList:"KeyPairId" type:"list"` + // The value that you provided for the Marker request parameter. + Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // The number of active CloudFront key pairs for AwsAccountNumber. - // - // For more information, see ActiveTrustedSigners. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // The value that you provided for the MaxItems request parameter. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` } // String returns the string representation -func (s KeyPairIds) String() string { +func (s ListStreamingDistributionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s KeyPairIds) GoString() string { +func (s ListStreamingDistributionsInput) GoString() string { return s.String() } -// SetItems sets the Items field's value. -func (s *KeyPairIds) SetItems(v []*string) *KeyPairIds { - s.Items = v +// SetMarker sets the Marker field's value. +func (s *ListStreamingDistributionsInput) SetMarker(v string) *ListStreamingDistributionsInput { + s.Marker = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *KeyPairIds) SetQuantity(v int64) *KeyPairIds { - s.Quantity = &v +// SetMaxItems sets the MaxItems field's value. +func (s *ListStreamingDistributionsInput) SetMaxItems(v int64) *ListStreamingDistributionsInput { + s.MaxItems = &v return s } -// A complex type that contains a Lambda function association. -type LambdaFunctionAssociation struct { - _ struct{} `type:"structure"` - - // Specifies the event type that triggers a Lambda function invocation. You - // can specify the following values: - // - // * viewer-request: The function executes when CloudFront receives a request - // from a viewer and before it checks to see whether the requested object - // is in the edge cache. - // - // * origin-request: The function executes only when CloudFront forwards - // a request to your origin. When the requested object is in the edge cache, - // the function doesn't execute. - // - // * origin-response: The function executes after CloudFront receives a response - // from the origin and before it caches the object in the response. When - // the requested object is in the edge cache, the function doesn't execute. - // - // If the origin returns an HTTP status code other than HTTP 200 (OK), the function - // doesn't execute. - // - // * viewer-response: The function executes before CloudFront returns the - // requested object to the viewer. The function executes regardless of whether - // the object was already in the edge cache. - // - // If the origin returns an HTTP status code other than HTTP 200 (OK), the function - // doesn't execute. - EventType *string `type:"string" enum:"EventType"` +// The returned result of the corresponding request. +type ListStreamingDistributionsOutput struct { + _ struct{} `type:"structure" payload:"StreamingDistributionList"` - // The ARN of the Lambda function. You must specify the ARN of a function version; - // you can't specify a Lambda alias or $LATEST. - LambdaFunctionARN *string `type:"string"` + // The StreamingDistributionList type. + StreamingDistributionList *StreamingDistributionList `type:"structure"` } // String returns the string representation -func (s LambdaFunctionAssociation) String() string { +func (s ListStreamingDistributionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LambdaFunctionAssociation) GoString() string { +func (s ListStreamingDistributionsOutput) GoString() string { return s.String() } -// SetEventType sets the EventType field's value. -func (s *LambdaFunctionAssociation) SetEventType(v string) *LambdaFunctionAssociation { - s.EventType = &v - return s -} - -// SetLambdaFunctionARN sets the LambdaFunctionARN field's value. -func (s *LambdaFunctionAssociation) SetLambdaFunctionARN(v string) *LambdaFunctionAssociation { - s.LambdaFunctionARN = &v +// SetStreamingDistributionList sets the StreamingDistributionList field's value. +func (s *ListStreamingDistributionsOutput) SetStreamingDistributionList(v *StreamingDistributionList) *ListStreamingDistributionsOutput { + s.StreamingDistributionList = v return s } -// A complex type that specifies a list of Lambda functions associations for -// a cache behavior. -// -// If you want to invoke one or more Lambda functions triggered by requests -// that match the PathPattern of the cache behavior, specify the applicable -// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation -// items in this list (one for each possible value of EventType) and each EventType -// can be associated with the Lambda function only once. -// -// If you don't want to invoke any Lambda functions for the requests that match -// PathPattern, specify 0 for Quantity and omit Items. -type LambdaFunctionAssociations struct { +// The request to list tags for a CloudFront resource. +type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - // Optional: A complex type that contains LambdaFunctionAssociation items for - // this cache behavior. If Quantity is 0, you can omit Items. - Items []*LambdaFunctionAssociation `locationNameList:"LambdaFunctionAssociation" type:"list"` - - // The number of Lambda function associations for this cache behavior. + // An ARN of a CloudFront resource. // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // Resource is a required field + Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"` } // String returns the string representation -func (s LambdaFunctionAssociations) String() string { +func (s ListTagsForResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LambdaFunctionAssociations) GoString() string { +func (s ListTagsForResourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaFunctionAssociations) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociations"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.Resource == nil { + invalidParams.Add(request.NewErrParamRequired("Resource")) } if invalidParams.Len() > 0 { @@ -7583,118 +11624,251 @@ func (s *LambdaFunctionAssociations) Validate() error { return nil } -// SetItems sets the Items field's value. -func (s *LambdaFunctionAssociations) SetItems(v []*LambdaFunctionAssociation) *LambdaFunctionAssociations { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *LambdaFunctionAssociations) SetQuantity(v int64) *LambdaFunctionAssociations { - s.Quantity = &v +// SetResource sets the Resource field's value. +func (s *ListTagsForResourceInput) SetResource(v string) *ListTagsForResourceInput { + s.Resource = &v return s } -// The request to list origin access identities. -type ListCloudFrontOriginAccessIdentitiesInput struct { - _ struct{} `type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of origin access identities. The results include identities in the list that - // occur after the marker. To get the next page of results, set the Marker to - // the value of the NextMarker from the current page's response (which is also - // the ID of the last identity on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` +// The returned result of the corresponding request. +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure" payload:"Tags"` - // The maximum number of origin access identities you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` + // A complex type that contains zero or more Tag elements. + // + // Tags is a required field + Tags *Tags `type:"structure" required:"true"` } // String returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesInput) String() string { +func (s ListTagsForResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesInput) GoString() string { +func (s ListTagsForResourceOutput) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMarker(v string) *ListCloudFrontOriginAccessIdentitiesInput { - s.Marker = &v +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v *Tags) *ListTagsForResourceOutput { + s.Tags = v return s } -// SetMaxItems sets the MaxItems field's value. -func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMaxItems(v int64) *ListCloudFrontOriginAccessIdentitiesInput { - s.MaxItems = &v - return s -} +// A complex type that controls whether access logs are written for the distribution. +type LoggingConfig struct { + _ struct{} `type:"structure"` -// The returned result of the corresponding request. -type ListCloudFrontOriginAccessIdentitiesOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityList"` + // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com. + // + // Bucket is a required field + Bucket *string `type:"string" required:"true"` - // The CloudFrontOriginAccessIdentityList type. - CloudFrontOriginAccessIdentityList *OriginAccessIdentityList `type:"structure"` + // Specifies whether you want CloudFront to save access logs to an Amazon S3 + // bucket. If you don't want to enable logging when you create a distribution + // or if you want to disable logging for an existing distribution, specify false + // for Enabled, and specify empty Bucket and Prefix elements. If you specify + // false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, + // the values are automatically deleted. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` + + // Specifies whether you want CloudFront to include cookies in access logs, + // specify true for IncludeCookies. If you choose to include cookies in logs, + // CloudFront logs all cookies regardless of how you configure the cache behaviors + // for this distribution. If you don't want to include cookies when you create + // a distribution or if you want to disable include cookies for an existing + // distribution, specify false for IncludeCookies. + // + // IncludeCookies is a required field + IncludeCookies *bool `type:"boolean" required:"true"` + + // An optional string that you want CloudFront to prefix to the access log filenames + // for this distribution, for example, myprefix/. If you want to enable logging, + // but you don't want to specify a prefix, you still must include an empty Prefix + // element in the Logging element. + // + // Prefix is a required field + Prefix *string `type:"string" required:"true"` } // String returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesOutput) String() string { +func (s LoggingConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListCloudFrontOriginAccessIdentitiesOutput) GoString() string { +func (s LoggingConfig) GoString() string { return s.String() } -// SetCloudFrontOriginAccessIdentityList sets the CloudFrontOriginAccessIdentityList field's value. -func (s *ListCloudFrontOriginAccessIdentitiesOutput) SetCloudFrontOriginAccessIdentityList(v *OriginAccessIdentityList) *ListCloudFrontOriginAccessIdentitiesOutput { - s.CloudFrontOriginAccessIdentityList = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoggingConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + if s.IncludeCookies == nil { + invalidParams.Add(request.NewErrParamRequired("IncludeCookies")) + } + if s.Prefix == nil { + invalidParams.Add(request.NewErrParamRequired("Prefix")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *LoggingConfig) SetBucket(v string) *LoggingConfig { + s.Bucket = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig { + s.Enabled = &v + return s +} + +// SetIncludeCookies sets the IncludeCookies field's value. +func (s *LoggingConfig) SetIncludeCookies(v bool) *LoggingConfig { + s.IncludeCookies = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig { + s.Prefix = &v return s } -// The request to list distributions that are associated with a specified AWS -// WAF web ACL. -type ListDistributionsByWebACLIdInput struct { +// A complex type that describes the Amazon S3 bucket or the HTTP server (for +// example, a web server) from which CloudFront gets your files. You must create +// at least one origin. +// +// For the current limit on the number of origins that you can create for a +// distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) +// in the AWS General Reference. +type Origin struct { _ struct{} `type:"structure"` - // Use Marker and MaxItems to control pagination of results. If you have more - // than MaxItems distributions that satisfy the request, the response includes - // a NextMarker element. To get the next page of results, submit another request. - // For the value of Marker, specify the value of NextMarker from the last response. - // (For the first request, omit Marker.) - Marker *string `location:"querystring" locationName:"Marker" type:"string"` + // A complex type that contains names and values for the custom headers that + // you want. + CustomHeaders *CustomHeaders `type:"structure"` - // The maximum number of distributions that you want CloudFront to return in - // the response body. The maximum and default values are both 100. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` + // A complex type that contains information about a custom origin. If the origin + // is an Amazon S3 bucket, use the S3OriginConfig element instead. + CustomOriginConfig *CustomOriginConfig `type:"structure"` - // The ID of the AWS WAF web ACL that you want to list the associated distributions. - // If you specify "null" for the ID, the request returns a list of the distributions - // that aren't associated with a web ACL. + // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want + // CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. // - // WebACLId is a required field - WebACLId *string `location:"uri" locationName:"WebACLId" type:"string" required:"true"` + // Constraints for Amazon S3 origins: + // + // * If you configured Amazon S3 Transfer Acceleration for your bucket, don't + // specify the s3-accelerate endpoint for DomainName. + // + // * The bucket name must be between 3 and 63 characters long (inclusive). + // + // * The bucket name must contain only lowercase characters, numbers, periods, + // underscores, and dashes. + // + // * The bucket name must not contain adjacent periods. + // + // Custom Origins: The DNS domain name for the HTTP server from which you want + // CloudFront to get objects for this origin, for example, www.example.com. + // + // Constraints for custom origins: + // + // * DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9, + // dot (.), hyphen (-), or underscore (_) characters. + // + // * The name cannot exceed 128 characters. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // A unique identifier for the origin. The value of Id must be unique within + // the distribution. + // + // When you specify the value of TargetOriginId for the default cache behavior + // or for another cache behavior, you indicate the origin to which you want + // the cache behavior to route requests by specifying the value of the Id element + // for that origin. When a request matches the path pattern for that cache behavior, + // CloudFront routes the request to the specified origin. For more information, + // see Cache Behavior Settings (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) + // in the Amazon CloudFront Developer Guide. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // An optional element that causes CloudFront to request your content from a + // directory in your Amazon S3 bucket or your custom origin. When you include + // the OriginPath element, specify the directory name, beginning with a /. CloudFront + // appends the directory name to the value of DomainName, for example, example.com/production. + // Do not include a / at the end of the directory name. + // + // For example, suppose you've specified the following values for your distribution: + // + // * DomainName: An Amazon S3 bucket named myawsbucket. + // + // * OriginPath: /production + // + // * CNAME: example.com + // + // When a user enters example.com/index.html in a browser, CloudFront sends + // a request to Amazon S3 for myawsbucket/production/index.html. + // + // When a user enters example.com/acme/index.html in a browser, CloudFront sends + // a request to Amazon S3 for myawsbucket/production/acme/index.html. + OriginPath *string `type:"string"` + + // A complex type that contains information about the Amazon S3 origin. If the + // origin is a custom origin, use the CustomOriginConfig element instead. + S3OriginConfig *S3OriginConfig `type:"structure"` } // String returns the string representation -func (s ListDistributionsByWebACLIdInput) String() string { +func (s Origin) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDistributionsByWebACLIdInput) GoString() string { +func (s Origin) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListDistributionsByWebACLIdInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"} - if s.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) +func (s *Origin) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Origin"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.CustomHeaders != nil { + if err := s.CustomHeaders.Validate(); err != nil { + invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams)) + } + } + if s.CustomOriginConfig != nil { + if err := s.CustomOriginConfig.Validate(); err != nil { + invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams)) + } + } + if s.S3OriginConfig != nil { + if err := s.S3OriginConfig.Validate(); err != nil { + invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -7703,148 +11877,137 @@ func (s *ListDistributionsByWebACLIdInput) Validate() error { return nil } -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByWebACLIdInput) SetMarker(v string) *ListDistributionsByWebACLIdInput { - s.Marker = &v +// SetCustomHeaders sets the CustomHeaders field's value. +func (s *Origin) SetCustomHeaders(v *CustomHeaders) *Origin { + s.CustomHeaders = v return s } -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByWebACLIdInput) SetMaxItems(v int64) *ListDistributionsByWebACLIdInput { - s.MaxItems = &v +// SetCustomOriginConfig sets the CustomOriginConfig field's value. +func (s *Origin) SetCustomOriginConfig(v *CustomOriginConfig) *Origin { + s.CustomOriginConfig = v return s } -// SetWebACLId sets the WebACLId field's value. -func (s *ListDistributionsByWebACLIdInput) SetWebACLId(v string) *ListDistributionsByWebACLIdInput { - s.WebACLId = &v +// SetDomainName sets the DomainName field's value. +func (s *Origin) SetDomainName(v string) *Origin { + s.DomainName = &v return s } -// The response to a request to list the distributions that are associated with -// a specified AWS WAF web ACL. -type ListDistributionsByWebACLIdOutput struct { - _ struct{} `type:"structure" payload:"DistributionList"` - - // The DistributionList type. - DistributionList *DistributionList `type:"structure"` -} - -// String returns the string representation -func (s ListDistributionsByWebACLIdOutput) String() string { - return awsutil.Prettify(s) +// SetId sets the Id field's value. +func (s *Origin) SetId(v string) *Origin { + s.Id = &v + return s } -// GoString returns the string representation -func (s ListDistributionsByWebACLIdOutput) GoString() string { - return s.String() +// SetOriginPath sets the OriginPath field's value. +func (s *Origin) SetOriginPath(v string) *Origin { + s.OriginPath = &v + return s } -// SetDistributionList sets the DistributionList field's value. -func (s *ListDistributionsByWebACLIdOutput) SetDistributionList(v *DistributionList) *ListDistributionsByWebACLIdOutput { - s.DistributionList = v +// SetS3OriginConfig sets the S3OriginConfig field's value. +func (s *Origin) SetS3OriginConfig(v *S3OriginConfig) *Origin { + s.S3OriginConfig = v return s } -// The request to list your distributions. -type ListDistributionsInput struct { +// CloudFront origin access identity. +type OriginAccessIdentity struct { _ struct{} `type:"structure"` - // Use this when paginating results to indicate where to begin in your list - // of distributions. The results include distributions in the list that occur - // after the marker. To get the next page of results, set the Marker to the - // value of the NextMarker from the current page's response (which is also the - // ID of the last distribution on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` + // The current configuration information for the identity. + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` - // The maximum number of distributions you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` + // The ID for the origin access identity, for example, E74FTE3AJFJ256A. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The Amazon S3 canonical user ID for the origin access identity, used when + // giving the origin access identity read permission to an object in Amazon + // S3. + // + // S3CanonicalUserId is a required field + S3CanonicalUserId *string `type:"string" required:"true"` } // String returns the string representation -func (s ListDistributionsInput) String() string { +func (s OriginAccessIdentity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListDistributionsInput) GoString() string { +func (s OriginAccessIdentity) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *ListDistributionsInput) SetMarker(v string) *ListDistributionsInput { - s.Marker = &v +// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. +func (s *OriginAccessIdentity) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *OriginAccessIdentity { + s.CloudFrontOriginAccessIdentityConfig = v return s } -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsInput) SetMaxItems(v int64) *ListDistributionsInput { - s.MaxItems = &v +// SetId sets the Id field's value. +func (s *OriginAccessIdentity) SetId(v string) *OriginAccessIdentity { + s.Id = &v return s } -// The returned result of the corresponding request. -type ListDistributionsOutput struct { - _ struct{} `type:"structure" payload:"DistributionList"` - - // The DistributionList type. - DistributionList *DistributionList `type:"structure"` -} - -// String returns the string representation -func (s ListDistributionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListDistributionsOutput) GoString() string { - return s.String() -} - -// SetDistributionList sets the DistributionList field's value. -func (s *ListDistributionsOutput) SetDistributionList(v *DistributionList) *ListDistributionsOutput { - s.DistributionList = v +// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. +func (s *OriginAccessIdentity) SetS3CanonicalUserId(v string) *OriginAccessIdentity { + s.S3CanonicalUserId = &v return s } -// The request to list invalidations. -type ListInvalidationsInput struct { +// Origin access identity configuration. Send a GET request to the /CloudFront +// API version/CloudFront/identity ID/config resource. +type OriginAccessIdentityConfig struct { _ struct{} `type:"structure"` - // The distribution's ID. + // A unique number that ensures the request can't be replayed. + // + // If the CallerReference is new (no matter the content of the CloudFrontOriginAccessIdentityConfig + // object), a new origin access identity is created. + // + // If the CallerReference is a value already sent in a previous identity request, + // and the content of the CloudFrontOriginAccessIdentityConfig is identical + // to the original request (ignoring white space), the response includes the + // same information returned to the original request. + // + // If the CallerReference is a value you already sent in a previous request + // to create an identity, but the content of the CloudFrontOriginAccessIdentityConfig + // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists + // error. // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // Use this parameter when paginating results to indicate where to begin in - // your list of invalidation batches. Because the results are returned in decreasing - // order from most recent to oldest, the most recent results are on the first - // page, the second page will contain earlier results, and so on. To get the - // next page of results, set Marker to the value of the NextMarker from the - // current page's response. This value is the same as the ID of the last invalidation - // batch on that page. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` + // CallerReference is a required field + CallerReference *string `type:"string" required:"true"` - // The maximum number of invalidation batches that you want in the response - // body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` + // Any comments you want to include about the origin access identity. + // + // Comment is a required field + Comment *string `type:"string" required:"true"` } // String returns the string representation -func (s ListInvalidationsInput) String() string { +func (s OriginAccessIdentityConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListInvalidationsInput) GoString() string { +func (s OriginAccessIdentityConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListInvalidationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) +func (s *OriginAccessIdentityConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"} + if s.CallerReference == nil { + invalidParams.Add(request.NewErrParamRequired("CallerReference")) + } + if s.Comment == nil { + invalidParams.Add(request.NewErrParamRequired("Comment")) } if invalidParams.Len() > 0 { @@ -7853,232 +12016,254 @@ func (s *ListInvalidationsInput) Validate() error { return nil } -// SetDistributionId sets the DistributionId field's value. -func (s *ListInvalidationsInput) SetDistributionId(v string) *ListInvalidationsInput { - s.DistributionId = &v +// SetCallerReference sets the CallerReference field's value. +func (s *OriginAccessIdentityConfig) SetCallerReference(v string) *OriginAccessIdentityConfig { + s.CallerReference = &v return s } -// SetMarker sets the Marker field's value. -func (s *ListInvalidationsInput) SetMarker(v string) *ListInvalidationsInput { - s.Marker = &v +// SetComment sets the Comment field's value. +func (s *OriginAccessIdentityConfig) SetComment(v string) *OriginAccessIdentityConfig { + s.Comment = &v return s } -// SetMaxItems sets the MaxItems field's value. -func (s *ListInvalidationsInput) SetMaxItems(v int64) *ListInvalidationsInput { - s.MaxItems = &v - return s -} +// Lists the origin access identities for CloudFront.Send a GET request to the +// /CloudFront API version/origin-access-identity/cloudfront resource. The response +// includes a CloudFrontOriginAccessIdentityList element with zero or more CloudFrontOriginAccessIdentitySummary +// child elements. By default, your entire list of origin access identities +// is returned in one single page. If the list is long, you can paginate it +// using the MaxItems and Marker parameters. +type OriginAccessIdentityList struct { + _ struct{} `type:"structure"` -// The returned result of the corresponding request. -type ListInvalidationsOutput struct { - _ struct{} `type:"structure" payload:"InvalidationList"` + // A flag that indicates whether more origin access identities remain to be + // listed. If your results were truncated, you can make a follow-up pagination + // request using the Marker request parameter to retrieve more items in the + // list. + // + // IsTruncated is a required field + IsTruncated *bool `type:"boolean" required:"true"` - // Information about invalidation batches. - InvalidationList *InvalidationList `type:"structure"` + // A complex type that contains one CloudFrontOriginAccessIdentitySummary element + // for each origin access identity that was created by the current AWS account. + Items []*OriginAccessIdentitySummary `locationNameList:"CloudFrontOriginAccessIdentitySummary" type:"list"` + + // Use this when paginating results to indicate where to begin in your list + // of origin access identities. The results include identities in the list that + // occur after the marker. To get the next page of results, set the Marker to + // the value of the NextMarker from the current page's response (which is also + // the ID of the last identity on that page). + // + // Marker is a required field + Marker *string `type:"string" required:"true"` + + // The maximum number of origin access identities you want in the response body. + // + // MaxItems is a required field + MaxItems *int64 `type:"integer" required:"true"` + + // If IsTruncated is true, this element is present and contains the value you + // can use for the Marker request parameter to continue listing your origin + // access identities where they left off. + NextMarker *string `type:"string"` + + // The number of CloudFront origin access identities that were created by the + // current AWS account. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s ListInvalidationsOutput) String() string { +func (s OriginAccessIdentityList) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListInvalidationsOutput) GoString() string { +func (s OriginAccessIdentityList) GoString() string { return s.String() } -// SetInvalidationList sets the InvalidationList field's value. -func (s *ListInvalidationsOutput) SetInvalidationList(v *InvalidationList) *ListInvalidationsOutput { - s.InvalidationList = v +// SetIsTruncated sets the IsTruncated field's value. +func (s *OriginAccessIdentityList) SetIsTruncated(v bool) *OriginAccessIdentityList { + s.IsTruncated = &v return s } -// The request to list your streaming distributions. -type ListStreamingDistributionsInput struct { - _ struct{} `type:"structure"` - - // The value that you provided for the Marker request parameter. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The value that you provided for the MaxItems request parameter. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` -} - -// String returns the string representation -func (s ListStreamingDistributionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamingDistributionsInput) GoString() string { - return s.String() +// SetItems sets the Items field's value. +func (s *OriginAccessIdentityList) SetItems(v []*OriginAccessIdentitySummary) *OriginAccessIdentityList { + s.Items = v + return s } // SetMarker sets the Marker field's value. -func (s *ListStreamingDistributionsInput) SetMarker(v string) *ListStreamingDistributionsInput { +func (s *OriginAccessIdentityList) SetMarker(v string) *OriginAccessIdentityList { s.Marker = &v return s } // SetMaxItems sets the MaxItems field's value. -func (s *ListStreamingDistributionsInput) SetMaxItems(v int64) *ListStreamingDistributionsInput { +func (s *OriginAccessIdentityList) SetMaxItems(v int64) *OriginAccessIdentityList { s.MaxItems = &v return s } -// The returned result of the corresponding request. -type ListStreamingDistributionsOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionList"` - - // The StreamingDistributionList type. - StreamingDistributionList *StreamingDistributionList `type:"structure"` -} - -// String returns the string representation -func (s ListStreamingDistributionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListStreamingDistributionsOutput) GoString() string { - return s.String() +// SetNextMarker sets the NextMarker field's value. +func (s *OriginAccessIdentityList) SetNextMarker(v string) *OriginAccessIdentityList { + s.NextMarker = &v + return s } -// SetStreamingDistributionList sets the StreamingDistributionList field's value. -func (s *ListStreamingDistributionsOutput) SetStreamingDistributionList(v *StreamingDistributionList) *ListStreamingDistributionsOutput { - s.StreamingDistributionList = v +// SetQuantity sets the Quantity field's value. +func (s *OriginAccessIdentityList) SetQuantity(v int64) *OriginAccessIdentityList { + s.Quantity = &v return s } -// The request to list tags for a CloudFront resource. -type ListTagsForResourceInput struct { +// Summary of the information about a CloudFront origin access identity. +type OriginAccessIdentitySummary struct { _ struct{} `type:"structure"` - // An ARN of a CloudFront resource. + // The comment for this origin access identity, as originally specified when + // created. // - // Resource is a required field - Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"` + // Comment is a required field + Comment *string `type:"string" required:"true"` + + // The ID for the origin access identity. For example: E74FTE3AJFJ256A. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The Amazon S3 canonical user ID for the origin access identity, which you + // use when giving the origin access identity read permission to an object in + // Amazon S3. + // + // S3CanonicalUserId is a required field + S3CanonicalUserId *string `type:"string" required:"true"` } // String returns the string representation -func (s ListTagsForResourceInput) String() string { +func (s OriginAccessIdentitySummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListTagsForResourceInput) GoString() string { +func (s OriginAccessIdentitySummary) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } +// SetComment sets the Comment field's value. +func (s *OriginAccessIdentitySummary) SetComment(v string) *OriginAccessIdentitySummary { + s.Comment = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetId sets the Id field's value. +func (s *OriginAccessIdentitySummary) SetId(v string) *OriginAccessIdentitySummary { + s.Id = &v + return s } -// SetResource sets the Resource field's value. -func (s *ListTagsForResourceInput) SetResource(v string) *ListTagsForResourceInput { - s.Resource = &v +// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. +func (s *OriginAccessIdentitySummary) SetS3CanonicalUserId(v string) *OriginAccessIdentitySummary { + s.S3CanonicalUserId = &v return s } -// The returned result of the corresponding request. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure" payload:"Tags"` +// A complex type that contains HeaderName and HeaderValue elements, if any, +// for this distribution. +type OriginCustomHeader struct { + _ struct{} `type:"structure"` - // A complex type that contains zero or more Tag elements. + // The name of a header that you want CloudFront to forward to your origin. + // For more information, see Forwarding Custom Headers to Your Origin (Web Distributions + // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html) + // in the Amazon Amazon CloudFront Developer Guide. // - // Tags is a required field - Tags *Tags `type:"structure" required:"true"` + // HeaderName is a required field + HeaderName *string `type:"string" required:"true"` + + // The value for the header that you specified in the HeaderName field. + // + // HeaderValue is a required field + HeaderValue *string `type:"string" required:"true"` } // String returns the string representation -func (s ListTagsForResourceOutput) String() string { +func (s OriginCustomHeader) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() +// GoString returns the string representation +func (s OriginCustomHeader) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginCustomHeader) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"} + if s.HeaderName == nil { + invalidParams.Add(request.NewErrParamRequired("HeaderName")) + } + if s.HeaderValue == nil { + invalidParams.Add(request.NewErrParamRequired("HeaderValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHeaderName sets the HeaderName field's value. +func (s *OriginCustomHeader) SetHeaderName(v string) *OriginCustomHeader { + s.HeaderName = &v + return s } -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v *Tags) *ListTagsForResourceOutput { - s.Tags = v +// SetHeaderValue sets the HeaderValue field's value. +func (s *OriginCustomHeader) SetHeaderValue(v string) *OriginCustomHeader { + s.HeaderValue = &v return s } -// A complex type that controls whether access logs are written for the distribution. -type LoggingConfig struct { +// A complex type that contains information about the SSL/TLS protocols that +// CloudFront can use when establishing an HTTPS connection with your origin. +type OriginSslProtocols struct { _ struct{} `type:"structure"` - // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // Specifies whether you want CloudFront to save access logs to an Amazon S3 - // bucket. If you don't want to enable logging when you create a distribution - // or if you want to disable logging for an existing distribution, specify false - // for Enabled, and specify empty Bucket and Prefix elements. If you specify - // false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, - // the values are automatically deleted. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Specifies whether you want CloudFront to include cookies in access logs, - // specify true for IncludeCookies. If you choose to include cookies in logs, - // CloudFront logs all cookies regardless of how you configure the cache behaviors - // for this distribution. If you don't want to include cookies when you create - // a distribution or if you want to disable include cookies for an existing - // distribution, specify false for IncludeCookies. + // A list that contains allowed SSL/TLS protocols for this distribution. // - // IncludeCookies is a required field - IncludeCookies *bool `type:"boolean" required:"true"` + // Items is a required field + Items []*string `locationNameList:"SslProtocol" type:"list" required:"true"` - // An optional string that you want CloudFront to prefix to the access log filenames - // for this distribution, for example, myprefix/. If you want to enable logging, - // but you don't want to specify a prefix, you still must include an empty Prefix - // element in the Logging element. + // The number of SSL/TLS protocols that you want to allow CloudFront to use + // when establishing an HTTPS connection with this origin. // - // Prefix is a required field - Prefix *string `type:"string" required:"true"` + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s LoggingConfig) String() string { +func (s OriginSslProtocols) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoggingConfig) GoString() string { +func (s OriginSslProtocols) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *LoggingConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.IncludeCookies == nil { - invalidParams.Add(request.NewErrParamRequired("IncludeCookies")) +func (s *OriginSslProtocols) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) } if invalidParams.Len() > 0 { @@ -8087,148 +12272,58 @@ func (s *LoggingConfig) Validate() error { return nil } -// SetBucket sets the Bucket field's value. -func (s *LoggingConfig) SetBucket(v string) *LoggingConfig { - s.Bucket = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig { - s.Enabled = &v - return s -} - -// SetIncludeCookies sets the IncludeCookies field's value. -func (s *LoggingConfig) SetIncludeCookies(v bool) *LoggingConfig { - s.IncludeCookies = &v +// SetItems sets the Items field's value. +func (s *OriginSslProtocols) SetItems(v []*string) *OriginSslProtocols { + s.Items = v return s } -// SetPrefix sets the Prefix field's value. -func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig { - s.Prefix = &v +// SetQuantity sets the Quantity field's value. +func (s *OriginSslProtocols) SetQuantity(v int64) *OriginSslProtocols { + s.Quantity = &v return s } -// A complex type that describes the Amazon S3 bucket or the HTTP server (for -// example, a web server) from which CloudFront gets your files. You must create -// at least one origin. -// -// For the current limit on the number of origins that you can create for a -// distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) -// in the AWS General Reference. -type Origin struct { +// A complex type that contains information about origins for this distribution. +type Origins struct { _ struct{} `type:"structure"` - // A complex type that contains names and values for the custom headers that - // you want. - CustomHeaders *CustomHeaders `type:"structure"` - - // A complex type that contains information about a custom origin. If the origin - // is an Amazon S3 bucket, use the S3OriginConfig element instead. - CustomOriginConfig *CustomOriginConfig `type:"structure"` - - // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want - // CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. - // - // Constraints for Amazon S3 origins: - // - // * If you configured Amazon S3 Transfer Acceleration for your bucket, don't - // specify the s3-accelerate endpoint for DomainName. - // - // * The bucket name must be between 3 and 63 characters long (inclusive). - // - // * The bucket name must contain only lowercase characters, numbers, periods, - // underscores, and dashes. - // - // * The bucket name must not contain adjacent periods. - // - // Custom Origins: The DNS domain name for the HTTP server from which you want - // CloudFront to get objects for this origin, for example, www.example.com. - // - // Constraints for custom origins: - // - // * DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9, - // dot (.), hyphen (-), or underscore (_) characters. - // - // * The name cannot exceed 128 characters. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // A unique identifier for the origin. The value of Id must be unique within - // the distribution. - // - // When you specify the value of TargetOriginId for the default cache behavior - // or for another cache behavior, you indicate the origin to which you want - // the cache behavior to route requests by specifying the value of the Id element - // for that origin. When a request matches the path pattern for that cache behavior, - // CloudFront routes the request to the specified origin. For more information, - // see Cache Behavior Settings (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) - // in the Amazon CloudFront Developer Guide. - // - // Id is a required field - Id *string `type:"string" required:"true"` + // A complex type that contains origins for this distribution. + Items []*Origin `locationNameList:"Origin" min:"1" type:"list"` - // An optional element that causes CloudFront to request your content from a - // directory in your Amazon S3 bucket or your custom origin. When you include - // the OriginPath element, specify the directory name, beginning with a /. CloudFront - // appends the directory name to the value of DomainName, for example, example.com/production. - // Do not include a / at the end of the directory name. - // - // For example, suppose you've specified the following values for your distribution: - // - // * DomainName: An Amazon S3 bucket named myawsbucket. - // - // * OriginPath: /production - // - // * CNAME: example.com - // - // When a user enters example.com/index.html in a browser, CloudFront sends - // a request to Amazon S3 for myawsbucket/production/index.html. + // The number of origins for this distribution. // - // When a user enters example.com/acme/index.html in a browser, CloudFront sends - // a request to Amazon S3 for myawsbucket/production/acme/index.html. - OriginPath *string `type:"string"` - - // A complex type that contains information about the Amazon S3 origin. If the - // origin is a custom origin, use the CustomOriginConfig element instead. - S3OriginConfig *S3OriginConfig `type:"structure"` + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s Origin) String() string { +func (s Origins) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Origin) GoString() string { +func (s Origins) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *Origin) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Origin"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.CustomHeaders != nil { - if err := s.CustomHeaders.Validate(); err != nil { - invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams)) - } +func (s *Origins) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Origins"} + if s.Items != nil && len(s.Items) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Items", 1)) } - if s.CustomOriginConfig != nil { - if err := s.CustomOriginConfig.Validate(); err != nil { - invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams)) - } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) } - if s.S3OriginConfig != nil { - if err := s.S3OriginConfig.Validate(); err != nil { - invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams)) + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } } } @@ -8238,137 +12333,166 @@ func (s *Origin) Validate() error { return nil } -// SetCustomHeaders sets the CustomHeaders field's value. -func (s *Origin) SetCustomHeaders(v *CustomHeaders) *Origin { - s.CustomHeaders = v +// SetItems sets the Items field's value. +func (s *Origins) SetItems(v []*Origin) *Origins { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *Origins) SetQuantity(v int64) *Origins { + s.Quantity = &v return s } -// SetCustomOriginConfig sets the CustomOriginConfig field's value. -func (s *Origin) SetCustomOriginConfig(v *CustomOriginConfig) *Origin { - s.CustomOriginConfig = v - return s +// A complex type that contains information about the objects that you want +// to invalidate. For more information, see Specifying the Objects to Invalidate +// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) +// in the Amazon CloudFront Developer Guide. +type Paths struct { + _ struct{} `type:"structure"` + + // A complex type that contains a list of the paths that you want to invalidate. + Items []*string `locationNameList:"Path" type:"list"` + + // The number of objects that you want to invalidate. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s Paths) String() string { + return awsutil.Prettify(s) } -// SetDomainName sets the DomainName field's value. -func (s *Origin) SetDomainName(v string) *Origin { - s.DomainName = &v - return s +// GoString returns the string representation +func (s Paths) GoString() string { + return s.String() } -// SetId sets the Id field's value. -func (s *Origin) SetId(v string) *Origin { - s.Id = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *Paths) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Paths"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetOriginPath sets the OriginPath field's value. -func (s *Origin) SetOriginPath(v string) *Origin { - s.OriginPath = &v +// SetItems sets the Items field's value. +func (s *Paths) SetItems(v []*string) *Paths { + s.Items = v return s } -// SetS3OriginConfig sets the S3OriginConfig field's value. -func (s *Origin) SetS3OriginConfig(v *S3OriginConfig) *Origin { - s.S3OriginConfig = v +// SetQuantity sets the Quantity field's value. +func (s *Paths) SetQuantity(v int64) *Paths { + s.Quantity = &v return s } -// CloudFront origin access identity. -type OriginAccessIdentity struct { +// A complex data type of public keys you add to CloudFront to use with features +// like field-level encryption. +type PublicKey struct { _ struct{} `type:"structure"` - // The current configuration information for the identity. - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` + // A time you added a public key to CloudFront. + // + // CreatedTime is a required field + CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` - // The ID for the origin access identity, for example, E74FTE3AJFJ256A. + // A unique ID assigned to a public key you've added to CloudFront. // // Id is a required field Id *string `type:"string" required:"true"` - // The Amazon S3 canonical user ID for the origin access identity, used when - // giving the origin access identity read permission to an object in Amazon - // S3. + // A complex data type for a public key you add to CloudFront to use with features + // like field-level encryption. // - // S3CanonicalUserId is a required field - S3CanonicalUserId *string `type:"string" required:"true"` + // PublicKeyConfig is a required field + PublicKeyConfig *PublicKeyConfig `type:"structure" required:"true"` } // String returns the string representation -func (s OriginAccessIdentity) String() string { +func (s PublicKey) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OriginAccessIdentity) GoString() string { +func (s PublicKey) GoString() string { return s.String() } -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *OriginAccessIdentity) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *OriginAccessIdentity { - s.CloudFrontOriginAccessIdentityConfig = v +// SetCreatedTime sets the CreatedTime field's value. +func (s *PublicKey) SetCreatedTime(v time.Time) *PublicKey { + s.CreatedTime = &v return s } // SetId sets the Id field's value. -func (s *OriginAccessIdentity) SetId(v string) *OriginAccessIdentity { +func (s *PublicKey) SetId(v string) *PublicKey { s.Id = &v return s } -// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. -func (s *OriginAccessIdentity) SetS3CanonicalUserId(v string) *OriginAccessIdentity { - s.S3CanonicalUserId = &v +// SetPublicKeyConfig sets the PublicKeyConfig field's value. +func (s *PublicKey) SetPublicKeyConfig(v *PublicKeyConfig) *PublicKey { + s.PublicKeyConfig = v return s } -// Origin access identity configuration. Send a GET request to the /CloudFront -// API version/CloudFront/identity ID/config resource. -type OriginAccessIdentityConfig struct { +// Information about a public key you add to CloudFront to use with features +// like field-level encryption. +type PublicKeyConfig struct { _ struct{} `type:"structure"` // A unique number that ensures the request can't be replayed. // - // If the CallerReference is new (no matter the content of the CloudFrontOriginAccessIdentityConfig - // object), a new origin access identity is created. - // - // If the CallerReference is a value already sent in a previous identity request, - // and the content of the CloudFrontOriginAccessIdentityConfig is identical - // to the original request (ignoring white space), the response includes the - // same information returned to the original request. - // - // If the CallerReference is a value you already sent in a previous request - // to create an identity, but the content of the CloudFrontOriginAccessIdentityConfig - // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists - // error. - // // CallerReference is a required field CallerReference *string `type:"string" required:"true"` - // Any comments you want to include about the origin access identity. + // An optional comment about a public key. + Comment *string `type:"string"` + + // The encoded public key that you want to add to CloudFront to use with features + // like field-level encryption. // - // Comment is a required field - Comment *string `type:"string" required:"true"` + // EncodedKey is a required field + EncodedKey *string `type:"string" required:"true"` + + // The name for a public key you add to CloudFront to use with features like + // field-level encryption. + // + // Name is a required field + Name *string `type:"string" required:"true"` } // String returns the string representation -func (s OriginAccessIdentityConfig) String() string { +func (s PublicKeyConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OriginAccessIdentityConfig) GoString() string { +func (s PublicKeyConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *OriginAccessIdentityConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"} +func (s *PublicKeyConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PublicKeyConfig"} if s.CallerReference == nil { invalidParams.Add(request.NewErrParamRequired("CallerReference")) } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) + if s.EncodedKey == nil { + invalidParams.Add(request.NewErrParamRequired("EncodedKey")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { @@ -8378,253 +12502,190 @@ func (s *OriginAccessIdentityConfig) Validate() error { } // SetCallerReference sets the CallerReference field's value. -func (s *OriginAccessIdentityConfig) SetCallerReference(v string) *OriginAccessIdentityConfig { +func (s *PublicKeyConfig) SetCallerReference(v string) *PublicKeyConfig { s.CallerReference = &v return s } // SetComment sets the Comment field's value. -func (s *OriginAccessIdentityConfig) SetComment(v string) *OriginAccessIdentityConfig { +func (s *PublicKeyConfig) SetComment(v string) *PublicKeyConfig { s.Comment = &v return s } -// Lists the origin access identities for CloudFront.Send a GET request to the -// /CloudFront API version/origin-access-identity/cloudfront resource. The response -// includes a CloudFrontOriginAccessIdentityList element with zero or more CloudFrontOriginAccessIdentitySummary -// child elements. By default, your entire list of origin access identities -// is returned in one single page. If the list is long, you can paginate it -// using the MaxItems and Marker parameters. -type OriginAccessIdentityList struct { - _ struct{} `type:"structure"` +// SetEncodedKey sets the EncodedKey field's value. +func (s *PublicKeyConfig) SetEncodedKey(v string) *PublicKeyConfig { + s.EncodedKey = &v + return s +} - // A flag that indicates whether more origin access identities remain to be - // listed. If your results were truncated, you can make a follow-up pagination - // request using the Marker request parameter to retrieve more items in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` +// SetName sets the Name field's value. +func (s *PublicKeyConfig) SetName(v string) *PublicKeyConfig { + s.Name = &v + return s +} - // A complex type that contains one CloudFrontOriginAccessIdentitySummary element - // for each origin access identity that was created by the current AWS account. - Items []*OriginAccessIdentitySummary `locationNameList:"CloudFrontOriginAccessIdentitySummary" type:"list"` +// A list of public keys you've added to CloudFront to use with features like +// field-level encryption. +type PublicKeyList struct { + _ struct{} `type:"structure"` - // Use this when paginating results to indicate where to begin in your list - // of origin access identities. The results include identities in the list that - // occur after the marker. To get the next page of results, set the Marker to - // the value of the NextMarker from the current page's response (which is also - // the ID of the last identity on that page). - // - // Marker is a required field - Marker *string `type:"string" required:"true"` + // An array of information about a public key you add to CloudFront to use with + // features like field-level encryption. + Items []*PublicKeySummary `locationNameList:"PublicKeySummary" type:"list"` - // The maximum number of origin access identities you want in the response body. + // The maximum number of public keys you want in the response body. // // MaxItems is a required field MaxItems *int64 `type:"integer" required:"true"` - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your origin - // access identities where they left off. + // If there are more elements to be listed, this element is present and contains + // the value that you can use for the Marker request parameter to continue listing + // your public keys where you left off. NextMarker *string `type:"string"` - // The number of CloudFront origin access identities that were created by the - // current AWS account. + // The number of public keys you added to CloudFront to use with features like + // field-level encryption. // // Quantity is a required field Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s OriginAccessIdentityList) String() string { +func (s PublicKeyList) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OriginAccessIdentityList) GoString() string { +func (s PublicKeyList) GoString() string { return s.String() } -// SetIsTruncated sets the IsTruncated field's value. -func (s *OriginAccessIdentityList) SetIsTruncated(v bool) *OriginAccessIdentityList { - s.IsTruncated = &v - return s -} - // SetItems sets the Items field's value. -func (s *OriginAccessIdentityList) SetItems(v []*OriginAccessIdentitySummary) *OriginAccessIdentityList { +func (s *PublicKeyList) SetItems(v []*PublicKeySummary) *PublicKeyList { s.Items = v return s } -// SetMarker sets the Marker field's value. -func (s *OriginAccessIdentityList) SetMarker(v string) *OriginAccessIdentityList { - s.Marker = &v - return s -} - // SetMaxItems sets the MaxItems field's value. -func (s *OriginAccessIdentityList) SetMaxItems(v int64) *OriginAccessIdentityList { +func (s *PublicKeyList) SetMaxItems(v int64) *PublicKeyList { s.MaxItems = &v return s } // SetNextMarker sets the NextMarker field's value. -func (s *OriginAccessIdentityList) SetNextMarker(v string) *OriginAccessIdentityList { +func (s *PublicKeyList) SetNextMarker(v string) *PublicKeyList { s.NextMarker = &v return s } // SetQuantity sets the Quantity field's value. -func (s *OriginAccessIdentityList) SetQuantity(v int64) *OriginAccessIdentityList { +func (s *PublicKeyList) SetQuantity(v int64) *PublicKeyList { s.Quantity = &v return s } -// Summary of the information about a CloudFront origin access identity. -type OriginAccessIdentitySummary struct { +// Public key information summary. +type PublicKeySummary struct { _ struct{} `type:"structure"` - // The comment for this origin access identity, as originally specified when - // created. + // Comment for public key information summary. + Comment *string `type:"string"` + + // Creation time for public key information summary. // - // Comment is a required field - Comment *string `type:"string" required:"true"` + // CreatedTime is a required field + CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` - // The ID for the origin access identity. For example: E74FTE3AJFJ256A. + // Encoded key for public key information summary. + // + // EncodedKey is a required field + EncodedKey *string `type:"string" required:"true"` + + // ID for public key information summary. // // Id is a required field Id *string `type:"string" required:"true"` - // The Amazon S3 canonical user ID for the origin access identity, which you - // use when giving the origin access identity read permission to an object in - // Amazon S3. + // Name for public key information summary. // - // S3CanonicalUserId is a required field - S3CanonicalUserId *string `type:"string" required:"true"` + // Name is a required field + Name *string `type:"string" required:"true"` } // String returns the string representation -func (s OriginAccessIdentitySummary) String() string { +func (s PublicKeySummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OriginAccessIdentitySummary) GoString() string { +func (s PublicKeySummary) GoString() string { return s.String() } // SetComment sets the Comment field's value. -func (s *OriginAccessIdentitySummary) SetComment(v string) *OriginAccessIdentitySummary { +func (s *PublicKeySummary) SetComment(v string) *PublicKeySummary { s.Comment = &v return s } -// SetId sets the Id field's value. -func (s *OriginAccessIdentitySummary) SetId(v string) *OriginAccessIdentitySummary { - s.Id = &v +// SetCreatedTime sets the CreatedTime field's value. +func (s *PublicKeySummary) SetCreatedTime(v time.Time) *PublicKeySummary { + s.CreatedTime = &v return s } -// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. -func (s *OriginAccessIdentitySummary) SetS3CanonicalUserId(v string) *OriginAccessIdentitySummary { - s.S3CanonicalUserId = &v +// SetEncodedKey sets the EncodedKey field's value. +func (s *PublicKeySummary) SetEncodedKey(v string) *PublicKeySummary { + s.EncodedKey = &v return s } -// A complex type that contains HeaderName and HeaderValue elements, if any, -// for this distribution. -type OriginCustomHeader struct { - _ struct{} `type:"structure"` - - // The name of a header that you want CloudFront to forward to your origin. - // For more information, see Forwarding Custom Headers to Your Origin (Web Distributions - // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html) - // in the Amazon Amazon CloudFront Developer Guide. - // - // HeaderName is a required field - HeaderName *string `type:"string" required:"true"` - - // The value for the header that you specified in the HeaderName field. - // - // HeaderValue is a required field - HeaderValue *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s OriginCustomHeader) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OriginCustomHeader) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginCustomHeader) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"} - if s.HeaderName == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderName")) - } - if s.HeaderValue == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeaderName sets the HeaderName field's value. -func (s *OriginCustomHeader) SetHeaderName(v string) *OriginCustomHeader { - s.HeaderName = &v +// SetId sets the Id field's value. +func (s *PublicKeySummary) SetId(v string) *PublicKeySummary { + s.Id = &v return s } -// SetHeaderValue sets the HeaderValue field's value. -func (s *OriginCustomHeader) SetHeaderValue(v string) *OriginCustomHeader { - s.HeaderValue = &v +// SetName sets the Name field's value. +func (s *PublicKeySummary) SetName(v string) *PublicKeySummary { + s.Name = &v return s } -// A complex type that contains information about the SSL/TLS protocols that -// CloudFront can use when establishing an HTTPS connection with your origin. -type OriginSslProtocols struct { +// Query argument-profile mapping for field-level encryption. +type QueryArgProfile struct { _ struct{} `type:"structure"` - // A list that contains allowed SSL/TLS protocols for this distribution. + // ID of profile to use for field-level encryption query argument-profile mapping // - // Items is a required field - Items []*string `locationNameList:"SslProtocol" type:"list" required:"true"` + // ProfileId is a required field + ProfileId *string `type:"string" required:"true"` - // The number of SSL/TLS protocols that you want to allow CloudFront to use - // when establishing an HTTPS connection with this origin. + // Query argument for field-level encryption query argument-profile mapping. // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // QueryArg is a required field + QueryArg *string `type:"string" required:"true"` } // String returns the string representation -func (s OriginSslProtocols) String() string { +func (s QueryArgProfile) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OriginSslProtocols) GoString() string { +func (s QueryArgProfile) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *OriginSslProtocols) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) +func (s *QueryArgProfile) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueryArgProfile"} + if s.ProfileId == nil { + invalidParams.Add(request.NewErrParamRequired("ProfileId")) } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) + if s.QueryArg == nil { + invalidParams.Add(request.NewErrParamRequired("QueryArg")) } if invalidParams.Len() > 0 { @@ -8633,58 +12694,52 @@ func (s *OriginSslProtocols) Validate() error { return nil } -// SetItems sets the Items field's value. -func (s *OriginSslProtocols) SetItems(v []*string) *OriginSslProtocols { - s.Items = v +// SetProfileId sets the ProfileId field's value. +func (s *QueryArgProfile) SetProfileId(v string) *QueryArgProfile { + s.ProfileId = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *OriginSslProtocols) SetQuantity(v int64) *OriginSslProtocols { - s.Quantity = &v +// SetQueryArg sets the QueryArg field's value. +func (s *QueryArgProfile) SetQueryArg(v string) *QueryArgProfile { + s.QueryArg = &v return s } -// A complex type that contains information about origins for this distribution. -type Origins struct { - _ struct{} `type:"structure"` - - // A complex type that contains origins for this distribution. - Items []*Origin `locationNameList:"Origin" min:"1" type:"list"` - - // The number of origins for this distribution. +// Configuration for query argument-profile mapping for field-level encryption. +type QueryArgProfileConfig struct { + _ struct{} `type:"structure"` + + // Flag to set if you want a request to be forwarded to the origin even if the + // profile specified by the field-level encryption query argument, fle-profile, + // is unknown. // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` + // ForwardWhenQueryArgProfileIsUnknown is a required field + ForwardWhenQueryArgProfileIsUnknown *bool `type:"boolean" required:"true"` + + // Profiles specified for query argument-profile mapping for field-level encryption. + QueryArgProfiles *QueryArgProfiles `type:"structure"` } // String returns the string representation -func (s Origins) String() string { +func (s QueryArgProfileConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Origins) GoString() string { +func (s QueryArgProfileConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *Origins) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Origins"} - if s.Items != nil && len(s.Items) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Items", 1)) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } +func (s *QueryArgProfileConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueryArgProfileConfig"} + if s.ForwardWhenQueryArgProfileIsUnknown == nil { + invalidParams.Add(request.NewErrParamRequired("ForwardWhenQueryArgProfileIsUnknown")) + } + if s.QueryArgProfiles != nil { + if err := s.QueryArgProfiles.Validate(); err != nil { + invalidParams.AddNested("QueryArgProfiles", err.(request.ErrInvalidParams)) } } @@ -8694,50 +12749,57 @@ func (s *Origins) Validate() error { return nil } -// SetItems sets the Items field's value. -func (s *Origins) SetItems(v []*Origin) *Origins { - s.Items = v +// SetForwardWhenQueryArgProfileIsUnknown sets the ForwardWhenQueryArgProfileIsUnknown field's value. +func (s *QueryArgProfileConfig) SetForwardWhenQueryArgProfileIsUnknown(v bool) *QueryArgProfileConfig { + s.ForwardWhenQueryArgProfileIsUnknown = &v return s } -// SetQuantity sets the Quantity field's value. -func (s *Origins) SetQuantity(v int64) *Origins { - s.Quantity = &v +// SetQueryArgProfiles sets the QueryArgProfiles field's value. +func (s *QueryArgProfileConfig) SetQueryArgProfiles(v *QueryArgProfiles) *QueryArgProfileConfig { + s.QueryArgProfiles = v return s } -// A complex type that contains information about the objects that you want -// to invalidate. For more information, see Specifying the Objects to Invalidate -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) -// in the Amazon CloudFront Developer Guide. -type Paths struct { +// Query argument-profile mapping for field-level encryption. +type QueryArgProfiles struct { _ struct{} `type:"structure"` - // A complex type that contains a list of the paths that you want to invalidate. - Items []*string `locationNameList:"Path" type:"list"` + // Number of items for query argument-profile mapping for field-level encryption. + Items []*QueryArgProfile `locationNameList:"QueryArgProfile" type:"list"` - // The number of objects that you want to invalidate. + // Number of profiles for query argument-profile mapping for field-level encryption. // // Quantity is a required field Quantity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s Paths) String() string { +func (s QueryArgProfiles) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Paths) GoString() string { +func (s QueryArgProfiles) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *Paths) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Paths"} +func (s *QueryArgProfiles) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueryArgProfiles"} if s.Quantity == nil { invalidParams.Add(request.NewErrParamRequired("Quantity")) } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -8746,13 +12808,13 @@ func (s *Paths) Validate() error { } // SetItems sets the Items field's value. -func (s *Paths) SetItems(v []*string) *Paths { +func (s *QueryArgProfiles) SetItems(v []*QueryArgProfile) *QueryArgProfiles { s.Items = v return s } // SetQuantity sets the Quantity field's value. -func (s *Paths) SetQuantity(v int64) *Paths { +func (s *QueryArgProfiles) SetQuantity(v int64) *QueryArgProfiles { s.Quantity = &v return s } @@ -9752,7 +13814,7 @@ type TagResourceInput struct { // A complex type that contains zero or more Tag elements. // // Tags is a required field - Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` + Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` } // String returns the string representation @@ -9949,7 +14011,7 @@ type UntagResourceInput struct { // A complex type that contains zero or more Tag key elements. // // TagKeys is a required field - TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` + TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` } // String returns the string representation @@ -10011,7 +14073,7 @@ type UpdateCloudFrontOriginAccessIdentityInput struct { // The identity's configuration information. // // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` // The identity's id. // @@ -10112,7 +14174,7 @@ type UpdateDistributionInput struct { // The distribution's configuration information. // // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` + DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` // The distribution's id. // @@ -10206,6 +14268,304 @@ func (s *UpdateDistributionOutput) SetETag(v string) *UpdateDistributionOutput { return s } +type UpdateFieldLevelEncryptionConfigInput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"` + + // Request to update a field-level encryption configuration. + // + // FieldLevelEncryptionConfig is a required field + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + + // The ID of the configuration you want to update. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header that you received when retrieving the configuration + // identity to update. For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` +} + +// String returns the string representation +func (s UpdateFieldLevelEncryptionConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFieldLevelEncryptionConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFieldLevelEncryptionConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionConfigInput"} + if s.FieldLevelEncryptionConfig == nil { + invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.FieldLevelEncryptionConfig != nil { + if err := s.FieldLevelEncryptionConfig.Validate(); err != nil { + invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. +func (s *UpdateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *UpdateFieldLevelEncryptionConfigInput { + s.FieldLevelEncryptionConfig = v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateFieldLevelEncryptionConfigInput) SetId(v string) *UpdateFieldLevelEncryptionConfigInput { + s.Id = &v + return s +} + +// SetIfMatch sets the IfMatch field's value. +func (s *UpdateFieldLevelEncryptionConfigInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionConfigInput { + s.IfMatch = &v + return s +} + +type UpdateFieldLevelEncryptionConfigOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryption"` + + // The value of the ETag header that you received when updating the configuration. + // For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Return the results of updating the configuration. + FieldLevelEncryption *FieldLevelEncryption `type:"structure"` +} + +// String returns the string representation +func (s UpdateFieldLevelEncryptionConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFieldLevelEncryptionConfigOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *UpdateFieldLevelEncryptionConfigOutput) SetETag(v string) *UpdateFieldLevelEncryptionConfigOutput { + s.ETag = &v + return s +} + +// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. +func (s *UpdateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *UpdateFieldLevelEncryptionConfigOutput { + s.FieldLevelEncryption = v + return s +} + +type UpdateFieldLevelEncryptionProfileInput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"` + + // Request to update a field-level encryption profile. + // + // FieldLevelEncryptionProfileConfig is a required field + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` + + // The ID of the field-level encryption profile request. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header that you received when retrieving the profile + // identity to update. For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` +} + +// String returns the string representation +func (s UpdateFieldLevelEncryptionProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFieldLevelEncryptionProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFieldLevelEncryptionProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionProfileInput"} + if s.FieldLevelEncryptionProfileConfig == nil { + invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.FieldLevelEncryptionProfileConfig != nil { + if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil { + invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. +func (s *UpdateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *UpdateFieldLevelEncryptionProfileInput { + s.FieldLevelEncryptionProfileConfig = v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateFieldLevelEncryptionProfileInput) SetId(v string) *UpdateFieldLevelEncryptionProfileInput { + s.Id = &v + return s +} + +// SetIfMatch sets the IfMatch field's value. +func (s *UpdateFieldLevelEncryptionProfileInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionProfileInput { + s.IfMatch = &v + return s +} + +type UpdateFieldLevelEncryptionProfileOutput struct { + _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` + + // The result of the field-level encryption profile request. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Return the results of updating the profile. + FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"` +} + +// String returns the string representation +func (s UpdateFieldLevelEncryptionProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFieldLevelEncryptionProfileOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *UpdateFieldLevelEncryptionProfileOutput) SetETag(v string) *UpdateFieldLevelEncryptionProfileOutput { + s.ETag = &v + return s +} + +// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. +func (s *UpdateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *UpdateFieldLevelEncryptionProfileOutput { + s.FieldLevelEncryptionProfile = v + return s +} + +type UpdatePublicKeyInput struct { + _ struct{} `type:"structure" payload:"PublicKeyConfig"` + + // ID of the public key to be updated. + // + // Id is a required field + Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` + + // The value of the ETag header that you received when retrieving the public + // key to update. For example: E2QWRUHAPOMQZL. + IfMatch *string `location:"header" locationName:"If-Match" type:"string"` + + // Request to update public key information. + // + // PublicKeyConfig is a required field + PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` +} + +// String returns the string representation +func (s UpdatePublicKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePublicKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdatePublicKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdatePublicKeyInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.PublicKeyConfig == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig")) + } + if s.PublicKeyConfig != nil { + if err := s.PublicKeyConfig.Validate(); err != nil { + invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *UpdatePublicKeyInput) SetId(v string) *UpdatePublicKeyInput { + s.Id = &v + return s +} + +// SetIfMatch sets the IfMatch field's value. +func (s *UpdatePublicKeyInput) SetIfMatch(v string) *UpdatePublicKeyInput { + s.IfMatch = &v + return s +} + +// SetPublicKeyConfig sets the PublicKeyConfig field's value. +func (s *UpdatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *UpdatePublicKeyInput { + s.PublicKeyConfig = v + return s +} + +type UpdatePublicKeyOutput struct { + _ struct{} `type:"structure" payload:"PublicKey"` + + // The current version of the update public key result. For example: E2QWRUHAPOMQZL. + ETag *string `location:"header" locationName:"ETag" type:"string"` + + // Return the results of updating the public key. + PublicKey *PublicKey `type:"structure"` +} + +// String returns the string representation +func (s UpdatePublicKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePublicKeyOutput) GoString() string { + return s.String() +} + +// SetETag sets the ETag field's value. +func (s *UpdatePublicKeyOutput) SetETag(v string) *UpdatePublicKeyOutput { + s.ETag = &v + return s +} + +// SetPublicKey sets the PublicKey field's value. +func (s *UpdatePublicKeyOutput) SetPublicKey(v *PublicKey) *UpdatePublicKeyOutput { + s.PublicKey = v + return s +} + // The request to update a streaming distribution. type UpdateStreamingDistributionInput struct { _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` @@ -10222,7 +14582,7 @@ type UpdateStreamingDistributionInput struct { // The streaming distribution's configuration information. // // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-03-25/"` + StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2017-10-30/"` } // String returns the string representation @@ -10565,6 +14925,11 @@ const ( EventTypeOriginResponse = "origin-response" ) +const ( + // FormatUrlencoded is a Format enum value + FormatUrlencoded = "URLEncoded" +) + const ( // GeoRestrictionTypeBlacklist is a GeoRestrictionType enum value GeoRestrictionTypeBlacklist = "blacklist" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go index 5fb8d3622a2..e5125244fbc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go @@ -8,7 +8,7 @@ // errors. For detailed information about CloudFront features, see the Amazon // CloudFront Developer Guide. // -// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25 for more information on this service. +// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30 for more information on this service. // // See cloudfront package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/ diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go index ed66a11e51b..1f5ce88f1aa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go @@ -18,6 +18,12 @@ const ( // "CNAMEAlreadyExists". ErrCodeCNAMEAlreadyExists = "CNAMEAlreadyExists" + // ErrCodeCannotChangeImmutablePublicKeyFields for service response error code + // "CannotChangeImmutablePublicKeyFields". + // + // You can't change the value of a public key. + ErrCodeCannotChangeImmutablePublicKeyFields = "CannotChangeImmutablePublicKeyFields" + // ErrCodeDistributionAlreadyExists for service response error code // "DistributionAlreadyExists". // @@ -29,6 +35,43 @@ const ( // "DistributionNotDisabled". ErrCodeDistributionNotDisabled = "DistributionNotDisabled" + // ErrCodeFieldLevelEncryptionConfigAlreadyExists for service response error code + // "FieldLevelEncryptionConfigAlreadyExists". + // + // The specified configuration for field-level encryption already exists. + ErrCodeFieldLevelEncryptionConfigAlreadyExists = "FieldLevelEncryptionConfigAlreadyExists" + + // ErrCodeFieldLevelEncryptionConfigInUse for service response error code + // "FieldLevelEncryptionConfigInUse". + // + // The specified configuration for field-level encryption is in use. + ErrCodeFieldLevelEncryptionConfigInUse = "FieldLevelEncryptionConfigInUse" + + // ErrCodeFieldLevelEncryptionProfileAlreadyExists for service response error code + // "FieldLevelEncryptionProfileAlreadyExists". + // + // The specified profile for field-level encryption already exists. + ErrCodeFieldLevelEncryptionProfileAlreadyExists = "FieldLevelEncryptionProfileAlreadyExists" + + // ErrCodeFieldLevelEncryptionProfileInUse for service response error code + // "FieldLevelEncryptionProfileInUse". + // + // The specified profile for field-level encryption is in use. + ErrCodeFieldLevelEncryptionProfileInUse = "FieldLevelEncryptionProfileInUse" + + // ErrCodeFieldLevelEncryptionProfileSizeExceeded for service response error code + // "FieldLevelEncryptionProfileSizeExceeded". + // + // The maximum size of a profile for field-level encryption was exceeded. + ErrCodeFieldLevelEncryptionProfileSizeExceeded = "FieldLevelEncryptionProfileSizeExceeded" + + // ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior for service response error code + // "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior". + // + // The specified configuration for field-level encryption can't be associated + // with the specified cache behavior. + ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior = "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" + // ErrCodeIllegalUpdate for service response error code // "IllegalUpdate". // @@ -180,6 +223,18 @@ const ( // The specified distribution does not exist. ErrCodeNoSuchDistribution = "NoSuchDistribution" + // ErrCodeNoSuchFieldLevelEncryptionConfig for service response error code + // "NoSuchFieldLevelEncryptionConfig". + // + // The specified configuration for field-level encryption doesn't exist. + ErrCodeNoSuchFieldLevelEncryptionConfig = "NoSuchFieldLevelEncryptionConfig" + + // ErrCodeNoSuchFieldLevelEncryptionProfile for service response error code + // "NoSuchFieldLevelEncryptionProfile". + // + // The specified profile for field-level encryption doesn't exist. + ErrCodeNoSuchFieldLevelEncryptionProfile = "NoSuchFieldLevelEncryptionProfile" + // ErrCodeNoSuchInvalidation for service response error code // "NoSuchInvalidation". // @@ -192,6 +247,12 @@ const ( // No origin exists with the specified Origin Id. ErrCodeNoSuchOrigin = "NoSuchOrigin" + // ErrCodeNoSuchPublicKey for service response error code + // "NoSuchPublicKey". + // + // The specified public key doesn't exist. + ErrCodeNoSuchPublicKey = "NoSuchPublicKey" + // ErrCodeNoSuchResource for service response error code // "NoSuchResource". ErrCodeNoSuchResource = "NoSuchResource" @@ -222,6 +283,24 @@ const ( // to false. ErrCodePreconditionFailed = "PreconditionFailed" + // ErrCodePublicKeyAlreadyExists for service response error code + // "PublicKeyAlreadyExists". + // + // The specified public key already exists. + ErrCodePublicKeyAlreadyExists = "PublicKeyAlreadyExists" + + // ErrCodePublicKeyInUse for service response error code + // "PublicKeyInUse". + // + // The specified public key is in use. + ErrCodePublicKeyInUse = "PublicKeyInUse" + + // ErrCodeQueryArgProfileEmpty for service response error code + // "QueryArgProfileEmpty". + // + // No profile specified for the field-level encryption query argument. + ErrCodeQueryArgProfileEmpty = "QueryArgProfileEmpty" + // ErrCodeResourceInUse for service response error code // "ResourceInUse". ErrCodeResourceInUse = "ResourceInUse" @@ -273,6 +352,13 @@ const ( // allowed. ErrCodeTooManyDistributions = "TooManyDistributions" + // ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig for service response error code + // "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig". + // + // The maximum number of distributions have been associated with the specified + // configuration for field-level encryption. + ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig = "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" + // ErrCodeTooManyDistributionsWithLambdaAssociations for service response error code // "TooManyDistributionsWithLambdaAssociations". // @@ -280,6 +366,47 @@ const ( // Lambda function associations per owner to be exceeded. ErrCodeTooManyDistributionsWithLambdaAssociations = "TooManyDistributionsWithLambdaAssociations" + // ErrCodeTooManyFieldLevelEncryptionConfigs for service response error code + // "TooManyFieldLevelEncryptionConfigs". + // + // The maximum number of configurations for field-level encryption have been + // created. + ErrCodeTooManyFieldLevelEncryptionConfigs = "TooManyFieldLevelEncryptionConfigs" + + // ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles for service response error code + // "TooManyFieldLevelEncryptionContentTypeProfiles". + // + // The maximum number of content type profiles for field-level encryption have + // been created. + ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles = "TooManyFieldLevelEncryptionContentTypeProfiles" + + // ErrCodeTooManyFieldLevelEncryptionEncryptionEntities for service response error code + // "TooManyFieldLevelEncryptionEncryptionEntities". + // + // The maximum number of encryption entities for field-level encryption have + // been created. + ErrCodeTooManyFieldLevelEncryptionEncryptionEntities = "TooManyFieldLevelEncryptionEncryptionEntities" + + // ErrCodeTooManyFieldLevelEncryptionFieldPatterns for service response error code + // "TooManyFieldLevelEncryptionFieldPatterns". + // + // The maximum number of field patterns for field-level encryption have been + // created. + ErrCodeTooManyFieldLevelEncryptionFieldPatterns = "TooManyFieldLevelEncryptionFieldPatterns" + + // ErrCodeTooManyFieldLevelEncryptionProfiles for service response error code + // "TooManyFieldLevelEncryptionProfiles". + // + // The maximum number of profiles for field-level encryption have been created. + ErrCodeTooManyFieldLevelEncryptionProfiles = "TooManyFieldLevelEncryptionProfiles" + + // ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles for service response error code + // "TooManyFieldLevelEncryptionQueryArgProfiles". + // + // The maximum number of query arg profiles for field-level encryption have + // been created. + ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles = "TooManyFieldLevelEncryptionQueryArgProfiles" + // ErrCodeTooManyHeadersInForwardedValues for service response error code // "TooManyHeadersInForwardedValues". ErrCodeTooManyHeadersInForwardedValues = "TooManyHeadersInForwardedValues" @@ -308,6 +435,13 @@ const ( // You cannot create more origins for the distribution. ErrCodeTooManyOrigins = "TooManyOrigins" + // ErrCodeTooManyPublicKeys for service response error code + // "TooManyPublicKeys". + // + // The maximum number of public keys for field-level encryption have been created. + // To create a new public key, delete one of the existing keys. + ErrCodeTooManyPublicKeys = "TooManyPublicKeys" + // ErrCodeTooManyQueryStringParameters for service response error code // "TooManyQueryStringParameters". ErrCodeTooManyQueryStringParameters = "TooManyQueryStringParameters" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go index 75dcf86e8dc..a07f021130f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go @@ -58,7 +58,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, - APIVersion: "2017-03-25", + APIVersion: "2017-10-30", }, handlers, ), diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go index 1440c67821f..935811c9c16 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go @@ -14,7 +14,7 @@ const opBuildSuggesters = "BuildSuggesters" // BuildSuggestersRequest generates a "aws/request.Request" representing the // client's request for the BuildSuggesters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -100,7 +100,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -185,7 +185,7 @@ const opDefineAnalysisScheme = "DefineAnalysisScheme" // DefineAnalysisSchemeRequest generates a "aws/request.Request" representing the // client's request for the DefineAnalysisScheme operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -278,7 +278,7 @@ const opDefineExpression = "DefineExpression" // DefineExpressionRequest generates a "aws/request.Request" representing the // client's request for the DefineExpression operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -371,7 +371,7 @@ const opDefineIndexField = "DefineIndexField" // DefineIndexFieldRequest generates a "aws/request.Request" representing the // client's request for the DefineIndexField operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -468,7 +468,7 @@ const opDefineSuggester = "DefineSuggester" // DefineSuggesterRequest generates a "aws/request.Request" representing the // client's request for the DefineSuggester operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -563,7 +563,7 @@ const opDeleteAnalysisScheme = "DeleteAnalysisScheme" // DeleteAnalysisSchemeRequest generates a "aws/request.Request" representing the // client's request for the DeleteAnalysisScheme operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -652,7 +652,7 @@ const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -735,7 +735,7 @@ const opDeleteExpression = "DeleteExpression" // DeleteExpressionRequest generates a "aws/request.Request" representing the // client's request for the DeleteExpression operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -824,7 +824,7 @@ const opDeleteIndexField = "DeleteIndexField" // DeleteIndexFieldRequest generates a "aws/request.Request" representing the // client's request for the DeleteIndexField operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -913,7 +913,7 @@ const opDeleteSuggester = "DeleteSuggester" // DeleteSuggesterRequest generates a "aws/request.Request" representing the // client's request for the DeleteSuggester operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1002,7 +1002,7 @@ const opDescribeAnalysisSchemes = "DescribeAnalysisSchemes" // DescribeAnalysisSchemesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAnalysisSchemes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1092,7 +1092,7 @@ const opDescribeAvailabilityOptions = "DescribeAvailabilityOptions" // DescribeAvailabilityOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailabilityOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1189,7 +1189,7 @@ const opDescribeDomains = "DescribeDomains" // DescribeDomainsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomains operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1274,7 +1274,7 @@ const opDescribeExpressions = "DescribeExpressions" // DescribeExpressionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeExpressions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1363,7 +1363,7 @@ const opDescribeIndexFields = "DescribeIndexFields" // DescribeIndexFieldsRequest generates a "aws/request.Request" representing the // client's request for the DescribeIndexFields operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1452,7 +1452,7 @@ const opDescribeScalingParameters = "DescribeScalingParameters" // DescribeScalingParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1539,7 +1539,7 @@ const opDescribeServiceAccessPolicies = "DescribeServiceAccessPolicies" // DescribeServiceAccessPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeServiceAccessPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1628,7 +1628,7 @@ const opDescribeSuggesters = "DescribeSuggesters" // DescribeSuggestersRequest generates a "aws/request.Request" representing the // client's request for the DescribeSuggesters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1718,7 +1718,7 @@ const opIndexDocuments = "IndexDocuments" // IndexDocumentsRequest generates a "aws/request.Request" representing the // client's request for the IndexDocuments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1804,7 +1804,7 @@ const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the ListDomainNames operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1880,7 +1880,7 @@ const opUpdateAvailabilityOptions = "UpdateAvailabilityOptions" // UpdateAvailabilityOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateAvailabilityOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1978,7 +1978,7 @@ const opUpdateScalingParameters = "UpdateScalingParameters" // UpdateScalingParametersRequest generates a "aws/request.Request" representing the // client's request for the UpdateScalingParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2075,7 +2075,7 @@ const opUpdateServiceAccessPolicies = "UpdateServiceAccessPolicies" // UpdateServiceAccessPoliciesRequest generates a "aws/request.Request" representing the // client's request for the UpdateServiceAccessPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index 646949fa2df..c6ad246ec96 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -15,7 +15,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -139,7 +139,7 @@ const opCreateTrail = "CreateTrail" // CreateTrailRequest generates a "aws/request.Request" representing the // client's request for the CreateTrail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -297,7 +297,7 @@ const opDeleteTrail = "DeleteTrail" // DeleteTrailRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -398,7 +398,7 @@ const opDescribeTrails = "DescribeTrails" // DescribeTrailsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTrails operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -481,7 +481,7 @@ const opGetEventSelectors = "GetEventSelectors" // GetEventSelectorsRequest generates a "aws/request.Request" representing the // client's request for the GetEventSelectors operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -594,7 +594,7 @@ const opGetTrailStatus = "GetTrailStatus" // GetTrailStatusRequest generates a "aws/request.Request" representing the // client's request for the GetTrailStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -693,7 +693,7 @@ const opListPublicKeys = "ListPublicKeys" // ListPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListPublicKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -789,7 +789,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -903,7 +903,7 @@ const opLookupEvents = "LookupEvents" // LookupEventsRequest generates a "aws/request.Request" representing the // client's request for the LookupEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1074,7 +1074,7 @@ const opPutEventSelectors = "PutEventSelectors" // PutEventSelectorsRequest generates a "aws/request.Request" representing the // client's request for the PutEventSelectors operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1218,7 +1218,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1333,7 +1333,7 @@ const opStartLogging = "StartLogging" // StartLoggingRequest generates a "aws/request.Request" representing the // client's request for the StartLogging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1436,7 +1436,7 @@ const opStopLogging = "StopLogging" // StopLoggingRequest generates a "aws/request.Request" representing the // client's request for the StopLogging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1541,7 +1541,7 @@ const opUpdateTrail = "UpdateTrail" // UpdateTrailRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go index 2675be8486d..38519a2ac37 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go @@ -17,7 +17,7 @@ const opDeleteAlarms = "DeleteAlarms" // DeleteAlarmsRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlarms operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -98,7 +98,7 @@ const opDeleteDashboards = "DeleteDashboards" // DeleteDashboardsRequest generates a "aws/request.Request" representing the // client's request for the DeleteDashboards operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -184,7 +184,7 @@ const opDescribeAlarmHistory = "DescribeAlarmHistory" // DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarmHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -323,7 +323,7 @@ const opDescribeAlarms = "DescribeAlarms" // DescribeAlarmsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarms operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -460,7 +460,7 @@ const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric" // DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarmsForMetric operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -535,7 +535,7 @@ const opDisableAlarmActions = "DisableAlarmActions" // DisableAlarmActionsRequest generates a "aws/request.Request" representing the // client's request for the DisableAlarmActions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -612,7 +612,7 @@ const opEnableAlarmActions = "EnableAlarmActions" // EnableAlarmActionsRequest generates a "aws/request.Request" representing the // client's request for the EnableAlarmActions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -688,7 +688,7 @@ const opGetDashboard = "GetDashboard" // GetDashboardRequest generates a "aws/request.Request" representing the // client's request for the GetDashboard operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -773,11 +773,101 @@ func (c *CloudWatch) GetDashboardWithContext(ctx aws.Context, input *GetDashboar return out, req.Send() } +const opGetMetricData = "GetMetricData" + +// GetMetricDataRequest generates a "aws/request.Request" representing the +// client's request for the GetMetricData operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetMetricData for more information on using the GetMetricData +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetMetricDataRequest method. +// req, resp := client.GetMetricDataRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData +func (c *CloudWatch) GetMetricDataRequest(input *GetMetricDataInput) (req *request.Request, output *GetMetricDataOutput) { + op := &request.Operation{ + Name: opGetMetricData, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetMetricDataInput{} + } + + output = &GetMetricDataOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetMetricData API operation for Amazon CloudWatch. +// +// You can use the GetMetricData API to retrieve as many as 100 different metrics +// in a single request, with a total of as many as 100,800 datapoints. You can +// also optionally perform math expressions on the values of the returned statistics, +// to create new time series that represent new insights into your data. For +// example, using Lambda metrics, you could divide the Errors metric by the +// Invocations metric to get an error rate time series. For more information +// about metric math expressions, see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) +// in the Amazon CloudWatch User Guide. +// +// Calls to the GetMetricData API have a different pricing structure than calls +// to GetMetricStatistics. For more information about pricing, see Amazon CloudWatch +// Pricing (https://aws.amazon.com/cloudwatch/pricing/). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch's +// API operation GetMetricData for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The next token specified is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricData +func (c *CloudWatch) GetMetricData(input *GetMetricDataInput) (*GetMetricDataOutput, error) { + req, out := c.GetMetricDataRequest(input) + return out, req.Send() +} + +// GetMetricDataWithContext is the same as GetMetricData with the addition of +// the ability to pass a context and additional request options. +// +// See GetMetricData for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatch) GetMetricDataWithContext(ctx aws.Context, input *GetMetricDataInput, opts ...request.Option) (*GetMetricDataOutput, error) { + req, out := c.GetMetricDataRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetMetricStatistics = "GetMetricStatistics" // GetMetricStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetMetricStatistics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -915,7 +1005,7 @@ const opListDashboards = "ListDashboards" // ListDashboardsRequest generates a "aws/request.Request" representing the // client's request for the ListDashboards operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -999,7 +1089,7 @@ const opListMetrics = "ListMetrics" // ListMetricsRequest generates a "aws/request.Request" representing the // client's request for the ListMetrics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1145,7 +1235,7 @@ const opPutDashboard = "PutDashboard" // PutDashboardRequest generates a "aws/request.Request" representing the // client's request for the PutDashboard operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1245,7 +1335,7 @@ const opPutMetricAlarm = "PutMetricAlarm" // PutMetricAlarmRequest generates a "aws/request.Request" representing the // client's request for the PutMetricAlarm operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1367,7 +1457,7 @@ const opPutMetricData = "PutMetricData" // PutMetricDataRequest generates a "aws/request.Request" representing the // client's request for the PutMetricData operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1485,7 +1575,7 @@ const opSetAlarmState = "SetAlarmState" // SetAlarmStateRequest generates a "aws/request.Request" representing the // client's request for the SetAlarmState operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2588,6 +2678,150 @@ func (s *GetDashboardOutput) SetDashboardName(v string) *GetDashboardOutput { return s } +type GetMetricDataInput struct { + _ struct{} `type:"structure"` + + // The time stamp indicating the latest data to be returned. + // + // EndTime is a required field + EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // The maximum number of data points the request should return before paginating. + // If you omit this, the default of 100,800 is used. + MaxDatapoints *int64 `type:"integer"` + + // The metric queries to be returned. A single GetMetricData call can include + // as many as 100 MetricDataQuery structures. Each of these structures can specify + // either a metric to retrieve, or a math expression to perform on retrieved + // data. + // + // MetricDataQueries is a required field + MetricDataQueries []*MetricDataQuery `type:"list" required:"true"` + + // Include this value, if it was returned by the previous call, to get the next + // set of data points. + NextToken *string `type:"string"` + + // The order in which data points should be returned. TimestampDescending returns + // the newest data first and paginates when the MaxDatapoints limit is reached. + // TimestampAscending returns the oldest data first and paginates when the MaxDatapoints + // limit is reached. + ScanBy *string `type:"string" enum:"ScanBy"` + + // The time stamp indicating the earliest data to be returned. + // + // StartTime is a required field + StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` +} + +// String returns the string representation +func (s GetMetricDataInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricDataInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetMetricDataInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.MetricDataQueries == nil { + invalidParams.Add(request.NewErrParamRequired("MetricDataQueries")) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + if s.MetricDataQueries != nil { + for i, v := range s.MetricDataQueries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDataQueries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *GetMetricDataInput) SetEndTime(v time.Time) *GetMetricDataInput { + s.EndTime = &v + return s +} + +// SetMaxDatapoints sets the MaxDatapoints field's value. +func (s *GetMetricDataInput) SetMaxDatapoints(v int64) *GetMetricDataInput { + s.MaxDatapoints = &v + return s +} + +// SetMetricDataQueries sets the MetricDataQueries field's value. +func (s *GetMetricDataInput) SetMetricDataQueries(v []*MetricDataQuery) *GetMetricDataInput { + s.MetricDataQueries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetMetricDataInput) SetNextToken(v string) *GetMetricDataInput { + s.NextToken = &v + return s +} + +// SetScanBy sets the ScanBy field's value. +func (s *GetMetricDataInput) SetScanBy(v string) *GetMetricDataInput { + s.ScanBy = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *GetMetricDataInput) SetStartTime(v time.Time) *GetMetricDataInput { + s.StartTime = &v + return s +} + +type GetMetricDataOutput struct { + _ struct{} `type:"structure"` + + // The metrics that are returned, including the metric name, namespace, and + // dimensions. + MetricDataResults []*MetricDataResult `type:"list"` + + // A token that marks the next batch of returned results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetMetricDataOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricDataOutput) GoString() string { + return s.String() +} + +// SetMetricDataResults sets the MetricDataResults field's value. +func (s *GetMetricDataOutput) SetMetricDataResults(v []*MetricDataResult) *GetMetricDataOutput { + s.MetricDataResults = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetMetricDataOutput) SetNextToken(v string) *GetMetricDataOutput { + s.NextToken = &v + return s +} + type GetMetricStatisticsInput struct { _ struct{} `type:"structure"` @@ -2682,8 +2916,8 @@ type GetMetricStatisticsInput struct { Statistics []*string `min:"1" type:"list"` // The unit for a given metric. Metrics may be reported in multiple units. Not - // supplying a unit results in all units being returned. If the metric only - // ever reports one unit, specifying a unit has no effect. + // supplying a unit results in all units being returned. If you specify only + // a unit that the metric does not report, the results of the call are null. Unit *string `type:"string" enum:"StandardUnit"` } @@ -3009,6 +3243,39 @@ func (s *ListMetricsOutput) SetNextToken(v string) *ListMetricsOutput { return s } +// A message returned by the GetMetricDataAPI, including a code and a description. +type MessageData struct { + _ struct{} `type:"structure"` + + // The error code or status code associated with the message. + Code *string `type:"string"` + + // The message text. + Value *string `type:"string"` +} + +// String returns the string representation +func (s MessageData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageData) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *MessageData) SetCode(v string) *MessageData { + s.Code = &v + return s +} + +// SetValue sets the Value field's value. +func (s *MessageData) SetValue(v string) *MessageData { + s.Value = &v + return s +} + // Represents a specific metric. type Metric struct { _ struct{} `type:"structure"` @@ -3033,6 +3300,32 @@ func (s Metric) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *Metric) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Metric"} + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } + if s.Namespace != nil && len(*s.Namespace) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) + } + if s.Dimensions != nil { + for i, v := range s.Dimensions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDimensions sets the Dimensions field's value. func (s *Metric) SetDimensions(v []*Dimension) *Metric { s.Dimensions = v @@ -3303,6 +3596,197 @@ func (s *MetricAlarm) SetUnit(v string) *MetricAlarm { return s } +// This structure indicates the metric data to return, and whether this call +// is just retrieving a batch set of data for one metric, or is performing a +// math expression on metric data. A single GetMetricData call can include up +// to 100 MetricDataQuery structures. +type MetricDataQuery struct { + _ struct{} `type:"structure"` + + // The math expression to be performed on the returned data, if this structure + // is performing a math expression. For more information about metric math expressions, + // see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) + // in the Amazon CloudWatch User Guide. + // + // Within one MetricDataQuery structure, you must specify either Expression + // or MetricStat but not both. + Expression *string `min:"1" type:"string"` + + // A short name used to tie this structure to the results in the response. This + // name must be unique within a single call to GetMetricData. If you are performing + // math expressions on this set of data, this name represents that data and + // can serve as a variable in the mathematical expression. The valid characters + // are letters, numbers, and underscore. The first character must be a lowercase + // letter. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // A human-readable label for this metric or expression. This is especially + // useful if this is an expression, so that you know what the value represents. + // If the metric or expression is shown in a CloudWatch dashboard widget, the + // label is shown. If Label is omitted, CloudWatch generates a default. + Label *string `type:"string"` + + // The metric to be returned, along with statistics, period, and units. Use + // this parameter only if this structure is performing a data retrieval and + // not performing a math expression on the returned data. + // + // Within one MetricDataQuery structure, you must specify either Expression + // or MetricStat but not both. + MetricStat *MetricStat `type:"structure"` + + // Indicates whether to return the time stamps and raw data values of this metric. + // If you are performing this call just to do math expressions and do not also + // need the raw data returned, you can specify False. If you omit this, the + // default of True is used. + ReturnData *bool `type:"boolean"` +} + +// String returns the string representation +func (s MetricDataQuery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricDataQuery) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricDataQuery) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricDataQuery"} + if s.Expression != nil && len(*s.Expression) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.MetricStat != nil { + if err := s.MetricStat.Validate(); err != nil { + invalidParams.AddNested("MetricStat", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpression sets the Expression field's value. +func (s *MetricDataQuery) SetExpression(v string) *MetricDataQuery { + s.Expression = &v + return s +} + +// SetId sets the Id field's value. +func (s *MetricDataQuery) SetId(v string) *MetricDataQuery { + s.Id = &v + return s +} + +// SetLabel sets the Label field's value. +func (s *MetricDataQuery) SetLabel(v string) *MetricDataQuery { + s.Label = &v + return s +} + +// SetMetricStat sets the MetricStat field's value. +func (s *MetricDataQuery) SetMetricStat(v *MetricStat) *MetricDataQuery { + s.MetricStat = v + return s +} + +// SetReturnData sets the ReturnData field's value. +func (s *MetricDataQuery) SetReturnData(v bool) *MetricDataQuery { + s.ReturnData = &v + return s +} + +// A GetMetricData call returns an array of MetricDataResult structures. Each +// of these structures includes the data points for that metric, along with +// the time stamps of those data points and other identifying information. +type MetricDataResult struct { + _ struct{} `type:"structure"` + + // The short name you specified to represent this metric. + Id *string `min:"1" type:"string"` + + // The human-readable label associated with the data. + Label *string `type:"string"` + + // A list of messages with additional information about the data returned. + Messages []*MessageData `type:"list"` + + // The status of the returned data. Complete indicates that all data points + // in the requested time range were returned. PartialData means that an incomplete + // set of data points were returned. You can use the NextToken value that was + // returned and repeat your request to get more data points. NextToken is not + // returned if you are performing a math expression. InternalError indicates + // that an error occurred. Retry your request using NextToken, if present. + StatusCode *string `type:"string" enum:"StatusCode"` + + // The time stamps for the data points, formatted in Unix timestamp format. + // The number of time stamps always matches the number of values and the value + // for Timestamps[x] is Values[x]. + Timestamps []*time.Time `type:"list"` + + // The data points for the metric corresponding to Timestamps. The number of + // values always matches the number of time stamps and the time stamp for Values[x] + // is Timestamps[x]. + Values []*float64 `type:"list"` +} + +// String returns the string representation +func (s MetricDataResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricDataResult) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *MetricDataResult) SetId(v string) *MetricDataResult { + s.Id = &v + return s +} + +// SetLabel sets the Label field's value. +func (s *MetricDataResult) SetLabel(v string) *MetricDataResult { + s.Label = &v + return s +} + +// SetMessages sets the Messages field's value. +func (s *MetricDataResult) SetMessages(v []*MessageData) *MetricDataResult { + s.Messages = v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *MetricDataResult) SetStatusCode(v string) *MetricDataResult { + s.StatusCode = &v + return s +} + +// SetTimestamps sets the Timestamps field's value. +func (s *MetricDataResult) SetTimestamps(v []*time.Time) *MetricDataResult { + s.Timestamps = v + return s +} + +// SetValues sets the Values field's value. +func (s *MetricDataResult) SetValues(v []*float64) *MetricDataResult { + s.Values = v + return s +} + // Encapsulates the information sent to either create a metric or add new values // to be aggregated into an existing metric. type MetricDatum struct { @@ -3433,6 +3917,92 @@ func (s *MetricDatum) SetValue(v float64) *MetricDatum { return s } +// This structure defines the metric to be returned, along with the statistics, +// period, and units. +type MetricStat struct { + _ struct{} `type:"structure"` + + // The metric to return, including the metric name, namespace, and dimensions. + // + // Metric is a required field + Metric *Metric `type:"structure" required:"true"` + + // The period to use when retrieving the metric. + // + // Period is a required field + Period *int64 `min:"1" type:"integer" required:"true"` + + // The statistic to return. It can include any CloudWatch statistic or extended + // statistic. + // + // Stat is a required field + Stat *string `type:"string" required:"true"` + + // The unit to use for the returned data points. + Unit *string `type:"string" enum:"StandardUnit"` +} + +// String returns the string representation +func (s MetricStat) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricStat) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricStat) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricStat"} + if s.Metric == nil { + invalidParams.Add(request.NewErrParamRequired("Metric")) + } + if s.Period == nil { + invalidParams.Add(request.NewErrParamRequired("Period")) + } + if s.Period != nil && *s.Period < 1 { + invalidParams.Add(request.NewErrParamMinValue("Period", 1)) + } + if s.Stat == nil { + invalidParams.Add(request.NewErrParamRequired("Stat")) + } + if s.Metric != nil { + if err := s.Metric.Validate(); err != nil { + invalidParams.AddNested("Metric", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMetric sets the Metric field's value. +func (s *MetricStat) SetMetric(v *Metric) *MetricStat { + s.Metric = v + return s +} + +// SetPeriod sets the Period field's value. +func (s *MetricStat) SetPeriod(v int64) *MetricStat { + s.Period = &v + return s +} + +// SetStat sets the Stat field's value. +func (s *MetricStat) SetStat(v string) *MetricStat { + s.Stat = &v + return s +} + +// SetUnit sets the Unit field's value. +func (s *MetricStat) SetUnit(v string) *MetricStat { + s.Unit = &v + return s +} + type PutDashboardInput struct { _ struct{} `type:"structure"` @@ -3556,7 +4126,10 @@ type PutMetricAlarmInput struct { // ComparisonOperator is a required field ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` - // The number of datapoints that must be breaching to trigger the alarm. + // The number of datapoints that must be breaching to trigger the alarm. This + // is used only if you are setting an "M out of N" alarm. In that case, this + // value is the M. For more information, see Evaluating an Alarm (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) + // in the Amazon CloudWatch User Guide. DatapointsToAlarm *int64 `min:"1" type:"integer"` // The dimensions for the metric associated with the alarm. @@ -3573,6 +4146,10 @@ type PutMetricAlarmInput struct { EvaluateLowSampleCountPercentile *string `min:"1" type:"string"` // The number of periods over which data is compared to the specified threshold. + // If you are setting an alarm which requires that a number of consecutive data + // points be breaching to trigger the alarm, this value specifies that number. + // If you are setting an "M out of N" alarm, this value is the N. + // // An alarm's total current evaluation period can be no longer than one day, // so this number multiplied by Period cannot be more than 86,400 seconds. // @@ -3623,7 +4200,7 @@ type PutMetricAlarmInput struct { // values are 10, 30, and any multiple of 60. // // Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData - // call with a StorageResolution of 1. If you specify a Period of 10 or 30 for + // call with a StorageResolution of 1. If you specify a period of 10 or 30 for // a metric that does not have sub-minute resolution, the alarm still attempts // to gather data at the period rate that you specify. In this case, it does // not receive data for the attempts that do not correspond to a one-minute @@ -4151,6 +4728,14 @@ const ( HistoryItemTypeAction = "Action" ) +const ( + // ScanByTimestampDescending is a ScanBy enum value + ScanByTimestampDescending = "TimestampDescending" + + // ScanByTimestampAscending is a ScanBy enum value + ScanByTimestampAscending = "TimestampAscending" +) + const ( // StandardUnitSeconds is a StandardUnit enum value StandardUnitSeconds = "Seconds" @@ -4261,3 +4846,14 @@ const ( // StatisticMaximum is a Statistic enum value StatisticMaximum = "Maximum" ) + +const ( + // StatusCodeComplete is a StatusCode enum value + StatusCodeComplete = "Complete" + + // StatusCodeInternalError is a StatusCode enum value + StatusCodeInternalError = "InternalError" + + // StatusCodePartialData is a StatusCode enum value + StatusCodePartialData = "PartialData" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 0bd8f97bb60..3fe033736ff 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -17,7 +17,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -107,7 +107,7 @@ const opDescribeEventBus = "DescribeEventBus" // DescribeEventBusRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventBus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -191,7 +191,7 @@ const opDescribeRule = "DescribeRule" // DescribeRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -273,7 +273,7 @@ const opDisableRule = "DisableRule" // DisableRuleRequest generates a "aws/request.Request" representing the // client's request for the DisableRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -364,7 +364,7 @@ const opEnableRule = "EnableRule" // EnableRuleRequest generates a "aws/request.Request" representing the // client's request for the EnableRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -455,7 +455,7 @@ const opListRuleNamesByTarget = "ListRuleNamesByTarget" // ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the // client's request for the ListRuleNamesByTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -535,7 +535,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -615,7 +615,7 @@ const opListTargetsByRule = "ListTargetsByRule" // ListTargetsByRuleRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsByRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -697,7 +697,7 @@ const opPutEvents = "PutEvents" // PutEventsRequest generates a "aws/request.Request" representing the // client's request for the PutEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -777,7 +777,7 @@ const opPutPermission = "PutPermission" // PutPermissionRequest generates a "aws/request.Request" representing the // client's request for the PutPermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -878,7 +878,7 @@ const opPutRule = "PutRule" // PutRuleRequest generates a "aws/request.Request" representing the // client's request for the PutRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -987,7 +987,7 @@ const opPutTargets = "PutTargets" // PutTargetsRequest generates a "aws/request.Request" representing the // client's request for the PutTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1164,7 +1164,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1254,7 +1254,7 @@ const opRemoveTargets = "RemoveTargets" // RemoveTargetsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1349,7 +1349,7 @@ const opTestEventPattern = "TestEventPattern" // TestEventPatternRequest generates a "aws/request.Request" representing the // client's request for the TestEventPattern operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index aaebe84d35d..43a77742fc6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -16,7 +16,7 @@ const opAssociateKmsKey = "AssociateKmsKey" // AssociateKmsKeyRequest generates a "aws/request.Request" representing the // client's request for the AssociateKmsKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -119,7 +119,7 @@ const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelExportTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -211,7 +211,7 @@ const opCreateExportTask = "CreateExportTask" // CreateExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateExportTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -316,7 +316,7 @@ const opCreateLogGroup = "CreateLogGroup" // CreateLogGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateLogGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -430,7 +430,7 @@ const opCreateLogStream = "CreateLogStream" // CreateLogStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateLogStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -531,7 +531,7 @@ const opDeleteDestination = "DeleteDestination" // DeleteDestinationRequest generates a "aws/request.Request" representing the // client's request for the DeleteDestination operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -623,7 +623,7 @@ const opDeleteLogGroup = "DeleteLogGroup" // DeleteLogGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteLogGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -714,7 +714,7 @@ const opDeleteLogStream = "DeleteLogStream" // DeleteLogStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteLogStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -805,7 +805,7 @@ const opDeleteMetricFilter = "DeleteMetricFilter" // DeleteMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteMetricFilter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -895,7 +895,7 @@ const opDeleteResourcePolicy = "DeleteResourcePolicy" // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -983,7 +983,7 @@ const opDeleteRetentionPolicy = "DeleteRetentionPolicy" // DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRetentionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1076,7 +1076,7 @@ const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" // DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubscriptionFilter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1166,7 +1166,7 @@ const opDescribeDestinations = "DescribeDestinations" // DescribeDestinationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDestinations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1305,7 +1305,7 @@ const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeExportTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1388,7 +1388,7 @@ const opDescribeLogGroups = "DescribeLogGroups" // DescribeLogGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLogGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1527,7 +1527,7 @@ const opDescribeLogStreams = "DescribeLogStreams" // DescribeLogStreamsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLogStreams operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1673,7 +1673,7 @@ const opDescribeMetricFilters = "DescribeMetricFilters" // DescribeMetricFiltersRequest generates a "aws/request.Request" representing the // client's request for the DescribeMetricFilters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1816,7 +1816,7 @@ const opDescribeResourcePolicies = "DescribeResourcePolicies" // DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourcePolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1898,7 +1898,7 @@ const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" // DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubscriptionFilters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2041,7 +2041,7 @@ const opDisassociateKmsKey = "DisassociateKmsKey" // DisassociateKmsKeyRequest generates a "aws/request.Request" representing the // client's request for the DisassociateKmsKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2139,7 +2139,7 @@ const opFilterLogEvents = "FilterLogEvents" // FilterLogEventsRequest generates a "aws/request.Request" representing the // client's request for the FilterLogEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2288,7 +2288,7 @@ const opGetLogEvents = "GetLogEvents" // GetLogEventsRequest generates a "aws/request.Request" representing the // client's request for the GetLogEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2434,7 +2434,7 @@ const opListTagsLogGroup = "ListTagsLogGroup" // ListTagsLogGroupRequest generates a "aws/request.Request" representing the // client's request for the ListTagsLogGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2516,7 +2516,7 @@ const opPutDestination = "PutDestination" // PutDestinationRequest generates a "aws/request.Request" representing the // client's request for the PutDestination operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2611,7 +2611,7 @@ const opPutDestinationPolicy = "PutDestinationPolicy" // PutDestinationPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutDestinationPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2701,7 +2701,7 @@ const opPutLogEvents = "PutLogEvents" // PutLogEventsRequest generates a "aws/request.Request" representing the // client's request for the PutLogEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2819,7 +2819,7 @@ const opPutMetricFilter = "PutMetricFilter" // PutMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the PutMetricFilter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2917,7 +2917,7 @@ const opPutResourcePolicy = "PutResourcePolicy" // PutResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3004,7 +3004,7 @@ const opPutRetentionPolicy = "PutRetentionPolicy" // PutRetentionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutRetentionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3096,7 +3096,7 @@ const opPutSubscriptionFilter = "PutSubscriptionFilter" // PutSubscriptionFilterRequest generates a "aws/request.Request" representing the // client's request for the PutSubscriptionFilter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3209,7 +3209,7 @@ const opTagLogGroup = "TagLogGroup" // TagLogGroupRequest generates a "aws/request.Request" representing the // client's request for the TagLogGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3300,7 +3300,7 @@ const opTestMetricFilter = "TestMetricFilter" // TestMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the TestMetricFilter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3384,7 +3384,7 @@ const opUntagLogGroup = "UntagLogGroup" // UntagLogGroupRequest generates a "aws/request.Request" representing the // client's request for the UntagLogGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 3beb528addc..a8f83ca0f13 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -15,7 +15,7 @@ const opBatchDeleteBuilds = "BatchDeleteBuilds" // BatchDeleteBuildsRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteBuilds operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -94,7 +94,7 @@ const opBatchGetBuilds = "BatchGetBuilds" // BatchGetBuildsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetBuilds operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -173,7 +173,7 @@ const opBatchGetProjects = "BatchGetProjects" // BatchGetProjectsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetProjects operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -252,7 +252,7 @@ const opCreateProject = "CreateProject" // CreateProjectRequest generates a "aws/request.Request" representing the // client's request for the CreateProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -338,7 +338,7 @@ const opCreateWebhook = "CreateWebhook" // CreateWebhookRequest generates a "aws/request.Request" representing the // client's request for the CreateWebhook operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -438,7 +438,7 @@ const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -517,7 +517,7 @@ const opDeleteWebhook = "DeleteWebhook" // DeleteWebhookRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebhook operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -604,7 +604,7 @@ const opInvalidateProjectCache = "InvalidateProjectCache" // InvalidateProjectCacheRequest generates a "aws/request.Request" representing the // client's request for the InvalidateProjectCache operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -686,7 +686,7 @@ const opListBuilds = "ListBuilds" // ListBuildsRequest generates a "aws/request.Request" representing the // client's request for the ListBuilds operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -765,7 +765,7 @@ const opListBuildsForProject = "ListBuildsForProject" // ListBuildsForProjectRequest generates a "aws/request.Request" representing the // client's request for the ListBuildsForProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -848,7 +848,7 @@ const opListCuratedEnvironmentImages = "ListCuratedEnvironmentImages" // ListCuratedEnvironmentImagesRequest generates a "aws/request.Request" representing the // client's request for the ListCuratedEnvironmentImages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -922,7 +922,7 @@ const opListProjects = "ListProjects" // ListProjectsRequest generates a "aws/request.Request" representing the // client's request for the ListProjects operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1002,7 +1002,7 @@ const opStartBuild = "StartBuild" // StartBuildRequest generates a "aws/request.Request" representing the // client's request for the StartBuild operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1087,7 +1087,7 @@ const opStopBuild = "StopBuild" // StopBuildRequest generates a "aws/request.Request" representing the // client's request for the StopBuild operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1169,7 +1169,7 @@ const opUpdateProject = "UpdateProject" // UpdateProjectRequest generates a "aws/request.Request" representing the // client's request for the UpdateProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1251,7 +1251,7 @@ const opUpdateWebhook = "UpdateWebhook" // UpdateWebhookRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebhook operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index 9458d149bc8..7a4f4df26df 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -17,7 +17,7 @@ const opBatchGetRepositories = "BatchGetRepositories" // BatchGetRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetRepositories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -128,7 +128,7 @@ const opCreateBranch = "CreateBranch" // CreateBranchRequest generates a "aws/request.Request" representing the // client's request for the CreateBranch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -256,7 +256,7 @@ const opCreatePullRequest = "CreatePullRequest" // CreatePullRequestRequest generates a "aws/request.Request" representing the // client's request for the CreatePullRequest operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -433,7 +433,7 @@ const opCreateRepository = "CreateRepository" // CreateRepositoryRequest generates a "aws/request.Request" representing the // client's request for the CreateRepository operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -543,7 +543,7 @@ const opDeleteBranch = "DeleteBranch" // DeleteBranchRequest generates a "aws/request.Request" representing the // client's request for the DeleteBranch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -659,7 +659,7 @@ const opDeleteCommentContent = "DeleteCommentContent" // DeleteCommentContentRequest generates a "aws/request.Request" representing the // client's request for the DeleteCommentContent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -750,7 +750,7 @@ const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepository operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -856,7 +856,7 @@ const opDescribePullRequestEvents = "DescribePullRequestEvents" // DescribePullRequestEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribePullRequestEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1032,7 +1032,7 @@ const opGetBlob = "GetBlob" // GetBlobRequest generates a "aws/request.Request" representing the // client's request for the GetBlob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1150,7 +1150,7 @@ const opGetBranch = "GetBranch" // GetBranchRequest generates a "aws/request.Request" representing the // client's request for the GetBranch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1264,7 +1264,7 @@ const opGetComment = "GetComment" // GetCommentRequest generates a "aws/request.Request" representing the // client's request for the GetComment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1355,7 +1355,7 @@ const opGetCommentsForComparedCommit = "GetCommentsForComparedCommit" // GetCommentsForComparedCommitRequest generates a "aws/request.Request" representing the // client's request for the GetCommentsForComparedCommit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1531,7 +1531,7 @@ const opGetCommentsForPullRequest = "GetCommentsForPullRequest" // GetCommentsForPullRequestRequest generates a "aws/request.Request" representing the // client's request for the GetCommentsForPullRequest operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1724,7 +1724,7 @@ const opGetCommit = "GetCommit" // GetCommitRequest generates a "aws/request.Request" representing the // client's request for the GetCommit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1838,7 +1838,7 @@ const opGetDifferences = "GetDifferences" // GetDifferencesRequest generates a "aws/request.Request" representing the // client's request for the GetDifferences operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2025,7 +2025,7 @@ const opGetMergeConflicts = "GetMergeConflicts" // GetMergeConflictsRequest generates a "aws/request.Request" representing the // client's request for the GetMergeConflicts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2159,7 +2159,7 @@ const opGetPullRequest = "GetPullRequest" // GetPullRequestRequest generates a "aws/request.Request" representing the // client's request for the GetPullRequest operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2262,7 +2262,7 @@ const opGetRepository = "GetRepository" // GetRepositoryRequest generates a "aws/request.Request" representing the // client's request for the GetRepository operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2372,7 +2372,7 @@ const opGetRepositoryTriggers = "GetRepositoryTriggers" // GetRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the GetRepositoryTriggers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2476,7 +2476,7 @@ const opListBranches = "ListBranches" // ListBranchesRequest generates a "aws/request.Request" representing the // client's request for the ListBranches operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2639,7 +2639,7 @@ const opListPullRequests = "ListPullRequests" // ListPullRequestsRequest generates a "aws/request.Request" representing the // client's request for the ListPullRequests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2817,7 +2817,7 @@ const opListRepositories = "ListRepositories" // ListRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the ListRepositories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2958,7 +2958,7 @@ const opMergePullRequestByFastForward = "MergePullRequestByFastForward" // MergePullRequestByFastForwardRequest generates a "aws/request.Request" representing the // client's request for the MergePullRequestByFastForward operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3094,7 +3094,7 @@ const opPostCommentForComparedCommit = "PostCommentForComparedCommit" // PostCommentForComparedCommitRequest generates a "aws/request.Request" representing the // client's request for the PostCommentForComparedCommit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3254,7 +3254,7 @@ const opPostCommentForPullRequest = "PostCommentForPullRequest" // PostCommentForPullRequestRequest generates a "aws/request.Request" representing the // client's request for the PostCommentForPullRequest operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3434,7 +3434,7 @@ const opPostCommentReply = "PostCommentReply" // PostCommentReplyRequest generates a "aws/request.Request" representing the // client's request for the PostCommentReply operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3543,7 +3543,7 @@ const opPutFile = "PutFile" // PutFileRequest generates a "aws/request.Request" representing the // client's request for the PutFile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3729,7 +3729,7 @@ const opPutRepositoryTriggers = "PutRepositoryTriggers" // PutRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the PutRepositoryTriggers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3879,7 +3879,7 @@ const opTestRepositoryTriggers = "TestRepositoryTriggers" // TestRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the TestRepositoryTriggers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4031,7 +4031,7 @@ const opUpdateComment = "UpdateComment" // UpdateCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateComment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4133,7 +4133,7 @@ const opUpdateDefaultBranch = "UpdateDefaultBranch" // UpdateDefaultBranchRequest generates a "aws/request.Request" representing the // client's request for the UpdateDefaultBranch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4252,7 +4252,7 @@ const opUpdatePullRequestDescription = "UpdatePullRequestDescription" // UpdatePullRequestDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestDescription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4347,7 +4347,7 @@ const opUpdatePullRequestStatus = "UpdatePullRequestStatus" // UpdatePullRequestStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4461,7 +4461,7 @@ const opUpdatePullRequestTitle = "UpdatePullRequestTitle" // UpdatePullRequestTitleRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestTitle operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4559,7 +4559,7 @@ const opUpdateRepositoryDescription = "UpdateRepositoryDescription" // UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateRepositoryDescription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4674,7 +4674,7 @@ const opUpdateRepositoryName = "UpdateRepositoryName" // UpdateRepositoryNameRequest generates a "aws/request.Request" representing the // client's request for the UpdateRepositoryName operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index 52ad4bf9f02..efec20fcffa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -16,7 +16,7 @@ const opAddTagsToOnPremisesInstances = "AddTagsToOnPremisesInstances" // AddTagsToOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -116,7 +116,7 @@ const opBatchGetApplicationRevisions = "BatchGetApplicationRevisions" // BatchGetApplicationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetApplicationRevisions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -210,7 +210,7 @@ const opBatchGetApplications = "BatchGetApplications" // BatchGetApplicationsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetApplications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -298,7 +298,7 @@ const opBatchGetDeploymentGroups = "BatchGetDeploymentGroups" // BatchGetDeploymentGroupsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeploymentGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -392,7 +392,7 @@ const opBatchGetDeploymentInstances = "BatchGetDeploymentInstances" // BatchGetDeploymentInstancesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeploymentInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -487,7 +487,7 @@ const opBatchGetDeployments = "BatchGetDeployments" // BatchGetDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeployments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -572,7 +572,7 @@ const opBatchGetOnPremisesInstances = "BatchGetOnPremisesInstances" // BatchGetOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -657,7 +657,7 @@ const opContinueDeployment = "ContinueDeployment" // ContinueDeploymentRequest generates a "aws/request.Request" representing the // client's request for the ContinueDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -758,7 +758,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -850,7 +850,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1012,7 +1012,7 @@ const opCreateDeploymentConfig = "CreateDeploymentConfig" // CreateDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateDeploymentConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1111,7 +1111,7 @@ const opCreateDeploymentGroup = "CreateDeploymentGroup" // CreateDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1291,7 +1291,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1375,7 +1375,7 @@ const opDeleteDeploymentConfig = "DeleteDeploymentConfig" // DeleteDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeploymentConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1468,7 +1468,7 @@ const opDeleteDeploymentGroup = "DeleteDeploymentGroup" // DeleteDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1561,7 +1561,7 @@ const opDeleteGitHubAccountToken = "DeleteGitHubAccountToken" // DeleteGitHubAccountTokenRequest generates a "aws/request.Request" representing the // client's request for the DeleteGitHubAccountToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1652,7 +1652,7 @@ const opDeregisterOnPremisesInstance = "DeregisterOnPremisesInstance" // DeregisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterOnPremisesInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1736,7 +1736,7 @@ const opGetApplication = "GetApplication" // GetApplicationRequest generates a "aws/request.Request" representing the // client's request for the GetApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1821,7 +1821,7 @@ const opGetApplicationRevision = "GetApplicationRevision" // GetApplicationRevisionRequest generates a "aws/request.Request" representing the // client's request for the GetApplicationRevision operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1915,7 +1915,7 @@ const opGetDeployment = "GetDeployment" // GetDeploymentRequest generates a "aws/request.Request" representing the // client's request for the GetDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2000,7 +2000,7 @@ const opGetDeploymentConfig = "GetDeploymentConfig" // GetDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2086,7 +2086,7 @@ const opGetDeploymentGroup = "GetDeploymentGroup" // GetDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2181,7 +2181,7 @@ const opGetDeploymentInstance = "GetDeploymentInstance" // GetDeploymentInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2275,7 +2275,7 @@ const opGetOnPremisesInstance = "GetOnPremisesInstance" // GetOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetOnPremisesInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2360,7 +2360,7 @@ const opListApplicationRevisions = "ListApplicationRevisions" // ListApplicationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the ListApplicationRevisions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2523,7 +2523,7 @@ const opListApplications = "ListApplications" // ListApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListApplications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2658,7 +2658,7 @@ const opListDeploymentConfigs = "ListDeploymentConfigs" // ListDeploymentConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentConfigs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2793,7 +2793,7 @@ const opListDeploymentGroups = "ListDeploymentGroups" // ListDeploymentGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2938,7 +2938,7 @@ const opListDeploymentInstances = "ListDeploymentInstances" // ListDeploymentInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3098,7 +3098,7 @@ const opListDeployments = "ListDeployments" // ListDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the ListDeployments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3259,7 +3259,7 @@ const opListGitHubAccountTokenNames = "ListGitHubAccountTokenNames" // ListGitHubAccountTokenNamesRequest generates a "aws/request.Request" representing the // client's request for the ListGitHubAccountTokenNames operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3344,7 +3344,7 @@ const opListOnPremisesInstances = "ListOnPremisesInstances" // ListOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3433,7 +3433,7 @@ const opPutLifecycleEventHookExecutionStatus = "PutLifecycleEventHookExecutionSt // PutLifecycleEventHookExecutionStatusRequest generates a "aws/request.Request" representing the // client's request for the PutLifecycleEventHookExecutionStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3534,7 +3534,7 @@ const opRegisterApplicationRevision = "RegisterApplicationRevision" // RegisterApplicationRevisionRequest generates a "aws/request.Request" representing the // client's request for the RegisterApplicationRevision operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3630,7 +3630,7 @@ const opRegisterOnPremisesInstance = "RegisterOnPremisesInstance" // RegisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterOnPremisesInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3744,7 +3744,7 @@ const opRemoveTagsFromOnPremisesInstances = "RemoveTagsFromOnPremisesInstances" // RemoveTagsFromOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromOnPremisesInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3844,7 +3844,7 @@ const opSkipWaitTimeForInstanceTermination = "SkipWaitTimeForInstanceTermination // SkipWaitTimeForInstanceTerminationRequest generates a "aws/request.Request" representing the // client's request for the SkipWaitTimeForInstanceTermination operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3941,7 +3941,7 @@ const opStopDeployment = "StopDeployment" // StopDeploymentRequest generates a "aws/request.Request" representing the // client's request for the StopDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4029,7 +4029,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4120,7 +4120,7 @@ const opUpdateDeploymentGroup = "UpdateDeploymentGroup" // UpdateDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeploymentGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index 6d6c4d460cc..9e895f1e144 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -17,7 +17,7 @@ const opAcknowledgeJob = "AcknowledgeJob" // AcknowledgeJobRequest generates a "aws/request.Request" representing the // client's request for the AcknowledgeJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -103,7 +103,7 @@ const opAcknowledgeThirdPartyJob = "AcknowledgeThirdPartyJob" // AcknowledgeThirdPartyJobRequest generates a "aws/request.Request" representing the // client's request for the AcknowledgeThirdPartyJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -192,7 +192,7 @@ const opCreateCustomActionType = "CreateCustomActionType" // CreateCustomActionTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomActionType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -276,7 +276,7 @@ const opCreatePipeline = "CreatePipeline" // CreatePipelineRequest generates a "aws/request.Request" representing the // client's request for the CreatePipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -374,7 +374,7 @@ const opDeleteCustomActionType = "DeleteCustomActionType" // DeleteCustomActionTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomActionType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -459,7 +459,7 @@ const opDeletePipeline = "DeletePipeline" // DeletePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeletePipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -540,7 +540,7 @@ const opDisableStageTransition = "DisableStageTransition" // DisableStageTransitionRequest generates a "aws/request.Request" representing the // client's request for the DisableStageTransition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -628,7 +628,7 @@ const opEnableStageTransition = "EnableStageTransition" // EnableStageTransitionRequest generates a "aws/request.Request" representing the // client's request for the EnableStageTransition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -715,7 +715,7 @@ const opGetJobDetails = "GetJobDetails" // GetJobDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetJobDetails operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -802,7 +802,7 @@ const opGetPipeline = "GetPipeline" // GetPipelineRequest generates a "aws/request.Request" representing the // client's request for the GetPipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -890,7 +890,7 @@ const opGetPipelineExecution = "GetPipelineExecution" // GetPipelineExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetPipelineExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -978,7 +978,7 @@ const opGetPipelineState = "GetPipelineState" // GetPipelineStateRequest generates a "aws/request.Request" representing the // client's request for the GetPipelineState operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1061,7 +1061,7 @@ const opGetThirdPartyJobDetails = "GetThirdPartyJobDetails" // GetThirdPartyJobDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetThirdPartyJobDetails operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1155,7 +1155,7 @@ const opListActionTypes = "ListActionTypes" // ListActionTypesRequest generates a "aws/request.Request" representing the // client's request for the ListActionTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1239,7 +1239,7 @@ const opListPipelineExecutions = "ListPipelineExecutions" // ListPipelineExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListPipelineExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1325,7 +1325,7 @@ const opListPipelines = "ListPipelines" // ListPipelinesRequest generates a "aws/request.Request" representing the // client's request for the ListPipelines operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1405,7 +1405,7 @@ const opPollForJobs = "PollForJobs" // PollForJobsRequest generates a "aws/request.Request" representing the // client's request for the PollForJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1492,7 +1492,7 @@ const opPollForThirdPartyJobs = "PollForThirdPartyJobs" // PollForThirdPartyJobsRequest generates a "aws/request.Request" representing the // client's request for the PollForThirdPartyJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1579,7 +1579,7 @@ const opPutActionRevision = "PutActionRevision" // PutActionRevisionRequest generates a "aws/request.Request" representing the // client's request for the PutActionRevision operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1667,7 +1667,7 @@ const opPutApprovalResult = "PutApprovalResult" // PutApprovalResultRequest generates a "aws/request.Request" representing the // client's request for the PutApprovalResult operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1762,7 +1762,7 @@ const opPutJobFailureResult = "PutJobFailureResult" // PutJobFailureResultRequest generates a "aws/request.Request" representing the // client's request for the PutJobFailureResult operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1850,7 +1850,7 @@ const opPutJobSuccessResult = "PutJobSuccessResult" // PutJobSuccessResultRequest generates a "aws/request.Request" representing the // client's request for the PutJobSuccessResult operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1938,7 +1938,7 @@ const opPutThirdPartyJobFailureResult = "PutThirdPartyJobFailureResult" // PutThirdPartyJobFailureResultRequest generates a "aws/request.Request" representing the // client's request for the PutThirdPartyJobFailureResult operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2029,7 +2029,7 @@ const opPutThirdPartyJobSuccessResult = "PutThirdPartyJobSuccessResult" // PutThirdPartyJobSuccessResultRequest generates a "aws/request.Request" representing the // client's request for the PutThirdPartyJobSuccessResult operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2120,7 +2120,7 @@ const opRetryStageExecution = "RetryStageExecution" // RetryStageExecutionRequest generates a "aws/request.Request" representing the // client's request for the RetryStageExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2215,7 +2215,7 @@ const opStartPipelineExecution = "StartPipelineExecution" // StartPipelineExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartPipelineExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2298,7 +2298,7 @@ const opUpdatePipeline = "UpdatePipeline" // UpdatePipelineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go index 399ef91e212..022ada85fdc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go @@ -17,7 +17,7 @@ const opCreateIdentityPool = "CreateIdentityPool" // CreateIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the CreateIdentityPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -126,7 +126,7 @@ const opDeleteIdentities = "DeleteIdentities" // DeleteIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -214,7 +214,7 @@ const opDeleteIdentityPool = "DeleteIdentityPool" // DeleteIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -311,7 +311,7 @@ const opDescribeIdentity = "DescribeIdentity" // DescribeIdentityRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -406,7 +406,7 @@ const opDescribeIdentityPool = "DescribeIdentityPool" // DescribeIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -501,7 +501,7 @@ const opGetCredentialsForIdentity = "GetCredentialsForIdentity" // GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCredentialsForIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -610,7 +610,7 @@ const opGetId = "GetId" // GetIdRequest generates a "aws/request.Request" representing the // client's request for the GetId operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -716,7 +716,7 @@ const opGetIdentityPoolRoles = "GetIdentityPoolRoles" // GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityPoolRoles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -814,7 +814,7 @@ const opGetOpenIdToken = "GetOpenIdToken" // GetOpenIdTokenRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIdToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -920,7 +920,7 @@ const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity // GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1035,7 +1035,7 @@ const opListIdentities = "ListIdentities" // ListIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1129,7 +1129,7 @@ const opListIdentityPools = "ListIdentityPools" // ListIdentityPoolsRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityPools operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1219,7 +1219,7 @@ const opLookupDeveloperIdentity = "LookupDeveloperIdentity" // LookupDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the LookupDeveloperIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1324,7 +1324,7 @@ const opMergeDeveloperIdentities = "MergeDeveloperIdentities" // MergeDeveloperIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the MergeDeveloperIdentities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1428,7 +1428,7 @@ const opSetIdentityPoolRoles = "SetIdentityPoolRoles" // SetIdentityPoolRolesRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityPoolRoles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1532,7 +1532,7 @@ const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity" // UnlinkDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the UnlinkDeveloperIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1635,7 +1635,7 @@ const opUnlinkIdentity = "UnlinkIdentity" // UnlinkIdentityRequest generates a "aws/request.Request" representing the // client's request for the UnlinkIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1741,7 +1741,7 @@ const opUpdateIdentityPool = "UpdateIdentityPool" // UpdateIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateIdentityPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index 168fe2192df..739f5f15a11 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -18,7 +18,7 @@ const opAddCustomAttributes = "AddCustomAttributes" // AddCustomAttributesRequest generates a "aws/request.Request" representing the // client's request for the AddCustomAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -116,7 +116,7 @@ const opAdminAddUserToGroup = "AdminAddUserToGroup" // AdminAddUserToGroupRequest generates a "aws/request.Request" representing the // client's request for the AdminAddUserToGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -217,7 +217,7 @@ const opAdminConfirmSignUp = "AdminConfirmSignUp" // AdminConfirmSignUpRequest generates a "aws/request.Request" representing the // client's request for the AdminConfirmSignUp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -337,7 +337,7 @@ const opAdminCreateUser = "AdminCreateUser" // AdminCreateUserRequest generates a "aws/request.Request" representing the // client's request for the AdminCreateUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -488,7 +488,7 @@ const opAdminDeleteUser = "AdminDeleteUser" // AdminDeleteUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDeleteUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -589,7 +589,7 @@ const opAdminDeleteUserAttributes = "AdminDeleteUserAttributes" // AdminDeleteUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the AdminDeleteUserAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -689,7 +689,7 @@ const opAdminDisableProviderForUser = "AdminDisableProviderForUser" // AdminDisableProviderForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDisableProviderForUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -820,7 +820,7 @@ const opAdminDisableUser = "AdminDisableUser" // AdminDisableUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDisableUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -919,7 +919,7 @@ const opAdminEnableUser = "AdminEnableUser" // AdminEnableUserRequest generates a "aws/request.Request" representing the // client's request for the AdminEnableUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1018,7 +1018,7 @@ const opAdminForgetDevice = "AdminForgetDevice" // AdminForgetDeviceRequest generates a "aws/request.Request" representing the // client's request for the AdminForgetDevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1122,7 +1122,7 @@ const opAdminGetDevice = "AdminGetDevice" // AdminGetDeviceRequest generates a "aws/request.Request" representing the // client's request for the AdminGetDevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1221,7 +1221,7 @@ const opAdminGetUser = "AdminGetUser" // AdminGetUserRequest generates a "aws/request.Request" representing the // client's request for the AdminGetUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1321,7 +1321,7 @@ const opAdminInitiateAuth = "AdminInitiateAuth" // AdminInitiateAuthRequest generates a "aws/request.Request" representing the // client's request for the AdminInitiateAuth operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1455,7 +1455,7 @@ const opAdminLinkProviderForUser = "AdminLinkProviderForUser" // AdminLinkProviderForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminLinkProviderForUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1576,7 +1576,7 @@ const opAdminListDevices = "AdminListDevices" // AdminListDevicesRequest generates a "aws/request.Request" representing the // client's request for the AdminListDevices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1675,7 +1675,7 @@ const opAdminListGroupsForUser = "AdminListGroupsForUser" // AdminListGroupsForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminListGroupsForUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1774,7 +1774,7 @@ const opAdminListUserAuthEvents = "AdminListUserAuthEvents" // AdminListUserAuthEventsRequest generates a "aws/request.Request" representing the // client's request for the AdminListUserAuthEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1875,7 +1875,7 @@ const opAdminRemoveUserFromGroup = "AdminRemoveUserFromGroup" // AdminRemoveUserFromGroupRequest generates a "aws/request.Request" representing the // client's request for the AdminRemoveUserFromGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1976,7 +1976,7 @@ const opAdminResetUserPassword = "AdminResetUserPassword" // AdminResetUserPasswordRequest generates a "aws/request.Request" representing the // client's request for the AdminResetUserPassword operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2116,7 +2116,7 @@ const opAdminRespondToAuthChallenge = "AdminRespondToAuthChallenge" // AdminRespondToAuthChallengeRequest generates a "aws/request.Request" representing the // client's request for the AdminRespondToAuthChallenge operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2271,7 +2271,7 @@ const opAdminSetUserMFAPreference = "AdminSetUserMFAPreference" // AdminSetUserMFAPreferenceRequest generates a "aws/request.Request" representing the // client's request for the AdminSetUserMFAPreference operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2370,7 +2370,7 @@ const opAdminSetUserSettings = "AdminSetUserSettings" // AdminSetUserSettingsRequest generates a "aws/request.Request" representing the // client's request for the AdminSetUserSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2465,7 +2465,7 @@ const opAdminUpdateAuthEventFeedback = "AdminUpdateAuthEventFeedback" // AdminUpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateAuthEventFeedback operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2567,7 +2567,7 @@ const opAdminUpdateDeviceStatus = "AdminUpdateDeviceStatus" // AdminUpdateDeviceStatusRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateDeviceStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2669,7 +2669,7 @@ const opAdminUpdateUserAttributes = "AdminUpdateUserAttributes" // AdminUpdateUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateUserAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2793,7 +2793,7 @@ const opAdminUserGlobalSignOut = "AdminUserGlobalSignOut" // AdminUserGlobalSignOutRequest generates a "aws/request.Request" representing the // client's request for the AdminUserGlobalSignOut operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2892,7 +2892,7 @@ const opAssociateSoftwareToken = "AssociateSoftwareToken" // AssociateSoftwareTokenRequest generates a "aws/request.Request" representing the // client's request for the AssociateSoftwareToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2987,7 +2987,7 @@ const opChangePassword = "ChangePassword" // ChangePasswordRequest generates a "aws/request.Request" representing the // client's request for the ChangePassword operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3099,7 +3099,7 @@ const opConfirmDevice = "ConfirmDevice" // ConfirmDeviceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmDevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3218,7 +3218,7 @@ const opConfirmForgotPassword = "ConfirmForgotPassword" // ConfirmForgotPasswordRequest generates a "aws/request.Request" representing the // client's request for the ConfirmForgotPassword operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3350,7 +3350,7 @@ const opConfirmSignUp = "ConfirmSignUp" // ConfirmSignUpRequest generates a "aws/request.Request" representing the // client's request for the ConfirmSignUp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3482,7 +3482,7 @@ const opCreateGroup = "CreateGroup" // CreateGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3586,7 +3586,7 @@ const opCreateIdentityProvider = "CreateIdentityProvider" // CreateIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3688,7 +3688,7 @@ const opCreateResourceServer = "CreateResourceServer" // CreateResourceServerRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceServer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3786,7 +3786,7 @@ const opCreateUserImportJob = "CreateUserImportJob" // CreateUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the CreateUserImportJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3887,7 +3887,7 @@ const opCreateUserPool = "CreateUserPool" // CreateUserPoolRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3999,7 +3999,7 @@ const opCreateUserPoolClient = "CreateUserPoolClient" // CreateUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4103,7 +4103,7 @@ const opCreateUserPoolDomain = "CreateUserPoolDomain" // CreateUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPoolDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4193,7 +4193,7 @@ const opDeleteGroup = "DeleteGroup" // DeleteGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4291,7 +4291,7 @@ const opDeleteIdentityProvider = "DeleteIdentityProvider" // DeleteIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4390,7 +4390,7 @@ const opDeleteResourceServer = "DeleteResourceServer" // DeleteResourceServerRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceServer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4486,7 +4486,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4592,7 +4592,7 @@ const opDeleteUserAttributes = "DeleteUserAttributes" // DeleteUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4696,7 +4696,7 @@ const opDeleteUserPool = "DeleteUserPool" // DeleteUserPoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4796,7 +4796,7 @@ const opDeleteUserPoolClient = "DeleteUserPoolClient" // DeleteUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4892,7 +4892,7 @@ const opDeleteUserPoolDomain = "DeleteUserPoolDomain" // DeleteUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPoolDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4982,7 +4982,7 @@ const opDescribeIdentityProvider = "DescribeIdentityProvider" // DescribeIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5076,7 +5076,7 @@ const opDescribeResourceServer = "DescribeResourceServer" // DescribeResourceServerRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourceServer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5170,7 +5170,7 @@ const opDescribeRiskConfiguration = "DescribeRiskConfiguration" // DescribeRiskConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeRiskConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5267,7 +5267,7 @@ const opDescribeUserImportJob = "DescribeUserImportJob" // DescribeUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserImportJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5361,7 +5361,7 @@ const opDescribeUserPool = "DescribeUserPool" // DescribeUserPoolRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5459,7 +5459,7 @@ const opDescribeUserPoolClient = "DescribeUserPoolClient" // DescribeUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5554,7 +5554,7 @@ const opDescribeUserPoolDomain = "DescribeUserPoolDomain" // DescribeUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPoolDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5644,7 +5644,7 @@ const opForgetDevice = "ForgetDevice" // ForgetDeviceRequest generates a "aws/request.Request" representing the // client's request for the ForgetDevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5752,7 +5752,7 @@ const opForgotPassword = "ForgotPassword" // ForgotPasswordRequest generates a "aws/request.Request" representing the // client's request for the ForgotPassword operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5893,7 +5893,7 @@ const opGetCSVHeader = "GetCSVHeader" // GetCSVHeaderRequest generates a "aws/request.Request" representing the // client's request for the GetCSVHeader operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5988,7 +5988,7 @@ const opGetDevice = "GetDevice" // GetDeviceRequest generates a "aws/request.Request" representing the // client's request for the GetDevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6094,7 +6094,7 @@ const opGetGroup = "GetGroup" // GetGroupRequest generates a "aws/request.Request" representing the // client's request for the GetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6190,7 +6190,7 @@ const opGetIdentityProviderByIdentifier = "GetIdentityProviderByIdentifier" // GetIdentityProviderByIdentifierRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityProviderByIdentifier operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6284,7 +6284,7 @@ const opGetSigningCertificate = "GetSigningCertificate" // GetSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6367,7 +6367,7 @@ const opGetUICustomization = "GetUICustomization" // GetUICustomizationRequest generates a "aws/request.Request" representing the // client's request for the GetUICustomization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6464,7 +6464,7 @@ const opGetUser = "GetUser" // GetUserRequest generates a "aws/request.Request" representing the // client's request for the GetUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6568,7 +6568,7 @@ const opGetUserAttributeVerificationCode = "GetUserAttributeVerificationCode" // GetUserAttributeVerificationCodeRequest generates a "aws/request.Request" representing the // client's request for the GetUserAttributeVerificationCode operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6705,7 +6705,7 @@ const opGetUserPoolMfaConfig = "GetUserPoolMfaConfig" // GetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the // client's request for the GetUserPoolMfaConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6799,7 +6799,7 @@ const opGlobalSignOut = "GlobalSignOut" // GlobalSignOutRequest generates a "aws/request.Request" representing the // client's request for the GlobalSignOut operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6899,7 +6899,7 @@ const opInitiateAuth = "InitiateAuth" // InitiateAuthRequest generates a "aws/request.Request" representing the // client's request for the InitiateAuth operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7017,7 +7017,7 @@ const opListDevices = "ListDevices" // ListDevicesRequest generates a "aws/request.Request" representing the // client's request for the ListDevices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7123,7 +7123,7 @@ const opListGroups = "ListGroups" // ListGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7219,7 +7219,7 @@ const opListIdentityProviders = "ListIdentityProviders" // ListIdentityProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityProviders operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7313,7 +7313,7 @@ const opListResourceServers = "ListResourceServers" // ListResourceServersRequest generates a "aws/request.Request" representing the // client's request for the ListResourceServers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7407,7 +7407,7 @@ const opListUserImportJobs = "ListUserImportJobs" // ListUserImportJobsRequest generates a "aws/request.Request" representing the // client's request for the ListUserImportJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7501,7 +7501,7 @@ const opListUserPoolClients = "ListUserPoolClients" // ListUserPoolClientsRequest generates a "aws/request.Request" representing the // client's request for the ListUserPoolClients operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7595,7 +7595,7 @@ const opListUserPools = "ListUserPools" // ListUserPoolsRequest generates a "aws/request.Request" representing the // client's request for the ListUserPools operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7685,7 +7685,7 @@ const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7779,7 +7779,7 @@ const opListUsersInGroup = "ListUsersInGroup" // ListUsersInGroupRequest generates a "aws/request.Request" representing the // client's request for the ListUsersInGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7875,7 +7875,7 @@ const opResendConfirmationCode = "ResendConfirmationCode" // ResendConfirmationCodeRequest generates a "aws/request.Request" representing the // client's request for the ResendConfirmationCode operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8007,7 +8007,7 @@ const opRespondToAuthChallenge = "RespondToAuthChallenge" // RespondToAuthChallengeRequest generates a "aws/request.Request" representing the // client's request for the RespondToAuthChallenge operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8160,7 +8160,7 @@ const opSetRiskConfiguration = "SetRiskConfiguration" // SetRiskConfigurationRequest generates a "aws/request.Request" representing the // client's request for the SetRiskConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8270,7 +8270,7 @@ const opSetUICustomization = "SetUICustomization" // SetUICustomizationRequest generates a "aws/request.Request" representing the // client's request for the SetUICustomization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8375,7 +8375,7 @@ const opSetUserMFAPreference = "SetUserMFAPreference" // SetUserMFAPreferenceRequest generates a "aws/request.Request" representing the // client's request for the SetUserMFAPreference operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8474,7 +8474,7 @@ const opSetUserPoolMfaConfig = "SetUserPoolMfaConfig" // SetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the // client's request for the SetUserPoolMfaConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8578,7 +8578,7 @@ const opSetUserSettings = "SetUserSettings" // SetUserSettingsRequest generates a "aws/request.Request" representing the // client's request for the SetUserSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8680,7 +8680,7 @@ const opSignUp = "SignUp" // SignUpRequest generates a "aws/request.Request" representing the // client's request for the SignUp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8813,7 +8813,7 @@ const opStartUserImportJob = "StartUserImportJob" // StartUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the StartUserImportJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8910,7 +8910,7 @@ const opStopUserImportJob = "StopUserImportJob" // StopUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the StopUserImportJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9007,7 +9007,7 @@ const opUpdateAuthEventFeedback = "UpdateAuthEventFeedback" // UpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthEventFeedback operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9109,7 +9109,7 @@ const opUpdateDeviceStatus = "UpdateDeviceStatus" // UpdateDeviceStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeviceStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9215,7 +9215,7 @@ const opUpdateGroup = "UpdateGroup" // UpdateGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9311,7 +9311,7 @@ const opUpdateIdentityProvider = "UpdateIdentityProvider" // UpdateIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the UpdateIdentityProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9408,7 +9408,7 @@ const opUpdateResourceServer = "UpdateResourceServer" // UpdateResourceServerRequest generates a "aws/request.Request" representing the // client's request for the UpdateResourceServer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9502,7 +9502,7 @@ const opUpdateUserAttributes = "UpdateUserAttributes" // UpdateUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9648,7 +9648,7 @@ const opUpdateUserPool = "UpdateUserPool" // UpdateUserPoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserPool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9766,7 +9766,7 @@ const opUpdateUserPoolClient = "UpdateUserPoolClient" // UpdateUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserPoolClient operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9870,7 +9870,7 @@ const opVerifySoftwareToken = "VerifySoftwareToken" // VerifySoftwareTokenRequest generates a "aws/request.Request" representing the // client's request for the VerifySoftwareToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9992,7 +9992,7 @@ const opVerifyUserAttribute = "VerifyUserAttribute" // VerifyUserAttributeRequest generates a "aws/request.Request" representing the // client's request for the VerifyUserAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index d12bd418f82..56e5192db70 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -17,7 +17,7 @@ const opBatchGetResourceConfig = "BatchGetResourceConfig" // BatchGetResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the BatchGetResourceConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -104,11 +104,94 @@ func (c *ConfigService) BatchGetResourceConfigWithContext(ctx aws.Context, input return out, req.Send() } +const opDeleteAggregationAuthorization = "DeleteAggregationAuthorization" + +// DeleteAggregationAuthorizationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAggregationAuthorization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAggregationAuthorization for more information on using the DeleteAggregationAuthorization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAggregationAuthorizationRequest method. +// req, resp := client.DeleteAggregationAuthorizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteAggregationAuthorization +func (c *ConfigService) DeleteAggregationAuthorizationRequest(input *DeleteAggregationAuthorizationInput) (req *request.Request, output *DeleteAggregationAuthorizationOutput) { + op := &request.Operation{ + Name: opDeleteAggregationAuthorization, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteAggregationAuthorizationInput{} + } + + output = &DeleteAggregationAuthorizationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteAggregationAuthorization API operation for AWS Config. +// +// Deletes the authorization granted to the specified configuration aggregator +// account in a specified region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation DeleteAggregationAuthorization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteAggregationAuthorization +func (c *ConfigService) DeleteAggregationAuthorization(input *DeleteAggregationAuthorizationInput) (*DeleteAggregationAuthorizationOutput, error) { + req, out := c.DeleteAggregationAuthorizationRequest(input) + return out, req.Send() +} + +// DeleteAggregationAuthorizationWithContext is the same as DeleteAggregationAuthorization with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAggregationAuthorization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) DeleteAggregationAuthorizationWithContext(ctx aws.Context, input *DeleteAggregationAuthorizationInput, opts ...request.Option) (*DeleteAggregationAuthorizationOutput, error) { + req, out := c.DeleteAggregationAuthorizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteConfigRule = "DeleteConfigRule" // DeleteConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -196,11 +279,93 @@ func (c *ConfigService) DeleteConfigRuleWithContext(ctx aws.Context, input *Dele return out, req.Send() } +const opDeleteConfigurationAggregator = "DeleteConfigurationAggregator" + +// DeleteConfigurationAggregatorRequest generates a "aws/request.Request" representing the +// client's request for the DeleteConfigurationAggregator operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteConfigurationAggregator for more information on using the DeleteConfigurationAggregator +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteConfigurationAggregatorRequest method. +// req, resp := client.DeleteConfigurationAggregatorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationAggregator +func (c *ConfigService) DeleteConfigurationAggregatorRequest(input *DeleteConfigurationAggregatorInput) (req *request.Request, output *DeleteConfigurationAggregatorOutput) { + op := &request.Operation{ + Name: opDeleteConfigurationAggregator, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteConfigurationAggregatorInput{} + } + + output = &DeleteConfigurationAggregatorOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteConfigurationAggregator API operation for AWS Config. +// +// Deletes the specified configuration aggregator and the aggregated data associated +// with the aggregator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation DeleteConfigurationAggregator for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeleteConfigurationAggregator +func (c *ConfigService) DeleteConfigurationAggregator(input *DeleteConfigurationAggregatorInput) (*DeleteConfigurationAggregatorOutput, error) { + req, out := c.DeleteConfigurationAggregatorRequest(input) + return out, req.Send() +} + +// DeleteConfigurationAggregatorWithContext is the same as DeleteConfigurationAggregator with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteConfigurationAggregator for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) DeleteConfigurationAggregatorWithContext(ctx aws.Context, input *DeleteConfigurationAggregatorInput, opts ...request.Option) (*DeleteConfigurationAggregatorOutput, error) { + req, out := c.DeleteConfigurationAggregatorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteConfigurationRecorder = "DeleteConfigurationRecorder" // DeleteConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -290,7 +455,7 @@ const opDeleteDeliveryChannel = "DeleteDeliveryChannel" // DeleteDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeliveryChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -378,7 +543,7 @@ const opDeleteEvaluationResults = "DeleteEvaluationResults" // DeleteEvaluationResultsRequest generates a "aws/request.Request" representing the // client's request for the DeleteEvaluationResults operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -418,10 +583,10 @@ func (c *ConfigService) DeleteEvaluationResultsRequest(input *DeleteEvaluationRe // DeleteEvaluationResults API operation for AWS Config. // -// Deletes the evaluation results for the specified Config rule. You can specify -// one Config rule per request. After you delete the evaluation results, you -// can call the StartConfigRulesEvaluation API to start evaluating your AWS -// resources against the rule. +// Deletes the evaluation results for the specified AWS Config rule. You can +// specify one AWS Config rule per request. After you delete the evaluation +// results, you can call the StartConfigRulesEvaluation API to start evaluating +// your AWS resources against the rule. // // 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 @@ -461,11 +626,94 @@ func (c *ConfigService) DeleteEvaluationResultsWithContext(ctx aws.Context, inpu return out, req.Send() } +const opDeletePendingAggregationRequest = "DeletePendingAggregationRequest" + +// DeletePendingAggregationRequestRequest generates a "aws/request.Request" representing the +// client's request for the DeletePendingAggregationRequest operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePendingAggregationRequest for more information on using the DeletePendingAggregationRequest +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePendingAggregationRequestRequest method. +// req, resp := client.DeletePendingAggregationRequestRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeletePendingAggregationRequest +func (c *ConfigService) DeletePendingAggregationRequestRequest(input *DeletePendingAggregationRequestInput) (req *request.Request, output *DeletePendingAggregationRequestOutput) { + op := &request.Operation{ + Name: opDeletePendingAggregationRequest, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePendingAggregationRequestInput{} + } + + output = &DeletePendingAggregationRequestOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePendingAggregationRequest API operation for AWS Config. +// +// Deletes pending authorization requests for a specified aggregator account +// in a specified region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation DeletePendingAggregationRequest for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DeletePendingAggregationRequest +func (c *ConfigService) DeletePendingAggregationRequest(input *DeletePendingAggregationRequestInput) (*DeletePendingAggregationRequestOutput, error) { + req, out := c.DeletePendingAggregationRequestRequest(input) + return out, req.Send() +} + +// DeletePendingAggregationRequestWithContext is the same as DeletePendingAggregationRequest with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePendingAggregationRequest for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) DeletePendingAggregationRequestWithContext(ctx aws.Context, input *DeletePendingAggregationRequestInput, opts ...request.Option) (*DeletePendingAggregationRequestOutput, error) { + req, out := c.DeletePendingAggregationRequestRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeliverConfigSnapshot = "DeliverConfigSnapshot" // DeliverConfigSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeliverConfigSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -507,14 +755,15 @@ func (c *ConfigService) DeliverConfigSnapshotRequest(input *DeliverConfigSnapsho // // Schedules delivery of a configuration snapshot to the Amazon S3 bucket in // the specified delivery channel. After the delivery has started, AWS Config -// sends following notifications using an Amazon SNS topic that you have specified. +// sends the following notifications using an Amazon SNS topic that you have +// specified. // -// * Notification of starting the delivery. +// * Notification of the start of the delivery. // -// * Notification of delivery completed, if the delivery was successfully -// completed. +// * Notification of the completion of the delivery, if the delivery was +// successfully completed. // -// * Notification of delivery failure, if the delivery failed to complete. +// * Notification of delivery failure, if the delivery failed. // // 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 @@ -556,175 +805,356 @@ func (c *ConfigService) DeliverConfigSnapshotWithContext(ctx aws.Context, input return out, req.Send() } -const opDescribeComplianceByConfigRule = "DescribeComplianceByConfigRule" +const opDescribeAggregateComplianceByConfigRules = "DescribeAggregateComplianceByConfigRules" -// DescribeComplianceByConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeComplianceByConfigRule operation. The "output" return -// value will be populated with the request's response once the request complets +// DescribeAggregateComplianceByConfigRulesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAggregateComplianceByConfigRules operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeComplianceByConfigRule for more information on using the DescribeComplianceByConfigRule +// See DescribeAggregateComplianceByConfigRules for more information on using the DescribeAggregateComplianceByConfigRules // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeComplianceByConfigRuleRequest method. -// req, resp := client.DescribeComplianceByConfigRuleRequest(params) +// // Example sending a request using the DescribeAggregateComplianceByConfigRulesRequest method. +// req, resp := client.DescribeAggregateComplianceByConfigRulesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule -func (c *ConfigService) DescribeComplianceByConfigRuleRequest(input *DescribeComplianceByConfigRuleInput) (req *request.Request, output *DescribeComplianceByConfigRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregateComplianceByConfigRules +func (c *ConfigService) DescribeAggregateComplianceByConfigRulesRequest(input *DescribeAggregateComplianceByConfigRulesInput) (req *request.Request, output *DescribeAggregateComplianceByConfigRulesOutput) { op := &request.Operation{ - Name: opDescribeComplianceByConfigRule, + Name: opDescribeAggregateComplianceByConfigRules, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeComplianceByConfigRuleInput{} + input = &DescribeAggregateComplianceByConfigRulesInput{} } - output = &DescribeComplianceByConfigRuleOutput{} + output = &DescribeAggregateComplianceByConfigRulesOutput{} req = c.newRequest(op, input, output) return } -// DescribeComplianceByConfigRule API operation for AWS Config. -// -// Indicates whether the specified AWS Config rules are compliant. If a rule -// is noncompliant, this action returns the number of AWS resources that do -// not comply with the rule. -// -// A rule is compliant if all of the evaluated resources comply with it, and -// it is noncompliant if any of these resources do not comply. -// -// If AWS Config has no current evaluation results for the rule, it returns -// INSUFFICIENT_DATA. This result might indicate one of the following conditions: -// -// * AWS Config has never invoked an evaluation for the rule. To check whether -// it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime -// and LastFailedInvocationTime. +// DescribeAggregateComplianceByConfigRules API operation for AWS Config. // -// * The rule's AWS Lambda function is failing to send evaluation results -// to AWS Config. Verify that the role that you assigned to your configuration -// recorder includes the config:PutEvaluations permission. If the rule is -// a custom rule, verify that the AWS Lambda execution role includes the -// config:PutEvaluations permission. +// Returns a list of compliant and noncompliant rules with the number of resources +// for compliant and noncompliant rules. // -// * The rule's AWS Lambda function has returned NOT_APPLICABLE for all evaluation -// results. This can occur if the resources were deleted or removed from -// the rule's scope. +// The results can return an empty result page, but if you have a nextToken, +// the results are displayed on the next page. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Config's -// API operation DescribeComplianceByConfigRule for usage and error information. +// API operation DescribeAggregateComplianceByConfigRules for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. // -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule -func (c *ConfigService) DescribeComplianceByConfigRule(input *DescribeComplianceByConfigRuleInput) (*DescribeComplianceByConfigRuleOutput, error) { - req, out := c.DescribeComplianceByConfigRuleRequest(input) +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregateComplianceByConfigRules +func (c *ConfigService) DescribeAggregateComplianceByConfigRules(input *DescribeAggregateComplianceByConfigRulesInput) (*DescribeAggregateComplianceByConfigRulesOutput, error) { + req, out := c.DescribeAggregateComplianceByConfigRulesRequest(input) return out, req.Send() } -// DescribeComplianceByConfigRuleWithContext is the same as DescribeComplianceByConfigRule with the addition of +// DescribeAggregateComplianceByConfigRulesWithContext is the same as DescribeAggregateComplianceByConfigRules with the addition of // the ability to pass a context and additional request options. // -// See DescribeComplianceByConfigRule for details on how to use this API operation. +// See DescribeAggregateComplianceByConfigRules for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ConfigService) DescribeComplianceByConfigRuleWithContext(ctx aws.Context, input *DescribeComplianceByConfigRuleInput, opts ...request.Option) (*DescribeComplianceByConfigRuleOutput, error) { - req, out := c.DescribeComplianceByConfigRuleRequest(input) +func (c *ConfigService) DescribeAggregateComplianceByConfigRulesWithContext(ctx aws.Context, input *DescribeAggregateComplianceByConfigRulesInput, opts ...request.Option) (*DescribeAggregateComplianceByConfigRulesOutput, error) { + req, out := c.DescribeAggregateComplianceByConfigRulesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeComplianceByResource = "DescribeComplianceByResource" +const opDescribeAggregationAuthorizations = "DescribeAggregationAuthorizations" -// DescribeComplianceByResourceRequest generates a "aws/request.Request" representing the -// client's request for the DescribeComplianceByResource operation. The "output" return -// value will be populated with the request's response once the request complets +// DescribeAggregationAuthorizationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAggregationAuthorizations operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeComplianceByResource for more information on using the DescribeComplianceByResource +// See DescribeAggregationAuthorizations for more information on using the DescribeAggregationAuthorizations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeComplianceByResourceRequest method. -// req, resp := client.DescribeComplianceByResourceRequest(params) +// // Example sending a request using the DescribeAggregationAuthorizationsRequest method. +// req, resp := client.DescribeAggregationAuthorizationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByResource -func (c *ConfigService) DescribeComplianceByResourceRequest(input *DescribeComplianceByResourceInput) (req *request.Request, output *DescribeComplianceByResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregationAuthorizations +func (c *ConfigService) DescribeAggregationAuthorizationsRequest(input *DescribeAggregationAuthorizationsInput) (req *request.Request, output *DescribeAggregationAuthorizationsOutput) { op := &request.Operation{ - Name: opDescribeComplianceByResource, + Name: opDescribeAggregationAuthorizations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeComplianceByResourceInput{} + input = &DescribeAggregationAuthorizationsInput{} } - output = &DescribeComplianceByResourceOutput{} + output = &DescribeAggregationAuthorizationsOutput{} req = c.newRequest(op, input, output) return } -// DescribeComplianceByResource API operation for AWS Config. +// DescribeAggregationAuthorizations API operation for AWS Config. // -// Indicates whether the specified AWS resources are compliant. If a resource -// is noncompliant, this action returns the number of AWS Config rules that -// the resource does not comply with. +// Returns a list of authorizations granted to various aggregator accounts and +// regions. // -// A resource is compliant if it complies with all the AWS Config rules that -// evaluate it. It is noncompliant if it does not comply with one or more of -// these rules. +// 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. // -// If AWS Config has no current evaluation results for the resource, it returns -// INSUFFICIENT_DATA. This result might indicate one of the following conditions -// about the rules that evaluate the resource: +// See the AWS API reference guide for AWS Config's +// API operation DescribeAggregationAuthorizations for usage and error information. // -// * AWS Config has never invoked an evaluation for the rule. To check whether -// it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime -// and LastFailedInvocationTime. +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeAggregationAuthorizations +func (c *ConfigService) DescribeAggregationAuthorizations(input *DescribeAggregationAuthorizationsInput) (*DescribeAggregationAuthorizationsOutput, error) { + req, out := c.DescribeAggregationAuthorizationsRequest(input) + return out, req.Send() +} + +// DescribeAggregationAuthorizationsWithContext is the same as DescribeAggregationAuthorizations with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAggregationAuthorizations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) DescribeAggregationAuthorizationsWithContext(ctx aws.Context, input *DescribeAggregationAuthorizationsInput, opts ...request.Option) (*DescribeAggregationAuthorizationsOutput, error) { + req, out := c.DescribeAggregationAuthorizationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeComplianceByConfigRule = "DescribeComplianceByConfigRule" + +// DescribeComplianceByConfigRuleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeComplianceByConfigRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeComplianceByConfigRule for more information on using the DescribeComplianceByConfigRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeComplianceByConfigRuleRequest method. +// req, resp := client.DescribeComplianceByConfigRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule +func (c *ConfigService) DescribeComplianceByConfigRuleRequest(input *DescribeComplianceByConfigRuleInput) (req *request.Request, output *DescribeComplianceByConfigRuleOutput) { + op := &request.Operation{ + Name: opDescribeComplianceByConfigRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeComplianceByConfigRuleInput{} + } + + output = &DescribeComplianceByConfigRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeComplianceByConfigRule API operation for AWS Config. +// +// Indicates whether the specified AWS Config rules are compliant. If a rule +// is noncompliant, this action returns the number of AWS resources that do +// not comply with the rule. +// +// A rule is compliant if all of the evaluated resources comply with it. It +// is noncompliant if any of these resources do not comply. +// +// If AWS Config has no current evaluation results for the rule, it returns +// INSUFFICIENT_DATA. This result might indicate one of the following conditions: +// +// * AWS Config has never invoked an evaluation for the rule. To check whether +// it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime +// and LastFailedInvocationTime. +// +// * The rule's AWS Lambda function is failing to send evaluation results +// to AWS Config. Verify that the role you assigned to your configuration +// recorder includes the config:PutEvaluations permission. If the rule is +// a custom rule, verify that the AWS Lambda execution role includes the +// config:PutEvaluations permission. +// +// * The rule's AWS Lambda function has returned NOT_APPLICABLE for all evaluation +// results. This can occur if the resources were deleted or removed from +// the rule's scope. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation DescribeComplianceByConfigRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" +// One or more AWS Config rules in the request are invalid. Verify that the +// rule names are correct and try again. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByConfigRule +func (c *ConfigService) DescribeComplianceByConfigRule(input *DescribeComplianceByConfigRuleInput) (*DescribeComplianceByConfigRuleOutput, error) { + req, out := c.DescribeComplianceByConfigRuleRequest(input) + return out, req.Send() +} + +// DescribeComplianceByConfigRuleWithContext is the same as DescribeComplianceByConfigRule with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeComplianceByConfigRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) DescribeComplianceByConfigRuleWithContext(ctx aws.Context, input *DescribeComplianceByConfigRuleInput, opts ...request.Option) (*DescribeComplianceByConfigRuleOutput, error) { + req, out := c.DescribeComplianceByConfigRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeComplianceByResource = "DescribeComplianceByResource" + +// DescribeComplianceByResourceRequest generates a "aws/request.Request" representing the +// client's request for the DescribeComplianceByResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeComplianceByResource for more information on using the DescribeComplianceByResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeComplianceByResourceRequest method. +// req, resp := client.DescribeComplianceByResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByResource +func (c *ConfigService) DescribeComplianceByResourceRequest(input *DescribeComplianceByResourceInput) (req *request.Request, output *DescribeComplianceByResourceOutput) { + op := &request.Operation{ + Name: opDescribeComplianceByResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeComplianceByResourceInput{} + } + + output = &DescribeComplianceByResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeComplianceByResource API operation for AWS Config. +// +// Indicates whether the specified AWS resources are compliant. If a resource +// is noncompliant, this action returns the number of AWS Config rules that +// the resource does not comply with. +// +// A resource is compliant if it complies with all the AWS Config rules that +// evaluate it. It is noncompliant if it does not comply with one or more of +// these rules. +// +// If AWS Config has no current evaluation results for the resource, it returns +// INSUFFICIENT_DATA. This result might indicate one of the following conditions +// about the rules that evaluate the resource: +// +// * AWS Config has never invoked an evaluation for the rule. To check whether +// it has, use the DescribeConfigRuleEvaluationStatus action to get the LastSuccessfulInvocationTime +// and LastFailedInvocationTime. // // * The rule's AWS Lambda function is failing to send evaluation results // to AWS Config. Verify that the role that you assigned to your configuration @@ -749,7 +1179,7 @@ func (c *ConfigService) DescribeComplianceByResourceRequest(input *DescribeCompl // are valid and try again. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeComplianceByResource @@ -778,7 +1208,7 @@ const opDescribeConfigRuleEvaluationStatus = "DescribeConfigRuleEvaluationStatus // DescribeConfigRuleEvaluationStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRuleEvaluationStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -840,7 +1270,7 @@ func (c *ConfigService) DescribeConfigRuleEvaluationStatusRequest(input *Describ // are valid and try again. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRuleEvaluationStatus @@ -869,7 +1299,7 @@ const opDescribeConfigRules = "DescribeConfigRules" // DescribeConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -924,7 +1354,7 @@ func (c *ConfigService) DescribeConfigRulesRequest(input *DescribeConfigRulesInp // rule names are correct and try again. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigRules @@ -949,158 +1379,343 @@ func (c *ConfigService) DescribeConfigRulesWithContext(ctx aws.Context, input *D return out, req.Send() } -const opDescribeConfigurationRecorderStatus = "DescribeConfigurationRecorderStatus" +const opDescribeConfigurationAggregatorSourcesStatus = "DescribeConfigurationAggregatorSourcesStatus" -// DescribeConfigurationRecorderStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationRecorderStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// DescribeConfigurationAggregatorSourcesStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConfigurationAggregatorSourcesStatus operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeConfigurationRecorderStatus for more information on using the DescribeConfigurationRecorderStatus +// See DescribeConfigurationAggregatorSourcesStatus for more information on using the DescribeConfigurationAggregatorSourcesStatus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeConfigurationRecorderStatusRequest method. -// req, resp := client.DescribeConfigurationRecorderStatusRequest(params) +// // Example sending a request using the DescribeConfigurationAggregatorSourcesStatusRequest method. +// req, resp := client.DescribeConfigurationAggregatorSourcesStatusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus -func (c *ConfigService) DescribeConfigurationRecorderStatusRequest(input *DescribeConfigurationRecorderStatusInput) (req *request.Request, output *DescribeConfigurationRecorderStatusOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregatorSourcesStatus +func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatusRequest(input *DescribeConfigurationAggregatorSourcesStatusInput) (req *request.Request, output *DescribeConfigurationAggregatorSourcesStatusOutput) { op := &request.Operation{ - Name: opDescribeConfigurationRecorderStatus, + Name: opDescribeConfigurationAggregatorSourcesStatus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeConfigurationRecorderStatusInput{} + input = &DescribeConfigurationAggregatorSourcesStatusInput{} } - output = &DescribeConfigurationRecorderStatusOutput{} + output = &DescribeConfigurationAggregatorSourcesStatusOutput{} req = c.newRequest(op, input, output) return } -// DescribeConfigurationRecorderStatus API operation for AWS Config. -// -// Returns the current status of the specified configuration recorder. If a -// configuration recorder is not specified, this action returns the status of -// all configuration recorder associated with the account. +// DescribeConfigurationAggregatorSourcesStatus API operation for AWS Config. // -// Currently, you can specify only one configuration recorder per region in -// your account. +// Returns status information for sources within an aggregator. The status includes +// information about the last time AWS Config aggregated data from source accounts +// or AWS Config failed to aggregate data from source accounts with the related +// error code or message. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Config's -// API operation DescribeConfigurationRecorderStatus for usage and error information. +// API operation DescribeConfigurationAggregatorSourcesStatus for usage and error information. // // Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus -func (c *ConfigService) DescribeConfigurationRecorderStatus(input *DescribeConfigurationRecorderStatusInput) (*DescribeConfigurationRecorderStatusOutput, error) { - req, out := c.DescribeConfigurationRecorderStatusRequest(input) +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregatorSourcesStatus +func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatus(input *DescribeConfigurationAggregatorSourcesStatusInput) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) { + req, out := c.DescribeConfigurationAggregatorSourcesStatusRequest(input) return out, req.Send() } -// DescribeConfigurationRecorderStatusWithContext is the same as DescribeConfigurationRecorderStatus with the addition of +// DescribeConfigurationAggregatorSourcesStatusWithContext is the same as DescribeConfigurationAggregatorSourcesStatus with the addition of // the ability to pass a context and additional request options. // -// See DescribeConfigurationRecorderStatus for details on how to use this API operation. +// See DescribeConfigurationAggregatorSourcesStatus for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ConfigService) DescribeConfigurationRecorderStatusWithContext(ctx aws.Context, input *DescribeConfigurationRecorderStatusInput, opts ...request.Option) (*DescribeConfigurationRecorderStatusOutput, error) { - req, out := c.DescribeConfigurationRecorderStatusRequest(input) +func (c *ConfigService) DescribeConfigurationAggregatorSourcesStatusWithContext(ctx aws.Context, input *DescribeConfigurationAggregatorSourcesStatusInput, opts ...request.Option) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) { + req, out := c.DescribeConfigurationAggregatorSourcesStatusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeConfigurationRecorders = "DescribeConfigurationRecorders" +const opDescribeConfigurationAggregators = "DescribeConfigurationAggregators" -// DescribeConfigurationRecordersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeConfigurationRecorders operation. The "output" return -// value will be populated with the request's response once the request complets +// DescribeConfigurationAggregatorsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConfigurationAggregators operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeConfigurationRecorders for more information on using the DescribeConfigurationRecorders +// See DescribeConfigurationAggregators for more information on using the DescribeConfigurationAggregators // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeConfigurationRecordersRequest method. -// req, resp := client.DescribeConfigurationRecordersRequest(params) +// // Example sending a request using the DescribeConfigurationAggregatorsRequest method. +// req, resp := client.DescribeConfigurationAggregatorsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders -func (c *ConfigService) DescribeConfigurationRecordersRequest(input *DescribeConfigurationRecordersInput) (req *request.Request, output *DescribeConfigurationRecordersOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregators +func (c *ConfigService) DescribeConfigurationAggregatorsRequest(input *DescribeConfigurationAggregatorsInput) (req *request.Request, output *DescribeConfigurationAggregatorsOutput) { op := &request.Operation{ - Name: opDescribeConfigurationRecorders, + Name: opDescribeConfigurationAggregators, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeConfigurationRecordersInput{} + input = &DescribeConfigurationAggregatorsInput{} } - output = &DescribeConfigurationRecordersOutput{} + output = &DescribeConfigurationAggregatorsOutput{} req = c.newRequest(op, input, output) return } -// DescribeConfigurationRecorders API operation for AWS Config. -// -// Returns the details for the specified configuration recorders. If the configuration -// recorder is not specified, this action returns the details for all configuration -// recorders associated with the account. +// DescribeConfigurationAggregators API operation for AWS Config. // -// Currently, you can specify only one configuration recorder per region in -// your account. +// Returns the details of one or more configuration aggregators. If the configuration +// aggregator is not specified, this action returns the details for all the +// configuration aggregators associated with the account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Config's -// API operation DescribeConfigurationRecorders for usage and error information. +// API operation DescribeConfigurationAggregators for usage and error information. // // Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders -func (c *ConfigService) DescribeConfigurationRecorders(input *DescribeConfigurationRecordersInput) (*DescribeConfigurationRecordersOutput, error) { - req, out := c.DescribeConfigurationRecordersRequest(input) - return out, req.Send() -} - +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationAggregators +func (c *ConfigService) DescribeConfigurationAggregators(input *DescribeConfigurationAggregatorsInput) (*DescribeConfigurationAggregatorsOutput, error) { + req, out := c.DescribeConfigurationAggregatorsRequest(input) + return out, req.Send() +} + +// DescribeConfigurationAggregatorsWithContext is the same as DescribeConfigurationAggregators with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeConfigurationAggregators for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) DescribeConfigurationAggregatorsWithContext(ctx aws.Context, input *DescribeConfigurationAggregatorsInput, opts ...request.Option) (*DescribeConfigurationAggregatorsOutput, error) { + req, out := c.DescribeConfigurationAggregatorsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeConfigurationRecorderStatus = "DescribeConfigurationRecorderStatus" + +// DescribeConfigurationRecorderStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConfigurationRecorderStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeConfigurationRecorderStatus for more information on using the DescribeConfigurationRecorderStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeConfigurationRecorderStatusRequest method. +// req, resp := client.DescribeConfigurationRecorderStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus +func (c *ConfigService) DescribeConfigurationRecorderStatusRequest(input *DescribeConfigurationRecorderStatusInput) (req *request.Request, output *DescribeConfigurationRecorderStatusOutput) { + op := &request.Operation{ + Name: opDescribeConfigurationRecorderStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeConfigurationRecorderStatusInput{} + } + + output = &DescribeConfigurationRecorderStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeConfigurationRecorderStatus API operation for AWS Config. +// +// Returns the current status of the specified configuration recorder. If a +// configuration recorder is not specified, this action returns the status of +// all configuration recorders associated with the account. +// +// Currently, you can specify only one configuration recorder per region in +// your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation DescribeConfigurationRecorderStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" +// You have specified a configuration recorder that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorderStatus +func (c *ConfigService) DescribeConfigurationRecorderStatus(input *DescribeConfigurationRecorderStatusInput) (*DescribeConfigurationRecorderStatusOutput, error) { + req, out := c.DescribeConfigurationRecorderStatusRequest(input) + return out, req.Send() +} + +// DescribeConfigurationRecorderStatusWithContext is the same as DescribeConfigurationRecorderStatus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeConfigurationRecorderStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) DescribeConfigurationRecorderStatusWithContext(ctx aws.Context, input *DescribeConfigurationRecorderStatusInput, opts ...request.Option) (*DescribeConfigurationRecorderStatusOutput, error) { + req, out := c.DescribeConfigurationRecorderStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeConfigurationRecorders = "DescribeConfigurationRecorders" + +// DescribeConfigurationRecordersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeConfigurationRecorders operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeConfigurationRecorders for more information on using the DescribeConfigurationRecorders +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeConfigurationRecordersRequest method. +// req, resp := client.DescribeConfigurationRecordersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders +func (c *ConfigService) DescribeConfigurationRecordersRequest(input *DescribeConfigurationRecordersInput) (req *request.Request, output *DescribeConfigurationRecordersOutput) { + op := &request.Operation{ + Name: opDescribeConfigurationRecorders, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeConfigurationRecordersInput{} + } + + output = &DescribeConfigurationRecordersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeConfigurationRecorders API operation for AWS Config. +// +// Returns the details for the specified configuration recorders. If the configuration +// recorder is not specified, this action returns the details for all configuration +// recorders associated with the account. +// +// Currently, you can specify only one configuration recorder per region in +// your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation DescribeConfigurationRecorders for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" +// You have specified a configuration recorder that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribeConfigurationRecorders +func (c *ConfigService) DescribeConfigurationRecorders(input *DescribeConfigurationRecordersInput) (*DescribeConfigurationRecordersOutput, error) { + req, out := c.DescribeConfigurationRecordersRequest(input) + return out, req.Send() +} + // DescribeConfigurationRecordersWithContext is the same as DescribeConfigurationRecorders with the addition of // the ability to pass a context and additional request options. // @@ -1121,7 +1736,7 @@ const opDescribeDeliveryChannelStatus = "DescribeDeliveryChannelStatus" // DescribeDeliveryChannelStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannelStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1204,7 +1819,7 @@ const opDescribeDeliveryChannels = "DescribeDeliveryChannels" // DescribeDeliveryChannelsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannels operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1283,60 +1898,58 @@ func (c *ConfigService) DescribeDeliveryChannelsWithContext(ctx aws.Context, inp return out, req.Send() } -const opGetComplianceDetailsByConfigRule = "GetComplianceDetailsByConfigRule" +const opDescribePendingAggregationRequests = "DescribePendingAggregationRequests" -// GetComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceDetailsByConfigRule operation. The "output" return -// value will be populated with the request's response once the request complets +// DescribePendingAggregationRequestsRequest generates a "aws/request.Request" representing the +// client's request for the DescribePendingAggregationRequests operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetComplianceDetailsByConfigRule for more information on using the GetComplianceDetailsByConfigRule +// See DescribePendingAggregationRequests for more information on using the DescribePendingAggregationRequests // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetComplianceDetailsByConfigRuleRequest method. -// req, resp := client.GetComplianceDetailsByConfigRuleRequest(params) +// // Example sending a request using the DescribePendingAggregationRequestsRequest method. +// req, resp := client.DescribePendingAggregationRequestsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule -func (c *ConfigService) GetComplianceDetailsByConfigRuleRequest(input *GetComplianceDetailsByConfigRuleInput) (req *request.Request, output *GetComplianceDetailsByConfigRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribePendingAggregationRequests +func (c *ConfigService) DescribePendingAggregationRequestsRequest(input *DescribePendingAggregationRequestsInput) (req *request.Request, output *DescribePendingAggregationRequestsOutput) { op := &request.Operation{ - Name: opGetComplianceDetailsByConfigRule, + Name: opDescribePendingAggregationRequests, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetComplianceDetailsByConfigRuleInput{} + input = &DescribePendingAggregationRequestsInput{} } - output = &GetComplianceDetailsByConfigRuleOutput{} + output = &DescribePendingAggregationRequestsOutput{} req = c.newRequest(op, input, output) return } -// GetComplianceDetailsByConfigRule API operation for AWS Config. +// DescribePendingAggregationRequests API operation for AWS Config. // -// Returns the evaluation results for the specified AWS Config rule. The results -// indicate which AWS resources were evaluated by the rule, when each resource -// was last evaluated, and whether each resource complies with the rule. +// Returns a list of all pending aggregation requests. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Config's -// API operation GetComplianceDetailsByConfigRule for usage and error information. +// API operation DescribePendingAggregationRequests for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" @@ -1344,175 +1957,452 @@ func (c *ConfigService) GetComplianceDetailsByConfigRuleRequest(input *GetCompli // are valid and try again. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // -// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" -// One or more AWS Config rules in the request are invalid. Verify that the -// rule names are correct and try again. +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule -func (c *ConfigService) GetComplianceDetailsByConfigRule(input *GetComplianceDetailsByConfigRuleInput) (*GetComplianceDetailsByConfigRuleOutput, error) { - req, out := c.GetComplianceDetailsByConfigRuleRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/DescribePendingAggregationRequests +func (c *ConfigService) DescribePendingAggregationRequests(input *DescribePendingAggregationRequestsInput) (*DescribePendingAggregationRequestsOutput, error) { + req, out := c.DescribePendingAggregationRequestsRequest(input) return out, req.Send() } -// GetComplianceDetailsByConfigRuleWithContext is the same as GetComplianceDetailsByConfigRule with the addition of +// DescribePendingAggregationRequestsWithContext is the same as DescribePendingAggregationRequests with the addition of // the ability to pass a context and additional request options. // -// See GetComplianceDetailsByConfigRule for details on how to use this API operation. +// See DescribePendingAggregationRequests for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ConfigService) GetComplianceDetailsByConfigRuleWithContext(ctx aws.Context, input *GetComplianceDetailsByConfigRuleInput, opts ...request.Option) (*GetComplianceDetailsByConfigRuleOutput, error) { - req, out := c.GetComplianceDetailsByConfigRuleRequest(input) +func (c *ConfigService) DescribePendingAggregationRequestsWithContext(ctx aws.Context, input *DescribePendingAggregationRequestsInput, opts ...request.Option) (*DescribePendingAggregationRequestsOutput, error) { + req, out := c.DescribePendingAggregationRequestsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetComplianceDetailsByResource = "GetComplianceDetailsByResource" +const opGetAggregateComplianceDetailsByConfigRule = "GetAggregateComplianceDetailsByConfigRule" -// GetComplianceDetailsByResourceRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceDetailsByResource operation. The "output" return -// value will be populated with the request's response once the request complets +// GetAggregateComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the +// client's request for the GetAggregateComplianceDetailsByConfigRule operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetComplianceDetailsByResource for more information on using the GetComplianceDetailsByResource +// See GetAggregateComplianceDetailsByConfigRule for more information on using the GetAggregateComplianceDetailsByConfigRule // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetComplianceDetailsByResourceRequest method. -// req, resp := client.GetComplianceDetailsByResourceRequest(params) +// // Example sending a request using the GetAggregateComplianceDetailsByConfigRuleRequest method. +// req, resp := client.GetAggregateComplianceDetailsByConfigRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource -func (c *ConfigService) GetComplianceDetailsByResourceRequest(input *GetComplianceDetailsByResourceInput) (req *request.Request, output *GetComplianceDetailsByResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateComplianceDetailsByConfigRule +func (c *ConfigService) GetAggregateComplianceDetailsByConfigRuleRequest(input *GetAggregateComplianceDetailsByConfigRuleInput) (req *request.Request, output *GetAggregateComplianceDetailsByConfigRuleOutput) { op := &request.Operation{ - Name: opGetComplianceDetailsByResource, + Name: opGetAggregateComplianceDetailsByConfigRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetComplianceDetailsByResourceInput{} + input = &GetAggregateComplianceDetailsByConfigRuleInput{} } - output = &GetComplianceDetailsByResourceOutput{} + output = &GetAggregateComplianceDetailsByConfigRuleOutput{} req = c.newRequest(op, input, output) return } -// GetComplianceDetailsByResource API operation for AWS Config. +// GetAggregateComplianceDetailsByConfigRule API operation for AWS Config. // -// Returns the evaluation results for the specified AWS resource. The results -// indicate which AWS Config rules were used to evaluate the resource, when -// each rule was last used, and whether the resource complies with each rule. +// Returns the evaluation results for the specified AWS Config rule for a specific +// resource in a rule. The results indicate which AWS resources were evaluated +// by the rule, when each resource was last evaluated, and whether each resource +// complies with the rule. +// +// The results can return an empty result page. But if you have a nextToken, +// the results are displayed on the next page. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Config's -// API operation GetComplianceDetailsByResource for usage and error information. +// API operation GetAggregateComplianceDetailsByConfigRule for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" -// One or more of the specified parameters are invalid. Verify that your parameters -// are valid and try again. +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource -func (c *ConfigService) GetComplianceDetailsByResource(input *GetComplianceDetailsByResourceInput) (*GetComplianceDetailsByResourceOutput, error) { - req, out := c.GetComplianceDetailsByResourceRequest(input) +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateComplianceDetailsByConfigRule +func (c *ConfigService) GetAggregateComplianceDetailsByConfigRule(input *GetAggregateComplianceDetailsByConfigRuleInput) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) { + req, out := c.GetAggregateComplianceDetailsByConfigRuleRequest(input) return out, req.Send() } -// GetComplianceDetailsByResourceWithContext is the same as GetComplianceDetailsByResource with the addition of +// GetAggregateComplianceDetailsByConfigRuleWithContext is the same as GetAggregateComplianceDetailsByConfigRule with the addition of // the ability to pass a context and additional request options. // -// See GetComplianceDetailsByResource for details on how to use this API operation. +// See GetAggregateComplianceDetailsByConfigRule for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ConfigService) GetComplianceDetailsByResourceWithContext(ctx aws.Context, input *GetComplianceDetailsByResourceInput, opts ...request.Option) (*GetComplianceDetailsByResourceOutput, error) { - req, out := c.GetComplianceDetailsByResourceRequest(input) +func (c *ConfigService) GetAggregateComplianceDetailsByConfigRuleWithContext(ctx aws.Context, input *GetAggregateComplianceDetailsByConfigRuleInput, opts ...request.Option) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) { + req, out := c.GetAggregateComplianceDetailsByConfigRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetComplianceSummaryByConfigRule = "GetComplianceSummaryByConfigRule" +const opGetAggregateConfigRuleComplianceSummary = "GetAggregateConfigRuleComplianceSummary" -// GetComplianceSummaryByConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceSummaryByConfigRule operation. The "output" return -// value will be populated with the request's response once the request complets +// GetAggregateConfigRuleComplianceSummaryRequest generates a "aws/request.Request" representing the +// client's request for the GetAggregateConfigRuleComplianceSummary operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetComplianceSummaryByConfigRule for more information on using the GetComplianceSummaryByConfigRule +// See GetAggregateConfigRuleComplianceSummary for more information on using the GetAggregateConfigRuleComplianceSummary // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetComplianceSummaryByConfigRuleRequest method. -// req, resp := client.GetComplianceSummaryByConfigRuleRequest(params) +// // Example sending a request using the GetAggregateConfigRuleComplianceSummaryRequest method. +// req, resp := client.GetAggregateConfigRuleComplianceSummaryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule -func (c *ConfigService) GetComplianceSummaryByConfigRuleRequest(input *GetComplianceSummaryByConfigRuleInput) (req *request.Request, output *GetComplianceSummaryByConfigRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateConfigRuleComplianceSummary +func (c *ConfigService) GetAggregateConfigRuleComplianceSummaryRequest(input *GetAggregateConfigRuleComplianceSummaryInput) (req *request.Request, output *GetAggregateConfigRuleComplianceSummaryOutput) { op := &request.Operation{ - Name: opGetComplianceSummaryByConfigRule, + Name: opGetAggregateConfigRuleComplianceSummary, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetComplianceSummaryByConfigRuleInput{} + input = &GetAggregateConfigRuleComplianceSummaryInput{} } - output = &GetComplianceSummaryByConfigRuleOutput{} + output = &GetAggregateConfigRuleComplianceSummaryOutput{} req = c.newRequest(op, input, output) return } -// GetComplianceSummaryByConfigRule API operation for AWS Config. +// GetAggregateConfigRuleComplianceSummary API operation for AWS Config. // -// Returns the number of AWS Config rules that are compliant and noncompliant, -// up to a maximum of 25 for each. +// Returns the number of compliant and noncompliant rules for one or more accounts +// and regions in an aggregator. +// +// The results can return an empty result page, but if you have a nextToken, +// the results are displayed on the next page. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Config's -// API operation GetComplianceSummaryByConfigRule for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule -func (c *ConfigService) GetComplianceSummaryByConfigRule(input *GetComplianceSummaryByConfigRuleInput) (*GetComplianceSummaryByConfigRuleOutput, error) { - req, out := c.GetComplianceSummaryByConfigRuleRequest(input) - return out, req.Send() -} +// API operation GetAggregateConfigRuleComplianceSummary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. +// +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateConfigRuleComplianceSummary +func (c *ConfigService) GetAggregateConfigRuleComplianceSummary(input *GetAggregateConfigRuleComplianceSummaryInput) (*GetAggregateConfigRuleComplianceSummaryOutput, error) { + req, out := c.GetAggregateConfigRuleComplianceSummaryRequest(input) + return out, req.Send() +} + +// GetAggregateConfigRuleComplianceSummaryWithContext is the same as GetAggregateConfigRuleComplianceSummary with the addition of +// the ability to pass a context and additional request options. +// +// See GetAggregateConfigRuleComplianceSummary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) GetAggregateConfigRuleComplianceSummaryWithContext(ctx aws.Context, input *GetAggregateConfigRuleComplianceSummaryInput, opts ...request.Option) (*GetAggregateConfigRuleComplianceSummaryOutput, error) { + req, out := c.GetAggregateConfigRuleComplianceSummaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetComplianceDetailsByConfigRule = "GetComplianceDetailsByConfigRule" + +// GetComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the +// client's request for the GetComplianceDetailsByConfigRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetComplianceDetailsByConfigRule for more information on using the GetComplianceDetailsByConfigRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetComplianceDetailsByConfigRuleRequest method. +// req, resp := client.GetComplianceDetailsByConfigRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule +func (c *ConfigService) GetComplianceDetailsByConfigRuleRequest(input *GetComplianceDetailsByConfigRuleInput) (req *request.Request, output *GetComplianceDetailsByConfigRuleOutput) { + op := &request.Operation{ + Name: opGetComplianceDetailsByConfigRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetComplianceDetailsByConfigRuleInput{} + } + + output = &GetComplianceDetailsByConfigRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetComplianceDetailsByConfigRule API operation for AWS Config. +// +// Returns the evaluation results for the specified AWS Config rule. The results +// indicate which AWS resources were evaluated by the rule, when each resource +// was last evaluated, and whether each resource complies with the rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation GetComplianceDetailsByConfigRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeNoSuchConfigRuleException "NoSuchConfigRuleException" +// One or more AWS Config rules in the request are invalid. Verify that the +// rule names are correct and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByConfigRule +func (c *ConfigService) GetComplianceDetailsByConfigRule(input *GetComplianceDetailsByConfigRuleInput) (*GetComplianceDetailsByConfigRuleOutput, error) { + req, out := c.GetComplianceDetailsByConfigRuleRequest(input) + return out, req.Send() +} + +// GetComplianceDetailsByConfigRuleWithContext is the same as GetComplianceDetailsByConfigRule with the addition of +// the ability to pass a context and additional request options. +// +// See GetComplianceDetailsByConfigRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) GetComplianceDetailsByConfigRuleWithContext(ctx aws.Context, input *GetComplianceDetailsByConfigRuleInput, opts ...request.Option) (*GetComplianceDetailsByConfigRuleOutput, error) { + req, out := c.GetComplianceDetailsByConfigRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetComplianceDetailsByResource = "GetComplianceDetailsByResource" + +// GetComplianceDetailsByResourceRequest generates a "aws/request.Request" representing the +// client's request for the GetComplianceDetailsByResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetComplianceDetailsByResource for more information on using the GetComplianceDetailsByResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetComplianceDetailsByResourceRequest method. +// req, resp := client.GetComplianceDetailsByResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource +func (c *ConfigService) GetComplianceDetailsByResourceRequest(input *GetComplianceDetailsByResourceInput) (req *request.Request, output *GetComplianceDetailsByResourceOutput) { + op := &request.Operation{ + Name: opGetComplianceDetailsByResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetComplianceDetailsByResourceInput{} + } + + output = &GetComplianceDetailsByResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetComplianceDetailsByResource API operation for AWS Config. +// +// Returns the evaluation results for the specified AWS resource. The results +// indicate which AWS Config rules were used to evaluate the resource, when +// each rule was last used, and whether the resource complies with each rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation GetComplianceDetailsByResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceDetailsByResource +func (c *ConfigService) GetComplianceDetailsByResource(input *GetComplianceDetailsByResourceInput) (*GetComplianceDetailsByResourceOutput, error) { + req, out := c.GetComplianceDetailsByResourceRequest(input) + return out, req.Send() +} + +// GetComplianceDetailsByResourceWithContext is the same as GetComplianceDetailsByResource with the addition of +// the ability to pass a context and additional request options. +// +// See GetComplianceDetailsByResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) GetComplianceDetailsByResourceWithContext(ctx aws.Context, input *GetComplianceDetailsByResourceInput, opts ...request.Option) (*GetComplianceDetailsByResourceOutput, error) { + req, out := c.GetComplianceDetailsByResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetComplianceSummaryByConfigRule = "GetComplianceSummaryByConfigRule" + +// GetComplianceSummaryByConfigRuleRequest generates a "aws/request.Request" representing the +// client's request for the GetComplianceSummaryByConfigRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetComplianceSummaryByConfigRule for more information on using the GetComplianceSummaryByConfigRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetComplianceSummaryByConfigRuleRequest method. +// req, resp := client.GetComplianceSummaryByConfigRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule +func (c *ConfigService) GetComplianceSummaryByConfigRuleRequest(input *GetComplianceSummaryByConfigRuleInput) (req *request.Request, output *GetComplianceSummaryByConfigRuleOutput) { + op := &request.Operation{ + Name: opGetComplianceSummaryByConfigRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetComplianceSummaryByConfigRuleInput{} + } + + output = &GetComplianceSummaryByConfigRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetComplianceSummaryByConfigRule API operation for AWS Config. +// +// Returns the number of AWS Config rules that are compliant and noncompliant, +// up to a maximum of 25 for each. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation GetComplianceSummaryByConfigRule for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule +func (c *ConfigService) GetComplianceSummaryByConfigRule(input *GetComplianceSummaryByConfigRuleInput) (*GetComplianceSummaryByConfigRuleOutput, error) { + req, out := c.GetComplianceSummaryByConfigRuleRequest(input) + return out, req.Send() +} // GetComplianceSummaryByConfigRuleWithContext is the same as GetComplianceSummaryByConfigRule with the addition of // the ability to pass a context and additional request options. @@ -1534,7 +2424,7 @@ const opGetComplianceSummaryByResourceType = "GetComplianceSummaryByResourceType // GetComplianceSummaryByResourceTypeRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceSummaryByResourceType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1616,7 +2506,7 @@ const opGetDiscoveredResourceCounts = "GetDiscoveredResourceCounts" // GetDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the // client's request for the GetDiscoveredResourceCounts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1670,25 +2560,25 @@ func (c *ConfigService) GetDiscoveredResourceCountsRequest(input *GetDiscoveredR // // AWS Config returns the following: // -// The resource types (EC2 instances, IAM users, and S3 buckets) +// The resource types (EC2 instances, IAM users, and S3 buckets). // -// The number of each resource type (25, 20, and 15) +// The number of each resource type (25, 20, and 15). // -// The total number of all resources (60) +// The total number of all resources (60). // // The response is paginated. By default, AWS Config lists 100 ResourceCount // objects on each page. You can customize this number with the limit parameter. // The response includes a nextToken string. To get the next page of results, // run the request again and specify the string for the nextToken parameter. // -// If you make a call to the GetDiscoveredResourceCounts action, you may not +// If you make a call to the GetDiscoveredResourceCounts action, you might not // immediately receive resource counts in the following situations: // -// You are a new AWS Config customer +// You are a new AWS Config customer. // -// You just enabled resource recording +// You just enabled resource recording. // -// It may take a few minutes for AWS Config to record and count your resources. +// It might take a few minutes for AWS Config to record and count your resources. // Wait a few minutes and then retry the GetDiscoveredResourceCounts action. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1706,7 +2596,7 @@ func (c *ConfigService) GetDiscoveredResourceCountsRequest(input *GetDiscoveredR // The specified limit is outside the allowable range. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetDiscoveredResourceCounts @@ -1735,7 +2625,7 @@ const opGetResourceConfigHistory = "GetResourceConfigHistory" // GetResourceConfigHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetResourceConfigHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1813,7 +2703,7 @@ func (c *ConfigService) GetResourceConfigHistoryRequest(input *GetResourceConfig // The specified limit is outside the allowable range. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" @@ -1899,7 +2789,7 @@ const opListDiscoveredResources = "ListDiscoveredResources" // ListDiscoveredResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListDiscoveredResources operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1946,8 +2836,8 @@ func (c *ConfigService) ListDiscoveredResourcesRequest(input *ListDiscoveredReso // recording. You can narrow the results to include only resources that have // specific resource IDs or a resource name. // -// You can specify either resource IDs or a resource name but not both in the -// same request. +// You can specify either resource IDs or a resource name, but not both, in +// the same request. // // The response is paginated. By default, AWS Config lists 100 resource identifiers // on each page. You can customize this number with the limit parameter. The @@ -1969,7 +2859,7 @@ func (c *ConfigService) ListDiscoveredResourcesRequest(input *ListDiscoveredReso // The specified limit is outside the allowable range. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The specified next token is invalid. Specify the NextToken string that was +// The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // // * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" @@ -1998,11 +2888,92 @@ func (c *ConfigService) ListDiscoveredResourcesWithContext(ctx aws.Context, inpu return out, req.Send() } -const opPutConfigRule = "PutConfigRule" +const opPutAggregationAuthorization = "PutAggregationAuthorization" -// PutConfigRuleRequest generates a "aws/request.Request" representing the -// client's request for the PutConfigRule operation. The "output" return -// value will be populated with the request's response once the request complets +// PutAggregationAuthorizationRequest generates a "aws/request.Request" representing the +// client's request for the PutAggregationAuthorization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutAggregationAuthorization for more information on using the PutAggregationAuthorization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutAggregationAuthorizationRequest method. +// req, resp := client.PutAggregationAuthorizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization +func (c *ConfigService) PutAggregationAuthorizationRequest(input *PutAggregationAuthorizationInput) (req *request.Request, output *PutAggregationAuthorizationOutput) { + op := &request.Operation{ + Name: opPutAggregationAuthorization, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutAggregationAuthorizationInput{} + } + + output = &PutAggregationAuthorizationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutAggregationAuthorization API operation for AWS Config. +// +// Authorizes the aggregator account and region to collect data from the source +// account and region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation PutAggregationAuthorization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization +func (c *ConfigService) PutAggregationAuthorization(input *PutAggregationAuthorizationInput) (*PutAggregationAuthorizationOutput, error) { + req, out := c.PutAggregationAuthorizationRequest(input) + return out, req.Send() +} + +// PutAggregationAuthorizationWithContext is the same as PutAggregationAuthorization with the addition of +// the ability to pass a context and additional request options. +// +// See PutAggregationAuthorization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) PutAggregationAuthorizationWithContext(ctx aws.Context, input *PutAggregationAuthorizationInput, opts ...request.Option) (*PutAggregationAuthorizationOutput, error) { + req, out := c.PutAggregationAuthorizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutConfigRule = "PutConfigRule" + +// PutConfigRuleRequest generates a "aws/request.Request" representing the +// client's request for the PutConfigRule operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2047,16 +3018,17 @@ func (c *ConfigService) PutConfigRuleRequest(input *PutConfigRuleInput) (req *re // Adds or updates an AWS Config rule for evaluating whether your AWS resources // comply with your desired configurations. // -// You can use this action for custom Config rules and AWS managed Config rules. -// A custom Config rule is a rule that you develop and maintain. An AWS managed -// Config rule is a customizable, predefined rule that AWS Config provides. +// You can use this action for custom AWS Config rules and AWS managed Config +// rules. A custom AWS Config rule is a rule that you develop and maintain. +// An AWS managed Config rule is a customizable, predefined rule that AWS Config +// provides. // -// If you are adding a new custom Config rule, you must first create the AWS -// Lambda function that the rule invokes to evaluate your resources. When you -// use the PutConfigRule action to add the rule to AWS Config, you must specify -// the Amazon Resource Name (ARN) that AWS Lambda assigns to the function. Specify -// the ARN for the SourceIdentifier key. This key is part of the Source object, -// which is part of the ConfigRule object. +// If you are adding a new custom AWS Config rule, you must first create the +// AWS Lambda function that the rule invokes to evaluate your resources. When +// you use the PutConfigRule action to add the rule to AWS Config, you must +// specify the Amazon Resource Name (ARN) that AWS Lambda assigns to the function. +// Specify the ARN for the SourceIdentifier key. This key is part of the Source +// object, which is part of the ConfigRule object. // // If you are adding an AWS managed Config rule, specify the rule's identifier // for the SourceIdentifier key. To reference AWS managed Config rule identifiers, @@ -2072,8 +3044,8 @@ func (c *ConfigService) PutConfigRuleRequest(input *PutConfigRuleInput) (req *re // // The maximum number of rules that AWS Config supports is 50. // -// For more information about requesting a rule limit increase, see AWS Config -// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) +// For information about requesting a rule limit increase, see AWS Config Limits +// (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) // in the AWS General Reference Guide. // // For more information about developing and using AWS Config rules, see Evaluating @@ -2095,7 +3067,7 @@ func (c *ConfigService) PutConfigRuleRequest(input *PutConfigRuleInput) (req *re // * ErrCodeMaxNumberOfConfigRulesExceededException "MaxNumberOfConfigRulesExceededException" // Failed to add the AWS Config rule because the account already contains the // maximum number of 50 rules. Consider deleting any deactivated rules before -// adding new rules. +// you add new rules. // // * ErrCodeResourceInUseException "ResourceInUseException" // The rule is currently being deleted or the rule is deleting your evaluation @@ -2136,11 +3108,111 @@ func (c *ConfigService) PutConfigRuleWithContext(ctx aws.Context, input *PutConf return out, req.Send() } +const opPutConfigurationAggregator = "PutConfigurationAggregator" + +// PutConfigurationAggregatorRequest generates a "aws/request.Request" representing the +// client's request for the PutConfigurationAggregator operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutConfigurationAggregator for more information on using the PutConfigurationAggregator +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutConfigurationAggregatorRequest method. +// req, resp := client.PutConfigurationAggregatorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationAggregator +func (c *ConfigService) PutConfigurationAggregatorRequest(input *PutConfigurationAggregatorInput) (req *request.Request, output *PutConfigurationAggregatorOutput) { + op := &request.Operation{ + Name: opPutConfigurationAggregator, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutConfigurationAggregatorInput{} + } + + output = &PutConfigurationAggregatorOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutConfigurationAggregator API operation for AWS Config. +// +// Creates and updates the configuration aggregator with the selected source +// accounts and regions. +// +// AWS Config should be enabled in accounts and regions you want to aggreagate. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation PutConfigurationAggregator for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more of the specified parameters are invalid. Verify that your parameters +// are valid and try again. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// This exception is thrown if an evaluation is in progress or if you call the +// StartConfigRulesEvaluation API more than once per minute. +// +// * ErrCodeInvalidRoleException "InvalidRoleException" +// You have provided a null or empty role ARN. +// +// * ErrCodeOrganizationAccessDeniedException "OrganizationAccessDeniedException" +// No permission to call the EnableAWSServiceAccess API. +// +// * ErrCodeNoAvailableOrganizationException "NoAvailableOrganizationException" +// Organization does is no longer available. +// +// * ErrCodeOrganizationAllFeaturesNotEnabledException "OrganizationAllFeaturesNotEnabledException" +// The configuration aggregator cannot be created because organization does +// not have all features enabled. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationAggregator +func (c *ConfigService) PutConfigurationAggregator(input *PutConfigurationAggregatorInput) (*PutConfigurationAggregatorOutput, error) { + req, out := c.PutConfigurationAggregatorRequest(input) + return out, req.Send() +} + +// PutConfigurationAggregatorWithContext is the same as PutConfigurationAggregator with the addition of +// the ability to pass a context and additional request options. +// +// See PutConfigurationAggregator for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) PutConfigurationAggregatorWithContext(ctx aws.Context, input *PutConfigurationAggregatorInput, opts ...request.Option) (*PutConfigurationAggregatorOutput, error) { + req, out := c.PutConfigurationAggregatorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutConfigurationRecorder = "PutConfigurationRecorder" // PutConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the PutConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2184,7 +3256,7 @@ func (c *ConfigService) PutConfigurationRecorderRequest(input *PutConfigurationR // // Creates a new configuration recorder to record the selected resource configurations. // -// You can use this action to change the role roleARN and/or the recordingGroup +// You can use this action to change the role roleARN or the recordingGroup // of an existing recorder. To change the role, call the action on the existing // configuration recorder and specify a role. // @@ -2203,7 +3275,7 @@ func (c *ConfigService) PutConfigurationRecorderRequest(input *PutConfigurationR // // Returned Error Codes: // * ErrCodeMaxNumberOfConfigurationRecordersExceededException "MaxNumberOfConfigurationRecordersExceededException" -// You have reached the limit on the number of recorders you can create. +// You have reached the limit of the number of recorders you can create. // // * ErrCodeInvalidConfigurationRecorderNameException "InvalidConfigurationRecorderNameException" // You have provided a configuration recorder name that is not valid. @@ -2213,7 +3285,7 @@ func (c *ConfigService) PutConfigurationRecorderRequest(input *PutConfigurationR // // * ErrCodeInvalidRecordingGroupException "InvalidRecordingGroupException" // AWS Config throws an exception if the recording group does not contain a -// valid list of resource types. Invalid values could also be incorrectly formatted. +// valid list of resource types. Invalid values might also be incorrectly formatted. // // See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutConfigurationRecorder func (c *ConfigService) PutConfigurationRecorder(input *PutConfigurationRecorderInput) (*PutConfigurationRecorderOutput, error) { @@ -2241,7 +3313,7 @@ const opPutDeliveryChannel = "PutDeliveryChannel" // PutDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the PutDeliveryChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2307,7 +3379,7 @@ func (c *ConfigService) PutDeliveryChannelRequest(input *PutDeliveryChannelInput // // Returned Error Codes: // * ErrCodeMaxNumberOfDeliveryChannelsExceededException "MaxNumberOfDeliveryChannelsExceededException" -// You have reached the limit on the number of delivery channels you can create. +// You have reached the limit of the number of delivery channels you can create. // // * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" // There are no configuration recorders available to provide the role needed @@ -2354,7 +3426,7 @@ const opPutEvaluations = "PutEvaluations" // PutEvaluationsRequest generates a "aws/request.Request" representing the // client's request for the PutEvaluations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2443,7 +3515,7 @@ const opStartConfigRulesEvaluation = "StartConfigRulesEvaluation" // StartConfigRulesEvaluationRequest generates a "aws/request.Request" representing the // client's request for the StartConfigRulesEvaluation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2483,22 +3555,22 @@ func (c *ConfigService) StartConfigRulesEvaluationRequest(input *StartConfigRule // StartConfigRulesEvaluation API operation for AWS Config. // -// Runs an on-demand evaluation for the specified Config rules against the last -// known configuration state of the resources. Use StartConfigRulesEvaluation -// when you want to test a rule that you updated is working as expected. StartConfigRulesEvaluation -// does not re-record the latest configuration state for your resources; it +// Runs an on-demand evaluation for the specified AWS Config rules against the +// last known configuration state of the resources. Use StartConfigRulesEvaluation +// when you want to test that a rule you updated is working as expected. StartConfigRulesEvaluation +// does not re-record the latest configuration state for your resources. It // re-runs an evaluation against the last known state of your resources. // -// You can specify up to 25 Config rules per request. +// You can specify up to 25 AWS Config rules per request. // -// An existing StartConfigRulesEvaluation call must complete for the specified -// rules before you can call the API again. If you chose to have AWS Config +// An existing StartConfigRulesEvaluation call for the specified rules must +// complete before you can call the API again. If you chose to have AWS Config // stream to an Amazon SNS topic, you will receive a ConfigRuleEvaluationStarted // notification when the evaluation starts. // // You don't need to call the StartConfigRulesEvaluation API to run an evaluation -// for a new rule. When you create a new rule, AWS Config automatically evaluates -// your resources against the rule. +// for a new rule. When you create a rule, AWS Config evaluates your resources +// against the rule automatically. // // The StartConfigRulesEvaluation API is useful if you want to run on-demand // evaluations, such as the following example: @@ -2564,7 +3636,7 @@ const opStartConfigurationRecorder = "StartConfigurationRecorder" // StartConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the StartConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2632,102 +3704,478 @@ func (c *ConfigService) StartConfigurationRecorder(input *StartConfigurationReco return out, req.Send() } -// StartConfigurationRecorderWithContext is the same as StartConfigurationRecorder with the addition of -// the ability to pass a context and additional request options. -// -// See StartConfigurationRecorder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) StartConfigurationRecorderWithContext(ctx aws.Context, input *StartConfigurationRecorderInput, opts ...request.Option) (*StartConfigurationRecorderOutput, error) { - req, out := c.StartConfigurationRecorderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() +// StartConfigurationRecorderWithContext is the same as StartConfigurationRecorder with the addition of +// the ability to pass a context and additional request options. +// +// See StartConfigurationRecorder for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) StartConfigurationRecorderWithContext(ctx aws.Context, input *StartConfigurationRecorderInput, opts ...request.Option) (*StartConfigurationRecorderOutput, error) { + req, out := c.StartConfigurationRecorderRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopConfigurationRecorder = "StopConfigurationRecorder" + +// StopConfigurationRecorderRequest generates a "aws/request.Request" representing the +// client's request for the StopConfigurationRecorder operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopConfigurationRecorder for more information on using the StopConfigurationRecorder +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopConfigurationRecorderRequest method. +// req, resp := client.StopConfigurationRecorderRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder +func (c *ConfigService) StopConfigurationRecorderRequest(input *StopConfigurationRecorderInput) (req *request.Request, output *StopConfigurationRecorderOutput) { + op := &request.Operation{ + Name: opStopConfigurationRecorder, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopConfigurationRecorderInput{} + } + + output = &StopConfigurationRecorderOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopConfigurationRecorder API operation for AWS Config. +// +// Stops recording configurations of the AWS resources you have selected to +// record in your AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Config's +// API operation StopConfigurationRecorder for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" +// You have specified a configuration recorder that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder +func (c *ConfigService) StopConfigurationRecorder(input *StopConfigurationRecorderInput) (*StopConfigurationRecorderOutput, error) { + req, out := c.StopConfigurationRecorderRequest(input) + return out, req.Send() +} + +// StopConfigurationRecorderWithContext is the same as StopConfigurationRecorder with the addition of +// the ability to pass a context and additional request options. +// +// See StopConfigurationRecorder for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ConfigService) StopConfigurationRecorderWithContext(ctx aws.Context, input *StopConfigurationRecorderInput, opts ...request.Option) (*StopConfigurationRecorderOutput, error) { + req, out := c.StopConfigurationRecorderRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A collection of accounts and regions. +type AccountAggregationSource struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the account being aggregated. + // + // AccountIds is a required field + AccountIds []*string `min:"1" type:"list" required:"true"` + + // If true, aggreagate existing AWS Config regions and future regions. + AllAwsRegions *bool `type:"boolean"` + + // The source regions being aggregated. + AwsRegions []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s AccountAggregationSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountAggregationSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AccountAggregationSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AccountAggregationSource"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } + if s.AccountIds != nil && len(s.AccountIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountIds", 1)) + } + if s.AwsRegions != nil && len(s.AwsRegions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsRegions", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountIds sets the AccountIds field's value. +func (s *AccountAggregationSource) SetAccountIds(v []*string) *AccountAggregationSource { + s.AccountIds = v + return s +} + +// SetAllAwsRegions sets the AllAwsRegions field's value. +func (s *AccountAggregationSource) SetAllAwsRegions(v bool) *AccountAggregationSource { + s.AllAwsRegions = &v + return s +} + +// SetAwsRegions sets the AwsRegions field's value. +func (s *AccountAggregationSource) SetAwsRegions(v []*string) *AccountAggregationSource { + s.AwsRegions = v + return s +} + +// Indicates whether an AWS Config rule is compliant based on account ID, region, +// compliance, and rule name. +// +// A rule is compliant if all of the resources that the rule evaluated comply +// with it. It is noncompliant if any of these resources do not comply. +type AggregateComplianceByConfigRule struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the source account. + AccountId *string `type:"string"` + + // The source region from where the data is aggregated. + AwsRegion *string `min:"1" type:"string"` + + // Indicates whether an AWS resource or AWS Config rule is compliant and provides + // the number of contributors that affect the compliance. + Compliance *Compliance `type:"structure"` + + // The name of the AWS Config rule. + ConfigRuleName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s AggregateComplianceByConfigRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AggregateComplianceByConfigRule) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *AggregateComplianceByConfigRule) SetAccountId(v string) *AggregateComplianceByConfigRule { + s.AccountId = &v + return s +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *AggregateComplianceByConfigRule) SetAwsRegion(v string) *AggregateComplianceByConfigRule { + s.AwsRegion = &v + return s +} + +// SetCompliance sets the Compliance field's value. +func (s *AggregateComplianceByConfigRule) SetCompliance(v *Compliance) *AggregateComplianceByConfigRule { + s.Compliance = v + return s +} + +// SetConfigRuleName sets the ConfigRuleName field's value. +func (s *AggregateComplianceByConfigRule) SetConfigRuleName(v string) *AggregateComplianceByConfigRule { + s.ConfigRuleName = &v + return s +} + +// Returns the number of compliant and noncompliant rules for one or more accounts +// and regions in an aggregator. +type AggregateComplianceCount struct { + _ struct{} `type:"structure"` + + // The number of compliant and noncompliant AWS Config rules. + ComplianceSummary *ComplianceSummary `type:"structure"` + + // The 12-digit account ID or region based on the GroupByKey value. + GroupName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s AggregateComplianceCount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AggregateComplianceCount) GoString() string { + return s.String() +} + +// SetComplianceSummary sets the ComplianceSummary field's value. +func (s *AggregateComplianceCount) SetComplianceSummary(v *ComplianceSummary) *AggregateComplianceCount { + s.ComplianceSummary = v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *AggregateComplianceCount) SetGroupName(v string) *AggregateComplianceCount { + s.GroupName = &v + return s +} + +// The details of an AWS Config evaluation for an account ID and region in an +// aggregator. Provides the AWS resource that was evaluated, the compliance +// of the resource, related time stamps, and supplementary information. +type AggregateEvaluationResult struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the source account. + AccountId *string `type:"string"` + + // Supplementary information about how the agrregate evaluation determined the + // compliance. + Annotation *string `min:"1" type:"string"` + + // The source region from where the data is aggregated. + AwsRegion *string `min:"1" type:"string"` + + // The resource compliance status. + // + // For the AggregationEvaluationResult data type, AWS Config supports only the + // COMPLIANT and NON_COMPLIANT. AWS Config does not support the NOT_APPLICABLE + // and INSUFFICIENT_DATA value. + ComplianceType *string `type:"string" enum:"ComplianceType"` + + // The time when the AWS Config rule evaluated the AWS resource. + ConfigRuleInvokedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Uniquely identifies the evaluation result. + EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` + + // The time when AWS Config recorded the aggregate evaluation result. + ResultRecordedTime *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s AggregateEvaluationResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AggregateEvaluationResult) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *AggregateEvaluationResult) SetAccountId(v string) *AggregateEvaluationResult { + s.AccountId = &v + return s +} + +// SetAnnotation sets the Annotation field's value. +func (s *AggregateEvaluationResult) SetAnnotation(v string) *AggregateEvaluationResult { + s.Annotation = &v + return s +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *AggregateEvaluationResult) SetAwsRegion(v string) *AggregateEvaluationResult { + s.AwsRegion = &v + return s +} + +// SetComplianceType sets the ComplianceType field's value. +func (s *AggregateEvaluationResult) SetComplianceType(v string) *AggregateEvaluationResult { + s.ComplianceType = &v + return s +} + +// SetConfigRuleInvokedTime sets the ConfigRuleInvokedTime field's value. +func (s *AggregateEvaluationResult) SetConfigRuleInvokedTime(v time.Time) *AggregateEvaluationResult { + s.ConfigRuleInvokedTime = &v + return s +} + +// SetEvaluationResultIdentifier sets the EvaluationResultIdentifier field's value. +func (s *AggregateEvaluationResult) SetEvaluationResultIdentifier(v *EvaluationResultIdentifier) *AggregateEvaluationResult { + s.EvaluationResultIdentifier = v + return s +} + +// SetResultRecordedTime sets the ResultRecordedTime field's value. +func (s *AggregateEvaluationResult) SetResultRecordedTime(v time.Time) *AggregateEvaluationResult { + s.ResultRecordedTime = &v + return s +} + +// The current sync status between the source and the aggregator account. +type AggregatedSourceStatus struct { + _ struct{} `type:"structure"` + + // The region authorized to collect aggregated data. + AwsRegion *string `min:"1" type:"string"` + + // The error code that AWS Config returned when the source account aggregation + // last failed. + LastErrorCode *string `type:"string"` + + // The message indicating that the source account aggregation failed due to + // an error. + LastErrorMessage *string `type:"string"` + + // Filters the last updated status type. + // + // * Valid value FAILED indicates errors while moving data. + // + // * Valid value SUCCEEDED indicates the data was successfully moved. + // + // * Valid value OUTDATED indicates the data is not the most recent. + LastUpdateStatus *string `type:"string" enum:"AggregatedSourceStatusType"` + + // The time of the last update. + LastUpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The source account ID or an organization. + SourceId *string `type:"string"` + + // The source account or an organization. + SourceType *string `type:"string" enum:"AggregatedSourceType"` +} + +// String returns the string representation +func (s AggregatedSourceStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AggregatedSourceStatus) GoString() string { + return s.String() +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *AggregatedSourceStatus) SetAwsRegion(v string) *AggregatedSourceStatus { + s.AwsRegion = &v + return s +} + +// SetLastErrorCode sets the LastErrorCode field's value. +func (s *AggregatedSourceStatus) SetLastErrorCode(v string) *AggregatedSourceStatus { + s.LastErrorCode = &v + return s } -const opStopConfigurationRecorder = "StopConfigurationRecorder" +// SetLastErrorMessage sets the LastErrorMessage field's value. +func (s *AggregatedSourceStatus) SetLastErrorMessage(v string) *AggregatedSourceStatus { + s.LastErrorMessage = &v + return s +} -// StopConfigurationRecorderRequest generates a "aws/request.Request" representing the -// client's request for the StopConfigurationRecorder operation. The "output" return -// value will be populated with the request's response once the request complets -// successfuly. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopConfigurationRecorder for more information on using the StopConfigurationRecorder -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the StopConfigurationRecorderRequest method. -// req, resp := client.StopConfigurationRecorderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder -func (c *ConfigService) StopConfigurationRecorderRequest(input *StopConfigurationRecorderInput) (req *request.Request, output *StopConfigurationRecorderOutput) { - op := &request.Operation{ - Name: opStopConfigurationRecorder, - HTTPMethod: "POST", - HTTPPath: "/", - } +// SetLastUpdateStatus sets the LastUpdateStatus field's value. +func (s *AggregatedSourceStatus) SetLastUpdateStatus(v string) *AggregatedSourceStatus { + s.LastUpdateStatus = &v + return s +} - if input == nil { - input = &StopConfigurationRecorderInput{} - } +// SetLastUpdateTime sets the LastUpdateTime field's value. +func (s *AggregatedSourceStatus) SetLastUpdateTime(v time.Time) *AggregatedSourceStatus { + s.LastUpdateTime = &v + return s +} - output = &StopConfigurationRecorderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return +// SetSourceId sets the SourceId field's value. +func (s *AggregatedSourceStatus) SetSourceId(v string) *AggregatedSourceStatus { + s.SourceId = &v + return s } -// StopConfigurationRecorder API operation for AWS Config. -// -// Stops recording configurations of the AWS resources you have selected to -// record in your AWS account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Config's -// API operation StopConfigurationRecorder for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchConfigurationRecorderException "NoSuchConfigurationRecorderException" -// You have specified a configuration recorder that does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/StopConfigurationRecorder -func (c *ConfigService) StopConfigurationRecorder(input *StopConfigurationRecorderInput) (*StopConfigurationRecorderOutput, error) { - req, out := c.StopConfigurationRecorderRequest(input) - return out, req.Send() +// SetSourceType sets the SourceType field's value. +func (s *AggregatedSourceStatus) SetSourceType(v string) *AggregatedSourceStatus { + s.SourceType = &v + return s } -// StopConfigurationRecorderWithContext is the same as StopConfigurationRecorder with the addition of -// the ability to pass a context and additional request options. -// -// See StopConfigurationRecorder for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ConfigService) StopConfigurationRecorderWithContext(ctx aws.Context, input *StopConfigurationRecorderInput, opts ...request.Option) (*StopConfigurationRecorderOutput, error) { - req, out := c.StopConfigurationRecorderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() +// An object that represents the authorizations granted to aggregator accounts +// and regions. +type AggregationAuthorization struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the aggregation object. + AggregationAuthorizationArn *string `type:"string"` + + // The 12-digit account ID of the account authorized to aggregate data. + AuthorizedAccountId *string `type:"string"` + + // The region authorized to collect aggregated data. + AuthorizedAwsRegion *string `min:"1" type:"string"` + + // The time stamp when the aggregation authorization was created. + CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s AggregationAuthorization) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AggregationAuthorization) GoString() string { + return s.String() +} + +// SetAggregationAuthorizationArn sets the AggregationAuthorizationArn field's value. +func (s *AggregationAuthorization) SetAggregationAuthorizationArn(v string) *AggregationAuthorization { + s.AggregationAuthorizationArn = &v + return s +} + +// SetAuthorizedAccountId sets the AuthorizedAccountId field's value. +func (s *AggregationAuthorization) SetAuthorizedAccountId(v string) *AggregationAuthorization { + s.AuthorizedAccountId = &v + return s +} + +// SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. +func (s *AggregationAuthorization) SetAuthorizedAwsRegion(v string) *AggregationAuthorization { + s.AuthorizedAwsRegion = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *AggregationAuthorization) SetCreationTime(v time.Time) *AggregationAuthorization { + s.CreationTime = &v + return s } // The detailed configuration of a specified resource. @@ -2744,7 +4192,7 @@ type BaseConfigurationItem struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The region where the resource resides. - AwsRegion *string `locationName:"awsRegion" type:"string"` + AwsRegion *string `locationName:"awsRegion" min:"1" type:"string"` // The description of the resource configuration. Configuration *string `locationName:"configuration" type:"string"` @@ -2973,14 +4421,14 @@ type Compliance struct { // Indicates whether an AWS resource or AWS Config rule is compliant. // // A resource is compliant if it complies with all of the AWS Config rules that - // evaluate it, and it is noncompliant if it does not comply with one or more - // of these rules. + // evaluate it. A resource is noncompliant if it does not comply with one or + // more of these rules. // // A rule is compliant if all of the resources that the rule evaluates comply - // with it, and it is noncompliant if any of these resources do not comply. + // with it. A rule is noncompliant if any of these resources do not comply. // // AWS Config returns the INSUFFICIENT_DATA value when no evaluation results - // are available for the AWS resource or Config rule. + // are available for the AWS resource or AWS Config rule. // // For the Compliance data type, AWS Config supports only COMPLIANT, NON_COMPLIANT, // and INSUFFICIENT_DATA values. AWS Config does not support the NOT_APPLICABLE @@ -3011,7 +4459,7 @@ func (s *Compliance) SetComplianceType(v string) *Compliance { } // Indicates whether an AWS Config rule is compliant. A rule is compliant if -// all of the resources that the rule evaluated comply with it, and it is noncompliant +// all of the resources that the rule evaluated comply with it. A rule is noncompliant // if any of these resources do not comply. type ComplianceByConfigRule struct { _ struct{} `type:"structure"` @@ -3047,8 +4495,8 @@ func (s *ComplianceByConfigRule) SetConfigRuleName(v string) *ComplianceByConfig // Indicates whether an AWS resource that is evaluated according to one or more // AWS Config rules is compliant. A resource is compliant if it complies with -// all of the rules that evaluate it, and it is noncompliant if it does not -// comply with one or more of these rules. +// all of the rules that evaluate it. A resource is noncompliant if it does +// not comply with one or more of these rules. type ComplianceByResource struct { _ struct{} `type:"structure"` @@ -3171,12 +4619,12 @@ func (s *ComplianceSummary) SetNonCompliantResourceCount(v *ComplianceContributo } // The number of AWS resources of a specific type that are compliant or noncompliant, -// up to a maximum of 100 for each compliance. +// up to a maximum of 100 for each. type ComplianceSummaryByResourceType struct { _ struct{} `type:"structure"` // The number of AWS resources that are compliant or noncompliant, up to a maximum - // of 100 for each compliance. + // of 100 for each. ComplianceSummary *ComplianceSummary `type:"structure"` // The type of AWS resource. @@ -3304,18 +4752,18 @@ type ConfigRule struct { ConfigRuleName *string `min:"1" type:"string"` // Indicates whether the AWS Config rule is active or is currently being deleted - // by AWS Config. It can also indicate the evaluation status for the Config + // by AWS Config. It can also indicate the evaluation status for the AWS Config // rule. // // AWS Config sets the state of the rule to EVALUATING temporarily after you // use the StartConfigRulesEvaluation request to evaluate your resources against - // the Config rule. + // the AWS Config rule. // // AWS Config sets the state of the rule to DELETING_RESULTS temporarily after // you use the DeleteEvaluationResults request to delete the current evaluation - // results for the Config rule. + // results for the AWS Config rule. // - // AWS Config sets the state of a rule to DELETING temporarily after you use + // AWS Config temporarily sets the state of a rule to DELETING after you use // the DeleteConfigRule request to delete the rule. After AWS Config deletes // the rule, the rule and all of its evaluations are erased and are no longer // available. @@ -3324,7 +4772,7 @@ type ConfigRule struct { // The description that you provide for the AWS Config rule. Description *string `type:"string"` - // A string in JSON format that is passed to the AWS Config rule Lambda function. + // A string, in JSON format, that is passed to the AWS Config rule Lambda function. InputParameters *string `min:"1" type:"string"` // The maximum frequency with which AWS Config runs evaluations for a rule. @@ -3448,11 +4896,129 @@ func (s *ConfigRule) SetSource(v *Source) *ConfigRule { return s } +// Filters the compliance results based on account ID, region, compliance type, +// and rule name. +type ConfigRuleComplianceFilters struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the source account. + AccountId *string `type:"string"` + + // The source region where the data is aggregated. + AwsRegion *string `min:"1" type:"string"` + + // The rule compliance status. + // + // For the ConfigRuleComplianceFilters data type, AWS Config supports only COMPLIANT + // and NON_COMPLIANT. AWS Config does not support the NOT_APPLICABLE and the + // INSUFFICIENT_DATA values. + ComplianceType *string `type:"string" enum:"ComplianceType"` + + // The name of the AWS Config rule. + ConfigRuleName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ConfigRuleComplianceFilters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfigRuleComplianceFilters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfigRuleComplianceFilters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfigRuleComplianceFilters"} + if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) + } + if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *ConfigRuleComplianceFilters) SetAccountId(v string) *ConfigRuleComplianceFilters { + s.AccountId = &v + return s +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *ConfigRuleComplianceFilters) SetAwsRegion(v string) *ConfigRuleComplianceFilters { + s.AwsRegion = &v + return s +} + +// SetComplianceType sets the ComplianceType field's value. +func (s *ConfigRuleComplianceFilters) SetComplianceType(v string) *ConfigRuleComplianceFilters { + s.ComplianceType = &v + return s +} + +// SetConfigRuleName sets the ConfigRuleName field's value. +func (s *ConfigRuleComplianceFilters) SetConfigRuleName(v string) *ConfigRuleComplianceFilters { + s.ConfigRuleName = &v + return s +} + +// Filters the results based on the account IDs and regions. +type ConfigRuleComplianceSummaryFilters struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the source account. + AccountId *string `type:"string"` + + // The source region where the data is aggregated. + AwsRegion *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ConfigRuleComplianceSummaryFilters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfigRuleComplianceSummaryFilters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfigRuleComplianceSummaryFilters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfigRuleComplianceSummaryFilters"} + if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *ConfigRuleComplianceSummaryFilters) SetAccountId(v string) *ConfigRuleComplianceSummaryFilters { + s.AccountId = &v + return s +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *ConfigRuleComplianceSummaryFilters) SetAwsRegion(v string) *ConfigRuleComplianceSummaryFilters { + s.AwsRegion = &v + return s +} + // Status information for your AWS managed Config rules. The status includes // information such as the last time the rule ran, the last time it failed, // and the related error for the last failure. // -// This action does not return status information about custom Config rules. +// This action does not return status information about custom AWS Config rules. type ConfigRuleEvaluationStatus struct { _ struct{} `type:"structure"` @@ -3590,7 +5156,7 @@ func (s *ConfigRuleEvaluationStatus) SetLastSuccessfulInvocationTime(v time.Time // * The value for the deliveryFrequency parameter within the delivery channel // configuration, which sets how often AWS Config delivers configuration // snapshots. This value also sets how often AWS Config invokes evaluations -// for Config rules. +// for AWS Config rules. // // * The value for the MaximumExecutionFrequency parameter, which sets the // maximum frequency with which AWS Config invokes evaluations for the rule. @@ -3666,32 +5232,102 @@ func (s ConfigStreamDeliveryInfo) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s ConfigStreamDeliveryInfo) GoString() string { - return s.String() +// GoString returns the string representation +func (s ConfigStreamDeliveryInfo) GoString() string { + return s.String() +} + +// SetLastErrorCode sets the LastErrorCode field's value. +func (s *ConfigStreamDeliveryInfo) SetLastErrorCode(v string) *ConfigStreamDeliveryInfo { + s.LastErrorCode = &v + return s +} + +// SetLastErrorMessage sets the LastErrorMessage field's value. +func (s *ConfigStreamDeliveryInfo) SetLastErrorMessage(v string) *ConfigStreamDeliveryInfo { + s.LastErrorMessage = &v + return s +} + +// SetLastStatus sets the LastStatus field's value. +func (s *ConfigStreamDeliveryInfo) SetLastStatus(v string) *ConfigStreamDeliveryInfo { + s.LastStatus = &v + return s +} + +// SetLastStatusChangeTime sets the LastStatusChangeTime field's value. +func (s *ConfigStreamDeliveryInfo) SetLastStatusChangeTime(v time.Time) *ConfigStreamDeliveryInfo { + s.LastStatusChangeTime = &v + return s +} + +// The details about the configuration aggregator, including information about +// source accounts, regions, and metadata of the aggregator. +type ConfigurationAggregator struct { + _ struct{} `type:"structure"` + + // Provides a list of source accounts and regions to be aggregated. + AccountAggregationSources []*AccountAggregationSource `type:"list"` + + // The Amazon Resource Name (ARN) of the aggregator. + ConfigurationAggregatorArn *string `type:"string"` + + // The name of the aggregator. + ConfigurationAggregatorName *string `min:"1" type:"string"` + + // The time stamp when the configuration aggregator was created. + CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The time of the last update. + LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Provides an organization and list of regions to be aggregated. + OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` +} + +// String returns the string representation +func (s ConfigurationAggregator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfigurationAggregator) GoString() string { + return s.String() +} + +// SetAccountAggregationSources sets the AccountAggregationSources field's value. +func (s *ConfigurationAggregator) SetAccountAggregationSources(v []*AccountAggregationSource) *ConfigurationAggregator { + s.AccountAggregationSources = v + return s +} + +// SetConfigurationAggregatorArn sets the ConfigurationAggregatorArn field's value. +func (s *ConfigurationAggregator) SetConfigurationAggregatorArn(v string) *ConfigurationAggregator { + s.ConfigurationAggregatorArn = &v + return s } -// SetLastErrorCode sets the LastErrorCode field's value. -func (s *ConfigStreamDeliveryInfo) SetLastErrorCode(v string) *ConfigStreamDeliveryInfo { - s.LastErrorCode = &v +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *ConfigurationAggregator) SetConfigurationAggregatorName(v string) *ConfigurationAggregator { + s.ConfigurationAggregatorName = &v return s } -// SetLastErrorMessage sets the LastErrorMessage field's value. -func (s *ConfigStreamDeliveryInfo) SetLastErrorMessage(v string) *ConfigStreamDeliveryInfo { - s.LastErrorMessage = &v +// SetCreationTime sets the CreationTime field's value. +func (s *ConfigurationAggregator) SetCreationTime(v time.Time) *ConfigurationAggregator { + s.CreationTime = &v return s } -// SetLastStatus sets the LastStatus field's value. -func (s *ConfigStreamDeliveryInfo) SetLastStatus(v string) *ConfigStreamDeliveryInfo { - s.LastStatus = &v +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *ConfigurationAggregator) SetLastUpdatedTime(v time.Time) *ConfigurationAggregator { + s.LastUpdatedTime = &v return s } -// SetLastStatusChangeTime sets the LastStatusChangeTime field's value. -func (s *ConfigStreamDeliveryInfo) SetLastStatusChangeTime(v time.Time) *ConfigStreamDeliveryInfo { - s.LastStatusChangeTime = &v +// SetOrganizationAggregationSource sets the OrganizationAggregationSource field's value. +func (s *ConfigurationAggregator) SetOrganizationAggregationSource(v *OrganizationAggregationSource) *ConfigurationAggregator { + s.OrganizationAggregationSource = v return s } @@ -3699,7 +5335,7 @@ func (s *ConfigStreamDeliveryInfo) SetLastStatusChangeTime(v time.Time) *ConfigS type ConfigurationItem struct { _ struct{} `type:"structure"` - // The 12 digit AWS account ID associated with the resource. + // The 12-digit AWS account ID associated with the resource. AccountId *string `locationName:"accountId" type:"string"` // The Amazon Resource Name (ARN) of the resource. @@ -3709,7 +5345,7 @@ type ConfigurationItem struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The region where the resource resides. - AwsRegion *string `locationName:"awsRegion" type:"string"` + AwsRegion *string `locationName:"awsRegion" min:"1" type:"string"` // The description of the resource configuration. Configuration *string `locationName:"configuration" type:"string"` @@ -3734,7 +5370,7 @@ type ConfigurationItem struct { // // A populated field indicates that the current configuration was initiated // by the events recorded in the CloudTrail log. For more information about - // CloudTrail, see What is AWS CloudTrail? (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). + // CloudTrail, see What Is AWS CloudTrail (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). // // An empty field indicates that the current configuration was not initiated // by any event. @@ -3746,7 +5382,7 @@ type ConfigurationItem struct { // The time stamp when the resource was created. ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp" timestampFormat:"unix"` - // The ID of the resource (for example., sg-xxxxxx). + // The ID of the resource (for example, sg-xxxxxx). ResourceId *string `locationName:"resourceId" type:"string"` // The custom name of the resource, if available. @@ -3894,7 +5530,7 @@ type ConfigurationRecorder struct { // the assigned name. Name *string `locationName:"name" min:"1" type:"string"` - // Specifies the types of AWS resource for which AWS Config records configuration + // Specifies the types of AWS resources for which AWS Config records configuration // changes. RecordingGroup *RecordingGroup `locationName:"recordingGroup" type:"structure"` @@ -3969,7 +5605,7 @@ type ConfigurationRecorderStatus struct { // The name of the configuration recorder. Name *string `locationName:"name" type:"string"` - // Specifies whether the recorder is currently recording or not. + // Specifies whether or not the recorder is currently recording. Recording *bool `locationName:"recording" type:"boolean"` } @@ -4031,6 +5667,75 @@ func (s *ConfigurationRecorderStatus) SetRecording(v bool) *ConfigurationRecorde return s } +type DeleteAggregationAuthorizationInput struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the account authorized to aggregate data. + // + // AuthorizedAccountId is a required field + AuthorizedAccountId *string `type:"string" required:"true"` + + // The region authorized to collect aggregated data. + // + // AuthorizedAwsRegion is a required field + AuthorizedAwsRegion *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAggregationAuthorizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAggregationAuthorizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAggregationAuthorizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAggregationAuthorizationInput"} + if s.AuthorizedAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizedAccountId")) + } + if s.AuthorizedAwsRegion == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizedAwsRegion")) + } + if s.AuthorizedAwsRegion != nil && len(*s.AuthorizedAwsRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizedAwsRegion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthorizedAccountId sets the AuthorizedAccountId field's value. +func (s *DeleteAggregationAuthorizationInput) SetAuthorizedAccountId(v string) *DeleteAggregationAuthorizationInput { + s.AuthorizedAccountId = &v + return s +} + +// SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. +func (s *DeleteAggregationAuthorizationInput) SetAuthorizedAwsRegion(v string) *DeleteAggregationAuthorizationInput { + s.AuthorizedAwsRegion = &v + return s +} + +type DeleteAggregationAuthorizationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAggregationAuthorizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAggregationAuthorizationOutput) GoString() string { + return s.String() +} + type DeleteConfigRuleInput struct { _ struct{} `type:"structure"` @@ -4086,6 +5791,61 @@ func (s DeleteConfigRuleOutput) GoString() string { return s.String() } +type DeleteConfigurationAggregatorInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteConfigurationAggregatorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConfigurationAggregatorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteConfigurationAggregatorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteConfigurationAggregatorInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *DeleteConfigurationAggregatorInput) SetConfigurationAggregatorName(v string) *DeleteConfigurationAggregatorInput { + s.ConfigurationAggregatorName = &v + return s +} + +type DeleteConfigurationAggregatorOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteConfigurationAggregatorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConfigurationAggregatorOutput) GoString() string { + return s.String() +} + // The request object for the DeleteConfigurationRecorder action. type DeleteConfigurationRecorderInput struct { _ struct{} `type:"structure"` @@ -4145,7 +5905,7 @@ func (s DeleteConfigurationRecorderOutput) GoString() string { } // The input for the DeleteDeliveryChannel action. The action accepts the following -// data in JSON format. +// data, in JSON format. type DeleteDeliveryChannelInput struct { _ struct{} `type:"structure"` @@ -4204,7 +5964,8 @@ func (s DeleteDeliveryChannelOutput) GoString() string { type DeleteEvaluationResultsInput struct { _ struct{} `type:"structure"` - // The name of the Config rule for which you want to delete the evaluation results. + // The name of the AWS Config rule for which you want to delete the evaluation + // results. // // ConfigRuleName is a required field ConfigRuleName *string `min:"1" type:"string" required:"true"` @@ -4242,7 +6003,7 @@ func (s *DeleteEvaluationResultsInput) SetConfigRuleName(v string) *DeleteEvalua return s } -// The output when you delete the evaluation results for the specified Config +// The output when you delete the evaluation results for the specified AWS Config // rule. type DeleteEvaluationResultsOutput struct { _ struct{} `type:"structure"` @@ -4258,6 +6019,75 @@ func (s DeleteEvaluationResultsOutput) GoString() string { return s.String() } +type DeletePendingAggregationRequestInput struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the account requesting to aggregate data. + // + // RequesterAccountId is a required field + RequesterAccountId *string `type:"string" required:"true"` + + // The region requesting to aggregate data. + // + // RequesterAwsRegion is a required field + RequesterAwsRegion *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePendingAggregationRequestInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePendingAggregationRequestInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePendingAggregationRequestInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePendingAggregationRequestInput"} + if s.RequesterAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("RequesterAccountId")) + } + if s.RequesterAwsRegion == nil { + invalidParams.Add(request.NewErrParamRequired("RequesterAwsRegion")) + } + if s.RequesterAwsRegion != nil && len(*s.RequesterAwsRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequesterAwsRegion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRequesterAccountId sets the RequesterAccountId field's value. +func (s *DeletePendingAggregationRequestInput) SetRequesterAccountId(v string) *DeletePendingAggregationRequestInput { + s.RequesterAccountId = &v + return s +} + +// SetRequesterAwsRegion sets the RequesterAwsRegion field's value. +func (s *DeletePendingAggregationRequestInput) SetRequesterAwsRegion(v string) *DeletePendingAggregationRequestInput { + s.RequesterAwsRegion = &v + return s +} + +type DeletePendingAggregationRequestOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePendingAggregationRequestOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePendingAggregationRequestOutput) GoString() string { + return s.String() +} + // The input for the DeliverConfigSnapshot action. type DeliverConfigSnapshotInput struct { _ struct{} `type:"structure"` @@ -4300,7 +6130,7 @@ func (s *DeliverConfigSnapshotInput) SetDeliveryChannelName(v string) *DeliverCo return s } -// The output for the DeliverConfigSnapshot action in JSON format. +// The output for the DeliverConfigSnapshot action, in JSON format. type DeliverConfigSnapshotOutput struct { _ struct{} `type:"structure"` @@ -4363,20 +6193,157 @@ type DeliveryChannel struct { } // String returns the string representation -func (s DeliveryChannel) String() string { +func (s DeliveryChannel) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeliveryChannel) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeliveryChannel) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeliveryChannel"} + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigSnapshotDeliveryProperties sets the ConfigSnapshotDeliveryProperties field's value. +func (s *DeliveryChannel) SetConfigSnapshotDeliveryProperties(v *ConfigSnapshotDeliveryProperties) *DeliveryChannel { + s.ConfigSnapshotDeliveryProperties = v + return s +} + +// SetName sets the Name field's value. +func (s *DeliveryChannel) SetName(v string) *DeliveryChannel { + s.Name = &v + return s +} + +// SetS3BucketName sets the S3BucketName field's value. +func (s *DeliveryChannel) SetS3BucketName(v string) *DeliveryChannel { + s.S3BucketName = &v + return s +} + +// SetS3KeyPrefix sets the S3KeyPrefix field's value. +func (s *DeliveryChannel) SetS3KeyPrefix(v string) *DeliveryChannel { + s.S3KeyPrefix = &v + return s +} + +// SetSnsTopicARN sets the SnsTopicARN field's value. +func (s *DeliveryChannel) SetSnsTopicARN(v string) *DeliveryChannel { + s.SnsTopicARN = &v + return s +} + +// The status of a specified delivery channel. +// +// Valid values: Success | Failure +type DeliveryChannelStatus struct { + _ struct{} `type:"structure"` + + // A list that contains the status of the delivery of the configuration history + // to the specified Amazon S3 bucket. + ConfigHistoryDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configHistoryDeliveryInfo" type:"structure"` + + // A list containing the status of the delivery of the snapshot to the specified + // Amazon S3 bucket. + ConfigSnapshotDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configSnapshotDeliveryInfo" type:"structure"` + + // A list containing the status of the delivery of the configuration stream + // notification to the specified Amazon SNS topic. + ConfigStreamDeliveryInfo *ConfigStreamDeliveryInfo `locationName:"configStreamDeliveryInfo" type:"structure"` + + // The name of the delivery channel. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s DeliveryChannelStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeliveryChannelStatus) GoString() string { + return s.String() +} + +// SetConfigHistoryDeliveryInfo sets the ConfigHistoryDeliveryInfo field's value. +func (s *DeliveryChannelStatus) SetConfigHistoryDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { + s.ConfigHistoryDeliveryInfo = v + return s +} + +// SetConfigSnapshotDeliveryInfo sets the ConfigSnapshotDeliveryInfo field's value. +func (s *DeliveryChannelStatus) SetConfigSnapshotDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { + s.ConfigSnapshotDeliveryInfo = v + return s +} + +// SetConfigStreamDeliveryInfo sets the ConfigStreamDeliveryInfo field's value. +func (s *DeliveryChannelStatus) SetConfigStreamDeliveryInfo(v *ConfigStreamDeliveryInfo) *DeliveryChannelStatus { + s.ConfigStreamDeliveryInfo = v + return s +} + +// SetName sets the Name field's value. +func (s *DeliveryChannelStatus) SetName(v string) *DeliveryChannelStatus { + s.Name = &v + return s +} + +type DescribeAggregateComplianceByConfigRulesInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // Filters the results by ConfigRuleComplianceFilters object. + Filters *ConfigRuleComplianceFilters `type:"structure"` + + // The maximum number of evaluation results returned on each page. The default + // is maximum. If you specify 0, AWS Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAggregateComplianceByConfigRulesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeliveryChannel) GoString() string { +func (s DescribeAggregateComplianceByConfigRulesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeliveryChannel) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeliveryChannel"} - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) +func (s *DescribeAggregateComplianceByConfigRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAggregateComplianceByConfigRulesInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.Filters != nil { + if err := s.Filters.Validate(); err != nil { + invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -4385,89 +6352,128 @@ func (s *DeliveryChannel) Validate() error { return nil } -// SetConfigSnapshotDeliveryProperties sets the ConfigSnapshotDeliveryProperties field's value. -func (s *DeliveryChannel) SetConfigSnapshotDeliveryProperties(v *ConfigSnapshotDeliveryProperties) *DeliveryChannel { - s.ConfigSnapshotDeliveryProperties = v +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *DescribeAggregateComplianceByConfigRulesInput) SetConfigurationAggregatorName(v string) *DescribeAggregateComplianceByConfigRulesInput { + s.ConfigurationAggregatorName = &v return s } -// SetName sets the Name field's value. -func (s *DeliveryChannel) SetName(v string) *DeliveryChannel { - s.Name = &v +// SetFilters sets the Filters field's value. +func (s *DescribeAggregateComplianceByConfigRulesInput) SetFilters(v *ConfigRuleComplianceFilters) *DescribeAggregateComplianceByConfigRulesInput { + s.Filters = v return s } -// SetS3BucketName sets the S3BucketName field's value. -func (s *DeliveryChannel) SetS3BucketName(v string) *DeliveryChannel { - s.S3BucketName = &v +// SetLimit sets the Limit field's value. +func (s *DescribeAggregateComplianceByConfigRulesInput) SetLimit(v int64) *DescribeAggregateComplianceByConfigRulesInput { + s.Limit = &v return s } -// SetS3KeyPrefix sets the S3KeyPrefix field's value. -func (s *DeliveryChannel) SetS3KeyPrefix(v string) *DeliveryChannel { - s.S3KeyPrefix = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeAggregateComplianceByConfigRulesInput) SetNextToken(v string) *DescribeAggregateComplianceByConfigRulesInput { + s.NextToken = &v return s } -// SetSnsTopicARN sets the SnsTopicARN field's value. -func (s *DeliveryChannel) SetSnsTopicARN(v string) *DeliveryChannel { - s.SnsTopicARN = &v - return s +type DescribeAggregateComplianceByConfigRulesOutput struct { + _ struct{} `type:"structure"` + + // Returns a list of AggregateComplianceByConfigRule object. + AggregateComplianceByConfigRules []*AggregateComplianceByConfigRule `type:"list"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` } -// The status of a specified delivery channel. -// -// Valid values: Success | Failure -type DeliveryChannelStatus struct { - _ struct{} `type:"structure"` +// String returns the string representation +func (s DescribeAggregateComplianceByConfigRulesOutput) String() string { + return awsutil.Prettify(s) +} - // A list that contains the status of the delivery of the configuration history - // to the specified Amazon S3 bucket. - ConfigHistoryDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configHistoryDeliveryInfo" type:"structure"` +// GoString returns the string representation +func (s DescribeAggregateComplianceByConfigRulesOutput) GoString() string { + return s.String() +} - // A list containing the status of the delivery of the snapshot to the specified - // Amazon S3 bucket. - ConfigSnapshotDeliveryInfo *ConfigExportDeliveryInfo `locationName:"configSnapshotDeliveryInfo" type:"structure"` +// SetAggregateComplianceByConfigRules sets the AggregateComplianceByConfigRules field's value. +func (s *DescribeAggregateComplianceByConfigRulesOutput) SetAggregateComplianceByConfigRules(v []*AggregateComplianceByConfigRule) *DescribeAggregateComplianceByConfigRulesOutput { + s.AggregateComplianceByConfigRules = v + return s +} - // A list containing the status of the delivery of the configuration stream - // notification to the specified Amazon SNS topic. - ConfigStreamDeliveryInfo *ConfigStreamDeliveryInfo `locationName:"configStreamDeliveryInfo" type:"structure"` +// SetNextToken sets the NextToken field's value. +func (s *DescribeAggregateComplianceByConfigRulesOutput) SetNextToken(v string) *DescribeAggregateComplianceByConfigRulesOutput { + s.NextToken = &v + return s +} - // The name of the delivery channel. - Name *string `locationName:"name" type:"string"` +type DescribeAggregationAuthorizationsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of AggregationAuthorizations returned on each page. The + // default is maximum. If you specify 0, AWS Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` } // String returns the string representation -func (s DeliveryChannelStatus) String() string { +func (s DescribeAggregationAuthorizationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeliveryChannelStatus) GoString() string { +func (s DescribeAggregationAuthorizationsInput) GoString() string { return s.String() } -// SetConfigHistoryDeliveryInfo sets the ConfigHistoryDeliveryInfo field's value. -func (s *DeliveryChannelStatus) SetConfigHistoryDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { - s.ConfigHistoryDeliveryInfo = v +// SetLimit sets the Limit field's value. +func (s *DescribeAggregationAuthorizationsInput) SetLimit(v int64) *DescribeAggregationAuthorizationsInput { + s.Limit = &v return s } -// SetConfigSnapshotDeliveryInfo sets the ConfigSnapshotDeliveryInfo field's value. -func (s *DeliveryChannelStatus) SetConfigSnapshotDeliveryInfo(v *ConfigExportDeliveryInfo) *DeliveryChannelStatus { - s.ConfigSnapshotDeliveryInfo = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeAggregationAuthorizationsInput) SetNextToken(v string) *DescribeAggregationAuthorizationsInput { + s.NextToken = &v return s } -// SetConfigStreamDeliveryInfo sets the ConfigStreamDeliveryInfo field's value. -func (s *DeliveryChannelStatus) SetConfigStreamDeliveryInfo(v *ConfigStreamDeliveryInfo) *DeliveryChannelStatus { - s.ConfigStreamDeliveryInfo = v +type DescribeAggregationAuthorizationsOutput struct { + _ struct{} `type:"structure"` + + // Returns a list of authorizations granted to various aggregator accounts and + // regions. + AggregationAuthorizations []*AggregationAuthorization `type:"list"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAggregationAuthorizationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAggregationAuthorizationsOutput) GoString() string { + return s.String() +} + +// SetAggregationAuthorizations sets the AggregationAuthorizations field's value. +func (s *DescribeAggregationAuthorizationsOutput) SetAggregationAuthorizations(v []*AggregationAuthorization) *DescribeAggregationAuthorizationsOutput { + s.AggregationAuthorizations = v return s } -// SetName sets the Name field's value. -func (s *DeliveryChannelStatus) SetName(v string) *DeliveryChannelStatus { - s.Name = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeAggregationAuthorizationsOutput) SetNextToken(v string) *DescribeAggregationAuthorizationsOutput { + s.NextToken = &v return s } @@ -4482,7 +6488,7 @@ type DescribeComplianceByConfigRuleInput struct { // Specify one or more AWS Config rule names to filter the results by rule. ConfigRuleNames []*string `type:"list"` - // The NextToken string returned on a previous page that you use to get the + // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } @@ -4557,11 +6563,11 @@ type DescribeComplianceByResourceInput struct { ComplianceTypes []*string `type:"list"` // The maximum number of evaluation results returned on each page. The default - // is 10. You cannot specify a limit greater than 100. If you specify 0, AWS + // is 10. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `type:"integer"` - // The NextToken string returned on a previous page that you use to get the + // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` @@ -4570,8 +6576,8 @@ type DescribeComplianceByResourceInput struct { // also specify a type for ResourceType. ResourceId *string `min:"1" type:"string"` - // The types of AWS resources for which you want compliance information; for - // example, AWS::EC2::Instance. For this action, you can specify that the resource + // The types of AWS resources for which you want compliance information (for + // example, AWS::EC2::Instance). For this action, you can specify that the resource // type is an AWS account by specifying AWS::::Account. ResourceType *string `min:"1" type:"string"` } @@ -4679,12 +6685,12 @@ type DescribeConfigRuleEvaluationStatusInput struct { // This parameter is required if the rule limit for your account is more than // the default of 50 rules. // - // For more information about requesting a rule limit increase, see AWS Config - // Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) + // For information about requesting a rule limit increase, see AWS Config Limits + // (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) // in the AWS General Reference Guide. Limit *int64 `type:"integer"` - // The NextToken string returned on a previous page that you use to get the + // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } @@ -4757,7 +6763,7 @@ type DescribeConfigRulesInput struct { // specify any names, AWS Config returns details for all your rules. ConfigRuleNames []*string `type:"list"` - // The NextToken string returned on a previous page that you use to get the + // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } @@ -4779,40 +6785,228 @@ func (s *DescribeConfigRulesInput) SetConfigRuleNames(v []*string) *DescribeConf } // SetNextToken sets the NextToken field's value. -func (s *DescribeConfigRulesInput) SetNextToken(v string) *DescribeConfigRulesInput { +func (s *DescribeConfigRulesInput) SetNextToken(v string) *DescribeConfigRulesInput { + s.NextToken = &v + return s +} + +type DescribeConfigRulesOutput struct { + _ struct{} `type:"structure"` + + // The details about your AWS Config rules. + ConfigRules []*ConfigRule `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeConfigRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConfigRulesOutput) GoString() string { + return s.String() +} + +// SetConfigRules sets the ConfigRules field's value. +func (s *DescribeConfigRulesOutput) SetConfigRules(v []*ConfigRule) *DescribeConfigRulesOutput { + s.ConfigRules = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeConfigRulesOutput) SetNextToken(v string) *DescribeConfigRulesOutput { + s.NextToken = &v + return s +} + +type DescribeConfigurationAggregatorSourcesStatusInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // The maximum number of AggregatorSourceStatus returned on each page. The default + // is maximum. If you specify 0, AWS Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` + + // Filters the status type. + // + // * Valid value FAILED indicates errors while moving data. + // + // * Valid value SUCCEEDED indicates the data was successfully moved. + // + // * Valid value OUTDATED indicates the data is not the most recent. + UpdateStatus []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s DescribeConfigurationAggregatorSourcesStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConfigurationAggregatorSourcesStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeConfigurationAggregatorSourcesStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeConfigurationAggregatorSourcesStatusInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.UpdateStatus != nil && len(s.UpdateStatus) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UpdateStatus", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetConfigurationAggregatorName(v string) *DescribeConfigurationAggregatorSourcesStatusInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetLimit(v int64) *DescribeConfigurationAggregatorSourcesStatusInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetNextToken(v string) *DescribeConfigurationAggregatorSourcesStatusInput { + s.NextToken = &v + return s +} + +// SetUpdateStatus sets the UpdateStatus field's value. +func (s *DescribeConfigurationAggregatorSourcesStatusInput) SetUpdateStatus(v []*string) *DescribeConfigurationAggregatorSourcesStatusInput { + s.UpdateStatus = v + return s +} + +type DescribeConfigurationAggregatorSourcesStatusOutput struct { + _ struct{} `type:"structure"` + + // Retuns an AggregatedSourceStatus object. + AggregatedSourceStatusList []*AggregatedSourceStatus `type:"list"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeConfigurationAggregatorSourcesStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConfigurationAggregatorSourcesStatusOutput) GoString() string { + return s.String() +} + +// SetAggregatedSourceStatusList sets the AggregatedSourceStatusList field's value. +func (s *DescribeConfigurationAggregatorSourcesStatusOutput) SetAggregatedSourceStatusList(v []*AggregatedSourceStatus) *DescribeConfigurationAggregatorSourcesStatusOutput { + s.AggregatedSourceStatusList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeConfigurationAggregatorSourcesStatusOutput) SetNextToken(v string) *DescribeConfigurationAggregatorSourcesStatusOutput { + s.NextToken = &v + return s +} + +type DescribeConfigurationAggregatorsInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregators. + ConfigurationAggregatorNames []*string `type:"list"` + + // The maximum number of configuration aggregators returned on each page. The + // default is maximum. If you specify 0, AWS Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeConfigurationAggregatorsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConfigurationAggregatorsInput) GoString() string { + return s.String() +} + +// SetConfigurationAggregatorNames sets the ConfigurationAggregatorNames field's value. +func (s *DescribeConfigurationAggregatorsInput) SetConfigurationAggregatorNames(v []*string) *DescribeConfigurationAggregatorsInput { + s.ConfigurationAggregatorNames = v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeConfigurationAggregatorsInput) SetLimit(v int64) *DescribeConfigurationAggregatorsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeConfigurationAggregatorsInput) SetNextToken(v string) *DescribeConfigurationAggregatorsInput { s.NextToken = &v return s } -type DescribeConfigRulesOutput struct { +type DescribeConfigurationAggregatorsOutput struct { _ struct{} `type:"structure"` - // The details about your AWS Config rules. - ConfigRules []*ConfigRule `type:"list"` + // Returns a ConfigurationAggregators object. + ConfigurationAggregators []*ConfigurationAggregator `type:"list"` - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeConfigRulesOutput) String() string { +func (s DescribeConfigurationAggregatorsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeConfigRulesOutput) GoString() string { +func (s DescribeConfigurationAggregatorsOutput) GoString() string { return s.String() } -// SetConfigRules sets the ConfigRules field's value. -func (s *DescribeConfigRulesOutput) SetConfigRules(v []*ConfigRule) *DescribeConfigRulesOutput { - s.ConfigRules = v +// SetConfigurationAggregators sets the ConfigurationAggregators field's value. +func (s *DescribeConfigurationAggregatorsOutput) SetConfigurationAggregators(v []*ConfigurationAggregator) *DescribeConfigurationAggregatorsOutput { + s.ConfigurationAggregators = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeConfigRulesOutput) SetNextToken(v string) *DescribeConfigRulesOutput { +func (s *DescribeConfigurationAggregatorsOutput) SetNextToken(v string) *DescribeConfigurationAggregatorsOutput { s.NextToken = &v return s } @@ -4843,7 +7037,7 @@ func (s *DescribeConfigurationRecorderStatusInput) SetConfigurationRecorderNames return s } -// The output for the DescribeConfigurationRecorderStatus action in JSON format. +// The output for the DescribeConfigurationRecorderStatus action, in JSON format. type DescribeConfigurationRecorderStatusOutput struct { _ struct{} `type:"structure"` @@ -5011,6 +7205,73 @@ func (s *DescribeDeliveryChannelsOutput) SetDeliveryChannels(v []*DeliveryChanne return s } +type DescribePendingAggregationRequestsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of evaluation results returned on each page. The default + // is maximum. If you specify 0, AWS Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribePendingAggregationRequestsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePendingAggregationRequestsInput) GoString() string { + return s.String() +} + +// SetLimit sets the Limit field's value. +func (s *DescribePendingAggregationRequestsInput) SetLimit(v int64) *DescribePendingAggregationRequestsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePendingAggregationRequestsInput) SetNextToken(v string) *DescribePendingAggregationRequestsInput { + s.NextToken = &v + return s +} + +type DescribePendingAggregationRequestsOutput struct { + _ struct{} `type:"structure"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` + + // Returns a PendingAggregationRequests object. + PendingAggregationRequests []*PendingAggregationRequest `type:"list"` +} + +// String returns the string representation +func (s DescribePendingAggregationRequestsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePendingAggregationRequestsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePendingAggregationRequestsOutput) SetNextToken(v string) *DescribePendingAggregationRequestsOutput { + s.NextToken = &v + return s +} + +// SetPendingAggregationRequests sets the PendingAggregationRequests field's value. +func (s *DescribePendingAggregationRequestsOutput) SetPendingAggregationRequests(v []*PendingAggregationRequest) *DescribePendingAggregationRequestsOutput { + s.PendingAggregationRequests = v + return s +} + // Identifies an AWS resource and indicates whether it complies with the AWS // Config rule that it was evaluated against. type Evaluation struct { @@ -5038,7 +7299,7 @@ type Evaluation struct { // // Similarly, AWS Config does not accept INSUFFICIENT_DATA as the value for // ComplianceType from a PutEvaluations request. For example, an AWS Lambda - // function for a custom Config rule cannot pass an INSUFFICIENT_DATA value + // function for a custom AWS Config rule cannot pass an INSUFFICIENT_DATA value // to AWS Config. // // ComplianceType is a required field @@ -5126,7 +7387,7 @@ func (s *Evaluation) SetOrderingTimestamp(v time.Time) *Evaluation { } // The details of an AWS Config evaluation. Provides the AWS resource that was -// evaluated, the compliance of the resource, related timestamps, and supplementary +// evaluated, the compliance of the resource, related time stamps, and supplementary // information. type EvaluationResult struct { _ struct{} `type:"structure"` @@ -5197,89 +7458,372 @@ func (s *EvaluationResult) SetResultRecordedTime(v time.Time) *EvaluationResult return s } -// SetResultToken sets the ResultToken field's value. -func (s *EvaluationResult) SetResultToken(v string) *EvaluationResult { - s.ResultToken = &v +// SetResultToken sets the ResultToken field's value. +func (s *EvaluationResult) SetResultToken(v string) *EvaluationResult { + s.ResultToken = &v + return s +} + +// Uniquely identifies an evaluation result. +type EvaluationResultIdentifier struct { + _ struct{} `type:"structure"` + + // Identifies an AWS Config rule used to evaluate an AWS resource, and provides + // the type and ID of the evaluated resource. + EvaluationResultQualifier *EvaluationResultQualifier `type:"structure"` + + // The time of the event that triggered the evaluation of your AWS resources. + // The time can indicate when AWS Config delivered a configuration item change + // notification, or it can indicate when AWS Config delivered the configuration + // snapshot, depending on which event triggered the evaluation. + OrderingTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s EvaluationResultIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EvaluationResultIdentifier) GoString() string { + return s.String() +} + +// SetEvaluationResultQualifier sets the EvaluationResultQualifier field's value. +func (s *EvaluationResultIdentifier) SetEvaluationResultQualifier(v *EvaluationResultQualifier) *EvaluationResultIdentifier { + s.EvaluationResultQualifier = v + return s +} + +// SetOrderingTimestamp sets the OrderingTimestamp field's value. +func (s *EvaluationResultIdentifier) SetOrderingTimestamp(v time.Time) *EvaluationResultIdentifier { + s.OrderingTimestamp = &v + return s +} + +// Identifies an AWS Config rule that evaluated an AWS resource, and provides +// the type and ID of the resource that the rule evaluated. +type EvaluationResultQualifier struct { + _ struct{} `type:"structure"` + + // The name of the AWS Config rule that was used in the evaluation. + ConfigRuleName *string `min:"1" type:"string"` + + // The ID of the evaluated AWS resource. + ResourceId *string `min:"1" type:"string"` + + // The type of AWS resource that was evaluated. + ResourceType *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s EvaluationResultQualifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EvaluationResultQualifier) GoString() string { + return s.String() +} + +// SetConfigRuleName sets the ConfigRuleName field's value. +func (s *EvaluationResultQualifier) SetConfigRuleName(v string) *EvaluationResultQualifier { + s.ConfigRuleName = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *EvaluationResultQualifier) SetResourceId(v string) *EvaluationResultQualifier { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *EvaluationResultQualifier) SetResourceType(v string) *EvaluationResultQualifier { + s.ResourceType = &v + return s +} + +type GetAggregateComplianceDetailsByConfigRuleInput struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the source account. + // + // AccountId is a required field + AccountId *string `type:"string" required:"true"` + + // The source region from where the data is aggregated. + // + // AwsRegion is a required field + AwsRegion *string `min:"1" type:"string" required:"true"` + + // The resource compliance status. + // + // For the GetAggregateComplianceDetailsByConfigRuleRequest data type, AWS Config + // supports only the COMPLIANT and NON_COMPLIANT. AWS Config does not support + // the NOT_APPLICABLE and INSUFFICIENT_DATA values. + ComplianceType *string `type:"string" enum:"ComplianceType"` + + // The name of the AWS Config rule for which you want compliance information. + // + // ConfigRuleName is a required field + ConfigRuleName *string `min:"1" type:"string" required:"true"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // The maximum number of evaluation results returned on each page. The default + // is 50. You cannot specify a number greater than 100. If you specify 0, AWS + // Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetAggregateComplianceDetailsByConfigRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAggregateComplianceDetailsByConfigRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAggregateComplianceDetailsByConfigRuleInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AwsRegion == nil { + invalidParams.Add(request.NewErrParamRequired("AwsRegion")) + } + if s.AwsRegion != nil && len(*s.AwsRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsRegion", 1)) + } + if s.ConfigRuleName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigRuleName")) + } + if s.ConfigRuleName != nil && len(*s.ConfigRuleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigRuleName", 1)) + } + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetAccountId(v string) *GetAggregateComplianceDetailsByConfigRuleInput { + s.AccountId = &v + return s +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetAwsRegion(v string) *GetAggregateComplianceDetailsByConfigRuleInput { + s.AwsRegion = &v + return s +} + +// SetComplianceType sets the ComplianceType field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetComplianceType(v string) *GetAggregateComplianceDetailsByConfigRuleInput { + s.ComplianceType = &v + return s +} + +// SetConfigRuleName sets the ConfigRuleName field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetConfigRuleName(v string) *GetAggregateComplianceDetailsByConfigRuleInput { + s.ConfigRuleName = &v + return s +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetConfigurationAggregatorName(v string) *GetAggregateComplianceDetailsByConfigRuleInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetLimit(v int64) *GetAggregateComplianceDetailsByConfigRuleInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleInput) SetNextToken(v string) *GetAggregateComplianceDetailsByConfigRuleInput { + s.NextToken = &v + return s +} + +type GetAggregateComplianceDetailsByConfigRuleOutput struct { + _ struct{} `type:"structure"` + + // Returns an AggregateEvaluationResults object. + AggregateEvaluationResults []*AggregateEvaluationResult `type:"list"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetAggregateComplianceDetailsByConfigRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAggregateComplianceDetailsByConfigRuleOutput) GoString() string { + return s.String() +} + +// SetAggregateEvaluationResults sets the AggregateEvaluationResults field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleOutput) SetAggregateEvaluationResults(v []*AggregateEvaluationResult) *GetAggregateComplianceDetailsByConfigRuleOutput { + s.AggregateEvaluationResults = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAggregateComplianceDetailsByConfigRuleOutput) SetNextToken(v string) *GetAggregateComplianceDetailsByConfigRuleOutput { + s.NextToken = &v return s } -// Uniquely identifies an evaluation result. -type EvaluationResultIdentifier struct { +type GetAggregateConfigRuleComplianceSummaryInput struct { _ struct{} `type:"structure"` - // Identifies an AWS Config rule used to evaluate an AWS resource, and provides - // the type and ID of the evaluated resource. - EvaluationResultQualifier *EvaluationResultQualifier `type:"structure"` + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - // The time of the event that triggered the evaluation of your AWS resources. - // The time can indicate when AWS Config delivered a configuration item change - // notification, or it can indicate when AWS Config delivered the configuration - // snapshot, depending on which event triggered the evaluation. - OrderingTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + // Filters the results based on the ConfigRuleComplianceSummaryFilters object. + Filters *ConfigRuleComplianceSummaryFilters `type:"structure"` + + // Groups the result based on ACCOUNT_ID or AWS_REGION. + GroupByKey *string `type:"string" enum:"ConfigRuleComplianceSummaryGroupKey"` + + // The maximum number of evaluation results returned on each page. The default + // is 1000. You cannot specify a number greater than 1000. If you specify 0, + // AWS Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` } // String returns the string representation -func (s EvaluationResultIdentifier) String() string { +func (s GetAggregateConfigRuleComplianceSummaryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EvaluationResultIdentifier) GoString() string { +func (s GetAggregateConfigRuleComplianceSummaryInput) GoString() string { return s.String() } -// SetEvaluationResultQualifier sets the EvaluationResultQualifier field's value. -func (s *EvaluationResultIdentifier) SetEvaluationResultQualifier(v *EvaluationResultQualifier) *EvaluationResultIdentifier { - s.EvaluationResultQualifier = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAggregateConfigRuleComplianceSummaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAggregateConfigRuleComplianceSummaryInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.Filters != nil { + if err := s.Filters.Validate(); err != nil { + invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *GetAggregateConfigRuleComplianceSummaryInput) SetConfigurationAggregatorName(v string) *GetAggregateConfigRuleComplianceSummaryInput { + s.ConfigurationAggregatorName = &v return s } -// SetOrderingTimestamp sets the OrderingTimestamp field's value. -func (s *EvaluationResultIdentifier) SetOrderingTimestamp(v time.Time) *EvaluationResultIdentifier { - s.OrderingTimestamp = &v +// SetFilters sets the Filters field's value. +func (s *GetAggregateConfigRuleComplianceSummaryInput) SetFilters(v *ConfigRuleComplianceSummaryFilters) *GetAggregateConfigRuleComplianceSummaryInput { + s.Filters = v return s } -// Identifies an AWS Config rule that evaluated an AWS resource, and provides -// the type and ID of the resource that the rule evaluated. -type EvaluationResultQualifier struct { +// SetGroupByKey sets the GroupByKey field's value. +func (s *GetAggregateConfigRuleComplianceSummaryInput) SetGroupByKey(v string) *GetAggregateConfigRuleComplianceSummaryInput { + s.GroupByKey = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *GetAggregateConfigRuleComplianceSummaryInput) SetLimit(v int64) *GetAggregateConfigRuleComplianceSummaryInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAggregateConfigRuleComplianceSummaryInput) SetNextToken(v string) *GetAggregateConfigRuleComplianceSummaryInput { + s.NextToken = &v + return s +} + +type GetAggregateConfigRuleComplianceSummaryOutput struct { _ struct{} `type:"structure"` - // The name of the AWS Config rule that was used in the evaluation. - ConfigRuleName *string `min:"1" type:"string"` + // Returns a list of AggregateComplianceCounts object. + AggregateComplianceCounts []*AggregateComplianceCount `type:"list"` - // The ID of the evaluated AWS resource. - ResourceId *string `min:"1" type:"string"` + // Groups the result based on ACCOUNT_ID or AWS_REGION. + GroupByKey *string `min:"1" type:"string"` - // The type of AWS resource that was evaluated. - ResourceType *string `min:"1" type:"string"` + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` } // String returns the string representation -func (s EvaluationResultQualifier) String() string { +func (s GetAggregateConfigRuleComplianceSummaryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EvaluationResultQualifier) GoString() string { +func (s GetAggregateConfigRuleComplianceSummaryOutput) GoString() string { return s.String() } -// SetConfigRuleName sets the ConfigRuleName field's value. -func (s *EvaluationResultQualifier) SetConfigRuleName(v string) *EvaluationResultQualifier { - s.ConfigRuleName = &v +// SetAggregateComplianceCounts sets the AggregateComplianceCounts field's value. +func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetAggregateComplianceCounts(v []*AggregateComplianceCount) *GetAggregateConfigRuleComplianceSummaryOutput { + s.AggregateComplianceCounts = v return s } -// SetResourceId sets the ResourceId field's value. -func (s *EvaluationResultQualifier) SetResourceId(v string) *EvaluationResultQualifier { - s.ResourceId = &v +// SetGroupByKey sets the GroupByKey field's value. +func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetGroupByKey(v string) *GetAggregateConfigRuleComplianceSummaryOutput { + s.GroupByKey = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *EvaluationResultQualifier) SetResourceType(v string) *EvaluationResultQualifier { - s.ResourceType = &v +// SetNextToken sets the NextToken field's value. +func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetNextToken(v string) *GetAggregateConfigRuleComplianceSummaryOutput { + s.NextToken = &v return s } @@ -5297,11 +7841,11 @@ type GetComplianceDetailsByConfigRuleInput struct { ConfigRuleName *string `min:"1" type:"string" required:"true"` // The maximum number of evaluation results returned on each page. The default - // is 10. You cannot specify a limit greater than 100. If you specify 0, AWS + // is 10. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `type:"integer"` - // The NextToken string returned on a previous page that you use to get the + // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` } @@ -5398,7 +7942,7 @@ type GetComplianceDetailsByResourceInput struct { // The allowed values are COMPLIANT, NON_COMPLIANT, and NOT_APPLICABLE. ComplianceTypes []*string `type:"list"` - // The NextToken string returned on a previous page that you use to get the + // The nextToken string returned on a previous page that you use to get the // next page of results in a paginated response. NextToken *string `type:"string"` @@ -5546,9 +8090,8 @@ type GetComplianceSummaryByResourceTypeInput struct { // Specify one or more resource types to get the number of resources that are // compliant and the number that are noncompliant for each resource type. // - // For this request, you can specify an AWS resource type such as AWS::EC2::Instance, - // and you can specify that the resource type is an AWS account by specifying - // AWS::::Account. + // For this request, you can specify an AWS resource type such as AWS::EC2::Instance. + // You can specify that the resource type is an AWS account by specifying AWS::::Account. ResourceTypes []*string `type:"list"` } @@ -5597,7 +8140,7 @@ type GetDiscoveredResourceCountsInput struct { _ struct{} `type:"structure"` // The maximum number of ResourceCount objects returned on each page. The default - // is 100. You cannot specify a limit greater than 100. If you specify 0, AWS + // is 100. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `locationName:"limit" type:"integer"` @@ -5606,7 +8149,7 @@ type GetDiscoveredResourceCountsInput struct { NextToken *string `locationName:"nextToken" type:"string"` // The comma-separated list that specifies the resource types that you want - // the AWS Config to return. For example, ("AWS::EC2::Instance", "AWS::IAM::User"). + // AWS Config to return (for example, "AWS::EC2::Instance", "AWS::IAM::User"). // // If a value for resourceTypes is not specified, AWS Config returns all resource // types that AWS Config is recording in the region for your account. @@ -5668,7 +8211,7 @@ type GetDiscoveredResourceCountsOutput struct { // a total of 60 resources. // // You make a call to the GetDiscoveredResourceCounts action and specify the - // resource type, "AWS::EC2::Instances" in the request. + // resource type, "AWS::EC2::Instances", in the request. // // AWS Config returns 25 for totalDiscoveredResources. TotalDiscoveredResources *int64 `locationName:"totalDiscoveredResources" type:"long"` @@ -5706,13 +8249,13 @@ func (s *GetDiscoveredResourceCountsOutput) SetTotalDiscoveredResources(v int64) type GetResourceConfigHistoryInput struct { _ struct{} `type:"structure"` - // The chronological order for configuration items listed. By default the results + // The chronological order for configuration items listed. By default, the results // are listed in reverse chronological order. ChronologicalOrder *string `locationName:"chronologicalOrder" type:"string" enum:"ChronologicalOrder"` // The time stamp that indicates an earlier time. If not specified, the action - // returns paginated results that contain configuration items that start from - // when the first configuration item was recorded. + // returns paginated results that contain configuration items that start when + // the first configuration item was recorded. EarlierTime *time.Time `locationName:"earlierTime" type:"timestamp" timestampFormat:"unix"` // The time stamp that indicates a later time. If not specified, current time @@ -5720,7 +8263,7 @@ type GetResourceConfigHistoryInput struct { LaterTime *time.Time `locationName:"laterTime" type:"timestamp" timestampFormat:"unix"` // The maximum number of configuration items returned on each page. The default - // is 10. You cannot specify a limit greater than 100. If you specify 0, AWS + // is 10. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `locationName:"limit" type:"integer"` @@ -5849,7 +8392,7 @@ type ListDiscoveredResourcesInput struct { IncludeDeletedResources *bool `locationName:"includeDeletedResources" type:"boolean"` // The maximum number of resource identifiers returned on each page. The default - // is 100. You cannot specify a limit greater than 100. If you specify 0, AWS + // is 100. You cannot specify a number greater than 100. If you specify 0, AWS // Config uses the default. Limit *int64 `locationName:"limit" type:"integer"` @@ -5966,6 +8509,180 @@ func (s *ListDiscoveredResourcesOutput) SetResourceIdentifiers(v []*ResourceIden return s } +// This object contains regions to setup the aggregator and an IAM role to retrieve +// organization details. +type OrganizationAggregationSource struct { + _ struct{} `type:"structure"` + + // If true, aggreagate existing AWS Config regions and future regions. + AllAwsRegions *bool `type:"boolean"` + + // The source regions being aggregated. + AwsRegions []*string `min:"1" type:"list"` + + // ARN of the IAM role used to retreive AWS Organization details associated + // with the aggregator account. + // + // RoleArn is a required field + RoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s OrganizationAggregationSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrganizationAggregationSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OrganizationAggregationSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OrganizationAggregationSource"} + if s.AwsRegions != nil && len(s.AwsRegions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsRegions", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllAwsRegions sets the AllAwsRegions field's value. +func (s *OrganizationAggregationSource) SetAllAwsRegions(v bool) *OrganizationAggregationSource { + s.AllAwsRegions = &v + return s +} + +// SetAwsRegions sets the AwsRegions field's value. +func (s *OrganizationAggregationSource) SetAwsRegions(v []*string) *OrganizationAggregationSource { + s.AwsRegions = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *OrganizationAggregationSource) SetRoleArn(v string) *OrganizationAggregationSource { + s.RoleArn = &v + return s +} + +// An object that represents the account ID and region of an aggregator account +// that is requesting authorization but is not yet authorized. +type PendingAggregationRequest struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the account requesting to aggregate data. + RequesterAccountId *string `type:"string"` + + // The region requesting to aggregate data. + RequesterAwsRegion *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PendingAggregationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingAggregationRequest) GoString() string { + return s.String() +} + +// SetRequesterAccountId sets the RequesterAccountId field's value. +func (s *PendingAggregationRequest) SetRequesterAccountId(v string) *PendingAggregationRequest { + s.RequesterAccountId = &v + return s +} + +// SetRequesterAwsRegion sets the RequesterAwsRegion field's value. +func (s *PendingAggregationRequest) SetRequesterAwsRegion(v string) *PendingAggregationRequest { + s.RequesterAwsRegion = &v + return s +} + +type PutAggregationAuthorizationInput struct { + _ struct{} `type:"structure"` + + // The 12-digit account ID of the account authorized to aggregate data. + // + // AuthorizedAccountId is a required field + AuthorizedAccountId *string `type:"string" required:"true"` + + // The region authorized to collect aggregated data. + // + // AuthorizedAwsRegion is a required field + AuthorizedAwsRegion *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutAggregationAuthorizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutAggregationAuthorizationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutAggregationAuthorizationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutAggregationAuthorizationInput"} + if s.AuthorizedAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizedAccountId")) + } + if s.AuthorizedAwsRegion == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizedAwsRegion")) + } + if s.AuthorizedAwsRegion != nil && len(*s.AuthorizedAwsRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizedAwsRegion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthorizedAccountId sets the AuthorizedAccountId field's value. +func (s *PutAggregationAuthorizationInput) SetAuthorizedAccountId(v string) *PutAggregationAuthorizationInput { + s.AuthorizedAccountId = &v + return s +} + +// SetAuthorizedAwsRegion sets the AuthorizedAwsRegion field's value. +func (s *PutAggregationAuthorizationInput) SetAuthorizedAwsRegion(v string) *PutAggregationAuthorizationInput { + s.AuthorizedAwsRegion = &v + return s +} + +type PutAggregationAuthorizationOutput struct { + _ struct{} `type:"structure"` + + // Returns an AggregationAuthorization object. + AggregationAuthorization *AggregationAuthorization `type:"structure"` +} + +// String returns the string representation +func (s PutAggregationAuthorizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutAggregationAuthorizationOutput) GoString() string { + return s.String() +} + +// SetAggregationAuthorization sets the AggregationAuthorization field's value. +func (s *PutAggregationAuthorizationOutput) SetAggregationAuthorization(v *AggregationAuthorization) *PutAggregationAuthorizationOutput { + s.AggregationAuthorization = v + return s +} + type PutConfigRuleInput struct { _ struct{} `type:"structure"` @@ -6023,6 +8740,103 @@ func (s PutConfigRuleOutput) GoString() string { return s.String() } +type PutConfigurationAggregatorInput struct { + _ struct{} `type:"structure"` + + // A list of AccountAggregationSource object. + AccountAggregationSources []*AccountAggregationSource `type:"list"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // An OrganizationAggregationSource object. + OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` +} + +// String returns the string representation +func (s PutConfigurationAggregatorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutConfigurationAggregatorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutConfigurationAggregatorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutConfigurationAggregatorInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.AccountAggregationSources != nil { + for i, v := range s.AccountAggregationSources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccountAggregationSources", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OrganizationAggregationSource != nil { + if err := s.OrganizationAggregationSource.Validate(); err != nil { + invalidParams.AddNested("OrganizationAggregationSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountAggregationSources sets the AccountAggregationSources field's value. +func (s *PutConfigurationAggregatorInput) SetAccountAggregationSources(v []*AccountAggregationSource) *PutConfigurationAggregatorInput { + s.AccountAggregationSources = v + return s +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *PutConfigurationAggregatorInput) SetConfigurationAggregatorName(v string) *PutConfigurationAggregatorInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetOrganizationAggregationSource sets the OrganizationAggregationSource field's value. +func (s *PutConfigurationAggregatorInput) SetOrganizationAggregationSource(v *OrganizationAggregationSource) *PutConfigurationAggregatorInput { + s.OrganizationAggregationSource = v + return s +} + +type PutConfigurationAggregatorOutput struct { + _ struct{} `type:"structure"` + + // Returns a ConfigurationAggregator object. + ConfigurationAggregator *ConfigurationAggregator `type:"structure"` +} + +// String returns the string representation +func (s PutConfigurationAggregatorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutConfigurationAggregatorOutput) GoString() string { + return s.String() +} + +// SetConfigurationAggregator sets the ConfigurationAggregator field's value. +func (s *PutConfigurationAggregatorOutput) SetConfigurationAggregator(v *ConfigurationAggregator) *PutConfigurationAggregatorOutput { + s.ConfigurationAggregator = v + return s +} + // The input for the PutConfigurationRecorder action. type PutConfigurationRecorderInput struct { _ struct{} `type:"structure"` @@ -6087,7 +8901,7 @@ type PutDeliveryChannelInput struct { _ struct{} `type:"structure"` // The configuration delivery channel object that delivers the configuration - // information to an Amazon S3 bucket, and to an Amazon SNS topic. + // information to an Amazon S3 bucket and to an Amazon SNS topic. // // DeliveryChannel is a required field DeliveryChannel *DeliveryChannel `type:"structure" required:"true"` @@ -6150,7 +8964,7 @@ type PutEvaluationsInput struct { Evaluations []*Evaluation `type:"list"` // An encrypted token that associates an evaluation with an AWS Config rule. - // Identifies the rule and the event that triggered the evaluation + // Identifies the rule and the event that triggered the evaluation. // // ResultToken is a required field ResultToken *string `type:"string" required:"true"` @@ -6266,7 +9080,7 @@ func (s *PutEvaluationsOutput) SetFailedEvaluations(v []*Evaluation) *PutEvaluat // If you don't want AWS Config to record all resources, you can specify which // types of resources it will record with the resourceTypes parameter. // -// For a list of supported resource types, see Supported resource types (http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). +// For a list of supported resource types, see Supported Resource Types (http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). // // For more information, see Selecting Which Resources AWS Config Records (http://docs.aws.amazon.com/config/latest/developerguide/select-resources.html). type RecordingGroup struct { @@ -6276,8 +9090,7 @@ type RecordingGroup struct { // type of regional resource. // // If you set this option to true, when AWS Config adds support for a new type - // of regional resource, it automatically starts recording resources of that - // type. + // of regional resource, it starts recording resources of that type automatically. // // If you set this option to true, you cannot enumerate a list of resourceTypes. AllSupported *bool `locationName:"allSupported" type:"boolean"` @@ -6289,7 +9102,7 @@ type RecordingGroup struct { // to true. // // If you set this option to true, when AWS Config adds support for a new type - // of global resource, it automatically starts recording resources of that type. + // of global resource, it starts recording resources of that type automatically. // // The configuration details for any global resource are the same in all regions. // To prevent duplicate configuration items, you should consider customizing @@ -6398,7 +9211,7 @@ type ResourceCount struct { // The number of resources. Count *int64 `locationName:"count" type:"long"` - // The resource type, for example "AWS::EC2::Instance". + // The resource type (for example, "AWS::EC2::Instance"). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` } @@ -6432,7 +9245,7 @@ type ResourceIdentifier struct { // The time that the resource was deleted. ResourceDeletionTime *time.Time `locationName:"resourceDeletionTime" type:"timestamp" timestampFormat:"unix"` - // The ID of the resource (for example., sg-xxxxxx). + // The ID of the resource (for example, sg-xxxxxx). ResourceId *string `locationName:"resourceId" type:"string"` // The custom name of the resource (if available). @@ -6539,7 +9352,7 @@ func (s *ResourceKey) SetResourceType(v string) *ResourceKey { type Scope struct { _ struct{} `type:"structure"` - // The IDs of the only AWS resource that you want to trigger an evaluation for + // The ID of the only AWS resource that you want to trigger an evaluation for // the rule. If you specify a resource ID, you must specify one resource type // for ComplianceResourceTypes. ComplianceResourceId *string `min:"1" type:"string"` @@ -6696,8 +9509,8 @@ type SourceDetail struct { // to evaluate your AWS resources. EventSource *string `type:"string" enum:"EventSource"` - // The frequency that you want AWS Config to run evaluations for a custom rule - // with a periodic trigger. If you specify a value for MaximumExecutionFrequency, + // The frequency at which you want AWS Config to run evaluations for a custom + // rule with a periodic trigger. If you specify a value for MaximumExecutionFrequency, // then MessageType must use the ScheduledNotification value. // // By default, rules with a periodic trigger are evaluated every 24 hours. To @@ -6728,8 +9541,7 @@ type SourceDetail struct { // when AWS Config delivers a configuration snapshot. // // If you want your custom rule to be triggered by configuration changes, specify - // two SourceDetail objects, one for ConfigurationItemChangeNotification and - // one for OversizedConfigurationItemChangeNotification. + // both ConfigurationItemChangeNotification and OversizedConfigurationItemChangeNotification. MessageType *string `type:"string" enum:"MessageType"` } @@ -6764,7 +9576,7 @@ func (s *SourceDetail) SetMessageType(v string) *SourceDetail { type StartConfigRulesEvaluationInput struct { _ struct{} `type:"structure"` - // The list of names of Config rules that you want to run evaluations for. + // The list of names of AWS Config rules that you want to run evaluations for. ConfigRuleNames []*string `min:"1" type:"list"` } @@ -6797,7 +9609,7 @@ func (s *StartConfigRulesEvaluationInput) SetConfigRuleNames(v []*string) *Start return s } -// The output when you start the evaluation for the specified Config rule. +// The output when you start the evaluation for the specified AWS Config rule. type StartConfigRulesEvaluationOutput struct { _ struct{} `type:"structure"` } @@ -6926,6 +9738,25 @@ func (s StopConfigurationRecorderOutput) GoString() string { return s.String() } +const ( + // AggregatedSourceStatusTypeFailed is a AggregatedSourceStatusType enum value + AggregatedSourceStatusTypeFailed = "FAILED" + + // AggregatedSourceStatusTypeSucceeded is a AggregatedSourceStatusType enum value + AggregatedSourceStatusTypeSucceeded = "SUCCEEDED" + + // AggregatedSourceStatusTypeOutdated is a AggregatedSourceStatusType enum value + AggregatedSourceStatusTypeOutdated = "OUTDATED" +) + +const ( + // AggregatedSourceTypeAccount is a AggregatedSourceType enum value + AggregatedSourceTypeAccount = "ACCOUNT" + + // AggregatedSourceTypeOrganization is a AggregatedSourceType enum value + AggregatedSourceTypeOrganization = "ORGANIZATION" +) + const ( // ChronologicalOrderReverse is a ChronologicalOrder enum value ChronologicalOrderReverse = "Reverse" @@ -6948,6 +9779,14 @@ const ( ComplianceTypeInsufficientData = "INSUFFICIENT_DATA" ) +const ( + // ConfigRuleComplianceSummaryGroupKeyAccountId is a ConfigRuleComplianceSummaryGroupKey enum value + ConfigRuleComplianceSummaryGroupKeyAccountId = "ACCOUNT_ID" + + // ConfigRuleComplianceSummaryGroupKeyAwsRegion is a ConfigRuleComplianceSummaryGroupKey enum value + ConfigRuleComplianceSummaryGroupKeyAwsRegion = "AWS_REGION" +) + const ( // ConfigRuleStateActive is a ConfigRuleState enum value ConfigRuleStateActive = "ACTIVE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go index 39b2880e12d..853be226732 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go @@ -8,24 +8,20 @@ // get the current and historical configurations of each AWS resource and also // to get information about the relationship between the resources. An AWS resource // can be an Amazon Compute Cloud (Amazon EC2) instance, an Elastic Block Store -// (EBS) volume, an Elastic network Interface (ENI), or a security group. For +// (EBS) volume, an elastic network Interface (ENI), or a security group. For // a complete list of resources currently supported by AWS Config, see Supported // AWS Resources (http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources). // // You can access and manage AWS Config through the AWS Management Console, // the AWS Command Line Interface (AWS CLI), the AWS Config API, or the AWS -// SDKs for AWS Config -// -// This reference guide contains documentation for the AWS Config API and the -// AWS CLI commands that you can use to manage AWS Config. -// +// SDKs for AWS Config. This reference guide contains documentation for the +// AWS Config API and the AWS CLI commands that you can use to manage AWS Config. // The AWS Config API uses the Signature Version 4 protocol for signing requests. // For more information about how to sign a request with this protocol, see // Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// // For detailed information about AWS Config features and their associated actions // or commands, as well as how to work with AWS Management Console, see What -// Is AWS Config? (http://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html) +// Is AWS Config (http://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html) // in the AWS Config Developer Guide. // // See https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12 for more information on this service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go index cc1554087ec..433f766a8ed 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go @@ -43,7 +43,7 @@ const ( // ErrCodeInvalidNextTokenException for service response error code // "InvalidNextTokenException". // - // The specified next token is invalid. Specify the NextToken string that was + // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. ErrCodeInvalidNextTokenException = "InvalidNextTokenException" @@ -58,7 +58,7 @@ const ( // "InvalidRecordingGroupException". // // AWS Config throws an exception if the recording group does not contain a - // valid list of resource types. Invalid values could also be incorrectly formatted. + // valid list of resource types. Invalid values might also be incorrectly formatted. ErrCodeInvalidRecordingGroupException = "InvalidRecordingGroupException" // ErrCodeInvalidResultTokenException for service response error code @@ -111,19 +111,19 @@ const ( // // Failed to add the AWS Config rule because the account already contains the // maximum number of 50 rules. Consider deleting any deactivated rules before - // adding new rules. + // you add new rules. ErrCodeMaxNumberOfConfigRulesExceededException = "MaxNumberOfConfigRulesExceededException" // ErrCodeMaxNumberOfConfigurationRecordersExceededException for service response error code // "MaxNumberOfConfigurationRecordersExceededException". // - // You have reached the limit on the number of recorders you can create. + // You have reached the limit of the number of recorders you can create. ErrCodeMaxNumberOfConfigurationRecordersExceededException = "MaxNumberOfConfigurationRecordersExceededException" // ErrCodeMaxNumberOfDeliveryChannelsExceededException for service response error code // "MaxNumberOfDeliveryChannelsExceededException". // - // You have reached the limit on the number of delivery channels you can create. + // You have reached the limit of the number of delivery channels you can create. ErrCodeMaxNumberOfDeliveryChannelsExceededException = "MaxNumberOfDeliveryChannelsExceededException" // ErrCodeNoAvailableConfigurationRecorderException for service response error code @@ -139,6 +139,12 @@ const ( // There is no delivery channel available to record configurations. ErrCodeNoAvailableDeliveryChannelException = "NoAvailableDeliveryChannelException" + // ErrCodeNoAvailableOrganizationException for service response error code + // "NoAvailableOrganizationException". + // + // Organization does is no longer available. + ErrCodeNoAvailableOrganizationException = "NoAvailableOrganizationException" + // ErrCodeNoRunningConfigurationRecorderException for service response error code // "NoRunningConfigurationRecorderException". // @@ -158,6 +164,12 @@ const ( // rule names are correct and try again. ErrCodeNoSuchConfigRuleException = "NoSuchConfigRuleException" + // ErrCodeNoSuchConfigurationAggregatorException for service response error code + // "NoSuchConfigurationAggregatorException". + // + // You have specified a configuration aggregator that does not exist. + ErrCodeNoSuchConfigurationAggregatorException = "NoSuchConfigurationAggregatorException" + // ErrCodeNoSuchConfigurationRecorderException for service response error code // "NoSuchConfigurationRecorderException". // @@ -170,6 +182,19 @@ const ( // You have specified a delivery channel that does not exist. ErrCodeNoSuchDeliveryChannelException = "NoSuchDeliveryChannelException" + // ErrCodeOrganizationAccessDeniedException for service response error code + // "OrganizationAccessDeniedException". + // + // No permission to call the EnableAWSServiceAccess API. + ErrCodeOrganizationAccessDeniedException = "OrganizationAccessDeniedException" + + // ErrCodeOrganizationAllFeaturesNotEnabledException for service response error code + // "OrganizationAllFeaturesNotEnabledException". + // + // The configuration aggregator cannot be created because organization does + // not have all features enabled. + ErrCodeOrganizationAllFeaturesNotEnabledException = "OrganizationAllFeaturesNotEnabledException" + // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 22bb4d1aaef..64dbf708445 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -15,7 +15,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -97,7 +97,7 @@ const opCreateEndpoint = "CreateEndpoint" // CreateEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -192,7 +192,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -299,7 +299,7 @@ const opCreateReplicationInstance = "CreateReplicationInstance" // CreateReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -407,7 +407,7 @@ const opCreateReplicationSubnetGroup = "CreateReplicationSubnetGroup" // CreateReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -502,7 +502,7 @@ const opCreateReplicationTask = "CreateReplicationTask" // CreateReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -597,7 +597,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -680,7 +680,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -766,7 +766,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -849,7 +849,7 @@ const opDeleteReplicationInstance = "DeleteReplicationInstance" // DeleteReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -935,7 +935,7 @@ const opDeleteReplicationSubnetGroup = "DeleteReplicationSubnetGroup" // DeleteReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1018,7 +1018,7 @@ const opDeleteReplicationTask = "DeleteReplicationTask" // DeleteReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1101,7 +1101,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1180,7 +1180,7 @@ const opDescribeCertificates = "DescribeCertificates" // DescribeCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1315,7 +1315,7 @@ const opDescribeConnections = "DescribeConnections" // DescribeConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1451,7 +1451,7 @@ const opDescribeEndpointTypes = "DescribeEndpointTypes" // DescribeEndpointTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpointTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1581,7 +1581,7 @@ const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1716,7 +1716,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1793,7 +1793,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1933,7 +1933,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2065,7 +2065,7 @@ const opDescribeOrderableReplicationInstances = "DescribeOrderableReplicationIns // DescribeOrderableReplicationInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableReplicationInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2196,7 +2196,7 @@ const opDescribeRefreshSchemasStatus = "DescribeRefreshSchemasStatus" // DescribeRefreshSchemasStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeRefreshSchemasStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2279,7 +2279,7 @@ const opDescribeReplicationInstanceTaskLogs = "DescribeReplicationInstanceTaskLo // DescribeReplicationInstanceTaskLogsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationInstanceTaskLogs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2418,7 +2418,7 @@ const opDescribeReplicationInstances = "DescribeReplicationInstances" // DescribeReplicationInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2554,7 +2554,7 @@ const opDescribeReplicationSubnetGroups = "DescribeReplicationSubnetGroups" // DescribeReplicationSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2689,7 +2689,7 @@ const opDescribeReplicationTaskAssessmentResults = "DescribeReplicationTaskAsses // DescribeReplicationTaskAssessmentResultsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationTaskAssessmentResults operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2825,7 +2825,7 @@ const opDescribeReplicationTasks = "DescribeReplicationTasks" // DescribeReplicationTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2961,7 +2961,7 @@ const opDescribeSchemas = "DescribeSchemas" // DescribeSchemasRequest generates a "aws/request.Request" representing the // client's request for the DescribeSchemas operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3100,7 +3100,7 @@ const opDescribeTableStatistics = "DescribeTableStatistics" // DescribeTableStatisticsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTableStatistics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3244,7 +3244,7 @@ const opImportCertificate = "ImportCertificate" // ImportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3329,7 +3329,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3408,7 +3408,7 @@ const opModifyEndpoint = "ModifyEndpoint" // ModifyEndpointRequest generates a "aws/request.Request" representing the // client's request for the ModifyEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3500,7 +3500,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3588,7 +3588,7 @@ const opModifyReplicationInstance = "ModifyReplicationInstance" // ModifyReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3687,7 +3687,7 @@ const opModifyReplicationSubnetGroup = "ModifyReplicationSubnetGroup" // ModifyReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3782,7 +3782,7 @@ const opModifyReplicationTask = "ModifyReplicationTask" // ModifyReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3877,7 +3877,7 @@ const opRebootReplicationInstance = "RebootReplicationInstance" // RebootReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootReplicationInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3961,7 +3961,7 @@ const opRefreshSchemas = "RefreshSchemas" // RefreshSchemasRequest generates a "aws/request.Request" representing the // client's request for the RefreshSchemas operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4052,7 +4052,7 @@ const opReloadTables = "ReloadTables" // ReloadTablesRequest generates a "aws/request.Request" representing the // client's request for the ReloadTables operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4135,7 +4135,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4214,7 +4214,7 @@ const opStartReplicationTask = "StartReplicationTask" // StartReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the StartReplicationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4300,7 +4300,7 @@ const opStartReplicationTaskAssessment = "StartReplicationTaskAssessment" // StartReplicationTaskAssessmentRequest generates a "aws/request.Request" representing the // client's request for the StartReplicationTaskAssessment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4384,7 +4384,7 @@ const opStopReplicationTask = "StopReplicationTask" // StopReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the StopReplicationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4467,7 +4467,7 @@ const opTestConnection = "TestConnection" // TestConnectionRequest generates a "aws/request.Request" representing the // client's request for the TestConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go index 99c044f7a5c..558bb610ed8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go @@ -14,7 +14,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -132,7 +132,7 @@ const opCreateParameterGroup = "CreateParameterGroup" // CreateParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -224,7 +224,7 @@ const opCreateSubnetGroup = "CreateSubnetGroup" // CreateSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -314,7 +314,7 @@ const opDecreaseReplicationFactor = "DecreaseReplicationFactor" // DecreaseReplicationFactorRequest generates a "aws/request.Request" representing the // client's request for the DecreaseReplicationFactor operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -408,7 +408,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -499,7 +499,7 @@ const opDeleteParameterGroup = "DeleteParameterGroup" // DeleteParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -588,7 +588,7 @@ const opDeleteSubnetGroup = "DeleteSubnetGroup" // DeleteSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -672,7 +672,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -773,7 +773,7 @@ const opDescribeDefaultParameters = "DescribeDefaultParameters" // DescribeDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -855,7 +855,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -942,7 +942,7 @@ const opDescribeParameterGroups = "DescribeParameterGroups" // DescribeParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameterGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1028,7 +1028,7 @@ const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1113,7 +1113,7 @@ const opDescribeSubnetGroups = "DescribeSubnetGroups" // DescribeSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1193,7 +1193,7 @@ const opIncreaseReplicationFactor = "IncreaseReplicationFactor" // IncreaseReplicationFactorRequest generates a "aws/request.Request" representing the // client's request for the IncreaseReplicationFactor operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1294,7 +1294,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1386,7 +1386,7 @@ const opRebootNode = "RebootNode" // RebootNodeRequest generates a "aws/request.Request" representing the // client's request for the RebootNode operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1478,7 +1478,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1573,7 +1573,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1668,7 +1668,7 @@ const opUpdateCluster = "UpdateCluster" // UpdateClusterRequest generates a "aws/request.Request" representing the // client's request for the UpdateCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1764,7 +1764,7 @@ const opUpdateParameterGroup = "UpdateParameterGroup" // UpdateParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1853,7 +1853,7 @@ const opUpdateSubnetGroup = "UpdateSubnetGroup" // UpdateSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index 31a9a3328ab..aeffc22fa3e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -14,7 +14,7 @@ const opCreateDevicePool = "CreateDevicePool" // CreateDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the CreateDevicePool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -98,11 +98,100 @@ func (c *DeviceFarm) CreateDevicePoolWithContext(ctx aws.Context, input *CreateD return out, req.Send() } +const opCreateInstanceProfile = "CreateInstanceProfile" + +// CreateInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the CreateInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateInstanceProfile for more information on using the CreateInstanceProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateInstanceProfileRequest method. +// req, resp := client.CreateInstanceProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateInstanceProfile +func (c *DeviceFarm) CreateInstanceProfileRequest(input *CreateInstanceProfileInput) (req *request.Request, output *CreateInstanceProfileOutput) { + op := &request.Operation{ + Name: opCreateInstanceProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateInstanceProfileInput{} + } + + output = &CreateInstanceProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateInstanceProfile API operation for AWS Device Farm. +// +// Creates a profile that can be applied to one or more private fleet device +// instances. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation CreateInstanceProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateInstanceProfile +func (c *DeviceFarm) CreateInstanceProfile(input *CreateInstanceProfileInput) (*CreateInstanceProfileOutput, error) { + req, out := c.CreateInstanceProfileRequest(input) + return out, req.Send() +} + +// CreateInstanceProfileWithContext is the same as CreateInstanceProfile with the addition of +// the ability to pass a context and additional request options. +// +// See CreateInstanceProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) CreateInstanceProfileWithContext(ctx aws.Context, input *CreateInstanceProfileInput, opts ...request.Option) (*CreateInstanceProfileOutput, error) { + req, out := c.CreateInstanceProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateNetworkProfile = "CreateNetworkProfile" // CreateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -190,7 +279,7 @@ const opCreateProject = "CreateProject" // CreateProjectRequest generates a "aws/request.Request" representing the // client's request for the CreateProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -278,7 +367,7 @@ const opCreateRemoteAccessSession = "CreateRemoteAccessSession" // CreateRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the CreateRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -366,7 +455,7 @@ const opCreateUpload = "CreateUpload" // CreateUploadRequest generates a "aws/request.Request" representing the // client's request for the CreateUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -454,7 +543,7 @@ const opDeleteDevicePool = "DeleteDevicePool" // DeleteDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteDevicePool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -539,11 +628,99 @@ func (c *DeviceFarm) DeleteDevicePoolWithContext(ctx aws.Context, input *DeleteD return out, req.Send() } +const opDeleteInstanceProfile = "DeleteInstanceProfile" + +// DeleteInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInstanceProfile for more information on using the DeleteInstanceProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInstanceProfileRequest method. +// req, resp := client.DeleteInstanceProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteInstanceProfile +func (c *DeviceFarm) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (req *request.Request, output *DeleteInstanceProfileOutput) { + op := &request.Operation{ + Name: opDeleteInstanceProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteInstanceProfileInput{} + } + + output = &DeleteInstanceProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInstanceProfile API operation for AWS Device Farm. +// +// Deletes a profile that can be applied to one or more private device instances. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation DeleteInstanceProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteInstanceProfile +func (c *DeviceFarm) DeleteInstanceProfile(input *DeleteInstanceProfileInput) (*DeleteInstanceProfileOutput, error) { + req, out := c.DeleteInstanceProfileRequest(input) + return out, req.Send() +} + +// DeleteInstanceProfileWithContext is the same as DeleteInstanceProfile with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInstanceProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) DeleteInstanceProfileWithContext(ctx aws.Context, input *DeleteInstanceProfileInput, opts ...request.Option) (*DeleteInstanceProfileOutput, error) { + req, out := c.DeleteInstanceProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteNetworkProfile = "DeleteNetworkProfile" // DeleteNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -631,7 +808,7 @@ const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -721,7 +898,7 @@ const opDeleteRemoteAccessSession = "DeleteRemoteAccessSession" // DeleteRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the DeleteRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -809,7 +986,7 @@ const opDeleteRun = "DeleteRun" // DeleteRunRequest generates a "aws/request.Request" representing the // client's request for the DeleteRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -899,7 +1076,7 @@ const opDeleteUpload = "DeleteUpload" // DeleteUploadRequest generates a "aws/request.Request" representing the // client's request for the DeleteUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -987,7 +1164,7 @@ const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1076,7 +1253,7 @@ const opGetDevice = "GetDevice" // GetDeviceRequest generates a "aws/request.Request" representing the // client's request for the GetDevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1160,11 +1337,100 @@ func (c *DeviceFarm) GetDeviceWithContext(ctx aws.Context, input *GetDeviceInput return out, req.Send() } +const opGetDeviceInstance = "GetDeviceInstance" + +// GetDeviceInstanceRequest generates a "aws/request.Request" representing the +// client's request for the GetDeviceInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDeviceInstance for more information on using the GetDeviceInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDeviceInstanceRequest method. +// req, resp := client.GetDeviceInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceInstance +func (c *DeviceFarm) GetDeviceInstanceRequest(input *GetDeviceInstanceInput) (req *request.Request, output *GetDeviceInstanceOutput) { + op := &request.Operation{ + Name: opGetDeviceInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDeviceInstanceInput{} + } + + output = &GetDeviceInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeviceInstance API operation for AWS Device Farm. +// +// Returns information about a device instance belonging to a private device +// fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetDeviceInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetDeviceInstance +func (c *DeviceFarm) GetDeviceInstance(input *GetDeviceInstanceInput) (*GetDeviceInstanceOutput, error) { + req, out := c.GetDeviceInstanceRequest(input) + return out, req.Send() +} + +// GetDeviceInstanceWithContext is the same as GetDeviceInstance with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeviceInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetDeviceInstanceWithContext(ctx aws.Context, input *GetDeviceInstanceInput, opts ...request.Option) (*GetDeviceInstanceOutput, error) { + req, out := c.GetDeviceInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetDevicePool = "GetDevicePool" // GetDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the GetDevicePool operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1252,7 +1518,7 @@ const opGetDevicePoolCompatibility = "GetDevicePoolCompatibility" // GetDevicePoolCompatibilityRequest generates a "aws/request.Request" representing the // client's request for the GetDevicePoolCompatibility operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1336,11 +1602,99 @@ func (c *DeviceFarm) GetDevicePoolCompatibilityWithContext(ctx aws.Context, inpu return out, req.Send() } +const opGetInstanceProfile = "GetInstanceProfile" + +// GetInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the GetInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetInstanceProfile for more information on using the GetInstanceProfile +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetInstanceProfileRequest method. +// req, resp := client.GetInstanceProfileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetInstanceProfile +func (c *DeviceFarm) GetInstanceProfileRequest(input *GetInstanceProfileInput) (req *request.Request, output *GetInstanceProfileOutput) { + op := &request.Operation{ + Name: opGetInstanceProfile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetInstanceProfileInput{} + } + + output = &GetInstanceProfileOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetInstanceProfile API operation for AWS Device Farm. +// +// Returns information about the specified instance profile. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetInstanceProfile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetInstanceProfile +func (c *DeviceFarm) GetInstanceProfile(input *GetInstanceProfileInput) (*GetInstanceProfileOutput, error) { + req, out := c.GetInstanceProfileRequest(input) + return out, req.Send() +} + +// GetInstanceProfileWithContext is the same as GetInstanceProfile with the addition of +// the ability to pass a context and additional request options. +// +// See GetInstanceProfile for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetInstanceProfileWithContext(ctx aws.Context, input *GetInstanceProfileInput, opts ...request.Option) (*GetInstanceProfileOutput, error) { + req, out := c.GetInstanceProfileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1428,7 +1782,7 @@ const opGetNetworkProfile = "GetNetworkProfile" // GetNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the GetNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1516,7 +1870,7 @@ const opGetOfferingStatus = "GetOfferingStatus" // GetOfferingStatusRequest generates a "aws/request.Request" representing the // client's request for the GetOfferingStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1669,7 +2023,7 @@ const opGetProject = "GetProject" // GetProjectRequest generates a "aws/request.Request" representing the // client's request for the GetProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1757,7 +2111,7 @@ const opGetRemoteAccessSession = "GetRemoteAccessSession" // GetRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the GetRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1845,7 +2199,7 @@ const opGetRun = "GetRun" // GetRunRequest generates a "aws/request.Request" representing the // client's request for the GetRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1933,7 +2287,7 @@ const opGetSuite = "GetSuite" // GetSuiteRequest generates a "aws/request.Request" representing the // client's request for the GetSuite operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2021,7 +2375,7 @@ const opGetTest = "GetTest" // GetTestRequest generates a "aws/request.Request" representing the // client's request for the GetTest operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2109,7 +2463,7 @@ const opGetUpload = "GetUpload" // GetUploadRequest generates a "aws/request.Request" representing the // client's request for the GetUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2197,7 +2551,7 @@ const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" // InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the InstallToRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2287,7 +2641,7 @@ const opListArtifacts = "ListArtifacts" // ListArtifactsRequest generates a "aws/request.Request" representing the // client's request for the ListArtifacts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2398,40 +2752,129 @@ func (c *DeviceFarm) ListArtifactsPages(input *ListArtifactsInput, fn func(*List return c.ListArtifactsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListArtifactsPagesWithContext same as ListArtifactsPages except -// it takes a Context and allows setting request options on the pages. +// ListArtifactsPagesWithContext same as ListArtifactsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListArtifactsPagesWithContext(ctx aws.Context, input *ListArtifactsInput, fn func(*ListArtifactsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListArtifactsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListArtifactsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListArtifactsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListDeviceInstances = "ListDeviceInstances" + +// ListDeviceInstancesRequest generates a "aws/request.Request" representing the +// client's request for the ListDeviceInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDeviceInstances for more information on using the ListDeviceInstances +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDeviceInstancesRequest method. +// req, resp := client.ListDeviceInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDeviceInstances +func (c *DeviceFarm) ListDeviceInstancesRequest(input *ListDeviceInstancesInput) (req *request.Request, output *ListDeviceInstancesOutput) { + op := &request.Operation{ + Name: opListDeviceInstances, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListDeviceInstancesInput{} + } + + output = &ListDeviceInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDeviceInstances API operation for AWS Device Farm. +// +// Returns information about the private device instances associated with one +// or more AWS accounts. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation ListDeviceInstances for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListDeviceInstances +func (c *DeviceFarm) ListDeviceInstances(input *ListDeviceInstancesInput) (*ListDeviceInstancesOutput, error) { + req, out := c.ListDeviceInstancesRequest(input) + return out, req.Send() +} + +// ListDeviceInstancesWithContext is the same as ListDeviceInstances with the addition of +// the ability to pass a context and additional request options. +// +// See ListDeviceInstances for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) ListArtifactsPagesWithContext(ctx aws.Context, input *ListArtifactsInput, fn func(*ListArtifactsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListArtifactsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListArtifactsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListArtifactsOutput), !p.HasNextPage()) - } - return p.Err() +func (c *DeviceFarm) ListDeviceInstancesWithContext(ctx aws.Context, input *ListDeviceInstancesInput, opts ...request.Option) (*ListDeviceInstancesOutput, error) { + req, out := c.ListDeviceInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } const opListDevicePools = "ListDevicePools" // ListDevicePoolsRequest generates a "aws/request.Request" representing the // client's request for the ListDevicePools operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2575,7 +3018,7 @@ const opListDevices = "ListDevices" // ListDevicesRequest generates a "aws/request.Request" representing the // client's request for the ListDevices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2715,11 +3158,99 @@ func (c *DeviceFarm) ListDevicesPagesWithContext(ctx aws.Context, input *ListDev return p.Err() } +const opListInstanceProfiles = "ListInstanceProfiles" + +// ListInstanceProfilesRequest generates a "aws/request.Request" representing the +// client's request for the ListInstanceProfiles operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListInstanceProfiles for more information on using the ListInstanceProfiles +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListInstanceProfilesRequest method. +// req, resp := client.ListInstanceProfilesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListInstanceProfiles +func (c *DeviceFarm) ListInstanceProfilesRequest(input *ListInstanceProfilesInput) (req *request.Request, output *ListInstanceProfilesOutput) { + op := &request.Operation{ + Name: opListInstanceProfiles, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListInstanceProfilesInput{} + } + + output = &ListInstanceProfilesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListInstanceProfiles API operation for AWS Device Farm. +// +// Returns information about all the instance profiles in an AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation ListInstanceProfiles for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListInstanceProfiles +func (c *DeviceFarm) ListInstanceProfiles(input *ListInstanceProfilesInput) (*ListInstanceProfilesOutput, error) { + req, out := c.ListInstanceProfilesRequest(input) + return out, req.Send() +} + +// ListInstanceProfilesWithContext is the same as ListInstanceProfiles with the addition of +// the ability to pass a context and additional request options. +// +// See ListInstanceProfiles for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListInstanceProfilesWithContext(ctx aws.Context, input *ListInstanceProfilesInput, opts ...request.Option) (*ListInstanceProfilesOutput, error) { + req, out := c.ListInstanceProfilesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2863,7 +3394,7 @@ const opListNetworkProfiles = "ListNetworkProfiles" // ListNetworkProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListNetworkProfiles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2951,7 +3482,7 @@ const opListOfferingPromotions = "ListOfferingPromotions" // ListOfferingPromotionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingPromotions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3047,7 +3578,7 @@ const opListOfferingTransactions = "ListOfferingTransactions" // ListOfferingTransactionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingTransactions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3200,7 +3731,7 @@ const opListOfferings = "ListOfferings" // ListOfferingsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3353,7 +3884,7 @@ const opListProjects = "ListProjects" // ListProjectsRequest generates a "aws/request.Request" representing the // client's request for the ListProjects operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3497,7 +4028,7 @@ const opListRemoteAccessSessions = "ListRemoteAccessSessions" // ListRemoteAccessSessionsRequest generates a "aws/request.Request" representing the // client's request for the ListRemoteAccessSessions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3585,7 +4116,7 @@ const opListRuns = "ListRuns" // ListRunsRequest generates a "aws/request.Request" representing the // client's request for the ListRuns operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3729,7 +4260,7 @@ const opListSamples = "ListSamples" // ListSamplesRequest generates a "aws/request.Request" representing the // client's request for the ListSamples operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3873,7 +4404,7 @@ const opListSuites = "ListSuites" // ListSuitesRequest generates a "aws/request.Request" representing the // client's request for the ListSuites operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4017,7 +4548,7 @@ const opListTests = "ListTests" // ListTestsRequest generates a "aws/request.Request" representing the // client's request for the ListTests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4161,7 +4692,7 @@ const opListUniqueProblems = "ListUniqueProblems" // ListUniqueProblemsRequest generates a "aws/request.Request" representing the // client's request for the ListUniqueProblems operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4305,7 +4836,7 @@ const opListUploads = "ListUploads" // ListUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListUploads operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4449,7 +4980,7 @@ const opPurchaseOffering = "PurchaseOffering" // PurchaseOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseOffering operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4546,7 +5077,7 @@ const opRenewOffering = "RenewOffering" // RenewOfferingRequest generates a "aws/request.Request" representing the // client's request for the RenewOffering operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4642,7 +5173,7 @@ const opScheduleRun = "ScheduleRun" // ScheduleRunRequest generates a "aws/request.Request" representing the // client's request for the ScheduleRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4733,7 +5264,7 @@ const opStopRemoteAccessSession = "StopRemoteAccessSession" // StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the StopRemoteAccessSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4804,76 +5335,254 @@ func (c *DeviceFarm) StopRemoteAccessSession(input *StopRemoteAccessSessionInput // StopRemoteAccessSessionWithContext is the same as StopRemoteAccessSession with the addition of // the ability to pass a context and additional request options. // -// See StopRemoteAccessSession for details on how to use this API operation. +// See StopRemoteAccessSession for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) StopRemoteAccessSessionWithContext(ctx aws.Context, input *StopRemoteAccessSessionInput, opts ...request.Option) (*StopRemoteAccessSessionOutput, error) { + req, out := c.StopRemoteAccessSessionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopRun = "StopRun" + +// StopRunRequest generates a "aws/request.Request" representing the +// client's request for the StopRun operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopRun for more information on using the StopRun +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopRunRequest method. +// req, resp := client.StopRunRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun +func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, output *StopRunOutput) { + op := &request.Operation{ + Name: opStopRun, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopRunInput{} + } + + output = &StopRunOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopRun API operation for AWS Device Farm. +// +// Initiates a stop request for the current test run. AWS Device Farm will immediately +// stop the run on devices where tests have not started executing, and you will +// not be billed for these devices. On devices where tests have started executing, +// Setup Suite and Teardown Suite tests will run to completion before stopping +// execution on those devices. You will be billed for Setup, Teardown, and any +// tests that were in progress or already completed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation StopRun for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun +func (c *DeviceFarm) StopRun(input *StopRunInput) (*StopRunOutput, error) { + req, out := c.StopRunRequest(input) + return out, req.Send() +} + +// StopRunWithContext is the same as StopRun with the addition of +// the ability to pass a context and additional request options. +// +// See StopRun for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) StopRunWithContext(ctx aws.Context, input *StopRunInput, opts ...request.Option) (*StopRunOutput, error) { + req, out := c.StopRunRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDeviceInstance = "UpdateDeviceInstance" + +// UpdateDeviceInstanceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDeviceInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDeviceInstance for more information on using the UpdateDeviceInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDeviceInstanceRequest method. +// req, resp := client.UpdateDeviceInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance +func (c *DeviceFarm) UpdateDeviceInstanceRequest(input *UpdateDeviceInstanceInput) (req *request.Request, output *UpdateDeviceInstanceOutput) { + op := &request.Operation{ + Name: opUpdateDeviceInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDeviceInstanceInput{} + } + + output = &UpdateDeviceInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDeviceInstance API operation for AWS Device Farm. +// +// Updates information about an existing private device instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateDeviceInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDeviceInstance +func (c *DeviceFarm) UpdateDeviceInstance(input *UpdateDeviceInstanceInput) (*UpdateDeviceInstanceOutput, error) { + req, out := c.UpdateDeviceInstanceRequest(input) + return out, req.Send() +} + +// UpdateDeviceInstanceWithContext is the same as UpdateDeviceInstance with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDeviceInstance for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) StopRemoteAccessSessionWithContext(ctx aws.Context, input *StopRemoteAccessSessionInput, opts ...request.Option) (*StopRemoteAccessSessionOutput, error) { - req, out := c.StopRemoteAccessSessionRequest(input) +func (c *DeviceFarm) UpdateDeviceInstanceWithContext(ctx aws.Context, input *UpdateDeviceInstanceInput, opts ...request.Option) (*UpdateDeviceInstanceOutput, error) { + req, out := c.UpdateDeviceInstanceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopRun = "StopRun" +const opUpdateDevicePool = "UpdateDevicePool" -// StopRunRequest generates a "aws/request.Request" representing the -// client's request for the StopRun operation. The "output" return -// value will be populated with the request's response once the request complets +// UpdateDevicePoolRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDevicePool operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopRun for more information on using the StopRun +// See UpdateDevicePool for more information on using the UpdateDevicePool // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StopRunRequest method. -// req, resp := client.StopRunRequest(params) +// // Example sending a request using the UpdateDevicePoolRequest method. +// req, resp := client.UpdateDevicePoolRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun -func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, output *StopRunOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool +func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req *request.Request, output *UpdateDevicePoolOutput) { op := &request.Operation{ - Name: opStopRun, + Name: opUpdateDevicePool, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StopRunInput{} + input = &UpdateDevicePoolInput{} } - output = &StopRunOutput{} + output = &UpdateDevicePoolOutput{} req = c.newRequest(op, input, output) return } -// StopRun API operation for AWS Device Farm. +// UpdateDevicePool API operation for AWS Device Farm. // -// Initiates a stop request for the current test run. AWS Device Farm will immediately -// stop the run on devices where tests have not started executing, and you will -// not be billed for these devices. On devices where tests have started executing, -// Setup Suite and Teardown Suite tests will run to completion before stopping -// execution on those devices. You will be billed for Setup, Teardown, and any -// tests that were in progress or already completed. +// Modifies the name, description, and rules in a device pool given the attributes +// and the pool ARN. Rule updates are all-or-nothing, meaning they can only +// be updated as a whole (or not at all). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation StopRun for usage and error information. +// API operation UpdateDevicePool for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -4888,82 +5597,80 @@ func (c *DeviceFarm) StopRunRequest(input *StopRunInput) (req *request.Request, // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/StopRun -func (c *DeviceFarm) StopRun(input *StopRunInput) (*StopRunOutput, error) { - req, out := c.StopRunRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool +func (c *DeviceFarm) UpdateDevicePool(input *UpdateDevicePoolInput) (*UpdateDevicePoolOutput, error) { + req, out := c.UpdateDevicePoolRequest(input) return out, req.Send() } -// StopRunWithContext is the same as StopRun with the addition of +// UpdateDevicePoolWithContext is the same as UpdateDevicePool with the addition of // the ability to pass a context and additional request options. // -// See StopRun for details on how to use this API operation. +// See UpdateDevicePool for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) StopRunWithContext(ctx aws.Context, input *StopRunInput, opts ...request.Option) (*StopRunOutput, error) { - req, out := c.StopRunRequest(input) +func (c *DeviceFarm) UpdateDevicePoolWithContext(ctx aws.Context, input *UpdateDevicePoolInput, opts ...request.Option) (*UpdateDevicePoolOutput, error) { + req, out := c.UpdateDevicePoolRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateDevicePool = "UpdateDevicePool" +const opUpdateInstanceProfile = "UpdateInstanceProfile" -// UpdateDevicePoolRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDevicePool operation. The "output" return -// value will be populated with the request's response once the request complets +// UpdateInstanceProfileRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInstanceProfile operation. The "output" return +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateDevicePool for more information on using the UpdateDevicePool +// See UpdateInstanceProfile for more information on using the UpdateInstanceProfile // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateDevicePoolRequest method. -// req, resp := client.UpdateDevicePoolRequest(params) +// // Example sending a request using the UpdateInstanceProfileRequest method. +// req, resp := client.UpdateInstanceProfileRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool -func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req *request.Request, output *UpdateDevicePoolOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile +func (c *DeviceFarm) UpdateInstanceProfileRequest(input *UpdateInstanceProfileInput) (req *request.Request, output *UpdateInstanceProfileOutput) { op := &request.Operation{ - Name: opUpdateDevicePool, + Name: opUpdateInstanceProfile, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateDevicePoolInput{} + input = &UpdateInstanceProfileInput{} } - output = &UpdateDevicePoolOutput{} + output = &UpdateInstanceProfileOutput{} req = c.newRequest(op, input, output) return } -// UpdateDevicePool API operation for AWS Device Farm. +// UpdateInstanceProfile API operation for AWS Device Farm. // -// Modifies the name, description, and rules in a device pool given the attributes -// and the pool ARN. Rule updates are all-or-nothing, meaning they can only -// be updated as a whole (or not at all). +// Updates information about an existing private device instance profile. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Device Farm's -// API operation UpdateDevicePool for usage and error information. +// API operation UpdateInstanceProfile for usage and error information. // // Returned Error Codes: // * ErrCodeArgumentException "ArgumentException" @@ -4978,23 +5685,23 @@ func (c *DeviceFarm) UpdateDevicePoolRequest(input *UpdateDevicePoolInput) (req // * ErrCodeServiceAccountException "ServiceAccountException" // There was a problem with the service account. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateDevicePool -func (c *DeviceFarm) UpdateDevicePool(input *UpdateDevicePoolInput) (*UpdateDevicePoolOutput, error) { - req, out := c.UpdateDevicePoolRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateInstanceProfile +func (c *DeviceFarm) UpdateInstanceProfile(input *UpdateInstanceProfileInput) (*UpdateInstanceProfileOutput, error) { + req, out := c.UpdateInstanceProfileRequest(input) return out, req.Send() } -// UpdateDevicePoolWithContext is the same as UpdateDevicePool with the addition of +// UpdateInstanceProfileWithContext is the same as UpdateInstanceProfile with the addition of // the ability to pass a context and additional request options. // -// See UpdateDevicePool for details on how to use this API operation. +// See UpdateInstanceProfile for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DeviceFarm) UpdateDevicePoolWithContext(ctx aws.Context, input *UpdateDevicePoolInput, opts ...request.Option) (*UpdateDevicePoolOutput, error) { - req, out := c.UpdateDevicePoolRequest(input) +func (c *DeviceFarm) UpdateInstanceProfileWithContext(ctx aws.Context, input *UpdateInstanceProfileInput, opts ...request.Option) (*UpdateInstanceProfileOutput, error) { + req, out := c.UpdateInstanceProfileRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -5004,7 +5711,7 @@ const opUpdateNetworkProfile = "UpdateNetworkProfile" // UpdateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateNetworkProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5092,7 +5799,7 @@ const opUpdateProject = "UpdateProject" // UpdateProjectRequest generates a "aws/request.Request" representing the // client's request for the UpdateProject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5195,6 +5902,15 @@ type AccountSettings struct { // represents one of the IDs returned by the ListOfferings command. MaxSlots map[string]*int64 `locationName:"maxSlots" type:"map"` + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // Information about an AWS account's usage of free trial device minutes. TrialMinutes *TrialMinutes `locationName:"trialMinutes" type:"structure"` @@ -5240,6 +5956,12 @@ func (s *AccountSettings) SetMaxSlots(v map[string]*int64) *AccountSettings { return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *AccountSettings) SetSkipAppResign(v bool) *AccountSettings { + s.SkipAppResign = &v + return s +} + // SetTrialMinutes sets the TrialMinutes field's value. func (s *AccountSettings) SetTrialMinutes(v *TrialMinutes) *AccountSettings { s.TrialMinutes = v @@ -5594,6 +6316,108 @@ func (s *CreateDevicePoolOutput) SetDevicePool(v *DevicePool) *CreateDevicePoolO return s } +type CreateInstanceProfileInput struct { + _ struct{} `type:"structure"` + + // The description of your instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings specifying the list of app packages that should not be + // cleaned up from the device after a test run is over. + // + // The list of packages is only considered if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The name of your instance profile. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // When set to true, Device Farm will remove app packages after a test run. + // The default value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // When set to true, Device Farm will reboot the instance after a test run. + // The default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` +} + +// String returns the string representation +func (s CreateInstanceProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceProfileInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateInstanceProfileInput) SetDescription(v string) *CreateInstanceProfileInput { + s.Description = &v + return s +} + +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *CreateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *CreateInstanceProfileInput { + s.ExcludeAppPackagesFromCleanup = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateInstanceProfileInput) SetName(v string) *CreateInstanceProfileInput { + s.Name = &v + return s +} + +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *CreateInstanceProfileInput) SetPackageCleanup(v bool) *CreateInstanceProfileInput { + s.PackageCleanup = &v + return s +} + +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *CreateInstanceProfileInput) SetRebootAfterUse(v bool) *CreateInstanceProfileInput { + s.RebootAfterUse = &v + return s +} + +type CreateInstanceProfileOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` +} + +// String returns the string representation +func (s CreateInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceProfileOutput) GoString() string { + return s.String() +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *CreateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *CreateInstanceProfileOutput { + s.InstanceProfile = v + return s +} + type CreateNetworkProfileInput struct { _ struct{} `type:"structure"` @@ -5841,12 +6665,11 @@ func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { return s } -// Creates the configuration settings for a remote access session, including -// the device model and type. +// Configuration settings for a remote access session, including billing method. type CreateRemoteAccessSessionConfiguration struct { _ struct{} `type:"structure"` - // Returns the billing method for purposes of configuring a remote access session. + // The billing method for the remote access session. BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` } @@ -5885,6 +6708,10 @@ type CreateRemoteAccessSessionInput struct { // DeviceArn is a required field DeviceArn *string `locationName:"deviceArn" min:"32" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the device instance for which you want + // to create a remote access session. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` + // The interaction mode of the remote access session. Valid values are: // // * INTERACTIVE: You can interact with the iOS device by viewing, touching, @@ -5919,6 +6746,15 @@ type CreateRemoteAccessSessionInput struct { // Set to true to enable remote recording for the remote access session. RemoteRecordEnabled *bool `locationName:"remoteRecordEnabled" type:"boolean"` + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // 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. @@ -5944,6 +6780,9 @@ func (s *CreateRemoteAccessSessionInput) Validate() error { if s.DeviceArn != nil && len(*s.DeviceArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("DeviceArn", 32)) } + if s.InstanceArn != nil && len(*s.InstanceArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("InstanceArn", 32)) + } if s.ProjectArn == nil { invalidParams.Add(request.NewErrParamRequired("ProjectArn")) } @@ -5978,6 +6817,12 @@ func (s *CreateRemoteAccessSessionInput) SetDeviceArn(v string) *CreateRemoteAcc return s } +// SetInstanceArn sets the InstanceArn field's value. +func (s *CreateRemoteAccessSessionInput) SetInstanceArn(v string) *CreateRemoteAccessSessionInput { + s.InstanceArn = &v + return s +} + // SetInteractionMode sets the InteractionMode field's value. func (s *CreateRemoteAccessSessionInput) SetInteractionMode(v string) *CreateRemoteAccessSessionInput { s.InteractionMode = &v @@ -6014,6 +6859,12 @@ func (s *CreateRemoteAccessSessionInput) SetRemoteRecordEnabled(v bool) *CreateR return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *CreateRemoteAccessSessionInput) SetSkipAppResign(v bool) *CreateRemoteAccessSessionInput { + s.SkipAppResign = &v + return s +} + // SetSshPublicKey sets the SshPublicKey field's value. func (s *CreateRemoteAccessSessionInput) SetSshPublicKey(v string) *CreateRemoteAccessSessionInput { s.SshPublicKey = &v @@ -6299,6 +7150,62 @@ func (s DeleteDevicePoolOutput) GoString() string { return s.String() } +type DeleteInstanceProfileInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance profile you are requesting + // to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInstanceProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInstanceProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DeleteInstanceProfileInput) SetArn(v string) *DeleteInstanceProfileInput { + s.Arn = &v + return s +} + +type DeleteInstanceProfileOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInstanceProfileOutput) GoString() string { + return s.String() +} + type DeleteNetworkProfileInput struct { _ struct{} `type:"structure"` @@ -6621,6 +7528,9 @@ type Device struct { // The device's image name. Image *string `locationName:"image" type:"string"` + // The instances belonging to this device. + Instances []*DeviceInstance `locationName:"instances" type:"list"` + // The device's manufacturer name. Manufacturer *string `locationName:"manufacturer" type:"string"` @@ -6719,6 +7629,12 @@ func (s *Device) SetImage(v string) *Device { return s } +// SetInstances sets the Instances field's value. +func (s *Device) SetInstances(v []*DeviceInstance) *Device { + s.Instances = v + return s +} + // SetManufacturer sets the Manufacturer field's value. func (s *Device) SetManufacturer(v string) *Device { s.Manufacturer = &v @@ -6761,27 +7677,96 @@ func (s *Device) SetPlatform(v string) *Device { return s } -// SetRadio sets the Radio field's value. -func (s *Device) SetRadio(v string) *Device { - s.Radio = &v +// SetRadio sets the Radio field's value. +func (s *Device) SetRadio(v string) *Device { + s.Radio = &v + return s +} + +// SetRemoteAccessEnabled sets the RemoteAccessEnabled field's value. +func (s *Device) SetRemoteAccessEnabled(v bool) *Device { + s.RemoteAccessEnabled = &v + return s +} + +// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. +func (s *Device) SetRemoteDebugEnabled(v bool) *Device { + s.RemoteDebugEnabled = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *Device) SetResolution(v *Resolution) *Device { + s.Resolution = v + return s +} + +// Represents the device instance. +type DeviceInstance struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the device instance. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The Amazon Resource Name (ARN) of the device. + DeviceArn *string `locationName:"deviceArn" min:"32" type:"string"` + + // A object containing information about the instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` + + // An array of strings describing the device instance. + Labels []*string `locationName:"labels" type:"list"` + + // The status of the device instance. Valid values are listed below. + Status *string `locationName:"status" type:"string" enum:"InstanceStatus"` + + // Unique device identifier for the device instance. + Udid *string `locationName:"udid" type:"string"` +} + +// String returns the string representation +func (s DeviceInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceInstance) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DeviceInstance) SetArn(v string) *DeviceInstance { + s.Arn = &v + return s +} + +// SetDeviceArn sets the DeviceArn field's value. +func (s *DeviceInstance) SetDeviceArn(v string) *DeviceInstance { + s.DeviceArn = &v + return s +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *DeviceInstance) SetInstanceProfile(v *InstanceProfile) *DeviceInstance { + s.InstanceProfile = v return s } -// SetRemoteAccessEnabled sets the RemoteAccessEnabled field's value. -func (s *Device) SetRemoteAccessEnabled(v bool) *Device { - s.RemoteAccessEnabled = &v +// SetLabels sets the Labels field's value. +func (s *DeviceInstance) SetLabels(v []*string) *DeviceInstance { + s.Labels = v return s } -// SetRemoteDebugEnabled sets the RemoteDebugEnabled field's value. -func (s *Device) SetRemoteDebugEnabled(v bool) *Device { - s.RemoteDebugEnabled = &v +// SetStatus sets the Status field's value. +func (s *DeviceInstance) SetStatus(v string) *DeviceInstance { + s.Status = &v return s } -// SetResolution sets the Resolution field's value. -func (s *Device) SetResolution(v *Resolution) *Device { - s.Resolution = v +// SetUdid sets the Udid field's value. +func (s *DeviceInstance) SetUdid(v string) *DeviceInstance { + s.Udid = &v return s } @@ -6955,6 +7940,15 @@ type ExecutionConfiguration struct { // The number of minutes a test run will execute before it times out. JobTimeoutMinutes *int64 `locationName:"jobTimeoutMinutes" type:"integer"` + + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` } // String returns the string representation @@ -6985,6 +7979,12 @@ func (s *ExecutionConfiguration) SetJobTimeoutMinutes(v int64) *ExecutionConfigu return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *ExecutionConfiguration) SetSkipAppResign(v bool) *ExecutionConfiguration { + s.SkipAppResign = &v + return s +} + // Represents the request sent to retrieve the account settings. type GetAccountSettingsInput struct { _ struct{} `type:"structure"` @@ -7067,6 +8067,71 @@ func (s *GetDeviceInput) SetArn(v string) *GetDeviceInput { return s } +type GetDeviceInstanceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance you're requesting information + // about. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDeviceInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeviceInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeviceInstanceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetDeviceInstanceInput) SetArn(v string) *GetDeviceInstanceInput { + s.Arn = &v + return s +} + +type GetDeviceInstanceOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your device instance. + DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` +} + +// String returns the string representation +func (s GetDeviceInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeviceInstanceOutput) GoString() string { + return s.String() +} + +// SetDeviceInstance sets the DeviceInstance field's value. +func (s *GetDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *GetDeviceInstanceOutput { + s.DeviceInstance = v + return s +} + // Represents the result of a get device request. type GetDeviceOutput struct { _ struct{} `type:"structure"` @@ -7299,6 +8364,70 @@ func (s *GetDevicePoolOutput) SetDevicePool(v *DevicePool) *GetDevicePoolOutput return s } +type GetInstanceProfileInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of your instance profile. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetInstanceProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInstanceProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetInstanceProfileInput) SetArn(v string) *GetInstanceProfileInput { + s.Arn = &v + return s +} + +type GetInstanceProfileOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` +} + +// String returns the string representation +func (s GetInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetInstanceProfileOutput) GoString() string { + return s.String() +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *GetInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *GetInstanceProfileOutput { + s.InstanceProfile = v + return s +} + // Represents a request to the get job operation. type GetJobInput struct { _ struct{} `type:"structure"` @@ -8045,6 +9174,80 @@ func (s *InstallToRemoteAccessSessionOutput) SetAppUpload(v *Upload) *InstallToR return s } +// Represents the instance profile. +type InstanceProfile struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The description of the instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings specifying the list of app packages that should not be + // cleaned up from the device after a test run is over. + // + // The list of packages is only considered if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The name of the instance profile. + Name *string `locationName:"name" type:"string"` + + // When set to true, Device Farm will remove app packages after a test run. + // The default value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // When set to true, Device Farm will reboot the instance after a test run. + // The default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` +} + +// String returns the string representation +func (s InstanceProfile) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceProfile) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *InstanceProfile) SetArn(v string) *InstanceProfile { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *InstanceProfile) SetDescription(v string) *InstanceProfile { + s.Description = &v + return s +} + +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *InstanceProfile) SetExcludeAppPackagesFromCleanup(v []*string) *InstanceProfile { + s.ExcludeAppPackagesFromCleanup = v + return s +} + +// SetName sets the Name field's value. +func (s *InstanceProfile) SetName(v string) *InstanceProfile { + s.Name = &v + return s +} + +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *InstanceProfile) SetPackageCleanup(v bool) *InstanceProfile { + s.PackageCleanup = &v + return s +} + +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *InstanceProfile) SetRebootAfterUse(v bool) *InstanceProfile { + s.RebootAfterUse = &v + return s +} + // Represents a device. type Job struct { _ struct{} `type:"structure"` @@ -8064,6 +9267,9 @@ type Job struct { // Represents the total (metered or unmetered) minutes used by the job. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` + // The Amazon Resource Name (ARN) of the instance. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` + // A message about the job's result. Message *string `locationName:"message" type:"string"` @@ -8194,6 +9400,12 @@ func (s *Job) SetDeviceMinutes(v *DeviceMinutes) *Job { return s } +// SetInstanceArn sets the InstanceArn field's value. +func (s *Job) SetInstanceArn(v string) *Job { + s.InstanceArn = &v + return s +} + // SetMessage sets the Message field's value. func (s *Job) SetMessage(v string) *Job { s.Message = &v @@ -8264,30 +9476,118 @@ type ListArtifactsInput struct { } // String returns the string representation -func (s ListArtifactsInput) String() string { +func (s ListArtifactsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListArtifactsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListArtifactsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListArtifactsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *ListArtifactsInput) SetArn(v string) *ListArtifactsInput { + s.Arn = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListArtifactsInput) SetNextToken(v string) *ListArtifactsInput { + s.NextToken = &v + return s +} + +// SetType sets the Type field's value. +func (s *ListArtifactsInput) SetType(v string) *ListArtifactsInput { + s.Type = &v + return s +} + +// Represents the result of a list artifacts operation. +type ListArtifactsOutput struct { + _ struct{} `type:"structure"` + + // Information about the artifacts. + Artifacts []*Artifact `locationName:"artifacts" type:"list"` + + // If the number of items that are returned is significantly large, this is + // an identifier that is also returned, which can be used in a subsequent call + // to this operation to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListArtifactsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListArtifactsOutput) GoString() string { + return s.String() +} + +// SetArtifacts sets the Artifacts field's value. +func (s *ListArtifactsOutput) SetArtifacts(v []*Artifact) *ListArtifactsOutput { + s.Artifacts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListArtifactsOutput) SetNextToken(v string) *ListArtifactsOutput { + s.NextToken = &v + return s +} + +type ListDeviceInstancesInput struct { + _ struct{} `type:"structure"` + + // An integer specifying the maximum number of items you want to return in the + // API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListDeviceInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListArtifactsInput) GoString() string { +func (s ListDeviceInstancesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListArtifactsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListArtifactsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 32 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) - } +func (s *ListDeviceInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDeviceInstancesInput"} if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } if invalidParams.Len() > 0 { return invalidParams @@ -8295,55 +9595,47 @@ func (s *ListArtifactsInput) Validate() error { return nil } -// SetArn sets the Arn field's value. -func (s *ListArtifactsInput) SetArn(v string) *ListArtifactsInput { - s.Arn = &v +// SetMaxResults sets the MaxResults field's value. +func (s *ListDeviceInstancesInput) SetMaxResults(v int64) *ListDeviceInstancesInput { + s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *ListArtifactsInput) SetNextToken(v string) *ListArtifactsInput { +func (s *ListDeviceInstancesInput) SetNextToken(v string) *ListDeviceInstancesInput { s.NextToken = &v return s } -// SetType sets the Type field's value. -func (s *ListArtifactsInput) SetType(v string) *ListArtifactsInput { - s.Type = &v - return s -} - -// Represents the result of a list artifacts operation. -type ListArtifactsOutput struct { +type ListDeviceInstancesOutput struct { _ struct{} `type:"structure"` - // Information about the artifacts. - Artifacts []*Artifact `locationName:"artifacts" type:"list"` + // An object containing information about your device instances. + DeviceInstances []*DeviceInstance `locationName:"deviceInstances" type:"list"` - // If the number of items that are returned is significantly large, this is - // an identifier that is also returned, which can be used in a subsequent call - // to this operation to return the next set of items in the list. + // An identifier that can be used in the next call to this operation to return + // the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` } // String returns the string representation -func (s ListArtifactsOutput) String() string { +func (s ListDeviceInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListArtifactsOutput) GoString() string { +func (s ListDeviceInstancesOutput) GoString() string { return s.String() } -// SetArtifacts sets the Artifacts field's value. -func (s *ListArtifactsOutput) SetArtifacts(v []*Artifact) *ListArtifactsOutput { - s.Artifacts = v +// SetDeviceInstances sets the DeviceInstances field's value. +func (s *ListDeviceInstancesOutput) SetDeviceInstances(v []*DeviceInstance) *ListDeviceInstancesOutput { + s.DeviceInstances = v return s } // SetNextToken sets the NextToken field's value. -func (s *ListArtifactsOutput) SetNextToken(v string) *ListArtifactsOutput { +func (s *ListDeviceInstancesOutput) SetNextToken(v string) *ListDeviceInstancesOutput { s.NextToken = &v return s } @@ -8539,6 +9831,86 @@ func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { return s } +type ListInstanceProfilesInput struct { + _ struct{} `type:"structure"` + + // An integer specifying the maximum number of items you want to return in the + // API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListInstanceProfilesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInstanceProfilesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInstanceProfilesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListInstanceProfilesInput) SetMaxResults(v int64) *ListInstanceProfilesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInstanceProfilesInput) SetNextToken(v string) *ListInstanceProfilesInput { + s.NextToken = &v + return s +} + +type ListInstanceProfilesOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your instance profiles. + InstanceProfiles []*InstanceProfile `locationName:"instanceProfiles" type:"list"` + + // An identifier that can be used in the next call to this operation to return + // the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListInstanceProfilesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInstanceProfilesOutput) GoString() string { + return s.String() +} + +// SetInstanceProfiles sets the InstanceProfiles field's value. +func (s *ListInstanceProfilesOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesOutput { + s.InstanceProfiles = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInstanceProfilesOutput) SetNextToken(v string) *ListInstanceProfilesOutput { + s.NextToken = &v + return s +} + // Represents a request to the list jobs operation. type ListJobsInput struct { _ struct{} `type:"structure"` @@ -10484,6 +11856,9 @@ type RemoteAccessSession struct { // Only returned if remote debugging is enabled for the remote access session. HostAddress *string `locationName:"hostAddress" type:"string"` + // The Amazon Resource Name (ARN) of the instance. + InstanceArn *string `locationName:"instanceArn" min:"32" type:"string"` + // The interaction mode of the remote access session. Valid values are: // // * INTERACTIVE: You can interact with the iOS device by viewing, touching, @@ -10533,6 +11908,15 @@ type RemoteAccessSession struct { // * STOPPED: A stopped condition. Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // The date and time the remote access session was started. Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` @@ -10625,6 +12009,12 @@ func (s *RemoteAccessSession) SetHostAddress(v string) *RemoteAccessSession { return s } +// SetInstanceArn sets the InstanceArn field's value. +func (s *RemoteAccessSession) SetInstanceArn(v string) *RemoteAccessSession { + s.InstanceArn = &v + return s +} + // SetInteractionMode sets the InteractionMode field's value. func (s *RemoteAccessSession) SetInteractionMode(v string) *RemoteAccessSession { s.InteractionMode = &v @@ -10667,6 +12057,12 @@ func (s *RemoteAccessSession) SetResult(v string) *RemoteAccessSession { return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *RemoteAccessSession) SetSkipAppResign(v bool) *RemoteAccessSession { + s.SkipAppResign = &v + return s +} + // SetStarted sets the Started field's value. func (s *RemoteAccessSession) SetStarted(v time.Time) *RemoteAccessSession { s.Started = &v @@ -10808,6 +12204,10 @@ type Rule struct { // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. // // * APPIUM_VERSION: The Appium version for the test. + // + // * INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. + // + // * INSTANCE_LABELS: The label of the device instance. Attribute *string `locationName:"attribute" type:"string" enum:"DeviceAttribute"` // The rule's operator. @@ -10956,6 +12356,15 @@ type Run struct { // the same seed value between tests ensures identical event sequences. Seed *int64 `locationName:"seed" type:"integer"` + // When set to true, for private devices, Device Farm will not sign your app + // again. For public devices, Device Farm always signs your apps again and this + // parameter has no effect. + // + // For more information about how Device Farm re-signs your app(s), see Do you + // modify my app? (https://aws.amazon.com/device-farm/faq/) in the AWS Device + // Farm FAQs. + SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` + // The run's start time. Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` @@ -11023,8 +12432,7 @@ 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. + // The Device Farm console URL for the recording of the run. WebUrl *string `locationName:"webUrl" type:"string"` } @@ -11170,6 +12578,12 @@ func (s *Run) SetSeed(v int64) *Run { return s } +// SetSkipAppResign sets the SkipAppResign field's value. +func (s *Run) SetSkipAppResign(v bool) *Run { + s.SkipAppResign = &v + return s +} + // SetStarted sets the Started field's value. func (s *Run) SetStarted(v time.Time) *Run { s.Started = &v @@ -12287,6 +13701,92 @@ func (s *UniqueProblem) SetProblems(v []*Problem) *UniqueProblem { return s } +type UpdateDeviceInstanceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the device instance. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // An array of strings that you want to associate with the device instance. + Labels []*string `locationName:"labels" type:"list"` + + // The Amazon Resource Name (ARN) of the profile that you want to associate + // with the device instance. + ProfileArn *string `locationName:"profileArn" min:"32" type:"string"` +} + +// String returns the string representation +func (s UpdateDeviceInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeviceInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDeviceInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDeviceInstanceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + if s.ProfileArn != nil && len(*s.ProfileArn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ProfileArn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateDeviceInstanceInput) SetArn(v string) *UpdateDeviceInstanceInput { + s.Arn = &v + return s +} + +// SetLabels sets the Labels field's value. +func (s *UpdateDeviceInstanceInput) SetLabels(v []*string) *UpdateDeviceInstanceInput { + s.Labels = v + return s +} + +// SetProfileArn sets the ProfileArn field's value. +func (s *UpdateDeviceInstanceInput) SetProfileArn(v string) *UpdateDeviceInstanceInput { + s.ProfileArn = &v + return s +} + +type UpdateDeviceInstanceOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your device instance. + DeviceInstance *DeviceInstance `locationName:"deviceInstance" type:"structure"` +} + +// String returns the string representation +func (s UpdateDeviceInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeviceInstanceOutput) GoString() string { + return s.String() +} + +// SetDeviceInstance sets the DeviceInstance field's value. +func (s *UpdateDeviceInstanceOutput) SetDeviceInstance(v *DeviceInstance) *UpdateDeviceInstanceOutput { + s.DeviceInstance = v + return s +} + // Represents a request to the update device pool operation. type UpdateDevicePoolInput struct { _ struct{} `type:"structure"` @@ -12383,6 +13883,120 @@ func (s *UpdateDevicePoolOutput) SetDevicePool(v *DevicePool) *UpdateDevicePoolO return s } +type UpdateInstanceProfileInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance profile. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // The updated description for your instance profile. + Description *string `locationName:"description" type:"string"` + + // An array of strings specifying the list of app packages that should not be + // cleaned up from the device after a test run is over. + // + // The list of packages is only considered if you set packageCleanup to true. + ExcludeAppPackagesFromCleanup []*string `locationName:"excludeAppPackagesFromCleanup" type:"list"` + + // The updated name for your instance profile. + Name *string `locationName:"name" type:"string"` + + // The updated choice for whether you want to specify package cleanup. The default + // value is false for private devices. + PackageCleanup *bool `locationName:"packageCleanup" type:"boolean"` + + // The updated choice for whether you want to reboot the device after use. The + // default value is true. + RebootAfterUse *bool `locationName:"rebootAfterUse" type:"boolean"` +} + +// String returns the string representation +func (s UpdateInstanceProfileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInstanceProfileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceProfileInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateInstanceProfileInput) SetArn(v string) *UpdateInstanceProfileInput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateInstanceProfileInput) SetDescription(v string) *UpdateInstanceProfileInput { + s.Description = &v + return s +} + +// SetExcludeAppPackagesFromCleanup sets the ExcludeAppPackagesFromCleanup field's value. +func (s *UpdateInstanceProfileInput) SetExcludeAppPackagesFromCleanup(v []*string) *UpdateInstanceProfileInput { + s.ExcludeAppPackagesFromCleanup = v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateInstanceProfileInput) SetName(v string) *UpdateInstanceProfileInput { + s.Name = &v + return s +} + +// SetPackageCleanup sets the PackageCleanup field's value. +func (s *UpdateInstanceProfileInput) SetPackageCleanup(v bool) *UpdateInstanceProfileInput { + s.PackageCleanup = &v + return s +} + +// SetRebootAfterUse sets the RebootAfterUse field's value. +func (s *UpdateInstanceProfileInput) SetRebootAfterUse(v bool) *UpdateInstanceProfileInput { + s.RebootAfterUse = &v + return s +} + +type UpdateInstanceProfileOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your instance profile. + InstanceProfile *InstanceProfile `locationName:"instanceProfile" type:"structure"` +} + +// String returns the string representation +func (s UpdateInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInstanceProfileOutput) GoString() string { + return s.String() +} + +// SetInstanceProfile sets the InstanceProfile field's value. +func (s *UpdateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *UpdateInstanceProfileOutput { + s.InstanceProfile = v + return s +} + type UpdateNetworkProfileInput struct { _ struct{} `type:"structure"` @@ -12911,6 +14525,12 @@ const ( // DeviceAttributeAppiumVersion is a DeviceAttribute enum value DeviceAttributeAppiumVersion = "APPIUM_VERSION" + + // DeviceAttributeInstanceArn is a DeviceAttribute enum value + DeviceAttributeInstanceArn = "INSTANCE_ARN" + + // DeviceAttributeInstanceLabels is a DeviceAttribute enum value + DeviceAttributeInstanceLabels = "INSTANCE_LABELS" ) const ( @@ -12994,6 +14614,20 @@ const ( ExecutionStatusStopping = "STOPPING" ) +const ( + // InstanceStatusInUse is a InstanceStatus enum value + InstanceStatusInUse = "IN_USE" + + // InstanceStatusPreparing is a InstanceStatus enum value + InstanceStatusPreparing = "PREPARING" + + // InstanceStatusAvailable is a InstanceStatus enum value + InstanceStatusAvailable = "AVAILABLE" + + // InstanceStatusNotAvailable is a InstanceStatus enum value + InstanceStatusNotAvailable = "NOT_AVAILABLE" +) + const ( // InteractionModeInteractive is a InteractionMode enum value InteractionModeInteractive = "INTERACTIVE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go index a4843870857..6ad8c8e3024 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go @@ -15,7 +15,7 @@ const opAllocateConnectionOnInterconnect = "AllocateConnectionOnInterconnect" // AllocateConnectionOnInterconnectRequest generates a "aws/request.Request" representing the // client's request for the AllocateConnectionOnInterconnect operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -109,7 +109,7 @@ const opAllocateHostedConnection = "AllocateHostedConnection" // AllocateHostedConnectionRequest generates a "aws/request.Request" representing the // client's request for the AllocateHostedConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -199,7 +199,7 @@ const opAllocatePrivateVirtualInterface = "AllocatePrivateVirtualInterface" // AllocatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AllocatePrivateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -288,7 +288,7 @@ const opAllocatePublicVirtualInterface = "AllocatePublicVirtualInterface" // AllocatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AllocatePublicVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -384,7 +384,7 @@ const opAssociateConnectionWithLag = "AssociateConnectionWithLag" // AssociateConnectionWithLagRequest generates a "aws/request.Request" representing the // client's request for the AssociateConnectionWithLag operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -484,7 +484,7 @@ const opAssociateHostedConnection = "AssociateHostedConnection" // AssociateHostedConnectionRequest generates a "aws/request.Request" representing the // client's request for the AssociateHostedConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -574,7 +574,7 @@ const opAssociateVirtualInterface = "AssociateVirtualInterface" // AssociateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AssociateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -672,7 +672,7 @@ const opConfirmConnection = "ConfirmConnection" // ConfirmConnectionRequest generates a "aws/request.Request" representing the // client's request for the ConfirmConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -760,7 +760,7 @@ const opConfirmPrivateVirtualInterface = "ConfirmPrivateVirtualInterface" // ConfirmPrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmPrivateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -848,7 +848,7 @@ const opConfirmPublicVirtualInterface = "ConfirmPublicVirtualInterface" // ConfirmPublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmPublicVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -935,7 +935,7 @@ const opCreateBGPPeer = "CreateBGPPeer" // CreateBGPPeerRequest generates a "aws/request.Request" representing the // client's request for the CreateBGPPeer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1031,7 +1031,7 @@ const opCreateConnection = "CreateConnection" // CreateConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1132,7 +1132,7 @@ const opCreateDirectConnectGateway = "CreateDirectConnectGateway" // CreateDirectConnectGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectConnectGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1223,7 +1223,7 @@ const opCreateDirectConnectGatewayAssociation = "CreateDirectConnectGatewayAssoc // CreateDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectConnectGatewayAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1309,7 +1309,7 @@ const opCreateInterconnect = "CreateInterconnect" // CreateInterconnectRequest generates a "aws/request.Request" representing the // client's request for the CreateInterconnect operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1416,7 +1416,7 @@ const opCreateLag = "CreateLag" // CreateLagRequest generates a "aws/request.Request" representing the // client's request for the CreateLag operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1524,7 +1524,7 @@ const opCreatePrivateVirtualInterface = "CreatePrivateVirtualInterface" // CreatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePrivateVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1610,7 +1610,7 @@ const opCreatePublicVirtualInterface = "CreatePublicVirtualInterface" // CreatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1701,7 +1701,7 @@ const opDeleteBGPPeer = "DeleteBGPPeer" // DeleteBGPPeerRequest generates a "aws/request.Request" representing the // client's request for the DeleteBGPPeer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1787,7 +1787,7 @@ const opDeleteConnection = "DeleteConnection" // DeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1876,7 +1876,7 @@ const opDeleteDirectConnectGateway = "DeleteDirectConnectGateway" // DeleteDirectConnectGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectConnectGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1962,7 +1962,7 @@ const opDeleteDirectConnectGatewayAssociation = "DeleteDirectConnectGatewayAssoc // DeleteDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectConnectGatewayAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2047,7 +2047,7 @@ const opDeleteInterconnect = "DeleteInterconnect" // DeleteInterconnectRequest generates a "aws/request.Request" representing the // client's request for the DeleteInterconnect operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2133,7 +2133,7 @@ const opDeleteLag = "DeleteLag" // DeleteLagRequest generates a "aws/request.Request" representing the // client's request for the DeleteLag operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2218,7 +2218,7 @@ const opDeleteVirtualInterface = "DeleteVirtualInterface" // DeleteVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteVirtualInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2302,7 +2302,7 @@ const opDescribeConnectionLoa = "DescribeConnectionLoa" // DescribeConnectionLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnectionLoa operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2397,7 +2397,7 @@ const opDescribeConnections = "DescribeConnections" // DescribeConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2483,7 +2483,7 @@ const opDescribeConnectionsOnInterconnect = "DescribeConnectionsOnInterconnect" // DescribeConnectionsOnInterconnectRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnectionsOnInterconnect operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2574,7 +2574,7 @@ const opDescribeDirectConnectGatewayAssociations = "DescribeDirectConnectGateway // DescribeDirectConnectGatewayAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGatewayAssociations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2664,7 +2664,7 @@ const opDescribeDirectConnectGatewayAttachments = "DescribeDirectConnectGatewayA // DescribeDirectConnectGatewayAttachmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGatewayAttachments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2754,7 +2754,7 @@ const opDescribeDirectConnectGateways = "DescribeDirectConnectGateways" // DescribeDirectConnectGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGateways operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2842,7 +2842,7 @@ const opDescribeHostedConnections = "DescribeHostedConnections" // DescribeHostedConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostedConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2929,7 +2929,7 @@ const opDescribeInterconnectLoa = "DescribeInterconnectLoa" // DescribeInterconnectLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeInterconnectLoa operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3024,7 +3024,7 @@ const opDescribeInterconnects = "DescribeInterconnects" // DescribeInterconnectsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInterconnects operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3110,7 +3110,7 @@ const opDescribeLags = "DescribeLags" // DescribeLagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3196,7 +3196,7 @@ const opDescribeLoa = "DescribeLoa" // DescribeLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoa operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3287,7 +3287,7 @@ const opDescribeLocations = "DescribeLocations" // DescribeLocationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLocations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3373,7 +3373,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3457,7 +3457,7 @@ const opDescribeVirtualGateways = "DescribeVirtualGateways" // DescribeVirtualGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeVirtualGateways operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3547,7 +3547,7 @@ const opDescribeVirtualInterfaces = "DescribeVirtualInterfaces" // DescribeVirtualInterfacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVirtualInterfaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3638,7 +3638,7 @@ const opDisassociateConnectionFromLag = "DisassociateConnectionFromLag" // DisassociateConnectionFromLagRequest generates a "aws/request.Request" representing the // client's request for the DisassociateConnectionFromLag operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3732,7 +3732,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3828,7 +3828,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3912,7 +3912,7 @@ const opUpdateLag = "UpdateLag" // UpdateLagRequest generates a "aws/request.Request" representing the // client's request for the UpdateLag operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go index 9040732ca3d..fc367414685 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go @@ -15,7 +15,7 @@ const opAddIpRoutes = "AddIpRoutes" // AddIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the AddIpRoutes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -122,7 +122,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -215,7 +215,7 @@ const opCancelSchemaExtension = "CancelSchemaExtension" // CancelSchemaExtensionRequest generates a "aws/request.Request" representing the // client's request for the CancelSchemaExtension operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -303,7 +303,7 @@ const opConnectDirectory = "ConnectDirectory" // ConnectDirectoryRequest generates a "aws/request.Request" representing the // client's request for the ConnectDirectory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -398,7 +398,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -494,7 +494,7 @@ const opCreateComputer = "CreateComputer" // CreateComputerRequest generates a "aws/request.Request" representing the // client's request for the CreateComputer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -595,7 +595,7 @@ const opCreateConditionalForwarder = "CreateConditionalForwarder" // CreateConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the CreateConditionalForwarder operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -694,7 +694,7 @@ const opCreateDirectory = "CreateDirectory" // CreateDirectoryRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -789,7 +789,7 @@ const opCreateMicrosoftAD = "CreateMicrosoftAD" // CreateMicrosoftADRequest generates a "aws/request.Request" representing the // client's request for the CreateMicrosoftAD operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -887,7 +887,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -982,7 +982,7 @@ const opCreateTrust = "CreateTrust" // CreateTrustRequest generates a "aws/request.Request" representing the // client's request for the CreateTrust operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1083,7 +1083,7 @@ const opDeleteConditionalForwarder = "DeleteConditionalForwarder" // DeleteConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the DeleteConditionalForwarder operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1177,7 +1177,7 @@ const opDeleteDirectory = "DeleteDirectory" // DeleteDirectoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1267,7 +1267,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1355,7 +1355,7 @@ const opDeleteTrust = "DeleteTrust" // DeleteTrustRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrust operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1447,7 +1447,7 @@ const opDeregisterEventTopic = "DeregisterEventTopic" // DeregisterEventTopicRequest generates a "aws/request.Request" representing the // client's request for the DeregisterEventTopic operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1535,7 +1535,7 @@ const opDescribeConditionalForwarders = "DescribeConditionalForwarders" // DescribeConditionalForwardersRequest generates a "aws/request.Request" representing the // client's request for the DescribeConditionalForwarders operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1632,7 +1632,7 @@ const opDescribeDirectories = "DescribeDirectories" // DescribeDirectoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1734,7 +1734,7 @@ const opDescribeDomainControllers = "DescribeDomainControllers" // DescribeDomainControllersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomainControllers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1884,7 +1884,7 @@ const opDescribeEventTopics = "DescribeEventTopics" // DescribeEventTopicsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventTopics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1976,7 +1976,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2074,7 +2074,7 @@ const opDescribeTrusts = "DescribeTrusts" // DescribeTrustsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTrusts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2171,7 +2171,7 @@ const opDisableRadius = "DisableRadius" // DisableRadiusRequest generates a "aws/request.Request" representing the // client's request for the DisableRadius operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2257,7 +2257,7 @@ const opDisableSso = "DisableSso" // DisableSsoRequest generates a "aws/request.Request" representing the // client's request for the DisableSso operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2348,7 +2348,7 @@ const opEnableRadius = "EnableRadius" // EnableRadiusRequest generates a "aws/request.Request" representing the // client's request for the EnableRadius operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2440,7 +2440,7 @@ const opEnableSso = "EnableSso" // EnableSsoRequest generates a "aws/request.Request" representing the // client's request for the EnableSso operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2531,7 +2531,7 @@ const opGetDirectoryLimits = "GetDirectoryLimits" // GetDirectoryLimitsRequest generates a "aws/request.Request" representing the // client's request for the GetDirectoryLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2616,7 +2616,7 @@ const opGetSnapshotLimits = "GetSnapshotLimits" // GetSnapshotLimitsRequest generates a "aws/request.Request" representing the // client's request for the GetSnapshotLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2701,7 +2701,7 @@ const opListIpRoutes = "ListIpRoutes" // ListIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the ListIpRoutes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2792,7 +2792,7 @@ const opListSchemaExtensions = "ListSchemaExtensions" // ListSchemaExtensionsRequest generates a "aws/request.Request" representing the // client's request for the ListSchemaExtensions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2880,7 +2880,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2971,7 +2971,7 @@ const opRegisterEventTopic = "RegisterEventTopic" // RegisterEventTopicRequest generates a "aws/request.Request" representing the // client's request for the RegisterEventTopic operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3064,7 +3064,7 @@ const opRemoveIpRoutes = "RemoveIpRoutes" // RemoveIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the RemoveIpRoutes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3155,7 +3155,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3243,7 +3243,7 @@ const opRestoreFromSnapshot = "RestoreFromSnapshot" // RestoreFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3339,7 +3339,7 @@ const opStartSchemaExtension = "StartSchemaExtension" // StartSchemaExtensionRequest generates a "aws/request.Request" representing the // client's request for the StartSchemaExtension operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3435,7 +3435,7 @@ const opUpdateConditionalForwarder = "UpdateConditionalForwarder" // UpdateConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the UpdateConditionalForwarder operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3529,7 +3529,7 @@ const opUpdateNumberOfDomainControllers = "UpdateNumberOfDomainControllers" // UpdateNumberOfDomainControllersRequest generates a "aws/request.Request" representing the // client's request for the UpdateNumberOfDomainControllers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3632,7 +3632,7 @@ const opUpdateRadius = "UpdateRadius" // UpdateRadiusRequest generates a "aws/request.Request" representing the // client's request for the UpdateRadius operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3721,7 +3721,7 @@ const opVerifyTrust = "VerifyTrust" // VerifyTrustRequest generates a "aws/request.Request" representing the // client's request for the VerifyTrust operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index bbb151259a1..fb9dc14927a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -17,7 +17,7 @@ const opBatchGetItem = "BatchGetItem" // BatchGetItemRequest generates a "aws/request.Request" representing the // client's request for the BatchGetItem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -212,7 +212,7 @@ const opBatchWriteItem = "BatchWriteItem" // BatchWriteItemRequest generates a "aws/request.Request" representing the // client's request for the BatchWriteItem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -378,7 +378,7 @@ const opCreateBackup = "CreateBackup" // CreateBackupRequest generates a "aws/request.Request" representing the // client's request for the CreateBackup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -514,7 +514,7 @@ const opCreateGlobalTable = "CreateGlobalTable" // CreateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the CreateGlobalTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -627,7 +627,7 @@ const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the // client's request for the CreateTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -739,7 +739,7 @@ const opDeleteBackup = "DeleteBackup" // DeleteBackupRequest generates a "aws/request.Request" representing the // client's request for the DeleteBackup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -841,7 +841,7 @@ const opDeleteItem = "DeleteItem" // DeleteItemRequest generates a "aws/request.Request" representing the // client's request for the DeleteItem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -952,7 +952,7 @@ const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1071,7 +1071,7 @@ const opDescribeBackup = "DescribeBackup" // DescribeBackupRequest generates a "aws/request.Request" representing the // client's request for the DescribeBackup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1155,7 +1155,7 @@ const opDescribeContinuousBackups = "DescribeContinuousBackups" // DescribeContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeContinuousBackups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1251,7 +1251,7 @@ const opDescribeGlobalTable = "DescribeGlobalTable" // DescribeGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeGlobalTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1333,7 +1333,7 @@ const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1468,7 +1468,7 @@ const opDescribeTable = "DescribeTable" // DescribeTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1559,7 +1559,7 @@ const opDescribeTimeToLive = "DescribeTimeToLive" // DescribeTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the DescribeTimeToLive operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1642,7 +1642,7 @@ const opGetItem = "GetItem" // GetItemRequest generates a "aws/request.Request" representing the // client's request for the GetItem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1740,7 +1740,7 @@ const opListBackups = "ListBackups" // ListBackupsRequest generates a "aws/request.Request" representing the // client's request for the ListBackups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1827,7 +1827,7 @@ const opListGlobalTables = "ListGlobalTables" // ListGlobalTablesRequest generates a "aws/request.Request" representing the // client's request for the ListGlobalTables operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1906,7 +1906,7 @@ const opListTables = "ListTables" // ListTablesRequest generates a "aws/request.Request" representing the // client's request for the ListTables operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2043,7 +2043,7 @@ const opListTagsOfResource = "ListTagsOfResource" // ListTagsOfResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsOfResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2130,7 +2130,7 @@ const opPutItem = "PutItem" // PutItemRequest generates a "aws/request.Request" representing the // client's request for the PutItem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2271,7 +2271,7 @@ const opQuery = "Query" // QueryRequest generates a "aws/request.Request" representing the // client's request for the Query operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2465,7 +2465,7 @@ const opRestoreTableFromBackup = "RestoreTableFromBackup" // RestoreTableFromBackupRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableFromBackup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2588,7 +2588,7 @@ const opRestoreTableToPointInTime = "RestoreTableToPointInTime" // RestoreTableToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableToPointInTime operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2718,7 +2718,7 @@ const opScan = "Scan" // ScanRequest generates a "aws/request.Request" representing the // client's request for the Scan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2892,7 +2892,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3002,7 +3002,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3110,7 +3110,7 @@ const opUpdateContinuousBackups = "UpdateContinuousBackups" // UpdateContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the UpdateContinuousBackups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3207,7 +3207,7 @@ const opUpdateGlobalTable = "UpdateGlobalTable" // UpdateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateGlobalTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3306,7 +3306,7 @@ const opUpdateItem = "UpdateItem" // UpdateItemRequest generates a "aws/request.Request" representing the // client's request for the UpdateItem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3411,7 +3411,7 @@ const opUpdateTable = "UpdateTable" // UpdateTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3530,7 +3530,7 @@ const opUpdateTimeToLive = "UpdateTimeToLive" // UpdateTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the UpdateTimeToLive operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 3fe0cf0ca79..28f434bbfff 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -17,7 +17,7 @@ const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQ // AcceptReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the // client's request for the AcceptReservedInstancesExchangeQuote operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -92,7 +92,7 @@ const opAcceptVpcEndpointConnections = "AcceptVpcEndpointConnections" // AcceptVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the AcceptVpcEndpointConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -167,7 +167,7 @@ const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection" // AcceptVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the AcceptVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -247,7 +247,7 @@ const opAllocateAddress = "AllocateAddress" // AllocateAddressRequest generates a "aws/request.Request" representing the // client's request for the AllocateAddress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -333,7 +333,7 @@ const opAllocateHosts = "AllocateHosts" // AllocateHostsRequest generates a "aws/request.Request" representing the // client's request for the AllocateHosts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -409,7 +409,7 @@ const opAssignIpv6Addresses = "AssignIpv6Addresses" // AssignIpv6AddressesRequest generates a "aws/request.Request" representing the // client's request for the AssignIpv6Addresses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -490,7 +490,7 @@ const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses" // AssignPrivateIpAddressesRequest generates a "aws/request.Request" representing the // client's request for the AssignPrivateIpAddresses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -576,7 +576,7 @@ const opAssociateAddress = "AssociateAddress" // AssociateAddressRequest generates a "aws/request.Request" representing the // client's request for the AssociateAddress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -673,7 +673,7 @@ const opAssociateDhcpOptions = "AssociateDhcpOptions" // AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the AssociateDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -760,7 +760,7 @@ const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile" // AssociateIamInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the AssociateIamInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -835,7 +835,7 @@ const opAssociateRouteTable = "AssociateRouteTable" // AssociateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the AssociateRouteTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -916,7 +916,7 @@ const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock" // AssociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the AssociateSubnetCidrBlock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -992,7 +992,7 @@ const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock" // AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the AssociateVpcCidrBlock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1072,7 +1072,7 @@ const opAttachClassicLinkVpc = "AttachClassicLinkVpc" // AttachClassicLinkVpcRequest generates a "aws/request.Request" representing the // client's request for the AttachClassicLinkVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1157,7 +1157,7 @@ const opAttachInternetGateway = "AttachInternetGateway" // AttachInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the AttachInternetGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1235,7 +1235,7 @@ const opAttachNetworkInterface = "AttachNetworkInterface" // AttachNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AttachNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1309,7 +1309,7 @@ const opAttachVolume = "AttachVolume" // AttachVolumeRequest generates a "aws/request.Request" representing the // client's request for the AttachVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1412,7 +1412,7 @@ const opAttachVpnGateway = "AttachVpnGateway" // AttachVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the AttachVpnGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1490,7 +1490,7 @@ const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress" // AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSecurityGroupEgress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1583,7 +1583,7 @@ const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress" // AuthorizeSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1677,7 +1677,7 @@ const opBundleInstance = "BundleInstance" // BundleInstanceRequest generates a "aws/request.Request" representing the // client's request for the BundleInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1759,7 +1759,7 @@ const opCancelBundleTask = "CancelBundleTask" // CancelBundleTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelBundleTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1833,7 +1833,7 @@ const opCancelConversionTask = "CancelConversionTask" // CancelConversionTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelConversionTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1916,7 +1916,7 @@ const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelExportTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1995,7 +1995,7 @@ const opCancelImportTask = "CancelImportTask" // CancelImportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelImportTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2069,7 +2069,7 @@ const opCancelReservedInstancesListing = "CancelReservedInstancesListing" // CancelReservedInstancesListingRequest generates a "aws/request.Request" representing the // client's request for the CancelReservedInstancesListing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2147,7 +2147,7 @@ const opCancelSpotFleetRequests = "CancelSpotFleetRequests" // CancelSpotFleetRequestsRequest generates a "aws/request.Request" representing the // client's request for the CancelSpotFleetRequests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2228,7 +2228,7 @@ const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests" // CancelSpotInstanceRequestsRequest generates a "aws/request.Request" representing the // client's request for the CancelSpotInstanceRequests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2309,7 +2309,7 @@ const opConfirmProductInstance = "ConfirmProductInstance" // ConfirmProductInstanceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmProductInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2385,7 +2385,7 @@ const opCopyFpgaImage = "CopyFpgaImage" // CopyFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the CopyFpgaImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2459,7 +2459,7 @@ const opCopyImage = "CopyImage" // CopyImageRequest generates a "aws/request.Request" representing the // client's request for the CopyImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2539,7 +2539,7 @@ const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopySnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2632,7 +2632,7 @@ const opCreateCustomerGateway = "CreateCustomerGateway" // CreateCustomerGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomerGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2730,7 +2730,7 @@ const opCreateDefaultSubnet = "CreateDefaultSubnet" // CreateDefaultSubnetRequest generates a "aws/request.Request" representing the // client's request for the CreateDefaultSubnet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2808,7 +2808,7 @@ const opCreateDefaultVpc = "CreateDefaultVpc" // CreateDefaultVpcRequest generates a "aws/request.Request" representing the // client's request for the CreateDefaultVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2894,7 +2894,7 @@ const opCreateDhcpOptions = "CreateDhcpOptions" // CreateDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the CreateDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3007,7 +3007,7 @@ const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway" // CreateEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateEgressOnlyInternetGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3084,7 +3084,7 @@ const opCreateFlowLogs = "CreateFlowLogs" // CreateFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the CreateFlowLogs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3170,7 +3170,7 @@ const opCreateFpgaImage = "CreateFpgaImage" // CreateFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the CreateFpgaImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3251,7 +3251,7 @@ const opCreateImage = "CreateImage" // CreateImageRequest generates a "aws/request.Request" representing the // client's request for the CreateImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3334,7 +3334,7 @@ const opCreateInstanceExportTask = "CreateInstanceExportTask" // CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceExportTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3413,7 +3413,7 @@ const opCreateInternetGateway = "CreateInternetGateway" // CreateInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateInternetGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3491,7 +3491,7 @@ const opCreateKeyPair = "CreateKeyPair" // CreateKeyPairRequest generates a "aws/request.Request" representing the // client's request for the CreateKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3577,7 +3577,7 @@ const opCreateLaunchTemplate = "CreateLaunchTemplate" // CreateLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3653,7 +3653,7 @@ const opCreateLaunchTemplateVersion = "CreateLaunchTemplateVersion" // CreateLaunchTemplateVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchTemplateVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3731,7 +3731,7 @@ const opCreateNatGateway = "CreateNatGateway" // CreateNatGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateNatGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3810,7 +3810,7 @@ const opCreateNetworkAcl = "CreateNetworkAcl" // CreateNetworkAclRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkAcl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3888,7 +3888,7 @@ const opCreateNetworkAclEntry = "CreateNetworkAclEntry" // CreateNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkAclEntry operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3980,7 +3980,7 @@ const opCreateNetworkInterface = "CreateNetworkInterface" // CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4058,7 +4058,7 @@ const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission" // CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkInterfacePermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4136,7 +4136,7 @@ const opCreatePlacementGroup = "CreatePlacementGroup" // CreatePlacementGroupRequest generates a "aws/request.Request" representing the // client's request for the CreatePlacementGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4220,7 +4220,7 @@ const opCreateReservedInstancesListing = "CreateReservedInstancesListing" // CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the // client's request for the CreateReservedInstancesListing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4317,7 +4317,7 @@ const opCreateRoute = "CreateRoute" // CreateRouteRequest generates a "aws/request.Request" representing the // client's request for the CreateRoute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4410,7 +4410,7 @@ const opCreateRouteTable = "CreateRouteTable" // CreateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the CreateRouteTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4488,7 +4488,7 @@ const opCreateSecurityGroup = "CreateSecurityGroup" // CreateSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4588,7 +4588,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4692,7 +4692,7 @@ const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription" // CreateSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateSpotDatafeedSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4769,7 +4769,7 @@ const opCreateSubnet = "CreateSubnet" // CreateSubnetRequest generates a "aws/request.Request" representing the // client's request for the CreateSubnet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4869,7 +4869,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4953,7 +4953,7 @@ const opCreateVolume = "CreateVolume" // CreateVolumeRequest generates a "aws/request.Request" representing the // client's request for the CreateVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5045,7 +5045,7 @@ const opCreateVpc = "CreateVpc" // CreateVpcRequest generates a "aws/request.Request" representing the // client's request for the CreateVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5137,7 +5137,7 @@ const opCreateVpcEndpoint = "CreateVpcEndpoint" // CreateVpcEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5227,7 +5227,7 @@ const opCreateVpcEndpointConnectionNotification = "CreateVpcEndpointConnectionNo // CreateVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpointConnectionNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5307,7 +5307,7 @@ const opCreateVpcEndpointServiceConfiguration = "CreateVpcEndpointServiceConfigu // CreateVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpointServiceConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5388,7 +5388,7 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" // CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5477,7 +5477,7 @@ const opCreateVpnConnection = "CreateVpnConnection" // CreateVpnConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5569,7 +5569,7 @@ const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute" // CreateVpnConnectionRouteRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnConnectionRoute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5652,7 +5652,7 @@ const opCreateVpnGateway = "CreateVpnGateway" // CreateVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5732,7 +5732,7 @@ const opDeleteCustomerGateway = "DeleteCustomerGateway" // DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomerGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5809,7 +5809,7 @@ const opDeleteDhcpOptions = "DeleteDhcpOptions" // DeleteDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5888,7 +5888,7 @@ const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway" // DeleteEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteEgressOnlyInternetGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5962,7 +5962,7 @@ const opDeleteFlowLogs = "DeleteFlowLogs" // DeleteFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the DeleteFlowLogs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6036,7 +6036,7 @@ const opDeleteFpgaImage = "DeleteFpgaImage" // DeleteFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the DeleteFpgaImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6110,7 +6110,7 @@ const opDeleteInternetGateway = "DeleteInternetGateway" // DeleteInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteInternetGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6187,7 +6187,7 @@ const opDeleteKeyPair = "DeleteKeyPair" // DeleteKeyPairRequest generates a "aws/request.Request" representing the // client's request for the DeleteKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6263,7 +6263,7 @@ const opDeleteLaunchTemplate = "DeleteLaunchTemplate" // DeleteLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6338,7 +6338,7 @@ const opDeleteLaunchTemplateVersions = "DeleteLaunchTemplateVersions" // DeleteLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchTemplateVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6415,7 +6415,7 @@ const opDeleteNatGateway = "DeleteNatGateway" // DeleteNatGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteNatGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6491,7 +6491,7 @@ const opDeleteNetworkAcl = "DeleteNetworkAcl" // DeleteNetworkAclRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkAcl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6568,7 +6568,7 @@ const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry" // DeleteNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkAclEntry operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6645,7 +6645,7 @@ const opDeleteNetworkInterface = "DeleteNetworkInterface" // DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6722,7 +6722,7 @@ const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission" // DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkInterfacePermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6799,7 +6799,7 @@ const opDeletePlacementGroup = "DeletePlacementGroup" // DeletePlacementGroupRequest generates a "aws/request.Request" representing the // client's request for the DeletePlacementGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6878,7 +6878,7 @@ const opDeleteRoute = "DeleteRoute" // DeleteRouteRequest generates a "aws/request.Request" representing the // client's request for the DeleteRoute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6954,7 +6954,7 @@ const opDeleteRouteTable = "DeleteRouteTable" // DeleteRouteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteRouteTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7032,7 +7032,7 @@ const opDeleteSecurityGroup = "DeleteSecurityGroup" // DeleteSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7112,7 +7112,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7202,7 +7202,7 @@ const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription" // DeleteSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteSpotDatafeedSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7278,7 +7278,7 @@ const opDeleteSubnet = "DeleteSubnet" // DeleteSubnetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubnet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7355,7 +7355,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7435,7 +7435,7 @@ const opDeleteVolume = "DeleteVolume" // DeleteVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeleteVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7517,7 +7517,7 @@ const opDeleteVpc = "DeleteVpc" // DeleteVpcRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7597,7 +7597,7 @@ const opDeleteVpcEndpointConnectionNotifications = "DeleteVpcEndpointConnectionN // DeleteVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpointConnectionNotifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7671,7 +7671,7 @@ const opDeleteVpcEndpointServiceConfigurations = "DeleteVpcEndpointServiceConfig // DeleteVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpointServiceConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7748,7 +7748,7 @@ const opDeleteVpcEndpoints = "DeleteVpcEndpoints" // DeleteVpcEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpoints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7825,7 +7825,7 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" // DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7903,7 +7903,7 @@ const opDeleteVpnConnection = "DeleteVpnConnection" // DeleteVpnConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7988,7 +7988,7 @@ const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute" // DeleteVpnConnectionRouteRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnConnectionRoute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8067,7 +8067,7 @@ const opDeleteVpnGateway = "DeleteVpnGateway" // DeleteVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8147,7 +8147,7 @@ const opDeregisterImage = "DeregisterImage" // DeregisterImageRequest generates a "aws/request.Request" representing the // client's request for the DeregisterImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8231,7 +8231,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8323,7 +8323,7 @@ const opDescribeAddresses = "DescribeAddresses" // DescribeAddressesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAddresses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8401,7 +8401,7 @@ const opDescribeAggregateIdFormat = "DescribeAggregateIdFormat" // DescribeAggregateIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregateIdFormat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8489,7 +8489,7 @@ const opDescribeAvailabilityZones = "DescribeAvailabilityZones" // DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailabilityZones operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8569,7 +8569,7 @@ const opDescribeBundleTasks = "DescribeBundleTasks" // DescribeBundleTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeBundleTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8648,7 +8648,7 @@ const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances" // DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeClassicLinkInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8725,7 +8725,7 @@ const opDescribeConversionTasks = "DescribeConversionTasks" // DescribeConversionTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeConversionTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8803,7 +8803,7 @@ const opDescribeCustomerGateways = "DescribeCustomerGateways" // DescribeCustomerGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeCustomerGateways operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8881,7 +8881,7 @@ const opDescribeDhcpOptions = "DescribeDhcpOptions" // DescribeDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDhcpOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8958,7 +8958,7 @@ const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways // DescribeEgressOnlyInternetGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeEgressOnlyInternetGateways operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9032,7 +9032,7 @@ const opDescribeElasticGpus = "DescribeElasticGpus" // DescribeElasticGpusRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticGpus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9107,7 +9107,7 @@ const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeExportTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9181,7 +9181,7 @@ const opDescribeFlowLogs = "DescribeFlowLogs" // DescribeFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFlowLogs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9257,7 +9257,7 @@ const opDescribeFpgaImageAttribute = "DescribeFpgaImageAttribute" // DescribeFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeFpgaImageAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9331,7 +9331,7 @@ const opDescribeFpgaImages = "DescribeFpgaImages" // DescribeFpgaImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFpgaImages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9407,7 +9407,7 @@ const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings" // DescribeHostReservationOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostReservationOfferings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9489,7 +9489,7 @@ const opDescribeHostReservations = "DescribeHostReservations" // DescribeHostReservationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostReservations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9564,7 +9564,7 @@ const opDescribeHosts = "DescribeHosts" // DescribeHostsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHosts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9642,7 +9642,7 @@ const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAsso // DescribeIamInstanceProfileAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeIamInstanceProfileAssociations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9716,7 +9716,7 @@ const opDescribeIdFormat = "DescribeIdFormat" // DescribeIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdFormat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9808,7 +9808,7 @@ const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat" // DescribeIdentityIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityIdFormat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9898,7 +9898,7 @@ const opDescribeImageAttribute = "DescribeImageAttribute" // DescribeImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeImageAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9973,7 +9973,7 @@ const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeImages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10053,7 +10053,7 @@ const opDescribeImportImageTasks = "DescribeImportImageTasks" // DescribeImportImageTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeImportImageTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10128,7 +10128,7 @@ const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks" // DescribeImportSnapshotTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeImportSnapshotTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10202,7 +10202,7 @@ const opDescribeInstanceAttribute = "DescribeInstanceAttribute" // DescribeInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10280,7 +10280,7 @@ const opDescribeInstanceCreditSpecifications = "DescribeInstanceCreditSpecificat // DescribeInstanceCreditSpecificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceCreditSpecifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10372,7 +10372,7 @@ const opDescribeInstanceStatus = "DescribeInstanceStatus" // DescribeInstanceStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10523,7 +10523,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10668,7 +10668,7 @@ const opDescribeInternetGateways = "DescribeInternetGateways" // DescribeInternetGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeInternetGateways operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10742,7 +10742,7 @@ const opDescribeKeyPairs = "DescribeKeyPairs" // DescribeKeyPairsRequest generates a "aws/request.Request" representing the // client's request for the DescribeKeyPairs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10819,7 +10819,7 @@ const opDescribeLaunchTemplateVersions = "DescribeLaunchTemplateVersions" // DescribeLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchTemplateVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10894,7 +10894,7 @@ const opDescribeLaunchTemplates = "DescribeLaunchTemplates" // DescribeLaunchTemplatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchTemplates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10968,7 +10968,7 @@ const opDescribeMovingAddresses = "DescribeMovingAddresses" // DescribeMovingAddressesRequest generates a "aws/request.Request" representing the // client's request for the DescribeMovingAddresses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11044,7 +11044,7 @@ const opDescribeNatGateways = "DescribeNatGateways" // DescribeNatGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeNatGateways operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11174,7 +11174,7 @@ const opDescribeNetworkAcls = "DescribeNetworkAcls" // DescribeNetworkAclsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkAcls operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11251,7 +11251,7 @@ const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute" // DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfaceAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11326,7 +11326,7 @@ const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissio // DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfacePermissions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11400,7 +11400,7 @@ const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces" // DescribeNetworkInterfacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11474,7 +11474,7 @@ const opDescribePlacementGroups = "DescribePlacementGroups" // DescribePlacementGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribePlacementGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11550,7 +11550,7 @@ const opDescribePrefixLists = "DescribePrefixLists" // DescribePrefixListsRequest generates a "aws/request.Request" representing the // client's request for the DescribePrefixLists operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11628,7 +11628,7 @@ const opDescribePrincipalIdFormat = "DescribePrincipalIdFormat" // DescribePrincipalIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribePrincipalIdFormat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11716,7 +11716,7 @@ const opDescribeRegions = "DescribeRegions" // DescribeRegionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRegions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11793,7 +11793,7 @@ const opDescribeReservedInstances = "DescribeReservedInstances" // DescribeReservedInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11870,7 +11870,7 @@ const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings" // DescribeReservedInstancesListingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesListings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11965,7 +11965,7 @@ const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModif // DescribeReservedInstancesModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesModifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12101,7 +12101,7 @@ const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings // DescribeReservedInstancesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesOfferings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12242,7 +12242,7 @@ const opDescribeRouteTables = "DescribeRouteTables" // DescribeRouteTablesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRouteTables operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12324,7 +12324,7 @@ const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvaila // DescribeScheduledInstanceAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledInstanceAvailability operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12406,7 +12406,7 @@ const opDescribeScheduledInstances = "DescribeScheduledInstances" // DescribeScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12480,7 +12480,7 @@ const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences" // DescribeSecurityGroupReferencesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityGroupReferences operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12555,7 +12555,7 @@ const opDescribeSecurityGroups = "DescribeSecurityGroups" // DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12636,7 +12636,7 @@ const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute" // DescribeSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12714,7 +12714,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12889,7 +12889,7 @@ const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription" // DescribeSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotDatafeedSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12965,7 +12965,7 @@ const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances" // DescribeSpotFleetInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13039,7 +13039,7 @@ const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory" // DescribeSpotFleetRequestHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetRequestHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13118,7 +13118,7 @@ const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests" // DescribeSpotFleetRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetRequests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13251,7 +13251,7 @@ const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests" // DescribeSpotInstanceRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotInstanceRequests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13338,7 +13338,7 @@ const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory" // DescribeSpotPriceHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotPriceHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13475,7 +13475,7 @@ const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups" // DescribeStaleSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeStaleSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13552,7 +13552,7 @@ const opDescribeSubnets = "DescribeSubnets" // DescribeSubnetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubnets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13629,7 +13629,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13762,7 +13762,7 @@ const opDescribeVolumeAttribute = "DescribeVolumeAttribute" // DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumeAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13840,7 +13840,7 @@ const opDescribeVolumeStatus = "DescribeVolumeStatus" // DescribeVolumeStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumeStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14004,7 +14004,7 @@ const opDescribeVolumes = "DescribeVolumes" // DescribeVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14144,7 +14144,7 @@ const opDescribeVolumesModifications = "DescribeVolumesModifications" // DescribeVolumesModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumesModifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14230,7 +14230,7 @@ const opDescribeVpcAttribute = "DescribeVpcAttribute" // DescribeVpcAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14305,7 +14305,7 @@ const opDescribeVpcClassicLink = "DescribeVpcClassicLink" // DescribeVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcClassicLink operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14379,7 +14379,7 @@ const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport" // DescribeVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcClassicLinkDnsSupport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14459,7 +14459,7 @@ const opDescribeVpcEndpointConnectionNotifications = "DescribeVpcEndpointConnect // DescribeVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointConnectionNotifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14534,7 +14534,7 @@ const opDescribeVpcEndpointConnections = "DescribeVpcEndpointConnections" // DescribeVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14609,7 +14609,7 @@ const opDescribeVpcEndpointServiceConfigurations = "DescribeVpcEndpointServiceCo // DescribeVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServiceConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14683,7 +14683,7 @@ const opDescribeVpcEndpointServicePermissions = "DescribeVpcEndpointServicePermi // DescribeVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServicePermissions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14758,7 +14758,7 @@ const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices" // DescribeVpcEndpointServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14832,7 +14832,7 @@ const opDescribeVpcEndpoints = "DescribeVpcEndpoints" // DescribeVpcEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpoints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14906,7 +14906,7 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" // DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -14980,7 +14980,7 @@ const opDescribeVpcs = "DescribeVpcs" // DescribeVpcsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15054,7 +15054,7 @@ const opDescribeVpnConnections = "DescribeVpnConnections" // DescribeVpnConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpnConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15132,7 +15132,7 @@ const opDescribeVpnGateways = "DescribeVpnGateways" // DescribeVpnGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpnGateways operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15210,7 +15210,7 @@ const opDetachClassicLinkVpc = "DetachClassicLinkVpc" // DetachClassicLinkVpcRequest generates a "aws/request.Request" representing the // client's request for the DetachClassicLinkVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15286,7 +15286,7 @@ const opDetachInternetGateway = "DetachInternetGateway" // DetachInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DetachInternetGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15364,7 +15364,7 @@ const opDetachNetworkInterface = "DetachNetworkInterface" // DetachNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DetachNetworkInterface operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15440,7 +15440,7 @@ const opDetachVolume = "DetachVolume" // DetachVolumeRequest generates a "aws/request.Request" representing the // client's request for the DetachVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15527,7 +15527,7 @@ const opDetachVpnGateway = "DetachVpnGateway" // DetachVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the DetachVpnGateway operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15610,7 +15610,7 @@ const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation" // DisableVgwRoutePropagationRequest generates a "aws/request.Request" representing the // client's request for the DisableVgwRoutePropagation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15687,7 +15687,7 @@ const opDisableVpcClassicLink = "DisableVpcClassicLink" // DisableVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the DisableVpcClassicLink operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15762,7 +15762,7 @@ const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport" // DisableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the DisableVpcClassicLinkDnsSupport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15840,7 +15840,7 @@ const opDisassociateAddress = "DisassociateAddress" // DisassociateAddressRequest generates a "aws/request.Request" representing the // client's request for the DisassociateAddress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -15924,7 +15924,7 @@ const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile" // DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DisassociateIamInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16000,7 +16000,7 @@ const opDisassociateRouteTable = "DisassociateRouteTable" // DisassociateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the DisassociateRouteTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16081,7 +16081,7 @@ const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock" // DisassociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the DisassociateSubnetCidrBlock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16157,7 +16157,7 @@ const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock" // DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the DisassociateVpcCidrBlock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16237,7 +16237,7 @@ const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation" // EnableVgwRoutePropagationRequest generates a "aws/request.Request" representing the // client's request for the EnableVgwRoutePropagation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16314,7 +16314,7 @@ const opEnableVolumeIO = "EnableVolumeIO" // EnableVolumeIORequest generates a "aws/request.Request" representing the // client's request for the EnableVolumeIO operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16391,7 +16391,7 @@ const opEnableVpcClassicLink = "EnableVpcClassicLink" // EnableVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the EnableVpcClassicLink operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16471,7 +16471,7 @@ const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport" // EnableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the EnableVpcClassicLinkDnsSupport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16551,7 +16551,7 @@ const opGetConsoleOutput = "GetConsoleOutput" // GetConsoleOutputRequest generates a "aws/request.Request" representing the // client's request for the GetConsoleOutput operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16642,7 +16642,7 @@ const opGetConsoleScreenshot = "GetConsoleScreenshot" // GetConsoleScreenshotRequest generates a "aws/request.Request" representing the // client's request for the GetConsoleScreenshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16718,7 +16718,7 @@ const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview" // GetHostReservationPurchasePreviewRequest generates a "aws/request.Request" representing the // client's request for the GetHostReservationPurchasePreview operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16797,7 +16797,7 @@ const opGetLaunchTemplateData = "GetLaunchTemplateData" // GetLaunchTemplateDataRequest generates a "aws/request.Request" representing the // client's request for the GetLaunchTemplateData operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16872,7 +16872,7 @@ const opGetPasswordData = "GetPasswordData" // GetPasswordDataRequest generates a "aws/request.Request" representing the // client's request for the GetPasswordData operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -16963,7 +16963,7 @@ const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote" // GetReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the // client's request for the GetReservedInstancesExchangeQuote operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17040,7 +17040,7 @@ const opImportImage = "ImportImage" // ImportImageRequest generates a "aws/request.Request" representing the // client's request for the ImportImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17117,7 +17117,7 @@ const opImportInstance = "ImportInstance" // ImportInstanceRequest generates a "aws/request.Request" representing the // client's request for the ImportInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17197,7 +17197,7 @@ const opImportKeyPair = "ImportKeyPair" // ImportKeyPairRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17278,7 +17278,7 @@ const opImportSnapshot = "ImportSnapshot" // ImportSnapshotRequest generates a "aws/request.Request" representing the // client's request for the ImportSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17352,7 +17352,7 @@ const opImportVolume = "ImportVolume" // ImportVolumeRequest generates a "aws/request.Request" representing the // client's request for the ImportVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17430,7 +17430,7 @@ const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute" // ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyFpgaImageAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17504,7 +17504,7 @@ const opModifyHosts = "ModifyHosts" // ModifyHostsRequest generates a "aws/request.Request" representing the // client's request for the ModifyHosts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17584,7 +17584,7 @@ const opModifyIdFormat = "ModifyIdFormat" // ModifyIdFormatRequest generates a "aws/request.Request" representing the // client's request for the ModifyIdFormat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17682,7 +17682,7 @@ const opModifyIdentityIdFormat = "ModifyIdentityIdFormat" // ModifyIdentityIdFormatRequest generates a "aws/request.Request" representing the // client's request for the ModifyIdentityIdFormat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17780,7 +17780,7 @@ const opModifyImageAttribute = "ModifyImageAttribute" // ModifyImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyImageAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17865,7 +17865,7 @@ const opModifyInstanceAttribute = "ModifyInstanceAttribute" // ModifyInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -17946,7 +17946,7 @@ const opModifyInstanceCreditSpecification = "ModifyInstanceCreditSpecification" // ModifyInstanceCreditSpecificationRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceCreditSpecification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18024,7 +18024,7 @@ const opModifyInstancePlacement = "ModifyInstancePlacement" // ModifyInstancePlacementRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstancePlacement operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18119,7 +18119,7 @@ const opModifyLaunchTemplate = "ModifyLaunchTemplate" // ModifyLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the ModifyLaunchTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18195,7 +18195,7 @@ const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute" // ModifyNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyNetworkInterfaceAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18272,7 +18272,7 @@ const opModifyReservedInstances = "ModifyReservedInstances" // ModifyReservedInstancesRequest generates a "aws/request.Request" representing the // client's request for the ModifyReservedInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18352,7 +18352,7 @@ const opModifySnapshotAttribute = "ModifySnapshotAttribute" // ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifySnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18440,7 +18440,7 @@ const opModifySpotFleetRequest = "ModifySpotFleetRequest" // ModifySpotFleetRequestRequest generates a "aws/request.Request" representing the // client's request for the ModifySpotFleetRequest operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18536,7 +18536,7 @@ const opModifySubnetAttribute = "ModifySubnetAttribute" // ModifySubnetAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifySubnetAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18612,7 +18612,7 @@ const opModifyVolume = "ModifyVolume" // ModifyVolumeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18718,7 +18718,7 @@ const opModifyVolumeAttribute = "ModifyVolumeAttribute" // ModifyVolumeAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVolumeAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18803,7 +18803,7 @@ const opModifyVpcAttribute = "ModifyVpcAttribute" // ModifyVpcAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18879,7 +18879,7 @@ const opModifyVpcEndpoint = "ModifyVpcEndpoint" // ModifyVpcEndpointRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -18956,7 +18956,7 @@ const opModifyVpcEndpointConnectionNotification = "ModifyVpcEndpointConnectionNo // ModifyVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointConnectionNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19032,7 +19032,7 @@ const opModifyVpcEndpointServiceConfiguration = "ModifyVpcEndpointServiceConfigu // ModifyVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointServiceConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19109,7 +19109,7 @@ const opModifyVpcEndpointServicePermissions = "ModifyVpcEndpointServicePermissio // ModifyVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointServicePermissions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19185,7 +19185,7 @@ const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions" // ModifyVpcPeeringConnectionOptionsRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcPeeringConnectionOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19278,7 +19278,7 @@ const opModifyVpcTenancy = "ModifyVpcTenancy" // ModifyVpcTenancyRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcTenancy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19361,7 +19361,7 @@ const opMonitorInstances = "MonitorInstances" // MonitorInstancesRequest generates a "aws/request.Request" representing the // client's request for the MonitorInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19440,7 +19440,7 @@ const opMoveAddressToVpc = "MoveAddressToVpc" // MoveAddressToVpcRequest generates a "aws/request.Request" representing the // client's request for the MoveAddressToVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19520,7 +19520,7 @@ const opPurchaseHostReservation = "PurchaseHostReservation" // PurchaseHostReservationRequest generates a "aws/request.Request" representing the // client's request for the PurchaseHostReservation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19597,7 +19597,7 @@ const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering" // PurchaseReservedInstancesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedInstancesOffering operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19680,7 +19680,7 @@ const opPurchaseScheduledInstances = "PurchaseScheduledInstances" // PurchaseScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the PurchaseScheduledInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19763,7 +19763,7 @@ const opRebootInstances = "RebootInstances" // RebootInstancesRequest generates a "aws/request.Request" representing the // client's request for the RebootInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19849,7 +19849,7 @@ const opRegisterImage = "RegisterImage" // RegisterImageRequest generates a "aws/request.Request" representing the // client's request for the RegisterImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -19951,7 +19951,7 @@ const opRejectVpcEndpointConnections = "RejectVpcEndpointConnections" // RejectVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the RejectVpcEndpointConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20026,7 +20026,7 @@ const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection" // RejectVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the RejectVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20104,7 +20104,7 @@ const opReleaseAddress = "ReleaseAddress" // ReleaseAddressRequest generates a "aws/request.Request" representing the // client's request for the ReleaseAddress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20197,7 +20197,7 @@ const opReleaseHosts = "ReleaseHosts" // ReleaseHostsRequest generates a "aws/request.Request" representing the // client's request for the ReleaseHosts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20282,7 +20282,7 @@ const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssocia // ReplaceIamInstanceProfileAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceIamInstanceProfileAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20361,7 +20361,7 @@ const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation" // ReplaceNetworkAclAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceNetworkAclAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20440,7 +20440,7 @@ const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry" // ReplaceNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the ReplaceNetworkAclEntry operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20518,7 +20518,7 @@ const opReplaceRoute = "ReplaceRoute" // ReplaceRouteRequest generates a "aws/request.Request" representing the // client's request for the ReplaceRoute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20600,7 +20600,7 @@ const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation" // ReplaceRouteTableAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceRouteTableAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20682,7 +20682,7 @@ const opReportInstanceStatus = "ReportInstanceStatus" // ReportInstanceStatusRequest generates a "aws/request.Request" representing the // client's request for the ReportInstanceStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20764,7 +20764,7 @@ const opRequestSpotFleet = "RequestSpotFleet" // RequestSpotFleetRequest generates a "aws/request.Request" representing the // client's request for the RequestSpotFleet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20857,7 +20857,7 @@ const opRequestSpotInstances = "RequestSpotInstances" // RequestSpotInstancesRequest generates a "aws/request.Request" representing the // client's request for the RequestSpotInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -20934,7 +20934,7 @@ const opResetFpgaImageAttribute = "ResetFpgaImageAttribute" // ResetFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetFpgaImageAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21009,7 +21009,7 @@ const opResetImageAttribute = "ResetImageAttribute" // ResetImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetImageAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21087,7 +21087,7 @@ const opResetInstanceAttribute = "ResetInstanceAttribute" // ResetInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetInstanceAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21171,7 +21171,7 @@ const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute" // ResetNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetNetworkInterfaceAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21248,7 +21248,7 @@ const opResetSnapshotAttribute = "ResetSnapshotAttribute" // ResetSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21328,7 +21328,7 @@ const opRestoreAddressToClassic = "RestoreAddressToClassic" // RestoreAddressToClassicRequest generates a "aws/request.Request" representing the // client's request for the RestoreAddressToClassic operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21405,7 +21405,7 @@ const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress" // RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the // client's request for the RevokeSecurityGroupEgress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21493,7 +21493,7 @@ const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress" // RevokeSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21584,7 +21584,7 @@ const opRunInstances = "RunInstances" // RunInstancesRequest generates a "aws/request.Request" representing the // client's request for the RunInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21711,7 +21711,7 @@ const opRunScheduledInstances = "RunScheduledInstances" // RunScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the RunScheduledInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21795,7 +21795,7 @@ const opStartInstances = "StartInstances" // StartInstancesRequest generates a "aws/request.Request" representing the // client's request for the StartInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21891,7 +21891,7 @@ const opStopInstances = "StopInstances" // StopInstancesRequest generates a "aws/request.Request" representing the // client's request for the StopInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -21997,7 +21997,7 @@ const opTerminateInstances = "TerminateInstances" // TerminateInstancesRequest generates a "aws/request.Request" representing the // client's request for the TerminateInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -22095,7 +22095,7 @@ const opUnassignIpv6Addresses = "UnassignIpv6Addresses" // UnassignIpv6AddressesRequest generates a "aws/request.Request" representing the // client's request for the UnassignIpv6Addresses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -22169,7 +22169,7 @@ const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses" // UnassignPrivateIpAddressesRequest generates a "aws/request.Request" representing the // client's request for the UnassignPrivateIpAddresses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -22245,7 +22245,7 @@ const opUnmonitorInstances = "UnmonitorInstances" // UnmonitorInstancesRequest generates a "aws/request.Request" representing the // client's request for the UnmonitorInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -22321,7 +22321,7 @@ const opUpdateSecurityGroupRuleDescriptionsEgress = "UpdateSecurityGroupRuleDesc // UpdateSecurityGroupRuleDescriptionsEgressRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityGroupRuleDescriptionsEgress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -22401,7 +22401,7 @@ const opUpdateSecurityGroupRuleDescriptionsIngress = "UpdateSecurityGroupRuleDes // UpdateSecurityGroupRuleDescriptionsIngressRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityGroupRuleDescriptionsIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index f12d5ccb4b4..d9bcf883b75 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -14,7 +14,7 @@ const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability" // BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the BatchCheckLayerAvailability operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -106,7 +106,7 @@ const opBatchDeleteImage = "BatchDeleteImage" // BatchDeleteImageRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -201,7 +201,7 @@ const opBatchGetImage = "BatchGetImage" // BatchGetImageRequest generates a "aws/request.Request" representing the // client's request for the BatchGetImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -289,7 +289,7 @@ const opCompleteLayerUpload = "CompleteLayerUpload" // CompleteLayerUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteLayerUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -399,7 +399,7 @@ const opCreateRepository = "CreateRepository" // CreateRepositoryRequest generates a "aws/request.Request" representing the // client's request for the CreateRepository operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -491,7 +491,7 @@ const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -581,7 +581,7 @@ const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepository operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -673,7 +673,7 @@ const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy" // DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepositoryPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -764,7 +764,7 @@ const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeImages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -916,7 +916,7 @@ const opDescribeRepositories = "DescribeRepositories" // DescribeRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRepositories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1059,7 +1059,7 @@ const opGetAuthorizationToken = "GetAuthorizationToken" // GetAuthorizationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizationToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1149,7 +1149,7 @@ const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer" // GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the // client's request for the GetDownloadUrlForLayer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1249,7 +1249,7 @@ const opGetLifecyclePolicy = "GetLifecyclePolicy" // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1339,7 +1339,7 @@ const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview" // GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicyPreview operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1429,7 +1429,7 @@ const opGetRepositoryPolicy = "GetRepositoryPolicy" // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetRepositoryPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1520,7 +1520,7 @@ const opInitiateLayerUpload = "InitiateLayerUpload" // InitiateLayerUploadRequest generates a "aws/request.Request" representing the // client's request for the InitiateLayerUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1611,7 +1611,7 @@ const opListImages = "ListImages" // ListImagesRequest generates a "aws/request.Request" representing the // client's request for the ListImages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1760,7 +1760,7 @@ const opPutImage = "PutImage" // PutImageRequest generates a "aws/request.Request" representing the // client's request for the PutImage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1865,7 +1865,7 @@ const opPutLifecyclePolicy = "PutLifecyclePolicy" // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutLifecyclePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1953,7 +1953,7 @@ const opSetRepositoryPolicy = "SetRepositoryPolicy" // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetRepositoryPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2040,7 +2040,7 @@ const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview" // StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the // client's request for the StartLifecyclePolicyPreview operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2135,7 +2135,7 @@ const opUploadLayerPart = "UploadLayerPart" // UploadLayerPartRequest generates a "aws/request.Request" representing the // client's request for the UploadLayerPart operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 8d8d3bff80d..f6e48bfd768 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -15,7 +15,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -113,7 +113,7 @@ const opCreateService = "CreateService" // CreateServiceRequest generates a "aws/request.Request" representing the // client's request for the CreateService operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -276,7 +276,7 @@ const opDeleteAttributes = "DeleteAttributes" // DeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -365,7 +365,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -472,7 +472,7 @@ const opDeleteService = "DeleteService" // DeleteServiceRequest generates a "aws/request.Request" representing the // client's request for the DeleteService operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -581,7 +581,7 @@ const opDeregisterContainerInstance = "DeregisterContainerInstance" // DeregisterContainerInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterContainerInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -687,7 +687,7 @@ const opDeregisterTaskDefinition = "DeregisterTaskDefinition" // DeregisterTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTaskDefinition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -789,7 +789,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -877,7 +877,7 @@ const opDescribeContainerInstances = "DescribeContainerInstances" // DescribeContainerInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeContainerInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -970,7 +970,7 @@ const opDescribeServices = "DescribeServices" // DescribeServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeServices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1062,7 +1062,7 @@ const opDescribeTaskDefinition = "DescribeTaskDefinition" // DescribeTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DescribeTaskDefinition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1155,7 +1155,7 @@ const opDescribeTasks = "DescribeTasks" // DescribeTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1247,7 +1247,7 @@ const opDiscoverPollEndpoint = "DiscoverPollEndpoint" // DiscoverPollEndpointRequest generates a "aws/request.Request" representing the // client's request for the DiscoverPollEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1334,7 +1334,7 @@ const opListAttributes = "ListAttributes" // ListAttributesRequest generates a "aws/request.Request" representing the // client's request for the ListAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1424,7 +1424,7 @@ const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1568,7 +1568,7 @@ const opListContainerInstances = "ListContainerInstances" // ListContainerInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListContainerInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1720,7 +1720,7 @@ const opListServices = "ListServices" // ListServicesRequest generates a "aws/request.Request" representing the // client's request for the ListServices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1868,7 +1868,7 @@ const opListTaskDefinitionFamilies = "ListTaskDefinitionFamilies" // ListTaskDefinitionFamiliesRequest generates a "aws/request.Request" representing the // client's request for the ListTaskDefinitionFamilies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2018,7 +2018,7 @@ const opListTaskDefinitions = "ListTaskDefinitions" // ListTaskDefinitionsRequest generates a "aws/request.Request" representing the // client's request for the ListTaskDefinitions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2164,7 +2164,7 @@ const opListTasks = "ListTasks" // ListTasksRequest generates a "aws/request.Request" representing the // client's request for the ListTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2321,7 +2321,7 @@ const opPutAttributes = "PutAttributes" // PutAttributesRequest generates a "aws/request.Request" representing the // client's request for the PutAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2419,7 +2419,7 @@ const opRegisterContainerInstance = "RegisterContainerInstance" // RegisterContainerInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterContainerInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2511,7 +2511,7 @@ const opRegisterTaskDefinition = "RegisterTaskDefinition" // RegisterTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the RegisterTaskDefinition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2619,7 +2619,7 @@ const opRunTask = "RunTask" // RunTaskRequest generates a "aws/request.Request" representing the // client's request for the RunTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2757,7 +2757,7 @@ const opStartTask = "StartTask" // StartTaskRequest generates a "aws/request.Request" representing the // client's request for the StartTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2854,7 +2854,7 @@ const opStopTask = "StopTask" // StopTaskRequest generates a "aws/request.Request" representing the // client's request for the StopTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2957,7 +2957,7 @@ const opSubmitContainerStateChange = "SubmitContainerStateChange" // SubmitContainerStateChangeRequest generates a "aws/request.Request" representing the // client's request for the SubmitContainerStateChange operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3047,7 +3047,7 @@ const opSubmitTaskStateChange = "SubmitTaskStateChange" // SubmitTaskStateChangeRequest generates a "aws/request.Request" representing the // client's request for the SubmitTaskStateChange operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3137,7 +3137,7 @@ const opUpdateContainerAgent = "UpdateContainerAgent" // UpdateContainerAgentRequest generates a "aws/request.Request" representing the // client's request for the UpdateContainerAgent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3257,7 +3257,7 @@ const opUpdateContainerInstancesState = "UpdateContainerInstancesState" // UpdateContainerInstancesStateRequest generates a "aws/request.Request" representing the // client's request for the UpdateContainerInstancesState operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3392,7 +3392,7 @@ const opUpdateService = "UpdateService" // UpdateServiceRequest generates a "aws/request.Request" representing the // client's request for the UpdateService operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index 413b0b2c675..12909345823 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -17,7 +17,7 @@ const opCreateFileSystem = "CreateFileSystem" // CreateFileSystemRequest generates a "aws/request.Request" representing the // client's request for the CreateFileSystem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -153,7 +153,7 @@ const opCreateMountTarget = "CreateMountTarget" // CreateMountTargetRequest generates a "aws/request.Request" representing the // client's request for the CreateMountTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -369,7 +369,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -464,7 +464,7 @@ const opDeleteFileSystem = "DeleteFileSystem" // DeleteFileSystemRequest generates a "aws/request.Request" representing the // client's request for the DeleteFileSystem operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -571,7 +571,7 @@ const opDeleteMountTarget = "DeleteMountTarget" // DeleteMountTargetRequest generates a "aws/request.Request" representing the // client's request for the DeleteMountTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -688,7 +688,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -784,7 +784,7 @@ const opDescribeFileSystems = "DescribeFileSystems" // DescribeFileSystemsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFileSystems operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -896,7 +896,7 @@ const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups" // DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMountTargetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -996,7 +996,7 @@ const opDescribeMountTargets = "DescribeMountTargets" // DescribeMountTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMountTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1093,7 +1093,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1185,7 +1185,7 @@ const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups" // ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the ModifyMountTargetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index a1ad3a61b36..96ab771ef0b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -16,7 +16,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -116,7 +116,7 @@ const opAuthorizeCacheSecurityGroupIngress = "AuthorizeCacheSecurityGroupIngress // AuthorizeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeCacheSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -214,7 +214,7 @@ const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopySnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -374,7 +374,7 @@ const opCreateCacheCluster = "CreateCacheCluster" // CreateCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -506,7 +506,7 @@ const opCreateCacheParameterGroup = "CreateCacheParameterGroup" // CreateCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -612,7 +612,7 @@ const opCreateCacheSecurityGroup = "CreateCacheSecurityGroup" // CreateCacheSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -707,7 +707,7 @@ const opCreateCacheSubnetGroup = "CreateCacheSubnetGroup" // CreateCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -801,7 +801,7 @@ const opCreateReplicationGroup = "CreateReplicationGroup" // CreateReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -955,7 +955,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1070,7 +1070,7 @@ const opDeleteCacheCluster = "DeleteCacheCluster" // DeleteCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1187,7 +1187,7 @@ const opDeleteCacheParameterGroup = "DeleteCacheParameterGroup" // DeleteCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1280,7 +1280,7 @@ const opDeleteCacheSecurityGroup = "DeleteCacheSecurityGroup" // DeleteCacheSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1373,7 +1373,7 @@ const opDeleteCacheSubnetGroup = "DeleteCacheSubnetGroup" // DeleteCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1460,7 +1460,7 @@ const opDeleteReplicationGroup = "DeleteReplicationGroup" // DeleteReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1576,7 +1576,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1669,7 +1669,7 @@ const opDescribeCacheClusters = "DescribeCacheClusters" // DescribeCacheClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1831,7 +1831,7 @@ const opDescribeCacheEngineVersions = "DescribeCacheEngineVersions" // DescribeCacheEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheEngineVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1961,7 +1961,7 @@ const opDescribeCacheParameterGroups = "DescribeCacheParameterGroups" // DescribeCacheParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheParameterGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2105,7 +2105,7 @@ const opDescribeCacheParameters = "DescribeCacheParameters" // DescribeCacheParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2247,7 +2247,7 @@ const opDescribeCacheSecurityGroups = "DescribeCacheSecurityGroups" // DescribeCacheSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2390,7 +2390,7 @@ const opDescribeCacheSubnetGroups = "DescribeCacheSubnetGroups" // DescribeCacheSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2527,7 +2527,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2666,7 +2666,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2809,7 +2809,7 @@ const opDescribeReplicationGroups = "DescribeReplicationGroups" // DescribeReplicationGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2954,7 +2954,7 @@ const opDescribeReservedCacheNodes = "DescribeReservedCacheNodes" // DescribeReservedCacheNodesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedCacheNodes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3096,7 +3096,7 @@ const opDescribeReservedCacheNodesOfferings = "DescribeReservedCacheNodesOfferin // DescribeReservedCacheNodesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedCacheNodesOfferings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3237,7 +3237,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3386,7 +3386,7 @@ const opListAllowedNodeTypeModifications = "ListAllowedNodeTypeModifications" // ListAllowedNodeTypeModificationsRequest generates a "aws/request.Request" representing the // client's request for the ListAllowedNodeTypeModifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3479,7 +3479,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3571,7 +3571,7 @@ const opModifyCacheCluster = "ModifyCacheCluster" // ModifyCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3687,7 +3687,7 @@ const opModifyCacheParameterGroup = "ModifyCacheParameterGroup" // ModifyCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3779,7 +3779,7 @@ const opModifyCacheSubnetGroup = "ModifyCacheSubnetGroup" // ModifyCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3869,7 +3869,7 @@ const opModifyReplicationGroup = "ModifyReplicationGroup" // ModifyReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3995,7 +3995,7 @@ const opModifyReplicationGroupShardConfiguration = "ModifyReplicationGroupShardC // ModifyReplicationGroupShardConfigurationRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationGroupShardConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4109,7 +4109,7 @@ const opPurchaseReservedCacheNodesOffering = "PurchaseReservedCacheNodesOffering // PurchaseReservedCacheNodesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedCacheNodesOffering operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4201,7 +4201,7 @@ const opRebootCacheCluster = "RebootCacheCluster" // RebootCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the RebootCacheCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4299,7 +4299,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4387,7 +4387,7 @@ const opResetCacheParameterGroup = "ResetCacheParameterGroup" // ResetCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetCacheParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4480,7 +4480,7 @@ const opRevokeCacheSecurityGroupIngress = "RevokeCacheSecurityGroupIngress" // RevokeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeCacheSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4574,7 +4574,7 @@ const opTestFailover = "TestFailover" // TestFailoverRequest generates a "aws/request.Request" representing the // client's request for the TestFailover operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index bf8f66b12e6..178bb2a3abd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -17,7 +17,7 @@ const opAbortEnvironmentUpdate = "AbortEnvironmentUpdate" // AbortEnvironmentUpdateRequest generates a "aws/request.Request" representing the // client's request for the AbortEnvironmentUpdate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -100,7 +100,7 @@ const opApplyEnvironmentManagedAction = "ApplyEnvironmentManagedAction" // ApplyEnvironmentManagedActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyEnvironmentManagedAction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -184,7 +184,7 @@ const opCheckDNSAvailability = "CheckDNSAvailability" // CheckDNSAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the CheckDNSAvailability operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -258,7 +258,7 @@ const opComposeEnvironments = "ComposeEnvironments" // ComposeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the ComposeEnvironments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -347,7 +347,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -427,7 +427,7 @@ const opCreateApplicationVersion = "CreateApplicationVersion" // CreateApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateApplicationVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -542,7 +542,7 @@ const opCreateConfigurationTemplate = "CreateConfigurationTemplate" // CreateConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -638,7 +638,7 @@ const opCreateEnvironment = "CreateEnvironment" // CreateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the CreateEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -722,7 +722,7 @@ const opCreatePlatformVersion = "CreatePlatformVersion" // CreatePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -809,7 +809,7 @@ const opCreateStorageLocation = "CreateStorageLocation" // CreateStorageLocationRequest generates a "aws/request.Request" representing the // client's request for the CreateStorageLocation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -899,7 +899,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -985,7 +985,7 @@ const opDeleteApplicationVersion = "DeleteApplicationVersion" // DeleteApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplicationVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1088,7 +1088,7 @@ const opDeleteConfigurationTemplate = "DeleteConfigurationTemplate" // DeleteConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1174,7 +1174,7 @@ const opDeleteEnvironmentConfiguration = "DeleteEnvironmentConfiguration" // DeleteEnvironmentConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironmentConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1257,7 +1257,7 @@ const opDeletePlatformVersion = "DeletePlatformVersion" // DeletePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePlatformVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1348,7 +1348,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1431,7 +1431,7 @@ const opDescribeApplicationVersions = "DescribeApplicationVersions" // DescribeApplicationVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApplicationVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1505,7 +1505,7 @@ const opDescribeApplications = "DescribeApplications" // DescribeApplicationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApplications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1579,7 +1579,7 @@ const opDescribeConfigurationOptions = "DescribeConfigurationOptions" // DescribeConfigurationOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1662,7 +1662,7 @@ const opDescribeConfigurationSettings = "DescribeConfigurationSettings" // DescribeConfigurationSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1753,7 +1753,7 @@ const opDescribeEnvironmentHealth = "DescribeEnvironmentHealth" // DescribeEnvironmentHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentHealth operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1838,7 +1838,7 @@ const opDescribeEnvironmentManagedActionHistory = "DescribeEnvironmentManagedAct // DescribeEnvironmentManagedActionHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentManagedActionHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1917,7 +1917,7 @@ const opDescribeEnvironmentManagedActions = "DescribeEnvironmentManagedActions" // DescribeEnvironmentManagedActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentManagedActions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1996,7 +1996,7 @@ const opDescribeEnvironmentResources = "DescribeEnvironmentResources" // DescribeEnvironmentResourcesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentResources operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2076,7 +2076,7 @@ const opDescribeEnvironments = "DescribeEnvironments" // DescribeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2150,7 +2150,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2282,7 +2282,7 @@ const opDescribeInstancesHealth = "DescribeInstancesHealth" // DescribeInstancesHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancesHealth operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2366,7 +2366,7 @@ const opDescribePlatformVersion = "DescribePlatformVersion" // DescribePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the DescribePlatformVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2449,7 +2449,7 @@ const opListAvailableSolutionStacks = "ListAvailableSolutionStacks" // ListAvailableSolutionStacksRequest generates a "aws/request.Request" representing the // client's request for the ListAvailableSolutionStacks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2524,7 +2524,7 @@ const opListPlatformVersions = "ListPlatformVersions" // ListPlatformVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPlatformVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2607,7 +2607,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2699,7 +2699,7 @@ const opRebuildEnvironment = "RebuildEnvironment" // RebuildEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the RebuildEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2782,7 +2782,7 @@ const opRequestEnvironmentInfo = "RequestEnvironmentInfo" // RequestEnvironmentInfoRequest generates a "aws/request.Request" representing the // client's request for the RequestEnvironmentInfo operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2872,7 +2872,7 @@ const opRestartAppServer = "RestartAppServer" // RestartAppServerRequest generates a "aws/request.Request" representing the // client's request for the RestartAppServer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2949,7 +2949,7 @@ const opRetrieveEnvironmentInfo = "RetrieveEnvironmentInfo" // RetrieveEnvironmentInfoRequest generates a "aws/request.Request" representing the // client's request for the RetrieveEnvironmentInfo operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3027,7 +3027,7 @@ const opSwapEnvironmentCNAMEs = "SwapEnvironmentCNAMEs" // SwapEnvironmentCNAMEsRequest generates a "aws/request.Request" representing the // client's request for the SwapEnvironmentCNAMEs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3103,7 +3103,7 @@ const opTerminateEnvironment = "TerminateEnvironment" // TerminateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the TerminateEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3183,7 +3183,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3260,7 +3260,7 @@ const opUpdateApplicationResourceLifecycle = "UpdateApplicationResourceLifecycle // UpdateApplicationResourceLifecycleRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplicationResourceLifecycle operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3340,7 +3340,7 @@ const opUpdateApplicationVersion = "UpdateApplicationVersion" // UpdateApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplicationVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3417,7 +3417,7 @@ const opUpdateConfigurationTemplate = "UpdateConfigurationTemplate" // UpdateConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3508,7 +3508,7 @@ const opUpdateEnvironment = "UpdateEnvironment" // UpdateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3601,7 +3601,7 @@ const opUpdateTagsForResource = "UpdateTagsForResource" // UpdateTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3719,7 +3719,7 @@ const opValidateConfigurationSettings = "ValidateConfigurationSettings" // ValidateConfigurationSettingsRequest generates a "aws/request.Request" representing the // client's request for the ValidateConfigurationSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index dc5672d021b..0784f815ec0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -17,7 +17,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -110,7 +110,7 @@ const opCreateElasticsearchDomain = "CreateElasticsearchDomain" // CreateElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateElasticsearchDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -213,7 +213,7 @@ const opDeleteElasticsearchDomain = "DeleteElasticsearchDomain" // DeleteElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteElasticsearchDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -303,7 +303,7 @@ const opDeleteElasticsearchServiceRole = "DeleteElasticsearchServiceRole" // DeleteElasticsearchServiceRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteElasticsearchServiceRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -394,7 +394,7 @@ const opDescribeElasticsearchDomain = "DescribeElasticsearchDomain" // DescribeElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -484,7 +484,7 @@ const opDescribeElasticsearchDomainConfig = "DescribeElasticsearchDomainConfig" // DescribeElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomainConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -575,7 +575,7 @@ const opDescribeElasticsearchDomains = "DescribeElasticsearchDomains" // DescribeElasticsearchDomainsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomains operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -661,7 +661,7 @@ const opDescribeElasticsearchInstanceTypeLimits = "DescribeElasticsearchInstance // DescribeElasticsearchInstanceTypeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchInstanceTypeLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -760,7 +760,7 @@ const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the ListDomainNames operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -841,7 +841,7 @@ const opListElasticsearchInstanceTypes = "ListElasticsearchInstanceTypes" // ListElasticsearchInstanceTypesRequest generates a "aws/request.Request" representing the // client's request for the ListElasticsearchInstanceTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -986,7 +986,7 @@ const opListElasticsearchVersions = "ListElasticsearchVersions" // ListElasticsearchVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListElasticsearchVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1131,7 +1131,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1220,7 +1220,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1307,7 +1307,7 @@ const opUpdateElasticsearchDomainConfig = "UpdateElasticsearchDomainConfig" // UpdateElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateElasticsearchDomainConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1608,6 +1608,116 @@ func (s *AdvancedOptionsStatus) SetStatus(v *OptionStatus) *AdvancedOptionsStatu return s } +// Options to specify the Cognito user and identity pools for Kibana authentication. +// For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). +type CognitoOptions struct { + _ struct{} `type:"structure"` + + // Specifies the option to enable Cognito for Kibana authentication. + Enabled *bool `type:"boolean"` + + // Specifies the Cognito identity pool ID for Kibana authentication. + IdentityPoolId *string `min:"1" type:"string"` + + // Specifies the role ARN that provides Elasticsearch permissions for accessing + // Cognito resources. + RoleArn *string `min:"20" type:"string"` + + // Specifies the Cognito user pool ID for Kibana authentication. + UserPoolId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CognitoOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CognitoOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CognitoOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CognitoOptions"} + if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *CognitoOptions) SetEnabled(v bool) *CognitoOptions { + s.Enabled = &v + return s +} + +// SetIdentityPoolId sets the IdentityPoolId field's value. +func (s *CognitoOptions) SetIdentityPoolId(v string) *CognitoOptions { + s.IdentityPoolId = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CognitoOptions) SetRoleArn(v string) *CognitoOptions { + s.RoleArn = &v + return s +} + +// SetUserPoolId sets the UserPoolId field's value. +func (s *CognitoOptions) SetUserPoolId(v string) *CognitoOptions { + s.UserPoolId = &v + return s +} + +// Status of the Cognito options for the specified Elasticsearch domain. +type CognitoOptionsStatus struct { + _ struct{} `type:"structure"` + + // Specifies the Cognito options for the specified Elasticsearch domain. + // + // Options is a required field + Options *CognitoOptions `type:"structure" required:"true"` + + // Specifies the status of the Cognito options for the specified Elasticsearch + // domain. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CognitoOptionsStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CognitoOptionsStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *CognitoOptionsStatus) SetOptions(v *CognitoOptions) *CognitoOptionsStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *CognitoOptionsStatus) SetStatus(v *OptionStatus) *CognitoOptionsStatus { + s.Status = v + return s +} + type CreateElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -1620,6 +1730,10 @@ type CreateElasticsearchDomainInput struct { // for more information. AdvancedOptions map[string]*string `type:"map"` + // Options to specify the Cognito user and identity pools for Kibana authentication. + // For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). + CognitoOptions *CognitoOptions `type:"structure"` + // The name of the Elasticsearch domain that you are creating. Domain names // are unique across the domains owned by an account within an AWS region. Domain // names must start with a letter or number and can contain the following characters: @@ -1677,6 +1791,11 @@ func (s *CreateElasticsearchDomainInput) Validate() error { if s.DomainName != nil && len(*s.DomainName) < 3 { invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) } + if s.CognitoOptions != nil { + if err := s.CognitoOptions.Validate(); err != nil { + invalidParams.AddNested("CognitoOptions", err.(request.ErrInvalidParams)) + } + } if s.EncryptionAtRestOptions != nil { if err := s.EncryptionAtRestOptions.Validate(); err != nil { invalidParams.AddNested("EncryptionAtRestOptions", err.(request.ErrInvalidParams)) @@ -1701,6 +1820,12 @@ func (s *CreateElasticsearchDomainInput) SetAdvancedOptions(v map[string]*string return s } +// SetCognitoOptions sets the CognitoOptions field's value. +func (s *CreateElasticsearchDomainInput) SetCognitoOptions(v *CognitoOptions) *CreateElasticsearchDomainInput { + s.CognitoOptions = v + return s +} + // SetDomainName sets the DomainName field's value. func (s *CreateElasticsearchDomainInput) SetDomainName(v string) *CreateElasticsearchDomainInput { s.DomainName = &v @@ -2410,6 +2535,10 @@ type ElasticsearchDomainConfig struct { // for more information. AdvancedOptions *AdvancedOptionsStatus `type:"structure"` + // The CognitoOptions for the specified domain. For more information, see Amazon + // Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). + CognitoOptions *CognitoOptionsStatus `type:"structure"` + // Specifies the EBSOptions for the Elasticsearch domain. EBSOptions *EBSOptionsStatus `type:"structure"` @@ -2455,6 +2584,12 @@ func (s *ElasticsearchDomainConfig) SetAdvancedOptions(v *AdvancedOptionsStatus) return s } +// SetCognitoOptions sets the CognitoOptions field's value. +func (s *ElasticsearchDomainConfig) SetCognitoOptions(v *CognitoOptionsStatus) *ElasticsearchDomainConfig { + s.CognitoOptions = v + return s +} + // SetEBSOptions sets the EBSOptions field's value. func (s *ElasticsearchDomainConfig) SetEBSOptions(v *EBSOptionsStatus) *ElasticsearchDomainConfig { s.EBSOptions = v @@ -2514,6 +2649,10 @@ type ElasticsearchDomainStatus struct { // Specifies the status of the AdvancedOptions AdvancedOptions map[string]*string `type:"map"` + // The CognitoOptions for the specified domain. For more information, see Amazon + // Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). + CognitoOptions *CognitoOptions `type:"structure"` + // The domain creation status. True if the creation of an Elasticsearch domain // is complete. False if domain creation is still in progress. Created *bool `type:"boolean"` @@ -2604,6 +2743,12 @@ func (s *ElasticsearchDomainStatus) SetAdvancedOptions(v map[string]*string) *El return s } +// SetCognitoOptions sets the CognitoOptions field's value. +func (s *ElasticsearchDomainStatus) SetCognitoOptions(v *CognitoOptions) *ElasticsearchDomainStatus { + s.CognitoOptions = v + return s +} + // SetCreated sets the Created field's value. func (s *ElasticsearchDomainStatus) SetCreated(v bool) *ElasticsearchDomainStatus { s.Created = &v @@ -3646,6 +3791,10 @@ type UpdateElasticsearchDomainConfigInput struct { // for more information. AdvancedOptions map[string]*string `type:"map"` + // Options to specify the Cognito user and identity pools for Kibana authentication. + // For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). + CognitoOptions *CognitoOptions `type:"structure"` + // The name of the Elasticsearch domain that you are updating. // // DomainName is a required field @@ -3690,6 +3839,11 @@ func (s *UpdateElasticsearchDomainConfigInput) Validate() error { if s.DomainName != nil && len(*s.DomainName) < 3 { invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) } + if s.CognitoOptions != nil { + if err := s.CognitoOptions.Validate(); err != nil { + invalidParams.AddNested("CognitoOptions", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3709,6 +3863,12 @@ func (s *UpdateElasticsearchDomainConfigInput) SetAdvancedOptions(v map[string]* return s } +// SetCognitoOptions sets the CognitoOptions field's value. +func (s *UpdateElasticsearchDomainConfigInput) SetCognitoOptions(v *CognitoOptions) *UpdateElasticsearchDomainConfigInput { + s.CognitoOptions = v + return s +} + // SetDomainName sets the DomainName field's value. func (s *UpdateElasticsearchDomainConfigInput) SetDomainName(v string) *UpdateElasticsearchDomainConfigInput { s.DomainName = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go index 96ca242ffb4..9ba387e93eb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go @@ -14,7 +14,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -112,7 +112,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -212,7 +212,7 @@ const opCreatePipeline = "CreatePipeline" // CreatePipelineRequest generates a "aws/request.Request" representing the // client's request for the CreatePipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -306,7 +306,7 @@ const opCreatePreset = "CreatePreset" // CreatePresetRequest generates a "aws/request.Request" representing the // client's request for the CreatePreset operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -409,7 +409,7 @@ const opDeletePipeline = "DeletePipeline" // DeletePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeletePipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -507,7 +507,7 @@ const opDeletePreset = "DeletePreset" // DeletePresetRequest generates a "aws/request.Request" representing the // client's request for the DeletePreset operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -599,7 +599,7 @@ const opListJobsByPipeline = "ListJobsByPipeline" // ListJobsByPipelineRequest generates a "aws/request.Request" representing the // client's request for the ListJobsByPipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -749,7 +749,7 @@ const opListJobsByStatus = "ListJobsByStatus" // ListJobsByStatusRequest generates a "aws/request.Request" representing the // client's request for the ListJobsByStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -897,7 +897,7 @@ const opListPipelines = "ListPipelines" // ListPipelinesRequest generates a "aws/request.Request" representing the // client's request for the ListPipelines operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1039,7 +1039,7 @@ const opListPresets = "ListPresets" // ListPresetsRequest generates a "aws/request.Request" representing the // client's request for the ListPresets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1181,7 +1181,7 @@ const opReadJob = "ReadJob" // ReadJobRequest generates a "aws/request.Request" representing the // client's request for the ReadJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1271,7 +1271,7 @@ const opReadPipeline = "ReadPipeline" // ReadPipelineRequest generates a "aws/request.Request" representing the // client's request for the ReadPipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1361,7 +1361,7 @@ const opReadPreset = "ReadPreset" // ReadPresetRequest generates a "aws/request.Request" representing the // client's request for the ReadPreset operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1451,7 +1451,7 @@ const opTestRole = "TestRole" // TestRoleRequest generates a "aws/request.Request" representing the // client's request for the TestRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1550,7 +1550,7 @@ const opUpdatePipeline = "UpdatePipeline" // UpdatePipelineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipeline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1649,7 +1649,7 @@ const opUpdatePipelineNotifications = "UpdatePipelineNotifications" // UpdatePipelineNotificationsRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipelineNotifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1747,7 +1747,7 @@ const opUpdatePipelineStatus = "UpdatePipelineStatus" // UpdatePipelineStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipelineStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index 66658a1a68d..26720a34204 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -15,7 +15,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -108,7 +108,7 @@ const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer" // ApplySecurityGroupsToLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the ApplySecurityGroupsToLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -198,7 +198,7 @@ const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets" // AttachLoadBalancerToSubnetsRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerToSubnets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -292,7 +292,7 @@ const opConfigureHealthCheck = "ConfigureHealthCheck" // ConfigureHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the ConfigureHealthCheck operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -376,7 +376,7 @@ const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy" // CreateAppCookieStickinessPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateAppCookieStickinessPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -478,7 +478,7 @@ const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy" // CreateLBCookieStickinessPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateLBCookieStickinessPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -582,7 +582,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -711,7 +711,7 @@ const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners" // CreateLoadBalancerListenersRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerListeners operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -812,7 +812,7 @@ const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy" // CreateLoadBalancerPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -907,7 +907,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -990,7 +990,7 @@ const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners" // DeleteLoadBalancerListenersRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerListeners operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1069,7 +1069,7 @@ const opDeleteLoadBalancerPolicy = "DeleteLoadBalancerPolicy" // DeleteLoadBalancerPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1152,7 +1152,7 @@ const opDeregisterInstancesFromLoadBalancer = "DeregisterInstancesFromLoadBalanc // DeregisterInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstancesFromLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1242,7 +1242,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1320,7 +1320,7 @@ const opDescribeInstanceHealth = "DescribeInstanceHealth" // DescribeInstanceHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceHealth operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1407,7 +1407,7 @@ const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" // DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1489,7 +1489,7 @@ const opDescribeLoadBalancerPolicies = "DescribeLoadBalancerPolicies" // DescribeLoadBalancerPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1578,7 +1578,7 @@ const opDescribeLoadBalancerPolicyTypes = "DescribeLoadBalancerPolicyTypes" // DescribeLoadBalancerPolicyTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerPolicyTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1668,7 +1668,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1806,7 +1806,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1885,7 +1885,7 @@ const opDetachLoadBalancerFromSubnets = "DetachLoadBalancerFromSubnets" // DetachLoadBalancerFromSubnetsRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancerFromSubnets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1972,7 +1972,7 @@ const opDisableAvailabilityZonesForLoadBalancer = "DisableAvailabilityZonesForLo // DisableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DisableAvailabilityZonesForLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2064,7 +2064,7 @@ const opEnableAvailabilityZonesForLoadBalancer = "EnableAvailabilityZonesForLoad // EnableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the EnableAvailabilityZonesForLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2150,7 +2150,7 @@ const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2250,7 +2250,7 @@ const opRegisterInstancesWithLoadBalancer = "RegisterInstancesWithLoadBalancer" // RegisterInstancesWithLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstancesWithLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2354,7 +2354,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2433,7 +2433,7 @@ const opSetLoadBalancerListenerSSLCertificate = "SetLoadBalancerListenerSSLCerti // SetLoadBalancerListenerSSLCertificateRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerListenerSSLCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2533,7 +2533,7 @@ const opSetLoadBalancerPoliciesForBackendServer = "SetLoadBalancerPoliciesForBac // SetLoadBalancerPoliciesForBackendServerRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerPoliciesForBackendServer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2633,7 +2633,7 @@ const opSetLoadBalancerPoliciesOfListener = "SetLoadBalancerPoliciesOfListener" // SetLoadBalancerPoliciesOfListenerRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerPoliciesOfListener operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index f30c7cf516e..5a60ca656ea 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -15,7 +15,7 @@ const opAddListenerCertificates = "AddListenerCertificates" // AddListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the AddListenerCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -106,7 +106,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -202,7 +202,7 @@ const opCreateListener = "CreateListener" // CreateListenerRequest generates a "aws/request.Request" representing the // client's request for the CreateListener operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -332,7 +332,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -468,7 +468,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -586,7 +586,7 @@ const opCreateTargetGroup = "CreateTargetGroup" // CreateTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateTargetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -690,7 +690,7 @@ const opDeleteListener = "DeleteListener" // DeleteListenerRequest generates a "aws/request.Request" representing the // client's request for the DeleteListener operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -772,7 +772,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -866,7 +866,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -948,7 +948,7 @@ const opDeleteTargetGroup = "DeleteTargetGroup" // DeleteTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteTargetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1030,7 +1030,7 @@ const opDeregisterTargets = "DeregisterTargets" // DeregisterTargetsRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1115,7 +1115,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1195,7 +1195,7 @@ const opDescribeListenerCertificates = "DescribeListenerCertificates" // DescribeListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeListenerCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1274,7 +1274,7 @@ const opDescribeListeners = "DescribeListeners" // DescribeListenersRequest generates a "aws/request.Request" representing the // client's request for the DescribeListeners operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1414,7 +1414,7 @@ const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" // DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1494,7 +1494,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1632,7 +1632,7 @@ const opDescribeRules = "DescribeRules" // DescribeRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1715,7 +1715,7 @@ const opDescribeSSLPolicies = "DescribeSSLPolicies" // DescribeSSLPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSSLPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1797,7 +1797,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1887,7 +1887,7 @@ const opDescribeTargetGroupAttributes = "DescribeTargetGroupAttributes" // DescribeTargetGroupAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetGroupAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1966,7 +1966,7 @@ const opDescribeTargetGroups = "DescribeTargetGroups" // DescribeTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2110,7 +2110,7 @@ const opDescribeTargetHealth = "DescribeTargetHealth" // DescribeTargetHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetHealth operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2197,7 +2197,7 @@ const opModifyListener = "ModifyListener" // ModifyListenerRequest generates a "aws/request.Request" representing the // client's request for the ModifyListener operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2318,7 +2318,7 @@ const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyLoadBalancerAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2405,7 +2405,7 @@ const opModifyRule = "ModifyRule" // ModifyRuleRequest generates a "aws/request.Request" representing the // client's request for the ModifyRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2507,7 +2507,7 @@ const opModifyTargetGroup = "ModifyTargetGroup" // ModifyTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyTargetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2592,7 +2592,7 @@ const opModifyTargetGroupAttributes = "ModifyTargetGroupAttributes" // ModifyTargetGroupAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyTargetGroupAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2674,7 +2674,7 @@ const opRegisterTargets = "RegisterTargets" // RegisterTargetsRequest generates a "aws/request.Request" representing the // client's request for the RegisterTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2779,7 +2779,7 @@ const opRemoveListenerCertificates = "RemoveListenerCertificates" // RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the RemoveListenerCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2866,7 +2866,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2959,7 +2959,7 @@ const opSetIpAddressType = "SetIpAddressType" // SetIpAddressTypeRequest generates a "aws/request.Request" representing the // client's request for the SetIpAddressType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3047,7 +3047,7 @@ const opSetRulePriorities = "SetRulePriorities" // SetRulePrioritiesRequest generates a "aws/request.Request" representing the // client's request for the SetRulePriorities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3136,7 +3136,7 @@ const opSetSecurityGroups = "SetSecurityGroups" // SetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the SetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3225,7 +3225,7 @@ const opSetSubnets = "SetSubnets" // SetSubnetsRequest generates a "aws/request.Request" representing the // client's request for the SetSubnets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index b9b47e6e6c4..09c135c9750 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -17,7 +17,7 @@ const opAddInstanceFleet = "AddInstanceFleet" // AddInstanceFleetRequest generates a "aws/request.Request" representing the // client's request for the AddInstanceFleet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -102,7 +102,7 @@ const opAddInstanceGroups = "AddInstanceGroups" // AddInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the AddInstanceGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -182,7 +182,7 @@ const opAddJobFlowSteps = "AddJobFlowSteps" // AddJobFlowStepsRequest generates a "aws/request.Request" representing the // client's request for the AddJobFlowSteps operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -284,7 +284,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -368,7 +368,7 @@ const opCancelSteps = "CancelSteps" // CancelStepsRequest generates a "aws/request.Request" representing the // client's request for the CancelSteps operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -455,7 +455,7 @@ const opCreateSecurityConfiguration = "CreateSecurityConfiguration" // CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -538,7 +538,7 @@ const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" // DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -620,7 +620,7 @@ const opDescribeCluster = "DescribeCluster" // DescribeClusterRequest generates a "aws/request.Request" representing the // client's request for the DescribeCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -703,7 +703,7 @@ const opDescribeJobFlows = "DescribeJobFlows" // DescribeJobFlowsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobFlows operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -805,7 +805,7 @@ const opDescribeSecurityConfiguration = "DescribeSecurityConfiguration" // DescribeSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -888,7 +888,7 @@ const opDescribeStep = "DescribeStep" // DescribeStepRequest generates a "aws/request.Request" representing the // client's request for the DescribeStep operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -970,7 +970,7 @@ const opListBootstrapActions = "ListBootstrapActions" // ListBootstrapActionsRequest generates a "aws/request.Request" representing the // client's request for the ListBootstrapActions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1108,7 +1108,7 @@ const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1250,7 +1250,7 @@ const opListInstanceFleets = "ListInstanceFleets" // ListInstanceFleetsRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceFleets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1391,7 +1391,7 @@ const opListInstanceGroups = "ListInstanceGroups" // ListInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1529,7 +1529,7 @@ const opListInstances = "ListInstances" // ListInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1670,7 +1670,7 @@ const opListSecurityConfigurations = "ListSecurityConfigurations" // ListSecurityConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListSecurityConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1755,7 +1755,7 @@ const opListSteps = "ListSteps" // ListStepsRequest generates a "aws/request.Request" representing the // client's request for the ListSteps operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1894,7 +1894,7 @@ const opModifyInstanceFleet = "ModifyInstanceFleet" // ModifyInstanceFleetRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceFleet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1983,7 +1983,7 @@ const opModifyInstanceGroups = "ModifyInstanceGroups" // ModifyInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2068,7 +2068,7 @@ const opPutAutoScalingPolicy = "PutAutoScalingPolicy" // PutAutoScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutAutoScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2145,7 +2145,7 @@ const opRemoveAutoScalingPolicy = "RemoveAutoScalingPolicy" // RemoveAutoScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the RemoveAutoScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2220,7 +2220,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2306,7 +2306,7 @@ const opRunJobFlow = "RunJobFlow" // RunJobFlowRequest generates a "aws/request.Request" representing the // client's request for the RunJobFlow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2412,7 +2412,7 @@ const opSetTerminationProtection = "SetTerminationProtection" // SetTerminationProtectionRequest generates a "aws/request.Request" representing the // client's request for the SetTerminationProtection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2510,7 +2510,7 @@ const opSetVisibleToAllUsers = "SetVisibleToAllUsers" // SetVisibleToAllUsersRequest generates a "aws/request.Request" representing the // client's request for the SetVisibleToAllUsers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2597,7 +2597,7 @@ const opTerminateJobFlows = "TerminateJobFlows" // TerminateJobFlowsRequest generates a "aws/request.Request" representing the // client's request for the TerminateJobFlows operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index c4f0a8add5f..a7d3333ffe7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -15,7 +15,7 @@ const opCreateDeliveryStream = "CreateDeliveryStream" // CreateDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -151,7 +151,7 @@ const opDeleteDeliveryStream = "DeleteDeliveryStream" // DeleteDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -244,7 +244,7 @@ const opDescribeDeliveryStream = "DescribeDeliveryStream" // DescribeDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -326,7 +326,7 @@ const opListDeliveryStreams = "ListDeliveryStreams" // ListDeliveryStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListDeliveryStreams operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -408,7 +408,7 @@ const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the // client's request for the PutRecord operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -528,7 +528,7 @@ const opPutRecordBatch = "PutRecordBatch" // PutRecordBatchRequest generates a "aws/request.Request" representing the // client's request for the PutRecordBatch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -673,7 +673,7 @@ const opUpdateDestination = "UpdateDestination" // UpdateDestinationRequest generates a "aws/request.Request" representing the // client's request for the UpdateDestination operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go new file mode 100644 index 00000000000..5ab16e62f9e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -0,0 +1,2466 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fms + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opAssociateAdminAccount = "AssociateAdminAccount" + +// AssociateAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the AssociateAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateAdminAccount for more information on using the AssociateAdminAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateAdminAccountRequest method. +// req, resp := client.AssociateAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount +func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) (req *request.Request, output *AssociateAdminAccountOutput) { + op := &request.Operation{ + Name: opAssociateAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateAdminAccountInput{} + } + + output = &AssociateAdminAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateAdminAccount API operation for Firewall Management Service. +// +// Sets the AWS Firewall Manager administrator account. AWS Firewall Manager +// must be associated with a master account in AWS Organizations or associated +// with a member account that has the appropriate permissions. If the account +// ID that you submit is not an AWS Organizations master account, AWS Firewall +// Manager will set the appropriate permissions for the given member account. +// +// The account that you associate with AWS Firewall Manager is called the AWS +// Firewall manager administrator account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation AssociateAdminAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The parameters of the request were invalid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount +func (c *FMS) AssociateAdminAccount(input *AssociateAdminAccountInput) (*AssociateAdminAccountOutput, error) { + req, out := c.AssociateAdminAccountRequest(input) + return out, req.Send() +} + +// AssociateAdminAccountWithContext is the same as AssociateAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateAdminAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) AssociateAdminAccountWithContext(ctx aws.Context, input *AssociateAdminAccountInput, opts ...request.Option) (*AssociateAdminAccountOutput, error) { + req, out := c.AssociateAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteNotificationChannel = "DeleteNotificationChannel" + +// DeleteNotificationChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNotificationChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteNotificationChannel for more information on using the DeleteNotificationChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteNotificationChannelRequest method. +// req, resp := client.DeleteNotificationChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel +func (c *FMS) DeleteNotificationChannelRequest(input *DeleteNotificationChannelInput) (req *request.Request, output *DeleteNotificationChannelOutput) { + op := &request.Operation{ + Name: opDeleteNotificationChannel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNotificationChannelInput{} + } + + output = &DeleteNotificationChannelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteNotificationChannel API operation for Firewall Management Service. +// +// Deletes an AWS Firewall Manager association with the IAM role and the Amazon +// Simple Notification Service (SNS) topic that is used to record AWS Firewall +// Manager SNS logs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation DeleteNotificationChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel +func (c *FMS) DeleteNotificationChannel(input *DeleteNotificationChannelInput) (*DeleteNotificationChannelOutput, error) { + req, out := c.DeleteNotificationChannelRequest(input) + return out, req.Send() +} + +// DeleteNotificationChannelWithContext is the same as DeleteNotificationChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNotificationChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) DeleteNotificationChannelWithContext(ctx aws.Context, input *DeleteNotificationChannelInput, opts ...request.Option) (*DeleteNotificationChannelOutput, error) { + req, out := c.DeleteNotificationChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePolicy = "DeletePolicy" + +// DeletePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeletePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePolicy for more information on using the DeletePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePolicyRequest method. +// req, resp := client.DeletePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy +func (c *FMS) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { + op := &request.Operation{ + Name: opDeletePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePolicyInput{} + } + + output = &DeletePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePolicy API operation for Firewall Management Service. +// +// Permanently deletes an AWS Firewall Manager policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation DeletePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy +func (c *FMS) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { + req, out := c.DeletePolicyRequest(input) + return out, req.Send() +} + +// DeletePolicyWithContext is the same as DeletePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { + req, out := c.DeletePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateAdminAccount = "DisassociateAdminAccount" + +// DisassociateAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateAdminAccount for more information on using the DisassociateAdminAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateAdminAccountRequest method. +// req, resp := client.DisassociateAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount +func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInput) (req *request.Request, output *DisassociateAdminAccountOutput) { + op := &request.Operation{ + Name: opDisassociateAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateAdminAccountInput{} + } + + output = &DisassociateAdminAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateAdminAccount API operation for Firewall Management Service. +// +// Disassociates the account that has been set as the AWS Firewall Manager administrator +// account. You will need to submit an AssociateAdminAccount request to set +// a new account as the AWS Firewall administrator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation DisassociateAdminAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount +func (c *FMS) DisassociateAdminAccount(input *DisassociateAdminAccountInput) (*DisassociateAdminAccountOutput, error) { + req, out := c.DisassociateAdminAccountRequest(input) + return out, req.Send() +} + +// DisassociateAdminAccountWithContext is the same as DisassociateAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateAdminAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) DisassociateAdminAccountWithContext(ctx aws.Context, input *DisassociateAdminAccountInput, opts ...request.Option) (*DisassociateAdminAccountOutput, error) { + req, out := c.DisassociateAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAdminAccount = "GetAdminAccount" + +// GetAdminAccountRequest generates a "aws/request.Request" representing the +// client's request for the GetAdminAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAdminAccount for more information on using the GetAdminAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAdminAccountRequest method. +// req, resp := client.GetAdminAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount +func (c *FMS) GetAdminAccountRequest(input *GetAdminAccountInput) (req *request.Request, output *GetAdminAccountOutput) { + op := &request.Operation{ + Name: opGetAdminAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetAdminAccountInput{} + } + + output = &GetAdminAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAdminAccount API operation for Firewall Management Service. +// +// Returns the AWS Organizations master account that is associated with AWS +// Firewall Manager as the AWS Firewall Manager administrator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation GetAdminAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount +func (c *FMS) GetAdminAccount(input *GetAdminAccountInput) (*GetAdminAccountOutput, error) { + req, out := c.GetAdminAccountRequest(input) + return out, req.Send() +} + +// GetAdminAccountWithContext is the same as GetAdminAccount with the addition of +// the ability to pass a context and additional request options. +// +// See GetAdminAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) GetAdminAccountWithContext(ctx aws.Context, input *GetAdminAccountInput, opts ...request.Option) (*GetAdminAccountOutput, error) { + req, out := c.GetAdminAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetComplianceDetail = "GetComplianceDetail" + +// GetComplianceDetailRequest generates a "aws/request.Request" representing the +// client's request for the GetComplianceDetail operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetComplianceDetail for more information on using the GetComplianceDetail +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetComplianceDetailRequest method. +// req, resp := client.GetComplianceDetailRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail +func (c *FMS) GetComplianceDetailRequest(input *GetComplianceDetailInput) (req *request.Request, output *GetComplianceDetailOutput) { + op := &request.Operation{ + Name: opGetComplianceDetail, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetComplianceDetailInput{} + } + + output = &GetComplianceDetailOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetComplianceDetail API operation for Firewall Management Service. +// +// Returns detailed compliance information about the specified member account. +// Details include resources that are in and out of compliance with the specified +// policy. Resources are considered non-compliant if the specified policy has +// not been applied to them. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation GetComplianceDetail for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail +func (c *FMS) GetComplianceDetail(input *GetComplianceDetailInput) (*GetComplianceDetailOutput, error) { + req, out := c.GetComplianceDetailRequest(input) + return out, req.Send() +} + +// GetComplianceDetailWithContext is the same as GetComplianceDetail with the addition of +// the ability to pass a context and additional request options. +// +// See GetComplianceDetail for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) GetComplianceDetailWithContext(ctx aws.Context, input *GetComplianceDetailInput, opts ...request.Option) (*GetComplianceDetailOutput, error) { + req, out := c.GetComplianceDetailRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetNotificationChannel = "GetNotificationChannel" + +// GetNotificationChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetNotificationChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetNotificationChannel for more information on using the GetNotificationChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetNotificationChannelRequest method. +// req, resp := client.GetNotificationChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel +func (c *FMS) GetNotificationChannelRequest(input *GetNotificationChannelInput) (req *request.Request, output *GetNotificationChannelOutput) { + op := &request.Operation{ + Name: opGetNotificationChannel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetNotificationChannelInput{} + } + + output = &GetNotificationChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetNotificationChannel API operation for Firewall Management Service. +// +// Returns information about the Amazon Simple Notification Service (SNS) topic +// that is used to record AWS Firewall Manager SNS logs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation GetNotificationChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel +func (c *FMS) GetNotificationChannel(input *GetNotificationChannelInput) (*GetNotificationChannelOutput, error) { + req, out := c.GetNotificationChannelRequest(input) + return out, req.Send() +} + +// GetNotificationChannelWithContext is the same as GetNotificationChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetNotificationChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) GetNotificationChannelWithContext(ctx aws.Context, input *GetNotificationChannelInput, opts ...request.Option) (*GetNotificationChannelOutput, error) { + req, out := c.GetNotificationChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetPolicy = "GetPolicy" + +// GetPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetPolicy for more information on using the GetPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetPolicyRequest method. +// req, resp := client.GetPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy +func (c *FMS) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { + op := &request.Operation{ + Name: opGetPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetPolicyInput{} + } + + output = &GetPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPolicy API operation for Firewall Management Service. +// +// Returns information about the specified AWS Firewall Manager policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation GetPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy +func (c *FMS) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { + req, out := c.GetPolicyRequest(input) + return out, req.Send() +} + +// GetPolicyWithContext is the same as GetPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { + req, out := c.GetPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListComplianceStatus = "ListComplianceStatus" + +// ListComplianceStatusRequest generates a "aws/request.Request" representing the +// client's request for the ListComplianceStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListComplianceStatus for more information on using the ListComplianceStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListComplianceStatusRequest method. +// req, resp := client.ListComplianceStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus +func (c *FMS) ListComplianceStatusRequest(input *ListComplianceStatusInput) (req *request.Request, output *ListComplianceStatusOutput) { + op := &request.Operation{ + Name: opListComplianceStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListComplianceStatusInput{} + } + + output = &ListComplianceStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListComplianceStatus API operation for Firewall Management Service. +// +// Returns an array of PolicyComplianceStatus objects in the response. Use PolicyComplianceStatus +// to get a summary of which member accounts are protected by the specified +// policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation ListComplianceStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus +func (c *FMS) ListComplianceStatus(input *ListComplianceStatusInput) (*ListComplianceStatusOutput, error) { + req, out := c.ListComplianceStatusRequest(input) + return out, req.Send() +} + +// ListComplianceStatusWithContext is the same as ListComplianceStatus with the addition of +// the ability to pass a context and additional request options. +// +// See ListComplianceStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) ListComplianceStatusWithContext(ctx aws.Context, input *ListComplianceStatusInput, opts ...request.Option) (*ListComplianceStatusOutput, error) { + req, out := c.ListComplianceStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListPolicies = "ListPolicies" + +// ListPoliciesRequest generates a "aws/request.Request" representing the +// client's request for the ListPolicies operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPolicies for more information on using the ListPolicies +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPoliciesRequest method. +// req, resp := client.ListPoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies +func (c *FMS) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) { + op := &request.Operation{ + Name: opListPolicies, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListPoliciesInput{} + } + + output = &ListPoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPolicies API operation for Firewall Management Service. +// +// Returns an array of PolicySummary objects in the response. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation ListPolicies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// policy objects that you can create for an AWS account. For more information, +// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) +// in the AWS WAF Developer Guide. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies +func (c *FMS) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) { + req, out := c.ListPoliciesRequest(input) + return out, req.Send() +} + +// ListPoliciesWithContext is the same as ListPolicies with the addition of +// the ability to pass a context and additional request options. +// +// See ListPolicies for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) { + req, out := c.ListPoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutNotificationChannel = "PutNotificationChannel" + +// PutNotificationChannelRequest generates a "aws/request.Request" representing the +// client's request for the PutNotificationChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutNotificationChannel for more information on using the PutNotificationChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutNotificationChannelRequest method. +// req, resp := client.PutNotificationChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel +func (c *FMS) PutNotificationChannelRequest(input *PutNotificationChannelInput) (req *request.Request, output *PutNotificationChannelOutput) { + op := &request.Operation{ + Name: opPutNotificationChannel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutNotificationChannelInput{} + } + + output = &PutNotificationChannelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutNotificationChannel API operation for Firewall Management Service. +// +// Designates the IAM role and Amazon Simple Notification Service (SNS) topic +// that AWS Firewall Manager uses to record SNS logs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation PutNotificationChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel +func (c *FMS) PutNotificationChannel(input *PutNotificationChannelInput) (*PutNotificationChannelOutput, error) { + req, out := c.PutNotificationChannelRequest(input) + return out, req.Send() +} + +// PutNotificationChannelWithContext is the same as PutNotificationChannel with the addition of +// the ability to pass a context and additional request options. +// +// See PutNotificationChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) PutNotificationChannelWithContext(ctx aws.Context, input *PutNotificationChannelInput, opts ...request.Option) (*PutNotificationChannelOutput, error) { + req, out := c.PutNotificationChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPolicy = "PutPolicy" + +// PutPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPolicy for more information on using the PutPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPolicyRequest method. +// req, resp := client.PutPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy +func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, output *PutPolicyOutput) { + op := &request.Operation{ + Name: opPutPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPolicyInput{} + } + + output = &PutPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutPolicy API operation for Firewall Management Service. +// +// Creates an AWS Firewall Manager policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation PutPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The parameters of the request were invalid. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy +func (c *FMS) PutPolicy(input *PutPolicyInput) (*PutPolicyOutput, error) { + req, out := c.PutPolicyRequest(input) + return out, req.Send() +} + +// PutPolicyWithContext is the same as PutPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) PutPolicyWithContext(ctx aws.Context, input *PutPolicyInput, opts ...request.Option) (*PutPolicyOutput, error) { + req, out := c.PutPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AssociateAdminAccountInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall + // Manager administrator account. This can be an AWS Organizations master account + // or a member account. For more information about AWS Organizations and master + // accounts, see Managing the AWS Accounts in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts.html). + // + // AdminAccount is a required field + AdminAccount *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateAdminAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateAdminAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateAdminAccountInput"} + if s.AdminAccount == nil { + invalidParams.Add(request.NewErrParamRequired("AdminAccount")) + } + if s.AdminAccount != nil && len(*s.AdminAccount) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AdminAccount", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdminAccount sets the AdminAccount field's value. +func (s *AssociateAdminAccountInput) SetAdminAccount(v string) *AssociateAdminAccountInput { + s.AdminAccount = &v + return s +} + +type AssociateAdminAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateAdminAccountOutput) GoString() string { + return s.String() +} + +// Details of the resource that is not protected by the policy. +type ComplianceViolator struct { + _ struct{} `type:"structure"` + + // The resource ID. + ResourceId *string `min:"1" type:"string"` + + // The resource type. This is in the format shown in AWS Resource Types Reference + // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). + // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. + ResourceType *string `min:"1" type:"string"` + + // The reason that the resource is not protected by the policy. + ViolationReason *string `type:"string" enum:"ViolationReason"` +} + +// String returns the string representation +func (s ComplianceViolator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComplianceViolator) GoString() string { + return s.String() +} + +// SetResourceId sets the ResourceId field's value. +func (s *ComplianceViolator) SetResourceId(v string) *ComplianceViolator { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ComplianceViolator) SetResourceType(v string) *ComplianceViolator { + s.ResourceType = &v + return s +} + +// SetViolationReason sets the ViolationReason field's value. +func (s *ComplianceViolator) SetViolationReason(v string) *ComplianceViolator { + s.ViolationReason = &v + return s +} + +type DeleteNotificationChannelInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNotificationChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationChannelInput) GoString() string { + return s.String() +} + +type DeleteNotificationChannelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNotificationChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationChannelOutput) GoString() string { + return s.String() +} + +type DeletePolicyInput struct { + _ struct{} `type:"structure"` + + // The ID of the policy that you want to delete. PolicyId is returned by PutPolicy + // and by ListPolicies. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyId sets the PolicyId field's value. +func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput { + s.PolicyId = &v + return s +} + +type DeletePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePolicyOutput) GoString() string { + return s.String() +} + +type DisassociateAdminAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateAdminAccountInput) GoString() string { + return s.String() +} + +type DisassociateAdminAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateAdminAccountOutput) GoString() string { + return s.String() +} + +// Describes the compliance status for the account. An account is considered +// non-compliant if it includes resources that are not protected by the specified +// policy. +type EvaluationResult struct { + _ struct{} `type:"structure"` + + // Describes an AWS account's compliance with the AWS Firewall Manager policy. + ComplianceStatus *string `type:"string" enum:"PolicyComplianceStatusType"` + + // Indicates that over 100 resources are non-compliant with the AWS Firewall + // Manager policy. + EvaluationLimitExceeded *bool `type:"boolean"` + + // Number of resources that are non-compliant with the specified policy. A resource + // is considered non-compliant if it is not associated with the specified policy. + ViolatorCount *int64 `type:"long"` +} + +// String returns the string representation +func (s EvaluationResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EvaluationResult) GoString() string { + return s.String() +} + +// SetComplianceStatus sets the ComplianceStatus field's value. +func (s *EvaluationResult) SetComplianceStatus(v string) *EvaluationResult { + s.ComplianceStatus = &v + return s +} + +// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value. +func (s *EvaluationResult) SetEvaluationLimitExceeded(v bool) *EvaluationResult { + s.EvaluationLimitExceeded = &v + return s +} + +// SetViolatorCount sets the ViolatorCount field's value. +func (s *EvaluationResult) SetViolatorCount(v int64) *EvaluationResult { + s.ViolatorCount = &v + return s +} + +type GetAdminAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetAdminAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdminAccountInput) GoString() string { + return s.String() +} + +type GetAdminAccountOutput struct { + _ struct{} `type:"structure"` + + // The AWS account that is set as the AWS Firewall Manager administrator. + AdminAccount *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetAdminAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdminAccountOutput) GoString() string { + return s.String() +} + +// SetAdminAccount sets the AdminAccount field's value. +func (s *GetAdminAccountOutput) SetAdminAccount(v string) *GetAdminAccountOutput { + s.AdminAccount = &v + return s +} + +type GetComplianceDetailInput struct { + _ struct{} `type:"structure"` + + // The AWS account that owns the resources that you want to get the details + // for. + // + // MemberAccount is a required field + MemberAccount *string `min:"1" type:"string" required:"true"` + + // The ID of the policy that you want to get the details for. PolicyId is returned + // by PutPolicy and by ListPolicies. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetComplianceDetailInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetComplianceDetailInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetComplianceDetailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailInput"} + if s.MemberAccount == nil { + invalidParams.Add(request.NewErrParamRequired("MemberAccount")) + } + if s.MemberAccount != nil && len(*s.MemberAccount) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MemberAccount", 1)) + } + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccount sets the MemberAccount field's value. +func (s *GetComplianceDetailInput) SetMemberAccount(v string) *GetComplianceDetailInput { + s.MemberAccount = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *GetComplianceDetailInput) SetPolicyId(v string) *GetComplianceDetailInput { + s.PolicyId = &v + return s +} + +type GetComplianceDetailOutput struct { + _ struct{} `type:"structure"` + + // Information about the resources and the policy that you specified in the + // GetComplianceDetail request. + PolicyComplianceDetail *PolicyComplianceDetail `type:"structure"` +} + +// String returns the string representation +func (s GetComplianceDetailOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetComplianceDetailOutput) GoString() string { + return s.String() +} + +// SetPolicyComplianceDetail sets the PolicyComplianceDetail field's value. +func (s *GetComplianceDetailOutput) SetPolicyComplianceDetail(v *PolicyComplianceDetail) *GetComplianceDetailOutput { + s.PolicyComplianceDetail = v + return s +} + +type GetNotificationChannelInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetNotificationChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetNotificationChannelInput) GoString() string { + return s.String() +} + +type GetNotificationChannelOutput struct { + _ struct{} `type:"structure"` + + // The IAM role that is used by AWS Firewall Manager to record activity to SNS. + SnsRoleName *string `min:"1" type:"string"` + + // The SNS topic that records AWS Firewall Manager activity. + SnsTopicArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetNotificationChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetNotificationChannelOutput) GoString() string { + return s.String() +} + +// SetSnsRoleName sets the SnsRoleName field's value. +func (s *GetNotificationChannelOutput) SetSnsRoleName(v string) *GetNotificationChannelOutput { + s.SnsRoleName = &v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *GetNotificationChannelOutput) SetSnsTopicArn(v string) *GetNotificationChannelOutput { + s.SnsTopicArn = &v + return s +} + +type GetPolicyInput struct { + _ struct{} `type:"structure"` + + // The ID of the AWS Firewall Manager policy that you want the details for. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyId sets the PolicyId field's value. +func (s *GetPolicyInput) SetPolicyId(v string) *GetPolicyInput { + s.PolicyId = &v + return s +} + +type GetPolicyOutput struct { + _ struct{} `type:"structure"` + + // Information about the specified AWS Firewall Manager policy. + Policy *Policy `type:"structure"` + + // The Amazon Resource Name (ARN) of the specified policy. + PolicyArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *GetPolicyOutput) SetPolicy(v *Policy) *GetPolicyOutput { + s.Policy = v + return s +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *GetPolicyOutput) SetPolicyArn(v string) *GetPolicyOutput { + s.PolicyArn = &v + return s +} + +type ListComplianceStatusInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of PolicyComplianceStatus objects that you want AWS + // Firewall Manager to return for this request. If you have more PolicyComplianceStatus + // objects than the number that you specify for MaxResults, the response includes + // a NextToken value that you can use to get another batch of PolicyComplianceStatus + // objects. + MaxResults *int64 `min:"1" type:"integer"` + + // If you specify a value for MaxResults and you have more PolicyComplianceStatus + // objects than the number that you specify for MaxResults, AWS Firewall Manager + // returns a NextToken value in the response that allows you to list another + // group of PolicyComplianceStatus objects. For the second and subsequent ListComplianceStatus + // requests, specify the value of NextToken from the previous response to get + // information about another batch of PolicyComplianceStatus objects. + NextToken *string `min:"1" type:"string"` + + // The ID of the AWS Firewall Manager policy that you want the details for. + // + // PolicyId is a required field + PolicyId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListComplianceStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListComplianceStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListComplianceStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListComplianceStatusInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListComplianceStatusInput) SetMaxResults(v int64) *ListComplianceStatusInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListComplianceStatusInput) SetNextToken(v string) *ListComplianceStatusInput { + s.NextToken = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *ListComplianceStatusInput) SetPolicyId(v string) *ListComplianceStatusInput { + s.PolicyId = &v + return s +} + +type ListComplianceStatusOutput struct { + _ struct{} `type:"structure"` + + // If you have more PolicyComplianceStatus objects than the number that you + // specified for MaxResults in the request, the response includes a NextToken + // value. To list more PolicyComplianceStatus objects, submit another ListComplianceStatus + // request, and specify the NextToken value from the response in the NextToken + // value in the next request. + NextToken *string `min:"1" type:"string"` + + // An array of PolicyComplianceStatus objects. + PolicyComplianceStatusList []*PolicyComplianceStatus `type:"list"` +} + +// String returns the string representation +func (s ListComplianceStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListComplianceStatusOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListComplianceStatusOutput) SetNextToken(v string) *ListComplianceStatusOutput { + s.NextToken = &v + return s +} + +// SetPolicyComplianceStatusList sets the PolicyComplianceStatusList field's value. +func (s *ListComplianceStatusOutput) SetPolicyComplianceStatusList(v []*PolicyComplianceStatus) *ListComplianceStatusOutput { + s.PolicyComplianceStatusList = v + return s +} + +type ListPoliciesInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of PolicySummary objects that you want AWS Firewall + // Manager to return for this request. If you have more PolicySummary objects + // than the number that you specify for MaxResults, the response includes a + // NextToken value that you can use to get another batch of PolicySummary objects. + MaxResults *int64 `min:"1" type:"integer"` + + // If you specify a value for MaxResults and you have more PolicySummary objects + // than the number that you specify for MaxResults, AWS Firewall Manager returns + // a NextToken value in the response that allows you to list another group of + // PolicySummary objects. For the second and subsequent ListPolicies requests, + // specify the value of NextToken from the previous response to get information + // about another batch of PolicySummary objects. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListPoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput { + s.NextToken = &v + return s +} + +type ListPoliciesOutput struct { + _ struct{} `type:"structure"` + + // If you have more PolicySummary objects than the number that you specified + // for MaxResults in the request, the response includes a NextToken value. To + // list more PolicySummary objects, submit another ListPolicies request, and + // specify the NextToken value from the response in the NextToken value in the + // next request. + NextToken *string `min:"1" type:"string"` + + // An array of PolicySummary objects. + PolicyList []*PolicySummary `type:"list"` +} + +// String returns the string representation +func (s ListPoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPoliciesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput { + s.NextToken = &v + return s +} + +// SetPolicyList sets the PolicyList field's value. +func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutput { + s.PolicyList = v + return s +} + +// An AWS Firewall Manager policy. +type Policy struct { + _ struct{} `type:"structure"` + + // If set to True, resources with the tags that are specified in the ResourceTag + // array are not protected by the policy. If set to False, and the ResourceTag + // array is not null, only resources with the specified tags are associated + // with the policy. + // + // ExcludeResourceTags is a required field + ExcludeResourceTags *bool `type:"boolean" required:"true"` + + // The ID of the AWS Firewall Manager policy. + PolicyId *string `min:"36" type:"string"` + + // The friendly name of the AWS Firewall Manager policy. + // + // PolicyName is a required field + PolicyName *string `min:"1" type:"string" required:"true"` + + // A unique identifier for each update to the policy. When issuing a PutPolicy + // request, the PolicyUpdateToken in the request must match the PolicyUpdateToken + // of the current policy version. To get the PolicyUpdateToken of the current + // policy version, use a GetPolicy request. + PolicyUpdateToken *string `min:"1" type:"string"` + + // Indicates if the policy should be automatically applied to new resources. + // + // RemediationEnabled is a required field + RemediationEnabled *bool `type:"boolean" required:"true"` + + // An array of ResourceTag objects. + ResourceTags []*ResourceTag `type:"list"` + + // The type of resource to protect with the policy, either an Application Load + // Balancer or a CloudFront distribution. This is in the format shown in AWS + // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). + // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. + // + // ResourceType is a required field + ResourceType *string `min:"1" type:"string" required:"true"` + + // Details about the security service that is being used to protect the resources. + // + // SecurityServicePolicyData is a required field + SecurityServicePolicyData *SecurityServicePolicyData `type:"structure" required:"true"` +} + +// String returns the string representation +func (s Policy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Policy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Policy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Policy"} + if s.ExcludeResourceTags == nil { + invalidParams.Add(request.NewErrParamRequired("ExcludeResourceTags")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36)) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.PolicyUpdateToken != nil && len(*s.PolicyUpdateToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyUpdateToken", 1)) + } + if s.RemediationEnabled == nil { + invalidParams.Add(request.NewErrParamRequired("RemediationEnabled")) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.ResourceType != nil && len(*s.ResourceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) + } + if s.SecurityServicePolicyData == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityServicePolicyData")) + } + if s.ResourceTags != nil { + for i, v := range s.ResourceTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceTags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecurityServicePolicyData != nil { + if err := s.SecurityServicePolicyData.Validate(); err != nil { + invalidParams.AddNested("SecurityServicePolicyData", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExcludeResourceTags sets the ExcludeResourceTags field's value. +func (s *Policy) SetExcludeResourceTags(v bool) *Policy { + s.ExcludeResourceTags = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *Policy) SetPolicyId(v string) *Policy { + s.PolicyId = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *Policy) SetPolicyName(v string) *Policy { + s.PolicyName = &v + return s +} + +// SetPolicyUpdateToken sets the PolicyUpdateToken field's value. +func (s *Policy) SetPolicyUpdateToken(v string) *Policy { + s.PolicyUpdateToken = &v + return s +} + +// SetRemediationEnabled sets the RemediationEnabled field's value. +func (s *Policy) SetRemediationEnabled(v bool) *Policy { + s.RemediationEnabled = &v + return s +} + +// SetResourceTags sets the ResourceTags field's value. +func (s *Policy) SetResourceTags(v []*ResourceTag) *Policy { + s.ResourceTags = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *Policy) SetResourceType(v string) *Policy { + s.ResourceType = &v + return s +} + +// SetSecurityServicePolicyData sets the SecurityServicePolicyData field's value. +func (s *Policy) SetSecurityServicePolicyData(v *SecurityServicePolicyData) *Policy { + s.SecurityServicePolicyData = v + return s +} + +// Describes the non-compliant resources in a member account for a specific +// AWS Firewall Manager policy. A maximum of 100 entries are displayed. If more +// than 100 resources are non-compliant, EvaluationLimitExceeded is set to True. +type PolicyComplianceDetail struct { + _ struct{} `type:"structure"` + + // Indicates if over 100 resources are non-compliant with the AWS Firewall Manager + // policy. + EvaluationLimitExceeded *bool `type:"boolean"` + + // A time stamp that indicates when the returned information should be considered + // out-of-date. + ExpiredAt *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The AWS account ID. + MemberAccount *string `min:"1" type:"string"` + + // The ID of the AWS Firewall Manager policy. + PolicyId *string `min:"36" type:"string"` + + // The AWS account that created the AWS Firewall Manager policy. + PolicyOwner *string `min:"1" type:"string"` + + // An array of resources that are not protected by the policy. + Violators []*ComplianceViolator `type:"list"` +} + +// String returns the string representation +func (s PolicyComplianceDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyComplianceDetail) GoString() string { + return s.String() +} + +// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value. +func (s *PolicyComplianceDetail) SetEvaluationLimitExceeded(v bool) *PolicyComplianceDetail { + s.EvaluationLimitExceeded = &v + return s +} + +// SetExpiredAt sets the ExpiredAt field's value. +func (s *PolicyComplianceDetail) SetExpiredAt(v time.Time) *PolicyComplianceDetail { + s.ExpiredAt = &v + return s +} + +// SetMemberAccount sets the MemberAccount field's value. +func (s *PolicyComplianceDetail) SetMemberAccount(v string) *PolicyComplianceDetail { + s.MemberAccount = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *PolicyComplianceDetail) SetPolicyId(v string) *PolicyComplianceDetail { + s.PolicyId = &v + return s +} + +// SetPolicyOwner sets the PolicyOwner field's value. +func (s *PolicyComplianceDetail) SetPolicyOwner(v string) *PolicyComplianceDetail { + s.PolicyOwner = &v + return s +} + +// SetViolators sets the Violators field's value. +func (s *PolicyComplianceDetail) SetViolators(v []*ComplianceViolator) *PolicyComplianceDetail { + s.Violators = v + return s +} + +// Indicates whether the account is compliant with the specified policy. An +// account is considered non-compliant if it includes resources that are not +// protected by the policy. +type PolicyComplianceStatus struct { + _ struct{} `type:"structure"` + + // An array of EvaluationResult objects. + EvaluationResults []*EvaluationResult `type:"list"` + + // Time stamp of the last update to the EvaluationResult objects. + LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The member account ID. + MemberAccount *string `min:"1" type:"string"` + + // The ID of the AWS Firewall Manager policy. + PolicyId *string `min:"36" type:"string"` + + // The friendly name of the AWS Firewall Manager policy. + PolicyName *string `min:"1" type:"string"` + + // The AWS account that created the AWS Firewall Manager policy. + PolicyOwner *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PolicyComplianceStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyComplianceStatus) GoString() string { + return s.String() +} + +// SetEvaluationResults sets the EvaluationResults field's value. +func (s *PolicyComplianceStatus) SetEvaluationResults(v []*EvaluationResult) *PolicyComplianceStatus { + s.EvaluationResults = v + return s +} + +// SetLastUpdated sets the LastUpdated field's value. +func (s *PolicyComplianceStatus) SetLastUpdated(v time.Time) *PolicyComplianceStatus { + s.LastUpdated = &v + return s +} + +// SetMemberAccount sets the MemberAccount field's value. +func (s *PolicyComplianceStatus) SetMemberAccount(v string) *PolicyComplianceStatus { + s.MemberAccount = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *PolicyComplianceStatus) SetPolicyId(v string) *PolicyComplianceStatus { + s.PolicyId = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PolicyComplianceStatus) SetPolicyName(v string) *PolicyComplianceStatus { + s.PolicyName = &v + return s +} + +// SetPolicyOwner sets the PolicyOwner field's value. +func (s *PolicyComplianceStatus) SetPolicyOwner(v string) *PolicyComplianceStatus { + s.PolicyOwner = &v + return s +} + +// Details of the AWS Firewall Manager policy. +type PolicySummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the specified policy. + PolicyArn *string `min:"1" type:"string"` + + // The ID of the specified policy. + PolicyId *string `min:"36" type:"string"` + + // The friendly name of the specified policy. + PolicyName *string `min:"1" type:"string"` + + // Indicates if the policy should be automatically applied to new resources. + RemediationEnabled *bool `type:"boolean"` + + // The type of resource to protect with the policy, either an Application Load + // Balancer or a CloudFront distribution. This is in the format shown in AWS + // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html). + // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution. + ResourceType *string `min:"1" type:"string"` + + // The service that the policy is using to protect the resources. This value + // is WAF. + SecurityServiceType *string `type:"string" enum:"SecurityServiceType"` +} + +// String returns the string representation +func (s PolicySummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicySummary) GoString() string { + return s.String() +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *PolicySummary) SetPolicyArn(v string) *PolicySummary { + s.PolicyArn = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *PolicySummary) SetPolicyId(v string) *PolicySummary { + s.PolicyId = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PolicySummary) SetPolicyName(v string) *PolicySummary { + s.PolicyName = &v + return s +} + +// SetRemediationEnabled sets the RemediationEnabled field's value. +func (s *PolicySummary) SetRemediationEnabled(v bool) *PolicySummary { + s.RemediationEnabled = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *PolicySummary) SetResourceType(v string) *PolicySummary { + s.ResourceType = &v + return s +} + +// SetSecurityServiceType sets the SecurityServiceType field's value. +func (s *PolicySummary) SetSecurityServiceType(v string) *PolicySummary { + s.SecurityServiceType = &v + return s +} + +type PutNotificationChannelInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to + // record AWS Firewall Manager activity. + // + // SnsRoleName is a required field + SnsRoleName *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the SNS topic that collects notifications + // from AWS Firewall Manager. + // + // SnsTopicArn is a required field + SnsTopicArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutNotificationChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutNotificationChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutNotificationChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutNotificationChannelInput"} + if s.SnsRoleName == nil { + invalidParams.Add(request.NewErrParamRequired("SnsRoleName")) + } + if s.SnsRoleName != nil && len(*s.SnsRoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnsRoleName", 1)) + } + if s.SnsTopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("SnsTopicArn")) + } + if s.SnsTopicArn != nil && len(*s.SnsTopicArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnsTopicArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnsRoleName sets the SnsRoleName field's value. +func (s *PutNotificationChannelInput) SetSnsRoleName(v string) *PutNotificationChannelInput { + s.SnsRoleName = &v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *PutNotificationChannelInput) SetSnsTopicArn(v string) *PutNotificationChannelInput { + s.SnsTopicArn = &v + return s +} + +type PutNotificationChannelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutNotificationChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutNotificationChannelOutput) GoString() string { + return s.String() +} + +type PutPolicyInput struct { + _ struct{} `type:"structure"` + + // The details of the AWS Firewall Manager policy to be created. + // + // Policy is a required field + Policy *Policy `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPolicyInput"} + if s.Policy == nil { + invalidParams.Add(request.NewErrParamRequired("Policy")) + } + if s.Policy != nil { + if err := s.Policy.Validate(); err != nil { + invalidParams.AddNested("Policy", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicy sets the Policy field's value. +func (s *PutPolicyInput) SetPolicy(v *Policy) *PutPolicyInput { + s.Policy = v + return s +} + +type PutPolicyOutput struct { + _ struct{} `type:"structure"` + + // The details of the AWS Firewall Manager policy that was created. + Policy *Policy `type:"structure"` + + // The Amazon Resource Name (ARN) of the policy that was created. + PolicyArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *PutPolicyOutput) SetPolicy(v *Policy) *PutPolicyOutput { + s.Policy = v + return s +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *PutPolicyOutput) SetPolicyArn(v string) *PutPolicyOutput { + s.PolicyArn = &v + return s +} + +// The resource tags that AWS Firewall Manager uses to determine if a particular +// resource should be included or excluded from protection by the AWS Firewall +// Manager policy. Tags enable you to categorize your AWS resources in different +// ways, for example, by purpose, owner, or environment. Each tag consists of +// a key and an optional value, both of which you define. Tags are combined +// with an "OR." That is, if you add more than one tag, if any of the tags matches, +// the resource is considered a match for the include or exclude. Working with +// Tag Editor (https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/tag-editor.html). +type ResourceTag struct { + _ struct{} `type:"structure"` + + // The resource tag key. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The resource tag value. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ResourceTag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceTag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceTag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceTag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *ResourceTag) SetKey(v string) *ResourceTag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ResourceTag) SetValue(v string) *ResourceTag { + s.Value = &v + return s +} + +// Details about the security service that is being used to protect the resources. +type SecurityServicePolicyData struct { + _ struct{} `type:"structure"` + + // Details about the service. This contains WAF data in JSON format, as shown + // in the following example: + // + // ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\", + // \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\": + // \"BLOCK\"}} + ManagedServiceData *string `min:"1" type:"string"` + + // The service that the policy is using to protect the resources. This value + // is WAF. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"SecurityServiceType"` +} + +// String returns the string representation +func (s SecurityServicePolicyData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityServicePolicyData) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SecurityServicePolicyData) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SecurityServicePolicyData"} + if s.ManagedServiceData != nil && len(*s.ManagedServiceData) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ManagedServiceData", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetManagedServiceData sets the ManagedServiceData field's value. +func (s *SecurityServicePolicyData) SetManagedServiceData(v string) *SecurityServicePolicyData { + s.ManagedServiceData = &v + return s +} + +// SetType sets the Type field's value. +func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData { + s.Type = &v + return s +} + +const ( + // PolicyComplianceStatusTypeCompliant is a PolicyComplianceStatusType enum value + PolicyComplianceStatusTypeCompliant = "COMPLIANT" + + // PolicyComplianceStatusTypeNonCompliant is a PolicyComplianceStatusType enum value + PolicyComplianceStatusTypeNonCompliant = "NON_COMPLIANT" +) + +const ( + // SecurityServiceTypeWaf is a SecurityServiceType enum value + SecurityServiceTypeWaf = "WAF" +) + +const ( + // ViolationReasonWebAclMissingRuleGroup is a ViolationReason enum value + ViolationReasonWebAclMissingRuleGroup = "WEB_ACL_MISSING_RULE_GROUP" + + // ViolationReasonResourceMissingWebAcl is a ViolationReason enum value + ViolationReasonResourceMissingWebAcl = "RESOURCE_MISSING_WEB_ACL" + + // ViolationReasonResourceIncorrectWebAcl is a ViolationReason enum value + ViolationReasonResourceIncorrectWebAcl = "RESOURCE_INCORRECT_WEB_ACL" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go new file mode 100644 index 00000000000..baae6d87f70 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/doc.go @@ -0,0 +1,31 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package fms provides the client and types for making API +// requests to Firewall Management Service. +// +// This is the AWS Firewall Manager API Reference. This guide is for developers +// who need detailed information about the AWS Firewall Manager API actions, +// data types, and errors. For detailed information about AWS Firewall Manager +// features, see the AWS Firewall Manager Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01 for more information on this service. +// +// See fms package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/fms/ +// +// Using the Client +// +// To contact Firewall Management Service with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Firewall Management Service client FMS for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/fms/#New +package fms diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go new file mode 100644 index 00000000000..f0a64c975a4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go @@ -0,0 +1,42 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fms + +const ( + + // ErrCodeInternalErrorException for service response error code + // "InternalErrorException". + // + // The operation failed because of a system problem, even though the request + // was valid. Retry your request. + ErrCodeInternalErrorException = "InternalErrorException" + + // ErrCodeInvalidInputException for service response error code + // "InvalidInputException". + // + // The parameters of the request were invalid. + ErrCodeInvalidInputException = "InvalidInputException" + + // ErrCodeInvalidOperationException for service response error code + // "InvalidOperationException". + // + // The operation failed because there was nothing to do. For example, you might + // have submitted an AssociateAdminAccount request, but the account ID that + // you submitted was already set as the AWS Firewall Manager administrator. + ErrCodeInvalidOperationException = "InvalidOperationException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The operation exceeds a resource limit, for example, the maximum number of + // policy objects that you can create for an AWS account. For more information, + // see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) + // in the AWS WAF Developer Guide. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource was not found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/service.go b/vendor/github.com/aws/aws-sdk-go/service/fms/service.go new file mode 100644 index 00000000000..d0445c8c306 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/service.go @@ -0,0 +1,95 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fms + +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" +) + +// FMS provides the API operation methods for making requests to +// Firewall Management Service. See this package's package overview docs +// for details on the service. +// +// FMS methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type FMS 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 = "fms" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the FMS 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 FMS client from just a session. +// svc := fms.New(mySession) +// +// // Create a FMS client with additional configuration +// svc := fms.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *FMS { + 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) *FMS { + svc := &FMS{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-01-01", + JSONVersion: "1.1", + TargetPrefix: "AWSFMS_20180101", + }, + 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 FMS operation and runs any +// custom request initialization. +func (c *FMS) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go index 0d0fb89433a..7be8756207b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go @@ -17,7 +17,7 @@ const opAcceptMatch = "AcceptMatch" // AcceptMatchRequest generates a "aws/request.Request" representing the // client's request for the AcceptMatch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -142,7 +142,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -271,7 +271,7 @@ const opCreateBuild = "CreateBuild" // CreateBuildRequest generates a "aws/request.Request" representing the // client's request for the CreateBuild operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -412,7 +412,7 @@ const opCreateFleet = "CreateFleet" // CreateFleetRequest generates a "aws/request.Request" representing the // client's request for the CreateFleet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -606,7 +606,7 @@ const opCreateGameSession = "CreateGameSession" // CreateGameSessionRequest generates a "aws/request.Request" representing the // client's request for the CreateGameSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -778,7 +778,7 @@ const opCreateGameSessionQueue = "CreateGameSessionQueue" // CreateGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateGameSessionQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -909,7 +909,7 @@ const opCreateMatchmakingConfiguration = "CreateMatchmakingConfiguration" // CreateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateMatchmakingConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1048,7 +1048,7 @@ const opCreateMatchmakingRuleSet = "CreateMatchmakingRuleSet" // CreateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CreateMatchmakingRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1172,7 +1172,7 @@ const opCreatePlayerSession = "CreatePlayerSession" // CreatePlayerSessionRequest generates a "aws/request.Request" representing the // client's request for the CreatePlayerSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1305,7 +1305,7 @@ const opCreatePlayerSessions = "CreatePlayerSessions" // CreatePlayerSessionsRequest generates a "aws/request.Request" representing the // client's request for the CreatePlayerSessions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1439,7 +1439,7 @@ const opCreateVpcPeeringAuthorization = "CreateVpcPeeringAuthorization" // CreateVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringAuthorization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1572,7 +1572,7 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" // CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1700,7 +1700,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1810,7 +1810,7 @@ const opDeleteBuild = "DeleteBuild" // DeleteBuildRequest generates a "aws/request.Request" representing the // client's request for the DeleteBuild operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1921,7 +1921,7 @@ const opDeleteFleet = "DeleteFleet" // DeleteFleetRequest generates a "aws/request.Request" representing the // client's request for the DeleteFleet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2068,7 +2068,7 @@ const opDeleteGameSessionQueue = "DeleteGameSessionQueue" // DeleteGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteGameSessionQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2172,7 +2172,7 @@ const opDeleteMatchmakingConfiguration = "DeleteMatchmakingConfiguration" // DeleteMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteMatchmakingConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2282,7 +2282,7 @@ const opDeleteScalingPolicy = "DeleteScalingPolicy" // DeleteScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2422,7 +2422,7 @@ const opDeleteVpcPeeringAuthorization = "DeleteVpcPeeringAuthorization" // DeleteVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringAuthorization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2530,7 +2530,7 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" // DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2644,7 +2644,7 @@ const opDescribeAlias = "DescribeAlias" // DescribeAliasRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2754,7 +2754,7 @@ const opDescribeBuild = "DescribeBuild" // DescribeBuildRequest generates a "aws/request.Request" representing the // client's request for the DescribeBuild operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2859,7 +2859,7 @@ const opDescribeEC2InstanceLimits = "DescribeEC2InstanceLimits" // DescribeEC2InstanceLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEC2InstanceLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2999,7 +2999,7 @@ const opDescribeFleetAttributes = "DescribeFleetAttributes" // DescribeFleetAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3145,7 +3145,7 @@ const opDescribeFleetCapacity = "DescribeFleetCapacity" // DescribeFleetCapacityRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetCapacity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3292,7 +3292,7 @@ const opDescribeFleetEvents = "DescribeFleetEvents" // DescribeFleetEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3431,7 +3431,7 @@ const opDescribeFleetPortSettings = "DescribeFleetPortSettings" // DescribeFleetPortSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetPortSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3572,7 +3572,7 @@ const opDescribeFleetUtilization = "DescribeFleetUtilization" // DescribeFleetUtilizationRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetUtilization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3717,7 +3717,7 @@ const opDescribeGameSessionDetails = "DescribeGameSessionDetails" // DescribeGameSessionDetailsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionDetails operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3848,7 +3848,7 @@ const opDescribeGameSessionPlacement = "DescribeGameSessionPlacement" // DescribeGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionPlacement operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3964,7 +3964,7 @@ const opDescribeGameSessionQueues = "DescribeGameSessionQueues" // DescribeGameSessionQueuesRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionQueues operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4070,7 +4070,7 @@ const opDescribeGameSessions = "DescribeGameSessions" // DescribeGameSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4202,7 +4202,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4301,7 +4301,7 @@ const opDescribeMatchmaking = "DescribeMatchmaking" // DescribeMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmaking operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4412,7 +4412,7 @@ const opDescribeMatchmakingConfigurations = "DescribeMatchmakingConfigurations" // DescribeMatchmakingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmakingConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4523,7 +4523,7 @@ const opDescribeMatchmakingRuleSets = "DescribeMatchmakingRuleSets" // DescribeMatchmakingRuleSetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmakingRuleSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4635,7 +4635,7 @@ const opDescribePlayerSessions = "DescribePlayerSessions" // DescribePlayerSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePlayerSessions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4755,7 +4755,7 @@ const opDescribeRuntimeConfiguration = "DescribeRuntimeConfiguration" // DescribeRuntimeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeRuntimeConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4893,7 +4893,7 @@ const opDescribeScalingPolicies = "DescribeScalingPolicies" // DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5034,7 +5034,7 @@ const opDescribeVpcPeeringAuthorizations = "DescribeVpcPeeringAuthorizations" // DescribeVpcPeeringAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringAuthorizations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5138,7 +5138,7 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" // DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5251,7 +5251,7 @@ const opGetGameSessionLogUrl = "GetGameSessionLogUrl" // GetGameSessionLogUrlRequest generates a "aws/request.Request" representing the // client's request for the GetGameSessionLogUrl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5372,7 +5372,7 @@ const opGetInstanceAccess = "GetInstanceAccess" // GetInstanceAccessRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceAccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5479,7 +5479,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5585,7 +5585,7 @@ const opListBuilds = "ListBuilds" // ListBuildsRequest generates a "aws/request.Request" representing the // client's request for the ListBuilds operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5690,7 +5690,7 @@ const opListFleets = "ListFleets" // ListFleetsRequest generates a "aws/request.Request" representing the // client's request for the ListFleets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5830,7 +5830,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5987,7 +5987,7 @@ const opRequestUploadCredentials = "RequestUploadCredentials" // RequestUploadCredentialsRequest generates a "aws/request.Request" representing the // client's request for the RequestUploadCredentials operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6085,7 +6085,7 @@ const opResolveAlias = "ResolveAlias" // ResolveAliasRequest generates a "aws/request.Request" representing the // client's request for the ResolveAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6198,7 +6198,7 @@ const opSearchGameSessions = "SearchGameSessions" // SearchGameSessionsRequest generates a "aws/request.Request" representing the // client's request for the SearchGameSessions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6367,7 +6367,7 @@ const opStartGameSessionPlacement = "StartGameSessionPlacement" // StartGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the StartGameSessionPlacement operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6521,7 +6521,7 @@ const opStartMatchBackfill = "StartMatchBackfill" // StartMatchBackfillRequest generates a "aws/request.Request" representing the // client's request for the StartMatchBackfill operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6649,7 +6649,7 @@ const opStartMatchmaking = "StartMatchmaking" // StartMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the StartMatchmaking operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6813,7 +6813,7 @@ const opStopGameSessionPlacement = "StopGameSessionPlacement" // StopGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the StopGameSessionPlacement operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6929,7 +6929,7 @@ const opStopMatchmaking = "StopMatchmaking" // StopMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the StopMatchmaking operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7035,7 +7035,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7144,7 +7144,7 @@ const opUpdateBuild = "UpdateBuild" // UpdateBuildRequest generates a "aws/request.Request" representing the // client's request for the UpdateBuild operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7251,7 +7251,7 @@ const opUpdateFleetAttributes = "UpdateFleetAttributes" // UpdateFleetAttributesRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7403,7 +7403,7 @@ const opUpdateFleetCapacity = "UpdateFleetCapacity" // UpdateFleetCapacityRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetCapacity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7567,7 +7567,7 @@ const opUpdateFleetPortSettings = "UpdateFleetPortSettings" // UpdateFleetPortSettingsRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetPortSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7722,7 +7722,7 @@ const opUpdateGameSession = "UpdateGameSession" // UpdateGameSessionRequest generates a "aws/request.Request" representing the // client's request for the UpdateGameSession operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7852,7 +7852,7 @@ const opUpdateGameSessionQueue = "UpdateGameSessionQueue" // UpdateGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateGameSessionQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7957,7 +7957,7 @@ const opUpdateMatchmakingConfiguration = "UpdateMatchmakingConfiguration" // UpdateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateMatchmakingConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8066,7 +8066,7 @@ const opUpdateRuntimeConfiguration = "UpdateRuntimeConfiguration" // UpdateRuntimeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuntimeConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8222,7 +8222,7 @@ const opValidateMatchmakingRuleSet = "ValidateMatchmakingRuleSet" // ValidateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the // client's request for the ValidateMatchmakingRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go index 8bed039fe95..177764b646d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go @@ -17,7 +17,7 @@ const opAbortMultipartUpload = "AbortMultipartUpload" // AbortMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the AbortMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -124,7 +124,7 @@ const opAbortVaultLock = "AbortVaultLock" // AbortVaultLockRequest generates a "aws/request.Request" representing the // client's request for the AbortVaultLock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -227,7 +227,7 @@ const opAddTagsToVault = "AddTagsToVault" // AddTagsToVaultRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToVault operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -323,7 +323,7 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload" // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -452,7 +452,7 @@ const opCompleteVaultLock = "CompleteVaultLock" // CompleteVaultLockRequest generates a "aws/request.Request" representing the // client's request for the CompleteVaultLock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -554,7 +554,7 @@ const opCreateVault = "CreateVault" // CreateVaultRequest generates a "aws/request.Request" representing the // client's request for the CreateVault operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -662,7 +662,7 @@ const opDeleteArchive = "DeleteArchive" // DeleteArchiveRequest generates a "aws/request.Request" representing the // client's request for the DeleteArchive operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -774,7 +774,7 @@ const opDeleteVault = "DeleteVault" // DeleteVaultRequest generates a "aws/request.Request" representing the // client's request for the DeleteVault operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -884,7 +884,7 @@ const opDeleteVaultAccessPolicy = "DeleteVaultAccessPolicy" // DeleteVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -981,7 +981,7 @@ const opDeleteVaultNotifications = "DeleteVaultNotifications" // DeleteVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1083,7 +1083,7 @@ const opDescribeJob = "DescribeJob" // DescribeJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1190,7 +1190,7 @@ const opDescribeVault = "DescribeVault" // DescribeVaultRequest generates a "aws/request.Request" representing the // client's request for the DescribeVault operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1295,7 +1295,7 @@ const opGetDataRetrievalPolicy = "GetDataRetrievalPolicy" // GetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetDataRetrievalPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1379,7 +1379,7 @@ const opGetJobOutput = "GetJobOutput" // GetJobOutputRequest generates a "aws/request.Request" representing the // client's request for the GetJobOutput operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1508,7 +1508,7 @@ const opGetVaultAccessPolicy = "GetVaultAccessPolicy" // GetVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1599,7 +1599,7 @@ const opGetVaultLock = "GetVaultLock" // GetVaultLockRequest generates a "aws/request.Request" representing the // client's request for the GetVaultLock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1704,7 +1704,7 @@ const opGetVaultNotifications = "GetVaultNotifications" // GetVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the GetVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1808,7 +1808,7 @@ const opInitiateJob = "InitiateJob" // InitiateJobRequest generates a "aws/request.Request" representing the // client's request for the InitiateJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1906,7 +1906,7 @@ const opInitiateMultipartUpload = "InitiateMultipartUpload" // InitiateMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the InitiateMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2026,7 +2026,7 @@ const opInitiateVaultLock = "InitiateVaultLock" // InitiateVaultLockRequest generates a "aws/request.Request" representing the // client's request for the InitiateVaultLock operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2140,7 +2140,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2317,7 +2317,7 @@ const opListMultipartUploads = "ListMultipartUploads" // ListMultipartUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListMultipartUploads operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2488,7 +2488,7 @@ const opListParts = "ListParts" // ListPartsRequest generates a "aws/request.Request" representing the // client's request for the ListParts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2653,7 +2653,7 @@ const opListProvisionedCapacity = "ListProvisionedCapacity" // ListProvisionedCapacityRequest generates a "aws/request.Request" representing the // client's request for the ListProvisionedCapacity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2736,7 +2736,7 @@ const opListTagsForVault = "ListTagsForVault" // ListTagsForVaultRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForVault operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2824,7 +2824,7 @@ const opListVaults = "ListVaults" // ListVaultsRequest generates a "aws/request.Request" representing the // client's request for the ListVaults operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2986,7 +2986,7 @@ const opPurchaseProvisionedCapacity = "PurchaseProvisionedCapacity" // PurchaseProvisionedCapacityRequest generates a "aws/request.Request" representing the // client's request for the PurchaseProvisionedCapacity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3071,7 +3071,7 @@ const opRemoveTagsFromVault = "RemoveTagsFromVault" // RemoveTagsFromVaultRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromVault operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3163,7 +3163,7 @@ const opSetDataRetrievalPolicy = "SetDataRetrievalPolicy" // SetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetDataRetrievalPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3253,7 +3253,7 @@ const opSetVaultAccessPolicy = "SetVaultAccessPolicy" // SetVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetVaultAccessPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3347,7 +3347,7 @@ const opSetVaultNotifications = "SetVaultNotifications" // SetVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the SetVaultNotifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3466,7 +3466,7 @@ const opUploadArchive = "UploadArchive" // UploadArchiveRequest generates a "aws/request.Request" representing the // client's request for the UploadArchive operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3591,7 +3591,7 @@ const opUploadMultipartPart = "UploadMultipartPart" // UploadMultipartPartRequest generates a "aws/request.Request" representing the // client's request for the UploadMultipartPart operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index 7a2eed5a48e..ba489115a4b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -15,7 +15,7 @@ const opBatchCreatePartition = "BatchCreatePartition" // BatchCreatePartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchCreatePartition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -109,7 +109,7 @@ const opBatchDeleteConnection = "BatchDeleteConnection" // BatchDeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -191,7 +191,7 @@ const opBatchDeletePartition = "BatchDeletePartition" // BatchDeletePartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeletePartition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -279,7 +279,7 @@ const opBatchDeleteTable = "BatchDeleteTable" // BatchDeleteTableRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -367,7 +367,7 @@ const opBatchDeleteTableVersion = "BatchDeleteTableVersion" // BatchDeleteTableVersionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteTableVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -455,7 +455,7 @@ const opBatchGetPartition = "BatchGetPartition" // BatchGetPartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchGetPartition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -543,7 +543,7 @@ const opBatchStopJobRun = "BatchStopJobRun" // BatchStopJobRunRequest generates a "aws/request.Request" representing the // client's request for the BatchStopJobRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -628,7 +628,7 @@ const opCreateClassifier = "CreateClassifier" // CreateClassifierRequest generates a "aws/request.Request" representing the // client's request for the CreateClassifier operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -715,7 +715,7 @@ const opCreateConnection = "CreateConnection" // CreateConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -803,7 +803,7 @@ const opCreateCrawler = "CreateCrawler" // CreateCrawlerRequest generates a "aws/request.Request" representing the // client's request for the CreateCrawler operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -893,7 +893,7 @@ const opCreateDatabase = "CreateDatabase" // CreateDatabaseRequest generates a "aws/request.Request" representing the // client's request for the CreateDatabase operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -984,7 +984,7 @@ const opCreateDevEndpoint = "CreateDevEndpoint" // CreateDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1084,7 +1084,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1181,7 +1181,7 @@ const opCreatePartition = "CreatePartition" // CreatePartitionRequest generates a "aws/request.Request" representing the // client's request for the CreatePartition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1275,7 +1275,7 @@ const opCreateScript = "CreateScript" // CreateScriptRequest generates a "aws/request.Request" representing the // client's request for the CreateScript operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1360,7 +1360,7 @@ const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the // client's request for the CreateTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1454,7 +1454,7 @@ const opCreateTrigger = "CreateTrigger" // CreateTriggerRequest generates a "aws/request.Request" representing the // client's request for the CreateTrigger operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1551,7 +1551,7 @@ const opCreateUserDefinedFunction = "CreateUserDefinedFunction" // CreateUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the CreateUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1645,7 +1645,7 @@ const opDeleteClassifier = "DeleteClassifier" // DeleteClassifierRequest generates a "aws/request.Request" representing the // client's request for the DeleteClassifier operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1727,7 +1727,7 @@ const opDeleteConnection = "DeleteConnection" // DeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1809,7 +1809,7 @@ const opDeleteCrawler = "DeleteCrawler" // DeleteCrawlerRequest generates a "aws/request.Request" representing the // client's request for the DeleteCrawler operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1898,7 +1898,7 @@ const opDeleteDatabase = "DeleteDatabase" // DeleteDatabaseRequest generates a "aws/request.Request" representing the // client's request for the DeleteDatabase operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1986,7 +1986,7 @@ const opDeleteDevEndpoint = "DeleteDevEndpoint" // DeleteDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2074,7 +2074,7 @@ const opDeleteJob = "DeleteJob" // DeleteJobRequest generates a "aws/request.Request" representing the // client's request for the DeleteJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2159,7 +2159,7 @@ const opDeletePartition = "DeletePartition" // DeletePartitionRequest generates a "aws/request.Request" representing the // client's request for the DeletePartition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2247,7 +2247,7 @@ const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2335,7 +2335,7 @@ const opDeleteTableVersion = "DeleteTableVersion" // DeleteTableVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteTableVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2423,7 +2423,7 @@ const opDeleteTrigger = "DeleteTrigger" // DeleteTriggerRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrigger operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2512,7 +2512,7 @@ const opDeleteUserDefinedFunction = "DeleteUserDefinedFunction" // DeleteUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2600,7 +2600,7 @@ const opGetCatalogImportStatus = "GetCatalogImportStatus" // GetCatalogImportStatusRequest generates a "aws/request.Request" representing the // client's request for the GetCatalogImportStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2682,7 +2682,7 @@ const opGetClassifier = "GetClassifier" // GetClassifierRequest generates a "aws/request.Request" representing the // client's request for the GetClassifier operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2764,7 +2764,7 @@ const opGetClassifiers = "GetClassifiers" // GetClassifiersRequest generates a "aws/request.Request" representing the // client's request for the GetClassifiers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2899,7 +2899,7 @@ const opGetConnection = "GetConnection" // GetConnectionRequest generates a "aws/request.Request" representing the // client's request for the GetConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2981,7 +2981,7 @@ const opGetConnections = "GetConnections" // GetConnectionsRequest generates a "aws/request.Request" representing the // client's request for the GetConnections operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3119,7 +3119,7 @@ const opGetCrawler = "GetCrawler" // GetCrawlerRequest generates a "aws/request.Request" representing the // client's request for the GetCrawler operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3201,7 +3201,7 @@ const opGetCrawlerMetrics = "GetCrawlerMetrics" // GetCrawlerMetricsRequest generates a "aws/request.Request" representing the // client's request for the GetCrawlerMetrics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3336,7 +3336,7 @@ const opGetCrawlers = "GetCrawlers" // GetCrawlersRequest generates a "aws/request.Request" representing the // client's request for the GetCrawlers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3471,7 +3471,7 @@ const opGetDatabase = "GetDatabase" // GetDatabaseRequest generates a "aws/request.Request" representing the // client's request for the GetDatabase operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3559,7 +3559,7 @@ const opGetDatabases = "GetDatabases" // GetDatabasesRequest generates a "aws/request.Request" representing the // client's request for the GetDatabases operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3700,7 +3700,7 @@ const opGetDataflowGraph = "GetDataflowGraph" // GetDataflowGraphRequest generates a "aws/request.Request" representing the // client's request for the GetDataflowGraph operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3785,7 +3785,7 @@ const opGetDevEndpoint = "GetDevEndpoint" // GetDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the GetDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3873,7 +3873,7 @@ const opGetDevEndpoints = "GetDevEndpoints" // GetDevEndpointsRequest generates a "aws/request.Request" representing the // client's request for the GetDevEndpoints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4017,7 +4017,7 @@ const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4105,7 +4105,7 @@ const opGetJobRun = "GetJobRun" // GetJobRunRequest generates a "aws/request.Request" representing the // client's request for the GetJobRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4193,7 +4193,7 @@ const opGetJobRuns = "GetJobRuns" // GetJobRunsRequest generates a "aws/request.Request" representing the // client's request for the GetJobRuns operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4337,7 +4337,7 @@ const opGetJobs = "GetJobs" // GetJobsRequest generates a "aws/request.Request" representing the // client's request for the GetJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4481,7 +4481,7 @@ const opGetMapping = "GetMapping" // GetMappingRequest generates a "aws/request.Request" representing the // client's request for the GetMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4569,7 +4569,7 @@ const opGetPartition = "GetPartition" // GetPartitionRequest generates a "aws/request.Request" representing the // client's request for the GetPartition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4657,7 +4657,7 @@ const opGetPartitions = "GetPartitions" // GetPartitionsRequest generates a "aws/request.Request" representing the // client's request for the GetPartitions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4801,7 +4801,7 @@ const opGetPlan = "GetPlan" // GetPlanRequest generates a "aws/request.Request" representing the // client's request for the GetPlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4886,7 +4886,7 @@ const opGetTable = "GetTable" // GetTableRequest generates a "aws/request.Request" representing the // client's request for the GetTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4974,7 +4974,7 @@ const opGetTableVersion = "GetTableVersion" // GetTableVersionRequest generates a "aws/request.Request" representing the // client's request for the GetTableVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5062,7 +5062,7 @@ const opGetTableVersions = "GetTableVersions" // GetTableVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetTableVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5207,7 +5207,7 @@ const opGetTables = "GetTables" // GetTablesRequest generates a "aws/request.Request" representing the // client's request for the GetTables operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5351,7 +5351,7 @@ const opGetTrigger = "GetTrigger" // GetTriggerRequest generates a "aws/request.Request" representing the // client's request for the GetTrigger operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5439,7 +5439,7 @@ const opGetTriggers = "GetTriggers" // GetTriggersRequest generates a "aws/request.Request" representing the // client's request for the GetTriggers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5583,7 +5583,7 @@ const opGetUserDefinedFunction = "GetUserDefinedFunction" // GetUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the GetUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5671,7 +5671,7 @@ const opGetUserDefinedFunctions = "GetUserDefinedFunctions" // GetUserDefinedFunctionsRequest generates a "aws/request.Request" representing the // client's request for the GetUserDefinedFunctions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5815,7 +5815,7 @@ const opImportCatalogToGlue = "ImportCatalogToGlue" // ImportCatalogToGlueRequest generates a "aws/request.Request" representing the // client's request for the ImportCatalogToGlue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5897,7 +5897,7 @@ const opResetJobBookmark = "ResetJobBookmark" // ResetJobBookmarkRequest generates a "aws/request.Request" representing the // client's request for the ResetJobBookmark operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5985,7 +5985,7 @@ const opStartCrawler = "StartCrawler" // StartCrawlerRequest generates a "aws/request.Request" representing the // client's request for the StartCrawler operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6071,7 +6071,7 @@ const opStartCrawlerSchedule = "StartCrawlerSchedule" // StartCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the StartCrawlerSchedule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6163,7 +6163,7 @@ const opStartJobRun = "StartJobRun" // StartJobRunRequest generates a "aws/request.Request" representing the // client's request for the StartJobRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6257,7 +6257,7 @@ const opStartTrigger = "StartTrigger" // StartTriggerRequest generates a "aws/request.Request" representing the // client's request for the StartTrigger operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6352,7 +6352,7 @@ const opStopCrawler = "StopCrawler" // StopCrawlerRequest generates a "aws/request.Request" representing the // client's request for the StopCrawler operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6440,7 +6440,7 @@ const opStopCrawlerSchedule = "StopCrawlerSchedule" // StopCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the StopCrawlerSchedule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6529,7 +6529,7 @@ const opStopTrigger = "StopTrigger" // StopTriggerRequest generates a "aws/request.Request" representing the // client's request for the StopTrigger operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6620,7 +6620,7 @@ const opUpdateClassifier = "UpdateClassifier" // UpdateClassifierRequest generates a "aws/request.Request" representing the // client's request for the UpdateClassifier operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6709,7 +6709,7 @@ const opUpdateConnection = "UpdateConnection" // UpdateConnectionRequest generates a "aws/request.Request" representing the // client's request for the UpdateConnection operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6794,7 +6794,7 @@ const opUpdateCrawler = "UpdateCrawler" // UpdateCrawlerRequest generates a "aws/request.Request" representing the // client's request for the UpdateCrawler operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6886,7 +6886,7 @@ const opUpdateCrawlerSchedule = "UpdateCrawlerSchedule" // UpdateCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the UpdateCrawlerSchedule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6977,7 +6977,7 @@ const opUpdateDatabase = "UpdateDatabase" // UpdateDatabaseRequest generates a "aws/request.Request" representing the // client's request for the UpdateDatabase operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7065,7 +7065,7 @@ const opUpdateDevEndpoint = "UpdateDevEndpoint" // UpdateDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateDevEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7156,7 +7156,7 @@ const opUpdateJob = "UpdateJob" // UpdateJobRequest generates a "aws/request.Request" representing the // client's request for the UpdateJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7247,7 +7247,7 @@ const opUpdatePartition = "UpdatePartition" // UpdatePartitionRequest generates a "aws/request.Request" representing the // client's request for the UpdatePartition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7335,7 +7335,7 @@ const opUpdateTable = "UpdateTable" // UpdateTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateTable operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7429,7 +7429,7 @@ const opUpdateTrigger = "UpdateTrigger" // UpdateTriggerRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrigger operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7520,7 +7520,7 @@ const opUpdateUserDefinedFunction = "UpdateUserDefinedFunction" // UpdateUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserDefinedFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index 5a2e9cfe600..0273d17d1f9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -12,7 +12,7 @@ const opAcceptInvitation = "AcceptInvitation" // AcceptInvitationRequest generates a "aws/request.Request" representing the // client's request for the AcceptInvitation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -94,7 +94,7 @@ const opArchiveFindings = "ArchiveFindings" // ArchiveFindingsRequest generates a "aws/request.Request" representing the // client's request for the ArchiveFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -176,7 +176,7 @@ const opCreateDetector = "CreateDetector" // CreateDetectorRequest generates a "aws/request.Request" representing the // client's request for the CreateDetector operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -260,7 +260,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -343,7 +343,7 @@ const opCreateMembers = "CreateMembers" // CreateMembersRequest generates a "aws/request.Request" representing the // client's request for the CreateMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -427,7 +427,7 @@ const opCreateSampleFindings = "CreateSampleFindings" // CreateSampleFindingsRequest generates a "aws/request.Request" representing the // client's request for the CreateSampleFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -511,7 +511,7 @@ const opCreateThreatIntelSet = "CreateThreatIntelSet" // CreateThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the CreateThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -594,7 +594,7 @@ const opDeclineInvitations = "DeclineInvitations" // DeclineInvitationsRequest generates a "aws/request.Request" representing the // client's request for the DeclineInvitations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -677,7 +677,7 @@ const opDeleteDetector = "DeleteDetector" // DeleteDetectorRequest generates a "aws/request.Request" representing the // client's request for the DeleteDetector operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -759,7 +759,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -841,7 +841,7 @@ const opDeleteInvitations = "DeleteInvitations" // DeleteInvitationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteInvitations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -924,7 +924,7 @@ const opDeleteMembers = "DeleteMembers" // DeleteMembersRequest generates a "aws/request.Request" representing the // client's request for the DeleteMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1007,7 +1007,7 @@ const opDeleteThreatIntelSet = "DeleteThreatIntelSet" // DeleteThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1089,7 +1089,7 @@ const opDisassociateFromMasterAccount = "DisassociateFromMasterAccount" // DisassociateFromMasterAccountRequest generates a "aws/request.Request" representing the // client's request for the DisassociateFromMasterAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1171,7 +1171,7 @@ const opDisassociateMembers = "DisassociateMembers" // DisassociateMembersRequest generates a "aws/request.Request" representing the // client's request for the DisassociateMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1254,7 +1254,7 @@ const opGetDetector = "GetDetector" // GetDetectorRequest generates a "aws/request.Request" representing the // client's request for the GetDetector operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1336,7 +1336,7 @@ const opGetFindings = "GetFindings" // GetFindingsRequest generates a "aws/request.Request" representing the // client's request for the GetFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1418,7 +1418,7 @@ const opGetFindingsStatistics = "GetFindingsStatistics" // GetFindingsStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetFindingsStatistics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1500,7 +1500,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1582,7 +1582,7 @@ const opGetInvitationsCount = "GetInvitationsCount" // GetInvitationsCountRequest generates a "aws/request.Request" representing the // client's request for the GetInvitationsCount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1665,7 +1665,7 @@ const opGetMasterAccount = "GetMasterAccount" // GetMasterAccountRequest generates a "aws/request.Request" representing the // client's request for the GetMasterAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1748,7 +1748,7 @@ const opGetMembers = "GetMembers" // GetMembersRequest generates a "aws/request.Request" representing the // client's request for the GetMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1831,7 +1831,7 @@ const opGetThreatIntelSet = "GetThreatIntelSet" // GetThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the GetThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1913,7 +1913,7 @@ const opInviteMembers = "InviteMembers" // InviteMembersRequest generates a "aws/request.Request" representing the // client's request for the InviteMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1998,7 +1998,7 @@ const opListDetectors = "ListDetectors" // ListDetectorsRequest generates a "aws/request.Request" representing the // client's request for the ListDetectors operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2136,7 +2136,7 @@ const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2274,7 +2274,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2412,7 +2412,7 @@ const opListInvitations = "ListInvitations" // ListInvitationsRequest generates a "aws/request.Request" representing the // client's request for the ListInvitations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2551,7 +2551,7 @@ const opListMembers = "ListMembers" // ListMembersRequest generates a "aws/request.Request" representing the // client's request for the ListMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2690,7 +2690,7 @@ const opListThreatIntelSets = "ListThreatIntelSets" // ListThreatIntelSetsRequest generates a "aws/request.Request" representing the // client's request for the ListThreatIntelSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2829,7 +2829,7 @@ const opStartMonitoringMembers = "StartMonitoringMembers" // StartMonitoringMembersRequest generates a "aws/request.Request" representing the // client's request for the StartMonitoringMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2913,7 +2913,7 @@ const opStopMonitoringMembers = "StopMonitoringMembers" // StopMonitoringMembersRequest generates a "aws/request.Request" representing the // client's request for the StopMonitoringMembers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2998,7 +2998,7 @@ const opUnarchiveFindings = "UnarchiveFindings" // UnarchiveFindingsRequest generates a "aws/request.Request" representing the // client's request for the UnarchiveFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3080,7 +3080,7 @@ const opUpdateDetector = "UpdateDetector" // UpdateDetectorRequest generates a "aws/request.Request" representing the // client's request for the UpdateDetector operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3162,7 +3162,7 @@ const opUpdateFindingsFeedback = "UpdateFindingsFeedback" // UpdateFindingsFeedbackRequest generates a "aws/request.Request" representing the // client's request for the UpdateFindingsFeedback operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3244,7 +3244,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3326,7 +3326,7 @@ const opUpdateThreatIntelSet = "UpdateThreatIntelSet" // UpdateThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateThreatIntelSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 792f0fe85ae..81bab06bfac 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -17,7 +17,7 @@ const opAddClientIDToOpenIDConnectProvider = "AddClientIDToOpenIDConnectProvider // AddClientIDToOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the AddClientIDToOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -115,7 +115,7 @@ const opAddRoleToInstanceProfile = "AddRoleToInstanceProfile" // AddRoleToInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -229,7 +229,7 @@ const opAddUserToGroup = "AddUserToGroup" // AddUserToGroupRequest generates a "aws/request.Request" representing the // client's request for the AddUserToGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -319,7 +319,7 @@ const opAttachGroupPolicy = "AttachGroupPolicy" // AttachGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -424,7 +424,7 @@ const opAttachRolePolicy = "AttachRolePolicy" // AttachRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachRolePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -539,7 +539,7 @@ const opAttachUserPolicy = "AttachUserPolicy" // AttachUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachUserPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -644,7 +644,7 @@ const opChangePassword = "ChangePassword" // ChangePasswordRequest generates a "aws/request.Request" representing the // client's request for the ChangePassword operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -753,7 +753,7 @@ const opCreateAccessKey = "CreateAccessKey" // CreateAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateAccessKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -858,7 +858,7 @@ const opCreateAccountAlias = "CreateAccountAlias" // CreateAccountAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAccountAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -950,7 +950,7 @@ const opCreateGroup = "CreateGroup" // CreateGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1046,7 +1046,7 @@ const opCreateInstanceProfile = "CreateInstanceProfile" // CreateInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1139,7 +1139,7 @@ const opCreateLoginProfile = "CreateLoginProfile" // CreateLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateLoginProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1238,7 +1238,7 @@ const opCreateOpenIDConnectProvider = "CreateOpenIDConnectProvider" // CreateOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1351,7 +1351,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1456,7 +1456,7 @@ const opCreatePolicyVersion = "CreatePolicyVersion" // CreatePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1563,7 +1563,7 @@ const opCreateRole = "CreateRole" // CreateRoleRequest generates a "aws/request.Request" representing the // client's request for the CreateRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1663,7 +1663,7 @@ const opCreateSAMLProvider = "CreateSAMLProvider" // CreateSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1776,7 +1776,7 @@ const opCreateServiceLinkedRole = "CreateServiceLinkedRole" // CreateServiceLinkedRoleRequest generates a "aws/request.Request" representing the // client's request for the CreateServiceLinkedRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1881,7 +1881,7 @@ const opCreateServiceSpecificCredential = "CreateServiceSpecificCredential" // CreateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the CreateServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1981,7 +1981,7 @@ const opCreateUser = "CreateUser" // CreateUserRequest generates a "aws/request.Request" representing the // client's request for the CreateUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2077,7 +2077,7 @@ const opCreateVirtualMFADevice = "CreateVirtualMFADevice" // CreateVirtualMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the CreateVirtualMFADevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2178,7 +2178,7 @@ const opDeactivateMFADevice = "DeactivateMFADevice" // DeactivateMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the DeactivateMFADevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2279,7 +2279,7 @@ const opDeleteAccessKey = "DeleteAccessKey" // DeleteAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccessKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2375,7 +2375,7 @@ const opDeleteAccountAlias = "DeleteAccountAlias" // DeleteAccountAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2467,7 +2467,7 @@ const opDeleteAccountPasswordPolicy = "DeleteAccountPasswordPolicy" // DeleteAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountPasswordPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2557,7 +2557,7 @@ const opDeleteGroup = "DeleteGroup" // DeleteGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2652,7 +2652,7 @@ const opDeleteGroupPolicy = "DeleteGroupPolicy" // DeleteGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2748,7 +2748,7 @@ const opDeleteInstanceProfile = "DeleteInstanceProfile" // DeleteInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2851,7 +2851,7 @@ const opDeleteLoginProfile = "DeleteLoginProfile" // DeleteLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoginProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2953,7 +2953,7 @@ const opDeleteOpenIDConnectProvider = "DeleteOpenIDConnectProvider" // DeleteOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3050,7 +3050,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3170,7 +3170,7 @@ const opDeletePolicyVersion = "DeletePolicyVersion" // DeletePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3276,7 +3276,7 @@ const opDeleteRole = "DeleteRole" // DeleteRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3382,7 +3382,7 @@ const opDeleteRolePolicy = "DeleteRolePolicy" // DeleteRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRolePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3484,7 +3484,7 @@ const opDeleteSAMLProvider = "DeleteSAMLProvider" // DeleteSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3585,7 +3585,7 @@ const opDeleteSSHPublicKey = "DeleteSSHPublicKey" // DeleteSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3673,7 +3673,7 @@ const opDeleteServerCertificate = "DeleteServerCertificate" // DeleteServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteServerCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3782,7 +3782,7 @@ const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole" // DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteServiceLinkedRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3889,7 +3889,7 @@ const opDeleteServiceSpecificCredential = "DeleteServiceSpecificCredential" // DeleteServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the DeleteServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3971,7 +3971,7 @@ const opDeleteSigningCertificate = "DeleteSigningCertificate" // DeleteSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4067,7 +4067,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4162,7 +4162,7 @@ const opDeleteUserPolicy = "DeleteUserPolicy" // DeleteUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4258,7 +4258,7 @@ const opDeleteVirtualMFADevice = "DeleteVirtualMFADevice" // DeleteVirtualMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the DeleteVirtualMFADevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4355,7 +4355,7 @@ const opDetachGroupPolicy = "DetachGroupPolicy" // DetachGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4454,7 +4454,7 @@ const opDetachRolePolicy = "DetachRolePolicy" // DetachRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachRolePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4559,7 +4559,7 @@ const opDetachUserPolicy = "DetachUserPolicy" // DetachUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachUserPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4658,7 +4658,7 @@ const opEnableMFADevice = "EnableMFADevice" // EnableMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the EnableMFADevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4764,7 +4764,7 @@ const opGenerateCredentialReport = "GenerateCredentialReport" // GenerateCredentialReportRequest generates a "aws/request.Request" representing the // client's request for the GenerateCredentialReport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4850,7 +4850,7 @@ const opGetAccessKeyLastUsed = "GetAccessKeyLastUsed" // GetAccessKeyLastUsedRequest generates a "aws/request.Request" representing the // client's request for the GetAccessKeyLastUsed operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4933,7 +4933,7 @@ const opGetAccountAuthorizationDetails = "GetAccountAuthorizationDetails" // GetAccountAuthorizationDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountAuthorizationDetails operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5081,7 +5081,7 @@ const opGetAccountPasswordPolicy = "GetAccountPasswordPolicy" // GetAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetAccountPasswordPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5166,7 +5166,7 @@ const opGetAccountSummary = "GetAccountSummary" // GetAccountSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSummary operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5250,7 +5250,7 @@ const opGetContextKeysForCustomPolicy = "GetContextKeysForCustomPolicy" // GetContextKeysForCustomPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContextKeysForCustomPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5339,7 +5339,7 @@ const opGetContextKeysForPrincipalPolicy = "GetContextKeysForPrincipalPolicy" // GetContextKeysForPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContextKeysForPrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5439,7 +5439,7 @@ const opGetCredentialReport = "GetCredentialReport" // GetCredentialReportRequest generates a "aws/request.Request" representing the // client's request for the GetCredentialReport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5535,7 +5535,7 @@ const opGetGroup = "GetGroup" // GetGroupRequest generates a "aws/request.Request" representing the // client's request for the GetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5676,7 +5676,7 @@ const opGetGroupPolicy = "GetGroupPolicy" // GetGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5776,7 +5776,7 @@ const opGetInstanceProfile = "GetInstanceProfile" // GetInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5863,7 +5863,7 @@ const opGetLoginProfile = "GetLoginProfile" // GetLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the GetLoginProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5949,7 +5949,7 @@ const opGetOpenIDConnectProvider = "GetOpenIDConnectProvider" // GetOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6038,7 +6038,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6139,7 +6139,7 @@ const opGetPolicyVersion = "GetPolicyVersion" // GetPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the GetPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6248,7 +6248,7 @@ const opGetRole = "GetRole" // GetRoleRequest generates a "aws/request.Request" representing the // client's request for the GetRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6340,7 +6340,7 @@ const opGetRolePolicy = "GetRolePolicy" // GetRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetRolePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6443,7 +6443,7 @@ const opGetSAMLProvider = "GetSAMLProvider" // GetSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the GetSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6534,7 +6534,7 @@ const opGetSSHPublicKey = "GetSSHPublicKey" // GetSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the GetSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6624,7 +6624,7 @@ const opGetServerCertificate = "GetServerCertificate" // GetServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetServerCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6713,7 +6713,7 @@ const opGetServiceLinkedRoleDeletionStatus = "GetServiceLinkedRoleDeletionStatus // GetServiceLinkedRoleDeletionStatusRequest generates a "aws/request.Request" representing the // client's request for the GetServiceLinkedRoleDeletionStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6806,7 +6806,7 @@ const opGetUser = "GetUser" // GetUserRequest generates a "aws/request.Request" representing the // client's request for the GetUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6894,7 +6894,7 @@ const opGetUserPolicy = "GetUserPolicy" // GetUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetUserPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6994,7 +6994,7 @@ const opListAccessKeys = "ListAccessKeys" // ListAccessKeysRequest generates a "aws/request.Request" representing the // client's request for the ListAccessKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7147,7 +7147,7 @@ const opListAccountAliases = "ListAccountAliases" // ListAccountAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAccountAliases operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7286,7 +7286,7 @@ const opListAttachedGroupPolicies = "ListAttachedGroupPolicies" // ListAttachedGroupPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedGroupPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7441,7 +7441,7 @@ const opListAttachedRolePolicies = "ListAttachedRolePolicies" // ListAttachedRolePoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedRolePolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7596,7 +7596,7 @@ const opListAttachedUserPolicies = "ListAttachedUserPolicies" // ListAttachedUserPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedUserPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7751,7 +7751,7 @@ const opListEntitiesForPolicy = "ListEntitiesForPolicy" // ListEntitiesForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListEntitiesForPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7903,7 +7903,7 @@ const opListGroupPolicies = "ListGroupPolicies" // ListGroupPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListGroupPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8054,7 +8054,7 @@ const opListGroups = "ListGroups" // ListGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8192,7 +8192,7 @@ const opListGroupsForUser = "ListGroupsForUser" // ListGroupsForUserRequest generates a "aws/request.Request" representing the // client's request for the ListGroupsForUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8334,7 +8334,7 @@ const opListInstanceProfiles = "ListInstanceProfiles" // ListInstanceProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfiles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8474,7 +8474,7 @@ const opListInstanceProfilesForRole = "ListInstanceProfilesForRole" // ListInstanceProfilesForRoleRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfilesForRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8618,7 +8618,7 @@ const opListMFADevices = "ListMFADevices" // ListMFADevicesRequest generates a "aws/request.Request" representing the // client's request for the ListMFADevices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8763,7 +8763,7 @@ const opListOpenIDConnectProviders = "ListOpenIDConnectProviders" // ListOpenIDConnectProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListOpenIDConnectProviders operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8844,7 +8844,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8992,7 +8992,7 @@ const opListPolicyVersions = "ListPolicyVersions" // ListPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9141,7 +9141,7 @@ const opListRolePolicies = "ListRolePolicies" // ListRolePoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListRolePolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9291,7 +9291,7 @@ const opListRoles = "ListRoles" // ListRolesRequest generates a "aws/request.Request" representing the // client's request for the ListRoles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9431,7 +9431,7 @@ const opListSAMLProviders = "ListSAMLProviders" // ListSAMLProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListSAMLProviders operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9513,7 +9513,7 @@ const opListSSHPublicKeys = "ListSSHPublicKeys" // ListSSHPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListSSHPublicKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9659,7 +9659,7 @@ const opListServerCertificates = "ListServerCertificates" // ListServerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListServerCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9803,7 +9803,7 @@ const opListServiceSpecificCredentials = "ListServiceSpecificCredentials" // ListServiceSpecificCredentialsRequest generates a "aws/request.Request" representing the // client's request for the ListServiceSpecificCredentials operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9892,7 +9892,7 @@ const opListSigningCertificates = "ListSigningCertificates" // ListSigningCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListSigningCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10042,7 +10042,7 @@ const opListUserPolicies = "ListUserPolicies" // ListUserPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListUserPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10191,7 +10191,7 @@ const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10331,7 +10331,7 @@ const opListVirtualMFADevices = "ListVirtualMFADevices" // ListVirtualMFADevicesRequest generates a "aws/request.Request" representing the // client's request for the ListVirtualMFADevices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10466,7 +10466,7 @@ const opPutGroupPolicy = "PutGroupPolicy" // PutGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutGroupPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10576,7 +10576,7 @@ const opPutRolePolicy = "PutRolePolicy" // PutRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutRolePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10698,7 +10698,7 @@ const opPutUserPolicy = "PutUserPolicy" // PutUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutUserPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10808,7 +10808,7 @@ const opRemoveClientIDFromOpenIDConnectProvider = "RemoveClientIDFromOpenIDConne // RemoveClientIDFromOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the RemoveClientIDFromOpenIDConnectProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10903,7 +10903,7 @@ const opRemoveRoleFromInstanceProfile = "RemoveRoleFromInstanceProfile" // RemoveRoleFromInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the RemoveRoleFromInstanceProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11008,7 +11008,7 @@ const opRemoveUserFromGroup = "RemoveUserFromGroup" // RemoveUserFromGroupRequest generates a "aws/request.Request" representing the // client's request for the RemoveUserFromGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11098,7 +11098,7 @@ const opResetServiceSpecificCredential = "ResetServiceSpecificCredential" // ResetServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the ResetServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11181,7 +11181,7 @@ const opResyncMFADevice = "ResyncMFADevice" // ResyncMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the ResyncMFADevice operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11280,7 +11280,7 @@ const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" // SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11383,7 +11383,7 @@ const opSimulateCustomPolicy = "SimulateCustomPolicy" // SimulateCustomPolicyRequest generates a "aws/request.Request" representing the // client's request for the SimulateCustomPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11539,7 +11539,7 @@ const opSimulatePrincipalPolicy = "SimulatePrincipalPolicy" // SimulatePrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the SimulatePrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11709,7 +11709,7 @@ const opUpdateAccessKey = "UpdateAccessKey" // UpdateAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccessKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11810,7 +11810,7 @@ const opUpdateAccountPasswordPolicy = "UpdateAccountPasswordPolicy" // UpdateAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccountPasswordPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11915,7 +11915,7 @@ const opUpdateAssumeRolePolicy = "UpdateAssumeRolePolicy" // UpdateAssumeRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssumeRolePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12018,7 +12018,7 @@ const opUpdateGroup = "UpdateGroup" // UpdateGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12123,7 +12123,7 @@ const opUpdateLoginProfile = "UpdateLoginProfile" // UpdateLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateLoginProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12227,7 +12227,7 @@ const opUpdateOpenIDConnectProviderThumbprint = "UpdateOpenIDConnectProviderThum // UpdateOpenIDConnectProviderThumbprintRequest generates a "aws/request.Request" representing the // client's request for the UpdateOpenIDConnectProviderThumbprint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12330,7 +12330,7 @@ const opUpdateRole = "UpdateRole" // UpdateRoleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12420,7 +12420,7 @@ const opUpdateRoleDescription = "UpdateRoleDescription" // UpdateRoleDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateRoleDescription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12513,7 +12513,7 @@ const opUpdateSAMLProvider = "UpdateSAMLProvider" // UpdateSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the UpdateSAMLProvider operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12607,7 +12607,7 @@ const opUpdateSSHPublicKey = "UpdateSSHPublicKey" // UpdateSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12698,7 +12698,7 @@ const opUpdateServerCertificate = "UpdateServerCertificate" // UpdateServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateServerCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12811,7 +12811,7 @@ const opUpdateServiceSpecificCredential = "UpdateServiceSpecificCredential" // UpdateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the UpdateServiceSpecificCredential operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12896,7 +12896,7 @@ const opUpdateSigningCertificate = "UpdateSigningCertificate" // UpdateSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -12994,7 +12994,7 @@ const opUpdateUser = "UpdateUser" // UpdateUserRequest generates a "aws/request.Request" representing the // client's request for the UpdateUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13105,7 +13105,7 @@ const opUploadSSHPublicKey = "UploadSSHPublicKey" // UploadSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UploadSSHPublicKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13207,7 +13207,7 @@ const opUploadServerCertificate = "UploadServerCertificate" // UploadServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the UploadServerCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -13328,7 +13328,7 @@ const opUploadSigningCertificate = "UploadSigningCertificate" // UploadSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the UploadSigningCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index 0376ef0c264..b59beb0315a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -17,7 +17,7 @@ const opAddAttributesToFindings = "AddAttributesToFindings" // AddAttributesToFindingsRequest generates a "aws/request.Request" representing the // client's request for the AddAttributesToFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -108,7 +108,7 @@ const opCreateAssessmentTarget = "CreateAssessmentTarget" // CreateAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the CreateAssessmentTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -208,7 +208,7 @@ const opCreateAssessmentTemplate = "CreateAssessmentTemplate" // CreateAssessmentTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateAssessmentTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -306,7 +306,7 @@ const opCreateResourceGroup = "CreateResourceGroup" // CreateResourceGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -399,7 +399,7 @@ const opDeleteAssessmentRun = "DeleteAssessmentRun" // DeleteAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -496,7 +496,7 @@ const opDeleteAssessmentTarget = "DeleteAssessmentTarget" // DeleteAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -593,7 +593,7 @@ const opDeleteAssessmentTemplate = "DeleteAssessmentTemplate" // DeleteAssessmentTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -690,7 +690,7 @@ const opDescribeAssessmentRuns = "DescribeAssessmentRuns" // DescribeAssessmentRunsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentRuns operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -774,7 +774,7 @@ const opDescribeAssessmentTargets = "DescribeAssessmentTargets" // DescribeAssessmentTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -858,7 +858,7 @@ const opDescribeAssessmentTemplates = "DescribeAssessmentTemplates" // DescribeAssessmentTemplatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentTemplates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -942,7 +942,7 @@ const opDescribeCrossAccountAccessRole = "DescribeCrossAccountAccessRole" // DescribeCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the // client's request for the DescribeCrossAccountAccessRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1021,7 +1021,7 @@ const opDescribeFindings = "DescribeFindings" // DescribeFindingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1104,7 +1104,7 @@ const opDescribeResourceGroups = "DescribeResourceGroups" // DescribeResourceGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourceGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1188,7 +1188,7 @@ const opDescribeRulesPackages = "DescribeRulesPackages" // DescribeRulesPackagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRulesPackages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1272,7 +1272,7 @@ const opGetAssessmentReport = "GetAssessmentReport" // GetAssessmentReportRequest generates a "aws/request.Request" representing the // client's request for the GetAssessmentReport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1374,7 +1374,7 @@ const opGetTelemetryMetadata = "GetTelemetryMetadata" // GetTelemetryMetadataRequest generates a "aws/request.Request" representing the // client's request for the GetTelemetryMetadata operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1465,7 +1465,7 @@ const opListAssessmentRunAgents = "ListAssessmentRunAgents" // ListAssessmentRunAgentsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentRunAgents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1612,7 +1612,7 @@ const opListAssessmentRuns = "ListAssessmentRuns" // ListAssessmentRunsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentRuns operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1759,7 +1759,7 @@ const opListAssessmentTargets = "ListAssessmentTargets" // ListAssessmentTargetsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1903,7 +1903,7 @@ const opListAssessmentTemplates = "ListAssessmentTemplates" // ListAssessmentTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentTemplates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2050,7 +2050,7 @@ const opListEventSubscriptions = "ListEventSubscriptions" // ListEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the ListEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2198,7 +2198,7 @@ const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2345,7 +2345,7 @@ const opListRulesPackages = "ListRulesPackages" // ListRulesPackagesRequest generates a "aws/request.Request" representing the // client's request for the ListRulesPackages operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2487,7 +2487,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2577,7 +2577,7 @@ const opPreviewAgents = "PreviewAgents" // PreviewAgentsRequest generates a "aws/request.Request" representing the // client's request for the PreviewAgents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2728,7 +2728,7 @@ const opRegisterCrossAccountAccessRole = "RegisterCrossAccountAccessRole" // RegisterCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the // client's request for the RegisterCrossAccountAccessRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2821,7 +2821,7 @@ const opRemoveAttributesFromFindings = "RemoveAttributesFromFindings" // RemoveAttributesFromFindingsRequest generates a "aws/request.Request" representing the // client's request for the RemoveAttributesFromFindings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2913,7 +2913,7 @@ const opSetTagsForResource = "SetTagsForResource" // SetTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the SetTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3006,7 +3006,7 @@ const opStartAssessmentRun = "StartAssessmentRun" // StartAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the StartAssessmentRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3110,7 +3110,7 @@ const opStopAssessmentRun = "StopAssessmentRun" // StopAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the StopAssessmentRun operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3202,7 +3202,7 @@ const opSubscribeToEvent = "SubscribeToEvent" // SubscribeToEventRequest generates a "aws/request.Request" representing the // client's request for the SubscribeToEvent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3299,7 +3299,7 @@ const opUnsubscribeFromEvent = "UnsubscribeFromEvent" // UnsubscribeFromEventRequest generates a "aws/request.Request" representing the // client's request for the UnsubscribeFromEvent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3392,7 +3392,7 @@ const opUpdateAssessmentTarget = "UpdateAssessmentTarget" // UpdateAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssessmentTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index 073a4623566..ef322f6b90e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -17,7 +17,7 @@ const opAcceptCertificateTransfer = "AcceptCertificateTransfer" // AcceptCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the AcceptCertificateTransfer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -118,7 +118,7 @@ const opAddThingToThingGroup = "AddThingToThingGroup" // AddThingToThingGroupRequest generates a "aws/request.Request" representing the // client's request for the AddThingToThingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -203,7 +203,7 @@ const opAssociateTargetsWithJob = "AssociateTargetsWithJob" // AssociateTargetsWithJobRequest generates a "aws/request.Request" representing the // client's request for the AssociateTargetsWithJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -299,7 +299,7 @@ const opAttachPolicy = "AttachPolicy" // AttachPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -395,7 +395,7 @@ const opAttachPrincipalPolicy = "AttachPrincipalPolicy" // AttachPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -497,7 +497,7 @@ const opAttachThingPrincipal = "AttachThingPrincipal" // AttachThingPrincipalRequest generates a "aws/request.Request" representing the // client's request for the AttachThingPrincipal operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -588,7 +588,7 @@ const opCancelCertificateTransfer = "CancelCertificateTransfer" // CancelCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the CancelCertificateTransfer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -694,7 +694,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -779,7 +779,7 @@ const opClearDefaultAuthorizer = "ClearDefaultAuthorizer" // ClearDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the ClearDefaultAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -870,7 +870,7 @@ const opCreateAuthorizer = "CreateAuthorizer" // CreateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the CreateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -964,7 +964,7 @@ const opCreateCertificateFromCsr = "CreateCertificateFromCsr" // CreateCertificateFromCsrRequest generates a "aws/request.Request" representing the // client's request for the CreateCertificateFromCsr operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1093,7 +1093,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1184,7 +1184,7 @@ const opCreateKeysAndCertificate = "CreateKeysAndCertificate" // CreateKeysAndCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateKeysAndCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1276,7 +1276,7 @@ const opCreateOTAUpdate = "CreateOTAUpdate" // CreateOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the CreateOTAUpdate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1370,7 +1370,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1468,7 +1468,7 @@ const opCreatePolicyVersion = "CreatePolicyVersion" // CreatePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1572,7 +1572,7 @@ const opCreateRoleAlias = "CreateRoleAlias" // CreateRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateRoleAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1666,7 +1666,7 @@ const opCreateStream = "CreateStream" // CreateStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1766,7 +1766,7 @@ const opCreateThing = "CreateThing" // CreateThingRequest generates a "aws/request.Request" representing the // client's request for the CreateThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1860,7 +1860,7 @@ const opCreateThingGroup = "CreateThingGroup" // CreateThingGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateThingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1945,7 +1945,7 @@ const opCreateThingType = "CreateThingType" // CreateThingTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateThingType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2036,7 +2036,7 @@ const opCreateTopicRule = "CreateTopicRule" // CreateTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateTopicRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2128,7 +2128,7 @@ const opDeleteAuthorizer = "DeleteAuthorizer" // DeleteAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DeleteAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2222,7 +2222,7 @@ const opDeleteCACertificate = "DeleteCACertificate" // DeleteCACertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCACertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2316,7 +2316,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2420,7 +2420,7 @@ const opDeleteOTAUpdate = "DeleteOTAUpdate" // DeleteOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the DeleteOTAUpdate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2511,7 +2511,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2617,7 +2617,7 @@ const opDeletePolicyVersion = "DeletePolicyVersion" // DeletePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2716,7 +2716,7 @@ const opDeleteRegistrationCode = "DeleteRegistrationCode" // DeleteRegistrationCodeRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegistrationCode operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2804,7 +2804,7 @@ const opDeleteRoleAlias = "DeleteRoleAlias" // DeleteRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteRoleAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2898,7 +2898,7 @@ const opDeleteStream = "DeleteStream" // DeleteStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2992,7 +2992,7 @@ const opDeleteThing = "DeleteThing" // DeleteThingRequest generates a "aws/request.Request" representing the // client's request for the DeleteThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3087,7 +3087,7 @@ const opDeleteThingGroup = "DeleteThingGroup" // DeleteThingGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteThingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3173,7 +3173,7 @@ const opDeleteThingType = "DeleteThingType" // DeleteThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteThingType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3268,7 +3268,7 @@ const opDeleteTopicRule = "DeleteTopicRule" // DeleteTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteTopicRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3355,7 +3355,7 @@ const opDeleteV2LoggingLevel = "DeleteV2LoggingLevel" // DeleteV2LoggingLevelRequest generates a "aws/request.Request" representing the // client's request for the DeleteV2LoggingLevel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3439,7 +3439,7 @@ const opDeprecateThingType = "DeprecateThingType" // DeprecateThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateThingType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3531,7 +3531,7 @@ const opDescribeAuthorizer = "DescribeAuthorizer" // DescribeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DescribeAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3622,7 +3622,7 @@ const opDescribeCACertificate = "DescribeCACertificate" // DescribeCACertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCACertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3713,7 +3713,7 @@ const opDescribeCertificate = "DescribeCertificate" // DescribeCertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3804,7 +3804,7 @@ const opDescribeDefaultAuthorizer = "DescribeDefaultAuthorizer" // DescribeDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3895,7 +3895,7 @@ const opDescribeEndpoint = "DescribeEndpoint" // DescribeEndpointRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3980,7 +3980,7 @@ const opDescribeEventConfigurations = "DescribeEventConfigurations" // DescribeEventConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4059,7 +4059,7 @@ const opDescribeIndex = "DescribeIndex" // DescribeIndexRequest generates a "aws/request.Request" representing the // client's request for the DescribeIndex operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4150,7 +4150,7 @@ const opDescribeJob = "DescribeJob" // DescribeJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4235,7 +4235,7 @@ const opDescribeJobExecution = "DescribeJobExecution" // DescribeJobExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4320,7 +4320,7 @@ const opDescribeRoleAlias = "DescribeRoleAlias" // DescribeRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the DescribeRoleAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4411,7 +4411,7 @@ const opDescribeStream = "DescribeStream" // DescribeStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4502,7 +4502,7 @@ const opDescribeThing = "DescribeThing" // DescribeThingRequest generates a "aws/request.Request" representing the // client's request for the DescribeThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4593,7 +4593,7 @@ const opDescribeThingGroup = "DescribeThingGroup" // DescribeThingGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4678,7 +4678,7 @@ const opDescribeThingRegistrationTask = "DescribeThingRegistrationTask" // DescribeThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingRegistrationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4766,7 +4766,7 @@ const opDescribeThingType = "DescribeThingType" // DescribeThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4857,7 +4857,7 @@ const opDetachPolicy = "DetachPolicy" // DetachPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4950,7 +4950,7 @@ const opDetachPrincipalPolicy = "DetachPrincipalPolicy" // DetachPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPrincipalPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5048,7 +5048,7 @@ const opDetachThingPrincipal = "DetachThingPrincipal" // DetachThingPrincipalRequest generates a "aws/request.Request" representing the // client's request for the DetachThingPrincipal operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5139,7 +5139,7 @@ const opDisableTopicRule = "DisableTopicRule" // DisableTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the DisableTopicRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5226,7 +5226,7 @@ const opEnableTopicRule = "EnableTopicRule" // EnableTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the EnableTopicRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5313,7 +5313,7 @@ const opGetEffectivePolicies = "GetEffectivePolicies" // GetEffectivePoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetEffectivePolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5407,7 +5407,7 @@ const opGetIndexingConfiguration = "GetIndexingConfiguration" // GetIndexingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetIndexingConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5495,7 +5495,7 @@ const opGetJobDocument = "GetJobDocument" // GetJobDocumentRequest generates a "aws/request.Request" representing the // client's request for the GetJobDocument operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5580,7 +5580,7 @@ const opGetLoggingOptions = "GetLoggingOptions" // GetLoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5662,7 +5662,7 @@ const opGetOTAUpdate = "GetOTAUpdate" // GetOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the GetOTAUpdate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5753,7 +5753,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5845,7 +5845,7 @@ const opGetPolicyVersion = "GetPolicyVersion" // GetPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the GetPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5936,7 +5936,7 @@ const opGetRegistrationCode = "GetRegistrationCode" // GetRegistrationCodeRequest generates a "aws/request.Request" representing the // client's request for the GetRegistrationCode operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6024,7 +6024,7 @@ const opGetTopicRule = "GetTopicRule" // GetTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the GetTopicRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6109,7 +6109,7 @@ const opGetV2LoggingOptions = "GetV2LoggingOptions" // GetV2LoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the GetV2LoggingOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6191,7 +6191,7 @@ const opListAttachedPolicies = "ListAttachedPolicies" // ListAttachedPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6285,7 +6285,7 @@ const opListAuthorizers = "ListAuthorizers" // ListAuthorizersRequest generates a "aws/request.Request" representing the // client's request for the ListAuthorizers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6373,7 +6373,7 @@ const opListCACertificates = "ListCACertificates" // ListCACertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCACertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6464,7 +6464,7 @@ const opListCertificates = "ListCertificates" // ListCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6555,7 +6555,7 @@ const opListCertificatesByCA = "ListCertificatesByCA" // ListCertificatesByCARequest generates a "aws/request.Request" representing the // client's request for the ListCertificatesByCA operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6643,7 +6643,7 @@ const opListIndices = "ListIndices" // ListIndicesRequest generates a "aws/request.Request" representing the // client's request for the ListIndices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6731,7 +6731,7 @@ const opListJobExecutionsForJob = "ListJobExecutionsForJob" // ListJobExecutionsForJobRequest generates a "aws/request.Request" representing the // client's request for the ListJobExecutionsForJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6816,7 +6816,7 @@ const opListJobExecutionsForThing = "ListJobExecutionsForThing" // ListJobExecutionsForThingRequest generates a "aws/request.Request" representing the // client's request for the ListJobExecutionsForThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6901,7 +6901,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6986,7 +6986,7 @@ const opListOTAUpdates = "ListOTAUpdates" // ListOTAUpdatesRequest generates a "aws/request.Request" representing the // client's request for the ListOTAUpdates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7074,7 +7074,7 @@ const opListOutgoingCertificates = "ListOutgoingCertificates" // ListOutgoingCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListOutgoingCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7162,7 +7162,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7250,7 +7250,7 @@ const opListPolicyPrincipals = "ListPolicyPrincipals" // ListPolicyPrincipalsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyPrincipals operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7346,7 +7346,7 @@ const opListPolicyVersions = "ListPolicyVersions" // ListPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7437,7 +7437,7 @@ const opListPrincipalPolicies = "ListPrincipalPolicies" // ListPrincipalPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7534,7 +7534,7 @@ const opListPrincipalThings = "ListPrincipalThings" // ListPrincipalThingsRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalThings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7625,7 +7625,7 @@ const opListRoleAliases = "ListRoleAliases" // ListRoleAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListRoleAliases operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7713,7 +7713,7 @@ const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListStreams operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7801,7 +7801,7 @@ const opListTargetsForPolicy = "ListTargetsForPolicy" // ListTargetsForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7895,7 +7895,7 @@ const opListThingGroups = "ListThingGroups" // ListThingGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListThingGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7977,7 +7977,7 @@ const opListThingGroupsForThing = "ListThingGroupsForThing" // ListThingGroupsForThingRequest generates a "aws/request.Request" representing the // client's request for the ListThingGroupsForThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8059,7 +8059,7 @@ const opListThingPrincipals = "ListThingPrincipals" // ListThingPrincipalsRequest generates a "aws/request.Request" representing the // client's request for the ListThingPrincipals operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8150,7 +8150,7 @@ const opListThingRegistrationTaskReports = "ListThingRegistrationTaskReports" // ListThingRegistrationTaskReportsRequest generates a "aws/request.Request" representing the // client's request for the ListThingRegistrationTaskReports operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8235,7 +8235,7 @@ const opListThingRegistrationTasks = "ListThingRegistrationTasks" // ListThingRegistrationTasksRequest generates a "aws/request.Request" representing the // client's request for the ListThingRegistrationTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8320,7 +8320,7 @@ const opListThingTypes = "ListThingTypes" // ListThingTypesRequest generates a "aws/request.Request" representing the // client's request for the ListThingTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8408,7 +8408,7 @@ const opListThings = "ListThings" // ListThingsRequest generates a "aws/request.Request" representing the // client's request for the ListThings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8499,7 +8499,7 @@ const opListThingsInThingGroup = "ListThingsInThingGroup" // ListThingsInThingGroupRequest generates a "aws/request.Request" representing the // client's request for the ListThingsInThingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8581,7 +8581,7 @@ const opListTopicRules = "ListTopicRules" // ListTopicRulesRequest generates a "aws/request.Request" representing the // client's request for the ListTopicRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8663,7 +8663,7 @@ const opListV2LoggingLevels = "ListV2LoggingLevels" // ListV2LoggingLevelsRequest generates a "aws/request.Request" representing the // client's request for the ListV2LoggingLevels operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8748,7 +8748,7 @@ const opRegisterCACertificate = "RegisterCACertificate" // RegisterCACertificateRequest generates a "aws/request.Request" representing the // client's request for the RegisterCACertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8854,7 +8854,7 @@ const opRegisterCertificate = "RegisterCertificate" // RegisterCertificateRequest generates a "aws/request.Request" representing the // client's request for the RegisterCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8958,7 +8958,7 @@ const opRegisterThing = "RegisterThing" // RegisterThingRequest generates a "aws/request.Request" representing the // client's request for the RegisterThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9053,7 +9053,7 @@ const opRejectCertificateTransfer = "RejectCertificateTransfer" // RejectCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the RejectCertificateTransfer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9158,7 +9158,7 @@ const opRemoveThingFromThingGroup = "RemoveThingFromThingGroup" // RemoveThingFromThingGroupRequest generates a "aws/request.Request" representing the // client's request for the RemoveThingFromThingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9243,7 +9243,7 @@ const opReplaceTopicRule = "ReplaceTopicRule" // ReplaceTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the ReplaceTopicRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9335,7 +9335,7 @@ const opSearchIndex = "SearchIndex" // SearchIndexRequest generates a "aws/request.Request" representing the // client's request for the SearchIndex operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9432,7 +9432,7 @@ const opSetDefaultAuthorizer = "SetDefaultAuthorizer" // SetDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9527,7 +9527,7 @@ const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" // SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9623,7 +9623,7 @@ const opSetLoggingOptions = "SetLoggingOptions" // SetLoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the SetLoggingOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9707,7 +9707,7 @@ const opSetV2LoggingLevel = "SetV2LoggingLevel" // SetV2LoggingLevelRequest generates a "aws/request.Request" representing the // client's request for the SetV2LoggingLevel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9794,7 +9794,7 @@ const opSetV2LoggingOptions = "SetV2LoggingOptions" // SetV2LoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the SetV2LoggingOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9878,7 +9878,7 @@ const opStartThingRegistrationTask = "StartThingRegistrationTask" // StartThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the StartThingRegistrationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9963,7 +9963,7 @@ const opStopThingRegistrationTask = "StopThingRegistrationTask" // StopThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the StopThingRegistrationTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10051,7 +10051,7 @@ const opTestAuthorization = "TestAuthorization" // TestAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the TestAuthorization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10145,7 +10145,7 @@ const opTestInvokeAuthorizer = "TestInvokeAuthorizer" // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10239,7 +10239,7 @@ const opTransferCertificate = "TransferCertificate" // TransferCertificateRequest generates a "aws/request.Request" representing the // client's request for the TransferCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10348,7 +10348,7 @@ const opUpdateAuthorizer = "UpdateAuthorizer" // UpdateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthorizer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10442,7 +10442,7 @@ const opUpdateCACertificate = "UpdateCACertificate" // UpdateCACertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCACertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10535,7 +10535,7 @@ const opUpdateCertificate = "UpdateCertificate" // UpdateCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10637,7 +10637,7 @@ const opUpdateEventConfigurations = "UpdateEventConfigurations" // UpdateEventConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the UpdateEventConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10719,7 +10719,7 @@ const opUpdateIndexingConfiguration = "UpdateIndexingConfiguration" // UpdateIndexingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateIndexingConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10807,7 +10807,7 @@ const opUpdateRoleAlias = "UpdateRoleAlias" // UpdateRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateRoleAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10898,7 +10898,7 @@ const opUpdateStream = "UpdateStream" // UpdateStreamRequest generates a "aws/request.Request" representing the // client's request for the UpdateStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -10989,7 +10989,7 @@ const opUpdateThing = "UpdateThing" // UpdateThingRequest generates a "aws/request.Request" representing the // client's request for the UpdateThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11084,7 +11084,7 @@ const opUpdateThingGroup = "UpdateThingGroup" // UpdateThingGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateThingGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -11173,7 +11173,7 @@ const opUpdateThingGroupsForThing = "UpdateThingGroupsForThing" // UpdateThingGroupsForThingRequest generates a "aws/request.Request" representing the // client's request for the UpdateThingGroupsForThing operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go index 3d6e3cd1275..b99202f131c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go @@ -17,7 +17,7 @@ const opAddTagsToStream = "AddTagsToStream" // AddTagsToStreamRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -117,7 +117,7 @@ const opCreateStream = "CreateStream" // CreateStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -245,7 +245,7 @@ const opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod" // DecreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the DecreaseStreamRetentionPeriod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -345,7 +345,7 @@ const opDeleteStream = "DeleteStream" // DeleteStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -450,7 +450,7 @@ const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLimits operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -535,7 +535,7 @@ const opDescribeStream = "DescribeStream" // DescribeStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -693,7 +693,7 @@ const opDescribeStreamSummary = "DescribeStreamSummary" // DescribeStreamSummaryRequest generates a "aws/request.Request" representing the // client's request for the DescribeStreamSummary operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -782,7 +782,7 @@ const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring" // DisableEnhancedMonitoringRequest generates a "aws/request.Request" representing the // client's request for the DisableEnhancedMonitoring operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -874,7 +874,7 @@ const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring" // EnableEnhancedMonitoringRequest generates a "aws/request.Request" representing the // client's request for the EnableEnhancedMonitoring operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -966,7 +966,7 @@ const opGetRecords = "GetRecords" // GetRecordsRequest generates a "aws/request.Request" representing the // client's request for the GetRecords operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1139,7 +1139,7 @@ const opGetShardIterator = "GetShardIterator" // GetShardIteratorRequest generates a "aws/request.Request" representing the // client's request for the GetShardIterator operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1269,7 +1269,7 @@ const opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod" // IncreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the IncreaseStreamRetentionPeriod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1373,7 +1373,7 @@ const opListShards = "ListShards" // ListShardsRequest generates a "aws/request.Request" representing the // client's request for the ListShards operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1475,7 +1475,7 @@ const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListStreams operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1626,7 +1626,7 @@ const opListTagsForStream = "ListTagsForStream" // ListTagsForStreamRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1715,7 +1715,7 @@ const opMergeShards = "MergeShards" // MergeShardsRequest generates a "aws/request.Request" representing the // client's request for the MergeShards operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1844,7 +1844,7 @@ const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the // client's request for the PutRecord operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2000,7 +2000,7 @@ const opPutRecords = "PutRecords" // PutRecordsRequest generates a "aws/request.Request" representing the // client's request for the PutRecords operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2176,7 +2176,7 @@ const opRemoveTagsFromStream = "RemoveTagsFromStream" // RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromStream operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2275,7 +2275,7 @@ const opSplitShard = "SplitShard" // SplitShardRequest generates a "aws/request.Request" representing the // client's request for the SplitShard operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2413,7 +2413,7 @@ const opStartStreamEncryption = "StartStreamEncryption" // StartStreamEncryptionRequest generates a "aws/request.Request" representing the // client's request for the StartStreamEncryption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2551,7 +2551,7 @@ const opStopStreamEncryption = "StopStreamEncryption" // StopStreamEncryptionRequest generates a "aws/request.Request" representing the // client's request for the StopStreamEncryption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2662,7 +2662,7 @@ const opUpdateShardCount = "UpdateShardCount" // UpdateShardCountRequest generates a "aws/request.Request" representing the // client's request for the UpdateShardCount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index e67cf240d47..eae39301151 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -17,7 +17,7 @@ const opCancelKeyDeletion = "CancelKeyDeletion" // CancelKeyDeletionRequest generates a "aws/request.Request" representing the // client's request for the CancelKeyDeletion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -123,7 +123,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -255,7 +255,7 @@ const opCreateGrant = "CreateGrant" // CreateGrantRequest generates a "aws/request.Request" representing the // client's request for the CreateGrant operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -372,7 +372,7 @@ const opCreateKey = "CreateKey" // CreateKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -487,7 +487,7 @@ const opDecrypt = "Decrypt" // DecryptRequest generates a "aws/request.Request" representing the // client's request for the Decrypt operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -614,7 +614,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -722,7 +722,7 @@ const opDeleteImportedKeyMaterial = "DeleteImportedKeyMaterial" // DeleteImportedKeyMaterialRequest generates a "aws/request.Request" representing the // client's request for the DeleteImportedKeyMaterial operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -837,7 +837,7 @@ const opDescribeKey = "DescribeKey" // DescribeKeyRequest generates a "aws/request.Request" representing the // client's request for the DescribeKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -931,7 +931,7 @@ const opDisableKey = "DisableKey" // DisableKeyRequest generates a "aws/request.Request" representing the // client's request for the DisableKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1038,7 +1038,7 @@ const opDisableKeyRotation = "DisableKeyRotation" // DisableKeyRotationRequest generates a "aws/request.Request" representing the // client's request for the DisableKeyRotation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1148,7 +1148,7 @@ const opEnableKey = "EnableKey" // EnableKeyRequest generates a "aws/request.Request" representing the // client's request for the EnableKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1256,7 +1256,7 @@ const opEnableKeyRotation = "EnableKeyRotation" // EnableKeyRotationRequest generates a "aws/request.Request" representing the // client's request for the EnableKeyRotation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1366,7 +1366,7 @@ const opEncrypt = "Encrypt" // EncryptRequest generates a "aws/request.Request" representing the // client's request for the Encrypt operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1497,7 +1497,7 @@ const opGenerateDataKey = "GenerateDataKey" // GenerateDataKeyRequest generates a "aws/request.Request" representing the // client's request for the GenerateDataKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1651,7 +1651,7 @@ const opGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext" // GenerateDataKeyWithoutPlaintextRequest generates a "aws/request.Request" representing the // client's request for the GenerateDataKeyWithoutPlaintext operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1777,7 +1777,7 @@ const opGenerateRandom = "GenerateRandom" // GenerateRandomRequest generates a "aws/request.Request" representing the // client's request for the GenerateRandom operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1865,7 +1865,7 @@ const opGetKeyPolicy = "GetKeyPolicy" // GetKeyPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetKeyPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1965,7 +1965,7 @@ const opGetKeyRotationStatus = "GetKeyRotationStatus" // GetKeyRotationStatusRequest generates a "aws/request.Request" representing the // client's request for the GetKeyRotationStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2072,7 +2072,7 @@ const opGetParametersForImport = "GetParametersForImport" // GetParametersForImportRequest generates a "aws/request.Request" representing the // client's request for the GetParametersForImport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2191,7 +2191,7 @@ const opImportKeyMaterial = "ImportKeyMaterial" // ImportKeyMaterialRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyMaterial operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2348,7 +2348,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2499,7 +2499,7 @@ const opListGrants = "ListGrants" // ListGrantsRequest generates a "aws/request.Request" representing the // client's request for the ListGrants operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2661,7 +2661,7 @@ const opListKeyPolicies = "ListKeyPolicies" // ListKeyPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListKeyPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2819,7 +2819,7 @@ const opListKeys = "ListKeys" // ListKeysRequest generates a "aws/request.Request" representing the // client's request for the ListKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2964,7 +2964,7 @@ const opListResourceTags = "ListResourceTags" // ListResourceTagsRequest generates a "aws/request.Request" representing the // client's request for the ListResourceTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3057,7 +3057,7 @@ const opListRetirableGrants = "ListRetirableGrants" // ListRetirableGrantsRequest generates a "aws/request.Request" representing the // client's request for the ListRetirableGrants operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3156,7 +3156,7 @@ const opPutKeyPolicy = "PutKeyPolicy" // PutKeyPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutKeyPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3274,7 +3274,7 @@ const opReEncrypt = "ReEncrypt" // ReEncryptRequest generates a "aws/request.Request" representing the // client's request for the ReEncrypt operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3401,7 +3401,7 @@ const opRetireGrant = "RetireGrant" // RetireGrantRequest generates a "aws/request.Request" representing the // client's request for the RetireGrant operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3523,7 +3523,7 @@ const opRevokeGrant = "RevokeGrant" // RevokeGrantRequest generates a "aws/request.Request" representing the // client's request for the RevokeGrant operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3631,7 +3631,7 @@ const opScheduleKeyDeletion = "ScheduleKeyDeletion" // ScheduleKeyDeletionRequest generates a "aws/request.Request" representing the // client's request for the ScheduleKeyDeletion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3747,7 +3747,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3866,7 +3866,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3971,7 +3971,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4088,7 +4088,7 @@ const opUpdateKeyDescription = "UpdateKeyDescription" // UpdateKeyDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateKeyDescription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index d4e8db908c8..8024623fe93 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -17,7 +17,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -64,7 +64,7 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // you add to the resource policy allows an event source, permission to invoke // the Lambda function. // -// For information about the push model, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html). +// For information about the push model, see Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html). // // If you are using versioning, the permissions you add are specific to the // Lambda function version or alias you specify in the AddPermission request @@ -132,7 +132,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -229,7 +229,7 @@ const opCreateEventSourceMapping = "CreateEventSourceMapping" // CreateEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -276,16 +276,11 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // This association between a stream source and a Lambda function is called // the event source mapping. // -// This event source mapping is relevant only in the AWS Lambda pull model, -// where AWS Lambda invokes the function. For more information, see AWS Lambda: -// How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html) -// in the AWS Lambda Developer Guide. -// // You provide mapping information (for example, which stream to read from and // which Lambda function to invoke) in the request body. // // Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be -// associated with multiple AWS Lambda function. A given Lambda function can +// associated with multiple AWS Lambda functions. A given Lambda function can // be associated with multiple AWS event sources. // // If you are using versioning, you can specify a specific function version @@ -346,7 +341,7 @@ const opCreateFunction = "CreateFunction" // CreateFunctionRequest generates a "aws/request.Request" representing the // client's request for the CreateFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -451,7 +446,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -542,7 +537,7 @@ const opDeleteEventSourceMapping = "DeleteEventSourceMapping" // DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -636,7 +631,7 @@ const opDeleteFunction = "DeleteFunction" // DeleteFunctionRequest generates a "aws/request.Request" representing the // client's request for the DeleteFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -743,7 +738,7 @@ const opDeleteFunctionConcurrency = "DeleteFunctionConcurrency" // DeleteFunctionConcurrencyRequest generates a "aws/request.Request" representing the // client's request for the DeleteFunctionConcurrency operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -836,7 +831,7 @@ const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSettings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -923,7 +918,7 @@ const opGetAlias = "GetAlias" // GetAliasRequest generates a "aws/request.Request" representing the // client's request for the GetAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1017,7 +1012,7 @@ const opGetEventSourceMapping = "GetEventSourceMapping" // GetEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the GetEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1110,7 +1105,7 @@ const opGetFunction = "GetFunction" // GetFunctionRequest generates a "aws/request.Request" representing the // client's request for the GetFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1212,7 +1207,7 @@ const opGetFunctionConfiguration = "GetFunctionConfiguration" // GetFunctionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetFunctionConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1314,7 +1309,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1411,7 +1406,7 @@ const opInvoke = "Invoke" // InvokeRequest generates a "aws/request.Request" representing the // client's request for the Invoke operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1577,7 +1572,7 @@ const opInvokeAsync = "InvokeAsync" // InvokeAsyncRequest generates a "aws/request.Request" representing the // client's request for the InvokeAsync operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1675,7 +1670,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1770,7 +1765,7 @@ const opListEventSourceMappings = "ListEventSourceMappings" // ListEventSourceMappingsRequest generates a "aws/request.Request" representing the // client's request for the ListEventSourceMappings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1928,7 +1923,7 @@ const opListFunctions = "ListFunctions" // ListFunctionsRequest generates a "aws/request.Request" representing the // client's request for the ListFunctions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2078,7 +2073,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2119,7 +2114,9 @@ func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, ou // ListTags API operation for AWS Lambda. // // Returns a list of tags assigned to a function when supplied the function -// ARN (Amazon Resource Name). +// ARN (Amazon Resource Name). For more information on Tagging, see Tagging +// Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) +// in the AWS Lambda Developer Guide. // // 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 @@ -2169,7 +2166,7 @@ const opListVersionsByFunction = "ListVersionsByFunction" // ListVersionsByFunctionRequest generates a "aws/request.Request" representing the // client's request for the ListVersionsByFunction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2260,7 +2257,7 @@ const opPublishVersion = "PublishVersion" // PublishVersionRequest generates a "aws/request.Request" representing the // client's request for the PublishVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2362,7 +2359,7 @@ const opPutFunctionConcurrency = "PutFunctionConcurrency" // PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the // client's request for the PutFunctionConcurrency operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2457,7 +2454,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2566,7 +2563,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2611,6 +2608,8 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque // Creates a list of tags (key-value pairs) on the Lambda function. Requires // the Lambda function ARN (Amazon Resource Name). If a key is specified without // a value, Lambda creates a tag with the specified key and a value of null. +// For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) +// in the AWS Lambda Developer Guide. // // 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 @@ -2660,7 +2659,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2703,7 +2702,8 @@ func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.R // UntagResource API operation for AWS Lambda. // // Removes tags from a Lambda function. Requires the function ARN (Amazon Resource -// Name). +// Name). For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) +// in the AWS Lambda Developer Guide. // // 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 @@ -2753,7 +2753,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2852,7 +2852,7 @@ const opUpdateEventSourceMapping = "UpdateEventSourceMapping" // UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the UpdateEventSourceMapping operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2961,7 +2961,7 @@ const opUpdateFunctionCode = "UpdateFunctionCode" // UpdateFunctionCodeRequest generates a "aws/request.Request" representing the // client's request for the UpdateFunctionCode operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3067,7 +3067,7 @@ const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration" // UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateFunctionConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3719,9 +3719,11 @@ type CreateEventSourceMappingInput struct { // FunctionName is a required field FunctionName *string `min:"1" type:"string" required:"true"` - // The position in the stream where AWS Lambda should start reading. Valid only - // for Kinesis streams. For more information, see ShardIteratorType (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) - // in the Amazon Kinesis API Reference. + // The position in the DynamoDB or Kinesis stream where AWS Lambda should start + // reading. For more information, see GetShardIterator (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) + // in the Amazon Kinesis API Reference Guide or GetShardIterator (http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) + // in the Amazon DynamoDB API Reference Guide. The AT_TIMESTAMP value is supported + // only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). // // StartingPosition is a required field StartingPosition *string `type:"string" required:"true" enum:"EventSourcePosition"` @@ -3731,7 +3733,7 @@ type CreateEventSourceMappingInput struct { // AT_TIMESTAMP. If a record with this exact timestamp does not exist, the iterator // returned is for the next (later) record. If the timestamp is older than the // current trim horizon, the iterator returned is for the oldest untrimmed data - // record (TRIM_HORIZON). Valid only for Kinesis streams. + // record (TRIM_HORIZON). Valid only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). StartingPositionTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` } @@ -3815,7 +3817,7 @@ type CreateFunctionInput struct { Code *FunctionCode `type:"structure" required:"true"` // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. + // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. DeadLetterConfig *DeadLetterConfig `type:"structure"` // A short, user-defined function description. Lambda does not use this value. @@ -3871,7 +3873,8 @@ type CreateFunctionInput struct { // To use the Python runtime v3.6, set the value to "python3.6". To use the // Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime // v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set - // the value to "nodejs4.3". + // the value to "nodejs4.3". To use the .NET Core runtime v1.0, set the value + // to "dotnetcore1.0". To use the .NET Core runtime v2.0, set the value to "dotnetcore2.0". // // 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 @@ -3882,7 +3885,9 @@ type CreateFunctionInput struct { // Runtime is a required field Runtime *string `type:"string" required:"true" enum:"Runtime"` - // The list of tags (key-value pairs) assigned to the new function. + // The list of tags (key-value pairs) assigned to the new function. For more + // information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. Tags map[string]*string `type:"map"` // The function execution time at which Lambda should terminate the function. @@ -4039,13 +4044,14 @@ func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput { return s } -// The parent object that contains the target ARN (Amazon Resource Name) of -// an Amazon SQS queue or Amazon SNS topic. +// The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic +// you specify as your Dead Letter Queue (DLQ). For more information, see dlq. type DeadLetterConfig struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic - // you specify as your Dead Letter Queue (DLQ). + // you specify as your Dead Letter Queue (DLQ). dlq. For more information, see + // dlq. TargetArn *string `type:"string"` } @@ -4632,7 +4638,7 @@ type FunctionConfiguration struct { CodeSize *int64 `type:"long"` // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. + // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. DeadLetterConfig *DeadLetterConfig `type:"structure"` // The user-provided description. @@ -5113,7 +5119,9 @@ type GetFunctionOutput struct { // A complex type that describes function metadata. Configuration *FunctionConfiguration `type:"structure"` - // Returns the list of tags associated with the function. + // Returns the list of tags associated with the function. For more information, + // see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. Tags map[string]*string `type:"map"` } @@ -5865,7 +5873,9 @@ func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput { type ListTagsInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the function. + // The ARN (Amazon Resource Name) of the function. For more information, see + // Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. // // Resource is a required field Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` @@ -5903,7 +5913,9 @@ func (s *ListTagsInput) SetResource(v string) *ListTagsInput { type ListTagsOutput struct { _ struct{} `type:"structure"` - // The list of tags assigned to the function. + // The list of tags assigned to the function. For more information, see Tagging + // Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. Tags map[string]*string `type:"map"` } @@ -6296,12 +6308,16 @@ func (s RemovePermissionOutput) GoString() string { type TagResourceInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the Lambda function. + // The ARN (Amazon Resource Name) of the Lambda function. For more information, + // see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. // // Resource is a required field Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` // The list of tags (key-value pairs) you are assigning to the Lambda function. + // For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. // // Tags is a required field Tags map[string]*string `type:"map" required:"true"` @@ -6414,12 +6430,16 @@ func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse { type UntagResourceInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the function. + // The ARN (Amazon Resource Name) of the function. For more information, see + // Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. // // Resource is a required field Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` - // The list of tag keys to be deleted from the function. + // The list of tag keys to be deleted from the function. For more information, + // see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // in the AWS Lambda Developer Guide. // // TagKeys is a required field TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` @@ -6718,8 +6738,7 @@ type UpdateFunctionCodeInput struct { // are using the web API directly, the contents of the zip file must be base64-encoded. // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the // encoding for you. For more information about creating a .zip file, see Execution - // Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html) - // in the AWS Lambda Developer Guide. + // Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html). // // ZipFile is automatically base64 encoded/decoded by the SDK. ZipFile []byte `type:"blob"` @@ -6812,7 +6831,7 @@ type UpdateFunctionConfigurationInput struct { _ struct{} `type:"structure"` // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. + // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. DeadLetterConfig *DeadLetterConfig `type:"structure"` // A short user-defined function description. AWS Lambda does not use this value. @@ -6866,8 +6885,8 @@ type UpdateFunctionConfigurationInput struct { // To use the Python runtime v3.6, set the value to "python3.6". To use the // Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime // v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set - // the value to "nodejs4.3". To use the Python runtime v3.6, set the value to - // "python3.6". + // the value to "nodejs4.3". To use the .NET Core runtime v1.0, set the value + // to "dotnetcore1.0". To use the .NET Core runtime v2.0, set the value to "dotnetcore2.0". // // 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 @@ -7124,6 +7143,9 @@ const ( // RuntimeNodejs610 is a Runtime enum value RuntimeNodejs610 = "nodejs6.10" + // RuntimeNodejs810 is a Runtime enum value + RuntimeNodejs810 = "nodejs8.10" + // RuntimeJava8 is a Runtime enum value RuntimeJava8 = "java8" diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go index 1693e732082..c396a9b784f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go @@ -17,7 +17,7 @@ const opCreateBotVersion = "CreateBotVersion" // CreateBotVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateBotVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -124,7 +124,7 @@ const opCreateIntentVersion = "CreateIntentVersion" // CreateIntentVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateIntentVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -233,7 +233,7 @@ const opCreateSlotTypeVersion = "CreateSlotTypeVersion" // CreateSlotTypeVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateSlotTypeVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -341,7 +341,7 @@ const opDeleteBot = "DeleteBot" // DeleteBotRequest generates a "aws/request.Request" representing the // client's request for the DeleteBot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -458,7 +458,7 @@ const opDeleteBotAlias = "DeleteBotAlias" // DeleteBotAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -574,7 +574,7 @@ const opDeleteBotChannelAssociation = "DeleteBotChannelAssociation" // DeleteBotChannelAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotChannelAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -672,7 +672,7 @@ const opDeleteBotVersion = "DeleteBotVersion" // DeleteBotVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -783,7 +783,7 @@ const opDeleteIntent = "DeleteIntent" // DeleteIntentRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -904,7 +904,7 @@ const opDeleteIntentVersion = "DeleteIntentVersion" // DeleteIntentVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntentVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1015,7 +1015,7 @@ const opDeleteSlotType = "DeleteSlotType" // DeleteSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteSlotType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1138,7 +1138,7 @@ const opDeleteSlotTypeVersion = "DeleteSlotTypeVersion" // DeleteSlotTypeVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteSlotTypeVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1249,7 +1249,7 @@ const opDeleteUtterances = "DeleteUtterances" // DeleteUtterancesRequest generates a "aws/request.Request" representing the // client's request for the DeleteUtterances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1351,7 +1351,7 @@ const opGetBot = "GetBot" // GetBotRequest generates a "aws/request.Request" representing the // client's request for the GetBot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1444,7 +1444,7 @@ const opGetBotAlias = "GetBotAlias" // GetBotAliasRequest generates a "aws/request.Request" representing the // client's request for the GetBotAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1537,7 +1537,7 @@ const opGetBotAliases = "GetBotAliases" // GetBotAliasesRequest generates a "aws/request.Request" representing the // client's request for the GetBotAliases operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1681,7 +1681,7 @@ const opGetBotChannelAssociation = "GetBotChannelAssociation" // GetBotChannelAssociationRequest generates a "aws/request.Request" representing the // client's request for the GetBotChannelAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1775,7 +1775,7 @@ const opGetBotChannelAssociations = "GetBotChannelAssociations" // GetBotChannelAssociationsRequest generates a "aws/request.Request" representing the // client's request for the GetBotChannelAssociations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1920,7 +1920,7 @@ const opGetBotVersions = "GetBotVersions" // GetBotVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetBotVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2076,7 +2076,7 @@ const opGetBots = "GetBots" // GetBotsRequest generates a "aws/request.Request" representing the // client's request for the GetBots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2231,7 +2231,7 @@ const opGetBuiltinIntent = "GetBuiltinIntent" // GetBuiltinIntentRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinIntent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2323,7 +2323,7 @@ const opGetBuiltinIntents = "GetBuiltinIntents" // GetBuiltinIntentsRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinIntents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2467,7 +2467,7 @@ const opGetBuiltinSlotTypes = "GetBuiltinSlotTypes" // GetBuiltinSlotTypesRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinSlotTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2614,7 +2614,7 @@ const opGetExport = "GetExport" // GetExportRequest generates a "aws/request.Request" representing the // client's request for the GetExport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2704,7 +2704,7 @@ const opGetImport = "GetImport" // GetImportRequest generates a "aws/request.Request" representing the // client's request for the GetImport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2794,7 +2794,7 @@ const opGetIntent = "GetIntent" // GetIntentRequest generates a "aws/request.Request" representing the // client's request for the GetIntent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2887,7 +2887,7 @@ const opGetIntentVersions = "GetIntentVersions" // GetIntentVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetIntentVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3043,7 +3043,7 @@ const opGetIntents = "GetIntents" // GetIntentsRequest generates a "aws/request.Request" representing the // client's request for the GetIntents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3197,7 +3197,7 @@ const opGetSlotType = "GetSlotType" // GetSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the GetSlotType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3290,7 +3290,7 @@ const opGetSlotTypeVersions = "GetSlotTypeVersions" // GetSlotTypeVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetSlotTypeVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3446,7 +3446,7 @@ const opGetSlotTypes = "GetSlotTypes" // GetSlotTypesRequest generates a "aws/request.Request" representing the // client's request for the GetSlotTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3600,7 +3600,7 @@ const opGetUtterancesView = "GetUtterancesView" // GetUtterancesViewRequest generates a "aws/request.Request" representing the // client's request for the GetUtterancesView operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3706,7 +3706,7 @@ const opPutBot = "PutBot" // PutBotRequest generates a "aws/request.Request" representing the // client's request for the PutBot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3812,7 +3812,7 @@ const opPutBotAlias = "PutBotAlias" // PutBotAliasRequest generates a "aws/request.Request" representing the // client's request for the PutBotAlias operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3909,7 +3909,7 @@ const opPutIntent = "PutIntent" // PutIntentRequest generates a "aws/request.Request" representing the // client's request for the PutIntent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4047,7 +4047,7 @@ const opPutSlotType = "PutSlotType" // PutSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the PutSlotType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4153,7 +4153,7 @@ const opStartImport = "StartImport" // StartImportRequest generates a "aws/request.Request" representing the // client's request for the StartImport operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 3d8e0c950e6..0feedda0afc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -14,7 +14,7 @@ const opAllocateStaticIp = "AllocateStaticIp" // AllocateStaticIpRequest generates a "aws/request.Request" representing the // client's request for the AllocateStaticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -118,7 +118,7 @@ const opAttachDisk = "AttachDisk" // AttachDiskRequest generates a "aws/request.Request" representing the // client's request for the AttachDisk operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -223,7 +223,7 @@ const opAttachInstancesToLoadBalancer = "AttachInstancesToLoadBalancer" // AttachInstancesToLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the AttachInstancesToLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -330,7 +330,7 @@ const opAttachLoadBalancerTlsCertificate = "AttachLoadBalancerTlsCertificate" // AttachLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerTlsCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -441,7 +441,7 @@ const opAttachStaticIp = "AttachStaticIp" // AttachStaticIpRequest generates a "aws/request.Request" representing the // client's request for the AttachStaticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -545,7 +545,7 @@ const opCloseInstancePublicPorts = "CloseInstancePublicPorts" // CloseInstancePublicPortsRequest generates a "aws/request.Request" representing the // client's request for the CloseInstancePublicPorts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -649,7 +649,7 @@ const opCreateDisk = "CreateDisk" // CreateDiskRequest generates a "aws/request.Request" representing the // client's request for the CreateDisk operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -756,7 +756,7 @@ const opCreateDiskFromSnapshot = "CreateDiskFromSnapshot" // CreateDiskFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDiskFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -863,7 +863,7 @@ const opCreateDiskSnapshot = "CreateDiskSnapshot" // CreateDiskSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDiskSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -980,7 +980,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1084,7 +1084,7 @@ const opCreateDomainEntry = "CreateDomainEntry" // CreateDomainEntryRequest generates a "aws/request.Request" representing the // client's request for the CreateDomainEntry operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1189,7 +1189,7 @@ const opCreateInstanceSnapshot = "CreateInstanceSnapshot" // CreateInstanceSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1294,7 +1294,7 @@ const opCreateInstances = "CreateInstances" // CreateInstancesRequest generates a "aws/request.Request" representing the // client's request for the CreateInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1398,7 +1398,7 @@ const opCreateInstancesFromSnapshot = "CreateInstancesFromSnapshot" // CreateInstancesFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateInstancesFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1503,7 +1503,7 @@ const opCreateKeyPair = "CreateKeyPair" // CreateKeyPairRequest generates a "aws/request.Request" representing the // client's request for the CreateKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1607,7 +1607,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1718,7 +1718,7 @@ const opCreateLoadBalancerTlsCertificate = "CreateLoadBalancerTlsCertificate" // CreateLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerTlsCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1824,7 +1824,7 @@ const opDeleteDisk = "DeleteDisk" // DeleteDiskRequest generates a "aws/request.Request" representing the // client's request for the DeleteDisk operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1931,7 +1931,7 @@ const opDeleteDiskSnapshot = "DeleteDiskSnapshot" // DeleteDiskSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDiskSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2042,7 +2042,7 @@ const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2146,7 +2146,7 @@ const opDeleteDomainEntry = "DeleteDomainEntry" // DeleteDomainEntryRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomainEntry operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2250,7 +2250,7 @@ const opDeleteInstance = "DeleteInstance" // DeleteInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2354,7 +2354,7 @@ const opDeleteInstanceSnapshot = "DeleteInstanceSnapshot" // DeleteInstanceSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstanceSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2458,7 +2458,7 @@ const opDeleteKeyPair = "DeleteKeyPair" // DeleteKeyPairRequest generates a "aws/request.Request" representing the // client's request for the DeleteKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2562,7 +2562,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2668,7 +2668,7 @@ const opDeleteLoadBalancerTlsCertificate = "DeleteLoadBalancerTlsCertificate" // DeleteLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerTlsCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2772,7 +2772,7 @@ const opDetachDisk = "DetachDisk" // DetachDiskRequest generates a "aws/request.Request" representing the // client's request for the DetachDisk operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2878,7 +2878,7 @@ const opDetachInstancesFromLoadBalancer = "DetachInstancesFromLoadBalancer" // DetachInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DetachInstancesFromLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2985,7 +2985,7 @@ const opDetachStaticIp = "DetachStaticIp" // DetachStaticIpRequest generates a "aws/request.Request" representing the // client's request for the DetachStaticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3089,7 +3089,7 @@ const opDownloadDefaultKeyPair = "DownloadDefaultKeyPair" // DownloadDefaultKeyPairRequest generates a "aws/request.Request" representing the // client's request for the DownloadDefaultKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3193,7 +3193,7 @@ const opGetActiveNames = "GetActiveNames" // GetActiveNamesRequest generates a "aws/request.Request" representing the // client's request for the GetActiveNames operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3297,7 +3297,7 @@ const opGetBlueprints = "GetBlueprints" // GetBlueprintsRequest generates a "aws/request.Request" representing the // client's request for the GetBlueprints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3404,7 +3404,7 @@ const opGetBundles = "GetBundles" // GetBundlesRequest generates a "aws/request.Request" representing the // client's request for the GetBundles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3509,7 +3509,7 @@ const opGetDisk = "GetDisk" // GetDiskRequest generates a "aws/request.Request" representing the // client's request for the GetDisk operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3613,7 +3613,7 @@ const opGetDiskSnapshot = "GetDiskSnapshot" // GetDiskSnapshotRequest generates a "aws/request.Request" representing the // client's request for the GetDiskSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3717,7 +3717,7 @@ const opGetDiskSnapshots = "GetDiskSnapshots" // GetDiskSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the GetDiskSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3826,7 +3826,7 @@ const opGetDisks = "GetDisks" // GetDisksRequest generates a "aws/request.Request" representing the // client's request for the GetDisks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3935,7 +3935,7 @@ const opGetDomain = "GetDomain" // GetDomainRequest generates a "aws/request.Request" representing the // client's request for the GetDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4039,7 +4039,7 @@ const opGetDomains = "GetDomains" // GetDomainsRequest generates a "aws/request.Request" representing the // client's request for the GetDomains operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4143,7 +4143,7 @@ const opGetInstance = "GetInstance" // GetInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4248,7 +4248,7 @@ const opGetInstanceAccessDetails = "GetInstanceAccessDetails" // GetInstanceAccessDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceAccessDetails operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4353,7 +4353,7 @@ const opGetInstanceMetricData = "GetInstanceMetricData" // GetInstanceMetricDataRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceMetricData operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4458,7 +4458,7 @@ const opGetInstancePortStates = "GetInstancePortStates" // GetInstancePortStatesRequest generates a "aws/request.Request" representing the // client's request for the GetInstancePortStates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4562,7 +4562,7 @@ const opGetInstanceSnapshot = "GetInstanceSnapshot" // GetInstanceSnapshotRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4666,7 +4666,7 @@ const opGetInstanceSnapshots = "GetInstanceSnapshots" // GetInstanceSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4770,7 +4770,7 @@ const opGetInstanceState = "GetInstanceState" // GetInstanceStateRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceState operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4874,7 +4874,7 @@ const opGetInstances = "GetInstances" // GetInstancesRequest generates a "aws/request.Request" representing the // client's request for the GetInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4979,7 +4979,7 @@ const opGetKeyPair = "GetKeyPair" // GetKeyPairRequest generates a "aws/request.Request" representing the // client's request for the GetKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5083,7 +5083,7 @@ const opGetKeyPairs = "GetKeyPairs" // GetKeyPairsRequest generates a "aws/request.Request" representing the // client's request for the GetKeyPairs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5187,7 +5187,7 @@ const opGetLoadBalancer = "GetLoadBalancer" // GetLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5291,7 +5291,7 @@ const opGetLoadBalancerMetricData = "GetLoadBalancerMetricData" // GetLoadBalancerMetricDataRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancerMetricData operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5395,7 +5395,7 @@ const opGetLoadBalancerTlsCertificates = "GetLoadBalancerTlsCertificates" // GetLoadBalancerTlsCertificatesRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancerTlsCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5505,7 +5505,7 @@ const opGetLoadBalancers = "GetLoadBalancers" // GetLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5613,7 +5613,7 @@ const opGetOperation = "GetOperation" // GetOperationRequest generates a "aws/request.Request" representing the // client's request for the GetOperation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5719,7 +5719,7 @@ const opGetOperations = "GetOperations" // GetOperationsRequest generates a "aws/request.Request" representing the // client's request for the GetOperations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5827,7 +5827,7 @@ const opGetOperationsForResource = "GetOperationsForResource" // GetOperationsForResourceRequest generates a "aws/request.Request" representing the // client's request for the GetOperationsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5931,7 +5931,7 @@ const opGetRegions = "GetRegions" // GetRegionsRequest generates a "aws/request.Request" representing the // client's request for the GetRegions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6036,7 +6036,7 @@ const opGetStaticIp = "GetStaticIp" // GetStaticIpRequest generates a "aws/request.Request" representing the // client's request for the GetStaticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6140,7 +6140,7 @@ const opGetStaticIps = "GetStaticIps" // GetStaticIpsRequest generates a "aws/request.Request" representing the // client's request for the GetStaticIps operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6244,7 +6244,7 @@ const opImportKeyPair = "ImportKeyPair" // ImportKeyPairRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyPair operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6348,7 +6348,7 @@ const opIsVpcPeered = "IsVpcPeered" // IsVpcPeeredRequest generates a "aws/request.Request" representing the // client's request for the IsVpcPeered operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6452,7 +6452,7 @@ const opOpenInstancePublicPorts = "OpenInstancePublicPorts" // OpenInstancePublicPortsRequest generates a "aws/request.Request" representing the // client's request for the OpenInstancePublicPorts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6556,7 +6556,7 @@ const opPeerVpc = "PeerVpc" // PeerVpcRequest generates a "aws/request.Request" representing the // client's request for the PeerVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6660,7 +6660,7 @@ const opPutInstancePublicPorts = "PutInstancePublicPorts" // PutInstancePublicPortsRequest generates a "aws/request.Request" representing the // client's request for the PutInstancePublicPorts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6765,7 +6765,7 @@ const opRebootInstance = "RebootInstance" // RebootInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6872,7 +6872,7 @@ const opReleaseStaticIp = "ReleaseStaticIp" // ReleaseStaticIpRequest generates a "aws/request.Request" representing the // client's request for the ReleaseStaticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6976,7 +6976,7 @@ const opStartInstance = "StartInstance" // StartInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7081,7 +7081,7 @@ const opStopInstance = "StopInstance" // StopInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7185,7 +7185,7 @@ const opUnpeerVpc = "UnpeerVpc" // UnpeerVpcRequest generates a "aws/request.Request" representing the // client's request for the UnpeerVpc operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7289,7 +7289,7 @@ const opUpdateDomainEntry = "UpdateDomainEntry" // UpdateDomainEntryRequest generates a "aws/request.Request" representing the // client's request for the UpdateDomainEntry operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7393,7 +7393,7 @@ const opUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" // UpdateLoadBalancerAttributeRequest generates a "aws/request.Request" representing the // client's request for the UpdateLoadBalancerAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go index 5a0eb2a0089..27c8e289598 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go @@ -14,7 +14,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -103,7 +103,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -192,7 +192,7 @@ const opCreateJobTemplate = "CreateJobTemplate" // CreateJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateJobTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -281,7 +281,7 @@ const opCreatePreset = "CreatePreset" // CreatePresetRequest generates a "aws/request.Request" representing the // client's request for the CreatePreset operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -370,7 +370,7 @@ const opCreateQueue = "CreateQueue" // CreateQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -459,7 +459,7 @@ const opDeleteJobTemplate = "DeleteJobTemplate" // DeleteJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteJobTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -547,7 +547,7 @@ const opDeletePreset = "DeletePreset" // DeletePresetRequest generates a "aws/request.Request" representing the // client's request for the DeletePreset operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -635,7 +635,7 @@ const opDeleteQueue = "DeleteQueue" // DeleteQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -723,7 +723,7 @@ const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -812,7 +812,7 @@ const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -900,7 +900,7 @@ const opGetJobTemplate = "GetJobTemplate" // GetJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetJobTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -988,7 +988,7 @@ const opGetPreset = "GetPreset" // GetPresetRequest generates a "aws/request.Request" representing the // client's request for the GetPreset operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1076,7 +1076,7 @@ const opGetQueue = "GetQueue" // GetQueueRequest generates a "aws/request.Request" representing the // client's request for the GetQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1164,7 +1164,7 @@ const opListJobTemplates = "ListJobTemplates" // ListJobTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListJobTemplates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1254,7 +1254,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1345,7 +1345,7 @@ const opListPresets = "ListPresets" // ListPresetsRequest generates a "aws/request.Request" representing the // client's request for the ListPresets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1435,7 +1435,7 @@ const opListQueues = "ListQueues" // ListQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListQueues operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1525,7 +1525,7 @@ const opUpdateJobTemplate = "UpdateJobTemplate" // UpdateJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateJobTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1613,7 +1613,7 @@ const opUpdatePreset = "UpdatePreset" // UpdatePresetRequest generates a "aws/request.Request" representing the // client's request for the UpdatePreset operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1701,7 +1701,7 @@ const opUpdateQueue = "UpdateQueue" // UpdateQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go index 73755a7f813..fe363406741 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go @@ -14,7 +14,7 @@ const opCreateChannel = "CreateChannel" // CreateChannelRequest generates a "aws/request.Request" representing the // client's request for the CreateChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -106,7 +106,7 @@ const opCreateInput = "CreateInput" // CreateInputRequest generates a "aws/request.Request" representing the // client's request for the CreateInput operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -194,7 +194,7 @@ const opCreateInputSecurityGroup = "CreateInputSecurityGroup" // CreateInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -282,7 +282,7 @@ const opDeleteChannel = "DeleteChannel" // DeleteChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -374,7 +374,7 @@ const opDeleteInput = "DeleteInput" // DeleteInputRequest generates a "aws/request.Request" representing the // client's request for the DeleteInput operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -466,7 +466,7 @@ const opDeleteInputSecurityGroup = "DeleteInputSecurityGroup" // DeleteInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -556,7 +556,7 @@ const opDescribeChannel = "DescribeChannel" // DescribeChannelRequest generates a "aws/request.Request" representing the // client's request for the DescribeChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -646,7 +646,7 @@ const opDescribeInput = "DescribeInput" // DescribeInputRequest generates a "aws/request.Request" representing the // client's request for the DescribeInput operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -736,7 +736,7 @@ const opDescribeInputSecurityGroup = "DescribeInputSecurityGroup" // DescribeInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -826,7 +826,7 @@ const opListChannels = "ListChannels" // ListChannelsRequest generates a "aws/request.Request" representing the // client's request for the ListChannels operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -970,7 +970,7 @@ const opListInputSecurityGroups = "ListInputSecurityGroups" // ListInputSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListInputSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1114,7 +1114,7 @@ const opListInputs = "ListInputs" // ListInputsRequest generates a "aws/request.Request" representing the // client's request for the ListInputs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1258,7 +1258,7 @@ const opStartChannel = "StartChannel" // StartChannelRequest generates a "aws/request.Request" representing the // client's request for the StartChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1350,7 +1350,7 @@ const opStopChannel = "StopChannel" // StopChannelRequest generates a "aws/request.Request" representing the // client's request for the StopChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1442,7 +1442,7 @@ const opUpdateChannel = "UpdateChannel" // UpdateChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1532,7 +1532,7 @@ const opUpdateInput = "UpdateInput" // UpdateInputRequest generates a "aws/request.Request" representing the // client's request for the UpdateInput operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1622,7 +1622,7 @@ const opUpdateInputSecurityGroup = "UpdateInputSecurityGroup" // UpdateInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateInputSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go index 074dee83694..e3f77375e0c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go @@ -12,7 +12,7 @@ const opCreateChannel = "CreateChannel" // CreateChannelRequest generates a "aws/request.Request" representing the // client's request for the CreateChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -100,7 +100,7 @@ const opCreateOriginEndpoint = "CreateOriginEndpoint" // CreateOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -188,7 +188,7 @@ const opDeleteChannel = "DeleteChannel" // DeleteChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -276,7 +276,7 @@ const opDeleteOriginEndpoint = "DeleteOriginEndpoint" // DeleteOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -364,7 +364,7 @@ const opDescribeChannel = "DescribeChannel" // DescribeChannelRequest generates a "aws/request.Request" representing the // client's request for the DescribeChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -452,7 +452,7 @@ const opDescribeOriginEndpoint = "DescribeOriginEndpoint" // DescribeOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the DescribeOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -540,7 +540,7 @@ const opListChannels = "ListChannels" // ListChannelsRequest generates a "aws/request.Request" representing the // client's request for the ListChannels operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -684,7 +684,7 @@ const opListOriginEndpoints = "ListOriginEndpoints" // ListOriginEndpointsRequest generates a "aws/request.Request" representing the // client's request for the ListOriginEndpoints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -828,7 +828,7 @@ const opRotateChannelCredentials = "RotateChannelCredentials" // RotateChannelCredentialsRequest generates a "aws/request.Request" representing the // client's request for the RotateChannelCredentials operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -916,7 +916,7 @@ const opUpdateChannel = "UpdateChannel" // UpdateChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateChannel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1004,7 +1004,7 @@ const opUpdateOriginEndpoint = "UpdateOriginEndpoint" // UpdateOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateOriginEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go index f5d369592ab..172f138eb0f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go @@ -14,7 +14,7 @@ const opCreateContainer = "CreateContainer" // CreateContainerRequest generates a "aws/request.Request" representing the // client's request for the CreateContainer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -100,7 +100,7 @@ const opDeleteContainer = "DeleteContainer" // DeleteContainerRequest generates a "aws/request.Request" representing the // client's request for the DeleteContainer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -187,7 +187,7 @@ const opDeleteContainerPolicy = "DeleteContainerPolicy" // DeleteContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteContainerPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -275,7 +275,7 @@ const opDeleteCorsPolicy = "DeleteCorsPolicy" // DeleteCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteCorsPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -368,7 +368,7 @@ const opDescribeContainer = "DescribeContainer" // DescribeContainerRequest generates a "aws/request.Request" representing the // client's request for the DescribeContainer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -455,7 +455,7 @@ const opGetContainerPolicy = "GetContainerPolicy" // GetContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContainerPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -545,7 +545,7 @@ const opGetCorsPolicy = "GetCorsPolicy" // GetCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetCorsPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -638,7 +638,7 @@ const opListContainers = "ListContainers" // ListContainersRequest generates a "aws/request.Request" representing the // client's request for the ListContainers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -726,7 +726,7 @@ const opPutContainerPolicy = "PutContainerPolicy" // PutContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutContainerPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -818,7 +818,7 @@ const opPutCorsPolicy = "PutCorsPolicy" // PutCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutCorsPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go index 8b47a0e816d..dfaaf25fe01 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go @@ -16,7 +16,7 @@ const opDeleteObject = "DeleteObject" // DeleteObjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -101,7 +101,7 @@ const opDescribeObject = "DescribeObject" // DescribeObjectRequest generates a "aws/request.Request" representing the // client's request for the DescribeObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -186,7 +186,7 @@ const opGetObject = "GetObject" // GetObjectRequest generates a "aws/request.Request" representing the // client's request for the GetObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -274,7 +274,7 @@ const opListItems = "ListItems" // ListItemsRequest generates a "aws/request.Request" representing the // client's request for the ListItems operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -357,7 +357,7 @@ const opPutObject = "PutObject" // PutObjectRequest generates a "aws/request.Request" representing the // client's request for the PutObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go index e9f68af095b..b083caf384d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go @@ -12,7 +12,7 @@ const opCreateBroker = "CreateBroker" // CreateBrokerRequest generates a "aws/request.Request" representing the // client's request for the CreateBroker operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -103,7 +103,7 @@ const opCreateConfiguration = "CreateConfiguration" // CreateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -193,7 +193,7 @@ const opCreateUser = "CreateUser" // CreateUserRequest generates a "aws/request.Request" representing the // client's request for the CreateUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -284,7 +284,7 @@ const opDeleteBroker = "DeleteBroker" // DeleteBrokerRequest generates a "aws/request.Request" representing the // client's request for the DeleteBroker operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -372,7 +372,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -460,7 +460,7 @@ const opDescribeBroker = "DescribeBroker" // DescribeBrokerRequest generates a "aws/request.Request" representing the // client's request for the DescribeBroker operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -548,7 +548,7 @@ const opDescribeConfiguration = "DescribeConfiguration" // DescribeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -636,7 +636,7 @@ const opDescribeConfigurationRevision = "DescribeConfigurationRevision" // DescribeConfigurationRevisionRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRevision operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -724,7 +724,7 @@ const opDescribeUser = "DescribeUser" // DescribeUserRequest generates a "aws/request.Request" representing the // client's request for the DescribeUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -812,7 +812,7 @@ const opListBrokers = "ListBrokers" // ListBrokersRequest generates a "aws/request.Request" representing the // client's request for the ListBrokers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -897,7 +897,7 @@ const opListConfigurationRevisions = "ListConfigurationRevisions" // ListConfigurationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurationRevisions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -985,7 +985,7 @@ const opListConfigurations = "ListConfigurations" // ListConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1070,7 +1070,7 @@ const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1158,7 +1158,7 @@ const opRebootBroker = "RebootBroker" // RebootBrokerRequest generates a "aws/request.Request" representing the // client's request for the RebootBroker operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1246,7 +1246,7 @@ const opUpdateBroker = "UpdateBroker" // UpdateBrokerRequest generates a "aws/request.Request" representing the // client's request for the UpdateBroker operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1334,7 +1334,7 @@ const opUpdateConfiguration = "UpdateConfiguration" // UpdateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1425,7 +1425,7 @@ const opUpdateUser = "UpdateUser" // UpdateUserRequest generates a "aws/request.Request" representing the // client's request for the UpdateUser operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go index f266280ef0d..51065004df1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go @@ -16,7 +16,7 @@ const opAssignInstance = "AssignInstance" // AssignInstanceRequest generates a "aws/request.Request" representing the // client's request for the AssignInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -112,7 +112,7 @@ const opAssignVolume = "AssignVolume" // AssignVolumeRequest generates a "aws/request.Request" representing the // client's request for the AssignVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -205,7 +205,7 @@ const opAssociateElasticIp = "AssociateElasticIp" // AssociateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the AssociateElasticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -296,7 +296,7 @@ const opAttachElasticLoadBalancer = "AttachElasticLoadBalancer" // AttachElasticLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the AttachElasticLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -392,7 +392,7 @@ const opCloneStack = "CloneStack" // CloneStackRequest generates a "aws/request.Request" representing the // client's request for the CloneStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -480,7 +480,7 @@ const opCreateApp = "CreateApp" // CreateAppRequest generates a "aws/request.Request" representing the // client's request for the CreateApp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -568,7 +568,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -657,7 +657,7 @@ const opCreateInstance = "CreateInstance" // CreateInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -745,7 +745,7 @@ const opCreateLayer = "CreateLayer" // CreateLayerRequest generates a "aws/request.Request" representing the // client's request for the CreateLayer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -839,7 +839,7 @@ const opCreateStack = "CreateStack" // CreateStackRequest generates a "aws/request.Request" representing the // client's request for the CreateStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -922,7 +922,7 @@ const opCreateUserProfile = "CreateUserProfile" // CreateUserProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateUserProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1005,7 +1005,7 @@ const opDeleteApp = "DeleteApp" // DeleteAppRequest generates a "aws/request.Request" representing the // client's request for the DeleteApp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1094,7 +1094,7 @@ const opDeleteInstance = "DeleteInstance" // DeleteInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1186,7 +1186,7 @@ const opDeleteLayer = "DeleteLayer" // DeleteLayerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLayer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1277,7 +1277,7 @@ const opDeleteStack = "DeleteStack" // DeleteStackRequest generates a "aws/request.Request" representing the // client's request for the DeleteStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1368,7 +1368,7 @@ const opDeleteUserProfile = "DeleteUserProfile" // DeleteUserProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1456,7 +1456,7 @@ const opDeregisterEcsCluster = "DeregisterEcsCluster" // DeregisterEcsClusterRequest generates a "aws/request.Request" representing the // client's request for the DeregisterEcsCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1546,7 +1546,7 @@ const opDeregisterElasticIp = "DeregisterElasticIp" // DeregisterElasticIpRequest generates a "aws/request.Request" representing the // client's request for the DeregisterElasticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1636,7 +1636,7 @@ const opDeregisterInstance = "DeregisterInstance" // DeregisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1727,7 +1727,7 @@ const opDeregisterRdsDbInstance = "DeregisterRdsDbInstance" // DeregisterRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterRdsDbInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1816,7 +1816,7 @@ const opDeregisterVolume = "DeregisterVolume" // DeregisterVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeregisterVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1906,7 +1906,7 @@ const opDescribeAgentVersions = "DescribeAgentVersions" // DescribeAgentVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAgentVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1990,7 +1990,7 @@ const opDescribeApps = "DescribeApps" // DescribeAppsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApps operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2079,7 +2079,7 @@ const opDescribeCommands = "DescribeCommands" // DescribeCommandsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCommands operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2168,7 +2168,7 @@ const opDescribeDeployments = "DescribeDeployments" // DescribeDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeployments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2257,7 +2257,7 @@ const opDescribeEcsClusters = "DescribeEcsClusters" // DescribeEcsClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEcsClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2405,7 +2405,7 @@ const opDescribeElasticIps = "DescribeElasticIps" // DescribeElasticIpsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticIps operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2494,7 +2494,7 @@ const opDescribeElasticLoadBalancers = "DescribeElasticLoadBalancers" // DescribeElasticLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticLoadBalancers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2583,7 +2583,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2672,7 +2672,7 @@ const opDescribeLayers = "DescribeLayers" // DescribeLayersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLayers operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2761,7 +2761,7 @@ const opDescribeLoadBasedAutoScaling = "DescribeLoadBasedAutoScaling" // DescribeLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2850,7 +2850,7 @@ const opDescribeMyUserProfile = "DescribeMyUserProfile" // DescribeMyUserProfileRequest generates a "aws/request.Request" representing the // client's request for the DescribeMyUserProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2928,7 +2928,7 @@ const opDescribeOperatingSystems = "DescribeOperatingSystems" // DescribeOperatingSystemsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOperatingSystems operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3002,7 +3002,7 @@ const opDescribePermissions = "DescribePermissions" // DescribePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePermissions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3089,7 +3089,7 @@ const opDescribeRaidArrays = "DescribeRaidArrays" // DescribeRaidArraysRequest generates a "aws/request.Request" representing the // client's request for the DescribeRaidArrays operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3178,7 +3178,7 @@ const opDescribeRdsDbInstances = "DescribeRdsDbInstances" // DescribeRdsDbInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRdsDbInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3267,7 +3267,7 @@ const opDescribeServiceErrors = "DescribeServiceErrors" // DescribeServiceErrorsRequest generates a "aws/request.Request" representing the // client's request for the DescribeServiceErrors operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3356,7 +3356,7 @@ const opDescribeStackProvisioningParameters = "DescribeStackProvisioningParamete // DescribeStackProvisioningParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackProvisioningParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3443,7 +3443,7 @@ const opDescribeStackSummary = "DescribeStackSummary" // DescribeStackSummaryRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSummary operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3531,7 +3531,7 @@ const opDescribeStacks = "DescribeStacks" // DescribeStacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeStacks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3618,7 +3618,7 @@ const opDescribeTimeBasedAutoScaling = "DescribeTimeBasedAutoScaling" // DescribeTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the DescribeTimeBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3707,7 +3707,7 @@ const opDescribeUserProfiles = "DescribeUserProfiles" // DescribeUserProfilesRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserProfiles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3793,7 +3793,7 @@ const opDescribeVolumes = "DescribeVolumes" // DescribeVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3882,7 +3882,7 @@ const opDetachElasticLoadBalancer = "DetachElasticLoadBalancer" // DetachElasticLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DetachElasticLoadBalancer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3968,7 +3968,7 @@ const opDisassociateElasticIp = "DisassociateElasticIp" // DisassociateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the DisassociateElasticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4059,7 +4059,7 @@ const opGetHostnameSuggestion = "GetHostnameSuggestion" // GetHostnameSuggestionRequest generates a "aws/request.Request" representing the // client's request for the GetHostnameSuggestion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4147,7 +4147,7 @@ const opGrantAccess = "GrantAccess" // GrantAccessRequest generates a "aws/request.Request" representing the // client's request for the GrantAccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4231,7 +4231,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4313,7 +4313,7 @@ const opRebootInstance = "RebootInstance" // RebootInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4403,7 +4403,7 @@ const opRegisterEcsCluster = "RegisterEcsCluster" // RegisterEcsClusterRequest generates a "aws/request.Request" representing the // client's request for the RegisterEcsCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4492,7 +4492,7 @@ const opRegisterElasticIp = "RegisterElasticIp" // RegisterElasticIpRequest generates a "aws/request.Request" representing the // client's request for the RegisterElasticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4582,7 +4582,7 @@ const opRegisterInstance = "RegisterInstance" // RegisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4683,7 +4683,7 @@ const opRegisterRdsDbInstance = "RegisterRdsDbInstance" // RegisterRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterRdsDbInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4772,7 +4772,7 @@ const opRegisterVolume = "RegisterVolume" // RegisterVolumeRequest generates a "aws/request.Request" representing the // client's request for the RegisterVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4862,7 +4862,7 @@ const opSetLoadBasedAutoScaling = "SetLoadBasedAutoScaling" // SetLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4958,7 +4958,7 @@ const opSetPermission = "SetPermission" // SetPermissionRequest generates a "aws/request.Request" representing the // client's request for the SetPermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5048,7 +5048,7 @@ const opSetTimeBasedAutoScaling = "SetTimeBasedAutoScaling" // SetTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the SetTimeBasedAutoScaling operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5139,7 +5139,7 @@ const opStartInstance = "StartInstance" // StartInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5229,7 +5229,7 @@ const opStartStack = "StartStack" // StartStackRequest generates a "aws/request.Request" representing the // client's request for the StartStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5318,7 +5318,7 @@ const opStopInstance = "StopInstance" // StopInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5410,7 +5410,7 @@ const opStopStack = "StopStack" // StopStackRequest generates a "aws/request.Request" representing the // client's request for the StopStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5499,7 +5499,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5585,7 +5585,7 @@ const opUnassignInstance = "UnassignInstance" // UnassignInstanceRequest generates a "aws/request.Request" representing the // client's request for the UnassignInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5677,7 +5677,7 @@ const opUnassignVolume = "UnassignVolume" // UnassignVolumeRequest generates a "aws/request.Request" representing the // client's request for the UnassignVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5767,7 +5767,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5851,7 +5851,7 @@ const opUpdateApp = "UpdateApp" // UpdateAppRequest generates a "aws/request.Request" representing the // client's request for the UpdateApp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5940,7 +5940,7 @@ const opUpdateElasticIp = "UpdateElasticIp" // UpdateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the UpdateElasticIp operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6030,7 +6030,7 @@ const opUpdateInstance = "UpdateInstance" // UpdateInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6119,7 +6119,7 @@ const opUpdateLayer = "UpdateLayer" // UpdateLayerRequest generates a "aws/request.Request" representing the // client's request for the UpdateLayer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6208,7 +6208,7 @@ const opUpdateMyUserProfile = "UpdateMyUserProfile" // UpdateMyUserProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateMyUserProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6293,7 +6293,7 @@ const opUpdateRdsDbInstance = "UpdateRdsDbInstance" // UpdateRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateRdsDbInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6382,7 +6382,7 @@ const opUpdateStack = "UpdateStack" // UpdateStackRequest generates a "aws/request.Request" representing the // client's request for the UpdateStack operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6471,7 +6471,7 @@ const opUpdateUserProfile = "UpdateUserProfile" // UpdateUserProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserProfile operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6559,7 +6559,7 @@ const opUpdateVolume = "UpdateVolume" // UpdateVolumeRequest generates a "aws/request.Request" representing the // client's request for the UpdateVolume operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go index 816b78dfeac..22c5cd91ab8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go @@ -16,7 +16,7 @@ const opAcceptHandshake = "AcceptHandshake" // AcceptHandshakeRequest generates a "aws/request.Request" representing the // client's request for the AcceptHandshake operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -260,7 +260,7 @@ const opAttachPolicy = "AttachPolicy" // AttachPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -559,7 +559,7 @@ const opCancelHandshake = "CancelHandshake" // CancelHandshakeRequest generates a "aws/request.Request" representing the // client's request for the CancelHandshake operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -733,7 +733,7 @@ const opCreateAccount = "CreateAccount" // CreateAccountRequest generates a "aws/request.Request" representing the // client's request for the CreateAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1028,7 +1028,7 @@ const opCreateOrganization = "CreateOrganization" // CreateOrganizationRequest generates a "aws/request.Request" representing the // client's request for the CreateOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1289,7 +1289,7 @@ const opCreateOrganizationalUnit = "CreateOrganizationalUnit" // CreateOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the CreateOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1548,7 +1548,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1813,7 +1813,7 @@ const opDeclineHandshake = "DeclineHandshake" // DeclineHandshakeRequest generates a "aws/request.Request" representing the // client's request for the DeclineHandshake operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1988,7 +1988,7 @@ const opDeleteOrganization = "DeleteOrganization" // DeleteOrganizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2155,7 +2155,7 @@ const opDeleteOrganizationalUnit = "DeleteOrganizationalUnit" // DeleteOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2327,7 +2327,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2497,7 +2497,7 @@ const opDescribeAccount = "DescribeAccount" // DescribeAccountRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2658,7 +2658,7 @@ const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus" // DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeCreateAccountStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2818,7 +2818,7 @@ const opDescribeHandshake = "DescribeHandshake" // DescribeHandshakeRequest generates a "aws/request.Request" representing the // client's request for the DescribeHandshake operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2983,7 +2983,7 @@ const opDescribeOrganization = "DescribeOrganization" // DescribeOrganizationRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3089,7 +3089,7 @@ const opDescribeOrganizationalUnit = "DescribeOrganizationalUnit" // DescribeOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3249,7 +3249,7 @@ const opDescribePolicy = "DescribePolicy" // DescribePolicyRequest generates a "aws/request.Request" representing the // client's request for the DescribePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3408,7 +3408,7 @@ const opDetachPolicy = "DetachPolicy" // DetachPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3676,7 +3676,7 @@ const opDisableAWSServiceAccess = "DisableAWSServiceAccess" // DisableAWSServiceAccessRequest generates a "aws/request.Request" representing the // client's request for the DisableAWSServiceAccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3943,7 +3943,7 @@ const opDisablePolicyType = "DisablePolicyType" // DisablePolicyTypeRequest generates a "aws/request.Request" representing the // client's request for the DisablePolicyType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4207,7 +4207,7 @@ const opEnableAWSServiceAccess = "EnableAWSServiceAccess" // EnableAWSServiceAccessRequest generates a "aws/request.Request" representing the // client's request for the EnableAWSServiceAccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4471,7 +4471,7 @@ const opEnableAllFeatures = "EnableAllFeatures" // EnableAllFeaturesRequest generates a "aws/request.Request" representing the // client's request for the EnableAllFeatures operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4701,7 +4701,7 @@ const opEnablePolicyType = "EnablePolicyType" // EnablePolicyTypeRequest generates a "aws/request.Request" representing the // client's request for the EnablePolicyType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4967,7 +4967,7 @@ const opInviteAccountToOrganization = "InviteAccountToOrganization" // InviteAccountToOrganizationRequest generates a "aws/request.Request" representing the // client's request for the InviteAccountToOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5194,7 +5194,7 @@ const opLeaveOrganization = "LeaveOrganization" // LeaveOrganizationRequest generates a "aws/request.Request" representing the // client's request for the LeaveOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5477,7 +5477,7 @@ const opListAWSServiceAccessForOrganization = "ListAWSServiceAccessForOrganizati // ListAWSServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the // client's request for the ListAWSServiceAccessForOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5782,7 +5782,7 @@ const opListAccounts = "ListAccounts" // ListAccountsRequest generates a "aws/request.Request" representing the // client's request for the ListAccounts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6000,7 +6000,7 @@ const opListAccountsForParent = "ListAccountsForParent" // ListAccountsForParentRequest generates a "aws/request.Request" representing the // client's request for the ListAccountsForParent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6226,7 +6226,7 @@ const opListChildren = "ListChildren" // ListChildrenRequest generates a "aws/request.Request" representing the // client's request for the ListChildren operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6449,7 +6449,7 @@ const opListCreateAccountStatus = "ListCreateAccountStatus" // ListCreateAccountStatusRequest generates a "aws/request.Request" representing the // client's request for the ListCreateAccountStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6667,7 +6667,7 @@ const opListHandshakesForAccount = "ListHandshakesForAccount" // ListHandshakesForAccountRequest generates a "aws/request.Request" representing the // client's request for the ListHandshakesForAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6889,7 +6889,7 @@ const opListHandshakesForOrganization = "ListHandshakesForOrganization" // ListHandshakesForOrganizationRequest generates a "aws/request.Request" representing the // client's request for the ListHandshakesForOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7117,7 +7117,7 @@ const opListOrganizationalUnitsForParent = "ListOrganizationalUnitsForParent" // ListOrganizationalUnitsForParentRequest generates a "aws/request.Request" representing the // client's request for the ListOrganizationalUnitsForParent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7338,7 +7338,7 @@ const opListParents = "ListParents" // ListParentsRequest generates a "aws/request.Request" representing the // client's request for the ListParents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7563,7 +7563,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7780,7 +7780,7 @@ const opListPoliciesForTarget = "ListPoliciesForTarget" // ListPoliciesForTargetRequest generates a "aws/request.Request" representing the // client's request for the ListPoliciesForTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8002,7 +8002,7 @@ const opListRoots = "ListRoots" // ListRootsRequest generates a "aws/request.Request" representing the // client's request for the ListRoots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8225,7 +8225,7 @@ const opListTargetsForPolicy = "ListTargetsForPolicy" // ListTargetsForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8445,7 +8445,7 @@ const opMoveAccount = "MoveAccount" // MoveAccountRequest generates a "aws/request.Request" representing the // client's request for the MoveAccount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8623,7 +8623,7 @@ const opRemoveAccountFromOrganization = "RemoveAccountFromOrganization" // RemoveAccountFromOrganizationRequest generates a "aws/request.Request" representing the // client's request for the RemoveAccountFromOrganization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8907,7 +8907,7 @@ const opUpdateOrganizationalUnit = "UpdateOrganizationalUnit" // UpdateOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the UpdateOrganizationalUnit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9076,7 +9076,7 @@ const opUpdatePolicy = "UpdatePolicy" // UpdatePolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdatePolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 5851584e29b..73996cf63e9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -17,7 +17,7 @@ const opAddRoleToDBCluster = "AddRoleToDBCluster" // AddRoleToDBClusterRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToDBCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -111,7 +111,7 @@ const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" // AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the AddSourceIdentifierToSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -193,7 +193,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -285,7 +285,7 @@ const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" // ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyPendingMaintenanceAction operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -365,7 +365,7 @@ const opAuthorizeDBSecurityGroupIngress = "AuthorizeDBSecurityGroupIngress" // AuthorizeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeDBSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -466,7 +466,7 @@ const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" // CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -552,7 +552,7 @@ const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" // CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -708,7 +708,7 @@ const opCopyDBParameterGroup = "CopyDBParameterGroup" // CopyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -794,7 +794,7 @@ const opCopyDBSnapshot = "CopyDBSnapshot" // CopyDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -893,7 +893,7 @@ const opCopyOptionGroup = "CopyOptionGroup" // CopyOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyOptionGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -978,7 +978,7 @@ const opCreateDBCluster = "CreateDBCluster" // CreateDBClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateDBCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1115,7 +1115,7 @@ const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" // CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1225,7 +1225,7 @@ const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" // CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1318,7 +1318,7 @@ const opCreateDBInstance = "CreateDBInstance" // CreateDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1457,7 +1457,7 @@ const opCreateDBInstanceReadReplica = "CreateDBInstanceReadReplica" // CreateDBInstanceReadReplicaRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstanceReadReplica operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1606,7 +1606,7 @@ const opCreateDBParameterGroup = "CreateDBParameterGroup" // CreateDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1709,7 +1709,7 @@ const opCreateDBSecurityGroup = "CreateDBSecurityGroup" // CreateDBSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1797,7 +1797,7 @@ const opCreateDBSnapshot = "CreateDBSnapshot" // CreateDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1885,7 +1885,7 @@ const opCreateDBSubnetGroup = "CreateDBSubnetGroup" // CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1980,7 +1980,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2094,7 +2094,7 @@ const opCreateOptionGroup = "CreateOptionGroup" // CreateOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateOptionGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2176,7 +2176,7 @@ const opDeleteDBCluster = "DeleteDBCluster" // DeleteDBClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2272,7 +2272,7 @@ const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" // DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2362,7 +2362,7 @@ const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" // DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2450,7 +2450,7 @@ const opDeleteDBInstance = "DeleteDBInstance" // DeleteDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2565,7 +2565,7 @@ const opDeleteDBParameterGroup = "DeleteDBParameterGroup" // DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2652,7 +2652,7 @@ const opDeleteDBSecurityGroup = "DeleteDBSecurityGroup" // DeleteDBSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2738,7 +2738,7 @@ const opDeleteDBSnapshot = "DeleteDBSnapshot" // DeleteDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2823,7 +2823,7 @@ const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" // DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2912,7 +2912,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2995,7 +2995,7 @@ const opDeleteOptionGroup = "DeleteOptionGroup" // DeleteOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteOptionGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3079,7 +3079,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3158,7 +3158,7 @@ const opDescribeCertificates = "DescribeCertificates" // DescribeCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3237,7 +3237,7 @@ const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" // DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameterGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3321,7 +3321,7 @@ const opDescribeDBClusterParameters = "DescribeDBClusterParameters" // DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3404,7 +3404,7 @@ const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttribut // DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3494,7 +3494,7 @@ const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" // DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3577,7 +3577,7 @@ const opDescribeDBClusters = "DescribeDBClusters" // DescribeDBClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3660,7 +3660,7 @@ const opDescribeDBEngineVersions = "DescribeDBEngineVersions" // DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBEngineVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3790,7 +3790,7 @@ const opDescribeDBInstances = "DescribeDBInstances" // DescribeDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3925,7 +3925,7 @@ const opDescribeDBLogFiles = "DescribeDBLogFiles" // DescribeDBLogFilesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBLogFiles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4060,7 +4060,7 @@ const opDescribeDBParameterGroups = "DescribeDBParameterGroups" // DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameterGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4197,7 +4197,7 @@ const opDescribeDBParameters = "DescribeDBParameters" // DescribeDBParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4332,7 +4332,7 @@ const opDescribeDBSecurityGroups = "DescribeDBSecurityGroups" // DescribeDBSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4469,7 +4469,7 @@ const opDescribeDBSnapshotAttributes = "DescribeDBSnapshotAttributes" // DescribeDBSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSnapshotAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4559,7 +4559,7 @@ const opDescribeDBSnapshots = "DescribeDBSnapshots" // DescribeDBSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4694,7 +4694,7 @@ const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" // DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4832,7 +4832,7 @@ const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterPa // DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4910,7 +4910,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5041,7 +5041,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5118,7 +5118,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5257,7 +5257,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5391,7 +5391,7 @@ const opDescribeOptionGroupOptions = "DescribeOptionGroupOptions" // DescribeOptionGroupOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOptionGroupOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5521,7 +5521,7 @@ const opDescribeOptionGroups = "DescribeOptionGroups" // DescribeOptionGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOptionGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5656,7 +5656,7 @@ const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions // DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5786,7 +5786,7 @@ const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" // DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingMaintenanceActions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5866,7 +5866,7 @@ const opDescribeReservedDBInstances = "DescribeReservedDBInstances" // DescribeReservedDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedDBInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6002,7 +6002,7 @@ const opDescribeReservedDBInstancesOfferings = "DescribeReservedDBInstancesOffer // DescribeReservedDBInstancesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedDBInstancesOfferings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6137,7 +6137,7 @@ const opDescribeSourceRegions = "DescribeSourceRegions" // DescribeSourceRegionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSourceRegions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6213,7 +6213,7 @@ const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModificat // DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeValidDBInstanceModifications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6297,7 +6297,7 @@ const opDownloadDBLogFilePortion = "DownloadDBLogFilePortion" // DownloadDBLogFilePortionRequest generates a "aws/request.Request" representing the // client's request for the DownloadDBLogFilePortion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6435,7 +6435,7 @@ const opFailoverDBCluster = "FailoverDBCluster" // FailoverDBClusterRequest generates a "aws/request.Request" representing the // client's request for the FailoverDBCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6533,7 +6533,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6621,7 +6621,7 @@ const opModifyDBCluster = "ModifyDBCluster" // ModifyDBClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6738,7 +6738,7 @@ const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" // ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6842,7 +6842,7 @@ const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" // ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6944,7 +6944,7 @@ const opModifyDBInstance = "ModifyDBInstance" // ModifyDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7078,7 +7078,7 @@ const opModifyDBParameterGroup = "ModifyDBParameterGroup" // ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7179,7 +7179,7 @@ const opModifyDBSnapshot = "ModifyDBSnapshot" // ModifyDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7261,7 +7261,7 @@ const opModifyDBSnapshotAttribute = "ModifyDBSnapshotAttribute" // ModifyDBSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSnapshotAttribute operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7363,7 +7363,7 @@ const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" // ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7458,7 +7458,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7560,7 +7560,7 @@ const opModifyOptionGroup = "ModifyOptionGroup" // ModifyOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyOptionGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7642,7 +7642,7 @@ const opPromoteReadReplica = "PromoteReadReplica" // PromoteReadReplicaRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplica operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7734,7 +7734,7 @@ const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" // PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplicaDBCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7816,7 +7816,7 @@ const opPurchaseReservedDBInstancesOffering = "PurchaseReservedDBInstancesOfferi // PurchaseReservedDBInstancesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedDBInstancesOffering operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7901,7 +7901,7 @@ const opRebootDBInstance = "RebootDBInstance" // RebootDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootDBInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7992,7 +7992,7 @@ const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" // RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the // client's request for the RemoveRoleFromDBCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8082,7 +8082,7 @@ const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubs // RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8164,7 +8164,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8254,7 +8254,7 @@ const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" // ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8350,7 +8350,7 @@ const opResetDBParameterGroup = "ResetDBParameterGroup" // ResetDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8440,7 +8440,7 @@ const opRestoreDBClusterFromS3 = "RestoreDBClusterFromS3" // RestoreDBClusterFromS3Request generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromS3 operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8567,7 +8567,7 @@ const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" // RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8712,7 +8712,7 @@ const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" // RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterToPointInTime operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8856,7 +8856,7 @@ const opRestoreDBInstanceFromDBSnapshot = "RestoreDBInstanceFromDBSnapshot" // RestoreDBInstanceFromDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceFromDBSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9016,7 +9016,7 @@ const opRestoreDBInstanceFromS3 = "RestoreDBInstanceFromS3" // RestoreDBInstanceFromS3Request generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceFromS3 operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9156,7 +9156,7 @@ const opRestoreDBInstanceToPointInTime = "RestoreDBInstanceToPointInTime" // RestoreDBInstanceToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceToPointInTime operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9313,7 +9313,7 @@ const opRevokeDBSecurityGroupIngress = "RevokeDBSecurityGroupIngress" // RevokeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeDBSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9405,7 +9405,7 @@ const opStartDBInstance = "StartDBInstance" // StartDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartDBInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9526,7 +9526,7 @@ const opStopDBInstance = "StopDBInstance" // StopDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopDBInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index e84ed828ff0..7fcc803f10b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -16,7 +16,7 @@ const opAuthorizeClusterSecurityGroupIngress = "AuthorizeClusterSecurityGroupIng // AuthorizeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeClusterSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -125,7 +125,7 @@ const opAuthorizeSnapshotAccess = "AuthorizeSnapshotAccess" // AuthorizeSnapshotAccessRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSnapshotAccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -226,7 +226,7 @@ const opCopyClusterSnapshot = "CopyClusterSnapshot" // CopyClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -329,7 +329,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -478,7 +478,7 @@ const opCreateClusterParameterGroup = "CreateClusterParameterGroup" // CreateClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -579,7 +579,7 @@ const opCreateClusterSecurityGroup = "CreateClusterSecurityGroup" // CreateClusterSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -675,7 +675,7 @@ const opCreateClusterSnapshot = "CreateClusterSnapshot" // CreateClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -776,7 +776,7 @@ const opCreateClusterSubnetGroup = "CreateClusterSubnetGroup" // CreateClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -890,7 +890,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1030,7 +1030,7 @@ const opCreateHsmClientCertificate = "CreateHsmClientCertificate" // CreateHsmClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateHsmClientCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1129,7 +1129,7 @@ const opCreateHsmConfiguration = "CreateHsmConfiguration" // CreateHsmConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateHsmConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1229,7 +1229,7 @@ const opCreateSnapshotCopyGrant = "CreateSnapshotCopyGrant" // CreateSnapshotCopyGrantRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshotCopyGrant operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1332,7 +1332,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1425,7 +1425,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1531,7 +1531,7 @@ const opDeleteClusterParameterGroup = "DeleteClusterParameterGroup" // DeleteClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1619,7 +1619,7 @@ const opDeleteClusterSecurityGroup = "DeleteClusterSecurityGroup" // DeleteClusterSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSecurityGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1711,7 +1711,7 @@ const opDeleteClusterSnapshot = "DeleteClusterSnapshot" // DeleteClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1801,7 +1801,7 @@ const opDeleteClusterSubnetGroup = "DeleteClusterSubnetGroup" // DeleteClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1889,7 +1889,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1975,7 +1975,7 @@ const opDeleteHsmClientCertificate = "DeleteHsmClientCertificate" // DeleteHsmClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteHsmClientCertificate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2060,7 +2060,7 @@ const opDeleteHsmConfiguration = "DeleteHsmConfiguration" // DeleteHsmConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteHsmConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2145,7 +2145,7 @@ const opDeleteSnapshotCopyGrant = "DeleteSnapshotCopyGrant" // DeleteSnapshotCopyGrantRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshotCopyGrant operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2231,7 +2231,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2316,7 +2316,7 @@ const opDescribeClusterParameterGroups = "DescribeClusterParameterGroups" // DescribeClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterParameterGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2472,7 +2472,7 @@ const opDescribeClusterParameters = "DescribeClusterParameters" // DescribeClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2618,7 +2618,7 @@ const opDescribeClusterSecurityGroups = "DescribeClusterSecurityGroups" // DescribeClusterSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2773,7 +2773,7 @@ const opDescribeClusterSnapshots = "DescribeClusterSnapshots" // DescribeClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSnapshots operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2928,7 +2928,7 @@ const opDescribeClusterSubnetGroups = "DescribeClusterSubnetGroups" // DescribeClusterSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSubnetGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3079,7 +3079,7 @@ const opDescribeClusterVersions = "DescribeClusterVersions" // DescribeClusterVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3213,7 +3213,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3364,7 +3364,7 @@ const opDescribeDefaultClusterParameters = "DescribeDefaultClusterParameters" // DescribeDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultClusterParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3498,7 +3498,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3574,7 +3574,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3725,7 +3725,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3858,7 +3858,7 @@ const opDescribeHsmClientCertificates = "DescribeHsmClientCertificates" // DescribeHsmClientCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeHsmClientCertificates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4008,7 +4008,7 @@ const opDescribeHsmConfigurations = "DescribeHsmConfigurations" // DescribeHsmConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHsmConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4158,7 +4158,7 @@ const opDescribeLoggingStatus = "DescribeLoggingStatus" // DescribeLoggingStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoggingStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4238,7 +4238,7 @@ const opDescribeOrderableClusterOptions = "DescribeOrderableClusterOptions" // DescribeOrderableClusterOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableClusterOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4376,7 +4376,7 @@ const opDescribeReservedNodeOfferings = "DescribeReservedNodeOfferings" // DescribeReservedNodeOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedNodeOfferings operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4527,7 +4527,7 @@ const opDescribeReservedNodes = "DescribeReservedNodes" // DescribeReservedNodesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedNodes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4666,7 +4666,7 @@ const opDescribeResize = "DescribeResize" // DescribeResizeRequest generates a "aws/request.Request" representing the // client's request for the DescribeResize operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4754,7 +4754,7 @@ const opDescribeSnapshotCopyGrants = "DescribeSnapshotCopyGrants" // DescribeSnapshotCopyGrantsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotCopyGrants operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4842,7 +4842,7 @@ const opDescribeTableRestoreStatus = "DescribeTableRestoreStatus" // DescribeTableRestoreStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeTableRestoreStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4928,7 +4928,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5032,7 +5032,7 @@ const opDisableLogging = "DisableLogging" // DisableLoggingRequest generates a "aws/request.Request" representing the // client's request for the DisableLogging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5112,7 +5112,7 @@ const opDisableSnapshotCopy = "DisableSnapshotCopy" // DisableSnapshotCopyRequest generates a "aws/request.Request" representing the // client's request for the DisableSnapshotCopy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5205,7 +5205,7 @@ const opEnableLogging = "EnableLogging" // EnableLoggingRequest generates a "aws/request.Request" representing the // client's request for the EnableLogging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5301,7 +5301,7 @@ const opEnableSnapshotCopy = "EnableSnapshotCopy" // EnableSnapshotCopyRequest generates a "aws/request.Request" representing the // client's request for the EnableSnapshotCopy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5410,7 +5410,7 @@ const opGetClusterCredentials = "GetClusterCredentials" // GetClusterCredentialsRequest generates a "aws/request.Request" representing the // client's request for the GetClusterCredentials operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5515,7 +5515,7 @@ const opModifyCluster = "ModifyCluster" // ModifyClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5654,7 +5654,7 @@ const opModifyClusterIamRoles = "ModifyClusterIamRoles" // ModifyClusterIamRolesRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterIamRoles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5739,7 +5739,7 @@ const opModifyClusterParameterGroup = "ModifyClusterParameterGroup" // ModifyClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5827,7 +5827,7 @@ const opModifyClusterSubnetGroup = "ModifyClusterSubnetGroup" // ModifyClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterSubnetGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5929,7 +5929,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6040,7 +6040,7 @@ const opModifySnapshotCopyRetentionPeriod = "ModifySnapshotCopyRetentionPeriod" // ModifySnapshotCopyRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the ModifySnapshotCopyRetentionPeriod operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6129,7 +6129,7 @@ const opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" // PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedNodeOffering operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6227,7 +6227,7 @@ const opRebootCluster = "RebootCluster" // RebootClusterRequest generates a "aws/request.Request" representing the // client's request for the RebootCluster operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6315,7 +6315,7 @@ const opResetClusterParameterGroup = "ResetClusterParameterGroup" // ResetClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetClusterParameterGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6402,7 +6402,7 @@ const opRestoreFromClusterSnapshot = "RestoreFromClusterSnapshot" // RestoreFromClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreFromClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6567,7 +6567,7 @@ const opRestoreTableFromClusterSnapshot = "RestoreTableFromClusterSnapshot" // RestoreTableFromClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableFromClusterSnapshot operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6679,7 +6679,7 @@ const opRevokeClusterSecurityGroupIngress = "RevokeClusterSecurityGroupIngress" // RevokeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeClusterSecurityGroupIngress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6770,7 +6770,7 @@ const opRevokeSnapshotAccess = "RevokeSnapshotAccess" // RevokeSnapshotAccessRequest generates a "aws/request.Request" representing the // client's request for the RevokeSnapshotAccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6863,7 +6863,7 @@ const opRotateEncryptionKey = "RotateEncryptionKey" // RotateEncryptionKeyRequest generates a "aws/request.Request" representing the // client's request for the RotateEncryptionKey operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index e610485f070..5357821e837 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -15,7 +15,7 @@ const opAssociateVPCWithHostedZone = "AssociateVPCWithHostedZone" // AssociateVPCWithHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the AssociateVPCWithHostedZone operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -146,7 +146,7 @@ const opChangeResourceRecordSets = "ChangeResourceRecordSets" // ChangeResourceRecordSetsRequest generates a "aws/request.Request" representing the // client's request for the ChangeResourceRecordSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -321,7 +321,7 @@ const opChangeTagsForResource = "ChangeTagsForResource" // ChangeTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ChangeTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -421,7 +421,7 @@ const opCreateHealthCheck = "CreateHealthCheck" // CreateHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the CreateHealthCheck operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -557,7 +557,7 @@ const opCreateHostedZone = "CreateHostedZone" // CreateHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the CreateHostedZone operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -731,7 +731,7 @@ const opCreateQueryLoggingConfig = "CreateQueryLoggingConfig" // CreateQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateQueryLoggingConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -932,7 +932,7 @@ const opCreateReusableDelegationSet = "CreateReusableDelegationSet" // CreateReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the CreateReusableDelegationSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1084,7 +1084,7 @@ const opCreateTrafficPolicy = "CreateTrafficPolicy" // CreateTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1184,7 +1184,7 @@ const opCreateTrafficPolicyInstance = "CreateTrafficPolicyInstance" // CreateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1289,7 +1289,7 @@ const opCreateTrafficPolicyVersion = "CreateTrafficPolicyVersion" // CreateTrafficPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicyVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1396,7 +1396,7 @@ const opCreateVPCAssociationAuthorization = "CreateVPCAssociationAuthorization" // CreateVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the CreateVPCAssociationAuthorization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1502,7 +1502,7 @@ const opDeleteHealthCheck = "DeleteHealthCheck" // DeleteHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the DeleteHealthCheck operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1596,7 +1596,7 @@ const opDeleteHostedZone = "DeleteHostedZone" // DeleteHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the DeleteHostedZone operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1720,7 +1720,7 @@ const opDeleteQueryLoggingConfig = "DeleteQueryLoggingConfig" // DeleteQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueryLoggingConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1810,7 +1810,7 @@ const opDeleteReusableDelegationSet = "DeleteReusableDelegationSet" // DeleteReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteReusableDelegationSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1906,7 +1906,7 @@ const opDeleteTrafficPolicy = "DeleteTrafficPolicy" // DeleteTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrafficPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1996,7 +1996,7 @@ const opDeleteTrafficPolicyInstance = "DeleteTrafficPolicyInstance" // DeleteTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2089,7 +2089,7 @@ const opDeleteVPCAssociationAuthorization = "DeleteVPCAssociationAuthorization" // DeleteVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVPCAssociationAuthorization operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2192,7 +2192,7 @@ const opDisassociateVPCFromHostedZone = "DisassociateVPCFromHostedZone" // DisassociateVPCFromHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the DisassociateVPCFromHostedZone operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2292,7 +2292,7 @@ const opGetAccountLimit = "GetAccountLimit" // GetAccountLimitRequest generates a "aws/request.Request" representing the // client's request for the GetAccountLimit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2376,7 +2376,7 @@ const opGetChange = "GetChange" // GetChangeRequest generates a "aws/request.Request" representing the // client's request for the GetChange operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2466,7 +2466,7 @@ const opGetCheckerIpRanges = "GetCheckerIpRanges" // GetCheckerIpRangesRequest generates a "aws/request.Request" representing the // client's request for the GetCheckerIpRanges operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2543,7 +2543,7 @@ const opGetGeoLocation = "GetGeoLocation" // GetGeoLocationRequest generates a "aws/request.Request" representing the // client's request for the GetGeoLocation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2642,7 +2642,7 @@ const opGetHealthCheck = "GetHealthCheck" // GetHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheck operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2729,7 +2729,7 @@ const opGetHealthCheckCount = "GetHealthCheckCount" // GetHealthCheckCountRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckCount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2804,7 +2804,7 @@ const opGetHealthCheckLastFailureReason = "GetHealthCheckLastFailureReason" // GetHealthCheckLastFailureReasonRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckLastFailureReason operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2887,7 +2887,7 @@ const opGetHealthCheckStatus = "GetHealthCheckStatus" // GetHealthCheckStatusRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2970,7 +2970,7 @@ const opGetHostedZone = "GetHostedZone" // GetHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZone operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3053,7 +3053,7 @@ const opGetHostedZoneCount = "GetHostedZoneCount" // GetHostedZoneCountRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZoneCount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3133,7 +3133,7 @@ const opGetHostedZoneLimit = "GetHostedZoneLimit" // GetHostedZoneLimitRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZoneLimit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3223,7 +3223,7 @@ const opGetQueryLoggingConfig = "GetQueryLoggingConfig" // GetQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the GetQueryLoggingConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3308,7 +3308,7 @@ const opGetReusableDelegationSet = "GetReusableDelegationSet" // GetReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the GetReusableDelegationSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3394,7 +3394,7 @@ const opGetReusableDelegationSetLimit = "GetReusableDelegationSetLimit" // GetReusableDelegationSetLimitRequest generates a "aws/request.Request" representing the // client's request for the GetReusableDelegationSetLimit operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3481,7 +3481,7 @@ const opGetTrafficPolicy = "GetTrafficPolicy" // GetTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3563,7 +3563,7 @@ const opGetTrafficPolicyInstance = "GetTrafficPolicyInstance" // GetTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3653,7 +3653,7 @@ const opGetTrafficPolicyInstanceCount = "GetTrafficPolicyInstanceCount" // GetTrafficPolicyInstanceCountRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicyInstanceCount operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3728,7 +3728,7 @@ const opListGeoLocations = "ListGeoLocations" // ListGeoLocationsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoLocations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3812,7 +3812,7 @@ const opListHealthChecks = "ListHealthChecks" // ListHealthChecksRequest generates a "aws/request.Request" representing the // client's request for the ListHealthChecks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3952,7 +3952,7 @@ const opListHostedZones = "ListHostedZones" // ListHostedZonesRequest generates a "aws/request.Request" representing the // client's request for the ListHostedZones operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4099,7 +4099,7 @@ const opListHostedZonesByName = "ListHostedZonesByName" // ListHostedZonesByNameRequest generates a "aws/request.Request" representing the // client's request for the ListHostedZonesByName operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4230,7 +4230,7 @@ const opListQueryLoggingConfigs = "ListQueryLoggingConfigs" // ListQueryLoggingConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListQueryLoggingConfigs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4323,7 +4323,7 @@ const opListResourceRecordSets = "ListResourceRecordSets" // ListResourceRecordSetsRequest generates a "aws/request.Request" representing the // client's request for the ListResourceRecordSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4499,7 +4499,7 @@ const opListReusableDelegationSets = "ListReusableDelegationSets" // ListReusableDelegationSetsRequest generates a "aws/request.Request" representing the // client's request for the ListReusableDelegationSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4579,7 +4579,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4679,7 +4679,7 @@ const opListTagsForResources = "ListTagsForResources" // ListTagsForResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResources operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4779,7 +4779,7 @@ const opListTrafficPolicies = "ListTrafficPolicies" // ListTrafficPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4860,7 +4860,7 @@ const opListTrafficPolicyInstances = "ListTrafficPolicyInstances" // ListTrafficPolicyInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4952,7 +4952,7 @@ const opListTrafficPolicyInstancesByHostedZone = "ListTrafficPolicyInstancesByHo // ListTrafficPolicyInstancesByHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstancesByHostedZone operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5047,7 +5047,7 @@ const opListTrafficPolicyInstancesByPolicy = "ListTrafficPolicyInstancesByPolicy // ListTrafficPolicyInstancesByPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstancesByPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5142,7 +5142,7 @@ const opListTrafficPolicyVersions = "ListTrafficPolicyVersions" // ListTrafficPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5226,7 +5226,7 @@ const opListVPCAssociationAuthorizations = "ListVPCAssociationAuthorizations" // ListVPCAssociationAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the ListVPCAssociationAuthorizations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5317,7 +5317,7 @@ const opTestDNSAnswer = "TestDNSAnswer" // TestDNSAnswerRequest generates a "aws/request.Request" representing the // client's request for the TestDNSAnswer operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5401,7 +5401,7 @@ const opUpdateHealthCheck = "UpdateHealthCheck" // UpdateHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the UpdateHealthCheck operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5492,7 +5492,7 @@ const opUpdateHostedZoneComment = "UpdateHostedZoneComment" // UpdateHostedZoneCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateHostedZoneComment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5574,7 +5574,7 @@ const opUpdateTrafficPolicyComment = "UpdateTrafficPolicyComment" // UpdateTrafficPolicyCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrafficPolicyComment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5660,7 +5660,7 @@ const opUpdateTrafficPolicyInstance = "UpdateTrafficPolicyInstance" // UpdateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrafficPolicyInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 2faeee1ec8f..a27823fdfb5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -18,7 +18,7 @@ const opAbortMultipartUpload = "AbortMultipartUpload" // AbortMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the AbortMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -101,7 +101,7 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload" // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -175,7 +175,7 @@ const opCopyObject = "CopyObject" // CopyObjectRequest generates a "aws/request.Request" representing the // client's request for the CopyObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -255,7 +255,7 @@ const opCreateBucket = "CreateBucket" // CreateBucketRequest generates a "aws/request.Request" representing the // client's request for the CreateBucket operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -337,7 +337,7 @@ const opCreateMultipartUpload = "CreateMultipartUpload" // CreateMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CreateMultipartUpload operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -417,7 +417,7 @@ const opDeleteBucket = "DeleteBucket" // DeleteBucketRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucket operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -494,7 +494,7 @@ const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -571,7 +571,7 @@ const opDeleteBucketCors = "DeleteBucketCors" // DeleteBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketCors operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -647,7 +647,7 @@ const opDeleteBucketEncryption = "DeleteBucketEncryption" // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketEncryption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -723,7 +723,7 @@ const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -800,7 +800,7 @@ const opDeleteBucketLifecycle = "DeleteBucketLifecycle" // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketLifecycle operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -876,7 +876,7 @@ const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration" // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -953,7 +953,7 @@ const opDeleteBucketPolicy = "DeleteBucketPolicy" // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1029,7 +1029,7 @@ const opDeleteBucketReplication = "DeleteBucketReplication" // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketReplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1105,7 +1105,7 @@ const opDeleteBucketTagging = "DeleteBucketTagging" // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketTagging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1181,7 +1181,7 @@ const opDeleteBucketWebsite = "DeleteBucketWebsite" // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketWebsite operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1257,7 +1257,7 @@ const opDeleteObject = "DeleteObject" // DeleteObjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1333,7 +1333,7 @@ const opDeleteObjectTagging = "DeleteObjectTagging" // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the DeleteObjectTagging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1407,7 +1407,7 @@ const opDeleteObjects = "DeleteObjects" // DeleteObjectsRequest generates a "aws/request.Request" representing the // client's request for the DeleteObjects operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1482,7 +1482,7 @@ const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration" // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAccelerateConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1556,7 +1556,7 @@ const opGetBucketAcl = "GetBucketAcl" // GetBucketAclRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAcl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1630,7 +1630,7 @@ const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration" // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1705,7 +1705,7 @@ const opGetBucketCors = "GetBucketCors" // GetBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the GetBucketCors operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1779,7 +1779,7 @@ const opGetBucketEncryption = "GetBucketEncryption" // GetBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the GetBucketEncryption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1853,7 +1853,7 @@ const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration" // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketInventoryConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1928,7 +1928,7 @@ const opGetBucketLifecycle = "GetBucketLifecycle" // GetBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLifecycle operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2005,7 +2005,7 @@ const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration" // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLifecycleConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2079,7 +2079,7 @@ const opGetBucketLocation = "GetBucketLocation" // GetBucketLocationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLocation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2153,7 +2153,7 @@ const opGetBucketLogging = "GetBucketLogging" // GetBucketLoggingRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLogging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2228,7 +2228,7 @@ const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration" // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketMetricsConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2303,7 +2303,7 @@ const opGetBucketNotification = "GetBucketNotification" // GetBucketNotificationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2380,7 +2380,7 @@ const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketNotificationConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2454,7 +2454,7 @@ const opGetBucketPolicy = "GetBucketPolicy" // GetBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetBucketPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2528,7 +2528,7 @@ const opGetBucketReplication = "GetBucketReplication" // GetBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketReplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2602,7 +2602,7 @@ const opGetBucketRequestPayment = "GetBucketRequestPayment" // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the // client's request for the GetBucketRequestPayment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2676,7 +2676,7 @@ const opGetBucketTagging = "GetBucketTagging" // GetBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the GetBucketTagging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2750,7 +2750,7 @@ const opGetBucketVersioning = "GetBucketVersioning" // GetBucketVersioningRequest generates a "aws/request.Request" representing the // client's request for the GetBucketVersioning operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2824,7 +2824,7 @@ const opGetBucketWebsite = "GetBucketWebsite" // GetBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the GetBucketWebsite operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2898,7 +2898,7 @@ const opGetObject = "GetObject" // GetObjectRequest generates a "aws/request.Request" representing the // client's request for the GetObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2977,7 +2977,7 @@ const opGetObjectAcl = "GetObjectAcl" // GetObjectAclRequest generates a "aws/request.Request" representing the // client's request for the GetObjectAcl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3056,7 +3056,7 @@ const opGetObjectTagging = "GetObjectTagging" // GetObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the GetObjectTagging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3130,7 +3130,7 @@ const opGetObjectTorrent = "GetObjectTorrent" // GetObjectTorrentRequest generates a "aws/request.Request" representing the // client's request for the GetObjectTorrent operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3204,7 +3204,7 @@ const opHeadBucket = "HeadBucket" // HeadBucketRequest generates a "aws/request.Request" representing the // client's request for the HeadBucket operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3286,7 +3286,7 @@ const opHeadObject = "HeadObject" // HeadObjectRequest generates a "aws/request.Request" representing the // client's request for the HeadObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3365,7 +3365,7 @@ const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations" // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3439,7 +3439,7 @@ const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations" // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListBucketInventoryConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3513,7 +3513,7 @@ const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations" // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListBucketMetricsConfigurations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3587,7 +3587,7 @@ const opListBuckets = "ListBuckets" // ListBucketsRequest generates a "aws/request.Request" representing the // client's request for the ListBuckets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3661,7 +3661,7 @@ const opListMultipartUploads = "ListMultipartUploads" // ListMultipartUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListMultipartUploads operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3791,7 +3791,7 @@ const opListObjectVersions = "ListObjectVersions" // ListObjectVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListObjectVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3921,7 +3921,7 @@ const opListObjects = "ListObjects" // ListObjectsRequest generates a "aws/request.Request" representing the // client's request for the ListObjects operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4058,7 +4058,7 @@ const opListObjectsV2 = "ListObjectsV2" // ListObjectsV2Request generates a "aws/request.Request" representing the // client's request for the ListObjectsV2 operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4196,7 +4196,7 @@ const opListParts = "ListParts" // ListPartsRequest generates a "aws/request.Request" representing the // client's request for the ListParts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4326,7 +4326,7 @@ const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration" // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAccelerateConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4402,7 +4402,7 @@ const opPutBucketAcl = "PutBucketAcl" // PutBucketAclRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAcl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4478,7 +4478,7 @@ const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration" // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4555,7 +4555,7 @@ const opPutBucketCors = "PutBucketCors" // PutBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the PutBucketCors operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4631,7 +4631,7 @@ const opPutBucketEncryption = "PutBucketEncryption" // PutBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the PutBucketEncryption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4708,7 +4708,7 @@ const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration" // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketInventoryConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4785,7 +4785,7 @@ const opPutBucketLifecycle = "PutBucketLifecycle" // PutBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLifecycle operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4864,7 +4864,7 @@ const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration" // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLifecycleConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4941,7 +4941,7 @@ const opPutBucketLogging = "PutBucketLogging" // PutBucketLoggingRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLogging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5019,7 +5019,7 @@ const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration" // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketMetricsConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5096,7 +5096,7 @@ const opPutBucketNotification = "PutBucketNotification" // PutBucketNotificationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketNotification operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5175,7 +5175,7 @@ const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketNotificationConfiguration operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5251,7 +5251,7 @@ const opPutBucketPolicy = "PutBucketPolicy" // PutBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutBucketPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5328,7 +5328,7 @@ const opPutBucketReplication = "PutBucketReplication" // PutBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketReplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5405,7 +5405,7 @@ const opPutBucketRequestPayment = "PutBucketRequestPayment" // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the // client's request for the PutBucketRequestPayment operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5485,7 +5485,7 @@ const opPutBucketTagging = "PutBucketTagging" // PutBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the PutBucketTagging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5561,7 +5561,7 @@ const opPutBucketVersioning = "PutBucketVersioning" // PutBucketVersioningRequest generates a "aws/request.Request" representing the // client's request for the PutBucketVersioning operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5638,7 +5638,7 @@ const opPutBucketWebsite = "PutBucketWebsite" // PutBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the PutBucketWebsite operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5714,7 +5714,7 @@ const opPutObject = "PutObject" // PutObjectRequest generates a "aws/request.Request" representing the // client's request for the PutObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5788,7 +5788,7 @@ const opPutObjectAcl = "PutObjectAcl" // PutObjectAclRequest generates a "aws/request.Request" representing the // client's request for the PutObjectAcl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5868,7 +5868,7 @@ const opPutObjectTagging = "PutObjectTagging" // PutObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the PutObjectTagging operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5942,7 +5942,7 @@ const opRestoreObject = "RestoreObject" // RestoreObjectRequest generates a "aws/request.Request" representing the // client's request for the RestoreObject operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6021,7 +6021,7 @@ const opUploadPart = "UploadPart" // UploadPartRequest generates a "aws/request.Request" representing the // client's request for the UploadPart operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6101,7 +6101,7 @@ const opUploadPartCopy = "UploadPartCopy" // UploadPartCopyRequest generates a "aws/request.Request" representing the // client's request for the UploadPartCopy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6807,6 +6807,9 @@ func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifec type BucketLoggingStatus struct { _ struct{} `type:"structure"` + // Container for logging information. Presence of this element indicates that + // logging is enabled. Parameters TargetBucket and TargetPrefix are required + // in this case. LoggingEnabled *LoggingEnabled `type:"structure"` } @@ -10720,6 +10723,9 @@ func (s *GetBucketLoggingInput) getBucket() (v string) { type GetBucketLoggingOutput struct { _ struct{} `type:"structure"` + // Container for logging information. Presence of this element indicates that + // logging is enabled. Parameters TargetBucket and TargetPrefix are required + // in this case. LoggingEnabled *LoggingEnabled `type:"structure"` } @@ -12865,6 +12871,13 @@ type InputSerialization struct { // Describes the serialization of a CSV-encoded object. CSV *CSVInput `type:"structure"` + + // Specifies object's compression format. Valid values: NONE, GZIP. Default + // Value: NONE. + CompressionType *string `type:"string" enum:"CompressionType"` + + // Specifies JSON as object's input serialization format. + JSON *JSONInput `type:"structure"` } // String returns the string representation @@ -12883,6 +12896,18 @@ func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization { return s } +// SetCompressionType sets the CompressionType field's value. +func (s *InputSerialization) SetCompressionType(v string) *InputSerialization { + s.CompressionType = &v + return s +} + +// SetJSON sets the JSON field's value. +func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization { + s.JSON = v + return s +} + type InventoryConfiguration struct { _ struct{} `type:"structure"` @@ -13273,6 +13298,52 @@ func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule { return s } +type JSONInput struct { + _ struct{} `type:"structure"` + + // The type of JSON. Valid values: Document, Lines. + Type *string `type:"string" enum:"JSONType"` +} + +// String returns the string representation +func (s JSONInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JSONInput) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *JSONInput) SetType(v string) *JSONInput { + s.Type = &v + return s +} + +type JSONOutput struct { + _ struct{} `type:"structure"` + + // The value used to separate individual records in the output. + RecordDelimiter *string `type:"string"` +} + +// String returns the string representation +func (s JSONOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JSONOutput) GoString() string { + return s.String() +} + +// SetRecordDelimiter sets the RecordDelimiter field's value. +func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput { + s.RecordDelimiter = &v + return s +} + // Container for object key name prefix and suffix filtering rules. type KeyFilter struct { _ struct{} `type:"structure"` @@ -15397,6 +15468,9 @@ func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location { return s } +// Container for logging information. Presence of this element indicates that +// logging is enabled. Parameters TargetBucket and TargetPrefix are required +// in this case. type LoggingEnabled struct { _ struct{} `type:"structure"` @@ -15406,13 +15480,17 @@ type LoggingEnabled struct { // to deliver their logs to the same target bucket. In this case you should // choose a different TargetPrefix for each source bucket so that the delivered // log files can be distinguished by key. - TargetBucket *string `type:"string"` + // + // TargetBucket is a required field + TargetBucket *string `type:"string" required:"true"` TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"` // This element lets you specify a prefix for the keys that the log files will // be stored under. - TargetPrefix *string `type:"string"` + // + // TargetPrefix is a required field + TargetPrefix *string `type:"string" required:"true"` } // String returns the string representation @@ -15428,6 +15506,12 @@ func (s LoggingEnabled) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *LoggingEnabled) Validate() error { invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"} + if s.TargetBucket == nil { + invalidParams.Add(request.NewErrParamRequired("TargetBucket")) + } + if s.TargetPrefix == nil { + invalidParams.Add(request.NewErrParamRequired("TargetPrefix")) + } if s.TargetGrants != nil { for i, v := range s.TargetGrants { if v == nil { @@ -15762,10 +15846,11 @@ func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVers } // Container for the transition rule that describes when noncurrent objects -// transition to the STANDARD_IA or GLACIER storage class. If your bucket is -// versioning-enabled (or versioning is suspended), you can set this action -// to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA -// or GLACIER storage class at a specific period in the object's lifetime. +// transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your +// bucket is versioning-enabled (or versioning is suspended), you can set this +// action to request that Amazon S3 transition noncurrent object versions to +// the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period +// in the object's lifetime. type NoncurrentVersionTransition struct { _ struct{} `type:"structure"` @@ -16187,6 +16272,9 @@ type OutputSerialization struct { // Describes the serialization of CSV-encoded Select results. CSV *CSVOutput `type:"structure"` + + // Specifies JSON as request's output serialization format. + JSON *JSONOutput `type:"structure"` } // String returns the string representation @@ -16205,6 +16293,12 @@ func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization { return s } +// SetJSON sets the JSON field's value. +func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization { + s.JSON = v + return s +} + type Owner struct { _ struct{} `type:"structure"` @@ -19148,10 +19242,11 @@ type Rule struct { NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"` // Container for the transition rule that describes when noncurrent objects - // transition to the STANDARD_IA or GLACIER storage class. If your bucket is - // versioning-enabled (or versioning is suspended), you can set this action - // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA - // or GLACIER storage class at a specific period in the object's lifetime. + // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your + // bucket is versioning-enabled (or versioning is suspended), you can set this + // action to request that Amazon S3 transition noncurrent object versions to + // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period + // in the object's lifetime. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"` // Prefix identifying one or more objects to which the rule applies. @@ -20781,6 +20876,14 @@ const ( BucketVersioningStatusSuspended = "Suspended" ) +const ( + // CompressionTypeNone is a CompressionType enum value + CompressionTypeNone = "NONE" + + // CompressionTypeGzip is a CompressionType enum value + CompressionTypeGzip = "GZIP" +) + // Requests Amazon S3 to encode the object keys in the response and specifies // the encoding method to use. An object key may contain any Unicode character; // however, XML 1.0 parser cannot parse some characters, such as characters @@ -20901,6 +21004,14 @@ const ( InventoryOptionalFieldEncryptionStatus = "EncryptionStatus" ) +const ( + // JSONTypeDocument is a JSONType enum value + JSONTypeDocument = "DOCUMENT" + + // JSONTypeLines is a JSONType enum value + JSONTypeLines = "LINES" +) + const ( // MFADeleteEnabled is a MFADelete enum value MFADeleteEnabled = "Enabled" @@ -20957,6 +21068,12 @@ const ( // ObjectStorageClassGlacier is a ObjectStorageClass enum value ObjectStorageClassGlacier = "GLACIER" + + // ObjectStorageClassStandardIa is a ObjectStorageClass enum value + ObjectStorageClassStandardIa = "STANDARD_IA" + + // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value + ObjectStorageClassOnezoneIa = "ONEZONE_IA" ) const ( @@ -21078,6 +21195,9 @@ const ( // StorageClassStandardIa is a StorageClass enum value StorageClassStandardIa = "STANDARD_IA" + + // StorageClassOnezoneIa is a StorageClass enum value + StorageClassOnezoneIa = "ONEZONE_IA" ) const ( @@ -21110,6 +21230,9 @@ const ( // TransitionStorageClassStandardIa is a TransitionStorageClass enum value TransitionStorageClassStandardIa = "STANDARD_IA" + + // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value + TransitionStorageClassOnezoneIa = "ONEZONE_IA" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go index fa3d29942a6..1fa9902913c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go @@ -17,7 +17,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -98,7 +98,7 @@ const opCreateEndpoint = "CreateEndpoint" // CreateEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -197,7 +197,7 @@ const opCreateEndpointConfig = "CreateEndpointConfig" // CreateEndpointConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateEndpointConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -295,7 +295,7 @@ const opCreateModel = "CreateModel" // CreateModelRequest generates a "aws/request.Request" representing the // client's request for the CreateModel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -396,7 +396,7 @@ const opCreateNotebookInstance = "CreateNotebookInstance" // CreateNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -512,7 +512,7 @@ const opCreateNotebookInstanceLifecycleConfig = "CreateNotebookInstanceLifecycle // CreateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -556,6 +556,18 @@ func (c *SageMaker) CreateNotebookInstanceLifecycleConfigRequest(input *CreateNo // instance. A lifecycle configuration is a collection of shell scripts that // run when you create or start a notebook instance. // +// Each lifecycle configuration script has a limit of 16384 characters. +// +// The value of the $PATH environment variable that is available to both scripts +// is /sbin:bin:/usr/sbin:/usr/bin. +// +// View CloudWatch Logs for notebook instance lifecycle configurations in log +// group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook]. +// +// Lifecycle configuration scripts cannot run for longer than 5 minutes. If +// a script runs for longer than 5 minutes, it fails and the notebook instance +// is not created or started. +// // For information about notebook instance lifestyle configurations, see notebook-lifecycle-config. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -596,7 +608,7 @@ const opCreatePresignedNotebookInstanceUrl = "CreatePresignedNotebookInstanceUrl // CreatePresignedNotebookInstanceUrlRequest generates a "aws/request.Request" representing the // client's request for the CreatePresignedNotebookInstanceUrl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -674,7 +686,7 @@ const opCreateTrainingJob = "CreateTrainingJob" // CreateTrainingJobRequest generates a "aws/request.Request" representing the // client's request for the CreateTrainingJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -792,7 +804,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -869,7 +881,7 @@ const opDeleteEndpointConfig = "DeleteEndpointConfig" // DeleteEndpointConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpointConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -947,7 +959,7 @@ const opDeleteModel = "DeleteModel" // DeleteModelRequest generates a "aws/request.Request" representing the // client's request for the DeleteModel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1026,7 +1038,7 @@ const opDeleteNotebookInstance = "DeleteNotebookInstance" // DeleteNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1107,7 +1119,7 @@ const opDeleteNotebookInstanceLifecycleConfig = "DeleteNotebookInstanceLifecycle // DeleteNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1183,7 +1195,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1259,7 +1271,7 @@ const opDescribeEndpoint = "DescribeEndpoint" // DescribeEndpointRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1333,7 +1345,7 @@ const opDescribeEndpointConfig = "DescribeEndpointConfig" // DescribeEndpointConfigRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpointConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1408,7 +1420,7 @@ const opDescribeModel = "DescribeModel" // DescribeModelRequest generates a "aws/request.Request" representing the // client's request for the DescribeModel operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1482,7 +1494,7 @@ const opDescribeNotebookInstance = "DescribeNotebookInstance" // DescribeNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1556,7 +1568,7 @@ const opDescribeNotebookInstanceLifecycleConfig = "DescribeNotebookInstanceLifec // DescribeNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1632,7 +1644,7 @@ const opDescribeTrainingJob = "DescribeTrainingJob" // DescribeTrainingJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeTrainingJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1711,7 +1723,7 @@ const opListEndpointConfigs = "ListEndpointConfigs" // ListEndpointConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListEndpointConfigs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1841,7 +1853,7 @@ const opListEndpoints = "ListEndpoints" // ListEndpointsRequest generates a "aws/request.Request" representing the // client's request for the ListEndpoints operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1971,7 +1983,7 @@ const opListModels = "ListModels" // ListModelsRequest generates a "aws/request.Request" representing the // client's request for the ListModels operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2102,7 +2114,7 @@ const opListNotebookInstanceLifecycleConfigs = "ListNotebookInstanceLifecycleCon // ListNotebookInstanceLifecycleConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListNotebookInstanceLifecycleConfigs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2232,7 +2244,7 @@ const opListNotebookInstances = "ListNotebookInstances" // ListNotebookInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListNotebookInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2363,7 +2375,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2493,7 +2505,7 @@ const opListTrainingJobs = "ListTrainingJobs" // ListTrainingJobsRequest generates a "aws/request.Request" representing the // client's request for the ListTrainingJobs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2623,7 +2635,7 @@ const opStartNotebookInstance = "StartNotebookInstance" // StartNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2709,7 +2721,7 @@ const opStopNotebookInstance = "StopNotebookInstance" // StopNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2792,7 +2804,7 @@ const opStopTrainingJob = "StopTrainingJob" // StopTrainingJobRequest generates a "aws/request.Request" representing the // client's request for the StopTrainingJob operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2885,7 +2897,7 @@ const opUpdateEndpoint = "UpdateEndpoint" // UpdateEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2972,7 +2984,7 @@ const opUpdateEndpointWeightsAndCapacities = "UpdateEndpointWeightsAndCapacities // UpdateEndpointWeightsAndCapacitiesRequest generates a "aws/request.Request" representing the // client's request for the UpdateEndpointWeightsAndCapacities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3057,7 +3069,7 @@ const opUpdateNotebookInstance = "UpdateNotebookInstance" // UpdateNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateNotebookInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3140,7 +3152,7 @@ const opUpdateNotebookInstanceLifecycleConfig = "UpdateNotebookInstanceLifecycle // UpdateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateNotebookInstanceLifecycleConfig operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3308,13 +3320,13 @@ func (s *AddTagsOutput) SetTags(v []*Tag) *AddTagsOutput { // // For more information about algorithms provided by Amazon SageMaker, see Algorithms // (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). For information -// about using your own algorithms, see Bring Your Own Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/adv-topics-own-algo.html). +// about using your own algorithms, see your-algorithms. type AlgorithmSpecification struct { _ struct{} `type:"structure"` // The registry path of the Docker image that contains the training algorithm. - // For information about using your own algorithms, see Docker Registry Paths - // for Algorithms Provided by Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/algos-docker-registry-paths.html). + // For information about docker registry paths for built-in algorithms, see + // sagemaker-algo-docker-registry-paths. // // TrainingImage is a required field TrainingImage *string `type:"string" required:"true"` @@ -4252,8 +4264,7 @@ type CreateTrainingJobInput struct { // The registry path of the Docker image that contains the training algorithm // and algorithm-specific metadata, including the input mode. For more information // about algorithms provided by Amazon SageMaker, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). - // For information about providing your own algorithms, see Bring Your Own Algorithms - // (http://docs.aws.amazon.com/sagemaker/latest/dg/adv-topics-own-algo.html). + // For information about providing your own algorithms, see your-algorithms. // // AlgorithmSpecification is a required field AlgorithmSpecification *AlgorithmSpecification `type:"structure" required:"true"` @@ -5387,7 +5398,10 @@ type DescribeNotebookInstanceOutput struct { // was created CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` - // Describes whether the notebook instance has internet access. + // Describes whether Amazon SageMaker provides internet access to the notebook + // instance. If this value is set to Disabled, he notebook instance does not + // have internet access, and cannot connect to Amazon SageMaker training and + // endpoint services. // // For more information, see appendix-notebook-and-internet-access. DirectInternetAccess *string `type:"string" enum:"DirectInternetAccess"` @@ -7091,7 +7105,17 @@ func (s *NotebookInstanceLifecycleConfigSummary) SetNotebookInstanceLifecycleCon // Contains the notebook instance lifecycle configuration script. // -// This script runs in the path /sbin:bin:/usr/sbin:/usr/bin. +// Each lifecycle configuration script has a limit of 16384 characters. +// +// The value of the $PATH environment variable that is available to both scripts +// is /sbin:bin:/usr/sbin:/usr/bin. +// +// View CloudWatch Logs for notebook instance lifecycle configurations in log +// group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook]. +// +// Lifecycle configuration scripts cannot run for longer than 5 minutes. If +// a script runs for longer than 5 minutes, it fails and the notebook instance +// is not created or started. // // For information about notebook instance lifestyle configurations, see notebook-lifecycle-config. type NotebookInstanceLifecycleHook struct { @@ -8405,14 +8429,47 @@ const ( // InstanceTypeMlT2Medium is a InstanceType enum value InstanceTypeMlT2Medium = "ml.t2.medium" + // InstanceTypeMlT2Large is a InstanceType enum value + InstanceTypeMlT2Large = "ml.t2.large" + + // InstanceTypeMlT2Xlarge is a InstanceType enum value + InstanceTypeMlT2Xlarge = "ml.t2.xlarge" + + // InstanceTypeMlT22xlarge is a InstanceType enum value + InstanceTypeMlT22xlarge = "ml.t2.2xlarge" + // InstanceTypeMlM4Xlarge is a InstanceType enum value InstanceTypeMlM4Xlarge = "ml.m4.xlarge" + // InstanceTypeMlM42xlarge is a InstanceType enum value + InstanceTypeMlM42xlarge = "ml.m4.2xlarge" + + // InstanceTypeMlM44xlarge is a InstanceType enum value + InstanceTypeMlM44xlarge = "ml.m4.4xlarge" + + // InstanceTypeMlM410xlarge is a InstanceType enum value + InstanceTypeMlM410xlarge = "ml.m4.10xlarge" + + // InstanceTypeMlM416xlarge is a InstanceType enum value + InstanceTypeMlM416xlarge = "ml.m4.16xlarge" + // InstanceTypeMlP2Xlarge is a InstanceType enum value InstanceTypeMlP2Xlarge = "ml.p2.xlarge" + // InstanceTypeMlP28xlarge is a InstanceType enum value + InstanceTypeMlP28xlarge = "ml.p2.8xlarge" + + // InstanceTypeMlP216xlarge is a InstanceType enum value + InstanceTypeMlP216xlarge = "ml.p2.16xlarge" + // InstanceTypeMlP32xlarge is a InstanceType enum value InstanceTypeMlP32xlarge = "ml.p3.2xlarge" + + // InstanceTypeMlP38xlarge is a InstanceType enum value + InstanceTypeMlP38xlarge = "ml.p3.8xlarge" + + // InstanceTypeMlP316xlarge is a InstanceType enum value + InstanceTypeMlP316xlarge = "ml.p3.16xlarge" ) const ( @@ -8490,35 +8547,101 @@ const ( ) const ( + // ProductionVariantInstanceTypeMlT2Medium is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT2Medium = "ml.t2.medium" + + // ProductionVariantInstanceTypeMlT2Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT2Large = "ml.t2.large" + + // ProductionVariantInstanceTypeMlT2Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT2Xlarge = "ml.t2.xlarge" + + // ProductionVariantInstanceTypeMlT22xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT22xlarge = "ml.t2.2xlarge" + + // ProductionVariantInstanceTypeMlM4Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM4Xlarge = "ml.m4.xlarge" + + // ProductionVariantInstanceTypeMlM42xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM42xlarge = "ml.m4.2xlarge" + + // ProductionVariantInstanceTypeMlM44xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM44xlarge = "ml.m4.4xlarge" + + // ProductionVariantInstanceTypeMlM410xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM410xlarge = "ml.m4.10xlarge" + + // ProductionVariantInstanceTypeMlM416xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM416xlarge = "ml.m4.16xlarge" + + // ProductionVariantInstanceTypeMlM5Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM5Large = "ml.m5.large" + + // ProductionVariantInstanceTypeMlM5Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM5Xlarge = "ml.m5.xlarge" + + // ProductionVariantInstanceTypeMlM52xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM52xlarge = "ml.m5.2xlarge" + + // ProductionVariantInstanceTypeMlM54xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM54xlarge = "ml.m5.4xlarge" + + // ProductionVariantInstanceTypeMlM512xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM512xlarge = "ml.m5.12xlarge" + + // ProductionVariantInstanceTypeMlM524xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM524xlarge = "ml.m5.24xlarge" + + // ProductionVariantInstanceTypeMlC4Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC4Large = "ml.c4.large" + + // ProductionVariantInstanceTypeMlC4Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC4Xlarge = "ml.c4.xlarge" + // ProductionVariantInstanceTypeMlC42xlarge is a ProductionVariantInstanceType enum value ProductionVariantInstanceTypeMlC42xlarge = "ml.c4.2xlarge" + // ProductionVariantInstanceTypeMlC44xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC44xlarge = "ml.c4.4xlarge" + // ProductionVariantInstanceTypeMlC48xlarge is a ProductionVariantInstanceType enum value ProductionVariantInstanceTypeMlC48xlarge = "ml.c4.8xlarge" - // ProductionVariantInstanceTypeMlC4Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC4Xlarge = "ml.c4.xlarge" + // ProductionVariantInstanceTypeMlP2Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP2Xlarge = "ml.p2.xlarge" - // ProductionVariantInstanceTypeMlC52xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC52xlarge = "ml.c5.2xlarge" + // ProductionVariantInstanceTypeMlP28xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP28xlarge = "ml.p2.8xlarge" - // ProductionVariantInstanceTypeMlC59xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlC59xlarge = "ml.c5.9xlarge" + // ProductionVariantInstanceTypeMlP216xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP216xlarge = "ml.p2.16xlarge" + + // ProductionVariantInstanceTypeMlP32xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP32xlarge = "ml.p3.2xlarge" + + // ProductionVariantInstanceTypeMlP38xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP38xlarge = "ml.p3.8xlarge" + + // ProductionVariantInstanceTypeMlP316xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP316xlarge = "ml.p3.16xlarge" + + // ProductionVariantInstanceTypeMlC5Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC5Large = "ml.c5.large" // ProductionVariantInstanceTypeMlC5Xlarge is a ProductionVariantInstanceType enum value ProductionVariantInstanceTypeMlC5Xlarge = "ml.c5.xlarge" - // ProductionVariantInstanceTypeMlM4Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlM4Xlarge = "ml.m4.xlarge" + // ProductionVariantInstanceTypeMlC52xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC52xlarge = "ml.c5.2xlarge" - // ProductionVariantInstanceTypeMlP2Xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP2Xlarge = "ml.p2.xlarge" + // ProductionVariantInstanceTypeMlC54xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC54xlarge = "ml.c5.4xlarge" - // ProductionVariantInstanceTypeMlP32xlarge is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlP32xlarge = "ml.p3.2xlarge" + // ProductionVariantInstanceTypeMlC59xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC59xlarge = "ml.c5.9xlarge" - // ProductionVariantInstanceTypeMlT2Medium is a ProductionVariantInstanceType enum value - ProductionVariantInstanceTypeMlT2Medium = "ml.t2.medium" + // ProductionVariantInstanceTypeMlC518xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC518xlarge = "ml.c5.18xlarge" ) const ( @@ -8605,18 +8728,45 @@ const ( // TrainingInstanceTypeMlM4Xlarge is a TrainingInstanceType enum value TrainingInstanceTypeMlM4Xlarge = "ml.m4.xlarge" + // TrainingInstanceTypeMlM42xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM42xlarge = "ml.m4.2xlarge" + // TrainingInstanceTypeMlM44xlarge is a TrainingInstanceType enum value TrainingInstanceTypeMlM44xlarge = "ml.m4.4xlarge" // TrainingInstanceTypeMlM410xlarge is a TrainingInstanceType enum value TrainingInstanceTypeMlM410xlarge = "ml.m4.10xlarge" + // TrainingInstanceTypeMlM416xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM416xlarge = "ml.m4.16xlarge" + + // TrainingInstanceTypeMlM5Large is a TrainingInstanceType enum value + TrainingInstanceTypeMlM5Large = "ml.m5.large" + + // TrainingInstanceTypeMlM5Xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM5Xlarge = "ml.m5.xlarge" + + // TrainingInstanceTypeMlM52xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM52xlarge = "ml.m5.2xlarge" + + // TrainingInstanceTypeMlM54xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM54xlarge = "ml.m5.4xlarge" + + // TrainingInstanceTypeMlM512xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM512xlarge = "ml.m5.12xlarge" + + // TrainingInstanceTypeMlM524xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM524xlarge = "ml.m5.24xlarge" + // TrainingInstanceTypeMlC4Xlarge is a TrainingInstanceType enum value TrainingInstanceTypeMlC4Xlarge = "ml.c4.xlarge" // TrainingInstanceTypeMlC42xlarge is a TrainingInstanceType enum value TrainingInstanceTypeMlC42xlarge = "ml.c4.2xlarge" + // TrainingInstanceTypeMlC44xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC44xlarge = "ml.c4.4xlarge" + // TrainingInstanceTypeMlC48xlarge is a TrainingInstanceType enum value TrainingInstanceTypeMlC48xlarge = "ml.c4.8xlarge" diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go new file mode 100644 index 00000000000..1207a196c7e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -0,0 +1,4475 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package secretsmanager + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCancelRotateSecret = "CancelRotateSecret" + +// CancelRotateSecretRequest generates a "aws/request.Request" representing the +// client's request for the CancelRotateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelRotateSecret for more information on using the CancelRotateSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelRotateSecretRequest method. +// req, resp := client.CancelRotateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret +func (c *SecretsManager) CancelRotateSecretRequest(input *CancelRotateSecretInput) (req *request.Request, output *CancelRotateSecretOutput) { + op := &request.Operation{ + Name: opCancelRotateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelRotateSecretInput{} + } + + output = &CancelRotateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelRotateSecret API operation for AWS Secrets Manager. +// +// Disables automatic scheduled rotation and cancels the rotation of a secret +// if one is currently in progress. +// +// To re-enable scheduled rotation, call RotateSecret with AutomaticallyRotateAfterDays +// set to a value greater than 0. This will immediately rotate your secret and +// then enable the automatic schedule. +// +// If you cancel a rotation that is in progress, it can leave the VersionStage +// labels in an unexpected state. Depending on what step of the rotation was +// in progress, you might need to remove the staging label AWSPENDING from the +// partially created version, specified by the SecretVersionId response value. +// You should also evaluate the partially rotated new version to see if it should +// be deleted, which you can do by removing all staging labels from the new +// version's VersionStage field. +// +// To successfully start a rotation, the staging label AWSPENDING must be in +// one of the following states: +// +// * Not be attached to any version at all +// +// * Attached to the same version as the staging label AWSCURRENT +// +// If the staging label AWSPENDING is attached to a different version than the +// version with AWSCURRENT then the attempt to rotate fails. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:CancelRotateSecret +// +// Related operations +// +// * To configure rotation for a secret or to manually trigger a rotation, +// use RotateSecret. +// +// * To get the rotation configuration details for a secret, use DescribeSecret. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// * To list all of the versions currently associated with a secret, use +// ListSecretVersionIds. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation CancelRotateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret +func (c *SecretsManager) CancelRotateSecret(input *CancelRotateSecretInput) (*CancelRotateSecretOutput, error) { + req, out := c.CancelRotateSecretRequest(input) + return out, req.Send() +} + +// CancelRotateSecretWithContext is the same as CancelRotateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See CancelRotateSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) CancelRotateSecretWithContext(ctx aws.Context, input *CancelRotateSecretInput, opts ...request.Option) (*CancelRotateSecretOutput, error) { + req, out := c.CancelRotateSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSecret = "CreateSecret" + +// CreateSecretRequest generates a "aws/request.Request" representing the +// client's request for the CreateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSecret for more information on using the CreateSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSecretRequest method. +// req, resp := client.CreateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret +func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *request.Request, output *CreateSecretOutput) { + op := &request.Operation{ + Name: opCreateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSecretInput{} + } + + output = &CreateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSecret API operation for AWS Secrets Manager. +// +// Creates a new secret. A secret in AWS Secrets Manager consists of both the +// protected secret data and the important information needed to manage the +// secret. +// +// Secrets Manager stores the encrypted secret data in one of a collection of +// "versions" associated with the secret. Each version contains a copy of the +// encrypted secret data. Each version is associated with one or more "staging +// labels" that identify where the version is in the rotation cycle. The SecretVersionsToStages +// field of the secret contains the mapping of staging labels to the active +// versions of the secret. Versions without a staging label are considered deprecated +// and are not included in the list. +// +// You provide the secret data to be encrypted by putting text in the SecretString +// parameter or binary data in the SecretBinary parameter. If you include SecretString +// or SecretBinary then Secrets Manager also creates an initial secret version +// and, if you don't supply a staging label, automatically maps the new version's +// ID to the staging label AWSCURRENT. +// +// If you call an operation that needs to encrypt or decrypt the SecretString +// and SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a KMS encryption key, AWS Secrets Manager uses +// the account's default AWS managed customer master key (CMK) with the alias +// aws/secretsmanager. If this key doesn't already exist in your account then +// AWS Secrets Manager creates it for you automatically. All users in the same +// AWS account automatically have access to use the default CMK. Note that if +// an AWS Secrets Manager API call results in AWS having to create the account's +// AWS-managed CMK, it can result in a one-time significant delay in returning +// the result. +// +// If the secret is in a different AWS account from the credentials calling +// an API that requires encryption or decryption of the secret value then you +// must create and use a custom KMS CMK because you can't access the default +// CMK for the account using credentials from a different AWS account. Store +// the ARN of the CMK in the secret when you create the secret or when you update +// it by including it in the KMSKeyId. If you call an API that must encrypt +// or decrypt SecretString or SecretBinary using credentials from a different +// account then the KMS key policy must grant cross-account access to that other +// account's user or role. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:CreateSecret +// +// * kms:GenerateDataKey - needed only if you use a customer-created KMS +// key to encrypt the secret. You do not need this permission to use the +// account's default AWS managed CMK for Secrets Manager. +// +// * kms:Encrypt - needed only if you use a customer-created KMS key to encrypt +// the secret. You do not need this permission to use the account's default +// AWS managed CMK for Secrets Manager. +// +// Related operations +// +// * To delete a secret, use DeleteSecret. +// +// * To modify an existing secret, use UpdateSecret. +// +// * To create a new version of a secret, use PutSecretValue. +// +// * To retrieve the encrypted secure string and secure binary values, use +// GetSecretValue. +// +// * To retrieve all other details for a secret, use DescribeSecret. This +// does not include the encrypted secure string and secure binary values. +// +// * To retrieve the list of secret versions associated with the current +// secret, use DescribeSecret and examine the SecretVersionsToStages response +// value. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation CreateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the AWS Secrets Manager +// internal limits. +// +// * ErrCodeEncryptionFailure "EncryptionFailure" +// AWS Secrets Manager can't encrypt the protected secret text using the provided +// KMS key. Check that the customer master key (CMK) is available, enabled, +// and not in an invalid state. For more information, see How Key State Affects +// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// A resource with the ID you requested already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" +// The policy document that you provided isn't valid. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret +func (c *SecretsManager) CreateSecret(input *CreateSecretInput) (*CreateSecretOutput, error) { + req, out := c.CreateSecretRequest(input) + return out, req.Send() +} + +// CreateSecretWithContext is the same as CreateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) CreateSecretWithContext(ctx aws.Context, input *CreateSecretInput, opts ...request.Option) (*CreateSecretOutput, error) { + req, out := c.CreateSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSecret = "DeleteSecret" + +// DeleteSecretRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSecret for more information on using the DeleteSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSecretRequest method. +// req, resp := client.DeleteSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret +func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *request.Request, output *DeleteSecretOutput) { + op := &request.Operation{ + Name: opDeleteSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSecretInput{} + } + + output = &DeleteSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSecret API operation for AWS Secrets Manager. +// +// Deletes an entire secret and all of its versions. You can optionally include +// a recovery window during which you can restore the secret. If you don't provide +// a recovery window value, the operation defaults to 30 days. Secrets Manager +// attaches a DeletionDate stamp to the secret that specifies the end of the +// recovery window. At the end of the recovery window, Secrets Manager deletes +// the secret permanently. +// +// At any time before recovery period ends, you can use RestoreSecret to remove +// the DeletionDate and cancel the deletion of the secret. +// +// You cannot access the encrypted secret information in any secret that is +// scheduled for deletion. If you need to access that information, you can cancel +// the deletion with RestoreSecret and then retrieve the information. +// +// There is no explicit operation to delete a version of a secret. Instead, +// remove all staging labels from the VersionStage field of a version. That +// marks the version as deprecated and allows AWS Secrets Manager to delete +// it as needed. Versions that do not have any staging labels do not show up +// in ListSecretVersionIds unless you specify IncludeDeprecated. +// +// The permanent secret deletion at the end of the waiting period is performed +// as a background task with low priority. There is no guarantee of a specific +// time after the recovery window for the actual delete operation to occur. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:DeleteSecret +// +// Related operations +// +// * To create a secret, use CreateSecret. +// +// * To cancel deletion of a version of a secret before the recovery period +// has expired, use RestoreSecret. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation DeleteSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteSecret +func (c *SecretsManager) DeleteSecret(input *DeleteSecretInput) (*DeleteSecretOutput, error) { + req, out := c.DeleteSecretRequest(input) + return out, req.Send() +} + +// DeleteSecretWithContext is the same as DeleteSecret with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) DeleteSecretWithContext(ctx aws.Context, input *DeleteSecretInput, opts ...request.Option) (*DeleteSecretOutput, error) { + req, out := c.DeleteSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSecret = "DescribeSecret" + +// DescribeSecretRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSecret for more information on using the DescribeSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSecretRequest method. +// req, resp := client.DescribeSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret +func (c *SecretsManager) DescribeSecretRequest(input *DescribeSecretInput) (req *request.Request, output *DescribeSecretOutput) { + op := &request.Operation{ + Name: opDescribeSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSecretInput{} + } + + output = &DescribeSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSecret API operation for AWS Secrets Manager. +// +// Retrieves the details of a secret. It does not include the encrypted fields. +// Only those fields that are populated with a value are returned in the response. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:DescribeSecret +// +// Related operations +// +// * To create a secret, use CreateSecret. +// +// * To modify a secret, use UpdateSecret. +// +// * To retrieve the encrypted secret information in a version of the secret, +// use GetSecretValue. +// +// * To list all of the secrets in the AWS account, use ListSecrets. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation DescribeSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DescribeSecret +func (c *SecretsManager) DescribeSecret(input *DescribeSecretInput) (*DescribeSecretOutput, error) { + req, out := c.DescribeSecretRequest(input) + return out, req.Send() +} + +// DescribeSecretWithContext is the same as DescribeSecret with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) DescribeSecretWithContext(ctx aws.Context, input *DescribeSecretInput, opts ...request.Option) (*DescribeSecretOutput, error) { + req, out := c.DescribeSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRandomPassword = "GetRandomPassword" + +// GetRandomPasswordRequest generates a "aws/request.Request" representing the +// client's request for the GetRandomPassword operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRandomPassword for more information on using the GetRandomPassword +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRandomPasswordRequest method. +// req, resp := client.GetRandomPasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword +func (c *SecretsManager) GetRandomPasswordRequest(input *GetRandomPasswordInput) (req *request.Request, output *GetRandomPasswordOutput) { + op := &request.Operation{ + Name: opGetRandomPassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRandomPasswordInput{} + } + + output = &GetRandomPasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRandomPassword API operation for AWS Secrets Manager. +// +// Generates a random password of the specified complexity. This operation is +// intended for use in the Lambda rotation function. Per best practice, we recommend +// that you specify the maximum length and include every character type that +// the system you are generating a password for can support. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:GetRandomPassword +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation GetRandomPassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetRandomPassword +func (c *SecretsManager) GetRandomPassword(input *GetRandomPasswordInput) (*GetRandomPasswordOutput, error) { + req, out := c.GetRandomPasswordRequest(input) + return out, req.Send() +} + +// GetRandomPasswordWithContext is the same as GetRandomPassword with the addition of +// the ability to pass a context and additional request options. +// +// See GetRandomPassword for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) GetRandomPasswordWithContext(ctx aws.Context, input *GetRandomPasswordInput, opts ...request.Option) (*GetRandomPasswordOutput, error) { + req, out := c.GetRandomPasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSecretValue = "GetSecretValue" + +// GetSecretValueRequest generates a "aws/request.Request" representing the +// client's request for the GetSecretValue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSecretValue for more information on using the GetSecretValue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSecretValueRequest method. +// req, resp := client.GetSecretValueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue +func (c *SecretsManager) GetSecretValueRequest(input *GetSecretValueInput) (req *request.Request, output *GetSecretValueOutput) { + op := &request.Operation{ + Name: opGetSecretValue, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSecretValueInput{} + } + + output = &GetSecretValueOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSecretValue API operation for AWS Secrets Manager. +// +// Retrieves the contents of the encrypted fields SecretString and SecretBinary +// from the specified version of a secret. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:GetSecretValue +// +// * kms:Decrypt - required only if you use a customer-created KMS key to +// encrypt the secret. You do not need this permission to use the account's +// default AWS managed CMK for Secrets Manager. +// +// Related operations +// +// * To create a new version of the secret with different encrypted information, +// use PutSecretValue. +// +// * To retrieve the non-encrypted details for the secret, use DescribeSecret. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation GetSecretValue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeDecryptionFailure "DecryptionFailure" +// AWS Secrets Manager can't decrypt the protected secret text using the provided +// KMS key. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetSecretValue +func (c *SecretsManager) GetSecretValue(input *GetSecretValueInput) (*GetSecretValueOutput, error) { + req, out := c.GetSecretValueRequest(input) + return out, req.Send() +} + +// GetSecretValueWithContext is the same as GetSecretValue with the addition of +// the ability to pass a context and additional request options. +// +// See GetSecretValue for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) GetSecretValueWithContext(ctx aws.Context, input *GetSecretValueInput, opts ...request.Option) (*GetSecretValueOutput, error) { + req, out := c.GetSecretValueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListSecretVersionIds = "ListSecretVersionIds" + +// ListSecretVersionIdsRequest generates a "aws/request.Request" representing the +// client's request for the ListSecretVersionIds operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListSecretVersionIds for more information on using the ListSecretVersionIds +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListSecretVersionIdsRequest method. +// req, resp := client.ListSecretVersionIdsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds +func (c *SecretsManager) ListSecretVersionIdsRequest(input *ListSecretVersionIdsInput) (req *request.Request, output *ListSecretVersionIdsOutput) { + op := &request.Operation{ + Name: opListSecretVersionIds, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListSecretVersionIdsInput{} + } + + output = &ListSecretVersionIdsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSecretVersionIds API operation for AWS Secrets Manager. +// +// Lists all of the versions attached to the specified secret. The output does +// not include the SecretString or SecretBinary fields. By default, the list +// includes only versions that have at least one staging label in VersionStage +// attached. +// +// Always check the NextToken response parameter when calling any of the List* +// operations. These operations can occasionally return an empty or shorter +// than expected list of results even when there are more results available. +// When this happens, the NextToken response parameter contains a value to pass +// to the next call to the same API to request the next part of the list. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:ListSecretVersionIds +// +// Related operations +// +// * To list the secrets in an account, use ListSecrets. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation ListSecretVersionIds for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// You provided an invalid NextToken value. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecretVersionIds +func (c *SecretsManager) ListSecretVersionIds(input *ListSecretVersionIdsInput) (*ListSecretVersionIdsOutput, error) { + req, out := c.ListSecretVersionIdsRequest(input) + return out, req.Send() +} + +// ListSecretVersionIdsWithContext is the same as ListSecretVersionIds with the addition of +// the ability to pass a context and additional request options. +// +// See ListSecretVersionIds for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) ListSecretVersionIdsWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, opts ...request.Option) (*ListSecretVersionIdsOutput, error) { + req, out := c.ListSecretVersionIdsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListSecretVersionIdsPages iterates over the pages of a ListSecretVersionIds operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListSecretVersionIds method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListSecretVersionIds operation. +// pageNum := 0 +// err := client.ListSecretVersionIdsPages(params, +// func(page *ListSecretVersionIdsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SecretsManager) ListSecretVersionIdsPages(input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool) error { + return c.ListSecretVersionIdsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListSecretVersionIdsPagesWithContext same as ListSecretVersionIdsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) ListSecretVersionIdsPagesWithContext(ctx aws.Context, input *ListSecretVersionIdsInput, fn func(*ListSecretVersionIdsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListSecretVersionIdsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListSecretVersionIdsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListSecretVersionIdsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListSecrets = "ListSecrets" + +// ListSecretsRequest generates a "aws/request.Request" representing the +// client's request for the ListSecrets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListSecrets for more information on using the ListSecrets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListSecretsRequest method. +// req, resp := client.ListSecretsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets +func (c *SecretsManager) ListSecretsRequest(input *ListSecretsInput) (req *request.Request, output *ListSecretsOutput) { + op := &request.Operation{ + Name: opListSecrets, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListSecretsInput{} + } + + output = &ListSecretsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSecrets API operation for AWS Secrets Manager. +// +// Lists all of the secrets that are stored by AWS Secrets Manager in the AWS +// account. To list the versions currently stored for a specific secret, use +// ListSecretVersionIds. The encrypted fields SecretString and SecretBinary +// are not included in the output. To get that information, call the GetSecretValue +// operation. +// +// Always check the NextToken response parameter when calling any of the List* +// operations. These operations can occasionally return an empty or shorter +// than expected list of results even when there are more results available. +// When this happens, the NextToken response parameter contains a value to pass +// to the next call to the same API to request the next part of the list. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:ListSecrets +// +// Related operations +// +// * To list the versions attached to a secret, use ListSecretVersionIds. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation ListSecrets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// You provided an invalid NextToken value. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ListSecrets +func (c *SecretsManager) ListSecrets(input *ListSecretsInput) (*ListSecretsOutput, error) { + req, out := c.ListSecretsRequest(input) + return out, req.Send() +} + +// ListSecretsWithContext is the same as ListSecrets with the addition of +// the ability to pass a context and additional request options. +// +// See ListSecrets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) ListSecretsWithContext(ctx aws.Context, input *ListSecretsInput, opts ...request.Option) (*ListSecretsOutput, error) { + req, out := c.ListSecretsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListSecretsPages iterates over the pages of a ListSecrets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListSecrets method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListSecrets operation. +// pageNum := 0 +// err := client.ListSecretsPages(params, +// func(page *ListSecretsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SecretsManager) ListSecretsPages(input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool) error { + return c.ListSecretsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListSecretsPagesWithContext same as ListSecretsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) ListSecretsPagesWithContext(ctx aws.Context, input *ListSecretsInput, fn func(*ListSecretsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListSecretsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListSecretsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListSecretsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPutSecretValue = "PutSecretValue" + +// PutSecretValueRequest generates a "aws/request.Request" representing the +// client's request for the PutSecretValue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutSecretValue for more information on using the PutSecretValue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutSecretValueRequest method. +// req, resp := client.PutSecretValueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue +func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req *request.Request, output *PutSecretValueOutput) { + op := &request.Operation{ + Name: opPutSecretValue, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutSecretValueInput{} + } + + output = &PutSecretValueOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutSecretValue API operation for AWS Secrets Manager. +// +// Stores a new encrypted secret value in the specified secret. To do this, +// the operation creates a new version and attaches it to the secret. The version +// can contain a new SecretString value or a new SecretBinary value. +// +// The AWS Secrets Manager console uses only the SecretString field. To add +// binary data to a secret with the SecretBinary field you must use the AWS +// CLI or one of the AWS SDKs. +// +// * If this operation creates the first version for the secret then Secrets +// Manager automatically attaches the staging label AWSCURRENT to the new +// version. +// +// * If another version of this secret already exists, then this operation +// does not automatically move any staging labels other than those that you +// specify in the VersionStages parameter. +// +// * This operation is idempotent. If a version with a SecretVersionId with +// the same value as the ClientRequestToken parameter already exists and +// you specify the same secret data, the operation succeeds but does nothing. +// However, if the secret data is different, then the operation fails because +// you cannot modify an existing version; you can only create new ones. +// +// * If this operation moves the staging label AWSCURRENT to this version +// (because you included it in the StagingLabels parameter) then Secrets +// Manager also automatically moves the staging label AWSPREVIOUS to the +// version that AWSCURRENT was removed from. +// +// If you call an operation that needs to encrypt or decrypt the SecretString +// and SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a KMS encryption key, AWS Secrets Manager uses +// the account's default AWS managed customer master key (CMK) with the alias +// aws/secretsmanager. If this key doesn't already exist in your account then +// AWS Secrets Manager creates it for you automatically. All users in the same +// AWS account automatically have access to use the default CMK. Note that if +// an AWS Secrets Manager API call results in AWS having to create the account's +// AWS-managed CMK, it can result in a one-time significant delay in returning +// the result. +// +// If the secret is in a different AWS account from the credentials calling +// an API that requires encryption or decryption of the secret value then you +// must create and use a custom KMS CMK because you can't access the default +// CMK for the account using credentials from a different AWS account. Store +// the ARN of the CMK in the secret when you create the secret or when you update +// it by including it in the KMSKeyId. If you call an API that must encrypt +// or decrypt SecretString or SecretBinary using credentials from a different +// account then the KMS key policy must grant cross-account access to that other +// account's user or role. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:PutSecretValue +// +// * kms:GenerateDataKey - needed only if you use a customer-created KMS +// key to encrypt the secret. You do not need this permission to use the +// account's AWS managed CMK for Secrets Manager. +// +// * kms:Encrypt - needed only if you use a customer-created KMS key to encrypt +// the secret. You do not need this permission to use the account's AWS managed +// CMK for Secrets Manager. +// +// Related operations +// +// * To retrieve the encrypted value you store in the version of a secret, +// use GetSecretValue. +// +// * To create a secret, use CreateSecret. +// +// * To get the details for a secret, use DescribeSecret. +// +// * To list the versions attached to a secret, use ListSecretVersionIds. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation PutSecretValue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the AWS Secrets Manager +// internal limits. +// +// * ErrCodeEncryptionFailure "EncryptionFailure" +// AWS Secrets Manager can't encrypt the protected secret text using the provided +// KMS key. Check that the customer master key (CMK) is available, enabled, +// and not in an invalid state. For more information, see How Key State Affects +// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// A resource with the ID you requested already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutSecretValue +func (c *SecretsManager) PutSecretValue(input *PutSecretValueInput) (*PutSecretValueOutput, error) { + req, out := c.PutSecretValueRequest(input) + return out, req.Send() +} + +// PutSecretValueWithContext is the same as PutSecretValue with the addition of +// the ability to pass a context and additional request options. +// +// See PutSecretValue for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) PutSecretValueWithContext(ctx aws.Context, input *PutSecretValueInput, opts ...request.Option) (*PutSecretValueOutput, error) { + req, out := c.PutSecretValueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRestoreSecret = "RestoreSecret" + +// RestoreSecretRequest generates a "aws/request.Request" representing the +// client's request for the RestoreSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RestoreSecret for more information on using the RestoreSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RestoreSecretRequest method. +// req, resp := client.RestoreSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret +func (c *SecretsManager) RestoreSecretRequest(input *RestoreSecretInput) (req *request.Request, output *RestoreSecretOutput) { + op := &request.Operation{ + Name: opRestoreSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreSecretInput{} + } + + output = &RestoreSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreSecret API operation for AWS Secrets Manager. +// +// Cancels the scheduled deletion of a secret by removing the DeletedDate time +// stamp. This makes the secret accessible to query once again. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:RestoreSecret +// +// Related operations +// +// * To delete a secret, use DeleteSecret. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation RestoreSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret +func (c *SecretsManager) RestoreSecret(input *RestoreSecretInput) (*RestoreSecretOutput, error) { + req, out := c.RestoreSecretRequest(input) + return out, req.Send() +} + +// RestoreSecretWithContext is the same as RestoreSecret with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) RestoreSecretWithContext(ctx aws.Context, input *RestoreSecretInput, opts ...request.Option) (*RestoreSecretOutput, error) { + req, out := c.RestoreSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRotateSecret = "RotateSecret" + +// RotateSecretRequest generates a "aws/request.Request" representing the +// client's request for the RotateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RotateSecret for more information on using the RotateSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RotateSecretRequest method. +// req, resp := client.RotateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret +func (c *SecretsManager) RotateSecretRequest(input *RotateSecretInput) (req *request.Request, output *RotateSecretOutput) { + op := &request.Operation{ + Name: opRotateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RotateSecretInput{} + } + + output = &RotateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// RotateSecret API operation for AWS Secrets Manager. +// +// Configures and starts the asynchronous process of rotating this secret. If +// you include the configuration parameters, the operation sets those values +// for the secret and then immediately starts a rotation. If you do not include +// the configuration parameters, the operation starts a rotation with the values +// already stored in the secret. After the rotation completes, the protected +// service and its clients all use the new version of the secret. +// +// This required configuration information includes the ARN of an AWS Lambda +// function and the time between scheduled rotations. The Lambda rotation function +// creates a new version of the secret and creates or updates the credentials +// on the protected service to match. After testing the new credentials, the +// function marks the new secret with the staging label AWSCURRENT so that your +// clients all immediately begin to use the new version. For more information +// about rotating secrets and how to configure a Lambda function to rotate the +// secrets for your protected service, see Rotating Secrets in AWS Secrets Manager +// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/;asm-service-name;/latest/userguide/rotating-secrets.html) +// in the AWS Secrets Manager User Guide. +// +// The rotation function must end with the versions of the secret in one of +// two states: +// +// * The AWSPENDING and AWSCURRENT staging labels are attached to the same +// version of the secret, or +// +// * The AWSPENDING staging label is not attached to any version of the secret. +// +// If instead the AWSPENDING staging label is present but is not attached to +// the same version as AWSCURRENT then any later invocation of RotateSecret +// assumes that a previous rotation request is still in progress and returns +// an error. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:RotateSecret +// +// * lambda:InvokeFunction (on the function specified in the secret's metadata) +// +// Related operations +// +// * To list the secrets in your account, use ListSecrets. +// +// * To get the details for a version of a secret, use DescribeSecret. +// +// * To create a new version of a secret, use CreateSecret. +// +// * To attach staging labels to or remove staging labels from a version +// of a secret, use UpdateSecretVersionStage. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation RotateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret +func (c *SecretsManager) RotateSecret(input *RotateSecretInput) (*RotateSecretOutput, error) { + req, out := c.RotateSecretRequest(input) + return out, req.Send() +} + +// RotateSecretWithContext is the same as RotateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See RotateSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) RotateSecretWithContext(ctx aws.Context, input *RotateSecretInput, opts ...request.Option) (*RotateSecretOutput, error) { + req, out := c.RotateSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResource +func (c *SecretsManager) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Secrets Manager. +// +// Attaches one or more tags, each consisting of a key name and a value, to +// the specified secret. Tags are part of the secret's overall metadata, and +// are not associated with any specific version of the secret. This operation +// only appends tags to the existing list of tags. To remove tags, you must +// use UntagResource. +// +// The following basic restrictions apply to tags: +// +// * Maximum number of tags per secret—50 +// +// * Maximum key length—127 Unicode characters in UTF-8 +// +// * Maximum value length—255 Unicode characters in UTF-8 +// +// * Tag keys and values are case sensitive. +// +// * Do not use the aws: prefix in your tag names or values because it is +// reserved for AWS use. You can't edit or delete tag names or values with +// this prefix. Tags with this prefix do not count against your tags per +// secret limit. +// +// * If your tagging schema will be used across multiple services and resources, +// remember that other services might have restrictions on allowed characters. +// Generally allowed characters are: letters, spaces, and numbers representable +// in UTF-8, plus the following special characters: + - = . _ : / @. +// +// If you use tags as part of your security strategy, then adding or removing +// a tag can change permissions. If successfully completing this operation would +// result in you losing your permissions for this secret, then the operation +// is blocked and returns an Access Denied error. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:TagResource +// +// Related operations +// +// * To remove one or more tags from the collection attached to a secret, +// use UntagResource. +// +// * To view the list of tags attached to a secret, use DescribeSecret. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/TagResource +func (c *SecretsManager) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResource +func (c *SecretsManager) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Secrets Manager. +// +// Removes one or more tags from the specified secret. +// +// This operation is idempotent. If a requested tag is not attached to the secret, +// no error is returned and the secret metadata is unchanged. +// +// If you use tags as part of your security strategy, then removing a tag can +// change permissions. If successfully completing this operation would result +// in you losing your permissions for this secret, then the operation is blocked +// and returns an Access Denied error. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:UntagResource +// +// Related operations +// +// * To add one or more tags to the collection attached to a secret, use +// TagResource. +// +// * To view the list of tags attached to a secret, use DescribeSecret. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UntagResource +func (c *SecretsManager) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSecret = "UpdateSecret" + +// UpdateSecretRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSecret for more information on using the UpdateSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSecretRequest method. +// req, resp := client.UpdateSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret +func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *request.Request, output *UpdateSecretOutput) { + op := &request.Operation{ + Name: opUpdateSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSecretInput{} + } + + output = &UpdateSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSecret API operation for AWS Secrets Manager. +// +// Modifies many of the details of a secret. If you include a ClientRequestToken +// and either SecretString or SecretBinary then it also creates a new version +// attached to the secret. +// +// To modify the rotation configuration of a secret, use RotateSecret instead. +// +// The AWS Secrets Manager console uses only the SecretString parameter and +// therefore limits you to encrypting and storing only a text string. To encrypt +// and store binary data as part of the version of a secret, you must use either +// the AWS CLI or one of the AWS SDKs. +// +// * If this update creates the first version of the secret or if you did +// not include the VersionStages parameter then Secrets Manager automatically +// attaches the staging label AWSCURRENT to the new version and removes it +// from any version that had it previously. The previous version (if any) +// is then given the staging label AWSPREVIOUS. +// +// * If a version with a SecretVersionId with the same value as the ClientRequestToken +// parameter already exists, the operation generates an error. You cannot +// modify an existing version, you can only create new ones. +// +// If you call an operation that needs to encrypt or decrypt the SecretString +// and SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a KMS encryption key, AWS Secrets Manager uses +// the account's default AWS managed customer master key (CMK) with the alias +// aws/secretsmanager. If this key doesn't already exist in your account then +// AWS Secrets Manager creates it for you automatically. All users in the same +// AWS account automatically have access to use the default CMK. Note that if +// an AWS Secrets Manager API call results in AWS having to create the account's +// AWS-managed CMK, it can result in a one-time significant delay in returning +// the result. +// +// If the secret is in a different AWS account from the credentials calling +// an API that requires encryption or decryption of the secret value then you +// must create and use a custom KMS CMK because you can't access the default +// CMK for the account using credentials from a different AWS account. Store +// the ARN of the CMK in the secret when you create the secret or when you update +// it by including it in the KMSKeyId. If you call an API that must encrypt +// or decrypt SecretString or SecretBinary using credentials from a different +// account then the KMS key policy must grant cross-account access to that other +// account's user or role. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:UpdateSecret +// +// * kms:GenerateDataKey - needed only if you use a custom KMS key to encrypt +// the secret. You do not need this permission to use the account's AWS managed +// CMK for Secrets Manager. +// +// * kms:Decrypt - needed only if you use a custom KMS key to encrypt the +// secret. You do not need this permission to use the account's AWS managed +// CMK for Secrets Manager. +// +// Related operations +// +// * To create a new secret, use CreateSecret. +// +// * To add only a new version to an existing secret, use PutSecretValue. +// +// * To get the details for a secret, use DescribeSecret. +// +// * To list the versions contained in a secret, use ListSecretVersionIds. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation UpdateSecret for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the AWS Secrets Manager +// internal limits. +// +// * ErrCodeEncryptionFailure "EncryptionFailure" +// AWS Secrets Manager can't encrypt the protected secret text using the provided +// KMS key. Check that the customer master key (CMK) is available, enabled, +// and not in an invalid state. For more information, see How Key State Affects +// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// A resource with the ID you requested already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" +// The policy document that you provided isn't valid. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret +func (c *SecretsManager) UpdateSecret(input *UpdateSecretInput) (*UpdateSecretOutput, error) { + req, out := c.UpdateSecretRequest(input) + return out, req.Send() +} + +// UpdateSecretWithContext is the same as UpdateSecret with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) UpdateSecretWithContext(ctx aws.Context, input *UpdateSecretInput, opts ...request.Option) (*UpdateSecretOutput, error) { + req, out := c.UpdateSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSecretVersionStage = "UpdateSecretVersionStage" + +// UpdateSecretVersionStageRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSecretVersionStage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSecretVersionStage for more information on using the UpdateSecretVersionStage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSecretVersionStageRequest method. +// req, resp := client.UpdateSecretVersionStageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage +func (c *SecretsManager) UpdateSecretVersionStageRequest(input *UpdateSecretVersionStageInput) (req *request.Request, output *UpdateSecretVersionStageOutput) { + op := &request.Operation{ + Name: opUpdateSecretVersionStage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSecretVersionStageInput{} + } + + output = &UpdateSecretVersionStageOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSecretVersionStage API operation for AWS Secrets Manager. +// +// Modifies the staging labels attached to a version of a secret. Staging labels +// are used to track a version as it progresses through the secret rotation +// process. You can attach a staging label to only one version of a secret at +// a time. If a staging label to be added is already attached to another version, +// then it is moved--removed from the other version first and then attached +// to this one. For more information about staging labels, see Staging Labels +// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/;asm-service-name;/latest/userguide/terms-concepts.html#term_label) +// in the AWS Secrets Manager User Guide. +// +// The staging labels that you specify in the VersionStage parameter are added +// to the existing list of staging labels--they don't replace it. +// +// You can move the AWSCURRENT staging label to this version by including it +// in this call. +// +// Whenever you move AWSCURRENT, Secrets Manager automatically moves the label +// AWSPREVIOUS to the version that AWSCURRENT was removed from. +// +// If this action results in the last label being removed from a version, then +// the version is considered to be 'deprecated' and can be deleted by Secrets +// Manager. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:UpdateSecretVersionStage +// +// Related operations +// +// * To get the list of staging labels that are currently associated with +// a version of a secret, use DescribeSecret and examine the SecretVersionsToStages +// response value. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation UpdateSecretVersionStage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. For example, if you try to enable rotation on a secret, you +// must already have a Lambda function ARN configured or included as a parameter +// in this call. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because it would exceed one of the AWS Secrets Manager +// internal limits. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecretVersionStage +func (c *SecretsManager) UpdateSecretVersionStage(input *UpdateSecretVersionStageInput) (*UpdateSecretVersionStageOutput, error) { + req, out := c.UpdateSecretVersionStageRequest(input) + return out, req.Send() +} + +// UpdateSecretVersionStageWithContext is the same as UpdateSecretVersionStage with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSecretVersionStage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) UpdateSecretVersionStageWithContext(ctx aws.Context, input *UpdateSecretVersionStageInput, opts ...request.Option) (*UpdateSecretVersionStageOutput, error) { + req, out := c.UpdateSecretVersionStageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CancelRotateSecretInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret for which you want to cancel a rotation request. You + // can specify either the Amazon Resource Name (ARN) or the friendly name of + // the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelRotateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRotateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelRotateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelRotateSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *CancelRotateSecretInput) SetSecretId(v string) *CancelRotateSecretInput { + s.SecretId = &v + return s +} + +type CancelRotateSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret for which rotation was canceled. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret for which rotation was canceled. + Name *string `min:"1" type:"string"` + + // The unique identifier of the version of the secret that was created during + // the rotation. This version might not be complete, and should be evaluated + // for possible deletion. At the very least, you should remove the VersionStage + // value AWSPENDING to enable this version to be deleted. Failing to clean up + // a cancelled rotation can block you from successfully starting future rotations. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s CancelRotateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRotateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *CancelRotateSecretOutput) SetARN(v string) *CancelRotateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *CancelRotateSecretOutput) SetName(v string) *CancelRotateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *CancelRotateSecretOutput) SetVersionId(v string) *CancelRotateSecretOutput { + s.VersionId = &v + return s +} + +type CreateSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) If you include SecretString or SecretBinary, then an initial version + // is created as part of the secret, and this parameter specifies a unique identifier + // for the new version. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes as the value for this parameter in the request. If you + // don't use the SDK and instead generate a raw HTTP request to the AWS Secrets + // Manager service endpoint, then you must generate a ClientRequestToken yourself + // for the new version and include that value in the request. + // + // This value helps ensure idempotency. Secrets Manager uses this value to prevent + // the accidental creation of duplicate versions if there are failures and retries + // during a rotation. We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value to ensure uniqueness of your versions within the specified secret. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are the same as those in the request, then the + // request is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from those in the request then the + // request fails because you cannot modify an existing version. Instead, + // use PutSecretValue to create a new version. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies a user-provided description of the secret. + Description *string `type:"string"` + + // (Optional) Specifies the ARN or alias of the AWS KMS customer master key + // (CMK) to be used to encrypt the SecretString and SecretBinary values in the + // versions stored in this secret. + // + // If you don't specify this value, then Secrets Manager defaults to using the + // AWS account's default CMK (the one named aws/secretsmanager). If a KMS CMK + // with that name doesn't yet exist, then AWS Secrets Manager creates it for + // you automatically the first time it needs to encrypt a version's SecretString + // or SecretBinary fields. + // + // You can use the account's default CMK to encrypt and decrypt only if you + // call this operation using credentials from the same account that owns the + // secret. If the secret is in a different account, then you must create a custom + // CMK and specify the ARN in this field. + KmsKeyId *string `type:"string"` + + // Specifies the friendly name of the new secret. The secret name can consist + // of uppercase letters, lowercase letters, digits, and any of the following + // characters: /_+=.@-    Spaces are not permitted. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // (Optional) Specifies binary data that you want to encrypt and store in the + // new version of the secret. To use this parameter in the command-line tools, + // we recommend that you store your binary data in a file and then use the appropriate + // technique for your tool to pass the contents of the file as a parameter. + // + // Either SecretString, SecretBinary, or both must have a value. They cannot + // both be empty. + // + // This SecretBinary value is stored separately from the SecretString, but the + // two parameters jointly share a maximum size limit. + // + // This parameter is not available using the Secrets Manager console. It can + // be accessed only by using the AWS CLI or one of the AWS SDKs. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // (Optional) Specifies text data that you want to encrypt and store in this + // new version of the secret. + // + // Either SecretString, SecretBinary, or both must have a value. They cannot + // both be empty. + // + // This string value is stored separately from the SecretBinary, but the two + // parameters jointly share a maximum size limit. + // + // If you create a secret by using the Secrets Manager console then Secrets + // Manager puts the protected secret text in only the SecretString parameter. + // The Secrets Manager console stores the information as a JSON structure of + // key/value pairs that the Lambda rotation function knows how to parse. + // + // For storing multiple values, we recommend that you use a JSON text string + // argument and specify key/value pairs. For information on how to format a + // JSON parameter for the various command line tool environments, see Using + // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. For example: + // + // [{"Key":"username","Value":"bob"},{"Key":"password","Value":"abc123xyz456"}] + // + // If your command-line tool or SDK requires quotation marks around the parameter, + // you should use single quotes to avoid confusion with the double quotes required + // in the JSON text. + SecretString *string `type:"string"` + + // (Optional) Specifies a list of user-defined tags that are attached to the + // secret. Each tag is a "Key" and "Value" pair of strings. This operation only + // appends tags to the existing list of tags. To remove tags, you must use UntagResource. + // + // AWS Secrets Manager tag key names are case sensitive. A tag with the key + // "ABC" is a different tag from one with key "abc". + // + // If you check tags in IAM policy Condition elements as part of your security + // strategy, then adding or removing a tag can change permissions. If the successful + // completion of this operation would result in you losing your permissions + // for this secret, then this operation is blocked and returns an Access Denied + // error. + // + // This parameter requires a JSON text string argument. For information on how + // to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. For example: + // + // [{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}] + // + // If your command-line tool or SDK requires quotation marks around the parameter, + // you should use single quotes to avoid confusion with the double quotes required + // in the JSON text. + // + // The following basic restrictions apply to tags: + // + // * Maximum number of tags per secret—50 + // + // * Maximum key length—127 Unicode characters in UTF-8 + // + // * Maximum value length—255 Unicode characters in UTF-8 + // + // * Tag keys and values are case sensitive. + // + // * Do not use the aws: prefix in your tag names or values because it is + // reserved for AWS use. You can't edit or delete tag names or values with + // this prefix. Tags with this prefix do not count against your tags per + // secret limit. + // + // * If your tagging schema will be used across multiple services and resources, + // remember that other services might have restrictions on allowed characters. + // Generally allowed characters are: letters, spaces, and numbers representable + // in UTF-8, plus the following special characters: + - = . _ : / @. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSecretInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateSecretInput) SetClientRequestToken(v string) *CreateSecretInput { + s.ClientRequestToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateSecretInput) SetDescription(v string) *CreateSecretInput { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateSecretInput) SetKmsKeyId(v string) *CreateSecretInput { + s.KmsKeyId = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSecretInput) SetName(v string) *CreateSecretInput { + s.Name = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *CreateSecretInput) SetSecretBinary(v []byte) *CreateSecretInput { + s.SecretBinary = v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *CreateSecretInput) SetSecretString(v string) *CreateSecretInput { + s.SecretString = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateSecretInput) SetTags(v []*Tag) *CreateSecretInput { + s.Tags = v + return s +} + +type CreateSecretOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the secret that you just created. + // + // AWS Secrets Manager automatically adds several random characters to the name + // at the end of the ARN when you initially create a secret. This affects only + // the ARN and not the actual friendly name. This ensures that if you create + // a new secret with the same name as an old secret that you previously deleted, + // then users with access to the old secret don't automatically get access to + // the new secret because the ARNs are different. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret that you just created. + Name *string `min:"1" type:"string"` + + // The unique identifier that's associated with the version of the secret you + // just created. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s CreateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *CreateSecretOutput) SetARN(v string) *CreateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateSecretOutput) SetName(v string) *CreateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { + s.VersionId = &v + return s +} + +type DeleteSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies the number of days that AWS Secrets Manager waits before + // it can delete the secret. + // + // This value can range from 7 to 30 days. The default value is 30. + RecoveryWindowInDays *int64 `type:"long"` + + // Specifies the secret that you want to delete. You can specify either the + // Amazon Resource Name (ARN) or the friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRecoveryWindowInDays sets the RecoveryWindowInDays field's value. +func (s *DeleteSecretInput) SetRecoveryWindowInDays(v int64) *DeleteSecretInput { + s.RecoveryWindowInDays = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *DeleteSecretInput) SetSecretId(v string) *DeleteSecretInput { + s.SecretId = &v + return s +} + +type DeleteSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret that is now scheduled for deletion. + ARN *string `min:"20" type:"string"` + + // The date and time after which this secret will be deleted by AWS Secrets + // Manager and is no longer recoverable. This value is the date and time of + // the delete request plus the number of days specified in RecoveryWindowInDays. + DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The friendly name of the secret that is now scheduled for deletion. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *DeleteSecretOutput) SetARN(v string) *DeleteSecretOutput { + s.ARN = &v + return s +} + +// SetDeletionDate sets the DeletionDate field's value. +func (s *DeleteSecretOutput) SetDeletionDate(v time.Time) *DeleteSecretOutput { + s.DeletionDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteSecretOutput) SetName(v string) *DeleteSecretOutput { + s.Name = &v + return s +} + +type DescribeSecretInput struct { + _ struct{} `type:"structure"` + + // The identifier of the secret whose details you want to retrieve. You can + // specify either the Amazon Resource Name (ARN) or the friendly name of the + // secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *DescribeSecretInput) SetSecretId(v string) *DescribeSecretInput { + s.SecretId = &v + return s +} + +type DescribeSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret. + ARN *string `min:"20" type:"string"` + + // This value exists if the secret is scheduled for deletion. Some time after + // the specified date and time, Secrets Manager deletes the secret and all of + // its versions. + // + // If a secret is scheduled for deletion, then its details, including the encrypted + // secret information, is not accessible. To cancel a scheduled deletion and + // restore access, use RestoreSecret. + DeletedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The user-provided description of the secret. + Description *string `type:"string"` + + // The ARN or alias of the AWS KMS customer master key (CMK) that's used to + // encrypt the SecretString and SecretBinary fields in each version of the secret. + // If you don't provide a key, then AWS Secrets Manager defaults to encrypting + // the secret fields with the default KMS CMK (the one named awssecretsmanager) + // for this account. + KmsKeyId *string `type:"string"` + + // The last date that this secret was accessed. This value is truncated to midnight + // of the date and therefore shows only the date, not the time. + LastAccessedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The last date and time that this secret was modified in any way. + LastChangedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The last date and time that the Secrets Manager rotation process for this + // secret was invoked. + LastRotatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The user-provided friendly name of the secret. + Name *string `min:"1" type:"string"` + + // Specifies whether automatic rotation is enabled for this secret. + // + // To enable rotation, use RotateSecret with AutomaticallyRotateAfterDays set + // to a value greater than 0. To disable rotation, use CancelRotateSecret. + RotationEnabled *bool `type:"boolean"` + + // The ARN of a Lambda function that's invoked by AWS Secrets Manager to rotate + // the secret either automatically per the schedule or manually by a call to + // RotateSecret. + RotationLambdaARN *string `type:"string"` + + // A structure that contains the rotation configuration for this secret. + RotationRules *RotationRulesType `type:"structure"` + + // The list of user-defined tags that are associated with the secret. To add + // tags to a secret, use TagResource. To remove tags, use UntagResource. + Tags []*Tag `type:"list"` + + // A list of all of the currently assigned VersionStage staging labels and the + // SecretVersionId that each is attached to. Staging labels are used to keep + // track of the different versions during the rotation process. + // + // A version that does not have any staging labels attached is considered deprecated + // and subject to deletion. Such versions are not included in this list. + VersionIdsToStages map[string][]*string `type:"map"` +} + +// String returns the string representation +func (s DescribeSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *DescribeSecretOutput) SetARN(v string) *DescribeSecretOutput { + s.ARN = &v + return s +} + +// SetDeletedDate sets the DeletedDate field's value. +func (s *DescribeSecretOutput) SetDeletedDate(v time.Time) *DescribeSecretOutput { + s.DeletedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DescribeSecretOutput) SetDescription(v string) *DescribeSecretOutput { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DescribeSecretOutput) SetKmsKeyId(v string) *DescribeSecretOutput { + s.KmsKeyId = &v + return s +} + +// SetLastAccessedDate sets the LastAccessedDate field's value. +func (s *DescribeSecretOutput) SetLastAccessedDate(v time.Time) *DescribeSecretOutput { + s.LastAccessedDate = &v + return s +} + +// SetLastChangedDate sets the LastChangedDate field's value. +func (s *DescribeSecretOutput) SetLastChangedDate(v time.Time) *DescribeSecretOutput { + s.LastChangedDate = &v + return s +} + +// SetLastRotatedDate sets the LastRotatedDate field's value. +func (s *DescribeSecretOutput) SetLastRotatedDate(v time.Time) *DescribeSecretOutput { + s.LastRotatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeSecretOutput) SetName(v string) *DescribeSecretOutput { + s.Name = &v + return s +} + +// SetRotationEnabled sets the RotationEnabled field's value. +func (s *DescribeSecretOutput) SetRotationEnabled(v bool) *DescribeSecretOutput { + s.RotationEnabled = &v + return s +} + +// SetRotationLambdaARN sets the RotationLambdaARN field's value. +func (s *DescribeSecretOutput) SetRotationLambdaARN(v string) *DescribeSecretOutput { + s.RotationLambdaARN = &v + return s +} + +// SetRotationRules sets the RotationRules field's value. +func (s *DescribeSecretOutput) SetRotationRules(v *RotationRulesType) *DescribeSecretOutput { + s.RotationRules = v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribeSecretOutput) SetTags(v []*Tag) *DescribeSecretOutput { + s.Tags = v + return s +} + +// SetVersionIdsToStages sets the VersionIdsToStages field's value. +func (s *DescribeSecretOutput) SetVersionIdsToStages(v map[string][]*string) *DescribeSecretOutput { + s.VersionIdsToStages = v + return s +} + +type GetRandomPasswordInput struct { + _ struct{} `type:"structure"` + + // A string that includes characters that should not be included in the generated + // password. The default is that all characters from the included sets can be + // used. + ExcludeCharacters *string `type:"string"` + + // Specifies that the generated password should not include lowercase letters. + // The default if you do not include this switch parameter is that lowercase + // letters can be included. + ExcludeLowercase *bool `type:"boolean"` + + // Specifies that the generated password should not include digits. The default + // if you do not include this switch parameter is that digits can be included. + ExcludeNumbers *bool `type:"boolean"` + + // Specifies that the generated password should not include punctuation characters. + // The default if you do not include this switch parameter is that punctuation + // characters can be included. + ExcludePunctuation *bool `type:"boolean"` + + // Specifies that the generated password should not include uppercase letters. + // The default if you do not include this switch parameter is that uppercase + // letters can be included. + ExcludeUppercase *bool `type:"boolean"` + + // Specifies that the generated password can include the space character. The + // default if you do not include this switch parameter is that the space character + // is not included. + IncludeSpace *bool `type:"boolean"` + + // The desired length of the generated password. The default value if you do + // not include this parameter is 32 characters. + PasswordLength *int64 `min:"1" type:"long"` + + // A boolean value that specifies whether the generated password must include + // at least one of every allowed character type. The default value is True and + // the operation requires at least one of every character type. + RequireEachIncludedType *bool `type:"boolean"` +} + +// String returns the string representation +func (s GetRandomPasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRandomPasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRandomPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRandomPasswordInput"} + if s.PasswordLength != nil && *s.PasswordLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("PasswordLength", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExcludeCharacters sets the ExcludeCharacters field's value. +func (s *GetRandomPasswordInput) SetExcludeCharacters(v string) *GetRandomPasswordInput { + s.ExcludeCharacters = &v + return s +} + +// SetExcludeLowercase sets the ExcludeLowercase field's value. +func (s *GetRandomPasswordInput) SetExcludeLowercase(v bool) *GetRandomPasswordInput { + s.ExcludeLowercase = &v + return s +} + +// SetExcludeNumbers sets the ExcludeNumbers field's value. +func (s *GetRandomPasswordInput) SetExcludeNumbers(v bool) *GetRandomPasswordInput { + s.ExcludeNumbers = &v + return s +} + +// SetExcludePunctuation sets the ExcludePunctuation field's value. +func (s *GetRandomPasswordInput) SetExcludePunctuation(v bool) *GetRandomPasswordInput { + s.ExcludePunctuation = &v + return s +} + +// SetExcludeUppercase sets the ExcludeUppercase field's value. +func (s *GetRandomPasswordInput) SetExcludeUppercase(v bool) *GetRandomPasswordInput { + s.ExcludeUppercase = &v + return s +} + +// SetIncludeSpace sets the IncludeSpace field's value. +func (s *GetRandomPasswordInput) SetIncludeSpace(v bool) *GetRandomPasswordInput { + s.IncludeSpace = &v + return s +} + +// SetPasswordLength sets the PasswordLength field's value. +func (s *GetRandomPasswordInput) SetPasswordLength(v int64) *GetRandomPasswordInput { + s.PasswordLength = &v + return s +} + +// SetRequireEachIncludedType sets the RequireEachIncludedType field's value. +func (s *GetRandomPasswordInput) SetRequireEachIncludedType(v bool) *GetRandomPasswordInput { + s.RequireEachIncludedType = &v + return s +} + +type GetRandomPasswordOutput struct { + _ struct{} `type:"structure"` + + // A string with the generated password. + RandomPassword *string `type:"string"` +} + +// String returns the string representation +func (s GetRandomPasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRandomPasswordOutput) GoString() string { + return s.String() +} + +// SetRandomPassword sets the RandomPassword field's value. +func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPasswordOutput { + s.RandomPassword = &v + return s +} + +type GetSecretValueInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret containing the version that you want to retrieve. You + // can specify either the Amazon Resource Name (ARN) or the friendly name of + // the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // Specifies the unique identifier of the version of the secret that you want + // to retrieve. If you specify this parameter then don't specify VersionStage. + // If you don't specify either a VersionStage or SecretVersionId then the default + // is to perform the operation on the version with the VersionStage value of + // AWSCURRENT. + // + // This value is typically a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value with 32 hexadecimal digits. + VersionId *string `min:"32" type:"string"` + + // Specifies the secret version that you want to retrieve by the staging label + // attached to the version. + // + // Staging labels are used to keep track of different versions during the rotation + // process. If you use this parameter then don't specify SecretVersionId. If + // you don't specify either a VersionStage or SecretVersionId, then the default + // is to perform the operation on the version with the VersionStage value of + // AWSCURRENT. + VersionStage *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetSecretValueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecretValueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSecretValueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSecretValueInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.VersionId != nil && len(*s.VersionId) < 32 { + invalidParams.Add(request.NewErrParamMinLen("VersionId", 32)) + } + if s.VersionStage != nil && len(*s.VersionStage) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *GetSecretValueInput) SetSecretId(v string) *GetSecretValueInput { + s.SecretId = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetSecretValueInput) SetVersionId(v string) *GetSecretValueInput { + s.VersionId = &v + return s +} + +// SetVersionStage sets the VersionStage field's value. +func (s *GetSecretValueInput) SetVersionStage(v string) *GetSecretValueInput { + s.VersionStage = &v + return s +} + +type GetSecretValueOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret. + ARN *string `min:"20" type:"string"` + + // The date and time that this version of the secret was created. + CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The friendly name of the secret. + Name *string `min:"1" type:"string"` + + // The decrypted part of the protected secret information that was originally + // provided as binary data in the form of a byte array. The response parameter + // represents the binary data as a base64-encoded (https://tools.ietf.org/html/rfc4648#section-4) + // string. + // + // This parameter is not used if the secret is created by the Secrets Manager + // console. + // + // If you store custom information in this field of the secret, then you must + // code your Lambda rotation function to parse and interpret whatever you store + // in the SecretString or SecretBinary fields. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // The decrypted part of the protected secret information that was originally + // provided as a string. + // + // If you create this secret by using the Secrets Manager console then only + // the SecretString parameter contains data. Secrets Manager stores the information + // as a JSON structure of key/value pairs that the Lambda rotation function + // knows how to parse. + // + // If you store custom information in the secret by using the CreateSecret, + // UpdateSecret, or PutSecretValue API operations instead of the AWS Secrets + // Manager console, or by using the Other secret type in the console, then you + // must code your Lambda rotation function to parse and interpret those values. + SecretString *string `type:"string"` + + // The unique identifier of this version of the secret. + VersionId *string `min:"32" type:"string"` + + // A list of all of the staging labels currently attached to this version of + // the secret. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s GetSecretValueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSecretValueOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *GetSecretValueOutput) SetARN(v string) *GetSecretValueOutput { + s.ARN = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *GetSecretValueOutput) SetCreatedDate(v time.Time) *GetSecretValueOutput { + s.CreatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetSecretValueOutput) SetName(v string) *GetSecretValueOutput { + s.Name = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *GetSecretValueOutput) SetSecretBinary(v []byte) *GetSecretValueOutput { + s.SecretBinary = v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *GetSecretValueOutput) SetSecretString(v string) *GetSecretValueOutput { + s.SecretString = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetSecretValueOutput) SetVersionId(v string) *GetSecretValueOutput { + s.VersionId = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *GetSecretValueOutput) SetVersionStages(v []*string) *GetSecretValueOutput { + s.VersionStages = v + return s +} + +type ListSecretVersionIdsInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies that you want the results to include versions that do + // not have any staging labels attached to them. Such versions are considered + // deprecated and are subject to deletion by Secrets Manager as needed. + IncludeDeprecated *bool `type:"boolean"` + + // (Optional) Limits the number of results that you want to include in the response. + // If you don't include this parameter, it defaults to a value that's specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (isn't null). Include + // that value as the NextToken request parameter in the next call to the operation + // to get the next part of the results. Note that AWS Secrets Manager might + // return fewer results than the maximum even when there are more results available. + // You should check NextToken after every operation to ensure that you receive + // all of the results. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Use this parameter in a request if you receive a NextToken response + // in a previous request that indicates that there's more output available. + // In a subsequent call, set it to the value of the previous call's NextToken + // response to indicate where the output should continue from. + NextToken *string `min:"1" type:"string"` + + // The identifier for the secret containing the versions you want to list. You + // can specify either the Amazon Resource Name (ARN) or the friendly name of + // the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListSecretVersionIdsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretVersionIdsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSecretVersionIdsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSecretVersionIdsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIncludeDeprecated sets the IncludeDeprecated field's value. +func (s *ListSecretVersionIdsInput) SetIncludeDeprecated(v bool) *ListSecretVersionIdsInput { + s.IncludeDeprecated = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSecretVersionIdsInput) SetMaxResults(v int64) *ListSecretVersionIdsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretVersionIdsInput) SetNextToken(v string) *ListSecretVersionIdsInput { + s.NextToken = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *ListSecretVersionIdsInput) SetSecretId(v string) *ListSecretVersionIdsInput { + s.SecretId = &v + return s +} + +type ListSecretVersionIdsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the secret. + // + // AWS Secrets Manager automatically adds several random characters to the name + // at the end of the ARN when you initially create a secret. This affects only + // the ARN and not the actual friendly name. This ensures that if you create + // a new secret with the same name as an old secret that you previously deleted, + // then users with access to the old secret don't automatically get access to + // the new secret because the ARNs are different. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret. + Name *string `min:"1" type:"string"` + + // If present in the response, this value indicates that there's more output + // available than what's included in the current response. This can occur even + // when the response includes no values at all, such as when you ask for a filtered + // view of a very long list. Use this value in the NextToken request parameter + // in a subsequent call to the operation to continue processing and get the + // next part of the output. You should repeat this until the NextToken response + // element comes back empty (as null). + NextToken *string `min:"1" type:"string"` + + // The list of the currently available versions of the specified secret. + Versions []*SecretVersionsListEntry `type:"list"` +} + +// String returns the string representation +func (s ListSecretVersionIdsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretVersionIdsOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *ListSecretVersionIdsOutput) SetARN(v string) *ListSecretVersionIdsOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *ListSecretVersionIdsOutput) SetName(v string) *ListSecretVersionIdsOutput { + s.Name = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretVersionIdsOutput) SetNextToken(v string) *ListSecretVersionIdsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListSecretVersionIdsOutput) SetVersions(v []*SecretVersionsListEntry) *ListSecretVersionIdsOutput { + s.Versions = v + return s +} + +type ListSecretsInput struct { + _ struct{} `type:"structure"` + + // (Optional) Limits the number of results that you want to include in the response. + // If you don't include this parameter, it defaults to a value that's specific + // to the operation. If additional items exist beyond the maximum you specify, + // the NextToken response element is present and has a value (isn't null). Include + // that value as the NextToken request parameter in the next call to the operation + // to get the next part of the results. Note that AWS Secrets Manager might + // return fewer results than the maximum even when there are more results available. + // You should check NextToken after every operation to ensure that you receive + // all of the results. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Use this parameter in a request if you receive a NextToken response + // in a previous request that indicates that there's more output available. + // In a subsequent call, set it to the value of the previous call's NextToken + // response to indicate where the output should continue from. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListSecretsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSecretsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSecretsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSecretsInput) SetMaxResults(v int64) *ListSecretsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretsInput) SetNextToken(v string) *ListSecretsInput { + s.NextToken = &v + return s +} + +type ListSecretsOutput struct { + _ struct{} `type:"structure"` + + // If present in the response, this value indicates that there's more output + // available than what's included in the current response. This can occur even + // when the response includes no values at all, such as when you ask for a filtered + // view of a very long list. Use this value in the NextToken request parameter + // in a subsequent call to the operation to continue processing and get the + // next part of the output. You should repeat this until the NextToken response + // element comes back empty (as null). + NextToken *string `min:"1" type:"string"` + + // A list of the secrets in the account. + SecretList []*SecretListEntry `type:"list"` +} + +// String returns the string representation +func (s ListSecretsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSecretsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSecretsOutput) SetNextToken(v string) *ListSecretsOutput { + s.NextToken = &v + return s +} + +// SetSecretList sets the SecretList field's value. +func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutput { + s.SecretList = v + return s +} + +type PutSecretValueInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies a unique identifier for the new version of the secret. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes that in the request. If you don't use the SDK and instead + // generate a raw HTTP request to the AWS Secrets Manager service endpoint, + // then you must generate a ClientRequestToken yourself for new versions and + // include that value in the request. + // + // This value helps ensure idempotency. Secrets Manager uses this value to prevent + // the accidental creation of duplicate versions if there are failures and retries + // during the Lambda rotation function's processing. We recommend that you generate + // a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) value + // to ensure uniqueness within the specified secret. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // or SecretBinary values are the same as those in the request then the request + // is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from those in the request then the + // request fails because you cannot modify an existing secret version. You + // can only create new versions to store new secret values. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies binary data that you want to encrypt and store in the + // new version of the secret. To use this parameter in the command-line tools, + // we recommend that you store your binary data in a file and then use the appropriate + // technique for your tool to pass the contents of the file as a parameter. + // Either SecretBinary or SecretString must have a value. They cannot both be + // empty. + // + // This parameter is not accessible if the secret using the Secrets Manager + // console. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // Specifies the secret to which you want to add a new version. You can specify + // either the Amazon Resource Name (ARN) or the friendly name of the secret. + // The secret must already exist. + // + // The secret name can consist of uppercase letters, lowercase letters, digits, + // and any of the following characters: /_+=.@-    Spaces are not permitted. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // (Optional) Specifies text data that you want to encrypt and store in this + // new version of the secret. Either SecretString or SecretBinary must have + // a value. They cannot both be empty. + // + // If you create this secret by using the Secrets Manager console then Secrets + // Manager puts the protected secret text in only the SecretString parameter. + // The Secrets Manager console stores the information as a JSON structure of + // key/value pairs that the default Lambda rotation function knows how to parse. + // + // For storing multiple values, we recommend that you use a JSON text string + // argument and specify key/value pairs. For information on how to format a + // JSON parameter for the various command line tool environments, see Using + // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. + SecretString *string `type:"string"` + + // (Optional) Specifies a list of staging labels that are attached to this version + // of the secret. These staging labels are used to track the versions through + // the rotation process by the Lambda rotation function. + // + // A staging label must be unique to a single version of the secret. If you + // specify a staging label that's already associated with a different version + // of the same secret then that staging label is automatically removed from + // the other version and attached to this version. + // + // If you do not specify a value for VersionStages then AWS Secrets Manager + // automatically moves the staging label AWSCURRENT to this new version. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s PutSecretValueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutSecretValueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutSecretValueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutSecretValueInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.VersionStages != nil && len(s.VersionStages) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionStages", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *PutSecretValueInput) SetClientRequestToken(v string) *PutSecretValueInput { + s.ClientRequestToken = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *PutSecretValueInput) SetSecretBinary(v []byte) *PutSecretValueInput { + s.SecretBinary = v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *PutSecretValueInput) SetSecretId(v string) *PutSecretValueInput { + s.SecretId = &v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *PutSecretValueInput) SetSecretString(v string) *PutSecretValueInput { + s.SecretString = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *PutSecretValueInput) SetVersionStages(v []*string) *PutSecretValueInput { + s.VersionStages = v + return s +} + +type PutSecretValueOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the secret for which you just created + // a version. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret for which you just created or updated a version. + Name *string `min:"1" type:"string"` + + // The unique identifier of the version of the secret you just created or updated. + VersionId *string `min:"32" type:"string"` + + // The list of staging labels that are currently attached to this version of + // the secret. Staging labels are used to track a version as it progresses through + // the secret rotation process. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s PutSecretValueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutSecretValueOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *PutSecretValueOutput) SetARN(v string) *PutSecretValueOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *PutSecretValueOutput) SetName(v string) *PutSecretValueOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *PutSecretValueOutput) SetVersionId(v string) *PutSecretValueOutput { + s.VersionId = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *PutSecretValueOutput) SetVersionStages(v []*string) *PutSecretValueOutput { + s.VersionStages = v + return s +} + +type RestoreSecretInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret that you want to restore from a previously scheduled + // deletion. You can specify either the Amazon Resource Name (ARN) or the friendly + // name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RestoreSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreSecretInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *RestoreSecretInput) SetSecretId(v string) *RestoreSecretInput { + s.SecretId = &v + return s +} + +type RestoreSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret that was restored. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret that was restored. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s RestoreSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *RestoreSecretOutput) SetARN(v string) *RestoreSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *RestoreSecretOutput) SetName(v string) *RestoreSecretOutput { + s.Name = &v + return s +} + +type RotateSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) Specifies a unique identifier for the new version of the secret + // that helps ensure idempotency. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes that in the request for this parameter. If you don't + // use the SDK and instead generate a raw HTTP request to the AWS Secrets Manager + // service endpoint, then you must generate a ClientRequestToken yourself for + // new versions and include that value in the request. + // + // You only need to specify your own value if you are implementing your own + // retry logic and want to ensure that a given secret is not created twice. + // We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value to ensure uniqueness within the specified secret. + // + // Secrets Manager uses this value to prevent the accidental creation of duplicate + // versions if there are failures and retries during the function's processing. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are the same as the request, then the request + // is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from the request then an error occurs + // because you cannot modify an existing secret value. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies the ARN of the Lambda function that can rotate the secret. + RotationLambdaARN *string `type:"string"` + + // A structure that defines the rotation configuration for this secret. + RotationRules *RotationRulesType `type:"structure"` + + // Specifies the secret that you want to rotate. You can specify either the + // Amazon Resource Name (ARN) or the friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RotateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotateSecretInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.RotationRules != nil { + if err := s.RotationRules.Validate(); err != nil { + invalidParams.AddNested("RotationRules", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *RotateSecretInput) SetClientRequestToken(v string) *RotateSecretInput { + s.ClientRequestToken = &v + return s +} + +// SetRotationLambdaARN sets the RotationLambdaARN field's value. +func (s *RotateSecretInput) SetRotationLambdaARN(v string) *RotateSecretInput { + s.RotationLambdaARN = &v + return s +} + +// SetRotationRules sets the RotationRules field's value. +func (s *RotateSecretInput) SetRotationRules(v *RotationRulesType) *RotateSecretInput { + s.RotationRules = v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *RotateSecretInput) SetSecretId(v string) *RotateSecretInput { + s.SecretId = &v + return s +} + +type RotateSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret. + Name *string `min:"1" type:"string"` + + // The ID of the new version of the secret created by the rotation started by + // this request. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s RotateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *RotateSecretOutput) SetARN(v string) *RotateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *RotateSecretOutput) SetName(v string) *RotateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *RotateSecretOutput) SetVersionId(v string) *RotateSecretOutput { + s.VersionId = &v + return s +} + +// A structure that defines the rotation configuration for the secret. +type RotationRulesType struct { + _ struct{} `type:"structure"` + + // Specifies the number of days between automatic scheduled rotations of the + // secret. + AutomaticallyAfterDays *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s RotationRulesType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotationRulesType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotationRulesType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotationRulesType"} + if s.AutomaticallyAfterDays != nil && *s.AutomaticallyAfterDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("AutomaticallyAfterDays", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutomaticallyAfterDays sets the AutomaticallyAfterDays field's value. +func (s *RotationRulesType) SetAutomaticallyAfterDays(v int64) *RotationRulesType { + s.AutomaticallyAfterDays = &v + return s +} + +// A structure that contains the details about a secret. It does not include +// the encrypted SecretString and SecretBinary values. To get those values, +// use the GetSecretValue operation. +type SecretListEntry struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the secret. + // + // For more information about ARNs in AWS Secrets Manager, see Policy Resources + // (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#iam-resources) + // in the AWS Secrets Manager User Guide. + ARN *string `min:"20" type:"string"` + + // The date and time on which this secret was deleted. Not present on active + // secrets. The secret can be recovered until the number of days in the recovery + // window has passed, as specified in the RecoveryWindowInDays parameter of + // the DeleteSecret operation. + DeletedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The user-provided description of the secret. + Description *string `type:"string"` + + // The ARN or alias of the AWS KMS customer master key (CMK) that's used to + // encrypt the SecretString and SecretBinary fields in each version of the secret. + // If you don't provide a key, then AWS Secrets Manager defaults to encrypting + // the secret fields with the default KMS CMK (the one named awssecretsmanager) + // for this account. + KmsKeyId *string `type:"string"` + + // The last date that this secret was accessed. This value is truncated to midnight + // of the date and therefore shows only the date, not the time. + LastAccessedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The last date and time that this secret was modified in any way. + LastChangedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The last date and time that the rotation process for this secret was invoked. + LastRotatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The friendly name of the secret. You can use forward slashes in the name + // to represent a path hierarchy. For example, /prod/databases/dbserver1 could + // represent the secret for a server named dbserver1 in the folder databases + // in the folder prod. + Name *string `min:"1" type:"string"` + + // Indicated whether automatic, scheduled rotation is enabled for this secret. + RotationEnabled *bool `type:"boolean"` + + // The ARN of an AWS Lambda function that's invoked by AWS Secrets Manager to + // rotate and expire the secret either automatically per the schedule or manually + // by a call to RotateSecret. + RotationLambdaARN *string `type:"string"` + + // A structure that defines the rotation configuration for the secret. + RotationRules *RotationRulesType `type:"structure"` + + // A list of all of the currently assigned SecretVersionStage staging labels + // and the SecretVersionId that each is attached to. Staging labels are used + // to keep track of the different versions during the rotation process. + // + // A version that does not have any SecretVersionStage is considered deprecated + // and subject to deletion. Such versions are not included in this list. + SecretVersionsToStages map[string][]*string `type:"map"` + + // The list of user-defined tags that are associated with the secret. To add + // tags to a secret, use TagResource. To remove tags, use UntagResource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s SecretListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecretListEntry) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *SecretListEntry) SetARN(v string) *SecretListEntry { + s.ARN = &v + return s +} + +// SetDeletedDate sets the DeletedDate field's value. +func (s *SecretListEntry) SetDeletedDate(v time.Time) *SecretListEntry { + s.DeletedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *SecretListEntry) SetDescription(v string) *SecretListEntry { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *SecretListEntry) SetKmsKeyId(v string) *SecretListEntry { + s.KmsKeyId = &v + return s +} + +// SetLastAccessedDate sets the LastAccessedDate field's value. +func (s *SecretListEntry) SetLastAccessedDate(v time.Time) *SecretListEntry { + s.LastAccessedDate = &v + return s +} + +// SetLastChangedDate sets the LastChangedDate field's value. +func (s *SecretListEntry) SetLastChangedDate(v time.Time) *SecretListEntry { + s.LastChangedDate = &v + return s +} + +// SetLastRotatedDate sets the LastRotatedDate field's value. +func (s *SecretListEntry) SetLastRotatedDate(v time.Time) *SecretListEntry { + s.LastRotatedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *SecretListEntry) SetName(v string) *SecretListEntry { + s.Name = &v + return s +} + +// SetRotationEnabled sets the RotationEnabled field's value. +func (s *SecretListEntry) SetRotationEnabled(v bool) *SecretListEntry { + s.RotationEnabled = &v + return s +} + +// SetRotationLambdaARN sets the RotationLambdaARN field's value. +func (s *SecretListEntry) SetRotationLambdaARN(v string) *SecretListEntry { + s.RotationLambdaARN = &v + return s +} + +// SetRotationRules sets the RotationRules field's value. +func (s *SecretListEntry) SetRotationRules(v *RotationRulesType) *SecretListEntry { + s.RotationRules = v + return s +} + +// SetSecretVersionsToStages sets the SecretVersionsToStages field's value. +func (s *SecretListEntry) SetSecretVersionsToStages(v map[string][]*string) *SecretListEntry { + s.SecretVersionsToStages = v + return s +} + +// SetTags sets the Tags field's value. +func (s *SecretListEntry) SetTags(v []*Tag) *SecretListEntry { + s.Tags = v + return s +} + +// A structure that contains information about one version of a secret. +type SecretVersionsListEntry struct { + _ struct{} `type:"structure"` + + // The date and time this version of the secret was created. + CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The date that this version of the secret was last accessed. Note that the + // resolution of this field is at the date level and does not include the time. + LastAccessedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The unique version identifier of this version of the secret. + VersionId *string `min:"32" type:"string"` + + // An array of staging labels that are currently associated with this version + // of the secret. + VersionStages []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s SecretVersionsListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecretVersionsListEntry) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *SecretVersionsListEntry) SetCreatedDate(v time.Time) *SecretVersionsListEntry { + s.CreatedDate = &v + return s +} + +// SetLastAccessedDate sets the LastAccessedDate field's value. +func (s *SecretVersionsListEntry) SetLastAccessedDate(v time.Time) *SecretVersionsListEntry { + s.LastAccessedDate = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *SecretVersionsListEntry) SetVersionId(v string) *SecretVersionsListEntry { + s.VersionId = &v + return s +} + +// SetVersionStages sets the VersionStages field's value. +func (s *SecretVersionsListEntry) SetVersionStages(v []*string) *SecretVersionsListEntry { + s.VersionStages = v + return s +} + +// A structure that contains information about a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // The key identifier, or name, of the tag. + Key *string `min:"1" type:"string"` + + // The string value that's associated with the key of the tag. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The identifier for the secret that you want to attach tags to. You can specify + // either the Amazon Resource Name (ARN) or the friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // The tags to attach to the secret. Each element in the list consists of a + // Key and a Value. + // + // This parameter to the API requires a JSON text string argument. For information + // on how to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. For the AWS CLI, you can also use the syntax: + // --Tags Key="Key1",Value="Value1",Key="Key2",Value="Value2"[,…] + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *TagResourceInput) SetSecretId(v string) *TagResourceInput { + s.SecretId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The identifier for the secret that you want to remove tags from. You can + // specify either the Amazon Resource Name (ARN) or the friendly name of the + // secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // A list of tag key names to remove from the secret. You don't specify the + // value. Both the key and its associated value are removed. + // + // This parameter to the API requires a JSON text string argument. For information + // on how to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *UntagResourceInput) SetSecretId(v string) *UntagResourceInput { + s.SecretId = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +type UpdateSecretInput struct { + _ struct{} `type:"structure"` + + // (Optional) If you want to add a new version to the secret, this parameter + // specifies a unique identifier for the new version that helps ensure idempotency. + // + // If you use the AWS CLI or one of the AWS SDK to call this operation, then + // you can leave this parameter empty. The CLI or SDK generates a random UUID + // for you and includes that in the request. If you don't use the SDK and instead + // generate a raw HTTP request to the AWS Secrets Manager service endpoint, + // then you must generate a ClientRequestToken yourself for new versions and + // include that value in the request. + // + // You typically only need to interact with this value if you implement your + // own retry logic and want to ensure that a given secret is not created twice. + // We recommend that you generate a UUID-type (https://wikipedia.org/wiki/Universally_unique_identifier) + // value to ensure uniqueness within the specified secret. + // + // Secrets Manager uses this value to prevent the accidental creation of duplicate + // versions if there are failures and retries during the Lambda rotation function's + // processing. + // + // * If the ClientRequestToken value isn't already associated with a version + // of the secret then a new version of the secret is created. + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are the same as those in the request then the + // request is ignored (the operation is idempotent). + // + // * If a version with this value already exists and that version's SecretString + // and SecretBinary values are different from the request then an error occurs + // because you cannot modify an existing secret value. + // + // This value becomes the SecretVersionId of the new version. + ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` + + // (Optional) Specifies a user-provided description of the secret. + Description *string `type:"string"` + + // (Optional) Specifies the ARN or alias of the KMS customer master key (CMK) + // to be used to encrypt the protected text in the versions of this secret. + // + // If you don't specify this value, then Secrets Manager defaults to using the + // default CMK in the account (the one named aws/secretsmanager). If a KMS CMK + // with that name doesn't exist, then AWS Secrets Manager creates it for you + // automatically the first time it needs to encrypt a version's Plaintext or + // PlaintextString fields. + // + // You can only use the account's default CMK to encrypt and decrypt if you + // call this operation using credentials from the same account that owns the + // secret. If the secret is in a different account, then you must create a custom + // CMK and provide the ARN in this field. + KmsKeyId *string `type:"string"` + + // (Optional) Specifies binary data that you want to encrypt and store in the + // new version of the secret. To use this parameter in the command-line tools, + // we recommend that you store your binary data in a file and then use the appropriate + // technique for your tool to pass the contents of the file as a parameter. + // Either SecretBinary or SecretString must have a value. They cannot both be + // empty. + // + // This parameter is not accessible using the Secrets Manager console. + // + // SecretBinary is automatically base64 encoded/decoded by the SDK. + SecretBinary []byte `type:"blob"` + + // Specifies the secret that you want to update or to which you want to add + // a new version. You can specify either the Amazon Resource Name (ARN) or the + // friendly name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // (Optional) Specifies text data that you want to encrypt and store in this + // new version of the secret. Either SecretBinary or SecretString must have + // a value. They cannot both be empty. + // + // If you create this secret by using the Secrets Manager console then Secrets + // Manager puts the protected secret text in only the SecretString parameter. + // The Secrets Manager console stores the information as a JSON structure of + // key/value pairs that the default Lambda rotation function knows how to parse. + // + // For storing multiple values, we recommend that you use a JSON text string + // argument and specify key/value pairs. For information on how to format a + // JSON parameter for the various command line tool environments, see Using + // JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. + SecretString *string `type:"string"` +} + +// String returns the string representation +func (s UpdateSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSecretInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *UpdateSecretInput) SetClientRequestToken(v string) *UpdateSecretInput { + s.ClientRequestToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateSecretInput) SetDescription(v string) *UpdateSecretInput { + s.Description = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *UpdateSecretInput) SetKmsKeyId(v string) *UpdateSecretInput { + s.KmsKeyId = &v + return s +} + +// SetSecretBinary sets the SecretBinary field's value. +func (s *UpdateSecretInput) SetSecretBinary(v []byte) *UpdateSecretInput { + s.SecretBinary = v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *UpdateSecretInput) SetSecretId(v string) *UpdateSecretInput { + s.SecretId = &v + return s +} + +// SetSecretString sets the SecretString field's value. +func (s *UpdateSecretInput) SetSecretString(v string) *UpdateSecretInput { + s.SecretString = &v + return s +} + +type UpdateSecretOutput struct { + _ struct{} `type:"structure"` + + // The ARN of this secret. + // + // AWS Secrets Manager automatically adds several random characters to the name + // at the end of the ARN when you initially create a secret. This affects only + // the ARN and not the actual friendly name. This ensures that if you create + // a new secret with the same name as an old secret that you previously deleted, + // then users with access to the old secret don't automatically get access to + // the new secret because the ARNs are different. + ARN *string `min:"20" type:"string"` + + // The friendly name of this secret. + Name *string `min:"1" type:"string"` + + // If a version of the secret was created or updated by this operation, then + // its unique identifier is returned. + VersionId *string `min:"32" type:"string"` +} + +// String returns the string representation +func (s UpdateSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *UpdateSecretOutput) SetARN(v string) *UpdateSecretOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateSecretOutput) SetName(v string) *UpdateSecretOutput { + s.Name = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *UpdateSecretOutput) SetVersionId(v string) *UpdateSecretOutput { + s.VersionId = &v + return s +} + +type UpdateSecretVersionStageInput struct { + _ struct{} `type:"structure"` + + // (Optional) The secret version ID that you want to add the staging labels + // to. + // + // If any of the staging labels are already attached to a different version + // of the secret, then they are removed from that version before adding them + // to this version. + MoveToVersionId *string `min:"32" type:"string"` + + // (Optional) Specifies the secret version ID of the version that the staging + // labels are to be removed from. + // + // If you want to move a label to a new version, you do not have to explicitly + // remove it with this parameter. Adding a label using the MoveToVersionId parameter + // automatically removes it from the old version. However, if you do include + // both the "MoveTo" and "RemoveFrom" parameters, then the move is successful + // only if the staging labels are actually present on the "RemoveFrom" version. + // If a staging label was on a different version than "RemoveFrom", then the + // request fails. + RemoveFromVersionId *string `min:"32" type:"string"` + + // Specifies the secret with the version whose list of staging labels you want + // to modify. You can specify either the Amazon Resource Name (ARN) or the friendly + // name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` + + // The list of staging labels to add to this version. + // + // VersionStage is a required field + VersionStage *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateSecretVersionStageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretVersionStageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSecretVersionStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSecretVersionStageInput"} + if s.MoveToVersionId != nil && len(*s.MoveToVersionId) < 32 { + invalidParams.Add(request.NewErrParamMinLen("MoveToVersionId", 32)) + } + if s.RemoveFromVersionId != nil && len(*s.RemoveFromVersionId) < 32 { + invalidParams.Add(request.NewErrParamMinLen("RemoveFromVersionId", 32)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + if s.VersionStage == nil { + invalidParams.Add(request.NewErrParamRequired("VersionStage")) + } + if s.VersionStage != nil && len(*s.VersionStage) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionStage", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMoveToVersionId sets the MoveToVersionId field's value. +func (s *UpdateSecretVersionStageInput) SetMoveToVersionId(v string) *UpdateSecretVersionStageInput { + s.MoveToVersionId = &v + return s +} + +// SetRemoveFromVersionId sets the RemoveFromVersionId field's value. +func (s *UpdateSecretVersionStageInput) SetRemoveFromVersionId(v string) *UpdateSecretVersionStageInput { + s.RemoveFromVersionId = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *UpdateSecretVersionStageInput) SetSecretId(v string) *UpdateSecretVersionStageInput { + s.SecretId = &v + return s +} + +// SetVersionStage sets the VersionStage field's value. +func (s *UpdateSecretVersionStageInput) SetVersionStage(v string) *UpdateSecretVersionStageInput { + s.VersionStage = &v + return s +} + +type UpdateSecretVersionStageOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret with the staging labels that were modified. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret with the staging labels that were modified. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateSecretVersionStageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSecretVersionStageOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *UpdateSecretVersionStageOutput) SetARN(v string) *UpdateSecretVersionStageOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateSecretVersionStageOutput) SetName(v string) *UpdateSecretVersionStageOutput { + s.Name = &v + return s +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go new file mode 100644 index 00000000000..d5939c85b84 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go @@ -0,0 +1,108 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package secretsmanager provides the client and types for making API +// requests to AWS Secrets Manager. +// +// AWS Secrets Manager is a web service that enables you to store, manage, and +// retrieve, secrets. +// +// This guide provides descriptions of the AWS Secrets Manager API. For more +// information about using this service, see the AWS Secrets Manager User Guide +// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html). +// +// API Version +// +// This version of the AWS Secrets Manager API Reference documents the AWS Secrets +// Manager API version 2017-10-17. +// +// As an alternative to using the API directly, you can use one of the AWS SDKs, +// which consist of libraries and sample code for various programming languages +// and platforms (such as Java, Ruby, .NET, iOS, and Android). The SDKs provide +// a convenient way to create programmatic access to AWS Secrets Manager. For +// example, the SDKs take care of cryptographically signing requests, managing +// errors, and retrying requests automatically. For more information about the +// AWS SDKs, including how to download and install them, see Tools for Amazon +// Web Services (http://aws.amazon.com/tools/). +// +// We recommend that you use the AWS SDKs to make programmatic API calls to +// AWS Secrets Manager. However, you also can use the AWS Secrets Manager HTTP +// Query API to make direct calls to the AWS Secrets Manager web service. To +// learn more about the AWS Secrets Manager HTTP Query API, see Making Query +// Requests (http://docs.aws.amazon.com/secretsmanager/latest/userguide/orgs_query-requests.html) +// in the AWS Secrets Manager User Guide. +// +// AWS Secrets Manager supports GET and POST requests for all actions. That +// is, the API doesn't require you to use GET for some actions and POST for +// others. However, GET requests are subject to the limitation size of a URL. +// Therefore, for operations that require larger sizes, use a POST request. +// +// Signing Requests +// +// When you send HTTP requests to AWS, you must sign the requests so that AWS +// can identify who sent them. You sign requests with your AWS access key, which +// consists of an access key ID and a secret access key. We strongly recommend +// that you don't create an access key for your root account. Anyone who has +// the access key for your root account has unrestricted access to all the resources +// in your account. Instead, create an access key for an IAM user account that +// has the permissions required for the task at hand. As another option, use +// AWS Security Token Service to generate temporary security credentials, and +// use those credentials to sign requests. +// +// To sign requests, you must use Signature Version 4 (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). +// If you have an existing application that uses Signature Version 2, you must +// update it to use Signature Version 4. +// +// When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs +// to make requests to AWS, these tools automatically sign the requests for +// you with the access key that you specify when you configure the tools. +// +// Support and Feedback for AWS Secrets Manager +// +// We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com +// (mailto:awssecretsmanager-feedback@amazon.com), or post your feedback and +// questions in the AWS Secrets Manager Discussion Forum (http://forums.aws.amazon.com/forum.jspa?forumID=296). +// For more information about the AWS Discussion Forums, see Forums Help (http://forums.aws.amazon.com/help.jspa). +// +// How examples are presented +// +// The JSON that AWS Secrets Manager returns as a response to your requests +// is a single long string without line breaks or white space formatting. Both +// line breaks and white space are included in the examples in this guide to +// improve readability. When example input parameters would also result in long +// strings that extend beyond the screen, we insert line breaks to enhance readability. +// You should always submit the input as a single JSON text string. +// +// Logging API Requests +// +// AWS Secrets Manager supports AWS CloudTrail, a service that records AWS API +// calls for your AWS account and delivers log files to an Amazon S3 bucket. +// By using information that's collected by AWS CloudTrail, you can determine +// which requests were successfully made to AWS Secrets Manager, who made the +// request, when it was made, and so on. For more about AWS Secrets Manager +// and its support for AWS CloudTrail, see Logging AWS Secrets Manager Events +// with AWS CloudTrail (http://docs.aws.amazon.com/secretsmanager/latest/userguide/orgs_cloudtrail-integration.html) +// in the AWS Secrets Manager User Guide. To learn more about CloudTrail, including +// how to turn it on and find your log files, see the AWS CloudTrail User Guide +// (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17 for more information on this service. +// +// See secretsmanager package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/ +// +// Using the Client +// +// To contact AWS Secrets Manager with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Secrets Manager client SecretsManager for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/#New +package secretsmanager diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go new file mode 100644 index 00000000000..6d05321a04c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go @@ -0,0 +1,74 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package secretsmanager + +const ( + + // ErrCodeDecryptionFailure for service response error code + // "DecryptionFailure". + // + // AWS Secrets Manager can't decrypt the protected secret text using the provided + // KMS key. + ErrCodeDecryptionFailure = "DecryptionFailure" + + // ErrCodeEncryptionFailure for service response error code + // "EncryptionFailure". + // + // AWS Secrets Manager can't encrypt the protected secret text using the provided + // KMS key. Check that the customer master key (CMK) is available, enabled, + // and not in an invalid state. For more information, see How Key State Affects + // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). + ErrCodeEncryptionFailure = "EncryptionFailure" + + // ErrCodeInternalServiceError for service response error code + // "InternalServiceError". + // + // An error occurred on the server side. + ErrCodeInternalServiceError = "InternalServiceError" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // You provided an invalid NextToken value. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // You provided an invalid value for a parameter. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // You provided a parameter value that is not valid for the current state of + // the resource. For example, if you try to enable rotation on a secret, you + // must already have a Lambda function ARN configured or included as a parameter + // in this call. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request failed because it would exceed one of the AWS Secrets Manager + // internal limits. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeMalformedPolicyDocumentException for service response error code + // "MalformedPolicyDocumentException". + // + // The policy document that you provided isn't valid. + ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" + + // ErrCodeResourceExistsException for service response error code + // "ResourceExistsException". + // + // A resource with the ID you requested already exists. + ErrCodeResourceExistsException = "ResourceExistsException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // We can't find the resource that you asked for. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go new file mode 100644 index 00000000000..10e885da213 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go @@ -0,0 +1,98 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package secretsmanager + +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" +) + +// SecretsManager provides the API operation methods for making requests to +// AWS Secrets Manager. See this package's package overview docs +// for details on the service. +// +// SecretsManager methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type SecretsManager 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 = "secretsmanager" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the SecretsManager 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 SecretsManager client from just a session. +// svc := secretsmanager.New(mySession) +// +// // Create a SecretsManager client with additional configuration +// svc := secretsmanager.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *SecretsManager { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "secretsmanager" + } + 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) *SecretsManager { + svc := &SecretsManager{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-10-17", + JSONVersion: "1.1", + TargetPrefix: "secretsmanager", + }, + 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 SecretsManager operation and runs any +// custom request initialization. +func (c *SecretsManager) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index 61b40be773c..9c32b8535e6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -15,7 +15,7 @@ const opAcceptPortfolioShare = "AcceptPortfolioShare" // AcceptPortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the AcceptPortfolioShare operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -102,7 +102,7 @@ const opAssociatePrincipalWithPortfolio = "AssociatePrincipalWithPortfolio" // AssociatePrincipalWithPortfolioRequest generates a "aws/request.Request" representing the // client's request for the AssociatePrincipalWithPortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -189,7 +189,7 @@ const opAssociateProductWithPortfolio = "AssociateProductWithPortfolio" // AssociateProductWithPortfolioRequest generates a "aws/request.Request" representing the // client's request for the AssociateProductWithPortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -276,7 +276,7 @@ const opAssociateTagOptionWithResource = "AssociateTagOptionWithResource" // AssociateTagOptionWithResourceRequest generates a "aws/request.Request" representing the // client's request for the AssociateTagOptionWithResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -376,7 +376,7 @@ const opCopyProduct = "CopyProduct" // CopyProductRequest generates a "aws/request.Request" representing the // client's request for the CopyProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -465,7 +465,7 @@ const opCreateConstraint = "CreateConstraint" // CreateConstraintRequest generates a "aws/request.Request" representing the // client's request for the CreateConstraint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -555,7 +555,7 @@ const opCreatePortfolio = "CreatePortfolio" // CreatePortfolioRequest generates a "aws/request.Request" representing the // client's request for the CreatePortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -644,7 +644,7 @@ const opCreatePortfolioShare = "CreatePortfolioShare" // CreatePortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the CreatePortfolioShare operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -731,7 +731,7 @@ const opCreateProduct = "CreateProduct" // CreateProductRequest generates a "aws/request.Request" representing the // client's request for the CreateProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -820,7 +820,7 @@ const opCreateProvisionedProductPlan = "CreateProvisionedProductPlan" // CreateProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the CreateProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -915,7 +915,7 @@ const opCreateProvisioningArtifact = "CreateProvisioningArtifact" // CreateProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the CreateProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1006,7 +1006,7 @@ const opCreateTagOption = "CreateTagOption" // CreateTagOptionRequest generates a "aws/request.Request" representing the // client's request for the CreateTagOption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1095,7 +1095,7 @@ const opDeleteConstraint = "DeleteConstraint" // DeleteConstraintRequest generates a "aws/request.Request" representing the // client's request for the DeleteConstraint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1177,7 +1177,7 @@ const opDeletePortfolio = "DeletePortfolio" // DeletePortfolioRequest generates a "aws/request.Request" representing the // client's request for the DeletePortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1271,7 +1271,7 @@ const opDeletePortfolioShare = "DeletePortfolioShare" // DeletePortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the DeletePortfolioShare operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1350,7 +1350,7 @@ const opDeleteProduct = "DeleteProduct" // DeleteProductRequest generates a "aws/request.Request" representing the // client's request for the DeleteProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1444,7 +1444,7 @@ const opDeleteProvisionedProductPlan = "DeleteProvisionedProductPlan" // DeleteProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the DeleteProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1526,7 +1526,7 @@ const opDeleteProvisioningArtifact = "DeleteProvisioningArtifact" // DeleteProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the DeleteProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1617,7 +1617,7 @@ const opDeleteTagOption = "DeleteTagOption" // DeleteTagOptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteTagOption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1707,7 +1707,7 @@ const opDescribeConstraint = "DescribeConstraint" // DescribeConstraintRequest generates a "aws/request.Request" representing the // client's request for the DescribeConstraint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1786,7 +1786,7 @@ const opDescribeCopyProductStatus = "DescribeCopyProductStatus" // DescribeCopyProductStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeCopyProductStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1865,7 +1865,7 @@ const opDescribePortfolio = "DescribePortfolio" // DescribePortfolioRequest generates a "aws/request.Request" representing the // client's request for the DescribePortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1944,7 +1944,7 @@ const opDescribeProduct = "DescribeProduct" // DescribeProductRequest generates a "aws/request.Request" representing the // client's request for the DescribeProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2026,7 +2026,7 @@ const opDescribeProductAsAdmin = "DescribeProductAsAdmin" // DescribeProductAsAdminRequest generates a "aws/request.Request" representing the // client's request for the DescribeProductAsAdmin operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2106,7 +2106,7 @@ const opDescribeProductView = "DescribeProductView" // DescribeProductViewRequest generates a "aws/request.Request" representing the // client's request for the DescribeProductView operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2188,7 +2188,7 @@ const opDescribeProvisionedProduct = "DescribeProvisionedProduct" // DescribeProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisionedProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2267,7 +2267,7 @@ const opDescribeProvisionedProductPlan = "DescribeProvisionedProductPlan" // DescribeProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2349,7 +2349,7 @@ const opDescribeProvisioningArtifact = "DescribeProvisioningArtifact" // DescribeProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2429,7 +2429,7 @@ const opDescribeProvisioningParameters = "DescribeProvisioningParameters" // DescribeProvisioningParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisioningParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2519,7 +2519,7 @@ const opDescribeRecord = "DescribeRecord" // DescribeRecordRequest generates a "aws/request.Request" representing the // client's request for the DescribeRecord operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2601,7 +2601,7 @@ const opDescribeTagOption = "DescribeTagOption" // DescribeTagOptionRequest generates a "aws/request.Request" representing the // client's request for the DescribeTagOption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2685,7 +2685,7 @@ const opDisassociatePrincipalFromPortfolio = "DisassociatePrincipalFromPortfolio // DisassociatePrincipalFromPortfolioRequest generates a "aws/request.Request" representing the // client's request for the DisassociatePrincipalFromPortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2767,7 +2767,7 @@ const opDisassociateProductFromPortfolio = "DisassociateProductFromPortfolio" // DisassociateProductFromPortfolioRequest generates a "aws/request.Request" representing the // client's request for the DisassociateProductFromPortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2853,7 +2853,7 @@ const opDisassociateTagOptionFromResource = "DisassociateTagOptionFromResource" // DisassociateTagOptionFromResourceRequest generates a "aws/request.Request" representing the // client's request for the DisassociateTagOptionFromResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2937,7 +2937,7 @@ const opExecuteProvisionedProductPlan = "ExecuteProvisionedProductPlan" // ExecuteProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the ExecuteProvisionedProductPlan operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3025,7 +3025,7 @@ const opListAcceptedPortfolioShares = "ListAcceptedPortfolioShares" // ListAcceptedPortfolioSharesRequest generates a "aws/request.Request" representing the // client's request for the ListAcceptedPortfolioShares operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3160,7 +3160,7 @@ const opListConstraintsForPortfolio = "ListConstraintsForPortfolio" // ListConstraintsForPortfolioRequest generates a "aws/request.Request" representing the // client's request for the ListConstraintsForPortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3298,7 +3298,7 @@ const opListLaunchPaths = "ListLaunchPaths" // ListLaunchPathsRequest generates a "aws/request.Request" representing the // client's request for the ListLaunchPaths operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3438,7 +3438,7 @@ const opListPortfolioAccess = "ListPortfolioAccess" // ListPortfolioAccessRequest generates a "aws/request.Request" representing the // client's request for the ListPortfolioAccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3517,7 +3517,7 @@ const opListPortfolios = "ListPortfolios" // ListPortfoliosRequest generates a "aws/request.Request" representing the // client's request for the ListPortfolios operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3652,7 +3652,7 @@ const opListPortfoliosForProduct = "ListPortfoliosForProduct" // ListPortfoliosForProductRequest generates a "aws/request.Request" representing the // client's request for the ListPortfoliosForProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3790,7 +3790,7 @@ const opListPrincipalsForPortfolio = "ListPrincipalsForPortfolio" // ListPrincipalsForPortfolioRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalsForPortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3928,7 +3928,7 @@ const opListProvisionedProductPlans = "ListProvisionedProductPlans" // ListProvisionedProductPlansRequest generates a "aws/request.Request" representing the // client's request for the ListProvisionedProductPlans operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4011,7 +4011,7 @@ const opListProvisioningArtifacts = "ListProvisioningArtifacts" // ListProvisioningArtifactsRequest generates a "aws/request.Request" representing the // client's request for the ListProvisioningArtifacts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4094,7 +4094,7 @@ const opListRecordHistory = "ListRecordHistory" // ListRecordHistoryRequest generates a "aws/request.Request" representing the // client's request for the ListRecordHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4173,7 +4173,7 @@ const opListResourcesForTagOption = "ListResourcesForTagOption" // ListResourcesForTagOptionRequest generates a "aws/request.Request" representing the // client's request for the ListResourcesForTagOption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4316,7 +4316,7 @@ const opListTagOptions = "ListTagOptions" // ListTagOptionsRequest generates a "aws/request.Request" representing the // client's request for the ListTagOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4456,7 +4456,7 @@ const opProvisionProduct = "ProvisionProduct" // ProvisionProductRequest generates a "aws/request.Request" representing the // client's request for the ProvisionProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4551,7 +4551,7 @@ const opRejectPortfolioShare = "RejectPortfolioShare" // RejectPortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the RejectPortfolioShare operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4630,7 +4630,7 @@ const opScanProvisionedProducts = "ScanProvisionedProducts" // ScanProvisionedProductsRequest generates a "aws/request.Request" representing the // client's request for the ScanProvisionedProducts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4711,7 +4711,7 @@ const opSearchProducts = "SearchProducts" // SearchProductsRequest generates a "aws/request.Request" representing the // client's request for the SearchProducts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4846,7 +4846,7 @@ const opSearchProductsAsAdmin = "SearchProductsAsAdmin" // SearchProductsAsAdminRequest generates a "aws/request.Request" representing the // client's request for the SearchProductsAsAdmin operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4984,7 +4984,7 @@ const opSearchProvisionedProducts = "SearchProvisionedProducts" // SearchProvisionedProductsRequest generates a "aws/request.Request" representing the // client's request for the SearchProvisionedProducts operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5119,7 +5119,7 @@ const opTerminateProvisionedProduct = "TerminateProvisionedProduct" // TerminateProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the TerminateProvisionedProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5203,7 +5203,7 @@ const opUpdateConstraint = "UpdateConstraint" // UpdateConstraintRequest generates a "aws/request.Request" representing the // client's request for the UpdateConstraint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5285,7 +5285,7 @@ const opUpdatePortfolio = "UpdatePortfolio" // UpdatePortfolioRequest generates a "aws/request.Request" representing the // client's request for the UpdatePortfolio operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5379,7 +5379,7 @@ const opUpdateProduct = "UpdateProduct" // UpdateProductRequest generates a "aws/request.Request" representing the // client's request for the UpdateProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5466,7 +5466,7 @@ const opUpdateProvisionedProduct = "UpdateProvisionedProduct" // UpdateProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the UpdateProvisionedProduct operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5555,7 +5555,7 @@ const opUpdateProvisioningArtifact = "UpdateProvisioningArtifact" // UpdateProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the UpdateProvisioningArtifact operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5641,7 +5641,7 @@ const opUpdateTagOption = "UpdateTagOption" // UpdateTagOptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateTagOption operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go index 747378cf36a..a76d05b57be 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go @@ -17,7 +17,7 @@ const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace" // CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePrivateDnsNamespace operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -113,7 +113,7 @@ const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace" // CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicDnsNamespace operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -209,7 +209,7 @@ const opCreateService = "CreateService" // CreateServiceRequest generates a "aws/request.Request" representing the // client's request for the CreateService operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -313,7 +313,7 @@ const opDeleteNamespace = "DeleteNamespace" // DeleteNamespaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNamespace operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -404,7 +404,7 @@ const opDeleteService = "DeleteService" // DeleteServiceRequest generates a "aws/request.Request" representing the // client's request for the DeleteService operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -492,7 +492,7 @@ const opDeregisterInstance = "DeregisterInstance" // DeregisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -587,7 +587,7 @@ const opGetInstance = "GetInstance" // GetInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -674,7 +674,7 @@ const opGetInstancesHealthStatus = "GetInstancesHealthStatus" // GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the // client's request for the GetInstancesHealthStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -821,7 +821,7 @@ const opGetNamespace = "GetNamespace" // GetNamespaceRequest generates a "aws/request.Request" representing the // client's request for the GetNamespace operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -904,7 +904,7 @@ const opGetOperation = "GetOperation" // GetOperationRequest generates a "aws/request.Request" representing the // client's request for the GetOperation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -986,7 +986,7 @@ const opGetService = "GetService" // GetServiceRequest generates a "aws/request.Request" representing the // client's request for the GetService operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1069,7 +1069,7 @@ const opListInstances = "ListInstances" // ListInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListInstances operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1209,7 +1209,7 @@ const opListNamespaces = "ListNamespaces" // ListNamespacesRequest generates a "aws/request.Request" representing the // client's request for the ListNamespaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1346,7 +1346,7 @@ const opListOperations = "ListOperations" // ListOperationsRequest generates a "aws/request.Request" representing the // client's request for the ListOperations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1482,7 +1482,7 @@ const opListServices = "ListServices" // ListServicesRequest generates a "aws/request.Request" representing the // client's request for the ListServices operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1619,7 +1619,7 @@ const opRegisterInstance = "RegisterInstance" // RegisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1745,7 +1745,7 @@ const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus" // UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1834,7 +1834,7 @@ const opUpdateService = "UpdateService" // UpdateServiceRequest generates a "aws/request.Request" representing the // client's request for the UpdateService operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index 5325ba8fd1b..88c520d0a4a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -17,7 +17,7 @@ const opCloneReceiptRuleSet = "CloneReceiptRuleSet" // CloneReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CloneReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -110,7 +110,7 @@ const opCreateConfigurationSet = "CreateConfigurationSet" // CreateConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -203,7 +203,7 @@ const opCreateConfigurationSetEventDestination = "CreateConfigurationSetEventDes // CreateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSetEventDestination operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -312,7 +312,7 @@ const opCreateConfigurationSetTrackingOptions = "CreateConfigurationSetTrackingO // CreateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSetTrackingOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -410,7 +410,7 @@ const opCreateCustomVerificationEmailTemplate = "CreateCustomVerificationEmailTe // CreateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -510,7 +510,7 @@ const opCreateReceiptFilter = "CreateReceiptFilter" // CreateReceiptFilterRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptFilter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -598,7 +598,7 @@ const opCreateReceiptRule = "CreateReceiptRule" // CreateReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -709,7 +709,7 @@ const opCreateReceiptRuleSet = "CreateReceiptRuleSet" // CreateReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -797,7 +797,7 @@ const opCreateTemplate = "CreateTemplate" // CreateTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -888,7 +888,7 @@ const opDeleteConfigurationSet = "DeleteConfigurationSet" // DeleteConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -971,7 +971,7 @@ const opDeleteConfigurationSetEventDestination = "DeleteConfigurationSetEventDes // DeleteConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSetEventDestination operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1058,7 +1058,7 @@ const opDeleteConfigurationSetTrackingOptions = "DeleteConfigurationSetTrackingO // DeleteConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSetTrackingOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1151,7 +1151,7 @@ const opDeleteCustomVerificationEmailTemplate = "DeleteCustomVerificationEmailTe // DeleteCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1233,7 +1233,7 @@ const opDeleteIdentity = "DeleteIdentity" // DeleteIdentityRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1310,7 +1310,7 @@ const opDeleteIdentityPolicy = "DeleteIdentityPolicy" // DeleteIdentityPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1395,7 +1395,7 @@ const opDeleteReceiptFilter = "DeleteReceiptFilter" // DeleteReceiptFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptFilter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1474,7 +1474,7 @@ const opDeleteReceiptRule = "DeleteReceiptRule" // DeleteReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1558,7 +1558,7 @@ const opDeleteReceiptRuleSet = "DeleteReceiptRuleSet" // DeleteReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1644,7 +1644,7 @@ const opDeleteTemplate = "DeleteTemplate" // DeleteTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1720,7 +1720,7 @@ const opDeleteVerifiedEmailAddress = "DeleteVerifiedEmailAddress" // DeleteVerifiedEmailAddressRequest generates a "aws/request.Request" representing the // client's request for the DeleteVerifiedEmailAddress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1797,7 +1797,7 @@ const opDescribeActiveReceiptRuleSet = "DescribeActiveReceiptRuleSet" // DescribeActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeActiveReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1877,7 +1877,7 @@ const opDescribeConfigurationSet = "DescribeConfigurationSet" // DescribeConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1959,7 +1959,7 @@ const opDescribeReceiptRule = "DescribeReceiptRule" // DescribeReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeReceiptRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2046,7 +2046,7 @@ const opDescribeReceiptRuleSet = "DescribeReceiptRuleSet" // DescribeReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2130,7 +2130,7 @@ const opGetAccountSendingEnabled = "GetAccountSendingEnabled" // GetAccountSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSendingEnabled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2206,7 +2206,7 @@ const opGetCustomVerificationEmailTemplate = "GetCustomVerificationEmailTemplate // GetCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2293,7 +2293,7 @@ const opGetIdentityDkimAttributes = "GetIdentityDkimAttributes" // GetIdentityDkimAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityDkimAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2388,7 +2388,7 @@ const opGetIdentityMailFromDomainAttributes = "GetIdentityMailFromDomainAttribut // GetIdentityMailFromDomainAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityMailFromDomainAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2466,7 +2466,7 @@ const opGetIdentityNotificationAttributes = "GetIdentityNotificationAttributes" // GetIdentityNotificationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityNotificationAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2547,7 +2547,7 @@ const opGetIdentityPolicies = "GetIdentityPolicies" // GetIdentityPoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2633,7 +2633,7 @@ const opGetIdentityVerificationAttributes = "GetIdentityVerificationAttributes" // GetIdentityVerificationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityVerificationAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2728,7 +2728,7 @@ const opGetSendQuota = "GetSendQuota" // GetSendQuotaRequest generates a "aws/request.Request" representing the // client's request for the GetSendQuota operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2804,7 +2804,7 @@ const opGetSendStatistics = "GetSendStatistics" // GetSendStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetSendStatistics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2882,7 +2882,7 @@ const opGetTemplate = "GetTemplate" // GetTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2965,7 +2965,7 @@ const opListConfigurationSets = "ListConfigurationSets" // ListConfigurationSetsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurationSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3049,7 +3049,7 @@ const opListCustomVerificationEmailTemplates = "ListCustomVerificationEmailTempl // ListCustomVerificationEmailTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListCustomVerificationEmailTemplates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3185,7 +3185,7 @@ const opListIdentities = "ListIdentities" // ListIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3318,7 +3318,7 @@ const opListIdentityPolicies = "ListIdentityPolicies" // ListIdentityPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityPolicies operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3403,7 +3403,7 @@ const opListReceiptFilters = "ListReceiptFilters" // ListReceiptFiltersRequest generates a "aws/request.Request" representing the // client's request for the ListReceiptFilters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3482,7 +3482,7 @@ const opListReceiptRuleSets = "ListReceiptRuleSets" // ListReceiptRuleSetsRequest generates a "aws/request.Request" representing the // client's request for the ListReceiptRuleSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3564,7 +3564,7 @@ const opListTemplates = "ListTemplates" // ListTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListTemplates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3640,7 +3640,7 @@ const opListVerifiedEmailAddresses = "ListVerifiedEmailAddresses" // ListVerifiedEmailAddressesRequest generates a "aws/request.Request" representing the // client's request for the ListVerifiedEmailAddresses operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3715,7 +3715,7 @@ const opPutIdentityPolicy = "PutIdentityPolicy" // PutIdentityPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutIdentityPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3805,7 +3805,7 @@ const opReorderReceiptRuleSet = "ReorderReceiptRuleSet" // ReorderReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the ReorderReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3896,7 +3896,7 @@ const opSendBounce = "SendBounce" // SendBounceRequest generates a "aws/request.Request" representing the // client's request for the SendBounce operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3986,7 +3986,7 @@ const opSendBulkTemplatedEmail = "SendBulkTemplatedEmail" // SendBulkTemplatedEmailRequest generates a "aws/request.Request" representing the // client's request for the SendBulkTemplatedEmail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4115,7 +4115,7 @@ const opSendCustomVerificationEmail = "SendCustomVerificationEmail" // SendCustomVerificationEmailRequest generates a "aws/request.Request" representing the // client's request for the SendCustomVerificationEmail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4219,7 +4219,7 @@ const opSendEmail = "SendEmail" // SendEmailRequest generates a "aws/request.Request" representing the // client's request for the SendEmail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4353,7 +4353,7 @@ const opSendRawEmail = "SendRawEmail" // SendRawEmailRequest generates a "aws/request.Request" representing the // client's request for the SendRawEmail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4523,7 +4523,7 @@ const opSendTemplatedEmail = "SendTemplatedEmail" // SendTemplatedEmailRequest generates a "aws/request.Request" representing the // client's request for the SendTemplatedEmail operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4657,7 +4657,7 @@ const opSetActiveReceiptRuleSet = "SetActiveReceiptRuleSet" // SetActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the SetActiveReceiptRuleSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4744,7 +4744,7 @@ const opSetIdentityDkimEnabled = "SetIdentityDkimEnabled" // SetIdentityDkimEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityDkimEnabled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4835,7 +4835,7 @@ const opSetIdentityFeedbackForwardingEnabled = "SetIdentityFeedbackForwardingEna // SetIdentityFeedbackForwardingEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityFeedbackForwardingEnabled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4920,7 +4920,7 @@ const opSetIdentityHeadersInNotificationsEnabled = "SetIdentityHeadersInNotifica // SetIdentityHeadersInNotificationsEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityHeadersInNotificationsEnabled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5001,7 +5001,7 @@ const opSetIdentityMailFromDomain = "SetIdentityMailFromDomain" // SetIdentityMailFromDomainRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityMailFromDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5083,7 +5083,7 @@ const opSetIdentityNotificationTopic = "SetIdentityNotificationTopic" // SetIdentityNotificationTopicRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityNotificationTopic operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5168,7 +5168,7 @@ const opSetReceiptRulePosition = "SetReceiptRulePosition" // SetReceiptRulePositionRequest generates a "aws/request.Request" representing the // client's request for the SetReceiptRulePosition operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5255,7 +5255,7 @@ const opTestRenderTemplate = "TestRenderTemplate" // TestRenderTemplateRequest generates a "aws/request.Request" representing the // client's request for the TestRenderTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5347,7 +5347,7 @@ const opUpdateAccountSendingEnabled = "UpdateAccountSendingEnabled" // UpdateAccountSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccountSendingEnabled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5428,7 +5428,7 @@ const opUpdateConfigurationSetEventDestination = "UpdateConfigurationSetEventDes // UpdateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetEventDestination operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5533,7 +5533,7 @@ const opUpdateConfigurationSetReputationMetricsEnabled = "UpdateConfigurationSet // UpdateConfigurationSetReputationMetricsEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetReputationMetricsEnabled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5620,7 +5620,7 @@ const opUpdateConfigurationSetSendingEnabled = "UpdateConfigurationSetSendingEna // UpdateConfigurationSetSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetSendingEnabled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5707,7 +5707,7 @@ const opUpdateConfigurationSetTrackingOptions = "UpdateConfigurationSetTrackingO // UpdateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetTrackingOptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5804,7 +5804,7 @@ const opUpdateCustomVerificationEmailTemplate = "UpdateCustomVerificationEmailTe // UpdateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCustomVerificationEmailTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5900,7 +5900,7 @@ const opUpdateReceiptRule = "UpdateReceiptRule" // UpdateReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateReceiptRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6008,7 +6008,7 @@ const opUpdateTemplate = "UpdateTemplate" // UpdateTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateTemplate operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6096,7 +6096,7 @@ const opVerifyDomainDkim = "VerifyDomainDkim" // VerifyDomainDkimRequest generates a "aws/request.Request" representing the // client's request for the VerifyDomainDkim operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6184,7 +6184,7 @@ const opVerifyDomainIdentity = "VerifyDomainIdentity" // VerifyDomainIdentityRequest generates a "aws/request.Request" representing the // client's request for the VerifyDomainIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6263,7 +6263,7 @@ const opVerifyEmailAddress = "VerifyEmailAddress" // VerifyEmailAddressRequest generates a "aws/request.Request" representing the // client's request for the VerifyEmailAddress operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6339,7 +6339,7 @@ const opVerifyEmailIdentity = "VerifyEmailIdentity" // VerifyEmailIdentityRequest generates a "aws/request.Request" representing the // client's request for the VerifyEmailIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go index f6119da2bdf..2f6f75f4c32 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go @@ -14,7 +14,7 @@ const opCreateActivity = "CreateActivity" // CreateActivityRequest generates a "aws/request.Request" representing the // client's request for the CreateActivity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -102,7 +102,7 @@ const opCreateStateMachine = "CreateStateMachine" // CreateStateMachineRequest generates a "aws/request.Request" representing the // client's request for the CreateStateMachine operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -201,7 +201,7 @@ const opDeleteActivity = "DeleteActivity" // DeleteActivityRequest generates a "aws/request.Request" representing the // client's request for the DeleteActivity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -280,7 +280,7 @@ const opDeleteStateMachine = "DeleteStateMachine" // DeleteStateMachineRequest generates a "aws/request.Request" representing the // client's request for the DeleteStateMachine operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -364,7 +364,7 @@ const opDescribeActivity = "DescribeActivity" // DescribeActivityRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -446,7 +446,7 @@ const opDescribeExecution = "DescribeExecution" // DescribeExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -528,7 +528,7 @@ const opDescribeStateMachine = "DescribeStateMachine" // DescribeStateMachineRequest generates a "aws/request.Request" representing the // client's request for the DescribeStateMachine operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -610,7 +610,7 @@ const opDescribeStateMachineForExecution = "DescribeStateMachineForExecution" // DescribeStateMachineForExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeStateMachineForExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -692,7 +692,7 @@ const opGetActivityTask = "GetActivityTask" // GetActivityTaskRequest generates a "aws/request.Request" representing the // client's request for the GetActivityTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -787,7 +787,7 @@ const opGetExecutionHistory = "GetExecutionHistory" // GetExecutionHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetExecutionHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -934,7 +934,7 @@ const opListActivities = "ListActivities" // ListActivitiesRequest generates a "aws/request.Request" representing the // client's request for the ListActivities operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1073,7 +1073,7 @@ const opListExecutions = "ListExecutions" // ListExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1218,7 +1218,7 @@ const opListStateMachines = "ListStateMachines" // ListStateMachinesRequest generates a "aws/request.Request" representing the // client's request for the ListStateMachines operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1357,7 +1357,7 @@ const opSendTaskFailure = "SendTaskFailure" // SendTaskFailureRequest generates a "aws/request.Request" representing the // client's request for the SendTaskFailure operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1440,7 +1440,7 @@ const opSendTaskHeartbeat = "SendTaskHeartbeat" // SendTaskHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the SendTaskHeartbeat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1535,7 +1535,7 @@ const opSendTaskSuccess = "SendTaskSuccess" // SendTaskSuccessRequest generates a "aws/request.Request" representing the // client's request for the SendTaskSuccess operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1622,7 +1622,7 @@ const opStartExecution = "StartExecution" // StartExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1722,7 +1722,7 @@ const opStopExecution = "StopExecution" // StopExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1804,7 +1804,7 @@ const opUpdateStateMachine = "UpdateStateMachine" // UpdateStateMachineRequest generates a "aws/request.Request" representing the // client's request for the UpdateStateMachine operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go index 24dc68744dc..ea395b956e9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go @@ -16,7 +16,7 @@ const opBatchDeleteAttributes = "BatchDeleteAttributes" // BatchDeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -112,7 +112,7 @@ const opBatchPutAttributes = "BatchPutAttributes" // BatchPutAttributesRequest generates a "aws/request.Request" representing the // client's request for the BatchPutAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -256,7 +256,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -348,7 +348,7 @@ const opDeleteAttributes = "DeleteAttributes" // DeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -445,7 +445,7 @@ const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -528,7 +528,7 @@ const opDomainMetadata = "DomainMetadata" // DomainMetadataRequest generates a "aws/request.Request" representing the // client's request for the DomainMetadata operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -609,7 +609,7 @@ const opGetAttributes = "GetAttributes" // GetAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -700,7 +700,7 @@ const opListDomains = "ListDomains" // ListDomainsRequest generates a "aws/request.Request" representing the // client's request for the ListDomains operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -840,7 +840,7 @@ const opPutAttributes = "PutAttributes" // PutAttributesRequest generates a "aws/request.Request" representing the // client's request for the PutAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -966,7 +966,7 @@ const opSelect = "Select" // SelectRequest generates a "aws/request.Request" representing the // client's request for the Select operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go index 8f658a43034..41ea5fcbc7f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go @@ -16,7 +16,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -107,7 +107,7 @@ const opCheckIfPhoneNumberIsOptedOut = "CheckIfPhoneNumberIsOptedOut" // CheckIfPhoneNumberIsOptedOutRequest generates a "aws/request.Request" representing the // client's request for the CheckIfPhoneNumberIsOptedOut operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -201,7 +201,7 @@ const opConfirmSubscription = "ConfirmSubscription" // ConfirmSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ConfirmSubscription operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -296,7 +296,7 @@ const opCreatePlatformApplication = "CreatePlatformApplication" // CreatePlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -406,7 +406,7 @@ const opCreatePlatformEndpoint = "CreatePlatformEndpoint" // CreatePlatformEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -507,7 +507,7 @@ const opCreateTopic = "CreateTopic" // CreateTopicRequest generates a "aws/request.Request" representing the // client's request for the CreateTopic operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -599,7 +599,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -691,7 +691,7 @@ const opDeletePlatformApplication = "DeletePlatformApplication" // DeletePlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeletePlatformApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -780,7 +780,7 @@ const opDeleteTopic = "DeleteTopic" // DeleteTopicRequest generates a "aws/request.Request" representing the // client's request for the DeleteTopic operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -873,7 +873,7 @@ const opGetEndpointAttributes = "GetEndpointAttributes" // GetEndpointAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetEndpointAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -963,7 +963,7 @@ const opGetPlatformApplicationAttributes = "GetPlatformApplicationAttributes" // GetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetPlatformApplicationAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1053,7 +1053,7 @@ const opGetSMSAttributes = "GetSMSAttributes" // GetSMSAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetSMSAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1144,7 +1144,7 @@ const opGetSubscriptionAttributes = "GetSubscriptionAttributes" // GetSubscriptionAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetSubscriptionAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1232,7 +1232,7 @@ const opGetTopicAttributes = "GetTopicAttributes" // GetTopicAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetTopicAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1321,7 +1321,7 @@ const opListEndpointsByPlatformApplication = "ListEndpointsByPlatformApplication // ListEndpointsByPlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the ListEndpointsByPlatformApplication operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1472,7 +1472,7 @@ const opListPhoneNumbersOptedOut = "ListPhoneNumbersOptedOut" // ListPhoneNumbersOptedOutRequest generates a "aws/request.Request" representing the // client's request for the ListPhoneNumbersOptedOut operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1569,7 +1569,7 @@ const opListPlatformApplications = "ListPlatformApplications" // ListPlatformApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListPlatformApplications operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1717,7 +1717,7 @@ const opListSubscriptions = "ListSubscriptions" // ListSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscriptions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1861,7 +1861,7 @@ const opListSubscriptionsByTopic = "ListSubscriptionsByTopic" // ListSubscriptionsByTopicRequest generates a "aws/request.Request" representing the // client's request for the ListSubscriptionsByTopic operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2008,7 +2008,7 @@ const opListTopics = "ListTopics" // ListTopicsRequest generates a "aws/request.Request" representing the // client's request for the ListTopics operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2151,7 +2151,7 @@ const opOptInPhoneNumber = "OptInPhoneNumber" // OptInPhoneNumberRequest generates a "aws/request.Request" representing the // client's request for the OptInPhoneNumber operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2243,7 +2243,7 @@ const opPublish = "Publish" // PublishRequest generates a "aws/request.Request" representing the // client's request for the Publish operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2351,7 +2351,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2441,7 +2441,7 @@ const opSetEndpointAttributes = "SetEndpointAttributes" // SetEndpointAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetEndpointAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2533,7 +2533,7 @@ const opSetPlatformApplicationAttributes = "SetPlatformApplicationAttributes" // SetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetPlatformApplicationAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2627,7 +2627,7 @@ const opSetSMSAttributes = "SetSMSAttributes" // SetSMSAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetSMSAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2722,7 +2722,7 @@ const opSetSubscriptionAttributes = "SetSubscriptionAttributes" // SetSubscriptionAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetSubscriptionAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2812,7 +2812,7 @@ const opSetTopicAttributes = "SetTopicAttributes" // SetTopicAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetTopicAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2902,7 +2902,7 @@ const opSubscribe = "Subscribe" // SubscribeRequest generates a "aws/request.Request" representing the // client's request for the Subscribe operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2996,7 +2996,7 @@ const opUnsubscribe = "Unsubscribe" // UnsubscribeRequest generates a "aws/request.Request" representing the // client's request for the Unsubscribe operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go index c6997da8711..1b42a7dd686 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go @@ -16,7 +16,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -119,7 +119,7 @@ const opChangeMessageVisibility = "ChangeMessageVisibility" // ChangeMessageVisibilityRequest generates a "aws/request.Request" representing the // client's request for the ChangeMessageVisibility operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -238,7 +238,7 @@ const opChangeMessageVisibilityBatch = "ChangeMessageVisibilityBatch" // ChangeMessageVisibilityBatchRequest generates a "aws/request.Request" representing the // client's request for the ChangeMessageVisibilityBatch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -341,7 +341,7 @@ const opCreateQueue = "CreateQueue" // CreateQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -465,7 +465,7 @@ const opDeleteMessage = "DeleteMessage" // DeleteMessageRequest generates a "aws/request.Request" representing the // client's request for the DeleteMessage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -568,7 +568,7 @@ const opDeleteMessageBatch = "DeleteMessageBatch" // DeleteMessageBatchRequest generates a "aws/request.Request" representing the // client's request for the DeleteMessageBatch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -670,7 +670,7 @@ const opDeleteQueue = "DeleteQueue" // DeleteQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -758,7 +758,7 @@ const opGetQueueAttributes = "GetQueueAttributes" // GetQueueAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetQueueAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -848,7 +848,7 @@ const opGetQueueUrl = "GetQueueUrl" // GetQueueUrlRequest generates a "aws/request.Request" representing the // client's request for the GetQueueUrl operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -934,7 +934,7 @@ const opListDeadLetterSourceQueues = "ListDeadLetterSourceQueues" // ListDeadLetterSourceQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListDeadLetterSourceQueues operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1018,7 +1018,7 @@ const opListQueueTags = "ListQueueTags" // ListQueueTagsRequest generates a "aws/request.Request" representing the // client's request for the ListQueueTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1112,7 +1112,7 @@ const opListQueues = "ListQueues" // ListQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListQueues operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1188,7 +1188,7 @@ const opPurgeQueue = "PurgeQueue" // PurgeQueueRequest generates a "aws/request.Request" representing the // client's request for the PurgeQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1283,7 +1283,7 @@ const opReceiveMessage = "ReceiveMessage" // ReceiveMessageRequest generates a "aws/request.Request" representing the // client's request for the ReceiveMessage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1411,7 +1411,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1488,7 +1488,7 @@ const opSendMessage = "SendMessage" // SendMessageRequest generates a "aws/request.Request" representing the // client's request for the SendMessage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1578,7 +1578,7 @@ const opSendMessageBatch = "SendMessageBatch" // SendMessageBatchRequest generates a "aws/request.Request" representing the // client's request for the SendMessageBatch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1702,7 +1702,7 @@ const opSetQueueAttributes = "SetQueueAttributes" // SetQueueAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetQueueAttributes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1790,7 +1790,7 @@ const opTagQueue = "TagQueue" // TagQueueRequest generates a "aws/request.Request" representing the // client's request for the TagQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1886,7 +1886,7 @@ const opUntagQueue = "UntagQueue" // UntagQueueRequest generates a "aws/request.Request" representing the // client's request for the UntagQueue operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index daf3b9f2f8c..a42c79cb5d5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -15,7 +15,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -125,7 +125,7 @@ const opCancelCommand = "CancelCommand" // CancelCommandRequest generates a "aws/request.Request" representing the // client's request for the CancelCommand operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -225,7 +225,7 @@ const opCreateActivation = "CreateActivation" // CreateActivationRequest generates a "aws/request.Request" representing the // client's request for the CreateActivation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -308,7 +308,7 @@ const opCreateAssociation = "CreateAssociation" // CreateAssociationRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -441,7 +441,7 @@ const opCreateAssociationBatch = "CreateAssociationBatch" // CreateAssociationBatchRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociationBatch operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -574,7 +574,7 @@ const opCreateDocument = "CreateDocument" // CreateDocumentRequest generates a "aws/request.Request" representing the // client's request for the CreateDocument operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -671,7 +671,7 @@ const opCreateMaintenanceWindow = "CreateMaintenanceWindow" // CreateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the CreateMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -761,7 +761,7 @@ const opCreatePatchBaseline = "CreatePatchBaseline" // CreatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the CreatePatchBaseline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -854,7 +854,7 @@ const opCreateResourceDataSync = "CreateResourceDataSync" // CreateResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceDataSync operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -952,7 +952,7 @@ const opDeleteActivation = "DeleteActivation" // DeleteActivationRequest generates a "aws/request.Request" representing the // client's request for the DeleteActivation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1046,7 +1046,7 @@ const opDeleteAssociation = "DeleteAssociation" // DeleteAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1155,7 +1155,7 @@ const opDeleteDocument = "DeleteDocument" // DeleteDocumentRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocument operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1249,7 +1249,7 @@ const opDeleteMaintenanceWindow = "DeleteMaintenanceWindow" // DeleteMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeleteMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1328,7 +1328,7 @@ const opDeleteParameter = "DeleteParameter" // DeleteParameterRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1410,7 +1410,7 @@ const opDeleteParameters = "DeleteParameters" // DeleteParametersRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1490,7 +1490,7 @@ const opDeletePatchBaseline = "DeletePatchBaseline" // DeletePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DeletePatchBaseline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1573,7 +1573,7 @@ const opDeleteResourceDataSync = "DeleteResourceDataSync" // DeleteResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceDataSync operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1658,7 +1658,7 @@ const opDeregisterManagedInstance = "DeregisterManagedInstance" // DeregisterManagedInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterManagedInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1754,7 +1754,7 @@ const opDeregisterPatchBaselineForPatchGroup = "DeregisterPatchBaselineForPatchG // DeregisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DeregisterPatchBaselineForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1837,7 +1837,7 @@ const opDeregisterTargetFromMaintenanceWindow = "DeregisterTargetFromMaintenance // DeregisterTargetFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTargetFromMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1927,7 +1927,7 @@ const opDeregisterTaskFromMaintenanceWindow = "DeregisterTaskFromMaintenanceWind // DeregisterTaskFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTaskFromMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2013,7 +2013,7 @@ const opDescribeActivations = "DescribeActivations" // DescribeActivationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2157,7 +2157,7 @@ const opDescribeAssociation = "DescribeAssociation" // DescribeAssociationRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2266,7 +2266,7 @@ const opDescribeAutomationExecutions = "DescribeAutomationExecutions" // DescribeAutomationExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2354,7 +2354,7 @@ const opDescribeAutomationStepExecutions = "DescribeAutomationStepExecutions" // DescribeAutomationStepExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationStepExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2447,7 +2447,7 @@ const opDescribeAvailablePatches = "DescribeAvailablePatches" // DescribeAvailablePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailablePatches operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2526,7 +2526,7 @@ const opDescribeDocument = "DescribeDocument" // DescribeDocumentRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocument operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2611,7 +2611,7 @@ const opDescribeDocumentPermission = "DescribeDocumentPermission" // DescribeDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocumentPermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2699,7 +2699,7 @@ const opDescribeEffectiveInstanceAssociations = "DescribeEffectiveInstanceAssoci // DescribeEffectiveInstanceAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectiveInstanceAssociations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2796,7 +2796,7 @@ const opDescribeEffectivePatchesForPatchBaseline = "DescribeEffectivePatchesForP // DescribeEffectivePatchesForPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectivePatchesForPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2893,7 +2893,7 @@ const opDescribeInstanceAssociationsStatus = "DescribeInstanceAssociationsStatus // DescribeInstanceAssociationsStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceAssociationsStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2990,7 +2990,7 @@ const opDescribeInstanceInformation = "DescribeInstanceInformation" // DescribeInstanceInformationRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceInformation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3154,7 +3154,7 @@ const opDescribeInstancePatchStates = "DescribeInstancePatchStates" // DescribeInstancePatchStatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStates operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3236,7 +3236,7 @@ const opDescribeInstancePatchStatesForPatchGroup = "DescribeInstancePatchStatesF // DescribeInstancePatchStatesForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStatesForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3323,7 +3323,7 @@ const opDescribeInstancePatches = "DescribeInstancePatches" // DescribeInstancePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatches operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3425,7 +3425,7 @@ const opDescribeMaintenanceWindowExecutionTaskInvocations = "DescribeMaintenance // DescribeMaintenanceWindowExecutionTaskInvocationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTaskInvocations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3512,7 +3512,7 @@ const opDescribeMaintenanceWindowExecutionTasks = "DescribeMaintenanceWindowExec // DescribeMaintenanceWindowExecutionTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3598,7 +3598,7 @@ const opDescribeMaintenanceWindowExecutions = "DescribeMaintenanceWindowExecutio // DescribeMaintenanceWindowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3679,7 +3679,7 @@ const opDescribeMaintenanceWindowTargets = "DescribeMaintenanceWindowTargets" // DescribeMaintenanceWindowTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTargets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3765,7 +3765,7 @@ const opDescribeMaintenanceWindowTasks = "DescribeMaintenanceWindowTasks" // DescribeMaintenanceWindowTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3851,7 +3851,7 @@ const opDescribeMaintenanceWindows = "DescribeMaintenanceWindows" // DescribeMaintenanceWindowsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindows operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3930,7 +3930,7 @@ const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4086,7 +4086,7 @@ const opDescribePatchBaselines = "DescribePatchBaselines" // DescribePatchBaselinesRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchBaselines operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4165,7 +4165,7 @@ const opDescribePatchGroupState = "DescribePatchGroupState" // DescribePatchGroupStateRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroupState operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4247,7 +4247,7 @@ const opDescribePatchGroups = "DescribePatchGroups" // DescribePatchGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4326,7 +4326,7 @@ const opGetAutomationExecution = "GetAutomationExecution" // GetAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetAutomationExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4409,7 +4409,7 @@ const opGetCommandInvocation = "GetCommandInvocation" // GetCommandInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetCommandInvocation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4513,7 +4513,7 @@ const opGetDefaultPatchBaseline = "GetDefaultPatchBaseline" // GetDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetDefaultPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4594,7 +4594,7 @@ const opGetDeployablePatchSnapshotForInstance = "GetDeployablePatchSnapshotForIn // GetDeployablePatchSnapshotForInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeployablePatchSnapshotForInstance operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4679,7 +4679,7 @@ const opGetDocument = "GetDocument" // GetDocumentRequest generates a "aws/request.Request" representing the // client's request for the GetDocument operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4764,7 +4764,7 @@ const opGetInventory = "GetInventory" // GetInventoryRequest generates a "aws/request.Request" representing the // client's request for the GetInventory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4856,7 +4856,7 @@ const opGetInventorySchema = "GetInventorySchema" // GetInventorySchemaRequest generates a "aws/request.Request" representing the // client's request for the GetInventorySchema operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4942,7 +4942,7 @@ const opGetMaintenanceWindow = "GetMaintenanceWindow" // GetMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5028,7 +5028,7 @@ const opGetMaintenanceWindowExecution = "GetMaintenanceWindowExecution" // GetMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5115,7 +5115,7 @@ const opGetMaintenanceWindowExecutionTask = "GetMaintenanceWindowExecutionTask" // GetMaintenanceWindowExecutionTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5202,7 +5202,7 @@ const opGetMaintenanceWindowExecutionTaskInvocation = "GetMaintenanceWindowExecu // GetMaintenanceWindowExecutionTaskInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTaskInvocation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5289,7 +5289,7 @@ const opGetMaintenanceWindowTask = "GetMaintenanceWindowTask" // GetMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5375,7 +5375,7 @@ const opGetParameter = "GetParameter" // GetParameterRequest generates a "aws/request.Request" representing the // client's request for the GetParameter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5464,7 +5464,7 @@ const opGetParameterHistory = "GetParameterHistory" // GetParameterHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetParameterHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5608,7 +5608,7 @@ const opGetParameters = "GetParameters" // GetParametersRequest generates a "aws/request.Request" representing the // client's request for the GetParameters operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5690,7 +5690,7 @@ const opGetParametersByPath = "GetParametersByPath" // GetParametersByPathRequest generates a "aws/request.Request" representing the // client's request for the GetParametersByPath operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5852,7 +5852,7 @@ const opGetPatchBaseline = "GetPatchBaseline" // GetPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5942,7 +5942,7 @@ const opGetPatchBaselineForPatchGroup = "GetPatchBaselineForPatchGroup" // GetPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaselineForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6022,7 +6022,7 @@ const opListAssociationVersions = "ListAssociationVersions" // ListAssociationVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociationVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6107,7 +6107,7 @@ const opListAssociations = "ListAssociations" // ListAssociationsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6245,7 +6245,7 @@ const opListCommandInvocations = "ListCommandInvocations" // ListCommandInvocationsRequest generates a "aws/request.Request" representing the // client's request for the ListCommandInvocations operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6407,7 +6407,7 @@ const opListCommands = "ListCommands" // ListCommandsRequest generates a "aws/request.Request" representing the // client's request for the ListCommands operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6565,7 +6565,7 @@ const opListComplianceItems = "ListComplianceItems" // ListComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceItems operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6662,7 +6662,7 @@ const opListComplianceSummaries = "ListComplianceSummaries" // ListComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceSummaries operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6750,7 +6750,7 @@ const opListDocumentVersions = "ListDocumentVersions" // ListDocumentVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListDocumentVersions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6835,7 +6835,7 @@ const opListDocuments = "ListDocuments" // ListDocumentsRequest generates a "aws/request.Request" representing the // client's request for the ListDocuments operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6976,7 +6976,7 @@ const opListInventoryEntries = "ListInventoryEntries" // ListInventoryEntriesRequest generates a "aws/request.Request" representing the // client's request for the ListInventoryEntries operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7080,7 +7080,7 @@ const opListResourceComplianceSummaries = "ListResourceComplianceSummaries" // ListResourceComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListResourceComplianceSummaries operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7168,7 +7168,7 @@ const opListResourceDataSync = "ListResourceDataSync" // ListResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the ListResourceDataSync operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7259,7 +7259,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7346,7 +7346,7 @@ const opModifyDocumentPermission = "ModifyDocumentPermission" // ModifyDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the ModifyDocumentPermission operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7443,7 +7443,7 @@ const opPutComplianceItems = "PutComplianceItems" // PutComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the PutComplianceItems operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7584,7 +7584,7 @@ const opPutInventory = "PutInventory" // PutInventoryRequest generates a "aws/request.Request" representing the // client's request for the PutInventory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7716,7 +7716,7 @@ const opPutParameter = "PutParameter" // PutParameterRequest generates a "aws/request.Request" representing the // client's request for the PutParameter operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7830,7 +7830,7 @@ const opRegisterDefaultPatchBaseline = "RegisterDefaultPatchBaseline" // RegisterDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the RegisterDefaultPatchBaseline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7920,7 +7920,7 @@ const opRegisterPatchBaselineForPatchGroup = "RegisterPatchBaselineForPatchGroup // RegisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the RegisterPatchBaselineForPatchGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8021,7 +8021,7 @@ const opRegisterTargetWithMaintenanceWindow = "RegisterTargetWithMaintenanceWind // RegisterTargetWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTargetWithMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8118,7 +8118,7 @@ const opRegisterTaskWithMaintenanceWindow = "RegisterTaskWithMaintenanceWindow" // RegisterTaskWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTaskWithMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8219,7 +8219,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8306,7 +8306,7 @@ const opSendAutomationSignal = "SendAutomationSignal" // SendAutomationSignalRequest generates a "aws/request.Request" representing the // client's request for the SendAutomationSignal operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8397,7 +8397,7 @@ const opSendCommand = "SendCommand" // SendCommandRequest generates a "aws/request.Request" representing the // client's request for the SendCommand operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8523,7 +8523,7 @@ const opStartAutomationExecution = "StartAutomationExecution" // StartAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartAutomationExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8625,7 +8625,7 @@ const opStopAutomationExecution = "StopAutomationExecution" // StopAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopAutomationExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8711,7 +8711,7 @@ const opUpdateAssociation = "UpdateAssociation" // UpdateAssociationRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociation operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8831,7 +8831,7 @@ const opUpdateAssociationStatus = "UpdateAssociationStatus" // UpdateAssociationStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociationStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8939,7 +8939,7 @@ const opUpdateDocument = "UpdateDocument" // UpdateDocumentRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocument operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9041,7 +9041,7 @@ const opUpdateDocumentDefaultVersion = "UpdateDocumentDefaultVersion" // UpdateDocumentDefaultVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentDefaultVersion operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9129,7 +9129,7 @@ const opUpdateMaintenanceWindow = "UpdateMaintenanceWindow" // UpdateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindow operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9215,7 +9215,7 @@ const opUpdateMaintenanceWindowTarget = "UpdateMaintenanceWindowTarget" // UpdateMaintenanceWindowTargetRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTarget operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9317,7 +9317,7 @@ const opUpdateMaintenanceWindowTask = "UpdateMaintenanceWindowTask" // UpdateMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9422,7 +9422,7 @@ const opUpdateManagedInstanceRole = "UpdateManagedInstanceRole" // UpdateManagedInstanceRoleRequest generates a "aws/request.Request" representing the // client's request for the UpdateManagedInstanceRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -9517,7 +9517,7 @@ const opUpdatePatchBaseline = "UpdatePatchBaseline" // UpdatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePatchBaseline operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -29128,6 +29128,9 @@ const ( // OperatingSystemSuse is a OperatingSystem enum value OperatingSystemSuse = "SUSE" + + // OperatingSystemCentos is a OperatingSystem enum value + OperatingSystemCentos = "CENTOS" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index 89d2ce6a64c..b46da12ca3d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -14,7 +14,7 @@ const opAssumeRole = "AssumeRole" // AssumeRoleRequest generates a "aws/request.Request" representing the // client's request for the AssumeRole operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -208,7 +208,7 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML" // AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithSAML operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -390,7 +390,7 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" // AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithWebIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -601,7 +601,7 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" // DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the // client's request for the DecodeAuthorizationMessage operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -713,7 +713,7 @@ const opGetCallerIdentity = "GetCallerIdentity" // GetCallerIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCallerIdentity operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -788,7 +788,7 @@ const opGetFederationToken = "GetFederationToken" // GetFederationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetFederationToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -957,7 +957,7 @@ const opGetSessionToken = "GetSessionToken" // GetSessionTokenRequest generates a "aws/request.Request" representing the // client's request for the GetSessionToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go index a69f7b2887c..505fc244a2e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go @@ -17,7 +17,7 @@ const opCountClosedWorkflowExecutions = "CountClosedWorkflowExecutions" // CountClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the CountClosedWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -129,7 +129,7 @@ const opCountOpenWorkflowExecutions = "CountOpenWorkflowExecutions" // CountOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the CountOpenWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -241,7 +241,7 @@ const opCountPendingActivityTasks = "CountPendingActivityTasks" // CountPendingActivityTasksRequest generates a "aws/request.Request" representing the // client's request for the CountPendingActivityTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -347,7 +347,7 @@ const opCountPendingDecisionTasks = "CountPendingDecisionTasks" // CountPendingDecisionTasksRequest generates a "aws/request.Request" representing the // client's request for the CountPendingDecisionTasks operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -453,7 +453,7 @@ const opDeprecateActivityType = "DeprecateActivityType" // DeprecateActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateActivityType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -569,7 +569,7 @@ const opDeprecateDomain = "DeprecateDomain" // DeprecateDomainRequest generates a "aws/request.Request" representing the // client's request for the DeprecateDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -683,7 +683,7 @@ const opDeprecateWorkflowType = "DeprecateWorkflowType" // DeprecateWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateWorkflowType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -800,7 +800,7 @@ const opDescribeActivityType = "DescribeActivityType" // DescribeActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivityType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -908,7 +908,7 @@ const opDescribeDomain = "DescribeDomain" // DescribeDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1010,7 +1010,7 @@ const opDescribeWorkflowExecution = "DescribeWorkflowExecution" // DescribeWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1115,7 +1115,7 @@ const opDescribeWorkflowType = "DescribeWorkflowType" // DescribeWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkflowType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1223,7 +1223,7 @@ const opGetWorkflowExecutionHistory = "GetWorkflowExecutionHistory" // GetWorkflowExecutionHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetWorkflowExecutionHistory operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1385,7 +1385,7 @@ const opListActivityTypes = "ListActivityTypes" // ListActivityTypesRequest generates a "aws/request.Request" representing the // client's request for the ListActivityTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1546,7 +1546,7 @@ const opListClosedWorkflowExecutions = "ListClosedWorkflowExecutions" // ListClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListClosedWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1716,7 +1716,7 @@ const opListDomains = "ListDomains" // ListDomainsRequest generates a "aws/request.Request" representing the // client's request for the ListDomains operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1874,7 +1874,7 @@ const opListOpenWorkflowExecutions = "ListOpenWorkflowExecutions" // ListOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListOpenWorkflowExecutions operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2044,7 +2044,7 @@ const opListWorkflowTypes = "ListWorkflowTypes" // ListWorkflowTypesRequest generates a "aws/request.Request" representing the // client's request for the ListWorkflowTypes operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2203,7 +2203,7 @@ const opPollForActivityTask = "PollForActivityTask" // PollForActivityTaskRequest generates a "aws/request.Request" representing the // client's request for the PollForActivityTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2321,7 +2321,7 @@ const opPollForDecisionTask = "PollForDecisionTask" // PollForDecisionTaskRequest generates a "aws/request.Request" representing the // client's request for the PollForDecisionTask operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2505,7 +2505,7 @@ const opRecordActivityTaskHeartbeat = "RecordActivityTaskHeartbeat" // RecordActivityTaskHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the RecordActivityTaskHeartbeat operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2631,7 +2631,7 @@ const opRegisterActivityType = "RegisterActivityType" // RegisterActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the RegisterActivityType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2757,7 +2757,7 @@ const opRegisterDomain = "RegisterDomain" // RegisterDomainRequest generates a "aws/request.Request" representing the // client's request for the RegisterDomain operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2865,7 +2865,7 @@ const opRegisterWorkflowType = "RegisterWorkflowType" // RegisterWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the RegisterWorkflowType operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2994,7 +2994,7 @@ const opRequestCancelWorkflowExecution = "RequestCancelWorkflowExecution" // RequestCancelWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the RequestCancelWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3108,7 +3108,7 @@ const opRespondActivityTaskCanceled = "RespondActivityTaskCanceled" // RespondActivityTaskCanceledRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskCanceled operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3225,7 +3225,7 @@ const opRespondActivityTaskCompleted = "RespondActivityTaskCompleted" // RespondActivityTaskCompletedRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskCompleted operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3341,7 +3341,7 @@ const opRespondActivityTaskFailed = "RespondActivityTaskFailed" // RespondActivityTaskFailedRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskFailed operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3452,7 +3452,7 @@ const opRespondDecisionTaskCompleted = "RespondDecisionTaskCompleted" // RespondDecisionTaskCompletedRequest generates a "aws/request.Request" representing the // client's request for the RespondDecisionTaskCompleted operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3552,7 +3552,7 @@ const opSignalWorkflowExecution = "SignalWorkflowExecution" // SignalWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the SignalWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3664,7 +3664,7 @@ const opStartWorkflowExecution = "StartWorkflowExecution" // StartWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3810,7 +3810,7 @@ const opTerminateWorkflowExecution = "TerminateWorkflowExecution" // TerminateWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the TerminateWorkflowExecution operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index f54737269ef..3fd63c68105 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -15,7 +15,7 @@ const opCreateByteMatchSet = "CreateByteMatchSet" // CreateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -162,7 +162,7 @@ const opCreateGeoMatchSet = "CreateGeoMatchSet" // CreateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -308,7 +308,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -455,7 +455,7 @@ const opCreateRateBasedRule = "CreateRateBasedRule" // CreateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -637,7 +637,7 @@ const opCreateRegexMatchSet = "CreateRegexMatchSet" // CreateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -752,7 +752,7 @@ const opCreateRegexPatternSet = "CreateRegexPatternSet" // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -863,7 +863,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1020,7 +1020,7 @@ const opCreateRuleGroup = "CreateRuleGroup" // CreateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1126,7 +1126,7 @@ const opCreateSizeConstraintSet = "CreateSizeConstraintSet" // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1274,7 +1274,7 @@ const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1418,7 +1418,7 @@ const opCreateWebACL = "CreateWebACL" // CreateWebACLRequest generates a "aws/request.Request" representing the // client's request for the CreateWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1574,7 +1574,7 @@ const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1719,7 +1719,7 @@ const opDeleteByteMatchSet = "DeleteByteMatchSet" // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1846,7 +1846,7 @@ const opDeleteGeoMatchSet = "DeleteGeoMatchSet" // DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1972,7 +1972,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2098,7 +2098,7 @@ const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2187,7 +2187,7 @@ const opDeleteRateBasedRule = "DeleteRateBasedRule" // DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2315,7 +2315,7 @@ const opDeleteRegexMatchSet = "DeleteRegexMatchSet" // DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2442,7 +2442,7 @@ const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2557,7 +2557,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2683,7 +2683,7 @@ const opDeleteRuleGroup = "DeleteRuleGroup" // DeleteRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2804,7 +2804,7 @@ const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2931,7 +2931,7 @@ const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3059,7 +3059,7 @@ const opDeleteWebACL = "DeleteWebACL" // DeleteWebACLRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3182,7 +3182,7 @@ const opDeleteXssMatchSet = "DeleteXssMatchSet" // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3309,7 +3309,7 @@ const opGetByteMatchSet = "GetByteMatchSet" // GetByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3396,7 +3396,7 @@ const opGetChangeToken = "GetChangeToken" // GetChangeTokenRequest generates a "aws/request.Request" representing the // client's request for the GetChangeToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3490,7 +3490,7 @@ const opGetChangeTokenStatus = "GetChangeTokenStatus" // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the // client's request for the GetChangeTokenStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3583,7 +3583,7 @@ const opGetGeoMatchSet = "GetGeoMatchSet" // GetGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3670,7 +3670,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3757,7 +3757,7 @@ const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3840,7 +3840,7 @@ const opGetRateBasedRule = "GetRateBasedRule" // GetRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3928,7 +3928,7 @@ const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" // GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRuleManagedKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4047,7 +4047,7 @@ const opGetRegexMatchSet = "GetRegexMatchSet" // GetRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4134,7 +4134,7 @@ const opGetRegexPatternSet = "GetRegexPatternSet" // GetRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4221,7 +4221,7 @@ const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4309,7 +4309,7 @@ const opGetRuleGroup = "GetRuleGroup" // GetRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the GetRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4395,7 +4395,7 @@ const opGetSampledRequests = "GetSampledRequests" // GetSampledRequestsRequest generates a "aws/request.Request" representing the // client's request for the GetSampledRequests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4488,7 +4488,7 @@ const opGetSizeConstraintSet = "GetSizeConstraintSet" // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the GetSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4575,7 +4575,7 @@ const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4662,7 +4662,7 @@ const opGetWebACL = "GetWebACL" // GetWebACLRequest generates a "aws/request.Request" representing the // client's request for the GetWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4749,7 +4749,7 @@ const opGetXssMatchSet = "GetXssMatchSet" // GetXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4836,7 +4836,7 @@ const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" // ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the ListActivatedRulesInRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4948,7 +4948,7 @@ const opListByteMatchSets = "ListByteMatchSets" // ListByteMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListByteMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5032,7 +5032,7 @@ const opListGeoMatchSets = "ListGeoMatchSets" // ListGeoMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5116,7 +5116,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5200,7 +5200,7 @@ const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRateBasedRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5284,7 +5284,7 @@ const opListRegexMatchSets = "ListRegexMatchSets" // ListRegexMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5368,7 +5368,7 @@ const opListRegexPatternSets = "ListRegexPatternSets" // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexPatternSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5452,7 +5452,7 @@ const opListRuleGroups = "ListRuleGroups" // ListRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListRuleGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5532,7 +5532,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5616,7 +5616,7 @@ const opListSizeConstraintSets = "ListSizeConstraintSets" // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSizeConstraintSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5700,7 +5700,7 @@ const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSqlInjectionMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5784,7 +5784,7 @@ const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" // ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscribedRuleGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5867,7 +5867,7 @@ const opListWebACLs = "ListWebACLs" // ListWebACLsRequest generates a "aws/request.Request" representing the // client's request for the ListWebACLs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5951,7 +5951,7 @@ const opListXssMatchSets = "ListXssMatchSets" // ListXssMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListXssMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6035,7 +6035,7 @@ const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6170,7 +6170,7 @@ const opUpdateByteMatchSet = "UpdateByteMatchSet" // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6369,7 +6369,7 @@ const opUpdateGeoMatchSet = "UpdateGeoMatchSet" // UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6567,7 +6567,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6786,7 +6786,7 @@ const opUpdateRateBasedRule = "UpdateRateBasedRule" // UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6994,7 +6994,7 @@ const opUpdateRegexMatchSet = "UpdateRegexMatchSet" // UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7164,7 +7164,7 @@ const opUpdateRegexPatternSet = "UpdateRegexPatternSet" // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7331,7 +7331,7 @@ const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7534,7 +7534,7 @@ const opUpdateRuleGroup = "UpdateRuleGroup" // UpdateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7715,7 +7715,7 @@ const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7924,7 +7924,7 @@ const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8118,7 +8118,7 @@ const opUpdateWebACL = "UpdateWebACL" // UpdateWebACLRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8339,7 +8339,7 @@ const opUpdateXssMatchSet = "UpdateXssMatchSet" // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go index 0a7d006f15a..cd5c09e23a5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go @@ -13,7 +13,7 @@ const opAssociateWebACL = "AssociateWebACL" // AssociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the AssociateWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -133,7 +133,7 @@ const opCreateByteMatchSet = "CreateByteMatchSet" // CreateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -280,7 +280,7 @@ const opCreateGeoMatchSet = "CreateGeoMatchSet" // CreateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -426,7 +426,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -573,7 +573,7 @@ const opCreateRateBasedRule = "CreateRateBasedRule" // CreateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -755,7 +755,7 @@ const opCreateRegexMatchSet = "CreateRegexMatchSet" // CreateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -870,7 +870,7 @@ const opCreateRegexPatternSet = "CreateRegexPatternSet" // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -981,7 +981,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1138,7 +1138,7 @@ const opCreateRuleGroup = "CreateRuleGroup" // CreateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1244,7 +1244,7 @@ const opCreateSizeConstraintSet = "CreateSizeConstraintSet" // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1392,7 +1392,7 @@ const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1536,7 +1536,7 @@ const opCreateWebACL = "CreateWebACL" // CreateWebACLRequest generates a "aws/request.Request" representing the // client's request for the CreateWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1692,7 +1692,7 @@ const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1837,7 +1837,7 @@ const opDeleteByteMatchSet = "DeleteByteMatchSet" // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1964,7 +1964,7 @@ const opDeleteGeoMatchSet = "DeleteGeoMatchSet" // DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2090,7 +2090,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2216,7 +2216,7 @@ const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2305,7 +2305,7 @@ const opDeleteRateBasedRule = "DeleteRateBasedRule" // DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2433,7 +2433,7 @@ const opDeleteRegexMatchSet = "DeleteRegexMatchSet" // DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2560,7 +2560,7 @@ const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2675,7 +2675,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2801,7 +2801,7 @@ const opDeleteRuleGroup = "DeleteRuleGroup" // DeleteRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -2922,7 +2922,7 @@ const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3049,7 +3049,7 @@ const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3177,7 +3177,7 @@ const opDeleteWebACL = "DeleteWebACL" // DeleteWebACLRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3300,7 +3300,7 @@ const opDeleteXssMatchSet = "DeleteXssMatchSet" // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3427,7 +3427,7 @@ const opDisassociateWebACL = "DisassociateWebACL" // DisassociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the DisassociateWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3543,7 +3543,7 @@ const opGetByteMatchSet = "GetByteMatchSet" // GetByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3630,7 +3630,7 @@ const opGetChangeToken = "GetChangeToken" // GetChangeTokenRequest generates a "aws/request.Request" representing the // client's request for the GetChangeToken operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3724,7 +3724,7 @@ const opGetChangeTokenStatus = "GetChangeTokenStatus" // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the // client's request for the GetChangeTokenStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3817,7 +3817,7 @@ const opGetGeoMatchSet = "GetGeoMatchSet" // GetGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3904,7 +3904,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -3991,7 +3991,7 @@ const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4074,7 +4074,7 @@ const opGetRateBasedRule = "GetRateBasedRule" // GetRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4162,7 +4162,7 @@ const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" // GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRuleManagedKeys operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4281,7 +4281,7 @@ const opGetRegexMatchSet = "GetRegexMatchSet" // GetRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4368,7 +4368,7 @@ const opGetRegexPatternSet = "GetRegexPatternSet" // GetRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4455,7 +4455,7 @@ const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4543,7 +4543,7 @@ const opGetRuleGroup = "GetRuleGroup" // GetRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the GetRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4629,7 +4629,7 @@ const opGetSampledRequests = "GetSampledRequests" // GetSampledRequestsRequest generates a "aws/request.Request" representing the // client's request for the GetSampledRequests operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4722,7 +4722,7 @@ const opGetSizeConstraintSet = "GetSizeConstraintSet" // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the GetSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4809,7 +4809,7 @@ const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4896,7 +4896,7 @@ const opGetWebACL = "GetWebACL" // GetWebACLRequest generates a "aws/request.Request" representing the // client's request for the GetWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -4983,7 +4983,7 @@ const opGetWebACLForResource = "GetWebACLForResource" // GetWebACLForResourceRequest generates a "aws/request.Request" representing the // client's request for the GetWebACLForResource operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5103,7 +5103,7 @@ const opGetXssMatchSet = "GetXssMatchSet" // GetXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5190,7 +5190,7 @@ const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" // ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the ListActivatedRulesInRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5302,7 +5302,7 @@ const opListByteMatchSets = "ListByteMatchSets" // ListByteMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListByteMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5386,7 +5386,7 @@ const opListGeoMatchSets = "ListGeoMatchSets" // ListGeoMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5470,7 +5470,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5554,7 +5554,7 @@ const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRateBasedRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5638,7 +5638,7 @@ const opListRegexMatchSets = "ListRegexMatchSets" // ListRegexMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5722,7 +5722,7 @@ const opListRegexPatternSets = "ListRegexPatternSets" // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexPatternSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5806,7 +5806,7 @@ const opListResourcesForWebACL = "ListResourcesForWebACL" // ListResourcesForWebACLRequest generates a "aws/request.Request" representing the // client's request for the ListResourcesForWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5893,7 +5893,7 @@ const opListRuleGroups = "ListRuleGroups" // ListRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListRuleGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -5973,7 +5973,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6057,7 +6057,7 @@ const opListSizeConstraintSets = "ListSizeConstraintSets" // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSizeConstraintSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6141,7 +6141,7 @@ const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSqlInjectionMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6225,7 +6225,7 @@ const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" // ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscribedRuleGroups operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6308,7 +6308,7 @@ const opListWebACLs = "ListWebACLs" // ListWebACLsRequest generates a "aws/request.Request" representing the // client's request for the ListWebACLs operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6392,7 +6392,7 @@ const opListXssMatchSets = "ListXssMatchSets" // ListXssMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListXssMatchSets operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6476,7 +6476,7 @@ const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPermissionPolicy operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6611,7 +6611,7 @@ const opUpdateByteMatchSet = "UpdateByteMatchSet" // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateByteMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -6810,7 +6810,7 @@ const opUpdateGeoMatchSet = "UpdateGeoMatchSet" // UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateGeoMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7008,7 +7008,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7227,7 +7227,7 @@ const opUpdateRateBasedRule = "UpdateRateBasedRule" // UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRateBasedRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7435,7 +7435,7 @@ const opUpdateRegexMatchSet = "UpdateRegexMatchSet" // UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7605,7 +7605,7 @@ const opUpdateRegexPatternSet = "UpdateRegexPatternSet" // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexPatternSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7772,7 +7772,7 @@ const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRule operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -7975,7 +7975,7 @@ const opUpdateRuleGroup = "UpdateRuleGroup" // UpdateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuleGroup operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8156,7 +8156,7 @@ const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSizeConstraintSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8365,7 +8365,7 @@ const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8559,7 +8559,7 @@ const opUpdateWebACL = "UpdateWebACL" // UpdateWebACLRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebACL operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -8780,7 +8780,7 @@ const opUpdateXssMatchSet = "UpdateXssMatchSet" // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateXssMatchSet operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go index 5dfb336c19e..051c8fe53d9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go @@ -15,7 +15,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -100,7 +100,7 @@ const opCreateWorkspaces = "CreateWorkspaces" // CreateWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the CreateWorkspaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -184,7 +184,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -266,7 +266,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -345,7 +345,7 @@ const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles" // DescribeWorkspaceBundlesRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspaceBundles operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -482,7 +482,7 @@ const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories" // DescribeWorkspaceDirectoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspaceDirectories operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -618,7 +618,7 @@ const opDescribeWorkspaces = "DescribeWorkspaces" // DescribeWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -759,7 +759,7 @@ const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus // DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspacesConnectionStatus operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -838,7 +838,7 @@ const opModifyWorkspaceProperties = "ModifyWorkspaceProperties" // ModifyWorkspacePropertiesRequest generates a "aws/request.Request" representing the // client's request for the ModifyWorkspaceProperties operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -937,7 +937,7 @@ const opRebootWorkspaces = "RebootWorkspaces" // RebootWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the RebootWorkspaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1016,7 +1016,7 @@ const opRebuildWorkspaces = "RebuildWorkspaces" // RebuildWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the RebuildWorkspaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1098,7 +1098,7 @@ const opStartWorkspaces = "StartWorkspaces" // StartWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the StartWorkspaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1175,7 +1175,7 @@ const opStopWorkspaces = "StopWorkspaces" // StopWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the StopWorkspaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. @@ -1252,7 +1252,7 @@ const opTerminateWorkspaces = "TerminateWorkspaces" // TerminateWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the TerminateWorkspaces operation. The "output" return -// value will be populated with the request's response once the request complets +// value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. diff --git a/vendor/vendor.json b/vendor/vendor.json index 5e4c047206e..a92ff014e1e 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,884 +39,908 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "cerwk42woNAlSP9r65gthJcuhzo=", + "checksumSHA1": "Fs3DE5rdov9GRx+jUJ7VfG/EBvA=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "OLJvnxcwAKaL2t7Vv3jQ5v9JXxA=", + "checksumSHA1": "Sv3a7nAY/z1ZHiQ1eN0SE0rLLtQ=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "CntJM8T3dRgC0e1i66CIbP8uCSY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "s9OHHvPVH/wRqcIpNNDxIa4FYv0=", + "checksumSHA1": "krjKYP+Z5qrFgZkHccphnuPdYd0=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "DPl/OkvEUjrd+XKqX73l6nUNw3U=", + "checksumSHA1": "WliJXTogdly9qe5xEV6Fn2zklcs=", + "path": "github.com/aws/aws-sdk-go/service/acmpca", + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" + }, + { + "checksumSHA1": "rQmpNRto8bpB17qNubhGzRh/Aj8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "tsOPYVkOiuYDJTziSRkP7p1TL70=", + "checksumSHA1": "7o1gMXoE8cemDzkZFUrQknQS4Yo=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "lyjaWzlpAp6CacdNZTe351CRp5c=", + "checksumSHA1": "s0TQJfF7ZqeS9IH4hdvX5EQk2l8=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "wrOVdI/6ZTZ/H0Kxjh3bBEZtVzk=", + "checksumSHA1": "YlKOG1eZClZYmcRwJQO+LfEQrVY=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "GhemRVzpnrN6HAgm1NdAgESY8CQ=", + "checksumSHA1": "58ARAtV4EKAIv5zpieVjvJMFjO0=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "P5gDOoqIdVjMU77e5Nhy48QLpS4=", + "checksumSHA1": "leWnf/5HCZ3nD79LpJ0EDNQnNrI=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "BrC9UCeefniH5UN7x0PFr8A9l6Y=", + "checksumSHA1": "MJPsaJkyrCml4VZOsbNGo9Fl0C8=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "EoaTzMilW+OIi5eETJUpd+giyTc=", + "checksumSHA1": "AQGPL+fXjjKhBmyb37QAG05R/Qw=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "yuFNzmUIWppfji/Xx6Aao0EE4cY=", + "checksumSHA1": "NU6AqUCd5TOrxaqFdWmo8l2oeOI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "0nPnGWlegQG7bn/iIIfjJFoljyU=", + "checksumSHA1": "hCz5z7QQz1416cCjbhjGjvbrdpY=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "XJAlmauOOHsHEUW7n0XO/eEpcWI=", + "checksumSHA1": "kM7Fxkb1OdCiOOmTlRIadqnsdt0=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "VTc9UOMqIwuhWJ6oGQDsMkTW09I=", + "checksumSHA1": "pKJec2iJiKDSY5UKmLSeYxLxucg=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "ItXljM1vG/0goVleodRgbfYgyxQ=", + "checksumSHA1": "BD7EvXghMHMw52wtxISIhpJ4CTk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "x25KEvGmuQ0Uuoduo/CVe37ELC8=", + "checksumSHA1": "6Q9ZHEAsu92jsFOCwJAI+SjYYAk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "HHct8eQygkIJ+vrQpKhB0IEDymQ=", + "checksumSHA1": "YNl9xTPOb1SFVmwXDtmwzyGsx8U=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "LHcxaQJ77WMlug2cnyXlTzJJUSo=", + "checksumSHA1": "p/I/GLsXOoZ0XdhDuSQ+lP4NlYM=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "AQwpqKKc52nnI5F50K73Zx5luoQ=", + "checksumSHA1": "4KiQdvEfpTf2g+UF2rWlLg/kgok=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "wvXGTyWPjtgC4OjXb80IxYdpqmE=", + "checksumSHA1": "mLFFVXyhKLYgoKSJ17URM/GXdNc=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "V1Y05qfjN4xOCy+GnPWSCqIeZb4=", + "checksumSHA1": "bh5IjjK9tKextJTq+gLV+6zhmL8=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "Ju8efcqcIgggB7N8io/as9ERVdc=", + "checksumSHA1": "cx2wG4c6Q5gSTsAU6D/UZMQN/Kg=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "jeCyZm4iJmOLbVOe/70QNkII+qU=", + "checksumSHA1": "k4lfEcz91J29Wax6GPBlUUQb5bk=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "OhbpZoCd+Vg3pLOEE0MVH9T22eY=", + "checksumSHA1": "qrxVu09idcoHIT2HqDJIbV3weUE=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "45sgs1urdRiXDb35iuAhQPzl0e4=", + "checksumSHA1": "2CBd4VCNpKFk/fBIsLEJNG2Shps=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "bu1R1eKCK2fc5+hMcXmagr3iIik=", + "checksumSHA1": "I5sSvXLvlj9Ppv0HCbFXdN4tqn4=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "EaEfUc3nt1sS/cdfSYGq+JtSVKs=", + "checksumSHA1": "WMCgYV6S5ZeQo6pjIFTStdmBVcg=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "LRdh5oXUe2yURIk5FDH6ceEZGMo=", + "checksumSHA1": "hurqUivjVxLHaXEd2oS8JrwMGQs=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "a7itHIwtyXtOGQ0KsiefmsHgu4s=", + "checksumSHA1": "zxX7V0AIU1x2yX5Uyd9RMe0C3ok=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "D93YWdEE2D9HtggwUKUNmV7J86E=", + "checksumSHA1": "Ae8sc+KEu6BMw89WRwaq4Ol/87g=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "SOmBkudpfGbt3Pb3I1bzuXV9FvQ=", + "checksumSHA1": "12jA2n3aIJzdwvOxl+dvtx5S4CI=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "PcnSiFF2p2xOsvITrsglyWp20YA=", + "checksumSHA1": "V3D5pDdtXS0yVShpS/fOqFGxCrA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "VRx8MtqfED2uZVOi6ldb5P145TI=", + "checksumSHA1": "7igFr0esmtcs9V0F9iMs2k5uNDI=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "4XmkiujbDA68x39KGgURR1+uPiQ=", + "checksumSHA1": "PQnfXJ0ZQIIMiqUUFs4bkUPHqnc=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "o73xT1zFo3C+giQwKcRj02OAZhM=", + "checksumSHA1": "pZoO4JKc/TJACuq1n9IHuhovD4k=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "C6OWsuCjBYnqjR5PwDFEA8l1hWg=", + "checksumSHA1": "s0INIDkP10AOmJkmTpCHpazIwUw=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "VYGtTaSiajfKOVTbi9/SNmbiIac=", + "checksumSHA1": "BSSURh/ALTj0QW5BWPJkW3i+FN0=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "SZ7yLDZ6RvMhpWe0Goyem64kgyA=", + "checksumSHA1": "JpvcQ+tc0yz2WZ0ne6zzxlbfscI=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "iRI32eUYQfumh0LybzZ+5iWV3jE=", + "checksumSHA1": "MgdGxbP8vjCkzkj1ukmU5Uqh3UA=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "ufCsoZUQK13j8Y+m25yxhC2XteQ=", + "checksumSHA1": "hgqHUngsP+NPjkZVqevXuioHnkE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "5x77vwxya74Qu5YEq75/lhyYkqY=", + "checksumSHA1": "OQuas8ovzB34Yb2bCMBDsu8teu4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "t7BmfpJqmQ7Y0EYcj/CR9Aup9go=", + "checksumSHA1": "hUosfOQhleGpv6UWGnbDf/eB5Ts=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" + }, + { + "checksumSHA1": "4DYLn0HnMhZvXXgx6VjbS/V0srA=", + "path": "github.com/aws/aws-sdk-go/service/fms", + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "h37wXo80exgME9QqHkeLTyG88ZM=", + "checksumSHA1": "UPwhm+XWgDTDZ4wUziP+9RHOozg=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "20HMsQ2tH47zknjFIUQLi/ZOBvc=", + "checksumSHA1": "N1F3vRsnxAZyfr4v7iK+MagWuGU=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "K1s4cEA/LcK+NAZAFUDOr/dW9IY=", + "checksumSHA1": "Mc6WHGaAikP+uYx38VtKbl5KEYE=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "tU7rdC0LAUOKNp2uERUXi3hU1sQ=", + "checksumSHA1": "YZJXefe33AjqEWaIm8ufdQc0atE=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "Wvm1FT8oj2kKLBAdXUoFPERqll8=", + "checksumSHA1": "DHrIPXQ0QzjE+Hnfwk0INR4rUkU=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "45gdBZuM7PWLQzWuBasytvZZpK0=", + "checksumSHA1": "pvrqgHDeZ3gAHIiZyZfwXOi9GD4=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "skj7upwPc4zfJbYT+iPY+cmumG0=", + "checksumSHA1": "TpvdN/5q0qLBHZhQQlB4cyQOxR4=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "DfzNze8B3ME2tV3TtXP7eQXUjD0=", + "checksumSHA1": "zdG3e3bdyNaBuApO06pygeSJsJ4=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "Vqq049R2eveVD15emT9vKTyBsIg=", + "checksumSHA1": "zmOo5EeLSGFEuIBiRQsVd4+SBJ0=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "lAgaKbwpyflY7+t4V3EeH18RwgA=", + "checksumSHA1": "nlvFlqVKHyuyYHG88H3Yt/OA1e0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "shckWClBSciJH+cFYCY5kDCbBXI=", + "checksumSHA1": "AO97b1GChOs2geiFc//6YcpVfX8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "2dy15/1bnS80cwKZiwnEai1d7O8=", + "checksumSHA1": "jyxQ6TEdSl9/j7qC0LCkVMSXkog=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "998zv0rs9SBCd9EoAnIi9cKv7uo=", + "checksumSHA1": "lKyAXJ4S6uXuSR1/pQ9gCGHYSLI=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "/Oo64hSOdIKbN4dmZ7EAQRfr12w=", + "checksumSHA1": "eYt7GSKmi5G+h1R+Y1qIbs2Zn4o=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "mzoPurfrAAB102onq4FPlwZ5Bec=", + "checksumSHA1": "fMIOl6d85KmJyNfawhboRrknodA=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "yXPMyEsghtSFxu9AbiTFCzisGrQ=", + "checksumSHA1": "I1sxeu8aJOiM3a5/tnJya8blE3A=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "wU7VITDzy1ubXo+zrG4HNyl5GJI=", + "checksumSHA1": "AnipOpUAJroLkoknx4xacrO0qSA=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "kMMVqLsxKIzBQeDyWJ0N2U/PKLc=", + "checksumSHA1": "lAweYYdjcZ6acj6oI3HI9hX3eIQ=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "QuOSKqV8nFvvzN4wcsToltMFI1Y=", + "checksumSHA1": "X/WdGuHGMxRCvufmQxstVjdbFT4=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "vSNXu8VAbPuFoTTjtVEpldKDZHA=", + "checksumSHA1": "smOJ/rypXb18/Rjryf2a85paSa4=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "g5UtpGido/A6wsB7pDwY+RQ3Ha8=", + "checksumSHA1": "vL235vodhgG61BkUxRD4B7io+zk=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "/F1EdnLahy5V5+EjvRQ3C0JhIyw=", + "checksumSHA1": "kapXC7OZ1fnkZ3N6p19+WUafn40=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "p2x3SXLzi1PXnyMpPUJUntpS1hQ=", + "checksumSHA1": "Hi/sxx81pqe+fI5VrS5+UK2DsDU=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "/MR2uoycqymJLdO3Bu1pTkZCpDY=", + "checksumSHA1": "KidzwXO5VKKI9zIuTAUsuF7KxIM=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "XSHs3VHLi/mXGDN0zLO/NNCVpw4=", + "checksumSHA1": "HtsbSppcf5M5q+zrbhJqcFlVN5I=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" + }, + { + "checksumSHA1": "p1xuYwYaBe6v4ORN6IgBG3zQGrc=", + "path": "github.com/aws/aws-sdk-go/service/secretsmanager", + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "JrQMIue45k6Nk738T347pe9X0c0=", + "checksumSHA1": "cyCJGeDReKwRq69kTcd4lozkuIg=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "fmnQo2GajqI9eEn6tcEGiJ9A66E=", + "checksumSHA1": "NLj37wyUZIo8/Rp3zp+LDfr878M=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "j+R3E5MeBM87zbLVQhcuqlHsxes=", + "checksumSHA1": "nXAp7K8BCFvsaSdorGV7swBEQgA=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "u3AMeFxtHGtiJCxDeIm4dAwzBIc=", + "checksumSHA1": "q4qCE/5OiBJA1k8P0jQRx9UhKvs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "B3CgAFSREebpsFoFOo4vrQ6u04w=", + "checksumSHA1": "hAIPfcEcdc8xJ7MseIufmssdE/s=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "9Qj8yLl67q9uxBUCc0PT20YiP1M=", + "checksumSHA1": "1Fin0tclPDC/+rL7V06GrzXaMXI=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "XmEJe50M8MddNEkwbZoC+YvRjgg=", + "checksumSHA1": "T8ABBS2aS6yRTD6w3kjpgFLe/Zw=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "ULmsQAt5z5ZxGHZC/r7enBs1HvM=", + "checksumSHA1": "IHVhprySAcelCzbTU/eumCZNu1I=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "pfCrWb7hw3stOoiv7G7ALm2HCy8=", + "checksumSHA1": "llx3DydC0nTbF0cZoYUjO9P1eZw=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "Uw4pOUxSMbx4xBHUcOUkNhtnywE=", + "checksumSHA1": "i1yLjEKjcDxm0rakhcaDuAcQb7I=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "dBDZ2w/7ZEdk2UZ6PWFmk/cGSPw=", + "checksumSHA1": "Mf9nXjY0+Lq5RxEGEIYCYL8u+Kc=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "hOobCqlfwCl/iPGetELNIDsns1U=", + "checksumSHA1": "iRNs3RoLjrzcBsPrSynhbEqY/4s=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { - "checksumSHA1": "FVK4fHBkjOIaCRIY4DleqSKtZKs=", + "checksumSHA1": "z1UVKeq050lEoz9dgu/itKRc900=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "bb206ce0d6a50da7807694a823aed5c601c57ce0", - "revisionTime": "2018-03-28T22:21:06Z", - "version": "v1.13.23", - "versionExact": "v1.13.23" + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 1bc733627a355249d7200dbdd1c84ad83d53300d Mon Sep 17 00:00:00 2001 From: Ben Leggett Date: Wed, 4 Apr 2018 15:50:06 -0400 Subject: [PATCH 0396/3316] EmailMessageByLink should be limited to 20k characters --- aws/validators.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/validators.go b/aws/validators.go index a20a0321941..3fcbdb1b444 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1245,8 +1245,8 @@ func validateCognitoUserPoolTemplateEmailMessageByLink(v interface{}, k string) es = append(es, fmt.Errorf("%q cannot be less than 1 character", k)) } - if len(value) > 140 { - es = append(es, fmt.Errorf("%q cannot be longer than 140 characters", k)) + if len(value) > 20000 { + es = append(es, fmt.Errorf("%q cannot be longer than 20000 characters", k)) } if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{##[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*##\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`).MatchString(value) { From bd52d62f77fc8392665fe6701fb5817a87ffa745 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 15:51:15 -0400 Subject: [PATCH 0397/3316] Update CHANGELOG for #4046 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b96016857..b8fc075b371 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ENHANCEMENTS: * resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support [GH-2987] * resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] * resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] +* resource/aws_wafregional_rule: Validate all predicate types [GH-4046] BUG FIXES: From 7d4cca00ac105581f68222c536c91dcc6b28bce5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 15:12:55 -0500 Subject: [PATCH 0398/3316] Use AWS ARN structure directly - aws_cloudtrail_service_account and aws_redshift_service_account data sources. --- aws/arn.go | 26 ------------------- aws/arn_test.go | 13 ---------- ...a_source_aws_cloudtrail_service_account.go | 10 ++++++- ...ata_source_aws_redshift_service_account.go | 10 ++++++- 4 files changed, 18 insertions(+), 41 deletions(-) delete mode 100644 aws/arn.go delete mode 100644 aws/arn_test.go diff --git a/aws/arn.go b/aws/arn.go deleted file mode 100644 index de72a23eb70..00000000000 --- a/aws/arn.go +++ /dev/null @@ -1,26 +0,0 @@ -package aws - -import ( - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/iam" -) - -func arnString(partition, region, service, accountId, resource string) string { - return arn.ARN{ - Partition: partition, - Region: region, - Service: service, - AccountID: accountId, - Resource: resource, - }.String() -} - -// See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam -func iamArnString(partition, accountId, resource string) string { - return arnString( - partition, - "", - iam.ServiceName, - accountId, - resource) -} diff --git a/aws/arn_test.go b/aws/arn_test.go deleted file mode 100644 index 9d0505f033f..00000000000 --- a/aws/arn_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package aws - -import ( - "testing" -) - -func TestArn_iamRootUser(t *testing.T) { - arn := iamArnString("aws", "1234567890", "root") - expectedArn := "arn:aws:iam::1234567890:root" - if arn != expectedArn { - t.Fatalf("Expected ARN: %s, got: %s", expectedArn, arn) - } -} diff --git a/aws/data_source_aws_cloudtrail_service_account.go b/aws/data_source_aws_cloudtrail_service_account.go index b7129bbfa97..ababe3eb749 100644 --- a/aws/data_source_aws_cloudtrail_service_account.go +++ b/aws/data_source_aws_cloudtrail_service_account.go @@ -3,6 +3,7 @@ package aws import ( "fmt" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/hashicorp/terraform/helper/schema" ) @@ -51,7 +52,14 @@ func dataSourceAwsCloudTrailServiceAccountRead(d *schema.ResourceData, meta inte if accid, ok := cloudTrailServiceAccountPerRegionMap[region]; ok { d.SetId(accid) - d.Set("arn", iamArnString(meta.(*AWSClient).partition, accid, "root")) + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "iam", + AccountID: accid, + Resource: "root", + } + d.Set("arn", arn.String()) return nil } diff --git a/aws/data_source_aws_redshift_service_account.go b/aws/data_source_aws_redshift_service_account.go index d5db68d5502..31e72681889 100644 --- a/aws/data_source_aws_redshift_service_account.go +++ b/aws/data_source_aws_redshift_service_account.go @@ -3,6 +3,7 @@ package aws import ( "fmt" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/hashicorp/terraform/helper/schema" ) @@ -51,7 +52,14 @@ func dataSourceAwsRedshiftServiceAccountRead(d *schema.ResourceData, meta interf if accid, ok := redshiftServiceAccountPerRegionMap[region]; ok { d.SetId(accid) - d.Set("arn", iamArnString(meta.(*AWSClient).partition, accid, "user/logs")) + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "iam", + AccountID: accid, + Resource: "user/logs", + } + d.Set("arn", arn.String()) return nil } From db5deb62cd98873ab5661f7b818b5ce648f2f96b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 15:17:36 -0500 Subject: [PATCH 0399/3316] Use AWS ARN structure - aws_billing_service_account data source. --- aws/data_source_aws_billing_service_account.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/aws/data_source_aws_billing_service_account.go b/aws/data_source_aws_billing_service_account.go index e1425c4ffe5..8b8e8c2d744 100644 --- a/aws/data_source_aws_billing_service_account.go +++ b/aws/data_source_aws_billing_service_account.go @@ -1,8 +1,7 @@ package aws import ( - "fmt" - + "github.com/aws/aws-sdk-go/aws/arn" "github.com/hashicorp/terraform/helper/schema" ) @@ -24,7 +23,13 @@ func dataSourceAwsBillingServiceAccount() *schema.Resource { func dataSourceAwsBillingServiceAccountRead(d *schema.ResourceData, meta interface{}) error { d.SetId(billingAccountId) - d.Set("arn", fmt.Sprintf("arn:%s:iam::%s:root", meta.(*AWSClient).partition, billingAccountId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "iam", + AccountID: billingAccountId, + Resource: "root", + } + d.Set("arn", arn.String()) return nil } From 3fa64b7741765aa5aff89e10d2e1377cda97e5a9 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 15:26:34 -0500 Subject: [PATCH 0400/3316] Use AWS ARN structure - aws_elb_service_account data source. --- aws/data_source_aws_elb_service_account.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/aws/data_source_aws_elb_service_account.go b/aws/data_source_aws_elb_service_account.go index 795b41bd674..0350b528258 100644 --- a/aws/data_source_aws_elb_service_account.go +++ b/aws/data_source_aws_elb_service_account.go @@ -3,6 +3,7 @@ package aws import ( "fmt" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/hashicorp/terraform/helper/schema" ) @@ -54,7 +55,13 @@ func dataSourceAwsElbServiceAccountRead(d *schema.ResourceData, meta interface{} if accid, ok := elbAccountIdPerRegionMap[region]; ok { d.SetId(accid) - d.Set("arn", fmt.Sprintf("arn:%s:iam::%s:root", meta.(*AWSClient).partition, accid)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "iam", + AccountID: accid, + Resource: "root", + } + d.Set("arn", arn.String()) return nil } From e3ccb5b93006146519028e22a8c7c1beaf01b6bd Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 15:57:19 -0500 Subject: [PATCH 0401/3316] Use AWS ARN structure - aws_api_gateway_deployment and aws_lambda_function resources. --- aws/resource_aws_api_gateway_deployment.go | 13 ++++++++----- aws/resource_aws_lambda_function.go | 10 +++++++++- aws/structure.go | 15 --------------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/aws/resource_aws_api_gateway_deployment.go b/aws/resource_aws_api_gateway_deployment.go index 4e291b780e8..4d2fc10dcd4 100644 --- a/aws/resource_aws_api_gateway_deployment.go +++ b/aws/resource_aws_api_gateway_deployment.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/terraform/helper/resource" @@ -121,12 +122,14 @@ func resourceAwsApiGatewayDeploymentRead(d *schema.ResourceData, meta interface{ d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) - accountId := meta.(*AWSClient).accountid - arn, err := buildApiGatewayExecutionARN(restApiId, region, accountId) - if err != nil { - return err + executionArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "execute-api", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("%s/%s", restApiId, stageName), } - d.Set("execution_arn", arn+"/"+stageName) + d.Set("execution_arn", executionArn.String()) if err := d.Set("created_date", out.CreatedDate.Format(time.RFC3339)); err != nil { log.Printf("[DEBUG] Error setting created_date: %s", err) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index 2c1e565195d..16d3fb5e8a5 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -7,6 +7,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/lambda" "github.com/mitchellh/go-homedir" @@ -528,7 +529,14 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err d.Set("version", lastVersion) d.Set("qualified_arn", lastQualifiedArn) - d.Set("invoke_arn", buildLambdaInvokeArn(*function.FunctionArn, meta.(*AWSClient).region)) + invokeArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "apigateway", + Region: meta.(*AWSClient).region, + AccountID: "lambda", + Resource: fmt.Sprintf("path/2015-03-31/functions/%s/invocations", *function.FunctionArn), + } + d.Set("invoke_arn", invokeArn.String()) if getFunctionOutput.Concurrency != nil { d.Set("reserved_concurrent_executions", getFunctionOutput.Concurrency.ReservedConcurrentExecutions) diff --git a/aws/structure.go b/aws/structure.go index 0d176c5b45f..4cf4a123270 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -2111,15 +2111,6 @@ func buildApiGatewayInvokeURL(restApiId, region, stageName string) string { restApiId, region, stageName) } -func buildApiGatewayExecutionARN(restApiId, region, accountId string) (string, error) { - if accountId == "" { - return "", fmt.Errorf("Unable to build execution ARN for %s as account ID is missing", - restApiId) - } - return fmt.Sprintf("arn:aws:execute-api:%s:%s:%s", - region, accountId, restApiId), nil -} - func expandCognitoSupportedLoginProviders(config map[string]interface{}) map[string]*string { m := map[string]*string{} for k, v := range config { @@ -3155,12 +3146,6 @@ func flattenCognitoUserPoolVerificationMessageTemplate(s *cognitoidentityprovide return []map[string]interface{}{} } -func buildLambdaInvokeArn(lambdaArn, region string) string { - apiVersion := "2015-03-31" - return fmt.Sprintf("arn:aws:apigateway:%s:lambda:path/%s/functions/%s/invocations", - region, apiVersion, lambdaArn) -} - func sliceContainsMap(l []interface{}, m map[string]interface{}) (int, bool) { for i, t := range l { if reflect.DeepEqual(m, t.(map[string]interface{})) { From 4082c620e6158c246f921f2f4c3fe990a1ed9fb4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:00:54 -0500 Subject: [PATCH 0402/3316] Use AWS ARN structure - aws_s3_bucket data source. --- aws/data_source_aws_s3_bucket.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aws/data_source_aws_s3_bucket.go b/aws/data_source_aws_s3_bucket.go index 1303ae35a67..6620d2eb6f9 100644 --- a/aws/data_source_aws_s3_bucket.go +++ b/aws/data_source_aws_s3_bucket.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/terraform/helper/schema" ) @@ -63,7 +64,12 @@ func dataSourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { } d.SetId(bucket) - d.Set("arn", fmt.Sprintf("arn:%s:s3:::%s", meta.(*AWSClient).partition, bucket)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "s3", + Resource: bucket, + } + d.Set("arn", arn.String()) d.Set("bucket_domain_name", bucketDomainName(bucket)) if err := bucketLocation(d, bucket, conn); err != nil { From 01695da2f1f830462412b8252f6dd9ff4b15c4b7 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:02:44 -0500 Subject: [PATCH 0403/3316] Use AWS ARN structure - aws_s3_bucket resource. --- aws/resource_aws_s3_bucket.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 5f96382f35c..4154ed33736 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -11,6 +11,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/errwrap" @@ -1108,7 +1109,12 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { return err } - d.Set("arn", fmt.Sprintf("arn:%s:s3:::%s", meta.(*AWSClient).partition, d.Id())) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "s3", + Resource: d.Id(), + } + d.Set("arn", arn.String()) return nil } From d3d4e3cdead72f523787d8fb6fe9265b74c7d5d4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:07:33 -0500 Subject: [PATCH 0404/3316] Use AWS ARN structure - aws_security_group resource. --- aws/data_source_aws_security_group.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/aws/data_source_aws_security_group.go b/aws/data_source_aws_security_group.go index 7402c0ace88..7ac5e1775dc 100644 --- a/aws/data_source_aws_security_group.go +++ b/aws/data_source_aws_security_group.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" ) @@ -91,8 +92,14 @@ func dataSourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) er d.Set("description", sg.Description) d.Set("vpc_id", sg.VpcId) d.Set("tags", tagsToMap(sg.Tags)) - d.Set("arn", fmt.Sprintf("arn:%s:ec2:%s:%s:security-group/%s", - meta.(*AWSClient).partition, meta.(*AWSClient).region, *sg.OwnerId, *sg.GroupId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: *sg.OwnerId, + Resource: fmt.Sprintf("security-group/%s", *sg.GroupId), + } + d.Set("arn", arn.String()) return nil } From 980d7b421e7ed5ee55671e289fdc4c97b40406fd Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:31:20 -0500 Subject: [PATCH 0405/3316] Use AWS ARN structure - aws_cloudfront_origin_access_identity resource. --- aws/resource_aws_cloudfront_origin_access_identity.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_cloudfront_origin_access_identity.go b/aws/resource_aws_cloudfront_origin_access_identity.go index 2c405374143..2c296b2d3a3 100644 --- a/aws/resource_aws_cloudfront_origin_access_identity.go +++ b/aws/resource_aws_cloudfront_origin_access_identity.go @@ -5,6 +5,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/cloudfront" "github.com/hashicorp/terraform/helper/schema" ) @@ -81,8 +82,13 @@ func resourceAwsCloudFrontOriginAccessIdentityRead(d *schema.ResourceData, meta d.Set("etag", resp.ETag) d.Set("s3_canonical_user_id", resp.CloudFrontOriginAccessIdentity.S3CanonicalUserId) d.Set("cloudfront_access_identity_path", fmt.Sprintf("origin-access-identity/cloudfront/%s", *resp.CloudFrontOriginAccessIdentity.Id)) - d.Set("iam_arn", fmt.Sprintf("arn:%s:iam::cloudfront:user/CloudFront Origin Access Identity %s", - meta.(*AWSClient).partition, *resp.CloudFrontOriginAccessIdentity.Id)) + iamArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "iam", + AccountID: "cloudfront", + Resource: fmt.Sprintf("user/CloudFront Origin Access Identity %s", *resp.CloudFrontOriginAccessIdentity.Id), + } + d.Set("iam_arn", iamArn.String()) return nil } From f927e6a06110fc43e288254206328dad8c2b8959 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:37:02 -0500 Subject: [PATCH 0406/3316] Use AWS ARN structure - aws_ssm_document resource. --- aws/resource_aws_ssm_document.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_ssm_document.go b/aws/resource_aws_ssm_document.go index 1a062394fe8..3c99d6973cd 100644 --- a/aws/resource_aws_ssm_document.go +++ b/aws/resource_aws_ssm_document.go @@ -8,6 +8,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ssm" "github.com/hashicorp/errwrap" @@ -220,7 +221,13 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error d.Set("name", doc.Name) d.Set("owner", doc.Owner) d.Set("platform_types", flattenStringList(doc.PlatformTypes)) - if err := d.Set("arn", flattenAwsSsmDocumentArn(meta, doc.Name)); err != nil { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ssm", + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("document/%s", *doc.Name), + } + if err := d.Set("arn", arn.String()); err != nil { return fmt.Errorf("[DEBUG] Error setting arn error: %#v", err) } @@ -266,12 +273,6 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error return nil } -func flattenAwsSsmDocumentArn(meta interface{}, docName *string) string { - region := meta.(*AWSClient).region - - return fmt.Sprintf("arn:aws:ssm:%s::document/%s", region, *docName) -} - func resourceAwsSsmDocumentUpdate(d *schema.ResourceData, meta interface{}) error { if _, ok := d.GetOk("permissions"); ok { From c369510b8624fe2496b927345c68dededd25ca3a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:41:53 -0500 Subject: [PATCH 0407/3316] Use AWS ARN structure - aws_ses_domain_identity resource. --- aws/resource_aws_ses_domain_identity.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_ses_domain_identity.go b/aws/resource_aws_ses_domain_identity.go index e0f76916915..b32dd2dc289 100644 --- a/aws/resource_aws_ses_domain_identity.go +++ b/aws/resource_aws_ses_domain_identity.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ses" "github.com/hashicorp/terraform/helper/schema" ) @@ -85,7 +86,14 @@ func resourceAwsSesDomainIdentityRead(d *schema.ResourceData, meta interface{}) return nil } - d.Set("arn", fmt.Sprintf("arn:%s:ses:%s:%s:identity/%s", meta.(*AWSClient).partition, meta.(*AWSClient).region, meta.(*AWSClient).accountid, d.Id())) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ses", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("identity/%s", d.Id()), + } + d.Set("arn", arn.String()) d.Set("verification_token", verificationAttrs.VerificationToken) return nil } From 4489ed5cdb05f14d26d355b9c59985629f414865 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:46:36 -0500 Subject: [PATCH 0408/3316] Use AWS ARN structure - aws_redshift_subnet_group resource. --- aws/resource_aws_redshift_subnet_group.go | 30 +++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/aws/resource_aws_redshift_subnet_group.go b/aws/resource_aws_redshift_subnet_group.go index 3fe9563940b..2d51e3c56a0 100644 --- a/aws/resource_aws_redshift_subnet_group.go +++ b/aws/resource_aws_redshift_subnet_group.go @@ -6,6 +6,7 @@ import ( "regexp" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/redshift" "github.com/hashicorp/terraform/helper/schema" ) @@ -108,13 +109,16 @@ func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{} func resourceAwsRedshiftSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - arn, tagErr := buildRedshiftSubnetGroupARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if tagErr != nil { - return fmt.Errorf("Error building ARN for Redshift Subnet Group, not updating Tags for Subnet Group %s", d.Id()) - } else { - if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { - return tagErr - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "redshift", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("subnetgroup:%s", d.Id()), + }.String() + d.Set("arn", arn) + if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { + return tagErr } if d.HasChange("subnet_ids") || d.HasChange("description") { @@ -180,15 +184,3 @@ func validateRedshiftSubnetGroupName(v interface{}, k string) (ws []string, erro } return } - -func buildRedshiftSubnetGroupARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct Subnet Group ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct Subnet Group ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:redshift:%s:%s:subnetgroup:%s", partition, region, accountid, identifier) - return arn, nil - -} From 8ddc6eabc746f6e152f8768e0dde13a4c15c30c4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:50:16 -0500 Subject: [PATCH 0409/3316] Use AWS ARN structure - aws_redshift_cluster resource. --- aws/resource_aws_redshift_cluster.go | 32 +++++++++++----------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index 6af6a564717..302745ebd10 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -8,6 +8,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/redshift" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -622,15 +623,18 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).redshiftconn d.Partial(true) - arn, tagErr := buildRedshiftARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if tagErr != nil { - return fmt.Errorf("Error building ARN for Redshift Cluster, not updating Tags for cluster %s", d.Id()) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "redshift", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster:%s", d.Id()), + }.String() + d.Set("arn", arn) + if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { + return tagErr } else { - if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { - return tagErr - } else { - d.SetPartial("tags") - } + d.SetPartial("tags") } requestUpdate := false @@ -1065,15 +1069,3 @@ func validateRedshiftClusterMasterPassword(v interface{}, k string) (ws []string } return } - -func buildRedshiftARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct cluster ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct cluster ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:redshift:%s:%s:cluster:%s", partition, region, accountid, identifier) - return arn, nil - -} From fdf3a5e6eb5897d94e88a982e0d26f7c6af8b5bd Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:58:02 -0500 Subject: [PATCH 0410/3316] Use AWS ARN structure - aws_elasticache_cluster data source and resource. --- aws/data_source_aws_elasticache_cluster.go | 12 +++-- aws/resource_aws_elasticache_cluster.go | 62 ++++++++++------------ 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/aws/data_source_aws_elasticache_cluster.go b/aws/data_source_aws_elasticache_cluster.go index b50c65afb24..217530767c5 100644 --- a/aws/data_source_aws_elasticache_cluster.go +++ b/aws/data_source_aws_elasticache_cluster.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/elasticache" "github.com/hashicorp/terraform/helper/schema" ) @@ -212,10 +213,13 @@ func dataSourceAwsElastiCacheClusterRead(d *schema.ResourceData, meta interface{ return err } - arn, err := buildECARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - log.Printf("[DEBUG] Error building ARN for ElastiCache Cluster %s", *cluster.CacheClusterId) - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "elasticache", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster:%s", d.Id()), + }.String() d.Set("arn", arn) tagResp, err := conn.ListTagsForResource(&elasticache.ListTagsForResourceInput{ diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 140b3473ad8..6d822b301fd 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -9,6 +9,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/elasticache" gversion "github.com/hashicorp/go-version" @@ -520,24 +521,26 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) } // list tags for resource // set tags - arn, err := buildECARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - log.Printf("[DEBUG] Error building ARN for ElastiCache Cluster, not setting Tags for cluster %s", *c.CacheClusterId) - } else { - resp, err := conn.ListTagsForResource(&elasticache.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "elasticache", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster:%s", d.Id()), + }.String() + resp, err := conn.ListTagsForResource(&elasticache.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } - var et []*elasticache.Tag - if len(resp.TagList) > 0 { - et = resp.TagList - } - d.Set("tags", tagsToMapEC(et)) + var et []*elasticache.Tag + if len(resp.TagList) > 0 { + et = resp.TagList } + d.Set("tags", tagsToMapEC(et)) } return nil @@ -545,13 +548,16 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - arn, err := buildECARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - log.Printf("[DEBUG] Error building ARN for ElastiCache Cluster, not updating Tags for cluster %s", d.Id()) - } else { - if err := setTagsEC(conn, d, arn); err != nil { - return err - } + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "elasticache", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster:%s", d.Id()), + }.String() + if err := setTagsEC(conn, d, arn); err != nil { + return err } req := &elasticache.ModifyCacheClusterInput{ @@ -809,15 +815,3 @@ func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, give return c, *c.CacheClusterStatus, nil } } - -func buildECARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct ElastiCache ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct ElastiCache ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:elasticache:%s:%s:cluster:%s", partition, region, accountid, identifier) - return arn, nil - -} From 7423581e963eefc8158c6b940bd048ba5488274f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 16:59:50 -0500 Subject: [PATCH 0411/3316] Use AWS ARN structure - aws_redshift_cluster and aws_redshift_subnet_group; Corrections. --- aws/resource_aws_redshift_cluster.go | 1 - aws/resource_aws_redshift_subnet_group.go | 1 - 2 files changed, 2 deletions(-) diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index 302745ebd10..32a8253ebbc 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -630,7 +630,6 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) AccountID: meta.(*AWSClient).accountid, Resource: fmt.Sprintf("cluster:%s", d.Id()), }.String() - d.Set("arn", arn) if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { return tagErr } else { diff --git a/aws/resource_aws_redshift_subnet_group.go b/aws/resource_aws_redshift_subnet_group.go index 2d51e3c56a0..d0c6265e894 100644 --- a/aws/resource_aws_redshift_subnet_group.go +++ b/aws/resource_aws_redshift_subnet_group.go @@ -116,7 +116,6 @@ func resourceAwsRedshiftSubnetGroupUpdate(d *schema.ResourceData, meta interface AccountID: meta.(*AWSClient).accountid, Resource: fmt.Sprintf("subnetgroup:%s", d.Id()), }.String() - d.Set("arn", arn) if tagErr := setTagsRedshift(conn, d, arn); tagErr != nil { return tagErr } From c14bdab715cebcbe9575092812427d22949cada1 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 17:08:22 -0500 Subject: [PATCH 0412/3316] Use AWS ARN structure - aws_rds_cluster resource. --- aws/resource_aws_rds_cluster.go | 47 ++++++++++------------- aws/resource_aws_rds_cluster_test.go | 6 --- aws/resource_aws_redshift_cluster_test.go | 6 --- 3 files changed, 21 insertions(+), 38 deletions(-) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 10c3319ee09..bed87132ed7 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -8,6 +8,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" "github.com/hashicorp/terraform/helper/resource" @@ -627,13 +628,15 @@ func flattenAwsRdsClusterResource(d *schema.ResourceData, meta interface{}, dbc } // Fetch and save tags - arn, err := buildRDSClusterARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - log.Printf("[DEBUG] Error building ARN for RDS Cluster (%s), not setting Tags", *dbc.DBClusterIdentifier) - } else { - if err := saveTagsRDS(conn, d, arn); err != nil { - log.Printf("[WARN] Failed to save tags for RDS Cluster (%s): %s", *dbc.DBClusterIdentifier, err) - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster:%s", d.Id()), + }.String() + if err := saveTagsRDS(conn, d, arn); err != nil { + log.Printf("[WARN] Failed to save tags for RDS Cluster (%s): %s", *dbc.DBClusterIdentifier, err) } return nil @@ -734,12 +737,17 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error } } - if arn, err := buildRDSClusterARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster:%s", d.Id()), + }.String() + if err := setTagsRDS(conn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } return resourceAwsRDSClusterRead(d, meta) @@ -840,19 +848,6 @@ func resourceAwsRDSClusterStateRefreshFunc( } } -func buildRDSClusterARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS Cluster ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS Cluster ARN because of missing AWS Account ID") - } - - arn := fmt.Sprintf("arn:%s:rds:%s:%s:cluster:%s", partition, region, accountid, identifier) - return arn, nil - -} - func setIamRoleToRdsCluster(clusterIdentifier string, roleArn string, conn *rds.RDS) error { params := &rds.AddRoleToDBClusterInput{ DBClusterIdentifier: aws.String(clusterIdentifier), diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index 1fd1cbb3891..92c8475eb9c 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -367,12 +367,6 @@ func testAccCheckAWSClusterSnapshot(rInt int) resource.TestCheckFunc { awsClient := testAccProvider.Meta().(*AWSClient) conn := awsClient.rdsconn - arn, arnErr := buildRDSClusterARN(snapshot_identifier, awsClient.partition, awsClient.accountid, awsClient.region) - tagsARN := strings.Replace(arn, ":cluster:", ":snapshot:", 1) - if arnErr != nil { - return fmt.Errorf("Error building ARN for tags check with ARN (%s): %s", tagsARN, arnErr) - } - log.Printf("[INFO] Deleting the Snapshot %s", snapshot_identifier) _, snapDeleteErr := conn.DeleteDBClusterSnapshot( &rds.DeleteDBClusterSnapshotInput{ diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index 04af649ee6a..38f43eef44d 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -5,7 +5,6 @@ import ( "log" "math/rand" "regexp" - "strings" "testing" "time" @@ -503,11 +502,6 @@ func testAccCheckAWSRedshiftClusterSnapshot(rInt int) resource.TestCheckFunc { conn := testAccProvider.Meta().(*AWSClient).redshiftconn snapshot_identifier := fmt.Sprintf("tf-acctest-snapshot-%d", rInt) - arn, err := buildRedshiftARN(snapshot_identifier, testAccProvider.Meta().(*AWSClient).partition, testAccProvider.Meta().(*AWSClient).accountid, testAccProvider.Meta().(*AWSClient).region) - tagsARN := strings.Replace(arn, ":cluster:", ":snapshot:", 1) - if err != nil { - return fmt.Errorf("Error building ARN for tags check with ARN (%s): %s", tagsARN, err) - } log.Printf("[INFO] Deleting the Snapshot %s", snapshot_identifier) _, snapDeleteErr := conn.DeleteClusterSnapshot( From 47fbaa0ebc63bce68da75b08f83bdbe13ad2f67a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 14 Dec 2017 17:13:22 -0500 Subject: [PATCH 0413/3316] Use AWS ARN structure - aws_rds_cluster_parameter_group resource. --- ...esource_aws_rds_cluster_parameter_group.go | 68 ++++++++----------- 1 file changed, 29 insertions(+), 39 deletions(-) diff --git a/aws/resource_aws_rds_cluster_parameter_group.go b/aws/resource_aws_rds_cluster_parameter_group.go index b81504b0683..e2d7aad801f 100644 --- a/aws/resource_aws_rds_cluster_parameter_group.go +++ b/aws/resource_aws_rds_cluster_parameter_group.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" @@ -165,30 +166,26 @@ func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interf d.Set("parameter", flattenParameters(describeParametersResp.Parameters)) - paramGroup := describeResp.DBClusterParameterGroups[0] - arn, err := buildRDSCPGARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster-pg:%s", d.Id()), + }.String() + d.Set("arn", arn) + resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) if err != nil { - name := "" - if paramGroup.DBClusterParameterGroupName != nil && *paramGroup.DBClusterParameterGroupName != "" { - name = *paramGroup.DBClusterParameterGroupName - } - log.Printf("[DEBUG] Error building ARN for DB Cluster Parameter Group, not setting Tags for Cluster Param Group %s", name) - } else { - d.Set("arn", arn) - resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) + var dt []*rds.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList } + d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -242,12 +239,17 @@ func resourceAwsRDSClusterParameterGroupUpdate(d *schema.ResourceData, meta inte } } - if arn, err := buildRDSCPGARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(rdsconn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster-pg:%s", d.Id()), + }.String() + if err := setTagsRDS(rdsconn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } d.Partial(false) @@ -292,15 +294,3 @@ func resourceAwsRDSClusterParameterGroupDeleteRefreshFunc( return d, "destroyed", nil } } - -func buildRDSCPGARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS Cluster ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS Cluster ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:cluster-pg:%s", partition, region, accountid, identifier) - return arn, nil - -} From 31dd48733be33df198c914d286ea4d056436570f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 15 Dec 2017 17:04:09 -0500 Subject: [PATCH 0414/3316] Use AWS ARN structure - aws_db_parameter_group resource. --- aws/resource_aws_db_parameter_group.go | 69 +++++++++++--------------- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/aws/resource_aws_db_parameter_group.go b/aws/resource_aws_db_parameter_group.go index cbc00b4cfcb..aab4fe97d6a 100644 --- a/aws/resource_aws_db_parameter_group.go +++ b/aws/resource_aws_db_parameter_group.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" ) @@ -226,30 +227,27 @@ func resourceAwsDbParameterGroupRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error setting 'parameter' in state: %#v", err) } - paramGroup := describeResp.DBParameterGroups[0] - arn, err := buildRDSPGARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - name := "" - if paramGroup.DBParameterGroupName != nil && *paramGroup.DBParameterGroupName != "" { - name = *paramGroup.DBParameterGroupName - } - log.Printf("[DEBUG] Error building ARN for DB Parameter Group, not setting Tags for Param Group %s", name) - } else { - d.Set("arn", arn) - resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("pg:%s", d.Id()), + }.String() + d.Set("arn", arn) + resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) + var dt []*rds.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList } + d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -303,12 +301,17 @@ func resourceAwsDbParameterGroupUpdate(d *schema.ResourceData, meta interface{}) } } - if arn, err := buildRDSPGARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(rdsconn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("pg:%s", d.Id()), + }.String() + if err := setTagsRDS(rdsconn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } d.Partial(false) @@ -346,15 +349,3 @@ func resourceAwsDbParameterHash(v interface{}) int { return hashcode.String(buf.String()) } - -func buildRDSPGARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:pg:%s", partition, region, accountid, identifier) - return arn, nil - -} From 810d0592e373dfb8fd72b66ea15b433966d6816d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 15 Dec 2017 17:08:46 -0500 Subject: [PATCH 0415/3316] Use AWS ARN structure - aws_db_security_group resource. --- aws/resource_aws_db_security_group.go | 71 +++++++++++++-------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/aws/resource_aws_db_security_group.go b/aws/resource_aws_db_security_group.go index b9e73f2fb40..058a11ff40c 100644 --- a/aws/resource_aws_db_security_group.go +++ b/aws/resource_aws_db_security_group.go @@ -7,8 +7,10 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" @@ -176,29 +178,28 @@ func resourceAwsDbSecurityGroupRead(d *schema.ResourceData, meta interface{}) er d.Set("ingress", rules) conn := meta.(*AWSClient).rdsconn - arn, err := buildRDSSecurityGroupARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - name := "" - if sg.DBSecurityGroupName != nil && *sg.DBSecurityGroupName != "" { - name = *sg.DBSecurityGroupName - } - log.Printf("[DEBUG] Error building ARN for DB Security Group, not setting Tags for DB Security Group %s", name) - } else { - d.Set("arn", arn) - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("secgrp:%s", d.Id()), + }.String() + d.Set("arn", arn) + resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } + + var dt []*rds.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList } + d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -207,12 +208,18 @@ func resourceAwsDbSecurityGroupUpdate(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).rdsconn d.Partial(true) - if arn, err := buildRDSSecurityGroupARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("secgrp:%s", d.Id()), + }.String() + if err := setTagsRDS(conn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } if d.HasChange("ingress") { @@ -420,15 +427,3 @@ func resourceAwsDbSecurityGroupStateRefreshFunc( return v, "authorized", nil } } - -func buildRDSSecurityGroupARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:secgrp:%s", partition, region, accountid, identifier) - return arn, nil - -} From 28bea431017a3603162964cceed6789fe499d598 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 15 Dec 2017 17:13:17 -0500 Subject: [PATCH 0416/3316] Use AWS ARN structure - aws_db_option_group resource. --- aws/resource_aws_db_option_group.go | 69 +++++++++++++---------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/aws/resource_aws_db_option_group.go b/aws/resource_aws_db_option_group.go index 258572bb2e7..f84fbd3bd3f 100644 --- a/aws/resource_aws_db_option_group.go +++ b/aws/resource_aws_db_option_group.go @@ -8,8 +8,10 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -189,30 +191,27 @@ func resourceAwsDbOptionGroupRead(d *schema.ResourceData, meta interface{}) erro d.Set("option", flattenOptions(option.Options)) } - optionGroup := options.OptionGroupsList[0] - arn, err := buildRDSOptionGroupARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - name := "" - if optionGroup.OptionGroupName != nil && *optionGroup.OptionGroupName != "" { - name = *optionGroup.OptionGroupName - } - log.Printf("[DEBUG] Error building ARN for DB Option Group, not setting Tags for Option Group %s", name) - } else { - d.Set("arn", arn) - resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("og:%s", d.Id()), + }.String() + d.Set("arn", arn) + resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) + var dt []*rds.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList } + d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -284,12 +283,17 @@ func resourceAwsDbOptionGroupUpdate(d *schema.ResourceData, meta interface{}) er } - if arn, err := buildRDSOptionGroupARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(rdsconn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("og:%s", d.Id()), + }.String() + if err := setTagsRDS(rdsconn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } return resourceAwsDbOptionGroupRead(d, meta) @@ -355,14 +359,3 @@ func resourceAwsDbOptionHash(v interface{}) int { } return hashcode.String(buf.String()) } - -func buildRDSOptionGroupARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS Option Group ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS Option Group ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:og:%s", partition, region, accountid, identifier) - return arn, nil -} From c0e6efb4ab412607d66ff9269dc8ce2ce0634a2b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 15 Dec 2017 17:25:46 -0500 Subject: [PATCH 0417/3316] Use AWS ARN structure - aws_db_instance and aws_rds_cluster_instance resources. --- aws/resource_aws_db_instance.go | 69 +++++++++++------------- aws/resource_aws_db_instance_test.go | 14 ++--- aws/resource_aws_rds_cluster_instance.go | 31 +++++++---- aws/resource_aws_rds_cluster_test.go | 1 - 4 files changed, 60 insertions(+), 55 deletions(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 3ac4bcb8f6e..b2434659373 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -8,6 +8,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" @@ -777,29 +778,28 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { // list tags for resource // set tags conn := meta.(*AWSClient).rdsconn - arn, err := buildRDSARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - name := "" - if v.DBName != nil && *v.DBName != "" { - name = *v.DBName - } - log.Printf("[DEBUG] Error building ARN for DB Instance, not setting Tags for DB %s", name) - } else { - d.Set("arn", arn) - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("db:%s", d.Id()), + }.String() + d.Set("arn", arn) + resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } + + var dt []*rds.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList } + d.Set("tags", tagsToMapRDS(dt)) // Create an empty schema.Set to hold all vpc security group ids ids := &schema.Set{ @@ -1073,13 +1073,19 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error } } - if arn, err := buildRDSARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("db:%s", d.Id()), + }.String() + if err := setTagsRDS(conn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } + d.Partial(false) return resourceAwsDbInstanceRead(d, meta) @@ -1145,17 +1151,6 @@ func resourceAwsDbInstanceStateRefreshFunc(id string, conn *rds.RDS) resource.St } } -func buildRDSARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:db:%s", partition, region, accountid, identifier) - return arn, nil -} - // Database instance status: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Status.html var resourceAwsDbInstanceCreatePendingStates = []string{ "backing-up", diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index 3dddda15f11..ab07c980f34 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/terraform/terraform" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" ) @@ -609,12 +610,13 @@ func testAccCheckAWSDBInstanceSnapshot(rInt int) resource.TestCheckFunc { } } else { // snapshot was found, // verify we have the tags copied to the snapshot - instanceARN, err := buildRDSARN(snapshot_identifier, testAccProvider.Meta().(*AWSClient).partition, testAccProvider.Meta().(*AWSClient).accountid, testAccProvider.Meta().(*AWSClient).region) - // tags have a different ARN, just swapping :db: for :snapshot: - tagsARN := strings.Replace(instanceARN, ":db:", ":snapshot:", 1) - if err != nil { - return fmt.Errorf("Error building ARN for tags check with ARN (%s): %s", tagsARN, err) - } + tagsARN := arn.ARN{ + Partition: testAccProvider.Meta().(*AWSClient).partition, + Service: "rds", + Region: testAccProvider.Meta().(*AWSClient).region, + AccountID: testAccProvider.Meta().(*AWSClient).accountid, + Resource: fmt.Sprintf("snapshot:%s", snapshot_identifier), + }.String() resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ ResourceName: aws.String(tagsARN), }) diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index 3402f25613a..dbe2da3f163 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -7,7 +7,9 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -375,13 +377,15 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) } // Fetch and save tags - arn, err := buildRDSARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - log.Printf("[DEBUG] Error building ARN for RDS Cluster Instance (%s), not setting Tags", *db.DBInstanceIdentifier) - } else { - if err := saveTagsRDS(conn, d, arn); err != nil { - log.Printf("[WARN] Failed to save tags for RDS Cluster Instance (%s): %s", *db.DBClusterIdentifier, err) - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("db:%s", d.Id()), + }.String() + if err := saveTagsRDS(conn, d, arn); err != nil { + log.Printf("[WARN] Failed to save tags for RDS Cluster Instance (%s): %s", *db.DBClusterIdentifier, err) } return nil @@ -483,10 +487,15 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ } - if arn, err := buildRDSARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(conn, d, arn); err != nil { - return err - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("db:%s", d.Id()), + }.String() + if err := setTagsRDS(conn, d, arn); err != nil { + return err } return resourceAwsRDSClusterInstanceRead(d, meta) diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index 92c8475eb9c..cd1fdabea74 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -4,7 +4,6 @@ import ( "fmt" "log" "regexp" - "strings" "testing" "github.com/hashicorp/terraform/helper/acctest" From c71a73839d6783d52f806a2f609b7a5847bb26fa Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 15 Dec 2017 17:29:48 -0500 Subject: [PATCH 0418/3316] Use AWS ARN structure - aws_db_subnet_group resource. --- aws/resource_aws_db_subnet_group.go | 66 ++++++++++++++--------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/aws/resource_aws_db_subnet_group.go b/aws/resource_aws_db_subnet_group.go index c4e437beeb0..b46f5066e83 100644 --- a/aws/resource_aws_db_subnet_group.go +++ b/aws/resource_aws_db_subnet_group.go @@ -7,8 +7,10 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -147,25 +149,28 @@ func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) erro // list tags for resource // set tags conn := meta.(*AWSClient).rdsconn - arn, err := buildRDSsubgrpARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region) - if err != nil { - log.Printf("[DEBUG] Error building ARN for DB Subnet Group, not setting Tags for group %s", *subnetGroup.DBSubnetGroupName) - } else { - d.Set("arn", arn) - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - if err != nil { - log.Printf("[DEBUG] Error retreiving tags for ARN: %s", arn) - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("subgrp:%s", d.Id()), + }.String() + d.Set("arn", arn) + resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) + if err != nil { + log.Printf("[DEBUG] Error retreiving tags for ARN: %s", arn) + } + + var dt []*rds.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList } + d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -195,12 +200,17 @@ func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) er } } - if arn, err := buildRDSsubgrpARN(d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).accountid, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(conn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("subgrp:%s", d.Id()), + }.String() + if err := setTagsRDS(conn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } return resourceAwsDbSubnetGroupRead(d, meta) @@ -243,15 +253,3 @@ func resourceAwsDbSubnetGroupDeleteRefreshFunc( return d, "destroyed", nil } } - -func buildRDSsubgrpARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:subgrp:%s", partition, region, accountid, identifier) - return arn, nil - -} From 15e3d0cff7463638173c5a59bb35bc023c4a7689 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 15 Dec 2017 17:33:48 -0500 Subject: [PATCH 0419/3316] Use AWS ARN structure - aws_db_event_subscription resource. --- aws/resource_aws_db_event_subscription.go | 59 ++++++++++++----------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/aws/resource_aws_db_event_subscription.go b/aws/resource_aws_db_event_subscription.go index 4415bbcc1b2..d81e235b1eb 100644 --- a/aws/resource_aws_db_event_subscription.go +++ b/aws/resource_aws_db_event_subscription.go @@ -6,8 +6,10 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -155,23 +157,27 @@ func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{} // list tags for resource // set tags conn := meta.(*AWSClient).rdsconn - if arn, err := buildRDSEventSubscriptionARN(d.Get("customer_aws_id").(string), d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).region); err != nil { - log.Printf("[DEBUG] Error building ARN for RDS Event Subscription, not setting Tags for Event Subscription %s", *sub.CustSubscriptionId) - } else { - resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), - }) - if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: d.Get("customer_aws_id").(string), + Resource: fmt.Sprintf("subgrp:%s", d.Id()), + }.String() + resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList - } - d.Set("tags", tagsToMapRDS(dt)) + if err != nil { + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + } + + var dt []*rds.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList } + d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -265,12 +271,17 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface d.SetPartial("source_type") } - if arn, err := buildRDSEventSubscriptionARN(d.Get("customer_aws_id").(string), d.Id(), meta.(*AWSClient).partition, meta.(*AWSClient).region); err == nil { - if err := setTagsRDS(rdsconn, d, arn); err != nil { - return err - } else { - d.SetPartial("tags") - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "rds", + Region: meta.(*AWSClient).region, + AccountID: d.Get("customer_aws_id").(string), + Resource: fmt.Sprintf("subgrp:%s", d.Id()), + }.String() + if err := setTagsRDS(rdsconn, d, arn); err != nil { + return err + } else { + d.SetPartial("tags") } if d.HasChange("source_ids") { @@ -376,11 +387,3 @@ func resourceAwsDbEventSubscriptionRefreshFunc( return sub, *sub.Status, nil } } - -func buildRDSEventSubscriptionARN(customerAwsId, subscriptionId, partition, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS partition") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:es:%s", partition, region, customerAwsId, subscriptionId) - return arn, nil -} From fc35df4db36c16c5dfa960f8ad30bca46c3e0fec Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 15 Dec 2017 17:37:11 -0500 Subject: [PATCH 0420/3316] Use AWS ARN structure - aws_dms_replication_subnet_group resource. --- aws/resource_aws_dms_replication_subnet_group.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_dms_replication_subnet_group.go b/aws/resource_aws_dms_replication_subnet_group.go index b2816530808..a74ce44748a 100644 --- a/aws/resource_aws_dms_replication_subnet_group.go +++ b/aws/resource_aws_dms_replication_subnet_group.go @@ -5,7 +5,9 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/hashicorp/terraform/helper/schema" ) @@ -95,8 +97,14 @@ func resourceAwsDmsReplicationSubnetGroupRead(d *schema.ResourceData, meta inter // The AWS API for DMS subnet groups does not return the ARN which is required to // retrieve tags. This ARN can be built. - d.Set("replication_subnet_group_arn", fmt.Sprintf("arn:aws:dms:%s:%s:subgrp:%s", - meta.(*AWSClient).region, meta.(*AWSClient).accountid, d.Id())) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "dms", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("subgrp:%s", d.Id()), + }.String() + d.Set("replication_subnet_group_arn", arn) err = resourceAwsDmsReplicationSubnetGroupSetState(d, response.ReplicationSubnetGroups[0]) if err != nil { From 6eb6e1d6e1e0708d2a99fb00d64552f91ea93a92 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 19 Dec 2017 17:33:56 -0500 Subject: [PATCH 0421/3316] Consistent use of 'ARN.String()'. --- aws/data_source_aws_billing_service_account.go | 4 ++-- aws/data_source_aws_cloudtrail_service_account.go | 6 +++--- aws/data_source_aws_elb_service_account.go | 5 ++--- aws/data_source_aws_redshift_service_account.go | 6 +++--- aws/data_source_aws_s3_bucket.go | 4 ++-- aws/data_source_aws_security_group.go | 4 ++-- aws/resource_aws_api_gateway_deployment.go | 4 ++-- aws/resource_aws_cloudfront_origin_access_identity.go | 4 ++-- aws/resource_aws_lambda_function.go | 4 ++-- aws/resource_aws_s3_bucket.go | 4 ++-- aws/resource_aws_ses_domain_identity.go | 4 ++-- aws/resource_aws_ssm_document.go | 4 ++-- 12 files changed, 26 insertions(+), 27 deletions(-) diff --git a/aws/data_source_aws_billing_service_account.go b/aws/data_source_aws_billing_service_account.go index 8b8e8c2d744..03ec2f7c44e 100644 --- a/aws/data_source_aws_billing_service_account.go +++ b/aws/data_source_aws_billing_service_account.go @@ -28,8 +28,8 @@ func dataSourceAwsBillingServiceAccountRead(d *schema.ResourceData, meta interfa Service: "iam", AccountID: billingAccountId, Resource: "root", - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) return nil } diff --git a/aws/data_source_aws_cloudtrail_service_account.go b/aws/data_source_aws_cloudtrail_service_account.go index ababe3eb749..33574a033f3 100644 --- a/aws/data_source_aws_cloudtrail_service_account.go +++ b/aws/data_source_aws_cloudtrail_service_account.go @@ -52,14 +52,14 @@ func dataSourceAwsCloudTrailServiceAccountRead(d *schema.ResourceData, meta inte if accid, ok := cloudTrailServiceAccountPerRegionMap[region]; ok { d.SetId(accid) - arn := arn.ARN{ Partition: meta.(*AWSClient).partition, Service: "iam", AccountID: accid, Resource: "root", - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) + return nil } diff --git a/aws/data_source_aws_elb_service_account.go b/aws/data_source_aws_elb_service_account.go index 0350b528258..639ad733922 100644 --- a/aws/data_source_aws_elb_service_account.go +++ b/aws/data_source_aws_elb_service_account.go @@ -54,14 +54,13 @@ func dataSourceAwsElbServiceAccountRead(d *schema.ResourceData, meta interface{} if accid, ok := elbAccountIdPerRegionMap[region]; ok { d.SetId(accid) - arn := arn.ARN{ Partition: meta.(*AWSClient).partition, Service: "iam", AccountID: accid, Resource: "root", - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) return nil } diff --git a/aws/data_source_aws_redshift_service_account.go b/aws/data_source_aws_redshift_service_account.go index 31e72681889..b9a39c28af6 100644 --- a/aws/data_source_aws_redshift_service_account.go +++ b/aws/data_source_aws_redshift_service_account.go @@ -52,14 +52,14 @@ func dataSourceAwsRedshiftServiceAccountRead(d *schema.ResourceData, meta interf if accid, ok := redshiftServiceAccountPerRegionMap[region]; ok { d.SetId(accid) - arn := arn.ARN{ Partition: meta.(*AWSClient).partition, Service: "iam", AccountID: accid, Resource: "user/logs", - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) + return nil } diff --git a/aws/data_source_aws_s3_bucket.go b/aws/data_source_aws_s3_bucket.go index 6620d2eb6f9..6a678a75b5b 100644 --- a/aws/data_source_aws_s3_bucket.go +++ b/aws/data_source_aws_s3_bucket.go @@ -68,8 +68,8 @@ func dataSourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Partition: meta.(*AWSClient).partition, Service: "s3", Resource: bucket, - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) d.Set("bucket_domain_name", bucketDomainName(bucket)) if err := bucketLocation(d, bucket, conn); err != nil { diff --git a/aws/data_source_aws_security_group.go b/aws/data_source_aws_security_group.go index 7ac5e1775dc..80207dd1a6a 100644 --- a/aws/data_source_aws_security_group.go +++ b/aws/data_source_aws_security_group.go @@ -98,8 +98,8 @@ func dataSourceAwsSecurityGroupRead(d *schema.ResourceData, meta interface{}) er Region: meta.(*AWSClient).region, AccountID: *sg.OwnerId, Resource: fmt.Sprintf("security-group/%s", *sg.GroupId), - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) return nil } diff --git a/aws/resource_aws_api_gateway_deployment.go b/aws/resource_aws_api_gateway_deployment.go index 4d2fc10dcd4..2e9c557c357 100644 --- a/aws/resource_aws_api_gateway_deployment.go +++ b/aws/resource_aws_api_gateway_deployment.go @@ -128,8 +128,8 @@ func resourceAwsApiGatewayDeploymentRead(d *schema.ResourceData, meta interface{ Region: meta.(*AWSClient).region, AccountID: meta.(*AWSClient).accountid, Resource: fmt.Sprintf("%s/%s", restApiId, stageName), - } - d.Set("execution_arn", executionArn.String()) + }.String() + d.Set("execution_arn", executionArn) if err := d.Set("created_date", out.CreatedDate.Format(time.RFC3339)); err != nil { log.Printf("[DEBUG] Error setting created_date: %s", err) diff --git a/aws/resource_aws_cloudfront_origin_access_identity.go b/aws/resource_aws_cloudfront_origin_access_identity.go index 2c296b2d3a3..55585b0ff57 100644 --- a/aws/resource_aws_cloudfront_origin_access_identity.go +++ b/aws/resource_aws_cloudfront_origin_access_identity.go @@ -87,8 +87,8 @@ func resourceAwsCloudFrontOriginAccessIdentityRead(d *schema.ResourceData, meta Service: "iam", AccountID: "cloudfront", Resource: fmt.Sprintf("user/CloudFront Origin Access Identity %s", *resp.CloudFrontOriginAccessIdentity.Id), - } - d.Set("iam_arn", iamArn.String()) + }.String() + d.Set("iam_arn", iamArn) return nil } diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index 16d3fb5e8a5..5cf531bf869 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -535,8 +535,8 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err Region: meta.(*AWSClient).region, AccountID: "lambda", Resource: fmt.Sprintf("path/2015-03-31/functions/%s/invocations", *function.FunctionArn), - } - d.Set("invoke_arn", invokeArn.String()) + }.String() + d.Set("invoke_arn", invokeArn) if getFunctionOutput.Concurrency != nil { d.Set("reserved_concurrent_executions", getFunctionOutput.Concurrency.ReservedConcurrentExecutions) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 4154ed33736..235c6173fa3 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -1113,8 +1113,8 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Partition: meta.(*AWSClient).partition, Service: "s3", Resource: d.Id(), - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) return nil } diff --git a/aws/resource_aws_ses_domain_identity.go b/aws/resource_aws_ses_domain_identity.go index b32dd2dc289..84579dd3adf 100644 --- a/aws/resource_aws_ses_domain_identity.go +++ b/aws/resource_aws_ses_domain_identity.go @@ -92,8 +92,8 @@ func resourceAwsSesDomainIdentityRead(d *schema.ResourceData, meta interface{}) Region: meta.(*AWSClient).region, AccountID: meta.(*AWSClient).accountid, Resource: fmt.Sprintf("identity/%s", d.Id()), - } - d.Set("arn", arn.String()) + }.String() + d.Set("arn", arn) d.Set("verification_token", verificationAttrs.VerificationToken) return nil } diff --git a/aws/resource_aws_ssm_document.go b/aws/resource_aws_ssm_document.go index 3c99d6973cd..23f7facad9d 100644 --- a/aws/resource_aws_ssm_document.go +++ b/aws/resource_aws_ssm_document.go @@ -226,8 +226,8 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error Service: "ssm", Region: meta.(*AWSClient).region, Resource: fmt.Sprintf("document/%s", *doc.Name), - } - if err := d.Set("arn", arn.String()); err != nil { + }.String() + if err := d.Set("arn", arn); err != nil { return fmt.Errorf("[DEBUG] Error setting arn error: %#v", err) } From 68b28d96c56250eb33f6b2656976a45383e312f1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 16:08:53 -0400 Subject: [PATCH 0422/3316] Update CHANGELOG for #4051 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8fc075b371..b1c544ab4ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_cognito_user_pool: Fix `email_message_by_link` max length validation [GH-4051] * resource/aws_elasticache_replication_group: Properly set `cluster_mode` in state [GH-3932] * resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` [GH-3989] * resource/aws_lambda_function: IAM retry for "The role defined for the function cannot be assumed by Lambda" on update [GH-3988] From 3699a43db326daf1167e358686609db313267572 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 4 Apr 2018 16:25:16 -0400 Subject: [PATCH 0423/3316] resource_aws_ecs_service arn --- aws/resource_aws_ecs_service.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 7d8b74aba70..dd270ed05f5 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -9,6 +9,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ecs" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" @@ -217,13 +218,13 @@ func resourceAwsEcsServiceImport(d *schema.ResourceData, meta interface{}) ([]*s log.Printf("[DEBUG] Importing ECS service %s from cluster %s", name, cluster) d.SetId(name) - clusterArn := arnString( - meta.(*AWSClient).partition, - meta.(*AWSClient).region, - "ecs", - meta.(*AWSClient).accountid, - fmt.Sprintf("cluster/%s", cluster), - ) + clusterArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "ecs", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("cluster/%s", cluster), + }.String() d.Set("cluster", clusterArn) return []*schema.ResourceData{d}, nil } From 6c9ba02f0ca4d258b8fc4aaf51ca97679ff10370 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 16:26:32 -0400 Subject: [PATCH 0424/3316] Update CHANGELOG for #4032 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1c544ab4ea..2e154fa3d87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ BUG FIXES: * resource/aws_elasticache_replication_group: Properly set `cluster_mode` in state [GH-3932] * resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` [GH-3989] * resource/aws_lambda_function: IAM retry for "The role defined for the function cannot be assumed by Lambda" on update [GH-3988] +* resource/aws_lb: Suppress differences for non-applicable attributes [GH-4032] * resource/aws_route53_record: Fix ListResourceRecordSet pagination [GH-3900] ## 1.13.0 (March 28, 2018) From e00963afc751dfe89e3992f6a7d1fce38736810c Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Wed, 4 Apr 2018 16:45:59 -0400 Subject: [PATCH 0425/3316] add strings import --- aws/resource_aws_redshift_cluster_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index 38f43eef44d..1ab874af984 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -5,6 +5,7 @@ import ( "log" "math/rand" "regexp" + "strings" "testing" "time" From f34bce7fc557dd646577d541864d250e7f717f57 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 17:27:06 -0400 Subject: [PATCH 0426/3316] resource/aws_iam_role: Fix panic when using max_session_duration --- aws/resource_aws_iam_role.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index 57615514cff..31c0455d1ce 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -146,7 +146,7 @@ func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error { } if v, ok := d.GetOk("max_session_duration"); ok { - request.MaxSessionDuration = aws.Int64(v.(int64)) + request.MaxSessionDuration = aws.Int64(int64(v.(int))) } var createResp *iam.CreateRoleOutput From f0d174735d6d72e5c247e3bc2f08725bb747914b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 17:40:19 -0400 Subject: [PATCH 0427/3316] tests/resource/aws_iam_role: Fix max_session_duration acceptance testing --- aws/resource_aws_iam_role_test.go | 35 ++++++++++++++++++------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index 8cf97b3856b..dd286f7fb58 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -161,34 +161,39 @@ func TestAccAWSIAMRole_force_detach_policies(t *testing.T) { func TestAccAWSIAMRole_MaxSessionDuration(t *testing.T) { var conf iam.GetRoleOutput rName := acctest.RandString(10) + resourceName := "aws_iam_role.test" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, Steps: []resource.TestStep{ + { + Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 3599), + ExpectError: regexp.MustCompile(`expected max_session_duration to be in the range`), + }, + { + Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 43201), + ExpectError: regexp.MustCompile(`expected max_session_duration to be in the range`), + }, { Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 3700), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSRoleExists("aws_iam_role.test", &conf), - testAccAddAwsIAMRolePolicy("aws_iam_role.test"), + testAccCheckAWSRoleExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "max_session_duration", "3700"), ), }, { - Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 43201), + Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 3701), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSRoleExists("aws_iam_role.test", &conf), - testAccAddAwsIAMRolePolicy("aws_iam_role.test"), + testAccCheckAWSRoleExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "max_session_duration", "3701"), ), - ExpectError: regexp.MustCompile(`.*Max Session Duration: 43201`), }, { - Config: testAccCheckIAMRoleConfig_MaxSessionDuration(rName, 3599), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSRoleExists("aws_iam_role.test", &conf), - testAccAddAwsIAMRolePolicy("aws_iam_role.test"), - ), - ExpectError: regexp.MustCompile(`.*Max Session Duration: 3599`), + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -299,13 +304,13 @@ func testAccAddAwsIAMRolePolicy(n string) resource.TestCheckFunc { func testAccCheckIAMRoleConfig_MaxSessionDuration(rName string, maxSessionDuration int) string { return fmt.Sprintf(` -resource "aws_iam_role" "role" { +resource "aws_iam_role" "test" { name = "test-role-%s" path = "/" - max_session_duration = 3700 + max_session_duration = %d assume_role_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"ec2.amazonaws.com\"]},\"Action\":[\"sts:AssumeRole\"]}]}" } -`, rName) +`, rName, maxSessionDuration) } func testAccAWSIAMRoleConfig(rName string) string { From cbe07c0a9dcda0c3d12fb3bfa603c0869ac530d8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 17:44:57 -0400 Subject: [PATCH 0428/3316] Update CHANGELOG for #3977 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e154fa3d87..ef09b6fb17b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ENHANCEMENTS: * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] +* resource/aws_iam_role: Add `max_session_duration` argument [GH-3977] * resource/aws_kinesis_firehose_delivery_stream: Add Elasticsearch destination processing configuration support [GH-3621] * resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support [GH-2987] * resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] From 733367080995987ef69a57501d7ced550cb870cd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Apr 2018 18:09:40 -0400 Subject: [PATCH 0429/3316] Update CHANGELOG for #2883 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef09b6fb17b..7fa4c3538a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: ENHANCEMENTS: +* provider: Fallback to SDK default credential chain if credentials not found using provider credential chain [GH-2883] * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] * resource/aws_iam_role: Add `max_session_duration` argument [GH-3977] From 3f41ea6972fb44390416d4991ad3239c36b6aa1b Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Thu, 5 Apr 2018 12:14:52 +0900 Subject: [PATCH 0430/3316] review --- aws/resource_aws_ecs_service.go | 20 +++++++++++--------- aws/resource_aws_ecs_service_test.go | 12 +++++++----- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 380dc04a7bf..7de62c2c5d5 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -13,6 +13,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) var taskDefinitionRE = regexp.MustCompile("^([a-zA-Z0-9_-]+):([0-9]+)$") @@ -213,12 +214,14 @@ func resourceAwsEcsService() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "port": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 65536), }, "registry_arn": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, }, }, }, @@ -567,12 +570,11 @@ func flattenServiceRegistries(srs []*ecs.ServiceRegistry) []map[string]interface } results := make([]map[string]interface{}, 0) for _, sr := range srs { - c := make(map[string]interface{}) - if sr.Port != nil { - c["port"] = *sr.Port + c := map[string]interface{}{ + "registry_arn": aws.StringValue(sr.RegistryArn), } - if sr.RegistryArn != nil { - c["registry_arn"] = *sr.RegistryArn + if sr.Port != nil { + c["port"] = int(aws.Int64Value(sr.Port)) } results = append(results, c) } diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index a54dc51bdb7..27d4c87a7ec 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -102,6 +102,7 @@ func TestAccAWSEcsService_withARN(t *testing.T) { Config: testAccAWSEcsService(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "service_registries.#", "0"), ), }, @@ -109,6 +110,7 @@ func TestAccAWSEcsService_withARN(t *testing.T) { Config: testAccAWSEcsServiceModified(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "service_registries.#", "0"), ), }, }, @@ -1750,7 +1752,7 @@ resource "aws_service_discovery_service" "test" { name = "tf-acc-sd-%s" dns_config { namespace_id = "${aws_service_discovery_private_dns_namespace.test.id}" - dns_records { + dns_records { ttl = 5 type = "SRV" } @@ -1763,7 +1765,7 @@ resource "aws_ecs_cluster" "test" { resource "aws_ecs_task_definition" "test" { family = "%s" - network_mode = "awsvpc" + network_mode = "awsvpc" container_definitions = < Date: Thu, 5 Apr 2018 10:06:46 +0100 Subject: [PATCH 0431/3316] adding an example for using ssm run command --- .../r/cloudwatch_event_target.html.markdown | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/website/docs/r/cloudwatch_event_target.html.markdown b/website/docs/r/cloudwatch_event_target.html.markdown index c5180c31bb0..9e594401018 100644 --- a/website/docs/r/cloudwatch_event_target.html.markdown +++ b/website/docs/r/cloudwatch_event_target.html.markdown @@ -54,6 +54,94 @@ resource "aws_kinesis_stream" "test_stream" { } ``` +## Example Run Command Usage +``` +data "aws_iam_policy_document" "ssm_lifecycle_trust" { + statement { + actions = ["sts:AssumeRole"] + + principals { + type = "Service" + identifiers = ["events.amazonaws.com"] + } + } +} + +data "aws_iam_policy_document" "ssm_lifecycle" { + statement { + effect = "Allow" + actions = ["ssm:SendCommand"] + resources = ["arn:aws:ec2:eu-west-1:1234567890:instance/*"] + + condition { + test = "StringEquals" + variable = "ec2:ResourceTag/TerminationSchedule" + values = ["*"] + } + } + + statement { + effect = "Allow" + actions = ["ssm:SendCommand"] + resources = ["${aws_ssm_document.stop_instance.arn}"] + } +} + +resource "aws_iam_role" "ssm_lifecycle" { + name = "SSMLifecycle" + assume_role_policy = "${data.aws_iam_policy_document.ssm_lifecycle_trust.json}" +} + +resource "aws_iam_policy" "ssm_lifecycle" { + name = "SSMLifecycle" + policy = "${data.aws_iam_policy_document.ssm_lifecycle.json}" +} + +resource "aws_ssm_document" "stop_instance" { + name = "stop_instance" + document_type = "Command" + + content = < **Note:** `input` and `input_path` are mutually exclusive options. From f2b8297f1fe4e3dc42e720cb9762f82dbed25071 Mon Sep 17 00:00:00 2001 From: Will May Date: Thu, 5 Apr 2018 10:12:56 +0100 Subject: [PATCH 0432/3316] Add support for enabling Point in time recovery (PITR) for DynamoDB tables --- aws/resource_aws_dynamodb_table.go | 95 +++++++++++++++++++++ aws/resource_aws_dynamodb_table_test.go | 75 ++++++++++++++++ website/docs/r/dynamodb_table.html.markdown | 1 + 3 files changed, 171 insertions(+) diff --git a/aws/resource_aws_dynamodb_table.go b/aws/resource_aws_dynamodb_table.go index 25bd461e86d..4aff5c5a840 100644 --- a/aws/resource_aws_dynamodb_table.go +++ b/aws/resource_aws_dynamodb_table.go @@ -238,6 +238,10 @@ func resourceAwsDynamoDbTable() *schema.Resource { }, }, "tags": tagsSchema(), + "point_in_time_backup_enabled": { + Type: schema.TypeBool, + Optional: true, + }, }, } } @@ -448,6 +452,12 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er } } + if d.HasChange("point_in_time_backup_enabled") { + if err := updateDynamoDbPITR(d, conn); err != nil { + return err + } + } + return resourceAwsDynamoDbTableRead(d, meta) } @@ -491,6 +501,12 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro } d.Set("tags", tags) + backupEnabled, err := readDynamoDbPITR(d.Id(), conn) + if err != nil { + return err + } + d.Set("point_in_time_backup_enabled", backupEnabled) + return nil } @@ -608,6 +624,41 @@ func updateDynamoDbTimeToLive(d *schema.ResourceData, conn *dynamodb.DynamoDB) e return nil } +func updateDynamoDbPITR(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { + toEnable := d.Get("point_in_time_backup_enabled").(bool) + + input := &dynamodb.UpdateContinuousBackupsInput{ + TableName: aws.String(d.Id()), + PointInTimeRecoverySpecification: &dynamodb.PointInTimeRecoverySpecification{ + PointInTimeRecoveryEnabled: aws.Bool(toEnable), + }, + } + + log.Printf("[DEBUG] Updating DynamoDB point in time recovery status to %v", toEnable) + + err := resource.Retry(20*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateContinuousBackups(input) + if err != nil { + // Backups are still being enabled for this newly created table + if isAWSErr(err, dynamodb.ErrCodeContinuousBackupsUnavailableException, "Backups are being enabled") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return err + } + + if err := waitForDynamoDbBackupUpdateToBeCompleted(d.Id(), toEnable, conn); err != nil { + return fmt.Errorf("Error waiting for DynamoDB PITR update: %s", err) + } + + return nil +} + func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]string, error) { output, err := conn.ListTagsOfResource(&dynamodb.ListTagsOfResourceInput{ ResourceArn: aws.String(arn), @@ -623,6 +674,18 @@ func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]stri return result, nil } +func readDynamoDbPITR(table string, conn *dynamodb.DynamoDB) (bool, error) { + output, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ + TableName: aws.String(table), + }) + if err != nil { + return false, fmt.Errorf("Error reading backup status from dynamodb resource: %s", err) + } + + pitr := output.ContinuousBackupsDescription.PointInTimeRecoveryDescription + return *pitr.PointInTimeRecoveryStatus == dynamodb.PointInTimeRecoveryStatusEnabled, nil +} + // Waiters func waitForDynamoDbGSIToBeActive(tableName string, gsiName string, conn *dynamodb.DynamoDB) error { @@ -720,6 +783,38 @@ func waitForDynamoDbTableToBeActive(tableName string, timeout time.Duration, con return err } +func waitForDynamoDbBackupUpdateToBeCompleted(tableName string, toEnable bool, conn *dynamodb.DynamoDB) error { + var pending []string + target := []string{dynamodb.TimeToLiveStatusDisabled} + + if toEnable { + pending = []string{ + "ENABLING", + } + target = []string{dynamodb.PointInTimeRecoveryStatusEnabled} + } + + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: target, + Timeout: 10 * time.Second, + Refresh: func() (interface{}, string, error) { + result, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ + TableName: aws.String(tableName), + }) + if err != nil { + return 42, "", err + } + + pitr := result.ContinuousBackupsDescription.PointInTimeRecoveryDescription + + return result, *pitr.PointInTimeRecoveryStatus, nil + }, + } + _, err := stateConf.WaitForState() + return err +} + func waitForDynamoDbTtlUpdateToBeCompleted(tableName string, toEnable bool, conn *dynamodb.DynamoDB) error { pending := []string{ dynamodb.TimeToLiveStatusEnabled, diff --git a/aws/resource_aws_dynamodb_table_test.go b/aws/resource_aws_dynamodb_table_test.go index ab43f68a229..27b2384fa35 100644 --- a/aws/resource_aws_dynamodb_table_test.go +++ b/aws/resource_aws_dynamodb_table_test.go @@ -379,6 +379,33 @@ func TestAccAWSDynamoDbTable_extended(t *testing.T) { }) } +func TestAccAWSDynamoDbTable_enablePitr(t *testing.T) { + var conf dynamodb.DescribeTableOutput + + rName := acctest.RandomWithPrefix("TerraformTestTable-") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDynamoDbConfigInitialState(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckInitialAWSDynamoDbTableExists("aws_dynamodb_table.basic-dynamodb-table", &conf), + testAccCheckInitialAWSDynamoDbTableConf("aws_dynamodb_table.basic-dynamodb-table"), + ), + }, + { + Config: testAccAWSDynamoDbConfig_backup(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckDynamoDbTableHasBackup("aws_dynamodb_table.basic-dynamodb-table"), + ), + }, + }, + }) +} + func TestAccAWSDynamoDbTable_streamSpecification(t *testing.T) { var conf dynamodb.DescribeTableOutput @@ -937,6 +964,37 @@ func testAccCheckInitialAWSDynamoDbTableConf(n string) resource.TestCheckFunc { } } +func testAccCheckDynamoDbTableHasBackup(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No DynamoDB table name specified!") + } + + conn := testAccProvider.Meta().(*AWSClient).dynamodbconn + + resp, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ + TableName: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + pitr := resp.ContinuousBackupsDescription.PointInTimeRecoveryDescription + status := *pitr.PointInTimeRecoveryStatus + if status != dynamodb.PointInTimeRecoveryStatusEnabled { + return fmt.Errorf("Point in time backup had a status of %s rather than enabled", status) + } + + return nil + } +} + func testAccCheckDynamoDbTableWasUpdated(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -1038,6 +1096,23 @@ resource "aws_dynamodb_table" "basic-dynamodb-table" { `, rName) } +func testAccAWSDynamoDbConfig_backup(rName string) string { + return fmt.Sprintf(` +resource "aws_dynamodb_table" "basic-dynamodb-table" { + name = "%s" + read_capacity = 1 + write_capacity = 1 + hash_key = "TestTableHashKey" + + attribute { + name = "TestTableHashKey" + type = "S" + } + point_in_time_backup_enabled = true +} +`, rName) +} + func testAccAWSDynamoDbConfigInitialState(rName string) string { return fmt.Sprintf(` resource "aws_dynamodb_table" "basic-dynamodb-table" { diff --git a/website/docs/r/dynamodb_table.html.markdown b/website/docs/r/dynamodb_table.html.markdown index f796c915b54..8158887ba43 100644 --- a/website/docs/r/dynamodb_table.html.markdown +++ b/website/docs/r/dynamodb_table.html.markdown @@ -90,6 +90,7 @@ attributes, etc. * `stream_view_type` - (Optional) When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are `KEYS_ONLY`, `NEW_IMAGE`, `OLD_IMAGE`, `NEW_AND_OLD_IMAGES`. * `server_side_encryption` - (Optional) Encrypt at rest options. * `tags` - (Optional) A map of tags to populate on the created table. +* `point_in_time_backup_enabled` - (Optional) Indicates whether point-in-time recovery is enabled (true) or disabled (false) - note that it can take a while to enable for new tables. ### Timeouts From 7c797f76fe3707922cd8dd8fea43f0871700d2a4 Mon Sep 17 00:00:00 2001 From: Stephen Coe Date: Thu, 5 Apr 2018 10:23:30 +0100 Subject: [PATCH 0433/3316] correction to use RunCommand --- .../r/cloudwatch_event_target.html.markdown | 32 +++---------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/website/docs/r/cloudwatch_event_target.html.markdown b/website/docs/r/cloudwatch_event_target.html.markdown index 9e594401018..325d3f05591 100644 --- a/website/docs/r/cloudwatch_event_target.html.markdown +++ b/website/docs/r/cloudwatch_event_target.html.markdown @@ -54,7 +54,8 @@ resource "aws_kinesis_stream" "test_stream" { } ``` -## Example Run Command Usage +## Example SSM RunCommand Usage + ``` data "aws_iam_policy_document" "ssm_lifecycle_trust" { statement { @@ -83,7 +84,7 @@ data "aws_iam_policy_document" "ssm_lifecycle" { statement { effect = "Allow" actions = ["ssm:SendCommand"] - resources = ["${aws_ssm_document.stop_instance.arn}"] + resources = ["arn:aws:ssm:eu-west-1:*:document/AWS-RunShellScript"] } } @@ -97,31 +98,6 @@ resource "aws_iam_policy" "ssm_lifecycle" { policy = "${data.aws_iam_policy_document.ssm_lifecycle.json}" } -resource "aws_ssm_document" "stop_instance" { - name = "stop_instance" - document_type = "Command" - - content = < Date: Thu, 5 Apr 2018 10:26:59 +0100 Subject: [PATCH 0434/3316] revert to ssm --- .../r/cloudwatch_event_target.html.markdown | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/website/docs/r/cloudwatch_event_target.html.markdown b/website/docs/r/cloudwatch_event_target.html.markdown index 325d3f05591..47ca2cbf767 100644 --- a/website/docs/r/cloudwatch_event_target.html.markdown +++ b/website/docs/r/cloudwatch_event_target.html.markdown @@ -54,7 +54,7 @@ resource "aws_kinesis_stream" "test_stream" { } ``` -## Example SSM RunCommand Usage +## Example SSM Document Usage ``` data "aws_iam_policy_document" "ssm_lifecycle_trust" { @@ -76,7 +76,7 @@ data "aws_iam_policy_document" "ssm_lifecycle" { condition { test = "StringEquals" - variable = "ec2:ResourceTag/TerminationSchedule" + variable = "ec2:ResourceTag/Terminate" values = ["*"] } } @@ -84,7 +84,7 @@ data "aws_iam_policy_document" "ssm_lifecycle" { statement { effect = "Allow" actions = ["ssm:SendCommand"] - resources = ["arn:aws:ssm:eu-west-1:*:document/AWS-RunShellScript"] + resources = ["${aws_ssm_document.stop_instance.arn}"] } } @@ -98,6 +98,31 @@ resource "aws_iam_policy" "ssm_lifecycle" { policy = "${data.aws_iam_policy_document.ssm_lifecycle.json}" } +resource "aws_ssm_document" "stop_instance" { + name = "stop_instance" + document_type = "Command" + + content = < Date: Thu, 5 Apr 2018 10:37:54 +0100 Subject: [PATCH 0435/3316] adding RunCommand documentation along with ssm document --- .../r/cloudwatch_event_target.html.markdown | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/website/docs/r/cloudwatch_event_target.html.markdown b/website/docs/r/cloudwatch_event_target.html.markdown index 47ca2cbf767..91d48055150 100644 --- a/website/docs/r/cloudwatch_event_target.html.markdown +++ b/website/docs/r/cloudwatch_event_target.html.markdown @@ -143,6 +143,31 @@ resource "aws_cloudwatch_event_target" "stop_instances" { ``` +## Example RunCommand Usage + +``` + +resource "aws_cloudwatch_event_rule" "stop_instances" { + name = "StopInstance + description = "Stop instances nightly" + schedule_expression = "cron(0 0 * * ? *)" +} + +resource "aws_cloudwatch_event_target" "stop_instances" { + target_id = "StopInstance" + arn = "arn:aws:ssm:${var.aws_region}::document/AWS-RunShellScript" + input = "{\"commands\":[\"halt\"]}" + rule = "${aws_cloudwatch_event_rule.stop_instances.name}" + role_arn = "${aws_iam_role.ssm_lifecycle.arn}" + + run_command_targets { + key = "tag:Terminate" + values = ["midnight"] + } +} + +``` + ## Argument Reference -> **Note:** `input` and `input_path` are mutually exclusive options. From 4083995f74d4c5d530e4ece1012a96e5dcf31067 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 09:14:06 -0400 Subject: [PATCH 0436/3316] tests/resource/aws_subnet: Fix indentation from merge conflict --- aws/resource_aws_subnet_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index 033844c2246..1ed71e04a11 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -24,7 +24,7 @@ func init() { "aws_batch_compute_environment", "aws_beanstalk_environment", "aws_db_instance", - "aws_elasticache_cluster", + "aws_elasticache_cluster", "aws_elasticache_replication_group", "aws_elasticsearch_domain", "aws_elb", From 1f4d2caa614fe0870695fcf59f9de3dd5b853d2b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 09:32:12 -0400 Subject: [PATCH 0437/3316] waf: Ensure RegexMatch predicate type is consistently supported and documented --- aws/resource_aws_wafregional_rule.go | 14 +++----------- aws/validators.go | 7 ++++--- website/docs/r/waf_rate_based_rule.html.markdown | 4 +++- website/docs/r/waf_rule.html.markdown | 5 +++-- .../r/wafregional_rate_based_rule.html.markdown | 4 +++- website/docs/r/wafregional_rule.html.markdown | 2 +- 6 files changed, 17 insertions(+), 19 deletions(-) diff --git a/aws/resource_aws_wafregional_rule.go b/aws/resource_aws_wafregional_rule.go index 10de0664f97..46146d0c636 100644 --- a/aws/resource_aws_wafregional_rule.go +++ b/aws/resource_aws_wafregional_rule.go @@ -45,17 +45,9 @@ func resourceAwsWafRegionalRule() *schema.Resource { ValidateFunc: validation.StringLenBetween(1, 128), }, "type": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - wafregional.PredicateTypeByteMatch, - wafregional.PredicateTypeGeoMatch, - wafregional.PredicateTypeIpmatch, - wafregional.PredicateTypeRegexMatch, - wafregional.PredicateTypeSizeConstraint, - wafregional.PredicateTypeSqlInjectionMatch, - wafregional.PredicateTypeXssMatch, - }, false), + Type: schema.TypeString, + Required: true, + ValidateFunc: validateWafPredicatesType(), }, }, }, diff --git a/aws/validators.go b/aws/validators.go index 3fcbdb1b444..61015e4eea8 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1397,12 +1397,13 @@ func validateWafMetricName(v interface{}, k string) (ws []string, errors []error func validateWafPredicatesType() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ - waf.PredicateTypeIpmatch, waf.PredicateTypeByteMatch, - waf.PredicateTypeSqlInjectionMatch, + waf.PredicateTypeGeoMatch, + waf.PredicateTypeIpmatch, + waf.PredicateTypeRegexMatch, waf.PredicateTypeSizeConstraint, + waf.PredicateTypeSqlInjectionMatch, waf.PredicateTypeXssMatch, - waf.PredicateTypeGeoMatch, }, false) } diff --git a/website/docs/r/waf_rate_based_rule.html.markdown b/website/docs/r/waf_rate_based_rule.html.markdown index 4f89e6c3eac..e479c1a5767 100644 --- a/website/docs/r/waf_rate_based_rule.html.markdown +++ b/website/docs/r/waf_rate_based_rule.html.markdown @@ -52,6 +52,8 @@ The following arguments are supported: ### `predicates` +See the [WAF Documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_Predicate.html) for more information. + #### Arguments * `negated` - (Required) Set this to `false` if you want to allow, block, or count requests @@ -59,7 +61,7 @@ The following arguments are supported: For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address. If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses _except_ `192.0.2.44`. * `data_id` - (Required) A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID. -* `type` - (Required) The type of predicate in a rule, such as `ByteMatchSet` or `IPSet` +* `type` - (Required) The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`. ## Remarks diff --git a/website/docs/r/waf_rule.html.markdown b/website/docs/r/waf_rule.html.markdown index 7c3eef74ddc..5422c458d90 100644 --- a/website/docs/r/waf_rule.html.markdown +++ b/website/docs/r/waf_rule.html.markdown @@ -47,6 +47,8 @@ The following arguments are supported: ### `predicates` +See the [WAF Documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_Predicate.html) for more information. + #### Arguments * `negated` - (Required) Set this to `false` if you want to allow, block, or count requests @@ -54,8 +56,7 @@ The following arguments are supported: For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address. If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses _except_ `192.0.2.44`. * `data_id` - (Required) A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID. -* `type` - (Required) The type of predicate in a rule. Valid value is one of `ByteMatch`, `IPMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`. - See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_Predicate.html) for all supported values. +* `type` - (Required) The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`. ## Remarks diff --git a/website/docs/r/wafregional_rate_based_rule.html.markdown b/website/docs/r/wafregional_rate_based_rule.html.markdown index 16b165c52f4..5878a56f004 100644 --- a/website/docs/r/wafregional_rate_based_rule.html.markdown +++ b/website/docs/r/wafregional_rate_based_rule.html.markdown @@ -52,6 +52,8 @@ The following arguments are supported: ### `predicate` +See the [WAF Documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_Predicate.html) for more information. + #### Arguments * `negated` - (Required) Set this to `false` if you want to allow, block, or count requests @@ -59,7 +61,7 @@ The following arguments are supported: For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address. If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses _except_ `192.0.2.44`. * `data_id` - (Required) A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID. -* `type` - (Required) The type of predicate in a rule, such as `ByteMatchSet` or `IPSet` +* `type` - (Required) The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`. ## Attributes Reference diff --git a/website/docs/r/wafregional_rule.html.markdown b/website/docs/r/wafregional_rule.html.markdown index 828d36c98a9..852790fcacd 100644 --- a/website/docs/r/wafregional_rule.html.markdown +++ b/website/docs/r/wafregional_rule.html.markdown @@ -46,7 +46,7 @@ The following arguments are supported: ### `predicate` -See [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-rule-predicates.html) +See the [WAF Documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_Predicate.html) for more information. #### Arguments From 5b9bc4f3e9a01c451062ca64b35901d46a05c968 Mon Sep 17 00:00:00 2001 From: Max Fortun Date: Wed, 1 Nov 2017 09:41:11 -0400 Subject: [PATCH 0438/3316] Added support for no_device --- aws/resource_aws_launch_configuration.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index f95b7f0f0ab..9a036455e3a 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -158,6 +158,12 @@ func resourceAwsLaunchConfiguration() *schema.Resource { ForceNew: true, }, + "no_device": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "iops": { Type: schema.TypeInt, Optional: true, @@ -338,8 +344,10 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface vL := v.(*schema.Set).List() for _, v := range vL { bd := v.(map[string]interface{}) - ebs := &autoscaling.Ebs{ - DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), + ebs := &autoscaling.Ebs{} + + if v, ok := bd["no_device"].(bool); !ok && v { + ebs.DeleteOnTermination = aws.Bool(bd["delete_on_termination"].(bool)) } if v, ok := bd["snapshot_id"].(string); ok && v != "" { @@ -368,6 +376,7 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface blockDevices = append(blockDevices, &autoscaling.BlockDeviceMapping{ DeviceName: aws.String(bd["device_name"].(string)), + NoDevice: aws.Bool(bd["no_device"].(bool)), Ebs: ebs, }) } From 0c2b80dbfa16e461c5cf19c2a32f194ea581ee79 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 5 Apr 2018 13:28:39 +0100 Subject: [PATCH 0439/3316] Add acceptance test & reflect new field in Read() --- aws/resource_aws_launch_configuration.go | 34 +++++++++++-- aws/resource_aws_launch_configuration_test.go | 49 ++++++++++++++++++- 2 files changed, 78 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index 9a036455e3a..d6c05610dee 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -346,7 +346,10 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface bd := v.(map[string]interface{}) ebs := &autoscaling.Ebs{} - if v, ok := bd["no_device"].(bool); !ok && v { + var noDevice *bool + if v, ok := bd["no_device"].(bool); ok && v { + noDevice = aws.Bool(v) + } else { ebs.DeleteOnTermination = aws.Bool(bd["delete_on_termination"].(bool)) } @@ -376,8 +379,8 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface blockDevices = append(blockDevices, &autoscaling.BlockDeviceMapping{ DeviceName: aws.String(bd["device_name"].(string)), - NoDevice: aws.Bool(bd["no_device"].(bool)), Ebs: ebs, + NoDevice: noDevice, }) } } @@ -589,11 +592,33 @@ func readBlockDevicesFromLaunchConfiguration(d *schema.ResourceData, lc *autosca var blank string rootDeviceName = &blank } + + // Collect existing configured devices, so we can check + // existing value of delete_on_termination below + existingEbsBlockDevices := make(map[string]map[string]interface{}, 0) + if v, ok := d.GetOk("ebs_block_device"); ok { + ebsBlocks := v.(*schema.Set) + for _, ebd := range ebsBlocks.List() { + m := ebd.(map[string]interface{}) + deviceName := m["device_name"].(string) + existingEbsBlockDevices[deviceName] = m + } + } + for _, bdm := range lc.BlockDeviceMappings { bd := make(map[string]interface{}) - if bdm.Ebs != nil && bdm.Ebs.DeleteOnTermination != nil { + + if bdm.NoDevice != nil { + // Keep existing value in place to avoid spurious diff + deleteOnTermination := true + if device, ok := existingEbsBlockDevices[*bdm.DeviceName]; ok { + deleteOnTermination = device["delete_on_termination"].(bool) + } + bd["delete_on_termination"] = deleteOnTermination + } else if bdm.Ebs != nil && bdm.Ebs.DeleteOnTermination != nil { bd["delete_on_termination"] = *bdm.Ebs.DeleteOnTermination } + if bdm.Ebs != nil && bdm.Ebs.VolumeSize != nil { bd["volume_size"] = *bdm.Ebs.VolumeSize } @@ -620,6 +645,9 @@ func readBlockDevicesFromLaunchConfiguration(d *schema.ResourceData, lc *autosca if bdm.Ebs != nil && bdm.Ebs.SnapshotId != nil { bd["snapshot_id"] = *bdm.Ebs.SnapshotId } + if bdm.NoDevice != nil { + bd["no_device"] = *bdm.NoDevice + } blockDevices["ebs"] = append(blockDevices["ebs"].([]map[string]interface{}), bd) } } diff --git a/aws/resource_aws_launch_configuration_test.go b/aws/resource_aws_launch_configuration_test.go index c869d427a78..e250d7884ce 100644 --- a/aws/resource_aws_launch_configuration_test.go +++ b/aws/resource_aws_launch_configuration_test.go @@ -281,7 +281,7 @@ func TestAccAWSLaunchConfiguration_updateEbsBlockDevices(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), resource.TestCheckResourceAttr( - "aws_launch_configuration.baz", "ebs_block_device.2764618555.volume_size", "9"), + "aws_launch_configuration.baz", "ebs_block_device.1393547169.volume_size", "9"), ), }, { @@ -289,7 +289,29 @@ func TestAccAWSLaunchConfiguration_updateEbsBlockDevices(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), resource.TestCheckResourceAttr( - "aws_launch_configuration.baz", "ebs_block_device.3859927736.volume_size", "10"), + "aws_launch_configuration.baz", "ebs_block_device.4131155854.volume_size", "10"), + ), + }, + }, + }) +} + +func TestAccAWSLaunchConfiguration_ebs_noDevice(t *testing.T) { + var conf autoscaling.LaunchConfiguration + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchConfigurationConfigEbsNoDevice(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "ebs_block_device.#", "1"), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "ebs_block_device.3099842682.device_name", "/dev/sda2"), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "ebs_block_device.3099842682.no_device", "true"), ), }, }, @@ -608,3 +630,26 @@ resource "aws_launch_configuration" "bar" { } `, rInt) } + +func testAccAWSLaunchConfigurationConfigEbsNoDevice(rInt int) string { + return fmt.Sprintf(` +data "aws_ami" "ubuntu" { + most_recent = true + filter { + name = "name" + values = ["ubuntu/images/ebs/ubuntu-precise-12.04-i386-server-*"] + } + owners = ["099720109477"] # Canonical +} + +resource "aws_launch_configuration" "bar" { + name_prefix = "tf-acc-test-%d" + image_id = "${data.aws_ami.ubuntu.id}" + instance_type = "m1.small" + ebs_block_device { + device_name = "/dev/sda2" + no_device = true + } +} +`, rInt) +} From 221b94428206309c360fc75f4046bde8013c61aa Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Thu, 5 Apr 2018 16:58:49 +0200 Subject: [PATCH 0440/3316] Add aws_directory_service_conditional_forwarder resource --- aws/provider.go | 1 + ...directory_service_conditional_forwarder.go | 153 ++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 aws/resource_aws_directory_service_conditional_forwarder.go diff --git a/aws/provider.go b/aws/provider.go index a10026ffeed..aed0940ffc0 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -329,6 +329,7 @@ func Provider() terraform.ResourceProvider { "aws_db_subnet_group": resourceAwsDbSubnetGroup(), "aws_devicefarm_project": resourceAwsDevicefarmProject(), "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), + "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), "aws_dms_certificate": resourceAwsDmsCertificate(), "aws_dms_endpoint": resourceAwsDmsEndpoint(), "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), diff --git a/aws/resource_aws_directory_service_conditional_forwarder.go b/aws/resource_aws_directory_service_conditional_forwarder.go new file mode 100644 index 00000000000..5b24dc9440b --- /dev/null +++ b/aws/resource_aws_directory_service_conditional_forwarder.go @@ -0,0 +1,153 @@ +package aws + +import ( + "fmt" + "regexp" + "strings" + + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directoryservice" +) + +func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDirectoryServiceConditionalForwarderCreate, + Read: resourceAwsDirectoryServiceConditionalForwarderRead, + Update: resourceAwsDirectoryServiceConditionalForwarderUpdate, + Delete: resourceAwsDirectoryServiceConditionalForwarderDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "directory_id": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "dns_ips": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + MinItems: 1, + Set: schema.HashString, + Elem: &schema.Schema{ + Type: schema.TypeString, + //ValidateFunc: validation.SingleIP(), + }, + }, + + "domain_name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+[.]?$"), "'domain_name' is incorrect"), + }, + }, + } +} + +func resourceAwsDirectoryServiceConditionalForwarderCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + var dnsIps []*string + for _, ip := range d.Get("dns_ips").(*schema.Set).List() { + dnsIps = append(dnsIps, aws.String(ip.(string))) + } + + directoryId := d.Get("directory_id").(string) + domainName := d.Get("domain_name").(string) + + _, err := conn.CreateConditionalForwarder(&directoryservice.CreateConditionalForwarderInput{ + DirectoryId: aws.String(directoryId), + DnsIpAddrs: dnsIps, + RemoteDomainName: aws.String(domainName), + }) + + if err != nil { + return err + } + + d.SetId(fmt.Sprintf("%s:%s", directoryId, domainName)) + + return nil +} + +func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + parts := strings.SplitN(d.Id(), ":", 2) + + if len(parts) != 2 { + return fmt.Errorf("Incorrect id %q, expecting DIRECTORY_ID:DOMAIN_NAME", d.Id()) + } + + directoryId, domainName := parts[0], parts[1] + + res, err := conn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ + DirectoryId: aws.String(directoryId), + RemoteDomainNames: []*string{aws.String(domainName)}, + }) + + if err != nil { + if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { + d.SetId("") + return nil + } + return err + } + + if len(res.ConditionalForwarders) == 0 { + d.SetId("") + return nil + } + + cfd := res.ConditionalForwarders[0] + + d.Set("dns_ips", schema.NewSet(schema.HashString, flattenStringList(cfd.DnsIpAddrs))) + d.Set("directory_id", directoryId) + d.Set("domain_name", *cfd.RemoteDomainName) + + return nil +} + +func resourceAwsDirectoryServiceConditionalForwarderUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + var dnsIps []*string + for _, ip := range d.Get("dns_ips").(*schema.Set).List() { + dnsIps = append(dnsIps, aws.String(ip.(string))) + } + + _, err := conn.UpdateConditionalForwarder(&directoryservice.UpdateConditionalForwarderInput{ + DirectoryId: aws.String(d.Get("directory_id").(string)), + DnsIpAddrs: dnsIps, + RemoteDomainName: aws.String(d.Get("domain_name").(string)), + }) + + if err != nil { + return err + } + + return resourceAwsDirectoryServiceConditionalForwarderRead(d, meta) +} + +func resourceAwsDirectoryServiceConditionalForwarderDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dsconn + + _, err := conn.DeleteConditionalForwarder(&directoryservice.DeleteConditionalForwarderInput{ + DirectoryId: aws.String(d.Get("directory_id").(string)), + RemoteDomainName: aws.String(d.Get("domain_name").(string)), + }) + + if err != nil && !isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { + return err + } + + d.SetId("") + return nil +} From b2ace09d16bbda1c399ae257a6b4206fa72b4a13 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 11:04:12 -0400 Subject: [PATCH 0441/3316] tests/resource/aws_lb: Remove missing attribute from TestAccAWSLBBackwardsCompatibility --- aws/resource_aws_lb_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index c5b91b52406..2cac8f25088 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -158,7 +158,6 @@ func TestAccAWSLBBackwardsCompatibility(t *testing.T) { resource.TestCheckResourceAttr("aws_alb.lb_test", "tags.%", "1"), resource.TestCheckResourceAttr("aws_alb.lb_test", "tags.Name", "TestAccAWSALB_basic"), resource.TestCheckResourceAttr("aws_alb.lb_test", "enable_deletion_protection", "false"), - resource.TestCheckResourceAttr("aws_alb.lb_test", "enable_cross_zone_load_balancing", "false"), resource.TestCheckResourceAttr("aws_alb.lb_test", "idle_timeout", "30"), resource.TestCheckResourceAttr("aws_alb.lb_test", "ip_address_type", "ipv4"), resource.TestCheckResourceAttr("aws_alb.lb_test", "load_balancer_type", "application"), From e2a19922e71d4f219903f03fb796cc19acd3c28d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 12:50:58 -0400 Subject: [PATCH 0442/3316] Update CHANGELOG for #4041 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fa4c3538a4..7dcba63a3a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_cognito_user_pool: Trim `custom:` prefix of `developer_only_attribute = false` schema attributes [GH-4041] * resource/aws_cognito_user_pool: Fix `email_message_by_link` max length validation [GH-4051] * resource/aws_elasticache_replication_group: Properly set `cluster_mode` in state [GH-3932] * resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` [GH-3989] From 216c26e8db0ee40620c18cf977fe58d9bb50a9a7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 12:52:59 -0400 Subject: [PATCH 0443/3316] Update CHANGELOG for #3961 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dcba63a3a7..8dddfbc6a13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ BUG FIXES: * resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` [GH-3989] * resource/aws_lambda_function: IAM retry for "The role defined for the function cannot be assumed by Lambda" on update [GH-3988] * resource/aws_lb: Suppress differences for non-applicable attributes [GH-4032] +* resource/aws_rds_cluster_instance: Prevent crash on importing non-cluster instances [GH-3961] * resource/aws_route53_record: Fix ListResourceRecordSet pagination [GH-3900] ## 1.13.0 (March 28, 2018) From f103137a5e069b52eb2c82667eeec23448e63720 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 12:57:06 -0400 Subject: [PATCH 0444/3316] Update CHANGELOG for #4047 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dddfbc6a13..c51a45d3bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ BUG FIXES: * resource/aws_cognito_user_pool: Fix `email_message_by_link` max length validation [GH-4051] * resource/aws_elasticache_replication_group: Properly set `cluster_mode` in state [GH-3932] * resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` [GH-3989] +* resource/aws_kinesis_firehose_delivery_stream: Prevent additional crash scenarios with optional configurations [GH-4047] * resource/aws_lambda_function: IAM retry for "The role defined for the function cannot be assumed by Lambda" on update [GH-3988] * resource/aws_lb: Suppress differences for non-applicable attributes [GH-4032] * resource/aws_rds_cluster_instance: Prevent crash on importing non-cluster instances [GH-3961] From db5a5b8517c2054986196d1e4c82645b76aa86fb Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 5 Apr 2018 17:00:42 +0100 Subject: [PATCH 0445/3316] r/ssm_maintenance_window_target: Make resource updatable --- ...ource_aws_ssm_maintenance_window_target.go | 26 ++++++- ..._aws_ssm_maintenance_window_target_test.go | 67 +++++++++++++++++++ 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ssm_maintenance_window_target.go b/aws/resource_aws_ssm_maintenance_window_target.go index 20fbd3bc768..9feee12ec2f 100644 --- a/aws/resource_aws_ssm_maintenance_window_target.go +++ b/aws/resource_aws_ssm_maintenance_window_target.go @@ -13,6 +13,7 @@ func resourceAwsSsmMaintenanceWindowTarget() *schema.Resource { return &schema.Resource{ Create: resourceAwsSsmMaintenanceWindowTargetCreate, Read: resourceAwsSsmMaintenanceWindowTargetRead, + Update: resourceAwsSsmMaintenanceWindowTargetUpdate, Delete: resourceAwsSsmMaintenanceWindowTargetDelete, Schema: map[string]*schema.Schema{ @@ -31,7 +32,6 @@ func resourceAwsSsmMaintenanceWindowTarget() *schema.Resource { "targets": { Type: schema.TypeList, Required: true, - ForceNew: true, MaxItems: 5, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -50,7 +50,6 @@ func resourceAwsSsmMaintenanceWindowTarget() *schema.Resource { "owner_information": { Type: schema.TypeString, - ForceNew: true, Optional: true, }, }, @@ -124,6 +123,29 @@ func resourceAwsSsmMaintenanceWindowTargetRead(d *schema.ResourceData, meta inte return nil } +func resourceAwsSsmMaintenanceWindowTargetUpdate(d *schema.ResourceData, meta interface{}) error { + ssmconn := meta.(*AWSClient).ssmconn + + log.Printf("[INFO] Updating SSM Maintenance Window Target: %s", d.Id()) + + params := &ssm.UpdateMaintenanceWindowTargetInput{ + Targets: expandAwsSsmTargets(d), + WindowId: aws.String(d.Get("window_id").(string)), + WindowTargetId: aws.String(d.Id()), + } + + if d.HasChange("owner_information") { + params.OwnerInformation = aws.String(d.Get("owner_information").(string)) + } + + _, err := ssmconn.UpdateMaintenanceWindowTarget(params) + if err != nil { + return err + } + + return nil +} + func resourceAwsSsmMaintenanceWindowTargetDelete(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn diff --git a/aws/resource_aws_ssm_maintenance_window_target_test.go b/aws/resource_aws_ssm_maintenance_window_target_test.go index 5ff21733b6e..f14c56e07fe 100644 --- a/aws/resource_aws_ssm_maintenance_window_target_test.go +++ b/aws/resource_aws_ssm_maintenance_window_target_test.go @@ -24,7 +24,49 @@ func TestAccAWSSSMMaintenanceWindowTarget_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMMaintenanceWindowTargetExists("aws_ssm_maintenance_window_target.target"), resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.key", "tag:Name"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.values.#", "1"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.values.0", "acceptance_test"), resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.key", "tag:Name2"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.#", "2"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.0", "acceptance_test"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.1", "acceptance_test2"), + ), + }, + }, + }) +} + +func TestAccAWSSSMMaintenanceWindowTarget_update(t *testing.T) { + name := acctest.RandString(10) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSSMMaintenanceWindowTargetBasicConfig(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSSMMaintenanceWindowTargetExists("aws_ssm_maintenance_window_target.target"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.key", "tag:Name"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.values.#", "1"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.values.0", "acceptance_test"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.key", "tag:Name2"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.#", "2"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.0", "acceptance_test"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.1", "acceptance_test2"), + ), + }, + { + Config: testAccAWSSSMMaintenanceWindowTargetBasicConfigUpdated(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSSMMaintenanceWindowTargetExists("aws_ssm_maintenance_window_target.target"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "owner_information", "something"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.key", "tag:Name"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.values.#", "1"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.0.values.0", "acceptance_test"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.key", "tag:Updated"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.#", "1"), + resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.0", "new-value"), ), }, }, @@ -126,3 +168,28 @@ resource "aws_ssm_maintenance_window_target" "target" { } `, rName) } + +func testAccAWSSSMMaintenanceWindowTargetBasicConfigUpdated(rName string) string { + return fmt.Sprintf(` +resource "aws_ssm_maintenance_window" "foo" { + name = "maintenance-window-%s" + schedule = "cron(0 16 ? * TUE *)" + duration = 3 + cutoff = 1 +} + +resource "aws_ssm_maintenance_window_target" "target" { + window_id = "${aws_ssm_maintenance_window.foo.id}" + resource_type = "INSTANCE" + owner_information = "something" + targets { + key = "tag:Name" + values = ["acceptance_test"] + } + targets { + key = "tag:Updated" + values = ["new-value"] + } +} +`, rName) +} From c0d7951148f7fb969bb44f01926b466daee5fab4 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 5 Apr 2018 17:51:54 +0100 Subject: [PATCH 0446/3316] Reduce greedy interface of expandAwsSsmTargets --- aws/resource_aws_ssm_association.go | 4 ++-- aws/resource_aws_ssm_maintenance_window_target.go | 4 ++-- aws/resource_aws_ssm_maintenance_window_task.go | 2 +- aws/structure.go | 6 ++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_ssm_association.go b/aws/resource_aws_ssm_association.go index b65dd858453..e459ab878a1 100644 --- a/aws/resource_aws_ssm_association.go +++ b/aws/resource_aws_ssm_association.go @@ -122,7 +122,7 @@ func resourceAwsSsmAssociationCreate(d *schema.ResourceData, meta interface{}) e } if _, ok := d.GetOk("targets"); ok { - assosciationInput.Targets = expandAwsSsmTargets(d) + assosciationInput.Targets = expandAwsSsmTargets(d.Get("targets").([]interface{})) } if v, ok := d.GetOk("output_location"); ok { @@ -216,7 +216,7 @@ func resourceAwsSsmAssocationUpdate(d *schema.ResourceData, meta interface{}) er } if d.HasChange("targets") { - associationInput.Targets = expandAwsSsmTargets(d) + associationInput.Targets = expandAwsSsmTargets(d.Get("targets").([]interface{})) } _, err := ssmconn.UpdateAssociation(associationInput) diff --git a/aws/resource_aws_ssm_maintenance_window_target.go b/aws/resource_aws_ssm_maintenance_window_target.go index 9feee12ec2f..868323835a0 100644 --- a/aws/resource_aws_ssm_maintenance_window_target.go +++ b/aws/resource_aws_ssm_maintenance_window_target.go @@ -64,7 +64,7 @@ func resourceAwsSsmMaintenanceWindowTargetCreate(d *schema.ResourceData, meta in params := &ssm.RegisterTargetWithMaintenanceWindowInput{ WindowId: aws.String(d.Get("window_id").(string)), ResourceType: aws.String(d.Get("resource_type").(string)), - Targets: expandAwsSsmTargets(d), + Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), } if v, ok := d.GetOk("owner_information"); ok { @@ -129,7 +129,7 @@ func resourceAwsSsmMaintenanceWindowTargetUpdate(d *schema.ResourceData, meta in log.Printf("[INFO] Updating SSM Maintenance Window Target: %s", d.Id()) params := &ssm.UpdateMaintenanceWindowTargetInput{ - Targets: expandAwsSsmTargets(d), + Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), WindowId: aws.String(d.Get("window_id").(string)), WindowTargetId: aws.String(d.Id()), } diff --git a/aws/resource_aws_ssm_maintenance_window_task.go b/aws/resource_aws_ssm_maintenance_window_task.go index a45aa7db843..072b5877c80 100644 --- a/aws/resource_aws_ssm_maintenance_window_task.go +++ b/aws/resource_aws_ssm_maintenance_window_task.go @@ -191,7 +191,7 @@ func resourceAwsSsmMaintenanceWindowTaskCreate(d *schema.ResourceData, meta inte TaskType: aws.String(d.Get("task_type").(string)), ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), TaskArn: aws.String(d.Get("task_arn").(string)), - Targets: expandAwsSsmTargets(d), + Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), } if v, ok := d.GetOk("priority"); ok { diff --git a/aws/structure.go b/aws/structure.go index 4cf4a123270..079388eb35f 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -3156,12 +3156,10 @@ func sliceContainsMap(l []interface{}, m map[string]interface{}) (int, bool) { return -1, false } -func expandAwsSsmTargets(d *schema.ResourceData) []*ssm.Target { +func expandAwsSsmTargets(in []interface{}) []*ssm.Target { targets := make([]*ssm.Target, 0) - targetConfig := d.Get("targets").([]interface{}) - - for _, tConfig := range targetConfig { + for _, tConfig := range in { config := tConfig.(map[string]interface{}) target := &ssm.Target{ From 8435afe2542498e19d88422bd1c66c796fb51e68 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 5 Apr 2018 13:10:06 -0400 Subject: [PATCH 0447/3316] Correct documentation for 'private_dns_enabled' attribute --- website/docs/d/vpc_endpoint.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/d/vpc_endpoint.html.markdown b/website/docs/d/vpc_endpoint.html.markdown index e6360c28149..e581d36771f 100644 --- a/website/docs/d/vpc_endpoint.html.markdown +++ b/website/docs/d/vpc_endpoint.html.markdown @@ -51,7 +51,7 @@ All of the argument attributes are also exported as result attributes. * `subnet_ids` - One or more subnets in which the VPC Endpoint is located. Applicable for endpoints of type `Interface`. * `network_interface_ids` - One or more network interfaces for the VPC Endpoint. Applicable for endpoints of type `Interface`. * `security_group_ids` - One or more security groups associated with the network interfaces. Applicable for endpoints of type `Interface`. -* `private_dns_enabled` - Whether or not the VPC is associated with a private hosted zone - `true` or `false`. Applicable for endpoints of type `Gateway`. +* `private_dns_enabled` - Whether or not the VPC is associated with a private hosted zone - `true` or `false`. Applicable for endpoints of type `Interface`. * `dns_entry` - The DNS entries for the VPC Endpoint. Applicable for endpoints of type `Interface`. DNS blocks are documented below. DNS blocks (for `dns_entry`) support the following attributes: From fbdcfa86a60e7dea8ce89b150d7ab5782c5d038f Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Thu, 5 Apr 2018 22:17:39 +0400 Subject: [PATCH 0448/3316] change time format to RFC3339 --- aws/resource_aws_spot_instance_request.go | 28 ++-- ...resource_aws_spot_instance_request_test.go | 154 ++++++++++++++++++ .../r/spot_instance_request.html.markdown | 7 +- 3 files changed, 170 insertions(+), 19 deletions(-) diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index bae95de7893..99ef56cc4fe 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -12,8 +12,6 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -const awsSpotInstanceRequestTimeLayout = "2006-01-02T15:04:05Z" - func resourceAwsSpotInstanceRequest() *schema.Resource { return &schema.Resource{ Create: resourceAwsSpotInstanceRequestCreate, @@ -87,14 +85,16 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { ForceNew: true, } s["valid_from"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateRFC3339TimeString, } s["valid_until"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateRFC3339TimeString, } return s }(), @@ -145,19 +145,19 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface } if v, ok := d.GetOk("valid_from"); ok { - valid_from, err := time.Parse(awsSpotInstanceRequestTimeLayout, v.(string)) + valid_from, err := time.Parse(time.RFC3339, v.(string)) if err != nil { return err } - spotOpts.ValidFrom = &valid_from + spotOpts.ValidFrom = aws.Time(valid_from) } if v, ok := d.GetOk("valid_until"); ok { - valid_until, err := time.Parse(awsSpotInstanceRequestTimeLayout, v.(string)) + valid_until, err := time.Parse(time.RFC3339, v.(string)) if err != nil { return err } - spotOpts.ValidUntil = &valid_until + spotOpts.ValidUntil = aws.Time(valid_until) } // Make the spot instance request @@ -264,8 +264,8 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} d.Set("block_duration_minutes", request.BlockDurationMinutes) d.Set("tags", tagsToMap(request.Tags)) d.Set("instance_interruption_behaviour", request.InstanceInterruptionBehavior) - d.Set("valid_from", aws.TimeValue(request.ValidFrom).Format(awsSpotInstanceRequestTimeLayout)) - d.Set("valid_until", aws.TimeValue(request.ValidUntil).Format(awsSpotInstanceRequestTimeLayout)) + d.Set("valid_from", aws.TimeValue(request.ValidFrom).Format(time.RFC3339)) + d.Set("valid_until", aws.TimeValue(request.ValidUntil).Format(time.RFC3339)) return nil } diff --git a/aws/resource_aws_spot_instance_request_test.go b/aws/resource_aws_spot_instance_request_test.go index 5a5a0cbe1da..7b48dff101f 100644 --- a/aws/resource_aws_spot_instance_request_test.go +++ b/aws/resource_aws_spot_instance_request_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -123,6 +124,62 @@ func TestAccAWSSpotInstanceRequest_vpc(t *testing.T) { }) } +func TestAccAWSSpotInstanceRequest_validFrom(t *testing.T) { + var sir ec2.SpotInstanceRequest + rInt := acctest.RandInt() + validFrom := testAccAWSSpotInstanceRequestValidFrom(t) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotInstanceRequestConfigValidFrom(rInt, validFrom), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSpotInstanceRequestExists( + "aws_spot_instance_request.foo", &sir), + testAccCheckAWSSpotInstanceRequestAttributes(&sir), + testCheckKeyPair(fmt.Sprintf("tmp-key-%d", rInt), &sir), + testAccCheckAWSSpotInstanceRequestAttributesValidFrom(&sir, validFrom), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_bid_status", "fulfilled"), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_request_state", "active"), + ), + }, + }, + }) +} + +func TestAccAWSSpotInstanceRequest_validUntil(t *testing.T) { + var sir ec2.SpotInstanceRequest + rInt := acctest.RandInt() + validUntil := testAccAWSSpotInstanceRequestValidUntil(t) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotInstanceRequestConfigValidUntil(rInt, validUntil), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSpotInstanceRequestExists( + "aws_spot_instance_request.foo", &sir), + testAccCheckAWSSpotInstanceRequestAttributes(&sir), + testCheckKeyPair(fmt.Sprintf("tmp-key-%d", rInt), &sir), + testAccCheckAWSSpotInstanceRequestAttributesValidUntil(&sir, validUntil), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_bid_status", "fulfilled"), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_request_state", "active"), + ), + }, + }, + }) +} + func TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() @@ -183,6 +240,23 @@ func testCheckKeyPair(keyName string, sir *ec2.SpotInstanceRequest) resource.Tes } } +func testAccAWSSpotInstanceRequestValidFrom(t *testing.T) string { + return testAccAWSSpotInstanceRequestTime(t, "30m") +} + +func testAccAWSSpotInstanceRequestValidUntil(t *testing.T) string { + return testAccAWSSpotInstanceRequestTime(t, "12h") +} + +func testAccAWSSpotInstanceRequestTime(t *testing.T, duration string) string { + n := time.Now().UTC() + d, err := time.ParseDuration(duration) + if err != nil { + t.Fatalf("err parsing time duration: %s", err) + } + return n.Add(d).Format(time.RFC3339) +} + func testAccCheckAWSSpotInstanceRequestDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -301,6 +375,26 @@ func testAccCheckAWSSpotInstanceRequestAttributes( } } +func testAccCheckAWSSpotInstanceRequestAttributesValidFrom( + sir *ec2.SpotInstanceRequest, validFrom string) resource.TestCheckFunc { + return func(s *terraform.State) error { + if sir.ValidFrom.Format(time.RFC3339) != validFrom { + return fmt.Errorf("Unexpected valid_from time: %s", sir.ValidFrom.String()) + } + return nil + } +} + +func testAccCheckAWSSpotInstanceRequestAttributesValidUntil( + sir *ec2.SpotInstanceRequest, validUntil string) resource.TestCheckFunc { + return func(s *terraform.State) error { + if sir.ValidUntil.Format(time.RFC3339) != validUntil { + return fmt.Errorf("Unexpected valid_until time: %s", sir.ValidUntil.String()) + } + return nil + } +} + func testAccCheckAWSSpotInstanceRequest_InstanceAttributes( sir *ec2.SpotInstanceRequest, rInt int) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -394,6 +488,66 @@ func testAccAWSSpotInstanceRequestConfig(rInt int) string { }`, rInt) } +func testAccAWSSpotInstanceRequestConfigValidFrom(rInt int, validFrom string) string { + return fmt.Sprintf(` + resource "aws_key_pair" "debugging" { + key_name = "tmp-key-%d" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" + } + + resource "aws_spot_instance_request" "foo" { + ami = "ami-4fccb37f" + instance_type = "m1.small" + key_name = "${aws_key_pair.debugging.key_name}" + + // base price is $0.044 hourly, so bidding above that should theoretically + // always fulfill + spot_price = "0.05" + + // The start date and time of the request, the default is to start fulfilling the request immediately. + // so 30 minutes from the current time will be valid time. + valid_from = "%s" + + // we wait for fulfillment because we want to inspect the launched instance + // and verify termination behavior + wait_for_fulfillment = true + + tags { + Name = "terraform-test" + } + }`, rInt, validFrom) +} + +func testAccAWSSpotInstanceRequestConfigValidUntil(rInt int, validUntil string) string { + return fmt.Sprintf(` + resource "aws_key_pair" "debugging" { + key_name = "tmp-key-%d" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" + } + + resource "aws_spot_instance_request" "foo" { + ami = "ami-4fccb37f" + instance_type = "m1.small" + key_name = "${aws_key_pair.debugging.key_name}" + + // base price is $0.044 hourly, so bidding above that should theoretically + // always fulfill + spot_price = "0.05" + + // The end date and time of the request, the default end date is 7 days from the current date. + // so 12 hours from the current time will be valid time for valid_until. + valid_until = "%s" + + // we wait for fulfillment because we want to inspect the launched instance + // and verify termination behavior + wait_for_fulfillment = true + + tags { + Name = "terraform-test" + } + }`, rInt, validUntil) +} + func testAccAWSSpotInstanceRequestConfig_withLaunchGroup(rInt int) string { return fmt.Sprintf(` resource "aws_key_pair" "debugging" { diff --git a/website/docs/r/spot_instance_request.html.markdown b/website/docs/r/spot_instance_request.html.markdown index cda1a4251b7..f1afacfc191 100644 --- a/website/docs/r/spot_instance_request.html.markdown +++ b/website/docs/r/spot_instance_request.html.markdown @@ -61,11 +61,8 @@ Spot Instance Requests support all the same arguments as The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration. * `instance_interruption_behavior` - (Optional) Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour. -* `valid_until` - The end date and time of the request, in UTC ISO8601 format - (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance -requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date. -* `valid_from` - The start date and time of the request, in UTC ISO8601 format - (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately. +* `valid_until` - (Optional) The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. The default end date is 7 days from the current date. +* `valid_from` - (Optional) The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately. ### Timeouts From 9b0defd11354a942d019fc2c16a9ca537f93f8ef Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 5 Apr 2018 20:46:44 +0100 Subject: [PATCH 0449/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c51a45d3bba..6b61b889017 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: * resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support [GH-2987] * resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] * resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] +* resource/aws_ssm_maintenance_window_target: Make resource updatable [GH-4074] * resource/aws_wafregional_rule: Validate all predicate types [GH-4046] BUG FIXES: From d5d8511e754406d10ecd108bb892e2f3296814d3 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 5 Apr 2018 21:01:29 +0100 Subject: [PATCH 0450/3316] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b61b889017..f178b668ef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: * resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support [GH-2987] * resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] * resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] +* resource/aws_launch_configuration: Add support for `ebs_block_device.*.no_device` [GH-4070] * resource/aws_ssm_maintenance_window_target: Make resource updatable [GH-4074] * resource/aws_wafregional_rule: Validate all predicate types [GH-4046] From 68dd50052700ad146d38224ece693471c2ab6045 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 17:39:46 -0400 Subject: [PATCH 0451/3316] tests/resource/aws_ecs_task_definition: Randomize IAM role and task definition family names (#4054) --- ...ata_source_aws_ecs_task_definition_test.go | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/aws/data_source_aws_ecs_task_definition_test.go b/aws/data_source_aws_ecs_task_definition_test.go index 6d6ffa35a5b..9e7fb0fe5db 100644 --- a/aws/data_source_aws_ecs_task_definition_test.go +++ b/aws/data_source_aws_ecs_task_definition_test.go @@ -1,35 +1,39 @@ package aws import ( + "fmt" "regexp" "testing" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccAWSEcsDataSource_ecsTaskDefinition(t *testing.T) { + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccCheckAwsEcsTaskDefinitionDataSourceConfig, + Config: testAccCheckAwsEcsTaskDefinitionDataSourceConfig(rName), Check: resource.ComposeTestCheckFunc( - resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "id", regexp.MustCompile("^arn:aws:ecs:us-west-2:[0-9]{12}:task-definition/mongodb:[1-9][0-9]*$")), - resource.TestCheckResourceAttr("data.aws_ecs_task_definition.mongo", "family", "mongodb"), + resource.TestCheckResourceAttr("data.aws_ecs_task_definition.mongo", "family", rName), resource.TestCheckResourceAttr("data.aws_ecs_task_definition.mongo", "network_mode", "bridge"), resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "revision", regexp.MustCompile("^[1-9][0-9]*$")), resource.TestCheckResourceAttr("data.aws_ecs_task_definition.mongo", "status", "ACTIVE"), - resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "task_role_arn", regexp.MustCompile("^arn:aws:iam::[0-9]{12}:role/mongo_role$")), + resource.TestMatchResourceAttr("data.aws_ecs_task_definition.mongo", "task_role_arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:iam::[^:]+:role/%s$", rName))), ), }, }, }) } -const testAccCheckAwsEcsTaskDefinitionDataSourceConfig = ` +func testAccCheckAwsEcsTaskDefinitionDataSourceConfig(rName string) string { + return fmt.Sprintf(` resource "aws_iam_role" "mongo_role" { - name = "mongo_role" + name = "%[1]s" assume_role_policy = < Date: Wed, 4 Apr 2018 15:37:11 -0400 Subject: [PATCH 0452/3316] provider: Support acmpca, fms, and secretsmanager connections --- aws/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aws/config.go b/aws/config.go index 71833acf742..bd04b34c6c3 100644 --- a/aws/config.go +++ b/aws/config.go @@ -16,6 +16,7 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/acm" + "github.com/aws/aws-sdk-go/service/acmpca" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/applicationautoscaling" "github.com/aws/aws-sdk-go/service/appsync" @@ -54,6 +55,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/fms" "github.com/aws/aws-sdk-go/service/gamelift" "github.com/aws/aws-sdk-go/service/glacier" "github.com/aws/aws-sdk-go/service/glue" @@ -74,6 +76,7 @@ import ( "github.com/aws/aws-sdk-go/service/redshift" "github.com/aws/aws-sdk-go/service/route53" "github.com/aws/aws-sdk-go/service/s3" + "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/aws/aws-sdk-go/service/servicecatalog" "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/aws/aws-sdk-go/service/ses" @@ -167,10 +170,12 @@ type AWSClient struct { emrconn *emr.EMR esconn *elasticsearch.ElasticsearchService acmconn *acm.ACM + acmpcaconn *acmpca.ACMPCA apigateway *apigateway.APIGateway appautoscalingconn *applicationautoscaling.ApplicationAutoScaling autoscalingconn *autoscaling.AutoScaling s3conn *s3.S3 + secretsmanagerconn *secretsmanager.SecretsManager scconn *servicecatalog.ServiceCatalog sesConn *ses.SES simpledbconn *simpledb.SimpleDB @@ -189,6 +194,7 @@ type AWSClient struct { kmsconn *kms.KMS gameliftconn *gamelift.GameLift firehoseconn *firehose.Firehose + fmsconn *fms.FMS inspectorconn *inspector.Inspector elasticacheconn *elasticache.ElastiCache elasticbeanstalkconn *elasticbeanstalk.ElasticBeanstalk @@ -418,6 +424,7 @@ func (c *Config) Client() (interface{}, error) { } client.acmconn = acm.New(awsAcmSess) + client.acmpcaconn = acmpca.New(sess) client.apigateway = apigateway.New(awsApigatewaySess) client.appautoscalingconn = applicationautoscaling.New(sess) client.autoscalingconn = autoscaling.New(sess) @@ -450,6 +457,7 @@ func (c *Config) Client() (interface{}, error) { client.emrconn = emr.New(sess) client.esconn = elasticsearch.New(awsEsSess) client.firehoseconn = firehose.New(sess) + client.fmsconn = fms.New(sess) client.inspectorconn = inspector.New(sess) client.gameliftconn = gamelift.New(sess) client.glacierconn = glacier.New(sess) @@ -471,6 +479,7 @@ func (c *Config) Client() (interface{}, error) { client.scconn = servicecatalog.New(sess) client.sdconn = servicediscovery.New(sess) client.sesConn = ses.New(sess) + client.secretsmanagerconn = secretsmanager.New(sess) client.sfnconn = sfn.New(sess) client.snsconn = sns.New(awsSnsSess) client.sqsconn = sqs.New(awsSqsSess) From 398d4b11047a9855e3f66a137f1b7690341ff0cc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 20:22:35 -0400 Subject: [PATCH 0453/3316] resource/aws_spot_fleet_request: Support configurable delete timeout --- aws/resource_aws_spot_fleet_request.go | 3 ++- website/docs/r/spot_fleet_request.html.markdown | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index e24b8db8d56..cadbe2d15bd 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -25,6 +25,7 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), }, SchemaVersion: 1, @@ -1118,7 +1119,7 @@ func resourceAwsSpotFleetRequestDelete(d *schema.ResourceData, meta interface{}) terminateInstances := d.Get("terminate_instances_with_expiration").(bool) log.Printf("[INFO] Cancelling spot fleet request: %s", d.Id()) - err := deleteSpotFleetRequest(d.Id(), terminateInstances, 5*time.Minute, conn) + err := deleteSpotFleetRequest(d.Id(), terminateInstances, d.Timeout(schema.TimeoutDelete), conn) if err != nil { return fmt.Errorf("error deleting spot request (%s): %s", d.Id(), err) } diff --git a/website/docs/r/spot_fleet_request.html.markdown b/website/docs/r/spot_fleet_request.html.markdown index 19bd03ea5c8..2dd9ef095b4 100644 --- a/website/docs/r/spot_fleet_request.html.markdown +++ b/website/docs/r/spot_fleet_request.html.markdown @@ -127,6 +127,7 @@ Application Load Balancing. The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: * `create` - (Defaults to 10 mins) Used when requesting the spot instance (only valid if `wait_for_fulfillment = true`) +* `delete` - (Defaults to 5 mins) Used when destroying the spot instance ## Attributes Reference From 55585078c1c629642c1dc9e6407a6e4d31a44b85 Mon Sep 17 00:00:00 2001 From: Matthew Riley Date: Thu, 5 Apr 2018 17:43:04 -0700 Subject: [PATCH 0454/3316] Set subnet_mapping element attributes to ForceNew The way `diffSet` in Terraform works on `Resource`, the `ForceNew` property on the Set has no effect unless `ForceNew` is also set on the resource's attributes. Without `ForceNew` on these attributes, changing `subnet_mappings` just silently does nothing. --- aws/resource_aws_lb.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index ea1053d134e..ff022d89ba6 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -103,10 +103,12 @@ func resourceAwsLb() *schema.Resource { "subnet_id": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "allocation_id": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, }, }, From 37d411b1c176418dab357ed92e2392c541fcba5d Mon Sep 17 00:00:00 2001 From: Jeff Nappi Date: Thu, 5 Apr 2018 16:56:54 -0700 Subject: [PATCH 0455/3316] resource/aws_service_discovery_service: Support HealthCheckCustomConfig --- aws/resource_aws_service_discovery_service.go | 51 +++++++++++++++++++ ...urce_aws_service_discovery_service_test.go | 21 +++++--- .../r/service_discovery_service.html.markdown | 11 ++++ 3 files changed, 76 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_service_discovery_service.go b/aws/resource_aws_service_discovery_service.go index 38f07bb7377..25a8553e5eb 100644 --- a/aws/resource_aws_service_discovery_service.go +++ b/aws/resource_aws_service_discovery_service.go @@ -105,6 +105,21 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { }, }, }, + "health_check_custom_config": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "failure_threshold": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + }, + }, + }, "arn": { Type: schema.TypeString, Computed: true, @@ -130,6 +145,11 @@ func resourceAwsServiceDiscoveryServiceCreate(d *schema.ResourceData, meta inter input.HealthCheckConfig = expandServiceDiscoveryHealthCheckConfig(hcconfig[0].(map[string]interface{})) } + healthCustomConfig := d.Get("health_check_custom_config").([]interface{}) + if len(healthCustomConfig) > 0 { + input.HealthCheckCustomConfig = expandServiceDiscoveryHealthCheckCustomConfig(healthCustomConfig[0].(map[string]interface{})) + } + resp, err := conn.CreateService(input) if err != nil { return err @@ -163,6 +183,7 @@ func resourceAwsServiceDiscoveryServiceRead(d *schema.ResourceData, meta interfa d.Set("description", service.Description) d.Set("dns_config", flattenServiceDiscoveryDnsConfig(service.DnsConfig)) d.Set("health_check_config", flattenServiceDiscoveryHealthCheckConfig(service.HealthCheckConfig)) + d.Set("health_check_custom_config", flattenServiceDiscoveryHealthCheckCustomConfig(service.HealthCheckCustomConfig)) return nil } @@ -322,3 +343,33 @@ func flattenServiceDiscoveryHealthCheckConfig(config *servicediscovery.HealthChe return []map[string]interface{}{result} } + +func expandServiceDiscoveryHealthCheckCustomConfig(configured map[string]interface{}) *servicediscovery.HealthCheckCustomConfig { + if len(configured) < 1 { + return nil + } + result := &servicediscovery.HealthCheckCustomConfig{} + + if v, ok := configured["failure_threshold"]; ok && v.(int) != 0 { + result.FailureThreshold = aws.Int64(int64(v.(int))) + } + + return result +} + +func flattenServiceDiscoveryHealthCheckCustomConfig(config *servicediscovery.HealthCheckCustomConfig) []map[string]interface{} { + if config == nil { + return nil + } + result := map[string]interface{}{} + + if config.FailureThreshold != nil { + result["failure_threshold"] = *config.FailureThreshold + } + + if len(result) < 1 { + return nil + } + + return []map[string]interface{}{result} +} diff --git a/aws/resource_aws_service_discovery_service_test.go b/aws/resource_aws_service_discovery_service_test.go index 851015a20d2..c752c3fb2df 100644 --- a/aws/resource_aws_service_discovery_service_test.go +++ b/aws/resource_aws_service_discovery_service_test.go @@ -19,9 +19,10 @@ func TestAccAWSServiceDiscoveryService_private(t *testing.T) { CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy, Steps: []resource.TestStep{ { - Config: testAccServiceDiscoveryServiceConfig_private(rName), + Config: testAccServiceDiscoveryServiceConfig_private(rName, 5), Check: resource.ComposeTestCheckFunc( testAccCheckAwsServiceDiscoveryServiceExists("aws_service_discovery_service.test"), + resource.TestCheckResourceAttr("aws_service_discovery_service.test", "health_check_custom_config.0.failure_threshold", "5"), resource.TestCheckResourceAttr("aws_service_discovery_service.test", "dns_config.0.dns_records.#", "1"), resource.TestCheckResourceAttr("aws_service_discovery_service.test", "dns_config.0.dns_records.0.type", "A"), resource.TestCheckResourceAttr("aws_service_discovery_service.test", "dns_config.0.dns_records.0.ttl", "5"), @@ -30,7 +31,7 @@ func TestAccAWSServiceDiscoveryService_private(t *testing.T) { ), }, { - Config: testAccServiceDiscoveryServiceConfig_private_update(rName), + Config: testAccServiceDiscoveryServiceConfig_private_update(rName, 5), Check: resource.ComposeTestCheckFunc( testAccCheckAwsServiceDiscoveryServiceExists("aws_service_discovery_service.test"), resource.TestCheckResourceAttr("aws_service_discovery_service.test", "dns_config.0.dns_records.#", "2"), @@ -86,7 +87,7 @@ func TestAccAWSServiceDiscoveryService_import(t *testing.T) { CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccServiceDiscoveryServiceConfig_private(acctest.RandString(5)), + Config: testAccServiceDiscoveryServiceConfig_private(acctest.RandString(5), 5), }, resource.TestStep{ @@ -143,7 +144,7 @@ func testAccCheckAwsServiceDiscoveryServiceExists(name string) resource.TestChec } } -func testAccServiceDiscoveryServiceConfig_private(rName string) string { +func testAccServiceDiscoveryServiceConfig_private(rName string, th int) string { return fmt.Sprintf(` resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" @@ -167,11 +168,14 @@ resource "aws_service_discovery_service" "test" { type = "A" } } + health_check_custom_config { + failure_threshold = %d + } } -`, rName, rName) +`, rName, rName, th) } -func testAccServiceDiscoveryServiceConfig_private_update(rName string) string { +func testAccServiceDiscoveryServiceConfig_private_update(rName string, th int) string { return fmt.Sprintf(` resource "aws_vpc" "test" { cidr_block = "10.0.0.0/16" @@ -200,8 +204,11 @@ resource "aws_service_discovery_service" "test" { } routing_policy = "MULTIVALUE" } + health_check_custom_config { + failure_threshold = %d + } } -`, rName, rName) +`, rName, rName, th) } func testAccServiceDiscoveryServiceConfig_public(rName string, th int, path string) string { diff --git a/website/docs/r/service_discovery_service.html.markdown b/website/docs/r/service_discovery_service.html.markdown index cb3768d9603..1c67cc46171 100644 --- a/website/docs/r/service_discovery_service.html.markdown +++ b/website/docs/r/service_discovery_service.html.markdown @@ -33,6 +33,10 @@ resource "aws_service_discovery_service" "example" { } routing_policy = "MULTIVALUE" } + + health_check_custom_config { + failure_threshold = 1 + } } ``` @@ -67,6 +71,7 @@ The following arguments are supported: * `description` - (Optional) The description of the service. * `dns_config` - (Required) A complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. * `health_check_config` - (Optional) A complex type that contains settings for an optional health check. Only for Public DNS namespaces. +* `health_check_custom_config` - (Optional, ForceNew) A complex type that contains settings for ECS managed health checks. ### dns_config @@ -91,6 +96,12 @@ The following arguments are supported: * `resource_path` - (Optional) An array that contains one DnsRecord object for each resource record set. * `type` - (Optional, ForceNew) An array that contains one DnsRecord object for each resource record set. +### health_check_custom_config + +The following arguments are supported: + +* `failure_threshold` - (Optional, ForceNew) The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10. + ## Attributes Reference The following attributes are exported: From 4e956217740e99dd3d85f39f1db6c62dfc948d87 Mon Sep 17 00:00:00 2001 From: HandcraftedBits Date: Thu, 5 Apr 2018 21:41:36 -0400 Subject: [PATCH 0456/3316] Minor regional/edge API gateway implementation tweaks. --- aws/resource_aws_api_gateway_rest_api.go | 26 ++++++++---------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index e957a2f585b..06bcbf1404c 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsApiGatewayRestApi() *schema.Resource { @@ -61,10 +62,13 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { }, "endpoint_type": { - Type: schema.TypeString, - Optional: true, - Default: "EDGE", - ValidateFunc: validateAwsApiGatewayEndpointType, + Type: schema.TypeString, + Optional: true, + Default: apigateway.EndpointTypeEdge, + ValidateFunc: validation.StringInSlice([]string{ + apigateway.EndpointTypeEdge, + apigateway.EndpointTypeRegional, + }, false), }, }, } @@ -294,17 +298,3 @@ func resourceAwsApiGatewayRestApiDelete(d *schema.ResourceData, meta interface{} return resource.NonRetryableError(err) }) } - -func validateAwsApiGatewayEndpointType(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - types := map[string]bool{ - apigateway.EndpointTypeRegional: true, - apigateway.EndpointTypeEdge: true, - } - - if !types[value] { - errors = append(errors, fmt.Errorf("Endpoint type %s is invalid. Valid types are 'EDGE' and 'REGIONAL'", value)) - } - - return -} From b7cfea83dacd1184ca44abfe0349ba0c6258ce29 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Thu, 5 Apr 2018 18:44:47 -0700 Subject: [PATCH 0457/3316] Add examples for Aurora Read Replica Autoscaling. --- .../r/appautoscaling_policy.html.markdown | 31 +++++++++++++++++++ .../r/appautoscaling_target.html.markdown | 12 +++++++ 2 files changed, 43 insertions(+) diff --git a/website/docs/r/appautoscaling_policy.html.markdown b/website/docs/r/appautoscaling_policy.html.markdown index 274781a0e66..f7378b5edb2 100644 --- a/website/docs/r/appautoscaling_policy.html.markdown +++ b/website/docs/r/appautoscaling_policy.html.markdown @@ -89,6 +89,37 @@ resource "aws_ecs_service" "ecs_service" { } ``` +### Aurora Read Replica Autoscaling + +```hcl +resource "aws_appautoscaling_target" "replicas" { + service_namespace = "rds" + scalable_dimension = "rds:cluster:ReadReplicaCount" + resource_id = "cluster:aurora-cluster-id" + min_capacity = 1 + max_capacity = 15 +} + +resource "aws_appautoscaling_policy" "replicas" { + name = "cpu-auto-scaling" + service_namespace = "rds" + scalable_dimension = "rds:cluster:ReadReplicaCount" + resource_id = "cluster:aurora-cluster-id" + policy_type = "TargetTrackingScaling" + + target_tracking_scaling_policy_configuration { + predefined_metric_specification { + predefined_metric_type = "RDSReaderAverageCPUUtilization" + } + target_value = 75 + scale_in_cooldown = 300 + scale_out_cooldown = 300 + } + + depends_on = ["aws_appautoscaling_target.replicas"] +} +``` + ## Argument Reference The following arguments are supported: diff --git a/website/docs/r/appautoscaling_target.html.markdown b/website/docs/r/appautoscaling_target.html.markdown index 273ce3d59e2..bec82f27217 100644 --- a/website/docs/r/appautoscaling_target.html.markdown +++ b/website/docs/r/appautoscaling_target.html.markdown @@ -51,6 +51,18 @@ resource "aws_appautoscaling_target" "ecs_target" { } ``` +### Aurora Read Replica Autoscaling + +```hcl +resource "aws_appautoscaling_target" "replicas" { + service_namespace = "rds" + scalable_dimension = "rds:cluster:ReadReplicaCount" + resource_id = "cluster:aurora-cluster-id" + min_capacity = 1 + max_capacity = 15 +} +``` + ## Argument Reference The following arguments are supported: From 9a434eb40b8873f691ab60f847f5b4595c624f6c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 21:57:46 -0400 Subject: [PATCH 0458/3316] resource/aws_organization_account: Ensure email is set on read and prevent crash from empty account result --- aws/resource_aws_organizations_account.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_organizations_account.go b/aws/resource_aws_organizations_account.go index eb7eb02f2bb..99bd7dae8fc 100644 --- a/aws/resource_aws_organizations_account.go +++ b/aws/resource_aws_organizations_account.go @@ -148,11 +148,19 @@ func resourceAwsOrganizationsAccountRead(d *schema.ResourceData, meta interface{ return err } - d.Set("arn", resp.Account.Arn) - d.Set("joined_method", resp.Account.JoinedMethod) - d.Set("joined_timestamp", resp.Account.JoinedTimestamp) - d.Set("name", resp.Account.Name) - d.Set("status", resp.Account.Status) + account := resp.Account + if account == nil { + log.Printf("[WARN] Account does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + + d.Set("arn", account.Arn) + d.Set("email", account.Email) + d.Set("joined_method", account.JoinedMethod) + d.Set("joined_timestamp", account.JoinedTimestamp) + d.Set("name", account.Name) + d.Set("status", account.Status) return nil } From d132b6c8a0003e97391a34ef84e781cd08a57bcd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 22:00:08 -0400 Subject: [PATCH 0459/3316] docs/resource/aws_organizations_account: Increase deletion message to warning and other minor formatting fixes --- website/docs/r/organizations_account.html.markdown | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/website/docs/r/organizations_account.html.markdown b/website/docs/r/organizations_account.html.markdown index eb3d6537f55..0bf4c0abcc9 100644 --- a/website/docs/r/organizations_account.html.markdown +++ b/website/docs/r/organizations_account.html.markdown @@ -7,13 +7,12 @@ description: |- --- # aws_organizations_account - -~> **Note:** Account management must be done from the organization's master account. -~> **Note:** Deleting this Terraform resource will only remove an AWS account from an organization. Terraform will not close the account. The member account must be prepared to be a standalone account beforehand. See the [AWS Organizations documentation](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html) for more information. +Provides a resource to create a member account in the current organization. +~> **Note:** Account management must be done from the organization's master account. -Provides a resource to create a member account in the current organization. +!> **WARNING:** Deleting this Terraform resource will only remove an AWS account from an organization. Terraform will not close the account. The member account must be prepared to be a standalone account beforehand. See the [AWS Organizations documentation](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html) for more information. ## Example Usage: @@ -30,8 +29,8 @@ The following arguments are supported: * `name` - (Required) A friendly name for the member account. * `email` - (Required) The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. -* `iam_user_access_to_billing` - (Optional) If set to ALLOW, the new account enables IAM users to access account billing information if they have the required permissions. If set to DENY, then only the root user of the new account can access account billing information. -* `role_name` - (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. +* `iam_user_access_to_billing` - (Optional) If set to `ALLOW`, the new account enables IAM users to access account billing information if they have the required permissions. If set to `DENY`, then only the root user of the new account can access account billing information. +* `role_name` - (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. ## Import From 0e8d0b6fb04a5d08123ec6937390e6990b493e96 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 22:21:17 -0400 Subject: [PATCH 0460/3316] Update CHANGELOG for #3524 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f178b668ef8..3808b68f801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ ## 1.14.0 (Unreleased) +NOTES: + +* resource/aws_organizations_account: As noted in the resource documentation, resource deletion from Terraform will _not_ automatically close AWS accounts due to the behavior of the AWS Organizations service. There are also various manual steps required by AWS before the account can be removed from an organization and made into a standalone account, then manually closed if desired. + FEATURES: +* **New Resource:** `aws_organizations_account` [GH-3524] * **New Resource:** `aws_ses_identity_notification_topic` [GH-2640] ENHANCEMENTS: From 0e099c6f6d80cde1a1613d1c655cc0338e584f74 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Apr 2018 22:24:49 -0400 Subject: [PATCH 0461/3316] docs/resource/aws_organizations_account: Fix header --- website/docs/r/organizations_account.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/organizations_account.html.markdown b/website/docs/r/organizations_account.html.markdown index 0bf4c0abcc9..dbbc517d897 100644 --- a/website/docs/r/organizations_account.html.markdown +++ b/website/docs/r/organizations_account.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" -page_title: "AWS: aws_organizations_account -sidebar_current: "docs-aws-resource-organizations-account|" +page_title: "AWS: aws_organizations_account" +sidebar_current: "docs-aws-resource-organizations-account" description: |- Provides a resource to create a member account in the current AWS Organization. --- From 28a14043399abffca6fba0c8ffe93ff5b8aa8043 Mon Sep 17 00:00:00 2001 From: kaofelix Date: Fri, 6 Apr 2018 13:24:45 +0200 Subject: [PATCH 0462/3316] validators.go: remove gamelift / guardduty functions added by accident by bad rebase --- aws/validators.go | 53 ----------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/aws/validators.go b/aws/validators.go index ae6143a42c7..cdf057b2b4a 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -15,8 +15,6 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/aws/aws-sdk-go/service/gamelift" - "github.com/aws/aws-sdk-go/service/guardduty" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform/helper/schema" @@ -1620,57 +1618,6 @@ func validateAwsCodeBuildCacheType(v interface{}, k string) (ws []string, errors 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 -} - -func validateGuardDutyIpsetFormat(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - validType := []string{ - guardduty.IpSetFormatTxt, - guardduty.IpSetFormatStix, - guardduty.IpSetFormatOtxCsv, - guardduty.IpSetFormatAlienVault, - guardduty.IpSetFormatProofPoint, - guardduty.IpSetFormatFireEye, - } - for _, str := range validType { - if value == str { - return - } - } - errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) - return -} - -func validateGuardDutyThreatIntelSetFormat(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - validType := []string{ - guardduty.ThreatIntelSetFormatTxt, - guardduty.ThreatIntelSetFormatStix, - guardduty.ThreatIntelSetFormatOtxCsv, - guardduty.ThreatIntelSetFormatAlienVault, - guardduty.ThreatIntelSetFormatProofPoint, - guardduty.ThreatIntelSetFormatFireEye, - } - for _, str := range validType { - if value == str { - return - } - } - errors = append(errors, fmt.Errorf("expected %s to be one of %v, got %s", k, validType, value)) - return -} - func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { enabled := d.Get("stream_enabled").(bool) if enabled { From b146a80b94deed9b609c8a38814d844775443bef Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Fri, 6 Apr 2018 11:03:57 +0200 Subject: [PATCH 0463/3316] resource/api_gateway_integration: set connection_type and connection_id in read function --- aws/resource_aws_api_gateway_integration.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 3f66ad011ac..84819db6c8c 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -269,6 +269,10 @@ func resourceAwsApiGatewayIntegrationRead(d *schema.ResourceData, meta interface d.Set("request_parameters", aws.StringValueMap(integration.RequestParameters)) d.Set("request_parameters_in_json", aws.StringValueMap(integration.RequestParameters)) d.Set("passthrough_behavior", integration.PassthroughBehavior) + d.Set("connection_type", integration.ConnectionType) + if integration.ConnectionId != nil { + d.Set("connection_id", integration.ConnectionId) + } if integration.Uri != nil { d.Set("uri", integration.Uri) From 5c3773dc8a8cce309a38a5054fee764004b66656 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 08:26:21 -0400 Subject: [PATCH 0464/3316] data-source/aws_iam_role: Add max_session_duration attribute --- aws/data_source_aws_iam_role.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aws/data_source_aws_iam_role.go b/aws/data_source_aws_iam_role.go index 7de37708b24..fe4f6f657c4 100644 --- a/aws/data_source_aws_iam_role.go +++ b/aws/data_source_aws_iam_role.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "github.com/hashicorp/terraform/helper/schema" ) @@ -53,6 +54,10 @@ func dataSourceAwsIAMRole() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "max_session_duration": { + Type: schema.TypeInt, + Computed: true, + }, }, } } From cd5ff85ba790b049063f0163d75ba6a03c6a642c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 08:30:39 -0400 Subject: [PATCH 0465/3316] resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes --- aws/resource_aws_elasticache_replication_group.go | 2 +- website/docs/r/elasticache_replication_group.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index 57b8d70801a..75fc807ca91 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -125,7 +125,7 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { SchemaVersion: 1, Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(50 * time.Minute), + Create: schema.DefaultTimeout(60 * time.Minute), Delete: schema.DefaultTimeout(40 * time.Minute), Update: schema.DefaultTimeout(40 * time.Minute), }, diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index 1e96f18ec0f..e60dabeaa41 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -144,7 +144,7 @@ The following attributes are exported: `aws_elasticache_replication_group` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: -* `create` - (Default `50m`) How long to wait for a replication group to be created. +* `create` - (Default `60m`) How long to wait for a replication group to be created. * `delete` - (Default `40m`) How long to wait for a replication group to be deleted. * `update` - (Default `40m`) How long to wait for replication group settings to be updated. This is also separately used for online resize operation completion, if necessary. From e4335e1d1934435af6b8b72e52e8c910027014d9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 09:30:48 -0400 Subject: [PATCH 0466/3316] tests/resource/aws_network_acl: Prevent crash in TestAccAWSNetworkAcl_SubnetChange --- aws/resource_aws_network_acl_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_network_acl_test.go b/aws/resource_aws_network_acl_test.go index 510488e2286..91f120ce6dc 100644 --- a/aws/resource_aws_network_acl_test.go +++ b/aws/resource_aws_network_acl_test.go @@ -275,6 +275,7 @@ func TestAccAWSNetworkAcl_OnlyEgressRules(t *testing.T) { } func TestAccAWSNetworkAcl_SubnetChange(t *testing.T) { + var networkAcl ec2.NetworkAcl resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -285,12 +286,14 @@ func TestAccAWSNetworkAcl_SubnetChange(t *testing.T) { { Config: testAccAWSNetworkAclSubnetConfig, Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNetworkAclExists("aws_network_acl.bar", &networkAcl), testAccCheckSubnetIsAssociatedWithAcl("aws_network_acl.bar", "aws_subnet.old"), ), }, { Config: testAccAWSNetworkAclSubnetConfigChange, Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNetworkAclExists("aws_network_acl.bar", &networkAcl), testAccCheckSubnetIsNotAssociatedWithAcl("aws_network_acl.bar", "aws_subnet.old"), testAccCheckSubnetIsAssociatedWithAcl("aws_network_acl.bar", "aws_subnet.new"), ), @@ -459,7 +462,7 @@ func testAccCheckAWSNetworkAclExists(n string, networkAcl *ec2.NetworkAcl) resou } if rs.Primary.ID == "" { - return fmt.Errorf("No Security Group is set") + return fmt.Errorf("No ID is set: %s", n) } conn := testAccProvider.Meta().(*AWSClient).ec2conn From 69f1a23e55ef2725f87bd212b44b8b55754731f7 Mon Sep 17 00:00:00 2001 From: kaofelix Date: Fri, 6 Apr 2018 13:26:46 +0200 Subject: [PATCH 0467/3316] resource/aws_codebuild_project: Use validation.StringInSlice to validate cache type --- aws/resource_aws_codebuild_project.go | 9 ++++++--- aws/validators.go | 12 ------------ aws/validators_test.go | 18 ------------------ 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 06540a5b13a..fe21d199458 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -73,9 +73,12 @@ func resourceAwsCodeBuildProject() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validateAwsCodeBuildCacheType, + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.CacheTypeNoCache, + codebuild.CacheTypeS3, + }, false), }, "location": { Type: schema.TypeString, diff --git a/aws/validators.go b/aws/validators.go index cdf057b2b4a..3fcbdb1b444 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1606,18 +1606,6 @@ func validateAwsElastiCacheReplicationGroupAuthToken(v interface{}, k string) (w return } -func validateAwsCodeBuildCacheType(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - types := map[string]bool{ - "S3": true, - } - - if !types[value] { - errors = append(errors, fmt.Errorf("CodeBuild: Cache Type can only be S3")) - } - return -} - func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { enabled := d.Get("stream_enabled").(bool) if enabled { diff --git a/aws/validators_test.go b/aws/validators_test.go index 9519464eaa0..e32679e35cc 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -2431,24 +2431,6 @@ func TestValidateCognitoUserPoolDomain(t *testing.T) { } } -func TestValidateAwsCodeBuildCacheType(t *testing.T) { - cases := []struct { - Value string - ErrCount int - }{ - {Value: "S3", ErrCount: 0}, - {Value: "XYZ", ErrCount: 1}, - } - - for _, tc := range cases { - _, errors := validateAwsCodeBuildCacheType(tc.Value, "aws_codebuild_project") - - if len(errors) != tc.ErrCount { - t.Fatalf("Expected the AWS CodeBuild project artifacts type to trigger a validation error") - } - } -} - func TestValidateCognitoUserGroupName(t *testing.T) { validValues := []string{ "foo", From 1516c4e1895863c705126287a07999cd13e6477d Mon Sep 17 00:00:00 2001 From: kaofelix Date: Fri, 6 Apr 2018 16:39:26 +0200 Subject: [PATCH 0468/3316] resource/aws_codebuild_project: acceptance tests for codebuild project cache --- aws/resource_aws_codebuild_project.go | 1 + aws/resource_aws_codebuild_project_test.go | 174 ++++++++++++++++++--- 2 files changed, 153 insertions(+), 22 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index fe21d199458..e6d92150aee 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -69,6 +69,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { "cache": { Type: schema.TypeList, Optional: true, + Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index f103f70d1ec..2851b4964bc 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -78,6 +78,49 @@ func TestAccAWSCodeBuildProject_vpc(t *testing.T) { }) } +func TestAccAWSCodeBuildProject_cache(t *testing.T) { + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_cache(name, ""), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckNoResourceAttr("aws_codebuild_project.foo", "cache"), + ), + }, + { + Config: testAccAWSCodeBuildProjectConfig_cache(name, testAccAWSCodeBuildProjectConfig_cacheConfig("S3", "some-bucket")), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "S3"), + resource.TestCheckResourceAttrSet("aws_codebuild_project.foo", "cache.0.location"), + ), + }, + { + Config: testAccAWSCodeBuildProjectConfig_cache(name, testAccAWSCodeBuildProjectConfig_cacheConfig("S3", "some-new-bucket")), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "S3"), + resource.TestCheckResourceAttrSet("aws_codebuild_project.foo", "cache.0.location"), + ), + }, + { + Config: testAccAWSCodeBuildProjectConfig_cache(name, ""), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "S3"), + resource.TestCheckResourceAttrSet("aws_codebuild_project.foo", "cache.0.location"), + ), + }, + }, + }) +} + func TestAccAWSCodeBuildProject_sourceAuth(t *testing.T) { authResource := "FAKERESOURCE1" authType := "OAUTH" @@ -233,11 +276,6 @@ func testAccCheckAWSCodeBuildProjectDestroy(s *terraform.State) error { func testAccAWSCodeBuildProjectConfig_basic(rName, vpcConfig, vpcResources string) string { return fmt.Sprintf(` -resource "aws_s3_bucket" "foo" { - bucket = "tf-test-codebuild-%s" - acl = "private" -} - resource "aws_iam_role" "codebuild_role" { name = "codebuild-role-%s" assume_role_policy = < Date: Fri, 6 Apr 2018 10:49:45 -0400 Subject: [PATCH 0469/3316] resource/aws_cloudfront_distribution: Add cache_behavior field_level_encryption_id attribute --- ...nt_distribution_configuration_structure.go | 22 +++++++++++++------ aws/resource_aws_cloudfront_distribution.go | 8 +++++++ .../r/cloudfront_distribution.html.markdown | 2 ++ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/aws/cloudfront_distribution_configuration_structure.go b/aws/cloudfront_distribution_configuration_structure.go index 0a4baf88a5e..a4f3f986304 100644 --- a/aws/cloudfront_distribution_configuration_structure.go +++ b/aws/cloudfront_distribution_configuration_structure.go @@ -204,6 +204,9 @@ func defaultCacheBehaviorHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", m["target_origin_id"].(string))) buf.WriteString(fmt.Sprintf("%d-", forwardedValuesHash(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})))) buf.WriteString(fmt.Sprintf("%d-", m["min_ttl"].(int))) + if d, ok := m["field_level_encryption_id"]; ok && d.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", d.(string))) + } if d, ok := m["trusted_signers"]; ok { for _, e := range sortInterfaceSlice(d.([]interface{})) { buf.WriteString(fmt.Sprintf("%s-", e.(string))) @@ -266,13 +269,14 @@ func flattenCacheBehaviors(cbs *cloudfront.CacheBehaviors) *schema.Set { func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { cb := &cloudfront.CacheBehavior{ - Compress: aws.Bool(m["compress"].(bool)), - ViewerProtocolPolicy: aws.String(m["viewer_protocol_policy"].(string)), - TargetOriginId: aws.String(m["target_origin_id"].(string)), - ForwardedValues: expandForwardedValues(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})), - DefaultTTL: aws.Int64(int64(m["default_ttl"].(int))), - MaxTTL: aws.Int64(int64(m["max_ttl"].(int))), - MinTTL: aws.Int64(int64(m["min_ttl"].(int))), + Compress: aws.Bool(m["compress"].(bool)), + FieldLevelEncryptionId: aws.String(m["field_level_encryption_id"].(string)), + ViewerProtocolPolicy: aws.String(m["viewer_protocol_policy"].(string)), + TargetOriginId: aws.String(m["target_origin_id"].(string)), + ForwardedValues: expandForwardedValues(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})), + DefaultTTL: aws.Int64(int64(m["default_ttl"].(int))), + MaxTTL: aws.Int64(int64(m["max_ttl"].(int))), + MinTTL: aws.Int64(int64(m["min_ttl"].(int))), } if v, ok := m["trusted_signers"]; ok { @@ -304,6 +308,7 @@ func flattenCacheBehavior(cb *cloudfront.CacheBehavior) map[string]interface{} { m := make(map[string]interface{}) m["compress"] = *cb.Compress + m["field_level_encryption_id"] = aws.StringValue(cb.FieldLevelEncryptionId) m["viewer_protocol_policy"] = *cb.ViewerProtocolPolicy m["target_origin_id"] = *cb.TargetOriginId m["forwarded_values"] = schema.NewSet(forwardedValuesHash, []interface{}{flattenForwardedValues(cb.ForwardedValues)}) @@ -346,6 +351,9 @@ func cacheBehaviorHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", m["target_origin_id"].(string))) buf.WriteString(fmt.Sprintf("%d-", forwardedValuesHash(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})))) buf.WriteString(fmt.Sprintf("%d-", m["min_ttl"].(int))) + if d, ok := m["field_level_encryption_id"]; ok && d.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", d.(string))) + } if d, ok := m["trusted_signers"]; ok { for _, e := range sortInterfaceSlice(d.([]interface{})) { buf.WriteString(fmt.Sprintf("%s-", e.(string))) diff --git a/aws/resource_aws_cloudfront_distribution.go b/aws/resource_aws_cloudfront_distribution.go index 56a6113849c..216f46695f3 100644 --- a/aws/resource_aws_cloudfront_distribution.go +++ b/aws/resource_aws_cloudfront_distribution.go @@ -61,6 +61,10 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Optional: true, Default: 86400, }, + "field_level_encryption_id": { + Type: schema.TypeString, + Optional: true, + }, "forwarded_values": { Type: schema.TypeSet, Required: true, @@ -212,6 +216,10 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Optional: true, Default: 86400, }, + "field_level_encryption_id": { + Type: schema.TypeString, + Optional: true, + }, "forwarded_values": { Type: schema.TypeSet, Required: true, diff --git a/website/docs/r/cloudfront_distribution.html.markdown b/website/docs/r/cloudfront_distribution.html.markdown index d9eddd2344b..e31bc53c1b1 100644 --- a/website/docs/r/cloudfront_distribution.html.markdown +++ b/website/docs/r/cloudfront_distribution.html.markdown @@ -172,6 +172,8 @@ of several sub-resources - these resources are laid out below. in the absence of an `Cache-Control max-age` or `Expires` header. Defaults to 1 day. + * `field_level_encryption_id` (Optional) - Field level encryption configuration ID + * `forwarded_values` (Required) - The [forwarded values configuration](#forwarded-values-arguments) that specifies how CloudFront handles query strings, cookies and headers (maximum one). From 007e29ec1faa2bdbf16c9bc12cc2ba6309748e3b Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 6 Apr 2018 19:00:57 +0400 Subject: [PATCH 0470/3316] added acceptance test(for valid_until) --- ...resource_aws_spot_instance_request_test.go | 72 ------------------- 1 file changed, 72 deletions(-) diff --git a/aws/resource_aws_spot_instance_request_test.go b/aws/resource_aws_spot_instance_request_test.go index 7b48dff101f..108b172cfe0 100644 --- a/aws/resource_aws_spot_instance_request_test.go +++ b/aws/resource_aws_spot_instance_request_test.go @@ -124,34 +124,6 @@ func TestAccAWSSpotInstanceRequest_vpc(t *testing.T) { }) } -func TestAccAWSSpotInstanceRequest_validFrom(t *testing.T) { - var sir ec2.SpotInstanceRequest - rInt := acctest.RandInt() - validFrom := testAccAWSSpotInstanceRequestValidFrom(t) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSSpotInstanceRequestConfigValidFrom(rInt, validFrom), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSSpotInstanceRequestExists( - "aws_spot_instance_request.foo", &sir), - testAccCheckAWSSpotInstanceRequestAttributes(&sir), - testCheckKeyPair(fmt.Sprintf("tmp-key-%d", rInt), &sir), - testAccCheckAWSSpotInstanceRequestAttributesValidFrom(&sir, validFrom), - resource.TestCheckResourceAttr( - "aws_spot_instance_request.foo", "spot_bid_status", "fulfilled"), - resource.TestCheckResourceAttr( - "aws_spot_instance_request.foo", "spot_request_state", "active"), - ), - }, - }, - }) -} - func TestAccAWSSpotInstanceRequest_validUntil(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() @@ -240,10 +212,6 @@ func testCheckKeyPair(keyName string, sir *ec2.SpotInstanceRequest) resource.Tes } } -func testAccAWSSpotInstanceRequestValidFrom(t *testing.T) string { - return testAccAWSSpotInstanceRequestTime(t, "30m") -} - func testAccAWSSpotInstanceRequestValidUntil(t *testing.T) string { return testAccAWSSpotInstanceRequestTime(t, "12h") } @@ -375,16 +343,6 @@ func testAccCheckAWSSpotInstanceRequestAttributes( } } -func testAccCheckAWSSpotInstanceRequestAttributesValidFrom( - sir *ec2.SpotInstanceRequest, validFrom string) resource.TestCheckFunc { - return func(s *terraform.State) error { - if sir.ValidFrom.Format(time.RFC3339) != validFrom { - return fmt.Errorf("Unexpected valid_from time: %s", sir.ValidFrom.String()) - } - return nil - } -} - func testAccCheckAWSSpotInstanceRequestAttributesValidUntil( sir *ec2.SpotInstanceRequest, validUntil string) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -488,36 +446,6 @@ func testAccAWSSpotInstanceRequestConfig(rInt int) string { }`, rInt) } -func testAccAWSSpotInstanceRequestConfigValidFrom(rInt int, validFrom string) string { - return fmt.Sprintf(` - resource "aws_key_pair" "debugging" { - key_name = "tmp-key-%d" - public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" - } - - resource "aws_spot_instance_request" "foo" { - ami = "ami-4fccb37f" - instance_type = "m1.small" - key_name = "${aws_key_pair.debugging.key_name}" - - // base price is $0.044 hourly, so bidding above that should theoretically - // always fulfill - spot_price = "0.05" - - // The start date and time of the request, the default is to start fulfilling the request immediately. - // so 30 minutes from the current time will be valid time. - valid_from = "%s" - - // we wait for fulfillment because we want to inspect the launched instance - // and verify termination behavior - wait_for_fulfillment = true - - tags { - Name = "terraform-test" - } - }`, rInt, validFrom) -} - func testAccAWSSpotInstanceRequestConfigValidUntil(rInt int, validUntil string) string { return fmt.Sprintf(` resource "aws_key_pair" "debugging" { From 2fe19c772cc82620ad3be84d5eac031af88b7d52 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 12:04:11 -0400 Subject: [PATCH 0471/3316] tests/resource/aws_cloudfront_distribution: Add missing attribute to defaultCacheBehaviorConf --- aws/cloudfront_distribution_configuration_structure_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/cloudfront_distribution_configuration_structure_test.go b/aws/cloudfront_distribution_configuration_structure_test.go index a05300a6051..8af0b3f8758 100644 --- a/aws/cloudfront_distribution_configuration_structure_test.go +++ b/aws/cloudfront_distribution_configuration_structure_test.go @@ -23,6 +23,7 @@ func defaultCacheBehaviorConf() map[string]interface{} { "allowed_methods": allowedMethodsConf(), "cached_methods": cachedMethodsConf(), "compress": true, + "field_level_encryption_id": "", } } From 2e696c3ce9821705e6142be64292861d9c9d98d1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 12:19:59 -0400 Subject: [PATCH 0472/3316] Update CHANGELOG for #4092 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3808b68f801..3c80ee59db8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ FEATURES: ENHANCEMENTS: * provider: Fallback to SDK default credential chain if credentials not found using provider credential chain [GH-2883] +* data-source/aws_iam_role: Add `max_session_duration` attribute [GH-4092] * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] * resource/aws_iam_role: Add `max_session_duration` argument [GH-3977] From 91d8b1682bdd525abec38bfab274b5941f76fa79 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Fri, 6 Apr 2018 11:45:23 -0500 Subject: [PATCH 0473/3316] Regression test for #4090 This test demonstrates the bug in https://github.com/terraform-providers/terraform-provider-aws/issues/4090 --- aws/resource_aws_lambda_alias_test.go | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index f359157594d..d9770187b29 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -40,6 +40,44 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { }) } +func TestAccAWSLambdaAlias_nameupdate(t *testing.T) { + var conf lambda.AliasConfiguration + + rString := acctest.RandString(8) + roleName := fmt.Sprintf("tf_acc_role_lambda_alias_basic_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_alias_basic_%s", rString) + attachmentName := fmt.Sprintf("tf_acc_attachment_%s", rString) + funcName := fmt.Sprintf("tf_acc_lambda_func_alias_basic_%s", rString) + aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) + aliasNameUpdate := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", acctest.RandString(8)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsLambdaAliasDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), + ), + }, + resource.TestStep{ + Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasNameUpdate), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasNameUpdate+`$`)), + ), + }, + }, + }) +} + func testAccCheckAwsLambdaAliasDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).lambdaconn From f8bb65da42b8696f81ead55dee57ca61a64850e9 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Fri, 6 Apr 2018 11:46:09 -0500 Subject: [PATCH 0474/3316] Updating AWS Lambda Function Alias name should be a force new op The name functions as the "id" here, with regards to identifying the alias for an update operation --- aws/resource_aws_lambda_alias.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index 083225f3ad2..eff4d20c8af 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -34,6 +34,7 @@ func resourceAwsLambdaAlias() *schema.Resource { "name": &schema.Schema{ Type: schema.TypeString, Required: true, + ForceNew: true, }, "arn": &schema.Schema{ Type: schema.TypeString, From 84353e40d03ac9a66168ea07a9d4368c9e45189e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 12:48:01 -0400 Subject: [PATCH 0475/3316] Update CHANGELOG for #2860 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c80ee59db8..cd8bddbfea3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ENHANCEMENTS: * provider: Fallback to SDK default credential chain if credentials not found using provider credential chain [GH-2883] * data-source/aws_iam_role: Add `max_session_duration` attribute [GH-4092] +* resource/aws_codebuild_project: Support `cache` configuration [GH-2860] * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] * resource/aws_iam_role: Add `max_session_duration` argument [GH-3977] From 470e8c247d15ed5dc1947d432a8079d2d56b2220 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 13:02:59 -0400 Subject: [PATCH 0476/3316] Update CHANGELOG for #4102 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd8bddbfea3..9ca64fda64d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ENHANCEMENTS: * provider: Fallback to SDK default credential chain if credentials not found using provider credential chain [GH-2883] * data-source/aws_iam_role: Add `max_session_duration` attribute [GH-4092] +* resource/aws_cloudfront_distribution: Add cache_behavior `field_level_encryption_id` attribute [GH-4102] * resource/aws_codebuild_project: Support `cache` configuration [GH-2860] * resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] * resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] From b3fb3db28c722c145398c7080746e035ec307165 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Fri, 6 Apr 2018 17:53:51 +0000 Subject: [PATCH 0477/3316] v1.14.0 --- CHANGELOG.md | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca64fda64d..f40f58ae54d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.14.0 (Unreleased) +## 1.14.0 (April 06, 2018) NOTES: @@ -6,37 +6,37 @@ NOTES: FEATURES: -* **New Resource:** `aws_organizations_account` [GH-3524] -* **New Resource:** `aws_ses_identity_notification_topic` [GH-2640] +* **New Resource:** `aws_organizations_account` ([#3524](https://github.com/terraform-providers/terraform-provider-aws/issues/3524)) +* **New Resource:** `aws_ses_identity_notification_topic` ([#2640](https://github.com/terraform-providers/terraform-provider-aws/issues/2640)) ENHANCEMENTS: -* provider: Fallback to SDK default credential chain if credentials not found using provider credential chain [GH-2883] -* data-source/aws_iam_role: Add `max_session_duration` attribute [GH-4092] -* resource/aws_cloudfront_distribution: Add cache_behavior `field_level_encryption_id` attribute [GH-4102] -* resource/aws_codebuild_project: Support `cache` configuration [GH-2860] -* resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration [GH-3932] -* resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts [GH-3932] -* resource/aws_iam_role: Add `max_session_duration` argument [GH-3977] -* resource/aws_kinesis_firehose_delivery_stream: Add Elasticsearch destination processing configuration support [GH-3621] -* resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support [GH-2987] -* resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support [GH-3944] -* resource/aws_lambda_function: Support `nodejs8.10` runtime [GH-4020] -* resource/aws_launch_configuration: Add support for `ebs_block_device.*.no_device` [GH-4070] -* resource/aws_ssm_maintenance_window_target: Make resource updatable [GH-4074] -* resource/aws_wafregional_rule: Validate all predicate types [GH-4046] +* provider: Fallback to SDK default credential chain if credentials not found using provider credential chain ([#2883](https://github.com/terraform-providers/terraform-provider-aws/issues/2883)) +* data-source/aws_iam_role: Add `max_session_duration` attribute ([#4092](https://github.com/terraform-providers/terraform-provider-aws/issues/4092)) +* resource/aws_cloudfront_distribution: Add cache_behavior `field_level_encryption_id` attribute ([#4102](https://github.com/terraform-providers/terraform-provider-aws/issues/4102)) +* resource/aws_codebuild_project: Support `cache` configuration ([#2860](https://github.com/terraform-providers/terraform-provider-aws/issues/2860)) +* resource/aws_elasticache_replication_group: Support Cluster Mode Enabled online shard reconfiguration ([#3932](https://github.com/terraform-providers/terraform-provider-aws/issues/3932)) +* resource/aws_elasticache_replication_group: Configurable create, update, and delete timeouts ([#3932](https://github.com/terraform-providers/terraform-provider-aws/issues/3932)) +* resource/aws_iam_role: Add `max_session_duration` argument ([#3977](https://github.com/terraform-providers/terraform-provider-aws/issues/3977)) +* resource/aws_kinesis_firehose_delivery_stream: Add Elasticsearch destination processing configuration support ([#3621](https://github.com/terraform-providers/terraform-provider-aws/issues/3621)) +* resource/aws_kinesis_firehose_delivery_stream: Add Extended S3 destination backup mode support ([#2987](https://github.com/terraform-providers/terraform-provider-aws/issues/2987)) +* resource/aws_kinesis_firehose_delivery_stream: Add Splunk destination processing configuration support ([#3944](https://github.com/terraform-providers/terraform-provider-aws/issues/3944)) +* resource/aws_lambda_function: Support `nodejs8.10` runtime ([#4020](https://github.com/terraform-providers/terraform-provider-aws/issues/4020)) +* resource/aws_launch_configuration: Add support for `ebs_block_device.*.no_device` ([#4070](https://github.com/terraform-providers/terraform-provider-aws/issues/4070)) +* resource/aws_ssm_maintenance_window_target: Make resource updatable ([#4074](https://github.com/terraform-providers/terraform-provider-aws/issues/4074)) +* resource/aws_wafregional_rule: Validate all predicate types ([#4046](https://github.com/terraform-providers/terraform-provider-aws/issues/4046)) BUG FIXES: -* resource/aws_cognito_user_pool: Trim `custom:` prefix of `developer_only_attribute = false` schema attributes [GH-4041] -* resource/aws_cognito_user_pool: Fix `email_message_by_link` max length validation [GH-4051] -* resource/aws_elasticache_replication_group: Properly set `cluster_mode` in state [GH-3932] -* resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` [GH-3989] -* resource/aws_kinesis_firehose_delivery_stream: Prevent additional crash scenarios with optional configurations [GH-4047] -* resource/aws_lambda_function: IAM retry for "The role defined for the function cannot be assumed by Lambda" on update [GH-3988] -* resource/aws_lb: Suppress differences for non-applicable attributes [GH-4032] -* resource/aws_rds_cluster_instance: Prevent crash on importing non-cluster instances [GH-3961] -* resource/aws_route53_record: Fix ListResourceRecordSet pagination [GH-3900] +* resource/aws_cognito_user_pool: Trim `custom:` prefix of `developer_only_attribute = false` schema attributes ([#4041](https://github.com/terraform-providers/terraform-provider-aws/issues/4041)) +* resource/aws_cognito_user_pool: Fix `email_message_by_link` max length validation ([#4051](https://github.com/terraform-providers/terraform-provider-aws/issues/4051)) +* resource/aws_elasticache_replication_group: Properly set `cluster_mode` in state ([#3932](https://github.com/terraform-providers/terraform-provider-aws/issues/3932)) +* resource/aws_iam_user_login_profile: Changed password generation to use `crypto/rand` ([#3989](https://github.com/terraform-providers/terraform-provider-aws/issues/3989)) +* resource/aws_kinesis_firehose_delivery_stream: Prevent additional crash scenarios with optional configurations ([#4047](https://github.com/terraform-providers/terraform-provider-aws/issues/4047)) +* resource/aws_lambda_function: IAM retry for "The role defined for the function cannot be assumed by Lambda" on update ([#3988](https://github.com/terraform-providers/terraform-provider-aws/issues/3988)) +* resource/aws_lb: Suppress differences for non-applicable attributes ([#4032](https://github.com/terraform-providers/terraform-provider-aws/issues/4032)) +* resource/aws_rds_cluster_instance: Prevent crash on importing non-cluster instances ([#3961](https://github.com/terraform-providers/terraform-provider-aws/issues/3961)) +* resource/aws_route53_record: Fix ListResourceRecordSet pagination ([#3900](https://github.com/terraform-providers/terraform-provider-aws/issues/3900)) ## 1.13.0 (March 28, 2018) From d0e0453ac2cfdf8f663aa935704ff5acd1af8a1d Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Fri, 6 Apr 2018 18:00:29 +0000 Subject: [PATCH 0478/3316] Cleanup after v1.14.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f40f58ae54d..97c4f5442cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.14.1 (Unreleased) ## 1.14.0 (April 06, 2018) NOTES: From a5b699864df73ea0ca72731a6045d2103322c82b Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Fri, 6 Apr 2018 19:27:02 +0000 Subject: [PATCH 0479/3316] New Resource: aws_ses_domain_identity_verification --- aws/provider.go | 1 + ...ce_aws_ses_domain_identity_verification.go | 117 ++++++++++++ ...s_ses_domain_identity_verification_test.go | 176 ++++++++++++++++++ website/aws.erb | 4 + ...domain_identity_verification.html.markdown | 57 ++++++ 5 files changed, 355 insertions(+) create mode 100644 aws/resource_aws_ses_domain_identity_verification.go create mode 100644 aws/resource_aws_ses_domain_identity_verification_test.go create mode 100644 website/docs/r/ses_domain_identity_verification.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 682ed272fdb..d2d844557e3 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -482,6 +482,7 @@ func Provider() terraform.ResourceProvider { "aws_route_table_association": resourceAwsRouteTableAssociation(), "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), diff --git a/aws/resource_aws_ses_domain_identity_verification.go b/aws/resource_aws_ses_domain_identity_verification.go new file mode 100644 index 00000000000..b012fdfe9f5 --- /dev/null +++ b/aws/resource_aws_ses_domain_identity_verification.go @@ -0,0 +1,117 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/ses" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSesDomainIdentityVerification() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSesDomainIdentityVerificationCreate, + Read: resourceAwsSesDomainIdentityVerificationRead, + Delete: resourceAwsSesDomainIdentityVerificationDelete, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(45 * time.Minute), + }, + } +} + +func getAttributes(conn *ses.SES, domainName string) (*ses.IdentityVerificationAttributes, error) { + input := &ses.GetIdentityVerificationAttributesInput{ + Identities: []*string{ + aws.String(domainName), + }, + } + + response, err := conn.GetIdentityVerificationAttributes(input) + if err != nil { + return nil, fmt.Errorf("Error getting identity verification attributes: %s", err) + } + + return response.VerificationAttributes[domainName], nil +} + +func resourceAwsSesDomainIdentityVerificationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + domainName := strings.TrimSuffix(d.Get("domain").(string), ".") + return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + att, err := getAttributes(conn, domainName) + if err != nil { + return resource.NonRetryableError(fmt.Errorf("Error getting identity validation attributes: %s", err)) + } + + if att == nil { + return resource.NonRetryableError(fmt.Errorf("SES Domain Identity %s not found in AWS", domainName)) + } + + if *att.VerificationStatus != "Success" { + return resource.RetryableError(fmt.Errorf("Expected domain verification Success, but was in state %s", *att.VerificationStatus)) + } + + log.Printf("[INFO] Domain verification successful for %s", domainName) + d.SetId(domainName) + return resource.NonRetryableError(resourceAwsSesDomainIdentityVerificationRead(d, meta)) + }) +} + +func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sesConn + + domainName := d.Id() + d.Set("domain", domainName) + + att, err := getAttributes(conn, domainName) + if err != nil { + log.Printf("[WARN] Error fetching identity verification attrubtes for %s: %s", d.Id(), err) + return err + } + + if att == nil { + log.Printf("[WARN] Domain not listed in response when fetching verification attributes for %s", d.Id()) + d.SetId("") + return nil + } + + if *att.VerificationStatus != "Success" { + log.Printf("[WARN] Expected domain verification Success, but was %s, tainting validation", *att.VerificationStatus) + d.SetId("") + return nil + } + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ses", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("identity/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return nil +} + +func resourceAwsSesDomainIdentityVerificationDelete(d *schema.ResourceData, meta interface{}) error { + // No need to do anything, domain identity will be deleted when aws_ses_domain_identity is deleted + d.SetId("") + return nil +} diff --git a/aws/resource_aws_ses_domain_identity_verification_test.go b/aws/resource_aws_ses_domain_identity_verification_test.go new file mode 100644 index 00000000000..2749568df0d --- /dev/null +++ b/aws/resource_aws_ses_domain_identity_verification_test.go @@ -0,0 +1,176 @@ +package aws + +import ( + "fmt" + "os" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/ses" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func testAccAwsSesDomainIdentityDomainFromEnv(t *testing.T) string { + rootDomain := os.Getenv("SES_DOMAIN_IDENTITY_ROOT_DOMAIN") + if rootDomain == "" { + t.Skip( + "Environment variable SES_DOMAIN_IDENTITY_ROOT_DOMAIN is not set. " + + "For DNS verification requests, this domain must be publicly " + + "accessible and configurable via Route53 during the testing. ") + } + return rootDomain +} + +func TestAccAwsSesDomainIdentityVerification_basic(t *testing.T) { + rootDomain := testAccAwsSesDomainIdentityDomainFromEnv(t) + domain := fmt.Sprintf("tf-acc-%d.%s", acctest.RandInt(), rootDomain) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSesDomainIdentityVerification_basic(rootDomain, domain), + Check: testAccCheckAwsSesDomainIdentityVerificationPassed("aws_ses_domain_identity_verification.test"), + }, + }, + }) +} + +func TestAccAwsSesDomainIdentityVerification_timeout(t *testing.T) { + domain := fmt.Sprintf( + "%s.terraformtesting.com", + acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSesDomainIdentityVerification_timeout(domain), + ExpectError: regexp.MustCompile("Expected domain verification Success, but was in state Pending"), + }, + }, + }) +} + +func TestAccAwsSesDomainIdentityVerification_nonexistent(t *testing.T) { + domain := fmt.Sprintf( + "%s.terraformtesting.com", + acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSesDomainIdentityVerification_nonexistent(domain), + ExpectError: regexp.MustCompile(fmt.Sprintf("SES Domain Identity %s not found in AWS", domain)), + }, + }, + }) +} + +func testAccCheckAwsSesDomainIdentityVerificationPassed(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("SES Domain Identity not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("SES Domain Identity name not set") + } + + domain := rs.Primary.ID + awsClient := testAccProvider.Meta().(*AWSClient) + conn := awsClient.sesConn + + params := &ses.GetIdentityVerificationAttributesInput{ + Identities: []*string{ + aws.String(domain), + }, + } + + response, err := conn.GetIdentityVerificationAttributes(params) + if err != nil { + return err + } + + if response.VerificationAttributes[domain] == nil { + return fmt.Errorf("SES Domain Identity %s not found in AWS", domain) + } + + if *response.VerificationAttributes[domain].VerificationStatus != "Success" { + return fmt.Errorf("SES Domain Identity %s not successfully verified.", domain) + } + + expected := arn.ARN{ + AccountID: awsClient.accountid, + Partition: awsClient.partition, + Region: awsClient.region, + Resource: fmt.Sprintf("identity/%s", domain), + Service: "ses", + } + + if rs.Primary.Attributes["arn"] != expected.String() { + return fmt.Errorf("Incorrect ARN: expected %q, got %q", expected, rs.Primary.Attributes["arn"]) + } + + return nil + } +} + +func testAccAwsSesDomainIdentityVerification_basic(rootDomain string, domain string) string { + return fmt.Sprintf(` +resource "aws_route53_zone" "zone" { + name = "%s." +} + +resource "aws_ses_domain_identity" "test" { + domain = "%s" +} + +resource "aws_route53_record" "domain_identity_verification" { + zone_id = "${aws_route53_zone.zone.zone_id}" + name = "_amazonses.${aws_ses_domain_identity.test.id}" + type = "TXT" + ttl = "600" + records = ["${aws_ses_domain_identity.test.verification_token}"] +} + +resource "aws_ses_domain_identity_verification" "test" { + domain = "${aws_ses_domain_identity.test.id}" +} +`, rootDomain, domain) +} + +func testAccAwsSesDomainIdentityVerification_timeout(domain string) string { + return fmt.Sprintf(` +resource "aws_ses_domain_identity" "test" { + domain = "%s" +} + +resource "aws_ses_domain_identity_verification" "test" { + domain = "${aws_ses_domain_identity.test.id}" + timeouts { + create = "5s" + } +} +`, domain) +} + +func testAccAwsSesDomainIdentityVerification_nonexistent(domain string) string { + return fmt.Sprintf(` +resource "aws_ses_domain_identity_verification" "test" { + domain = "%s" +} +`, domain) +} diff --git a/website/aws.erb b/website/aws.erb index 10ba486f806..377b015968e 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1652,6 +1652,10 @@ aws_ses_domain_identity + > + aws_ses_domain_identity_verification + + > aws_ses_domain_dkim diff --git a/website/docs/r/ses_domain_identity_verification.html.markdown b/website/docs/r/ses_domain_identity_verification.html.markdown new file mode 100644 index 00000000000..0cbd60ad354 --- /dev/null +++ b/website/docs/r/ses_domain_identity_verification.html.markdown @@ -0,0 +1,57 @@ +--- +layout: "aws" +page_title: "AWS: ses_domain_identity_verification" +sidebar_current: "docs-aws-resource-ses-domain-identity-verification" +description: |- + Waits for and checks successful verification of an SES domain identity. +--- + +# aws_ses_domain_identity_verification + +Represents a successful verification of an SES domain identity. + +Most commonly, this resource is used together with [`aws_route53_record`](route53_record.html) and +[`aws_ses_domain_identity`](ses_domain_identity.html) to request an SES domain identity, +deploy the required DNS verification records, and wait for verification to complete. + +~> **WARNING:** This resource implements a part of the verification workflow. It does not represent a real-world entity in AWS, therefore changing or deleting this resource on its own has no immediate effect. + +## Argument Reference + +The following arguments are supported: + +* `domain` - (Required) The domain name of the SES domain identity to verify. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The domain name of the domain identity. +* `arn` - The ARN of the domain identity. + +## Timeouts + +`acm_ses_domain_identity_verification` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) +configuration options: + +- `create` - (Default `45m`) How long to wait for a domain identity to be verified. + +## Example Usage + +```hcl +resource "aws_ses_domain_identity" "example" { + domain = "example.com" +} + +resource "aws_route53_record" "example_amazonses_verification_record" { + zone_id = "ABCDEFGHIJ123" + name = "_amazonses.example.com" + type = "TXT" + ttl = "600" + records = ["${aws_ses_domain_identity.example.verification_token}"] +} + +resource "aws_ses_domain_identity_verification" "example_verification" { + domain = "${aws_ses_domain_identity.example.id}" +} +``` From 4752aa472c70683691b832a3e84c5c4f9e9d9883 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Apr 2018 15:39:44 -0400 Subject: [PATCH 0480/3316] docs/resource/aws_appautoscaling_target: Link to aws_appautoscaling_policy resource --- website/docs/r/appautoscaling_target.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/appautoscaling_target.html.markdown b/website/docs/r/appautoscaling_target.html.markdown index 273ce3d59e2..ffaf0397934 100644 --- a/website/docs/r/appautoscaling_target.html.markdown +++ b/website/docs/r/appautoscaling_target.html.markdown @@ -8,7 +8,7 @@ description: |- # aws_appautoscaling_target -Provides an Application AutoScaling ScalableTarget resource. +Provides an Application AutoScaling ScalableTarget resource. To manage policies which get attached to the target, see the [`aws_appautoscaling_policy` resource](/docs/providers/aws/r/appautoscaling_policy.html). ## Example Usage From 5a90bc0bd10f425e81fa288744f7b58c1fbe4f95 Mon Sep 17 00:00:00 2001 From: Kentaro Terada Date: Sat, 7 Apr 2018 10:37:52 +0900 Subject: [PATCH 0481/3316] Add enabled_cloudwatch_logs_exports attributes for aws_db_instance --- aws/resource_aws_db_instance.go | 85 +++++++ aws/resource_aws_db_instance_test.go | 317 +++++++++++++++++++++++++++ 2 files changed, 402 insertions(+) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index b2434659373..4ed3389378f 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -14,6 +14,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsDbInstance() *schema.Resource { @@ -351,6 +352,21 @@ func resourceAwsDbInstance() *schema.Resource { Computed: true, }, + "enabled_cloudwatch_logs_exports": { + Type: schema.TypeList, + Computed: false, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + "audit", + "error", + "general", + "slowquery", + }, false), + }, + }, + "tags": tagsSchema(), }, } @@ -408,6 +424,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + if attr, ok := d.GetOk("kms_key_id"); ok { opts.KmsKeyId = aws.String(attr.(string)) if arnParts := strings.Split(v.(string), ":"); len(arnParts) >= 4 { @@ -462,6 +482,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + if attr, ok := d.GetOk("engine"); ok { opts.Engine = aws.String(attr.(string)) } @@ -628,6 +652,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + if attr, ok := d.GetOk("iops"); ok { opts.Iops = aws.Int64(int64(attr.(int))) } @@ -775,6 +803,10 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("monitoring_role_arn", v.MonitoringRoleArn) } + if v.EnabledCloudwatchLogsExports != nil { + d.Set("enabled_cloudwatch_logs_exports", v.EnabledCloudwatchLogsExports) + } + // list tags for resource // set tags conn := meta.(*AWSClient).rdsconn @@ -1020,6 +1052,12 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("enabled_cloudwatch_logs_exports") && !d.IsNewResource() { + d.SetPartial("enabled_cloudwatch_logs_exports") + req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) + requestUpdate = true + } + if d.HasChange("iam_database_authentication_enabled") { req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) requestUpdate = true @@ -1151,10 +1189,55 @@ func resourceAwsDbInstanceStateRefreshFunc(id string, conn *rds.RDS) resource.St } } +func buildRDSARN(identifier, partition, accountid, region string) (string, error) { + if partition == "" { + return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS partition") + } + if accountid == "" { + return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS Account ID") + } + arn := fmt.Sprintf("arn:%s:rds:%s:%s:db:%s", partition, region, accountid, identifier) + return arn, nil +} + +func buildCloudwatchLogsExportConfiguration(d *schema.ResourceData) *rds.CloudwatchLogsExportConfiguration { + + oraw, nraw := d.GetChange("enabled_cloudwatch_logs_exports") + o := oraw.([]interface{}) + n := nraw.([]interface{}) + + create, disable := diffCloudwatchLogsExportConfiguration(o, n) + + return &rds.CloudwatchLogsExportConfiguration{ + EnableLogTypes: expandStringList(create), + DisableLogTypes: expandStringList(disable), + } +} + +func diffCloudwatchLogsExportConfiguration(old, new []interface{}) ([]interface{}, []interface{}) { + create := make([]interface{}, 0) + disable := make([]interface{}, 0) + + for _, n := range new { + if _, contains := sliceContainsString(old, n.(string)); !contains { + create = append(create, n) + } + } + + for _, o := range old { + if _, contains := sliceContainsString(new, o.(string)); !contains { + disable = append(disable, o) + } + } + + return create, disable +} + // Database instance status: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Status.html var resourceAwsDbInstanceCreatePendingStates = []string{ "backing-up", "configuring-enhanced-monitoring", + "configuring-log-exports", "creating", "maintenance", "modifying", @@ -1170,6 +1253,7 @@ var resourceAwsDbInstanceDeletePendingStates = []string{ "available", "backing-up", "configuring-enhanced-monitoring", + "configuring-log-exports", "creating", "deleting", "incompatible-parameters", @@ -1183,6 +1267,7 @@ var resourceAwsDbInstanceDeletePendingStates = []string{ var resourceAwsDbInstanceUpdatePendingStates = []string{ "backing-up", "configuring-enhanced-monitoring", + "configuring-log-exports", "creating", "maintenance", "modifying", diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index ab07c980f34..42490f89c8f 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -107,6 +107,10 @@ func TestAccAWSDBInstance_basic(t *testing.T) { "aws_db_instance.bar", "username", "foo"), resource.TestCheckResourceAttr( "aws_db_instance.bar", "parameter_group_name", "default.mysql5.6"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.0", "audit"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.1", "error"), resource.TestCheckResourceAttrSet("aws_db_instance.bar", "hosted_zone_id"), resource.TestCheckResourceAttrSet("aws_db_instance.bar", "ca_cert_identifier"), resource.TestCheckResourceAttrSet( @@ -496,6 +500,82 @@ func TestAccAWSDBInstance_ec2Classic(t *testing.T) { }) } +func TestAccAWSDBInstance_cloudwatchLogsExportConfiguration(t *testing.T) { + var v rds.DBInstance + + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfigCloudwatchLogsExportConfiguration(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), + ), + }, + }, + }) +} + +func TestAccAWSDBInstance_cloudwatchLogsExportConfigurationUpdate(t *testing.T) { + var v rds.DBInstance + + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDBInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDBInstanceConfigCloudwatchLogsExportConfiguration(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.0", "audit"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.1", "error"), + ), + }, + { + Config: testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationAdd(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.0", "audit"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.1", "error"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.2", "general"), + ), + }, + { + Config: testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationModify(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.0", "audit"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.1", "general"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.2", "slowquery"), + ), + }, + { + Config: testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationDelete(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), + resource.TestCheckNoResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.0"), + ), + }, + }, + }) +} + func testAccCheckAWSDBInstanceDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).rdsconn @@ -777,6 +857,11 @@ resource "aws_db_instance" "bar" { timeouts { create = "30m" } + + enabled_cloudwatch_logs_exports = [ + "audit", + "error", + ] }` const testAccAWSDBInstanceConfig_namePrefix = ` @@ -1436,6 +1521,238 @@ resource "aws_db_instance" "bar" { } `, acctest.RandInt()) +func testAccAWSDBInstanceConfigCloudwatchLogsExportConfiguration(rInt int) string { + return fmt.Sprintf(` + + resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + enable_dns_hostnames = true + tags { + Name = "terraform-testacc-db-instance-mssql-timezone" + } + } + + resource "aws_db_subnet_group" "rds_one" { + name = "tf_acc_test_%d" + description = "db subnets for rds_one" + + subnet_ids = ["${aws_subnet.main.id}", "${aws_subnet.other.id}"] + } + + resource "aws_subnet" "main" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2a" + cidr_block = "10.1.1.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-main" + } + } + + resource "aws_subnet" "other" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2b" + cidr_block = "10.1.2.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-other" + } + } + + resource "aws_db_instance" "bar" { + identifier = "foobarbaz-test-terraform-%d" + + db_subnet_group_name = "${aws_db_subnet_group.rds_one.name}" + allocated_storage = 10 + engine = "MySQL" + engine_version = "5.6" + instance_class = "db.t2.micro" + name = "baz" + password = "barbarbarbar" + username = "foo" + skip_final_snapshot = true + + enabled_cloudwatch_logs_exports = [ + "audit", + "error", + ] + } + `, rInt, rInt) +} + +func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationAdd(rInt int) string { + return fmt.Sprintf(` + + resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + enable_dns_hostnames = true + tags { + Name = "terraform-testacc-db-instance-mssql-timezone" + } + } + + resource "aws_db_subnet_group" "rds_one" { + name = "tf_acc_test_%d" + description = "db subnets for rds_one" + + subnet_ids = ["${aws_subnet.main.id}", "${aws_subnet.other.id}"] + } + + resource "aws_subnet" "main" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2a" + cidr_block = "10.1.1.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-main" + } + } + + resource "aws_subnet" "other" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2b" + cidr_block = "10.1.2.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-other" + } + } + + resource "aws_db_instance" "bar" { + identifier = "foobarbaz-test-terraform-%d" + + db_subnet_group_name = "${aws_db_subnet_group.rds_one.name}" + allocated_storage = 10 + engine = "MySQL" + engine_version = "5.6" + instance_class = "db.t2.micro" + name = "baz" + password = "barbarbarbar" + username = "foo" + skip_final_snapshot = true + + apply_immediately = true + + enabled_cloudwatch_logs_exports = [ + "audit", + "error", + "general", + ] + } + `, rInt, rInt) +} + +func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationModify(rInt int) string { + return fmt.Sprintf(` + + resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + enable_dns_hostnames = true + tags { + Name = "terraform-testacc-db-instance-mssql-timezone" + } + } + + resource "aws_db_subnet_group" "rds_one" { + name = "tf_acc_test_%d" + description = "db subnets for rds_one" + + subnet_ids = ["${aws_subnet.main.id}", "${aws_subnet.other.id}"] + } + + resource "aws_subnet" "main" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2a" + cidr_block = "10.1.1.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-main" + } + } + + resource "aws_subnet" "other" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2b" + cidr_block = "10.1.2.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-other" + } + } + + resource "aws_db_instance" "bar" { + identifier = "foobarbaz-test-terraform-%d" + + db_subnet_group_name = "${aws_db_subnet_group.rds_one.name}" + allocated_storage = 10 + engine = "MySQL" + engine_version = "5.6" + instance_class = "db.t2.micro" + name = "baz" + password = "barbarbarbar" + username = "foo" + skip_final_snapshot = true + + apply_immediately = true + + enabled_cloudwatch_logs_exports = [ + "audit", + "general", + "slowquery", + ] + } + `, rInt, rInt) +} + +func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationDelete(rInt int) string { + return fmt.Sprintf(` + + resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + enable_dns_hostnames = true + tags { + Name = "terraform-testacc-db-instance-mssql-timezone" + } + } + + resource "aws_db_subnet_group" "rds_one" { + name = "tf_acc_test_%d" + description = "db subnets for rds_one" + + subnet_ids = ["${aws_subnet.main.id}", "${aws_subnet.other.id}"] + } + + resource "aws_subnet" "main" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2a" + cidr_block = "10.1.1.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-main" + } + } + + resource "aws_subnet" "other" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "us-west-2b" + cidr_block = "10.1.2.0/24" + tags { + Name = "tf-acc-db-instance-mssql-timezone-other" + } + } + + resource "aws_db_instance" "bar" { + identifier = "foobarbaz-test-terraform-%d" + + db_subnet_group_name = "${aws_db_subnet_group.rds_one.name}" + allocated_storage = 10 + engine = "MySQL" + engine_version = "5.6" + instance_class = "db.t2.micro" + name = "baz" + password = "barbarbarbar" + username = "foo" + skip_final_snapshot = true + + apply_immediately = true + + } + `, rInt, rInt) +} + func testAccAWSDBInstanceConfigEc2Classic(rInt int) string { return fmt.Sprintf(` resource "aws_db_instance" "bar" { From df587f3ae4124f96b9774bfa0d468e554dad991a Mon Sep 17 00:00:00 2001 From: Kentaro Terada Date: Sat, 7 Apr 2018 23:56:58 +0900 Subject: [PATCH 0482/3316] Update db_instance resources docs --- website/docs/r/db_instance.html.markdown | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 96d55357a80..f9e64bae8d4 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -87,6 +87,8 @@ Default is `false`. * `db_subnet_group_name` - (Optional) Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the `default` VPC, or in EC2 Classic, if available. +* `enabled_cloudwatch_logs_exports` - (Optional) Name list of enable log type for exporting to cloudwatch logs. If omitted, any logs will not be exported to cloudwatch logs. + Either of the following is supported: `audit`, `error`, `general`, `slowquery`. * `engine` - (Required unless a `snapshot_identifier` or `replicate_source_db` is provided) The database engine to use. * `engine_version` - (Optional) The engine version to use. If `auto_minor_version_upgrade` @@ -135,9 +137,9 @@ logs, and it will be stored in the state file. accessible. Default is `false`. * `replicate_source_db` - (Optional) Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the -`identifier` of another Amazon RDS Database to replicate. Note that if you are +`identifier` of another Amazon RDS Database to replicate. Note that if you are creating a cross-region replica of an encrypted database you will also need to -specify a `kms_key_id`. See [DB Instance Replication][1] and [Working with +specify a `kms_key_id`. See [DB Instance Replication][1] and [Working with PostgreSQL and MySQL Read Replicas](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html) for more information on using Replication. * `security_group_names` - (Optional/Deprecated) List of DB Security Groups to @@ -151,9 +153,9 @@ is `false`. * `snapshot_identifier` - (Optional) Specifies whether or not to create this database from a snapshot. This correlates to the snapshot ID you'd find in the RDS console, e.g: rds:production-2015-06-26-06-05. -* `storage_encrypted` - (Optional) Specifies whether the DB instance is -encrypted. Note that if you are creating a cross-region read replica this field -is ignored and you should instead declare `kms_key_id` with a valid ARN. The +* `storage_encrypted` - (Optional) Specifies whether the DB instance is +encrypted. Note that if you are creating a cross-region read replica this field +is ignored and you should instead declare `kms_key_id` with a valid ARN. The default is `false` if not specified. * `storage_type` - (Optional) One of "standard" (magnetic), "gp2" (general purpose SSD), or "io1" (provisioned IOPS SSD). The default is "io1" if `iops` is From 0a412c1ab0e37d96fa45e3943c646658dff0d5bc Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Sat, 7 Apr 2018 17:58:30 +0000 Subject: [PATCH 0483/3316] Rename getAttributes to getAwsSesIdentityVerificationAttributes. Fix log messages by consistently using "verification" instead of "validation" for the aws_ses_domain_identity_verification resource. --- aws/resource_aws_ses_domain_identity_verification.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_ses_domain_identity_verification.go b/aws/resource_aws_ses_domain_identity_verification.go index b012fdfe9f5..563ded2a54c 100644 --- a/aws/resource_aws_ses_domain_identity_verification.go +++ b/aws/resource_aws_ses_domain_identity_verification.go @@ -36,7 +36,7 @@ func resourceAwsSesDomainIdentityVerification() *schema.Resource { } } -func getAttributes(conn *ses.SES, domainName string) (*ses.IdentityVerificationAttributes, error) { +func getAwsSesIdentityVerificationAttributes(conn *ses.SES, domainName string) (*ses.IdentityVerificationAttributes, error) { input := &ses.GetIdentityVerificationAttributesInput{ Identities: []*string{ aws.String(domainName), @@ -55,9 +55,9 @@ func resourceAwsSesDomainIdentityVerificationCreate(d *schema.ResourceData, meta conn := meta.(*AWSClient).sesConn domainName := strings.TrimSuffix(d.Get("domain").(string), ".") return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - att, err := getAttributes(conn, domainName) + att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) if err != nil { - return resource.NonRetryableError(fmt.Errorf("Error getting identity validation attributes: %s", err)) + return resource.NonRetryableError(fmt.Errorf("Error getting identity verification attributes: %s", err)) } if att == nil { @@ -80,7 +80,7 @@ func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta i domainName := d.Id() d.Set("domain", domainName) - att, err := getAttributes(conn, domainName) + att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) if err != nil { log.Printf("[WARN] Error fetching identity verification attrubtes for %s: %s", d.Id(), err) return err @@ -93,7 +93,7 @@ func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta i } if *att.VerificationStatus != "Success" { - log.Printf("[WARN] Expected domain verification Success, but was %s, tainting validation", *att.VerificationStatus) + log.Printf("[WARN] Expected domain verification Success, but was %s, tainting verification", *att.VerificationStatus) d.SetId("") return nil } From 35e7f938b6bf95202d01262d235b93b8c0971f5b Mon Sep 17 00:00:00 2001 From: Robin Joseph Date: Sun, 14 Jan 2018 01:27:12 -0800 Subject: [PATCH 0484/3316] New Resource: aws_iam_service_linked_role --- aws/provider.go | 1 + aws/resource_aws_iam_service_linked_role.go | 175 ++++++++++++++++++ ...source_aws_iam_service_linked_role_test.go | 98 ++++++++++ website/aws.erb | 4 + .../r/iam_service_linked_role.html.markdown | 44 +++++ 5 files changed, 322 insertions(+) create mode 100644 aws/resource_aws_iam_service_linked_role.go create mode 100644 aws/resource_aws_iam_service_linked_role_test.go create mode 100644 website/docs/r/iam_service_linked_role.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 81a1dc110aa..81fc91acfb8 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -377,6 +377,7 @@ func Provider() terraform.ResourceProvider { "aws_iam_role": resourceAwsIamRole(), "aws_iam_saml_provider": resourceAwsIamSamlProvider(), "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), "aws_iam_user_policy": resourceAwsIamUserPolicy(), "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), diff --git a/aws/resource_aws_iam_service_linked_role.go b/aws/resource_aws_iam_service_linked_role.go new file mode 100644 index 00000000000..a1b80a0e4dc --- /dev/null +++ b/aws/resource_aws_iam_service_linked_role.go @@ -0,0 +1,175 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsIamServiceLinkedRole() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsIamServiceLinkedRoleCreate, + Read: resourceAwsIamServiceLinkedRoleRead, + Delete: resourceAwsIamServiceLinkedRoleDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "aws_service_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value := v.(string) + if !strings.HasSuffix(value, ".amazonaws.com") { + es = append(es, fmt.Errorf( + "%q must be a service URL e.g. elasticbeanstalk.amazonaws.com", k)) + } + return + }, + }, + + "name": { + Type: schema.TypeString, + Computed: true, + }, + + "path": { + Type: schema.TypeString, + Computed: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "create_date": { + Type: schema.TypeString, + Computed: true, + }, + + "unique_id": { + Type: schema.TypeString, + Computed: true, + }, + + "description": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsIamServiceLinkedRoleCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + serviceName := d.Get("aws_service_name").(string) + + params := &iam.CreateServiceLinkedRoleInput{ + AWSServiceName: aws.String(serviceName), + } + + resp, err := conn.CreateServiceLinkedRole(params) + + if err != nil { + return fmt.Errorf("Error creating service-linked role with name %s", serviceName) + } + d.SetId(*resp.Role.Arn) + + return nil +} + +func resourceAwsIamServiceLinkedRoleRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + arnSplit := strings.Split(d.Id(), "/") + roleName := arnSplit[len(arnSplit)-1] + serviceName := arnSplit[len(arnSplit)-2] + + params := &iam.GetRoleInput{ + RoleName: aws.String(roleName), + } + + resp, err := conn.GetRole(params) + + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM service linked role %s not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + role := resp.Role + + d.Set("name", role.RoleName) + d.Set("path", role.Path) + d.Set("arn", role.Arn) + d.Set("create_date", role.CreateDate) + d.Set("unique_id", role.RoleId) + d.Set("description", role.Description) + d.Set("aws_service_name", serviceName) + + return nil +} + +func resourceAwsIamServiceLinkedRoleDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + arnSplit := strings.Split(d.Id(), "/") + roleName := arnSplit[len(arnSplit)-1] + + params := &iam.DeleteServiceLinkedRoleInput{ + RoleName: aws.String(roleName), + } + + resp, err := conn.DeleteServiceLinkedRole(params) + + if err != nil { + return fmt.Errorf("Error deleting service-linked role %s", d.Id()) + } + + deletionTaskId := *resp.DeletionTaskId + + stateConf := &resource.StateChangeConf{ + Pending: []string{iam.DeletionTaskStatusTypeInProgress, iam.DeletionTaskStatusTypeNotStarted}, + Target: []string{iam.DeletionTaskStatusTypeSucceeded}, + Refresh: deletionRefreshFunc(conn, deletionTaskId), + Timeout: 5 * time.Minute, + Delay: 10 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for role (%s) to be deleted: %s", d.Id(), err) + } + + d.SetId("") + + return nil +} + +func deletionRefreshFunc(conn *iam.IAM, deletionTaskId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + params := &iam.GetServiceLinkedRoleDeletionStatusInput{ + DeletionTaskId: aws.String(deletionTaskId), + } + + resp, err := conn.GetServiceLinkedRoleDeletionStatus(params) + if err != nil { + return nil, "", err + } + + return resp, *resp.Status, nil + } +} diff --git a/aws/resource_aws_iam_service_linked_role_test.go b/aws/resource_aws_iam_service_linked_role_test.go new file mode 100644 index 00000000000..abed20bfb54 --- /dev/null +++ b/aws/resource_aws_iam_service_linked_role_test.go @@ -0,0 +1,98 @@ +package aws + +import ( + "fmt" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSIAMServiceLinkedRole_basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIAMServiceLinkedRoleDestroy, + Steps: []resource.TestStep{ + { + ResourceName: "aws_iam_service_linked_role.test", + Config: fmt.Sprintf(testAccAWSIAMServiceLinkedRoleConfig, "elasticbeanstalk.amazonaws.com"), + Check: testAccCheckAWSIAMServiceLinkedRoleExists("aws_iam_service_linked_role.test"), + }, + { + ResourceName: "aws_iam_service_linked_role.test", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSIAMServiceLinkedRoleDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).iamconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_iam_service_linked_role" { + continue + } + + arnSplit := strings.Split(rs.Primary.ID, "/") + roleName := arnSplit[len(arnSplit)-1] + + params := &iam.GetRoleInput{ + RoleName: aws.String(roleName), + } + + _, err := conn.GetRole(params) + + if err == nil { + return fmt.Errorf("Service-Linked Role still exists: %q", rs.Primary.ID) + } + + if !isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return err + } + } + + return nil + +} + +func testAccCheckAWSIAMServiceLinkedRoleExists(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + conn := testAccProvider.Meta().(*AWSClient).iamconn + arnSplit := strings.Split(rs.Primary.ID, "/") + roleName := arnSplit[len(arnSplit)-1] + + params := &iam.GetRoleInput{ + RoleName: aws.String(roleName), + } + + _, err := conn.GetRole(params) + + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return fmt.Errorf("Service-Linked Role doesn't exists: %q", rs.Primary.ID) + } + return err + } + + return nil + } +} + +const testAccAWSIAMServiceLinkedRoleConfig = ` +resource "aws_iam_service_linked_role" "test" { + aws_service_name = "%s" +} +` diff --git a/website/aws.erb b/website/aws.erb index 6975f28532c..3e26446201d 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1019,6 +1019,10 @@ aws_iam_server_certificate + > + aws_iam_service_linked_role + + > aws_iam_user diff --git a/website/docs/r/iam_service_linked_role.html.markdown b/website/docs/r/iam_service_linked_role.html.markdown new file mode 100644 index 00000000000..f30a672901e --- /dev/null +++ b/website/docs/r/iam_service_linked_role.html.markdown @@ -0,0 +1,44 @@ +--- +layout: "aws" +page_title: "AWS: aws_iam_service_linked_role" +sidebar_current: "docs-aws-resource-iam-service-linked-role" +description: |- + Provides an IAM service-linked role. +--- + +# aws_iam_service_linked_role + +Provides an [IAM service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html). + +## Example Usage + +```hcl +resource "aws_iam_service_linked_role" "elasticbeanstalk" { + aws_service_name = "elasticbeanstalk.amazonaws.com" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `aws_service_name` - (Required, Forces new resource) The AWS service to which this role is attached. You use a string similar to a URL but without the `http://` in front. For example: `elasticbeanstalk.amazonaws.com`. To find the full list of services that support service-linked roles, check [the docs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html). + +## Attributes Reference + +The following attributes are exported: + +* `name` - The name of the role. +* `path` - The path of the role. +* `arn` - The Amazon Resource Name (ARN) specifying the role. +* `create_date` - The creation date of the IAM role. +* `unique_id` - The stable and unique string identifying the role. +* `description` - The description of the role. + +## Import + +IAM service-linked roles can be imported using role ARN, e.g. + +``` +$ terraform import aws_iam_service_linked_role.elasticbeanstalk arn:aws:iam::123456789012:role/aws-service-role/elasticbeanstalk.amazonaws.com/AWSServiceRoleForElasticBeanstalk +``` From e1f0609764b7a0fd2e31b2ff4d806dfb706c8a05 Mon Sep 17 00:00:00 2001 From: Lars Jarek Date: Sun, 8 Apr 2018 11:01:58 +0200 Subject: [PATCH 0485/3316] Added missing bracket --- aws/resource_aws_codebuild_project_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index ff6f41153fa..41f3a28e2bd 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -961,6 +961,7 @@ resource "aws_codebuild_project" "foo" { } } `, rName, rName, rName, rName) +} func testAccAWSCodeBuildProjectConfig_cacheConfig(cacheType, cacheLocation string) string { return fmt.Sprintf(` From 1deac7cc3e4274152bccf21771fd7ac80ad3b735 Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Sun, 8 Apr 2018 14:47:38 +0200 Subject: [PATCH 0486/3316] Add tests and doc, use schema.TypeList for dns_ips --- ...directory_service_conditional_forwarder.go | 35 ++-- ...tory_service_conditional_forwarder_test.go | 194 ++++++++++++++++++ ...ervice_conditional_forwarder.html.markdown | 41 ++++ 3 files changed, 253 insertions(+), 17 deletions(-) create mode 100644 aws/resource_aws_directory_service_conditional_forwarder_test.go create mode 100644 website/docs/r/directory_service_conditional_forwarder.html.markdown diff --git a/aws/resource_aws_directory_service_conditional_forwarder.go b/aws/resource_aws_directory_service_conditional_forwarder.go index 5b24dc9440b..362a47925d5 100644 --- a/aws/resource_aws_directory_service_conditional_forwarder.go +++ b/aws/resource_aws_directory_service_conditional_forwarder.go @@ -31,13 +31,11 @@ func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { }, "dns_ips": &schema.Schema{ - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MinItems: 1, - Set: schema.HashString, Elem: &schema.Schema{ Type: schema.TypeString, - //ValidateFunc: validation.SingleIP(), }, }, @@ -54,10 +52,7 @@ func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { func resourceAwsDirectoryServiceConditionalForwarderCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dsconn - var dnsIps []*string - for _, ip := range d.Get("dns_ips").(*schema.Set).List() { - dnsIps = append(dnsIps, aws.String(ip.(string))) - } + dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) directoryId := d.Get("directory_id").(string) domainName := d.Get("domain_name").(string) @@ -80,14 +75,12 @@ func resourceAwsDirectoryServiceConditionalForwarderCreate(d *schema.ResourceDat func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dsconn - parts := strings.SplitN(d.Id(), ":", 2) + directoryId, domainName := parseDSConditionalForwarderId(d.Id()) - if len(parts) != 2 { - return fmt.Errorf("Incorrect id %q, expecting DIRECTORY_ID:DOMAIN_NAME", d.Id()) + if directoryId == "" || domainName == "" { + return fmt.Errorf("Error importing aws_directory_service_conditional_forwarder. Please make sure ID is in format DIRECTORY_ID:DOMAIN_NAME") } - directoryId, domainName := parts[0], parts[1] - res, err := conn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ DirectoryId: aws.String(directoryId), RemoteDomainNames: []*string{aws.String(domainName)}, @@ -108,7 +101,7 @@ func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, cfd := res.ConditionalForwarders[0] - d.Set("dns_ips", schema.NewSet(schema.HashString, flattenStringList(cfd.DnsIpAddrs))) + d.Set("dns_ips", flattenStringList(cfd.DnsIpAddrs)) d.Set("directory_id", directoryId) d.Set("domain_name", *cfd.RemoteDomainName) @@ -118,10 +111,7 @@ func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, func resourceAwsDirectoryServiceConditionalForwarderUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dsconn - var dnsIps []*string - for _, ip := range d.Get("dns_ips").(*schema.Set).List() { - dnsIps = append(dnsIps, aws.String(ip.(string))) - } + dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) _, err := conn.UpdateConditionalForwarder(&directoryservice.UpdateConditionalForwarderInput{ DirectoryId: aws.String(d.Get("directory_id").(string)), @@ -151,3 +141,14 @@ func resourceAwsDirectoryServiceConditionalForwarderDelete(d *schema.ResourceDat d.SetId("") return nil } + +func parseDSConditionalForwarderId(id string) (directoryId, domainName string) { + parts := strings.SplitN(id, ":", 2) + + if len(parts) == 2 { + directoryId = parts[0] + domainName = parts[1] + } + + return +} diff --git a/aws/resource_aws_directory_service_conditional_forwarder_test.go b/aws/resource_aws_directory_service_conditional_forwarder_test.go new file mode 100644 index 00000000000..89deae5782e --- /dev/null +++ b/aws/resource_aws_directory_service_conditional_forwarder_test.go @@ -0,0 +1,194 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directoryservice" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestACCAwsDirectoryServiceConditionForwarder_basic(t *testing.T) { + resourceName := "aws_directory_service_conditional_forwarder.fwd" + + ip1, ip2, ip3 := "8.8.8.8", "1.1.1.1", "8.8.4.4" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDirectoryServiceConditionalForwarderDestroy, + Steps: []resource.TestStep{ + // test create + { + Config: testAccDirectoryServiceConditionalForwarderConfig(ip1, ip2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDirectoryServiceConditionalForwarderExists( + resourceName, + []string{ip1, ip2}, + ), + ), + }, + // test update + { + Config: testAccDirectoryServiceConditionalForwarderConfig(ip1, ip3), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDirectoryServiceConditionalForwarderExists( + resourceName, + []string{ip1, ip3}, + ), + ), + }, + // test import + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsDirectoryServiceConditionalForwarderDestroy(s *terraform.State) error { + dsconn := testAccProvider.Meta().(*AWSClient).dsconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_directory_service_conditional_forwarder" { + continue + } + + directoryId, domainName := parseDSConditionalForwarderId(rs.Primary.ID) + + if directoryId == "" || domainName == "" { + return fmt.Errorf("Invalid ID '%s' for conditional forwarder", rs.Primary.ID) + } + + res, err := dsconn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ + DirectoryId: aws.String(directoryId), + RemoteDomainNames: []*string{aws.String(domainName)}, + }) + + if err != nil { + if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { + return nil + } + return err + } + + if len(res.ConditionalForwarders) > 0 { + return fmt.Errorf("Expected AWS Directory Service Conditional Forwarder to be gone, but was still found") + } + + return nil + } + + return fmt.Errorf("Default error in Service Directory Test") +} + +func testAccCheckAwsDirectoryServiceConditionalForwarderExists(name string, dnsIps []string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + directoryId, domainName := parseDSConditionalForwarderId(rs.Primary.ID) + + if directoryId == "" || domainName == "" { + return fmt.Errorf("Invalid ID '%s' for conditional forwarder", rs.Primary.ID) + } + + dsconn := testAccProvider.Meta().(*AWSClient).dsconn + + res, err := dsconn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ + DirectoryId: aws.String(directoryId), + RemoteDomainNames: []*string{aws.String(domainName)}, + }) + + if err != nil { + return err + } + + if len(res.ConditionalForwarders) == 0 { + return fmt.Errorf("No Conditional Fowrwarder found") + } + + cfd := res.ConditionalForwarders[0] + + if dnsIps != nil { + if len(dnsIps) != len(cfd.DnsIpAddrs) { + return fmt.Errorf("DnsIpAddrs length mismatch") + } + + for k, v := range cfd.DnsIpAddrs { + if *v != dnsIps[k] { + return fmt.Errorf("DnsIp mismatch, '%s' != '%s' at index '%d'", *v, dnsIps[k], k) + } + } + } + + return nil + } +} + +func testAccDirectoryServiceConditionalForwarderConfig(ip1, ip2 string) string { + return fmt.Sprintf(` +resource "aws_directory_service_directory" "bar" { + name = "corp.notexample.com" + password = "SuperSecretPassw0rd" + type = "MicrosoftAD" + edition = "Standard" + + vpc_settings { + vpc_id = "${aws_vpc.main.id}" + subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] + } + + tags { + Name = "terraform-testacc-directory-service-conditional-forwarder" + } +} + +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-directory-service-conditional-forwarder" + } +} + +resource "aws_subnet" "foo" { + vpc_id = "${aws_vpc.main.id}" + availability_zone = "us-west-2a" + cidr_block = "10.0.1.0/24" + tags { + Name = "terraform-testacc-directory-service-conditional-forwarder" + } +} + +resource "aws_subnet" "bar" { + vpc_id = "${aws_vpc.main.id}" + availability_zone = "us-west-2b" + cidr_block = "10.0.2.0/24" + tags { + Name = "terraform-testacc-directory-service-conditional-forwarder" + } +} + +resource "aws_directory_service_conditional_forwarder" "fwd" { + directory_id = "${aws_directory_service_directory.bar.id}" + + domain_name = "test.example.com" + + dns_ips = [ + "%s", + "%s", + ] +} +`, ip1, ip2) +} diff --git a/website/docs/r/directory_service_conditional_forwarder.html.markdown b/website/docs/r/directory_service_conditional_forwarder.html.markdown new file mode 100644 index 00000000000..e714afaf1c7 --- /dev/null +++ b/website/docs/r/directory_service_conditional_forwarder.html.markdown @@ -0,0 +1,41 @@ +--- +layout: "aws" +page_title: "AWS: aws_directory_service_conditional_forwarder" +sidebar_current: "docs-aws-resource-directory-service-conditional-forwarder" +description: |- + Provides a conditional forwarder for managed Microsoft AD in AWS Directory Service. +--- + +# aws_directory_service_conditional_forwarder + +Provides a conditional forwarder for managed Microsoft AD in AWS Directory Service. + +## Example Usage + +```hcl +resource "aws_directory_service_conditional_forwarder" "example" { + directory_id = "${aws_directory_service_directory.ad.id}" + domain_name = "example.com" + + dns_ips = [ + "8.8.8.8", + "8.8.4.4", + ] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `directory_id` - (Required) The id of directory. +* `domain_name` - (Required) The fully qualified domain name of the remote domain for which forwarders will be used. +* `dns_ips` - (Required) A list of forwarder IP addresses. + +## Import + +Conditional forwarders can be imported using the directory id and domain_name, e.g. + +``` +$ terraform import aws_directory_service_conditional_forwarder.example d-1234567890:example.com +``` From 1cd86d1891d5f838992c65787e89b1c708191ff4 Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Sun, 8 Apr 2018 18:39:20 +0200 Subject: [PATCH 0487/3316] Add link in docs for conditional forwarder --- website/aws.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/aws.erb b/website/aws.erb index 7af9c5a25e6..b96fe0221c1 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -635,6 +635,10 @@ aws_directory_service_directory + > + aws_directory_service_conditional_forwarder + + From ae8248ce547509ad41c268e7fd0b5cd4b379a2fa Mon Sep 17 00:00:00 2001 From: Matt Burgess Date: Sun, 8 Apr 2018 20:27:27 +0100 Subject: [PATCH 0488/3316] docs/resource/lambda_permission: Fix cloudwatch example source_account isn't valid for a CloudWatch Lambda Permission and prevents CloudWatch from invoking the function as decribed at the bottom of https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_Troubleshooting.html#LAMfunctionNotInvoked --- website/docs/r/lambda_permission.html.markdown | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/r/lambda_permission.html.markdown b/website/docs/r/lambda_permission.html.markdown index f54825fae71..e9f300fc1c4 100644 --- a/website/docs/r/lambda_permission.html.markdown +++ b/website/docs/r/lambda_permission.html.markdown @@ -19,7 +19,6 @@ resource "aws_lambda_permission" "allow_cloudwatch" { action = "lambda:InvokeFunction" function_name = "${aws_lambda_function.test_lambda.function_name}" principal = "events.amazonaws.com" - source_account = "111122223333" source_arn = "arn:aws:events:eu-west-1:111122223333:rule/RunDaily" qualifier = "${aws_lambda_alias.test_alias.name}" } From 38d937a1ef5f72b5ca601d0390443355e421f2c5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Sat, 7 Apr 2018 18:37:01 -0400 Subject: [PATCH 0489/3316] Fix NACL associations with deleted subnets. --- aws/resource_aws_network_acl.go | 33 +- aws/resource_aws_network_acl_test.go | 658 +++++++++++++++------------ aws/utils.go | 7 + 3 files changed, 391 insertions(+), 307 deletions(-) diff --git a/aws/resource_aws_network_acl.go b/aws/resource_aws_network_acl.go index 6080e53c153..f742841517c 100644 --- a/aws/resource_aws_network_acl.go +++ b/aws/resource_aws_network_acl.go @@ -308,6 +308,10 @@ func resourceAwsNetworkAclUpdate(d *schema.ResourceData, meta interface{}) error for _, r := range remove { association, err := findNetworkAclAssociation(r.(string), conn) if err != nil { + if isResourceNotFoundError(err) { + // Subnet has been deleted. + continue + } return fmt.Errorf("Failed to find acl association: acl %s with subnet %s: %s", d.Id(), r, err) } log.Printf("DEBUG] Replacing Network Acl Association (%s) with Default Network ACL ID (%s)", *association.NetworkAclAssociationId, *defaultAcl.NetworkAclId) @@ -479,6 +483,9 @@ func resourceAwsNetworkAclDelete(d *schema.ResourceData, meta interface{}) error for _, i := range ids { a, err := findNetworkAclAssociation(i.(string), conn) if err != nil { + if isResourceNotFoundError(err) { + continue + } return resource.NonRetryableError(err) } associations = append(associations, a) @@ -597,26 +604,30 @@ func getDefaultNetworkAcl(vpc_id string, conn *ec2.EC2) (defaultAcl *ec2.Network } func findNetworkAclAssociation(subnetId string, conn *ec2.EC2) (networkAclAssociation *ec2.NetworkAclAssociation, err error) { - resp, err := conn.DescribeNetworkAcls(&ec2.DescribeNetworkAclsInput{ - Filters: []*ec2.Filter{ - { - Name: aws.String("association.subnet-id"), - Values: []*string{aws.String(subnetId)}, - }, + req := &ec2.DescribeNetworkAclsInput{} + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "association.subnet-id": subnetId, }, - }) - + ) + resp, err := conn.DescribeNetworkAcls(req) if err != nil { return nil, err } - if resp.NetworkAcls != nil && len(resp.NetworkAcls) > 0 { + + if len(resp.NetworkAcls) > 0 { for _, association := range resp.NetworkAcls[0].Associations { - if *association.SubnetId == subnetId { + if aws.StringValue(association.SubnetId) == subnetId { return association, nil } } } - return nil, fmt.Errorf("could not find association for subnet: %s ", subnetId) + + return nil, &resource.NotFoundError{ + LastRequest: req, + LastResponse: resp, + Message: fmt.Sprintf("could not find association for subnet: %s ", subnetId), + } } // networkAclEntriesToMapList turns ingress/egress rules read from AWS into a list diff --git a/aws/resource_aws_network_acl_test.go b/aws/resource_aws_network_acl_test.go index 510488e2286..93d2e046b90 100644 --- a/aws/resource_aws_network_acl_test.go +++ b/aws/resource_aws_network_acl_test.go @@ -343,6 +343,47 @@ func TestAccAWSNetworkAcl_Subnets(t *testing.T) { }) } +func TestAccAWSNetworkAcl_SubnetsDelete(t *testing.T) { + var networkAcl ec2.NetworkAcl + + checkACLSubnets := func(acl *ec2.NetworkAcl, count int) resource.TestCheckFunc { + return func(*terraform.State) (err error) { + if count != len(acl.Associations) { + return fmt.Errorf("ACL association count does not match, expected %d, got %d", count, len(acl.Associations)) + } + + return nil + } + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_network_acl.bar", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNetworkAclDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNetworkAclSubnet_SubnetIds, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNetworkAclExists("aws_network_acl.bar", &networkAcl), + testAccCheckSubnetIsAssociatedWithAcl("aws_network_acl.bar", "aws_subnet.one"), + testAccCheckSubnetIsAssociatedWithAcl("aws_network_acl.bar", "aws_subnet.two"), + checkACLSubnets(&networkAcl, 2), + ), + }, + + { + Config: testAccAWSNetworkAclSubnet_SubnetIdsDeleteOne, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNetworkAclExists("aws_network_acl.bar", &networkAcl), + testAccCheckSubnetIsAssociatedWithAcl("aws_network_acl.bar", "aws_subnet.one"), + checkACLSubnets(&networkAcl, 1), + ), + }, + }, + }) +} + func TestAccAWSNetworkAcl_ipv6Rules(t *testing.T) { var networkAcl ec2.NetworkAcl @@ -550,36 +591,36 @@ func testAccCheckSubnetIsNotAssociatedWithAcl(acl string, subnet string) resourc const testAccAWSNetworkAclIpv6Config = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-ipv6" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-ipv6" + } } resource "aws_subnet" "blob" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-ipv6" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-ipv6" + } } resource "aws_network_acl" "foos" { - vpc_id = "${aws_vpc.foo.id}" - ingress = { - protocol = "tcp" - rule_no = 1 - action = "allow" - ipv6_cidr_block = "::/0" - from_port = 0 - to_port = 22 - } + vpc_id = "${aws_vpc.foo.id}" + ingress = { + protocol = "tcp" + rule_no = 1 + action = "allow" + ipv6_cidr_block = "::/0" + from_port = 0 + to_port = 22 + } - subnet_ids = ["${aws_subnet.blob.id}"] - tags { - Name = "tf-acc-acl-ipv6" - } + subnet_ids = ["${aws_subnet.blob.id}"] + tags { + Name = "tf-acc-acl-ipv6" + } } ` @@ -589,414 +630,439 @@ provider "aws" { } resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - assign_generated_ipv6_cidr_block = true + cidr_block = "10.1.0.0/16" + assign_generated_ipv6_cidr_block = true - tags { - Name = "terraform-testacc-network-acl-ipv6-vpc-rules" - } + tags { + Name = "terraform-testacc-network-acl-ipv6-vpc-rules" + } } resource "aws_network_acl" "foos" { - vpc_id = "${aws_vpc.foo.id}" - ingress = { - protocol = "tcp" - rule_no = 1 - action = "allow" - ipv6_cidr_block = "2600:1f16:d1e:9a00::/56" - from_port = 0 - to_port = 22 - } - tags { - Name = "tf-acc-acl-ipv6" - } + vpc_id = "${aws_vpc.foo.id}" + ingress = { + protocol = "tcp" + rule_no = 1 + action = "allow" + ipv6_cidr_block = "2600:1f16:d1e:9a00::/56" + from_port = 0 + to_port = 22 + } + tags { + Name = "tf-acc-acl-ipv6" + } } ` const testAccAWSNetworkAclIngressConfig = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-ingress" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-ingress" + } } resource "aws_subnet" "blob" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-ingress" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-ingress" + } } resource "aws_network_acl" "foos" { - vpc_id = "${aws_vpc.foo.id}" - ingress = { - protocol = "tcp" - rule_no = 1 - action = "deny" - cidr_block = "10.2.0.0/18" - from_port = 0 - to_port = 22 - } - ingress = { - protocol = "tcp" - rule_no = 2 - action = "deny" - cidr_block = "10.2.0.0/18" - from_port = 443 - to_port = 443 - } + vpc_id = "${aws_vpc.foo.id}" + ingress = { + protocol = "tcp" + rule_no = 1 + action = "deny" + cidr_block = "10.2.0.0/18" + from_port = 0 + to_port = 22 + } + ingress = { + protocol = "tcp" + rule_no = 2 + action = "deny" + cidr_block = "10.2.0.0/18" + from_port = 443 + to_port = 443 + } - subnet_ids = ["${aws_subnet.blob.id}"] - tags { - Name = "tf-acc-acl-ingress" - } + subnet_ids = ["${aws_subnet.blob.id}"] + tags { + Name = "tf-acc-acl-ingress" + } } ` const testAccAWSNetworkAclCaseSensitiveConfig = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-ingress" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-ingress" + } } resource "aws_subnet" "blob" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-ingress" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-ingress" + } } resource "aws_network_acl" "foos" { - vpc_id = "${aws_vpc.foo.id}" - ingress = { - protocol = "tcp" - rule_no = 1 - action = "Allow" - cidr_block = "10.2.0.0/18" - from_port = 0 - to_port = 22 - } - subnet_ids = ["${aws_subnet.blob.id}"] - tags { - Name = "tf-acc-acl-case-sensitive" - } + vpc_id = "${aws_vpc.foo.id}" + ingress = { + protocol = "tcp" + rule_no = 1 + action = "Allow" + cidr_block = "10.2.0.0/18" + from_port = 0 + to_port = 22 + } + subnet_ids = ["${aws_subnet.blob.id}"] + tags { + Name = "tf-acc-acl-case-sensitive" + } } ` const testAccAWSNetworkAclIngressConfigChange = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-ingress" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-ingress" + } } resource "aws_subnet" "blob" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-ingress" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-ingress" + } } resource "aws_network_acl" "foos" { - vpc_id = "${aws_vpc.foo.id}" - ingress = { - protocol = "tcp" - rule_no = 1 - action = "deny" - cidr_block = "10.2.0.0/18" - from_port = 0 - to_port = 22 - } - subnet_ids = ["${aws_subnet.blob.id}"] - tags { - Name = "tf-acc-acl-ingress" - } + vpc_id = "${aws_vpc.foo.id}" + ingress = { + protocol = "tcp" + rule_no = 1 + action = "deny" + cidr_block = "10.2.0.0/18" + from_port = 0 + to_port = 22 + } + subnet_ids = ["${aws_subnet.blob.id}"] + tags { + Name = "tf-acc-acl-ingress" + } } ` const testAccAWSNetworkAclEgressConfig = ` resource "aws_vpc" "foo" { - cidr_block = "10.2.0.0/16" - tags { - Name = "terraform-testacc-network-acl-egress" - } + cidr_block = "10.2.0.0/16" + tags { + Name = "terraform-testacc-network-acl-egress" + } } resource "aws_subnet" "blob" { - cidr_block = "10.2.0.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-egress" - } + cidr_block = "10.2.0.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-egress" + } } resource "aws_network_acl" "bond" { - vpc_id = "${aws_vpc.foo.id}" - egress = { - protocol = "tcp" - rule_no = 2 - action = "allow" - cidr_block = "10.2.0.0/18" - from_port = 443 - to_port = 443 - } + vpc_id = "${aws_vpc.foo.id}" + egress = { + protocol = "tcp" + rule_no = 2 + action = "allow" + cidr_block = "10.2.0.0/18" + from_port = 443 + to_port = 443 + } - egress = { - protocol = "-1" - rule_no = 4 - action = "allow" - cidr_block = "0.0.0.0/0" - from_port = 0 - to_port = 0 - } + egress = { + protocol = "-1" + rule_no = 4 + action = "allow" + cidr_block = "0.0.0.0/0" + from_port = 0 + to_port = 0 + } - egress = { - protocol = "tcp" - rule_no = 1 - action = "allow" - cidr_block = "10.2.0.0/18" - from_port = 80 - to_port = 80 - } + egress = { + protocol = "tcp" + rule_no = 1 + action = "allow" + cidr_block = "10.2.0.0/18" + from_port = 80 + to_port = 80 + } - egress = { - protocol = "tcp" - rule_no = 3 - action = "allow" - cidr_block = "10.2.0.0/18" - from_port = 22 - to_port = 22 - } + egress = { + protocol = "tcp" + rule_no = 3 + action = "allow" + cidr_block = "10.2.0.0/18" + from_port = 22 + to_port = 22 + } - tags { - foo = "bar" - Name = "tf-acc-acl-egress" - } + tags { + foo = "bar" + Name = "tf-acc-acl-egress" + } } ` const testAccAWSNetworkAclEgressNIngressConfig = ` resource "aws_vpc" "foo" { - cidr_block = "10.3.0.0/16" - tags { - Name = "terraform-testacc-network-acl-egress-and-ingress" - } + cidr_block = "10.3.0.0/16" + tags { + Name = "terraform-testacc-network-acl-egress-and-ingress" + } } resource "aws_subnet" "blob" { - cidr_block = "10.3.0.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-egress-and-ingress" - } + cidr_block = "10.3.0.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-egress-and-ingress" + } } resource "aws_network_acl" "bar" { - vpc_id = "${aws_vpc.foo.id}" - egress = { - protocol = "tcp" - rule_no = 2 - action = "allow" - cidr_block = "10.3.0.0/18" - from_port = 443 - to_port = 443 - } + vpc_id = "${aws_vpc.foo.id}" + egress = { + protocol = "tcp" + rule_no = 2 + action = "allow" + cidr_block = "10.3.0.0/18" + from_port = 443 + to_port = 443 + } - ingress = { - protocol = "tcp" - rule_no = 1 - action = "allow" - cidr_block = "10.3.0.0/18" - from_port = 80 - to_port = 80 - } - tags { - Name = "tf-acc-acl-egress-and-ingress" - } + ingress = { + protocol = "tcp" + rule_no = 1 + action = "allow" + cidr_block = "10.3.0.0/18" + from_port = 80 + to_port = 80 + } + tags { + Name = "tf-acc-acl-egress-and-ingress" + } } ` const testAccAWSNetworkAclSubnetConfig = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-subnet-change" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-subnet-change" + } } resource "aws_subnet" "old" { - cidr_block = "10.1.111.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-subnet-change-old" - } + cidr_block = "10.1.111.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-subnet-change-old" + } } resource "aws_subnet" "new" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-subnet-change-new" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-subnet-change-new" + } } resource "aws_network_acl" "roll" { - vpc_id = "${aws_vpc.foo.id}" - subnet_ids = ["${aws_subnet.new.id}"] - tags { - Name = "tf-acc-acl-subnet-change-roll" - } + vpc_id = "${aws_vpc.foo.id}" + subnet_ids = ["${aws_subnet.new.id}"] + tags { + Name = "tf-acc-acl-subnet-change-roll" + } } resource "aws_network_acl" "bar" { - vpc_id = "${aws_vpc.foo.id}" - subnet_ids = ["${aws_subnet.old.id}"] - tags { - Name = "tf-acc-acl-subnet-change-bar" - } + vpc_id = "${aws_vpc.foo.id}" + subnet_ids = ["${aws_subnet.old.id}"] + tags { + Name = "tf-acc-acl-subnet-change-bar" + } } ` const testAccAWSNetworkAclSubnetConfigChange = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-subnet-change" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-subnet-change" + } } resource "aws_subnet" "old" { - cidr_block = "10.1.111.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-subnet-change-old" - } + cidr_block = "10.1.111.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-subnet-change-old" + } } resource "aws_subnet" "new" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - map_public_ip_on_launch = true - tags { - Name = "tf-acc-network-acl-subnet-change-new" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + map_public_ip_on_launch = true + tags { + Name = "tf-acc-network-acl-subnet-change-new" + } } resource "aws_network_acl" "bar" { - vpc_id = "${aws_vpc.foo.id}" - subnet_ids = ["${aws_subnet.new.id}"] - tags { - Name = "tf-acc-acl-subnet-change-bar" - } + vpc_id = "${aws_vpc.foo.id}" + subnet_ids = ["${aws_subnet.new.id}"] + tags { + Name = "tf-acc-acl-subnet-change-bar" + } } ` const testAccAWSNetworkAclSubnet_SubnetIds = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-subnet-ids" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-subnet-ids" + } } resource "aws_subnet" "one" { - cidr_block = "10.1.111.0/24" - vpc_id = "${aws_vpc.foo.id}" - tags { - Name = "tf-acc-network-acl-subnet-ids-one" - } + cidr_block = "10.1.111.0/24" + vpc_id = "${aws_vpc.foo.id}" + tags { + Name = "tf-acc-network-acl-subnet-ids-one" + } } resource "aws_subnet" "two" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - tags { - Name = "tf-acc-network-acl-subnet-ids-two" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + tags { + Name = "tf-acc-network-acl-subnet-ids-two" + } } resource "aws_network_acl" "bar" { - vpc_id = "${aws_vpc.foo.id}" - subnet_ids = ["${aws_subnet.one.id}", "${aws_subnet.two.id}"] - tags { - Name = "tf-acc-acl-subnet-ids" - } + vpc_id = "${aws_vpc.foo.id}" + subnet_ids = ["${aws_subnet.one.id}", "${aws_subnet.two.id}"] + tags { + Name = "tf-acc-acl-subnet-ids" + } } ` const testAccAWSNetworkAclSubnet_SubnetIdsUpdate = ` resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-subnet-ids" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-subnet-ids" + } } resource "aws_subnet" "one" { - cidr_block = "10.1.111.0/24" - vpc_id = "${aws_vpc.foo.id}" - tags { - Name = "tf-acc-network-acl-subnet-ids-one" - } + cidr_block = "10.1.111.0/24" + vpc_id = "${aws_vpc.foo.id}" + tags { + Name = "tf-acc-network-acl-subnet-ids-one" + } } resource "aws_subnet" "two" { - cidr_block = "10.1.1.0/24" - vpc_id = "${aws_vpc.foo.id}" - tags { - Name = "tf-acc-network-acl-subnet-ids-two" - } + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" + tags { + Name = "tf-acc-network-acl-subnet-ids-two" + } } resource "aws_subnet" "three" { - cidr_block = "10.1.222.0/24" - vpc_id = "${aws_vpc.foo.id}" - tags { - Name = "tf-acc-network-acl-subnet-ids-three" - } + cidr_block = "10.1.222.0/24" + vpc_id = "${aws_vpc.foo.id}" + tags { + Name = "tf-acc-network-acl-subnet-ids-three" + } } resource "aws_subnet" "four" { - cidr_block = "10.1.4.0/24" - vpc_id = "${aws_vpc.foo.id}" - tags { - Name = "tf-acc-network-acl-subnet-ids-four" - } + cidr_block = "10.1.4.0/24" + vpc_id = "${aws_vpc.foo.id}" + tags { + Name = "tf-acc-network-acl-subnet-ids-four" + } } resource "aws_network_acl" "bar" { - vpc_id = "${aws_vpc.foo.id}" - subnet_ids = [ - "${aws_subnet.one.id}", - "${aws_subnet.three.id}", - "${aws_subnet.four.id}", - ] - tags { - Name = "tf-acc-acl-subnet-ids" - } + vpc_id = "${aws_vpc.foo.id}" + subnet_ids = [ + "${aws_subnet.one.id}", + "${aws_subnet.three.id}", + "${aws_subnet.four.id}", + ] + tags { + Name = "tf-acc-acl-subnet-ids" + } +} +` + +const testAccAWSNetworkAclSubnet_SubnetIdsDeleteOne = ` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-network-acl-subnet-ids" + } +} + +resource "aws_subnet" "one" { + cidr_block = "10.1.111.0/24" + vpc_id = "${aws_vpc.foo.id}" + tags { + Name = "tf-acc-network-acl-subnet-ids-one" + } +} + +resource "aws_network_acl" "bar" { + vpc_id = "${aws_vpc.foo.id}" + subnet_ids = ["${aws_subnet.one.id}"] + tags { + Name = "tf-acc-acl-subnet-ids" + } } ` const testAccAWSNetworkAclEsp = ` resource "aws_vpc" "testespvpc" { cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-network-acl-esp" - } + tags { + Name = "terraform-testacc-network-acl-esp" + } } resource "aws_network_acl" "testesp" { diff --git a/aws/utils.go b/aws/utils.go index bfca044cfb1..21c3aab7ef3 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -5,6 +5,8 @@ import ( "encoding/json" "reflect" "regexp" + + "github.com/hashicorp/terraform/helper/resource" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -40,3 +42,8 @@ func jsonBytesEqual(b1, b2 []byte) bool { return reflect.DeepEqual(o1, o2) } + +func isResourceNotFoundError(err error) bool { + _, ok := err.(*resource.NotFoundError) + return ok +} From fa9247a0f1bf8887605a5db872fc97efbd290a48 Mon Sep 17 00:00:00 2001 From: mcowgill1 Date: Sun, 8 Apr 2018 22:13:51 -0700 Subject: [PATCH 0490/3316] add documentation to support use of the dns_entry output for vpc endpoints with custom services --- website/docs/r/vpc_endpoint.html.markdown | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/website/docs/r/vpc_endpoint.html.markdown b/website/docs/r/vpc_endpoint.html.markdown index b13feacd308..f435bfb1955 100644 --- a/website/docs/r/vpc_endpoint.html.markdown +++ b/website/docs/r/vpc_endpoint.html.markdown @@ -44,6 +44,38 @@ resource "aws_vpc_endpoint" "ec2" { } ``` +Custom Service Usage: +```hcl +resource "aws_vpc_endpoint" "ptfe_service" { + vpc_id = "${var.vpc_id}" + service_name = "${var.ptfe_service}" + vpc_endpoint_type = "Interface" + + security_group_ids = [ + "${aws_security_group.ptfe_service.id}", + ] + + subnet_ids = ["${local.subnet_ids}"] + private_dns_enabled = false +} + +data "aws_route53_zone" "internal" { + name = "vpc.internal." + private_zone = true + vpc_id = "${var.vpc_id}" +} + +resource "aws_route53_record" "ptfe_service" { + zone_id = "${data.aws_route53_zone.internal.zone_id}" + name = "ptfe.${data.aws_route53_zone.internal.name}" + type = "CNAME" + ttl = "300" + records = ["${lookup(aws_vpc_endpoint.ptfe_service.dns_entry[0], "dns_name")}"] +} +``` + +~> **NOTE The `dns_entry` output is a list of maps:** Terraform interpolation support for lists of maps requires the `lookup` and `[]` until full support of lists of maps is available + ## Argument Reference The following arguments are supported: From f6a4162897b248fb53d93a3381c1addcf62090c9 Mon Sep 17 00:00:00 2001 From: "greg.gajda@digital.hmrc.gov.uk" Date: Mon, 9 Apr 2018 11:15:05 +0100 Subject: [PATCH 0491/3316] CloudHSM vendor v1.13.28 --- .../aws/aws-sdk-go/service/cloudhsmv2/api.go | 2479 +++++++++++++++++ .../aws/aws-sdk-go/service/cloudhsmv2/doc.go | 29 + .../aws-sdk-go/service/cloudhsmv2/errors.go | 38 + .../aws-sdk-go/service/cloudhsmv2/service.go | 98 + vendor/vendor.json | 8 + 5 files changed, 2652 insertions(+) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go new file mode 100644 index 00000000000..2d232f7d3b6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go @@ -0,0 +1,2479 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudhsmv2 + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCreateCluster = "CreateCluster" + +// CreateClusterRequest generates a "aws/request.Request" representing the +// client's request for the CreateCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCluster for more information on using the CreateCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateClusterRequest method. +// req, resp := client.CreateClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster +func (c *CloudHSMV2) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { + op := &request.Operation{ + Name: opCreateCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateClusterInput{} + } + + output = &CreateClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCluster API operation for AWS CloudHSM V2. +// +// Creates a new AWS CloudHSM cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation CreateCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster +func (c *CloudHSMV2) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + return out, req.Send() +} + +// CreateClusterWithContext is the same as CreateCluster with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateHsm = "CreateHsm" + +// CreateHsmRequest generates a "aws/request.Request" representing the +// client's request for the CreateHsm operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateHsm for more information on using the CreateHsm +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateHsmRequest method. +// req, resp := client.CreateHsmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm +func (c *CloudHSMV2) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput) { + op := &request.Operation{ + Name: opCreateHsm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateHsmInput{} + } + + output = &CreateHsmOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateHsm API operation for AWS CloudHSM V2. +// +// Creates a new hardware security module (HSM) in the specified AWS CloudHSM +// cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation CreateHsm for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm +func (c *CloudHSMV2) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error) { + req, out := c.CreateHsmRequest(input) + return out, req.Send() +} + +// CreateHsmWithContext is the same as CreateHsm with the addition of +// the ability to pass a context and additional request options. +// +// See CreateHsm for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error) { + req, out := c.CreateHsmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCluster = "DeleteCluster" + +// DeleteClusterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCluster for more information on using the DeleteCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteClusterRequest method. +// req, resp := client.DeleteClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster +func (c *CloudHSMV2) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { + op := &request.Operation{ + Name: opDeleteCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteClusterInput{} + } + + output = &DeleteClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteCluster API operation for AWS CloudHSM V2. +// +// Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, +// you must delete all HSMs in the cluster. To see if the cluster contains any +// HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation DeleteCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster +func (c *CloudHSMV2) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + return out, req.Send() +} + +// DeleteClusterWithContext is the same as DeleteCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteHsm = "DeleteHsm" + +// DeleteHsmRequest generates a "aws/request.Request" representing the +// client's request for the DeleteHsm operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteHsm for more information on using the DeleteHsm +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteHsmRequest method. +// req, resp := client.DeleteHsmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm +func (c *CloudHSMV2) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput) { + op := &request.Operation{ + Name: opDeleteHsm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteHsmInput{} + } + + output = &DeleteHsmOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteHsm API operation for AWS CloudHSM V2. +// +// Deletes the specified HSM. To specify an HSM, you can use its identifier +// (ID), the IP address of the HSM's elastic network interface (ENI), or the +// ID of the HSM's ENI. You need to specify only one of these values. To find +// these values, use DescribeClusters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation DeleteHsm for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm +func (c *CloudHSMV2) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error) { + req, out := c.DeleteHsmRequest(input) + return out, req.Send() +} + +// DeleteHsmWithContext is the same as DeleteHsm with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteHsm for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error) { + req, out := c.DeleteHsmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBackups = "DescribeBackups" + +// DescribeBackupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBackups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeBackups for more information on using the DescribeBackups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeBackupsRequest method. +// req, resp := client.DescribeBackupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups +func (c *CloudHSMV2) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) { + op := &request.Operation{ + Name: opDescribeBackups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeBackupsInput{} + } + + output = &DescribeBackupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBackups API operation for AWS CloudHSM V2. +// +// Gets information about backups of AWS CloudHSM clusters. +// +// This is a paginated operation, which means that each response might contain +// only a subset of all the backups. When the response contains only a subset +// of backups, it includes a NextToken value. Use this value in a subsequent +// DescribeBackups request to get more backups. When you receive a response +// with no NextToken (or an empty or null value), that means there are no more +// backups to get. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation DescribeBackups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups +func (c *CloudHSMV2) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) { + req, out := c.DescribeBackupsRequest(input) + return out, req.Send() +} + +// DescribeBackupsWithContext is the same as DescribeBackups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBackups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) { + req, out := c.DescribeBackupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeBackupsPages iterates over the pages of a DescribeBackups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeBackups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeBackups operation. +// pageNum := 0 +// err := client.DescribeBackupsPages(params, +// func(page *DescribeBackupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudHSMV2) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error { + return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeBackupsPagesWithContext same as DescribeBackupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeBackupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeBackupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeClusters = "DescribeClusters" + +// DescribeClustersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClusters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClusters for more information on using the DescribeClusters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClustersRequest method. +// req, resp := client.DescribeClustersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters +func (c *CloudHSMV2) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { + op := &request.Operation{ + Name: opDescribeClusters, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeClustersInput{} + } + + output = &DescribeClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClusters API operation for AWS CloudHSM V2. +// +// Gets information about AWS CloudHSM clusters. +// +// This is a paginated operation, which means that each response might contain +// only a subset of all the clusters. When the response contains only a subset +// of clusters, it includes a NextToken value. Use this value in a subsequent +// DescribeClusters request to get more clusters. When you receive a response +// with no NextToken (or an empty or null value), that means there are no more +// clusters to get. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation DescribeClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters +func (c *CloudHSMV2) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { + req, out := c.DescribeClustersRequest(input) + return out, req.Send() +} + +// DescribeClustersWithContext is the same as DescribeClusters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClusters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { + req, out := c.DescribeClustersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeClustersPages iterates over the pages of a DescribeClusters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeClusters method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeClusters operation. +// pageNum := 0 +// err := client.DescribeClustersPages(params, +// func(page *DescribeClustersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudHSMV2) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error { + return c.DescribeClustersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeClustersPagesWithContext same as DescribeClustersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeClustersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeClustersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opInitializeCluster = "InitializeCluster" + +// InitializeClusterRequest generates a "aws/request.Request" representing the +// client's request for the InitializeCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InitializeCluster for more information on using the InitializeCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the InitializeClusterRequest method. +// req, resp := client.InitializeClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster +func (c *CloudHSMV2) InitializeClusterRequest(input *InitializeClusterInput) (req *request.Request, output *InitializeClusterOutput) { + op := &request.Operation{ + Name: opInitializeCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &InitializeClusterInput{} + } + + output = &InitializeClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// InitializeCluster API operation for AWS CloudHSM V2. +// +// Claims an AWS CloudHSM cluster by submitting the cluster certificate issued +// by your issuing certificate authority (CA) and the CA's root certificate. +// Before you can claim a cluster, you must sign the cluster's certificate signing +// request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation InitializeCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster +func (c *CloudHSMV2) InitializeCluster(input *InitializeClusterInput) (*InitializeClusterOutput, error) { + req, out := c.InitializeClusterRequest(input) + return out, req.Send() +} + +// InitializeClusterWithContext is the same as InitializeCluster with the addition of +// the ability to pass a context and additional request options. +// +// See InitializeCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) InitializeClusterWithContext(ctx aws.Context, input *InitializeClusterInput, opts ...request.Option) (*InitializeClusterOutput, error) { + req, out := c.InitializeClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTags = "ListTags" + +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTags for more information on using the ListTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags +func (c *CloudHSMV2) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for AWS CloudHSM V2. +// +// Gets a list of tags for the specified AWS CloudHSM cluster. +// +// This is a paginated operation, which means that each response might contain +// only a subset of all the tags. When the response contains only a subset of +// tags, it includes a NextToken value. Use this value in a subsequent ListTags +// request to get more tags. When you receive a response with no NextToken (or +// an empty or null value), that means there are no more tags to get. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation ListTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags +func (c *CloudHSMV2) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + return out, req.Send() +} + +// ListTagsWithContext is the same as ListTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTagsPages iterates over the pages of a ListTags operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTags method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTags operation. +// pageNum := 0 +// err := client.ListTagsPages(params, +// func(page *ListTagsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudHSMV2) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { + return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagsPagesWithContext same as ListTagsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource +func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// TagResource API operation for AWS CloudHSM V2. +// +// Adds or overwrites one or more tags for the specified AWS CloudHSM cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource +func (c *CloudHSMV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource +func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UntagResource API operation for AWS CloudHSM V2. +// +// Removes the specified tag or tags from the specified AWS CloudHSM cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource +func (c *CloudHSMV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudHSMV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Contains information about a backup of an AWS CloudHSM cluster. +type Backup struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the backup. + // + // BackupId is a required field + BackupId *string `type:"string" required:"true"` + + // The state of the backup. + BackupState *string `type:"string" enum:"BackupState"` + + // The identifier (ID) of the cluster that was backed up. + ClusterId *string `type:"string"` + + // The date and time when the backup was created. + CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` +} + +// String returns the string representation +func (s Backup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Backup) GoString() string { + return s.String() +} + +// SetBackupId sets the BackupId field's value. +func (s *Backup) SetBackupId(v string) *Backup { + s.BackupId = &v + return s +} + +// SetBackupState sets the BackupState field's value. +func (s *Backup) SetBackupState(v string) *Backup { + s.BackupState = &v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *Backup) SetClusterId(v string) *Backup { + s.ClusterId = &v + return s +} + +// SetCreateTimestamp sets the CreateTimestamp field's value. +func (s *Backup) SetCreateTimestamp(v time.Time) *Backup { + s.CreateTimestamp = &v + return s +} + +// Contains one or more certificates or a certificate signing request (CSR). +type Certificates struct { + _ struct{} `type:"structure"` + + // The HSM hardware certificate issued (signed) by AWS CloudHSM. + AwsHardwareCertificate *string `type:"string"` + + // The cluster certificate issued (signed) by the issuing certificate authority + // (CA) of the cluster's owner. + ClusterCertificate *string `type:"string"` + + // The cluster's certificate signing request (CSR). The CSR exists only when + // the cluster's state is UNINITIALIZED. + ClusterCsr *string `type:"string"` + + // The HSM certificate issued (signed) by the HSM hardware. + HsmCertificate *string `type:"string"` + + // The HSM hardware certificate issued (signed) by the hardware manufacturer. + ManufacturerHardwareCertificate *string `type:"string"` +} + +// String returns the string representation +func (s Certificates) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Certificates) GoString() string { + return s.String() +} + +// SetAwsHardwareCertificate sets the AwsHardwareCertificate field's value. +func (s *Certificates) SetAwsHardwareCertificate(v string) *Certificates { + s.AwsHardwareCertificate = &v + return s +} + +// SetClusterCertificate sets the ClusterCertificate field's value. +func (s *Certificates) SetClusterCertificate(v string) *Certificates { + s.ClusterCertificate = &v + return s +} + +// SetClusterCsr sets the ClusterCsr field's value. +func (s *Certificates) SetClusterCsr(v string) *Certificates { + s.ClusterCsr = &v + return s +} + +// SetHsmCertificate sets the HsmCertificate field's value. +func (s *Certificates) SetHsmCertificate(v string) *Certificates { + s.HsmCertificate = &v + return s +} + +// SetManufacturerHardwareCertificate sets the ManufacturerHardwareCertificate field's value. +func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificates { + s.ManufacturerHardwareCertificate = &v + return s +} + +// Contains information about an AWS CloudHSM cluster. +type Cluster struct { + _ struct{} `type:"structure"` + + // The cluster's backup policy. + BackupPolicy *string `type:"string" enum:"BackupPolicy"` + + // Contains one or more certificates or a certificate signing request (CSR). + Certificates *Certificates `type:"structure"` + + // The cluster's identifier (ID). + ClusterId *string `type:"string"` + + // The date and time when the cluster was created. + CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The type of HSM that the cluster contains. + HsmType *string `type:"string"` + + // Contains information about the HSMs in the cluster. + Hsms []*Hsm `type:"list"` + + // The default password for the cluster's Pre-Crypto Officer (PRECO) user. + PreCoPassword *string `min:"7" type:"string"` + + // The identifier (ID) of the cluster's security group. + SecurityGroup *string `type:"string"` + + // The identifier (ID) of the backup used to create the cluster. This value + // exists only when the cluster was created from a backup. + SourceBackupId *string `type:"string"` + + // The cluster's state. + State *string `type:"string" enum:"ClusterState"` + + // A description of the cluster's state. + StateMessage *string `type:"string"` + + // A map of the cluster's subnets and their corresponding Availability Zones. + SubnetMapping map[string]*string `type:"map"` + + // The identifier (ID) of the virtual private cloud (VPC) that contains the + // cluster. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s Cluster) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Cluster) GoString() string { + return s.String() +} + +// SetBackupPolicy sets the BackupPolicy field's value. +func (s *Cluster) SetBackupPolicy(v string) *Cluster { + s.BackupPolicy = &v + return s +} + +// SetCertificates sets the Certificates field's value. +func (s *Cluster) SetCertificates(v *Certificates) *Cluster { + s.Certificates = v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *Cluster) SetClusterId(v string) *Cluster { + s.ClusterId = &v + return s +} + +// SetCreateTimestamp sets the CreateTimestamp field's value. +func (s *Cluster) SetCreateTimestamp(v time.Time) *Cluster { + s.CreateTimestamp = &v + return s +} + +// SetHsmType sets the HsmType field's value. +func (s *Cluster) SetHsmType(v string) *Cluster { + s.HsmType = &v + return s +} + +// SetHsms sets the Hsms field's value. +func (s *Cluster) SetHsms(v []*Hsm) *Cluster { + s.Hsms = v + return s +} + +// SetPreCoPassword sets the PreCoPassword field's value. +func (s *Cluster) SetPreCoPassword(v string) *Cluster { + s.PreCoPassword = &v + return s +} + +// SetSecurityGroup sets the SecurityGroup field's value. +func (s *Cluster) SetSecurityGroup(v string) *Cluster { + s.SecurityGroup = &v + return s +} + +// SetSourceBackupId sets the SourceBackupId field's value. +func (s *Cluster) SetSourceBackupId(v string) *Cluster { + s.SourceBackupId = &v + return s +} + +// SetState sets the State field's value. +func (s *Cluster) SetState(v string) *Cluster { + s.State = &v + return s +} + +// SetStateMessage sets the StateMessage field's value. +func (s *Cluster) SetStateMessage(v string) *Cluster { + s.StateMessage = &v + return s +} + +// SetSubnetMapping sets the SubnetMapping field's value. +func (s *Cluster) SetSubnetMapping(v map[string]*string) *Cluster { + s.SubnetMapping = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *Cluster) SetVpcId(v string) *Cluster { + s.VpcId = &v + return s +} + +type CreateClusterInput struct { + _ struct{} `type:"structure"` + + // The type of HSM to use in the cluster. Currently the only allowed value is + // hsm1.medium. + // + // HsmType is a required field + HsmType *string `type:"string" required:"true"` + + // The identifier (ID) of the cluster backup to restore. Use this value to restore + // the cluster from a backup instead of creating a new cluster. To find the + // backup ID, use DescribeBackups. + SourceBackupId *string `type:"string"` + + // The identifiers (IDs) of the subnets where you are creating the cluster. + // You must specify at least one subnet. If you specify multiple subnets, they + // must meet the following criteria: + // + // * All subnets must be in the same virtual private cloud (VPC). + // + // * You can specify only one subnet per Availability Zone. + // + // SubnetIds is a required field + SubnetIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} + if s.HsmType == nil { + invalidParams.Add(request.NewErrParamRequired("HsmType")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.SubnetIds != nil && len(s.SubnetIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubnetIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHsmType sets the HsmType field's value. +func (s *CreateClusterInput) SetHsmType(v string) *CreateClusterInput { + s.HsmType = &v + return s +} + +// SetSourceBackupId sets the SourceBackupId field's value. +func (s *CreateClusterInput) SetSourceBackupId(v string) *CreateClusterInput { + s.SourceBackupId = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateClusterInput) SetSubnetIds(v []*string) *CreateClusterInput { + s.SubnetIds = v + return s +} + +type CreateClusterOutput struct { + _ struct{} `type:"structure"` + + // Information about the cluster that was created. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s CreateClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { + s.Cluster = v + return s +} + +type CreateHsmInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you are creating the HSM. To find the cluster's + // Availability Zones, use DescribeClusters. + // + // AvailabilityZone is a required field + AvailabilityZone *string `type:"string" required:"true"` + + // The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` + + // The HSM's IP address. If you specify an IP address, use an available address + // from the subnet that maps to the Availability Zone where you are creating + // the HSM. If you don't specify an IP address, one is chosen for you from that + // subnet. + IpAddress *string `type:"string"` +} + +// String returns the string representation +func (s CreateHsmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHsmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHsmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHsmInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateHsmInput) SetAvailabilityZone(v string) *CreateHsmInput { + s.AvailabilityZone = &v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *CreateHsmInput) SetClusterId(v string) *CreateHsmInput { + s.ClusterId = &v + return s +} + +// SetIpAddress sets the IpAddress field's value. +func (s *CreateHsmInput) SetIpAddress(v string) *CreateHsmInput { + s.IpAddress = &v + return s +} + +type CreateHsmOutput struct { + _ struct{} `type:"structure"` + + // Information about the HSM that was created. + Hsm *Hsm `type:"structure"` +} + +// String returns the string representation +func (s CreateHsmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHsmOutput) GoString() string { + return s.String() +} + +// SetHsm sets the Hsm field's value. +func (s *CreateHsmOutput) SetHsm(v *Hsm) *CreateHsmOutput { + s.Hsm = v + return s +} + +type DeleteClusterInput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the cluster that you are deleting. To find the cluster + // ID, use DescribeClusters. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *DeleteClusterInput) SetClusterId(v string) *DeleteClusterInput { + s.ClusterId = &v + return s +} + +type DeleteClusterOutput struct { + _ struct{} `type:"structure"` + + // Information about the cluster that was deleted. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s DeleteClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { + s.Cluster = v + return s +} + +type DeleteHsmInput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the cluster that contains the HSM that you are deleting. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` + + // The identifier (ID) of the elastic network interface (ENI) of the HSM that + // you are deleting. + EniId *string `type:"string"` + + // The IP address of the elastic network interface (ENI) of the HSM that you + // are deleting. + EniIp *string `type:"string"` + + // The identifier (ID) of the HSM that you are deleting. + HsmId *string `type:"string"` +} + +// String returns the string representation +func (s DeleteHsmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteHsmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteHsmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteHsmInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *DeleteHsmInput) SetClusterId(v string) *DeleteHsmInput { + s.ClusterId = &v + return s +} + +// SetEniId sets the EniId field's value. +func (s *DeleteHsmInput) SetEniId(v string) *DeleteHsmInput { + s.EniId = &v + return s +} + +// SetEniIp sets the EniIp field's value. +func (s *DeleteHsmInput) SetEniIp(v string) *DeleteHsmInput { + s.EniIp = &v + return s +} + +// SetHsmId sets the HsmId field's value. +func (s *DeleteHsmInput) SetHsmId(v string) *DeleteHsmInput { + s.HsmId = &v + return s +} + +type DeleteHsmOutput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the HSM that was deleted. + HsmId *string `type:"string"` +} + +// String returns the string representation +func (s DeleteHsmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteHsmOutput) GoString() string { + return s.String() +} + +// SetHsmId sets the HsmId field's value. +func (s *DeleteHsmOutput) SetHsmId(v string) *DeleteHsmOutput { + s.HsmId = &v + return s +} + +type DescribeBackupsInput struct { + _ struct{} `type:"structure"` + + // One or more filters to limit the items returned in the response. + // + // Use the backupIds filter to return only the specified backups. Specify backups + // by their backup identifier (ID). + // + // Use the clusterIds filter to return only the backups for the specified clusters. + // Specify clusters by their cluster identifier (ID). + // + // Use the states filter to return only backups that match the specified state. + Filters map[string][]*string `type:"map"` + + // The maximum number of backups to return in the response. When there are more + // backups than the number you specify, the response contains a NextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The NextToken value that you received in the previous response. Use this + // value to get more backups. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeBackupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBackupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeBackupsInput) SetFilters(v map[string][]*string) *DescribeBackupsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput { + s.NextToken = &v + return s +} + +type DescribeBackupsOutput struct { + _ struct{} `type:"structure"` + + // A list of backups. + Backups []*Backup `type:"list"` + + // An opaque string that indicates that the response contains only a subset + // of backups. Use this value in a subsequent DescribeBackups request to get + // more backups. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeBackupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupsOutput) GoString() string { + return s.String() +} + +// SetBackups sets the Backups field's value. +func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput { + s.Backups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { + s.NextToken = &v + return s +} + +type DescribeClustersInput struct { + _ struct{} `type:"structure"` + + // One or more filters to limit the items returned in the response. + // + // Use the clusterIds filter to return only the specified clusters. Specify + // clusters by their cluster identifier (ID). + // + // Use the vpcIds filter to return only the clusters in the specified virtual + // private clouds (VPCs). Specify VPCs by their VPC identifier (ID). + // + // Use the states filter to return only clusters that match the specified state. + Filters map[string][]*string `type:"map"` + + // The maximum number of clusters to return in the response. When there are + // more clusters than the number you specify, the response contains a NextToken + // value. + MaxResults *int64 `min:"1" type:"integer"` + + // The NextToken value that you received in the previous response. Use this + // value to get more clusters. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClustersInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClustersInput) SetFilters(v map[string][]*string) *DescribeClustersInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput { + s.NextToken = &v + return s +} + +type DescribeClustersOutput struct { + _ struct{} `type:"structure"` + + // A list of clusters. + Clusters []*Cluster `type:"list"` + + // An opaque string that indicates that the response contains only a subset + // of clusters. Use this value in a subsequent DescribeClusters request to get + // more clusters. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClustersOutput) GoString() string { + return s.String() +} + +// SetClusters sets the Clusters field's value. +func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { + s.Clusters = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput { + s.NextToken = &v + return s +} + +// Contains information about a hardware security module (HSM) in an AWS CloudHSM +// cluster. +type Hsm struct { + _ struct{} `type:"structure"` + + // The Availability Zone that contains the HSM. + AvailabilityZone *string `type:"string"` + + // The identifier (ID) of the cluster that contains the HSM. + ClusterId *string `type:"string"` + + // The identifier (ID) of the HSM's elastic network interface (ENI). + EniId *string `type:"string"` + + // The IP address of the HSM's elastic network interface (ENI). + EniIp *string `type:"string"` + + // The HSM's identifier (ID). + // + // HsmId is a required field + HsmId *string `type:"string" required:"true"` + + // The HSM's state. + State *string `type:"string" enum:"HsmState"` + + // A description of the HSM's state. + StateMessage *string `type:"string"` + + // The subnet that contains the HSM's elastic network interface (ENI). + SubnetId *string `type:"string"` +} + +// String returns the string representation +func (s Hsm) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Hsm) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *Hsm) SetAvailabilityZone(v string) *Hsm { + s.AvailabilityZone = &v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *Hsm) SetClusterId(v string) *Hsm { + s.ClusterId = &v + return s +} + +// SetEniId sets the EniId field's value. +func (s *Hsm) SetEniId(v string) *Hsm { + s.EniId = &v + return s +} + +// SetEniIp sets the EniIp field's value. +func (s *Hsm) SetEniIp(v string) *Hsm { + s.EniIp = &v + return s +} + +// SetHsmId sets the HsmId field's value. +func (s *Hsm) SetHsmId(v string) *Hsm { + s.HsmId = &v + return s +} + +// SetState sets the State field's value. +func (s *Hsm) SetState(v string) *Hsm { + s.State = &v + return s +} + +// SetStateMessage sets the StateMessage field's value. +func (s *Hsm) SetStateMessage(v string) *Hsm { + s.StateMessage = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *Hsm) SetSubnetId(v string) *Hsm { + s.SubnetId = &v + return s +} + +type InitializeClusterInput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the cluster that you are claiming. To find the cluster + // ID, use DescribeClusters. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` + + // The cluster certificate issued (signed) by your issuing certificate authority + // (CA). The certificate must be in PEM format and can contain a maximum of + // 5000 characters. + // + // SignedCert is a required field + SignedCert *string `type:"string" required:"true"` + + // The issuing certificate of the issuing certificate authority (CA) that issued + // (signed) the cluster certificate. This can be a root (self-signed) certificate + // or a certificate chain that begins with the certificate that issued the cluster + // certificate and ends with a root certificate. The certificate or certificate + // chain must be in PEM format and can contain a maximum of 5000 characters. + // + // TrustAnchor is a required field + TrustAnchor *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s InitializeClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InitializeClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InitializeClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InitializeClusterInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + if s.SignedCert == nil { + invalidParams.Add(request.NewErrParamRequired("SignedCert")) + } + if s.TrustAnchor == nil { + invalidParams.Add(request.NewErrParamRequired("TrustAnchor")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *InitializeClusterInput) SetClusterId(v string) *InitializeClusterInput { + s.ClusterId = &v + return s +} + +// SetSignedCert sets the SignedCert field's value. +func (s *InitializeClusterInput) SetSignedCert(v string) *InitializeClusterInput { + s.SignedCert = &v + return s +} + +// SetTrustAnchor sets the TrustAnchor field's value. +func (s *InitializeClusterInput) SetTrustAnchor(v string) *InitializeClusterInput { + s.TrustAnchor = &v + return s +} + +type InitializeClusterOutput struct { + _ struct{} `type:"structure"` + + // The cluster's state. + State *string `type:"string" enum:"ClusterState"` + + // A description of the cluster's state. + StateMessage *string `type:"string"` +} + +// String returns the string representation +func (s InitializeClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InitializeClusterOutput) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *InitializeClusterOutput) SetState(v string) *InitializeClusterOutput { + s.State = &v + return s +} + +// SetStateMessage sets the StateMessage field's value. +func (s *InitializeClusterOutput) SetStateMessage(v string) *InitializeClusterOutput { + s.StateMessage = &v + return s +} + +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of tags to return in the response. When there are more + // tags than the number you specify, the response contains a NextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The NextToken value that you received in the previous response. Use this + // value to get more tags. + NextToken *string `type:"string"` + + // The cluster identifier (ID) for the cluster whose tags you are getting. To + // find the cluster ID, use DescribeClusters. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { + s.NextToken = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ListTagsInput) SetResourceId(v string) *ListTagsInput { + s.ResourceId = &v + return s +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates that the response contains only a subset + // of tags. Use this value in a subsequent ListTags request to get more tags. + NextToken *string `type:"string"` + + // A list of tags. + // + // TagList is a required field + TagList []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { + s.NextToken = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput { + s.TagList = v + return s +} + +// Contains a tag. A tag is a key-value pair. +type Tag struct { + _ struct{} `type:"structure"` + + // The key of the tag. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The value of the tag. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The cluster identifier (ID) for the cluster that you are tagging. To find + // the cluster ID, use DescribeClusters. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // A list of one or more tags. + // + // TagList is a required field + TagList []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagList == nil { + invalidParams.Add(request.NewErrParamRequired("TagList")) + } + if s.TagList != nil && len(s.TagList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagList", 1)) + } + if s.TagList != nil { + for i, v := range s.TagList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput { + s.ResourceId = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *TagResourceInput) SetTagList(v []*Tag) *TagResourceInput { + s.TagList = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The cluster identifier (ID) for the cluster whose tags you are removing. + // To find the cluster ID, use DescribeClusters. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // A list of one or more tag keys for the tags that you are removing. Specify + // only the tag keys, not the tag values. + // + // TagKeyList is a required field + TagKeyList []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagKeyList == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeyList")) + } + if s.TagKeyList != nil && len(s.TagKeyList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeyList", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput { + s.ResourceId = &v + return s +} + +// SetTagKeyList sets the TagKeyList field's value. +func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput { + s.TagKeyList = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +const ( + // BackupPolicyDefault is a BackupPolicy enum value + BackupPolicyDefault = "DEFAULT" +) + +const ( + // BackupStateCreateInProgress is a BackupState enum value + BackupStateCreateInProgress = "CREATE_IN_PROGRESS" + + // BackupStateReady is a BackupState enum value + BackupStateReady = "READY" + + // BackupStateDeleted is a BackupState enum value + BackupStateDeleted = "DELETED" +) + +const ( + // ClusterStateCreateInProgress is a ClusterState enum value + ClusterStateCreateInProgress = "CREATE_IN_PROGRESS" + + // ClusterStateUninitialized is a ClusterState enum value + ClusterStateUninitialized = "UNINITIALIZED" + + // ClusterStateInitializeInProgress is a ClusterState enum value + ClusterStateInitializeInProgress = "INITIALIZE_IN_PROGRESS" + + // ClusterStateInitialized is a ClusterState enum value + ClusterStateInitialized = "INITIALIZED" + + // ClusterStateActive is a ClusterState enum value + ClusterStateActive = "ACTIVE" + + // ClusterStateUpdateInProgress is a ClusterState enum value + ClusterStateUpdateInProgress = "UPDATE_IN_PROGRESS" + + // ClusterStateDeleteInProgress is a ClusterState enum value + ClusterStateDeleteInProgress = "DELETE_IN_PROGRESS" + + // ClusterStateDeleted is a ClusterState enum value + ClusterStateDeleted = "DELETED" + + // ClusterStateDegraded is a ClusterState enum value + ClusterStateDegraded = "DEGRADED" +) + +const ( + // HsmStateCreateInProgress is a HsmState enum value + HsmStateCreateInProgress = "CREATE_IN_PROGRESS" + + // HsmStateActive is a HsmState enum value + HsmStateActive = "ACTIVE" + + // HsmStateDegraded is a HsmState enum value + HsmStateDegraded = "DEGRADED" + + // HsmStateDeleteInProgress is a HsmState enum value + HsmStateDeleteInProgress = "DELETE_IN_PROGRESS" + + // HsmStateDeleted is a HsmState enum value + HsmStateDeleted = "DELETED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go new file mode 100644 index 00000000000..fd7b0ef8e83 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go @@ -0,0 +1,29 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package cloudhsmv2 provides the client and types for making API +// requests to AWS CloudHSM V2. +// +// For more information about AWS CloudHSM, see AWS CloudHSM (http://aws.amazon.com/cloudhsm/) +// and the AWS CloudHSM User Guide (http://docs.aws.amazon.com/cloudhsm/latest/userguide/). +// +// See https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28 for more information on this service. +// +// See cloudhsmv2 package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/ +// +// Using the Client +// +// To contact AWS CloudHSM V2 with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS CloudHSM V2 client CloudHSMV2 for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/#New +package cloudhsmv2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go new file mode 100644 index 00000000000..542f2f40481 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go @@ -0,0 +1,38 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudhsmv2 + +const ( + + // ErrCodeCloudHsmAccessDeniedException for service response error code + // "CloudHsmAccessDeniedException". + // + // The request was rejected because the requester does not have permission to + // perform the requested operation. + ErrCodeCloudHsmAccessDeniedException = "CloudHsmAccessDeniedException" + + // ErrCodeCloudHsmInternalFailureException for service response error code + // "CloudHsmInternalFailureException". + // + // The request was rejected because of an AWS CloudHSM internal failure. The + // request can be retried. + ErrCodeCloudHsmInternalFailureException = "CloudHsmInternalFailureException" + + // ErrCodeCloudHsmInvalidRequestException for service response error code + // "CloudHsmInvalidRequestException". + // + // The request was rejected because it is not a valid request. + ErrCodeCloudHsmInvalidRequestException = "CloudHsmInvalidRequestException" + + // ErrCodeCloudHsmResourceNotFoundException for service response error code + // "CloudHsmResourceNotFoundException". + // + // The request was rejected because it refers to a resource that cannot be found. + ErrCodeCloudHsmResourceNotFoundException = "CloudHsmResourceNotFoundException" + + // ErrCodeCloudHsmServiceException for service response error code + // "CloudHsmServiceException". + // + // The request was rejected because an error occurred. + ErrCodeCloudHsmServiceException = "CloudHsmServiceException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go new file mode 100644 index 00000000000..62ed752a3b0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go @@ -0,0 +1,98 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudhsmv2 + +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" +) + +// CloudHSMV2 provides the API operation methods for making requests to +// AWS CloudHSM V2. See this package's package overview docs +// for details on the service. +// +// CloudHSMV2 methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type CloudHSMV2 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 = "cloudhsmv2" // Service endpoint prefix API calls made to. + EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. +) + +// New creates a new instance of the CloudHSMV2 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 CloudHSMV2 client from just a session. +// svc := cloudhsmv2.New(mySession) +// +// // Create a CloudHSMV2 client with additional configuration +// svc := cloudhsmv2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudHSMV2 { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "cloudhsm" + } + 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) *CloudHSMV2 { + svc := &CloudHSMV2{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-04-28", + JSONVersion: "1.1", + TargetPrefix: "BaldrApiService", + }, + 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 CloudHSMV2 operation and runs any +// custom request initialization. +func (c *CloudHSMV2) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/vendor.json b/vendor/vendor.json index a92ff014e1e..28ae1438547 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -382,6 +382,14 @@ "version": "v1.13.28", "versionExact": "v1.13.28" }, + { + "checksumSHA1": "8PdtKqSEcLQ1V0Gnl2FAHJoOQy0=", + "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", + "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", + "revisionTime": "2018-04-04T18:37:54Z", + "version": "v1.13.28", + "versionExact": "v1.13.28" + }, { "checksumSHA1": "kM7Fxkb1OdCiOOmTlRIadqnsdt0=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", From daa1b786953311330cc9a898f2beb9fbd6f43252 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 08:31:51 -0400 Subject: [PATCH 0492/3316] Update CHANGELOG for #4119 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97c4f5442cb..60028b4aedb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ ## 1.14.1 (Unreleased) + +BUG FIXES: + +* resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] +* resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] + ## 1.14.0 (April 06, 2018) NOTES: From 2d4e976d2c149f049ebb3348d91d8bcc9c6654b5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 08:41:40 -0400 Subject: [PATCH 0493/3316] Update CHANGELOG for #4106 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60028b4aedb..3edcaff58fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: +* resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] * resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] From 92205233f955d49821165290c50662d4a1371b24 Mon Sep 17 00:00:00 2001 From: Clint Date: Mon, 9 Apr 2018 11:31:51 -0500 Subject: [PATCH 0494/3316] Update codebuild_project.html.markdown Clarify that the `location.path` for `aws_codebuild` can be either a bucket or a bucket prefix --- website/docs/r/codebuild_project.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index e7e2e9118c3..b5d5f13aab4 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -152,7 +152,7 @@ The following arguments are supported: `cache` supports the following: * `type` - (Required) The type of storage that will be used for the AWS CodeBuild project cache. The only valid value is `S3`. -* `location` - (Required) The location where the AWS CodeBuild project stores cached resources. Has to be an S3 bucket. +* `location` - (Required) The location where the AWS CodeBuild project stores cached resources. This value must be a valid S3 bucket name/prefix. `environment` supports the following: From f9eac4634503cff259d2a20e1f896dcfaed951df Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Fri, 29 Dec 2017 00:33:44 +0100 Subject: [PATCH 0495/3316] r/aws_launch_configuration: support security groups and user data for import --- aws/import_aws_launch_configuration_test.go | 2 +- aws/resource_aws_launch_configuration.go | 12 ++++++++++-- aws/resource_aws_launch_configuration_test.go | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/aws/import_aws_launch_configuration_test.go b/aws/import_aws_launch_configuration_test.go index 2117327c1d0..3432c19293c 100644 --- a/aws/import_aws_launch_configuration_test.go +++ b/aws/import_aws_launch_configuration_test.go @@ -22,7 +22,7 @@ func TestAccAWSLaunchConfiguration_importBasic(t *testing.T) { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"associate_public_ip_address", "user_data"}, + ImportStateVerifyIgnore: []string{"associate_public_ip_address"}, }, }, }) diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index a232e6bb3ed..891a874f683 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -516,6 +516,7 @@ func resourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{} } lc := describConfs.LaunchConfigurations[0] + log.Printf("[DEBUG] launch configuration output: %s", lc) d.Set("key_name", lc.KeyName) d.Set("image_id", lc.ImageId) @@ -526,11 +527,18 @@ func resourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{} d.Set("ebs_optimized", lc.EbsOptimized) d.Set("spot_price", lc.SpotPrice) d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) - d.Set("security_groups", lc.SecurityGroups) d.Set("associate_public_ip_address", lc.AssociatePublicIpAddress) + if err := d.Set("security_groups", flattenStringList(lc.SecurityGroups)); err != nil { + return fmt.Errorf("error setting security_groups: %s", err) + } + if aws.StringValue(lc.UserData) != "" { + d.Set("user_data", userDataHashSum(*lc.UserData)) + } d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) - d.Set("vpc_classic_link_security_groups", lc.ClassicLinkVPCSecurityGroups) + if err := d.Set("vpc_classic_link_security_groups", flattenStringList(lc.ClassicLinkVPCSecurityGroups)); err != nil { + return fmt.Errorf("error setting vpc_classic_link_security_groups: %s", err) + } if err := readLCBlockDevices(d, lc, ec2conn); err != nil { return err diff --git a/aws/resource_aws_launch_configuration_test.go b/aws/resource_aws_launch_configuration_test.go index 25541491407..5b515d1e63c 100644 --- a/aws/resource_aws_launch_configuration_test.go +++ b/aws/resource_aws_launch_configuration_test.go @@ -194,6 +194,11 @@ func TestAccAWSLaunchConfiguration_withVpcClassicLink(t *testing.T) { testAccCheckAWSSecurityGroupExists("aws_security_group.foo", &group), ), }, + { + ResourceName: "aws_launch_configuration.foo", + ImportState: true, + ImportStateVerify: true, + }, }, }) } From 6097dd5c25599fe0ca9c2064be48dcdbce5f3256 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 15:11:56 -0400 Subject: [PATCH 0496/3316] Update CHANGELOG for #3821 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3edcaff58fd..6c78a87efb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: +* resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] * resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] From 4735f972ebda945b7026fd47c11ce71c15d57a69 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 15:57:07 -0400 Subject: [PATCH 0497/3316] tests/resource/aws_lambda_function: Add TestSteps for importing and removing dead_letter_config --- aws/resource_aws_lambda_function_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/aws/resource_aws_lambda_function_test.go b/aws/resource_aws_lambda_function_test.go index 48cb7161a0a..d8d74cfb7c3 100644 --- a/aws/resource_aws_lambda_function_test.go +++ b/aws/resource_aws_lambda_function_test.go @@ -386,6 +386,20 @@ func TestAccAWSLambdaFunction_DeadLetterConfig(t *testing.T) { }, ), }, + // Ensure configuration can be imported + { + ResourceName: "aws_lambda_function.lambda_function_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"filename", "publish"}, + }, + // Ensure configuration can be removed + { + Config: testAccAWSLambdaConfigBasic(funcName, policyName, roleName, sgName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaFunctionExists("aws_lambda_function.lambda_function_test", funcName, &conf), + ), + }, }, }) } From d717e36b8a1d3775c01e9e6cbeb3867ff1590d12 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 16:00:38 -0400 Subject: [PATCH 0498/3316] Update CHANGELOG for #2684 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c78a87efb6..e0bb4935527 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ BUG FIXES: * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] +* resource/aws_lambda_function: Prevent perpetual difference when removing `dead_letter_config` [GH-2684] * resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] From fbd3643396cbbe5fd9db856b7ea310db3ee6b880 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Mon, 9 Apr 2018 17:30:27 -0400 Subject: [PATCH 0499/3316] validate athena db name with regex as per docs add test cases for possible db names --- aws/resource_aws_athena_database.go | 9 ++++-- aws/resource_aws_athena_database_test.go | 35 +++++++++++++++++++++++- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index 3156c69d772..31815e6fe7c 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -2,9 +2,12 @@ package aws import ( "fmt" + "regexp" "strings" "time" + "github.com/hashicorp/terraform/helper/validation" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/athena" "github.com/hashicorp/terraform/helper/resource" @@ -23,6 +26,8 @@ func resourceAwsAthenaDatabase() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + // based on https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html + ValidateFunc: validation.StringMatch(regexp.MustCompile("[_a-z0-9]+"), "see https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html"), }, "bucket": { Type: schema.TypeString, @@ -42,7 +47,7 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e conn := meta.(*AWSClient).athenaconn input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprintf("create database %s;", d.Get("name").(string))), + QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), ResultConfiguration: &athena.ResultConfiguration{ OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), }, @@ -92,7 +97,7 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e name := d.Get("name").(string) bucket := d.Get("bucket").(string) - queryString := fmt.Sprintf("drop database %s", name) + queryString := fmt.Sprintf("drop database `%s`", name) if d.Get("force_destroy").(bool) { queryString += " cascade" } diff --git a/aws/resource_aws_athena_database_test.go b/aws/resource_aws_athena_database_test.go index dca9a236e07..1d9288689d3 100644 --- a/aws/resource_aws_athena_database_test.go +++ b/aws/resource_aws_athena_database_test.go @@ -30,6 +30,25 @@ func TestAccAWSAthenaDatabase_basic(t *testing.T) { }) } +func TestAccAWSAthenaDatabase_nameStartsWithUnderscore(t *testing.T) { + rInt := acctest.RandInt() + dbName := acctest.RandString(8) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAthenaDatabaseConfigNameStartsWithUnderscore(rInt, dbName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAthenaDatabaseExists("aws_athena_database.hoge"), + resource.TestCheckResourceAttr("aws_athena_database.hoge", "name", "_"+dbName), + ), + }, + }, + }) +} + func TestAccAWSAthenaDatabase_destroyFailsIfTablesExist(t *testing.T) { rInt := acctest.RandInt() dbName := acctest.RandString(8) @@ -248,7 +267,7 @@ func testAccCheckAWSAthenaDatabaseDropFails(dbName string) resource.TestCheckFun QueryExecutionContext: &athena.QueryExecutionContext{ Database: aws.String(dbName), }, - QueryString: aws.String(fmt.Sprintf("drop database %s;", dbName)), + QueryString: aws.String(fmt.Sprintf("drop database `%s`;", dbName)), ResultConfiguration: &athena.ResultConfiguration{ OutputLocation: aws.String("s3://" + bucketName), }, @@ -297,6 +316,20 @@ func testAccAthenaDatabaseConfig(randInt int, dbName string) string { `, dbName, randInt, dbName) } +func testAccAthenaDatabaseConfigNameStartsWithUnderscore(randInt int, dbName string) string { + return fmt.Sprintf(` + resource "aws_s3_bucket" "hoge" { + bucket = "tf-athena-db-%s-%d" + force_destroy = true + } + + resource "aws_athena_database" "hoge" { + name = "_%s" + bucket = "${aws_s3_bucket.hoge.bucket}" + } + `, dbName, randInt, dbName) +} + func testAccAthenaDatabaseConfigForceDestroy(randInt int, dbName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "hoge" { From 259ec21b874cda72c699c04688f2e2ac5387d902 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 17:53:10 -0400 Subject: [PATCH 0500/3316] resource/aws_codebuild_project: Properly handle setting cache type NO_CACHE --- aws/resource_aws_codebuild_project.go | 49 +++++++++++++------ aws/resource_aws_codebuild_project_test.go | 25 ++++++++-- .../docs/r/codebuild_project.html.markdown | 4 +- 3 files changed, 56 insertions(+), 22 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index e6d92150aee..95724b9b66d 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codebuild" + "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -69,13 +70,19 @@ func resourceAwsCodeBuildProject() *schema.Resource { "cache": { Type: schema.TypeList, Optional: true, - Computed: true, MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { Type: schema.TypeString, - Required: true, + Optional: true, + Default: codebuild.CacheTypeNoCache, ValidateFunc: validation.StringInSlice([]string{ codebuild.CacheTypeNoCache, codebuild.CacheTypeS3, @@ -83,7 +90,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, "location": { Type: schema.TypeString, - Required: true, + Optional: true, }, }, }, @@ -253,6 +260,20 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, }, }, + + CustomizeDiff: customdiff.Sequence( + func(diff *schema.ResourceDiff, v interface{}) error { + // Plan time validation for cache location + cacheType, cacheTypeOk := diff.GetOk("cache.0.type") + if !cacheTypeOk || cacheType.(string) == codebuild.CacheTypeNoCache { + return nil + } + if v, ok := diff.GetOk("cache.0.location"); ok && v.(string) != "" { + return nil + } + return fmt.Errorf(`cache location is required when cache type is %q`, cacheType.(string)) + }, + ), } } @@ -366,8 +387,11 @@ func expandProjectCache(s []interface{}) *codebuild.ProjectCache { data := s[0].(map[string]interface{}) projectCache = &codebuild.ProjectCache{ - Type: aws.String(data["type"].(string)), - Location: aws.String(data["location"].(string)), + Type: aws.String(data["type"].(string)), + } + + if v, ok := data["location"]; ok { + projectCache.Location = aws.String(v.(string)) } return projectCache @@ -643,18 +667,13 @@ func flattenAwsCodeBuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) } func flattenAwsCodebuildProjectCache(cache *codebuild.ProjectCache) []interface{} { - values := map[string]interface{}{} - - if cache.Type != nil { - if *cache.Type == "NO_CACHE" { - values["type"] = "" - } else { - values["type"] = *cache.Type - } + if cache == nil { + return []interface{}{} } - if cache.Location != nil { - values["location"] = *cache.Location + values := map[string]interface{}{ + "location": aws.StringValue(cache.Location), + "type": aws.StringValue(cache.Type), } return []interface{}{values} diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 2851b4964bc..62fbd1401b6 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -86,35 +86,50 @@ func TestAccAWSCodeBuildProject_cache(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_cache(name, testAccAWSCodeBuildProjectConfig_cacheConfig("S3", "")), + ExpectError: regexp.MustCompile(`cache location is required when cache type is "S3"`), + }, + { + Config: testAccAWSCodeBuildProjectConfig_cache(name, testAccAWSCodeBuildProjectConfig_cacheConfig("NO_CACHE", "")), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.#", "1"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "NO_CACHE"), + ), + }, { Config: testAccAWSCodeBuildProjectConfig_cache(name, ""), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), - resource.TestCheckNoResourceAttr("aws_codebuild_project.foo", "cache"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.#", "1"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "NO_CACHE"), ), }, { Config: testAccAWSCodeBuildProjectConfig_cache(name, testAccAWSCodeBuildProjectConfig_cacheConfig("S3", "some-bucket")), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.#", "1"), resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "S3"), - resource.TestCheckResourceAttrSet("aws_codebuild_project.foo", "cache.0.location"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.location", "some-bucket"), ), }, { Config: testAccAWSCodeBuildProjectConfig_cache(name, testAccAWSCodeBuildProjectConfig_cacheConfig("S3", "some-new-bucket")), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.#", "1"), resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "S3"), - resource.TestCheckResourceAttrSet("aws_codebuild_project.foo", "cache.0.location"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.location", "some-new-bucket"), ), }, { Config: testAccAWSCodeBuildProjectConfig_cache(name, ""), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists("aws_codebuild_project.foo"), - resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "S3"), - resource.TestCheckResourceAttrSet("aws_codebuild_project.foo", "cache.0.location"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.#", "1"), + resource.TestCheckResourceAttr("aws_codebuild_project.foo", "cache.0.type", "NO_CACHE"), ), }, }, diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index b5d5f13aab4..3cf362d3b4f 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -151,8 +151,8 @@ The following arguments are supported: `cache` supports the following: -* `type` - (Required) The type of storage that will be used for the AWS CodeBuild project cache. The only valid value is `S3`. -* `location` - (Required) The location where the AWS CodeBuild project stores cached resources. This value must be a valid S3 bucket name/prefix. +* `type` - (Optional) The type of storage that will be used for the AWS CodeBuild project cache. Valid values: `NO_CACHE` and `S3`. Defaults to `NO_CACHE`. +* `location` - (Required when cache type is not `NO_CACHE`) The location where the AWS CodeBuild project stores cached resources. For type `S3` the value must be a valid S3 bucket name/prefix. `environment` supports the following: From 024cc422edb4a6f3e91c645835a820261f709802 Mon Sep 17 00:00:00 2001 From: Robin Joseph Date: Mon, 9 Apr 2018 16:34:42 -0700 Subject: [PATCH 0501/3316] Update route53_query_log example --- website/docs/r/route53_query_log.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/route53_query_log.html.markdown b/website/docs/r/route53_query_log.html.markdown index e3704b149ef..4fcd136dadf 100644 --- a/website/docs/r/route53_query_log.html.markdown +++ b/website/docs/r/route53_query_log.html.markdown @@ -53,6 +53,8 @@ data "aws_iam_policy_document" "route53-query-logging-policy" { } resource "aws_cloudwatch_log_resource_policy" "route53-query-logging-policy" { + provider = "aws.us-east-1" + policy_document = "${data.aws_iam_policy_document.route53-query-logging-policy.json}" policy_name = "route53-query-logging-policy" } From 6bd0b672b1da9ae47121d342ae388dfc8c29ab97 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 19:52:53 -0400 Subject: [PATCH 0502/3316] Update CHANGELOG for #2800 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0bb4935527..4e5486594c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ BUG FIXES: * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] * resource/aws_lambda_function: Prevent perpetual difference when removing `dead_letter_config` [GH-2684] +* resource/aws_launch_configuration: Properly read `security_groups`, `user_data`, and `vpc_classic_link_security_groups` attributes into Terraform state [GH-2800] * resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] From d9772b53e1eef00074948509a6b0a768e8e373c3 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Mon, 9 Apr 2018 20:18:07 -0400 Subject: [PATCH 0503/3316] fix validation regex add testcase for uppercase name refactor test config to one func --- aws/resource_aws_athena_database.go | 9 ++- aws/resource_aws_athena_database_test.go | 71 ++++++++++-------------- 2 files changed, 34 insertions(+), 46 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index 31815e6fe7c..b004893723e 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -23,11 +23,10 @@ func resourceAwsAthenaDatabase() *schema.Resource { Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - // based on https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html - ValidateFunc: validation.StringMatch(regexp.MustCompile("[_a-z0-9]+"), "see https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html"), + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^[_a-z0-9]+$"), "see https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html"), }, "bucket": { Type: schema.TypeString, diff --git a/aws/resource_aws_athena_database_test.go b/aws/resource_aws_athena_database_test.go index 1d9288689d3..661206ef0e3 100644 --- a/aws/resource_aws_athena_database_test.go +++ b/aws/resource_aws_athena_database_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -21,7 +22,7 @@ func TestAccAWSAthenaDatabase_basic(t *testing.T) { CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, Steps: []resource.TestStep{ { - Config: testAccAthenaDatabaseConfig(rInt, dbName), + Config: testAccAthenaDatabaseConfig(rInt, dbName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAthenaDatabaseExists("aws_athena_database.hoge"), ), @@ -32,23 +33,39 @@ func TestAccAWSAthenaDatabase_basic(t *testing.T) { func TestAccAWSAthenaDatabase_nameStartsWithUnderscore(t *testing.T) { rInt := acctest.RandInt() - dbName := acctest.RandString(8) + dbName := "_" + acctest.RandString(8) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, Steps: []resource.TestStep{ { - Config: testAccAthenaDatabaseConfigNameStartsWithUnderscore(rInt, dbName), + Config: testAccAthenaDatabaseConfig(rInt, dbName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAthenaDatabaseExists("aws_athena_database.hoge"), - resource.TestCheckResourceAttr("aws_athena_database.hoge", "name", "_"+dbName), + resource.TestCheckResourceAttr("aws_athena_database.hoge", "name", dbName), ), }, }, }) } +func TestAccAWSAthenaDatabase_nameCantHaveUppercase(t *testing.T) { + rInt := acctest.RandInt() + dbName := "A" + acctest.RandString(8) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAthenaDatabaseConfig(rInt, dbName, false), + ExpectError: regexp.MustCompile(`see .*\.com`), + }, + }, + }) +} + func TestAccAWSAthenaDatabase_destroyFailsIfTablesExist(t *testing.T) { rInt := acctest.RandInt() dbName := acctest.RandString(8) @@ -58,7 +75,7 @@ func TestAccAWSAthenaDatabase_destroyFailsIfTablesExist(t *testing.T) { CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, Steps: []resource.TestStep{ { - Config: testAccAthenaDatabaseConfig(rInt, dbName), + Config: testAccAthenaDatabaseConfig(rInt, dbName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAthenaDatabaseExists("aws_athena_database.hoge"), testAccAWSAthenaDatabaseCreateTables(dbName), @@ -79,7 +96,7 @@ func TestAccAWSAthenaDatabase_forceDestroyAlwaysSucceeds(t *testing.T) { CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, Steps: []resource.TestStep{ { - Config: testAccAthenaDatabaseConfigForceDestroy(rInt, dbName), + Config: testAccAthenaDatabaseConfig(rInt, dbName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAthenaDatabaseExists("aws_athena_database.hoge"), testAccAWSAthenaDatabaseCreateTables(dbName), @@ -100,7 +117,7 @@ func testAccCheckAWSAthenaDatabaseDestroy(s *terraform.State) error { } rInt := acctest.RandInt() - bucketName := fmt.Sprintf("tf-athena-db-%s-%d", rs.Primary.Attributes["name"], rInt) + bucketName := fmt.Sprintf("tf-athena-db-%d", rInt) _, err := s3conn.CreateBucket(&s3.CreateBucketInput{ Bucket: aws.String(bucketName), }) @@ -302,45 +319,17 @@ func testAccAthenaDatabaseFindBucketName(s *terraform.State, dbName string) (buc return bucket, err } -func testAccAthenaDatabaseConfig(randInt int, dbName string) string { - return fmt.Sprintf(` - resource "aws_s3_bucket" "hoge" { - bucket = "tf-athena-db-%s-%d" - force_destroy = true - } - - resource "aws_athena_database" "hoge" { - name = "%s" - bucket = "${aws_s3_bucket.hoge.bucket}" - } - `, dbName, randInt, dbName) -} - -func testAccAthenaDatabaseConfigNameStartsWithUnderscore(randInt int, dbName string) string { - return fmt.Sprintf(` - resource "aws_s3_bucket" "hoge" { - bucket = "tf-athena-db-%s-%d" - force_destroy = true - } - - resource "aws_athena_database" "hoge" { - name = "_%s" - bucket = "${aws_s3_bucket.hoge.bucket}" - } - `, dbName, randInt, dbName) -} - -func testAccAthenaDatabaseConfigForceDestroy(randInt int, dbName string) string { +func testAccAthenaDatabaseConfig(randInt int, dbName string, forceDestroy bool) string { return fmt.Sprintf(` resource "aws_s3_bucket" "hoge" { - bucket = "tf-athena-db-%s-%d" + bucket = "tf-athena-db-%[1]d" force_destroy = true } resource "aws_athena_database" "hoge" { - name = "%s" - bucket = "${aws_s3_bucket.hoge.bucket}" - force_destroy = true + name = "%[2]s" + bucket = "${aws_s3_bucket.hoge.bucket}" + force_destroy = %[3]t } - `, dbName, randInt, dbName) + `, randInt, dbName, forceDestroy) } From 6c93ba6fae2d964445806b9a02d6436b126e5bb2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Apr 2018 21:01:31 -0400 Subject: [PATCH 0504/3316] Update CHANGELOG for #3982 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e5486594c4..7d4b0e35548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ BUG FIXES: * resource/aws_launch_configuration: Properly read `security_groups`, `user_data`, and `vpc_classic_link_security_groups` attributes into Terraform state [GH-2800] * resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] +* resource/aws_route53_zone: Suppress `name` difference with trailing period [GH-3982] ## 1.14.0 (April 06, 2018) From 8e91b7347e9cfa93964cf69d9c791c5161593a60 Mon Sep 17 00:00:00 2001 From: Gideon Seyetik Date: Mon, 9 Apr 2018 22:49:24 -0400 Subject: [PATCH 0505/3316] Update not found error message for DescribeDhcpOptions. --- aws/resource_aws_vpc_dhcp_options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_vpc_dhcp_options.go b/aws/resource_aws_vpc_dhcp_options.go index ec2844cc7c6..729b97df466 100644 --- a/aws/resource_aws_vpc_dhcp_options.go +++ b/aws/resource_aws_vpc_dhcp_options.go @@ -272,7 +272,7 @@ func resourceDHCPOptionsStateRefreshFunc(conn *ec2.EC2, id string) resource.Stat resp, err := conn.DescribeDhcpOptions(DescribeDhcpOpts) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidDhcpOptionsID.NotFound" { + if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidDhcpOptionID.NotFound" { resp = nil } else { log.Printf("Error on DHCPOptionsStateRefresh: %s", err) From 184317bbeeb36e8c286a867eb3f643e618afa156 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 09:17:32 -0400 Subject: [PATCH 0506/3316] resource/aws_vpc_peering_connection: Allow active pending state for deletion --- aws/resource_aws_vpc_peering_connection.go | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_vpc_peering_connection.go b/aws/resource_aws_vpc_peering_connection.go index 45964e2da5b..afea54ed4c4 100644 --- a/aws/resource_aws_vpc_peering_connection.go +++ b/aws/resource_aws_vpc_peering_connection.go @@ -282,15 +282,23 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - _, err := conn.DeleteVpcPeeringConnection( - &ec2.DeleteVpcPeeringConnectionInput{ - VpcPeeringConnectionId: aws.String(d.Id()), - }) + input := &ec2.DeleteVpcPeeringConnectionInput{ + VpcPeeringConnectionId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Deleting VPC Peering Connection: %s", input) + _, err := conn.DeleteVpcPeeringConnection(input) + if err != nil { + if isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") { + return nil + } + return fmt.Errorf("Error deleting VPC Peering Connection (%s): %s", d.Id(), err) + } - // Wait for the vpc peering connection to become available + // Wait for the vpc peering connection to delete log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to delete.", d.Id()) stateConf := &resource.StateChangeConf{ Pending: []string{ + ec2.VpcPeeringConnectionStateReasonCodeActive, ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance, ec2.VpcPeeringConnectionStateReasonCodeDeleting, }, @@ -302,12 +310,10 @@ func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error Timeout: 1 * time.Minute, } if _, err := stateConf.WaitForState(); err != nil { - return errwrap.Wrapf(fmt.Sprintf( - "Error waiting for VPC Peering Connection (%s) to be deleted: {{err}}", - d.Id()), err) + return fmt.Errorf("Error waiting for VPC Peering Connection (%s) to be deleted: %s", d.Id(), err) } - return err + return nil } // resourceAwsVPCPeeringConnectionStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch From 4cfeabf3498bc96282c7d7d3128fc93c1a8b90ad Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 08:44:16 -0400 Subject: [PATCH 0507/3316] resource/aws_iam_user: Retry on EntityTemporarilyUnmodifiable --- aws/resource_aws_iam_user.go | 23 +++++++++++++++---- ...esource_aws_iam_user_login_profile_test.go | 6 ++++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_iam_user.go b/aws/resource_aws_iam_user.go index 082e9d4dd9d..74bb711f7ca 100644 --- a/aws/resource_aws_iam_user.go +++ b/aws/resource_aws_iam_user.go @@ -4,11 +4,13 @@ import ( "fmt" "log" "regexp" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -218,13 +220,24 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { } } - _, err = iamconn.DeleteLoginProfile(&iam.DeleteLoginProfileInput{ - UserName: aws.String(d.Id()), + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err = iamconn.DeleteLoginProfile(&iam.DeleteLoginProfileInput{ + UserName: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. + if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { + return resource.RetryableError(err) + } + } + return nil }) + if err != nil { - if iamerr, ok := err.(awserr.Error); !ok || iamerr.Code() != "NoSuchEntity" { - return fmt.Errorf("Error deleting Account Login Profile: %s", err) - } + return fmt.Errorf("Error deleting Account Login Profile: %s", err) } } diff --git a/aws/resource_aws_iam_user_login_profile_test.go b/aws/resource_aws_iam_user_login_profile_test.go index 2ba68774841..1518da0ba29 100644 --- a/aws/resource_aws_iam_user_login_profile_test.go +++ b/aws/resource_aws_iam_user_login_profile_test.go @@ -228,7 +228,11 @@ func testDecryptPasswordAndTest(nProfile, nAccessKey, key string) resource.TestC NewPassword: aws.String(generateIAMPassword(20)), }) if err != nil { - if awserr, ok := err.(awserr.Error); ok && awserr.Code() == "InvalidClientTokenId" { + // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. + if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { + return resource.RetryableError(err) + } + if isAWSErr(err, "InvalidClientTokenId", "") { return resource.RetryableError(err) } From 78c022d449cad9d6b4c0e9f216f05c9d56821844 Mon Sep 17 00:00:00 2001 From: Miro Madecki Date: Tue, 10 Apr 2018 09:28:19 -0400 Subject: [PATCH 0508/3316] rds cluster resource was not setting engine_version for aurora postgres clusters --- aws/resource_aws_rds_cluster.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 10c3319ee09..bae89225764 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -460,6 +460,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) } From 07d0f55814ff306774c4ec2f77e526eb818264a7 Mon Sep 17 00:00:00 2001 From: Gideon Seyetik Date: Tue, 10 Apr 2018 10:10:30 -0400 Subject: [PATCH 0509/3316] Expanded support for not found messages with DhcpOptions. Capture both "InvalidDhcpOptionID.NotFound" and "InvalidDhcpOptionsID.NotFound" in all locations that refrenced either error. --- aws/resource_aws_vpc_dhcp_options.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_vpc_dhcp_options.go b/aws/resource_aws_vpc_dhcp_options.go index 729b97df466..b2334b91aa3 100644 --- a/aws/resource_aws_vpc_dhcp_options.go +++ b/aws/resource_aws_vpc_dhcp_options.go @@ -147,17 +147,11 @@ func resourceAwsVpcDhcpOptionsRead(d *schema.ResourceData, meta interface{}) err resp, err := conn.DescribeDhcpOptions(req) if err != nil { - ec2err, ok := err.(awserr.Error) - if !ok { - return fmt.Errorf("Error retrieving DHCP Options: %s", err.Error()) - } - - if ec2err.Code() == "InvalidDhcpOptionID.NotFound" { + if isNoSuchDhcpOptionIDErr(err) { log.Printf("[WARN] DHCP Options (%s) not found, removing from state", d.Id()) d.SetId("") return nil } - return fmt.Errorf("Error retrieving DHCP Options: %s", err.Error()) } @@ -212,7 +206,7 @@ func resourceAwsVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) e } switch ec2err.Code() { - case "InvalidDhcpOptionsID.NotFound": + case "InvalidDhcpOptionsID.NotFound", "InvalidDhcpOptionID.NotFound": return nil case "DependencyViolation": // If it is a dependency violation, we want to disassociate @@ -272,7 +266,7 @@ func resourceDHCPOptionsStateRefreshFunc(conn *ec2.EC2, id string) resource.Stat resp, err := conn.DescribeDhcpOptions(DescribeDhcpOpts) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidDhcpOptionID.NotFound" { + if isNoSuchDhcpOptionIDErr(err) { resp = nil } else { log.Printf("Error on DHCPOptionsStateRefresh: %s", err) @@ -290,3 +284,7 @@ func resourceDHCPOptionsStateRefreshFunc(conn *ec2.EC2, id string) resource.Stat return dos, "created", nil } } + +func isNoSuchDhcpOptionIDErr(err error) bool { + return isAWSErr(err, "InvalidDhcpOptionID.NotFound", "") || isAWSErr(err, "InvalidDhcpOptionsID.NotFound", "") +} From 5aa61d3dc5e2fe1a55e73b0951e0255b3f07eb05 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 10:10:51 -0400 Subject: [PATCH 0510/3316] tests/resource/aws_rds_cluster: Add engine_version attribute test --- aws/resource_aws_rds_cluster_test.go | 68 +++++++++++++++++++++------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index cd1fdabea74..ed22360d74b 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -17,7 +17,9 @@ import ( ) func TestAccAWSRDSCluster_basic(t *testing.T) { - var v rds.DBCluster + var dbCluster rds.DBCluster + rInt := acctest.RandInt() + resourceName := "aws_rds_cluster.default" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -25,23 +27,16 @@ func TestAccAWSRDSCluster_basic(t *testing.T) { CheckDestroy: testAccCheckAWSClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSClusterConfig(acctest.RandInt()), + Config: testAccAWSClusterConfig(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSClusterExists("aws_rds_cluster.default", &v), - resource.TestCheckResourceAttr( - "aws_rds_cluster.default", "storage_encrypted", "false"), - resource.TestCheckResourceAttr( - "aws_rds_cluster.default", "db_cluster_parameter_group_name", "default.aurora5.6"), - resource.TestCheckResourceAttrSet( - "aws_rds_cluster.default", "reader_endpoint"), - resource.TestCheckResourceAttrSet( - "aws_rds_cluster.default", "cluster_resource_id"), - resource.TestCheckResourceAttr( - "aws_rds_cluster.default", "engine", "aurora"), - resource.TestCheckResourceAttrSet( - "aws_rds_cluster.default", "engine_version"), - resource.TestCheckResourceAttrSet( - "aws_rds_cluster.default", "hosted_zone_id"), + testAccCheckAWSClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "storage_encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "db_cluster_parameter_group_name", "default.aurora5.6"), + resource.TestCheckResourceAttrSet(resourceName, "reader_endpoint"), + resource.TestCheckResourceAttrSet(resourceName, "cluster_resource_id"), + resource.TestCheckResourceAttr(resourceName, "engine", "aurora"), + resource.TestCheckResourceAttrSet(resourceName, "engine_version"), + resource.TestCheckResourceAttrSet(resourceName, "hosted_zone_id"), ), }, }, @@ -314,6 +309,28 @@ func TestAccAWSRDSCluster_iamAuth(t *testing.T) { }) } +func TestAccAWSRDSCluster_EngineVersion(t *testing.T) { + var dbCluster rds.DBCluster + rInt := acctest.RandInt() + resourceName := "aws_rds_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSClusterConfig_EngineVersion(rInt, "aurora-postgresql", "9.6.6"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "engine", "aurora-postgresql"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "9.6.6"), + ), + }, + }, + }) +} + func testAccCheckAWSClusterDestroy(s *terraform.State) error { return testAccCheckAWSClusterDestroyWithProvider(s, testAccProvider) } @@ -675,6 +692,23 @@ resource "aws_rds_cluster" "default" { }`, n) } +func testAccAWSClusterConfig_EngineVersion(rInt int, engine, engineVersion string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" {} + +resource "aws_rds_cluster" "test" { + availability_zones = ["${data.aws_availability_zones.available.names}"] + cluster_identifier = "tf-acc-test-%d" + database_name = "mydb" + db_cluster_parameter_group_name = "default.aurora-postgresql9.6" + engine = "%s" + engine_version = "%s" + master_password = "mustbeeightcharaters" + master_username = "foo" + skip_final_snapshot = true +}`, rInt, engine, engineVersion) +} + func testAccAWSClusterConfigIncludingIamRoles(n int) string { return fmt.Sprintf(` resource "aws_iam_role" "rds_sample_role" { From 6b82d3b4436ae10ca3a5ed1071f283d2b68fb394 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 10:12:35 -0400 Subject: [PATCH 0511/3316] Update CHANGELOG for #4139 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d4b0e35548..8932266797b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ BUG FIXES: * resource/aws_launch_configuration: Properly read `security_groups`, `user_data`, and `vpc_classic_link_security_groups` attributes into Terraform state [GH-2800] * resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] +* resource/aws_rds_cluster: Properly handle `engine_version` during regular creation [GH-4139] * resource/aws_route53_zone: Suppress `name` difference with trailing period [GH-3982] ## 1.14.0 (April 06, 2018) From 89873ecd35a8b96b84cef15e69f0b86932ee8425 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 10:41:17 -0400 Subject: [PATCH 0512/3316] resource/aws_rds_cluster: Set port to force new resource --- aws/resource_aws_rds_cluster.go | 1 + aws/resource_aws_rds_cluster_test.go | 57 ++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 18312ac2b1e..08a9b99ac0b 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -173,6 +173,7 @@ func resourceAwsRDSCluster() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, + ForceNew: true, }, // apply_immediately is used to determine when the update modifications diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index ed22360d74b..6ee245f1c32 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" "regexp" @@ -331,6 +332,35 @@ func TestAccAWSRDSCluster_EngineVersion(t *testing.T) { }) } +func TestAccAWSRDSCluster_Port(t *testing.T) { + var dbCluster1, dbCluster2 rds.DBCluster + rInt := acctest.RandInt() + resourceName := "aws_rds_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSClusterConfig_Port(rInt, 5432), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster1), + resource.TestCheckResourceAttr(resourceName, "port", "5432"), + ), + }, + { + Config: testAccAWSClusterConfig_Port(rInt, 2345), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster2), + testAccCheckAWSClusterRecreated(&dbCluster1, &dbCluster2), + resource.TestCheckResourceAttr(resourceName, "port", "2345"), + ), + }, + }, + }) +} + func testAccCheckAWSClusterDestroy(s *terraform.State) error { return testAccCheckAWSClusterDestroyWithProvider(s, testAccProvider) } @@ -456,6 +486,16 @@ func testAccCheckAWSClusterExistsWithProvider(n string, v *rds.DBCluster, provid } } +func testAccCheckAWSClusterRecreated(i, j *rds.DBCluster) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.TimeValue(i.ClusterCreateTime) == aws.TimeValue(j.ClusterCreateTime) { + return errors.New("RDS Cluster was not recreated") + } + + return nil + } +} + func testAccAWSClusterConfig(n int) string { return fmt.Sprintf(` resource "aws_rds_cluster" "default" { @@ -709,6 +749,23 @@ resource "aws_rds_cluster" "test" { }`, rInt, engine, engineVersion) } +func testAccAWSClusterConfig_Port(rInt, port int) string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" {} + +resource "aws_rds_cluster" "test" { + availability_zones = ["${data.aws_availability_zones.available.names}"] + cluster_identifier = "tf-acc-test-%d" + database_name = "mydb" + db_cluster_parameter_group_name = "default.aurora-postgresql9.6" + engine = "aurora-postgresql" + master_password = "mustbeeightcharaters" + master_username = "foo" + port = %d + skip_final_snapshot = true +}`, rInt, port) +} + func testAccAWSClusterConfigIncludingIamRoles(n int) string { return fmt.Sprintf(` resource "aws_iam_role" "rds_sample_role" { From 8e50b7443b4dd822ace039a921296f1af60d3e4b Mon Sep 17 00:00:00 2001 From: Harry Mills Date: Tue, 10 Apr 2018 10:51:36 -0400 Subject: [PATCH 0513/3316] Remove incorrect backtick --- website/docs/r/codedeploy_deployment_group.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/codedeploy_deployment_group.html.markdown b/website/docs/r/codedeploy_deployment_group.html.markdown index d2c977501f7..1b397ee5dca 100644 --- a/website/docs/r/codedeploy_deployment_group.html.markdown +++ b/website/docs/r/codedeploy_deployment_group.html.markdown @@ -193,7 +193,7 @@ You can configure a deployment to stop when a **CloudWatch** alarm detects that _Only one `alarm_configuration` is allowed_. ### Deployment Style -You can configure the type of deployment, either in-place` or blue/green, you want to run and whether to route deployment traffic behind a load balancer. `deployment_style` supports the following: +You can configure the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer. `deployment_style` supports the following: * `deployment_option` - (Optional) Indicates whether to route deployment traffic behind a load balancer. Valid Values are `WITH_TRAFFIC_CONTROL` or `WITHOUT_TRAFFIC_CONTROL`. From 46ad12953c3913865acfebb5bd791fb3fc62c5d1 Mon Sep 17 00:00:00 2001 From: Alan Lapthorn Date: Tue, 10 Apr 2018 16:24:46 +0100 Subject: [PATCH 0514/3316] Fix link to CloudFront API reference The current link to the CloudFront API reference is 404ing, this fixes it. --- website/docs/r/cloudfront_distribution.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/cloudfront_distribution.html.markdown b/website/docs/r/cloudfront_distribution.html.markdown index e31bc53c1b1..6b2dbae0e02 100644 --- a/website/docs/r/cloudfront_distribution.html.markdown +++ b/website/docs/r/cloudfront_distribution.html.markdown @@ -408,7 +408,7 @@ The following attributes are exported: [1]: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html -[2]: http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html +[2]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html [3]: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html [4]: http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm [5]: /docs/providers/aws/r/cloudfront_origin_access_identity.html From e6a48fe2a0c0ae6deeeff9f5dca5b02c4a859a9d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 13:30:05 -0400 Subject: [PATCH 0515/3316] resource/aws_db_event_subscription: Fix tag handling Additional updates: * Add arn attribute * Support configurable timeouts --- aws/resource_aws_db_event_subscription.go | 108 ++++++++---------- .../r/db_event_subscription.html.markdown | 16 +++ 2 files changed, 66 insertions(+), 58 deletions(-) diff --git a/aws/resource_aws_db_event_subscription.go b/aws/resource_aws_db_event_subscription.go index d81e235b1eb..aca39ccc15b 100644 --- a/aws/resource_aws_db_event_subscription.go +++ b/aws/resource_aws_db_event_subscription.go @@ -6,10 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -23,7 +20,16 @@ func resourceAwsDbEventSubscription() *schema.Resource { Importer: &schema.ResourceImporter{ State: resourceAwsDbEventSubscriptionImport, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(40 * time.Minute), + Delete: schema.DefaultTimeout(40 * time.Minute), + Update: schema.DefaultTimeout(40 * time.Minute), + }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "name": { Type: schema.TypeString, Required: true, @@ -67,7 +73,7 @@ func resourceAwsDbEventSubscription() *schema.Resource { } func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn + conn := meta.(*AWSClient).rdsconn name := d.Get("name").(string) tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) @@ -95,19 +101,25 @@ func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface log.Println("[DEBUG] Create RDS Event Subscription:", request) - _, err := rdsconn.CreateEventSubscription(request) - if err != nil { + output, err := conn.CreateEventSubscription(request) + if err != nil || output.EventSubscription == nil { return fmt.Errorf("Error creating RDS Event Subscription %s: %s", name, err) } + d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId)) + + if err := setTagsRDS(conn, d, aws.StringValue(output.EventSubscription.EventSubscriptionArn)); err != nil { + return fmt.Errorf("Error creating RDS Event Subscription (%s) tags: %s", d.Id(), err) + } + log.Println( "[INFO] Waiting for RDS Event Subscription to be ready") stateConf := &resource.StateChangeConf{ Pending: []string{"creating"}, Target: []string{"active"}, - Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d, meta.(*AWSClient).rdsconn), - Timeout: 40 * time.Minute, + Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d.Id(), conn), + Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, // Wait 30 secs before starting } @@ -122,16 +134,19 @@ func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface } func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { - sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Get("name").(string), meta.(*AWSClient).rdsconn) + conn := meta.(*AWSClient).rdsconn + + sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Get("name").(string), conn) if err != nil { return fmt.Errorf("Error retrieving RDS Event Subscription %s: %s", d.Id(), err) } if sub == nil { + log.Printf("[WARN] RDS Event Subscription (%s) not found - removing from state", d.Id()) d.SetId("") return nil } - d.SetId(*sub.CustSubscriptionId) + d.Set("arn", sub.EventSubscriptionArn) if err := d.Set("name", sub.CustSubscriptionId); err != nil { return err } @@ -155,43 +170,34 @@ func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{} } // list tags for resource - // set tags - conn := meta.(*AWSClient).rdsconn - - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: d.Get("customer_aws_id").(string), - Resource: fmt.Sprintf("subgrp:%s", d.Id()), - }.String() resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), + ResourceName: sub.EventSubscriptionArn, }) if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + log.Printf("[DEBUG] Error retrieving tags for ARN: %s", aws.StringValue(sub.EventSubscriptionArn)) } var dt []*rds.Tag if len(resp.TagList) > 0 { dt = resp.TagList } - d.Set("tags", tagsToMapRDS(dt)) + if err := d.Set("tags", tagsToMapRDS(dt)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } return nil } -func resourceAwsDbEventSubscriptionRetrieve( - name string, rdsconn *rds.RDS) (*rds.EventSubscription, error) { +func resourceAwsDbEventSubscriptionRetrieve(name string, conn *rds.RDS) (*rds.EventSubscription, error) { request := &rds.DescribeEventSubscriptionsInput{ SubscriptionName: aws.String(name), } - describeResp, err := rdsconn.DescribeEventSubscriptions(request) + describeResp, err := conn.DescribeEventSubscriptions(request) if err != nil { - if rdserr, ok := err.(awserr.Error); ok && rdserr.Code() == "SubscriptionNotFound" { + if isAWSErr(err, rds.ErrCodeSubscriptionNotFoundFault, "") { log.Printf("[WARN] No RDS Event Subscription by name (%s) found", name) return nil, nil } @@ -206,7 +212,7 @@ func resourceAwsDbEventSubscriptionRetrieve( } func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn + conn := meta.(*AWSClient).rdsconn d.Partial(true) requestUpdate := false @@ -243,7 +249,7 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface log.Printf("[DEBUG] Send RDS Event Subscription modification request: %#v", requestUpdate) if requestUpdate { log.Printf("[DEBUG] RDS Event Subscription modification request: %#v", req) - _, err := rdsconn.ModifyEventSubscription(req) + _, err := conn.ModifyEventSubscription(req) if err != nil { return fmt.Errorf("Modifying RDS Event Subscription %s failed: %s", d.Id(), err) } @@ -254,8 +260,8 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface stateConf := &resource.StateChangeConf{ Pending: []string{"modifying"}, Target: []string{"active"}, - Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d, meta.(*AWSClient).rdsconn), - Timeout: 40 * time.Minute, + Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d.Id(), conn), + Timeout: d.Timeout(schema.TimeoutUpdate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, // Wait 30 secs before starting } @@ -271,14 +277,7 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface d.SetPartial("source_type") } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: d.Get("customer_aws_id").(string), - Resource: fmt.Sprintf("subgrp:%s", d.Id()), - }.String() - if err := setTagsRDS(rdsconn, d, arn); err != nil { + if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { return err } else { d.SetPartial("tags") @@ -301,7 +300,7 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface if len(remove) > 0 { for _, removing := range remove { log.Printf("[INFO] Removing %s as a Source Identifier from %q", *removing, d.Id()) - _, err := rdsconn.RemoveSourceIdentifierFromSubscription(&rds.RemoveSourceIdentifierFromSubscriptionInput{ + _, err := conn.RemoveSourceIdentifierFromSubscription(&rds.RemoveSourceIdentifierFromSubscriptionInput{ SourceIdentifier: removing, SubscriptionName: aws.String(d.Id()), }) @@ -314,7 +313,7 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface if len(add) > 0 { for _, adding := range add { log.Printf("[INFO] Adding %s as a Source Identifier to %q", *adding, d.Id()) - _, err := rdsconn.AddSourceIdentifierToSubscription(&rds.AddSourceIdentifierToSubscriptionInput{ + _, err := conn.AddSourceIdentifierToSubscription(&rds.AddSourceIdentifierToSubscriptionInput{ SourceIdentifier: adding, SubscriptionName: aws.String(d.Id()), }) @@ -332,28 +331,23 @@ func resourceAwsDbEventSubscriptionUpdate(d *schema.ResourceData, meta interface } func resourceAwsDbEventSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { - rdsconn := meta.(*AWSClient).rdsconn + conn := meta.(*AWSClient).rdsconn deleteOpts := rds.DeleteEventSubscriptionInput{ SubscriptionName: aws.String(d.Id()), } - if _, err := rdsconn.DeleteEventSubscription(&deleteOpts); err != nil { - rdserr, ok := err.(awserr.Error) - if !ok { - return fmt.Errorf("Error deleting RDS Event Subscription %s: %s", d.Id(), err) - } - - if rdserr.Code() != "DBEventSubscriptionNotFoundFault" { - log.Printf("[WARN] RDS Event Subscription %s missing during delete", d.Id()) - return fmt.Errorf("Error deleting RDS Event Subscription %s: %s", d.Id(), err) + if _, err := conn.DeleteEventSubscription(&deleteOpts); err != nil { + if isAWSErr(err, rds.ErrCodeSubscriptionNotFoundFault, "") { + return nil } + return fmt.Errorf("Error deleting RDS Event Subscription %s: %s", d.Id(), err) } stateConf := &resource.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{}, - Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d, meta.(*AWSClient).rdsconn), - Timeout: 40 * time.Minute, + Refresh: resourceAwsDbEventSubscriptionRefreshFunc(d.Id(), conn), + Timeout: d.Timeout(schema.TimeoutDelete), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, // Wait 30 secs before starting } @@ -364,12 +358,10 @@ func resourceAwsDbEventSubscriptionDelete(d *schema.ResourceData, meta interface return err } -func resourceAwsDbEventSubscriptionRefreshFunc( - d *schema.ResourceData, - rdsconn *rds.RDS) resource.StateRefreshFunc { +func resourceAwsDbEventSubscriptionRefreshFunc(name string, conn *rds.RDS) resource.StateRefreshFunc { return func() (interface{}, string, error) { - sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Get("name").(string), rdsconn) + sub, err := resourceAwsDbEventSubscriptionRetrieve(name, conn) if err != nil { log.Printf("Error on retrieving DB Event Subscription when waiting: %s", err) @@ -381,7 +373,7 @@ func resourceAwsDbEventSubscriptionRefreshFunc( } if sub.Status != nil { - log.Printf("[DEBUG] DB Event Subscription status for %s: %s", d.Id(), *sub.Status) + log.Printf("[DEBUG] DB Event Subscription status for %s: %s", name, *sub.Status) } return sub, *sub.Status, nil diff --git a/website/docs/r/db_event_subscription.html.markdown b/website/docs/r/db_event_subscription.html.markdown index c4e39359293..127b501c820 100644 --- a/website/docs/r/db_event_subscription.html.markdown +++ b/website/docs/r/db_event_subscription.html.markdown @@ -61,6 +61,22 @@ The following arguments are supported: * `enabled` - (Optional) A boolean flag to enable/disable the subscription. Defaults to true. * `tags` - (Optional) A mapping of tags to assign to the resource. +## Attributes + +The following additional atttributes are provided: + +* `id` - The name of the RDS event notification subscription +* `arn` - The Amazon Resource Name of the RDS event notification subscription +* `customer_aws_id` - The AWS customer account associated with the RDS event notification subscription + +## Timeouts + +`aws_db_event_subscription` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) +configuration options: + +- `create` - (Default `40m`) How long to wait for a RDS event notification subscription to be ready. +- `delete` - (Default `40m`) How long to wait for a RDS event notification subscription to be deleted. +- `update` - (Default `40m`) How long to wait for a RDS event notification subscription to be updated. ## Import From 5909bf6c820e889180ba8d782b7517741a6005e2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 14:11:04 -0400 Subject: [PATCH 0516/3316] tests/resource/aws_db_event_subscription: Check arn and tags.% attributes --- ...resource_aws_db_event_subscription_test.go | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_db_event_subscription_test.go b/aws/resource_aws_db_event_subscription_test.go index 97bd8df1d60..779172721c3 100644 --- a/aws/resource_aws_db_event_subscription_test.go +++ b/aws/resource_aws_db_event_subscription_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -15,6 +16,7 @@ import ( func TestAccAWSDBEventSubscription_basicUpdate(t *testing.T) { var v rds.EventSubscription rInt := acctest.RandInt() + rName := fmt.Sprintf("tf-acc-test-rds-event-subs-%d", rInt) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -25,26 +27,22 @@ func TestAccAWSDBEventSubscription_basicUpdate(t *testing.T) { Config: testAccAWSDBEventSubscriptionConfig(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists("aws_db_event_subscription.bar", &v), - resource.TestCheckResourceAttr( - "aws_db_event_subscription.bar", "enabled", "true"), - resource.TestCheckResourceAttr( - "aws_db_event_subscription.bar", "source_type", "db-instance"), - resource.TestCheckResourceAttr( - "aws_db_event_subscription.bar", "name", fmt.Sprintf("tf-acc-test-rds-event-subs-%d", rInt)), - resource.TestCheckResourceAttr( - "aws_db_event_subscription.bar", "tags.Name", "name"), + resource.TestMatchResourceAttr("aws_db_event_subscription.bar", "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:rds:[^:]+:[^:]+:es:%s$", rName))), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "source_type", "db-instance"), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "name", rName), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "tags.Name", "name"), ), }, { Config: testAccAWSDBEventSubscriptionConfigUpdate(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBEventSubscriptionExists("aws_db_event_subscription.bar", &v), - resource.TestCheckResourceAttr( - "aws_db_event_subscription.bar", "enabled", "false"), - resource.TestCheckResourceAttr( - "aws_db_event_subscription.bar", "source_type", "db-parameter-group"), - resource.TestCheckResourceAttr( - "aws_db_event_subscription.bar", "tags.Name", "new-name"), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "enabled", "false"), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "source_type", "db-parameter-group"), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_db_event_subscription.bar", "tags.Name", "new-name"), ), }, }, From 1a39e9e14cbdd9549a926d5d01a17d0f3b345485 Mon Sep 17 00:00:00 2001 From: Puneeth Nanjundaswamy Date: Tue, 10 Apr 2018 20:59:30 +0200 Subject: [PATCH 0517/3316] fix terraform crash in kinesis firehose --- aws/resource_aws_kinesis_firehose_delivery_stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 90dbd80f3ec..c32bdba849a 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -176,7 +176,7 @@ func cloudwatchLoggingOptionsHash(v interface{}) int { func flattenCloudwatchLoggingOptions(clo *firehose.CloudWatchLoggingOptions) *schema.Set { if clo == nil { - return nil + return schema.NewSet(cloudwatchLoggingOptionsHash, []interface{}{}) } cloudwatchLoggingOptions := map[string]interface{}{ From 35c41cda22446064d6977d500d85b0a4ed5e08fa Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 15:42:42 -0400 Subject: [PATCH 0518/3316] Deps: Bump terraform@v0.11.7, copystructure, go-getter, and reflectwalk --- .../github.com/hashicorp/go-getter/README.md | 5 +- .../github.com/hashicorp/go-getter/client.go | 23 +- .../hashicorp/go-getter/decompress.go | 25 ++ .../hashicorp/go-getter/decompress_tar.go | 28 +- .../hashicorp/go-getter/decompress_testing.go | 25 ++ .../hashicorp/go-getter/decompress_zip.go | 5 + .../github.com/hashicorp/go-getter/get_git.go | 7 +- .../github.com/hashicorp/go-getter/get_hg.go | 10 +- .../hashicorp/go-getter/get_http.go | 23 +- .../github.com/hashicorp/go-safetemp/LICENSE | 362 ++++++++++++++++++ .../hashicorp/go-safetemp/README.md | 10 + .../hashicorp/go-safetemp/safetemp.go | 40 ++ .../hashicorp/terraform/config/module/get.go | 8 +- .../config/module/validate_provider_alias.go | 2 +- .../terraform/helper/schema/resource.go | 6 + .../terraform/helper/schema/resource_data.go | 10 +- .../terraform/helper/schema/resource_diff.go | 61 ++- .../terraform/helper/schema/schema.go | 6 +- .../terraform/helper/validation/validation.go | 46 +++ .../terraform/httpclient/useragent.go | 16 +- .../hashicorp/terraform/terraform/context.go | 14 + .../terraform/terraform/eval_validate.go | 1 + .../terraform/terraform/interpolate.go | 11 +- .../hashicorp/terraform/terraform/state.go | 15 +- .../terraform/transform_reference.go | 39 +- .../terraform/terraform/transform_targets.go | 6 + .../hashicorp/terraform/version/version.go | 2 +- .../mitchellh/copystructure/copystructure.go | 87 ++++- .../mitchellh/reflectwalk/location.go | 2 + .../mitchellh/reflectwalk/location_string.go | 8 +- .../mitchellh/reflectwalk/reflectwalk.go | 108 ++++-- vendor/vendor.json | 296 +++++++------- 32 files changed, 1067 insertions(+), 240 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-safetemp/LICENSE create mode 100644 vendor/github.com/hashicorp/go-safetemp/README.md create mode 100644 vendor/github.com/hashicorp/go-safetemp/safetemp.go diff --git a/vendor/github.com/hashicorp/go-getter/README.md b/vendor/github.com/hashicorp/go-getter/README.md index a9eafd61f06..40ace74d8ad 100644 --- a/vendor/github.com/hashicorp/go-getter/README.md +++ b/vendor/github.com/hashicorp/go-getter/README.md @@ -232,6 +232,9 @@ The options below are available to all protocols: * `checksum` - Checksum to verify the downloaded file or archive. See the entire section on checksumming above for format and more details. + * `filename` - When in file download mode, allows specifying the name of the + downloaded file on disk. Has no effect in directory mode. + ### Local Files (`file`) None @@ -282,7 +285,7 @@ be used automatically. * `aws_access_key_id` (required) - Minio access key. * `aws_access_key_secret` (required) - Minio access key secret. * `region` (optional - defaults to us-east-1) - Region identifier to use. - * `version` (optional - fefaults to Minio default) - Configuration file format. + * `version` (optional - defaults to Minio default) - Configuration file format. #### S3 Bucket Examples diff --git a/vendor/github.com/hashicorp/go-getter/client.go b/vendor/github.com/hashicorp/go-getter/client.go index b67bb641c36..300301c2eb4 100644 --- a/vendor/github.com/hashicorp/go-getter/client.go +++ b/vendor/github.com/hashicorp/go-getter/client.go @@ -17,6 +17,7 @@ import ( "strings" urlhelper "github.com/hashicorp/go-getter/helper/url" + "github.com/hashicorp/go-safetemp" ) // Client is a client for downloading things. @@ -100,17 +101,14 @@ func (c *Client) Get() error { dst := c.Dst src, subDir := SourceDirSubdir(src) if subDir != "" { - tmpDir, err := ioutil.TempDir("", "tf") + td, tdcloser, err := safetemp.Dir("", "getter") if err != nil { return err } - if err := os.RemoveAll(tmpDir); err != nil { - return err - } - defer os.RemoveAll(tmpDir) + defer tdcloser.Close() realDst = dst - dst = tmpDir + dst = td } u, err := urlhelper.Parse(src) @@ -232,7 +230,18 @@ func (c *Client) Get() error { // Destination is the base name of the URL path in "any" mode when // a file source is detected. if mode == ClientModeFile { - dst = filepath.Join(dst, filepath.Base(u.Path)) + filename := filepath.Base(u.Path) + + // Determine if we have a custom file name + if v := q.Get("filename"); v != "" { + // Delete the query parameter if we have it. + q.Del("filename") + u.RawQuery = q.Encode() + + filename = v + } + + dst = filepath.Join(dst, filename) } } diff --git a/vendor/github.com/hashicorp/go-getter/decompress.go b/vendor/github.com/hashicorp/go-getter/decompress.go index fc5681d39fa..198bb0edd01 100644 --- a/vendor/github.com/hashicorp/go-getter/decompress.go +++ b/vendor/github.com/hashicorp/go-getter/decompress.go @@ -1,7 +1,15 @@ package getter +import ( + "strings" +) + // Decompressor defines the interface that must be implemented to add // support for decompressing a type. +// +// Important: if you're implementing a decompressor, please use the +// containsDotDot helper in this file to ensure that files can't be +// decompressed outside of the specified directory. type Decompressor interface { // Decompress should decompress src to dst. dir specifies whether dst // is a directory or single file. src is guaranteed to be a single file @@ -31,3 +39,20 @@ func init() { "zip": new(ZipDecompressor), } } + +// containsDotDot checks if the filepath value v contains a ".." entry. +// This will check filepath components by splitting along / or \. This +// function is copied directly from the Go net/http implementation. +func containsDotDot(v string) bool { + if !strings.Contains(v, "..") { + return false + } + for _, ent := range strings.FieldsFunc(v, isSlashRune) { + if ent == ".." { + return true + } + } + return false +} + +func isSlashRune(r rune) bool { return r == '/' || r == '\\' } diff --git a/vendor/github.com/hashicorp/go-getter/decompress_tar.go b/vendor/github.com/hashicorp/go-getter/decompress_tar.go index 543c30d21f3..39cb392e066 100644 --- a/vendor/github.com/hashicorp/go-getter/decompress_tar.go +++ b/vendor/github.com/hashicorp/go-getter/decompress_tar.go @@ -13,6 +13,7 @@ import ( func untar(input io.Reader, dst, src string, dir bool) error { tarR := tar.NewReader(input) done := false + dirHdrs := []*tar.Header{} for { hdr, err := tarR.Next() if err == io.EOF { @@ -21,7 +22,7 @@ func untar(input io.Reader, dst, src string, dir bool) error { return fmt.Errorf("empty archive: %s", src) } - return nil + break } if err != nil { return err @@ -34,6 +35,11 @@ func untar(input io.Reader, dst, src string, dir bool) error { path := dst if dir { + // Disallow parent traversal + if containsDotDot(hdr.Name) { + return fmt.Errorf("entry contains '..': %s", hdr.Name) + } + path = filepath.Join(path, hdr.Name) } @@ -47,6 +53,10 @@ func untar(input io.Reader, dst, src string, dir bool) error { return err } + // Record the directory information so that we may set its attributes + // after all files have been extracted + dirHdrs = append(dirHdrs, hdr) + continue } else { // There is no ordering guarantee that a file in a directory is @@ -84,7 +94,23 @@ func untar(input io.Reader, dst, src string, dir bool) error { if err := os.Chmod(path, hdr.FileInfo().Mode()); err != nil { return err } + + // Set the access and modification time + if err := os.Chtimes(path, hdr.AccessTime, hdr.ModTime); err != nil { + return err + } } + + // Adding a file or subdirectory changes the mtime of a directory + // We therefore wait until we've extracted everything and then set the mtime and atime attributes + for _, dirHdr := range dirHdrs { + path := filepath.Join(dst, dirHdr.Name) + if err := os.Chtimes(path, dirHdr.AccessTime, dirHdr.ModTime); err != nil { + return err + } + } + + return nil } // tarDecompressor is an implementation of Decompressor that can diff --git a/vendor/github.com/hashicorp/go-getter/decompress_testing.go b/vendor/github.com/hashicorp/go-getter/decompress_testing.go index 82b8ab4f6e8..91cf33d98df 100644 --- a/vendor/github.com/hashicorp/go-getter/decompress_testing.go +++ b/vendor/github.com/hashicorp/go-getter/decompress_testing.go @@ -11,6 +11,7 @@ import ( "runtime" "sort" "strings" + "time" "github.com/mitchellh/go-testing-interface" ) @@ -22,6 +23,7 @@ type TestDecompressCase struct { Err bool // Err is whether we expect an error or not DirList []string // DirList is the list of files for Dir mode FileMD5 string // FileMD5 is the expected MD5 for a single file + Mtime *time.Time // Mtime is the optionally expected mtime for a single file (or all files if in Dir mode) } // TestDecompressor is a helper function for testing generic decompressors. @@ -68,6 +70,14 @@ func TestDecompressor(t testing.T, d Decompressor, cases []TestDecompressCase) { } } + if tc.Mtime != nil { + actual := fi.ModTime() + expected := *tc.Mtime + if actual != expected { + t.Fatalf("err %s: expected mtime '%s' for %s, got '%s'", tc.Input, expected.String(), dst, actual.String()) + } + } + return } @@ -84,6 +94,21 @@ func TestDecompressor(t testing.T, d Decompressor, cases []TestDecompressCase) { if !reflect.DeepEqual(actual, expected) { t.Fatalf("bad %s\n\n%#v\n\n%#v", tc.Input, actual, expected) } + // Check for correct atime/mtime + for _, dir := range actual { + path := filepath.Join(dst, dir) + if tc.Mtime != nil { + fi, err := os.Stat(path) + if err != nil { + t.Fatalf("err: %s", err) + } + actual := fi.ModTime() + expected := *tc.Mtime + if actual != expected { + t.Fatalf("err %s: expected mtime '%s' for %s, got '%s'", tc.Input, expected.String(), path, actual.String()) + } + } + } }() } } diff --git a/vendor/github.com/hashicorp/go-getter/decompress_zip.go b/vendor/github.com/hashicorp/go-getter/decompress_zip.go index a065c076ffe..b0e70cac35c 100644 --- a/vendor/github.com/hashicorp/go-getter/decompress_zip.go +++ b/vendor/github.com/hashicorp/go-getter/decompress_zip.go @@ -42,6 +42,11 @@ func (d *ZipDecompressor) Decompress(dst, src string, dir bool) error { for _, f := range zipR.File { path := dst if dir { + // Disallow parent traversal + if containsDotDot(f.Name) { + return fmt.Errorf("entry contains '..': %s", f.Name) + } + path = filepath.Join(path, f.Name) } diff --git a/vendor/github.com/hashicorp/go-getter/get_git.go b/vendor/github.com/hashicorp/go-getter/get_git.go index 6f5d9142bcd..cb1d02947ab 100644 --- a/vendor/github.com/hashicorp/go-getter/get_git.go +++ b/vendor/github.com/hashicorp/go-getter/get_git.go @@ -11,6 +11,7 @@ import ( "strings" urlhelper "github.com/hashicorp/go-getter/helper/url" + "github.com/hashicorp/go-safetemp" "github.com/hashicorp/go-version" ) @@ -105,13 +106,11 @@ func (g *GitGetter) Get(dst string, u *url.URL) error { // GetFile for Git doesn't support updating at this time. It will download // the file every time. func (g *GitGetter) GetFile(dst string, u *url.URL) error { - td, err := ioutil.TempDir("", "getter-git") + td, tdcloser, err := safetemp.Dir("", "getter") if err != nil { return err } - if err := os.RemoveAll(td); err != nil { - return err - } + defer tdcloser.Close() // Get the filename, and strip the filename from the URL so we can // just get the repository directly. diff --git a/vendor/github.com/hashicorp/go-getter/get_hg.go b/vendor/github.com/hashicorp/go-getter/get_hg.go index 820bdd488e1..f3869227057 100644 --- a/vendor/github.com/hashicorp/go-getter/get_hg.go +++ b/vendor/github.com/hashicorp/go-getter/get_hg.go @@ -2,7 +2,6 @@ package getter import ( "fmt" - "io/ioutil" "net/url" "os" "os/exec" @@ -10,6 +9,7 @@ import ( "runtime" urlhelper "github.com/hashicorp/go-getter/helper/url" + "github.com/hashicorp/go-safetemp" ) // HgGetter is a Getter implementation that will download a module from @@ -64,13 +64,13 @@ func (g *HgGetter) Get(dst string, u *url.URL) error { // GetFile for Hg doesn't support updating at this time. It will download // the file every time. func (g *HgGetter) GetFile(dst string, u *url.URL) error { - td, err := ioutil.TempDir("", "getter-hg") + // Create a temporary directory to store the full source. This has to be + // a non-existent directory. + td, tdcloser, err := safetemp.Dir("", "getter") if err != nil { return err } - if err := os.RemoveAll(td); err != nil { - return err - } + defer tdcloser.Close() // Get the filename, and strip the filename from the URL so we can // just get the repository directly. diff --git a/vendor/github.com/hashicorp/go-getter/get_http.go b/vendor/github.com/hashicorp/go-getter/get_http.go index 9acc72cd720..d2e28796d8f 100644 --- a/vendor/github.com/hashicorp/go-getter/get_http.go +++ b/vendor/github.com/hashicorp/go-getter/get_http.go @@ -4,12 +4,13 @@ import ( "encoding/xml" "fmt" "io" - "io/ioutil" "net/http" "net/url" "os" "path/filepath" "strings" + + "github.com/hashicorp/go-safetemp" ) // HttpGetter is a Getter implementation that will download from an HTTP @@ -135,25 +136,27 @@ func (g *HttpGetter) GetFile(dst string, u *url.URL) error { if err != nil { return err } - defer f.Close() - _, err = io.Copy(f, resp.Body) + n, err := io.Copy(f, resp.Body) + if err == nil && n < resp.ContentLength { + err = io.ErrShortWrite + } + if err1 := f.Close(); err == nil { + err = err1 + } return err } // getSubdir downloads the source into the destination, but with // the proper subdir. func (g *HttpGetter) getSubdir(dst, source, subDir string) error { - // Create a temporary directory to store the full source - td, err := ioutil.TempDir("", "tf") + // Create a temporary directory to store the full source. This has to be + // a non-existent directory. + td, tdcloser, err := safetemp.Dir("", "getter") if err != nil { return err } - defer os.RemoveAll(td) - - // We have to create a subdirectory that doesn't exist for the file - // getter to work. - td = filepath.Join(td, "data") + defer tdcloser.Close() // Download that into the given directory if err := Get(td, source); err != nil { diff --git a/vendor/github.com/hashicorp/go-safetemp/LICENSE b/vendor/github.com/hashicorp/go-safetemp/LICENSE new file mode 100644 index 00000000000..be2cc4dfb60 --- /dev/null +++ b/vendor/github.com/hashicorp/go-safetemp/LICENSE @@ -0,0 +1,362 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. diff --git a/vendor/github.com/hashicorp/go-safetemp/README.md b/vendor/github.com/hashicorp/go-safetemp/README.md new file mode 100644 index 00000000000..02ece331711 --- /dev/null +++ b/vendor/github.com/hashicorp/go-safetemp/README.md @@ -0,0 +1,10 @@ +# go-safetemp +[![Godoc](https://godoc.org/github.com/hashcorp/go-safetemp?status.svg)](https://godoc.org/github.com/hashicorp/go-safetemp) + +Functions for safely working with temporary directories and files. + +## Why? + +The Go standard library provides the excellent `ioutil` package for +working with temporary directories and files. This library builds on top +of that to provide safe abstractions above that. diff --git a/vendor/github.com/hashicorp/go-safetemp/safetemp.go b/vendor/github.com/hashicorp/go-safetemp/safetemp.go new file mode 100644 index 00000000000..c4ae72b7899 --- /dev/null +++ b/vendor/github.com/hashicorp/go-safetemp/safetemp.go @@ -0,0 +1,40 @@ +package safetemp + +import ( + "io" + "io/ioutil" + "os" + "path/filepath" +) + +// Dir creates a new temporary directory that isn't yet created. This +// can be used with calls that expect a non-existent directory. +// +// The directory is created as a child of a temporary directory created +// within the directory dir starting with prefix. The temporary directory +// returned is always named "temp". The parent directory has the specified +// prefix. +// +// The returned io.Closer should be used to clean up the returned directory. +// This will properly remove the returned directory and any other temporary +// files created. +// +// If an error is returned, the Closer does not need to be called (and will +// be nil). +func Dir(dir, prefix string) (string, io.Closer, error) { + // Create the temporary directory + td, err := ioutil.TempDir(dir, prefix) + if err != nil { + return "", nil, err + } + + return filepath.Join(td, "temp"), pathCloser(td), nil +} + +// pathCloser implements io.Closer to remove the given path on Close. +type pathCloser string + +// Close deletes this path. +func (p pathCloser) Close() error { + return os.RemoveAll(string(p)) +} diff --git a/vendor/github.com/hashicorp/terraform/config/module/get.go b/vendor/github.com/hashicorp/terraform/config/module/get.go index 58515ab3633..5073d0d2715 100644 --- a/vendor/github.com/hashicorp/terraform/config/module/get.go +++ b/vendor/github.com/hashicorp/terraform/config/module/get.go @@ -3,6 +3,7 @@ package module import ( "io/ioutil" "os" + "path/filepath" "github.com/hashicorp/go-getter" ) @@ -37,13 +38,10 @@ func GetCopy(dst, src string) error { if err != nil { return err } - // FIXME: This isn't completely safe. Creating and removing our temp path - // exposes where to race to inject files. - if err := os.RemoveAll(tmpDir); err != nil { - return err - } defer os.RemoveAll(tmpDir) + tmpDir = filepath.Join(tmpDir, "module") + // Get to that temporary dir if err := getter.Get(tmpDir, src); err != nil { return err diff --git a/vendor/github.com/hashicorp/terraform/config/module/validate_provider_alias.go b/vendor/github.com/hashicorp/terraform/config/module/validate_provider_alias.go index 090d4f7e398..f203556c10d 100644 --- a/vendor/github.com/hashicorp/terraform/config/module/validate_provider_alias.go +++ b/vendor/github.com/hashicorp/terraform/config/module/validate_provider_alias.go @@ -67,7 +67,7 @@ func (t *Tree) validateProviderAlias() error { // We didn't find the alias, error! err = multierror.Append(err, fmt.Errorf( - "module %s: provider alias must be defined by the module or a parent: %s", + "module %s: provider alias must be defined by the module: %s", strings.Join(pv.Path, "."), k)) } } diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource.go index c8e99b945b4..8f726bfbe47 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/resource.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource.go @@ -492,6 +492,12 @@ func (r *Resource) Data(s *terraform.InstanceState) *ResourceData { panic(err) } + // load the Resource timeouts + result.timeouts = r.Timeouts + if result.timeouts == nil { + result.timeouts = &ResourceTimeout{} + } + // Set the schema version to latest by default result.meta = map[string]interface{}{ "schema_version": strconv.Itoa(r.SchemaVersion), diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go index 9ab8bccaa5b..22d57a5ee06 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go @@ -366,6 +366,13 @@ func (d *ResourceData) State() *terraform.InstanceState { func (d *ResourceData) Timeout(key string) time.Duration { key = strings.ToLower(key) + // System default of 20 minutes + defaultTimeout := 20 * time.Minute + + if d.timeouts == nil { + return defaultTimeout + } + var timeout *time.Duration switch key { case TimeoutCreate: @@ -386,8 +393,7 @@ func (d *ResourceData) Timeout(key string) time.Duration { return *d.timeouts.Default } - // Return system default of 20 minutes - return 20 * time.Minute + return defaultTimeout } func (d *ResourceData) init() { diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go index 7b3716dd769..92b891fc5b3 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go @@ -135,6 +135,10 @@ type ResourceDiff struct { // diff does not get re-run on keys that were not touched, or diffs that were // just removed (re-running on the latter would just roll back the removal). updatedKeys map[string]bool + + // Tracks which keys were flagged as forceNew. These keys are not saved in + // newWriter, but we need to track them so that they can be re-diffed later. + forcedNewKeys map[string]bool } // newResourceDiff creates a new ResourceDiff instance. @@ -193,17 +197,30 @@ func newResourceDiff(schema map[string]*Schema, config *terraform.ResourceConfig } d.updatedKeys = make(map[string]bool) + d.forcedNewKeys = make(map[string]bool) return d } // UpdatedKeys returns the keys that were updated by this ResourceDiff run. // These are the only keys that a diff should be re-calculated for. +// +// This is the combined result of both keys for which diff values were updated +// for or cleared, and also keys that were flagged to be re-diffed as a result +// of ForceNew. func (d *ResourceDiff) UpdatedKeys() []string { var s []string for k := range d.updatedKeys { s = append(s, k) } + for k := range d.forcedNewKeys { + for _, l := range s { + if k == l { + break + } + } + s = append(s, k) + } return s } @@ -257,7 +274,7 @@ func (d *ResourceDiff) diffChange(key string) (interface{}, interface{}, bool, b if !old.Exists { old.Value = nil } - if !new.Exists { + if !new.Exists || d.removed(key) { new.Value = nil } @@ -335,9 +352,12 @@ func (d *ResourceDiff) ForceNew(key string) error { schema.ForceNew = true - // We need to set whole lists/sets/maps here - _, new := d.GetChange(keyParts[0]) - return d.setDiff(keyParts[0], new, false) + // Flag this for a re-diff. Don't save any values to guarantee that existing + // diffs aren't messed with, as this gets messy when dealing with complex + // structures, zero values, etc. + d.forcedNewKeys[keyParts[0]] = true + + return nil } // Get hands off to ResourceData.Get. @@ -378,6 +398,29 @@ func (d *ResourceDiff) GetOk(key string) (interface{}, bool) { return r.Value, exists } +// GetOkExists functions the same way as GetOkExists within ResourceData, but +// it also checks the new diff levels to provide data consistent with the +// current state of the customized diff. +// +// This is nearly the same function as GetOk, yet it does not check +// for the zero value of the attribute's type. This allows for attributes +// without a default, to fully check for a literal assignment, regardless +// of the zero-value for that type. +func (d *ResourceDiff) GetOkExists(key string) (interface{}, bool) { + r := d.get(strings.Split(key, "."), "newDiff") + exists := r.Exists && !r.Computed + return r.Value, exists +} + +// NewValueKnown returns true if the new value for the given key is available +// as its final value at diff time. If the return value is false, this means +// either the value is based of interpolation that was unavailable at diff +// time, or that the value was explicitly marked as computed by SetNewComputed. +func (d *ResourceDiff) NewValueKnown(key string) bool { + r := d.get(strings.Split(key, "."), "newDiff") + return !r.Computed +} + // HasChange checks to see if there is a change between state and the diff, or // in the overridden diff. func (d *ResourceDiff) HasChange(key string) bool { @@ -426,6 +469,16 @@ func (d *ResourceDiff) getChange(key string) (getResult, getResult, bool) { return old, new, false } +// removed checks to see if the key is present in the existing, pre-customized +// diff and if it was marked as NewRemoved. +func (d *ResourceDiff) removed(k string) bool { + diff, ok := d.diff.Attributes[k] + if !ok { + return false + } + return diff.NewRemoved +} + // get performs the appropriate multi-level reader logic for ResourceDiff, // starting at source. Refer to newResourceDiff for the level order. func (d *ResourceDiff) get(addr []string, source string) getResult { diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/schema.go b/vendor/github.com/hashicorp/terraform/helper/schema/schema.go index c94b694ff75..f44010ea52e 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/schema.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/schema.go @@ -395,7 +395,7 @@ func (m *schemaMap) DeepCopy() schemaMap { if err != nil { panic(err) } - return copy.(schemaMap) + return *copy.(*schemaMap) } // Diff returns the diff for a resource given the schema map, @@ -1270,9 +1270,9 @@ func (m schemaMap) validateConflictingAttributes( } for _, conflicting_key := range schema.ConflictsWith { - if value, ok := c.Get(conflicting_key); ok { + if _, ok := c.Get(conflicting_key); ok { return fmt.Errorf( - "%q: conflicts with %s (%#v)", k, conflicting_key, value) + "%q: conflicts with %s", k, conflicting_key) } } diff --git a/vendor/github.com/hashicorp/terraform/helper/validation/validation.go b/vendor/github.com/hashicorp/terraform/helper/validation/validation.go index 1fc3a6c0952..e9edcd33385 100644 --- a/vendor/github.com/hashicorp/terraform/helper/validation/validation.go +++ b/vendor/github.com/hashicorp/terraform/helper/validation/validation.go @@ -1,6 +1,7 @@ package validation import ( + "bytes" "fmt" "net" "reflect" @@ -180,6 +181,51 @@ func CIDRNetwork(min, max int) schema.SchemaValidateFunc { } } +// SingleIP returns a SchemaValidateFunc which tests if the provided value +// is of type string, and in valid single IP notation +func SingleIP() schema.SchemaValidateFunc { + return func(i interface{}, k string) (s []string, es []error) { + v, ok := i.(string) + if !ok { + es = append(es, fmt.Errorf("expected type of %s to be string", k)) + return + } + + ip := net.ParseIP(v) + if ip == nil { + es = append(es, fmt.Errorf( + "expected %s to contain a valid IP, got: %s", k, v)) + } + return + } +} + +// IPRange returns a SchemaValidateFunc which tests if the provided value +// is of type string, and in valid IP range notation +func IPRange() schema.SchemaValidateFunc { + return func(i interface{}, k string) (s []string, es []error) { + v, ok := i.(string) + if !ok { + es = append(es, fmt.Errorf("expected type of %s to be string", k)) + return + } + + ips := strings.Split(v, "-") + if len(ips) != 2 { + es = append(es, fmt.Errorf( + "expected %s to contain a valid IP range, got: %s", k, v)) + return + } + ip1 := net.ParseIP(ips[0]) + ip2 := net.ParseIP(ips[1]) + if ip1 == nil || ip2 == nil || bytes.Compare(ip1, ip2) > 0 { + es = append(es, fmt.Errorf( + "expected %s to contain a valid IP range, got: %s", k, v)) + } + return + } +} + // ValidateJsonString is a SchemaValidateFunc which tests to make sure the // supplied string is valid JSON. func ValidateJsonString(v interface{}, k string) (ws []string, errors []error) { diff --git a/vendor/github.com/hashicorp/terraform/httpclient/useragent.go b/vendor/github.com/hashicorp/terraform/httpclient/useragent.go index d8db087cf9c..5e280176888 100644 --- a/vendor/github.com/hashicorp/terraform/httpclient/useragent.go +++ b/vendor/github.com/hashicorp/terraform/httpclient/useragent.go @@ -2,15 +2,29 @@ package httpclient import ( "fmt" + "log" "net/http" + "os" + "strings" "github.com/hashicorp/terraform/version" ) const userAgentFormat = "Terraform/%s" +const uaEnvVar = "TF_APPEND_USER_AGENT" func UserAgentString() string { - return fmt.Sprintf(userAgentFormat, version.Version) + ua := fmt.Sprintf(userAgentFormat, version.Version) + + if add := os.Getenv(uaEnvVar); add != "" { + add = strings.TrimSpace(add) + if len(add) > 0 { + ua += " " + add + log.Printf("[DEBUG] Using modified User-Agent: %s", ua) + } + } + + return ua } type userAgentRoundTripper struct { diff --git a/vendor/github.com/hashicorp/terraform/terraform/context.go b/vendor/github.com/hashicorp/terraform/terraform/context.go index 53a12314a0f..f133cc20ad2 100644 --- a/vendor/github.com/hashicorp/terraform/terraform/context.go +++ b/vendor/github.com/hashicorp/terraform/terraform/context.go @@ -487,6 +487,13 @@ func (c *Context) Input(mode InputMode) error { func (c *Context) Apply() (*State, error) { defer c.acquireRun("apply")() + // Check there are no empty target parameter values + for _, target := range c.targets { + if target == "" { + return nil, fmt.Errorf("Target parameter must not have empty value") + } + } + // Copy our own state c.state = c.state.DeepCopy() @@ -524,6 +531,13 @@ func (c *Context) Apply() (*State, error) { func (c *Context) Plan() (*Plan, error) { defer c.acquireRun("plan")() + // Check there are no empty target parameter values + for _, target := range c.targets { + if target == "" { + return nil, fmt.Errorf("Target parameter must not have empty value") + } + } + p := &Plan{ Module: c.module, Vars: c.variables, diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go b/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go index 16bca3587c2..3e5a84ce65e 100644 --- a/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go +++ b/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go @@ -157,6 +157,7 @@ func (n *EvalValidateProvisioner) validateConnConfig(connConfig *ResourceConfig) // For type=winrm only (enforced in winrm communicator) HTTPS interface{} `mapstructure:"https"` Insecure interface{} `mapstructure:"insecure"` + NTLM interface{} `mapstructure:"use_ntlm"` CACert interface{} `mapstructure:"cacert"` } diff --git a/vendor/github.com/hashicorp/terraform/terraform/interpolate.go b/vendor/github.com/hashicorp/terraform/terraform/interpolate.go index 1509a65fe0c..4f4e178cf39 100644 --- a/vendor/github.com/hashicorp/terraform/terraform/interpolate.go +++ b/vendor/github.com/hashicorp/terraform/terraform/interpolate.go @@ -789,7 +789,8 @@ func (i *Interpolater) resourceCountMax( // If we're NOT applying, then we assume we can read the count // from the state. Plan and so on may not have any state yet so // we do a full interpolation. - if i.Operation != walkApply { + // Don't forget walkDestroy, which is a special case of walkApply + if !(i.Operation == walkApply || i.Operation == walkDestroy) { if cr == nil { return 0, nil } @@ -820,7 +821,13 @@ func (i *Interpolater) resourceCountMax( // use "cr.Count()" but that doesn't work if the count is interpolated // and we can't guarantee that so we instead depend on the state. max := -1 - for k, _ := range ms.Resources { + for k, s := range ms.Resources { + // This resource may have been just removed, in which case the Primary + // may be nil, or just empty. + if s == nil || s.Primary == nil || len(s.Primary.Attributes) == 0 { + continue + } + // Get the index number for this resource index := "" if k == id { diff --git a/vendor/github.com/hashicorp/terraform/terraform/state.go b/vendor/github.com/hashicorp/terraform/terraform/state.go index 89203bbfe1b..04b14a6597c 100644 --- a/vendor/github.com/hashicorp/terraform/terraform/state.go +++ b/vendor/github.com/hashicorp/terraform/terraform/state.go @@ -9,6 +9,7 @@ import ( "io" "io/ioutil" "log" + "os" "reflect" "sort" "strconv" @@ -1876,11 +1877,19 @@ var ErrNoState = errors.New("no state") // ReadState reads a state structure out of a reader in the format that // was written by WriteState. func ReadState(src io.Reader) (*State, error) { + // check for a nil file specifically, since that produces a platform + // specific error if we try to use it in a bufio.Reader. + if f, ok := src.(*os.File); ok && f == nil { + return nil, ErrNoState + } + buf := bufio.NewReader(src) + if _, err := buf.Peek(1); err != nil { - // the error is either io.EOF or "invalid argument", and both are from - // an empty state. - return nil, ErrNoState + if err == io.EOF { + return nil, ErrNoState + } + return nil, err } if err := testForV0State(buf); err != nil { diff --git a/vendor/github.com/hashicorp/terraform/terraform/transform_reference.go b/vendor/github.com/hashicorp/terraform/terraform/transform_reference.go index 403b7e42463..be8c7f96c39 100644 --- a/vendor/github.com/hashicorp/terraform/terraform/transform_reference.go +++ b/vendor/github.com/hashicorp/terraform/terraform/transform_reference.go @@ -119,17 +119,36 @@ func (t *DestroyValueReferenceTransformer) Transform(g *Graph) error { type PruneUnusedValuesTransformer struct{} func (t *PruneUnusedValuesTransformer) Transform(g *Graph) error { - vs := g.Vertices() - for _, v := range vs { - switch v.(type) { - case *NodeApplyableOutput, *NodeLocal: - // OK - default: - continue - } + // this might need multiple runs in order to ensure that pruning a value + // doesn't effect a previously checked value. + for removed := 0; ; removed = 0 { + for _, v := range g.Vertices() { + switch v.(type) { + case *NodeApplyableOutput, *NodeLocal: + // OK + default: + continue + } - if len(g.EdgesTo(v)) == 0 { - g.Remove(v) + dependants := g.UpEdges(v) + + switch dependants.Len() { + case 0: + // nothing at all depends on this + g.Remove(v) + removed++ + case 1: + // because an output's destroy node always depends on the output, + // we need to check for the case of a single destroy node. + d := dependants.List()[0] + if _, ok := d.(*NodeDestroyableOutput); ok { + g.Remove(v) + removed++ + } + } + } + if removed == 0 { + break } } diff --git a/vendor/github.com/hashicorp/terraform/terraform/transform_targets.go b/vendor/github.com/hashicorp/terraform/terraform/transform_targets.go index 0cfcb0ac0d6..af6defe3668 100644 --- a/vendor/github.com/hashicorp/terraform/terraform/transform_targets.go +++ b/vendor/github.com/hashicorp/terraform/terraform/transform_targets.go @@ -217,6 +217,12 @@ func filterPartialOutputs(v interface{}, targetedNodes *dag.Set, g *Graph) bool if _, ok := d.(*NodeCountBoundary); ok { continue } + + if !targetedNodes.Include(d) { + // this one is going to be removed, so it doesn't count + continue + } + // as soon as we see a real dependency, we mark this as // non-removable return true diff --git a/vendor/github.com/hashicorp/terraform/version/version.go b/vendor/github.com/hashicorp/terraform/version/version.go index 5a259e3adcf..3b982dbdb44 100644 --- a/vendor/github.com/hashicorp/terraform/version/version.go +++ b/vendor/github.com/hashicorp/terraform/version/version.go @@ -11,7 +11,7 @@ import ( ) // The main version number that is being run at the moment. -const Version = "0.11.4" +const Version = "0.11.7" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release diff --git a/vendor/github.com/mitchellh/copystructure/copystructure.go b/vendor/github.com/mitchellh/copystructure/copystructure.go index 0e725ea7237..140435255e1 100644 --- a/vendor/github.com/mitchellh/copystructure/copystructure.go +++ b/vendor/github.com/mitchellh/copystructure/copystructure.go @@ -156,9 +156,13 @@ func (w *walker) Exit(l reflectwalk.Location) error { } switch l { + case reflectwalk.Array: + fallthrough case reflectwalk.Map: fallthrough case reflectwalk.Slice: + w.replacePointerMaybe() + // Pop map off our container w.cs = w.cs[:len(w.cs)-1] case reflectwalk.MapValue: @@ -171,16 +175,27 @@ func (w *walker) Exit(l reflectwalk.Location) error { // or in this case never adds it. We need to create a properly typed // zero value so that this key can be set. if !mv.IsValid() { - mv = reflect.Zero(m.Type().Elem()) + mv = reflect.Zero(m.Elem().Type().Elem()) + } + m.Elem().SetMapIndex(mk, mv) + case reflectwalk.ArrayElem: + // Pop off the value and the index and set it on the array + v := w.valPop() + i := w.valPop().Interface().(int) + if v.IsValid() { + a := w.cs[len(w.cs)-1] + ae := a.Elem().Index(i) // storing array as pointer on stack - so need Elem() call + if ae.CanSet() { + ae.Set(v) + } } - m.SetMapIndex(mk, mv) case reflectwalk.SliceElem: // Pop off the value and the index and set it on the slice v := w.valPop() i := w.valPop().Interface().(int) if v.IsValid() { s := w.cs[len(w.cs)-1] - se := s.Index(i) + se := s.Elem().Index(i) if se.CanSet() { se.Set(v) } @@ -220,9 +235,9 @@ func (w *walker) Map(m reflect.Value) error { // Create the map. If the map itself is nil, then just make a nil map var newMap reflect.Value if m.IsNil() { - newMap = reflect.Indirect(reflect.New(m.Type())) + newMap = reflect.New(m.Type()) } else { - newMap = reflect.MakeMap(m.Type()) + newMap = wrapPtr(reflect.MakeMap(m.Type())) } w.cs = append(w.cs, newMap) @@ -287,9 +302,9 @@ func (w *walker) Slice(s reflect.Value) error { var newS reflect.Value if s.IsNil() { - newS = reflect.Indirect(reflect.New(s.Type())) + newS = reflect.New(s.Type()) } else { - newS = reflect.MakeSlice(s.Type(), s.Len(), s.Cap()) + newS = wrapPtr(reflect.MakeSlice(s.Type(), s.Len(), s.Cap())) } w.cs = append(w.cs, newS) @@ -309,6 +324,31 @@ func (w *walker) SliceElem(i int, elem reflect.Value) error { return nil } +func (w *walker) Array(a reflect.Value) error { + if w.ignoring() { + return nil + } + w.lock(a) + + newA := reflect.New(a.Type()) + + w.cs = append(w.cs, newA) + w.valPush(newA) + return nil +} + +func (w *walker) ArrayElem(i int, elem reflect.Value) error { + if w.ignoring() { + return nil + } + + // We don't write the array here because elem might still be + // arbitrarily complex. Just record the index and continue on. + w.valPush(reflect.ValueOf(i)) + + return nil +} + func (w *walker) Struct(s reflect.Value) error { if w.ignoring() { return nil @@ -326,7 +366,10 @@ func (w *walker) Struct(s reflect.Value) error { return err } - v = reflect.ValueOf(dup) + // We need to put a pointer to the value on the value stack, + // so allocate a new pointer and set it. + v = reflect.New(s.Type()) + reflect.Indirect(v).Set(reflect.ValueOf(dup)) } else { // No copier, we copy ourselves and allow reflectwalk to guide // us deeper into the structure for copying. @@ -405,6 +448,23 @@ func (w *walker) replacePointerMaybe() { } v := w.valPop() + + // If the expected type is a pointer to an interface of any depth, + // such as *interface{}, **interface{}, etc., then we need to convert + // the value "v" from *CONCRETE to *interface{} so types match for + // Set. + // + // Example if v is type *Foo where Foo is a struct, v would become + // *interface{} instead. This only happens if we have an interface expectation + // at this depth. + // + // For more info, see GH-16 + if iType, ok := w.ifaceTypes[ifaceKey(w.ps[w.depth], w.depth)]; ok && iType.Kind() == reflect.Interface { + y := reflect.New(iType) // Create *interface{} + y.Elem().Set(reflect.Indirect(v)) // Assign "Foo" to interface{} (dereferenced) + v = y // v is now typed *interface{} (where *v = Foo) + } + for i := 1; i < w.ps[w.depth]; i++ { if iType, ok := w.ifaceTypes[ifaceKey(w.ps[w.depth]-i, w.depth)]; ok { iface := reflect.New(iType).Elem() @@ -475,3 +535,14 @@ func (w *walker) lock(v reflect.Value) { locker.Lock() w.locks[w.depth] = locker } + +// wrapPtr is a helper that takes v and always make it *v. copystructure +// stores things internally as pointers until the last moment before unwrapping +func wrapPtr(v reflect.Value) reflect.Value { + if !v.IsValid() { + return v + } + vPtr := reflect.New(v.Type()) + vPtr.Elem().Set(v) + return vPtr +} diff --git a/vendor/github.com/mitchellh/reflectwalk/location.go b/vendor/github.com/mitchellh/reflectwalk/location.go index 7c59d764c2a..6a7f176117f 100644 --- a/vendor/github.com/mitchellh/reflectwalk/location.go +++ b/vendor/github.com/mitchellh/reflectwalk/location.go @@ -11,6 +11,8 @@ const ( MapValue Slice SliceElem + Array + ArrayElem Struct StructField WalkLoc diff --git a/vendor/github.com/mitchellh/reflectwalk/location_string.go b/vendor/github.com/mitchellh/reflectwalk/location_string.go index d3cfe85459b..70760cf4c70 100644 --- a/vendor/github.com/mitchellh/reflectwalk/location_string.go +++ b/vendor/github.com/mitchellh/reflectwalk/location_string.go @@ -1,15 +1,15 @@ -// generated by stringer -type=Location location.go; DO NOT EDIT +// Code generated by "stringer -type=Location location.go"; DO NOT EDIT. package reflectwalk import "fmt" -const _Location_name = "NoneMapMapKeyMapValueSliceSliceElemStructStructFieldWalkLoc" +const _Location_name = "NoneMapMapKeyMapValueSliceSliceElemArrayArrayElemStructStructFieldWalkLoc" -var _Location_index = [...]uint8{0, 4, 7, 13, 21, 26, 35, 41, 52, 59} +var _Location_index = [...]uint8{0, 4, 7, 13, 21, 26, 35, 40, 49, 55, 66, 73} func (i Location) String() string { - if i+1 >= Location(len(_Location_index)) { + if i >= Location(len(_Location_index)-1) { return fmt.Sprintf("Location(%d)", i) } return _Location_name[_Location_index[i]:_Location_index[i+1]] diff --git a/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go b/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go index ec0a62337e3..d7ab7b6d782 100644 --- a/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go +++ b/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go @@ -39,6 +39,13 @@ type SliceWalker interface { SliceElem(int, reflect.Value) error } +// ArrayWalker implementations are able to handle array elements found +// within complex structures. +type ArrayWalker interface { + Array(reflect.Value) error + ArrayElem(int, reflect.Value) error +} + // StructWalker is an interface that has methods that are called for // structs when a Walk is done. type StructWalker interface { @@ -65,6 +72,7 @@ type PointerWalker interface { // SkipEntry can be returned from walk functions to skip walking // the value of this field. This is only valid in the following functions: // +// - Struct: skips all fields from being walked // - StructField: skips walking the struct value // var SkipEntry = errors.New("skip this entry") @@ -179,6 +187,9 @@ func walk(v reflect.Value, w interface{}) (err error) { case reflect.Struct: err = walkStruct(v, w) return + case reflect.Array: + err = walkArray(v, w) + return default: panic("unsupported type: " + k.String()) } @@ -286,48 +297,99 @@ func walkSlice(v reflect.Value, w interface{}) (err error) { return nil } +func walkArray(v reflect.Value, w interface{}) (err error) { + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(Array) + } + + if aw, ok := w.(ArrayWalker); ok { + if err := aw.Array(v); err != nil { + return err + } + } + + for i := 0; i < v.Len(); i++ { + elem := v.Index(i) + + if aw, ok := w.(ArrayWalker); ok { + if err := aw.ArrayElem(i, elem); err != nil { + return err + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(ArrayElem) + } + + if err := walk(elem, w); err != nil { + return err + } + + if ok { + ew.Exit(ArrayElem) + } + } + + ew, ok = w.(EnterExitWalker) + if ok { + ew.Exit(Array) + } + + return nil +} + func walkStruct(v reflect.Value, w interface{}) (err error) { ew, ewok := w.(EnterExitWalker) if ewok { ew.Enter(Struct) } + skip := false if sw, ok := w.(StructWalker); ok { - if err = sw.Struct(v); err != nil { + err = sw.Struct(v) + if err == SkipEntry { + skip = true + err = nil + } + if err != nil { return } } - vt := v.Type() - for i := 0; i < vt.NumField(); i++ { - sf := vt.Field(i) - f := v.FieldByIndex([]int{i}) + if !skip { + vt := v.Type() + for i := 0; i < vt.NumField(); i++ { + sf := vt.Field(i) + f := v.FieldByIndex([]int{i}) - if sw, ok := w.(StructWalker); ok { - err = sw.StructField(sf, f) + if sw, ok := w.(StructWalker); ok { + err = sw.StructField(sf, f) - // SkipEntry just pretends this field doesn't even exist - if err == SkipEntry { - continue + // SkipEntry just pretends this field doesn't even exist + if err == SkipEntry { + continue + } + + if err != nil { + return + } + } + + ew, ok := w.(EnterExitWalker) + if ok { + ew.Enter(StructField) } + err = walk(f, w) if err != nil { return } - } - - ew, ok := w.(EnterExitWalker) - if ok { - ew.Enter(StructField) - } - err = walk(f, w) - if err != nil { - return - } - - if ok { - ew.Exit(StructField) + if ok { + ew.Exit(StructField) + } } } diff --git a/vendor/vendor.json b/vendor/vendor.json index a92ff014e1e..79f86dab383 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1028,16 +1028,16 @@ "revisionTime": "2017-02-11T01:34:15Z" }, { - "checksumSHA1": "9VcI9QGCShWIUIL187qRd4sxwb8=", + "checksumSHA1": "fvjFEz5PBN1m9ALWf9UuLgTFWLg=", "path": "github.com/hashicorp/go-getter", - "revision": "a686900cb3753aa644dc4812be91ceaf9fdd3b98", - "revisionTime": "2017-09-22T19:29:48Z" + "revision": "90bb99a48d86cf1d327cee9968f7428f90ba13c1", + "revisionTime": "2018-03-27T01:01:14Z" }, { "checksumSHA1": "9J+kDr29yDrwsdu2ULzewmqGjpA=", "path": "github.com/hashicorp/go-getter/helper/url", - "revision": "c3d66e76678dce180a7b452653472f949aedfbcd", - "revisionTime": "2017-02-07T21:55:32Z" + "revision": "90bb99a48d86cf1d327cee9968f7428f90ba13c1", + "revisionTime": "2018-03-27T01:01:14Z" }, { "checksumSHA1": "AA0aYmdg4pb5gPCUSXg8iPzxLag=", @@ -1056,6 +1056,12 @@ "revision": "a5174f84d7f8ff00fb07ab4ef1f380d32eee0e63", "revisionTime": "2017-08-16T15:18:19Z" }, + { + "checksumSHA1": "CduvzBFfTv77nhjtXPGdIjQQLMI=", + "path": "github.com/hashicorp/go-safetemp", + "revision": "b1a1dbde6fdc11e3ae79efd9039009e22d4ae240", + "revisionTime": "2018-03-26T21:11:50Z" + }, { "checksumSHA1": "85XUnluYJL7F55ptcwdmN8eSOsk=", "path": "github.com/hashicorp/go-uuid", @@ -1190,258 +1196,258 @@ { "checksumSHA1": "D2qVXjDywJu6wLj/4NCTsFnRrvw=", "path": "github.com/hashicorp/terraform/config", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "WzQP2WfiCYlaALKZVqEFsxZsG1o=", "path": "github.com/hashicorp/terraform/config/configschema", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "3V7300kyZF+AGy/cOKV0+P6M3LY=", "path": "github.com/hashicorp/terraform/config/hcl2shim", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { - "checksumSHA1": "7+cYlhS0+Z/xYUzYQft8Wibs1GA=", + "checksumSHA1": "HayBWvFE+t9aERoz9kpE2MODurk=", "path": "github.com/hashicorp/terraform/config/module", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "mPbjVPD2enEey45bP4M83W2AxlY=", "path": "github.com/hashicorp/terraform/dag", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "P8gNPDuOzmiK4Lz9xG7OBy4Rlm8=", "path": "github.com/hashicorp/terraform/flatmap", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "zx5DLo5aV0xDqxGTzSibXg7HHAA=", "path": "github.com/hashicorp/terraform/helper/acctest", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "uT6Q9RdSRAkDjyUgQlJ2XKJRab4=", "path": "github.com/hashicorp/terraform/helper/config", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "qVmQPoZmJ2w2OnaxIheWfuwun6g=", "path": "github.com/hashicorp/terraform/helper/customdiff", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "FH5eOEHfHgdxPC/JnfmCeSBk66U=", "path": "github.com/hashicorp/terraform/helper/encryption", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "KNvbU1r5jv0CBeQLnEtDoL3dRtc=", "path": "github.com/hashicorp/terraform/helper/hashcode", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "B267stWNQd0/pBTXHfI/tJsxzfc=", "path": "github.com/hashicorp/terraform/helper/hilmapstructure", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "BAXV9ruAyno3aFgwYI2/wWzB2Gc=", "path": "github.com/hashicorp/terraform/helper/logging", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "twkFd4x71kBnDfrdqO5nhs8dMOY=", "path": "github.com/hashicorp/terraform/helper/mutexkv", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "ImyqbHM/xe3eAT2moIjLI8ksuks=", "path": "github.com/hashicorp/terraform/helper/pathorcontents", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "ryCWu7RtMlYrAfSevaI7RtaXe98=", "path": "github.com/hashicorp/terraform/helper/resource", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { - "checksumSHA1": "ckEg0tYoH3oVZD30IHOay6Ne63o=", + "checksumSHA1": "JHxGzmxcIS8NyLX9pGhK5beIra4=", "path": "github.com/hashicorp/terraform/helper/schema", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "Fzbv+N7hFXOtrR6E7ZcHT3jEE9s=", "path": "github.com/hashicorp/terraform/helper/structure", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { - "checksumSHA1": "JL8eJjRMxGI2zz2fMYXhXQpRtPk=", + "checksumSHA1": "nEC56vB6M60BJtGPe+N9rziHqLg=", "path": "github.com/hashicorp/terraform/helper/validation", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { - "checksumSHA1": "VgChgJYOTM4zrNOWifEqDsdv7Hk=", + "checksumSHA1": "kD1ayilNruf2cES1LDfNZjYRscQ=", "path": "github.com/hashicorp/terraform/httpclient", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "yFWmdS6yEJZpRJzUqd/mULqCYGk=", "path": "github.com/hashicorp/terraform/moduledeps", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "DqaoG++NXRCfvH/OloneLWrM+3k=", "path": "github.com/hashicorp/terraform/plugin", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "tx5xrdiUWdAHqoRV5aEfALgT1aU=", "path": "github.com/hashicorp/terraform/plugin/discovery", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "f6wDpr0uHKZqQw4ztvxMrtiuvQo=", "path": "github.com/hashicorp/terraform/registry", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "cR87P4V5aiEfvF+1qoBi2JQyQS4=", "path": "github.com/hashicorp/terraform/registry/regsrc", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "y9IXgIJQq9XNy1zIYUV2Kc0KsnA=", "path": "github.com/hashicorp/terraform/registry/response", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "VXlzRRDVOqeMvnnrbUcR9H64OA4=", "path": "github.com/hashicorp/terraform/svchost", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "GzcKNlFL0N77JVjU8qbltXE4R3k=", "path": "github.com/hashicorp/terraform/svchost/auth", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "jiDWmQieUE6OoUBMs53hj9P/JDQ=", "path": "github.com/hashicorp/terraform/svchost/disco", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { - "checksumSHA1": "Soh8iC7ikCO2Z7CWulI/9mlJUDc=", + "checksumSHA1": "lHCKONqlaHsn5cEaYltad7dvRq8=", "path": "github.com/hashicorp/terraform/terraform", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "+K+oz9mMTmQMxIA3KVkGRfjvm9I=", "path": "github.com/hashicorp/terraform/tfdiags", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { - "checksumSHA1": "6n9DKfhMSN1TSizmkoetaPH8HDk=", + "checksumSHA1": "+attjxAt9nwFpCjxWEL08YwpGD8=", "path": "github.com/hashicorp/terraform/version", - "revision": "7878d66b386e5474102b5047722c2de2b3237278", - "revisionTime": "2018-03-15T20:35:34Z", - "version": "v0.11.4", - "versionExact": "v0.11.4" + "revision": "41e50bd32a8825a84535e353c3674af8ce799161", + "revisionTime": "2018-04-10T16:50:42Z", + "version": "v0.11.7", + "versionExact": "v0.11.7" }, { "checksumSHA1": "ft77GtqeZEeCXioGpF/s6DlGm/U=", @@ -1547,10 +1553,10 @@ "revisionTime": "2017-08-03T04:29:10Z" }, { - "checksumSHA1": "guxbLo8KHHBeM0rzou4OTzzpDNs=", + "checksumSHA1": "+p4JY4wmFQAppCdlrJ8Kxybmht8=", "path": "github.com/mitchellh/copystructure", - "revision": "5af94aef99f597e6a9e1f6ac6be6ce0f3c96b49d", - "revisionTime": "2016-10-13T19:53:42Z" + "revision": "d23ffcb85de31694d6ccaa23ccb4a03e55c1303f", + "revisionTime": "2017-05-25T01:39:02Z" }, { "checksumSHA1": "V/quM7+em2ByJbWBLOsEwnY3j/Q=", @@ -1582,10 +1588,10 @@ "revisionTime": "2017-03-07T20:11:23Z" }, { - "checksumSHA1": "vBpuqNfSTZcAR/0tP8tNYacySGs=", + "checksumSHA1": "AMU63CNOg4XmIhVR/S/Xttt1/f0=", "path": "github.com/mitchellh/reflectwalk", - "revision": "92573fe8d000a145bfebc03a16bc22b34945867f", - "revisionTime": "2016-10-03T17:45:16Z" + "revision": "63d60e9d0dbc60cf9164e6510889b0db6683d98c", + "revisionTime": "2017-07-26T20:21:17Z" }, { "checksumSHA1": "6OEUkwOM0qgI6YxR+BDEn6YMvpU=", From fbfd6a0197ed7fcc11aafd15a1748e9eb6704f34 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 16:13:14 -0400 Subject: [PATCH 0519/3316] Update CHANGELOG for #4148 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8932266797b..0def966bcd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ BUG FIXES: * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] +* resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options [GH-4148] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] * resource/aws_lambda_function: Prevent perpetual difference when removing `dead_letter_config` [GH-2684] * resource/aws_launch_configuration: Properly read `security_groups`, `user_data`, and `vpc_classic_link_security_groups` attributes into Terraform state [GH-2800] From d88bdbadc9d2da6fd56f937677b551bac6ffdde7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 16:16:04 -0400 Subject: [PATCH 0520/3316] resource/aws_lambda_function: Use SDK constant for nodejs8.10 --- aws/resource_aws_lambda_function.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index ddaf1b3e853..f360dd46c0d 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -102,16 +102,16 @@ func resourceAwsLambdaFunction() *schema.Resource { Required: true, ValidateFunc: validation.StringInSlice([]string{ // lambda.RuntimeNodejs has reached end of life since October 2016 so not included here + lambda.RuntimeDotnetcore10, + lambda.RuntimeDotnetcore20, + lambda.RuntimeGo1X, + lambda.RuntimeJava8, lambda.RuntimeNodejs43, + lambda.RuntimeNodejs43Edge, lambda.RuntimeNodejs610, - "nodejs8.10", - lambda.RuntimeJava8, + lambda.RuntimeNodejs810, lambda.RuntimePython27, lambda.RuntimePython36, - lambda.RuntimeDotnetcore10, - lambda.RuntimeDotnetcore20, - lambda.RuntimeNodejs43Edge, - lambda.RuntimeGo1X, }, false), }, "timeout": { From 4458ccc86c2b916bb0fc8aa10807889851217d7a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 16:33:37 -0400 Subject: [PATCH 0521/3316] docs/resource/aws_elasticache_replication_group: Further clarify automatic_failover_enabled attribute from API documentation --- website/docs/r/elasticache_replication_group.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index 1e96f18ec0f..ff14dfdc641 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -92,7 +92,7 @@ The following arguments are supported: * `number_cache_clusters` - (Required) The number of cache clusters this replication group will have. If Multi-AZ is enabled , the value of this parameter must be at least 2. Changing this number will force a new resource * `node_type` - (Required) The compute and memory capacity of the nodes in the node group. -* `automatic_failover_enabled` - (Optional) Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. Defaults to `false`. +* `automatic_failover_enabled` - (Optional) Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ is disabled for this replication group. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to `false`. * `auto_minor_version_upgrade` - (Optional) Specifies whether a minor engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Defaults to `true`. * `availability_zones` - (Optional) A list of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is not important. * `engine` - (Optional) The name of the cache engine to be used for the clusters in this replication group. e.g. `redis` From e7a8ff9620ad98478d258ecb2dd2d20ea5b79030 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 17:31:58 -0400 Subject: [PATCH 0522/3316] resource/aws_elb: Return any errors when updating listeners --- aws/resource_aws_elb.go | 5 ++- aws/resource_aws_elb_test.go | 83 ++++++++++++++++++++++++++---------- 2 files changed, 65 insertions(+), 23 deletions(-) diff --git a/aws/resource_aws_elb.go b/aws/resource_aws_elb.go index caf28742c20..eb26f962633 100644 --- a/aws/resource_aws_elb.go +++ b/aws/resource_aws_elb.go @@ -473,7 +473,10 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error { ns := n.(*schema.Set) remove, _ := expandListeners(os.Difference(ns).List()) - add, _ := expandListeners(ns.Difference(os).List()) + add, err := expandListeners(ns.Difference(os).List()) + if err != nil { + return err + } if len(remove) > 0 { ports := make([]*int64, 0, len(remove)) diff --git a/aws/resource_aws_elb_test.go b/aws/resource_aws_elb_test.go index 7d95c773ba2..386c2461493 100644 --- a/aws/resource_aws_elb_test.go +++ b/aws/resource_aws_elb_test.go @@ -369,9 +369,11 @@ func TestAccAWSELB_tags(t *testing.T) { }) } -func TestAccAWSELB_iam_server_cert(t *testing.T) { +func TestAccAWSELB_Listener_SSLCertificateID_IAMServerCertificate(t *testing.T) { var conf elb.LoadBalancerDescription - // var td elb.TagDescription + rName := fmt.Sprintf("tf-acctest-%s", acctest.RandString(10)) + resourceName := "aws_elb.bar" + testCheck := func(*terraform.State) error { if len(conf.ListenerDescriptions) != 1 { return fmt.Errorf( @@ -380,20 +382,27 @@ func TestAccAWSELB_iam_server_cert(t *testing.T) { } return nil } + resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_elb.bar", - Providers: testAccProvidersWithTLS, - CheckDestroy: testAccCheckAWSELBDestroy, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckAWSELBDestroy, Steps: []resource.TestStep{ { - Config: testAccELBIAMServerCertConfig( - fmt.Sprintf("tf-acctest-%s", acctest.RandString(10))), + Config: testAccELBConfig_Listener_IAMServerCertificate(rName, "tcp"), + ExpectError: regexp.MustCompile(`ssl_certificate_id may be set only when protocol is 'https' or 'ssl'`), + }, + { + Config: testAccELBConfig_Listener_IAMServerCertificate(rName, "https"), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSELBExists("aws_elb.bar", &conf), + testAccCheckAWSELBExists(resourceName, &conf), testCheck, ), }, + { + Config: testAccELBConfig_Listener_IAMServerCertificate_AddInvalidListener(rName), + ExpectError: regexp.MustCompile(`ssl_certificate_id may be set only when protocol is 'https' or 'ssl'`), + }, }, }) } @@ -1624,33 +1633,63 @@ resource "aws_security_group" "bar" { } ` -func testAccELBIAMServerCertConfig(certName string) string { +func testAccELBConfig_Listener_IAMServerCertificate(certName, lbProtocol string) string { return fmt.Sprintf(` -%s +data "aws_availability_zones" "available" {} + +%[1]s resource "aws_iam_server_certificate" "test_cert" { - name = "%s" + name = "%[2]s" certificate_body = "${tls_self_signed_cert.example.cert_pem}" private_key = "${tls_private_key.example.private_key_pem}" } resource "aws_elb" "bar" { - availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"] + availability_zones = ["${data.aws_availability_zones.available.names[0]}"] listener { - instance_port = 8000 - instance_protocol = "https" - lb_port = 80 - // Protocol should be case insensitive - lb_protocol = "HttPs" + instance_port = 443 + instance_protocol = "%[3]s" + lb_port = 443 + lb_protocol = "%[3]s" ssl_certificate_id = "${aws_iam_server_certificate.test_cert.arn}" } +} +`, testAccTLSServerCert, certName, lbProtocol) +} - tags { - bar = "baz" - } +func testAccELBConfig_Listener_IAMServerCertificate_AddInvalidListener(certName string) string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" {} - cross_zone_load_balancing = true +%[1]s + +resource "aws_iam_server_certificate" "test_cert" { + name = "%[2]s" + certificate_body = "${tls_self_signed_cert.example.cert_pem}" + private_key = "${tls_private_key.example.private_key_pem}" +} + +resource "aws_elb" "bar" { + availability_zones = ["${data.aws_availability_zones.available.names[0]}"] + + listener { + instance_port = 443 + instance_protocol = "https" + lb_port = 443 + lb_protocol = "https" + ssl_certificate_id = "${aws_iam_server_certificate.test_cert.arn}" + } + + # lb_protocol tcp and ssl_certificate_id is not valid + listener { + instance_port = 8443 + instance_protocol = "tcp" + lb_port = 8443 + lb_protocol = "tcp" + ssl_certificate_id = "${aws_iam_server_certificate.test_cert.arn}" + } } `, testAccTLSServerCert, certName) } From 67525ab0d3af2d3a0001bf5c2841f8d33769354f Mon Sep 17 00:00:00 2001 From: Michal Bryc Date: Tue, 10 Apr 2018 16:34:20 -0700 Subject: [PATCH 0523/3316] Fix S3 key to reference correct variable name --- .../guides/serverless-with-aws-lambda-and-api-gateway.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md b/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md index ae5304e7746..37d7e7739f6 100644 --- a/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md +++ b/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md @@ -503,7 +503,7 @@ resource "aws_lambda_function" "example" { # The bucket name as created earlier with "aws s3api create-bucket" s3_bucket = "terraform-serverless-example" - s3_key = "v${var.version}/example.zip" + s3_key = "v${var.app_version}/example.zip" # (leave the remainder unchanged) } From 1c3b69ee97add576868edc022588e551e8652d81 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Apr 2018 20:13:23 -0400 Subject: [PATCH 0524/3316] resource/aws_emr_cluster: Prevent crash with missing StateChangeReason --- aws/resource_aws_emr_cluster.go | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index b57e6aea024..c7af0b100a9 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -1374,23 +1374,25 @@ func resourceAwsEMRClusterStateRefreshFunc(d *schema.ResourceData, meta interfac return nil, "", err } - emrc := resp.Cluster - - if emrc == nil { + if resp.Cluster == nil { return 42, "destroyed", nil } - if resp.Cluster.Status != nil { - log.Printf("[DEBUG] EMR Cluster status (%s): %s", d.Id(), *resp.Cluster.Status) + if resp.Cluster.Status == nil { + return resp.Cluster, "", fmt.Errorf("cluster status not provided") } - status := emrc.Status - if *status.State == "TERMINATING" || *status.State == "TERMINATED_WITH_ERRORS" { - reason := *status.StateChangeReason - return emrc, *status.State, fmt.Errorf("%s: %s", - *reason.Code, *reason.Message) + state := aws.StringValue(resp.Cluster.Status.State) + log.Printf("[DEBUG] EMR Cluster status (%s): %s", d.Id(), state) + + if state == emr.ClusterStateTerminating || state == emr.ClusterStateTerminatedWithErrors { + reason := resp.Cluster.Status.StateChangeReason + if reason == nil { + return resp.Cluster, state, fmt.Errorf("%s: reason code and message not provided", state) + } + return resp.Cluster, state, fmt.Errorf("%s: %s", aws.StringValue(reason.Code), aws.StringValue(reason.Message)) } - return emrc, *status.State, nil + return resp.Cluster, state, nil } } From 3829ae2d03b7959625da170f3080e4346b7302d3 Mon Sep 17 00:00:00 2001 From: Stuart Auld Date: Wed, 11 Apr 2018 17:08:43 +1000 Subject: [PATCH 0525/3316] added cloudwatch log group data source (#3247) --- aws/data_source_aws_cloudwatch_log_group.go | 63 +++++++++++++++++++ ...ta_source_aws_cloudwatch_log_group_test.go | 36 +++++++++++ aws/provider.go | 1 + 3 files changed, 100 insertions(+) create mode 100644 aws/data_source_aws_cloudwatch_log_group.go create mode 100644 aws/data_source_aws_cloudwatch_log_group_test.go diff --git a/aws/data_source_aws_cloudwatch_log_group.go b/aws/data_source_aws_cloudwatch_log_group.go new file mode 100644 index 00000000000..57abe8d6904 --- /dev/null +++ b/aws/data_source_aws_cloudwatch_log_group.go @@ -0,0 +1,63 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudwatchlogs" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsCloudwatchLogGroup() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCloudwatchLogGroupRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "creation_time": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func dataSourceAwsCloudwatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { + name := aws.String(d.Get("name").(string)) + conn := meta.(*AWSClient).cloudwatchlogsconn + + input := &cloudwatchlogs.DescribeLogGroupsInput{ + LogGroupNamePrefix: name, + } + + resp, err := conn.DescribeLogGroups(input) + if err != nil { + return err + } + + var logGroup *cloudwatchlogs.LogGroup + + for _, lg := range resp.LogGroups { + if *lg.LogGroupName == *name { + logGroup = lg + break + } + } + + if logGroup == nil { + return fmt.Errorf("No log group named %s found\n", *name) + } + + d.SetId(*logGroup.LogGroupName) + d.Set("arn", logGroup.Arn) + d.Set("creation_time", logGroup.CreationTime) + + return nil +} diff --git a/aws/data_source_aws_cloudwatch_log_group_test.go b/aws/data_source_aws_cloudwatch_log_group_test.go new file mode 100644 index 00000000000..6f0b82cfc44 --- /dev/null +++ b/aws/data_source_aws_cloudwatch_log_group_test.go @@ -0,0 +1,36 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSCloudwatchLogGroupDataSource(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAWSCloudwatchLogGroupDataSourceConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_cloudwatch_log_group.test", "name", "Test"), + resource.TestCheckResourceAttrSet("data.aws_cloudwatch_log_group.test", "arn"), + resource.TestCheckResourceAttrSet("data.aws_cloudwatch_log_group.test", "creation_time"), + ), + }, + }, + }) + return +} + +var testAccCheckAWSCloudwatchLogGroupDataSourceConfig = fmt.Sprintf(` +resource aws_cloudwatch_log_group "test" { + name = "Test" +} + +data aws_cloudwatch_log_group "test" { + name = "${aws_cloudwatch_log_group.test.name}" +} +`) diff --git a/aws/provider.go b/aws/provider.go index 682ed272fdb..b7d1e12639c 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -171,6 +171,7 @@ func Provider() terraform.ResourceProvider { "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), + "aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), "aws_db_instance": dataSourceAwsDbInstance(), "aws_db_snapshot": dataSourceAwsDbSnapshot(), "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), From 4ae6ee9ff38163e2b9a87daf0fe3da8ed68683e7 Mon Sep 17 00:00:00 2001 From: Stephen Coe Date: Wed, 11 Apr 2018 08:39:58 +0100 Subject: [PATCH 0526/3316] missing quotes --- website/docs/r/cloudwatch_event_target.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/cloudwatch_event_target.html.markdown b/website/docs/r/cloudwatch_event_target.html.markdown index 91d48055150..0726c3c4851 100644 --- a/website/docs/r/cloudwatch_event_target.html.markdown +++ b/website/docs/r/cloudwatch_event_target.html.markdown @@ -124,7 +124,7 @@ DOC } resource "aws_cloudwatch_event_rule" "stop_instances" { - name = "StopInstance + name = "StopInstance" description = "Stop instances nightly" schedule_expression = "cron(0 0 * * ? *)" } @@ -148,7 +148,7 @@ resource "aws_cloudwatch_event_target" "stop_instances" { ``` resource "aws_cloudwatch_event_rule" "stop_instances" { - name = "StopInstance + name = "StopInstance" description = "Stop instances nightly" schedule_expression = "cron(0 0 * * ? *)" } From 90edc592d55bb0965e282f08acea1ff6d9932291 Mon Sep 17 00:00:00 2001 From: Stuart Auld Date: Wed, 11 Apr 2018 17:56:05 +1000 Subject: [PATCH 0527/3316] cloudwatch log group documentation --- website/aws.erb | 3 ++ .../docs/d/cloudwatch_log_group.html.markdown | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 website/docs/d/cloudwatch_log_group.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 10ba486f806..b270e1090a9 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -67,6 +67,9 @@ > aws_cloudtrail_service_account + > + aws_cloudwatch_log_group + > aws_db_instance diff --git a/website/docs/d/cloudwatch_log_group.html.markdown b/website/docs/d/cloudwatch_log_group.html.markdown new file mode 100644 index 00000000000..0ac41aa0f36 --- /dev/null +++ b/website/docs/d/cloudwatch_log_group.html.markdown @@ -0,0 +1,32 @@ +--- +layout: "aws" +page_title: "AWS: aws_cloudwatch_log_group" +sidebar_current: "docs-aws-cloudwatch-log-group" +description: |- + Get information on a Cloudwatch Log Group. +--- + +# Data Source: aws_cloudwatch_log_group + +Use this data source to get information about an AWS Cloudwatch Log Group + +## Example Usage + +```hcl +data "aws_cloudwatch_log_group" "example" { + name = "MyImportantLogs" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the Cloudwatch log group + +## Attributes Reference + +The following attributes are exported: + +* `arn` - The ARN of the Cloudwatch log group +* `creation_time` - The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. From 25d17774d9f46c800af52e67c0ee5837062405fd Mon Sep 17 00:00:00 2001 From: Tim Borrowdale Date: Wed, 11 Apr 2018 11:22:05 +0100 Subject: [PATCH 0528/3316] add new data source aws_api_gateway_rest_api --- aws/data_source_aws_api_gateway_rest_api.go | 88 +++++++++++++++++++ ...ta_source_aws_api_gateway_rest_api_test.go | 80 +++++++++++++++++ aws/provider.go | 1 + website/aws.erb | 3 + .../docs/d/api_gateway_rest_api.html.markdown | 32 +++++++ 5 files changed, 204 insertions(+) create mode 100644 aws/data_source_aws_api_gateway_rest_api.go create mode 100644 aws/data_source_aws_api_gateway_rest_api_test.go create mode 100644 website/docs/d/api_gateway_rest_api.html.markdown diff --git a/aws/data_source_aws_api_gateway_rest_api.go b/aws/data_source_aws_api_gateway_rest_api.go new file mode 100644 index 00000000000..9316358880a --- /dev/null +++ b/aws/data_source_aws_api_gateway_rest_api.go @@ -0,0 +1,88 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsApiGatewayRestApi() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsApiGatewayRestApiRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + "root_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + params := &apigateway.GetRestApisInput{} + + target := d.Get("name") + var matchedApis []*apigateway.RestApi + log.Printf("[DEBUG] Reading API Gateway REST APIs: %s", params) + err := conn.GetRestApisPages(params, func(page *apigateway.GetRestApisOutput, lastPage bool) bool { + for _, api := range page.Items { + if *api.Name == target { + matchedApis = append(matchedApis, api) + } + } + return true + }) + if err != nil { + return errwrap.Wrapf("error describing API Gateway REST APIs: {{err}}", err) + } + + if len(matchedApis) == 0 { + return fmt.Errorf("no REST APIs with name %q found in this region", target) + } + if len(matchedApis) > 1 { + return fmt.Errorf("multiple REST APIs with name %q found in this region", target) + } + + match := matchedApis[0] + + d.SetId(*match.Id) + + if err = dataSourceAwsApiGatewayRestApiRefreshResources(d, meta); err != nil { + return err + } + + return nil +} + +func dataSourceAwsApiGatewayRestApiRefreshResources(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + + resp, err := conn.GetResources(&apigateway.GetResourcesInput{ + RestApiId: aws.String(d.Id()), + }) + if err != nil { + return err + } + + for _, item := range resp.Items { + if *item.Path == "/" { + d.Set("root_resource_id", item.Id) + break + } + } + + return nil +} diff --git a/aws/data_source_aws_api_gateway_rest_api_test.go b/aws/data_source_aws_api_gateway_rest_api_test.go new file mode 100644 index 00000000000..7b07aa8ac2c --- /dev/null +++ b/aws/data_source_aws_api_gateway_rest_api_test.go @@ -0,0 +1,80 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccDataSourceAwsApiGatewayRestApi(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDataSourceAwsApiGatewayRestApiConfig, + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsApiGatewayRestApiCheck("data.aws_api_gateway_rest_api.by_name"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsApiGatewayRestApiCheck(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + resources, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("root module has no resource called %s", name) + } + + apiGatewayRestApiResources, ok := s.RootModule().Resources["aws_api_gateway_rest_api.tf_test"] + if !ok { + return fmt.Errorf("can't find aws_api_gateway_rest_api.tf_test in state") + } + + attr := resources.Primary.Attributes + + if attr["name"] != apiGatewayRestApiResources.Primary.Attributes["name"] { + return fmt.Errorf( + "name is %s; want %s", + attr["name"], + apiGatewayRestApiResources.Primary.Attributes["name"], + ) + } + + if attr["root_resource_id"] != apiGatewayRestApiResources.Primary.Attributes["root_resource_id"] { + return fmt.Errorf( + "root_resource_id is %s; want %s", + attr["root_resource_id"], + apiGatewayRestApiResources.Primary.Attributes["root_resource_id"], + ) + } + + return nil + } +} + +const testAccDataSourceAwsApiGatewayRestApiConfig = ` +provider "aws" { + region = "us-west-2" +} + +resource "aws_api_gateway_rest_api" "tf_wrong1" { + name = "wrong1" +} + +resource "aws_api_gateway_rest_api" "tf_test" { + name = "tf_test" +} + +resource "aws_api_gateway_rest_api" "tf_wrong2" { + name = "wrong2" +} + +data "aws_api_gateway_rest_api" "by_name" { + name = "${aws_api_gateway_rest_api.tf_test.name}" +} +` diff --git a/aws/provider.go b/aws/provider.go index 682ed272fdb..2d48e5ee6a2 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -163,6 +163,7 @@ func Provider() terraform.ResourceProvider { "aws_acm_certificate": dataSourceAwsAcmCertificate(), "aws_ami": dataSourceAwsAmi(), "aws_ami_ids": dataSourceAwsAmiIds(), + "aws_api_gateway_rest_api": dataSourceAwsApiGatewayRestApi(), "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), "aws_availability_zone": dataSourceAwsAvailabilityZone(), "aws_availability_zones": dataSourceAwsAvailabilityZones(), diff --git a/website/aws.erb b/website/aws.erb index 10ba486f806..d122c44fa08 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -43,6 +43,9 @@ > aws_ami_ids + > + aws_api_gateway_rest_api + > aws_autoscaling_groups diff --git a/website/docs/d/api_gateway_rest_api.html.markdown b/website/docs/d/api_gateway_rest_api.html.markdown new file mode 100644 index 00000000000..630153aba8c --- /dev/null +++ b/website/docs/d/api_gateway_rest_api.html.markdown @@ -0,0 +1,32 @@ +--- +layout: "aws" +page_title: "AWS: aws_api_gateway_rest_api" +sidebar_current: "docs-aws_api_gateway_rest_api" +description: |- + Get information on a API Gateway REST API +--- + +# Data Source: aws_api_gateway_rest_api + +Use this data source to get the id and root_resource_id of a REST API in +API Gateway. To fetch the REST API you must provide a name to match against. +As there is no unique name constraint on REST APIs this data source will +error if there is more than one match. + +## Example Usage + +```hcl +data "aws_api_gateway_rest_api" "my_rest_api" { + name = "my-rest-api" +} +``` + +## Argument Reference + + * `name` - (Required) The name of the REST API to look up. If no REST API is found with this name, an error will be returned. + If multiple REST APIs are found with this name, an error will be returned. + +## Attributes Reference + + * `id` - Set to the ID of the found REST API. + * `root_resource_id` - Set to the ID of the API Gateway Resource on the found REST API where the route matches '/'. From 749b3fcfe473017518ca7d13b68cc5688745082b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 09:35:52 -0400 Subject: [PATCH 0529/3316] resource/aws_emr_cluster: Return state in TERMINATING/TERMINATED_WITH_ERRORS refresh error message --- aws/resource_aws_emr_cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index c7af0b100a9..0be3f0438b2 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -1390,7 +1390,7 @@ func resourceAwsEMRClusterStateRefreshFunc(d *schema.ResourceData, meta interfac if reason == nil { return resp.Cluster, state, fmt.Errorf("%s: reason code and message not provided", state) } - return resp.Cluster, state, fmt.Errorf("%s: %s", aws.StringValue(reason.Code), aws.StringValue(reason.Message)) + return resp.Cluster, state, fmt.Errorf("%s: %s: %s", state, aws.StringValue(reason.Code), aws.StringValue(reason.Message)) } return resp.Cluster, state, nil From 98b064a014237191155e0de44ab5d1e944935063 Mon Sep 17 00:00:00 2001 From: vkatsikaros Date: Wed, 11 Apr 2018 16:47:47 +0300 Subject: [PATCH 0530/3316] Add contraints link for aws_db_instance attribute The attribute db_subnet_group_name for resource aws_db_instance should not be specified if read replicas are in the same region as the master. This change adds a clarification in the docs. Sample error from Terraform v0.11.5, provider.aws v1.11.0: Error creating DB Instance: DBSubnetGroupNotAllowedFault: DbSubnetGroupName should not be specified for read replicas that are created in the same region as the master Moreover, the attribute has a number of constraints and this change adds a link to the AWS documentation. --- website/docs/r/db_instance.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 96d55357a80..4dce670503a 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -86,7 +86,9 @@ for more information. Default is `false`. * `db_subnet_group_name` - (Optional) Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will -be created in the `default` VPC, or in EC2 Classic, if available. +be created in the `default` VPC, or in EC2 Classic, if available. It needs to be +specified only if the source database specifies an instance in another AWS Region. +See [DBSubnetGroupName in API action CreateDBInstanceReadReplica](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html) for additonal contraints. * `engine` - (Required unless a `snapshot_identifier` or `replicate_source_db` is provided) The database engine to use. * `engine_version` - (Optional) The engine version to use. If `auto_minor_version_upgrade` From 7664eef13385fcf2e0038d3374a97134479c97f9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 12:36:45 -0400 Subject: [PATCH 0531/3316] docs/resource/aws_codebuild_project: Adjust language surrounding when cache location argument is required --- website/docs/r/codebuild_project.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index 3cf362d3b4f..6392a721cd4 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -152,7 +152,7 @@ The following arguments are supported: `cache` supports the following: * `type` - (Optional) The type of storage that will be used for the AWS CodeBuild project cache. Valid values: `NO_CACHE` and `S3`. Defaults to `NO_CACHE`. -* `location` - (Required when cache type is not `NO_CACHE`) The location where the AWS CodeBuild project stores cached resources. For type `S3` the value must be a valid S3 bucket name/prefix. +* `location` - (Required when cache type is `S3`) The location where the AWS CodeBuild project stores cached resources. For type `S3` the value must be a valid S3 bucket name/prefix. `environment` supports the following: From 62c4c611263cc13333cf23f15bd11419570226dd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 12:40:12 -0400 Subject: [PATCH 0532/3316] Update CHANGELOG for #4140 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0def966bcd7..9ee16305692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ BUG FIXES: * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] * resource/aws_rds_cluster: Properly handle `engine_version` during regular creation [GH-4139] * resource/aws_route53_zone: Suppress `name` difference with trailing period [GH-3982] +* resource/aws_vpc_peering_connection: Allow active pending state during deletion for eventual consistency [GH-4140] ## 1.14.0 (April 06, 2018) From edf8babce047381fe5b67865d1107ba6c4aef010 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 12:41:43 -0400 Subject: [PATCH 0533/3316] Update CHANGELOG for #4134 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ee16305692..4cdd11e60ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: +* resource/aws_codebuild_project: Properly handle setting cache type `NO_CACHE` [GH-4134] * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] * resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options [GH-4148] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] From a77e8284654ffa0b7718208aa745a89961acaf3a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 12:45:08 -0400 Subject: [PATCH 0534/3316] resource/aws_iam_user: Add missing return resource.NonRetryableError(err) from DeleteLoginProfile --- aws/resource_aws_iam_user.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_iam_user.go b/aws/resource_aws_iam_user.go index 74bb711f7ca..b7930f1d0e1 100644 --- a/aws/resource_aws_iam_user.go +++ b/aws/resource_aws_iam_user.go @@ -232,6 +232,7 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { return resource.RetryableError(err) } + return resource.NonRetryableError(err) } return nil }) From 664595f003a1d1ee3cd5f3d32077bc5ccbe95e79 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 12:53:59 -0400 Subject: [PATCH 0535/3316] Update CHANGELOG for #4144 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cdd11e60ee..d8e3dc1b2e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ BUG FIXES: * resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] * resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] * resource/aws_rds_cluster: Properly handle `engine_version` during regular creation [GH-4139] +* resource/aws_rds_cluster: Set `port` updates to force new resource [GH-4144] * resource/aws_route53_zone: Suppress `name` difference with trailing period [GH-3982] * resource/aws_vpc_peering_connection: Allow active pending state during deletion for eventual consistency [GH-4140] From fdc94d015de6f70a63c6834716622b258ba87730 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 12:57:43 -0400 Subject: [PATCH 0536/3316] Update CHANGELOG for #4143 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8e3dc1b2e9..432ef67c4dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ BUG FIXES: * resource/aws_codebuild_project: Properly handle setting cache type `NO_CACHE` [GH-4134] * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] +* resource/aws_iam_user: Retry user login profile deletion on `EntityTemporarilyUnmodifiable` [GH-4143] * resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options [GH-4148] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] * resource/aws_lambda_function: Prevent perpetual difference when removing `dead_letter_config` [GH-2684] From a7c27f349f23cb635b5126ebf4d6f91aac514f3d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 13:10:33 -0400 Subject: [PATCH 0537/3316] Update CHANGELOG for #4151 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 432ef67c4dd..372df177240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ BUG FIXES: * resource/aws_codebuild_project: Properly handle setting cache type `NO_CACHE` [GH-4134] +* resource/aws_db_event_subscription: Fix `tag` ARN handling [GH-4151] * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] * resource/aws_iam_user: Retry user login profile deletion on `EntityTemporarilyUnmodifiable` [GH-4143] * resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options [GH-4148] From 8a609d6333f5eb8ab3dfad7b440579bf4c0c714c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 13:12:48 -0400 Subject: [PATCH 0538/3316] Update CHANGELOG for #4159 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 372df177240..1c467513895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ BUG FIXES: * resource/aws_codebuild_project: Properly handle setting cache type `NO_CACHE` [GH-4134] * resource/aws_db_event_subscription: Fix `tag` ARN handling [GH-4151] * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] +* resource/aws_elb: Return any errors when updating listeners [GH-4159] * resource/aws_iam_user: Retry user login profile deletion on `EntityTemporarilyUnmodifiable` [GH-4143] * resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options [GH-4148] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] From 5d2148cc4083304baa0b6690dcb5990ddf95b6b1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 13:14:59 -0400 Subject: [PATCH 0539/3316] Update CHANGELOG for #4165 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c467513895..6c557c13efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ BUG FIXES: * resource/aws_db_event_subscription: Fix `tag` ARN handling [GH-4151] * resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] * resource/aws_elb: Return any errors when updating listeners [GH-4159] +* resource/aws_emr_cluster: Prevent crash with missing StateChangeReason [GH-4165] * resource/aws_iam_user: Retry user login profile deletion on `EntityTemporarilyUnmodifiable` [GH-4143] * resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options [GH-4148] * resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] From 1c7ef8d9a08ce5c33fd34ecfc68cfc3937327df9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 13:16:46 -0400 Subject: [PATCH 0540/3316] Update CHANGELOG for #4151 enhancements --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c557c13efe..3a0bc20cdbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## 1.14.1 (Unreleased) +ENHANCEMENTS: + +* resource/aws_db_event_subscription: Add `arn` attribute [GH-4151] +* resource/aws_db_event_subscription: Support configurable timeouts [GH-4151] + BUG FIXES: * resource/aws_codebuild_project: Properly handle setting cache type `NO_CACHE` [GH-4134] From 6b76cd7527bb204337dc23a3254b345f3cfe4ef8 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 11 Apr 2018 17:49:04 +0000 Subject: [PATCH 0541/3316] v1.14.1 --- CHANGELOG.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a0bc20cdbc..7139fb0f816 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,28 +1,28 @@ -## 1.14.1 (Unreleased) +## 1.14.1 (April 11, 2018) ENHANCEMENTS: -* resource/aws_db_event_subscription: Add `arn` attribute [GH-4151] -* resource/aws_db_event_subscription: Support configurable timeouts [GH-4151] +* resource/aws_db_event_subscription: Add `arn` attribute ([#4151](https://github.com/terraform-providers/terraform-provider-aws/issues/4151)) +* resource/aws_db_event_subscription: Support configurable timeouts ([#4151](https://github.com/terraform-providers/terraform-provider-aws/issues/4151)) BUG FIXES: -* resource/aws_codebuild_project: Properly handle setting cache type `NO_CACHE` [GH-4134] -* resource/aws_db_event_subscription: Fix `tag` ARN handling [GH-4151] -* resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed [GH-3821] -* resource/aws_elb: Return any errors when updating listeners [GH-4159] -* resource/aws_emr_cluster: Prevent crash with missing StateChangeReason [GH-4165] -* resource/aws_iam_user: Retry user login profile deletion on `EntityTemporarilyUnmodifiable` [GH-4143] -* resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options [GH-4148] -* resource/aws_lambda_alias: Force new resource on `name` change [GH-4106] -* resource/aws_lambda_function: Prevent perpetual difference when removing `dead_letter_config` [GH-2684] -* resource/aws_launch_configuration: Properly read `security_groups`, `user_data`, and `vpc_classic_link_security_groups` attributes into Terraform state [GH-2800] -* resource/aws_network_acl: Prevent error on deletion with already deleted subnets [GH-4119] -* resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets [GH-4119] -* resource/aws_rds_cluster: Properly handle `engine_version` during regular creation [GH-4139] -* resource/aws_rds_cluster: Set `port` updates to force new resource [GH-4144] -* resource/aws_route53_zone: Suppress `name` difference with trailing period [GH-3982] -* resource/aws_vpc_peering_connection: Allow active pending state during deletion for eventual consistency [GH-4140] +* resource/aws_codebuild_project: Properly handle setting cache type `NO_CACHE` ([#4134](https://github.com/terraform-providers/terraform-provider-aws/issues/4134)) +* resource/aws_db_event_subscription: Fix `tag` ARN handling ([#4151](https://github.com/terraform-providers/terraform-provider-aws/issues/4151)) +* resource/aws_dynamodb_table_item: Trigger destructive update if range_key has changed ([#3821](https://github.com/terraform-providers/terraform-provider-aws/issues/3821)) +* resource/aws_elb: Return any errors when updating listeners ([#4159](https://github.com/terraform-providers/terraform-provider-aws/issues/4159)) +* resource/aws_emr_cluster: Prevent crash with missing StateChangeReason ([#4165](https://github.com/terraform-providers/terraform-provider-aws/issues/4165)) +* resource/aws_iam_user: Retry user login profile deletion on `EntityTemporarilyUnmodifiable` ([#4143](https://github.com/terraform-providers/terraform-provider-aws/issues/4143)) +* resource/aws_kinesis_firehose_delivery_stream: Prevent crash with missing CloudWatch logging options ([#4148](https://github.com/terraform-providers/terraform-provider-aws/issues/4148)) +* resource/aws_lambda_alias: Force new resource on `name` change ([#4106](https://github.com/terraform-providers/terraform-provider-aws/issues/4106)) +* resource/aws_lambda_function: Prevent perpetual difference when removing `dead_letter_config` ([#2684](https://github.com/terraform-providers/terraform-provider-aws/issues/2684)) +* resource/aws_launch_configuration: Properly read `security_groups`, `user_data`, and `vpc_classic_link_security_groups` attributes into Terraform state ([#2800](https://github.com/terraform-providers/terraform-provider-aws/issues/2800)) +* resource/aws_network_acl: Prevent error on deletion with already deleted subnets ([#4119](https://github.com/terraform-providers/terraform-provider-aws/issues/4119)) +* resource/aws_network_acl: Prevent error on update with removing associations for already deleted subnets ([#4119](https://github.com/terraform-providers/terraform-provider-aws/issues/4119)) +* resource/aws_rds_cluster: Properly handle `engine_version` during regular creation ([#4139](https://github.com/terraform-providers/terraform-provider-aws/issues/4139)) +* resource/aws_rds_cluster: Set `port` updates to force new resource ([#4144](https://github.com/terraform-providers/terraform-provider-aws/issues/4144)) +* resource/aws_route53_zone: Suppress `name` difference with trailing period ([#3982](https://github.com/terraform-providers/terraform-provider-aws/issues/3982)) +* resource/aws_vpc_peering_connection: Allow active pending state during deletion for eventual consistency ([#4140](https://github.com/terraform-providers/terraform-provider-aws/issues/4140)) ## 1.14.0 (April 06, 2018) From f91f80ba9e13d70cd7d957d6fc40a1e791d5f6f9 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 11 Apr 2018 17:55:24 +0000 Subject: [PATCH 0542/3316] Cleanup after v1.14.1 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7139fb0f816..5c16d267054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.15.0 (Unreleased) ## 1.14.1 (April 11, 2018) ENHANCEMENTS: From bbefc3348657dbe71db82ef5e06bd00aa9a4817f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 17:01:18 -0400 Subject: [PATCH 0543/3316] data-source/aws_sqs_queue: Implement #2311 feedback --- aws/data_source_aws_sqs_queue.go | 19 ++++---- aws/data_source_aws_sqs_queue_test.go | 62 ++++++++++++++------------ website/docs/d/sqs_queue.html.markdown | 2 +- 3 files changed, 45 insertions(+), 38 deletions(-) diff --git a/aws/data_source_aws_sqs_queue.go b/aws/data_source_aws_sqs_queue.go index a27f931faa7..40099d6a426 100644 --- a/aws/data_source_aws_sqs_queue.go +++ b/aws/data_source_aws_sqs_queue.go @@ -1,9 +1,10 @@ package aws import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sqs" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -29,26 +30,26 @@ func dataSourceAwsSqsQueue() *schema.Resource { func dataSourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sqsconn - target := d.Get("name").(string) + name := d.Get("name").(string) urlOutput, err := conn.GetQueueUrl(&sqs.GetQueueUrlInput{ - QueueName: aws.String(target), + QueueName: aws.String(name), }) - if err != nil { - return errwrap.Wrapf("Error getting queue URL: {{err}}", err) + if err != nil || urlOutput.QueueUrl == nil { + return fmt.Errorf("Error getting queue URL: %s", err) } - queueURL := *urlOutput.QueueUrl + queueURL := aws.StringValue(urlOutput.QueueUrl) attributesOutput, err := conn.GetQueueAttributes(&sqs.GetQueueAttributesInput{ - QueueUrl: &queueURL, + QueueUrl: aws.String(queueURL), AttributeNames: []*string{aws.String(sqs.QueueAttributeNameQueueArn)}, }) if err != nil { - return errwrap.Wrapf("Error getting queue attributes: {{err}}", err) + return fmt.Errorf("Error getting queue attributes: %s", err) } - d.Set("arn", *attributesOutput.Attributes[sqs.QueueAttributeNameQueueArn]) + d.Set("arn", aws.StringValue(attributesOutput.Attributes[sqs.QueueAttributeNameQueueArn])) d.Set("url", queueURL) d.SetId(queueURL) diff --git a/aws/data_source_aws_sqs_queue_test.go b/aws/data_source_aws_sqs_queue_test.go index 4687407d13b..d06611a744e 100644 --- a/aws/data_source_aws_sqs_queue_test.go +++ b/aws/data_source_aws_sqs_queue_test.go @@ -4,67 +4,73 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAccDataSourceAwsSqsQueue(t *testing.T) { + rName := acctest.RandomWithPrefix("tf_acc_test_") + resourceName := "aws_sqs_queue.test" + datasourceName := "data.aws_sqs_queue.by_name" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccDataSourceAwsSqsQueueConfig, + Config: testAccDataSourceAwsSqsQueueConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccDataSourceAwsSqsQueueCheck("data.aws_sqs_queue.by_name"), + testAccDataSourceAwsSqsQueueCheck(datasourceName, resourceName), ), }, }, }) } -func testAccDataSourceAwsSqsQueueCheck(name string) resource.TestCheckFunc { +func testAccDataSourceAwsSqsQueueCheck(datasourceName, resourceName string) resource.TestCheckFunc { return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[datasourceName] if !ok { - return fmt.Errorf("root module has no resource called %s", name) + return fmt.Errorf("root module has no resource called %s", datasourceName) } - sqsQueueRs, ok := s.RootModule().Resources["aws_sqs_queue.tf_test"] + sqsQueueRs, ok := s.RootModule().Resources[resourceName] if !ok { - return fmt.Errorf("can't find aws_sqs_queue.tf_test in state") + return fmt.Errorf("root module has no resource called %s", resourceName) } - attr := rs.Primary.Attributes + attrNames := []string{ + "arn", + "name", + } - if attr["name"] != sqsQueueRs.Primary.Attributes["name"] { - return fmt.Errorf( - "name is %s; want %s", - attr["name"], - sqsQueueRs.Primary.Attributes["name"], - ) + for _, attrName := range attrNames { + if rs.Primary.Attributes[attrName] != sqsQueueRs.Primary.Attributes[attrName] { + return fmt.Errorf( + "%s is %s; want %s", + attrName, + rs.Primary.Attributes[attrName], + sqsQueueRs.Primary.Attributes[attrName], + ) + } } return nil } } -const testAccDataSourceAwsSqsQueueConfig = ` -provider "aws" { - region = "us-west-2" -} - -resource "aws_sqs_queue" "tf_wrong1" { - name = "wrong1" -} -resource "aws_sqs_queue" "tf_test" { - name = "tf_test" +func testAccDataSourceAwsSqsQueueConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_sqs_queue" "wrong" { + name = "%[1]s_wrong" } -resource "aws_sqs_queue" "tf_wrong2" { - name = "wrong2" +resource "aws_sqs_queue" "test" { + name = "%[1]s" } data "aws_sqs_queue" "by_name" { - name = "${aws_sqs_queue.tf_test.name}" + name = "${aws_sqs_queue.test.name}" +} +`, rName) } -` diff --git a/website/docs/d/sqs_queue.html.markdown b/website/docs/d/sqs_queue.html.markdown index 9023f3ee5ef..161d503da11 100644 --- a/website/docs/d/sqs_queue.html.markdown +++ b/website/docs/d/sqs_queue.html.markdown @@ -6,7 +6,7 @@ description: |- Get information on an Amazon Simple Queue Service (SQS) Queue --- -# aws\_sqs\_queue +# Data Source: aws_sqs_queue Use this data source to get the ARN and URL of queue in AWS Simple Queue Service (SQS). By using this data source, you can reference SQS queues without having to hardcode From 7aec509842b6bfd30898dc77dd035dc65945151e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 17:07:09 -0400 Subject: [PATCH 0544/3316] Update CHANGELOG for #2311 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c16d267054..153f8cf6240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.15.0 (Unreleased) + +FEATURES: + +* **New Data Source:** `aws_sqs_queue` [GH-2311] + ## 1.14.1 (April 11, 2018) ENHANCEMENTS: From 73baf32506f05bf551d16754c1a0e90bef8185a3 Mon Sep 17 00:00:00 2001 From: Stuart Auld Date: Thu, 12 Apr 2018 08:09:22 +1000 Subject: [PATCH 0545/3316] PR feedback --- aws/data_source_aws_cloudwatch_log_group.go | 33 +++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/aws/data_source_aws_cloudwatch_log_group.go b/aws/data_source_aws_cloudwatch_log_group.go index 57abe8d6904..b7285b686e4 100644 --- a/aws/data_source_aws_cloudwatch_log_group.go +++ b/aws/data_source_aws_cloudwatch_log_group.go @@ -15,7 +15,7 @@ func dataSourceAwsCloudwatchLogGroup() *schema.Resource { Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, - Optional: true, + Required: true, }, "arn": { Type: schema.TypeString, @@ -30,32 +30,35 @@ func dataSourceAwsCloudwatchLogGroup() *schema.Resource { } func dataSourceAwsCloudwatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { - name := aws.String(d.Get("name").(string)) + name := d.Get("name").(string) conn := meta.(*AWSClient).cloudwatchlogsconn input := &cloudwatchlogs.DescribeLogGroupsInput{ - LogGroupNamePrefix: name, - } - - resp, err := conn.DescribeLogGroups(input) - if err != nil { - return err + LogGroupNamePrefix: aws.String(name), } var logGroup *cloudwatchlogs.LogGroup + // iterate over the pages of log groups until we find the one we are looking for + err := conn.DescribeLogGroupsPages(input, + func(resp *cloudwatchlogs.DescribeLogGroupsOutput, _ bool) bool { + for _, lg := range resp.LogGroups { + if aws.StringValue(lg.LogGroupName) == name { + logGroup = lg + return false + } + } + return true + }) - for _, lg := range resp.LogGroups { - if *lg.LogGroupName == *name { - logGroup = lg - break - } + if err != nil { + return err } if logGroup == nil { - return fmt.Errorf("No log group named %s found\n", *name) + return fmt.Errorf("No log group named %s found\n", name) } - d.SetId(*logGroup.LogGroupName) + d.SetId(name) d.Set("arn", logGroup.Arn) d.Set("creation_time", logGroup.CreationTime) From 9bba58840d1246713b4b80010c4c81da04f702ac Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 18:15:22 -0400 Subject: [PATCH 0546/3316] resource/aws_iam_service_linked_role: Minor fixes after review --- aws/resource_aws_iam_service_linked_role.go | 18 ++++++++----- ...source_aws_iam_service_linked_role_test.go | 27 ++++++++++++++----- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_iam_service_linked_role.go b/aws/resource_aws_iam_service_linked_role.go index a1b80a0e4dc..2c0292e6247 100644 --- a/aws/resource_aws_iam_service_linked_role.go +++ b/aws/resource_aws_iam_service_linked_role.go @@ -81,11 +81,11 @@ func resourceAwsIamServiceLinkedRoleCreate(d *schema.ResourceData, meta interfac resp, err := conn.CreateServiceLinkedRole(params) if err != nil { - return fmt.Errorf("Error creating service-linked role with name %s", serviceName) + return fmt.Errorf("Error creating service-linked role with name %s: %s", serviceName, err) } d.SetId(*resp.Role.Arn) - return nil + return resourceAwsIamServiceLinkedRoleRead(d, meta) } func resourceAwsIamServiceLinkedRoleRead(d *schema.ResourceData, meta interface{}) error { @@ -136,10 +136,13 @@ func resourceAwsIamServiceLinkedRoleDelete(d *schema.ResourceData, meta interfac resp, err := conn.DeleteServiceLinkedRole(params) if err != nil { - return fmt.Errorf("Error deleting service-linked role %s", d.Id()) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + return fmt.Errorf("Error deleting service-linked role %s: %s", d.Id(), err) } - deletionTaskId := *resp.DeletionTaskId + deletionTaskId := aws.StringValue(resp.DeletionTaskId) stateConf := &resource.StateChangeConf{ Pending: []string{iam.DeletionTaskStatusTypeInProgress, iam.DeletionTaskStatusTypeNotStarted}, @@ -151,11 +154,12 @@ func resourceAwsIamServiceLinkedRoleDelete(d *schema.ResourceData, meta interfac _, err = stateConf.WaitForState() if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } return fmt.Errorf("Error waiting for role (%s) to be deleted: %s", d.Id(), err) } - d.SetId("") - return nil } @@ -170,6 +174,6 @@ func deletionRefreshFunc(conn *iam.IAM, deletionTaskId string) resource.StateRef return nil, "", err } - return resp, *resp.Status, nil + return resp, aws.StringValue(resp.Status), nil } } diff --git a/aws/resource_aws_iam_service_linked_role_test.go b/aws/resource_aws_iam_service_linked_role_test.go index abed20bfb54..5d12f11baca 100644 --- a/aws/resource_aws_iam_service_linked_role_test.go +++ b/aws/resource_aws_iam_service_linked_role_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "strings" "testing" @@ -12,6 +13,11 @@ import ( ) func TestAccAWSIAMServiceLinkedRole_basic(t *testing.T) { + resourceName := "aws_iam_service_linked_role.test" + awsServiceName := "elasticbeanstalk.amazonaws.com" + name := "AWSServiceRoleForElasticBeanstalk" + path := fmt.Sprintf("/aws-service-role/%s/", awsServiceName) + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) @@ -20,12 +26,19 @@ func TestAccAWSIAMServiceLinkedRole_basic(t *testing.T) { CheckDestroy: testAccCheckAWSIAMServiceLinkedRoleDestroy, Steps: []resource.TestStep{ { - ResourceName: "aws_iam_service_linked_role.test", - Config: fmt.Sprintf(testAccAWSIAMServiceLinkedRoleConfig, "elasticbeanstalk.amazonaws.com"), - Check: testAccCheckAWSIAMServiceLinkedRoleExists("aws_iam_service_linked_role.test"), + Config: testAccAWSIAMServiceLinkedRoleConfig(awsServiceName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIAMServiceLinkedRoleExists(resourceName), + resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:iam::[^:]+:role%s%s$", path, name))), + resource.TestCheckResourceAttr(resourceName, "aws_service_name", awsServiceName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "name", name), + resource.TestCheckResourceAttr(resourceName, "path", path), + resource.TestCheckResourceAttrSet(resourceName, "unique_id"), + ), }, { - ResourceName: "aws_iam_service_linked_role.test", + ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, @@ -91,8 +104,10 @@ func testAccCheckAWSIAMServiceLinkedRoleExists(n string) resource.TestCheckFunc } } -const testAccAWSIAMServiceLinkedRoleConfig = ` +func testAccAWSIAMServiceLinkedRoleConfig(awsServiceName string) string { + return fmt.Sprintf(` resource "aws_iam_service_linked_role" "test" { aws_service_name = "%s" } -` +`, awsServiceName) +} From c77020f539eed9d3f1dab36c2d2d5a624ed3007b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Apr 2018 18:18:25 -0400 Subject: [PATCH 0547/3316] Update CHANGELOG for #2985 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 153f8cf6240..1b94010b031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_sqs_queue` [GH-2311] +* **New Resource:** `aws_iam_service_linked_role` [GH-2985] ## 1.14.1 (April 11, 2018) From 47a6de390afdec846215074cf9b9b71164437cf0 Mon Sep 17 00:00:00 2001 From: Michael Russell Date: Thu, 12 Apr 2018 07:35:04 +0200 Subject: [PATCH 0548/3316] Switch the no records and no hosted zones errors around so the next matches the variable name --- aws/resource_aws_route53_record.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index b9f507d47a9..a599d4da1ae 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -20,8 +20,8 @@ import ( "github.com/aws/aws-sdk-go/service/route53" ) -var r53NoRecordsFound = errors.New("No matching Hosted Zone found") -var r53NoHostedZoneFound = errors.New("No matching records found") +var r53NoRecordsFound = errors.New("No matching records found") +var r53NoHostedZoneFound = errors.New("No matching Hosted Zone found") var r53ValidRecordTypes = regexp.MustCompile("^(A|AAAA|CAA|CNAME|MX|NAPTR|NS|PTR|SOA|SPF|SRV|TXT)$") func resourceAwsRoute53Record() *schema.Resource { From e682d46aa55bca7c660e3a85a6c22265a5fa2509 Mon Sep 17 00:00:00 2001 From: Michael Russell Date: Thu, 12 Apr 2018 07:35:55 +0200 Subject: [PATCH 0549/3316] Use findRecord directly instead of resourceAwsRoute53RecordRead when verifying if a record exists after creating/updating since resourceAwsRoute53RecordRead does not return an error if the record does not exist --- aws/resource_aws_route53_record.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index a599d4da1ae..3ddb1c3070b 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -374,7 +374,8 @@ func resourceAwsRoute53RecordUpdate(d *schema.ResourceData, meta interface{}) er return err } - return resourceAwsRoute53RecordRead(d, meta) + _, err = findRecord(d, meta) + return err } func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) error { @@ -451,7 +452,8 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er return err } - return resourceAwsRoute53RecordRead(d, meta) + _, err = findRecord(d, meta) + return err } func changeRoute53RecordSet(conn *route53.Route53, input *route53.ChangeResourceRecordSetsInput) (interface{}, error) { From fe5925ed26cd2ba7bf7fc3a46ba246da01f77328 Mon Sep 17 00:00:00 2001 From: Michael Russell Date: Thu, 12 Apr 2018 07:37:49 +0200 Subject: [PATCH 0550/3316] Set MaxItems to 1 when we know there is only a single record to be found to avoid downloading 100 records for every request Compare the response records with the original record name instead of using the StartRecordName. In events where the record wasn't matching correctly StartRecordName would be updated on the next page and it would then always match the next record (record 101) leading to accidental deletions of the wrong record --- aws/resource_aws_route53_record.go | 36 ++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index 3ddb1c3070b..40648cddcfa 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -632,27 +632,49 @@ func findRecord(d *schema.ResourceData, meta interface{}) (*route53.ResourceReco log.Printf("[DEBUG] Expanded record name: %s", en) d.Set("fqdn", en) + recordName := FQDN(strings.ToLower(en)) + recordType := d.Get("type").(string) + recordSetIdentifier := d.Get("set_identifier") + + // If this isn't a Weighted, Latency, Geo, or Failover resource with + // a SetIdentifier we only need to look at the first record in the response since there can be + // only one + maxItems := "1" + if recordSetIdentifier != "" { + maxItems = "100" + } + lopts := &route53.ListResourceRecordSetsInput{ HostedZoneId: aws.String(cleanZoneID(zone)), - StartRecordName: aws.String(en), - StartRecordType: aws.String(d.Get("type").(string)), + StartRecordName: aws.String(recordName), + StartRecordType: aws.String(recordType), + MaxItems: aws.String(maxItems), } log.Printf("[DEBUG] List resource records sets for zone: %s, opts: %s", zone, lopts) var record *route53.ResourceRecordSet + + // We need to loop over all records starting from the record we are looking for because + // Weighted, Latency, Geo, and Failover resource record sets have a special option + // called SetIdentifier which allows multiple entries with the same name and type but + // a different SetIdentifier + // For all other records we are setting the maxItems to 1 so that we don't return extra + // unneeded records err = conn.ListResourceRecordSetsPages(lopts, func(resp *route53.ListResourceRecordSetsOutput, lastPage bool) bool { for _, recordSet := range resp.ResourceRecordSets { - name := cleanRecordName(*recordSet.Name) - if FQDN(strings.ToLower(name)) != FQDN(strings.ToLower(*lopts.StartRecordName)) { + + responseName := strings.ToLower(cleanRecordName(*recordSet.Name)) + responseType := strings.ToUpper(*recordSet.Type) + + if recordName != responseName { continue } - if strings.ToUpper(*recordSet.Type) != strings.ToUpper(*lopts.StartRecordType) { + if recordType != responseType { continue } - - if recordSet.SetIdentifier != nil && *recordSet.SetIdentifier != d.Get("set_identifier") { + if recordSet.SetIdentifier != nil && *recordSet.SetIdentifier != recordSetIdentifier { continue } From b5fa8ed08131d7643ee48ce73806df08f581487e Mon Sep 17 00:00:00 2001 From: Michael Russell Date: Thu, 12 Apr 2018 08:42:51 +0200 Subject: [PATCH 0551/3316] Support converting all ASCII characters (such as @) back to their original character --- aws/resource_aws_route53_record.go | 16 +++++++++------- aws/resource_aws_route53_record_test.go | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index 40648cddcfa..345e1d777b6 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "regexp" + "strconv" "strings" "time" @@ -907,16 +908,17 @@ func FQDN(name string) string { } } -// Route 53 stores the "*" wildcard indicator as ASCII 42 and returns the -// octal equivalent, "\\052". Here we look for that, and convert back to "*" -// as needed. +// Route 53 stores certain characters with the octal equivalent in ASCII format. +// This function converts all of these characters back into the original character +// E.g. "*" is stored as "\\052" and "@" as "\\100" + func cleanRecordName(name string) string { str := name - if strings.HasPrefix(name, "\\052") { - str = strings.Replace(name, "\\052", "*", 1) - log.Printf("[DEBUG] Replacing octal \\052 for * in: %s", name) + s, err := strconv.Unquote(`"` + str + `"`) + if err != nil { + return str } - return str + return s } // Check if the current record name contains the zone suffix. diff --git a/aws/resource_aws_route53_record_test.go b/aws/resource_aws_route53_record_test.go index 72bb533d25a..550d732cd03 100644 --- a/aws/resource_aws_route53_record_test.go +++ b/aws/resource_aws_route53_record_test.go @@ -22,6 +22,8 @@ func TestCleanRecordName(t *testing.T) { }{ {"www.nonexample.com", "www.nonexample.com"}, {"\\052.nonexample.com", "*.nonexample.com"}, + {"\\100.nonexample.com", "@.nonexample.com"}, + {"\\043.nonexample.com", "#.nonexample.com"}, {"nonexample.com", "nonexample.com"}, } From 54c6734572f467124aa7678396e49cc7ab1f8603 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Fri, 6 Apr 2018 21:58:05 +0200 Subject: [PATCH 0552/3316] resource/api_gateway_integration: handle integration_type update --- aws/resource_aws_api_gateway_integration.go | 24 +++- ...source_aws_api_gateway_integration_test.go | 106 +++++++++++------- 2 files changed, 87 insertions(+), 43 deletions(-) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 84819db6c8c..4aa1e6cef26 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -269,10 +269,12 @@ func resourceAwsApiGatewayIntegrationRead(d *schema.ResourceData, meta interface d.Set("request_parameters", aws.StringValueMap(integration.RequestParameters)) d.Set("request_parameters_in_json", aws.StringValueMap(integration.RequestParameters)) d.Set("passthrough_behavior", integration.PassthroughBehavior) - d.Set("connection_type", integration.ConnectionType) - if integration.ConnectionId != nil { - d.Set("connection_id", integration.ConnectionId) + if integration.ConnectionType != nil { + d.Set("connection_type", integration.ConnectionType) + } else { + d.Set("connection_type", apigateway.ConnectionTypeInternet) } + d.Set("connection_id", integration.ConnectionId) if integration.Uri != nil { d.Set("uri", integration.Uri) @@ -431,6 +433,22 @@ func resourceAwsApiGatewayIntegrationUpdate(d *schema.ResourceData, meta interfa }) } + if d.HasChange("connection_type") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/connectionType"), + Value: aws.String(d.Get("connection_type").(string)), + }) + } + + if d.HasChange("connection_id") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/connectionId"), + Value: aws.String(d.Get("connection_id").(string)), + }) + } + params := &apigateway.UpdateIntegrationInput{ HttpMethod: aws.String(d.Get("http_method").(string)), ResourceId: aws.String(d.Get("resource_id").(string)), diff --git a/aws/resource_aws_api_gateway_integration_test.go b/aws/resource_aws_api_gateway_integration_test.go index f476a8eb10f..3856beea559 100644 --- a/aws/resource_aws_api_gateway_integration_test.go +++ b/aws/resource_aws_api_gateway_integration_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -215,7 +216,7 @@ func TestAccAWSAPIGatewayIntegration_cache_key_parameters(t *testing.T) { }) } -func TestAccAWSAPIGatewayIntegration_vpcLink(t *testing.T) { +func TestAccAWSAPIGatewayIntegration_integrationType(t *testing.T) { var conf apigateway.Integration rName := fmt.Sprintf("tf-acctest-apigw-int-%s", acctest.RandString(7)) @@ -226,15 +227,29 @@ func TestAccAWSAPIGatewayIntegration_vpcLink(t *testing.T) { CheckDestroy: testAccCheckAWSAPIGatewayIntegrationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSAPIGatewayIntegrationConfigVpcLink(rName), + Config: testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeInternet(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayIntegrationExists("aws_api_gateway_integration.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "connection_type", "INTERNET"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "connection_id", ""), + ), + }, + { + Config: testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeVpcLink(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAPIGatewayIntegrationExists("aws_api_gateway_integration.test", &conf), - resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "type", "HTTP"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "connection_type", "VPC_LINK"), - resource.TestCheckResourceAttrSet("aws_api_gateway_integration.test", "connection_id"), + resource.TestMatchResourceAttr("aws_api_gateway_integration.test", "connection_id", regexp.MustCompile("^[0-9a-z]+$")), ), }, - }, + { + Config: testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeInternet(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayIntegrationExists("aws_api_gateway_integration.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "connection_type", "INTERNET"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "connection_id", ""), + ), + }}, }) } @@ -612,12 +627,28 @@ resource "aws_api_gateway_integration" "test" { } ` -func testAccAWSAPIGatewayIntegrationConfigVpcLink(rName string) string { +func testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeBase(rName string) string { return fmt.Sprintf(` variable "name" { default = "%s" } +data "aws_availability_zones" "test" {} + +resource "aws_vpc" "test" { + cidr_block = "10.10.0.0/16" + + tags { + Name = "${var.name}" + } +} + +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.10.0.0/24" + availability_zone = "${data.aws_availability_zones.test.names[0]}" +} + resource "aws_api_gateway_rest_api" "test" { name = "${var.name}" } @@ -639,21 +670,27 @@ resource "aws_api_gateway_method" "test" { } } +resource "aws_lb" "test" { + name = "${var.name}" + internal = true + load_balancer_type = "network" + subnets = ["${aws_subnet.test.id}"] +} + +resource "aws_api_gateway_vpc_link" "test" { + name = "${var.name}" + target_arns = ["${aws_lb.test.arn}"] +} +`, rName) +} + +func testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeVpcLink(rName string) string { + return testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeBase(rName) + fmt.Sprintf(` resource "aws_api_gateway_integration" "test" { rest_api_id = "${aws_api_gateway_rest_api.test.id}" resource_id = "${aws_api_gateway_resource.test.id}" http_method = "${aws_api_gateway_method.test.http_method}" - request_templates = { - "application/json" = "" - "application/xml" = "#set($inputRoot = $input.path('$'))\n{ }" - } - - request_parameters = { - "integration.request.header.X-Authorization" = "'static'" - "integration.request.header.X-Foo" = "'Bar'" - } - type = "HTTP" uri = "https://www.google.de" integration_http_method = "GET" @@ -663,32 +700,21 @@ resource "aws_api_gateway_integration" "test" { connection_type = "VPC_LINK" connection_id = "${aws_api_gateway_vpc_link.test.id}" } - -resource "aws_lb" "test" { - name = "${var.name}" - internal = true - load_balancer_type = "network" - subnets = ["${aws_subnet.test.id}"] +`) } -resource "aws_vpc" "test" { - cidr_block = "10.10.0.0/16" - tags { - Name = "${var.name}" - } -} - -data "aws_availability_zones" "test" {} - -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.test.id}" - cidr_block = "10.10.0.0/24" - availability_zone = "${data.aws_availability_zones.test.names[0]}" -} +func testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeInternet(rName string) string { + return testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeBase(rName) + fmt.Sprintf(` +resource "aws_api_gateway_integration" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + resource_id = "${aws_api_gateway_resource.test.id}" + http_method = "${aws_api_gateway_method.test.http_method}" -resource "aws_api_gateway_vpc_link" "test" { - name = "${var.name}" - target_arns = ["${aws_lb.test.arn}"] + type = "HTTP" + uri = "https://www.google.de" + integration_http_method = "GET" + passthrough_behavior = "WHEN_NO_MATCH" + content_handling = "CONVERT_TO_TEXT" } -`, rName) +`) } From 9d5bd75d204b09f7edb092f152da19e66ebd1078 Mon Sep 17 00:00:00 2001 From: Tim Borrowdale Date: Thu, 12 Apr 2018 12:11:04 +0100 Subject: [PATCH 0553/3316] refactor d/aws_api_gateway_rest_api and it's test after code review --- aws/data_source_aws_api_gateway_rest_api.go | 21 +++--------------- ...ta_source_aws_api_gateway_rest_api_test.go | 22 +++++++++---------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/aws/data_source_aws_api_gateway_rest_api.go b/aws/data_source_aws_api_gateway_rest_api.go index 9316358880a..cc71d87d2c6 100644 --- a/aws/data_source_aws_api_gateway_rest_api.go +++ b/aws/data_source_aws_api_gateway_rest_api.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -18,10 +17,6 @@ func dataSourceAwsApiGatewayRestApi() *schema.Resource { Type: schema.TypeString, Required: true, }, - "id": { - Type: schema.TypeString, - Computed: true, - }, "root_resource_id": { Type: schema.TypeString, Computed: true, @@ -39,14 +34,14 @@ func dataSourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{} log.Printf("[DEBUG] Reading API Gateway REST APIs: %s", params) err := conn.GetRestApisPages(params, func(page *apigateway.GetRestApisOutput, lastPage bool) bool { for _, api := range page.Items { - if *api.Name == target { + if aws.StringValue(api.Name) == target { matchedApis = append(matchedApis, api) } } - return true + return !lastPage }) if err != nil { - return errwrap.Wrapf("error describing API Gateway REST APIs: {{err}}", err) + return fmt.Errorf("error describing API Gateway REST APIs: %s", err) } if len(matchedApis) == 0 { @@ -60,16 +55,6 @@ func dataSourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{} d.SetId(*match.Id) - if err = dataSourceAwsApiGatewayRestApiRefreshResources(d, meta); err != nil { - return err - } - - return nil -} - -func dataSourceAwsApiGatewayRestApiRefreshResources(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).apigateway - resp, err := conn.GetResources(&apigateway.GetResourcesInput{ RestApiId: aws.String(d.Id()), }) diff --git a/aws/data_source_aws_api_gateway_rest_api_test.go b/aws/data_source_aws_api_gateway_rest_api_test.go index 7b07aa8ac2c..9a09610373d 100644 --- a/aws/data_source_aws_api_gateway_rest_api_test.go +++ b/aws/data_source_aws_api_gateway_rest_api_test.go @@ -4,17 +4,19 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAccDataSourceAwsApiGatewayRestApi(t *testing.T) { + rName := acctest.RandString(8) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccDataSourceAwsApiGatewayRestApiConfig, + Config: testAccDataSourceAwsApiGatewayRestApiConfig(rName), Check: resource.ComposeTestCheckFunc( testAccDataSourceAwsApiGatewayRestApiCheck("data.aws_api_gateway_rest_api.by_name"), ), @@ -57,24 +59,22 @@ func testAccDataSourceAwsApiGatewayRestApiCheck(name string) resource.TestCheckF } } -const testAccDataSourceAwsApiGatewayRestApiConfig = ` -provider "aws" { - region = "us-west-2" -} - +func testAccDataSourceAwsApiGatewayRestApiConfig(r string) string { + return fmt.Sprintf(` resource "aws_api_gateway_rest_api" "tf_wrong1" { - name = "wrong1" +name = "%s_wrong1" } resource "aws_api_gateway_rest_api" "tf_test" { - name = "tf_test" +name = "%s_correct" } resource "aws_api_gateway_rest_api" "tf_wrong2" { - name = "wrong2" +name = "%s_wrong1" } data "aws_api_gateway_rest_api" "by_name" { - name = "${aws_api_gateway_rest_api.tf_test.name}" +name = "${aws_api_gateway_rest_api.tf_test.name}" +} +`, r) } -` From 9dcff38f20b4b144c6854dfa10a3046ad002e90c Mon Sep 17 00:00:00 2001 From: Tim Borrowdale Date: Thu, 12 Apr 2018 12:21:53 +0100 Subject: [PATCH 0554/3316] add missing Sprintf arguments to d/aws_api_gateway_rest_api test --- aws/data_source_aws_api_gateway_rest_api_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/data_source_aws_api_gateway_rest_api_test.go b/aws/data_source_aws_api_gateway_rest_api_test.go index 9a09610373d..0ca45af601c 100644 --- a/aws/data_source_aws_api_gateway_rest_api_test.go +++ b/aws/data_source_aws_api_gateway_rest_api_test.go @@ -76,5 +76,5 @@ name = "%s_wrong1" data "aws_api_gateway_rest_api" "by_name" { name = "${aws_api_gateway_rest_api.tf_test.name}" } -`, r) +`, r, r, r) } From e8b793d179a3058b6d7b85f8753a45b2c6d5f1ca Mon Sep 17 00:00:00 2001 From: Matt Dainty Date: Thu, 12 Apr 2018 14:32:03 +0100 Subject: [PATCH 0555/3316] Support password data on spot requests --- aws/resource_aws_spot_instance_request.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index 1184c53a57b..dade165e4fc 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -309,6 +309,17 @@ func readInstance(d *schema.ResourceData, meta interface{}) error { if err := d.Set("ipv6_addresses", ipv6Addresses); err != nil { log.Printf("[WARN] Error setting ipv6_addresses for AWS Spot Instance (%s): %s", d.Id(), err) } + + if d.Get("get_password_data").(bool) { + passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) + if err != nil { + return err + } + d.Set("password_data", passwordData) + } else { + d.Set("get_password_data", false) + d.Set("password_data", nil) + } } return nil From f96d42d08dc6913fb04bd7d3573c0555d7f6f1b7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 10:34:17 -0400 Subject: [PATCH 0556/3316] resource/aws_iam_service_linked_role: Support custom_suffix and description arguments --- aws/resource_aws_iam_service_linked_role.go | 117 +++++++-- ...source_aws_iam_service_linked_role_test.go | 230 +++++++++++++++++- .../r/iam_service_linked_role.html.markdown | 10 +- 3 files changed, 328 insertions(+), 29 deletions(-) diff --git a/aws/resource_aws_iam_service_linked_role.go b/aws/resource_aws_iam_service_linked_role.go index 2c0292e6247..9744dab0c98 100644 --- a/aws/resource_aws_iam_service_linked_role.go +++ b/aws/resource_aws_iam_service_linked_role.go @@ -7,6 +7,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -16,6 +17,7 @@ func resourceAwsIamServiceLinkedRole() *schema.Resource { return &schema.Resource{ Create: resourceAwsIamServiceLinkedRoleCreate, Read: resourceAwsIamServiceLinkedRoleRead, + Update: resourceAwsIamServiceLinkedRoleUpdate, Delete: resourceAwsIamServiceLinkedRoleDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, @@ -61,9 +63,15 @@ func resourceAwsIamServiceLinkedRole() *schema.Resource { Computed: true, }, + "custom_suffix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "description": { Type: schema.TypeString, - Computed: true, + Optional: true, }, }, } @@ -78,6 +86,14 @@ func resourceAwsIamServiceLinkedRoleCreate(d *schema.ResourceData, meta interfac AWSServiceName: aws.String(serviceName), } + if v, ok := d.GetOk("custom_suffix"); ok && v.(string) != "" { + params.CustomSuffix = aws.String(v.(string)) + } + + if v, ok := d.GetOk("description"); ok && v.(string) != "" { + params.Description = aws.String(v.(string)) + } + resp, err := conn.CreateServiceLinkedRole(params) if err != nil { @@ -91,9 +107,10 @@ func resourceAwsIamServiceLinkedRoleCreate(d *schema.ResourceData, meta interfac func resourceAwsIamServiceLinkedRoleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).iamconn - arnSplit := strings.Split(d.Id(), "/") - roleName := arnSplit[len(arnSplit)-1] - serviceName := arnSplit[len(arnSplit)-2] + serviceName, roleName, customSuffix, err := decodeIamServiceLinkedRoleID(d.Id()) + if err != nil { + return err + } params := &iam.GetRoleInput{ RoleName: aws.String(roleName), @@ -112,23 +129,87 @@ func resourceAwsIamServiceLinkedRoleRead(d *schema.ResourceData, meta interface{ role := resp.Role - d.Set("name", role.RoleName) - d.Set("path", role.Path) d.Set("arn", role.Arn) + d.Set("aws_service_name", serviceName) d.Set("create_date", role.CreateDate) - d.Set("unique_id", role.RoleId) + d.Set("custom_suffix", customSuffix) d.Set("description", role.Description) - d.Set("aws_service_name", serviceName) + d.Set("name", role.RoleName) + d.Set("path", role.Path) + d.Set("unique_id", role.RoleId) return nil } +func resourceAwsIamServiceLinkedRoleUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + _, roleName, _, err := decodeIamServiceLinkedRoleID(d.Id()) + if err != nil { + return err + } + + params := &iam.UpdateRoleInput{ + Description: aws.String(d.Get("description").(string)), + RoleName: aws.String(roleName), + } + + _, err = conn.UpdateRole(params) + + if err != nil { + return fmt.Errorf("Error updating service-linked role %s: %s", d.Id(), err) + } + + return resourceAwsIamServiceLinkedRoleRead(d, meta) +} + func resourceAwsIamServiceLinkedRoleDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).iamconn - arnSplit := strings.Split(d.Id(), "/") - roleName := arnSplit[len(arnSplit)-1] + _, roleName, _, err := decodeIamServiceLinkedRoleID(d.Id()) + if err != nil { + return err + } + + deletionID, err := deleteIamServiceLinkedRole(conn, roleName) + if err != nil { + return fmt.Errorf("Error deleting service-linked role %s: %s", d.Id(), err) + } + if deletionID == "" { + return nil + } + + err = deleteIamServiceLinkedRoleWaiter(conn, deletionID) + if err != nil { + return fmt.Errorf("Error waiting for role (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func decodeIamServiceLinkedRoleID(id string) (serviceName, roleName, customSuffix string, err error) { + idArn, err := arn.Parse(id) + if err != nil { + return "", "", "", err + } + + resourceParts := strings.Split(idArn.Resource, "/") + if len(resourceParts) != 4 { + return "", "", "", fmt.Errorf("expected IAM Service Role ARN (arn:PARTITION:iam::ACCOUNTID:role/aws-service-role/SERVICENAME/ROLENAME), received: %s", id) + } + + serviceName = resourceParts[2] + roleName = resourceParts[3] + + roleNameParts := strings.Split(roleName, "_") + if len(roleNameParts) == 2 { + customSuffix = roleNameParts[1] + } + + return +} +func deleteIamServiceLinkedRole(conn *iam.IAM, roleName string) (string, error) { params := &iam.DeleteServiceLinkedRoleInput{ RoleName: aws.String(roleName), } @@ -137,33 +218,35 @@ func resourceAwsIamServiceLinkedRoleDelete(d *schema.ResourceData, meta interfac if err != nil { if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil + return "", nil } - return fmt.Errorf("Error deleting service-linked role %s: %s", d.Id(), err) + return "", err } - deletionTaskId := aws.StringValue(resp.DeletionTaskId) + return aws.StringValue(resp.DeletionTaskId), nil +} +func deleteIamServiceLinkedRoleWaiter(conn *iam.IAM, deletionTaskID string) error { stateConf := &resource.StateChangeConf{ Pending: []string{iam.DeletionTaskStatusTypeInProgress, iam.DeletionTaskStatusTypeNotStarted}, Target: []string{iam.DeletionTaskStatusTypeSucceeded}, - Refresh: deletionRefreshFunc(conn, deletionTaskId), + Refresh: deleteIamServiceLinkedRoleRefreshFunc(conn, deletionTaskID), Timeout: 5 * time.Minute, Delay: 10 * time.Second, } - _, err = stateConf.WaitForState() + _, err := stateConf.WaitForState() if err != nil { if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { return nil } - return fmt.Errorf("Error waiting for role (%s) to be deleted: %s", d.Id(), err) + return err } return nil } -func deletionRefreshFunc(conn *iam.IAM, deletionTaskId string) resource.StateRefreshFunc { +func deleteIamServiceLinkedRoleRefreshFunc(conn *iam.IAM, deletionTaskId string) resource.StateRefreshFunc { return func() (interface{}, string, error) { params := &iam.GetServiceLinkedRoleDeletionStatusInput{ DeletionTaskId: aws.String(deletionTaskId), diff --git a/aws/resource_aws_iam_service_linked_role_test.go b/aws/resource_aws_iam_service_linked_role_test.go index 5d12f11baca..f9c7019c15d 100644 --- a/aws/resource_aws_iam_service_linked_role_test.go +++ b/aws/resource_aws_iam_service_linked_role_test.go @@ -2,16 +2,125 @@ package aws import ( "fmt" + "log" "regexp" - "strings" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_iam_service_linked_role", &resource.Sweeper{ + Name: "aws_iam_service_linked_role", + F: testSweepIamServiceLinkedRoles, + }) +} + +func testSweepIamServiceLinkedRoles(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).iamconn + + input := &iam.ListRolesInput{ + PathPrefix: aws.String("/aws-service-role/"), + } + customSuffixRegex := regexp.MustCompile(`_tf-acc-test-\d+$`) + err = conn.ListRolesPages(input, func(page *iam.ListRolesOutput, lastPage bool) bool { + if len(page.Roles) == 0 { + log.Printf("[INFO] No IAM Service Roles to sweep") + return true + } + for _, role := range page.Roles { + roleName := aws.StringValue(role.RoleName) + + if !customSuffixRegex.MatchString(roleName) { + log.Printf("[INFO] Skipping IAM Service Role: %s", roleName) + continue + } + + log.Printf("[INFO] Deleting IAM Service Role: %s", roleName) + deletionTaskID, err := deleteIamServiceLinkedRole(conn, roleName) + if err != nil { + log.Printf("[ERROR] Failed to delete IAM Service Role %s: %s", roleName, err) + continue + } + if deletionTaskID == "" { + continue + } + + log.Printf("[INFO] Waiting for deletion of IAM Service Role: %s", roleName) + err = deleteIamServiceLinkedRoleWaiter(conn, deletionTaskID) + if err != nil { + log.Printf("[ERROR] Failed to wait for deletion of IAM Service Role %s: %s", roleName, err) + } + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("Error retrieving IAM Service Roles: %s", err) + } + + return nil +} + +func TestDecodeIamServiceLinkedRoleID(t *testing.T) { + var testCases = []struct { + Input string + ServiceName string + RoleName string + CustomSuffix string + ErrCount int + }{ + { + Input: "not-arn", + ErrCount: 1, + }, + { + Input: "arn:aws:iam::123456789012:role/not-service-linked-role", + ErrCount: 1, + }, + { + Input: "arn:aws:iam::123456789012:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling", + ServiceName: "autoscaling.amazonaws.com", + RoleName: "AWSServiceRoleForAutoScaling", + CustomSuffix: "", + ErrCount: 0, + }, + { + Input: "arn:aws:iam::123456789012:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling_custom-suffix", + ServiceName: "autoscaling.amazonaws.com", + RoleName: "AWSServiceRoleForAutoScaling_custom-suffix", + CustomSuffix: "custom-suffix", + ErrCount: 0, + }, + } + + for _, tc := range testCases { + serviceName, roleName, customSuffix, err := decodeIamServiceLinkedRoleID(tc.Input) + if tc.ErrCount == 0 && err != nil { + t.Fatalf("expected %q not to trigger an error, received: %s", tc.Input, err) + } + if tc.ErrCount > 0 && err == nil { + t.Fatalf("expected %q to trigger an error", tc.Input) + } + if serviceName != tc.ServiceName { + t.Fatalf("expected service name %q to be %q", serviceName, tc.ServiceName) + } + if roleName != tc.RoleName { + t.Fatalf("expected role name %q to be %q", roleName, tc.RoleName) + } + if customSuffix != tc.CustomSuffix { + t.Fatalf("expected custom suffix %q to be %q", customSuffix, tc.CustomSuffix) + } + } +} + func TestAccAWSIAMServiceLinkedRole_basic(t *testing.T) { resourceName := "aws_iam_service_linked_role.test" awsServiceName := "elasticbeanstalk.amazonaws.com" @@ -26,6 +135,22 @@ func TestAccAWSIAMServiceLinkedRole_basic(t *testing.T) { CheckDestroy: testAccCheckAWSIAMServiceLinkedRoleDestroy, Steps: []resource.TestStep{ { + PreConfig: func() { + // Remove existing if possible + conn := testAccProvider.Meta().(*AWSClient).iamconn + deletionID, err := deleteIamServiceLinkedRole(conn, name) + if err != nil { + t.Fatalf("Error deleting service-linked role %s: %s", name, err) + } + if deletionID == "" { + return + } + + err = deleteIamServiceLinkedRoleWaiter(conn, deletionID) + if err != nil { + t.Fatalf("Error waiting for role (%s) to be deleted: %s", name, err) + } + }, Config: testAccAWSIAMServiceLinkedRoleConfig(awsServiceName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSIAMServiceLinkedRoleExists(resourceName), @@ -46,6 +171,72 @@ func TestAccAWSIAMServiceLinkedRole_basic(t *testing.T) { }) } +func TestAccAWSIAMServiceLinkedRole_CustomSuffix(t *testing.T) { + resourceName := "aws_iam_service_linked_role.test" + awsServiceName := "autoscaling.amazonaws.com" + customSuffix := acctest.RandomWithPrefix("tf-acc-test") + name := fmt.Sprintf("AWSServiceRoleForAutoScaling_%s", customSuffix) + path := fmt.Sprintf("/aws-service-role/%s/", awsServiceName) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIAMServiceLinkedRoleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIAMServiceLinkedRoleConfig_CustomSuffix(awsServiceName, customSuffix), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIAMServiceLinkedRoleExists(resourceName), + resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:iam::[^:]+:role%s%s$", path, name))), + resource.TestCheckResourceAttr(resourceName, "name", name), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSIAMServiceLinkedRole_Description(t *testing.T) { + resourceName := "aws_iam_service_linked_role.test" + awsServiceName := "autoscaling.amazonaws.com" + customSuffix := acctest.RandomWithPrefix("tf-acc-test") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIAMServiceLinkedRoleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSIAMServiceLinkedRoleConfig_Description(awsServiceName, customSuffix, "description1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIAMServiceLinkedRoleExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "description1"), + ), + }, + { + Config: testAccAWSIAMServiceLinkedRoleConfig_Description(awsServiceName, customSuffix, "description2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSIAMServiceLinkedRoleExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAWSIAMServiceLinkedRoleDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).iamconn @@ -54,14 +245,16 @@ func testAccCheckAWSIAMServiceLinkedRoleDestroy(s *terraform.State) error { continue } - arnSplit := strings.Split(rs.Primary.ID, "/") - roleName := arnSplit[len(arnSplit)-1] + _, roleName, _, err := decodeIamServiceLinkedRoleID(rs.Primary.ID) + if err != nil { + return err + } params := &iam.GetRoleInput{ RoleName: aws.String(roleName), } - _, err := conn.GetRole(params) + _, err = conn.GetRole(params) if err == nil { return fmt.Errorf("Service-Linked Role still exists: %q", rs.Primary.ID) @@ -84,14 +277,16 @@ func testAccCheckAWSIAMServiceLinkedRoleExists(n string) resource.TestCheckFunc } conn := testAccProvider.Meta().(*AWSClient).iamconn - arnSplit := strings.Split(rs.Primary.ID, "/") - roleName := arnSplit[len(arnSplit)-1] + _, roleName, _, err := decodeIamServiceLinkedRoleID(rs.Primary.ID) + if err != nil { + return err + } params := &iam.GetRoleInput{ RoleName: aws.String(roleName), } - _, err := conn.GetRole(params) + _, err = conn.GetRole(params) if err != nil { if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { @@ -107,7 +302,26 @@ func testAccCheckAWSIAMServiceLinkedRoleExists(n string) resource.TestCheckFunc func testAccAWSIAMServiceLinkedRoleConfig(awsServiceName string) string { return fmt.Sprintf(` resource "aws_iam_service_linked_role" "test" { - aws_service_name = "%s" + aws_service_name = "%s" } `, awsServiceName) } + +func testAccAWSIAMServiceLinkedRoleConfig_CustomSuffix(awsServiceName, customSuffix string) string { + return fmt.Sprintf(` +resource "aws_iam_service_linked_role" "test" { + aws_service_name = "%s" + custom_suffix = "%s" +} +`, awsServiceName, customSuffix) +} + +func testAccAWSIAMServiceLinkedRoleConfig_Description(awsServiceName, customSuffix, description string) string { + return fmt.Sprintf(` +resource "aws_iam_service_linked_role" "test" { + aws_service_name = "%s" + custom_suffix = "%s" + description = "%s" +} +`, awsServiceName, customSuffix, description) +} diff --git a/website/docs/r/iam_service_linked_role.html.markdown b/website/docs/r/iam_service_linked_role.html.markdown index f30a672901e..7011f23d5b3 100644 --- a/website/docs/r/iam_service_linked_role.html.markdown +++ b/website/docs/r/iam_service_linked_role.html.markdown @@ -23,17 +23,19 @@ resource "aws_iam_service_linked_role" "elasticbeanstalk" { The following arguments are supported: * `aws_service_name` - (Required, Forces new resource) The AWS service to which this role is attached. You use a string similar to a URL but without the `http://` in front. For example: `elasticbeanstalk.amazonaws.com`. To find the full list of services that support service-linked roles, check [the docs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html). +* `custom_suffix` - (Optional, forces new resource) Additional string appended to the role name. +* `description` - (Optional) The description of the role. ## Attributes Reference -The following attributes are exported: +The following additional attributes are exported: -* `name` - The name of the role. -* `path` - The path of the role. +* `id` - The Amazon Resource Name (ARN) of the role. * `arn` - The Amazon Resource Name (ARN) specifying the role. * `create_date` - The creation date of the IAM role. +* `name` - The name of the role. +* `path` - The path of the role. * `unique_id` - The stable and unique string identifying the role. -* `description` - The description of the role. ## Import From 827602cbc175090ba2914733295bb0ccf2ab0b56 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 10:37:39 -0400 Subject: [PATCH 0557/3316] docs/resource/aws_iam_service_linked_role: Add custom_suffix note that not all AWS services support it --- website/docs/r/iam_service_linked_role.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/iam_service_linked_role.html.markdown b/website/docs/r/iam_service_linked_role.html.markdown index 7011f23d5b3..986cf97931a 100644 --- a/website/docs/r/iam_service_linked_role.html.markdown +++ b/website/docs/r/iam_service_linked_role.html.markdown @@ -23,7 +23,7 @@ resource "aws_iam_service_linked_role" "elasticbeanstalk" { The following arguments are supported: * `aws_service_name` - (Required, Forces new resource) The AWS service to which this role is attached. You use a string similar to a URL but without the `http://` in front. For example: `elasticbeanstalk.amazonaws.com`. To find the full list of services that support service-linked roles, check [the docs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html). -* `custom_suffix` - (Optional, forces new resource) Additional string appended to the role name. +* `custom_suffix` - (Optional, forces new resource) Additional string appended to the role name. Not all AWS services support custom suffixes. * `description` - (Optional) The description of the role. ## Attributes Reference From 56e10a909c49bcc1bb1de07d328d3ea7c61fc92e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 11:22:45 -0400 Subject: [PATCH 0558/3316] Update CHANGELOG for #3428 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b94010b031..42e5ace7226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ FEATURES: * **New Data Source:** `aws_sqs_queue` [GH-2311] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] +ENHANCEMENTS: + +* resource/aws_api_gateway_integration: Support VPC connection [GH-3428] + ## 1.14.1 (April 11, 2018) ENHANCEMENTS: From 3aa137294a8ef74873be7e22b9f35a6b1d8b6eb6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 11:33:22 -0400 Subject: [PATCH 0559/3316] Update CHANGELOG for #4172 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42e5ace7226..159669bde7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ FEATURES: +* **New Data Source:** `aws_api_gateway_rest_api` [GH-4172] * **New Data Source:** `aws_sqs_queue` [GH-2311] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] From dc980ced9a8caf02964fc41d2d06060f3c9a9920 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 11:40:14 -0400 Subject: [PATCH 0560/3316] tests/data-source/aws_cloudwatch_log_group: Randomize naming --- aws/data_source_aws_cloudwatch_log_group_test.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/aws/data_source_aws_cloudwatch_log_group_test.go b/aws/data_source_aws_cloudwatch_log_group_test.go index 6f0b82cfc44..05b624f3529 100644 --- a/aws/data_source_aws_cloudwatch_log_group_test.go +++ b/aws/data_source_aws_cloudwatch_log_group_test.go @@ -4,18 +4,21 @@ import ( "fmt" "testing" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccAWSCloudwatchLogGroupDataSource(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccCheckAWSCloudwatchLogGroupDataSourceConfig, + Config: testAccCheckAWSCloudwatchLogGroupDataSourceConfig(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_cloudwatch_log_group.test", "name", "Test"), + resource.TestCheckResourceAttr("data.aws_cloudwatch_log_group.test", "name", rName), resource.TestCheckResourceAttrSet("data.aws_cloudwatch_log_group.test", "arn"), resource.TestCheckResourceAttrSet("data.aws_cloudwatch_log_group.test", "creation_time"), ), @@ -25,12 +28,14 @@ func TestAccAWSCloudwatchLogGroupDataSource(t *testing.T) { return } -var testAccCheckAWSCloudwatchLogGroupDataSourceConfig = fmt.Sprintf(` +func testAccCheckAWSCloudwatchLogGroupDataSourceConfig(rName string) string { + return fmt.Sprintf(` resource aws_cloudwatch_log_group "test" { - name = "Test" + name = "%s" } data aws_cloudwatch_log_group "test" { name = "${aws_cloudwatch_log_group.test.name}" } -`) +`, rName) +} From abc9dbfbadbebb5f5d6f4ceeda0d07e4255a43c7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 11:42:20 -0400 Subject: [PATCH 0561/3316] Update CHANGELOG for #4167 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 159669bde7b..2e527808fbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_api_gateway_rest_api` [GH-4172] +* **New Data Source:** `aws_cloudwatch_log_group` [GH-4167] * **New Data Source:** `aws_sqs_queue` [GH-2311] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] From 5e0bb19e888c0077e4d75481afd03bd5ed79dae8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 12:08:20 -0400 Subject: [PATCH 0562/3316] Update CHANGELOG for #4183 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e527808fbe..54ab5a2aef0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ ENHANCEMENTS: * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] +BUG FIXES: + +* resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] + ## 1.14.1 (April 11, 2018) ENHANCEMENTS: From e5e8324231e4fdba43fc6efea5a4ad3eca2972c3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 12:12:24 -0400 Subject: [PATCH 0563/3316] Update CHANGELOG for #4136 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ab5a2aef0..b73bcdbb93a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] +* resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] ## 1.14.1 (April 11, 2018) From 3cbbe2c9d9f4c3d3b60cb6b9e34389dcc9d60dd9 Mon Sep 17 00:00:00 2001 From: Matt Dainty Date: Thu, 12 Apr 2018 17:23:38 +0100 Subject: [PATCH 0564/3316] Test password data on spot requests --- ...resource_aws_spot_instance_request_test.go | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/aws/resource_aws_spot_instance_request_test.go b/aws/resource_aws_spot_instance_request_test.go index 5a5a0cbe1da..5d096abb627 100644 --- a/aws/resource_aws_spot_instance_request_test.go +++ b/aws/resource_aws_spot_instance_request_test.go @@ -170,6 +170,27 @@ func TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes(t *testing.T) { }) } +func TestAccAWSSpotInstanceRequest_getPasswordData(t *testing.T) { + var sir ec2.SpotInstanceRequest + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotInstanceRequestConfig_getPasswordData(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSpotInstanceRequestExists( + "aws_spot_instance_request.foo", &sir), + resource.TestCheckResourceAttrSet("aws_spot_instance_request.foo", "password_data"), + ), + }, + }, + }) +} + func testCheckKeyPair(keyName string, sir *ec2.SpotInstanceRequest) resource.TestCheckFunc { return func(*terraform.State) error { if sir.LaunchSpecification.KeyName == nil { @@ -535,3 +556,36 @@ func testAccAWSSpotInstanceRequestConfig_SubnetAndSGAndPublicIpAddress(rInt int) } }`, rInt, rInt) } + +func testAccAWSSpotInstanceRequestConfig_getPasswordData(rInt int) string { + return fmt.Sprintf(` + # Find latest Microsoft Windows Server 2016 Core image (Amazon deletes old ones) + data "aws_ami" "win2016core" { + most_recent = true + + filter { + name = "owner-alias" + values = ["amazon"] + } + + filter { + name = "name" + values = ["Windows_Server-2016-English-Core-Base-*"] + } + } + + resource "aws_key_pair" "foo" { + key_name = "tf-acctest-%d" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAq6U3HQYC4g8WzU147gZZ7CKQH8TgYn3chZGRPxaGmHW1RUwsyEs0nmombmIhwxudhJ4ehjqXsDLoQpd6+c7BuLgTMvbv8LgE9LX53vnljFe1dsObsr/fYLvpU9LTlo8HgHAqO5ibNdrAUvV31ronzCZhms/Gyfdaue88Fd0/YnsZVGeOZPayRkdOHSpqme2CBrpa8myBeL1CWl0LkDG4+YCURjbaelfyZlIApLYKy3FcCan9XQFKaL32MJZwCgzfOvWIMtYcU8QtXMgnA3/I3gXk8YDUJv5P4lj0s/PJXuTM8DygVAUtebNwPuinS7wwonm5FXcWMuVGsVpG5K7FGQ== tf-acc-winpasswordtest" + } + + resource "aws_spot_instance_request" "foo" { + ami = "${data.aws_ami.win2016core.id}" + instance_type = "m1.small" + spot_price = "0.05" + key_name = "${aws_key_pair.foo.key_name}" + wait_for_fulfillment = true + get_password_data = true + } + `, rInt) +} From ddbbcc2f862fa583f83b8394bfb40a49fd2abfa2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 12:33:36 -0400 Subject: [PATCH 0565/3316] Update CHANGELOG for #4133 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b73bcdbb93a..75a8bd65006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] * resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] From 2b1dcc63126eb4a6f0a99bf70d08d3fe4ae4b3e0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 13:54:57 -0400 Subject: [PATCH 0566/3316] resource/aws_kinesis_firehose_delivery_stream: Remove extraneous variable ``` /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1414:6: lastError declared but not used ``` --- aws/resource_aws_kinesis_firehose_delivery_stream.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index c32bdba849a..957104fa230 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -1411,12 +1411,10 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta } } - var lastError error err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.CreateDeliveryStream(createInput) if err != nil { log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) - lastError = err // Retry for IAM eventual consistency if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to perform") { From 4d27c6d3f1ebe3910cd34fb10fad08f76ac078cd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 14:07:35 -0400 Subject: [PATCH 0567/3316] resource/aws_codedeploy_deployment_config: Force new resource for minimum_healthy_hosts updates --- ...source_aws_codedeploy_deployment_config.go | 2 + ...e_aws_codedeploy_deployment_config_test.go | 57 +++++++++++++++---- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_codedeploy_deployment_config.go b/aws/resource_aws_codedeploy_deployment_config.go index 886e4f25ad0..0c5e1fce79c 100644 --- a/aws/resource_aws_codedeploy_deployment_config.go +++ b/aws/resource_aws_codedeploy_deployment_config.go @@ -34,6 +34,7 @@ func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ codedeploy.MinimumHealthyHostsTypeHostCount, codedeploy.MinimumHealthyHostsTypeFleetPercent, @@ -42,6 +43,7 @@ func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { "value": { Type: schema.TypeInt, Optional: true, + ForceNew: true, }, }, }, diff --git a/aws/resource_aws_codedeploy_deployment_config_test.go b/aws/resource_aws_codedeploy_deployment_config_test.go index 83a3dfa8013..11a40e98af0 100644 --- a/aws/resource_aws_codedeploy_deployment_config_test.go +++ b/aws/resource_aws_codedeploy_deployment_config_test.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "testing" @@ -13,7 +14,7 @@ import ( ) func TestAccAWSCodeDeployDeploymentConfig_fleetPercent(t *testing.T) { - var config codedeploy.DeploymentConfigInfo + var config1, config2 codedeploy.DeploymentConfigInfo rName := acctest.RandString(5) @@ -23,21 +24,32 @@ func TestAccAWSCodeDeployDeploymentConfig_fleetPercent(t *testing.T) { CheckDestroy: testAccCheckAWSCodeDeployDeploymentConfigDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeDeployDeploymentConfigFleet(rName), + Config: testAccAWSCodeDeployDeploymentConfigFleet(rName, 75), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodeDeployDeploymentConfigExists("aws_codedeploy_deployment_config.foo", &config), + testAccCheckAWSCodeDeployDeploymentConfigExists("aws_codedeploy_deployment_config.foo", &config1), resource.TestCheckResourceAttr( "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.type", "FLEET_PERCENT"), resource.TestCheckResourceAttr( "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.value", "75"), ), }, + { + Config: testAccAWSCodeDeployDeploymentConfigFleet(rName, 50), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeDeployDeploymentConfigExists("aws_codedeploy_deployment_config.foo", &config2), + testAccCheckAWSCodeDeployDeploymentConfigRecreated(&config1, &config2), + resource.TestCheckResourceAttr( + "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.type", "FLEET_PERCENT"), + resource.TestCheckResourceAttr( + "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.value", "50"), + ), + }, }, }) } func TestAccAWSCodeDeployDeploymentConfig_hostCount(t *testing.T) { - var config codedeploy.DeploymentConfigInfo + var config1, config2 codedeploy.DeploymentConfigInfo rName := acctest.RandString(5) @@ -47,15 +59,26 @@ func TestAccAWSCodeDeployDeploymentConfig_hostCount(t *testing.T) { CheckDestroy: testAccCheckAWSCodeDeployDeploymentConfigDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeDeployDeploymentConfigHostCount(rName), + Config: testAccAWSCodeDeployDeploymentConfigHostCount(rName, 1), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSCodeDeployDeploymentConfigExists("aws_codedeploy_deployment_config.foo", &config), + testAccCheckAWSCodeDeployDeploymentConfigExists("aws_codedeploy_deployment_config.foo", &config1), resource.TestCheckResourceAttr( "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.type", "HOST_COUNT"), resource.TestCheckResourceAttr( "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.value", "1"), ), }, + { + Config: testAccAWSCodeDeployDeploymentConfigHostCount(rName, 2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeDeployDeploymentConfigExists("aws_codedeploy_deployment_config.foo", &config2), + testAccCheckAWSCodeDeployDeploymentConfigRecreated(&config1, &config2), + resource.TestCheckResourceAttr( + "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.type", "HOST_COUNT"), + resource.TestCheckResourceAttr( + "aws_codedeploy_deployment_config.foo", "minimum_healthy_hosts.0.value", "2"), + ), + }, }, }) } @@ -111,24 +134,34 @@ func testAccCheckAWSCodeDeployDeploymentConfigExists(name string, config *codede } } -func testAccAWSCodeDeployDeploymentConfigFleet(rName string) string { +func testAccCheckAWSCodeDeployDeploymentConfigRecreated(i, j *codedeploy.DeploymentConfigInfo) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.TimeValue(i.CreateTime) == aws.TimeValue(j.CreateTime) { + return errors.New("CodeDeploy Deployment Config was not recreated") + } + + return nil + } +} + +func testAccAWSCodeDeployDeploymentConfigFleet(rName string, value int) string { return fmt.Sprintf(` resource "aws_codedeploy_deployment_config" "foo" { deployment_config_name = "test-deployment-config-%s" minimum_healthy_hosts { type = "FLEET_PERCENT" - value = 75 + value = %d } -}`, rName) +}`, rName, value) } -func testAccAWSCodeDeployDeploymentConfigHostCount(rName string) string { +func testAccAWSCodeDeployDeploymentConfigHostCount(rName string, value int) string { return fmt.Sprintf(` resource "aws_codedeploy_deployment_config" "foo" { deployment_config_name = "test-deployment-config-%s" minimum_healthy_hosts { type = "HOST_COUNT" - value = 1 + value = %d } -}`, rName) +}`, rName, value) } From d51a3ce07240ef233be20ad3def564f6817d455a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 14:14:55 -0400 Subject: [PATCH 0568/3316] Update CHANGELOG for #4189 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75a8bd65006..939627fa7c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ FEATURES: ENHANCEMENTS: * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] +* resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] BUG FIXES: From 5fd034798c85fa9927b54db8f6f33a6b6da3cc88 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 15:00:16 -0400 Subject: [PATCH 0569/3316] resource/aws_db_option_group: Finish option version implementation --- aws/resource_aws_db_option_group.go | 4 +- aws/resource_aws_db_option_group_test.go | 77 +++++++------------- website/docs/r/db_option_group.html.markdown | 2 +- 3 files changed, 29 insertions(+), 54 deletions(-) diff --git a/aws/resource_aws_db_option_group.go b/aws/resource_aws_db_option_group.go index b5f74e2f671..821b3b407c2 100644 --- a/aws/resource_aws_db_option_group.go +++ b/aws/resource_aws_db_option_group.go @@ -362,8 +362,8 @@ func resourceAwsDbOptionHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", sgRaw.(string))) } - if _, ok := m["version"]; ok { - buf.WriteString(fmt.Sprintf("%s-", m["version"].(string))) + if v, ok := m["version"]; ok && v.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) } return hashcode.String(buf.String()) diff --git a/aws/resource_aws_db_option_group_test.go b/aws/resource_aws_db_option_group_test.go index 877c11937d1..7031d9bdecf 100644 --- a/aws/resource_aws_db_option_group_test.go +++ b/aws/resource_aws_db_option_group_test.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" "regexp" @@ -272,28 +273,26 @@ func TestAccAWSDBOptionGroup_OracleOptionsUpdate(t *testing.T) { CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSDBOptionGroupOracleEEOptionSettings(rName), + Config: testAccAWSDBOptionGroupOracleEEOptionSettings(rName, "12.1.0.4.v1"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBOptionGroupExists("aws_db_option_group.bar", &v), resource.TestCheckResourceAttr( "aws_db_option_group.bar", "name", rName), resource.TestCheckResourceAttr( "aws_db_option_group.bar", "option.#", "1"), - resource.TestCheckResourceAttr( - "aws_db_option_group.bar", "option.0.version", "12.1.0.4.v1"), + testAccCheckAWSDBOptionGroupOptionVersionAttribute(&v, "12.1.0.4.v1"), ), }, { - Config: testAccAWSDBOptionGroupOracleEEOptionSettings_update(rName), + Config: testAccAWSDBOptionGroupOracleEEOptionSettings(rName, "12.1.0.5.v1"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBOptionGroupExists("aws_db_option_group.bar", &v), resource.TestCheckResourceAttr( "aws_db_option_group.bar", "name", rName), resource.TestCheckResourceAttr( "aws_db_option_group.bar", "option.#", "1"), - resource.TestCheckResourceAttr( - "aws_db_option_group.bar", "option.0.version", "12.1.0.5.v1"), + testAccCheckAWSDBOptionGroupOptionVersionAttribute(&v, "12.1.0.5.v1"), ), }, }, @@ -342,6 +341,22 @@ func testAccCheckAWSDBOptionGroupAttributes(v *rds.OptionGroup) resource.TestChe } } +func testAccCheckAWSDBOptionGroupOptionVersionAttribute(optionGroup *rds.OptionGroup, optionVersion string) resource.TestCheckFunc { + return func(s *terraform.State) error { + if optionGroup == nil { + return errors.New("Option Group does not exist") + } + if len(optionGroup.Options) == 0 { + return errors.New("Option Group does not have any options") + } + foundOptionVersion := aws.StringValue(optionGroup.Options[0].OptionVersion) + if foundOptionVersion != optionVersion { + return fmt.Errorf("Expected option version %q and received %q", optionVersion, foundOptionVersion) + } + return nil + } +} + func testAccCheckAWSDBOptionGroupExists(n string, v *rds.OptionGroup) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -531,15 +546,14 @@ resource "aws_db_option_group" "bar" { `, r) } -func testAccAWSDBOptionGroupOracleEEOptionSettings(r string) string { +func testAccAWSDBOptionGroupOracleEEOptionSettings(r, optionVersion string) string { return fmt.Sprintf(` resource "aws_security_group" "foo" { - name = "terraform-test-issue_748" - description = "SG for test of issue 748" + name = "%[1]s" } resource "aws_db_option_group" "bar" { - name = "%s" + name = "%[1]s" option_group_description = "Test option group for terraform issue 748" engine_name = "oracle-ee" major_engine_version = "12.1" @@ -547,7 +561,7 @@ resource "aws_db_option_group" "bar" { option { option_name = "OEM_AGENT" port = "3872" - version = "12.1.0.4.v1" + version = "%[2]s" vpc_security_group_memberships = ["${aws_security_group.foo.id}"] @@ -567,46 +581,7 @@ resource "aws_db_option_group" "bar" { } } } -`, r) -} - -func testAccAWSDBOptionGroupOracleEEOptionSettings_update(r string) string { - return fmt.Sprintf(` -resource "aws_security_group" "foo" { - name = "terraform-test-issue_748" - description = "SG for test of issue 748" -} - -resource "aws_db_option_group" "bar" { - name = "%s" - option_group_description = "Test option group for terraform issue 748" - engine_name = "oracle-ee" - major_engine_version = "12.1" - - option { - option_name = "OEM_AGENT" - port = "3872" - version = "12.1.0.5.v1" - - vpc_security_group_memberships = ["${aws_security_group.foo.id}"] - - option_settings { - name = "OMS_PORT" - value = "4903" - } - - option_settings { - name = "OMS_HOST" - value = "oem.host.value" - } - - option_settings { - name = "AGENT_REGISTRATION_PASSWORD" - value = "password" - } - } -} -`, r) +`, r, optionVersion) } func testAccAWSDBOptionGroupMultipleOptions(r string) string { diff --git a/website/docs/r/db_option_group.html.markdown b/website/docs/r/db_option_group.html.markdown index 0c858aa4f23..20dc9e54b23 100644 --- a/website/docs/r/db_option_group.html.markdown +++ b/website/docs/r/db_option_group.html.markdown @@ -51,7 +51,7 @@ Option blocks support the following: * `option_name` - (Required) The Name of the Option (e.g. MEMCACHED). * `option_settings` - (Optional) A list of option settings to apply. * `port` - (Optional) The Port number when connecting to the Option (e.g. 11211). -* `version` - (Optional) The OptionVersion string when connecting to the Option (e.g. 13.1.0.0). +* `version` - (Optional) The version of the option (e.g. 13.1.0.0). * `db_security_group_memberships` - (Optional) A list of DB Security Groups for which the option is enabled. * `vpc_security_group_memberships` - (Optional) A list of VPC Security Groups for which the option is enabled. From 9edd15fb5fb3108cdc3d264da311ef4348d3f6c4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 15:02:34 -0400 Subject: [PATCH 0570/3316] Update CHANGELOG for #2590 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 939627fa7c1..84c79fd0cb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ FEATURES: ENHANCEMENTS: * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] +* resource/aws_db_option_group: Support option version argument [GH-2590] * resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] BUG FIXES: From ad91628d520d99ceff8d774fa7b451a497397379 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 15:09:32 -0400 Subject: [PATCH 0571/3316] Update CHANGELOG for #3906 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c79fd0cb6..4deeb6224d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ENHANCEMENTS: * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] * resource/aws_db_option_group: Support option version argument [GH-2590] +* resource/aws_ecs_service: Support ServiceRegistries [GH-3906] * resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] BUG FIXES: From 5a35f4e695693f0806a3532e6f61afda08f34501 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 15:13:49 -0400 Subject: [PATCH 0572/3316] Update CHANGELOG for #4093 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4deeb6224d7..9ac94c60494 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] +* resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] * resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] From fc9e9081b95eb09b6e3cb89f5fbb206495a0fd2b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 15:17:26 -0400 Subject: [PATCH 0573/3316] Update CHANGELOG for #3940 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ac94c60494..59c6b2a53c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ENHANCEMENTS: * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] * resource/aws_db_option_group: Support option version argument [GH-2590] * resource/aws_ecs_service: Support ServiceRegistries [GH-3906] +* resource/aws_spot_fleet_request: Support configurable delete timeout [GH-3940] * resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] BUG FIXES: From 14170e3d6ce68f76df7ecb978b904acd0160bd34 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 15:20:25 -0400 Subject: [PATCH 0574/3316] Update CHANGELOG for #4069 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59c6b2a53c0..333474fbaf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ ENHANCEMENTS: * resource/aws_ecs_service: Support ServiceRegistries [GH-3906] * resource/aws_spot_fleet_request: Support configurable delete timeout [GH-3940] * resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] +* resource/aws_waf_rate_based_rule: Support `RegexMatch` predicate type [GH-4069] +* resource/aws_waf_rule: Support `RegexMatch` predicate type [GH-4069] +* resource/aws_wafregional_rate_based_rule: Support `RegexMatch` predicate type [GH-4069] BUG FIXES: From 444c9fc6bc0edb2fc8a5ee8f1110392932e2cd3c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Apr 2018 16:09:25 -0400 Subject: [PATCH 0575/3316] docs/resource/aws_spot_instance_request: Adjust spelling of instance_interruption_behaviour attribute to match existing resource schema --- website/docs/r/spot_instance_request.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/spot_instance_request.html.markdown b/website/docs/r/spot_instance_request.html.markdown index 1b18e4d439e..f9ec4dd569b 100644 --- a/website/docs/r/spot_instance_request.html.markdown +++ b/website/docs/r/spot_instance_request.html.markdown @@ -60,7 +60,7 @@ Spot Instance Requests support all the same arguments as * `block_duration_minutes` - (Optional) The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. Note that you can't specify an Availability Zone group or a launch group if you specify a duration. -* `instance_interruption_behavior` - (Optional) Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour. +* `instance_interruption_behaviour` - (Optional) Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate` as this is the current AWS behaviour. ### Timeouts From c1fd7c90dba97396c8cc95b4918003114bfed89c Mon Sep 17 00:00:00 2001 From: slava pocheptsov Date: Thu, 12 Apr 2018 19:15:09 -0400 Subject: [PATCH 0576/3316] fix example documentation for aws_db_snapshot db reference and default db_instance MySQL database name --- website/docs/d/db_snapshot.html.markdown | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/docs/d/db_snapshot.html.markdown b/website/docs/d/db_snapshot.html.markdown index 6ad43a083e9..a912d3df29b 100644 --- a/website/docs/d/db_snapshot.html.markdown +++ b/website/docs/d/db_snapshot.html.markdown @@ -28,14 +28,14 @@ resource "aws_db_instance" "prod" { } data "aws_db_snapshot" "latest_prod_snapshot" { - db_instance_identifier = "${aws_db_instance.prod.identifier}" + db_instance_identifier = "${aws_db_instance.prod.id}" most_recent = true } # Use the latest production snapshot to create a dev instance. resource "aws_db_instance" "dev" { instance_class = "db.t2.micro" - name = "mydb-dev" + name = "mydbdev" snapshot_identifier = "${data.aws_db_snapshot.latest_prod_snapshot.id}" lifecycle { ignore_changes = ["snapshot_identifier"] @@ -54,15 +54,15 @@ recent Snapshot. * `db_snapshot_identifier` - (Optional) Returns information on a specific snapshot_id. -* `snapshot_type` - (Optional) The type of snapshots to be returned. If you don't specify a SnapshotType -value, then both automated and manual snapshots are returned. Shared and public DB snapshots are not +* `snapshot_type` - (Optional) The type of snapshots to be returned. If you don't specify a SnapshotType +value, then both automated and manual snapshots are returned. Shared and public DB snapshots are not included in the returned results by default. Possible values are, `automated`, `manual`, `shared` and `public`. -* `include_shared` - (Optional) Set this value to true to include shared manual DB snapshots from other -AWS accounts that this AWS account has been given permission to copy or restore, otherwise set this value to false. +* `include_shared` - (Optional) Set this value to true to include shared manual DB snapshots from other +AWS accounts that this AWS account has been given permission to copy or restore, otherwise set this value to false. The default is `false`. -* `include_public` - (Optional) Set this value to true to include manual DB snapshots that are public and can be +* `include_public` - (Optional) Set this value to true to include manual DB snapshots that are public and can be copied or restored by any AWS account, otherwise set this value to false. The default is `false`. From 2a5202527e94e33eb2500d071d41dbc46da1a469 Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Thu, 12 Apr 2018 20:10:05 -0400 Subject: [PATCH 0577/3316] correct name for budgets budget tests PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178949969) --- aws/resource_aws_budgets_budget_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 46073907797..54724a7dc97 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSBudget_basic(t *testing.T) { +func TestAccAWSBudgetsBudget_basic(t *testing.T) { name := fmt.Sprintf("test-budget-%d", acctest.RandInt()) configBasicDefaults := newBudgetTestConfigDefaults(name) configBasicDefaults.AccountID = "012345678910" @@ -66,7 +66,7 @@ func TestAccAWSBudget_basic(t *testing.T) { }) } -func TestAccAWSBudget_prefix(t *testing.T) { +func TestAccAWSBudgetsBudget_prefix(t *testing.T) { name := "test-budget-" configBasicDefaults := newBudgetTestConfigDefaults(name) configBasicUpdate := newBudgetTestConfigUpdate(name) From f156959765b0cc244e0811f4cdb5bfab20e02041 Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Thu, 12 Apr 2018 20:14:53 -0400 Subject: [PATCH 0578/3316] reorder test cases for budgets PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178956591) --- aws/resource_aws_budgets_budget_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 54724a7dc97..87467e937a2 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -32,6 +32,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { { Config: testBudgetHCLBasicUseDefaults(configBasicDefaults), Check: resource.ComposeTestCheckFunc( + testBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(configBasicDefaults.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicDefaults.BudgetType), @@ -40,7 +41,6 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicDefaults.TimePeriodStart), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicDefaults.TimePeriodEnd), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicDefaults.TimeUnit), - testBudgetExists(configBasicDefaults, testAccProvider), ), }, { @@ -51,6 +51,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { { Config: testBudgetHCLBasic(configBasicUpdate), Check: resource.ComposeTestCheckFunc( + testBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(configBasicUpdate.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicUpdate.BudgetType), @@ -59,7 +60,6 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicUpdate.TimePeriodStart), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicUpdate.TimePeriodEnd), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicUpdate.TimeUnit), - testBudgetExists(configBasicUpdate, testAccProvider), ), }, }, @@ -81,6 +81,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { { Config: testBudgetHCLPrefixUseDefaults(configBasicDefaults), Check: resource.ComposeTestCheckFunc( + testBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(configBasicDefaults.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicDefaults.BudgetType), @@ -89,13 +90,13 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicDefaults.TimePeriodStart), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicDefaults.TimePeriodEnd), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicDefaults.TimeUnit), - testBudgetExists(configBasicDefaults, testAccProvider), ), }, { Config: testBudgetHCLPrefix(configBasicUpdate), Check: resource.ComposeTestCheckFunc( + testBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(configBasicUpdate.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicUpdate.BudgetType), @@ -104,7 +105,6 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicUpdate.TimePeriodStart), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicUpdate.TimePeriodEnd), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicUpdate.TimeUnit), - testBudgetExists(configBasicUpdate, testAccProvider), ), }, }, From 0c4009e1dae21e6c90a8efc2243eb45ad603000a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 09:37:40 -0400 Subject: [PATCH 0579/3316] Update CHANGELOG for #4188 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 333474fbaf8..b3578d501c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ENHANCEMENTS: * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] * resource/aws_db_option_group: Support option version argument [GH-2590] * resource/aws_ecs_service: Support ServiceRegistries [GH-3906] +* resource/aws_iam_service_linked_role: Support `custom_suffix` and `description` arguments [GH-4188] * resource/aws_spot_fleet_request: Support configurable delete timeout [GH-3940] * resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] * resource/aws_waf_rate_based_rule: Support `RegexMatch` predicate type [GH-4069] From b23ed541503bd73942adfa6c02703d2d88e0b76d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 09:40:56 -0400 Subject: [PATCH 0580/3316] Update CHANGELOG for #4194 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3578d501c9..6f096fc2777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] +* resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates [GH-4194] * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] * resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] From 053aaf3527ed2b1b1616ea99b4d1cf01c49e44b0 Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 13 Apr 2018 10:04:21 -0400 Subject: [PATCH 0581/3316] modifications after review --- aws/resource_aws_launch_template.go | 459 ++++++++++++++--------- aws/resource_aws_launch_template_test.go | 31 +- 2 files changed, 292 insertions(+), 198 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 2f8c9338fd0..7c26dc87159 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -10,10 +10,9 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) -const awsSpotInstanceTimeLayout = "2006-01-02T15:04:05Z" - func resourceAwsLaunchTemplate() *schema.Resource { return &schema.Resource{ Create: resourceAwsLaunchTemplateCreate, @@ -42,21 +41,9 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "description": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) > 255 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 255 characters", k)) - } - return - }, - }, - - "client_token": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 255), }, "default_version": { @@ -70,7 +57,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "block_device_mappings": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -87,7 +74,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { Optional: true, }, "ebs": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -128,7 +115,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "credit_specification": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -152,20 +139,20 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "elastic_gpu_specifications": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { Type: schema.TypeString, - Optional: true, + Required: true, }, }, }, }, "iam_instance_profile": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -190,20 +177,25 @@ func resourceAwsLaunchTemplate() *schema.Resource { "instance_initiated_shutdown_behavior": { Type: schema.TypeString, Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.ShutdownBehaviorStop, + ec2.ShutdownBehaviorTerminate, + }, false), }, "instance_market_options": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "market_type": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ec2.MarketTypeSpot}, false), }, "spot_options": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -225,8 +217,9 @@ func resourceAwsLaunchTemplate() *schema.Resource { Optional: true, }, "valid_until": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRFC3339TimeString, }, }, }, @@ -251,12 +244,21 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "monitoring": { - Type: schema.TypeBool, + Type: schema.TypeList, Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Optional: true, + }, + }, + }, }, "network_interfaces": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -277,34 +279,31 @@ func resourceAwsLaunchTemplate() *schema.Resource { Optional: true, }, "security_groups": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, }, "ipv6_address_count": { Type: schema.TypeInt, Computed: true, }, "ipv6_addresses": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, }, "network_interface_id": { Type: schema.TypeString, - Computed: true, + Optional: true, }, "private_ip_address": { Type: schema.TypeString, Optional: true, }, "ipv4_addresses": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, }, "ipv4_address_count": { Type: schema.TypeInt, @@ -319,7 +318,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "placement": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ @@ -347,6 +346,11 @@ func resourceAwsLaunchTemplate() *schema.Resource { "tenancy": { Type: schema.TypeString, Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.TenancyDedicated, + ec2.TenancyDefault, + ec2.TenancyHost, + }, false), }, }, }, @@ -358,21 +362,19 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "security_group_names": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, }, "vpc_security_group_ids": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, }, "tag_specifications": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -439,9 +441,15 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err LaunchTemplateIds: []*string{aws.String(d.Id())}, }) if err != nil { + if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } return fmt.Errorf("Error getting launch template: %s", err) } if len(dlt.LaunchTemplates) == 0 { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) d.SetId("") return nil } @@ -548,6 +556,9 @@ func resourceAwsLaunchTemplateDelete(d *schema.ResourceData, meta interface{}) e LaunchTemplateId: aws.String(d.Id()), }) if err != nil { + if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { + return nil + } return err } @@ -559,27 +570,27 @@ func getBlockDeviceMappings(m []*ec2.LaunchTemplateBlockDeviceMapping) []interfa s := []interface{}{} for _, v := range m { mapping := map[string]interface{}{ - "device_name": *v.DeviceName, - "virtual_name": *v.VirtualName, + "device_name": aws.StringValue(v.DeviceName), + "virtual_name": aws.StringValue(v.VirtualName), } if v.NoDevice != nil { mapping["no_device"] = *v.NoDevice } if v.Ebs != nil { ebs := map[string]interface{}{ - "delete_on_termination": *v.Ebs.DeleteOnTermination, - "encrypted": *v.Ebs.Encrypted, - "volume_size": *v.Ebs.VolumeSize, - "volume_type": *v.Ebs.VolumeType, + "delete_on_termination": aws.BoolValue(v.Ebs.DeleteOnTermination), + "encrypted": aws.BoolValue(v.Ebs.Encrypted), + "volume_size": aws.Int64Value(v.Ebs.VolumeSize), + "volume_type": aws.StringValue(v.Ebs.VolumeType), } if v.Ebs.Iops != nil { - ebs["iops"] = *v.Ebs.Iops + ebs["iops"] = aws.Int64Value(v.Ebs.Iops) } if v.Ebs.KmsKeyId != nil { - ebs["kms_key_id"] = *v.Ebs.KmsKeyId + ebs["kms_key_id"] = aws.StringValue(v.Ebs.KmsKeyId) } if v.Ebs.SnapshotId != nil { - ebs["snapshot_id"] = *v.Ebs.SnapshotId + ebs["snapshot_id"] = aws.StringValue(v.Ebs.SnapshotId) } mapping["ebs"] = ebs @@ -593,7 +604,7 @@ func getCreditSpecification(cs *ec2.CreditSpecification) []interface{} { s := []interface{}{} if cs != nil { s = append(s, map[string]interface{}{ - "cpu_credits": *cs.CpuCredits, + "cpu_credits": aws.StringValue(cs.CpuCredits), }) } return s @@ -603,7 +614,7 @@ func getElasticGpuSpecifications(e []*ec2.ElasticGpuSpecificationResponse) []int s := []interface{}{} for _, v := range e { s = append(s, map[string]interface{}{ - "type": *v.Type, + "type": aws.StringValue(v.Type), }) } return s @@ -613,8 +624,8 @@ func getIamInstanceProfile(i *ec2.LaunchTemplateIamInstanceProfileSpecification) s := []interface{}{} if i != nil { s = append(s, map[string]interface{}{ - "arn": *i.Arn, - "name": *i.Name, + "arn": aws.StringValue(i.Arn), + "name": aws.StringValue(i.Name), }) } return s @@ -624,17 +635,17 @@ func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []inte s := []interface{}{} if m != nil { mo := map[string]interface{}{ - "market_type": *m.MarketType, + "market_type": aws.StringValue(m.MarketType), } spot := []interface{}{} so := m.SpotOptions if so != nil { spot = append(spot, map[string]interface{}{ - "block_duration_minutes": *so.BlockDurationMinutes, - "instance_interruption_behavior": *so.InstanceInterruptionBehavior, - "max_price": *so.MaxPrice, - "spot_instance_type": *so.SpotInstanceType, - "valid_until": *so.ValidUntil, + "block_duration_minutes": aws.Int64Value(so.BlockDurationMinutes), + "instance_interruption_behavior": aws.StringValue(so.InstanceInterruptionBehavior), + "max_price": aws.StringValue(so.MaxPrice), + "spot_instance_type": aws.StringValue(so.SpotInstanceType), + "valid_until": aws.TimeValue(so.ValidUntil), }) mo["spot_options"] = spot } @@ -650,26 +661,26 @@ func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecifi var ipv4Addresses []string networkInterface := map[string]interface{}{ - "associate_public_ip_address": *v.AssociatePublicIpAddress, - "delete_on_termination": *v.DeleteOnTermination, - "description": *v.Description, - "device_index": int(*v.DeviceIndex), - "ipv6_address_count": int(*v.Ipv6AddressCount), - "network_interface_id": *v.NetworkInterfaceId, - "private_ip_address": *v.PrivateIpAddress, - "ipv4_address_count": int(*v.SecondaryPrivateIpAddressCount), - "subnet_id": *v.SubnetId, + "associate_public_ip_address": aws.BoolValue(v.AssociatePublicIpAddress), + "delete_on_termination": aws.BoolValue(v.DeleteOnTermination), + "description": aws.StringValue(v.Description), + "device_index": aws.Int64Value(v.DeviceIndex), + "ipv6_address_count": aws.Int64Value(v.Ipv6AddressCount), + "network_interface_id": aws.StringValue(v.NetworkInterfaceId), + "private_ip_address": aws.StringValue(v.PrivateIpAddress), + "ipv4_address_count": aws.Int64Value(v.SecondaryPrivateIpAddressCount), + "subnet_id": aws.StringValue(v.SubnetId), } for _, address := range v.Ipv6Addresses { - ipv6Addresses = append(ipv6Addresses, *address.Ipv6Address) + ipv6Addresses = append(ipv6Addresses, aws.StringValue(address.Ipv6Address)) } if len(ipv6Addresses) > 0 { networkInterface["ipv6_addresses"] = ipv6Addresses } for _, address := range v.PrivateIpAddresses { - ipv4Addresses = append(ipv4Addresses, *address.PrivateIpAddress) + ipv4Addresses = append(ipv4Addresses, aws.StringValue(address.PrivateIpAddress)) } if len(ipv4Addresses) > 0 { networkInterface["ipv4_addresses"] = ipv4Addresses @@ -684,12 +695,12 @@ func getPlacement(p *ec2.LaunchTemplatePlacement) []interface{} { s := []interface{}{} if p != nil { s = append(s, map[string]interface{}{ - "affinity": *p.Affinity, - "availability_zone": *p.AvailabilityZone, - "group_name": *p.GroupName, - "host_id": *p.HostId, - "spread_domain": *p.SpreadDomain, - "tenancy": *p.Tenancy, + "affinity": aws.StringValue(p.Affinity), + "availability_zone": aws.StringValue(p.AvailabilityZone), + "group_name": aws.StringValue(p.GroupName), + "host_id": aws.StringValue(p.HostId), + "spread_domain": aws.StringValue(p.SpreadDomain), + "tenancy": aws.StringValue(p.Tenancy), }) } return s @@ -699,7 +710,7 @@ func getTagSpecifications(t []*ec2.LaunchTemplateTagSpecification) []interface{} s := []interface{}{} for _, v := range t { s = append(s, map[string]interface{}{ - "resource_type": *v.ResourceType, + "resource_type": aws.StringValue(v.ResourceType), "tags": tagsToMap(v.Tags), }) } @@ -745,158 +756,86 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.Req if v, ok := d.GetOk("block_device_mappings"); ok { var blockDeviceMappings []*ec2.LaunchTemplateBlockDeviceMappingRequest - bdms := v.(*schema.Set).List() + bdms := v.([]interface{}) for _, bdm := range bdms { - blockDeviceMap := bdm.(map[string]interface{}) - blockDeviceMappings = append(blockDeviceMappings, readBlockDeviceMappingFromConfig(blockDeviceMap)) + blockDeviceMappings = append(blockDeviceMappings, readBlockDeviceMappingFromConfig(bdm.(map[string]interface{}))) } opts.BlockDeviceMappings = blockDeviceMappings } if v, ok := d.GetOk("credit_specification"); ok { - cs := v.(*schema.Set).List() + cs := v.([]interface{}) if len(cs) > 0 { - csData := cs[0].(map[string]interface{}) - csr := &ec2.CreditSpecificationRequest{ - CpuCredits: aws.String(csData["cpu_credits"].(string)), - } - opts.CreditSpecification = csr + opts.CreditSpecification = readCreditSpecificationFromConfig(cs[0].(map[string]interface{})) } } if v, ok := d.GetOk("elastic_gpu_specifications"); ok { var elasticGpuSpecifications []*ec2.ElasticGpuSpecification - egsList := v.(*schema.Set).List() + egsList := v.([]interface{}) for _, egs := range egsList { - elasticGpuSpecification := egs.(map[string]interface{}) - elasticGpuSpecifications = append(elasticGpuSpecifications, &ec2.ElasticGpuSpecification{ - Type: aws.String(elasticGpuSpecification["type"].(string)), - }) + elasticGpuSpecifications = append(elasticGpuSpecifications, readElasticGpuSpecificationsFromConfig(egs.(map[string]interface{}))) } opts.ElasticGpuSpecifications = elasticGpuSpecifications } if v, ok := d.GetOk("iam_instance_profile"); ok { - iip := v.(*schema.Set).List() + iip := v.([]interface{}) if len(iip) > 0 { - iipData := iip[0].(map[string]interface{}) - iamInstanceProfile := &ec2.LaunchTemplateIamInstanceProfileSpecificationRequest{ - Arn: aws.String(iipData["arn"].(string)), - Name: aws.String(iipData["name"].(string)), - } - opts.IamInstanceProfile = iamInstanceProfile + opts.IamInstanceProfile = readIamInstanceProfileFromConfig(iip[0].(map[string]interface{})) } } if v, ok := d.GetOk("instance_market_options"); ok { - imo := v.(*schema.Set).List() + imo := v.([]interface{}) if len(imo) > 0 { - imoData := imo[0].(map[string]interface{}) - spotOptions := &ec2.LaunchTemplateSpotMarketOptionsRequest{} - - if v, ok := imoData["spot_options"]; ok { - vL := v.(*schema.Set).List() - for _, v := range vL { - so := v.(map[string]interface{}) - spotOptions.BlockDurationMinutes = aws.Int64(int64(so["block_duration_minutes"].(int))) - spotOptions.InstanceInterruptionBehavior = aws.String(so["instance_interruption_behavior"].(string)) - spotOptions.MaxPrice = aws.String(so["max_price"].(string)) - spotOptions.SpotInstanceType = aws.String(so["spot_instance_type"].(string)) - - t, err := time.Parse(awsSpotInstanceTimeLayout, so["valid_until"].(string)) - if err != nil { - return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) - } - spotOptions.ValidUntil = aws.Time(t) - } + instanceMarketOptions, err := readInstanceMarketOptionsFromConfig(imo[0].(map[string]interface{})) + if err != nil { + return nil, err } - - instanceMarketOptions := &ec2.LaunchTemplateInstanceMarketOptionsRequest{ - MarketType: aws.String(imoData["market_type"].(string)), - SpotOptions: spotOptions, - } - opts.InstanceMarketOptions = instanceMarketOptions } } if v, ok := d.GetOk("monitoring"); ok { - monitoring := &ec2.LaunchTemplatesMonitoringRequest{ - Enabled: aws.Bool(v.(bool)), + m := v.([]interface{}) + if len(m) > 0 { + mData := m[0].(map[string]interface{}) + monitoring := &ec2.LaunchTemplatesMonitoringRequest{ + Enabled: aws.Bool(mData["enabled"].(bool)), + } + opts.Monitoring = monitoring } - opts.Monitoring = monitoring } if v, ok := d.GetOk("network_interfaces"); ok { var networkInterfaces []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest - niList := v.(*schema.Set).List() + niList := v.([]interface{}) for _, ni := range niList { - var ipv4Addresses []*ec2.PrivateIpAddressSpecification - var ipv6Addresses []*ec2.InstanceIpv6AddressRequest - ni := ni.(map[string]interface{}) - - privateIpAddress := ni["private_ip_address"].(string) - networkInterface := &ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{ - AssociatePublicIpAddress: aws.Bool(ni["associate_public_ip_address"].(bool)), - DeleteOnTermination: aws.Bool(ni["delete_on_termination"].(bool)), - Description: aws.String(ni["description"].(string)), - DeviceIndex: aws.Int64(int64(ni["device_index"].(int))), - NetworkInterfaceId: aws.String(ni["network_interface_id"].(string)), - PrivateIpAddress: aws.String(privateIpAddress), - SubnetId: aws.String(ni["subnet_id"].(string)), - } - - ipv6AddressList := ni["ipv6_addresses"].(*schema.Set).List() - for _, address := range ipv6AddressList { - ipv6Addresses = append(ipv6Addresses, &ec2.InstanceIpv6AddressRequest{ - Ipv6Address: aws.String(address.(string)), - }) - } - networkInterface.Ipv6AddressCount = aws.Int64(int64(len(ipv6AddressList))) - networkInterface.Ipv6Addresses = ipv6Addresses - - ipv4AddressList := ni["ipv4_addresses"].(*schema.Set).List() - for _, address := range ipv4AddressList { - privateIp := &ec2.PrivateIpAddressSpecification{ - Primary: aws.Bool(address.(string) == privateIpAddress), - PrivateIpAddress: aws.String(address.(string)), - } - ipv4Addresses = append(ipv4Addresses, privateIp) - } - networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(len(ipv4AddressList))) - networkInterface.PrivateIpAddresses = ipv4Addresses - + niData := ni.(map[string]interface{}) + networkInterface := readNetworkInterfacesFromConfig(niData) networkInterfaces = append(networkInterfaces, networkInterface) } opts.NetworkInterfaces = networkInterfaces } if v, ok := d.GetOk("placement"); ok { - p := v.(*schema.Set).List() + p := v.([]interface{}) if len(p) > 0 { - pData := p[0].(map[string]interface{}) - placement := &ec2.LaunchTemplatePlacementRequest{ - Affinity: aws.String(pData["affinity"].(string)), - AvailabilityZone: aws.String(pData["availability_zone"].(string)), - GroupName: aws.String(pData["group_name"].(string)), - HostId: aws.String(pData["host_id"].(string)), - SpreadDomain: aws.String(pData["spread_domain"].(string)), - Tenancy: aws.String(pData["tenancy"].(string)), - } - opts.Placement = placement + opts.Placement = readPlacementFromConfig(p[0].(map[string]interface{})) } } if v, ok := d.GetOk("tag_specifications"); ok { var tagSpecifications []*ec2.LaunchTemplateTagSpecificationRequest - t := v.(*schema.Set).List() + t := v.([]interface{}) for _, ts := range t { tsData := ts.(map[string]interface{}) @@ -928,16 +867,14 @@ func readBlockDeviceMappingFromConfig(bdm map[string]interface{}) *ec2.LaunchTem blockDeviceMapping.VirtualName = aws.String(v.(string)) } - if v := bdm["ebs"]; v.(*schema.Set).Len() > 0 { - ebs := v.(*schema.Set).List() + if v := bdm["ebs"]; len(v.([]interface{})) > 0 { + ebs := v.([]interface{}) if len(ebs) > 0 { ebsData := ebs[0] - //log.Printf("ebsData: %+v\n", ebsData) blockDeviceMapping.Ebs = readEbsBlockDeviceFromConfig(ebsData.(map[string]interface{})) } } - //log.Printf("block device mapping: %+v\n", *blockDeviceMapping) return blockDeviceMapping } @@ -974,3 +911,161 @@ func readEbsBlockDeviceFromConfig(ebs map[string]interface{}) *ec2.LaunchTemplat return ebsDevice } + +func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + var ipv4Addresses []*ec2.PrivateIpAddressSpecification + var ipv6Addresses []*ec2.InstanceIpv6AddressRequest + var privateIpAddress string + networkInterface := &ec2.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest{ + AssociatePublicIpAddress: aws.Bool(ni["associate_public_ip_address"].(bool)), + DeleteOnTermination: aws.Bool(ni["delete_on_termination"].(bool)), + } + + if v, ok := ni["description"].(string); ok && v != "" { + networkInterface.Description = aws.String(v) + } + + if v, ok := ni["device_index"].(int); ok && v != 0 { + networkInterface.DeviceIndex = aws.Int64(int64(v)) + } + + if v, ok := ni["network_interface_id"].(string); ok && v != "" { + networkInterface.NetworkInterfaceId = aws.String(v) + } + + if v, ok := ni["private_ip_address"].(string); ok && v != "" { + privateIpAddress = v + networkInterface.PrivateIpAddress = aws.String(v) + } + + if v, ok := ni["subnet_id"].(string); ok && v != "" { + networkInterface.SubnetId = aws.String(v) + } + + ipv6AddressList := ni["ipv6_addresses"].([]interface{}) + for _, address := range ipv6AddressList { + ipv6Addresses = append(ipv6Addresses, &ec2.InstanceIpv6AddressRequest{ + Ipv6Address: aws.String(address.(string)), + }) + } + networkInterface.Ipv6AddressCount = aws.Int64(int64(len(ipv6AddressList))) + networkInterface.Ipv6Addresses = ipv6Addresses + + ipv4AddressList := ni["ipv4_addresses"].([]interface{}) + for _, address := range ipv4AddressList { + privateIp := &ec2.PrivateIpAddressSpecification{ + Primary: aws.Bool(address.(string) == privateIpAddress), + PrivateIpAddress: aws.String(address.(string)), + } + ipv4Addresses = append(ipv4Addresses, privateIp) + } + networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(len(ipv4AddressList))) + networkInterface.PrivateIpAddresses = ipv4Addresses + + return networkInterface +} + +func readIamInstanceProfileFromConfig(iip map[string]interface{}) *ec2.LaunchTemplateIamInstanceProfileSpecificationRequest { + iamInstanceProfile := &ec2.LaunchTemplateIamInstanceProfileSpecificationRequest{} + + if v, ok := iip["arn"].(string); ok && v != "" { + iamInstanceProfile.Arn = aws.String(v) + } + + if v, ok := iip["name"].(string); ok && v != "" { + iamInstanceProfile.Name = aws.String(v) + } + + return iamInstanceProfile +} + +func readCreditSpecificationFromConfig(cs map[string]interface{}) *ec2.CreditSpecificationRequest { + creditSpecification := &ec2.CreditSpecificationRequest{} + + if v, ok := cs["cpu_credits"].(string); ok && v != "" { + creditSpecification.CpuCredits = aws.String(v) + } + + return creditSpecification +} + +func readElasticGpuSpecificationsFromConfig(egs map[string]interface{}) *ec2.ElasticGpuSpecification { + elasticGpuSpecification := &ec2.ElasticGpuSpecification{} + + if v, ok := egs["type"].(string); ok && v != "" { + elasticGpuSpecification.Type = aws.String(v) + } + + return elasticGpuSpecification +} + +func readInstanceMarketOptionsFromConfig(imo map[string]interface{}) (*ec2.LaunchTemplateInstanceMarketOptionsRequest, error) { + instanceMarketOptions := &ec2.LaunchTemplateInstanceMarketOptionsRequest{} + spotOptions := &ec2.LaunchTemplateSpotMarketOptionsRequest{} + + if v, ok := imo["market_type"].(string); ok && v != "" { + instanceMarketOptions.MarketType = aws.String(v) + } + + if v, ok := imo["spot_options"]; ok { + vL := v.([]interface{}) + for _, v := range vL { + so := v.(map[string]interface{}) + + if v, ok := so["block_duration_minutes"].(int); ok && v != 0 { + spotOptions.BlockDurationMinutes = aws.Int64(int64(v)) + } + + if v, ok := so["instance_interruption_behavior"].(string); ok && v != "" { + spotOptions.InstanceInterruptionBehavior = aws.String(v) + } + + if v, ok := so["max_price"].(string); ok && v != "" { + spotOptions.MaxPrice = aws.String(v) + } + + if v, ok := so["spot_instance_type"].(string); ok && v != "" { + spotOptions.SpotInstanceType = aws.String(v) + } + + t, err := time.Parse(time.RFC3339, so["valid_until"].(string)) + if err != nil { + return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) + } + spotOptions.ValidUntil = aws.Time(t) + } + instanceMarketOptions.SpotOptions = spotOptions + } + + return instanceMarketOptions, nil +} + +func readPlacementFromConfig(p map[string]interface{}) *ec2.LaunchTemplatePlacementRequest { + placement := &ec2.LaunchTemplatePlacementRequest{} + + if v, ok := p["affinity"].(string); ok && v != "" { + placement.Affinity = aws.String(v) + } + + if v, ok := p["availability_zone"].(string); ok && v != "" { + placement.AvailabilityZone = aws.String(v) + } + + if v, ok := p["group_name"].(string); ok && v != "" { + placement.GroupName = aws.String(v) + } + + if v, ok := p["host_id"].(string); ok && v != "" { + placement.HostId = aws.String(v) + } + + if v, ok := p["spread_domain"].(string); ok && v != "" { + placement.SpreadDomain = aws.String(v) + } + + if v, ok := p["tenancy"].(string); ok && v != "" { + placement.Tenancy = aws.String(v) + } + + return placement +} diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index a58d752e1d0..2ff0a4d7da0 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" @@ -57,7 +56,7 @@ func TestAccAWSLaunchTemplate_data(t *testing.T) { resource.TestCheckResourceAttrSet(resName, "instance_type"), resource.TestCheckResourceAttrSet(resName, "kernel_id"), resource.TestCheckResourceAttrSet(resName, "key_name"), - resource.TestCheckResourceAttrSet(resName, "monitoring"), + resource.TestCheckResourceAttr(resName, "monitoring.#", "1"), resource.TestCheckResourceAttr(resName, "network_interfaces.#", "1"), resource.TestCheckResourceAttr(resName, "placement.#", "1"), resource.TestCheckResourceAttrSet(resName, "ram_disk_id"), @@ -147,14 +146,11 @@ func testAccCheckAWSLaunchTemplateDestroy(s *terraform.State) error { } } - ae, ok := err.(awserr.Error) - if !ok { - return err - } - if ae.Code() != "InvalidLaunchTemplateId.NotFound" { - log.Printf("aws error code: %s", ae.Code()) - return err + if isAWSErr(err, "InvalidLaunchTemplateId.NotFound", "") { + log.Printf("[WARN] launch template (%s) not found.", rs.Primary.ID) + continue } + return err } return nil @@ -190,31 +186,34 @@ resource "aws_launch_template" "foo" { name = "test" } - image_id = "ami-test" + image_id = "ami-12a3b456" - instance_initiated_shutdown_behavior = "test" + instance_initiated_shutdown_behavior = "terminate" instance_market_options { - market_type = "test" + market_type = "spot" } instance_type = "t2.micro" - kernel_id = "test" + kernel_id = "aki-a12bc3de" key_name = "test" - monitoring = true + monitoring { + enabled = true + } network_interfaces { associate_public_ip_address = true + network_interface_id = "eni-123456ab" } placement { - availability_zone = "test" + availability_zone = "us-west-2b" } - ram_disk_id = "test" + ram_disk_id = "ari-a12bc3de" vpc_security_group_ids = ["test"] From 7ffa80aabe3978d2b96d4a50aa21462e3ac2db71 Mon Sep 17 00:00:00 2001 From: Zak Alfonse Date: Fri, 13 Apr 2018 10:47:51 -0400 Subject: [PATCH 0582/3316] Update docs for service_discovery_service health_check_config Update `resource_path` and `type` to describe themselves and their valid values and defaults. --- website/docs/r/service_discovery_service.html.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/r/service_discovery_service.html.markdown b/website/docs/r/service_discovery_service.html.markdown index cb3768d9603..8f662533599 100644 --- a/website/docs/r/service_discovery_service.html.markdown +++ b/website/docs/r/service_discovery_service.html.markdown @@ -52,7 +52,7 @@ resource "aws_service_discovery_service" "example" { } } health_check_config { - failure_threshold = 100 + failure_threshold = 10 resource_path = "path" type = "HTTP" } @@ -88,8 +88,8 @@ The following arguments are supported: The following arguments are supported: * `failure_threshold` - (Optional) The number of consecutive health checks. Maximum value of 10. -* `resource_path` - (Optional) An array that contains one DnsRecord object for each resource record set. -* `type` - (Optional, ForceNew) An array that contains one DnsRecord object for each resource record set. +* `resource_path` - (Optional) The path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /. +* `type` - (Optional, ForceNew) The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP ## Attributes Reference From 842328dc9eaf4e4d1d86ec7b148086bc032bbf6d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 11:28:05 -0400 Subject: [PATCH 0583/3316] resource/aws_directory_service_conditional_forwarder: Implement #4071 feedback --- ...directory_service_conditional_forwarder.go | 54 +++++++++++-------- ...tory_service_conditional_forwarder_test.go | 18 +++---- ...ervice_conditional_forwarder.html.markdown | 6 +-- 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/aws/resource_aws_directory_service_conditional_forwarder.go b/aws/resource_aws_directory_service_conditional_forwarder.go index 362a47925d5..8927fc9bd3b 100644 --- a/aws/resource_aws_directory_service_conditional_forwarder.go +++ b/aws/resource_aws_directory_service_conditional_forwarder.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "regexp" "strings" @@ -24,13 +25,13 @@ func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "directory_id": &schema.Schema{ + "directory_id": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "dns_ips": &schema.Schema{ + "dns_ips": { Type: schema.TypeList, Required: true, MinItems: 1, @@ -39,11 +40,11 @@ func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { }, }, - "domain_name": &schema.Schema{ + "remote_domain_name": { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+[.]?$"), "'domain_name' is incorrect"), + ValidateFunc: validation.StringMatch(regexp.MustCompile("^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+[.]?$"), "invalid value, see the RemoteDomainName attribute documentation: https://docs.aws.amazon.com/directoryservice/latest/devguide/API_ConditionalForwarder.html"), }, }, } @@ -55,7 +56,7 @@ func resourceAwsDirectoryServiceConditionalForwarderCreate(d *schema.ResourceDat dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) directoryId := d.Get("directory_id").(string) - domainName := d.Get("domain_name").(string) + domainName := d.Get("remote_domain_name").(string) _, err := conn.CreateConditionalForwarder(&directoryservice.CreateConditionalForwarderInput{ DirectoryId: aws.String(directoryId), @@ -75,10 +76,9 @@ func resourceAwsDirectoryServiceConditionalForwarderCreate(d *schema.ResourceDat func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dsconn - directoryId, domainName := parseDSConditionalForwarderId(d.Id()) - - if directoryId == "" || domainName == "" { - return fmt.Errorf("Error importing aws_directory_service_conditional_forwarder. Please make sure ID is in format DIRECTORY_ID:DOMAIN_NAME") + directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) + if err != nil { + return err } res, err := conn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ @@ -88,6 +88,7 @@ func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, if err != nil { if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { + log.Printf("[WARN] Directory Service Conditional Forwarder (%s) not found, removing from state", d.Id()) d.SetId("") return nil } @@ -95,6 +96,7 @@ func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, } if len(res.ConditionalForwarders) == 0 { + log.Printf("[WARN] Directory Service Conditional Forwarder (%s) not found, removing from state", d.Id()) d.SetId("") return nil } @@ -103,7 +105,7 @@ func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, d.Set("dns_ips", flattenStringList(cfd.DnsIpAddrs)) d.Set("directory_id", directoryId) - d.Set("domain_name", *cfd.RemoteDomainName) + d.Set("remote_domain_name", cfd.RemoteDomainName) return nil } @@ -111,12 +113,17 @@ func resourceAwsDirectoryServiceConditionalForwarderRead(d *schema.ResourceData, func resourceAwsDirectoryServiceConditionalForwarderUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dsconn + directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) + if err != nil { + return err + } + dnsIps := expandStringList(d.Get("dns_ips").([]interface{})) - _, err := conn.UpdateConditionalForwarder(&directoryservice.UpdateConditionalForwarderInput{ - DirectoryId: aws.String(d.Get("directory_id").(string)), + _, err = conn.UpdateConditionalForwarder(&directoryservice.UpdateConditionalForwarderInput{ + DirectoryId: aws.String(directoryId), DnsIpAddrs: dnsIps, - RemoteDomainName: aws.String(d.Get("domain_name").(string)), + RemoteDomainName: aws.String(domainName), }) if err != nil { @@ -129,26 +136,29 @@ func resourceAwsDirectoryServiceConditionalForwarderUpdate(d *schema.ResourceDat func resourceAwsDirectoryServiceConditionalForwarderDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dsconn - _, err := conn.DeleteConditionalForwarder(&directoryservice.DeleteConditionalForwarderInput{ - DirectoryId: aws.String(d.Get("directory_id").(string)), - RemoteDomainName: aws.String(d.Get("domain_name").(string)), + directoryId, domainName, err := parseDSConditionalForwarderId(d.Id()) + if err != nil { + return err + } + + _, err = conn.DeleteConditionalForwarder(&directoryservice.DeleteConditionalForwarderInput{ + DirectoryId: aws.String(directoryId), + RemoteDomainName: aws.String(domainName), }) if err != nil && !isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { return err } - d.SetId("") return nil } -func parseDSConditionalForwarderId(id string) (directoryId, domainName string) { +func parseDSConditionalForwarderId(id string) (directoryId, domainName string, err error) { parts := strings.SplitN(id, ":", 2) - if len(parts) == 2 { - directoryId = parts[0] - domainName = parts[1] + if len(parts) != 2 { + return "", "", fmt.Errorf("please make sure ID is in format DIRECTORY_ID:DOMAIN_NAME") } - return + return parts[0], parts[1], nil } diff --git a/aws/resource_aws_directory_service_conditional_forwarder_test.go b/aws/resource_aws_directory_service_conditional_forwarder_test.go index 89deae5782e..a6eaa332ad0 100644 --- a/aws/resource_aws_directory_service_conditional_forwarder_test.go +++ b/aws/resource_aws_directory_service_conditional_forwarder_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestACCAwsDirectoryServiceConditionForwarder_basic(t *testing.T) { +func TestAccAWSDirectoryServiceConditionForwarder_basic(t *testing.T) { resourceName := "aws_directory_service_conditional_forwarder.fwd" ip1, ip2, ip3 := "8.8.8.8", "1.1.1.1", "8.8.4.4" @@ -59,10 +59,9 @@ func testAccCheckAwsDirectoryServiceConditionalForwarderDestroy(s *terraform.Sta continue } - directoryId, domainName := parseDSConditionalForwarderId(rs.Primary.ID) - - if directoryId == "" || domainName == "" { - return fmt.Errorf("Invalid ID '%s' for conditional forwarder", rs.Primary.ID) + directoryId, domainName, err := parseDSConditionalForwarderId(rs.Primary.ID) + if err != nil { + return err } res, err := dsconn.DescribeConditionalForwarders(&directoryservice.DescribeConditionalForwardersInput{ @@ -98,10 +97,9 @@ func testAccCheckAwsDirectoryServiceConditionalForwarderExists(name string, dnsI return fmt.Errorf("No ID is set") } - directoryId, domainName := parseDSConditionalForwarderId(rs.Primary.ID) - - if directoryId == "" || domainName == "" { - return fmt.Errorf("Invalid ID '%s' for conditional forwarder", rs.Primary.ID) + directoryId, domainName, err := parseDSConditionalForwarderId(rs.Primary.ID) + if err != nil { + return err } dsconn := testAccProvider.Meta().(*AWSClient).dsconn @@ -183,7 +181,7 @@ resource "aws_subnet" "bar" { resource "aws_directory_service_conditional_forwarder" "fwd" { directory_id = "${aws_directory_service_directory.bar.id}" - domain_name = "test.example.com" + remote_domain_name = "test.example.com" dns_ips = [ "%s", diff --git a/website/docs/r/directory_service_conditional_forwarder.html.markdown b/website/docs/r/directory_service_conditional_forwarder.html.markdown index e714afaf1c7..b103f27c53b 100644 --- a/website/docs/r/directory_service_conditional_forwarder.html.markdown +++ b/website/docs/r/directory_service_conditional_forwarder.html.markdown @@ -15,7 +15,7 @@ Provides a conditional forwarder for managed Microsoft AD in AWS Directory Servi ```hcl resource "aws_directory_service_conditional_forwarder" "example" { directory_id = "${aws_directory_service_directory.ad.id}" - domain_name = "example.com" + remote_domain_name = "example.com" dns_ips = [ "8.8.8.8", @@ -29,12 +29,12 @@ resource "aws_directory_service_conditional_forwarder" "example" { The following arguments are supported: * `directory_id` - (Required) The id of directory. -* `domain_name` - (Required) The fully qualified domain name of the remote domain for which forwarders will be used. * `dns_ips` - (Required) A list of forwarder IP addresses. +* `remote_domain_name` - (Required) The fully qualified domain name of the remote domain for which forwarders will be used. ## Import -Conditional forwarders can be imported using the directory id and domain_name, e.g. +Conditional forwarders can be imported using the directory id and remote_domain_name, e.g. ``` $ terraform import aws_directory_service_conditional_forwarder.example d-1234567890:example.com From d13bc7ff27c325f67ce0cdfad67c56d37c30d774 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 12:09:24 -0400 Subject: [PATCH 0584/3316] Update CHANGELOG for #4071 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f096fc2777..2a7c8f745cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ FEATURES: * **New Data Source:** `aws_api_gateway_rest_api` [GH-4172] * **New Data Source:** `aws_cloudwatch_log_group` [GH-4167] * **New Data Source:** `aws_sqs_queue` [GH-2311] +* **New Resource:** `aws_directory_service_conditional_forwarder` [GH-4071] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] ENHANCEMENTS: From f6c373361412db88ef3be05e8746f649aa11f7a9 Mon Sep 17 00:00:00 2001 From: Luke Kysow Date: Fri, 13 Apr 2018 10:20:56 -0700 Subject: [PATCH 0585/3316] Update docs to append '/' to s3 arn for cloudtrail Fixes #4043. If you want to monitor all objects in a bucket, you need to append a '/' to your ARN. --- website/docs/r/cloudtrail.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/r/cloudtrail.html.markdown b/website/docs/r/cloudtrail.html.markdown index ddb2d8542c7..dbea6caf771 100644 --- a/website/docs/r/cloudtrail.html.markdown +++ b/website/docs/r/cloudtrail.html.markdown @@ -127,7 +127,9 @@ resource "aws_cloudtrail" "example" { data_resource { type = "AWS::S3::Object" - values = ["${data.aws_s3_bucket.important-bucket.arn}"] + # Make sure to append a trailing '/' to your ARN if you want + # to monitor all objects in a bucket. + values = ["${data.aws_s3_bucket.important-bucket.arn}/"] } } } From 6c8586f58ade57b62f6944540535edd5eb0cbbc4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 13:22:23 -0400 Subject: [PATCH 0586/3316] docs/resource/aws_autoscaling_*: Use resource references for RDS examples --- website/docs/r/appautoscaling_policy.html.markdown | 10 ++++------ website/docs/r/appautoscaling_target.html.markdown | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/website/docs/r/appautoscaling_policy.html.markdown b/website/docs/r/appautoscaling_policy.html.markdown index f7378b5edb2..b7ac281f40c 100644 --- a/website/docs/r/appautoscaling_policy.html.markdown +++ b/website/docs/r/appautoscaling_policy.html.markdown @@ -95,16 +95,16 @@ resource "aws_ecs_service" "ecs_service" { resource "aws_appautoscaling_target" "replicas" { service_namespace = "rds" scalable_dimension = "rds:cluster:ReadReplicaCount" - resource_id = "cluster:aurora-cluster-id" + resource_id = "cluster:${aws_rds_cluster.example.id}" min_capacity = 1 max_capacity = 15 } resource "aws_appautoscaling_policy" "replicas" { name = "cpu-auto-scaling" - service_namespace = "rds" - scalable_dimension = "rds:cluster:ReadReplicaCount" - resource_id = "cluster:aurora-cluster-id" + service_namespace = "${aws_appautoscaling_target.replicas.service_namespace}" + scalable_dimension = "${aws_appautoscaling_target.replicas.scalable_dimension}" + resource_id = "${aws_appautoscaling_target.replicas.resource_id}" policy_type = "TargetTrackingScaling" target_tracking_scaling_policy_configuration { @@ -115,8 +115,6 @@ resource "aws_appautoscaling_policy" "replicas" { scale_in_cooldown = 300 scale_out_cooldown = 300 } - - depends_on = ["aws_appautoscaling_target.replicas"] } ``` diff --git a/website/docs/r/appautoscaling_target.html.markdown b/website/docs/r/appautoscaling_target.html.markdown index 554cbcebe70..17a12ada214 100644 --- a/website/docs/r/appautoscaling_target.html.markdown +++ b/website/docs/r/appautoscaling_target.html.markdown @@ -57,7 +57,7 @@ resource "aws_appautoscaling_target" "ecs_target" { resource "aws_appautoscaling_target" "replicas" { service_namespace = "rds" scalable_dimension = "rds:cluster:ReadReplicaCount" - resource_id = "cluster:aurora-cluster-id" + resource_id = "cluster:${aws_rds_cluster.example.id}" min_capacity = 1 max_capacity = 15 } From 4b88bafaa3291d32106fae32856b4ba2fa0cacb4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 14:02:10 -0400 Subject: [PATCH 0587/3316] Update CHANGELOG for #3801 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a7c8f745cf..9b4bc970566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ FEATURES: ENHANCEMENTS: +* data-source/aws_iam_server_certificate: Filter by `path_prefix` [GH-3801] * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] * resource/aws_db_option_group: Support option version argument [GH-2590] * resource/aws_ecs_service: Support ServiceRegistries [GH-3906] From 97e0941e1245d9d0234649bd09314a4542bdbf51 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 15:12:19 -0400 Subject: [PATCH 0588/3316] resource/aws_db_instance: Address #4111 review feedback --- aws/resource_aws_db_instance.go | 16 ++--------- aws/resource_aws_db_instance_test.go | 42 +++++++++++++--------------- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 4ed3389378f..d45c313b1b1 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -354,7 +354,6 @@ func resourceAwsDbInstance() *schema.Resource { "enabled_cloudwatch_logs_exports": { Type: schema.TypeList, - Computed: false, Optional: true, Elem: &schema.Schema{ Type: schema.TypeString, @@ -803,8 +802,8 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("monitoring_role_arn", v.MonitoringRoleArn) } - if v.EnabledCloudwatchLogsExports != nil { - d.Set("enabled_cloudwatch_logs_exports", v.EnabledCloudwatchLogsExports) + if err := d.Set("enabled_cloudwatch_logs_exports", flattenStringList(v.EnabledCloudwatchLogsExports)); err != nil { + return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) } // list tags for resource @@ -1189,17 +1188,6 @@ func resourceAwsDbInstanceStateRefreshFunc(id string, conn *rds.RDS) resource.St } } -func buildRDSARN(identifier, partition, accountid, region string) (string, error) { - if partition == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS partition") - } - if accountid == "" { - return "", fmt.Errorf("Unable to construct RDS ARN because of missing AWS Account ID") - } - arn := fmt.Sprintf("arn:%s:rds:%s:%s:db:%s", partition, region, accountid, identifier) - return arn, nil -} - func buildCloudwatchLogsExportConfiguration(d *schema.ResourceData) *rds.CloudwatchLogsExportConfiguration { oraw, nraw := d.GetChange("enabled_cloudwatch_logs_exports") diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index 42490f89c8f..0b249d8e76c 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -108,9 +108,7 @@ func TestAccAWSDBInstance_basic(t *testing.T) { resource.TestCheckResourceAttr( "aws_db_instance.bar", "parameter_group_name", "default.mysql5.6"), resource.TestCheckResourceAttr( - "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.0", "audit"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.1", "error"), + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.#", "0"), resource.TestCheckResourceAttrSet("aws_db_instance.bar", "hosted_zone_id"), resource.TestCheckResourceAttrSet("aws_db_instance.bar", "ca_cert_identifier"), resource.TestCheckResourceAttrSet( @@ -516,6 +514,11 @@ func TestAccAWSDBInstance_cloudwatchLogsExportConfiguration(t *testing.T) { testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), ), }, + { + ResourceName: "aws_db_instance.bar", + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -568,8 +571,8 @@ func TestAccAWSDBInstance_cloudwatchLogsExportConfigurationUpdate(t *testing.T) Config: testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationDelete(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), - resource.TestCheckNoResourceAttr( - "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.0"), + resource.TestCheckResourceAttr( + "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.#", "0"), ), }, }, @@ -857,11 +860,6 @@ resource "aws_db_instance" "bar" { timeouts { create = "30m" } - - enabled_cloudwatch_logs_exports = [ - "audit", - "error", - ] }` const testAccAWSDBInstanceConfig_namePrefix = ` @@ -1528,7 +1526,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfiguration(rInt int) strin cidr_block = "10.1.0.0/16" enable_dns_hostnames = true tags { - Name = "terraform-testacc-db-instance-mssql-timezone" + Name = "terraform-testacc-db-instance-enable-cloudwatch" } } @@ -1544,7 +1542,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfiguration(rInt int) strin availability_zone = "us-west-2a" cidr_block = "10.1.1.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-main" + Name = "tf-acc-db-instance-enable-cloudwatch-main" } } @@ -1553,7 +1551,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfiguration(rInt int) strin availability_zone = "us-west-2b" cidr_block = "10.1.2.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-other" + Name = "tf-acc-db-instance-enable-cloudwatch-other" } } @@ -1585,7 +1583,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationAdd(rInt int) st cidr_block = "10.1.0.0/16" enable_dns_hostnames = true tags { - Name = "terraform-testacc-db-instance-mssql-timezone" + Name = "terraform-testacc-db-instance-enable-cloudwatch" } } @@ -1601,7 +1599,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationAdd(rInt int) st availability_zone = "us-west-2a" cidr_block = "10.1.1.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-main" + Name = "tf-acc-db-instance-enable-cloudwatch-main" } } @@ -1610,7 +1608,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationAdd(rInt int) st availability_zone = "us-west-2b" cidr_block = "10.1.2.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-other" + Name = "tf-acc-db-instance-enable-cloudwatch-other" } } @@ -1645,7 +1643,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationModify(rInt int) cidr_block = "10.1.0.0/16" enable_dns_hostnames = true tags { - Name = "terraform-testacc-db-instance-mssql-timezone" + Name = "terraform-testacc-db-instance-enable-cloudwatch" } } @@ -1661,7 +1659,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationModify(rInt int) availability_zone = "us-west-2a" cidr_block = "10.1.1.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-main" + Name = "tf-acc-db-instance-enable-cloudwatch-main" } } @@ -1670,7 +1668,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationModify(rInt int) availability_zone = "us-west-2b" cidr_block = "10.1.2.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-other" + Name = "tf-acc-db-instance-enable-cloudwatch-other" } } @@ -1705,7 +1703,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationDelete(rInt int) cidr_block = "10.1.0.0/16" enable_dns_hostnames = true tags { - Name = "terraform-testacc-db-instance-mssql-timezone" + Name = "terraform-testacc-db-instance-enable-cloudwatch" } } @@ -1721,7 +1719,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationDelete(rInt int) availability_zone = "us-west-2a" cidr_block = "10.1.1.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-main" + Name = "tf-acc-db-instance-enable-cloudwatch-main" } } @@ -1730,7 +1728,7 @@ func testAccAWSDBInstanceConfigCloudwatchLogsExportConfigurationDelete(rInt int) availability_zone = "us-west-2b" cidr_block = "10.1.2.0/24" tags { - Name = "tf-acc-db-instance-mssql-timezone-other" + Name = "tf-acc-db-instance-enable-cloudwatch-other" } } From fa28f9a1fcc63aa526bc7186ffa21b3449f099a1 Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 13 Apr 2018 15:12:49 -0400 Subject: [PATCH 0589/3316] add missing pieces to correct import --- aws/import_aws_launch_template_test.go | 50 +++++++++++++++++++ aws/resource_aws_launch_template.go | 51 +++++++++++++++----- aws/resource_aws_launch_template_test.go | 30 +++++++----- website/docs/r/launch_template.html.markdown | 8 +++ 4 files changed, 116 insertions(+), 23 deletions(-) create mode 100644 aws/import_aws_launch_template_test.go diff --git a/aws/import_aws_launch_template_test.go b/aws/import_aws_launch_template_test.go new file mode 100644 index 00000000000..bc717276bfa --- /dev/null +++ b/aws/import_aws_launch_template_test.go @@ -0,0 +1,50 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSLaunchTemplate_importBasic(t *testing.T) { + resName := "aws_launch_template.foo" + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_basic(rInt), + }, + { + ResourceName: resName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSLaunchTemplate_importData(t *testing.T) { + resName := "aws_launch_template.foo" + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_data(rInt), + }, + { + ResourceName: resName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 7c26dc87159..fe88cddce40 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -279,7 +279,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { Optional: true, }, "security_groups": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -288,7 +288,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { Computed: true, }, "ipv6_addresses": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -301,7 +301,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { Optional: true, }, "ipv4_addresses": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -362,13 +362,13 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "security_group_names": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "vpc_security_group_ids": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -463,7 +463,6 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err d.Set("name", lt.LaunchTemplateName) d.Set("latest_version", lt.LatestVersionNumber) d.Set("default_version", lt.DefaultVersionNumber) - d.Set("tags", tagsToMap(lt.Tags)) version := strconv.Itoa(int(*lt.LatestVersionNumber)) dltv, err := conn.DescribeLaunchTemplateVersions(&ec2.DescribeLaunchTemplateVersionsInput{ @@ -485,9 +484,10 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err d.Set("instance_type", ltData.InstanceType) d.Set("kernel_id", ltData.KernelId) d.Set("key_name", ltData.KeyName) - d.Set("monitoring", ltData.Monitoring) - d.Set("ram_dist_id", ltData.RamDiskId) + d.Set("ram_disk_id", ltData.RamDiskId) + d.Set("security_group_names", aws.StringValueSlice(ltData.SecurityGroups)) d.Set("user_data", ltData.UserData) + d.Set("vpc_security_group_ids", aws.StringValueSlice(ltData.SecurityGroupIds)) if err := d.Set("block_device_mappings", getBlockDeviceMappings(ltData.BlockDeviceMappings)); err != nil { return err @@ -509,6 +509,10 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err return err } + if err := d.Set("monitoring", getMonitoring(ltData.Monitoring)); err != nil { + return err + } + if err := d.Set("network_interfaces", getNetworkInterfaces(ltData.NetworkInterfaces)); err != nil { return err } @@ -580,7 +584,7 @@ func getBlockDeviceMappings(m []*ec2.LaunchTemplateBlockDeviceMapping) []interfa ebs := map[string]interface{}{ "delete_on_termination": aws.BoolValue(v.Ebs.DeleteOnTermination), "encrypted": aws.BoolValue(v.Ebs.Encrypted), - "volume_size": aws.Int64Value(v.Ebs.VolumeSize), + "volume_size": int(aws.Int64Value(v.Ebs.VolumeSize)), "volume_type": aws.StringValue(v.Ebs.VolumeType), } if v.Ebs.Iops != nil { @@ -654,6 +658,17 @@ func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []inte return s } +func getMonitoring(m *ec2.LaunchTemplatesMonitoring) []interface{} { + s := []interface{}{} + if m != nil { + mo := map[string]interface{}{ + "enabled": aws.BoolValue(m.Enabled), + } + s = append(s, mo) + } + return s +} + func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecification) []interface{} { s := []interface{}{} for _, v := range n { @@ -665,10 +680,10 @@ func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecifi "delete_on_termination": aws.BoolValue(v.DeleteOnTermination), "description": aws.StringValue(v.Description), "device_index": aws.Int64Value(v.DeviceIndex), + "ipv4_address_count": aws.Int64Value(v.SecondaryPrivateIpAddressCount), "ipv6_address_count": aws.Int64Value(v.Ipv6AddressCount), "network_interface_id": aws.StringValue(v.NetworkInterfaceId), "private_ip_address": aws.StringValue(v.PrivateIpAddress), - "ipv4_address_count": aws.Int64Value(v.SecondaryPrivateIpAddressCount), "subnet_id": aws.StringValue(v.SubnetId), } @@ -686,6 +701,10 @@ func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecifi networkInterface["ipv4_addresses"] = ipv4Addresses } + if len(v.Groups) > 0 { + networkInterface["security_groups"] = aws.StringValueSlice(v.Groups) + } + s = append(s, networkInterface) } return s @@ -754,6 +773,14 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.Req opts.EbsOptimized = aws.Bool(v.(bool)) } + if v, ok := d.GetOk("security_group_names"); ok { + opts.SecurityGroups = expandStringList(v.(*schema.Set).List()) + } + + if v, ok := d.GetOk("vpc_security_group_ids"); ok { + opts.SecurityGroupIds = expandStringList(v.(*schema.Set).List()) + } + if v, ok := d.GetOk("block_device_mappings"); ok { var blockDeviceMappings []*ec2.LaunchTemplateBlockDeviceMappingRequest bdms := v.([]interface{}) @@ -942,7 +969,7 @@ func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTempl networkInterface.SubnetId = aws.String(v) } - ipv6AddressList := ni["ipv6_addresses"].([]interface{}) + ipv6AddressList := ni["ipv6_addresses"].(*schema.Set).List() for _, address := range ipv6AddressList { ipv6Addresses = append(ipv6Addresses, &ec2.InstanceIpv6AddressRequest{ Ipv6Address: aws.String(address.(string)), @@ -951,7 +978,7 @@ func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTempl networkInterface.Ipv6AddressCount = aws.Int64(int64(len(ipv6AddressList))) networkInterface.Ipv6Addresses = ipv6Addresses - ipv4AddressList := ni["ipv4_addresses"].([]interface{}) + ipv4AddressList := ni["ipv4_addresses"].(*schema.Set).List() for _, address := range ipv4AddressList { privateIp := &ec2.PrivateIpAddressSpecification{ Primary: aws.Bool(address.(string) == privateIpAddress), diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index 2ff0a4d7da0..61b0018e5be 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) @@ -14,6 +15,7 @@ import ( func TestAccAWSLaunchTemplate_basic(t *testing.T) { var template ec2.LaunchTemplate resName := "aws_launch_template.foo" + rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,7 +23,7 @@ func TestAccAWSLaunchTemplate_basic(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchTemplateConfig_basic, + Config: testAccAWSLaunchTemplateConfig_basic(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchTemplateExists(resName, &template), resource.TestCheckResourceAttr(resName, "default_version", "1"), @@ -35,6 +37,7 @@ func TestAccAWSLaunchTemplate_basic(t *testing.T) { func TestAccAWSLaunchTemplate_data(t *testing.T) { var template ec2.LaunchTemplate resName := "aws_launch_template.foo" + rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -42,7 +45,7 @@ func TestAccAWSLaunchTemplate_data(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchTemplateConfig_data, + Config: testAccAWSLaunchTemplateConfig_data(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchTemplateExists(resName, &template), resource.TestCheckResourceAttr(resName, "block_device_mappings.#", "1"), @@ -71,6 +74,7 @@ func TestAccAWSLaunchTemplate_data(t *testing.T) { func TestAccAWSLaunchTemplate_update(t *testing.T) { var template ec2.LaunchTemplate resName := "aws_launch_template.foo" + rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -78,7 +82,7 @@ func TestAccAWSLaunchTemplate_update(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchTemplateConfig_basic, + Config: testAccAWSLaunchTemplateConfig_basic(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchTemplateExists(resName, &template), resource.TestCheckResourceAttr(resName, "default_version", "1"), @@ -86,7 +90,7 @@ func TestAccAWSLaunchTemplate_update(t *testing.T) { ), }, { - Config: testAccAWSLaunchTemplateConfig_data, + Config: testAccAWSLaunchTemplateConfig_data(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchTemplateExists(resName, &template), resource.TestCheckResourceAttr(resName, "default_version", "1"), @@ -156,15 +160,18 @@ func testAccCheckAWSLaunchTemplateDestroy(s *terraform.State) error { return nil } -const testAccAWSLaunchTemplateConfig_basic = ` +func testAccAWSLaunchTemplateConfig_basic(rInt int) string { + return fmt.Sprintf(` resource "aws_launch_template" "foo" { - name = "foo" + name = "foo_%d" +} +`, rInt) } -` -const testAccAWSLaunchTemplateConfig_data = ` +func testAccAWSLaunchTemplateConfig_data(rInt int) string { + return fmt.Sprintf(` resource "aws_launch_template" "foo" { - name = "foo" + name = "foo_%d" block_device_mappings { device_name = "test" @@ -215,7 +222,7 @@ resource "aws_launch_template" "foo" { ram_disk_id = "ari-a12bc3de" - vpc_security_group_ids = ["test"] + vpc_security_group_ids = ["sg-12a3b45c"] tag_specifications { resource_type = "instance" @@ -224,4 +231,5 @@ resource "aws_launch_template" "foo" { } } } -` +`, rInt) +} diff --git a/website/docs/r/launch_template.html.markdown b/website/docs/r/launch_template.html.markdown index 25b39af8901..48527b40a7a 100644 --- a/website/docs/r/launch_template.html.markdown +++ b/website/docs/r/launch_template.html.markdown @@ -233,3 +233,11 @@ The following attributes are exported along with all argument references: * `id` - The ID of the launch template. * `default_version` - The default version of the launch template. * `latest_version` - The latest version of the launch template. + +## Import + +Launch Templates can be imported using the `id`, e.g. + +``` +$ terraform import aws_launch_template.web lt-12345678 +``` \ No newline at end of file From f511acf22d260b61734934c0127491bc6b48df6a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 15:33:11 -0400 Subject: [PATCH 0590/3316] tests/resource/aws_db_instance: Ignore password import issue in TestAccAWSDBInstance_cloudwatchLogsExportConfiguration --- aws/resource_aws_db_instance_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index 0b249d8e76c..39078bca397 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -515,9 +515,10 @@ func TestAccAWSDBInstance_cloudwatchLogsExportConfiguration(t *testing.T) { ), }, { - ResourceName: "aws_db_instance.bar", - ImportState: true, - ImportStateVerify: true, + ResourceName: "aws_db_instance.bar", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"password"}, }, }, }) From 8f7821db2f0f47135b27e3bd7798f6f1d8697208 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 15:50:07 -0400 Subject: [PATCH 0591/3316] Update CHANGELOG for #4083 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4bc970566..d5e7505e4ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ENHANCEMENTS: * resource/aws_db_option_group: Support option version argument [GH-2590] * resource/aws_ecs_service: Support ServiceRegistries [GH-3906] * resource/aws_iam_service_linked_role: Support `custom_suffix` and `description` arguments [GH-4188] +* resource/aws_service_discovery_service: Support `health_check_custom_config` argument [GH-4083] * resource/aws_spot_fleet_request: Support configurable delete timeout [GH-3940] * resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] * resource/aws_waf_rate_based_rule: Support `RegexMatch` predicate type [GH-4069] From 693e75f607cce94a95f8bd40a9d0f9d2a7046ffc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 15:55:15 -0400 Subject: [PATCH 0592/3316] Update CHANGELOG for #4016 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5e7505e4ef..9355030bdc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: * **New Data Source:** `aws_cloudwatch_log_group` [GH-4167] * **New Data Source:** `aws_sqs_queue` [GH-2311] * **New Resource:** `aws_directory_service_conditional_forwarder` [GH-4071] +* **New Resource:** `aws_glue_connection` [GH-4016] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] ENHANCEMENTS: From 4642cbb93e5ad923cc28b02d76b281d019aec251 Mon Sep 17 00:00:00 2001 From: kt Date: Fri, 13 Apr 2018 13:04:45 -0700 Subject: [PATCH 0593/3316] Updated provider.go to fix travis.ci build --- aws/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/provider.go b/aws/provider.go index e5b942061b9..8c6bc61c4f8 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -382,7 +382,7 @@ func Provider() terraform.ResourceProvider { "aws_glacier_vault": resourceAwsGlacierVault(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_job": resourceAwsGlueJob(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), From 0ea1b06d75d35d5c57b089d08952a184edf8ff6d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 16:22:21 -0400 Subject: [PATCH 0594/3316] Update CHANGELOG for #2927 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9355030bdc6..a9c150e4d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ FEATURES: * **New Resource:** `aws_directory_service_conditional_forwarder` [GH-4071] * **New Resource:** `aws_glue_connection` [GH-4016] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] +* **New Resource:** `aws_launch_template` [GH-2927] ENHANCEMENTS: From 48d59ff8f34f62cb32c6f7fce3113cfa50a2e9dc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 16:24:59 -0400 Subject: [PATCH 0595/3316] Update monitoring documentation --- website/docs/r/launch_template.html.markdown | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/website/docs/r/launch_template.html.markdown b/website/docs/r/launch_template.html.markdown index 48527b40a7a..65e6f5fc159 100644 --- a/website/docs/r/launch_template.html.markdown +++ b/website/docs/r/launch_template.html.markdown @@ -52,7 +52,9 @@ resource "aws_launch_template" "foo" { key_name = "test" - monitoring = true + monitoring { + enabled = true + } network_interfaces { associate_public_ip_address = true @@ -101,7 +103,7 @@ The following arguments are supported: * `instance_type` - The type of the instance. * `kernel_id` - The kernel ID. * `key_name` - The key name to use for the instance. -* `monitoring` - If `true`, the launched EC2 instance will have detailed monitoring enabled. +* `monitoring` - The monitoring option for the instance. See [Monitoring](#monitoring) below for more details. * `network_interfaces` - Customize network interfaces to be attached at instance boot time. See [Network Interfaces](#network-interfaces) below for more details. * `placement` - The placement of the instance. See [Placement](#placement) below for more details. @@ -185,6 +187,11 @@ The `spot_options` block supports the following: * `spot_instance_type` - The Spot Instance request type. Can be `one-time`, or `persistent`. * `valid_until` - The end date of the request. +### Monitoring + +The `monitoring` block supports the following: + +* `enabled` - If `true`, the launched EC2 instance will have detailed monitoring enabled. ### Network Interfaces @@ -240,4 +247,4 @@ Launch Templates can be imported using the `id`, e.g. ``` $ terraform import aws_launch_template.web lt-12345678 -``` \ No newline at end of file +``` From 9d094d1b61fcad3f5c0a8ac3d4ff76937a905a65 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 16:26:59 -0400 Subject: [PATCH 0596/3316] Provide real world values for some other example attributes --- website/docs/r/launch_template.html.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/r/launch_template.html.markdown b/website/docs/r/launch_template.html.markdown index 65e6f5fc159..93092853558 100644 --- a/website/docs/r/launch_template.html.markdown +++ b/website/docs/r/launch_template.html.markdown @@ -40,10 +40,10 @@ resource "aws_launch_template" "foo" { image_id = "ami-test" - instance_initiated_shutdown_behavior = "test" + instance_initiated_shutdown_behavior = "terminate" instance_market_options { - market_type = "test" + market_type = "spot" } instance_type = "t2.micro" @@ -61,12 +61,12 @@ resource "aws_launch_template" "foo" { } placement { - availability_zone = "test" + availability_zone = "us-west-2a" } ram_disk_id = "test" - vpc_security_group_ids = ["test"] + vpc_security_group_ids = ["sg-12345678"] tag_specifications { resource_type = "instance" From d25a227e639d770ecec3a50aaae6191d68f17c98 Mon Sep 17 00:00:00 2001 From: "Adam H. Leventhal" Date: Sun, 25 Feb 2018 05:55:29 -0800 Subject: [PATCH 0597/3316] doc updates for NLBs --- website/docs/r/ecs_service.html.markdown | 8 +++---- website/docs/r/lb.html.markdown | 28 +++++++++++++++++++----- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/website/docs/r/ecs_service.html.markdown b/website/docs/r/ecs_service.html.markdown index f7b43acedda..134d0bbdc60 100644 --- a/website/docs/r/ecs_service.html.markdown +++ b/website/docs/r/ecs_service.html.markdown @@ -31,9 +31,9 @@ resource "aws_ecs_service" "mongo" { } load_balancer { - elb_name = "${aws_elb.foo.name}" - container_name = "mongo" - container_port = 8080 + target_group_arn = "${aws_lb_target_group.foo.arn}" + container_name = "mongo" + container_port = 8080 } placement_constraints { @@ -70,7 +70,7 @@ into consideration during task placement. The maximum number of Load balancers support the following: * `elb_name` - (Required for ELB Classic) The name of the ELB (Classic) to associate with the service. -* `target_group_arn` - (Required for ALB) The ARN of the ALB target group to associate with the service. +* `target_group_arn` - (Required for modern Load Balancers) The ARN of the Load Balancer target group to associate with the service. * `container_name` - (Required) The name of the container to associate with the load balancer (as it appears in a container definition). * `container_port` - (Required) The port on the container to associate with the load balancer. diff --git a/website/docs/r/lb.html.markdown b/website/docs/r/lb.html.markdown index 67f5cb84312..814470db660 100644 --- a/website/docs/r/lb.html.markdown +++ b/website/docs/r/lb.html.markdown @@ -17,10 +17,11 @@ Provides a Load Balancer resource. ```hcl # Create a new application load balancer resource "aws_lb" "test" { - name = "test-lb-tf" - internal = false - security_groups = ["${aws_security_group.lb_sg.id}"] - subnets = ["${aws_subnet.public.*.id}"] + name = "test-lb-tf" + internal = false + load_balancer_type = "application" + security_groups = ["${aws_security_group.lb_sg.id}"] + subnets = ["${aws_subnet.public.*.id}"] enable_deletion_protection = true @@ -38,7 +39,24 @@ resource "aws_lb" "test" { ```hcl # Create a new network load balancer +resource "aws_lb" "test" { + name = "test-lb-tf" + internal = false + load_balancer_type = "network" + subnets = ["${aws_subnet.public.*.id}"] + + enable_deletion_protection = true + access_logs { + bucket = "${aws_s3_bucket.lb_logs.bucket}" + prefix = "test-lb" + enabled = true + } + + tags { + Environment = "production" + } +} ``` ## Argument Reference @@ -57,7 +75,7 @@ Terraform will autogenerate a name beginning with `tf-lb`. cannot be updated for Load Balancers of type `network`. Changing this value for load balancers of type `network` will force a recreation of the resource. * `subnet_mapping` - (Optional) A subnet mapping block as documented below. -* `idle_timeout` - (Optional) The time in seconds that the connection is allowed to be idle. Default: 60. +* `idle_timeout` - (Optional) The time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60. * `enable_deletion_protection` - (Optional) If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to `false`. * `enable_cross_zone_load_balancing` - (Optional) If true, cross-zone load balancing of the load balancer will be enabled. From 2f535f75baa6da9ba313026ff662da9b22bf8bd7 Mon Sep 17 00:00:00 2001 From: "Adam H. Leventhal" Date: Tue, 27 Feb 2018 07:41:08 -1000 Subject: [PATCH 0598/3316] review comment --- website/docs/r/ecs_service.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/ecs_service.html.markdown b/website/docs/r/ecs_service.html.markdown index 134d0bbdc60..80855442a22 100644 --- a/website/docs/r/ecs_service.html.markdown +++ b/website/docs/r/ecs_service.html.markdown @@ -70,7 +70,7 @@ into consideration during task placement. The maximum number of Load balancers support the following: * `elb_name` - (Required for ELB Classic) The name of the ELB (Classic) to associate with the service. -* `target_group_arn` - (Required for modern Load Balancers) The ARN of the Load Balancer target group to associate with the service. +* `target_group_arn` - (Required for ALB/NLB) The ARN of the Load Balancer target group to associate with the service. * `container_name` - (Required) The name of the container to associate with the load balancer (as it appears in a container definition). * `container_port` - (Required) The port on the container to associate with the load balancer. From b9bb6cc67e543ce643b3707f54a8c38b752b4526 Mon Sep 17 00:00:00 2001 From: "Adam H. Leventhal" Date: Sat, 7 Apr 2018 21:43:45 -0700 Subject: [PATCH 0599/3316] fixed access_logs --- website/docs/r/lb.html.markdown | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/website/docs/r/lb.html.markdown b/website/docs/r/lb.html.markdown index 814470db660..c66fbe1fc99 100644 --- a/website/docs/r/lb.html.markdown +++ b/website/docs/r/lb.html.markdown @@ -47,12 +47,6 @@ resource "aws_lb" "test" { enable_deletion_protection = true - access_logs { - bucket = "${aws_s3_bucket.lb_logs.bucket}" - prefix = "test-lb" - enabled = true - } - tags { Environment = "production" } @@ -70,7 +64,7 @@ Terraform will autogenerate a name beginning with `tf-lb`. * `internal` - (Optional) If true, the LB will be internal. * `load_balancer_type` - (Optional) The type of load balancer to create. Possible values are `application` or `network`. The default value is `application`. * `security_groups` - (Optional) A list of security group IDs to assign to the LB. Only valid for Load Balancers of type `application`. -* `access_logs` - (Optional) An Access Logs block. Access Logs documented below. +* `access_logs` - (Optional) An Access Logs block. Access Logs documented below. Only valid for Load Balancers of type `application`. * `subnets` - (Optional) A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type `network`. Changing this value for load balancers of type `network` will force a recreation of the resource. From 748b844f029f1df3e1696a05c0ba3190a475e888 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 16:59:55 -0400 Subject: [PATCH 0600/3316] Update CHANGELOG for #4111 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c150e4d23..c99b1b6e285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: * data-source/aws_iam_server_certificate: Filter by `path_prefix` [GH-3801] * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] +* resource/aws_db_instance: Support `enabled_cloudwatch_logs_exports` argument [GH-4111] * resource/aws_db_option_group: Support option version argument [GH-2590] * resource/aws_ecs_service: Support ServiceRegistries [GH-3906] * resource/aws_iam_service_linked_role: Support `custom_suffix` and `description` arguments [GH-4188] From 25a4c009ae56f849238bd78e54754df4e1701849 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 17:05:39 -0400 Subject: [PATCH 0601/3316] Update CHANGELOG for #4028 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c99b1b6e285..1ab839a3dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ FEATURES: * **New Data Source:** `aws_sqs_queue` [GH-2311] * **New Resource:** `aws_directory_service_conditional_forwarder` [GH-4071] * **New Resource:** `aws_glue_connection` [GH-4016] +* **New Resource:** `aws_glue_job` [GH-4028] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] * **New Resource:** `aws_launch_template` [GH-2927] From 035b4dae6ee4981fc6283163638d2d2688c61bd7 Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Fri, 13 Apr 2018 14:39:38 -0700 Subject: [PATCH 0602/3316] Add policy field to api_gteway --- aws/resource_aws_api_gateway_rest_api.go | 23 +++++++++++++++++++ aws/resource_aws_api_gateway_rest_api_test.go | 18 ++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index 377b631306a..7418fad71cd 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -32,6 +32,14 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { Optional: true, }, + "policy": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ValidateFunc: validateIAMPolicyJson, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + }, + "binary_media_types": { Type: schema.TypeList, Optional: true, @@ -72,9 +80,15 @@ func resourceAwsApiGatewayRestApiCreate(d *schema.ResourceData, meta interface{} description = aws.String(d.Get("description").(string)) } + var policy *string + if d.Get("policy").(string) != "" { + policy = aws.String(d.Get("policy").(string)) + } + params := &apigateway.CreateRestApiInput{ Name: aws.String(d.Get("name").(string)), Description: description, + Policy: policy, } binaryMediaTypes, binaryMediaTypesOk := d.GetOk("binary_media_types") @@ -151,6 +165,7 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) d.Set("name", api.Name) d.Set("description", api.Description) + d.Set("policy", api.Policy) d.Set("binary_media_types", api.BinaryMediaTypes) if api.MinimumCompressionSize == nil { d.Set("minimum_compression_size", -1) @@ -183,6 +198,14 @@ func resourceAwsApiGatewayRestApiUpdateOperations(d *schema.ResourceData) []*api }) } + if d.HasChange("policy") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/policy"), + Value: aws.String(d.Get("policy").(string)), + }) + } + if d.HasChange("minimum_compression_size") { minimumCompressionSize := d.Get("minimum_compression_size").(int) var value string diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 343f0704cac..e48fa1d7c71 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -93,6 +93,7 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPIMinimumCompressionSizeAttribute(&conf, 0), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "bar"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", ""), + resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", ""), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "minimum_compression_size", "0"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), resource.TestCheckNoResourceAttr("aws_api_gateway_rest_api.test", "binary_media_types"), @@ -108,6 +109,7 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPIMinimumCompressionSizeAttribute(&conf, 10485760), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "test"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", "test"), + resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "test"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "minimum_compression_size", "10485760"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "binary_media_types.#", "1"), @@ -301,7 +303,21 @@ resource "aws_api_gateway_rest_api" "test" { const testAccAWSAPIGatewayRestAPIUpdateConfig = ` resource "aws_api_gateway_rest_api" "test" { name = "test" - description = "test" + description = "test", + policy = = < Date: Fri, 13 Apr 2018 15:36:58 -0700 Subject: [PATCH 0603/3316] Revert tests --- aws/resource_aws_api_gateway_rest_api_test.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index e48fa1d7c71..3125d5b2a0f 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -304,20 +304,7 @@ const testAccAWSAPIGatewayRestAPIUpdateConfig = ` resource "aws_api_gateway_rest_api" "test" { name = "test" description = "test", - policy = = < Date: Fri, 13 Apr 2018 19:06:53 -0700 Subject: [PATCH 0604/3316] Add policy to aws_api_gateway_rest_api documentation --- website/docs/r/api_gateway_rest_api.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/r/api_gateway_rest_api.html.markdown b/website/docs/r/api_gateway_rest_api.html.markdown index cebeb71b7d0..c4c98e96045 100644 --- a/website/docs/r/api_gateway_rest_api.html.markdown +++ b/website/docs/r/api_gateway_rest_api.html.markdown @@ -28,6 +28,7 @@ The following arguments are supported: * `binary_media_types` - (Optional) The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads. * `minimum_compression_size` - (Optional) Minimum response size to compress for the REST API. Integer between -1 and 10485760 (10MB). Setting a value greater than -1 will enable compression, -1 disables compression (default). * `body` - (Optional) An OpenAPI specification that defines the set of routes and integrations to create as part of the REST API. +* `policy` - (Optional) JSON formatted policy document that controls access to the API Gateway __Note__: If the `body` argument is provided, the OpenAPI specification will be used to configure the resources, methods and integrations for the Rest API. If this argument is provided, the following resources should not be managed as separate ones, as updates may cause manual resource updates to be overwritten: From 844abe1d2ca6663c3ebae3f093ef1f7322b96747 Mon Sep 17 00:00:00 2001 From: Tim Malone Date: Sat, 14 Apr 2018 22:46:25 +1000 Subject: [PATCH 0605/3316] api_gateway_usage_plan description is optional --- website/docs/r/api_gateway_usage_plan.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/api_gateway_usage_plan.html.markdown b/website/docs/r/api_gateway_usage_plan.html.markdown index e5570152368..b6a05c67c1a 100644 --- a/website/docs/r/api_gateway_usage_plan.html.markdown +++ b/website/docs/r/api_gateway_usage_plan.html.markdown @@ -64,7 +64,7 @@ The API Gateway Usage Plan argument layout is a structure composed of several su ### Top-Level Arguments * `name` - (Required) The name of the usage plan. -* `description` - (Required) The description of a usage plan. +* `description` - (Optional) The description of a usage plan. * `api_stages` - (Optional) The associated [API stages](#api-stages-arguments) of the usage plan. * `quota_settings` - (Optional) The [quota settings](#quota-settings-arguments) of the usage plan. * `throttle_settings` - (Optional) The [throttling limits](#throttling-settings-arguments) of the usage plan. From be69ac4058d6d90557000f1299c30815378661d3 Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Sat, 14 Apr 2018 10:17:59 -0400 Subject: [PATCH 0606/3316] align test config function names to convention PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178956192) --- aws/resource_aws_budgets_budget_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 87467e937a2..24f49b47c5d 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -30,7 +30,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { }, Steps: []resource.TestStep{ { - Config: testBudgetHCLBasicUseDefaults(configBasicDefaults), + Config: testAccAWSBudgetsBudgetConfig_BasicDefaults(configBasicDefaults), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), @@ -45,11 +45,11 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { }, { PlanOnly: true, - Config: testBudgetHCLWithAccountID(configBasicDefaults), + Config: testAccAWSBudgetsBudgetConfig_WithAccountID(configBasicDefaults), ExpectError: regexp.MustCompile("account_id.*" + configBasicDefaults.AccountID), }, { - Config: testBudgetHCLBasic(configBasicUpdate), + Config: testAccAWSBudgetsBudgetConfig_Basic(configBasicUpdate), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), @@ -79,7 +79,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { }, Steps: []resource.TestStep{ { - Config: testBudgetHCLPrefixUseDefaults(configBasicDefaults), + Config: testAccAWSBudgetsBudgetConfig_PrefixDefaults(configBasicDefaults), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), @@ -94,7 +94,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { }, { - Config: testBudgetHCLPrefix(configBasicUpdate), + Config: testAccAWSBudgetsBudgetConfig_Prefix(configBasicUpdate), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), @@ -294,7 +294,7 @@ func newBudgetTestConfigDefaults(name string) budgetTestConfig { } } -func testBudgetHCLWithAccountID(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_WithAccountID(budgetConfig budgetTestConfig) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { @@ -315,7 +315,7 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testBudgetHCLPrefixUseDefaults(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_PrefixDefaults(budgetConfig budgetTestConfig) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { @@ -335,7 +335,7 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testBudgetHCLPrefix(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_Prefix(budgetConfig budgetTestConfig) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { @@ -361,7 +361,7 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testBudgetHCLBasicUseDefaults(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_BasicDefaults(budgetConfig budgetTestConfig) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { @@ -381,7 +381,7 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testBudgetHCLBasic(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_Basic(budgetConfig budgetTestConfig) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { From a792b1aaac4bcc891fdb9daa87e5509747f7f13b Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Sat, 14 Apr 2018 10:27:50 -0400 Subject: [PATCH 0607/3316] adjust documentations to match nameing convention --- website/aws.erb | 6 +++--- .../{budget.html.markdown => budgets_budget.html.markdown} | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename website/docs/r/{budget.html.markdown => budgets_budget.html.markdown} (93%) diff --git a/website/aws.erb b/website/aws.erb index cb766d3f7f6..b40eb684207 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -403,11 +403,11 @@ - > + > Budget Resources diff --git a/website/docs/r/budget.html.markdown b/website/docs/r/budgets_budget.html.markdown similarity index 93% rename from website/docs/r/budget.html.markdown rename to website/docs/r/budgets_budget.html.markdown index 6bce23aedeb..8f090c07634 100644 --- a/website/docs/r/budget.html.markdown +++ b/website/docs/r/budgets_budget.html.markdown @@ -1,14 +1,14 @@ --- layout: "aws" page_title: "AWS: aws_budgets_budget" -sidebar_current: "docs-aws-resource-budget" +sidebar_current: "docs-aws-resource-budgets-budget" description: |- - Provides a budget resource. + Provides a budgets budget resource. --- # aws_budgets_budget -Provides a budget resource. Budgets use the cost visualisation provided by Cost Explorer to show you the status of your budgets, to provide forecasts of your estimated costs, and to track your AWS usage, including your free tier usage. +Provides a budgets budget resource. Budgets use the cost visualisation provided by Cost Explorer to show you the status of your budgets, to provide forecasts of your estimated costs, and to track your AWS usage, including your free tier usage. ## Example Usage From 9034d30f8aaf82473562513167f616823ec7d7a3 Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Sat, 14 Apr 2018 10:29:11 -0400 Subject: [PATCH 0608/3316] reorder and remove dups from attributes in docs PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178957219) --- website/docs/r/budgets_budget.html.markdown | 24 ++++++--------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/website/docs/r/budgets_budget.html.markdown b/website/docs/r/budgets_budget.html.markdown index 8f090c07634..40445400a60 100644 --- a/website/docs/r/budgets_budget.html.markdown +++ b/website/docs/r/budgets_budget.html.markdown @@ -50,23 +50,6 @@ resource "aws_budgets_budget" "s3" { } ``` -## Attributes Reference - -The following attributes are exported: - -* `id` - id of resource. -* `account_id` - target account id for budget -* `name` - name of resource -* `name_prefix` - prefix for name of resource -* `budget_type` - The type of the budget. -* `cost_filters` - Map of cost filters applied to the budget. See [CostFilters](#CostFilters) for possible options. -* `cost_types` - Object containing the types of cost included in a budget. See [CostTypes](#CostTypes) for possible options. -* `limit_amount` - The amount of cost or usage being measured -* `limit_unit` - The unit of measurement used, such as dollars or GB. -* `time_period_end` - The end of the time period covered by the budget -* `time_period_start` - The start of the time period covered by the budget -* `time_unit` - The length of time until the budget resets the actual and forecasted spend. - ## Argument Reference For more detailed documentation about each argument, refer to the [AWS official @@ -86,6 +69,13 @@ The following arguments are supported: * `time_period_start` - (Required) The start of the time period covered by the budget. The start date must come before the end date. Format: `2017-01-01_12:00`. * `time_unit` - (Required) The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`. +## Attributes Reference + +The following attributes are exported: + +* `id` - id of resource. + + ### CostTypes Valid keys for `cost_types` parameter. From aeffaa405108cf235a2b859dd928e672bdebc488 Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Sat, 14 Apr 2018 10:57:51 -0700 Subject: [PATCH 0609/3316] Stashing, test still failing --- aws/resource_aws_api_gateway_rest_api_test.go | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 3125d5b2a0f..12f89bcedfd 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -92,8 +92,8 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "bar"), testAccCheckAWSAPIGatewayRestAPIMinimumCompressionSizeAttribute(&conf, 0), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "bar"), + resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:aws:iam::717754130149:user\\/dev-encryption-service-emr-user\\\"},\\\"Action\\\":\\\"execute-api:Invoke\\\",\\\"Resource\\\":\\\"arn:aws:execute-api:us-west-2:717754130149:wwo2hqsydh\\/*\\/POST\\/v1\\/encryption-service\\/password\\/change\\\"}]}"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", ""), - resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", ""), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "minimum_compression_size", "0"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), resource.TestCheckNoResourceAttr("aws_api_gateway_rest_api.test", "binary_media_types"), @@ -109,7 +109,6 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPIMinimumCompressionSizeAttribute(&conf, 10485760), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "test"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", "test"), - resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "test"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "minimum_compression_size", "10485760"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "binary_media_types.#", "1"), @@ -174,6 +173,16 @@ func testAccCheckAWSAPIGatewayRestAPINameAttribute(conf *apigateway.RestApi, nam } } +func testAccCheckAWSAPIGatewayRestAPIPolicyAttribute(conf *apigateway.RestApi, policy string) resource.TestCheckFunc { + return func(s *terraform.State) error { + if *conf.Policy != policy { + return fmt.Errorf("Wrong Policy: %q", *conf.Policy) + } + + return nil + } +} + func testAccCheckAWSAPIGatewayRestAPIDescriptionAttribute(conf *apigateway.RestApi, description string) resource.TestCheckFunc { return func(s *terraform.State) error { if *conf.Description != description { @@ -297,6 +306,21 @@ const testAccAWSAPIGatewayRestAPIConfig = ` resource "aws_api_gateway_rest_api" "test" { name = "bar" minimum_compression_size = 0 + policy = < Date: Sat, 14 Apr 2018 16:40:11 +0200 Subject: [PATCH 0610/3316] Suppress NoSuchEntity errors while detaching policies from role --- aws/resource_aws_iam_role.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index 31c0455d1ce..c5cfef9805e 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "net/url" "regexp" "time" @@ -317,7 +318,11 @@ func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { RoleName: aws.String(d.Id()), }) if err != nil { - return fmt.Errorf("Error deleting IAM Role %s: %s", d.Id(), err) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] Role policy attachment (%s) was already removed from role (%s)", aws.StringValue(parn), d.Id()) + } else { + return fmt.Errorf("Error deleting IAM Role %s: %s", d.Id(), err) + } } } } @@ -342,7 +347,11 @@ func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { RoleName: aws.String(d.Id()), }) if err != nil { - return fmt.Errorf("Error deleting inline policy of IAM Role %s: %s", d.Id(), err) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] Inline role policy (%s) was already removed from role (%s)", aws.StringValue(pname), d.Id()) + } else { + return fmt.Errorf("Error deleting inline policy of IAM Role %s: %s", d.Id(), err) + } } } } From 589c58d5503e4b75c4398afb8e04a5b1fe8b973a Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Sat, 14 Apr 2018 19:49:04 +0100 Subject: [PATCH 0611/3316] Fix spot instance stop interrupt behaviour --- aws/resource_aws_spot_instance_request.go | 13 +++++- ...resource_aws_spot_instance_request_test.go | 43 +++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index dade165e4fc..41e608728c1 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSpotInstanceRequest() *schema.Resource { @@ -81,8 +82,12 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { s["instance_interruption_behaviour"] = &schema.Schema{ Type: schema.TypeString, Optional: true, - Default: "terminate", + Default: ec2.InstanceInterruptionBehaviorTerminate, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.InstanceInterruptionBehaviorTerminate, + ec2.InstanceInterruptionBehaviorStop, + }, false), } return s }(), @@ -115,7 +120,6 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface ImageId: instanceOpts.ImageID, InstanceType: instanceOpts.InstanceType, KeyName: instanceOpts.KeyName, - Placement: instanceOpts.SpotPlacement, SecurityGroupIds: instanceOpts.SecurityGroupIDs, SecurityGroups: instanceOpts.SecurityGroups, SubnetId: instanceOpts.SubnetID, @@ -132,6 +136,11 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface spotOpts.LaunchGroup = aws.String(v.(string)) } + // Placement GroupName can only be specified when instanceInterruptionBehavior is not set to 'stop' + if v, exists := d.GetOkExists("instance_interruption_behaviour"); v.(string) == ec2.InstanceInterruptionBehaviorTerminate || !exists { + spotOpts.LaunchSpecification.Placement = instanceOpts.SpotPlacement + } + // Make the spot instance request log.Printf("[DEBUG] Requesting spot bid opts: %s", spotOpts) diff --git a/aws/resource_aws_spot_instance_request_test.go b/aws/resource_aws_spot_instance_request_test.go index 5d096abb627..c01d66ba938 100644 --- a/aws/resource_aws_spot_instance_request_test.go +++ b/aws/resource_aws_spot_instance_request_test.go @@ -389,6 +389,31 @@ func testAccCheckAWSSpotInstanceRequestAttributesVPC( } } +func TestAccAWSSpotInstanceRequestStopInterrupt(t *testing.T) { + var sir ec2.SpotInstanceRequest + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotInstanceRequestStopInterruptConfig(), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSpotInstanceRequestExists( + "aws_spot_instance_request.foo", &sir), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_bid_status", "fulfilled"), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_request_state", "active"), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "instance_interruption_behaviour", "stop"), + ), + }, + }, + }) +} + func testAccAWSSpotInstanceRequestConfig(rInt int) string { return fmt.Sprintf(` resource "aws_key_pair" "debugging" { @@ -589,3 +614,21 @@ func testAccAWSSpotInstanceRequestConfig_getPasswordData(rInt int) string { } `, rInt) } + +func testAccAWSSpotInstanceRequestStopInterruptConfig() string { + return fmt.Sprintf(` + resource "aws_spot_instance_request" "foo" { + ami = "ami-19e92861" + instance_type = "m3.medium" + + // base price is $0.067 hourly, so bidding above that should theoretically + // always fulfill + spot_price = "0.07" + + // we wait for fulfillment because we want to inspect the launched instance + // and verify termination behavior + wait_for_fulfillment = true + + instance_interruption_behaviour = "stop" + }`) +} From b2f42c95637c5b86ddf30742fb95680a67d5ea97 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Sat, 14 Apr 2018 20:05:02 +0100 Subject: [PATCH 0612/3316] Allow hibernation of spot instances when interrupted HIbernating instances requires c3/c4/c5/m4/m5/r3/r4 instance types so we need to bump the instance size to a c5.large which is the cheapest instance out of those families. --- aws/resource_aws_spot_instance_request.go | 3 +- ...resource_aws_spot_instance_request_test.go | 37 ++++++++++++++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index 41e608728c1..73aa7baefb8 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -87,6 +87,7 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ ec2.InstanceInterruptionBehaviorTerminate, ec2.InstanceInterruptionBehaviorStop, + ec2.InstanceInterruptionBehaviorHibernate, }, false), } return s @@ -136,7 +137,7 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface spotOpts.LaunchGroup = aws.String(v.(string)) } - // Placement GroupName can only be specified when instanceInterruptionBehavior is not set to 'stop' + // Placement GroupName can only be specified when instanceInterruptionBehavior is not set or set to 'terminate' if v, exists := d.GetOkExists("instance_interruption_behaviour"); v.(string) == ec2.InstanceInterruptionBehaviorTerminate || !exists { spotOpts.LaunchSpecification.Placement = instanceOpts.SpotPlacement } diff --git a/aws/resource_aws_spot_instance_request_test.go b/aws/resource_aws_spot_instance_request_test.go index c01d66ba938..3b9bad1e8d7 100644 --- a/aws/resource_aws_spot_instance_request_test.go +++ b/aws/resource_aws_spot_instance_request_test.go @@ -389,7 +389,7 @@ func testAccCheckAWSSpotInstanceRequestAttributesVPC( } } -func TestAccAWSSpotInstanceRequestStopInterrupt(t *testing.T) { +func TestAccAWSSpotInstanceRequestInterruptStop(t *testing.T) { var sir ec2.SpotInstanceRequest resource.Test(t, resource.TestCase{ @@ -398,7 +398,7 @@ func TestAccAWSSpotInstanceRequestStopInterrupt(t *testing.T) { CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSSpotInstanceRequestStopInterruptConfig(), + Config: testAccAWSSpotInstanceRequestInterruptConfig("stop"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSpotInstanceRequestExists( "aws_spot_instance_request.foo", &sir), @@ -414,6 +414,31 @@ func TestAccAWSSpotInstanceRequestStopInterrupt(t *testing.T) { }) } +func TestAccAWSSpotInstanceRequestInterruptHibernate(t *testing.T) { + var sir ec2.SpotInstanceRequest + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotInstanceRequestInterruptConfig("hibernate"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSpotInstanceRequestExists( + "aws_spot_instance_request.foo", &sir), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_bid_status", "fulfilled"), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "spot_request_state", "active"), + resource.TestCheckResourceAttr( + "aws_spot_instance_request.foo", "instance_interruption_behaviour", "hibernate"), + ), + }, + }, + }) +} + func testAccAWSSpotInstanceRequestConfig(rInt int) string { return fmt.Sprintf(` resource "aws_key_pair" "debugging" { @@ -615,11 +640,11 @@ func testAccAWSSpotInstanceRequestConfig_getPasswordData(rInt int) string { `, rInt) } -func testAccAWSSpotInstanceRequestStopInterruptConfig() string { +func testAccAWSSpotInstanceRequestInterruptConfig(interruption_behavior string) string { return fmt.Sprintf(` resource "aws_spot_instance_request" "foo" { ami = "ami-19e92861" - instance_type = "m3.medium" + instance_type = "c5.large" // base price is $0.067 hourly, so bidding above that should theoretically // always fulfill @@ -629,6 +654,6 @@ func testAccAWSSpotInstanceRequestStopInterruptConfig() string { // and verify termination behavior wait_for_fulfillment = true - instance_interruption_behaviour = "stop" - }`) + instance_interruption_behaviour = "%s" + }`, interruption_behavior) } From 0f9f57d035951a2a8e05abed7ec1909e7c76fad8 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Sat, 14 Apr 2018 20:11:00 +0100 Subject: [PATCH 0613/3316] Fix vet issue --- aws/resource_aws_organizations_account_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_organizations_account_test.go b/aws/resource_aws_organizations_account_test.go index b7020c40e0e..0a1525a360a 100644 --- a/aws/resource_aws_organizations_account_test.go +++ b/aws/resource_aws_organizations_account_test.go @@ -21,7 +21,7 @@ func testAccAwsOrganizationsAccount_basic(t *testing.T) { } rInt := acctest.RandInt() - name := fmt.Sprintf("tf_acctest_%s", rInt) + name := fmt.Sprintf("tf_acctest_%d", rInt) email := fmt.Sprintf("tf-acctest+%d@%s", rInt, orgsEmailDomain) resource.Test(t, resource.TestCase{ From ad8fd855c0d2a1931758352ab030f0ec3debfcef Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Sun, 15 Apr 2018 08:55:11 -0700 Subject: [PATCH 0614/3316] Adding policy, but diff failing --- aws/resource_aws_api_gateway_rest_api_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 12f89bcedfd..d0e9906bc87 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -92,7 +92,7 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "bar"), testAccCheckAWSAPIGatewayRestAPIMinimumCompressionSizeAttribute(&conf, 0), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "bar"), - resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"arn:aws:iam::717754130149:user\\/dev-encryption-service-emr-user\\\"},\\\"Action\\\":\\\"execute-api:Invoke\\\",\\\"Resource\\\":\\\"arn:aws:execute-api:us-west-2:717754130149:wwo2hqsydh\\/*\\/POST\\/v1\\/encryption-service\\/password\\/change\\\"}]}"), + resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Action\\\":\\\"execute-api:Invoke\\\",\\\"Resource\\\":\\\"*\\\"}]}"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", ""), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "minimum_compression_size", "0"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), @@ -313,10 +313,10 @@ resource "aws_api_gateway_rest_api" "test" { { "Effect": "Allow", "Principal": { - "AWS": "arn:aws:iam::717754130149:user/dev-encryption-service-emr-user" + "AWS": "*" }, "Action": "execute-api:Invoke", - "Resource": "arn:aws:execute-api:us-west-2:717754130149:wwo2hqsydh/*/POST/v1/encryption-service/password/change" + "Resource": "*" } ] } From f055976b76649cb564d9b8b2a38f446db05d067e Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Sun, 15 Apr 2018 09:54:50 -0700 Subject: [PATCH 0615/3316] Move policy to separate test case --- aws/resource_aws_api_gateway_rest_api.go | 3 +- aws/resource_aws_api_gateway_rest_api_test.go | 29 +++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index 7418fad71cd..7a08aeaef5a 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -36,7 +36,7 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { Type: schema.TypeString, Computed: true, Optional: true, - ValidateFunc: validateIAMPolicyJson, + ValidateFunc: validateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, @@ -166,6 +166,7 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) d.Set("name", api.Name) d.Set("description", api.Description) d.Set("policy", api.Policy) + d.Set("binary_media_types", api.BinaryMediaTypes) if api.MinimumCompressionSize == nil { d.Set("minimum_compression_size", -1) diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index d0e9906bc87..1a8b9155d49 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -92,7 +92,7 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "bar"), testAccCheckAWSAPIGatewayRestAPIMinimumCompressionSizeAttribute(&conf, 0), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "bar"), - resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Action\\\":\\\"execute-api:Invoke\\\",\\\"Resource\\\":\\\"*\\\"}]}"), + // resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Action\\\":\\\"execute-api:Invoke\\\",\\\"Resource\\\":\\\"*\\\"}]}"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", ""), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "minimum_compression_size", "0"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), @@ -128,6 +128,24 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { }) } +func TestAccAWSAPIGatewayRestApi_policy(t *testing.T) { + expectedPolicyText := fmt.Sprintf(`{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"*"},"Action":"execute-api:Invoke","Resource":"*"}]}`) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayRestAPIConfigWithPolicy, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", expectedPolicyText), + ), + }, + }, + }) +} + func TestAccAWSAPIGatewayRestApi_openapi(t *testing.T) { var conf apigateway.RestApi @@ -303,6 +321,13 @@ func testAccCheckAWSAPIGatewayRestAPIDestroy(s *terraform.State) error { } const testAccAWSAPIGatewayRestAPIConfig = ` +resource "aws_api_gateway_rest_api" "test" { + name = "bar" + minimum_compression_size = 0 +} +` + +const testAccAWSAPIGatewayRestAPIConfigWithPolicy = ` resource "aws_api_gateway_rest_api" "test" { name = "bar" minimum_compression_size = 0 @@ -327,7 +352,7 @@ EOF const testAccAWSAPIGatewayRestAPIUpdateConfig = ` resource "aws_api_gateway_rest_api" "test" { name = "test" - description = "test", + description = "test" binary_media_types = ["application/octet-stream"] minimum_compression_size = 10485760 } From 2e9f9ef58038e6fbe80d522004e0ce1eb534ad62 Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Sun, 15 Apr 2018 09:56:51 -0700 Subject: [PATCH 0616/3316] Remove comment --- aws/resource_aws_api_gateway_rest_api_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 1a8b9155d49..ed57f5a000d 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -92,7 +92,6 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { testAccCheckAWSAPIGatewayRestAPINameAttribute(&conf, "bar"), testAccCheckAWSAPIGatewayRestAPIMinimumCompressionSizeAttribute(&conf, 0), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "name", "bar"), - // resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Allow\\\",\\\"Principal\\\":{\\\"AWS\\\":\\\"*\\\"},\\\"Action\\\":\\\"execute-api:Invoke\\\",\\\"Resource\\\":\\\"*\\\"}]}"), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "description", ""), resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "minimum_compression_size", "0"), resource.TestCheckResourceAttrSet("aws_api_gateway_rest_api.test", "created_date"), From 6be5d966433f82ea52311ccc1cb1b67e8c634dd5 Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Sun, 15 Apr 2018 10:00:27 -0700 Subject: [PATCH 0617/3316] Remove computed attribute --- aws/resource_aws_api_gateway_rest_api.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index 7a08aeaef5a..ddc73302117 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -34,7 +34,6 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { "policy": { Type: schema.TypeString, - Computed: true, Optional: true, ValidateFunc: validateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, From df094cb537b608b879769f91b4b0e9653b017037 Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Sun, 15 Apr 2018 10:16:10 -0700 Subject: [PATCH 0618/3316] Remove unused func --- aws/resource_aws_api_gateway_rest_api_test.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index ed57f5a000d..eccb67678f2 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -190,16 +190,6 @@ func testAccCheckAWSAPIGatewayRestAPINameAttribute(conf *apigateway.RestApi, nam } } -func testAccCheckAWSAPIGatewayRestAPIPolicyAttribute(conf *apigateway.RestApi, policy string) resource.TestCheckFunc { - return func(s *terraform.State) error { - if *conf.Policy != policy { - return fmt.Errorf("Wrong Policy: %q", *conf.Policy) - } - - return nil - } -} - func testAccCheckAWSAPIGatewayRestAPIDescriptionAttribute(conf *apigateway.RestApi, description string) resource.TestCheckFunc { return func(s *terraform.State) error { if *conf.Description != description { From 8ee8a723bd03f39455f1a26df650936fe401669b Mon Sep 17 00:00:00 2001 From: Steve Hoeksema Date: Mon, 16 Apr 2018 14:49:44 +1200 Subject: [PATCH 0619/3316] Set engine version (if provided) when calling RestoreDBClusterFromSnapshot --- aws/resource_aws_rds_cluster.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 08a9b99ac0b..141d77b8c3c 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -295,6 +295,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error Tags: tags, } + if attr, ok := d.GetOk("engine_version"); ok { + opts.EngineVersion = aws.String(attr.(string)) + } + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { opts.AvailabilityZones = expandStringList(attr.List()) } From 0e1ef6696f5763ba2a735ef76862ccdc1736dbbc Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Sun, 15 Apr 2018 23:41:48 -0400 Subject: [PATCH 0620/3316] remove custom flat budget test struct - in favor of budgets.Budget PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178955760) --- aws/resource_aws_budgets_budget_test.go | 329 ++++++++++++------------ 1 file changed, 166 insertions(+), 163 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 24f49b47c5d..4d3dd69805d 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -3,12 +3,13 @@ package aws import ( "bytes" "fmt" + "reflect" "regexp" - "strconv" "testing" "text/template" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/budgets" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" @@ -17,9 +18,10 @@ import ( ) func TestAccAWSBudgetsBudget_basic(t *testing.T) { + costFilterKey := "AZ" name := fmt.Sprintf("test-budget-%d", acctest.RandInt()) configBasicDefaults := newBudgetTestConfigDefaults(name) - configBasicDefaults.AccountID = "012345678910" + accountID := "012345678910" configBasicUpdate := newBudgetTestConfigUpdate(name) resource.Test(t, resource.TestCase{ @@ -30,36 +32,36 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { }, Steps: []resource.TestStep{ { - Config: testAccAWSBudgetsBudgetConfig_BasicDefaults(configBasicDefaults), + Config: testAccAWSBudgetsBudgetConfig_BasicDefaults(configBasicDefaults, costFilterKey), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), - resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(configBasicDefaults.BudgetName)), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicDefaults.BudgetType), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", configBasicDefaults.LimitAmount), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", configBasicDefaults.LimitUnit), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicDefaults.TimePeriodStart), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicDefaults.TimePeriodEnd), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicDefaults.TimeUnit), + resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(*configBasicDefaults.BudgetName)), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicDefaults.BudgetType), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", *configBasicDefaults.BudgetLimit.Amount), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", *configBasicDefaults.BudgetLimit.Unit), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicDefaults.TimePeriod.Start.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicDefaults.TimePeriod.End.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", *configBasicDefaults.TimeUnit), ), }, { PlanOnly: true, - Config: testAccAWSBudgetsBudgetConfig_WithAccountID(configBasicDefaults), - ExpectError: regexp.MustCompile("account_id.*" + configBasicDefaults.AccountID), + Config: testAccAWSBudgetsBudgetConfig_WithAccountID(configBasicDefaults, accountID, costFilterKey), + ExpectError: regexp.MustCompile("account_id.*" + accountID), }, { - Config: testAccAWSBudgetsBudgetConfig_Basic(configBasicUpdate), + Config: testAccAWSBudgetsBudgetConfig_Basic(configBasicUpdate, costFilterKey), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), - resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(configBasicUpdate.BudgetName)), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicUpdate.BudgetType), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", configBasicUpdate.LimitAmount), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", configBasicUpdate.LimitUnit), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicUpdate.TimePeriodStart), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicUpdate.TimePeriodEnd), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicUpdate.TimeUnit), + resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(*configBasicUpdate.BudgetName)), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicUpdate.BudgetType), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", *configBasicUpdate.BudgetLimit.Amount), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", *configBasicUpdate.BudgetLimit.Unit), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicUpdate.TimePeriod.Start.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicUpdate.TimePeriod.End.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", *configBasicUpdate.TimeUnit), ), }, }, @@ -67,6 +69,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { } func TestAccAWSBudgetsBudget_prefix(t *testing.T) { + costFilterKey := "AZ" name := "test-budget-" configBasicDefaults := newBudgetTestConfigDefaults(name) configBasicUpdate := newBudgetTestConfigUpdate(name) @@ -79,39 +82,39 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { }, Steps: []resource.TestStep{ { - Config: testAccAWSBudgetsBudgetConfig_PrefixDefaults(configBasicDefaults), + Config: testAccAWSBudgetsBudgetConfig_PrefixDefaults(configBasicDefaults, costFilterKey), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), - resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(configBasicDefaults.BudgetName)), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicDefaults.BudgetType), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", configBasicDefaults.LimitAmount), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", configBasicDefaults.LimitUnit), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicDefaults.TimePeriodStart), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicDefaults.TimePeriodEnd), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicDefaults.TimeUnit), + resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(*configBasicDefaults.BudgetName)), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicDefaults.BudgetType), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", *configBasicDefaults.BudgetLimit.Amount), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", *configBasicDefaults.BudgetLimit.Unit), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicDefaults.TimePeriod.Start.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicDefaults.TimePeriod.End.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", *configBasicDefaults.TimeUnit), ), }, { - Config: testAccAWSBudgetsBudgetConfig_Prefix(configBasicUpdate), + Config: testAccAWSBudgetsBudgetConfig_Prefix(configBasicUpdate, costFilterKey), Check: resource.ComposeTestCheckFunc( testBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), - resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(configBasicUpdate.BudgetName)), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", configBasicUpdate.BudgetType), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", configBasicUpdate.LimitAmount), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", configBasicUpdate.LimitUnit), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicUpdate.TimePeriodStart), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicUpdate.TimePeriodEnd), - resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", configBasicUpdate.TimeUnit), + resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(*configBasicUpdate.BudgetName)), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicUpdate.BudgetType), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_amount", *configBasicUpdate.BudgetLimit.Amount), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "limit_unit", *configBasicUpdate.BudgetLimit.Unit), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_start", configBasicUpdate.TimePeriod.Start.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_period_end", configBasicUpdate.TimePeriod.End.Format("2006-01-02_15:04")), + resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", *configBasicUpdate.TimeUnit), ), }, }, }) } -func testBudgetExists(config budgetTestConfig, provider *schema.Provider) resource.TestCheckFunc { +func testBudgetExists(config budgets.Budget, provider *schema.Provider) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources["aws_budgets_budget.foo"] if !ok { @@ -137,73 +140,73 @@ func testBudgetExists(config budgetTestConfig, provider *schema.Provider) resour return fmt.Errorf("No budget returned %v in %v", b.Budget, b) } - if *b.Budget.BudgetLimit.Amount != config.LimitAmount { - return fmt.Errorf("budget limit incorrectly set %v != %v", config.LimitAmount, *b.Budget.BudgetLimit.Amount) + if *b.Budget.BudgetLimit.Amount != *config.BudgetLimit.Amount { + return fmt.Errorf("budget limit incorrectly set %v != %v", *config.BudgetLimit.Amount, *b.Budget.BudgetLimit.Amount) } if err := checkBudgetCostTypes(config, *b.Budget.CostTypes); err != nil { return err } - if err := checkBudgetTimePeriod(config, *b.Budget.TimePeriod); err != nil { + if err := checkBudgetTimePeriod(*config.TimePeriod, *b.Budget.TimePeriod); err != nil { return err } - if v, ok := b.Budget.CostFilters[config.FilterKey]; !ok || *v[len(v)-1] != config.FilterValue { - return fmt.Errorf("cost filter not set properly: %v", b.Budget.CostFilters) + if !reflect.DeepEqual(b.Budget.CostFilters, config.CostFilters) { + return fmt.Errorf("cost filter not set properly: %v != %v", b.Budget.CostFilters, config.CostFilters) } return nil } } -func checkBudgetTimePeriod(config budgetTestConfig, timePeriod budgets.TimePeriod) error { - if end, _ := time.Parse("2006-01-02_15:04", config.TimePeriodEnd); *timePeriod.End != end { - return fmt.Errorf("TimePeriodEnd not set properly '%v' should be '%v'", *timePeriod.End, end) +func checkBudgetTimePeriod(configTimePeriod, timePeriod budgets.TimePeriod) error { + if configTimePeriod.End.Format("2006-01-02_15:04") != timePeriod.End.Format("2006-01-02_15:04") { + return fmt.Errorf("TimePeriodEnd not set properly '%v' should be '%v'", *timePeriod.End, *configTimePeriod.End) } - if start, _ := time.Parse("2006-01-02_15:04", config.TimePeriodStart); *timePeriod.Start != start { - return fmt.Errorf("TimePeriodStart not set properly '%v' should be '%v'", *timePeriod.Start, start) + if configTimePeriod.Start.Format("2006-01-02_15:04") != timePeriod.Start.Format("2006-01-02_15:04") { + return fmt.Errorf("TimePeriodStart not set properly '%v' should be '%v'", *timePeriod.Start, *configTimePeriod.Start) } return nil } -func checkBudgetCostTypes(config budgetTestConfig, costTypes budgets.CostTypes) error { - if strconv.FormatBool(*costTypes.IncludeCredit) != config.IncludeCredit { - return fmt.Errorf("IncludeCredit not set properly '%v' should be '%v'", *costTypes.IncludeCredit, config.IncludeCredit) +func checkBudgetCostTypes(config budgets.Budget, costTypes budgets.CostTypes) error { + if *costTypes.IncludeCredit != *config.CostTypes.IncludeCredit { + return fmt.Errorf("IncludeCredit not set properly '%v' should be '%v'", *costTypes.IncludeCredit, *config.CostTypes.IncludeCredit) } - if strconv.FormatBool(*costTypes.IncludeOtherSubscription) != config.IncludeOtherSubscription { - return fmt.Errorf("IncludeOtherSubscription not set properly '%v' should be '%v'", *costTypes.IncludeOtherSubscription, config.IncludeOtherSubscription) + if *costTypes.IncludeOtherSubscription != *config.CostTypes.IncludeOtherSubscription { + return fmt.Errorf("IncludeOtherSubscription not set properly '%v' should be '%v'", *costTypes.IncludeOtherSubscription, *config.CostTypes.IncludeOtherSubscription) } - if strconv.FormatBool(*costTypes.IncludeRecurring) != config.IncludeRecurring { - return fmt.Errorf("IncludeRecurring not set properly '%v' should be '%v'", *costTypes.IncludeRecurring, config.IncludeRecurring) + if *costTypes.IncludeRecurring != *config.CostTypes.IncludeRecurring { + return fmt.Errorf("IncludeRecurring not set properly '%v' should be '%v'", *costTypes.IncludeRecurring, *config.CostTypes.IncludeRecurring) } - if strconv.FormatBool(*costTypes.IncludeRefund) != config.IncludeRefund { - return fmt.Errorf("IncludeRefund not set properly '%v' should be '%v'", *costTypes.IncludeRefund, config.IncludeRefund) + if *costTypes.IncludeRefund != *config.CostTypes.IncludeRefund { + return fmt.Errorf("IncludeRefund not set properly '%v' should be '%v'", *costTypes.IncludeRefund, *config.CostTypes.IncludeRefund) } - if strconv.FormatBool(*costTypes.IncludeSubscription) != config.IncludeSubscription { - return fmt.Errorf("IncludeSubscription not set properly '%v' should be '%v'", *costTypes.IncludeSubscription, config.IncludeSubscription) + if *costTypes.IncludeSubscription != *config.CostTypes.IncludeSubscription { + return fmt.Errorf("IncludeSubscription not set properly '%v' should be '%v'", *costTypes.IncludeSubscription, *config.CostTypes.IncludeSubscription) } - if strconv.FormatBool(*costTypes.IncludeSupport) != config.IncludeSupport { - return fmt.Errorf("IncludeSupport not set properly '%v' should be '%v'", *costTypes.IncludeSupport, config.IncludeSupport) + if *costTypes.IncludeSupport != *config.CostTypes.IncludeSupport { + return fmt.Errorf("IncludeSupport not set properly '%v' should be '%v'", *costTypes.IncludeSupport, *config.CostTypes.IncludeSupport) } - if strconv.FormatBool(*costTypes.IncludeTax) != config.IncludeTax { - return fmt.Errorf("IncludeTax not set properly '%v' should be '%v'", *costTypes.IncludeTax, config.IncludeTax) + if *costTypes.IncludeTax != *config.CostTypes.IncludeTax { + return fmt.Errorf("IncludeTax not set properly '%v' should be '%v'", *costTypes.IncludeTax, *config.CostTypes.IncludeTax) } - if strconv.FormatBool(*costTypes.IncludeUpfront) != config.IncludeUpfront { - return fmt.Errorf("IncludeUpfront not set properly '%v' should be '%v'", *costTypes.IncludeUpfront, config.IncludeUpfront) + if *costTypes.IncludeUpfront != *config.CostTypes.IncludeUpfront { + return fmt.Errorf("IncludeUpfront not set properly '%v' should be '%v'", *costTypes.IncludeUpfront, *config.CostTypes.IncludeUpfront) } - if strconv.FormatBool(*costTypes.UseBlended) != config.UseBlended { - return fmt.Errorf("UseBlended not set properly '%v' should be '%v'", *costTypes.UseBlended, config.UseBlended) + if *costTypes.UseBlended != *config.CostTypes.UseBlended { + return fmt.Errorf("UseBlended not set properly '%v' should be '%v'", *costTypes.UseBlended, *config.CostTypes.UseBlended) } return nil @@ -224,89 +227,89 @@ func testCheckBudgetDestroy(budgetName string, provider *schema.Provider) error return nil } -type budgetTestConfig struct { - AccountID string - BudgetName string - BudgetType string - LimitAmount string - LimitUnit string - IncludeCredit string - IncludeOtherSubscription string - IncludeRecurring string - IncludeRefund string - IncludeSubscription string - IncludeSupport string - IncludeTax string - IncludeUpfront string - UseBlended string - TimeUnit string - TimePeriodStart string - TimePeriodEnd string - FilterKey string - FilterValue string -} - -func newBudgetTestConfigUpdate(name string) budgetTestConfig { - dateNow := time.Now() +func newBudgetTestConfigUpdate(name string) budgets.Budget { + dateNow := time.Now().UTC() futureDate := dateNow.AddDate(0, 0, 14) - return budgetTestConfig{ - BudgetName: name, - BudgetType: "COST", - LimitAmount: "500", - LimitUnit: "USD", - FilterKey: "AZ", - FilterValue: "us-east-2", - IncludeCredit: "true", - IncludeOtherSubscription: "true", - IncludeRecurring: "true", - IncludeRefund: "true", - IncludeSubscription: "false", - IncludeSupport: "true", - IncludeTax: "false", - IncludeUpfront: "true", - UseBlended: "true", - TimeUnit: "MONTHLY", - TimePeriodStart: "2017-01-01_12:00", - TimePeriodEnd: futureDate.Format("2006-01-02_15:04"), + startDate := dateNow.AddDate(0, 0, -14) + return budgets.Budget{ + BudgetName: aws.String(name), + BudgetType: aws.String("COST"), + BudgetLimit: &budgets.Spend{ + Amount: aws.String("500"), + Unit: aws.String("USD"), + }, + CostFilters: map[string][]*string{ + "AZ": []*string{ + aws.String("us-east-2"), + }, + }, + CostTypes: &budgets.CostTypes{ + IncludeCredit: aws.Bool(true), + IncludeOtherSubscription: aws.Bool(true), + IncludeRecurring: aws.Bool(true), + IncludeRefund: aws.Bool(true), + IncludeSubscription: aws.Bool(false), + IncludeSupport: aws.Bool(true), + IncludeTax: aws.Bool(false), + IncludeUpfront: aws.Bool(true), + UseBlended: aws.Bool(true), + }, + TimeUnit: aws.String("MONTHLY"), + TimePeriod: &budgets.TimePeriod{ + End: &futureDate, + Start: &startDate, + }, } } -func newBudgetTestConfigDefaults(name string) budgetTestConfig { - return budgetTestConfig{ - BudgetName: name, - BudgetType: "COST", - LimitAmount: "100", - LimitUnit: "USD", - FilterKey: "AZ", - FilterValue: "us-east-1", - IncludeCredit: "true", - IncludeOtherSubscription: "true", - IncludeRecurring: "true", - IncludeRefund: "true", - IncludeSubscription: "true", - IncludeSupport: "true", - IncludeTax: "true", - IncludeUpfront: "true", - UseBlended: "false", - TimeUnit: "MONTHLY", - TimePeriodStart: "2017-01-01_12:00", - TimePeriodEnd: "2087-06-15_00:00", +func newBudgetTestConfigDefaults(name string) budgets.Budget { + dateNow := time.Now().UTC() + futureDate := time.Date(2087, 6, 15, 00, 0, 0, 0, time.UTC) + startDate := dateNow.AddDate(0, 0, -14) + return budgets.Budget{ + BudgetName: aws.String(name), + BudgetType: aws.String("COST"), + BudgetLimit: &budgets.Spend{ + Amount: aws.String("100"), + Unit: aws.String("USD"), + }, + CostFilters: map[string][]*string{ + "AZ": []*string{ + aws.String("us-east-1"), + }, + }, + CostTypes: &budgets.CostTypes{ + IncludeCredit: aws.Bool(true), + IncludeOtherSubscription: aws.Bool(true), + IncludeRecurring: aws.Bool(true), + IncludeRefund: aws.Bool(true), + IncludeSubscription: aws.Bool(true), + IncludeSupport: aws.Bool(true), + IncludeTax: aws.Bool(true), + IncludeUpfront: aws.Bool(true), + UseBlended: aws.Bool(false), + }, + TimeUnit: aws.String("MONTHLY"), + TimePeriod: &budgets.TimePeriod{ + End: &futureDate, + Start: &startDate, + }, } } -func testAccAWSBudgetsBudgetConfig_WithAccountID(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_WithAccountID(budgetConfig budgets.Budget, accountID, costFilterKey string) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { - account_id = "{{.AccountID}}" + account_id = "` + accountID + `" name_prefix = "{{.BudgetName}}" budget_type = "{{.BudgetType}}" - limit_amount = "{{.LimitAmount}}" - limit_unit = "{{.LimitUnit}}" - time_period_start = "{{.TimePeriodStart}}" + limit_amount = "{{.BudgetLimit.Amount}}" + limit_unit = "{{.BudgetLimit.Unit}}" + time_period_start = "{{.TimePeriod.Start.Format "2006-01-02_15:04"}}" time_unit = "{{.TimeUnit}}" cost_filters { - {{.FilterKey}} = "{{.FilterValue}}" + "` + costFilterKey + `" = "` + *budgetConfig.CostFilters[costFilterKey][0] + `" } } `)) @@ -315,18 +318,18 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testAccAWSBudgetsBudgetConfig_PrefixDefaults(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_PrefixDefaults(budgetConfig budgets.Budget, costFilterKey string) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { name_prefix = "{{.BudgetName}}" budget_type = "{{.BudgetType}}" - limit_amount = "{{.LimitAmount}}" - limit_unit = "{{.LimitUnit}}" - time_period_start = "{{.TimePeriodStart}}" + limit_amount = "{{.BudgetLimit.Amount}}" + limit_unit = "{{.BudgetLimit.Unit}}" + time_period_start = "{{.TimePeriod.Start.Format "2006-01-02_15:04"}}" time_unit = "{{.TimeUnit}}" cost_filters { - {{.FilterKey}} = "{{.FilterValue}}" + "` + costFilterKey + `" = "` + *budgetConfig.CostFilters[costFilterKey][0] + `" } } `)) @@ -335,24 +338,24 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testAccAWSBudgetsBudgetConfig_Prefix(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_Prefix(budgetConfig budgets.Budget, costFilterKey string) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { name_prefix = "{{.BudgetName}}" budget_type = "{{.BudgetType}}" - limit_amount = "{{.LimitAmount}}" - limit_unit = "{{.LimitUnit}}" + limit_amount = "{{.BudgetLimit.Amount}}" + limit_unit = "{{.BudgetLimit.Unit}}" cost_types = { - include_tax = "{{.IncludeTax}}" - include_subscription = "{{.IncludeSubscription}}" - use_blended = "{{.UseBlended}}" + include_tax = "{{.CostTypes.IncludeTax}}" + include_subscription = "{{.CostTypes.IncludeSubscription}}" + use_blended = "{{.CostTypes.UseBlended}}" } - time_period_start = "{{.TimePeriodStart}}" - time_period_end = "{{.TimePeriodEnd}}" + time_period_start = "{{.TimePeriod.Start.Format "2006-01-02_15:04"}}" + time_period_end = "{{.TimePeriod.End.Format "2006-01-02_15:04"}}" time_unit = "{{.TimeUnit}}" cost_filters { - {{.FilterKey}} = "{{.FilterValue}}" + "` + costFilterKey + `" = "` + *budgetConfig.CostFilters[costFilterKey][0] + `" } } `)) @@ -361,18 +364,18 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testAccAWSBudgetsBudgetConfig_BasicDefaults(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_BasicDefaults(budgetConfig budgets.Budget, costFilterKey string) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { name = "{{.BudgetName}}" budget_type = "{{.BudgetType}}" - limit_amount = "{{.LimitAmount}}" - limit_unit = "{{.LimitUnit}}" - time_period_start = "{{.TimePeriodStart}}" + limit_amount = "{{.BudgetLimit.Amount}}" + limit_unit = "{{.BudgetLimit.Unit}}" + time_period_start = "{{.TimePeriod.Start.Format "2006-01-02_15:04"}}" time_unit = "{{.TimeUnit}}" cost_filters { - {{.FilterKey}} = "{{.FilterValue}}" + "` + costFilterKey + `" = "` + *budgetConfig.CostFilters[costFilterKey][0] + `" } } `)) @@ -381,24 +384,24 @@ resource "aws_budgets_budget" "foo" { return doc.String() } -func testAccAWSBudgetsBudgetConfig_Basic(budgetConfig budgetTestConfig) string { +func testAccAWSBudgetsBudgetConfig_Basic(budgetConfig budgets.Budget, costFilterKey string) string { t := template.Must(template.New("t1"). Parse(` resource "aws_budgets_budget" "foo" { name = "{{.BudgetName}}" budget_type = "{{.BudgetType}}" - limit_amount = "{{.LimitAmount}}" - limit_unit = "{{.LimitUnit}}" + limit_amount = "{{.BudgetLimit.Amount}}" + limit_unit = "{{.BudgetLimit.Unit}}" cost_types = { - include_tax = "{{.IncludeTax}}" - include_subscription = "{{.IncludeSubscription}}" - use_blended = "{{.UseBlended}}" + include_tax = "{{.CostTypes.IncludeTax}}" + include_subscription = "{{.CostTypes.IncludeSubscription}}" + use_blended = "{{.CostTypes.UseBlended}}" } - time_period_start = "{{.TimePeriodStart}}" - time_period_end = "{{.TimePeriodEnd}}" + time_period_start = "{{.TimePeriod.Start.Format "2006-01-02_15:04"}}" + time_period_end = "{{.TimePeriod.End.Format "2006-01-02_15:04"}}" time_unit = "{{.TimeUnit}}" cost_filters { - {{.FilterKey}} = "{{.FilterValue}}" + "` + costFilterKey + `" = "` + *budgetConfig.CostFilters[costFilterKey][0] + `" } } `)) From c62e67234e5af1430a3852b7c40f7dd89a62a3c8 Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Sun, 15 Apr 2018 23:52:03 -0400 Subject: [PATCH 0621/3316] apply naming convention to all test functions --- aws/resource_aws_budgets_budget_test.go | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 4d3dd69805d..2363a9dd575 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -20,21 +20,21 @@ import ( func TestAccAWSBudgetsBudget_basic(t *testing.T) { costFilterKey := "AZ" name := fmt.Sprintf("test-budget-%d", acctest.RandInt()) - configBasicDefaults := newBudgetTestConfigDefaults(name) + configBasicDefaults := testAccAWSBudgetsBudgetConfigDefaults(name) accountID := "012345678910" - configBasicUpdate := newBudgetTestConfigUpdate(name) + configBasicUpdate := testAccAWSBudgetsBudgetConfigUpdate(name) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: func(s *terraform.State) error { - return testCheckBudgetDestroy(name, testAccProvider) + return testAccAWSBudgetsBudgetDestroy(name, testAccProvider) }, Steps: []resource.TestStep{ { Config: testAccAWSBudgetsBudgetConfig_BasicDefaults(configBasicDefaults, costFilterKey), Check: resource.ComposeTestCheckFunc( - testBudgetExists(configBasicDefaults, testAccProvider), + testAccAWSBudgetsBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(*configBasicDefaults.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicDefaults.BudgetType), @@ -53,7 +53,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { { Config: testAccAWSBudgetsBudgetConfig_Basic(configBasicUpdate, costFilterKey), Check: resource.ComposeTestCheckFunc( - testBudgetExists(configBasicUpdate, testAccProvider), + testAccAWSBudgetsBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(*configBasicUpdate.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicUpdate.BudgetType), @@ -71,20 +71,20 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { func TestAccAWSBudgetsBudget_prefix(t *testing.T) { costFilterKey := "AZ" name := "test-budget-" - configBasicDefaults := newBudgetTestConfigDefaults(name) - configBasicUpdate := newBudgetTestConfigUpdate(name) + configBasicDefaults := testAccAWSBudgetsBudgetConfigDefaults(name) + configBasicUpdate := testAccAWSBudgetsBudgetConfigUpdate(name) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: func(s *terraform.State) error { - return testCheckBudgetDestroy(name, testAccProvider) + return testAccAWSBudgetsBudgetDestroy(name, testAccProvider) }, Steps: []resource.TestStep{ { Config: testAccAWSBudgetsBudgetConfig_PrefixDefaults(configBasicDefaults, costFilterKey), Check: resource.ComposeTestCheckFunc( - testBudgetExists(configBasicDefaults, testAccProvider), + testAccAWSBudgetsBudgetExists(configBasicDefaults, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(*configBasicDefaults.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicDefaults.BudgetType), @@ -99,7 +99,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { { Config: testAccAWSBudgetsBudgetConfig_Prefix(configBasicUpdate, costFilterKey), Check: resource.ComposeTestCheckFunc( - testBudgetExists(configBasicUpdate, testAccProvider), + testAccAWSBudgetsBudgetExists(configBasicUpdate, testAccProvider), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(*configBasicUpdate.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicUpdate.BudgetType), @@ -114,7 +114,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { }) } -func testBudgetExists(config budgets.Budget, provider *schema.Provider) resource.TestCheckFunc { +func testAccAWSBudgetsBudgetExists(config budgets.Budget, provider *schema.Provider) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources["aws_budgets_budget.foo"] if !ok { @@ -144,11 +144,11 @@ func testBudgetExists(config budgets.Budget, provider *schema.Provider) resource return fmt.Errorf("budget limit incorrectly set %v != %v", *config.BudgetLimit.Amount, *b.Budget.BudgetLimit.Amount) } - if err := checkBudgetCostTypes(config, *b.Budget.CostTypes); err != nil { + if err := testAccAWSBudgetsBudgetCheckCostTypes(config, *b.Budget.CostTypes); err != nil { return err } - if err := checkBudgetTimePeriod(*config.TimePeriod, *b.Budget.TimePeriod); err != nil { + if err := testAccAWSBudgetsBudgetCheckTimePeriod(*config.TimePeriod, *b.Budget.TimePeriod); err != nil { return err } @@ -160,7 +160,7 @@ func testBudgetExists(config budgets.Budget, provider *schema.Provider) resource } } -func checkBudgetTimePeriod(configTimePeriod, timePeriod budgets.TimePeriod) error { +func testAccAWSBudgetsBudgetCheckTimePeriod(configTimePeriod, timePeriod budgets.TimePeriod) error { if configTimePeriod.End.Format("2006-01-02_15:04") != timePeriod.End.Format("2006-01-02_15:04") { return fmt.Errorf("TimePeriodEnd not set properly '%v' should be '%v'", *timePeriod.End, *configTimePeriod.End) } @@ -172,7 +172,7 @@ func checkBudgetTimePeriod(configTimePeriod, timePeriod budgets.TimePeriod) erro return nil } -func checkBudgetCostTypes(config budgets.Budget, costTypes budgets.CostTypes) error { +func testAccAWSBudgetsBudgetCheckCostTypes(config budgets.Budget, costTypes budgets.CostTypes) error { if *costTypes.IncludeCredit != *config.CostTypes.IncludeCredit { return fmt.Errorf("IncludeCredit not set properly '%v' should be '%v'", *costTypes.IncludeCredit, *config.CostTypes.IncludeCredit) } @@ -212,7 +212,7 @@ func checkBudgetCostTypes(config budgets.Budget, costTypes budgets.CostTypes) er return nil } -func testCheckBudgetDestroy(budgetName string, provider *schema.Provider) error { +func testAccAWSBudgetsBudgetDestroy(budgetName string, provider *schema.Provider) error { meta := provider.Meta() client := meta.(*AWSClient).budgetconn accountID := meta.(*AWSClient).accountid @@ -227,7 +227,7 @@ func testCheckBudgetDestroy(budgetName string, provider *schema.Provider) error return nil } -func newBudgetTestConfigUpdate(name string) budgets.Budget { +func testAccAWSBudgetsBudgetConfigUpdate(name string) budgets.Budget { dateNow := time.Now().UTC() futureDate := dateNow.AddDate(0, 0, 14) startDate := dateNow.AddDate(0, 0, -14) @@ -262,7 +262,7 @@ func newBudgetTestConfigUpdate(name string) budgets.Budget { } } -func newBudgetTestConfigDefaults(name string) budgets.Budget { +func testAccAWSBudgetsBudgetConfigDefaults(name string) budgets.Budget { dateNow := time.Now().UTC() futureDate := time.Date(2087, 6, 15, 00, 0, 0, 0, time.UTC) startDate := dateNow.AddDate(0, 0, -14) From 86c40f0acf5bb8e36a9e6ad2230cffabc71bb25b Mon Sep 17 00:00:00 2001 From: Vangelis Katsikaros Date: Mon, 16 Apr 2018 10:49:54 +0300 Subject: [PATCH 0622/3316] Clarify that the sentence concerns read replicas --- website/docs/r/db_instance.html.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 4dce670503a..70c79c75241 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -86,9 +86,11 @@ for more information. Default is `false`. * `db_subnet_group_name` - (Optional) Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will -be created in the `default` VPC, or in EC2 Classic, if available. It needs to be -specified only if the source database specifies an instance in another AWS Region. -See [DBSubnetGroupName in API action CreateDBInstanceReadReplica](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html) for additonal contraints. +be created in the `default` VPC, or in EC2 Classic, if available. When working +with read replicas, it needs to be specified only if the source database +specifies an instance in another AWS Region. See [DBSubnetGroupName in API +action CreateDBInstanceReadReplica](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html) +for additonal read replica contraints. * `engine` - (Required unless a `snapshot_identifier` or `replicate_source_db` is provided) The database engine to use. * `engine_version` - (Optional) The engine version to use. If `auto_minor_version_upgrade` From ac45a5442513205e1e61ce46eb930a1694a3d731 Mon Sep 17 00:00:00 2001 From: Daniel del Castillo Date: Mon, 16 Apr 2018 11:06:32 +0100 Subject: [PATCH 0623/3316] [issue-4217] Force new resource if any of the EC2 attributes has changed --- aws/resource_aws_emr_cluster.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index 0be3f0438b2..96cf7e6d710 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -100,34 +100,42 @@ func resourceAwsEMRCluster() *schema.Resource { "key_name": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "subnet_id": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "additional_master_security_groups": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "additional_slave_security_groups": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "emr_managed_master_security_group": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "emr_managed_slave_security_group": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "instance_profile": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "service_access_security_group": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, }, }, From b30d30df85013e375580d2a31b4d9fdee3730642 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 9 Apr 2018 08:17:21 +0100 Subject: [PATCH 0624/3316] website: Standalone website --- GNUmakefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index eca08ffa76f..6401ed0155c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,7 @@ SWEEP?=us-east-1,us-west-2 TEST?=./... GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) +WEBSITE_REPO="github.com/hashicorp/terraform-website" default: build @@ -46,5 +47,12 @@ test-compile: fi go test -c $(TEST) $(TESTARGS) -.PHONY: build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile +website: +ifneq (,$(wildcard "$(GOPATH)/src/$WEBSITE_REPO")) + echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." + go get $WEBSITE_REPO +endif + @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=aws + +.PHONY: build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile website From b820ca23d046ce1a4f3f9ec91e459686c14692b3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 07:55:33 -0400 Subject: [PATCH 0625/3316] Update CHANGELOG for #4209 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ab839a3dc8..0bee1bfb06c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ BUG FIXES: * resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] * resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates [GH-4194] * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] +* resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion [GH-4209] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] * resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] From 06c6df51c1e51117ae63037ebfa724d1004efcac Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 17 Apr 2018 13:05:34 +0100 Subject: [PATCH 0626/3316] make: Fix conditional + repo cloning --- GNUmakefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 6401ed0155c..dddaf450189 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,7 +1,7 @@ SWEEP?=us-east-1,us-west-2 TEST?=./... GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) -WEBSITE_REPO="github.com/hashicorp/terraform-website" +WEBSITE_REPO=github.com/hashicorp/terraform-website default: build @@ -48,9 +48,9 @@ test-compile: go test -c $(TEST) $(TESTARGS) website: -ifneq (,$(wildcard "$(GOPATH)/src/$WEBSITE_REPO")) +ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." - go get $WEBSITE_REPO + git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) endif @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=aws From 2a389d3c57e1bd9b955ea8eff365879952927d77 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 12 Apr 2018 08:43:18 +0100 Subject: [PATCH 0627/3316] make: Add website-test (link checker) --- GNUmakefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index dddaf450189..54927a75cc9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -54,5 +54,12 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) endif @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=aws -.PHONY: build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile website +website-test: +ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) + echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." + git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) +endif + @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=aws + +.PHONY: build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile website website-test From 30cc5ec17c748758087c8f5bafc5bd16e4ea9658 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 16 Apr 2018 13:03:12 +0100 Subject: [PATCH 0628/3316] Add website-test to Travis --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 83247c3b830..2fd366eaa6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ dist: trusty -sudo: false +sudo: required +services: + - docker language: go go: - 1.9.1 @@ -16,6 +18,7 @@ script: - make test - make vendor-status - make vet +- make website-test branches: only: From 35416de6f227182c305d82b2de172aa502434b0c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 08:21:01 -0400 Subject: [PATCH 0629/3316] docs/resource/aws_lb: Add example for specifying Elastic IPs --- website/docs/r/lb.html.markdown | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/website/docs/r/lb.html.markdown b/website/docs/r/lb.html.markdown index c66fbe1fc99..4eda9bcae86 100644 --- a/website/docs/r/lb.html.markdown +++ b/website/docs/r/lb.html.markdown @@ -14,8 +14,9 @@ Provides a Load Balancer resource. ## Example Usage +### Application Load Balancer + ```hcl -# Create a new application load balancer resource "aws_lb" "test" { name = "test-lb-tf" internal = false @@ -37,8 +38,9 @@ resource "aws_lb" "test" { } ``` +### Network Load Balancer + ```hcl -# Create a new network load balancer resource "aws_lb" "test" { name = "test-lb-tf" internal = false @@ -53,6 +55,25 @@ resource "aws_lb" "test" { } ``` +### Specifying Elastic IPs + +```hcl +resource "aws_lb" "example" { + name = "example" + load_balancer_type = "network" + + subnet_mapping { + subnet_id = "${aws_subnet.example1.id}" + allocation_id = "${aws_eip.example1.id}" + } + + subnet_mapping { + subnet_id = "${aws_subnet.example2.id}" + allocation_id = "${aws_eip.example2.id}" + } +} +``` + ## Argument Reference The following arguments are supported: From ba1ed64da2e01cb49d3cda56cbc778d401b0a2ed Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 08:47:04 -0400 Subject: [PATCH 0630/3316] docs/resource/aws_lambda_function: Clarify s3_bucket must be in same region to match SDK documentation --- website/docs/r/lambda_function.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/lambda_function.html.markdown b/website/docs/r/lambda_function.html.markdown index 6cc69116aba..977d86bd5f0 100644 --- a/website/docs/r/lambda_function.html.markdown +++ b/website/docs/r/lambda_function.html.markdown @@ -67,7 +67,7 @@ large files efficiently. ## Argument Reference * `filename` - (Optional) The path to the function's deployment package within the local filesystem. If defined, The `s3_`-prefixed options cannot be used. -* `s3_bucket` - (Optional) The S3 bucket location containing the function's deployment package. Conflicts with `filename`. +* `s3_bucket` - (Optional) The S3 bucket location containing the function's deployment package. Conflicts with `filename`. This bucket must reside in the same AWS region where you are creating the Lambda function. * `s3_key` - (Optional) The S3 key of an object containing the function's deployment package. Conflicts with `filename`. * `s3_object_version` - (Optional) The object version containing the function's deployment package. Conflicts with `filename`. * `function_name` - (Required) A unique name for your Lambda Function. From 62f2f699d199ce7c0b0e65eff4bab9489d8d7b13 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 09:26:25 -0400 Subject: [PATCH 0631/3316] tests/resource/aws_s3_bucket: Add nil check for LoggingEnabled --- aws/resource_aws_s3_bucket_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index a5a42e1c200..bbc67dc8194 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -1189,6 +1189,10 @@ func testAccCheckAWSS3BucketLogging(n, b, p string) resource.TestCheckFunc { return fmt.Errorf("GetBucketLogging error: %v", err) } + if out.LoggingEnabled == nil { + return fmt.Errorf("logging not enabled for bucket: %s", rs.Primary.ID) + } + tb, _ := s.RootModule().Resources[b] if v := out.LoggingEnabled.TargetBucket; v == nil { From 44485162597f1c0043f6526775754e629d15520b Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sun, 15 Apr 2018 17:01:32 +0200 Subject: [PATCH 0632/3316] add new data source cognito_user_pools --- aws/data_source_aws_cognito_user_pools.go | 77 +++++++++++++++++++ ...data_source_aws_cognito_user_pools_test.go | 51 ++++++++++++ aws/provider.go | 1 + website/aws.erb | 3 + website/docs/d/cognito_user_pools.markdown | 39 ++++++++++ 5 files changed, 171 insertions(+) create mode 100644 aws/data_source_aws_cognito_user_pools.go create mode 100644 aws/data_source_aws_cognito_user_pools_test.go create mode 100644 website/docs/d/cognito_user_pools.markdown diff --git a/aws/data_source_aws_cognito_user_pools.go b/aws/data_source_aws_cognito_user_pools.go new file mode 100644 index 00000000000..f365e0987c8 --- /dev/null +++ b/aws/data_source_aws_cognito_user_pools.go @@ -0,0 +1,77 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsCognitoUserPools() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsCognitoUserPoolsRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsCognitoUserPoolsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + name := d.Get("name").(string) + var ids []string + + pools, err := getAllCognitoUserPools(conn) + if err != nil { + return fmt.Errorf("Error listing cognito user pools: %s", err) + } + for _, pool := range pools { + if name == aws.StringValue(pool.Name) { + ids = append(ids, aws.StringValue(pool.Id)) + } + } + + if len(ids) == 0 { + return fmt.Errorf("No cognito user pool found with name: %s", name) + } + + d.SetId(name) + d.Set("ids", ids) + return nil +} + +func getAllCognitoUserPools(conn *cognitoidentityprovider.CognitoIdentityProvider) ([]*cognitoidentityprovider.UserPoolDescriptionType, error) { + var pools []*cognitoidentityprovider.UserPoolDescriptionType + var nextToken string + + for { + input := &cognitoidentityprovider.ListUserPoolsInput{ + // MaxResults Valid Range: Minimum value of 1. Maximum value of 60 + MaxResults: aws.Int64(int64(60)), + } + if nextToken != "" { + input.NextToken = aws.String(nextToken) + } + out, err := conn.ListUserPools(input) + if err != nil { + return pools, err + } + pools = append(pools, out.UserPools...) + + if out.NextToken == nil { + break + } + nextToken = aws.StringValue(out.NextToken) + } + + return pools, nil +} diff --git a/aws/data_source_aws_cognito_user_pools_test.go b/aws/data_source_aws_cognito_user_pools_test.go new file mode 100644 index 00000000000..2e49cbbb1d8 --- /dev/null +++ b/aws/data_source_aws_cognito_user_pools_test.go @@ -0,0 +1,51 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAwsCognitoUserPools_basic(t *testing.T) { + rName := fmt.Sprintf("tf_acc_ds_cognito_user_pools_%s", acctest.RandString(7)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsCognitoUserPoolsConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_cognito_user_pools.selected", "ids.#", "3"), + ), + }, + { + Config: testAccDataSourceAwsCognitoUserPoolsConfig_notFound(rName), + ExpectError: regexp.MustCompile(`No cognito user pool found with name:`), + }, + }, + }) +} + +func testAccDataSourceAwsCognitoUserPoolsConfig_basic(rName string) string { + return fmt.Sprintf(` +resource "aws_cognito_user_pool" "main" { + count = 3 + name = "%s" +} + +data "aws_cognito_user_pools" "selected" { + name = "${aws_cognito_user_pool.main.*.name[0]}" +} +`, rName) +} + +func testAccDataSourceAwsCognitoUserPoolsConfig_notFound(rName string) string { + return fmt.Sprintf(` +data "aws_cognito_user_pools" "selected" { + name = "%s-not-found" +} +`, rName) +} diff --git a/aws/provider.go b/aws/provider.go index 270a23f0a5b..f704fc2f241 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -173,6 +173,7 @@ func Provider() terraform.ResourceProvider { "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), "aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), + "aws_cognito_user_pools": dataSourceAwsCognitoUserPools(), "aws_db_instance": dataSourceAwsDbInstance(), "aws_db_snapshot": dataSourceAwsDbSnapshot(), "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), diff --git a/website/aws.erb b/website/aws.erb index 05f3638a36f..6a33791d177 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -73,6 +73,9 @@ > aws_cloudwatch_log_group + > + aws_cognito_user_pools + > aws_db_instance diff --git a/website/docs/d/cognito_user_pools.markdown b/website/docs/d/cognito_user_pools.markdown new file mode 100644 index 00000000000..ebbf82fc99a --- /dev/null +++ b/website/docs/d/cognito_user_pools.markdown @@ -0,0 +1,39 @@ +--- +layout: "aws" +page_title: "AWS: aws_cognito_user_pools" +sidebar_current: "docs-aws-cognito-user-pools" +description: |- + Get list of cognito user pools. +--- + +# Data Source: aws_cognito_user_pools + +Use this data source to get a list of cognito user pools. + +## Example Usage + +```hcl +data "aws_api_gateway_rest_api" "selected" { + name = "${var.api_gateway_name}" +} + +data "aws_cognito_user_pools" "selected" { + name = "${var.cognito_user_pool_name}" +} + +resource "aws_api_gateway_authorizer" "cognito" { + name = "cognito" + type = "COGNITO_USER_POOLS" + rest_api_id = "${data.aws_api_gateway_rest_api.selected.id}" + provider_arns = ["${data.aws_cognito_user_pools.selected.ids}"] +} +``` + +## Argument Reference + +* `name` - (required) Name of the cognito user pools. Name is not a unique attribute for cognito user pool, so multiple pools might be returned with given name. + + +## Attributes Reference + +* `ids` - The list of cognito user pool ids. From fd0d5e37ed4ecef32a22972989244c74c93e4bfa Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 11:01:09 -0400 Subject: [PATCH 0633/3316] Update CHANGELOG for #1986 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bee1bfb06c..d7c33a9c273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ BUG FIXES: * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] * resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion [GH-4209] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] +* resource/aws_spot_instance_request: Fix `instance_interuption_behaviour` hibernate and stop handling with placement [GH-1986] * resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] ## 1.14.1 (April 11, 2018) From 29a75f23e19a1047fed36345c0221657cc06e49b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 11:14:13 -0400 Subject: [PATCH 0634/3316] Update CHANGELOG for #4212 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c33a9c273..e7070777450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Data Source:** `aws_api_gateway_rest_api` [GH-4172] * **New Data Source:** `aws_cloudwatch_log_group` [GH-4167] +* **New Data Source:** `aws_cognito_user_pools` [GH-4212] * **New Data Source:** `aws_sqs_queue` [GH-2311] * **New Resource:** `aws_directory_service_conditional_forwarder` [GH-4071] * **New Resource:** `aws_glue_connection` [GH-4016] From c953fde30b664143c663b68c741b0a9778d4c32f Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Tue, 17 Apr 2018 09:11:35 -0700 Subject: [PATCH 0635/3316] Add tests steps for update / remove policy, condesne policy setter --- aws/resource_aws_api_gateway_rest_api.go | 23 +++++++---- aws/resource_aws_api_gateway_rest_api_test.go | 38 ++++++++++++++++++- 2 files changed, 52 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index ddc73302117..b53ecb0c18b 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "net/url" "strconv" "time" @@ -79,15 +80,13 @@ func resourceAwsApiGatewayRestApiCreate(d *schema.ResourceData, meta interface{} description = aws.String(d.Get("description").(string)) } - var policy *string - if d.Get("policy").(string) != "" { - policy = aws.String(d.Get("policy").(string)) - } - params := &apigateway.CreateRestApiInput{ Name: aws.String(d.Get("name").(string)), Description: description, - Policy: policy, + } + + if v, ok := d.GetOk("policy"); ok && v.(string) != "" { + params.Policy = aws.String(v.(string)) } binaryMediaTypes, binaryMediaTypesOk := d.GetOk("binary_media_types") @@ -164,8 +163,18 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) d.Set("name", api.Name) d.Set("description", api.Description) - d.Set("policy", api.Policy) + if api.Policy != nil { + policy, err := url.QueryUnescape(*api.Policy) + log.Printf("[DEBUG] Decoded Policy: %s", policy) + if err != nil { + return err + } + if err := d.Set("policy", policy); err != nil { + return err + } + } + log.Printf("[DEBUG] Api Policy %s", d.Get("policy")) d.Set("binary_media_types", api.BinaryMediaTypes) if api.MinimumCompressionSize == nil { d.Set("minimum_compression_size", -1) diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index eccb67678f2..51f98c2732f 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -128,8 +128,8 @@ func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { } func TestAccAWSAPIGatewayRestApi_policy(t *testing.T) { - expectedPolicyText := fmt.Sprintf(`{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"*"},"Action":"execute-api:Invoke","Resource":"*"}]}`) - + expectedPolicyText := `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"*"},"Action":"execute-api:Invoke","Resource":"*"}]}` + expectedUpdatePolicyText := `{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Principal":{"AWS":"*"},"Action":"execute-api:Invoke","Resource":"*"}]}` resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -141,6 +141,18 @@ func TestAccAWSAPIGatewayRestApi_policy(t *testing.T) { resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", expectedPolicyText), ), }, + { + Config: testAccAWSAPIGatewayRestAPIConfigUpdatePolicy, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", expectedUpdatePolicyText), + ), + }, + { + Config: testAccAWSAPIGatewayRestAPIConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_api_gateway_rest_api.test", "policy", ""), + ), + }, }, }) } @@ -338,6 +350,28 @@ EOF } ` +const testAccAWSAPIGatewayRestAPIConfigUpdatePolicy = ` +resource "aws_api_gateway_rest_api" "test" { + name = "bar" + minimum_compression_size = 0 + policy = < Date: Tue, 17 Apr 2018 13:01:58 -0400 Subject: [PATCH 0636/3316] resource/aws_cognito_user_group: Fix role_arn updates --- aws/resource_aws_cognito_user_group.go | 2 +- aws/resource_aws_cognito_user_group_test.go | 93 +++++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_cognito_user_group.go b/aws/resource_aws_cognito_user_group.go index f8f4464f004..98f9748ff3e 100644 --- a/aws/resource_aws_cognito_user_group.go +++ b/aws/resource_aws_cognito_user_group.go @@ -130,7 +130,7 @@ func resourceAwsCognitoUserGroupUpdate(d *schema.ResourceData, meta interface{}) } if d.HasChange("role_arn") { - params.RoleArn = aws.String(d.Get("description").(string)) + params.RoleArn = aws.String(d.Get("role_arn").(string)) } log.Print("[DEBUG] Updating Cognito User Group") diff --git a/aws/resource_aws_cognito_user_group_test.go b/aws/resource_aws_cognito_user_group_test.go index 9ed6ef96753..6a84c759a29 100644 --- a/aws/resource_aws_cognito_user_group_test.go +++ b/aws/resource_aws_cognito_user_group_test.go @@ -75,6 +75,33 @@ func TestAccAWSCognitoUserGroup_complex(t *testing.T) { }) } +func TestAccAWSCognitoUserGroup_RoleArn(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc") + resourceName := "aws_cognito_user_group.main" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCognitoUserGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCognitoUserGroupConfig_RoleArn(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserGroupExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "role_arn"), + ), + }, + { + Config: testAccAWSCognitoUserGroupConfig_RoleArn_Updated(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserGroupExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "role_arn"), + ), + }, + }, + }) +} + func TestAccAWSCognitoUserGroup_importBasic(t *testing.T) { resourceName := "aws_cognito_user_group.main" poolName := fmt.Sprintf("tf-acc-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) @@ -218,3 +245,69 @@ resource "aws_cognito_user_group" "main" { } `, poolName, groupName, groupName, groupDescription, precedence) } + +func testAccAWSCognitoUserGroupConfig_RoleArn(rName string) string { + return fmt.Sprintf(` +resource "aws_cognito_user_pool" "main" { + name = "%[1]s" +} + +resource "aws_iam_role" "group_role" { + name = "%[1]s" + assume_role_policy = < Date: Tue, 17 Apr 2018 13:20:55 -0400 Subject: [PATCH 0637/3316] Update CHANGELOG for #4215 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7070777450..85738a66111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ BUG FIXES: * resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates [GH-4194] * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] * resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion [GH-4209] +* resource/aws_rds_cluster: Properly handle `engine_version` with `snapshot_identifier` [GH-4215] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] * resource/aws_spot_instance_request: Fix `instance_interuption_behaviour` hibernate and stop handling with placement [GH-1986] * resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] From 8448277867850cc419119a641a3cfa5520cd37f0 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Tue, 17 Apr 2018 10:27:57 -0700 Subject: [PATCH 0638/3316] Retry for 1 minute instead of 5 for IAM --- aws/resource_aws_codebuild_project.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 61f0729ae85..d22b50d4288 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -527,7 +527,7 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) // But its a slice of pointers so if not set for every update, they get removed. params.Tags = tagsFromMapCodeBuild(d.Get("tags").(map[string]interface{})) - err := resource.Retry(5*time.Minute, func() *resource.RetryError { + err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error _, err = conn.UpdateProject(params) From 0a75b7779746e367cb2e4e505ba06fcdfc9b52f6 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Tue, 17 Apr 2018 10:32:03 -0700 Subject: [PATCH 0639/3316] Revert "Retry UpdateProject similar to CreateProject since IAM is eventually consistent" This reverts commit a60862fab53ecd902734ee48e0a0f1e2c47b7c79. --- aws/resource_aws_codebuild_project.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index d05353ceb7b..53001e80e3f 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -557,22 +557,7 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) // But its a slice of pointers so if not set for every update, they get removed. params.Tags = tagsFromMapCodeBuild(d.Get("tags").(map[string]interface{})) - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - var err error - - _, err = conn.UpdateProject(params) - if err != nil { - // Work around eventual consistency of IAM - if isAWSErr(err, "InvalidInputException", "CodeBuild is not authorized to perform") { - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - - return nil - - }) + _, err := conn.UpdateProject(params) if err != nil { return fmt.Errorf( From 7bcafda1f20b56838e514e68148af11d2e3d8190 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 14:03:16 -0400 Subject: [PATCH 0640/3316] Update CHANGELOG for #4218 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85738a66111..5ff88f54bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ BUG FIXES: * resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] * resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates [GH-4194] * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] +* resource/aws_emr_cluster: Force new resource if any of the `ec2_attributes` change [GH-4218] * resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion [GH-4209] * resource/aws_rds_cluster: Properly handle `engine_version` with `snapshot_identifier` [GH-4215] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] From 7e0e05b39ea1b092a52fc899a303f44fc2377442 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 14:48:20 -0400 Subject: [PATCH 0641/3316] Update CHANGELOG for #4238 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ff88f54bf5..6f6f95d08e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] +* resource/aws_codebuild_project: Retry UpdateProject for IAM eventual consistency [GH-4238] * resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates [GH-4194] * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] * resource/aws_emr_cluster: Force new resource if any of the `ec2_attributes` change [GH-4218] From 71965bef8f91af8f575f990b0e4fb00e7c0202b1 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 17 Apr 2018 12:25:56 -0700 Subject: [PATCH 0642/3316] The replication_source_identifier argument is settable. --- website/docs/r/rds_cluster.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/r/rds_cluster.html.markdown b/website/docs/r/rds_cluster.html.markdown index 323aea3602f..af447cdad5b 100644 --- a/website/docs/r/rds_cluster.html.markdown +++ b/website/docs/r/rds_cluster.html.markdown @@ -104,6 +104,7 @@ Default: A 30-minute window selected at random from an 8-hour block of time per with the Cluster * `snapshot_identifier` - (Optional) Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. * `storage_encrypted` - (Optional) Specifies whether the DB cluster is encrypted. The default is `false` if not specified. +* `replication_source_identifier` - (Optional) ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica. * `apply_immediately` - (Optional) Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`. See [Amazon RDS Documentation for more information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) @@ -140,7 +141,7 @@ load-balanced across replicas * `status` - The RDS instance status * `master_username` - The master username for the database * `storage_encrypted` - Specifies whether the DB cluster is encrypted -* `replication_source_identifier` - ARN of the source DB cluster if this DB cluster is created as a Read Replica. +* `replication_source_identifier` - ARN of the source DB cluster or DB instance if this DB cluster is created as a Read Replica. * `hosted_zone_id` - The Route53 Hosted Zone ID of the endpoint [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Replication.html From a84d5213ba92ef4405f7406b9964ead3199febfd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 15:55:51 -0400 Subject: [PATCH 0643/3316] Update CHANGELOG for #4086 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f6f95d08e6..270c9bae591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ BUG FIXES: * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] * resource/aws_emr_cluster: Force new resource if any of the `ec2_attributes` change [GH-4218] * resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion [GH-4209] +* resource/aws_lb: Force new resource if any of the `subnet_mapping` attributes change [GH-4086] * resource/aws_rds_cluster: Properly handle `engine_version` with `snapshot_identifier` [GH-4215] * resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] * resource/aws_spot_instance_request: Fix `instance_interuption_behaviour` hibernate and stop handling with placement [GH-1986] From 1e09e14e3f95e700e16957ffbbf408d0721b1d17 Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Sun, 15 Apr 2018 11:54:29 +0200 Subject: [PATCH 0644/3316] Add aws_lambda_invoke data source --- aws/data_source_aws_lambda_invoke.go | 91 ++++++++++++++ aws/data_source_aws_lambda_invoke_test.go | 134 +++++++++++++++++++++ aws/provider.go | 1 + aws/test-fixtures/lambda_invoke.js | 6 + aws/test-fixtures/lambda_invoke.zip | Bin 0 -> 282 bytes website/docs/d/lambda_invoke.html.markdown | 45 +++++++ 6 files changed, 277 insertions(+) create mode 100644 aws/data_source_aws_lambda_invoke.go create mode 100644 aws/data_source_aws_lambda_invoke_test.go create mode 100644 aws/test-fixtures/lambda_invoke.js create mode 100644 aws/test-fixtures/lambda_invoke.zip create mode 100644 website/docs/d/lambda_invoke.html.markdown diff --git a/aws/data_source_aws_lambda_invoke.go b/aws/data_source_aws_lambda_invoke.go new file mode 100644 index 00000000000..d332a446c73 --- /dev/null +++ b/aws/data_source_aws_lambda_invoke.go @@ -0,0 +1,91 @@ +package aws + +import ( + "crypto/md5" + "encoding/json" + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/lambda" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsLambdaInvoke() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsLambdaInvokeRead, + + Schema: map[string]*schema.Schema{ + "function_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "qualifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "$LATEST", + }, + + "input": { + Type: schema.TypeMap, + Required: true, + ForceNew: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + + "result": { + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + } +} + +func dataSourceAwsLambdaInvokeRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).lambdaconn + + functionName := d.Get("function_name").(string) + qualifier := d.Get("qualifier").(string) + + payload, err := json.Marshal(d.Get("input")) + + if err != nil { + return err + } + + res, err := conn.Invoke(&lambda.InvokeInput{ + FunctionName: aws.String(functionName), + InvocationType: aws.String(lambda.InvocationTypeRequestResponse), + Payload: payload, + Qualifier: aws.String(qualifier), + }) + + if err != nil { + return err + } + + if res.FunctionError != nil { + return fmt.Errorf("Lambda function (%s) returned error: (%s)", functionName, string(res.Payload)) + } + + var result map[string]interface{} + + if err = json.Unmarshal(res.Payload, &result); err != nil { + return err + } + + if err = d.Set("result", result); err != nil { + return fmt.Errorf("Lambda function (%s) returned invalid JSON: %s", functionName, err) + } + + d.SetId(fmt.Sprintf("%s_%s_%x", functionName, qualifier, md5.Sum(payload))) + + return nil +} diff --git a/aws/data_source_aws_lambda_invoke_test.go b/aws/data_source_aws_lambda_invoke_test.go new file mode 100644 index 00000000000..5a5138a5c02 --- /dev/null +++ b/aws/data_source_aws_lambda_invoke_test.go @@ -0,0 +1,134 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAwsLambdaInvoke_basic(t *testing.T) { + testData := "value3" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsLambdaInvoke_basic_config("tf-test-lambda-role", "tf-test-lambda-invoke", testData), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.%", "3"), + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.key1", "value1"), + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.key2", "value2"), + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.key3", testData), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsLambdaInvoke_qualifier(t *testing.T) { + testData := "value3" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsLambdaInvoke_qualifier_config("tf-test-lambda-role-qualifier", "tf-test-lambda-invoke-qualifier", testData), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.%", "3"), + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.key1", "value1"), + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.key2", "value2"), + resource.TestCheckResourceAttr("data.aws_lambda_invoke.invoke_test", "result.key3", testData), + ), + }, + }, + }) +} + +func testAccDataSourceAwsLambdaInvoke_base_config(roleName string) string { + return fmt.Sprintf(` +data "aws_iam_policy_document" "lambda_assume_role_policy" { + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + + principals { + type = "Service" + identifiers = ["lambda.amazonaws.com"] + } + } +} + +resource "aws_iam_role" "lambda_role" { + name = "%s" + assume_role_policy = "${data.aws_iam_policy_document.lambda_assume_role_policy.json}" +} + +resource "aws_iam_role_policy_attachment" "lambda_role_policy" { + policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + role = "${aws_iam_role.lambda_role.name}" +} +`, roleName) +} + +func testAccDataSourceAwsLambdaInvoke_basic_config(roleName, lambdaName, testData string) string { + return fmt.Sprintf(testAccDataSourceAwsLambdaInvoke_base_config(roleName)+` +resource "aws_lambda_function" "lambda" { + depends_on = ["aws_iam_role_policy_attachment.lambda_role_policy"] + + filename = "test-fixtures/lambda_invoke.zip" + function_name = "%s" + role = "${aws_iam_role.lambda_role.arn}" + handler = "lambda_invoke.handler" + runtime = "nodejs8.10" + + environment { + variables = { + TEST_DATA = "%s" + } + } +} + +data "aws_lambda_invoke" "invoke_test" { + function_name = "${aws_lambda_function.lambda.function_name}" + + input { + key1 = "value1" + key2 = "value2" + } +} +`, lambdaName, testData) +} + +func testAccDataSourceAwsLambdaInvoke_qualifier_config(roleName, lambdaName, testData string) string { + return fmt.Sprintf(testAccDataSourceAwsLambdaInvoke_base_config(roleName)+` +resource "aws_lambda_function" "lambda" { + depends_on = ["aws_iam_role_policy_attachment.lambda_role_policy"] + + filename = "test-fixtures/lambda_invoke.zip" + function_name = "%s" + role = "${aws_iam_role.lambda_role.arn}" + handler = "lambda_invoke.handler" + runtime = "nodejs8.10" + publish = true + + environment { + variables = { + TEST_DATA = "%s" + } + } +} + +data "aws_lambda_invoke" "invoke_test" { + function_name = "${aws_lambda_function.lambda.function_name}" + qualifier = "${aws_lambda_function.lambda.version}" + + input { + key1 = "value1" + key2 = "value2" + } +} +`, lambdaName, testData) +} diff --git a/aws/provider.go b/aws/provider.go index 270a23f0a5b..9a47bd361a3 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -211,6 +211,7 @@ func Provider() terraform.ResourceProvider { "aws_kms_ciphertext": dataSourceAwsKmsCiphertext(), "aws_kms_key": dataSourceAwsKmsKey(), "aws_kms_secret": dataSourceAwsKmsSecret(), + "aws_lambda_invoke": dataSourceAwsLambdaInvoke(), "aws_nat_gateway": dataSourceAwsNatGateway(), "aws_network_interface": dataSourceAwsNetworkInterface(), "aws_partition": dataSourceAwsPartition(), diff --git a/aws/test-fixtures/lambda_invoke.js b/aws/test-fixtures/lambda_invoke.js new file mode 100644 index 00000000000..abc0191f982 --- /dev/null +++ b/aws/test-fixtures/lambda_invoke.js @@ -0,0 +1,6 @@ +exports.handler = async (event) => { + if (process.env.TEST_DATA) { + event.key3 = process.env.TEST_DATA; + } + return event; +} diff --git a/aws/test-fixtures/lambda_invoke.zip b/aws/test-fixtures/lambda_invoke.zip new file mode 100644 index 0000000000000000000000000000000000000000..aa3dd9a9f336f74b43d7a3200161cd6daec308b9 GIT binary patch literal 282 zcmWIWW@Zs#U|`^2&`g=&BR_wSb_$T!1H=LhG7LG1xk)LB@tJvL`Pr#@S;e6toD9rw ztFJ`82jbESZU#n{uZ#=~U=zI8YMjv5(!6%st9>zK z!`9#x&w?15&X}FkR0IaXp&L1H4(; PK4 literal 0 HcmV?d00001 diff --git a/website/docs/d/lambda_invoke.html.markdown b/website/docs/d/lambda_invoke.html.markdown new file mode 100644 index 00000000000..8fd026922ae --- /dev/null +++ b/website/docs/d/lambda_invoke.html.markdown @@ -0,0 +1,45 @@ +--- +layout: "aws" +page_title: "AWS: aws_lambda_invoke" +sidebar_current: "docs-aws-datasource-lambda-invoke" +description: |- + Invoke AWS Lambda Function as data source +--- + +# Data Source: aws_lambda_invoke + +Use this data source to invoke custom lambda functions as data source. + +~> **NOTE**: The `input` argument is JSON encoded and passed as payload to the +lambda function. All values in `input` map are converted to strings. +The lambda function is invoked with +[RequestResponse](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_RequestSyntax) +invocation type. Response of lambda must be map of primitive types (string, bool or float). + +## Example Usage + +```hcl +data "aws_lambda_invoke" "example" { + function_name = "${aws_lambda_function.lambda_function_test.function_name}" + + input { + param1 = "value1" + param2 = "value2" + } +} + +output "result" { + value = "${data.aws_lambda_invoke.result["key1"]}" +} +``` + +## Argument Reference + + * `function_name` - (Required) The name of the lambda function. + * `input` - (Required) Map of string values to send as payload to the lambda function. + * `qualifier` - (Optional) The qualifier (a.k.a version) of the lambda function. Defaults + to `$LATEST`. + +## Attributes Reference + + * `result` - A map of string values returned from the lambda invocation. From 72e0f02f81d7d6072c0e6624df1216255924d4ee Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Tue, 17 Apr 2018 22:05:32 +0200 Subject: [PATCH 0645/3316] Add d/aws_lambda_invoke link in website --- website/aws.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/aws.erb b/website/aws.erb index 05f3638a36f..ceef7bf6103 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -187,6 +187,9 @@ > aws_kms_secret + > + aws_lambda_invoke + > aws_nat_gateway From da75f28086deb15c85ad8191b37b7172658c6896 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Tue, 17 Apr 2018 13:28:08 -0700 Subject: [PATCH 0646/3316] Revert "Revert "Retry UpdateProject similar to CreateProject since IAM is eventually consistent"" This reverts commit 0a75b7779746e367cb2e4e505ba06fcdfc9b52f6, now that f-codebuild-updateproj-retry was merged. --- aws/resource_aws_codebuild_project.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 53001e80e3f..d05353ceb7b 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -557,7 +557,22 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) // But its a slice of pointers so if not set for every update, they get removed. params.Tags = tagsFromMapCodeBuild(d.Get("tags").(map[string]interface{})) - _, err := conn.UpdateProject(params) + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + var err error + + _, err = conn.UpdateProject(params) + if err != nil { + // Work around eventual consistency of IAM + if isAWSErr(err, "InvalidInputException", "CodeBuild is not authorized to perform") { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + + }) if err != nil { return fmt.Errorf( From 7b2eaf5d310ee53016aeaec3511b432e91108c4f Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Tue, 17 Apr 2018 14:48:49 -0700 Subject: [PATCH 0647/3316] Support enabling expired_object_delete_marker without days set. Enables expiring delete markers without deleting current versions --- aws/resource_aws_s3_bucket.go | 2 +- aws/resource_aws_s3_bucket_test.go | 51 ++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 235c6173fa3..c8d641c9c48 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -246,7 +246,7 @@ func resourceAwsS3Bucket() *schema.Resource { "days": { Type: schema.TypeInt, Optional: true, - ValidateFunc: validation.IntAtLeast(1), + ValidateFunc: validation.IntAtLeast(0), }, "expired_object_delete_marker": { Type: schema.TypeBool, diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index a5a42e1c200..38ae002d548 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -715,6 +715,39 @@ func TestAccAWSS3Bucket_Lifecycle(t *testing.T) { }) } +func TestAccAWSS3Bucket_LifecycleExpireMarkerOnly(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSS3BucketConfigWithLifecycleExpireMarker(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExists("aws_s3_bucket.bucket"), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.id", "id1"), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.prefix", "path1/"), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.expiration.3591068768.days", "0"), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.expiration.3591068768.date", ""), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.expiration.3591068768.expired_object_delete_marker", "true"), + ), + }, + { + Config: testAccAWSS3BucketConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExists("aws_s3_bucket.bucket"), + ), + }, + }, + }) +} + func TestAccAWSS3Bucket_Replication(t *testing.T) { rInt := acctest.RandInt() @@ -1712,6 +1745,24 @@ resource "aws_s3_bucket" "bucket" { `, randInt) } +func testAccAWSS3BucketConfigWithLifecycleExpireMarker(randInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "bucket" { + bucket = "tf-test-bucket-%d" + acl = "private" + lifecycle_rule { + id = "id1" + prefix = "path1/" + enabled = true + + expiration { + expired_object_delete_marker = "true" + } + } +} +`, randInt) +} + func testAccAWSS3BucketConfigWithVersioningLifecycle(randInt int) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { From 4442c337346266c237b95e1322cfdaa8c738cce9 Mon Sep 17 00:00:00 2001 From: Mayank Mandava Date: Tue, 17 Apr 2018 15:02:03 -0700 Subject: [PATCH 0648/3316] Fix description of 'name' for iam_policy_attachment It's not the name of the policy, but rather the name given to the attachment itself. --- website/docs/r/iam_policy_attachment.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/iam_policy_attachment.html.markdown b/website/docs/r/iam_policy_attachment.html.markdown index 414f2f4b276..e2bbcb06ef7 100644 --- a/website/docs/r/iam_policy_attachment.html.markdown +++ b/website/docs/r/iam_policy_attachment.html.markdown @@ -44,7 +44,7 @@ resource "aws_iam_policy_attachment" "test-attach" { The following arguments are supported: -* `name` (Required) - The name of the policy. This cannot be an empty string. +* `name` (Required) - The name of the attachment. This cannot be an empty string. * `users` (Optional) - The user(s) the policy should be applied to * `roles` (Optional) - The role(s) the policy should be applied to * `groups` (Optional) - The group(s) the policy should be applied to @@ -55,4 +55,4 @@ The following arguments are supported: The following attributes are exported: * `id` - The policy's ID. -* `name` - The name of the policy. +* `name` - The name of the attachment. From 9076e022a0bb0f10a81de2286e2c4fad2171a956 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 17 Apr 2018 15:33:55 -0700 Subject: [PATCH 0649/3316] Update 404 links to AWS docs. --- website/docs/r/rds_cluster.html.markdown | 2 +- website/docs/r/rds_cluster_instance.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/rds_cluster.html.markdown b/website/docs/r/rds_cluster.html.markdown index af447cdad5b..78c3866afdd 100644 --- a/website/docs/r/rds_cluster.html.markdown +++ b/website/docs/r/rds_cluster.html.markdown @@ -78,7 +78,7 @@ resource "aws_rds_cluster" "postgresql" { ## Argument Reference For more detailed documentation about each argument, refer to -the [AWS official documentation](https://docs.aws.amazon.com/AmazonRDS/latest/CommandLineReference/CLIReference-cmd-ModifyDBInstance.html). +the [AWS official documentation](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-cluster.html). The following arguments are supported: diff --git a/website/docs/r/rds_cluster_instance.html.markdown b/website/docs/r/rds_cluster_instance.html.markdown index 74a56975005..aa536741c6b 100644 --- a/website/docs/r/rds_cluster_instance.html.markdown +++ b/website/docs/r/rds_cluster_instance.html.markdown @@ -43,7 +43,7 @@ resource "aws_rds_cluster" "default" { ## Argument Reference For more detailed documentation about each argument, refer to -the [AWS official documentation](https://docs.aws.amazon.com/AmazonRDS/latest/CommandLineReference/CLIReference-cmd-ModifyDBInstance.html). +the [AWS official documentation](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html). The following arguments are supported: From 95e24891c7cbb955221b7541fddfdd953200c45e Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 17 Apr 2018 15:34:18 -0700 Subject: [PATCH 0650/3316] Add r4 instances to rds_cluster_instance. --- website/docs/r/rds_cluster_instance.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/docs/r/rds_cluster_instance.html.markdown b/website/docs/r/rds_cluster_instance.html.markdown index aa536741c6b..e7598ec451d 100644 --- a/website/docs/r/rds_cluster_instance.html.markdown +++ b/website/docs/r/rds_cluster_instance.html.markdown @@ -62,6 +62,12 @@ and memory, see [Scaling Aurora DB Instances][4]. Aurora currently - db.r3.2xlarge - db.r3.4xlarge - db.r3.8xlarge + - db.r4.large + - db.r4.xlarge + - db.r4.2xlarge + - db.r4.4xlarge + - db.r4.8xlarge + - db.r4.16xlarge * `publicly_accessible` - (Optional) Bool to control if instance is publicly accessible. Default `false`. See the documentation on [Creating DB Instances][6] for more details on controlling this property. From 680e2934279bf254fc8c31e0c0fc8902071a90fe Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 17 Apr 2018 15:34:58 -0700 Subject: [PATCH 0651/3316] Update unicode spaces to regular spaces that are scattered throughout the documentation. --- website/docs/d/elasticache_cluster.html.markdown | 4 ++-- .../docs/r/api_gateway_integration_response.html.markdown | 4 ++-- website/docs/r/default_network_acl.html.markdown | 2 +- ...elastic_beanstalk_configuration_template.html.markdown | 6 ++---- .../docs/r/elastic_beanstalk_environment.html.markdown | 8 ++++---- website/docs/r/elasticache_cluster.html.markdown | 6 +++--- .../docs/r/elasticache_replication_group.html.markdown | 6 +++--- website/docs/r/iam_server_certificate.html.markdown | 6 +++--- website/docs/r/kinesis_stream.html.markdown | 2 +- website/docs/r/lightsail_key_pair.html.markdown | 4 ++-- website/docs/r/rds_cluster.html.markdown | 2 +- website/docs/r/rds_cluster_instance.html.markdown | 5 ++--- website/docs/r/security_group_rule.html.markdown | 4 ++-- 13 files changed, 28 insertions(+), 31 deletions(-) diff --git a/website/docs/d/elasticache_cluster.html.markdown b/website/docs/d/elasticache_cluster.html.markdown index 6764941c0b6..3a9ca7e045d 100644 --- a/website/docs/d/elasticache_cluster.html.markdown +++ b/website/docs/d/elasticache_cluster.html.markdown @@ -38,14 +38,14 @@ The following attributes are exported: * `security_group_ids` – List VPC security groups associated with the cache cluster. * `parameter_group_name` – Name of the parameter group associated with this cache cluster. * `replication_group_id` - The replication group to which this cache cluster belongs. -* `maintenance_window` – Specifies the weekly time range for when maintenance +* `maintenance_window` – Specifies the weekly time range for when maintenance on the cache cluster is performed. * `snapshot_window` - The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of the cache cluster. * `snapshot_retention_limit` - The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. * `availability_zone` - The Availability Zone for the cache cluster. -* `notification_topic_arn` – An Amazon Resource Name (ARN) of an +* `notification_topic_arn` – An Amazon Resource Name (ARN) of an SNS topic that ElastiCache notifications get sent to. * `port` – The port number on which each of the cache nodes will accept connections. diff --git a/website/docs/r/api_gateway_integration_response.html.markdown b/website/docs/r/api_gateway_integration_response.html.markdown index d619d18ad3a..43f86032ce5 100644 --- a/website/docs/r/api_gateway_integration_response.html.markdown +++ b/website/docs/r/api_gateway_integration_response.html.markdown @@ -76,8 +76,8 @@ The following arguments are supported: * `http_method` - (Required) The HTTP method (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTIONS`, `ANY`) * `status_code` - (Required) The HTTP status code * `selection_pattern` - (Optional) Specifies the regular expression pattern used to choose -  an integration response based on the response from the backend. Setting this to `-` makes the integration the default one. -  If the backend is an `AWS` Lambda function, the AWS Lambda function error header is matched. + an integration response based on the response from the backend. Setting this to `-` makes the integration the default one. + If the backend is an `AWS` Lambda function, the AWS Lambda function error header is matched. For all other `HTTP` and `AWS` backends, the HTTP status code is matched. * `response_templates` - (Optional) A map specifying the templates used to transform the integration response body * `response_parameters` - (Optional) A map of response parameters that can be read from the backend response. diff --git a/website/docs/r/default_network_acl.html.markdown b/website/docs/r/default_network_acl.html.markdown index f417e030761..05c05062aa4 100644 --- a/website/docs/r/default_network_acl.html.markdown +++ b/website/docs/r/default_network_acl.html.markdown @@ -177,6 +177,6 @@ The following attributes are exported: * `vpc_id` - The ID of the associated VPC * `ingress` - Set of ingress rules * `egress` - Set of egress rules -* `subnet_ids` – IDs of associated Subnets +* `subnet_ids` – IDs of associated Subnets [aws-network-acls]: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html diff --git a/website/docs/r/elastic_beanstalk_configuration_template.html.markdown b/website/docs/r/elastic_beanstalk_configuration_template.html.markdown index b704c398964..4e0150e8c80 100644 --- a/website/docs/r/elastic_beanstalk_configuration_template.html.markdown +++ b/website/docs/r/elastic_beanstalk_configuration_template.html.markdown @@ -35,10 +35,10 @@ The following arguments are supported: * `application` – (Required) name of the application to associate with this configuration template * `description` - (Optional) Short description of the Template * `environment_id` – (Optional) The ID of the environment used with this configuration template -* `setting` – (Optional) Option settings to configure the new Environment. These +* `setting` – (Optional) Option settings to configure the new Environment. These override specific values that are set as defaults. The format is detailed below in [Option Settings](#option-settings) -* `solution_stack_name` – (Optional) A solution stack to base your Template +* `solution_stack_name` – (Optional) A solution stack to base your Template off of. Example stacks can be found in the [Amazon API documentation][1] @@ -63,5 +63,3 @@ The following attributes are exported: * `solution_stack_name` [1]: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html - - diff --git a/website/docs/r/elastic_beanstalk_environment.html.markdown b/website/docs/r/elastic_beanstalk_environment.html.markdown index 090782017c2..bd6b50ddb48 100644 --- a/website/docs/r/elastic_beanstalk_environment.html.markdown +++ b/website/docs/r/elastic_beanstalk_environment.html.markdown @@ -43,10 +43,10 @@ The following arguments are supported: * `description` - (Optional) Short description of the Environment * `tier` - (Optional) Elastic Beanstalk Environment tier. Valid values are `Worker` or `WebServer`. If tier is left blank `WebServer` will be used. -* `setting` – (Optional) Option settings to configure the new Environment. These +* `setting` – (Optional) Option settings to configure the new Environment. These override specific values that are set as defaults. The format is detailed below in [Option Settings](#option-settings) -* `solution_stack_name` – (Optional) A solution stack to base your environment +* `solution_stack_name` – (Optional) A solution stack to base your environment off of. Example stacks can be found in the [Amazon API documentation][1] * `template_name` – (Optional) The name of the Elastic Beanstalk Configuration template to use in deployment @@ -54,13 +54,13 @@ off of. Example stacks can be found in the [Amazon API documentation][1] [duration](https://golang.org/pkg/time/#ParseDuration) that Terraform should wait for an Elastic Beanstalk Environment to be in a ready state before timing out. -* `poll_interval` – The time between polling the AWS API to +* `poll_interval` – The time between polling the AWS API to check if changes have been applied. Use this to adjust the rate of API calls for any `create` or `update` action. Minimum `10s`, maximum `180s`. Omit this to use the default behavior, which is an exponential backoff * `version_label` - (Optional) The name of the Elastic Beanstalk Application Version to use in deployment. -* `tags` – (Optional) A set of tags to apply to the Environment. +* `tags` – (Optional) A set of tags to apply to the Environment. ## Option Settings diff --git a/website/docs/r/elasticache_cluster.html.markdown b/website/docs/r/elasticache_cluster.html.markdown index 643bfc1a3a9..a18a4ad459a 100644 --- a/website/docs/r/elasticache_cluster.html.markdown +++ b/website/docs/r/elasticache_cluster.html.markdown @@ -74,7 +74,7 @@ The following arguments are supported: See [Selecting a Cache Engine and Version](https://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html) in the AWS Documentation center for supported versions -* `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance +* `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` @@ -106,7 +106,7 @@ names to associate with this cache cluster `false`. See [Amazon ElastiCache Documentation for more information.][1] (Available since v0.6.0) -* `snapshot_arns` – (Optional) A single-element string list containing an +* `snapshot_arns` – (Optional) A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. Example: `arn:aws:s3:::my_bucket/snapshot1.rdb` @@ -121,7 +121,7 @@ SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retain before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. Please note that setting a `snapshot_retention_limit` is not supported on cache.t1.micro or cache.t2.* cache nodes -* `notification_topic_arn` – (Optional) An Amazon Resource Name (ARN) of an +* `notification_topic_arn` – (Optional) An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index 22eb70d8c74..c2c95ddfcb7 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -105,14 +105,14 @@ The following arguments are supported: * `subnet_group_name` - (Optional) The name of the cache subnet group to be used for the replication group. * `security_group_names` - (Optional) A list of cache security group names to associate with this replication group. * `security_group_ids` - (Optional) One or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud -* `snapshot_arns` – (Optional) A single-element string list containing an +* `snapshot_arns` – (Optional) A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. Example: `arn:aws:s3:::my_bucket/snapshot1.rdb` * `snapshot_name` - (Optional) The name of a snapshot from which to restore data into the new node group. Changing the `snapshot_name` forces a new resource. -* `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance +* `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` -* `notification_topic_arn` – (Optional) An Amazon Resource Name (ARN) of an +* `notification_topic_arn` – (Optional) An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: `arn:aws:sns:us-east-1:012345678999:my_sns_topic` * `snapshot_window` - (Optional, Redis only) The daily time range (in UTC) during which ElastiCache will diff --git a/website/docs/r/iam_server_certificate.html.markdown b/website/docs/r/iam_server_certificate.html.markdown index 6b8a6405ac2..1bef68c4d08 100644 --- a/website/docs/r/iam_server_certificate.html.markdown +++ b/website/docs/r/iam_server_certificate.html.markdown @@ -97,12 +97,12 @@ The following arguments are supported: path in this value. If omitted, Terraform will assign a random, unique name. * `name_prefix` - (Optional) Creates a unique name beginning with the specified prefix. Conflicts with `name`. -* `certificate_body` – (Required) The contents of the public key certificate in +* `certificate_body` – (Required) The contents of the public key certificate in PEM-encoded format. -* `certificate_chain` – (Optional) The contents of the certificate chain. +* `certificate_chain` – (Optional) The contents of the certificate chain. This is typically a concatenation of the PEM-encoded public key certificates of the chain. -* `private_key` – (Required) The contents of the private key in PEM-encoded format. +* `private_key` – (Required) The contents of the private key in PEM-encoded format. * `path` - (Optional) The IAM path for the server certificate. If it is not included, it defaults to a slash (/). If this certificate is for use with AWS CloudFront, the path must be in format `/cloudfront/your_path_here`. diff --git a/website/docs/r/kinesis_stream.html.markdown b/website/docs/r/kinesis_stream.html.markdown index 59b460d3e54..054056b2bbd 100644 --- a/website/docs/r/kinesis_stream.html.markdown +++ b/website/docs/r/kinesis_stream.html.markdown @@ -38,7 +38,7 @@ The following arguments are supported: * `name` - (Required) A name to identify the stream. This is unique to the AWS account and region the Stream is created in. -* `shard_count` – (Required) The number of shards that the stream will use. +* `shard_count` – (Required) The number of shards that the stream will use. Amazon has guidlines for specifying the Stream size that should be referenced when creating a Kinesis stream. See [Amazon Kinesis Streams][2] for more. * `retention_period` - (Optional) Length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 168 hours. Minimum value is 24. Default is 24. diff --git a/website/docs/r/lightsail_key_pair.html.markdown b/website/docs/r/lightsail_key_pair.html.markdown index 9988eb30277..00b25ae7c62 100644 --- a/website/docs/r/lightsail_key_pair.html.markdown +++ b/website/docs/r/lightsail_key_pair.html.markdown @@ -47,7 +47,7 @@ The following arguments are supported: * `name` - (Optional) The name of the Lightsail Key Pair. If omitted, a unique name will be generated by Terraform -* `pgp_key` – (Optional) An optional PGP key to encrypt the resulting private +* `pgp_key` – (Optional) An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair * `public_key` - (Required) The public key material. This public key will be imported into Lightsail @@ -66,7 +66,7 @@ The following attributes are exported in addition to the arguments listed above: * `public_key` - the public key, base64 encoded * `private_key` - the private key, base64 encoded. This is only populated when creating a new key, and when no `pgp_key` is provided -* `encrypted_private_key` – the private key material, base 64 encoded and +* `encrypted_private_key` – the private key material, base 64 encoded and encrypted with the given `pgp_key`. This is only populated when creating a new key and `pgp_key` is supplied * `encrypted_fingerprint` - The MD5 public key fingerprint for the encrypted diff --git a/website/docs/r/rds_cluster.html.markdown b/website/docs/r/rds_cluster.html.markdown index 78c3866afdd..54cffe5b0dd 100644 --- a/website/docs/r/rds_cluster.html.markdown +++ b/website/docs/r/rds_cluster.html.markdown @@ -124,7 +124,7 @@ The following attributes are exported: * `id` - The RDS Cluster Identifier * `cluster_identifier` - The RDS Cluster Identifier * `cluster_resource_id` - The RDS Cluster Resource ID -* `cluster_members` – List of RDS Instances that are a part of this cluster +* `cluster_members` – List of RDS Instances that are a part of this cluster * `allocated_storage` - The amount of allocated storage * `availability_zones` - The availability zone of the instance * `backup_retention_period` - The backup retention period diff --git a/website/docs/r/rds_cluster_instance.html.markdown b/website/docs/r/rds_cluster_instance.html.markdown index e7598ec451d..ba24f664b66 100644 --- a/website/docs/r/rds_cluster_instance.html.markdown +++ b/website/docs/r/rds_cluster_instance.html.markdown @@ -50,7 +50,7 @@ The following arguments are supported: * `identifier` - (Optional, Forces new resource) The indentifier for the RDS instance, if omitted, Terraform will assign a random, unique identifier. * `identifier_prefix` - (Optional, Forces new resource) Creates a unique identifier beginning with the specified prefix. Conflicts with `identifer`. * `cluster_identifier` - (Required) The identifier of the [`aws_rds_cluster`](/docs/providers/aws/r/rds_cluster.html) in which to launch this instance. -* `engine` - (Optional) The name of the database engine to be used for the RDS instance. Defaults to `aurora`. Valid Values: aurora,aurora-mysql,aurora-postgresql +* `engine` - (Optional) The name of the database engine to be used for the RDS instance. Defaults to `aurora`. Valid Values: aurora, aurora-mysql, aurora-postgresql. * `engine_version` - (Optional) The database engine version. * `instance_class` - (Required) The instance class to use. For details on CPU and memory, see [Scaling Aurora DB Instances][4]. Aurora currently @@ -97,8 +97,7 @@ The following attributes are exported: * `cluster_identifier` - The RDS Cluster Identifier * `identifier` - The Instance identifier * `id` - The Instance identifier -* `writer` – Boolean indicating if this instance is writable. `False` indicates -this instance is a read replica +* `writer` – Boolean indicating if this instance is writable. `False` indicates this instance is a read replica. * `allocated_storage` - The amount of allocated storage * `availability_zone` - The availability zone of the instance * `endpoint` - The DNS address for this instance. May not be writable diff --git a/website/docs/r/security_group_rule.html.markdown b/website/docs/r/security_group_rule.html.markdown index 79cf17784d8..c3bc4e263af 100644 --- a/website/docs/r/security_group_rule.html.markdown +++ b/website/docs/r/security_group_rule.html.markdown @@ -85,5 +85,5 @@ The following attributes are exported: * `type` - The type of rule, `ingress` or `egress` * `from_port` - The start port (or ICMP type number if protocol is "icmp") * `to_port` - The end port (or ICMP code if protocol is "icmp") -* `protocol` – The protocol used -* `description` – Description of the rule +* `protocol` – The protocol used +* `description` – Description of the rule From d26601e11ff58b18e2335dd7a8e21e5ace8eeb4b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 19:12:02 -0400 Subject: [PATCH 0652/3316] Update CHANGELOG for #4237 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 270c9bae591..829cc0a9963 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ BUG FIXES: * resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] * resource/aws_codebuild_project: Retry UpdateProject for IAM eventual consistency [GH-4238] * resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates [GH-4194] +* resource/aws_cognito_user_group: Fix `role_arn` updates [GH-4237] * resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] * resource/aws_emr_cluster: Force new resource if any of the `ec2_attributes` change [GH-4218] * resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion [GH-4209] From 9855becd3a2c6188c5fd5c9dedda07db549f73b7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 20:37:18 -0400 Subject: [PATCH 0653/3316] resource/aws_ses_domain_identity_verification: Address #4108 feedback --- ...ce_aws_ses_domain_identity_verification.go | 27 +++++++----- ...s_ses_domain_identity_verification_test.go | 9 ++-- ...domain_identity_verification.html.markdown | 42 ++++++++++--------- 3 files changed, 45 insertions(+), 33 deletions(-) diff --git a/aws/resource_aws_ses_domain_identity_verification.go b/aws/resource_aws_ses_domain_identity_verification.go index 563ded2a54c..c7b546723e6 100644 --- a/aws/resource_aws_ses_domain_identity_verification.go +++ b/aws/resource_aws_ses_domain_identity_verification.go @@ -28,6 +28,9 @@ func resourceAwsSesDomainIdentityVerification() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + StateFunc: func(v interface{}) string { + return strings.TrimSuffix(v.(string), ".") + }, }, }, Timeouts: &schema.ResourceTimeout{ @@ -54,7 +57,7 @@ func getAwsSesIdentityVerificationAttributes(conn *ses.SES, domainName string) ( func resourceAwsSesDomainIdentityVerificationCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sesConn domainName := strings.TrimSuffix(d.Get("domain").(string), ".") - return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + err := resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) if err != nil { return resource.NonRetryableError(fmt.Errorf("Error getting identity verification attributes: %s", err)) @@ -64,14 +67,19 @@ func resourceAwsSesDomainIdentityVerificationCreate(d *schema.ResourceData, meta return resource.NonRetryableError(fmt.Errorf("SES Domain Identity %s not found in AWS", domainName)) } - if *att.VerificationStatus != "Success" { - return resource.RetryableError(fmt.Errorf("Expected domain verification Success, but was in state %s", *att.VerificationStatus)) + if aws.StringValue(att.VerificationStatus) != ses.VerificationStatusSuccess { + return resource.RetryableError(fmt.Errorf("Expected domain verification Success, but was in state %s", aws.StringValue(att.VerificationStatus))) } - log.Printf("[INFO] Domain verification successful for %s", domainName) - d.SetId(domainName) - return resource.NonRetryableError(resourceAwsSesDomainIdentityVerificationRead(d, meta)) + return nil }) + if err != nil { + return err + } + + log.Printf("[INFO] Domain verification successful for %s", domainName) + d.SetId(domainName) + return resourceAwsSesDomainIdentityVerificationRead(d, meta) } func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta interface{}) error { @@ -82,7 +90,7 @@ func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta i att, err := getAwsSesIdentityVerificationAttributes(conn, domainName) if err != nil { - log.Printf("[WARN] Error fetching identity verification attrubtes for %s: %s", d.Id(), err) + log.Printf("[WARN] Error fetching identity verification attributes for %s: %s", d.Id(), err) return err } @@ -92,8 +100,8 @@ func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta i return nil } - if *att.VerificationStatus != "Success" { - log.Printf("[WARN] Expected domain verification Success, but was %s, tainting verification", *att.VerificationStatus) + if aws.StringValue(att.VerificationStatus) != ses.VerificationStatusSuccess { + log.Printf("[WARN] Expected domain verification Success, but was %s, tainting verification", aws.StringValue(att.VerificationStatus)) d.SetId("") return nil } @@ -112,6 +120,5 @@ func resourceAwsSesDomainIdentityVerificationRead(d *schema.ResourceData, meta i func resourceAwsSesDomainIdentityVerificationDelete(d *schema.ResourceData, meta interface{}) error { // No need to do anything, domain identity will be deleted when aws_ses_domain_identity is deleted - d.SetId("") return nil } diff --git a/aws/resource_aws_ses_domain_identity_verification_test.go b/aws/resource_aws_ses_domain_identity_verification_test.go index 2749568df0d..82611abcccf 100644 --- a/aws/resource_aws_ses_domain_identity_verification_test.go +++ b/aws/resource_aws_ses_domain_identity_verification_test.go @@ -108,7 +108,7 @@ func testAccCheckAwsSesDomainIdentityVerificationPassed(n string) resource.TestC return fmt.Errorf("SES Domain Identity %s not found in AWS", domain) } - if *response.VerificationAttributes[domain].VerificationStatus != "Success" { + if aws.StringValue(response.VerificationAttributes[domain].VerificationStatus) != ses.VerificationStatusSuccess { return fmt.Errorf("SES Domain Identity %s not successfully verified.", domain) } @@ -130,8 +130,9 @@ func testAccCheckAwsSesDomainIdentityVerificationPassed(n string) resource.TestC func testAccAwsSesDomainIdentityVerification_basic(rootDomain string, domain string) string { return fmt.Sprintf(` -resource "aws_route53_zone" "zone" { +data "aws_route53_zone" "test" { name = "%s." + private_zone = false } resource "aws_ses_domain_identity" "test" { @@ -139,7 +140,7 @@ resource "aws_ses_domain_identity" "test" { } resource "aws_route53_record" "domain_identity_verification" { - zone_id = "${aws_route53_zone.zone.zone_id}" + zone_id = "${data.aws_route53_zone.test.id}" name = "_amazonses.${aws_ses_domain_identity.test.id}" type = "TXT" ttl = "600" @@ -148,6 +149,8 @@ resource "aws_route53_record" "domain_identity_verification" { resource "aws_ses_domain_identity_verification" "test" { domain = "${aws_ses_domain_identity.test.id}" + + depends_on = ["aws_route53_record.domain_identity_verification"] } `, rootDomain, domain) } diff --git a/website/docs/r/ses_domain_identity_verification.html.markdown b/website/docs/r/ses_domain_identity_verification.html.markdown index 0cbd60ad354..3e0aa324d3a 100644 --- a/website/docs/r/ses_domain_identity_verification.html.markdown +++ b/website/docs/r/ses_domain_identity_verification.html.markdown @@ -16,6 +16,28 @@ deploy the required DNS verification records, and wait for verification to compl ~> **WARNING:** This resource implements a part of the verification workflow. It does not represent a real-world entity in AWS, therefore changing or deleting this resource on its own has no immediate effect. +## Example Usage + +```hcl +resource "aws_ses_domain_identity" "example" { + domain = "example.com" +} + +resource "aws_route53_record" "example_amazonses_verification_record" { + zone_id = "${aws_route53_zone.example.id}" + name = "_amazonses.${aws_route53_zone.example.name}" + type = "TXT" + ttl = "600" + records = ["${aws_ses_domain_identity.example.verification_token}"] +} + +resource "aws_ses_domain_identity_verification" "example_verification" { + domain = "${aws_ses_domain_identity.example.id}" + + depends_on = ["aws_route53_record.example_amazonses_verification_record"] +} +``` + ## Argument Reference The following arguments are supported: @@ -35,23 +57,3 @@ The following attributes are exported: configuration options: - `create` - (Default `45m`) How long to wait for a domain identity to be verified. - -## Example Usage - -```hcl -resource "aws_ses_domain_identity" "example" { - domain = "example.com" -} - -resource "aws_route53_record" "example_amazonses_verification_record" { - zone_id = "ABCDEFGHIJ123" - name = "_amazonses.example.com" - type = "TXT" - ttl = "600" - records = ["${aws_ses_domain_identity.example.verification_token}"] -} - -resource "aws_ses_domain_identity_verification" "example_verification" { - domain = "${aws_ses_domain_identity.example.id}" -} -``` From 2959a6d51c0fa67cd62e2cfe5950dd275ca90928 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 20:39:31 -0400 Subject: [PATCH 0654/3316] Update CHANGELOG for #4108 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 829cc0a9963..c960ee1da01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ FEATURES: * **New Resource:** `aws_glue_job` [GH-4028] * **New Resource:** `aws_iam_service_linked_role` [GH-2985] * **New Resource:** `aws_launch_template` [GH-2927] +* **New Resource:** `aws_ses_domain_identity_verification` [GH-4108] ENHANCEMENTS: From 502a18594d39536b2a76c69f2adb54fd0f7522e2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 20:40:28 -0400 Subject: [PATCH 0655/3316] docs/resource/aws_ses_domain_identity_verification: Minor example fix --- website/docs/r/ses_domain_identity_verification.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/ses_domain_identity_verification.html.markdown b/website/docs/r/ses_domain_identity_verification.html.markdown index 3e0aa324d3a..8cdf0c0f8cc 100644 --- a/website/docs/r/ses_domain_identity_verification.html.markdown +++ b/website/docs/r/ses_domain_identity_verification.html.markdown @@ -25,7 +25,7 @@ resource "aws_ses_domain_identity" "example" { resource "aws_route53_record" "example_amazonses_verification_record" { zone_id = "${aws_route53_zone.example.id}" - name = "_amazonses.${aws_route53_zone.example.name}" + name = "_amazonses.${aws_ses_domain_identity.example.id}" type = "TXT" ttl = "600" records = ["${aws_ses_domain_identity.example.verification_token}"] From 179151713104f05392b5dbda74cf32bebb58a02f Mon Sep 17 00:00:00 2001 From: Ninir Date: Sun, 8 Apr 2018 23:16:50 +0200 Subject: [PATCH 0656/3316] resource/cloudfront_distribution: Added ordered cache behaviors --- ...nt_distribution_configuration_structure.go | 161 ++++++++++++++++-- ...stribution_configuration_structure_test.go | 28 +-- aws/resource_aws_cloudfront_distribution.go | 133 ++++++++++++++- ...source_aws_cloudfront_distribution_test.go | 117 ++++++++++++- .../r/cloudfront_distribution.html.markdown | 50 +++++- 5 files changed, 453 insertions(+), 36 deletions(-) diff --git a/aws/cloudfront_distribution_configuration_structure.go b/aws/cloudfront_distribution_configuration_structure.go index a4f3f986304..be332c1f639 100644 --- a/aws/cloudfront_distribution_configuration_structure.go +++ b/aws/cloudfront_distribution_configuration_structure.go @@ -42,7 +42,6 @@ func (p StringPtrSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } // Used by the aws_cloudfront_distribution Create and Update functions. func expandDistributionConfig(d *schema.ResourceData) *cloudfront.DistributionConfig { distributionConfig := &cloudfront.DistributionConfig{ - CacheBehaviors: expandCacheBehaviors(d.Get("cache_behavior").(*schema.Set)), CustomErrorResponses: expandCustomErrorResponses(d.Get("custom_error_response").(*schema.Set)), DefaultCacheBehavior: expandDefaultCacheBehavior(d.Get("default_cache_behavior").(*schema.Set).List()[0].(map[string]interface{})), Enabled: aws.Bool(d.Get("enabled").(bool)), @@ -51,6 +50,11 @@ func expandDistributionConfig(d *schema.ResourceData) *cloudfront.DistributionCo Origins: expandOrigins(d.Get("origin").(*schema.Set)), PriceClass: aws.String(d.Get("price_class").(string)), } + if v, ok := d.GetOk("ordered_cache_behavior"); ok { + distributionConfig.CacheBehaviors = expandCacheBehaviors(v.([]interface{})) + } else { + distributionConfig.CacheBehaviors = expandCacheBehaviorsDeprecated(d.Get("cache_behavior").(*schema.Set)) + } // This sets CallerReference if it's still pending computation (ie: new resource) if v, ok := d.GetOk("caller_reference"); ok == false { distributionConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) @@ -140,7 +144,12 @@ func flattenDistributionConfig(d *schema.ResourceData, distributionConfig *cloud } } if distributionConfig.CacheBehaviors != nil { - err = d.Set("cache_behavior", flattenCacheBehaviors(distributionConfig.CacheBehaviors)) + if _, ok := d.GetOk("ordered_cache_behavior"); ok { + err = d.Set("ordered_cache_behavior", flattenCacheBehaviors(distributionConfig.CacheBehaviors)) + } else { + err = d.Set("cache_behavior", flattenCacheBehaviorsDeprecated(distributionConfig.CacheBehaviors)) + } + if err != nil { return err } @@ -178,7 +187,7 @@ func flattenDistributionConfig(d *schema.ResourceData, distributionConfig *cloud } func expandDefaultCacheBehavior(m map[string]interface{}) *cloudfront.DefaultCacheBehavior { - cb := expandCacheBehavior(m) + cb := expandCacheBehaviorDeprecated(m) var dcb cloudfront.DefaultCacheBehavior simpleCopyStruct(cb, &dcb) @@ -190,7 +199,7 @@ func flattenDefaultCacheBehavior(dcb *cloudfront.DefaultCacheBehavior) *schema.S var cb cloudfront.CacheBehavior simpleCopyStruct(dcb, &cb) - m = flattenCacheBehavior(&cb) + m = flattenCacheBehaviorDeprecated(&cb) return schema.NewSet(defaultCacheBehaviorHash, []interface{}{m}) } @@ -246,11 +255,11 @@ func defaultCacheBehaviorHash(v interface{}) int { return hashcode.String(buf.String()) } -func expandCacheBehaviors(s *schema.Set) *cloudfront.CacheBehaviors { +func expandCacheBehaviorsDeprecated(s *schema.Set) *cloudfront.CacheBehaviors { var qty int64 var items []*cloudfront.CacheBehavior for _, v := range s.List() { - items = append(items, expandCacheBehavior(v.(map[string]interface{}))) + items = append(items, expandCacheBehaviorDeprecated(v.(map[string]interface{}))) qty++ } return &cloudfront.CacheBehaviors{ @@ -259,14 +268,73 @@ func expandCacheBehaviors(s *schema.Set) *cloudfront.CacheBehaviors { } } -func flattenCacheBehaviors(cbs *cloudfront.CacheBehaviors) *schema.Set { +func flattenCacheBehaviorsDeprecated(cbs *cloudfront.CacheBehaviors) *schema.Set { s := []interface{}{} for _, v := range cbs.Items { - s = append(s, flattenCacheBehavior(v)) + s = append(s, flattenCacheBehaviorDeprecated(v)) } return schema.NewSet(cacheBehaviorHash, s) } +func expandCacheBehaviors(lst []interface{}) *cloudfront.CacheBehaviors { + var qty int64 + var items []*cloudfront.CacheBehavior + for _, v := range lst { + items = append(items, expandCacheBehavior(v.(map[string]interface{}))) + qty++ + } + return &cloudfront.CacheBehaviors{ + Quantity: aws.Int64(qty), + Items: items, + } +} + +func flattenCacheBehaviors(cbs *cloudfront.CacheBehaviors) []interface{} { + lst := []interface{}{} + for _, v := range cbs.Items { + lst = append(lst, flattenCacheBehavior(v)) + } + return lst +} + +// Deprecated. +func expandCacheBehaviorDeprecated(m map[string]interface{}) *cloudfront.CacheBehavior { + cb := &cloudfront.CacheBehavior{ + Compress: aws.Bool(m["compress"].(bool)), + FieldLevelEncryptionId: aws.String(m["field_level_encryption_id"].(string)), + ViewerProtocolPolicy: aws.String(m["viewer_protocol_policy"].(string)), + TargetOriginId: aws.String(m["target_origin_id"].(string)), + ForwardedValues: expandForwardedValues(m["forwarded_values"].(*schema.Set).List()[0].(map[string]interface{})), + DefaultTTL: aws.Int64(int64(m["default_ttl"].(int))), + MaxTTL: aws.Int64(int64(m["max_ttl"].(int))), + MinTTL: aws.Int64(int64(m["min_ttl"].(int))), + } + + if v, ok := m["trusted_signers"]; ok { + cb.TrustedSigners = expandTrustedSigners(v.([]interface{})) + } else { + cb.TrustedSigners = expandTrustedSigners([]interface{}{}) + } + + if v, ok := m["lambda_function_association"]; ok { + cb.LambdaFunctionAssociations = expandLambdaFunctionAssociations(v.(*schema.Set).List()) + } + + if v, ok := m["smooth_streaming"]; ok { + cb.SmoothStreaming = aws.Bool(v.(bool)) + } + if v, ok := m["allowed_methods"]; ok { + cb.AllowedMethods = expandAllowedMethodsDeprecated(v.([]interface{})) + } + if v, ok := m["cached_methods"]; ok { + cb.AllowedMethods.CachedMethods = expandCachedMethodsDeprecated(v.([]interface{})) + } + if v, ok := m["path_pattern"]; ok { + cb.PathPattern = aws.String(v.(string)) + } + return cb +} + func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { cb := &cloudfront.CacheBehavior{ Compress: aws.Bool(m["compress"].(bool)), @@ -293,10 +361,10 @@ func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { cb.SmoothStreaming = aws.Bool(v.(bool)) } if v, ok := m["allowed_methods"]; ok { - cb.AllowedMethods = expandAllowedMethods(v.([]interface{})) + cb.AllowedMethods = expandAllowedMethods(v.(*schema.Set)) } if v, ok := m["cached_methods"]; ok { - cb.AllowedMethods.CachedMethods = expandCachedMethods(v.([]interface{})) + cb.AllowedMethods.CachedMethods = expandCachedMethods(v.(*schema.Set)) } if v, ok := m["path_pattern"]; ok { cb.PathPattern = aws.String(v.(string)) @@ -304,6 +372,43 @@ func expandCacheBehavior(m map[string]interface{}) *cloudfront.CacheBehavior { return cb } +func flattenCacheBehaviorDeprecated(cb *cloudfront.CacheBehavior) map[string]interface{} { + m := make(map[string]interface{}) + + m["compress"] = *cb.Compress + m["field_level_encryption_id"] = aws.StringValue(cb.FieldLevelEncryptionId) + m["viewer_protocol_policy"] = *cb.ViewerProtocolPolicy + m["target_origin_id"] = *cb.TargetOriginId + m["forwarded_values"] = schema.NewSet(forwardedValuesHash, []interface{}{flattenForwardedValues(cb.ForwardedValues)}) + m["min_ttl"] = int(*cb.MinTTL) + + if len(cb.TrustedSigners.Items) > 0 { + m["trusted_signers"] = flattenTrustedSigners(cb.TrustedSigners) + } + if len(cb.LambdaFunctionAssociations.Items) > 0 { + m["lambda_function_association"] = flattenLambdaFunctionAssociations(cb.LambdaFunctionAssociations) + } + if cb.MaxTTL != nil { + m["max_ttl"] = int(*cb.MaxTTL) + } + if cb.SmoothStreaming != nil { + m["smooth_streaming"] = *cb.SmoothStreaming + } + if cb.DefaultTTL != nil { + m["default_ttl"] = int(*cb.DefaultTTL) + } + if cb.AllowedMethods != nil { + m["allowed_methods"] = flattenAllowedMethodsDeprecated(cb.AllowedMethods) + } + if cb.AllowedMethods.CachedMethods != nil { + m["cached_methods"] = flattenCachedMethodsDeprecated(cb.AllowedMethods.CachedMethods) + } + if cb.PathPattern != nil { + m["path_pattern"] = *cb.PathPattern + } + return m +} + func flattenCacheBehavior(cb *cloudfront.CacheBehavior) map[string]interface{} { m := make(map[string]interface{}) @@ -597,28 +702,56 @@ func flattenCookieNames(cn *cloudfront.CookieNames) []interface{} { return []interface{}{} } -func expandAllowedMethods(s []interface{}) *cloudfront.AllowedMethods { +func expandAllowedMethods(s *schema.Set) *cloudfront.AllowedMethods { + return &cloudfront.AllowedMethods{ + Quantity: aws.Int64(int64(s.Len())), + Items: expandStringList(s.List()), + } +} + +func flattenAllowedMethods(am *cloudfront.AllowedMethods) *schema.Set { + if am.Items != nil { + return schema.NewSet(schema.HashString, flattenStringList(am.Items)) + } + return nil +} + +func expandAllowedMethodsDeprecated(s []interface{}) *cloudfront.AllowedMethods { return &cloudfront.AllowedMethods{ Quantity: aws.Int64(int64(len(s))), Items: expandStringList(s), } } -func flattenAllowedMethods(am *cloudfront.AllowedMethods) []interface{} { +func flattenAllowedMethodsDeprecated(am *cloudfront.AllowedMethods) []interface{} { if am.Items != nil { return flattenStringList(am.Items) } return []interface{}{} } -func expandCachedMethods(s []interface{}) *cloudfront.CachedMethods { +func expandCachedMethods(s *schema.Set) *cloudfront.CachedMethods { + return &cloudfront.CachedMethods{ + Quantity: aws.Int64(int64(s.Len())), + Items: expandStringList(s.List()), + } +} + +func flattenCachedMethods(cm *cloudfront.CachedMethods) *schema.Set { + if cm.Items != nil { + return schema.NewSet(schema.HashString, flattenStringList(cm.Items)) + } + return nil +} + +func expandCachedMethodsDeprecated(s []interface{}) *cloudfront.CachedMethods { return &cloudfront.CachedMethods{ Quantity: aws.Int64(int64(len(s))), Items: expandStringList(s), } } -func flattenCachedMethods(cm *cloudfront.CachedMethods) []interface{} { +func flattenCachedMethodsDeprecated(cm *cloudfront.CachedMethods) []interface{} { if cm.Items != nil { return flattenStringList(cm.Items) } diff --git a/aws/cloudfront_distribution_configuration_structure_test.go b/aws/cloudfront_distribution_configuration_structure_test.go index 8af0b3f8758..12ed2b1b075 100644 --- a/aws/cloudfront_distribution_configuration_structure_test.go +++ b/aws/cloudfront_distribution_configuration_structure_test.go @@ -290,10 +290,10 @@ func TestCloudFrontStructure_expandDefaultCacheBehavior(t *testing.T) { t.Fatalf("Expected LambdaFunctionAssociations to be 2, got %v", *dcb.LambdaFunctionAssociations.Quantity) } if reflect.DeepEqual(dcb.AllowedMethods.Items, expandStringList(allowedMethodsConf())) != true { - t.Fatalf("Expected TrustedSigners.Items to be %v, got %v", allowedMethodsConf(), dcb.AllowedMethods.Items) + t.Fatalf("Expected AllowedMethods.Items to be %v, got %v", allowedMethodsConf(), dcb.AllowedMethods.Items) } if reflect.DeepEqual(dcb.AllowedMethods.CachedMethods.Items, expandStringList(cachedMethodsConf())) != true { - t.Fatalf("Expected TrustedSigners.Items to be %v, got %v", cachedMethodsConf(), dcb.AllowedMethods.CachedMethods.Items) + t.Fatalf("Expected AllowedMethods.CachedMethods.Items to be %v, got %v", cachedMethodsConf(), dcb.AllowedMethods.CachedMethods.Items) } } @@ -310,7 +310,7 @@ func TestCloudFrontStructure_flattenDefaultCacheBehavior(t *testing.T) { func TestCloudFrontStructure_expandCacheBehavior(t *testing.T) { data := cacheBehaviorConf1() - cb := expandCacheBehavior(data) + cb := expandCacheBehaviorDeprecated(data) if *cb.Compress != true { t.Fatalf("Expected Compress to be true, got %v", *cb.Compress) } @@ -354,8 +354,8 @@ func TestCloudFrontStructure_expandCacheBehavior(t *testing.T) { func TestCloudFrontStructure_flattenCacheBehavior(t *testing.T) { in := cacheBehaviorConf1() - cb := expandCacheBehavior(in) - out := flattenCacheBehavior(cb) + cb := expandCacheBehaviorDeprecated(in) + out := flattenCacheBehaviorDeprecated(cb) var diff *schema.Set if out["compress"] != true { t.Fatalf("Expected out[compress] to be true, got %v", out["compress"]) @@ -413,7 +413,7 @@ func TestCloudFrontStructure_flattenCacheBehavior(t *testing.T) { func TestCloudFrontStructure_expandCacheBehaviors(t *testing.T) { data := cacheBehaviorsConf() - cbs := expandCacheBehaviors(data) + cbs := expandCacheBehaviorsDeprecated(data) if *cbs.Quantity != 2 { t.Fatalf("Expected Quantity to be 2, got %v", *cbs.Quantity) } @@ -424,8 +424,8 @@ func TestCloudFrontStructure_expandCacheBehaviors(t *testing.T) { func TestCloudFrontStructure_flattenCacheBehaviors(t *testing.T) { in := cacheBehaviorsConf() - cbs := expandCacheBehaviors(in) - out := flattenCacheBehaviors(cbs) + cbs := expandCacheBehaviorsDeprecated(in) + out := flattenCacheBehaviorsDeprecated(cbs) diff := in.Difference(out) if len(diff.List()) > 0 { @@ -628,7 +628,7 @@ func TestCloudFrontStructure_flattenCookieNames(t *testing.T) { func TestCloudFrontStructure_expandAllowedMethods(t *testing.T) { data := allowedMethodsConf() - am := expandAllowedMethods(data) + am := expandAllowedMethodsDeprecated(data) if *am.Quantity != 7 { t.Fatalf("Expected Quantity to be 7, got %v", *am.Quantity) } @@ -639,8 +639,8 @@ func TestCloudFrontStructure_expandAllowedMethods(t *testing.T) { func TestCloudFrontStructure_flattenAllowedMethods(t *testing.T) { in := allowedMethodsConf() - am := expandAllowedMethods(in) - out := flattenAllowedMethods(am) + am := expandAllowedMethodsDeprecated(in) + out := flattenAllowedMethodsDeprecated(am) if reflect.DeepEqual(in, out) != true { t.Fatalf("Expected out to be %v, got %v", in, out) @@ -649,7 +649,7 @@ func TestCloudFrontStructure_flattenAllowedMethods(t *testing.T) { func TestCloudFrontStructure_expandCachedMethods(t *testing.T) { data := cachedMethodsConf() - cm := expandCachedMethods(data) + cm := expandCachedMethodsDeprecated(data) if *cm.Quantity != 3 { t.Fatalf("Expected Quantity to be 3, got %v", *cm.Quantity) } @@ -660,8 +660,8 @@ func TestCloudFrontStructure_expandCachedMethods(t *testing.T) { func TestCloudFrontStructure_flattenCachedMethods(t *testing.T) { in := cachedMethodsConf() - cm := expandCachedMethods(in) - out := flattenCachedMethods(cm) + cm := expandCachedMethodsDeprecated(in) + out := flattenCachedMethodsDeprecated(cm) if reflect.DeepEqual(in, out) != true { t.Fatalf("Expected out to be %v, got %v", in, out) diff --git a/aws/resource_aws_cloudfront_distribution.go b/aws/resource_aws_cloudfront_distribution.go index 216f46695f3..bcce9b47050 100644 --- a/aws/resource_aws_cloudfront_distribution.go +++ b/aws/resource_aws_cloudfront_distribution.go @@ -36,9 +36,11 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Set: aliasesHash, }, "cache_behavior": { - Type: schema.TypeSet, - Optional: true, - Set: cacheBehaviorHash, + Type: schema.TypeSet, + Optional: true, + Set: cacheBehaviorHash, + ConflictsWith: []string{"ordered_cache_behavior"}, + Deprecated: "Use `ordered_cache_behavior` instead", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "allowed_methods": { @@ -160,6 +162,131 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { }, }, }, + "ordered_cache_behavior": { + Type: schema.TypeList, + Optional: true, + ConflictsWith: []string{"cache_behavior"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allowed_methods": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "cached_methods": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "compress": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "default_ttl": { + Type: schema.TypeInt, + Optional: true, + Default: 86400, + }, + "field_level_encryption_id": { + Type: schema.TypeString, + Optional: true, + }, + "forwarded_values": { + Type: schema.TypeSet, + Required: true, + Set: forwardedValuesHash, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cookies": { + Type: schema.TypeSet, + Required: true, + Set: cookiePreferenceHash, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "forward": { + Type: schema.TypeString, + Required: true, + }, + "whitelisted_names": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "headers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "query_string": { + Type: schema.TypeBool, + Required: true, + }, + "query_string_cache_keys": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "lambda_function_association": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 4, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "event_type": { + Type: schema.TypeString, + Required: true, + }, + "lambda_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + Set: lambdaFunctionAssociationHash, + }, + "max_ttl": { + Type: schema.TypeInt, + Optional: true, + Default: 31536000, + }, + "min_ttl": { + Type: schema.TypeInt, + Optional: true, + Default: 0, + }, + "path_pattern": { + Type: schema.TypeString, + Required: true, + }, + "smooth_streaming": { + Type: schema.TypeBool, + Optional: true, + }, + "target_origin_id": { + Type: schema.TypeString, + Required: true, + }, + "trusted_signers": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "viewer_protocol_policy": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "comment": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_cloudfront_distribution_test.go b/aws/resource_aws_cloudfront_distribution_test.go index d3fe0334b09..494f133866e 100644 --- a/aws/resource_aws_cloudfront_distribution_test.go +++ b/aws/resource_aws_cloudfront_distribution_test.go @@ -174,6 +174,7 @@ func TestAccAWSCloudFrontDistribution_customOrigin(t *testing.T) { // If you are testing manually and can't wait for deletion, set the // TF_TEST_CLOUDFRONT_RETAIN environment variable. func TestAccAWSCloudFrontDistribution_multiOrigin(t *testing.T) { + resourceName := "aws_cloudfront_distribution.multi_origin_distribution" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -182,9 +183,38 @@ func TestAccAWSCloudFrontDistribution_multiOrigin(t *testing.T) { { Config: testAccAWSCloudFrontDistributionMultiOriginConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckCloudFrontDistributionExistence( - "aws_cloudfront_distribution.multi_origin_distribution", - ), + testAccCheckCloudFrontDistributionExistence(resourceName), + resource.TestCheckResourceAttr(resourceName, "cache_behavior.#", "2"), + resource.TestCheckResourceAttr(resourceName, "cache_behavior.2106187217.default_ttl", "50"), + resource.TestCheckResourceAttr(resourceName, "cache_behavior.2106187217.path_pattern", "images1/*.jpg"), + ), + }, + }, + }) +} + +// https://github.com/terraform-providers/terraform-provider-aws/issues/188 +// TestAccAWSCloudFrontDistribution_orderedCacheBehavior runs an +// aws_cloudfront_distribution acceptance test with multiple and ordered cache behaviors. +// +// If you are testing manually and can't wait for deletion, set the +// TF_TEST_CLOUDFRONT_RETAIN environment variable. +func TestAccAWSCloudFrontDistribution_orderedCacheBehavior(t *testing.T) { + resourceName := "aws_cloudfront_distribution.main" + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckCloudFrontDistributionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudFrontDistributionOrderedCacheBehavior, + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudFrontDistributionExistence(resourceName), + resource.TestCheckResourceAttr(resourceName, "ordered_cache_behavior.#", "2"), + resource.TestCheckResourceAttr(resourceName, "ordered_cache_behavior.0.default_ttl", "50"), + resource.TestCheckResourceAttr(resourceName, "ordered_cache_behavior.0.path_pattern", "images1/*.jpg"), + resource.TestCheckResourceAttr(resourceName, "ordered_cache_behavior.1.default_ttl", "51"), + resource.TestCheckResourceAttr(resourceName, "ordered_cache_behavior.1.path_pattern", "images2/*.jpg"), ), }, }, @@ -1025,3 +1055,84 @@ resource "aws_cloudfront_distribution" "is_ipv6_enabled" { %s } `, rand.New(rand.NewSource(time.Now().UnixNano())).Int(), testAccAWSCloudFrontDistributionRetainConfig()) + +var testAccAWSCloudFrontDistributionOrderedCacheBehavior = fmt.Sprintf(` +variable rand_id { + default = %d +} + +resource "aws_cloudfront_distribution" "main" { + origin { + domain_name = "www.hashicorp.com" + origin_id = "myCustomOrigin" + custom_origin_config { + http_port = 80 + https_port = 443 + origin_protocol_policy = "http-only" + origin_ssl_protocols = [ "SSLv3", "TLSv1" ] + } + } + enabled = true + comment = "Some comment" + aliases = [] + default_cache_behavior { + allowed_methods = [ "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT" ] + cached_methods = [ "GET", "HEAD" ] + target_origin_id = "myCustomOrigin" + smooth_streaming = true + forwarded_values { + query_string = false + cookies { + forward = "all" + } + } + min_ttl = 100 + default_ttl = 100 + max_ttl = 100 + viewer_protocol_policy = "allow-all" + } + ordered_cache_behavior { + allowed_methods = [ "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT" ] + cached_methods = [ "GET", "HEAD" ] + target_origin_id = "myCustomOrigin" + forwarded_values { + query_string = true + cookies { + forward = "none" + } + } + min_ttl = 50 + default_ttl = 50 + max_ttl = 50 + viewer_protocol_policy = "allow-all" + path_pattern = "images1/*.jpg" + } + ordered_cache_behavior { + allowed_methods = [ "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT" ] + cached_methods = [ "GET", "HEAD" ] + target_origin_id = "myCustomOrigin" + forwarded_values { + query_string = true + cookies { + forward = "none" + } + } + min_ttl = 51 + default_ttl = 51 + max_ttl = 51 + viewer_protocol_policy = "allow-all" + path_pattern = "images2/*.jpg" + } + + price_class = "PriceClass_All" + restrictions { + geo_restriction { + restriction_type = "none" + } + } + viewer_certificate { + cloudfront_default_certificate = true + } + %s +} +`, rand.New(rand.NewSource(time.Now().UnixNano())).Int(), testAccAWSCloudFrontDistributionRetainConfig()) diff --git a/website/docs/r/cloudfront_distribution.html.markdown b/website/docs/r/cloudfront_distribution.html.markdown index 6b2dbae0e02..93a54216506 100644 --- a/website/docs/r/cloudfront_distribution.html.markdown +++ b/website/docs/r/cloudfront_distribution.html.markdown @@ -76,6 +76,49 @@ resource "aws_cloudfront_distribution" "s3_distribution" { max_ttl = 86400 } + # Cache behavior with precedence 0 + ordered_cache_behavior { + path_pattern = "/content/immutable/*" + allowed_methods = ["GET", "HEAD", "OPTIONS"] + cached_methods = ["GET", "HEAD", "OPTIONS"] + target_origin_id = "myS3Origin" + + forwarded_values { + query_string = false + headers = ["Origin"] + cookies { + forward = "none" + } + } + + min_ttl = 0 + default_ttl = 86400 + max_ttl = 31536000 + compress = true + viewer_protocol_policy = "redirect-to-https" + } + + # Cache behavior with precedence 1 + ordered_cache_behavior { + path_pattern = "/content/*" + allowed_methods = ["GET", "HEAD", "OPTIONS"] + cached_methods = ["GET", "HEAD"] + target_origin_id = "myS3Origin" + + forwarded_values { + query_string = false + cookies { + forward = "none" + } + } + + min_ttl = 0 + default_ttl = 3600 + max_ttl = 86400 + compress = true + viewer_protocol_policy = "redirect-to-https" + } + price_class = "PriceClass_200" restrictions { @@ -105,8 +148,11 @@ of several sub-resources - these resources are laid out below. * `aliases` (Optional) - Extra CNAMEs (alternate domain names), if any, for this distribution. - * `cache_behavior` (Optional) - A [cache behavior](#cache-behavior-arguments) - resource for this distribution (multiples allowed). + * `cache_behavior` (Optional) - **Deprecated**, use `ordered_cache_behavior` instead. + + * `ordered_cache_behavior` (Optional) - An ordered list of [cache behaviors](#cache-behavior-arguments) + resource for this distribution. List from top to bottom ++ in order of precedence. The topmost cache behavior will have precedence 0. * `comment` (Optional) - Any comments you want to include about the distribution. From 949cc3f2fb00984099d08b386cecbfb08a250456 Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Wed, 18 Apr 2018 15:55:27 +0200 Subject: [PATCH 0657/3316] Remove principal type AWS from IAM policy wildcard normalization --- aws/data_source_aws_iam_policy_document_test.go | 8 ++++++-- aws/iam_policy_model.go | 11 ++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/aws/data_source_aws_iam_policy_document_test.go b/aws/data_source_aws_iam_policy_document_test.go index bd7367f62bc..c2e5e31c2c0 100644 --- a/aws/data_source_aws_iam_policy_document_test.go +++ b/aws/data_source_aws_iam_policy_document_test.go @@ -239,7 +239,9 @@ var testAccAWSIAMPolicyDocumentExpectedJSON = `{ "Sid": "", "Effect": "Allow", "Action": "kinesis:*", - "Principal": "*" + "Principal": { + "AWS": "*" + } }, { "Sid": "", @@ -389,7 +391,9 @@ var testAccAWSIAMPolicyDocumentSourceExpectedJSON = `{ "Sid": "", "Effect": "Allow", "Action": "kinesis:*", - "Principal": "*" + "Principal": { + "AWS": "*" + } }, { "Sid": "", diff --git a/aws/iam_policy_model.go b/aws/iam_policy_model.go index 9c74e297a54..f9e7fe2013b 100644 --- a/aws/iam_policy_model.go +++ b/aws/iam_policy_model.go @@ -73,13 +73,14 @@ func (self *IAMPolicyDoc) Merge(newDoc *IAMPolicyDoc) { func (ps IAMPolicyStatementPrincipalSet) MarshalJSON() ([]byte, error) { raw := map[string]interface{}{} - // As a special case, IAM considers the string value "*" to be - // equivalent to "AWS": "*", and normalizes policies as such. - // We'll follow their lead and do the same normalization here. - // IAM also considers {"*": "*"} to be equivalent to this. + // Although IAM documentation says, that "*" and {"AWS": "*"} are equivalent + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html), + // in practice they are not for IAM roles. IAM will return an error if trust + // policy have "*" or {"*": "*"} as principal, but will accept {"AWS": "*"}. + // Only {"*": "*"} should be normalized to "*". if len(ps) == 1 { p := ps[0] - if p.Type == "AWS" || p.Type == "*" { + if p.Type == "*" { if sv, ok := p.Identifiers.(string); ok && sv == "*" { return []byte(`"*"`), nil } From f1e0139985e59e3e0ffc444999186e52f053d01f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 18 Apr 2018 10:36:26 -0400 Subject: [PATCH 0658/3316] New Resource: aws_organizations_policy --- aws/provider.go | 1 + aws/resource_aws_organizations_policy.go | 174 ++++++++++++++++++ aws/resource_aws_organizations_policy_test.go | 162 ++++++++++++++++ website/aws.erb | 3 + .../docs/r/organizations_policy.html.markdown | 49 +++++ 5 files changed, 389 insertions(+) create mode 100644 aws/resource_aws_organizations_policy.go create mode 100644 aws/resource_aws_organizations_policy_test.go create mode 100644 website/docs/r/organizations_policy.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 851e1d7a3ae..fc7b62547c1 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -470,6 +470,7 @@ func Provider() terraform.ResourceProvider { "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), "aws_organizations_organization": resourceAwsOrganizationsOrganization(), "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), "aws_placement_group": resourceAwsPlacementGroup(), "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), "aws_rds_cluster": resourceAwsRDSCluster(), diff --git a/aws/resource_aws_organizations_policy.go b/aws/resource_aws_organizations_policy.go new file mode 100644 index 00000000000..dcad1d3784b --- /dev/null +++ b/aws/resource_aws_organizations_policy.go @@ -0,0 +1,174 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/organizations" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsOrganizationsPolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsOrganizationsPolicyCreate, + Read: resourceAwsOrganizationsPolicyRead, + Update: resourceAwsOrganizationsPolicyUpdate, + Delete: resourceAwsOrganizationsPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "content": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + ValidateFunc: validateJsonString, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: organizations.PolicyTypeServiceControlPolicy, + ValidateFunc: validation.StringInSlice([]string{ + organizations.PolicyTypeServiceControlPolicy, + }, false), + }, + }, + } +} + +func resourceAwsOrganizationsPolicyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + // Description is required: + // InvalidParameter: 1 validation error(s) found. + // - missing required field, CreatePolicyInput.Description. + input := &organizations.CreatePolicyInput{ + Content: aws.String(d.Get("content").(string)), + Description: aws.String(d.Get("description").(string)), + Name: aws.String(d.Get("name").(string)), + Type: aws.String(d.Get("type").(string)), + } + + log.Printf("[DEBUG] Creating Organizations Policy: %s", input) + + var err error + var resp *organizations.CreatePolicyOutput + err = resource.Retry(4*time.Minute, func() *resource.RetryError { + resp, err = conn.CreatePolicy(input) + + if err != nil { + if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { + log.Printf("[DEBUG] Trying to create policy again: %q", err.Error()) + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + }) + + if err != nil { + return fmt.Errorf("error creating Organizations Policy: %s", err) + } + + d.SetId(*resp.Policy.PolicySummary.Id) + + return resourceAwsOrganizationsPolicyRead(d, meta) +} + +func resourceAwsOrganizationsPolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + input := &organizations.DescribePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Organizations Policy: %s", input) + resp, err := conn.DescribePolicy(input) + if err != nil { + if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { + log.Printf("[WARN] Policy does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + return err + } + + if resp.Policy == nil || resp.Policy.PolicySummary == nil { + log.Printf("[WARN] Policy does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + + d.Set("arn", resp.Policy.PolicySummary.Arn) + d.Set("content", resp.Policy.Content) + d.Set("description", resp.Policy.PolicySummary.Description) + d.Set("name", resp.Policy.PolicySummary.Name) + d.Set("type", resp.Policy.PolicySummary.Type) + return nil +} + +func resourceAwsOrganizationsPolicyUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + input := &organizations.UpdatePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + if d.HasChange("content") { + input.Content = aws.String(d.Get("content").(string)) + } + + if d.HasChange("description") { + input.Description = aws.String(d.Get("description").(string)) + } + + if d.HasChange("name") { + input.Name = aws.String(d.Get("name").(string)) + } + + log.Printf("[DEBUG] Updating Organizations Policy: %s", input) + _, err := conn.UpdatePolicy(input) + if err != nil { + return fmt.Errorf("error updating Organizations Policy: %s", err) + } + + return resourceAwsOrganizationsPolicyRead(d, meta) +} + +func resourceAwsOrganizationsPolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + input := &organizations.DeletePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deletion Organizations Policy: %s", input) + _, err := conn.DeletePolicy(input) + if err != nil { + if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { + return nil + } + return err + } + return nil +} diff --git a/aws/resource_aws_organizations_policy_test.go b/aws/resource_aws_organizations_policy_test.go new file mode 100644 index 00000000000..43812bdcf7c --- /dev/null +++ b/aws/resource_aws_organizations_policy_test.go @@ -0,0 +1,162 @@ +package aws + +import ( + "fmt" + "regexp" + "strconv" + "testing" + + "github.com/aws/aws-sdk-go/service/organizations" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsOrganizationsPolicy_basic(t *testing.T) { + var policy organizations.Policy + content1 := `{"Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "*", "Resource": "*"}}` + content2 := `{"Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "s3:*", "Resource": "*"}}` + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_organizations_policy.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOrganizationsPolicyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOrganizationsPolicyConfig_Required(rName, content1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsOrganizationsPolicyExists(resourceName, &policy), + resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(`^arn:[^:]+:organizations::[^:]+:policy/o-.+/service_control_policy/p-.+$`)), + resource.TestCheckResourceAttr(resourceName, "content", content1), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "type", organizations.PolicyTypeServiceControlPolicy), + ), + }, + { + Config: testAccAwsOrganizationsPolicyConfig_Required(rName, content2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsOrganizationsPolicyExists(resourceName, &policy), + resource.TestCheckResourceAttr(resourceName, "content", content2), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsOrganizationsPolicy_description(t *testing.T) { + var policy organizations.Policy + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_organizations_policy.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOrganizationsPolicyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOrganizationsPolicyConfig_Description(rName, "description1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsOrganizationsPolicyExists(resourceName, &policy), + resource.TestCheckResourceAttr(resourceName, "description", "description1"), + ), + }, + { + Config: testAccAwsOrganizationsPolicyConfig_Description(rName, "description2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsOrganizationsPolicyExists(resourceName, &policy), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsOrganizationsPolicyDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).organizationsconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_organizations_policy" { + continue + } + + input := &organizations.DescribePolicyInput{ + PolicyId: &rs.Primary.ID, + } + + resp, err := conn.DescribePolicy(input) + + if err != nil { + if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { + return nil + } + return err + } + + if resp == nil && resp.Policy != nil { + return fmt.Errorf("Policy %q still exists", rs.Primary.ID) + } + } + + return nil + +} + +func testAccCheckAwsOrganizationsPolicyExists(resourceName string, policy *organizations.Policy) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + conn := testAccProvider.Meta().(*AWSClient).organizationsconn + input := &organizations.DescribePolicyInput{ + PolicyId: &rs.Primary.ID, + } + + resp, err := conn.DescribePolicy(input) + + if err != nil { + return err + } + + if resp == nil || resp.Policy == nil { + return fmt.Errorf("Policy %q does not exist", rs.Primary.ID) + } + + *policy = *resp.Policy + + return nil + } +} + +func testAccAwsOrganizationsPolicyConfig_Description(rName, description string) string { + return fmt.Sprintf(` +resource "aws_organizations_policy" "test" { + content = "{\"Version\": \"2012-10-17\", \"Statement\": { \"Effect\": \"Allow\", \"Action\": \"*\", \"Resource\": \"*\"}}" + description = "%s" + name = "%s" +} +`, description, rName) +} + +func testAccAwsOrganizationsPolicyConfig_Required(rName, content string) string { + return fmt.Sprintf(` +resource "aws_organizations_policy" "test" { + content = %s + name = "%s" +} +`, strconv.Quote(content), rName) +} diff --git a/website/aws.erb b/website/aws.erb index 8f1f078d61c..f9275767e10 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1423,6 +1423,9 @@ > aws_organizations_organization + > + aws_organizations_policy + diff --git a/website/docs/r/organizations_policy.html.markdown b/website/docs/r/organizations_policy.html.markdown new file mode 100644 index 00000000000..8656ec1b4bf --- /dev/null +++ b/website/docs/r/organizations_policy.html.markdown @@ -0,0 +1,49 @@ +--- +layout: "aws" +page_title: "AWS: aws_organizations_policy" +sidebar_current: "docs-aws-resource-organizations-policy" +description: |- + Provides a resource to manage an AWS Organizations policy. +--- + +# aws_organizations_policy + +Provides a resource to manage an [AWS Organizations policy](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html). + +## Example Usage + +```hcl +data "aws_iam_policy_document" "example" { + statement { + actions = ["*"] + resources = ["*"] + } +} + +resource "aws_organizations_policy" "example" { + content = "${data.aws_iam_policy_document.example.json}" + name = "example" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `content` - (Required) The policy content to add to the new policy. For example, if you create a [service control policy (SCP)](http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html), this string must be JSON text that specifies the permissions that admins in attached accounts can delegate to their users, groups, and roles. For more information about the SCP syntax, see the [Service Control Policy Syntax documentation]((http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)). +* `name` - (Required) The friendly name to assign to the policy. +* `description` - (Optional) A description to assign to the policy. +* `type` - (Optional) The type of policy to create. Currently, the only valid value is `SERVICE_CONTROL_POLICY` (SCP). + +## Attribute Reference + +* `id` - The unique identifier (ID) of the policy. +* `arn` - Amazon Resource Name (ARN) of the policy. + +## Import + +`aws_organizations_policy` can be imported by using the policy ID, e.g. + +``` +$ terraform import aws_organizations_policy.example p-12345678 +``` From 5006ea92d12b43adf1d5e8f6701c1588eb65b6bd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 18 Apr 2018 11:07:22 -0400 Subject: [PATCH 0659/3316] docs/resource/aws_organizations_policy: Adjust links to https and remove extraneous parenthesis --- website/docs/r/organizations_policy.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/organizations_policy.html.markdown b/website/docs/r/organizations_policy.html.markdown index 8656ec1b4bf..3ad79d03b6e 100644 --- a/website/docs/r/organizations_policy.html.markdown +++ b/website/docs/r/organizations_policy.html.markdown @@ -30,7 +30,7 @@ resource "aws_organizations_policy" "example" { The following arguments are supported: -* `content` - (Required) The policy content to add to the new policy. For example, if you create a [service control policy (SCP)](http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html), this string must be JSON text that specifies the permissions that admins in attached accounts can delegate to their users, groups, and roles. For more information about the SCP syntax, see the [Service Control Policy Syntax documentation]((http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)). +* `content` - (Required) The policy content to add to the new policy. For example, if you create a [service control policy (SCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html), this string must be JSON text that specifies the permissions that admins in attached accounts can delegate to their users, groups, and roles. For more information about the SCP syntax, see the [Service Control Policy Syntax documentation]((https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html). * `name` - (Required) The friendly name to assign to the policy. * `description` - (Optional) A description to assign to the policy. * `type` - (Optional) The type of policy to create. Currently, the only valid value is `SERVICE_CONTROL_POLICY` (SCP). From 3a3bce4345777daa1c540cc3737fa91a4873527d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 18 Apr 2018 11:17:59 -0400 Subject: [PATCH 0660/3316] docs/resource/aws_organizations_policy: Use heredoc for example instead of aws_iam_policy_document data source --- .../docs/r/organizations_policy.html.markdown | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/website/docs/r/organizations_policy.html.markdown b/website/docs/r/organizations_policy.html.markdown index 3ad79d03b6e..fa46ae3867e 100644 --- a/website/docs/r/organizations_policy.html.markdown +++ b/website/docs/r/organizations_policy.html.markdown @@ -13,16 +13,19 @@ Provides a resource to manage an [AWS Organizations policy](https://docs.aws.ama ## Example Usage ```hcl -data "aws_iam_policy_document" "example" { - statement { - actions = ["*"] - resources = ["*"] - } -} - resource "aws_organizations_policy" "example" { - content = "${data.aws_iam_policy_document.example.json}" name = "example" + + content = < Date: Wed, 18 Apr 2018 12:27:19 -0400 Subject: [PATCH 0661/3316] Update CHANGELOG for #4117 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c960ee1da01..fefd58e909a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.15.0 (Unreleased) +NOTES: + +* resource/aws_cloudfront_distribution: Please note the `cache_behavior` argument (an unordered list) has been marked deprecated in favor of the `ordered_cache_behavior` argument (an ordered list based on the Terraform configuration ordering). This is to support proper cache behavior precedence within a CloudFront distribution. + FEATURES: * **New Data Source:** `aws_api_gateway_rest_api` [GH-4172] @@ -17,6 +21,7 @@ ENHANCEMENTS: * data-source/aws_iam_server_certificate: Filter by `path_prefix` [GH-3801] * resource/aws_api_gateway_integration: Support VPC connection [GH-3428] +* resource/aws_cloudfront_distribution: Added `ordered_cache_behavior` argument, deprecate `cache_behavior` [GH-4117] * resource/aws_db_instance: Support `enabled_cloudwatch_logs_exports` argument [GH-4111] * resource/aws_db_option_group: Support option version argument [GH-2590] * resource/aws_ecs_service: Support ServiceRegistries [GH-3906] From bb853fed55bad9cbc466f68b73faaac5b9d246a1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 18 Apr 2018 10:51:05 -0400 Subject: [PATCH 0662/3316] resource/aws_kinesis_firehose_delivery_stream: Support Redshift processing_configuration --- ...ce_aws_kinesis_firehose_delivery_stream.go | 9 ++++ ...s_kinesis_firehose_delivery_stream_test.go | 41 +++++++++++++++++-- ...sis_firehose_delivery_stream.html.markdown | 1 + 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index c32bdba849a..2811165df0e 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -254,6 +254,7 @@ func flattenFirehoseRedshiftConfiguration(description *firehose.RedshiftDestinat "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), "cluster_jdbcurl": aws.StringValue(description.ClusterJDBCURL), "password": configuredPassword, + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), "role_arn": aws.StringValue(description.RoleARN), "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), "s3_backup_mode": aws.StringValue(description.S3BackupMode), @@ -590,6 +591,8 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Sensitive: true, }, + "processing_configuration": processingConfigurationSchema(), + "role_arn": { Type: schema.TypeString, Required: true, @@ -1129,6 +1132,9 @@ func createRedshiftConfig(d *schema.ResourceData, s3Config *firehose.S3Destinati if _, ok := redshift["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) } + if _, ok := redshift["processing_configuration"]; ok { + configuration.ProcessingConfiguration = extractProcessingConfiguration(redshift) + } if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { configuration.S3BackupMode = aws.String(s3BackupMode.(string)) configuration.S3BackupConfiguration = expandS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) @@ -1159,6 +1165,9 @@ func updateRedshiftConfig(d *schema.ResourceData, s3Update *firehose.S3Destinati if _, ok := redshift["cloudwatch_logging_options"]; ok { configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(redshift) } + if _, ok := redshift["processing_configuration"]; ok { + configuration.ProcessingConfiguration = extractProcessingConfiguration(redshift) + } if s3BackupMode, ok := redshift["s3_backup_mode"]; ok { configuration.S3BackupMode = aws.String(s3BackupMode.(string)) configuration.S3BackupUpdate = updateS3BackupConfig(d.Get("redshift_configuration").([]interface{})[0].(map[string]interface{})) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index 963f0b54d1c..a7426a50756 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -290,16 +290,35 @@ func TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates(t *testing.T) var stream firehose.DeliveryStreamDescription ri := acctest.RandInt() + rString := acctest.RandString(8) + funcName := fmt.Sprintf("aws_kinesis_firehose_delivery_stream_test_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_%s", rString) + roleName := fmt.Sprintf("tf_acc_role_%s", rString) preConfig := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_RedshiftBasic, ri, ri, ri, ri, ri) - postConfig := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_RedshiftUpdates, - ri, ri, ri, ri, ri) + postConfig := testAccFirehoseAWSLambdaConfigBasic(funcName, policyName, roleName) + + fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_RedshiftUpdates, + ri, ri, ri, ri, ri) updatedRedshiftConfig := &firehose.RedshiftDestinationDescription{ CopyCommand: &firehose.CopyCommand{ CopyOptions: aws.String("GZIP"), }, S3BackupMode: aws.String("Enabled"), + ProcessingConfiguration: &firehose.ProcessingConfiguration{ + Enabled: aws.Bool(true), + Processors: []*firehose.Processor{ + &firehose.Processor{ + Type: aws.String("Lambda"), + Parameters: []*firehose.ProcessorParameter{ + &firehose.ProcessorParameter{ + ParameterName: aws.String("LambdaArn"), + ParameterValue: aws.String("valueNotTested"), + }, + }, + }, + }, + }, } resource.Test(t, resource.TestCase{ @@ -558,7 +577,7 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del r := redshiftConfig.(*firehose.RedshiftDestinationDescription) // Range over the Stream Destinations, looking for the matching Redshift // destination - var matchCopyOptions, matchS3BackupMode bool + var matchCopyOptions, matchS3BackupMode, processingConfigMatch bool for _, d := range stream.Destinations { if d.RedshiftDestinationDescription != nil { if *d.RedshiftDestinationDescription.CopyCommand.CopyOptions == *r.CopyCommand.CopyOptions { @@ -567,11 +586,17 @@ func testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(stream *firehose.Del if *d.RedshiftDestinationDescription.S3BackupMode == *r.S3BackupMode { matchS3BackupMode = true } + if r.ProcessingConfiguration != nil && d.RedshiftDestinationDescription.ProcessingConfiguration != nil { + processingConfigMatch = len(r.ProcessingConfiguration.Processors) == len(d.RedshiftDestinationDescription.ProcessingConfiguration.Processors) + } } } if !matchCopyOptions || !matchS3BackupMode { return fmt.Errorf("Mismatch Redshift CopyOptions or S3BackupMode, expected: %s, got: %s", r, stream.Destinations) } + if !processingConfigMatch { + return fmt.Errorf("Mismatch Redshift ProcessingConfiguration.Processors count, expected: %s, got: %s", r, stream.Destinations) + } } if elasticsearchConfig != nil { @@ -1177,6 +1202,16 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { data_table_name = "test-table" copy_options = "GZIP" data_table_columns = "test-col" + processing_configuration = [{ + enabled = "false", + processors = [{ + type = "Lambda" + parameters = [{ + parameter_name = "LambdaArn" + parameter_value = "${aws_lambda_function.lambda_function_test.arn}:$LATEST" + }] + }] + }] } }` diff --git a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown index 1737aaef09a..4b923ed0a21 100644 --- a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown +++ b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown @@ -302,6 +302,7 @@ The `redshift_configuration` object supports the following: * `copy_options` - (Optional) Copy options for copying the data from the s3 intermediate bucket into redshift, for example to change the default delimiter. For valid values, see the [AWS documentation](http://docs.aws.amazon.com/firehose/latest/APIReference/API_CopyCommand.html) * `data_table_columns` - (Optional) The data table columns that will be targeted by the copy command. * `cloudwatch_logging_options` - (Optional) The CloudWatch Logging Options for the delivery stream. More details are given below +* `processing_configuration` - (Optional) The data processing configuration. More details are given below. The `elasticsearch_configuration` object supports the following: From 8da97aa7ae28065e58bfa1f6fc5b2355591a2e7d Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 18 Apr 2018 17:38:19 +0000 Subject: [PATCH 0663/3316] v1.15.0 --- CHANGELOG.md | 72 ++++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fefd58e909a..223c8d16d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.15.0 (Unreleased) +## 1.15.0 (April 18, 2018) NOTES: @@ -6,47 +6,47 @@ NOTES: FEATURES: -* **New Data Source:** `aws_api_gateway_rest_api` [GH-4172] -* **New Data Source:** `aws_cloudwatch_log_group` [GH-4167] -* **New Data Source:** `aws_cognito_user_pools` [GH-4212] -* **New Data Source:** `aws_sqs_queue` [GH-2311] -* **New Resource:** `aws_directory_service_conditional_forwarder` [GH-4071] -* **New Resource:** `aws_glue_connection` [GH-4016] -* **New Resource:** `aws_glue_job` [GH-4028] -* **New Resource:** `aws_iam_service_linked_role` [GH-2985] -* **New Resource:** `aws_launch_template` [GH-2927] -* **New Resource:** `aws_ses_domain_identity_verification` [GH-4108] +* **New Data Source:** `aws_api_gateway_rest_api` ([#4172](https://github.com/terraform-providers/terraform-provider-aws/issues/4172)) +* **New Data Source:** `aws_cloudwatch_log_group` ([#4167](https://github.com/terraform-providers/terraform-provider-aws/issues/4167)) +* **New Data Source:** `aws_cognito_user_pools` ([#4212](https://github.com/terraform-providers/terraform-provider-aws/issues/4212)) +* **New Data Source:** `aws_sqs_queue` ([#2311](https://github.com/terraform-providers/terraform-provider-aws/issues/2311)) +* **New Resource:** `aws_directory_service_conditional_forwarder` ([#4071](https://github.com/terraform-providers/terraform-provider-aws/issues/4071)) +* **New Resource:** `aws_glue_connection` ([#4016](https://github.com/terraform-providers/terraform-provider-aws/issues/4016)) +* **New Resource:** `aws_glue_job` ([#4028](https://github.com/terraform-providers/terraform-provider-aws/issues/4028)) +* **New Resource:** `aws_iam_service_linked_role` ([#2985](https://github.com/terraform-providers/terraform-provider-aws/issues/2985)) +* **New Resource:** `aws_launch_template` ([#2927](https://github.com/terraform-providers/terraform-provider-aws/issues/2927)) +* **New Resource:** `aws_ses_domain_identity_verification` ([#4108](https://github.com/terraform-providers/terraform-provider-aws/issues/4108)) ENHANCEMENTS: -* data-source/aws_iam_server_certificate: Filter by `path_prefix` [GH-3801] -* resource/aws_api_gateway_integration: Support VPC connection [GH-3428] -* resource/aws_cloudfront_distribution: Added `ordered_cache_behavior` argument, deprecate `cache_behavior` [GH-4117] -* resource/aws_db_instance: Support `enabled_cloudwatch_logs_exports` argument [GH-4111] -* resource/aws_db_option_group: Support option version argument [GH-2590] -* resource/aws_ecs_service: Support ServiceRegistries [GH-3906] -* resource/aws_iam_service_linked_role: Support `custom_suffix` and `description` arguments [GH-4188] -* resource/aws_service_discovery_service: Support `health_check_custom_config` argument [GH-4083] -* resource/aws_spot_fleet_request: Support configurable delete timeout [GH-3940] -* resource/aws_spot_instance_request: Support optionally fetching password data [GH-4189] -* resource/aws_waf_rate_based_rule: Support `RegexMatch` predicate type [GH-4069] -* resource/aws_waf_rule: Support `RegexMatch` predicate type [GH-4069] -* resource/aws_wafregional_rate_based_rule: Support `RegexMatch` predicate type [GH-4069] +* data-source/aws_iam_server_certificate: Filter by `path_prefix` ([#3801](https://github.com/terraform-providers/terraform-provider-aws/issues/3801)) +* resource/aws_api_gateway_integration: Support VPC connection ([#3428](https://github.com/terraform-providers/terraform-provider-aws/issues/3428)) +* resource/aws_cloudfront_distribution: Added `ordered_cache_behavior` argument, deprecate `cache_behavior` ([#4117](https://github.com/terraform-providers/terraform-provider-aws/issues/4117)) +* resource/aws_db_instance: Support `enabled_cloudwatch_logs_exports` argument ([#4111](https://github.com/terraform-providers/terraform-provider-aws/issues/4111)) +* resource/aws_db_option_group: Support option version argument ([#2590](https://github.com/terraform-providers/terraform-provider-aws/issues/2590)) +* resource/aws_ecs_service: Support ServiceRegistries ([#3906](https://github.com/terraform-providers/terraform-provider-aws/issues/3906)) +* resource/aws_iam_service_linked_role: Support `custom_suffix` and `description` arguments ([#4188](https://github.com/terraform-providers/terraform-provider-aws/issues/4188)) +* resource/aws_service_discovery_service: Support `health_check_custom_config` argument ([#4083](https://github.com/terraform-providers/terraform-provider-aws/issues/4083)) +* resource/aws_spot_fleet_request: Support configurable delete timeout ([#3940](https://github.com/terraform-providers/terraform-provider-aws/issues/3940)) +* resource/aws_spot_instance_request: Support optionally fetching password data ([#4189](https://github.com/terraform-providers/terraform-provider-aws/issues/4189)) +* resource/aws_waf_rate_based_rule: Support `RegexMatch` predicate type ([#4069](https://github.com/terraform-providers/terraform-provider-aws/issues/4069)) +* resource/aws_waf_rule: Support `RegexMatch` predicate type ([#4069](https://github.com/terraform-providers/terraform-provider-aws/issues/4069)) +* resource/aws_wafregional_rate_based_rule: Support `RegexMatch` predicate type ([#4069](https://github.com/terraform-providers/terraform-provider-aws/issues/4069)) BUG FIXES: -* resource/aws_athena_database: Handle database names with uppercase and underscores [GH-4133] -* resource/aws_codebuild_project: Retry UpdateProject for IAM eventual consistency [GH-4238] -* resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates [GH-4194] -* resource/aws_cognito_user_group: Fix `role_arn` updates [GH-4237] -* resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes [GH-4093] -* resource/aws_emr_cluster: Force new resource if any of the `ec2_attributes` change [GH-4218] -* resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion [GH-4209] -* resource/aws_lb: Force new resource if any of the `subnet_mapping` attributes change [GH-4086] -* resource/aws_rds_cluster: Properly handle `engine_version` with `snapshot_identifier` [GH-4215] -* resource/aws_route53_record: Improved handling of non-alphanumeric record names [GH-4183] -* resource/aws_spot_instance_request: Fix `instance_interuption_behaviour` hibernate and stop handling with placement [GH-1986] -* resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors [GH-4136] +* resource/aws_athena_database: Handle database names with uppercase and underscores ([#4133](https://github.com/terraform-providers/terraform-provider-aws/issues/4133)) +* resource/aws_codebuild_project: Retry UpdateProject for IAM eventual consistency ([#4238](https://github.com/terraform-providers/terraform-provider-aws/issues/4238)) +* resource/aws_codedeploy_deployment_config: Force new resource for `minimum_healthy_hosts` updates ([#4194](https://github.com/terraform-providers/terraform-provider-aws/issues/4194)) +* resource/aws_cognito_user_group: Fix `role_arn` updates ([#4237](https://github.com/terraform-providers/terraform-provider-aws/issues/4237)) +* resource/aws_elasticache_replication_group: Increase default create timeout to 60 minutes ([#4093](https://github.com/terraform-providers/terraform-provider-aws/issues/4093)) +* resource/aws_emr_cluster: Force new resource if any of the `ec2_attributes` change ([#4218](https://github.com/terraform-providers/terraform-provider-aws/issues/4218)) +* resource/aws_iam_role: Suppress `NoSuchEntity` errors while detaching policies from role during deletion ([#4209](https://github.com/terraform-providers/terraform-provider-aws/issues/4209)) +* resource/aws_lb: Force new resource if any of the `subnet_mapping` attributes change ([#4086](https://github.com/terraform-providers/terraform-provider-aws/issues/4086)) +* resource/aws_rds_cluster: Properly handle `engine_version` with `snapshot_identifier` ([#4215](https://github.com/terraform-providers/terraform-provider-aws/issues/4215)) +* resource/aws_route53_record: Improved handling of non-alphanumeric record names ([#4183](https://github.com/terraform-providers/terraform-provider-aws/issues/4183)) +* resource/aws_spot_instance_request: Fix `instance_interuption_behaviour` hibernate and stop handling with placement ([#1986](https://github.com/terraform-providers/terraform-provider-aws/issues/1986)) +* resource/aws_vpc_dhcp_options: Handle plural and non-plural `InvalidDhcpOptionsID.NotFound` errors ([#4136](https://github.com/terraform-providers/terraform-provider-aws/issues/4136)) ## 1.14.1 (April 11, 2018) From 5833fe22fcfad1cefddbc46bf2a1e503515b44b3 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 18 Apr 2018 17:44:34 +0000 Subject: [PATCH 0664/3316] Cleanup after v1.15.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 223c8d16d78..d0598f00912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.16.0 (Unreleased) ## 1.15.0 (April 18, 2018) NOTES: From 8b8fa36161db08a2aa3c22eea2b35a2303d8227f Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Wed, 18 Apr 2018 21:38:16 +0200 Subject: [PATCH 0665/3316] data-source/cognito-user-pools: add attribute of arns --- aws/data_source_aws_cognito_user_pools.go | 21 ++++++++++++++++++- ...data_source_aws_cognito_user_pools_test.go | 5 +++-- website/docs/d/cognito_user_pools.markdown | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/aws/data_source_aws_cognito_user_pools.go b/aws/data_source_aws_cognito_user_pools.go index f365e0987c8..700f9f4958d 100644 --- a/aws/data_source_aws_cognito_user_pools.go +++ b/aws/data_source_aws_cognito_user_pools.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/hashicorp/terraform/helper/schema" ) @@ -21,6 +22,11 @@ func dataSourceAwsCognitoUserPools() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "arns": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, } } @@ -29,6 +35,7 @@ func dataSourceAwsCognitoUserPoolsRead(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).cognitoidpconn name := d.Get("name").(string) var ids []string + var arns []string pools, err := getAllCognitoUserPools(conn) if err != nil { @@ -36,7 +43,17 @@ func dataSourceAwsCognitoUserPoolsRead(d *schema.ResourceData, meta interface{}) } for _, pool := range pools { if name == aws.StringValue(pool.Name) { - ids = append(ids, aws.StringValue(pool.Id)) + id := aws.StringValue(pool.Id) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "cognito-idp", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("userpool/%s", id), + }.String() + + ids = append(ids, id) + arns = append(arns, arn) } } @@ -46,6 +63,8 @@ func dataSourceAwsCognitoUserPoolsRead(d *schema.ResourceData, meta interface{}) d.SetId(name) d.Set("ids", ids) + d.Set("arns", arns) + return nil } diff --git a/aws/data_source_aws_cognito_user_pools_test.go b/aws/data_source_aws_cognito_user_pools_test.go index 2e49cbbb1d8..a8bdd1ae142 100644 --- a/aws/data_source_aws_cognito_user_pools_test.go +++ b/aws/data_source_aws_cognito_user_pools_test.go @@ -18,7 +18,8 @@ func TestAccDataSourceAwsCognitoUserPools_basic(t *testing.T) { { Config: testAccDataSourceAwsCognitoUserPoolsConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_cognito_user_pools.selected", "ids.#", "3"), + resource.TestCheckResourceAttr("data.aws_cognito_user_pools.selected", "ids.#", "2"), + resource.TestCheckResourceAttr("data.aws_cognito_user_pools.selected", "arns.#", "2"), ), }, { @@ -32,7 +33,7 @@ func TestAccDataSourceAwsCognitoUserPools_basic(t *testing.T) { func testAccDataSourceAwsCognitoUserPoolsConfig_basic(rName string) string { return fmt.Sprintf(` resource "aws_cognito_user_pool" "main" { - count = 3 + count = 2 name = "%s" } diff --git a/website/docs/d/cognito_user_pools.markdown b/website/docs/d/cognito_user_pools.markdown index ebbf82fc99a..fd2dde3cae7 100644 --- a/website/docs/d/cognito_user_pools.markdown +++ b/website/docs/d/cognito_user_pools.markdown @@ -25,7 +25,7 @@ resource "aws_api_gateway_authorizer" "cognito" { name = "cognito" type = "COGNITO_USER_POOLS" rest_api_id = "${data.aws_api_gateway_rest_api.selected.id}" - provider_arns = ["${data.aws_cognito_user_pools.selected.ids}"] + provider_arns = ["${data.aws_cognito_user_pools.selected.arns}"] } ``` From 2366f60c71cd9fc6099b51fce50b1ccbf75dfa28 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Wed, 18 Apr 2018 22:25:48 +0200 Subject: [PATCH 0666/3316] resource/launch_configuration: add new argument user_data_base64 to support base64-encoded data --- aws/resource_aws_launch_configuration.go | 39 ++++++++++++++----- .../docs/r/launch_configuration.html.markdown | 3 +- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index 4ba3436dafb..806320af56c 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -2,8 +2,6 @@ package aws import ( "bytes" - "crypto/sha1" - "encoding/hex" "fmt" "log" "time" @@ -69,14 +67,14 @@ func resourceAwsLaunchConfiguration() *schema.Resource { }, "user_data": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"user_data_base64"}, StateFunc: func(v interface{}) string { switch v.(type) { case string: - hash := sha1.Sum([]byte(v.(string))) - return hex.EncodeToString(hash[:]) + return userDataHashSum(v.(string)) default: return "" } @@ -84,6 +82,22 @@ func resourceAwsLaunchConfiguration() *schema.Resource { ValidateFunc: validation.StringLenBetween(1, 16384), }, + "user_data_base64": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"user_data"}, + ValidateFunc: func(v interface{}, name string) (warns []string, errs []error) { + s := v.(string) + if !isBase64Encoded([]byte(s)) { + errs = append(errs, fmt.Errorf( + "%s: must be base64-encoded", name, + )) + } + return + }, + }, + "security_groups": { Type: schema.TypeSet, Optional: true, @@ -286,6 +300,8 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface if v, ok := d.GetOk("user_data"); ok { userData := base64Encode([]byte(v.(string))) createLaunchConfigurationOpts.UserData = aws.String(userData) + } else if v, ok := d.GetOk("user_data_base64"); ok { + createLaunchConfigurationOpts.UserData = aws.String(v.(string)) } createLaunchConfigurationOpts.InstanceMonitoring = &autoscaling.InstanceMonitoring{ @@ -523,8 +539,13 @@ func resourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{} if err := d.Set("security_groups", flattenStringList(lc.SecurityGroups)); err != nil { return fmt.Errorf("error setting security_groups: %s", err) } - if aws.StringValue(lc.UserData) != "" { - d.Set("user_data", userDataHashSum(*lc.UserData)) + if v := aws.StringValue(lc.UserData); v != "" { + _, b64 := d.GetOk("user_data_base64") + if b64 { + d.Set("user_data_base64", v) + } else { + d.Set("user_data", userDataHashSum(v)) + } } d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) diff --git a/website/docs/r/launch_configuration.html.markdown b/website/docs/r/launch_configuration.html.markdown index bd4a1578384..2177c67cf1d 100644 --- a/website/docs/r/launch_configuration.html.markdown +++ b/website/docs/r/launch_configuration.html.markdown @@ -148,7 +148,8 @@ The following arguments are supported: * `associate_public_ip_address` - (Optional) Associate a public ip address with an instance in a VPC. * `vpc_classic_link_id` - (Optional) The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. `vpc-2730681a`) * `vpc_classic_link_security_groups` - (Optional) The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. `sg-46ae3d11`). -* `user_data` - (Optional) The user data to provide when launching the instance. +* `user_data` - (Optional) The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see `user_data_base64` instead. +* `user_data_base64` - (Optional) Can be used instead of `user_data` to pass base64-encoded binary data directly. Use this instead of `user_data` whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption. * `enable_monitoring` - (Optional) Enables/disables detailed monitoring. This is enabled by default. * `ebs_optimized` - (Optional) If true, the launched EC2 instance will be EBS-optimized. * `root_block_device` - (Optional) Customize details about the root block From ac9d85eff87a9b273a470f2e0f0c351a5c709579 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Wed, 18 Apr 2018 22:56:46 +0200 Subject: [PATCH 0667/3316] resource/launch_configuration: fix tests --- aws/resource_aws_launch_configuration_test.go | 236 ++++++++++-------- 1 file changed, 129 insertions(+), 107 deletions(-) diff --git a/aws/resource_aws_launch_configuration_test.go b/aws/resource_aws_launch_configuration_test.go index c303dc698ad..9bdc253a2a3 100644 --- a/aws/resource_aws_launch_configuration_test.go +++ b/aws/resource_aws_launch_configuration_test.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "math/rand" + "regexp" "strings" "testing" "time" @@ -89,16 +90,14 @@ func TestAccAWSLaunchConfiguration_basic(t *testing.T) { Config: testAccAWSLaunchConfigurationNoNameConfig, Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), - testAccCheckAWSLaunchConfigurationGeneratedNamePrefix( - "aws_launch_configuration.bar", "terraform-"), + testAccCheckAWSLaunchConfigurationGeneratedNamePrefix("aws_launch_configuration.bar", "terraform-"), ), }, { Config: testAccAWSLaunchConfigurationPrefixNameConfig, Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), - testAccCheckAWSLaunchConfigurationGeneratedNamePrefix( - "aws_launch_configuration.baz", "tf-acc-test-"), + testAccCheckAWSLaunchConfigurationGeneratedNamePrefix("aws_launch_configuration.baz", "tf-acc-test-"), ), }, }, @@ -118,14 +117,10 @@ func TestAccAWSLaunchConfiguration_withBlockDevices(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), testAccCheckAWSLaunchConfigurationAttributes(&conf), - resource.TestCheckResourceAttr( - "aws_launch_configuration.bar", "image_id", "ami-21f78e11"), - resource.TestCheckResourceAttr( - "aws_launch_configuration.bar", "instance_type", "m1.small"), - resource.TestCheckResourceAttr( - "aws_launch_configuration.bar", "associate_public_ip_address", "true"), - resource.TestCheckResourceAttr( - "aws_launch_configuration.bar", "spot_price", ""), + resource.TestMatchResourceAttr("aws_launch_configuration.bar", "image_id", regexp.MustCompile("^ami-[0-9a-z]+")), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "instance_type", "m1.small"), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "associate_public_ip_address", "true"), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "spot_price", ""), ), }, }, @@ -145,16 +140,14 @@ func TestAccAWSLaunchConfiguration_updateRootBlockDevice(t *testing.T) { Config: testAccAWSLaunchConfigurationConfigWithRootBlockDevice(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), - resource.TestCheckResourceAttr( - "aws_launch_configuration.bar", "root_block_device.0.volume_size", "11"), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "root_block_device.0.volume_size", "11"), ), }, { Config: testAccAWSLaunchConfigurationConfigWithRootBlockDeviceUpdated(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), - resource.TestCheckResourceAttr( - "aws_launch_configuration.bar", "root_block_device.0.volume_size", "20"), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "root_block_device.0.volume_size", "20"), ), }, }, @@ -173,8 +166,7 @@ func TestAccAWSLaunchConfiguration_withSpotPrice(t *testing.T) { Config: testAccAWSLaunchConfigurationWithSpotPriceConfig, Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), - resource.TestCheckResourceAttr( - "aws_launch_configuration.bar", "spot_price", "0.01"), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "spot_price", "0.01"), ), }, }, @@ -285,16 +277,14 @@ func TestAccAWSLaunchConfiguration_updateEbsBlockDevices(t *testing.T) { Config: testAccAWSLaunchConfigurationWithEncryption, Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), - resource.TestCheckResourceAttr( - "aws_launch_configuration.baz", "ebs_block_device.1393547169.volume_size", "9"), + resource.TestCheckResourceAttr("aws_launch_configuration.baz", "ebs_block_device.1393547169.volume_size", "9"), ), }, { Config: testAccAWSLaunchConfigurationWithEncryptionUpdated, Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), - resource.TestCheckResourceAttr( - "aws_launch_configuration.baz", "ebs_block_device.4131155854.volume_size", "10"), + resource.TestCheckResourceAttr("aws_launch_configuration.baz", "ebs_block_device.4131155854.volume_size", "10"), ), }, }, @@ -372,10 +362,6 @@ func testAccCheckAWSLaunchConfigurationDestroy(s *terraform.State) error { func testAccCheckAWSLaunchConfigurationAttributes(conf *autoscaling.LaunchConfiguration) resource.TestCheckFunc { return func(s *terraform.State) error { - if *conf.ImageId != "ami-21f78e11" { - return fmt.Errorf("Bad image_id: %s", *conf.ImageId) - } - if !strings.HasPrefix(*conf.LaunchConfigurationName, "terraform-") && !strings.HasPrefix(*conf.LaunchConfigurationName, "tf-acc-test-") { return fmt.Errorf("Bad name: %s", *conf.LaunchConfigurationName) } @@ -447,38 +433,44 @@ func testAccCheckAWSLaunchConfigurationExists(n string, res *autoscaling.LaunchC } } -func testAccAWSLaunchConfigurationConfigWithRootBlockDevice(rInt int) string { +func testAccAWSLaunchConfigurationConfig_ami() string { return fmt.Sprintf(` +data "aws_ami" "amazon_ami" { + most_recent = true + owners = ["amazon"] +} +`) +} +func testAccAWSLaunchConfigurationConfigWithRootBlockDevice(rInt int) string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name_prefix = "tf-acc-test-%d" - image_id = "ami-21f78e11" + image_id = "${data.aws_ami.amazon_ami.id}" instance_type = "m1.small" user_data = "foobar-user-data" associate_public_ip_address = true - root_block_device { - volume_type = "gp2" - volume_size = 11 - } - + root_block_device { + volume_type = "gp2" + volume_size = 11 + } } `, rInt) } func testAccAWSLaunchConfigurationConfigWithRootBlockDeviceUpdated(rInt int) string { - return fmt.Sprintf(` + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name_prefix = "tf-acc-test-%d" - image_id = "ami-21f78e11" + image_id = "${data.aws_ami.amazon_ami.id}" instance_type = "m1.small" user_data = "foobar-user-data" associate_public_ip_address = true - root_block_device { - volume_type = "gp2" - volume_size = 20 - } - + root_block_device { + volume_type = "gp2" + volume_size = 20 + } } `, rInt) } @@ -486,98 +478,128 @@ resource "aws_launch_configuration" "bar" { var testAccAWSLaunchConfigurationConfig = fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name = "tf-acc-test-%d" - image_id = "ami-21f78e11" + image_id = "${data.aws_ami.amazon_ami.id}" instance_type = "m1.small" user_data = "foobar-user-data" associate_public_ip_address = true - root_block_device { - volume_type = "gp2" - volume_size = 11 - } - ebs_block_device { - device_name = "/dev/sdb" - volume_size = 9 - } - ebs_block_device { - device_name = "/dev/sdc" - volume_size = 10 - volume_type = "io1" - iops = 100 - } - ephemeral_block_device { - device_name = "/dev/sde" - virtual_name = "ephemeral0" - } + root_block_device { + volume_type = "gp2" + volume_size = 11 + } + ebs_block_device { + device_name = "/dev/sdb" + volume_size = 9 + } + ebs_block_device { + device_name = "/dev/sdc" + volume_size = 10 + volume_type = "io1" + iops = 100 + } + ephemeral_block_device { + device_name = "/dev/sde" + virtual_name = "ephemeral0" + } +} + +data "aws_ami" "amazon_ami" { + most_recent = true + owners = ["amazon"] } `, rand.New(rand.NewSource(time.Now().UnixNano())).Int()) var testAccAWSLaunchConfigurationWithSpotPriceConfig = fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name = "tf-acc-test-%d" - image_id = "ami-21f78e11" - instance_type = "t1.micro" + image_id = "${data.aws_ami.amazon_ami.id}" + instance_type = "t2.micro" spot_price = "0.01" } + +data "aws_ami" "amazon_ami" { + most_recent = true + owners = ["amazon"] +} `, rand.New(rand.NewSource(time.Now().UnixNano())).Int()) const testAccAWSLaunchConfigurationNoNameConfig = ` resource "aws_launch_configuration" "bar" { - image_id = "ami-21f78e11" - instance_type = "t1.micro" - user_data = "foobar-user-data-change" - associate_public_ip_address = false + image_id = "${data.aws_ami.amazon_ami.id}" + instance_type = "t2.micro" + user_data = "foobar-user-data-change" + associate_public_ip_address = false +} + +data "aws_ami" "amazon_ami" { + most_recent = true + owners = ["amazon"] } ` const testAccAWSLaunchConfigurationPrefixNameConfig = ` resource "aws_launch_configuration" "baz" { - name_prefix = "tf-acc-test-" - image_id = "ami-21f78e11" - instance_type = "t1.micro" - user_data = "foobar-user-data-change" - associate_public_ip_address = false + name_prefix = "tf-acc-test-" + image_id = "${data.aws_ami.amazon_ami.id}" + instance_type = "t2.micro" + user_data = "foobar-user-data-change" + associate_public_ip_address = false +} + +data "aws_ami" "amazon_ami" { + most_recent = true + owners = ["amazon"] } ` const testAccAWSLaunchConfigurationWithEncryption = ` resource "aws_launch_configuration" "baz" { - image_id = "ami-5189a661" - instance_type = "t2.micro" - associate_public_ip_address = false + image_id = "${data.aws_ami.amazon_ami.id}" + instance_type = "t2.micro" + associate_public_ip_address = false - root_block_device { - volume_type = "gp2" - volume_size = 11 - } - ebs_block_device { - device_name = "/dev/sdb" - volume_size = 9 - encrypted = true - } + root_block_device { + volume_type = "gp2" + volume_size = 11 + } + ebs_block_device { + device_name = "/dev/sdb" + volume_size = 9 + encrypted = true + } +} + +data "aws_ami" "amazon_ami" { + most_recent = true + owners = ["amazon"] } ` const testAccAWSLaunchConfigurationWithEncryptionUpdated = ` resource "aws_launch_configuration" "baz" { - image_id = "ami-5189a661" - instance_type = "t2.micro" - associate_public_ip_address = false + image_id = "${data.aws_ami.amazon_ami.id}" + instance_type = "t2.micro" + associate_public_ip_address = false - root_block_device { - volume_type = "gp2" - volume_size = 11 - } - ebs_block_device { - device_name = "/dev/sdb" - volume_size = 10 - encrypted = true - } + root_block_device { + volume_type = "gp2" + volume_size = 11 + } + ebs_block_device { + device_name = "/dev/sdb" + volume_size = 10 + encrypted = true + } +} + +data "aws_ami" "amazon_ami" { + most_recent = true + owners = ["amazon"] } ` func testAccAWSLaunchConfigurationConfig_withVpcClassicLink(rInt int) string { - return fmt.Sprintf(` + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_vpc" "foo" { cidr_block = "10.0.0.0/16" enable_classiclink = true @@ -592,20 +614,20 @@ resource "aws_security_group" "foo" { } resource "aws_launch_configuration" "foo" { - name = "tf-acc-test-%[1]d" - image_id = "ami-21f78e11" - instance_type = "t1.micro" + name = "tf-acc-test-%[1]d" + image_id = "${data.aws_ami.amazon_ami.id}" + instance_type = "t2.micro" - vpc_classic_link_id = "${aws_vpc.foo.id}" - vpc_classic_link_security_groups = ["${aws_security_group.foo.id}"] + vpc_classic_link_id = "${aws_vpc.foo.id}" + vpc_classic_link_security_groups = ["${aws_security_group.foo.id}"] } `, rInt) } func testAccAWSLaunchConfigurationConfig_withIAMProfile(rInt int) string { - return fmt.Sprintf(` + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_iam_role" "role" { - name = "tf-acc-test-%[1]d" + name = "tf-acc-test-%[1]d" assume_role_policy = < Date: Sun, 10 Dec 2017 16:28:10 -0500 Subject: [PATCH 0668/3316] add credit specification to instance resource and data --- aws/data_source_aws_instance.go | 19 ++++ aws/data_source_aws_instance_test.go | 42 +++++++++ aws/resource_aws_instance.go | 75 ++++++++++++++++ aws/resource_aws_instance_test.go | 124 ++++++++++++++++++++++++++ website/docs/d/instance.html.markdown | 1 + website/docs/r/instance.html.markdown | 10 +++ 6 files changed, 271 insertions(+) diff --git a/aws/data_source_aws_instance.go b/aws/data_source_aws_instance.go index 23a8fac24c3..a4cc5f82c01 100644 --- a/aws/data_source_aws_instance.go +++ b/aws/data_source_aws_instance.go @@ -222,6 +222,18 @@ func dataSourceAwsInstance() *schema.Resource { }, }, }, + "credit_specification": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cpu_credits": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, }, } } @@ -389,6 +401,13 @@ func instanceDescriptionAttributes(d *schema.ResourceData, instance *ec2.Instanc d.Set("user_data", userDataHashSum(*attr.UserData.Value)) } } + { + creditSpecifications, err := getCreditSpecifications(conn, d.Id()) + if err != nil { + return err + } + d.Set("credit_specification", creditSpecifications) + } return nil } diff --git a/aws/data_source_aws_instance_test.go b/aws/data_source_aws_instance_test.go index a569c31b6d0..cd15e1aca2a 100644 --- a/aws/data_source_aws_instance_test.go +++ b/aws/data_source_aws_instance_test.go @@ -283,6 +283,24 @@ func TestAccAWSInstanceDataSource_getPasswordData_falseToTrue(t *testing.T) { }) } +func TestAccAWSInstanceDataSource_creditSpecification(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + + Config: testAccInstanceDataSourceConfig_creditSpecification, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_instance.foo", "instance_type", "t2.micro"), + resource.TestCheckResourceAttr("data.aws_instance.foo", "credit_specification.#", "1"), + resource.TestCheckResourceAttr("data.aws_instance.foo", "credit_specification.0.cpu_credits", "unlimited"), + ), + }, + }, + }) +} + // Lookup based on InstanceID const testAccInstanceDataSourceConfig = ` resource "aws_instance" "web" { @@ -658,3 +676,27 @@ func testAccInstanceDataSourceConfig_getPasswordData(val bool, rInt int) string } `, rInt, val) } + +const testAccInstanceDataSourceConfig_creditSpecification = ` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_subnet" "foo" { + cidr_block = "10.1.1.0/24" + vpc_id = "${aws_vpc.foo.id}" +} + +resource "aws_instance" "foo" { + ami = "ami-bf4193c7" + instance_type = "t2.micro" + subnet_id = "${aws_subnet.foo.id}" + credit_specification { + cpu_credits = "unlimited" + } +} + +data "aws_instance" "foo" { + instance_id = "${aws_instance.foo.id}" +} +` diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index bea0347f1ae..02804b639fe 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -433,6 +433,22 @@ func resourceAwsInstance() *schema.Resource { }, }, }, + + "credit_specification": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cpu_credits": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + }, + }, }, } } @@ -475,6 +491,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { SecurityGroups: instanceOpts.SecurityGroups, SubnetId: instanceOpts.SubnetID, UserData: instanceOpts.UserData64, + CreditSpecification: instanceOpts.CreditSpecification, } _, ipv6CountOk := d.GetOk("ipv6_address_count") @@ -783,6 +800,13 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { } } } + { + creditSpecifications, err := getCreditSpecifications(conn, d.Id()) + if err != nil { + return err + } + d.Set("credit_specification", creditSpecifications) + } if d.Get("get_password_data").(bool) { passwordData, err := getAwsEc2InstancePasswordData(*instance.InstanceId, conn) @@ -1079,6 +1103,26 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } + if d.HasChange("credit_specification") { + creditSpecifications := d.Get("credit_specification").([]interface{}) + if len(creditSpecifications) == 1 { + creditSpecification := creditSpecifications[0].(map[string]interface{}) + log.Printf("[DEBUG] Modifying credit specification for Instance (%s)", d.Id()) + + _, err := conn.ModifyInstanceCreditSpecification(&ec2.ModifyInstanceCreditSpecificationInput{ + InstanceCreditSpecifications: []*ec2.InstanceCreditSpecificationRequest{ + { + InstanceId: aws.String(d.Id()), + CpuCredits: aws.String(creditSpecification["cpu_credits"].(string)), + }, + }, + }) + if err != nil { + return fmt.Errorf("[WARN] Error updating Instance credit specification: %s", err) + } + } + } + // TODO(mitchellh): wait for the attributes we modified to // persist the change... @@ -1631,6 +1675,7 @@ type awsInstanceOpts struct { SpotPlacement *ec2.SpotPlacement SubnetID *string UserData64 *string + CreditSpecification *ec2.CreditSpecificationRequest } func buildAwsInstanceOpts( @@ -1644,6 +1689,18 @@ func buildAwsInstanceOpts( InstanceType: aws.String(d.Get("instance_type").(string)), } + if v, ok := d.GetOk("credit_specification"); ok { + cs := v.([]interface{}) + for _, csValue := range cs { + creditSpecification := csValue.(map[string]interface{}) + if cpuCredits, ok := creditSpecification["cpu_credits"].(string); ok { + opts.CreditSpecification = &ec2.CreditSpecificationRequest{ + CpuCredits: aws.String(cpuCredits), + } + } + } + } + if v := d.Get("instance_initiated_shutdown_behavior").(string); v != "" { opts.InstanceInitiatedShutdownBehavior = aws.String(v) } @@ -1833,3 +1890,21 @@ func getAwsInstanceVolumeIds(conn *ec2.EC2, d *schema.ResourceData) ([]*string, return volumeIds, nil } + +func getCreditSpecifications(conn *ec2.EC2, instanceId string) ([]map[string]interface{}, error) { + var creditSpecifications []map[string]interface{} + creditSpecification := make(map[string]interface{}) + + attr, err := conn.DescribeInstanceCreditSpecifications(&ec2.DescribeInstanceCreditSpecificationsInput{ + InstanceIds: []*string{aws.String(instanceId)}, + }) + if err != nil { + return nil, err + } + if attr.InstanceCreditSpecifications != nil { + creditSpecification["cpu_credits"] = *attr.InstanceCreditSpecifications[0].CpuCredits + creditSpecifications = append(creditSpecifications, creditSpecification) + } + + return creditSpecifications, nil +} diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index 1bb6b1f75db..bfbfcdb5bca 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -1397,6 +1397,78 @@ func TestAccAWSInstance_getPasswordData_trueToFalse(t *testing.T) { }) } +func TestAccAWSInstance_creditSpecification_standardCpuCredits(t *testing.T) { + var instance ec2.Instance + resName := "aws_instance.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfig_creditSpecification_standardCpuCredits(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &instance), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.0.cpu_credits", "standard"), + ), + }, + }, + }) +} + +func TestAccAWSInstance_creditSpecification_unlimitedCpuCredits(t *testing.T) { + var instance ec2.Instance + resName := "aws_instance.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfig_creditSpecification_unlimitedCpuCredits(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &instance), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.0.cpu_credits", "unlimited"), + ), + }, + }, + }) +} + +func TestAccAWSInstance_creditSpecification_updateCpuCredits(t *testing.T) { + var before ec2.Instance + var after ec2.Instance + resName := "aws_instance.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfig_creditSpecification_standardCpuCredits(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &before), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.0.cpu_credits", "standard"), + ), + }, + { + Config: testAccInstanceConfig_creditSpecification_unlimitedCpuCredits(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &after), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.0.cpu_credits", "unlimited"), + ), + }, + }, + }) +} + func testAccCheckInstanceNotRecreated(t *testing.T, before, after *ec2.Instance) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -2970,3 +3042,55 @@ func testAccInstanceConfig_getPasswordData(val bool, rInt int) string { } `, rInt, val) } + +func testAccInstanceConfig_creditSpecification_standardCpuCredits(rInt int) string { + return fmt.Sprintf(` +resource "aws_vpc" "my_vpc" { + cidr_block = "172.16.0.0/16" + tags { + Name = "tf-acctest-%d" + } +} + +resource "aws_subnet" "my_subnet" { + vpc_id = "${aws_vpc.my_vpc.id}" + cidr_block = "172.16.20.0/24" + availability_zone = "us-west-2a" +} + +resource "aws_instance" "foo" { + ami = "ami-22b9a343" # us-west-2 + instance_type = "t2.micro" + subnet_id = "${aws_subnet.my_subnet.id}" + credit_specification { + cpu_credits = "standard" + } +} +`, rInt) +} + +func testAccInstanceConfig_creditSpecification_unlimitedCpuCredits(rInt int) string { + return fmt.Sprintf(` +resource "aws_vpc" "my_vpc" { + cidr_block = "172.16.0.0/16" + tags { + Name = "tf-acctest-%d" + } +} + +resource "aws_subnet" "my_subnet" { + vpc_id = "${aws_vpc.my_vpc.id}" + cidr_block = "172.16.20.0/24" + availability_zone = "us-west-2a" +} + +resource "aws_instance" "foo" { + ami = "ami-22b9a343" # us-west-2 + instance_type = "t2.micro" + subnet_id = "${aws_subnet.my_subnet.id}" + credit_specification { + cpu_credits = "unlimited" + } +} +`, rInt) +} diff --git a/website/docs/d/instance.html.markdown b/website/docs/d/instance.html.markdown index 29cd449a0f7..ed3cbd10fc7 100644 --- a/website/docs/d/instance.html.markdown +++ b/website/docs/d/instance.html.markdown @@ -102,5 +102,6 @@ interpolation. * `tags` - A mapping of tags assigned to the Instance. * `tenancy` - The tenancy of the instance: `dedicated`, `default`, `host`. * `vpc_security_group_ids` - The associated security groups in a non-default VPC. +* `credit_specification` - The credit specification of the Instance. [1]: http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index cbe343782f5..e762b37c2f1 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -90,6 +90,7 @@ instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/Use * `ephemeral_block_device` - (Optional) Customize Ephemeral (also known as "Instance Store") volumes on the instance. See [Block Devices](#block-devices) below for details. * `network_interface` - (Optional) Customize network interfaces to be attached at instance boot time. See [Network Interfaces](#network-interfaces) below for more details. +* `credit_specification` - (Optional) Customize the credit specification of the instance. See [Credit Specification](#credit-specification) below for more details. ### Timeouts @@ -176,6 +177,14 @@ Each `network_interface` block supports the following: * `network_interface_id` - (Required) The ID of the network interface to attach. * `delete_on_termination` - (Optional) Whether or not to delete the network interface on instance termination. Defaults to `false`. +### Credit Specification + +Credit specification can be applied/modified to the EC2 Instance at any time. + +The `credit_specification` block supports the following: + +* `cpu_credits` - (Optional) The credit option for CPU usage. + ### Example ```hcl @@ -239,6 +248,7 @@ The following attributes are exported: * `security_groups` - The associated security groups. * `vpc_security_group_ids` - The associated security groups in non-default VPC * `subnet_id` - The VPC subnet ID. +* `credit_specification` - Credit specification of instance. For any `root_block_device` and `ebs_block_device` the `volume_id` is exported. e.g. `aws_instance.web.root_block_device.0.volume_id` From ca2251cb5ef07a4443777d5bc296cdddd433f774 Mon Sep 17 00:00:00 2001 From: Dmytro Malovany Date: Thu, 19 Apr 2018 15:28:52 +0200 Subject: [PATCH 0669/3316] fixes #4170 --- aws/resource_aws_ssm_patch_baseline.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_ssm_patch_baseline.go b/aws/resource_aws_ssm_patch_baseline.go index db7edab0308..6e93aee5b0f 100644 --- a/aws/resource_aws_ssm_patch_baseline.go +++ b/aws/resource_aws_ssm_patch_baseline.go @@ -24,6 +24,7 @@ var ssmPatchOSs = []string{ ssm.OperatingSystemAmazonLinux, ssm.OperatingSystemUbuntu, ssm.OperatingSystemRedhatEnterpriseLinux, + ssm.OperatingSystemCentos, } func resourceAwsSsmPatchBaseline() *schema.Resource { From 829a000e6acde31e7734992f7d838fec14150db5 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Thu, 19 Apr 2018 16:49:56 +0100 Subject: [PATCH 0670/3316] Add new data source batch_compute_environment --- ...ta_source_aws_batch_compute_environment.go | 93 ++++++++++++++ ...urce_aws_batch_compute_environment_test.go | 120 ++++++++++++++++++ aws/provider.go | 1 + website/aws.erb | 3 + .../d/batch_compute_environment.html.markdown | 38 ++++++ 5 files changed, 255 insertions(+) create mode 100644 aws/data_source_aws_batch_compute_environment.go create mode 100644 aws/data_source_aws_batch_compute_environment_test.go create mode 100644 website/docs/d/batch_compute_environment.html.markdown diff --git a/aws/data_source_aws_batch_compute_environment.go b/aws/data_source_aws_batch_compute_environment.go new file mode 100644 index 00000000000..f1cd37825d4 --- /dev/null +++ b/aws/data_source_aws_batch_compute_environment.go @@ -0,0 +1,93 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsBatchComputeEnvironment() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsBatchComputeEnvironmentRead, + + Schema: map[string]*schema.Schema{ + "compute_environment_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "ecs_cluster_arn": { + Type: schema.TypeString, + Computed: true, + }, + + "service_role": { + Type: schema.TypeString, + Computed: true, + }, + + "type": { + Type: schema.TypeString, + Computed: true, + }, + + "status": { + Type: schema.TypeString, + Computed: true, + }, + + "status_reason": { + Type: schema.TypeString, + Computed: true, + }, + + "state": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + params := &batch.DescribeComputeEnvironmentsInput{ + ComputeEnvironments: []*string{aws.String(d.Get("compute_environment_name").(string))}, + } + log.Printf("[DEBUG] Reading Batch Compute Environment: %s", params) + desc, err := conn.DescribeComputeEnvironments(params) + + if err != nil { + return err + } + + for _, computeEnvironment := range desc.ComputeEnvironments { + if aws.StringValue(computeEnvironment.ComputeEnvironmentName) != d.Get("compute_environment_name").(string) { + continue + } + d.SetId(aws.StringValue(computeEnvironment.ComputeEnvironmentArn)) + d.Set("arn", computeEnvironment.ComputeEnvironmentArn) + d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) + d.Set("service_role", computeEnvironment.ServiceRole) + d.Set("type", computeEnvironment.Type) + d.Set("status", computeEnvironment.Status) + d.Set("status_reason", computeEnvironment.StatusReason) + d.Set("state", computeEnvironment.State) + } + + if d.Id() == "" { + return fmt.Errorf("compute environment with name %q not found", d.Get("compute_environment_name").(string)) + } + + return nil +} diff --git a/aws/data_source_aws_batch_compute_environment_test.go b/aws/data_source_aws_batch_compute_environment_test.go new file mode 100644 index 00000000000..de312319954 --- /dev/null +++ b/aws/data_source_aws_batch_compute_environment_test.go @@ -0,0 +1,120 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSBatchDataSource_ecsCluster(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAwsBatchComputeEnvironmentDataSourceConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "ecs_cluster_arn", "VALID"), + resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "type", "MANAGED"), + resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "status", "VALID"), + resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "state", "ENABLED"), + resource.TestCheckResourceAttrSet("data.aws_batch_compute_environment.default", "arn"), + ), + }, + }, + }) +} + +var testAccCheckAwsBatchComputeEnvironmentDataSourceConfig = fmt.Sprintf(` +resource "aws_iam_role" "ecs_instance_role" { + name = "ecs_instance_role" + assume_role_policy = <> aws_availability_zones + > + aws_batch_compute_environment + > aws_billing_service_account diff --git a/website/docs/d/batch_compute_environment.html.markdown b/website/docs/d/batch_compute_environment.html.markdown new file mode 100644 index 00000000000..6b7d5a222e0 --- /dev/null +++ b/website/docs/d/batch_compute_environment.html.markdown @@ -0,0 +1,38 @@ +--- +layout: "aws" +page_title: "AWS: aws_batch_compute_environment" +sidebar_current: "docs-aws-datasource-batch-compute-environment" +description: |- + Provides details about a batch compute environment +--- + +# Data Source: aws_batch_compute_environment + +The Batch Compute Environment data source allows access to details of a specific +compute environment within AWS Batch. + +## Example Usage + +```hcl +data "aws_batch_compute_environment" "batch-mongo" { + compute_environment_name = "batch-mongo-production" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `compute_environment_name` - (Required) The name of the Batch Compute Environment + +## Attributes Reference + +The following attributes are exported: + +* `arn` - The ARN of the compute environment. +* `ecs_cluster_arn` - The ARN of the underlying Amazon ECS cluster used by the compute environment. +* `service_role` - The ARN of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf. +* `type` - The type of the compute environment (for example, `MANAGED` or `UNMANAGED`). +* `status` - The current status of the compute environment (for example, `CREATING` or `VALID`). +* `status_reason` - A short, human-readable string to provide additional details about the current status of the compute environment. +* `state` - The state of the compute environment (for example, `ENABLED` or `DISABLED`). If the state is `ENABLED`, then the compute environment accepts jobs from a queue and can scale out automatically based on queues. From dbc04189b414e10541b8b3e07814888d8bdbee84 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Thu, 19 Apr 2018 16:56:33 +0100 Subject: [PATCH 0671/3316] Fix test --- aws/data_source_aws_batch_compute_environment_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/data_source_aws_batch_compute_environment_test.go b/aws/data_source_aws_batch_compute_environment_test.go index de312319954..db505092e10 100644 --- a/aws/data_source_aws_batch_compute_environment_test.go +++ b/aws/data_source_aws_batch_compute_environment_test.go @@ -16,7 +16,6 @@ func TestAccAWSBatchDataSource_ecsCluster(t *testing.T) { { Config: testAccCheckAwsBatchComputeEnvironmentDataSourceConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "ecs_cluster_arn", "VALID"), resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "type", "MANAGED"), resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "status", "VALID"), resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "state", "ENABLED"), From 9346529b187df71fb2dd0f239d0e01aa4d1180c3 Mon Sep 17 00:00:00 2001 From: "Taylor H. Perkins" Date: Thu, 19 Apr 2018 10:47:52 -0700 Subject: [PATCH 0672/3316] Deps: Bump aws-sdk-go to 1.13.32 --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 42 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/batch/api.go | 112 ++- .../service/databasemigrationservice/api.go | 290 +++++- .../aws/aws-sdk-go/service/glue/api.go | 223 +++-- .../aws-sdk-go/service/mediapackage/api.go | 483 ++++++++- .../aws/aws-sdk-go/service/ssm/api.go | 8 + vendor/vendor.json | 926 +++++++++--------- 8 files changed, 1531 insertions(+), 555 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 94934998a37..cef59d5cf76 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -47,6 +47,7 @@ const ( const ( A4bServiceID = "a4b" // A4b. AcmServiceID = "acm" // Acm. + AcmPcaServiceID = "acm-pca" // AcmPca. ApiPricingServiceID = "api.pricing" // ApiPricing. ApigatewayServiceID = "apigateway" // Apigateway. ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. @@ -99,6 +100,7 @@ const ( EsServiceID = "es" // Es. EventsServiceID = "events" // Events. FirehoseServiceID = "firehose" // Firehose. + FmsServiceID = "fms" // Fms. GameliftServiceID = "gamelift" // Gamelift. GlacierServiceID = "glacier" // Glacier. GlueServiceID = "glue" // Glue. @@ -143,6 +145,7 @@ const ( S3ServiceID = "s3" // S3. SagemakerServiceID = "sagemaker" // Sagemaker. SdbServiceID = "sdb" // Sdb. + SecretsmanagerServiceID = "secretsmanager" // Secretsmanager. ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo. ServicecatalogServiceID = "servicecatalog" // Servicecatalog. ServicediscoveryServiceID = "servicediscovery" // Servicediscovery. @@ -287,6 +290,14 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "acm-pca": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-east-1": endpoint{}, + }, + }, "api.pricing": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -1167,6 +1178,15 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "fms": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "gamelift": service{ Endpoints: endpoints{ @@ -1847,6 +1867,25 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "secretsmanager": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "serverlessrepo": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -2574,7 +2613,8 @@ var awscnPartition = partition{ "sms": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "snowball": service{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 8cfc7e37ed9..680a5b2ac26 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.28" +const SDKVersion = "1.13.32" diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go index 3ba37aab666..194cbe82e51 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go @@ -1581,16 +1581,18 @@ type AttemptDetail struct { // Details about the container in this job attempt. Container *AttemptContainerDetail `locationName:"container" type:"structure"` - // The Unix time stamp for when the attempt was started (when the attempt transitioned - // from the STARTING state to the RUNNING state). + // The Unix time stamp (in seconds and milliseconds) for when the attempt was + // started (when the attempt transitioned from the STARTING state to the RUNNING + // state). StartedAt *int64 `locationName:"startedAt" type:"long"` // A short, human-readable string to provide additional details about the current // status of the job attempt. StatusReason *string `locationName:"statusReason" type:"string"` - // The Unix time stamp for when the attempt was stopped (when the attempt transitioned - // from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED). + // The Unix time stamp (in seconds and milliseconds) for when the attempt was + // stopped (when the attempt transitioned from the RUNNING state to a terminal + // state, such as SUCCEEDED or FAILED). StoppedAt *int64 `locationName:"stoppedAt" type:"long"` } @@ -2393,6 +2395,11 @@ type ContainerProperties struct { // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). // You must specify at least 4 MiB of memory for a job. // + // If you are trying to maximize your resource utilization by providing your + // jobs as much memory as possible for a particular instance type, see Memory + // Management (http://docs.aws.amazon.com/batch/latest/userguide/memory-management.html) + // in the AWS Batch User Guide. + // // Memory is a required field Memory *int64 `locationName:"memory" type:"integer" required:"true"` @@ -3429,6 +3436,11 @@ type JobDefinition struct { // The status of the job definition. Status *string `locationName:"status" type:"string"` + // The timeout configuration for jobs that are submitted with this job definition. + // You can specify a timeout duration after which AWS Batch terminates your + // jobs if they have not finished. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` + // The type of job definition. // // Type is a required field @@ -3487,6 +3499,12 @@ func (s *JobDefinition) SetStatus(v string) *JobDefinition { return s } +// SetTimeout sets the Timeout field's value. +func (s *JobDefinition) SetTimeout(v *JobTimeout) *JobDefinition { + s.Timeout = v + return s +} + // SetType sets the Type field's value. func (s *JobDefinition) SetType(v string) *JobDefinition { s.Type = &v @@ -3540,10 +3558,11 @@ type JobDetail struct { // the job. Container *ContainerDetail `locationName:"container" type:"structure"` - // The Unix time stamp for when the job was created. For non-array jobs and - // parent array jobs, this is when the job entered the SUBMITTED state (at the - // time SubmitJob was called). For array child jobs, this is when the child - // job was spawned by its parent and entered the PENDING state. + // The Unix time stamp (in seconds and milliseconds) for when the job was created. + // For non-array jobs and parent array jobs, this is when the job entered the + // SUBMITTED state (at the time SubmitJob was called). For array child jobs, + // this is when the child job was spawned by its parent and entered the PENDING + // state. CreatedAt *int64 `locationName:"createdAt" type:"long"` // A list of job names or IDs on which this job depends. @@ -3577,8 +3596,8 @@ type JobDetail struct { // The retry strategy to use for this job if an attempt fails. RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` - // The Unix time stamp for when the job was started (when the job transitioned - // from the STARTING state to the RUNNING state). + // The Unix time stamp (in seconds and milliseconds) for when the job was started + // (when the job transitioned from the STARTING state to the RUNNING state). // // StartedAt is a required field StartedAt *int64 `locationName:"startedAt" type:"long" required:"true"` @@ -3592,9 +3611,13 @@ type JobDetail struct { // status of the job. StatusReason *string `locationName:"statusReason" type:"string"` - // The Unix time stamp for when the job was stopped (when the job transitioned - // from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED). + // The Unix time stamp (in seconds and milliseconds) for when the job was stopped + // (when the job transitioned from the RUNNING state to a terminal state, such + // as SUCCEEDED or FAILED). StoppedAt *int64 `locationName:"stoppedAt" type:"long"` + + // The timeout configuration for the job. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` } // String returns the string representation @@ -3697,6 +3720,12 @@ func (s *JobDetail) SetStoppedAt(v int64) *JobDetail { return s } +// SetTimeout sets the Timeout field's value. +func (s *JobDetail) SetTimeout(v *JobTimeout) *JobDetail { + s.Timeout = v + return s +} + // An object representing the details of an AWS Batch job queue. type JobQueueDetail struct { _ struct{} `type:"structure"` @@ -3895,6 +3924,31 @@ func (s *JobSummary) SetStoppedAt(v int64) *JobSummary { return s } +// An object representing a job timeout configuration. +type JobTimeout struct { + _ struct{} `type:"structure"` + + // The time duration in seconds (measured from the job attempt's startedAt timestamp) + // after which AWS Batch terminates your jobs if they have not finished. + AttemptDurationSeconds *int64 `locationName:"attemptDurationSeconds" type:"integer"` +} + +// String returns the string representation +func (s JobTimeout) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobTimeout) GoString() string { + return s.String() +} + +// SetAttemptDurationSeconds sets the AttemptDurationSeconds field's value. +func (s *JobTimeout) SetAttemptDurationSeconds(v int64) *JobTimeout { + s.AttemptDurationSeconds = &v + return s +} + // A key-value pair object. type KeyValuePair struct { _ struct{} `type:"structure"` @@ -4105,9 +4159,19 @@ type RegisterJobDefinitionInput struct { // The retry strategy to use for failed jobs that are submitted with this job // definition. Any retry strategy that is specified during a SubmitJob operation - // overrides the retry strategy defined here. + // overrides the retry strategy defined here. If a job is terminated due to + // a timeout, it is not retried. RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` + // The timeout configuration for jobs that are submitted with this job definition, + // after which AWS Batch terminates your jobs if they have not finished. If + // a job is terminated due to a timeout, it is not retried. The minimum value + // for the timeout is 60 seconds. Any timeout configuration that is specified + // during a SubmitJob operation overrides the timeout configuration defined + // here. For more information, see Job Timeouts (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html) + // in the Amazon Elastic Container Service Developer Guide. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` + // The type of job definition. // // Type is a required field @@ -4169,6 +4233,12 @@ func (s *RegisterJobDefinitionInput) SetRetryStrategy(v *RetryStrategy) *Registe return s } +// SetTimeout sets the Timeout field's value. +func (s *RegisterJobDefinitionInput) SetTimeout(v *JobTimeout) *RegisterJobDefinitionInput { + s.Timeout = v + return s +} + // SetType sets the Type field's value. func (s *RegisterJobDefinitionInput) SetType(v string) *RegisterJobDefinitionInput { s.Type = &v @@ -4304,6 +4374,16 @@ type SubmitJobInput struct { // When a retry strategy is specified here, it overrides the retry strategy // defined in the job definition. RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` + + // The timeout configuration for this SubmitJob operation. You can specify a + // timeout duration after which AWS Batch terminates your jobs if they have + // not finished. If a job is terminated due to a timeout, it is not retried. + // The minimum value for the timeout is 60 seconds. This configuration overrides + // any timeout configuration specified in the job definition. For array jobs, + // child jobs have the same timeout configuration as the parent job. For more + // information, see Job Timeouts (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html) + // in the Amazon Elastic Container Service Developer Guide. + Timeout *JobTimeout `locationName:"timeout" type:"structure"` } // String returns the string representation @@ -4383,6 +4463,12 @@ func (s *SubmitJobInput) SetRetryStrategy(v *RetryStrategy) *SubmitJobInput { return s } +// SetTimeout sets the Timeout field's value. +func (s *SubmitJobInput) SetTimeout(v *JobTimeout) *SubmitJobInput { + s.Timeout = v + return s +} + type SubmitJobOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 64dbf708445..7dc5e7d5441 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -55,10 +55,10 @@ func (c *DatabaseMigrationService) AddTagsToResourceRequest(input *AddTagsToReso // AddTagsToResource API operation for AWS Database Migration Service. // -// Adds metadata tags to a DMS resource, including replication instance, endpoint, -// security group, and migration task. These tags can also be used with cost -// allocation reporting to track cost associated with DMS resources, or used -// in a Condition statement in an IAM policy for DMS. +// Adds metadata tags to an AWS DMS resource, including replication instance, +// endpoint, security group, and migration task. These tags can also be used +// with cost allocation reporting to track cost associated with DMS resources, +// or used in a Condition statement in an IAM policy for DMS. // // 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 @@ -4274,6 +4274,9 @@ func (c *DatabaseMigrationService) StartReplicationTaskRequest(input *StartRepli // The resource is in a state that prevents it from being used for database // migration. // +// * ErrCodeAccessDeniedFault "AccessDeniedFault" +// AWS DMS was denied access to the endpoint. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StartReplicationTask func (c *DatabaseMigrationService) StartReplicationTask(input *StartReplicationTaskInput) (*StartReplicationTaskOutput, error) { req, out := c.StartReplicationTaskRequest(input) @@ -4894,12 +4897,15 @@ type CreateEndpointInput struct { EndpointType *string `type:"string" required:"true" enum:"ReplicationEndpointTypeValue"` // The type of engine for the endpoint. Valid values, depending on the EndPointType, - // include mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, + // s3, db2, azuredb, sybase, dynamodb, mongodb, and sqlserver. // // EngineName is a required field EngineName *string `type:"string" required:"true"` + // The external table definition. + ExternalTableDefinition *string `type:"string"` + // Additional attributes associated with the connection. ExtraConnectionAttributes *string `type:"string"` @@ -4922,7 +4928,7 @@ type CreateEndpointInput struct { // The port used by the endpoint database. Port *int64 `type:"integer"` - // Settings in JSON format for the target S3 endpoint. For more information + // Settings in JSON format for the target Amazon S3 endpoint. For more information // about the available settings, see the Extra Connection Attributes section // at Using Amazon S3 as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html). S3Settings *S3Settings `type:"structure"` @@ -4930,6 +4936,10 @@ type CreateEndpointInput struct { // The name of the server where the endpoint database resides. ServerName *string `type:"string"` + // The Amazon Resource Name (ARN) for the service access role you want to use + // to create the endpoint. + ServiceAccessRoleArn *string `type:"string"` + // The SSL mode to use for the SSL connection. // // SSL mode can be one of four values: none, require, verify-ca, verify-full. @@ -5014,6 +5024,12 @@ func (s *CreateEndpointInput) SetEngineName(v string) *CreateEndpointInput { return s } +// SetExternalTableDefinition sets the ExternalTableDefinition field's value. +func (s *CreateEndpointInput) SetExternalTableDefinition(v string) *CreateEndpointInput { + s.ExternalTableDefinition = &v + return s +} + // SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. func (s *CreateEndpointInput) SetExtraConnectionAttributes(v string) *CreateEndpointInput { s.ExtraConnectionAttributes = &v @@ -5056,6 +5072,12 @@ func (s *CreateEndpointInput) SetServerName(v string) *CreateEndpointInput { return s } +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *CreateEndpointInput) SetServiceAccessRoleArn(v string) *CreateEndpointInput { + s.ServiceAccessRoleArn = &v + return s +} + // SetSslMode sets the SslMode field's value. func (s *CreateEndpointInput) SetSslMode(v string) *CreateEndpointInput { s.SslMode = &v @@ -5132,7 +5154,7 @@ type CreateEventSubscriptionInput struct { // Valid values: replication-instance | migration-task SourceType *string `type:"string"` - // The name of the DMS event notification subscription. + // The name of the AWS DMS event notification subscription. // // Constraints: The name must be less than 255 characters. // @@ -5557,9 +5579,33 @@ func (s *CreateReplicationSubnetGroupOutput) SetReplicationSubnetGroup(v *Replic type CreateReplicationTaskInput struct { _ struct{} `type:"structure"` - // The start time for the Change Data Capture (CDC) operation. + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates the start time for a change data capture (CDC) operation. Use either + // CdcStartTime or CdcStartPosition to specify when you want a CDC operation + // to start. Specifying both values results in an error. CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` + // The migration type. // // MigrationType is a required field @@ -5649,12 +5695,24 @@ func (s *CreateReplicationTaskInput) Validate() error { return nil } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *CreateReplicationTaskInput) SetCdcStartPosition(v string) *CreateReplicationTaskInput { + s.CdcStartPosition = &v + return s +} + // SetCdcStartTime sets the CdcStartTime field's value. func (s *CreateReplicationTaskInput) SetCdcStartTime(v time.Time) *CreateReplicationTaskInput { s.CdcStartTime = &v return s } +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *CreateReplicationTaskInput) SetCdcStopPosition(v string) *CreateReplicationTaskInput { + s.CdcStopPosition = &v + return s +} + // SetMigrationType sets the MigrationType field's value. func (s *CreateReplicationTaskInput) SetMigrationType(v string) *CreateReplicationTaskInput { s.MigrationType = &v @@ -7828,9 +7886,13 @@ type Endpoint struct { // The type of endpoint. EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` + // The expanded name for the engine name. For example, if the EngineName parameter + // is "aurora," this value would be "Amazon Aurora MySQL." + EngineDisplayName *string `type:"string"` + // The database engine name. Valid values, depending on the EndPointType, include - // mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, s3, + // db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. EngineName *string `type:"string"` // Value returned by a call to CreateEndpoint that can be used for cross-account @@ -7838,6 +7900,9 @@ type Endpoint struct { // with a cross-account. ExternalId *string `type:"string"` + // The external table definition. + ExternalTableDefinition *string `type:"string"` + // Additional connection attributes used to connect to the endpoint. ExtraConnectionAttributes *string `type:"string"` @@ -7862,6 +7927,9 @@ type Endpoint struct { // The name of the server at the endpoint. ServerName *string `type:"string"` + // The Amazon Resource Name (ARN) used by the service access IAM role. + ServiceAccessRoleArn *string `type:"string"` + // The SSL mode used to connect to the endpoint. // // SSL mode can be one of four values: none, require, verify-ca, verify-full. @@ -7922,6 +7990,12 @@ func (s *Endpoint) SetEndpointType(v string) *Endpoint { return s } +// SetEngineDisplayName sets the EngineDisplayName field's value. +func (s *Endpoint) SetEngineDisplayName(v string) *Endpoint { + s.EngineDisplayName = &v + return s +} + // SetEngineName sets the EngineName field's value. func (s *Endpoint) SetEngineName(v string) *Endpoint { s.EngineName = &v @@ -7934,6 +8008,12 @@ func (s *Endpoint) SetExternalId(v string) *Endpoint { return s } +// SetExternalTableDefinition sets the ExternalTableDefinition field's value. +func (s *Endpoint) SetExternalTableDefinition(v string) *Endpoint { + s.ExternalTableDefinition = &v + return s +} + // SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. func (s *Endpoint) SetExtraConnectionAttributes(v string) *Endpoint { s.ExtraConnectionAttributes = &v @@ -7970,6 +8050,12 @@ func (s *Endpoint) SetServerName(v string) *Endpoint { return s } +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *Endpoint) SetServiceAccessRoleArn(v string) *Endpoint { + s.ServiceAccessRoleArn = &v + return s +} + // SetSslMode sets the SslMode field's value. func (s *Endpoint) SetSslMode(v string) *Endpoint { s.SslMode = &v @@ -8429,10 +8515,13 @@ type ModifyEndpointInput struct { EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` // The type of engine for the endpoint. Valid values, depending on the EndPointType, - // include mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, + // s3, db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. EngineName *string `type:"string"` + // The external table definition. + ExternalTableDefinition *string `type:"string"` + // Additional attributes associated with the connection. To reset this parameter, // pass the empty string ("") as an argument. ExtraConnectionAttributes *string `type:"string"` @@ -8457,6 +8546,10 @@ type ModifyEndpointInput struct { // The name of the server where the endpoint database resides. ServerName *string `type:"string"` + // The Amazon Resource Name (ARN) for the service access role you want to use + // to modify the endpoint. + ServiceAccessRoleArn *string `type:"string"` + // The SSL mode to be used. // // SSL mode can be one of four values: none, require, verify-ca, verify-full. @@ -8538,6 +8631,12 @@ func (s *ModifyEndpointInput) SetEngineName(v string) *ModifyEndpointInput { return s } +// SetExternalTableDefinition sets the ExternalTableDefinition field's value. +func (s *ModifyEndpointInput) SetExternalTableDefinition(v string) *ModifyEndpointInput { + s.ExternalTableDefinition = &v + return s +} + // SetExtraConnectionAttributes sets the ExtraConnectionAttributes field's value. func (s *ModifyEndpointInput) SetExtraConnectionAttributes(v string) *ModifyEndpointInput { s.ExtraConnectionAttributes = &v @@ -8574,6 +8673,12 @@ func (s *ModifyEndpointInput) SetServerName(v string) *ModifyEndpointInput { return s } +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *ModifyEndpointInput) SetServiceAccessRoleArn(v string) *ModifyEndpointInput { + s.ServiceAccessRoleArn = &v + return s +} + // SetSslMode sets the SslMode field's value. func (s *ModifyEndpointInput) SetSslMode(v string) *ModifyEndpointInput { s.SslMode = &v @@ -8984,9 +9089,33 @@ func (s *ModifyReplicationSubnetGroupOutput) SetReplicationSubnetGroup(v *Replic type ModifyReplicationTaskInput struct { _ struct{} `type:"structure"` - // The start time for the Change Data Capture (CDC) operation. + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates the start time for a change data capture (CDC) operation. Use either + // CdcStartTime or CdcStartPosition to specify when you want a CDC operation + // to start. Specifying both values results in an error. CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` + // The migration type. // // Valid values: full-load | cdc | full-load-and-cdc @@ -9042,12 +9171,24 @@ func (s *ModifyReplicationTaskInput) Validate() error { return nil } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *ModifyReplicationTaskInput) SetCdcStartPosition(v string) *ModifyReplicationTaskInput { + s.CdcStartPosition = &v + return s +} + // SetCdcStartTime sets the CdcStartTime field's value. func (s *ModifyReplicationTaskInput) SetCdcStartTime(v time.Time) *ModifyReplicationTaskInput { s.CdcStartTime = &v return s } +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *ModifyReplicationTaskInput) SetCdcStopPosition(v string) *ModifyReplicationTaskInput { + s.CdcStopPosition = &v + return s +} + // SetMigrationType sets the MigrationType field's value. func (s *ModifyReplicationTaskInput) SetMigrationType(v string) *ModifyReplicationTaskInput { s.MigrationType = &v @@ -9140,6 +9281,13 @@ type MongoDbSettings struct { // Default value is false. ExtractDocId *string `type:"string"` + // The KMS key identifier that will be used to encrypt the connection parameters. + // If you do not specify a value for the KmsKeyId parameter, then AWS DMS will + // use your default encryption key. AWS KMS creates the default encryption key + // for your AWS account. Your AWS account has a different default encryption + // key for each AWS region. + KmsKeyId *string `type:"string"` + // Specifies either document or table mode. // // Valid values: NONE, ONE @@ -9207,6 +9355,12 @@ func (s *MongoDbSettings) SetExtractDocId(v string) *MongoDbSettings { return s } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *MongoDbSettings) SetKmsKeyId(v string) *MongoDbSettings { + s.KmsKeyId = &v + return s +} + // SetNestingLevel sets the NestingLevel field's value. func (s *MongoDbSettings) SetNestingLevel(v string) *MongoDbSettings { s.NestingLevel = &v @@ -9685,6 +9839,10 @@ type ReplicationInstance struct { // The engine version number of the replication instance. EngineVersion *string `type:"string"` + // The expiration date of the free replication instance that is part of the + // Free DMS program. + FreeUntil *time.Time `type:"timestamp" timestampFormat:"unix"` + // The time the replication instance was created. InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` @@ -9792,6 +9950,12 @@ func (s *ReplicationInstance) SetEngineVersion(v string) *ReplicationInstance { return s } +// SetFreeUntil sets the FreeUntil field's value. +func (s *ReplicationInstance) SetFreeUntil(v time.Time) *ReplicationInstance { + s.FreeUntil = &v + return s +} + // SetInstanceCreateTime sets the InstanceCreateTime field's value. func (s *ReplicationInstance) SetInstanceCreateTime(v time.Time) *ReplicationInstance { s.InstanceCreateTime = &v @@ -10053,12 +10217,39 @@ func (s *ReplicationSubnetGroup) SetVpcId(v string) *ReplicationSubnetGroup { type ReplicationTask struct { _ struct{} `type:"structure"` + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` + // The last error (failure) message generated for the replication instance. LastFailureMessage *string `type:"string"` // The type of migration. MigrationType *string `type:"string" enum:"MigrationTypeValue"` + // Indicates the last checkpoint that occurred during a change data capture + // (CDC) operation. You can provide this value to the CdcStartPosition parameter + // to start a CDC operation that begins at that checkpoint. + RecoveryCheckpoint *string `type:"string"` + // The Amazon Resource Name (ARN) of the replication instance. ReplicationInstanceArn *string `type:"string"` @@ -10115,6 +10306,18 @@ func (s ReplicationTask) GoString() string { return s.String() } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *ReplicationTask) SetCdcStartPosition(v string) *ReplicationTask { + s.CdcStartPosition = &v + return s +} + +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *ReplicationTask) SetCdcStopPosition(v string) *ReplicationTask { + s.CdcStopPosition = &v + return s +} + // SetLastFailureMessage sets the LastFailureMessage field's value. func (s *ReplicationTask) SetLastFailureMessage(v string) *ReplicationTask { s.LastFailureMessage = &v @@ -10127,6 +10330,12 @@ func (s *ReplicationTask) SetMigrationType(v string) *ReplicationTask { return s } +// SetRecoveryCheckpoint sets the RecoveryCheckpoint field's value. +func (s *ReplicationTask) SetRecoveryCheckpoint(v string) *ReplicationTask { + s.RecoveryCheckpoint = &v + return s +} + // SetReplicationInstanceArn sets the ReplicationInstanceArn field's value. func (s *ReplicationTask) SetReplicationInstanceArn(v string) *ReplicationTask { s.ReplicationInstanceArn = &v @@ -10370,6 +10579,7 @@ type S3Settings struct { // carriage return (\n). CsvRowDelimiter *string `type:"string"` + // The external table definition. ExternalTableDefinition *string `type:"string"` // The Amazon Resource Name (ARN) used by the service access IAM role. @@ -10492,9 +10702,33 @@ func (s *StartReplicationTaskAssessmentOutput) SetReplicationTask(v *Replication type StartReplicationTaskInput struct { _ struct{} `type:"structure"` - // The start time for the Change Data Capture (CDC) operation. + // Indicates when you want a change data capture (CDC) operation to start. Use + // either CdcStartPosition or CdcStartTime to specify when you want a CDC operation + // to start. Specifying both values results in an error. + // + // The value can be in date, checkpoint, or LSN/SCN format. + // + // Date Example: --cdc-start-position “2018-03-08T12:12:12” + // + // Checkpoint Example: --cdc-start-position "checkpoint:V1#27#mysql-bin-changelog.157832:1975:-1:2002:677883278264080:mysql-bin-changelog.157832:1876#0#0#*#0#93" + // + // LSN Example: --cdc-start-position “mysql-bin-changelog.000024:373” + CdcStartPosition *string `type:"string"` + + // Indicates the start time for a change data capture (CDC) operation. Use either + // CdcStartTime or CdcStartPosition to specify when you want a CDC operation + // to start. Specifying both values results in an error. CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + // Indicates when you want a change data capture (CDC) operation to stop. The + // value can be either server time or commit time. + // + // Server time example: --cdc-stop-position “server_time:3018-02-09T12:12:12” + // + // Commit time example: --cdc-stop-position “commit_time: 3018-02-09T12:12:12 + // “ + CdcStopPosition *string `type:"string"` + // The Amazon Resource Name (ARN) of the replication task to be started. // // ReplicationTaskArn is a required field @@ -10532,12 +10766,24 @@ func (s *StartReplicationTaskInput) Validate() error { return nil } +// SetCdcStartPosition sets the CdcStartPosition field's value. +func (s *StartReplicationTaskInput) SetCdcStartPosition(v string) *StartReplicationTaskInput { + s.CdcStartPosition = &v + return s +} + // SetCdcStartTime sets the CdcStartTime field's value. func (s *StartReplicationTaskInput) SetCdcStartTime(v time.Time) *StartReplicationTaskInput { s.CdcStartTime = &v return s } +// SetCdcStopPosition sets the CdcStopPosition field's value. +func (s *StartReplicationTaskInput) SetCdcStopPosition(v string) *StartReplicationTaskInput { + s.CdcStopPosition = &v + return s +} + // SetReplicationTaskArn sets the ReplicationTaskArn field's value. func (s *StartReplicationTaskInput) SetReplicationTaskArn(v string) *StartReplicationTaskInput { s.ReplicationTaskArn = &v @@ -10681,9 +10927,13 @@ type SupportedEndpointType struct { // The type of endpoint. EndpointType *string `type:"string" enum:"ReplicationEndpointTypeValue"` + // The expanded name for the engine name. For example, if the EngineName parameter + // is "aurora," this value would be "Amazon Aurora MySQL." + EngineDisplayName *string `type:"string"` + // The database engine name. Valid values, depending on the EndPointType, include - // mysql, oracle, postgres, mariadb, aurora, redshift, S3, sybase, dynamodb, - // mongodb, and sqlserver. + // mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, s3, + // db2, azuredb, sybase, sybase, dynamodb, mongodb, and sqlserver. EngineName *string `type:"string"` // Indicates if Change Data Capture (CDC) is supported. @@ -10706,6 +10956,12 @@ func (s *SupportedEndpointType) SetEndpointType(v string) *SupportedEndpointType return s } +// SetEngineDisplayName sets the EngineDisplayName field's value. +func (s *SupportedEndpointType) SetEngineDisplayName(v string) *SupportedEndpointType { + s.EngineDisplayName = &v + return s +} + // SetEngineName sets the EngineName field's value. func (s *SupportedEndpointType) SetEngineName(v string) *SupportedEndpointType { s.EngineName = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index ba489115a4b..553546ed3a4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -583,7 +583,7 @@ func (c *Glue) BatchStopJobRunRequest(input *BatchStopJobRunInput) (req *request // BatchStopJobRun API operation for AWS Glue. // -// Stops one or more job runs for a specified Job. +// Stops one or more job runs for a specified job definition. // // 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 @@ -1124,7 +1124,7 @@ func (c *Glue) CreateJobRequest(input *CreateJobInput) (req *request.Request, ou // CreateJob API operation for AWS Glue. // -// Creates a new job. +// Creates a new job definition. // // 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 @@ -2114,7 +2114,8 @@ func (c *Glue) DeleteJobRequest(input *DeleteJobInput) (req *request.Request, ou // DeleteJob API operation for AWS Glue. // -// Deletes a specified job. If the job is not found, no exception is thrown. +// Deletes a specified job definition. If the job definition is not found, no +// exception is thrown. // // 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 @@ -4239,7 +4240,7 @@ func (c *Glue) GetJobRunsRequest(input *GetJobRunsInput) (req *request.Request, // GetJobRuns API operation for AWS Glue. // -// Retrieves metadata for all runs of a given job. +// Retrieves metadata for all runs of a given job definition. // // 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 @@ -4383,7 +4384,7 @@ func (c *Glue) GetJobsRequest(input *GetJobsInput) (req *request.Request, output // GetJobs API operation for AWS Glue. // -// Retrieves all current jobs. +// Retrieves all current job definitions. // // 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 @@ -6203,7 +6204,7 @@ func (c *Glue) StartJobRunRequest(input *StartJobRunInput) (req *request.Request // StartJobRun API operation for AWS Glue. // -// Runs a job. +// Starts a job run using a job definition. // // 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 @@ -7618,12 +7619,15 @@ type Action struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. Arguments map[string]*string `type:"map"` // The name of a job to be executed. JobName *string `min:"1" type:"string"` + + // The job run timeout in minutes. It overrides the timeout value of the job. + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -7642,6 +7646,9 @@ func (s *Action) Validate() error { if s.JobName != nil && len(*s.JobName) < 1 { invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7661,6 +7668,12 @@ func (s *Action) SetJobName(v string) *Action { return s } +// SetTimeout sets the Timeout field's value. +func (s *Action) SetTimeout(v int64) *Action { + s.Timeout = &v + return s +} + type BatchCreatePartitionInput struct { _ struct{} `type:"structure"` @@ -8310,17 +8323,17 @@ func (s *BatchGetPartitionOutput) SetUnprocessedKeys(v []*PartitionValueList) *B return s } -// Records an error that occurred when attempting to stop a specified JobRun. +// Records an error that occurred when attempting to stop a specified job run. type BatchStopJobRunError struct { _ struct{} `type:"structure"` // Specifies details about the error that was encountered. ErrorDetail *ErrorDetail `type:"structure"` - // The name of the Job in question. + // The name of the job definition used in the job run in question. JobName *string `min:"1" type:"string"` - // The JobRunId of the JobRun in question. + // The JobRunId of the job run in question. JobRunId *string `min:"1" type:"string"` } @@ -8355,12 +8368,12 @@ func (s *BatchStopJobRunError) SetJobRunId(v string) *BatchStopJobRunError { type BatchStopJobRunInput struct { _ struct{} `type:"structure"` - // The name of the Job in question. + // The name of the job definition for which to stop job runs. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` - // A list of the JobRunIds that should be stopped for that Job. + // A list of the JobRunIds that should be stopped for that job definition. // // JobRunIds is a required field JobRunIds []*string `min:"1" type:"list" required:"true"` @@ -8447,10 +8460,10 @@ func (s *BatchStopJobRunOutput) SetSuccessfulSubmissions(v []*BatchStopJobRunSuc type BatchStopJobRunSuccessfulSubmission struct { _ struct{} `type:"structure"` - // The Name of the Job in question. + // The name of the job definition used in the job run that was stopped. JobName *string `min:"1" type:"string"` - // The JobRunId of the JobRun in question. + // The JobRunId of the job run that was stopped. JobRunId *string `min:"1" type:"string"` } @@ -8916,8 +8929,8 @@ type Condition struct { // A logical operator. LogicalOperator *string `type:"string" enum:"LogicalOperator"` - // The condition state. Currently, the values supported are SUCCEEDED, STOPPED - // and FAILED. + // The condition state. Currently, the values supported are SUCCEEDED, STOPPED, + // TIMEOUT and FAILED. State *string `type:"string" enum:"JobRunState"` } @@ -10234,11 +10247,11 @@ type CreateJobInput struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. DefaultArguments map[string]*string `type:"map"` - // Description of the job. + // Description of the job being defined. Description *string `type:"string"` // An ExecutionProperty specifying the maximum number of concurrent runs allowed @@ -10251,15 +10264,18 @@ type CreateJobInput struct { // The maximum number of times to retry this job if it fails. MaxRetries *int64 `type:"integer"` - // The name you assign to this job. It must be unique in your account. + // The name you assign to this job definition. It must be unique in your account. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // The name of the IAM role associated with this job. + // The name or ARN of the IAM role associated with this job. // // Role is a required field Role *string `type:"string" required:"true"` + + // The job timeout in minutes. The default is 2880 minutes (48 hours). + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -10287,6 +10303,9 @@ func (s *CreateJobInput) Validate() error { if s.Role == nil { invalidParams.Add(request.NewErrParamRequired("Role")) } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10354,10 +10373,16 @@ func (s *CreateJobInput) SetRole(v string) *CreateJobInput { return s } +// SetTimeout sets the Timeout field's value. +func (s *CreateJobInput) SetTimeout(v int64) *CreateJobInput { + s.Timeout = &v + return s +} + type CreateJobOutput struct { _ struct{} `type:"structure"` - // The unique name that was provided. + // The unique name that was provided for this job definition. Name *string `min:"1" type:"string"` } @@ -10759,6 +10784,10 @@ type CreateTriggerInput struct { // This field is required when the trigger type is SCHEDULED. Schedule *string `type:"string"` + // Set to true to start SCHEDULED and CONDITIONAL triggers when created. True + // not supported for ON_DEMAND triggers. + StartOnCreation *bool `type:"boolean"` + // The type of the new trigger. // // Type is a required field @@ -10842,6 +10871,12 @@ func (s *CreateTriggerInput) SetSchedule(v string) *CreateTriggerInput { return s } +// SetStartOnCreation sets the StartOnCreation field's value. +func (s *CreateTriggerInput) SetStartOnCreation(v bool) *CreateTriggerInput { + s.StartOnCreation = &v + return s +} + // SetType sets the Type field's value. func (s *CreateTriggerInput) SetType(v string) *CreateTriggerInput { s.Type = &v @@ -11466,7 +11501,7 @@ func (s DeleteDevEndpointOutput) GoString() string { type DeleteJobInput struct { _ struct{} `type:"structure"` - // The name of the job to delete. + // The name of the job definition to delete. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -11507,7 +11542,7 @@ func (s *DeleteJobInput) SetJobName(v string) *DeleteJobInput { type DeleteJobOutput struct { _ struct{} `type:"structure"` - // The name of the job that was deleted. + // The name of the job definition that was deleted. JobName *string `min:"1" type:"string"` } @@ -12241,9 +12276,9 @@ func (s *ErrorDetail) SetErrorMessage(v string) *ErrorDetail { type ExecutionProperty struct { _ struct{} `type:"structure"` - // The maximum number of concurrent runs allowed for a job. The default is 1. - // An error is returned when this threshold is reached. The maximum value you - // can specify is controlled by a service limit. + // The maximum number of concurrent runs allowed for the job. The default is + // 1. An error is returned when this threshold is reached. The maximum value + // you can specify is controlled by a service limit. MaxConcurrentRuns *int64 `type:"integer"` } @@ -13272,7 +13307,7 @@ func (s *GetDevEndpointsOutput) SetNextToken(v string) *GetDevEndpointsOutput { type GetJobInput struct { _ struct{} `type:"structure"` - // The name of the job to retrieve. + // The name of the job definition to retrieve. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -13336,7 +13371,7 @@ func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { type GetJobRunInput struct { _ struct{} `type:"structure"` - // Name of the job being run. + // Name of the job definition being run. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -13426,7 +13461,7 @@ func (s *GetJobRunOutput) SetJobRun(v *JobRun) *GetJobRunOutput { type GetJobRunsInput struct { _ struct{} `type:"structure"` - // The name of the job for which to retrieve all job runs. + // The name of the job definition for which to retrieve all job runs. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` @@ -13565,10 +13600,10 @@ func (s *GetJobsInput) SetNextToken(v string) *GetJobsInput { type GetJobsOutput struct { _ struct{} `type:"structure"` - // A list of jobs. + // A list of job definitions. Jobs []*Job `type:"list"` - // A continuation token, if not all jobs have yet been returned. + // A continuation token, if not all job definitions have yet been returned. NextToken *string `type:"string"` } @@ -15085,15 +15120,15 @@ func (s *JdbcTarget) SetPath(v string) *JdbcTarget { return s } -// Specifies a job. +// Specifies a job definition. type Job struct { _ struct{} `type:"structure"` - // The number of AWS Glue data processing units (DPUs) allocated to this Job. - // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative - // measure of processing power that consists of 4 vCPUs of compute capacity - // and 16 GB of memory. For more information, see the AWS Glue pricing page - // (https://aws.amazon.com/glue/pricing/). + // The number of AWS Glue data processing units (DPUs) allocated to runs of + // this job. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is + // a relative measure of processing power that consists of 4 vCPUs of compute + // capacity and 16 GB of memory. For more information, see the AWS Glue pricing + // page (https://aws.amazon.com/glue/pricing/). AllocatedCapacity *int64 `type:"integer"` // The JobCommand that executes this job. @@ -15102,7 +15137,7 @@ type Job struct { // The connections used for this job. Connections *ConnectionsList `type:"structure"` - // The time and date that this job specification was created. + // The time and date that this job definition was created. CreatedOn *time.Time `type:"timestamp" timestampFormat:"unix"` // The default arguments for this job, specified as name-value pairs. @@ -15115,31 +15150,34 @@ type Job struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. DefaultArguments map[string]*string `type:"map"` - // Description of this job. + // Description of the job being defined. Description *string `type:"string"` // An ExecutionProperty specifying the maximum number of concurrent runs allowed // for this job. ExecutionProperty *ExecutionProperty `type:"structure"` - // The last point in time when this job specification was modified. + // The last point in time when this job definition was modified. LastModifiedOn *time.Time `type:"timestamp" timestampFormat:"unix"` // This field is reserved for future use. LogUri *string `type:"string"` - // The maximum number of times to retry this job if it fails. + // The maximum number of times to retry this job after a JobRun fails. MaxRetries *int64 `type:"integer"` - // The name you assign to this job. + // The name you assign to this job definition. Name *string `min:"1" type:"string"` - // The name of the IAM role associated with this job. + // The name or ARN of the IAM role associated with this job. Role *string `type:"string"` + + // The job timeout in minutes. + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -15224,6 +15262,12 @@ func (s *Job) SetRole(v string) *Job { return s } +// SetTimeout sets the Timeout field's value. +func (s *Job) SetTimeout(v int64) *Job { + s.Timeout = &v + return s +} + // Defines a point which a job can resume processing. type JobBookmarkEntry struct { _ struct{} `type:"structure"` @@ -15284,7 +15328,7 @@ func (s *JobBookmarkEntry) SetVersion(v int64) *JobBookmarkEntry { return s } -// Specifies code that executes a job. +// Specifies code executed when a job is run. type JobCommand struct { _ struct{} `type:"structure"` @@ -15339,7 +15383,7 @@ type JobRun struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. Arguments map[string]*string `type:"map"` @@ -15352,10 +15396,13 @@ type JobRun struct { // An error message associated with this job run. ErrorMessage *string `type:"string"` + // The amount of time (in seconds) that the job run consumed resources. + ExecutionTime *int64 `type:"integer"` + // The ID of this job run. Id *string `min:"1" type:"string"` - // The name of the job being run. + // The name of the job definition being used in this run. JobName *string `min:"1" type:"string"` // The current state of the job run. @@ -15374,6 +15421,9 @@ type JobRun struct { // The date and time at which this job run was started. StartedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + // The job run timeout in minutes. + Timeout *int64 `min:"1" type:"integer"` + // The name of the trigger that started this job run. TriggerName *string `min:"1" type:"string"` } @@ -15418,6 +15468,12 @@ func (s *JobRun) SetErrorMessage(v string) *JobRun { return s } +// SetExecutionTime sets the ExecutionTime field's value. +func (s *JobRun) SetExecutionTime(v int64) *JobRun { + s.ExecutionTime = &v + return s +} + // SetId sets the Id field's value. func (s *JobRun) SetId(v string) *JobRun { s.Id = &v @@ -15460,14 +15516,20 @@ func (s *JobRun) SetStartedOn(v time.Time) *JobRun { return s } +// SetTimeout sets the Timeout field's value. +func (s *JobRun) SetTimeout(v int64) *JobRun { + s.Timeout = &v + return s +} + // SetTriggerName sets the TriggerName field's value. func (s *JobRun) SetTriggerName(v string) *JobRun { s.TriggerName = &v return s } -// Specifies information used to update an existing job. Note that the previous -// job definition will be completely overwritten by this information. +// Specifies information used to update an existing job definition. Note that +// the previous job definition will be completely overwritten by this information. type JobUpdate struct { _ struct{} `type:"structure"` @@ -15494,11 +15556,11 @@ type JobUpdate struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. DefaultArguments map[string]*string `type:"map"` - // Description of the job. + // Description of the job being defined. Description *string `type:"string"` // An ExecutionProperty specifying the maximum number of concurrent runs allowed @@ -15511,8 +15573,11 @@ type JobUpdate struct { // The maximum number of times to retry this job if it fails. MaxRetries *int64 `type:"integer"` - // The name of the IAM role associated with this job (required). + // The name or ARN of the IAM role associated with this job (required). Role *string `type:"string"` + + // The job timeout in minutes. The default is 2880 minutes (48 hours). + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -15525,6 +15590,19 @@ func (s JobUpdate) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *JobUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "JobUpdate"} + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAllocatedCapacity sets the AllocatedCapacity field's value. func (s *JobUpdate) SetAllocatedCapacity(v int64) *JobUpdate { s.AllocatedCapacity = &v @@ -15579,6 +15657,12 @@ func (s *JobUpdate) SetRole(v string) *JobUpdate { return s } +// SetTimeout sets the Timeout field's value. +func (s *JobUpdate) SetTimeout(v int64) *JobUpdate { + s.Timeout = &v + return s +} + // A classifier for JSON content. type JsonClassifier struct { _ struct{} `type:"structure"` @@ -16200,7 +16284,7 @@ func (s *PhysicalConnectionRequirements) SetSubnetId(v string) *PhysicalConnecti type Predecessor struct { _ struct{} `type:"structure"` - // The name of the predecessor job. + // The name of the job definition used by the predecessor job run. JobName *string `min:"1" type:"string"` // The job-run ID of the predecessor job run. @@ -16236,7 +16320,8 @@ type Predicate struct { // A list of the conditions that determine when the trigger will fire. Conditions []*Condition `type:"list"` - // Currently "OR" is not supported. + // Optional field if only one condition is listed. If multiple conditions are + // listed, then this field is required. Logical *string `type:"string" enum:"Logical"` } @@ -16774,7 +16859,7 @@ type StartJobRunInput struct { AllocatedCapacity *int64 `type:"integer"` // The job arguments specifically for this run. They override the equivalent - // default arguments set for the job itself. + // default arguments set for in the job definition itself. // // You can specify arguments here that your own job-execution script consumes, // as well as arguments that AWS Glue itself consumes. @@ -16784,17 +16869,20 @@ type StartJobRunInput struct { // topic in the developer guide. // // For information about the key-value pairs that AWS Glue consumes to set up - // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) + // your job, see the Special Parameters Used by AWS Glue (http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) // topic in the developer guide. Arguments map[string]*string `type:"map"` - // The name of the job to start. + // The name of the job definition to use. // // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` // The ID of a previous JobRun to retry. JobRunId *string `min:"1" type:"string"` + + // The job run timeout in minutes. It overrides the timeout value of the job. + Timeout *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -16819,6 +16907,9 @@ func (s *StartJobRunInput) Validate() error { if s.JobRunId != nil && len(*s.JobRunId) < 1 { invalidParams.Add(request.NewErrParamMinLen("JobRunId", 1)) } + if s.Timeout != nil && *s.Timeout < 1 { + invalidParams.Add(request.NewErrParamMinValue("Timeout", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16850,6 +16941,12 @@ func (s *StartJobRunInput) SetJobRunId(v string) *StartJobRunInput { return s } +// SetTimeout sets the Timeout field's value. +func (s *StartJobRunInput) SetTimeout(v int64) *StartJobRunInput { + s.Timeout = &v + return s +} + type StartJobRunOutput struct { _ struct{} `type:"structure"` @@ -18527,7 +18624,7 @@ type UpdateJobInput struct { // JobName is a required field JobName *string `min:"1" type:"string" required:"true"` - // Specifies the values with which to update the job. + // Specifies the values with which to update the job definition. // // JobUpdate is a required field JobUpdate *JobUpdate `type:"structure" required:"true"` @@ -18555,6 +18652,11 @@ func (s *UpdateJobInput) Validate() error { if s.JobUpdate == nil { invalidParams.Add(request.NewErrParamRequired("JobUpdate")) } + if s.JobUpdate != nil { + if err := s.JobUpdate.Validate(); err != nil { + invalidParams.AddNested("JobUpdate", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -18577,7 +18679,7 @@ func (s *UpdateJobInput) SetJobUpdate(v *JobUpdate) *UpdateJobInput { type UpdateJobOutput struct { _ struct{} `type:"structure"` - // Returns the name of the updated job. + // Returns the name of the updated job definition. JobName *string `min:"1" type:"string"` } @@ -19436,6 +19538,9 @@ const ( // JobRunStateFailed is a JobRunState enum value JobRunStateFailed = "FAILED" + + // JobRunStateTimeout is a JobRunState enum value + JobRunStateTimeout = "TIMEOUT" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go index e3f77375e0c..b46ace6a6b7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go @@ -3,6 +3,8 @@ package mediapackage import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" @@ -1139,6 +1141,209 @@ func (s *Channel) SetId(v string) *Channel { return s } +// A Common Media Application Format (CMAF) encryption configuration. +type CmafEncryption struct { + _ struct{} `type:"structure"` + + // Time (in seconds) between each encryption key rotation. + KeyRotationIntervalSeconds *int64 `locationName:"keyRotationIntervalSeconds" type:"integer"` + + // A configuration for accessing an external Secure Packager and Encoder Key + // Exchange (SPEKE) service that will provide encryption keys. + // + // SpekeKeyProvider is a required field + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CmafEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CmafEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CmafEncryption"} + if s.SpekeKeyProvider == nil { + invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) + } + if s.SpekeKeyProvider != nil { + if err := s.SpekeKeyProvider.Validate(); err != nil { + invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyRotationIntervalSeconds sets the KeyRotationIntervalSeconds field's value. +func (s *CmafEncryption) SetKeyRotationIntervalSeconds(v int64) *CmafEncryption { + s.KeyRotationIntervalSeconds = &v + return s +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *CmafEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *CmafEncryption { + s.SpekeKeyProvider = v + return s +} + +// A Common Media Application Format (CMAF) packaging configuration. +type CmafPackage struct { + _ struct{} `type:"structure"` + + // A Common Media Application Format (CMAF) encryption configuration. + Encryption *CmafEncryption `locationName:"encryption" type:"structure"` + + // A list of HLS manifest configurations + HlsManifests []*HlsManifest `locationName:"hlsManifests" type:"list"` + + // Duration (in seconds) of each segment. Actual segments will berounded to + // the nearest multiple of the source segment duration. + SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` + + // An optional custom string that is prepended to the name of each segment. + // If not specified, it defaults to the ChannelId. + SegmentPrefix *string `locationName:"segmentPrefix" type:"string"` + + // A StreamSelection configuration. + StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` +} + +// String returns the string representation +func (s CmafPackage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafPackage) GoString() string { + return s.String() +} + +// SetEncryption sets the Encryption field's value. +func (s *CmafPackage) SetEncryption(v *CmafEncryption) *CmafPackage { + s.Encryption = v + return s +} + +// SetHlsManifests sets the HlsManifests field's value. +func (s *CmafPackage) SetHlsManifests(v []*HlsManifest) *CmafPackage { + s.HlsManifests = v + return s +} + +// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. +func (s *CmafPackage) SetSegmentDurationSeconds(v int64) *CmafPackage { + s.SegmentDurationSeconds = &v + return s +} + +// SetSegmentPrefix sets the SegmentPrefix field's value. +func (s *CmafPackage) SetSegmentPrefix(v string) *CmafPackage { + s.SegmentPrefix = &v + return s +} + +// SetStreamSelection sets the StreamSelection field's value. +func (s *CmafPackage) SetStreamSelection(v *StreamSelection) *CmafPackage { + s.StreamSelection = v + return s +} + +// A Common Media Application Format (CMAF) packaging configuration. +type CmafPackageCreateOrUpdateParameters struct { + _ struct{} `type:"structure"` + + // A Common Media Application Format (CMAF) encryption configuration. + Encryption *CmafEncryption `locationName:"encryption" type:"structure"` + + // A list of HLS manifest configurations + HlsManifests []*HlsManifestCreateOrUpdateParameters `locationName:"hlsManifests" type:"list"` + + // Duration (in seconds) of each segment. Actual segments will berounded to + // the nearest multiple of the source segment duration. + SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` + + // An optional custom string that is prepended to the name of each segment. + // If not specified, it defaults to the ChannelId. + SegmentPrefix *string `locationName:"segmentPrefix" type:"string"` + + // A StreamSelection configuration. + StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` +} + +// String returns the string representation +func (s CmafPackageCreateOrUpdateParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafPackageCreateOrUpdateParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CmafPackageCreateOrUpdateParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CmafPackageCreateOrUpdateParameters"} + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + if s.HlsManifests != nil { + for i, v := range s.HlsManifests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HlsManifests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryption sets the Encryption field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetEncryption(v *CmafEncryption) *CmafPackageCreateOrUpdateParameters { + s.Encryption = v + return s +} + +// SetHlsManifests sets the HlsManifests field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetHlsManifests(v []*HlsManifestCreateOrUpdateParameters) *CmafPackageCreateOrUpdateParameters { + s.HlsManifests = v + return s +} + +// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetSegmentDurationSeconds(v int64) *CmafPackageCreateOrUpdateParameters { + s.SegmentDurationSeconds = &v + return s +} + +// SetSegmentPrefix sets the SegmentPrefix field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetSegmentPrefix(v string) *CmafPackageCreateOrUpdateParameters { + s.SegmentPrefix = &v + return s +} + +// SetStreamSelection sets the StreamSelection field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetStreamSelection(v *StreamSelection) *CmafPackageCreateOrUpdateParameters { + s.StreamSelection = v + return s +} + type CreateChannelInput struct { _ struct{} `type:"structure"` @@ -1236,6 +1441,9 @@ type CreateOriginEndpointInput struct { // ChannelId is a required field ChannelId *string `locationName:"channelId" type:"string" required:"true"` + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackageCreateOrUpdateParameters `locationName:"cmafPackage" type:"structure"` + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` @@ -1278,6 +1486,11 @@ func (s *CreateOriginEndpointInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.CmafPackage != nil { + if err := s.CmafPackage.Validate(); err != nil { + invalidParams.AddNested("CmafPackage", err.(request.ErrInvalidParams)) + } + } if s.DashPackage != nil { if err := s.DashPackage.Validate(); err != nil { invalidParams.AddNested("DashPackage", err.(request.ErrInvalidParams)) @@ -1306,6 +1519,12 @@ func (s *CreateOriginEndpointInput) SetChannelId(v string) *CreateOriginEndpoint return s } +// SetCmafPackage sets the CmafPackage field's value. +func (s *CreateOriginEndpointInput) SetCmafPackage(v *CmafPackageCreateOrUpdateParameters) *CreateOriginEndpointInput { + s.CmafPackage = v + return s +} + // SetDashPackage sets the DashPackage field's value. func (s *CreateOriginEndpointInput) SetDashPackage(v *DashPackage) *CreateOriginEndpointInput { s.DashPackage = v @@ -1367,6 +1586,9 @@ type CreateOriginEndpointOutput struct { ChannelId *string `locationName:"channelId" type:"string"` + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` @@ -1413,6 +1635,12 @@ func (s *CreateOriginEndpointOutput) SetChannelId(v string) *CreateOriginEndpoin return s } +// SetCmafPackage sets the CmafPackage field's value. +func (s *CreateOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *CreateOriginEndpointOutput { + s.CmafPackage = v + return s +} + // SetDashPackage sets the DashPackage field's value. func (s *CreateOriginEndpointOutput) SetDashPackage(v *DashPackage) *CreateOriginEndpointOutput { s.DashPackage = v @@ -1859,6 +2087,9 @@ type DescribeOriginEndpointOutput struct { ChannelId *string `locationName:"channelId" type:"string"` + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` @@ -1905,6 +2136,12 @@ func (s *DescribeOriginEndpointOutput) SetChannelId(v string) *DescribeOriginEnd return s } +// SetCmafPackage sets the CmafPackage field's value. +func (s *DescribeOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *DescribeOriginEndpointOutput { + s.CmafPackage = v + return s +} + // SetDashPackage sets the DashPackage field's value. func (s *DescribeOriginEndpointOutput) SetDashPackage(v *DashPackage) *DescribeOriginEndpointOutput { s.DashPackage = v @@ -2071,6 +2308,218 @@ func (s *HlsIngest) SetIngestEndpoints(v []*IngestEndpoint) *HlsIngest { return s } +// A HTTP Live Streaming (HLS) manifest configuration. +type HlsManifest struct { + _ struct{} `type:"structure"` + + // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" + // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the + // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly + // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates + // ad markers and blackout tags based on SCTE-35messages in the input source. + AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` + + // The ID of the manifest. The ID must be unique within the OriginEndpoint and + // it cannot be changed after it is created. + // + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` + + // When enabled, an I-Frame only stream will be included in the output. + IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` + + // An optional short string appended to the end of the OriginEndpoint URL. If + // not specified, defaults to the manifestName for the OriginEndpoint. + ManifestName *string `locationName:"manifestName" type:"string"` + + // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" + // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in + // the media playlist. + PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` + + // Time window (in seconds) contained in each parent manifest. + PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` + + // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted + // into manifests. Additionally, when an interval is specifiedID3Timed Metadata + // messages will be generated every 5 seconds using theingest time of the content.If + // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME + // tags will be inserted into manifests and noID3Timed Metadata messages will + // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata + // is found in HTTP Live Streaming (HLS) input,it will be passed through to + // HLS output. + ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` + + // The URL of the packaged OriginEndpoint for consumption. + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s HlsManifest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsManifest) GoString() string { + return s.String() +} + +// SetAdMarkers sets the AdMarkers field's value. +func (s *HlsManifest) SetAdMarkers(v string) *HlsManifest { + s.AdMarkers = &v + return s +} + +// SetId sets the Id field's value. +func (s *HlsManifest) SetId(v string) *HlsManifest { + s.Id = &v + return s +} + +// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. +func (s *HlsManifest) SetIncludeIframeOnlyStream(v bool) *HlsManifest { + s.IncludeIframeOnlyStream = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *HlsManifest) SetManifestName(v string) *HlsManifest { + s.ManifestName = &v + return s +} + +// SetPlaylistType sets the PlaylistType field's value. +func (s *HlsManifest) SetPlaylistType(v string) *HlsManifest { + s.PlaylistType = &v + return s +} + +// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. +func (s *HlsManifest) SetPlaylistWindowSeconds(v int64) *HlsManifest { + s.PlaylistWindowSeconds = &v + return s +} + +// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. +func (s *HlsManifest) SetProgramDateTimeIntervalSeconds(v int64) *HlsManifest { + s.ProgramDateTimeIntervalSeconds = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *HlsManifest) SetUrl(v string) *HlsManifest { + s.Url = &v + return s +} + +// A HTTP Live Streaming (HLS) manifest configuration. +type HlsManifestCreateOrUpdateParameters struct { + _ struct{} `type:"structure"` + + // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" + // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the + // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly + // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates + // ad markers and blackout tags based on SCTE-35messages in the input source. + AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` + + // The ID of the manifest. The ID must be unique within the OriginEndpoint and + // it cannot be changed after it is created. + // + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` + + // When enabled, an I-Frame only stream will be included in the output. + IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` + + // An optional short string appended to the end of the OriginEndpoint URL. If + // not specified, defaults to the manifestName for the OriginEndpoint. + ManifestName *string `locationName:"manifestName" type:"string"` + + // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" + // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in + // the media playlist. + PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` + + // Time window (in seconds) contained in each parent manifest. + PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` + + // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted + // into manifests. Additionally, when an interval is specifiedID3Timed Metadata + // messages will be generated every 5 seconds using theingest time of the content.If + // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME + // tags will be inserted into manifests and noID3Timed Metadata messages will + // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata + // is found in HTTP Live Streaming (HLS) input,it will be passed through to + // HLS output. + ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` +} + +// String returns the string representation +func (s HlsManifestCreateOrUpdateParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsManifestCreateOrUpdateParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsManifestCreateOrUpdateParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsManifestCreateOrUpdateParameters"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdMarkers sets the AdMarkers field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetAdMarkers(v string) *HlsManifestCreateOrUpdateParameters { + s.AdMarkers = &v + return s +} + +// SetId sets the Id field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetId(v string) *HlsManifestCreateOrUpdateParameters { + s.Id = &v + return s +} + +// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetIncludeIframeOnlyStream(v bool) *HlsManifestCreateOrUpdateParameters { + s.IncludeIframeOnlyStream = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetManifestName(v string) *HlsManifestCreateOrUpdateParameters { + s.ManifestName = &v + return s +} + +// SetPlaylistType sets the PlaylistType field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetPlaylistType(v string) *HlsManifestCreateOrUpdateParameters { + s.PlaylistType = &v + return s +} + +// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetPlaylistWindowSeconds(v int64) *HlsManifestCreateOrUpdateParameters { + s.PlaylistWindowSeconds = &v + return s +} + +// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetProgramDateTimeIntervalSeconds(v int64) *HlsManifestCreateOrUpdateParameters { + s.ProgramDateTimeIntervalSeconds = &v + return s +} + // An HTTP Live Streaming (HLS) packaging configuration. type HlsPackage struct { _ struct{} `type:"structure"` @@ -2098,7 +2547,7 @@ type HlsPackage struct { // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted // into manifests. Additionally, when an interval is specifiedID3Timed Metadata - // messages will be generated every 5 seconds using the ingest time of the content.If + // messages will be generated every 5 seconds using theingest time of the content.If // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME // tags will be inserted into manifests and noID3Timed Metadata messages will // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata @@ -2513,6 +2962,9 @@ type OriginEndpoint struct { // The ID of the Channel the OriginEndpoint is associated with. ChannelId *string `locationName:"channelId" type:"string"` + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` @@ -2568,6 +3020,12 @@ func (s *OriginEndpoint) SetChannelId(v string) *OriginEndpoint { return s } +// SetCmafPackage sets the CmafPackage field's value. +func (s *OriginEndpoint) SetCmafPackage(v *CmafPackage) *OriginEndpoint { + s.CmafPackage = v + return s +} + // SetDashPackage sets the DashPackage field's value. func (s *OriginEndpoint) SetDashPackage(v *DashPackage) *OriginEndpoint { s.DashPackage = v @@ -2930,6 +3388,9 @@ func (s *UpdateChannelOutput) SetId(v string) *UpdateChannelOutput { type UpdateOriginEndpointInput struct { _ struct{} `type:"structure"` + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackageCreateOrUpdateParameters `locationName:"cmafPackage" type:"structure"` + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` @@ -2969,6 +3430,11 @@ func (s *UpdateOriginEndpointInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.CmafPackage != nil { + if err := s.CmafPackage.Validate(); err != nil { + invalidParams.AddNested("CmafPackage", err.(request.ErrInvalidParams)) + } + } if s.DashPackage != nil { if err := s.DashPackage.Validate(); err != nil { invalidParams.AddNested("DashPackage", err.(request.ErrInvalidParams)) @@ -2991,6 +3457,12 @@ func (s *UpdateOriginEndpointInput) Validate() error { return nil } +// SetCmafPackage sets the CmafPackage field's value. +func (s *UpdateOriginEndpointInput) SetCmafPackage(v *CmafPackageCreateOrUpdateParameters) *UpdateOriginEndpointInput { + s.CmafPackage = v + return s +} + // SetDashPackage sets the DashPackage field's value. func (s *UpdateOriginEndpointInput) SetDashPackage(v *DashPackage) *UpdateOriginEndpointInput { s.DashPackage = v @@ -3052,6 +3524,9 @@ type UpdateOriginEndpointOutput struct { ChannelId *string `locationName:"channelId" type:"string"` + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` @@ -3098,6 +3573,12 @@ func (s *UpdateOriginEndpointOutput) SetChannelId(v string) *UpdateOriginEndpoin return s } +// SetCmafPackage sets the CmafPackage field's value. +func (s *UpdateOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *UpdateOriginEndpointOutput { + s.CmafPackage = v + return s +} + // SetDashPackage sets the DashPackage field's value. func (s *UpdateOriginEndpointOutput) SetDashPackage(v *DashPackage) *UpdateOriginEndpointOutput { s.DashPackage = v diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index a42c79cb5d5..a91bf72b806 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -99,6 +99,10 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // The Targets parameter includes too many tags. Remove one or more tags and // try the command again. // +// * ErrCodeTooManyUpdates "TooManyUpdates" +// There are concurrent updates for a resource that supports one update at a +// time. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/AddTagsToResource func (c *SSM) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { req, out := c.AddTagsToResourceRequest(input) @@ -8280,6 +8284,10 @@ func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // +// * ErrCodeTooManyUpdates "TooManyUpdates" +// There are concurrent updates for a resource that supports one update at a +// time. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/RemoveTagsFromResource func (c *SSM) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { req, out := c.RemoveTagsFromResourceRequest(input) diff --git a/vendor/vendor.json b/vendor/vendor.json index a0d8d4f110e..9d33669c403 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,916 +39,916 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "Fs3DE5rdov9GRx+jUJ7VfG/EBvA=", + "checksumSHA1": "Mn7rZP6y2VKFyogE4/J/uvfHR7E=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { - "checksumSHA1": "Sv3a7nAY/z1ZHiQ1eN0SE0rLLtQ=", + "checksumSHA1": "n2pGWBtTzupMkJrj1UKU67rU0/c=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "CntJM8T3dRgC0e1i66CIbP8uCSY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "krjKYP+Z5qrFgZkHccphnuPdYd0=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "WliJXTogdly9qe5xEV6Fn2zklcs=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "rQmpNRto8bpB17qNubhGzRh/Aj8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "7o1gMXoE8cemDzkZFUrQknQS4Yo=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "s0TQJfF7ZqeS9IH4hdvX5EQk2l8=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "YlKOG1eZClZYmcRwJQO+LfEQrVY=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "58ARAtV4EKAIv5zpieVjvJMFjO0=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { - "checksumSHA1": "leWnf/5HCZ3nD79LpJ0EDNQnNrI=", + "checksumSHA1": "s6of5mfMFZtYy6BRo/tIafylOUc=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "MJPsaJkyrCml4VZOsbNGo9Fl0C8=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "AQGPL+fXjjKhBmyb37QAG05R/Qw=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "NU6AqUCd5TOrxaqFdWmo8l2oeOI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "hCz5z7QQz1416cCjbhjGjvbrdpY=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "8PdtKqSEcLQ1V0Gnl2FAHJoOQy0=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "kM7Fxkb1OdCiOOmTlRIadqnsdt0=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "pKJec2iJiKDSY5UKmLSeYxLxucg=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "BD7EvXghMHMw52wtxISIhpJ4CTk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "6Q9ZHEAsu92jsFOCwJAI+SjYYAk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "YNl9xTPOb1SFVmwXDtmwzyGsx8U=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "p/I/GLsXOoZ0XdhDuSQ+lP4NlYM=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "4KiQdvEfpTf2g+UF2rWlLg/kgok=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "mLFFVXyhKLYgoKSJ17URM/GXdNc=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "bh5IjjK9tKextJTq+gLV+6zhmL8=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "cx2wG4c6Q5gSTsAU6D/UZMQN/Kg=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "k4lfEcz91J29Wax6GPBlUUQb5bk=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "qrxVu09idcoHIT2HqDJIbV3weUE=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { - "checksumSHA1": "2CBd4VCNpKFk/fBIsLEJNG2Shps=", + "checksumSHA1": "FEUIC6EG3tPnTuvmIsV4b3r9D+k=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "I5sSvXLvlj9Ppv0HCbFXdN4tqn4=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "WMCgYV6S5ZeQo6pjIFTStdmBVcg=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "hurqUivjVxLHaXEd2oS8JrwMGQs=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "zxX7V0AIU1x2yX5Uyd9RMe0C3ok=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "Ae8sc+KEu6BMw89WRwaq4Ol/87g=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "12jA2n3aIJzdwvOxl+dvtx5S4CI=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "V3D5pDdtXS0yVShpS/fOqFGxCrA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "7igFr0esmtcs9V0F9iMs2k5uNDI=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "PQnfXJ0ZQIIMiqUUFs4bkUPHqnc=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "pZoO4JKc/TJACuq1n9IHuhovD4k=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "s0INIDkP10AOmJkmTpCHpazIwUw=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "BSSURh/ALTj0QW5BWPJkW3i+FN0=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "JpvcQ+tc0yz2WZ0ne6zzxlbfscI=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "MgdGxbP8vjCkzkj1ukmU5Uqh3UA=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "hgqHUngsP+NPjkZVqevXuioHnkE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "OQuas8ovzB34Yb2bCMBDsu8teu4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "hUosfOQhleGpv6UWGnbDf/eB5Ts=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "4DYLn0HnMhZvXXgx6VjbS/V0srA=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "UPwhm+XWgDTDZ4wUziP+9RHOozg=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "N1F3vRsnxAZyfr4v7iK+MagWuGU=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { - "checksumSHA1": "Mc6WHGaAikP+uYx38VtKbl5KEYE=", + "checksumSHA1": "2bqJtsfs1LDLLhczU/SNtmvkjcw=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "YZJXefe33AjqEWaIm8ufdQc0atE=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "DHrIPXQ0QzjE+Hnfwk0INR4rUkU=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "pvrqgHDeZ3gAHIiZyZfwXOi9GD4=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "TpvdN/5q0qLBHZhQQlB4cyQOxR4=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "zdG3e3bdyNaBuApO06pygeSJsJ4=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "zmOo5EeLSGFEuIBiRQsVd4+SBJ0=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "nlvFlqVKHyuyYHG88H3Yt/OA1e0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "AO97b1GChOs2geiFc//6YcpVfX8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "jyxQ6TEdSl9/j7qC0LCkVMSXkog=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "lKyAXJ4S6uXuSR1/pQ9gCGHYSLI=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "eYt7GSKmi5G+h1R+Y1qIbs2Zn4o=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { - "checksumSHA1": "fMIOl6d85KmJyNfawhboRrknodA=", + "checksumSHA1": "ETmB3lf15r4sn18bB9ilBQVXto4=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "I1sxeu8aJOiM3a5/tnJya8blE3A=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "AnipOpUAJroLkoknx4xacrO0qSA=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "lAweYYdjcZ6acj6oI3HI9hX3eIQ=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "X/WdGuHGMxRCvufmQxstVjdbFT4=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "smOJ/rypXb18/Rjryf2a85paSa4=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "vL235vodhgG61BkUxRD4B7io+zk=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "kapXC7OZ1fnkZ3N6p19+WUafn40=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "Hi/sxx81pqe+fI5VrS5+UK2DsDU=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "KidzwXO5VKKI9zIuTAUsuF7KxIM=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "HtsbSppcf5M5q+zrbhJqcFlVN5I=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "p1xuYwYaBe6v4ORN6IgBG3zQGrc=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "cyCJGeDReKwRq69kTcd4lozkuIg=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "NLj37wyUZIo8/Rp3zp+LDfr878M=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "nXAp7K8BCFvsaSdorGV7swBEQgA=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "q4qCE/5OiBJA1k8P0jQRx9UhKvs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "hAIPfcEcdc8xJ7MseIufmssdE/s=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "1Fin0tclPDC/+rL7V06GrzXaMXI=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "T8ABBS2aS6yRTD6w3kjpgFLe/Zw=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { - "checksumSHA1": "IHVhprySAcelCzbTU/eumCZNu1I=", + "checksumSHA1": "mS1K6ch7/XVpXDOI5//FqSeI/f0=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "llx3DydC0nTbF0cZoYUjO9P1eZw=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "i1yLjEKjcDxm0rakhcaDuAcQb7I=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "Mf9nXjY0+Lq5RxEGEIYCYL8u+Kc=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "iRNs3RoLjrzcBsPrSynhbEqY/4s=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "z1UVKeq050lEoz9dgu/itKRc900=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "7f68df2a5baf19398d17def23a514a6e617e5937", - "revisionTime": "2018-04-04T18:37:54Z", - "version": "v1.13.28", - "versionExact": "v1.13.28" + "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", + "revisionTime": "2018-04-10T22:21:50Z", + "version": "v1.13.32", + "versionExact": "v1.13.32" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 22d33024ee1b808f2c360fa48dcbc86fa6e4b53d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 19 Apr 2018 16:46:40 -0400 Subject: [PATCH 0673/3316] New Resources and Data Sources: aws_secretsmanager_secret* --- aws/data_source_aws_secretsmanager_secret.go | 116 ++++ ...a_source_aws_secretsmanager_secret_test.go | 155 +++++ ...ource_aws_secretsmanager_secret_version.go | 87 +++ ..._aws_secretsmanager_secret_version_test.go | 164 +++++ aws/provider.go | 4 + aws/resource_aws_secretsmanager_secret.go | 316 ++++++++++ ...resource_aws_secretsmanager_secret_test.go | 585 ++++++++++++++++++ ...ource_aws_secretsmanager_secret_version.go | 205 ++++++ ..._aws_secretsmanager_secret_version_test.go | 233 +++++++ aws/tagsSecretsManager.go | 74 +++ aws/tagsSecretsManager_test.go | 79 +++ website/aws.erb | 16 + .../d/secretsmanager_secret.html.markdown | 45 ++ ...ecretsmanager_secret_version.html.markdown | 44 ++ .../r/secretsmanager_secret.html.markdown | 68 ++ ...ecretsmanager_secret_version.html.markdown | 45 ++ 16 files changed, 2236 insertions(+) create mode 100644 aws/data_source_aws_secretsmanager_secret.go create mode 100644 aws/data_source_aws_secretsmanager_secret_test.go create mode 100644 aws/data_source_aws_secretsmanager_secret_version.go create mode 100644 aws/data_source_aws_secretsmanager_secret_version_test.go create mode 100644 aws/resource_aws_secretsmanager_secret.go create mode 100644 aws/resource_aws_secretsmanager_secret_test.go create mode 100644 aws/resource_aws_secretsmanager_secret_version.go create mode 100644 aws/resource_aws_secretsmanager_secret_version_test.go create mode 100644 aws/tagsSecretsManager.go create mode 100644 aws/tagsSecretsManager_test.go create mode 100644 website/docs/d/secretsmanager_secret.html.markdown create mode 100644 website/docs/d/secretsmanager_secret_version.html.markdown create mode 100644 website/docs/r/secretsmanager_secret.html.markdown create mode 100644 website/docs/r/secretsmanager_secret_version.html.markdown diff --git a/aws/data_source_aws_secretsmanager_secret.go b/aws/data_source_aws_secretsmanager_secret.go new file mode 100644 index 00000000000..b076b8d1cfd --- /dev/null +++ b/aws/data_source_aws_secretsmanager_secret.go @@ -0,0 +1,116 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsSecretsManagerSecret() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSecretsManagerSecretRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateArn, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "rotation_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "rotation_lambda_arn": { + Type: schema.TypeString, + Computed: true, + }, + "rotation_rules": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "automatically_after_days": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + "tags": { + Type: schema.TypeMap, + Computed: true, + }, + }, + } +} + +func dataSourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + var secretID string + if v, ok := d.GetOk("arn"); ok { + secretID = v.(string) + } + if v, ok := d.GetOk("name"); ok { + if secretID != "" { + return errors.New("specify only arn or name") + } + secretID = v.(string) + } + + if secretID == "" { + return errors.New("must specify either arn or name") + } + + input := &secretsmanager.DescribeSecretInput{ + SecretId: aws.String(secretID), + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret: %s", input) + output, err := conn.DescribeSecret(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return fmt.Errorf("Secrets Manager Secret %q not found", secretID) + } + return fmt.Errorf("error reading Secrets Manager Secret: %s", err) + } + + if output.ARN == nil { + return fmt.Errorf("Secrets Manager Secret %q not found", secretID) + } + + d.SetId(aws.StringValue(output.ARN)) + d.Set("arn", output.ARN) + d.Set("description", output.Description) + d.Set("kms_key_id", output.KmsKeyId) + d.Set("name", output.Name) + d.Set("rotation_enabled", output.RotationEnabled) + d.Set("rotation_lambda_arn", output.RotationLambdaARN) + + if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { + return fmt.Errorf("error setting rotation_rules: %s", err) + } + + if err := d.Set("tags", tagsToMapSecretsManager(output.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_secretsmanager_secret_test.go b/aws/data_source_aws_secretsmanager_secret_test.go new file mode 100644 index 00000000000..7a0b24a5647 --- /dev/null +++ b/aws/data_source_aws_secretsmanager_secret_test.go @@ -0,0 +1,155 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccDataSourceAwsSecretsManagerSecret_Basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecretsManagerSecretConfig_MissingRequired, + ExpectError: regexp.MustCompile(`must specify either arn or name`), + }, + { + Config: testAccDataSourceAwsSecretsManagerSecretConfig_MultipleSpecified, + ExpectError: regexp.MustCompile(`specify only arn or name`), + }, + { + Config: testAccDataSourceAwsSecretsManagerSecretConfig_NonExistent, + ExpectError: regexp.MustCompile(`not found`), + }, + }, + }) +} + +func TestAccDataSourceAwsSecretsManagerSecret_ARN(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + datasourceName := "data.aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecretsManagerSecretConfig_ARN(rName), + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsSecretsManagerSecretCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsSecretsManagerSecret_Name(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + datasourceName := "data.aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecretsManagerSecretConfig_Name(rName), + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsSecretsManagerSecretCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + +func testAccDataSourceAwsSecretsManagerSecretCheck(datasourceName, resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + resource, ok := s.RootModule().Resources[datasourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", datasourceName) + } + + dataSource, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", resourceName) + } + + attrNames := []string{ + "arn", + "description", + "kms_key_id", + "name", + "rotation_enabled", + "rotation_lambda_arn", + "rotation_rules.#", + "tags.#", + } + + for _, attrName := range attrNames { + if resource.Primary.Attributes[attrName] != dataSource.Primary.Attributes[attrName] { + return fmt.Errorf( + "%s is %s; want %s", + attrName, + resource.Primary.Attributes[attrName], + dataSource.Primary.Attributes[attrName], + ) + } + } + + return nil + } +} + +func testAccDataSourceAwsSecretsManagerSecretConfig_ARN(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "wrong" { + name = "%[1]s-wrong" +} +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" +} + +data "aws_secretsmanager_secret" "test" { + arn = "${aws_secretsmanager_secret.test.arn}" +} +`, rName) +} + +const testAccDataSourceAwsSecretsManagerSecretConfig_MissingRequired = ` +data "aws_secretsmanager_secret" "test" {} +` + +const testAccDataSourceAwsSecretsManagerSecretConfig_MultipleSpecified = ` +data "aws_secretsmanager_secret" "test" { + arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:tf-acc-test-does-not-exist" + name = "tf-acc-test-does-not-exist" +} +` + +func testAccDataSourceAwsSecretsManagerSecretConfig_Name(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "wrong" { + name = "%[1]s-wrong" +} +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" +} + +data "aws_secretsmanager_secret" "test" { + name = "${aws_secretsmanager_secret.test.name}" +} +`, rName) +} + +const testAccDataSourceAwsSecretsManagerSecretConfig_NonExistent = ` +data "aws_secretsmanager_secret" "test" { + name = "tf-acc-test-does-not-exist" +} +` diff --git a/aws/data_source_aws_secretsmanager_secret_version.go b/aws/data_source_aws_secretsmanager_secret_version.go new file mode 100644 index 00000000000..2f1ae276667 --- /dev/null +++ b/aws/data_source_aws_secretsmanager_secret_version.go @@ -0,0 +1,87 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsSecretsManagerSecretVersion() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsSecretsManagerSecretVersionRead, + + Schema: map[string]*schema.Schema{ + "secret_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "secret_string": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + "version_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "version_stage": { + Type: schema.TypeString, + Optional: true, + Default: "AWSCURRENT", + }, + "version_stages": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func dataSourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + secretID := d.Get("secret_id").(string) + var version string + + input := &secretsmanager.GetSecretValueInput{ + SecretId: aws.String(secretID), + } + + if v, ok := d.GetOk("version_id"); ok { + versionID := v.(string) + input.VersionId = aws.String(versionID) + version = versionID + } else { + versionStage := d.Get("version_stage").(string) + input.VersionStage = aws.String(versionStage) + version = versionStage + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret Version: %s", input) + output, err := conn.GetSecretValue(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return fmt.Errorf("Secrets Manager Secret %q Version %q not found", secretID, version) + } + if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { + return fmt.Errorf("Secrets Manager Secret %q Version %q not found", secretID, version) + } + return fmt.Errorf("error reading Secrets Manager Secret Version: %s", err) + } + + d.SetId(fmt.Sprintf("%s|%s", secretID, version)) + d.Set("secret_id", secretID) + d.Set("secret_string", output.SecretString) + d.Set("version_id", output.VersionId) + + if err := d.Set("version_stages", flattenStringList(output.VersionStages)); err != nil { + return fmt.Errorf("error setting version_stages: %s", err) + } + + return nil +} diff --git a/aws/data_source_aws_secretsmanager_secret_version_test.go b/aws/data_source_aws_secretsmanager_secret_version_test.go new file mode 100644 index 00000000000..f650e359829 --- /dev/null +++ b/aws/data_source_aws_secretsmanager_secret_version_test.go @@ -0,0 +1,164 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccDataSourceAwsSecretsManagerSecretVersion_Basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret_version.test" + datasourceName := "data.aws_secretsmanager_secret_version.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecretsManagerSecretVersionConfig_NonExistent, + ExpectError: regexp.MustCompile(`not found`), + }, + { + Config: testAccDataSourceAwsSecretsManagerSecretVersionConfig_VersionStage_Default(rName), + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsSecretsManagerSecretVersionCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsSecretsManagerSecretVersion_VersionID(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret_version.test" + datasourceName := "data.aws_secretsmanager_secret_version.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecretsManagerSecretVersionConfig_VersionID(rName), + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsSecretsManagerSecretVersionCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsSecretsManagerSecretVersion_VersionStage(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret_version.test" + datasourceName := "data.aws_secretsmanager_secret_version.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecretsManagerSecretVersionConfig_VersionStage_Custom(rName), + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsSecretsManagerSecretVersionCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + +func testAccDataSourceAwsSecretsManagerSecretVersionCheck(datasourceName, resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + resource, ok := s.RootModule().Resources[datasourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", datasourceName) + } + + dataSource, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", resourceName) + } + + attrNames := []string{ + "secret_value", + "version_stages.#", + } + + for _, attrName := range attrNames { + if resource.Primary.Attributes[attrName] != dataSource.Primary.Attributes[attrName] { + return fmt.Errorf( + "%s is %s; want %s", + attrName, + resource.Primary.Attributes[attrName], + dataSource.Primary.Attributes[attrName], + ) + } + } + + return nil + } +} + +const testAccDataSourceAwsSecretsManagerSecretVersionConfig_NonExistent = ` +data "aws_secretsmanager_secret_version" "test" { + secret_id = "tf-acc-test-does-not-exist" +} +` + +func testAccDataSourceAwsSecretsManagerSecretVersionConfig_VersionID(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" +} + +resource "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + secret_string = "test-string" +} + +data "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + version_id = "${aws_secretsmanager_secret_version.test.version_id}" +} +`, rName) +} + +func testAccDataSourceAwsSecretsManagerSecretVersionConfig_VersionStage_Custom(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" +} + +resource "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + secret_string = "test-string" + version_stages = ["test-stage", "AWSCURRENT"] +} + +data "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret_version.test.secret_id}" + version_stage = "test-stage" +} +`, rName) +} + +func testAccDataSourceAwsSecretsManagerSecretVersionConfig_VersionStage_Default(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" +} + +resource "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + secret_string = "test-string" +} + +data "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret_version.test.secret_id}" +} +`, rName) +} diff --git a/aws/provider.go b/aws/provider.go index 851e1d7a3ae..7f0c3aa01ba 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -223,6 +223,8 @@ func Provider() terraform.ResourceProvider { "aws_route53_zone": dataSourceAwsRoute53Zone(), "aws_s3_bucket": dataSourceAwsS3Bucket(), "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), + "aws_secretsmanager_secret": dataSourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": dataSourceAwsSecretsManagerSecretVersion(), "aws_sns_topic": dataSourceAwsSnsTopic(), "aws_sqs_queue": dataSourceAwsSqsQueue(), "aws_ssm_parameter": dataSourceAwsSsmParameter(), @@ -489,6 +491,8 @@ func Provider() terraform.ResourceProvider { "aws_route_table": resourceAwsRouteTable(), "aws_default_route_table": resourceAwsDefaultRouteTable(), "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), diff --git a/aws/resource_aws_secretsmanager_secret.go b/aws/resource_aws_secretsmanager_secret.go new file mode 100644 index 00000000000..22e1598aede --- /dev/null +++ b/aws/resource_aws_secretsmanager_secret.go @@ -0,0 +1,316 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/resource" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsSecretsManagerSecret() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecretsManagerSecretCreate, + Read: resourceAwsSecretsManagerSecretRead, + Update: resourceAwsSecretsManagerSecretUpdate, + Delete: resourceAwsSecretsManagerSecretDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "recovery_window_in_days": { + Type: schema.TypeInt, + Optional: true, + Default: 30, + ValidateFunc: validation.IntBetween(7, 30), + }, + "rotation_enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "rotation_lambda_arn": { + Type: schema.TypeString, + Optional: true, + }, + "rotation_rules": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "automatically_after_days": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + }, + }, + } +} + +func resourceAwsSecretsManagerSecretCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + input := &secretsmanager.CreateSecretInput{ + Description: aws.String(d.Get("description").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("kms_key_id"); ok && v.(string) != "" { + input.KmsKeyId = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Secrets Manager Secret: %s", input) + output, err := conn.CreateSecret(input) + if err != nil { + return fmt.Errorf("error creating Secrets Manager Secret: %s", err) + } + + d.SetId(aws.StringValue(output.ARN)) + + if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { + input := &secretsmanager.RotateSecretInput{ + RotationLambdaARN: aws.String(v.(string)), + RotationRules: expandSecretsManagerRotationRules(d.Get("rotation_rules").([]interface{})), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Enabling Secrets Manager Secret rotation: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RotateSecret(input) + if err != nil { + // AccessDeniedException: Secrets Manager cannot invoke the specified Lambda function. + if isAWSErr(err, "AccessDeniedException", "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error enabling Secrets Manager Secret %q rotation: %s", d.Id(), err) + } + } + + if v, ok := d.GetOk("tags"); ok { + input := &secretsmanager.TagResourceInput{ + SecretId: aws.String(d.Id()), + Tags: tagsFromMapSecretsManager(v.(map[string]interface{})), + } + + log.Printf("[DEBUG] Tagging Secrets Manager Secret: %s", input) + _, err := conn.TagResource(input) + if err != nil { + return fmt.Errorf("error tagging Secrets Manager Secret %q: %s", d.Id(), input) + } + } + + return resourceAwsSecretsManagerSecretRead(d, meta) +} + +func resourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + input := &secretsmanager.DescribeSecretInput{ + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret: %s", input) + output, err := conn.DescribeSecret(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Secrets Manager Secret %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Secrets Manager Secret: %s", err) + } + + d.Set("arn", output.ARN) + d.Set("description", output.Description) + d.Set("kms_key_id", output.KmsKeyId) + d.Set("name", output.Name) + d.Set("rotation_enabled", output.RotationEnabled) + + if aws.BoolValue(output.RotationEnabled) { + d.Set("rotation_lambda_arn", output.RotationLambdaARN) + if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { + return fmt.Errorf("error setting rotation_rules: %s", err) + } + } else { + d.Set("rotation_lambda_arn", "") + d.Set("rotation_rules", []interface{}{}) + } + + if err := d.Set("tags", tagsToMapSecretsManager(output.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsSecretsManagerSecretUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + if d.HasChange("description") || d.HasChange("kms_key_id") { + input := &secretsmanager.UpdateSecretInput{ + Description: aws.String(d.Get("description").(string)), + SecretId: aws.String(d.Id()), + } + + if v, ok := d.GetOk("kms_key_id"); ok && v.(string) != "" { + input.KmsKeyId = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Updating Secrets Manager Secret: %s", input) + _, err := conn.UpdateSecret(input) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret: %s", err) + } + } + + if d.HasChange("rotation_lambda_arn") || d.HasChange("rotation_rules") { + if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { + input := &secretsmanager.RotateSecretInput{ + RotationLambdaARN: aws.String(v.(string)), + RotationRules: expandSecretsManagerRotationRules(d.Get("rotation_rules").([]interface{})), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Enabling Secrets Manager Secret rotation: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RotateSecret(input) + if err != nil { + // AccessDeniedException: Secrets Manager cannot invoke the specified Lambda function. + if isAWSErr(err, "AccessDeniedException", "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret %q rotation: %s", d.Id(), err) + } + } else { + input := &secretsmanager.CancelRotateSecretInput{ + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Cancelling Secrets Manager Secret rotation: %s", input) + _, err := conn.CancelRotateSecret(input) + if err != nil { + return fmt.Errorf("error cancelling Secret Manager Secret %q rotation: %s", d.Id(), err) + } + } + } + + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsSecretsManager(tagsFromMapSecretsManager(o), tagsFromMapSecretsManager(n)) + + if len(remove) > 0 { + log.Printf("[DEBUG] Removing Secrets Manager Secret %q tags: %#v", d.Id(), remove) + k := make([]*string, len(remove), len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.UntagResource(&secretsmanager.UntagResourceInput{ + SecretId: aws.String(d.Id()), + TagKeys: k, + }) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secrets %q tags: %s", d.Id(), err) + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating Secrets Manager Secret %q tags: %#v", d.Id(), create) + _, err := conn.TagResource(&secretsmanager.TagResourceInput{ + SecretId: aws.String(d.Id()), + Tags: create, + }) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secrets %q tags: %s", d.Id(), err) + } + } + } + + return resourceAwsSecretsManagerSecretRead(d, meta) +} + +func resourceAwsSecretsManagerSecretDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + input := &secretsmanager.DeleteSecretInput{ + RecoveryWindowInDays: aws.Int64(int64(d.Get("recovery_window_in_days").(int))), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting Secrets Manager Secret: %s", input) + _, err := conn.DeleteSecret(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting Secrets Manager Secret: %s", err) + } + + return nil +} + +func expandSecretsManagerRotationRules(l []interface{}) *secretsmanager.RotationRulesType { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + rules := &secretsmanager.RotationRulesType{ + AutomaticallyAfterDays: aws.Int64(int64(m["automatically_after_days"].(int))), + } + + return rules +} + +func flattenSecretsManagerRotationRules(rules *secretsmanager.RotationRulesType) []interface{} { + if rules == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "automatically_after_days": int(aws.Int64Value(rules.AutomaticallyAfterDays)), + } + + return []interface{}{m} +} diff --git a/aws/resource_aws_secretsmanager_secret_test.go b/aws/resource_aws_secretsmanager_secret_test.go new file mode 100644 index 00000000000..0f37593686d --- /dev/null +++ b/aws/resource_aws_secretsmanager_secret_test.go @@ -0,0 +1,585 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_secretsmanager_secret", &resource.Sweeper{ + Name: "aws_secretsmanager_secret", + F: testSweepSecretsManagerSecrets, + }) +} + +func testSweepSecretsManagerSecrets(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).secretsmanagerconn + + return conn.ListSecretsPages(&secretsmanager.ListSecretsInput{}, func(page *secretsmanager.ListSecretsOutput, isLast bool) bool { + if len(page.SecretList) == 0 { + log.Print("[DEBUG] No Secrets Manager Secrets to sweep") + return true + } + + for _, secret := range page.SecretList { + name := aws.StringValue(secret.Name) + if !strings.HasPrefix(name, "tf-acc-test-") { + log.Printf("[INFO] Skipping Secrets Manager Secret: %s", name) + continue + } + log.Printf("[INFO] Deleting Secrets Manager Secret: %s", name) + input := &secretsmanager.DeleteSecretInput{ + RecoveryWindowInDays: aws.Int64(7), + SecretId: aws.String(name), + } + + _, err := conn.DeleteSecret(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + continue + } + log.Printf("[ERROR] Failed to delete Secrets Manager Secret (%s): %s", name, err) + } + } + + return !isLast + }) +} + +func TestAccAwsSecretsManagerSecret_Basic(t *testing.T) { + var secret secretsmanager.DescribeSecretOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSecretsManagerSecretConfig_Name(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:secretsmanager:[^:]+:[^:]+:secret:%s-.+$", rName))), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "recovery_window_in_days", "30"), + resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "rotation_lambda_arn", ""), + resource.TestCheckResourceAttr(resourceName, "rotation_rules.#", "0"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"recovery_window_in_days"}, + }, + }, + }) +} + +func TestAccAwsSecretsManagerSecret_Description(t *testing.T) { + var secret secretsmanager.DescribeSecretOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSecretsManagerSecretConfig_Description(rName, "description1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "description", "description1"), + ), + }, + { + Config: testAccAwsSecretsManagerSecretConfig_Description(rName, "description2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"recovery_window_in_days"}, + }, + }, + }) +} + +func TestAccAwsSecretsManagerSecret_KmsKeyID(t *testing.T) { + var secret secretsmanager.DescribeSecretOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSecretsManagerSecretConfig_KmsKeyID(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), + ), + }, + { + Config: testAccAwsSecretsManagerSecretConfig_KmsKeyID_Updated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"recovery_window_in_days"}, + }, + }, + }) +} + +func TestAccAwsSecretsManagerSecret_RotationLambdaARN(t *testing.T) { + var secret secretsmanager.DescribeSecretOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, + Steps: []resource.TestStep{ + // Test enabling rotation on resource creation + { + Config: testAccAwsSecretsManagerSecretConfig_RotationLambdaARN(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "true"), + resource.TestMatchResourceAttr(resourceName, "rotation_lambda_arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:lambda:[^:]+:[^:]+:function:%s-1$", rName))), + ), + }, + // Test updating rotation + // We need a valid rotation function for this testing + // InvalidRequestException: A previous rotation isn’t complete. That rotation will be reattempted. + /* + { + Config: testAccAwsSecretsManagerSecretConfig_RotationLambdaARN_Updated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "true"), + resource.TestMatchResourceAttr(resourceName, "rotation_lambda_arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:lambda:[^:]+:[^:]+:function:%s-2$", rName))), + ), + }, + */ + // Test importing rotation + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"recovery_window_in_days"}, + }, + // Test removing rotation on resource update + { + Config: testAccAwsSecretsManagerSecretConfig_Name(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "rotation_lambda_arn", ""), + ), + }, + }, + }) +} + +func TestAccAwsSecretsManagerSecret_RotationRules(t *testing.T) { + var secret secretsmanager.DescribeSecretOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, + Steps: []resource.TestStep{ + // Test creating rotation rules on resource creation + { + Config: testAccAwsSecretsManagerSecretConfig_RotationRules(rName, 7), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "rotation_rules.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rotation_rules.0.automatically_after_days", "7"), + ), + }, + // Test updating rotation rules + // We need a valid rotation function for this testing + // InvalidRequestException: A previous rotation isn’t complete. That rotation will be reattempted. + /* + { + Config: testAccAwsSecretsManagerSecretConfig_RotationRules(rName, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "rotation_rules.#", "1"), + resource.TestCheckResourceAttr(resourceName, "rotation_rules.0.automatically_after_days", "1"), + ), + }, + */ + // Test importing rotation rules + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"recovery_window_in_days"}, + }, + // Test removing rotation rules on resource update + { + Config: testAccAwsSecretsManagerSecretConfig_Name(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "rotation_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "rotation_rules.#", "0"), + ), + }, + }, + }) +} + +func TestAccAwsSecretsManagerSecret_Tags(t *testing.T) { + var secret secretsmanager.DescribeSecretOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSecretsManagerSecretConfig_Tags_Single(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value"), + ), + }, + { + Config: testAccAwsSecretsManagerSecretConfig_Tags_SingleUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value-updated"), + ), + }, + { + Config: testAccAwsSecretsManagerSecretConfig_Tags_Multiple(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value"), + resource.TestCheckResourceAttr(resourceName, "tags.tag2", "tag2value"), + ), + }, + { + Config: testAccAwsSecretsManagerSecretConfig_Tags_Single(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"recovery_window_in_days"}, + }, + }, + }) +} + +func testAccCheckAwsSecretsManagerSecretDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).secretsmanagerconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_secretsmanager_secret" { + continue + } + + input := &secretsmanager.DescribeSecretInput{ + SecretId: aws.String(rs.Primary.ID), + } + + output, err := conn.DescribeSecret(input) + + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return nil + } + return err + } + + if output != nil && output.DeletedDate == nil { + return fmt.Errorf("Secret %q still exists", rs.Primary.ID) + } + } + + return nil + +} + +func testAccCheckAwsSecretsManagerSecretExists(resourceName string, secret *secretsmanager.DescribeSecretOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + conn := testAccProvider.Meta().(*AWSClient).secretsmanagerconn + input := &secretsmanager.DescribeSecretInput{ + SecretId: aws.String(rs.Primary.ID), + } + + output, err := conn.DescribeSecret(input) + + if err != nil { + return err + } + + if output == nil { + return fmt.Errorf("Secret %q does not exist", rs.Primary.ID) + } + + *secret = *output + + return nil + } +} + +func testAccAwsSecretsManagerSecretConfig_Description(rName, description string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + description = "%s" + name = "%s" +} +`, description, rName) +} + +func testAccAwsSecretsManagerSecretConfig_Name(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" +} +`, rName) +} + +func testAccAwsSecretsManagerSecretConfig_KmsKeyID(rName string) string { + return fmt.Sprintf(` +resource "aws_kms_key" "test1" { + deletion_window_in_days = 7 +} + +resource "aws_kms_key" "test2" { + deletion_window_in_days = 7 +} + +resource "aws_secretsmanager_secret" "test" { + kms_key_id = "${aws_kms_key.test1.id}" + name = "%s" +} +`, rName) +} + +func testAccAwsSecretsManagerSecretConfig_KmsKeyID_Updated(rName string) string { + return fmt.Sprintf(` +resource "aws_kms_key" "test1" { + deletion_window_in_days = 7 +} + +resource "aws_kms_key" "test2" { + deletion_window_in_days = 7 +} + +resource "aws_secretsmanager_secret" "test" { + kms_key_id = "${aws_kms_key.test2.id}" + name = "%s" +} +`, rName) +} + +func testAccAwsSecretsManagerSecretConfig_RotationLambdaARN(rName string) string { + return baseAccAWSLambdaConfig(rName, rName, rName) + fmt.Sprintf(` +# Not a real rotation function +resource "aws_lambda_function" "test1" { + filename = "test-fixtures/lambdatest.zip" + function_name = "%[1]s-1" + handler = "exports.example" + role = "${aws_iam_role.iam_for_lambda.arn}" + runtime = "nodejs4.3" +} + +resource "aws_lambda_permission" "test1" { + action = "lambda:InvokeFunction" + function_name = "${aws_lambda_function.test1.function_name}" + principal = "secretsmanager.amazonaws.com" + statement_id = "AllowExecutionFromSecretsManager1" +} + +# Not a real rotation function +resource "aws_lambda_function" "test2" { + filename = "test-fixtures/lambdatest.zip" + function_name = "%[1]s-2" + handler = "exports.example" + role = "${aws_iam_role.iam_for_lambda.arn}" + runtime = "nodejs4.3" +} + +resource "aws_lambda_permission" "test2" { + action = "lambda:InvokeFunction" + function_name = "${aws_lambda_function.test2.function_name}" + principal = "secretsmanager.amazonaws.com" + statement_id = "AllowExecutionFromSecretsManager2" +} + +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" + rotation_lambda_arn = "${aws_lambda_function.test1.arn}" + + depends_on = ["aws_lambda_permission.test1"] +} +`, rName) +} + +func testAccAwsSecretsManagerSecretConfig_RotationLambdaARN_Updated(rName string) string { + return baseAccAWSLambdaConfig(rName, rName, rName) + fmt.Sprintf(` +# Not a real rotation function +resource "aws_lambda_function" "test1" { + filename = "test-fixtures/lambdatest.zip" + function_name = "%[1]s-1" + handler = "exports.example" + role = "${aws_iam_role.iam_for_lambda.arn}" + runtime = "nodejs4.3" +} + +resource "aws_lambda_permission" "test1" { + action = "lambda:InvokeFunction" + function_name = "${aws_lambda_function.test1.function_name}" + principal = "secretsmanager.amazonaws.com" + statement_id = "AllowExecutionFromSecretsManager1" +} + +# Not a real rotation function +resource "aws_lambda_function" "test2" { + filename = "test-fixtures/lambdatest.zip" + function_name = "%[1]s-2" + handler = "exports.example" + role = "${aws_iam_role.iam_for_lambda.arn}" + runtime = "nodejs4.3" +} + +resource "aws_lambda_permission" "test2" { + action = "lambda:InvokeFunction" + function_name = "${aws_lambda_function.test2.function_name}" + principal = "secretsmanager.amazonaws.com" + statement_id = "AllowExecutionFromSecretsManager2" +} + +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" + rotation_lambda_arn = "${aws_lambda_function.test2.arn}" + + depends_on = ["aws_lambda_permission.test2"] +} +`, rName) +} + +func testAccAwsSecretsManagerSecretConfig_RotationRules(rName string, automaticallyAfterDays int) string { + return baseAccAWSLambdaConfig(rName, rName, rName) + fmt.Sprintf(` +# Not a real rotation function +resource "aws_lambda_function" "test" { + filename = "test-fixtures/lambdatest.zip" + function_name = "%[1]s" + handler = "exports.example" + role = "${aws_iam_role.iam_for_lambda.arn}" + runtime = "nodejs4.3" +} + +resource "aws_lambda_permission" "test" { + action = "lambda:InvokeFunction" + function_name = "${aws_lambda_function.test.function_name}" + principal = "secretsmanager.amazonaws.com" + statement_id = "AllowExecutionFromSecretsManager1" +} + +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" + rotation_lambda_arn = "${aws_lambda_function.test.arn}" + + rotation_rules { + automatically_after_days = %[2]d + } + + depends_on = ["aws_lambda_permission.test"] +} +`, rName, automaticallyAfterDays) +} + +func testAccAwsSecretsManagerSecretConfig_Tags_Single(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" + + tags = { + tag1 = "tag1value" + } +} +`, rName) +} + +func testAccAwsSecretsManagerSecretConfig_Tags_SingleUpdated(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" + + tags = { + tag1 = "tag1value-updated" + } +} +`, rName) +} + +func testAccAwsSecretsManagerSecretConfig_Tags_Multiple(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" + + tags = { + tag1 = "tag1value" + tag2 = "tag2value" + } +} +`, rName) +} diff --git a/aws/resource_aws_secretsmanager_secret_version.go b/aws/resource_aws_secretsmanager_secret_version.go new file mode 100644 index 00000000000..a65065f0338 --- /dev/null +++ b/aws/resource_aws_secretsmanager_secret_version.go @@ -0,0 +1,205 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSecretsManagerSecretVersion() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecretsManagerSecretVersionCreate, + Read: resourceAwsSecretsManagerSecretVersionRead, + Update: resourceAwsSecretsManagerSecretVersionUpdate, + Delete: resourceAwsSecretsManagerSecretVersionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "secret_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "secret_string": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Sensitive: true, + }, + "version_id": { + Type: schema.TypeString, + Computed: true, + }, + "version_stages": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceAwsSecretsManagerSecretVersionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + secretID := d.Get("secret_id").(string) + + input := &secretsmanager.PutSecretValueInput{ + SecretId: aws.String(secretID), + SecretString: aws.String(d.Get("secret_string").(string)), + } + + if v, ok := d.GetOk("version_stages"); ok { + input.VersionStages = expandStringList(v.(*schema.Set).List()) + } + + log.Printf("[DEBUG] Putting Secrets Manager Secret %q value", secretID) + output, err := conn.PutSecretValue(input) + if err != nil { + return fmt.Errorf("error putting Secrets Manager Secret value: %s", err) + } + + d.SetId(fmt.Sprintf("%s|%s", secretID, aws.StringValue(output.VersionId))) + + return resourceAwsSecretsManagerSecretVersionRead(d, meta) +} + +func resourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) + if err != nil { + return err + } + + input := &secretsmanager.GetSecretValueInput{ + SecretId: aws.String(secretID), + VersionId: aws.String(versionID), + } + + log.Printf("[DEBUG] Reading Secrets Manager Secret Version: %s", input) + output, err := conn.GetSecretValue(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Secrets Manager Secret Version %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { + log.Printf("[WARN] Secrets Manager Secret Version %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Secrets Manager Secret Version: %s", err) + } + + d.Set("secret_id", secretID) + d.Set("secret_string", output.SecretString) + d.Set("version_id", output.VersionId) + + if err := d.Set("version_stages", flattenStringList(output.VersionStages)); err != nil { + return fmt.Errorf("error setting version_stages: %s", err) + } + + return nil +} + +func resourceAwsSecretsManagerSecretVersionUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) + if err != nil { + return err + } + + o, n := d.GetChange("version_stages") + os := o.(*schema.Set) + ns := n.(*schema.Set) + stagesToAdd := ns.Difference(os).List() + stagesToRemove := os.Difference(ns).List() + + for _, stage := range stagesToAdd { + input := &secretsmanager.UpdateSecretVersionStageInput{ + MoveToVersionId: aws.String(versionID), + SecretId: aws.String(secretID), + VersionStage: aws.String(stage.(string)), + } + + log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) + _, err := conn.UpdateSecretVersionStage(input) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) + } + } + + for _, stage := range stagesToRemove { + // InvalidParameterException: You can only move staging label AWSCURRENT to a different secret version. It can’t be completely removed. + if stage.(string) == "AWSCURRENT" { + log.Printf("[INFO] Skipping removal of AWSCURRENT staging label for secret %q version %q", secretID, versionID) + continue + } + input := &secretsmanager.UpdateSecretVersionStageInput{ + RemoveFromVersionId: aws.String(versionID), + SecretId: aws.String(secretID), + VersionStage: aws.String(stage.(string)), + } + log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) + _, err := conn.UpdateSecretVersionStage(input) + if err != nil { + return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) + } + } + + return resourceAwsSecretsManagerSecretVersionRead(d, meta) +} + +func resourceAwsSecretsManagerSecretVersionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).secretsmanagerconn + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(d.Id()) + if err != nil { + return err + } + + if v, ok := d.GetOk("version_stages"); ok { + for _, stage := range v.(*schema.Set).List() { + // InvalidParameterException: You can only move staging label AWSCURRENT to a different secret version. It can’t be completely removed. + if stage.(string) == "AWSCURRENT" { + log.Printf("[WARN] Cannot remove AWSCURRENT staging label, which may leave the secret %q version %q active", secretID, versionID) + continue + } + input := &secretsmanager.UpdateSecretVersionStageInput{ + RemoveFromVersionId: aws.String(versionID), + SecretId: aws.String(secretID), + VersionStage: aws.String(stage.(string)), + } + log.Printf("[DEBUG] Updating Secrets Manager Secret Version Stage: %s", input) + _, err := conn.UpdateSecretVersionStage(input) + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return nil + } + if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { + return nil + } + return fmt.Errorf("error updating Secrets Manager Secret %q Version Stage %q: %s", secretID, stage.(string), err) + } + } + } + + return nil +} + +func decodeSecretsManagerSecretVersionID(id string) (string, string, error) { + idParts := strings.Split(id, "|") + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format SecretID|VersionID, received: %s", id) + } + return idParts[0], idParts[1], nil +} diff --git a/aws/resource_aws_secretsmanager_secret_version_test.go b/aws/resource_aws_secretsmanager_secret_version_test.go new file mode 100644 index 00000000000..adbcfec3360 --- /dev/null +++ b/aws/resource_aws_secretsmanager_secret_version_test.go @@ -0,0 +1,233 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsSecretsManagerSecretVersion_Basic(t *testing.T) { + var version secretsmanager.GetSecretValueOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret_version.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSecretsManagerSecretVersionConfig_SecretString(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretVersionExists(resourceName, &version), + resource.TestCheckResourceAttr(resourceName, "secret_string", "test-string"), + resource.TestCheckResourceAttrSet(resourceName, "version_id"), + resource.TestCheckResourceAttr(resourceName, "version_stages.#", "1"), + resource.TestCheckResourceAttr(resourceName, "version_stages.3070137", "AWSCURRENT"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsSecretsManagerSecretVersion_VersionStages(t *testing.T) { + var version secretsmanager.GetSecretValueOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret_version.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSecretsManagerSecretVersionConfig_VersionStages_Single(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretVersionExists(resourceName, &version), + resource.TestCheckResourceAttr(resourceName, "secret_string", "test-string"), + resource.TestCheckResourceAttr(resourceName, "version_stages.#", "2"), + resource.TestCheckResourceAttr(resourceName, "version_stages.3070137", "AWSCURRENT"), + resource.TestCheckResourceAttr(resourceName, "version_stages.2848565413", "one"), + ), + }, + { + Config: testAccAwsSecretsManagerSecretVersionConfig_VersionStages_SingleUpdated(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretVersionExists(resourceName, &version), + resource.TestCheckResourceAttr(resourceName, "secret_string", "test-string"), + resource.TestCheckResourceAttr(resourceName, "version_stages.#", "2"), + resource.TestCheckResourceAttr(resourceName, "version_stages.3070137", "AWSCURRENT"), + resource.TestCheckResourceAttr(resourceName, "version_stages.3351840846", "two"), + ), + }, + { + Config: testAccAwsSecretsManagerSecretVersionConfig_VersionStages_Multiple(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretVersionExists(resourceName, &version), + resource.TestCheckResourceAttr(resourceName, "secret_string", "test-string"), + resource.TestCheckResourceAttr(resourceName, "version_stages.#", "3"), + resource.TestCheckResourceAttr(resourceName, "version_stages.3070137", "AWSCURRENT"), + resource.TestCheckResourceAttr(resourceName, "version_stages.2848565413", "one"), + resource.TestCheckResourceAttr(resourceName, "version_stages.3351840846", "two"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsSecretsManagerSecretVersionDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).secretsmanagerconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_secretsmanager_secret_version" { + continue + } + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(rs.Primary.ID) + if err != nil { + return err + } + + input := &secretsmanager.GetSecretValueInput{ + SecretId: aws.String(secretID), + VersionId: aws.String(versionID), + } + + output, err := conn.GetSecretValue(input) + + if err != nil { + if isAWSErr(err, secretsmanager.ErrCodeResourceNotFoundException, "") { + return nil + } + if isAWSErr(err, secretsmanager.ErrCodeInvalidRequestException, "You can’t perform this operation on the secret because it was deleted") { + return nil + } + return err + } + + if output == nil { + return nil + } + + if len(output.VersionStages) == 0 { + return nil + } + + if len(output.VersionStages) == 1 && aws.StringValue(output.VersionStages[0]) == "AWSCURRENT" { + return nil + } + + return fmt.Errorf("Secret Version %q still exists", rs.Primary.ID) + } + + return nil + +} + +func testAccCheckAwsSecretsManagerSecretVersionExists(resourceName string, version *secretsmanager.GetSecretValueOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + secretID, versionID, err := decodeSecretsManagerSecretVersionID(rs.Primary.ID) + if err != nil { + return err + } + + conn := testAccProvider.Meta().(*AWSClient).secretsmanagerconn + + input := &secretsmanager.GetSecretValueInput{ + SecretId: aws.String(secretID), + VersionId: aws.String(versionID), + } + + output, err := conn.GetSecretValue(input) + + if err != nil { + return err + } + + if output == nil { + return fmt.Errorf("Secret Version %q does not exist", rs.Primary.ID) + } + + *version = *output + + return nil + } +} + +func testAccAwsSecretsManagerSecretVersionConfig_SecretString(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" +} + +resource "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + secret_string = "test-string" +} +`, rName) +} + +func testAccAwsSecretsManagerSecretVersionConfig_VersionStages_Single(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" +} + +resource "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + secret_string = "test-string" + + version_stages = ["one", "AWSCURRENT"] +} +`, rName) +} + +func testAccAwsSecretsManagerSecretVersionConfig_VersionStages_SingleUpdated(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" +} + +resource "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + secret_string = "test-string" + + version_stages = ["two", "AWSCURRENT"] +} +`, rName) +} + +func testAccAwsSecretsManagerSecretVersionConfig_VersionStages_Multiple(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" +} + +resource "aws_secretsmanager_secret_version" "test" { + secret_id = "${aws_secretsmanager_secret.test.id}" + secret_string = "test-string" + + version_stages = ["one", "two", "AWSCURRENT"] +} +`, rName) +} diff --git a/aws/tagsSecretsManager.go b/aws/tagsSecretsManager.go new file mode 100644 index 00000000000..55921831797 --- /dev/null +++ b/aws/tagsSecretsManager.go @@ -0,0 +1,74 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsSecretsManager(oldTags, newTags []*secretsmanager.Tag) ([]*secretsmanager.Tag, []*secretsmanager.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[*t.Key] = *t.Value + } + + // Build the list of what to remove + var remove []*secretsmanager.Tag + for _, t := range oldTags { + old, ok := create[*t.Key] + if !ok || old != *t.Value { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapSecretsManager(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapSecretsManager(m map[string]interface{}) []*secretsmanager.Tag { + result := make([]*secretsmanager.Tag, 0, len(m)) + for k, v := range m { + t := &secretsmanager.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredSecretsManager(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapSecretsManager(ts []*secretsmanager.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredSecretsManager(t) { + result[*t.Key] = *t.Value + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredSecretsManager(t *secretsmanager.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/aws/tagsSecretsManager_test.go b/aws/tagsSecretsManager_test.go new file mode 100644 index 00000000000..d6eebe5343c --- /dev/null +++ b/aws/tagsSecretsManager_test.go @@ -0,0 +1,79 @@ +package aws + +import ( + "reflect" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/secretsmanager" +) + +// go test -v -run="TestDiffSecretsManagerTags" +func TestDiffSecretsManagerTags(t *testing.T) { + cases := []struct { + Old, New map[string]interface{} + Create, Remove map[string]string + }{ + // Basic add/remove + { + Old: map[string]interface{}{ + "foo": "bar", + }, + New: map[string]interface{}{ + "bar": "baz", + }, + Create: map[string]string{ + "bar": "baz", + }, + Remove: map[string]string{ + "foo": "bar", + }, + }, + + // Modify + { + Old: map[string]interface{}{ + "foo": "bar", + }, + New: map[string]interface{}{ + "foo": "baz", + }, + Create: map[string]string{ + "foo": "baz", + }, + Remove: map[string]string{ + "foo": "bar", + }, + }, + } + + for i, tc := range cases { + c, r := diffTagsSecretsManager(tagsFromMapSecretsManager(tc.Old), tagsFromMapSecretsManager(tc.New)) + cm := tagsToMapSecretsManager(c) + rm := tagsToMapSecretsManager(r) + if !reflect.DeepEqual(cm, tc.Create) { + t.Fatalf("%d: bad create: %#v", i, cm) + } + if !reflect.DeepEqual(rm, tc.Remove) { + t.Fatalf("%d: bad remove: %#v", i, rm) + } + } +} + +// go test -v -run="TestIgnoringTagsSecretsManager" +func TestIgnoringTagsSecretsManager(t *testing.T) { + var ignoredTags []*secretsmanager.Tag + ignoredTags = append(ignoredTags, &secretsmanager.Tag{ + Key: aws.String("aws:cloudformation:logical-id"), + Value: aws.String("foo"), + }) + ignoredTags = append(ignoredTags, &secretsmanager.Tag{ + Key: aws.String("aws:foo:bar"), + Value: aws.String("baz"), + }) + for _, tag := range ignoredTags { + if !tagIgnoredSecretsManager(tag) { + t.Fatalf("Tag %v with value %v not ignored, but should be!", *tag.Key, *tag.Value) + } + } +} diff --git a/website/aws.erb b/website/aws.erb index 8f1f078d61c..74751f5c011 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -232,6 +232,12 @@ > aws_s3_bucket_object + > + aws_secretsmanager_secret + + > + aws_secretsmanager_secret_version + > aws_security_group @@ -1669,6 +1675,16 @@ + > + Secrets Manager Resources + + > SES Resources diff --git a/website/docs/d/secretsmanager_secret.html.markdown b/website/docs/d/secretsmanager_secret.html.markdown new file mode 100644 index 00000000000..ec8e23a3b57 --- /dev/null +++ b/website/docs/d/secretsmanager_secret.html.markdown @@ -0,0 +1,45 @@ +--- +layout: "aws" +page_title: "AWS: aws_secretsmanager_secret" +sidebar_current: "docs-aws-datasource-secretsmanager-secret" +description: |- + Retrieve metadata information about a Secrets Manager secret +--- + +# Data Source: aws_secretsmanager_secret + +Retrieve metadata information about a Secrets Manager secret. To retrieve a secret value, see the [`aws_secretsmanager_secret_version` data source](/docs/providers/aws/d/secretsmanager_secret_version.html). + +## Example Usage + +### ARN + +```hcl +data "aws_secretsmanager_secret" "by-arn" { + arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-123456" +} +``` + +### Name + +```hcl +data "aws_secretsmanager_secret" "by-name" { + name = "example" +} +``` + +## Argument Reference + +* `arn` - (Optional) The Amazon Resource Name (ARN) of the secret to retrieve. +* `name` - (Optional) The name of the secret to retrieve. + +## Attributes Reference + +* `arn` - The Amazon Resource Name (ARN) of the secret. +* `description` - A description of the secret. +* `kms_key_id` - The Key Management Service (KMS) Customer Master Key (CMK) associated with the secret. +* `id` - The Amazon Resource Name (ARN) of the secret. +* `rotation_enabled` - Whether rotation is enabled or not. +* `rotation_lambda_arn` - Rotation Lambda function Amazon Resource Name (ARN) if rotation is enabled. +* `rotation_rules` - Rotation rules if rotation is enabled. +* `tags` - Tags of the secret. diff --git a/website/docs/d/secretsmanager_secret_version.html.markdown b/website/docs/d/secretsmanager_secret_version.html.markdown new file mode 100644 index 00000000000..3ba19c58483 --- /dev/null +++ b/website/docs/d/secretsmanager_secret_version.html.markdown @@ -0,0 +1,44 @@ +--- +layout: "aws" +page_title: "AWS: aws_secretsmanager_secret_version" +sidebar_current: "docs-aws-datasource-secretsmanager-secret-version" +description: |- + Retrieve information about a Secrets Manager secret version including its secret value +--- + +# Data Source: aws_secretsmanager_secret_version + +Retrieve information about a Secrets Manager secret version includings its secret value. To retrieve secret metadata, see the [`aws_secretsmanager_secret` data source](/docs/providers/aws/d/secretsmanager_secret.html). + +## Example Usage + +### Retrieve Current Secret Version + +By default, this data sources retrieves information based on the `AWSCURRENT` staging label. + +```hcl +data "aws_secretsmanager_secret_version" "example" { + secret_id = "${data.aws_secretsmanager_secret.example.id}" +} +``` + +### Retrieve Specific Secret Version + +```hcl +data "aws_secretsmanager_secret_version" "by-version-stage" { + secret_id = "${data.aws_secretsmanager_secret.example.id}" + version_stage = "example" +} +``` + +## Argument Reference + +* `secret_id` - (Required) Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. +* `version_id` - (Optional) Specifies the unique identifier of the version of the secret that you want to retrieve. Overrides `version_stage`. +* `version_stage` - (Optional) Specifies the secret version that you want to retrieve by the staging label attached to the version. Defaults to `AWSCURRENT`. + +## Attributes Reference + +* `id` - The unique identifier of this version of the secret. +* `secret_string` - The decrypted part of the protected secret information that was originally provided as a string. +* `version_id` - The unique identifier of this version of the secret. diff --git a/website/docs/r/secretsmanager_secret.html.markdown b/website/docs/r/secretsmanager_secret.html.markdown new file mode 100644 index 00000000000..909c977157f --- /dev/null +++ b/website/docs/r/secretsmanager_secret.html.markdown @@ -0,0 +1,68 @@ +--- +layout: "aws" +page_title: "AWS: aws_secretsmanager_secret" +sidebar_current: "docs-aws-resource-secretsmanager-secret" +description: |- + Provides a resource to manage AWS Secrets Manager secret metadata +--- + +# aws_secretsmanager_secret + +Provides a resource to manage AWS Secrets Manager secret metadata. To manage a secret value, see the [`aws_secretsmanager_secret_version` resource](/docs/providers/aws/r/secretsmanager_secret_version.html). + +## Example Usage + +### Basic + +```hcl +resource "aws_secretsmanager_secret" "example" { + name = "example" +} +``` + +### Rotation Configuration + +~> **NOTE:** Configuring rotation causes the secret to rotate once as soon as you store the secret. Before you do this, you must ensure that all of your applications that use the credentials stored in the secret are updated to retrieve the secret from AWS Secrets Manager. The old credentials might no longer be usable after the initial rotation and any applications that you fail to update will break as soon as the old credentials are no longer valid. + +~> **NOTE:** If you cancel a rotation that is in progress (by removing the `rotation` configuration), it can leave the VersionStage labels in an unexpected state. Depending on what step of the rotation was in progress, you might need to remove the staging label AWSPENDING from the partially created version, specified by the SecretVersionId response value. You should also evaluate the partially rotated new version to see if it should be deleted, which you can do by removing all staging labels from the new version's VersionStage field. + +```hcl +resource "aws_secretsmanager_secret" "rotation-example" { + name = "rotation-example" + rotation_lambda_arn = "${aws_lambda_function.example.arn}" + + rotation_rules { + automatically_after_days = 7 + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Specifies the friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: `/_+=.@-` Spaces are not permitted. +* `description` - (Optional) A description of the secret. +* `kms_key_id` - (Optional) Specifies the ARN or alias of the AWS KMS customer master key (CMK) to be used to encrypt the secret values in the versions stored in this secret. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default CMK (the one named `aws/secretsmanager`). If the default KMS CMK with that name doesn't yet exist, then AWS Secrets Manager creates it for you automatically the first time. +* `recovery_window_in_days` - (Optional) Specifies the number of days that AWS Secrets Manager waits before it can delete the secret. This value can range from 7 to 30 days. The default value is 30. +* `rotation_lambda_arn` - (Optional) Specifies the ARN of the Lambda function that can rotate the secret. +* `rotation_rules` - (Optional) A structure that defines the rotation configuration for this secret. Defined below. +* `tags` - (Optional) Specifies a key-value map of user-defined tags that are attached to the secret. + +### rotation_rules + +* `automatically_after_days` - (Required) Specifies the number of days between automatic scheduled rotations of the secret. + +## Attribute Reference + +* `id` - Amazon Resource Name (ARN) of the secret. +* `arn` - Amazon Resource Name (ARN) of the secret. +* `rotation_enabled` - Specifies whether automatic rotation is enabled for this secret. + +## Import + +`aws_secretsmanager_secret` can be imported by using the secret Amazon Resource Name (ARN), e.g. + +``` +$ terraform import aws_secretsmanager_secret.example arn:aws:secretsmanager:us-east-1:123456789012:secret:example-123456 +``` diff --git a/website/docs/r/secretsmanager_secret_version.html.markdown b/website/docs/r/secretsmanager_secret_version.html.markdown new file mode 100644 index 00000000000..231bdd1178a --- /dev/null +++ b/website/docs/r/secretsmanager_secret_version.html.markdown @@ -0,0 +1,45 @@ +--- +layout: "aws" +page_title: "AWS: aws_secretsmanager_secret_version" +sidebar_current: "docs-aws-resource-secretsmanager-secret-version" +description: |- + Provides a resource to manage AWS Secrets Manager secret version including its secret value +--- + +# aws_secretsmanager_secret_version + +Provides a resource to manage AWS Secrets Manager secret version including its secret value. To manage secret metadata, see the [`aws_secretsmanager_secret` resource](/docs/providers/aws/r/secretsmanager_secret.html). + +~> **NOTE:** If the `AWSCURRENT` staging label is present on this version during resource deletion, that label cannot be removed and will be skipped to prevent errors when fully deleting the secret. That label will leave this secret version active even after the resource is deleted from Terraform unless the secret itself is deleted. Move the `AWSCURRENT` staging label before or after deleting this resource from Terraform to fully trigger version deprecation if necessary. + +## Example Usage + +```hcl +resource "aws_secretsmanager_secret_version" "example" { + secret_id = "${aws_secretsmanager_secret.example.id}" + secret_string = "example-string-to-protect" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `secret_id` - (Required) Specifies the secret to which you want to add a new version. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. The secret must already exist. +* `secret_string` - (Required) Specifies text data that you want to encrypt and store in this version of the secret. +* `version_stages` - (Optional) Specifies a list of staging labels that are attached to this version of the secret. A staging label must be unique to a single version of the secret. If you specify a staging label that's already associated with a different version of the same secret then that staging label is automatically removed from the other version and attached to this version. If you do not specify a value, then AWS Secrets Manager automatically moves the staging label `AWSCURRENT` to this new version on creation. + +~> **NOTE:** If `version_stages` is configured, you must include the `AWSCURRENT` staging label if this secret version is the only version or if the label is currently present on this secret version, otherwise Terraform will show a perpetual difference. + +## Attribute Reference + +* `id` - A pipe delimited combination of secret ID and version ID +* `version_id` - The unique identifier of the version of the secret. + +## Import + +`aws_secretsmanager_secret_version` can be imported by using the secret ID and version ID, e.g. + +``` +$ terraform import aws_secretsmanager_secret.example arn:aws:secretsmanager:us-east-1:123456789012:secret:example-123456|xxxxx-xxxxxxx-xxxxxxx-xxxxx +``` From 26fd91dde34a14643e72c7498e02003e98ef2182 Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Thu, 19 Apr 2018 18:47:08 -0700 Subject: [PATCH 0674/3316] Update acceptance tests to include coverage of multiple values for IAMPolicyStatementPrincipalSet.Identifiers --- aws/data_source_aws_iam_policy_document_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aws/data_source_aws_iam_policy_document_test.go b/aws/data_source_aws_iam_policy_document_test.go index bd7367f62bc..3e805146e1e 100644 --- a/aws/data_source_aws_iam_policy_document_test.go +++ b/aws/data_source_aws_iam_policy_document_test.go @@ -296,7 +296,10 @@ data "aws_iam_policy_document" "test" { ] principals { type = "AWS" - identifiers = ["arn:blahblah:example"] + identifiers = [ + "arn:blahblah:example", + "arn:blahblahblah:example", + ] } } @@ -376,7 +379,10 @@ var testAccAWSIAMPolicyDocumentSourceExpectedJSON = `{ "arn:aws:s3:::foo/home/${aws:username}" ], "Principal": { - "AWS": "arn:blahblah:example" + "AWS": [ + "arn:blahblahblah:example", + "arn:blahblah:example" + ] } }, { From ea0d235aec34b7d11a46f82f5ac2758e3d68194c Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Thu, 19 Apr 2018 18:47:35 -0700 Subject: [PATCH 0675/3316] Handle multiple values for IAMPolicyStatementPrincipalSet.Identifiers --- aws/iam_policy_model.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/aws/iam_policy_model.go b/aws/iam_policy_model.go index 9c74e297a54..302149fa139 100644 --- a/aws/iam_policy_model.go +++ b/aws/iam_policy_model.go @@ -101,7 +101,7 @@ func (ps IAMPolicyStatementPrincipalSet) MarshalJSON() ([]byte, error) { case string: raw[p.Type] = i default: - panic("Unsupported data type for IAMPolicyStatementPrincipalSet") + return []byte{}, fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet", i) } } @@ -121,10 +121,21 @@ func (ps *IAMPolicyStatementPrincipalSet) UnmarshalJSON(b []byte) error { out = append(out, IAMPolicyStatementPrincipal{Type: "*", Identifiers: []string{"*"}}) case map[string]interface{}: for key, value := range data.(map[string]interface{}) { - out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: value}) + switch vt := value.(type) { + case string: + out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: value.(string)}) + case []interface{}: + values := []string{} + for _, v := range value.([]interface{}) { + values = append(values, v.(string)) + } + out = append(out, IAMPolicyStatementPrincipal{Type: key, Identifiers: values}) + default: + return fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet.Identifiers", vt) + } } default: - return fmt.Errorf("Unsupported data type %s for IAMPolicyStatementPrincipalSet", t) + return fmt.Errorf("Unsupported data type %T for IAMPolicyStatementPrincipalSet", t) } *ps = out From 071ee817783a155f875df6af6b1f22d2682f0f67 Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 20 Apr 2018 06:35:19 -0400 Subject: [PATCH 0676/3316] cater for removal of attribute block --- aws/data_source_aws_instance.go | 4 +- aws/resource_aws_instance.go | 30 ++++++------- aws/resource_aws_instance_test.go | 74 +++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 16 deletions(-) diff --git a/aws/data_source_aws_instance.go b/aws/data_source_aws_instance.go index a4cc5f82c01..83bd5430135 100644 --- a/aws/data_source_aws_instance.go +++ b/aws/data_source_aws_instance.go @@ -406,7 +406,9 @@ func instanceDescriptionAttributes(d *schema.ResourceData, instance *ec2.Instanc if err != nil { return err } - d.Set("credit_specification", creditSpecifications) + if err := d.Set("credit_specification", creditSpecifications); err != nil { + return fmt.Errorf("error setting credit_specification: %s", err) + } } return nil diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 02804b639fe..225db4bac6d 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -437,14 +437,19 @@ func resourceAwsInstance() *schema.Resource { "credit_specification": { Type: schema.TypeList, Optional: true, - Computed: true, MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu_credits": { Type: schema.TypeString, Optional: true, - Computed: true, + Default: "standard", }, }, }, @@ -805,7 +810,9 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { if err != nil { return err } - d.Set("credit_specification", creditSpecifications) + if err := d.Set("credit_specification", creditSpecifications); err != nil { + return fmt.Errorf("error setting credit_specification: %s", err) + } } if d.Get("get_password_data").(bool) { @@ -1104,11 +1111,9 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } if d.HasChange("credit_specification") { - creditSpecifications := d.Get("credit_specification").([]interface{}) - if len(creditSpecifications) == 1 { - creditSpecification := creditSpecifications[0].(map[string]interface{}) + if v, ok := d.GetOk("credit_specification"); ok { + creditSpecification := v.([]interface{})[0].(map[string]interface{}) log.Printf("[DEBUG] Modifying credit specification for Instance (%s)", d.Id()) - _, err := conn.ModifyInstanceCreditSpecification(&ec2.ModifyInstanceCreditSpecificationInput{ InstanceCreditSpecifications: []*ec2.InstanceCreditSpecificationRequest{ { @@ -1690,14 +1695,9 @@ func buildAwsInstanceOpts( } if v, ok := d.GetOk("credit_specification"); ok { - cs := v.([]interface{}) - for _, csValue := range cs { - creditSpecification := csValue.(map[string]interface{}) - if cpuCredits, ok := creditSpecification["cpu_credits"].(string); ok { - opts.CreditSpecification = &ec2.CreditSpecificationRequest{ - CpuCredits: aws.String(cpuCredits), - } - } + cs := v.([]interface{})[0].(map[string]interface{}) + opts.CreditSpecification = &ec2.CreditSpecificationRequest{ + CpuCredits: aws.String(cs["cpu_credits"].(string)), } } diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index bfbfcdb5bca..a9356dc5f9a 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -1397,6 +1397,27 @@ func TestAccAWSInstance_getPasswordData_trueToFalse(t *testing.T) { }) } +func TestAccAWSInstance_creditSpecification_unspecifiedDefaultsToStandard(t *testing.T) { + var instance ec2.Instance + resName := "aws_instance.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfig_creditSpecification_unspecified(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &instance), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.0.cpu_credits", "standard"), + ), + }, + }, + }) +} + func TestAccAWSInstance_creditSpecification_standardCpuCredits(t *testing.T) { var instance ec2.Instance resName := "aws_instance.foo" @@ -1469,6 +1490,36 @@ func TestAccAWSInstance_creditSpecification_updateCpuCredits(t *testing.T) { }) } +func TestAccAWSInstance_creditSpecification_removalReturnsStandard(t *testing.T) { + var before ec2.Instance + var after ec2.Instance + resName := "aws_instance.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfig_creditSpecification_unlimitedCpuCredits(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &before), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.0.cpu_credits", "unlimited"), + ), + }, + { + Config: testAccInstanceConfig_creditSpecification_unspecified(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &after), + resource.TestCheckResourceAttr(resName, "credit_specification.#", "1"), + resource.TestCheckResourceAttr(resName, "credit_specification.0.cpu_credits", "standard"), + ), + }, + }, + }) +} + func testAccCheckInstanceNotRecreated(t *testing.T, before, after *ec2.Instance) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -3043,6 +3094,29 @@ func testAccInstanceConfig_getPasswordData(val bool, rInt int) string { `, rInt, val) } +func testAccInstanceConfig_creditSpecification_unspecified(rInt int) string { + return fmt.Sprintf(` +resource "aws_vpc" "my_vpc" { + cidr_block = "172.16.0.0/16" + tags { + Name = "tf-acctest-%d" + } +} + +resource "aws_subnet" "my_subnet" { + vpc_id = "${aws_vpc.my_vpc.id}" + cidr_block = "172.16.20.0/24" + availability_zone = "us-west-2a" +} + +resource "aws_instance" "foo" { + ami = "ami-22b9a343" # us-west-2 + instance_type = "t2.micro" + subnet_id = "${aws_subnet.my_subnet.id}" +} +`, rInt) +} + func testAccInstanceConfig_creditSpecification_standardCpuCredits(rInt int) string { return fmt.Sprintf(` resource "aws_vpc" "my_vpc" { From d2aa26453c44bebdd90085c64d448cf9ac1ab77a Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Fri, 20 Apr 2018 08:02:36 -0400 Subject: [PATCH 0677/3316] use resources list to cleanup test budgets PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178953821) --- aws/resource_aws_budgets_budget_test.go | 30 ++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 2363a9dd575..15aff721b84 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -28,7 +28,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: func(s *terraform.State) error { - return testAccAWSBudgetsBudgetDestroy(name, testAccProvider) + return testAccAWSBudgetsBudgetDestroy(testAccProvider, s) }, Steps: []resource.TestStep{ { @@ -78,7 +78,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: func(s *terraform.State) error { - return testAccAWSBudgetsBudgetDestroy(name, testAccProvider) + return testAccAWSBudgetsBudgetDestroy(testAccProvider, s) }, Steps: []resource.TestStep{ { @@ -212,16 +212,26 @@ func testAccAWSBudgetsBudgetCheckCostTypes(config budgets.Budget, costTypes budg return nil } -func testAccAWSBudgetsBudgetDestroy(budgetName string, provider *schema.Provider) error { +func testAccAWSBudgetsBudgetDestroy(provider *schema.Provider, s *terraform.State) error { meta := provider.Meta() client := meta.(*AWSClient).budgetconn - accountID := meta.(*AWSClient).accountid - _, err := client.DescribeBudget(&budgets.DescribeBudgetInput{ - BudgetName: &budgetName, - AccountId: &accountID, - }) - if !isAWSErr(err, budgets.ErrCodeNotFoundException, "") { - return fmt.Errorf("Budget '%s' was not deleted properly", budgetName) + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_budgets_budget" { + continue + } + + accountID, budgetName, err := decodeBudgetsBudgetID(rs.Primary.ID) + if err != nil { + return fmt.Errorf("Budget '%s': id could not be decoded and could not be deleted properly", rs.Primary.ID) + } + + _, err = client.DescribeBudget(&budgets.DescribeBudgetInput{ + BudgetName: aws.String(budgetName), + AccountId: aws.String(accountID), + }) + if !isAWSErr(err, budgets.ErrCodeNotFoundException, "") { + return fmt.Errorf("Budget '%s' was not deleted properly", rs.Primary.ID) + } } return nil From 25b9a860f3fa358c18b453c9633c2c89b1b88079 Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Fri, 20 Apr 2018 08:17:55 -0400 Subject: [PATCH 0678/3316] conform budgetdestroy signature to testdestroy --- aws/resource_aws_budgets_budget_test.go | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 15aff721b84..068e9029933 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -25,11 +25,9 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { configBasicUpdate := testAccAWSBudgetsBudgetConfigUpdate(name) resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: func(s *terraform.State) error { - return testAccAWSBudgetsBudgetDestroy(testAccProvider, s) - }, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccAWSBudgetsBudgetDestroy, Steps: []resource.TestStep{ { Config: testAccAWSBudgetsBudgetConfig_BasicDefaults(configBasicDefaults, costFilterKey), @@ -75,11 +73,9 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { configBasicUpdate := testAccAWSBudgetsBudgetConfigUpdate(name) resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: func(s *terraform.State) error { - return testAccAWSBudgetsBudgetDestroy(testAccProvider, s) - }, + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccAWSBudgetsBudgetDestroy, Steps: []resource.TestStep{ { Config: testAccAWSBudgetsBudgetConfig_PrefixDefaults(configBasicDefaults, costFilterKey), @@ -212,8 +208,8 @@ func testAccAWSBudgetsBudgetCheckCostTypes(config budgets.Budget, costTypes budg return nil } -func testAccAWSBudgetsBudgetDestroy(provider *schema.Provider, s *terraform.State) error { - meta := provider.Meta() +func testAccAWSBudgetsBudgetDestroy(s *terraform.State) error { + meta := testAccProvider.Meta() client := meta.(*AWSClient).budgetconn for _, rs := range s.RootModule().Resources { if rs.Type != "aws_budgets_budget" { From fafddd8e75577272f6e5f0285009d9269c67b89a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 08:21:08 -0400 Subject: [PATCH 0679/3316] Update CHANGELOG for #4268 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0598f00912..cd4d483731e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.16.0 (Unreleased) + +ENHANCEMENTS: + +* resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] + ## 1.15.0 (April 18, 2018) NOTES: From f46daf6361d533863c08d751262219dc80571b4d Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Fri, 20 Apr 2018 08:32:54 -0400 Subject: [PATCH 0680/3316] rework function signature for exists check PR Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879/files#r178951991) --- aws/resource_aws_budgets_budget_test.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 068e9029933..e4f5e2dd01e 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -13,7 +13,6 @@ import ( "github.com/aws/aws-sdk-go/service/budgets" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/terraform" ) @@ -32,7 +31,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { { Config: testAccAWSBudgetsBudgetConfig_BasicDefaults(configBasicDefaults, costFilterKey), Check: resource.ComposeTestCheckFunc( - testAccAWSBudgetsBudgetExists(configBasicDefaults, testAccProvider), + testAccAWSBudgetsBudgetExists("aws_budgets_budget.foo", configBasicDefaults), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(*configBasicDefaults.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicDefaults.BudgetType), @@ -51,7 +50,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { { Config: testAccAWSBudgetsBudgetConfig_Basic(configBasicUpdate, costFilterKey), Check: resource.ComposeTestCheckFunc( - testAccAWSBudgetsBudgetExists(configBasicUpdate, testAccProvider), + testAccAWSBudgetsBudgetExists("aws_budgets_budget.foo", configBasicUpdate), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name", regexp.MustCompile(*configBasicUpdate.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicUpdate.BudgetType), @@ -80,7 +79,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { { Config: testAccAWSBudgetsBudgetConfig_PrefixDefaults(configBasicDefaults, costFilterKey), Check: resource.ComposeTestCheckFunc( - testAccAWSBudgetsBudgetExists(configBasicDefaults, testAccProvider), + testAccAWSBudgetsBudgetExists("aws_budgets_budget.foo", configBasicDefaults), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(*configBasicDefaults.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicDefaults.BudgetType), @@ -95,7 +94,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { { Config: testAccAWSBudgetsBudgetConfig_Prefix(configBasicUpdate, costFilterKey), Check: resource.ComposeTestCheckFunc( - testAccAWSBudgetsBudgetExists(configBasicUpdate, testAccProvider), + testAccAWSBudgetsBudgetExists("aws_budgets_budget.foo", configBasicUpdate), resource.TestCheckNoResourceAttr("aws_budgets_budget.foo", "account_id"), resource.TestMatchResourceAttr("aws_budgets_budget.foo", "name_prefix", regexp.MustCompile(*configBasicUpdate.BudgetName)), resource.TestCheckResourceAttr("aws_budgets_budget.foo", "budget_type", *configBasicUpdate.BudgetType), @@ -110,11 +109,11 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { }) } -func testAccAWSBudgetsBudgetExists(config budgets.Budget, provider *schema.Provider) resource.TestCheckFunc { +func testAccAWSBudgetsBudgetExists(resourceName string, config budgets.Budget) resource.TestCheckFunc { return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources["aws_budgets_budget.foo"] + rs, ok := s.RootModule().Resources[resourceName] if !ok { - return fmt.Errorf("Not found: %s", "aws_budgets_budget.foo") + return fmt.Errorf("Not found: %s", resourceName) } accountID, budgetName, err := decodeBudgetsBudgetID(rs.Primary.ID) @@ -122,7 +121,7 @@ func testAccAWSBudgetsBudgetExists(config budgets.Budget, provider *schema.Provi return fmt.Errorf("failed decoding ID: %v", err) } - client := provider.Meta().(*AWSClient).budgetconn + client := testAccProvider.Meta().(*AWSClient).budgetconn b, err := client.DescribeBudget(&budgets.DescribeBudgetInput{ BudgetName: &budgetName, AccountId: &accountID, From d40aeef7e91a580bb9503a056dae7561d9450167 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 09:41:15 -0400 Subject: [PATCH 0681/3316] Update CHANGELOG for #2619 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd4d483731e..50b14545a15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] ## 1.15.0 (April 18, 2018) From 3300d090fb7125a355c7af711ad5e34c5c7f0ab4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 09:50:48 -0400 Subject: [PATCH 0682/3316] Update CHANGELOG for #4256 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50b14545a15..989d4fcc170 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* data-source/aws_cognito_user_pools: Add `arns` attribute [GH-4256] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] From f28dbe00ab862a3e988759b7df30493702fb0a23 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 10:12:11 -0400 Subject: [PATCH 0683/3316] Update CHANGELOG for #4277 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 989d4fcc170..7c3b31ecb26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ ENHANCEMENTS: * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] +BUG FIXES: + +* data-source/aws_iam_policy_document: Prevent crash with multiple value principal identifiers [GH-4277] + ## 1.15.0 (April 18, 2018) NOTES: From 188b122221a7352165884efc940225796bf1f0fb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 10:44:12 -0400 Subject: [PATCH 0684/3316] resource/aws_s3_bucket: Prevent panic on lifecycle rule reading errors --- aws/resource_aws_s3_bucket.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index c8d641c9c48..4e5646bdf99 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -891,14 +891,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - lifecycle := lifecycleResponse.(*s3.GetBucketLifecycleConfigurationOutput) if err != nil { if awsError, ok := err.(awserr.RequestFailure); ok && awsError.StatusCode() != 404 { return err } } - log.Printf("[DEBUG] S3 Bucket: %s, lifecycle: %v", d.Id(), lifecycle) - if len(lifecycle.Rules) > 0 { + if lifecycle, ok := lifecycleResponse.(*s3.GetBucketLifecycleConfigurationOutput); ok && len(lifecycle.Rules) > 0 { + log.Printf("[DEBUG] S3 Bucket: %s, lifecycle: %v", d.Id(), lifecycle) rules := make([]map[string]interface{}, 0, len(lifecycle.Rules)) for _, lifecycleRule := range lifecycle.Rules { From c3e16f781de4e4c1b3d172dd3e6521aed808bd3a Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Fri, 20 Apr 2018 17:08:05 +0100 Subject: [PATCH 0685/3316] (Fix) Mark auth.resource as `Sensitive` * https://github.com/terraform-providers/terraform-provider-aws/issues/4261 --- aws/resource_aws_codebuild_project.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 7ded9878364..d2c485a677d 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -178,8 +178,9 @@ func resourceAwsCodeBuildProject() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "resource": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Sensitive: true, + Optional: true, }, "type": { Type: schema.TypeString, From 4d2fe634649486fb012def872d3f5d707c173d43 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Fri, 20 Apr 2018 17:22:34 +0100 Subject: [PATCH 0686/3316] Better api call response checking, based test on sqs_queue test --- ...ta_source_aws_batch_compute_environment.go | 27 +++--- ...urce_aws_batch_compute_environment_test.go | 84 ++++++++++++++++--- 2 files changed, 84 insertions(+), 27 deletions(-) diff --git a/aws/data_source_aws_batch_compute_environment.go b/aws/data_source_aws_batch_compute_environment.go index f1cd37825d4..06c6ce4e052 100644 --- a/aws/data_source_aws_batch_compute_environment.go +++ b/aws/data_source_aws_batch_compute_environment.go @@ -71,23 +71,22 @@ func dataSourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta inter return err } - for _, computeEnvironment := range desc.ComputeEnvironments { - if aws.StringValue(computeEnvironment.ComputeEnvironmentName) != d.Get("compute_environment_name").(string) { - continue - } - d.SetId(aws.StringValue(computeEnvironment.ComputeEnvironmentArn)) - d.Set("arn", computeEnvironment.ComputeEnvironmentArn) - d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) - d.Set("service_role", computeEnvironment.ServiceRole) - d.Set("type", computeEnvironment.Type) - d.Set("status", computeEnvironment.Status) - d.Set("status_reason", computeEnvironment.StatusReason) - d.Set("state", computeEnvironment.State) + if len(desc.ComputeEnvironments) == 0 { + return fmt.Errorf("no matches found for name: %s", d.Get("compute_environment_name").(string)) } - if d.Id() == "" { - return fmt.Errorf("compute environment with name %q not found", d.Get("compute_environment_name").(string)) + if len(desc.ComputeEnvironments) > 1 { + return fmt.Errorf("multiple matches found for name: %s", d.Get("compute_environment_name").(string)) } + computeEnvironment := desc.ComputeEnvironments[0] + d.SetId(aws.StringValue(computeEnvironment.ComputeEnvironmentArn)) + d.Set("arn", computeEnvironment.ComputeEnvironmentArn) + d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) + d.Set("service_role", computeEnvironment.ServiceRole) + d.Set("type", computeEnvironment.Type) + d.Set("status", computeEnvironment.Status) + d.Set("status_reason", computeEnvironment.StatusReason) + d.Set("state", computeEnvironment.State) return nil } diff --git a/aws/data_source_aws_batch_compute_environment_test.go b/aws/data_source_aws_batch_compute_environment_test.go index db505092e10..b46bfb2b1f1 100644 --- a/aws/data_source_aws_batch_compute_environment_test.go +++ b/aws/data_source_aws_batch_compute_environment_test.go @@ -6,27 +6,62 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSBatchDataSource_ecsCluster(t *testing.T) { +func TestAccDataSourceAwsBatchComputeEnvironment(t *testing.T) { + rName := acctest.RandomWithPrefix("tf_acc_test_") + resourceName := "aws_batch_compute_environment.test" + datasourceName := "data.aws_batch_compute_environment.by_name" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ - { - Config: testAccCheckAwsBatchComputeEnvironmentDataSourceConfig, + resource.TestStep{ + Config: testAccDataSourceAwsBatchComputeEnvironmentConfig(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "type", "MANAGED"), - resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "status", "VALID"), - resource.TestCheckResourceAttr("data.aws_batch_compute_environment.default", "state", "ENABLED"), - resource.TestCheckResourceAttrSet("data.aws_batch_compute_environment.default", "arn"), + testAccDataSourceAwsBatchComputeEnvironmentCheck(datasourceName, resourceName), ), }, }, }) } -var testAccCheckAwsBatchComputeEnvironmentDataSourceConfig = fmt.Sprintf(` +func testAccDataSourceAwsBatchComputeEnvironmentCheck(datasourceName, resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + ds, ok := s.RootModule().Resources[datasourceName] + if !ok { + return fmt.Errorf("root module has no data source called %s", datasourceName) + } + + batchCeRs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", resourceName) + } + + attrNames := []string{ + "arn", + "compute_environment_name", + } + + for _, attrName := range attrNames { + if ds.Primary.Attributes[attrName] != batchCeRs.Primary.Attributes[attrName] { + return fmt.Errorf( + "%s is %s; want %s", + attrName, + ds.Primary.Attributes[attrName], + batchCeRs.Primary.Attributes[attrName], + ) + } + } + + return nil + } +} + +func testAccDataSourceAwsBatchComputeEnvironmentConfig(rName string) string { + return fmt.Sprintf(` resource "aws_iam_role" "ecs_instance_role" { name = "ecs_instance_role" assume_role_policy = < Date: Fri, 20 Apr 2018 17:33:23 +0100 Subject: [PATCH 0687/3316] ECS cluster data source: Return error on multiple clusters with same name --- aws/data_source_aws_ecs_cluster.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/aws/data_source_aws_ecs_cluster.go b/aws/data_source_aws_ecs_cluster.go index b6dbc63f4c9..308bdb9a95a 100644 --- a/aws/data_source_aws_ecs_cluster.go +++ b/aws/data_source_aws_ecs_cluster.go @@ -61,21 +61,21 @@ func dataSourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error return err } - for _, cluster := range desc.Clusters { - if aws.StringValue(cluster.ClusterName) != d.Get("cluster_name").(string) { - continue - } - d.SetId(aws.StringValue(cluster.ClusterArn)) - d.Set("arn", cluster.ClusterArn) - d.Set("status", cluster.Status) - d.Set("pending_tasks_count", cluster.PendingTasksCount) - d.Set("running_tasks_count", cluster.RunningTasksCount) - d.Set("registered_container_instances_count", cluster.RegisteredContainerInstancesCount) + if len(desc.Clusters) == 0 { + return fmt.Errorf("no matches found for name: %s", d.Get("cluster_name").(string)) } - if d.Id() == "" { - return fmt.Errorf("cluster with name %q not found", d.Get("cluster_name").(string)) + if len(desc.Clusters) > 1 { + return fmt.Errorf("multiple matches found for name: %s", d.Get("cluster_name").(string)) } + cluster := desc.Clusters[0] + d.SetId(aws.StringValue(cluster.ClusterArn)) + d.Set("arn", cluster.ClusterArn) + d.Set("status", cluster.Status) + d.Set("pending_tasks_count", cluster.PendingTasksCount) + d.Set("running_tasks_count", cluster.RunningTasksCount) + d.Set("registered_container_instances_count", cluster.RegisteredContainerInstancesCount) + return nil } From 0698382cf5eb0836cd7f8520cfddd520351b87c1 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Fri, 20 Apr 2018 18:00:38 +0100 Subject: [PATCH 0688/3316] Fix test --- aws/data_source_aws_batch_compute_environment_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/data_source_aws_batch_compute_environment_test.go b/aws/data_source_aws_batch_compute_environment_test.go index b46bfb2b1f1..0c85c88d255 100644 --- a/aws/data_source_aws_batch_compute_environment_test.go +++ b/aws/data_source_aws_batch_compute_environment_test.go @@ -171,7 +171,7 @@ resource "aws_batch_compute_environment" "wrong" { } data "aws_batch_compute_environment" "by_name" { - compute_environment_name = "${aws_batch_compute_environment.test.name}" + compute_environment_name = "${aws_batch_compute_environment.test.compute_environment_name}" } `, rName) } From 8ba58070bca3e9fac908af5f5f64085284ec054e Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 20 Apr 2018 21:04:14 +0400 Subject: [PATCH 0689/3316] added computed to true in schema --- aws/resource_aws_spot_instance_request.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index 99ef56cc4fe..3e11e05e091 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -89,12 +89,14 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { Optional: true, ForceNew: true, ValidateFunc: validateRFC3339TimeString, + Computed: true, } s["valid_until"] = &schema.Schema{ Type: schema.TypeString, Optional: true, ForceNew: true, ValidateFunc: validateRFC3339TimeString, + Computed: true, } return s }(), From c247f5d8d93a674537ae6189ce2919d14ed5d598 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 13:13:35 -0400 Subject: [PATCH 0690/3316] resource/aws_api_gateway_rest_api: Properly unescape policy from API --- aws/resource_aws_api_gateway_rest_api.go | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index b53ecb0c18b..5781bbc4a8e 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "net/url" "strconv" "time" @@ -164,17 +163,14 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) d.Set("name", api.Name) d.Set("description", api.Description) - if api.Policy != nil { - policy, err := url.QueryUnescape(*api.Policy) - log.Printf("[DEBUG] Decoded Policy: %s", policy) - if err != nil { - return err - } - if err := d.Set("policy", policy); err != nil { - return err - } + // The API returns policy as an escaped JSON string + // {\\\"Version\\\":\\\"2012-10-17\\\",...} + policy, err := strconv.Unquote(`"` + aws.StringValue(api.Policy) + `"`) + if err != nil { + return fmt.Errorf("error unescaping policy: %s", err) } - log.Printf("[DEBUG] Api Policy %s", d.Get("policy")) + d.Set("policy", policy) + d.Set("binary_media_types", api.BinaryMediaTypes) if api.MinimumCompressionSize == nil { d.Set("minimum_compression_size", -1) From 80b41d3e92d9aea7d0526d7f083a9a3f9b5b9d07 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 13:18:41 -0400 Subject: [PATCH 0691/3316] Update CHANGELOG for #4211 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c3b31ecb26..1ab5caf3b2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * data-source/aws_cognito_user_pools: Add `arns` attribute [GH-4256] +* resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] From f3d1802e02d05c2dd166292a271c764db95d319c Mon Sep 17 00:00:00 2001 From: "Taylor H. Perkins" Date: Sat, 14 Apr 2018 00:13:19 -0700 Subject: [PATCH 0692/3316] resource/aws_s3_bucket: Add support for One Zone IA storage class. --- aws/resource_aws_s3_bucket.go | 1 + aws/resource_aws_s3_bucket_test.go | 18 +++++++++++++++--- aws/validators.go | 1 + website/docs/r/s3_bucket.html.markdown | 9 +++++++-- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index c8d641c9c48..c7cd27397b0 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -381,6 +381,7 @@ func resourceAwsS3Bucket() *schema.Resource { Optional: true, ValidateFunc: validation.StringInSlice([]string{ s3.StorageClassStandard, + s3.StorageClassOnezoneIa, s3.StorageClassStandardIa, s3.StorageClassReducedRedundancy, }, false), diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index e9fcf45fb95..4b72922e75b 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -636,11 +636,17 @@ func TestAccAWSS3Bucket_Lifecycle(t *testing.T) { resource.TestCheckResourceAttr( "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.2000431762.storage_class", "STANDARD_IA"), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.6450812.date", ""), + "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.3008443917.date", ""), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.6450812.days", "60"), + "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.3008443917.days", "60"), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.6450812.storage_class", "GLACIER"), + "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.3008443917.storage_class", "ONEZONE_IA"), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.2476382906.date", ""), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.2476382906.days", "90"), + resource.TestCheckResourceAttr( + "aws_s3_bucket.bucket", "lifecycle_rule.0.transition.2476382906.storage_class", "GLACIER"), resource.TestCheckResourceAttr( "aws_s3_bucket.bucket", "lifecycle_rule.1.id", "id2"), resource.TestCheckResourceAttr( @@ -1707,8 +1713,14 @@ resource "aws_s3_bucket" "bucket" { days = 30 storage_class = "STANDARD_IA" } + transition { days = 60 + storage_class = "ONEZONE_IA" + } + + transition { + days = 90 storage_class = "GLACIER" } } diff --git a/aws/validators.go b/aws/validators.go index 590f2539c51..a8a762a5e68 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -543,6 +543,7 @@ func validateS3BucketLifecycleTimestamp(v interface{}, k string) (ws []string, e func validateS3BucketLifecycleStorageClass() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ + s3.TransitionStorageClassOnezoneIa, s3.TransitionStorageClassStandardIa, s3.TransitionStorageClassGlacier, }, false) diff --git a/website/docs/r/s3_bucket.html.markdown b/website/docs/r/s3_bucket.html.markdown index 3f628655e22..10d25b65102 100644 --- a/website/docs/r/s3_bucket.html.markdown +++ b/website/docs/r/s3_bucket.html.markdown @@ -118,6 +118,11 @@ resource "aws_s3_bucket" "bucket" { "autoclean" = "true" } + transition { + days = 15 + storage_class = "ONEZONE_IA" + } + transition { days = 30 storage_class = "STANDARD_IA" @@ -385,7 +390,7 @@ The `transition` object supports the following * `date` (Optional) Specifies the date after which you want the corresponding action to take effect. * `days` (Optional) Specifies the number of days after object creation when the specific rule action takes effect. -* `storage_class` (Required) Specifies the Amazon S3 storage class to which you want the object to transition. Can be `STANDARD_IA` or `GLACIER`. +* `storage_class` (Required) Specifies the Amazon S3 storage class to which you want the object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, or `GLACIER`. The `noncurrent_version_expiration` object supports the following @@ -394,7 +399,7 @@ The `noncurrent_version_expiration` object supports the following The `noncurrent_version_transition` object supports the following * `days` (Required) Specifies the number of days an object is noncurrent object versions expire. -* `storage_class` (Required) Specifies the Amazon S3 storage class to which you want the noncurrent versions object to transition. Can be `STANDARD_IA` or `GLACIER`. +* `storage_class` (Required) Specifies the Amazon S3 storage class to which you want the noncurrent versions object to transition. Can be `ONEZONE_IA`, `STANDARD_IA`, or `GLACIER`. The `replication_configuration` object supports the following: From 103d6bf4ed287882435562206344a2116c0a4774 Mon Sep 17 00:00:00 2001 From: "Taylor H. Perkins" Date: Sat, 14 Apr 2018 00:14:17 -0700 Subject: [PATCH 0693/3316] resource/aws_s3_bucket_object: Add support for One Zone IA storage class. --- aws/resource_aws_s3_bucket_object.go | 1 + website/docs/r/s3_bucket_object.html.markdown | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_s3_bucket_object.go b/aws/resource_aws_s3_bucket_object.go index f9165eafde6..63a3e7d8322 100644 --- a/aws/resource_aws_s3_bucket_object.go +++ b/aws/resource_aws_s3_bucket_object.go @@ -106,6 +106,7 @@ func resourceAwsS3BucketObject() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ s3.StorageClassStandard, s3.StorageClassReducedRedundancy, + s3.StorageClassOnezoneIa, s3.StorageClassStandardIa, }, false), }, diff --git a/website/docs/r/s3_bucket_object.html.markdown b/website/docs/r/s3_bucket_object.html.markdown index daab1d7e4db..eb5421d75bd 100644 --- a/website/docs/r/s3_bucket_object.html.markdown +++ b/website/docs/r/s3_bucket_object.html.markdown @@ -79,7 +79,7 @@ The following arguments are supported: * `content_type` - (Optional) A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input. * `website_redirect` - (Optional) Specifies a target URL for [website redirect](http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html). * `storage_class` - (Optional) Specifies the desired [Storage Class](http://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) -for the object. Can be either "`STANDARD`", "`REDUCED_REDUNDANCY`", or "`STANDARD_IA`". Defaults to "`STANDARD`". +for the object. Can be either "`STANDARD`", "`REDUCED_REDUNDANCY`", "`ONEZONE_IA`", or "`STANDARD_IA`". Defaults to "`STANDARD`". * `etag` - (Optional) Used to trigger updates. The only meaningful value is `${md5(file("path/to/file"))}`. This attribute is not compatible with `kms_key_id`. * `server_side_encryption` - (Optional) Specifies server-side encryption of the object in S3. Valid values are "`AES256`" and "`aws:kms`". From 5534d5c9749207b56505614e30ce8bdf25dc2535 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Fri, 20 Apr 2018 19:06:07 +0100 Subject: [PATCH 0694/3316] Re-set compute_environment_name --- aws/data_source_aws_batch_compute_environment.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/data_source_aws_batch_compute_environment.go b/aws/data_source_aws_batch_compute_environment.go index 06c6ce4e052..11c363150be 100644 --- a/aws/data_source_aws_batch_compute_environment.go +++ b/aws/data_source_aws_batch_compute_environment.go @@ -82,6 +82,7 @@ func dataSourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta inter computeEnvironment := desc.ComputeEnvironments[0] d.SetId(aws.StringValue(computeEnvironment.ComputeEnvironmentArn)) d.Set("arn", computeEnvironment.ComputeEnvironmentArn) + d.Set("compute_environment_name", computeEnvironment.ComputeEnvironmentName) d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn) d.Set("service_role", computeEnvironment.ServiceRole) d.Set("type", computeEnvironment.Type) From 03d17ffe2322289c5713a66c432bba3f2d5a1b56 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 14:13:28 -0400 Subject: [PATCH 0695/3316] Update CHANGELOG for #4284 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ab5caf3b2c..8d4c737d35c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_codebuild_project: Mark auth resource attribute as sensitive [GH-4284] * data-source/aws_iam_policy_document: Prevent crash with multiple value principal identifiers [GH-4277] ## 1.15.0 (April 18, 2018) From a884c840fb6f5e581dba5a612b209c0a739d74e6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 14:36:49 -0400 Subject: [PATCH 0696/3316] Update CHANGELOG for #4286 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d4c737d35c..f2c8fdb4f0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * data-source/aws_cognito_user_pools: Add `arns` attribute [GH-4256] +* data-source/aws_ecs_cluster Return error on multiple clusters [GH-4286] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] From 7cec86b9ed92e2abdf10b44cb76ddbb54d645201 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 15:28:11 -0400 Subject: [PATCH 0697/3316] Update CHANGELOG for #4287 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c8fdb4f0d..7249141db95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ENHANCEMENTS: * data-source/aws_ecs_cluster Return error on multiple clusters [GH-4286] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] +* resource/aws_s3_bucket: Add support for `ONEZONE_IA` storage class [GH-4287] +* resource/aws_s3_bucket_object: Add support for `ONEZONE_IA` storage class [GH-4287] * resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] BUG FIXES: From d569210aa1c3c19dcb3f1b181da572f7f4e17aba Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Wed, 18 Apr 2018 23:27:22 +0200 Subject: [PATCH 0698/3316] resource/launch_configuration: add acceptance test for user data --- aws/import_aws_launch_configuration_test.go | 2 +- aws/resource_aws_launch_configuration_test.go | 156 ++++++++++-------- 2 files changed, 92 insertions(+), 66 deletions(-) diff --git a/aws/import_aws_launch_configuration_test.go b/aws/import_aws_launch_configuration_test.go index 3432c19293c..4b66459d3ed 100644 --- a/aws/import_aws_launch_configuration_test.go +++ b/aws/import_aws_launch_configuration_test.go @@ -15,7 +15,7 @@ func TestAccAWSLaunchConfiguration_importBasic(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSLaunchConfigurationNoNameConfig, + Config: testAccAWSLaunchConfigurationNoNameConfig(), }, resource.TestStep{ diff --git a/aws/resource_aws_launch_configuration_test.go b/aws/resource_aws_launch_configuration_test.go index 9bdc253a2a3..fce4096db0f 100644 --- a/aws/resource_aws_launch_configuration_test.go +++ b/aws/resource_aws_launch_configuration_test.go @@ -87,14 +87,14 @@ func TestAccAWSLaunchConfiguration_basic(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchConfigurationNoNameConfig, + Config: testAccAWSLaunchConfigurationNoNameConfig(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), testAccCheckAWSLaunchConfigurationGeneratedNamePrefix("aws_launch_configuration.bar", "terraform-"), ), }, { - Config: testAccAWSLaunchConfigurationPrefixNameConfig, + Config: testAccAWSLaunchConfigurationPrefixNameConfig(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), testAccCheckAWSLaunchConfigurationGeneratedNamePrefix("aws_launch_configuration.baz", "tf-acc-test-"), @@ -113,7 +113,7 @@ func TestAccAWSLaunchConfiguration_withBlockDevices(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchConfigurationConfig, + Config: testAccAWSLaunchConfigurationConfig(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), testAccCheckAWSLaunchConfigurationAttributes(&conf), @@ -163,7 +163,7 @@ func TestAccAWSLaunchConfiguration_withSpotPrice(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchConfigurationWithSpotPriceConfig, + Config: testAccAWSLaunchConfigurationWithSpotPriceConfig(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), resource.TestCheckResourceAttr("aws_launch_configuration.bar", "spot_price", "0.01"), @@ -255,7 +255,7 @@ func TestAccAWSLaunchConfiguration_withEncryption(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchConfigurationWithEncryption, + Config: testAccAWSLaunchConfigurationWithEncryption(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), testAccCheckAWSLaunchConfigurationWithEncryption(&conf), @@ -274,14 +274,14 @@ func TestAccAWSLaunchConfiguration_updateEbsBlockDevices(t *testing.T) { CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLaunchConfigurationWithEncryption, + Config: testAccAWSLaunchConfigurationWithEncryption(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), resource.TestCheckResourceAttr("aws_launch_configuration.baz", "ebs_block_device.1393547169.volume_size", "9"), ), }, { - Config: testAccAWSLaunchConfigurationWithEncryptionUpdated, + Config: testAccAWSLaunchConfigurationWithEncryptionUpdated(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.baz", &conf), resource.TestCheckResourceAttr("aws_launch_configuration.baz", "ebs_block_device.4131155854.volume_size", "10"), @@ -312,6 +312,31 @@ func TestAccAWSLaunchConfiguration_ebs_noDevice(t *testing.T) { }, }) } +func TestAccAWSLaunchConfiguration_userData(t *testing.T) { + var conf autoscaling.LaunchConfiguration + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchConfigurationConfig_userData(), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "user_data", "3dc39dda39be1205215e776bad998da361a5955d"), + ), + }, + { + Config: testAccAWSLaunchConfigurationConfig_userDataBase64(), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchConfigurationExists("aws_launch_configuration.bar", &conf), + resource.TestCheckResourceAttr("aws_launch_configuration.bar", "user_data_base64", "aGVsbG8gd29ybGQ="), + ), + }, + }, + }) +} func testAccCheckAWSLaunchConfigurationGeneratedNamePrefix( resource, prefix string) resource.TestCheckFunc { @@ -435,17 +460,23 @@ func testAccCheckAWSLaunchConfigurationExists(n string, res *autoscaling.LaunchC func testAccAWSLaunchConfigurationConfig_ami() string { return fmt.Sprintf(` -data "aws_ami" "amazon_ami" { +data "aws_ami" "ubuntu" { most_recent = true - owners = ["amazon"] + owners = ["099720109477"] # Canonical + + filter { + name = "name" + values = ["ubuntu/images/ebs/ubuntu-precise-12.04-i386-server-2017*"] + } } `) } + func testAccAWSLaunchConfigurationConfigWithRootBlockDevice(rInt int) string { return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name_prefix = "tf-acc-test-%d" - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "m1.small" user_data = "foobar-user-data" associate_public_ip_address = true @@ -462,7 +493,7 @@ func testAccAWSLaunchConfigurationConfigWithRootBlockDeviceUpdated(rInt int) str return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name_prefix = "tf-acc-test-%d" - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "m1.small" user_data = "foobar-user-data" associate_public_ip_address = true @@ -475,10 +506,11 @@ resource "aws_launch_configuration" "bar" { `, rInt) } -var testAccAWSLaunchConfigurationConfig = fmt.Sprintf(` +func testAccAWSLaunchConfigurationConfig() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name = "tf-acc-test-%d" - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "m1.small" user_data = "foobar-user-data" associate_public_ip_address = true @@ -502,59 +534,47 @@ resource "aws_launch_configuration" "bar" { virtual_name = "ephemeral0" } } - -data "aws_ami" "amazon_ami" { - most_recent = true - owners = ["amazon"] -} `, rand.New(rand.NewSource(time.Now().UnixNano())).Int()) +} -var testAccAWSLaunchConfigurationWithSpotPriceConfig = fmt.Sprintf(` +func testAccAWSLaunchConfigurationWithSpotPriceConfig() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name = "tf-acc-test-%d" - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" spot_price = "0.01" } - -data "aws_ami" "amazon_ami" { - most_recent = true - owners = ["amazon"] -} `, rand.New(rand.NewSource(time.Now().UnixNano())).Int()) +} -const testAccAWSLaunchConfigurationNoNameConfig = ` +func testAccAWSLaunchConfigurationNoNameConfig() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" user_data = "foobar-user-data-change" associate_public_ip_address = false } - -data "aws_ami" "amazon_ami" { - most_recent = true - owners = ["amazon"] +`) } -` -const testAccAWSLaunchConfigurationPrefixNameConfig = ` +func testAccAWSLaunchConfigurationPrefixNameConfig() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "baz" { name_prefix = "tf-acc-test-" - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" user_data = "foobar-user-data-change" associate_public_ip_address = false } - -data "aws_ami" "amazon_ami" { - most_recent = true - owners = ["amazon"] +`) } -` -const testAccAWSLaunchConfigurationWithEncryption = ` +func testAccAWSLaunchConfigurationWithEncryption() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "baz" { - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" associate_public_ip_address = false @@ -568,16 +588,13 @@ resource "aws_launch_configuration" "baz" { encrypted = true } } - -data "aws_ami" "amazon_ami" { - most_recent = true - owners = ["amazon"] +`) } -` -const testAccAWSLaunchConfigurationWithEncryptionUpdated = ` +func testAccAWSLaunchConfigurationWithEncryptionUpdated() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "baz" { - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" associate_public_ip_address = false @@ -591,12 +608,8 @@ resource "aws_launch_configuration" "baz" { encrypted = true } } - -data "aws_ami" "amazon_ami" { - most_recent = true - owners = ["amazon"] +`) } -` func testAccAWSLaunchConfigurationConfig_withVpcClassicLink(rInt int) string { return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` @@ -615,7 +628,7 @@ resource "aws_security_group" "foo" { resource "aws_launch_configuration" "foo" { name = "tf-acc-test-%[1]d" - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" vpc_classic_link_id = "${aws_vpc.foo.id}" @@ -651,7 +664,7 @@ resource "aws_iam_instance_profile" "profile" { } resource "aws_launch_configuration" "bar" { - image_id = "${data.aws_ami.amazon_ami.id}" + image_id = "${data.aws_ami.ubuntu.id}" instance_type = "t2.nano" iam_instance_profile = "${aws_iam_instance_profile.profile.name}" } @@ -659,16 +672,7 @@ resource "aws_launch_configuration" "bar" { } func testAccAWSLaunchConfigurationConfigEbsNoDevice(rInt int) string { - return fmt.Sprintf(` -data "aws_ami" "ubuntu" { - most_recent = true - filter { - name = "name" - values = ["ubuntu/images/ebs/ubuntu-precise-12.04-i386-server-*"] - } - owners = ["099720109477"] # Canonical -} - + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` resource "aws_launch_configuration" "bar" { name_prefix = "tf-acc-test-%d" image_id = "${data.aws_ami.ubuntu.id}" @@ -680,3 +684,25 @@ resource "aws_launch_configuration" "bar" { } `, rInt) } + +func testAccAWSLaunchConfigurationConfig_userData() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` +resource "aws_launch_configuration" "bar" { + image_id = "${data.aws_ami.ubuntu.id}" + instance_type = "t2.micro" + user_data = "foo:-with-character's" + associate_public_ip_address = false +} +`) +} + +func testAccAWSLaunchConfigurationConfig_userDataBase64() string { + return testAccAWSLaunchConfigurationConfig_ami() + fmt.Sprintf(` +resource "aws_launch_configuration" "bar" { + image_id = "${data.aws_ami.ubuntu.id}" + instance_type = "t2.micro" + user_data_base64 = "${base64encode("hello world")}" + associate_public_ip_address = false +} +`) +} From d8cc78054425de2d124f7b6247e786f961869d69 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 15:32:46 -0400 Subject: [PATCH 0699/3316] resource/aws_spot_instance_request: Fix go fmt issue from merge conflict --- aws/resource_aws_spot_instance_request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index 9374ab3e3b0..a3d566d6872 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -165,7 +165,7 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface return err } spotOpts.ValidUntil = aws.Time(valid_until) - } + } // Placement GroupName can only be specified when instanceInterruptionBehavior is not set or set to 'terminate' if v, exists := d.GetOkExists("instance_interruption_behaviour"); v.(string) == ec2.InstanceInterruptionBehaviorTerminate || !exists { From 6a378a9437ac86a4e9e4257e6004aafa57f1a7b1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 15:35:00 -0400 Subject: [PATCH 0700/3316] Update CHANGELOG for #4018 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7249141db95..3ff9e2ae855 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ENHANCEMENTS: * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_s3_bucket: Add support for `ONEZONE_IA` storage class [GH-4287] * resource/aws_s3_bucket_object: Add support for `ONEZONE_IA` storage class [GH-4287] +* resource/aws_spot_instance_request: Add `valid_from` and `valid_until` arguments [GH-4018] * resource/aws_ssm_patch_baseline: Support `CENTOS` `operating_system` argument [GH-4268] BUG FIXES: From 7c50e038a71bb1f41ec3031d3813f4ed958ca415 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Fri, 20 Apr 2018 21:01:49 +0100 Subject: [PATCH 0701/3316] Ranomize resource names in test --- aws/data_source_aws_batch_compute_environment_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/data_source_aws_batch_compute_environment_test.go b/aws/data_source_aws_batch_compute_environment_test.go index 0c85c88d255..7bb793bf97e 100644 --- a/aws/data_source_aws_batch_compute_environment_test.go +++ b/aws/data_source_aws_batch_compute_environment_test.go @@ -63,7 +63,7 @@ func testAccDataSourceAwsBatchComputeEnvironmentCheck(datasourceName, resourceNa func testAccDataSourceAwsBatchComputeEnvironmentConfig(rName string) string { return fmt.Sprintf(` resource "aws_iam_role" "ecs_instance_role" { - name = "ecs_instance_role" + name = "ecs_%[1]s" assume_role_policy = < Date: Fri, 20 Apr 2018 17:46:29 +0100 Subject: [PATCH 0702/3316] Add new data source aws_batch_job_queue --- aws/data_source_aws_batch_job_queue.go | 108 +++++++++++++++++++ aws/data_source_aws_batch_job_queue_test.go | 85 +++++++++++++++ aws/provider.go | 1 + website/aws.erb | 3 + website/docs/d/batch_job_queue.html.markdown | 38 +++++++ website/docs/r/batch_job_queue.html.markdown | 2 +- 6 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 aws/data_source_aws_batch_job_queue.go create mode 100644 aws/data_source_aws_batch_job_queue_test.go create mode 100644 website/docs/d/batch_job_queue.html.markdown diff --git a/aws/data_source_aws_batch_job_queue.go b/aws/data_source_aws_batch_job_queue.go new file mode 100644 index 00000000000..dd7b0d541f9 --- /dev/null +++ b/aws/data_source_aws_batch_job_queue.go @@ -0,0 +1,108 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/batch" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsBatchJobQueue() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsBatchJobQueueRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "status": { + Type: schema.TypeString, + Computed: true, + }, + + "status_reason": { + Type: schema.TypeString, + Computed: true, + }, + + "state": { + Type: schema.TypeString, + Computed: true, + }, + + "priority": { + Type: schema.TypeInt, + Computed: true, + }, + + "compute_environment_order": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "compute_environment": { + Type: schema.TypeString, + Computed: true, + }, + "order": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).batchconn + + params := &batch.DescribeJobQueuesInput{ + JobQueues: []*string{aws.String(d.Get("name").(string))}, + } + log.Printf("[DEBUG] Reading Batch Job Queue: %s", params) + desc, err := conn.DescribeJobQueues(params) + + if err != nil { + return err + } + + if len(desc.JobQueues) == 0 { + return fmt.Errorf("no matches found for name: %s", d.Get("name").(string)) + } + + if len(desc.JobQueues) > 1 { + return fmt.Errorf("multiple matches found for name: %s", d.Get("name").(string)) + } + + jobQueue := desc.JobQueues[0] + d.SetId(aws.StringValue(jobQueue.JobQueueArn)) + d.Set("arn", jobQueue.JobQueueArn) + d.Set("name", jobQueue.JobQueueName) + d.Set("status", jobQueue.Status) + d.Set("status_reason", jobQueue.StatusReason) + d.Set("state", jobQueue.State) + d.Set("priority", jobQueue.Priority) + + ceos := make([]map[string]interface{}, 0) + for _, v := range jobQueue.ComputeEnvironmentOrder { + ceo := map[string]interface{}{} + ceo["compute_environment"] = *v.ComputeEnvironment + ceo["order"] = *v.Order + ceos = append(ceos, ceo) + } + d.Set("compute_environment_order", ceos) + + return nil +} diff --git a/aws/data_source_aws_batch_job_queue_test.go b/aws/data_source_aws_batch_job_queue_test.go new file mode 100644 index 00000000000..c226df15804 --- /dev/null +++ b/aws/data_source_aws_batch_job_queue_test.go @@ -0,0 +1,85 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccDataSourceAwsBatchJobQueue(t *testing.T) { + rName := acctest.RandomWithPrefix("tf_acc_test_") + resourceName := "aws_batch_job_queue.test" + datasourceName := "data.aws_batch_job_queue.by_name" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDataSourceAwsBatchJobQueueConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsBatchJobQueueCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + +func testAccDataSourceAwsBatchJobQueueCheck(datasourceName, resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + ds, ok := s.RootModule().Resources[datasourceName] + if !ok { + return fmt.Errorf("root module has no data source called %s", datasourceName) + } + + jobQueueRs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", resourceName) + } + + attrNames := []string{ + "arn", + "name", + "state", + "priority", + } + + for _, attrName := range attrNames { + if ds.Primary.Attributes[attrName] != jobQueueRs.Primary.Attributes[attrName] { + return fmt.Errorf( + "%s is %s; want %s", + attrName, + ds.Primary.Attributes[attrName], + jobQueueRs.Primary.Attributes[attrName], + ) + } + } + + return nil + } +} + +func testAccDataSourceAwsBatchJobQueueConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_batch_job_queue" "test" { + name = "%[1]s" + state = "ENABLED" + priority = 1 + compute_environments = [] +} + +resource "aws_batch_job_queue" "wrong" { + name = "%[1]s_wrong" + state = "ENABLED" + priority = 2 + compute_environments = [] +} + +data "aws_batch_job_queue" "by_name" { + name = "${aws_batch_job_queue.test.name}" +} +`, rName) +} diff --git a/aws/provider.go b/aws/provider.go index 851e1d7a3ae..0268d3d89e9 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -167,6 +167,7 @@ func Provider() terraform.ResourceProvider { "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), "aws_availability_zone": dataSourceAwsAvailabilityZone(), "aws_availability_zones": dataSourceAwsAvailabilityZones(), + "aws_batch_job_queue": dataSourceAwsBatchJobQueue(), "aws_billing_service_account": dataSourceAwsBillingServiceAccount(), "aws_caller_identity": dataSourceAwsCallerIdentity(), "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), diff --git a/website/aws.erb b/website/aws.erb index 8f1f078d61c..7fd1eca3f3b 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -55,6 +55,9 @@ > aws_availability_zones + > + aws_batch_job_queue + > aws_billing_service_account diff --git a/website/docs/d/batch_job_queue.html.markdown b/website/docs/d/batch_job_queue.html.markdown new file mode 100644 index 00000000000..2cf467f8459 --- /dev/null +++ b/website/docs/d/batch_job_queue.html.markdown @@ -0,0 +1,38 @@ +--- +layout: "aws" +page_title: "AWS: aws_batch_job_queue +sidebar_current: "docs-aws-datasource-batch-job-queue +description: |- + Provides details about a batch job queue +--- + +# Data Source: aws_batch_job_queue + +The Batch Job Queue data source allows access to details of a specific +job queue within AWS Batch. + +## Example Usage + +```hcl +data "aws_batch_job_queue" "test-queue" { + name = "tf-test-batch-job-queue" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the job queue. + +## Attributes Reference + +The following attributes are exported: + +* `arn` - The ARN of the job queue. +* `status` - The current status of the job queue (for example, `CREATING` or `VALID`). +* `status_reason` - A short, human-readable string to provide additional details about the current status + of the job queue. +* `state` - Describes the ability of the queue to accept new jobs (for example, `ENABLED` or `DISABLED`). +* `priority` - The priority of the job queue. Job queues with a higher priority are evaluated first when + associated with the same compute environment. diff --git a/website/docs/r/batch_job_queue.html.markdown b/website/docs/r/batch_job_queue.html.markdown index 7116511b6c5..634a156cfbd 100644 --- a/website/docs/r/batch_job_queue.html.markdown +++ b/website/docs/r/batch_job_queue.html.markdown @@ -31,7 +31,7 @@ The following arguments are supported: in the list will dictate the order. You can associate up to 3 compute environments with a job queue. * `priority` - (Required) The priority of the job queue. Job queues with a higher priority - are evaluated first when associated with same compute environment. + are evaluated first when associated with the same compute environment. * `state` - (Required) The state of the job queue. Must be one of: `ENABLED` or `DISABLED` ## Attribute Reference From 4e06a36422cac377c9c4f5fbd573954b857ef38f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 17:13:09 -0400 Subject: [PATCH 0703/3316] Update CHANGELOG for #4257 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ff9e2ae855..d11593f7158 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ENHANCEMENTS: * data-source/aws_ecs_cluster Return error on multiple clusters [GH-4286] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] +* resource/aws_launch_configuration: Add `user_data_base64` argument [GH-4257] * resource/aws_s3_bucket: Add support for `ONEZONE_IA` storage class [GH-4287] * resource/aws_s3_bucket_object: Add support for `ONEZONE_IA` storage class [GH-4287] * resource/aws_spot_instance_request: Add `valid_from` and `valid_until` arguments [GH-4018] From 6b3831075f5b90358a1b1ef4af2b808855ab2ef7 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Fri, 20 Apr 2018 22:23:42 +0100 Subject: [PATCH 0704/3316] Complete documentation --- website/docs/d/batch_job_queue.html.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/d/batch_job_queue.html.markdown b/website/docs/d/batch_job_queue.html.markdown index 2cf467f8459..32eb523af86 100644 --- a/website/docs/d/batch_job_queue.html.markdown +++ b/website/docs/d/batch_job_queue.html.markdown @@ -36,3 +36,7 @@ The following attributes are exported: * `state` - Describes the ability of the queue to accept new jobs (for example, `ENABLED` or `DISABLED`). * `priority` - The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment. +* `compute_environment_order` - The compute environments that are attached to the job queue and the order in + which job placement is preferred. Compute environments are selected for job placement in ascending order. + * `compute_environment_order.#.order` - The order of the compute environment. + * `compute_environment_order.#.compute_environment` - The ARN of the compute environment. From 887bf74437bbccb467aeef7f49e702da710986f5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 19:43:58 -0400 Subject: [PATCH 0705/3316] Update CHANGELOG for #4270 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d11593f7158..5e0f4817237 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.16.0 (Unreleased) +FEATURES: + +* **New Data Source:** `aws_batch_compute_environment` [GH-4270] + ENHANCEMENTS: * data-source/aws_cognito_user_pools: Add `arns` attribute [GH-4256] From d0070fcde1132a787b44bd9203fc32aa3488ead5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 23:13:14 -0400 Subject: [PATCH 0706/3316] resource/aws_api_gateway_stage: Replace removed arnString function with SDK arn package --- aws/resource_aws_api_gateway_stage.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index b57c3858e40..234c9ebd97c 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/terraform/helper/resource" @@ -190,13 +191,12 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) d.Partial(true) - stageArn := arnString( - meta.(*AWSClient).partition, - meta.(*AWSClient).region, - "apigateway", - "", - fmt.Sprintf("/restapis/%s/stages/%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string)), - ) + stageArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "apigateway", + Resource: fmt.Sprintf("/restapis/%s/stages/%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string)), + }.String() if tagErr := setTagsAPIGatewayStage(conn, d, stageArn); tagErr != nil { return tagErr } From 20aebab9f173bad891b7612b8f15a22055bc5f2c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 23:15:57 -0400 Subject: [PATCH 0707/3316] Update CHANGELOG for #2858 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e0f4817237..6d778ac8ff7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: * data-source/aws_cognito_user_pools: Add `arns` attribute [GH-4256] * data-source/aws_ecs_cluster Return error on multiple clusters [GH-4286] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] +* resource/aws_api_gateway_stage: Add `tags` argument [GH-2858] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_launch_configuration: Add `user_data_base64` argument [GH-4257] * resource/aws_s3_bucket: Add support for `ONEZONE_IA` storage class [GH-4287] From 956d865475fb882010ac9b0b580918dab983f5df Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Sat, 21 Apr 2018 06:36:54 +0100 Subject: [PATCH 0708/3316] Fix test, apply changes from code review --- aws/data_source_aws_batch_job_queue.go | 8 +- aws/data_source_aws_batch_job_queue_test.go | 90 ++++++++++++++++++++- 2 files changed, 93 insertions(+), 5 deletions(-) diff --git a/aws/data_source_aws_batch_job_queue.go b/aws/data_source_aws_batch_job_queue.go index dd7b0d541f9..8afca929bc3 100644 --- a/aws/data_source_aws_batch_job_queue.go +++ b/aws/data_source_aws_batch_job_queue.go @@ -98,11 +98,13 @@ func dataSourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) er ceos := make([]map[string]interface{}, 0) for _, v := range jobQueue.ComputeEnvironmentOrder { ceo := map[string]interface{}{} - ceo["compute_environment"] = *v.ComputeEnvironment - ceo["order"] = *v.Order + ceo["compute_environment"] = aws.StringValue(v.ComputeEnvironment) + ceo["order"] = int(aws.Int64Value(v.Order)) ceos = append(ceos, ceo) } - d.Set("compute_environment_order", ceos) + if err := d.Set("compute_environment_order", ceos); err != nil { + return fmt.Errorf("error setting compute_environment_order: %s", err) + } return nil } diff --git a/aws/data_source_aws_batch_job_queue_test.go b/aws/data_source_aws_batch_job_queue_test.go index c226df15804..64f14b13df0 100644 --- a/aws/data_source_aws_batch_job_queue_test.go +++ b/aws/data_source_aws_batch_job_queue_test.go @@ -64,18 +64,104 @@ func testAccDataSourceAwsBatchJobQueueCheck(datasourceName, resourceName string) func testAccDataSourceAwsBatchJobQueueConfig(rName string) string { return fmt.Sprintf(` +resource "aws_iam_role" "ecs_instance_role" { + name = "ecs_%[1]s" + assume_role_policy = < Date: Sat, 13 Jan 2018 01:11:14 +0100 Subject: [PATCH 0709/3316] New Data Source: aws_lambda_function --- aws/data_source_aws_lambda_function.go | 154 +++++++++ aws/data_source_aws_lambda_function_test.go | 338 +++++++++++++++++++ aws/provider.go | 1 + aws/resource_aws_lambda_function.go | 61 ++-- website/aws.erb | 3 + website/docs/d/lambda_function.html.markdown | 54 +++ 6 files changed, 590 insertions(+), 21 deletions(-) create mode 100644 aws/data_source_aws_lambda_function.go create mode 100644 aws/data_source_aws_lambda_function_test.go create mode 100644 website/docs/d/lambda_function.html.markdown diff --git a/aws/data_source_aws_lambda_function.go b/aws/data_source_aws_lambda_function.go new file mode 100644 index 00000000000..cf41f4addec --- /dev/null +++ b/aws/data_source_aws_lambda_function.go @@ -0,0 +1,154 @@ +package aws + +import ( + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsLambdaFunction() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsLambdaFunctionRead, + + Schema: map[string]*schema.Schema{ + "function_name": { + Type: schema.TypeString, + Required: true, + }, + "qualifier": { + Type: schema.TypeString, + Optional: true, + Default: "$LATEST", + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "dead_letter_config": { + Type: schema.TypeList, + Computed: true, + MinItems: 0, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "target_arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "handler": { + Type: schema.TypeString, + Computed: true, + }, + "memory_size": { + Type: schema.TypeInt, + Computed: true, + }, + "reserved_concurrent_executions": { + Type: schema.TypeInt, + Computed: true, + }, + "role": { + Type: schema.TypeString, + Computed: true, + }, + "runtime": { + Type: schema.TypeString, + Computed: true, + }, + "timeout": { + Type: schema.TypeInt, + Computed: true, + }, + "version": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_config": { + Type: schema.TypeList, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subnet_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "security_group_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "qualified_arn": { + Type: schema.TypeString, + Computed: true, + }, + "invoke_arn": { + Type: schema.TypeString, + Computed: true, + }, + "last_modified": { + Type: schema.TypeString, + Computed: true, + }, + "source_code_hash": { + Type: schema.TypeString, + Computed: true, + }, + "source_code_size": { + Type: schema.TypeInt, + Computed: true, + }, + "environment": { + Type: schema.TypeList, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "variables": { + Type: schema.TypeMap, + Computed: true, + Elem: schema.TypeString, + }, + }, + }, + }, + "tracing_config": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mode": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "kms_key_arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) error { + d.SetId(d.Get("function_name").(string)) + return resourceAwsLambdaFunctionRead(d, meta) +} diff --git a/aws/data_source_aws_lambda_function_test.go b/aws/data_source_aws_lambda_function_test.go new file mode 100644 index 00000000000..c319c8a88d4 --- /dev/null +++ b/aws/data_source_aws_lambda_function_test.go @@ -0,0 +1,338 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAWSLambdaFunction_basic(t *testing.T) { + rString := acctest.RandString(7) + roleName := fmt.Sprintf("tf-acctest-d-lambda-function-basic-role-%s", rString) + policyName := fmt.Sprintf("tf-acctest-d-lambda-function-basic-policy-%s", rString) + sgName := fmt.Sprintf("tf-acctest-d-lambda-function-basic-sg-%s", rString) + funcName := fmt.Sprintf("tf-acctest-d-lambda-function-basic-func-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSLambdaFunctionConfigBasic(roleName, policyName, sgName, funcName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "arn"), + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "role"), + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "source_code_hash"), + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "source_code_size"), + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "last_modified"), + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "qualified_arn"), + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "invoke_arn"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "function_name", funcName), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "description", funcName), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "qualifier", "$LATEST"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "handler", "exports.example"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "memory_size", "128"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "runtime", "nodejs4.3"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "timeout", "3"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "version", "$LATEST"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "reserved_concurrent_executions", "0"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "dead_letter_config.#", "0"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "tracing_config.#", "1"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "tracing_config.0.mode", "PassThrough"), + ), + }, + }, + }) +} + +func TestAccDataSourceAWSLambdaFunction_version(t *testing.T) { + rString := acctest.RandString(7) + roleName := fmt.Sprintf("tf-acctest-d-lambda-function-version-role-%s", rString) + policyName := fmt.Sprintf("tf-acctest-d-lambda-function-version-policy-%s", rString) + sgName := fmt.Sprintf("tf-acctest-d-lambda-function-version-sg-%s", rString) + funcName := fmt.Sprintf("tf-acctest-d-lambda-function-version-func-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSLambdaFunctionConfigVersion(roleName, policyName, sgName, funcName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "arn"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "function_name", funcName), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "qualifier", "1"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "version", "1"), + ), + }, + }, + }) +} + +func TestAccDataSourceAWSLambdaFunction_alias(t *testing.T) { + rString := acctest.RandString(7) + roleName := fmt.Sprintf("tf-acctest-d-lambda-function-alias-role-%s", rString) + policyName := fmt.Sprintf("tf-acctest-d-lambda-function-alias-policy-%s", rString) + sgName := fmt.Sprintf("tf-acctest-d-lambda-function-alias-sg-%s", rString) + funcName := fmt.Sprintf("tf-acctest-d-lambda-function-alias-func-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSLambdaFunctionConfigAlias(roleName, policyName, sgName, funcName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "arn"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "function_name", funcName), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "qualifier", "alias-name"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "version", "1"), + ), + }, + }, + }) +} + +func TestAccDataSourceAWSLambdaFunction_vpc(t *testing.T) { + rString := acctest.RandString(7) + roleName := fmt.Sprintf("tf-acctest-d-lambda-function-vpc-role-%s", rString) + policyName := fmt.Sprintf("tf-acctest-d-lambda-function-vpc-policy-%s", rString) + sgName := fmt.Sprintf("tf-acctest-d-lambda-function-vpc-sg-%s", rString) + funcName := fmt.Sprintf("tf-acctest-d-lambda-function-vpc-func-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSLambdaFunctionConfigVPC(roleName, policyName, sgName, funcName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "arn"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "vpc_config.#", "1"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "vpc_config.0.security_group_ids.#", "1"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "vpc_config.0.subnet_ids.#", "1"), + ), + }, + }, + }) +} + +func TestAccDataSourceAWSLambdaFunction_environment(t *testing.T) { + rString := acctest.RandString(7) + roleName := fmt.Sprintf("tf-acctest-d-lambda-function-environment-role-%s", rString) + policyName := fmt.Sprintf("tf-acctest-d-lambda-function-environment-policy-%s", rString) + sgName := fmt.Sprintf("tf-acctest-d-lambda-function-environment-sg-%s", rString) + funcName := fmt.Sprintf("tf-acctest-d-lambda-function-environment-func-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSLambdaFunctionConfigEnvironment(roleName, policyName, sgName, funcName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_lambda_function.acctest", "arn"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "environment.#", "1"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "environment.0.variables.%", "2"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "environment.0.variables.key1", "value1"), + resource.TestCheckResourceAttr("data.aws_lambda_function.acctest", "environment.0.variables.key2", "value2"), + ), + }, + }, + }) +} + +func testAccDataSourceAWSLambdaFunctionConfigBase(roleName, policyName, sgName string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "lambda" { + name = "%s" + + assume_role_policy = <> aws_network_interface + > + aws_lambda_function + > aws_lb diff --git a/website/docs/d/lambda_function.html.markdown b/website/docs/d/lambda_function.html.markdown new file mode 100644 index 00000000000..2ae3babdf65 --- /dev/null +++ b/website/docs/d/lambda_function.html.markdown @@ -0,0 +1,54 @@ +--- +layout: "aws" +page_title: "AWS: aws_lambda_function" +sidebar_current: "docs-aws-datasource-lambda-function" +description: |- + Provides a Lambda Function data source. +--- + +# aws_lambda_function + +Provides information about a Lambda Function. + +## Example Usage + +```hcl +variable "function_name" { + type = "string" +} + +data "aws_lambda_function" "existing" { + function_name = "${var.function_name}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `function_name` - (Required) Name of the lambda function. +* `qualifier` - (Optional) Qualifier of the lambda function. Defaults to `$LATEST`. + +## Attributes Reference + +The following attributes are exported: + +* `arn` - The Amazon Resource Name (ARN) identifying your Lambda Function. +* `dead_letter_config` - Configure the function's *dead letter queue*. +* `description` - Description of what your Lambda Function does. +* `environment` - The Lambda environment's configuration settings. +* `handler` - The function entrypoint in your code. +* `invoke_arn` - The ARN to be used for invoking Lambda Function from API Gateway. +* `kms_key_arn` - The ARN for the KMS encryption key. +* `last_modified` - The date this resource was last modified. +* `memory_size` - Amount of memory in MB your Lambda Function can use at runtime. +* `qualified_arn` - The Amazon Resource Name (ARN) identifying your Lambda Function Version +* `reserved_concurrent_executions` - The amount of reserved concurrent executions for this lambda function. +* `role` - IAM role attached to the Lambda Function. +* `runtime` - The runtime environment for the Lambda function.. +* `source_code_hash` - Base64-encoded representation of raw SHA-256 sum of the zip file. +* `source_code_size` - The size in bytes of the function .zip file. +* `timeout` - The function execution time at which Lambda should terminate the function. +* `tracing_config` - Tracing settings of the function. +* `version` - The version of the Lambda function. +* `vpc_config` - VPC configuration associated with your Lambda function. From 0c7db4ead7befc03b1d14b371601bd520ca8fc1d Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 21 Apr 2018 08:55:21 +0200 Subject: [PATCH 0710/3316] data-source/lambda_function: fix on review --- aws/resource_aws_lambda_function.go | 19 +++++++------------ website/aws.erb | 8 ++++---- website/docs/r/lambda_function.html.markdown | 4 ++-- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index 41585802929..4797653a89b 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -176,7 +176,6 @@ func resourceAwsLambdaFunction() *schema.Resource { }, "source_code_size": { Type: schema.TypeInt, - Optional: true, Computed: true, }, "environment": { @@ -498,20 +497,16 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err d.Set("source_code_hash", function.CodeSha256) d.Set("source_code_size", function.CodeSize) - vpcConfig := flattenLambdaVpcConfigResponse(function.VpcConfig) - if vpcConfig != nil { - log.Printf("[INFO] Setting Lambda %s VPC config %#v from API", d.Id(), vpcConfig) - if err := d.Set("vpc_config", vpcConfig); err != nil { - return fmt.Errorf("Failed setting vpc_config: %s", err) - } + config := flattenLambdaVpcConfigResponse(function.VpcConfig) + log.Printf("[INFO] Setting Lambda %s VPC config %#v from API", d.Id(), config) + if err := d.Set("vpc_config", config); err != nil { + return fmt.Errorf("[ERR] Error setting vpc_config for Lambda Function (%s): %s", d.Id(), err) } environment := flattenLambdaEnvironment(function.Environment) - if environment != nil { - log.Printf("[INFO] Setting Lambda %s environment %#v from API", d.Id(), environment) - if err := d.Set("environment", environment); err != nil { - log.Printf("[ERR] Error setting environment for Lambda Function (%s): %s", d.Id(), err) - } + log.Printf("[INFO] Setting Lambda %s environment %#v from API", d.Id(), environment) + if err := d.Set("environment", environment); err != nil { + log.Printf("[ERR] Error setting environment for Lambda Function (%s): %s", d.Id(), err) } if function.DeadLetterConfig != nil && function.DeadLetterConfig.TargetArn != nil { diff --git a/website/aws.erb b/website/aws.erb index 6244083aa3c..31c45ee601a 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -198,10 +198,10 @@ > aws_network_interface - - > - aws_lambda_function - + + > + aws_lambda_function + > aws_lb diff --git a/website/docs/r/lambda_function.html.markdown b/website/docs/r/lambda_function.html.markdown index 977d86bd5f0..177f5c30d68 100644 --- a/website/docs/r/lambda_function.html.markdown +++ b/website/docs/r/lambda_function.html.markdown @@ -121,8 +121,8 @@ For **environment** the following attributes are supported: * `version` - Latest published version of your Lambda Function. * `last_modified` - The date this resource was last modified. * `kms_key_arn` - (Optional) The ARN for the KMS encryption key. -* `source_code_hash` - Base64-encoded representation of raw SHA-256 sum of the zip file - provided either via `filename` or `s3_*` parameters. +* `source_code_hash` - Base64-encoded representation of raw SHA-256 sum of the zip file, provided either via `filename` or `s3_*` parameters. +* `source_code_size` - The size in bytes of the function .zip file. [1]: https://docs.aws.amazon.com/lambda/latest/dg/welcome.html [2]: https://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser-create-test-function-create-function.html From 9bbc68d9e59c5291391ce51f5f5de34107c82143 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 21 Apr 2018 17:45:57 +0900 Subject: [PATCH 0711/3316] Support dax parameter group --- aws/provider.go | 1 + aws/resource_aws_dax_parameter_group.go | 184 ++++++++++++++++++ aws/resource_aws_dax_parameter_group_test.go | 123 ++++++++++++ website/aws.erb | 4 + .../docs/r/dax_parameter_group.html.markdown | 58 ++++++ 5 files changed, 370 insertions(+) create mode 100644 aws/resource_aws_dax_parameter_group.go create mode 100644 aws/resource_aws_dax_parameter_group_test.go create mode 100644 website/docs/r/dax_parameter_group.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 05be28cd2db..67b3ce474fb 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -325,6 +325,7 @@ func Provider() terraform.ResourceProvider { "aws_codepipeline": resourceAwsCodePipeline(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_dax_cluster": resourceAwsDaxCluster(), + "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), "aws_db_event_subscription": resourceAwsDbEventSubscription(), "aws_db_instance": resourceAwsDbInstance(), "aws_db_option_group": resourceAwsDbOptionGroup(), diff --git a/aws/resource_aws_dax_parameter_group.go b/aws/resource_aws_dax_parameter_group.go new file mode 100644 index 00000000000..61fad09744a --- /dev/null +++ b/aws/resource_aws_dax_parameter_group.go @@ -0,0 +1,184 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDaxParameterGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDaxParameterGroupCreate, + Read: resourceAwsDaxParameterGroupRead, + Update: resourceAwsDaxParameterGroupUpdate, + Delete: resourceAwsDaxParameterGroupDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "parameters": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsDaxParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.CreateParameterGroupInput{ + ParameterGroupName: aws.String(d.Get("name").(string)), + } + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + _, err := conn.CreateParameterGroup(input) + if err != nil { + return err + } + + d.SetId(d.Get("name").(string)) + + if len(d.Get("parameters").(*schema.Set).List()) > 0 { + return resourceAwsDaxParameterGroupUpdate(d, meta) + } + return resourceAwsDaxParameterGroupRead(d, meta) +} + +func resourceAwsDaxParameterGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + resp, err := conn.DescribeParameterGroups(&dax.DescribeParameterGroupsInput{ + ParameterGroupNames: []*string{aws.String(d.Id())}, + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { + log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + pg := resp.ParameterGroups[0] + + paramresp, err := conn.DescribeParameters(&dax.DescribeParametersInput{ + ParameterGroupName: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { + log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("name", pg.ParameterGroupName) + desc := pg.Description + // default description is " " + if desc != nil && *desc == " " { + *desc = "" + } + d.Set("description", desc) + d.Set("parameters", flattenDaxParameterGroupParameters(paramresp.Parameters)) + return nil +} + +func resourceAwsDaxParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.UpdateParameterGroupInput{ + ParameterGroupName: aws.String(d.Id()), + } + + if d.HasChange("parameters") { + input.ParameterNameValues = expandDaxParameterGroupParameterNameValue( + d.Get("parameters").(*schema.Set).List(), + ) + } + + _, err := conn.UpdateParameterGroup(input) + if err != nil { + return err + } + + return resourceAwsDaxParameterGroupRead(d, meta) +} + +func resourceAwsDaxParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.DeleteParameterGroupInput{ + ParameterGroupName: aws.String(d.Id()), + } + + _, err := conn.DeleteParameterGroup(input) + if err != nil { + if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { + return nil + } + return err + } + + return nil +} + +func expandDaxParameterGroupParameterNameValue(config []interface{}) []*dax.ParameterNameValue { + if len(config) == 0 { + return nil + } + results := make([]*dax.ParameterNameValue, 0, len(config)) + for _, raw := range config { + m := raw.(map[string]interface{}) + pnv := &dax.ParameterNameValue{ + ParameterName: aws.String(m["name"].(string)), + ParameterValue: aws.String(m["value"].(string)), + } + results = append(results, pnv) + } + return results +} + +func flattenDaxParameterGroupParameters(params []*dax.Parameter) []map[string]interface{} { + if len(params) == 0 { + return nil + } + results := make([]map[string]interface{}, 0) + for _, p := range params { + m := map[string]interface{}{ + "name": aws.StringValue(p.ParameterName), + "value": aws.StringValue(p.ParameterValue), + } + results = append(results, m) + } + return results +} diff --git a/aws/resource_aws_dax_parameter_group_test.go b/aws/resource_aws_dax_parameter_group_test.go new file mode 100644 index 00000000000..45cfa861aec --- /dev/null +++ b/aws/resource_aws_dax_parameter_group_test.go @@ -0,0 +1,123 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsDaxParameterGroup_basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDaxParameterGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDaxParameterGroupConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDaxParameterGroupExists("aws_dax_parameter_group.test"), + resource.TestCheckResourceAttr("aws_dax_parameter_group.test", "parameters.#", "2"), + ), + }, + { + Config: testAccDaxParameterGroupConfig_parameters(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDaxParameterGroupExists("aws_dax_parameter_group.test"), + resource.TestCheckResourceAttr("aws_dax_parameter_group.test", "parameters.#", "2"), + ), + }, + }, + }) +} + +func TestAccAwsDaxParameterGroup_import(t *testing.T) { + resourceName := "aws_dax_parameter_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDaxParameterGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDaxParameterGroupConfig(acctest.RandString(5)), + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsDaxParameterGroupDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).daxconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_dax_parameter_group" { + continue + } + + _, err := conn.DescribeParameterGroups(&dax.DescribeParameterGroupsInput{ + ParameterGroupNames: []*string{aws.String(rs.Primary.ID)}, + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeParameterGroupNotFoundFault, "") { + return nil + } + return err + } + } + return nil +} + +func testAccCheckAwsDaxParameterGroupExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + conn := testAccProvider.Meta().(*AWSClient).daxconn + + _, err := conn.DescribeParameterGroups(&dax.DescribeParameterGroupsInput{ + ParameterGroupNames: []*string{aws.String(rs.Primary.ID)}, + }) + if err != nil { + return err + } + + return nil + } +} + +func testAccDaxParameterGroupConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_dax_parameter_group" "test" { + name = "%s" +} +`, rName) +} + +func testAccDaxParameterGroupConfig_parameters(rName string) string { + return fmt.Sprintf(` +resource "aws_dax_parameter_group" "test" { + name = "%s" + parameters { + name = "query-ttl-millis" + value = "100000" + } + parameters { + name = "record-ttl-millis" + value = "100000" + } +} +`, rName) +} diff --git a/website/aws.erb b/website/aws.erb index 20809aecae8..87859d8799e 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -700,6 +700,10 @@ aws_dax_cluster + > + aws_dax_parameter_group + + diff --git a/website/docs/r/dax_parameter_group.html.markdown b/website/docs/r/dax_parameter_group.html.markdown new file mode 100644 index 00000000000..18f51b05937 --- /dev/null +++ b/website/docs/r/dax_parameter_group.html.markdown @@ -0,0 +1,58 @@ +--- +layout: "aws" +page_title: "AWS: aws_dax_parameter_group" +sidebar_current: "docs-aws-resource-dax-parameter-group" +description: |- + Provides an DAX Parameter Group resource. +--- + +# aws_dax_parameter_group + +Provides a DAX Parameter Group resource. + +## Example Usage + +```hcl +resource "aws_dax_parameter_group" "example" { + name = "example" + parameters { + name = "query-ttl-millis" + value = "100000" + } + parameters { + name = "record-ttl-millis" + value = "100000" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` – (Required) The name of the parameter group. + +* `description` - (Optional, ForceNew) A description of the parameter group. + +* `parameters` – (Optional) The parameters of the parameter group. + +## parameters + +`parameters` supports the following: + +* `name` - (Required) The name of the parameter. +* `value` - (Required) The value for the parameter. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The name of the parameter group. + +## Import + +DAX Parameter Group can be imported using the `name`, e.g. + +``` +$ terraform import aws_dax_parameter_group.example my_dax_pg +``` From 7992cf36d628c4bfb46c34f7f87a6df482bba1cb Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 21 Apr 2018 10:52:25 +0200 Subject: [PATCH 0712/3316] data-source/iam_instance_profile: export attributes of role_arn and role_name --- aws/data_source_aws_iam_instance_profile.go | 16 +++++++++++++--- ...ta_source_aws_iam_instance_profile_test.go | 19 ++++++++++++++----- .../docs/d/iam_instance_profile.html.markdown | 6 +++++- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/aws/data_source_aws_iam_instance_profile.go b/aws/data_source_aws_iam_instance_profile.go index 305e2e4e734..e999f7f9a9f 100644 --- a/aws/data_source_aws_iam_instance_profile.go +++ b/aws/data_source_aws_iam_instance_profile.go @@ -31,10 +31,18 @@ func dataSourceAwsIAMInstanceProfile() *schema.Resource { Type: schema.TypeString, Required: true, }, + "role_arn": { + Type: schema.TypeString, + Computed: true, + }, "role_id": { Type: schema.TypeString, Computed: true, }, + "role_name": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -64,9 +72,11 @@ func dataSourceAwsIAMInstanceProfileRead(d *schema.ResourceData, meta interface{ d.Set("create_date", fmt.Sprintf("%v", instanceProfile.CreateDate)) d.Set("path", instanceProfile.Path) - for _, r := range instanceProfile.Roles { - d.Set("role_id", r.RoleId) - } + // it's guaranteed that instanceProfile.Roles exists and has one element + role := instanceProfile.Roles[0] + d.Set("role_arn", role.Arn) + d.Set("role_id", role.RoleId) + d.Set("role_name", role.RoleName) return nil } diff --git a/aws/data_source_aws_iam_instance_profile_test.go b/aws/data_source_aws_iam_instance_profile_test.go index eabbb5d450b..411e87c0dfc 100644 --- a/aws/data_source_aws_iam_instance_profile_test.go +++ b/aws/data_source_aws_iam_instance_profile_test.go @@ -10,8 +10,8 @@ import ( ) func TestAccAWSDataSourceIAMInstanceProfile_basic(t *testing.T) { - roleName := fmt.Sprintf("test-datasource-user-%d", acctest.RandInt()) - profileName := fmt.Sprintf("test-datasource-user-%d", acctest.RandInt()) + roleName := fmt.Sprintf("tf-acc-ds-instance-profile-role-%d", acctest.RandInt()) + profileName := fmt.Sprintf("tf-acc-ds-instance-profile-%d", acctest.RandInt()) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -20,10 +20,19 @@ func TestAccAWSDataSourceIAMInstanceProfile_basic(t *testing.T) { { Config: testAccDatasourceAwsIamInstanceProfileConfig(roleName, profileName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet("data.aws_iam_instance_profile.test", "role_id"), + resource.TestMatchResourceAttr( + "data.aws_iam_instance_profile.test", + "arn", + regexp.MustCompile("^arn:aws:iam::[0-9]{12}:instance-profile/testpath/"+profileName+"$"), + ), resource.TestCheckResourceAttr("data.aws_iam_instance_profile.test", "path", "/testpath/"), - resource.TestMatchResourceAttr("data.aws_iam_instance_profile.test", "arn", - regexp.MustCompile("^arn:aws:iam::[0-9]{12}:instance-profile/testpath/"+profileName+"$")), + resource.TestMatchResourceAttr( + "data.aws_iam_instance_profile.test", + "role_arn", + regexp.MustCompile("^arn:aws:iam::[0-9]{12}:role/"+roleName+"$"), + ), + resource.TestCheckResourceAttrSet("data.aws_iam_instance_profile.test", "role_id"), + resource.TestCheckResourceAttr("data.aws_iam_instance_profile.test", "role_name", roleName), ), }, }, diff --git a/website/docs/d/iam_instance_profile.html.markdown b/website/docs/d/iam_instance_profile.html.markdown index 4eb866a0799..017069a34a3 100644 --- a/website/docs/d/iam_instance_profile.html.markdown +++ b/website/docs/d/iam_instance_profile.html.markdown @@ -9,7 +9,7 @@ description: |- # Data Source: aws_iam_instance_profile This data source can be used to fetch information about a specific -IAM instance profile. By using this data source, you can reference IAM +IAM instance profile. By using this data source, you can reference IAM instance profile properties without having to hard code ARNs as input. ## Example Usage @@ -33,4 +33,8 @@ data "aws_iam_instance_profile" "example" { * `path` - The path to the instance profile. +* `role_arn` - The role arn associated with this instance profile. + * `role_id` - The role id associated with this instance profile. + +* `role_name` - The role name associated with this instance profile. From 2cae81ed3f650dc5e90f33b6ab9744ec7fc9b7eb Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 21 Apr 2018 11:19:30 +0200 Subject: [PATCH 0713/3316] r/cognito_user_pool: support user_migration in lambda_config --- aws/resource_aws_cognito_user_pool.go | 5 +++++ aws/resource_aws_cognito_user_pool_test.go | 4 ++++ aws/structure.go | 8 ++++++++ examples/cognito-user-pool/main.tf | 1 + website/docs/r/cognito_user_pool.markdown | 1 + 5 files changed, 19 insertions(+) diff --git a/aws/resource_aws_cognito_user_pool.go b/aws/resource_aws_cognito_user_pool.go index 25ef24a9b97..ba9891b93d7 100644 --- a/aws/resource_aws_cognito_user_pool.go +++ b/aws/resource_aws_cognito_user_pool.go @@ -210,6 +210,11 @@ func resourceAwsCognitoUserPool() *schema.Resource { Optional: true, ValidateFunc: validateArn, }, + "user_migration": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, "verify_auth_challenge_response": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_cognito_user_pool_test.go b/aws/resource_aws_cognito_user_pool_test.go index de730b2a25a..d20787e175e 100644 --- a/aws/resource_aws_cognito_user_pool_test.go +++ b/aws/resource_aws_cognito_user_pool_test.go @@ -347,6 +347,7 @@ func TestAccAWSCognitoUserPool_withLambdaConfig(t *testing.T) { resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.pre_authentication"), resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.pre_sign_up"), resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.pre_token_generation"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.user_migration"), resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.verify_auth_challenge_response"), ), }, @@ -362,6 +363,7 @@ func TestAccAWSCognitoUserPool_withLambdaConfig(t *testing.T) { resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.pre_authentication"), resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.pre_sign_up"), resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.pre_token_generation"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.user_migration"), resource.TestCheckResourceAttrSet("aws_cognito_user_pool.main", "lambda_config.0.verify_auth_challenge_response"), ), }, @@ -808,6 +810,7 @@ resource "aws_cognito_user_pool" "main" { pre_authentication = "${aws_lambda_function.main.arn}" pre_sign_up = "${aws_lambda_function.main.arn}" pre_token_generation = "${aws_lambda_function.main.arn}" + user_migration = "${aws_lambda_function.main.arn}" verify_auth_challenge_response = "${aws_lambda_function.main.arn}" } }`, name) @@ -862,6 +865,7 @@ resource "aws_cognito_user_pool" "main" { pre_authentication = "${aws_lambda_function.second.arn}" pre_sign_up = "${aws_lambda_function.second.arn}" pre_token_generation = "${aws_lambda_function.second.arn}" + user_migration = "${aws_lambda_function.second.arn}" verify_auth_challenge_response = "${aws_lambda_function.second.arn}" } }`, name) diff --git a/aws/structure.go b/aws/structure.go index ddfb94b7b65..26b9c70afb6 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -2353,6 +2353,10 @@ func expandCognitoUserPoolLambdaConfig(config map[string]interface{}) *cognitoid configs.PreTokenGeneration = aws.String(v.(string)) } + if v, ok := config["user_migration"]; ok && v.(string) != "" { + configs.UserMigration = aws.String(v.(string)) + } + if v, ok := config["verify_auth_challenge_response"]; ok && v.(string) != "" { configs.VerifyAuthChallengeResponse = aws.String(v.(string)) } @@ -2399,6 +2403,10 @@ func flattenCognitoUserPoolLambdaConfig(s *cognitoidentityprovider.LambdaConfigT m["pre_token_generation"] = *s.PreTokenGeneration } + if s.UserMigration != nil { + m["user_migration"] = *s.UserMigration + } + if s.VerifyAuthChallengeResponse != nil { m["verify_auth_challenge_response"] = *s.VerifyAuthChallengeResponse } diff --git a/examples/cognito-user-pool/main.tf b/examples/cognito-user-pool/main.tf index 74c65c62f0d..53316fa5c69 100644 --- a/examples/cognito-user-pool/main.tf +++ b/examples/cognito-user-pool/main.tf @@ -107,6 +107,7 @@ resource "aws_cognito_user_pool" "pool" { pre_authentication = "${aws_lambda_function.main.arn}" pre_sign_up = "${aws_lambda_function.main.arn}" pre_token_generation = "${aws_lambda_function.main.arn}" + user_migration = "${aws_lambda_function.main.arn}" verify_auth_challenge_response = "${aws_lambda_function.main.arn}" } diff --git a/website/docs/r/cognito_user_pool.markdown b/website/docs/r/cognito_user_pool.markdown index 093e9fe611f..31e295d350a 100644 --- a/website/docs/r/cognito_user_pool.markdown +++ b/website/docs/r/cognito_user_pool.markdown @@ -75,6 +75,7 @@ The following arguments are supported: * `pre_authentication` (Optional) - A pre-authentication AWS Lambda trigger. * `pre_sign_up` (Optional) - A pre-registration AWS Lambda trigger. * `pre_token_generation` (Optional) - Allow to customize identity token claims before token generation. + * `user_migration` (Optional) - The user migration Lambda config type. * `verify_auth_challenge_response` (Optional) - Verifies the authentication challenge response. #### Password Policy From 06d9c4e2a9fb8b2106c0ee9b54434d0ff74e8411 Mon Sep 17 00:00:00 2001 From: Scott Winkler Date: Sat, 21 Apr 2018 02:30:43 -0700 Subject: [PATCH 0714/3316] add new iot endpoint data resource --- aws/aws_i | 0 aws/data_source_aws_iot_endpoint.go | 37 ++++++++++++++++++++++++ aws/data_source_aws_iot_endpoint_test.go | 27 +++++++++++++++++ aws/provider.go | 1 + 4 files changed, 65 insertions(+) create mode 100644 aws/aws_i create mode 100644 aws/data_source_aws_iot_endpoint.go create mode 100644 aws/data_source_aws_iot_endpoint_test.go diff --git a/aws/aws_i b/aws/aws_i new file mode 100644 index 00000000000..e69de29bb2d diff --git a/aws/data_source_aws_iot_endpoint.go b/aws/data_source_aws_iot_endpoint.go new file mode 100644 index 00000000000..e9938bf8eef --- /dev/null +++ b/aws/data_source_aws_iot_endpoint.go @@ -0,0 +1,37 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iot" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsIotEndpoint() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsIotEndpointRead, + Schema: map[string]*schema.Schema{ + "endpoint_address": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsIotEndpointRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + input := &iot.DescribeEndpointInput{} + + output, err := conn.DescribeEndpoint(input) + if err != nil { + return fmt.Errorf("error while describing iot endpoint: %s", err) + } + endpointAddress := aws.StringValue(output.EndpointAddress) + d.SetId(endpointAddress) + if err := d.Set("endpoint_address", endpointAddress); err != nil { + return fmt.Errorf("error setting endpoint_address: %s", err) + } + return nil +} diff --git a/aws/data_source_aws_iot_endpoint_test.go b/aws/data_source_aws_iot_endpoint_test.go new file mode 100644 index 00000000000..0a7a0b51e6c --- /dev/null +++ b/aws/data_source_aws_iot_endpoint_test.go @@ -0,0 +1,27 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSIotEndpoint(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSIotEndpointConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("aws_iot_endpoint.example", "id"), + resource.TestCheckResourceAttrSet("aws_iot_endpoint.example", "endpoint_address"), + ), + }, + }, + }) +} + +const testAccAWSIotEndpointConfig = ` +data "aws_iot_endpoint" "example" {} +` diff --git a/aws/provider.go b/aws/provider.go index b7054c3a081..31c67227758 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -200,6 +200,7 @@ func Provider() terraform.ResourceProvider { "aws_iam_server_certificate": dataSourceAwsIAMServerCertificate(), "aws_iam_user": dataSourceAwsIAMUser(), "aws_internet_gateway": dataSourceAwsInternetGateway(), + "aws_iot_endpoint": dataSourceAwsIotEndpoint(), "aws_inspector_rules_packages": dataSourceAwsInspectorRulesPackages(), "aws_instance": dataSourceAwsInstance(), "aws_instances": dataSourceAwsInstances(), From a856a9b5169e8ca5a265eedcefaf407f8ae84c74 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 21 Apr 2018 18:34:20 +0900 Subject: [PATCH 0715/3316] Support DAX SubnetGroup --- aws/provider.go | 1 + aws/resource_aws_dax_subnet_group.go | 132 ++++++++++++++ aws/resource_aws_dax_subnet_group_test.go | 161 ++++++++++++++++++ website/aws.erb | 4 + website/docs/r/dax_subnet_group.html.markdown | 43 +++++ 5 files changed, 341 insertions(+) create mode 100644 aws/resource_aws_dax_subnet_group.go create mode 100644 aws/resource_aws_dax_subnet_group_test.go create mode 100644 website/docs/r/dax_subnet_group.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 05be28cd2db..5d10b6a9342 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -325,6 +325,7 @@ func Provider() terraform.ResourceProvider { "aws_codepipeline": resourceAwsCodePipeline(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_dax_cluster": resourceAwsDaxCluster(), + "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), "aws_db_event_subscription": resourceAwsDbEventSubscription(), "aws_db_instance": resourceAwsDbInstance(), "aws_db_option_group": resourceAwsDbOptionGroup(), diff --git a/aws/resource_aws_dax_subnet_group.go b/aws/resource_aws_dax_subnet_group.go new file mode 100644 index 00000000000..9ce8128e5bc --- /dev/null +++ b/aws/resource_aws_dax_subnet_group.go @@ -0,0 +1,132 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDaxSubnetGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDaxSubnetGroupCreate, + Read: resourceAwsDaxSubnetGroupRead, + Update: resourceAwsDaxSubnetGroupUpdate, + Delete: resourceAwsDaxSubnetGroupDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "subnet_ids": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsDaxSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.CreateSubnetGroupInput{ + SubnetGroupName: aws.String(d.Get("name").(string)), + SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), + } + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + _, err := conn.CreateSubnetGroup(input) + if err != nil { + return err + } + + d.SetId(d.Get("name").(string)) + return resourceAwsDaxSubnetGroupRead(d, meta) +} + +func resourceAwsDaxSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + resp, err := conn.DescribeSubnetGroups(&dax.DescribeSubnetGroupsInput{ + SubnetGroupNames: []*string{aws.String(d.Id())}, + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeSubnetGroupNotFoundFault, "") { + log.Printf("[WARN] DAX SubnetGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + sg := resp.SubnetGroups[0] + + d.Set("name", sg.SubnetGroupName) + d.Set("description", sg.Description) + subnetIDs := make([]*string, 0, len(sg.Subnets)) + for _, v := range sg.Subnets { + subnetIDs = append(subnetIDs, v.SubnetIdentifier) + } + d.Set("subnet_ids", flattenStringList(subnetIDs)) + d.Set("vpc_id", sg.VpcId) + return nil +} + +func resourceAwsDaxSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.UpdateSubnetGroupInput{ + SubnetGroupName: aws.String(d.Id()), + } + + if d.HasChange("description") { + input.Description = aws.String(d.Get("description").(string)) + } + + if d.HasChange("subnet_ids") { + input.SubnetIds = expandStringSet(d.Get("subnet_ids").(*schema.Set)) + } + + _, err := conn.UpdateSubnetGroup(input) + if err != nil { + return err + } + + return resourceAwsDaxSubnetGroupRead(d, meta) +} + +func resourceAwsDaxSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).daxconn + + input := &dax.DeleteSubnetGroupInput{ + SubnetGroupName: aws.String(d.Id()), + } + + _, err := conn.DeleteSubnetGroup(input) + if err != nil { + if isAWSErr(err, dax.ErrCodeSubnetGroupNotFoundFault, "") { + return nil + } + return err + } + + return nil +} diff --git a/aws/resource_aws_dax_subnet_group_test.go b/aws/resource_aws_dax_subnet_group_test.go new file mode 100644 index 00000000000..732ba0fbd84 --- /dev/null +++ b/aws/resource_aws_dax_subnet_group_test.go @@ -0,0 +1,161 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dax" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsDaxSubnetGroup_basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDaxSubnetGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDaxSubnetGroupConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDaxSubnetGroupExists("aws_dax_subnet_group.test"), + resource.TestCheckResourceAttr("aws_dax_subnet_group.test", "subnet_ids.#", "2"), + resource.TestCheckResourceAttrSet("aws_dax_subnet_group.test", "vpc_id"), + ), + }, + { + Config: testAccDaxSubnetGroupConfig_update(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDaxSubnetGroupExists("aws_dax_subnet_group.test"), + resource.TestCheckResourceAttr("aws_dax_subnet_group.test", "description", "update"), + resource.TestCheckResourceAttr("aws_dax_subnet_group.test", "subnet_ids.#", "3"), + resource.TestCheckResourceAttrSet("aws_dax_subnet_group.test", "vpc_id"), + ), + }, + }, + }) +} + +func TestAccAwsDaxSubnetGroup_import(t *testing.T) { + resourceName := "aws_dax_subnet_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDaxSubnetGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDaxSubnetGroupConfig(acctest.RandString(5)), + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsDaxSubnetGroupDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).daxconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_dax_subnet_group" { + continue + } + + _, err := conn.DescribeSubnetGroups(&dax.DescribeSubnetGroupsInput{ + SubnetGroupNames: []*string{aws.String(rs.Primary.ID)}, + }) + if err != nil { + if isAWSErr(err, dax.ErrCodeSubnetGroupNotFoundFault, "") { + return nil + } + return err + } + } + return nil +} + +func testAccCheckAwsDaxSubnetGroupExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + conn := testAccProvider.Meta().(*AWSClient).daxconn + + _, err := conn.DescribeSubnetGroups(&dax.DescribeSubnetGroupsInput{ + SubnetGroupNames: []*string{aws.String(rs.Primary.ID)}, + }) + if err != nil { + return err + } + + return nil + } +} + +func testAccDaxSubnetGroupConfig(rName string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_subnet" "test1" { + cidr_block = "10.0.1.0/24" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_subnet" "test2" { + cidr_block = "10.0.2.0/24" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_dax_subnet_group" "test" { + name = "%s" + subnet_ids = [ + "${aws_subnet.test1.id}", + "${aws_subnet.test2.id}", + ] +} +`, rName) +} + +func testAccDaxSubnetGroupConfig_update(rName string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_subnet" "test1" { + cidr_block = "10.0.1.0/24" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_subnet" "test2" { + cidr_block = "10.0.2.0/24" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_subnet" "test3" { + cidr_block = "10.0.3.0/24" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_dax_subnet_group" "test" { + name = "%s" + description = "update" + subnet_ids = [ + "${aws_subnet.test1.id}", + "${aws_subnet.test2.id}", + "${aws_subnet.test3.id}", + ] +} +`, rName) +} diff --git a/website/aws.erb b/website/aws.erb index 20809aecae8..70a2af0e668 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -700,6 +700,10 @@ aws_dax_cluster + > + aws_dax_subnet_group + + diff --git a/website/docs/r/dax_subnet_group.html.markdown b/website/docs/r/dax_subnet_group.html.markdown new file mode 100644 index 00000000000..ff24a092d1d --- /dev/null +++ b/website/docs/r/dax_subnet_group.html.markdown @@ -0,0 +1,43 @@ +--- +layout: "aws" +page_title: "AWS: aws_dax_subnet_group" +sidebar_current: "docs-aws-resource-dax-subnet-group" +description: |- + Provides an DAX Subnet Group resource. +--- + +# aws_dax_subnet_group + +Provides a DAX Subnet Group resource. + +## Example Usage + +```hcl +resource "aws_dax_subnet_group" "example" { + name = "example" + subnet_ids = ["${aws_subnet.example1.id}", "${aws_subnet.example2.id}"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` – (Required) The name of the subnet group. +* `description` - (Optional) A description of the subnet group. +* `subnet_ids` – (Required) A list of VPC subnet IDs for the subnet group. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The name of the subnet group. +* `vpc_id` – VPC ID of the subnet group. + +## Import + +DAX Subnet Group can be imported using the `name`, e.g. + +``` +$ terraform import aws_dax_subnet_group.example my_dax_sg +``` From d1798af20a3ffb29e51275afc69a4568ef1c8e3f Mon Sep 17 00:00:00 2001 From: scottwinkler Date: Sat, 21 Apr 2018 02:36:45 -0700 Subject: [PATCH 0716/3316] Delete aws_i --- aws/aws_i | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 aws/aws_i diff --git a/aws/aws_i b/aws/aws_i deleted file mode 100644 index e69de29bb2d..00000000000 From 4f0c75754c1c3816363e052eb111424aa0072215 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 21 Apr 2018 11:45:43 +0200 Subject: [PATCH 0717/3316] docs/r/api_gateway_method: add example with cognito user pool authorizer --- .../docs/r/api_gateway_method.html.markdown | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/website/docs/r/api_gateway_method.html.markdown b/website/docs/r/api_gateway_method.html.markdown index c85b2137d16..1ce5fe0c5e4 100644 --- a/website/docs/r/api_gateway_method.html.markdown +++ b/website/docs/r/api_gateway_method.html.markdown @@ -32,6 +32,44 @@ resource "aws_api_gateway_method" "MyDemoMethod" { } ``` +## Usage with Cognito User Pool Authorizer +```hcl +variable "cognito_user_pool_name" {} + +data "aws_cognito_user_pools" "this" { + name = "${var.cognito_user_pool_name}" +} + +resource "aws_api_gateway_rest_api" "this" { + name = "with-authorizer" +} + +resource "aws_api_gateway_resource" "this" { + rest_api_id = "${aws_api_gateway_rest_api.this.id}" + parent_id = "${aws_api_gateway_rest_api.this.root_resource_id}" + path_part = "{proxy+}" +} + +resource "aws_api_gateway_authorizer" "this" { + name = "CognitoUserPoolAuthorizer" + type = "COGNITO_USER_POOLS" + rest_api_id = "${aws_api_gateway_rest_api.this.id}" + provider_arns = ["${data.aws_cognito_user_pools.this.arns}"] +} + +resource "aws_api_gateway_method" "any" { + rest_api_id = "${aws_api_gateway_rest_api.this.id}" + resource_id = "${aws_api_gateway_resource.this.id}" + http_method = "ANY" + authorization = "COGNITO_USER_POOLS" + authorizer_id = "${aws_api_gateway_authorizer.this.id}" + + request_parameters = { + "method.request.path.proxy" = true + } +} +``` + ## Argument Reference The following arguments are supported: @@ -47,12 +85,12 @@ The following arguments are supported: and value is either `Error`, `Empty` (built-in models) or `aws_api_gateway_model`'s `name`. * `request_validator_id` - (Optional) The ID of a `aws_api_gateway_request_validator` * `request_parameters` - (Optional) A map of request query string parameters and headers that should be passed to the integration. - For example: + For example: ```hcl -request_parameters = { +request_parameters = { "method.request.header.X-Some-Header" = true, "method.request.querystring.some-query-param" = true, } ``` -would define that the header `X-Some-Header` and the query string `some-query-param` must be provided on the request, or +would define that the header `X-Some-Header` and the query string `some-query-param` must be provided on the request, or * `request_parameters_in_json` - **Deprecated**, use `request_parameters` instead. From c62e14aa80315fd1761b62af15763303258a40b1 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Thu, 8 Mar 2018 19:23:36 +0100 Subject: [PATCH 0718/3316] resource/elb: drop custom ValidateFunc for protocol and int --- aws/resource_aws_elb.go | 40 ++++++++++++++-------------- aws/resource_aws_elb_test.go | 51 ------------------------------------ 2 files changed, 19 insertions(+), 72 deletions(-) diff --git a/aws/resource_aws_elb.go b/aws/resource_aws_elb.go index eb26f962633..7587556a1fb 100644 --- a/aws/resource_aws_elb.go +++ b/aws/resource_aws_elb.go @@ -17,6 +17,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsElb() *schema.Resource { @@ -110,7 +111,7 @@ func resourceAwsElb() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 60, - ValidateFunc: validateIntegerInRange(1, 4000), + ValidateFunc: validation.IntBetween(1, 4000), }, "connection_draining": &schema.Schema{ @@ -162,25 +163,25 @@ func resourceAwsElb() *schema.Resource { "instance_port": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(1, 65535), + ValidateFunc: validation.IntBetween(1, 65535), }, "instance_protocol": &schema.Schema{ Type: schema.TypeString, Required: true, - ValidateFunc: validateListenerProtocol, + ValidateFunc: validateListenerProtocol(), }, "lb_port": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(1, 65535), + ValidateFunc: validation.IntBetween(1, 65535), }, "lb_protocol": &schema.Schema{ Type: schema.TypeString, Required: true, - ValidateFunc: validateListenerProtocol, + ValidateFunc: validateListenerProtocol(), }, "ssl_certificate_id": &schema.Schema{ @@ -203,13 +204,13 @@ func resourceAwsElb() *schema.Resource { "healthy_threshold": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(2, 10), + ValidateFunc: validation.IntBetween(2, 10), }, "unhealthy_threshold": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(2, 10), + ValidateFunc: validation.IntBetween(2, 10), }, "target": &schema.Schema{ @@ -221,13 +222,13 @@ func resourceAwsElb() *schema.Resource { "interval": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(5, 300), + ValidateFunc: validation.IntBetween(5, 300), }, "timeout": &schema.Schema{ Type: schema.TypeInt, Required: true, - ValidateFunc: validateIntegerInRange(2, 60), + ValidateFunc: validation.IntBetween(2, 60), }, }, }, @@ -965,18 +966,6 @@ func validateHeathCheckTarget(v interface{}, k string) (ws []string, errors []er return } -func validateListenerProtocol(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - if !isValidProtocol(value) { - errors = append(errors, fmt.Errorf( - "%q contains an invalid Listener protocol %q. "+ - "Valid protocols are either %q, %q, %q, or %q.", - k, value, "TCP", "SSL", "HTTP", "HTTPS")) - } - return -} - func isValidProtocol(s string) bool { if s == "" { return false @@ -997,6 +986,15 @@ func isValidProtocol(s string) bool { return true } +func validateListenerProtocol() schema.SchemaValidateFunc { + return validation.StringInSlice([]string{ + "HTTP", + "HTTPS", + "SSL", + "TCP", + }, true) +} + // ELB automatically creates ENI(s) on creation // but the cleanup is asynchronous and may take time // which then blocks IGW, SG or VPC on deletion diff --git a/aws/resource_aws_elb_test.go b/aws/resource_aws_elb_test.go index 386c2461493..61e5c6af792 100644 --- a/aws/resource_aws_elb_test.go +++ b/aws/resource_aws_elb_test.go @@ -909,57 +909,6 @@ func TestResourceAWSELB_validateAccessLogsInterval(t *testing.T) { } -func TestResourceAWSELB_validateListenerProtocol(t *testing.T) { - type testCases struct { - Value string - ErrCount int - } - - invalidCases := []testCases{ - { - Value: "", - ErrCount: 1, - }, - { - Value: "incorrect", - ErrCount: 1, - }, - { - Value: "HTTP:", - ErrCount: 1, - }, - } - - for _, tc := range invalidCases { - _, errors := validateListenerProtocol(tc.Value, "protocol") - if len(errors) != tc.ErrCount { - t.Fatalf("Expected %q to trigger a validation error.", tc.Value) - } - } - - validCases := []testCases{ - { - Value: "TCP", - ErrCount: 0, - }, - { - Value: "ssl", - ErrCount: 0, - }, - { - Value: "HTTP", - ErrCount: 0, - }, - } - - for _, tc := range validCases { - _, errors := validateListenerProtocol(tc.Value, "protocol") - if len(errors) != tc.ErrCount { - t.Fatalf("Expected %q not to trigger a validation error.", tc.Value) - } - } -} - func TestResourceAWSELB_validateHealthCheckTarget(t *testing.T) { type testCase struct { Value string From 209f5fe6c4ac62338e67762ebf7a4c921686a4a5 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 21 Apr 2018 18:34:05 +0200 Subject: [PATCH 0719/3316] r/api_gateway_vpc_link: support import --- aws/resource_aws_api_gateway_vpc_link.go | 3 +++ aws/resource_aws_api_gateway_vpc_link_test.go | 20 +++++++++++++++++++ .../docs/r/api_gateway_vpc_link.html.markdown | 8 ++++++++ 3 files changed, 31 insertions(+) diff --git a/aws/resource_aws_api_gateway_vpc_link.go b/aws/resource_aws_api_gateway_vpc_link.go index 62f10d8a502..ae7e4557288 100644 --- a/aws/resource_aws_api_gateway_vpc_link.go +++ b/aws/resource_aws_api_gateway_vpc_link.go @@ -17,6 +17,9 @@ func resourceAwsApiGatewayVpcLink() *schema.Resource { Read: resourceAwsApiGatewayVpcLinkRead, Update: resourceAwsApiGatewayVpcLinkUpdate, Delete: resourceAwsApiGatewayVpcLinkDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { diff --git a/aws/resource_aws_api_gateway_vpc_link_test.go b/aws/resource_aws_api_gateway_vpc_link_test.go index 6d8e046980b..62ad31e77e4 100644 --- a/aws/resource_aws_api_gateway_vpc_link_test.go +++ b/aws/resource_aws_api_gateway_vpc_link_test.go @@ -40,6 +40,26 @@ func TestAccAWSAPIGatewayVpcLink_basic(t *testing.T) { }) } +func TestAccAWSAPIGatewayVpcLink_importBasic(t *testing.T) { + rName := acctest.RandString(5) + resourceName := "aws_api_gateway_vpc_link.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAPIGatewayVpcLinkConfig(rName), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAwsAPIGatewayVpcLinkDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).apigateway diff --git a/website/docs/r/api_gateway_vpc_link.html.markdown b/website/docs/r/api_gateway_vpc_link.html.markdown index deb53f107d8..9abe3ec6ddf 100644 --- a/website/docs/r/api_gateway_vpc_link.html.markdown +++ b/website/docs/r/api_gateway_vpc_link.html.markdown @@ -43,3 +43,11 @@ The following arguments are supported: The following attributes are exported: * `id` - The identifier of the VpcLink. + +## Import + +API Gateway VPC Link can be imported using the `id`, e.g. + +``` +$ terraform import aws_api_gateway_vpc_link.example +``` From 4474a74a847d13c58590f228358280e685258eb1 Mon Sep 17 00:00:00 2001 From: Will Saxon Date: Sun, 22 Apr 2018 00:52:17 -0400 Subject: [PATCH 0720/3316] aws_api_gateway_stage outputs invoke_url Attempts to address #3468. --- aws/resource_aws_api_gateway_stage.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index 234c9ebd97c..f316cc6bb40 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -45,6 +45,10 @@ func resourceAwsApiGatewayStage() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "invoke_url": { + Type: schema.TypeString, + Computed: true, + }, "rest_api_id": { Type: schema.TypeString, Required: true, @@ -152,9 +156,11 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Reading API Gateway Stage %s", d.Id()) + restApiId := d.Get("rest_api_id").(string) + stageName := d.Get("stage_name").(string) input := apigateway.GetStageInput{ - RestApiId: aws.String(d.Get("rest_api_id").(string)), - StageName: aws.String(d.Get("stage_name").(string)), + RestApiId: aws.String(restApiId), + StageName: aws.String(stageName), } stage, err := conn.GetStage(&input) if err != nil { @@ -183,6 +189,9 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er d.Set("variables", aws.StringValueMap(stage.Variables)) d.Set("tags", aws.StringValueMap(stage.Tags)) + region := meta.(*AWSClient).region + d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) + return nil } From f94efd5f6f3f52a4df11aae729383ca282bb8f31 Mon Sep 17 00:00:00 2001 From: Will Saxon Date: Sun, 22 Apr 2018 00:52:29 -0400 Subject: [PATCH 0721/3316] Also output execution_arn It looks like this is another stage-specific output value from aws_api_gateway_deployment, so also export it. --- aws/resource_aws_api_gateway_stage.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index f316cc6bb40..170fbdf9bce 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -45,6 +45,10 @@ func resourceAwsApiGatewayStage() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "execution_arn": { + Type: schema.TypeString, + Computed: true, + }, "invoke_url": { Type: schema.TypeString, Computed: true, @@ -192,6 +196,13 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er region := meta.(*AWSClient).region d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) + accountId := meta.(*AWSClient).accountid + arn, err := buildApiGatewayExecutionARN(restApiId, region, accountId) + if err != nil { + return err + } + d.Set("execution_arn", arn+"/"+stageName) + return nil } From daab3c131e5a2702dadd1000498f6acdf7e89128 Mon Sep 17 00:00:00 2001 From: Will Saxon Date: Sun, 22 Apr 2018 00:52:31 -0400 Subject: [PATCH 0722/3316] Update documentation Change the api_gateway_stage resource documentation to note the exported id, execution_arn, and invoke_url attributes. --- website/docs/r/api_gateway_stage.html.markdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/docs/r/api_gateway_stage.html.markdown b/website/docs/r/api_gateway_stage.html.markdown index 3f4da3f39a6..d1db65ca630 100644 --- a/website/docs/r/api_gateway_stage.html.markdown +++ b/website/docs/r/api_gateway_stage.html.markdown @@ -77,3 +77,14 @@ The following arguments are supported: * `documentation_version` - (Optional) The version of the associated API documentation * `variables` - (Optional) A map that defines the stage variables * `tags` - (Optional) A mapping of tags to assign to the resource. + +## Attribute Reference + +The following attributes are exported: + +* `id` - The ID of the stage +* `invoke_url` - The URL to invoke the API pointing to the stage, + e.g. `https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod` +* `execution_arn` - The execution ARN to be used in [`lambda_permission`](/docs/providers/aws/r/lambda_permission.html)'s `source_arn` + when allowing API Gateway to invoke a Lambda function, + e.g. `arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod` From 3e9bf14caf3026003b9fa53dc8d79aef3f51287b Mon Sep 17 00:00:00 2001 From: Will Saxon Date: Sun, 22 Apr 2018 00:52:40 -0400 Subject: [PATCH 0723/3316] replace buildApiGatewayExcutionARN with SDK --- aws/resource_aws_api_gateway_stage.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index 170fbdf9bce..fea558dbd61 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -196,12 +196,14 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er region := meta.(*AWSClient).region d.Set("invoke_url", buildApiGatewayInvokeURL(restApiId, region, stageName)) - accountId := meta.(*AWSClient).accountid - arn, err := buildApiGatewayExecutionARN(restApiId, region, accountId) - if err != nil { - return err - } - d.Set("execution_arn", arn+"/"+stageName) + executionArn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "execute-api", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("%s/%s", restApiId, stageName), + }.String() + d.Set("execution_arn", executionArn) return nil } From ea9a766790999f1e33db614b1ac7affd95e6fa88 Mon Sep 17 00:00:00 2001 From: Will Saxon Date: Sun, 22 Apr 2018 01:15:08 -0400 Subject: [PATCH 0724/3316] Add acceptance tests --- aws/resource_aws_api_gateway_stage_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_api_gateway_stage_test.go b/aws/resource_aws_api_gateway_stage_test.go index dc3c95c6216..67dd003706d 100644 --- a/aws/resource_aws_api_gateway_stage_test.go +++ b/aws/resource_aws_api_gateway_stage_test.go @@ -29,6 +29,8 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_enabled", "true"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_size", "0.5"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "1"), + resource.TestCheckResourceAttrSet("aws_api_gateway_stage.test", "execution_arn"), + resource.TestCheckResourceAttrSet("aws_api_gateway_stage.test", "invoke_url"), ), }, resource.TestStep{ @@ -48,6 +50,8 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_enabled", "true"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_size", "0.5"), resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "1"), + resource.TestCheckResourceAttrSet("aws_api_gateway_stage.test", "execution_arn"), + resource.TestCheckResourceAttrSet("aws_api_gateway_stage.test", "invoke_url"), ), }, }, From 970a6c953bf048aa94bbedc44027d1d9ed096992 Mon Sep 17 00:00:00 2001 From: omeid matten Date: Sun, 22 Apr 2018 21:05:06 +1000 Subject: [PATCH 0725/3316] resources/wafregional_web_acl: add rule type support This commit adds rule type support so that Rate Limit rules could be use along with REGULAR rules. Closes #4079 #4174 #4052 --- aws/resource_aws_wafregional_web_acl.go | 13 +++++++++++++ website/docs/r/wafregional_web_acl.html.markdown | 2 ++ 2 files changed, 15 insertions(+) diff --git a/aws/resource_aws_wafregional_web_acl.go b/aws/resource_aws_wafregional_web_acl.go index d466b14d95d..ff72c1d1ceb 100644 --- a/aws/resource_aws_wafregional_web_acl.go +++ b/aws/resource_aws_wafregional_web_acl.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsWafRegionalWebAcl() *schema.Resource { @@ -63,6 +64,15 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { Type: schema.TypeInt, Required: true, }, + "type": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Default: waf.WafRuleTypeRegular, + ValidateFunc: validation.StringInSlice([]string{ + waf.WafRuleTypeRegular, + waf.WafRuleTypeRateBased, + }, false), + }, "rule_id": &schema.Schema{ Type: schema.TypeString, Required: true, @@ -224,6 +234,7 @@ func flattenWafWebAclRules(ts []*waf.ActivatedRule) []interface{} { m["action"] = []interface{}{actionMap} m["priority"] = *r.Priority m["rule_id"] = *r.RuleId + m["type"] = *r.Type out[i] = m } return out @@ -231,10 +242,12 @@ func flattenWafWebAclRules(ts []*waf.ActivatedRule) []interface{} { func expandWafWebAclUpdate(updateAction string, aclRule map[string]interface{}) *waf.WebACLUpdate { ruleAction := aclRule["action"].([]interface{})[0].(map[string]interface{}) + rule := &waf.ActivatedRule{ Action: &waf.WafAction{Type: aws.String(ruleAction["type"].(string))}, Priority: aws.Int64(int64(aclRule["priority"].(int))), RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), } update := &waf.WebACLUpdate{ diff --git a/website/docs/r/wafregional_web_acl.html.markdown b/website/docs/r/wafregional_web_acl.html.markdown index a93506a9b3c..2eeedef39a3 100644 --- a/website/docs/r/wafregional_web_acl.html.markdown +++ b/website/docs/r/wafregional_web_acl.html.markdown @@ -48,6 +48,7 @@ resource "aws_wafregional_web_acl" "wafacl" { priority = 1 rule_id = "${aws_wafregional_rule.wafrule.id}" + type = "REGULAR" } } ``` @@ -73,6 +74,7 @@ See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_regional_Acti * `priority` - (Required) Specifies the order in which the rules in a WebACL are evaluated. Rules with a lower value are evaluated before rules with a higher value. * `rule_id` - (Required) ID of the associated [rule](/docs/providers/aws/r/wafregional_rule.html) +* `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), or `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. ### `default_action` / `action` From 75f7b44a9286d25d71aad4a3a628d48166632d98 Mon Sep 17 00:00:00 2001 From: "Isabell (Issy) Long" Date: Sun, 22 Apr 2018 13:52:41 +0100 Subject: [PATCH 0726/3316] Fix typos: "it's" => "its" in route53_zone and default_sg docs - "It's" is a contraction of "it is", whereas "its" signifies possession. --- website/docs/d/route53_zone.html.markdown | 2 +- website/docs/r/default_security_group.html.markdown | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/d/route53_zone.html.markdown b/website/docs/d/route53_zone.html.markdown index 1b6c0b09734..d3d82855cbb 100644 --- a/website/docs/d/route53_zone.html.markdown +++ b/website/docs/d/route53_zone.html.markdown @@ -14,7 +14,7 @@ This data source allows to find a Hosted Zone ID given Hosted Zone name and cert ## Example Usage -The following example shows how to get a Hosted Zone from it's name and from this data how to create a Record Set. +The following example shows how to get a Hosted Zone from its name and from this data how to create a Record Set. ```hcl diff --git a/website/docs/r/default_security_group.html.markdown b/website/docs/r/default_security_group.html.markdown index 631270042d5..ee9213e589c 100644 --- a/website/docs/r/default_security_group.html.markdown +++ b/website/docs/r/default_security_group.html.markdown @@ -26,7 +26,7 @@ ingress and egress rules in the Security Group**. It then proceeds to create any configuration. This step is required so that only the rules specified in the configuration are created. -This resource treats it's inline rules as absolute; only the rules defined +This resource treats its inline rules as absolute; only the rules defined inline are created, and any additions/removals external to this resource will result in diff shown. For these reasons, this resource is incompatible with the `aws_security_group_rule` resource. @@ -98,7 +98,7 @@ removed. The following arguments are still supported: egress rule. Each egress block supports fields documented below. * `vpc_id` - (Optional, Forces new resource) The VPC ID. **Note that changing the `vpc_id` will _not_ restore any default security group rules that were -modified, added, or removed.** It will be left in it's current state +modified, added, or removed.** It will be left in its current state * `tags` - (Optional) A mapping of tags to assign to the resource. From a3b5a6dcb021b1960821b1a7f3c4bde05b25b9be Mon Sep 17 00:00:00 2001 From: Gareth Oakley Date: Sun, 22 Apr 2018 12:55:43 +0100 Subject: [PATCH 0727/3316] r/aws_config_aggregator: New resource --- aws/import_aws_config_aggregator_test.go | 30 +++ aws/provider.go | 1 + aws/resource_aws_config_aggregator.go | 193 ++++++++++++++++ aws/resource_aws_config_aggregator_test.go | 257 +++++++++++++++++++++ aws/structure.go | 64 +++++ website/aws.erb | 4 + website/docs/r/config_aggregator.markdown | 104 +++++++++ 7 files changed, 653 insertions(+) create mode 100644 aws/import_aws_config_aggregator_test.go create mode 100644 aws/resource_aws_config_aggregator.go create mode 100644 aws/resource_aws_config_aggregator_test.go create mode 100644 website/docs/r/config_aggregator.markdown diff --git a/aws/import_aws_config_aggregator_test.go b/aws/import_aws_config_aggregator_test.go new file mode 100644 index 00000000000..01c0e7819e7 --- /dev/null +++ b/aws/import_aws_config_aggregator_test.go @@ -0,0 +1,30 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccConfigAggregator_import(t *testing.T) { + resourceName := "aws_config_aggregator.example" + rString := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckConfigAggregatorDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccConfigAggregatorConfig_account(rString), + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/aws/provider.go b/aws/provider.go index 851e1d7a3ae..dbbeeb1ef4f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -303,6 +303,7 @@ func Provider() terraform.ResourceProvider { "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), + "aws_config_aggregator": resourceAwsConfigAggregator(), "aws_config_config_rule": resourceAwsConfigConfigRule(), "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), diff --git a/aws/resource_aws_config_aggregator.go b/aws/resource_aws_config_aggregator.go new file mode 100644 index 00000000000..3f7ab69f733 --- /dev/null +++ b/aws/resource_aws_config_aggregator.go @@ -0,0 +1,193 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/configservice" + + "github.com/hashicorp/terraform/helper/customdiff" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsConfigAggregator() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsConfigAggregatorPut, + Read: resourceAwsConfigAggregatorRead, + Update: resourceAwsConfigAggregatorPut, + Delete: resourceAwsConfigAggregatorDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + CustomizeDiff: customdiff.Sequence( + customdiff.ForceNewIfChange("account_aggregation_source", func(old, new, meta interface{}) bool { + return len(old.([]interface{})) == 0 && len(new.([]interface{})) > 0 + }), + customdiff.ForceNewIfChange("organization_aggregation_source", func(old, new, meta interface{}) bool { + return len(old.([]interface{})) == 0 && len(new.([]interface{})) > 0 + }), + ), + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateMaxLength(256), + }, + "account_aggregation_source": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"organization_aggregation_source"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "account_ids": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validateAwsAccountId, + }, + }, + "all_regions": { + Type: schema.TypeBool, + Default: false, + Optional: true, + }, + "regions": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "organization_aggregation_source": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"account_aggregation_source"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "all_regions": { + Type: schema.TypeBool, + Default: false, + Optional: true, + }, + "regions": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + }, + } +} + +func resourceAwsConfigAggregatorPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + + name := d.Get("name").(string) + + req := &configservice.PutConfigurationAggregatorInput{ + ConfigurationAggregatorName: aws.String(name), + } + + account_aggregation_sources := d.Get("account_aggregation_source").([]interface{}) + if len(account_aggregation_sources) > 0 { + req.AccountAggregationSources = expandConfigAccountAggregationSources(account_aggregation_sources) + } + + organization_aggregation_sources := d.Get("organization_aggregation_source").([]interface{}) + if len(organization_aggregation_sources) > 0 { + req.OrganizationAggregationSource = expandConfigOrganizationAggregationSource(organization_aggregation_sources[0].(map[string]interface{})) + } + + _, err := conn.PutConfigurationAggregator(req) + if err != nil { + return fmt.Errorf("Error creating aggregator: %s", err) + } + + d.SetId(strings.ToLower(name)) + + return resourceAwsConfigAggregatorRead(d, meta) +} + +func resourceAwsConfigAggregatorRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + req := &configservice.DescribeConfigurationAggregatorsInput{ + ConfigurationAggregatorNames: []*string{aws.String(d.Id())}, + } + + res, err := conn.DescribeConfigurationAggregators(req) + if err != nil { + if isAWSErr(err, configservice.ErrCodeNoSuchConfigurationAggregatorException, "") { + log.Printf("[WARN] No such configuration aggregator (%s), removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if len(res.ConfigurationAggregators) == 0 { + log.Printf("[WARN] No aggregators returned (%s), removing from state", d.Id()) + d.SetId("") + return nil + } + + aggregator := res.ConfigurationAggregators[0] + d.Set("arn", aggregator.ConfigurationAggregatorArn) + d.Set("name", aggregator.ConfigurationAggregatorName) + + if aggregator.AccountAggregationSources != nil { + d.Set("account_aggregation_source", flattenConfigAccountAggregationSources(aggregator.AccountAggregationSources)) + } else { + d.Set("account_aggregation_source", nil) + } + + if aggregator.OrganizationAggregationSource != nil { + d.Set("organization_aggregation_source", flattenConfigOrganizationAggregationSource(aggregator.OrganizationAggregationSource)) + } else { + d.Set("organization_aggregation_source", nil) + } + + return nil +} + +func resourceAwsConfigAggregatorDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).configconn + + req := &configservice.DeleteConfigurationAggregatorInput{ + ConfigurationAggregatorName: aws.String(d.Id()), + } + _, err := conn.DeleteConfigurationAggregator(req) + if err != nil { + return err + } + + d.SetId("") + return nil +} diff --git a/aws/resource_aws_config_aggregator_test.go b/aws/resource_aws_config_aggregator_test.go new file mode 100644 index 00000000000..5aef0c74afb --- /dev/null +++ b/aws/resource_aws_config_aggregator_test.go @@ -0,0 +1,257 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/configservice" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_config_aggregator", &resource.Sweeper{ + Name: "aws_config_aggregator", + F: testSweepConfigAggregators, + }) +} + +func testSweepConfigAggregators(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("Error getting client: %s", err) + } + conn := client.(*AWSClient).configconn + + resp, err := conn.DescribeConfigurationAggregators(&configservice.DescribeConfigurationAggregatorsInput{}) + if err != nil { + return fmt.Errorf("Error retrieving config aggregators: %s", err) + } + + if len(resp.ConfigurationAggregators) == 0 { + log.Print("[DEBUG] No config aggregators to sweep") + return nil + } + + log.Printf("[INFO] Found %d config aggregators", len(resp.ConfigurationAggregators)) + + for _, agg := range resp.ConfigurationAggregators { + if !strings.HasPrefix(*agg.ConfigurationAggregatorName, "tf-") { + continue + } + + log.Printf("[INFO] Deleting config aggregator %s", *agg.ConfigurationAggregatorName) + _, err := conn.DeleteConfigurationAggregator(&configservice.DeleteConfigurationAggregatorInput{ + ConfigurationAggregatorName: agg.ConfigurationAggregatorName, + }) + + if err != nil { + return fmt.Errorf("Error deleting config aggregator %s: %s", *agg.ConfigurationAggregatorName, err) + } + } + + return nil +} + +func TestAccConfigAggregator_account(t *testing.T) { + var ca configservice.ConfigurationAggregator + rString := acctest.RandString(10) + expectedName := fmt.Sprintf("tf-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckConfigAggregatorDestroy, + Steps: []resource.TestStep{ + { + Config: testAccConfigAggregatorConfig_account(rString), + Check: resource.ComposeTestCheckFunc( + testAccCheckConfigAggregatorExists("aws_config_aggregator.example", &ca), + testAccCheckConfigAggregatorName("aws_config_aggregator.example", expectedName, &ca), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "name", expectedName), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "account_aggregation_source.#", "1"), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "account_aggregation_source.0.account_ids.#", "1"), + resource.TestMatchResourceAttr("aws_config_aggregator.example", "account_aggregation_source.0.account_ids.0", regexp.MustCompile("^\\d{12}$")), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "account_aggregation_source.0.regions.#", "1"), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "account_aggregation_source.0.regions.0", "us-west-2"), + ), + }, + }, + }) +} + +func TestAccConfigAggregator_organization(t *testing.T) { + var ca configservice.ConfigurationAggregator + rString := acctest.RandString(10) + expectedName := fmt.Sprintf("tf-%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckConfigAggregatorDestroy, + Steps: []resource.TestStep{ + { + Config: testAccConfigAggregatorConfig_organization(rString), + Check: resource.ComposeTestCheckFunc( + testAccCheckConfigAggregatorExists("aws_config_aggregator.example", &ca), + testAccCheckConfigAggregatorName("aws_config_aggregator.example", expectedName, &ca), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "name", expectedName), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "organization_aggregation_source.#", "1"), + resource.TestMatchResourceAttr("aws_config_aggregator.example", "organization_aggregation_source.0.role_arn", regexp.MustCompile("^arn:aws:iam::\\d+:role/")), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "organization_aggregation_source.0.all_regions", "true"), + ), + }, + }, + }) +} + +func TestAccConfigAggregator_switch(t *testing.T) { + rString := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckConfigAggregatorDestroy, + Steps: []resource.TestStep{ + { + Config: testAccConfigAggregatorConfig_account(rString), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_config_aggregator.example", "account_aggregation_source.#", "1"), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "organization_aggregation_source.#", "0"), + ), + }, + { + Config: testAccConfigAggregatorConfig_organization(rString), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_config_aggregator.example", "account_aggregation_source.#", "0"), + resource.TestCheckResourceAttr("aws_config_aggregator.example", "organization_aggregation_source.#", "1"), + ), + }, + }, + }) +} + +func testAccCheckConfigAggregatorName(n, desired string, obj *configservice.ConfigurationAggregator) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + if rs.Primary.Attributes["name"] != *obj.ConfigurationAggregatorName { + return fmt.Errorf("Expected name: %q, given: %q", desired, *obj.ConfigurationAggregatorName) + } + return nil + } +} + +func testAccCheckConfigAggregatorExists(n string, obj *configservice.ConfigurationAggregator) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not Found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No config aggregator ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).configconn + out, err := conn.DescribeConfigurationAggregators(&configservice.DescribeConfigurationAggregatorsInput{ + ConfigurationAggregatorNames: []*string{aws.String(rs.Primary.Attributes["name"])}, + }) + if err != nil { + return fmt.Errorf("Failed to describe config aggregator: %s", err) + } + if len(out.ConfigurationAggregators) < 1 { + return fmt.Errorf("No config aggregator found when describing %q", rs.Primary.Attributes["name"]) + } + + ca := out.ConfigurationAggregators[0] + *obj = *ca + + return nil + } +} + +func testAccCheckConfigAggregatorDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).configconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_config_aggregator" { + continue + } + + resp, err := conn.DescribeConfigurationAggregators(&configservice.DescribeConfigurationAggregatorsInput{ + ConfigurationAggregatorNames: []*string{aws.String(rs.Primary.Attributes["name"])}, + }) + + if err == nil { + if len(resp.ConfigurationAggregators) != 0 && + *resp.ConfigurationAggregators[0].ConfigurationAggregatorName == rs.Primary.Attributes["name"] { + return fmt.Errorf("config aggregator still exists: %s", rs.Primary.Attributes["name"]) + } + } + } + + return nil +} + +func testAccConfigAggregatorConfig_account(rString string) string { + return fmt.Sprintf(` +resource "aws_config_aggregator" "example" { + name = "tf-%s" + + account_aggregation_source { + account_ids = ["${data.aws_caller_identity.current.account_id}"] + regions = ["us-west-2"] + } +} + +data "aws_caller_identity" "current" {} +`, rString) +} + +func testAccConfigAggregatorConfig_organization(rString string) string { + return fmt.Sprintf(` +resource "aws_config_aggregator" "example" { + depends_on = ["aws_iam_role_policy_attachment.example"] + + name = "tf-%s" + + organization_aggregation_source { + all_regions = true + role_arn = "${aws_iam_role.example.arn}" + } +} + +resource "aws_iam_role" "example" { + name = "tf-%s" + + assume_role_policy = < 0 { + source.AccountIds = expandStringList(accountIDs) + } + } + + if v, ok := detail["regions"]; ok { + regions := v.([]interface{}) + if len(regions) > 0 { + source.AwsRegions = expandStringList(regions) + } + } + + results = append(results, &source) + } + return results +} + +func expandConfigOrganizationAggregationSource(configured map[string]interface{}) *configservice.OrganizationAggregationSource { + source := configservice.OrganizationAggregationSource{ + AllAwsRegions: aws.Bool(configured["all_regions"].(bool)), + RoleArn: aws.String(configured["role_arn"].(string)), + } + + if v, ok := configured["regions"]; ok { + regions := v.([]interface{}) + if len(regions) > 0 { + source.AwsRegions = expandStringList(regions) + } + } + + return &source +} + +func flattenConfigAccountAggregationSources(sources []*configservice.AccountAggregationSource) []interface{} { + source := sources[0] + var result []interface{} + m := make(map[string]interface{}) + m["account_ids"] = flattenStringList(source.AccountIds) + m["all_regions"] = *source.AllAwsRegions + m["regions"] = flattenStringList(source.AwsRegions) + result = append(result, m) + return result +} + +func flattenConfigOrganizationAggregationSource(source *configservice.OrganizationAggregationSource) []interface{} { + var result []interface{} + m := make(map[string]interface{}) + m["all_regions"] = *source.AllAwsRegions + m["regions"] = flattenStringList(source.AwsRegions) + m["role_arn"] = *source.RoleArn + result = append(result, m) + return result +} + func flattenConfigRuleSource(source *configservice.Source) []interface{} { var result []interface{} m := make(map[string]interface{}) diff --git a/website/aws.erb b/website/aws.erb index 8f1f078d61c..fb0037d9f46 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -584,6 +584,10 @@ Config Resources + > + CloudHSM v2 Resources + + + > CloudTrail Resources From 0f631b83674884210dce911ea1c4c1b959a31721 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 25 Apr 2018 16:37:32 -0400 Subject: [PATCH 0820/3316] docs/resource/aws_secretsmanager_secret: Link to AWS documentation for secrets rotation --- website/docs/r/secretsmanager_secret.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/secretsmanager_secret.html.markdown b/website/docs/r/secretsmanager_secret.html.markdown index 909c977157f..6499e8233dc 100644 --- a/website/docs/r/secretsmanager_secret.html.markdown +++ b/website/docs/r/secretsmanager_secret.html.markdown @@ -22,6 +22,8 @@ resource "aws_secretsmanager_secret" "example" { ### Rotation Configuration +To enable automatic secret rotation, the Secrets Manager service requires usage of a Lambda function. The [Rotate Secrets section in the Secrets Manager User Guide](https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html) provides additional information about deploying a prebuilt Lambda functions for supported credential rotation (e.g. RDS) or deploying a custom Lambda function. + ~> **NOTE:** Configuring rotation causes the secret to rotate once as soon as you store the secret. Before you do this, you must ensure that all of your applications that use the credentials stored in the secret are updated to retrieve the secret from AWS Secrets Manager. The old credentials might no longer be usable after the initial rotation and any applications that you fail to update will break as soon as the old credentials are no longer valid. ~> **NOTE:** If you cancel a rotation that is in progress (by removing the `rotation` configuration), it can leave the VersionStage labels in an unexpected state. Depending on what step of the rotation was in progress, you might need to remove the staging label AWSPENDING from the partially created version, specified by the SecretVersionId response value. You should also evaluate the partially rotated new version to see if it should be deleted, which you can do by removing all staging labels from the new version's VersionStage field. From f8886c4df3bb23beff7eb4f02d92a447d3667f92 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 25 Apr 2018 17:43:33 -0400 Subject: [PATCH 0821/3316] Update CHANGELOG for #4341 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bcbe64f0ad..bcbc36746ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.17.0 (Unreleased) + +BUG FIXES: + +* resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one #4341 + ## 1.16.0 (April 25, 2018) FEATURES: From a788bdff399ed7a521da71bf9ce8d9a8f366cfba Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 25 Apr 2018 17:44:15 -0400 Subject: [PATCH 0822/3316] Fix 4341 link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcbc36746ca..e02a2b36e9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ BUG FIXES: -* resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one #4341 +* resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] ## 1.16.0 (April 25, 2018) From b91792d24392679f1ba8796e4f39a4514ff18d0d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 25 Apr 2018 17:50:22 -0400 Subject: [PATCH 0823/3316] Update CHANGELOG for #4336 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e02a2b36e9a..c512700ab7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.17.0 (Unreleased) +ENHANCEMENTS: + +* data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] + BUG FIXES: * resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] From ba3e4beeec13c8a98065ea11c2b62ba4d760b5d5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 25 Apr 2018 17:52:06 -0400 Subject: [PATCH 0824/3316] docs/data-source/aws_route53_zone: Add name_servers attribute --- website/docs/d/route53_zone.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/d/route53_zone.html.markdown b/website/docs/d/route53_zone.html.markdown index d3d82855cbb..74a939bb95e 100644 --- a/website/docs/d/route53_zone.html.markdown +++ b/website/docs/d/route53_zone.html.markdown @@ -56,4 +56,5 @@ The following attribute is additionally exported: * `caller_reference` - Caller Reference of the Hosted Zone. * `comment` - The comment field of the Hosted Zone. +* `name_servers` - The list of DNS name servers for the Hosted Zone. * `resource_record_set_count` - the number of Record Set in the Hosted Zone From c843e2725fce3d64bfd36c19bae18cb9809828a9 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Wed, 25 Apr 2018 17:07:53 -0500 Subject: [PATCH 0825/3316] Added S3 import stuff to aurora --- aws/resource_aws_rds_cluster.go | 130 +++++++++++++++++++++++++ aws/resource_aws_rds_cluster_test.go | 137 +++++++++++++++++++++++++++ 2 files changed, 267 insertions(+) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 141d77b8c3c..461c4d19e0c 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -124,6 +124,45 @@ func resourceAwsRDSCluster() *schema.Resource { ForceNew: true, }, + "s3_import": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{ + "snapshot_identifier", + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bucket_prefix": { + Type: schema.TypeString, + Required: false, + Optional: true, + ForceNew: true, + }, + "ingestion_role": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_engine": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_engine_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + }, + }, + "final_snapshot_identifier": { Type: schema.TypeString, Optional: true, @@ -432,6 +471,97 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) + } else if v, ok := d.GetOk("s3_import"); ok { + if _, ok := d.GetOk("master_password"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "password": required field is not set`, d.Get("name").(string)) + } + if _, ok := d.GetOk("master_username"); !ok { + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "username": required field is not set`, d.Get("name").(string)) + } + s3_bucket := v.([]interface{})[0].(map[string]interface{}) + createOpts := &rds.RestoreDBClusterFromS3Input{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + MasterUsername: aws.String(d.Get("master_username").(string)), + MasterUserPassword: aws.String(d.Get("master_password").(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + Tags: tags, + S3BucketName: aws.String(s3_bucket["bucket_name"].(string)), + S3IngestionRoleArn: aws.String(s3_bucket["ingestion_role"].(string)), + S3Prefix: aws.String(s3_bucket["bucket_prefix"].(string)), + SourceEngine: aws.String(s3_bucket["source_engine"].(string)), + SourceEngineVersion: aws.String(s3_bucket["source_engine_version"].(string)), + } + + if v := d.Get("database_name"); v.(string) != "" { + createOpts.DatabaseName = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("port"); ok { + createOpts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + createOpts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + createOpts.AvailabilityZones = expandStringList(attr.List()) + } + + if v, ok := d.GetOk("backup_retention_period"); ok { + createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("preferred_backup_window"); ok { + createOpts.PreferredBackupWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("preferred_maintenance_window"); ok { + createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("kms_key_id"); ok { + createOpts.KmsKeyId = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { + createOpts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) + } + + log.Printf("[DEBUG] RDS Cluster restore options: %s", createOpts) + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + resp, err := conn.RestoreDBClusterFromS3(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "S3_SNAPSHOT_INGESTION") { + return resource.RetryableError(err) + } + if isAWSErr(err, "InvalidParameterValue", "S3 bucket cannot be found") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) + return nil + }) + + if err != nil { + log.Printf("[ERROR] Error creating RDS Cluster: %s", err) + return err + } + } else { if _, ok := d.GetOk("master_password"); !ok { return fmt.Errorf(`provider.aws: aws_rds_cluster: %s: "master_password": required field is not set`, d.Get("database_name").(string)) diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index 6ee245f1c32..68ac21dea1d 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -64,6 +64,29 @@ func TestAccAWSRDSCluster_namePrefix(t *testing.T) { }) } +func TestAccAWSRDSCluster_s3Restore(t *testing.T) { + var v rds.DBCluster + resourceName := "aws_rds_cluster.test" + bucket := acctest.RandomWithPrefix("tf-acc-test") + uniqueId := acctest.RandomWithPrefix("tf-acc-s3-import-test") + bucketPrefix := acctest.RandString(5) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSClusterConfig_s3Restore(bucket, bucketPrefix, uniqueId), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists("aws_rds_cluster.test", &v), + resource.TestCheckResourceAttr(resourceName, "engine", "aurora"), + ), + }, + }, + }) +} + func TestAccAWSRDSCluster_generatedName(t *testing.T) { var v rds.DBCluster @@ -554,6 +577,120 @@ resource "aws_db_subnet_group" "test" { `, n) } +func testAccAWSClusterConfig_s3Restore(bucketName string, bucketPrefix string, uniqueId string) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "xtrabackup" { + bucket = "%s" +} + +resource "aws_s3_bucket_object" "xtrabackup_db" { + bucket = "${aws_s3_bucket.xtrabackup.id}" + key = "%s/mysql-5-6-xtrabackup.tar.gz" + source = "../files/mysql-5-6-xtrabackup.tar.gz" + etag = "${md5(file("../files/mysql-5-6-xtrabackup.tar.gz"))}" +} + + + +resource "aws_iam_role" "rds_s3_access_role" { + name = "%s-role" + assume_role_policy = < Date: Wed, 25 Apr 2018 18:30:08 -0400 Subject: [PATCH 0826/3316] Update CHANGELOG for #4324 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c512700ab7c..cab218441cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] +* resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] BUG FIXES: From 512ab12278960e18be4c86d47833d7a954be9599 Mon Sep 17 00:00:00 2001 From: ksuzuki Date: Thu, 26 Apr 2018 10:21:34 +0900 Subject: [PATCH 0827/3316] clean for now --- aws/resource_aws_guardduty_invite.go | 12 ++++---- aws/resource_aws_guardduty_invite_test.go | 36 +++-------------------- 2 files changed, 11 insertions(+), 37 deletions(-) diff --git a/aws/resource_aws_guardduty_invite.go b/aws/resource_aws_guardduty_invite.go index 781a278f358..9e3015f87a5 100644 --- a/aws/resource_aws_guardduty_invite.go +++ b/aws/resource_aws_guardduty_invite.go @@ -39,15 +39,15 @@ func resourceAwsGuardDutyInvite() *schema.Resource { func resourceAwsGuardDutyInviteCreate(d* schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).guarddutyconn + detectorId := d.Get("detector_id").(string) + accountIds := d.Get("account_ids").([]string) params := &guardduty.InviteMembersInput{ - DetectorId: aws.String(d.Get("detector_id").(string)), + DetectorId: aws.String(detectorId), + AccountIds: aws.StringSlice(accountIds), Message: aws.String(d.Get("message").(string)), } - accountIds := d.Get("account_ids").([]string) - params.AccountIds = aws.StringSlice(accountIds) - log.Printf("[DEBUG] GuardDuty Invite Members: %#v", params) resp, err := conn.InviteMembers(params) @@ -55,6 +55,8 @@ func resourceAwsGuardDutyInviteCreate(d* schema.ResourceData, meta interface{}) return fmt.Errorf("Inviting GuardDuty Member failed: %s", err) } + d.SetId("") + for _, accountID := range accountIds { for _, unprocessedAccount := range resp.UnprocessedAccounts { if accountID == *unprocessedAccount.AccountId { @@ -68,12 +70,12 @@ func resourceAwsGuardDutyInviteCreate(d* schema.ResourceData, meta interface{}) return err } } - d.SetId() return nil } func resourceAwsGuardDutyInviteRead(d *schema.ResourceData, meta interface{}) error { + //TODO Do something? return nil } diff --git a/aws/resource_aws_guardduty_invite_test.go b/aws/resource_aws_guardduty_invite_test.go index 42c7349f479..ae5e16d9213 100644 --- a/aws/resource_aws_guardduty_invite_test.go +++ b/aws/resource_aws_guardduty_invite_test.go @@ -4,8 +4,6 @@ import ( "testing" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" - "github.com/aws/aws-sdk-go/service/guardduty" - "github.com/aws/aws-sdk-go/aws" "fmt" ) @@ -38,44 +36,18 @@ func testACCAwsGuardDutyInvite_basic(t *testing.T) { func testAccCheckAwsGuardDutyInviteExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] + _, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } - accountID, detectorID, message, err := decodeGuardDutyInviteID(rs.Primary.ID) - if err != nil { - return err - } - - input := &guardduty.InviteMembersInput{ - DetectorId: aws.String(detectorID), - AccountIds: []*string{aws.String(accountID)}, - Message: aws.String(message), - } - - conn := testAccProvider.Meta().(*AWSClient).guarddutyconn - imo, err := conn.InviteMembers(input) - if err != nil { - return err - } - - if len(imo.UnprocessedAccounts) >0 { - return fmt.Errorf("Not found: %s", name) - } + //TODO Write test return nil } } func testAccGuardDutyInviteConfig_basic(accountID, email, message string) string { - return fmt.Sprintf(` -%[1]s - -resource "aws_guardduty_member" "test" { - account_id = "%[2]s" - detector_id = "${aws_guardduty_detector.test.id}" - email = "%[3]s" -} -` , testAccGuardDutyDetectorConfig_basic1, accountID, email, message) + //TODO do something + return "Do Somthing" } \ No newline at end of file From 338fcec61bddcedd5d264632aeb9f05f559cea3e Mon Sep 17 00:00:00 2001 From: ksuzuki Date: Thu, 26 Apr 2018 12:19:06 +0900 Subject: [PATCH 0828/3316] add attribute - unprocessed accounts --- aws/resource_aws_guardduty_invite.go | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_guardduty_invite.go b/aws/resource_aws_guardduty_invite.go index 9e3015f87a5..766c8ab8b90 100644 --- a/aws/resource_aws_guardduty_invite.go +++ b/aws/resource_aws_guardduty_invite.go @@ -33,6 +33,10 @@ func resourceAwsGuardDutyInvite() *schema.Resource { Type: schema.TypeString, Required: false, }, + "unprocessed_accounts": { + Type: schema.TypeMap, + Computed: true, + }, }, } } @@ -55,22 +59,15 @@ func resourceAwsGuardDutyInviteCreate(d* schema.ResourceData, meta interface{}) return fmt.Errorf("Inviting GuardDuty Member failed: %s", err) } - d.SetId("") - - for _, accountID := range accountIds { - for _, unprocessedAccount := range resp.UnprocessedAccounts { - if accountID == *unprocessedAccount.AccountId { - d.Set("unprocessed_reason", unprocessedAccount.Result) - } - } - err := resourceAwsGuardDutyMemberRead(d, meta) - - if err != nil { - return err - } + unprocessedAccounts := make(map[string]string, len(resp.UnprocessedAccounts)) + for _, unprocessedAccount := range resp.UnprocessedAccounts { + unprocessedAccounts[*unprocessedAccount.AccountId] = *unprocessedAccount.Result } + d.SetId(detectorId) + d.Set("unprocessed_accounts", unprocessedAccounts) + return nil } From d59b888905b8233a7090af6d4cdd3a7b916abee3 Mon Sep 17 00:00:00 2001 From: ksuzuki Date: Thu, 26 Apr 2018 12:25:52 +0900 Subject: [PATCH 0829/3316] add deleting method --- aws/resource_aws_guardduty_invite.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_guardduty_invite.go b/aws/resource_aws_guardduty_invite.go index 766c8ab8b90..79b46cb00eb 100644 --- a/aws/resource_aws_guardduty_invite.go +++ b/aws/resource_aws_guardduty_invite.go @@ -59,7 +59,6 @@ func resourceAwsGuardDutyInviteCreate(d* schema.ResourceData, meta interface{}) return fmt.Errorf("Inviting GuardDuty Member failed: %s", err) } - unprocessedAccounts := make(map[string]string, len(resp.UnprocessedAccounts)) for _, unprocessedAccount := range resp.UnprocessedAccounts { unprocessedAccounts[*unprocessedAccount.AccountId] = *unprocessedAccount.Result @@ -77,6 +76,18 @@ func resourceAwsGuardDutyInviteRead(d *schema.ResourceData, meta interface{}) er } func resourceAwsGuardDutyInviteDelete(d* schema.ResourceData, meta interface{}) error { - d.SetId("") + conn := meta.(*AWSClient).guarddutyconn + + params := &guardduty.DeleteInvitationsInput{ + AccountIds: aws.StringSlice(d.Get("account_ids").([]string), + } + + log.Printf("[DEBUG] GuardDuty Delete Invitations: %#v", params) + _, err := conn.DeleteInvitations(params) + + if err != nil { + return fmt.Errorf("Deleting GuardDuty Invitations '%s' failed: %s", d.Id(), err.Error()) + } + return nil } \ No newline at end of file From 39cc93251a095b53de2663d767f84e972ddbc8ce Mon Sep 17 00:00:00 2001 From: ksuzuki Date: Thu, 26 Apr 2018 12:28:38 +0900 Subject: [PATCH 0830/3316] fix typo --- aws/resource_aws_guardduty_invite.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_guardduty_invite.go b/aws/resource_aws_guardduty_invite.go index 79b46cb00eb..31b09da0bed 100644 --- a/aws/resource_aws_guardduty_invite.go +++ b/aws/resource_aws_guardduty_invite.go @@ -44,11 +44,10 @@ func resourceAwsGuardDutyInvite() *schema.Resource { func resourceAwsGuardDutyInviteCreate(d* schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).guarddutyconn detectorId := d.Get("detector_id").(string) - accountIds := d.Get("account_ids").([]string) params := &guardduty.InviteMembersInput{ DetectorId: aws.String(detectorId), - AccountIds: aws.StringSlice(accountIds), + AccountIds: aws.StringSlice(d.Get("account_ids").([]string)), Message: aws.String(d.Get("message").(string)), } @@ -79,7 +78,7 @@ func resourceAwsGuardDutyInviteDelete(d* schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).guarddutyconn params := &guardduty.DeleteInvitationsInput{ - AccountIds: aws.StringSlice(d.Get("account_ids").([]string), + AccountIds: aws.StringSlice(d.Get("account_ids").([]string)), } log.Printf("[DEBUG] GuardDuty Delete Invitations: %#v", params) From 3dee777c4d57fe50289fb443683e8bc2adb5a049 Mon Sep 17 00:00:00 2001 From: Will May Date: Thu, 26 Apr 2018 08:08:15 +0100 Subject: [PATCH 0831/3316] Changes from code review --- aws/resource_aws_dynamodb_table.go | 48 ++++++++++++++++----- aws/resource_aws_dynamodb_table_test.go | 10 +++-- aws/structure.go | 15 +++++++ website/docs/r/dynamodb_table.html.markdown | 6 ++- 4 files changed, 65 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_dynamodb_table.go b/aws/resource_aws_dynamodb_table.go index 4aff5c5a840..d82c3ef4723 100644 --- a/aws/resource_aws_dynamodb_table.go +++ b/aws/resource_aws_dynamodb_table.go @@ -2,6 +2,7 @@ package aws import ( "bytes" + "errors" "fmt" "log" "strings" @@ -42,12 +43,21 @@ func resourceAwsDynamoDbTable() *schema.Resource { func(diff *schema.ResourceDiff, v interface{}) error { if diff.Id() != "" && diff.HasChange("server_side_encryption") { o, n := diff.GetChange("server_side_encryption") - if isDynamoDbTableSSEDisabled(o) && isDynamoDbTableSSEDisabled(n) { + if isDynamoDbTableOptionDisabled(o) && isDynamoDbTableOptionDisabled(n) { return diff.Clear("server_side_encryption") } } return nil }, + func(diff *schema.ResourceDiff, v interface{}) error { + if diff.Id() != "" && diff.HasChange("point_in_time_recovery") { + o, n := diff.GetChange("point_in_time_recovery") + if isDynamoDbTableOptionDisabled(o) && isDynamoDbTableOptionDisabled(n) { + return diff.Clear("point_in_time_recovery") + } + } + return nil + }, ), SchemaVersion: 1, @@ -238,9 +248,19 @@ func resourceAwsDynamoDbTable() *schema.Resource { }, }, "tags": tagsSchema(), - "point_in_time_backup_enabled": { - Type: schema.TypeBool, + "point_in_time_recovery": { + Type: schema.TypeList, Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + }, + }, }, }, } @@ -452,9 +472,12 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er } } - if d.HasChange("point_in_time_backup_enabled") { - if err := updateDynamoDbPITR(d, conn); err != nil { - return err + if d.HasChange("point_in_time_recovery") { + _, enabled := d.GetChange("point_in_time_recovery.0.enabled") + if !d.IsNewResource() || enabled.(bool) { + if err := updateDynamoDbPITR(d, conn); err != nil { + return err + } } } @@ -501,11 +524,13 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro } d.Set("tags", tags) - backupEnabled, err := readDynamoDbPITR(d.Id(), conn) + pitrOut, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ + TableName: aws.String(d.Id()), + }) if err != nil { return err } - d.Set("point_in_time_backup_enabled", backupEnabled) + d.Set("point_in_time_recovery", flattenDynamoDbPitr(pitrOut)) return nil } @@ -625,7 +650,7 @@ func updateDynamoDbTimeToLive(d *schema.ResourceData, conn *dynamodb.DynamoDB) e } func updateDynamoDbPITR(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { - toEnable := d.Get("point_in_time_backup_enabled").(bool) + toEnable := d.Get("point_in_time_recovery.0.enabled").(bool) input := &dynamodb.UpdateContinuousBackupsInput{ TableName: aws.String(d.Id()), @@ -806,6 +831,9 @@ func waitForDynamoDbBackupUpdateToBeCompleted(tableName string, toEnable bool, c return 42, "", err } + if result.ContinuousBackupsDescription == nil || result.ContinuousBackupsDescription.PointInTimeRecoveryDescription == nil { + return 42, "", errors.New("Error reading backup status from dynamodb resource: empty description") + } pitr := result.ContinuousBackupsDescription.PointInTimeRecoveryDescription return result, *pitr.PointInTimeRecoveryStatus, nil @@ -852,7 +880,7 @@ func waitForDynamoDbTtlUpdateToBeCompleted(tableName string, toEnable bool, conn return err } -func isDynamoDbTableSSEDisabled(v interface{}) bool { +func isDynamoDbTableOptionDisabled(v interface{}) bool { options := v.([]interface{}) if len(options) == 0 { return true diff --git a/aws/resource_aws_dynamodb_table_test.go b/aws/resource_aws_dynamodb_table_test.go index 27b2384fa35..fb97cd497ac 100644 --- a/aws/resource_aws_dynamodb_table_test.go +++ b/aws/resource_aws_dynamodb_table_test.go @@ -399,7 +399,9 @@ func TestAccAWSDynamoDbTable_enablePitr(t *testing.T) { { Config: testAccAWSDynamoDbConfig_backup(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckDynamoDbTableHasBackup("aws_dynamodb_table.basic-dynamodb-table"), + testAccCheckDynamoDbTableHasPointInTimeRecoveryEnabled("aws_dynamodb_table.basic-dynamodb-table"), + resource.TestCheckResourceAttr("aws_dynamodb_table.basic-dynamodb-table", "point_in_time_recovery.#", "1"), + resource.TestCheckResourceAttr("aws_dynamodb_table.basic-dynamodb-table", "point_in_time_recovery.0.enabled", "true"), ), }, }, @@ -964,7 +966,7 @@ func testAccCheckInitialAWSDynamoDbTableConf(n string) resource.TestCheckFunc { } } -func testAccCheckDynamoDbTableHasBackup(n string) resource.TestCheckFunc { +func testAccCheckDynamoDbTableHasPointInTimeRecoveryEnabled(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -1108,7 +1110,9 @@ resource "aws_dynamodb_table" "basic-dynamodb-table" { name = "TestTableHashKey" type = "S" } - point_in_time_backup_enabled = true + point_in_time_recovery { + enabled = true + } } `, rName) } diff --git a/aws/structure.go b/aws/structure.go index 4cf4a123270..1fb43e9eea8 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -3650,6 +3650,21 @@ func flattenDynamoDbTtl(ttlDesc *dynamodb.TimeToLiveDescription) []interface{} { return []interface{}{} } +func flattenDynamoDbPitr(pitrDesc *dynamodb.DescribeContinuousBackupsOutput) []interface{} { + m := map[string]interface{}{} + if pitrDesc.ContinuousBackupsDescription != nil { + pitr := pitrDesc.ContinuousBackupsDescription.PointInTimeRecoveryDescription + if pitr != nil { + m["enabled"] = (*pitr.PointInTimeRecoveryStatus == dynamodb.PointInTimeRecoveryStatusEnabled) + } + } + if len(m) > 0 { + return []interface{}{m} + } + + return []interface{}{m} +} + func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.TableDescription) error { d.Set("write_capacity", table.ProvisionedThroughput.WriteCapacityUnits) d.Set("read_capacity", table.ProvisionedThroughput.ReadCapacityUnits) diff --git a/website/docs/r/dynamodb_table.html.markdown b/website/docs/r/dynamodb_table.html.markdown index 8158887ba43..7659db6e5f9 100644 --- a/website/docs/r/dynamodb_table.html.markdown +++ b/website/docs/r/dynamodb_table.html.markdown @@ -90,7 +90,7 @@ attributes, etc. * `stream_view_type` - (Optional) When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are `KEYS_ONLY`, `NEW_IMAGE`, `OLD_IMAGE`, `NEW_AND_OLD_IMAGES`. * `server_side_encryption` - (Optional) Encrypt at rest options. * `tags` - (Optional) A map of tags to populate on the created table. -* `point_in_time_backup_enabled` - (Optional) Indicates whether point-in-time recovery is enabled (true) or disabled (false) - note that it can take a while to enable for new tables. +* `point_in_time_recovery` - (Optional) Point-in-time recovery options. ### Timeouts @@ -136,6 +136,10 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/d * `enabled` - (Required) Whether to enable encryption at rest. If the `server_side_encryption` block is not provided then this defaults to `false`. +#### `point_in_time_recovery` + +* `enabled` - (Required) Whether to enable point-in-time recovery - note that it can take up to 10 minutes to enable for new tables. If the `point_in_time_recovery` block is not provided then this defaults to `false`. + ### A note about attributes Only define attributes on the table object that are going to be used as: From ed5fe12ec54e841f9db1044173683a44124b2a6a Mon Sep 17 00:00:00 2001 From: Tom Janne Date: Thu, 26 Apr 2018 10:42:38 +0200 Subject: [PATCH 0832/3316] first version of AWS Cognito Resource Server --- aws/provider.go | 1 + aws/resource_aws_cognito_resource_server.go | 178 ++++++++++++++++++++ aws/structure.go | 37 ++++ aws/validators.go | 27 +++ 4 files changed, 243 insertions(+) create mode 100644 aws/resource_aws_cognito_resource_server.go diff --git a/aws/provider.go b/aws/provider.go index 281cbb31fd0..d6d7e854004 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -316,6 +316,7 @@ func Provider() terraform.ResourceProvider { "aws_cognito_user_pool": resourceAwsCognitoUserPool(), "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), + "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), "aws_codedeploy_app": resourceAwsCodeDeployApp(), diff --git a/aws/resource_aws_cognito_resource_server.go b/aws/resource_aws_cognito_resource_server.go new file mode 100644 index 00000000000..b686585323a --- /dev/null +++ b/aws/resource_aws_cognito_resource_server.go @@ -0,0 +1,178 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCognitoResourceServer() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCognitoResourceServerCreate, + Read: resourceAwsCognitoResourceServerRead, + Update: resourceAwsCognitoResourceServerUpdate, + Delete: resourceAwsCognitoResourceServerDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + // https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateResourceServer.html + Schema: map[string]*schema.Schema{ + "identifier": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "scope": { + Type: schema.TypeSet, + Optional: true, + MaxItems: 25, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scope_description": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCognitoResourceServerScopeDescription, + }, + "scope_name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateCognitoResourceServerScopeName, + }, + "scope_identifier": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "user_pool_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "scope_identifiers": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + } +} + +func resourceAwsCognitoResourceServerCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + params := &cognitoidentityprovider.CreateResourceServerInput{ + Identifier: aws.String(d.Get("identifier").(string)), + Name: aws.String(d.Get("name").(string)), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), + } + + if v, ok := d.GetOk("scope"); ok { + configs := v.(*schema.Set).List() + params.Scopes = expandCognitoResourceServerScope(configs) + } + + log.Printf("[DEBUG] Creating Cognito Resource Server: %s", params) + + resp, err := conn.CreateResourceServer(params) + + if err != nil { + return errwrap.Wrapf("Error creating Cognito Resource Server: {{err}}", err) + } + + d.SetId(*resp.ResourceServer.Identifier) + + return resourceAwsCognitoResourceServerRead(d, meta) +} + +func resourceAwsCognitoResourceServerRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + params := &cognitoidentityprovider.DescribeResourceServerInput{ + Identifier: aws.String(d.Id()), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), + } + + log.Printf("[DEBUG] Reading Cognito Resource Server: %s", params) + + resp, err := conn.DescribeResourceServer(params) + + if err != nil { + if isAWSErr(err, "ResourceNotFoundException", "") { + log.Printf("[WARN] Cognito Resource Server %s is already gone", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.SetId(*resp.ResourceServer.Identifier) + d.Set("name", *resp.ResourceServer.Name) + d.Set("user_pool_id", *resp.ResourceServer.UserPoolId) + + scopes := flattenCognitoResourceServerScope(*resp.ResourceServer.Identifier, resp.ResourceServer.Scopes) + if err := d.Set("scope", scopes); err != nil { + return fmt.Errorf("Failed setting schema: %s", err) + } + + var scope_identifiers []string + for _, elem := range scopes { + + scope_identifier := elem["scope_identifier"].(string) + scope_identifiers = append(scope_identifiers, scope_identifier) + } + d.Set("scope_identifiers", scope_identifiers) + return nil +} + +func resourceAwsCognitoResourceServerUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + params := &cognitoidentityprovider.UpdateResourceServerInput{ + Identifier: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), + } + + log.Printf("[DEBUG] Updating Cognito Resource Server: %s", params) + + _, err := conn.UpdateResourceServer(params) + if err != nil { + return errwrap.Wrapf("Error updating Cognito Resource Server: {{err}}", err) + } + + return resourceAwsCognitoResourceServerRead(d, meta) +} + +func resourceAwsCognitoResourceServerDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cognitoidpconn + + params := &cognitoidentityprovider.DeleteResourceServerInput{ + Identifier: aws.String(d.Id()), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), + } + + log.Printf("[DEBUG] Deleting Resource Server: %s", params) + + _, err := conn.DeleteResourceServer(params) + + if err != nil { + return errwrap.Wrapf("Error deleting Resource Server: {{err}}", err) + } + + return nil +} diff --git a/aws/structure.go b/aws/structure.go index 26b9c70afb6..7eba19194bd 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -2699,6 +2699,43 @@ func flattenCognitoUserPoolPasswordPolicy(s *cognitoidentityprovider.PasswordPol return []map[string]interface{}{} } +func expandCognitoResourceServerScope(inputs []interface{}) []*cognitoidentityprovider.ResourceServerScopeType { + configs := make([]*cognitoidentityprovider.ResourceServerScopeType, len(inputs), len(inputs)) + for i, input := range inputs { + param := input.(map[string]interface{}) + config := &cognitoidentityprovider.ResourceServerScopeType{} + + if v, ok := param["scope_description"]; ok { + config.ScopeDescription = aws.String(v.(string)) + } + + if v, ok := param["scope_name"]; ok { + config.ScopeName = aws.String(v.(string)) + } + + configs[i] = config + } + + return configs +} + +func flattenCognitoResourceServerScope(identifier string, inputs []*cognitoidentityprovider.ResourceServerScopeType) []map[string]interface{} { + values := make([]map[string]interface{}, 0) + + for _, input := range inputs { + if input == nil { + continue + } + var value = map[string]interface{}{ + "scope_name": aws.StringValue(input.ScopeName), + "scope_description": aws.StringValue(input.ScopeDescription), + "scope_identifier": strings.Join([]string{identifier, "/", aws.StringValue(input.ScopeName)}, ""), + } + values = append(values, value) + } + return values +} + func expandCognitoUserPoolSchema(inputs []interface{}) []*cognitoidentityprovider.SchemaAttributeType { configs := make([]*cognitoidentityprovider.SchemaAttributeType, len(inputs), len(inputs)) diff --git a/aws/validators.go b/aws/validators.go index a8a762a5e68..6f3e19c6ae5 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1386,6 +1386,33 @@ func validateCognitoUserPoolClientURL(v interface{}, k string) (ws []string, es return } +func validateCognitoResourceServerScopeDescription(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + if len(value) < 1 { + errors = append(errors, fmt.Errorf("%q cannot be less than 1 character", k)) + } + if len(value) > 256 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 256 character", k)) + } + return +} + +func validateCognitoResourceServerScopeName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + if len(value) < 1 { + errors = append(errors, fmt.Errorf("%q cannot be less than 1 character", k)) + } + if len(value) > 256 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 256 character", k)) + } + if !regexp.MustCompile(`[\x21\x23-\x2E\x30-\x5B\x5D-\x7E]+`).MatchString(value) { + errors = append(errors, fmt.Errorf("%q must satisfy regular expression pattern: [\\x21\\x23-\\x2E\\x30-\\x5B\\x5D-\\x7E]+", k)) + } + return +} + func validateWafMetricName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[0-9A-Za-z]+$`).MatchString(value) { From d46899409b178061621b72133c9a963274639e69 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 06:16:20 -0400 Subject: [PATCH 0833/3316] Update CHANGELOG for #4305 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cab218441cc..a24e8967c05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] +* resource/aws_autoscaling_group: Add `launch_template` argument [GH-4305] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] BUG FIXES: From 24bca471b59520e19075b488cfd5342757cb5c25 Mon Sep 17 00:00:00 2001 From: Artem Iarmoliuk Date: Wed, 25 Apr 2018 20:05:25 +0300 Subject: [PATCH 0834/3316] r/launch_template: Document base64 user-data --- website/docs/r/launch_template.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/launch_template.html.markdown b/website/docs/r/launch_template.html.markdown index d5a55beea3f..a4af2a67c97 100644 --- a/website/docs/r/launch_template.html.markdown +++ b/website/docs/r/launch_template.html.markdown @@ -113,7 +113,7 @@ The following arguments are supported: `vpc_security_group_ids` instead. * `vpc_security_group_ids` - A list of security group IDs to associate with. * `tag_specifications` - The tags to apply to the resources during launch. See [Tags](#tags) below for more details. -* `user_data` - The user data to provide when launching the instance. +* `user_data` - The Base64-encoded user data to provide when launching the instance. ### Block devices From 1e0856796b6a81239528630a1b533d82fc1ec919 Mon Sep 17 00:00:00 2001 From: Artem Iarmoliuk Date: Wed, 25 Apr 2018 20:07:17 +0300 Subject: [PATCH 0835/3316] r/launch_template: Fix iops --- aws/resource_aws_launch_template.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index bed22574eab..95d61d7dd91 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -89,6 +89,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "iops": { Type: schema.TypeInt, + Computed: true, Optional: true, }, "kms_key_id": { @@ -916,8 +917,8 @@ func readEbsBlockDeviceFromConfig(ebs map[string]interface{}) *ec2.LaunchTemplat ebsDevice.Encrypted = aws.Bool(v.(bool)) } - if v := ebs["iops"]; v != nil { - ebsDevice.Iops = aws.Int64(int64(v.(int))) + if v := ebs["iops"].(int); v > 0 { + ebsDevice.Iops = aws.Int64(int64(v)) } if v := ebs["kms_key_id"].(string); v != "" { From 8fe9444385d7cf4bc52c67f54bd7af1aa28546a4 Mon Sep 17 00:00:00 2001 From: Artem Iarmoliuk Date: Wed, 25 Apr 2018 20:10:30 +0300 Subject: [PATCH 0836/3316] r/launch_template: Add validations and conflictswith --- aws/resource_aws_launch_template.go | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 95d61d7dd91..2497f717ba7 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -93,8 +93,9 @@ func resourceAwsLaunchTemplate() *schema.Resource { Optional: true, }, "kms_key_id": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, }, "snapshot_id": { Type: schema.TypeString, @@ -103,10 +104,12 @@ func resourceAwsLaunchTemplate() *schema.Resource { "volume_size": { Type: schema.TypeInt, Optional: true, + Computed: true, }, "volume_type": { Type: schema.TypeString, Optional: true, + Computed: true, }, }, }, @@ -159,8 +162,10 @@ func resourceAwsLaunchTemplate() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "arn": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"iam_instance_profile.0.name"}, + ValidateFunc: validateArn, }, "name": { Type: schema.TypeString, @@ -363,9 +368,10 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "security_group_names": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + ConflictsWith: []string{"vpc_security_group_ids"}, }, "vpc_security_group_ids": { From 928372fb61f5006c1f74088c58bfd2f4797c124e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 07:36:31 -0400 Subject: [PATCH 0837/3316] aws_instance: Bypass UnsupportedOperation errors with DescribeInstanceCreditSpecifications --- aws/data_source_aws_instance.go | 2 +- aws/resource_aws_instance.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aws/data_source_aws_instance.go b/aws/data_source_aws_instance.go index 865a950bea4..d2ff51ab772 100644 --- a/aws/data_source_aws_instance.go +++ b/aws/data_source_aws_instance.go @@ -407,7 +407,7 @@ func instanceDescriptionAttributes(d *schema.ResourceData, instance *ec2.Instanc } { creditSpecifications, err := getCreditSpecifications(conn, d.Id()) - if err != nil { + if err != nil && !isAWSErr(err, "UnsupportedOperation", "") { return err } if err := d.Set("credit_specification", creditSpecifications); err != nil { diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 225db4bac6d..41c7820dd0c 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -807,7 +807,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { } { creditSpecifications, err := getCreditSpecifications(conn, d.Id()) - if err != nil { + if err != nil && !isAWSErr(err, "UnsupportedOperation", "") { return err } if err := d.Set("credit_specification", creditSpecifications); err != nil { @@ -1899,10 +1899,10 @@ func getCreditSpecifications(conn *ec2.EC2, instanceId string) ([]map[string]int InstanceIds: []*string{aws.String(instanceId)}, }) if err != nil { - return nil, err + return creditSpecifications, err } - if attr.InstanceCreditSpecifications != nil { - creditSpecification["cpu_credits"] = *attr.InstanceCreditSpecifications[0].CpuCredits + if len(attr.InstanceCreditSpecifications) > 0 { + creditSpecification["cpu_credits"] = aws.StringValue(attr.InstanceCreditSpecifications[0].CpuCredits) creditSpecifications = append(creditSpecifications, creditSpecification) } From a579bac282584c95467e8fb3902db4d35f67cb56 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 07:48:17 -0400 Subject: [PATCH 0838/3316] tests/resource/aws_elasticache_cluster: Remove now extraneous plan-time validation checks for node_type --- aws/resource_aws_elasticache_cluster_test.go | 24 -------------------- 1 file changed, 24 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 3b14a6e5f77..5ab85254b03 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -477,18 +477,6 @@ func TestAccAWSElasticacheCluster_NodeTypeResize_Memcached_Ec2Classic(t *testing Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, Steps: []resource.TestStep{ - { - Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.t2.micro"), - ExpectError: regexp.MustCompile(`node_type "cache.t2.micro" can only be created in a VPC`), - }, - { - Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.t2.small"), - ExpectError: regexp.MustCompile(`node_type "cache.t2.small" can only be created in a VPC`), - }, - { - Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.t2.medium"), - ExpectError: regexp.MustCompile(`node_type "cache.t2.medium" can only be created in a VPC`), - }, { Config: testAccAWSElasticacheClusterConfig_NodeType_Memcached_Ec2Classic(rName, "cache.m3.medium"), Check: resource.ComposeTestCheckFunc( @@ -522,18 +510,6 @@ func TestAccAWSElasticacheCluster_NodeTypeResize_Redis_Ec2Classic(t *testing.T) Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, Steps: []resource.TestStep{ - { - Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.t2.micro"), - ExpectError: regexp.MustCompile(`node_type "cache.t2.micro" can only be created in a VPC`), - }, - { - Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.t2.small"), - ExpectError: regexp.MustCompile(`node_type "cache.t2.small" can only be created in a VPC`), - }, - { - Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.t2.medium"), - ExpectError: regexp.MustCompile(`node_type "cache.t2.medium" can only be created in a VPC`), - }, { Config: testAccAWSElasticacheClusterConfig_NodeType_Redis_Ec2Classic(rName, "cache.m3.medium"), Check: resource.ComposeTestCheckFunc( From 67c9538c942327bf43cd60ceccba11bdaeae0092 Mon Sep 17 00:00:00 2001 From: Kash Date: Thu, 26 Apr 2018 09:05:29 -0400 Subject: [PATCH 0839/3316] set security groups in network interfaces --- aws/resource_aws_launch_template.go | 18 +++++++++++++++++- aws/resource_aws_launch_template_test.go | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index bed22574eab..8f802a45b1f 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -702,7 +702,17 @@ func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecifi } if len(v.Groups) > 0 { - networkInterface["security_groups"] = aws.StringValueSlice(v.Groups) + raw, ok := networkInterface["security_groups"] + if !ok { + raw = schema.NewSet(schema.HashString, nil) + } + list := raw.(*schema.Set) + + for _, group := range v.Groups { + list.Add(aws.StringValue(group)) + } + + networkInterface["security_groups"] = list } s = append(s, networkInterface) @@ -969,6 +979,12 @@ func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTempl networkInterface.SubnetId = aws.String(v) } + if v := ni["security_groups"].(*schema.Set); v.Len() > 0 { + for _, v := range v.List() { + networkInterface.Groups = append(networkInterface.Groups, aws.String(v.(string))) + } + } + ipv6AddressList := ni["ipv6_addresses"].(*schema.Set).List() for _, address := range ipv6AddressList { ipv6Addresses = append(ipv6Addresses, &ec2.InstanceIpv6AddressRequest{ diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index 762b487c4cf..8e1ec46852c 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -90,6 +90,7 @@ func TestAccAWSLaunchTemplate_data(t *testing.T) { resource.TestCheckResourceAttrSet(resName, "key_name"), resource.TestCheckResourceAttr(resName, "monitoring.#", "1"), resource.TestCheckResourceAttr(resName, "network_interfaces.#", "1"), + resource.TestCheckResourceAttr(resName, "network_interfaces.0.security_groups.#", "1"), resource.TestCheckResourceAttr(resName, "placement.#", "1"), resource.TestCheckResourceAttrSet(resName, "ram_disk_id"), resource.TestCheckResourceAttr(resName, "vpc_security_group_ids.#", "1"), @@ -275,6 +276,7 @@ resource "aws_launch_template" "foo" { network_interfaces { associate_public_ip_address = true network_interface_id = "eni-123456ab" + security_groups = ["sg-1a23bc45"] } placement { From 868c69ea9c892d5b77d6b276822b99c703a685ec Mon Sep 17 00:00:00 2001 From: Douglas Date: Thu, 26 Apr 2018 10:23:11 -0300 Subject: [PATCH 0840/3316] Support for proxy protocol 2 attribute --- aws/resource_aws_lb_target_group.go | 13 ++++++++ aws/resource_aws_lb_target_group_test.go | 40 ++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/aws/resource_aws_lb_target_group.go b/aws/resource_aws_lb_target_group.go index 7222b853300..687dea742dd 100644 --- a/aws/resource_aws_lb_target_group.go +++ b/aws/resource_aws_lb_target_group.go @@ -83,6 +83,12 @@ func resourceAwsLbTargetGroup() *schema.Resource { ValidateFunc: validation.IntBetween(0, 3600), }, + "proxy_protocol_v2": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "target_type": { Type: schema.TypeString, Optional: true, @@ -333,6 +339,13 @@ func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) er }) } + if d.HasChange("proxy_protocol_v2") { + attrs = append(attrs, &elbv2.TargetGroupAttribute{ + Key: aws.String("proxy_protocol_v2.enabled"), + Value: aws.String(strconv.FormatBool(d.Get("proxy_protocol_v2").(bool))), + }) + } + // In CustomizeDiff we allow LB stickiness to be declared for TCP target // groups, so long as it's not enabled. This allows for better support for // modules, but also means we need to completely skip sending the data to the diff --git a/aws/resource_aws_lb_target_group_test.go b/aws/resource_aws_lb_target_group_test.go index 259ba5b314a..b8580558333 100644 --- a/aws/resource_aws_lb_target_group_test.go +++ b/aws/resource_aws_lb_target_group_test.go @@ -106,6 +106,7 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_target_group.test", "protocol", "TCP"), resource.TestCheckResourceAttrSet("aws_lb_target_group.test", "vpc_id"), resource.TestCheckResourceAttr("aws_lb_target_group.test", "deregistration_delay", "200"), + resource.TestCheckResourceAttr("aws_lb_target_group.test", "proxy_protocol_v2", "false"), resource.TestCheckResourceAttr("aws_lb_target_group.test", "health_check.#", "1"), resource.TestCheckResourceAttr("aws_lb_target_group.test", "health_check.0.interval", "10"), testAccCheckAWSLBTargetGroupHealthCheckInterval(&confBefore, 10), @@ -156,6 +157,13 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { ExpectNonEmptyPlan: true, ExpectError: regexp.MustCompile("Health check interval cannot be updated"), }, + { + Config: testAccAWSLBTargetGroupConfig_typeTCP_withProxyProtocol(targetGroupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBTargetGroupExists("aws_lb_target_group.test", &confBefore), + resource.TestCheckResourceAttr("aws_lb_target_group.test", "proxy_protocol_v2", "true"), + ), + }, }, }) } @@ -1235,6 +1243,38 @@ resource "aws_vpc" "test" { }`, targetGroupName) } +func testAccAWSLBTargetGroupConfig_typeTCP_withProxyProtocol(targetGroupName string) string { + return fmt.Sprintf(`resource "aws_lb_target_group" "test" { + name = "%s" + port = 8082 + protocol = "TCP" + vpc_id = "${aws_vpc.test.id}" + + proxy_protocol_v2 = "true" + deregistration_delay = 200 + + health_check { + interval = 10 + port = "traffic-port" + protocol = "TCP" + healthy_threshold = 3 + unhealthy_threshold = 3 + } + + tags { + Name = "TestAcc_networkLB_TargetGroup" + } +} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + tags { + Name = "terraform-testacc-lb-target-group-type-tcp" + } +}`, targetGroupName) +} + func testAccAWSLBTargetGroupConfig_typeTCPInvalidThreshold(targetGroupName string) string { return fmt.Sprintf(`resource "aws_lb_target_group" "test" { name = "%s" From 7e00845cb283f4baab601870ccc771f04b9c6123 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Thu, 26 Apr 2018 09:23:59 -0500 Subject: [PATCH 0841/3316] Added documentation --- website/docs/r/rds_cluster.html.markdown | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/website/docs/r/rds_cluster.html.markdown b/website/docs/r/rds_cluster.html.markdown index 54cffe5b0dd..cfb3e578c2f 100644 --- a/website/docs/r/rds_cluster.html.markdown +++ b/website/docs/r/rds_cluster.html.markdown @@ -117,6 +117,32 @@ Default: A 30-minute window selected at random from an 8-hour block of time per * `engine_version` - (Optional) The database engine version. * `source_region` - (Optional) The source region for an encrypted replica DB cluster. +### S3 Import Options + +Full details on the core parameters and impacts are in the API Docs: [RestoreDBClusterFromS3](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBClusterFromS3.html). Sample + +```hcl +resource "aws_rds_cluster" "db" { + engine = "aurora" + + s3_import { + source_engine = "mysql" + source_engine_version = "5.6" + bucket_name = "mybucket" + bucket_prefix = "backups" + ingestion_role = "arn:aws:iam::1234567890:role/role-xtrabackup-rds-restore" + } +} +``` + +* `bucket_name` - (Required) The bucket name where your backup is stored +* `bucket_prefix` - (Optional) Can be blank, but is the path to your backup +* `ingestion_role` - (Required) Role applied to load the data. +* `source_engine` - (Required) Source engine for the backup +* `source_engine_version` - (Required) Version of the source engine used to make the backup + +This will not recreate the resource if the S3 object changes in some way. It's only used to initialize the database. Note, that this only works currently with the aurora engine. See AWS for currently supported engines and options. [Aurora S3 Migration Docs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Migrating.ExtMySQL.html#AuroraMySQL.Migrating.ExtMySQL.S3) + ## Attributes Reference The following attributes are exported: From 68a0e955e145c544ca595d95ae866c599784bf52 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Thu, 26 Apr 2018 07:37:16 -0700 Subject: [PATCH 0842/3316] device_index can be 0. --- aws/resource_aws_launch_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index bed22574eab..c455a160de5 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -952,7 +952,7 @@ func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTempl networkInterface.Description = aws.String(v) } - if v, ok := ni["device_index"].(int); ok && v != 0 { + if v, ok := ni["device_index"].(int); ok { networkInterface.DeviceIndex = aws.Int64(int64(v)) } From 65c52b7b3b7458515766eec6af854a53a1ddbe0e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 10:53:43 -0400 Subject: [PATCH 0843/3316] resource/aws_lambda_permission: Fix statement_id handling with statement_id_prefix --- aws/resource_aws_lambda_permission.go | 2 ++ aws/resource_aws_lambda_permission_test.go | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_lambda_permission.go b/aws/resource_aws_lambda_permission.go index 67b5ac787fa..673ed2be3f3 100644 --- a/aws/resource_aws_lambda_permission.go +++ b/aws/resource_aws_lambda_permission.go @@ -262,6 +262,8 @@ func resourceAwsLambdaPermissionRead(d *schema.ResourceData, meta interface{}) e d.Set("source_arn", arnLike["AWS:SourceArn"]) } + d.Set("statement_id", statement.Sid) + return nil } diff --git a/aws/resource_aws_lambda_permission_test.go b/aws/resource_aws_lambda_permission_test.go index 0642b88dd9b..e8fd3bd9612 100644 --- a/aws/resource_aws_lambda_permission_test.go +++ b/aws/resource_aws_lambda_permission_test.go @@ -213,6 +213,7 @@ func TestAccAWSLambdaPermission_withRawFunctionName(t *testing.T) { func TestAccAWSLambdaPermission_withStatementIdPrefix(t *testing.T) { var statement LambdaPolicyStatement + rName := acctest.RandomWithPrefix("tf-acc-test") endsWithFuncName := regexp.MustCompile(":function:lambda_function_name_perm$") startsWithPrefix := regexp.MustCompile("^AllowExecutionWithStatementIdPrefix-") @@ -222,7 +223,7 @@ func TestAccAWSLambdaPermission_withStatementIdPrefix(t *testing.T) { CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLambdaPermissionConfig_withStatementIdPrefix, + Config: testAccAWSLambdaPermissionConfig_withStatementIdPrefix(rName), Check: resource.ComposeTestCheckFunc( testAccCheckLambdaPermissionExists("aws_lambda_permission.with_statement_id_prefix", &statement), resource.TestCheckResourceAttr("aws_lambda_permission.with_statement_id_prefix", "action", "lambda:InvokeFunction"), @@ -618,7 +619,8 @@ EOF `, funcName, roleName) } -var testAccAWSLambdaPermissionConfig_withStatementIdPrefix = ` +func testAccAWSLambdaPermissionConfig_withStatementIdPrefix(rName string) string { + return fmt.Sprintf(` resource "aws_lambda_permission" "with_statement_id_prefix" { statement_id_prefix = "AllowExecutionWithStatementIdPrefix-" action = "lambda:InvokeFunction" @@ -652,7 +654,8 @@ resource "aws_iam_role" "iam_for_lambda" { } EOF } -` +`, rName) +} func testAccAWSLambdaPermissionConfig_withQualifier(aliasName, funcName, roleName string) string { return fmt.Sprintf(` From 32f751f887d6029b12549937ab92943e5f5f176f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 10:56:34 -0400 Subject: [PATCH 0844/3316] docs/resource/aws_lambda_permission: Fix statement_id argument ordering and clarify statement_id_prefix usage --- website/docs/r/lambda_permission.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/lambda_permission.html.markdown b/website/docs/r/lambda_permission.html.markdown index aecad05e6c6..32937708dd0 100644 --- a/website/docs/r/lambda_permission.html.markdown +++ b/website/docs/r/lambda_permission.html.markdown @@ -111,8 +111,6 @@ EOF ## Argument Reference - * `statement_id` - (Optional) A unique statement identifier. By default generated by Terraform. - * `statement_id_prefix` - (Optional) A unique statement identifier. Conflicts with `statement_id`. * `action` - (Required) The AWS Lambda action you want to allow in this statement. (e.g. `lambda:InvokeFunction`) * `function_name` - (Required) Name of the Lambda function whose resource policy you are updating * `principal` - (Required) The principal who is getting this permission. @@ -128,3 +126,5 @@ EOF generated from the specified bucket or rule can invoke the function. API Gateway ARNs have a unique structure described [here](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-control-access-using-iam-policies-to-invoke-api.html). + * `statement_id` - (Optional) A unique statement identifier. By default generated by Terraform. + * `statement_id_prefix` - (Optional) A statement identifier prefix. Terraform will generate a unique suffix. Conflicts with `statement_id`. From bab068647757ad844159cfd55aefce36f77b7c71 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 11:03:15 -0400 Subject: [PATCH 0845/3316] Update CHANGELOG for #2743 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a24e8967c05..11ae360fc3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] * resource/aws_autoscaling_group: Add `launch_template` argument [GH-4305] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] +* resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] +* resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) [GH-2743] BUG FIXES: From 35109a64ff9360858f91d3247b2a4bcc98cd6cce Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 11:35:09 -0400 Subject: [PATCH 0846/3316] Update CHANGELOG for #4364 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ae360fc3d..8c01e11e773 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_launch_template: Appropriately set `security_groups` in network interfaces [GH-4364] * resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] ## 1.16.0 (April 25, 2018) From 8ce9d30dd8a7d3b86ecc040e6cc74fb457b040ec Mon Sep 17 00:00:00 2001 From: "Drew J. Sonne" Date: Thu, 11 Jan 2018 20:27:44 +0000 Subject: [PATCH 0847/3316] Added stub for test of glue table --- aws/resource_aws_glue_catalog_table_test.go | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 aws/resource_aws_glue_catalog_table_test.go diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go new file mode 100644 index 00000000000..e217e1fc5ba --- /dev/null +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -0,0 +1,41 @@ +package aws + +import ( + "testing" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "fmt" +) + +func TestAccAWSGlueCatalogTable_full(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckGlueTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCatalogTable_basic(rInt), + Destroy: false, + Check: resource.ComposeTestCheckFunc( + testAccCheckGlueCatalogTableExists("aws_glue_catalog_table.test"), + resource.TestCheckResourceAttr( + "aws_glue_catalog_table.test", + "name", + fmt.Sprintf("my_test_catalog_table_%d", rInt), + ), + resource.TestCheckResourceAttr( + "aws_glue_catalog_table.test", + "description", + "", + ), + resource.TestCheckResourceAttr( + "aws_glue_catalog_table.test", + "owner", + "", + ), + ), + }, + }, + }) +} From 66278627c9d9319009d9bd5c170b17112248a519 Mon Sep 17 00:00:00 2001 From: "Drew J. Sonne" Date: Fri, 13 Apr 2018 08:06:58 +0100 Subject: [PATCH 0848/3316] Added skeleton test cases --- aws/import_aws_glue_catalog_table_test.go | 34 ++++++ aws/resource_aws_glue_catalog_table_test.go | 121 ++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 aws/import_aws_glue_catalog_table_test.go diff --git a/aws/import_aws_glue_catalog_table_test.go b/aws/import_aws_glue_catalog_table_test.go new file mode 100644 index 00000000000..505f9ee80cb --- /dev/null +++ b/aws/import_aws_glue_catalog_table_test.go @@ -0,0 +1,34 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/aws/aws-sdk-go/aws" + "fmt" +) + +func TestAccAWSGlueCatalogTable_importBasic(t *testing.T) { + resourceName := "aws_glue_catalog_table.test" + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckGlueTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCatalogTable_full(rInt, "A test table from terraform"), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go index e217e1fc5ba..2f8e5163a37 100644 --- a/aws/resource_aws_glue_catalog_table_test.go +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -5,6 +5,9 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "fmt" + "github.com/hashicorp/terraform/terraform" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/aws/aws-sdk-go/aws" ) func TestAccAWSGlueCatalogTable_full(t *testing.T) { @@ -24,6 +27,11 @@ func TestAccAWSGlueCatalogTable_full(t *testing.T) { "name", fmt.Sprintf("my_test_catalog_table_%d", rInt), ), + resource.TestCheckResourceAttr( + "aws_glue_catalog_table.test", + "database", + fmt.Sprintf("my_test_catalog_database_%d", rInt), + ), resource.TestCheckResourceAttr( "aws_glue_catalog_table.test", "description", @@ -39,3 +47,116 @@ func TestAccAWSGlueCatalogTable_full(t *testing.T) { }, }) } + +func testAccGlueCatalogTable_basic(rInt int) string { + return fmt.Sprintf(` +resource "aws_glue_catalog_database" "test" { + name = "my_test_catalog_database_%d" +} + +resource "aws_glue_catalog_table" "test" { + name = "my_test_table_%d" + database = "${aws_glue_catalog_database.test.name}" +} +`, rInt, rInt) +} + +func testAccGlueCatalogTable_full(rInt int, desc string) string { + return fmt.Sprintf(` +resource "aws_glue_catalog_database" "test" { + name = "my_test_catalog_database_%d" +} +# @TODO Fill out parameters from https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor +resource "aws_glue_catalog_table" "test" { + name = "my_test_table_%d" + database = "${aws_glue_catalog_database.test.name}" + description = "%s" + owner = "my_owner" + retetention = "%s", + storage { + location = "my_location" + columns = [{ + name = "my_column_1" + type = "int" + comment = "my_column_comment" + },{ + name = "my_column_1" + type = "string" + comment = "my_column_comment" + }] + ... + } + partition_keys = [{ + name = "my_column_1" + type = "int" + comment = "my_column_comment" + }] + ... +} +`, rInt, rInt, rInt, desc) +} + +func testAccCheckGlueTableDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).glueconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_glue_catalog_table" { + continue + } + + catalogId, dbName, tableName := readAwsGlueTableID(rs.Primary.ID) + + input := &glue.GetTableInput{ + DatabaseName: aws.String(dbName), + CatalogId: aws.String(catalogId), + Name: aws.String(tableName), + } + if _, err := conn.GetTable(input); err != nil { + //Verify the error is what we want + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + continue + } + + return err + } + return fmt.Errorf("still exists") + } + return nil +} + +func testAccCheckGlueCatalogTableExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + catalogId, dbName, tableName := readAwsGlueTableID(rs.Primary.ID) + + glueconn := testAccProvider.Meta().(*AWSClient).glueconn + out, err := glueconn.GetTable(&glue.GetTableInput{ + CatalogId: aws.String(catalogId), + DatabaseName: aws.String(dbName), + Name: aws.String(tableName), + }) + + if err != nil { + return err + } + + if out.Table == nil { + return fmt.Errorf("No Glue Database Found") + } + + if *out.Table.Name != dbName { + return fmt.Errorf("Glue Database Mismatch - existing: %q, state: %q", + *out.Table.Name, tableName) + } + + return nil + } +} From 8f4320ac6c0519a452f1f4799ce1ab6fb9558b65 Mon Sep 17 00:00:00 2001 From: "Drew J. Sonne" Date: Fri, 13 Apr 2018 08:07:04 +0100 Subject: [PATCH 0849/3316] Add skeleton resource --- aws/resource_aws_glue_catalog_table.go | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 aws/resource_aws_glue_catalog_table.go diff --git a/aws/resource_aws_glue_catalog_table.go b/aws/resource_aws_glue_catalog_table.go new file mode 100644 index 00000000000..e93acd0a0b3 --- /dev/null +++ b/aws/resource_aws_glue_catalog_table.go @@ -0,0 +1,33 @@ +package aws + +import ( + "strings" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsGlueCatalogTable() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueCatalogTableCreate, + Read: resourceAwsGlueCatalogTableRead, + Update: resourceAwsGlueCatalogTableUpdate, + Delete: resourceAwsGlueCatalogTableDelete, + Exists: resourceAwsGlueCatalogTableExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + ... + }, + } +} + +func readAwsGlueTableID(id string) (catalogID string, dbName string, name string) { + idParts := strings.Split(id, ":") + return idParts[0], idParts[1], idParts[2] +} From b8e5104916bf67ef8757ab2d5c8ccd984c0ec5e1 Mon Sep 17 00:00:00 2001 From: Tom Hutchinson Date: Wed, 18 Apr 2018 17:18:16 +0100 Subject: [PATCH 0850/3316] implement glue table resource crud with limited config options --- aws/import_aws_glue_catalog_table_test.go | 5 - aws/resource_aws_glue_catalog_table.go | 228 +++++++++++++++++++- aws/resource_aws_glue_catalog_table_test.go | 8 +- 3 files changed, 231 insertions(+), 10 deletions(-) diff --git a/aws/import_aws_glue_catalog_table_test.go b/aws/import_aws_glue_catalog_table_test.go index 505f9ee80cb..fec02c38025 100644 --- a/aws/import_aws_glue_catalog_table_test.go +++ b/aws/import_aws_glue_catalog_table_test.go @@ -5,10 +5,6 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/aws/aws-sdk-go/aws" - "fmt" ) func TestAccAWSGlueCatalogTable_importBasic(t *testing.T) { @@ -31,4 +27,3 @@ func TestAccAWSGlueCatalogTable_importBasic(t *testing.T) { }, }) } - diff --git a/aws/resource_aws_glue_catalog_table.go b/aws/resource_aws_glue_catalog_table.go index e93acd0a0b3..9e6a9a2b117 100644 --- a/aws/resource_aws_glue_catalog_table.go +++ b/aws/resource_aws_glue_catalog_table.go @@ -1,7 +1,12 @@ package aws import ( + "fmt" + "log" "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" "github.com/hashicorp/terraform/helper/schema" ) @@ -11,18 +16,78 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Read: resourceAwsGlueCatalogTableRead, Update: resourceAwsGlueCatalogTableUpdate, Delete: resourceAwsGlueCatalogTableDelete, - Exists: resourceAwsGlueCatalogTableExists, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, Schema: map[string]*schema.Schema{ + "catalog_id": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, "name": { + Type: schema.TypeString, + Required: true, + }, + "database_name": { Type: schema.TypeString, ForceNew: true, Required: true, }, - ... + "description": { + Type: schema.TypeString, + Optional: true, + }, + "owner": { + Type: schema.TypeString, + Optional: true, + }, + "retention": { + Type: schema.TypeInt, + Optional: true, + }, + "storage_descriptor": { + Type: schema.TypeMap, + Optional: true, + Elem: schema.TypeString, + }, + "partition_keys": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + }, + "comment": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "view_original_text": { + Type: schema.TypeString, + Optional: true, + }, + "view_expanded_text": { + Type: schema.TypeString, + Optional: true, + }, + "table_type": { + Type: schema.TypeString, + Optional: true, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + }, }, } } @@ -31,3 +96,162 @@ func readAwsGlueTableID(id string) (catalogID string, dbName string, name string idParts := strings.Split(id, ":") return idParts[0], idParts[1], idParts[2] } + +func resourceAwsGlueCatalogTableCreate(t *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + catalogID := createAwsGlueCatalogID(t, meta.(*AWSClient).accountid) + dbName := t.Get("database_name").(string) + name := t.Get("name").(string) + + input := &glue.CreateTableInput{ + CatalogId: aws.String(catalogID), + DatabaseName: aws.String(dbName), + TableInput: expandGlueTableInput(t), + } + + _, err := glueconn.CreateTable(input) + if err != nil { + return fmt.Errorf("Error creating Catalog Table: %s", err) + } + + t.SetId(fmt.Sprintf("%s:%s:%s", catalogID, dbName, name)) + + return resourceAwsGlueCatalogTableRead(t, meta) +} + +func resourceAwsGlueCatalogTableUpdate(t *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + + catalogID, dbName, _ := readAwsGlueTableID(t.Id()) + + updateTableInput := &glue.UpdateTableInput{ + CatalogId: aws.String(catalogID), + DatabaseName: aws.String(dbName), + TableInput: expandGlueTableInput(t), + } + + if t.HasChange("table_input") { + if _, err := glueconn.UpdateTable(updateTableInput); err != nil { + return fmt.Errorf("Error updating Glue Catalog Table: %s", err) + } + } + + return nil +} + +func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + + catalogID, dbName, name := readAwsGlueTableID(t.Id()) + + input := &glue.GetTableInput{ + CatalogId: aws.String(catalogID), + DatabaseName: aws.String(dbName), + Name: aws.String(name), + } + + out, err := glueconn.GetTable(input) + if err != nil { + + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Catalog Table (%s) not found, removing from state", t.Id()) + t.SetId("") + } + + return fmt.Errorf("Error reading Glue Catalog Table: %s", err) + } + + t.Set("name", out.Table.Name) + t.Set("catalog_id", catalogID) + t.Set("description", out.Table.Description) + + return nil +} + +func resourceAwsGlueCatalogTableDelete(t *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + catalogID, dbName, name := readAwsGlueTableID(t.Id()) + + log.Printf("[DEBUG] Glue Catalog Table: %s:%s:%s", catalogID, dbName, name) + _, err := glueconn.DeleteTable(&glue.DeleteTableInput{ + CatalogId: aws.String(catalogID), + Name: aws.String(name), + DatabaseName: aws.String(dbName), + }) + if err != nil { + return fmt.Errorf("Error deleting Glue Catalog Table: %s", err.Error()) + } + return nil +} + +func expandGlueTableInput(t *schema.ResourceData) *glue.TableInput { + tableInput := &glue.TableInput{ + Name: aws.String(t.Get("name").(string)), + } + + if v, ok := t.GetOk("description"); ok { + tableInput.Description = aws.String(v.(string)) + } + + if v, ok := t.GetOk("owner"); ok { + tableInput.Owner = aws.String(v.(string)) + } + + if v, ok := t.GetOk("retention"); ok { + tableInput.Retention = aws.Int64(v.(int64)) + } + + if v, ok := t.GetOk("storage_descriptor"); ok { + tableInput.StorageDescriptor = expandGlueStorageDescriptor(v.(map[string]interface{})) + } + + if v, ok := t.GetOk("partition_keys"); ok { + columns := expandGlueColumns(v.(map[string]schema.ResourceData)) + tableInput.PartitionKeys = columns + } + + if v, ok := t.GetOk("view_original_text"); ok { + tableInput.Owner = aws.String(v.(string)) + } + + if v, ok := t.GetOk("view_expanded_text"); ok { + tableInput.Owner = aws.String(v.(string)) + } + + if v, ok := t.GetOk("table_type"); ok { + tableInput.Owner = aws.String(v.(string)) + } + + if v, ok := t.GetOk("parameters"); ok { + tableInput.Parameters = aws.StringMap(v.(map[string]string)) + } + + return tableInput +} + +func expandGlueStorageDescriptor(s map[string]interface{}) *glue.StorageDescriptor { + storageDescriptor := &glue.StorageDescriptor{} + + return storageDescriptor +} + +func expandGlueColumns(columns map[string]schema.ResourceData) []*glue.Column { + columnSlice := []*glue.Column{} + for _, element := range columns { + column := &glue.Column{ + Name: aws.String(element.Get("name").(string)), + } + + if v, ok := element.GetOk("comment"); ok { + column.Comment = aws.String(v.(string)) + } + + if v, ok := element.GetOk("type"); ok { + column.Type = aws.String(v.(string)) + } + + columnSlice = append(columnSlice, column) + } + + return columnSlice +} diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go index 2f8e5163a37..7c378727ed5 100644 --- a/aws/resource_aws_glue_catalog_table_test.go +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -1,13 +1,15 @@ package aws import ( + "fmt" "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" - "fmt" "github.com/hashicorp/terraform/terraform" - "github.com/aws/aws-sdk-go/service/glue" - "github.com/aws/aws-sdk-go/aws" ) func TestAccAWSGlueCatalogTable_full(t *testing.T) { From 29e68a1e24ba4f7fcd094dc7055a0556137b58ca Mon Sep 17 00:00:00 2001 From: Tom Hutchinson Date: Fri, 20 Apr 2018 16:00:24 +0100 Subject: [PATCH 0851/3316] glue table StorageDescriptor wip --- aws/provider.go | 1 + aws/resource_aws_glue_catalog_table.go | 124 +++++++++++++++++++- aws/resource_aws_glue_catalog_table_test.go | 116 +++++++++++++----- 3 files changed, 206 insertions(+), 35 deletions(-) diff --git a/aws/provider.go b/aws/provider.go index 37bc6f95ad2..65b91b459d1 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -393,6 +393,7 @@ func Provider() terraform.ResourceProvider { "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), "aws_glue_connection": resourceAwsGlueConnection(), "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), diff --git a/aws/resource_aws_glue_catalog_table.go b/aws/resource_aws_glue_catalog_table.go index 9e6a9a2b117..8db6dde882e 100644 --- a/aws/resource_aws_glue_catalog_table.go +++ b/aws/resource_aws_glue_catalog_table.go @@ -24,7 +24,8 @@ func resourceAwsGlueCatalogTable() *schema.Resource { "catalog_id": { Type: schema.TypeString, ForceNew: true, - Required: true, + Optional: true, + Computed: true, }, "name": { Type: schema.TypeString, @@ -50,7 +51,62 @@ func resourceAwsGlueCatalogTable() *schema.Resource { "storage_descriptor": { Type: schema.TypeMap, Optional: true, - Elem: schema.TypeString, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + //"columns": { + // Type: schema.TypeString, + // Required: true, + //}, + //"location": { + // Type: schema.TypeString, + // Optional: true, + //}, + //"input_format": { + // Type: schema.TypeString, + // Optional: true, + //}, + //"output_format": { + // Type: schema.TypeString, + // Optional: true, + //}, + //"compressed": { + // Type: schema.TypeBool, + // Optional: true, + //}, + //"number_of_buckets": { + // Type: schema.TypeInt, + // Optional: true, + //}, + //"ser_de_info": { + // Type: schema.TypeString, + // Optional: true, + //}, + "bucket_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + //"sort_columns": { + // Type: schema.TypeString, + // Optional: true, + //}, + //"parameters": { + // Type: schema.TypeMap, + // Optional: true, + // Elem: schema.TypeString, + //}, + //"skewed_info": { + // Type: schema.TypeString, + // Optional: true, + //}, + //"stored_as_sub_directories": { + // Type: schema.TypeBool, + // Optional: true, + //}, + }, + }, }, "partition_keys": { Type: schema.TypeList, @@ -163,7 +219,16 @@ func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) e t.Set("name", out.Table.Name) t.Set("catalog_id", catalogID) + t.Set("database_name", dbName) t.Set("description", out.Table.Description) + t.Set("owner", out.Table.Owner) + t.Set("retention", out.Table.Retention) + t.Set("storage_descriptor", out.Table.StorageDescriptor) + t.Set("partition_keys", out.Table.PartitionKeys) + t.Set("view_original_text", out.Table.ViewOriginalText) + t.Set("view_expanded_text", out.Table.ViewExpandedText) + t.Set("table_type", out.Table.TableType) + t.Set("parameters", out.Table.Parameters) return nil } @@ -202,11 +267,11 @@ func expandGlueTableInput(t *schema.ResourceData) *glue.TableInput { } if v, ok := t.GetOk("storage_descriptor"); ok { - tableInput.StorageDescriptor = expandGlueStorageDescriptor(v.(map[string]interface{})) + tableInput.StorageDescriptor = expandGlueStorageDescriptor(v.(*schema.ResourceData)) } if v, ok := t.GetOk("partition_keys"); ok { - columns := expandGlueColumns(v.(map[string]schema.ResourceData)) + columns := expandGlueColumns(v.([]*schema.ResourceData)) tableInput.PartitionKeys = columns } @@ -229,13 +294,60 @@ func expandGlueTableInput(t *schema.ResourceData) *glue.TableInput { return tableInput } -func expandGlueStorageDescriptor(s map[string]interface{}) *glue.StorageDescriptor { +func expandGlueStorageDescriptor(s *schema.ResourceData) *glue.StorageDescriptor { storageDescriptor := &glue.StorageDescriptor{} + if v, ok := s.GetOk("columns"); ok { + columns := expandGlueColumns(v.([]*schema.ResourceData)) + storageDescriptor.Columns = columns + } + + if v, ok := s.GetOk("location"); ok { + storageDescriptor.Location = aws.String(v.(string)) + } + + if v, ok := s.GetOk("input_format"); ok { + storageDescriptor.InputFormat = aws.String(v.(string)) + } + + if v, ok := s.GetOk("output_format"); ok { + storageDescriptor.OutputFormat = aws.String(v.(string)) + } + + if v, ok := s.GetOk("compressed"); ok { + storageDescriptor.Compressed = aws.Bool(v.(bool)) + } + + if v, ok := s.GetOk("number_of_buckets"); ok { + storageDescriptor.NumberOfBuckets = aws.Int64(v.(int64)) + } + + if _, ok := s.GetOk("ser_de_info"); ok { // todo + ser_de_info := &glue.SerDeInfo{} + storageDescriptor.SerdeInfo = ser_de_info + } + + if v, ok := s.GetOk("bucket_columns"); ok { + storageDescriptor.BucketColumns = aws.StringSlice(v.([]string)) + } + + if _, ok := s.GetOk("sort_colums"); ok { // todo + sort_columns := []*glue.Order{} + storageDescriptor.SortColumns = sort_columns + } + + if v, ok := s.GetOk("parameters"); ok { + storageDescriptor.Parameters = aws.StringMap(v.(map[string]string)) + } + + if v, ok := s.GetOk("stored_as_sub_directories"); ok { + storageDescriptor.StoredAsSubDirectories = aws.Bool(v.(bool)) + } + return storageDescriptor } -func expandGlueColumns(columns map[string]schema.ResourceData) []*glue.Column { +func expandGlueColumns(columns []*schema.ResourceData) []*glue.Column { columnSlice := []*glue.Column{} for _, element := range columns { column := &glue.Column{ diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go index 7c378727ed5..da35b88a3a0 100644 --- a/aws/resource_aws_glue_catalog_table_test.go +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -14,6 +14,8 @@ import ( func TestAccAWSGlueCatalogTable_full(t *testing.T) { rInt := acctest.RandInt() + description := "A test table from terraform" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -31,18 +33,25 @@ func TestAccAWSGlueCatalogTable_full(t *testing.T) { ), resource.TestCheckResourceAttr( "aws_glue_catalog_table.test", - "database", + "database_name", fmt.Sprintf("my_test_catalog_database_%d", rInt), ), + ), + }, + { + Config: testAccGlueCatalogTable_full(rInt, description), + Destroy: false, + Check: resource.ComposeTestCheckFunc( + testAccCheckGlueCatalogTableExists("aws_glue_catalog_table.test"), resource.TestCheckResourceAttr( "aws_glue_catalog_table.test", - "description", - "", + "name", + fmt.Sprintf("my_test_catalog_table_%d", rInt), ), resource.TestCheckResourceAttr( "aws_glue_catalog_table.test", - "owner", - "", + "database_name", + fmt.Sprintf("my_test_catalog_database_%d", rInt), ), ), }, @@ -57,8 +66,8 @@ resource "aws_glue_catalog_database" "test" { } resource "aws_glue_catalog_table" "test" { - name = "my_test_table_%d" - database = "${aws_glue_catalog_database.test.name}" + name = "my_test_catalog_table_%d" + database_name = "${aws_glue_catalog_database.test.name}" } `, rInt, rInt) } @@ -68,34 +77,83 @@ func testAccGlueCatalogTable_full(rInt int, desc string) string { resource "aws_glue_catalog_database" "test" { name = "my_test_catalog_database_%d" } -# @TODO Fill out parameters from https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor + resource "aws_glue_catalog_table" "test" { name = "my_test_table_%d" - database = "${aws_glue_catalog_database.test.name}" + database_name = "${aws_glue_catalog_database.test.name}" description = "%s" owner = "my_owner" - retetention = "%s", - storage { - location = "my_location" - columns = [{ + retention = 1 + storage_descriptor { + /* columns = [ + { + name = "my_column_1" + type = "int" + comment = "my_column1_comment" + }, + { + name = "my_column_2" + type = "string" + comment = "my_column2_comment" + } + ] */ + location = "my_location" + input_format = "SequenceFileInputFormat" + output_format = "SequenceFileInputFormat" + compressed = false + number_of_buckets = 1 + /* ser_de_info { + name = "ser_de_name" + parameters { + param1 = "param_val_1" + } + serialization_library = "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" + } */ + bucket_columns = [ + "bucket_column_1", + ] + /* sort_columns = [ + { + column = "my_column_1" + sort_order = 1 + } + ] */ + parameters { + param1 = "param1_val" + } + /* skewed_info { + skewed_column_names = [ + "my_column_1" + ] + skewed_column_value_location_maps { + my_column_1 = "my_column_1_val_loc_map" + } + skewed_column_values = [ + "skewed_val_1" + ] + } */ + stored_as_sub_directories = false + } + partition_keys = [ + { name = "my_column_1" type = "int" - comment = "my_column_comment" - },{ - name = "my_column_1" + comment = "my_column1_comment" + }, + { + name = "my_column_2" type = "string" - comment = "my_column_comment" - }] - ... + comment = "my_column2_comment" + } + ] + view_original_text = "view_original_text_1" + view_expanded_text = "view_expanded_text_1" + table_type = "VIRTUAL_VIEW" + parameters { + param1 = "param1_val" } - partition_keys = [{ - name = "my_column_1" - type = "int" - comment = "my_column_comment" - }] - ... } -`, rInt, rInt, rInt, desc) +`, rInt, rInt, desc) } func testAccCheckGlueTableDestroy(s *terraform.State) error { @@ -151,11 +209,11 @@ func testAccCheckGlueCatalogTableExists(name string) resource.TestCheckFunc { } if out.Table == nil { - return fmt.Errorf("No Glue Database Found") + return fmt.Errorf("No Glue Table Found") } - if *out.Table.Name != dbName { - return fmt.Errorf("Glue Database Mismatch - existing: %q, state: %q", + if *out.Table.Name != tableName { + return fmt.Errorf("Glue Table Mismatch - existing: %q, state: %q", *out.Table.Name, tableName) } From 68cdba76a15660d7242aaf88297d338ca3480b50 Mon Sep 17 00:00:00 2001 From: Tom Hutchinson Date: Tue, 24 Apr 2018 18:05:07 +0100 Subject: [PATCH 0852/3316] add support for remaining config options --- aws/resource_aws_glue_catalog_table.go | 339 +++++++++++++++----- aws/resource_aws_glue_catalog_table_test.go | 98 +++--- 2 files changed, 316 insertions(+), 121 deletions(-) diff --git a/aws/resource_aws_glue_catalog_table.go b/aws/resource_aws_glue_catalog_table.go index 8db6dde882e..10b26f65b78 100644 --- a/aws/resource_aws_glue_catalog_table.go +++ b/aws/resource_aws_glue_catalog_table.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" "github.com/hashicorp/terraform/helper/schema" + + "github.com/fatih/structs" ) func resourceAwsGlueCatalogTable() *schema.Resource { @@ -49,62 +51,127 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Optional: true, }, "storage_descriptor": { - Type: schema.TypeMap, + Type: schema.TypeList, Optional: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - //"columns": { - // Type: schema.TypeString, - // Required: true, - //}, - //"location": { - // Type: schema.TypeString, - // Optional: true, - //}, - //"input_format": { - // Type: schema.TypeString, - // Optional: true, - //}, - //"output_format": { - // Type: schema.TypeString, - // Optional: true, - //}, - //"compressed": { - // Type: schema.TypeBool, - // Optional: true, - //}, - //"number_of_buckets": { - // Type: schema.TypeInt, - // Optional: true, - //}, - //"ser_de_info": { - // Type: schema.TypeString, - // Optional: true, - //}, + "columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + }, + "comment": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "location": { + Type: schema.TypeString, + Optional: true, + }, + "input_format": { + Type: schema.TypeString, + Optional: true, + }, + "output_format": { + Type: schema.TypeString, + Optional: true, + }, + "compressed": { + Type: schema.TypeBool, + Optional: true, + }, + "number_of_buckets": { + Type: schema.TypeInt, + Optional: true, + }, + "ser_de_info": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "serialization_library": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, "bucket_columns": { Type: schema.TypeList, Optional: true, - Elem: &schema.Schema{ - Type: schema.TypeString, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "sort_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "column": { + Type: schema.TypeString, + Required: true, + }, + "sort_order": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "skewed_info": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "skewed_column_names": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "skewed_column_value_location_maps": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "skewed_column_values": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, }, }, - //"sort_columns": { - // Type: schema.TypeString, - // Optional: true, - //}, - //"parameters": { - // Type: schema.TypeMap, - // Optional: true, - // Elem: schema.TypeString, - //}, - //"skewed_info": { - // Type: schema.TypeString, - // Optional: true, - //}, - //"stored_as_sub_directories": { - // Type: schema.TypeBool, - // Optional: true, - //}, + "stored_as_sub_directories": { + Type: schema.TypeBool, + Optional: true, + }, }, }, }, @@ -143,6 +210,7 @@ func resourceAwsGlueCatalogTable() *schema.Resource { "parameters": { Type: schema.TypeMap, Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, }, }, } @@ -186,13 +254,11 @@ func resourceAwsGlueCatalogTableUpdate(t *schema.ResourceData, meta interface{}) TableInput: expandGlueTableInput(t), } - if t.HasChange("table_input") { - if _, err := glueconn.UpdateTable(updateTableInput); err != nil { - return fmt.Errorf("Error updating Glue Catalog Table: %s", err) - } + if _, err := glueconn.UpdateTable(updateTableInput); err != nil { + return fmt.Errorf("Error updating Glue Catalog Table: %s", err) } - return nil + return resourceAwsGlueCatalogTableRead(t, meta) } func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) error { @@ -223,7 +289,11 @@ func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) e t.Set("description", out.Table.Description) t.Set("owner", out.Table.Owner) t.Set("retention", out.Table.Retention) - t.Set("storage_descriptor", out.Table.StorageDescriptor) + + if out.Table.StorageDescriptor != nil { + t.Set("storage_descriptor", flattenStorageDescriptor(out.Table.StorageDescriptor)) + } + t.Set("partition_keys", out.Table.PartitionKeys) t.Set("view_original_text", out.Table.ViewOriginalText) t.Set("view_expanded_text", out.Table.ViewExpandedText) @@ -263,102 +333,124 @@ func expandGlueTableInput(t *schema.ResourceData) *glue.TableInput { } if v, ok := t.GetOk("retention"); ok { - tableInput.Retention = aws.Int64(v.(int64)) + tableInput.Retention = aws.Int64(int64(v.(int))) } if v, ok := t.GetOk("storage_descriptor"); ok { - tableInput.StorageDescriptor = expandGlueStorageDescriptor(v.(*schema.ResourceData)) + for _, elem := range v.([]interface{}) { + tableInput.StorageDescriptor = expandGlueStorageDescriptor(elem.(map[string]interface{})) + } } if v, ok := t.GetOk("partition_keys"); ok { - columns := expandGlueColumns(v.([]*schema.ResourceData)) + columns := expandGlueColumns(v.([]interface{})) tableInput.PartitionKeys = columns } if v, ok := t.GetOk("view_original_text"); ok { - tableInput.Owner = aws.String(v.(string)) + tableInput.ViewOriginalText = aws.String(v.(string)) } if v, ok := t.GetOk("view_expanded_text"); ok { - tableInput.Owner = aws.String(v.(string)) + tableInput.ViewExpandedText = aws.String(v.(string)) } if v, ok := t.GetOk("table_type"); ok { - tableInput.Owner = aws.String(v.(string)) + tableInput.TableType = aws.String(v.(string)) } if v, ok := t.GetOk("parameters"); ok { - tableInput.Parameters = aws.StringMap(v.(map[string]string)) + paramsMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + paramsMap[key] = value.(string) + } + tableInput.Parameters = aws.StringMap(paramsMap) } return tableInput } -func expandGlueStorageDescriptor(s *schema.ResourceData) *glue.StorageDescriptor { +func expandGlueStorageDescriptor(s map[string]interface{}) *glue.StorageDescriptor { storageDescriptor := &glue.StorageDescriptor{} - if v, ok := s.GetOk("columns"); ok { - columns := expandGlueColumns(v.([]*schema.ResourceData)) + if v, ok := s["columns"]; ok { + columns := expandGlueColumns(v.([]interface{})) storageDescriptor.Columns = columns } - if v, ok := s.GetOk("location"); ok { + if v, ok := s["location"]; ok { storageDescriptor.Location = aws.String(v.(string)) } - if v, ok := s.GetOk("input_format"); ok { + if v, ok := s["input_format"]; ok { storageDescriptor.InputFormat = aws.String(v.(string)) } - if v, ok := s.GetOk("output_format"); ok { + if v, ok := s["output_format"]; ok { storageDescriptor.OutputFormat = aws.String(v.(string)) } - if v, ok := s.GetOk("compressed"); ok { + if v, ok := s["compressed"]; ok { storageDescriptor.Compressed = aws.Bool(v.(bool)) } - if v, ok := s.GetOk("number_of_buckets"); ok { - storageDescriptor.NumberOfBuckets = aws.Int64(v.(int64)) + if v, ok := s["number_of_buckets"]; ok { + storageDescriptor.NumberOfBuckets = aws.Int64(int64(v.(int))) } - if _, ok := s.GetOk("ser_de_info"); ok { // todo - ser_de_info := &glue.SerDeInfo{} - storageDescriptor.SerdeInfo = ser_de_info + if v, ok := s["ser_de_info"]; ok { + for _, elem := range v.([]interface{}) { + storageDescriptor.SerdeInfo = expandSerDeInfo(elem.(map[string]interface{})) + } } - if v, ok := s.GetOk("bucket_columns"); ok { - storageDescriptor.BucketColumns = aws.StringSlice(v.([]string)) + if v, ok := s["bucket_columns"]; ok { + bucketColumns := make([]string, len(v.([]interface{}))) + for i, item := range v.([]interface{}) { + bucketColumns[i] = fmt.Sprint(item) + } + storageDescriptor.BucketColumns = aws.StringSlice(bucketColumns) } - if _, ok := s.GetOk("sort_colums"); ok { // todo - sort_columns := []*glue.Order{} - storageDescriptor.SortColumns = sort_columns + if v, ok := s["sort_colums"]; ok { + storageDescriptor.SortColumns = expandSortColumns(v.([]interface{})) } - if v, ok := s.GetOk("parameters"); ok { - storageDescriptor.Parameters = aws.StringMap(v.(map[string]string)) + if v, ok := s["skewed_info"]; ok { + for _, elem := range v.([]interface{}) { + storageDescriptor.SkewedInfo = expandSkewedInfo(elem.(map[string]interface{})) + } } - if v, ok := s.GetOk("stored_as_sub_directories"); ok { + if v, ok := s["parameters"]; ok { + paramsMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + paramsMap[key] = value.(string) + } + storageDescriptor.Parameters = aws.StringMap(paramsMap) + } + + if v, ok := s["stored_as_sub_directories"]; ok { storageDescriptor.StoredAsSubDirectories = aws.Bool(v.(bool)) } return storageDescriptor } -func expandGlueColumns(columns []*schema.ResourceData) []*glue.Column { +func expandGlueColumns(columns []interface{}) []*glue.Column { columnSlice := []*glue.Column{} for _, element := range columns { + elementMap := element.(map[string]interface{}) + column := &glue.Column{ - Name: aws.String(element.Get("name").(string)), + Name: aws.String(elementMap["name"].(string)), } - if v, ok := element.GetOk("comment"); ok { + if v, ok := elementMap["comment"]; ok { column.Comment = aws.String(v.(string)) } - if v, ok := element.GetOk("type"); ok { + if v, ok := elementMap["type"]; ok { column.Type = aws.String(v.(string)) } @@ -367,3 +459,80 @@ func expandGlueColumns(columns []*schema.ResourceData) []*glue.Column { return columnSlice } + +func expandSerDeInfo(s map[string]interface{}) *glue.SerDeInfo { + serDeInfo := &glue.SerDeInfo{} + + if v, ok := s["name"]; ok { + serDeInfo.Name = aws.String(v.(string)) + } + + if v, ok := s["parameters"]; ok { + paramsMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + paramsMap[key] = value.(string) + } + serDeInfo.Parameters = aws.StringMap(paramsMap) + } + + if v, ok := s["serialization_library"]; ok { + serDeInfo.SerializationLibrary = aws.String(v.(string)) + } + + return serDeInfo +} + +func expandSortColumns(columns []interface{}) []*glue.Order { + orderSlice := []*glue.Order{} + for _, element := range columns { + elementMap := element.(map[string]interface{}) + + order := &glue.Order{ + Column: aws.String(elementMap["column"].(string)), + } + + if v, ok := elementMap["sort_order"]; ok { + order.SortOrder = aws.Int64(int64(v.(int))) + } + + orderSlice = append(orderSlice, order) + } + + return orderSlice +} + +func expandSkewedInfo(s map[string]interface{}) *glue.SkewedInfo { + skewedInfo := &glue.SkewedInfo{} + + if v, ok := s["skewed_column_names"]; ok { + columnsSlice := make([]string, len(v.([]interface{}))) + for i, item := range v.([]interface{}) { + columnsSlice[i] = fmt.Sprint(item) + } + skewedInfo.SkewedColumnNames = aws.StringSlice(columnsSlice) + } + + if v, ok := s["skewed_column_value_location_maps"]; ok { + typeMap := map[string]string{} + for key, value := range v.(map[string]interface{}) { + typeMap[key] = value.(string) + } + skewedInfo.SkewedColumnValueLocationMaps = aws.StringMap(typeMap) + } + + if v, ok := s["skewed_column_values"]; ok { + columnsSlice := make([]string, len(v.([]interface{}))) + for i, item := range v.([]interface{}) { + columnsSlice[i] = fmt.Sprint(item) + } + skewedInfo.SkewedColumnValues = aws.StringSlice(columnsSlice) + } + + return skewedInfo +} + +func flattenStorageDescriptor(s *glue.StorageDescriptor) []map[string]interface{} { + storageDescriptors := make([]map[string]interface{}, 1) + storageDescriptors[0] = structs.Map(s) + return storageDescriptors +} diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go index da35b88a3a0..4a181af7755 100644 --- a/aws/resource_aws_glue_catalog_table_test.go +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -15,6 +15,7 @@ import ( func TestAccAWSGlueCatalogTable_full(t *testing.T) { rInt := acctest.RandInt() description := "A test table from terraform" + tableName := "aws_glue_catalog_table.test" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -32,7 +33,7 @@ func TestAccAWSGlueCatalogTable_full(t *testing.T) { fmt.Sprintf("my_test_catalog_table_%d", rInt), ), resource.TestCheckResourceAttr( - "aws_glue_catalog_table.test", + tableName, "database_name", fmt.Sprintf("my_test_catalog_database_%d", rInt), ), @@ -42,17 +43,44 @@ func TestAccAWSGlueCatalogTable_full(t *testing.T) { Config: testAccGlueCatalogTable_full(rInt, description), Destroy: false, Check: resource.ComposeTestCheckFunc( - testAccCheckGlueCatalogTableExists("aws_glue_catalog_table.test"), - resource.TestCheckResourceAttr( - "aws_glue_catalog_table.test", - "name", - fmt.Sprintf("my_test_catalog_table_%d", rInt), - ), - resource.TestCheckResourceAttr( - "aws_glue_catalog_table.test", - "database_name", - fmt.Sprintf("my_test_catalog_database_%d", rInt), - ), + testAccCheckGlueCatalogTableExists(tableName), + resource.TestCheckResourceAttr(tableName, "name", fmt.Sprintf("my_test_catalog_table_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "database_name", fmt.Sprintf("my_test_catalog_database_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "description", description), + resource.TestCheckResourceAttr(tableName, "owner", "my_owner"), + resource.TestCheckResourceAttr(tableName, "retention", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.name", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.type", "int"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.comment", "my_column1_comment"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.name", "my_column_2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.type", "string"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.comment", "my_column2_comment"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.location", "my_location"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.input_format", "SequenceFileInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.output_format", "SequenceFileInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.compressed", "false"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.number_of_buckets", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.name", "ser_de_name"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.parameters.param1", "param_val_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.serialization_library", "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.bucket_columns.0", "bucket_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.column", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.sort_order", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.parameters.param1", "param1_val"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_names.0", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_value_location_maps.my_column_1", "my_column_1_val_loc_map"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_values.0", "skewed_val_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.stored_as_sub_directories", "false"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.name", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.type", "int"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.comment", "my_column_1_comment"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.name", "my_column_2"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.type", "string"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.comment", "my_column_2_comment"), + resource.TestCheckResourceAttr(tableName, "view_original_text", "view_original_text_1"), + resource.TestCheckResourceAttr(tableName, "view_expanded_text", "view_expanded_text_1"), + resource.TestCheckResourceAttr(tableName, "table_type", "VIRTUAL_VIEW"), + resource.TestCheckResourceAttr(tableName, "parameters.param1", "param1_val"), ), }, }, @@ -79,49 +107,47 @@ resource "aws_glue_catalog_database" "test" { } resource "aws_glue_catalog_table" "test" { - name = "my_test_table_%d" + name = "my_test_catalog_table_%d" database_name = "${aws_glue_catalog_database.test.name}" description = "%s" owner = "my_owner" retention = 1 storage_descriptor { - /* columns = [ - { - name = "my_column_1" - type = "int" - comment = "my_column1_comment" - }, - { - name = "my_column_2" - type = "string" - comment = "my_column2_comment" - } - ] */ + columns = [ + { + name = "my_column_1" + type = "int" + comment = "my_column1_comment" + }, + { + name = "my_column_2" + type = "string" + comment = "my_column2_comment" + } + ] location = "my_location" input_format = "SequenceFileInputFormat" output_format = "SequenceFileInputFormat" compressed = false number_of_buckets = 1 - /* ser_de_info { + ser_de_info { name = "ser_de_name" parameters { param1 = "param_val_1" } serialization_library = "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" - } */ - bucket_columns = [ - "bucket_column_1", - ] - /* sort_columns = [ + } + bucket_columns = ["bucket_column_1"] + sort_columns = [ { column = "my_column_1" sort_order = 1 } - ] */ + ] parameters { param1 = "param1_val" } - /* skewed_info { + skewed_info { skewed_column_names = [ "my_column_1" ] @@ -131,19 +157,19 @@ resource "aws_glue_catalog_table" "test" { skewed_column_values = [ "skewed_val_1" ] - } */ + } stored_as_sub_directories = false } partition_keys = [ { name = "my_column_1" type = "int" - comment = "my_column1_comment" + comment = "my_column_1_comment" }, { name = "my_column_2" type = "string" - comment = "my_column2_comment" + comment = "my_column_2_comment" } ] view_original_text = "view_original_text_1" From 2ac0c2d0206c0f39ee58e0fac8dffa5df0aa5276 Mon Sep 17 00:00:00 2001 From: Tom Hutchinson Date: Wed, 25 Apr 2018 18:01:38 +0100 Subject: [PATCH 0853/3316] fix glue table resource read method --- aws/resource_aws_glue_catalog_table.go | 167 +++++++++--- aws/resource_aws_glue_catalog_table_test.go | 282 ++++++++++++++++++++ 2 files changed, 417 insertions(+), 32 deletions(-) diff --git a/aws/resource_aws_glue_catalog_table.go b/aws/resource_aws_glue_catalog_table.go index 10b26f65b78..4185dddd002 100644 --- a/aws/resource_aws_glue_catalog_table.go +++ b/aws/resource_aws_glue_catalog_table.go @@ -8,8 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" "github.com/hashicorp/terraform/helper/schema" - - "github.com/fatih/structs" ) func resourceAwsGlueCatalogTable() *schema.Resource { @@ -243,24 +241,6 @@ func resourceAwsGlueCatalogTableCreate(t *schema.ResourceData, meta interface{}) return resourceAwsGlueCatalogTableRead(t, meta) } -func resourceAwsGlueCatalogTableUpdate(t *schema.ResourceData, meta interface{}) error { - glueconn := meta.(*AWSClient).glueconn - - catalogID, dbName, _ := readAwsGlueTableID(t.Id()) - - updateTableInput := &glue.UpdateTableInput{ - CatalogId: aws.String(catalogID), - DatabaseName: aws.String(dbName), - TableInput: expandGlueTableInput(t), - } - - if _, err := glueconn.UpdateTable(updateTableInput); err != nil { - return fmt.Errorf("Error updating Glue Catalog Table: %s", err) - } - - return resourceAwsGlueCatalogTableRead(t, meta) -} - func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn @@ -289,20 +269,34 @@ func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) e t.Set("description", out.Table.Description) t.Set("owner", out.Table.Owner) t.Set("retention", out.Table.Retention) - - if out.Table.StorageDescriptor != nil { - t.Set("storage_descriptor", flattenStorageDescriptor(out.Table.StorageDescriptor)) - } - - t.Set("partition_keys", out.Table.PartitionKeys) + t.Set("storage_descriptor", flattenStorageDescriptor(out.Table.StorageDescriptor)) + t.Set("partition_keys", flattenGlueColumns(out.Table.PartitionKeys)) t.Set("view_original_text", out.Table.ViewOriginalText) t.Set("view_expanded_text", out.Table.ViewExpandedText) t.Set("table_type", out.Table.TableType) - t.Set("parameters", out.Table.Parameters) + t.Set("parameters", flattenStringParameters(out.Table.Parameters)) return nil } +func resourceAwsGlueCatalogTableUpdate(t *schema.ResourceData, meta interface{}) error { + glueconn := meta.(*AWSClient).glueconn + + catalogID, dbName, _ := readAwsGlueTableID(t.Id()) + + updateTableInput := &glue.UpdateTableInput{ + CatalogId: aws.String(catalogID), + DatabaseName: aws.String(dbName), + TableInput: expandGlueTableInput(t), + } + + if _, err := glueconn.UpdateTable(updateTableInput); err != nil { + return fmt.Errorf("Error updating Glue Catalog Table: %s", err) + } + + return resourceAwsGlueCatalogTableRead(t, meta) +} + func resourceAwsGlueCatalogTableDelete(t *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn catalogID, dbName, name := readAwsGlueTableID(t.Id()) @@ -412,7 +406,7 @@ func expandGlueStorageDescriptor(s map[string]interface{}) *glue.StorageDescript storageDescriptor.BucketColumns = aws.StringSlice(bucketColumns) } - if v, ok := s["sort_colums"]; ok { + if v, ok := s["sort_columns"]; ok { storageDescriptor.SortColumns = expandSortColumns(v.([]interface{})) } @@ -483,8 +477,9 @@ func expandSerDeInfo(s map[string]interface{}) *glue.SerDeInfo { } func expandSortColumns(columns []interface{}) []*glue.Order { - orderSlice := []*glue.Order{} - for _, element := range columns { + orderSlice := make([]*glue.Order, len(columns)) + + for i, element := range columns { elementMap := element.(map[string]interface{}) order := &glue.Order{ @@ -495,7 +490,7 @@ func expandSortColumns(columns []interface{}) []*glue.Order { order.SortOrder = aws.Int64(int64(v.(int))) } - orderSlice = append(orderSlice, order) + orderSlice[i] = order } return orderSlice @@ -532,7 +527,115 @@ func expandSkewedInfo(s map[string]interface{}) *glue.SkewedInfo { } func flattenStorageDescriptor(s *glue.StorageDescriptor) []map[string]interface{} { + if s == nil { + storageDescriptors := make([]map[string]interface{}, 0) + return storageDescriptors + } + storageDescriptors := make([]map[string]interface{}, 1) - storageDescriptors[0] = structs.Map(s) + + storageDescriptor := make(map[string]interface{}) + + storageDescriptor["columns"] = flattenGlueColumns(s.Columns) + storageDescriptor["location"] = *s.Location + storageDescriptor["input_format"] = *s.InputFormat + storageDescriptor["output_format"] = *s.OutputFormat + storageDescriptor["compressed"] = *s.Compressed + storageDescriptor["number_of_buckets"] = *s.NumberOfBuckets + storageDescriptor["ser_de_info"] = flattenSerDeInfo(s.SerdeInfo) + storageDescriptor["bucket_columns"] = flattenStringList(s.BucketColumns) + storageDescriptor["sort_columns"] = flattenOrders(s.SortColumns) + storageDescriptor["parameters"] = flattenStringParameters(s.Parameters) + storageDescriptor["skewed_info"] = flattenSkewedInfo(s.SkewedInfo) + storageDescriptor["stored_as_sub_directories"] = *s.StoredAsSubDirectories + + storageDescriptors[0] = storageDescriptor + return storageDescriptors } + +func flattenGlueColumns(cs []*glue.Column) []map[string]string { + columnsSlice := make([]map[string]string, len(cs)) + if len(cs) > 0 { + for i, v := range cs { + columnsSlice[i] = flattenGlueColumn(v) + } + } + + return columnsSlice +} + +func flattenGlueColumn(c *glue.Column) map[string]string { + column := make(map[string]string) + + if v := *c.Name; v != "" { + column["name"] = v + } + + if v := *c.Type; v != "" { + column["type"] = v + } + + if v := *c.Comment; v != "" { + column["comment"] = v + } + + return column +} + +func flattenStringParameters(p map[string]*string) map[string]string { + tParams := make(map[string]string) + if len(p) > 0 { + for key, value := range p { + tParams[key] = *value + } + } + + return tParams +} + +func flattenSerDeInfo(s *glue.SerDeInfo) []map[string]interface{} { + if s == nil { + serDeInfos := make([]map[string]interface{}, 0) + return serDeInfos + } + + serDeInfos := make([]map[string]interface{}, 1) + serDeInfo := make(map[string]interface{}) + + serDeInfo["name"] = *s.Name + serDeInfo["parameters"] = flattenStringParameters(s.Parameters) + serDeInfo["serialization_library"] = *s.SerializationLibrary + + serDeInfos[0] = serDeInfo + return serDeInfos +} + +func flattenOrders(os []*glue.Order) []map[string]interface{} { + orders := make([]map[string]interface{}, len(os)) + for i, v := range os { + order := make(map[string]interface{}) + order["column"] = *v.Column + order["sort_order"] = *v.SortOrder + orders[i] = order + } + + return orders +} + +func flattenSkewedInfo(s *glue.SkewedInfo) []map[string]interface{} { + if s == nil { + skewedInfoSlice := make([]map[string]interface{}, 0) + return skewedInfoSlice + } + + skewedInfoSlice := make([]map[string]interface{}, 1) + + skewedInfo := make(map[string]interface{}) + skewedInfo["skewed_column_names"] = flattenStringList(s.SkewedColumnNames) + skewedInfo["skewed_column_value_location_maps"] = flattenStringParameters(s.SkewedColumnValueLocationMaps) + skewedInfo["skewed_column_values"] = flattenStringList(s.SkewedColumnValues) + skewedInfoSlice[0] = skewedInfo + + return skewedInfoSlice +} diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go index 4a181af7755..819eeabeb3d 100644 --- a/aws/resource_aws_glue_catalog_table_test.go +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -12,11 +12,99 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func TestAccAWSGlueCatalogTable_basic(t *testing.T) { + rInt := acctest.RandInt() + tableName := "aws_glue_catalog_table.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckGlueTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCatalogTable_basic(rInt), + Destroy: false, + Check: resource.ComposeTestCheckFunc( + testAccCheckGlueCatalogTableExists("aws_glue_catalog_table.test"), + resource.TestCheckResourceAttr( + "aws_glue_catalog_table.test", + "name", + fmt.Sprintf("my_test_catalog_table_%d", rInt), + ), + resource.TestCheckResourceAttr( + tableName, + "database_name", + fmt.Sprintf("my_test_catalog_database_%d", rInt), + ), + ), + }, + }, + }) +} + func TestAccAWSGlueCatalogTable_full(t *testing.T) { rInt := acctest.RandInt() description := "A test table from terraform" tableName := "aws_glue_catalog_table.test" + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckGlueTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCatalogTable_full(rInt, description), + Destroy: false, + Check: resource.ComposeTestCheckFunc( + testAccCheckGlueCatalogTableExists(tableName), + resource.TestCheckResourceAttr(tableName, "name", fmt.Sprintf("my_test_catalog_table_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "database_name", fmt.Sprintf("my_test_catalog_database_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "description", description), + resource.TestCheckResourceAttr(tableName, "owner", "my_owner"), + resource.TestCheckResourceAttr(tableName, "retention", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.name", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.type", "int"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.comment", "my_column1_comment"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.name", "my_column_2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.type", "string"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.comment", "my_column2_comment"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.location", "my_location"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.input_format", "SequenceFileInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.output_format", "SequenceFileInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.compressed", "false"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.number_of_buckets", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.name", "ser_de_name"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.parameters.param1", "param_val_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.serialization_library", "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.bucket_columns.0", "bucket_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.column", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.sort_order", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.parameters.param1", "param1_val"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_names.0", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_value_location_maps.my_column_1", "my_column_1_val_loc_map"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_values.0", "skewed_val_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.stored_as_sub_directories", "false"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.name", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.type", "int"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.comment", "my_column_1_comment"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.name", "my_column_2"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.type", "string"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.comment", "my_column_2_comment"), + resource.TestCheckResourceAttr(tableName, "view_original_text", "view_original_text_1"), + resource.TestCheckResourceAttr(tableName, "view_expanded_text", "view_expanded_text_1"), + resource.TestCheckResourceAttr(tableName, "table_type", "VIRTUAL_VIEW"), + resource.TestCheckResourceAttr(tableName, "parameters.param1", "param1_val"), + ), + }, + }, + }) +} + +func TestAccAWSGlueCatalogTable_update_addValues(t *testing.T) { + rInt := acctest.RandInt() + description := "A test table from terraform" + tableName := "aws_glue_catalog_table.test" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -87,6 +175,114 @@ func TestAccAWSGlueCatalogTable_full(t *testing.T) { }) } +func TestAccAWSGlueCatalogTable_update_replaceValues(t *testing.T) { + rInt := acctest.RandInt() + description := "A test table from terraform" + tableName := "aws_glue_catalog_table.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckGlueTableDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCatalogTable_full(rInt, description), + Destroy: false, + Check: resource.ComposeTestCheckFunc( + testAccCheckGlueCatalogTableExists(tableName), + resource.TestCheckResourceAttr(tableName, "name", fmt.Sprintf("my_test_catalog_table_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "database_name", fmt.Sprintf("my_test_catalog_database_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "description", description), + resource.TestCheckResourceAttr(tableName, "owner", "my_owner"), + resource.TestCheckResourceAttr(tableName, "retention", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.name", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.type", "int"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.comment", "my_column1_comment"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.name", "my_column_2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.type", "string"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.comment", "my_column2_comment"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.location", "my_location"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.input_format", "SequenceFileInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.output_format", "SequenceFileInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.compressed", "false"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.number_of_buckets", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.name", "ser_de_name"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.parameters.param1", "param_val_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.serialization_library", "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.bucket_columns.0", "bucket_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.column", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.sort_order", "1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.parameters.param1", "param1_val"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_names.0", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_value_location_maps.my_column_1", "my_column_1_val_loc_map"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_values.0", "skewed_val_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.stored_as_sub_directories", "false"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.name", "my_column_1"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.type", "int"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.comment", "my_column_1_comment"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.name", "my_column_2"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.type", "string"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.comment", "my_column_2_comment"), + resource.TestCheckResourceAttr(tableName, "view_original_text", "view_original_text_1"), + resource.TestCheckResourceAttr(tableName, "view_expanded_text", "view_expanded_text_1"), + resource.TestCheckResourceAttr(tableName, "table_type", "VIRTUAL_VIEW"), + resource.TestCheckResourceAttr(tableName, "parameters.param1", "param1_val"), + ), + }, + { + Config: testAccGlueCatalogTable_full_replacedValues(rInt), + Destroy: false, + Check: resource.ComposeTestCheckFunc( + testAccCheckGlueCatalogTableExists(tableName), + resource.TestCheckResourceAttr(tableName, "name", fmt.Sprintf("my_test_catalog_table_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "database_name", fmt.Sprintf("my_test_catalog_database_%d", rInt)), + resource.TestCheckResourceAttr(tableName, "description", "A test table from terraform2"), + resource.TestCheckResourceAttr(tableName, "owner", "my_owner2"), + resource.TestCheckResourceAttr(tableName, "retention", "2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.name", "my_column_12"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.type", "date"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.0.comment", "my_column1_comment2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.name", "my_column_22"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.type", "timestamp"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.columns.1.comment", "my_column2_comment2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.location", "my_location2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.input_format", "TextInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.output_format", "TextInputFormat"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.compressed", "true"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.number_of_buckets", "12"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.name", "ser_de_name2"), + resource.TestCheckNoResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.parameters.param1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.parameters.param2", "param_val_12"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.ser_de_info.0.serialization_library", "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.bucket_columns.0", "bucket_column_12"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.bucket_columns.1", "bucket_column_2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.column", "my_column_12"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.sort_columns.0.sort_order", "0"), + resource.TestCheckNoResourceAttr(tableName, "storage_descriptor.0.parameters.param1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.parameters.param12", "param1_val2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_names.0", "my_column_12"), + resource.TestCheckNoResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_value_location_maps.my_column_1"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_value_location_maps.my_column_12", "my_column_1_val_loc_map2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_values.0", "skewed_val_12"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.skewed_info.0.skewed_column_values.1", "skewed_val_2"), + resource.TestCheckResourceAttr(tableName, "storage_descriptor.0.stored_as_sub_directories", "true"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.name", "my_column_12"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.type", "date"), + resource.TestCheckResourceAttr(tableName, "partition_keys.0.comment", "my_column_1_comment2"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.name", "my_column_22"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.type", "timestamp"), + resource.TestCheckResourceAttr(tableName, "partition_keys.1.comment", "my_column_2_comment2"), + resource.TestCheckResourceAttr(tableName, "view_original_text", "view_original_text_12"), + resource.TestCheckResourceAttr(tableName, "view_expanded_text", "view_expanded_text_12"), + resource.TestCheckResourceAttr(tableName, "table_type", "EXTERNAL_TABLE"), + //resource.TestCheckResourceAttr(tableName, "parameters.param1", "param1_val"), + resource.TestCheckResourceAttr(tableName, "parameters.param2", "param1_val2"), + ), + }, + }, + }) +} + func testAccGlueCatalogTable_basic(rInt int) string { return fmt.Sprintf(` resource "aws_glue_catalog_database" "test" { @@ -182,6 +378,92 @@ resource "aws_glue_catalog_table" "test" { `, rInt, rInt, desc) } +func testAccGlueCatalogTable_full_replacedValues(rInt int) string { + return fmt.Sprintf(` +resource "aws_glue_catalog_database" "test" { + name = "my_test_catalog_database_%d" +} + +resource "aws_glue_catalog_table" "test" { + name = "my_test_catalog_table_%d" + database_name = "${aws_glue_catalog_database.test.name}" + description = "A test table from terraform2" + owner = "my_owner2" + retention = 2 + storage_descriptor { + columns = [ + { + name = "my_column_12" + type = "date" + comment = "my_column1_comment2" + }, + { + name = "my_column_22" + type = "timestamp" + comment = "my_column2_comment2" + } + ] + location = "my_location2" + input_format = "TextInputFormat" + output_format = "TextInputFormat" + compressed = true + number_of_buckets = 12 + ser_de_info { + name = "ser_de_name2" + parameters { + param2 = "param_val_12" + } + serialization_library = "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe2" + } + bucket_columns = [ + "bucket_column_12", + "bucket_column_2" + ] + sort_columns = [ + { + column = "my_column_12" + sort_order = 0 + } + ] + parameters { + param12 = "param1_val2" + } + skewed_info { + skewed_column_names = [ + "my_column_12" + ] + skewed_column_value_location_maps { + my_column_12 = "my_column_1_val_loc_map2" + } + skewed_column_values = [ + "skewed_val_12", + "skewed_val_2" + ] + } + stored_as_sub_directories = true + } + partition_keys = [ + { + name = "my_column_12" + type = "date" + comment = "my_column_1_comment2" + }, + { + name = "my_column_22" + type = "timestamp" + comment = "my_column_2_comment2" + } + ] + view_original_text = "view_original_text_12" + view_expanded_text = "view_expanded_text_12" + table_type = "EXTERNAL_TABLE" + parameters { + param2 = "param1_val2" + } +} +`, rInt, rInt) +} + func testAccCheckGlueTableDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).glueconn From 25636548c604ced7361262862fe36cb32a6cc01d Mon Sep 17 00:00:00 2001 From: Tom Hutchinson Date: Thu, 26 Apr 2018 16:01:02 +0100 Subject: [PATCH 0854/3316] add glue table md to documentation --- website/aws.erb | 3 + .../docs/r/glue_catalog_table.html.markdown | 76 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 website/docs/r/glue_catalog_table.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 8d4e5e77ebd..e1e5d969945 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1099,6 +1099,9 @@ > aws_glue_job + > + aws_glue_catalog_table + diff --git a/website/docs/r/glue_catalog_table.html.markdown b/website/docs/r/glue_catalog_table.html.markdown new file mode 100644 index 00000000000..7855d3d9045 --- /dev/null +++ b/website/docs/r/glue_catalog_table.html.markdown @@ -0,0 +1,76 @@ +--- +layout: "aws" +page_title: "AWS: aws_glue_catalog_table" +sidebar_current: "docs-aws-resource-glue-catalog-table" +description: |- + Provides a Glue Catalog Table. +--- + +# aws_glue_catalog_table + +Provides a Glue Catalog Table Resource. You can refer to the [Glue Developer Guide](http://docs.aws.amazon.com/glue/latest/dg/populate-data-catalog.html) for a full explanation of the Glue Data Catalog functionality. + +## Example Usage + +```hcl +resource "aws_glue_catalog_table" "aws_glue_catalog_table" { + name = "MyCatalogTable" + database_name = "MyCatalogDatabase" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Name of the table. For Hive compatibility, this must be entirely lowercase. +* `database_name` - (Required) Name of the metadata database where the table metadata resides. For Hive compatibility, this must be all lowercase. +* `catalog_id` - (Optional) ID of the Glue Catalog and database to create the table in. If omitted, this defaults to the AWS Account ID plus the database name. +* `description` - (Optional) Description of the table. +* `owner` - (Optional) Owner of the table. +* `retention` - (Optional) Retention time for this table. +* `storage_descriptor` - (Optional) A [storage descriptor](#storage_descriptor) object containing information about the physical storage of this table. You can refer to the [Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-tables.html#aws-glue-api-catalog-tables-StorageDescriptor) for a full explanation of this object. +* `partition_keys` - (Optional) A list of columns by which the table is partitioned. Only primitive types are supported as partition keys. +* `view_original_text` - (Optional) If the table is a view, the original text of the view; otherwise null. +* `view_expanded_text` - (Optional) If the table is a view, the expanded text of the view; otherwise null. +* `table_type` - (Optional) The type of this table (EXTERNAL_TABLE, VIRTUAL_VIEW, etc.). +* `parameters` - (Optional) Properties associated with this table, as a list of key-value pairs. + +##### storage_descriptor + +* `columns` - (Optional) A list of the [Columns](#column) in the table. +* `location` - (Optional) The physical location of the table. By default this takes the form of the warehouse location, followed by the database location in the warehouse, followed by the table name. +* `input_format` - (Optional) The input format: SequenceFileInputFormat (binary), or TextInputFormat, or a custom format. +* `output_format` - (Optional) The output format: SequenceFileOutputFormat (binary), or IgnoreKeyTextOutputFormat, or a custom format. +* `compressed` - (Optional) True if the data in the table is compressed, or False if not. +* `number_of_buckets` - (Optional) Must be specified if the table contains any dimension columns. +* `ser_de_info` - (Optional) [Serialization/deserialization (SerDe)](#ser_de_info) information. +* `bucket_columns` - (Optional) A list of reducer grouping columns, clustering columns, and bucketing columns in the table. +* `sort_columns` - (Optional) A list of [Order](#sort_column) objects specifying the sort order of each bucket in the table. +* `parameters` - (Optional) User-supplied properties in key-value form. +* `skewed_info` - (Optional) Information about values that appear very frequently in a column (skewed values). +* `stored_as_sub_directories` - (Optional) True if the table data is stored in subdirectories, or False if not. + +##### column + +* `name` - (Required) The name of the Column. +* `type` - (Optional) The datatype of data in the Column. +* `comment` - (Optional) Free-form text comment. + +##### ser_de_info + +* `name` - (Optional) Name of the SerDe. +* `parameters` - (Optional) Usually the class that implements the SerDe. An example is: org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe. +* `serialization_library` - (Optional) A list of initialization parameters for the SerDe, in key-value form. + +##### sort_column + +* `column` - (Required) The name of the column. +* `sort_order` - (Required) Indicates that the column is sorted in ascending order (== 1), or in descending order (==0). + +##### skewed_info + +* `skewed_column_names` - (Optional) A list of names of columns that contain skewed values. +* `skewed_column_value_location_maps` - (Optional) A list of values that appear so frequently as to be considered skewed. +* `skewed_column_values` - (Optional) A mapping of skewed values to the columns that contain them. + From ac2ea1693ed2efc08b50f94e6b8a7b35df190e90 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 11:38:56 -0400 Subject: [PATCH 0855/3316] Update CHANGELOG for #4362 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c01e11e773..70498d90754 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ENHANCEMENTS: BUG FIXES: +* data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] * resource/aws_launch_template: Appropriately set `security_groups` in network interfaces [GH-4364] * resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] From e145d82008d4bf34995244a7cef241d96cb6ba04 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 11:39:31 -0400 Subject: [PATCH 0856/3316] Update CHANGELOG for #4362 (forgot resource/aws_instance) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70498d90754..a5392142f24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ENHANCEMENTS: BUG FIXES: * data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] +* resource/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] * resource/aws_launch_template: Appropriately set `security_groups` in network interfaces [GH-4364] * resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] From 6cb22ebe451cce944aac66bc9858350a1dc94eb6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 11:44:11 -0400 Subject: [PATCH 0857/3316] Update CHANGELOG for #4063 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5392142f24..b041e8cd274 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] * resource/aws_autoscaling_group: Add `launch_template` argument [GH-4305] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] +* resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] * resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) [GH-2743] From 7624cc95b2ff274676989cc6823286e017b30abe Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 12:26:06 -0400 Subject: [PATCH 0858/3316] tests/resource/aws_cloudwatch_event_rule: Fix resource name in prefix test --- aws/resource_aws_cloudwatch_event_rule_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_cloudwatch_event_rule_test.go b/aws/resource_aws_cloudwatch_event_rule_test.go index 27bcdd70d56..d690237e919 100644 --- a/aws/resource_aws_cloudwatch_event_rule_test.go +++ b/aws/resource_aws_cloudwatch_event_rule_test.go @@ -50,8 +50,8 @@ func TestAccAWSCloudWatchEventRule_prefix(t *testing.T) { resource.TestStep{ Config: testAccAWSCloudWatchEventRuleConfig_prefix, Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchEventRuleExists("aws_cloudwatch_event_rule.foo", &rule), - resource.TestMatchResourceAttr("aws_cloudwatch_event_rule.foo", "name", startsWithPrefix), + testAccCheckCloudWatchEventRuleExists("aws_cloudwatch_event_rule.moobar", &rule), + resource.TestMatchResourceAttr("aws_cloudwatch_event_rule.moobar", "name", startsWithPrefix), ), }, }, From a0f8fcf7cbbc60c54cc0a0e772d5d01fc76ab03c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 12:29:22 -0400 Subject: [PATCH 0859/3316] Update CHANGELOG for #2752 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b041e8cd274..3b9b4a1d53e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] * resource/aws_autoscaling_group: Add `launch_template` argument [GH-4305] +* resource/aws_cloudwatch_event_rule: Add `name_prefix` argument [GH-2752] +* resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] * resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] From 6ee5bbaf49a326ef81f9ed2f20cb043187c527ba Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Thu, 26 Apr 2018 12:19:49 -0500 Subject: [PATCH 0860/3316] Fixed error message --- aws/resource_aws_rds_cluster.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 461c4d19e0c..3892a82ec40 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -473,10 +473,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } else if v, ok := d.GetOk("s3_import"); ok { if _, ok := d.GetOk("master_password"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "password": required field is not set`, d.Get("name").(string)) + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "master_password": required field is not set`, d.Get("name").(string)) } if _, ok := d.GetOk("master_username"); !ok { - return fmt.Errorf(`provider.aws: aws_db_instance: %s: "username": required field is not set`, d.Get("name").(string)) + return fmt.Errorf(`provider.aws: aws_db_instance: %s: "master_username": required field is not set`, d.Get("name").(string)) } s3_bucket := v.([]interface{})[0].(map[string]interface{}) createOpts := &rds.RestoreDBClusterFromS3Input{ From 4718aadecc32cb2774660d4dafaef1400c130b31 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sun, 28 Jan 2018 01:20:01 +0100 Subject: [PATCH 0861/3316] New Data Source: aws_mq_broker --- aws/data_source_aws_mq_broker.go | 181 +++++++++++++++++++++++++ aws/data_source_aws_mq_broker_test.go | 169 +++++++++++++++++++++++ aws/provider.go | 1 + aws/resource_aws_mq_broker.go | 1 - aws/structure.go | 8 +- website/aws.erb | 3 + website/docs/d/mq_broker.html.markdown | 45 ++++++ 7 files changed, 404 insertions(+), 4 deletions(-) create mode 100644 aws/data_source_aws_mq_broker.go create mode 100644 aws/data_source_aws_mq_broker_test.go create mode 100644 website/docs/d/mq_broker.html.markdown diff --git a/aws/data_source_aws_mq_broker.go b/aws/data_source_aws_mq_broker.go new file mode 100644 index 00000000000..53642a100eb --- /dev/null +++ b/aws/data_source_aws_mq_broker.go @@ -0,0 +1,181 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/mq" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsMqBroker() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsmQBrokerRead, + + Schema: map[string]*schema.Schema{ + "broker_id": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"broker_name"}, + }, + "broker_name": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"broker_id"}, + }, + "auto_minor_version_upgrade": { + Type: schema.TypeBool, + Computed: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "configuration": { + Type: schema.TypeList, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "revision": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + "deployment_mode": { + Type: schema.TypeString, + Computed: true, + }, + "engine_type": { + Type: schema.TypeString, + Computed: true, + }, + "engine_version": { + Type: schema.TypeString, + Computed: true, + }, + "host_instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "instances": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "console_url": { + Type: schema.TypeString, + Computed: true, + }, + "endpoints": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "maintenance_window_start_time": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "day_of_week": { + Type: schema.TypeString, + Computed: true, + }, + "time_of_day": { + Type: schema.TypeString, + Computed: true, + }, + "time_zone": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "publicly_accessible": { + Type: schema.TypeBool, + Computed: true, + }, + "security_groups": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "subnet_ids": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "user": { + Type: schema.TypeSet, + Computed: true, + Set: resourceAwsMqUserHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "console_access": { + Type: schema.TypeBool, + Computed: true, + }, + "groups": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + Computed: true, + }, + "username": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsmQBrokerRead(d *schema.ResourceData, meta interface{}) error { + if brokerId, ok := d.GetOk("broker_id"); ok { + d.SetId(brokerId.(string)) + } else { + brokerName := d.Get("broker_name").(string) + brokerId := getBrokerId(meta, brokerName) + if brokerId == "" { + return fmt.Errorf("Failed to get broker id with name: %s", brokerName) + } + d.SetId(brokerId) + } + return resourceAwsMqBrokerRead(d, meta) +} + +func getBrokerId(meta interface{}, name string) (id string) { + conn := meta.(*AWSClient).mqconn + var nextToken string + for { + out, err := conn.ListBrokers(&mq.ListBrokersInput{NextToken: aws.String(nextToken)}) + if err != nil { + log.Printf("[DEBUG] Failed to list brokers: %s", err) + return "" + } + for _, broker := range out.BrokerSummaries { + if *broker.BrokerName == name { + return *broker.BrokerId + } + } + if out.NextToken == nil { + break + } + nextToken = *out.NextToken + } + return "" +} diff --git a/aws/data_source_aws_mq_broker_test.go b/aws/data_source_aws_mq_broker_test.go new file mode 100644 index 00000000000..807230ac1d5 --- /dev/null +++ b/aws/data_source_aws_mq_broker_test.go @@ -0,0 +1,169 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAWSMqBroker_basic(t *testing.T) { + rString := acctest.RandString(7) + prefix := "tf-acctest-d-aws-mq-broker" + brokerName := fmt.Sprintf("%s-%s", prefix, rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSMqBrokerConfigBasic(brokerName, prefix), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "broker_name", brokerName), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "auto_minor_version_upgrade", "true"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "configuration.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "engine_version", "5.15.0"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "host_instance_type", "mq.t2.micro"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "instances.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "maintenance_window_start_time.#", "1"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "publicly_accessible", "true"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "security_groups.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "subnet_ids.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "user.#", "2"), + resource.TestCheckResourceAttrSet("data.aws_mq_broker.by_id", "arn"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "broker_name", brokerName), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "auto_minor_version_upgrade", "true"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "configuration.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "engine_type", "ActiveMQ"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "engine_version", "5.15.0"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "host_instance_type", "mq.t2.micro"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "instances.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "maintenance_window_start_time.#", "1"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "publicly_accessible", "true"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "security_groups.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "subnet_ids.#", "2"), + resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "user.#", "2"), + resource.TestCheckResourceAttrSet("data.aws_mq_broker.by_name", "arn"), + ), + }, + }, + }) +} + +func testAccDataSourceAWSMqBrokerConfigBasic(brokerName, prefix string) string { + return fmt.Sprintf(` +variable "prefix" { + default = "%s" +} + +data "aws_availability_zones" "available" {} + +resource "aws_vpc" "acctest" { + cidr_block = "10.0.0.0/16" + + tags { + Name = "${var.prefix}" + } +} + +resource "aws_internet_gateway" "acctest" { + vpc_id = "${aws_vpc.acctest.id}" +} + +resource "aws_route_table" "acctest" { + vpc_id = "${aws_vpc.acctest.id}" + + route { + cidr_block = "0.0.0.0/0" + gateway_id = "${aws_internet_gateway.acctest.id}" + } +} + +resource "aws_subnet" "acctest" { + count = 2 + cidr_block = "10.0.${count.index}.0/24" + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + vpc_id = "${aws_vpc.acctest.id}" + + tags { + Name = "${var.prefix}" + } +} + +resource "aws_route_table_association" "acctest" { + count = 2 + subnet_id = "${aws_subnet.acctest.*.id[count.index]}" + route_table_id = "${aws_route_table.acctest.id}" +} + +resource "aws_security_group" "acctest" { + count = 2 + name = "${var.prefix}-${count.index}" + vpc_id = "${aws_vpc.acctest.id}" +} + +resource "aws_mq_configuration" "acctest" { + name = "${var.prefix}" + engine_type = "ActiveMQ" + engine_version = "5.15.0" + + data = < + + +DATA +} + +resource "aws_mq_broker" "acctest" { + auto_minor_version_upgrade = true + apply_immediately = true + broker_name = "%s" + + configuration { + id = "${aws_mq_configuration.acctest.id}" + revision = "${aws_mq_configuration.acctest.latest_revision}" + } + + deployment_mode = "ACTIVE_STANDBY_MULTI_AZ" + engine_type = "ActiveMQ" + engine_version = "5.15.0" + host_instance_type = "mq.t2.micro" + + maintenance_window_start_time { + day_of_week = "TUESDAY" + time_of_day = "02:00" + time_zone = "CET" + } + + publicly_accessible = true + security_groups = ["${aws_security_group.acctest.*.id}"] + subnet_ids = ["${aws_subnet.acctest.*.id}"] + + user { + username = "Ender" + password = "AndrewWiggin" + } + + user { + username = "Petra" + password = "PetraArkanian" + console_access = true + groups = ["dragon", "salamander", "leopard"] + } + + depends_on = ["aws_internet_gateway.acctest"] +} + +data "aws_mq_broker" "by_id" { + broker_id = "${aws_mq_broker.acctest.id}" +} + +data "aws_mq_broker" "by_name" { + broker_name = "${aws_mq_broker.acctest.broker_name}" +} +`, prefix, brokerName) +} diff --git a/aws/provider.go b/aws/provider.go index 37bc6f95ad2..8a3ce6c3b90 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -216,6 +216,7 @@ func Provider() terraform.ResourceProvider { "aws_kms_key": dataSourceAwsKmsKey(), "aws_kms_secret": dataSourceAwsKmsSecret(), "aws_lambda_function": dataSourceAwsLambdaFunction(), + "aws_mq_broker": dataSourceAwsMqBroker(), "aws_nat_gateway": dataSourceAwsNatGateway(), "aws_network_interface": dataSourceAwsNetworkInterface(), "aws_partition": dataSourceAwsPartition(), diff --git a/aws/resource_aws_mq_broker.go b/aws/resource_aws_mq_broker.go index aa80ed629bb..f3b4e0f8a39 100644 --- a/aws/resource_aws_mq_broker.go +++ b/aws/resource_aws_mq_broker.go @@ -152,7 +152,6 @@ func resourceAwsMqBroker() *schema.Resource { }, }, }, - "arn": { Type: schema.TypeString, Computed: true, diff --git a/aws/structure.go b/aws/structure.go index 501a3443dda..658022841c8 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -3441,13 +3441,15 @@ func flattenMqUsers(users []*mq.User, cfgUsers []interface{}) *schema.Set { out := make([]interface{}, 0) for _, u := range users { + m := map[string]interface{}{ + "username": *u.Username, + } password := "" if p, ok := existingPairs[*u.Username]; ok { password = p } - m := map[string]interface{}{ - "username": *u.Username, - "password": password, + if password != "" { + m["password"] = password } if u.ConsoleAccess != nil { m["console_access"] = *u.ConsoleAccess diff --git a/website/aws.erb b/website/aws.erb index 8d4e5e77ebd..fbbb0537a1e 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -217,6 +217,9 @@ > aws_lb_target_group + > + aws_mq_broker + > aws_partition diff --git a/website/docs/d/mq_broker.html.markdown b/website/docs/d/mq_broker.html.markdown new file mode 100644 index 00000000000..93abfd69d52 --- /dev/null +++ b/website/docs/d/mq_broker.html.markdown @@ -0,0 +1,45 @@ +--- +layout: "aws" +page_title: "AWS: aws_mq_broker" +sidebar_current: "docs-aws-datasource-mq_broker" +description: |- + Provides a MQ Broker data source. +--- + +# Data Source: aws_mq_broker + +Provides information about a MQ Broker. + +## Example Usage + +```hcl +variable "broker_id" { + type = "string" + default = "" +} + +variable "broker_name" { + type = "string" + default = "" +} + +data "aws_mq_broker" "by_id" { + broker_id = "${var.broker_id}" +} + +data "aws_mq_broker" "by_name" { + broker_name = "${var.broker_name}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `broker_id` - (Optional) The unique id of the mq broker. +* `broker_name` - (Optional) The unique name of the mq broker. + +## Attributes Reference + +See the [MQ Broker](/docs/providers/aws/r/mq_broker.html) for details on the returned attributes. +They are identical except for user password, which is not returned when describing broker. From 1680c094a89a2095b924ec245b995bd272fc30d9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 14:14:44 -0400 Subject: [PATCH 0862/3316] resource/aws_rds_cluster_instance: Add retries for IAM eventual consistency --- aws/resource_aws_rds_cluster_instance.go | 26 +++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index b00acf01c5d..6825b3f4095 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -268,9 +268,20 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ } log.Printf("[DEBUG] Creating RDS DB Instance opts: %s", createOpts) - resp, err := conn.CreateDBInstance(createOpts) + var resp *rds.CreateDBInstanceOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBInstance(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - return err + return fmt.Errorf("error creating RDS DB Instance: %s", err) } d.SetId(*resp.DBInstance.DBInstanceIdentifier) @@ -465,7 +476,16 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ log.Printf("[DEBUG] Send DB Instance Modification request: %#v", requestUpdate) if requestUpdate { log.Printf("[DEBUG] DB Instance Modification request: %#v", req) - _, err := conn.ModifyDBInstance(req) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.ModifyDBInstance(req) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { return fmt.Errorf("Error modifying DB Instance %s: %s", d.Id(), err) } From ec4ab4a1294b6471811763a85e49e6660e37cfa6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 14:25:00 -0400 Subject: [PATCH 0863/3316] resource/aws_rds_cluster: Add retries for IAM eventual consistency --- aws/resource_aws_rds_cluster.go | 49 +++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 141d77b8c3c..3e10f2b06c7 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -335,7 +335,16 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } log.Printf("[DEBUG] RDS Cluster restore from snapshot configuration: %s", opts) - _, err := conn.RestoreDBClusterFromSnapshot(&opts) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RestoreDBClusterFromSnapshot(&opts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { return fmt.Errorf("Error creating RDS Cluster: %s", err) } @@ -424,10 +433,20 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } log.Printf("[DEBUG] Create RDS Cluster as read replica: %s", createOpts) - resp, err := conn.CreateDBCluster(createOpts) + var resp *rds.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - log.Printf("[ERROR] Error creating RDS Cluster: %s", err) - return err + return fmt.Errorf("error creating RDS cluster: %s", err) } log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) @@ -499,10 +518,20 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } log.Printf("[DEBUG] RDS Cluster create options: %s", createOpts) - resp, err := conn.CreateDBCluster(createOpts) + var resp *rds.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) if err != nil { - log.Printf("[ERROR] Error creating RDS Cluster: %s", err) - return err + return fmt.Errorf("error creating RDS cluster: %s", err) } log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) @@ -704,8 +733,10 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.ModifyDBCluster(req) if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == rds.ErrCodeInvalidDBClusterStateFault { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "") { return resource.RetryableError(err) } return resource.NonRetryableError(err) From acc330aaf9f05b6e463b908236abae91051a3d3e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 26 Apr 2018 15:43:32 -0400 Subject: [PATCH 0864/3316] Update CHANGELOG for #4370 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b9b4a1d53e..b83e1129daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ BUG FIXES: * data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] * resource/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] * resource/aws_launch_template: Appropriately set `security_groups` in network interfaces [GH-4364] +* resource/aws_rds_cluster_instance: Add retries for IAM eventual consistency [GH-4370] * resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] ## 1.16.0 (April 25, 2018) From 7862f926730cdb1d4f2edd317579008c59526564 Mon Sep 17 00:00:00 2001 From: Artem Iarmoliuk Date: Thu, 26 Apr 2018 16:48:49 +0300 Subject: [PATCH 0865/3316] r/aws_launch_template: Fix address count interface attributes --- aws/resource_aws_launch_template.go | 10 ++++++++-- website/docs/r/launch_template.html.markdown | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 2497f717ba7..6aa619c26dd 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -982,9 +982,12 @@ func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTempl Ipv6Address: aws.String(address.(string)), }) } - networkInterface.Ipv6AddressCount = aws.Int64(int64(len(ipv6AddressList))) networkInterface.Ipv6Addresses = ipv6Addresses + if v := ni["ipv6_address_count"].(int); v > 0 { + networkInterface.Ipv6AddressCount = aws.Int64(int64(v)) + } + ipv4AddressList := ni["ipv4_addresses"].(*schema.Set).List() for _, address := range ipv4AddressList { privateIp := &ec2.PrivateIpAddressSpecification{ @@ -993,9 +996,12 @@ func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTempl } ipv4Addresses = append(ipv4Addresses, privateIp) } - networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(len(ipv4AddressList))) networkInterface.PrivateIpAddresses = ipv4Addresses + if v := ni["ipv4_address_count"].(int); v > 0 { + networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(v)) + } + return networkInterface } diff --git a/website/docs/r/launch_template.html.markdown b/website/docs/r/launch_template.html.markdown index a4af2a67c97..f858a487836 100644 --- a/website/docs/r/launch_template.html.markdown +++ b/website/docs/r/launch_template.html.markdown @@ -200,6 +200,8 @@ The `monitoring` block supports the following: Attaches one or more [Network Interfaces](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) to the instance. +Check limitations for autoscaling group in [Creating an Auto Scaling Group Using a Launch Template Guide](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-launch-template.html#limitations) + Each `network_interfaces` block supports the following: * `associate_public_ip_address` - Associate a public ip address with the network interface. Boolean value. @@ -207,8 +209,10 @@ Each `network_interfaces` block supports the following: * `description` - Description of the network interface. * `device_index` - The integer index of the network interface attachment. * `ipv6_addresses` - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. +* `ipv6_address_count` - The number of IPv6 addresses to assign to a network interface. Conflicts with `ipv6_addresses` * `network_interface_id` - The ID of the network interface to attach. * `private_ip_address` - The primary private IPv4 address. +* `ipv4_address_count` - The number of secondary private IPv4 addresses to assign to a network interface. * `ipv4_addresses` - One or more private IPv4 addresses to associate. * `security_groups` - A list of security group IDs to associate. * `subnet_id` - The VPC Subnet ID to associate. From 922acf10ff9e9801da60e6e431950d2c7d206241 Mon Sep 17 00:00:00 2001 From: John Calabrese Date: Thu, 26 Apr 2018 19:17:47 -0400 Subject: [PATCH 0866/3316] correct inconsistent docs for budgets budget Feedback: (https://github.com/terraform-providers/terraform-provider-aws/pull/1879#pullrequestreview-115530974) --- website/docs/r/budgets_budget.html.markdown | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/website/docs/r/budgets_budget.html.markdown b/website/docs/r/budgets_budget.html.markdown index 40445400a60..bc258130b42 100644 --- a/website/docs/r/budgets_budget.html.markdown +++ b/website/docs/r/budgets_budget.html.markdown @@ -15,15 +15,15 @@ Provides a budgets budget resource. Budgets use the cost visualisation provided ```hcl resource "aws_budgets_budget" "ec2" { name = "budget-ec2-monthly" - budget_type = "spend" + budget_type = "COST" limit_amount = "1200" - limit_unit = "dollars" + limit_unit = "USD" time_period_end = "2087-06-15_00:00" - time_period_start = "2017-07-01" + time_period_start = "2017-07-01_00:00" time_unit = "MONTHLY" cost_filters { - Service = "ec2" + service = "ec2" } } ``` @@ -33,9 +33,9 @@ Create a budget for *$100*. ```hcl resource "aws_budgets_budget" "cost" { ... - budget_type = "spend" + budget_type = "COST" limit_amount = "100" - limit_unit = "dollars" + limit_unit = "USD" } ``` @@ -44,7 +44,7 @@ Create a budget for s3 with a limit of *3 GB* of storage. ```hcl resource "aws_budgets_budget" "s3" { ... - budget_type = "usage" + budget_type = "USAGE" limit_amount = "3" limit_unit = "GB" } @@ -81,6 +81,7 @@ The following attributes are exported: Valid keys for `cost_types` parameter. * `include_credit` - A boolean value whether to include credits in the cost budget. Defaults to `true` +* `include_discount` - Specifies whether a budget includes discounts. Defaults to `true` * `include_other_subscription` - A boolean value whether to include other subscription costs in the cost budget. Defaults to `true` * `include_recurring` - A boolean value whether to include recurring costs in the cost budget. Defaults to `true` * `include_refund` - A boolean value whether to include refunds in the cost budget. Defaults to `true` @@ -88,6 +89,7 @@ Valid keys for `cost_types` parameter. * `include_support` - A boolean value whether to include support costs in the cost budget. Defaults to `true` * `include_tax` - A boolean value whether to include tax in the cost budget. Defaults to `true` * `include_upfront` - A boolean value whether to include upfront costs in the cost budget. Defaults to `true` +* `use_amortized` - Specifies whether a budget uses the amortized rate. Defaults to `false` * `use_blended` - A boolean value whether to use blended costs in the cost budget. Defaults to `false` Refer to [AWS CostTypes documentation](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_CostTypes.html) for further detail. From fa819daaf7081d167b84cffbb7466f830478b1f7 Mon Sep 17 00:00:00 2001 From: Tim Malone Date: Fri, 27 Apr 2018 11:34:40 +1000 Subject: [PATCH 0867/3316] Adds link to valid values for delivery_frequency Links to valid values for config_delivery_channel resource's snapshot_delivery_properties.delivery_frequency argument. I would also list the default, but I can't find it in AWS' documentation and it's not returned by the AWS API if not set. --- website/docs/r/config_delivery_channel.html.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/docs/r/config_delivery_channel.html.markdown b/website/docs/r/config_delivery_channel.html.markdown index 00d0598cfcb..57a95237d28 100644 --- a/website/docs/r/config_delivery_channel.html.markdown +++ b/website/docs/r/config_delivery_channel.html.markdown @@ -87,8 +87,9 @@ The following arguments are supported: ### `snapshot_delivery_properties` -* `delivery_frequency` - (Optional) - The frequency with which a AWS Config recurringly delivers configuration snapshots. - e.g. `One_Hour` or `Three_Hours` +* `delivery_frequency` - (Optional) - The frequency with which AWS Config recurringly delivers configuration snapshots. + e.g. `One_Hour` or `Three_Hours`. + Valid values are listed [here](https://docs.aws.amazon.com/config/latest/APIReference/API_ConfigSnapshotDeliveryProperties.html#API_ConfigSnapshotDeliveryProperties_Contents). ## Attributes Reference From 2fb62a6856a89d26b75c84c3a585b52c90e19d01 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 27 Apr 2018 07:22:07 -0400 Subject: [PATCH 0868/3316] Update CHANGELOG for #4371 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b83e1129daa..845b0ac0e7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ BUG FIXES: * data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] * resource/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] * resource/aws_launch_template: Appropriately set `security_groups` in network interfaces [GH-4364] +* resource/aws_rds_cluster: Add retries for IAM eventual consistency [GH-4371] * resource/aws_rds_cluster_instance: Add retries for IAM eventual consistency [GH-4370] * resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] From 8f88776d21bac4030bb730f4558c4dad3c6010eb Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Sat, 24 Mar 2018 18:23:46 -0400 Subject: [PATCH 0869/3316] Add 'aws_vpc_peering_connection_options' resource. --- aws/data_source_aws_vpc_peering_connection.go | 4 +- ...aws_vpc_peering_connection_options_test.go | 28 +++ aws/provider.go | 1 + aws/resource_aws_vpc_peering_connection.go | 163 ++++++---------- ...urce_aws_vpc_peering_connection_options.go | 85 +++++++++ ...aws_vpc_peering_connection_options_test.go | 103 +++++++++++ ...esource_aws_vpc_peering_connection_test.go | 174 +++++++++--------- aws/structure.go | 36 ++++ website/aws.erb | 4 + website/docs/r/vpc_peering.html.markdown | 19 +- .../docs/r/vpc_peering_accepter.html.markdown | 6 + .../docs/r/vpc_peering_options.html.markdown | 166 +++++++++++++++++ 12 files changed, 593 insertions(+), 196 deletions(-) create mode 100644 aws/import_aws_vpc_peering_connection_options_test.go create mode 100644 aws/resource_aws_vpc_peering_connection_options.go create mode 100644 aws/resource_aws_vpc_peering_connection_options_test.go create mode 100644 website/docs/r/vpc_peering_options.html.markdown diff --git a/aws/data_source_aws_vpc_peering_connection.go b/aws/data_source_aws_vpc_peering_connection.go index a78e35f03e7..b169add3c99 100644 --- a/aws/data_source_aws_vpc_peering_connection.go +++ b/aws/data_source_aws_vpc_peering_connection.go @@ -140,13 +140,13 @@ func dataSourceAwsVpcPeeringConnectionRead(d *schema.ResourceData, meta interfac d.Set("tags", tagsToMap(pcx.Tags)) if pcx.AccepterVpcInfo.PeeringOptions != nil { - if err := d.Set("accepter", flattenPeeringOptions(pcx.AccepterVpcInfo.PeeringOptions)[0]); err != nil { + if err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pcx.AccepterVpcInfo.PeeringOptions)[0]); err != nil { return err } } if pcx.RequesterVpcInfo.PeeringOptions != nil { - if err := d.Set("requester", flattenPeeringOptions(pcx.RequesterVpcInfo.PeeringOptions)[0]); err != nil { + if err := d.Set("requester", flattenVpcPeeringConnectionOptions(pcx.RequesterVpcInfo.PeeringOptions)[0]); err != nil { return err } } diff --git a/aws/import_aws_vpc_peering_connection_options_test.go b/aws/import_aws_vpc_peering_connection_options_test.go new file mode 100644 index 00000000000..e385d6a9cc0 --- /dev/null +++ b/aws/import_aws_vpc_peering_connection_options_test.go @@ -0,0 +1,28 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSVpcPeeringConnectionOptions_importBasic(t *testing.T) { + resourceName := "aws_vpc_peering_connection_options.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccVpcPeeringConnectionOptionsConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/aws/provider.go b/aws/provider.go index 37bc6f95ad2..a82ec388a8f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -558,6 +558,7 @@ func Provider() terraform.ResourceProvider { "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), "aws_default_vpc": resourceAwsDefaultVpc(), "aws_vpc": resourceAwsVpc(), "aws_vpc_endpoint": resourceAwsVpcEndpoint(), diff --git a/aws/resource_aws_vpc_peering_connection.go b/aws/resource_aws_vpc_peering_connection.go index afea54ed4c4..eb6c0a35732 100644 --- a/aws/resource_aws_vpc_peering_connection.go +++ b/aws/resource_aws_vpc_peering_connection.go @@ -7,7 +7,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" @@ -24,6 +23,12 @@ func resourceAwsVpcPeeringConnection() *schema.Resource { 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{ "peer_owner_id": { Type: schema.TypeString, @@ -94,7 +99,7 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error d.SetId(*rt.VpcPeeringConnectionId) log.Printf("[INFO] VPC Peering Connection ID: %s", d.Id()) - vpcAvailableErr := checkVpcPeeringConnectionAvailable(conn, d.Id()) + vpcAvailableErr := vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) if vpcAvailableErr != nil { return errwrap.Wrapf("Error waiting for VPC Peering Connection to become available: {{err}}", vpcAvailableErr) } @@ -104,40 +109,31 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*AWSClient) - conn := client.ec2conn - pcRaw, status, err := resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id())() + pcRaw, statusCode, err := vpcPeeringConnectionRefreshState(client.ec2conn, d.Id())() // Allow a failed VPC Peering Connection to fallthrough, // to allow rest of the logic below to do its work. - if err != nil && status != ec2.VpcPeeringConnectionStateReasonCodeFailed { - return err + if err != nil && statusCode != ec2.VpcPeeringConnectionStateReasonCodeFailed { + return errwrap.Wrapf("Error reading VPC Peering Connection: {{err}}", err) } - if pcRaw == nil { + // The failed status is a status that we can assume just means the + // connection is gone. Destruction isn't allowed, and it eventually + // just "falls off" the console. See GH-2322 + status := map[string]bool{ + ec2.VpcPeeringConnectionStateReasonCodeDeleted: true, + ec2.VpcPeeringConnectionStateReasonCodeDeleting: true, + ec2.VpcPeeringConnectionStateReasonCodeExpired: true, + ec2.VpcPeeringConnectionStateReasonCodeFailed: true, + ec2.VpcPeeringConnectionStateReasonCodeRejected: true, + } + if _, ok := status[statusCode]; ok { + log.Printf("[WARN] VPC Peering Connection (%s) has status code %s, removing from state", d.Id(), statusCode) d.SetId("") return nil } pc := pcRaw.(*ec2.VpcPeeringConnection) - - // The failed status is a status that we can assume just means the - // connection is gone. Destruction isn't allowed, and it eventually - // just "falls off" the console. See GH-2322 - if pc.Status != nil { - status := map[string]bool{ - ec2.VpcPeeringConnectionStateReasonCodeDeleted: true, - ec2.VpcPeeringConnectionStateReasonCodeDeleting: true, - ec2.VpcPeeringConnectionStateReasonCodeExpired: true, - ec2.VpcPeeringConnectionStateReasonCodeFailed: true, - ec2.VpcPeeringConnectionStateReasonCodeRejected: true, - } - if _, ok := status[*pc.Status.Code]; ok { - log.Printf("[DEBUG] VPC Peering Connection (%s) in state (%s), removing.", - d.Id(), *pc.Status.Code) - d.SetId("") - return nil - } - } log.Printf("[DEBUG] VPC Peering Connection response: %#v", pc) log.Printf("[DEBUG] Account ID %s, VPC PeerConn Requester %s, Accepter %s", @@ -162,14 +158,14 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { // the details about accepter and/or requester peering // options would not be included in the response. if pc.AccepterVpcInfo.PeeringOptions != nil { - err := d.Set("accepter", flattenPeeringOptions(pc.AccepterVpcInfo.PeeringOptions)) + err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) if err != nil { return errwrap.Wrapf("Error setting VPC Peering Connection accepter information: {{err}}", err) } } if pc.RequesterVpcInfo.PeeringOptions != nil { - err := d.Set("requester", flattenPeeringOptions(pc.RequesterVpcInfo.PeeringOptions)) + err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) if err != nil { return errwrap.Wrapf("Error setting VPC Peering Connection requester information: {{err}}", err) } @@ -199,29 +195,25 @@ func resourceVPCPeeringConnectionAccept(conn *ec2.EC2, id string) (string, error return *pc.Status.Code, nil } -func resourceVPCPeeringConnectionOptionsModify(d *schema.ResourceData, meta interface{}) error { +func resourceAwsVpcPeeringConnectionModifyOptions(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - modifyOpts := &ec2.ModifyVpcPeeringConnectionOptionsInput{ + req := &ec2.ModifyVpcPeeringConnectionOptionsInput{ VpcPeeringConnectionId: aws.String(d.Id()), } - if v, ok := d.GetOk("accepter"); ok { - if s := v.(*schema.Set); len(s.List()) > 0 { - co := s.List()[0].(map[string]interface{}) - modifyOpts.AccepterPeeringConnectionOptions = expandPeeringOptions(co) - } + v := d.Get("accepter").(*schema.Set).List() + if len(v) > 0 { + req.AccepterPeeringConnectionOptions = expandVpcPeeringConnectionOptions(v[0].(map[string]interface{})) } - if v, ok := d.GetOk("requester"); ok { - if s := v.(*schema.Set); len(s.List()) > 0 { - co := s.List()[0].(map[string]interface{}) - modifyOpts.RequesterPeeringConnectionOptions = expandPeeringOptions(co) - } + v = d.Get("requester").(*schema.Set).List() + if len(v) > 0 { + req.RequesterPeeringConnectionOptions = expandVpcPeeringConnectionOptions(v[0].(map[string]interface{})) } - log.Printf("[DEBUG] VPC Peering Connection modify options: %#v", modifyOpts) - if _, err := conn.ModifyVpcPeeringConnectionOptions(modifyOpts); err != nil { + log.Printf("[DEBUG] Modifying VPC Peering Connection options: %#v", req) + if _, err := conn.ModifyVpcPeeringConnectionOptions(req); err != nil { return err } @@ -237,15 +229,17 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error d.SetPartial("tags") } - pcRaw, _, err := resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id())() + pcRaw, _, err := vpcPeeringConnectionRefreshState(conn, d.Id())() if err != nil { - return err + return errwrap.Wrapf("Error reading VPC Peering Connection: {{err}}", err) } if pcRaw == nil { + log.Printf("[WARN] VPC Peering Connection (%s) not found, removing from state", d.Id()) d.SetId("") return nil } + pc := pcRaw.(*ec2.VpcPeeringConnection) if _, ok := d.GetOk("auto_accept"); ok { @@ -266,12 +260,12 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error "or activate VPC Peering Connection manually.", d.Id()) } - if err := resourceVPCPeeringConnectionOptionsModify(d, meta); err != nil { + if err := resourceAwsVpcPeeringConnectionModifyOptions(d, meta); err != nil { return errwrap.Wrapf("Error modifying VPC Peering Connection options: {{err}}", err) } } - vpcAvailableErr := checkVpcPeeringConnectionAvailable(conn, d.Id()) + vpcAvailableErr := vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) if vpcAvailableErr != nil { return errwrap.Wrapf("Error waiting for VPC Peering Connection to become available: {{err}}", vpcAvailableErr) } @@ -306,8 +300,8 @@ func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error ec2.VpcPeeringConnectionStateReasonCodeRejected, ec2.VpcPeeringConnectionStateReasonCodeDeleted, }, - Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, d.Id()), - Timeout: 1 * time.Minute, + Refresh: vpcPeeringConnectionRefreshState(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), } if _, err := stateConf.WaitForState(); err != nil { return fmt.Errorf("Error waiting for VPC Peering Connection (%s) to be deleted: %s", d.Id(), err) @@ -316,38 +310,30 @@ func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error return nil } -// resourceAwsVPCPeeringConnectionStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch -// a VPCPeeringConnection. -func resourceAwsVPCPeeringConnectionStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { +func vpcPeeringConnectionRefreshState(conn *ec2.EC2, id string) resource.StateRefreshFunc { return func() (interface{}, string, error) { resp, err := conn.DescribeVpcPeeringConnections(&ec2.DescribeVpcPeeringConnectionsInput{ - VpcPeeringConnectionIds: []*string{aws.String(id)}, + VpcPeeringConnectionIds: aws.StringSlice([]string{id}), }) if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpcPeeringConnectionID.NotFound" { - resp = nil - } else { - log.Printf("Error reading VPC Peering Connection details: %s", err) - return nil, "error", err + if isNoSuchVpcPeeringConnectionErr(err) { + return nil, ec2.VpcPeeringConnectionStateReasonCodeDeleted, nil } - } - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil + return nil, "", err } pc := resp.VpcPeeringConnections[0] + statusCode := aws.StringValue(pc.Status.Code) // A VPC Peering Connection can exist in a failed state due to // incorrect VPC ID, account ID, or overlapping IP address range, // thus we short circuit before the time out would occur. - if pc != nil && *pc.Status.Code == "failed" { - return nil, "failed", errors.New(*pc.Status.Message) + if statusCode == ec2.VpcPeeringConnectionStateReasonCodeFailed { + return nil, statusCode, errors.New(aws.StringValue(pc.Status.Message)) } - return pc, *pc.Status.Code, nil + return pc, statusCode, nil } } @@ -379,44 +365,7 @@ func vpcPeeringConnectionOptionsSchema() *schema.Schema { } } -func flattenPeeringOptions(options *ec2.VpcPeeringConnectionOptionsDescription) (results []map[string]interface{}) { - m := make(map[string]interface{}) - - if options.AllowDnsResolutionFromRemoteVpc != nil { - m["allow_remote_vpc_dns_resolution"] = *options.AllowDnsResolutionFromRemoteVpc - } - - if options.AllowEgressFromLocalClassicLinkToRemoteVpc != nil { - m["allow_classic_link_to_remote_vpc"] = *options.AllowEgressFromLocalClassicLinkToRemoteVpc - } - - if options.AllowEgressFromLocalVpcToRemoteClassicLink != nil { - m["allow_vpc_to_remote_classic_link"] = *options.AllowEgressFromLocalVpcToRemoteClassicLink - } - - results = append(results, m) - return -} - -func expandPeeringOptions(m map[string]interface{}) *ec2.PeeringConnectionOptionsRequest { - r := &ec2.PeeringConnectionOptionsRequest{} - - if v, ok := m["allow_remote_vpc_dns_resolution"]; ok { - r.AllowDnsResolutionFromRemoteVpc = aws.Bool(v.(bool)) - } - - if v, ok := m["allow_classic_link_to_remote_vpc"]; ok { - r.AllowEgressFromLocalClassicLinkToRemoteVpc = aws.Bool(v.(bool)) - } - - if v, ok := m["allow_vpc_to_remote_classic_link"]; ok { - r.AllowEgressFromLocalVpcToRemoteClassicLink = aws.Bool(v.(bool)) - } - - return r -} - -func checkVpcPeeringConnectionAvailable(conn *ec2.EC2, id string) error { +func vpcPeeringConnectionWaitUntilAvailable(conn *ec2.EC2, id string, timeout time.Duration) error { // Wait for the vpc peering connection to become available log.Printf("[DEBUG] Waiting for VPC Peering Connection (%s) to become available.", id) stateConf := &resource.StateChangeConf{ @@ -428,8 +377,8 @@ func checkVpcPeeringConnectionAvailable(conn *ec2.EC2, id string) error { ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance, ec2.VpcPeeringConnectionStateReasonCodeActive, }, - Refresh: resourceAwsVPCPeeringConnectionStateRefreshFunc(conn, id), - Timeout: 1 * time.Minute, + Refresh: vpcPeeringConnectionRefreshState(conn, id), + Timeout: timeout, } if _, err := stateConf.WaitForState(); err != nil { return errwrap.Wrapf(fmt.Sprintf( @@ -438,3 +387,7 @@ func checkVpcPeeringConnectionAvailable(conn *ec2.EC2, id string) error { } return nil } + +func isNoSuchVpcPeeringConnectionErr(err error) bool { + return isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") +} diff --git a/aws/resource_aws_vpc_peering_connection_options.go b/aws/resource_aws_vpc_peering_connection_options.go new file mode 100644 index 00000000000..08543dcafa2 --- /dev/null +++ b/aws/resource_aws_vpc_peering_connection_options.go @@ -0,0 +1,85 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsVpcPeeringConnectionOptions() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsVpcPeeringConnectionOptionsCreate, + Read: resourceAwsVpcPeeringConnectionOptionsRead, + Update: resourceAwsVpcPeeringConnectionOptionsUpdate, + Delete: resourceAwsVpcPeeringConnectionOptionsDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "vpc_peering_connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "accepter": vpcPeeringConnectionOptionsSchema(), + "requester": vpcPeeringConnectionOptionsSchema(), + }, + } +} + +func resourceAwsVpcPeeringConnectionOptionsCreate(d *schema.ResourceData, meta interface{}) error { + d.SetId(d.Get("vpc_peering_connection_id").(string)) + return resourceAwsVpcPeeringConnectionOptionsUpdate(d, meta) +} + +func resourceAwsVpcPeeringConnectionOptionsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + pcRaw, _, err := vpcPeeringConnectionRefreshState(conn, d.Id())() + if err != nil { + return fmt.Errorf("Error reading VPC Peering Connection: %s", err.Error()) + } + + if pcRaw == nil { + log.Printf("[WARN] VPC Peering Connection (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + pc := pcRaw.(*ec2.VpcPeeringConnection) + + d.Set("vpc_peering_connection_id", aws.StringValue(pc.VpcPeeringConnectionId)) + + if pc.AccepterVpcInfo.PeeringOptions != nil { + err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) + if err != nil { + return fmt.Errorf("Error setting VPC Peering Connection Options accepter information: %s", err.Error()) + } + } + + if pc.RequesterVpcInfo.PeeringOptions != nil { + err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) + if err != nil { + return fmt.Errorf("Error setting VPC Peering Connection Options requester information: %s", err.Error()) + } + } + + return nil +} + +func resourceAwsVpcPeeringConnectionOptionsUpdate(d *schema.ResourceData, meta interface{}) error { + if err := resourceAwsVpcPeeringConnectionModifyOptions(d, meta); err != nil { + return fmt.Errorf("Error modifying VPC Peering Connection Options: %s", err.Error()) + } + + return resourceAwsVpcPeeringConnectionOptionsRead(d, meta) +} + +func resourceAwsVpcPeeringConnectionOptionsDelete(d *schema.ResourceData, meta interface{}) error { + // Don't do anything with the underlying VPC peering connection. + return nil +} diff --git a/aws/resource_aws_vpc_peering_connection_options_test.go b/aws/resource_aws_vpc_peering_connection_options_test.go new file mode 100644 index 00000000000..42039745e4b --- /dev/null +++ b/aws/resource_aws_vpc_peering_connection_options_test.go @@ -0,0 +1,103 @@ +package aws + +import ( + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSVpcPeeringConnectionOptions_basic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccVpcPeeringConnectionOptionsConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr( + "aws_vpc_peering_connection_options.foo", + "accepter.#", + "1", + ), + resource.TestCheckResourceAttr( + "aws_vpc_peering_connection_options.foo", + "accepter.1102046665.allow_remote_vpc_dns_resolution", + "true", + ), + testAccCheckAWSVpcPeeringConnectionOptions( + "aws_vpc_peering_connection.foo", + "accepter", + &ec2.VpcPeeringConnectionOptionsDescription{ + AllowDnsResolutionFromRemoteVpc: aws.Bool(true), + AllowEgressFromLocalClassicLinkToRemoteVpc: aws.Bool(false), + AllowEgressFromLocalVpcToRemoteClassicLink: aws.Bool(false), + }, + ), + resource.TestCheckResourceAttr( + "aws_vpc_peering_connection_options.foo", + "requester.#", + "1", + ), + resource.TestCheckResourceAttr( + "aws_vpc_peering_connection_options.foo", + "requester.41753983.allow_classic_link_to_remote_vpc", + "true", + ), + resource.TestCheckResourceAttr( + "aws_vpc_peering_connection_options.foo", + "requester.41753983.allow_vpc_to_remote_classic_link", + "true", + ), + testAccCheckAWSVpcPeeringConnectionOptions( + "aws_vpc_peering_connection.foo", + "requester", + &ec2.VpcPeeringConnectionOptionsDescription{ + AllowDnsResolutionFromRemoteVpc: aws.Bool(false), + AllowEgressFromLocalClassicLinkToRemoteVpc: aws.Bool(true), + AllowEgressFromLocalVpcToRemoteClassicLink: aws.Bool(true), + }, + ), + ), + }, + }, + }) +} + +const testAccVpcPeeringConnectionOptionsConfig = ` +resource "aws_vpc" "foo" { + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-options-foo" + } +} + +resource "aws_vpc" "bar" { + cidr_block = "10.1.0.0/16" + enable_dns_hostnames = true + tags { + Name = "terraform-testacc-vpc-peering-conn-options-bar" + } +} + +resource "aws_vpc_peering_connection" "foo" { + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + auto_accept = true +} + +resource "aws_vpc_peering_connection_options" "foo" { + vpc_peering_connection_id = "${aws_vpc_peering_connection.foo.id}" + + accepter { + allow_remote_vpc_dns_resolution = true + } + + requester { + allow_vpc_to_remote_classic_link = true + allow_classic_link_to_remote_vpc = true + } +} +` diff --git a/aws/resource_aws_vpc_peering_connection_test.go b/aws/resource_aws_vpc_peering_connection_test.go index 3b5e110baa1..72b31d4c976 100644 --- a/aws/resource_aws_vpc_peering_connection_test.go +++ b/aws/resource_aws_vpc_peering_connection_test.go @@ -358,171 +358,171 @@ func TestAccAWSVPCPeeringConnection_region(t *testing.T) { const testAccVpcPeeringConfig = ` resource "aws_vpc" "foo" { - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-foo" - } + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-foo" + } } resource "aws_vpc" "bar" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-bar" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-bar" + } } resource "aws_vpc_peering_connection" "foo" { - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" - auto_accept = true + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + auto_accept = true } ` const testAccVpcPeeringConfigTags = ` resource "aws_vpc" "foo" { - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-tags-foo" - } + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-tags-foo" + } } resource "aws_vpc" "bar" { - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-tags-bar" - } + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-tags-bar" + } } resource "aws_vpc_peering_connection" "foo" { - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" - auto_accept = true - tags { - foo = "bar" - } + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + auto_accept = true + tags { + foo = "bar" + } } ` const testAccVpcPeeringConfigOptions = ` resource "aws_vpc" "foo" { - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-options-foo" - } + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-options-foo" + } } resource "aws_vpc" "bar" { - cidr_block = "10.1.0.0/16" - enable_dns_hostnames = true - tags { - Name = "terraform-testacc-vpc-peering-conn-options-bar" - } + cidr_block = "10.1.0.0/16" + enable_dns_hostnames = true + tags { + Name = "terraform-testacc-vpc-peering-conn-options-bar" + } } resource "aws_vpc_peering_connection" "foo" { - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" - auto_accept = true + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + auto_accept = true - accepter { - allow_remote_vpc_dns_resolution = true - } + accepter { + allow_remote_vpc_dns_resolution = true + } - requester { - allow_vpc_to_remote_classic_link = true - allow_classic_link_to_remote_vpc = true - } + requester { + allow_vpc_to_remote_classic_link = true + allow_classic_link_to_remote_vpc = true + } } ` const testAccVpcPeeringConfigFailedState = ` resource "aws_vpc" "foo" { - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-failed-state-foo" - } + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-failed-state-foo" + } } resource "aws_vpc" "bar" { - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-failed-state-bar" - } + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-failed-state-bar" + } } resource "aws_vpc_peering_connection" "foo" { - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" } ` const testAccVpcPeeringConfigRegionAutoAccept = ` provider "aws" { - alias = "main" + alias = "main" region = "us-west-2" } provider "aws" { - alias = "peer" + alias = "peer" region = "us-east-1" } resource "aws_vpc" "foo" { - provider = "aws.main" - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-region-auto-accept-foo" - } + provider = "aws.main" + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-region-auto-accept-foo" + } } resource "aws_vpc" "bar" { - provider = "aws.peer" - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-region-auto-accept-bar" - } + provider = "aws.peer" + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-region-auto-accept-bar" + } } resource "aws_vpc_peering_connection" "foo" { - provider = "aws.main" - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" - peer_region = "us-east-1" - auto_accept = true + provider = "aws.main" + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + peer_region = "us-east-1" + auto_accept = true } ` const testAccVpcPeeringConfigRegion = ` provider "aws" { - alias = "main" + alias = "main" region = "us-west-2" } provider "aws" { - alias = "peer" + alias = "peer" region = "us-east-1" } resource "aws_vpc" "foo" { - provider = "aws.main" - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-region-foo" - } + provider = "aws.main" + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-region-foo" + } } resource "aws_vpc" "bar" { - provider = "aws.peer" - cidr_block = "10.1.0.0/16" - tags { - Name = "terraform-testacc-vpc-peering-conn-region-bar" - } + provider = "aws.peer" + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-vpc-peering-conn-region-bar" + } } resource "aws_vpc_peering_connection" "foo" { - provider = "aws.main" - vpc_id = "${aws_vpc.foo.id}" - peer_vpc_id = "${aws_vpc.bar.id}" - peer_region = "us-east-1" + provider = "aws.main" + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + peer_region = "us-east-1" } ` diff --git a/aws/structure.go b/aws/structure.go index 501a3443dda..a56e380d146 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -4050,3 +4050,39 @@ func flattenLaunchTemplateSpecification(lt *autoscaling.LaunchTemplateSpecificat return result } + +func flattenVpcPeeringConnectionOptions(options *ec2.VpcPeeringConnectionOptionsDescription) []map[string]interface{} { + m := map[string]interface{}{} + + if options.AllowDnsResolutionFromRemoteVpc != nil { + m["allow_remote_vpc_dns_resolution"] = *options.AllowDnsResolutionFromRemoteVpc + } + + if options.AllowEgressFromLocalClassicLinkToRemoteVpc != nil { + m["allow_classic_link_to_remote_vpc"] = *options.AllowEgressFromLocalClassicLinkToRemoteVpc + } + + if options.AllowEgressFromLocalVpcToRemoteClassicLink != nil { + m["allow_vpc_to_remote_classic_link"] = *options.AllowEgressFromLocalVpcToRemoteClassicLink + } + + return []map[string]interface{}{m} +} + +func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringConnectionOptionsRequest { + options := &ec2.PeeringConnectionOptionsRequest{} + + if v, ok := m["allow_remote_vpc_dns_resolution"]; ok { + options.AllowDnsResolutionFromRemoteVpc = aws.Bool(v.(bool)) + } + + if v, ok := m["allow_classic_link_to_remote_vpc"]; ok { + options.AllowEgressFromLocalClassicLinkToRemoteVpc = aws.Bool(v.(bool)) + } + + if v, ok := m["allow_vpc_to_remote_classic_link"]; ok { + options.AllowEgressFromLocalVpcToRemoteClassicLink = aws.Bool(v.(bool)) + } + + return options +} diff --git a/website/aws.erb b/website/aws.erb index 8d4e5e77ebd..59d1616ad4b 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -2055,6 +2055,10 @@ aws_vpc_peering_connection_accepter + > + aws_vpc_peering_connection_options + + > aws_vpn_connection diff --git a/website/docs/r/vpc_peering.html.markdown b/website/docs/r/vpc_peering.html.markdown index 08f1d915cb4..2729121c39f 100644 --- a/website/docs/r/vpc_peering.html.markdown +++ b/website/docs/r/vpc_peering.html.markdown @@ -3,12 +3,18 @@ layout: "aws" page_title: "AWS: aws_vpc_peering_connection" sidebar_current: "docs-aws-resource-vpc-peering" description: |- - Manage a VPC Peering Connection resource. + Provides a resource to manage a VPC peering connection. --- # aws_vpc_peering_connection -Provides a resource to manage a VPC Peering Connection resource. +Provides a resource to manage a VPC peering connection. + +~> **NOTE on VPC Peering Connections and VPC Peering Connection Options:** Terraform provides +both a standalone [VPC Peering Connection Options](vpc_peering_options) and a VPC Peering Connection +resource with `accepter` and `requester` attributes. Do not manage options for the same VPC peering +connection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource. +Doing so will cause a conflict of options and will overwrite the options. -> **Note:** For cross-account (requester's AWS account differs from the accepter's AWS account) or inter-region VPC Peering Connections use the `aws_vpc_peering_connection` resource to manage the requester's side of the @@ -127,6 +133,15 @@ to the remote VPC. instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink connection. +### Timeouts + +`aws_vpc_peering_connection` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `1 minute`) Used for creating a peering connection +- `update` - (Default `1 minute`) Used for peering connection modifications +- `delete` - (Default `1 minute`) Used for destroying peering connections + ## Attributes Reference The following attributes are exported: diff --git a/website/docs/r/vpc_peering_accepter.html.markdown b/website/docs/r/vpc_peering_accepter.html.markdown index ba4f5912b1e..ba5a3b7b6b3 100644 --- a/website/docs/r/vpc_peering_accepter.html.markdown +++ b/website/docs/r/vpc_peering_accepter.html.markdown @@ -110,3 +110,9 @@ private IP addresses when queried from instances in a peer VPC. with the peer VPC over the VPC Peering Connection. * `allow_vpc_to_remote_classic_link` - Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC Peering Connection. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the VPC Peering Connection. diff --git a/website/docs/r/vpc_peering_options.html.markdown b/website/docs/r/vpc_peering_options.html.markdown new file mode 100644 index 00000000000..bb8edd3b69b --- /dev/null +++ b/website/docs/r/vpc_peering_options.html.markdown @@ -0,0 +1,166 @@ +--- +layout: "aws" +page_title: "AWS: aws_vpc_peering_connection_options" +sidebar_current: "docs-aws-resource-vpc-peering-options" +description: |- + Provides a resource to manage VPC peering connection options. +--- + +# aws_vpc_peering_connection_options + +Provides a resource to manage VPC peering connection options. + +~> **NOTE on VPC Peering Connections and VPC Peering Connection Options:** Terraform provides +both a standalone VPC Peering Connection Options and a [VPC Peering Connection](vpc_peering.html) +resource with `accepter` and `requester` attributes. Do not manage options for the same VPC peering +connection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource. +Doing so will cause a conflict of options and will overwrite the options. + +Basic usage: + +```hcl +resource "aws_vpc" "foo" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_vpc" "bar" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_vpc_peering_connection" "foo" { + vpc_id = "${aws_vpc.foo.id}" + peer_vpc_id = "${aws_vpc.bar.id}" + auto_accept = true +} + +resource "aws_vpc_peering_connection_options" "foo" { + vpc_peering_connection_id = "${aws_vpc_peering_connection.foo.id}" + + accepter { + allow_remote_vpc_dns_resolution = true + } + + requester { + allow_vpc_to_remote_classic_link = true + allow_classic_link_to_remote_vpc = true + } +} +``` + +Basic cross-account usage: + +```hcl +provider "aws" { + # Requester's credentials. +} + +provider "aws" { + alias = "peer" + + # Accepter's credentials. +} + +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" + + enable_dns_support = true + enable_dns_hostnames = true +} + +resource "aws_vpc" "peer" { + provider = "aws.peer" + cidr_block = "10.1.0.0/16" + + enable_dns_support = true + enable_dns_hostnames = true +} + +data "aws_caller_identity" "peer" { + provider = "aws.peer" +} + +# Requester's side of the connection. +resource "aws_vpc_peering_connection" "peer" { + vpc_id = "${aws_vpc.main.id}" + peer_vpc_id = "${aws_vpc.peer.id}" + peer_owner_id = "${data.aws_caller_identity.peer.account_id}" + auto_accept = false + + tags { + Side = "Requester" + } +} + +# Accepter's side of the connection. +resource "aws_vpc_peering_connection_accepter" "peer" { + provider = "aws.peer" + vpc_peering_connection_id = "${aws_vpc_peering_connection.peer.id}" + auto_accept = true + + tags { + Side = "Accepter" + } +} + +# As options can't be set until the connection has been accepted +# create an explicit dependency on the accepter. + +resource "aws_vpc_peering_connection_options" "requester" { + vpc_peering_connection_id = "${aws_vpc_peering_connection_accepter.peer.id}" + + requester { + allow_remote_vpc_dns_resolution = true + } +} + +resource "aws_vpc_peering_connection_options" "accepter" { + provider = "aws.peer" + vpc_peering_connection_id = "${aws_vpc_peering_connection_accepter.peer.id}" + + accepter { + allow_remote_vpc_dns_resolution = true + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `vpc_peering_connection_id` - (Required) The ID of the requester VPC. +* `accepter` (Optional) - An optional configuration block that allows for [VPC Peering Connection] +(http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide) options to be set for the VPC that accepts +the peering connection (a maximum of one). +* `requester` (Optional) - A optional configuration block that allows for [VPC Peering Connection] +(http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide) options to be set for the VPC that requests +the peering connection (a maximum of one). + +#### Accepter and Requester Arguments + +-> **Note:** When enabled, the DNS resolution feature requires that VPCs participating in the peering +must have support for the DNS hostnames enabled. This can be done using the [`enable_dns_hostnames`] +(vpc.html#enable_dns_hostnames) attribute in the [`aws_vpc`](vpc.html) resource. See [Using DNS with Your VPC] +(http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.html) user guide for more information. + +* `allow_remote_vpc_dns_resolution` - (Optional) Allow a local VPC to resolve public DNS hostnames to private +IP addresses when queried from instances in the peer VPC. +* `allow_classic_link_to_remote_vpc` - (Optional) Allow a local linked EC2-Classic instance to communicate +with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection +to the remote VPC. +* `allow_vpc_to_remote_classic_link` - (Optional) Allow a local VPC to communicate with a linked EC2-Classic +instance in a peer VPC. This enables an outbound communication from the local VPC to the remote ClassicLink +connection. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the VPC Peering Connection Options. + +## Import + +VPC Peering Connection Options can be imported using the `vpc peering id`, e.g. + +``` +$ terraform import aws_vpc_peering_connection_options.foo pcx-111aaa111 +``` From 2c0ad2451c8f3c269f2ff6f3c4bed17be8c02f81 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Mon, 26 Mar 2018 09:54:54 -0400 Subject: [PATCH 0870/3316] Remove unnecessary call to 'aws.StringValue()'. --- aws/resource_aws_vpc_peering_connection_options.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aws/resource_aws_vpc_peering_connection_options.go b/aws/resource_aws_vpc_peering_connection_options.go index 08543dcafa2..fff92199503 100644 --- a/aws/resource_aws_vpc_peering_connection_options.go +++ b/aws/resource_aws_vpc_peering_connection_options.go @@ -4,7 +4,6 @@ import ( "fmt" "log" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" ) @@ -52,7 +51,7 @@ func resourceAwsVpcPeeringConnectionOptionsRead(d *schema.ResourceData, meta int pc := pcRaw.(*ec2.VpcPeeringConnection) - d.Set("vpc_peering_connection_id", aws.StringValue(pc.VpcPeeringConnectionId)) + d.Set("vpc_peering_connection_id", pc.VpcPeeringConnectionId) if pc.AccepterVpcInfo.PeeringOptions != nil { err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) From b34ff48fd7d1db7fb1dd12133f8a86e221a71f1f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 26 Apr 2018 16:32:18 -0400 Subject: [PATCH 0871/3316] Replace 'errwrap.Wrapf' by 'fmt.Errorf'. --- aws/resource_aws_vpc_peering_connection.go | 39 ++++++++++------------ 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/aws/resource_aws_vpc_peering_connection.go b/aws/resource_aws_vpc_peering_connection.go index eb6c0a35732..b1feefab428 100644 --- a/aws/resource_aws_vpc_peering_connection.go +++ b/aws/resource_aws_vpc_peering_connection.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -91,7 +90,7 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error resp, err := conn.CreateVpcPeeringConnection(createOpts) if err != nil { - return errwrap.Wrapf("Error creating VPC Peering Connection: {{err}}", err) + return fmt.Errorf("Error creating VPC Peering Connection: %s", err) } // Get the ID and store it @@ -99,9 +98,9 @@ func resourceAwsVPCPeeringCreate(d *schema.ResourceData, meta interface{}) error d.SetId(*rt.VpcPeeringConnectionId) log.Printf("[INFO] VPC Peering Connection ID: %s", d.Id()) - vpcAvailableErr := vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) - if vpcAvailableErr != nil { - return errwrap.Wrapf("Error waiting for VPC Peering Connection to become available: {{err}}", vpcAvailableErr) + err = vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) + if err != nil { + return fmt.Errorf("Error waiting for VPC Peering Connection to become available: %s", err) } return resourceAwsVPCPeeringUpdate(d, meta) @@ -114,7 +113,7 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { // Allow a failed VPC Peering Connection to fallthrough, // to allow rest of the logic below to do its work. if err != nil && statusCode != ec2.VpcPeeringConnectionStateReasonCodeFailed { - return errwrap.Wrapf("Error reading VPC Peering Connection: {{err}}", err) + return fmt.Errorf("Error reading VPC Peering Connection: %s", err) } // The failed status is a status that we can assume just means the @@ -160,20 +159,20 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { if pc.AccepterVpcInfo.PeeringOptions != nil { err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) if err != nil { - return errwrap.Wrapf("Error setting VPC Peering Connection accepter information: {{err}}", err) + return fmt.Errorf("Error setting VPC Peering Connection accepter information: %s", err) } } if pc.RequesterVpcInfo.PeeringOptions != nil { err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) if err != nil { - return errwrap.Wrapf("Error setting VPC Peering Connection requester information: {{err}}", err) + return fmt.Errorf("Error setting VPC Peering Connection requester information: %s", err) } } err = d.Set("tags", tagsToMap(pc.Tags)) if err != nil { - return errwrap.Wrapf("Error setting VPC Peering Connection tags: {{err}}", err) + return fmt.Errorf("Error setting VPC Peering Connection tags: %s", err) } return nil @@ -231,7 +230,7 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error pcRaw, _, err := vpcPeeringConnectionRefreshState(conn, d.Id())() if err != nil { - return errwrap.Wrapf("Error reading VPC Peering Connection: {{err}}", err) + return fmt.Errorf("Error reading VPC Peering Connection: %s", err) } if pcRaw == nil { @@ -246,7 +245,7 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error if pc.Status != nil && *pc.Status.Code == ec2.VpcPeeringConnectionStateReasonCodePendingAcceptance { status, err := resourceVPCPeeringConnectionAccept(conn, d.Id()) if err != nil { - return errwrap.Wrapf("Unable to accept VPC Peering Connection: {{err}}", err) + return fmt.Errorf("Unable to accept VPC Peering Connection: %s", err) } log.Printf("[DEBUG] VPC Peering Connection accept status: %s", status) } @@ -261,13 +260,13 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error } if err := resourceAwsVpcPeeringConnectionModifyOptions(d, meta); err != nil { - return errwrap.Wrapf("Error modifying VPC Peering Connection options: {{err}}", err) + return fmt.Errorf("Error modifying VPC Peering Connection options: %s", err) } } - vpcAvailableErr := vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) - if vpcAvailableErr != nil { - return errwrap.Wrapf("Error waiting for VPC Peering Connection to become available: {{err}}", vpcAvailableErr) + err = vpcPeeringConnectionWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("Error waiting for VPC Peering Connection to become available: %s", err) } return resourceAwsVPCPeeringRead(d, meta) @@ -276,11 +275,11 @@ func resourceAwsVPCPeeringUpdate(d *schema.ResourceData, meta interface{}) error func resourceAwsVPCPeeringDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - input := &ec2.DeleteVpcPeeringConnectionInput{ + req := &ec2.DeleteVpcPeeringConnectionInput{ VpcPeeringConnectionId: aws.String(d.Id()), } - log.Printf("[DEBUG] Deleting VPC Peering Connection: %s", input) - _, err := conn.DeleteVpcPeeringConnection(input) + log.Printf("[DEBUG] Deleting VPC Peering Connection: %s", req) + _, err := conn.DeleteVpcPeeringConnection(req) if err != nil { if isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") { return nil @@ -381,9 +380,7 @@ func vpcPeeringConnectionWaitUntilAvailable(conn *ec2.EC2, id string, timeout ti Timeout: timeout, } if _, err := stateConf.WaitForState(); err != nil { - return errwrap.Wrapf(fmt.Sprintf( - "Error waiting for VPC Peering Connection (%s) to become available: {{err}}", - id), err) + return fmt.Errorf("Error waiting for VPC Peering Connection (%s) to become available: %s", id, err) } return nil } From 927a0d74599d717cfb720bf74f057af1361c3a29 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 26 Apr 2018 16:33:56 -0400 Subject: [PATCH 0872/3316] Remove 'isNoSuchVpcPeeringConnectionErr'. --- aws/resource_aws_vpc_peering_connection.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/aws/resource_aws_vpc_peering_connection.go b/aws/resource_aws_vpc_peering_connection.go index b1feefab428..a1d77b87ea8 100644 --- a/aws/resource_aws_vpc_peering_connection.go +++ b/aws/resource_aws_vpc_peering_connection.go @@ -315,7 +315,7 @@ func vpcPeeringConnectionRefreshState(conn *ec2.EC2, id string) resource.StateRe VpcPeeringConnectionIds: aws.StringSlice([]string{id}), }) if err != nil { - if isNoSuchVpcPeeringConnectionErr(err) { + if isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") { return nil, ec2.VpcPeeringConnectionStateReasonCodeDeleted, nil } @@ -384,7 +384,3 @@ func vpcPeeringConnectionWaitUntilAvailable(conn *ec2.EC2, id string, timeout ti } return nil } - -func isNoSuchVpcPeeringConnectionErr(err error) bool { - return isAWSErr(err, "InvalidVpcPeeringConnectionID.NotFound", "") -} From e741b27cb8e8c901bf5f4b65393a351ccd099853 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 26 Apr 2018 16:51:52 -0400 Subject: [PATCH 0873/3316] Documentation updates after review. --- website/docs/r/vpc_peering.html.markdown | 4 ++- .../docs/r/vpc_peering_options.html.markdown | 28 +++++++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/website/docs/r/vpc_peering.html.markdown b/website/docs/r/vpc_peering.html.markdown index 2729121c39f..234f56c36cb 100644 --- a/website/docs/r/vpc_peering.html.markdown +++ b/website/docs/r/vpc_peering.html.markdown @@ -11,10 +11,12 @@ description: |- Provides a resource to manage a VPC peering connection. ~> **NOTE on VPC Peering Connections and VPC Peering Connection Options:** Terraform provides -both a standalone [VPC Peering Connection Options](vpc_peering_options) and a VPC Peering Connection +both a standalone [VPC Peering Connection Options](vpc_peering_options.html) and a VPC Peering Connection resource with `accepter` and `requester` attributes. Do not manage options for the same VPC peering connection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource. Doing so will cause a conflict of options and will overwrite the options. +Using a VPC Peering Connection Options resource decouples management of the connection options from +management of the VPC Peering Connection and allows options to be set correctly in cross-account scenarios. -> **Note:** For cross-account (requester's AWS account differs from the accepter's AWS account) or inter-region VPC Peering Connections use the `aws_vpc_peering_connection` resource to manage the requester's side of the diff --git a/website/docs/r/vpc_peering_options.html.markdown b/website/docs/r/vpc_peering_options.html.markdown index bb8edd3b69b..425e018e654 100644 --- a/website/docs/r/vpc_peering_options.html.markdown +++ b/website/docs/r/vpc_peering_options.html.markdown @@ -15,6 +15,8 @@ both a standalone VPC Peering Connection Options and a [VPC Peering Connection]( resource with `accepter` and `requester` attributes. Do not manage options for the same VPC peering connection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource. Doing so will cause a conflict of options and will overwrite the options. +Using a VPC Peering Connection Options resource decouples management of the connection options from +management of the VPC Peering Connection and allows options to be set correctly in cross-account scenarios. Basic usage: @@ -51,16 +53,20 @@ Basic cross-account usage: ```hcl provider "aws" { + alias = "requester" + # Requester's credentials. } provider "aws" { - alias = "peer" + alias = "accepter" # Accepter's credentials. } resource "aws_vpc" "main" { + provider = "aws.requester" + cidr_block = "10.0.0.0/16" enable_dns_support = true @@ -68,7 +74,8 @@ resource "aws_vpc" "main" { } resource "aws_vpc" "peer" { - provider = "aws.peer" + provider = "aws.accepter" + cidr_block = "10.1.0.0/16" enable_dns_support = true @@ -76,11 +83,13 @@ resource "aws_vpc" "peer" { } data "aws_caller_identity" "peer" { - provider = "aws.peer" + provider = "aws.accepter" } # Requester's side of the connection. resource "aws_vpc_peering_connection" "peer" { + provider = "aws.requester" + vpc_id = "${aws_vpc.main.id}" peer_vpc_id = "${aws_vpc.peer.id}" peer_owner_id = "${data.aws_caller_identity.peer.account_id}" @@ -93,7 +102,8 @@ resource "aws_vpc_peering_connection" "peer" { # Accepter's side of the connection. resource "aws_vpc_peering_connection_accepter" "peer" { - provider = "aws.peer" + provider = "aws.accepter" + vpc_peering_connection_id = "${aws_vpc_peering_connection.peer.id}" auto_accept = true @@ -102,10 +112,11 @@ resource "aws_vpc_peering_connection_accepter" "peer" { } } -# As options can't be set until the connection has been accepted -# create an explicit dependency on the accepter. - resource "aws_vpc_peering_connection_options" "requester" { + provider = "aws.requester" + + # As options can't be set until the connection has been accepted + # create an explicit dependency on the accepter. vpc_peering_connection_id = "${aws_vpc_peering_connection_accepter.peer.id}" requester { @@ -114,7 +125,8 @@ resource "aws_vpc_peering_connection_options" "requester" { } resource "aws_vpc_peering_connection_options" "accepter" { - provider = "aws.peer" + provider = "aws.accepter" + vpc_peering_connection_id = "${aws_vpc_peering_connection_accepter.peer.id}" accepter { From c4c15ad3f3ea21d1a5ece0bf8af0cc084e4d6259 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 26 Apr 2018 16:57:11 -0400 Subject: [PATCH 0874/3316] Additional nil checks. --- aws/resource_aws_vpc_peering_connection_options.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_vpc_peering_connection_options.go b/aws/resource_aws_vpc_peering_connection_options.go index fff92199503..aca9ca2ec0c 100644 --- a/aws/resource_aws_vpc_peering_connection_options.go +++ b/aws/resource_aws_vpc_peering_connection_options.go @@ -53,14 +53,14 @@ func resourceAwsVpcPeeringConnectionOptionsRead(d *schema.ResourceData, meta int d.Set("vpc_peering_connection_id", pc.VpcPeeringConnectionId) - if pc.AccepterVpcInfo.PeeringOptions != nil { + if pc != nil && pc.AccepterVpcInfo != nil && pc.AccepterVpcInfo.PeeringOptions != nil { err := d.Set("accepter", flattenVpcPeeringConnectionOptions(pc.AccepterVpcInfo.PeeringOptions)) if err != nil { return fmt.Errorf("Error setting VPC Peering Connection Options accepter information: %s", err.Error()) } } - if pc.RequesterVpcInfo.PeeringOptions != nil { + if pc != nil && pc.RequesterVpcInfo != nil && pc.RequesterVpcInfo.PeeringOptions != nil { err := d.Set("requester", flattenVpcPeeringConnectionOptions(pc.RequesterVpcInfo.PeeringOptions)) if err != nil { return fmt.Errorf("Error setting VPC Peering Connection Options requester information: %s", err.Error()) From 45c82fad0c6d5638e0524afd15a7e6559ea7ed50 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 27 Apr 2018 08:20:48 -0400 Subject: [PATCH 0875/3316] Handle AWS inconsistency issues with 'DescribeVpcPeeringConnections'. --- aws/resource_aws_vpc_peering_connection.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/aws/resource_aws_vpc_peering_connection.go b/aws/resource_aws_vpc_peering_connection.go index a1d77b87ea8..18b16d07f60 100644 --- a/aws/resource_aws_vpc_peering_connection.go +++ b/aws/resource_aws_vpc_peering_connection.go @@ -125,6 +125,7 @@ func resourceAwsVPCPeeringRead(d *schema.ResourceData, meta interface{}) error { ec2.VpcPeeringConnectionStateReasonCodeExpired: true, ec2.VpcPeeringConnectionStateReasonCodeFailed: true, ec2.VpcPeeringConnectionStateReasonCodeRejected: true, + "": true, // AWS consistency issue, see vpcPeeringConnectionRefreshState } if _, ok := status[statusCode]; ok { log.Printf("[WARN] VPC Peering Connection (%s) has status code %s, removing from state", d.Id(), statusCode) @@ -322,7 +323,18 @@ func vpcPeeringConnectionRefreshState(conn *ec2.EC2, id string) resource.StateRe return nil, "", err } + if resp == nil || resp.VpcPeeringConnections == nil || + len(resp.VpcPeeringConnections) == 0 || resp.VpcPeeringConnections[0] == nil { + // Sometimes AWS just has consistency issues and doesn't see + // our peering connection yet. Return an empty state. + return nil, "", nil + } pc := resp.VpcPeeringConnections[0] + if pc.Status == nil { + // Sometimes AWS just has consistency issues and doesn't see + // our peering connection yet. Return an empty state. + return nil, "", nil + } statusCode := aws.StringValue(pc.Status.Code) // A VPC Peering Connection can exist in a failed state due to From 7445c4342c938b78b80d414208d1b47876caedc4 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Fri, 27 Apr 2018 14:38:50 +0200 Subject: [PATCH 0876/3316] d/mq_broker: update on review --- aws/data_source_aws_mq_broker.go | 51 +++--- aws/data_source_aws_mq_broker_test.go | 234 ++++++++++++++----------- website/docs/d/mq_broker.html.markdown | 2 +- 3 files changed, 159 insertions(+), 128 deletions(-) diff --git a/aws/data_source_aws_mq_broker.go b/aws/data_source_aws_mq_broker.go index 53642a100eb..fa150808cca 100644 --- a/aws/data_source_aws_mq_broker.go +++ b/aws/data_source_aws_mq_broker.go @@ -1,8 +1,8 @@ package aws import ( + "errors" "fmt" - "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/mq" @@ -17,11 +17,13 @@ func dataSourceAwsMqBroker() *schema.Resource { "broker_id": { Type: schema.TypeString, Optional: true, + Computed: true, ConflictsWith: []string{"broker_name"}, }, "broker_name": { Type: schema.TypeString, Optional: true, + Computed: true, ConflictsWith: []string{"broker_id"}, }, "auto_minor_version_upgrade": { @@ -148,34 +150,31 @@ func dataSourceAwsmQBrokerRead(d *schema.ResourceData, meta interface{}) error { if brokerId, ok := d.GetOk("broker_id"); ok { d.SetId(brokerId.(string)) } else { + conn := meta.(*AWSClient).mqconn brokerName := d.Get("broker_name").(string) - brokerId := getBrokerId(meta, brokerName) - if brokerId == "" { - return fmt.Errorf("Failed to get broker id with name: %s", brokerName) - } - d.SetId(brokerId) - } - return resourceAwsMqBrokerRead(d, meta) -} - -func getBrokerId(meta interface{}, name string) (id string) { - conn := meta.(*AWSClient).mqconn - var nextToken string - for { - out, err := conn.ListBrokers(&mq.ListBrokersInput{NextToken: aws.String(nextToken)}) - if err != nil { - log.Printf("[DEBUG] Failed to list brokers: %s", err) - return "" - } - for _, broker := range out.BrokerSummaries { - if *broker.BrokerName == name { - return *broker.BrokerId + var nextToken string + for { + out, err := conn.ListBrokers(&mq.ListBrokersInput{NextToken: aws.String(nextToken)}) + if err != nil { + return errors.New("Failed to list mq brokers") } + for _, broker := range out.BrokerSummaries { + if aws.StringValue(broker.BrokerName) == brokerName { + brokerId := aws.StringValue(broker.BrokerId) + d.Set("broker_id", brokerId) + d.SetId(brokerId) + } + } + if out.NextToken == nil { + break + } + nextToken = *out.NextToken } - if out.NextToken == nil { - break + + if d.Id() == "" { + return fmt.Errorf("Failed to determine mq broker: %s", brokerName) } - nextToken = *out.NextToken } - return "" + + return resourceAwsMqBrokerRead(d, meta) } diff --git a/aws/data_source_aws_mq_broker_test.go b/aws/data_source_aws_mq_broker_test.go index 807230ac1d5..d05c204e24e 100644 --- a/aws/data_source_aws_mq_broker_test.go +++ b/aws/data_source_aws_mq_broker_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAWSMqBroker_basic(t *testing.T) { rString := acctest.RandString(7) - prefix := "tf-acctest-d-aws-mq-broker" + prefix := "tf-acctest-d-mq-broker" brokerName := fmt.Sprintf("%s-%s", prefix, rString) resource.Test(t, resource.TestCase{ @@ -18,100 +18,125 @@ func TestAccDataSourceAWSMqBroker_basic(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccDataSourceAWSMqBrokerConfigBasic(brokerName, prefix), + Config: testAccDataSourceAWSMqBrokerConfig_byId(brokerName, prefix), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "broker_name", brokerName), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "auto_minor_version_upgrade", "true"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "configuration.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "host_instance_type", "mq.t2.micro"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "instances.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "maintenance_window_start_time.#", "1"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "publicly_accessible", "true"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "security_groups.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "subnet_ids.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_id", "user.#", "2"), - resource.TestCheckResourceAttrSet("data.aws_mq_broker.by_id", "arn"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "broker_name", brokerName), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "auto_minor_version_upgrade", "true"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "configuration.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "deployment_mode", "ACTIVE_STANDBY_MULTI_AZ"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "engine_type", "ActiveMQ"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "engine_version", "5.15.0"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "host_instance_type", "mq.t2.micro"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "instances.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "maintenance_window_start_time.#", "1"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "publicly_accessible", "true"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "security_groups.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "subnet_ids.#", "2"), - resource.TestCheckResourceAttr("data.aws_mq_broker.by_name", "user.#", "2"), - resource.TestCheckResourceAttrSet("data.aws_mq_broker.by_name", "arn"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "arn", + "aws_mq_broker.acctest", "arn"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "broker_name", + "aws_mq_broker.acctest", "broker_name"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "auto_minor_version_upgrade", + "aws_mq_broker.acctest", "auto_minor_version_upgrade"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "deployment_mode", + "aws_mq_broker.acctest", "deployment_mode"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "configuration.#", + "aws_mq_broker.acctest", "configuration.#"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "engine_type", + "aws_mq_broker.acctest", "engine_type"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "engine_version", + "aws_mq_broker.acctest", "engine_version"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "host_instance_type", + "aws_mq_broker.acctest", "host_instance_type"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "instances.#", + "aws_mq_broker.acctest", "instances.#"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "maintenance_window_start_time.#", + "aws_mq_broker.acctest", "maintenance_window_start_time.#"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "publicly_accessible", + "aws_mq_broker.acctest", "publicly_accessible"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "security_groups.#", + "aws_mq_broker.acctest", "security_groups.#"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "subnet_ids.#", + "aws_mq_broker.acctest", "subnet_ids.#"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_id", "user.#", + "aws_mq_broker.acctest", "user.#"), + ), + }, + { + Config: testAccDataSourceAWSMqBrokerConfig_byName(brokerName, prefix), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_name", "broker_id", + "aws_mq_broker.acctest", "id"), + resource.TestCheckResourceAttrPair( + "data.aws_mq_broker.by_name", "broker_name", + "aws_mq_broker.acctest", "broker_name"), ), }, }, }) } -func testAccDataSourceAWSMqBrokerConfigBasic(brokerName, prefix string) string { +func testAccDataSourceAWSMqBrokerConfig_base(brokerName, prefix string) string { return fmt.Sprintf(` variable "prefix" { - default = "%s" + default = "%s" } data "aws_availability_zones" "available" {} resource "aws_vpc" "acctest" { - cidr_block = "10.0.0.0/16" + cidr_block = "10.0.0.0/16" - tags { - Name = "${var.prefix}" - } + tags { + Name = "${var.prefix}" + } } resource "aws_internet_gateway" "acctest" { - vpc_id = "${aws_vpc.acctest.id}" + vpc_id = "${aws_vpc.acctest.id}" } resource "aws_route_table" "acctest" { - vpc_id = "${aws_vpc.acctest.id}" + vpc_id = "${aws_vpc.acctest.id}" - route { - cidr_block = "0.0.0.0/0" - gateway_id = "${aws_internet_gateway.acctest.id}" - } + route { + cidr_block = "0.0.0.0/0" + gateway_id = "${aws_internet_gateway.acctest.id}" + } } resource "aws_subnet" "acctest" { - count = 2 - cidr_block = "10.0.${count.index}.0/24" - availability_zone = "${data.aws_availability_zones.available.names[count.index]}" - vpc_id = "${aws_vpc.acctest.id}" - - tags { - Name = "${var.prefix}" - } + count = 2 + cidr_block = "10.0.${count.index}.0/24" + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + vpc_id = "${aws_vpc.acctest.id}" + + tags { + Name = "${var.prefix}" + } } resource "aws_route_table_association" "acctest" { - count = 2 - subnet_id = "${aws_subnet.acctest.*.id[count.index]}" - route_table_id = "${aws_route_table.acctest.id}" + count = 2 + subnet_id = "${aws_subnet.acctest.*.id[count.index]}" + route_table_id = "${aws_route_table.acctest.id}" } resource "aws_security_group" "acctest" { - count = 2 - name = "${var.prefix}-${count.index}" - vpc_id = "${aws_vpc.acctest.id}" + count = 2 + name = "${var.prefix}-${count.index}" + vpc_id = "${aws_vpc.acctest.id}" } resource "aws_mq_configuration" "acctest" { - name = "${var.prefix}" - engine_type = "ActiveMQ" - engine_version = "5.15.0" + name = "${var.prefix}" + engine_type = "ActiveMQ" + engine_version = "5.15.0" - data = < @@ -119,51 +144,58 @@ DATA } resource "aws_mq_broker" "acctest" { - auto_minor_version_upgrade = true - apply_immediately = true - broker_name = "%s" - - configuration { - id = "${aws_mq_configuration.acctest.id}" - revision = "${aws_mq_configuration.acctest.latest_revision}" - } - - deployment_mode = "ACTIVE_STANDBY_MULTI_AZ" - engine_type = "ActiveMQ" - engine_version = "5.15.0" - host_instance_type = "mq.t2.micro" - - maintenance_window_start_time { - day_of_week = "TUESDAY" - time_of_day = "02:00" - time_zone = "CET" - } - - publicly_accessible = true - security_groups = ["${aws_security_group.acctest.*.id}"] - subnet_ids = ["${aws_subnet.acctest.*.id}"] - - user { - username = "Ender" - password = "AndrewWiggin" - } - - user { - username = "Petra" - password = "PetraArkanian" - console_access = true - groups = ["dragon", "salamander", "leopard"] - } - - depends_on = ["aws_internet_gateway.acctest"] + auto_minor_version_upgrade = true + apply_immediately = true + broker_name = "%s" + + configuration { + id = "${aws_mq_configuration.acctest.id}" + revision = "${aws_mq_configuration.acctest.latest_revision}" + } + + deployment_mode = "ACTIVE_STANDBY_MULTI_AZ" + engine_type = "ActiveMQ" + engine_version = "5.15.0" + host_instance_type = "mq.t2.micro" + + maintenance_window_start_time { + day_of_week = "TUESDAY" + time_of_day = "02:00" + time_zone = "CET" + } + + publicly_accessible = true + security_groups = ["${aws_security_group.acctest.*.id}"] + subnet_ids = ["${aws_subnet.acctest.*.id}"] + + user { + username = "Ender" + password = "AndrewWiggin" + } + + user { + username = "Petra" + password = "PetraArkanian" + console_access = true + groups = ["dragon", "salamander", "leopard"] + } + + depends_on = ["aws_internet_gateway.acctest"] +} +`, prefix, brokerName) } +func testAccDataSourceAWSMqBrokerConfig_byId(brokerName, prefix string) string { + return testAccDataSourceAWSMqBrokerConfig_base(brokerName, prefix) + fmt.Sprintf(` data "aws_mq_broker" "by_id" { - broker_id = "${aws_mq_broker.acctest.id}" + broker_id = "${aws_mq_broker.acctest.id}" +} +`) } +func testAccDataSourceAWSMqBrokerConfig_byName(brokerName, prefix string) string { + return testAccDataSourceAWSMqBrokerConfig_base(brokerName, prefix) + fmt.Sprintf(` data "aws_mq_broker" "by_name" { - broker_name = "${aws_mq_broker.acctest.broker_name}" -} -`, prefix, brokerName) + broker_name = "${aws_mq_broker.acctest.broker_name}" +}`) } diff --git a/website/docs/d/mq_broker.html.markdown b/website/docs/d/mq_broker.html.markdown index 93abfd69d52..001010e7846 100644 --- a/website/docs/d/mq_broker.html.markdown +++ b/website/docs/d/mq_broker.html.markdown @@ -41,5 +41,5 @@ The following arguments are supported: ## Attributes Reference -See the [MQ Broker](/docs/providers/aws/r/mq_broker.html) for details on the returned attributes. +See the [`aws_mq_broker` resource](/docs/providers/aws/r/mq_broker.html) for details on the returned attributes. They are identical except for user password, which is not returned when describing broker. From 65f60b923c0010502a8b02b1d1401606de7d4636 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Fri, 27 Apr 2018 09:05:44 -0500 Subject: [PATCH 0877/3316] Set bucket region as part of test so should stay in same region where vpc and such is created --- aws/resource_aws_rds_cluster_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index 68ac21dea1d..ba4872400a5 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -79,6 +79,8 @@ func TestAccAWSRDSCluster_s3Restore(t *testing.T) { { Config: testAccAWSClusterConfig_s3Restore(bucket, bucketPrefix, uniqueId), Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExistsWithProvider("aws_rds_cluster.test", + &v, testAccAwsRegionProviderFunc("us-west-2", &providers)) testAccCheckAWSClusterExists("aws_rds_cluster.test", &v), resource.TestCheckResourceAttr(resourceName, "engine", "aurora"), ), @@ -579,8 +581,12 @@ resource "aws_db_subnet_group" "test" { func testAccAWSClusterConfig_s3Restore(bucketName string, bucketPrefix string, uniqueId string) string { return fmt.Sprintf(` + +data "aws_region" "current" {} + resource "aws_s3_bucket" "xtrabackup" { bucket = "%s" + region = "${data.aws_region.current.name}" } resource "aws_s3_bucket_object" "xtrabackup_db" { From 23f2e8fea5ef04d17912434b9f0e374b9c1b5a43 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Fri, 27 Apr 2018 09:09:33 -0500 Subject: [PATCH 0878/3316] Whoops --- aws/resource_aws_rds_cluster_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index ba4872400a5..729cda55842 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -79,8 +79,6 @@ func TestAccAWSRDSCluster_s3Restore(t *testing.T) { { Config: testAccAWSClusterConfig_s3Restore(bucket, bucketPrefix, uniqueId), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSClusterExistsWithProvider("aws_rds_cluster.test", - &v, testAccAwsRegionProviderFunc("us-west-2", &providers)) testAccCheckAWSClusterExists("aws_rds_cluster.test", &v), resource.TestCheckResourceAttr(resourceName, "engine", "aurora"), ), From 92579a448cf5f9b563071b56250c4f48d6d7e030 Mon Sep 17 00:00:00 2001 From: jasonmcintosh Date: Fri, 27 Apr 2018 09:15:59 -0500 Subject: [PATCH 0879/3316] Added a note regarding the requirement for S3 to be in same region --- website/docs/r/rds_cluster.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/rds_cluster.html.markdown b/website/docs/r/rds_cluster.html.markdown index cfb3e578c2f..78146709159 100644 --- a/website/docs/r/rds_cluster.html.markdown +++ b/website/docs/r/rds_cluster.html.markdown @@ -119,7 +119,7 @@ Default: A 30-minute window selected at random from an 8-hour block of time per ### S3 Import Options -Full details on the core parameters and impacts are in the API Docs: [RestoreDBClusterFromS3](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBClusterFromS3.html). Sample +Full details on the core parameters and impacts are in the API Docs: [RestoreDBClusterFromS3](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBClusterFromS3.html). Requires that the S3 bucket be in the same region as the RDS cluster you're trying to create. Sample ```hcl resource "aws_rds_cluster" "db" { @@ -141,7 +141,7 @@ resource "aws_rds_cluster" "db" { * `source_engine` - (Required) Source engine for the backup * `source_engine_version` - (Required) Version of the source engine used to make the backup -This will not recreate the resource if the S3 object changes in some way. It's only used to initialize the database. Note, that this only works currently with the aurora engine. See AWS for currently supported engines and options. [Aurora S3 Migration Docs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Migrating.ExtMySQL.html#AuroraMySQL.Migrating.ExtMySQL.S3) +This will not recreate the resource if the S3 object changes in some way. It's only used to initialize the database. This only works currently with the aurora engine. See AWS for currently supported engines and options. [Aurora S3 Migration Docs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Migrating.ExtMySQL.html#AuroraMySQL.Migrating.ExtMySQL.S3) ## Attributes Reference From 5e909e21c1bed976404332dfb4a99ddc30c1405f Mon Sep 17 00:00:00 2001 From: "Ian C. Ward" Date: Fri, 27 Apr 2018 12:01:09 -0400 Subject: [PATCH 0880/3316] Update docs on waf (and wafregional) IP sets This will make the two docs look similar and will also indicate to users that they can specify multiple IP set descriptor blocks --- website/docs/r/waf_ipset.html.markdown | 8 ++++++-- website/docs/r/wafregional_ipset.html.markdown | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/website/docs/r/waf_ipset.html.markdown b/website/docs/r/waf_ipset.html.markdown index b75bfed561a..15c88c8a2c1 100644 --- a/website/docs/r/waf_ipset.html.markdown +++ b/website/docs/r/waf_ipset.html.markdown @@ -20,6 +20,11 @@ resource "aws_waf_ipset" "ipset" { type = "IPV4" value = "192.0.7.0/24" } + + ip_set_descriptors { + type = "IPV4" + value = "10.16.16.0/16" + } } ``` @@ -28,8 +33,7 @@ resource "aws_waf_ipset" "ipset" { The following arguments are supported: * `name` - (Required) The name or description of the IPSet. -* `ip_set_descriptors` - (Optional) Specifies the IP address type (IPV4 or IPV6) - and the IP address range (in CIDR format) that web requests originate from. +* `ip_set_descriptors` - (Optional) One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR format) from which web requests originate. ## Nested Blocks diff --git a/website/docs/r/wafregional_ipset.html.markdown b/website/docs/r/wafregional_ipset.html.markdown index aa6b11985cb..b4d2bf04b7c 100644 --- a/website/docs/r/wafregional_ipset.html.markdown +++ b/website/docs/r/wafregional_ipset.html.markdown @@ -15,10 +15,16 @@ Provides a WAF Regional IPSet Resource for use with Application Load Balancer. ```hcl resource "aws_wafregional_ipset" "ipset" { name = "tfIPSet" + ip_set_descriptor { type = "IPV4" value = "192.0.7.0/24" } + + ip_set_descriptors { + type = "IPV4" + value = "10.16.16.0/16" + } } ``` @@ -27,9 +33,13 @@ resource "aws_wafregional_ipset" "ipset" { The following arguments are supported: * `name` - (Required) The name or description of the IPSet. -* `ip_set_descriptor` - (Optional) The IP address type and IP address range (in CIDR notation) from which web requests originate. +* `ip_set_descriptor` - (Optional) One or more pairs specifying the IP address type (IPV4 or IPV5) and the IP address range (in CIDR notation) from which web requests originate. + +## Nested Blocks + +### `ip_set_descriptor` -IPSetDescriptor(ip_set_descriptor) support following: +#### Arguments * `type` - (Required) The string like IPV4 or IPV6. * `value` - (Required) The CIDR notation. From 9429c7800684edf0682fc7eb5f7cd9cb1b7aa6a8 Mon Sep 17 00:00:00 2001 From: Alex Pilon Date: Thu, 26 Apr 2018 13:36:49 -0400 Subject: [PATCH 0881/3316] implement access logging for apigw stage add acceptance test with different accepted log formats make note of sanitization performed on destinatation_arn --- aws/resource_aws_api_gateway_stage.go | 61 +++++++++++++ aws/resource_aws_api_gateway_stage_test.go | 89 +++++++++++++++++++ .../docs/r/api_gateway_stage.html.markdown | 11 ++- 3 files changed, 160 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index fea558dbd61..2bd4a3c3a85 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -21,6 +22,27 @@ func resourceAwsApiGatewayStage() *schema.Resource { Delete: resourceAwsApiGatewayStageDelete, Schema: map[string]*schema.Schema{ + "access_log_settings": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "destination_arn": { + Type: schema.TypeString, + Required: true, + StateFunc: func(arn interface{}) string { + // arns coming from a TF reference to a log group contain a trailing `:*` which is not valid + return strings.TrimSuffix(arn.(string), ":*") + }, + }, + "format": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "cache_cluster_enabled": { Type: schema.TypeBool, Optional: true, @@ -153,6 +175,9 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) if _, ok := d.GetOk("client_certificate_id"); ok { return resourceAwsApiGatewayStageUpdate(d, meta) } + if _, ok := d.GetOk("access_log_settings"); ok { + return resourceAwsApiGatewayStageUpdate(d, meta) + } return resourceAwsApiGatewayStageRead(d, meta) } @@ -177,6 +202,10 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er } log.Printf("[DEBUG] Received API Gateway Stage: %s", stage) + if err := d.Set("access_log_settings", flattenApiGatewayStageAccessLogSettings(stage.AccessLogSettings)); err != nil { + return fmt.Errorf("error setting access_log_settings: %s", err) + } + d.Set("client_certificate_id", stage.ClientCertificateId) if stage.CacheClusterStatus != nil && *stage.CacheClusterStatus == "DELETE_IN_PROGRESS" { @@ -276,6 +305,27 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) newV := n.(map[string]interface{}) operations = append(operations, diffVariablesOps("/variables/", oldV, newV)...) } + if d.HasChange("access_log_settings") { + accessLogSettings := d.Get("access_log_settings").([]interface{}) + if len(accessLogSettings) == 1 { + operations = append(operations, + &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/accessLogSettings/destinationArn"), + // arns coming from a TF reference to a log group contain a trailing `:*` which is not valid + Value: aws.String(strings.TrimSuffix(d.Get("access_log_settings.0.destination_arn").(string), ":*")), + }, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/accessLogSettings/format"), + Value: aws.String(d.Get("access_log_settings.0.format").(string)), + }) + } else if len(accessLogSettings) == 0 { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("remove"), + Path: aws.String("/accessLogSettings"), + }) + } + } input := apigateway.UpdateStageInput{ RestApiId: aws.String(d.Get("rest_api_id").(string)), @@ -384,3 +434,14 @@ func resourceAwsApiGatewayStageDelete(d *schema.ResourceData, meta interface{}) return nil } + +func flattenApiGatewayStageAccessLogSettings(accessLogSettings *apigateway.AccessLogSettings) []map[string]interface{} { + result := make([]map[string]interface{}, 0, 1) + if accessLogSettings != nil { + result = append(result, map[string]interface{}{ + "destination_arn": aws.StringValue(accessLogSettings.DestinationArn), + "format": aws.StringValue(accessLogSettings.Format), + }) + } + return result +} diff --git a/aws/resource_aws_api_gateway_stage_test.go b/aws/resource_aws_api_gateway_stage_test.go index 67dd003706d..7f438ecfbe9 100644 --- a/aws/resource_aws_api_gateway_stage_test.go +++ b/aws/resource_aws_api_gateway_stage_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -58,6 +59,67 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) { }) } +func TestAccAWSAPIGatewayStage_accessLogSettings(t *testing.T) { + var conf apigateway.Stage + rName := acctest.RandString(5) + logGroupArnRegex := regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:logs:[^:]+:[^:]+:log-group:foo-bar-%s$", rName)) + clf := `$context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId` + json := `{ "requestId":"$context.requestId", "ip": "$context.identity.sourceIp", "caller":"$context.identity.caller", "user":"$context.identity.user", "requestTime":"$context.requestTime", "httpMethod":"$context.httpMethod", "resourcePath":"$context.resourcePath", "status":"$context.status", "protocol":"$context.protocol", "responseLength":"$context.responseLength" }` + xml := ` $context.identity.sourceIp $context.identity.caller $context.identity.user $context.requestTime $context.httpMethod $context.resourcePath $context.status $context.protocol $context.responseLength ` + csv := `$context.identity.sourceIp,$context.identity.caller,$context.identity.user,$context.requestTime,$context.httpMethod,$context.resourcePath,$context.protocol,$context.status,$context.responseLength,$context.requestId` + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAPIGatewayStageDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAPIGatewayStageConfig_accessLogSettings(rName, clf), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.#", "1"), + resource.TestMatchResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.destination_arn", logGroupArnRegex), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.format", clf), + ), + }, + { + Config: testAccAWSAPIGatewayStageConfig_accessLogSettings(rName, json), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.#", "1"), + resource.TestMatchResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.destination_arn", logGroupArnRegex), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.format", json), + ), + }, + { + Config: testAccAWSAPIGatewayStageConfig_accessLogSettings(rName, xml), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.#", "1"), + resource.TestMatchResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.destination_arn", logGroupArnRegex), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.format", xml), + ), + }, + { + Config: testAccAWSAPIGatewayStageConfig_accessLogSettings(rName, csv), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.#", "1"), + resource.TestMatchResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.destination_arn", logGroupArnRegex), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.0.format", csv), + ), + }, + { + Config: testAccAWSAPIGatewayStageConfig_basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf), + resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "access_log_settings.#", "0"), + ), + }, + }, + }) +} + func testAccCheckAWSAPIGatewayStageExists(n string, res *apigateway.Stage) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -212,3 +274,30 @@ resource "aws_api_gateway_stage" "test" { } ` } + +func testAccAWSAPIGatewayStageConfig_accessLogSettings(rName string, format string) string { + return testAccAWSAPIGatewayStageConfig_base(rName) + fmt.Sprintf(` +resource "aws_cloudwatch_log_group" "test" { + name = "foo-bar-%s" +} + +resource "aws_api_gateway_stage" "test" { + rest_api_id = "${aws_api_gateway_rest_api.test.id}" + stage_name = "prod" + deployment_id = "${aws_api_gateway_deployment.dev.id}" + cache_cluster_enabled = true + cache_cluster_size = "0.5" + variables { + one = "1" + two = "2" + } + tags { + Name = "tf-test" + } + access_log_settings { + destination_arn = "${aws_cloudwatch_log_group.test.arn}" + format = %q + } +} +`, rName, format) +} diff --git a/website/docs/r/api_gateway_stage.html.markdown b/website/docs/r/api_gateway_stage.html.markdown index d1db65ca630..746054b4986 100644 --- a/website/docs/r/api_gateway_stage.html.markdown +++ b/website/docs/r/api_gateway_stage.html.markdown @@ -50,7 +50,7 @@ resource "aws_api_gateway_method_settings" "s" { settings { metrics_enabled = true - logging_level = "INFO" + logging_level = "INFO" } } @@ -69,6 +69,7 @@ The following arguments are supported: * `rest_api_id` - (Required) The ID of the associated REST API * `stage_name` - (Required) The name of the stage * `deployment_id` - (Required) The ID of the deployment that the stage points to +* `access_log_settings` - (Optional) Enables access logs for the API stage. Detailed below. * `cache_cluster_enabled` - (Optional) Specifies whether a cache cluster is enabled for the stage * `cache_cluster_size` - (Optional) The size of the cache cluster for the stage, if enabled. Allowed values include `0.5`, `1.6`, `6.1`, `13.5`, `28.4`, `58.2`, `118` and `237`. @@ -78,6 +79,14 @@ The following arguments are supported: * `variables` - (Optional) A map that defines the stage variables * `tags` - (Optional) A mapping of tags to assign to the resource. +### Nested Blocks + +#### `access_log_settings` + +* `destination_arn` - (Required) ARN of the log group to send the logs to. Automatically removes trailing `:*` if present. +* `format` - (Required) The formatting and values recorded in the logs. +For more information on configuring the log format rules visit the AWS [documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html) + ## Attribute Reference The following attributes are exported: From 681482a8e94f9df3e43ac198c440786e1783b4bb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 27 Apr 2018 08:51:49 -0400 Subject: [PATCH 0882/3316] resource/aws_iam_group_policy: Properly handle generated policy name updates --- aws/resource_aws_iam_group_policy.go | 7 +- aws/resource_aws_iam_group_policy_test.go | 84 +++++++++++++++++---- aws/resource_aws_iam_role_policy_test.go | 90 +++++++++++++++++++---- 3 files changed, 150 insertions(+), 31 deletions(-) diff --git a/aws/resource_aws_iam_group_policy.go b/aws/resource_aws_iam_group_policy.go index 1bdf7254514..6aafe644dc8 100644 --- a/aws/resource_aws_iam_group_policy.go +++ b/aws/resource_aws_iam_group_policy.go @@ -102,7 +102,12 @@ func resourceAwsIamGroupPolicyRead(d *schema.ResourceData, meta interface{}) err if err != nil { return err } - return d.Set("policy", policy) + + d.Set("group", group) + d.Set("name", name) + d.Set("policy", policy) + + return nil } func resourceAwsIamGroupPolicyDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/aws/resource_aws_iam_group_policy_test.go b/aws/resource_aws_iam_group_policy_test.go index 6e33cd48445..a341f79aa53 100644 --- a/aws/resource_aws_iam_group_policy_test.go +++ b/aws/resource_aws_iam_group_policy_test.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "testing" @@ -13,6 +14,7 @@ import ( ) func TestAccAWSIAMGroupPolicy_basic(t *testing.T) { + var groupPolicy1, groupPolicy2 iam.GetGroupPolicyOutput rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -22,19 +24,22 @@ func TestAccAWSIAMGroupPolicy_basic(t *testing.T) { { Config: testAccIAMGroupPolicyConfig(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMGroupPolicy( + testAccCheckIAMGroupPolicyExists( "aws_iam_group.group", "aws_iam_group_policy.foo", + &groupPolicy1, ), ), }, { Config: testAccIAMGroupPolicyConfigUpdate(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMGroupPolicy( + testAccCheckIAMGroupPolicyExists( "aws_iam_group.group", "aws_iam_group_policy.bar", + &groupPolicy2, ), + testAccCheckAWSIAMGroupPolicyNameChanged(&groupPolicy1, &groupPolicy2), ), }, }, @@ -42,6 +47,7 @@ func TestAccAWSIAMGroupPolicy_basic(t *testing.T) { } func TestAccAWSIAMGroupPolicy_namePrefix(t *testing.T) { + var groupPolicy1, groupPolicy2 iam.GetGroupPolicyOutput rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -50,19 +56,32 @@ func TestAccAWSIAMGroupPolicy_namePrefix(t *testing.T) { CheckDestroy: testAccCheckIAMGroupPolicyDestroy, Steps: []resource.TestStep{ { - Config: testAccIAMGroupPolicyConfig_namePrefix(rInt), + Config: testAccIAMGroupPolicyConfig_namePrefix(rInt, "*"), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMGroupPolicy( + testAccCheckIAMGroupPolicyExists( "aws_iam_group.test", "aws_iam_group_policy.test", + &groupPolicy1, ), ), }, + { + Config: testAccIAMGroupPolicyConfig_namePrefix(rInt, "ec2:*"), + Check: resource.ComposeTestCheckFunc( + testAccCheckIAMGroupPolicyExists( + "aws_iam_group.test", + "aws_iam_group_policy.test", + &groupPolicy2, + ), + testAccCheckAWSIAMGroupPolicyNameMatches(&groupPolicy1, &groupPolicy2), + ), + }, }, }) } func TestAccAWSIAMGroupPolicy_generatedName(t *testing.T) { + var groupPolicy1, groupPolicy2 iam.GetGroupPolicyOutput rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -71,12 +90,24 @@ func TestAccAWSIAMGroupPolicy_generatedName(t *testing.T) { CheckDestroy: testAccCheckIAMGroupPolicyDestroy, Steps: []resource.TestStep{ { - Config: testAccIAMGroupPolicyConfig_generatedName(rInt), + Config: testAccIAMGroupPolicyConfig_generatedName(rInt, "*"), + Check: resource.ComposeTestCheckFunc( + testAccCheckIAMGroupPolicyExists( + "aws_iam_group.test", + "aws_iam_group_policy.test", + &groupPolicy1, + ), + ), + }, + { + Config: testAccIAMGroupPolicyConfig_generatedName(rInt, "ec2:*"), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMGroupPolicy( + testAccCheckIAMGroupPolicyExists( "aws_iam_group.test", "aws_iam_group_policy.test", + &groupPolicy2, ), + testAccCheckAWSIAMGroupPolicyNameMatches(&groupPolicy1, &groupPolicy2), ), }, }, @@ -113,9 +144,10 @@ func testAccCheckIAMGroupPolicyDestroy(s *terraform.State) error { return nil } -func testAccCheckIAMGroupPolicy( +func testAccCheckIAMGroupPolicyExists( iamGroupResource string, - iamGroupPolicyResource string) resource.TestCheckFunc { + iamGroupPolicyResource string, + groupPolicy *iam.GetGroupPolicyOutput) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[iamGroupResource] if !ok { @@ -133,7 +165,7 @@ func testAccCheckIAMGroupPolicy( iamconn := testAccProvider.Meta().(*AWSClient).iamconn group, name := resourceAwsIamGroupPolicyParseId(policy.Primary.ID) - _, err := iamconn.GetGroupPolicy(&iam.GetGroupPolicyInput{ + output, err := iamconn.GetGroupPolicy(&iam.GetGroupPolicyInput{ GroupName: aws.String(group), PolicyName: aws.String(name), }) @@ -142,6 +174,28 @@ func testAccCheckIAMGroupPolicy( return err } + *groupPolicy = *output + + return nil + } +} + +func testAccCheckAWSIAMGroupPolicyNameChanged(i, j *iam.GetGroupPolicyOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.StringValue(i.PolicyName) == aws.StringValue(j.PolicyName) { + return errors.New("IAM Group Policy name did not change") + } + + return nil + } +} + +func testAccCheckAWSIAMGroupPolicyNameMatches(i, j *iam.GetGroupPolicyOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.StringValue(i.PolicyName) != aws.StringValue(j.PolicyName) { + return errors.New("IAM Group Policy name did not match") + } + return nil } } @@ -169,7 +223,7 @@ EOF }`, rInt, rInt) } -func testAccIAMGroupPolicyConfig_namePrefix(rInt int) string { +func testAccIAMGroupPolicyConfig_namePrefix(rInt int, policyAction string) string { return fmt.Sprintf(` resource "aws_iam_group" "test" { name = "test_group_%d" @@ -184,15 +238,15 @@ func testAccIAMGroupPolicyConfig_namePrefix(rInt int) string { "Version": "2012-10-17", "Statement": { "Effect": "Allow", - "Action": "*", + "Action": "%s", "Resource": "*" } } EOF - }`, rInt, rInt) + }`, rInt, rInt, policyAction) } -func testAccIAMGroupPolicyConfig_generatedName(rInt int) string { +func testAccIAMGroupPolicyConfig_generatedName(rInt int, policyAction string) string { return fmt.Sprintf(` resource "aws_iam_group" "test" { name = "test_group_%d" @@ -206,12 +260,12 @@ func testAccIAMGroupPolicyConfig_generatedName(rInt int) string { "Version": "2012-10-17", "Statement": { "Effect": "Allow", - "Action": "*", + "Action": "%s", "Resource": "*" } } EOF - }`, rInt) + }`, rInt, policyAction) } func testAccIAMGroupPolicyConfigUpdate(rInt int) string { diff --git a/aws/resource_aws_iam_role_policy_test.go b/aws/resource_aws_iam_role_policy_test.go index ea9ceb35659..ce1391ad181 100644 --- a/aws/resource_aws_iam_role_policy_test.go +++ b/aws/resource_aws_iam_role_policy_test.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "regexp" "testing" @@ -14,6 +15,7 @@ import ( ) func TestAccAWSIAMRolePolicy_basic(t *testing.T) { + var rolePolicy1, rolePolicy2, rolePolicy3 iam.GetRolePolicyOutput role := acctest.RandString(10) policy1 := acctest.RandString(10) policy2 := acctest.RandString(10) @@ -26,19 +28,28 @@ func TestAccAWSIAMRolePolicy_basic(t *testing.T) { { Config: testAccIAMRolePolicyConfig(role, policy1), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMRolePolicy( + testAccCheckIAMRolePolicyExists( "aws_iam_role.role", "aws_iam_role_policy.foo", + &rolePolicy1, ), ), }, { Config: testAccIAMRolePolicyConfigUpdate(role, policy1, policy2), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMRolePolicy( + testAccCheckIAMRolePolicyExists( + "aws_iam_role.role", + "aws_iam_role_policy.foo", + &rolePolicy2, + ), + testAccCheckIAMRolePolicyExists( "aws_iam_role.role", "aws_iam_role_policy.bar", + &rolePolicy3, ), + testAccCheckAWSIAMRolePolicyNameMatches(&rolePolicy1, &rolePolicy2), + testAccCheckAWSIAMRolePolicyNameChanged(&rolePolicy1, &rolePolicy3), ), }, }, @@ -46,6 +57,7 @@ func TestAccAWSIAMRolePolicy_basic(t *testing.T) { } func TestAccAWSIAMRolePolicy_namePrefix(t *testing.T) { + var rolePolicy1, rolePolicy2 iam.GetRolePolicyOutput role := acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -55,19 +67,32 @@ func TestAccAWSIAMRolePolicy_namePrefix(t *testing.T) { CheckDestroy: testAccCheckIAMRolePolicyDestroy, Steps: []resource.TestStep{ { - Config: testAccIAMRolePolicyConfig_namePrefix(role), + Config: testAccIAMRolePolicyConfig_namePrefix(role, "*"), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMRolePolicy( + testAccCheckIAMRolePolicyExists( "aws_iam_role.test", "aws_iam_role_policy.test", + &rolePolicy1, ), ), }, + { + Config: testAccIAMRolePolicyConfig_namePrefix(role, "ec2:*"), + Check: resource.ComposeTestCheckFunc( + testAccCheckIAMRolePolicyExists( + "aws_iam_role.test", + "aws_iam_role_policy.test", + &rolePolicy2, + ), + testAccCheckAWSIAMRolePolicyNameMatches(&rolePolicy1, &rolePolicy2), + ), + }, }, }) } func TestAccAWSIAMRolePolicy_generatedName(t *testing.T) { + var rolePolicy1, rolePolicy2 iam.GetRolePolicyOutput role := acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -77,12 +102,24 @@ func TestAccAWSIAMRolePolicy_generatedName(t *testing.T) { CheckDestroy: testAccCheckIAMRolePolicyDestroy, Steps: []resource.TestStep{ { - Config: testAccIAMRolePolicyConfig_generatedName(role), + Config: testAccIAMRolePolicyConfig_generatedName(role, "*"), + Check: resource.ComposeTestCheckFunc( + testAccCheckIAMRolePolicyExists( + "aws_iam_role.test", + "aws_iam_role_policy.test", + &rolePolicy1, + ), + ), + }, + { + Config: testAccIAMRolePolicyConfig_generatedName(role, "ec2:*"), Check: resource.ComposeTestCheckFunc( - testAccCheckIAMRolePolicy( + testAccCheckIAMRolePolicyExists( "aws_iam_role.test", "aws_iam_role_policy.test", + &rolePolicy2, ), + testAccCheckAWSIAMRolePolicyNameMatches(&rolePolicy1, &rolePolicy2), ), }, }, @@ -140,9 +177,10 @@ func testAccCheckIAMRolePolicyDestroy(s *terraform.State) error { return nil } -func testAccCheckIAMRolePolicy( +func testAccCheckIAMRolePolicyExists( iamRoleResource string, - iamRolePolicyResource string) resource.TestCheckFunc { + iamRolePolicyResource string, + rolePolicy *iam.GetRolePolicyOutput) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[iamRoleResource] if !ok { @@ -164,7 +202,7 @@ func testAccCheckIAMRolePolicy( return err } - _, err = iamconn.GetRolePolicy(&iam.GetRolePolicyInput{ + output, err := iamconn.GetRolePolicy(&iam.GetRolePolicyInput{ RoleName: aws.String(role), PolicyName: aws.String(name), }) @@ -172,6 +210,28 @@ func testAccCheckIAMRolePolicy( return err } + *rolePolicy = *output + + return nil + } +} + +func testAccCheckAWSIAMRolePolicyNameChanged(i, j *iam.GetRolePolicyOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.StringValue(i.PolicyName) == aws.StringValue(j.PolicyName) { + return errors.New("IAM Role Policy name did not change") + } + + return nil + } +} + +func testAccCheckAWSIAMRolePolicyNameMatches(i, j *iam.GetRolePolicyOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.StringValue(i.PolicyName) != aws.StringValue(j.PolicyName) { + return errors.New("IAM Role Policy name did not match") + } + return nil } } @@ -215,7 +275,7 @@ EOF `, role, policy1) } -func testAccIAMRolePolicyConfig_namePrefix(role string) string { +func testAccIAMRolePolicyConfig_namePrefix(role, policyAction string) string { return fmt.Sprintf(` resource "aws_iam_role" "test" { name = "tf_test_role_%s" @@ -245,16 +305,16 @@ resource "aws_iam_role_policy" "test" { "Version": "2012-10-17", "Statement": { "Effect": "Allow", - "Action": "*", + "Action": "%s", "Resource": "*" } } EOF } -`, role) +`, role, policyAction) } -func testAccIAMRolePolicyConfig_generatedName(role string) string { +func testAccIAMRolePolicyConfig_generatedName(role, policyAction string) string { return fmt.Sprintf(` resource "aws_iam_role" "test" { name = "tf_test_role_%s" @@ -283,13 +343,13 @@ resource "aws_iam_role_policy" "test" { "Version": "2012-10-17", "Statement": { "Effect": "Allow", - "Action": "*", + "Action": "%s", "Resource": "*" } } EOF } -`, role) +`, role, policyAction) } func testAccIAMRolePolicyConfigUpdate(role, policy1, policy2 string) string { From 4ee947555e8908443addc66ca0aee79a87fc14d7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 27 Apr 2018 18:56:50 -0400 Subject: [PATCH 0883/3316] Update CHANGELOG for #4369 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 845b0ac0e7e..ce1433be8ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] +* resource/aws_api_gateway_stage: Add `access_log_settings` argument (Support access logging) [GH-4369] * resource/aws_autoscaling_group: Add `launch_template` argument [GH-4305] * resource/aws_cloudwatch_event_rule: Add `name_prefix` argument [GH-2752] * resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] From ff0c724b12ce1cdc0712c6b6c208a19cc63414af Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 27 Apr 2018 19:41:36 -0400 Subject: [PATCH 0884/3316] Update CHANGELOG for #4366 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce1433be8ce..3f3abbc64de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ENHANCEMENTS: * resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] * resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) [GH-2743] +* resource/aws_rds_cluster: Add `s3_import` argument (Support MySQL Backup Restore from S3) [GH-4366] BUG FIXES: From 80ca22fe9f2b83c2f368af5cfbc9728168b72123 Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Sat, 28 Apr 2018 15:07:40 +0400 Subject: [PATCH 0885/3316] Rename aws_lambda_invoke to aws_lambda_invocation, use TypeString for input field --- ...o => data_source_aws_lambda_invocation.go} | 27 ++-- aws/data_source_aws_lambda_invocation_test.go | 138 ++++++++++++++++++ aws/data_source_aws_lambda_invoke_test.go | 134 ----------------- aws/provider.go | 2 +- ...{lambda_invoke.js => lambda_invocation.js} | 0 aws/test-fixtures/lambda_invocation.zip | Bin 0 -> 290 bytes aws/test-fixtures/lambda_invoke.zip | Bin 282 -> 0 bytes 7 files changed, 149 insertions(+), 152 deletions(-) rename aws/{data_source_aws_lambda_invoke.go => data_source_aws_lambda_invocation.go} (77%) create mode 100644 aws/data_source_aws_lambda_invocation_test.go delete mode 100644 aws/data_source_aws_lambda_invoke_test.go rename aws/test-fixtures/{lambda_invoke.js => lambda_invocation.js} (100%) create mode 100644 aws/test-fixtures/lambda_invocation.zip delete mode 100644 aws/test-fixtures/lambda_invoke.zip diff --git a/aws/data_source_aws_lambda_invoke.go b/aws/data_source_aws_lambda_invocation.go similarity index 77% rename from aws/data_source_aws_lambda_invoke.go rename to aws/data_source_aws_lambda_invocation.go index d332a446c73..e865f43fddd 100644 --- a/aws/data_source_aws_lambda_invoke.go +++ b/aws/data_source_aws_lambda_invocation.go @@ -10,9 +10,9 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func dataSourceAwsLambdaInvoke() *schema.Resource { +func dataSourceAwsLambdaInvocation() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsLambdaInvokeRead, + Read: dataSourceAwsLambdaInvocationRead, Schema: map[string]*schema.Schema{ "function_name": { @@ -29,12 +29,10 @@ func dataSourceAwsLambdaInvoke() *schema.Resource { }, "input": { - Type: schema.TypeMap, - Required: true, - ForceNew: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateJsonString, }, "result": { @@ -48,22 +46,17 @@ func dataSourceAwsLambdaInvoke() *schema.Resource { } } -func dataSourceAwsLambdaInvokeRead(d *schema.ResourceData, meta interface{}) error { +func dataSourceAwsLambdaInvocationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).lambdaconn functionName := d.Get("function_name").(string) qualifier := d.Get("qualifier").(string) - - payload, err := json.Marshal(d.Get("input")) - - if err != nil { - return err - } + input := []byte(d.Get("input").(string)) res, err := conn.Invoke(&lambda.InvokeInput{ FunctionName: aws.String(functionName), InvocationType: aws.String(lambda.InvocationTypeRequestResponse), - Payload: payload, + Payload: input, Qualifier: aws.String(qualifier), }) @@ -85,7 +78,7 @@ func dataSourceAwsLambdaInvokeRead(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("Lambda function (%s) returned invalid JSON: %s", functionName, err) } - d.SetId(fmt.Sprintf("%s_%s_%x", functionName, qualifier, md5.Sum(payload))) + d.SetId(fmt.Sprintf("%s_%s_%x", functionName, qualifier, md5.Sum(input))) return nil } diff --git a/aws/data_source_aws_lambda_invocation_test.go b/aws/data_source_aws_lambda_invocation_test.go new file mode 100644 index 00000000000..7620ba81345 --- /dev/null +++ b/aws/data_source_aws_lambda_invocation_test.go @@ -0,0 +1,138 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAwsLambdaInvocation_basic(t *testing.T) { + testData := "value3" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsLambdaInvocation_basic_config("tf-test-lambda-role", "tf-test-lambda-invocation", testData), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.%", "3"), + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.key1", "value1"), + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.key2", "value2"), + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.key3", testData), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsLambdaInvocation_qualifier(t *testing.T) { + testData := "value3" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsLambdaInvocation_qualifier_config("tf-test-lambda-role-qualifier", "tf-test-lambda-invocation-qualifier", testData), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.%", "3"), + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.key1", "value1"), + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.key2", "value2"), + resource.TestCheckResourceAttr("data.aws_lambda_invocation.invocation_test", "result.key3", testData), + ), + }, + }, + }) +} + +func testAccDataSourceAwsLambdaInvocation_base_config(roleName string) string { + return fmt.Sprintf(` +data "aws_iam_policy_document" "lambda_assume_role_policy" { + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + + principals { + type = "Service" + identifiers = ["lambda.amazonaws.com"] + } + } +} + +resource "aws_iam_role" "lambda_role" { + name = "%s" + assume_role_policy = "${data.aws_iam_policy_document.lambda_assume_role_policy.json}" +} + +resource "aws_iam_role_policy_attachment" "lambda_role_policy" { + policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + role = "${aws_iam_role.lambda_role.name}" +} +`, roleName) +} + +func testAccDataSourceAwsLambdaInvocation_basic_config(roleName, lambdaName, testData string) string { + return fmt.Sprintf(testAccDataSourceAwsLambdaInvocation_base_config(roleName)+` +resource "aws_lambda_function" "lambda" { + depends_on = ["aws_iam_role_policy_attachment.lambda_role_policy"] + + filename = "test-fixtures/lambda_invocation.zip" + function_name = "%s" + role = "${aws_iam_role.lambda_role.arn}" + handler = "lambda_invocation.handler" + runtime = "nodejs8.10" + + environment { + variables = { + TEST_DATA = "%s" + } + } +} + +data "aws_lambda_invocation" "invocation_test" { + function_name = "${aws_lambda_function.lambda.function_name}" + + input = <9*0WckX-zyLPId#%O^eJ#yvr#;SipY+rX+7RlYv+j&{*aZ(= z@3Yz$LpE#;Uhyo5q3MhXYj4w{KTobaO4@s6kI`O%>klSWh#wbl_g%pxz>t0EwBK42 zHmR1-t)>yVx-)dVbTxHPHD_#kw(2PpLx49UlN>WHH%kCr&cFb455tm15DU8xSRp<@ VbA5m}D;r1;BM?Rb=}jOG0{|OZS0MlZ literal 0 HcmV?d00001 diff --git a/aws/test-fixtures/lambda_invoke.zip b/aws/test-fixtures/lambda_invoke.zip deleted file mode 100644 index aa3dd9a9f336f74b43d7a3200161cd6daec308b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 282 zcmWIWW@Zs#U|`^2&`g=&BR_wSb_$T!1H=LhG7LG1xk)LB@tJvL`Pr#@S;e6toD9rw ztFJ`82jbESZU#n{uZ#=~U=zI8YMjv5(!6%st9>zK z!`9#x&w?15&X}FkR0IaXp&L1H4(; PK4 From 752be8a48625fb8a234f8cc83ae20965a2295d83 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Sat, 28 Apr 2018 23:47:30 +0900 Subject: [PATCH 0886/3316] remove seems unnecessary files (aws/resource_aws_guardduty_invite.go) --- aws/provider.go | 1 - aws/resource_aws_guardduty_invite.go | 83 ----------------------- aws/resource_aws_guardduty_invite_test.go | 81 ---------------------- 3 files changed, 165 deletions(-) delete mode 100644 aws/resource_aws_guardduty_invite.go delete mode 100644 aws/resource_aws_guardduty_invite_test.go diff --git a/aws/provider.go b/aws/provider.go index 4952b3bd1b6..05be28cd2db 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -386,7 +386,6 @@ func Provider() terraform.ResourceProvider { "aws_glue_connection": resourceAwsGlueConnection(), "aws_glue_job": resourceAwsGlueJob(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_invite": resourceAwsGuardDutyInvite(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), diff --git a/aws/resource_aws_guardduty_invite.go b/aws/resource_aws_guardduty_invite.go deleted file mode 100644 index 781a278f358..00000000000 --- a/aws/resource_aws_guardduty_invite.go +++ /dev/null @@ -1,83 +0,0 @@ -package aws - -import ( - "github.com/hashicorp/terraform/helper/schema" - "github.com/aws/aws-sdk-go/service/guardduty" - "fmt" - "github.com/aws/aws-sdk-go/aws" - "log" -) - -func resourceAwsGuardDutyInvite() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsGuardDutyInviteCreate, - Read: resourceAwsGuardDutyInviteRead, - Delete: resourceAwsGuardDutyInviteDelete, - - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, - - Schema: map[string]*schema.Schema{ - "detector_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "account_ids": { - Type: schema.TypeList, - Required: true, - ForceNew: true, - }, - "message": { - Type: schema.TypeString, - Required: false, - }, - }, - } -} - -func resourceAwsGuardDutyInviteCreate(d* schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).guarddutyconn - - params := &guardduty.InviteMembersInput{ - DetectorId: aws.String(d.Get("detector_id").(string)), - Message: aws.String(d.Get("message").(string)), - } - - accountIds := d.Get("account_ids").([]string) - params.AccountIds = aws.StringSlice(accountIds) - - log.Printf("[DEBUG] GuardDuty Invite Members: %#v", params) - resp, err := conn.InviteMembers(params) - - if err != nil { - return fmt.Errorf("Inviting GuardDuty Member failed: %s", err) - } - - for _, accountID := range accountIds { - for _, unprocessedAccount := range resp.UnprocessedAccounts { - if accountID == *unprocessedAccount.AccountId { - d.Set("unprocessed_reason", unprocessedAccount.Result) - } - } - - err := resourceAwsGuardDutyMemberRead(d, meta) - - if err != nil { - return err - } - } - d.SetId() - - return nil -} - -func resourceAwsGuardDutyInviteRead(d *schema.ResourceData, meta interface{}) error { - return nil -} - -func resourceAwsGuardDutyInviteDelete(d* schema.ResourceData, meta interface{}) error { - d.SetId("") - return nil -} \ No newline at end of file diff --git a/aws/resource_aws_guardduty_invite_test.go b/aws/resource_aws_guardduty_invite_test.go deleted file mode 100644 index 42c7349f479..00000000000 --- a/aws/resource_aws_guardduty_invite_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package aws - -import ( - "testing" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" - "github.com/aws/aws-sdk-go/service/guardduty" - "github.com/aws/aws-sdk-go/aws" - "fmt" -) - -func testACCAwsGuardDutyInvite_basic(t *testing.T) { - resourceName := "aws_guardduty_invite.test" - accountID := "111111111111" - email := "required@example.com" - message := "foobar" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t)}, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, - Steps: []resource.TestStep { - { - Config: testAccGuardDutyInviteConfig_basic(accountID, email, message), - Check: resource.ComposeTestCheckFunc( - testAccCheckAwsGuardDutyInviteExists(resourceName), - resource.TestCheckResourceAttr(resourceName, "account_id", accountID), - resource.TestCheckResourceAttrSet(resourceName, "detector_id"), - resource.TestCheckResourceAttr(resourceName, "email", email), - resource.TestCheckResourceAttr(resourceName, "message", message), - ), - }, - }, - }) - return -} - - -func testAccCheckAwsGuardDutyInviteExists(name string) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[name] - if !ok { - return fmt.Errorf("Not found: %s", name) - } - - accountID, detectorID, message, err := decodeGuardDutyInviteID(rs.Primary.ID) - if err != nil { - return err - } - - input := &guardduty.InviteMembersInput{ - DetectorId: aws.String(detectorID), - AccountIds: []*string{aws.String(accountID)}, - Message: aws.String(message), - } - - conn := testAccProvider.Meta().(*AWSClient).guarddutyconn - imo, err := conn.InviteMembers(input) - if err != nil { - return err - } - - if len(imo.UnprocessedAccounts) >0 { - return fmt.Errorf("Not found: %s", name) - } - - return nil - } -} - -func testAccGuardDutyInviteConfig_basic(accountID, email, message string) string { - return fmt.Sprintf(` -%[1]s - -resource "aws_guardduty_member" "test" { - account_id = "%[2]s" - detector_id = "${aws_guardduty_detector.test.id}" - email = "%[3]s" -} -` , testAccGuardDutyDetectorConfig_basic1, accountID, email, message) -} \ No newline at end of file From 60843ddc634316b043d01b10a6221a13ee7354a7 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Sun, 29 Apr 2018 02:37:23 +0900 Subject: [PATCH 0887/3316] add invite key and checks with RelationshipStatus --- aws/resource_aws_guardduty_member.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index 90cfbdc83d0..8c77a272d2d 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -37,6 +37,10 @@ func resourceAwsGuardDutyMember() *schema.Resource { Required: true, ForceNew: true, }, + "invite": { + Type: schema.TypeBool, + Required: false, + }, }, } } @@ -61,6 +65,19 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) } d.SetId(fmt.Sprintf("%s:%s", detectorID, accountID)) + + imi := &guardduty.InviteMembersInput{ + DetectorId: &detectorID, + AccountIds: []*string{&accountID}, + Message: aws.String(d.Get("message").(string)), + } + + _, err = conn.InviteMembers(imi) + + if err != nil { + return fmt.Errorf("Inviting GuardDuty Member failed: %s", err.Error()) + } + return resourceAwsGuardDutyMemberRead(d, meta) } @@ -97,6 +114,7 @@ func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) er d.Set("account_id", member.AccountId) d.Set("detector_id", detectorID) d.Set("email", member.Email) + d.Set("invite", member.RelationshipStatus == aws.String("INVITED")) return nil } From 1857746eb6c25780e97f627918a7461fef527a08 Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Sat, 28 Apr 2018 13:42:07 -0400 Subject: [PATCH 0888/3316] Add support for AWS Batch job definition timeout Update the existing `aws_batch_job_definition` resource so that it supports the newly added timeout feature. The timeout configuration is supplied through a `timeout` block inside `aws_batch_job_definition` with a single `attempt_duration_seconds` attribute. --- aws/resource_aws_batch_job_definition.go | 36 +++++++++++++++++++ aws/resource_aws_batch_job_definition_test.go | 6 ++++ .../docs/r/batch_job_definition.html.markdown | 7 ++++ 3 files changed, 49 insertions(+) diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index 1bef71db799..ff99004b1f5 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -56,6 +56,20 @@ func resourceAwsBatchJobDefinition() *schema.Resource { }, }, }, + "timeout": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "attempt_duration_seconds": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, "type": { Type: schema.TypeString, Required: true, @@ -99,6 +113,10 @@ func resourceAwsBatchJobDefinitionCreate(d *schema.ResourceData, meta interface{ input.RetryStrategy = expandJobDefinitionRetryStrategy(v.([]interface{})) } + if v, ok := d.GetOk("timeout"); ok { + input.Timeout = expandJobDefinitionTimeout(v.([]interface{})) + } + out, err := conn.RegisterJobDefinition(input) if err != nil { return fmt.Errorf("%s %q", err, name) @@ -123,6 +141,7 @@ func resourceAwsBatchJobDefinitionRead(d *schema.ResourceData, meta interface{}) d.Set("container_properties", job.ContainerProperties) d.Set("parameters", aws.StringValueMap(job.Parameters)) d.Set("retry_strategy", flattenRetryStrategy(job.RetryStrategy)) + d.Set("timeout", flattenTimeout(job.Timeout)) d.Set("revision", job.Revision) d.Set("type", job.Type) return nil @@ -210,3 +229,20 @@ func flattenRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { } return data } + +func expandJobDefinitionTimeout(item []interface{}) *batch.JobTimeout { + data := item[0].(map[string]interface{}) + return &batch.JobTimeout{ + AttemptDurationSeconds: aws.Int64(int64(data["attempt_duration_seconds"].(int))), + } +} + +func flattenTimeout(item *batch.JobTimeout) []map[string]interface{} { + data := []map[string]interface{}{} + if item != nil { + data = append(data, map[string]interface{}{ + "attempt_duration_seconds": item.AttemptDurationSeconds, + }) + } + return data +} diff --git a/aws/resource_aws_batch_job_definition_test.go b/aws/resource_aws_batch_job_definition_test.go index eba4d9ca3de..293bc6fb813 100644 --- a/aws/resource_aws_batch_job_definition_test.go +++ b/aws/resource_aws_batch_job_definition_test.go @@ -24,6 +24,9 @@ func TestAccAWSBatchJobDefinition_basic(t *testing.T) { RetryStrategy: &batch.RetryStrategy{ Attempts: aws.Int64(int64(1)), }, + Timeout: &batch.JobTimeout{ + AttemptDurationSeconds: aws.Int64(int64(60)), + }, ContainerProperties: &batch.ContainerProperties{ Command: []*string{aws.String("ls"), aws.String("-la")}, Environment: []*batch.KeyValuePair{ @@ -185,6 +188,9 @@ resource "aws_batch_job_definition" "test" { retry_strategy = { attempts = 1 } + timeout = { + attempt_duration_seconds = 60 + } container_properties = < Date: Sat, 28 Apr 2018 20:24:47 +0100 Subject: [PATCH 0889/3316] Switch service role for Glue --- aws/resource_aws_glue_catalog_crawler_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_glue_catalog_crawler_test.go b/aws/resource_aws_glue_catalog_crawler_test.go index 00fc5871f1a..59d32317e52 100644 --- a/aws/resource_aws_glue_catalog_crawler_test.go +++ b/aws/resource_aws_glue_catalog_crawler_test.go @@ -9,7 +9,7 @@ import ( "testing" ) -func TestAccAWSGlueCrawler_full(t *testing.T) { +func TestAccAWSGlueCrawler_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -164,7 +164,7 @@ const testAccGuardDutyDetectorConfigBasic = ` } resource "aws_iam_role_policy_attachment" "aws-glue-service-role-default-policy-attachment" { - policy_arn = "arn:aws:iam::aws:policy/AWSGlueServiceRole" + policy_arn = "arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole" role = "${aws_iam_role.glue.name}" } From cc12f7a9133b1d29a45e95477870944afdfc0955 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Sun, 29 Apr 2018 19:32:45 +0900 Subject: [PATCH 0890/3316] Add lines to wait for email verification progress finishes --- aws/resource_aws_guardduty_member.go | 37 ++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index 8c77a272d2d..5e502fd6a31 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/guardduty" "github.com/hashicorp/terraform/helper/schema" + "time" + "github.com/hashicorp/terraform/helper/resource" ) func resourceAwsGuardDutyMember() *schema.Resource { @@ -37,11 +39,24 @@ func resourceAwsGuardDutyMember() *schema.Resource { Required: true, ForceNew: true, }, + "relationshipStatus": { + Type: schema.TypeString, + Computed: true, + }, "invite": { Type: schema.TypeBool, - Required: false, + Description: "Indicate whether to invite the account", + Default: true, + Optional: true, + }, + "invitation_message": { + Type: schema.TypeString, + Optional: true, }, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(1 * time.Minute), + }, } } @@ -63,22 +78,33 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("Creating GuardDuty Member failed: %s", err.Error()) } + d.SetId(fmt.Sprintf("%s:%s", detectorID, accountID)) + if !d.Get("invite").(bool) { + return resourceAwsGuardDutyMemberRead(d, meta) + } imi := &guardduty.InviteMembersInput{ DetectorId: &detectorID, AccountIds: []*string{&accountID}, - Message: aws.String(d.Get("message").(string)), + Message: aws.String(d.Get("message").(string)), } _, err = conn.InviteMembers(imi) - if err != nil { return fmt.Errorf("Inviting GuardDuty Member failed: %s", err.Error()) } - return resourceAwsGuardDutyMemberRead(d, meta) + // wait until e-mail verification finishes + return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + if d.Get("relationshipStatus").(string) != "EmailVerificationInProgress" { + return nil + } + + log.Printf("[INFO] Email verification for %s is still in progress", accountID) + return resource.NonRetryableError(resourceAwsGuardDutyMemberRead(d, meta)) + }) } func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) error { @@ -110,11 +136,12 @@ func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) er d.SetId("") return nil } + member := gmo.Members[0] d.Set("account_id", member.AccountId) d.Set("detector_id", detectorID) d.Set("email", member.Email) - d.Set("invite", member.RelationshipStatus == aws.String("INVITED")) + d.Set("relationshipStatus", member.RelationshipStatus) return nil } From 1b8c74be070fc13e590e03ed8312ca427c07ba65 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Sun, 29 Apr 2018 21:17:07 +0900 Subject: [PATCH 0891/3316] wrote a test for guardduty member's invitation --- aws/resource_aws_guardduty_member.go | 6 ++- aws/resource_aws_guardduty_member_test.go | 57 +++++++++++++++++++++-- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index 5e502fd6a31..af5228563ee 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -98,8 +98,10 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) // wait until e-mail verification finishes return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - if d.Get("relationshipStatus").(string) != "EmailVerificationInProgress" { - return nil + // https://docs.aws.amazon.com/acm/latest/ug/get-members.html + status := d.Get("relationshipStatus").(string) + if status != "INVITED" { + return resource.RetryableError(fmt.Errorf("Expected member to be invited but was in state: %s", status)) } log.Printf("[INFO] Email verification for %s is still in progress", accountID) diff --git a/aws/resource_aws_guardduty_member_test.go b/aws/resource_aws_guardduty_member_test.go index 512a192bf77..23891d90ffa 100644 --- a/aws/resource_aws_guardduty_member_test.go +++ b/aws/resource_aws_guardduty_member_test.go @@ -8,12 +8,16 @@ import ( "github.com/aws/aws-sdk-go/service/guardduty" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" + "strconv" + "github.com/hashicorp/terraform/helper/acctest" + "regexp" ) func testAccAwsGuardDutyMember_basic(t *testing.T) { resourceName := "aws_guardduty_member.test" accountID := "111111111111" email := "required@example.com" + invitationMessage := "inviting" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,12 +25,24 @@ func testAccAwsGuardDutyMember_basic(t *testing.T) { CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, Steps: []resource.TestStep{ { - Config: testAccGuardDutyMemberConfig_basic(accountID, email), + Config: testAccGuardDutyMemberConfig_basic1(accountID, email), Check: resource.ComposeTestCheckFunc( testAccCheckAwsGuardDutyMemberExists(resourceName), resource.TestCheckResourceAttr(resourceName, "account_id", accountID), resource.TestCheckResourceAttrSet(resourceName, "detector_id"), resource.TestCheckResourceAttr(resourceName, "email", email), + resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(true)), + ), + }, + { + Config: testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsGuardDutyMemberExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "account_id", accountID), + resource.TestCheckResourceAttrSet(resourceName, "detector_id"), + resource.TestCheckResourceAttr(resourceName, "email", email), + resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(false)), + resource.TestCheckResourceAttr(resourceName, "invitation_message", invitationMessage), ), }, }, @@ -41,11 +57,11 @@ func testAccAwsGuardDutyMember_import(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccGuardDutyMemberConfig_basic("111111111111", "required@example.com"), + { + Config: testAccGuardDutyMemberConfig_basic1("111111111111", "required@example.com"), }, - resource.TestStep{ + { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, @@ -54,6 +70,23 @@ func testAccAwsGuardDutyMember_import(t *testing.T) { }) } +func testAccAwsGuardDutyMemberInvitation_timeout(t *testing.T) { + + rEmail := acctest.RandString(10) + "@" + acctest.RandString(5) + ".com" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGuardDutyMemberConfig_basic2("111111111111", rEmail, "test", true), + ExpectError: regexp.MustCompile("Expected member to be invited but was in state: EmailVerificationFailed"), + }, + }, + }) +} + func testAccCheckAwsGuardDutyMemberDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).guarddutyconn @@ -121,7 +154,7 @@ func testAccCheckAwsGuardDutyMemberExists(name string) resource.TestCheckFunc { } } -func testAccGuardDutyMemberConfig_basic(accountID, email string) string { +func testAccGuardDutyMemberConfig_basic1(accountID, email string) string { return fmt.Sprintf(` %[1]s @@ -132,3 +165,17 @@ resource "aws_guardduty_member" "test" { } `, testAccGuardDutyDetectorConfig_basic1, accountID, email) } + +func testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage string, invite bool) string { + return fmt.Sprintf(` +%[1]s + +resource "aws_guardduty_member" "test" { + account_id = "%[2]s" + detector_id = "${aws_guardduty_detector.test.id}" + email = "%[3]s" + invite = "%[4]s" + invite = "%[5]s" +} +`, testAccGuardDutyDetectorConfig_basic1, accountID, email, strconv.FormatBool(invite), invitationMessage) +} From 45d5dbb08528454f45b20db01d05187884173128 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Sun, 29 Apr 2018 21:23:28 +0900 Subject: [PATCH 0892/3316] gofmt --- aws/resource_aws_guardduty_member.go | 10 +++++----- aws/resource_aws_guardduty_member_test.go | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index af5228563ee..8d109a616da 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -7,9 +7,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "time" - "github.com/hashicorp/terraform/helper/resource" ) func resourceAwsGuardDutyMember() *schema.Resource { @@ -40,14 +40,14 @@ func resourceAwsGuardDutyMember() *schema.Resource { ForceNew: true, }, "relationshipStatus": { - Type: schema.TypeString, + Type: schema.TypeString, Computed: true, }, "invite": { - Type: schema.TypeBool, + Type: schema.TypeBool, Description: "Indicate whether to invite the account", - Default: true, - Optional: true, + Default: true, + Optional: true, }, "invitation_message": { Type: schema.TypeString, diff --git a/aws/resource_aws_guardduty_member_test.go b/aws/resource_aws_guardduty_member_test.go index 23891d90ffa..8d47d21be22 100644 --- a/aws/resource_aws_guardduty_member_test.go +++ b/aws/resource_aws_guardduty_member_test.go @@ -6,11 +6,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" - "strconv" - "github.com/hashicorp/terraform/helper/acctest" "regexp" + "strconv" ) func testAccAwsGuardDutyMember_basic(t *testing.T) { @@ -80,7 +80,7 @@ func testAccAwsGuardDutyMemberInvitation_timeout(t *testing.T) { CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, Steps: []resource.TestStep{ { - Config: testAccGuardDutyMemberConfig_basic2("111111111111", rEmail, "test", true), + Config: testAccGuardDutyMemberConfig_basic2("111111111111", rEmail, "test", true), ExpectError: regexp.MustCompile("Expected member to be invited but was in state: EmailVerificationFailed"), }, }, From 55464e03c07573af4c9d06f03b621998e9a9a018 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Sun, 29 Apr 2018 23:58:43 +0900 Subject: [PATCH 0893/3316] update --- aws/resource_aws_guardduty_member.go | 49 ++++++++++++++++++- aws/resource_aws_guardduty_member_test.go | 57 +++++++++++++++++++++-- 2 files changed, 100 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index 90cfbdc83d0..806c7415c80 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -7,7 +7,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "time" ) func resourceAwsGuardDutyMember() *schema.Resource { @@ -37,6 +39,23 @@ func resourceAwsGuardDutyMember() *schema.Resource { Required: true, ForceNew: true, }, + "relationship_status": { + Type: schema.TypeString, + Computed: true, + }, + "invite": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "invitation_message": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(30 * time.Second), }, } } @@ -59,9 +78,35 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) if err != nil { return fmt.Errorf("Creating GuardDuty Member failed: %s", err.Error()) } + d.SetId(fmt.Sprintf("%s:%s", detectorID, accountID)) - return resourceAwsGuardDutyMemberRead(d, meta) + if !d.Get("invite").(bool) { + return resourceAwsGuardDutyMemberRead(d, meta) + } + + imi := &guardduty.InviteMembersInput{ + DetectorId: &detectorID, + AccountIds: []*string{&accountID}, + Message: aws.String(d.Get("message").(string)), + } + + _, err = conn.InviteMembers(imi) + if err != nil { + return fmt.Errorf("Inviting GuardDuty Member failed: %s", err.Error()) + } + + // wait until e-mail verification finishes + return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + // https://docs.aws.amazon.com/acm/latest/ug/get-members.html + status := d.Get("relationship_status").(string) + if status != "INVITED" { + return resource.RetryableError(fmt.Errorf("Expected member to be invited but was in state: %s", status)) + } + + log.Printf("[INFO] Email verification for %s is still in progress", accountID) + return resource.NonRetryableError(resourceAwsGuardDutyMemberRead(d, meta)) + }) } func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) error { @@ -93,10 +138,12 @@ func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) er d.SetId("") return nil } + member := gmo.Members[0] d.Set("account_id", member.AccountId) d.Set("detector_id", detectorID) d.Set("email", member.Email) + d.Set("relationship_status", member.RelationshipStatus) return nil } diff --git a/aws/resource_aws_guardduty_member_test.go b/aws/resource_aws_guardduty_member_test.go index 512a192bf77..8d47d21be22 100644 --- a/aws/resource_aws_guardduty_member_test.go +++ b/aws/resource_aws_guardduty_member_test.go @@ -6,14 +6,18 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/guardduty" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" + "regexp" + "strconv" ) func testAccAwsGuardDutyMember_basic(t *testing.T) { resourceName := "aws_guardduty_member.test" accountID := "111111111111" email := "required@example.com" + invitationMessage := "inviting" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,12 +25,24 @@ func testAccAwsGuardDutyMember_basic(t *testing.T) { CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, Steps: []resource.TestStep{ { - Config: testAccGuardDutyMemberConfig_basic(accountID, email), + Config: testAccGuardDutyMemberConfig_basic1(accountID, email), Check: resource.ComposeTestCheckFunc( testAccCheckAwsGuardDutyMemberExists(resourceName), resource.TestCheckResourceAttr(resourceName, "account_id", accountID), resource.TestCheckResourceAttrSet(resourceName, "detector_id"), resource.TestCheckResourceAttr(resourceName, "email", email), + resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(true)), + ), + }, + { + Config: testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsGuardDutyMemberExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "account_id", accountID), + resource.TestCheckResourceAttrSet(resourceName, "detector_id"), + resource.TestCheckResourceAttr(resourceName, "email", email), + resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(false)), + resource.TestCheckResourceAttr(resourceName, "invitation_message", invitationMessage), ), }, }, @@ -41,11 +57,11 @@ func testAccAwsGuardDutyMember_import(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccGuardDutyMemberConfig_basic("111111111111", "required@example.com"), + { + Config: testAccGuardDutyMemberConfig_basic1("111111111111", "required@example.com"), }, - resource.TestStep{ + { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, @@ -54,6 +70,23 @@ func testAccAwsGuardDutyMember_import(t *testing.T) { }) } +func testAccAwsGuardDutyMemberInvitation_timeout(t *testing.T) { + + rEmail := acctest.RandString(10) + "@" + acctest.RandString(5) + ".com" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGuardDutyMemberConfig_basic2("111111111111", rEmail, "test", true), + ExpectError: regexp.MustCompile("Expected member to be invited but was in state: EmailVerificationFailed"), + }, + }, + }) +} + func testAccCheckAwsGuardDutyMemberDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).guarddutyconn @@ -121,7 +154,7 @@ func testAccCheckAwsGuardDutyMemberExists(name string) resource.TestCheckFunc { } } -func testAccGuardDutyMemberConfig_basic(accountID, email string) string { +func testAccGuardDutyMemberConfig_basic1(accountID, email string) string { return fmt.Sprintf(` %[1]s @@ -132,3 +165,17 @@ resource "aws_guardduty_member" "test" { } `, testAccGuardDutyDetectorConfig_basic1, accountID, email) } + +func testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage string, invite bool) string { + return fmt.Sprintf(` +%[1]s + +resource "aws_guardduty_member" "test" { + account_id = "%[2]s" + detector_id = "${aws_guardduty_detector.test.id}" + email = "%[3]s" + invite = "%[4]s" + invite = "%[5]s" +} +`, testAccGuardDutyDetectorConfig_basic1, accountID, email, strconv.FormatBool(invite), invitationMessage) +} From 0a4f524419fca99d551aedac7f0f90749e1656f7 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Mon, 30 Apr 2018 00:01:22 +0900 Subject: [PATCH 0894/3316] fix field name to snake case --- aws/resource_aws_guardduty_member.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index 8d109a616da..a5c848c0857 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -39,23 +39,23 @@ func resourceAwsGuardDutyMember() *schema.Resource { Required: true, ForceNew: true, }, - "relationshipStatus": { + "relationship_status": { Type: schema.TypeString, Computed: true, }, "invite": { - Type: schema.TypeBool, - Description: "Indicate whether to invite the account", - Default: true, - Optional: true, + Type: schema.TypeBool, + Optional: true, + ForceNew: true, }, "invitation_message": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, }, Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(1 * time.Minute), + Create: schema.DefaultTimeout(30 * time.Second), }, } } @@ -99,7 +99,7 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) // wait until e-mail verification finishes return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { // https://docs.aws.amazon.com/acm/latest/ug/get-members.html - status := d.Get("relationshipStatus").(string) + status := d.Get("relationship_status").(string) if status != "INVITED" { return resource.RetryableError(fmt.Errorf("Expected member to be invited but was in state: %s", status)) } @@ -143,7 +143,7 @@ func resourceAwsGuardDutyMemberRead(d *schema.ResourceData, meta interface{}) er d.Set("account_id", member.AccountId) d.Set("detector_id", detectorID) d.Set("email", member.Email) - d.Set("relationshipStatus", member.RelationshipStatus) + d.Set("relationship_status", member.RelationshipStatus) return nil } @@ -178,4 +178,4 @@ func decodeGuardDutyMemberID(id string) (accountID, detectorID string, err error accountID = parts[1] detectorID = parts[0] return -} +} \ No newline at end of file From 73cd264a836d4f40614f834a5d73f662e53ade44 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Mon, 30 Apr 2018 00:05:08 +0900 Subject: [PATCH 0895/3316] make fmt and go fmt --- aws/resource_aws_guardduty_member.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index a5c848c0857..806c7415c80 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -178,4 +178,4 @@ func decodeGuardDutyMemberID(id string) (accountID, detectorID string, err error accountID = parts[1] detectorID = parts[0] return -} \ No newline at end of file +} From 6e4423181a133707e77b071f4387e8ffdb0e5088 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Mon, 30 Apr 2018 00:36:35 +0900 Subject: [PATCH 0896/3316] simplified testcase --- aws/resource_aws_guardduty_member_test.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_guardduty_member_test.go b/aws/resource_aws_guardduty_member_test.go index 8d47d21be22..85418d53ee1 100644 --- a/aws/resource_aws_guardduty_member_test.go +++ b/aws/resource_aws_guardduty_member_test.go @@ -10,13 +10,13 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" "regexp" - "strconv" ) -func testAccAwsGuardDutyMember_basic(t *testing.T) { +func TestAccAwsGuardDutyMember_basic(t *testing.T) { resourceName := "aws_guardduty_member.test" accountID := "111111111111" email := "required@example.com" + invite := "true" invitationMessage := "inviting" resource.Test(t, resource.TestCase{ @@ -31,17 +31,16 @@ func testAccAwsGuardDutyMember_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "account_id", accountID), resource.TestCheckResourceAttrSet(resourceName, "detector_id"), resource.TestCheckResourceAttr(resourceName, "email", email), - resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(true)), ), }, { - Config: testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage, false), + Config: testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage, invite), Check: resource.ComposeTestCheckFunc( testAccCheckAwsGuardDutyMemberExists(resourceName), resource.TestCheckResourceAttr(resourceName, "account_id", accountID), resource.TestCheckResourceAttrSet(resourceName, "detector_id"), resource.TestCheckResourceAttr(resourceName, "email", email), - resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(false)), + resource.TestCheckResourceAttr(resourceName, "invite", invite), resource.TestCheckResourceAttr(resourceName, "invitation_message", invitationMessage), ), }, @@ -80,7 +79,7 @@ func testAccAwsGuardDutyMemberInvitation_timeout(t *testing.T) { CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, Steps: []resource.TestStep{ { - Config: testAccGuardDutyMemberConfig_basic2("111111111111", rEmail, "test", true), + Config: testAccGuardDutyMemberConfig_basic2("111111111111", rEmail, "test", "true"), ExpectError: regexp.MustCompile("Expected member to be invited but was in state: EmailVerificationFailed"), }, }, @@ -166,7 +165,7 @@ resource "aws_guardduty_member" "test" { `, testAccGuardDutyDetectorConfig_basic1, accountID, email) } -func testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage string, invite bool) string { +func testAccGuardDutyMemberConfig_basic2(accountID, email, invite, invitationMessage string) string { return fmt.Sprintf(` %[1]s @@ -177,5 +176,5 @@ resource "aws_guardduty_member" "test" { invite = "%[4]s" invite = "%[5]s" } -`, testAccGuardDutyDetectorConfig_basic1, accountID, email, strconv.FormatBool(invite), invitationMessage) +`, testAccGuardDutyDetectorConfig_basic1, accountID, email, invite, invitationMessage) } From f27685083f342568d430283e174bc71c591daa68 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Mon, 30 Apr 2018 00:52:22 +0900 Subject: [PATCH 0897/3316] change typo --- aws/resource_aws_guardduty_member_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_guardduty_member_test.go b/aws/resource_aws_guardduty_member_test.go index 85418d53ee1..93d060f9143 100644 --- a/aws/resource_aws_guardduty_member_test.go +++ b/aws/resource_aws_guardduty_member_test.go @@ -12,7 +12,7 @@ import ( "regexp" ) -func TestAccAwsGuardDutyMember_basic(t *testing.T) { +func testAccAwsGuardDutyMember_basic(t *testing.T) { resourceName := "aws_guardduty_member.test" accountID := "111111111111" email := "required@example.com" From 63fbf62d51aa8d00550c627b3a40f42c7a07dd3c Mon Sep 17 00:00:00 2001 From: ken5scal Date: Mon, 30 Apr 2018 01:30:56 +0900 Subject: [PATCH 0898/3316] update documents --- website/docs/r/guardduty_member.html.markdown | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/website/docs/r/guardduty_member.html.markdown b/website/docs/r/guardduty_member.html.markdown index 13e8d6a0382..400820c1a16 100644 --- a/website/docs/r/guardduty_member.html.markdown +++ b/website/docs/r/guardduty_member.html.markdown @@ -10,7 +10,7 @@ description: |- Provides a resource to manage a GuardDuty member. -~> **NOTE:** Currently after using this resource, you must manually invite and accept member account invitations before GuardDuty will begin sending cross-account events. More information for how to accomplish this via the AWS Console or API can be found in the [GuardDuty User Guide](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_accounts.html). Terraform implementation of member invitation and acceptance resources can be tracked in [Github](https://github.com/terraform-providers/terraform-provider-aws/issues/2489). +~> **NOTE:** Currently after using this resource, you must manually accept member account invitations before GuardDuty will begin sending cross-account events. More information for how to accomplish this via the AWS Console or API can be found in the [GuardDuty User Guide](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_accounts.html). Terraform implementation of member invitation and acceptance resources can be tracked in [Github](https://github.com/terraform-providers/terraform-provider-aws/issues/2489). ## Example Usage @@ -26,9 +26,11 @@ resource "aws_guardduty_detector" "member" { } resource "aws_guardduty_member" "member" { - account_id = "${aws_guardduty_detector.member.account_id}" - detector_id = "${aws_guardduty_detector.master.id}" - email = "required@example.com" + account_id = "${aws_guardduty_detector.member.account_id}" + detector_id = "${aws_guardduty_detector.master.id}" + email = "required@example.com" + invite = true + invitation_message = "please accept guardduty invitation" } ``` @@ -39,12 +41,15 @@ The following arguments are supported: * `account_id` - (Required) AWS account ID for member account. * `detector_id` - (Required) The detector ID of the GuardDuty account where you want to create member accounts. * `email` - (Required) Email address for member account. +* `invite` - (Optional) The flag to send an invitation to specified AWS account ID. +* `invitation_message` - (Optional) Message for invitation. ## Attributes Reference The following additional attributes are exported: * `id` - The ID of the GuardDuty member +* `relationship_status` - The status of the relationship between the member account and its master account. More information can be found in [Amazon GuardDuty API Reference](https://docs.aws.amazon.com/guardduty/latest/ug/get-members.html). ## Import From 85fd18dab4f2f14852c4a30f0c599fa57c69cd63 Mon Sep 17 00:00:00 2001 From: Sangho Na Date: Mon, 30 Apr 2018 11:08:57 +1200 Subject: [PATCH 0899/3316] Remove redundant code --- aws/resource_aws_dms_endpoint.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_dms_endpoint.go b/aws/resource_aws_dms_endpoint.go index 67f746c11ab..1e2d841894d 100644 --- a/aws/resource_aws_dms_endpoint.go +++ b/aws/resource_aws_dms_endpoint.go @@ -215,9 +215,7 @@ func resourceAwsDmsEndpointRead(d *schema.ResourceData, meta interface{}) error if err != nil { return err } - d.Set("tags", dmsTagsToMap(tagsResp.TagList)) - - return nil + return d.Set("tags", dmsTagsToMap(tagsResp.TagList)) } func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) error { @@ -316,11 +314,7 @@ func resourceAwsDmsEndpointDelete(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] DMS delete endpoint: %#v", request) _, err := conn.DeleteEndpoint(request) - if err != nil { - return err - } - - return nil + return err } func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoint) error { From 77c8928819adfbe10e7742589aa699c6165722e4 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Mon, 30 Apr 2018 10:07:36 +0900 Subject: [PATCH 0900/3316] r/ecs_service: Added ordered placement strategy --- aws/resource_aws_ecs_service.go | 137 +++++++++++++++++++---- aws/resource_aws_ecs_service_test.go | 57 +++++++++- website/docs/r/ecs_service.html.markdown | 11 +- 3 files changed, 174 insertions(+), 31 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index dba91022ccb..a31262395b5 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -146,10 +146,12 @@ func resourceAwsEcsService() *schema.Resource { }, }, "placement_strategy": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - MaxItems: 5, + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + MaxItems: 5, + ConflictsWith: []string{"ordered_placement_strategy"}, + Deprecated: "Use `ordered_placement_strategy` instead", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { @@ -185,7 +187,40 @@ func resourceAwsEcsService() *schema.Resource { return hashcode.String(buf.String()) }, }, - + "ordered_placement_strategy": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 5, + ConflictsWith: []string{"placement_strategy"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "field": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + StateFunc: func(v interface{}) string { + value := v.(string) + if value == "host" { + return "instanceId" + } + return value + }, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if strings.ToLower(old) == strings.ToLower(new) { + return true + } + return false + }, + }, + }, + }, + }, "placement_constraints": { Type: schema.TypeSet, Optional: true, @@ -288,20 +323,16 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.NetworkConfiguration = expandEcsNetworkConfiguration(d.Get("network_configuration").([]interface{})) - strategies := d.Get("placement_strategy").(*schema.Set).List() - if len(strategies) > 0 { - var ps []*ecs.PlacementStrategy - for _, raw := range strategies { - p := raw.(map[string]interface{}) - t := p["type"].(string) - f := p["field"].(string) - if err := validateAwsEcsPlacementStrategy(t, f); err != nil { - return err - } - ps = append(ps, &ecs.PlacementStrategy{ - Type: aws.String(p["type"].(string)), - Field: aws.String(p["field"].(string)), - }) + if v, ok := d.GetOk("ordered_placement_strategy"); ok { + ps, err := expandPlacementStrategy(v.([]interface{})) + if err != nil { + return err + } + input.PlacementStrategy = ps + } else { + ps, err := expandPlacementStrategyDeprecated(d.Get("placement_strategy").(*schema.Set)) + if err != nil { + return err } input.PlacementStrategy = ps } @@ -474,8 +505,10 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { d.Set("load_balancer", flattenEcsLoadBalancers(service.LoadBalancers)) } - if err := d.Set("placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)); err != nil { - log.Printf("[ERR] Error setting placement_strategy for (%s): %s", d.Id(), err) + if _, ok := d.GetOk("placement_strategy"); ok { + d.Set("placement_strategy", flattenPlacementStrategyDeprecated(service.PlacementStrategy)) + } else { + d.Set("ordered_placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)) } if err := d.Set("placement_constraints", flattenServicePlacementConstraints(service.PlacementConstraints)); err != nil { log.Printf("[ERR] Error setting placement_constraints for (%s): %s", d.Id(), err) @@ -545,7 +578,7 @@ func flattenServicePlacementConstraints(pcs []*ecs.PlacementConstraint) []map[st return results } -func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []map[string]interface{} { +func flattenPlacementStrategyDeprecated(pss []*ecs.PlacementStrategy) []map[string]interface{} { if len(pss) == 0 { return nil } @@ -565,6 +598,66 @@ func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []map[string]interfa return results } +func expandPlacementStrategy(s []interface{}) ([]*ecs.PlacementStrategy, error) { + if len(s) == 0 { + return nil, nil + } + ps := make([]*ecs.PlacementStrategy, 0) + for _, raw := range s { + p := raw.(map[string]interface{}) + t := p["type"].(string) + f := p["field"].(string) + if err := validateAwsEcsPlacementStrategy(t, f); err != nil { + return nil, err + } + ps = append(ps, &ecs.PlacementStrategy{ + Type: aws.String(t), + Field: aws.String(f), + }) + } + return ps, nil +} + +func expandPlacementStrategyDeprecated(s *schema.Set) ([]*ecs.PlacementStrategy, error) { + if len(s.List()) == 0 { + return nil, nil + } + ps := make([]*ecs.PlacementStrategy, 0) + for _, raw := range s.List() { + p := raw.(map[string]interface{}) + t := p["type"].(string) + f := p["field"].(string) + if err := validateAwsEcsPlacementStrategy(t, f); err != nil { + return nil, err + } + ps = append(ps, &ecs.PlacementStrategy{ + Type: aws.String(t), + Field: aws.String(f), + }) + } + return ps, nil +} + +func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []interface{} { + if len(pss) == 0 { + return nil + } + results := make([]interface{}, 0, len(pss)) + for _, ps := range pss { + c := make(map[string]interface{}) + c["type"] = *ps.Type + c["field"] = *ps.Field + + // for some fields the API requires lowercase for creation but will return uppercase on query + if *ps.Field == "MEMORY" || *ps.Field == "CPU" { + c["field"] = strings.ToLower(*ps.Field) + } + + results = append(results, c) + } + return results +} + func flattenServiceRegistries(srs []*ecs.ServiceRegistry) []map[string]interface{} { if len(srs) == 0 { return nil diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index 27d4c87a7ec..31f0bb10b9c 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -457,14 +457,27 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { Config: testAccAWSEcsService(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), - resource.TestCheckResourceAttr("aws_ecs_service.mongo", "placement_strategy.#", "0"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "0"), ), }, { Config: testAccAWSEcsServiceWithPlacementStrategy(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), - resource.TestCheckResourceAttr("aws_ecs_service.mongo", "placement_strategy.#", "1"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "1"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.type", "binpack"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field", "memory"), + ), + }, + { + Config: testAccAWSEcsServiceWithMultiPlacementStrategy(clusterName, tdName, svcName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "2"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.type", "binpack"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field", "memory"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.1.type", "spread"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.1.field", "instanceId"), ), }, }, @@ -838,7 +851,7 @@ resource "aws_ecs_service" "mongo" { cluster = "${aws_ecs_cluster.default.id}" task_definition = "${aws_ecs_task_definition.mongo.arn}" desired_count = 1 - placement_strategy { + ordered_placement_strategy { type = "binpack" field = "memory" } @@ -846,6 +859,44 @@ resource "aws_ecs_service" "mongo" { `, clusterName, tdName, svcName) } +func testAccAWSEcsServiceWithMultiPlacementStrategy(clusterName, tdName, svcName string) string { + return fmt.Sprintf(` +resource "aws_ecs_cluster" "default" { + name = "%s" +} + +resource "aws_ecs_task_definition" "mongo" { + family = "%s" + container_definitions = < Date: Mon, 30 Apr 2018 11:01:18 +0900 Subject: [PATCH 0901/3316] fix indentation --- aws/resource_aws_ecs_service_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index 31f0bb10b9c..32cda44a99d 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -862,7 +862,7 @@ resource "aws_ecs_service" "mongo" { func testAccAWSEcsServiceWithMultiPlacementStrategy(clusterName, tdName, svcName string) string { return fmt.Sprintf(` resource "aws_ecs_cluster" "default" { - name = "%s" + name = "%s" } resource "aws_ecs_task_definition" "mongo" { @@ -886,12 +886,12 @@ resource "aws_ecs_service" "mongo" { task_definition = "${aws_ecs_task_definition.mongo.arn}" desired_count = 1 ordered_placement_strategy { - type = "binpack" - field = "memory" + type = "binpack" + field = "memory" } - ordered_placement_strategy { - field = "host" - type = "spread" + ordered_placement_strategy { + field = "host" + type = "spread" } } `, clusterName, tdName, svcName) From 7e916817303ca30a28a5d1aa7fb80f59730687c2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 30 Apr 2018 08:38:07 -0400 Subject: [PATCH 0902/3316] Update CHANGELOG for #3163 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f3abbc64de..064d5f41d89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.17.0 (Unreleased) +FEATURES: + +* **New Data Source:** `aws_mq_broker` [GH-3163] + ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] From 67f57fb0a0928a9c632ad5e6659a5ab0f3753b90 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 30 Apr 2018 08:46:43 -0400 Subject: [PATCH 0903/3316] Update CHANGELOG for #1879 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 064d5f41d89..dc71109c2b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_mq_broker` [GH-3163] +* **New Resouce:** `aws_budgets_budget` [GH-1879] ENHANCEMENTS: From bb817ab21d1e6c947008114bd6faf45048464df9 Mon Sep 17 00:00:00 2001 From: Puneeth Nanjundaswamy Date: Mon, 30 Apr 2018 15:21:58 +0200 Subject: [PATCH 0904/3316] fix aws_appautoscaling_policy policy_type docs --- website/docs/r/appautoscaling_policy.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/r/appautoscaling_policy.html.markdown b/website/docs/r/appautoscaling_policy.html.markdown index b7ac281f40c..0c3e2dffebd 100644 --- a/website/docs/r/appautoscaling_policy.html.markdown +++ b/website/docs/r/appautoscaling_policy.html.markdown @@ -55,6 +55,7 @@ resource "aws_appautoscaling_target" "ecs_target" { resource "aws_appautoscaling_policy" "ecs_policy" { name = "scale-down" + policy_type = "StepScaling" resource_id = "service/clusterName/serviceName" scalable_dimension = "ecs:service:DesiredCount" service_namespace = "ecs" @@ -123,7 +124,7 @@ resource "aws_appautoscaling_policy" "replicas" { The following arguments are supported: * `name` - (Required) The name of the policy. -* `policy_type` - (Optional) For DynamoDB, only `TargetTrackingScaling` is supported. For any other service, only `StepScaling` is supported. Defaults to `StepScaling`. +* `policy_type` - (Optional) 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. Defaults to `StepScaling`. * `resource_id` - (Required) The resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](http://docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) * `scalable_dimension` - (Required) The scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](http://docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) * `service_namespace` - (Required) The AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](http://docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) From afd0da780191babbd0d361c174d9408116194624 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 30 Apr 2018 09:31:41 -0400 Subject: [PATCH 0905/3316] Update CHANGELOG for #3909 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc71109c2b3..ad102885cfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ FEATURES: * **New Data Source:** `aws_mq_broker` [GH-3163] -* **New Resouce:** `aws_budgets_budget` [GH-1879] +* **New Resource:** `aws_budgets_budget` [GH-1879] +* **New Resource:** `aws_vpc_peering_connection_options` [GH-3909] ENHANCEMENTS: @@ -17,6 +18,7 @@ ENHANCEMENTS: * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] * resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) [GH-2743] * resource/aws_rds_cluster: Add `s3_import` argument (Support MySQL Backup Restore from S3) [GH-4366] +* resource/aws_vpc_peering_connection: Support configurable timeouts [GH-3909] BUG FIXES: From 54cf69c6670f4557185dd368f72d5cb5ee2000d5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Sun, 22 Apr 2018 18:48:05 -0400 Subject: [PATCH 0906/3316] Unable to change default subnet's "Enable auto-assign public IPv4 address" value. --- aws/resource_aws_default_subnet.go | 23 +++---- aws/resource_aws_default_subnet_test.go | 72 +++++++++++++++++++-- website/docs/r/default_subnet.html.markdown | 9 ++- 3 files changed, 80 insertions(+), 24 deletions(-) diff --git a/aws/resource_aws_default_subnet.go b/aws/resource_aws_default_subnet.go index fc10723dbe6..932d8d23df0 100644 --- a/aws/resource_aws_default_subnet.go +++ b/aws/resource_aws_default_subnet.go @@ -38,6 +38,7 @@ func resourceAwsDefaultSubnet() *schema.Resource { // map_public_ip_on_launch is a computed value for Default Subnets dsubnet.Schema["map_public_ip_on_launch"] = &schema.Schema{ Type: schema.TypeBool, + Optional: true, Computed: true, } // assign_ipv6_address_on_creation is a computed value for Default Subnets @@ -51,35 +52,29 @@ func resourceAwsDefaultSubnet() *schema.Resource { func resourceAwsDefaultSubnetCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - req := &ec2.DescribeSubnetsInput{ - Filters: []*ec2.Filter{ - &ec2.Filter{ - Name: aws.String("availabilityZone"), - Values: aws.StringSlice([]string{d.Get("availability_zone").(string)}), - }, - &ec2.Filter{ - Name: aws.String("defaultForAz"), - Values: aws.StringSlice([]string{"true"}), - }, + + req := &ec2.DescribeSubnetsInput{} + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "availabilityZone": d.Get("availability_zone").(string), + "defaultForAz": "true", }, - } + ) + log.Printf("[DEBUG] Reading Default Subnet: %s", req) resp, err := conn.DescribeSubnets(req) if err != nil { return err } - if len(resp.Subnets) != 1 || resp.Subnets[0] == nil { return fmt.Errorf("Default subnet not found") } d.SetId(aws.StringValue(resp.Subnets[0].SubnetId)) - return resourceAwsSubnetUpdate(d, meta) } func resourceAwsDefaultSubnetDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Subnet. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/aws/resource_aws_default_subnet_test.go b/aws/resource_aws_default_subnet_test.go index a6651221d2c..fd8bb98ffee 100644 --- a/aws/resource_aws_default_subnet_test.go +++ b/aws/resource_aws_default_subnet_test.go @@ -18,6 +18,32 @@ func TestAccAWSDefaultSubnet_basic(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccAWSDefaultSubnetConfigBasic, + Check: resource.ComposeTestCheckFunc( + testAccCheckSubnetExists("aws_default_subnet.foo", &v), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "availability_zone", "us-west-2a"), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "assign_ipv6_address_on_creation", "false"), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "tags.%", "1"), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "tags.Name", "terraform-testacc-default-subnet"), + ), + }, + }, + }) +} + +func TestAccAWSDefaultSubnet_publicIp(t *testing.T) { + var v ec2.Subnet + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSDefaultSubnetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSDefaultSubnetConfigPublicIp, Check: resource.ComposeTestCheckFunc( testAccCheckSubnetExists("aws_default_subnet.foo", &v), resource.TestCheckResourceAttr( @@ -29,7 +55,23 @@ func TestAccAWSDefaultSubnet_basic(t *testing.T) { resource.TestCheckResourceAttr( "aws_default_subnet.foo", "tags.%", "1"), resource.TestCheckResourceAttr( - "aws_default_subnet.foo", "tags.Name", "Default subnet for us-west-2a"), + "aws_default_subnet.foo", "tags.Name", "terraform-testacc-default-subnet"), + ), + }, + { + Config: testAccAWSDefaultSubnetConfigNoPublicIp, + Check: resource.ComposeTestCheckFunc( + testAccCheckSubnetExists("aws_default_subnet.foo", &v), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "availability_zone", "us-west-2a"), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "map_public_ip_on_launch", "false"), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "assign_ipv6_address_on_creation", "false"), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "tags.%", "1"), + resource.TestCheckResourceAttr( + "aws_default_subnet.foo", "tags.Name", "terraform-testacc-default-subnet"), ), }, }, @@ -42,14 +84,30 @@ func testAccCheckAWSDefaultSubnetDestroy(s *terraform.State) error { } const testAccAWSDefaultSubnetConfigBasic = ` -provider "aws" { - region = "us-west-2" +resource "aws_default_subnet" "foo" { + availability_zone = "us-west-2a" + tags { + Name = "terraform-testacc-default-subnet" + } } +` + +const testAccAWSDefaultSubnetConfigPublicIp = ` +resource "aws_default_subnet" "foo" { + availability_zone = "us-west-2a" + map_public_ip_on_launch = true + tags { + Name = "terraform-testacc-default-subnet" + } +} +` +const testAccAWSDefaultSubnetConfigNoPublicIp = ` resource "aws_default_subnet" "foo" { - availability_zone = "us-west-2a" - tags { - Name = "Default subnet for us-west-2a" - } + availability_zone = "us-west-2a" + map_public_ip_on_launch = false + tags { + Name = "terraform-testacc-default-subnet" + } } ` diff --git a/website/docs/r/default_subnet.html.markdown b/website/docs/r/default_subnet.html.markdown index 3f3ba20638a..d35d5a7e7b8 100644 --- a/website/docs/r/default_subnet.html.markdown +++ b/website/docs/r/default_subnet.html.markdown @@ -13,7 +13,7 @@ in the current region. The `aws_default_subnet` behaves differently from normal resources, in that Terraform does not _create_ this resource, but instead "adopts" it -into management. +into management. ## Example Usage @@ -33,9 +33,12 @@ resource "aws_default_subnet" "default_az1" { The arguments of an `aws_default_subnet` differ from `aws_subnet` resources. Namely, the `availability_zone` argument is required and the `vpc_id`, `cidr_block`, `ipv6_cidr_block`, -`map_public_ip_on_launch` and `assign_ipv6_address_on_creation` arguments are computed. -The following arguments are still supported: +and `assign_ipv6_address_on_creation` arguments are computed. +The following arguments are still supported: +* `map_public_ip_on_launch` - (Optional) Specify true to indicate + that instances launched into the subnet should be assigned + a public IP address. * `tags` - (Optional) A mapping of tags to assign to the resource. ### Removing `aws_default_subnet` from your configuration From 8c4f5ce78c78e952ad65d7080a6d5cf190b6e66b Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 27 Apr 2018 16:55:39 +0100 Subject: [PATCH 0907/3316] make: Extract PKG_NAME to a variable --- GNUmakefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 54927a75cc9..4f24da37245 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,7 @@ SWEEP?=us-east-1,us-west-2 TEST?=./... GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) +PKG_NAME=aws WEBSITE_REPO=github.com/hashicorp/terraform-website default: build @@ -42,7 +43,7 @@ vendor-status: test-compile: @if [ "$(TEST)" = "./..." ]; then \ echo "ERROR: Set TEST to a specific package. For example,"; \ - echo " make test-compile TEST=./aws"; \ + echo " make test-compile TEST=./$(PKG_NAME)"; \ exit 1; \ fi go test -c $(TEST) $(TESTARGS) @@ -52,14 +53,14 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) endif - @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=aws + @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) website-test: ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) endif - @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=aws + @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) .PHONY: build sweep test testacc vet fmt fmtcheck errcheck vendor-status test-compile website website-test From f46c57fb484ad2bf959c8da3835fa2bb05ce20ad Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 30 Apr 2018 14:27:46 -0400 Subject: [PATCH 0908/3316] resource/aws_ecs_service: Perform error checking when setting placement strategies into state --- aws/resource_aws_ecs_service.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index a31262395b5..1bbe304a151 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -506,9 +506,13 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { } if _, ok := d.GetOk("placement_strategy"); ok { - d.Set("placement_strategy", flattenPlacementStrategyDeprecated(service.PlacementStrategy)) + if err := d.Set("placement_strategy", flattenPlacementStrategyDeprecated(service.PlacementStrategy)); err != nil { + return fmt.Errorf("error setting placement_strategy: %s", err) + } } else { - d.Set("ordered_placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)) + if err := d.Set("ordered_placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)); err != nil { + return fmt.Errorf("error setting ordered_placement_strategy: %s", err) + } } if err := d.Set("placement_constraints", flattenServicePlacementConstraints(service.PlacementConstraints)); err != nil { log.Printf("[ERR] Error setting placement_constraints for (%s): %s", d.Id(), err) From ce9d8f56464cd31e5c1db3f986eac77a590bffdb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 30 Apr 2018 14:55:13 -0400 Subject: [PATCH 0909/3316] Update CHANGELOG for #4390 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad102885cfd..aa722e6780a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.17.0 (Unreleased) +NOTES: + +* resource/aws_ecs_service: Please note the `placement_strategy` argument (an unordered list) has been marked deprecated in favor of the `ordered_placement_strategy` argument (an ordered list based on the Terraform configuration ordering). + FEATURES: * **New Data Source:** `aws_mq_broker` [GH-3163] @@ -15,6 +19,7 @@ ENHANCEMENTS: * resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] * resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] +* resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument [GH-4390] * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] * resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) [GH-2743] * resource/aws_rds_cluster: Add `s3_import` argument (Support MySQL Backup Restore from S3) [GH-4366] From 9bfe3077062cd5a9c64c57bcefe0e6bd65ba73d6 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Sat, 28 Apr 2018 19:56:25 -0400 Subject: [PATCH 0910/3316] Update alb tests to run on any partition. --- aws/resource_aws_lb_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 2cac8f25088..8e72328ec75 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -1769,6 +1769,8 @@ resource "aws_s3_bucket" "logs" { } } +data "aws_partition" "current" {} + data "aws_caller_identity" "current" {} data "aws_elb_service_account" "current" {} @@ -1777,11 +1779,11 @@ data "aws_iam_policy_document" "logs_bucket" { statement { actions = ["s3:PutObject"] effect = "Allow" - resources = ["arn:aws:s3:::${var.bucket_name}/${var.bucket_prefix}/AWSLogs/${data.aws_caller_identity.current.account_id}/*"] + resources = ["arn:${data.aws_partition.current.partition}:s3:::${var.bucket_name}/${var.bucket_prefix}/AWSLogs/${data.aws_caller_identity.current.account_id}/*"] principals = { type = "AWS" - identifiers = ["arn:aws:iam::${data.aws_elb_service_account.current.id}:root"] + identifiers = ["${data.aws_elb_service_account.current.arn}"] } } } From b7a064e529f194a4aae902b4a987d5d25928af79 Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Mon, 30 Apr 2018 20:00:41 -0400 Subject: [PATCH 0911/3316] Add validation for minimum attempt_duration_seconds --- aws/resource_aws_batch_job_definition.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index ff99004b1f5..f5ddd12e2c6 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -64,8 +64,9 @@ func resourceAwsBatchJobDefinition() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attempt_duration_seconds": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(60), }, }, }, From e2391079c68bac8c93a2eac9a396ad50bada8462 Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Mon, 30 Apr 2018 20:01:35 -0400 Subject: [PATCH 0912/3316] Add error checking to retry_strategy and timeout --- aws/resource_aws_batch_job_definition.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index f5ddd12e2c6..d5bdd530dd6 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -141,8 +141,15 @@ func resourceAwsBatchJobDefinitionRead(d *schema.ResourceData, meta interface{}) d.Set("arn", job.JobDefinitionArn) d.Set("container_properties", job.ContainerProperties) d.Set("parameters", aws.StringValueMap(job.Parameters)) - d.Set("retry_strategy", flattenRetryStrategy(job.RetryStrategy)) - d.Set("timeout", flattenTimeout(job.Timeout)) + + if err := d.Set("retry_strategy", flattenBatchRetryStrategy(job.RetryStrategy)); err != nil { + return fmt.Errorf("error setting retry_strategy: %s", err) + } + + if err := d.Set("timeout", flattenBatchJobTimeout(job.Timeout)); err != nil { + return fmt.Errorf("error setting timeout: %s", err) + } + d.Set("revision", job.Revision) d.Set("type", job.Type) return nil @@ -221,7 +228,7 @@ func expandJobDefinitionRetryStrategy(item []interface{}) *batch.RetryStrategy { } } -func flattenRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { +func flattenBatchRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { data := []map[string]interface{}{} if item != nil { data = append(data, map[string]interface{}{ @@ -238,7 +245,7 @@ func expandJobDefinitionTimeout(item []interface{}) *batch.JobTimeout { } } -func flattenTimeout(item *batch.JobTimeout) []map[string]interface{} { +func flattenBatchJobTimeout(item *batch.JobTimeout) []map[string]interface{} { data := []map[string]interface{}{} if item != nil { data = append(data, map[string]interface{}{ From 61300baa4eb3af217eaa941a849ac496ceb2ca8c Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Mon, 30 Apr 2018 20:03:03 -0400 Subject: [PATCH 0913/3316] Wrap attempts and attempt_duration_seconds in aws.Int64Value --- aws/resource_aws_batch_job_definition.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index d5bdd530dd6..12d011d3890 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -232,7 +232,7 @@ func flattenBatchRetryStrategy(item *batch.RetryStrategy) []map[string]interface data := []map[string]interface{}{} if item != nil { data = append(data, map[string]interface{}{ - "attempts": item.Attempts, + "attempts": int(aws.Int64Value(item.Attempts)), }) } return data @@ -249,7 +249,7 @@ func flattenBatchJobTimeout(item *batch.JobTimeout) []map[string]interface{} { data := []map[string]interface{}{} if item != nil { data = append(data, map[string]interface{}{ - "attempt_duration_seconds": item.AttemptDurationSeconds, + "attempt_duration_seconds": int(aws.Int64Value(item.AttemptDurationSeconds)), }) } return data From 0a8a27e0ff308596bfa5958777bf73393471792f Mon Sep 17 00:00:00 2001 From: Aidan Feldman Date: Wed, 25 Apr 2018 20:07:23 -0400 Subject: [PATCH 0914/3316] make corrections to aws_organizations_account documentation Document ARN, and correct typo in importing instructions. --- website/docs/r/organizations_account.html.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/website/docs/r/organizations_account.html.markdown b/website/docs/r/organizations_account.html.markdown index dbbc517d897..7bbb4a7f11c 100644 --- a/website/docs/r/organizations_account.html.markdown +++ b/website/docs/r/organizations_account.html.markdown @@ -32,10 +32,16 @@ The following arguments are supported: * `iam_user_access_to_billing` - (Optional) If set to `ALLOW`, the new account enables IAM users to access account billing information if they have the required permissions. If set to `DENY`, then only the root user of the new account can access account billing information. * `role_name` - (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. +## Attributes Reference + +The following additional attributes are exported: + +* `arn` - The ARN for this account. + ## Import The AWS member account can be imported by using the `account_id`, e.g. ``` -$ terraform import aws_organization_account.my_org 111111111111 +$ terraform import aws_organizations_account.my_org 111111111111 ``` From 99e22c7486539bdb4a05df82fb47a4d18d7cca4d Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Mon, 9 Apr 2018 18:40:06 -0700 Subject: [PATCH 0915/3316] Add acceptance tests for resource/aws_iam_user_group_membership --- ...urce_aws_iam_user_group_membership_test.go | 331 ++++++++++++++++++ 1 file changed, 331 insertions(+) create mode 100644 aws/resource_aws_iam_user_group_membership_test.go diff --git a/aws/resource_aws_iam_user_group_membership_test.go b/aws/resource_aws_iam_user_group_membership_test.go new file mode 100644 index 00000000000..1929e986355 --- /dev/null +++ b/aws/resource_aws_iam_user_group_membership_test.go @@ -0,0 +1,331 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/iam" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSUserGroupMembership_basic(t *testing.T) { + rString := acctest.RandString(8) + userName1 := fmt.Sprintf("tf-acc-ugm-basic-user1-%s", rString) + userName2 := fmt.Sprintf("tf-acc-ugm-basic-user2-%s", rString) + groupName1 := fmt.Sprintf("tf-acc-ugm-basic-group1-%s", rString) + groupName2 := fmt.Sprintf("tf-acc-ugm-basic-group2-%s", rString) + groupName3 := fmt.Sprintf("tf-acc-ugm-basic-group3-%s", rString) + membershipName := fmt.Sprintf("tf-acc-ugm-basic-membership-%s", rString) + + usersAndGroupsConfig := testAccAWSUserGroupMembershipConfigUsersAndGroups(userName1, userName2, groupName1, groupName2, groupName3) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccAWSUserGroupMembershipDestroy, + Steps: []resource.TestStep{ + // simplest test + resource.TestStep{ + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigInit(membershipName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1}, []string{groupName2, groupName3}), + ), + }, + // test adding an additional group to an existing resource + resource.TestStep{ + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddOne(membershipName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1, groupName2}, []string{groupName3}), + ), + }, + // test adding multiple resources for the same user, and resources with the same groups for another user + resource.TestStep{ + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddAll(membershipName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user2_test1", "user", userName2), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user2_test2", "user", userName2), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1, groupName2, groupName3}, []string{}), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName2, []string{groupName1, groupName2, groupName3}, []string{}), + ), + }, + // test that nothing happens when we apply the same config again + resource.TestStep{ + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddAll(membershipName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user2_test1", "user", userName2), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user2_test2", "user", userName2), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1, groupName2, groupName3}, []string{}), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName2, []string{groupName1, groupName2, groupName3}, []string{}), + ), + }, + // test removing a group + resource.TestStep{ + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigRemoveGroup(membershipName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user2_test1", "user", userName2), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user2_test2", "user", userName2), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1, groupName3}, []string{groupName2}), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName2, []string{groupName1, groupName2}, []string{groupName3}), + ), + }, + // test removing a resource + resource.TestStep{ + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigDeleteResource(membershipName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), + resource.TestCheckResourceAttr("aws_iam_user_group_membership.user2_test1", "user", userName2), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1, groupName3}, []string{groupName2}), + testAccAWSUserGroupMembershipCheckGroupListForUser(userName2, []string{groupName1}, []string{groupName2, groupName3}), + ), + }, + }, + }) +} + +func testAccAWSUserGroupMembershipDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).iamconn + + // check that all users and groups have been destroyed + for _, rs := range s.RootModule().Resources { + if rs.Type == "aws_iam_user" { + userName := rs.Primary.Attributes["name"] + + _, err := conn.GetUser(&iam.GetUserInput{ + UserName: &userName, + }) + if err != nil { + if ae, ok := err.(awserr.Error); ok && ae.Code() == "NoSuchEntity" { + continue + } + return err + } + + return fmt.Errorf("User %s still exists", userName) + } + + if rs.Type == "aws_iam_group" { + groupName := rs.Primary.Attributes["name"] + + _, err := conn.GetGroup(&iam.GetGroupInput{ + GroupName: &groupName, + }) + if err != nil { + if ae, ok := err.(awserr.Error); ok && ae.Code() == "NoSuchEntity" { + continue + } + return err + } + + return fmt.Errorf("Group %s still exists", groupName) + } + } + + return nil +} + +func testAccAWSUserGroupMembershipCheckGroupListForUser(userName string, groups []string, groupsNeg []string) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).iamconn + + // get list of groups for user + userGroupList, err := conn.ListGroupsForUser(&iam.ListGroupsForUserInput{ + UserName: &userName, + }) + if err != nil { + return fmt.Errorf("Error validing user group list for %s: %s", userName, err) + } + + // check required groups + GROUP: + for _, group := range groups { + for _, groupFound := range userGroupList.Groups { + if group == *groupFound.GroupName { + continue GROUP // found our group, start checking the next one + } + } + // group not found, return an error + return fmt.Errorf("Required group not found for %s: %s", userName, group) + } + + // check that none of groupsNeg are present + for _, group := range groupsNeg { + for _, groupFound := range userGroupList.Groups { + if group == *groupFound.GroupName { + return fmt.Errorf("Required negative group found for %s: %s", userName, group) + } + } + } + + return nil + } +} + +// users and groups for all other tests +func testAccAWSUserGroupMembershipConfigUsersAndGroups(userName1, userName2, groupName1, groupName2, groupName3 string) string { + return fmt.Sprintf(` +resource "aws_iam_user" "user1" { + name = "%s" + force_destroy = true +} + +resource "aws_iam_user" "user2" { + name = "%s" + force_destroy = true +} + +resource "aws_iam_group" "group1" { + name = "%s" +} + +resource "aws_iam_group" "group2" { + name = "%s" +} + +resource "aws_iam_group" "group3" { + name = "%s" +} +`, userName1, userName2, groupName1, groupName2, groupName3) +} + +// associate users and groups +func testAccAWSUserGroupMembershipConfigInit(membershipName string) string { + return fmt.Sprintf(` +resource "aws_iam_user_group_membership" "user1_test1" { + name = "%s-user1_test1" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group1.name}", + ] +} +`, membershipName) +} + +func testAccAWSUserGroupMembershipConfigAddOne(membershipName string) string { + return fmt.Sprintf(` +resource "aws_iam_user_group_membership" "user1_test1" { + name = "%s-user1_test1" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group1.name}", + "${aws_iam_group.group2.name}", + ] +} +`, membershipName) +} + +func testAccAWSUserGroupMembershipConfigAddAll(membershipName string) string { + return fmt.Sprintf(` +resource "aws_iam_user_group_membership" "user1_test1" { + name = "%s-user1_test1" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group1.name}", + "${aws_iam_group.group2.name}", + ] +} + +resource "aws_iam_user_group_membership" "user1_test2" { + name = "%s-user1_test2" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group3.name}", + ] +} + +resource "aws_iam_user_group_membership" "user2_test1" { + name = "%s-user2_test1" + user = "${aws_iam_user.user2.name}" + groups = [ + "${aws_iam_group.group1.name}", + ] +} + +resource "aws_iam_user_group_membership" "user2_test2" { + name = "%s-user2_test2" + user = "${aws_iam_user.user2.name}" + groups = [ + "${aws_iam_group.group2.name}", + "${aws_iam_group.group3.name}", + ] +} +`, membershipName, membershipName, membershipName, membershipName) +} + +// test removing a group +func testAccAWSUserGroupMembershipConfigRemoveGroup(membershipName string) string { + return fmt.Sprintf(` +resource "aws_iam_user_group_membership" "user1_test1" { + name = "%s-user1_test1" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group1.name}", + ] +} + +resource "aws_iam_user_group_membership" "user1_test2" { + name = "%s-user1_test2" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group3.name}", + ] +} + +resource "aws_iam_user_group_membership" "user2_test1" { + name = "%s-user2_test1" + user = "${aws_iam_user.user2.name}" + groups = [ + "${aws_iam_group.group1.name}", + ] +} + +resource "aws_iam_user_group_membership" "user2_test2" { + name = "%s-user2_test2" + user = "${aws_iam_user.user2.name}" + groups = [ + "${aws_iam_group.group2.name}", + ] +} +`, membershipName, membershipName, membershipName, membershipName) +} + +// test deleting an entity +func testAccAWSUserGroupMembershipConfigDeleteResource(membershipName string) string { + return fmt.Sprintf(` +resource "aws_iam_user_group_membership" "user1_test1" { + name = "%s-user1_test1" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group1.name}", + ] +} + +resource "aws_iam_user_group_membership" "user1_test2" { + name = "%s-user1_test2" + user = "${aws_iam_user.user1.name}" + groups = [ + "${aws_iam_group.group3.name}", + ] +} + +resource "aws_iam_user_group_membership" "user2_test1" { + name = "%s-user2_test1" + user = "${aws_iam_user.user2.name}" + groups = [ + "${aws_iam_group.group1.name}", + ] +} +`, membershipName, membershipName, membershipName) +} From 98a6430abc073459e941a4d06abfe8958cfbd989 Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Tue, 10 Apr 2018 18:01:44 -0700 Subject: [PATCH 0916/3316] Add resource code --- aws/provider.go | 1 + aws/resource_aws_iam_user_group_membership.go | 175 ++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 aws/resource_aws_iam_user_group_membership.go diff --git a/aws/provider.go b/aws/provider.go index 1891e6418ba..c093890c444 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -416,6 +416,7 @@ func Provider() terraform.ResourceProvider { "aws_iam_saml_provider": resourceAwsIamSamlProvider(), "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), "aws_iam_user_policy": resourceAwsIamUserPolicy(), "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), diff --git a/aws/resource_aws_iam_user_group_membership.go b/aws/resource_aws_iam_user_group_membership.go new file mode 100644 index 00000000000..01aa97236e7 --- /dev/null +++ b/aws/resource_aws_iam_user_group_membership.go @@ -0,0 +1,175 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/iam" + + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsIamUserGroupMembership() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsIamUserGroupMembershipCreate, + Read: resourceAwsIamUserGroupMembershipRead, + Update: resourceAwsIamUserGroupMembershipUpdate, + Delete: resourceAwsIamUserGroupMembershipDelete, + + Schema: map[string]*schema.Schema{ + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "user": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "groups": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func resourceAwsIamUserGroupMembershipCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + user := d.Get("user").(string) + groupList := expandStringList(d.Get("groups").(*schema.Set).List()) + + if err := addUserToGroups(conn, user, groupList); err != nil { + return err + } + + d.SetId(d.Get("name").(string)) + + return resourceAwsIamUserGroupMembershipRead(d, meta) +} + +func resourceAwsIamUserGroupMembershipRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + user := d.Get("user").(string) + groups := d.Get("groups").(*schema.Set) + var gl []string + var marker *string + + for { + resp, err := conn.ListGroupsForUser(&iam.ListGroupsForUserInput{ + UserName: &user, + Marker: marker, + }) + if err != nil { + // unwrap aws-specific error + if awsErr, ok := err.(awserr.Error); ok { + if awsErr.Code() == "NoSuchEntity" { + // no such user + d.SetId("") + return nil + } + } + return err + } + + for _, g := range resp.Groups { + // only read in the groups we care about + if groups.Contains(*g.GroupName) { + gl = append(gl, *g.GroupName) + } + } + + if !*resp.IsTruncated { + break + } + + marker = resp.Marker + } + + if err := d.Set("groups", gl); err != nil { + return fmt.Errorf("[WARN] Error setting group list from IAM (%s), error: %s", user, err) + } + + return nil +} + +func resourceAwsIamUserGroupMembershipUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + + if d.HasChange("groups") { + user := d.Get("user").(string) + + o, n := d.GetChange("groups") + if o == nil { + o = new(schema.Set) + } + if n == nil { + n = new(schema.Set) + } + + os := o.(*schema.Set) + ns := n.(*schema.Set) + remove := expandStringList(os.Difference(ns).List()) + add := expandStringList(ns.Difference(os).List()) + + if err := removeUserFromGroups(conn, user, remove); err != nil { + return err + } + + if err := addUserToGroups(conn, user, add); err != nil { + return err + } + } + + return resourceAwsIamUserGroupMembershipRead(d, meta) +} + +func resourceAwsIamUserGroupMembershipDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iamconn + user := d.Get("user").(string) + groups := expandStringList(d.Get("groups").(*schema.Set).List()) + + if err := removeUserFromGroups(conn, user, groups); err != nil { + return err + } + + return nil +} + +func removeUserFromGroups(conn *iam.IAM, user string, groups []*string) error { + for _, group := range groups { + _, err := conn.RemoveUserFromGroup(&iam.RemoveUserFromGroupInput{ + UserName: &user, + GroupName: group, + }) + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchEntity" { + continue + } + return err + } + } + + return nil +} + +func addUserToGroups(conn *iam.IAM, user string, groups []*string) error { + for _, group := range groups { + _, err := conn.AddUserToGroup(&iam.AddUserToGroupInput{ + UserName: &user, + GroupName: group, + }) + if err != nil { + return err + } + } + + return nil +} From 01a3425dbc697c85db7a51985988abec0dbadcf7 Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Fri, 13 Apr 2018 15:59:05 -0700 Subject: [PATCH 0917/3316] Add documentation --- website/aws.erb | 4 ++ .../docs/r/iam_group_membership.html.markdown | 4 +- .../r/iam_user_group_membership.html.markdown | 70 +++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 website/docs/r/iam_user_group_membership.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 616605551f5..3e08ecf2ac2 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1211,6 +1211,10 @@ aws_iam_user + > + aws_iam_user_group_membership + + > aws_iam_user_login_profile diff --git a/website/docs/r/iam_group_membership.html.markdown b/website/docs/r/iam_group_membership.html.markdown index 054d4c45f9c..bc93a7b2c5f 100644 --- a/website/docs/r/iam_group_membership.html.markdown +++ b/website/docs/r/iam_group_membership.html.markdown @@ -12,6 +12,8 @@ Provides a top level resource to manage IAM Group membership for IAM Users. For more information on managing IAM Groups or IAM Users, see [IAM Groups][1] or [IAM Users][2] +~> **Note:** `aws_iam_group_membership` will conflict with itself if used more than once with the same group. + ## Example Usage ```hcl @@ -49,7 +51,7 @@ The following arguments are supported: ## Attributes Reference -* `name` - The name to identifing the Group Membership +* `name` - The name to identify the Group Membership * `users` - list of IAM User names * `group` – IAM Group name diff --git a/website/docs/r/iam_user_group_membership.html.markdown b/website/docs/r/iam_user_group_membership.html.markdown new file mode 100644 index 00000000000..ebace65ec79 --- /dev/null +++ b/website/docs/r/iam_user_group_membership.html.markdown @@ -0,0 +1,70 @@ +--- +layout: "aws" +page_title: "AWS: aws_iam_user_group_membership" +sidebar_current: "docs-aws-resource-iam-user-group-membership" +description: |- + Provides a resource for adding an IAM User to IAM Groups without conflicting + with itself. +--- + +# aws_iam_user_group_membership + +Provides a resource for adding an [IAM User][2] to [IAM Groups][1]. This +resource will not conflict with itself when used multiple times for the same +user. + +## Example usage + +```hcl +resource "aws_iam_user_group_membership" { + name = "user-group-membership-1" + user = "${aws_iam_user.user1.name}" + + groups = [ + "${aws_iam_group.group1.name}", + "${aws_iam_group.group2.name}", + ] +} + +resource "aws_iam_user_group_membership" { + name = "user-group-membership-2" + user = "${aws_iam_user.user1.name}" + + groups = [ + "${aws_iam_group.group3.name}", + ] +} + +resource "aws_iam_user" "user1" { + name = "user1" +} + +resource "aws_iam_group" "group1" { + name = "group1" +} + +resource "aws_iam_group" "group2" { + name = "group2" +} + +resource "aws_iam_group" "group3" { + name = "group3" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name to identify the user group Membership +* `user` - (Required) The name of the [IAM User][2] to add to groups +* `groups` - (Required) A list of [IAM Groups][1] to add the user to + +## Attributes Reference + +* `name` - The name to identify the user group membership +* `user` - The name of the IAM User +* `groups` - The list of IAM Groups + +[1]: /docs/providers/aws/r/iam_group.html +[2]: /docs/providers/aws/r/iam_user.html From e7ff7a17bd51be73ab03fae993426b88e7cfdddf Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Mon, 30 Apr 2018 23:01:24 -0700 Subject: [PATCH 0918/3316] Remove unnecessary argument "name", update to current standards --- aws/resource_aws_iam_user_group_membership.go | 14 ++--- ...urce_aws_iam_user_group_membership_test.go | 56 ++++++------------- .../r/iam_user_group_membership.html.markdown | 4 -- 3 files changed, 20 insertions(+), 54 deletions(-) diff --git a/aws/resource_aws_iam_user_group_membership.go b/aws/resource_aws_iam_user_group_membership.go index 01aa97236e7..e8863f7ba72 100644 --- a/aws/resource_aws_iam_user_group_membership.go +++ b/aws/resource_aws_iam_user_group_membership.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -17,23 +18,16 @@ func resourceAwsIamUserGroupMembership() *schema.Resource { Delete: resourceAwsIamUserGroupMembershipDelete, Schema: map[string]*schema.Schema{ - "name": &schema.Schema{ + "user": { Type: schema.TypeString, Required: true, ForceNew: true, }, - "user": &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "groups": &schema.Schema{ + "groups": { Type: schema.TypeSet, Required: true, Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, }, }, } @@ -49,7 +43,7 @@ func resourceAwsIamUserGroupMembershipCreate(d *schema.ResourceData, meta interf return err } - d.SetId(d.Get("name").(string)) + d.SetId(resource.UniqueId()) return resourceAwsIamUserGroupMembershipRead(d, meta) } diff --git a/aws/resource_aws_iam_user_group_membership_test.go b/aws/resource_aws_iam_user_group_membership_test.go index 1929e986355..d59862bb61e 100644 --- a/aws/resource_aws_iam_user_group_membership_test.go +++ b/aws/resource_aws_iam_user_group_membership_test.go @@ -19,7 +19,6 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { groupName1 := fmt.Sprintf("tf-acc-ugm-basic-group1-%s", rString) groupName2 := fmt.Sprintf("tf-acc-ugm-basic-group2-%s", rString) groupName3 := fmt.Sprintf("tf-acc-ugm-basic-group3-%s", rString) - membershipName := fmt.Sprintf("tf-acc-ugm-basic-membership-%s", rString) usersAndGroupsConfig := testAccAWSUserGroupMembershipConfigUsersAndGroups(userName1, userName2, groupName1, groupName2, groupName3) @@ -30,7 +29,7 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { Steps: []resource.TestStep{ // simplest test resource.TestStep{ - Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigInit(membershipName), + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigInit, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1}, []string{groupName2, groupName3}), @@ -38,7 +37,7 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { }, // test adding an additional group to an existing resource resource.TestStep{ - Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddOne(membershipName), + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddOne, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), testAccAWSUserGroupMembershipCheckGroupListForUser(userName1, []string{groupName1, groupName2}, []string{groupName3}), @@ -46,7 +45,7 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { }, // test adding multiple resources for the same user, and resources with the same groups for another user resource.TestStep{ - Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddAll(membershipName), + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddAll, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), @@ -58,7 +57,7 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { }, // test that nothing happens when we apply the same config again resource.TestStep{ - Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddAll(membershipName), + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigAddAll, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), @@ -70,7 +69,7 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { }, // test removing a group resource.TestStep{ - Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigRemoveGroup(membershipName), + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigRemoveGroup, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), @@ -82,7 +81,7 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { }, // test removing a resource resource.TestStep{ - Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigDeleteResource(membershipName), + Config: usersAndGroupsConfig + testAccAWSUserGroupMembershipConfigDeleteResource, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test1", "user", userName1), resource.TestCheckResourceAttr("aws_iam_user_group_membership.user1_test2", "user", userName1), @@ -201,35 +200,27 @@ resource "aws_iam_group" "group3" { } // associate users and groups -func testAccAWSUserGroupMembershipConfigInit(membershipName string) string { - return fmt.Sprintf(` +const testAccAWSUserGroupMembershipConfigInit = ` resource "aws_iam_user_group_membership" "user1_test1" { - name = "%s-user1_test1" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group1.name}", ] } -`, membershipName) -} +` -func testAccAWSUserGroupMembershipConfigAddOne(membershipName string) string { - return fmt.Sprintf(` +const testAccAWSUserGroupMembershipConfigAddOne = ` resource "aws_iam_user_group_membership" "user1_test1" { - name = "%s-user1_test1" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group1.name}", "${aws_iam_group.group2.name}", ] } -`, membershipName) -} +` -func testAccAWSUserGroupMembershipConfigAddAll(membershipName string) string { - return fmt.Sprintf(` +const testAccAWSUserGroupMembershipConfigAddAll = ` resource "aws_iam_user_group_membership" "user1_test1" { - name = "%s-user1_test1" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group1.name}", @@ -238,7 +229,6 @@ resource "aws_iam_user_group_membership" "user1_test1" { } resource "aws_iam_user_group_membership" "user1_test2" { - name = "%s-user1_test2" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group3.name}", @@ -246,7 +236,6 @@ resource "aws_iam_user_group_membership" "user1_test2" { } resource "aws_iam_user_group_membership" "user2_test1" { - name = "%s-user2_test1" user = "${aws_iam_user.user2.name}" groups = [ "${aws_iam_group.group1.name}", @@ -254,21 +243,17 @@ resource "aws_iam_user_group_membership" "user2_test1" { } resource "aws_iam_user_group_membership" "user2_test2" { - name = "%s-user2_test2" user = "${aws_iam_user.user2.name}" groups = [ "${aws_iam_group.group2.name}", "${aws_iam_group.group3.name}", ] } -`, membershipName, membershipName, membershipName, membershipName) -} +` // test removing a group -func testAccAWSUserGroupMembershipConfigRemoveGroup(membershipName string) string { - return fmt.Sprintf(` +const testAccAWSUserGroupMembershipConfigRemoveGroup = ` resource "aws_iam_user_group_membership" "user1_test1" { - name = "%s-user1_test1" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group1.name}", @@ -276,7 +261,6 @@ resource "aws_iam_user_group_membership" "user1_test1" { } resource "aws_iam_user_group_membership" "user1_test2" { - name = "%s-user1_test2" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group3.name}", @@ -284,7 +268,6 @@ resource "aws_iam_user_group_membership" "user1_test2" { } resource "aws_iam_user_group_membership" "user2_test1" { - name = "%s-user2_test1" user = "${aws_iam_user.user2.name}" groups = [ "${aws_iam_group.group1.name}", @@ -292,20 +275,16 @@ resource "aws_iam_user_group_membership" "user2_test1" { } resource "aws_iam_user_group_membership" "user2_test2" { - name = "%s-user2_test2" user = "${aws_iam_user.user2.name}" groups = [ "${aws_iam_group.group2.name}", ] } -`, membershipName, membershipName, membershipName, membershipName) -} +` // test deleting an entity -func testAccAWSUserGroupMembershipConfigDeleteResource(membershipName string) string { - return fmt.Sprintf(` +const testAccAWSUserGroupMembershipConfigDeleteResource = ` resource "aws_iam_user_group_membership" "user1_test1" { - name = "%s-user1_test1" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group1.name}", @@ -313,7 +292,6 @@ resource "aws_iam_user_group_membership" "user1_test1" { } resource "aws_iam_user_group_membership" "user1_test2" { - name = "%s-user1_test2" user = "${aws_iam_user.user1.name}" groups = [ "${aws_iam_group.group3.name}", @@ -321,11 +299,9 @@ resource "aws_iam_user_group_membership" "user1_test2" { } resource "aws_iam_user_group_membership" "user2_test1" { - name = "%s-user2_test1" user = "${aws_iam_user.user2.name}" groups = [ "${aws_iam_group.group1.name}", ] } -`, membershipName, membershipName, membershipName) -} +` diff --git a/website/docs/r/iam_user_group_membership.html.markdown b/website/docs/r/iam_user_group_membership.html.markdown index ebace65ec79..d5f204ca0e1 100644 --- a/website/docs/r/iam_user_group_membership.html.markdown +++ b/website/docs/r/iam_user_group_membership.html.markdown @@ -17,7 +17,6 @@ user. ```hcl resource "aws_iam_user_group_membership" { - name = "user-group-membership-1" user = "${aws_iam_user.user1.name}" groups = [ @@ -27,7 +26,6 @@ resource "aws_iam_user_group_membership" { } resource "aws_iam_user_group_membership" { - name = "user-group-membership-2" user = "${aws_iam_user.user1.name}" groups = [ @@ -56,13 +54,11 @@ resource "aws_iam_group" "group3" { The following arguments are supported: -* `name` - (Required) The name to identify the user group Membership * `user` - (Required) The name of the [IAM User][2] to add to groups * `groups` - (Required) A list of [IAM Groups][1] to add the user to ## Attributes Reference -* `name` - The name to identify the user group membership * `user` - The name of the IAM User * `groups` - The list of IAM Groups From a468666c0742eee58678ca3c012cb2e5624a3707 Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Mon, 30 Apr 2018 23:21:03 -0700 Subject: [PATCH 0919/3316] Use isAWSErr helper, copy updates --- aws/resource_aws_iam_user_group_membership.go | 16 +++++++--------- ...esource_aws_iam_user_group_membership_test.go | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_iam_user_group_membership.go b/aws/resource_aws_iam_user_group_membership.go index e8863f7ba72..83ef39df1f0 100644 --- a/aws/resource_aws_iam_user_group_membership.go +++ b/aws/resource_aws_iam_user_group_membership.go @@ -2,8 +2,8 @@ package aws import ( "fmt" + "log" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" @@ -62,13 +62,11 @@ func resourceAwsIamUserGroupMembershipRead(d *schema.ResourceData, meta interfac Marker: marker, }) if err != nil { - // unwrap aws-specific error - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchEntity" { - // no such user - d.SetId("") - return nil - } + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + // no such user + log.Printf("[WARN] Groups not found for user (%s), removing from state", user) + d.SetId("") + return nil } return err } @@ -144,7 +142,7 @@ func removeUserFromGroups(conn *iam.IAM, user string, groups []*string) error { GroupName: group, }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchEntity" { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { continue } return err diff --git a/aws/resource_aws_iam_user_group_membership_test.go b/aws/resource_aws_iam_user_group_membership_test.go index d59862bb61e..450f5717577 100644 --- a/aws/resource_aws_iam_user_group_membership_test.go +++ b/aws/resource_aws_iam_user_group_membership_test.go @@ -163,7 +163,7 @@ func testAccAWSUserGroupMembershipCheckGroupListForUser(userName string, groups for _, group := range groupsNeg { for _, groupFound := range userGroupList.Groups { if group == *groupFound.GroupName { - return fmt.Errorf("Required negative group found for %s: %s", userName, group) + return fmt.Errorf("Unexpected group found for %s: %s", userName, group) } } } From 773f023c2d1a1455cf4e848e09b4dda1f9420e04 Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Tue, 1 May 2018 06:59:59 -0400 Subject: [PATCH 0920/3316] Make attempts and attempt_duration_seconds optional Also, add validation to `attempts`. --- aws/resource_aws_batch_job_definition.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index 12d011d3890..5e4056759db 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -50,8 +50,9 @@ func resourceAwsBatchJobDefinition() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attempts": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(1, 10), }, }, }, @@ -65,7 +66,7 @@ func resourceAwsBatchJobDefinition() *schema.Resource { Schema: map[string]*schema.Schema{ "attempt_duration_seconds": { Type: schema.TypeInt, - Required: true, + Optional: true, ValidateFunc: validation.IntAtLeast(60), }, }, From 23841c826ec18ae1c5e34d46a2a07e307aeb2994 Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Tue, 1 May 2018 07:22:35 -0400 Subject: [PATCH 0921/3316] Add additional error checking to flatten and expand For timeout and retry strategy. --- aws/resource_aws_batch_job_definition.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index 5e4056759db..68b1e9f5d05 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -223,15 +223,19 @@ func expandJobDefinitionParameters(params map[string]interface{}) map[string]*st } func expandJobDefinitionRetryStrategy(item []interface{}) *batch.RetryStrategy { + retryStrategy := &batch.RetryStrategy{} data := item[0].(map[string]interface{}) - return &batch.RetryStrategy{ - Attempts: aws.Int64(int64(data["attempts"].(int))), + + if v, ok := data["attempts"].(int); ok && v > 0 && v <= 10 { + retryStrategy.Attempts = aws.Int64(int64(v)) } + + return retryStrategy } func flattenBatchRetryStrategy(item *batch.RetryStrategy) []map[string]interface{} { data := []map[string]interface{}{} - if item != nil { + if item != nil && item.Attempts != nil { data = append(data, map[string]interface{}{ "attempts": int(aws.Int64Value(item.Attempts)), }) @@ -240,15 +244,19 @@ func flattenBatchRetryStrategy(item *batch.RetryStrategy) []map[string]interface } func expandJobDefinitionTimeout(item []interface{}) *batch.JobTimeout { + timeout := &batch.JobTimeout{} data := item[0].(map[string]interface{}) - return &batch.JobTimeout{ - AttemptDurationSeconds: aws.Int64(int64(data["attempt_duration_seconds"].(int))), + + if v, ok := data["attempt_duration_seconds"].(int); ok && v >= 60 { + timeout.AttemptDurationSeconds = aws.Int64(int64(v)) } + + return timeout } func flattenBatchJobTimeout(item *batch.JobTimeout) []map[string]interface{} { data := []map[string]interface{}{} - if item != nil { + if item != nil && item.AttemptDurationSeconds != nil { data = append(data, map[string]interface{}{ "attempt_duration_seconds": int(aws.Int64Value(item.AttemptDurationSeconds)), }) From 9fe5e66667c38b455d34aaf1b4f7a0996e35f35e Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Tue, 1 May 2018 07:53:39 -0400 Subject: [PATCH 0922/3316] Update docs to reflect optional status --- website/docs/r/batch_job_definition.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/batch_job_definition.html.markdown b/website/docs/r/batch_job_definition.html.markdown index 233ef9ff0b1..d284ef98bb4 100644 --- a/website/docs/r/batch_job_definition.html.markdown +++ b/website/docs/r/batch_job_definition.html.markdown @@ -69,13 +69,13 @@ The following arguments are supported: `retry_strategy` supports the following: -* `attempts` - (Required) The number of times to move a job to the `RUNNABLE` status. You may specify between `1` and `10` attempts. +* `attempts` - (Optional) The number of times to move a job to the `RUNNABLE` status. You may specify between `1` and `10` attempts. ## timeout `timeout` supports the following: -* `attempt_duration_seconds` - (Required) The time duration in seconds after which AWS Batch terminates your jobs if they have not finished. The minimum value for the timeout is `60` seconds. +* `attempt_duration_seconds` - (Optional) The time duration in seconds after which AWS Batch terminates your jobs if they have not finished. The minimum value for the timeout is `60` seconds. ## Attribute Reference From c0db9bcf03f62e21bceb80620455de4cc96bdf9f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 1 May 2018 10:07:59 -0400 Subject: [PATCH 0923/3316] docs/resource/aws_iam_user_group_membership: Clarify usage between membership resources --- .../docs/r/iam_group_membership.html.markdown | 4 ++- .../r/iam_user_group_membership.html.markdown | 36 ++++++++++--------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/website/docs/r/iam_group_membership.html.markdown b/website/docs/r/iam_group_membership.html.markdown index bc93a7b2c5f..03e7b7efb83 100644 --- a/website/docs/r/iam_group_membership.html.markdown +++ b/website/docs/r/iam_group_membership.html.markdown @@ -12,7 +12,8 @@ Provides a top level resource to manage IAM Group membership for IAM Users. For more information on managing IAM Groups or IAM Users, see [IAM Groups][1] or [IAM Users][2] -~> **Note:** `aws_iam_group_membership` will conflict with itself if used more than once with the same group. +~> **Note:** `aws_iam_group_membership` will conflict with itself if used more than once with the same group. To non-exclusively manage the users in a group, see the +[`aws_iam_user_group_membership` resource][3]. ## Example Usage @@ -58,3 +59,4 @@ The following arguments are supported: [1]: /docs/providers/aws/r/iam_group.html [2]: /docs/providers/aws/r/iam_user.html +[3]: /docs/providers/aws/r/iam_user_group_membership.html diff --git a/website/docs/r/iam_user_group_membership.html.markdown b/website/docs/r/iam_user_group_membership.html.markdown index d5f204ca0e1..763c4777c35 100644 --- a/website/docs/r/iam_user_group_membership.html.markdown +++ b/website/docs/r/iam_user_group_membership.html.markdown @@ -9,44 +9,47 @@ description: |- # aws_iam_user_group_membership -Provides a resource for adding an [IAM User][2] to [IAM Groups][1]. This -resource will not conflict with itself when used multiple times for the same -user. +Provides a resource for adding an [IAM User][2] to [IAM Groups][1]. This +resource can be used multiple times with the same user for non-overlapping +groups. + +To exclusively manage the users in a group, see the +[`aws_iam_group_membership` resource][3]. ## Example usage ```hcl resource "aws_iam_user_group_membership" { - user = "${aws_iam_user.user1.name}" + user = "${aws_iam_user.user1.name}" - groups = [ - "${aws_iam_group.group1.name}", - "${aws_iam_group.group2.name}", - ] + groups = [ + "${aws_iam_group.group1.name}", + "${aws_iam_group.group2.name}", + ] } resource "aws_iam_user_group_membership" { - user = "${aws_iam_user.user1.name}" + user = "${aws_iam_user.user1.name}" - groups = [ - "${aws_iam_group.group3.name}", - ] + groups = [ + "${aws_iam_group.group3.name}", + ] } resource "aws_iam_user" "user1" { - name = "user1" + name = "user1" } resource "aws_iam_group" "group1" { - name = "group1" + name = "group1" } resource "aws_iam_group" "group2" { - name = "group2" + name = "group2" } resource "aws_iam_group" "group3" { - name = "group3" + name = "group3" } ``` @@ -64,3 +67,4 @@ The following arguments are supported: [1]: /docs/providers/aws/r/iam_group.html [2]: /docs/providers/aws/r/iam_user.html +[3]: /docs/providers/aws/r/iam_group_membership.html From de3a89ba494553accb77b3ebe2b5ec127e37034e Mon Sep 17 00:00:00 2001 From: Josh Kodroff Date: Tue, 1 May 2018 10:14:43 -0400 Subject: [PATCH 0924/3316] Update db_instance.html.markdown Adds a link to the valid values for the `engine` parameter in the AWS API docs. --- website/docs/r/db_instance.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 385a242e7fe..b19e2b1b527 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -94,7 +94,7 @@ for additonal read replica contraints. * `enabled_cloudwatch_logs_exports` - (Optional) Name list of enable log type for exporting to cloudwatch logs. If omitted, any logs will not be exported to cloudwatch logs. Either of the following is supported: `audit`, `error`, `general`, `slowquery`. * `engine` - (Required unless a `snapshot_identifier` or `replicate_source_db` -is provided) The database engine to use. +is provided) The database engine to use. For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html). * `engine_version` - (Optional) The engine version to use. If `auto_minor_version_upgrade` is enabled, you can provide a prefix of the version such as `5.7` (for `5.7.10`) and this attribute will ignore differences in the patch version automatically (e.g. `5.7.17`). From 8fb19a41732dc8b29a965b63f9796f8523524d03 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 1 May 2018 10:29:20 -0400 Subject: [PATCH 0925/3316] tests/resource/aws_iam_user_group_membership: Only check this resource for CheckDestroy --- ...urce_aws_iam_user_group_membership_test.go | 39 +++++++------------ 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/aws/resource_aws_iam_user_group_membership_test.go b/aws/resource_aws_iam_user_group_membership_test.go index 450f5717577..813a00223a1 100644 --- a/aws/resource_aws_iam_user_group_membership_test.go +++ b/aws/resource_aws_iam_user_group_membership_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/acctest" @@ -97,38 +97,27 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { func testAccAWSUserGroupMembershipDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).iamconn - // check that all users and groups have been destroyed for _, rs := range s.RootModule().Resources { - if rs.Type == "aws_iam_user" { - userName := rs.Primary.Attributes["name"] - - _, err := conn.GetUser(&iam.GetUserInput{ - UserName: &userName, - }) - if err != nil { - if ae, ok := err.(awserr.Error); ok && ae.Code() == "NoSuchEntity" { - continue - } - return err + if rs.Type == "aws_iam_user_group_membership" { + input := &iam.ListGroupsForUserInput{ + UserName: aws.String(rs.Primary.Attributes["user"]), } - - return fmt.Errorf("User %s still exists", userName) - } - - if rs.Type == "aws_iam_group" { - groupName := rs.Primary.Attributes["name"] - - _, err := conn.GetGroup(&iam.GetGroupInput{ - GroupName: &groupName, + foundGroups := 0 + err := conn.ListGroupsForUserPages(input, func(page *iam.ListGroupsForUserOutput, lastPage bool) bool { + if len(page.Groups) > 0 { + foundGroups = foundGroups + len(page.Groups) + } + return !lastPage }) if err != nil { - if ae, ok := err.(awserr.Error); ok && ae.Code() == "NoSuchEntity" { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { continue } return err } - - return fmt.Errorf("Group %s still exists", groupName) + if foundGroups > 0 { + return fmt.Errorf("Expected all group membership for user to be removed, found: %d", foundGroups) + } } } From 79daec9befd5f1fe228192b027da149a47ed9ef8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 1 May 2018 10:31:10 -0400 Subject: [PATCH 0926/3316] Update CHANGELOG for #3365 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa722e6780a..6aea2f58ed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ FEATURES: * **New Data Source:** `aws_mq_broker` [GH-3163] * **New Resource:** `aws_budgets_budget` [GH-1879] +* **New Resource:** `aws_iam_user_group_membership` [GH-3365] * **New Resource:** `aws_vpc_peering_connection_options` [GH-3909] ENHANCEMENTS: From 8ad3ebece3f78cb4053777768ea870b5d04baf86 Mon Sep 17 00:00:00 2001 From: Josh Kodroff Date: Tue, 1 May 2018 11:11:56 -0400 Subject: [PATCH 0927/3316] Update db_instance.html.markdown Provides a link to the DB Subnet Group TF resource in order to clarify that DB Subnet Group Name != ${A VPC Private Subnet designated for DBs.name} --- website/docs/r/db_instance.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 385a242e7fe..d6b1361b1be 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -84,7 +84,7 @@ for more information. * `copy_tags_to_snapshot` – (Optional, boolean) On delete, copy all Instance `tags` to the final snapshot (if `final_snapshot_identifier` is specified). Default is `false`. -* `db_subnet_group_name` - (Optional) Name of DB subnet group. DB instance will +* `db_subnet_group_name` - (Optional) Name of [DB subnet group](/docs/providers/aws/r/db_subnet_group.html). DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the `default` VPC, or in EC2 Classic, if available. When working with read replicas, it needs to be specified only if the source database From ef01a7900427b01a8340d71ceb46220a271e9f71 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 1 May 2018 12:45:22 -0400 Subject: [PATCH 0928/3316] Update CHANGELOG for #4386 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aea2f58ed4..7f3926824cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: * data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] * resource/aws_api_gateway_stage: Add `access_log_settings` argument (Support access logging) [GH-4369] * resource/aws_autoscaling_group: Add `launch_template` argument [GH-4305] +* resource/aws_batch_job_definition: Add `timeout` argument [GH-4386] * resource/aws_cloudwatch_event_rule: Add `name_prefix` argument [GH-2752] * resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] From df5bfe70ef502bdb3822874bc4a610cb66cba964 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 1 May 2018 12:49:53 -0400 Subject: [PATCH 0929/3316] Update CHANGELOG for #4396 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f3926824cb..df0e3725ea6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ENHANCEMENTS: * resource/aws_cloudwatch_event_rule: Add `name_prefix` argument [GH-2752] * resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] +* resource/aws_default_subnet: Allow 'map_public_ip_on_launch' updates [GH-4396] * resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] * resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument [GH-4390] * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] From 3810e637de6a611de454895d1050121bdb8f5cff Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 1 May 2018 12:50:19 -0400 Subject: [PATCH 0930/3316] Fix #4396 formatting --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df0e3725ea6..e46b9a97c74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ ENHANCEMENTS: * resource/aws_cloudwatch_event_rule: Add `name_prefix` argument [GH-2752] * resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] -* resource/aws_default_subnet: Allow 'map_public_ip_on_launch' updates [GH-4396] +* resource/aws_default_subnet: Allow `map_public_ip_on_launch` updates [GH-4396] * resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] * resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument [GH-4390] * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] From 59d5430b18dc10d1ac1325b26dd40cd0aba4f27d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 1 May 2018 15:56:38 -0400 Subject: [PATCH 0931/3316] provider: Remove extraneous d.SetId() calls during resource deletion --- aws/resource_aws_acm_certificate.go | 1 - aws/resource_aws_acm_certificate_validation.go | 1 - aws/resource_aws_ami.go | 2 -- aws/resource_aws_api_gateway_account.go | 1 - aws/resource_aws_appautoscaling_policy.go | 1 - aws/resource_aws_appautoscaling_scheduled_action.go | 3 +-- aws/resource_aws_appautoscaling_target.go | 1 - aws/resource_aws_autoscaling_group.go | 1 - aws/resource_aws_autoscaling_lifecycle_hook.go | 1 - aws/resource_aws_autoscaling_policy.go | 1 - aws/resource_aws_batch_job_definition.go | 2 +- aws/resource_aws_cloudformation_stack.go | 2 -- aws/resource_aws_cloudfront_distribution.go | 4 ---- aws/resource_aws_cloudfront_origin_access_identity.go | 2 -- aws/resource_aws_cloudwatch_dashboard.go | 3 --- aws/resource_aws_cloudwatch_event_rule.go | 2 -- aws/resource_aws_cloudwatch_event_target.go | 2 -- aws/resource_aws_cloudwatch_log_destination.go | 2 +- aws/resource_aws_cloudwatch_log_destination_policy.go | 1 - aws/resource_aws_cloudwatch_log_group.go | 2 -- aws/resource_aws_cloudwatch_log_metric_filter.go | 2 -- aws/resource_aws_cloudwatch_log_subscription_filter.go | 2 +- aws/resource_aws_cloudwatch_metric_alarm.go | 1 - aws/resource_aws_codebuild_project.go | 2 -- aws/resource_aws_codedeploy_app.go | 1 - aws/resource_aws_codedeploy_deployment_group.go | 2 -- aws/resource_aws_codepipeline.go | 2 -- aws/resource_aws_config_config_rule.go | 1 - aws/resource_aws_config_configuration_recorder.go | 1 - aws/resource_aws_config_configuration_recorder_status.go | 1 - aws/resource_aws_config_delivery_channel.go | 1 - aws/resource_aws_customer_gateway.go | 1 - aws/resource_aws_dax_cluster.go | 2 -- aws/resource_aws_default_network_acl.go | 1 - aws/resource_aws_default_route_table.go | 1 - aws/resource_aws_default_security_group.go | 1 - aws/resource_aws_default_vpc.go | 1 - aws/resource_aws_default_vpc_dhcp_options.go | 1 - aws/resource_aws_dms_replication_task.go | 1 - aws/resource_aws_ecr_lifecycle_policy.go | 2 -- aws/resource_aws_ecr_repository.go | 2 -- aws/resource_aws_ecr_repository_policy.go | 1 - aws/resource_aws_ecs_service.go | 2 -- aws/resource_aws_elastic_beanstalk_application_version.go | 2 -- aws/resource_aws_elasticache_parameter_group.go | 1 - aws/resource_aws_elasticsearch_domain_policy.go | 1 - aws/resource_aws_emr_cluster.go | 1 - aws/resource_aws_emr_security_configuration.go | 2 -- aws/resource_aws_iam_account_alias.go | 2 -- aws/resource_aws_iam_account_password_policy.go | 1 - aws/resource_aws_iam_instance_profile.go | 2 +- aws/resource_aws_iam_server_certificate.go | 3 --- aws/resource_aws_inspector_resource_group.go | 3 --- aws/resource_aws_instance.go | 1 - aws/resource_aws_kinesis_firehose_delivery_stream.go | 1 - aws/resource_aws_kinesis_stream.go | 1 - aws/resource_aws_kms_alias.go | 2 +- aws/resource_aws_kms_key.go | 2 +- aws/resource_aws_lambda_alias.go | 2 -- aws/resource_aws_lambda_event_source_mapping.go | 2 -- aws/resource_aws_lambda_function.go | 2 -- aws/resource_aws_lambda_permission.go | 1 - aws/resource_aws_lb_target_group_attachment.go | 2 -- aws/resource_aws_lightsail_instance.go | 1 - aws/resource_aws_lightsail_key_pair.go | 1 - aws/resource_aws_load_balancer_backend_server_policy.go | 1 - aws/resource_aws_load_balancer_listener_policy.go | 1 - aws/resource_aws_load_balancer_policy.go | 1 - aws/resource_aws_media_store_container.go | 2 -- aws/resource_aws_network_interface_sg_attachment.go | 1 - aws/resource_aws_opsworks_instance.go | 1 - aws/resource_aws_placement_group.go | 1 - aws/resource_aws_proxy_protocol_policy.go | 2 -- aws/resource_aws_route.go | 1 - aws/resource_aws_route53_record.go | 2 -- aws/resource_aws_route53_zone.go | 2 -- aws/resource_aws_s3_bucket_metric.go | 3 --- aws/resource_aws_s3_bucket_notification.go | 2 -- aws/resource_aws_security_group_rule.go | 2 -- ...resource_aws_service_discovery_private_dns_namespace.go | 1 - aws/resource_aws_service_discovery_public_dns_namespace.go | 1 - aws/resource_aws_simpledb_domain.go | 1 - aws/resource_aws_ssm_document.go | 2 -- aws/resource_aws_ssm_parameter.go | 1 - aws/resource_aws_volume_attachment.go | 4 +--- aws/resource_aws_vpc_dhcp_options_association.go | 1 - aws/resource_aws_vpc_peering_connection_accepter.go | 1 - aws/resource_aws_vpn_connection.go | 1 - aws/resource_aws_vpn_connection_route.go | 1 - aws/resource_aws_vpn_gateway_attachment.go | 7 ------- aws/resource_aws_vpn_gateway_route_propagation.go | 1 - 91 files changed, 8 insertions(+), 139 deletions(-) diff --git a/aws/resource_aws_acm_certificate.go b/aws/resource_aws_acm_certificate.go index c045f62d7b6..14beef1d3f7 100644 --- a/aws/resource_aws_acm_certificate.go +++ b/aws/resource_aws_acm_certificate.go @@ -251,6 +251,5 @@ func resourceAwsAcmCertificateDelete(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error deleting certificate: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_acm_certificate_validation.go b/aws/resource_aws_acm_certificate_validation.go index 024b2689700..226759b71f2 100644 --- a/aws/resource_aws_acm_certificate_validation.go +++ b/aws/resource_aws_acm_certificate_validation.go @@ -160,6 +160,5 @@ func resourceAwsAcmCertificateValidationRead(d *schema.ResourceData, meta interf func resourceAwsAcmCertificateValidationDelete(d *schema.ResourceData, meta interface{}) error { // No need to do anything, certificate will be deleted when acm_certificate is deleted - d.SetId("") return nil } diff --git a/aws/resource_aws_ami.go b/aws/resource_aws_ami.go index bab340bf761..71b8f1e5bd3 100644 --- a/aws/resource_aws_ami.go +++ b/aws/resource_aws_ami.go @@ -307,8 +307,6 @@ func resourceAwsAmiDelete(d *schema.ResourceData, meta interface{}) error { return err } - // No error, ami was deleted successfully - d.SetId("") return nil } diff --git a/aws/resource_aws_api_gateway_account.go b/aws/resource_aws_api_gateway_account.go index 7b786270a53..45408362701 100644 --- a/aws/resource_aws_api_gateway_account.go +++ b/aws/resource_aws_api_gateway_account.go @@ -122,6 +122,5 @@ func resourceAwsApiGatewayAccountUpdate(d *schema.ResourceData, meta interface{} func resourceAwsApiGatewayAccountDelete(d *schema.ResourceData, meta interface{}) error { // There is no API for "deleting" account or resetting it to "default" settings - d.SetId("") return nil } diff --git a/aws/resource_aws_appautoscaling_policy.go b/aws/resource_aws_appautoscaling_policy.go index 8e885662ebf..29d2c24f271 100644 --- a/aws/resource_aws_appautoscaling_policy.go +++ b/aws/resource_aws_appautoscaling_policy.go @@ -349,7 +349,6 @@ func resourceAwsAppautoscalingPolicyDelete(d *schema.ResourceData, meta interfac return fmt.Errorf("Failed to delete autoscaling policy: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_appautoscaling_scheduled_action.go b/aws/resource_aws_appautoscaling_scheduled_action.go index 71613ea5566..841668f8146 100644 --- a/aws/resource_aws_appautoscaling_scheduled_action.go +++ b/aws/resource_aws_appautoscaling_scheduled_action.go @@ -184,11 +184,10 @@ func resourceAwsAppautoscalingScheduledActionDelete(d *schema.ResourceData, meta if err != nil { if isAWSErr(err, applicationautoscaling.ErrCodeObjectNotFoundException, "") { log.Printf("[WARN] Application Autoscaling Scheduled Action (%s) already gone, removing from state", d.Id()) - d.SetId("") return nil } return err } - d.SetId("") + return nil } diff --git a/aws/resource_aws_appautoscaling_target.go b/aws/resource_aws_appautoscaling_target.go index 851f8057db8..d23bb194c00 100644 --- a/aws/resource_aws_appautoscaling_target.go +++ b/aws/resource_aws_appautoscaling_target.go @@ -130,7 +130,6 @@ func resourceAwsAppautoscalingTargetDelete(d *schema.ResourceData, meta interfac } if t == nil { log.Printf("[INFO] Application AutoScaling Target %q not found", d.Id()) - d.SetId("") return nil } diff --git a/aws/resource_aws_autoscaling_group.go b/aws/resource_aws_autoscaling_group.go index 29e6e63e695..49afe4e4d69 100644 --- a/aws/resource_aws_autoscaling_group.go +++ b/aws/resource_aws_autoscaling_group.go @@ -821,7 +821,6 @@ func resourceAwsAutoscalingGroupDelete(d *schema.ResourceData, meta interface{}) } if g == nil { log.Printf("[WARN] Autoscaling Group (%s) not found, removing from state", d.Id()) - d.SetId("") return nil } if len(g.Instances) > 0 || *g.DesiredCapacity > 0 { diff --git a/aws/resource_aws_autoscaling_lifecycle_hook.go b/aws/resource_aws_autoscaling_lifecycle_hook.go index 2684a4ef343..07315114550 100644 --- a/aws/resource_aws_autoscaling_lifecycle_hook.go +++ b/aws/resource_aws_autoscaling_lifecycle_hook.go @@ -131,7 +131,6 @@ func resourceAwsAutoscalingLifecycleHookDelete(d *schema.ResourceData, meta inte return errwrap.Wrapf("Autoscaling Lifecycle Hook: {{err}}", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_autoscaling_policy.go b/aws/resource_aws_autoscaling_policy.go index 1289667cbc8..aafccced10e 100644 --- a/aws/resource_aws_autoscaling_policy.go +++ b/aws/resource_aws_autoscaling_policy.go @@ -273,7 +273,6 @@ func resourceAwsAutoscalingPolicyDelete(d *schema.ResourceData, meta interface{} return fmt.Errorf("Autoscaling Scaling Policy: %s ", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_batch_job_definition.go b/aws/resource_aws_batch_job_definition.go index 68b1e9f5d05..9e4348ef7df 100644 --- a/aws/resource_aws_batch_job_definition.go +++ b/aws/resource_aws_batch_job_definition.go @@ -165,7 +165,7 @@ func resourceAwsBatchJobDefinitionDelete(d *schema.ResourceData, meta interface{ if err != nil { return fmt.Errorf("%s %q", err, arn) } - d.SetId("") + return nil } diff --git a/aws/resource_aws_cloudformation_stack.go b/aws/resource_aws_cloudformation_stack.go index 43e9472e842..db28c498393 100644 --- a/aws/resource_aws_cloudformation_stack.go +++ b/aws/resource_aws_cloudformation_stack.go @@ -559,8 +559,6 @@ func resourceAwsCloudFormationStackDelete(d *schema.ResourceData, meta interface log.Printf("[DEBUG] CloudFormation stack %q has been deleted", d.Id()) - d.SetId("") - return nil } diff --git a/aws/resource_aws_cloudfront_distribution.go b/aws/resource_aws_cloudfront_distribution.go index bcce9b47050..99c540b693f 100644 --- a/aws/resource_aws_cloudfront_distribution.go +++ b/aws/resource_aws_cloudfront_distribution.go @@ -733,7 +733,6 @@ func resourceAwsCloudFrontDistributionRead(d *schema.ResourceData, meta interfac return err } // Update other attributes outside of DistributionConfig - d.SetId(*resp.Distribution.Id) err = d.Set("active_trusted_signers", flattenActiveTrustedSigners(resp.Distribution.ActiveTrustedSigners)) if err != nil { return err @@ -794,7 +793,6 @@ func resourceAwsCloudFrontDistributionDelete(d *schema.ResourceData, meta interf // skip delete if retain_on_delete is enabled if d.Get("retain_on_delete").(bool) { log.Printf("[WARN] Removing CloudFront Distribution ID %q with `retain_on_delete` set. Please delete this distribution manually.", d.Id()) - d.SetId("") return nil } @@ -825,8 +823,6 @@ func resourceAwsCloudFrontDistributionDelete(d *schema.ResourceData, meta interf return fmt.Errorf("CloudFront Distribution %s cannot be deleted: %s", d.Id(), err) } - // Done - d.SetId("") return nil } diff --git a/aws/resource_aws_cloudfront_origin_access_identity.go b/aws/resource_aws_cloudfront_origin_access_identity.go index 55585b0ff57..00f6b65877b 100644 --- a/aws/resource_aws_cloudfront_origin_access_identity.go +++ b/aws/resource_aws_cloudfront_origin_access_identity.go @@ -119,8 +119,6 @@ func resourceAwsCloudFrontOriginAccessIdentityDelete(d *schema.ResourceData, met return err } - // Done - d.SetId("") return nil } diff --git a/aws/resource_aws_cloudwatch_dashboard.go b/aws/resource_aws_cloudwatch_dashboard.go index dea7c2fa1fa..d203aead4b1 100644 --- a/aws/resource_aws_cloudwatch_dashboard.go +++ b/aws/resource_aws_cloudwatch_dashboard.go @@ -102,15 +102,12 @@ func resourceAwsCloudWatchDashboardDelete(d *schema.ResourceData, meta interface if _, err := conn.DeleteDashboards(¶ms); err != nil { if isCloudWatchDashboardNotFoundErr(err) { - log.Printf("[WARN] CloudWatch Dashboard %s is already gone", d.Id()) - d.SetId("") return nil } return fmt.Errorf("Error deleting CloudWatch Dashboard: %s", err) } log.Printf("[INFO] CloudWatch Dashboard %s deleted", d.Id()) - d.SetId("") return nil } diff --git a/aws/resource_aws_cloudwatch_event_rule.go b/aws/resource_aws_cloudwatch_event_rule.go index 5f47a2f194e..f8da23715b9 100644 --- a/aws/resource_aws_cloudwatch_event_rule.go +++ b/aws/resource_aws_cloudwatch_event_rule.go @@ -223,8 +223,6 @@ func resourceAwsCloudWatchEventRuleDelete(d *schema.ResourceData, meta interface } log.Println("[INFO] CloudWatch Event Rule deleted") - d.SetId("") - return nil } diff --git a/aws/resource_aws_cloudwatch_event_target.go b/aws/resource_aws_cloudwatch_event_target.go index 649ca9cfb57..4b9af0e93bf 100644 --- a/aws/resource_aws_cloudwatch_event_target.go +++ b/aws/resource_aws_cloudwatch_event_target.go @@ -346,8 +346,6 @@ func resourceAwsCloudWatchEventTargetDelete(d *schema.ResourceData, meta interfa } log.Println("[INFO] CloudWatch Event Target deleted") - d.SetId("") - return nil } diff --git a/aws/resource_aws_cloudwatch_log_destination.go b/aws/resource_aws_cloudwatch_log_destination.go index 172630648e7..0180888011e 100644 --- a/aws/resource_aws_cloudwatch_log_destination.go +++ b/aws/resource_aws_cloudwatch_log_destination.go @@ -121,7 +121,7 @@ func resourceAwsCloudWatchLogDestinationDelete(d *schema.ResourceData, meta inte if err != nil { return fmt.Errorf("Error deleting Destination with name %s", name) } - d.SetId("") + return nil } diff --git a/aws/resource_aws_cloudwatch_log_destination_policy.go b/aws/resource_aws_cloudwatch_log_destination_policy.go index 704dacf452c..8064a25dbc7 100644 --- a/aws/resource_aws_cloudwatch_log_destination_policy.go +++ b/aws/resource_aws_cloudwatch_log_destination_policy.go @@ -83,6 +83,5 @@ func resourceAwsCloudWatchLogDestinationPolicyRead(d *schema.ResourceData, meta } func resourceAwsCloudWatchLogDestinationPolicyDelete(d *schema.ResourceData, meta interface{}) error { - d.SetId("") return nil } diff --git a/aws/resource_aws_cloudwatch_log_group.go b/aws/resource_aws_cloudwatch_log_group.go index 5132d97fcf7..496ab42071d 100644 --- a/aws/resource_aws_cloudwatch_log_group.go +++ b/aws/resource_aws_cloudwatch_log_group.go @@ -267,8 +267,6 @@ func resourceAwsCloudWatchLogGroupDelete(d *schema.ResourceData, meta interface{ } log.Println("[INFO] CloudWatch Log Group deleted") - d.SetId("") - return nil } diff --git a/aws/resource_aws_cloudwatch_log_metric_filter.go b/aws/resource_aws_cloudwatch_log_metric_filter.go index f87751ad243..80ea7cfdf61 100644 --- a/aws/resource_aws_cloudwatch_log_metric_filter.go +++ b/aws/resource_aws_cloudwatch_log_metric_filter.go @@ -189,7 +189,5 @@ func resourceAwsCloudWatchLogMetricFilterDelete(d *schema.ResourceData, meta int } log.Println("[INFO] CloudWatch Log Metric Filter deleted") - d.SetId("") - return nil } diff --git a/aws/resource_aws_cloudwatch_log_subscription_filter.go b/aws/resource_aws_cloudwatch_log_subscription_filter.go index 1598b748f54..99e303020dc 100644 --- a/aws/resource_aws_cloudwatch_log_subscription_filter.go +++ b/aws/resource_aws_cloudwatch_log_subscription_filter.go @@ -180,7 +180,7 @@ func resourceAwsCloudwatchLogSubscriptionFilterDelete(d *schema.ResourceData, me return fmt.Errorf( "Error deleting Subscription Filter from log group: %s with name filter name %s: %+v", log_group_name, name, err) } - d.SetId("") + return nil } diff --git a/aws/resource_aws_cloudwatch_metric_alarm.go b/aws/resource_aws_cloudwatch_metric_alarm.go index 9c21dac34d0..e4a039eb03c 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/aws/resource_aws_cloudwatch_metric_alarm.go @@ -224,7 +224,6 @@ func resourceAwsCloudWatchMetricAlarmDelete(d *schema.ResourceData, meta interfa } log.Println("[INFO] CloudWatch Metric Alarm deleted") - d.SetId("") return nil } diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index d2c485a677d..5362e004f56 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -642,8 +642,6 @@ func resourceAwsCodeBuildProjectDelete(d *schema.ResourceData, meta interface{}) return err } - d.SetId("") - return nil } diff --git a/aws/resource_aws_codedeploy_app.go b/aws/resource_aws_codedeploy_app.go index 706bd7afa9f..cf3dac3debf 100644 --- a/aws/resource_aws_codedeploy_app.go +++ b/aws/resource_aws_codedeploy_app.go @@ -110,7 +110,6 @@ func resourceAwsCodeDeployAppDelete(d *schema.ResourceData, meta interface{}) er }) if err != nil { if cderr, ok := err.(awserr.Error); ok && cderr.Code() == "InvalidApplicationNameException" { - d.SetId("") return nil } else { log.Printf("[ERROR] Error deleting CodeDeploy application: %s", err) diff --git a/aws/resource_aws_codedeploy_deployment_group.go b/aws/resource_aws_codedeploy_deployment_group.go index 1964f58f724..875a24adbca 100644 --- a/aws/resource_aws_codedeploy_deployment_group.go +++ b/aws/resource_aws_codedeploy_deployment_group.go @@ -655,8 +655,6 @@ func resourceAwsCodeDeployDeploymentGroupDelete(d *schema.ResourceData, meta int return err } - d.SetId("") - return nil } diff --git a/aws/resource_aws_codepipeline.go b/aws/resource_aws_codepipeline.go index ff35e5b8f13..b9148fff8c6 100644 --- a/aws/resource_aws_codepipeline.go +++ b/aws/resource_aws_codepipeline.go @@ -488,7 +488,5 @@ func resourceAwsCodePipelineDelete(d *schema.ResourceData, meta interface{}) err return err } - d.SetId("") - return nil } diff --git a/aws/resource_aws_config_config_rule.go b/aws/resource_aws_config_config_rule.go index 7d10647ddb8..9f055b5b6d6 100644 --- a/aws/resource_aws_config_config_rule.go +++ b/aws/resource_aws_config_config_rule.go @@ -295,7 +295,6 @@ func resourceAwsConfigConfigRuleDelete(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] AWS Config config rule %q deleted", name) - d.SetId("") return nil } diff --git a/aws/resource_aws_config_configuration_recorder.go b/aws/resource_aws_config_configuration_recorder.go index 9c5ae064a20..df8319bce33 100644 --- a/aws/resource_aws_config_configuration_recorder.go +++ b/aws/resource_aws_config_configuration_recorder.go @@ -144,6 +144,5 @@ func resourceAwsConfigConfigurationRecorderDelete(d *schema.ResourceData, meta i return fmt.Errorf("Deleting Configuration Recorder failed: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_config_configuration_recorder_status.go b/aws/resource_aws_config_configuration_recorder_status.go index a2ba85b5da0..3420ed5f5ee 100644 --- a/aws/resource_aws_config_configuration_recorder_status.go +++ b/aws/resource_aws_config_configuration_recorder_status.go @@ -117,6 +117,5 @@ func resourceAwsConfigConfigurationRecorderStatusDelete(d *schema.ResourceData, return fmt.Errorf("Stopping Configuration Recorder failed: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_config_delivery_channel.go b/aws/resource_aws_config_delivery_channel.go index bd3b70e170f..f2fbe930ffa 100644 --- a/aws/resource_aws_config_delivery_channel.go +++ b/aws/resource_aws_config_delivery_channel.go @@ -178,6 +178,5 @@ func resourceAwsConfigDeliveryChannelDelete(d *schema.ResourceData, meta interfa return fmt.Errorf("Unable to delete delivery channel: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_customer_gateway.go b/aws/resource_aws_customer_gateway.go index 668f8a80cd8..7e5dda3b0bc 100644 --- a/aws/resource_aws_customer_gateway.go +++ b/aws/resource_aws_customer_gateway.go @@ -236,7 +236,6 @@ func resourceAwsCustomerGatewayDelete(d *schema.ResourceData, meta interface{}) }) if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidCustomerGatewayID.NotFound" { - d.SetId("") return nil } else { log.Printf("[ERROR] Error deleting CustomerGateway: %s", err) diff --git a/aws/resource_aws_dax_cluster.go b/aws/resource_aws_dax_cluster.go index 0acf9a86e87..c5884a25736 100644 --- a/aws/resource_aws_dax_cluster.go +++ b/aws/resource_aws_dax_cluster.go @@ -485,8 +485,6 @@ func resourceAwsDaxClusterDelete(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error waiting for DAX (%s) to delete: %s", d.Id(), sterr) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_default_network_acl.go b/aws/resource_aws_default_network_acl.go index 7a11dee72e8..138de0176bb 100644 --- a/aws/resource_aws_default_network_acl.go +++ b/aws/resource_aws_default_network_acl.go @@ -243,7 +243,6 @@ func resourceAwsDefaultNetworkAclUpdate(d *schema.ResourceData, meta interface{} func resourceAwsDefaultNetworkAclDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Network ACL. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/aws/resource_aws_default_route_table.go b/aws/resource_aws_default_route_table.go index 987dd4a7df3..c372ed347a7 100644 --- a/aws/resource_aws_default_route_table.go +++ b/aws/resource_aws_default_route_table.go @@ -155,7 +155,6 @@ func resourceAwsDefaultRouteTableRead(d *schema.ResourceData, meta interface{}) func resourceAwsDefaultRouteTableDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Route Table. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/aws/resource_aws_default_security_group.go b/aws/resource_aws_default_security_group.go index f4fb748bbda..f76af2d0f14 100644 --- a/aws/resource_aws_default_security_group.go +++ b/aws/resource_aws_default_security_group.go @@ -101,7 +101,6 @@ func resourceAwsDefaultSecurityGroupCreate(d *schema.ResourceData, meta interfac func resourceAwsDefaultSecurityGroupDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default Security Group. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/aws/resource_aws_default_vpc.go b/aws/resource_aws_default_vpc.go index 8953534a017..345325fb83c 100644 --- a/aws/resource_aws_default_vpc.go +++ b/aws/resource_aws_default_vpc.go @@ -61,6 +61,5 @@ func resourceAwsDefaultVpcCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsDefaultVpcDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default VPC. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/aws/resource_aws_default_vpc_dhcp_options.go b/aws/resource_aws_default_vpc_dhcp_options.go index cb433ff4bb9..36e0d2b9528 100644 --- a/aws/resource_aws_default_vpc_dhcp_options.go +++ b/aws/resource_aws_default_vpc_dhcp_options.go @@ -85,6 +85,5 @@ func resourceAwsDefaultVpcDhcpOptionsCreate(d *schema.ResourceData, meta interfa func resourceAwsDefaultVpcDhcpOptionsDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Cannot destroy Default DHCP Options Set. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/aws/resource_aws_dms_replication_task.go b/aws/resource_aws_dms_replication_task.go index 526ce9eae66..49bab71fa50 100644 --- a/aws/resource_aws_dms_replication_task.go +++ b/aws/resource_aws_dms_replication_task.go @@ -258,7 +258,6 @@ func resourceAwsDmsReplicationTaskDelete(d *schema.ResourceData, meta interface{ if err != nil { if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { log.Printf("[DEBUG] DMS Replication Task %q Not Found", d.Id()) - d.SetId("") return nil } return err diff --git a/aws/resource_aws_ecr_lifecycle_policy.go b/aws/resource_aws_ecr_lifecycle_policy.go index 4f5f4e65852..6725ea8fa40 100644 --- a/aws/resource_aws_ecr_lifecycle_policy.go +++ b/aws/resource_aws_ecr_lifecycle_policy.go @@ -91,11 +91,9 @@ func resourceAwsEcrLifecyclePolicyDelete(d *schema.ResourceData, meta interface{ _, err := conn.DeleteLifecyclePolicy(input) if err != nil { if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - d.SetId("") return nil } if isAWSErr(err, ecr.ErrCodeLifecyclePolicyNotFoundException, "") { - d.SetId("") return nil } return err diff --git a/aws/resource_aws_ecr_repository.go b/aws/resource_aws_ecr_repository.go index 3a244743522..1de9cff36f9 100644 --- a/aws/resource_aws_ecr_repository.go +++ b/aws/resource_aws_ecr_repository.go @@ -113,7 +113,6 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er }) if err != nil { if ecrerr, ok := err.(awserr.Error); ok && ecrerr.Code() == "RepositoryNotFoundException" { - d.SetId("") return nil } return err @@ -145,7 +144,6 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er return err } - d.SetId("") log.Printf("[DEBUG] repository %q deleted.", d.Get("name").(string)) return nil diff --git a/aws/resource_aws_ecr_repository_policy.go b/aws/resource_aws_ecr_repository_policy.go index a58a5d60b10..83d56f183b0 100644 --- a/aws/resource_aws_ecr_repository_policy.go +++ b/aws/resource_aws_ecr_repository_policy.go @@ -153,7 +153,6 @@ func resourceAwsEcrRepositoryPolicyDelete(d *schema.ResourceData, meta interface if ecrerr, ok := err.(awserr.Error); ok { switch ecrerr.Code() { case "RepositoryNotFoundException", "RepositoryPolicyNotFoundException": - d.SetId("") return nil default: return err diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 1bbe304a151..46d8abcca77 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -743,7 +743,6 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error if err != nil { if isAWSErr(err, ecs.ErrCodeServiceNotFoundException, "") { log.Printf("[DEBUG] Removing ECS Service from state, %q is already gone", d.Id()) - d.SetId("") return nil } return err @@ -751,7 +750,6 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error if len(resp.Services) == 0 { log.Printf("[DEBUG] Removing ECS Service from state, %q is already gone", d.Id()) - d.SetId("") return nil } diff --git a/aws/resource_aws_elastic_beanstalk_application_version.go b/aws/resource_aws_elastic_beanstalk_application_version.go index 97530839af2..6290ef1524c 100644 --- a/aws/resource_aws_elastic_beanstalk_application_version.go +++ b/aws/resource_aws_elastic_beanstalk_application_version.go @@ -153,14 +153,12 @@ func resourceAwsElasticBeanstalkApplicationVersionDelete(d *schema.ResourceData, if awserr, ok := err.(awserr.Error); ok { // application version is pending delete, or no longer exists. if awserr.Code() == "InvalidParameterValue" { - d.SetId("") return nil } } return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_elasticache_parameter_group.go b/aws/resource_aws_elasticache_parameter_group.go index 3c84ae070ce..2689d67ce58 100644 --- a/aws/resource_aws_elasticache_parameter_group.go +++ b/aws/resource_aws_elasticache_parameter_group.go @@ -231,7 +231,6 @@ func resourceAwsElasticacheParameterGroupDelete(d *schema.ResourceData, meta int if err != nil { awsErr, ok := err.(awserr.Error) if ok && awsErr.Code() == "CacheParameterGroupNotFoundFault" { - d.SetId("") return nil } if ok && awsErr.Code() == "InvalidCacheParameterGroupState" { diff --git a/aws/resource_aws_elasticsearch_domain_policy.go b/aws/resource_aws_elasticsearch_domain_policy.go index 7918ec5845d..da4e588160d 100644 --- a/aws/resource_aws_elasticsearch_domain_policy.go +++ b/aws/resource_aws_elasticsearch_domain_policy.go @@ -122,6 +122,5 @@ func resourceAwsElasticSearchDomainPolicyDelete(d *schema.ResourceData, meta int return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index 96cf7e6d710..3df5c41af29 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -835,7 +835,6 @@ func resourceAwsEMRClusterDelete(d *schema.ResourceData, meta interface{}) error log.Printf("[ERR] Error waiting for EMR Cluster (%s) Instances to drain", d.Id()) } - d.SetId("") return nil } diff --git a/aws/resource_aws_emr_security_configuration.go b/aws/resource_aws_emr_security_configuration.go index 50400c407f3..069b08c9d36 100644 --- a/aws/resource_aws_emr_security_configuration.go +++ b/aws/resource_aws_emr_security_configuration.go @@ -106,12 +106,10 @@ func resourceAwsEmrSecurityConfigurationDelete(d *schema.ResourceData, meta inte }) if err != nil { if isAWSErr(err, "InvalidRequestException", "does not exist") { - d.SetId("") return nil } return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_iam_account_alias.go b/aws/resource_aws_iam_account_alias.go index 3307ae1c29b..717f8187e48 100644 --- a/aws/resource_aws_iam_account_alias.go +++ b/aws/resource_aws_iam_account_alias.go @@ -88,7 +88,5 @@ func resourceAwsIamAccountAliasDelete(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error deleting account alias with name '%s': %s", account_alias, err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_iam_account_password_policy.go b/aws/resource_aws_iam_account_password_policy.go index 71dfbf0c843..115db808ae8 100644 --- a/aws/resource_aws_iam_account_password_policy.go +++ b/aws/resource_aws_iam_account_password_policy.go @@ -161,7 +161,6 @@ func resourceAwsIamAccountPasswordPolicyDelete(d *schema.ResourceData, meta inte if _, err := iamconn.DeleteAccountPasswordPolicy(input); err != nil { return fmt.Errorf("Error deleting IAM Password Policy: %s", err) } - d.SetId("") log.Println("[DEBUG] Deleted IAM account password policy") return nil diff --git a/aws/resource_aws_iam_instance_profile.go b/aws/resource_aws_iam_instance_profile.go index 837a3a51325..1c32c7824ea 100644 --- a/aws/resource_aws_iam_instance_profile.go +++ b/aws/resource_aws_iam_instance_profile.go @@ -295,7 +295,7 @@ func resourceAwsIamInstanceProfileDelete(d *schema.ResourceData, meta interface{ if err != nil { return fmt.Errorf("Error deleting IAM instance profile %s: %s", d.Id(), err) } - d.SetId("") + return nil } diff --git a/aws/resource_aws_iam_server_certificate.go b/aws/resource_aws_iam_server_certificate.go index ab3caf9619a..0e7f746544c 100644 --- a/aws/resource_aws_iam_server_certificate.go +++ b/aws/resource_aws_iam_server_certificate.go @@ -173,8 +173,6 @@ func resourceAwsIAMServerCertificateDelete(d *schema.ResourceData, meta interfac return resource.RetryableError(err) } if awsErr.Code() == "NoSuchEntity" { - log.Printf("[WARN] IAM Server Certificate (%s) not found, removing from state", d.Id()) - d.SetId("") return nil } } @@ -187,7 +185,6 @@ func resourceAwsIAMServerCertificateDelete(d *schema.ResourceData, meta interfac return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_inspector_resource_group.go b/aws/resource_aws_inspector_resource_group.go index 55f56696cec..c51dfecaae8 100644 --- a/aws/resource_aws_inspector_resource_group.go +++ b/aws/resource_aws_inspector_resource_group.go @@ -69,8 +69,5 @@ func resourceAwsInspectorResourceGroupRead(d *schema.ResourceData, meta interfac } func resourceAwsInspectorResourceGroupDelete(d *schema.ResourceData, meta interface{}) error { - d.Set("arn", "") - d.SetId("") - return nil } diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 41c7820dd0c..ce867c5a9c5 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -1143,7 +1143,6 @@ func resourceAwsInstanceDelete(d *schema.ResourceData, meta interface{}) error { return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index e6664d9d6dd..fa09a219ce4 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -1608,7 +1608,6 @@ func resourceAwsKinesisFirehoseDeliveryStreamDelete(d *schema.ResourceData, meta sn, err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_kinesis_stream.go b/aws/resource_aws_kinesis_stream.go index 45c7e2ec7cf..28a6eec25ca 100644 --- a/aws/resource_aws_kinesis_stream.go +++ b/aws/resource_aws_kinesis_stream.go @@ -229,7 +229,6 @@ func resourceAwsKinesisStreamDelete(d *schema.ResourceData, meta interface{}) er sn, err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_kms_alias.go b/aws/resource_aws_kms_alias.go index 6f724d7a992..13bca7571a7 100644 --- a/aws/resource_aws_kms_alias.go +++ b/aws/resource_aws_kms_alias.go @@ -166,7 +166,7 @@ func resourceAwsKmsAliasDelete(d *schema.ResourceData, meta interface{}) error { } log.Printf("[DEBUG] KMS Alias: (%s) deleted.", d.Id()) - d.SetId("") + return nil } diff --git a/aws/resource_aws_kms_key.go b/aws/resource_aws_kms_key.go index d86d1ab676b..893eeb3d895 100644 --- a/aws/resource_aws_kms_key.go +++ b/aws/resource_aws_kms_key.go @@ -473,6 +473,6 @@ func resourceAwsKmsKeyDelete(d *schema.ResourceData, meta interface{}) error { } log.Printf("[DEBUG] KMS Key %s deactivated.", keyId) - d.SetId("") + return nil } diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index eff4d20c8af..84510e5b709 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -119,8 +119,6 @@ func resourceAwsLambdaAliasDelete(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("Error deleting Lambda alias: %s", err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index dd8f64e352f..579b3c5a7c1 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -175,8 +175,6 @@ func resourceAwsLambdaEventSourceMappingDelete(d *schema.ResourceData, meta inte return fmt.Errorf("Error deleting Lambda event source mapping: %s", err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index 4797653a89b..38cb5d6d3a1 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -595,8 +595,6 @@ func resourceAwsLambdaFunctionDelete(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error deleting Lambda Function: %s", err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_lambda_permission.go b/aws/resource_aws_lambda_permission.go index 673ed2be3f3..07dda866cd9 100644 --- a/aws/resource_aws_lambda_permission.go +++ b/aws/resource_aws_lambda_permission.go @@ -340,7 +340,6 @@ func resourceAwsLambdaPermissionDelete(d *schema.ResourceData, meta interface{}) } log.Printf("[DEBUG] Lambda permission with ID %q removed", d.Id()) - d.SetId("") return nil } diff --git a/aws/resource_aws_lb_target_group_attachment.go b/aws/resource_aws_lb_target_group_attachment.go index 74eeaa850f0..525a7efdd25 100644 --- a/aws/resource_aws_lb_target_group_attachment.go +++ b/aws/resource_aws_lb_target_group_attachment.go @@ -104,8 +104,6 @@ func resourceAwsLbAttachmentDelete(d *schema.ResourceData, meta interface{}) err return errwrap.Wrapf("Error deregistering Targets: {{err}}", err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_lightsail_instance.go b/aws/resource_aws_lightsail_instance.go index 34f24957335..6876b10b7cf 100644 --- a/aws/resource_aws_lightsail_instance.go +++ b/aws/resource_aws_lightsail_instance.go @@ -230,7 +230,6 @@ func resourceAwsLightsailInstanceDelete(d *schema.ResourceData, meta interface{} d.Id(), err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_lightsail_key_pair.go b/aws/resource_aws_lightsail_key_pair.go index 24138aaa94b..08357506b7f 100644 --- a/aws/resource_aws_lightsail_key_pair.go +++ b/aws/resource_aws_lightsail_key_pair.go @@ -220,6 +220,5 @@ func resourceAwsLightsailKeyPairDelete(d *schema.ResourceData, meta interface{}) d.Id(), err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_load_balancer_backend_server_policy.go b/aws/resource_aws_load_balancer_backend_server_policy.go index 325c4fd1abd..bfa75a7ead1 100644 --- a/aws/resource_aws_load_balancer_backend_server_policy.go +++ b/aws/resource_aws_load_balancer_backend_server_policy.go @@ -128,7 +128,6 @@ func resourceAwsLoadBalancerBackendServerPoliciesDelete(d *schema.ResourceData, return fmt.Errorf("Error setting LoadBalancerPoliciesForBackendServer: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_load_balancer_listener_policy.go b/aws/resource_aws_load_balancer_listener_policy.go index d1c8cacbbe4..923290e66de 100644 --- a/aws/resource_aws_load_balancer_listener_policy.go +++ b/aws/resource_aws_load_balancer_listener_policy.go @@ -128,7 +128,6 @@ func resourceAwsLoadBalancerListenerPoliciesDelete(d *schema.ResourceData, meta return fmt.Errorf("Error setting LoadBalancerPoliciesOfListener: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_load_balancer_policy.go b/aws/resource_aws_load_balancer_policy.go index 8305cf992ba..89d8fa74039 100644 --- a/aws/resource_aws_load_balancer_policy.go +++ b/aws/resource_aws_load_balancer_policy.go @@ -205,7 +205,6 @@ func resourceAwsLoadBalancerPolicyDelete(d *schema.ResourceData, meta interface{ return fmt.Errorf("Error deleting Load Balancer Policy %s: %s", d.Id(), err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_media_store_container.go b/aws/resource_aws_media_store_container.go index 7380dad1f81..b3fd9ac0f03 100644 --- a/aws/resource_aws_media_store_container.go +++ b/aws/resource_aws_media_store_container.go @@ -95,7 +95,6 @@ func resourceAwsMediaStoreContainerDelete(d *schema.ResourceData, meta interface _, err := conn.DeleteContainer(input) if err != nil { if isAWSErr(err, mediastore.ErrCodeContainerNotFoundException, "") { - d.SetId("") return nil } return err @@ -118,7 +117,6 @@ func resourceAwsMediaStoreContainerDelete(d *schema.ResourceData, meta interface return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_network_interface_sg_attachment.go b/aws/resource_aws_network_interface_sg_attachment.go index 29f09aedbcf..bc0c33b4b16 100644 --- a/aws/resource_aws_network_interface_sg_attachment.go +++ b/aws/resource_aws_network_interface_sg_attachment.go @@ -116,7 +116,6 @@ func resourceAwsNetworkInterfaceSGAttachmentDelete(d *schema.ResourceData, meta return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_opsworks_instance.go b/aws/resource_aws_opsworks_instance.go index e5183e8487e..e876b834f0a 100644 --- a/aws/resource_aws_opsworks_instance.go +++ b/aws/resource_aws_opsworks_instance.go @@ -859,7 +859,6 @@ func resourceAwsOpsworksInstanceDelete(d *schema.ResourceData, meta interface{}) return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_placement_group.go b/aws/resource_aws_placement_group.go index e5da78c9e5d..33e6668f0ba 100644 --- a/aws/resource_aws_placement_group.go +++ b/aws/resource_aws_placement_group.go @@ -148,6 +148,5 @@ func resourceAwsPlacementGroupDelete(d *schema.ResourceData, meta interface{}) e return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_proxy_protocol_policy.go b/aws/resource_aws_proxy_protocol_policy.go index ae7d61dc942..fab8bc91c6b 100644 --- a/aws/resource_aws_proxy_protocol_policy.go +++ b/aws/resource_aws_proxy_protocol_policy.go @@ -166,8 +166,6 @@ func resourceAwsProxyProtocolPolicyDelete(d *schema.ResourceData, meta interface resp, err := elbconn.DescribeLoadBalancers(req) if err != nil { if isLoadBalancerNotFound(err) { - // The ELB is gone now, so just remove it from the state - d.SetId("") return nil } return fmt.Errorf("Error retrieving ELB attributes: %s", err) diff --git a/aws/resource_aws_route.go b/aws/resource_aws_route.go index dfb12652957..3208f453714 100644 --- a/aws/resource_aws_route.go +++ b/aws/resource_aws_route.go @@ -425,7 +425,6 @@ func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index 345e1d777b6..79743db3753 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -701,8 +701,6 @@ func resourceAwsRoute53RecordDelete(d *schema.ResourceData, meta interface{}) er if err != nil { switch err { case r53NoHostedZoneFound, r53NoRecordsFound: - log.Printf("[DEBUG] %s for: %s, removing from state file", err, d.Id()) - d.SetId("") return nil default: return err diff --git a/aws/resource_aws_route53_zone.go b/aws/resource_aws_route53_zone.go index 96a7df348ea..868c5f65d8c 100644 --- a/aws/resource_aws_route53_zone.go +++ b/aws/resource_aws_route53_zone.go @@ -277,8 +277,6 @@ func resourceAwsRoute53ZoneDelete(d *schema.ResourceData, meta interface{}) erro _, err := r53.DeleteHostedZone(&route53.DeleteHostedZoneInput{Id: aws.String(d.Id())}) if err != nil { if r53err, ok := err.(awserr.Error); ok && r53err.Code() == "NoSuchHostedZone" { - log.Printf("[DEBUG] No matching Route 53 Zone found for: %s, removing from state file", d.Id()) - d.SetId("") return nil } return err diff --git a/aws/resource_aws_s3_bucket_metric.go b/aws/resource_aws_s3_bucket_metric.go index 37ed7f137d0..c67f56b7434 100644 --- a/aws/resource_aws_s3_bucket_metric.go +++ b/aws/resource_aws_s3_bucket_metric.go @@ -109,14 +109,11 @@ func resourceAwsS3BucketMetricDelete(d *schema.ResourceData, meta interface{}) e _, err = conn.DeleteBucketMetricsConfiguration(input) if err != nil { if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { - log.Printf("[WARN] %s S3 bucket metrics configuration not found, removing from state.", d.Id()) - d.SetId("") return nil } return fmt.Errorf("Error deleting S3 metric configuration: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_s3_bucket_notification.go b/aws/resource_aws_s3_bucket_notification.go index f7ba2ac22dd..4a8b6b14b89 100644 --- a/aws/resource_aws_s3_bucket_notification.go +++ b/aws/resource_aws_s3_bucket_notification.go @@ -346,8 +346,6 @@ func resourceAwsS3BucketNotificationDelete(d *schema.ResourceData, meta interfac return fmt.Errorf("Error deleting S3 notification configuration: %s", err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_security_group_rule.go b/aws/resource_aws_security_group_rule.go index 5ab3044c0eb..77132f4e13c 100644 --- a/aws/resource_aws_security_group_rule.go +++ b/aws/resource_aws_security_group_rule.go @@ -354,8 +354,6 @@ func resourceAwsSecurityGroupRuleDelete(d *schema.ResourceData, meta interface{} } } - d.SetId("") - return nil } diff --git a/aws/resource_aws_service_discovery_private_dns_namespace.go b/aws/resource_aws_service_discovery_private_dns_namespace.go index d74458285ad..8fa80bb5f54 100644 --- a/aws/resource_aws_service_discovery_private_dns_namespace.go +++ b/aws/resource_aws_service_discovery_private_dns_namespace.go @@ -127,6 +127,5 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespaceDelete(d *schema.ResourceData return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_service_discovery_public_dns_namespace.go b/aws/resource_aws_service_discovery_public_dns_namespace.go index 33fba76a51f..e112dfaf4e9 100644 --- a/aws/resource_aws_service_discovery_public_dns_namespace.go +++ b/aws/resource_aws_service_discovery_public_dns_namespace.go @@ -126,7 +126,6 @@ func resourceAwsServiceDiscoveryPublicDnsNamespaceDelete(d *schema.ResourceData, return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_simpledb_domain.go b/aws/resource_aws_simpledb_domain.go index 8450342e3bc..1c467a5d359 100644 --- a/aws/resource_aws_simpledb_domain.go +++ b/aws/resource_aws_simpledb_domain.go @@ -79,6 +79,5 @@ func resourceAwsSimpleDBDomainDelete(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Delete SimpleDB Domain failed: %s", err) } - d.SetId("") return nil } diff --git a/aws/resource_aws_ssm_document.go b/aws/resource_aws_ssm_document.go index 23f7facad9d..ab9457fa096 100644 --- a/aws/resource_aws_ssm_document.go +++ b/aws/resource_aws_ssm_document.go @@ -347,8 +347,6 @@ func resourceAwsSsmDocumentDelete(d *schema.ResourceData, meta interface{}) erro return err } - d.SetId("") - return nil } diff --git a/aws/resource_aws_ssm_parameter.go b/aws/resource_aws_ssm_parameter.go index 8f509be04d5..fe10d53b6e5 100644 --- a/aws/resource_aws_ssm_parameter.go +++ b/aws/resource_aws_ssm_parameter.go @@ -167,7 +167,6 @@ func resourceAwsSsmParameterDelete(d *schema.ResourceData, meta interface{}) err if err != nil { return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_volume_attachment.go b/aws/resource_aws_volume_attachment.go index 7049fa61c79..d9ea8bb97eb 100644 --- a/aws/resource_aws_volume_attachment.go +++ b/aws/resource_aws_volume_attachment.go @@ -213,8 +213,6 @@ func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).ec2conn if _, ok := d.GetOk("skip_destroy"); ok { - log.Printf("[INFO] Found skip_destroy to be true, removing attachment %q from state", d.Id()) - d.SetId("") return nil } @@ -250,7 +248,7 @@ func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{}) "Error waiting for Volume (%s) to detach from Instance: %s", vID, iID) } - d.SetId("") + return nil } diff --git a/aws/resource_aws_vpc_dhcp_options_association.go b/aws/resource_aws_vpc_dhcp_options_association.go index 7bdcb7a68c7..0a31db4872d 100644 --- a/aws/resource_aws_vpc_dhcp_options_association.go +++ b/aws/resource_aws_vpc_dhcp_options_association.go @@ -94,6 +94,5 @@ func resourceAwsVpcDhcpOptionsAssociationDelete(d *schema.ResourceData, meta int return err } - d.SetId("") return nil } diff --git a/aws/resource_aws_vpc_peering_connection_accepter.go b/aws/resource_aws_vpc_peering_connection_accepter.go index 854f8fc1668..61ed1f1791d 100644 --- a/aws/resource_aws_vpc_peering_connection_accepter.go +++ b/aws/resource_aws_vpc_peering_connection_accepter.go @@ -69,6 +69,5 @@ func resourceAwsVPCPeeringAccepterCreate(d *schema.ResourceData, meta interface{ func resourceAwsVPCPeeringAccepterDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Will not delete VPC peering connection. Terraform will remove this resource from the state file, however resources may remain.") - d.SetId("") return nil } diff --git a/aws/resource_aws_vpn_connection.go b/aws/resource_aws_vpn_connection.go index 21244784134..15e05fc6a78 100644 --- a/aws/resource_aws_vpn_connection.go +++ b/aws/resource_aws_vpn_connection.go @@ -461,7 +461,6 @@ func resourceAwsVpnConnectionDelete(d *schema.ResourceData, meta interface{}) er }) if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - d.SetId("") return nil } else { log.Printf("[ERROR] Error deleting VPN connection: %s", err) diff --git a/aws/resource_aws_vpn_connection_route.go b/aws/resource_aws_vpn_connection_route.go index 0f1991fe658..6685a80b506 100644 --- a/aws/resource_aws_vpn_connection_route.go +++ b/aws/resource_aws_vpn_connection_route.go @@ -106,7 +106,6 @@ func resourceAwsVpnConnectionRouteDelete(d *schema.ResourceData, meta interface{ }) if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpnConnectionID.NotFound" { - d.SetId("") return nil } log.Printf("[ERROR] Error deleting VPN connection route: %s", err) diff --git a/aws/resource_aws_vpn_gateway_attachment.go b/aws/resource_aws_vpn_gateway_attachment.go index db01100008e..b94059bed55 100644 --- a/aws/resource_aws_vpn_gateway_attachment.go +++ b/aws/resource_aws_vpn_gateway_attachment.go @@ -131,14 +131,8 @@ func resourceAwsVpnGatewayAttachmentDelete(d *schema.ResourceData, meta interfac if ok { switch awsErr.Code() { case "InvalidVPNGatewayID.NotFound": - log.Printf("[WARN] VPN Gateway %q not found.", vgwId) - d.SetId("") return nil case "InvalidVpnGatewayAttachment.NotFound": - log.Printf( - "[WARN] VPN Gateway %q attachment to VPC %q not found.", - vgwId, vpcId) - d.SetId("") return nil } } @@ -163,7 +157,6 @@ func resourceAwsVpnGatewayAttachmentDelete(d *schema.ResourceData, meta interfac } log.Printf("[DEBUG] VPN Gateway %q detached from VPC %q.", vgwId, vpcId) - d.SetId("") return nil } diff --git a/aws/resource_aws_vpn_gateway_route_propagation.go b/aws/resource_aws_vpn_gateway_route_propagation.go index 46e4b2208aa..771d8a17415 100644 --- a/aws/resource_aws_vpn_gateway_route_propagation.go +++ b/aws/resource_aws_vpn_gateway_route_propagation.go @@ -64,7 +64,6 @@ func resourceAwsVpnGatewayRoutePropagationDisable(d *schema.ResourceData, meta i return fmt.Errorf("error disabling VGW propagation: %s", err) } - d.SetId("") return nil } From cbd920ca4ce4c49697021c882522cfbb63e9ecbb Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Tue, 1 May 2018 22:18:49 +0200 Subject: [PATCH 0932/3316] r/security_group: fix rule description override --- aws/resource_aws_security_group.go | 147 +++++++++++------------ aws/resource_aws_security_group_test.go | 149 +++++++++++++++++++++++- 2 files changed, 213 insertions(+), 83 deletions(-) diff --git a/aws/resource_aws_security_group.go b/aws/resource_aws_security_group.go index 70fe956045d..ad1c1aea2ff 100644 --- a/aws/resource_aws_security_group.go +++ b/aws/resource_aws_security_group.go @@ -590,122 +590,83 @@ func resourceAwsSecurityGroupRuleHash(v interface{}) int { func resourceAwsSecurityGroupIPPermGather(groupId string, permissions []*ec2.IpPermission, ownerId *string) []map[string]interface{} { ruleMap := make(map[string]map[string]interface{}) for _, perm := range permissions { - var fromPort, toPort int64 - if v := perm.FromPort; v != nil { - fromPort = *v - } - if v := perm.ToPort; v != nil { - toPort = *v - } - - k := fmt.Sprintf("%s-%d-%d", *perm.IpProtocol, fromPort, toPort) - m, ok := ruleMap[k] - if !ok { - m = make(map[string]interface{}) - ruleMap[k] = m - } - - m["from_port"] = fromPort - m["to_port"] = toPort - m["protocol"] = *perm.IpProtocol - - var description string - if len(perm.IpRanges) > 0 { - raw, ok := m["cidr_blocks"] - if !ok { - raw = make([]string, 0, len(perm.IpRanges)) - } - list := raw.([]string) - for _, ip := range perm.IpRanges { - list = append(list, *ip.CidrIp) - desc := aws.StringValue(ip.Description) - if desc != "" { - description = desc + + rule := initSecurityGroupRule(ruleMap, perm, desc) + + raw, ok := rule["cidr_blocks"] + if !ok { + raw = make([]string, 0) } - } + list := raw.([]string) - m["cidr_blocks"] = list + rule["cidr_blocks"] = append(list, *ip.CidrIp) + } } if len(perm.Ipv6Ranges) > 0 { - raw, ok := m["ipv6_cidr_blocks"] - if !ok { - raw = make([]string, 0, len(perm.Ipv6Ranges)) - } - list := raw.([]string) - for _, ip := range perm.Ipv6Ranges { - list = append(list, *ip.CidrIpv6) - desc := aws.StringValue(ip.Description) - if desc != "" { - description = desc + + rule := initSecurityGroupRule(ruleMap, perm, desc) + + raw, ok := rule["ipv6_cidr_blocks"] + if !ok { + raw = make([]string, 0) } - } + list := raw.([]string) - m["ipv6_cidr_blocks"] = list + rule["ipv6_cidr_blocks"] = append(list, *ip.CidrIpv6) + } } if len(perm.PrefixListIds) > 0 { - raw, ok := m["prefix_list_ids"] - if !ok { - raw = make([]string, 0, len(perm.PrefixListIds)) - } - list := raw.([]string) - for _, pl := range perm.PrefixListIds { - list = append(list, *pl.PrefixListId) - desc := aws.StringValue(pl.Description) - if desc != "" { - description = desc + + rule := initSecurityGroupRule(ruleMap, perm, desc) + + raw, ok := rule["prefix_list_ids"] + if !ok { + raw = make([]string, 0) } - } + list := raw.([]string) - m["prefix_list_ids"] = list + rule["prefix_list_ids"] = append(list, *pl.PrefixListId) + } } groups := flattenSecurityGroups(perm.UserIdGroupPairs, ownerId) - for i, g := range groups { - if *g.GroupId == groupId { - groups[i], groups = groups[len(groups)-1], groups[:len(groups)-1] - m["self"] = true - + if len(groups) > 0 { + for _, g := range groups { desc := aws.StringValue(g.Description) - if desc != "" { - description = desc + + rule := initSecurityGroupRule(ruleMap, perm, desc) + + if *g.GroupId == groupId { + rule["self"] = true + continue } - } - } - if len(groups) > 0 { - raw, ok := m["security_groups"] - if !ok { - raw = schema.NewSet(schema.HashString, nil) - } - list := raw.(*schema.Set) + raw, ok := rule["security_groups"] + if !ok { + raw = schema.NewSet(schema.HashString, nil) + } + list := raw.(*schema.Set) - for _, g := range groups { if g.GroupName != nil { list.Add(*g.GroupName) } else { list.Add(*g.GroupId) } - - desc := aws.StringValue(g.Description) - if desc != "" { - description = desc - } + rule["security_groups"] = list } - - m["security_groups"] = list } - m["description"] = description } + rules := make([]map[string]interface{}, 0, len(ruleMap)) for _, m := range ruleMap { rules = append(rules, m) @@ -1339,3 +1300,27 @@ func networkInterfaceAttachedRefreshFunc(conn *ec2.EC2, id string) resource.Stat return eni, hasAttachment, nil } } + +func initSecurityGroupRule(ruleMap map[string]map[string]interface{}, perm *ec2.IpPermission, desc string) map[string]interface{} { + var fromPort, toPort int64 + if v := perm.FromPort; v != nil { + fromPort = *v + } + if v := perm.ToPort; v != nil { + toPort = *v + } + k := fmt.Sprintf("%s-%d-%d-%s", *perm.IpProtocol, fromPort, toPort, desc) + rule, ok := ruleMap[k] + if !ok { + rule = make(map[string]interface{}) + ruleMap[k] = rule + } + rule["protocol"] = *perm.IpProtocol + rule["from_port"] = fromPort + rule["to_port"] = toPort + if desc != "" { + rule["description"] = desc + } + + return rule +} diff --git a/aws/resource_aws_security_group_test.go b/aws/resource_aws_security_group_test.go index 3bdc78e4c82..b81b379df16 100644 --- a/aws/resource_aws_security_group_test.go +++ b/aws/resource_aws_security_group_test.go @@ -372,6 +372,26 @@ func TestAccAWSSecurityGroup_basic(t *testing.T) { }) } +func TestAccAWSSecurityGroup_ruleGathering(t *testing.T) { + var group ec2.SecurityGroup + sgName := fmt.Sprintf("tf-acc-security-group-%s", acctest.RandString(7)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSecurityGroupConfig_ruleGathering(sgName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSecurityGroupExists("aws_security_group.test", &group), + resource.TestCheckResourceAttr("aws_security_group.test", "name", sgName), + ), + }, + }, + }) +} + // cycleIpPermForGroup returns an IpPermission struct with a configured // UserIdGroupPair for the groupid given. Used in // TestAccAWSSecurityGroup_forceRevokeRules_should_fail to create a cyclic rule @@ -1842,7 +1862,7 @@ resource "aws_security_group" "primary" { Name = "tf-acc-revoke-test-primary" } - revoke_rules_on_delete = true + revoke_rules_on_delete = true } resource "aws_security_group" "secondary" { @@ -1854,7 +1874,7 @@ resource "aws_security_group" "secondary" { Name = "tf-acc-revoke-test-secondary" } - revoke_rules_on_delete = true + revoke_rules_on_delete = true } ` @@ -2856,3 +2876,128 @@ resource "aws_security_group" "egress" { } } ` + +func testAccAWSSecurityGroupConfig_ruleGathering(sgName string) string { + return fmt.Sprintf(` +variable "name" { + default = "%s" +} + +data "aws_region" "current" {} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + tags { + Name = "${var.name}" + } +} + +resource "aws_route_table" "default" { + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_vpc_endpoint" "test" { + vpc_id = "${aws_vpc.test.id}" + service_name = "com.amazonaws.${data.aws_region.current.name}.s3" + route_table_ids = ["${aws_route_table.default.id}"] + + policy = < Date: Tue, 1 May 2018 23:21:36 +0200 Subject: [PATCH 0933/3316] r/security_group: fix acceptance test --- aws/resource_aws_security_group_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_security_group_test.go b/aws/resource_aws_security_group_test.go index b81b379df16..f870c650368 100644 --- a/aws/resource_aws_security_group_test.go +++ b/aws/resource_aws_security_group_test.go @@ -386,6 +386,8 @@ func TestAccAWSSecurityGroup_ruleGathering(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSSecurityGroupExists("aws_security_group.test", &group), resource.TestCheckResourceAttr("aws_security_group.test", "name", sgName), + resource.TestCheckResourceAttr("aws_security_group.test", "egress.#", "3"), + resource.TestCheckResourceAttr("aws_security_group.test", "ingress.#", "5"), ), }, }, @@ -2832,6 +2834,8 @@ resource "aws_security_group" "egress" { ` const testAccAWSSecurityGroupConfigPrefixListEgress = ` +data "aws_region" "current" {} + resource "aws_vpc" "tf_sg_prefix_list_egress_test" { cidr_block = "10.0.0.0/16" tags { @@ -2843,9 +2847,9 @@ resource "aws_route_table" "default" { vpc_id = "${aws_vpc.tf_sg_prefix_list_egress_test.id}" } -resource "aws_vpc_endpoint" "s3-us-west-2" { +resource "aws_vpc_endpoint" "test" { vpc_id = "${aws_vpc.tf_sg_prefix_list_egress_test.id}" - service_name = "com.amazonaws.us-west-2.s3" + service_name = "com.amazonaws.${data.aws_region.current.name}.s3" route_table_ids = ["${aws_route_table.default.id}"] policy = < Date: Tue, 1 May 2018 20:52:32 +1200 Subject: [PATCH 0934/3316] Add support for MongoDB as a DMS source endpoint Add support for MongoDB as a DMS source endpoint --- aws/resource_aws_dms_endpoint.go | 188 ++++++++++++++++++---- aws/resource_aws_dms_endpoint_test.go | 101 ++++++++++++ website/docs/r/dms_endpoint.html.markdown | 5 +- 3 files changed, 263 insertions(+), 31 deletions(-) diff --git a/aws/resource_aws_dms_endpoint.go b/aws/resource_aws_dms_endpoint.go index 1e2d841894d..65ee9a4c928 100644 --- a/aws/resource_aws_dms_endpoint.go +++ b/aws/resource_aws_dms_endpoint.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "strings" "time" @@ -71,6 +72,7 @@ func resourceAwsDmsEndpoint() *schema.Resource { "redshift", "sybase", "sqlserver", + "mongodb", }, false), }, "extra_connection_attributes": { @@ -117,6 +119,52 @@ func resourceAwsDmsEndpoint() *schema.Resource { Type: schema.TypeString, Optional: true, }, + // With default values as per https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html + "mongodb_settings": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auth_type": { + Type: schema.TypeString, + Optional: true, + Default: "PASSWORD", + }, + "auth_mechanism": { + Type: schema.TypeString, + Optional: true, + Default: "DEFAULT", + }, + "nesting_level": { + Type: schema.TypeString, + Optional: true, + Default: "NONE", + }, + "extract_doc_id": { + Type: schema.TypeString, + Optional: true, + Default: "false", + }, + "docs_to_investigate": { + Type: schema.TypeString, + Optional: true, + Default: "1000", + }, + "auth_source": { + Type: schema.TypeString, + Optional: true, + Default: "admin", + }, + }, + }, + }, }, } } @@ -131,12 +179,28 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), } + switch d.Get("engine_name").(string) { // if dynamodb then add required params - if d.Get("engine_name").(string) == "dynamodb" { + case "dynamodb": request.DynamoDbSettings = &dms.DynamoDbSettings{ ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), } - } else { + case "mongodb": + request.MongoDbSettings = &dms.MongoDbSettings{ + Username: aws.String(d.Get("username").(string)), + Password: aws.String(d.Get("password").(string)), + ServerName: aws.String(d.Get("server_name").(string)), + Port: aws.Int64(int64(d.Get("port").(int))), + DatabaseName: aws.String(d.Get("database_name").(string)), + + AuthType: aws.String(d.Get("mongodb_settings.0.auth_type").(string)), + AuthMechanism: aws.String(d.Get("mongodb_settings.0.auth_mechanism").(string)), + NestingLevel: aws.String(d.Get("mongodb_settings.0.nesting_level").(string)), + ExtractDocId: aws.String(d.Get("mongodb_settings.0.extract_doc_id").(string)), + DocsToInvestigate: aws.String(d.Get("mongodb_settings.0.docs_to_investigate").(string)), + AuthSource: aws.String(d.Get("mongodb_settings.0.auth_source").(string)), + } + default: request.Password = aws.String(d.Get("password").(string)) request.Port = aws.Int64(int64(d.Get("port").(int))) request.ServerName = aws.String(d.Get("server_name").(string)) @@ -231,11 +295,6 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro hasChanges = true } - if d.HasChange("database_name") { - request.DatabaseName = aws.String(d.Get("database_name").(string)) - hasChanges = true - } - if d.HasChange("service_access_role") { request.DynamoDbSettings = &dms.DynamoDbSettings{ ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), @@ -258,31 +317,11 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro hasChanges = true } - if d.HasChange("password") { - request.Password = aws.String(d.Get("password").(string)) - hasChanges = true - } - - if d.HasChange("port") { - request.Port = aws.Int64(int64(d.Get("port").(int))) - hasChanges = true - } - - if d.HasChange("server_name") { - request.ServerName = aws.String(d.Get("server_name").(string)) - hasChanges = true - } - if d.HasChange("ssl_mode") { request.SslMode = aws.String(d.Get("ssl_mode").(string)) hasChanges = true } - if d.HasChange("username") { - request.Username = aws.String(d.Get("username").(string)) - hasChanges = true - } - if d.HasChange("tags") { err := dmsSetTags(d.Get("endpoint_arn").(string), d, meta) if err != nil { @@ -290,6 +329,63 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } } + switch d.Get("engine_name").(string) { + case "mongodb": + if d.HasChange("username") || + d.HasChange("password") || + d.HasChange("server_name") || + d.HasChange("port") || + d.HasChange("database_name") || + d.HasChange("mongodb_settings.0.auth_type") || + d.HasChange("mongodb_settings.0.auth_mechanism") || + d.HasChange("mongodb_settings.0.nesting_level") || + d.HasChange("mongodb_settings.0.extract_doc_id") || + d.HasChange("mongodb_settings.0.docs_to_investigate") || + d.HasChange("mongodb_settings.0.auth_source") { + request.MongoDbSettings = &dms.MongoDbSettings{ + Username: aws.String(d.Get("username").(string)), + Password: aws.String(d.Get("password").(string)), + ServerName: aws.String(d.Get("server_name").(string)), + Port: aws.Int64(int64(d.Get("port").(int))), + DatabaseName: aws.String(d.Get("database_name").(string)), + + AuthType: aws.String(d.Get("mongodb_settings.0.auth_type").(string)), + AuthMechanism: aws.String(d.Get("mongodb_settings.0.auth_mechanism").(string)), + NestingLevel: aws.String(d.Get("mongodb_settings.0.nesting_level").(string)), + ExtractDocId: aws.String(d.Get("mongodb_settings.0.extract_doc_id").(string)), + DocsToInvestigate: aws.String(d.Get("mongodb_settings.0.docs_to_investigate").(string)), + AuthSource: aws.String(d.Get("mongodb_settings.0.auth_source").(string)), + } + request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 'mongodb') + hasChanges = true + } + default: + if d.HasChange("database_name") { + request.DatabaseName = aws.String(d.Get("database_name").(string)) + hasChanges = true + } + + if d.HasChange("password") { + request.Password = aws.String(d.Get("password").(string)) + hasChanges = true + } + + if d.HasChange("port") { + request.Port = aws.Int64(int64(d.Get("port").(int))) + hasChanges = true + } + + if d.HasChange("server_name") { + request.ServerName = aws.String(d.Get("server_name").(string)) + hasChanges = true + } + + if d.HasChange("username") { + request.Username = aws.String(d.Get("username").(string)) + hasChanges = true + } + } + if hasChanges { log.Println("[DEBUG] DMS update endpoint:", request) @@ -327,13 +423,30 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi d.Set("endpoint_type", strings.ToLower(*endpoint.EndpointType)) d.Set("engine_name", endpoint.EngineName) - if *endpoint.EngineName == "dynamodb" { + switch *endpoint.EngineName { + case "dynamodb": if endpoint.DynamoDbSettings != nil { d.Set("service_access_role", endpoint.DynamoDbSettings.ServiceAccessRoleArn) } else { d.Set("service_access_role", "") } - } else { + case "mongodb": + if endpoint.MongoDbSettings != nil { + d.Set("username", endpoint.MongoDbSettings.Username) + d.Set("server_name", endpoint.MongoDbSettings.ServerName) + d.Set("port", endpoint.MongoDbSettings.Port) + d.Set("database_name", endpoint.MongoDbSettings.DatabaseName) + + if err := d.Set("mongodb_settings", flattenDmsMongoDbSettings(endpoint.MongoDbSettings)); err != nil { + return fmt.Errorf("Error setting mongodb_settings for DMS: %s", err) + } + } else { + d.Set("username", endpoint.Username) + d.Set("server_name", endpoint.ServerName) + d.Set("port", endpoint.Port) + d.Set("database_name", endpoint.DatabaseName) + } + default: d.Set("database_name", endpoint.DatabaseName) d.Set("extra_connection_attributes", endpoint.ExtraConnectionAttributes) d.Set("port", endpoint.Port) @@ -346,3 +459,20 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi return nil } + +func flattenDmsMongoDbSettings(settings *dms.MongoDbSettings) []map[string]interface{} { + if settings == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "auth_type": aws.StringValue(settings.AuthType), + "auth_mechanism": aws.StringValue(settings.AuthMechanism), + "nesting_level": aws.StringValue(settings.NestingLevel), + "extract_doc_id": aws.StringValue(settings.ExtractDocId), + "docs_to_investigate": aws.StringValue(settings.DocsToInvestigate), + "auth_source": aws.StringValue(settings.AuthSource), + } + + return []map[string]interface{}{m} +} diff --git a/aws/resource_aws_dms_endpoint_test.go b/aws/resource_aws_dms_endpoint_test.go index b094e4b5eb8..58fef7d8862 100644 --- a/aws/resource_aws_dms_endpoint_test.go +++ b/aws/resource_aws_dms_endpoint_test.go @@ -82,6 +82,49 @@ func TestAccAWSDmsEndpointDynamoDb(t *testing.T) { }) } +func TestAccAWSDmsEndpointMongoDb(t *testing.T) { + resourceName := "aws_dms_endpoint.dms_endpoint" + randId := acctest.RandString(8) + "-mongodb" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dmsEndpointDestroy, + Steps: []resource.TestStep{ + { + Config: dmsEndpointMongoDbConfig(randId), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "endpoint_arn"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerifyIgnore: []string{"password"}, + }, + { + Config: dmsEndpointMongoDbConfigUpdate(randId), + Check: resource.ComposeTestCheckFunc( + checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "server_name", "tftest-new-server_name"), + resource.TestCheckResourceAttr(resourceName, "port", "27018"), + resource.TestCheckResourceAttr(resourceName, "username", "tftest-new-username"), + resource.TestCheckResourceAttr(resourceName, "password", "tftest-new-password"), + resource.TestCheckResourceAttr(resourceName, "database_name", "tftest-new-database_name"), + resource.TestCheckResourceAttr(resourceName, "ssl_mode", "require"), + resource.TestCheckResourceAttr(resourceName, "extra_connection_attributes", "key=value;"), + resource.TestCheckResourceAttr(resourceName, "mongodb_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.auth_mechanism", "SCRAM_SHA_1"), + resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.nesting_level", "ONE"), + resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.extract_doc_id", "true"), + resource.TestCheckResourceAttr(resourceName, "mongodb_settings.0.docs_to_investigate", "1001"), + ), + }, + }, + }) +} + func dmsEndpointDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_dms_endpoint" { @@ -296,3 +339,61 @@ EOF } `, randId) } + +func dmsEndpointMongoDbConfig(randId string) string { + return fmt.Sprintf(` +resource "aws_dms_endpoint" "dms_endpoint" { + endpoint_id = "tf-test-dms-endpoint-%[1]s" + endpoint_type = "source" + engine_name = "mongodb" + server_name = "tftest" + port = 27017 + username = "tftest" + password = "tftest" + database_name = "tftest" + ssl_mode = "none" + extra_connection_attributes = "" + tags { + Name = "tf-test-dms-endpoint-%[1]s" + Update = "to-update" + Remove = "to-remove" + } + mongodb_settings { + auth_type = "PASSWORD" + auth_mechanism = "DEFAULT" + nesting_level = "NONE" + extract_doc_id = "false" + docs_to_investigate = "1000" + auth_source = "admin" + } +} +`, randId) +} + +func dmsEndpointMongoDbConfigUpdate(randId string) string { + return fmt.Sprintf(` +resource "aws_dms_endpoint" "dms_endpoint" { + endpoint_id = "tf-test-dms-endpoint-%[1]s" + endpoint_type = "source" + engine_name = "mongodb" + server_name = "tftest-new-server_name" + port = 27018 + username = "tftest-new-username" + password = "tftest-new-password" + database_name = "tftest-new-database_name" + ssl_mode = "require" + extra_connection_attributes = "key=value;" + tags { + Name = "tf-test-dms-endpoint-%[1]s" + Update = "updated" + Add = "added" + } + mongodb_settings { + auth_mechanism = "SCRAM_SHA_1" + nesting_level = "ONE" + extract_doc_id = "true" + docs_to_investigate = "1001" + } +} +`, randId) +} diff --git a/website/docs/r/dms_endpoint.html.markdown b/website/docs/r/dms_endpoint.html.markdown index d43e9fcfeed..f679c37d259 100644 --- a/website/docs/r/dms_endpoint.html.markdown +++ b/website/docs/r/dms_endpoint.html.markdown @@ -53,7 +53,7 @@ The following arguments are supported: - Must not contain two consecutive hyphens * `endpoint_type` - (Required) The type of endpoint. Can be one of `source | target`. -* `engine_name` - (Required) The type of engine for the endpoint. Can be one of `mysql | oracle | postgres | mariadb | aurora | redshift | sybase | sqlserver | dynamodb`. +* `engine_name` - (Required) The type of engine for the endpoint. Can be one of `mysql | oracle | postgres | mariadb | aurora | redshift | sybase | sqlserver | dynamodb | mongodb`. * `extra_connection_attributes` - (Optional) Additional attributes associated with the connection. For available attributes see [Using Extra Connection Attributes with AWS Database Migration Service](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Introduction.ConnectionAttributes.html). * `kms_key_arn` - (Optional) The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kms_key_arn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region. * `password` - (Optional) The password to be used to login to the endpoint database. @@ -62,7 +62,8 @@ The following arguments are supported: * `ssl_mode` - (Optional, Default: none) The SSL mode to use for the connection. Can be one of `none | require | verify-ca | verify-full` * `tags` - (Optional) A mapping of tags to assign to the resource. * `username` - (Optional) The user name to be used to login to the endpoint database. -* `service_access_role` (Optional) The Amazon Resource Name (ARN) used by the service access IAM role for dynamodb endpoints. +* `service_access_role` - (Optional) The Amazon Resource Name (ARN) used by the service access IAM role for dynamodb endpoints. +* `mongodb_settings` - (Optional) Settings for the source MongoDB endpoint. Available settings are `auth_type` (default: `PASSWORD`), `auth_mechanism` (default: `DEFAULT`), `nesting_level` (default: `NONE`), `extract_doc_id` (default: `false`), `docs_to_investigate` (default: `1000`) and `auth_source` (default: `admin`). For more details, see [Using MongoDB as a Source for AWS DMS](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html). ## Attributes Reference From e0553b398e80d5fd06c4c161e989e49aeb408e54 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 2 May 2018 00:02:45 -0400 Subject: [PATCH 0935/3316] Always set load balancer access log bucket prefix. [Fixes #4361] --- aws/resource_aws_elb.go | 15 +++++---------- aws/resource_aws_lb.go | 14 ++++---------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_elb.go b/aws/resource_aws_elb.go index eb26f962633..9058cc79a98 100644 --- a/aws/resource_aws_elb.go +++ b/aws/resource_aws_elb.go @@ -584,17 +584,12 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error { logs := d.Get("access_logs").([]interface{}) if len(logs) == 1 { l := logs[0].(map[string]interface{}) - accessLog := &elb.AccessLog{ - Enabled: aws.Bool(l["enabled"].(bool)), - EmitInterval: aws.Int64(int64(l["interval"].(int))), - S3BucketName: aws.String(l["bucket"].(string)), - } - - if l["bucket_prefix"] != "" { - accessLog.S3BucketPrefix = aws.String(l["bucket_prefix"].(string)) + attrs.LoadBalancerAttributes.AccessLog = &elb.AccessLog{ + Enabled: aws.Bool(l["enabled"].(bool)), + EmitInterval: aws.Int64(int64(l["interval"].(int))), + S3BucketName: aws.String(l["bucket"].(string)), + S3BucketPrefix: aws.String(l["bucket_prefix"].(string)), } - - attrs.LoadBalancerAttributes.AccessLog = accessLog } else if len(logs) == 0 { // disable access logs attrs.LoadBalancerAttributes.AccessLog = &elb.AccessLog{ diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index ff022d89ba6..a25722efbf6 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -1,14 +1,13 @@ package aws import ( + "bytes" "fmt" "log" "regexp" "strconv" "time" - "bytes" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elbv2" @@ -139,13 +138,11 @@ func resourceAwsLb() *schema.Resource { "prefix": { Type: schema.TypeString, Optional: true, - Computed: true, DiffSuppressFunc: suppressIfLBType("network"), }, "enabled": { Type: schema.TypeBool, Optional: true, - Computed: true, DiffSuppressFunc: suppressIfLBType("network"), }, }, @@ -361,14 +358,11 @@ func resourceAwsLbUpdate(d *schema.ResourceData, meta interface{}) error { &elbv2.LoadBalancerAttribute{ Key: aws.String("access_logs.s3.bucket"), Value: aws.String(log["bucket"].(string)), - }) - - if prefix, ok := log["prefix"]; ok { - attributes = append(attributes, &elbv2.LoadBalancerAttribute{ + }, + &elbv2.LoadBalancerAttribute{ Key: aws.String("access_logs.s3.prefix"), - Value: aws.String(prefix.(string)), + Value: aws.String(log["prefix"].(string)), }) - } } else if len(logs) == 0 { attributes = append(attributes, &elbv2.LoadBalancerAttribute{ Key: aws.String("access_logs.s3.enabled"), From c2267c4d983fe9508cd134e7b55d94dffd63402e Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 2 May 2018 00:17:37 -0400 Subject: [PATCH 0936/3316] Add regression test for #4361. --- aws/resource_aws_lb_test.go | 46 +++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 8e72328ec75..80774a2710b 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -508,6 +508,7 @@ func TestAccAWSLB_accesslogs(t *testing.T) { var conf elbv2.LoadBalancer bucketName := fmt.Sprintf("testaccawslbaccesslogs-%s", acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum)) lbName := fmt.Sprintf("testaccawslbaccesslog-%s", acctest.RandStringFromCharSet(4, acctest.CharSetAlpha)) + bucketPrefix := "testAccAWSALBConfig_accessLogs" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -537,12 +538,12 @@ func TestAccAWSLB_accesslogs(t *testing.T) { ), }, { - Config: testAccAWSLBConfig_accessLogs(true, lbName, bucketName), + Config: testAccAWSLBConfig_accessLogs(true, lbName, bucketName, bucketPrefix), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &conf), testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.enabled", "true"), testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", bucketName), - testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", "testAccAWSALBConfig_accessLogs"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", bucketPrefix), resource.TestCheckResourceAttr("aws_lb.lb_test", "name", lbName), resource.TestCheckResourceAttr("aws_lb.lb_test", "internal", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "subnets.#", "2"), @@ -556,18 +557,43 @@ func TestAccAWSLB_accesslogs(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb.lb_test", "dns_name"), resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.#", "1"), resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.0.bucket", bucketName), - resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.0.prefix", "testAccAWSALBConfig_accessLogs"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.0.prefix", bucketPrefix), resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.0.enabled", "true"), resource.TestCheckResourceAttrSet("aws_lb.lb_test", "arn"), ), }, { - Config: testAccAWSLBConfig_accessLogs(false, lbName, bucketName), + Config: testAccAWSLBConfig_accessLogs(true, lbName, bucketName, ""), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBExists("aws_lb.lb_test", &conf), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.enabled", "true"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", bucketName), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", ""), + resource.TestCheckResourceAttr("aws_lb.lb_test", "name", lbName), + resource.TestCheckResourceAttr("aws_lb.lb_test", "internal", "true"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "subnets.#", "2"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "security_groups.#", "1"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "tags.Name", "TestAccAWSALB_basic1"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "enable_deletion_protection", "false"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "idle_timeout", "50"), + resource.TestCheckResourceAttrSet("aws_lb.lb_test", "vpc_id"), + resource.TestCheckResourceAttrSet("aws_lb.lb_test", "zone_id"), + resource.TestCheckResourceAttrSet("aws_lb.lb_test", "dns_name"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.#", "1"), + resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.0.bucket", bucketName), + resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.0.prefix", ""), + resource.TestCheckResourceAttr("aws_lb.lb_test", "access_logs.0.enabled", "true"), + resource.TestCheckResourceAttrSet("aws_lb.lb_test", "arn"), + ), + }, + { + Config: testAccAWSLBConfig_accessLogs(false, lbName, bucketName, ""), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBExists("aws_lb.lb_test", &conf), testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.enabled", "false"), testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.bucket", bucketName), - testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", "testAccAWSALBConfig_accessLogs"), + testAccCheckAWSLBAttribute("aws_lb.lb_test", "access_logs.s3.prefix", ""), resource.TestCheckResourceAttr("aws_lb.lb_test", "name", lbName), resource.TestCheckResourceAttr("aws_lb.lb_test", "internal", "true"), resource.TestCheckResourceAttr("aws_lb.lb_test", "subnets.#", "2"), @@ -1727,7 +1753,7 @@ resource "aws_security_group" "alb_test" { }`, lbName) } -func testAccAWSLBConfig_accessLogs(enabled bool, lbName, bucketName string) string { +func testAccAWSLBConfig_accessLogs(enabled bool, lbName, bucketName, bucketPrefix string) string { return fmt.Sprintf(`resource "aws_lb" "lb_test" { name = "%s" internal = true @@ -1739,7 +1765,7 @@ func testAccAWSLBConfig_accessLogs(enabled bool, lbName, bucketName string) stri access_logs { bucket = "${aws_s3_bucket.logs.bucket}" - prefix = "${var.bucket_prefix}" + prefix = "${var.bucket_prefix}" enabled = "%t" } @@ -1755,7 +1781,7 @@ variable "bucket_name" { variable "bucket_prefix" { type = "string" - default = "testAccAWSALBConfig_accessLogs" + default = "%s" } resource "aws_s3_bucket" "logs" { @@ -1779,7 +1805,7 @@ data "aws_iam_policy_document" "logs_bucket" { statement { actions = ["s3:PutObject"] effect = "Allow" - resources = ["arn:${data.aws_partition.current.partition}:s3:::${var.bucket_name}/${var.bucket_prefix}/AWSLogs/${data.aws_caller_identity.current.account_id}/*"] + resources = ["arn:${data.aws_partition.current.partition}:s3:::${var.bucket_name}/${var.bucket_prefix}${var.bucket_prefix == "" ? "" : "/"}AWSLogs/${data.aws_caller_identity.current.account_id}/*"] principals = { type = "AWS" @@ -1837,7 +1863,7 @@ resource "aws_security_group" "alb_test" { tags { Name = "TestAccAWSALB_basic" } -}`, lbName, enabled, bucketName) +}`, lbName, enabled, bucketName, bucketPrefix) } func testAccAWSLBConfig_nosg(lbName string) string { From f4c0abfcabe3105769e6c6426a9970ed81f7795c Mon Sep 17 00:00:00 2001 From: Rasmus Date: Wed, 2 May 2018 10:03:27 +0200 Subject: [PATCH 0937/3316] Change ECS service maximum grace time to 7200 seconds The ecs service grace time now supports a value up to 7200 seconds. --- aws/resource_aws_ecs_service.go | 4 ++-- aws/resource_aws_ecs_service_test.go | 6 +++--- website/docs/r/ecs_service.html.markdown | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 46d8abcca77..25106389e25 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -863,8 +863,8 @@ func parseTaskDefinition(taskDefinition string) (string, string, error) { func validateAwsEcsServiceHealthCheckGracePeriodSeconds(v interface{}, k string) (ws []string, errors []error) { value := v.(int) - if (value < 0) || (value > 1800) { - errors = append(errors, fmt.Errorf("%q must be between 0 and 1800", k)) + if (value < 0) || (value > 7200) { + errors = append(errors, fmt.Errorf("%q must be between 0 and 7200", k)) } return } diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index 32cda44a99d..f9bd6fb4d14 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -275,12 +275,12 @@ func TestAccAWSEcsService_healthCheckGracePeriodSeconds(t *testing.T) { { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, roleName, policyName, tgName, lbName, svcName, -1), - ExpectError: regexp.MustCompile(`must be between 0 and 1800`), + ExpectError: regexp.MustCompile(`must be between 0 and 7200`), }, { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, - roleName, policyName, tgName, lbName, svcName, 1801), - ExpectError: regexp.MustCompile(`must be between 0 and 1800`), + roleName, policyName, tgName, lbName, svcName, 7201), + ExpectError: regexp.MustCompile(`must be between 0 and 7200`), }, { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, diff --git a/website/docs/r/ecs_service.html.markdown b/website/docs/r/ecs_service.html.markdown index eae53a0099d..eb3bc3c41ef 100644 --- a/website/docs/r/ecs_service.html.markdown +++ b/website/docs/r/ecs_service.html.markdown @@ -75,7 +75,7 @@ The following arguments are supported: * `deployment_minimum_healthy_percent` - (Optional) The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. * `placement_strategy` - (Optional) **Deprecated**, use `ordered_placement_strategy` instead. * `ordered_placement_strategy` - (Optional) Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of `placement_strategy` blocks is `5`. Defined below. -* `health_check_grace_period_seconds` - (Optional) Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 1800. Only valid for services configured to use load balancers. +* `health_check_grace_period_seconds` - (Optional) Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers. * `load_balancer` - (Optional) A load balancer block. Load balancers documented below. * `placement_constraints` - (Optional) rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Defined below. From e028ab4fcbd62b9612b6c2eff65c369f493ac8f3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 2 May 2018 10:19:06 -0400 Subject: [PATCH 0938/3316] Update CHANGELOG for #4379 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e46b9a97c74..dc9e8bad5ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ ENHANCEMENTS: BUG FIXES: * data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] +* resource/aws_iam_group_policy: Properly handle generated policy name updates [GH-4379] * resource/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] * resource/aws_launch_template: Appropriately set `security_groups` in network interfaces [GH-4364] * resource/aws_rds_cluster: Add retries for IAM eventual consistency [GH-4371] From cbc11fcfd799b508a857f5bdea49cea0c8b037ed Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 2 May 2018 10:23:29 -0400 Subject: [PATCH 0939/3316] Update CHANGELOG for #4420 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc9e8bad5ff..406a1dabc91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ ENHANCEMENTS: * resource/aws_default_subnet: Allow `map_public_ip_on_launch` updates [GH-4396] * resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] * resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument [GH-4390] +* resource/aws_ecs_service: Allow `health_check_grace_period_seconds` up to 7200 seconds [GH-4420] * resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] * resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) [GH-2743] * resource/aws_rds_cluster: Add `s3_import` argument (Support MySQL Backup Restore from S3) [GH-4366] From e55a30ce858a3d8ee31bbd67fc8420fa3c69e68c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 2 May 2018 16:34:04 -0400 Subject: [PATCH 0940/3316] Deps: Bump aws-sdk-go@v1.13.40 --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 33 +- .../aws/aws-sdk-go/aws/endpoints/endpoints.go | 18 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../private/protocol/xml/xmlutil/unmarshal.go | 10 +- .../aws/aws-sdk-go/service/acm/api.go | 107 +- .../aws/aws-sdk-go/service/acm/doc.go | 2 +- .../aws/aws-sdk-go/service/codedeploy/api.go | 11 +- .../aws-sdk-go/service/codedeploy/errors.go | 6 + .../aws-sdk-go/service/codepipeline/api.go | 1466 ++++++++++- .../aws-sdk-go/service/codepipeline/doc.go | 41 +- .../aws-sdk-go/service/codepipeline/errors.go | 18 + .../aws/aws-sdk-go/service/devicefarm/api.go | 971 ++++++- .../aws-sdk-go/service/devicefarm/errors.go | 7 + .../aws/aws-sdk-go/service/dynamodb/api.go | 856 +++++- .../aws/aws-sdk-go/service/dynamodb/errors.go | 6 + .../aws/aws-sdk-go/service/ec2/api.go | 2320 ++++++++++++++++- .../service/elasticbeanstalk/api.go | 20 +- .../aws/aws-sdk-go/service/firehose/api.go | 994 +++++-- .../aws/aws-sdk-go/service/firehose/doc.go | 4 +- .../aws/aws-sdk-go/service/firehose/errors.go | 4 +- .../aws/aws-sdk-go/service/glacier/api.go | 2 +- .../aws/aws-sdk-go/service/guardduty/api.go | 117 +- .../aws/aws-sdk-go/service/iot/api.go | 104 +- .../aws/aws-sdk-go/service/iot/doc.go | 6 +- .../aws/aws-sdk-go/service/medialive/api.go | 264 +- .../aws/aws-sdk-go/service/rds/api.go | 13 + .../aws/aws-sdk-go/service/sagemaker/api.go | 115 + .../aws-sdk-go/service/secretsmanager/api.go | 262 +- .../aws-sdk-go/service/secretsmanager/doc.go | 63 +- .../service/secretsmanager/errors.go | 8 +- .../aws/aws-sdk-go/service/ssm/api.go | 1001 ++++++- .../aws/aws-sdk-go/service/ssm/errors.go | 27 + .../aws/aws-sdk-go/service/workspaces/api.go | 1683 +++++++++++- .../aws-sdk-go/service/workspaces/errors.go | 26 +- vendor/vendor.json | 952 +++---- 35 files changed, 10171 insertions(+), 1368 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index cef59d5cf76..55eff20774f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -295,7 +295,15 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ - "us-east-1": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "api.pricing": service{ @@ -646,6 +654,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{}, @@ -815,6 +824,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1231,6 +1241,8 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -1559,6 +1571,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "monitoring": service{ @@ -1770,6 +1783,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "runtime.sagemaker": service{ @@ -1987,6 +2001,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -2749,6 +2764,16 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "cloudhsmv2": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "cloudhsm", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "cloudtrail": service{ Endpoints: endpoints{ @@ -2997,6 +3022,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "storagegateway": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "streams.dynamodb": service{ Defaults: endpoint{ CredentialScope: credentialScope{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index d6be83c1921..e29c095121d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -206,10 +206,11 @@ func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) ( // enumerating over the regions in a partition. func (p Partition) Regions() map[string]Region { rs := map[string]Region{} - for id := range p.p.Regions { + for id, r := range p.p.Regions { rs[id] = Region{ - id: id, - p: p.p, + id: id, + desc: r.Description, + p: p.p, } } @@ -240,6 +241,10 @@ type Region struct { // ID returns the region's identifier. func (r Region) ID() string { return r.id } +// Description returns the region's description. The region description +// is free text, it can be empty, and it may change between SDK releases. +func (r Region) Description() string { return r.desc } + // ResolveEndpoint resolves an endpoint from the context of the region given // a service. See Partition.EndpointFor for usage and errors that can be returned. func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) { @@ -284,10 +289,11 @@ func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (Resolve func (s Service) Regions() map[string]Region { rs := map[string]Region{} for id := range s.p.Services[s.id].Endpoints { - if _, ok := s.p.Regions[id]; ok { + if r, ok := s.p.Regions[id]; ok { rs[id] = Region{ - id: id, - p: s.p, + id: id, + desc: r.Description, + p: s.p, } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 680a5b2ac26..9928c7999f6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.32" +const SDKVersion = "1.13.40" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go index 87584628a2b..a6c25ba3772 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go @@ -52,9 +52,15 @@ func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { if t == "" { switch rtype.Kind() { case reflect.Struct: - t = "structure" + // also it can't be a time object + if _, ok := r.Interface().(*time.Time); !ok { + t = "structure" + } case reflect.Slice: - t = "list" + // also it can't be a byte slice + if _, ok := r.Interface().([]byte); !ok { + t = "list" + } case reflect.Map: t = "map" } diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go index 71e24031620..ebd39034574 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go @@ -71,7 +71,7 @@ func (c *ACM) AddTagsToCertificateRequest(input *AddTagsToCertificateInput) (req // if you want to specify a relationship among those resources. For example, // you can add the same tag to an ACM certificate and an Elastic Load Balancing // load balancer to indicate that they are both used by the same website. For -// more information, see Tagging ACM certificates (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/tags.html). +// more information, see Tagging ACM certificates (http://docs.aws.amazon.com/acm/latest/userguide/tags.html). // // To remove one or more tags, use the RemoveTagsFromCertificate action. To // view all of the tags that have been applied to the certificate, use the ListTagsForCertificate @@ -345,12 +345,13 @@ func (c *ACM) ExportCertificateRequest(input *ExportCertificateInput) (req *requ // ExportCertificate API operation for AWS Certificate Manager. // -// Exports a certificate for use anywhere. You can export the certificate, the -// certificate chain, and the encrypted private key associated with the public -// key embedded in the certificate. You must store the private key securely. -// The private key is a 2048 bit RSA key. You must provide a passphrase for -// the private key when exporting it. You can use the following OpenSSL command -// to decrypt it later. Provide the passphrase when prompted. +// Exports a private certificate issued by a private certificate authority (CA) +// for use anywhere. You can export the certificate, the certificate chain, +// and the encrypted private key associated with the public key embedded in +// the certificate. You must store the private key securely. The private key +// is a 2048 bit RSA key. You must provide a passphrase for the private key +// when exporting it. You can use the following OpenSSL command to decrypt it +// later. Provide the passphrase when prompted. // // openssl rsa -in encrypted_key.pem -out decrypted_key.pem // @@ -532,15 +533,15 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // ImportCertificate API operation for AWS Certificate Manager. // // Imports a certificate into AWS Certificate Manager (ACM) to use with services -// that are integrated with ACM. Note that integrated services (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-services.html) +// that are integrated with ACM. Note that integrated services (http://docs.aws.amazon.com/acm/latest/userguide/acm-services.html) // allow only certificate types and keys they support to be associated with // their resources. Further, their support differs depending on whether the // certificate is imported into IAM or into ACM. For more information, see the // documentation for each service. For more information about importing certificates -// into ACM, see Importing Certificates (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/import-certificate.html) +// into ACM, see Importing Certificates (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) // in the AWS Certificate Manager User Guide. // -// ACM does not provide managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) +// ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for certificates that you import. // // Note the following guidelines when importing third party certificates: @@ -569,13 +570,17 @@ func (c *ACM) ImportCertificateRequest(input *ImportCertificateInput) (req *requ // * To import a new certificate, omit the CertificateArn argument. Include // this argument only when you want to replace a previously imported certificate. // -// * When you import a certificate by using the CLI or one of the SDKs, you -// must specify the certificate, the certificate chain, and the private key -// by their file names preceded by file://. For example, you can specify -// a certificate saved in the C:\temp folder as file://C:\temp\certificate_to_import.pem. +// * When you import a certificate by using the CLI, you must specify the +// certificate, the certificate chain, and the private key by their file +// names preceded by file://. For example, you can specify a certificate +// saved in the C:\temp folder as file://C:\temp\certificate_to_import.pem. // If you are making an HTTP or HTTPS Query request, include these arguments // as BLOBs. // +// * When you import a certificate by using an SDK, you must specify the +// certificate, the certificate chain, and the private key files in the manner +// required by the programming language you're using. +// // This operation returns the Amazon Resource Name (ARN) (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of the imported certificate. // @@ -975,22 +980,17 @@ func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *re // RequestCertificate API operation for AWS Certificate Manager. // // Requests an ACM certificate for use with other AWS services. To request an -// ACM certificate, you must specify the fully qualified domain name (FQDN) -// for your site in the DomainName parameter. You can also specify additional -// FQDNs in the SubjectAlternativeNames parameter. -// -// Each domain name that you specify must be validated to verify that you own -// or control the domain. You can use DNS validation (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html) -// or email validation (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). -// We recommend that you use DNS validation. -// -// If you choose email validation, email is sent to the domain owner to request -// approval to issue the certificate. Email is sent to three registered contact -// addresses in the WHOIS database and to five common system administration -// addresses formed from the DomainName you enter or the optional ValidationDomain -// parameter. For more information, see Validate with Email (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). -// -// After receiving approval from the domain owner, the ACM certificate is issued. +// ACM certificate, you must specify a fully qualified domain name (FQDN) in +// the DomainName parameter. You can also specify additional FQDNs in the SubjectAlternativeNames +// parameter. +// +// If you are requesting a private certificate, domain validation is not required. +// If you are requesting a public certificate, each domain name that you specify +// must be validated to verify that you own or control the domain. You can use +// DNS validation (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) +// or email validation (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html). +// We recommend that you use DNS validation. ACM issues public certificates +// after receiving approval from the domain owner. // // 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 @@ -1087,7 +1087,7 @@ func (c *ACM) ResendValidationEmailRequest(input *ResendValidationEmailInput) (r // more than 72 hours have elapsed since your original request or since your // last attempt to resend validation mail, you must request a new certificate. // For more information about setting up your contact email addresses, see Configure -// Email for your Domain (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/setup-email.html). +// Email for your Domain (http://docs.aws.amazon.com/acm/latest/userguide/setup-email.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1181,7 +1181,7 @@ func (c *ACM) UpdateCertificateOptionsRequest(input *UpdateCertificateOptionsInp // Updates a certificate. Currently, you can use this function to specify whether // to opt in to or out of recording your certificate in a certificate transparency // log. For more information, see Opting Out of Certificate Transparency Logging -// (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-bestpractices.html#best-practices-transparency). +// (http://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). // // 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 @@ -1350,7 +1350,7 @@ type CertificateDetail struct { // The reason the certificate request failed. This value exists only when the // certificate status is FAILED. For more information, see Certificate Request - // Failed (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/troubleshooting.html#troubleshooting-failed) + // Failed (http://docs.aws.amazon.com/acm/latest/userguide/troubleshooting.html#troubleshooting-failed) // in the AWS Certificate Manager User Guide. FailureReason *string `type:"string" enum:"FailureReason"` @@ -1394,7 +1394,7 @@ type CertificateDetail struct { // Specifies whether the certificate is eligible for renewal. RenewalEligibility *string `type:"string" enum:"RenewalEligibility"` - // Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) + // Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for the certificate. This field exists only when the certificate type is // AMAZON_ISSUED. RenewalSummary *RenewalSummary `type:"structure"` @@ -1429,10 +1429,10 @@ type CertificateDetail struct { // The source of the certificate. For certificates provided by ACM, this value // is AMAZON_ISSUED. For certificates that you imported with ImportCertificate, - // this value is IMPORTED. ACM does not provide managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) + // this value is IMPORTED. ACM does not provide managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for imported certificates. For more information about the differences between // certificates that you import and those that ACM provides, see Importing Certificates - // (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/import-certificate.html) + // (http://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) // in the AWS Certificate Manager User Guide. Type *string `type:"string" enum:"CertificateType"` } @@ -1609,7 +1609,7 @@ func (s *CertificateDetail) SetType(v string) *CertificateDetail { // be recorded in a log. Certificates that are not logged typically generate // a browser error. Transparency makes it possible for you to detect SSL/TLS // certificates that have been mistakenly or maliciously issued for your domain. -// For general information, see Certificate Transparency Logging (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-concepts.html#concept-transparency). +// For general information, see Certificate Transparency Logging (http://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-transparency). type CertificateOptions struct { _ struct{} `type:"structure"` @@ -1815,7 +1815,7 @@ type DomainValidation struct { DomainName *string `min:"1" type:"string" required:"true"` // Contains the CNAME record that you add to your DNS database for domain validation. - // For more information, see Use DNS to Validate Domain Ownership (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html). + // For more information, see Use DNS to Validate Domain Ownership (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html). ResourceRecord *ResourceRecord `type:"structure"` // The domain name that ACM used to send domain validation emails. @@ -2647,14 +2647,14 @@ func (s RemoveTagsFromCertificateOutput) GoString() string { return s.String() } -// Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) +// Contains information about the status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // for the certificate. This structure exists only when the certificate type // is AMAZON_ISSUED. type RenewalSummary struct { _ struct{} `type:"structure"` // Contains information about the validation of each domain name in the certificate, - // as it pertains to ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html). + // as it pertains to ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html). // This is different from the initial validation that occurs as a result of // the RequestCertificate request. This field exists only when the certificate // type is AMAZON_ISSUED. @@ -2662,7 +2662,7 @@ type RenewalSummary struct { // DomainValidationOptions is a required field DomainValidationOptions []*DomainValidation `min:"1" type:"list" required:"true"` - // The status of ACM's managed renewal (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-renewal.html) + // The status of ACM's managed renewal (http://docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html) // of the certificate. // // RenewalStatus is a required field @@ -2695,18 +2695,19 @@ type RequestCertificateInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the private certificate authority (CA) - // that will be used to issue the certificate. For more information about private - // CAs, see the AWS Certificate Manager Private Certificate Authority (PCA) - // (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm-pca/latest/userguide/PcaWelcome.html) + // that will be used to issue the certificate. If you do not provide an ARN + // and you are trying to request a private certificate, ACM will attempt to + // issue a public certificate. For more information about private CAs, see the + // AWS Certificate Manager Private Certificate Authority (PCA) (http://docs.aws.amazon.com/acm-pca/latest/userguide/PcaWelcome.html) // user guide. The ARN must have the following form: // // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 CertificateAuthorityArn *string `min:"20" type:"string"` - // Fully qualified domain name (FQDN), such as www.example.com, of the site - // that you want to secure with an ACM Certificate. Use an asterisk (*) to create - // a wildcard certificate that protects several sites in the same domain. For - // example, *.example.com protects www.example.com, site.example.com, and images.example.com. + // Fully qualified domain name (FQDN), such as www.example.com, that you want + // to secure with an ACM certificate. Use an asterisk (*) to create a wildcard + // certificate that protects several sites in the same domain. For example, + // *.example.com protects www.example.com, site.example.com, and images.example.com. // // The first domain name you enter cannot exceed 63 octets, including periods. // Each subsequent Subject Alternative Name (SAN), however, can be up to 253 @@ -2732,7 +2733,7 @@ type RequestCertificateInput struct { // to detect SSL/TLS certificates that have been mistakenly or maliciously issued. // Certificates that have not been logged typically produce an error message // in a browser. For more information, see Opting Out of Certificate Transparency - // Logging (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-bestpractices.html#best-practices-transparency). + // Logging (http://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency). Options *CertificateOptions `type:"structure"` // Additional FQDNs to be included in the Subject Alternative Name extension @@ -2741,7 +2742,7 @@ type RequestCertificateInput struct { // site by using either name. The maximum number of domain names that you can // add to an ACM certificate is 100. However, the initial limit is 10 domain // names. If you need more than 10 names, you must request a limit increase. - // For more information, see Limits (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/acm-limits.html). + // For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). // // The maximum length of a SAN DNS name is 253 octets. The name is made up of // multiple labels separated by periods. No label can be longer than 63 octets. @@ -2759,9 +2760,9 @@ type RequestCertificateInput struct { // the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets. SubjectAlternativeNames []*string `min:"1" type:"list"` - // The method you want to use to validate that you own or control domain. You - // can validate with DNS (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-dns.html) - // or validate with email (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/gs-acm-validate-email.html). + // The method you want to use if you are requesting a public certificate to + // validate that you own or control domain. You can validate with DNS (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) + // or validate with email (http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html). // We recommend that you use DNS validation. ValidationMethod *string `type:"string" enum:"ValidationMethod"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go index a8e67c4240d..8a183a969ee 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/doc.go @@ -7,7 +7,7 @@ // // You can use ACM to manage SSL/TLS certificates for your AWS-based websites // and applications. For general information about using ACM, see the AWS Certificate -// Manager User Guide (http://docs.aws.amazon.com/http:/docs.aws.amazon.comacm/latest/userguide/). +// Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/). // // See https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index efec20fcffa..d5169b08161 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -986,6 +986,9 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The IgnoreApplicationStopFailures value is invalid. For AWS Lambda deployments, // false is expected. For EC2/On-premises deployments, true or false is expected. // +// * ErrCodeInvalidGitHubAccountTokenException "InvalidGitHubAccountTokenException" +// The GitHub token is not valid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeployment func (c *CodeDeploy) CreateDeployment(input *CreateDeploymentInput) (*CreateDeploymentOutput, error) { req, out := c.CreateDeploymentRequest(input) @@ -6678,10 +6681,10 @@ type DeploymentReadyOption struct { // after the new application revision is installed on the instances in the // replacement environment. // - // * STOP_DEPLOYMENT: Do not register new instances with load balancer unless - // traffic is rerouted manually. If traffic is not rerouted manually before - // the end of the specified wait period, the deployment status is changed - // to Stopped. + // * STOP_DEPLOYMENT: Do not register new instances with a load balancer + // unless traffic rerouting is started using ContinueDeployment. If traffic + // rerouting is not started before the end of the specified wait period, + // the deployment status is changed to Stopped. ActionOnTimeout *string `locationName:"actionOnTimeout" type:"string" enum:"DeploymentReadyAction"` // The number of minutes to wait before the status of a blue/green deployment diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go index 963a57a533f..c3af4b0ddb8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go @@ -345,6 +345,12 @@ const ( // "DISALLOW", "OVERWRITE", and "RETAIN". ErrCodeInvalidFileExistsBehaviorException = "InvalidFileExistsBehaviorException" + // ErrCodeInvalidGitHubAccountTokenException for service response error code + // "InvalidGitHubAccountTokenException". + // + // The GitHub token is not valid. + ErrCodeInvalidGitHubAccountTokenException = "InvalidGitHubAccountTokenException" + // ErrCodeInvalidGitHubAccountTokenNameException for service response error code // "InvalidGitHubAccountTokenNameException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index 9e895f1e144..d308cfb9460 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -419,8 +419,11 @@ func (c *CodePipeline) DeleteCustomActionTypeRequest(input *DeleteCustomActionTy // Marks a custom action as deleted. PollForJobs for the custom action will // fail after the action is marked for deletion. Only used for custom actions. // -// You cannot recreate a custom action after it has been deleted unless you -// increase the version number of the action. +// To re-create a custom action after it has been deleted you must use a string +// in the version field that has never been used before. This string can be +// an incremented version number, for example. To restore a deleted custom action, +// use a JSON file that is identical to the deleted action, including the original +// string in the version field. // // 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 @@ -536,6 +539,173 @@ func (c *CodePipeline) DeletePipelineWithContext(ctx aws.Context, input *DeleteP return out, req.Send() } +const opDeleteWebhook = "DeleteWebhook" + +// DeleteWebhookRequest generates a "aws/request.Request" representing the +// client's request for the DeleteWebhook operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteWebhook for more information on using the DeleteWebhook +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteWebhookRequest method. +// req, resp := client.DeleteWebhookRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteWebhook +func (c *CodePipeline) DeleteWebhookRequest(input *DeleteWebhookInput) (req *request.Request, output *DeleteWebhookOutput) { + op := &request.Operation{ + Name: opDeleteWebhook, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteWebhookInput{} + } + + output = &DeleteWebhookOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteWebhook API operation for AWS CodePipeline. +// +// Deletes a previously created webhook by name. Deleting the webhook stops +// AWS CodePipeline from starting a pipeline every time an external event occurs. +// The API will return successfully when trying to delete a webhook that is +// already deleted. If a deleted webhook is re-created by calling PutWebhook +// with the same name, it will have a different URL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodePipeline's +// API operation DeleteWebhook for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeleteWebhook +func (c *CodePipeline) DeleteWebhook(input *DeleteWebhookInput) (*DeleteWebhookOutput, error) { + req, out := c.DeleteWebhookRequest(input) + return out, req.Send() +} + +// DeleteWebhookWithContext is the same as DeleteWebhook with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteWebhook for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodePipeline) DeleteWebhookWithContext(ctx aws.Context, input *DeleteWebhookInput, opts ...request.Option) (*DeleteWebhookOutput, error) { + req, out := c.DeleteWebhookRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeregisterWebhookWithThirdParty = "DeregisterWebhookWithThirdParty" + +// DeregisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterWebhookWithThirdParty operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeregisterWebhookWithThirdParty for more information on using the DeregisterWebhookWithThirdParty +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeregisterWebhookWithThirdPartyRequest method. +// req, resp := client.DeregisterWebhookWithThirdPartyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeregisterWebhookWithThirdParty +func (c *CodePipeline) DeregisterWebhookWithThirdPartyRequest(input *DeregisterWebhookWithThirdPartyInput) (req *request.Request, output *DeregisterWebhookWithThirdPartyOutput) { + op := &request.Operation{ + Name: opDeregisterWebhookWithThirdParty, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeregisterWebhookWithThirdPartyInput{} + } + + output = &DeregisterWebhookWithThirdPartyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeregisterWebhookWithThirdParty API operation for AWS CodePipeline. +// +// Removes the connection between the webhook that was created by CodePipeline +// and the external tool with events to be detected. Currently only supported +// for webhooks that target an action type of GitHub. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodePipeline's +// API operation DeregisterWebhookWithThirdParty for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodeWebhookNotFoundException "WebhookNotFoundException" +// The specified webhook was entered in an invalid format or cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/DeregisterWebhookWithThirdParty +func (c *CodePipeline) DeregisterWebhookWithThirdParty(input *DeregisterWebhookWithThirdPartyInput) (*DeregisterWebhookWithThirdPartyOutput, error) { + req, out := c.DeregisterWebhookWithThirdPartyRequest(input) + return out, req.Send() +} + +// DeregisterWebhookWithThirdPartyWithContext is the same as DeregisterWebhookWithThirdParty with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterWebhookWithThirdParty for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodePipeline) DeregisterWebhookWithThirdPartyWithContext(ctx aws.Context, input *DeregisterWebhookWithThirdPartyInput, opts ...request.Option) (*DeregisterWebhookWithThirdPartyOutput, error) { + req, out := c.DeregisterWebhookWithThirdPartyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisableStageTransition = "DisableStageTransition" // DisableStageTransitionRequest generates a "aws/request.Request" representing the @@ -1375,6 +1545,9 @@ func (c *CodePipeline) ListPipelinesRequest(input *ListPipelinesInput) (req *req // API operation ListPipelines for usage and error information. // // Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" // The next token was specified in an invalid format. Make sure that the next // token you provided is the token returned by a previous call. @@ -1401,6 +1574,91 @@ func (c *CodePipeline) ListPipelinesWithContext(ctx aws.Context, input *ListPipe return out, req.Send() } +const opListWebhooks = "ListWebhooks" + +// ListWebhooksRequest generates a "aws/request.Request" representing the +// client's request for the ListWebhooks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListWebhooks for more information on using the ListWebhooks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListWebhooksRequest method. +// req, resp := client.ListWebhooksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListWebhooks +func (c *CodePipeline) ListWebhooksRequest(input *ListWebhooksInput) (req *request.Request, output *ListWebhooksOutput) { + op := &request.Operation{ + Name: opListWebhooks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListWebhooksInput{} + } + + output = &ListWebhooksOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListWebhooks API operation for AWS CodePipeline. +// +// Gets a listing of all the webhooks in this region for this account. The output +// lists all webhooks and includes the webhook URL and ARN, as well the configuration +// for each webhook. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodePipeline's +// API operation ListWebhooks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The next token was specified in an invalid format. Make sure that the next +// token you provided is the token returned by a previous call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/ListWebhooks +func (c *CodePipeline) ListWebhooks(input *ListWebhooksInput) (*ListWebhooksOutput, error) { + req, out := c.ListWebhooksRequest(input) + return out, req.Send() +} + +// ListWebhooksWithContext is the same as ListWebhooks with the addition of +// the ability to pass a context and additional request options. +// +// See ListWebhooks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodePipeline) ListWebhooksWithContext(ctx aws.Context, input *ListWebhooksInput, opts ...request.Option) (*ListWebhooksOutput, error) { + req, out := c.ListWebhooksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPollForJobs = "PollForJobs" // PollForJobsRequest generates a "aws/request.Request" representing the @@ -1445,7 +1703,10 @@ func (c *CodePipeline) PollForJobsRequest(input *PollForJobsInput) (req *request // PollForJobs API operation for AWS CodePipeline. // -// Returns information about any jobs for AWS CodePipeline to act upon. +// Returns information about any jobs for AWS CodePipeline to act upon. PollForJobs +// is only valid for action types with "Custom" in the owner field. If the action +// type contains "AWS" or "ThirdParty" in the owner field, the PollForJobs action +// returns an error. // // When this API is called, AWS CodePipeline returns temporary credentials for // the Amazon S3 bucket used to store artifacts for the pipeline, if the action @@ -2116,203 +2377,385 @@ func (c *CodePipeline) PutThirdPartyJobSuccessResultWithContext(ctx aws.Context, return out, req.Send() } -const opRetryStageExecution = "RetryStageExecution" +const opPutWebhook = "PutWebhook" -// RetryStageExecutionRequest generates a "aws/request.Request" representing the -// client's request for the RetryStageExecution operation. The "output" return +// PutWebhookRequest generates a "aws/request.Request" representing the +// client's request for the PutWebhook operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RetryStageExecution for more information on using the RetryStageExecution +// See PutWebhook for more information on using the PutWebhook // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RetryStageExecutionRequest method. -// req, resp := client.RetryStageExecutionRequest(params) +// // Example sending a request using the PutWebhookRequest method. +// req, resp := client.PutWebhookRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecution -func (c *CodePipeline) RetryStageExecutionRequest(input *RetryStageExecutionInput) (req *request.Request, output *RetryStageExecutionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutWebhook +func (c *CodePipeline) PutWebhookRequest(input *PutWebhookInput) (req *request.Request, output *PutWebhookOutput) { op := &request.Operation{ - Name: opRetryStageExecution, + Name: opPutWebhook, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RetryStageExecutionInput{} + input = &PutWebhookInput{} } - output = &RetryStageExecutionOutput{} + output = &PutWebhookOutput{} req = c.newRequest(op, input, output) return } -// RetryStageExecution API operation for AWS CodePipeline. +// PutWebhook API operation for AWS CodePipeline. // -// Resumes the pipeline execution by retrying the last failed actions in a stage. +// Defines a webhook and returns a unique webhook URL generated by CodePipeline. +// This URL can be supplied to third party source hosting providers to call +// every time there's a code change. When CodePipeline receives a POST request +// on this URL, the pipeline defined in the webhook is started as long as the +// POST request satisfied the authentication and filtering requirements supplied +// when defining the webhook. RegisterWebhookWithThirdParty and DeregisterWebhookWithThirdParty +// APIs can be used to automatically configure supported third parties to call +// the generated webhook URL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS CodePipeline's -// API operation RetryStageExecution for usage and error information. +// API operation PutWebhook for usage and error information. // // Returned Error Codes: // * ErrCodeValidationException "ValidationException" // The validation was specified in an invalid format. // -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. +// * ErrCodeLimitExceededException "LimitExceededException" +// The number of pipelines associated with the AWS account has exceeded the +// limit allowed for the account. // -// * ErrCodeStageNotFoundException "StageNotFoundException" -// The specified stage was specified in an invalid format or cannot be found. +// * ErrCodeInvalidWebhookFilterPatternException "InvalidWebhookFilterPatternException" +// The specified event filter rule is in an invalid format. // -// * ErrCodeStageNotRetryableException "StageNotRetryableException" -// The specified stage can't be retried because the pipeline structure or stage -// state changed after the stage was not completed; the stage contains no failed -// actions; one or more actions are still in progress; or another retry attempt -// is already in progress. +// * ErrCodeInvalidWebhookAuthenticationParametersException "InvalidWebhookAuthenticationParametersException" +// The specified authentication type is in an invalid format. // -// * ErrCodeNotLatestPipelineExecutionException "NotLatestPipelineExecutionException" -// The stage has failed in a later run of the pipeline and the pipelineExecutionId -// associated with the request is out of date. +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was specified in an invalid format or cannot be found. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecution -func (c *CodePipeline) RetryStageExecution(input *RetryStageExecutionInput) (*RetryStageExecutionOutput, error) { - req, out := c.RetryStageExecutionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/PutWebhook +func (c *CodePipeline) PutWebhook(input *PutWebhookInput) (*PutWebhookOutput, error) { + req, out := c.PutWebhookRequest(input) return out, req.Send() } -// RetryStageExecutionWithContext is the same as RetryStageExecution with the addition of +// PutWebhookWithContext is the same as PutWebhook with the addition of // the ability to pass a context and additional request options. // -// See RetryStageExecution for details on how to use this API operation. +// See PutWebhook for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CodePipeline) RetryStageExecutionWithContext(ctx aws.Context, input *RetryStageExecutionInput, opts ...request.Option) (*RetryStageExecutionOutput, error) { - req, out := c.RetryStageExecutionRequest(input) +func (c *CodePipeline) PutWebhookWithContext(ctx aws.Context, input *PutWebhookInput, opts ...request.Option) (*PutWebhookOutput, error) { + req, out := c.PutWebhookRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStartPipelineExecution = "StartPipelineExecution" +const opRegisterWebhookWithThirdParty = "RegisterWebhookWithThirdParty" -// StartPipelineExecutionRequest generates a "aws/request.Request" representing the -// client's request for the StartPipelineExecution operation. The "output" return +// RegisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the +// client's request for the RegisterWebhookWithThirdParty operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartPipelineExecution for more information on using the StartPipelineExecution +// See RegisterWebhookWithThirdParty for more information on using the RegisterWebhookWithThirdParty // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StartPipelineExecutionRequest method. -// req, resp := client.StartPipelineExecutionRequest(params) +// // Example sending a request using the RegisterWebhookWithThirdPartyRequest method. +// req, resp := client.RegisterWebhookWithThirdPartyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecution -func (c *CodePipeline) StartPipelineExecutionRequest(input *StartPipelineExecutionInput) (req *request.Request, output *StartPipelineExecutionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RegisterWebhookWithThirdParty +func (c *CodePipeline) RegisterWebhookWithThirdPartyRequest(input *RegisterWebhookWithThirdPartyInput) (req *request.Request, output *RegisterWebhookWithThirdPartyOutput) { op := &request.Operation{ - Name: opStartPipelineExecution, + Name: opRegisterWebhookWithThirdParty, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartPipelineExecutionInput{} + input = &RegisterWebhookWithThirdPartyInput{} } - output = &StartPipelineExecutionOutput{} + output = &RegisterWebhookWithThirdPartyOutput{} req = c.newRequest(op, input, output) return } -// StartPipelineExecution API operation for AWS CodePipeline. +// RegisterWebhookWithThirdParty API operation for AWS CodePipeline. // -// Starts the specified pipeline. Specifically, it begins processing the latest -// commit to the source location specified as part of the pipeline. +// Configures a connection between the webhook that was created and the external +// tool with events to be detected. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS CodePipeline's -// API operation StartPipelineExecution for usage and error information. +// API operation RegisterWebhookWithThirdParty for usage and error information. // // Returned Error Codes: // * ErrCodeValidationException "ValidationException" // The validation was specified in an invalid format. // -// * ErrCodePipelineNotFoundException "PipelineNotFoundException" -// The specified pipeline was specified in an invalid format or cannot be found. +// * ErrCodeWebhookNotFoundException "WebhookNotFoundException" +// The specified webhook was entered in an invalid format or cannot be found. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecution -func (c *CodePipeline) StartPipelineExecution(input *StartPipelineExecutionInput) (*StartPipelineExecutionOutput, error) { - req, out := c.StartPipelineExecutionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RegisterWebhookWithThirdParty +func (c *CodePipeline) RegisterWebhookWithThirdParty(input *RegisterWebhookWithThirdPartyInput) (*RegisterWebhookWithThirdPartyOutput, error) { + req, out := c.RegisterWebhookWithThirdPartyRequest(input) return out, req.Send() } -// StartPipelineExecutionWithContext is the same as StartPipelineExecution with the addition of +// RegisterWebhookWithThirdPartyWithContext is the same as RegisterWebhookWithThirdParty with the addition of // the ability to pass a context and additional request options. // -// See StartPipelineExecution for details on how to use this API operation. +// See RegisterWebhookWithThirdParty for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CodePipeline) StartPipelineExecutionWithContext(ctx aws.Context, input *StartPipelineExecutionInput, opts ...request.Option) (*StartPipelineExecutionOutput, error) { - req, out := c.StartPipelineExecutionRequest(input) +func (c *CodePipeline) RegisterWebhookWithThirdPartyWithContext(ctx aws.Context, input *RegisterWebhookWithThirdPartyInput, opts ...request.Option) (*RegisterWebhookWithThirdPartyOutput, error) { + req, out := c.RegisterWebhookWithThirdPartyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdatePipeline = "UpdatePipeline" +const opRetryStageExecution = "RetryStageExecution" -// UpdatePipelineRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePipeline operation. The "output" return +// RetryStageExecutionRequest generates a "aws/request.Request" representing the +// client's request for the RetryStageExecution operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdatePipeline for more information on using the UpdatePipeline +// See RetryStageExecution for more information on using the RetryStageExecution // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdatePipelineRequest method. -// req, resp := client.UpdatePipelineRequest(params) +// // Example sending a request using the RetryStageExecutionRequest method. +// req, resp := client.RetryStageExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecution +func (c *CodePipeline) RetryStageExecutionRequest(input *RetryStageExecutionInput) (req *request.Request, output *RetryStageExecutionOutput) { + op := &request.Operation{ + Name: opRetryStageExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RetryStageExecutionInput{} + } + + output = &RetryStageExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// RetryStageExecution API operation for AWS CodePipeline. +// +// Resumes the pipeline execution by retrying the last failed actions in a stage. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodePipeline's +// API operation RetryStageExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was specified in an invalid format or cannot be found. +// +// * ErrCodeStageNotFoundException "StageNotFoundException" +// The specified stage was specified in an invalid format or cannot be found. +// +// * ErrCodeStageNotRetryableException "StageNotRetryableException" +// The specified stage can't be retried because the pipeline structure or stage +// state changed after the stage was not completed; the stage contains no failed +// actions; one or more actions are still in progress; or another retry attempt +// is already in progress. +// +// * ErrCodeNotLatestPipelineExecutionException "NotLatestPipelineExecutionException" +// The stage has failed in a later run of the pipeline and the pipelineExecutionId +// associated with the request is out of date. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/RetryStageExecution +func (c *CodePipeline) RetryStageExecution(input *RetryStageExecutionInput) (*RetryStageExecutionOutput, error) { + req, out := c.RetryStageExecutionRequest(input) + return out, req.Send() +} + +// RetryStageExecutionWithContext is the same as RetryStageExecution with the addition of +// the ability to pass a context and additional request options. +// +// See RetryStageExecution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodePipeline) RetryStageExecutionWithContext(ctx aws.Context, input *RetryStageExecutionInput, opts ...request.Option) (*RetryStageExecutionOutput, error) { + req, out := c.RetryStageExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartPipelineExecution = "StartPipelineExecution" + +// StartPipelineExecutionRequest generates a "aws/request.Request" representing the +// client's request for the StartPipelineExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartPipelineExecution for more information on using the StartPipelineExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartPipelineExecutionRequest method. +// req, resp := client.StartPipelineExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecution +func (c *CodePipeline) StartPipelineExecutionRequest(input *StartPipelineExecutionInput) (req *request.Request, output *StartPipelineExecutionOutput) { + op := &request.Operation{ + Name: opStartPipelineExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartPipelineExecutionInput{} + } + + output = &StartPipelineExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartPipelineExecution API operation for AWS CodePipeline. +// +// Starts the specified pipeline. Specifically, it begins processing the latest +// commit to the source location specified as part of the pipeline. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodePipeline's +// API operation StartPipelineExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The validation was specified in an invalid format. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was specified in an invalid format or cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StartPipelineExecution +func (c *CodePipeline) StartPipelineExecution(input *StartPipelineExecutionInput) (*StartPipelineExecutionOutput, error) { + req, out := c.StartPipelineExecutionRequest(input) + return out, req.Send() +} + +// StartPipelineExecutionWithContext is the same as StartPipelineExecution with the addition of +// the ability to pass a context and additional request options. +// +// See StartPipelineExecution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodePipeline) StartPipelineExecutionWithContext(ctx aws.Context, input *StartPipelineExecutionInput, opts ...request.Option) (*StartPipelineExecutionOutput, error) { + req, out := c.StartPipelineExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdatePipeline = "UpdatePipeline" + +// UpdatePipelineRequest generates a "aws/request.Request" representing the +// client's request for the UpdatePipeline operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdatePipeline for more information on using the UpdatePipeline +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdatePipelineRequest method. +// req, resp := client.UpdatePipelineRequest(params) // // err := req.Send() // if err == nil { // resp is now filled @@ -2453,7 +2896,7 @@ type AcknowledgeJobInput struct { // response of the PollForJobs request that returned this job. // // Nonce is a required field - Nonce *string `locationName:"nonce" type:"string" required:"true"` + Nonce *string `locationName:"nonce" min:"1" type:"string" required:"true"` } // String returns the string representation @@ -2475,6 +2918,9 @@ func (s *AcknowledgeJobInput) Validate() error { if s.Nonce == nil { invalidParams.Add(request.NewErrParamRequired("Nonce")) } + if s.Nonce != nil && len(*s.Nonce) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Nonce", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2538,7 +2984,7 @@ type AcknowledgeThirdPartyJobInput struct { // response to a GetThirdPartyJobDetails request. // // Nonce is a required field - Nonce *string `locationName:"nonce" type:"string" required:"true"` + Nonce *string `locationName:"nonce" min:"1" type:"string" required:"true"` } // String returns the string representation @@ -2569,6 +3015,9 @@ func (s *AcknowledgeThirdPartyJobInput) Validate() error { if s.Nonce == nil { invalidParams.Add(request.NewErrParamRequired("Nonce")) } + if s.Nonce != nil && len(*s.Nonce) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Nonce", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2955,7 +3404,7 @@ type ActionExecution struct { Status *string `locationName:"status" type:"string" enum:"ActionExecutionStatus"` // A summary of the run of the action. - Summary *string `locationName:"summary" type:"string"` + Summary *string `locationName:"summary" min:"1" type:"string"` // The system-generated token used to identify a unique approval request. The // token for each open approval request can be obtained using the GetPipelineState @@ -3256,7 +3705,7 @@ type ActionTypeId struct { // Provider is a required field Provider *string `locationName:"provider" min:"1" type:"string" required:"true"` - // A string that identifies the action type. + // A string that describes the action version. // // Version is a required field Version *string `locationName:"version" min:"1" type:"string" required:"true"` @@ -4271,71 +4720,33 @@ func (s DeletePipelineOutput) GoString() string { return s.String() } -// Represents the input of a DisableStageTransition action. -type DisableStageTransitionInput struct { +type DeleteWebhookInput struct { _ struct{} `type:"structure"` - // The name of the pipeline in which you want to disable the flow of artifacts - // from one stage to another. - // - // PipelineName is a required field - PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` - - // The reason given to the user why a stage is disabled, such as waiting for - // manual approval or manual tests. This message is displayed in the pipeline - // console UI. - // - // Reason is a required field - Reason *string `locationName:"reason" min:"1" type:"string" required:"true"` - - // The name of the stage where you want to disable the inbound or outbound transition - // of artifacts. - // - // StageName is a required field - StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` - - // Specifies whether artifacts will be prevented from transitioning into the - // stage and being processed by the actions in that stage (inbound), or prevented - // from transitioning from the stage after they have been processed by the actions - // in that stage (outbound). + // The name of the webhook you want to delete. // - // TransitionType is a required field - TransitionType *string `locationName:"transitionType" type:"string" required:"true" enum:"StageTransitionType"` + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` } // String returns the string representation -func (s DisableStageTransitionInput) String() string { +func (s DeleteWebhookInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisableStageTransitionInput) GoString() string { +func (s DeleteWebhookInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisableStageTransitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableStageTransitionInput"} - if s.PipelineName == nil { - invalidParams.Add(request.NewErrParamRequired("PipelineName")) - } - if s.PipelineName != nil && len(*s.PipelineName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) - } - if s.Reason == nil { - invalidParams.Add(request.NewErrParamRequired("Reason")) - } - if s.Reason != nil && len(*s.Reason) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Reason", 1)) - } - if s.StageName == nil { - invalidParams.Add(request.NewErrParamRequired("StageName")) - } - if s.StageName != nil && len(*s.StageName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) +func (s *DeleteWebhookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteWebhookInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.TransitionType == nil { - invalidParams.Add(request.NewErrParamRequired("TransitionType")) + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { @@ -4344,28 +4755,171 @@ func (s *DisableStageTransitionInput) Validate() error { return nil } -// SetPipelineName sets the PipelineName field's value. -func (s *DisableStageTransitionInput) SetPipelineName(v string) *DisableStageTransitionInput { - s.PipelineName = &v +// SetName sets the Name field's value. +func (s *DeleteWebhookInput) SetName(v string) *DeleteWebhookInput { + s.Name = &v return s } -// SetReason sets the Reason field's value. -func (s *DisableStageTransitionInput) SetReason(v string) *DisableStageTransitionInput { - s.Reason = &v - return s +type DeleteWebhookOutput struct { + _ struct{} `type:"structure"` } -// SetStageName sets the StageName field's value. -func (s *DisableStageTransitionInput) SetStageName(v string) *DisableStageTransitionInput { - s.StageName = &v - return s +// String returns the string representation +func (s DeleteWebhookOutput) String() string { + return awsutil.Prettify(s) } -// SetTransitionType sets the TransitionType field's value. -func (s *DisableStageTransitionInput) SetTransitionType(v string) *DisableStageTransitionInput { - s.TransitionType = &v - return s +// GoString returns the string representation +func (s DeleteWebhookOutput) GoString() string { + return s.String() +} + +type DeregisterWebhookWithThirdPartyInput struct { + _ struct{} `type:"structure"` + + // The name of the webhook you want to deregister. + WebhookName *string `locationName:"webhookName" min:"1" type:"string"` +} + +// String returns the string representation +func (s DeregisterWebhookWithThirdPartyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterWebhookWithThirdPartyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterWebhookWithThirdPartyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterWebhookWithThirdPartyInput"} + if s.WebhookName != nil && len(*s.WebhookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebhookName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWebhookName sets the WebhookName field's value. +func (s *DeregisterWebhookWithThirdPartyInput) SetWebhookName(v string) *DeregisterWebhookWithThirdPartyInput { + s.WebhookName = &v + return s +} + +type DeregisterWebhookWithThirdPartyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeregisterWebhookWithThirdPartyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterWebhookWithThirdPartyOutput) GoString() string { + return s.String() +} + +// Represents the input of a DisableStageTransition action. +type DisableStageTransitionInput struct { + _ struct{} `type:"structure"` + + // The name of the pipeline in which you want to disable the flow of artifacts + // from one stage to another. + // + // PipelineName is a required field + PipelineName *string `locationName:"pipelineName" min:"1" type:"string" required:"true"` + + // The reason given to the user why a stage is disabled, such as waiting for + // manual approval or manual tests. This message is displayed in the pipeline + // console UI. + // + // Reason is a required field + Reason *string `locationName:"reason" min:"1" type:"string" required:"true"` + + // The name of the stage where you want to disable the inbound or outbound transition + // of artifacts. + // + // StageName is a required field + StageName *string `locationName:"stageName" min:"1" type:"string" required:"true"` + + // Specifies whether artifacts will be prevented from transitioning into the + // stage and being processed by the actions in that stage (inbound), or prevented + // from transitioning from the stage after they have been processed by the actions + // in that stage (outbound). + // + // TransitionType is a required field + TransitionType *string `locationName:"transitionType" type:"string" required:"true" enum:"StageTransitionType"` +} + +// String returns the string representation +func (s DisableStageTransitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableStageTransitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableStageTransitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableStageTransitionInput"} + if s.PipelineName == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineName")) + } + if s.PipelineName != nil && len(*s.PipelineName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineName", 1)) + } + if s.Reason == nil { + invalidParams.Add(request.NewErrParamRequired("Reason")) + } + if s.Reason != nil && len(*s.Reason) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Reason", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + if s.TransitionType == nil { + invalidParams.Add(request.NewErrParamRequired("TransitionType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineName sets the PipelineName field's value. +func (s *DisableStageTransitionInput) SetPipelineName(v string) *DisableStageTransitionInput { + s.PipelineName = &v + return s +} + +// SetReason sets the Reason field's value. +func (s *DisableStageTransitionInput) SetReason(v string) *DisableStageTransitionInput { + s.Reason = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *DisableStageTransitionInput) SetStageName(v string) *DisableStageTransitionInput { + s.StageName = &v + return s +} + +// SetTransitionType sets the TransitionType field's value. +func (s *DisableStageTransitionInput) SetTransitionType(v string) *DisableStageTransitionInput { + s.TransitionType = &v + return s } type DisableStageTransitionOutput struct { @@ -4540,7 +5094,7 @@ type ErrorDetails struct { Code *string `locationName:"code" type:"string"` // The text of the error message. - Message *string `locationName:"message" type:"string"` + Message *string `locationName:"message" min:"1" type:"string"` } // String returns the string representation @@ -4579,7 +5133,7 @@ type ExecutionDetails struct { PercentComplete *int64 `locationName:"percentComplete" type:"integer"` // The summary of the current status of the actions. - Summary *string `locationName:"summary" type:"string"` + Summary *string `locationName:"summary" min:"1" type:"string"` } // String returns the string representation @@ -4598,6 +5152,9 @@ func (s *ExecutionDetails) Validate() error { if s.ExternalExecutionId != nil && len(*s.ExternalExecutionId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ExternalExecutionId", 1)) } + if s.Summary != nil && len(*s.Summary) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Summary", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4633,7 +5190,7 @@ type FailureDetails struct { // The message about the failure. // // Message is a required field - Message *string `locationName:"message" type:"string" required:"true"` + Message *string `locationName:"message" min:"1" type:"string" required:"true"` // The type of the failure. // @@ -4660,6 +5217,9 @@ func (s *FailureDetails) Validate() error { if s.Message == nil { invalidParams.Add(request.NewErrParamRequired("Message")) } + if s.Message != nil && len(*s.Message) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Message", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -5178,7 +5738,7 @@ type Job struct { // A system-generated random number that AWS CodePipeline uses to ensure that // the job is being worked on by only one job worker. Use this number in an // AcknowledgeJob request. - Nonce *string `locationName:"nonce" type:"string"` + Nonce *string `locationName:"nonce" min:"1" type:"string"` } // String returns the string representation @@ -5234,7 +5794,7 @@ type JobData struct { // A system-generated token, such as a AWS CodeDeploy deployment ID, that a // job requires in order to continue the job asynchronously. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // Represents information about the key used to encrypt data in the artifact // store, such as an AWS Key Management Service (AWS KMS) key. @@ -5613,6 +6173,170 @@ func (s *ListPipelinesOutput) SetPipelines(v []*PipelineSummary) *ListPipelinesO return s } +// The detail returned for each webhook after listing webhooks, such as the +// webhook URL, the webhook name, and the webhook ARN. +type ListWebhookItem struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the webhook. + Arn *string `locationName:"arn" type:"string"` + + // The detail returned for each webhook, such as the webhook authentication + // type and filter rules. + // + // Definition is a required field + Definition *WebhookDefinition `locationName:"definition" type:"structure" required:"true"` + + // The number code of the error. + ErrorCode *string `locationName:"errorCode" type:"string"` + + // The text of the error message about the webhook. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // The date and time a webhook was last successfully triggered, in timestamp + // format. + LastTriggered *time.Time `locationName:"lastTriggered" type:"timestamp" timestampFormat:"unix"` + + // A unique URL generated by CodePipeline. When a POST request is made to this + // URL, the defined pipeline is started as long as the body of the post request + // satisfies the defined authentication and filtering conditions. Deleting and + // re-creating a webhook will make the old URL invalid and generate a new URL. + // + // Url is a required field + Url *string `locationName:"url" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListWebhookItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebhookItem) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ListWebhookItem) SetArn(v string) *ListWebhookItem { + s.Arn = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *ListWebhookItem) SetDefinition(v *WebhookDefinition) *ListWebhookItem { + s.Definition = v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *ListWebhookItem) SetErrorCode(v string) *ListWebhookItem { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *ListWebhookItem) SetErrorMessage(v string) *ListWebhookItem { + s.ErrorMessage = &v + return s +} + +// SetLastTriggered sets the LastTriggered field's value. +func (s *ListWebhookItem) SetLastTriggered(v time.Time) *ListWebhookItem { + s.LastTriggered = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *ListWebhookItem) SetUrl(v string) *ListWebhookItem { + s.Url = &v + return s +} + +type ListWebhooksInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The token that was returned from the previous ListWebhooks call, which can + // be used to return the next set of webhooks in the list. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListWebhooksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebhooksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListWebhooksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListWebhooksInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListWebhooksInput) SetMaxResults(v int64) *ListWebhooksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWebhooksInput) SetNextToken(v string) *ListWebhooksInput { + s.NextToken = &v + return s +} + +type ListWebhooksOutput struct { + _ struct{} `type:"structure"` + + // If the amount of returned information is significantly large, an identifier + // is also returned and can be used in a subsequent ListWebhooks call to return + // the next set of webhooks in the list. + NextToken *string `min:"1" type:"string"` + + // The JSON detail returned for each webhook in the list output for the ListWebhooks + // call. + Webhooks []*ListWebhookItem `locationName:"webhooks" type:"list"` +} + +// String returns the string representation +func (s ListWebhooksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebhooksOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWebhooksOutput) SetNextToken(v string) *ListWebhooksOutput { + s.NextToken = &v + return s +} + +// SetWebhooks sets the Webhooks field's value. +func (s *ListWebhooksOutput) SetWebhooks(v []*ListWebhookItem) *ListWebhooksOutput { + s.Webhooks = v + return s +} + // Represents information about the output of an action. type OutputArtifact struct { _ struct{} `type:"structure"` @@ -5902,6 +6626,8 @@ type PipelineExecutionSummary struct { // The ID of the pipeline execution. PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` + SourceRevisions []*SourceRevision `locationName:"sourceRevisions" type:"list"` + // The date and time when the pipeline execution began, in timestamp format. StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` @@ -5941,6 +6667,12 @@ func (s *PipelineExecutionSummary) SetPipelineExecutionId(v string) *PipelineExe return s } +// SetSourceRevisions sets the SourceRevisions field's value. +func (s *PipelineExecutionSummary) SetSourceRevisions(v []*SourceRevision) *PipelineExecutionSummary { + s.SourceRevisions = v + return s +} + // SetStartTime sets the StartTime field's value. func (s *PipelineExecutionSummary) SetStartTime(v time.Time) *PipelineExecutionSummary { s.StartTime = &v @@ -6566,7 +7298,7 @@ type PutJobSuccessResultInput struct { // action. It can be reused to return additional information about the progress // of the custom action. When the action is complete, no continuation token // should be supplied. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // The ID of the current revision of the artifact successfully worked upon by // the job. @@ -6596,6 +7328,9 @@ func (s PutJobSuccessResultInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PutJobSuccessResultInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutJobSuccessResultInput"} + if s.ContinuationToken != nil && len(*s.ContinuationToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContinuationToken", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } @@ -6763,7 +7498,7 @@ type PutThirdPartyJobSuccessResultInput struct { // of the action. It can be reused to return additional information about the // progress of the partner action. When the action is complete, no continuation // token should be supplied. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // Represents information about a current revision. CurrentRevision *CurrentRevision `locationName:"currentRevision" type:"structure"` @@ -6798,6 +7533,9 @@ func (s *PutThirdPartyJobSuccessResultInput) Validate() error { if s.ClientToken != nil && len(*s.ClientToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) } + if s.ContinuationToken != nil && len(*s.ContinuationToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContinuationToken", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } @@ -6865,6 +7603,128 @@ func (s PutThirdPartyJobSuccessResultOutput) GoString() string { return s.String() } +type PutWebhookInput struct { + _ struct{} `type:"structure"` + + // The detail provided in an input file to create the webhook, such as the webhook + // name, the pipeline name, and the action name. Give the webhook a unique name + // which identifies the webhook being defined. You may choose to name the webhook + // after the pipeline and action it targets so that you can easily recognize + // what it's used for later. + // + // Webhook is a required field + Webhook *WebhookDefinition `locationName:"webhook" type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutWebhookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutWebhookInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutWebhookInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutWebhookInput"} + if s.Webhook == nil { + invalidParams.Add(request.NewErrParamRequired("Webhook")) + } + if s.Webhook != nil { + if err := s.Webhook.Validate(); err != nil { + invalidParams.AddNested("Webhook", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWebhook sets the Webhook field's value. +func (s *PutWebhookInput) SetWebhook(v *WebhookDefinition) *PutWebhookInput { + s.Webhook = v + return s +} + +type PutWebhookOutput struct { + _ struct{} `type:"structure"` + + // The detail returned from creating the webhook, such as the webhook name, + // webhook URL, and webhook ARN. + Webhook *ListWebhookItem `locationName:"webhook" type:"structure"` +} + +// String returns the string representation +func (s PutWebhookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutWebhookOutput) GoString() string { + return s.String() +} + +// SetWebhook sets the Webhook field's value. +func (s *PutWebhookOutput) SetWebhook(v *ListWebhookItem) *PutWebhookOutput { + s.Webhook = v + return s +} + +type RegisterWebhookWithThirdPartyInput struct { + _ struct{} `type:"structure"` + + // The name of an existing webhook created with PutWebhook to register with + // a supported third party. + WebhookName *string `locationName:"webhookName" min:"1" type:"string"` +} + +// String returns the string representation +func (s RegisterWebhookWithThirdPartyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterWebhookWithThirdPartyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterWebhookWithThirdPartyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterWebhookWithThirdPartyInput"} + if s.WebhookName != nil && len(*s.WebhookName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebhookName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWebhookName sets the WebhookName field's value. +func (s *RegisterWebhookWithThirdPartyInput) SetWebhookName(v string) *RegisterWebhookWithThirdPartyInput { + s.WebhookName = &v + return s +} + +type RegisterWebhookWithThirdPartyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RegisterWebhookWithThirdPartyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterWebhookWithThirdPartyOutput) GoString() string { + return s.String() +} + // Represents the input of a RetryStageExecution action. type RetryStageExecutionInput struct { _ struct{} `type:"structure"` @@ -7016,6 +7876,53 @@ func (s *S3ArtifactLocation) SetObjectKey(v string) *S3ArtifactLocation { return s } +type SourceRevision struct { + _ struct{} `type:"structure"` + + // ActionName is a required field + ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` + + RevisionId *string `locationName:"revisionId" min:"1" type:"string"` + + RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` + + RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` +} + +// String returns the string representation +func (s SourceRevision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceRevision) GoString() string { + return s.String() +} + +// SetActionName sets the ActionName field's value. +func (s *SourceRevision) SetActionName(v string) *SourceRevision { + s.ActionName = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *SourceRevision) SetRevisionId(v string) *SourceRevision { + s.RevisionId = &v + return s +} + +// SetRevisionSummary sets the RevisionSummary field's value. +func (s *SourceRevision) SetRevisionSummary(v string) *SourceRevision { + s.RevisionSummary = &v + return s +} + +// SetRevisionUrl sets the RevisionUrl field's value. +func (s *SourceRevision) SetRevisionUrl(v string) *SourceRevision { + s.RevisionUrl = &v + return s +} + // Represents information about a stage to a job worker. type StageContext struct { _ struct{} `type:"structure"` @@ -7334,7 +8241,7 @@ type ThirdPartyJobData struct { // A system-generated token, such as a AWS CodeDeploy deployment ID, that a // job requires in order to continue the job asynchronously. - ContinuationToken *string `locationName:"continuationToken" type:"string"` + ContinuationToken *string `locationName:"continuationToken" min:"1" type:"string"` // The encryption key used to encrypt and decrypt data in the artifact store // for the pipeline, such as an AWS Key Management Service (AWS KMS) key. This @@ -7428,7 +8335,7 @@ type ThirdPartyJobDetails struct { // A system-generated random number that AWS CodePipeline uses to ensure that // the job is being worked on by only one job worker. Use this number in an // AcknowledgeThirdPartyJob request. - Nonce *string `locationName:"nonce" type:"string"` + Nonce *string `locationName:"nonce" min:"1" type:"string"` } // String returns the string representation @@ -7580,6 +8487,266 @@ func (s *UpdatePipelineOutput) SetPipeline(v *PipelineDeclaration) *UpdatePipeli return s } +type WebhookAuthConfiguration struct { + _ struct{} `type:"structure"` + + AllowedIPRange *string `min:"1" type:"string"` + + SecretToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s WebhookAuthConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebhookAuthConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WebhookAuthConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WebhookAuthConfiguration"} + if s.AllowedIPRange != nil && len(*s.AllowedIPRange) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AllowedIPRange", 1)) + } + if s.SecretToken != nil && len(*s.SecretToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllowedIPRange sets the AllowedIPRange field's value. +func (s *WebhookAuthConfiguration) SetAllowedIPRange(v string) *WebhookAuthConfiguration { + s.AllowedIPRange = &v + return s +} + +// SetSecretToken sets the SecretToken field's value. +func (s *WebhookAuthConfiguration) SetSecretToken(v string) *WebhookAuthConfiguration { + s.SecretToken = &v + return s +} + +// Represents information about a webhook and its definition. +type WebhookDefinition struct { + _ struct{} `type:"structure"` + + // Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED. + // + // * GITHUB_HMAC implements the authentication scheme described here: https://developer.github.com/webhooks/securing/ + // + // * IP will reject webhooks trigger requests unless they originate from + // an IP within the IP range whitelisted in the authentication configuration. + // + // * UNAUTHENTICATED will accept all webhook trigger requests regardless + // of origin. + // + // Authentication is a required field + Authentication *string `locationName:"authentication" type:"string" required:"true" enum:"WebhookAuthenticationType"` + + // Properties that configure the authentication applied to incoming webhook + // trigger requests. The required properties depend on the authentication type. + // For GITHUB_HMAC, only the SecretToken property must be set. For IP, only + // the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, + // no properties can be set. + // + // AuthenticationConfiguration is a required field + AuthenticationConfiguration *WebhookAuthConfiguration `locationName:"authenticationConfiguration" type:"structure" required:"true"` + + // A list of rules applied to the body/payload sent in the POST request to a + // webhook URL. All defined rules must pass for the request to be accepted and + // the pipeline started. + // + // Filters is a required field + Filters []*WebhookFilterRule `locationName:"filters" type:"list" required:"true"` + + // The name of the webhook. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The name of the action in a pipeline you want to connect to the webhook. + // The action must be from the source (first) stage of the pipeline. + // + // TargetAction is a required field + TargetAction *string `locationName:"targetAction" min:"1" type:"string" required:"true"` + + // The name of the pipeline you want to connect to the webhook. + // + // TargetPipeline is a required field + TargetPipeline *string `locationName:"targetPipeline" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s WebhookDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebhookDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WebhookDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WebhookDefinition"} + if s.Authentication == nil { + invalidParams.Add(request.NewErrParamRequired("Authentication")) + } + if s.AuthenticationConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationConfiguration")) + } + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.TargetAction == nil { + invalidParams.Add(request.NewErrParamRequired("TargetAction")) + } + if s.TargetAction != nil && len(*s.TargetAction) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetAction", 1)) + } + if s.TargetPipeline == nil { + invalidParams.Add(request.NewErrParamRequired("TargetPipeline")) + } + if s.TargetPipeline != nil && len(*s.TargetPipeline) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetPipeline", 1)) + } + if s.AuthenticationConfiguration != nil { + if err := s.AuthenticationConfiguration.Validate(); err != nil { + invalidParams.AddNested("AuthenticationConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthentication sets the Authentication field's value. +func (s *WebhookDefinition) SetAuthentication(v string) *WebhookDefinition { + s.Authentication = &v + return s +} + +// SetAuthenticationConfiguration sets the AuthenticationConfiguration field's value. +func (s *WebhookDefinition) SetAuthenticationConfiguration(v *WebhookAuthConfiguration) *WebhookDefinition { + s.AuthenticationConfiguration = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *WebhookDefinition) SetFilters(v []*WebhookFilterRule) *WebhookDefinition { + s.Filters = v + return s +} + +// SetName sets the Name field's value. +func (s *WebhookDefinition) SetName(v string) *WebhookDefinition { + s.Name = &v + return s +} + +// SetTargetAction sets the TargetAction field's value. +func (s *WebhookDefinition) SetTargetAction(v string) *WebhookDefinition { + s.TargetAction = &v + return s +} + +// SetTargetPipeline sets the TargetPipeline field's value. +func (s *WebhookDefinition) SetTargetPipeline(v string) *WebhookDefinition { + s.TargetPipeline = &v + return s +} + +// The event criteria that specify when a webhook notification is sent to your +// URL. +type WebhookFilterRule struct { + _ struct{} `type:"structure"` + + // A JsonPath expression that will be applied to the body/payload of the webhook. + // The value selected by JsonPath expression must match the value specified + // in the matchEquals field, otherwise the request will be ignored. More information + // on JsonPath expressions can be found here: https://github.com/json-path/JsonPath. + // + // JsonPath is a required field + JsonPath *string `locationName:"jsonPath" min:"1" type:"string" required:"true"` + + // The value selected by the JsonPath expression must match what is supplied + // in the MatchEquals field, otherwise the request will be ignored. Properties + // from the target action configuration can be included as placeholders in this + // value by surrounding the action configuration key with curly braces. For + // example, if the value supplied here is "refs/heads/{Branch}" and the target + // action has an action configuration property called "Branch" with a value + // of "master", the MatchEquals value will be evaluated as "refs/heads/master". + // A list of action configuration properties for built-in action types can be + // found here: Pipeline Structure Reference Action Requirements (http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements). + MatchEquals *string `locationName:"matchEquals" min:"1" type:"string"` +} + +// String returns the string representation +func (s WebhookFilterRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebhookFilterRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WebhookFilterRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WebhookFilterRule"} + if s.JsonPath == nil { + invalidParams.Add(request.NewErrParamRequired("JsonPath")) + } + if s.JsonPath != nil && len(*s.JsonPath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JsonPath", 1)) + } + if s.MatchEquals != nil && len(*s.MatchEquals) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MatchEquals", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJsonPath sets the JsonPath field's value. +func (s *WebhookFilterRule) SetJsonPath(v string) *WebhookFilterRule { + s.JsonPath = &v + return s +} + +// SetMatchEquals sets the MatchEquals field's value. +func (s *WebhookFilterRule) SetMatchEquals(v string) *WebhookFilterRule { + s.MatchEquals = &v + return s +} + const ( // ActionCategorySource is a ActionCategory enum value ActionCategorySource = "Source" @@ -7741,3 +8908,14 @@ const ( // StageTransitionTypeOutbound is a StageTransitionType enum value StageTransitionTypeOutbound = "Outbound" ) + +const ( + // WebhookAuthenticationTypeGithubHmac is a WebhookAuthenticationType enum value + WebhookAuthenticationTypeGithubHmac = "GITHUB_HMAC" + + // WebhookAuthenticationTypeIp is a WebhookAuthenticationType enum value + WebhookAuthenticationTypeIp = "IP" + + // WebhookAuthenticationTypeUnauthenticated is a WebhookAuthenticationType enum value + WebhookAuthenticationTypeUnauthenticated = "UNAUTHENTICATED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go index bebd4b1bbe1..ecb1cd86257 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go @@ -11,10 +11,10 @@ // see the AWS CodePipeline User Guide (http://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html). // // You can use the AWS CodePipeline API to work with pipelines, stages, actions, -// gates, and transitions, as described below. +// and transitions, as described below. // // Pipelines are models of automated release processes. Each pipeline is uniquely -// named, and consists of actions, gates, and stages. +// named, and consists of stages, actions, and transitions. // // You can work with pipelines by calling: // @@ -43,24 +43,37 @@ // * UpdatePipeline, which updates a pipeline with edits or changes to the // structure of the pipeline. // -// Pipelines include stages, which are logical groupings of gates and actions. -// Each stage contains one or more actions that must complete before the next -// stage begins. A stage will result in success or failure. If a stage fails, -// then the pipeline stops at that stage and will remain stopped until either -// a new version of an artifact appears in the source location, or a user takes -// action to re-run the most recent artifact through the pipeline. You can call -// GetPipelineState, which displays the status of a pipeline, including the -// status of stages in the pipeline, or GetPipeline, which returns the entire -// structure of the pipeline, including the stages of that pipeline. For more -// information about the structure of stages and actions, also refer to the -// AWS CodePipeline Pipeline Structure Reference (http://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-structure.html). +// Pipelines include stages. Each stage contains one or more actions that must +// complete before the next stage begins. A stage will result in success or +// failure. If a stage fails, then the pipeline stops at that stage and will +// remain stopped until either a new version of an artifact appears in the source +// location, or a user takes action to re-run the most recent artifact through +// the pipeline. You can call GetPipelineState, which displays the status of +// a pipeline, including the status of stages in the pipeline, or GetPipeline, +// which returns the entire structure of the pipeline, including the stages +// of that pipeline. For more information about the structure of stages and +// actions, also refer to the AWS CodePipeline Pipeline Structure Reference +// (http://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-structure.html). // // Pipeline stages include actions, which are categorized into categories such // as source or build actions performed within a stage of a pipeline. For example, // you can use a source action to import artifacts into a pipeline from a source // such as Amazon S3. Like stages, you do not work with actions directly in // most cases, but you do define and interact with actions when working with -// pipeline operations such as CreatePipeline and GetPipelineState. +// pipeline operations such as CreatePipeline and GetPipelineState. Valid action +// categories are: +// +// * Source +// +// * Build +// +// * Test +// +// * Deploy +// +// * Approval +// +// * Invoke // // Pipelines also include transitions, which allow the transition of artifacts // from one stage to the next in a pipeline after the actions in one stage complete. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go index ca160b26a87..dfdffa34c79 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/errors.go @@ -83,6 +83,18 @@ const ( // The specified structure was specified in an invalid format. ErrCodeInvalidStructureException = "InvalidStructureException" + // ErrCodeInvalidWebhookAuthenticationParametersException for service response error code + // "InvalidWebhookAuthenticationParametersException". + // + // The specified authentication type is in an invalid format. + ErrCodeInvalidWebhookAuthenticationParametersException = "InvalidWebhookAuthenticationParametersException" + + // ErrCodeInvalidWebhookFilterPatternException for service response error code + // "InvalidWebhookFilterPatternException". + // + // The specified event filter rule is in an invalid format. + ErrCodeInvalidWebhookFilterPatternException = "InvalidWebhookFilterPatternException" + // ErrCodeJobNotFoundException for service response error code // "JobNotFoundException". // @@ -149,4 +161,10 @@ const ( // // The validation was specified in an invalid format. ErrCodeValidationException = "ValidationException" + + // ErrCodeWebhookNotFoundException for service response error code + // "WebhookNotFoundException". + // + // The specified webhook was entered in an invalid format or cannot be found. + ErrCodeWebhookNotFoundException = "WebhookNotFoundException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index aeffc22fa3e..f84b3bd9f3d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -539,6 +539,92 @@ func (c *DeviceFarm) CreateUploadWithContext(ctx aws.Context, input *CreateUploa return out, req.Send() } +const opCreateVPCEConfiguration = "CreateVPCEConfiguration" + +// CreateVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the CreateVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateVPCEConfiguration for more information on using the CreateVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateVPCEConfigurationRequest method. +// req, resp := client.CreateVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration +func (c *DeviceFarm) CreateVPCEConfigurationRequest(input *CreateVPCEConfigurationInput) (req *request.Request, output *CreateVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opCreateVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVPCEConfigurationInput{} + } + + output = &CreateVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateVPCEConfiguration API operation for AWS Device Farm. +// +// Creates a configuration record in Device Farm for your Amazon Virtual Private +// Cloud (VPC) endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation CreateVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit was exceeded. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateVPCEConfiguration +func (c *DeviceFarm) CreateVPCEConfiguration(input *CreateVPCEConfigurationInput) (*CreateVPCEConfigurationOutput, error) { + req, out := c.CreateVPCEConfigurationRequest(input) + return out, req.Send() +} + +// CreateVPCEConfigurationWithContext is the same as CreateVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See CreateVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) CreateVPCEConfigurationWithContext(ctx aws.Context, input *CreateVPCEConfigurationInput, opts ...request.Option) (*CreateVPCEConfigurationOutput, error) { + req, out := c.CreateVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDevicePool = "DeleteDevicePool" // DeleteDevicePoolRequest generates a "aws/request.Request" representing the @@ -1160,6 +1246,95 @@ func (c *DeviceFarm) DeleteUploadWithContext(ctx aws.Context, input *DeleteUploa return out, req.Send() } +const opDeleteVPCEConfiguration = "DeleteVPCEConfiguration" + +// DeleteVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteVPCEConfiguration for more information on using the DeleteVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteVPCEConfigurationRequest method. +// req, resp := client.DeleteVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration +func (c *DeviceFarm) DeleteVPCEConfigurationRequest(input *DeleteVPCEConfigurationInput) (req *request.Request, output *DeleteVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVPCEConfigurationInput{} + } + + output = &DeleteVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVPCEConfiguration API operation for AWS Device Farm. +// +// Deletes a configuration for your Amazon Virtual Private Cloud (VPC) endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation DeleteVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// There was an error with the update request, or you do not have sufficient +// permissions to update this VPC endpoint configuration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/DeleteVPCEConfiguration +func (c *DeviceFarm) DeleteVPCEConfiguration(input *DeleteVPCEConfigurationInput) (*DeleteVPCEConfigurationOutput, error) { + req, out := c.DeleteVPCEConfigurationRequest(input) + return out, req.Send() +} + +// DeleteVPCEConfigurationWithContext is the same as DeleteVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) DeleteVPCEConfigurationWithContext(ctx aws.Context, input *DeleteVPCEConfigurationInput, opts ...request.Option) (*DeleteVPCEConfigurationOutput, error) { + req, out := c.DeleteVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the @@ -2547,6 +2722,92 @@ func (c *DeviceFarm) GetUploadWithContext(ctx aws.Context, input *GetUploadInput return out, req.Send() } +const opGetVPCEConfiguration = "GetVPCEConfiguration" + +// GetVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetVPCEConfiguration for more information on using the GetVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetVPCEConfigurationRequest method. +// req, resp := client.GetVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfigurationRequest(input *GetVPCEConfigurationInput) (req *request.Request, output *GetVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opGetVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetVPCEConfigurationInput{} + } + + output = &GetVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetVPCEConfiguration API operation for AWS Device Farm. +// +// Returns information about the configuration settings for your Amazon Virtual +// Private Cloud (VPC) endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation GetVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/GetVPCEConfiguration +func (c *DeviceFarm) GetVPCEConfiguration(input *GetVPCEConfigurationInput) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + return out, req.Send() +} + +// GetVPCEConfigurationWithContext is the same as GetVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) GetVPCEConfigurationWithContext(ctx aws.Context, input *GetVPCEConfigurationInput, opts ...request.Option) (*GetVPCEConfigurationOutput, error) { + req, out := c.GetVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" // InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the @@ -4976,6 +5237,89 @@ func (c *DeviceFarm) ListUploadsPagesWithContext(ctx aws.Context, input *ListUpl return p.Err() } +const opListVPCEConfigurations = "ListVPCEConfigurations" + +// ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListVPCEConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListVPCEConfigurations for more information on using the ListVPCEConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListVPCEConfigurationsRequest method. +// req, resp := client.ListVPCEConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurationsRequest(input *ListVPCEConfigurationsInput) (req *request.Request, output *ListVPCEConfigurationsOutput) { + op := &request.Operation{ + Name: opListVPCEConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListVPCEConfigurationsInput{} + } + + output = &ListVPCEConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVPCEConfigurations API operation for AWS Device Farm. +// +// Returns information about all Amazon Virtual Private Cloud (VPC) endpoint +// configurations in the AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation ListVPCEConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListVPCEConfigurations +func (c *DeviceFarm) ListVPCEConfigurations(input *ListVPCEConfigurationsInput) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) + return out, req.Send() +} + +// ListVPCEConfigurationsWithContext is the same as ListVPCEConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListVPCEConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) ListVPCEConfigurationsWithContext(ctx aws.Context, input *ListVPCEConfigurationsInput, opts ...request.Option) (*ListVPCEConfigurationsOutput, error) { + req, out := c.ListVPCEConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPurchaseOffering = "PurchaseOffering" // PurchaseOfferingRequest generates a "aws/request.Request" representing the @@ -5883,6 +6227,96 @@ func (c *DeviceFarm) UpdateProjectWithContext(ctx aws.Context, input *UpdateProj return out, req.Send() } +const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" + +// UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVPCEConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVPCEConfiguration for more information on using the UpdateVPCEConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVPCEConfigurationRequest method. +// req, resp := client.UpdateVPCEConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfigurationRequest(input *UpdateVPCEConfigurationInput) (req *request.Request, output *UpdateVPCEConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateVPCEConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVPCEConfigurationInput{} + } + + output = &UpdateVPCEConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVPCEConfiguration API operation for AWS Device Farm. +// +// Updates information about an existing Amazon Virtual Private Cloud (VPC) +// endpoint configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Device Farm's +// API operation UpdateVPCEConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeArgumentException "ArgumentException" +// An invalid argument was specified. +// +// * ErrCodeNotFoundException "NotFoundException" +// The specified entity was not found. +// +// * ErrCodeServiceAccountException "ServiceAccountException" +// There was a problem with the service account. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// There was an error with the update request, or you do not have sufficient +// permissions to update this VPC endpoint configuration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/UpdateVPCEConfiguration +func (c *DeviceFarm) UpdateVPCEConfiguration(input *UpdateVPCEConfigurationInput) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + return out, req.Send() +} + +// UpdateVPCEConfigurationWithContext is the same as UpdateVPCEConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVPCEConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DeviceFarm) UpdateVPCEConfigurationWithContext(ctx aws.Context, input *UpdateVPCEConfigurationInput, opts ...request.Option) (*UpdateVPCEConfigurationOutput, error) { + req, out := c.UpdateVPCEConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // A container for account-level settings within AWS Device Farm. type AccountSettings struct { _ struct{} `type:"structure"` @@ -7042,6 +7476,107 @@ func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput { return s } +type CreateVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The DNS name of the service running in your VPC that you want Device Farm + // to test. + // + // ServiceDnsName is a required field + ServiceDnsName *string `locationName:"serviceDnsName" type:"string" required:"true"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + // + // VpceConfigurationName is a required field + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string" required:"true"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + // + // VpceServiceName is a required field + VpceServiceName *string `locationName:"vpceServiceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVPCEConfigurationInput"} + if s.ServiceDnsName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceDnsName")) + } + if s.VpceConfigurationName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceConfigurationName")) + } + if s.VpceServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("VpceServiceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *CreateVPCEConfigurationInput) SetServiceDnsName(v string) *CreateVPCEConfigurationInput { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceConfigurationName(v string) *CreateVPCEConfigurationInput { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *CreateVPCEConfigurationInput) SetVpceServiceName(v string) *CreateVPCEConfigurationInput { + s.VpceServiceName = &v + return s +} + +type CreateVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s CreateVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *CreateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *CreateVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // A JSON object specifying the paths where the artifacts generated by the customer's // tests, on the device or in the test environment, will be pulled from. // @@ -7399,8 +7934,66 @@ func (s DeleteRunInput) GoString() string { } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRunInput"} +func (s *DeleteRunInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRunInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DeleteRunInput) SetArn(v string) *DeleteRunInput { + s.Arn = &v + return s +} + +// Represents the result of a delete run request. +type DeleteRunOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRunOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRunOutput) GoString() string { + return s.String() +} + +// Represents a request to the delete upload operation. +type DeleteUploadInput struct { + _ struct{} `type:"structure"` + + // Represents the Amazon Resource Name (ARN) of the Device Farm upload you wish + // to delete. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteUploadInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUploadInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUploadInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUploadInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -7415,31 +8008,30 @@ func (s *DeleteRunInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *DeleteRunInput) SetArn(v string) *DeleteRunInput { +func (s *DeleteUploadInput) SetArn(v string) *DeleteUploadInput { s.Arn = &v return s } -// Represents the result of a delete run request. -type DeleteRunOutput struct { +// Represents the result of a delete upload request. +type DeleteUploadOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteRunOutput) String() string { +func (s DeleteUploadOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRunOutput) GoString() string { +func (s DeleteUploadOutput) GoString() string { return s.String() } -// Represents a request to the delete upload operation. -type DeleteUploadInput struct { +type DeleteVPCEConfigurationInput struct { _ struct{} `type:"structure"` - // Represents the Amazon Resource Name (ARN) of the Device Farm upload you wish + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want // to delete. // // Arn is a required field @@ -7447,18 +8039,18 @@ type DeleteUploadInput struct { } // String returns the string representation -func (s DeleteUploadInput) String() string { +func (s DeleteVPCEConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteUploadInput) GoString() string { +func (s DeleteVPCEConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUploadInput"} +func (s *DeleteVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVPCEConfigurationInput"} if s.Arn == nil { invalidParams.Add(request.NewErrParamRequired("Arn")) } @@ -7473,23 +8065,22 @@ func (s *DeleteUploadInput) Validate() error { } // SetArn sets the Arn field's value. -func (s *DeleteUploadInput) SetArn(v string) *DeleteUploadInput { +func (s *DeleteVPCEConfigurationInput) SetArn(v string) *DeleteVPCEConfigurationInput { s.Arn = &v return s } -// Represents the result of a delete upload request. -type DeleteUploadOutput struct { +type DeleteVPCEConfigurationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteUploadOutput) String() string { +func (s DeleteVPCEConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteUploadOutput) GoString() string { +func (s DeleteVPCEConfigurationOutput) GoString() string { return s.String() } @@ -8163,6 +8754,9 @@ type GetDevicePoolCompatibilityInput struct { // The ARN of the app that is associated with the specified device pool. AppArn *string `locationName:"appArn" min:"32" type:"string"` + // An object containing information about the settings for a run. + Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` + // The device pool's ARN. // // DevicePoolArn is a required field @@ -8229,6 +8823,11 @@ func (s *GetDevicePoolCompatibilityInput) Validate() error { if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) } + if s.Configuration != nil { + if err := s.Configuration.Validate(); err != nil { + invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) + } + } if s.Test != nil { if err := s.Test.Validate(); err != nil { invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) @@ -8247,6 +8846,12 @@ func (s *GetDevicePoolCompatibilityInput) SetAppArn(v string) *GetDevicePoolComp return s } +// SetConfiguration sets the Configuration field's value. +func (s *GetDevicePoolCompatibilityInput) SetConfiguration(v *ScheduleRunConfiguration) *GetDevicePoolCompatibilityInput { + s.Configuration = v + return s +} + // SetDevicePoolArn sets the DevicePoolArn field's value. func (s *GetDevicePoolCompatibilityInput) SetDevicePoolArn(v string) *GetDevicePoolCompatibilityInput { s.DevicePoolArn = &v @@ -9040,6 +9645,71 @@ func (s *GetUploadOutput) SetUpload(v *Upload) *GetUploadOutput { return s } +type GetVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to describe. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetVPCEConfigurationInput) SetArn(v string) *GetVPCEConfigurationInput { + s.Arn = &v + return s +} + +type GetVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s GetVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *GetVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *GetVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // Represents information about incompatibility. type IncompatibilityMessage struct { _ struct{} `type:"structure"` @@ -11052,6 +11722,87 @@ func (s *ListUploadsOutput) SetUploads(v []*Upload) *ListUploadsOutput { return s } +type ListVPCEConfigurationsInput struct { + _ struct{} `type:"structure"` + + // An integer specifying the maximum number of items you want to return in the + // API response. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` +} + +// String returns the string representation +func (s ListVPCEConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVPCEConfigurationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVPCEConfigurationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVPCEConfigurationsInput"} + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListVPCEConfigurationsInput) SetMaxResults(v int64) *ListVPCEConfigurationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVPCEConfigurationsInput) SetNextToken(v string) *ListVPCEConfigurationsInput { + s.NextToken = &v + return s +} + +type ListVPCEConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" min:"4" type:"string"` + + // An array of VPCEConfiguration objects containing information about your VPC + // endpoint configuration. + VpceConfigurations []*VPCEConfiguration `locationName:"vpceConfigurations" type:"list"` +} + +// String returns the string representation +func (s ListVPCEConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVPCEConfigurationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListVPCEConfigurationsOutput) SetNextToken(v string) *ListVPCEConfigurationsOutput { + s.NextToken = &v + return s +} + +// SetVpceConfigurations sets the VpceConfigurations field's value. +func (s *ListVPCEConfigurationsOutput) SetVpceConfigurations(v []*VPCEConfiguration) *ListVPCEConfigurationsOutput { + s.VpceConfigurations = v + return s +} + // Represents a latitude and longitude pair, expressed in geographic coordinate // system degrees (for example 47.6204, -122.3491). // @@ -12735,6 +13486,9 @@ type ScheduleRunConfiguration struct { // Information about the radio states for the run. Radios *Radios `locationName:"radios" type:"structure"` + + // An array of Amazon Resource Names (ARNs) for your VPC endpoint configurations. + VpceConfigurationArns []*string `locationName:"vpceConfigurationArns" type:"list"` } // String returns the string representation @@ -12816,6 +13570,12 @@ func (s *ScheduleRunConfiguration) SetRadios(v *Radios) *ScheduleRunConfiguratio return s } +// SetVpceConfigurationArns sets the VpceConfigurationArns field's value. +func (s *ScheduleRunConfiguration) SetVpceConfigurationArns(v []*string) *ScheduleRunConfiguration { + s.VpceConfigurationArns = v + return s +} + // Represents a request to the schedule run operation. type ScheduleRunInput struct { _ struct{} `type:"structure"` @@ -14251,6 +15011,110 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { return s } +type UpdateVPCEConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration you want + // to update. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + + // The DNS (domain) name used to connect to your private service in your Amazon + // VPC. The DNS name must not already be in use on the Internet. + ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + VpceServiceName *string `locationName:"vpceServiceName" type:"string"` +} + +// String returns the string representation +func (s UpdateVPCEConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVPCEConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVPCEConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVPCEConfigurationInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 32 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UpdateVPCEConfigurationInput) SetArn(v string) *UpdateVPCEConfigurationInput { + s.Arn = &v + return s +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *UpdateVPCEConfigurationInput) SetServiceDnsName(v string) *UpdateVPCEConfigurationInput { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationDescription(v string) *UpdateVPCEConfigurationInput { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceConfigurationName(v string) *UpdateVPCEConfigurationInput { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *UpdateVPCEConfigurationInput) SetVpceServiceName(v string) *UpdateVPCEConfigurationInput { + s.VpceServiceName = &v + return s +} + +type UpdateVPCEConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about your VPC endpoint configuration. + VpceConfiguration *VPCEConfiguration `locationName:"vpceConfiguration" type:"structure"` +} + +// String returns the string representation +func (s UpdateVPCEConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVPCEConfigurationOutput) GoString() string { + return s.String() +} + +// SetVpceConfiguration sets the VpceConfiguration field's value. +func (s *UpdateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *UpdateVPCEConfigurationOutput { + s.VpceConfiguration = v + return s +} + // An app or a set of one or more tests to upload or that have been uploaded. type Upload struct { _ struct{} `type:"structure"` @@ -14397,6 +15261,69 @@ func (s *Upload) SetUrl(v string) *Upload { return s } +// Represents an Amazon Virtual Private Cloud (VPC) endpoint configuration. +type VPCEConfiguration struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the VPC endpoint configuration. + Arn *string `locationName:"arn" min:"32" type:"string"` + + // The DNS name that maps to the private IP address of the service you want + // to access. + ServiceDnsName *string `locationName:"serviceDnsName" type:"string"` + + // An optional description, providing more details about your VPC endpoint configuration. + VpceConfigurationDescription *string `locationName:"vpceConfigurationDescription" type:"string"` + + // The friendly name you give to your VPC endpoint configuration, to manage + // your configurations more easily. + VpceConfigurationName *string `locationName:"vpceConfigurationName" type:"string"` + + // The name of the VPC endpoint service running inside your AWS account that + // you want Device Farm to test. + VpceServiceName *string `locationName:"vpceServiceName" type:"string"` +} + +// String returns the string representation +func (s VPCEConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VPCEConfiguration) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *VPCEConfiguration) SetArn(v string) *VPCEConfiguration { + s.Arn = &v + return s +} + +// SetServiceDnsName sets the ServiceDnsName field's value. +func (s *VPCEConfiguration) SetServiceDnsName(v string) *VPCEConfiguration { + s.ServiceDnsName = &v + return s +} + +// SetVpceConfigurationDescription sets the VpceConfigurationDescription field's value. +func (s *VPCEConfiguration) SetVpceConfigurationDescription(v string) *VPCEConfiguration { + s.VpceConfigurationDescription = &v + return s +} + +// SetVpceConfigurationName sets the VpceConfigurationName field's value. +func (s *VPCEConfiguration) SetVpceConfigurationName(v string) *VPCEConfiguration { + s.VpceConfigurationName = &v + return s +} + +// SetVpceServiceName sets the VpceServiceName field's value. +func (s *VPCEConfiguration) SetVpceServiceName(v string) *VPCEConfiguration { + s.VpceServiceName = &v + return s +} + const ( // ArtifactCategoryScreenshot is a ArtifactCategory enum value ArtifactCategoryScreenshot = "SCREENSHOT" @@ -14531,6 +15458,9 @@ const ( // DeviceAttributeInstanceLabels is a DeviceAttribute enum value DeviceAttributeInstanceLabels = "INSTANCE_LABELS" + + // DeviceAttributeFleetType is a DeviceAttribute enum value + DeviceAttributeFleetType = "FLEET_TYPE" ) const ( @@ -14583,6 +15513,9 @@ const ( const ( // ExecutionResultCodeParsingFailed is a ExecutionResultCode enum value ExecutionResultCodeParsingFailed = "PARSING_FAILED" + + // ExecutionResultCodeVpcEndpointSetupFailed is a ExecutionResultCode enum value + ExecutionResultCodeVpcEndpointSetupFailed = "VPC_ENDPOINT_SETUP_FAILED" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go index bcb0d460108..2d9e5abdfbf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/errors.go @@ -16,6 +16,13 @@ const ( // An entity with the same name already exists. ErrCodeIdempotencyException = "IdempotencyException" + // ErrCodeInvalidOperationException for service response error code + // "InvalidOperationException". + // + // There was an error with the update request, or you do not have sufficient + // permissions to update this VPC endpoint configuration. + ErrCodeInvalidOperationException = "InvalidOperationException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index fb9dc14927a..bf9d7a4e15a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -569,6 +569,21 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req // // * The tables must have DynamoDB Streams enabled (NEW_AND_OLD_IMAGES). // +// +// * The tables must have same provisioned and maximum write capacity units. +// +// +// If global secondary indexes are specified, then the following conditions +// must also be met: +// +// * The global secondary indexes must have the same name. +// +// * The global secondary indexes must have the same hash key and sort key +// (if present). +// +// * The global secondary indexes must have the same provisioned and maximum +// write capacity units. +// // 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. @@ -1204,8 +1219,7 @@ func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBac // to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. // // LatestRestorableDateTime is typically 5 minutes before the current time. -// You can restore your table to any point in time during the last 35 days with -// a 1-minute granularity. +// You can restore your table to any point in time during the last 35 days. // // You can call DescribeContinuousBackups at a maximum rate of 10 times per // second. @@ -1329,6 +1343,88 @@ func (c *DynamoDB) DescribeGlobalTableWithContext(ctx aws.Context, input *Descri return out, req.Send() } +const opDescribeGlobalTableSettings = "DescribeGlobalTableSettings" + +// DescribeGlobalTableSettingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGlobalTableSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeGlobalTableSettings for more information on using the DescribeGlobalTableSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeGlobalTableSettingsRequest method. +// req, resp := client.DescribeGlobalTableSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings +func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTableSettingsInput) (req *request.Request, output *DescribeGlobalTableSettingsOutput) { + op := &request.Operation{ + Name: opDescribeGlobalTableSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeGlobalTableSettingsInput{} + } + + output = &DescribeGlobalTableSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGlobalTableSettings API operation for Amazon DynamoDB. +// +// Describes region specific settings for a global table. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB's +// API operation DescribeGlobalTableSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" +// The specified global table does not exist. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings +func (c *DynamoDB) DescribeGlobalTableSettings(input *DescribeGlobalTableSettingsInput) (*DescribeGlobalTableSettingsOutput, error) { + req, out := c.DescribeGlobalTableSettingsRequest(input) + return out, req.Send() +} + +// DescribeGlobalTableSettingsWithContext is the same as DescribeGlobalTableSettings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeGlobalTableSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DynamoDB) DescribeGlobalTableSettingsWithContext(ctx aws.Context, input *DescribeGlobalTableSettingsInput, opts ...request.Option) (*DescribeGlobalTableSettingsOutput, error) { + req, out := c.DescribeGlobalTableSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the @@ -2630,9 +2726,26 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn // // Restores the specified table to the specified point in time within EarliestRestorableDateTime // and LatestRestorableDateTime. You can restore your table to any point in -// time during the last 35 days with a 1-minute granularity. Any number of users -// can execute up to 4 concurrent restores (any type of restore) in a given -// account. +// time during the last 35 days. Any number of users can execute up to 4 concurrent +// restores (any type of restore) in a given account. +// +// When you restore using point in time recovery, DynamoDB restores your table +// data to the state based on the selected date and time (day:hour:minute:second) +// to a new table. +// +// Along with data, the following are also included on the new restored table +// using point in time recovery: +// +// * Global secondary indexes (GSIs) +// +// * Local secondary indexes (LSIs) +// +// * Provisioned read and write capacity +// +// * Encryption settings +// +// All these settings come from the current settings of the source table at +// the time of restore. // // You must manually set up the following on the restored table: // @@ -3160,8 +3273,7 @@ func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackups // to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime. // // LatestRestorableDateTime is typically 5 minutes before the current time. -// You can restore your table to any point in time during the last 35 days with -// a 1-minute granularity. +// You can restore your table to any point in time during the last 35 days.. // // 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 @@ -3250,12 +3362,24 @@ func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req // Adds or removes replicas in the specified global table. The global table // must already exist to be able to use this operation. Any replica to be added // must be empty, must have the same name as the global table, must have the -// same key schema, and must have DynamoDB Streams enabled. +// same key schema, and must have DynamoDB Streams enabled and must have same +// provisioned and maximum write capacity units. // // Although you can use UpdateGlobalTable to add replicas and remove replicas // in a single request, for simplicity we recommend that you issue separate // requests for adding or removing replicas. // +// If global secondary indexes are specified, then the following conditions +// must also be met: +// +// * The global secondary indexes must have the same name. +// +// * The global secondary indexes must have the same hash key and sort key +// (if present). +// +// * The global secondary indexes must have the same provisioned and maximum +// write capacity units. +// // 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. @@ -3302,6 +3426,113 @@ func (c *DynamoDB) UpdateGlobalTableWithContext(ctx aws.Context, input *UpdateGl return out, req.Send() } +const opUpdateGlobalTableSettings = "UpdateGlobalTableSettings" + +// UpdateGlobalTableSettingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGlobalTableSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGlobalTableSettings for more information on using the UpdateGlobalTableSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGlobalTableSettingsRequest method. +// req, resp := client.UpdateGlobalTableSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings +func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSettingsInput) (req *request.Request, output *UpdateGlobalTableSettingsOutput) { + op := &request.Operation{ + Name: opUpdateGlobalTableSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGlobalTableSettingsInput{} + } + + output = &UpdateGlobalTableSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGlobalTableSettings API operation for Amazon DynamoDB. +// +// Updates settings for a global table. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DynamoDB's +// API operation UpdateGlobalTableSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" +// The specified global table does not exist. +// +// * ErrCodeReplicaNotFoundException "ReplicaNotFoundException" +// The specified replica is no longer part of the global table. +// +// * ErrCodeIndexNotFoundException "IndexNotFoundException" +// The operation tried to access a nonexistent index. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Up to 50 CreateBackup operations are allowed per second, per account. There +// is no limit to the number of daily on-demand backups that can be taken. +// +// Up to 10 simultaneous table operations are allowed per account. These operations +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. +// +// For tables with secondary indexes, only one of those tables can be in the +// CREATING state at any point in time. Do not attempt to create more than one +// such table simultaneously. +// +// The total limit of tables in the ACTIVE state is 250. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation conflicts with the resource's availability. For example, you +// attempted to recreate an existing table, or tried to delete a table currently +// in the CREATING state. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings +func (c *DynamoDB) UpdateGlobalTableSettings(input *UpdateGlobalTableSettingsInput) (*UpdateGlobalTableSettingsOutput, error) { + req, out := c.UpdateGlobalTableSettingsRequest(input) + return out, req.Send() +} + +// UpdateGlobalTableSettingsWithContext is the same as UpdateGlobalTableSettings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGlobalTableSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DynamoDB) UpdateGlobalTableSettingsWithContext(ctx aws.Context, input *UpdateGlobalTableSettingsInput, opts ...request.Option) (*UpdateGlobalTableSettingsOutput, error) { + req, out := c.UpdateGlobalTableSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateItem = "UpdateItem" // UpdateItemRequest generates a "aws/request.Request" representing the @@ -6165,6 +6396,79 @@ func (s *DescribeGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDesc return s } +type DescribeGlobalTableSettingsInput struct { + _ struct{} `type:"structure"` + + // The name of the global table to describe. + // + // GlobalTableName is a required field + GlobalTableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeGlobalTableSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalTableSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeGlobalTableSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalTableSettingsInput"} + if s.GlobalTableName == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) + } + if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *DescribeGlobalTableSettingsInput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsInput { + s.GlobalTableName = &v + return s +} + +type DescribeGlobalTableSettingsOutput struct { + _ struct{} `type:"structure"` + + // The name of the global table. + GlobalTableName *string `min:"3" type:"string"` + + // The region specific settings for the global table. + ReplicaSettings []*ReplicaSettingsDescription `type:"list"` +} + +// String returns the string representation +func (s DescribeGlobalTableSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalTableSettingsOutput) GoString() string { + return s.String() +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *DescribeGlobalTableSettingsOutput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsOutput { + s.GlobalTableName = &v + return s +} + +// SetReplicaSettings sets the ReplicaSettings field's value. +func (s *DescribeGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *DescribeGlobalTableSettingsOutput { + s.ReplicaSettings = v + return s +} + // Represents the input of a DescribeLimits operation. Has no content. type DescribeLimitsInput struct { _ struct{} `type:"structure"` @@ -7248,45 +7552,102 @@ func (s *GlobalTableDescription) SetReplicationGroup(v []*ReplicaDescription) *G return s } -// Information about item collections, if any, that were affected by the operation. -// ItemCollectionMetrics is only returned if the request asked for it. If the -// table does not have any local secondary indexes, this information is not -// returned in the response. -type ItemCollectionMetrics struct { +// Represents the settings of a global secondary index for a global table that +// will be modified. +type GlobalTableGlobalSecondaryIndexSettingsUpdate struct { _ struct{} `type:"structure"` - // The partition key value of the item collection. This value is the same as - // the partition key value of the item. - ItemCollectionKey map[string]*AttributeValue `type:"map"` - - // An estimate of item collection size, in gigabytes. This value is a two-element - // array containing a lower bound and an upper bound for the estimate. The estimate - // includes the size of all the items in the table, plus the size of all attributes - // projected into all of the local secondary indexes on that table. Use this - // estimate to measure whether a local secondary index is approaching its size - // limit. + // The name of the global secondary index. The name must be unique among all + // other indexes on this table. // - // The estimate is subject to change over time; therefore, do not rely on the - // precision or accuracy of the estimate. - SizeEstimateRangeGB []*float64 `type:"list"` + // IndexName is a required field + IndexName *string `min:"3" type:"string" required:"true"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. + ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` } // String returns the string representation -func (s ItemCollectionMetrics) String() string { +func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ItemCollectionMetrics) GoString() string { +func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) GoString() string { return s.String() } -// SetItemCollectionKey sets the ItemCollectionKey field's value. -func (s *ItemCollectionMetrics) SetItemCollectionKey(v map[string]*AttributeValue) *ItemCollectionMetrics { - s.ItemCollectionKey = v - return s -} - +// Validate inspects the fields of the type to determine if they are valid. +func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GlobalTableGlobalSecondaryIndexSettingsUpdate"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.ProvisionedWriteCapacityUnits != nil && *s.ProvisionedWriteCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("ProvisionedWriteCapacityUnits", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIndexName sets the IndexName field's value. +func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *GlobalTableGlobalSecondaryIndexSettingsUpdate { + s.IndexName = &v + return s +} + +// SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. +func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityUnits(v int64) *GlobalTableGlobalSecondaryIndexSettingsUpdate { + s.ProvisionedWriteCapacityUnits = &v + return s +} + +// Information about item collections, if any, that were affected by the operation. +// ItemCollectionMetrics is only returned if the request asked for it. If the +// table does not have any local secondary indexes, this information is not +// returned in the response. +type ItemCollectionMetrics struct { + _ struct{} `type:"structure"` + + // The partition key value of the item collection. This value is the same as + // the partition key value of the item. + ItemCollectionKey map[string]*AttributeValue `type:"map"` + + // An estimate of item collection size, in gigabytes. This value is a two-element + // array containing a lower bound and an upper bound for the estimate. The estimate + // includes the size of all the items in the table, plus the size of all attributes + // projected into all of the local secondary indexes on that table. Use this + // estimate to measure whether a local secondary index is approaching its size + // limit. + // + // The estimate is subject to change over time; therefore, do not rely on the + // precision or accuracy of the estimate. + SizeEstimateRangeGB []*float64 `type:"list"` +} + +// String returns the string representation +func (s ItemCollectionMetrics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ItemCollectionMetrics) GoString() string { + return s.String() +} + +// SetItemCollectionKey sets the ItemCollectionKey field's value. +func (s *ItemCollectionMetrics) SetItemCollectionKey(v map[string]*AttributeValue) *ItemCollectionMetrics { + s.ItemCollectionKey = v + return s +} + // SetSizeEstimateRangeGB sets the SizeEstimateRangeGB field's value. func (s *ItemCollectionMetrics) SetSizeEstimateRangeGB(v []*float64) *ItemCollectionMetrics { s.SizeEstimateRangeGB = v @@ -8144,13 +8505,11 @@ func (s *LocalSecondaryIndexInfo) SetProjection(v *Projection) *LocalSecondaryIn type PointInTimeRecoveryDescription struct { _ struct{} `type:"structure"` - // Specifies the earliest point in time you can restore your table to. It is - // equal to the maximum of point in time recovery enabled time and CurrentTime - // - PointInTimeRecoveryPeriod. + // Specifies the earliest point in time you can restore your table to. It You + // can restore your table to any point in time during the last 35 days. EarliestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` - // LatestRestorableDateTime is 5 minutes from now and there is a +/- 1 minute - // fuzziness on the restore times. + // LatestRestorableDateTime is typically 5 minutes before the current time. LatestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` // The current state of point in time recovery: @@ -9359,6 +9718,280 @@ func (s *ReplicaDescription) SetRegionName(v string) *ReplicaDescription { return s } +// Represents the properties of a global secondary index. +type ReplicaGlobalSecondaryIndexSettingsDescription struct { + _ struct{} `type:"structure"` + + // The name of the global secondary index. The name must be unique among all + // other indexes on this table. + // + // IndexName is a required field + IndexName *string `min:"3" type:"string" required:"true"` + + // The current status of the global secondary index: + // + // * CREATING - The global secondary index is being created. + // + // * UPDATING - The global secondary index is being updated. + // + // * DELETING - The global secondary index is being deleted. + // + // * ACTIVE - The global secondary index is ready for use. + IndexStatus *string `type:"string" enum:"IndexStatus"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. + ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. + ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsDescription) GoString() string { + return s.String() +} + +// SetIndexName sets the IndexName field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.IndexName = &v + return s +} + +// SetIndexStatus sets the IndexStatus field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.IndexStatus = &v + return s +} + +// SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.ProvisionedReadCapacityUnits = &v + return s +} + +// SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription { + s.ProvisionedWriteCapacityUnits = &v + return s +} + +// Represents the settings of a global secondary index for a global table that +// will be modified. +type ReplicaGlobalSecondaryIndexSettingsUpdate struct { + _ struct{} `type:"structure"` + + // The name of the global secondary index. The name must be unique among all + // other indexes on this table. + // + // IndexName is a required field + IndexName *string `min:"3" type:"string" required:"true"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. + ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaGlobalSecondaryIndexSettingsUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndexSettingsUpdate"} + if s.IndexName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexName")) + } + if s.IndexName != nil && len(*s.IndexName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 3)) + } + if s.ProvisionedReadCapacityUnits != nil && *s.ProvisionedReadCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("ProvisionedReadCapacityUnits", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIndexName sets the IndexName field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsUpdate { + s.IndexName = &v + return s +} + +// SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value. +func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsUpdate { + s.ProvisionedReadCapacityUnits = &v + return s +} + +// Represents the properties of a replica. +type ReplicaSettingsDescription struct { + _ struct{} `type:"structure"` + + // The region name of the replica. + // + // RegionName is a required field + RegionName *string `type:"string" required:"true"` + + // Replica global secondary index settings for the global table. + ReplicaGlobalSecondaryIndexSettings []*ReplicaGlobalSecondaryIndexSettingsDescription `type:"list"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. For more information, see Specifying + // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // in the Amazon DynamoDB Developer Guide. + ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. For more information, see Specifying Read and Write + // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // in the Amazon DynamoDB Developer Guide. + ReplicaProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` + + // The current state of the region: + // + // * CREATING - The region is being created. + // + // * UPDATING - The region is being updated. + // + // * DELETING - The region is being deleted. + // + // * ACTIVE - The region is ready for use. + ReplicaStatus *string `type:"string" enum:"ReplicaStatus"` +} + +// String returns the string representation +func (s ReplicaSettingsDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaSettingsDescription) GoString() string { + return s.String() +} + +// SetRegionName sets the RegionName field's value. +func (s *ReplicaSettingsDescription) SetRegionName(v string) *ReplicaSettingsDescription { + s.RegionName = &v + return s +} + +// SetReplicaGlobalSecondaryIndexSettings sets the ReplicaGlobalSecondaryIndexSettings field's value. +func (s *ReplicaSettingsDescription) SetReplicaGlobalSecondaryIndexSettings(v []*ReplicaGlobalSecondaryIndexSettingsDescription) *ReplicaSettingsDescription { + s.ReplicaGlobalSecondaryIndexSettings = v + return s +} + +// SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. +func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsDescription { + s.ReplicaProvisionedReadCapacityUnits = &v + return s +} + +// SetReplicaProvisionedWriteCapacityUnits sets the ReplicaProvisionedWriteCapacityUnits field's value. +func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityUnits(v int64) *ReplicaSettingsDescription { + s.ReplicaProvisionedWriteCapacityUnits = &v + return s +} + +// SetReplicaStatus sets the ReplicaStatus field's value. +func (s *ReplicaSettingsDescription) SetReplicaStatus(v string) *ReplicaSettingsDescription { + s.ReplicaStatus = &v + return s +} + +// Represents the settings for a global table in a region that will be modified. +type ReplicaSettingsUpdate struct { + _ struct{} `type:"structure"` + + // The region of the replica to be added. + // + // RegionName is a required field + RegionName *string `type:"string" required:"true"` + + // Represents the settings of a global secondary index for a global table that + // will be modified. + ReplicaGlobalSecondaryIndexSettingsUpdate []*ReplicaGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"` + + // The maximum number of strongly consistent reads consumed per second before + // DynamoDB returns a ThrottlingException. For more information, see Specifying + // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) + // in the Amazon DynamoDB Developer Guide. + ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` +} + +// String returns the string representation +func (s ReplicaSettingsUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicaSettingsUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicaSettingsUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicaSettingsUpdate"} + if s.RegionName == nil { + invalidParams.Add(request.NewErrParamRequired("RegionName")) + } + if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil && len(s.ReplicaGlobalSecondaryIndexSettingsUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReplicaGlobalSecondaryIndexSettingsUpdate", 1)) + } + if s.ReplicaProvisionedReadCapacityUnits != nil && *s.ReplicaProvisionedReadCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("ReplicaProvisionedReadCapacityUnits", 1)) + } + if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil { + for i, v := range s.ReplicaGlobalSecondaryIndexSettingsUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRegionName sets the RegionName field's value. +func (s *ReplicaSettingsUpdate) SetRegionName(v string) *ReplicaSettingsUpdate { + s.RegionName = &v + return s +} + +// SetReplicaGlobalSecondaryIndexSettingsUpdate sets the ReplicaGlobalSecondaryIndexSettingsUpdate field's value. +func (s *ReplicaSettingsUpdate) SetReplicaGlobalSecondaryIndexSettingsUpdate(v []*ReplicaGlobalSecondaryIndexSettingsUpdate) *ReplicaSettingsUpdate { + s.ReplicaGlobalSecondaryIndexSettingsUpdate = v + return s +} + +// SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value. +func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsUpdate { + s.ReplicaProvisionedReadCapacityUnits = &v + return s +} + // Represents one of the following: // // * A new replica to be added to an existing global table. @@ -11282,6 +11915,137 @@ func (s *UpdateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescri return s } +type UpdateGlobalTableSettingsInput struct { + _ struct{} `type:"structure"` + + // Represents the settings of a global secondary index for a global table that + // will be modified. + GlobalTableGlobalSecondaryIndexSettingsUpdate []*GlobalTableGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"` + + // The name of the global table + // + // GlobalTableName is a required field + GlobalTableName *string `min:"3" type:"string" required:"true"` + + // The maximum number of writes consumed per second before DynamoDB returns + // a ThrottlingException. + GlobalTableProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` + + // Represents the settings for a global table in a region that will be modified. + ReplicaSettingsUpdate []*ReplicaSettingsUpdate `min:"1" type:"list"` +} + +// String returns the string representation +func (s UpdateGlobalTableSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGlobalTableSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGlobalTableSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalTableSettingsInput"} + if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil && len(s.GlobalTableGlobalSecondaryIndexSettingsUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GlobalTableGlobalSecondaryIndexSettingsUpdate", 1)) + } + if s.GlobalTableName == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalTableName")) + } + if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3)) + } + if s.GlobalTableProvisionedWriteCapacityUnits != nil && *s.GlobalTableProvisionedWriteCapacityUnits < 1 { + invalidParams.Add(request.NewErrParamMinValue("GlobalTableProvisionedWriteCapacityUnits", 1)) + } + if s.ReplicaSettingsUpdate != nil && len(s.ReplicaSettingsUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReplicaSettingsUpdate", 1)) + } + if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil { + for i, v := range s.GlobalTableGlobalSecondaryIndexSettingsUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalTableGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ReplicaSettingsUpdate != nil { + for i, v := range s.ReplicaSettingsUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaSettingsUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalTableGlobalSecondaryIndexSettingsUpdate sets the GlobalTableGlobalSecondaryIndexSettingsUpdate field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableGlobalSecondaryIndexSettingsUpdate(v []*GlobalTableGlobalSecondaryIndexSettingsUpdate) *UpdateGlobalTableSettingsInput { + s.GlobalTableGlobalSecondaryIndexSettingsUpdate = v + return s +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsInput { + s.GlobalTableName = &v + return s +} + +// SetGlobalTableProvisionedWriteCapacityUnits sets the GlobalTableProvisionedWriteCapacityUnits field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityUnits(v int64) *UpdateGlobalTableSettingsInput { + s.GlobalTableProvisionedWriteCapacityUnits = &v + return s +} + +// SetReplicaSettingsUpdate sets the ReplicaSettingsUpdate field's value. +func (s *UpdateGlobalTableSettingsInput) SetReplicaSettingsUpdate(v []*ReplicaSettingsUpdate) *UpdateGlobalTableSettingsInput { + s.ReplicaSettingsUpdate = v + return s +} + +type UpdateGlobalTableSettingsOutput struct { + _ struct{} `type:"structure"` + + // The name of the global table. + GlobalTableName *string `min:"3" type:"string"` + + // The region specific settings for the global table. + ReplicaSettings []*ReplicaSettingsDescription `type:"list"` +} + +// String returns the string representation +func (s UpdateGlobalTableSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGlobalTableSettingsOutput) GoString() string { + return s.String() +} + +// SetGlobalTableName sets the GlobalTableName field's value. +func (s *UpdateGlobalTableSettingsOutput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsOutput { + s.GlobalTableName = &v + return s +} + +// SetReplicaSettings sets the ReplicaSettings field's value. +func (s *UpdateGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *UpdateGlobalTableSettingsOutput { + s.ReplicaSettings = v + return s +} + // Represents the input of an UpdateItem operation. type UpdateItemInput struct { _ struct{} `type:"structure"` @@ -12087,6 +12851,20 @@ const ( ProjectionTypeInclude = "INCLUDE" ) +const ( + // ReplicaStatusCreating is a ReplicaStatus enum value + ReplicaStatusCreating = "CREATING" + + // ReplicaStatusUpdating is a ReplicaStatus enum value + ReplicaStatusUpdating = "UPDATING" + + // ReplicaStatusDeleting is a ReplicaStatus enum value + ReplicaStatusDeleting = "DELETING" + + // ReplicaStatusActive is a ReplicaStatus enum value + ReplicaStatusActive = "ACTIVE" +) + // Determines the level of detail about provisioned throughput consumption that // is returned in the response: // diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go index 05b8470d2ee..5f6016521b0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go @@ -41,6 +41,12 @@ const ( // The specified global table does not exist. ErrCodeGlobalTableNotFoundException = "GlobalTableNotFoundException" + // ErrCodeIndexNotFoundException for service response error code + // "IndexNotFoundException". + // + // The operation tried to access a nonexistent index. + ErrCodeIndexNotFoundException = "IndexNotFoundException" + // ErrCodeInternalServerError for service response error code // "InternalServerError". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 28f434bbfff..68d90ad29e5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -2272,7 +2272,7 @@ func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequest // that Amazon EC2 starts on your behalf when the maximum price that you specify // exceeds the current Spot price. For more information, see Spot Instance Requests // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) in -// the Amazon Elastic Compute Cloud User Guide. +// the Amazon EC2 User Guide for Linux Instances. // // Canceling a Spot Instance request does not terminate running Spot Instances // associated with the request. @@ -3080,6 +3080,86 @@ func (c *EC2) CreateEgressOnlyInternetGatewayWithContext(ctx aws.Context, input return out, req.Send() } +const opCreateFleet = "CreateFleet" + +// CreateFleetRequest generates a "aws/request.Request" representing the +// client's request for the CreateFleet operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFleet for more information on using the CreateFleet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFleetRequest method. +// req, resp := client.CreateFleetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFleet +func (c *EC2) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, output *CreateFleetOutput) { + op := &request.Operation{ + Name: opCreateFleet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateFleetInput{} + } + + output = &CreateFleetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFleet API operation for Amazon Elastic Compute Cloud. +// +// Launches an EC2 Fleet. +// +// You can create a single EC2 Fleet that includes multiple launch specifications +// that vary by instance type, AMI, Availability Zone, or subnet. +// +// For more information, see Launching an EC2 Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-ec2-fleet.html) +// in the Amazon Elastic Compute Cloud User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateFleet for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFleet +func (c *EC2) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) { + req, out := c.CreateFleetRequest(input) + return out, req.Send() +} + +// CreateFleetWithContext is the same as CreateFleet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFleet for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInput, opts ...request.Option) (*CreateFleetOutput, error) { + req, out := c.CreateFleetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateFlowLogs = "CreateFlowLogs" // CreateFlowLogsRequest generates a "aws/request.Request" representing the @@ -4735,7 +4815,7 @@ func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSub // Creates a data feed for Spot Instances, enabling you to view Spot Instance // usage logs. You can create one data feed per AWS account. For more information, // see Spot Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5958,6 +6038,87 @@ func (c *EC2) DeleteEgressOnlyInternetGatewayWithContext(ctx aws.Context, input return out, req.Send() } +const opDeleteFleets = "DeleteFleets" + +// DeleteFleetsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFleets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFleets for more information on using the DeleteFleets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFleetsRequest method. +// req, resp := client.DeleteFleetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFleets +func (c *EC2) DeleteFleetsRequest(input *DeleteFleetsInput) (req *request.Request, output *DeleteFleetsOutput) { + op := &request.Operation{ + Name: opDeleteFleets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFleetsInput{} + } + + output = &DeleteFleetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFleets API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified EC2 Fleet. +// +// After you delete an EC2 Fleet, the EC2 Fleet launches no new instances. You +// must specify whether the EC2 Fleet should also terminate its instances. If +// you terminate the instances, the EC2 Fleet enters the deleted_terminating +// state. Otherwise, the EC2 Fleet enters the deleted_running state, and the +// instances continue to run until they are interrupted or you terminate them +// manually. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteFleets for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFleets +func (c *EC2) DeleteFleets(input *DeleteFleetsInput) (*DeleteFleetsOutput, error) { + req, out := c.DeleteFleetsRequest(input) + return out, req.Send() +} + +// DeleteFleetsWithContext is the same as DeleteFleets with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFleets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteFleetsWithContext(ctx aws.Context, input *DeleteFleetsInput, opts ...request.Option) (*DeleteFleetsOutput, error) { + req, out := c.DeleteFleetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteFlowLogs = "DeleteFlowLogs" // DeleteFlowLogsRequest generates a "aws/request.Request" representing the @@ -9177,6 +9338,228 @@ func (c *EC2) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExp return out, req.Send() } +const opDescribeFleetHistory = "DescribeFleetHistory" + +// DescribeFleetHistoryRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFleetHistory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeFleetHistory for more information on using the DescribeFleetHistory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeFleetHistoryRequest method. +// req, resp := client.DescribeFleetHistoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetHistory +func (c *EC2) DescribeFleetHistoryRequest(input *DescribeFleetHistoryInput) (req *request.Request, output *DescribeFleetHistoryOutput) { + op := &request.Operation{ + Name: opDescribeFleetHistory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFleetHistoryInput{} + } + + output = &DescribeFleetHistoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFleetHistory API operation for Amazon Elastic Compute Cloud. +// +// Describes the events for the specified EC2 Fleet during the specified time. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeFleetHistory for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetHistory +func (c *EC2) DescribeFleetHistory(input *DescribeFleetHistoryInput) (*DescribeFleetHistoryOutput, error) { + req, out := c.DescribeFleetHistoryRequest(input) + return out, req.Send() +} + +// DescribeFleetHistoryWithContext is the same as DescribeFleetHistory with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFleetHistory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeFleetHistoryWithContext(ctx aws.Context, input *DescribeFleetHistoryInput, opts ...request.Option) (*DescribeFleetHistoryOutput, error) { + req, out := c.DescribeFleetHistoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeFleetInstances = "DescribeFleetInstances" + +// DescribeFleetInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFleetInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeFleetInstances for more information on using the DescribeFleetInstances +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeFleetInstancesRequest method. +// req, resp := client.DescribeFleetInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetInstances +func (c *EC2) DescribeFleetInstancesRequest(input *DescribeFleetInstancesInput) (req *request.Request, output *DescribeFleetInstancesOutput) { + op := &request.Operation{ + Name: opDescribeFleetInstances, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFleetInstancesInput{} + } + + output = &DescribeFleetInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFleetInstances API operation for Amazon Elastic Compute Cloud. +// +// Describes the running instances for the specified EC2 Fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeFleetInstances for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetInstances +func (c *EC2) DescribeFleetInstances(input *DescribeFleetInstancesInput) (*DescribeFleetInstancesOutput, error) { + req, out := c.DescribeFleetInstancesRequest(input) + return out, req.Send() +} + +// DescribeFleetInstancesWithContext is the same as DescribeFleetInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFleetInstances for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeFleetInstancesWithContext(ctx aws.Context, input *DescribeFleetInstancesInput, opts ...request.Option) (*DescribeFleetInstancesOutput, error) { + req, out := c.DescribeFleetInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeFleets = "DescribeFleets" + +// DescribeFleetsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFleets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeFleets for more information on using the DescribeFleets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeFleetsRequest method. +// req, resp := client.DescribeFleetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleets +func (c *EC2) DescribeFleetsRequest(input *DescribeFleetsInput) (req *request.Request, output *DescribeFleetsOutput) { + op := &request.Operation{ + Name: opDescribeFleets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFleetsInput{} + } + + output = &DescribeFleetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFleets API operation for Amazon Elastic Compute Cloud. +// +// Describes the specified EC2 Fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeFleets for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleets +func (c *EC2) DescribeFleets(input *DescribeFleetsInput) (*DescribeFleetsOutput, error) { + req, out := c.DescribeFleetsRequest(input) + return out, req.Send() +} + +// DescribeFleetsWithContext is the same as DescribeFleets with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFleets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeFleetsWithContext(ctx aws.Context, input *DescribeFleetsInput, opts ...request.Option) (*DescribeFleetsOutput, error) { + req, out := c.DescribeFleetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeFlowLogs = "DescribeFlowLogs" // DescribeFlowLogsRequest generates a "aws/request.Request" representing the @@ -12931,7 +13314,7 @@ func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafee // // Describes the data feed for Spot Instances. For more information, see Spot // Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -13295,7 +13678,7 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq // are instances that Amazon EC2 launches when the Spot price that you specify // exceeds the current Spot price. For more information, see Spot Instance Requests // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) in -// the Amazon Elastic Compute Cloud User Guide. +// the Amazon EC2 User Guide for Linux Instances. // // You can use DescribeSpotInstanceRequests to find a running Spot Instance // by examining the response. If the status of the Spot Instance is fulfilled, @@ -13303,8 +13686,8 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq // instance. Alternatively, you can use DescribeInstances with a filter to look // for instances where the instance lifecycle is spot. // -// Spot Instance requests are deleted 4 hours after they are canceled and their -// instances are terminated. +// Spot Instance requests are deleted four hours after they are canceled and +// their instances are terminated. // // 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 @@ -13386,7 +13769,7 @@ func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInp // // Describes the Spot price history. For more information, see Spot Instance // Pricing History (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // When you specify a start and end time, this operation returns the prices // of the instance types within the time range that you specified and the time @@ -17426,6 +17809,82 @@ func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, return out, req.Send() } +const opModifyFleet = "ModifyFleet" + +// ModifyFleetRequest generates a "aws/request.Request" representing the +// client's request for the ModifyFleet operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyFleet for more information on using the ModifyFleet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyFleetRequest method. +// req, resp := client.ModifyFleetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFleet +func (c *EC2) ModifyFleetRequest(input *ModifyFleetInput) (req *request.Request, output *ModifyFleetOutput) { + op := &request.Operation{ + Name: opModifyFleet, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyFleetInput{} + } + + output = &ModifyFleetOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyFleet API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified EC2 Fleet. +// +// While the EC2 Fleet is being modified, it is in the modifying state. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyFleet for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFleet +func (c *EC2) ModifyFleet(input *ModifyFleetInput) (*ModifyFleetOutput, error) { + req, out := c.ModifyFleetRequest(input) + return out, req.Send() +} + +// ModifyFleetWithContext is the same as ModifyFleet with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyFleet for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyFleetWithContext(ctx aws.Context, input *ModifyFleetInput, opts ...request.Option) (*ModifyFleetOutput, error) { + req, out := c.ModifyFleetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute" // ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the @@ -17910,6 +18369,12 @@ func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput // Modifies the specified attribute of the specified instance. You can specify // only one attribute at a time. // +// Note: Using this action to change the security groups associated with an +// elastic network interface (ENI) attached to an instance in a VPC can result +// in an error if the instance has more than one ENI. To change the security +// groups associated with an ENI attached to an instance that has multiple ENIs, +// we recommend that you use the ModifyNetworkInterfaceAttribute action. +// // To modify some attributes, the instance must be stopped. For more information, // see Modifying Attributes of a Stopped Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -20806,6 +21271,10 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques // // Creates a Spot Fleet request. // +// The Spot Fleet request specifies the total target capacity and the On-Demand +// target capacity. Amazon EC2 calculates the difference between the total capacity +// and On-Demand capacity, and launches the difference as Spot capacity. +// // You can submit a single request that includes multiple launch specifications // that vary by instance type, AMI, Availability Zone, or subnet. // @@ -20820,10 +21289,11 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques // pools, you can improve the availability of your fleet. // // You can specify tags for the Spot Instances. You cannot tag other resource -// types in a Spot Fleet request; only the instance resource type is supported. +// types in a Spot Fleet request because only the instance resource type is +// supported. // // For more information, see Spot Fleet Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -20900,7 +21370,7 @@ func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req // Creates a Spot Instance request. Spot Instances are instances that Amazon // EC2 launches when the maximum price that you specify exceeds the current // Spot price. For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide for Linux Instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -26628,9 +27098,9 @@ type CopySnapshotInput struct { // will eventually fail. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The pre-signed URL parameter is required when copying an encrypted snapshot - // with the Amazon EC2 Query API; it is available as an optional parameter in - // all other cases. For more information, see Query Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). + // When you copy an encrypted source snapshot using the Amazon EC2 Query API, + // you must supply a pre-signed URL. This parameter is optional for unencrypted + // snapshots. For more information, see Query Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). // // The PresignedUrl should use the snapshot source endpoint, the CopySnapshot // action, and include the SourceRegion, SourceSnapshotId, and DestinationRegion @@ -27150,6 +27620,205 @@ func (s *CreateEgressOnlyInternetGatewayOutput) SetEgressOnlyInternetGateway(v * return s } +type CreateFleetInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Indicates whether running instances should be terminated if the total target + // capacity of the EC2 Fleet is decreased below the current size of the EC2 + // Fleet. + ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The configuration for the EC2 Fleet. + // + // LaunchTemplateConfigs is a required field + LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` + + // Indicates whether EC2 Fleet should replace unhealthy instances. + ReplaceUnhealthyInstances *bool `type:"boolean"` + + // Includes SpotAllocationStrategy and SpotInstanceInterruptionBehavior inside + // this structure. + SpotOptions *SpotOptionsRequest `type:"structure"` + + // The tags for an EC2 Fleet resource. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The TotalTargetCapacity, OnDemandTargetCapacity, SpotTargetCapacity, and + // DefaultCapacityType structure. + // + // TargetCapacitySpecification is a required field + TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` + + // Indicates whether running instances should be terminated when the EC2 Fleet + // expires. + TerminateInstancesWithExpiration *bool `type:"boolean"` + + // The type of request. Indicates whether the EC2 Fleet only requests the target + // capacity, or also attempts to maintain it. If you request a certain target + // capacity, EC2 Fleet only places the required requests. It does not attempt + // to replenish instances if capacity is diminished, and does not submit requests + // in alternative capacity pools if capacity is unavailable. To maintain a certain + // target capacity, EC2 Fleet places the required requests to meet this target + // capacity. It also automatically replenishes any interrupted Spot Instances. + // Default: maintain. + Type *string `type:"string" enum:"FleetType"` + + // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The default is to start fulfilling the request immediately. + ValidFrom *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // At this point, no new EC2 Fleet requests are placed or able to fulfill the + // request. The default end date is 7 days from the current date. + ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` +} + +// String returns the string representation +func (s CreateFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} + if s.LaunchTemplateConfigs == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchTemplateConfigs")) + } + if s.TargetCapacitySpecification == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) + } + if s.LaunchTemplateConfigs != nil { + for i, v := range s.LaunchTemplateConfigs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TargetCapacitySpecification != nil { + if err := s.TargetCapacitySpecification.Validate(); err != nil { + invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateFleetInput) SetClientToken(v string) *CreateFleetInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateFleetInput) SetDryRun(v bool) *CreateFleetInput { + s.DryRun = &v + return s +} + +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *CreateFleetInput) SetExcessCapacityTerminationPolicy(v string) *CreateFleetInput { + s.ExcessCapacityTerminationPolicy = &v + return s +} + +// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. +func (s *CreateFleetInput) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfigRequest) *CreateFleetInput { + s.LaunchTemplateConfigs = v + return s +} + +// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. +func (s *CreateFleetInput) SetReplaceUnhealthyInstances(v bool) *CreateFleetInput { + s.ReplaceUnhealthyInstances = &v + return s +} + +// SetSpotOptions sets the SpotOptions field's value. +func (s *CreateFleetInput) SetSpotOptions(v *SpotOptionsRequest) *CreateFleetInput { + s.SpotOptions = v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateFleetInput) SetTagSpecifications(v []*TagSpecification) *CreateFleetInput { + s.TagSpecifications = v + return s +} + +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *CreateFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *CreateFleetInput { + s.TargetCapacitySpecification = v + return s +} + +// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. +func (s *CreateFleetInput) SetTerminateInstancesWithExpiration(v bool) *CreateFleetInput { + s.TerminateInstancesWithExpiration = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateFleetInput) SetType(v string) *CreateFleetInput { + s.Type = &v + return s +} + +// SetValidFrom sets the ValidFrom field's value. +func (s *CreateFleetInput) SetValidFrom(v time.Time) *CreateFleetInput { + s.ValidFrom = &v + return s +} + +// SetValidUntil sets the ValidUntil field's value. +func (s *CreateFleetInput) SetValidUntil(v time.Time) *CreateFleetInput { + s.ValidUntil = &v + return s +} + +type CreateFleetOutput struct { + _ struct{} `type:"structure"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` +} + +// String returns the string representation +func (s CreateFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetOutput) GoString() string { + return s.String() +} + +// SetFleetId sets the FleetId field's value. +func (s *CreateFleetOutput) SetFleetId(v string) *CreateFleetOutput { + s.FleetId = &v + return s +} + // Contains the parameters for CreateFlowLogs. type CreateFlowLogsInput struct { _ struct{} `type:"structure"` @@ -29542,11 +30211,11 @@ type CreateVolumeInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // Only valid for Provisioned IOPS SSD volumes. The number of I/O operations - // per second (IOPS) to provision for the volume, with a maximum ratio of 50 - // IOPS/GiB. + // The number of I/O operations per second (IOPS) to provision for the volume, + // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 32000 IOPS for volumes + // in most regions. For exceptions, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). // - // Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes + // This parameter is valid only for Provisioned IOPS SSD (io1) volumes. Iops *int64 `type:"integer"` // An identifier for the AWS Key Management Service (AWS KMS) customer master @@ -29596,7 +30265,10 @@ type CreateVolumeInput struct { // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard // for Magnetic volumes. // - // Default: standard + // Defaults: If no volume type is specified, the default is standard in us-east-1, + // eu-west-1, eu-central-1, us-west-2, us-west-1, sa-east-1, ap-northeast-1, + // ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-south-1, us-gov-west-1, + // and cn-north-1. In all other regions, EBS defaults to gp2. VolumeType *string `type:"string" enum:"VolumeType"` } @@ -30972,6 +31644,211 @@ func (s *DeleteEgressOnlyInternetGatewayOutput) SetReturnCode(v bool) *DeleteEgr return s } +// Describes an EC2 Fleet error. +type DeleteFleetError struct { + _ struct{} `type:"structure"` + + // The error code. + Code *string `locationName:"code" type:"string" enum:"DeleteFleetErrorCode"` + + // The description for the error code. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s DeleteFleetError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetError) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *DeleteFleetError) SetCode(v string) *DeleteFleetError { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *DeleteFleetError) SetMessage(v string) *DeleteFleetError { + s.Message = &v + return s +} + +// Describes an EC2 Fleet that was not successfully deleted. +type DeleteFleetErrorItem struct { + _ struct{} `type:"structure"` + + // The error. + Error *DeleteFleetError `locationName:"error" type:"structure"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` +} + +// String returns the string representation +func (s DeleteFleetErrorItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetErrorItem) GoString() string { + return s.String() +} + +// SetError sets the Error field's value. +func (s *DeleteFleetErrorItem) SetError(v *DeleteFleetError) *DeleteFleetErrorItem { + s.Error = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DeleteFleetErrorItem) SetFleetId(v string) *DeleteFleetErrorItem { + s.FleetId = &v + return s +} + +// Describes an EC2 Fleet that was successfully deleted. +type DeleteFleetSuccessItem struct { + _ struct{} `type:"structure"` + + // The current state of the EC2 Fleet. + CurrentFleetState *string `locationName:"currentFleetState" type:"string" enum:"FleetStateCode"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The previous state of the EC2 Fleet. + PreviousFleetState *string `locationName:"previousFleetState" type:"string" enum:"FleetStateCode"` +} + +// String returns the string representation +func (s DeleteFleetSuccessItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetSuccessItem) GoString() string { + return s.String() +} + +// SetCurrentFleetState sets the CurrentFleetState field's value. +func (s *DeleteFleetSuccessItem) SetCurrentFleetState(v string) *DeleteFleetSuccessItem { + s.CurrentFleetState = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DeleteFleetSuccessItem) SetFleetId(v string) *DeleteFleetSuccessItem { + s.FleetId = &v + return s +} + +// SetPreviousFleetState sets the PreviousFleetState field's value. +func (s *DeleteFleetSuccessItem) SetPreviousFleetState(v string) *DeleteFleetSuccessItem { + s.PreviousFleetState = &v + return s +} + +type DeleteFleetsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IDs of the EC2 Fleets. + // + // FleetIds is a required field + FleetIds []*string `locationName:"FleetId" type:"list" required:"true"` + + // Indicates whether to terminate instances for an EC2 Fleet if it is deleted + // successfully. + // + // TerminateInstances is a required field + TerminateInstances *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s DeleteFleetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFleetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFleetsInput"} + if s.FleetIds == nil { + invalidParams.Add(request.NewErrParamRequired("FleetIds")) + } + if s.TerminateInstances == nil { + invalidParams.Add(request.NewErrParamRequired("TerminateInstances")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteFleetsInput) SetDryRun(v bool) *DeleteFleetsInput { + s.DryRun = &v + return s +} + +// SetFleetIds sets the FleetIds field's value. +func (s *DeleteFleetsInput) SetFleetIds(v []*string) *DeleteFleetsInput { + s.FleetIds = v + return s +} + +// SetTerminateInstances sets the TerminateInstances field's value. +func (s *DeleteFleetsInput) SetTerminateInstances(v bool) *DeleteFleetsInput { + s.TerminateInstances = &v + return s +} + +type DeleteFleetsOutput struct { + _ struct{} `type:"structure"` + + // Information about the EC2 Fleets that are successfully deleted. + SuccessfulFleetDeletions []*DeleteFleetSuccessItem `locationName:"successfulFleetDeletionSet" locationNameList:"item" type:"list"` + + // Information about the EC2 Fleets that are not successfully deleted. + UnsuccessfulFleetDeletions []*DeleteFleetErrorItem `locationName:"unsuccessfulFleetDeletionSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DeleteFleetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetsOutput) GoString() string { + return s.String() +} + +// SetSuccessfulFleetDeletions sets the SuccessfulFleetDeletions field's value. +func (s *DeleteFleetsOutput) SetSuccessfulFleetDeletions(v []*DeleteFleetSuccessItem) *DeleteFleetsOutput { + s.SuccessfulFleetDeletions = v + return s +} + +// SetUnsuccessfulFleetDeletions sets the UnsuccessfulFleetDeletions field's value. +func (s *DeleteFleetsOutput) SetUnsuccessfulFleetDeletions(v []*DeleteFleetErrorItem) *DeleteFleetsOutput { + s.UnsuccessfulFleetDeletions = v + return s +} + // Contains the parameters for DeleteFlowLogs. type DeleteFlowLogsInput struct { _ struct{} `type:"structure"` @@ -34142,6 +35019,378 @@ func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExp return s } +type DescribeFleetHistoryInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The type of events to describe. By default, all events are described. + EventType *string `type:"string" enum:"FleetEventType"` + + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` + + // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // + // StartTime is a required field + StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` +} + +// String returns the string representation +func (s DescribeFleetHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetHistoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetHistoryInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeFleetHistoryInput) SetDryRun(v bool) *DescribeFleetHistoryInput { + s.DryRun = &v + return s +} + +// SetEventType sets the EventType field's value. +func (s *DescribeFleetHistoryInput) SetEventType(v string) *DescribeFleetHistoryInput { + s.EventType = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetHistoryInput) SetFleetId(v string) *DescribeFleetHistoryInput { + s.FleetId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetHistoryInput) SetMaxResults(v int64) *DescribeFleetHistoryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetHistoryInput) SetNextToken(v string) *DescribeFleetHistoryInput { + s.NextToken = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeFleetHistoryInput) SetStartTime(v time.Time) *DescribeFleetHistoryInput { + s.StartTime = &v + return s +} + +type DescribeFleetHistoryOutput struct { + _ struct{} `type:"structure"` + + // The ID of the EC Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // Information about the events in the history of the EC2 Fleet. + HistoryRecords []*HistoryRecordEntry `locationName:"historyRecordSet" locationNameList:"item" type:"list"` + + // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // All records up to this time were retrieved. + // + // If nextToken indicates that there are more results, this value is not present. + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" timestampFormat:"iso8601"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` +} + +// String returns the string representation +func (s DescribeFleetHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetHistoryOutput) GoString() string { + return s.String() +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetHistoryOutput) SetFleetId(v string) *DescribeFleetHistoryOutput { + s.FleetId = &v + return s +} + +// SetHistoryRecords sets the HistoryRecords field's value. +func (s *DescribeFleetHistoryOutput) SetHistoryRecords(v []*HistoryRecordEntry) *DescribeFleetHistoryOutput { + s.HistoryRecords = v + return s +} + +// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. +func (s *DescribeFleetHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeFleetHistoryOutput { + s.LastEvaluatedTime = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetHistoryOutput) SetNextToken(v string) *DescribeFleetHistoryOutput { + s.NextToken = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeFleetHistoryOutput) SetStartTime(v time.Time) *DescribeFleetHistoryOutput { + s.StartTime = &v + return s +} + +type DescribeFleetInstancesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeFleetInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetInstancesInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeFleetInstancesInput) SetDryRun(v bool) *DescribeFleetInstancesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeFleetInstancesInput) SetFilters(v []*Filter) *DescribeFleetInstancesInput { + s.Filters = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetInstancesInput) SetFleetId(v string) *DescribeFleetInstancesInput { + s.FleetId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetInstancesInput) SetMaxResults(v int64) *DescribeFleetInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetInstancesInput) SetNextToken(v string) *DescribeFleetInstancesInput { + s.NextToken = &v + return s +} + +type DescribeFleetInstancesOutput struct { + _ struct{} `type:"structure"` + + // The running instances. This list is refreshed periodically and might be out + // of date. + ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeFleetInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetInstancesOutput) GoString() string { + return s.String() +} + +// SetActiveInstances sets the ActiveInstances field's value. +func (s *DescribeFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeFleetInstancesOutput { + s.ActiveInstances = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetInstancesOutput) SetFleetId(v string) *DescribeFleetInstancesOutput { + s.FleetId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetInstancesOutput) SetNextToken(v string) *DescribeFleetInstancesOutput { + s.NextToken = &v + return s +} + +type DescribeFleetsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The ID of the EC2 Fleets. + FleetIds []*string `locationName:"FleetId" type:"list"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeFleetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeFleetsInput) SetDryRun(v bool) *DescribeFleetsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeFleetsInput) SetFilters(v []*Filter) *DescribeFleetsInput { + s.Filters = v + return s +} + +// SetFleetIds sets the FleetIds field's value. +func (s *DescribeFleetsInput) SetFleetIds(v []*string) *DescribeFleetsInput { + s.FleetIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetsInput) SetMaxResults(v int64) *DescribeFleetsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetsInput) SetNextToken(v string) *DescribeFleetsInput { + s.NextToken = &v + return s +} + +type DescribeFleetsOutput struct { + _ struct{} `type:"structure"` + + // The EC2 Fleets. + Fleets []*FleetData `locationName:"fleetSet" locationNameList:"item" type:"list"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeFleetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetsOutput) GoString() string { + return s.String() +} + +// SetFleets sets the Fleets field's value. +func (s *DescribeFleetsOutput) SetFleets(v []*FleetData) *DescribeFleetsOutput { + s.Fleets = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetsOutput) SetNextToken(v string) *DescribeFleetsOutput { + s.NextToken = &v + return s +} + // Contains the parameters for DescribeFlowLogs. type DescribeFlowLogsInput struct { _ struct{} `type:"structure"` @@ -34699,21 +35948,21 @@ type DescribeHostsInput struct { // One or more filters. // - // * instance-type - The instance type size that the Dedicated Host is configured - // to support. - // // * auto-placement - Whether auto-placement is enabled or disabled (on | // off). // + // * availability-zone - The Availability Zone of the host. + // + // * client-token - The idempotency token you provided when you allocated + // the host. + // // * host-reservation-id - The ID of the reservation assigned to this host. // - // * client-token - The idempotency token you provided when you launched - // the instance + // * instance-type - The instance type size that the Dedicated Host is configured + // to support. // - // * state- The allocation state of the Dedicated Host (available | under-assessment + // * state - The allocation state of the Dedicated Host (available | under-assessment // | permanent-failure | released | released-permanent-failure). - // - // * availability-zone - The Availability Zone of the host. Filter []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches. @@ -39582,8 +40831,8 @@ func (s *DescribeSpotFleetInstancesInput) SetSpotFleetRequestId(v string) *Descr type DescribeSpotFleetInstancesOutput struct { _ struct{} `type:"structure"` - // The running instances. Note that this list is refreshed periodically and - // might be out of date. + // The running instances. This list is refreshed periodically and might be out + // of date. // // ActiveInstances is a required field ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list" required:"true"` @@ -39924,7 +41173,9 @@ type DescribeSpotInstanceRequestsInput struct { // for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput // Optimized HDD, sc1for Cold HDD, or standard for Magnetic. // - // * launch.group-id - The security group for the instance. + // * launch.group-id - The ID of the security group for the instance. + // + // * launch.group-name - The name of the security group for the instance. // // * launch.image-id - The ID of the AMI. // @@ -39975,7 +41226,7 @@ type DescribeSpotInstanceRequestsInput struct { // | cancelled | failed). Spot request status information can help you track // your Amazon EC2 Spot Instance requests. For more information, see Spot // Request Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide for Linux Instances. // // * status-code - The short code describing the most recent evaluation of // your Spot Instance request. @@ -40093,9 +41344,9 @@ type DescribeSpotPriceHistoryInput struct { // * spot-price - The Spot price. The value must match exactly (or use wildcards; // greater than or less than comparison is not supported). // - // * timestamp - The timestamp of the Spot price history, in UTC format (for - // example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater - // than or less than comparison is not supported. + // * timestamp - The time stamp of the Spot price history, in UTC format + // (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). + // Greater than or less than comparison is not supported. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // Filters the results by the specified instance types. @@ -40806,8 +42057,7 @@ type DescribeVolumesInput struct { // * attachment.instance-id - The ID of the instance the volume is attached // to. // - // * attachment.status - The attachment state (attaching | attached | detaching - // | detached). + // * attachment.status - The attachment state (attaching | attached | detaching). // // * availability-zone - The Availability Zone in which the volume was created. // @@ -44434,9 +45684,9 @@ type EventInformation struct { // * cancelled - The Spot Fleet is canceled and has no running Spot Instances. // The Spot Fleet will be deleted two days after its instances were terminated. // - // * cancelled_running - The Spot Fleet is canceled and will not launch additional - // Spot Instances, but its existing Spot Instances continue to run until - // they are interrupted or terminated. + // * cancelled_running - The Spot Fleet is canceled and does not launch additional + // Spot Instances. Existing Spot Instances continue to run until they are + // interrupted or terminated. // // * cancelled_terminating - The Spot Fleet is canceled and its Spot Instances // are terminating. @@ -44682,8 +45932,30 @@ func (s *ExportToS3TaskSpecification) SetS3Prefix(v string) *ExportToS3TaskSpeci } // A filter name and value pair that is used to return a more specific list -// of results. Filters can be used to match a set of resources by various criteria, -// such as tags, attributes, or IDs. +// of results from a describe operation. Filters can be used to match a set +// of resources by specific criteria, such as tags, attributes, or IDs. The +// filters supported by a describe operation are documented with the describe +// operation. For example: +// +// * DescribeAvailabilityZones +// +// * DescribeImages +// +// * DescribeInstances +// +// * DescribeKeyPairs +// +// * DescribeSecurityGroups +// +// * DescribeSnapshots +// +// * DescribeSubnets +// +// * DescribeTags +// +// * DescribeVolumes +// +// * DescribeVpcs type Filter struct { _ struct{} `type:"structure"` @@ -44716,6 +45988,403 @@ func (s *Filter) SetValues(v []*string) *Filter { return s } +// Describes an EC2 Fleet. +type FleetData struct { + _ struct{} `type:"structure"` + + // The progress of the EC2 Fleet. If there is an error, the status is error. + // After all requests are placed, the status is pending_fulfillment. If the + // size of the EC2 Fleet is equal to or greater than its target capacity, the + // status is fulfilled. If the size of the EC2 Fleet is decreased, the status + // is pending_termination while instances are terminating. + ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"FleetActivityStatus"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // + // Constraints: Maximum 64 ASCII characters + ClientToken *string `locationName:"clientToken" type:"string"` + + // The creation date and time of the EC2 Fleet. + CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + + // Indicates whether running instances should be terminated if the target capacity + // of the EC2 Fleet is decreased below the current size of the EC2 Fleet. + ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The state of the EC2 Fleet. + FleetState *string `locationName:"fleetState" type:"string" enum:"FleetStateCode"` + + // The number of units fulfilled by this request compared to the set target + // capacity. + FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` + + // The number of units fulfilled by this request compared to the set target + // On-Demand capacity. + FulfilledOnDemandCapacity *float64 `locationName:"fulfilledOnDemandCapacity" type:"double"` + + // The launch template and overrides. + LaunchTemplateConfigs []*FleetLaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` + + // Indicates whether EC2 Fleet should replace unhealthy instances. + ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` + + // The configuration of Spot Instances in an EC2 Fleet. + SpotOptions *SpotOptions `locationName:"spotOptions" type:"structure"` + + // The tags for an EC2 Fleet resource. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The number of units to request. You can choose to set the target capacity + // in terms of instances or a performance characteristic that is important to + // your application workload, such as vCPUs, memory, or I/O. If the request + // type is maintain, you can specify a target capacity of 0 and add capacity + // later. + TargetCapacitySpecification *TargetCapacitySpecification `locationName:"targetCapacitySpecification" type:"structure"` + + // Indicates whether running instances should be terminated when the EC2 Fleet + // expires. + TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` + + // The type of request. Indicates whether the EC2 Fleet only requests the target + // capacity, or also attempts to maintain it. If you request a certain target + // capacity, EC2 Fleet only places the required requests; it does not attempt + // to replenish instances if capacity is diminished, and does not submit requests + // in alternative capacity pools if capacity is unavailable. To maintain a certain + // target capacity, EC2 Fleet places the required requests to meet this target + // capacity. It also automatically replenishes any interrupted Spot Instances. + // Default: maintain. + Type *string `locationName:"type" type:"string" enum:"FleetType"` + + // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The default is to start fulfilling the request immediately. + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + + // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // At this point, no new instance requests are placed or able to fulfill the + // request. The default end date is 7 days from the current date. + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` +} + +// String returns the string representation +func (s FleetData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetData) GoString() string { + return s.String() +} + +// SetActivityStatus sets the ActivityStatus field's value. +func (s *FleetData) SetActivityStatus(v string) *FleetData { + s.ActivityStatus = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *FleetData) SetClientToken(v string) *FleetData { + s.ClientToken = &v + return s +} + +// SetCreateTime sets the CreateTime field's value. +func (s *FleetData) SetCreateTime(v time.Time) *FleetData { + s.CreateTime = &v + return s +} + +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *FleetData) SetExcessCapacityTerminationPolicy(v string) *FleetData { + s.ExcessCapacityTerminationPolicy = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *FleetData) SetFleetId(v string) *FleetData { + s.FleetId = &v + return s +} + +// SetFleetState sets the FleetState field's value. +func (s *FleetData) SetFleetState(v string) *FleetData { + s.FleetState = &v + return s +} + +// SetFulfilledCapacity sets the FulfilledCapacity field's value. +func (s *FleetData) SetFulfilledCapacity(v float64) *FleetData { + s.FulfilledCapacity = &v + return s +} + +// SetFulfilledOnDemandCapacity sets the FulfilledOnDemandCapacity field's value. +func (s *FleetData) SetFulfilledOnDemandCapacity(v float64) *FleetData { + s.FulfilledOnDemandCapacity = &v + return s +} + +// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. +func (s *FleetData) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfig) *FleetData { + s.LaunchTemplateConfigs = v + return s +} + +// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. +func (s *FleetData) SetReplaceUnhealthyInstances(v bool) *FleetData { + s.ReplaceUnhealthyInstances = &v + return s +} + +// SetSpotOptions sets the SpotOptions field's value. +func (s *FleetData) SetSpotOptions(v *SpotOptions) *FleetData { + s.SpotOptions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *FleetData) SetTags(v []*Tag) *FleetData { + s.Tags = v + return s +} + +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *FleetData) SetTargetCapacitySpecification(v *TargetCapacitySpecification) *FleetData { + s.TargetCapacitySpecification = v + return s +} + +// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. +func (s *FleetData) SetTerminateInstancesWithExpiration(v bool) *FleetData { + s.TerminateInstancesWithExpiration = &v + return s +} + +// SetType sets the Type field's value. +func (s *FleetData) SetType(v string) *FleetData { + s.Type = &v + return s +} + +// SetValidFrom sets the ValidFrom field's value. +func (s *FleetData) SetValidFrom(v time.Time) *FleetData { + s.ValidFrom = &v + return s +} + +// SetValidUntil sets the ValidUntil field's value. +func (s *FleetData) SetValidUntil(v time.Time) *FleetData { + s.ValidUntil = &v + return s +} + +// Describes a launch template and overrides. +type FleetLaunchTemplateConfig struct { + _ struct{} `type:"structure"` + + // The launch template. + LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` + + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides []*FleetLaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s FleetLaunchTemplateConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateConfig) GoString() string { + return s.String() +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *FleetLaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *FleetLaunchTemplateConfig { + s.LaunchTemplateSpecification = v + return s +} + +// SetOverrides sets the Overrides field's value. +func (s *FleetLaunchTemplateConfig) SetOverrides(v []*FleetLaunchTemplateOverrides) *FleetLaunchTemplateConfig { + s.Overrides = v + return s +} + +// Describes a launch template and overrides. +type FleetLaunchTemplateConfigRequest struct { + _ struct{} `type:"structure"` + + // The launch template to use. You must specify either the launch template ID + // or launch template name in the request. + LaunchTemplateSpecification *FleetLaunchTemplateSpecificationRequest `type:"structure"` + + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides []*FleetLaunchTemplateOverridesRequest `locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s FleetLaunchTemplateConfigRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateConfigRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FleetLaunchTemplateConfigRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateConfigRequest"} + if s.LaunchTemplateSpecification != nil { + if err := s.LaunchTemplateSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *FleetLaunchTemplateConfigRequest) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecificationRequest) *FleetLaunchTemplateConfigRequest { + s.LaunchTemplateSpecification = v + return s +} + +// SetOverrides sets the Overrides field's value. +func (s *FleetLaunchTemplateConfigRequest) SetOverrides(v []*FleetLaunchTemplateOverridesRequest) *FleetLaunchTemplateConfigRequest { + s.Overrides = v + return s +} + +// Describes overrides for a launch template. +type FleetLaunchTemplateOverrides struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to launch the instances. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + MaxPrice *string `locationName:"maxPrice" type:"string"` + + // The ID of the subnet in which to launch the instances. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The number of units provided by the specified instance type. + WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` +} + +// String returns the string representation +func (s FleetLaunchTemplateOverrides) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateOverrides) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *FleetLaunchTemplateOverrides) SetAvailabilityZone(v string) *FleetLaunchTemplateOverrides { + s.AvailabilityZone = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *FleetLaunchTemplateOverrides) SetInstanceType(v string) *FleetLaunchTemplateOverrides { + s.InstanceType = &v + return s +} + +// SetMaxPrice sets the MaxPrice field's value. +func (s *FleetLaunchTemplateOverrides) SetMaxPrice(v string) *FleetLaunchTemplateOverrides { + s.MaxPrice = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *FleetLaunchTemplateOverrides) SetSubnetId(v string) *FleetLaunchTemplateOverrides { + s.SubnetId = &v + return s +} + +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *FleetLaunchTemplateOverrides) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverrides { + s.WeightedCapacity = &v + return s +} + +// Describes overrides for a launch template. +type FleetLaunchTemplateOverridesRequest struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to launch the instances. + AvailabilityZone *string `type:"string"` + + // The instance type. + InstanceType *string `type:"string" enum:"InstanceType"` + + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + MaxPrice *string `type:"string"` + + // The ID of the subnet in which to launch the instances. + SubnetId *string `type:"string"` + + // The number of units provided by the specified instance type. + WeightedCapacity *float64 `type:"double"` +} + +// String returns the string representation +func (s FleetLaunchTemplateOverridesRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateOverridesRequest) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetAvailabilityZone(v string) *FleetLaunchTemplateOverridesRequest { + s.AvailabilityZone = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetInstanceType(v string) *FleetLaunchTemplateOverridesRequest { + s.InstanceType = &v + return s +} + +// SetMaxPrice sets the MaxPrice field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetMaxPrice(v string) *FleetLaunchTemplateOverridesRequest { + s.MaxPrice = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetSubnetId(v string) *FleetLaunchTemplateOverridesRequest { + s.SubnetId = &v + return s +} + +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverridesRequest { + s.WeightedCapacity = &v + return s +} + // Describes a launch template. type FleetLaunchTemplateSpecification struct { _ struct{} `type:"structure"` @@ -44774,6 +46443,62 @@ func (s *FleetLaunchTemplateSpecification) SetVersion(v string) *FleetLaunchTemp return s } +// The launch template to use. You must specify either the launch template ID +// or launch template name in the request. +type FleetLaunchTemplateSpecificationRequest struct { + _ struct{} `type:"structure"` + + // The ID of the launch template. + LaunchTemplateId *string `type:"string"` + + // The name of the launch template. + LaunchTemplateName *string `min:"3" type:"string"` + + // The version number of the launch template. + Version *string `type:"string"` +} + +// String returns the string representation +func (s FleetLaunchTemplateSpecificationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetLaunchTemplateSpecificationRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FleetLaunchTemplateSpecificationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecificationRequest"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecificationRequest { + s.LaunchTemplateId = &v + return s +} + +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecificationRequest { + s.LaunchTemplateName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetVersion(v string) *FleetLaunchTemplateSpecificationRequest { + s.Version = &v + return s +} + // Describes a flow log. type FlowLog struct { _ struct{} `type:"structure"` @@ -45835,10 +47560,55 @@ func (s *HistoryRecord) SetTimestamp(v time.Time) *HistoryRecord { return s } +// Describes an event in the history of the EC2 Fleet. +type HistoryRecordEntry struct { + _ struct{} `type:"structure"` + + // Information about the event. + EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` + + // The event type. + EventType *string `locationName:"eventType" type:"string" enum:"FleetEventType"` + + // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` +} + +// String returns the string representation +func (s HistoryRecordEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HistoryRecordEntry) GoString() string { + return s.String() +} + +// SetEventInformation sets the EventInformation field's value. +func (s *HistoryRecordEntry) SetEventInformation(v *EventInformation) *HistoryRecordEntry { + s.EventInformation = v + return s +} + +// SetEventType sets the EventType field's value. +func (s *HistoryRecordEntry) SetEventType(v string) *HistoryRecordEntry { + s.EventType = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *HistoryRecordEntry) SetTimestamp(v time.Time) *HistoryRecordEntry { + s.Timestamp = &v + return s +} + // Describes the properties of the Dedicated Host. type Host struct { _ struct{} `type:"structure"` + // The time that the Dedicated Host was allocated. + AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp" timestampFormat:"iso8601"` + // Whether auto-placement is on or off. AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` @@ -45866,6 +47636,9 @@ type Host struct { // The IDs and instance type that are currently running on the Dedicated Host. Instances []*HostInstance `locationName:"instances" locationNameList:"item" type:"list"` + // The time that the Dedicated Host was released. + ReleaseTime *time.Time `locationName:"releaseTime" type:"timestamp" timestampFormat:"iso8601"` + // The Dedicated Host's state. State *string `locationName:"state" type:"string" enum:"AllocationState"` } @@ -45880,6 +47653,12 @@ func (s Host) GoString() string { return s.String() } +// SetAllocationTime sets the AllocationTime field's value. +func (s *Host) SetAllocationTime(v time.Time) *Host { + s.AllocationTime = &v + return s +} + // SetAutoPlacement sets the AutoPlacement field's value. func (s *Host) SetAutoPlacement(v string) *Host { s.AutoPlacement = &v @@ -45928,6 +47707,12 @@ func (s *Host) SetInstances(v []*HostInstance) *Host { return s } +// SetReleaseTime sets the ReleaseTime field's value. +func (s *Host) SetReleaseTime(v time.Time) *Host { + s.ReleaseTime = &v + return s +} + // SetState sets the State field's value. func (s *Host) SetState(v string) *Host { s.State = &v @@ -50988,7 +52773,7 @@ func (s *LaunchTemplatePlacementRequest) SetTenancy(v string) *LaunchTemplatePla } // The launch template to use. You must specify either the launch template ID -// or launch template name in the request. +// or launch template name in the request, but not both. type LaunchTemplateSpecification struct { _ struct{} `type:"structure"` @@ -51520,6 +53305,109 @@ func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest { return s } +type ModifyFleetInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Indicates whether running instances should be terminated if the total target + // capacity of the EC2 Fleet is decreased below the current size of the EC2 + // Fleet. + ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The size of the EC2 Fleet. + // + // TargetCapacitySpecification is a required field + TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ModifyFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyFleetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyFleetInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + if s.TargetCapacitySpecification == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) + } + if s.TargetCapacitySpecification != nil { + if err := s.TargetCapacitySpecification.Validate(); err != nil { + invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyFleetInput) SetDryRun(v bool) *ModifyFleetInput { + s.DryRun = &v + return s +} + +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *ModifyFleetInput) SetExcessCapacityTerminationPolicy(v string) *ModifyFleetInput { + s.ExcessCapacityTerminationPolicy = &v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *ModifyFleetInput) SetFleetId(v string) *ModifyFleetInput { + s.FleetId = &v + return s +} + +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *ModifyFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *ModifyFleetInput { + s.TargetCapacitySpecification = v + return s +} + +type ModifyFleetOutput struct { + _ struct{} `type:"structure"` + + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ModifyFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyFleetOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ModifyFleetOutput) SetReturn(v bool) *ModifyFleetOutput { + s.Return = &v + return s +} + type ModifyFpgaImageAttributeInput struct { _ struct{} `type:"structure"` @@ -58093,13 +59981,13 @@ type RequestSpotInstancesInput struct { // for termination and provides a Spot Instance termination notice, which gives // the instance a two-minute warning before it terminates. // - // Note that you can't specify an Availability Zone group or a launch group - // if you specify a duration. + // You can't specify an Availability Zone group or a launch group if you specify + // a duration. BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` // Unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide for Linux Instances. ClientToken *string `locationName:"clientToken" type:"string"` // Checks whether you have the required permissions for the action, without @@ -60646,6 +62534,7 @@ type RunInstancesInput struct { // The launch template to use to launch the instances. Any parameters that you // specify in RunInstances override the same parameters in the launch template. + // You can specify either the name or ID of a launch template, but not both. LaunchTemplate *LaunchTemplateSpecification `type:"structure"` // The maximum number of instances to launch. If you specify more instances @@ -63452,8 +65341,8 @@ type SpotFleetRequestConfigData struct { // by the Spot Fleet request. The default is lowestPrice. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` - // A unique, case-sensitive identifier you provide to ensure idempotency of - // your listings. This helps avoid duplicate listings. For more information, + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of your listings. This helps to avoid duplicate listings. For more information, // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` @@ -63491,6 +65380,17 @@ type SpotFleetRequestConfigData struct { // HS1, M1, M2, M3, and T1. LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"` + // The number of On-Demand units fulfilled by this request compared to the set + // target On-Demand capacity. + OnDemandFulfilledCapacity *float64 `locationName:"onDemandFulfilledCapacity" type:"double"` + + // The number of On-Demand units to request. You can choose to set the target + // capacity in terms of instances or a performance characteristic that is important + // to your application workload, such as vCPUs, memory, or I/O. If the request + // type is maintain, you can specify a target capacity of 0 and add capacity + // later. + OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` + // Indicates whether Spot Fleet should replace unhealthy instances. ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` @@ -63511,14 +65411,13 @@ type SpotFleetRequestConfigData struct { // Fleet request expires. TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` - // The type of request. Indicates whether the fleet will only request the target - // capacity or also attempt to maintain it. When you request a certain target - // capacity, the fleet will only place the required requests. It will not attempt - // to replenish Spot Instances if capacity is diminished, nor will it submit - // requests in alternative Spot pools if capacity is not available. When you - // want to maintain a certain target capacity, fleet will place the required - // requests to meet this target capacity. It will also automatically replenish - // any interrupted instances. Default: maintain. + // The type of request. Indicates whether the Spot Fleet only requests the target + // capacity or also attempts to maintain it. When this value is request, the + // Spot Fleet only places the required requests. It does not attempt to replenish + // Spot Instances if capacity is diminished, nor does it submit requests in + // alternative Spot pools if capacity is not available. To maintain a certain + // target capacity, the Spot Fleet places the required requests to meet capacity + // and automatically replenishes any interrupted instances. Default: maintain. Type *string `locationName:"type" type:"string" enum:"FleetType"` // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). @@ -63636,6 +65535,18 @@ func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConf return s } +// SetOnDemandFulfilledCapacity sets the OnDemandFulfilledCapacity field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandFulfilledCapacity(v float64) *SpotFleetRequestConfigData { + s.OnDemandFulfilledCapacity = &v + return s +} + +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandTargetCapacity(v int64) *SpotFleetRequestConfigData { + s.OnDemandTargetCapacity = &v + return s +} + // SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotFleetRequestConfigData { s.ReplaceUnhealthyInstances = &v @@ -63761,10 +65672,9 @@ type SpotInstanceRequest struct { // The maximum price per hour that you are willing to pay for a Spot Instance. SpotPrice *string `locationName:"spotPrice" type:"string"` - // The state of the Spot Instance request. Spot status information can help - // you track your Spot Instance requests. For more information, see Spot Status - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon Elastic Compute Cloud User Guide. + // The state of the Spot Instance request. Spot status information helps track + // your Spot Instance requests. For more information, see Spot Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) + // in the Amazon EC2 User Guide for Linux Instances. State *string `locationName:"state" type:"string" enum:"SpotInstanceState"` // The status code and status message describing the Spot Instance request. @@ -63950,7 +65860,7 @@ type SpotInstanceStatus struct { _ struct{} `type:"structure"` // The status code. For a list of status codes, see Spot Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide for Linux Instances. Code *string `locationName:"code" type:"string"` // The description for the status code. @@ -64056,6 +65966,74 @@ func (s *SpotMarketOptions) SetValidUntil(v time.Time) *SpotMarketOptions { return s } +// Describes the configuration of Spot Instances in an EC2 Fleet. +type SpotOptions struct { + _ struct{} `type:"structure"` + + // Indicates how to allocate the target capacity across the Spot pools specified + // by the Spot Fleet request. The default is lowestPrice. + AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` + + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"SpotInstanceInterruptionBehavior"` +} + +// String returns the string representation +func (s SpotOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotOptions) GoString() string { + return s.String() +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *SpotOptions) SetAllocationStrategy(v string) *SpotOptions { + s.AllocationStrategy = &v + return s +} + +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotOptions) SetInstanceInterruptionBehavior(v string) *SpotOptions { + s.InstanceInterruptionBehavior = &v + return s +} + +// Describes the configuration of Spot Instances in an EC2 Fleet request. +type SpotOptionsRequest struct { + _ struct{} `type:"structure"` + + // Indicates how to allocate the target capacity across the Spot pools specified + // by the Spot Fleet request. The default is lowestPrice. + AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` + + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `type:"string" enum:"SpotInstanceInterruptionBehavior"` +} + +// String returns the string representation +func (s SpotOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotOptionsRequest) GoString() string { + return s.String() +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *SpotOptionsRequest) SetAllocationStrategy(v string) *SpotOptionsRequest { + s.AllocationStrategy = &v + return s +} + +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotOptionsRequest) SetInstanceInterruptionBehavior(v string) *SpotOptionsRequest { + s.InstanceInterruptionBehavior = &v + return s +} + // Describes Spot Instance placement. type SpotPlacement struct { _ struct{} `type:"structure"` @@ -64942,6 +66920,131 @@ func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { return s } +// The number of units to request. You can choose to set the target capacity +// in terms of instances or a performance characteristic that is important to +// your application workload, such as vCPUs, memory, or I/O. If the request +// type is maintain, you can specify a target capacity of 0 and add capacity +// later. +type TargetCapacitySpecification struct { + _ struct{} `type:"structure"` + + // The default TotalTargetCapacity, which is either Spot or On-Demand. + DefaultTargetCapacityType *string `locationName:"defaultTargetCapacityType" type:"string" enum:"DefaultTargetCapacityType"` + + // The number of On-Demand units to request. + OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` + + // The maximum number of Spot units to launch. + SpotTargetCapacity *int64 `locationName:"spotTargetCapacity" type:"integer"` + + // The number of units to request, filled using DefaultTargetCapacityType. + TotalTargetCapacity *int64 `locationName:"totalTargetCapacity" type:"integer"` +} + +// String returns the string representation +func (s TargetCapacitySpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetCapacitySpecification) GoString() string { + return s.String() +} + +// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. +func (s *TargetCapacitySpecification) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecification { + s.DefaultTargetCapacityType = &v + return s +} + +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecification { + s.OnDemandTargetCapacity = &v + return s +} + +// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetSpotTargetCapacity(v int64) *TargetCapacitySpecification { + s.SpotTargetCapacity = &v + return s +} + +// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetTotalTargetCapacity(v int64) *TargetCapacitySpecification { + s.TotalTargetCapacity = &v + return s +} + +// The number of units to request. You can choose to set the target capacity +// in terms of instances or a performance characteristic that is important to +// your application workload, such as vCPUs, memory, or I/O. If the request +// type is maintain, you can specify a target capacity of 0 and add capacity +// later. +type TargetCapacitySpecificationRequest struct { + _ struct{} `type:"structure"` + + // The default TotalTargetCapacity, which is either Spot or On-Demand. + DefaultTargetCapacityType *string `type:"string" enum:"DefaultTargetCapacityType"` + + // The number of On-Demand units to request. + OnDemandTargetCapacity *int64 `type:"integer"` + + // The number of Spot units to request. + SpotTargetCapacity *int64 `type:"integer"` + + // The number of units to request, filled using DefaultTargetCapacityType. + // + // TotalTargetCapacity is a required field + TotalTargetCapacity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s TargetCapacitySpecificationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetCapacitySpecificationRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetCapacitySpecificationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetCapacitySpecificationRequest"} + if s.TotalTargetCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("TotalTargetCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. +func (s *TargetCapacitySpecificationRequest) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecificationRequest { + s.DefaultTargetCapacityType = &v + return s +} + +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.OnDemandTargetCapacity = &v + return s +} + +// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetSpotTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.SpotTargetCapacity = &v + return s +} + +// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetTotalTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.TotalTargetCapacity = &v + return s +} + // Information about the Convertible Reserved Instance offering. type TargetConfiguration struct { _ struct{} `type:"structure"` @@ -66062,7 +68165,7 @@ type Volume struct { // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for + // Constraint: Range is 100-32000 IOPS for io1 volumes and 100-10000 IOPS for // gp2 volumes. // // Condition: This parameter is required for requests to create io1 volumes; @@ -67938,6 +70041,28 @@ const ( DatafeedSubscriptionStateInactive = "Inactive" ) +const ( + // DefaultTargetCapacityTypeSpot is a DefaultTargetCapacityType enum value + DefaultTargetCapacityTypeSpot = "spot" + + // DefaultTargetCapacityTypeOnDemand is a DefaultTargetCapacityType enum value + DefaultTargetCapacityTypeOnDemand = "on-demand" +) + +const ( + // DeleteFleetErrorCodeFleetIdDoesNotExist is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeFleetIdDoesNotExist = "fleetIdDoesNotExist" + + // DeleteFleetErrorCodeFleetIdMalformed is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeFleetIdMalformed = "fleetIdMalformed" + + // DeleteFleetErrorCodeFleetNotInDeletableState is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeFleetNotInDeletableState = "fleetNotInDeletableState" + + // DeleteFleetErrorCodeUnexpectedError is a DeleteFleetErrorCode enum value + DeleteFleetErrorCodeUnexpectedError = "unexpectedError" +) + const ( // DeviceTypeEbs is a DeviceType enum value DeviceTypeEbs = "ebs" @@ -68039,6 +70164,62 @@ const ( ExportTaskStateCompleted = "completed" ) +const ( + // FleetActivityStatusError is a FleetActivityStatus enum value + FleetActivityStatusError = "error" + + // FleetActivityStatusPendingFulfillment is a FleetActivityStatus enum value + FleetActivityStatusPendingFulfillment = "pending-fulfillment" + + // FleetActivityStatusPendingTermination is a FleetActivityStatus enum value + FleetActivityStatusPendingTermination = "pending-termination" + + // FleetActivityStatusFulfilled is a FleetActivityStatus enum value + FleetActivityStatusFulfilled = "fulfilled" +) + +const ( + // FleetEventTypeInstanceChange is a FleetEventType enum value + FleetEventTypeInstanceChange = "instance-change" + + // FleetEventTypeFleetChange is a FleetEventType enum value + FleetEventTypeFleetChange = "fleet-change" + + // FleetEventTypeServiceError is a FleetEventType enum value + FleetEventTypeServiceError = "service-error" +) + +const ( + // FleetExcessCapacityTerminationPolicyNoTermination is a FleetExcessCapacityTerminationPolicy enum value + FleetExcessCapacityTerminationPolicyNoTermination = "no-termination" + + // FleetExcessCapacityTerminationPolicyTermination is a FleetExcessCapacityTerminationPolicy enum value + FleetExcessCapacityTerminationPolicyTermination = "termination" +) + +const ( + // FleetStateCodeSubmitted is a FleetStateCode enum value + FleetStateCodeSubmitted = "submitted" + + // FleetStateCodeActive is a FleetStateCode enum value + FleetStateCodeActive = "active" + + // FleetStateCodeDeleted is a FleetStateCode enum value + FleetStateCodeDeleted = "deleted" + + // FleetStateCodeFailed is a FleetStateCode enum value + FleetStateCodeFailed = "failed" + + // FleetStateCodeDeletedRunning is a FleetStateCode enum value + FleetStateCodeDeletedRunning = "deleted-running" + + // FleetStateCodeDeletedTerminating is a FleetStateCode enum value + FleetStateCodeDeletedTerminating = "deleted-terminating" + + // FleetStateCodeModifying is a FleetStateCode enum value + FleetStateCodeModifying = "modifying" +) + const ( // FleetTypeRequest is a FleetType enum value FleetTypeRequest = "request" @@ -69072,6 +71253,25 @@ const ( SnapshotStateError = "error" ) +const ( + // SpotAllocationStrategyLowestPrice is a SpotAllocationStrategy enum value + SpotAllocationStrategyLowestPrice = "lowest-price" + + // SpotAllocationStrategyDiversified is a SpotAllocationStrategy enum value + SpotAllocationStrategyDiversified = "diversified" +) + +const ( + // SpotInstanceInterruptionBehaviorHibernate is a SpotInstanceInterruptionBehavior enum value + SpotInstanceInterruptionBehaviorHibernate = "hibernate" + + // SpotInstanceInterruptionBehaviorStop is a SpotInstanceInterruptionBehavior enum value + SpotInstanceInterruptionBehaviorStop = "stop" + + // SpotInstanceInterruptionBehaviorTerminate is a SpotInstanceInterruptionBehavior enum value + SpotInstanceInterruptionBehaviorTerminate = "terminate" +) + const ( // SpotInstanceStateOpen is a SpotInstanceState enum value SpotInstanceStateOpen = "open" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index 178bb2a3abd..5849124ce6e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -3867,6 +3867,9 @@ func (s AbortEnvironmentUpdateOutput) GoString() string { type ApplicationDescription struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the application. + ApplicationArn *string `type:"string"` + // The name of the application. ApplicationName *string `min:"1" type:"string"` @@ -3899,6 +3902,12 @@ func (s ApplicationDescription) GoString() string { return s.String() } +// SetApplicationArn sets the ApplicationArn field's value. +func (s *ApplicationDescription) SetApplicationArn(v string) *ApplicationDescription { + s.ApplicationArn = &v + return s +} + // SetApplicationName sets the ApplicationName field's value. func (s *ApplicationDescription) SetApplicationName(v string) *ApplicationDescription { s.ApplicationName = &v @@ -4080,6 +4089,9 @@ type ApplicationVersionDescription struct { // The name of the application to which the application version belongs. ApplicationName *string `min:"1" type:"string"` + // The Amazon Resource Name (ARN) of the application version. + ApplicationVersionArn *string `type:"string"` + // Reference to the artifact from the AWS CodeBuild build. BuildArn *string `type:"string"` @@ -4123,6 +4135,12 @@ func (s *ApplicationVersionDescription) SetApplicationName(v string) *Applicatio return s } +// SetApplicationVersionArn sets the ApplicationVersionArn field's value. +func (s *ApplicationVersionDescription) SetApplicationVersionArn(v string) *ApplicationVersionDescription { + s.ApplicationVersionArn = &v + return s +} + // SetBuildArn sets the BuildArn field's value. func (s *ApplicationVersionDescription) SetBuildArn(v string) *ApplicationVersionDescription { s.BuildArn = &v @@ -7612,7 +7630,7 @@ type EnvironmentDescription struct { EndpointURL *string `type:"string"` // The environment's Amazon Resource Name (ARN), which can be used in other - // API reuqests that require an ARN. + // API requests that require an ARN. EnvironmentArn *string `type:"string"` // The ID of this environment. diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index a7d3333ffe7..90c00729084 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -57,7 +57,7 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // // Creates a delivery stream. // -// By default, you can create up to 20 delivery streams per region. +// By default, you can create up to 50 delivery streams per AWS Region. // // This is an asynchronous operation that immediately returns. The initial status // of the delivery stream is CREATING. After the delivery stream is created, @@ -65,24 +65,25 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // delivery stream that is not in the ACTIVE state cause an exception. To check // the state of a delivery stream, use DescribeDeliveryStream. // -// A Kinesis Firehose delivery stream can be configured to receive records directly -// from providers using PutRecord or PutRecordBatch, or it can be configured -// to use an existing Kinesis stream as its source. To specify a Kinesis stream -// as input, set the DeliveryStreamType parameter to KinesisStreamAsSource, -// and provide the Kinesis stream ARN and role ARN in the KinesisStreamSourceConfiguration -// parameter. +// A Kinesis Data Firehose delivery stream can be configured to receive records +// directly from providers using PutRecord or PutRecordBatch, or it can be configured +// to use an existing Kinesis data stream as its source. To specify a Kinesis +// data stream as input, set the DeliveryStreamType parameter to KinesisStreamAsSource, +// and provide the Kinesis data stream Amazon Resource Name (ARN) and role ARN +// in the KinesisStreamSourceConfiguration parameter. // // A delivery stream is configured with a single destination: Amazon S3, Amazon -// ES, or Amazon Redshift. You must specify only one of the following destination +// ES, Amazon Redshift, or Splunk. Specify only one of the following destination // configuration parameters: ExtendedS3DestinationConfiguration, S3DestinationConfiguration, -// ElasticsearchDestinationConfiguration, or RedshiftDestinationConfiguration. +// ElasticsearchDestinationConfiguration, RedshiftDestinationConfiguration, +// or SplunkDestinationConfiguration. // // When you specify S3DestinationConfiguration, you can also provide the following // optional values: BufferingHints, EncryptionConfiguration, and CompressionFormat. -// By default, if no BufferingHints value is provided, Kinesis Firehose buffers -// data up to 5 MB or for 5 minutes, whichever condition is satisfied first. -// Note that BufferingHints is a hint, so there are some cases where the service -// cannot adhere to these conditions strictly; for example, record boundaries +// By default, if no BufferingHints value is provided, Kinesis Data Firehose +// buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied +// first. BufferingHints is a hint, so there are some cases where the service +// cannot adhere to these conditions strictly. For example, record boundaries // are such that the size is a little over or under the configured buffering // size. By default, no encryption is performed. We strongly recommend that // you enable encryption to ensure secure data storage in Amazon S3. @@ -90,23 +91,25 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // A few notes about Amazon Redshift as a destination: // // * An Amazon Redshift destination requires an S3 bucket as intermediate -// location, as Kinesis Firehose first delivers data to S3 and then uses -// COPY syntax to load data into an Amazon Redshift table. This is specified -// in the RedshiftDestinationConfiguration.S3Configuration parameter. +// location. This is because Kinesis Data Firehose first delivers data to +// Amazon S3 and then uses COPY syntax to load data into an Amazon Redshift +// table. This is specified in the RedshiftDestinationConfiguration.S3Configuration +// parameter. // // * The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration // because the Amazon Redshift COPY operation that reads from the S3 bucket // doesn't support these compression formats. // -// * We strongly recommend that you use the user name and password you provide -// exclusively with Kinesis Firehose, and that the permissions for the account -// are restricted for Amazon Redshift INSERT permissions. +// * We strongly recommend that you use the user name and password that you +// provide exclusively with Kinesis Data Firehose. In addition, the permissions +// for the account should be restricted for Amazon Redshift INSERT permissions. // -// Kinesis Firehose assumes the IAM role that is configured as part of the destination. -// The role should allow the Kinesis Firehose principal to assume the role, -// and the role should have permissions that allow the service to deliver the -// data. For more information, see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) -// in the Amazon Kinesis Firehose Developer Guide. +// Kinesis Data Firehose assumes the IAM role that is configured as part of +// the destination. The role should allow the Kinesis Data Firehose principal +// to assume the role, and the role should have permissions that allow the service +// to deliver the data. For more information, see Grant Kinesis Firehose Access +// to an Amazon S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) +// in the Amazon Kinesis Data Firehose Developer Guide. // // 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 @@ -286,8 +289,8 @@ func (c *Firehose) DescribeDeliveryStreamRequest(input *DescribeDeliveryStreamIn // // Describes the specified delivery stream and gets the status. For example, // after your delivery stream is created, call DescribeDeliveryStream to see -// if the delivery stream is ACTIVE and therefore ready for data to be sent -// to it. +// whether the delivery stream is ACTIVE and therefore ready for data to be +// sent to it. // // 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 @@ -404,6 +407,92 @@ func (c *Firehose) ListDeliveryStreamsWithContext(ctx aws.Context, input *ListDe return out, req.Send() } +const opListTagsForDeliveryStream = "ListTagsForDeliveryStream" + +// ListTagsForDeliveryStreamRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForDeliveryStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForDeliveryStream for more information on using the ListTagsForDeliveryStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForDeliveryStreamRequest method. +// req, resp := client.ListTagsForDeliveryStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListTagsForDeliveryStream +func (c *Firehose) ListTagsForDeliveryStreamRequest(input *ListTagsForDeliveryStreamInput) (req *request.Request, output *ListTagsForDeliveryStreamOutput) { + op := &request.Operation{ + Name: opListTagsForDeliveryStream, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForDeliveryStreamInput{} + } + + output = &ListTagsForDeliveryStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForDeliveryStream API operation for Amazon Kinesis Firehose. +// +// Lists the tags for the specified delivery stream. This operation has a limit +// of five transactions per second per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Kinesis Firehose's +// API operation ListTagsForDeliveryStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/ListTagsForDeliveryStream +func (c *Firehose) ListTagsForDeliveryStream(input *ListTagsForDeliveryStreamInput) (*ListTagsForDeliveryStreamOutput, error) { + req, out := c.ListTagsForDeliveryStreamRequest(input) + return out, req.Send() +} + +// ListTagsForDeliveryStreamWithContext is the same as ListTagsForDeliveryStream with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForDeliveryStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Firehose) ListTagsForDeliveryStreamWithContext(ctx aws.Context, input *ListTagsForDeliveryStreamInput, opts ...request.Option) (*ListTagsForDeliveryStreamOutput, error) { + req, out := c.ListTagsForDeliveryStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the @@ -448,22 +537,22 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // PutRecord API operation for Amazon Kinesis Firehose. // -// Writes a single data record into an Amazon Kinesis Firehose delivery stream. -// To write multiple data records into a delivery stream, use PutRecordBatch. +// Writes a single data record into an Amazon Kinesis Data Firehose delivery +// stream. To write multiple data records into a delivery stream, use PutRecordBatch. // Applications using these operations are referred to as producers. // // By default, each delivery stream can take in up to 2,000 transactions per // second, 5,000 records per second, or 5 MB per second. Note that if you use // PutRecord and PutRecordBatch, the limits are an aggregate across these two // operations for each delivery stream. For more information about limits and -// how to request an increase, see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// how to request an increase, see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // You must specify the name of the delivery stream and the data record when // using PutRecord. The data record consists of a data blob that can be up to -// 1,000 KB in size, and any kind of data, for example, a segment from a log -// file, geographic location data, website clickstream data, and so on. +// 1,000 KB in size and any kind of data. For example, it can be a segment from +// a log file, geographic location data, website clickstream data, and so on. // -// Kinesis Firehose buffers records before delivering them to the destination. +// Kinesis Data Firehose buffers records before delivering them to the destination. // To disambiguate the data blobs at the destination, a common solution is to // use delimiters in the data, such as a newline (\n) or some other character // unique within the data. This allows the consumer application to parse individual @@ -477,9 +566,9 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // and retry. If the exception persists, it is possible that the throughput // limits have been exceeded for the delivery stream. // -// Data records sent to Kinesis Firehose are stored for 24 hours from the time -// they are added to a delivery stream as it attempts to send the records to -// the destination. If the destination is unreachable for more than 24 hours, +// Data records sent to Kinesis Data Firehose are stored for 24 hours from the +// time they are added to a delivery stream as it attempts to send the records +// to the destination. If the destination is unreachable for more than 24 hours, // the data is no longer available. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -497,10 +586,10 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // The specified input parameter has a value that is not valid. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. If you continue +// The service is unavailable. Back off and retry the operation. If you continue // to see the exception, throughput limits for the delivery stream may have // been exceeded. For more information about limits and how to request an increase, -// see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecord func (c *Firehose) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) { @@ -577,7 +666,7 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // second, 5,000 records per second, or 5 MB per second. If you use PutRecord // and PutRecordBatch, the limits are an aggregate across these two operations // for each delivery stream. For more information about limits, see Amazon Kinesis -// Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // Each PutRecordBatch request supports up to 500 records. Each record in the // request can be as large as 1,000 KB (before 64-bit encoding), up to a limit @@ -585,11 +674,11 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // // You must specify the name of the delivery stream and the data record when // using PutRecord. The data record consists of a data blob that can be up to -// 1,000 KB in size, and any kind of data. For example, it could be a segment -// from a log file, geographic location data, web site clickstream data, and +// 1,000 KB in size and any kind of data. For example, it could be a segment +// from a log file, geographic location data, website clickstream data, and // so on. // -// Kinesis Firehose buffers records before delivering them to the destination. +// Kinesis Data Firehose buffers records before delivering them to the destination. // To disambiguate the data blobs at the destination, a common solution is to // use delimiters in the data, such as a newline (\n) or some other character // unique within the data. This allows the consumer application to parse individual @@ -601,7 +690,7 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // correlates with a record in the request array using the same ordering, from // the top to the bottom. The response array always includes the same number // of records as the request array. RequestResponses includes both successfully -// and unsuccessfully processed records. Kinesis Firehose attempts to process +// and unsuccessfully processed records. Kinesis Data Firehose attempts to process // all records in each PutRecordBatch request. A single record failure does // not stop the processing of subsequent records. // @@ -622,9 +711,9 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // If the exception persists, it is possible that the throughput limits have // been exceeded for the delivery stream. // -// Data records sent to Kinesis Firehose are stored for 24 hours from the time -// they are added to a delivery stream as it attempts to send the records to -// the destination. If the destination is unreachable for more than 24 hours, +// Data records sent to Kinesis Data Firehose are stored for 24 hours from the +// time they are added to a delivery stream as it attempts to send the records +// to the destination. If the destination is unreachable for more than 24 hours, // the data is no longer available. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -642,10 +731,10 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // The specified input parameter has a value that is not valid. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. If you continue +// The service is unavailable. Back off and retry the operation. If you continue // to see the exception, throughput limits for the delivery stream may have // been exceeded. For more information about limits and how to request an increase, -// see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/PutRecordBatch func (c *Firehose) PutRecordBatch(input *PutRecordBatchInput) (*PutRecordBatchOutput, error) { @@ -669,6 +758,198 @@ func (c *Firehose) PutRecordBatchWithContext(ctx aws.Context, input *PutRecordBa return out, req.Send() } +const opTagDeliveryStream = "TagDeliveryStream" + +// TagDeliveryStreamRequest generates a "aws/request.Request" representing the +// client's request for the TagDeliveryStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagDeliveryStream for more information on using the TagDeliveryStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagDeliveryStreamRequest method. +// req, resp := client.TagDeliveryStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/TagDeliveryStream +func (c *Firehose) TagDeliveryStreamRequest(input *TagDeliveryStreamInput) (req *request.Request, output *TagDeliveryStreamOutput) { + op := &request.Operation{ + Name: opTagDeliveryStream, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagDeliveryStreamInput{} + } + + output = &TagDeliveryStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// TagDeliveryStream API operation for Amazon Kinesis Firehose. +// +// Adds or updates tags for the specified delivery stream. A tag is a key-value +// pair (the value is optional) that you can define and assign to AWS resources. +// If you specify a tag that already exists, the tag value is replaced with +// the value that you specify in the request. Tags are metadata. For example, +// you can add friendly names and descriptions or other types of information +// that can help you distinguish the delivery stream. For more information about +// tags, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) +// in the AWS Billing and Cost Management User Guide. +// +// Each delivery stream can have up to 50 tags. +// +// This operation has a limit of five transactions per second per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Kinesis Firehose's +// API operation TagDeliveryStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is already in use and not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/TagDeliveryStream +func (c *Firehose) TagDeliveryStream(input *TagDeliveryStreamInput) (*TagDeliveryStreamOutput, error) { + req, out := c.TagDeliveryStreamRequest(input) + return out, req.Send() +} + +// TagDeliveryStreamWithContext is the same as TagDeliveryStream with the addition of +// the ability to pass a context and additional request options. +// +// See TagDeliveryStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Firehose) TagDeliveryStreamWithContext(ctx aws.Context, input *TagDeliveryStreamInput, opts ...request.Option) (*TagDeliveryStreamOutput, error) { + req, out := c.TagDeliveryStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagDeliveryStream = "UntagDeliveryStream" + +// UntagDeliveryStreamRequest generates a "aws/request.Request" representing the +// client's request for the UntagDeliveryStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagDeliveryStream for more information on using the UntagDeliveryStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagDeliveryStreamRequest method. +// req, resp := client.UntagDeliveryStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UntagDeliveryStream +func (c *Firehose) UntagDeliveryStreamRequest(input *UntagDeliveryStreamInput) (req *request.Request, output *UntagDeliveryStreamOutput) { + op := &request.Operation{ + Name: opUntagDeliveryStream, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagDeliveryStreamInput{} + } + + output = &UntagDeliveryStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// UntagDeliveryStream API operation for Amazon Kinesis Firehose. +// +// Removes tags from the specified delivery stream. Removed tags are deleted, +// and you can't recover them after this operation successfully completes. +// +// If you specify a tag that doesn't exist, the operation ignores it. +// +// This operation has a limit of five transactions per second per account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Kinesis Firehose's +// API operation UntagDeliveryStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is already in use and not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UntagDeliveryStream +func (c *Firehose) UntagDeliveryStream(input *UntagDeliveryStreamInput) (*UntagDeliveryStreamOutput, error) { + req, out := c.UntagDeliveryStreamRequest(input) + return out, req.Send() +} + +// UntagDeliveryStreamWithContext is the same as UntagDeliveryStream with the addition of +// the ability to pass a context and additional request options. +// +// See UntagDeliveryStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Firehose) UntagDeliveryStreamWithContext(ctx aws.Context, input *UntagDeliveryStreamInput, opts ...request.Option) (*UntagDeliveryStreamOutput, error) { + req, out := c.UntagDeliveryStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateDestination = "UpdateDestination" // UpdateDestinationRequest generates a "aws/request.Request" representing the @@ -715,18 +996,18 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req // // Updates the specified destination of the specified delivery stream. // -// You can use this operation to change the destination type (for example, to -// replace the Amazon S3 destination with Amazon Redshift) or change the parameters +// Use this operation to change the destination type (for example, to replace +// the Amazon S3 destination with Amazon Redshift) or change the parameters // associated with a destination (for example, to change the bucket name of // the Amazon S3 destination). The update might not occur immediately. The target // delivery stream remains active while the configurations are updated, so data // writes to the delivery stream can continue during this process. The updated // configurations are usually effective within a few minutes. // -// Note that switching between Amazon ES and other services is not supported. -// For an Amazon ES destination, you can only update to another Amazon ES destination. +// Switching between Amazon ES and other services is not supported. For an Amazon +// ES destination, you can only update to another Amazon ES destination. // -// If the destination type is the same, Kinesis Firehose merges the configuration +// If the destination type is the same, Kinesis Data Firehose merges the configuration // parameters specified with the destination configuration that already exists // on the delivery stream. If any of the parameters are not specified in the // call, the existing values are retained. For example, in the Amazon S3 destination, @@ -734,15 +1015,15 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req // is maintained on the destination. // // If the destination type is not the same, for example, changing the destination -// from Amazon S3 to Amazon Redshift, Kinesis Firehose does not merge any parameters. -// In this case, all parameters must be specified. +// from Amazon S3 to Amazon Redshift, Kinesis Data Firehose does not merge any +// parameters. In this case, all parameters must be specified. // -// Kinesis Firehose uses CurrentDeliveryStreamVersionId to avoid race conditions +// Kinesis Data Firehose uses CurrentDeliveryStreamVersionId to avoid race conditions // and conflicting merges. This is a required field, and the service updates // the configuration only if the existing configuration has a version ID that // matches. After the update is applied successfully, the version ID is updated, -// and can be retrieved using DescribeDeliveryStream. Use the new version ID -// to set CurrentDeliveryStreamVersionId in the next call. +// and you can retrieve it using DescribeDeliveryStream. Use the new version +// ID to set CurrentDeliveryStreamVersionId in the next call. // // 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 @@ -788,8 +1069,8 @@ func (c *Firehose) UpdateDestinationWithContext(ctx aws.Context, input *UpdateDe } // Describes hints for the buffering to perform before delivering data to the -// destination. Please note that these options are treated as hints, and therefore -// Kinesis Firehose may choose to use different values when it is optimal. +// destination. These options are treated as hints, and therefore Kinesis Data +// Firehose might choose to use different values whenever it is optimal. type BufferingHints struct { _ struct{} `type:"structure"` @@ -895,7 +1176,7 @@ type CopyCommand struct { // Optional parameters to use with the Amazon Redshift COPY command. For more // information, see the "Optional Parameters" section of Amazon Redshift COPY // command (http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html). Some - // possible examples that would apply to Kinesis Firehose are as follows: + // possible examples that would apply to Kinesis Data Firehose are as follows: // // delimiter '\t' lzop; - fields are delimited with "\t" (TAB character) and // compressed using lzop. @@ -971,8 +1252,8 @@ type CreateDeliveryStreamInput struct { _ struct{} `type:"structure"` // The name of the delivery stream. This name must be unique per AWS account - // in the same region. If the delivery streams are in different accounts or - // different regions, you can have multiple delivery streams with the same name. + // in the same Region. If the delivery streams are in different accounts or + // different Regions, you can have multiple delivery streams with the same name. // // DeliveryStreamName is a required field DeliveryStreamName *string `min:"1" type:"string" required:"true"` @@ -981,8 +1262,8 @@ type CreateDeliveryStreamInput struct { // // * DirectPut: Provider applications access the delivery stream directly. // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis stream as - // a source. + // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream + // as a source. DeliveryStreamType *string `type:"string" enum:"DeliveryStreamType"` // The destination in Amazon ES. You can specify only one destination. @@ -991,8 +1272,9 @@ type CreateDeliveryStreamInput struct { // The destination in Amazon S3. You can specify only one destination. ExtendedS3DestinationConfiguration *ExtendedS3DestinationConfiguration `type:"structure"` - // When a Kinesis stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration - // containing the Kinesis stream ARN and the role ARN for the source stream. + // When a Kinesis data stream is used as the source for the delivery stream, + // a KinesisStreamSourceConfiguration containing the Kinesis data stream Amazon + // Resource Name (ARN) and the role ARN for the source stream. KinesisStreamSourceConfiguration *KinesisStreamSourceConfiguration `type:"structure"` // The destination in Amazon Redshift. You can specify only one destination. @@ -1213,8 +1495,8 @@ type DeliveryStreamDescription struct { // // * DirectPut: Provider applications access the delivery stream directly. // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis stream as - // a source. + // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream + // as a source. // // DeliveryStreamType is a required field DeliveryStreamType *string `type:"string" required:"true" enum:"DeliveryStreamType"` @@ -1233,7 +1515,7 @@ type DeliveryStreamDescription struct { LastUpdateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` // If the DeliveryStreamType parameter is KinesisStreamAsSource, a SourceDescription - // object describing the source Kinesis stream. + // object describing the source Kinesis data stream. Source *SourceDescription `type:"structure"` // Each time the destination is updated for a delivery stream, the version ID @@ -1324,7 +1606,7 @@ type DescribeDeliveryStreamInput struct { DeliveryStreamName *string `min:"1" type:"string" required:"true"` // The ID of the destination to start returning the destination information. - // Currently, Kinesis Firehose supports one destination per delivery stream. + // Currently, Kinesis Data Firehose supports one destination per delivery stream. ExclusiveStartDestinationId *string `min:"1" type:"string"` // The limit on the number of destinations to return. Currently, you can have @@ -1559,31 +1841,32 @@ type ElasticsearchDestinationConfiguration struct { // The Elasticsearch index rotation period. Index rotation appends a time stamp // to the IndexName to facilitate the expiration of old data. For more information, - // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). + // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // The default value is OneDay. IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon ES. The default value is 300 (5 minutes). RetryOptions *ElasticsearchRetryOptions `type:"structure"` - // The ARN of the IAM role to be assumed by Kinesis Firehose for calling the - // Amazon ES Configuration API and for indexing documents. For more information, - // see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data + // Firehose for calling the Amazon ES Configuration API and for indexing documents. + // For more information, see Grant Kinesis Data Firehose Access to an Amazon + // Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any documents that could not be indexed to the configured - // Amazon S3 destination, with elasticsearch-failed/ appended to the key prefix. - // When set to AllDocuments, Kinesis Firehose delivers all incoming records - // to Amazon S3, and also writes failed documents with elasticsearch-failed/ - // appended to the prefix. For more information, see Amazon S3 Backup for Amazon - // Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup). + // Kinesis Data Firehose writes any documents that could not be indexed to the + // configured Amazon S3 destination, with elasticsearch-failed/ appended to + // the key prefix. When set to AllDocuments, Kinesis Data Firehose delivers + // all incoming records to Amazon S3, and also writes failed documents with + // elasticsearch-failed/ appended to the prefix. For more information, see Data + // Delivery Failure Handling (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#retry). // Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"` @@ -1751,7 +2034,7 @@ type ElasticsearchDestinationDescription struct { // The Amazon ES retry options. RetryOptions *ElasticsearchRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. RoleARN *string `min:"1" type:"string"` // The Amazon S3 backup mode. @@ -1861,20 +2144,21 @@ type ElasticsearchDestinationUpdate struct { // The Elasticsearch index rotation period. Index rotation appends a time stamp // to IndexName to facilitate the expiration of old data. For more information, - // see Index Rotation for Amazon Elasticsearch Service Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). + // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // Default value is OneDay. IndexRotationPeriod *string `type:"string" enum:"ElasticsearchIndexRotationPeriod"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon ES. The default value is 300 (5 minutes). RetryOptions *ElasticsearchRetryOptions `type:"structure"` - // The ARN of the IAM role to be assumed by Kinesis Firehose for calling the - // Amazon ES Configuration API and for indexing documents. For more information, - // see Amazon S3 Bucket Access (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data + // Firehose for calling the Amazon ES Configuration API and for indexing documents. + // For more information, see Grant Kinesis Data Firehose Access to an Amazon + // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). RoleARN *string `min:"1" type:"string"` // The Amazon S3 destination. @@ -1991,16 +2275,16 @@ func (s *ElasticsearchDestinationUpdate) SetTypeName(v string) *ElasticsearchDes return s } -// Configures retry behavior in case Kinesis Firehose is unable to deliver documents -// to Amazon ES. +// Configures retry behavior in case Kinesis Data Firehose is unable to deliver +// documents to Amazon ES. type ElasticsearchRetryOptions struct { _ struct{} `type:"structure"` // After an initial failure to deliver to Amazon ES, the total amount of time - // during which Kinesis Firehose re-attempts delivery (including the first attempt). - // After this time has elapsed, the failed documents are written to Amazon S3. - // Default value is 300 seconds (5 minutes). A value of 0 (zero) results in - // no retries. + // during which Kinesis Data Firehose re-attempts delivery (including the first + // attempt). After this time has elapsed, the failed documents are written to + // Amazon S3. Default value is 300 seconds (5 minutes). A value of 0 (zero) + // results in no retries. DurationInSeconds *int64 `type:"integer"` } @@ -2092,16 +2376,17 @@ type ExtendedS3DestinationConfiguration struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2256,14 +2541,14 @@ type ExtendedS3DestinationDescription struct { // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // S3 files. You can specify an extra prefix to be added in front of the time // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2366,16 +2651,17 @@ type ExtendedS3DestinationUpdate struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. RoleARN *string `min:"1" type:"string"` // Enables or disables Amazon S3 backup mode. @@ -2495,8 +2781,8 @@ func (s *ExtendedS3DestinationUpdate) SetS3BackupUpdate(v *S3DestinationUpdate) type KMSEncryptionConfig struct { _ struct{} `type:"structure"` - // The ARN of the encryption key. Must belong to the same region as the destination - // Amazon S3 bucket. + // The Amazon Resource Name (ARN) of the encryption key. Must belong to the + // same AWS Region as the destination Amazon S3 bucket. // // AWSKMSKeyARN is a required field AWSKMSKeyARN *string `min:"1" type:"string" required:"true"` @@ -2534,17 +2820,17 @@ func (s *KMSEncryptionConfig) SetAWSKMSKeyARN(v string) *KMSEncryptionConfig { return s } -// The stream and role ARNs for a Kinesis stream used as the source for a delivery -// stream. +// The stream and role Amazon Resource Names (ARNs) for a Kinesis data stream +// used as the source for a delivery stream. type KinesisStreamSourceConfiguration struct { _ struct{} `type:"structure"` - // The ARN of the source Kinesis stream. + // The ARN of the source Kinesis data stream. // // KinesisStreamARN is a required field KinesisStreamARN *string `min:"1" type:"string" required:"true"` - // The ARN of the role that provides access to the source Kinesis stream. + // The ARN of the role that provides access to the source Kinesis data stream. // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2594,19 +2880,19 @@ func (s *KinesisStreamSourceConfiguration) SetRoleARN(v string) *KinesisStreamSo return s } -// Details about a Kinesis stream used as the source for a Kinesis Firehose -// delivery stream. +// Details about a Kinesis data stream used as the source for a Kinesis Data +// Firehose delivery stream. type KinesisStreamSourceDescription struct { _ struct{} `type:"structure"` - // Kinesis Firehose starts retrieving records from the Kinesis stream starting - // with this time stamp. + // Kinesis Data Firehose starts retrieving records from the Kinesis data stream + // starting with this time stamp. DeliveryStartTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` - // The ARN of the source Kinesis stream. + // The Amazon Resource Name (ARN) of the source Kinesis data stream. KinesisStreamARN *string `min:"1" type:"string"` - // The ARN of the role used by the source Kinesis stream. + // The ARN of the role used by the source Kinesis data stream. RoleARN *string `min:"1" type:"string"` } @@ -2645,8 +2931,8 @@ type ListDeliveryStreamsInput struct { // // * DirectPut: Provider applications access the delivery stream directly. // - // * KinesisStreamAsSource: The delivery stream uses a Kinesis stream as - // a source. + // * KinesisStreamAsSource: The delivery stream uses a Kinesis data stream + // as a source. // // This parameter is optional. If this parameter is omitted, delivery streams // of all types are returned. @@ -2739,6 +3025,114 @@ func (s *ListDeliveryStreamsOutput) SetHasMoreDeliveryStreams(v bool) *ListDeliv return s } +type ListTagsForDeliveryStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream whose tags you want to list. + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` + + // The key to use as the starting point for the list of tags. If you set this + // parameter, ListTagsForDeliveryStream gets all tags that occur after ExclusiveStartTagKey. + ExclusiveStartTagKey *string `min:"1" type:"string"` + + // The number of tags to return. If this number is less than the total number + // of tags associated with the delivery stream, HasMoreTags is set to true in + // the response. To list additional tags, set ExclusiveStartTagKey to the last + // key in the response. + Limit *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s ListTagsForDeliveryStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForDeliveryStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.ExclusiveStartTagKey != nil && len(*s.ExclusiveStartTagKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTagKey", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *ListTagsForDeliveryStreamInput) SetDeliveryStreamName(v string) *ListTagsForDeliveryStreamInput { + s.DeliveryStreamName = &v + return s +} + +// SetExclusiveStartTagKey sets the ExclusiveStartTagKey field's value. +func (s *ListTagsForDeliveryStreamInput) SetExclusiveStartTagKey(v string) *ListTagsForDeliveryStreamInput { + s.ExclusiveStartTagKey = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListTagsForDeliveryStreamInput) SetLimit(v int64) *ListTagsForDeliveryStreamInput { + s.Limit = &v + return s +} + +type ListTagsForDeliveryStreamOutput struct { + _ struct{} `type:"structure"` + + // If this is true in the response, more tags are available. To list the remaining + // tags, set ExclusiveStartTagKey to the key of the last tag returned and call + // ListTagsForDeliveryStream again. + // + // HasMoreTags is a required field + HasMoreTags *bool `type:"boolean" required:"true"` + + // A list of tags associated with DeliveryStreamName, starting with the first + // tag after ExclusiveStartTagKey and up to the specified Limit. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTagsForDeliveryStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForDeliveryStreamOutput) GoString() string { + return s.String() +} + +// SetHasMoreTags sets the HasMoreTags field's value. +func (s *ListTagsForDeliveryStreamOutput) SetHasMoreTags(v bool) *ListTagsForDeliveryStreamOutput { + s.HasMoreTags = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForDeliveryStreamOutput) SetTags(v []*Tag) *ListTagsForDeliveryStreamOutput { + s.Tags = v + return s +} + // Describes a data processing configuration. type ProcessingConfiguration struct { _ struct{} `type:"structure"` @@ -3208,11 +3602,11 @@ type RedshiftDestinationConfiguration struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3395,11 +3789,11 @@ type RedshiftDestinationDescription struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3510,11 +3904,11 @@ type RedshiftDestinationUpdate struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver documents + // The retry behavior in case Kinesis Data Firehose is unable to deliver documents // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. RoleARN *string `min:"1" type:"string"` // The Amazon S3 backup mode. @@ -3652,15 +4046,15 @@ func (s *RedshiftDestinationUpdate) SetUsername(v string) *RedshiftDestinationUp return s } -// Configures retry behavior in case Kinesis Firehose is unable to deliver documents -// to Amazon Redshift. +// Configures retry behavior in case Kinesis Data Firehose is unable to deliver +// documents to Amazon Redshift. type RedshiftRetryOptions struct { _ struct{} `type:"structure"` - // The length of time during which Kinesis Firehose retries delivery after a - // failure, starting from the initial request and including the first attempt. - // The default value is 3600 seconds (60 minutes). Kinesis Firehose does not - // retry if the value of DurationInSeconds is 0 (zero) or if the first delivery + // The length of time during which Kinesis Data Firehose retries delivery after + // a failure, starting from the initial request and including the first attempt. + // The default value is 3600 seconds (60 minutes). Kinesis Data Firehose does + // not retry if the value of DurationInSeconds is 0 (zero) or if the first delivery // attempt takes longer than the current value. DurationInSeconds *int64 `type:"integer"` } @@ -3709,13 +4103,14 @@ type S3DestinationConfiguration struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3835,13 +4230,14 @@ type S3DestinationDescription struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3925,13 +4321,14 @@ type S3DestinationUpdate struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html) - // in the Amazon Kinesis Firehose Developer Guide. + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The ARN of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. RoleARN *string `min:"1" type:"string"` } @@ -4013,12 +4410,12 @@ func (s *S3DestinationUpdate) SetRoleARN(v string) *S3DestinationUpdate { return s } -// Details about a Kinesis stream used as the source for a Kinesis Firehose -// delivery stream. +// Details about a Kinesis data stream used as the source for a Kinesis Data +// Firehose delivery stream. type SourceDescription struct { _ struct{} `type:"structure"` - // The KinesisStreamSourceDescription value for the source Kinesis stream. + // The KinesisStreamSourceDescription value for the source Kinesis data stream. KinesisStreamSourceDescription *KinesisStreamSourceDescription `type:"structure"` } @@ -4045,25 +4442,25 @@ type SplunkDestinationConfiguration struct { // The CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The amount of time that Kinesis Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period Kinesis - // Firehose either tries to send the data again or considers it an error, based - // on your retry settings. + // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment + // from Splunk after it sends it data. At the end of the timeout period, Kinesis + // Data Firehose either tries to send the data again or considers it an error, + // based on your retry settings. HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - // The HTTP Event Collector (HEC) endpoint to which Kinesis Firehose sends your - // data. + // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends + // your data. // // HECEndpoint is a required field HECEndpoint *string `type:"string" required:"true"` - // This type can be either "Raw" or "Event". + // This type can be either "Raw" or "Event." // // HECEndpointType is a required field HECEndpointType *string `type:"string" required:"true" enum:"HECEndpointType"` - // This is a GUID you obtain from your Splunk cluster when you create a new - // HEC endpoint. + // This is a GUID that you obtain from your Splunk cluster when you create a + // new HEC endpoint. // // HECToken is a required field HECToken *string `type:"string" required:"true"` @@ -4071,13 +4468,13 @@ type SplunkDestinationConfiguration struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver data to - // Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. + // The retry behavior in case Kinesis Data Firehose is unable to deliver data + // to Splunk, or if it doesn't receive an acknowledgment of receipt from Splunk. RetryOptions *SplunkRetryOptions `type:"structure"` // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Firehose delivers + // Kinesis Data Firehose writes any data that could not be indexed to the configured + // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers // all incoming records to Amazon S3, and also writes failed documents to Amazon // S3. Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` @@ -4194,17 +4591,17 @@ type SplunkDestinationDescription struct { // The CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The amount of time that Kinesis Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period Kinesis - // Firehose either tries to send the data again or considers it an error, based - // on your retry settings. + // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment + // from Splunk after it sends it data. At the end of the timeout period, Kinesis + // Data Firehose either tries to send the data again or considers it an error, + // based on your retry settings. HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - // The HTTP Event Collector (HEC) endpoint to which Kinesis Firehose sends your - // data. + // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends + // your data. HECEndpoint *string `type:"string"` - // This type can be either "Raw" or "Event". + // This type can be either "Raw" or "Event." HECEndpointType *string `type:"string" enum:"HECEndpointType"` // This is a GUID you obtain from your Splunk cluster when you create a new @@ -4214,13 +4611,13 @@ type SplunkDestinationDescription struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver data to - // Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. + // The retry behavior in case Kinesis Data Firehose is unable to deliver data + // to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. RetryOptions *SplunkRetryOptions `type:"structure"` // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Firehose delivers + // Kinesis Data Firehose writes any data that could not be indexed to the configured + // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers // all incoming records to Amazon S3, and also writes failed documents to Amazon // S3. Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` @@ -4300,33 +4697,33 @@ type SplunkDestinationUpdate struct { // The CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The amount of time that Kinesis Firehose waits to receive an acknowledgment - // from Splunk after it sends it data. At the end of the timeout period Kinesis - // Firehose either tries to send the data again or considers it an error, based - // on your retry settings. + // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment + // from Splunk after it sends data. At the end of the timeout period, Kinesis + // Data Firehose either tries to send the data again or considers it an error, + // based on your retry settings. HECAcknowledgmentTimeoutInSeconds *int64 `min:"180" type:"integer"` - // The HTTP Event Collector (HEC) endpoint to which Kinesis Firehose sends your - // data. + // The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends + // your data. HECEndpoint *string `type:"string"` - // This type can be either "Raw" or "Event". + // This type can be either "Raw" or "Event." HECEndpointType *string `type:"string" enum:"HECEndpointType"` - // This is a GUID you obtain from your Splunk cluster when you create a new - // HEC endpoint. + // A GUID that you obtain from your Splunk cluster when you create a new HEC + // endpoint. HECToken *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The retry behavior in case Kinesis Firehose is unable to deliver data to - // Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. + // The retry behavior in case Kinesis Data Firehose is unable to deliver data + // to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk. RetryOptions *SplunkRetryOptions `type:"structure"` // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Firehose writes any data that could not be indexed to the configured - // Amazon S3 destination. When set to AllDocuments, Kinesis Firehose delivers + // Kinesis Data Firehose writes any data that could not be indexed to the configured + // Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers // all incoming records to Amazon S3, and also writes failed documents to Amazon // S3. Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"SplunkS3BackupMode"` @@ -4422,15 +4819,15 @@ func (s *SplunkDestinationUpdate) SetS3Update(v *S3DestinationUpdate) *SplunkDes return s } -// Configures retry behavior in case Kinesis Firehose is unable to deliver documents -// to Splunk or if it doesn't receive an acknowledgment from Splunk. +// Configures retry behavior in case Kinesis Data Firehose is unable to deliver +// documents to Splunk, or if it doesn't receive an acknowledgment from Splunk. type SplunkRetryOptions struct { _ struct{} `type:"structure"` - // The total amount of time that Kinesis Firehose spends on retries. This duration - // starts after the initial attempt to send data to Splunk fails and doesn't - // include the periods during which Kinesis Firehose waits for acknowledgment - // from Splunk after each attempt. + // The total amount of time that Kinesis Data Firehose spends on retries. This + // duration starts after the initial attempt to send data to Splunk fails. It + // doesn't include the periods during which Kinesis Data Firehose waits for + // acknowledgment from Splunk after each attempt. DurationInSeconds *int64 `type:"integer"` } @@ -4450,11 +4847,220 @@ func (s *SplunkRetryOptions) SetDurationInSeconds(v int64) *SplunkRetryOptions { return s } +// Metadata that you can assign to a delivery stream, consisting of a key-value +// pair. +type Tag struct { + _ struct{} `type:"structure"` + + // A unique identifier for the tag. Maximum length: 128 characters. Valid characters: + // Unicode letters, digits, white space, _ . / = + - % @ + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // An optional string, which you can use to describe or define the tag. Maximum + // length: 256 characters. Valid characters: Unicode letters, digits, white + // space, _ . / = + - % @ + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagDeliveryStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream to which you want to add the tags. + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` + + // A set of key-value pairs to use to create the tags. + // + // Tags is a required field + Tags []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagDeliveryStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagDeliveryStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *TagDeliveryStreamInput) SetDeliveryStreamName(v string) *TagDeliveryStreamInput { + s.DeliveryStreamName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagDeliveryStreamInput) SetTags(v []*Tag) *TagDeliveryStreamInput { + s.Tags = v + return s +} + +type TagDeliveryStreamOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagDeliveryStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagDeliveryStreamOutput) GoString() string { + return s.String() +} + +type UntagDeliveryStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream. + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` + + // A list of tag keys. Each corresponding tag is removed from the delivery stream. + // + // TagKeys is a required field + TagKeys []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagDeliveryStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagDeliveryStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagDeliveryStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagDeliveryStreamInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.TagKeys != nil && len(s.TagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *UntagDeliveryStreamInput) SetDeliveryStreamName(v string) *UntagDeliveryStreamInput { + s.DeliveryStreamName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagDeliveryStreamInput) SetTagKeys(v []*string) *UntagDeliveryStreamInput { + s.TagKeys = v + return s +} + +type UntagDeliveryStreamOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagDeliveryStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagDeliveryStreamOutput) GoString() string { + return s.String() +} + type UpdateDestinationInput struct { _ struct{} `type:"structure"` // Obtain this value from the VersionId result of DeliveryStreamDescription. - // This value is required, and helps the service to perform conditional operations. + // This value is required, and it helps the service perform conditional operations. // For example, if there is an interleaving update and this value is null, then // the update destination fails. After the update is successful, the VersionId // value is updated. The service then performs a merge of the old configuration diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go index a183c051c9d..32bec009c2f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go @@ -3,9 +3,9 @@ // Package firehose provides the client and types for making API // requests to Amazon Kinesis Firehose. // -// Amazon Kinesis Firehose is a fully managed service that delivers real-time +// Amazon Kinesis Data Firehose is a fully managed service that delivers real-time // streaming data to destinations such as Amazon Simple Storage Service (Amazon -// S3), Amazon Elasticsearch Service (Amazon ES), and Amazon Redshift. +// S3), Amazon Elasticsearch Service (Amazon ES), Amazon Redshift, and Splunk. // // See https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go index 7854fccd3ff..d70656e3e3e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/errors.go @@ -38,9 +38,9 @@ const ( // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // - // The service is unavailable, back off and retry the operation. If you continue + // The service is unavailable. Back off and retry the operation. If you continue // to see the exception, throughput limits for the delivery stream may have // been exceeded. For more information about limits and how to request an increase, - // see Amazon Kinesis Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). + // see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). ErrCodeServiceUnavailableException = "ServiceUnavailableException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go index 177764b646d..8087df5f760 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go @@ -1030,7 +1030,7 @@ func (c *Glacier) DeleteVaultNotificationsRequest(input *DeleteVaultNotification // AWS Identity and Access Management (IAM) users don't have any permissions // by default. You must grant them explicit permission to perform specific actions. // For more information, see Access Control Using AWS Identity and Access Management -// (IAM) (http://docs.aws.amazon.com/latest/dev/using-iam-with-amazon-glacier.html). +// (IAM) (http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html). // // For conceptual information and underlying REST API, see Configuring Vault // Notifications in Amazon Glacier (http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html) diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index 0273d17d1f9..02970d29fae 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -3,6 +3,8 @@ package guardduty import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" @@ -2955,7 +2957,7 @@ func (c *GuardDuty) StopMonitoringMembersRequest(input *StopMonitoringMembersInp // // Disables GuardDuty from monitoring findings of the member accounts specified // by the account IDs. After running this command, a master GuardDuty account -// can run StartMonitoringMembers to re-enable GuardDuty to monitor these members' +// can run StartMonitoringMembers to re-enable GuardDuty to monitor these members’ // findings. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3530,10 +3532,14 @@ type AccountDetail struct { _ struct{} `type:"structure"` // Member account ID. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // Member account's email address. - Email *string `locationName:"email" type:"string"` + // + // Email is a required field + Email *string `locationName:"email" type:"string" required:"true"` } // String returns the string representation @@ -3546,6 +3552,22 @@ func (s AccountDetail) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *AccountDetail) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AccountDetail"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.Email == nil { + invalidParams.Add(request.NewErrParamRequired("Email")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAccountId sets the AccountId field's value. func (s *AccountDetail) SetAccountId(v string) *AccountDetail { s.AccountId = &v @@ -4047,6 +4069,16 @@ func (s *CreateMembersInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.AccountDetails != nil { + for i, v := range s.AccountDetails { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccountDetails", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4762,51 +4794,71 @@ type Finding struct { // AWS account ID where the activity occurred that prompted GuardDuty to generate // a finding. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // The ARN of a finding described by the action. - Arn *string `locationName:"arn" type:"string"` + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` // The confidence level of a finding. Confidence *float64 `locationName:"confidence" type:"double"` // The time stamp at which a finding was generated. - CreatedAt *string `locationName:"createdAt" type:"string"` + // + // CreatedAt is a required field + CreatedAt *string `locationName:"createdAt" type:"string" required:"true"` // The description of a finding. Description *string `locationName:"description" type:"string"` // The identifier that corresponds to a finding described by the action. - Id *string `locationName:"id" type:"string"` + // + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` // The AWS resource partition. Partition *string `locationName:"partition" type:"string"` // The AWS region where the activity occurred that prompted GuardDuty to generate // a finding. - Region *string `locationName:"region" type:"string"` + // + // Region is a required field + Region *string `locationName:"region" type:"string" required:"true"` // The AWS resource associated with the activity that prompted GuardDuty to // generate a finding. - Resource *Resource `locationName:"resource" type:"structure"` + // + // Resource is a required field + Resource *Resource `locationName:"resource" type:"structure" required:"true"` // Findings' schema version. - SchemaVersion *string `locationName:"schemaVersion" type:"string"` + // + // SchemaVersion is a required field + SchemaVersion *string `locationName:"schemaVersion" type:"string" required:"true"` // Additional information assigned to the generated finding by GuardDuty. Service *Service `locationName:"service" type:"structure"` // The severity of a finding. - Severity *float64 `locationName:"severity" type:"double"` + // + // Severity is a required field + Severity *float64 `locationName:"severity" type:"double" required:"true"` // The title of a finding. Title *string `locationName:"title" type:"string"` // The type of a finding described by the action. - Type *string `locationName:"type" type:"string"` + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true"` // The time stamp at which a finding was last updated. - UpdatedAt *string `locationName:"updatedAt" type:"string"` + // + // UpdatedAt is a required field + UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` } // String returns the string representation @@ -5825,7 +5877,10 @@ type InviteMembersInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - // The invitation message that you want to send to the accounts that you're + // Indicates whether invite member email notification is disabled + DisableEmailNotification *bool `locationName:"disableEmailNotification" type:"boolean"` + + // The invitation message that you want to send to the accounts that you’re // inviting to GuardDuty as members. Message *string `locationName:"message" type:"string"` } @@ -5865,6 +5920,12 @@ func (s *InviteMembersInput) SetDetectorId(v string) *InviteMembersInput { return s } +// SetDisableEmailNotification sets the DisableEmailNotification field's value. +func (s *InviteMembersInput) SetDisableEmailNotification(v bool) *InviteMembersInput { + s.DisableEmailNotification = &v + return s +} + // SetMessage sets the Message field's value. func (s *InviteMembersInput) SetMessage(v string) *InviteMembersInput { s.Message = &v @@ -6550,25 +6611,35 @@ type Member struct { _ struct{} `type:"structure"` // AWS account ID. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // The unique identifier for a detector. DetectorId *string `locationName:"detectorId" type:"string"` // Member account's email address. - Email *string `locationName:"email" type:"string"` + // + // Email is a required field + Email *string `locationName:"email" type:"string" required:"true"` // Timestamp at which the invitation was sent InvitedAt *string `locationName:"invitedAt" type:"string"` // The master account ID. - MasterId *string `locationName:"masterId" type:"string"` + // + // MasterId is a required field + MasterId *string `locationName:"masterId" type:"string" required:"true"` // The status of the relationship between the member and the master. - RelationshipStatus *string `locationName:"relationshipStatus" type:"string"` + // + // RelationshipStatus is a required field + RelationshipStatus *string `locationName:"relationshipStatus" type:"string" required:"true"` // The first time a resource was created. The format will be ISO-8601. - UpdatedAt *string `locationName:"updatedAt" type:"string"` + // + // UpdatedAt is a required field + UpdatedAt *string `locationName:"updatedAt" type:"string" required:"true"` } // String returns the string representation @@ -7517,10 +7588,14 @@ type UnprocessedAccount struct { _ struct{} `type:"structure"` // AWS Account ID. - AccountId *string `locationName:"accountId" type:"string"` + // + // AccountId is a required field + AccountId *string `locationName:"accountId" type:"string" required:"true"` // A reason why the account hasn't been processed. - Result *string `locationName:"result" type:"string"` + // + // Result is a required field + Result *string `locationName:"result" type:"string" required:"true"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index ef322f6b90e..a86abf00e4b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -1804,7 +1804,7 @@ func (c *IoT) CreateThingRequest(input *CreateThingInput) (req *request.Request, // CreateThing API operation for AWS IoT. // -// Creates a thing record in the thing registry. +// Creates a thing record in the registry. // // 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 @@ -11258,7 +11258,8 @@ func (c *IoT) UpdateThingGroupsForThingWithContext(ctx aws.Context, input *Updat type AcceptCertificateTransferInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -11343,6 +11344,9 @@ type Action struct { // Write to an Amazon Kinesis Firehose stream. Firehose *FirehoseAction `locationName:"firehose" type:"structure"` + // Sends message data to an AWS IoT Analytics channel. + IotAnalytics *IotAnalyticsAction `locationName:"iotAnalytics" type:"structure"` + // Write data to an Amazon Kinesis stream. Kinesis *KinesisAction `locationName:"kinesis" type:"structure"` @@ -11486,6 +11490,12 @@ func (s *Action) SetFirehose(v *FirehoseAction) *Action { return s } +// SetIotAnalytics sets the IotAnalytics field's value. +func (s *Action) SetIotAnalytics(v *IotAnalyticsAction) *Action { + s.IotAnalytics = v + return s +} + // SetKinesis sets the Kinesis field's value. func (s *Action) SetKinesis(v *KinesisAction) *Action { s.Kinesis = v @@ -12283,10 +12293,13 @@ type CACertificateDescription struct { // The date the CA certificate was created. CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + // The customer version of the CA certificate. CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` + // The generation ID of the CA certificate. GenerationId *string `locationName:"generationId" type:"string"` + // The date the CA certificate was last modified. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` // The owner of the CA certificate. @@ -12370,7 +12383,8 @@ func (s *CACertificateDescription) SetStatus(v string) *CACertificateDescription type CancelCertificateTransferInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -12520,7 +12534,8 @@ type Certificate struct { // The ARN of the certificate. CertificateArn *string `locationName:"certificateArn" type:"string"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) CertificateId *string `locationName:"certificateId" min:"64" type:"string"` // The date and time the certificate was created. @@ -12585,8 +12600,10 @@ type CertificateDescription struct { // The date and time the certificate was created. CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + // The customer version of the certificate. CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` + // The generation ID of the certificate. GenerationId *string `locationName:"generationId" type:"string"` // The date and time the certificate was last modified. @@ -14739,7 +14756,8 @@ func (s DeleteAuthorizerOutput) GoString() string { type DeleteCACertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate to delete. + // The ID of the certificate to delete. (The last part of the certificate ARN + // contains the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"caCertificateId" min:"64" type:"string" required:"true"` @@ -14796,7 +14814,8 @@ func (s DeleteCACertificateOutput) GoString() string { type DeleteCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -15734,7 +15753,8 @@ func (s *DescribeCACertificateOutput) SetRegistrationConfig(v *RegistrationConfi type DescribeCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -17945,13 +17965,16 @@ func (s *GetPolicyInput) SetPolicyName(v string) *GetPolicyInput { type GetPolicyOutput struct { _ struct{} `type:"structure"` + // The date the policy was created. CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` // The default policy version ID. DefaultVersionId *string `locationName:"defaultVersionId" type:"string"` + // The generation ID of the policy. GenerationId *string `locationName:"generationId" type:"string"` + // The date the policy was last modified. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` // The policy ARN. @@ -18076,13 +18099,16 @@ func (s *GetPolicyVersionInput) SetPolicyVersionId(v string) *GetPolicyVersionIn type GetPolicyVersionOutput struct { _ struct{} `type:"structure"` + // The date the policy version was created. CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + // The generation ID of the policy version. GenerationId *string `locationName:"generationId" type:"string"` // Specifies whether the policy version is the default. IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` + // The date the policy version was last modified. LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` // The policy ARN. @@ -18384,6 +18410,50 @@ func (s *ImplicitDeny) SetPolicies(v []*Policy) *ImplicitDeny { return s } +// Sends message data to an AWS IoT Analytics channel. +type IotAnalyticsAction struct { + _ struct{} `type:"structure"` + + // (deprecated) The ARN of the IoT Analytics channel to which message data will + // be sent. + ChannelArn *string `locationName:"channelArn" type:"string"` + + // The name of the IoT Analytics channel to which message data will be sent. + ChannelName *string `locationName:"channelName" type:"string"` + + // The ARN of the role which has a policy that grants IoT permission to send + // message data via IoT Analytics (iotanalytics:BatchPutMessage). + RoleArn *string `locationName:"roleArn" type:"string"` +} + +// String returns the string representation +func (s IotAnalyticsAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IotAnalyticsAction) GoString() string { + return s.String() +} + +// SetChannelArn sets the ChannelArn field's value. +func (s *IotAnalyticsAction) SetChannelArn(v string) *IotAnalyticsAction { + s.ChannelArn = &v + return s +} + +// SetChannelName sets the ChannelName field's value. +func (s *IotAnalyticsAction) SetChannelName(v string) *IotAnalyticsAction { + s.ChannelName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *IotAnalyticsAction) SetRoleArn(v string) *IotAnalyticsAction { + s.RoleArn = &v + return s +} + // The Job object contains details about a job. type Job struct { _ struct{} `type:"structure"` @@ -20030,7 +20100,7 @@ type ListOTAUpdatesInput struct { // The maximum number of results to return at one time. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` - // A token used to retreive the next set of results. + // A token used to retrieve the next set of results. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` // The OTA update job status. @@ -22754,10 +22824,12 @@ func (s *RegisterCertificateOutput) SetCertificateId(v string) *RegisterCertific type RegisterThingInput struct { _ struct{} `type:"structure"` - // The parameters for provisioning a thing. + // The parameters for provisioning a thing. See Programmatic Provisioning (http://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) + // for more information. Parameters map[string]*string `locationName:"parameters" type:"map"` - // The provisioning template. + // The provisioning template. See Programmatic Provisioning (http://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html) + // for more information. // // TemplateBody is a required field TemplateBody *string `locationName:"templateBody" type:"string" required:"true"` @@ -22880,7 +22952,8 @@ func (s *RegistrationConfig) SetTemplateBody(v string) *RegistrationConfig { type RejectCertificateTransferInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -23168,6 +23241,7 @@ type RoleAliasDescription struct { // The role alias. RoleAlias *string `locationName:"roleAlias" min:"1" type:"string"` + // The ARN of the role alias. RoleAliasArn *string `locationName:"roleAliasArn" type:"string"` // The role ARN. @@ -24716,7 +24790,7 @@ type ThingDocument struct { // The attributes. Attributes map[string]*string `locationName:"attributes" type:"map"` - // The thing shadow. + // The shadow. Shadow *string `locationName:"shadow" type:"string"` // Thing group names. @@ -25274,7 +25348,8 @@ func (s *TopicRulePayload) SetSql(v string) *TopicRulePayload { type TransferCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` @@ -25636,7 +25711,8 @@ func (s UpdateCACertificateOutput) GoString() string { type UpdateCertificateInput struct { _ struct{} `type:"structure"` - // The ID of the certificate. + // The ID of the certificate. (The last part of the certificate ARN contains + // the certificate ID.) // // CertificateId is a required field CertificateId *string `location:"uri" locationName:"certificateId" min:"64" type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go index 92337e2e6ef..c072101851f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/doc.go @@ -4,11 +4,11 @@ // requests to AWS IoT. // // AWS IoT provides secure, bi-directional communication between Internet-connected -// things (such as sensors, actuators, embedded devices, or smart appliances) +// devices (such as sensors, actuators, embedded devices, or smart appliances) // and the AWS cloud. You can discover your custom IoT-Data endpoint to communicate // with, configure rules for data processing and integration with other services, -// organize resources associated with each thing (Thing Registry), configure -// logging, and create and manage policies and credentials to authenticate things. +// organize resources associated with each device (Registry), configure logging, +// and create and manage policies and credentials to authenticate devices. // // For more information about how AWS IoT works, see the Developer Guide (http://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html). // diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go index fe363406741..f926d2e5977 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go @@ -3248,6 +3248,8 @@ type CaptionDestinationSettings struct { EmbeddedPlusScte20DestinationSettings *EmbeddedPlusScte20DestinationSettings `locationName:"embeddedPlusScte20DestinationSettings" type:"structure"` + RtmpCaptionInfoDestinationSettings *RtmpCaptionInfoDestinationSettings `locationName:"rtmpCaptionInfoDestinationSettings" type:"structure"` + Scte20PlusEmbeddedDestinationSettings *Scte20PlusEmbeddedDestinationSettings `locationName:"scte20PlusEmbeddedDestinationSettings" type:"structure"` Scte27DestinationSettings *Scte27DestinationSettings `locationName:"scte27DestinationSettings" type:"structure"` @@ -3321,6 +3323,12 @@ func (s *CaptionDestinationSettings) SetEmbeddedPlusScte20DestinationSettings(v return s } +// SetRtmpCaptionInfoDestinationSettings sets the RtmpCaptionInfoDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetRtmpCaptionInfoDestinationSettings(v *RtmpCaptionInfoDestinationSettings) *CaptionDestinationSettings { + s.RtmpCaptionInfoDestinationSettings = v + return s +} + // SetScte20PlusEmbeddedDestinationSettings sets the Scte20PlusEmbeddedDestinationSettings field's value. func (s *CaptionDestinationSettings) SetScte20PlusEmbeddedDestinationSettings(v *Scte20PlusEmbeddedDestinationSettings) *CaptionDestinationSettings { s.Scte20PlusEmbeddedDestinationSettings = v @@ -7353,7 +7361,7 @@ type InputLocation struct { // Uniform Resource Identifier - This should be a path to a file accessible // to the Live system (eg. a http:// URI) depending on the output type. For - // example, a rtmpEndpoint should have a uri simliar to: "rtmp://fmsserver/live". + // example, a RTMP destination should have a uri simliar to: "rtmp://fmsserver/live". // // Uri is a required field Uri *string `locationName:"uri" type:"string" required:"true"` @@ -8705,6 +8713,11 @@ type M3u8Settings struct { // When set to passthrough, timed metadata is passed through from input to output. TimedMetadataBehavior *string `locationName:"timedMetadataBehavior" type:"string" enum:"M3u8TimedMetadataBehavior"` + // Packet Identifier (PID) of the timed metadata stream in the transport stream. + // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or + // 0x20)..8182 (or 0x1ff6). + TimedMetadataPid *string `locationName:"timedMetadataPid" type:"string"` + // The value of the transport stream ID field in the Program Map Table. TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` @@ -8801,6 +8814,12 @@ func (s *M3u8Settings) SetTimedMetadataBehavior(v string) *M3u8Settings { return s } +// SetTimedMetadataPid sets the TimedMetadataPid field's value. +func (s *M3u8Settings) SetTimedMetadataPid(v string) *M3u8Settings { + s.TimedMetadataPid = &v + return s +} + // SetTransportStreamId sets the TransportStreamId field's value. func (s *M3u8Settings) SetTransportStreamId(v int64) *M3u8Settings { s.TransportStreamId = &v @@ -8869,8 +8888,7 @@ type MsSmoothGroupSettings struct { // If set to verifyAuthenticity, verify the https certificate chain to a trusted // Certificate Authority (CA). This will cause https outputs to self-signed - // certificates to fail unless those certificates are manually added to the - // OS trusted keystore. + // certificates to fail. CertificateMode *string `locationName:"certificateMode" type:"string" enum:"SmoothGroupCertificateMode"` // Number of seconds to wait before retrying connection to the IIS server if @@ -9273,6 +9291,9 @@ type OutputDestinationSettings struct { // key used to extract the password from EC2 Parameter store PasswordParam *string `locationName:"passwordParam" type:"string"` + // Stream name for RTMP destinations (URLs of type rtmp://) + StreamName *string `locationName:"streamName" type:"string"` + // A URL specifying a destination Url *string `locationName:"url" type:"string"` @@ -9296,6 +9317,12 @@ func (s *OutputDestinationSettings) SetPasswordParam(v string) *OutputDestinatio return s } +// SetStreamName sets the StreamName field's value. +func (s *OutputDestinationSettings) SetStreamName(v string) *OutputDestinationSettings { + s.StreamName = &v + return s +} + // SetUrl sets the Url field's value. func (s *OutputDestinationSettings) SetUrl(v string) *OutputDestinationSettings { s.Url = &v @@ -9394,6 +9421,8 @@ type OutputGroupSettings struct { MsSmoothGroupSettings *MsSmoothGroupSettings `locationName:"msSmoothGroupSettings" type:"structure"` + RtmpGroupSettings *RtmpGroupSettings `locationName:"rtmpGroupSettings" type:"structure"` + UdpGroupSettings *UdpGroupSettings `locationName:"udpGroupSettings" type:"structure"` } @@ -9425,6 +9454,11 @@ func (s *OutputGroupSettings) Validate() error { invalidParams.AddNested("MsSmoothGroupSettings", err.(request.ErrInvalidParams)) } } + if s.RtmpGroupSettings != nil { + if err := s.RtmpGroupSettings.Validate(); err != nil { + invalidParams.AddNested("RtmpGroupSettings", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -9450,6 +9484,12 @@ func (s *OutputGroupSettings) SetMsSmoothGroupSettings(v *MsSmoothGroupSettings) return s } +// SetRtmpGroupSettings sets the RtmpGroupSettings field's value. +func (s *OutputGroupSettings) SetRtmpGroupSettings(v *RtmpGroupSettings) *OutputGroupSettings { + s.RtmpGroupSettings = v + return s +} + // SetUdpGroupSettings sets the UdpGroupSettings field's value. func (s *OutputGroupSettings) SetUdpGroupSettings(v *UdpGroupSettings) *OutputGroupSettings { s.UdpGroupSettings = v @@ -9488,6 +9528,8 @@ type OutputSettings struct { MsSmoothOutputSettings *MsSmoothOutputSettings `locationName:"msSmoothOutputSettings" type:"structure"` + RtmpOutputSettings *RtmpOutputSettings `locationName:"rtmpOutputSettings" type:"structure"` + UdpOutputSettings *UdpOutputSettings `locationName:"udpOutputSettings" type:"structure"` } @@ -9514,6 +9556,11 @@ func (s *OutputSettings) Validate() error { invalidParams.AddNested("HlsOutputSettings", err.(request.ErrInvalidParams)) } } + if s.RtmpOutputSettings != nil { + if err := s.RtmpOutputSettings.Validate(); err != nil { + invalidParams.AddNested("RtmpOutputSettings", err.(request.ErrInvalidParams)) + } + } if s.UdpOutputSettings != nil { if err := s.UdpOutputSettings.Validate(); err != nil { invalidParams.AddNested("UdpOutputSettings", err.(request.ErrInvalidParams)) @@ -9544,6 +9591,12 @@ func (s *OutputSettings) SetMsSmoothOutputSettings(v *MsSmoothOutputSettings) *O return s } +// SetRtmpOutputSettings sets the RtmpOutputSettings field's value. +func (s *OutputSettings) SetRtmpOutputSettings(v *RtmpOutputSettings) *OutputSettings { + s.RtmpOutputSettings = v + return s +} + // SetUdpOutputSettings sets the UdpOutputSettings field's value. func (s *OutputSettings) SetUdpOutputSettings(v *UdpOutputSettings) *OutputSettings { s.UdpOutputSettings = v @@ -9636,6 +9689,176 @@ func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { return s } +type RtmpCaptionInfoDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RtmpCaptionInfoDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RtmpCaptionInfoDestinationSettings) GoString() string { + return s.String() +} + +type RtmpGroupSettings struct { + _ struct{} `type:"structure"` + + // Authentication scheme to use when connecting with CDN + AuthenticationScheme *string `locationName:"authenticationScheme" type:"string" enum:"AuthenticationScheme"` + + // Controls behavior when content cache fills up. If remote origin server stalls + // the RTMP connection and does not accept content fast enough the 'Media Cache' + // will fill up. When the cache reaches the duration specified by cacheLength + // the cache will stop accepting new content. If set to disconnectImmediately, + // the RTMP output will force a disconnect. Clear the media cache, and reconnect + // after restartDelay seconds. If set to waitForServer, the RTMP output will + // wait up to 5 minutes to allow the origin server to begin accepting data again. + CacheFullBehavior *string `locationName:"cacheFullBehavior" type:"string" enum:"RtmpCacheFullBehavior"` + + // Cache length, in seconds, is used to calculate buffer size. + CacheLength *int64 `locationName:"cacheLength" min:"30" type:"integer"` + + // Controls the types of data that passes to onCaptionInfo outputs. If set to + // 'all' then 608 and 708 carried DTVCC data will be passed. If set to 'field1AndField2608' + // then DTVCC data will be stripped out, but 608 data from both fields will + // be passed. If set to 'field1608' then only the data carried in 608 from field + // 1 video will be passed. + CaptionData *string `locationName:"captionData" type:"string" enum:"RtmpCaptionData"` + + // If a streaming output fails, number of seconds to wait until a restart is + // initiated. A value of 0 means never restart. + RestartDelay *int64 `locationName:"restartDelay" type:"integer"` +} + +// String returns the string representation +func (s RtmpGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RtmpGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RtmpGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RtmpGroupSettings"} + if s.CacheLength != nil && *s.CacheLength < 30 { + invalidParams.Add(request.NewErrParamMinValue("CacheLength", 30)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthenticationScheme sets the AuthenticationScheme field's value. +func (s *RtmpGroupSettings) SetAuthenticationScheme(v string) *RtmpGroupSettings { + s.AuthenticationScheme = &v + return s +} + +// SetCacheFullBehavior sets the CacheFullBehavior field's value. +func (s *RtmpGroupSettings) SetCacheFullBehavior(v string) *RtmpGroupSettings { + s.CacheFullBehavior = &v + return s +} + +// SetCacheLength sets the CacheLength field's value. +func (s *RtmpGroupSettings) SetCacheLength(v int64) *RtmpGroupSettings { + s.CacheLength = &v + return s +} + +// SetCaptionData sets the CaptionData field's value. +func (s *RtmpGroupSettings) SetCaptionData(v string) *RtmpGroupSettings { + s.CaptionData = &v + return s +} + +// SetRestartDelay sets the RestartDelay field's value. +func (s *RtmpGroupSettings) SetRestartDelay(v int64) *RtmpGroupSettings { + s.RestartDelay = &v + return s +} + +type RtmpOutputSettings struct { + _ struct{} `type:"structure"` + + // If set to verifyAuthenticity, verify the tls certificate chain to a trusted + // Certificate Authority (CA). This will cause rtmps outputs with self-signed + // certificates to fail. + CertificateMode *string `locationName:"certificateMode" type:"string" enum:"RtmpOutputCertificateMode"` + + // Number of seconds to wait before retrying a connection to the Flash Media + // server if the connection is lost. + ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" min:"1" type:"integer"` + + // The RTMP endpoint excluding the stream name (eg. rtmp://host/appname). For + // connection to Akamai, a username and password must be supplied. URI fields + // accept format identifiers. + // + // Destination is a required field + Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` + + // Number of retry attempts. + NumRetries *int64 `locationName:"numRetries" type:"integer"` +} + +// String returns the string representation +func (s RtmpOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RtmpOutputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RtmpOutputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RtmpOutputSettings"} + if s.ConnectionRetryInterval != nil && *s.ConnectionRetryInterval < 1 { + invalidParams.Add(request.NewErrParamMinValue("ConnectionRetryInterval", 1)) + } + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateMode sets the CertificateMode field's value. +func (s *RtmpOutputSettings) SetCertificateMode(v string) *RtmpOutputSettings { + s.CertificateMode = &v + return s +} + +// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. +func (s *RtmpOutputSettings) SetConnectionRetryInterval(v int64) *RtmpOutputSettings { + s.ConnectionRetryInterval = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *RtmpOutputSettings) SetDestination(v *OutputLocationRef) *RtmpOutputSettings { + s.Destination = v + return s +} + +// SetNumRetries sets the NumRetries field's value. +func (s *RtmpOutputSettings) SetNumRetries(v int64) *RtmpOutputSettings { + s.NumRetries = &v + return s +} + type Scte20PlusEmbeddedDestinationSettings struct { _ struct{} `type:"structure"` } @@ -11362,6 +11585,14 @@ const ( AudioTypeVisualImpairedCommentary = "VISUAL_IMPAIRED_COMMENTARY" ) +const ( + // AuthenticationSchemeAkamai is a AuthenticationScheme enum value + AuthenticationSchemeAkamai = "AKAMAI" + + // AuthenticationSchemeCommon is a AuthenticationScheme enum value + AuthenticationSchemeCommon = "COMMON" +) + const ( // AvailBlankingStateDisabled is a AvailBlankingState enum value AvailBlankingStateDisabled = "DISABLED" @@ -12568,6 +12799,33 @@ const ( NetworkInputServerValidationCheckCryptographyOnly = "CHECK_CRYPTOGRAPHY_ONLY" ) +const ( + // RtmpCacheFullBehaviorDisconnectImmediately is a RtmpCacheFullBehavior enum value + RtmpCacheFullBehaviorDisconnectImmediately = "DISCONNECT_IMMEDIATELY" + + // RtmpCacheFullBehaviorWaitForServer is a RtmpCacheFullBehavior enum value + RtmpCacheFullBehaviorWaitForServer = "WAIT_FOR_SERVER" +) + +const ( + // RtmpCaptionDataAll is a RtmpCaptionData enum value + RtmpCaptionDataAll = "ALL" + + // RtmpCaptionDataField1608 is a RtmpCaptionData enum value + RtmpCaptionDataField1608 = "FIELD1_608" + + // RtmpCaptionDataField1AndField2608 is a RtmpCaptionData enum value + RtmpCaptionDataField1AndField2608 = "FIELD1_AND_FIELD2_608" +) + +const ( + // RtmpOutputCertificateModeSelfSigned is a RtmpOutputCertificateMode enum value + RtmpOutputCertificateModeSelfSigned = "SELF_SIGNED" + + // RtmpOutputCertificateModeVerifyAuthenticity is a RtmpOutputCertificateMode enum value + RtmpOutputCertificateModeVerifyAuthenticity = "VERIFY_AUTHENTICITY" +) + const ( // Scte20Convert608To708Disabled is a Scte20Convert608To708 enum value Scte20Convert608To708Disabled = "DISABLED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 73996cf63e9..4ec0b408685 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -21512,6 +21512,13 @@ type ModifyDBClusterInput struct { // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` + // The version number of the database engine to which you want to upgrade. Changing + // this parameter results in an outage. The change is applied during the next + // maintenance window unless the ApplyImmediately parameter is set to true. + // + // For a list of valid engine versions, see CreateDBInstance, or call DescribeDBEngineVersions. + EngineVersion *string `type:"string"` + // The new password for the master database user. This password can contain // any printable ASCII character except "/", """, or "@". // @@ -21643,6 +21650,12 @@ func (s *ModifyDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *Modif return s } +// SetEngineVersion sets the EngineVersion field's value. +func (s *ModifyDBClusterInput) SetEngineVersion(v string) *ModifyDBClusterInput { + s.EngineVersion = &v + return s +} + // SetMasterUserPassword sets the MasterUserPassword field's value. func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput { s.MasterUserPassword = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go index 1fa9902913c..a2686f952b0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go @@ -3813,6 +3813,11 @@ type CreateModelInput struct { // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) // in the AWS Billing and Cost Management User Guide. Tags []*Tag `type:"list"` + + // A object that specifies the VPC that you want your model to connect to. Control + // access to and from your training container by configuring the VPC. For more + // information, see host-vpc. + VpcConfig *VpcConfig `type:"structure"` } // String returns the string representation @@ -3855,6 +3860,11 @@ func (s *CreateModelInput) Validate() error { } } } + if s.VpcConfig != nil { + if err := s.VpcConfig.Validate(); err != nil { + invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3886,6 +3896,12 @@ func (s *CreateModelInput) SetTags(v []*Tag) *CreateModelInput { return s } +// SetVpcConfig sets the VpcConfig field's value. +func (s *CreateModelInput) SetVpcConfig(v *VpcConfig) *CreateModelInput { + s.VpcConfig = v + return s +} + type CreateModelOutput struct { _ struct{} `type:"structure"` @@ -4349,6 +4365,11 @@ type CreateTrainingJobInput struct { // // TrainingJobName is a required field TrainingJobName *string `min:"1" type:"string" required:"true"` + + // A object that specifies the VPC that you want your training job to connect + // to. Control access to and from your training container by configuring the + // VPC. For more information, see train-vpc + VpcConfig *VpcConfig `type:"structure"` } // String returns the string representation @@ -4434,6 +4455,11 @@ func (s *CreateTrainingJobInput) Validate() error { } } } + if s.VpcConfig != nil { + if err := s.VpcConfig.Validate(); err != nil { + invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4495,6 +4521,12 @@ func (s *CreateTrainingJobInput) SetTrainingJobName(v string) *CreateTrainingJob return s } +// SetVpcConfig sets the VpcConfig field's value. +func (s *CreateTrainingJobInput) SetVpcConfig(v *VpcConfig) *CreateTrainingJobInput { + s.VpcConfig = v + return s +} + type CreateTrainingJobOutput struct { _ struct{} `type:"structure"` @@ -5204,6 +5236,10 @@ type DescribeModelOutput struct { // // PrimaryContainer is a required field PrimaryContainer *ContainerDefinition `type:"structure" required:"true"` + + // A object that specifies the VPC that this model has access to. For more information, + // see host-vpc + VpcConfig *VpcConfig `type:"structure"` } // String returns the string representation @@ -5246,6 +5282,12 @@ func (s *DescribeModelOutput) SetPrimaryContainer(v *ContainerDefinition) *Descr return s } +// SetVpcConfig sets the VpcConfig field's value. +func (s *DescribeModelOutput) SetVpcConfig(v *VpcConfig) *DescribeModelOutput { + s.VpcConfig = v + return s +} + type DescribeNotebookInstanceInput struct { _ struct{} `type:"structure"` @@ -5688,6 +5730,10 @@ type DescribeTrainingJobOutput struct { // A timestamp that indicates when training started. TrainingStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // A object that specifies the VPC that this training job has access to. For + // more information, see train-vpc. + VpcConfig *VpcConfig `type:"structure"` } // String returns the string representation @@ -5802,6 +5848,12 @@ func (s *DescribeTrainingJobOutput) SetTrainingStartTime(v time.Time) *DescribeT return s } +// SetVpcConfig sets the VpcConfig field's value. +func (s *DescribeTrainingJobOutput) SetVpcConfig(v *VpcConfig) *DescribeTrainingJobOutput { + s.VpcConfig = v + return s +} + // Specifies weight and capacity values for a production variant. type DesiredWeightAndCapacity struct { _ struct{} `type:"structure"` @@ -8367,6 +8419,69 @@ func (s UpdateNotebookInstanceOutput) GoString() string { return s.String() } +// Specifies a VPC that your training jobs and hosted models have access to. +// Control access to and from your training and model containers by configuring +// the VPC. For more information, see host-vpc and train-vpc. +type VpcConfig struct { + _ struct{} `type:"structure"` + + // The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security + // groups for the VPC that is specified in the Subnets field. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `min:"1" type:"list" required:"true"` + + // The ID of the subnets in the VPC to which you want to connect your training + // job or model. + // + // Subnets is a required field + Subnets []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s VpcConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VpcConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VpcConfig"} + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.SecurityGroupIds != nil && len(s.SecurityGroupIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityGroupIds", 1)) + } + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + if s.Subnets != nil && len(s.Subnets) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Subnets", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig { + s.SecurityGroupIds = v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *VpcConfig) SetSubnets(v []*string) *VpcConfig { + s.Subnets = v + return s +} + const ( // CompressionTypeNone is a CompressionType enum value CompressionTypeNone = "None" diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index 1207a196c7e..eb2d69a707d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -189,9 +189,8 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // CreateSecret API operation for AWS Secrets Manager. // -// Creates a new secret. A secret in AWS Secrets Manager consists of both the -// protected secret data and the important information needed to manage the -// secret. +// Creates a new secret. A secret in Secrets Manager consists of both the protected +// secret data and the important information needed to manage the secret. // // Secrets Manager stores the encrypted secret data in one of a collection of // "versions" associated with the secret. Each version contains a copy of the @@ -201,22 +200,21 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // versions of the secret. Versions without a staging label are considered deprecated // and are not included in the list. // -// You provide the secret data to be encrypted by putting text in the SecretString -// parameter or binary data in the SecretBinary parameter. If you include SecretString -// or SecretBinary then Secrets Manager also creates an initial secret version -// and, if you don't supply a staging label, automatically maps the new version's -// ID to the staging label AWSCURRENT. +// You provide the secret data to be encrypted by putting text in either the +// SecretString parameter or binary data in the SecretBinary parameter, but +// not both. If you include SecretString or SecretBinary then Secrets Manager +// also creates an initial secret version and, if you don't supply a staging +// label, automatically maps the new version's ID to the staging label AWSCURRENT. // // If you call an operation that needs to encrypt or decrypt the SecretString -// and SecretBinary for a secret in the same account as the calling user and -// that secret doesn't specify a KMS encryption key, AWS Secrets Manager uses -// the account's default AWS managed customer master key (CMK) with the alias -// aws/secretsmanager. If this key doesn't already exist in your account then -// AWS Secrets Manager creates it for you automatically. All users in the same -// AWS account automatically have access to use the default CMK. Note that if -// an AWS Secrets Manager API call results in AWS having to create the account's -// AWS-managed CMK, it can result in a one-time significant delay in returning -// the result. +// or SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a KMS encryption key, Secrets Manager uses the +// account's default AWS managed customer master key (CMK) with the alias aws/secretsmanager. +// If this key doesn't already exist in your account then Secrets Manager creates +// it for you automatically. All users in the same AWS account automatically +// have access to use the default CMK. Note that if an Secrets Manager API call +// results in AWS having to create the account's AWS-managed CMK, it can result +// in a one-time significant delay in returning the result. // // If the secret is in a different AWS account from the credentials calling // an API that requires encryption or decryption of the secret value then you @@ -226,7 +224,7 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // it by including it in the KMSKeyId. If you call an API that must encrypt // or decrypt SecretString or SecretBinary using credentials from a different // account then the KMS key policy must grant cross-account access to that other -// account's user or role. +// account's user or role for both the kms:GenerateDataKey and kms:Decrypt operations. // // Minimum permissions // @@ -238,7 +236,7 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // key to encrypt the secret. You do not need this permission to use the // account's default AWS managed CMK for Secrets Manager. // -// * kms:Encrypt - needed only if you use a customer-created KMS key to encrypt +// * kms:Decrypt - needed only if you use a customer-created KMS key to encrypt // the secret. You do not need this permission to use the account's default // AWS managed CMK for Secrets Manager. // @@ -278,11 +276,11 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // in this call. // // * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the AWS Secrets Manager -// internal limits. +// The request failed because it would exceed one of the Secrets Manager internal +// limits. // // * ErrCodeEncryptionFailure "EncryptionFailure" -// AWS Secrets Manager can't encrypt the protected secret text using the provided +// Secrets Manager can't encrypt the protected secret text using the provided // KMS key. Check that the customer master key (CMK) is available, enabled, // and not in an invalid state. For more information, see How Key State Affects // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). @@ -366,24 +364,24 @@ func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *req // DeleteSecret API operation for AWS Secrets Manager. // // Deletes an entire secret and all of its versions. You can optionally include -// a recovery window during which you can restore the secret. If you don't provide +// a recovery window during which you can restore the secret. If you don't specify // a recovery window value, the operation defaults to 30 days. Secrets Manager // attaches a DeletionDate stamp to the secret that specifies the end of the // recovery window. At the end of the recovery window, Secrets Manager deletes // the secret permanently. // -// At any time before recovery period ends, you can use RestoreSecret to remove +// At any time before recovery window ends, you can use RestoreSecret to remove // the DeletionDate and cancel the deletion of the secret. // // You cannot access the encrypted secret information in any secret that is -// scheduled for deletion. If you need to access that information, you can cancel -// the deletion with RestoreSecret and then retrieve the information. +// scheduled for deletion. If you need to access that information, you must +// cancel the deletion with RestoreSecret and then retrieve the information. // // There is no explicit operation to delete a version of a secret. Instead, // remove all staging labels from the VersionStage field of a version. That -// marks the version as deprecated and allows AWS Secrets Manager to delete -// it as needed. Versions that do not have any staging labels do not show up -// in ListSecretVersionIds unless you specify IncludeDeprecated. +// marks the version as deprecated and allows Secrets Manager to delete it as +// needed. Versions that do not have any staging labels do not show up in ListSecretVersionIds +// unless you specify IncludeDeprecated. // // The permanent secret deletion at the end of the waiting period is performed // as a background task with low priority. There is no guarantee of a specific @@ -399,7 +397,7 @@ func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *req // // * To create a secret, use CreateSecret. // -// * To cancel deletion of a version of a secret before the recovery period +// * To cancel deletion of a version of a secret before the recovery window // has expired, use RestoreSecret. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -688,8 +686,8 @@ func (c *SecretsManager) GetSecretValueRequest(input *GetSecretValueInput) (req // GetSecretValue API operation for AWS Secrets Manager. // -// Retrieves the contents of the encrypted fields SecretString and SecretBinary -// from the specified version of a secret. +// Retrieves the contents of the encrypted fields SecretString or SecretBinary +// from the specified version of a secret, whichever contains content. // // Minimum permissions // @@ -729,7 +727,7 @@ func (c *SecretsManager) GetSecretValueRequest(input *GetSecretValueInput) (req // in this call. // // * ErrCodeDecryptionFailure "DecryptionFailure" -// AWS Secrets Manager can't decrypt the protected secret text using the provided +// Secrets Manager can't decrypt the protected secret text using the provided // KMS key. // // * ErrCodeInternalServiceError "InternalServiceError" @@ -967,11 +965,10 @@ func (c *SecretsManager) ListSecretsRequest(input *ListSecretsInput) (req *reque // ListSecrets API operation for AWS Secrets Manager. // -// Lists all of the secrets that are stored by AWS Secrets Manager in the AWS -// account. To list the versions currently stored for a specific secret, use -// ListSecretVersionIds. The encrypted fields SecretString and SecretBinary -// are not included in the output. To get that information, call the GetSecretValue -// operation. +// Lists all of the secrets that are stored by Secrets Manager in the AWS account. +// To list the versions currently stored for a specific secret, use ListSecretVersionIds. +// The encrypted fields SecretString and SecretBinary are not included in the +// output. To get that information, call the GetSecretValue operation. // // Always check the NextToken response parameter when calling any of the List* // operations. These operations can occasionally return an empty or shorter @@ -1126,9 +1123,9 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // the operation creates a new version and attaches it to the secret. The version // can contain a new SecretString value or a new SecretBinary value. // -// The AWS Secrets Manager console uses only the SecretString field. To add -// binary data to a secret with the SecretBinary field you must use the AWS -// CLI or one of the AWS SDKs. +// The Secrets Manager console uses only the SecretString field. To add binary +// data to a secret with the SecretBinary field you must use the AWS CLI or +// one of the AWS SDKs. // // * If this operation creates the first version for the secret then Secrets // Manager automatically attaches the staging label AWSCURRENT to the new @@ -1150,15 +1147,14 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // version that AWSCURRENT was removed from. // // If you call an operation that needs to encrypt or decrypt the SecretString -// and SecretBinary for a secret in the same account as the calling user and -// that secret doesn't specify a KMS encryption key, AWS Secrets Manager uses -// the account's default AWS managed customer master key (CMK) with the alias -// aws/secretsmanager. If this key doesn't already exist in your account then -// AWS Secrets Manager creates it for you automatically. All users in the same -// AWS account automatically have access to use the default CMK. Note that if -// an AWS Secrets Manager API call results in AWS having to create the account's -// AWS-managed CMK, it can result in a one-time significant delay in returning -// the result. +// or SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a KMS encryption key, Secrets Manager uses the +// account's default AWS managed customer master key (CMK) with the alias aws/secretsmanager. +// If this key doesn't already exist in your account then Secrets Manager creates +// it for you automatically. All users in the same AWS account automatically +// have access to use the default CMK. Note that if an Secrets Manager API call +// results in AWS having to create the account's AWS-managed CMK, it can result +// in a one-time significant delay in returning the result. // // If the secret is in a different AWS account from the credentials calling // an API that requires encryption or decryption of the secret value then you @@ -1168,7 +1164,7 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // it by including it in the KMSKeyId. If you call an API that must encrypt // or decrypt SecretString or SecretBinary using credentials from a different // account then the KMS key policy must grant cross-account access to that other -// account's user or role. +// account's user or role for both the kms:GenerateDataKey and kms:Decrypt operations. // // Minimum permissions // @@ -1213,11 +1209,11 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // in this call. // // * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the AWS Secrets Manager -// internal limits. +// The request failed because it would exceed one of the Secrets Manager internal +// limits. // // * ErrCodeEncryptionFailure "EncryptionFailure" -// AWS Secrets Manager can't encrypt the protected secret text using the provided +// Secrets Manager can't encrypt the protected secret text using the provided // KMS key. Check that the customer master key (CMK) is available, enabled, // and not in an invalid state. For more information, see How Key State Affects // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). @@ -1414,7 +1410,7 @@ func (c *SecretsManager) RotateSecretRequest(input *RotateSecretInput) (req *req // clients all immediately begin to use the new version. For more information // about rotating secrets and how to configure a Lambda function to rotate the // secrets for your protected service, see Rotating Secrets in AWS Secrets Manager -// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/;asm-service-name;/latest/userguide/rotating-secrets.html) +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html) // in the AWS Secrets Manager User Guide. // // The rotation function must end with the versions of the secret in one of @@ -1781,10 +1777,10 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // // To modify the rotation configuration of a secret, use RotateSecret instead. // -// The AWS Secrets Manager console uses only the SecretString parameter and -// therefore limits you to encrypting and storing only a text string. To encrypt -// and store binary data as part of the version of a secret, you must use either -// the AWS CLI or one of the AWS SDKs. +// The Secrets Manager console uses only the SecretString parameter and therefore +// limits you to encrypting and storing only a text string. To encrypt and store +// binary data as part of the version of a secret, you must use either the AWS +// CLI or one of the AWS SDKs. // // * If this update creates the first version of the secret or if you did // not include the VersionStages parameter then Secrets Manager automatically @@ -1797,15 +1793,14 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // modify an existing version, you can only create new ones. // // If you call an operation that needs to encrypt or decrypt the SecretString -// and SecretBinary for a secret in the same account as the calling user and -// that secret doesn't specify a KMS encryption key, AWS Secrets Manager uses -// the account's default AWS managed customer master key (CMK) with the alias -// aws/secretsmanager. If this key doesn't already exist in your account then -// AWS Secrets Manager creates it for you automatically. All users in the same -// AWS account automatically have access to use the default CMK. Note that if -// an AWS Secrets Manager API call results in AWS having to create the account's -// AWS-managed CMK, it can result in a one-time significant delay in returning -// the result. +// or SecretBinary for a secret in the same account as the calling user and +// that secret doesn't specify a KMS encryption key, Secrets Manager uses the +// account's default AWS managed customer master key (CMK) with the alias aws/secretsmanager. +// If this key doesn't already exist in your account then Secrets Manager creates +// it for you automatically. All users in the same AWS account automatically +// have access to use the default CMK. Note that if an Secrets Manager API call +// results in AWS having to create the account's AWS-managed CMK, it can result +// in a one-time significant delay in returning the result. // // If the secret is in a different AWS account from the credentials calling // an API that requires encryption or decryption of the secret value then you @@ -1815,7 +1810,7 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // it by including it in the KMSKeyId. If you call an API that must encrypt // or decrypt SecretString or SecretBinary using credentials from a different // account then the KMS key policy must grant cross-account access to that other -// account's user or role. +// account's user or role for both the kms:GenerateDataKey and kms:Decrypt operations. // // Minimum permissions // @@ -1859,11 +1854,11 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // in this call. // // * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the AWS Secrets Manager -// internal limits. +// The request failed because it would exceed one of the Secrets Manager internal +// limits. // // * ErrCodeEncryptionFailure "EncryptionFailure" -// AWS Secrets Manager can't encrypt the protected secret text using the provided +// Secrets Manager can't encrypt the protected secret text using the provided // KMS key. Check that the customer master key (CMK) is available, enabled, // and not in an invalid state. For more information, see How Key State Affects // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). @@ -1952,7 +1947,7 @@ func (c *SecretsManager) UpdateSecretVersionStageRequest(input *UpdateSecretVers // a time. If a staging label to be added is already attached to another version, // then it is moved--removed from the other version first and then attached // to this one. For more information about staging labels, see Staging Labels -// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/;asm-service-name;/latest/userguide/terms-concepts.html#term_label) +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label) // in the AWS Secrets Manager User Guide. // // The staging labels that you specify in the VersionStage parameter are added @@ -2001,8 +1996,8 @@ func (c *SecretsManager) UpdateSecretVersionStageRequest(input *UpdateSecretVers // in this call. // // * ErrCodeLimitExceededException "LimitExceededException" -// The request failed because it would exceed one of the AWS Secrets Manager -// internal limits. +// The request failed because it would exceed one of the Secrets Manager internal +// limits. // // * ErrCodeInternalServiceError "InternalServiceError" // An error occurred on the server side. @@ -2127,7 +2122,7 @@ type CreateSecretInput struct { // If you use the AWS CLI or one of the AWS SDK to call this operation, then // you can leave this parameter empty. The CLI or SDK generates a random UUID // for you and includes as the value for this parameter in the request. If you - // don't use the SDK and instead generate a raw HTTP request to the AWS Secrets + // don't use the SDK and instead generate a raw HTTP request to the Secrets // Manager service endpoint, then you must generate a ClientRequestToken yourself // for the new version and include that value in the request. // @@ -2155,13 +2150,13 @@ type CreateSecretInput struct { Description *string `type:"string"` // (Optional) Specifies the ARN or alias of the AWS KMS customer master key - // (CMK) to be used to encrypt the SecretString and SecretBinary values in the + // (CMK) to be used to encrypt the SecretString or SecretBinary values in the // versions stored in this secret. // // If you don't specify this value, then Secrets Manager defaults to using the // AWS account's default CMK (the one named aws/secretsmanager). If a KMS CMK - // with that name doesn't yet exist, then AWS Secrets Manager creates it for - // you automatically the first time it needs to encrypt a version's SecretString + // with that name doesn't yet exist, then Secrets Manager creates it for you + // automatically the first time it needs to encrypt a version's SecretString // or SecretBinary fields. // // You can use the account's default CMK to encrypt and decrypt only if you @@ -2170,9 +2165,7 @@ type CreateSecretInput struct { // CMK and specify the ARN in this field. KmsKeyId *string `type:"string"` - // Specifies the friendly name of the new secret. The secret name can consist - // of uppercase letters, lowercase letters, digits, and any of the following - // characters: /_+=.@-    Spaces are not permitted. + // Specifies the friendly name of the new secret. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -2182,11 +2175,8 @@ type CreateSecretInput struct { // we recommend that you store your binary data in a file and then use the appropriate // technique for your tool to pass the contents of the file as a parameter. // - // Either SecretString, SecretBinary, or both must have a value. They cannot - // both be empty. - // - // This SecretBinary value is stored separately from the SecretString, but the - // two parameters jointly share a maximum size limit. + // Either SecretString or SecretBinary must have a value, but not both. They + // cannot both be empty. // // This parameter is not available using the Secrets Manager console. It can // be accessed only by using the AWS CLI or one of the AWS SDKs. @@ -2197,11 +2187,8 @@ type CreateSecretInput struct { // (Optional) Specifies text data that you want to encrypt and store in this // new version of the secret. // - // Either SecretString, SecretBinary, or both must have a value. They cannot - // both be empty. - // - // This string value is stored separately from the SecretBinary, but the two - // parameters jointly share a maximum size limit. + // Either SecretString or SecretBinary must have a value, but not both. They + // cannot both be empty. // // If you create a secret by using the Secrets Manager console then Secrets // Manager puts the protected secret text in only the SecretString parameter. @@ -2225,8 +2212,8 @@ type CreateSecretInput struct { // secret. Each tag is a "Key" and "Value" pair of strings. This operation only // appends tags to the existing list of tags. To remove tags, you must use UntagResource. // - // AWS Secrets Manager tag key names are case sensitive. A tag with the key - // "ABC" is a different tag from one with key "abc". + // Secrets Manager tag key names are case sensitive. A tag with the key "ABC" + // is a different tag from one with key "abc". // // If you check tags in IAM policy Condition elements as part of your security // strategy, then adding or removing a tag can change permissions. If the successful @@ -2353,7 +2340,7 @@ type CreateSecretOutput struct { // The Amazon Resource Name (ARN) of the secret that you just created. // - // AWS Secrets Manager automatically adds several random characters to the name + // Secrets Manager automatically adds several random characters to the name // at the end of the ARN when you initially create a secret. This affects only // the ARN and not the actual friendly name. This ensures that if you create // a new secret with the same name as an old secret that you previously deleted, @@ -2400,7 +2387,7 @@ func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { type DeleteSecretInput struct { _ struct{} `type:"structure"` - // (Optional) Specifies the number of days that AWS Secrets Manager waits before + // (Optional) Specifies the number of days that Secrets Manager waits before // it can delete the secret. // // This value can range from 7 to 30 days. The default value is 30. @@ -2457,9 +2444,9 @@ type DeleteSecretOutput struct { // The ARN of the secret that is now scheduled for deletion. ARN *string `min:"20" type:"string"` - // The date and time after which this secret will be deleted by AWS Secrets - // Manager and is no longer recoverable. This value is the date and time of - // the delete request plus the number of days specified in RecoveryWindowInDays. + // The date and time after which this secret can be deleted by Secrets Manager + // and can no longer be restored. This value is the date and time of the delete + // request plus the number of days specified in RecoveryWindowInDays. DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` // The friendly name of the secret that is now scheduled for deletion. @@ -2556,9 +2543,9 @@ type DescribeSecretOutput struct { Description *string `type:"string"` // The ARN or alias of the AWS KMS customer master key (CMK) that's used to - // encrypt the SecretString and SecretBinary fields in each version of the secret. - // If you don't provide a key, then AWS Secrets Manager defaults to encrypting - // the secret fields with the default KMS CMK (the one named awssecretsmanager) + // encrypt the SecretString or SecretBinary fields in each version of the secret. + // If you don't provide a key, then Secrets Manager defaults to encrypting the + // secret fields with the default KMS CMK (the one named awssecretsmanager) // for this account. KmsKeyId *string `type:"string"` @@ -2582,7 +2569,7 @@ type DescribeSecretOutput struct { // to a value greater than 0. To disable rotation, use CancelRotateSecret. RotationEnabled *bool `type:"boolean"` - // The ARN of a Lambda function that's invoked by AWS Secrets Manager to rotate + // The ARN of a Lambda function that's invoked by Secrets Manager to rotate // the secret either automatically per the schedule or manually by a call to // RotateSecret. RotationLambdaARN *string `type:"string"` @@ -2944,9 +2931,9 @@ type GetSecretValueOutput struct { // knows how to parse. // // If you store custom information in the secret by using the CreateSecret, - // UpdateSecret, or PutSecretValue API operations instead of the AWS Secrets - // Manager console, or by using the Other secret type in the console, then you - // must code your Lambda rotation function to parse and interpret those values. + // UpdateSecret, or PutSecretValue API operations instead of the Secrets Manager + // console, or by using the Other secret type in the console, then you must + // code your Lambda rotation function to parse and interpret those values. SecretString *string `type:"string"` // The unique identifier of this version of the secret. @@ -3022,8 +3009,8 @@ type ListSecretVersionIdsInput struct { // to the operation. If additional items exist beyond the maximum you specify, // the NextToken response element is present and has a value (isn't null). Include // that value as the NextToken request parameter in the next call to the operation - // to get the next part of the results. Note that AWS Secrets Manager might - // return fewer results than the maximum even when there are more results available. + // to get the next part of the results. Note that Secrets Manager might return + // fewer results than the maximum even when there are more results available. // You should check NextToken after every operation to ensure that you receive // all of the results. MaxResults *int64 `min:"1" type:"integer"` @@ -3103,7 +3090,7 @@ type ListSecretVersionIdsOutput struct { // The Amazon Resource Name (ARN) for the secret. // - // AWS Secrets Manager automatically adds several random characters to the name + // Secrets Manager automatically adds several random characters to the name // at the end of the ARN when you initially create a secret. This affects only // the ARN and not the actual friendly name. This ensures that if you create // a new secret with the same name as an old secret that you previously deleted, @@ -3169,8 +3156,8 @@ type ListSecretsInput struct { // to the operation. If additional items exist beyond the maximum you specify, // the NextToken response element is present and has a value (isn't null). Include // that value as the NextToken request parameter in the next call to the operation - // to get the next part of the results. Note that AWS Secrets Manager might - // return fewer results than the maximum even when there are more results available. + // to get the next part of the results. Note that Secrets Manager might return + // fewer results than the maximum even when there are more results available. // You should check NextToken after every operation to ensure that you receive // all of the results. MaxResults *int64 `min:"1" type:"integer"` @@ -3266,9 +3253,9 @@ type PutSecretValueInput struct { // If you use the AWS CLI or one of the AWS SDK to call this operation, then // you can leave this parameter empty. The CLI or SDK generates a random UUID // for you and includes that in the request. If you don't use the SDK and instead - // generate a raw HTTP request to the AWS Secrets Manager service endpoint, - // then you must generate a ClientRequestToken yourself for new versions and - // include that value in the request. + // generate a raw HTTP request to the Secrets Manager service endpoint, then + // you must generate a ClientRequestToken yourself for new versions and include + // that value in the request. // // This value helps ensure idempotency. Secrets Manager uses this value to prevent // the accidental creation of duplicate versions if there are failures and retries @@ -3295,8 +3282,8 @@ type PutSecretValueInput struct { // new version of the secret. To use this parameter in the command-line tools, // we recommend that you store your binary data in a file and then use the appropriate // technique for your tool to pass the contents of the file as a parameter. - // Either SecretBinary or SecretString must have a value. They cannot both be - // empty. + // Either SecretBinary or SecretString must have a value, but not both. They + // cannot both be empty. // // This parameter is not accessible if the secret using the Secrets Manager // console. @@ -3308,15 +3295,12 @@ type PutSecretValueInput struct { // either the Amazon Resource Name (ARN) or the friendly name of the secret. // The secret must already exist. // - // The secret name can consist of uppercase letters, lowercase letters, digits, - // and any of the following characters: /_+=.@-    Spaces are not permitted. - // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` // (Optional) Specifies text data that you want to encrypt and store in this // new version of the secret. Either SecretString or SecretBinary must have - // a value. They cannot both be empty. + // a value, but not both. They cannot both be empty. // // If you create this secret by using the Secrets Manager console then Secrets // Manager puts the protected secret text in only the SecretString parameter. @@ -3339,8 +3323,8 @@ type PutSecretValueInput struct { // of the same secret then that staging label is automatically removed from // the other version and attached to this version. // - // If you do not specify a value for VersionStages then AWS Secrets Manager - // automatically moves the staging label AWSCURRENT to this new version. + // If you do not specify a value for VersionStages then Secrets Manager automatically + // moves the staging label AWSCURRENT to this new version. VersionStages []*string `min:"1" type:"list"` } @@ -3543,7 +3527,7 @@ type RotateSecretInput struct { // If you use the AWS CLI or one of the AWS SDK to call this operation, then // you can leave this parameter empty. The CLI or SDK generates a random UUID // for you and includes that in the request for this parameter. If you don't - // use the SDK and instead generate a raw HTTP request to the AWS Secrets Manager + // use the SDK and instead generate a raw HTTP request to the Secrets Manager // service endpoint, then you must generate a ClientRequestToken yourself for // new versions and include that value in the request. // @@ -3728,7 +3712,7 @@ type SecretListEntry struct { // The Amazon Resource Name (ARN) of the secret. // - // For more information about ARNs in AWS Secrets Manager, see Policy Resources + // For more information about ARNs in Secrets Manager, see Policy Resources // (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#iam-resources) // in the AWS Secrets Manager User Guide. ARN *string `min:"20" type:"string"` @@ -3744,8 +3728,8 @@ type SecretListEntry struct { // The ARN or alias of the AWS KMS customer master key (CMK) that's used to // encrypt the SecretString and SecretBinary fields in each version of the secret. - // If you don't provide a key, then AWS Secrets Manager defaults to encrypting - // the secret fields with the default KMS CMK (the one named awssecretsmanager) + // If you don't provide a key, then Secrets Manager defaults to encrypting the + // secret fields with the default KMS CMK (the one named awssecretsmanager) // for this account. KmsKeyId *string `type:"string"` @@ -3768,9 +3752,9 @@ type SecretListEntry struct { // Indicated whether automatic, scheduled rotation is enabled for this secret. RotationEnabled *bool `type:"boolean"` - // The ARN of an AWS Lambda function that's invoked by AWS Secrets Manager to - // rotate and expire the secret either automatically per the schedule or manually - // by a call to RotateSecret. + // The ARN of an AWS Lambda function that's invoked by Secrets Manager to rotate + // and expire the secret either automatically per the schedule or manually by + // a call to RotateSecret. RotationLambdaARN *string `type:"string"` // A structure that defines the rotation configuration for the secret. @@ -4149,9 +4133,9 @@ type UpdateSecretInput struct { // If you use the AWS CLI or one of the AWS SDK to call this operation, then // you can leave this parameter empty. The CLI or SDK generates a random UUID // for you and includes that in the request. If you don't use the SDK and instead - // generate a raw HTTP request to the AWS Secrets Manager service endpoint, - // then you must generate a ClientRequestToken yourself for new versions and - // include that value in the request. + // generate a raw HTTP request to the Secrets Manager service endpoint, then + // you must generate a ClientRequestToken yourself for new versions and include + // that value in the request. // // You typically only need to interact with this value if you implement your // own retry logic and want to ensure that a given secret is not created twice. @@ -4184,9 +4168,9 @@ type UpdateSecretInput struct { // // If you don't specify this value, then Secrets Manager defaults to using the // default CMK in the account (the one named aws/secretsmanager). If a KMS CMK - // with that name doesn't exist, then AWS Secrets Manager creates it for you - // automatically the first time it needs to encrypt a version's Plaintext or - // PlaintextString fields. + // with that name doesn't exist, then Secrets Manager creates it for you automatically + // the first time it needs to encrypt a version's Plaintext or PlaintextString + // fields. // // You can only use the account's default CMK to encrypt and decrypt if you // call this operation using credentials from the same account that owns the @@ -4198,8 +4182,8 @@ type UpdateSecretInput struct { // new version of the secret. To use this parameter in the command-line tools, // we recommend that you store your binary data in a file and then use the appropriate // technique for your tool to pass the contents of the file as a parameter. - // Either SecretBinary or SecretString must have a value. They cannot both be - // empty. + // Either SecretBinary or SecretString must have a value, but not both. They + // cannot both be empty. // // This parameter is not accessible using the Secrets Manager console. // @@ -4215,7 +4199,7 @@ type UpdateSecretInput struct { // (Optional) Specifies text data that you want to encrypt and store in this // new version of the secret. Either SecretBinary or SecretString must have - // a value. They cannot both be empty. + // a value, but not both. They cannot both be empty. // // If you create this secret by using the Secrets Manager console then Secrets // Manager puts the protected secret text in only the SecretString parameter. @@ -4300,7 +4284,7 @@ type UpdateSecretOutput struct { // The ARN of this secret. // - // AWS Secrets Manager automatically adds several random characters to the name + // Secrets Manager automatically adds several random characters to the name // at the end of the ARN when you initially create a secret. This affects only // the ARN and not the actual friendly name. This ensures that if you create // a new secret with the same name as an old secret that you previously deleted, diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go index d5939c85b84..0379c436595 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/doc.go @@ -6,14 +6,13 @@ // AWS Secrets Manager is a web service that enables you to store, manage, and // retrieve, secrets. // -// This guide provides descriptions of the AWS Secrets Manager API. For more -// information about using this service, see the AWS Secrets Manager User Guide -// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html). +// This guide provides descriptions of the Secrets Manager API. For more information +// about using this service, see the AWS Secrets Manager User Guide (http://docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html). // // API Version // -// This version of the AWS Secrets Manager API Reference documents the AWS Secrets -// Manager API version 2017-10-17. +// This version of the Secrets Manager API Reference documents the Secrets Manager +// API version 2017-10-17. // // As an alternative to using the API directly, you can use one of the AWS SDKs, // which consist of libraries and sample code for various programming languages @@ -25,36 +24,15 @@ // Web Services (http://aws.amazon.com/tools/). // // We recommend that you use the AWS SDKs to make programmatic API calls to -// AWS Secrets Manager. However, you also can use the AWS Secrets Manager HTTP -// Query API to make direct calls to the AWS Secrets Manager web service. To -// learn more about the AWS Secrets Manager HTTP Query API, see Making Query -// Requests (http://docs.aws.amazon.com/secretsmanager/latest/userguide/orgs_query-requests.html) +// Secrets Manager. However, you also can use the Secrets Manager HTTP Query +// API to make direct calls to the Secrets Manager web service. To learn more +// about the Secrets Manager HTTP Query API, see Making Query Requests (http://docs.aws.amazon.com/secretsmanager/latest/userguide/query-requests.html) // in the AWS Secrets Manager User Guide. // -// AWS Secrets Manager supports GET and POST requests for all actions. That -// is, the API doesn't require you to use GET for some actions and POST for -// others. However, GET requests are subject to the limitation size of a URL. -// Therefore, for operations that require larger sizes, use a POST request. -// -// Signing Requests -// -// When you send HTTP requests to AWS, you must sign the requests so that AWS -// can identify who sent them. You sign requests with your AWS access key, which -// consists of an access key ID and a secret access key. We strongly recommend -// that you don't create an access key for your root account. Anyone who has -// the access key for your root account has unrestricted access to all the resources -// in your account. Instead, create an access key for an IAM user account that -// has the permissions required for the task at hand. As another option, use -// AWS Security Token Service to generate temporary security credentials, and -// use those credentials to sign requests. -// -// To sign requests, you must use Signature Version 4 (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// If you have an existing application that uses Signature Version 2, you must -// update it to use Signature Version 4. -// -// When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs -// to make requests to AWS, these tools automatically sign the requests for -// you with the access key that you specify when you configure the tools. +// Secrets Manager supports GET and POST requests for all actions. That is, +// the API doesn't require you to use GET for some actions and POST for others. +// However, GET requests are subject to the limitation size of a URL. Therefore, +// for operations that require larger sizes, use a POST request. // // Support and Feedback for AWS Secrets Manager // @@ -65,11 +43,12 @@ // // How examples are presented // -// The JSON that AWS Secrets Manager returns as a response to your requests -// is a single long string without line breaks or white space formatting. Both -// line breaks and white space are included in the examples in this guide to -// improve readability. When example input parameters would also result in long -// strings that extend beyond the screen, we insert line breaks to enhance readability. +// The JSON that AWS Secrets Manager expects as your request parameters and +// that the service returns as a response to HTTP query requests are single, +// long strings without line breaks or white space formatting. The JSON shown +// in the examples is formatted with both line breaks and white space to improve +// readability. When example input parameters would also result in long strings +// that extend beyond the screen, we insert line breaks to enhance readability. // You should always submit the input as a single JSON text string. // // Logging API Requests @@ -77,10 +56,10 @@ // AWS Secrets Manager supports AWS CloudTrail, a service that records AWS API // calls for your AWS account and delivers log files to an Amazon S3 bucket. // By using information that's collected by AWS CloudTrail, you can determine -// which requests were successfully made to AWS Secrets Manager, who made the -// request, when it was made, and so on. For more about AWS Secrets Manager -// and its support for AWS CloudTrail, see Logging AWS Secrets Manager Events -// with AWS CloudTrail (http://docs.aws.amazon.com/secretsmanager/latest/userguide/orgs_cloudtrail-integration.html) +// which requests were successfully made to Secrets Manager, who made the request, +// when it was made, and so on. For more about AWS Secrets Manager and its support +// for AWS CloudTrail, see Logging AWS Secrets Manager Events with AWS CloudTrail +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudtrail) // in the AWS Secrets Manager User Guide. To learn more about CloudTrail, including // how to turn it on and find your log files, see the AWS CloudTrail User Guide // (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go index 6d05321a04c..46b28d334b9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go @@ -7,14 +7,14 @@ const ( // ErrCodeDecryptionFailure for service response error code // "DecryptionFailure". // - // AWS Secrets Manager can't decrypt the protected secret text using the provided + // Secrets Manager can't decrypt the protected secret text using the provided // KMS key. ErrCodeDecryptionFailure = "DecryptionFailure" // ErrCodeEncryptionFailure for service response error code // "EncryptionFailure". // - // AWS Secrets Manager can't encrypt the protected secret text using the provided + // Secrets Manager can't encrypt the protected secret text using the provided // KMS key. Check that the customer master key (CMK) is available, enabled, // and not in an invalid state. For more information, see How Key State Affects // Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). @@ -50,8 +50,8 @@ const ( // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // - // The request failed because it would exceed one of the AWS Secrets Manager - // internal limits. + // The request failed because it would exceed one of the Secrets Manager internal + // limits. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeMalformedPolicyDocumentException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index a91bf72b806..f47913f27ac 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -1249,6 +1249,101 @@ func (c *SSM) DeleteDocumentWithContext(ctx aws.Context, input *DeleteDocumentIn return out, req.Send() } +const opDeleteInventory = "DeleteInventory" + +// DeleteInventoryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInventory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInventory for more information on using the DeleteInventory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInventoryRequest method. +// req, resp := client.DeleteInventoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory +func (c *SSM) DeleteInventoryRequest(input *DeleteInventoryInput) (req *request.Request, output *DeleteInventoryOutput) { + op := &request.Operation{ + Name: opDeleteInventory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteInventoryInput{} + } + + output = &DeleteInventoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInventory API operation for Amazon Simple Systems Manager (SSM). +// +// Delete a custom inventory type, or the data associated with a custom Inventory +// type. Deleting a custom inventory type is also referred to as deleting a +// custom inventory schema. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DeleteInventory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeInvalidTypeNameException "InvalidTypeNameException" +// The parameter type name is not valid. +// +// * ErrCodeInvalidOptionException "InvalidOptionException" +// The delete inventory option specified is not valid. Verify the option and +// try again. +// +// * ErrCodeInvalidDeleteInventoryParametersException "InvalidDeleteInventoryParametersException" +// One or more of the parameters specified for the delete operation is not valid. +// Verify all parameters and try again. +// +// * ErrCodeInvalidInventoryRequestException "InvalidInventoryRequestException" +// The request is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DeleteInventory +func (c *SSM) DeleteInventory(input *DeleteInventoryInput) (*DeleteInventoryOutput, error) { + req, out := c.DeleteInventoryRequest(input) + return out, req.Send() +} + +// DeleteInventoryWithContext is the same as DeleteInventory with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInventory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DeleteInventoryWithContext(ctx aws.Context, input *DeleteInventoryInput, opts ...request.Option) (*DeleteInventoryOutput, error) { + req, out := c.DeleteInventoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteMaintenanceWindow = "DeleteMaintenanceWindow" // DeleteMaintenanceWindowRequest generates a "aws/request.Request" representing the @@ -3425,6 +3520,92 @@ func (c *SSM) DescribeInstancePatchesWithContext(ctx aws.Context, input *Describ return out, req.Send() } +const opDescribeInventoryDeletions = "DescribeInventoryDeletions" + +// DescribeInventoryDeletionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInventoryDeletions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeInventoryDeletions for more information on using the DescribeInventoryDeletions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeInventoryDeletionsRequest method. +// req, resp := client.DescribeInventoryDeletionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions +func (c *SSM) DescribeInventoryDeletionsRequest(input *DescribeInventoryDeletionsInput) (req *request.Request, output *DescribeInventoryDeletionsOutput) { + op := &request.Operation{ + Name: opDescribeInventoryDeletions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeInventoryDeletionsInput{} + } + + output = &DescribeInventoryDeletionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInventoryDeletions API operation for Amazon Simple Systems Manager (SSM). +// +// Describes a specific delete inventory operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DescribeInventoryDeletions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeInvalidDeletionIdException "InvalidDeletionIdException" +// The ID specified for the delete operation does not exist or is not valide. +// Verify the ID and try again. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeInventoryDeletions +func (c *SSM) DescribeInventoryDeletions(input *DescribeInventoryDeletionsInput) (*DescribeInventoryDeletionsOutput, error) { + req, out := c.DescribeInventoryDeletionsRequest(input) + return out, req.Send() +} + +// DescribeInventoryDeletionsWithContext is the same as DescribeInventoryDeletions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInventoryDeletions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DescribeInventoryDeletionsWithContext(ctx aws.Context, input *DescribeInventoryDeletionsInput, opts ...request.Option) (*DescribeInventoryDeletionsOutput, error) { + req, out := c.DescribeInventoryDeletionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeMaintenanceWindowExecutionTaskInvocations = "DescribeMaintenanceWindowExecutionTaskInvocations" // DescribeMaintenanceWindowExecutionTaskInvocationsRequest generates a "aws/request.Request" representing the @@ -4561,6 +4742,9 @@ func (c *SSM) GetDefaultPatchBaselineRequest(input *GetDefaultPatchBaselineInput // creating multiple default patch baselines. For example, you can create a // default patch baseline for each operating system. // +// If you do not specify an operating system value, the default patch baseline +// for Windows is returned. +// // 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. @@ -7760,7 +7944,7 @@ func (c *SSM) PutParameterRequest(input *PutParameterInput) (req *request.Reques // PutParameter API operation for Amazon Simple Systems Manager (SSM). // -// Add one or more parameters to the system. +// Add a parameter to the system. // // 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 @@ -8479,6 +8663,9 @@ func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, // * ErrCodeInvalidDocument "InvalidDocument" // The specified document does not exist. // +// * ErrCodeInvalidDocumentVersion "InvalidDocumentVersion" +// The document version is not valid or does not exist. +// // * ErrCodeInvalidOutputFolder "InvalidOutputFolder" // The S3 bucket does not exist. // @@ -9368,18 +9555,18 @@ func (c *SSM) UpdateMaintenanceWindowTaskRequest(input *UpdateMaintenanceWindowT // Modifies a task assigned to a Maintenance Window. You can't change the task // type, but you can change the following values: // -// Task ARN. For example, you can change a RUN_COMMAND task from AWS-RunPowerShellScript -// to AWS-RunShellScript. +// * TaskARN. For example, you can change a RUN_COMMAND task from AWS-RunPowerShellScript +// to AWS-RunShellScript. // -// Service role ARN. +// * ServiceRoleArn // -// Task parameters. +// * TaskInvocationParameters // -// Task priority. +// * Priority // -// Task MaxConcurrency and MaxErrors. +// * MaxConcurrency // -// Log location. +// * MaxErrors // // If a parameter is null, then the corresponding field is not modified. Also, // if you set Replace to true, then all fields required by the RegisterTaskWithMaintenanceWindow @@ -9716,16 +9903,29 @@ type AddTagsToResourceInput struct { // The resource ID you want to tag. // - // For the ManagedInstance, MaintenanceWindow, and PatchBaseline values, use - // the ID of the resource, such as mw-01234361858c9b57b for a Maintenance Window. + // Use the ID of the resource. Here are some examples: + // + // ManagedInstance: mi-012345abcde + // + // MaintenanceWindow: mw-012345abcde + // + // PatchBaseline: pb-012345abcde // // For the Document and Parameter values, use the name of the resource. // + // The ManagedInstance type for this API action is only for on-premises managed + // instances. You must specify the the name of the managed instance in the following + // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. + // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` // Specifies the type of resource you are tagging. // + // The ManagedInstance type for this API action is for on-premises managed instances. + // You must specify the the name of the managed instance in the following format: + // mi-ID_number. For example, mi-1a2b3c4d5e6f. + // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` @@ -9733,6 +9933,8 @@ type AddTagsToResourceInput struct { // the tag to have a value, specify the parameter with no value, and we set // the value to an empty string. // + // Do not enter personally identifiable information in this field. + // // Tags is a required field Tags []*Tag `type:"list" required:"true"` } @@ -10925,11 +11127,14 @@ type Command struct { // The name of the document requested for execution. DocumentName *string `type:"string"` + // The SSM document version. + DocumentVersion *string `type:"string"` + // The number of targets for which the status is Failed or Execution Timed Out. ErrorCount *int64 `type:"integer"` // If this time is reached and the command has not already started executing, - // it will not execute. Calculated based on the ExpiresAfter user input provided + // it will not run. Calculated based on the ExpiresAfter user input provided // as part of the SendCommand API. ExpiresAfter *time.Time `type:"timestamp" timestampFormat:"unix"` @@ -11057,6 +11262,12 @@ func (s *Command) SetDocumentName(v string) *Command { return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *Command) SetDocumentVersion(v string) *Command { + s.DocumentVersion = &v + return s +} + // SetErrorCount sets the ErrorCount field's value. func (s *Command) SetErrorCount(v int64) *Command { s.ErrorCount = &v @@ -11229,6 +11440,9 @@ type CommandInvocation struct { // The document name that was requested for execution. DocumentName *string `type:"string"` + // The SSM document version. + DocumentVersion *string `type:"string"` + // The instance ID in which this invocation was requested. InstanceId *string `type:"string"` @@ -11345,6 +11559,12 @@ func (s *CommandInvocation) SetDocumentName(v string) *CommandInvocation { return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *CommandInvocation) SetDocumentVersion(v string) *CommandInvocation { + s.DocumentVersion = &v + return s +} + // SetInstanceId sets the InstanceId field's value. func (s *CommandInvocation) SetInstanceId(v string) *CommandInvocation { s.InstanceId = &v @@ -11679,7 +11899,7 @@ type ComplianceItem struct { ExecutionSummary *ComplianceExecutionSummary `type:"structure"` // An ID for the compliance item. For example, if the compliance item is a Windows - // patch, the ID could be the number of the KB article. Here's an example: KB4010320. + // patch, the ID could be the number of the KB article; for example: KB4010320. Id *string `min:"1" type:"string"` // An ID for the resource. For a managed instance, this is the instance ID. @@ -11697,8 +11917,8 @@ type ComplianceItem struct { Status *string `type:"string" enum:"ComplianceStatus"` // A title for the compliance item. For example, if the compliance item is a - // Windows patch, the title could be the title of the KB article for the patch. - // Here's an example: Security Update for Active Directory Federation Services. + // Windows patch, the title could be the title of the KB article for the patch; + // for example: Security Update for Active Directory Federation Services. Title *string `type:"string"` } @@ -11789,8 +12009,8 @@ type ComplianceItemEntry struct { Status *string `type:"string" required:"true" enum:"ComplianceStatus"` // The title of the compliance item. For example, if the compliance item is - // a Windows patch, the title could be the title of the KB article for the patch. - // Here's an example: Security Update for Active Directory Federation Services. + // a Windows patch, the title could be the title of the KB article for the patch; + // for example: Security Update for Active Directory Federation Services. Title *string `type:"string"` } @@ -11994,10 +12214,14 @@ type CreateActivationInput struct { // The name of the registered, managed instance as it will appear in the Amazon // EC2 console or when you use the AWS command line tools to list EC2 resources. + // + // Do not enter personally identifiable information in this field. DefaultInstanceName *string `type:"string"` - // A userdefined description of the resource that you want to register with + // A user-defined description of the resource that you want to register with // Amazon EC2. + // + // Do not enter personally identifiable information in this field. Description *string `type:"string"` // The date by which this activation request should expire. The default value @@ -12738,12 +12962,16 @@ type CreatePatchBaselineInput struct { ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. ApprovedPatches []*string `type:"list"` // Defines the compliance level for approved patches. This means that if an // approved patch is reported as missing, this is the severity of the compliance - // violation. Valid compliance severity levels include the following: CRITICAL, - // HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED. The default value is UNSPECIFIED. + // violation. The default value is UNSPECIFIED. ApprovedPatchesComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` // Indicates whether the list of approved patches includes non-security updates @@ -12770,6 +12998,11 @@ type CreatePatchBaselineInput struct { OperatingSystem *string `type:"string" enum:"OperatingSystem"` // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` // Information about the patches to use to update the instances, including target @@ -13151,6 +13384,138 @@ func (s DeleteDocumentOutput) GoString() string { return s.String() } +type DeleteInventoryInput struct { + _ struct{} `type:"structure"` + + // User-provided idempotency token. + ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // Use this option to view a summary of the deletion request without deleting + // any data or the data type. This option is useful when you only want to understand + // what will be deleted. Once you validate that the data to be deleted is what + // you intend to delete, you can run the same command without specifying the + // DryRun option. + DryRun *bool `type:"boolean"` + + // Use the SchemaDeleteOption to delete a custom inventory type (schema). If + // you don't choose this option, the system only deletes existing inventory + // data associated with the custom inventory type. Choose one of the following + // options: + // + // DisableSchema: If you choose this option, the system ignores all inventory + // data for the specified version, and any earlier versions. To enable this + // schema again, you must call the PutInventory action for a version greater + // than the disbled version. + // + // DeleteSchema: This option deletes the specified custom type from the Inventory + // service. You can recreate the schema later, if you want. + SchemaDeleteOption *string `type:"string" enum:"InventorySchemaDeleteOption"` + + // The name of the custom inventory type for which you want to delete either + // all previously collected data, or the inventory type itself. + // + // TypeName is a required field + TypeName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInventoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInventoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInventoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInventoryInput"} + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) + } + if s.TypeName == nil { + invalidParams.Add(request.NewErrParamRequired("TypeName")) + } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *DeleteInventoryInput) SetClientToken(v string) *DeleteInventoryInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteInventoryInput) SetDryRun(v bool) *DeleteInventoryInput { + s.DryRun = &v + return s +} + +// SetSchemaDeleteOption sets the SchemaDeleteOption field's value. +func (s *DeleteInventoryInput) SetSchemaDeleteOption(v string) *DeleteInventoryInput { + s.SchemaDeleteOption = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *DeleteInventoryInput) SetTypeName(v string) *DeleteInventoryInput { + s.TypeName = &v + return s +} + +type DeleteInventoryOutput struct { + _ struct{} `type:"structure"` + + // Every DeleteInventory action is assigned a unique ID. This option returns + // a unique ID. You can use this ID to query the status of a delete operation. + // This option is useful for ensuring that a delete operation has completed + // before you begin other actions. + DeletionId *string `type:"string"` + + // A summary of the delete operation. For more information about this summary, + // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary). + DeletionSummary *InventoryDeletionSummary `type:"structure"` + + // The name of the inventory data type specified in the request. + TypeName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteInventoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInventoryOutput) GoString() string { + return s.String() +} + +// SetDeletionId sets the DeletionId field's value. +func (s *DeleteInventoryOutput) SetDeletionId(v string) *DeleteInventoryOutput { + s.DeletionId = &v + return s +} + +// SetDeletionSummary sets the DeletionSummary field's value. +func (s *DeleteInventoryOutput) SetDeletionSummary(v *InventoryDeletionSummary) *DeleteInventoryOutput { + s.DeletionSummary = v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *DeleteInventoryOutput) SetTypeName(v string) *DeleteInventoryOutput { + s.TypeName = &v + return s +} + type DeleteMaintenanceWindowInput struct { _ struct{} `type:"structure"` @@ -15226,30 +15591,120 @@ func (s *DescribeInstancePatchesOutput) SetPatches(v []*PatchComplianceData) *De return s } -type DescribeMaintenanceWindowExecutionTaskInvocationsInput struct { +type DescribeInventoryDeletionsInput struct { _ struct{} `type:"structure"` - // Optional filters used to scope down the returned task invocations. The supported - // filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, - // SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED. - Filters []*MaintenanceWindowFilter `type:"list"` + // Specify the delete inventory ID for which you want information. This ID was + // returned by the DeleteInventory action. + DeletionId *string `type:"string"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of // results. - MaxResults *int64 `min:"10" type:"integer"` + MaxResults *int64 `min:"1" type:"integer"` - // The token for the next set of items to return. (You received this token from - // a previous call.) + // A token to start the list. Use this token to get the next set of results. NextToken *string `type:"string"` +} - // The ID of the specific task in the Maintenance Window task that should be - // retrieved. - // - // TaskId is a required field - TaskId *string `min:"36" type:"string" required:"true"` - - // The ID of the Maintenance Window execution the task is part of. +// String returns the string representation +func (s DescribeInventoryDeletionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInventoryDeletionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInventoryDeletionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInventoryDeletionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeletionId sets the DeletionId field's value. +func (s *DescribeInventoryDeletionsInput) SetDeletionId(v string) *DescribeInventoryDeletionsInput { + s.DeletionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeInventoryDeletionsInput) SetMaxResults(v int64) *DescribeInventoryDeletionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInventoryDeletionsInput) SetNextToken(v string) *DescribeInventoryDeletionsInput { + s.NextToken = &v + return s +} + +type DescribeInventoryDeletionsOutput struct { + _ struct{} `type:"structure"` + + // A list of status items for deleted inventory. + InventoryDeletions []*InventoryDeletionStatusItem `type:"list"` + + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeInventoryDeletionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInventoryDeletionsOutput) GoString() string { + return s.String() +} + +// SetInventoryDeletions sets the InventoryDeletions field's value. +func (s *DescribeInventoryDeletionsOutput) SetInventoryDeletions(v []*InventoryDeletionStatusItem) *DescribeInventoryDeletionsOutput { + s.InventoryDeletions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInventoryDeletionsOutput) SetNextToken(v string) *DescribeInventoryDeletionsOutput { + s.NextToken = &v + return s +} + +type DescribeMaintenanceWindowExecutionTaskInvocationsInput struct { + _ struct{} `type:"structure"` + + // Optional filters used to scope down the returned task invocations. The supported + // filter key is STATUS with the corresponding values PENDING, IN_PROGRESS, + // SUCCESS, FAILED, TIMED_OUT, CANCELLING, and CANCELLED. + Filters []*MaintenanceWindowFilter `type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"10" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // The ID of the specific task in the Maintenance Window task that should be + // retrieved. + // + // TaskId is a required field + TaskId *string `min:"36" type:"string" required:"true"` + + // The ID of the Maintenance Window execution the task is part of. // // WindowExecutionId is a required field WindowExecutionId *string `min:"36" type:"string" required:"true"` @@ -17210,6 +17665,9 @@ type GetCommandInvocationOutput struct { // The name of the document that was executed. For example, AWS-RunShellScript. DocumentName *string `type:"string"` + // The SSM document version used in the request. + DocumentVersion *string `type:"string"` + // Duration since ExecutionStartDateTime. ExecutionElapsedTime *string `type:"string"` @@ -17262,8 +17720,7 @@ type GetCommandInvocationOutput struct { // If an Amazon S3 bucket was not specified, then this string is empty. StandardOutputUrl *string `type:"string"` - // The status of the parent command for this invocation. This status can be - // different than StatusDetails. + // The status of this invocation plugin. This status can be different than StatusDetails. Status *string `type:"string" enum:"CommandInvocationStatus"` // A detailed status of the command execution for an invocation. StatusDetails @@ -17344,6 +17801,12 @@ func (s *GetCommandInvocationOutput) SetDocumentName(v string) *GetCommandInvoca return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *GetCommandInvocationOutput) SetDocumentVersion(v string) *GetCommandInvocationOutput { + s.DocumentVersion = &v + return s +} + // SetExecutionElapsedTime sets the ExecutionElapsedTime field's value. func (s *GetCommandInvocationOutput) SetExecutionElapsedTime(v string) *GetCommandInvocationOutput { s.ExecutionElapsedTime = &v @@ -18358,8 +18821,14 @@ type GetMaintenanceWindowExecutionTaskOutput struct { // was retrieved. TaskExecutionId *string `min:"36" type:"string"` - // The parameters passed to the task when it was executed. The map has the following - // format: + // The parameters passed to the task when it was executed. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // The map has the following format: // // Key: string, between 1 and 255 characters // @@ -18673,6 +19142,11 @@ type GetMaintenanceWindowTaskOutput struct { Description *string `min:"1" type:"string"` // The location in Amazon S3 where the task results are logged. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets allowed to run this task in parallel. @@ -18704,6 +19178,11 @@ type GetMaintenanceWindowTaskOutput struct { TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The parameters to pass to the task when it executes. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The type of task to execute. @@ -19004,6 +19483,8 @@ type GetParametersByPathInput struct { NextToken *string `type:"string"` // Filters to limit the request results. + // + // You can't filter using the parameter name. ParameterFilters []*ParameterStringFilter `type:"list"` // The hierarchy for the parameter. Hierarchies start with a forward slash (/) @@ -19014,6 +19495,12 @@ type GetParametersByPathInput struct { Path *string `min:"1" type:"string" required:"true"` // Retrieve all parameters within a hierarchy. + // + // If a user has access to a path, then the user can access all levels of that + // path. For example, if a user has permission to access path /a, then the user + // can also access /a/b. Even if a user has explicitly been denied access in + // IAM for parameter /a, they can still call the GetParametersByPath API action + // recursively and view /a/b. Recursive *bool `type:"boolean"` // Retrieve all parameters in a hierarchy with their value decrypted. @@ -20122,7 +20609,7 @@ type InstancePatchState struct { // OperationStartTime is a required field OperationStartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` - // Placeholder information, this field will always be empty in the current release + // Placeholder information. This field will always be empty in the current release // of the service. OwnerInformation *string `min:"1" type:"string"` @@ -20359,6 +20846,171 @@ func (s *InventoryAggregator) SetExpression(v string) *InventoryAggregator { return s } +// Status information returned by the DeleteInventory action. +type InventoryDeletionStatusItem struct { + _ struct{} `type:"structure"` + + // The deletion ID returned by the DeleteInventory action. + DeletionId *string `type:"string"` + + // The UTC timestamp when the delete operation started. + DeletionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Information about the delete operation. For more information about this summary, + // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary). + DeletionSummary *InventoryDeletionSummary `type:"structure"` + + // The status of the operation. Possible values are InProgress and Complete. + LastStatus *string `type:"string" enum:"InventoryDeletionStatus"` + + // Information about the status. + LastStatusMessage *string `type:"string"` + + // The UTC timestamp of when the last status report. + LastStatusUpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The name of the inventory data type. + TypeName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InventoryDeletionStatusItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryDeletionStatusItem) GoString() string { + return s.String() +} + +// SetDeletionId sets the DeletionId field's value. +func (s *InventoryDeletionStatusItem) SetDeletionId(v string) *InventoryDeletionStatusItem { + s.DeletionId = &v + return s +} + +// SetDeletionStartTime sets the DeletionStartTime field's value. +func (s *InventoryDeletionStatusItem) SetDeletionStartTime(v time.Time) *InventoryDeletionStatusItem { + s.DeletionStartTime = &v + return s +} + +// SetDeletionSummary sets the DeletionSummary field's value. +func (s *InventoryDeletionStatusItem) SetDeletionSummary(v *InventoryDeletionSummary) *InventoryDeletionStatusItem { + s.DeletionSummary = v + return s +} + +// SetLastStatus sets the LastStatus field's value. +func (s *InventoryDeletionStatusItem) SetLastStatus(v string) *InventoryDeletionStatusItem { + s.LastStatus = &v + return s +} + +// SetLastStatusMessage sets the LastStatusMessage field's value. +func (s *InventoryDeletionStatusItem) SetLastStatusMessage(v string) *InventoryDeletionStatusItem { + s.LastStatusMessage = &v + return s +} + +// SetLastStatusUpdateTime sets the LastStatusUpdateTime field's value. +func (s *InventoryDeletionStatusItem) SetLastStatusUpdateTime(v time.Time) *InventoryDeletionStatusItem { + s.LastStatusUpdateTime = &v + return s +} + +// SetTypeName sets the TypeName field's value. +func (s *InventoryDeletionStatusItem) SetTypeName(v string) *InventoryDeletionStatusItem { + s.TypeName = &v + return s +} + +// Information about the delete operation. +type InventoryDeletionSummary struct { + _ struct{} `type:"structure"` + + // Remaining number of items to delete. + RemainingCount *int64 `type:"integer"` + + // A list of counts and versions for deleted items. + SummaryItems []*InventoryDeletionSummaryItem `type:"list"` + + // The total number of items to delete. This count does not change during the + // delete operation. + TotalCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s InventoryDeletionSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryDeletionSummary) GoString() string { + return s.String() +} + +// SetRemainingCount sets the RemainingCount field's value. +func (s *InventoryDeletionSummary) SetRemainingCount(v int64) *InventoryDeletionSummary { + s.RemainingCount = &v + return s +} + +// SetSummaryItems sets the SummaryItems field's value. +func (s *InventoryDeletionSummary) SetSummaryItems(v []*InventoryDeletionSummaryItem) *InventoryDeletionSummary { + s.SummaryItems = v + return s +} + +// SetTotalCount sets the TotalCount field's value. +func (s *InventoryDeletionSummary) SetTotalCount(v int64) *InventoryDeletionSummary { + s.TotalCount = &v + return s +} + +// Either a count, remaining count, or a version number in a delete inventory +// summary. +type InventoryDeletionSummaryItem struct { + _ struct{} `type:"structure"` + + // A count of the number of deleted items. + Count *int64 `type:"integer"` + + // The remaining number of items to delete. + RemainingCount *int64 `type:"integer"` + + // The inventory type version. + Version *string `type:"string"` +} + +// String returns the string representation +func (s InventoryDeletionSummaryItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryDeletionSummaryItem) GoString() string { + return s.String() +} + +// SetCount sets the Count field's value. +func (s *InventoryDeletionSummaryItem) SetCount(v int64) *InventoryDeletionSummaryItem { + s.Count = &v + return s +} + +// SetRemainingCount sets the RemainingCount field's value. +func (s *InventoryDeletionSummaryItem) SetRemainingCount(v int64) *InventoryDeletionSummaryItem { + s.RemainingCount = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *InventoryDeletionSummaryItem) SetVersion(v string) *InventoryDeletionSummaryItem { + s.Version = &v + return s +} + // One or more filters. Use a filter to return a more specific list of results. type InventoryFilter struct { _ struct{} `type:"structure"` @@ -22069,6 +22721,11 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut } // Information about an Amazon S3 bucket to write instance-level logs to. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. type LoggingInfo struct { _ struct{} `type:"structure"` @@ -22144,6 +22801,22 @@ type MaintenanceWindowAutomationParameters struct { DocumentVersion *string `type:"string"` // The parameters for the AUTOMATION task. + // + // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow + // and UpdateMaintenanceWindowTask. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // For AUTOMATION task types, Systems Manager ignores any values specified for + // these parameters. Parameters map[string][]*string `min:"1" type:"map"` } @@ -22586,6 +23259,22 @@ func (s *MaintenanceWindowIdentity) SetWindowId(v string) *MaintenanceWindowIden } // The parameters for a LAMBDA task type. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow +// and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Lambda tasks, Systems Manager ignores any values specified for TaskParameters +// and LoggingInfo. type MaintenanceWindowLambdaParameters struct { _ struct{} `type:"structure"` @@ -22651,6 +23340,22 @@ func (s *MaintenanceWindowLambdaParameters) SetQualifier(v string) *MaintenanceW } // The parameters for a RUN_COMMAND task type. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow +// and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Run Command tasks, Systems Manager uses specified values for TaskParameters +// and LoggingInfo only if no values are specified for TaskInvocationParameters. type MaintenanceWindowRunCommandParameters struct { _ struct{} `type:"structure"` @@ -22765,7 +23470,23 @@ func (s *MaintenanceWindowRunCommandParameters) SetTimeoutSeconds(v int64) *Main return s } -// The parameters for the STEP_FUNCTION execution. +// The parameters for a STEP_FUNCTION task. +// +// For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow +// and UpdateMaintenanceWindowTask. +// +// LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, +// instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// TaskParameters has been deprecated. To specify parameters to pass to a task +// when it runs, instead use the Parameters option in the TaskInvocationParameters +// structure. For information about how Systems Manager handles these options +// for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. +// +// For Step Functions tasks, Systems Manager ignores any values specified for +// TaskParameters and LoggingInfo. type MaintenanceWindowStepFunctionsParameters struct { _ struct{} `type:"structure"` @@ -22899,6 +23620,11 @@ type MaintenanceWindowTask struct { Description *string `min:"1" type:"string"` // Information about an Amazon S3 bucket to write task-level logs to. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets this task can be run for in parallel. @@ -22929,6 +23655,11 @@ type MaintenanceWindowTask struct { TaskArn *string `min:"1" type:"string"` // The parameters that should be passed to the task when it is executed. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The type of task. The type can be one of the following: RUN_COMMAND, AUTOMATION, @@ -23034,7 +23765,7 @@ func (s *MaintenanceWindowTask) SetWindowTaskId(v string) *MaintenanceWindowTask type MaintenanceWindowTaskInvocationParameters struct { _ struct{} `type:"structure"` - // The parameters for a AUTOMATION task type. + // The parameters for an AUTOMATION task type. Automation *MaintenanceWindowAutomationParameters `type:"structure"` // The parameters for a LAMBDA task type. @@ -24180,9 +24911,9 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * Low // -// SUSE Linux Enterprise Server (SUSE) Operating Systems +// SUSE Linux Enterprise Server (SLES) Operating Systems // -// The supported keys for SUSE operating systems are PRODUCT, CLASSIFICATION, +// The supported keys for SLES operating systems are PRODUCT, CLASSIFICATION, // and SEVERITY. See the following lists for valid values for each of these // keys. // @@ -24237,6 +24968,62 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // * Moderate // // * Low +// +// CentOS Operating Systems +// +// The supported keys for CentOS operating systems are PRODUCT, CLASSIFICATION, +// and SEVERITY. See the following lists for valid values for each of these +// keys. +// +// Supported key:PRODUCT +// +// Supported values: +// +// * CentOS6.5 +// +// * CentOS6.6 +// +// * CentOS6.7 +// +// * CentOS6.8 +// +// * CentOS6.9 +// +// * CentOS7.0 +// +// * CentOS7.1 +// +// * CentOS7.2 +// +// * CentOS7.3 +// +// * CentOS7.4 +// +// Supported key:CLASSIFICATION +// +// Supported values: +// +// * Security +// +// * Bugfix +// +// * Enhancement +// +// * Recommended +// +// * Newpackage +// +// Supported key:SEVERITY +// +// Supported values: +// +// * Critical +// +// * Important +// +// * Medium +// +// * Low type PatchFilter struct { _ struct{} `type:"structure"` @@ -24900,6 +25687,9 @@ func (s *PutInventoryInput) SetItems(v []*InventoryItem) *PutInventoryInput { type PutInventoryOutput struct { _ struct{} `type:"structure"` + + // Information about the request. + Message *string `type:"string"` } // String returns the string representation @@ -24912,6 +25702,12 @@ func (s PutInventoryOutput) GoString() string { return s.String() } +// SetMessage sets the Message field's value. +func (s *PutInventoryOutput) SetMessage(v string) *PutInventoryOutput { + s.Message = &v + return s +} + type PutParameterInput struct { _ struct{} `type:"structure"` @@ -24921,6 +25717,8 @@ type PutParameterInput struct { AllowedPattern *string `type:"string"` // Information about the parameter that you want to add to the system. + // + // Do not enter personally identifiable information in this field. Description *string `type:"string"` // The KMS Key ID that you want to use to encrypt a parameter when you choose @@ -25240,8 +26038,17 @@ type RegisterTargetWithMaintenanceWindowInput struct { // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` - // The targets (either instances or tags). Instances are specified using Key=instanceids,Values=,. - // Tags are specified using Key=,Values=. + // The targets (either instances or tags). + // + // Specify instances using the following format: + // + // Key=InstanceIds,Values=, + // + // Specify tags using either of the following formats: + // + // Key=tag:,Values=, + // + // Key=tag-key,Values=, // // Targets is a required field Targets []*Target `type:"list" required:"true"` @@ -25382,6 +26189,11 @@ type RegisterTaskWithMaintenanceWindowInput struct { // A structure containing information about an Amazon S3 bucket to write instance-level // logs to. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The maximum number of targets this task can be run for in parallel. @@ -25407,8 +26219,15 @@ type RegisterTaskWithMaintenanceWindowInput struct { // ServiceRoleArn is a required field ServiceRoleArn *string `type:"string" required:"true"` - // The targets (either instances or tags). Instances are specified using Key=instanceids,Values=,. - // Tags are specified using Key=,Values=. + // The targets (either instances or Maintenance Window targets). + // + // Specify instances using the following format: + // + // Key=InstanceIds,Values=, + // + // Specify Maintenance Window targets using the following format: + // + // Key=,Values=, // // Targets is a required field Targets []*Target `type:"list" required:"true"` @@ -25423,6 +26242,11 @@ type RegisterTaskWithMaintenanceWindowInput struct { TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The parameters that should be passed to the task when it is executed. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The type of task being registered. @@ -25430,7 +26254,7 @@ type RegisterTaskWithMaintenanceWindowInput struct { // TaskType is a required field TaskType *string `type:"string" required:"true" enum:"MaintenanceWindowTaskType"` - // The id of the Maintenance Window the task should be added to. + // The ID of the Maintenance Window the task should be added to. // // WindowId is a required field WindowId *string `min:"20" type:"string" required:"true"` @@ -25628,13 +26452,30 @@ func (s *RegisterTaskWithMaintenanceWindowOutput) SetWindowTaskId(v string) *Reg type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` - // The resource ID for which you want to remove tags. + // The resource ID for which you want to remove tags. Use the ID of the resource. + // Here are some examples: + // + // ManagedInstance: mi-012345abcde + // + // MaintenanceWindow: mw-012345abcde + // + // PatchBaseline: pb-012345abcde + // + // For the Document and Parameter values, use the name of the resource. + // + // The ManagedInstance type for this API action is only for on-premises managed + // instances. You must specify the the name of the managed instance in the following + // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` // The type of resource of which you want to remove a tag. // + // The ManagedInstance type for this API action is only for on-premises managed + // instances. You must specify the the name of the managed instance in the following + // format: mi-ID_number. For example, mi-1a2b3c4d5e6f. + // // ResourceType is a required field ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"` @@ -26240,6 +27081,10 @@ type SendCommandInput struct { // DocumentName is a required field DocumentName *string `type:"string" required:"true"` + // The SSM document version to use in the request. You can specify Default, + // Latest, or a specific version number. + DocumentVersion *string `type:"string"` + // The instance IDs where the command should execute. You can specify a maximum // of 50 IDs. If you prefer not to list individual instance IDs, you can instead // send commands to a fleet of instances using the Targets parameter, which @@ -26288,7 +27133,7 @@ type SendCommandInput struct { Targets []*Target `type:"list"` // If this time is reached and the command has not already started executing, - // it will not execute. + // it will not run. TimeoutSeconds *int64 `min:"30" type:"integer"` } @@ -26364,6 +27209,12 @@ func (s *SendCommandInput) SetDocumentName(v string) *SendCommandInput { return s } +// SetDocumentVersion sets the DocumentVersion field's value. +func (s *SendCommandInput) SetDocumentVersion(v string) *SendCommandInput { + s.DocumentVersion = &v + return s +} + // SetInstanceIds sets the InstanceIds field's value. func (s *SendCommandInput) SetInstanceIds(v []*string) *SendCommandInput { s.InstanceIds = v @@ -27965,6 +28816,11 @@ type UpdateMaintenanceWindowTaskInput struct { Description *string `min:"1" type:"string"` // The new logging location in Amazon S3 to specify. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The new MaxConcurrency value you want to specify. MaxConcurrency is the number @@ -28003,7 +28859,14 @@ type UpdateMaintenanceWindowTaskInput struct { // fields that match the task type. All other fields should be empty. TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` - // The parameters to modify. The map has the following format: + // The parameters to modify. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. + // + // The map has the following format: // // Key: string, between 1 and 255 characters // @@ -28179,6 +29042,11 @@ type UpdateMaintenanceWindowTaskOutput struct { Description *string `min:"1" type:"string"` // The updated logging information in Amazon S3. + // + // LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, + // instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. LoggingInfo *LoggingInfo `type:"structure"` // The updated MaxConcurrency value. @@ -28206,6 +29074,11 @@ type UpdateMaintenanceWindowTaskOutput struct { TaskInvocationParameters *MaintenanceWindowTaskInvocationParameters `type:"structure"` // The updated parameter values. + // + // TaskParameters has been deprecated. To specify parameters to pass to a task + // when it runs, instead use the Parameters option in the TaskInvocationParameters + // structure. For information about how Systems Manager handles these options + // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` // The ID of the Maintenance Window that was updated. @@ -28376,6 +29249,11 @@ type UpdatePatchBaselineInput struct { ApprovalRules *PatchRuleGroup `type:"structure"` // A list of explicitly approved patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. ApprovedPatches []*string `type:"list"` // Assigns a new compliance severity level to an existing patch baseline. @@ -28401,6 +29279,11 @@ type UpdatePatchBaselineInput struct { Name *string `min:"3" type:"string"` // A list of explicitly rejected patches for the baseline. + // + // For information about accepted formats for lists of approved patches and + // rejected patches, see Package Name Formats for Approved and Rejected Patch + // Lists (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html) + // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` // If True, then all fields that are required by the CreatePatchBaseline action @@ -29020,6 +29903,14 @@ const ( InventoryAttributeDataTypeNumber = "number" ) +const ( + // InventoryDeletionStatusInProgress is a InventoryDeletionStatus enum value + InventoryDeletionStatusInProgress = "InProgress" + + // InventoryDeletionStatusComplete is a InventoryDeletionStatus enum value + InventoryDeletionStatusComplete = "Complete" +) + const ( // InventoryQueryOperatorTypeEqual is a InventoryQueryOperatorType enum value InventoryQueryOperatorTypeEqual = "Equal" @@ -29037,6 +29928,14 @@ const ( InventoryQueryOperatorTypeGreaterThan = "GreaterThan" ) +const ( + // InventorySchemaDeleteOptionDisableSchema is a InventorySchemaDeleteOption enum value + InventorySchemaDeleteOptionDisableSchema = "DisableSchema" + + // InventorySchemaDeleteOptionDeleteSchema is a InventorySchemaDeleteOption enum value + InventorySchemaDeleteOptionDeleteSchema = "DeleteSchema" +) + const ( // LastResourceDataSyncStatusSuccessful is a LastResourceDataSyncStatus enum value LastResourceDataSyncStatusSuccessful = "Successful" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index 8c932a093c3..3321d99884e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -227,6 +227,20 @@ const ( // "InvalidCommandId". ErrCodeInvalidCommandId = "InvalidCommandId" + // ErrCodeInvalidDeleteInventoryParametersException for service response error code + // "InvalidDeleteInventoryParametersException". + // + // One or more of the parameters specified for the delete operation is not valid. + // Verify all parameters and try again. + ErrCodeInvalidDeleteInventoryParametersException = "InvalidDeleteInventoryParametersException" + + // ErrCodeInvalidDeletionIdException for service response error code + // "InvalidDeletionIdException". + // + // The ID specified for the delete operation does not exist or is not valide. + // Verify the ID and try again. + ErrCodeInvalidDeletionIdException = "InvalidDeletionIdException" + // ErrCodeInvalidDocument for service response error code // "InvalidDocument". // @@ -315,6 +329,12 @@ const ( // Verify the keys and values, and try again. ErrCodeInvalidInventoryItemContextException = "InvalidInventoryItemContextException" + // ErrCodeInvalidInventoryRequestException for service response error code + // "InvalidInventoryRequestException". + // + // The request is not valid. + ErrCodeInvalidInventoryRequestException = "InvalidInventoryRequestException" + // ErrCodeInvalidItemContentException for service response error code // "InvalidItemContentException". // @@ -340,6 +360,13 @@ const ( // Resource Name (ARN) was provided for an Amazon SNS topic. ErrCodeInvalidNotificationConfig = "InvalidNotificationConfig" + // ErrCodeInvalidOptionException for service response error code + // "InvalidOptionException". + // + // The delete inventory option specified is not valid. Verify the option and + // try again. + ErrCodeInvalidOptionException = "InvalidOptionException" + // ErrCodeInvalidOutputFolder for service response error code // "InvalidOutputFolder". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go index 051c8fe53d9..a108e4bd770 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go @@ -11,6 +11,297 @@ import ( "github.com/aws/aws-sdk-go/aws/request" ) +const opAssociateIpGroups = "AssociateIpGroups" + +// AssociateIpGroupsRequest generates a "aws/request.Request" representing the +// client's request for the AssociateIpGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateIpGroups for more information on using the AssociateIpGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateIpGroupsRequest method. +// req, resp := client.AssociateIpGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups +func (c *WorkSpaces) AssociateIpGroupsRequest(input *AssociateIpGroupsInput) (req *request.Request, output *AssociateIpGroupsOutput) { + op := &request.Operation{ + Name: opAssociateIpGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateIpGroupsInput{} + } + + output = &AssociateIpGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateIpGroups API operation for Amazon WorkSpaces. +// +// Associates the specified IP access control group with the specified directory. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation AssociateIpGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// This operation is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups +func (c *WorkSpaces) AssociateIpGroups(input *AssociateIpGroupsInput) (*AssociateIpGroupsOutput, error) { + req, out := c.AssociateIpGroupsRequest(input) + return out, req.Send() +} + +// AssociateIpGroupsWithContext is the same as AssociateIpGroups with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateIpGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) AssociateIpGroupsWithContext(ctx aws.Context, input *AssociateIpGroupsInput, opts ...request.Option) (*AssociateIpGroupsOutput, error) { + req, out := c.AssociateIpGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAuthorizeIpRules = "AuthorizeIpRules" + +// AuthorizeIpRulesRequest generates a "aws/request.Request" representing the +// client's request for the AuthorizeIpRules operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AuthorizeIpRules for more information on using the AuthorizeIpRules +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AuthorizeIpRulesRequest method. +// req, resp := client.AuthorizeIpRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules +func (c *WorkSpaces) AuthorizeIpRulesRequest(input *AuthorizeIpRulesInput) (req *request.Request, output *AuthorizeIpRulesOutput) { + op := &request.Operation{ + Name: opAuthorizeIpRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AuthorizeIpRulesInput{} + } + + output = &AuthorizeIpRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// AuthorizeIpRules API operation for Amazon WorkSpaces. +// +// Adds one or more rules to the specified IP access control group. +// +// This action gives users permission to access their WorkSpaces from the CIDR +// address ranges specified in the rules. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation AuthorizeIpRules for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules +func (c *WorkSpaces) AuthorizeIpRules(input *AuthorizeIpRulesInput) (*AuthorizeIpRulesOutput, error) { + req, out := c.AuthorizeIpRulesRequest(input) + return out, req.Send() +} + +// AuthorizeIpRulesWithContext is the same as AuthorizeIpRules with the addition of +// the ability to pass a context and additional request options. +// +// See AuthorizeIpRules for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) AuthorizeIpRulesWithContext(ctx aws.Context, input *AuthorizeIpRulesInput, opts ...request.Option) (*AuthorizeIpRulesOutput, error) { + req, out := c.AuthorizeIpRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateIpGroup = "CreateIpGroup" + +// CreateIpGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateIpGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateIpGroup for more information on using the CreateIpGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateIpGroupRequest method. +// req, resp := client.CreateIpGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup +func (c *WorkSpaces) CreateIpGroupRequest(input *CreateIpGroupInput) (req *request.Request, output *CreateIpGroupOutput) { + op := &request.Operation{ + Name: opCreateIpGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateIpGroupInput{} + } + + output = &CreateIpGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateIpGroup API operation for Amazon WorkSpaces. +// +// Creates an IP access control group. +// +// An IP access control group provides you with the ability to control the IP +// addresses from which users are allowed to access their WorkSpaces. To specify +// the CIDR address ranges, add rules to your IP access control group and then +// associate the group with your directory. You can add rules when you create +// the group or at any time using AuthorizeIpRules. +// +// There is a default IP access control group associated with your directory. +// If you don't associate an IP access control group with your directory, the +// default group is used. The default group includes a default rule that allows +// users to access their WorkSpaces from anywhere. You cannot modify the default +// IP access control group for your directory. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation CreateIpGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The specified resource already exists. +// +// * ErrCodeResourceCreationFailedException "ResourceCreationFailedException" +// The resource could not be created. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup +func (c *WorkSpaces) CreateIpGroup(input *CreateIpGroupInput) (*CreateIpGroupOutput, error) { + req, out := c.CreateIpGroupRequest(input) + return out, req.Send() +} + +// CreateIpGroupWithContext is the same as CreateIpGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateIpGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) CreateIpGroupWithContext(ctx aws.Context, input *CreateIpGroupInput, opts ...request.Option) (*CreateIpGroupOutput, error) { + req, out := c.CreateIpGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the @@ -55,7 +346,7 @@ func (c *WorkSpaces) CreateTagsRequest(input *CreateTagsInput) (req *request.Req // CreateTags API operation for Amazon WorkSpaces. // -// Creates tags for the specified WorkSpace. +// Creates the specified tags for the specified WorkSpace. // // 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 @@ -180,6 +471,96 @@ func (c *WorkSpaces) CreateWorkspacesWithContext(ctx aws.Context, input *CreateW return out, req.Send() } +const opDeleteIpGroup = "DeleteIpGroup" + +// DeleteIpGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteIpGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteIpGroup for more information on using the DeleteIpGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteIpGroupRequest method. +// req, resp := client.DeleteIpGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup +func (c *WorkSpaces) DeleteIpGroupRequest(input *DeleteIpGroupInput) (req *request.Request, output *DeleteIpGroupOutput) { + op := &request.Operation{ + Name: opDeleteIpGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteIpGroupInput{} + } + + output = &DeleteIpGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteIpGroup API operation for Amazon WorkSpaces. +// +// Deletes the specified IP access control group. +// +// You cannot delete an IP access control group that is associated with a directory. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation DeleteIpGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceAssociatedException "ResourceAssociatedException" +// The resource is associated with a directory. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup +func (c *WorkSpaces) DeleteIpGroup(input *DeleteIpGroupInput) (*DeleteIpGroupOutput, error) { + req, out := c.DeleteIpGroupRequest(input) + return out, req.Send() +} + +// DeleteIpGroupWithContext is the same as DeleteIpGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteIpGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) DeleteIpGroupWithContext(ctx aws.Context, input *DeleteIpGroupInput, opts ...request.Option) (*DeleteIpGroupOutput, error) { + req, out := c.DeleteIpGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the @@ -224,7 +605,7 @@ func (c *WorkSpaces) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Req // DeleteTags API operation for Amazon WorkSpaces. // -// Deletes the specified tags from a WorkSpace. +// Deletes the specified tags from the specified WorkSpace. // // 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 @@ -262,6 +643,88 @@ func (c *WorkSpaces) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInp return out, req.Send() } +const opDescribeIpGroups = "DescribeIpGroups" + +// DescribeIpGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeIpGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeIpGroups for more information on using the DescribeIpGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeIpGroupsRequest method. +// req, resp := client.DescribeIpGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups +func (c *WorkSpaces) DescribeIpGroupsRequest(input *DescribeIpGroupsInput) (req *request.Request, output *DescribeIpGroupsOutput) { + op := &request.Operation{ + Name: opDescribeIpGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeIpGroupsInput{} + } + + output = &DescribeIpGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeIpGroups API operation for Amazon WorkSpaces. +// +// Describes one or more of your IP access control groups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation DescribeIpGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups +func (c *WorkSpaces) DescribeIpGroups(input *DescribeIpGroupsInput) (*DescribeIpGroupsOutput, error) { + req, out := c.DescribeIpGroupsRequest(input) + return out, req.Send() +} + +// DescribeIpGroupsWithContext is the same as DescribeIpGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeIpGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) DescribeIpGroupsWithContext(ctx aws.Context, input *DescribeIpGroupsInput, opts ...request.Option) (*DescribeIpGroupsOutput, error) { + req, out := c.DescribeIpGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the @@ -306,7 +769,7 @@ func (c *WorkSpaces) DescribeTagsRequest(input *DescribeTagsInput) (req *request // DescribeTags API operation for Amazon WorkSpaces. // -// Describes the tags for the specified WorkSpace. +// Describes the specified tags for the specified WorkSpace. // // 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 @@ -748,87 +1211,175 @@ func (c *WorkSpaces) DescribeWorkspacesPagesWithContext(ctx aws.Context, input * }, } - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*DescribeWorkspacesOutput), !p.HasNextPage()) - } - return p.Err() + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeWorkspacesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus" + +// DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkspacesConnectionStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeWorkspacesConnectionStatus for more information on using the DescribeWorkspacesConnectionStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeWorkspacesConnectionStatusRequest method. +// req, resp := client.DescribeWorkspacesConnectionStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus +func (c *WorkSpaces) DescribeWorkspacesConnectionStatusRequest(input *DescribeWorkspacesConnectionStatusInput) (req *request.Request, output *DescribeWorkspacesConnectionStatusOutput) { + op := &request.Operation{ + Name: opDescribeWorkspacesConnectionStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkspacesConnectionStatusInput{} + } + + output = &DescribeWorkspacesConnectionStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkspacesConnectionStatus API operation for Amazon WorkSpaces. +// +// Describes the connection status of the specified WorkSpaces. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation DescribeWorkspacesConnectionStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus +func (c *WorkSpaces) DescribeWorkspacesConnectionStatus(input *DescribeWorkspacesConnectionStatusInput) (*DescribeWorkspacesConnectionStatusOutput, error) { + req, out := c.DescribeWorkspacesConnectionStatusRequest(input) + return out, req.Send() +} + +// DescribeWorkspacesConnectionStatusWithContext is the same as DescribeWorkspacesConnectionStatus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkspacesConnectionStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) DescribeWorkspacesConnectionStatusWithContext(ctx aws.Context, input *DescribeWorkspacesConnectionStatusInput, opts ...request.Option) (*DescribeWorkspacesConnectionStatusOutput, error) { + req, out := c.DescribeWorkspacesConnectionStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } -const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus" +const opDisassociateIpGroups = "DisassociateIpGroups" -// DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeWorkspacesConnectionStatus operation. The "output" return +// DisassociateIpGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateIpGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeWorkspacesConnectionStatus for more information on using the DescribeWorkspacesConnectionStatus +// See DisassociateIpGroups for more information on using the DisassociateIpGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeWorkspacesConnectionStatusRequest method. -// req, resp := client.DescribeWorkspacesConnectionStatusRequest(params) +// // Example sending a request using the DisassociateIpGroupsRequest method. +// req, resp := client.DisassociateIpGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus -func (c *WorkSpaces) DescribeWorkspacesConnectionStatusRequest(input *DescribeWorkspacesConnectionStatusInput) (req *request.Request, output *DescribeWorkspacesConnectionStatusOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups +func (c *WorkSpaces) DisassociateIpGroupsRequest(input *DisassociateIpGroupsInput) (req *request.Request, output *DisassociateIpGroupsOutput) { op := &request.Operation{ - Name: opDescribeWorkspacesConnectionStatus, + Name: opDisassociateIpGroups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeWorkspacesConnectionStatusInput{} + input = &DisassociateIpGroupsInput{} } - output = &DescribeWorkspacesConnectionStatusOutput{} + output = &DisassociateIpGroupsOutput{} req = c.newRequest(op, input, output) return } -// DescribeWorkspacesConnectionStatus API operation for Amazon WorkSpaces. +// DisassociateIpGroups API operation for Amazon WorkSpaces. // -// Describes the connection status of the specified WorkSpaces. +// Disassociates the specified IP access control group from the specified directory. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon WorkSpaces's -// API operation DescribeWorkspacesConnectionStatus for usage and error information. +// API operation DisassociateIpGroups for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" // One or more parameter values are not valid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus -func (c *WorkSpaces) DescribeWorkspacesConnectionStatus(input *DescribeWorkspacesConnectionStatusInput) (*DescribeWorkspacesConnectionStatusOutput, error) { - req, out := c.DescribeWorkspacesConnectionStatusRequest(input) +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups +func (c *WorkSpaces) DisassociateIpGroups(input *DisassociateIpGroupsInput) (*DisassociateIpGroupsOutput, error) { + req, out := c.DisassociateIpGroupsRequest(input) return out, req.Send() } -// DescribeWorkspacesConnectionStatusWithContext is the same as DescribeWorkspacesConnectionStatus with the addition of +// DisassociateIpGroupsWithContext is the same as DisassociateIpGroups with the addition of // the ability to pass a context and additional request options. // -// See DescribeWorkspacesConnectionStatus for details on how to use this API operation. +// See DisassociateIpGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *WorkSpaces) DescribeWorkspacesConnectionStatusWithContext(ctx aws.Context, input *DescribeWorkspacesConnectionStatusInput, opts ...request.Option) (*DescribeWorkspacesConnectionStatusOutput, error) { - req, out := c.DescribeWorkspacesConnectionStatusRequest(input) +func (c *WorkSpaces) DisassociateIpGroupsWithContext(ctx aws.Context, input *DisassociateIpGroupsInput, opts ...request.Option) (*DisassociateIpGroupsOutput, error) { + req, out := c.DisassociateIpGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -892,7 +1443,7 @@ func (c *WorkSpaces) ModifyWorkspacePropertiesRequest(input *ModifyWorkspaceProp // One or more parameter values are not valid. // // * ErrCodeInvalidResourceStateException "InvalidResourceStateException" -// The state of the WorkSpace is not valid for this operation. +// The state of the resource is not valid for this operation. // // * ErrCodeOperationInProgressException "OperationInProgressException" // The properties of this WorkSpace are currently being modified. Try again @@ -933,6 +1484,96 @@ func (c *WorkSpaces) ModifyWorkspacePropertiesWithContext(ctx aws.Context, input return out, req.Send() } +const opModifyWorkspaceState = "ModifyWorkspaceState" + +// ModifyWorkspaceStateRequest generates a "aws/request.Request" representing the +// client's request for the ModifyWorkspaceState operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyWorkspaceState for more information on using the ModifyWorkspaceState +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyWorkspaceStateRequest method. +// req, resp := client.ModifyWorkspaceStateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState +func (c *WorkSpaces) ModifyWorkspaceStateRequest(input *ModifyWorkspaceStateInput) (req *request.Request, output *ModifyWorkspaceStateOutput) { + op := &request.Operation{ + Name: opModifyWorkspaceState, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyWorkspaceStateInput{} + } + + output = &ModifyWorkspaceStateOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyWorkspaceState API operation for Amazon WorkSpaces. +// +// Sets the state of the specified WorkSpace. +// +// To maintain a WorkSpace without being interrupted, set the WorkSpace state +// to ADMIN_MAINTENANCE. WorkSpaces in this state do not respond to requests +// to reboot, stop, start, or rebuild. An AutoStop WorkSpace in this state is +// not stopped. Users can log into a WorkSpace in the ADMIN_MAINTENANCE state. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation ModifyWorkspaceState for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState +func (c *WorkSpaces) ModifyWorkspaceState(input *ModifyWorkspaceStateInput) (*ModifyWorkspaceStateOutput, error) { + req, out := c.ModifyWorkspaceStateRequest(input) + return out, req.Send() +} + +// ModifyWorkspaceStateWithContext is the same as ModifyWorkspaceState with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyWorkspaceState for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) ModifyWorkspaceStateWithContext(ctx aws.Context, input *ModifyWorkspaceStateInput, opts ...request.Option) (*ModifyWorkspaceStateOutput, error) { + req, out := c.ModifyWorkspaceStateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRebootWorkspaces = "RebootWorkspaces" // RebootWorkspacesRequest generates a "aws/request.Request" representing the @@ -979,8 +1620,7 @@ func (c *WorkSpaces) RebootWorkspacesRequest(input *RebootWorkspacesInput) (req // // Reboots the specified WorkSpaces. // -// You cannot reboot a WorkSpace unless its state is AVAILABLE, IMPAIRED, or -// INOPERABLE. +// You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY. // // This operation is asynchronous and returns before the WorkSpaces have rebooted. // @@ -1056,9 +1696,9 @@ func (c *WorkSpaces) RebuildWorkspacesRequest(input *RebuildWorkspacesInput) (re // RebuildWorkspaces API operation for Amazon WorkSpaces. // -// Rebuilds the specified WorkSpaces. +// Rebuilds the specified WorkSpace. // -// You cannot rebuild a WorkSpace unless its state is AVAILABLE or ERROR. +// You cannot rebuild a WorkSpace unless its state is AVAILABLE, ERROR, or UNHEALTHY. // // Rebuilding a WorkSpace is a potentially destructive action that can result // in the loss of data. For more information, see Rebuild a WorkSpace (http://docs.aws.amazon.com/workspaces/latest/adminguide/reset-workspace.html). @@ -1094,6 +1734,94 @@ func (c *WorkSpaces) RebuildWorkspacesWithContext(ctx aws.Context, input *Rebuil return out, req.Send() } +const opRevokeIpRules = "RevokeIpRules" + +// RevokeIpRulesRequest generates a "aws/request.Request" representing the +// client's request for the RevokeIpRules operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RevokeIpRules for more information on using the RevokeIpRules +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RevokeIpRulesRequest method. +// req, resp := client.RevokeIpRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules +func (c *WorkSpaces) RevokeIpRulesRequest(input *RevokeIpRulesInput) (req *request.Request, output *RevokeIpRulesOutput) { + op := &request.Operation{ + Name: opRevokeIpRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RevokeIpRulesInput{} + } + + output = &RevokeIpRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// RevokeIpRules API operation for Amazon WorkSpaces. +// +// Removes one or more rules from the specified IP access control group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation RevokeIpRules for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules +func (c *WorkSpaces) RevokeIpRules(input *RevokeIpRulesInput) (*RevokeIpRulesOutput, error) { + req, out := c.RevokeIpRulesRequest(input) + return out, req.Send() +} + +// RevokeIpRulesWithContext is the same as RevokeIpRules with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeIpRules for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) RevokeIpRulesWithContext(ctx aws.Context, input *RevokeIpRulesInput, opts ...request.Option) (*RevokeIpRulesOutput, error) { + req, out := c.RevokeIpRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartWorkspaces = "StartWorkspaces" // StartWorkspacesRequest generates a "aws/request.Request" representing the @@ -1298,39 +2026,263 @@ func (c *WorkSpaces) TerminateWorkspacesRequest(input *TerminateWorkspacesInput) // data is destroyed. If you need to archive any user data, contact Amazon Web // Services before terminating the WorkSpace. // -// You can terminate a WorkSpace that is in any state except SUSPENDED. +// You can terminate a WorkSpace that is in any state except SUSPENDED. +// +// This operation is asynchronous and returns before the WorkSpaces have been +// completely terminated. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation TerminateWorkspaces for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces +func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) { + req, out := c.TerminateWorkspacesRequest(input) + return out, req.Send() +} + +// TerminateWorkspacesWithContext is the same as TerminateWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateWorkspaces for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkSpaces) TerminateWorkspacesWithContext(ctx aws.Context, input *TerminateWorkspacesInput, opts ...request.Option) (*TerminateWorkspacesOutput, error) { + req, out := c.TerminateWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRulesOfIpGroup = "UpdateRulesOfIpGroup" + +// UpdateRulesOfIpGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRulesOfIpGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRulesOfIpGroup for more information on using the UpdateRulesOfIpGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRulesOfIpGroupRequest method. +// req, resp := client.UpdateRulesOfIpGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup +func (c *WorkSpaces) UpdateRulesOfIpGroupRequest(input *UpdateRulesOfIpGroupInput) (req *request.Request, output *UpdateRulesOfIpGroupOutput) { + op := &request.Operation{ + Name: opUpdateRulesOfIpGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRulesOfIpGroupInput{} + } + + output = &UpdateRulesOfIpGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRulesOfIpGroup API operation for Amazon WorkSpaces. +// +// Replaces the current rules of the specified IP access control group with +// the specified rules. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation UpdateRulesOfIpGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. // -// This operation is asynchronous and returns before the WorkSpaces have been -// completely terminated. +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. // -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. // -// See the AWS API reference guide for Amazon WorkSpaces's -// API operation TerminateWorkspaces for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces -func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) { - req, out := c.TerminateWorkspacesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup +func (c *WorkSpaces) UpdateRulesOfIpGroup(input *UpdateRulesOfIpGroupInput) (*UpdateRulesOfIpGroupOutput, error) { + req, out := c.UpdateRulesOfIpGroupRequest(input) return out, req.Send() } -// TerminateWorkspacesWithContext is the same as TerminateWorkspaces with the addition of +// UpdateRulesOfIpGroupWithContext is the same as UpdateRulesOfIpGroup with the addition of // the ability to pass a context and additional request options. // -// See TerminateWorkspaces for details on how to use this API operation. +// See UpdateRulesOfIpGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *WorkSpaces) TerminateWorkspacesWithContext(ctx aws.Context, input *TerminateWorkspacesInput, opts ...request.Option) (*TerminateWorkspacesOutput, error) { - req, out := c.TerminateWorkspacesRequest(input) +func (c *WorkSpaces) UpdateRulesOfIpGroupWithContext(ctx aws.Context, input *UpdateRulesOfIpGroupInput, opts ...request.Option) (*UpdateRulesOfIpGroupOutput, error) { + req, out := c.UpdateRulesOfIpGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } +type AssociateIpGroupsInput struct { + _ struct{} `type:"structure"` + + // The ID of the directory. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The IDs of one or more IP access control groups. + // + // GroupIds is a required field + GroupIds []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s AssociateIpGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateIpGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateIpGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateIpGroupsInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.GroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *AssociateIpGroupsInput) SetDirectoryId(v string) *AssociateIpGroupsInput { + s.DirectoryId = &v + return s +} + +// SetGroupIds sets the GroupIds field's value. +func (s *AssociateIpGroupsInput) SetGroupIds(v []*string) *AssociateIpGroupsInput { + s.GroupIds = v + return s +} + +type AssociateIpGroupsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateIpGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateIpGroupsOutput) GoString() string { + return s.String() +} + +type AuthorizeIpRulesInput struct { + _ struct{} `type:"structure"` + + // The ID of the group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` + + // The rules to add to the group. + // + // UserRules is a required field + UserRules []*IpRuleItem `type:"list" required:"true"` +} + +// String returns the string representation +func (s AuthorizeIpRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeIpRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeIpRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeIpRulesInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.UserRules == nil { + invalidParams.Add(request.NewErrParamRequired("UserRules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *AuthorizeIpRulesInput) SetGroupId(v string) *AuthorizeIpRulesInput { + s.GroupId = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *AuthorizeIpRulesInput) SetUserRules(v []*IpRuleItem) *AuthorizeIpRulesInput { + s.UserRules = v + return s +} + +type AuthorizeIpRulesOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AuthorizeIpRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeIpRulesOutput) GoString() string { + return s.String() +} + // Information about the compute type. type ComputeType struct { _ struct{} `type:"structure"` @@ -1355,15 +2307,94 @@ func (s *ComputeType) SetName(v string) *ComputeType { return s } +type CreateIpGroupInput struct { + _ struct{} `type:"structure"` + + // The description of the group. + GroupDesc *string `type:"string"` + + // The name of the group. + // + // GroupName is a required field + GroupName *string `type:"string" required:"true"` + + // The rules to add to the group. + UserRules []*IpRuleItem `type:"list"` +} + +// String returns the string representation +func (s CreateIpGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIpGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateIpGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateIpGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupDesc sets the GroupDesc field's value. +func (s *CreateIpGroupInput) SetGroupDesc(v string) *CreateIpGroupInput { + s.GroupDesc = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *CreateIpGroupInput) SetGroupName(v string) *CreateIpGroupInput { + s.GroupName = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *CreateIpGroupInput) SetUserRules(v []*IpRuleItem) *CreateIpGroupInput { + s.UserRules = v + return s +} + +type CreateIpGroupOutput struct { + _ struct{} `type:"structure"` + + // The ID of the group. + GroupId *string `type:"string"` +} + +// String returns the string representation +func (s CreateIpGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIpGroupOutput) GoString() string { + return s.String() +} + +// SetGroupId sets the GroupId field's value. +func (s *CreateIpGroupOutput) SetGroupId(v string) *CreateIpGroupOutput { + s.GroupId = &v + return s +} + type CreateTagsInput struct { _ struct{} `type:"structure"` - // The ID of the resource. + // The ID of the WorkSpace. To find this ID, use DescribeWorkspaces. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` - // The tags. Each resource can have a maximum of 50 tags. + // The tags. Each WorkSpace can have a maximum of 50 tags. // // Tags is a required field Tags []*Tag `type:"list" required:"true"` @@ -1437,7 +2468,7 @@ func (s CreateTagsOutput) GoString() string { type CreateWorkspacesInput struct { _ struct{} `type:"structure"` - // Information about the WorkSpaces to create. + // The WorkSpaces to create. You can specify up to 25 WorkSpaces. // // Workspaces is a required field Workspaces []*WorkspaceRequest `min:"1" type:"list" required:"true"` @@ -1582,10 +2613,62 @@ func (s *DefaultWorkspaceCreationProperties) SetUserEnabledAsLocalAdministrator( return s } +type DeleteIpGroupInput struct { + _ struct{} `type:"structure"` + + // The ID of the IP access control group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteIpGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIpGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteIpGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteIpGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *DeleteIpGroupInput) SetGroupId(v string) *DeleteIpGroupInput { + s.GroupId = &v + return s +} + +type DeleteIpGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteIpGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIpGroupOutput) GoString() string { + return s.String() +} + type DeleteTagsInput struct { _ struct{} `type:"structure"` - // The ID of the resource. + // The ID of the WorkSpace. To find this ID, use DescribeWorkspaces. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1637,24 +2720,116 @@ func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { return s } -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` +type DeleteTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsOutput) GoString() string { + return s.String() +} + +type DescribeIpGroupsInput struct { + _ struct{} `type:"structure"` + + // The IDs of one or more IP access control groups. + GroupIds []*string `type:"list"` + + // The maximum number of items to return. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of results. (You received this token from a previous + // call.) + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeIpGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIpGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeIpGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeIpGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupIds sets the GroupIds field's value. +func (s *DescribeIpGroupsInput) SetGroupIds(v []*string) *DescribeIpGroupsInput { + s.GroupIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeIpGroupsInput) SetMaxResults(v int64) *DescribeIpGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeIpGroupsInput) SetNextToken(v string) *DescribeIpGroupsInput { + s.NextToken = &v + return s +} + +type DescribeIpGroupsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next set of results, or null if there are + // no more results available. This token is valid for one day and must be used + // within that time frame. + NextToken *string `min:"1" type:"string"` + + // Information about the IP access control groups. + Result []*IpGroup `type:"list"` } // String returns the string representation -func (s DeleteTagsOutput) String() string { +func (s DescribeIpGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { +func (s DescribeIpGroupsOutput) GoString() string { return s.String() } +// SetNextToken sets the NextToken field's value. +func (s *DescribeIpGroupsOutput) SetNextToken(v string) *DescribeIpGroupsOutput { + s.NextToken = &v + return s +} + +// SetResult sets the Result field's value. +func (s *DescribeIpGroupsOutput) SetResult(v []*IpGroup) *DescribeIpGroupsOutput { + s.Result = v + return s +} + type DescribeTagsInput struct { _ struct{} `type:"structure"` - // The ID of the resource. + // The ID of the WorkSpace. To find this ID, use DescribeWorkspaces. // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1903,7 +3078,7 @@ type DescribeWorkspacesConnectionStatusInput struct { // call.) NextToken *string `min:"1" type:"string"` - // The identifiers of the WorkSpaces. + // The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces. WorkspaceIds []*string `min:"1" type:"list"` } @@ -2114,6 +3289,72 @@ func (s *DescribeWorkspacesOutput) SetWorkspaces(v []*Workspace) *DescribeWorksp return s } +type DisassociateIpGroupsInput struct { + _ struct{} `type:"structure"` + + // The ID of the directory. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The IDs of one or more IP access control groups. + // + // GroupIds is a required field + GroupIds []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DisassociateIpGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateIpGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateIpGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateIpGroupsInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.GroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DisassociateIpGroupsInput) SetDirectoryId(v string) *DisassociateIpGroupsInput { + s.DirectoryId = &v + return s +} + +// SetGroupIds sets the GroupIds field's value. +func (s *DisassociateIpGroupsInput) SetGroupIds(v []*string) *DisassociateIpGroupsInput { + s.GroupIds = v + return s +} + +type DisassociateIpGroupsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateIpGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateIpGroupsOutput) GoString() string { + return s.String() +} + // Information about a WorkSpace that could not be created. type FailedCreateWorkspaceRequest struct { _ struct{} `type:"structure"` @@ -2200,6 +3441,90 @@ func (s *FailedWorkspaceChangeRequest) SetWorkspaceId(v string) *FailedWorkspace return s } +// Information about an IP access control group. +type IpGroup struct { + _ struct{} `type:"structure"` + + // The description of the group. + GroupDesc *string `locationName:"groupDesc" type:"string"` + + // The ID of the group. + GroupId *string `locationName:"groupId" type:"string"` + + // The name of the group. + GroupName *string `locationName:"groupName" type:"string"` + + // The rules. + UserRules []*IpRuleItem `locationName:"userRules" type:"list"` +} + +// String returns the string representation +func (s IpGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpGroup) GoString() string { + return s.String() +} + +// SetGroupDesc sets the GroupDesc field's value. +func (s *IpGroup) SetGroupDesc(v string) *IpGroup { + s.GroupDesc = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *IpGroup) SetGroupId(v string) *IpGroup { + s.GroupId = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *IpGroup) SetGroupName(v string) *IpGroup { + s.GroupName = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *IpGroup) SetUserRules(v []*IpRuleItem) *IpGroup { + s.UserRules = v + return s +} + +// Information about a rule for an IP access control group. +type IpRuleItem struct { + _ struct{} `type:"structure"` + + // The IP address range, in CIDR notation. + IpRule *string `locationName:"ipRule" type:"string"` + + // The description. + RuleDesc *string `locationName:"ruleDesc" type:"string"` +} + +// String returns the string representation +func (s IpRuleItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpRuleItem) GoString() string { + return s.String() +} + +// SetIpRule sets the IpRule field's value. +func (s *IpRuleItem) SetIpRule(v string) *IpRuleItem { + s.IpRule = &v + return s +} + +// SetRuleDesc sets the RuleDesc field's value. +func (s *IpRuleItem) SetRuleDesc(v string) *IpRuleItem { + s.RuleDesc = &v + return s +} + // Information about a WorkSpace modification. type ModificationState struct { _ struct{} `type:"structure"` @@ -2299,11 +3624,77 @@ func (s ModifyWorkspacePropertiesOutput) GoString() string { return s.String() } +type ModifyWorkspaceStateInput struct { + _ struct{} `type:"structure"` + + // The ID of the WorkSpace. + // + // WorkspaceId is a required field + WorkspaceId *string `type:"string" required:"true"` + + // The WorkSpace state. + // + // WorkspaceState is a required field + WorkspaceState *string `type:"string" required:"true" enum:"TargetWorkspaceState"` +} + +// String returns the string representation +func (s ModifyWorkspaceStateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyWorkspaceStateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyWorkspaceStateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspaceStateInput"} + if s.WorkspaceId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) + } + if s.WorkspaceState == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceState")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *ModifyWorkspaceStateInput) SetWorkspaceId(v string) *ModifyWorkspaceStateInput { + s.WorkspaceId = &v + return s +} + +// SetWorkspaceState sets the WorkspaceState field's value. +func (s *ModifyWorkspaceStateInput) SetWorkspaceState(v string) *ModifyWorkspaceStateInput { + s.WorkspaceState = &v + return s +} + +type ModifyWorkspaceStateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ModifyWorkspaceStateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyWorkspaceStateOutput) GoString() string { + return s.String() +} + // Information used to reboot a WorkSpace. type RebootRequest struct { _ struct{} `type:"structure"` - // The identifier of the WorkSpace. + // The ID of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -2341,7 +3732,7 @@ func (s *RebootRequest) SetWorkspaceId(v string) *RebootRequest { type RebootWorkspacesInput struct { _ struct{} `type:"structure"` - // The WorkSpaces to reboot. + // The WorkSpaces to reboot. You can specify up to 25 WorkSpaces. // // RebootWorkspaceRequests is a required field RebootWorkspaceRequests []*RebootRequest `min:"1" type:"list" required:"true"` @@ -2416,7 +3807,7 @@ func (s *RebootWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeReq type RebuildRequest struct { _ struct{} `type:"structure"` - // The identifier of the WorkSpace. + // The ID of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -2454,7 +3845,7 @@ func (s *RebuildRequest) SetWorkspaceId(v string) *RebuildRequest { type RebuildWorkspacesInput struct { _ struct{} `type:"structure"` - // The WorkSpaces to rebuild. + // The WorkSpace to rebuild. You can specify a single WorkSpace. // // RebuildWorkspaceRequests is a required field RebuildWorkspaceRequests []*RebuildRequest `min:"1" type:"list" required:"true"` @@ -2505,7 +3896,7 @@ func (s *RebuildWorkspacesInput) SetRebuildWorkspaceRequests(v []*RebuildRequest type RebuildWorkspacesOutput struct { _ struct{} `type:"structure"` - // Information about the WorkSpaces that could not be rebuilt. + // Information about the WorkSpace if it could not be rebuilt. FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` } @@ -2525,6 +3916,72 @@ func (s *RebuildWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRe return s } +type RevokeIpRulesInput struct { + _ struct{} `type:"structure"` + + // The ID of the group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` + + // The rules to remove from the group. + // + // UserRules is a required field + UserRules []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s RevokeIpRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeIpRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeIpRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeIpRulesInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.UserRules == nil { + invalidParams.Add(request.NewErrParamRequired("UserRules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *RevokeIpRulesInput) SetGroupId(v string) *RevokeIpRulesInput { + s.GroupId = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *RevokeIpRulesInput) SetUserRules(v []*string) *RevokeIpRulesInput { + s.UserRules = v + return s +} + +type RevokeIpRulesOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RevokeIpRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeIpRulesOutput) GoString() string { + return s.String() +} + // Information about the root volume for a WorkSpace bundle. type RootStorage struct { _ struct{} `type:"structure"` @@ -2576,7 +4033,7 @@ func (s *StartRequest) SetWorkspaceId(v string) *StartRequest { type StartWorkspacesInput struct { _ struct{} `type:"structure"` - // The WorkSpaces to start. + // The WorkSpaces to start. You can specify up to 25 WorkSpaces. // // StartWorkspaceRequests is a required field StartWorkspaceRequests []*StartRequest `min:"1" type:"list" required:"true"` @@ -2664,7 +4121,7 @@ func (s *StopRequest) SetWorkspaceId(v string) *StopRequest { type StopWorkspacesInput struct { _ struct{} `type:"structure"` - // The WorkSpaces to stop. + // The WorkSpaces to stop. You can specify up to 25 WorkSpaces. // // StopWorkspaceRequests is a required field StopWorkspaceRequests []*StopRequest `min:"1" type:"list" required:"true"` @@ -2780,7 +4237,7 @@ func (s *Tag) SetValue(v string) *Tag { type TerminateRequest struct { _ struct{} `type:"structure"` - // The identifier of the WorkSpace. + // The ID of the WorkSpace. // // WorkspaceId is a required field WorkspaceId *string `type:"string" required:"true"` @@ -2818,7 +4275,7 @@ func (s *TerminateRequest) SetWorkspaceId(v string) *TerminateRequest { type TerminateWorkspacesInput struct { _ struct{} `type:"structure"` - // The WorkSpaces to terminate. + // The WorkSpaces to terminate. You can specify up to 25 WorkSpaces. // // TerminateWorkspaceRequests is a required field TerminateWorkspaceRequests []*TerminateRequest `min:"1" type:"list" required:"true"` @@ -2889,6 +4346,72 @@ func (s *TerminateWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChange return s } +type UpdateRulesOfIpGroupInput struct { + _ struct{} `type:"structure"` + + // The ID of the group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` + + // One or more rules. + // + // UserRules is a required field + UserRules []*IpRuleItem `type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateRulesOfIpGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRulesOfIpGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRulesOfIpGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRulesOfIpGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.UserRules == nil { + invalidParams.Add(request.NewErrParamRequired("UserRules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *UpdateRulesOfIpGroupInput) SetGroupId(v string) *UpdateRulesOfIpGroupInput { + s.GroupId = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *UpdateRulesOfIpGroupInput) SetUserRules(v []*IpRuleItem) *UpdateRulesOfIpGroupInput { + s.UserRules = v + return s +} + +type UpdateRulesOfIpGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateRulesOfIpGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRulesOfIpGroupOutput) GoString() string { + return s.String() +} + // Information about the user storage for a WorkSpace bundle. type UserStorage struct { _ struct{} `type:"structure"` @@ -3195,8 +4718,8 @@ func (s *WorkspaceConnectionStatus) SetWorkspaceId(v string) *WorkspaceConnectio return s } -// Contains information about an AWS Directory Service directory for use with -// Amazon WorkSpaces. +// Information about an AWS Directory Service directory for use with Amazon +// WorkSpaces. type WorkspaceDirectory struct { _ struct{} `type:"structure"` @@ -3222,6 +4745,9 @@ type WorkspaceDirectory struct { // to make calls to other services, such as Amazon EC2, on your behalf. IamRoleId *string `type:"string"` + // The identifiers of the IP access control groups associated with the directory. + IpGroupIds []*string `locationName:"ipGroupIds" type:"list"` + // The registration code for the directory. This is the code that users enter // in their Amazon WorkSpaces client application to connect to the directory. RegistrationCode *string `min:"1" type:"string"` @@ -3291,6 +4817,12 @@ func (s *WorkspaceDirectory) SetIamRoleId(v string) *WorkspaceDirectory { return s } +// SetIpGroupIds sets the IpGroupIds field's value. +func (s *WorkspaceDirectory) SetIpGroupIds(v []*string) *WorkspaceDirectory { + s.IpGroupIds = v + return s +} + // SetRegistrationCode sets the RegistrationCode field's value. func (s *WorkspaceDirectory) SetRegistrationCode(v string) *WorkspaceDirectory { s.RegistrationCode = &v @@ -3566,6 +5098,14 @@ const ( RunningModeAlwaysOn = "ALWAYS_ON" ) +const ( + // TargetWorkspaceStateAvailable is a TargetWorkspaceState enum value + TargetWorkspaceStateAvailable = "AVAILABLE" + + // TargetWorkspaceStateAdminMaintenance is a TargetWorkspaceState enum value + TargetWorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE" +) + const ( // WorkspaceDirectoryStateRegistering is a WorkspaceDirectoryState enum value WorkspaceDirectoryStateRegistering = "REGISTERING" @@ -3616,6 +5156,9 @@ const ( // WorkspaceStateMaintenance is a WorkspaceState enum value WorkspaceStateMaintenance = "MAINTENANCE" + // WorkspaceStateAdminMaintenance is a WorkspaceState enum value + WorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE" + // WorkspaceStateTerminating is a WorkspaceState enum value WorkspaceStateTerminating = "TERMINATING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go index 78fcbedb2b2..2083335b777 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go @@ -19,7 +19,7 @@ const ( // ErrCodeInvalidResourceStateException for service response error code // "InvalidResourceStateException". // - // The state of the WorkSpace is not valid for this operation. + // The state of the resource is not valid for this operation. ErrCodeInvalidResourceStateException = "InvalidResourceStateException" // ErrCodeOperationInProgressException for service response error code @@ -29,6 +29,30 @@ const ( // in a moment. ErrCodeOperationInProgressException = "OperationInProgressException" + // ErrCodeOperationNotSupportedException for service response error code + // "OperationNotSupportedException". + // + // This operation is not supported. + ErrCodeOperationNotSupportedException = "OperationNotSupportedException" + + // ErrCodeResourceAlreadyExistsException for service response error code + // "ResourceAlreadyExistsException". + // + // The specified resource already exists. + ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" + + // ErrCodeResourceAssociatedException for service response error code + // "ResourceAssociatedException". + // + // The resource is associated with a directory. + ErrCodeResourceAssociatedException = "ResourceAssociatedException" + + // ErrCodeResourceCreationFailedException for service response error code + // "ResourceCreationFailedException". + // + // The resource could not be created. + ErrCodeResourceCreationFailedException = "ResourceCreationFailedException" + // ErrCodeResourceLimitExceededException for service response error code // "ResourceLimitExceededException". // diff --git a/vendor/vendor.json b/vendor/vendor.json index 9d33669c403..c4e69d1bac9 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,916 +39,916 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "Mn7rZP6y2VKFyogE4/J/uvfHR7E=", + "checksumSHA1": "7TqQymwKnKWZuiNS62pUG6E7CgY=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "n2pGWBtTzupMkJrj1UKU67rU0/c=", + "checksumSHA1": "MIYMbcTonoSpdxgGHs7wn2EN3Dc=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "CntJM8T3dRgC0e1i66CIbP8uCSY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=", + "checksumSHA1": "6zosteWJqUGM9+t9dkANQymMA9s=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "krjKYP+Z5qrFgZkHccphnuPdYd0=", + "checksumSHA1": "yqQRtxoLmiwe3lUvTx81hxfy+S0=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "WliJXTogdly9qe5xEV6Fn2zklcs=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "rQmpNRto8bpB17qNubhGzRh/Aj8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "7o1gMXoE8cemDzkZFUrQknQS4Yo=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "s0TQJfF7ZqeS9IH4hdvX5EQk2l8=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "YlKOG1eZClZYmcRwJQO+LfEQrVY=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "58ARAtV4EKAIv5zpieVjvJMFjO0=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "s6of5mfMFZtYy6BRo/tIafylOUc=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "MJPsaJkyrCml4VZOsbNGo9Fl0C8=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "AQGPL+fXjjKhBmyb37QAG05R/Qw=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "NU6AqUCd5TOrxaqFdWmo8l2oeOI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "hCz5z7QQz1416cCjbhjGjvbrdpY=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "8PdtKqSEcLQ1V0Gnl2FAHJoOQy0=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "kM7Fxkb1OdCiOOmTlRIadqnsdt0=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "pKJec2iJiKDSY5UKmLSeYxLxucg=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "BD7EvXghMHMw52wtxISIhpJ4CTk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "6Q9ZHEAsu92jsFOCwJAI+SjYYAk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "YNl9xTPOb1SFVmwXDtmwzyGsx8U=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "p/I/GLsXOoZ0XdhDuSQ+lP4NlYM=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "4KiQdvEfpTf2g+UF2rWlLg/kgok=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "mLFFVXyhKLYgoKSJ17URM/GXdNc=", + "checksumSHA1": "vT7k8uQ7ZfBVVJIYc/Yxui+yWI8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "bh5IjjK9tKextJTq+gLV+6zhmL8=", + "checksumSHA1": "5uQsnuE2bMWQ2ypmll1rzXyNqPw=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "cx2wG4c6Q5gSTsAU6D/UZMQN/Kg=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "k4lfEcz91J29Wax6GPBlUUQb5bk=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "qrxVu09idcoHIT2HqDJIbV3weUE=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "FEUIC6EG3tPnTuvmIsV4b3r9D+k=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "I5sSvXLvlj9Ppv0HCbFXdN4tqn4=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "WMCgYV6S5ZeQo6pjIFTStdmBVcg=", + "checksumSHA1": "/Wa2paWfntnF+4pRSsgMffedplE=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "hurqUivjVxLHaXEd2oS8JrwMGQs=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "zxX7V0AIU1x2yX5Uyd9RMe0C3ok=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "Ae8sc+KEu6BMw89WRwaq4Ol/87g=", + "checksumSHA1": "mJR+NQiCTZGMy+eaCzbP4sEnX6w=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "12jA2n3aIJzdwvOxl+dvtx5S4CI=", + "checksumSHA1": "OYW6KOQn3+mHCHpqhlZOUsFEpUE=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "V3D5pDdtXS0yVShpS/fOqFGxCrA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "7igFr0esmtcs9V0F9iMs2k5uNDI=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "PQnfXJ0ZQIIMiqUUFs4bkUPHqnc=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "pZoO4JKc/TJACuq1n9IHuhovD4k=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "s0INIDkP10AOmJkmTpCHpazIwUw=", + "checksumSHA1": "Z2ql82q2CJ3AXQ/Wi+3jhkpXmt0=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "BSSURh/ALTj0QW5BWPJkW3i+FN0=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "JpvcQ+tc0yz2WZ0ne6zzxlbfscI=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "MgdGxbP8vjCkzkj1ukmU5Uqh3UA=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "hgqHUngsP+NPjkZVqevXuioHnkE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "OQuas8ovzB34Yb2bCMBDsu8teu4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "hUosfOQhleGpv6UWGnbDf/eB5Ts=", + "checksumSHA1": "P9J4eI4+Bde2V4P5SbQ5yrkC4v8=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "4DYLn0HnMhZvXXgx6VjbS/V0srA=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "UPwhm+XWgDTDZ4wUziP+9RHOozg=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "N1F3vRsnxAZyfr4v7iK+MagWuGU=", + "checksumSHA1": "pOhtcgvfgH3qPUiqZrBgpawiu8I=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "2bqJtsfs1LDLLhczU/SNtmvkjcw=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "YZJXefe33AjqEWaIm8ufdQc0atE=", + "checksumSHA1": "cP4Rz6mIrnYIGYX8CKgZlZD0oPA=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "DHrIPXQ0QzjE+Hnfwk0INR4rUkU=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "pvrqgHDeZ3gAHIiZyZfwXOi9GD4=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "TpvdN/5q0qLBHZhQQlB4cyQOxR4=", + "checksumSHA1": "lKGIKcPcMErM1NJdXBsHLic1E8w=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "zdG3e3bdyNaBuApO06pygeSJsJ4=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "zmOo5EeLSGFEuIBiRQsVd4+SBJ0=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "nlvFlqVKHyuyYHG88H3Yt/OA1e0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "AO97b1GChOs2geiFc//6YcpVfX8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "jyxQ6TEdSl9/j7qC0LCkVMSXkog=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "lKyAXJ4S6uXuSR1/pQ9gCGHYSLI=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "eYt7GSKmi5G+h1R+Y1qIbs2Zn4o=", + "checksumSHA1": "NVSUO8GRtIWDm7IexnBSmQWvBh8=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "ETmB3lf15r4sn18bB9ilBQVXto4=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "I1sxeu8aJOiM3a5/tnJya8blE3A=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "AnipOpUAJroLkoknx4xacrO0qSA=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "lAweYYdjcZ6acj6oI3HI9hX3eIQ=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "X/WdGuHGMxRCvufmQxstVjdbFT4=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "smOJ/rypXb18/Rjryf2a85paSa4=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "vL235vodhgG61BkUxRD4B7io+zk=", + "checksumSHA1": "l3VeRGYSCtkXBvqVNVwRqb03Jko=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "kapXC7OZ1fnkZ3N6p19+WUafn40=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "Hi/sxx81pqe+fI5VrS5+UK2DsDU=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "KidzwXO5VKKI9zIuTAUsuF7KxIM=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "HtsbSppcf5M5q+zrbhJqcFlVN5I=", + "checksumSHA1": "OUQpREA6ZLi/zTX4vZc56+ZoZLI=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "p1xuYwYaBe6v4ORN6IgBG3zQGrc=", + "checksumSHA1": "A4o0zzrS7xtyYrmbeAKvda7Wyco=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "cyCJGeDReKwRq69kTcd4lozkuIg=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "NLj37wyUZIo8/Rp3zp+LDfr878M=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "nXAp7K8BCFvsaSdorGV7swBEQgA=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "q4qCE/5OiBJA1k8P0jQRx9UhKvs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "hAIPfcEcdc8xJ7MseIufmssdE/s=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "1Fin0tclPDC/+rL7V06GrzXaMXI=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "T8ABBS2aS6yRTD6w3kjpgFLe/Zw=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "mS1K6ch7/XVpXDOI5//FqSeI/f0=", + "checksumSHA1": "q5ApQXXApBOPXOYOLDOetdC4MNw=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "llx3DydC0nTbF0cZoYUjO9P1eZw=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "i1yLjEKjcDxm0rakhcaDuAcQb7I=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "Mf9nXjY0+Lq5RxEGEIYCYL8u+Kc=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "iRNs3RoLjrzcBsPrSynhbEqY/4s=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { - "checksumSHA1": "z1UVKeq050lEoz9dgu/itKRc900=", + "checksumSHA1": "LzD/Yb1Xzc4OPKZZadOGV2fpQto=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "9b0098a71f6d4d473a26ec8ad3c2feaac6eb1da6", - "revisionTime": "2018-04-10T22:21:50Z", - "version": "v1.13.32", - "versionExact": "v1.13.32" + "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", + "revisionTime": "2018-05-02T20:08:43Z", + "version": "v1.13.40", + "versionExact": "v1.13.40" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 530c01bdfd689bf1549ffed8a2d85ff9bd6dc2e3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 2 May 2018 16:44:59 -0400 Subject: [PATCH 0941/3316] Update CHANGELOG for #4406 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 406a1dabc91..c978b699795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ ENHANCEMENTS: * resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] * resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] * resource/aws_default_subnet: Allow `map_public_ip_on_launch` updates [GH-4396] +* resource/aws_dms_endpoint: Support `mongodb` engine_name and `mongodb_settings` argument [GH-4406] * resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] * resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument [GH-4390] * resource/aws_ecs_service: Allow `health_check_grace_period_seconds` up to 7200 seconds [GH-4420] From 1e808cffc29e636a34450dfba09305f0c8bffa4a Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 2 May 2018 20:59:02 +0000 Subject: [PATCH 0942/3316] v1.17.0 --- CHANGELOG.md | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c978b699795..e0e0216fb5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.17.0 (Unreleased) +## 1.17.0 (May 02, 2018) NOTES: @@ -6,39 +6,39 @@ NOTES: FEATURES: -* **New Data Source:** `aws_mq_broker` [GH-3163] -* **New Resource:** `aws_budgets_budget` [GH-1879] -* **New Resource:** `aws_iam_user_group_membership` [GH-3365] -* **New Resource:** `aws_vpc_peering_connection_options` [GH-3909] +* **New Data Source:** `aws_mq_broker` ([#3163](https://github.com/terraform-providers/terraform-provider-aws/issues/3163)) +* **New Resource:** `aws_budgets_budget` ([#1879](https://github.com/terraform-providers/terraform-provider-aws/issues/1879)) +* **New Resource:** `aws_iam_user_group_membership` ([#3365](https://github.com/terraform-providers/terraform-provider-aws/issues/3365)) +* **New Resource:** `aws_vpc_peering_connection_options` ([#3909](https://github.com/terraform-providers/terraform-provider-aws/issues/3909)) ENHANCEMENTS: -* data-source/aws_route53_zone: Add `name_servers` attribute [GH-4336] -* resource/aws_api_gateway_stage: Add `access_log_settings` argument (Support access logging) [GH-4369] -* resource/aws_autoscaling_group: Add `launch_template` argument [GH-4305] -* resource/aws_batch_job_definition: Add `timeout` argument [GH-4386] -* resource/aws_cloudwatch_event_rule: Add `name_prefix` argument [GH-2752] -* resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) [GH-2752] -* resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) [GH-4324] -* resource/aws_default_subnet: Allow `map_public_ip_on_launch` updates [GH-4396] -* resource/aws_dms_endpoint: Support `mongodb` engine_name and `mongodb_settings` argument [GH-4406] -* resource/aws_dynamodb_table: Add `point_in_time_recovery` argument [GH-4063] -* resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument [GH-4390] -* resource/aws_ecs_service: Allow `health_check_grace_period_seconds` up to 7200 seconds [GH-4420] -* resource/aws_lambda_permission: Add `statement_id_prefix` argument [GH-2743] -* resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) [GH-2743] -* resource/aws_rds_cluster: Add `s3_import` argument (Support MySQL Backup Restore from S3) [GH-4366] -* resource/aws_vpc_peering_connection: Support configurable timeouts [GH-3909] +* data-source/aws_route53_zone: Add `name_servers` attribute ([#4336](https://github.com/terraform-providers/terraform-provider-aws/issues/4336)) +* resource/aws_api_gateway_stage: Add `access_log_settings` argument (Support access logging) ([#4369](https://github.com/terraform-providers/terraform-provider-aws/issues/4369)) +* resource/aws_autoscaling_group: Add `launch_template` argument ([#4305](https://github.com/terraform-providers/terraform-provider-aws/issues/4305)) +* resource/aws_batch_job_definition: Add `timeout` argument ([#4386](https://github.com/terraform-providers/terraform-provider-aws/issues/4386)) +* resource/aws_cloudwatch_event_rule: Add `name_prefix` argument ([#2752](https://github.com/terraform-providers/terraform-provider-aws/issues/2752)) +* resource/aws_cloudwatch_event_rule: Make `name` optional (Terraform can generate unique ID) ([#2752](https://github.com/terraform-providers/terraform-provider-aws/issues/2752)) +* resource/aws_codedeploy_deployment_group: Add `ec2_tag_set` argument (tag group support) ([#4324](https://github.com/terraform-providers/terraform-provider-aws/issues/4324)) +* resource/aws_default_subnet: Allow `map_public_ip_on_launch` updates ([#4396](https://github.com/terraform-providers/terraform-provider-aws/issues/4396)) +* resource/aws_dms_endpoint: Support `mongodb` engine_name and `mongodb_settings` argument ([#4406](https://github.com/terraform-providers/terraform-provider-aws/issues/4406)) +* resource/aws_dynamodb_table: Add `point_in_time_recovery` argument ([#4063](https://github.com/terraform-providers/terraform-provider-aws/issues/4063)) +* resource/aws_ecs_service: Add `ordered_placement_strategy` argument, deprecate `placement_strategy` argument ([#4390](https://github.com/terraform-providers/terraform-provider-aws/issues/4390)) +* resource/aws_ecs_service: Allow `health_check_grace_period_seconds` up to 7200 seconds ([#4420](https://github.com/terraform-providers/terraform-provider-aws/issues/4420)) +* resource/aws_lambda_permission: Add `statement_id_prefix` argument ([#2743](https://github.com/terraform-providers/terraform-provider-aws/issues/2743)) +* resource/aws_lambda_permission: Make `statement_id` optional (Terraform can generate unique ID) ([#2743](https://github.com/terraform-providers/terraform-provider-aws/issues/2743)) +* resource/aws_rds_cluster: Add `s3_import` argument (Support MySQL Backup Restore from S3) ([#4366](https://github.com/terraform-providers/terraform-provider-aws/issues/4366)) +* resource/aws_vpc_peering_connection: Support configurable timeouts ([#3909](https://github.com/terraform-providers/terraform-provider-aws/issues/3909)) BUG FIXES: -* data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] -* resource/aws_iam_group_policy: Properly handle generated policy name updates [GH-4379] -* resource/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call [GH-4362] -* resource/aws_launch_template: Appropriately set `security_groups` in network interfaces [GH-4364] -* resource/aws_rds_cluster: Add retries for IAM eventual consistency [GH-4371] -* resource/aws_rds_cluster_instance: Add retries for IAM eventual consistency [GH-4370] -* resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one [GH-4341] +* data-source/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call ([#4362](https://github.com/terraform-providers/terraform-provider-aws/issues/4362)) +* resource/aws_iam_group_policy: Properly handle generated policy name updates ([#4379](https://github.com/terraform-providers/terraform-provider-aws/issues/4379)) +* resource/aws_instance: Bypass `UnsupportedOperation` errors with `DescribeInstanceCreditSpecifications` call ([#4362](https://github.com/terraform-providers/terraform-provider-aws/issues/4362)) +* resource/aws_launch_template: Appropriately set `security_groups` in network interfaces ([#4364](https://github.com/terraform-providers/terraform-provider-aws/issues/4364)) +* resource/aws_rds_cluster: Add retries for IAM eventual consistency ([#4371](https://github.com/terraform-providers/terraform-provider-aws/issues/4371)) +* resource/aws_rds_cluster_instance: Add retries for IAM eventual consistency ([#4370](https://github.com/terraform-providers/terraform-provider-aws/issues/4370)) +* resource/aws_route53_zone: Add domain name to CallerReference to prevent creation issues with count greater than one ([#4341](https://github.com/terraform-providers/terraform-provider-aws/issues/4341)) ## 1.16.0 (April 25, 2018) From e511e1b046e1bbcbadb0e4721d29e40f859be04b Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 2 May 2018 21:05:23 +0000 Subject: [PATCH 0943/3316] Cleanup after v1.17.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0e0216fb5d..3dbd2bb04b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.18.0 (Unreleased) ## 1.17.0 (May 02, 2018) NOTES: From fc1c70509e07d8998781973798348fb83187906c Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 2 May 2018 21:59:11 -0400 Subject: [PATCH 0944/3316] Paginate auto-scaling groups. [Fixes #4422] --- aws/data_source_aws_autoscaling_groups.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/aws/data_source_aws_autoscaling_groups.go b/aws/data_source_aws_autoscaling_groups.go index 012195e1799..fc4154159eb 100644 --- a/aws/data_source_aws_autoscaling_groups.go +++ b/aws/data_source_aws_autoscaling_groups.go @@ -65,16 +65,14 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} raw[i] = *v.ResourceId } } else { - - resp, err := conn.DescribeAutoScalingGroups(&autoscaling.DescribeAutoScalingGroupsInput{}) - if err != nil { + if err := conn.DescribeAutoScalingGroupsPages(&autoscaling.DescribeAutoScalingGroupsInput{}, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { + for _, group := range resp.AutoScalingGroups { + raw = append(raw, *group.AutoScalingGroupName) + } + return true + }); err != nil { return fmt.Errorf("Error fetching Autoscaling Groups: %s", err) } - - raw = make([]string, len(resp.AutoScalingGroups)) - for i, v := range resp.AutoScalingGroups { - raw[i] = *v.AutoScalingGroupName - } } sort.Strings(raw) From f454f542b6d6576772cfa3f227fab52442506ef2 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 2 May 2018 22:59:46 -0400 Subject: [PATCH 0945/3316] Allow autoscaling group tests to run in multiple regions. --- ...data_source_aws_autoscaling_groups_test.go | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/aws/data_source_aws_autoscaling_groups_test.go b/aws/data_source_aws_autoscaling_groups_test.go index 3a6ba764480..67a478c59bf 100644 --- a/aws/data_source_aws_autoscaling_groups_test.go +++ b/aws/data_source_aws_autoscaling_groups_test.go @@ -81,13 +81,29 @@ func testAccCheckAwsAutoscalingGroupsAvailable(attrs map[string]string) ([]strin func testAccCheckAwsAutoscalingGroupsConfig(rInt1, rInt2, rInt3 int) string { return fmt.Sprintf(` +data "aws_ami" "test_ami" { + most_recent = true + + filter { + name = "owner-alias" + values = ["amazon"] + } + + filter { + name = "name" + values = ["amzn-ami-hvm-*-x86_64-gp2"] + } +} + +data "aws_availability_zones" "available" {} + resource "aws_launch_configuration" "foobar" { - image_id = "ami-21f78e11" + image_id = "${data.aws_ami.test_ami.id}" instance_type = "t1.micro" } resource "aws_autoscaling_group" "bar" { - availability_zones = ["us-west-2a"] + availability_zones = ["${data.aws_availability_zones.available.names[0]}"] name = "test-asg-%d" max_size = 1 min_size = 0 @@ -105,7 +121,7 @@ resource "aws_autoscaling_group" "bar" { } resource "aws_autoscaling_group" "foo" { - availability_zones = ["us-west-2b"] + availability_zones = ["${data.aws_availability_zones.available.names[1]}"] name = "test-asg-%d" max_size = 1 min_size = 0 @@ -123,7 +139,7 @@ resource "aws_autoscaling_group" "foo" { } resource "aws_autoscaling_group" "barbaz" { - availability_zones = ["us-west-2c"] + availability_zones = ["${data.aws_availability_zones.available.names[2]}"] name = "test-asg-%d" max_size = 1 min_size = 0 @@ -143,13 +159,29 @@ resource "aws_autoscaling_group" "barbaz" { func testAccCheckAwsAutoscalingGroupsConfigWithDataSource(rInt1, rInt2, rInt3 int) string { return fmt.Sprintf(` +data "aws_ami" "test_ami" { + most_recent = true + + filter { + name = "owner-alias" + values = ["amazon"] + } + + filter { + name = "name" + values = ["amzn-ami-hvm-*-x86_64-gp2"] + } +} + +data "aws_availability_zones" "available" {} + resource "aws_launch_configuration" "foobar" { - image_id = "ami-21f78e11" + image_id = "${data.aws_ami.test_ami.id}" instance_type = "t1.micro" } resource "aws_autoscaling_group" "bar" { - availability_zones = ["us-west-2a"] + availability_zones = ["${data.aws_availability_zones.available.names[0]}"] name = "test-asg-%d" max_size = 1 min_size = 0 @@ -167,7 +199,7 @@ resource "aws_autoscaling_group" "bar" { } resource "aws_autoscaling_group" "foo" { - availability_zones = ["us-west-2b"] + availability_zones = ["${data.aws_availability_zones.available.names[1]}"] name = "test-asg-%d" max_size = 1 min_size = 0 @@ -185,7 +217,7 @@ resource "aws_autoscaling_group" "foo" { } resource "aws_autoscaling_group" "barbaz" { - availability_zones = ["us-west-2c"] + availability_zones = ["${data.aws_availability_zones.available.names[2]}"] name = "test-asg-%d" max_size = 1 min_size = 0 From 02d074b242dd7a03092d936b86131e43299c56d2 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Thu, 3 May 2018 08:59:57 +0100 Subject: [PATCH 0946/3316] Add account ID to the SSM document ARN Without the account ID being specified if the ARN output is used as an allowed resource in an IAM policy then the IAM policy doesn't match the document and you get a permissions error from IAM when executing the document. --- aws/resource_aws_ssm_document.go | 1 + aws/resource_aws_ssm_document_test.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/aws/resource_aws_ssm_document.go b/aws/resource_aws_ssm_document.go index 23f7facad9d..ac7e15fc1b6 100644 --- a/aws/resource_aws_ssm_document.go +++ b/aws/resource_aws_ssm_document.go @@ -225,6 +225,7 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error Partition: meta.(*AWSClient).partition, Service: "ssm", Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, Resource: fmt.Sprintf("document/%s", *doc.Name), }.String() if err := d.Set("arn", arn); err != nil { diff --git a/aws/resource_aws_ssm_document_test.go b/aws/resource_aws_ssm_document_test.go index c128e5423ca..e11eed96314 100644 --- a/aws/resource_aws_ssm_document_test.go +++ b/aws/resource_aws_ssm_document_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -24,6 +25,8 @@ func TestAccAWSSSMDocument_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMDocumentExists("aws_ssm_document.foo"), resource.TestCheckResourceAttr("aws_ssm_document.foo", "document_format", "JSON"), + resource.TestMatchResourceAttr("aws_ssm_document.foo", "arn", + regexp.MustCompile(`^arn:aws:ssm:[a-z]{2}-[a-z]+-\d{1}:\d{12}:document/.*$`)), ), }, }, From ac243ab816d93c3aba1643e8e159f371f6786d89 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 3 May 2018 19:56:02 -0400 Subject: [PATCH 0947/3316] tests: Bypass missing endpoints and UnsupportedOperation for sweepers --- aws/import_aws_lambda_function_test.go | 4 ++++ aws/provider_test.go | 14 ++++++++++++++ aws/resource_aws_api_gateway_rest_api_test.go | 4 ++++ aws/resource_aws_autoscaling_group_test.go | 4 ++++ aws/resource_aws_batch_compute_environment_test.go | 4 ++++ aws/resource_aws_batch_job_queue_test.go | 4 ++++ aws/resource_aws_cloudfront_distribution_test.go | 4 ++++ aws/resource_aws_dax_cluster_test.go | 6 ++++++ aws/resource_aws_db_instance_test.go | 4 ++++ aws/resource_aws_db_option_group_test.go | 4 ++++ aws/resource_aws_dynamodb_table_test.go | 4 ++++ ...ource_aws_elastic_beanstalk_application_test.go | 4 ++++ ...ource_aws_elastic_beanstalk_environment_test.go | 4 ++++ aws/resource_aws_elasticache_cluster_test.go | 10 +++++++++- ...ource_aws_elasticache_replication_group_test.go | 10 +++++++++- aws/resource_aws_elasticsearch_domain_test.go | 4 ++++ aws/resource_aws_elb_test.go | 10 +++++++++- aws/resource_aws_gamelift_alias_test.go | 4 ++++ aws/resource_aws_gamelift_build_test.go | 4 ++++ aws/resource_aws_gamelift_fleet_test.go | 10 +++++++--- aws/resource_aws_glue_connection_test.go | 4 ++++ aws/resource_aws_glue_job_test.go | 4 ++++ aws/resource_aws_iam_server_certificate_test.go | 4 ++++ aws/resource_aws_iam_service_linked_role_test.go | 4 ++++ aws/resource_aws_internet_gateway_test.go | 4 ++++ aws/resource_aws_key_pair_test.go | 4 ++++ aws/resource_aws_kms_key_test.go | 4 ++++ aws/resource_aws_launch_configuration_test.go | 4 ++++ aws/resource_aws_mq_broker_test.go | 4 ++++ aws/resource_aws_nat_gateway_test.go | 4 ++++ aws/resource_aws_network_acl_test.go | 4 ++++ aws/resource_aws_redshift_cluster_test.go | 10 +++++++++- aws/resource_aws_secretsmanager_secret_test.go | 10 +++++++++- aws/resource_aws_security_group_test.go | 7 +++++++ aws/resource_aws_spot_fleet_request_test.go | 10 +++++++++- aws/resource_aws_subnet_test.go | 4 ++++ aws/resource_aws_vpc_test.go | 4 ++++ aws/resource_aws_vpn_gateway_test.go | 4 ++++ aws/resource_aws_waf_regex_match_set_test.go | 4 ++++ aws/resource_aws_waf_rule_group_test.go | 4 ++++ ...esource_aws_wafregional_regex_match_set_test.go | 4 ++++ aws/resource_aws_wafregional_rule_group_test.go | 4 ++++ 42 files changed, 216 insertions(+), 9 deletions(-) diff --git a/aws/import_aws_lambda_function_test.go b/aws/import_aws_lambda_function_test.go index d47a79b7121..903aac30995 100644 --- a/aws/import_aws_lambda_function_test.go +++ b/aws/import_aws_lambda_function_test.go @@ -28,6 +28,10 @@ func testSweepLambdaFunctions(region string) error { resp, err := lambdaconn.ListFunctions(&lambda.ListFunctionsInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Lambda Function sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving Lambda functions: %s", err) } diff --git a/aws/provider_test.go b/aws/provider_test.go index 61c206eab08..3a2b7674dbc 100644 --- a/aws/provider_test.go +++ b/aws/provider_test.go @@ -146,3 +146,17 @@ func testAccCheckWithProviders(f func(*terraform.State, *schema.Provider) error, return nil } } + +// Check sweeper API call error for reasons to skip sweeping +// These include missing API endpoints and unsupported API calls +func testSweepSkipSweepError(err error) bool { + // Ignore missing API endpoints + if isAWSErr(err, "RequestError", "send request failed") { + return true + } + // Ignore unsupported API calls + if isAWSErr(err, "UnsupportedOperation", "") { + return true + } + return false +} diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 51f98c2732f..22b3ad38267 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -71,6 +71,10 @@ func testSweepAPIGatewayRestApis(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping API Gateway REST API sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving API Gateway REST APIs: %s", err) } diff --git a/aws/resource_aws_autoscaling_group_test.go b/aws/resource_aws_autoscaling_group_test.go index 88e2a306683..a3f0df6fed9 100644 --- a/aws/resource_aws_autoscaling_group_test.go +++ b/aws/resource_aws_autoscaling_group_test.go @@ -36,6 +36,10 @@ func testSweepAutoscalingGroups(region string) error { resp, err := conn.DescribeAutoScalingGroups(&autoscaling.DescribeAutoScalingGroupsInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping AutoScaling Group sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving AutoScaling Groups in Sweeper: %s", err) } diff --git a/aws/resource_aws_batch_compute_environment_test.go b/aws/resource_aws_batch_compute_environment_test.go index 9225bd67ef0..565e7243958 100644 --- a/aws/resource_aws_batch_compute_environment_test.go +++ b/aws/resource_aws_batch_compute_environment_test.go @@ -38,6 +38,10 @@ func testSweepBatchComputeEnvironments(region string) error { out, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Batch Compute Environment sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving Batch Compute Environments: %s", err) } for _, computeEnvironment := range out.ComputeEnvironments { diff --git a/aws/resource_aws_batch_job_queue_test.go b/aws/resource_aws_batch_job_queue_test.go index 2af18c8386c..193f7085334 100644 --- a/aws/resource_aws_batch_job_queue_test.go +++ b/aws/resource_aws_batch_job_queue_test.go @@ -34,6 +34,10 @@ func testSweepBatchJobQueues(region string) error { out, err := conn.DescribeJobQueues(&batch.DescribeJobQueuesInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Batch Job Queue sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving Batch Job Queues: %s", err) } for _, jobQueue := range out.JobQueues { diff --git a/aws/resource_aws_cloudfront_distribution_test.go b/aws/resource_aws_cloudfront_distribution_test.go index 494f133866e..7431b752d0c 100644 --- a/aws/resource_aws_cloudfront_distribution_test.go +++ b/aws/resource_aws_cloudfront_distribution_test.go @@ -40,6 +40,10 @@ func testSweepCloudFrontDistributions(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping CloudFront Distribution sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error listing CloudFront Distributions: %s", err) } diff --git a/aws/resource_aws_dax_cluster_test.go b/aws/resource_aws_dax_cluster_test.go index cd5015cb057..d278c951d2f 100644 --- a/aws/resource_aws_dax_cluster_test.go +++ b/aws/resource_aws_dax_cluster_test.go @@ -30,6 +30,12 @@ func testSweepDAXClusters(region string) error { resp, err := conn.DescribeClusters(&dax.DescribeClustersInput{}) if err != nil { + // GovCloud (with no DAX support) has an endpoint that responds with: + // InvalidParameterValueException: Access Denied to API Version: DAX_V3 + if testSweepSkipSweepError(err) || isAWSErr(err, "InvalidParameterValueException", "Access Denied to API Version: DAX_V3") { + log.Printf("[WARN] Skipping DAX Cluster sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving DAX clusters: %s", err) } diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index 73e46704050..f197db8b2f2 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -74,6 +74,10 @@ func testSweepDbInstances(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping RDS DB Instance sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving DB instances: %s", err) } diff --git a/aws/resource_aws_db_option_group_test.go b/aws/resource_aws_db_option_group_test.go index 7031d9bdecf..c509a07ede4 100644 --- a/aws/resource_aws_db_option_group_test.go +++ b/aws/resource_aws_db_option_group_test.go @@ -35,6 +35,10 @@ func testSweepDbOptionGroups(region string) error { opts := rds.DescribeOptionGroupsInput{} resp, err := conn.DescribeOptionGroups(&opts) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping RDS DB Option Group sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("error describing DB Option Groups in Sweeper: %s", err) } diff --git a/aws/resource_aws_dynamodb_table_test.go b/aws/resource_aws_dynamodb_table_test.go index fb97cd497ac..2c687880275 100644 --- a/aws/resource_aws_dynamodb_table_test.go +++ b/aws/resource_aws_dynamodb_table_test.go @@ -54,6 +54,10 @@ func testSweepDynamoDbTables(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping DynamoDB Table sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving DynamoDB Tables: %s", err) } diff --git a/aws/resource_aws_elastic_beanstalk_application_test.go b/aws/resource_aws_elastic_beanstalk_application_test.go index 931adee60c0..1aca0bee270 100644 --- a/aws/resource_aws_elastic_beanstalk_application_test.go +++ b/aws/resource_aws_elastic_beanstalk_application_test.go @@ -32,6 +32,10 @@ func testSweepBeanstalkApplications(region string) error { resp, err := beanstalkconn.DescribeApplications(&elasticbeanstalk.DescribeApplicationsInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Elastic Beanstalk Application sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving beanstalk application: %s", err) } diff --git a/aws/resource_aws_elastic_beanstalk_environment_test.go b/aws/resource_aws_elastic_beanstalk_environment_test.go index df2775e9e2d..ee223b59b7b 100644 --- a/aws/resource_aws_elastic_beanstalk_environment_test.go +++ b/aws/resource_aws_elastic_beanstalk_environment_test.go @@ -38,6 +38,10 @@ func testSweepBeanstalkEnvironments(region string) error { }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Elastic Beanstalk Environment sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving beanstalk environment: %s", err) } diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 5ab85254b03..9dce8a74e37 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -42,7 +42,7 @@ func testSweepElasticacheClusters(region string) error { "tf-acc-test-", } - return conn.DescribeCacheClustersPages(&elasticache.DescribeCacheClustersInput{}, func(page *elasticache.DescribeCacheClustersOutput, isLast bool) bool { + err = conn.DescribeCacheClustersPages(&elasticache.DescribeCacheClustersInput{}, func(page *elasticache.DescribeCacheClustersOutput, isLast bool) bool { if len(page.CacheClusters) == 0 { log.Print("[DEBUG] No Elasticache Replicaton Groups to sweep") return false @@ -69,6 +69,14 @@ func testSweepElasticacheClusters(region string) error { } return !isLast }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Elasticache Cluster sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving Elasticache Clusters: %s", err) + } + return nil } func TestAccAWSElasticacheCluster_Engine_Memcached_Ec2Classic(t *testing.T) { diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index 8f5cdfadab8..2cec8898eee 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -36,7 +36,7 @@ func testSweepElasticacheReplicationGroups(region string) error { "tf-acc-test-", } - return conn.DescribeReplicationGroupsPages(&elasticache.DescribeReplicationGroupsInput{}, func(page *elasticache.DescribeReplicationGroupsOutput, isLast bool) bool { + err = conn.DescribeReplicationGroupsPages(&elasticache.DescribeReplicationGroupsInput{}, func(page *elasticache.DescribeReplicationGroupsOutput, isLast bool) bool { if len(page.ReplicationGroups) == 0 { log.Print("[DEBUG] No Elasticache Replicaton Groups to sweep") return false @@ -63,6 +63,14 @@ func testSweepElasticacheReplicationGroups(region string) error { } return !isLast }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Elasticache Replication Group sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving Elasticache Replication Groups: %s", err) + } + return nil } func TestAccAWSElasticacheReplicationGroup_basic(t *testing.T) { diff --git a/aws/resource_aws_elasticsearch_domain_test.go b/aws/resource_aws_elasticsearch_domain_test.go index e3c787b59b6..b3bcd5648f7 100644 --- a/aws/resource_aws_elasticsearch_domain_test.go +++ b/aws/resource_aws_elasticsearch_domain_test.go @@ -36,6 +36,10 @@ func testSweepElasticSearchDomains(region string) error { out, err := conn.ListDomainNames(&elasticsearch.ListDomainNamesInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Elasticsearch Domain sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving Elasticsearch Domains: %s", err) } for _, domain := range out.DomainNames { diff --git a/aws/resource_aws_elb_test.go b/aws/resource_aws_elb_test.go index 386c2461493..8f59bebce61 100644 --- a/aws/resource_aws_elb_test.go +++ b/aws/resource_aws_elb_test.go @@ -37,7 +37,7 @@ func testSweepELBs(region string) error { "test-elb-", } - return conn.DescribeLoadBalancersPages(&elb.DescribeLoadBalancersInput{}, func(out *elb.DescribeLoadBalancersOutput, isLast bool) bool { + err = conn.DescribeLoadBalancersPages(&elb.DescribeLoadBalancersInput{}, func(out *elb.DescribeLoadBalancersOutput, isLast bool) bool { if len(out.LoadBalancerDescriptions) == 0 { log.Println("[INFO] No ELBs found for sweeping") return false @@ -71,6 +71,14 @@ func testSweepELBs(region string) error { } return !isLast }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping ELB sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving ELBs: %s", err) + } + return nil } func TestAccAWSELB_basic(t *testing.T) { diff --git a/aws/resource_aws_gamelift_alias_test.go b/aws/resource_aws_gamelift_alias_test.go index d20b0f03724..2b72854269d 100644 --- a/aws/resource_aws_gamelift_alias_test.go +++ b/aws/resource_aws_gamelift_alias_test.go @@ -55,6 +55,10 @@ func testSweepGameliftAliases(region string) error { return nil }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Gamelift Alias sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error listing Gamelift Aliases: %s", err) } diff --git a/aws/resource_aws_gamelift_build_test.go b/aws/resource_aws_gamelift_build_test.go index c7ccdced152..a8fc84464d1 100644 --- a/aws/resource_aws_gamelift_build_test.go +++ b/aws/resource_aws_gamelift_build_test.go @@ -31,6 +31,10 @@ func testSweepGameliftBuilds(region string) error { resp, err := conn.ListBuilds(&gamelift.ListBuildsInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Gamelife Build sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error listing Gamelift Builds: %s", err) } diff --git a/aws/resource_aws_gamelift_fleet_test.go b/aws/resource_aws_gamelift_fleet_test.go index 97e4e4bf192..fbc710690b1 100644 --- a/aws/resource_aws_gamelift_fleet_test.go +++ b/aws/resource_aws_gamelift_fleet_test.go @@ -34,7 +34,7 @@ func testSweepGameliftFleets(region string) error { } conn := client.(*AWSClient).gameliftconn - return testAccGameliftListFleets(conn, nil, func(fleetIds []*string) error { + return testAccGameliftListFleets(conn, nil, region, func(fleetIds []*string) error { if len(fleetIds) == 0 { log.Print("[DEBUG] No Gamelift Fleets to sweep") return nil @@ -83,11 +83,15 @@ func testSweepGameliftFleets(region string) error { }) } -func testAccGameliftListFleets(conn *gamelift.GameLift, nextToken *string, f func([]*string) error) error { +func testAccGameliftListFleets(conn *gamelift.GameLift, nextToken *string, region string, f func([]*string) error) error { resp, err := conn.ListFleets(&gamelift.ListFleetsInput{ NextToken: nextToken, }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Gamelift Fleet sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error listing Gamelift Fleets: %s", err) } @@ -96,7 +100,7 @@ func testAccGameliftListFleets(conn *gamelift.GameLift, nextToken *string, f fun return err } if nextToken != nil { - return testAccGameliftListFleets(conn, nextToken, f) + return testAccGameliftListFleets(conn, nextToken, region, f) } return nil } diff --git a/aws/resource_aws_glue_connection_test.go b/aws/resource_aws_glue_connection_test.go index c1ae88d8676..1757c20a829 100644 --- a/aws/resource_aws_glue_connection_test.go +++ b/aws/resource_aws_glue_connection_test.go @@ -63,6 +63,10 @@ func testSweepGlueConnections(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Glue Connection sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving Glue Connections: %s", err) } diff --git a/aws/resource_aws_glue_job_test.go b/aws/resource_aws_glue_job_test.go index a673696ecdd..32f93ac6025 100644 --- a/aws/resource_aws_glue_job_test.go +++ b/aws/resource_aws_glue_job_test.go @@ -61,6 +61,10 @@ func testSweepGlueJobs(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Glue Job sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving Glue Jobs: %s", err) } diff --git a/aws/resource_aws_iam_server_certificate_test.go b/aws/resource_aws_iam_server_certificate_test.go index 29e00362df7..a52f9b27566 100644 --- a/aws/resource_aws_iam_server_certificate_test.go +++ b/aws/resource_aws_iam_server_certificate_test.go @@ -58,6 +58,10 @@ func testSweepIamServerCertificates(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping IAM Server Certificate sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving IAM Server Certificates: %s", err) } diff --git a/aws/resource_aws_iam_service_linked_role_test.go b/aws/resource_aws_iam_service_linked_role_test.go index f9c7019c15d..a2781f8d114 100644 --- a/aws/resource_aws_iam_service_linked_role_test.go +++ b/aws/resource_aws_iam_service_linked_role_test.go @@ -63,6 +63,10 @@ func testSweepIamServiceLinkedRoles(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping IAM Service Role sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving IAM Service Roles: %s", err) } diff --git a/aws/resource_aws_internet_gateway_test.go b/aws/resource_aws_internet_gateway_test.go index 9fcb937f992..9d75dc1909e 100644 --- a/aws/resource_aws_internet_gateway_test.go +++ b/aws/resource_aws_internet_gateway_test.go @@ -38,6 +38,10 @@ func testSweepInternetGateways(region string) error { } resp, err := conn.DescribeInternetGateways(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Internet Gateway sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing Internet Gateways: %s", err) } diff --git a/aws/resource_aws_key_pair_test.go b/aws/resource_aws_key_pair_test.go index 58b0b00c253..a28770866aa 100644 --- a/aws/resource_aws_key_pair_test.go +++ b/aws/resource_aws_key_pair_test.go @@ -38,6 +38,10 @@ func testSweepKeyPairs(region string) error { }, }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 Key Pair sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing key pairs in Sweeper: %s", err) } diff --git a/aws/resource_aws_kms_key_test.go b/aws/resource_aws_kms_key_test.go index 404ee1761c2..9a98f893cd3 100644 --- a/aws/resource_aws_kms_key_test.go +++ b/aws/resource_aws_kms_key_test.go @@ -70,6 +70,10 @@ func testSweepKmsKeys(region string) error { return !lastPage }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping KMS Key sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing KMS keys: %s", err) } diff --git a/aws/resource_aws_launch_configuration_test.go b/aws/resource_aws_launch_configuration_test.go index fce4096db0f..b0f418a50a3 100644 --- a/aws/resource_aws_launch_configuration_test.go +++ b/aws/resource_aws_launch_configuration_test.go @@ -34,6 +34,10 @@ func testSweepLaunchConfigurations(region string) error { resp, err := autoscalingconn.DescribeLaunchConfigurations(&autoscaling.DescribeLaunchConfigurationsInput{}) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping AutoScaling Launch Configuration sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error retrieving launch configuration: %s", err) } diff --git a/aws/resource_aws_mq_broker_test.go b/aws/resource_aws_mq_broker_test.go index 55baa9512c9..47b33827a07 100644 --- a/aws/resource_aws_mq_broker_test.go +++ b/aws/resource_aws_mq_broker_test.go @@ -81,6 +81,10 @@ func testSweepMqBrokers(region string) error { MaxResults: aws.Int64(100), }) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping MQ Broker sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error listing MQ brokers: %s", err) } diff --git a/aws/resource_aws_nat_gateway_test.go b/aws/resource_aws_nat_gateway_test.go index f3645dc3080..7dcd2bd6a30 100644 --- a/aws/resource_aws_nat_gateway_test.go +++ b/aws/resource_aws_nat_gateway_test.go @@ -39,6 +39,10 @@ func testSweepNatGateways(region string) error { } resp, err := conn.DescribeNatGateways(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 NAT Gateway sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing NAT Gateways: %s", err) } diff --git a/aws/resource_aws_network_acl_test.go b/aws/resource_aws_network_acl_test.go index 4021fcb7df2..49b90312944 100644 --- a/aws/resource_aws_network_acl_test.go +++ b/aws/resource_aws_network_acl_test.go @@ -38,6 +38,10 @@ func testSweepNetworkAcls(region string) error { } resp, err := conn.DescribeNetworkAcls(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 Network ACL sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing Network ACLs: %s", err) } diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index 1ab874af984..48f344ad8ed 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -31,7 +31,7 @@ func testSweepRedshiftClusters(region string) error { } conn := client.(*AWSClient).redshiftconn - return conn.DescribeClustersPages(&redshift.DescribeClustersInput{}, func(resp *redshift.DescribeClustersOutput, isLast bool) bool { + err = conn.DescribeClustersPages(&redshift.DescribeClustersInput{}, func(resp *redshift.DescribeClustersOutput, isLast bool) bool { if len(resp.Clusters) == 0 { log.Print("[DEBUG] No Redshift clusters to sweep") return false @@ -55,6 +55,14 @@ func testSweepRedshiftClusters(region string) error { } return !isLast }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Redshift Cluster sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving Redshift Clusters: %s", err) + } + return nil } func TestValidateRedshiftClusterDbName(t *testing.T) { diff --git a/aws/resource_aws_secretsmanager_secret_test.go b/aws/resource_aws_secretsmanager_secret_test.go index 0f37593686d..065b6e27abc 100644 --- a/aws/resource_aws_secretsmanager_secret_test.go +++ b/aws/resource_aws_secretsmanager_secret_test.go @@ -28,7 +28,7 @@ func testSweepSecretsManagerSecrets(region string) error { } conn := client.(*AWSClient).secretsmanagerconn - return conn.ListSecretsPages(&secretsmanager.ListSecretsInput{}, func(page *secretsmanager.ListSecretsOutput, isLast bool) bool { + err = conn.ListSecretsPages(&secretsmanager.ListSecretsInput{}, func(page *secretsmanager.ListSecretsOutput, isLast bool) bool { if len(page.SecretList) == 0 { log.Print("[DEBUG] No Secrets Manager Secrets to sweep") return true @@ -57,6 +57,14 @@ func testSweepSecretsManagerSecrets(region string) error { return !isLast }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Secrets Manager Secret sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving Secrets Manager Secrets: %s", err) + } + return nil } func TestAccAwsSecretsManagerSecret_Basic(t *testing.T) { diff --git a/aws/resource_aws_security_group_test.go b/aws/resource_aws_security_group_test.go index 3bdc78e4c82..5620239f8ea 100644 --- a/aws/resource_aws_security_group_test.go +++ b/aws/resource_aws_security_group_test.go @@ -41,6 +41,13 @@ func testSweepSecurityGroups(region string) error { }, } resp, err := conn.DescribeSecurityGroups(req) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 Security Group sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving EC2 Security Groups: %s", err) + } if len(resp.SecurityGroups) == 0 { log.Print("[DEBUG] No aws security groups to sweep") diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index c4982a46933..918dbc995de 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -28,7 +28,7 @@ func testSweepSpotFleetRequests(region string) error { } conn := client.(*AWSClient).ec2conn - return conn.DescribeSpotFleetRequestsPages(&ec2.DescribeSpotFleetRequestsInput{}, func(page *ec2.DescribeSpotFleetRequestsOutput, isLast bool) bool { + err = conn.DescribeSpotFleetRequestsPages(&ec2.DescribeSpotFleetRequestsInput{}, func(page *ec2.DescribeSpotFleetRequestsOutput, isLast bool) bool { if len(page.SpotFleetRequestConfigs) == 0 { log.Print("[DEBUG] No Spot Fleet Requests to sweep") return false @@ -45,6 +45,14 @@ func testSweepSpotFleetRequests(region string) error { } return !isLast }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 Spot Fleet Requests sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving EC2 Spot Fleet Requests: %s", err) + } + return nil } func TestAccAWSSpotFleetRequest_associatePublicIpAddress(t *testing.T) { diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index 4d5d49c32c0..156646acaa6 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -55,6 +55,10 @@ func testSweepSubnets(region string) error { } resp, err := conn.DescribeSubnets(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 Subnet sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing subnets: %s", err) } diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index 54550b86b59..457a542facf 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -47,6 +47,10 @@ func testSweepVPCs(region string) error { } resp, err := conn.DescribeVpcs(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 VPC sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing vpcs: %s", err) } diff --git a/aws/resource_aws_vpn_gateway_test.go b/aws/resource_aws_vpn_gateway_test.go index 5e5f94a08e8..6a1753d187e 100644 --- a/aws/resource_aws_vpn_gateway_test.go +++ b/aws/resource_aws_vpn_gateway_test.go @@ -40,6 +40,10 @@ func testSweepVPNGateways(region string) error { } resp, err := conn.DescribeVpnGateways(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping EC2 VPN Gateway sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing VPN Gateways: %s", err) } diff --git a/aws/resource_aws_waf_regex_match_set_test.go b/aws/resource_aws_waf_regex_match_set_test.go index bf3bd8b14dc..3be38d3b66e 100644 --- a/aws/resource_aws_waf_regex_match_set_test.go +++ b/aws/resource_aws_waf_regex_match_set_test.go @@ -30,6 +30,10 @@ func testSweepWafRegexMatchSet(region string) error { req := &waf.ListRegexMatchSetsInput{} resp, err := conn.ListRegexMatchSets(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping WAF Regex Match Set sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing WAF Regex Match Sets: %s", err) } diff --git a/aws/resource_aws_waf_rule_group_test.go b/aws/resource_aws_waf_rule_group_test.go index 7957a13a446..d9aa0ead437 100644 --- a/aws/resource_aws_waf_rule_group_test.go +++ b/aws/resource_aws_waf_rule_group_test.go @@ -31,6 +31,10 @@ func testSweepWafRuleGroups(region string) error { req := &waf.ListRuleGroupsInput{} resp, err := conn.ListRuleGroups(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping WAF Rule Group sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing WAF Rule Groups: %s", err) } diff --git a/aws/resource_aws_wafregional_regex_match_set_test.go b/aws/resource_aws_wafregional_regex_match_set_test.go index 417a7e6ee1c..da23473ab56 100644 --- a/aws/resource_aws_wafregional_regex_match_set_test.go +++ b/aws/resource_aws_wafregional_regex_match_set_test.go @@ -31,6 +31,10 @@ func testSweepWafRegionalRegexMatchSet(region string) error { req := &waf.ListRegexMatchSetsInput{} resp, err := conn.ListRegexMatchSets(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping WAF Regional Regex Match Set sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing WAF Regional Regex Match Sets: %s", err) } diff --git a/aws/resource_aws_wafregional_rule_group_test.go b/aws/resource_aws_wafregional_rule_group_test.go index 41fcbf753c9..7196a0a6cdc 100644 --- a/aws/resource_aws_wafregional_rule_group_test.go +++ b/aws/resource_aws_wafregional_rule_group_test.go @@ -31,6 +31,10 @@ func testSweepWafRegionalRuleGroups(region string) error { req := &waf.ListRuleGroupsInput{} resp, err := conn.ListRuleGroups(req) if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping WAF Regional Rule Group sweep for %s: %s", region, err) + return nil + } return fmt.Errorf("Error describing WAF Regional Rule Groups: %s", err) } From 0944223ff6451f3b84ec1b6482e8c8a3cae3f0fd Mon Sep 17 00:00:00 2001 From: Sangho Na Date: Fri, 4 May 2018 12:14:58 +1200 Subject: [PATCH 0948/3316] Add support for S3 as a DMS target endpoint (continued) --- aws/resource_aws_dms_endpoint.go | 216 +++++++------ aws/resource_aws_dms_endpoint_test.go | 366 ++++++++++++++-------- website/docs/r/dms_endpoint.html.markdown | 5 +- 3 files changed, 364 insertions(+), 223 deletions(-) diff --git a/aws/resource_aws_dms_endpoint.go b/aws/resource_aws_dms_endpoint.go index b5c33e2ac39..bb96a8c9bf0 100644 --- a/aws/resource_aws_dms_endpoint.go +++ b/aws/resource_aws_dms_endpoint.go @@ -82,12 +82,11 @@ func resourceAwsDmsEndpoint() *schema.Resource { Optional: true, }, "kms_key_arn": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"bucket_name", "bucket_folder"}, - ValidateFunc: validateArn, + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + ValidateFunc: validateArn, }, "password": { Type: schema.TypeString, @@ -167,13 +166,55 @@ func resourceAwsDmsEndpoint() *schema.Resource { }, }, }, - "bucket_name": { - Type: schema.TypeString, - Optional: true, - }, - "bucket_folder": { - Type: schema.TypeString, + "s3_settings": { + Type: schema.TypeList, Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_access_role_arn": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "external_table_definition": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "csv_row_delimiter": { + Type: schema.TypeString, + Optional: true, + Default: "\\n", + }, + "csv_delimiter": { + Type: schema.TypeString, + Optional: true, + Default: ",", + }, + "bucket_folder": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "bucket_name": { + Type: schema.TypeString, + Optional: true, + Default: "", + }, + "compression_type": { + Type: schema.TypeString, + Optional: true, + Default: "NONE", + }, + }, + }, }, }, } @@ -212,33 +253,14 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro } case "s3": request.S3Settings = &dms.S3Settings{ - BucketName: aws.String(d.Get("bucket_name").(string)), - BucketFolder: aws.String(d.Get("bucket_folder").(string)), - ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), - - // By default extra variables (should be set): - CompressionType: aws.String("GZIP"), - CsvDelimiter: aws.String(","), - CsvRowDelimiter: aws.String("\\n"), + ServiceAccessRoleArn: aws.String(d.Get("s3_settings.0.service_access_role_arn").(string)), + ExternalTableDefinition: aws.String(d.Get("s3_settings.0.external_table_definition").(string)), + CsvRowDelimiter: aws.String(d.Get("s3_settings.0.csv_row_delimiter").(string)), + CsvDelimiter: aws.String(d.Get("s3_settings.0.csv_delimiter").(string)), + BucketFolder: aws.String(d.Get("s3_settings.0.bucket_folder").(string)), + BucketName: aws.String(d.Get("s3_settings.0.bucket_name").(string)), + CompressionType: aws.String(d.Get("s3_settings.0.compression_type").(string)), } - - // if extra_connection_attributes is set. Then parse the varaiables. - if v, ok := d.GetOk("extra_connection_attributes"); ok { - elems := strings.Split(v.(string), ";") - if len(elems) > 0 { - for _, elem := range elems { - vals := strings.Split(elem, "=") - if strings.Contains(strings.ToLower(vals[0]), "compressiontype") { - request.S3Settings.CompressionType = aws.String(vals[1]) - } else if strings.Contains(strings.ToLower(vals[0]), "csvdelimiter") { - request.S3Settings.CsvDelimiter = aws.String(vals[1]) - } else if strings.Contains(strings.ToLower(vals[0]), "csvrowdelimiter") { - request.S3Settings.CsvRowDelimiter = aws.String(vals[1]) - } - } - } - } - default: request.Password = aws.String(d.Get("password").(string)) request.Port = aws.Int64(int64(d.Get("port").(int))) @@ -254,14 +276,14 @@ func resourceAwsDmsEndpointCreate(d *schema.ResourceData, meta interface{}) erro if v, ok := d.GetOk("kms_key_arn"); ok { request.KmsKeyId = aws.String(v.(string)) } - if v, ok := d.GetOk("ssl_mode"); ok { - request.SslMode = aws.String(v.(string)) - } } if v, ok := d.GetOk("certificate_arn"); ok { request.CertificateArn = aws.String(v.(string)) } + if v, ok := d.GetOk("ssl_mode"); ok { + request.SslMode = aws.String(v.(string)) + } log.Println("[DEBUG] DMS create endpoint:", request) @@ -356,45 +378,9 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro hasChanges = true } - switch d.Get("engine_name").(string) { - case "dynamodb": - if d.HasChange("service_access_role") { - request.DynamoDbSettings = &dms.DynamoDbSettings{ - ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), - } - hasChanges = true - } - case "s3": - if d.HasChange("service_access_role") || d.HasChange("bucket_name") || d.HasChange("bucket_folder") || d.HasChange("extra_connection_attributes") { - request.S3Settings = &dms.S3Settings{ - ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), - BucketFolder: aws.String(d.Get("bucket_folder").(string)), - BucketName: aws.String(d.Get("bucket_name").(string)), - } - - elems := strings.Split(d.Get("extra_connection_attributes").(string), ";") - if len(elems) > 0 { - for _, elem := range elems { - vals := strings.Split(elem, "=") - if strings.Contains(strings.ToLower(vals[0]), "compressiontype") { - request.S3Settings.CompressionType = aws.String(vals[1]) - } else if strings.Contains(strings.ToLower(vals[0]), "csvdelimiter") { - request.S3Settings.CsvDelimiter = aws.String(vals[1]) - } else if strings.Contains(strings.ToLower(vals[0]), "csvrowdelimiter") { - request.S3Settings.CsvRowDelimiter = aws.String(vals[1]) - } - } - } - - hasChanges = true - - goto DONE - } - default: - if d.HasChange("extra_connection_attributes") { - request.ExtraConnectionAttributes = aws.String(d.Get("extra_connection_attributes").(string)) - hasChanges = true - } + if d.HasChange("extra_connection_attributes") { + request.ExtraConnectionAttributes = aws.String(d.Get("extra_connection_attributes").(string)) + hasChanges = true } if d.HasChange("ssl_mode") { @@ -410,6 +396,13 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } switch d.Get("engine_name").(string) { + case "dynamodb": + if d.HasChange("service_access_role") { + request.DynamoDbSettings = &dms.DynamoDbSettings{ + ServiceAccessRoleArn: aws.String(d.Get("service_access_role").(string)), + } + hasChanges = true + } case "mongodb": if d.HasChange("username") || d.HasChange("password") || @@ -439,6 +432,26 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 'mongodb') hasChanges = true } + case "s3": + if d.HasChange("s3_settings.0.service_access_role_arn") || + d.HasChange("s3_settings.0.external_table_definition") || + d.HasChange("s3_settings.0.csv_row_delimiter") || + d.HasChange("s3_settings.0.csv_delimiter") || + d.HasChange("s3_settings.0.bucket_folder") || + d.HasChange("s3_settings.0.bucket_name") || + d.HasChange("s3_settings.0.compression_type") { + request.S3Settings = &dms.S3Settings{ + ServiceAccessRoleArn: aws.String(d.Get("s3_settings.0.service_access_role_arn").(string)), + ExternalTableDefinition: aws.String(d.Get("s3_settings.0.external_table_definition").(string)), + CsvRowDelimiter: aws.String(d.Get("s3_settings.0.csv_row_delimiter").(string)), + CsvDelimiter: aws.String(d.Get("s3_settings.0.csv_delimiter").(string)), + BucketFolder: aws.String(d.Get("s3_settings.0.bucket_folder").(string)), + BucketName: aws.String(d.Get("s3_settings.0.bucket_name").(string)), + CompressionType: aws.String(d.Get("s3_settings.0.compression_type").(string)), + } + request.EngineName = aws.String(d.Get("engine_name").(string)) // Must be included (should be 's3') + hasChanges = true + } default: if d.HasChange("database_name") { request.DatabaseName = aws.String(d.Get("database_name").(string)) @@ -466,7 +479,6 @@ func resourceAwsDmsEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } } -DONE: if hasChanges { log.Println("[DEBUG] DMS update endpoint:", request) @@ -517,29 +529,18 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi d.Set("server_name", endpoint.MongoDbSettings.ServerName) d.Set("port", endpoint.MongoDbSettings.Port) d.Set("database_name", endpoint.MongoDbSettings.DatabaseName) - - if err := d.Set("mongodb_settings", flattenDmsMongoDbSettings(endpoint.MongoDbSettings)); err != nil { - return fmt.Errorf("Error setting mongodb_settings for DMS: %s", err) - } } else { d.Set("username", endpoint.Username) d.Set("server_name", endpoint.ServerName) d.Set("port", endpoint.Port) d.Set("database_name", endpoint.DatabaseName) } + if err := d.Set("mongodb_settings", flattenDmsMongoDbSettings(endpoint.MongoDbSettings)); err != nil { + return fmt.Errorf("Error setting mongodb_settings for DMS: %s", err) + } case "s3": - if endpoint.S3Settings != nil { - d.Set("service_access_role", endpoint.S3Settings.ServiceAccessRoleArn) - d.Set("bucket_folder", endpoint.S3Settings.BucketFolder) - d.Set("bucket_name", endpoint.S3Settings.BucketName) - d.Set("extra_connection_attributes", - aws.String(fmt.Sprintf("compressionType=%s;csvDelimiter=%s;csvRowDelimiter=%s", - *endpoint.S3Settings.CompressionType, *endpoint.S3Settings.CsvDelimiter, *endpoint.S3Settings.CsvRowDelimiter))) - } else { - d.Set("service_access_role", "") - d.Set("bucket_folder", "") - d.Set("bucket_name", "") - d.Set("extra_connection_attributes", "") + if err := d.Set("s3_settings", flattenDmsS3Settings(endpoint.S3Settings)); err != nil { + return fmt.Errorf("Error setting s3_settings for DMS: %s", err) } default: d.Set("database_name", endpoint.DatabaseName) @@ -548,9 +549,10 @@ func resourceAwsDmsEndpointSetState(d *schema.ResourceData, endpoint *dms.Endpoi d.Set("server_name", endpoint.ServerName) d.Set("username", endpoint.Username) d.Set("kms_key_arn", endpoint.KmsKeyId) - d.Set("ssl_mode", endpoint.SslMode) } + d.Set("ssl_mode", endpoint.SslMode) + return nil } @@ -570,3 +572,21 @@ func flattenDmsMongoDbSettings(settings *dms.MongoDbSettings) []map[string]inter return []map[string]interface{}{m} } + +func flattenDmsS3Settings(settings *dms.S3Settings) []map[string]interface{} { + if settings == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "service_access_role_arn": aws.StringValue(settings.ServiceAccessRoleArn), + "external_table_definition": aws.StringValue(settings.ExternalTableDefinition), + "csv_row_delimiter": aws.StringValue(settings.CsvRowDelimiter), + "csv_delimiter": aws.StringValue(settings.CsvDelimiter), + "bucket_folder": aws.StringValue(settings.BucketFolder), + "bucket_name": aws.StringValue(settings.BucketName), + "compression_type": aws.StringValue(settings.CompressionType), + } + + return []map[string]interface{}{m} +} diff --git a/aws/resource_aws_dms_endpoint_test.go b/aws/resource_aws_dms_endpoint_test.go index 44dd83468a3..d832843b314 100644 --- a/aws/resource_aws_dms_endpoint_test.go +++ b/aws/resource_aws_dms_endpoint_test.go @@ -11,7 +11,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSDmsEndpointBasic(t *testing.T) { +func TestAccAwsDmsEndpointBasic(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-basic" @@ -51,7 +51,7 @@ func TestAccAWSDmsEndpointBasic(t *testing.T) { } func TestAccAwsDmsEndpointS3(t *testing.T) { - resourceName := "aws_dms_endpoint.dms_point" + resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-s3" resource.Test(t, resource.TestCase{ @@ -76,6 +76,14 @@ func TestAccAwsDmsEndpointS3(t *testing.T) { Config: dmsEndpointS3ConfigUpdate(randId), Check: resource.ComposeTestCheckFunc( checkDmsEndpointExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "extra_connection_attributes", "key=value;"), + resource.TestCheckResourceAttr(resourceName, "s3_settings.#", "1"), + resource.TestCheckResourceAttr(resourceName, "s3_settings.0.external_table_definition", "new-external_table_definition"), + resource.TestCheckResourceAttr(resourceName, "s3_settings.0.csv_row_delimiter", "\\r"), + resource.TestCheckResourceAttr(resourceName, "s3_settings.0.csv_delimiter", "."), + resource.TestCheckResourceAttr(resourceName, "s3_settings.0.bucket_folder", "new-bucket_folder"), + resource.TestCheckResourceAttr(resourceName, "s3_settings.0.bucket_name", "new-bucket_name"), + resource.TestCheckResourceAttr(resourceName, "s3_settings.0.compression_type", "GZIP"), ), }, }, @@ -114,7 +122,7 @@ func TestAccAwsDmsEndpointDynamoDb(t *testing.T) { }) } -func TestAccAWSDmsEndpointMongoDb(t *testing.T) { +func TestAccAwsDmsEndpointMongoDb(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-mongodb" @@ -133,6 +141,7 @@ func TestAccAWSDmsEndpointMongoDb(t *testing.T) { { ResourceName: resourceName, ImportState: true, + ImportStateVerify: true, ImportStateVerifyIgnore: []string{"password"}, }, { @@ -249,167 +258,280 @@ resource "aws_dms_endpoint" "dms_endpoint" { `, randId) } -func dmsEndpointTargetConfig(randId string, engineName string, actionList string) string { +func dmsEndpointDynamoDbConfig(randId string) string { return fmt.Sprintf(` resource "aws_dms_endpoint" "dms_endpoint" { -endpoint_id = "tf-test-dms-endpoint-%[1]s" -endpoint_type = "target" -engine_name = "%[2]s" -service_access_role = "${aws_iam_role.iam_role.arn}" -ssl_mode = "none" -tags { - Name = "tf-test-%[2]s-endpoint-%[1]s" - Update = "to-update" - Remove = "to-remove" -} + endpoint_id = "tf-test-dms-endpoint-%[1]s" + endpoint_type = "target" + engine_name = "dynamodb" + service_access_role = "${aws_iam_role.iam_role.arn}" + ssl_mode = "none" + tags { + Name = "tf-test-dynamodb-endpoint-%[1]s" + Update = "to-update" + Remove = "to-remove" + } -depends_on = ["aws_iam_role_policy.dms_%[2]s_access"] + depends_on = ["aws_iam_role_policy.dms_dynamodb_access"] } + resource "aws_iam_role" "iam_role" { -name = "tf-test-iam-%[2]s-role-%[1]s" + name = "tf-test-iam-dynamodb-role-%[1]s" -assume_role_policy = <///. +* `s3_settings` - (Optional) Settings for the target S3 endpoint. Available settings are `service_access_role_arn`, `external_table_definition`, `csv_row_delimiter` (default: `\\n`), `csv_delimiter` (default: `,`), `bucket_folder`, `bucket_name` and `compression_type` (default: `NONE`). For more details, see [Using Amazon S3 as a Target for AWS Database Migration Service](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html). ## Attributes Reference From 747a7251ab83d7831f7bc9cd808e49cd5509df3a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 3 May 2018 20:32:41 -0400 Subject: [PATCH 0949/3316] Update CHANGELOG for #4433 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dbd2bb04b0..4e1f4ab15b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.18.0 (Unreleased) + +BUG FIXES: + +* data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] + ## 1.17.0 (May 02, 2018) NOTES: From c209edd18adadc68b44b10e74977b51db86f1132 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Fri, 4 May 2018 09:12:36 +0100 Subject: [PATCH 0950/3316] Remove redundant type declarations --- aws/resource_aws_ssm_document_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_ssm_document_test.go b/aws/resource_aws_ssm_document_test.go index e11eed96314..685158d78dc 100644 --- a/aws/resource_aws_ssm_document_test.go +++ b/aws/resource_aws_ssm_document_test.go @@ -20,7 +20,7 @@ func TestAccAWSSSMDocument_basic(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSSSMDocumentBasicConfig(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMDocumentExists("aws_ssm_document.foo"), @@ -40,7 +40,7 @@ func TestAccAWSSSMDocument_update(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSSSMDocument20Config(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMDocumentExists("aws_ssm_document.foo"), @@ -52,7 +52,7 @@ func TestAccAWSSSMDocument_update(t *testing.T) { "aws_ssm_document.foo", "default_version", "1"), ), }, - resource.TestStep{ + { Config: testAccAWSSSMDocument20UpdatedConfig(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMDocumentExists("aws_ssm_document.foo"), @@ -73,7 +73,7 @@ func TestAccAWSSSMDocument_permission(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSSSMDocumentPermissionConfig(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMDocumentExists("aws_ssm_document.foo"), @@ -94,7 +94,7 @@ func TestAccAWSSSMDocument_params(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSSSMDocumentParamConfig(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMDocumentExists("aws_ssm_document.foo"), @@ -123,7 +123,7 @@ func TestAccAWSSSMDocument_automation(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSSSMDocumentTypeAutomationConfig(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSSSMDocumentExists("aws_ssm_document.foo"), From 8f78510868714316a1119f57c098b6b140f4eff6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 4 May 2018 07:12:20 -0400 Subject: [PATCH 0951/3316] Update CHANGELOG for #4436 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e1f4ab15b5..f4f33338ec6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] +* resource/aws_ssm_document: Add missing account ID `arn` attribute [GH-4436] ## 1.17.0 (May 02, 2018) From cd4a9d9b602530d7492be8f1d3981a666d989201 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 4 May 2018 07:12:56 -0400 Subject: [PATCH 0952/3316] Fix grammar error :smile: --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4f33338ec6..e4b2a06123b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] -* resource/aws_ssm_document: Add missing account ID `arn` attribute [GH-4436] +* resource/aws_ssm_document: Add missing account ID to `arn` attribute [GH-4436] ## 1.17.0 (May 02, 2018) From 94c5b5ebe656d7d4f6d5d47f2301e31e88c8e694 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 4 May 2018 08:58:07 -0400 Subject: [PATCH 0953/3316] GitHub: New Issue and Pull Request Templates --- .github/ISSUE_TEMPLATE.md | 47 ++----------- .github/ISSUE_TEMPLATE/Bug_Report.md | 81 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/Feature_Request.md | 44 ++++++++++++ .github/ISSUE_TEMPLATE/Question.md | 15 +++++ .github/PULL_REQUEST_TEMPLATE.md | 7 ++ 5 files changed, 152 insertions(+), 42 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/Bug_Report.md create mode 100644 .github/ISSUE_TEMPLATE/Feature_Request.md create mode 100644 .github/ISSUE_TEMPLATE/Question.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 8066d3921e4..b376ed08b0c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,43 +1,6 @@ -Hi there, + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md new file mode 100644 index 00000000000..55048ea9389 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_Report.md @@ -0,0 +1,81 @@ +--- +name: 🐛 Bug Report +about: If something isn't working as expected 🤔. + +--- + + + +### Community Note + +* Please vote on this issue by adding a :+1: reaction to the original issue to help the community and maintainers prioritize this request +* If you are interested in working on this issue or have submitted a pull request, please leave a comment + + + +### Terraform Version + +Please run `terraform -v` to show the Terraform core version and provider version(s). If you are not running the latest version of Terraform or the provider, please upgrade because your issue may have already been fixed. [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions). + +### Affected Resource(s) + +Please note the following potential times when an issue might be in Terraform core: + +* [Configuration Language](https://www.terraform.io/docs/configuration/index.html) or resource ordering issues +* [State](https://www.terraform.io/docs/state/index.html) and [State Backend](https://www.terraform.io/docs/backends/index.html) issues +* [Provisioner](https://www.terraform.io/docs/provisioners/index.html) issues +* [Registry](https://registry.terraform.io/) issues +* Spans resources across multiple providers + +If you are running into one of these scenarios, we recommend opening an issue in the [Terraform core repository](https://github.com/hashicorp/terraform/) instead. + +If you believe this is still a provider issue, please list the resources and data sources, for example: + +* aws_instance +* aws_rds_cluster + +### Terraform Configuration Files + + + +```hcl +# Copy-paste your Terraform configurations here - for large Terraform configs, +# please use a service like Dropbox and share a link to the ZIP file. For +# security, you can also encrypt the files using our GPG public key. +``` + +### Debug Output + +Please provide a link to a GitHub Gist containing the complete debug output. Please do NOT paste the debug output in the issue; just paste a link to the Gist. + +To obtain the debug output, see the [Terraform documentation on debugging](https://www.terraform.io/docs/internals/debugging.html). + +### Panic Output + +If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`. + +### Expected Behavior + +What should have happened? + +### Actual Behavior + +What actually happened? + +### Steps to Reproduce + +Please list the steps required to reproduce the issue, for example: + +1. `terraform apply` + +### Important Factoids + +Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? + +### References + + + +Are there any other GitHub issues (open or closed) or pull requests that should be linked here? Vendor documentation? For example: + +* #0000 diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md new file mode 100644 index 00000000000..08cd2ebcd3e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_Request.md @@ -0,0 +1,44 @@ +--- +name: 🚀 Feature Request +about: I have a suggestion (and might want to implement myself 🙂)! + +--- + + + +### Community Note + +* Please vote on this issue by adding a :+1: reaction to the original issue to help the community and maintainers prioritize this request +* If you are interested in working on this issue or have submitted a pull request, please leave a comment + + + +### Description + +Please leave a helpful description of the feature request here. + +### New or Affected Resource(s) + +Please list the resources and data sources, for example: + +* aws_instance +* aws_rds_cluster + +### Potential Terraform Configuration + + + +```hcl +# Copy-paste your Terraform configurations here - for large Terraform configs, +# please use a service like Dropbox and share a link to the ZIP file. For +# security, you can also encrypt the files using our GPG public key. +``` + +### References + + + +Are there any other GitHub issues (open or closed) or pull requests that should be linked here? Vendor blog posts or documentation? For example: + +* https://aws.amazon.com/about-aws/whats-new/2018/04/introducing-amazon-ec2-fleet/ +* #0000 diff --git a/.github/ISSUE_TEMPLATE/Question.md b/.github/ISSUE_TEMPLATE/Question.md new file mode 100644 index 00000000000..21a66cfe411 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Question.md @@ -0,0 +1,15 @@ +--- +name: 💬 Question +about: If you have a question, please check out our other community resources! + +--- + +Issues on GitHub are intended to be related to problems with provider codebase, +so we recommend using our other community resources instead of asking here 👍. + +--- + +If you have a support request or question please submit them to one of this resources: + +* [Terraform community resources](https://www.terraform.io/docs/extend/community/index.html) +* [HashiCorp support](https://support.hashicorp.com) (Terraform Enterprise customers) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..b8136f5579b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ + +Fixes #0000 + +Changes proposed in this pull request: + +* Change 1 +* Change 2 From 1110914b92c3d693187404471d80797111ad7f6d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 4 May 2018 09:15:17 -0400 Subject: [PATCH 0954/3316] GitHub: Updates to new issue and pull request templates * Move Bug Report note about Terraform core to the top * Use unicode thumbs up instead of GitHub markdown syntax * Add example pull request acceptance testing output --- .github/ISSUE_TEMPLATE/Bug_Report.md | 26 ++++++++++++----------- .github/ISSUE_TEMPLATE/Feature_Request.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 8 +++++++ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md index 55048ea9389..99df0e4dfa1 100644 --- a/.github/ISSUE_TEMPLATE/Bug_Report.md +++ b/.github/ISSUE_TEMPLATE/Bug_Report.md @@ -4,11 +4,23 @@ about: If something isn't working as expected 🤔. --- +Please note the following potential times when an issue might be in Terraform core: + +* [Configuration Language](https://www.terraform.io/docs/configuration/index.html) or resource ordering issues +* [State](https://www.terraform.io/docs/state/index.html) and [State Backend](https://www.terraform.io/docs/backends/index.html) issues +* [Provisioner](https://www.terraform.io/docs/provisioners/index.html) issues +* [Registry](https://registry.terraform.io/) issues +* Spans resources across multiple providers + +If you are running into one of these scenarios, we recommend opening an issue in the [Terraform core repository](https://github.com/hashicorp/terraform/) instead. + +--- + ### Community Note -* Please vote on this issue by adding a :+1: reaction to the original issue to help the community and maintainers prioritize this request +* Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request * If you are interested in working on this issue or have submitted a pull request, please leave a comment @@ -19,17 +31,7 @@ Please run `terraform -v` to show the Terraform core version and provider versio ### Affected Resource(s) -Please note the following potential times when an issue might be in Terraform core: - -* [Configuration Language](https://www.terraform.io/docs/configuration/index.html) or resource ordering issues -* [State](https://www.terraform.io/docs/state/index.html) and [State Backend](https://www.terraform.io/docs/backends/index.html) issues -* [Provisioner](https://www.terraform.io/docs/provisioners/index.html) issues -* [Registry](https://registry.terraform.io/) issues -* Spans resources across multiple providers - -If you are running into one of these scenarios, we recommend opening an issue in the [Terraform core repository](https://github.com/hashicorp/terraform/) instead. - -If you believe this is still a provider issue, please list the resources and data sources, for example: +Please list the resources and data sources, for example: * aws_instance * aws_rds_cluster diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md index 08cd2ebcd3e..492acf2737d 100644 --- a/.github/ISSUE_TEMPLATE/Feature_Request.md +++ b/.github/ISSUE_TEMPLATE/Feature_Request.md @@ -8,7 +8,7 @@ about: I have a suggestion (and might want to implement myself 🙂)! ### Community Note -* Please vote on this issue by adding a :+1: reaction to the original issue to help the community and maintainers prioritize this request +* Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request * If you are interested in working on this issue or have submitted a pull request, please leave a comment diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b8136f5579b..448b34f20a5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,3 +5,11 @@ Changes proposed in this pull request: * Change 1 * Change 2 + +Output from acceptance testing: + +``` +$ make testacc TESTARGS='-run=TestAccAWSAvailabilityZones' + +... +``` From e0b00be15a7d9ab7e41d2295d1fbdddc11c84898 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 4 May 2018 09:23:20 -0400 Subject: [PATCH 0955/3316] GitHub: Fix grammar issue and clarify types of requests in Question template --- .github/ISSUE_TEMPLATE/Question.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Question.md b/.github/ISSUE_TEMPLATE/Question.md index 21a66cfe411..a3f9a38394f 100644 --- a/.github/ISSUE_TEMPLATE/Question.md +++ b/.github/ISSUE_TEMPLATE/Question.md @@ -4,12 +4,12 @@ about: If you have a question, please check out our other community resources! --- -Issues on GitHub are intended to be related to problems with provider codebase, +Issues on GitHub are intended to be related to bugs or feature requests with provider codebase, so we recommend using our other community resources instead of asking here 👍. --- -If you have a support request or question please submit them to one of this resources: +If you have a support request or question please submit them to one of these resources: * [Terraform community resources](https://www.terraform.io/docs/extend/community/index.html) * [HashiCorp support](https://support.hashicorp.com) (Terraform Enterprise customers) From 9f15ffb10acf17fe0eb744de34c24146b60231e9 Mon Sep 17 00:00:00 2001 From: John Noss Date: Fri, 4 May 2018 11:21:36 -0400 Subject: [PATCH 0956/3316] Update docs for ASG wait for capacity with ALBs This updates the docs for ASG to note that wait for capacity can now be used for ALBs attached via `target_group_arns` not just ELBs attached via `load_balancers` (see Terraform issue https://github.com/hashicorp/terraform/issues/8655 and PR https://github.com/hashicorp/terraform/pull/10243 for the change to make this work for ALBs). --- website/docs/r/autoscaling_group.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/autoscaling_group.html.markdown b/website/docs/r/autoscaling_group.html.markdown index 2fdb8c6e4f7..f403bd5d829 100644 --- a/website/docs/r/autoscaling_group.html.markdown +++ b/website/docs/r/autoscaling_group.html.markdown @@ -300,7 +300,7 @@ Setting `wait_for_capacity_timeout` to `"0"` disables ASG Capacity waiting. #### Waiting for ELB Capacity The second mechanism is optional, and affects ASGs with attached ELBs specified -via the `load_balancers` attribute. +via the `load_balancers` attribute or with ALBs specified with `target_group_arns`. The `min_elb_capacity` parameter causes Terraform to wait for at least the requested number of instances to show up `"InService"` in all attached ELBs From ca51c9e6c64284996c0129d5594de88e9921b297 Mon Sep 17 00:00:00 2001 From: Ken Herner Date: Wed, 24 Jan 2018 17:19:18 -0500 Subject: [PATCH 0957/3316] resource/aws_redshift_cluster: Send correct values when resizing When resizing a Redshift cluster, the AWS API is expecting the Cluster Type, Node Type, and Number of Nodes regardless of which value changed. If not passed it will error out with `[WARN] Error modifying Redshift Cluster (navistone-public-cluster): InvalidParameterCombination: Number of nodes for cluster type multi-node must be greater than or equal to 2` Now we send all values if any one of them change. Signed-off-by: Ken Herner --- aws/resource_aws_redshift_cluster.go | 14 ++---- aws/resource_aws_redshift_cluster_test.go | 58 +++++++++++++++++++++++ 2 files changed, 61 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index 32a8253ebbc..1a28ca15a10 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -642,25 +642,17 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) ClusterIdentifier: aws.String(d.Id()), } - if d.HasChange("cluster_type") { + // If the cluster type, node type, or number of nodes changed, then the AWS API expects all three + // items to be sent over + if d.HasChange("cluster_type") || d.HasChange("node_type") || d.HasChange("number_of_nodes") { req.ClusterType = aws.String(d.Get("cluster_type").(string)) - requestUpdate = true - } - - if d.HasChange("node_type") { req.NodeType = aws.String(d.Get("node_type").(string)) - requestUpdate = true - } - - if d.HasChange("number_of_nodes") { if v := d.Get("number_of_nodes").(int); v > 1 { req.ClusterType = aws.String("multi-node") req.NumberOfNodes = aws.Int64(int64(d.Get("number_of_nodes").(int))) } else { req.ClusterType = aws.String("single-node") } - - req.NodeType = aws.String(d.Get("node_type").(string)) requestUpdate = true } diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index 1ab874af984..b339a4f8179 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -382,6 +382,47 @@ func TestAccAWSRedshiftCluster_updateNodeCount(t *testing.T) { testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v), resource.TestCheckResourceAttr( "aws_redshift_cluster.default", "number_of_nodes", "2"), + resource.TestCheckResourceAttr( + "aws_redshift_cluster.default", "cluster-type", "multi-node"), + resource.TestCheckResourceAttr( + "aws_redshift_cluster.default", "node-type", "dc1.large"), + ), + }, + }, + }) +} + +func TestAccAWSRedshiftCluster_updateNodeType(t *testing.T) { + var v redshift.Cluster + + ri := rand.New(rand.NewSource(time.Now().UnixNano())).Int() + preConfig := testAccAWSRedshiftClusterConfig_basic(ri) + postConfig := testAccAWSRedshiftClusterConfig_updateNodeType(ri) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, + Steps: []resource.TestStep{ + { + Config: preConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_redshift_cluster.default", "node-type", "dc1.large"), + ), + }, + + { + Config: postConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_redshift_cluster.default", "number_of_nodes", "1"), + resource.TestCheckResourceAttr( + "aws_redshift_cluster.default", "cluster-type", "single-node"), + resource.TestCheckResourceAttr( + "aws_redshift_cluster.default", "node-type", "dc1.8xlarge"), ), }, }, @@ -738,6 +779,23 @@ resource "aws_redshift_cluster" "default" { `, rInt) } +func testAccAWSRedshiftClusterConfig_updateNodeType(rInt int) string { + return fmt.Sprintf(` +resource "aws_redshift_cluster" "default" { + cluster_identifier = "tf-redshift-cluster-%d" + availability_zone = "us-west-2a" + database_name = "mydb" + master_username = "foo_test" + master_password = "Mustbe8characters" + node_type = "dc1.8xlarge" + automated_snapshot_retention_period = 0 + allow_version_upgrade = false + number_of_nodes = 1 + skip_final_snapshot = true +} +`, rInt) +} + func testAccAWSRedshiftClusterConfig_basic(rInt int) string { return fmt.Sprintf(` resource "aws_redshift_cluster" "default" { From 360ddeabc16556b128324c6650cc6f1e1d814a7a Mon Sep 17 00:00:00 2001 From: Ken Herner Date: Mon, 29 Jan 2018 10:50:18 -0500 Subject: [PATCH 0958/3316] Fixed recently added redshift tests Signed-off-by: Ken Herner --- aws/resource_aws_redshift_cluster_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index b339a4f8179..d3a05593d57 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -383,9 +383,9 @@ func TestAccAWSRedshiftCluster_updateNodeCount(t *testing.T) { resource.TestCheckResourceAttr( "aws_redshift_cluster.default", "number_of_nodes", "2"), resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "cluster-type", "multi-node"), + "aws_redshift_cluster.default", "cluster_type", "multi-node"), resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "node-type", "dc1.large"), + "aws_redshift_cluster.default", "node_type", "dc1.large"), ), }, }, @@ -409,7 +409,7 @@ func TestAccAWSRedshiftCluster_updateNodeType(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v), resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "node-type", "dc1.large"), + "aws_redshift_cluster.default", "node_type", "dc1.large"), ), }, @@ -420,9 +420,9 @@ func TestAccAWSRedshiftCluster_updateNodeType(t *testing.T) { resource.TestCheckResourceAttr( "aws_redshift_cluster.default", "number_of_nodes", "1"), resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "cluster-type", "single-node"), + "aws_redshift_cluster.default", "cluster_type", "single-node"), resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "node-type", "dc1.8xlarge"), + "aws_redshift_cluster.default", "node_type", "dc1.8xlarge"), ), }, }, From db956b54d5626a446698c1c3dffef6b6b80e1d3f Mon Sep 17 00:00:00 2001 From: Ken Herner Date: Fri, 4 May 2018 11:44:52 -0400 Subject: [PATCH 0959/3316] Update redshift test udateNodeType Change the node type from dc2.8xlarge to dc2.large to pass E2E testing. Signed-off-by: Ken Herner --- aws/resource_aws_redshift_cluster_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index d3a05593d57..0b594c6fcbb 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -422,7 +422,7 @@ func TestAccAWSRedshiftCluster_updateNodeType(t *testing.T) { resource.TestCheckResourceAttr( "aws_redshift_cluster.default", "cluster_type", "single-node"), resource.TestCheckResourceAttr( - "aws_redshift_cluster.default", "node_type", "dc1.8xlarge"), + "aws_redshift_cluster.default", "node_type", "dc2.large"), ), }, }, @@ -787,7 +787,7 @@ resource "aws_redshift_cluster" "default" { database_name = "mydb" master_username = "foo_test" master_password = "Mustbe8characters" - node_type = "dc1.8xlarge" + node_type = "dc2.large" automated_snapshot_retention_period = 0 allow_version_upgrade = false number_of_nodes = 1 From 15884698ba495371e5d865563204d9fd986ef97c Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Wed, 2 May 2018 10:28:01 -0400 Subject: [PATCH 0960/3316] Spot price optional for SIR, SFR --- aws/resource_aws_spot_fleet_request.go | 2 +- aws/resource_aws_spot_fleet_request_test.go | 106 ++++++++++++++++++ aws/resource_aws_spot_instance_request.go | 2 +- ...resource_aws_spot_instance_request_test.go | 62 ++++++++++ .../docs/r/launch_configuration.html.markdown | 2 +- .../docs/r/spot_fleet_request.html.markdown | 2 +- .../r/spot_instance_request.html.markdown | 2 +- 7 files changed, 173 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index cadbe2d15bd..6864097ee62 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -294,7 +294,7 @@ func resourceAwsSpotFleetRequest() *schema.Resource { }, "spot_price": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, }, "terminate_instances_with_expiration": { diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index c4982a46933..f259c52dc97 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -312,6 +312,31 @@ func TestAccAWSSpotFleetRequest_overriddingSpotPrice(t *testing.T) { }) } +func TestAccAWSSpotFleetRequest_withoutSpotPrice(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName, rInt), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists( + "aws_spot_fleet_request.foo", &sfr), + resource.TestCheckResourceAttr( + "aws_spot_fleet_request.foo", "spot_request_state", "active"), + resource.TestCheckResourceAttr( + "aws_spot_fleet_request.foo", "launch_specification.#", "2"), + ), + }, + }, + }) +} + func TestAccAWSSpotFleetRequest_diversifiedAllocation(t *testing.T) { var sfr ec2.SpotFleetRequestConfig rName := acctest.RandString(10) @@ -1511,6 +1536,87 @@ resource "aws_spot_fleet_request" "foo" { `, rName, rInt, rInt, rName) } +func testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName string, rInt int) string { + return fmt.Sprintf(` +resource "aws_key_pair" "debugging" { + key_name = "tmp-key-%s" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" +} + +resource "aws_iam_policy" "test-policy" { + name = "test-policy-%d" + path = "/" + description = "Spot Fleet Request ACCTest Policy" + policy = < Date: Fri, 4 May 2018 21:49:29 +0200 Subject: [PATCH 0961/3316] Accoring to ldenman comment: fix Get with wrong variable name, add ForceNew to user_pool_id --- aws/resource_aws_cognito_identity_provider.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_cognito_identity_provider.go b/aws/resource_aws_cognito_identity_provider.go index 3e9a8b6be21..87cb50f4ba1 100644 --- a/aws/resource_aws_cognito_identity_provider.go +++ b/aws/resource_aws_cognito_identity_provider.go @@ -56,6 +56,7 @@ func resourceAwsCognitoIdentityProvider() *schema.Resource { "user_pool_id": { Type: schema.TypeString, Required: true, + ForceNew: true, }, }, } @@ -136,7 +137,7 @@ func resourceAwsCognitoIdentityProviderUpdate(d *schema.ResourceData, meta inter log.Print("[DEBUG] Updating Cognito Identity Provider") params := &cognitoidentityprovider.UpdateIdentityProviderInput{ - UserPoolId: aws.String(d.Get("UserPoolId").(string)), + UserPoolId: aws.String(d.Get("user_pool_id").(string)), ProviderName: aws.String(d.Id()), } From 9075bb5a04933d1d4f0545af229a3a3ac0542ae3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 4 May 2018 17:13:14 -0400 Subject: [PATCH 0962/3316] New Resource and Data Source: aws_acmpca_certficate_authority --- ...source_aws_acmpca_certificate_authority.go | 176 +++++ ...e_aws_acmpca_certificate_authority_test.go | 109 +++ aws/provider.go | 2 + ...source_aws_acmpca_certificate_authority.go | 736 ++++++++++++++++++ ...e_aws_acmpca_certificate_authority_test.go | 643 +++++++++++++++ aws/tagsACMPCA.go | 67 ++ aws/tagsACMPCA_test.go | 77 ++ website/aws.erb | 12 + ...acmpca_certificate_authority.html.markdown | 46 ++ ...acmpca_certificate_authority.html.markdown | 160 ++++ 10 files changed, 2028 insertions(+) create mode 100644 aws/data_source_aws_acmpca_certificate_authority.go create mode 100644 aws/data_source_aws_acmpca_certificate_authority_test.go create mode 100644 aws/resource_aws_acmpca_certificate_authority.go create mode 100644 aws/resource_aws_acmpca_certificate_authority_test.go create mode 100644 aws/tagsACMPCA.go create mode 100644 aws/tagsACMPCA_test.go create mode 100644 website/docs/d/acmpca_certificate_authority.html.markdown create mode 100644 website/docs/r/acmpca_certificate_authority.html.markdown diff --git a/aws/data_source_aws_acmpca_certificate_authority.go b/aws/data_source_aws_acmpca_certificate_authority.go new file mode 100644 index 00000000000..b64902e2ef1 --- /dev/null +++ b/aws/data_source_aws_acmpca_certificate_authority.go @@ -0,0 +1,176 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsAcmpcaCertificateAuthority() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsAcmpcaCertificateAuthorityRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Required: true, + }, + "certificate": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_chain": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_signing_request": { + Type: schema.TypeString, + Computed: true, + }, + "not_after": { + Type: schema.TypeString, + Computed: true, + }, + "not_before": { + Type: schema.TypeString, + Computed: true, + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RevocationConfiguration.html + "revocation_configuration": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CrlConfiguration.html + "crl_configuration": { + Type: schema.TypeList, + Optional: true, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "custom_cname": { + Type: schema.TypeString, + Computed: true, + }, + "enabled": { + Type: schema.TypeBool, + Computed: true, + }, + "expiration_in_days": { + Type: schema.TypeInt, + Computed: true, + }, + "s3_bucket_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "serial": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + "type": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + certificateAuthorityArn := d.Get("arn").(string) + + describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", describeCertificateAuthorityInput) + + describeCertificateAuthorityOutput, err := conn.DescribeCertificateAuthority(describeCertificateAuthorityInput) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority: %s", err) + } + + if describeCertificateAuthorityOutput.CertificateAuthority == nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority: not found") + } + certificateAuthority := describeCertificateAuthorityOutput.CertificateAuthority + + d.Set("arn", certificateAuthority.Arn) + d.Set("not_after", certificateAuthority.NotAfter) + d.Set("not_before", certificateAuthority.NotBefore) + + if err := d.Set("revocation_configuration", flattenAcmpcaRevocationConfiguration(certificateAuthority.RevocationConfiguration)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("serial", certificateAuthority.Serial) + d.Set("status", certificateAuthority.Status) + d.Set("type", certificateAuthority.Type) + + getCertificateAuthorityCertificateInput := &acmpca.GetCertificateAuthorityCertificateInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate: %s", getCertificateAuthorityCertificateInput) + + getCertificateAuthorityCertificateOutput, err := conn.GetCertificateAuthorityCertificate(getCertificateAuthorityCertificateInput) + if err != nil { + // Returned when in PENDING_CERTIFICATE status + // InvalidStateException: The certificate authority XXXXX is not in the correct state to have a certificate signing request. + if !isAWSErr(err, acmpca.ErrCodeInvalidStateException, "") { + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate: %s", err) + } + } + + d.Set("certificate", "") + d.Set("certificate_chain", "") + if getCertificateAuthorityCertificateOutput != nil { + d.Set("certificate", getCertificateAuthorityCertificateOutput.Certificate) + d.Set("certificate_chain", getCertificateAuthorityCertificateOutput.CertificateChain) + } + + getCertificateAuthorityCsrInput := &acmpca.GetCertificateAuthorityCsrInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate Signing Request: %s", getCertificateAuthorityCsrInput) + + getCertificateAuthorityCsrOutput, err := conn.GetCertificateAuthorityCsr(getCertificateAuthorityCsrInput) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate Signing Request: %s", err) + } + + d.Set("certificate_signing_request", "") + if getCertificateAuthorityCsrOutput != nil { + d.Set("certificate_signing_request", getCertificateAuthorityCsrOutput.Csr) + } + + tags, err := listAcmpcaTags(conn, certificateAuthorityArn) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority %q tags: %s", certificateAuthorityArn, err) + } + + if err := d.Set("tags", tagsToMapACMPCA(tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.SetId(certificateAuthorityArn) + + return nil +} diff --git a/aws/data_source_aws_acmpca_certificate_authority_test.go b/aws/data_source_aws_acmpca_certificate_authority_test.go new file mode 100644 index 00000000000..b35cf3d31dc --- /dev/null +++ b/aws/data_source_aws_acmpca_certificate_authority_test.go @@ -0,0 +1,109 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccDataSourceAwsAcmpcaCertificateAuthority_Basic(t *testing.T) { + resourceName := "aws_acmpca_certificate_authority.test" + datasourceName := "data.aws_acmpca_certificate_authority.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsAcmpcaCertificateAuthorityConfig_NonExistent, + ExpectError: regexp.MustCompile(`ResourceNotFoundException`), + }, + { + Config: testAccDataSourceAwsAcmpcaCertificateAuthorityConfig_ARN, + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsAcmpcaCertificateAuthorityCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + +func testAccDataSourceAwsAcmpcaCertificateAuthorityCheck(datasourceName, resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + resource, ok := s.RootModule().Resources[datasourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", datasourceName) + } + + dataSource, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("root module has no resource called %s", resourceName) + } + + attrNames := []string{ + "arn", + "certificate", + "certificate_chain", + "certificate_signing_request", + "not_after", + "not_before", + "revocation_configuration.#", + "revocation_configuration.0.crl_configuration.#", + "revocation_configuration.0.crl_configuration.0.enabled", + "serial", + "status", + "tags.%", + "type", + } + + for _, attrName := range attrNames { + if resource.Primary.Attributes[attrName] != dataSource.Primary.Attributes[attrName] { + return fmt.Errorf( + "%s is %s; want %s", + attrName, + resource.Primary.Attributes[attrName], + dataSource.Primary.Attributes[attrName], + ) + } + } + + return nil + } +} + +const testAccDataSourceAwsAcmpcaCertificateAuthorityConfig_ARN = ` +resource "aws_acmpca_certificate_authority" "wrong" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } +} + +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } +} + +data "aws_acmpca_certificate_authority" "test" { + arn = "${aws_acmpca_certificate_authority.test.arn}" +} +` + +const testAccDataSourceAwsAcmpcaCertificateAuthorityConfig_NonExistent = ` +data "aws_acmpca_certificate_authority" "test" { + arn = "arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/tf-acc-test-does-not-exist" +} +` diff --git a/aws/provider.go b/aws/provider.go index c093890c444..31c12dbad7e 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -161,6 +161,7 @@ func Provider() terraform.ResourceProvider { DataSourcesMap: map[string]*schema.Resource{ "aws_acm_certificate": dataSourceAwsAcmCertificate(), + "aws_acmpca_certificate_authority": dataSourceAwsAcmpcaCertificateAuthority(), "aws_ami": dataSourceAwsAmi(), "aws_ami_ids": dataSourceAwsAmiIds(), "aws_api_gateway_rest_api": dataSourceAwsApiGatewayRestApi(), @@ -255,6 +256,7 @@ func Provider() terraform.ResourceProvider { ResourcesMap: map[string]*schema.Resource{ "aws_acm_certificate": resourceAwsAcmCertificate(), "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), + "aws_acmpca_certificate_authority": resourceAwsAcmpcaCertificateAuthority(), "aws_ami": resourceAwsAmi(), "aws_ami_copy": resourceAwsAmiCopy(), "aws_ami_from_instance": resourceAwsAmiFromInstance(), diff --git a/aws/resource_aws_acmpca_certificate_authority.go b/aws/resource_aws_acmpca_certificate_authority.go new file mode 100644 index 00000000000..067fe3d69d4 --- /dev/null +++ b/aws/resource_aws_acmpca_certificate_authority.go @@ -0,0 +1,736 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsAcmpcaCertificateAuthority() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsAcmpcaCertificateAuthorityCreate, + Read: resourceAwsAcmpcaCertificateAuthorityRead, + Update: resourceAwsAcmpcaCertificateAuthorityUpdate, + Delete: resourceAwsAcmpcaCertificateAuthorityDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(1 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "certificate": { + Type: schema.TypeString, + Computed: true, + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CertificateAuthorityConfiguration.html + "certificate_authority_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key_algorithm": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + acmpca.KeyAlgorithmEcPrime256v1, + acmpca.KeyAlgorithmEcSecp384r1, + acmpca.KeyAlgorithmRsa2048, + acmpca.KeyAlgorithmRsa4096, + }, false), + }, + "signing_algorithm": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + acmpca.SigningAlgorithmSha256withecdsa, + acmpca.SigningAlgorithmSha256withrsa, + acmpca.SigningAlgorithmSha384withecdsa, + acmpca.SigningAlgorithmSha384withrsa, + acmpca.SigningAlgorithmSha512withecdsa, + acmpca.SigningAlgorithmSha512withrsa, + }, false), + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ASN1Subject.html + "subject": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "common_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "country": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 2), + }, + "distinguished_name_qualifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "generation_qualifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 3), + }, + "given_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 16), + }, + "initials": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 5), + }, + "locality": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 128), + }, + "organization": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "organizational_unit": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + "pseudonym": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 128), + }, + "state": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 128), + }, + "surname": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 40), + }, + "title": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 64), + }, + }, + }, + }, + }, + }, + }, + "certificate_chain": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_signing_request": { + Type: schema.TypeString, + Computed: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "not_after": { + Type: schema.TypeString, + Computed: true, + }, + "not_before": { + Type: schema.TypeString, + Computed: true, + }, + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_RevocationConfiguration.html + "revocation_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CrlConfiguration.html + "crl_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "custom_cname": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 253), + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + }, + // ValidationException: 1 validation error detected: Value null or empty at 'expirationInDays' failed to satisfy constraint: Member must not be null or empty. + // InvalidParameter: 1 validation error(s) found. minimum field value of 1, CreateCertificateAuthorityInput.RevocationConfiguration.CrlConfiguration.ExpirationInDays. + "expiration_in_days": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 5000), + }, + "s3_bucket_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 255), + }, + }, + }, + }, + }, + }, + }, + "serial": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), + "type": { + Type: schema.TypeString, + Optional: true, + Default: acmpca.CertificateAuthorityTypeSubordinate, + ValidateFunc: validation.StringInSlice([]string{ + acmpca.CertificateAuthorityTypeSubordinate, + }, false), + }, + }, + } +} + +func resourceAwsAcmpcaCertificateAuthorityCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + + input := &acmpca.CreateCertificateAuthorityInput{ + CertificateAuthorityConfiguration: expandAcmpcaCertificateAuthorityConfiguration(d.Get("certificate_authority_configuration").([]interface{})), + CertificateAuthorityType: aws.String(d.Get("type").(string)), + RevocationConfiguration: expandAcmpcaRevocationConfiguration(d.Get("revocation_configuration").([]interface{})), + } + + log.Printf("[DEBUG] Creating ACMPCA Certificate Authority: %s", input) + var output *acmpca.CreateCertificateAuthorityOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + output, err = conn.CreateCertificateAuthority(input) + if err != nil { + // ValidationException: The ACM Private CA service account 'acm-pca-prod-pdx' requires getBucketAcl permissions for your S3 bucket 'tf-acc-test-5224996536060125340'. Check your S3 bucket permissions and try again. + if isAWSErr(err, "ValidationException", "Check your S3 bucket permissions and try again") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating ACMPCA Certificate Authority: %s", err) + } + + d.SetId(aws.StringValue(output.CertificateAuthorityArn)) + + if v, ok := d.GetOk("tags"); ok { + input := &acmpca.TagCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + Tags: tagsFromMapACMPCA(v.(map[string]interface{})), + } + + log.Printf("[DEBUG] Tagging ACMPCA Certificate Authority: %s", input) + _, err := conn.TagCertificateAuthority(input) + if err != nil { + return fmt.Errorf("error tagging ACMPCA Certificate Authority %q: %s", d.Id(), input) + } + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + "", + acmpca.CertificateAuthorityStatusCreating, + }, + Target: []string{ + acmpca.CertificateAuthorityStatusActive, + acmpca.CertificateAuthorityStatusPendingCertificate, + }, + Refresh: acmpcaCertificateAuthorityRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for ACMPCA Certificate Authority %q to be active or pending certificate: %s", d.Id(), err) + } + + return resourceAwsAcmpcaCertificateAuthorityRead(d, meta) +} + +func resourceAwsAcmpcaCertificateAuthorityRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + + describeCertificateAuthorityInput := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", describeCertificateAuthorityInput) + + describeCertificateAuthorityOutput, err := conn.DescribeCertificateAuthority(describeCertificateAuthorityInput) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading ACMPCA Certificate Authority: %s", err) + } + + if describeCertificateAuthorityOutput.CertificateAuthority == nil { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + certificateAuthority := describeCertificateAuthorityOutput.CertificateAuthority + + d.Set("arn", certificateAuthority.Arn) + + if err := d.Set("certificate_authority_configuration", flattenAcmpcaCertificateAuthorityConfiguration(certificateAuthority.CertificateAuthorityConfiguration)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("enabled", (aws.StringValue(certificateAuthority.Status) != acmpca.CertificateAuthorityStatusDisabled)) + d.Set("not_after", certificateAuthority.NotAfter) + d.Set("not_before", certificateAuthority.NotBefore) + + if err := d.Set("revocation_configuration", flattenAcmpcaRevocationConfiguration(certificateAuthority.RevocationConfiguration)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("serial", certificateAuthority.Serial) + d.Set("status", certificateAuthority.Status) + d.Set("type", certificateAuthority.Type) + + getCertificateAuthorityCertificateInput := &acmpca.GetCertificateAuthorityCertificateInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate: %s", getCertificateAuthorityCertificateInput) + + getCertificateAuthorityCertificateOutput, err := conn.GetCertificateAuthorityCertificate(getCertificateAuthorityCertificateInput) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + // Returned when in PENDING_CERTIFICATE status + // InvalidStateException: The certificate authority XXXXX is not in the correct state to have a certificate signing request. + if !isAWSErr(err, acmpca.ErrCodeInvalidStateException, "") { + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate: %s", err) + } + } + + d.Set("certificate", "") + d.Set("certificate_chain", "") + if getCertificateAuthorityCertificateOutput != nil { + d.Set("certificate", getCertificateAuthorityCertificateOutput.Certificate) + d.Set("certificate_chain", getCertificateAuthorityCertificateOutput.CertificateChain) + } + + getCertificateAuthorityCsrInput := &acmpca.GetCertificateAuthorityCsrInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority Certificate Signing Request: %s", getCertificateAuthorityCsrInput) + + getCertificateAuthorityCsrOutput, err := conn.GetCertificateAuthorityCsr(getCertificateAuthorityCsrInput) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] ACMPCA Certificate Authority %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading ACMPCA Certificate Authority Certificate Signing Request: %s", err) + } + + d.Set("certificate_signing_request", "") + if getCertificateAuthorityCsrOutput != nil { + d.Set("certificate_signing_request", getCertificateAuthorityCsrOutput.Csr) + } + + tags, err := listAcmpcaTags(conn, d.Id()) + if err != nil { + return fmt.Errorf("error reading ACMPCA Certificate Authority %q tags: %s", d.Id(), err) + } + + if err := d.Set("tags", tagsToMapACMPCA(tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsAcmpcaCertificateAuthorityUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + updateCertificateAuthority := false + + input := &acmpca.UpdateCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + if d.HasChange("enabled") { + input.Status = aws.String(acmpca.CertificateAuthorityStatusActive) + if !d.Get("enabled").(bool) { + input.Status = aws.String(acmpca.CertificateAuthorityStatusDisabled) + } + updateCertificateAuthority = true + } + + if d.HasChange("revocation_configuration") { + input.RevocationConfiguration = expandAcmpcaRevocationConfiguration(d.Get("revocation_configuration").([]interface{})) + updateCertificateAuthority = true + } + + if updateCertificateAuthority { + log.Printf("[DEBUG] Updating ACMPCA Certificate Authority: %s", input) + _, err := conn.UpdateCertificateAuthority(input) + if err != nil { + return fmt.Errorf("error updating ACMPCA Certificate Authority: %s", err) + } + } + + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsACMPCA(tagsFromMapACMPCA(o), tagsFromMapACMPCA(n)) + + if len(remove) > 0 { + log.Printf("[DEBUG] Removing ACMPCA Certificate Authority %q tags: %#v", d.Id(), remove) + _, err := conn.UntagCertificateAuthority(&acmpca.UntagCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + Tags: remove, + }) + if err != nil { + return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating ACMPCA Certificate Authority %q tags: %#v", d.Id(), create) + _, err := conn.TagCertificateAuthority(&acmpca.TagCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + Tags: create, + }) + if err != nil { + return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) + } + } + } + + return resourceAwsAcmpcaCertificateAuthorityRead(d, meta) +} + +func resourceAwsAcmpcaCertificateAuthorityDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).acmpcaconn + + input := &acmpca.DeleteCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting ACMPCA Certificate Authority: %s", input) + _, err := conn.DeleteCertificateAuthority(input) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting ACMPCA Certificate Authority: %s", err) + } + + return nil +} + +func acmpcaCertificateAuthorityRefreshFunc(conn *acmpca.ACMPCA, certificateAuthorityArn string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + log.Printf("[DEBUG] Reading ACMPCA Certificate Authority: %s", input) + output, err := conn.DescribeCertificateAuthority(input) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + return nil, "", nil + } + return nil, "", err + } + + if output == nil || output.CertificateAuthority == nil { + return nil, "", nil + } + + return output.CertificateAuthority, aws.StringValue(output.CertificateAuthority.Status), nil + } +} + +func expandAcmpcaASN1Subject(l []interface{}) *acmpca.ASN1Subject { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + subject := &acmpca.ASN1Subject{} + if v, ok := m["common_name"]; ok && v.(string) != "" { + subject.CommonName = aws.String(v.(string)) + } + if v, ok := m["country"]; ok && v.(string) != "" { + subject.Country = aws.String(v.(string)) + } + if v, ok := m["distinguished_name_qualifier"]; ok && v.(string) != "" { + subject.DistinguishedNameQualifier = aws.String(v.(string)) + } + if v, ok := m["generation_qualifier"]; ok && v.(string) != "" { + subject.GenerationQualifier = aws.String(v.(string)) + } + if v, ok := m["given_name"]; ok && v.(string) != "" { + subject.GivenName = aws.String(v.(string)) + } + if v, ok := m["initials"]; ok && v.(string) != "" { + subject.Initials = aws.String(v.(string)) + } + if v, ok := m["locality"]; ok && v.(string) != "" { + subject.Locality = aws.String(v.(string)) + } + if v, ok := m["organization"]; ok && v.(string) != "" { + subject.Organization = aws.String(v.(string)) + } + if v, ok := m["organizational_unit"]; ok && v.(string) != "" { + subject.OrganizationalUnit = aws.String(v.(string)) + } + if v, ok := m["pseudonym"]; ok && v.(string) != "" { + subject.Pseudonym = aws.String(v.(string)) + } + if v, ok := m["state"]; ok && v.(string) != "" { + subject.State = aws.String(v.(string)) + } + if v, ok := m["surname"]; ok && v.(string) != "" { + subject.Surname = aws.String(v.(string)) + } + if v, ok := m["title"]; ok && v.(string) != "" { + subject.Title = aws.String(v.(string)) + } + + return subject +} + +func expandAcmpcaCertificateAuthorityConfiguration(l []interface{}) *acmpca.CertificateAuthorityConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + config := &acmpca.CertificateAuthorityConfiguration{ + KeyAlgorithm: aws.String(m["key_algorithm"].(string)), + SigningAlgorithm: aws.String(m["signing_algorithm"].(string)), + Subject: expandAcmpcaASN1Subject(m["subject"].([]interface{})), + } + + return config +} + +func expandAcmpcaCrlConfiguration(l []interface{}) *acmpca.CrlConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + config := &acmpca.CrlConfiguration{ + Enabled: aws.Bool(m["enabled"].(bool)), + } + + if v, ok := m["custom_cname"]; ok && v.(string) != "" { + config.CustomCname = aws.String(v.(string)) + } + if v, ok := m["expiration_in_days"]; ok && v.(int) > 0 { + config.ExpirationInDays = aws.Int64(int64(v.(int))) + } + if v, ok := m["s3_bucket_name"]; ok && v.(string) != "" { + config.S3BucketName = aws.String(v.(string)) + } + + return config +} + +func expandAcmpcaRevocationConfiguration(l []interface{}) *acmpca.RevocationConfiguration { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + config := &acmpca.RevocationConfiguration{ + CrlConfiguration: expandAcmpcaCrlConfiguration(m["crl_configuration"].([]interface{})), + } + + return config +} + +func flattenAcmpcaASN1Subject(subject *acmpca.ASN1Subject) []interface{} { + if subject == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "common_name": aws.StringValue(subject.CommonName), + "country": aws.StringValue(subject.Country), + "distinguished_name_qualifier": aws.StringValue(subject.DistinguishedNameQualifier), + "generation_qualifier": aws.StringValue(subject.GenerationQualifier), + "given_name": aws.StringValue(subject.GivenName), + "initials": aws.StringValue(subject.Initials), + "locality": aws.StringValue(subject.Locality), + "organization": aws.StringValue(subject.Organization), + "organizational_unit": aws.StringValue(subject.OrganizationalUnit), + "pseudonym": aws.StringValue(subject.Pseudonym), + "state": aws.StringValue(subject.State), + "surname": aws.StringValue(subject.Surname), + "title": aws.StringValue(subject.Title), + } + + return []interface{}{m} +} + +func flattenAcmpcaCertificateAuthorityConfiguration(config *acmpca.CertificateAuthorityConfiguration) []interface{} { + if config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "key_algorithm": aws.StringValue(config.KeyAlgorithm), + "signing_algorithm": aws.StringValue(config.SigningAlgorithm), + "subject": flattenAcmpcaASN1Subject(config.Subject), + } + + return []interface{}{m} +} + +func flattenAcmpcaCrlConfiguration(config *acmpca.CrlConfiguration) []interface{} { + if config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "custom_cname": aws.StringValue(config.CustomCname), + "enabled": aws.BoolValue(config.Enabled), + "expiration_in_days": int(aws.Int64Value(config.ExpirationInDays)), + "s3_bucket_name": aws.StringValue(config.S3BucketName), + } + + return []interface{}{m} +} + +func flattenAcmpcaRevocationConfiguration(config *acmpca.RevocationConfiguration) []interface{} { + if config == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "crl_configuration": flattenAcmpcaCrlConfiguration(config.CrlConfiguration), + } + + return []interface{}{m} +} + +func listAcmpcaCertificateAuthorities(conn *acmpca.ACMPCA) ([]*acmpca.CertificateAuthority, error) { + certificateAuthorities := []*acmpca.CertificateAuthority{} + input := &acmpca.ListCertificateAuthoritiesInput{} + + for { + output, err := conn.ListCertificateAuthorities(input) + if err != nil { + return certificateAuthorities, err + } + for _, certificateAuthority := range output.CertificateAuthorities { + certificateAuthorities = append(certificateAuthorities, certificateAuthority) + } + if output.NextToken == nil { + break + } + input.NextToken = output.NextToken + } + + return certificateAuthorities, nil +} + +func listAcmpcaTags(conn *acmpca.ACMPCA, certificateAuthorityArn string) ([]*acmpca.Tag, error) { + tags := []*acmpca.Tag{} + input := &acmpca.ListTagsInput{ + CertificateAuthorityArn: aws.String(certificateAuthorityArn), + } + + for { + output, err := conn.ListTags(input) + if err != nil { + return tags, err + } + for _, tag := range output.Tags { + tags = append(tags, tag) + } + if output.NextToken == nil { + break + } + input.NextToken = output.NextToken + } + + return tags, nil +} diff --git a/aws/resource_aws_acmpca_certificate_authority_test.go b/aws/resource_aws_acmpca_certificate_authority_test.go new file mode 100644 index 00000000000..ccee6ae9eab --- /dev/null +++ b/aws/resource_aws_acmpca_certificate_authority_test.go @@ -0,0 +1,643 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func init() { + resource.AddTestSweepers("aws_acmpca_certificate_authority", &resource.Sweeper{ + Name: "aws_acmpca_certificate_authority", + F: testSweepAcmpcaCertificateAuthorities, + }) +} + +func testSweepAcmpcaCertificateAuthorities(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).acmpcaconn + + certificateAuthorities, err := listAcmpcaCertificateAuthorities(conn) + if err != nil { + return fmt.Errorf("Error retrieving ACMPCA Certificate Authorities: %s", err) + } + if len(certificateAuthorities) == 0 { + log.Print("[DEBUG] No ACMPCA Certificate Authorities to sweep") + return nil + } + + for _, certificateAuthority := range certificateAuthorities { + arn := aws.StringValue(certificateAuthority.Arn) + log.Printf("[INFO] Deleting ACMPCA Certificate Authority: %s", arn) + input := &acmpca.DeleteCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(arn), + } + + _, err := conn.DeleteCertificateAuthority(input) + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + continue + } + log.Printf("[ERROR] Failed to delete ACMPCA Certificate Authority (%s): %s", arn, err) + } + } + + return nil +} + +func TestAccAwsAcmpcaCertificateAuthority_Basic(t *testing.T) { + var certificateAuthority acmpca.CertificateAuthority + resourceName := "aws_acmpca_certificate_authority.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Required, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(`^arn:[^:]+:acm-pca:[^:]+:[^:]+:certificate-authority/.+$`)), + resource.TestCheckResourceAttr(resourceName, "certificate_authority_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "certificate_authority_configuration.0.key_algorithm", "RSA_4096"), + resource.TestCheckResourceAttr(resourceName, "certificate_authority_configuration.0.signing_algorithm", "SHA512WITHRSA"), + resource.TestCheckResourceAttr(resourceName, "certificate_authority_configuration.0.subject.#", "1"), + resource.TestCheckResourceAttr(resourceName, "certificate_authority_configuration.0.subject.0.common_name", "terraformtesting.com"), + resource.TestCheckResourceAttr(resourceName, "certificate", ""), + resource.TestCheckResourceAttr(resourceName, "certificate_chain", ""), + resource.TestCheckResourceAttrSet(resourceName, "certificate_signing_request"), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "not_after", ""), + resource.TestCheckResourceAttr(resourceName, "not_before", ""), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "serial", ""), + resource.TestCheckResourceAttr(resourceName, "status", "PENDING_CERTIFICATE"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "type", "SUBORDINATE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAcmpcaCertificateAuthority_Enabled(t *testing.T) { + var certificateAuthority acmpca.CertificateAuthority + resourceName := "aws_acmpca_certificate_authority.test" + + // error updating ACMPCA Certificate Authority: InvalidStateException: The certificate authority must be in the Active or DISABLED state to be updated + t.Skip("We need to fully sign the certificate authority CSR from another CA in order to test this functionality, which requires another resource") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Enabled(true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "status", "PENDING_CERTIFICATE"), + ), + }, + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Enabled(false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "status", "DISABLED"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAcmpcaCertificateAuthority_RevocationConfiguration_CrlConfiguration_CustomCname(t *testing.T) { + var certificateAuthority acmpca.CertificateAuthority + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_acmpca_certificate_authority.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, + Steps: []resource.TestStep{ + // Test creating revocation configuration on resource creation + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_CustomCname(rName, "crl.terraformtesting.com"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.custom_cname", "crl.terraformtesting.com"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test importing revocation configuration + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + // Test updating revocation configuration + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_CustomCname(rName, "crl2.terraformtesting.com"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.custom_cname", "crl2.terraformtesting.com"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test removing custom cname on resource update + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_Enabled(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.custom_cname", ""), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test adding custom cname on resource update + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_CustomCname(rName, "crl.terraformtesting.com"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.custom_cname", "crl.terraformtesting.com"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test removing revocation configuration on resource update + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Required, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "false"), + ), + }, + }, + }) +} + +func TestAccAwsAcmpcaCertificateAuthority_RevocationConfiguration_CrlConfiguration_Enabled(t *testing.T) { + var certificateAuthority acmpca.CertificateAuthority + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_acmpca_certificate_authority.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, + Steps: []resource.TestStep{ + // Test creating revocation configuration on resource creation + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_Enabled(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.custom_cname", ""), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test importing revocation configuration + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + // Test disabling revocation configuration + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_Enabled(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "false"), + ), + }, + // Test enabling revocation configuration + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_Enabled(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.custom_cname", ""), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test removing revocation configuration on resource update + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Required, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "false"), + ), + }, + }, + }) +} + +func TestAccAwsAcmpcaCertificateAuthority_RevocationConfiguration_CrlConfiguration_ExpirationInDays(t *testing.T) { + var certificateAuthority acmpca.CertificateAuthority + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_acmpca_certificate_authority.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, + Steps: []resource.TestStep{ + // Test creating revocation configuration on resource creation + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_ExpirationInDays(rName, 1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.custom_cname", ""), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test importing revocation configuration + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + // Test updating revocation configuration + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_ExpirationInDays(rName, 2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.expiration_in_days", "2"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.s3_bucket_name", rName), + ), + }, + // Test removing revocation configuration on resource update + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Required, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "revocation_configuration.0.crl_configuration.0.enabled", "false"), + ), + }, + }, + }) +} + +func TestAccAwsAcmpcaCertificateAuthority_Tags(t *testing.T) { + var certificateAuthority acmpca.CertificateAuthority + resourceName := "aws_acmpca_certificate_authority.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Tags_Single, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value"), + ), + }, + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Tags_SingleUpdated, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value-updated"), + ), + }, + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Tags_Multiple, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value"), + resource.TestCheckResourceAttr(resourceName, "tags.tag2", "tag2value"), + ), + }, + { + Config: testAccAwsAcmpcaCertificateAuthorityConfig_Tags_Single, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName, &certificateAuthority), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.tag1", "tag1value"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsAcmpcaCertificateAuthorityDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).acmpcaconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_acmpca_certificate_authority" { + continue + } + + input := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(rs.Primary.ID), + } + + output, err := conn.DescribeCertificateAuthority(input) + + if err != nil { + if isAWSErr(err, acmpca.ErrCodeResourceNotFoundException, "") { + return nil + } + return err + } + + if output != nil { + return fmt.Errorf("ACMPCA Certificate Authority %q still exists", rs.Primary.ID) + } + } + + return nil + +} + +func testAccCheckAwsAcmpcaCertificateAuthorityExists(resourceName string, certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + conn := testAccProvider.Meta().(*AWSClient).acmpcaconn + input := &acmpca.DescribeCertificateAuthorityInput{ + CertificateAuthorityArn: aws.String(rs.Primary.ID), + } + + output, err := conn.DescribeCertificateAuthority(input) + + if err != nil { + return err + } + + if output == nil || output.CertificateAuthority == nil { + return fmt.Errorf("ACMPCA Certificate Authority %q does not exist", rs.Primary.ID) + } + + *certificateAuthority = *output.CertificateAuthority + + return nil + } +} + +func testAccAwsAcmpcaCertificateAuthorityConfig_Enabled(enabled bool) string { + return fmt.Sprintf(` +resource "aws_acmpca_certificate_authority" "test" { + enabled = %t + + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } +} +`, enabled) +} + +const testAccAwsAcmpcaCertificateAuthorityConfig_Required = ` +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } +} +` + +func testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_CustomCname(rName, customCname string) string { + return fmt.Sprintf(` +%s + +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } + + revocation_configuration { + crl_configuration { + custom_cname = "%s" + enabled = true + expiration_in_days = 1 + s3_bucket_name = "${aws_s3_bucket.test.id}" + } + } + + depends_on = ["aws_s3_bucket_policy.test"] +} +`, testAccAwsAcmpcaCertificateAuthorityConfig_S3Bucket(rName), customCname) +} + +func testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_Enabled(rName string, enabled bool) string { + return fmt.Sprintf(` +%s + +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } + + revocation_configuration { + crl_configuration { + enabled = %t + expiration_in_days = 1 + s3_bucket_name = "${aws_s3_bucket.test.id}" + } + } +} +`, testAccAwsAcmpcaCertificateAuthorityConfig_S3Bucket(rName), enabled) +} + +func testAccAwsAcmpcaCertificateAuthorityConfig_RevocationConfiguration_CrlConfiguration_ExpirationInDays(rName string, expirationInDays int) string { + return fmt.Sprintf(` +%s + +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } + + revocation_configuration { + crl_configuration { + enabled = true + expiration_in_days = %d + s3_bucket_name = "${aws_s3_bucket.test.id}" + } + } +} +`, testAccAwsAcmpcaCertificateAuthorityConfig_S3Bucket(rName), expirationInDays) +} + +func testAccAwsAcmpcaCertificateAuthorityConfig_S3Bucket(rName string) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "%s" + force_destroy = true +} + +data "aws_iam_policy_document" "acmpca_bucket_access" { + statement { + actions = [ + "s3:GetBucketAcl", + "s3:GetBucketLocation", + "s3:PutObject", + "s3:PutObjectAcl", + ] + + resources = [ + "${aws_s3_bucket.test.arn}", + "${aws_s3_bucket.test.arn}/*", + ] + + principals { + identifiers = ["acm-pca.amazonaws.com"] + type = "Service" + } + } +} + +resource "aws_s3_bucket_policy" "test" { + bucket = "${aws_s3_bucket.test.id}" + policy = "${data.aws_iam_policy_document.acmpca_bucket_access.json}" +} +`, rName) +} + +const testAccAwsAcmpcaCertificateAuthorityConfig_Tags_Single = ` +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } + + tags = { + tag1 = "tag1value" + } +} +` + +const testAccAwsAcmpcaCertificateAuthorityConfig_Tags_SingleUpdated = ` +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } + + tags = { + tag1 = "tag1value-updated" + } +} +` + +const testAccAwsAcmpcaCertificateAuthorityConfig_Tags_Multiple = ` +resource "aws_acmpca_certificate_authority" "test" { + certificate_authority_configuration { + key_algorithm = "RSA_4096" + signing_algorithm = "SHA512WITHRSA" + + subject { + common_name = "terraformtesting.com" + } + } + + tags = { + tag1 = "tag1value" + tag2 = "tag2value" + } +} +` diff --git a/aws/tagsACMPCA.go b/aws/tagsACMPCA.go new file mode 100644 index 00000000000..3b72390ff6a --- /dev/null +++ b/aws/tagsACMPCA.go @@ -0,0 +1,67 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsACMPCA(oldTags, newTags []*acmpca.Tag) ([]*acmpca.Tag, []*acmpca.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*acmpca.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapACMPCA(create), remove +} + +func tagsFromMapACMPCA(m map[string]interface{}) []*acmpca.Tag { + result := []*acmpca.Tag{} + for k, v := range m { + result = append(result, &acmpca.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + }) + } + + return result +} + +func tagsToMapACMPCA(ts []*acmpca.Tag) map[string]string { + result := map[string]string{} + for _, t := range ts { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredACMPCA(t *acmpca.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) + if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) + return true + } + } + return false +} diff --git a/aws/tagsACMPCA_test.go b/aws/tagsACMPCA_test.go new file mode 100644 index 00000000000..60daf35457a --- /dev/null +++ b/aws/tagsACMPCA_test.go @@ -0,0 +1,77 @@ +package aws + +import ( + "reflect" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/acmpca" +) + +func TestDiffTagsACMPCA(t *testing.T) { + cases := []struct { + Old, New map[string]interface{} + Create, Remove map[string]string + }{ + // Basic add/remove + { + Old: map[string]interface{}{ + "foo": "bar", + }, + New: map[string]interface{}{ + "bar": "baz", + }, + Create: map[string]string{ + "bar": "baz", + }, + Remove: map[string]string{ + "foo": "bar", + }, + }, + + // Modify + { + Old: map[string]interface{}{ + "foo": "bar", + }, + New: map[string]interface{}{ + "foo": "baz", + }, + Create: map[string]string{ + "foo": "baz", + }, + Remove: map[string]string{ + "foo": "bar", + }, + }, + } + + for i, tc := range cases { + c, r := diffTagsACMPCA(tagsFromMapACMPCA(tc.Old), tagsFromMapACMPCA(tc.New)) + cm := tagsToMapACMPCA(c) + rm := tagsToMapACMPCA(r) + if !reflect.DeepEqual(cm, tc.Create) { + t.Fatalf("%d: bad create: %#v", i, cm) + } + if !reflect.DeepEqual(rm, tc.Remove) { + t.Fatalf("%d: bad remove: %#v", i, rm) + } + } +} + +func TestIgnoringTagsACMPCA(t *testing.T) { + var ignoredTags []*acmpca.Tag + ignoredTags = append(ignoredTags, &acmpca.Tag{ + Key: aws.String("aws:cloudformation:logical-id"), + Value: aws.String("foo"), + }) + ignoredTags = append(ignoredTags, &acmpca.Tag{ + Key: aws.String("aws:foo:bar"), + Value: aws.String("baz"), + }) + for _, tag := range ignoredTags { + if !tagIgnoredACMPCA(tag) { + t.Fatalf("Tag %v with value %v not ignored, but should be!", *tag.Key, *tag.Value) + } + } +} diff --git a/website/aws.erb b/website/aws.erb index 3e08ecf2ac2..80b0226de43 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -28,6 +28,9 @@ > aws_acm_certificate + > + aws_acmpca_certificate_authority + > aws_alb @@ -304,6 +307,15 @@ + > + ACM PCA Resources + + + > API Gateway Resources diff --git a/website/docs/r/glue_trigger.html.markdown b/website/docs/r/glue_trigger.html.markdown new file mode 100644 index 00000000000..17dcaa210ca --- /dev/null +++ b/website/docs/r/glue_trigger.html.markdown @@ -0,0 +1,112 @@ +--- +layout: "aws" +page_title: "AWS: aws_glue_trigger" +sidebar_current: "docs-aws-resource-glue-trigger" +description: |- + Provides an Glue Trigger resource. +--- + +# aws_glue_trigger + +Provides a Glue Job resource. + +## Example Usage + +### Conditional Trigger + +```hcl +resource "aws_glue_trigger" "example" { + name = "example" + type = "CONDITIONAL" + + actions { + job_name = "${aws_glue_job.example1.name}" + } + + predicate { + conditions { + job_name = "${aws_glue_job.example2.name}" + state = "SUCCEEDED" + } + } +} +``` + +### On-Demand Trigger + +```hcl +resource "aws_glue_trigger" "example" { + name = "example" + type = "ON_DEMAND" + + actions { + job_name = "${aws_glue_job.example.name}" + } +} +``` + +### Scheduled Trigger + +```hcl +resource "aws_glue_trigger" "example" { + name = "example" + schedule = "cron(15 12 * * ? *)" + type = "SCHEDULED" + + actions { + job_name = "${aws_glue_job.example.name}" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `actions` – (Required) List of actions initiated by this trigger when it fires. Defined below. +* `description` – (Optional) A description of the new trigger. +* `enabled` – (Optional) Start the trigger. Defaults to `true`. Not valid to disable for `ON_DEMAND` type. +* `name` – (Required) The name of the trigger. +* `predicate` – (Optional) A predicate to specify when the new trigger should fire. Required when trigger type is `CONDITIONAL`. Defined below. +* `schedule` – (Optional) A cron expression used to specify the schedule. [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html) +* `type` – (Required) The type of trigger. Valid values are `CONDITIONAL`, `ON_DEMAND`, and `SCHEDULED`. + +### actions Argument Reference + +* `arguments` - (Optional) Arguments to be passed to the job. You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue itself consumes. +* `job_name` - (Required) The name of a job to be executed. +* `timeout` - (Optional) The job run timeout in minutes. It overrides the timeout value of the job. + +### predicate Argument Reference + +* `conditions` - (Required) A list of the conditions that determine when the trigger will fire. Defined below. +* `logical` - (Optional) How to handle multiple conditions. Defaults to `AND`. Valid values are `AND` or `ANY`. + +#### conditions Argument Reference + +* `job_name` - (Required) The name of the job to watch. +* `logical_operator` - (Optional) A logical operator. Defaults to `EQUALS`. +* `state` - (Required) The condition state. Currently, the values supported are `SUCCEEDED`, `STOPPED`, `TIMEOUT` and `FAILED`. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - Trigger name + +## Timeouts + +`aws_glue_trigger` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) +configuration options: + +- `create` - (Default `5m`) How long to wait for a trigger to be created. +- `delete` - (Default `5m`) How long to wait for a trigger to be deleted. + + +## Import + +Glue Triggers can be imported using `name`, e.g. + +``` +$ terraform import aws_glue_trigger.MyTrigger Myrigger +``` From 86bbebe8344e614cd28fb10121de25ac4b8e81f1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sun, 6 May 2018 15:59:13 -0400 Subject: [PATCH 0970/3316] GitHub: Template updates to hide template guidance sentences, link to reaction documentation, and link to HashiCorp GPG key --- .github/ISSUE_TEMPLATE/Bug_Report.md | 32 +++++++++++++---------- .github/ISSUE_TEMPLATE/Feature_Request.md | 15 ++++++----- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md index 99df0e4dfa1..e320d8a9ac0 100644 --- a/.github/ISSUE_TEMPLATE/Bug_Report.md +++ b/.github/ISSUE_TEMPLATE/Bug_Report.md @@ -4,6 +4,7 @@ about: If something isn't working as expected 🤔. --- + ### Community Note -* Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request +* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request +* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request * If you are interested in working on this issue or have submitted a pull request, please leave a comment ### Terraform Version -Please run `terraform -v` to show the Terraform core version and provider version(s). If you are not running the latest version of Terraform or the provider, please upgrade because your issue may have already been fixed. [Terraform documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#provider-versions). + ### Affected Resource(s) -Please list the resources and data sources, for example: + -* aws_instance -* aws_rds_cluster +* aws_XXXXX ### Terraform Configuration Files @@ -43,41 +43,45 @@ Please list the resources and data sources, for example: ```hcl # Copy-paste your Terraform configurations here - for large Terraform configs, # please use a service like Dropbox and share a link to the ZIP file. For -# security, you can also encrypt the files using our GPG public key. +# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp ``` ### Debug Output + ### Panic Output -If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`. + ### Expected Behavior -What should have happened? + ### Actual Behavior -What actually happened? + ### Steps to Reproduce -Please list the steps required to reproduce the issue, for example: + 1. `terraform apply` ### Important Factoids -Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? + ### References - + * #0000 diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.md b/.github/ISSUE_TEMPLATE/Feature_Request.md index 492acf2737d..f52c8ab0956 100644 --- a/.github/ISSUE_TEMPLATE/Feature_Request.md +++ b/.github/ISSUE_TEMPLATE/Feature_Request.md @@ -8,21 +8,21 @@ about: I have a suggestion (and might want to implement myself 🙂)! ### Community Note -* Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request +* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request +* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request * If you are interested in working on this issue or have submitted a pull request, please leave a comment ### Description -Please leave a helpful description of the feature request here. + ### New or Affected Resource(s) -Please list the resources and data sources, for example: + -* aws_instance -* aws_rds_cluster +* aws_XXXXX ### Potential Terraform Configuration @@ -36,9 +36,12 @@ Please list the resources and data sources, for example: ### References - + + * #0000 From 4171cd077cd6b7e283c678424697c43330d387b7 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Sun, 6 May 2018 20:12:01 -0400 Subject: [PATCH 0971/3316] Handle empty strings in s3 cors settings. [Fixes #4258] --- aws/resource_aws_s3_bucket.go | 5 ++-- aws/resource_aws_s3_bucket_test.go | 42 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index bffcaf499d8..3562c6bf79e 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -1259,8 +1259,9 @@ func resourceAwsS3BucketCorsUpdate(s3conn *s3.S3, d *schema.ResourceData) error } else { vMap := make([]*string, len(v.([]interface{}))) for i, vv := range v.([]interface{}) { - str := vv.(string) - vMap[i] = aws.String(str) + if str, ok := vv.(string); ok { + vMap[i] = aws.String(str) + } } switch k { case "allowed_headers": diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index 4b72922e75b..5eeaf8b6d43 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -587,6 +587,32 @@ func TestAccAWSS3Bucket_Cors(t *testing.T) { }, }, }) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSS3BucketConfigWithCORSEmptyOrigin(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExists("aws_s3_bucket.bucket"), + testAccCheckAWSS3BucketCors( + "aws_s3_bucket.bucket", + []*s3.CORSRule{ + { + AllowedHeaders: []*string{aws.String("*")}, + AllowedMethods: []*string{aws.String("PUT"), aws.String("POST")}, + AllowedOrigins: []*string{aws.String("")}, + ExposeHeaders: []*string{aws.String("x-amz-server-side-encryption"), aws.String("ETag")}, + MaxAgeSeconds: aws.Int64(3000), + }, + }, + ), + ), + }, + }, + }) } func TestAccAWSS3Bucket_Logging(t *testing.T) { @@ -1664,6 +1690,22 @@ resource "aws_s3_bucket" "bucket" { `, randInt) } +func testAccAWSS3BucketConfigWithCORSEmptyOrigin(randInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "bucket" { + bucket = "tf-test-bucket-%d" + acl = "public-read" + cors_rule { + allowed_headers = ["*"] + allowed_methods = ["PUT","POST"] + allowed_origins = [""] + expose_headers = ["x-amz-server-side-encryption","ETag"] + max_age_seconds = 3000 + } +} +`, randInt) +} + var testAccAWSS3BucketConfigWithAcl = ` resource "aws_s3_bucket" "bucket" { bucket = "tf-test-bucket-%d" From e3382568caa67457d2e44fa78210cca4ccf89ae2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 07:46:57 -0400 Subject: [PATCH 0972/3316] Deps: Bump aws-sdk-go@v1.13.42 --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 1 + .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/appsync/api.go | 321 +++++- .../aws/aws-sdk-go/service/appsync/errors.go | 3 +- .../aws-sdk-go/service/configservice/api.go | 34 +- .../aws/aws-sdk-go/service/guardduty/api.go | 1007 ++++++++++++++++- .../aws-sdk-go/service/secretsmanager/api.go | 29 +- vendor/vendor.json | 924 +++++++-------- 8 files changed, 1811 insertions(+), 510 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 55eff20774f..fbbfd0184a6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -2326,6 +2326,7 @@ var awsPartition = partition{ "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 9928c7999f6..4b7f07a3884 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.40" +const SDKVersion = "1.13.42" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go index 5ed7f6e2a50..e75e8b141ce 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go @@ -87,7 +87,8 @@ func (c *AppSync) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Re // The API key exceeded a limit. Try your request again. // // * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" -// The API key expiration must be set to a value between 1 and 365 days. +// The API key expiration must be set to a value between 1 and 365 days from +// creation (for CreateApiKey) or from update (for UpdateApiKey). // // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateApiKey func (c *AppSync) CreateApiKey(input *CreateApiKeyInput) (*CreateApiKeyOutput, error) { @@ -276,9 +277,6 @@ func (c *AppSync) CreateGraphqlApiRequest(input *CreateGraphqlApiInput) (req *re // * ErrCodeInternalFailureException "InternalFailureException" // An internal AWS AppSync error occurred. Try your request again. // -// * ErrCodeLimitExceededException "LimitExceededException" -// The request exceeded a limit. Try your request again. -// // * ErrCodeApiLimitExceededException "ApiLimitExceededException" // The GraphQL API exceeded a limit. Try your request again. // @@ -1543,6 +1541,11 @@ func (c *AppSync) ListApiKeysRequest(input *ListApiKeysInput) (req *request.Requ // // Lists the API keys for a given API. // +// API keys are deleted automatically sometime after they expire. However, they +// may still be included in the response until they have actually been deleted. +// You can safely call DeleteApiKey to manually delete a key before it's automatically +// deleted. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -2115,7 +2118,8 @@ func (c *AppSync) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Re // An internal AWS AppSync error occurred. Try your request again. // // * ErrCodeApiKeyValidityOutOfBoundsException "ApiKeyValidityOutOfBoundsException" -// The API key expiration must be set to a value between 1 and 365 days. +// The API key expiration must be set to a value between 1 and 365 days from +// creation (for CreateApiKey) or from update (for UpdateApiKey). // // See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateApiKey func (c *AppSync) UpdateApiKey(input *UpdateApiKeyInput) (*UpdateApiKeyOutput, error) { @@ -2512,6 +2516,43 @@ func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, } // Describes an API key. +// +// Customers invoke AWS AppSync GraphQL APIs with API keys as an identity mechanism. +// There are two key versions: +// +// da1: This version was introduced at launch in November 2017. These keys always +// expire after 7 days. Key expiration is managed by DynamoDB TTL. The keys +// will cease to be valid after Feb 21, 2018 and should not be used after that +// date. +// +// * ListApiKeys returns the expiration time in milliseconds. +// +// * CreateApiKey returns the expiration time in milliseconds. +// +// * UpdateApiKey is not available for this key version. +// +// * DeleteApiKey deletes the item from the table. +// +// * Expiration is stored in DynamoDB as milliseconds. This results in a +// bug where keys are not automatically deleted because DynamoDB expects +// the TTL to be stored in seconds. As a one-time action, we will delete +// these keys from the table after Feb 21, 2018. +// +// da2: This version was introduced in February 2018 when AppSync added support +// to extend key expiration. +// +// * ListApiKeys returns the expiration time in seconds. +// +// * CreateApiKey returns the expiration time in seconds and accepts a user-provided +// expiration time in seconds. +// +// * UpdateApiKey returns the expiration time in seconds and accepts a user-provided +// expiration time in seconds. Key expiration can only be updated while the +// key has not expired. +// +// * DeleteApiKey deletes the item from the table. +// +// * Expiration is stored in DynamoDB as seconds. type ApiKey struct { _ struct{} `type:"structure"` @@ -2565,9 +2606,10 @@ type CreateApiKeyInput struct { // A description of the purpose of the API key. Description *string `locationName:"description" type:"string"` - // The time after which the API key expires. The date is represented as seconds - // since the epoch, rounded down to the nearest hour. The default value for - // this parameter is 7 days from creation time. + // The time from creation time after which the API key expires. The date is + // represented as seconds since the epoch, rounded down to the nearest hour. + // The default value for this parameter is 7 days from creation time. For more + // information, see . Expires *int64 `locationName:"expires" type:"long"` } @@ -2793,11 +2835,17 @@ type CreateGraphqlApiInput struct { // AuthenticationType is a required field AuthenticationType *string `locationName:"authenticationType" type:"string" required:"true" enum:"AuthenticationType"` + // The Amazon CloudWatch logs configuration. + LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + // A user-supplied name for the GraphqlApi. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` + // The Open Id Connect configuration configuration. + OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + // The Amazon Cognito User Pool configuration. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` } @@ -2821,6 +2869,16 @@ func (s *CreateGraphqlApiInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.LogConfig != nil { + if err := s.LogConfig.Validate(); err != nil { + invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) + } + } + if s.OpenIDConnectConfig != nil { + if err := s.OpenIDConnectConfig.Validate(); err != nil { + invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) + } + } if s.UserPoolConfig != nil { if err := s.UserPoolConfig.Validate(); err != nil { invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) @@ -2839,12 +2897,24 @@ func (s *CreateGraphqlApiInput) SetAuthenticationType(v string) *CreateGraphqlAp return s } +// SetLogConfig sets the LogConfig field's value. +func (s *CreateGraphqlApiInput) SetLogConfig(v *LogConfig) *CreateGraphqlApiInput { + s.LogConfig = v + return s +} + // SetName sets the Name field's value. func (s *CreateGraphqlApiInput) SetName(v string) *CreateGraphqlApiInput { s.Name = &v return s } +// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. +func (s *CreateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *CreateGraphqlApiInput { + s.OpenIDConnectConfig = v + return s +} + // SetUserPoolConfig sets the UserPoolConfig field's value. func (s *CreateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *CreateGraphqlApiInput { s.UserPoolConfig = v @@ -2899,10 +2969,10 @@ type CreateResolverInput struct { // in Apache Velocity Template Language (VTL). // // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string" required:"true"` + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` // The mapping template to be used for responses from the data source. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` // The name of the Type. // @@ -2935,6 +3005,12 @@ func (s *CreateResolverInput) Validate() error { if s.RequestMappingTemplate == nil { invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) } + if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) + } + if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } @@ -3130,8 +3206,10 @@ type DataSource struct { // // * AWS_LAMBDA: The data source is an AWS Lambda function. // - // * NONE: There is no data source. This type is used when the required information - // can be computed on the fly without connecting to a back-end data source. + // * NONE: There is no data source. This type is used when when you wish + // to invoke a GraphQL operation without connecting to a data source, such + // as performing data transformation with resolvers or triggering a subscription + // to be invoked from a mutation. Type *string `locationName:"type" type:"string" enum:"DataSourceType"` } @@ -4113,9 +4191,15 @@ type GraphqlApi struct { // The authentication type. AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` + // The Amazon CloudWatch Logs configuration. + LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + // The API name. Name *string `locationName:"name" type:"string"` + // The Open Id Connect configuration. + OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + // The URIs. Uris map[string]*string `locationName:"uris" type:"map"` @@ -4151,12 +4235,24 @@ func (s *GraphqlApi) SetAuthenticationType(v string) *GraphqlApi { return s } +// SetLogConfig sets the LogConfig field's value. +func (s *GraphqlApi) SetLogConfig(v *LogConfig) *GraphqlApi { + s.LogConfig = v + return s +} + // SetName sets the Name field's value. func (s *GraphqlApi) SetName(v string) *GraphqlApi { s.Name = &v return s } +// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. +func (s *GraphqlApi) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *GraphqlApi { + s.OpenIDConnectConfig = v + return s +} + // SetUris sets the Uris field's value. func (s *GraphqlApi) SetUris(v map[string]*string) *GraphqlApi { s.Uris = v @@ -4662,6 +4758,147 @@ func (s *ListTypesOutput) SetTypes(v []*Type) *ListTypesOutput { return s } +// The CloudWatch Logs configuration. +type LogConfig struct { + _ struct{} `type:"structure"` + + // The service role that AWS AppSync will assume to publish to Amazon CloudWatch + // logs in your account. + // + // CloudWatchLogsRoleArn is a required field + CloudWatchLogsRoleArn *string `locationName:"cloudWatchLogsRoleArn" type:"string" required:"true"` + + // The field logging level. Values can be NONE, ERROR, ALL. + // + // * NONE: No field-level logs are captured. + // + // * ERROR: Logs the following information only for the fields that are in + // error: + // + // The error section in the server response. + // + // Field-level errors. + // + // The generated request/response functions that got resolved for error fields. + // + // * ALL: The following information is logged for all fields in the query: + // + // Field-level tracing information. + // + // The generated request/response functions that got resolved for each field. + // + // FieldLogLevel is a required field + FieldLogLevel *string `locationName:"fieldLogLevel" type:"string" required:"true" enum:"FieldLogLevel"` +} + +// String returns the string representation +func (s LogConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LogConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LogConfig"} + if s.CloudWatchLogsRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("CloudWatchLogsRoleArn")) + } + if s.FieldLogLevel == nil { + invalidParams.Add(request.NewErrParamRequired("FieldLogLevel")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value. +func (s *LogConfig) SetCloudWatchLogsRoleArn(v string) *LogConfig { + s.CloudWatchLogsRoleArn = &v + return s +} + +// SetFieldLogLevel sets the FieldLogLevel field's value. +func (s *LogConfig) SetFieldLogLevel(v string) *LogConfig { + s.FieldLogLevel = &v + return s +} + +// Describes an Open Id Connect configuration. +type OpenIDConnectConfig struct { + _ struct{} `type:"structure"` + + // The number of milliseconds a token is valid after being authenticated. + AuthTTL *int64 `locationName:"authTTL" type:"long"` + + // The client identifier of the Relying party at the OpenID Provider. This identifier + // is typically obtained when the Relying party is registered with the OpenID + // Provider. You can specify a regular expression so the AWS AppSync can validate + // against multiple client identifiers at a time + ClientId *string `locationName:"clientId" type:"string"` + + // The number of milliseconds a token is valid after being issued to a user. + IatTTL *int64 `locationName:"iatTTL" type:"long"` + + // The issuer for the open id connect configuration. The issuer returned by + // discovery MUST exactly match the value of iss in the ID Token. + // + // Issuer is a required field + Issuer *string `locationName:"issuer" type:"string" required:"true"` +} + +// String returns the string representation +func (s OpenIDConnectConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpenIDConnectConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OpenIDConnectConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OpenIDConnectConfig"} + if s.Issuer == nil { + invalidParams.Add(request.NewErrParamRequired("Issuer")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthTTL sets the AuthTTL field's value. +func (s *OpenIDConnectConfig) SetAuthTTL(v int64) *OpenIDConnectConfig { + s.AuthTTL = &v + return s +} + +// SetClientId sets the ClientId field's value. +func (s *OpenIDConnectConfig) SetClientId(v string) *OpenIDConnectConfig { + s.ClientId = &v + return s +} + +// SetIatTTL sets the IatTTL field's value. +func (s *OpenIDConnectConfig) SetIatTTL(v int64) *OpenIDConnectConfig { + s.IatTTL = &v + return s +} + +// SetIssuer sets the Issuer field's value. +func (s *OpenIDConnectConfig) SetIssuer(v string) *OpenIDConnectConfig { + s.Issuer = &v + return s +} + // Describes a resolver. type Resolver struct { _ struct{} `type:"structure"` @@ -4673,13 +4910,13 @@ type Resolver struct { FieldName *string `locationName:"fieldName" type:"string"` // The request mapping template. - RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string"` + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"` // The resolver ARN. ResolverArn *string `locationName:"resolverArn" type:"string"` // The response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` // The resolver type name. TypeName *string `locationName:"typeName" type:"string"` @@ -4880,8 +5117,8 @@ type UpdateApiKeyInput struct { // A description of the purpose of the API key. Description *string `locationName:"description" type:"string"` - // The time after which the API key expires. The date is represented as seconds - // since the epoch. + // The time from update time after which the API key expires. The date is represented + // as seconds since the epoch. For more information, see . Expires *int64 `locationName:"expires" type:"long"` // The API key ID. @@ -5123,11 +5360,17 @@ type UpdateGraphqlApiInput struct { // The new authentication type for the GraphqlApi object. AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` + // The Amazon CloudWatch logs configuration for the GraphqlApi object. + LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + // The new name for the GraphqlApi object. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` + // The Open Id Connect configuration configuration for the GraphqlApi object. + OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + // The new Amazon Cognito User Pool configuration for the GraphqlApi object. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` } @@ -5151,6 +5394,16 @@ func (s *UpdateGraphqlApiInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.LogConfig != nil { + if err := s.LogConfig.Validate(); err != nil { + invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) + } + } + if s.OpenIDConnectConfig != nil { + if err := s.OpenIDConnectConfig.Validate(); err != nil { + invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) + } + } if s.UserPoolConfig != nil { if err := s.UserPoolConfig.Validate(); err != nil { invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) @@ -5175,12 +5428,24 @@ func (s *UpdateGraphqlApiInput) SetAuthenticationType(v string) *UpdateGraphqlAp return s } +// SetLogConfig sets the LogConfig field's value. +func (s *UpdateGraphqlApiInput) SetLogConfig(v *LogConfig) *UpdateGraphqlApiInput { + s.LogConfig = v + return s +} + // SetName sets the Name field's value. func (s *UpdateGraphqlApiInput) SetName(v string) *UpdateGraphqlApiInput { s.Name = &v return s } +// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. +func (s *UpdateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *UpdateGraphqlApiInput { + s.OpenIDConnectConfig = v + return s +} + // SetUserPoolConfig sets the UserPoolConfig field's value. func (s *UpdateGraphqlApiInput) SetUserPoolConfig(v *UserPoolConfig) *UpdateGraphqlApiInput { s.UserPoolConfig = v @@ -5231,10 +5496,10 @@ type UpdateResolverInput struct { // The new request mapping template. // // RequestMappingTemplate is a required field - RequestMappingTemplate *string `locationName:"requestMappingTemplate" type:"string" required:"true"` + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` // The new response mapping template. - ResponseMappingTemplate *string `locationName:"responseMappingTemplate" type:"string"` + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` // The new type name. // @@ -5267,6 +5532,12 @@ func (s *UpdateResolverInput) Validate() error { if s.RequestMappingTemplate == nil { invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) } + if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) + } + if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } @@ -5522,6 +5793,9 @@ const ( // AuthenticationTypeAmazonCognitoUserPools is a AuthenticationType enum value AuthenticationTypeAmazonCognitoUserPools = "AMAZON_COGNITO_USER_POOLS" + + // AuthenticationTypeOpenidConnect is a AuthenticationType enum value + AuthenticationTypeOpenidConnect = "OPENID_CONNECT" ) const ( @@ -5546,6 +5820,17 @@ const ( DefaultActionDeny = "DENY" ) +const ( + // FieldLogLevelNone is a FieldLogLevel enum value + FieldLogLevelNone = "NONE" + + // FieldLogLevelError is a FieldLogLevel enum value + FieldLogLevelError = "ERROR" + + // FieldLogLevelAll is a FieldLogLevel enum value + FieldLogLevelAll = "ALL" +) + const ( // OutputTypeSdl is a OutputType enum value OutputTypeSdl = "SDL" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go index a2a7a0a0ca3..5c109eaba92 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go @@ -13,7 +13,8 @@ const ( // ErrCodeApiKeyValidityOutOfBoundsException for service response error code // "ApiKeyValidityOutOfBoundsException". // - // The API key expiration must be set to a value between 1 and 365 days. + // The API key expiration must be set to a value between 1 and 365 days from + // creation (for CreateApiKey) or from update (for UpdateApiKey). ErrCodeApiKeyValidityOutOfBoundsException = "ApiKeyValidityOutOfBoundsException" // ErrCodeApiLimitExceededException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index 56e5192db70..1a9272944f1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -3153,9 +3153,15 @@ func (c *ConfigService) PutConfigurationAggregatorRequest(input *PutConfiguratio // PutConfigurationAggregator API operation for AWS Config. // // Creates and updates the configuration aggregator with the selected source -// accounts and regions. +// accounts and regions. The source account can be individual account(s) or +// an organization. // -// AWS Config should be enabled in accounts and regions you want to aggreagate. +// AWS Config should be enabled in source accounts and regions you want to aggregate. +// +// If your source type is an organization, you must be signed in to the master +// account and all features must be enabled in your organization. AWS Config +// calls EnableAwsServiceAccess API to enable integration between AWS Config +// and AWS Organizations. // // 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 @@ -9541,7 +9547,8 @@ type SourceDetail struct { // when AWS Config delivers a configuration snapshot. // // If you want your custom rule to be triggered by configuration changes, specify - // both ConfigurationItemChangeNotification and OversizedConfigurationItemChangeNotification. + // two SourceDetail objects, one for ConfigurationItemChangeNotification and + // one for OversizedConfigurationItemChangeNotification. MessageType *string `type:"string" enum:"MessageType"` } @@ -10034,4 +10041,25 @@ const ( // ResourceTypeAwsCloudFrontStreamingDistribution is a ResourceType enum value ResourceTypeAwsCloudFrontStreamingDistribution = "AWS::CloudFront::StreamingDistribution" + + // ResourceTypeAwsWafRuleGroup is a ResourceType enum value + ResourceTypeAwsWafRuleGroup = "AWS::WAF::RuleGroup" + + // ResourceTypeAwsWafregionalRuleGroup is a ResourceType enum value + ResourceTypeAwsWafregionalRuleGroup = "AWS::WAFRegional::RuleGroup" + + // ResourceTypeAwsLambdaFunction is a ResourceType enum value + ResourceTypeAwsLambdaFunction = "AWS::Lambda::Function" + + // ResourceTypeAwsElasticBeanstalkApplication is a ResourceType enum value + ResourceTypeAwsElasticBeanstalkApplication = "AWS::ElasticBeanstalk::Application" + + // ResourceTypeAwsElasticBeanstalkApplicationVersion is a ResourceType enum value + ResourceTypeAwsElasticBeanstalkApplicationVersion = "AWS::ElasticBeanstalk::ApplicationVersion" + + // ResourceTypeAwsElasticBeanstalkEnvironment is a ResourceType enum value + ResourceTypeAwsElasticBeanstalkEnvironment = "AWS::ElasticBeanstalk::Environment" + + // ResourceTypeAwsElasticLoadBalancingLoadBalancer is a ResourceType enum value + ResourceTypeAwsElasticLoadBalancingLoadBalancer = "AWS::ElasticLoadBalancing::LoadBalancer" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index 02970d29fae..b8cc0dc00f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -258,6 +258,88 @@ func (c *GuardDuty) CreateDetectorWithContext(ctx aws.Context, input *CreateDete return out, req.Send() } +const opCreateFilter = "CreateFilter" + +// CreateFilterRequest generates a "aws/request.Request" representing the +// client's request for the CreateFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFilter for more information on using the CreateFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFilterRequest method. +// req, resp := client.CreateFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter +func (c *GuardDuty) CreateFilterRequest(input *CreateFilterInput) (req *request.Request, output *CreateFilterOutput) { + op := &request.Operation{ + Name: opCreateFilter, + HTTPMethod: "POST", + HTTPPath: "/detector/{detectorId}/filter", + } + + if input == nil { + input = &CreateFilterInput{} + } + + output = &CreateFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFilter API operation for Amazon GuardDuty. +// +// Creates a filter using the specified finding criteria. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation CreateFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateFilter +func (c *GuardDuty) CreateFilter(input *CreateFilterInput) (*CreateFilterOutput, error) { + req, out := c.CreateFilterRequest(input) + return out, req.Send() +} + +// CreateFilterWithContext is the same as CreateFilter with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) CreateFilterWithContext(ctx aws.Context, input *CreateFilterInput, opts ...request.Option) (*CreateFilterOutput, error) { + req, out := c.CreateFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the @@ -757,6 +839,88 @@ func (c *GuardDuty) DeleteDetectorWithContext(ctx aws.Context, input *DeleteDete return out, req.Send() } +const opDeleteFilter = "DeleteFilter" + +// DeleteFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFilter for more information on using the DeleteFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFilterRequest method. +// req, resp := client.DeleteFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter +func (c *GuardDuty) DeleteFilterRequest(input *DeleteFilterInput) (req *request.Request, output *DeleteFilterOutput) { + op := &request.Operation{ + Name: opDeleteFilter, + HTTPMethod: "DELETE", + HTTPPath: "/detector/{detectorId}/filter/{filterName}", + } + + if input == nil { + input = &DeleteFilterInput{} + } + + output = &DeleteFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFilter API operation for Amazon GuardDuty. +// +// Deletes the filter specified by the filter name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation DeleteFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteFilter +func (c *GuardDuty) DeleteFilter(input *DeleteFilterInput) (*DeleteFilterOutput, error) { + req, out := c.DeleteFilterRequest(input) + return out, req.Send() +} + +// DeleteFilterWithContext is the same as DeleteFilter with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) DeleteFilterWithContext(ctx aws.Context, input *DeleteFilterInput, opts ...request.Option) (*DeleteFilterOutput, error) { + req, out := c.DeleteFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the @@ -1334,6 +1498,88 @@ func (c *GuardDuty) GetDetectorWithContext(ctx aws.Context, input *GetDetectorIn return out, req.Send() } +const opGetFilter = "GetFilter" + +// GetFilterRequest generates a "aws/request.Request" representing the +// client's request for the GetFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetFilter for more information on using the GetFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetFilterRequest method. +// req, resp := client.GetFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter +func (c *GuardDuty) GetFilterRequest(input *GetFilterInput) (req *request.Request, output *GetFilterOutput) { + op := &request.Operation{ + Name: opGetFilter, + HTTPMethod: "GET", + HTTPPath: "/detector/{detectorId}/filter/{filterName}", + } + + if input == nil { + input = &GetFilterInput{} + } + + output = &GetFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFilter API operation for Amazon GuardDuty. +// +// Returns the details of the filter specified by the filter name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation GetFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/GetFilter +func (c *GuardDuty) GetFilter(input *GetFilterInput) (*GetFilterOutput, error) { + req, out := c.GetFilterRequest(input) + return out, req.Send() +} + +// GetFilterWithContext is the same as GetFilter with the addition of +// the ability to pass a context and additional request options. +// +// See GetFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) GetFilterWithContext(ctx aws.Context, input *GetFilterInput, opts ...request.Option) (*GetFilterOutput, error) { + req, out := c.GetFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetFindings = "GetFindings" // GetFindingsRequest generates a "aws/request.Request" representing the @@ -2134,6 +2380,144 @@ func (c *GuardDuty) ListDetectorsPagesWithContext(ctx aws.Context, input *ListDe return p.Err() } +const opListFilters = "ListFilters" + +// ListFiltersRequest generates a "aws/request.Request" representing the +// client's request for the ListFilters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListFilters for more information on using the ListFilters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListFiltersRequest method. +// req, resp := client.ListFiltersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters +func (c *GuardDuty) ListFiltersRequest(input *ListFiltersInput) (req *request.Request, output *ListFiltersOutput) { + op := &request.Operation{ + Name: opListFilters, + HTTPMethod: "GET", + HTTPPath: "/detector/{detectorId}/filter", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListFiltersInput{} + } + + output = &ListFiltersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFilters API operation for Amazon GuardDuty. +// +// Returns a paginated list of the current filters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation ListFilters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ListFilters +func (c *GuardDuty) ListFilters(input *ListFiltersInput) (*ListFiltersOutput, error) { + req, out := c.ListFiltersRequest(input) + return out, req.Send() +} + +// ListFiltersWithContext is the same as ListFilters with the addition of +// the ability to pass a context and additional request options. +// +// See ListFilters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) ListFiltersWithContext(ctx aws.Context, input *ListFiltersInput, opts ...request.Option) (*ListFiltersOutput, error) { + req, out := c.ListFiltersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListFiltersPages iterates over the pages of a ListFilters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListFilters method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListFilters operation. +// pageNum := 0 +// err := client.ListFiltersPages(params, +// func(page *ListFiltersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *GuardDuty) ListFiltersPages(input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool) error { + return c.ListFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListFiltersPagesWithContext same as ListFiltersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) ListFiltersPagesWithContext(ctx aws.Context, input *ListFiltersInput, fn func(*ListFiltersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListFiltersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListFiltersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListFiltersOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the @@ -3160,6 +3544,88 @@ func (c *GuardDuty) UpdateDetectorWithContext(ctx aws.Context, input *UpdateDete return out, req.Send() } +const opUpdateFilter = "UpdateFilter" + +// UpdateFilterRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFilter for more information on using the UpdateFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFilterRequest method. +// req, resp := client.UpdateFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter +func (c *GuardDuty) UpdateFilterRequest(input *UpdateFilterInput) (req *request.Request, output *UpdateFilterOutput) { + op := &request.Operation{ + Name: opUpdateFilter, + HTTPMethod: "POST", + HTTPPath: "/detector/{detectorId}/filter/{filterName}", + } + + if input == nil { + input = &UpdateFilterInput{} + } + + output = &UpdateFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFilter API operation for Amazon GuardDuty. +// +// Updates the filter specified by the filter name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GuardDuty's +// API operation UpdateFilter for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Error response object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Error response object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter +func (c *GuardDuty) UpdateFilter(input *UpdateFilterInput) (*UpdateFilterOutput, error) { + req, out := c.UpdateFilterRequest(input) + return out, req.Send() +} + +// UpdateFilterWithContext is the same as UpdateFilter with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GuardDuty) UpdateFilterWithContext(ctx aws.Context, input *UpdateFilterInput, opts ...request.Option) (*UpdateFilterOutput, error) { + req, out := c.UpdateFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateFindingsFeedback = "UpdateFindingsFeedback" // UpdateFindingsFeedbackRequest generates a "aws/request.Request" representing the @@ -3941,6 +4407,123 @@ func (s *CreateDetectorOutput) SetDetectorId(v string) *CreateDetectorOutput { return s } +// CreateFilter request object. +type CreateFilterInput struct { + _ struct{} `type:"structure"` + + // Specifies the action that is to be applied to the findings that match the + // filter. + Action *string `locationName:"action" type:"string" enum:"FilterAction"` + + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + + // The description of the filter. + Description *string `locationName:"description" type:"string"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // Represents the criteria to be used in the filter for querying findings. + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + + // The name of the filter. + Name *string `locationName:"name" type:"string"` + + // Specifies the position of the filter in the list of current filters. Also + // specifies the order in which this filter is applied to the findings. + Rank *int64 `locationName:"rank" type:"integer"` +} + +// String returns the string representation +func (s CreateFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFilterInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *CreateFilterInput) SetAction(v string) *CreateFilterInput { + s.Action = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateFilterInput) SetClientToken(v string) *CreateFilterInput { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateFilterInput) SetDescription(v string) *CreateFilterInput { + s.Description = &v + return s +} + +// SetDetectorId sets the DetectorId field's value. +func (s *CreateFilterInput) SetDetectorId(v string) *CreateFilterInput { + s.DetectorId = &v + return s +} + +// SetFindingCriteria sets the FindingCriteria field's value. +func (s *CreateFilterInput) SetFindingCriteria(v *FindingCriteria) *CreateFilterInput { + s.FindingCriteria = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateFilterInput) SetName(v string) *CreateFilterInput { + s.Name = &v + return s +} + +// SetRank sets the Rank field's value. +func (s *CreateFilterInput) SetRank(v int64) *CreateFilterInput { + s.Rank = &v + return s +} + +// CreateFilter response object. +type CreateFilterOutput struct { + _ struct{} `type:"structure"` + + // The name of the successfully created filter. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s CreateFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFilterOutput) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *CreateFilterOutput) SetName(v string) *CreateFilterOutput { + s.Name = &v + return s +} + // Create IP Set Request type CreateIPSetInput struct { _ struct{} `type:"structure"` @@ -4332,29 +4915,85 @@ func (s *DeclineInvitationsOutput) SetUnprocessedAccounts(v []*UnprocessedAccoun return s } -type DeleteDetectorInput struct { +type DeleteDetectorInput struct { + _ struct{} `type:"structure"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDetectorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDetectorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDetectorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDetectorInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetectorId sets the DetectorId field's value. +func (s *DeleteDetectorInput) SetDetectorId(v string) *DeleteDetectorInput { + s.DetectorId = &v + return s +} + +type DeleteDetectorOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDetectorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDetectorOutput) GoString() string { + return s.String() +} + +type DeleteFilterInput struct { _ struct{} `type:"structure"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // FilterName is a required field + FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteDetectorInput) String() string { +func (s DeleteFilterInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDetectorInput) GoString() string { +func (s DeleteFilterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDetectorInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDetectorInput"} +func (s *DeleteFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFilterInput"} if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4363,22 +5002,28 @@ func (s *DeleteDetectorInput) Validate() error { } // SetDetectorId sets the DetectorId field's value. -func (s *DeleteDetectorInput) SetDetectorId(v string) *DeleteDetectorInput { +func (s *DeleteFilterInput) SetDetectorId(v string) *DeleteFilterInput { s.DetectorId = &v return s } -type DeleteDetectorOutput struct { +// SetFilterName sets the FilterName field's value. +func (s *DeleteFilterInput) SetFilterName(v string) *DeleteFilterInput { + s.FilterName = &v + return s +} + +type DeleteFilterOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteDetectorOutput) String() string { +func (s DeleteFilterOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDetectorOutput) GoString() string { +func (s DeleteFilterOutput) GoString() string { return s.String() } @@ -5130,6 +5775,116 @@ func (s *GetDetectorOutput) SetUpdatedAt(v string) *GetDetectorOutput { return s } +type GetFilterInput struct { + _ struct{} `type:"structure"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // FilterName is a required field + FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFilterInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetectorId sets the DetectorId field's value. +func (s *GetFilterInput) SetDetectorId(v string) *GetFilterInput { + s.DetectorId = &v + return s +} + +// SetFilterName sets the FilterName field's value. +func (s *GetFilterInput) SetFilterName(v string) *GetFilterInput { + s.FilterName = &v + return s +} + +// GetFilter response object. +type GetFilterOutput struct { + _ struct{} `type:"structure"` + + // Specifies the action that is to be applied to the findings that match the + // filter. + Action *string `locationName:"action" type:"string" enum:"FilterAction"` + + // The description of the filter. + Description *string `locationName:"description" type:"string"` + + // Represents the criteria to be used in the filter for querying findings. + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + + // The name of the filter. + Name *string `locationName:"name" type:"string"` + + // Specifies the position of the filter in the list of current filters. Also + // specifies the order in which this filter is applied to the findings. + Rank *int64 `locationName:"rank" type:"integer"` +} + +// String returns the string representation +func (s GetFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFilterOutput) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *GetFilterOutput) SetAction(v string) *GetFilterOutput { + s.Action = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetFilterOutput) SetDescription(v string) *GetFilterOutput { + s.Description = &v + return s +} + +// SetFindingCriteria sets the FindingCriteria field's value. +func (s *GetFilterOutput) SetFindingCriteria(v *FindingCriteria) *GetFilterOutput { + s.FindingCriteria = v + return s +} + +// SetName sets the Name field's value. +func (s *GetFilterOutput) SetName(v string) *GetFilterOutput { + s.Name = &v + return s +} + +// SetRank sets the Rank field's value. +func (s *GetFilterOutput) SetRank(v int64) *GetFilterOutput { + s.Rank = &v + return s +} + // Get Findings Request type GetFindingsInput struct { _ struct{} `type:"structure"` @@ -5711,6 +6466,9 @@ type InstanceDetails struct { // The profile information of the EC2 instance. IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` + // The image description of the EC2 instance. + ImageDescription *string `locationName:"imageDescription" type:"string"` + // The image ID of the EC2 instance. ImageId *string `locationName:"imageId" type:"string"` @@ -5761,6 +6519,12 @@ func (s *InstanceDetails) SetIamInstanceProfile(v *IamInstanceProfile) *Instance return s } +// SetImageDescription sets the ImageDescription field's value. +func (s *InstanceDetails) SetImageDescription(v string) *InstanceDetails { + s.ImageDescription = &v + return s +} + // SetImageId sets the ImageId field's value. func (s *InstanceDetails) SetImageId(v string) *InstanceDetails { s.ImageId = &v @@ -5877,7 +6641,8 @@ type InviteMembersInput struct { // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` - // Indicates whether invite member email notification is disabled + // A boolean value that specifies whether you want to disable email notification + // to the accounts that you’re inviting to GuardDuty as members. DisableEmailNotification *bool `locationName:"disableEmailNotification" type:"boolean"` // The invitation message that you want to send to the accounts that you’re @@ -6038,6 +6803,99 @@ func (s *ListDetectorsOutput) SetNextToken(v string) *ListDetectorsOutput { return s } +type ListFiltersInput struct { + _ struct{} `type:"structure"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // You can use this parameter to indicate the maximum number of items that you + // want in the response. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFiltersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFiltersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFiltersInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetectorId sets the DetectorId field's value. +func (s *ListFiltersInput) SetDetectorId(v string) *ListFiltersInput { + s.DetectorId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListFiltersInput) SetMaxResults(v int64) *ListFiltersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFiltersInput) SetNextToken(v string) *ListFiltersInput { + s.NextToken = &v + return s +} + +// ListFilters response object. +type ListFiltersOutput struct { + _ struct{} `type:"structure"` + + // A list of filter names + FilterNames []*string `locationName:"filterNames" type:"list"` + + // You can use this parameter when paginating results. Set the value of this + // parameter to null on your first call to the list action. For subsequent calls + // to the action fill nextToken in the request with the value of NextToken from + // the previous response to continue listing data. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFiltersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFiltersOutput) GoString() string { + return s.String() +} + +// SetFilterNames sets the FilterNames field's value. +func (s *ListFiltersOutput) SetFilterNames(v []*string) *ListFiltersOutput { + s.FilterNames = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFiltersOutput) SetNextToken(v string) *ListFiltersOutput { + s.NextToken = &v + return s +} + // List Findings Request type ListFindingsInput struct { _ struct{} `type:"structure"` @@ -6770,6 +7628,9 @@ type NetworkInterface struct { // A list of EC2 instance IPv6 address information. Ipv6Addresses []*string `locationName:"ipv6Addresses" type:"list"` + // The ID of the network interface + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // Private DNS name of the EC2 instance. PrivateDnsName *string `locationName:"privateDnsName" type:"string"` @@ -6811,6 +7672,12 @@ func (s *NetworkInterface) SetIpv6Addresses(v []*string) *NetworkInterface { return s } +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { + s.NetworkInterfaceId = &v + return s +} + // SetPrivateDnsName sets the PrivateDnsName field's value. func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { s.PrivateDnsName = &v @@ -7681,6 +8548,117 @@ func (s UpdateDetectorOutput) GoString() string { return s.String() } +// UpdateFilter request object. +type UpdateFilterInput struct { + _ struct{} `type:"structure"` + + // Specifies the action that is to be applied to the findings that match the + // filter. + Action *string `locationName:"action" type:"string" enum:"FilterAction"` + + // The description of the filter. + Description *string `locationName:"description" type:"string"` + + // DetectorId is a required field + DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` + + // FilterName is a required field + FilterName *string `location:"uri" locationName:"filterName" type:"string" required:"true"` + + // Represents the criteria to be used in the filter for querying findings. + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + + // Specifies the position of the filter in the list of current filters. Also + // specifies the order in which this filter is applied to the findings. + Rank *int64 `locationName:"rank" type:"integer"` +} + +// String returns the string representation +func (s UpdateFilterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFilterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFilterInput"} + if s.DetectorId == nil { + invalidParams.Add(request.NewErrParamRequired("DetectorId")) + } + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *UpdateFilterInput) SetAction(v string) *UpdateFilterInput { + s.Action = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateFilterInput) SetDescription(v string) *UpdateFilterInput { + s.Description = &v + return s +} + +// SetDetectorId sets the DetectorId field's value. +func (s *UpdateFilterInput) SetDetectorId(v string) *UpdateFilterInput { + s.DetectorId = &v + return s +} + +// SetFilterName sets the FilterName field's value. +func (s *UpdateFilterInput) SetFilterName(v string) *UpdateFilterInput { + s.FilterName = &v + return s +} + +// SetFindingCriteria sets the FindingCriteria field's value. +func (s *UpdateFilterInput) SetFindingCriteria(v *FindingCriteria) *UpdateFilterInput { + s.FindingCriteria = v + return s +} + +// SetRank sets the Rank field's value. +func (s *UpdateFilterInput) SetRank(v int64) *UpdateFilterInput { + s.Rank = &v + return s +} + +// UpdateFilter response object. +type UpdateFilterOutput struct { + _ struct{} `type:"structure"` + + // The name of the filter. + Name *string `locationName:"name" type:"string"` +} + +// String returns the string representation +func (s UpdateFilterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFilterOutput) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *UpdateFilterOutput) SetName(v string) *UpdateFilterOutput { + s.Name = &v + return s +} + // Update findings feedback body type UpdateFindingsFeedbackInput struct { _ struct{} `type:"structure"` @@ -7959,6 +8937,15 @@ const ( FeedbackNotUseful = "NOT_USEFUL" ) +// The action associated with a filter. +const ( + // FilterActionNoop is a FilterAction enum value + FilterActionNoop = "NOOP" + + // FilterActionArchive is a FilterAction enum value + FilterActionArchive = "ARCHIVE" +) + // The types of finding statistics. const ( // FindingStatisticTypeCountBySeverity is a FindingStatisticType enum value diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index eb2d69a707d..6ef706faee2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -203,8 +203,8 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // You provide the secret data to be encrypted by putting text in either the // SecretString parameter or binary data in the SecretBinary parameter, but // not both. If you include SecretString or SecretBinary then Secrets Manager -// also creates an initial secret version and, if you don't supply a staging -// label, automatically maps the new version's ID to the staging label AWSCURRENT. +// also creates an initial secret version and automatically attaches the staging +// label AWSCURRENT to the new version. // // If you call an operation that needs to encrypt or decrypt the SecretString // or SecretBinary for a secret in the same account as the calling user and @@ -1121,7 +1121,8 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // // Stores a new encrypted secret value in the specified secret. To do this, // the operation creates a new version and attaches it to the secret. The version -// can contain a new SecretString value or a new SecretBinary value. +// can contain a new SecretString value or a new SecretBinary value. You can +// also specify the staging labels that are initially attached to the new version. // // The Secrets Manager console uses only the SecretString field. To add binary // data to a secret with the SecretBinary field you must use the AWS CLI or @@ -1133,7 +1134,12 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // // * If another version of this secret already exists, then this operation // does not automatically move any staging labels other than those that you -// specify in the VersionStages parameter. +// explicitly specify in the VersionStages parameter. +// +// * If this operation moves the staging label AWSCURRENT from another version +// to this version (because you included it in the StagingLabels parameter) +// then Secrets Manager also automatically moves the staging label AWSPREVIOUS +// to the version that AWSCURRENT was removed from. // // * This operation is idempotent. If a version with a SecretVersionId with // the same value as the ClientRequestToken parameter already exists and @@ -1141,11 +1147,6 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // However, if the secret data is different, then the operation fails because // you cannot modify an existing version; you can only create new ones. // -// * If this operation moves the staging label AWSCURRENT to this version -// (because you included it in the StagingLabels parameter) then Secrets -// Manager also automatically moves the staging label AWSPREVIOUS to the -// version that AWSCURRENT was removed from. -// // If you call an operation that needs to encrypt or decrypt the SecretString // or SecretBinary for a secret in the same account as the calling user and // that secret doesn't specify a KMS encryption key, Secrets Manager uses the @@ -1782,16 +1783,14 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // binary data as part of the version of a secret, you must use either the AWS // CLI or one of the AWS SDKs. // -// * If this update creates the first version of the secret or if you did -// not include the VersionStages parameter then Secrets Manager automatically -// attaches the staging label AWSCURRENT to the new version and removes it -// from any version that had it previously. The previous version (if any) -// is then given the staging label AWSPREVIOUS. -// // * If a version with a SecretVersionId with the same value as the ClientRequestToken // parameter already exists, the operation generates an error. You cannot // modify an existing version, you can only create new ones. // +// * If you include SecretString or SecretBinary to create a new secret version, +// Secrets Manager automatically attaches the staging label AWSCURRENT to +// the new version. +// // If you call an operation that needs to encrypt or decrypt the SecretString // or SecretBinary for a secret in the same account as the calling user and // that secret doesn't specify a KMS encryption key, Secrets Manager uses the diff --git a/vendor/vendor.json b/vendor/vendor.json index c4e69d1bac9..e1e387a73c5 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,916 +39,916 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "7TqQymwKnKWZuiNS62pUG6E7CgY=", + "checksumSHA1": "Chrl+rJ8+nI3K8BcLIaVqKdUgTw=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { - "checksumSHA1": "MIYMbcTonoSpdxgGHs7wn2EN3Dc=", + "checksumSHA1": "EIW1Cy3S1YvIXRfUSLoW7YuDUPc=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "CntJM8T3dRgC0e1i66CIbP8uCSY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "6zosteWJqUGM9+t9dkANQymMA9s=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "yqQRtxoLmiwe3lUvTx81hxfy+S0=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "WliJXTogdly9qe5xEV6Fn2zklcs=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "rQmpNRto8bpB17qNubhGzRh/Aj8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "7o1gMXoE8cemDzkZFUrQknQS4Yo=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { - "checksumSHA1": "s0TQJfF7ZqeS9IH4hdvX5EQk2l8=", + "checksumSHA1": "DtAllf3BfE0Z5JOhcdYHQnv1jnY=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "YlKOG1eZClZYmcRwJQO+LfEQrVY=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "58ARAtV4EKAIv5zpieVjvJMFjO0=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "s6of5mfMFZtYy6BRo/tIafylOUc=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "MJPsaJkyrCml4VZOsbNGo9Fl0C8=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "AQGPL+fXjjKhBmyb37QAG05R/Qw=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "NU6AqUCd5TOrxaqFdWmo8l2oeOI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "hCz5z7QQz1416cCjbhjGjvbrdpY=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "8PdtKqSEcLQ1V0Gnl2FAHJoOQy0=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "kM7Fxkb1OdCiOOmTlRIadqnsdt0=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "pKJec2iJiKDSY5UKmLSeYxLxucg=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "BD7EvXghMHMw52wtxISIhpJ4CTk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "6Q9ZHEAsu92jsFOCwJAI+SjYYAk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "YNl9xTPOb1SFVmwXDtmwzyGsx8U=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "p/I/GLsXOoZ0XdhDuSQ+lP4NlYM=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "4KiQdvEfpTf2g+UF2rWlLg/kgok=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "vT7k8uQ7ZfBVVJIYc/Yxui+yWI8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "5uQsnuE2bMWQ2ypmll1rzXyNqPw=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "cx2wG4c6Q5gSTsAU6D/UZMQN/Kg=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "k4lfEcz91J29Wax6GPBlUUQb5bk=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { - "checksumSHA1": "qrxVu09idcoHIT2HqDJIbV3weUE=", + "checksumSHA1": "Pib86kjnYwOlLwU/98ITXtAXA0g=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "FEUIC6EG3tPnTuvmIsV4b3r9D+k=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "I5sSvXLvlj9Ppv0HCbFXdN4tqn4=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "/Wa2paWfntnF+4pRSsgMffedplE=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "hurqUivjVxLHaXEd2oS8JrwMGQs=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "zxX7V0AIU1x2yX5Uyd9RMe0C3ok=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "mJR+NQiCTZGMy+eaCzbP4sEnX6w=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "OYW6KOQn3+mHCHpqhlZOUsFEpUE=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "V3D5pDdtXS0yVShpS/fOqFGxCrA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "7igFr0esmtcs9V0F9iMs2k5uNDI=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "PQnfXJ0ZQIIMiqUUFs4bkUPHqnc=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "pZoO4JKc/TJACuq1n9IHuhovD4k=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "Z2ql82q2CJ3AXQ/Wi+3jhkpXmt0=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "BSSURh/ALTj0QW5BWPJkW3i+FN0=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "JpvcQ+tc0yz2WZ0ne6zzxlbfscI=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "MgdGxbP8vjCkzkj1ukmU5Uqh3UA=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "hgqHUngsP+NPjkZVqevXuioHnkE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "OQuas8ovzB34Yb2bCMBDsu8teu4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "P9J4eI4+Bde2V4P5SbQ5yrkC4v8=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "4DYLn0HnMhZvXXgx6VjbS/V0srA=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "UPwhm+XWgDTDZ4wUziP+9RHOozg=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "pOhtcgvfgH3qPUiqZrBgpawiu8I=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "2bqJtsfs1LDLLhczU/SNtmvkjcw=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { - "checksumSHA1": "cP4Rz6mIrnYIGYX8CKgZlZD0oPA=", + "checksumSHA1": "yMGyjJHSsK+Mb+SbNxGIcXhl67o=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "DHrIPXQ0QzjE+Hnfwk0INR4rUkU=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "pvrqgHDeZ3gAHIiZyZfwXOi9GD4=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "lKGIKcPcMErM1NJdXBsHLic1E8w=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "zdG3e3bdyNaBuApO06pygeSJsJ4=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "zmOo5EeLSGFEuIBiRQsVd4+SBJ0=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "nlvFlqVKHyuyYHG88H3Yt/OA1e0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "AO97b1GChOs2geiFc//6YcpVfX8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "jyxQ6TEdSl9/j7qC0LCkVMSXkog=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "lKyAXJ4S6uXuSR1/pQ9gCGHYSLI=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "NVSUO8GRtIWDm7IexnBSmQWvBh8=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "ETmB3lf15r4sn18bB9ilBQVXto4=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "I1sxeu8aJOiM3a5/tnJya8blE3A=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "AnipOpUAJroLkoknx4xacrO0qSA=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "lAweYYdjcZ6acj6oI3HI9hX3eIQ=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "X/WdGuHGMxRCvufmQxstVjdbFT4=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "smOJ/rypXb18/Rjryf2a85paSa4=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "l3VeRGYSCtkXBvqVNVwRqb03Jko=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "kapXC7OZ1fnkZ3N6p19+WUafn40=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "Hi/sxx81pqe+fI5VrS5+UK2DsDU=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "KidzwXO5VKKI9zIuTAUsuF7KxIM=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "OUQpREA6ZLi/zTX4vZc56+ZoZLI=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { - "checksumSHA1": "A4o0zzrS7xtyYrmbeAKvda7Wyco=", + "checksumSHA1": "PfOnZISLrj6QcD+BpZH0EAeawQU=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "cyCJGeDReKwRq69kTcd4lozkuIg=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "NLj37wyUZIo8/Rp3zp+LDfr878M=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "nXAp7K8BCFvsaSdorGV7swBEQgA=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "q4qCE/5OiBJA1k8P0jQRx9UhKvs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "hAIPfcEcdc8xJ7MseIufmssdE/s=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "1Fin0tclPDC/+rL7V06GrzXaMXI=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "T8ABBS2aS6yRTD6w3kjpgFLe/Zw=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "q5ApQXXApBOPXOYOLDOetdC4MNw=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "llx3DydC0nTbF0cZoYUjO9P1eZw=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "i1yLjEKjcDxm0rakhcaDuAcQb7I=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "Mf9nXjY0+Lq5RxEGEIYCYL8u+Kc=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "iRNs3RoLjrzcBsPrSynhbEqY/4s=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "LzD/Yb1Xzc4OPKZZadOGV2fpQto=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "4f810fa5d8869fcfca0a0a7f6a834ee9cfa22095", - "revisionTime": "2018-05-02T20:08:43Z", - "version": "v1.13.40", - "versionExact": "v1.13.40" + "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", + "revisionTime": "2018-05-04T20:21:19Z", + "version": "v1.13.42", + "versionExact": "v1.13.42" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 05d0f9a227704df04c17665aa0523034593990de Mon Sep 17 00:00:00 2001 From: Douglas Date: Mon, 7 May 2018 09:28:38 -0300 Subject: [PATCH 0973/3316] moved test, updated doc and added update to terraform attribute --- aws/resource_aws_lb_target_group.go | 11 ++++++++ aws/resource_aws_lb_target_group_test.go | 27 +++++++++++++++++--- website/docs/r/lb_target_group.html.markdown | 1 + 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_lb_target_group.go b/aws/resource_aws_lb_target_group.go index 687dea742dd..78d9be0053a 100644 --- a/aws/resource_aws_lb_target_group.go +++ b/aws/resource_aws_lb_target_group.go @@ -493,6 +493,17 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t return errwrap.Wrapf("Error retrieving Target Group Attributes: {{err}}", err) } + for _, attr := range attrResp.Attributes { + switch *attr.Key { + case "proxy_protocol_v2.enabled": + enabled, err := strconv.ParseBool(*attr.Value) + if err != nil { + return fmt.Errorf("Error converting proxy_protocol_v2.enabled to bool: %s", *attr.Value) + } + d.Set("proxy_protocol_v2", enabled) + } + } + // We only read in the stickiness attributes if the target group is not // TCP-based. This ensures we don't end up causing a spurious diff if someone // has defined the stickiness block on a TCP target group (albeit with diff --git a/aws/resource_aws_lb_target_group_test.go b/aws/resource_aws_lb_target_group_test.go index b8580558333..ea5654a58c9 100644 --- a/aws/resource_aws_lb_target_group_test.go +++ b/aws/resource_aws_lb_target_group_test.go @@ -157,10 +157,31 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { ExpectNonEmptyPlan: true, ExpectError: regexp.MustCompile("Health check interval cannot be updated"), }, + }, + }) +} + +func TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy(t *testing.T) { + var confBefore, confAfter elbv2.TargetGroup + targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_lb_target_group.test", + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLBTargetGroupDestroy, + Steps: []resource.TestStep{ { - Config: testAccAWSLBTargetGroupConfig_typeTCP_withProxyProtocol(targetGroupName), + Config: testAccAWSLBTargetGroupConfig_typeTCP(targetGroupName), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSLBTargetGroupExists("aws_lb_target_group.test", &confBefore), + resource.TestCheckResourceAttr("aws_lb_target_group.test", "proxy_protocol_v2", "false"), + ), + }, + { + Config: testAccAWSLBTargetGroupConfig_typeTCP_withProxyProtocol(targetGroupName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBTargetGroupExists("aws_lb_target_group.test", &confAfter), resource.TestCheckResourceAttr("aws_lb_target_group.test", "proxy_protocol_v2", "true"), ), }, @@ -1250,8 +1271,8 @@ func testAccAWSLBTargetGroupConfig_typeTCP_withProxyProtocol(targetGroupName str protocol = "TCP" vpc_id = "${aws_vpc.test.id}" - proxy_protocol_v2 = "true" - deregistration_delay = 200 + proxy_protocol_v2 = "true" + deregistration_delay = 200 health_check { interval = 10 diff --git a/website/docs/r/lb_target_group.html.markdown b/website/docs/r/lb_target_group.html.markdown index 5ed67d91b75..15caa63f244 100644 --- a/website/docs/r/lb_target_group.html.markdown +++ b/website/docs/r/lb_target_group.html.markdown @@ -37,6 +37,7 @@ The following arguments are supported: * `protocol` - (Required) The protocol to use for routing traffic to the targets. * `vpc_id` - (Required) The identifier of the VPC in which to create the target group. * `deregistration_delay` - (Optional) The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. +* `proxy_protocol_v2` - (Optional) Boolean to enable / disable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. * `stickiness` - (Optional) A Stickiness block. Stickiness blocks are documented below. `stickiness` is only valid if used with Load Balancers of type `Application` * `health_check` - (Optional) A Health Check block. Health Check blocks are documented below. * `target_type` - (Optional) The type of target that you must specify when registering targets with this target group. From 6ac75676aef27eac4a2e3dc5e8f2a7ce7bcf0b00 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 08:43:49 -0400 Subject: [PATCH 0974/3316] Update CHANGELOG for #4424 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b2a06123b..ef4712004ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## 1.18.0 (Unreleased) +ENHANCEMENTS: + +* resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] +* resource/aws_spot_instance_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] + BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] From f1eefc61b7133119bc4f6a830558c16b9ca9eecc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 08:55:26 -0400 Subject: [PATCH 0975/3316] Update CHANGELOG for #4463 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef4712004ec..f2dd268563a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] +* resource/aws_spot_fleet_request: Add plan time validation for `valid_from` and `valid_until` arguments [GH-4463] * resource/aws_spot_instance_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] BUG FIXES: From befddbbf2df43fac6263268e8af0d69a3053e24a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 09:08:26 -0400 Subject: [PATCH 0976/3316] Update CHANGELOG for #4465 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2dd268563a..35a07120dbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] +* resource/aws_s3_bucket: Prevent crash from empty string CORS arguments [GH-4465] * resource/aws_ssm_document: Add missing account ID to `arn` attribute [GH-4436] ## 1.17.0 (May 02, 2018) From 2668456de0143f818b63d1efce86d829ca17f2da Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 10:13:00 -0400 Subject: [PATCH 0977/3316] Update CHANGELOG for #3127 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35a07120dbe..039e2d5602d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] +* resource/aws_redshift_cluster: Properly send all required parameters when resizing [GH-3127] * resource/aws_s3_bucket: Prevent crash from empty string CORS arguments [GH-4465] * resource/aws_ssm_document: Add missing account ID to `arn` attribute [GH-4436] From fac71b822053cec442830fc52a539feb3325bd99 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 11:12:51 -0400 Subject: [PATCH 0978/3316] Update CHANGELOG for #4365 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 039e2d5602d..b8c724a1b40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/aws_lb_target_group: Add `proxy_protocol_v2` argument [GH-4365] * resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] * resource/aws_spot_fleet_request: Add plan time validation for `valid_from` and `valid_until` arguments [GH-4463] * resource/aws_spot_instance_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] From f2ae6f9184b8cee2b4a68999b7454386134429f4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 13:54:00 -0400 Subject: [PATCH 0979/3316] Update CHANGELOG for #4344 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8c724a1b40..52a34597065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ ENHANCEMENTS: BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] +* resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error [GH-4344] +* resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error [GH-4344] +* resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error [GH-4344] +* resource/aws_launch_template: Allow `network_interface` `device_index` to be 0 [GH-4344] +* resource/aws_launch_template: Separate usage of `ipv4_address_count`/`ipv6_address_count` from `ipv4_addresses`/`ipv6_addresses` [GH-4344] * resource/aws_redshift_cluster: Properly send all required parameters when resizing [GH-3127] * resource/aws_s3_bucket: Prevent crash from empty string CORS arguments [GH-4465] * resource/aws_ssm_document: Add missing account ID to `arn` attribute [GH-4436] From f0046bf04ce4e0804828d2a67bba9e07ca9687a7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 13:54:57 -0400 Subject: [PATCH 0980/3316] Remove extraneous CHANGELOG entry for #4344 --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52a34597065..58242192e1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,6 @@ BUG FIXES: * resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error [GH-4344] * resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error [GH-4344] * resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error [GH-4344] -* resource/aws_launch_template: Allow `network_interface` `device_index` to be 0 [GH-4344] * resource/aws_launch_template: Separate usage of `ipv4_address_count`/`ipv6_address_count` from `ipv4_addresses`/`ipv6_addresses` [GH-4344] * resource/aws_redshift_cluster: Properly send all required parameters when resizing [GH-3127] * resource/aws_s3_bucket: Prevent crash from empty string CORS arguments [GH-4465] From d81b7239a1c47c85c36c7da626ac01a50c27bf7a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 7 May 2018 14:40:24 -0400 Subject: [PATCH 0981/3316] Update CHANGELOG for #1685 and #4447 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58242192e1b..d2f029104f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/aws_dms_endpoint: Support `s3` `engine_name` and add `s3_settings` argument [GH-1685] and [GH-4447] * resource/aws_lb_target_group: Add `proxy_protocol_v2` argument [GH-4365] * resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] * resource/aws_spot_fleet_request: Add plan time validation for `valid_from` and `valid_until` arguments [GH-4463] From a7753638a70aec7fe4ccfcd2e62985acc532a0a6 Mon Sep 17 00:00:00 2001 From: James Beavers Date: Mon, 7 May 2018 15:57:55 -0400 Subject: [PATCH 0982/3316] resource/aws_sns_platform_application: documentation - fix inconsistent key name --- website/docs/r/sns_platform_application.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/sns_platform_application.html.markdown b/website/docs/r/sns_platform_application.html.markdown index 9b4e1cbf6be..10935979551 100644 --- a/website/docs/r/sns_platform_application.html.markdown +++ b/website/docs/r/sns_platform_application.html.markdown @@ -43,7 +43,7 @@ The following arguments are supported: * `event_delivery_failure_topic_arn` - (Optional) SNS Topic triggered when a delivery to any of the platform endpoints associated with your platform application encounters a permanent failure. * `event_endpoint_created_topic_arn` - (Optional) SNS Topic triggered when a new platform endpoint is added to your platform application. * `event_endpoint_deleted_topic_arn` - (Optional) SNS Topic triggered when an existing platform endpoint is deleted from your platform application. -* `event_endpoint_updated_topic` - (Optional) SNS Topic triggered when an existing platform endpoint is changed from your platform application. +* `event_endpoint_updated_topic_arn` - (Optional) SNS Topic triggered when an existing platform endpoint is changed from your platform application. * `failure_feedback_role_arn` - (Optional) The IAM role permitted to receive failure feedback for this application. * `platform_principal` - (Optional) Application Platform principal. See [Principal][2] for type of principal required for platform. The value of this attribute when stored into the Terraform state is only a hash of the real value, so therefore it is not practical to use this as an attribute for other resources. * `success_feedback_role_arn` - (Optional) The IAM role permitted to receive success feedback for this application. From b7f1069fe797053176f0a0b32b36bb7c9b10e607 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 7 May 2018 15:12:00 -0500 Subject: [PATCH 0983/3316] Fix up docs. --- .../docs/r/codebuild_webhook.html.markdown | 92 ++----------------- 1 file changed, 9 insertions(+), 83 deletions(-) diff --git a/website/docs/r/codebuild_webhook.html.markdown b/website/docs/r/codebuild_webhook.html.markdown index 37c52e96766..0a99581582f 100644 --- a/website/docs/r/codebuild_webhook.html.markdown +++ b/website/docs/r/codebuild_webhook.html.markdown @@ -13,94 +13,20 @@ Provides a CodeBuild Webhook resource. ## Example Usage ```hcl -resource "aws_iam_role" "codebuild_role" { - name = "codebuild-role-" - - assume_role_policy = < Date: Mon, 7 May 2018 15:18:05 -0500 Subject: [PATCH 0984/3316] Add branch filtering support. --- aws/resource_aws_codebuild_webhook.go | 8 +++++++- website/docs/r/codebuild_webhook.html.markdown | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_webhook.go b/aws/resource_aws_codebuild_webhook.go index 07785d181d9..287ed876a48 100644 --- a/aws/resource_aws_codebuild_webhook.go +++ b/aws/resource_aws_codebuild_webhook.go @@ -18,6 +18,10 @@ func resourceAwsCodeBuildWebhook() *schema.Resource { Required: true, ForceNew: true, }, + "branch_filter": { + Type: schema.TypeString, + Optional: true, + }, "url": { Type: schema.TypeString, Computed: true, @@ -30,13 +34,15 @@ func resourceAwsCodeBuildWebhookCreate(d *schema.ResourceData, meta interface{}) conn := meta.(*AWSClient).codebuildconn resp, err := conn.CreateWebhook(&codebuild.CreateWebhookInput{ - ProjectName: aws.String(d.Get("name").(string)), + ProjectName: aws.String(d.Get("name").(string)), + BranchFilter: aws.String(d.Get("branch_filter").(string)), }) if err != nil { return err } d.SetId(d.Get("name").(string)) + d.Set("branch_filter", d.Get("branch_filter").(string)) d.Set("url", resp.Webhook.Url) return nil } diff --git a/website/docs/r/codebuild_webhook.html.markdown b/website/docs/r/codebuild_webhook.html.markdown index 0a99581582f..a6ae0847798 100644 --- a/website/docs/r/codebuild_webhook.html.markdown +++ b/website/docs/r/codebuild_webhook.html.markdown @@ -35,6 +35,7 @@ resource "github_repository_webhook" "aws_codebuild" { The following arguments are supported: * `name` - (Required) The name of the build project. +* `branch_filter` - (Optional) A regular expression used to determine which branches get built. Default is all branches are built. ## Attributes Reference From 8522c88e8c0bd5d9c3f89602812b235d676aa328 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 7 May 2018 15:53:15 -0500 Subject: [PATCH 0985/3316] Fix tests and add an update function. --- aws/resource_aws_codebuild_webhook.go | 22 ++++++++++++++++++++++ aws/resource_aws_codebuild_webhook_test.go | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_webhook.go b/aws/resource_aws_codebuild_webhook.go index 287ed876a48..0de496a772c 100644 --- a/aws/resource_aws_codebuild_webhook.go +++ b/aws/resource_aws_codebuild_webhook.go @@ -11,6 +11,7 @@ func resourceAwsCodeBuildWebhook() *schema.Resource { Create: resourceAwsCodeBuildWebhookCreate, Read: resourceAwsCodeBuildWebhookRead, Delete: resourceAwsCodeBuildWebhookDelete, + Update: resourceAwsCodeBuildWebhookUpdate, Schema: map[string]*schema.Schema{ "name": { @@ -66,10 +67,31 @@ func resourceAwsCodeBuildWebhookRead(d *schema.ResourceData, meta interface{}) e } project := resp.Projects[0] + d.Set("branch_filter", project.Webhook.BranchFilter) d.Set("url", project.Webhook.Url) return nil } +func resourceAwsCodeBuildWebhookUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codebuildconn + + if !d.HasChange("branch_filter") { + return nil + } + + _, err := conn.UpdateWebhook(&codebuild.UpdateWebhookInput{ + ProjectName: aws.String(d.Id()), + BranchFilter: aws.String(d.Get("branch_filter").(string)), + RotateSecret: aws.Bool(false), + }) + + if err != nil { + return err + } + + return nil +} + func resourceAwsCodeBuildWebhookDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codebuildconn diff --git a/aws/resource_aws_codebuild_webhook_test.go b/aws/resource_aws_codebuild_webhook_test.go index 170ff3feb91..54104b851ff 100644 --- a/aws/resource_aws_codebuild_webhook_test.go +++ b/aws/resource_aws_codebuild_webhook_test.go @@ -70,7 +70,7 @@ func testAccCheckAwsCodeBuildWebhookExists(name string) resource.TestCheckFunc { } func testAccCodeBuildWebhookConfig_basic(rName string) string { - return fmt.Sprintf(testAccAWSCodeBuildProjectConfig_basic(rName) + ` + return fmt.Sprintf(testAccAWSCodeBuildProjectConfig_basic(rName, "", "") + ` resource "aws_codebuild_webhook" "test" { name = "${aws_codebuild_project.foo.name}" } From 22e814099e08c32a9d4bb29b52663b52a4b38365 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 7 May 2018 16:00:06 -0500 Subject: [PATCH 0986/3316] Fix docs and add a note about the OAuth dance. --- website/docs/r/codebuild_webhook.html.markdown | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/website/docs/r/codebuild_webhook.html.markdown b/website/docs/r/codebuild_webhook.html.markdown index a6ae0847798..b39bc2077d9 100644 --- a/website/docs/r/codebuild_webhook.html.markdown +++ b/website/docs/r/codebuild_webhook.html.markdown @@ -10,24 +10,14 @@ description: |- Provides a CodeBuild Webhook resource. +~> **Note:** The AWS account that Terraform uses to create this resource *must* have authorized CodeBuild to access GitHub's OAuth API. This is a manual step that must be done *before* creating webhooks with this resource. If OAuth is not configured, AWS will return an error similar to `ResourceNotFoundException: Could not find access token for server type github`. + ## Example Usage ```hcl resource "aws_codebuild_webhook" "github" { name = "${aws_codebuild_project.my_project.name}" } - -resource "github_repository_webhook" "aws_codebuild" { - repository = "${github_repository.repo.name}" - name = "web" - - configuration { - url = "${aws_codebuild_webhook.github.url}" - content_type = "json" - } - - events = ["pull_request", "push"] -} ``` ## Argument Reference From 9abbc8299a59648a068d916362fe8a19b79be23a Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 7 May 2018 16:40:33 -0500 Subject: [PATCH 0987/3316] Allow people to override the sourceURL in the basic config. --- aws/resource_aws_codebuild_project_test.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 62fbd1401b6..793ad02c1d6 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "os" "regexp" "strings" "testing" @@ -290,6 +291,18 @@ func testAccCheckAWSCodeBuildProjectDestroy(s *terraform.State) error { } func testAccAWSCodeBuildProjectConfig_basic(rName, vpcConfig, vpcResources string) string { + // This is used for testing aws_codebuild_webhook as well as aws_codebuild_project. + // In order for that resource to work the Terraform AWS user must have done a GitHub + // OAuth dance. + // + // Additionally, the GitHub user that the Terraform AWS user logs in as must have + // access to the GitHub repository. This allows others to run tests for the webhook + // without having to have access to the Packer GitHub repository. + sourceURL, ok := os.LookupEnv("CODEBUILD_GITHUB_SOURCE_URL") + if !ok { + sourceURL = "https://github.com/hashicorp/packer.git" + } + return fmt.Sprintf(` resource "aws_iam_role" "codebuild_role" { name = "codebuild-role-%s" @@ -375,7 +388,7 @@ resource "aws_codebuild_project" "foo" { source { type = "GITHUB" - location = "https://github.com/hashicorp/packer.git" + location = "%s" } tags { @@ -384,7 +397,7 @@ resource "aws_codebuild_project" "foo" { %s } %s -`, rName, rName, rName, rName, vpcConfig, vpcResources) +`, rName, rName, rName, rName, sourceURL, vpcConfig, vpcResources) } func testAccAWSCodeBuildProjectConfig_basicUpdated(rName string) string { From a56d0cfa458fae34642ef96ed60e5e9ba472673b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 8 May 2018 07:30:59 -0400 Subject: [PATCH 0988/3316] docs/resource/aws_ecs_service: Clarify ordered_placement_strategy maximum --- website/docs/r/ecs_service.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/ecs_service.html.markdown b/website/docs/r/ecs_service.html.markdown index eb3bc3c41ef..1939b77f6a8 100644 --- a/website/docs/r/ecs_service.html.markdown +++ b/website/docs/r/ecs_service.html.markdown @@ -74,7 +74,7 @@ The following arguments are supported: * `deployment_maximum_percent` - (Optional) The upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. * `deployment_minimum_healthy_percent` - (Optional) The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. * `placement_strategy` - (Optional) **Deprecated**, use `ordered_placement_strategy` instead. -* `ordered_placement_strategy` - (Optional) Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of `placement_strategy` blocks is `5`. Defined below. +* `ordered_placement_strategy` - (Optional) Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of `ordered_placement_strategy` blocks is `5`. Defined below. * `health_check_grace_period_seconds` - (Optional) Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers. * `load_balancer` - (Optional) A load balancer block. Load balancers documented below. * `placement_constraints` - (Optional) rules that are taken into consideration during task placement. Maximum number of From 32dc74d4f8004204a26cd4c2b23ff53498447843 Mon Sep 17 00:00:00 2001 From: TomHutch Date: Tue, 8 May 2018 16:24:41 +0100 Subject: [PATCH 0989/3316] address pr feedback --- aws/provider.go | 2 +- aws/resource_aws_glue_catalog_table.go | 301 +++++++++++++------------ website/aws.erb | 6 +- 3 files changed, 165 insertions(+), 144 deletions(-) diff --git a/aws/provider.go b/aws/provider.go index 65b91b459d1..e08debcc2cf 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -391,9 +391,9 @@ func Provider() terraform.ResourceProvider { "aws_gamelift_fleet": resourceAwsGameliftFleet(), "aws_glacier_vault": resourceAwsGlacierVault(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), "aws_glue_connection": resourceAwsGlueConnection(), "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), "aws_guardduty_member": resourceAwsGuardDutyMember(), diff --git a/aws/resource_aws_glue_catalog_table.go b/aws/resource_aws_glue_catalog_table.go index 4185dddd002..cceb6c1e9c7 100644 --- a/aws/resource_aws_glue_catalog_table.go +++ b/aws/resource_aws_glue_catalog_table.go @@ -27,10 +27,6 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Optional: true, Computed: true, }, - "name": { - Type: schema.TypeString, - Required: true, - }, "database_name": { Type: schema.TypeString, ForceNew: true, @@ -40,10 +36,40 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "name": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, "owner": { Type: schema.TypeString, Optional: true, }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "partition_keys": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "comment": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, "retention": { Type: schema.TypeInt, Optional: true, @@ -54,11 +80,20 @@ func resourceAwsGlueCatalogTable() *schema.Resource { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "bucket_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "columns": { Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "comment": { + Type: schema.TypeString, + Optional: true, + }, "name": { Type: schema.TypeString, Required: true, @@ -67,33 +102,34 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Type: schema.TypeString, Optional: true, }, - "comment": { - Type: schema.TypeString, - Optional: true, - }, }, }, }, - "location": { - Type: schema.TypeString, + "compressed": { + Type: schema.TypeBool, Optional: true, }, "input_format": { Type: schema.TypeString, Optional: true, }, - "output_format": { + "location": { Type: schema.TypeString, Optional: true, }, - "compressed": { - Type: schema.TypeBool, - Optional: true, - }, "number_of_buckets": { Type: schema.TypeInt, Optional: true, }, + "output_format": { + Type: schema.TypeString, + Optional: true, + }, + "parameters": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "ser_de_info": { Type: schema.TypeList, Optional: true, @@ -116,32 +152,6 @@ func resourceAwsGlueCatalogTable() *schema.Resource { }, }, }, - "bucket_columns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, - "sort_columns": { - Type: schema.TypeList, - Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "column": { - Type: schema.TypeString, - Required: true, - }, - "sort_order": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, "skewed_info": { Type: schema.TypeList, Optional: true, @@ -153,19 +163,35 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, - "skewed_column_value_location_maps": { - Type: schema.TypeMap, + "skewed_column_values": { + Type: schema.TypeList, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, - "skewed_column_values": { - Type: schema.TypeList, + "skewed_column_value_location_maps": { + Type: schema.TypeMap, Optional: true, Elem: &schema.Schema{Type: schema.TypeString}, }, }, }, }, + "sort_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "column": { + Type: schema.TypeString, + Required: true, + }, + "sort_order": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, "stored_as_sub_directories": { Type: schema.TypeBool, Optional: true, @@ -173,25 +199,9 @@ func resourceAwsGlueCatalogTable() *schema.Resource { }, }, }, - "partition_keys": { - Type: schema.TypeList, + "table_type": { + Type: schema.TypeString, Optional: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Required: true, - }, - "type": { - Type: schema.TypeString, - Optional: true, - }, - "comment": { - Type: schema.TypeString, - Optional: true, - }, - }, - }, }, "view_original_text": { Type: schema.TypeString, @@ -201,34 +211,28 @@ func resourceAwsGlueCatalogTable() *schema.Resource { Type: schema.TypeString, Optional: true, }, - "table_type": { - Type: schema.TypeString, - Optional: true, - }, - "parameters": { - Type: schema.TypeMap, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - }, }, } } -func readAwsGlueTableID(id string) (catalogID string, dbName string, name string) { +func readAwsGlueTableID(id string) (catalogID string, dbName string, name string, error error) { idParts := strings.Split(id, ":") - return idParts[0], idParts[1], idParts[2] + if len(idParts) != 3 { + return "", "", "", fmt.Errorf("expected ID in format catalog-id:database-name:table-name, received: %s", id) + } + return idParts[0], idParts[1], idParts[2], nil } -func resourceAwsGlueCatalogTableCreate(t *schema.ResourceData, meta interface{}) error { +func resourceAwsGlueCatalogTableCreate(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID := createAwsGlueCatalogID(t, meta.(*AWSClient).accountid) - dbName := t.Get("database_name").(string) - name := t.Get("name").(string) + catalogID := createAwsGlueCatalogID(d, meta.(*AWSClient).accountid) + dbName := d.Get("database_name").(string) + name := d.Get("name").(string) input := &glue.CreateTableInput{ CatalogId: aws.String(catalogID), DatabaseName: aws.String(dbName), - TableInput: expandGlueTableInput(t), + TableInput: expandGlueTableInput(d), } _, err := glueconn.CreateTable(input) @@ -236,15 +240,18 @@ func resourceAwsGlueCatalogTableCreate(t *schema.ResourceData, meta interface{}) return fmt.Errorf("Error creating Catalog Table: %s", err) } - t.SetId(fmt.Sprintf("%s:%s:%s", catalogID, dbName, name)) + d.SetId(fmt.Sprintf("%s:%s:%s", catalogID, dbName, name)) - return resourceAwsGlueCatalogTableRead(t, meta) + return resourceAwsGlueCatalogTableRead(d, meta) } -func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) error { +func resourceAwsGlueCatalogTableRead(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, dbName, name := readAwsGlueTableID(t.Id()) + catalogID, dbName, name, err := readAwsGlueTableID(d.Id()) + if err != nil { + return err + } input := &glue.GetTableInput{ CatalogId: aws.String(catalogID), @@ -256,50 +263,67 @@ func resourceAwsGlueCatalogTableRead(t *schema.ResourceData, meta interface{}) e if err != nil { if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { - log.Printf("[WARN] Glue Catalog Table (%s) not found, removing from state", t.Id()) - t.SetId("") + log.Printf("[WARN] Glue Catalog Table (%s) not found, removing from state", d.Id()) + d.SetId("") } return fmt.Errorf("Error reading Glue Catalog Table: %s", err) } - t.Set("name", out.Table.Name) - t.Set("catalog_id", catalogID) - t.Set("database_name", dbName) - t.Set("description", out.Table.Description) - t.Set("owner", out.Table.Owner) - t.Set("retention", out.Table.Retention) - t.Set("storage_descriptor", flattenStorageDescriptor(out.Table.StorageDescriptor)) - t.Set("partition_keys", flattenGlueColumns(out.Table.PartitionKeys)) - t.Set("view_original_text", out.Table.ViewOriginalText) - t.Set("view_expanded_text", out.Table.ViewExpandedText) - t.Set("table_type", out.Table.TableType) - t.Set("parameters", flattenStringParameters(out.Table.Parameters)) + d.Set("name", out.Table.Name) + d.Set("catalog_id", catalogID) + d.Set("database_name", dbName) + d.Set("description", out.Table.Description) + d.Set("owner", out.Table.Owner) + d.Set("retention", out.Table.Retention) + + if err := d.Set("storage_descriptor", flattenGlueStorageDescriptor(out.Table.StorageDescriptor)); err != nil { + return fmt.Errorf("error setting storage_descriptor: %s", err) + } + + if err := d.Set("partition_keys", flattenGlueColumns(out.Table.PartitionKeys)); err != nil { + return fmt.Errorf("error setting partition_keys: %s", err) + } + + d.Set("view_original_text", out.Table.ViewOriginalText) + d.Set("view_expanded_text", out.Table.ViewExpandedText) + d.Set("table_type", out.Table.TableType) + + if err := d.Set("parameters", flattenStringParameters(out.Table.Parameters)); err != nil { + return fmt.Errorf("error setting parameters: %s", err) + } return nil } -func resourceAwsGlueCatalogTableUpdate(t *schema.ResourceData, meta interface{}) error { +func resourceAwsGlueCatalogTableUpdate(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, dbName, _ := readAwsGlueTableID(t.Id()) + catalogID, dbName, _, err := readAwsGlueTableID(d.Id()) + if err != nil { + return err + } updateTableInput := &glue.UpdateTableInput{ CatalogId: aws.String(catalogID), DatabaseName: aws.String(dbName), - TableInput: expandGlueTableInput(t), + TableInput: expandGlueTableInput(d), } if _, err := glueconn.UpdateTable(updateTableInput); err != nil { return fmt.Errorf("Error updating Glue Catalog Table: %s", err) } - return resourceAwsGlueCatalogTableRead(t, meta) + return resourceAwsGlueCatalogTableRead(d, meta) } -func resourceAwsGlueCatalogTableDelete(t *schema.ResourceData, meta interface{}) error { +func resourceAwsGlueCatalogTableDelete(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, dbName, name := readAwsGlueTableID(t.Id()) + + catalogID, dbName, name, tableIdErr := readAwsGlueTableID(d.Id()) + if tableIdErr != nil { + return tableIdErr + } log.Printf("[DEBUG] Glue Catalog Table: %s:%s:%s", catalogID, dbName, name) _, err := glueconn.DeleteTable(&glue.DeleteTableInput{ @@ -313,47 +337,46 @@ func resourceAwsGlueCatalogTableDelete(t *schema.ResourceData, meta interface{}) return nil } -func expandGlueTableInput(t *schema.ResourceData) *glue.TableInput { +func expandGlueTableInput(d *schema.ResourceData) *glue.TableInput { tableInput := &glue.TableInput{ - Name: aws.String(t.Get("name").(string)), + Name: aws.String(d.Get("name").(string)), } - if v, ok := t.GetOk("description"); ok { + if v, ok := d.GetOk("description"); ok { tableInput.Description = aws.String(v.(string)) } - if v, ok := t.GetOk("owner"); ok { + if v, ok := d.GetOk("owner"); ok { tableInput.Owner = aws.String(v.(string)) } - if v, ok := t.GetOk("retention"); ok { + if v, ok := d.GetOk("retention"); ok { tableInput.Retention = aws.Int64(int64(v.(int))) } - if v, ok := t.GetOk("storage_descriptor"); ok { - for _, elem := range v.([]interface{}) { - tableInput.StorageDescriptor = expandGlueStorageDescriptor(elem.(map[string]interface{})) - } + if v, ok := d.GetOk("storage_descriptor"); ok { + list := v.([]interface{}) + tableInput.StorageDescriptor = expandGlueStorageDescriptor(list[0].(map[string]interface{})) } - if v, ok := t.GetOk("partition_keys"); ok { + if v, ok := d.GetOk("partition_keys"); ok { columns := expandGlueColumns(v.([]interface{})) tableInput.PartitionKeys = columns } - if v, ok := t.GetOk("view_original_text"); ok { + if v, ok := d.GetOk("view_original_text"); ok { tableInput.ViewOriginalText = aws.String(v.(string)) } - if v, ok := t.GetOk("view_expanded_text"); ok { + if v, ok := d.GetOk("view_expanded_text"); ok { tableInput.ViewExpandedText = aws.String(v.(string)) } - if v, ok := t.GetOk("table_type"); ok { + if v, ok := d.GetOk("table_type"); ok { tableInput.TableType = aws.String(v.(string)) } - if v, ok := t.GetOk("parameters"); ok { + if v, ok := d.GetOk("parameters"); ok { paramsMap := map[string]string{} for key, value := range v.(map[string]interface{}) { paramsMap[key] = value.(string) @@ -393,9 +416,8 @@ func expandGlueStorageDescriptor(s map[string]interface{}) *glue.StorageDescript } if v, ok := s["ser_de_info"]; ok { - for _, elem := range v.([]interface{}) { - storageDescriptor.SerdeInfo = expandSerDeInfo(elem.(map[string]interface{})) - } + list := v.([]interface{}) + storageDescriptor.SerdeInfo = expandGlueSerDeInfo(list[0].(map[string]interface{})) } if v, ok := s["bucket_columns"]; ok { @@ -407,13 +429,12 @@ func expandGlueStorageDescriptor(s map[string]interface{}) *glue.StorageDescript } if v, ok := s["sort_columns"]; ok { - storageDescriptor.SortColumns = expandSortColumns(v.([]interface{})) + storageDescriptor.SortColumns = expandGlueSortColumns(v.([]interface{})) } if v, ok := s["skewed_info"]; ok { - for _, elem := range v.([]interface{}) { - storageDescriptor.SkewedInfo = expandSkewedInfo(elem.(map[string]interface{})) - } + list := v.([]interface{}) + storageDescriptor.SkewedInfo = expandGlueSkewedInfo(list[0].(map[string]interface{})) } if v, ok := s["parameters"]; ok { @@ -454,7 +475,7 @@ func expandGlueColumns(columns []interface{}) []*glue.Column { return columnSlice } -func expandSerDeInfo(s map[string]interface{}) *glue.SerDeInfo { +func expandGlueSerDeInfo(s map[string]interface{}) *glue.SerDeInfo { serDeInfo := &glue.SerDeInfo{} if v, ok := s["name"]; ok { @@ -476,7 +497,7 @@ func expandSerDeInfo(s map[string]interface{}) *glue.SerDeInfo { return serDeInfo } -func expandSortColumns(columns []interface{}) []*glue.Order { +func expandGlueSortColumns(columns []interface{}) []*glue.Order { orderSlice := make([]*glue.Order, len(columns)) for i, element := range columns { @@ -496,7 +517,7 @@ func expandSortColumns(columns []interface{}) []*glue.Order { return orderSlice } -func expandSkewedInfo(s map[string]interface{}) *glue.SkewedInfo { +func expandGlueSkewedInfo(s map[string]interface{}) *glue.SkewedInfo { skewedInfo := &glue.SkewedInfo{} if v, ok := s["skewed_column_names"]; ok { @@ -526,7 +547,7 @@ func expandSkewedInfo(s map[string]interface{}) *glue.SkewedInfo { return skewedInfo } -func flattenStorageDescriptor(s *glue.StorageDescriptor) []map[string]interface{} { +func flattenGlueStorageDescriptor(s *glue.StorageDescriptor) []map[string]interface{} { if s == nil { storageDescriptors := make([]map[string]interface{}, 0) return storageDescriptors @@ -537,17 +558,17 @@ func flattenStorageDescriptor(s *glue.StorageDescriptor) []map[string]interface{ storageDescriptor := make(map[string]interface{}) storageDescriptor["columns"] = flattenGlueColumns(s.Columns) - storageDescriptor["location"] = *s.Location - storageDescriptor["input_format"] = *s.InputFormat - storageDescriptor["output_format"] = *s.OutputFormat - storageDescriptor["compressed"] = *s.Compressed - storageDescriptor["number_of_buckets"] = *s.NumberOfBuckets - storageDescriptor["ser_de_info"] = flattenSerDeInfo(s.SerdeInfo) + storageDescriptor["location"] = aws.StringValue(s.Location) + storageDescriptor["input_format"] = aws.StringValue(s.InputFormat) + storageDescriptor["output_format"] = aws.StringValue(s.OutputFormat) + storageDescriptor["compressed"] = aws.BoolValue(s.Compressed) + storageDescriptor["number_of_buckets"] = aws.Int64Value(s.NumberOfBuckets) + storageDescriptor["ser_de_info"] = flattenGlueSerDeInfo(s.SerdeInfo) storageDescriptor["bucket_columns"] = flattenStringList(s.BucketColumns) - storageDescriptor["sort_columns"] = flattenOrders(s.SortColumns) + storageDescriptor["sort_columns"] = flattenGlueOrders(s.SortColumns) storageDescriptor["parameters"] = flattenStringParameters(s.Parameters) - storageDescriptor["skewed_info"] = flattenSkewedInfo(s.SkewedInfo) - storageDescriptor["stored_as_sub_directories"] = *s.StoredAsSubDirectories + storageDescriptor["skewed_info"] = flattenGlueSkewedInfo(s.SkewedInfo) + storageDescriptor["stored_as_sub_directories"] = aws.BoolValue(s.StoredAsSubDirectories) storageDescriptors[0] = storageDescriptor @@ -594,7 +615,7 @@ func flattenStringParameters(p map[string]*string) map[string]string { return tParams } -func flattenSerDeInfo(s *glue.SerDeInfo) []map[string]interface{} { +func flattenGlueSerDeInfo(s *glue.SerDeInfo) []map[string]interface{} { if s == nil { serDeInfos := make([]map[string]interface{}, 0) return serDeInfos @@ -611,7 +632,7 @@ func flattenSerDeInfo(s *glue.SerDeInfo) []map[string]interface{} { return serDeInfos } -func flattenOrders(os []*glue.Order) []map[string]interface{} { +func flattenGlueOrders(os []*glue.Order) []map[string]interface{} { orders := make([]map[string]interface{}, len(os)) for i, v := range os { order := make(map[string]interface{}) @@ -623,7 +644,7 @@ func flattenOrders(os []*glue.Order) []map[string]interface{} { return orders } -func flattenSkewedInfo(s *glue.SkewedInfo) []map[string]interface{} { +func flattenGlueSkewedInfo(s *glue.SkewedInfo) []map[string]interface{} { if s == nil { skewedInfoSlice := make([]map[string]interface{}, 0) return skewedInfoSlice diff --git a/website/aws.erb b/website/aws.erb index e1e5d969945..70bfc88db46 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1093,15 +1093,15 @@ > aws_glue_catalog_database + > + aws_glue_catalog_table + > aws_glue_connection > aws_glue_job - > - aws_glue_catalog_table - From bf3feeb35f61daf483a1f057ca59036bee60308e Mon Sep 17 00:00:00 2001 From: TomHutch Date: Tue, 8 May 2018 16:33:25 +0100 Subject: [PATCH 0990/3316] update use of readAwsGlueTableID in tests --- aws/resource_aws_glue_catalog_table_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go index 819eeabeb3d..ae80ef55c2b 100644 --- a/aws/resource_aws_glue_catalog_table_test.go +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -472,7 +472,10 @@ func testAccCheckGlueTableDestroy(s *terraform.State) error { continue } - catalogId, dbName, tableName := readAwsGlueTableID(rs.Primary.ID) + catalogId, dbName, tableName, err := readAwsGlueTableID(rs.Primary.ID) + if err != nil { + return err + } input := &glue.GetTableInput{ DatabaseName: aws.String(dbName), @@ -503,7 +506,10 @@ func testAccCheckGlueCatalogTableExists(name string) resource.TestCheckFunc { return fmt.Errorf("No ID is set") } - catalogId, dbName, tableName := readAwsGlueTableID(rs.Primary.ID) + catalogId, dbName, tableName, err := readAwsGlueTableID(rs.Primary.ID) + if err != nil { + return err + } glueconn := testAccProvider.Meta().(*AWSClient).glueconn out, err := glueconn.GetTable(&glue.GetTableInput{ From e80abe873bb68f23cce3ae545e44db2f6687ad57 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Mon, 7 May 2018 00:06:07 -0400 Subject: [PATCH 0991/3316] Refactor s3 acceptance tests to run in multiple partitions. --- aws/data_source_aws_s3_bucket_test.go | 11 +- aws/import_aws_s3_bucket_notification_test.go | 5 +- aws/import_aws_s3_bucket_test.go | 3 +- aws/provider_test.go | 9 ++ ...esource_aws_s3_bucket_notification_test.go | 26 +++-- aws/resource_aws_s3_bucket_policy_test.go | 47 ++++++-- aws/resource_aws_s3_bucket_test.go | 103 ++++++++++++------ 7 files changed, 138 insertions(+), 66 deletions(-) diff --git a/aws/data_source_aws_s3_bucket_test.go b/aws/data_source_aws_s3_bucket_test.go index 12e1ac1b4e1..03c09c0824d 100644 --- a/aws/data_source_aws_s3_bucket_test.go +++ b/aws/data_source_aws_s3_bucket_test.go @@ -11,9 +11,9 @@ import ( func TestAccDataSourceS3Bucket_basic(t *testing.T) { rInt := acctest.RandInt() - arnRegexp := regexp.MustCompile( - "^arn:aws:s3:::") - hostedZoneID, _ := HostedZoneIDForRegion("us-west-2") + arnRegexp := regexp.MustCompile(`^arn:aws[\w-]*:s3:::`) + region := testAccGetRegion() + hostedZoneID, _ := HostedZoneIDForRegion(region) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -24,7 +24,7 @@ func TestAccDataSourceS3Bucket_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists("data.aws_s3_bucket.bucket"), resource.TestMatchResourceAttr("data.aws_s3_bucket.bucket", "arn", arnRegexp), - resource.TestCheckResourceAttr("data.aws_s3_bucket.bucket", "region", "us-west-2"), + resource.TestCheckResourceAttr("data.aws_s3_bucket.bucket", "region", region), resource.TestCheckResourceAttr( "data.aws_s3_bucket.bucket", "bucket_domain_name", testAccBucketDomainName(rInt)), resource.TestCheckResourceAttr( @@ -38,6 +38,7 @@ func TestAccDataSourceS3Bucket_basic(t *testing.T) { func TestAccDataSourceS3Bucket_website(t *testing.T) { rInt := acctest.RandInt() + region := testAccGetRegion() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -50,7 +51,7 @@ func TestAccDataSourceS3Bucket_website(t *testing.T) { testAccCheckAWSS3BucketWebsite( "data.aws_s3_bucket.bucket", "index.html", "error.html", "", ""), resource.TestCheckResourceAttr( - "data.aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt)), + "data.aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt, region)), ), }, }, diff --git a/aws/import_aws_s3_bucket_notification_test.go b/aws/import_aws_s3_bucket_notification_test.go index 20c5fa49cee..36181d22329 100644 --- a/aws/import_aws_s3_bucket_notification_test.go +++ b/aws/import_aws_s3_bucket_notification_test.go @@ -10,6 +10,7 @@ import ( func TestAccAWSS3BucketNotification_importBasic(t *testing.T) { rString := acctest.RandString(8) + partition := testAccGetPartition() topicName := fmt.Sprintf("tf-acc-topic-s3-b-n-import-%s", rString) bucketName := fmt.Sprintf("tf-acc-bucket-n-import-%s", rString) @@ -25,7 +26,7 @@ func TestAccAWSS3BucketNotification_importBasic(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketNotificationDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSS3BucketConfigWithTopicNotification(topicName, bucketName), + Config: testAccAWSS3BucketConfigWithTopicNotification(topicName, bucketName, partition), }, resource.TestStep{ @@ -42,7 +43,7 @@ func TestAccAWSS3BucketNotification_importBasic(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketNotificationDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSS3BucketConfigWithQueueNotification(queueName, bucketName), + Config: testAccAWSS3BucketConfigWithQueueNotification(queueName, bucketName, partition), }, resource.TestStep{ diff --git a/aws/import_aws_s3_bucket_test.go b/aws/import_aws_s3_bucket_test.go index 27ceda067ea..be6799bd619 100644 --- a/aws/import_aws_s3_bucket_test.go +++ b/aws/import_aws_s3_bucket_test.go @@ -35,6 +35,7 @@ func TestAccAWSS3Bucket_importBasic(t *testing.T) { func TestAccAWSS3Bucket_importWithPolicy(t *testing.T) { rInt := acctest.RandInt() + partition := testAccGetPartition() checkFn := func(s []*terraform.InstanceState) error { // Expect 2: bucket + policy @@ -64,7 +65,7 @@ func TestAccAWSS3Bucket_importWithPolicy(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithPolicy(rInt), + Config: testAccAWSS3BucketConfigWithPolicy(rInt, partition), }, { diff --git a/aws/provider_test.go b/aws/provider_test.go index 3a2b7674dbc..b37140a6c9e 100644 --- a/aws/provider_test.go +++ b/aws/provider_test.go @@ -5,6 +5,8 @@ import ( "os" "testing" + "github.com/aws/aws-sdk-go/aws/endpoints" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/terraform" @@ -81,6 +83,13 @@ func testAccGetRegion() string { return v } +func testAccGetPartition() string { + if partition, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), testAccGetRegion()); ok { + return partition.ID() + } + return "aws" +} + func testAccEC2ClassicPreCheck(t *testing.T) { client := testAccProvider.Meta().(*AWSClient) platforms := client.supportedplatforms diff --git a/aws/resource_aws_s3_bucket_notification_test.go b/aws/resource_aws_s3_bucket_notification_test.go index 99adf7cca49..35058088ee8 100644 --- a/aws/resource_aws_s3_bucket_notification_test.go +++ b/aws/resource_aws_s3_bucket_notification_test.go @@ -18,6 +18,7 @@ import ( func TestAccAWSS3BucketNotification_basic(t *testing.T) { rString := acctest.RandString(8) + partition := testAccGetPartition() topicName := fmt.Sprintf("tf-acc-topic-s3-b-notification-%s", rString) bucketName := fmt.Sprintf("tf-acc-bucket-notification-%s", rString) @@ -31,7 +32,7 @@ func TestAccAWSS3BucketNotification_basic(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketNotificationDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSS3BucketConfigWithTopicNotification(topicName, bucketName), + Config: testAccAWSS3BucketConfigWithTopicNotification(topicName, bucketName, partition), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketTopicNotification( "aws_s3_bucket.bucket", @@ -68,7 +69,7 @@ func TestAccAWSS3BucketNotification_basic(t *testing.T) { ), }, resource.TestStep{ - Config: testAccAWSS3BucketConfigWithQueueNotification(queueName, bucketName), + Config: testAccAWSS3BucketConfigWithQueueNotification(queueName, bucketName, partition), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketQueueNotification( "aws_s3_bucket.bucket", @@ -119,6 +120,7 @@ func TestAccAWSS3BucketNotification_basic(t *testing.T) { func TestAccAWSS3BucketNotification_withoutFilter(t *testing.T) { rString := acctest.RandString(8) + partition := testAccGetPartition() topicName := fmt.Sprintf("tf-acc-topic-s3-b-notification-wo-f-%s", rString) bucketName := fmt.Sprintf("tf-acc-bucket-notification-wo-f-%s", rString) @@ -129,7 +131,7 @@ func TestAccAWSS3BucketNotification_withoutFilter(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketNotificationDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSS3BucketConfigWithTopicNotificationWithoutFilter(topicName, bucketName), + Config: testAccAWSS3BucketConfigWithTopicNotificationWithoutFilter(topicName, bucketName, partition), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketTopicNotification( "aws_s3_bucket.bucket", @@ -352,7 +354,7 @@ func testAccCheckAWSS3BucketLambdaFunctionConfiguration(n, i, t string, events [ } } -func testAccAWSS3BucketConfigWithTopicNotification(topicName, bucketName string) string { +func testAccAWSS3BucketConfigWithTopicNotification(topicName, bucketName, partition string) string { return fmt.Sprintf(` resource "aws_sns_topic" "topic" { name = "%s" @@ -364,7 +366,7 @@ resource "aws_sns_topic" "topic" { "Effect": "Allow", "Principal": {"AWS":"*"}, "Action": "SNS:Publish", - "Resource": "arn:aws:sns:*:*:%s", + "Resource": "arn:%s:sns:*:*:%s", "Condition":{ "ArnLike":{"aws:SourceArn":"${aws_s3_bucket.bucket.arn}"} } @@ -400,10 +402,10 @@ resource "aws_s3_bucket_notification" "notification" { filter_suffix = ".log" } } -`, topicName, topicName, bucketName) +`, topicName, partition, topicName, bucketName) } -func testAccAWSS3BucketConfigWithQueueNotification(queueName, bucketName string) string { +func testAccAWSS3BucketConfigWithQueueNotification(queueName, bucketName, partition string) string { return fmt.Sprintf(` resource "aws_sqs_queue" "queue" { name = "%s" @@ -414,7 +416,7 @@ resource "aws_sqs_queue" "queue" { "Effect":"Allow", "Principal":"*", "Action":"sqs:SendMessage", - "Resource":"arn:aws:sqs:*:*:%s", + "Resource":"arn:%s:sqs:*:*:%s", "Condition":{ "ArnEquals":{ "aws:SourceArn":"${aws_s3_bucket.bucket.arn}" @@ -443,7 +445,7 @@ resource "aws_s3_bucket_notification" "notification" { filter_suffix = ".mp4" } } -`, queueName, queueName, bucketName) +`, queueName, partition, queueName, bucketName) } func testAccAWSS3BucketConfigWithLambdaNotification(roleName, lambdaFuncName, bucketName string) string { @@ -504,7 +506,7 @@ resource "aws_s3_bucket_notification" "notification" { `, roleName, lambdaFuncName, bucketName) } -func testAccAWSS3BucketConfigWithTopicNotificationWithoutFilter(topicName, bucketName string) string { +func testAccAWSS3BucketConfigWithTopicNotificationWithoutFilter(topicName, bucketName, partition string) string { return fmt.Sprintf(` resource "aws_sns_topic" "topic" { name = "%s" @@ -516,7 +518,7 @@ resource "aws_sns_topic" "topic" { "Effect": "Allow", "Principal": {"AWS":"*"}, "Action": "SNS:Publish", - "Resource": "arn:aws:sns:*:*:%s", + "Resource": "arn:%s:sns:*:*:%s", "Condition":{ "ArnLike":{"aws:SourceArn":"${aws_s3_bucket.bucket.arn}"} } @@ -541,5 +543,5 @@ resource "aws_s3_bucket_notification" "notification" { ] } } -`, topicName, topicName, bucketName) +`, topicName, partition, topicName, bucketName) } diff --git a/aws/resource_aws_s3_bucket_policy_test.go b/aws/resource_aws_s3_bucket_policy_test.go index 70a269f01b1..91ccef378ed 100644 --- a/aws/resource_aws_s3_bucket_policy_test.go +++ b/aws/resource_aws_s3_bucket_policy_test.go @@ -14,10 +14,18 @@ import ( func TestAccAWSS3BucketPolicy_basic(t *testing.T) { name := fmt.Sprintf("tf-test-bucket-%d", acctest.RandInt()) - - expectedPolicyText := fmt.Sprintf( - `{"Version":"2012-10-17","Statement":[{"Sid": "", "Effect":"Allow","Principal":"*","Action":"s3:*","Resource":["arn:aws:s3:::%s/*","arn:aws:s3:::%s"]}]}`, - name, name) + partition := testAccGetPartition() + + expectedPolicyText := fmt.Sprintf(`{ + "Version": "2012-10-17", + "Statement": [{ + "Sid": "", + "Effect": "Allow", + "Principal": "*", + "Action": "s3:*", + "Resource": ["arn:%s:s3:::%s/*","arn:%s:s3:::%s"] + }] +}`, partition, name, partition, name) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -37,14 +45,29 @@ func TestAccAWSS3BucketPolicy_basic(t *testing.T) { func TestAccAWSS3BucketPolicy_policyUpdate(t *testing.T) { name := fmt.Sprintf("tf-test-bucket-%d", acctest.RandInt()) - - expectedPolicyText1 := fmt.Sprintf( - `{"Version":"2012-10-17","Statement":[{"Sid": "", "Effect":"Allow","Principal":"*","Action":"s3:*","Resource":["arn:aws:s3:::%s/*","arn:aws:s3:::%s"]}]}`, - name, name) - - expectedPolicyText2 := fmt.Sprintf( - `{"Version":"2012-10-17","Statement":[{"Sid": "", "Effect":"Allow","Principal":"*","Action":["s3:DeleteBucket", "s3:ListBucket", "s3:ListBucketVersions"], "Resource":["arn:aws:s3:::%s/*","arn:aws:s3:::%s"]}]}`, - name, name) + partition := testAccGetPartition() + + expectedPolicyText1 := fmt.Sprintf(`{ + "Version": "2012-10-17", + "Statement": [{ + "Sid": "", + "Effect": "Allow", + "Principal": "*", + "Action": "s3:*", + "Resource": ["arn:%s:s3:::%s/*","arn:%s:s3:::%s"] + }] +}`, partition, name, partition, name) + + expectedPolicyText2 := fmt.Sprintf(`{ + "Version":"2012-10-17", + "Statement":[{ + "Sid": "", + "Effect": "Allow", + "Principal": "*", + "Action": ["s3:DeleteBucket", "s3:ListBucket", "s3:ListBucketVersions"], + "Resource": ["arn:%s:s3:::%s/*","arn:%s:s3:::%s"] + }] +}`, partition, name, partition, name) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index 4b72922e75b..2d1525fb963 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -24,9 +24,9 @@ import ( func TestAccAWSS3Bucket_basic(t *testing.T) { rInt := acctest.RandInt() - arnRegexp := regexp.MustCompile( - "^arn:aws:s3:::") - hostedZoneID, _ := HostedZoneIDForRegion("us-west-2") + arnRegexp := regexp.MustCompile(`^arn:aws[\w-]*:s3:::`) + region := testAccGetRegion() + hostedZoneID, _ := HostedZoneIDForRegion(region) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -44,7 +44,7 @@ func TestAccAWSS3Bucket_basic(t *testing.T) { resource.TestCheckResourceAttr( "aws_s3_bucket.bucket", "hosted_zone_id", hostedZoneID), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "region", "us-west-2"), + "aws_s3_bucket.bucket", "region", region), resource.TestCheckNoResourceAttr( "aws_s3_bucket.bucket", "website_endpoint"), resource.TestMatchResourceAttr( @@ -109,6 +109,11 @@ func TestAccAWSS3Bucket_generatedName(t *testing.T) { func TestAccAWSS3Bucket_region(t *testing.T) { rInt := acctest.RandInt() + partition := testAccGetPartition() + + if partition == "aws-us-gov" { + t.Skip("skipping replication tests; govcloud only includes a single region") + } resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -128,6 +133,11 @@ func TestAccAWSS3Bucket_region(t *testing.T) { func TestAccAWSS3Bucket_acceleration(t *testing.T) { rInt := acctest.RandInt() + partition := testAccGetPartition() + + if partition == "aws-us-gov" { + t.Skip("skipping acceleration tests; govcloud does not support cloudfront") + } resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -194,6 +204,7 @@ func TestAccAWSS3Bucket_RequestPayer(t *testing.T) { func TestAccAWSS3Bucket_Policy(t *testing.T) { rInt := acctest.RandInt() + partition := testAccGetPartition() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -201,11 +212,11 @@ func TestAccAWSS3Bucket_Policy(t *testing.T) { CheckDestroy: testAccCheckAWSS3BucketDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSS3BucketConfigWithPolicy(rInt), + Config: testAccAWSS3BucketConfigWithPolicy(rInt, partition), Check: resource.ComposeTestCheckFunc( testAccCheckAWSS3BucketExists("aws_s3_bucket.bucket"), testAccCheckAWSS3BucketPolicy( - "aws_s3_bucket.bucket", testAccAWSS3BucketPolicy(rInt)), + "aws_s3_bucket.bucket", testAccAWSS3BucketPolicy(rInt, partition)), ), }, { @@ -260,6 +271,7 @@ func TestAccAWSS3Bucket_UpdateAcl(t *testing.T) { func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { rInt := acctest.RandInt() + region := testAccGetRegion() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -272,7 +284,7 @@ func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { testAccCheckAWSS3BucketWebsite( "aws_s3_bucket.bucket", "index.html", "", "", ""), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt)), + "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt, region)), ), }, { @@ -282,7 +294,7 @@ func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { testAccCheckAWSS3BucketWebsite( "aws_s3_bucket.bucket", "index.html", "error.html", "", ""), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt)), + "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt, region)), ), }, { @@ -301,6 +313,7 @@ func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { rInt := acctest.RandInt() + region := testAccGetRegion() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -313,7 +326,7 @@ func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { testAccCheckAWSS3BucketWebsite( "aws_s3_bucket.bucket", "", "", "", "hashicorp.com?my=query"), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt)), + "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt, region)), ), }, { @@ -323,7 +336,7 @@ func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { testAccCheckAWSS3BucketWebsite( "aws_s3_bucket.bucket", "", "", "https", "hashicorp.com?my=query"), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt)), + "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt, region)), ), }, { @@ -342,6 +355,7 @@ func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { rInt := acctest.RandInt() + region := testAccGetRegion() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -367,7 +381,7 @@ func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { }, ), resource.TestCheckResourceAttr( - "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt)), + "aws_s3_bucket.bucket", "website_endpoint", testAccWebsiteEndpoint(rInt, region)), ), }, { @@ -756,6 +770,12 @@ func TestAccAWSS3Bucket_LifecycleExpireMarkerOnly(t *testing.T) { func TestAccAWSS3Bucket_Replication(t *testing.T) { rInt := acctest.RandInt() + region := testAccGetRegion() + partition := testAccGetPartition() + + if partition == "aws-us-gov" { + t.Skip("skipping replication tests; govcloud only includes a single region") + } // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider @@ -768,7 +788,7 @@ func TestAccAWSS3Bucket_Replication(t *testing.T) { { Config: testAccAWSS3BucketConfigReplication(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc("us-west-2", &providers)), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "0"), ), @@ -776,19 +796,19 @@ func TestAccAWSS3Bucket_Replication(t *testing.T) { { Config: testAccAWSS3BucketConfigReplicationWithConfiguration(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc("us-west-2", &providers)), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), - resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws[\\w-]*:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), testAccCheckAWSS3BucketReplicationRules( "aws_s3_bucket.bucket", - testAccAwsRegionProviderFunc("us-west-2", &providers), + testAccAwsRegionProviderFunc(region, &providers), []*s3.ReplicationRule{ { ID: aws.String("foobar"), Destination: &s3.Destination{ - Bucket: aws.String(fmt.Sprintf("arn:aws:s3:::tf-test-bucket-destination-%d", rInt)), + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), StorageClass: aws.String(s3.ObjectStorageClassStandard), }, Prefix: aws.String("foo"), @@ -801,18 +821,18 @@ func TestAccAWSS3Bucket_Replication(t *testing.T) { { Config: testAccAWSS3BucketConfigReplicationWithSseKmsEncryptedObjects(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc("us-west-2", &providers)), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), - resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws[\\w-]*:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), testAccCheckAWSS3BucketReplicationRules( "aws_s3_bucket.bucket", - testAccAwsRegionProviderFunc("us-west-2", &providers), + testAccAwsRegionProviderFunc(region, &providers), []*s3.ReplicationRule{ { ID: aws.String("foobar"), Destination: &s3.Destination{ - Bucket: aws.String(fmt.Sprintf("arn:aws:s3:::tf-test-bucket-destination-%d", rInt)), + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), StorageClass: aws.String(s3.ObjectStorageClassStandard), EncryptionConfiguration: &s3.EncryptionConfiguration{ ReplicaKmsKeyID: aws.String("${aws_kms_key.replica.arn}"), @@ -837,6 +857,12 @@ func TestAccAWSS3Bucket_Replication(t *testing.T) { // StorageClass issue: https://github.com/hashicorp/terraform/issues/10909 func TestAccAWSS3Bucket_ReplicationWithoutStorageClass(t *testing.T) { rInt := acctest.RandInt() + region := testAccGetRegion() + partition := testAccGetPartition() + + if partition == "aws-us-gov" { + t.Skip("skipping replication tests; govcloud only includes a single region") + } // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider @@ -849,7 +875,7 @@ func TestAccAWSS3Bucket_ReplicationWithoutStorageClass(t *testing.T) { { Config: testAccAWSS3BucketConfigReplicationWithoutStorageClass(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc("us-west-2", &providers)), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), ), }, @@ -859,6 +885,11 @@ func TestAccAWSS3Bucket_ReplicationWithoutStorageClass(t *testing.T) { func TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError(t *testing.T) { rInt := acctest.RandInt() + partition := testAccGetPartition() + + if partition == "aws-us-gov" { + t.Skip("skipping replication tests; govcloud only includes a single region") + } // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider @@ -1305,12 +1336,23 @@ func testAccBucketDomainName(randInt int) string { return fmt.Sprintf("tf-test-bucket-%d.s3.amazonaws.com", randInt) } -func testAccWebsiteEndpoint(randInt int) string { - return fmt.Sprintf("tf-test-bucket-%d.s3-website-us-west-2.amazonaws.com", randInt) +func testAccWebsiteEndpoint(randInt int, region string) string { + return fmt.Sprintf("tf-test-bucket-%d.s3-website-%s.amazonaws.com", randInt, region) } -func testAccAWSS3BucketPolicy(randInt int) string { - return fmt.Sprintf(`{ "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::tf-test-bucket-%d/*" } ] }`, randInt) +func testAccAWSS3BucketPolicy(randInt int, partition string) string { + return fmt.Sprintf(`{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Allow", + "Principal": {"AWS": "*"}, + "Action": "s3:GetObject", + "Resource": "arn:%s:s3:::tf-test-bucket-%d/*" + } + ] +}`, partition, randInt) } func testAccAWSS3BucketConfig(randInt int) string { @@ -1484,15 +1526,8 @@ EOF func testAccAWSS3BucketConfigWithAcceleration(randInt int) string { return fmt.Sprintf(` -provider "aws" { - alias = "west" - region = "eu-west-1" -} - resource "aws_s3_bucket" "bucket" { - provider = "aws.west" bucket = "tf-test-bucket-%d" - region = "eu-west-1" acl = "public-read" acceleration_status = "Enabled" } @@ -1536,14 +1571,14 @@ resource "aws_s3_bucket" "bucket" { `, randInt) } -func testAccAWSS3BucketConfigWithPolicy(randInt int) string { +func testAccAWSS3BucketConfigWithPolicy(randInt int, partition string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "bucket" { bucket = "tf-test-bucket-%d" acl = "public-read" policy = %s } -`, randInt, strconv.Quote(testAccAWSS3BucketPolicy(randInt))) +`, randInt, strconv.Quote(testAccAWSS3BucketPolicy(randInt, partition))) } func testAccAWSS3BucketDestroyedConfig(randInt int) string { From 59b75d931f6c61bebf12bce448c66b9570b7883b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 8 May 2018 12:25:44 -0400 Subject: [PATCH 0992/3316] Update CHANGELOG for #4368 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2f029104f2..b4a0c8729a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.18.0 (Unreleased) +FEATURES: + +* **New Resource:** `aws_glue_catalog_table` [GH-4368] + ENHANCEMENTS: * resource/aws_dms_endpoint: Support `s3` `engine_name` and add `s3_settings` argument [GH-1685] and [GH-4447] From d9f3cffb4cf8346bb610adb693934840fb3a87ea Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 8 May 2018 12:30:16 -0400 Subject: [PATCH 0993/3316] Add import documentation --- website/docs/r/glue_catalog_table.html.markdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/docs/r/glue_catalog_table.html.markdown b/website/docs/r/glue_catalog_table.html.markdown index 7855d3d9045..0ed5fcb16b9 100644 --- a/website/docs/r/glue_catalog_table.html.markdown +++ b/website/docs/r/glue_catalog_table.html.markdown @@ -74,3 +74,10 @@ The following arguments are supported: * `skewed_column_value_location_maps` - (Optional) A list of values that appear so frequently as to be considered skewed. * `skewed_column_values` - (Optional) A mapping of skewed values to the columns that contain them. +## Import + +Glue Tables can be imported with their catalog ID (usually AWS account ID), database name, and table name, e.g. + +``` +$ terraform import aws_glue_catalog_table.MyTable 123456789012:MyDatabase:MyTable +``` From 717ef120bc2acb775868c5f77122babfff34ba30 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 8 May 2018 13:56:52 -0400 Subject: [PATCH 0994/3316] New Data Source: aws_glue_script --- aws/data_source_aws_glue_script.go | 182 +++++++++++++++++++++++ aws/data_source_aws_glue_script_test.go | 52 +++++++ aws/provider.go | 1 + website/aws.erb | 3 + website/docs/d/glue_script.html.markdown | 83 +++++++++++ 5 files changed, 321 insertions(+) create mode 100644 aws/data_source_aws_glue_script.go create mode 100644 aws/data_source_aws_glue_script_test.go create mode 100644 website/docs/d/glue_script.html.markdown diff --git a/aws/data_source_aws_glue_script.go b/aws/data_source_aws_glue_script.go new file mode 100644 index 00000000000..25584b23edd --- /dev/null +++ b/aws/data_source_aws_glue_script.go @@ -0,0 +1,182 @@ +package aws + +import ( + "errors" + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/validation" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsGlueScript() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsGlueScriptRead, + Schema: map[string]*schema.Schema{ + "dag_edge": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "source": { + Type: schema.TypeString, + Required: true, + }, + "target": { + Type: schema.TypeString, + Required: true, + }, + "target_parameter": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "dag_node": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "args": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "param": { + Type: schema.TypeBool, + Optional: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "id": { + Type: schema.TypeString, + Required: true, + }, + "line_number": { + Type: schema.TypeInt, + Optional: true, + }, + "node_type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "language": { + Type: schema.TypeString, + Optional: true, + Default: glue.LanguagePython, + ValidateFunc: validation.StringInSlice([]string{ + glue.LanguagePython, + glue.LanguageScala, + }, false), + }, + "python_script": { + Type: schema.TypeString, + Computed: true, + }, + "scala_code": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsGlueScriptRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + input := &glue.CreateScriptInput{ + DagEdges: expandGlueCodeGenEdges(d.Get("dag_edge").([]interface{})), + DagNodes: expandGlueCodeGenNodes(d.Get("dag_node").([]interface{})), + } + + if v, ok := d.GetOk("language"); ok && v.(string) != "" { + input.Language = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Glue Script: %s", input) + output, err := conn.CreateScript(input) + if err != nil { + return fmt.Errorf("error creating Glue script: %s", err) + } + + if output == nil { + return errors.New("script not created") + } + + d.SetId(time.Now().UTC().String()) + d.Set("python_script", output.PythonScript) + d.Set("scala_code", output.ScalaCode) + + return nil +} + +func expandGlueCodeGenNodeArgs(l []interface{}) []*glue.CodeGenNodeArg { + args := []*glue.CodeGenNodeArg{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + arg := &glue.CodeGenNodeArg{ + Name: aws.String(m["name"].(string)), + Param: aws.Bool(m["param"].(bool)), + Value: aws.String(m["value"].(string)), + } + args = append(args, arg) + } + + return args +} + +func expandGlueCodeGenEdges(l []interface{}) []*glue.CodeGenEdge { + edges := []*glue.CodeGenEdge{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + edge := &glue.CodeGenEdge{ + Source: aws.String(m["source"].(string)), + Target: aws.String(m["target"].(string)), + } + if v, ok := m["target_parameter"]; ok && v.(string) != "" { + edge.TargetParameter = aws.String(v.(string)) + } + edges = append(edges, edge) + } + + return edges +} + +func expandGlueCodeGenNodes(l []interface{}) []*glue.CodeGenNode { + nodes := []*glue.CodeGenNode{} + + for _, mRaw := range l { + m := mRaw.(map[string]interface{}) + node := &glue.CodeGenNode{ + Args: expandGlueCodeGenNodeArgs(m["args"].([]interface{})), + Id: aws.String(m["id"].(string)), + NodeType: aws.String(m["node_type"].(string)), + } + if v, ok := m["line_number"]; ok && v.(int) != 0 { + node.LineNumber = aws.Int64(int64(v.(int))) + } + nodes = append(nodes, node) + } + + return nodes +} diff --git a/aws/data_source_aws_glue_script_test.go b/aws/data_source_aws_glue_script_test.go new file mode 100644 index 00000000000..05dd26da7b1 --- /dev/null +++ b/aws/data_source_aws_glue_script_test.go @@ -0,0 +1,52 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAWSGlueScript_Language_Python(t *testing.T) { + dataSourceName := "data.aws_glue_script.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSGlueScriptConfig_Language("PYTHON"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(dataSourceName, "python_script"), + ), + }, + }, + }) +} + +func TestAccDataSourceAWSGlueScript_Language_Scala(t *testing.T) { + dataSourceName := "data.aws_glue_script.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAWSGlueScriptConfig_Language("SCALA"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet(dataSourceName, "scala_code"), + ), + }, + }, + }) +} + +func testAccDataSourceAWSGlueScriptConfig_Language(language string) string { + return fmt.Sprintf(` +data "aws_glue_script" "test" { + dag_edge = [] + dag_node = [] + language = "%s" +} +`, language) +} diff --git a/aws/provider.go b/aws/provider.go index c093890c444..3139ea1462e 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -196,6 +196,7 @@ func Provider() terraform.ResourceProvider { "aws_elasticache_replication_group": dataSourceAwsElasticacheReplicationGroup(), "aws_elb_hosted_zone_id": dataSourceAwsElbHostedZoneId(), "aws_elb_service_account": dataSourceAwsElbServiceAccount(), + "aws_glue_script": dataSourceAwsGlueScript(), "aws_iam_account_alias": dataSourceAwsIamAccountAlias(), "aws_iam_group": dataSourceAwsIAMGroup(), "aws_iam_instance_profile": dataSourceAwsIAMInstanceProfile(), diff --git a/website/aws.erb b/website/aws.erb index 3e08ecf2ac2..588b7791ef8 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -142,6 +142,9 @@ > aws_elb_service_account + > + aws_glue_script + > aws_iam_account_alias diff --git a/website/docs/d/glue_script.html.markdown b/website/docs/d/glue_script.html.markdown new file mode 100644 index 00000000000..95b2c5ec9b7 --- /dev/null +++ b/website/docs/d/glue_script.html.markdown @@ -0,0 +1,83 @@ +--- +layout: "aws" +page_title: "AWS: aws_glue_script" +sidebar_current: "docs-aws-datasource-glue-script" +description: |- + Generate Glue script from Directed Acyclic Graph +--- + +# Data Source: aws_glue_script + +Use this data source to generate a Glue script from a Directed Acyclic Graph (DAG). + +## Example Usage + +### Generate Python Script + +```hcl +data "aws_glue_script" "example" { + language = "PYTHON" + + dag_edge = [ + # ... + ] + + dag_node = [ + # ... + ] +} + +output "python_script" { + value = "${data.aws_glue_script.example.python_script}" +} +``` + +### Generate Scala Code + +```hcl +data "aws_glue_script" "example" { + language = "SCALA" + + dag_edge = [ + # ... + ] + + dag_node = [ + # ... + ] +} + +output "scala_code" { + value = "${data.aws_glue_script.example.scala_code}" +} +``` + +## Argument Reference + +* `dag_edge` - (Required) A list of the edges in the DAG. Defined below. +* `dag_node` - (Required) A list of the nodes in the DAG. Defined below. +* `language` - (Optional) The programming language of the resulting code from the DAG. Defaults to `PYTHON`. Valid values are `PYTHON` and `SCALA`. + +### dag_edge Argument Reference + +* `source` - (Required) The ID of the node at which the edge starts. +* `target` - (Required) The ID of the node at which the edge ends. +* `target_parameter` - (Optional) The target of the edge. + +### dag_node Argument Reference + +* `args` - (Required) Nested configuration an argument or property of a node. Defined below. +* `id` - (Required) A node identifier that is unique within the node's graph. +* `line_number` - (Optional) The line number of the node. +* `node_type` - (Required) The type of node this is. + +#### args Argument Reference + +* `name` - (Required) The name of the argument or property. +* `param` - (Optional) Boolean if the value is used as a parameter. Defaults to `false`. +* `value` - (Required) The value of the argument or property. + +## Attributes Reference + +* `python_script` - The Python script generated from the DAG. The `language` argument must be set to `PYTHON`. +* `scala_code` - The Scala code generated from the DAG. The `language` argument must be set to `SCALA`. From c16d13d3954767d920b9b246f6ee35ae895b57ac Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 8 May 2018 15:18:00 -0400 Subject: [PATCH 0995/3316] docs/resource/aws_ssm_patch_baseline: Add CENTOS to operating_system valid values --- website/docs/r/ssm_patch_baseline.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/ssm_patch_baseline.html.markdown b/website/docs/r/ssm_patch_baseline.html.markdown index 647ba6aa9b7..6464a3846fa 100644 --- a/website/docs/r/ssm_patch_baseline.html.markdown +++ b/website/docs/r/ssm_patch_baseline.html.markdown @@ -78,7 +78,7 @@ The following arguments are supported: * `name` - (Required) The name of the patch baseline. * `description` - (Optional) The description of the patch baseline. -* `operating_system` - (Optional) Defines the operating system the patch baseline applies to. Supported operating systems include `WINDOWS`, `AMAZON_LINUX`, `UBUNTU` and `REDHAT_ENTERPRISE_LINUX`. The Default value is `WINDOWS`. +* `operating_system` - (Optional) Defines the operating system the patch baseline applies to. Supported operating systems include `WINDOWS`, `AMAZON_LINUX`, `UBUNTU`, `CENTOS`, and `REDHAT_ENTERPRISE_LINUX`. The Default value is `WINDOWS`. * `approved_patches_compliance_level` - (Optional) Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. Valid compliance levels include the following: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFORMATIONAL`, `UNSPECIFIED`. The default value is `UNSPECIFIED`. * `approved_patches` - (Optional) A list of explicitly approved patches for the baseline. * `rejected_patches` - (Optional) A list of rejected patches. From 8ae7c1fda4fedef1e31fb1473ee9a1ccb315cacc Mon Sep 17 00:00:00 2001 From: Pang-Yen Chou Date: Tue, 8 May 2018 21:42:34 +0200 Subject: [PATCH 0996/3316] Fixes an issue where the `cname_prefix` attribute isn't correctly read in China. --- aws/resource_aws_elastic_beanstalk_environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_elastic_beanstalk_environment.go b/aws/resource_aws_elastic_beanstalk_environment.go index 48f20587c78..1f1579f9538 100644 --- a/aws/resource_aws_elastic_beanstalk_environment.go +++ b/aws/resource_aws_elastic_beanstalk_environment.go @@ -584,7 +584,7 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int } if env.CNAME != nil { - beanstalkCnamePrefixRegexp := regexp.MustCompile(`(^[^.]+)(.\w{2}-\w{4,9}-\d)?.elasticbeanstalk.com$`) + beanstalkCnamePrefixRegexp := regexp.MustCompile(`(^[^.]+)(.\w{2}-\w{4,9}-\d)?.(elasticbeanstalk.com|eb.amazonaws.com.cn)$`) var cnamePrefix string cnamePrefixMatch := beanstalkCnamePrefixRegexp.FindStringSubmatch(*env.CNAME) From 40e0738434f70c2a49433d3fc312af9cfe023d06 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Tue, 8 May 2018 23:03:08 -0400 Subject: [PATCH 0997/3316] Fix root volume lookup. [Fixes #4469] --- aws/resource_aws_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index ce867c5a9c5..609baf3b830 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -1335,7 +1335,7 @@ func fetchRootDeviceName(ami string, conn *ec2.EC2) (*string, error) { // BlockDeviceMapping entry serves as the root device. rootDeviceNameInMapping := false for _, bdm := range image.BlockDeviceMappings { - if bdm.DeviceName == image.RootDeviceName { + if aws.StringValue(bdm.DeviceName) == aws.StringValue(image.RootDeviceName) { rootDeviceNameInMapping = true } } From 307be1eb60232f420e04556c3f84e1f543eb4f0d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 08:46:29 -0400 Subject: [PATCH 0998/3316] Update CHANGELOG for #4485 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4a0c8729a8..7572f701c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ENHANCEMENTS: BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] +* resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute China partition [GH-4485] * resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error [GH-4344] * resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error [GH-4344] * resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error [GH-4344] From 98439e81f41d7113d048c0e2f0f58686dbf89a19 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 08:46:54 -0400 Subject: [PATCH 0999/3316] Update CHANGELOG for #4485 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7572f701c9f..dbcd1dffaa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ ENHANCEMENTS: BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] -* resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute China partition [GH-4485] +* resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute in China partition [GH-4485] * resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error [GH-4344] * resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error [GH-4344] * resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error [GH-4344] From 53fb1ce2b1ec6e267cfef9e3be41d7491e30984e Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 9 May 2018 11:10:02 -0400 Subject: [PATCH 1000/3316] Add regression tests for #4469. --- aws/resource_aws_instance_test.go | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index a9356dc5f9a..151483fcb30 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" @@ -15,6 +17,63 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func TestFetchRootDevice(t *testing.T) { + cases := []struct { + label string + images []*ec2.Image + name string + }{ + { + "device name in mappings", + []*ec2.Image{{ + RootDeviceType: aws.String("ebs"), + RootDeviceName: aws.String("/dev/xvda"), + BlockDeviceMappings: []*ec2.BlockDeviceMapping{ + {DeviceName: aws.String("/dev/xvdb")}, + {DeviceName: aws.String("/dev/xvda")}, + }, + }}, + "/dev/xvda", + }, + { + "device name not in mappings", + []*ec2.Image{{ + RootDeviceType: aws.String("ebs"), + RootDeviceName: aws.String("/dev/xvda"), + BlockDeviceMappings: []*ec2.BlockDeviceMapping{ + {DeviceName: aws.String("/dev/xvdb")}, + {DeviceName: aws.String("/dev/xvdc")}, + }, + }}, + "/dev/xvdb", + }, + { + "no images", + []*ec2.Image{}, + "", + }, + } + + conn := ec2.New(session.New(nil)) + + for _, tc := range cases { + t.Run(fmt.Sprintf(tc.label), func(t *testing.T) { + conn.Handlers.Clear() + conn.Handlers.Send.PushBack(func(r *request.Request) { + data := r.Data.(*ec2.DescribeImagesOutput) + data.Images = tc.images + }) + name, err := fetchRootDeviceName("ami-123", conn) + if err != nil { + t.Errorf("Error fetching device name: %s", err) + } + if tc.name != aws.StringValue(name) { + t.Errorf("Expected name %s, got %s", tc.name, aws.StringValue(name)) + } + }) + } +} + func TestAccAWSInstance_basic(t *testing.T) { var v ec2.Instance var vol *ec2.Volume From c01b933d54906e08972c20d8b8fdb1a837026385 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 11:36:15 -0400 Subject: [PATCH 1001/3316] Update CHANGELOG for #4489 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbcd1dffaa8..35c09a11f8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] * resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute in China partition [GH-4485] +* resource/aws_instance: Fix `root_device_mapping` matching of expected root device name with multiple block devices. [GH-4489] * resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error [GH-4344] * resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error [GH-4344] * resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error [GH-4344] From 1c683760b964e0854c661971e1cbcfed0549b415 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 15:21:57 -0400 Subject: [PATCH 1002/3316] resource/aws_acmpca_certificate_authority: Set Required: true on certificate_authority_configuration and subject, clarify subject requirement in documentation --- aws/resource_aws_acmpca_certificate_authority.go | 4 ++-- website/docs/r/acmpca_certificate_authority.html.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_acmpca_certificate_authority.go b/aws/resource_aws_acmpca_certificate_authority.go index 067fe3d69d4..81bc3479f41 100644 --- a/aws/resource_aws_acmpca_certificate_authority.go +++ b/aws/resource_aws_acmpca_certificate_authority.go @@ -37,7 +37,7 @@ func resourceAwsAcmpcaCertificateAuthority() *schema.Resource { // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CertificateAuthorityConfiguration.html "certificate_authority_configuration": { Type: schema.TypeList, - Optional: true, + Required: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -68,7 +68,7 @@ func resourceAwsAcmpcaCertificateAuthority() *schema.Resource { // https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ASN1Subject.html "subject": { Type: schema.TypeList, - Optional: true, + Required: true, ForceNew: true, MaxItems: 1, Elem: &schema.Resource{ diff --git a/website/docs/r/acmpca_certificate_authority.html.markdown b/website/docs/r/acmpca_certificate_authority.html.markdown index 22a5167096e..7f2f83e774f 100644 --- a/website/docs/r/acmpca_certificate_authority.html.markdown +++ b/website/docs/r/acmpca_certificate_authority.html.markdown @@ -99,7 +99,7 @@ The following arguments are supported: * `key_algorithm` - (Required) Type of the public key algorithm and size, in bits, of the key pair that your key pair creates when it issues a certificate. Valid values can be found in the [ACM PCA Documentation](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CertificateAuthorityConfiguration.html). * `signing_algorithm` - (Required) Name of the algorithm your private CA uses to sign certificate requests. Valid values can be found in the [ACM PCA Documentation](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CertificateAuthorityConfiguration.html). -* `subject` - (Required) Nested argument that contains X.500 distinguished name information +* `subject` - (Required) Nested argument that contains X.500 distinguished name information. At least one nested attribute must be specified. #### subject From 1712f92be0b3a8c609f680084e3bfb78878521ca Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 15:29:12 -0400 Subject: [PATCH 1003/3316] Update CHANGELOG for #4458 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c09a11f8d..7ff3f52bf7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ FEATURES: +* **New Data Source:** `aws_acmpca_certificate_authority` [GH-4458] +* **New Resource:** `aws_acmpca_certificate_authority` [GH-4458] * **New Resource:** `aws_glue_catalog_table` [GH-4368] ENHANCEMENTS: From fc309ae74debd6d045274e040be58205980bfa2a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 15:59:09 -0400 Subject: [PATCH 1004/3316] Update CHANGELOG for #4460 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ff3f52bf7c..2a38d6bee65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ FEATURES: ENHANCEMENTS: * resource/aws_dms_endpoint: Support `s3` `engine_name` and add `s3_settings` argument [GH-1685] and [GH-4447] +* resource/aws_glue_job: Add `timeout` argument [GH-4460] * resource/aws_lb_target_group: Add `proxy_protocol_v2` argument [GH-4365] * resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] * resource/aws_spot_fleet_request: Add plan time validation for `valid_from` and `valid_until` arguments [GH-4463] From 6f5236e18d322f4e00a8b026ba68557399f8a8cc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 16:01:42 -0400 Subject: [PATCH 1005/3316] Update CHANGELOG for #4461 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a38d6bee65..fd29817bf35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ BUG FIXES: * data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] * resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute in China partition [GH-4485] +* resource/aws_glue_job: Remove `allocated_capacity` and `max_concurrent_runs` upper plan time validation limits [GH-4461] * resource/aws_instance: Fix `root_device_mapping` matching of expected root device name with multiple block devices. [GH-4489] * resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error [GH-4344] * resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error [GH-4344] From e7d9b8bcbe21cbd4cd2279aab3b99471cef76801 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 9 May 2018 16:17:22 -0400 Subject: [PATCH 1006/3316] Update CHANGELOG for #4459 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd29817bf35..0a42bb95457 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ FEATURES: ENHANCEMENTS: +* provider: Lower retry threshold for DNS resolution failures [GH-4459] * resource/aws_dms_endpoint: Support `s3` `engine_name` and add `s3_settings` argument [GH-1685] and [GH-4447] * resource/aws_glue_job: Add `timeout` argument [GH-4460] * resource/aws_lb_target_group: Add `proxy_protocol_v2` argument [GH-4365] From ab1c498e7430bd12c6d18f49da818ecc6f331174 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 9 May 2018 20:52:11 -0700 Subject: [PATCH 1007/3316] Fix typo in serverless guide --- .../guides/serverless-with-aws-lambda-and-api-gateway.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md b/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md index a210b113c08..66e85beba59 100644 --- a/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md +++ b/website/docs/guides/serverless-with-aws-lambda-and-api-gateway.html.md @@ -346,7 +346,7 @@ resource "aws_api_gateway_integration" "lambda_root" { integration_http_method = "POST" type = "AWS_PROXY" - uri = "${aws_lambda_function.main.invoke_arn}" + uri = "${aws_lambda_function.example.invoke_arn}" } ``` From 5f91304b426b9de296937c9504a3e7d88e5a85d7 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Thu, 10 May 2018 14:24:06 +0000 Subject: [PATCH 1008/3316] v1.18.0 --- CHANGELOG.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a42bb95457..9a98043ad66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,34 +1,34 @@ -## 1.18.0 (Unreleased) +## 1.18.0 (May 10, 2018) FEATURES: -* **New Data Source:** `aws_acmpca_certificate_authority` [GH-4458] -* **New Resource:** `aws_acmpca_certificate_authority` [GH-4458] -* **New Resource:** `aws_glue_catalog_table` [GH-4368] +* **New Data Source:** `aws_acmpca_certificate_authority` ([#4458](https://github.com/terraform-providers/terraform-provider-aws/issues/4458)) +* **New Resource:** `aws_acmpca_certificate_authority` ([#4458](https://github.com/terraform-providers/terraform-provider-aws/issues/4458)) +* **New Resource:** `aws_glue_catalog_table` ([#4368](https://github.com/terraform-providers/terraform-provider-aws/issues/4368)) ENHANCEMENTS: -* provider: Lower retry threshold for DNS resolution failures [GH-4459] -* resource/aws_dms_endpoint: Support `s3` `engine_name` and add `s3_settings` argument [GH-1685] and [GH-4447] -* resource/aws_glue_job: Add `timeout` argument [GH-4460] -* resource/aws_lb_target_group: Add `proxy_protocol_v2` argument [GH-4365] -* resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] -* resource/aws_spot_fleet_request: Add plan time validation for `valid_from` and `valid_until` arguments [GH-4463] -* resource/aws_spot_instance_request: Mark `spot_price` optional (defaults to on-demand price) [GH-4424] +* provider: Lower retry threshold for DNS resolution failures ([#4459](https://github.com/terraform-providers/terraform-provider-aws/issues/4459)) +* resource/aws_dms_endpoint: Support `s3` `engine_name` and add `s3_settings` argument ([#1685](https://github.com/terraform-providers/terraform-provider-aws/issues/1685)] and [[#4447](https://github.com/terraform-providers/terraform-provider-aws/issues/4447)) +* resource/aws_glue_job: Add `timeout` argument ([#4460](https://github.com/terraform-providers/terraform-provider-aws/issues/4460)) +* resource/aws_lb_target_group: Add `proxy_protocol_v2` argument ([#4365](https://github.com/terraform-providers/terraform-provider-aws/issues/4365)) +* resource/aws_spot_fleet_request: Mark `spot_price` optional (defaults to on-demand price) ([#4424](https://github.com/terraform-providers/terraform-provider-aws/issues/4424)) +* resource/aws_spot_fleet_request: Add plan time validation for `valid_from` and `valid_until` arguments ([#4463](https://github.com/terraform-providers/terraform-provider-aws/issues/4463)) +* resource/aws_spot_instance_request: Mark `spot_price` optional (defaults to on-demand price) ([#4424](https://github.com/terraform-providers/terraform-provider-aws/issues/4424)) BUG FIXES: -* data-source/aws_autoscaling_groups: Correctly paginate through over 50 results [GH-4433] -* resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute in China partition [GH-4485] -* resource/aws_glue_job: Remove `allocated_capacity` and `max_concurrent_runs` upper plan time validation limits [GH-4461] -* resource/aws_instance: Fix `root_device_mapping` matching of expected root device name with multiple block devices. [GH-4489] -* resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error [GH-4344] -* resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error [GH-4344] -* resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error [GH-4344] -* resource/aws_launch_template: Separate usage of `ipv4_address_count`/`ipv6_address_count` from `ipv4_addresses`/`ipv6_addresses` [GH-4344] -* resource/aws_redshift_cluster: Properly send all required parameters when resizing [GH-3127] -* resource/aws_s3_bucket: Prevent crash from empty string CORS arguments [GH-4465] -* resource/aws_ssm_document: Add missing account ID to `arn` attribute [GH-4436] +* data-source/aws_autoscaling_groups: Correctly paginate through over 50 results ([#4433](https://github.com/terraform-providers/terraform-provider-aws/issues/4433)) +* resource/aws_elastic_beanstalk_environment: Correctly handle `cname_prefix` attribute in China partition ([#4485](https://github.com/terraform-providers/terraform-provider-aws/issues/4485)) +* resource/aws_glue_job: Remove `allocated_capacity` and `max_concurrent_runs` upper plan time validation limits ([#4461](https://github.com/terraform-providers/terraform-provider-aws/issues/4461)) +* resource/aws_instance: Fix `root_device_mapping` matching of expected root device name with multiple block devices. ([#4489](https://github.com/terraform-providers/terraform-provider-aws/issues/4489)) +* resource/aws_launch_template: Prevent `parameter iops is not supported for gp2 volumes` error ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_launch_template: Prevent `'iamInstanceProfile.name' may not be used in combination with 'iamInstanceProfile.arn'` error ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_launch_template: Prevent `parameter groupName cannot be used with the parameter subnet` error ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_launch_template: Separate usage of `ipv4_address_count`/`ipv6_address_count` from `ipv4_addresses`/`ipv6_addresses` ([#4344](https://github.com/terraform-providers/terraform-provider-aws/issues/4344)) +* resource/aws_redshift_cluster: Properly send all required parameters when resizing ([#3127](https://github.com/terraform-providers/terraform-provider-aws/issues/3127)) +* resource/aws_s3_bucket: Prevent crash from empty string CORS arguments ([#4465](https://github.com/terraform-providers/terraform-provider-aws/issues/4465)) +* resource/aws_ssm_document: Add missing account ID to `arn` attribute ([#4436](https://github.com/terraform-providers/terraform-provider-aws/issues/4436)) ## 1.17.0 (May 02, 2018) From 9b1c473f5100c85fba9643d27117955414763234 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Thu, 10 May 2018 14:46:03 +0000 Subject: [PATCH 1009/3316] Cleanup after v1.18.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a98043ad66..7cf2b95997e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.19.0 (Unreleased) ## 1.18.0 (May 10, 2018) FEATURES: From ebb361d41779965a97b9a8ad32e6ed7145c7559a Mon Sep 17 00:00:00 2001 From: ken5scal Date: Fri, 11 May 2018 00:13:57 +0900 Subject: [PATCH 1010/3316] Fixed problem --- aws/resource_aws_guardduty_member.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_guardduty_member.go b/aws/resource_aws_guardduty_member.go index 806c7415c80..9a980c6a1c0 100644 --- a/aws/resource_aws_guardduty_member.go +++ b/aws/resource_aws_guardduty_member.go @@ -55,7 +55,7 @@ func resourceAwsGuardDutyMember() *schema.Resource { }, }, Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(30 * time.Second), + Create: schema.DefaultTimeout(10 * time.Second), }, } } @@ -88,7 +88,7 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) imi := &guardduty.InviteMembersInput{ DetectorId: &detectorID, AccountIds: []*string{&accountID}, - Message: aws.String(d.Get("message").(string)), + Message: aws.String(d.Get("invitation_message").(string)), } _, err = conn.InviteMembers(imi) @@ -98,14 +98,19 @@ func resourceAwsGuardDutyMemberCreate(d *schema.ResourceData, meta interface{}) // wait until e-mail verification finishes return resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - // https://docs.aws.amazon.com/acm/latest/ug/get-members.html + err := resourceAwsGuardDutyMemberRead(d, meta) + + if err != nil { + return resource.NonRetryableError(fmt.Errorf("Error inviting member: %s", err)) + } + status := d.Get("relationship_status").(string) - if status != "INVITED" { + if status != "Invited" { return resource.RetryableError(fmt.Errorf("Expected member to be invited but was in state: %s", status)) } log.Printf("[INFO] Email verification for %s is still in progress", accountID) - return resource.NonRetryableError(resourceAwsGuardDutyMemberRead(d, meta)) + return resource.NonRetryableError(err) }) } From 28faadb85f5343d522edfcca08734e25f4284253 Mon Sep 17 00:00:00 2001 From: ken5scal Date: Fri, 11 May 2018 01:47:50 +0900 Subject: [PATCH 1011/3316] made test to work --- aws/resource_aws_guardduty_member_test.go | 27 ++++------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/aws/resource_aws_guardduty_member_test.go b/aws/resource_aws_guardduty_member_test.go index acda708c077..e72e69d0f26 100644 --- a/aws/resource_aws_guardduty_member_test.go +++ b/aws/resource_aws_guardduty_member_test.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/guardduty" - "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" "regexp" @@ -17,7 +16,6 @@ func testAccAwsGuardDutyMember_basic(t *testing.T) { resourceName := "aws_guardduty_member.test" accountID := "111111111111" email := "required@example.com" - invite := true invitationMessage := "inviting" resource.Test(t, resource.TestCase{ @@ -32,7 +30,6 @@ func testAccAwsGuardDutyMember_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "account_id", accountID), resource.TestCheckResourceAttrSet(resourceName, "detector_id"), resource.TestCheckResourceAttr(resourceName, "email", email), - resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(true)), ), }, { @@ -47,15 +44,16 @@ func testAccAwsGuardDutyMember_basic(t *testing.T) { ), }, { - Config: testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage, invite), + Config: testAccGuardDutyMemberConfig_basic2(accountID, email, invitationMessage, true), Check: resource.ComposeTestCheckFunc( testAccCheckAwsGuardDutyMemberExists(resourceName), resource.TestCheckResourceAttr(resourceName, "account_id", accountID), resource.TestCheckResourceAttrSet(resourceName, "detector_id"), resource.TestCheckResourceAttr(resourceName, "email", email), - resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(invite)), + resource.TestCheckResourceAttr(resourceName, "invite", strconv.FormatBool(true)), resource.TestCheckResourceAttr(resourceName, "invitation_message", invitationMessage), ), + ExpectError: regexp.MustCompile("Expected member to be invited but was in state: EmailVerificationFailed"), }, }, }) @@ -82,23 +80,6 @@ func testAccAwsGuardDutyMember_import(t *testing.T) { }) } -func testAccAwsGuardDutyMemberInvitation_timeout(t *testing.T) { - - rEmail := acctest.RandString(10) + "@" + acctest.RandString(5) + ".com" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAwsGuardDutyMemberDestroy, - Steps: []resource.TestStep{ - { - Config: testAccGuardDutyMemberConfig_basic2("111111111111", rEmail, "test", true), - ExpectError: regexp.MustCompile("Expected member to be invited but was in state: EmailVerificationFailed"), - }, - }, - }) -} - func testAccCheckAwsGuardDutyMemberDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).guarddutyconn @@ -187,7 +168,7 @@ resource "aws_guardduty_member" "test" { detector_id = "${aws_guardduty_detector.test.id}" email = "%[3]s" invite = "%[4]s" - invite = "%[5]s" + invitation_message = "%[5]s" } `, testAccGuardDutyDetectorConfig_basic1, accountID, email, strconv.FormatBool(invite), invitationMessage) } From 67827e7612066e2f3432471d5413cb0082db02b2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 10 May 2018 13:53:21 -0400 Subject: [PATCH 1012/3316] tests/resource/aws_elasticache_security_group: Add sweeper --- aws/provider_test.go | 5 ++ ...rce_aws_elasticache_security_group_test.go | 65 +++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/aws/provider_test.go b/aws/provider_test.go index 3a2b7674dbc..4d5d99b099d 100644 --- a/aws/provider_test.go +++ b/aws/provider_test.go @@ -158,5 +158,10 @@ func testSweepSkipSweepError(err error) bool { if isAWSErr(err, "UnsupportedOperation", "") { return true } + // Ignore more unsupported API calls + // InvalidParameterValue: Use of cache security groups is not permitted in this API version for your account. + if isAWSErr(err, "InvalidParameterValue", "not permitted in this API version for your account") { + return true + } return false } diff --git a/aws/resource_aws_elasticache_security_group_test.go b/aws/resource_aws_elasticache_security_group_test.go index 553e9fada73..f030447f22a 100644 --- a/aws/resource_aws_elasticache_security_group_test.go +++ b/aws/resource_aws_elasticache_security_group_test.go @@ -2,7 +2,9 @@ package aws import ( "fmt" + "log" "os" + "strings" "testing" "github.com/aws/aws-sdk-go/aws" @@ -13,6 +15,69 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func init() { + resource.AddTestSweepers("aws_elasticache_security_group", &resource.Sweeper{ + Name: "aws_elasticache_security_group", + F: testSweepElasticacheCacheSecurityGroups, + Dependencies: []string{ + "aws_elasticache_cluster", + "aws_elasticache_replication_group", + }, + }) +} + +func testSweepElasticacheCacheSecurityGroups(region string) error { + client, err := sharedClientForRegion(region) + if err != nil { + return fmt.Errorf("error getting client: %s", err) + } + conn := client.(*AWSClient).elasticacheconn + + prefixes := []string{ + "tf-", + "tf-test-", + "tf-acc-test-", + } + + err = conn.DescribeCacheSecurityGroupsPages(&elasticache.DescribeCacheSecurityGroupsInput{}, func(page *elasticache.DescribeCacheSecurityGroupsOutput, isLast bool) bool { + if len(page.CacheSecurityGroups) == 0 { + log.Print("[DEBUG] No Elasticache Cache Security Groups to sweep") + return false + } + + for _, securityGroup := range page.CacheSecurityGroups { + name := aws.StringValue(securityGroup.CacheSecurityGroupName) + skip := true + for _, prefix := range prefixes { + if strings.HasPrefix(name, prefix) { + skip = false + break + } + } + if skip { + log.Printf("[INFO] Skipping Elasticache Cache Security Group: %s", name) + continue + } + log.Printf("[INFO] Deleting Elasticache Cache Security Group: %s", name) + _, err := conn.DeleteCacheSecurityGroup(&elasticache.DeleteCacheSecurityGroupInput{ + CacheSecurityGroupName: aws.String(name), + }) + if err != nil { + log.Printf("[ERROR] Failed to delete Elasticache Cache Security Group (%s): %s", name, err) + } + } + return !isLast + }) + if err != nil { + if testSweepSkipSweepError(err) { + log.Printf("[WARN] Skipping Elasticache Cache Security Group sweep for %s: %s", region, err) + return nil + } + return fmt.Errorf("Error retrieving Elasticache Cache Security Groups: %s", err) + } + return nil +} + func TestAccAWSElasticacheSecurityGroup_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, From b56b195b93d20bd73cd79774910febcb6cc56ee5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 10 May 2018 15:54:16 -0400 Subject: [PATCH 1013/3316] Update CHANGELOG for #4416 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cf2b95997e..24221343ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.19.0 (Unreleased) + +BUG FIXES: + +* resource/aws_security_group: Fix rule description handling when gathering multiple rules with same permissions [GH-4416] + ## 1.18.0 (May 10, 2018) FEATURES: From d0b28f627325dbe2bb30b6ca15038aed4d08a99c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 10 May 2018 13:29:51 -0400 Subject: [PATCH 1014/3316] resource/aws_elasticache_replication_group: Support number_cache_nodes updates --- aws/resource_aws_elasticache_cluster.go | 90 ++++--- aws/resource_aws_elasticache_cluster_test.go | 8 +- ...ource_aws_elasticache_replication_group.go | 229 +++++++++++++++--- ..._aws_elasticache_replication_group_test.go | 197 +++++++++++++++ ...lasticache_replication_group.html.markdown | 10 +- 5 files changed, 465 insertions(+), 69 deletions(-) diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index e37865eeabc..5388aeca44f 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -406,31 +406,16 @@ func resourceAwsElasticacheClusterCreate(d *schema.ResourceData, meta interface{ req.PreferredAvailabilityZones = azs } - resp, err := conn.CreateCacheCluster(req) + id, err := createElasticacheCacheCluster(conn, req) if err != nil { - return fmt.Errorf("Error creating Elasticache: %s", err) + return fmt.Errorf("error creating Elasticache Cache Cluster: %s", err) } - // Assign the cluster id as the resource ID - // Elasticache always retains the id in lower case, so we have to - // mimic that or else we won't be able to refresh a resource whose - // name contained uppercase characters. - d.SetId(strings.ToLower(*resp.CacheCluster.CacheClusterId)) - - pending := []string{"creating", "modifying", "restoring", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheClusterStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: 40 * time.Minute, - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } + d.SetId(id) - log.Printf("[DEBUG] Waiting for state to become available: %v", d.Id()) - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for elasticache (%s) to be created: %s", d.Id(), sterr) + err = createElasticacheCacheClusterWaiter(conn, d.Id(), 40*time.Minute) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be created: %s", d.Id(), err) } return resourceAwsElasticacheClusterRead(d, meta) @@ -682,9 +667,16 @@ func (b byCacheNodeId) Less(i, j int) bool { func resourceAwsElasticacheClusterDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - err := deleteElasticacheCluster(d.Id(), 40*time.Minute, conn) + err := deleteElasticacheCacheCluster(conn, d.Id()) + if err != nil { + if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { + return nil + } + return fmt.Errorf("error deleting Elasticache Cache Cluster (%s): %s", d.Id(), err) + } + err = deleteElasticacheCacheClusterWaiter(conn, d.Id(), 40*time.Minute) if err != nil { - return fmt.Errorf("error deleting Elasticache Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be deleted: %s", d.Id(), err) } return nil @@ -761,13 +753,49 @@ func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, give } } -func deleteElasticacheCluster(clusterID string, timeout time.Duration, conn *elasticache.ElastiCache) error { +func createElasticacheCacheCluster(conn *elasticache.ElastiCache, input *elasticache.CreateCacheClusterInput) (string, error) { + log.Printf("[DEBUG] Creating Elasticache Cache Cluster: %s", input) + output, err := conn.CreateCacheCluster(input) + if err != nil { + return "", err + } + if output == nil || output.CacheCluster == nil { + return "", errors.New("missing cluster ID after creation") + } + // Elasticache always retains the id in lower case, so we have to + // mimic that or else we won't be able to refresh a resource whose + // name contained uppercase characters. + return strings.ToLower(aws.StringValue(output.CacheCluster.CacheClusterId)), nil +} + +func createElasticacheCacheClusterWaiter(conn *elasticache.ElastiCache, cacheClusterID string, timeout time.Duration) error { + pending := []string{"creating", "modifying", "restoring", "snapshotting"} + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: []string{"available"}, + Refresh: cacheClusterStateRefreshFunc(conn, cacheClusterID, "available", pending), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + log.Printf("[DEBUG] Waiting for Elasticache Cache Cluster (%s) to be created", cacheClusterID) + _, err := stateConf.WaitForState() + return err +} + +func deleteElasticacheCacheCluster(conn *elasticache.ElastiCache, cacheClusterID string) error { input := &elasticache.DeleteCacheClusterInput{ - CacheClusterId: aws.String(clusterID), + CacheClusterId: aws.String(cacheClusterID), } + log.Printf("[DEBUG] Deleting Elasticache Cache Cluster: %s", input) err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.DeleteCacheCluster(input) if err != nil { + // This will not be fixed by retrying + if isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "serving as primary") { + return resource.NonRetryableError(err) + } // The cluster may be just snapshotting, so we retry until it's ready for deletion if isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "") { return resource.RetryableError(err) @@ -776,20 +804,20 @@ func deleteElasticacheCluster(clusterID string, timeout time.Duration, conn *ela } return nil }) - if err != nil { - return err - } + return err +} - log.Printf("[DEBUG] Waiting for deletion: %v", clusterID) +func deleteElasticacheCacheClusterWaiter(conn *elasticache.ElastiCache, cacheClusterID string, timeout time.Duration) error { stateConf := &resource.StateChangeConf{ Pending: []string{"creating", "available", "deleting", "incompatible-parameters", "incompatible-network", "restore-failed", "snapshotting"}, Target: []string{}, - Refresh: cacheClusterStateRefreshFunc(conn, clusterID, "", []string{}), + Refresh: cacheClusterStateRefreshFunc(conn, cacheClusterID, "", []string{}), Timeout: timeout, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } + log.Printf("[DEBUG] Waiting for Elasticache Cache Cluster deletion: %v", cacheClusterID) - _, err = stateConf.WaitForState() + _, err := stateConf.WaitForState() return err } diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index 9dce8a74e37..41e282f92dd 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -62,9 +62,13 @@ func testSweepElasticacheClusters(region string) error { continue } log.Printf("[INFO] Deleting Elasticache Cluster: %s", id) - err := deleteElasticacheCluster(id, 40*time.Minute, conn) + err := deleteElasticacheCacheCluster(conn, id) if err != nil { - log.Printf("[ERROR] Failed to delete Elasticache Cluster (%s): %s", id, err) + log.Printf("[ERROR] Failed to delete Elasticache Cache Cluster (%s): %s", id, err) + } + err = deleteElasticacheCacheClusterWaiter(conn, id, 40*time.Minute) + if err != nil { + log.Printf("[ERROR] Failed waiting for Elasticache Cache Cluster (%s) to be deleted: %s", id, err) } } return !isLast diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index 75fc807ca91..48a62f1b27d 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -48,7 +48,6 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { Type: schema.TypeInt, Computed: true, Optional: true, - ForceNew: true, } resourceSchema["primary_endpoint_address"] = &schema.Schema{ @@ -405,23 +404,172 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i return fmt.Errorf("error modifying Elasticache Replication Group shard configuration: %s", err) } - pending := []string{"creating", "modifying", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - log.Printf("[DEBUG] Waiting for Elasticache Replication Group (%s) shard reconfiguration completion", d.Id()) - _, err = stateConf.WaitForState() + err = modifyElasticacheReplicationGroupWaiter(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) if err != nil { return fmt.Errorf("error waiting for Elasticache Replication Group (%s) shard reconfiguration completion: %s", d.Id(), err) } } + if d.HasChange("number_cache_clusters") { + o, n := d.GetChange("number_cache_clusters") + oldNumberCacheClusters := o.(int) + newNumberCacheClusters := n.(int) + + // We will try to use similar naming to the console, which are 1 indexed: RGID-001 through RGID-006 + var addClusterIDs, removeClusterIDs []string + for clusterID := oldNumberCacheClusters + 1; clusterID <= newNumberCacheClusters; clusterID++ { + addClusterIDs = append(addClusterIDs, fmt.Sprintf("%s-%03d", d.Id(), clusterID)) + } + for clusterID := oldNumberCacheClusters; clusterID >= (newNumberCacheClusters + 1); clusterID-- { + removeClusterIDs = append(removeClusterIDs, fmt.Sprintf("%s-%03d", d.Id(), clusterID)) + } + + if len(addClusterIDs) > 0 { + // Kick off all the Cache Cluster creations + for _, cacheClusterID := range addClusterIDs { + input := &elasticache.CreateCacheClusterInput{ + CacheClusterId: aws.String(cacheClusterID), + ReplicationGroupId: aws.String(d.Id()), + } + _, err := createElasticacheCacheCluster(conn, input) + if err != nil { + // Future enhancement: we could retry creation with random ID on naming collision + // if isAWSErr(err, elasticache.ErrCodeCacheClusterAlreadyExistsFault, "") { ... } + return fmt.Errorf("error creating Elasticache Cache Cluster (adding replica): %s", err) + } + } + + // Wait for all Cache Cluster creations + for _, cacheClusterID := range addClusterIDs { + err := createElasticacheCacheClusterWaiter(conn, cacheClusterID, d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be created (adding replica): %s", cacheClusterID, err) + } + } + } + + if len(removeClusterIDs) > 0 { + // Cannot reassign primary cluster ID while automatic failover is enabled + // If we temporarily disable automatic failover, ensure we re-enable it + reEnableAutomaticFailover := false + + // Kick off all the Cache Cluster deletions + for _, cacheClusterID := range removeClusterIDs { + err := deleteElasticacheCacheCluster(conn, cacheClusterID) + if err != nil { + // Future enhancement: we could retry deletion with random existing ID on missing name + // if isAWSErr(err, elasticache.ErrCodeCacheClusterNotFoundFault, "") { ... } + if !isAWSErr(err, elasticache.ErrCodeInvalidCacheClusterStateFault, "serving as primary") { + return fmt.Errorf("error deleting Elasticache Cache Cluster (%s) (removing replica): %s", cacheClusterID, err) + } + + // Use Replication Group MemberClusters to find a new primary cache cluster ID + // that is not in removeClusterIDs + newPrimaryClusterID := "" + + describeReplicationGroupInput := &elasticache.DescribeReplicationGroupsInput{ + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Reading Elasticache Replication Group: %s", describeReplicationGroupInput) + output, err := conn.DescribeReplicationGroups(describeReplicationGroupInput) + if err != nil { + return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: %s", d.Id(), err) + } + if output == nil || len(output.ReplicationGroups) == 0 || len(output.ReplicationGroups[0].MemberClusters) == 0 { + return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: missing replication group information", d.Id()) + } + + for _, memberClusterPtr := range output.ReplicationGroups[0].MemberClusters { + memberCluster := aws.StringValue(memberClusterPtr) + memberClusterInRemoveClusterIDs := false + for _, removeClusterID := range removeClusterIDs { + if memberCluster == removeClusterID { + memberClusterInRemoveClusterIDs = true + break + } + } + if !memberClusterInRemoveClusterIDs { + newPrimaryClusterID = memberCluster + break + } + } + if newPrimaryClusterID == "" { + return fmt.Errorf("error reading Elasticache Replication Group (%s) to determine new primary: unable to assign new primary", d.Id()) + } + + // Disable automatic failover if enabled + // Must be applied previous to trying to set new primary + // InvalidReplicationGroupState: Cannot manually promote a new master cache cluster while autofailover is enabled + if aws.StringValue(output.ReplicationGroups[0].AutomaticFailover) == elasticache.AutomaticFailoverStatusEnabled { + // Be kind and rewind + if d.Get("automatic_failover_enabled").(bool) { + reEnableAutomaticFailover = true + } + + modifyReplicationGroupInput := &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + AutomaticFailoverEnabled: aws.Bool(false), + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", modifyReplicationGroupInput) + _, err = conn.ModifyReplicationGroup(modifyReplicationGroupInput) + if err != nil { + return fmt.Errorf("error modifying Elasticache Replication Group (%s) to set new primary: %s", d.Id(), err) + } + err = modifyElasticacheReplicationGroupWaiter(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be available: %s", d.Id(), err) + } + } + + // Set new primary + modifyReplicationGroupInput := &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + PrimaryClusterId: aws.String(newPrimaryClusterID), + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", modifyReplicationGroupInput) + _, err = conn.ModifyReplicationGroup(modifyReplicationGroupInput) + if err != nil { + return fmt.Errorf("error modifying Elasticache Replication Group (%s) to set new primary: %s", d.Id(), err) + } + err = modifyElasticacheReplicationGroupWaiter(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be available: %s", d.Id(), err) + } + + // Finally retry deleting the cache cluster + err = deleteElasticacheCacheCluster(conn, cacheClusterID) + if err != nil { + return fmt.Errorf("error deleting Elasticache Cache Cluster (%s) (removing replica after setting new primary): %s", cacheClusterID, err) + } + } + } + + // Wait for all Cache Cluster deletions + for _, cacheClusterID := range removeClusterIDs { + err := deleteElasticacheCacheClusterWaiter(conn, cacheClusterID, d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Cache Cluster (%s) to be deleted (removing replica): %s", cacheClusterID, err) + } + } + + // Re-enable automatic failover if we needed to temporarily disable it + if reEnableAutomaticFailover { + input := &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + AutomaticFailoverEnabled: aws.Bool(true), + ReplicationGroupId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Modifying Elasticache Replication Group: %s", input) + _, err := conn.ModifyReplicationGroup(input) + if err != nil { + return fmt.Errorf("error modifying Elasticache Replication Group (%s) to re-enable automatic failover: %s", d.Id(), err) + } + } + } + } + requestUpdate := false params := &elasticache.ModifyReplicationGroupInput{ ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), @@ -501,23 +649,12 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i if requestUpdate { _, err := conn.ModifyReplicationGroup(params) if err != nil { - return fmt.Errorf("Error updating Elasticache replication group: %s", err) - } - - pending := []string{"creating", "modifying", "snapshotting"} - stateConf := &resource.StateChangeConf{ - Pending: pending, - Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, + return fmt.Errorf("error updating Elasticache Replication Group (%s): %s", d.Id(), err) } - log.Printf("[DEBUG] Waiting for state to become available: %v", d.Id()) - _, sterr := stateConf.WaitForState() - if sterr != nil { - return fmt.Errorf("Error waiting for elasticache replication group (%s) to be created: %s", d.Id(), sterr) + err = modifyElasticacheReplicationGroupWaiter(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for Elasticache Replication Group (%s) to be updated: %s", d.Id(), err) } } return resourceAwsElasticacheReplicationGroupRead(d, meta) @@ -586,11 +723,23 @@ func deleteElasticacheReplicationGroup(replicationGroupID string, timeout time.D ReplicationGroupId: aws.String(replicationGroupID), } - _, err := conn.DeleteReplicationGroup(input) - if err != nil { - if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { - return nil + // 10 minutes should give any creating/deleting cache clusters or snapshots time to complete + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteReplicationGroup(input) + if err != nil { + if isAWSErr(err, elasticache.ErrCodeReplicationGroupNotFoundFault, "") { + return nil + } + // Cache Cluster is creating/deleting or Replication Group is snapshotting + // InvalidReplicationGroupState: Cache cluster tf-acc-test-uqhe-003 is not in a valid state to be deleted + if isAWSErr(err, elasticache.ErrCodeInvalidReplicationGroupStateFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } + return nil + }) + if err != nil { return err } @@ -627,6 +776,22 @@ func flattenElasticacheNodeGroupsToClusterMode(clusterEnabled bool, nodeGroups [ return []map[string]interface{}{m} } +func modifyElasticacheReplicationGroupWaiter(conn *elasticache.ElastiCache, replicationGroupID string, timeout time.Duration) error { + pending := []string{"creating", "modifying", "snapshotting"} + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: []string{"available"}, + Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, "available", pending), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + log.Printf("[DEBUG] Waiting for Elasticache Replication Group (%s) to become available", replicationGroupID) + _, err := stateConf.WaitForState() + return err +} + func validateAwsElastiCacheReplicationGroupEngine(v interface{}, k string) (ws []string, errors []error) { if strings.ToLower(v.(string)) != "redis" { errors = append(errors, fmt.Errorf("The only acceptable Engine type when using Replication Groups is Redis")) diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index 2cec8898eee..5cb588295bb 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -477,6 +477,163 @@ func TestAccAWSElasticacheReplicationGroup_enableAtRestEncryption(t *testing.T) }) } +func TestAccAWSElasticacheReplicationGroup_NumberCacheClusters(t *testing.T) { + var replicationGroup elasticache.ReplicationGroup + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(4)) + resourceName := "aws_elasticache_replication_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName, 2, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &replicationGroup), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "2"), + ), + }, + { + Config: testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName, 4, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &replicationGroup), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "4"), + ), + }, + { + Config: testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName, 2, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &replicationGroup), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "2"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverDisabled(t *testing.T) { + var replicationGroup elasticache.ReplicationGroup + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(4)) + resourceName := "aws_elasticache_replication_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName, 3, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &replicationGroup), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "3"), + ), + }, + { + PreConfig: func() { + // Simulate failover so primary is on node we are trying to delete + conn := testAccProvider.Meta().(*AWSClient).elasticacheconn + input := &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + PrimaryClusterId: aws.String(fmt.Sprintf("%s-003", rName)), + ReplicationGroupId: aws.String(rName), + } + if _, err := conn.ModifyReplicationGroup(input); err != nil { + t.Fatalf("error setting new primary cache cluster: %s", err) + } + if err := modifyElasticacheReplicationGroupWaiter(conn, rName, 40*time.Minute); err != nil { + t.Fatalf("error waiting for new primary cache cluster: %s", err) + } + }, + Config: testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName, 2, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &replicationGroup), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "2"), + ), + }, + }, + }) +} + +func TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverEnabled(t *testing.T) { + var replicationGroup elasticache.ReplicationGroup + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(4)) + resourceName := "aws_elasticache_replication_group.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName, 3, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &replicationGroup), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "3"), + ), + }, + { + PreConfig: func() { + // Simulate failover so primary is on node we are trying to delete + conn := testAccProvider.Meta().(*AWSClient).elasticacheconn + var input *elasticache.ModifyReplicationGroupInput + + // Must disable automatic failover first + input = &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + AutomaticFailoverEnabled: aws.Bool(false), + ReplicationGroupId: aws.String(rName), + } + if _, err := conn.ModifyReplicationGroup(input); err != nil { + t.Fatalf("error disabling automatic failover: %s", err) + } + if err := modifyElasticacheReplicationGroupWaiter(conn, rName, 40*time.Minute); err != nil { + t.Fatalf("error waiting for disabling automatic failover: %s", err) + } + + // Failover + input = &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + PrimaryClusterId: aws.String(fmt.Sprintf("%s-003", rName)), + ReplicationGroupId: aws.String(rName), + } + if _, err := conn.ModifyReplicationGroup(input); err != nil { + t.Fatalf("error setting new primary cache cluster: %s", err) + } + if err := modifyElasticacheReplicationGroupWaiter(conn, rName, 40*time.Minute); err != nil { + t.Fatalf("error waiting for new primary cache cluster: %s", err) + } + + // Re-enable automatic failover like nothing ever happened + input = &elasticache.ModifyReplicationGroupInput{ + ApplyImmediately: aws.Bool(true), + AutomaticFailoverEnabled: aws.Bool(true), + ReplicationGroupId: aws.String(rName), + } + if _, err := conn.ModifyReplicationGroup(input); err != nil { + t.Fatalf("error enabled automatic failover: %s", err) + } + if err := modifyElasticacheReplicationGroupWaiter(conn, rName, 40*time.Minute); err != nil { + t.Fatalf("error waiting for enabled automatic failover: %s", err) + } + }, + Config: testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName, 2, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSElasticacheReplicationGroupExists(resourceName, &replicationGroup), + resource.TestCheckResourceAttr(resourceName, "automatic_failover_enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "number_cache_clusters", "2"), + ), + }, + }, + }) +} + func TestResourceAWSElastiCacheReplicationGroupIdValidation(t *testing.T) { cases := []struct { Value string @@ -1249,3 +1406,43 @@ resource "aws_elasticache_replication_group" "bar" { } `, rInt, rInt, rString10, rString16) } + +func testAccAWSElasticacheReplicationGroupConfig_NumberCacheClusters(rName string, numberCacheClusters int, autoFailover bool) string { + return fmt.Sprintf(` +data "aws_availability_zones" "available" {} + +resource "aws_vpc" "test" { + cidr_block = "192.168.0.0/16" + tags { + Name = "terraform-testacc-elasticache-replication-group-number-cache-clusters" + } +} + +resource "aws_subnet" "test" { + count = 2 + + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + cidr_block = "192.168.${count.index}.0/24" + vpc_id = "${aws_vpc.test.id}" + + tags { + Name = "tf-acc-elasticache-replication-group-number-cache-clusters" + } +} + +resource "aws_elasticache_subnet_group" "test" { + name = "%[1]s" + subnet_ids = ["${aws_subnet.test.*.id}"] +} + +resource "aws_elasticache_replication_group" "test" { + # InvalidParameterCombination: Automatic failover is not supported for T1 and T2 cache node types. + automatic_failover_enabled = %[2]t + node_type = "cache.m3.medium" + number_cache_clusters = %[3]d + parameter_group_name = "default.redis3.2" + replication_group_id = "%[1]s" + replication_group_description = "Terraform Acceptance Testing - number_cache_clusters" + subnet_group_name = "${aws_elasticache_subnet_group.test.name}" +}`, rName, autoFailover, numberCacheClusters) +} diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index c2c95ddfcb7..be149880509 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -31,7 +31,10 @@ resource "aws_elasticache_replication_group" "example" { } ``` -Additional read replicas can be added or removed with the [`aws_elasticache_cluster` resource](/docs/providers/aws/r/elasticache_cluster.html) and its `replication_group_id` attribute. In this situation, you will need to utilize the [lifecycle configuration block](/docs/configuration/resources.html) with `ignore_changes` to prevent replication group recreation. +You have two options for adjusting the number of replicas: + +* Adjusting `number_cache_clusters` directly. This will attempt to automatically add or remove replicas, but provides no granular control (e.g. preferred availability zone, cache cluster ID) for the added or removed replicas. This also currently expects cache cluster IDs in the form of `replication_group_id-00#`. +* Otherwise for fine grained control of the underlying cache clusters, they can be added or removed with the [`aws_elasticache_cluster` resource](/docs/providers/aws/r/elasticache_cluster.html) and its `replication_group_id` attribute. In this situation, you will need to utilize the [lifecycle configuration block](/docs/configuration/resources.html) with `ignore_changes` to prevent perpetual differences during Terraform plan with the `number_cache_cluster` attribute. ```hcl resource "aws_elasticache_replication_group" "example" { @@ -89,8 +92,7 @@ The following arguments are supported: * `replication_group_id` – (Required) The replication group identifier. This parameter is stored as a lowercase string. * `replication_group_description` – (Required) A user-created description for the replication group. -* `number_cache_clusters` - (Required) The number of cache clusters this replication group will have. - If Multi-AZ is enabled , the value of this parameter must be at least 2. Changing this number will force a new resource +* `number_cache_clusters` - (Required for Cluster Mode Disabled) The number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. * `node_type` - (Required) The compute and memory capacity of the nodes in the node group. * `automatic_failover_enabled` - (Optional) Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If true, Multi-AZ is enabled for this replication group. If false, Multi-AZ is disabled for this replication group. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to `false`. * `auto_minor_version_upgrade` - (Optional) Specifies whether a minor engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Defaults to `true`. @@ -146,7 +148,7 @@ configuration options: * `create` - (Default `60m`) How long to wait for a replication group to be created. * `delete` - (Default `40m`) How long to wait for a replication group to be deleted. -* `update` - (Default `40m`) How long to wait for replication group settings to be updated. This is also separately used for online resize operation completion, if necessary. +* `update` - (Default `40m`) How long to wait for replication group settings to be updated. This is also separately used for adding/removing replicas and online resize operation completion, if necessary. ## Import From 7f78e406e49bec335d5bf3600aa1697cbe09bd74 Mon Sep 17 00:00:00 2001 From: Mike Grima Date: Thu, 10 May 2018 14:45:25 -0700 Subject: [PATCH 1015/3316] Better documentation for SNS Subscriptions The documentation about SNS topic subscriptions is incorrect. This PR attempts to clarify this by adding wording about the AWS provider and also correctly indicates that the SNS topic subscription needs to be using an AWS provider that is in the same region as the topic. --- website/docs/r/sns_topic_subscription.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/sns_topic_subscription.html.markdown b/website/docs/r/sns_topic_subscription.html.markdown index 36ae6e02b02..4af502fe6c3 100644 --- a/website/docs/r/sns_topic_subscription.html.markdown +++ b/website/docs/r/sns_topic_subscription.html.markdown @@ -13,11 +13,11 @@ This resource allows you to automatically place messages sent to SNS topics in S to a given endpoint, send SMS messages, or notify devices / applications. The most likely use case for Terraform users will probably be SQS queues. -~> **NOTE:** If SNS topic and SQS queue are in different AWS regions it is important to place the "aws_sns_topic_subscription" into the terraform configuration of the region with the SQS queue. If "aws_sns_topic_subscription" is placed in the terraform configuration of the region with the SNS topic terraform will fail to create the subscription. +~> **NOTE:** If the SNS topic and SQS queue are in different AWS regions, it is important for the "aws_sns_topic_subscription" to use an AWS provider that is in the same region of the SNS topic. If the "aws_sns_topic_subscription" is using a provider with a different region than the SNS topic, terraform will fail to create the subscription. ~> **NOTE:** Setup of cross-account subscriptions from SNS topics to SQS queues requires Terraform to have access to BOTH accounts. -~> **NOTE:** If SNS topic and SQS queue are in different AWS accounts but the same region it is important to place the "aws_sns_topic_subscription" into the terraform configuration of the account with the SQS queue. If "aws_sns_topic_subscription" is placed in the terraform configuration of the account with the SNS topic terraform creates the subscriptions but does not keep state and tries to re-create the subscription at every apply. +~> **NOTE:** If SNS topic and SQS queue are in different AWS accounts but the same region it is important for the "aws_sns_topic_subscription" to use the AWS provider of the account with the SQS queue. If "aws_sns_topic_subscription" is using a Provider with a different account than the SNS topic, terraform creates the subscriptions but does not keep state and tries to re-create the subscription at every apply. ~> **NOTE:** If SNS topic and SQS queue are in different AWS accounts and different AWS regions it is important to recognize that the subscription needs to be initiated from the account with the SQS queue but in the region of the SNS topic. From 1b0a20f04b800b01ef06e4a137c7f1de640a3bb6 Mon Sep 17 00:00:00 2001 From: mewa Date: Fri, 11 May 2018 00:52:19 +0200 Subject: [PATCH 1016/3316] resource/aws_api_gateway_rest_api: Create execution ARN using AWS SDK --- aws/resource_aws_api_gateway_rest_api.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index a99f3e4be29..644b8369bd1 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -7,6 +7,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/errwrap" @@ -157,13 +158,13 @@ func resourceAwsApiGatewayRestApiRead(d *schema.ResourceData, meta interface{}) d.Set("description", api.Description) d.Set("binary_media_types", api.BinaryMediaTypes) - restApiId := d.Id() - region := meta.(*AWSClient).region - accountId := meta.(*AWSClient).accountid - arn, err := buildApiGatewayExecutionARN(restApiId, region, accountId) - if err != nil { - return err - } + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "execute-api", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: d.Id(), + }.String() d.Set("execution_arn", arn) if api.MinimumCompressionSize == nil { From 134909ee8337f0062fabd0b55895ceeb2c4496f8 Mon Sep 17 00:00:00 2001 From: mewa Date: Fri, 11 May 2018 00:59:25 +0200 Subject: [PATCH 1017/3316] docs/r/api_gateway_rest_api: Move example usage of `execution_arn` attribute to `aws_lambda_permission` docs --- .../docs/r/api_gateway_rest_api.html.markdown | 17 ---------------- .../docs/r/lambda_permission.html.markdown | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/website/docs/r/api_gateway_rest_api.html.markdown b/website/docs/r/api_gateway_rest_api.html.markdown index 2b5a69105c1..f626391f558 100644 --- a/website/docs/r/api_gateway_rest_api.html.markdown +++ b/website/docs/r/api_gateway_rest_api.html.markdown @@ -12,8 +12,6 @@ Provides an API Gateway REST API. ## Example Usage -### Defining REST API - ```hcl resource "aws_api_gateway_rest_api" "MyDemoAPI" { name = "MyDemoAPI" @@ -21,21 +19,6 @@ resource "aws_api_gateway_rest_api" "MyDemoAPI" { } ``` -### Using REST API execution_arn to specify Lambda permissions - -```hcl -resource "aws_lambda_permission" "lambda_permission" { - statement_id = "AllowMyDemoAPIInvoke" - action = "lambda:InvokeFunction" - function_name = "MyDemoFunction" - principal = "apigateway.amazonaws.com" - - # The /*/*/* part allows invocation from any stage, method and resource path - # within API Gateway REST API. - source_arn = "${aws_api_gateway_rest_api.MyDemoAPI.execution_arn}/*/*/*" -} -``` - ## Argument Reference The following arguments are supported: diff --git a/website/docs/r/lambda_permission.html.markdown b/website/docs/r/lambda_permission.html.markdown index f54825fae71..efaf8086d99 100644 --- a/website/docs/r/lambda_permission.html.markdown +++ b/website/docs/r/lambda_permission.html.markdown @@ -110,6 +110,26 @@ EOF } ``` +## Specify Lambda permissions for API Gateway REST API + +```hcl +resource "aws_api_gateway_rest_api" "MyDemoAPI" { + name = "MyDemoAPI" + description = "This is my API for demonstration purposes" +} + +resource "aws_lambda_permission" "lambda_permission" { + statement_id = "AllowMyDemoAPIInvoke" + action = "lambda:InvokeFunction" + function_name = "MyDemoFunction" + principal = "apigateway.amazonaws.com" + + # The /*/*/* part allows invocation from any stage, method and resource path + # within API Gateway REST API. + source_arn = "${aws_api_gateway_rest_api.MyDemoAPI.execution_arn}/*/*/*" +} +``` + ## Argument Reference * `action` - (Required) The AWS Lambda action you want to allow in this statement. (e.g. `lambda:InvokeFunction`) From 649b0396598cd213eef0436a33aea98a340638b6 Mon Sep 17 00:00:00 2001 From: Sangho Na Date: Fri, 11 May 2018 14:15:20 +1200 Subject: [PATCH 1018/3316] Add support for Azure SQL as a DMS endpoint --- aws/resource_aws_dms_endpoint.go | 1 + website/docs/r/dms_endpoint.html.markdown | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_dms_endpoint.go b/aws/resource_aws_dms_endpoint.go index bb96a8c9bf0..5a31ced7ded 100644 --- a/aws/resource_aws_dms_endpoint.go +++ b/aws/resource_aws_dms_endpoint.go @@ -74,6 +74,7 @@ func resourceAwsDmsEndpoint() *schema.Resource { "sqlserver", "mongodb", "s3", + "azuredb", }, false), }, "extra_connection_attributes": { diff --git a/website/docs/r/dms_endpoint.html.markdown b/website/docs/r/dms_endpoint.html.markdown index bfa11d15f42..df6253ed6b7 100644 --- a/website/docs/r/dms_endpoint.html.markdown +++ b/website/docs/r/dms_endpoint.html.markdown @@ -53,7 +53,7 @@ The following arguments are supported: - Must not contain two consecutive hyphens * `endpoint_type` - (Required) The type of endpoint. Can be one of `source | target`. -* `engine_name` - (Required) The type of engine for the endpoint. Can be one of `mysql | oracle | postgres | mariadb | aurora | redshift | sybase | sqlserver | dynamodb | mongodb`. +* `engine_name` - (Required) The type of engine for the endpoint. Can be one of `mysql | oracle | postgres | mariadb | aurora | redshift | sybase | sqlserver | dynamodb | mongodb | azuredb`. * `extra_connection_attributes` - (Optional) Additional attributes associated with the connection. For available attributes see [Using Extra Connection Attributes with AWS Database Migration Service](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Introduction.ConnectionAttributes.html). * `kms_key_arn` - (Optional) The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kms_key_arn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region. * `password` - (Optional) The password to be used to login to the endpoint database. From ceffdbac301273b9079406168033cd3e5588cd15 Mon Sep 17 00:00:00 2001 From: nrohankar29 Date: Fri, 11 May 2018 10:35:08 +0530 Subject: [PATCH 1019/3316] Update autoscaling_policy.html.markdown `estimated_instance_warmup` is not just for `StepScaling` policy type. I was able to give this parameter for TargetTracking policy also. --- website/docs/r/autoscaling_policy.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/autoscaling_policy.html.markdown b/website/docs/r/autoscaling_policy.html.markdown index 1bfc64e79f7..6f26d296f2e 100644 --- a/website/docs/r/autoscaling_policy.html.markdown +++ b/website/docs/r/autoscaling_policy.html.markdown @@ -47,6 +47,7 @@ The following arguments are supported: * `autoscaling_group_name` - (Required) The name of the autoscaling group. * `adjustment_type` - (Optional) Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are `ChangeInCapacity`, `ExactCapacity`, and `PercentChangeInCapacity`. * `policy_type` - (Optional) The policy type, either "SimpleScaling", "StepScaling" or "TargetTrackingScaling". If this value isn't provided, AWS will default to "SimpleScaling." +* `estimated_instance_warmup` - (Optional) The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period. The following arguments are only available to "SimpleScaling" type policies: @@ -56,7 +57,6 @@ The following arguments are only available to "SimpleScaling" type policies: The following arguments are only available to "StepScaling" type policies: * `metric_aggregation_type` - (Optional) The aggregation type for the policy's metrics. Valid values are "Minimum", "Maximum", and "Average". Without a value, AWS will treat the aggregation type as "Average". -* `estimated_instance_warmup` - (Optional) The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group's specified cooldown period. * `step_adjustments` - (Optional) A set of adjustments that manage group scaling. These have the following structure: From c79c7a0b66e2b3adea7f3bace18c0f0594f0084a Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Fri, 11 May 2018 11:08:31 +0200 Subject: [PATCH 1020/3316] Update docs for aws_lambda_invocation --- website/aws.erb | 4 ++-- ...rkdown => lambda_invocation.html.markdown} | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) rename website/docs/d/{lambda_invoke.html.markdown => lambda_invocation.html.markdown} (70%) diff --git a/website/aws.erb b/website/aws.erb index fdc016f926a..44eafce3c4e 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -202,8 +202,8 @@ > aws_kms_secret - > - aws_lambda_invoke + > + aws_lambda_invocation > aws_nat_gateway diff --git a/website/docs/d/lambda_invoke.html.markdown b/website/docs/d/lambda_invocation.html.markdown similarity index 70% rename from website/docs/d/lambda_invoke.html.markdown rename to website/docs/d/lambda_invocation.html.markdown index 8fd026922ae..435c7f19a44 100644 --- a/website/docs/d/lambda_invoke.html.markdown +++ b/website/docs/d/lambda_invocation.html.markdown @@ -1,12 +1,12 @@ --- layout: "aws" -page_title: "AWS: aws_lambda_invoke" -sidebar_current: "docs-aws-datasource-lambda-invoke" +page_title: "AWS: aws_lambda_invocation" +sidebar_current: "docs-aws-datasource-lambda-invocation" description: |- Invoke AWS Lambda Function as data source --- -# Data Source: aws_lambda_invoke +# Data Source: aws_lambda_invocation Use this data source to invoke custom lambda functions as data source. @@ -19,24 +19,27 @@ invocation type. Response of lambda must be map of primitive types (string, bool ## Example Usage ```hcl -data "aws_lambda_invoke" "example" { +data "aws_lambda_invocation" "example" { function_name = "${aws_lambda_function.lambda_function_test.function_name}" - input { - param1 = "value1" - param2 = "value2" - } + input = < Date: Fri, 11 May 2018 14:00:17 +0200 Subject: [PATCH 1021/3316] Add wildcard principal section in d/aws_iam_policy_document doc --- website/docs/d/iam_policy_document.html.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/docs/d/iam_policy_document.html.markdown b/website/docs/d/iam_policy_document.html.markdown index 6f3d48781c1..c54cd9b0440 100644 --- a/website/docs/d/iam_policy_document.html.markdown +++ b/website/docs/d/iam_policy_document.html.markdown @@ -147,6 +147,16 @@ uses `${...}`-style syntax that is in conflict with Terraform's interpolation syntax, so this data source instead uses `&{...}` syntax for interpolations that should be processed by AWS rather than by Terraform. +## Wildcard Principal + +In order to define wildcard principal (a.k.a. anonymous user) use `type = "*"` and +`identifiers = ["*"]`. In that case the rendered json will contain `"Principal": "*"`. +Note, that even though the [IAM Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) +states that `"Principal": "*"` and `"Principal": {"AWS": "*"}` are equivalent, +those principals have different behavior for IAM Role Trust Policy. Therefore +Terraform will normalize the principal field only in above-mentioned case and principals +like `type = "AWS"` and `identifiers = ["*"]` will be rendered as `"Principal": {"AWS": "*"}`. + ## Attributes Reference The following attribute is exported: From 38d79b86e607390095f1c24e630aa7c39ac038a7 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 11 May 2018 17:22:02 +0400 Subject: [PATCH 1022/3316] issue #4449 Fix the issue using Arn field instead of Name --- aws/resource_aws_spot_fleet_request.go | 6 +++--- website/docs/r/spot_fleet_request.html.markdown | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index cadbe2d15bd..fa95c77044a 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -372,7 +372,7 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{ if v, ok := d["iam_instance_profile"]; ok { opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ - Name: aws.String(v.(string)), + Arn: aws.String(v.(string)), } } @@ -935,8 +935,8 @@ func launchSpecToMap(l *ec2.SpotFleetLaunchSpecification, rootDevName *string) m m["monitoring"] = aws.BoolValue(l.Monitoring.Enabled) } - if l.IamInstanceProfile != nil && l.IamInstanceProfile.Name != nil { - m["iam_instance_profile"] = aws.StringValue(l.IamInstanceProfile.Name) + if l.IamInstanceProfile != nil && l.IamInstanceProfile.Arn != nil { + m["iam_instance_profile"] = aws.StringValue(l.IamInstanceProfile.Arn) } if l.UserData != nil { diff --git a/website/docs/r/spot_fleet_request.html.markdown b/website/docs/r/spot_fleet_request.html.markdown index 2dd9ef095b4..14008c58b30 100644 --- a/website/docs/r/spot_fleet_request.html.markdown +++ b/website/docs/r/spot_fleet_request.html.markdown @@ -27,6 +27,7 @@ resource "aws_spot_fleet_request" "cheap_compute" { ami = "ami-1234" spot_price = "2.793" placement_tenancy = "dedicated" + iam_instance_profile = "arn:aws:iam::12345678:instance-profile/webserver-role" } launch_specification { @@ -34,6 +35,7 @@ resource "aws_spot_fleet_request" "cheap_compute" { ami = "ami-5678" key_name = "my-key" spot_price = "1.117" + iam_instance_profile = "arn:aws:iam::12345678:instance-profile/webserver-role" availability_zone = "us-west-1a" subnet_id = "subnet-1234" weighted_capacity = 35 From 7dc29d320b04bfc483950779c71508d161cbee05 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 09:24:28 -0400 Subject: [PATCH 1023/3316] Deps: Bump aws-sdk-go@v1.13.47 --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 20 + .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/budgets/api.go | 3 + .../aws/aws-sdk-go/service/budgets/doc.go | 5 +- .../aws/aws-sdk-go/service/ec2/api.go | 204 ++- .../service/elasticsearchservice/api.go | 1016 ++++++++++++- .../aws/aws-sdk-go/service/firehose/api.go | 955 ++++++++++-- .../aws/aws-sdk-go/service/gamelift/api.go | 1345 +++++++++++------ .../aws/aws-sdk-go/service/gamelift/doc.go | 14 +- .../aws/aws-sdk-go/service/rds/api.go | 1332 +++++++++++----- .../aws/aws-sdk-go/service/rds/errors.go | 127 +- vendor/vendor.json | 928 ++++++------ 12 files changed, 4403 insertions(+), 1548 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index fbbfd0184a6..857f677dd10 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -123,6 +123,7 @@ const ( MediaconvertServiceID = "mediaconvert" // Mediaconvert. MedialiveServiceID = "medialive" // Medialive. MediapackageServiceID = "mediapackage" // Mediapackage. + MediastoreServiceID = "mediastore" // Mediastore. MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace. MghServiceID = "mgh" // Mgh. MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics. @@ -1345,6 +1346,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, @@ -1437,12 +1439,15 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -1526,6 +1531,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "mediastore": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "metering.marketplace": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -2098,6 +2114,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -2106,6 +2123,7 @@ var awsPartition = partition{ "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -2268,6 +2286,7 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -2294,6 +2313,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 4b7f07a3884..50c3352d33a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.13.42" +const SDKVersion = "1.13.47" diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go index 31c43d56fb9..b1d7e099e6e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go @@ -3193,6 +3193,9 @@ const ( // BudgetTypeRiUtilization is a BudgetType enum value BudgetTypeRiUtilization = "RI_UTILIZATION" + + // BudgetTypeRiCoverage is a BudgetType enum value + BudgetTypeRiCoverage = "RI_COVERAGE" ) // The comparison operator of a notification. Currently we support less than, diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go index 2fd19749636..a4c64c2cb3b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go @@ -35,7 +35,10 @@ // // The AWS Budgets API provides the following endpoint: // -// * https://budgets.us-east-1.amazonaws.com +// * https://budgets.amazonaws.com +// +// For information about costs associated with the AWS Budgets API, see AWS +// Cost Management Pricing (https://aws.amazon.com/aws-cost-management/pricing/). // // See budgets package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/ diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 68d90ad29e5..99d12a66e42 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -3129,7 +3129,7 @@ func (c *EC2) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, // You can create a single EC2 Fleet that includes multiple launch specifications // that vary by instance type, AMI, Availability Zone, or subnet. // -// For more information, see Launching an EC2 Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-ec2-fleet.html) +// For more information, see Launching an EC2 Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3851,11 +3851,12 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques // CreateNatGateway API operation for Amazon Elastic Compute Cloud. // -// Creates a NAT gateway in the specified subnet. A NAT gateway can be used -// to enable instances in a private subnet to connect to the Internet. This -// action creates a network interface in the specified subnet with a private -// IP address from the IP address range of the subnet. For more information, -// see NAT Gateways (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html) +// Creates a NAT gateway in the specified public subnet. This action creates +// a network interface in the specified subnet with a private IP address from +// the IP address range of the subnet. Internet-bound traffic from a private +// subnet can be routed to the NAT gateway, therefore enabling instances in +// the private subnet to connect to the internet. For more information, see +// NAT Gateways (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -16974,24 +16975,23 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques // GetConsoleOutput API operation for Amazon Elastic Compute Cloud. // -// Gets the console output for the specified instance. -// -// Instances do not have a physical monitor through which you can view their -// console output. They also lack physical controls that allow you to power -// up, reboot, or shut them down. To allow these actions, we provide them through -// the Amazon EC2 API and command line interface. +// Gets the console output for the specified instance. For Linux instances, +// the instance console output displays the exact console output that would +// normally be displayed on a physical monitor attached to a computer. For Windows +// instances, the instance console output includes output from the EC2Config +// service. // -// Instance console output is buffered and posted shortly after instance boot, -// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output, -// which is available for at least one hour after the most recent post. +// GetConsoleOutput returns up to 64 KB of console output shortly after it's +// generated by the instance. // -// For Linux instances, the instance console output displays the exact console -// output that would normally be displayed on a physical monitor attached to -// a computer. This output is buffered because the instance produces it and -// then posts it to a store where the instance's owner can retrieve it. +// By default, the console output returns buffered information that was posted +// shortly after an instance transition state (start, stop, reboot, or terminate). +// This information is available for at least one hour after the most recent +// post. // -// For Windows instances, the instance console output includes output from the -// EC2Config service. +// You can optionally retrieve the latest serial console output at any time +// during the instance lifecycle. This option is only supported on C5, M5, and +// i3.metal instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -26672,9 +26672,7 @@ type ConversionTask struct { _ struct{} `type:"structure"` // The ID of the conversion task. - // - // ConversionTaskId is a required field - ConversionTaskId *string `locationName:"conversionTaskId" type:"string" required:"true"` + ConversionTaskId *string `locationName:"conversionTaskId" type:"string"` // The time when the task expires. If the upload isn't complete before the expiration // time, we automatically cancel the task. @@ -26689,9 +26687,7 @@ type ConversionTask struct { ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"` // The state of the conversion task. - // - // State is a required field - State *string `locationName:"state" type:"string" required:"true" enum:"ConversionTaskState"` + State *string `locationName:"state" type:"string" enum:"ConversionTaskState"` // The status message related to the conversion task. StatusMessage *string `locationName:"statusMessage" type:"string"` @@ -27222,6 +27218,75 @@ func (s *CopySnapshotOutput) SetSnapshotId(v string) *CopySnapshotOutput { return s } +// The CPU options for the instance. +type CpuOptions struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `locationName:"coreCount" type:"integer"` + + // The number of threads per CPU core. + ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` +} + +// String returns the string representation +func (s CpuOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CpuOptions) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *CpuOptions) SetCoreCount(v int64) *CpuOptions { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *CpuOptions) SetThreadsPerCore(v int64) *CpuOptions { + s.ThreadsPerCore = &v + return s +} + +// The CPU options for the instance. Both the core count and threads per core +// must be specified in the request. +type CpuOptionsRequest struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `type:"integer"` + + // The number of threads per CPU core. To disable Intel Hyper-Threading Technology + // for the instance, specify a value of 1. Otherwise, specify the default value + // of 2. + ThreadsPerCore *int64 `type:"integer"` +} + +// String returns the string representation +func (s CpuOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CpuOptionsRequest) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *CpuOptionsRequest) SetCoreCount(v int64) *CpuOptionsRequest { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *CpuOptionsRequest) SetThreadsPerCore(v int64) *CpuOptionsRequest { + s.ThreadsPerCore = &v + return s +} + // Contains the parameters for CreateCustomerGateway. type CreateCustomerGatewayInput struct { _ struct{} `type:"structure"` @@ -28831,12 +28896,12 @@ type CreateNetworkAclEntryInput struct { PortRange *PortRange `locationName:"portRange" type:"structure"` // The protocol. A value of -1 or all means all protocols. If you specify all, - // -1, or a protocol number other than tcp, udp, or icmp, traffic on all ports - // is allowed, regardless of any ports or ICMP types or codes you specify. If - // you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, traffic - // for all ICMP types and codes allowed, regardless of any that you specify. - // If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, you must - // specify an ICMP type and code. + // -1, or a protocol number other than 6 (tcp), 17 (udp), or 1 (icmp), traffic + // on all ports is allowed, regardless of any ports or ICMP types or codes you + // specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, + // traffic for all ICMP types and codes allowed, regardless of any that you + // specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, + // you must specify an ICMP type and code. // // Protocol is a required field Protocol *string `locationName:"protocol" type:"string" required:"true"` @@ -44764,9 +44829,7 @@ type DiskImageDescription struct { Checksum *string `locationName:"checksum" type:"string"` // The disk image format. - // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"` + Format *string `locationName:"format" type:"string" enum:"DiskImageFormat"` // A presigned URL for the import manifest stored in Amazon S3. For information // about creating a presigned URL for an Amazon S3 object, read the "Query String @@ -44776,14 +44839,10 @@ type DiskImageDescription struct { // // For information about the import manifest referenced by this API action, // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). - // - // ImportManifestUrl is a required field - ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"` + ImportManifestUrl *string `locationName:"importManifestUrl" type:"string"` // The size of the disk image, in GiB. - // - // Size is a required field - Size *int64 `locationName:"size" type:"long" required:"true"` + Size *int64 `locationName:"size" type:"long"` } // String returns the string representation @@ -44899,9 +44958,7 @@ type DiskImageVolumeDescription struct { _ struct{} `type:"structure"` // The volume identifier. - // - // Id is a required field - Id *string `locationName:"id" type:"string" required:"true"` + Id *string `locationName:"id" type:"string"` // The size of the volume, in GiB. Size *int64 `locationName:"size" type:"long"` @@ -46857,6 +46914,11 @@ type GetConsoleOutputInput struct { // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` + + // When enabled, retrieves the latest console output for the instance. + // + // Default: disabled (false) + Latest *bool `type:"boolean"` } // String returns the string representation @@ -46894,6 +46956,12 @@ func (s *GetConsoleOutputInput) SetInstanceId(v string) *GetConsoleOutputInput { return s } +// SetLatest sets the Latest field's value. +func (s *GetConsoleOutputInput) SetLatest(v bool) *GetConsoleOutputInput { + s.Latest = &v + return s +} + // Contains the output of GetConsoleOutput. type GetConsoleOutputOutput struct { _ struct{} `type:"structure"` @@ -46901,11 +46969,11 @@ type GetConsoleOutputOutput struct { // The ID of the instance. InstanceId *string `locationName:"instanceId" type:"string"` - // The console output, Base64-encoded. If using a command line tool, the tool - // decodes the output for you. + // The console output, base64-encoded. If you are using a command line tool, + // the tool decodes the output for you. Output *string `locationName:"output" type:"string"` - // The time the output was last updated. + // The time at which the output was last updated. Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` } @@ -49128,9 +49196,7 @@ type ImportInstanceTaskDetails struct { Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` // One or more volumes. - // - // Volumes is a required field - Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list" required:"true"` + Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list"` } // String returns the string representation @@ -49639,27 +49705,19 @@ type ImportVolumeTaskDetails struct { _ struct{} `type:"structure"` // The Availability Zone where the resulting volume will reside. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The number of bytes converted so far. - // - // BytesConverted is a required field - BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"` + BytesConverted *int64 `locationName:"bytesConverted" type:"long"` // The description you provided when starting the import volume task. Description *string `locationName:"description" type:"string"` // The image. - // - // Image is a required field - Image *DiskImageDescription `locationName:"image" type:"structure" required:"true"` + Image *DiskImageDescription `locationName:"image" type:"structure"` // The volume. - // - // Volume is a required field - Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"` + Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` } // String returns the string representation @@ -49719,6 +49777,9 @@ type Instance struct { // The idempotency token you provided when you launched the instance, if applicable. ClientToken *string `locationName:"clientToken" type:"string"` + // The CPU options for the instance. + CpuOptions *CpuOptions `locationName:"cpuOptions" type:"structure"` + // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization // provides dedicated throughput to Amazon EBS and an optimized configuration // stack to provide optimal I/O performance. This optimization isn't available @@ -49880,6 +49941,12 @@ func (s *Instance) SetClientToken(v string) *Instance { return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *Instance) SetCpuOptions(v *CpuOptions) *Instance { + s.CpuOptions = v + return s +} + // SetEbsOptimized sets the EbsOptimized field's value. func (s *Instance) SetEbsOptimized(v bool) *Instance { s.EbsOptimized = &v @@ -62446,6 +62513,11 @@ type RunInstancesInput struct { // Constraints: Maximum 64 ASCII characters ClientToken *string `locationName:"clientToken" type:"string"` + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *CpuOptionsRequest `type:"structure"` + // The credit option for CPU usage of the instance. Valid values are standard // and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. // For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) @@ -62688,6 +62760,12 @@ func (s *RunInstancesInput) SetClientToken(v string) *RunInstancesInput { return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *RunInstancesInput) SetCpuOptions(v *CpuOptionsRequest) *RunInstancesInput { + s.CpuOptions = v + return s +} + // SetCreditSpecification sets the CreditSpecification field's value. func (s *RunInstancesInput) SetCreditSpecification(v *CreditSpecificationRequest) *RunInstancesInput { s.CreditSpecification = v diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index 0784f815ec0..2564522033a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -756,6 +756,298 @@ func (c *ElasticsearchService) DescribeElasticsearchInstanceTypeLimitsWithContex return out, req.Send() } +const opDescribeReservedElasticsearchInstanceOfferings = "DescribeReservedElasticsearchInstanceOfferings" + +// DescribeReservedElasticsearchInstanceOfferingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservedElasticsearchInstanceOfferings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeReservedElasticsearchInstanceOfferings for more information on using the DescribeReservedElasticsearchInstanceOfferings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeReservedElasticsearchInstanceOfferingsRequest method. +// req, resp := client.DescribeReservedElasticsearchInstanceOfferingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsRequest(input *DescribeReservedElasticsearchInstanceOfferingsInput) (req *request.Request, output *DescribeReservedElasticsearchInstanceOfferingsOutput) { + op := &request.Operation{ + Name: opDescribeReservedElasticsearchInstanceOfferings, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/reservedInstanceOfferings", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReservedElasticsearchInstanceOfferingsInput{} + } + + output = &DescribeReservedElasticsearchInstanceOfferingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReservedElasticsearchInstanceOfferings API operation for Amazon Elasticsearch Service. +// +// Lists available reserved Elasticsearch instance offerings. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation DescribeReservedElasticsearchInstanceOfferings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferings(input *DescribeReservedElasticsearchInstanceOfferingsInput) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { + req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstanceOfferingsWithContext is the same as DescribeReservedElasticsearchInstanceOfferings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReservedElasticsearchInstanceOfferings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstanceOfferingsInput, opts ...request.Option) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) { + req, out := c.DescribeReservedElasticsearchInstanceOfferingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstanceOfferingsPages iterates over the pages of a DescribeReservedElasticsearchInstanceOfferings operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeReservedElasticsearchInstanceOfferings method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeReservedElasticsearchInstanceOfferings operation. +// pageNum := 0 +// err := client.DescribeReservedElasticsearchInstanceOfferingsPages(params, +// func(page *DescribeReservedElasticsearchInstanceOfferingsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsPages(input *DescribeReservedElasticsearchInstanceOfferingsInput, fn func(*DescribeReservedElasticsearchInstanceOfferingsOutput, bool) bool) error { + return c.DescribeReservedElasticsearchInstanceOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeReservedElasticsearchInstanceOfferingsPagesWithContext same as DescribeReservedElasticsearchInstanceOfferingsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DescribeReservedElasticsearchInstanceOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstanceOfferingsInput, fn func(*DescribeReservedElasticsearchInstanceOfferingsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeReservedElasticsearchInstanceOfferingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReservedElasticsearchInstanceOfferingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeReservedElasticsearchInstanceOfferingsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeReservedElasticsearchInstances = "DescribeReservedElasticsearchInstances" + +// DescribeReservedElasticsearchInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservedElasticsearchInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeReservedElasticsearchInstances for more information on using the DescribeReservedElasticsearchInstances +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeReservedElasticsearchInstancesRequest method. +// req, resp := client.DescribeReservedElasticsearchInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesRequest(input *DescribeReservedElasticsearchInstancesInput) (req *request.Request, output *DescribeReservedElasticsearchInstancesOutput) { + op := &request.Operation{ + Name: opDescribeReservedElasticsearchInstances, + HTTPMethod: "GET", + HTTPPath: "/2015-01-01/es/reservedInstances", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReservedElasticsearchInstancesInput{} + } + + output = &DescribeReservedElasticsearchInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReservedElasticsearchInstances API operation for Amazon Elasticsearch Service. +// +// Returns information about reserved Elasticsearch instances for this account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation DescribeReservedElasticsearchInstances for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstances(input *DescribeReservedElasticsearchInstancesInput) (*DescribeReservedElasticsearchInstancesOutput, error) { + req, out := c.DescribeReservedElasticsearchInstancesRequest(input) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstancesWithContext is the same as DescribeReservedElasticsearchInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReservedElasticsearchInstances for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstancesInput, opts ...request.Option) (*DescribeReservedElasticsearchInstancesOutput, error) { + req, out := c.DescribeReservedElasticsearchInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeReservedElasticsearchInstancesPages iterates over the pages of a DescribeReservedElasticsearchInstances operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeReservedElasticsearchInstances method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeReservedElasticsearchInstances operation. +// pageNum := 0 +// err := client.DescribeReservedElasticsearchInstancesPages(params, +// func(page *DescribeReservedElasticsearchInstancesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPages(input *DescribeReservedElasticsearchInstancesInput, fn func(*DescribeReservedElasticsearchInstancesOutput, bool) bool) error { + return c.DescribeReservedElasticsearchInstancesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeReservedElasticsearchInstancesPagesWithContext same as DescribeReservedElasticsearchInstancesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) DescribeReservedElasticsearchInstancesPagesWithContext(ctx aws.Context, input *DescribeReservedElasticsearchInstancesInput, fn func(*DescribeReservedElasticsearchInstancesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeReservedElasticsearchInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReservedElasticsearchInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeReservedElasticsearchInstancesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the @@ -1216,6 +1508,104 @@ func (c *ElasticsearchService) ListTagsWithContext(ctx aws.Context, input *ListT return out, req.Send() } +const opPurchaseReservedElasticsearchInstanceOffering = "PurchaseReservedElasticsearchInstanceOffering" + +// PurchaseReservedElasticsearchInstanceOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseReservedElasticsearchInstanceOffering operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PurchaseReservedElasticsearchInstanceOffering for more information on using the PurchaseReservedElasticsearchInstanceOffering +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PurchaseReservedElasticsearchInstanceOfferingRequest method. +// req, resp := client.PurchaseReservedElasticsearchInstanceOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOfferingRequest(input *PurchaseReservedElasticsearchInstanceOfferingInput) (req *request.Request, output *PurchaseReservedElasticsearchInstanceOfferingOutput) { + op := &request.Operation{ + Name: opPurchaseReservedElasticsearchInstanceOffering, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/es/purchaseReservedInstanceOffering", + } + + if input == nil { + input = &PurchaseReservedElasticsearchInstanceOfferingInput{} + } + + output = &PurchaseReservedElasticsearchInstanceOfferingOutput{} + req = c.newRequest(op, input, output) + return +} + +// PurchaseReservedElasticsearchInstanceOffering API operation for Amazon Elasticsearch Service. +// +// Allows you to purchase reserved Elasticsearch instances. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation PurchaseReservedElasticsearchInstanceOffering for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// An exception for creating a resource that already exists. Gives http status +// code of 400. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// An exception for trying to create more than allowed resources or sub-resources. +// Gives http status code of 409. +// +// * ErrCodeDisabledOperationException "DisabledOperationException" +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOffering(input *PurchaseReservedElasticsearchInstanceOfferingInput) (*PurchaseReservedElasticsearchInstanceOfferingOutput, error) { + req, out := c.PurchaseReservedElasticsearchInstanceOfferingRequest(input) + return out, req.Send() +} + +// PurchaseReservedElasticsearchInstanceOfferingWithContext is the same as PurchaseReservedElasticsearchInstanceOffering with the addition of +// the ability to pass a context and additional request options. +// +// See PurchaseReservedElasticsearchInstanceOffering for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) PurchaseReservedElasticsearchInstanceOfferingWithContext(ctx aws.Context, input *PurchaseReservedElasticsearchInstanceOfferingInput, opts ...request.Option) (*PurchaseReservedElasticsearchInstanceOfferingOutput, error) { + req, out := c.PurchaseReservedElasticsearchInstanceOfferingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the @@ -2217,85 +2607,242 @@ type DescribeElasticsearchInstanceTypeLimitsInput struct { // ElasticsearchVersion is a required field ElasticsearchVersion *string `location:"uri" locationName:"ElasticsearchVersion" type:"string" required:"true"` - // The instance type for an Elasticsearch cluster for which Elasticsearch Limits - // are needed. - // - // InstanceType is a required field - InstanceType *string `location:"uri" locationName:"InstanceType" type:"string" required:"true" enum:"ESPartitionInstanceType"` + // The instance type for an Elasticsearch cluster for which Elasticsearch Limits + // are needed. + // + // InstanceType is a required field + InstanceType *string `location:"uri" locationName:"InstanceType" type:"string" required:"true" enum:"ESPartitionInstanceType"` +} + +// String returns the string representation +func (s DescribeElasticsearchInstanceTypeLimitsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeElasticsearchInstanceTypeLimitsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeElasticsearchInstanceTypeLimitsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchInstanceTypeLimitsInput"} + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.ElasticsearchVersion == nil { + invalidParams.Add(request.NewErrParamRequired("ElasticsearchVersion")) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetDomainName(v string) *DescribeElasticsearchInstanceTypeLimitsInput { + s.DomainName = &v + return s +} + +// SetElasticsearchVersion sets the ElasticsearchVersion field's value. +func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetElasticsearchVersion(v string) *DescribeElasticsearchInstanceTypeLimitsInput { + s.ElasticsearchVersion = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetInstanceType(v string) *DescribeElasticsearchInstanceTypeLimitsInput { + s.InstanceType = &v + return s +} + +// Container for the parameters received from DescribeElasticsearchInstanceTypeLimits +// operation. +type DescribeElasticsearchInstanceTypeLimitsOutput struct { + _ struct{} `type:"structure"` + + // Map of Role of the Instance and Limits that are applicable. Role performed + // by given Instance in Elasticsearch can be one of the following: Data: If + // the given InstanceType is used as Data node + // Master: If the given InstanceType is used as Master node + LimitsByRole map[string]*Limits `type:"map"` +} + +// String returns the string representation +func (s DescribeElasticsearchInstanceTypeLimitsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeElasticsearchInstanceTypeLimitsOutput) GoString() string { + return s.String() +} + +// SetLimitsByRole sets the LimitsByRole field's value. +func (s *DescribeElasticsearchInstanceTypeLimitsOutput) SetLimitsByRole(v map[string]*Limits) *DescribeElasticsearchInstanceTypeLimitsOutput { + s.LimitsByRole = v + return s +} + +// Container for parameters to DescribeReservedElasticsearchInstanceOfferings +type DescribeReservedElasticsearchInstanceOfferingsInput struct { + _ struct{} `type:"structure"` + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // NextToken should be sent in case if earlier API call produced result containing + // NextToken. It is used for pagination. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The offering identifier filter value. Use this parameter to show only the + // available offering that matches the specified reservation identifier. + ReservedElasticsearchInstanceOfferingId *string `location:"querystring" locationName:"offeringId" type:"string"` +} + +// String returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetMaxResults(v int64) *DescribeReservedElasticsearchInstanceOfferingsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetNextToken(v string) *DescribeReservedElasticsearchInstanceOfferingsInput { + s.NextToken = &v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsInput) SetReservedElasticsearchInstanceOfferingId(v string) *DescribeReservedElasticsearchInstanceOfferingsInput { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// Container for results from DescribeReservedElasticsearchInstanceOfferings +type DescribeReservedElasticsearchInstanceOfferingsOutput struct { + _ struct{} `type:"structure"` + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // List of reserved Elasticsearch instance offerings + ReservedElasticsearchInstanceOfferings []*ReservedElasticsearchInstanceOffering `type:"list"` +} + +// String returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedElasticsearchInstanceOfferingsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsOutput) SetNextToken(v string) *DescribeReservedElasticsearchInstanceOfferingsOutput { + s.NextToken = &v + return s +} + +// SetReservedElasticsearchInstanceOfferings sets the ReservedElasticsearchInstanceOfferings field's value. +func (s *DescribeReservedElasticsearchInstanceOfferingsOutput) SetReservedElasticsearchInstanceOfferings(v []*ReservedElasticsearchInstanceOffering) *DescribeReservedElasticsearchInstanceOfferingsOutput { + s.ReservedElasticsearchInstanceOfferings = v + return s +} + +// Container for parameters to DescribeReservedElasticsearchInstances +type DescribeReservedElasticsearchInstancesInput struct { + _ struct{} `type:"structure"` + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // NextToken should be sent in case if earlier API call produced result containing + // NextToken. It is used for pagination. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The reserved instance identifier filter value. Use this parameter to show + // only the reservation that matches the specified reserved Elasticsearch instance + // ID. + ReservedElasticsearchInstanceId *string `location:"querystring" locationName:"reservationId" type:"string"` } // String returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsInput) String() string { +func (s DescribeReservedElasticsearchInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsInput) GoString() string { +func (s DescribeReservedElasticsearchInstancesInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeElasticsearchInstanceTypeLimitsInput"} - if s.DomainName != nil && len(*s.DomainName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) - } - if s.ElasticsearchVersion == nil { - invalidParams.Add(request.NewErrParamRequired("ElasticsearchVersion")) - } - if s.InstanceType == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetDomainName(v string) *DescribeElasticsearchInstanceTypeLimitsInput { - s.DomainName = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeReservedElasticsearchInstancesInput) SetMaxResults(v int64) *DescribeReservedElasticsearchInstancesInput { + s.MaxResults = &v return s } -// SetElasticsearchVersion sets the ElasticsearchVersion field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetElasticsearchVersion(v string) *DescribeElasticsearchInstanceTypeLimitsInput { - s.ElasticsearchVersion = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstancesInput) SetNextToken(v string) *DescribeReservedElasticsearchInstancesInput { + s.NextToken = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetInstanceType(v string) *DescribeElasticsearchInstanceTypeLimitsInput { - s.InstanceType = &v +// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. +func (s *DescribeReservedElasticsearchInstancesInput) SetReservedElasticsearchInstanceId(v string) *DescribeReservedElasticsearchInstancesInput { + s.ReservedElasticsearchInstanceId = &v return s } -// Container for the parameters received from DescribeElasticsearchInstanceTypeLimits -// operation. -type DescribeElasticsearchInstanceTypeLimitsOutput struct { +// Container for results from DescribeReservedElasticsearchInstances +type DescribeReservedElasticsearchInstancesOutput struct { _ struct{} `type:"structure"` - // Map of Role of the Instance and Limits that are applicable. Role performed - // by given Instance in Elasticsearch can be one of the following: Data: If - // the given InstanceType is used as Data node - // Master: If the given InstanceType is used as Master node - LimitsByRole map[string]*Limits `type:"map"` + // Provides an identifier to allow retrieval of paginated results. + NextToken *string `type:"string"` + + // List of reserved Elasticsearch instances. + ReservedElasticsearchInstances []*ReservedElasticsearchInstance `type:"list"` } // String returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsOutput) String() string { +func (s DescribeReservedElasticsearchInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeElasticsearchInstanceTypeLimitsOutput) GoString() string { +func (s DescribeReservedElasticsearchInstancesOutput) GoString() string { return s.String() } -// SetLimitsByRole sets the LimitsByRole field's value. -func (s *DescribeElasticsearchInstanceTypeLimitsOutput) SetLimitsByRole(v map[string]*Limits) *DescribeElasticsearchInstanceTypeLimitsOutput { - s.LimitsByRole = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedElasticsearchInstancesOutput) SetNextToken(v string) *DescribeReservedElasticsearchInstancesOutput { + s.NextToken = &v + return s +} + +// SetReservedElasticsearchInstances sets the ReservedElasticsearchInstances field's value. +func (s *DescribeReservedElasticsearchInstancesOutput) SetReservedElasticsearchInstances(v []*ReservedElasticsearchInstance) *DescribeReservedElasticsearchInstancesOutput { + s.ReservedElasticsearchInstances = v return s } @@ -3491,6 +4038,142 @@ func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { return s } +// Container for parameters to PurchaseReservedElasticsearchInstanceOffering +type PurchaseReservedElasticsearchInstanceOfferingInput struct { + _ struct{} `type:"structure"` + + // The number of Elasticsearch instances to reserve. + InstanceCount *int64 `min:"1" type:"integer"` + + // A customer-specified identifier to track this reservation. + // + // ReservationName is a required field + ReservationName *string `min:"5" type:"string" required:"true"` + + // The ID of the reserved Elasticsearch instance offering to purchase. + // + // ReservedElasticsearchInstanceOfferingId is a required field + ReservedElasticsearchInstanceOfferingId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedElasticsearchInstanceOfferingInput"} + if s.InstanceCount != nil && *s.InstanceCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("InstanceCount", 1)) + } + if s.ReservationName == nil { + invalidParams.Add(request.NewErrParamRequired("ReservationName")) + } + if s.ReservationName != nil && len(*s.ReservationName) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ReservationName", 5)) + } + if s.ReservedElasticsearchInstanceOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedElasticsearchInstanceOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceCount sets the InstanceCount field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetInstanceCount(v int64) *PurchaseReservedElasticsearchInstanceOfferingInput { + s.InstanceCount = &v + return s +} + +// SetReservationName sets the ReservationName field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetReservationName(v string) *PurchaseReservedElasticsearchInstanceOfferingInput { + s.ReservationName = &v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingInput) SetReservedElasticsearchInstanceOfferingId(v string) *PurchaseReservedElasticsearchInstanceOfferingInput { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// Represents the output of a PurchaseReservedElasticsearchInstanceOffering +// operation. +type PurchaseReservedElasticsearchInstanceOfferingOutput struct { + _ struct{} `type:"structure"` + + // The customer-specified identifier used to track this reservation. + ReservationName *string `min:"5" type:"string"` + + // Details of the reserved Elasticsearch instance which was purchased. + ReservedElasticsearchInstanceId *string `type:"string"` +} + +// String returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseReservedElasticsearchInstanceOfferingOutput) GoString() string { + return s.String() +} + +// SetReservationName sets the ReservationName field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingOutput) SetReservationName(v string) *PurchaseReservedElasticsearchInstanceOfferingOutput { + s.ReservationName = &v + return s +} + +// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. +func (s *PurchaseReservedElasticsearchInstanceOfferingOutput) SetReservedElasticsearchInstanceId(v string) *PurchaseReservedElasticsearchInstanceOfferingOutput { + s.ReservedElasticsearchInstanceId = &v + return s +} + +// Contains the specific price and frequency of a recurring charges for a reserved +// Elasticsearch instance, or for a reserved Elasticsearch instance offering. +type RecurringCharge struct { + _ struct{} `type:"structure"` + + // The monetary amount of the recurring charge. + RecurringChargeAmount *float64 `type:"double"` + + // The frequency of the recurring charge. + RecurringChargeFrequency *string `type:"string"` +} + +// String returns the string representation +func (s RecurringCharge) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecurringCharge) GoString() string { + return s.String() +} + +// SetRecurringChargeAmount sets the RecurringChargeAmount field's value. +func (s *RecurringCharge) SetRecurringChargeAmount(v float64) *RecurringCharge { + s.RecurringChargeAmount = &v + return s +} + +// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. +func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { + s.RecurringChargeFrequency = &v + return s +} + // Container for the parameters to the RemoveTags operation. Specify the ARN // for the Elasticsearch domain from which you want to remove the specified // TagKey. @@ -3562,6 +4245,232 @@ func (s RemoveTagsOutput) GoString() string { return s.String() } +// Details of a reserved Elasticsearch instance. +type ReservedElasticsearchInstance struct { + _ struct{} `type:"structure"` + + // The currency code for the reserved Elasticsearch instance offering. + CurrencyCode *string `type:"string"` + + // The duration, in seconds, for which the Elasticsearch instance is reserved. + Duration *int64 `type:"integer"` + + // The number of Elasticsearch instances that have been reserved. + ElasticsearchInstanceCount *int64 `type:"integer"` + + // The Elasticsearch instance type offered by the reserved instance offering. + ElasticsearchInstanceType *string `type:"string" enum:"ESPartitionInstanceType"` + + // The upfront fixed charge you will paid to purchase the specific reserved + // Elasticsearch instance offering. + FixedPrice *float64 `type:"double"` + + // The payment option as defined in the reserved Elasticsearch instance offering. + PaymentOption *string `type:"string" enum:"ReservedElasticsearchInstancePaymentOption"` + + // The charge to your account regardless of whether you are creating any domains + // using the instance offering. + RecurringCharges []*RecurringCharge `type:"list"` + + // The customer-specified identifier to track this reservation. + ReservationName *string `min:"5" type:"string"` + + // The unique identifier for the reservation. + ReservedElasticsearchInstanceId *string `type:"string"` + + // The offering identifier. + ReservedElasticsearchInstanceOfferingId *string `type:"string"` + + // The time the reservation started. + StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The state of the reserved Elasticsearch instance. + State *string `type:"string"` + + // The rate you are charged for each hour for the domain that is using this + // reserved instance. + UsagePrice *float64 `type:"double"` +} + +// String returns the string representation +func (s ReservedElasticsearchInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedElasticsearchInstance) GoString() string { + return s.String() +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *ReservedElasticsearchInstance) SetCurrencyCode(v string) *ReservedElasticsearchInstance { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *ReservedElasticsearchInstance) SetDuration(v int64) *ReservedElasticsearchInstance { + s.Duration = &v + return s +} + +// SetElasticsearchInstanceCount sets the ElasticsearchInstanceCount field's value. +func (s *ReservedElasticsearchInstance) SetElasticsearchInstanceCount(v int64) *ReservedElasticsearchInstance { + s.ElasticsearchInstanceCount = &v + return s +} + +// SetElasticsearchInstanceType sets the ElasticsearchInstanceType field's value. +func (s *ReservedElasticsearchInstance) SetElasticsearchInstanceType(v string) *ReservedElasticsearchInstance { + s.ElasticsearchInstanceType = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *ReservedElasticsearchInstance) SetFixedPrice(v float64) *ReservedElasticsearchInstance { + s.FixedPrice = &v + return s +} + +// SetPaymentOption sets the PaymentOption field's value. +func (s *ReservedElasticsearchInstance) SetPaymentOption(v string) *ReservedElasticsearchInstance { + s.PaymentOption = &v + return s +} + +// SetRecurringCharges sets the RecurringCharges field's value. +func (s *ReservedElasticsearchInstance) SetRecurringCharges(v []*RecurringCharge) *ReservedElasticsearchInstance { + s.RecurringCharges = v + return s +} + +// SetReservationName sets the ReservationName field's value. +func (s *ReservedElasticsearchInstance) SetReservationName(v string) *ReservedElasticsearchInstance { + s.ReservationName = &v + return s +} + +// SetReservedElasticsearchInstanceId sets the ReservedElasticsearchInstanceId field's value. +func (s *ReservedElasticsearchInstance) SetReservedElasticsearchInstanceId(v string) *ReservedElasticsearchInstance { + s.ReservedElasticsearchInstanceId = &v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *ReservedElasticsearchInstance) SetReservedElasticsearchInstanceOfferingId(v string) *ReservedElasticsearchInstance { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ReservedElasticsearchInstance) SetStartTime(v time.Time) *ReservedElasticsearchInstance { + s.StartTime = &v + return s +} + +// SetState sets the State field's value. +func (s *ReservedElasticsearchInstance) SetState(v string) *ReservedElasticsearchInstance { + s.State = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *ReservedElasticsearchInstance) SetUsagePrice(v float64) *ReservedElasticsearchInstance { + s.UsagePrice = &v + return s +} + +// Details of a reserved Elasticsearch instance offering. +type ReservedElasticsearchInstanceOffering struct { + _ struct{} `type:"structure"` + + // The currency code for the reserved Elasticsearch instance offering. + CurrencyCode *string `type:"string"` + + // The duration, in seconds, for which the offering will reserve the Elasticsearch + // instance. + Duration *int64 `type:"integer"` + + // The Elasticsearch instance type offered by the reserved instance offering. + ElasticsearchInstanceType *string `type:"string" enum:"ESPartitionInstanceType"` + + // The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch + // instance offering. + FixedPrice *float64 `type:"double"` + + // Payment option for the reserved Elasticsearch instance offering + PaymentOption *string `type:"string" enum:"ReservedElasticsearchInstancePaymentOption"` + + // The charge to your account regardless of whether you are creating any domains + // using the instance offering. + RecurringCharges []*RecurringCharge `type:"list"` + + // The Elasticsearch reserved instance offering identifier. + ReservedElasticsearchInstanceOfferingId *string `type:"string"` + + // The rate you are charged for each hour the domain that is using the offering + // is running. + UsagePrice *float64 `type:"double"` +} + +// String returns the string representation +func (s ReservedElasticsearchInstanceOffering) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedElasticsearchInstanceOffering) GoString() string { + return s.String() +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *ReservedElasticsearchInstanceOffering) SetCurrencyCode(v string) *ReservedElasticsearchInstanceOffering { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *ReservedElasticsearchInstanceOffering) SetDuration(v int64) *ReservedElasticsearchInstanceOffering { + s.Duration = &v + return s +} + +// SetElasticsearchInstanceType sets the ElasticsearchInstanceType field's value. +func (s *ReservedElasticsearchInstanceOffering) SetElasticsearchInstanceType(v string) *ReservedElasticsearchInstanceOffering { + s.ElasticsearchInstanceType = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *ReservedElasticsearchInstanceOffering) SetFixedPrice(v float64) *ReservedElasticsearchInstanceOffering { + s.FixedPrice = &v + return s +} + +// SetPaymentOption sets the PaymentOption field's value. +func (s *ReservedElasticsearchInstanceOffering) SetPaymentOption(v string) *ReservedElasticsearchInstanceOffering { + s.PaymentOption = &v + return s +} + +// SetRecurringCharges sets the RecurringCharges field's value. +func (s *ReservedElasticsearchInstanceOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedElasticsearchInstanceOffering { + s.RecurringCharges = v + return s +} + +// SetReservedElasticsearchInstanceOfferingId sets the ReservedElasticsearchInstanceOfferingId field's value. +func (s *ReservedElasticsearchInstanceOffering) SetReservedElasticsearchInstanceOfferingId(v string) *ReservedElasticsearchInstanceOffering { + s.ReservedElasticsearchInstanceOfferingId = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *ReservedElasticsearchInstanceOffering) SetUsagePrice(v float64) *ReservedElasticsearchInstanceOffering { + s.UsagePrice = &v + return s +} + // Specifies the time, in UTC format, when the service takes a daily automated // snapshot of the specified Elasticsearch domain. Default value is 0 hours. type SnapshotOptions struct { @@ -4210,6 +5119,17 @@ const ( OptionStateActive = "Active" ) +const ( + // ReservedElasticsearchInstancePaymentOptionAllUpfront is a ReservedElasticsearchInstancePaymentOption enum value + ReservedElasticsearchInstancePaymentOptionAllUpfront = "ALL_UPFRONT" + + // ReservedElasticsearchInstancePaymentOptionPartialUpfront is a ReservedElasticsearchInstancePaymentOption enum value + ReservedElasticsearchInstancePaymentOptionPartialUpfront = "PARTIAL_UPFRONT" + + // ReservedElasticsearchInstancePaymentOptionNoUpfront is a ReservedElasticsearchInstancePaymentOption enum value + ReservedElasticsearchInstancePaymentOptionNoUpfront = "NO_UPFRONT" +) + // The type of EBS volume, standard, gp2, or io1. See Configuring EBS-based // Storage (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs)for // more information. diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index 90c00729084..eab7818e9e3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -55,7 +55,7 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // CreateDeliveryStream API operation for Amazon Kinesis Firehose. // -// Creates a delivery stream. +// Creates a Kinesis Data Firehose delivery stream. // // By default, you can create up to 50 delivery streams per AWS Region. // @@ -67,15 +67,15 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // // A Kinesis Data Firehose delivery stream can be configured to receive records // directly from providers using PutRecord or PutRecordBatch, or it can be configured -// to use an existing Kinesis data stream as its source. To specify a Kinesis -// data stream as input, set the DeliveryStreamType parameter to KinesisStreamAsSource, -// and provide the Kinesis data stream Amazon Resource Name (ARN) and role ARN -// in the KinesisStreamSourceConfiguration parameter. +// to use an existing Kinesis stream as its source. To specify a Kinesis data +// stream as input, set the DeliveryStreamType parameter to KinesisStreamAsSource, +// and provide the Kinesis stream Amazon Resource Name (ARN) and role ARN in +// the KinesisStreamSourceConfiguration parameter. // // A delivery stream is configured with a single destination: Amazon S3, Amazon -// ES, Amazon Redshift, or Splunk. Specify only one of the following destination -// configuration parameters: ExtendedS3DestinationConfiguration, S3DestinationConfiguration, -// ElasticsearchDestinationConfiguration, RedshiftDestinationConfiguration, +// ES, Amazon Redshift, or Splunk. You must specify only one of the following +// destination configuration parameters: ExtendedS3DestinationConfiguration, +// S3DestinationConfiguration, ElasticsearchDestinationConfiguration, RedshiftDestinationConfiguration, // or SplunkDestinationConfiguration. // // When you specify S3DestinationConfiguration, you can also provide the following @@ -84,31 +84,30 @@ func (c *Firehose) CreateDeliveryStreamRequest(input *CreateDeliveryStreamInput) // buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied // first. BufferingHints is a hint, so there are some cases where the service // cannot adhere to these conditions strictly. For example, record boundaries -// are such that the size is a little over or under the configured buffering +// might be such that the size is a little over or under the configured buffering // size. By default, no encryption is performed. We strongly recommend that // you enable encryption to ensure secure data storage in Amazon S3. // // A few notes about Amazon Redshift as a destination: // // * An Amazon Redshift destination requires an S3 bucket as intermediate -// location. This is because Kinesis Data Firehose first delivers data to -// Amazon S3 and then uses COPY syntax to load data into an Amazon Redshift -// table. This is specified in the RedshiftDestinationConfiguration.S3Configuration -// parameter. +// location. Kinesis Data Firehose first delivers data to Amazon S3 and then +// uses COPY syntax to load data into an Amazon Redshift table. This is specified +// in the RedshiftDestinationConfiguration.S3Configuration parameter. // // * The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration // because the Amazon Redshift COPY operation that reads from the S3 bucket // doesn't support these compression formats. // -// * We strongly recommend that you use the user name and password that you -// provide exclusively with Kinesis Data Firehose. In addition, the permissions -// for the account should be restricted for Amazon Redshift INSERT permissions. +// * We strongly recommend that you use the user name and password you provide +// exclusively with Kinesis Data Firehose, and that the permissions for the +// account are restricted for Amazon Redshift INSERT permissions. // // Kinesis Data Firehose assumes the IAM role that is configured as part of // the destination. The role should allow the Kinesis Data Firehose principal // to assume the role, and the role should have permissions that allow the service -// to deliver the data. For more information, see Grant Kinesis Firehose Access -// to an Amazon S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) +// to deliver the data. For more information, see Grant Kinesis Data Firehose +// Access to an Amazon S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) // in the Amazon Kinesis Data Firehose Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -202,10 +201,10 @@ func (c *Firehose) DeleteDeliveryStreamRequest(input *DeleteDeliveryStreamInput) // // To check the state of a delivery stream, use DescribeDeliveryStream. // -// While the delivery stream is DELETING state, the service may continue to -// accept the records, but the service doesn't make any guarantees with respect -// to delivering the data. Therefore, as a best practice, you should first stop -// any applications that are sending records before deleting a delivery stream. +// While the delivery stream is DELETING state, the service might continue to +// accept the records, but it doesn't make any guarantees with respect to delivering +// the data. Therefore, as a best practice, you should first stop any applications +// that are sending records before deleting a delivery stream. // // 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 @@ -542,15 +541,16 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // Applications using these operations are referred to as producers. // // By default, each delivery stream can take in up to 2,000 transactions per -// second, 5,000 records per second, or 5 MB per second. Note that if you use -// PutRecord and PutRecordBatch, the limits are an aggregate across these two -// operations for each delivery stream. For more information about limits and -// how to request an increase, see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). +// second, 5,000 records per second, or 5 MB per second. If you use PutRecord +// and PutRecordBatch, the limits are an aggregate across these two operations +// for each delivery stream. For more information about limits and how to request +// an increase, see Amazon Kinesis Data Firehose Limits (http://docs.aws.amazon.com/firehose/latest/dev/limits.html). // // You must specify the name of the delivery stream and the data record when // using PutRecord. The data record consists of a data blob that can be up to -// 1,000 KB in size and any kind of data. For example, it can be a segment from -// a log file, geographic location data, website clickstream data, and so on. +// 1,000 KB in size, and any kind of data. For example, it can be a segment +// from a log file, geographic location data, website clickstream data, and +// so on. // // Kinesis Data Firehose buffers records before delivering them to the destination. // To disambiguate the data blobs at the destination, a common solution is to @@ -567,7 +567,7 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // limits have been exceeded for the delivery stream. // // Data records sent to Kinesis Data Firehose are stored for 24 hours from the -// time they are added to a delivery stream as it attempts to send the records +// time they are added to a delivery stream as it tries to send the records // to the destination. If the destination is unreachable for more than 24 hours, // the data is no longer available. // @@ -674,7 +674,7 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // // You must specify the name of the delivery stream and the data record when // using PutRecord. The data record consists of a data blob that can be up to -// 1,000 KB in size and any kind of data. For example, it could be a segment +// 1,000 KB in size, and any kind of data. For example, it could be a segment // from a log file, geographic location data, website clickstream data, and // so on. // @@ -690,7 +690,7 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // correlates with a record in the request array using the same ordering, from // the top to the bottom. The response array always includes the same number // of records as the request array. RequestResponses includes both successfully -// and unsuccessfully processed records. Kinesis Data Firehose attempts to process +// and unsuccessfully processed records. Kinesis Data Firehose tries to process // all records in each PutRecordBatch request. A single record failure does // not stop the processing of subsequent records. // @@ -1022,8 +1022,8 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req // and conflicting merges. This is a required field, and the service updates // the configuration only if the existing configuration has a version ID that // matches. After the update is applied successfully, the version ID is updated, -// and you can retrieve it using DescribeDeliveryStream. Use the new version -// ID to set CurrentDeliveryStreamVersionId in the next call. +// and can be retrieved using DescribeDeliveryStream. Use the new version ID +// to set CurrentDeliveryStreamVersionId in the next call. // // 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 @@ -1070,7 +1070,7 @@ func (c *Firehose) UpdateDestinationWithContext(ctx aws.Context, input *UpdateDe // Describes hints for the buffering to perform before delivering data to the // destination. These options are treated as hints, and therefore Kinesis Data -// Firehose might choose to use different values whenever it is optimal. +// Firehose might choose to use different values when it is optimal. type BufferingHints struct { _ struct{} `type:"structure"` @@ -1252,8 +1252,9 @@ type CreateDeliveryStreamInput struct { _ struct{} `type:"structure"` // The name of the delivery stream. This name must be unique per AWS account - // in the same Region. If the delivery streams are in different accounts or - // different Regions, you can have multiple delivery streams with the same name. + // in the same AWS Region. If the delivery streams are in different accounts + // or different Regions, you can have multiple delivery streams with the same + // name. // // DeliveryStreamName is a required field DeliveryStreamName *string `min:"1" type:"string" required:"true"` @@ -1414,6 +1415,80 @@ func (s *CreateDeliveryStreamOutput) SetDeliveryStreamARN(v string) *CreateDeliv return s } +// Specifies that you want Kinesis Data Firehose to convert data from the JSON +// format to the Parquet or ORC format before writing it to Amazon S3. Kinesis +// Data Firehose uses the serializer and deserializer that you specify, in addition +// to the column information from the AWS Glue table, to deserialize your input +// data from JSON and then serialize it to the Parquet or ORC format. For more +// information, see Kinesis Data Firehose Record Format Conversion (https://docs.aws.amazon.com/firehose/latest/dev/record-format-conversion.html). +type DataFormatConversionConfiguration struct { + _ struct{} `type:"structure"` + + // Defaults to true. Set it to false if you want to disable format conversion + // while preserving the configuration details. + Enabled *bool `type:"boolean"` + + // Specifies the deserializer that you want Kinesis Data Firehose to use to + // convert the format of your data from JSON. + InputFormatConfiguration *InputFormatConfiguration `type:"structure"` + + // Specifies the serializer that you want Kinesis Data Firehose to use to convert + // the format of your data to the Parquet or ORC format. + OutputFormatConfiguration *OutputFormatConfiguration `type:"structure"` + + // Specifies the AWS Glue Data Catalog table that contains the column information. + SchemaConfiguration *SchemaConfiguration `type:"structure"` +} + +// String returns the string representation +func (s DataFormatConversionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataFormatConversionConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DataFormatConversionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DataFormatConversionConfiguration"} + if s.OutputFormatConfiguration != nil { + if err := s.OutputFormatConfiguration.Validate(); err != nil { + invalidParams.AddNested("OutputFormatConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *DataFormatConversionConfiguration) SetEnabled(v bool) *DataFormatConversionConfiguration { + s.Enabled = &v + return s +} + +// SetInputFormatConfiguration sets the InputFormatConfiguration field's value. +func (s *DataFormatConversionConfiguration) SetInputFormatConfiguration(v *InputFormatConfiguration) *DataFormatConversionConfiguration { + s.InputFormatConfiguration = v + return s +} + +// SetOutputFormatConfiguration sets the OutputFormatConfiguration field's value. +func (s *DataFormatConversionConfiguration) SetOutputFormatConfiguration(v *OutputFormatConfiguration) *DataFormatConversionConfiguration { + s.OutputFormatConfiguration = v + return s +} + +// SetSchemaConfiguration sets the SchemaConfiguration field's value. +func (s *DataFormatConversionConfiguration) SetSchemaConfiguration(v *SchemaConfiguration) *DataFormatConversionConfiguration { + s.SchemaConfiguration = v + return s +} + type DeleteDeliveryStreamInput struct { _ struct{} `type:"structure"` @@ -1476,7 +1551,8 @@ type DeliveryStreamDescription struct { // The date and time that the delivery stream was created. CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` - // The Amazon Resource Name (ARN) of the delivery stream. + // The Amazon Resource Name (ARN) of the delivery stream. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // DeliveryStreamARN is a required field DeliveryStreamARN *string `min:"1" type:"string" required:"true"` @@ -1606,11 +1682,11 @@ type DescribeDeliveryStreamInput struct { DeliveryStreamName *string `min:"1" type:"string" required:"true"` // The ID of the destination to start returning the destination information. - // Currently, Kinesis Data Firehose supports one destination per delivery stream. + // Kinesis Data Firehose supports one destination per delivery stream. ExclusiveStartDestinationId *string `min:"1" type:"string"` - // The limit on the number of destinations to return. Currently, you can have - // one destination per delivery stream. + // The limit on the number of destinations to return. You can have one destination + // per delivery stream. Limit *int64 `min:"1" type:"integer"` } @@ -1689,6 +1765,51 @@ func (s *DescribeDeliveryStreamOutput) SetDeliveryStreamDescription(v *DeliveryS return s } +// The deserializer you want Kinesis Data Firehose to use for converting the +// input data from JSON. Kinesis Data Firehose then serializes the data to its +// final format using the Serializer. Kinesis Data Firehose supports two types +// of deserializers: the Apache Hive JSON SerDe (https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-JSON) +// and the OpenX JSON SerDe (https://github.com/rcongiu/Hive-JSON-Serde). +type Deserializer struct { + _ struct{} `type:"structure"` + + // The native Hive / HCatalog JsonSerDe. Used by Kinesis Data Firehose for deserializing + // data, which means converting it from the JSON format in preparation for serializing + // it to the Parquet or ORC format. This is one of two deserializers you can + // choose, depending on which one offers the functionality you need. The other + // option is the OpenX SerDe. + HiveJsonSerDe *HiveJsonSerDe `type:"structure"` + + // The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which + // means converting it from the JSON format in preparation for serializing it + // to the Parquet or ORC format. This is one of two deserializers you can choose, + // depending on which one offers the functionality you need. The other option + // is the native Hive / HCatalog JsonSerDe. + OpenXJsonSerDe *OpenXJsonSerDe `type:"structure"` +} + +// String returns the string representation +func (s Deserializer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Deserializer) GoString() string { + return s.String() +} + +// SetHiveJsonSerDe sets the HiveJsonSerDe field's value. +func (s *Deserializer) SetHiveJsonSerDe(v *HiveJsonSerDe) *Deserializer { + s.HiveJsonSerDe = v + return s +} + +// SetOpenXJsonSerDe sets the OpenXJsonSerDe field's value. +func (s *Deserializer) SetOpenXJsonSerDe(v *OpenXJsonSerDe) *Deserializer { + s.OpenXJsonSerDe = v + return s +} + // Describes the destination for a delivery stream. type DestinationDescription struct { _ struct{} `type:"structure"` @@ -1824,12 +1945,13 @@ type ElasticsearchDestinationConfiguration struct { // are used. BufferingHints *ElasticsearchBufferingHints `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeElasticsearchDomain, // DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after - // assuming the role specified in RoleARN. + // assuming the role specified in RoleARN. For more information, see Amazon + // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // DomainARN is a required field DomainARN *string `min:"1" type:"string" required:"true"` @@ -1855,18 +1977,19 @@ type ElasticsearchDestinationConfiguration struct { // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data // Firehose for calling the Amazon ES Configuration API and for indexing documents. // For more information, see Grant Kinesis Data Firehose Access to an Amazon - // Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) + // and Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` - // Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, - // Kinesis Data Firehose writes any documents that could not be indexed to the - // configured Amazon S3 destination, with elasticsearch-failed/ appended to - // the key prefix. When set to AllDocuments, Kinesis Data Firehose delivers - // all incoming records to Amazon S3, and also writes failed documents with - // elasticsearch-failed/ appended to the prefix. For more information, see Data - // Delivery Failure Handling (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#retry). + // Defines how documents should be delivered to Amazon S3. When it is set to + // FailedDocumentsOnly, Kinesis Data Firehose writes any documents that could + // not be indexed to the configured Amazon S3 destination, with elasticsearch-failed/ + // appended to the key prefix. When set to AllDocuments, Kinesis Data Firehose + // delivers all incoming records to Amazon S3, and also writes failed documents + // with elasticsearch-failed/ appended to the prefix. For more information, + // see Amazon S3 Backup for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-s3-backup). // Default value is FailedDocumentsOnly. S3BackupMode *string `type:"string" enum:"ElasticsearchS3BackupMode"` @@ -1875,7 +1998,10 @@ type ElasticsearchDestinationConfiguration struct { // S3Configuration is a required field S3Configuration *S3DestinationConfiguration `type:"structure" required:"true"` - // The Elasticsearch type name. + // The Elasticsearch type name. For Elasticsearch 6.x, there can be only one + // type per index. If you try to specify a new type for an existing index that + // already has another type, Kinesis Data Firehose returns an error during run + // time. // // TypeName is a required field TypeName *string `min:"1" type:"string" required:"true"` @@ -2016,10 +2142,11 @@ type ElasticsearchDestinationDescription struct { // The buffering options. BufferingHints *ElasticsearchBufferingHints `type:"structure"` - // The CloudWatch logging options. + // The Amazon CloudWatch logging options. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` - // The ARN of the Amazon ES domain. + // The ARN of the Amazon ES domain. For more information, see Amazon Resource + // Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). DomainARN *string `min:"1" type:"string"` // The Elasticsearch index name. @@ -2034,7 +2161,8 @@ type ElasticsearchDestinationDescription struct { // The Amazon ES retry options. RetryOptions *ElasticsearchRetryOptions `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // The Amazon S3 backup mode. @@ -2136,7 +2264,8 @@ type ElasticsearchDestinationUpdate struct { // The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeElasticsearchDomain, // DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after - // assuming the IAM role specified in RoleARN. + // assuming the IAM role specified in RoleARN. For more information, see Amazon + // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). DomainARN *string `min:"1" type:"string"` // The Elasticsearch index name. @@ -2158,13 +2287,16 @@ type ElasticsearchDestinationUpdate struct { // The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data // Firehose for calling the Amazon ES Configuration API and for indexing documents. // For more information, see Grant Kinesis Data Firehose Access to an Amazon - // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3). + // S3 Destination (http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3) + // and Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // The Amazon S3 destination. S3Update *S3DestinationUpdate `type:"structure"` - // The Elasticsearch type name. + // The Elasticsearch type name. For Elasticsearch 6.x, there can be only one + // type per index. If you try to specify a new type for an existing index that + // already has another type, Kinesis Data Firehose returns an error during runtime. TypeName *string `min:"1" type:"string"` } @@ -2281,7 +2413,7 @@ type ElasticsearchRetryOptions struct { _ struct{} `type:"structure"` // After an initial failure to deliver to Amazon ES, the total amount of time - // during which Kinesis Data Firehose re-attempts delivery (including the first + // during which Kinesis Data Firehose retries delivery (including the first // attempt). After this time has elapsed, the failed documents are written to // Amazon S3. Default value is 300 seconds (5 minutes). A value of 0 (zero) // results in no retries. @@ -2357,7 +2489,8 @@ func (s *EncryptionConfiguration) SetNoEncryptionConfig(v string) *EncryptionCon type ExtendedS3DestinationConfiguration struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -2365,12 +2498,16 @@ type ExtendedS3DestinationConfiguration struct { // The buffering option. BufferingHints *BufferingHints `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. CompressionFormat *string `type:"string" enum:"CompressionFormat"` + // The serializer, deserializer, and schema for converting data from the JSON + // format to the Parquet or ORC format before writing it to Amazon S3. + DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` + // The encryption configuration. If no value is specified, the default is no // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` @@ -2386,7 +2523,8 @@ type ExtendedS3DestinationConfiguration struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2428,6 +2566,11 @@ func (s *ExtendedS3DestinationConfiguration) Validate() error { invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) } } + if s.DataFormatConversionConfiguration != nil { + if err := s.DataFormatConversionConfiguration.Validate(); err != nil { + invalidParams.AddNested("DataFormatConversionConfiguration", err.(request.ErrInvalidParams)) + } + } if s.EncryptionConfiguration != nil { if err := s.EncryptionConfiguration.Validate(); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) @@ -2474,6 +2617,12 @@ func (s *ExtendedS3DestinationConfiguration) SetCompressionFormat(v string) *Ext return s } +// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. +func (s *ExtendedS3DestinationConfiguration) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationConfiguration { + s.DataFormatConversionConfiguration = v + return s +} + // SetEncryptionConfiguration sets the EncryptionConfiguration field's value. func (s *ExtendedS3DestinationConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationConfiguration { s.EncryptionConfiguration = v @@ -2514,7 +2663,8 @@ func (s *ExtendedS3DestinationConfiguration) SetS3BackupMode(v string) *Extended type ExtendedS3DestinationDescription struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -2524,7 +2674,7 @@ type ExtendedS3DestinationDescription struct { // BufferingHints is a required field BufferingHints *BufferingHints `type:"structure" required:"true"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. @@ -2532,6 +2682,10 @@ type ExtendedS3DestinationDescription struct { // CompressionFormat is a required field CompressionFormat *string `type:"string" required:"true" enum:"CompressionFormat"` + // The serializer, deserializer, and schema for converting data from the JSON + // format to the Parquet or ORC format before writing it to Amazon S3. + DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` + // The encryption configuration. If no value is specified, the default is no // encryption. // @@ -2539,16 +2693,18 @@ type ExtendedS3DestinationDescription struct { EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered - // S3 files. You can specify an extra prefix to be added in front of the time - // format prefix. If the prefix ends with a slash, it appears as a folder in - // the S3 bucket. For more information, see Amazon S3 Object Name Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) + // Amazon S3 files. You can specify an extra prefix to be added in front of + // the time format prefix. If the prefix ends with a slash, it appears as a + // folder in the S3 bucket. For more information, see Amazon S3 Object Name + // Format (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#s3-object-name) // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2594,6 +2750,12 @@ func (s *ExtendedS3DestinationDescription) SetCompressionFormat(v string) *Exten return s } +// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. +func (s *ExtendedS3DestinationDescription) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationDescription { + s.DataFormatConversionConfiguration = v + return s +} + // SetEncryptionConfiguration sets the EncryptionConfiguration field's value. func (s *ExtendedS3DestinationDescription) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationDescription { s.EncryptionConfiguration = v @@ -2634,18 +2796,23 @@ func (s *ExtendedS3DestinationDescription) SetS3BackupMode(v string) *ExtendedS3 type ExtendedS3DestinationUpdate struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). BucketARN *string `min:"1" type:"string"` // The buffering option. BufferingHints *BufferingHints `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. CompressionFormat *string `type:"string" enum:"CompressionFormat"` + // The serializer, deserializer, and schema for converting data from the JSON + // format to the Parquet or ORC format before writing it to Amazon S3. + DataFormatConversionConfiguration *DataFormatConversionConfiguration `type:"structure"` + // The encryption configuration. If no value is specified, the default is no // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` @@ -2661,7 +2828,8 @@ type ExtendedS3DestinationUpdate struct { // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // Enables or disables Amazon S3 backup mode. @@ -2695,6 +2863,11 @@ func (s *ExtendedS3DestinationUpdate) Validate() error { invalidParams.AddNested("BufferingHints", err.(request.ErrInvalidParams)) } } + if s.DataFormatConversionConfiguration != nil { + if err := s.DataFormatConversionConfiguration.Validate(); err != nil { + invalidParams.AddNested("DataFormatConversionConfiguration", err.(request.ErrInvalidParams)) + } + } if s.EncryptionConfiguration != nil { if err := s.EncryptionConfiguration.Validate(); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) @@ -2741,6 +2914,12 @@ func (s *ExtendedS3DestinationUpdate) SetCompressionFormat(v string) *ExtendedS3 return s } +// SetDataFormatConversionConfiguration sets the DataFormatConversionConfiguration field's value. +func (s *ExtendedS3DestinationUpdate) SetDataFormatConversionConfiguration(v *DataFormatConversionConfiguration) *ExtendedS3DestinationUpdate { + s.DataFormatConversionConfiguration = v + return s +} + // SetEncryptionConfiguration sets the EncryptionConfiguration field's value. func (s *ExtendedS3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionConfiguration) *ExtendedS3DestinationUpdate { s.EncryptionConfiguration = v @@ -2777,12 +2956,74 @@ func (s *ExtendedS3DestinationUpdate) SetS3BackupUpdate(v *S3DestinationUpdate) return s } +// The native Hive / HCatalog JsonSerDe. Used by Kinesis Data Firehose for deserializing +// data, which means converting it from the JSON format in preparation for serializing +// it to the Parquet or ORC format. This is one of two deserializers you can +// choose, depending on which one offers the functionality you need. The other +// option is the OpenX SerDe. +type HiveJsonSerDe struct { + _ struct{} `type:"structure"` + + // Indicates how you want Kinesis Data Firehose to parse the date and time stamps + // that may be present in your input data JSON. To specify these format strings, + // follow the pattern syntax of JodaTime's DateTimeFormat format strings. For + // more information, see Class DateTimeFormat (https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html). + // You can also use the special value millis to parse time stamps in epoch milliseconds. + // If you don't specify a format, Kinesis Data Firehose uses java.sql.Timestamp::valueOf + // by default. + TimestampFormats []*string `type:"list"` +} + +// String returns the string representation +func (s HiveJsonSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HiveJsonSerDe) GoString() string { + return s.String() +} + +// SetTimestampFormats sets the TimestampFormats field's value. +func (s *HiveJsonSerDe) SetTimestampFormats(v []*string) *HiveJsonSerDe { + s.TimestampFormats = v + return s +} + +// Specifies the deserializer you want to use to convert the format of the input +// data. +type InputFormatConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies which deserializer to use. You can choose either the Apache Hive + // JSON SerDe or the OpenX JSON SerDe. If both are non-null, the server rejects + // the request. + Deserializer *Deserializer `type:"structure"` +} + +// String returns the string representation +func (s InputFormatConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputFormatConfiguration) GoString() string { + return s.String() +} + +// SetDeserializer sets the Deserializer field's value. +func (s *InputFormatConfiguration) SetDeserializer(v *Deserializer) *InputFormatConfiguration { + s.Deserializer = v + return s +} + // Describes an encryption key for a destination in Amazon S3. type KMSEncryptionConfig struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the encryption key. Must belong to the - // same AWS Region as the destination Amazon S3 bucket. + // same AWS Region as the destination Amazon S3 bucket. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // AWSKMSKeyARN is a required field AWSKMSKeyARN *string `min:"1" type:"string" required:"true"` @@ -2825,12 +3066,15 @@ func (s *KMSEncryptionConfig) SetAWSKMSKeyARN(v string) *KMSEncryptionConfig { type KinesisStreamSourceConfiguration struct { _ struct{} `type:"structure"` - // The ARN of the source Kinesis data stream. + // The ARN of the source Kinesis data stream. For more information, see Amazon + // Kinesis Data Streams ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). // // KinesisStreamARN is a required field KinesisStreamARN *string `min:"1" type:"string" required:"true"` // The ARN of the role that provides access to the source Kinesis data stream. + // For more information, see AWS Identity and Access Management (IAM) ARN Format + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -2889,10 +3133,12 @@ type KinesisStreamSourceDescription struct { // starting with this time stamp. DeliveryStartTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` - // The Amazon Resource Name (ARN) of the source Kinesis data stream. + // The Amazon Resource Name (ARN) of the source Kinesis data stream. For more + // information, see Amazon Kinesis Data Streams ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). KinesisStreamARN *string `min:"1" type:"string"` - // The ARN of the role used by the source Kinesis data stream. + // The ARN of the role used by the source Kinesis data stream. For more information, + // see AWS Identity and Access Management (IAM) ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam). RoleARN *string `min:"1" type:"string"` } @@ -3133,6 +3379,349 @@ func (s *ListTagsForDeliveryStreamOutput) SetTags(v []*Tag) *ListTagsForDelivery return s } +// The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which +// means converting it from the JSON format in preparation for serializing it +// to the Parquet or ORC format. This is one of two deserializers you can choose, +// depending on which one offers the functionality you need. The other option +// is the native Hive / HCatalog JsonSerDe. +type OpenXJsonSerDe struct { + _ struct{} `type:"structure"` + + // When set to true, which is the default, Kinesis Data Firehose converts JSON + // keys to lowercase before deserializing them. + CaseInsensitive *bool `type:"boolean"` + + // Maps column names to JSON keys that aren't identical to the column names. + // This is useful when the JSON contains keys that are Hive keywords. For example, + // timestamp is a Hive keyword. If you have a JSON key named timestamp, set + // this parameter to {"ts": "timestamp"} to map this key to a column named ts. + ColumnToJsonKeyMappings map[string]*string `type:"map"` + + // When set to true, specifies that the names of the keys include dots and that + // you want Kinesis Data Firehose to replace them with underscores. This is + // useful because Apache Hive does not allow dots in column names. For example, + // if the JSON contains a key whose name is "a.b", you can define the column + // name to be "a_b" when using this option. + // + // The default is false. + ConvertDotsInJsonKeysToUnderscores *bool `type:"boolean"` +} + +// String returns the string representation +func (s OpenXJsonSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpenXJsonSerDe) GoString() string { + return s.String() +} + +// SetCaseInsensitive sets the CaseInsensitive field's value. +func (s *OpenXJsonSerDe) SetCaseInsensitive(v bool) *OpenXJsonSerDe { + s.CaseInsensitive = &v + return s +} + +// SetColumnToJsonKeyMappings sets the ColumnToJsonKeyMappings field's value. +func (s *OpenXJsonSerDe) SetColumnToJsonKeyMappings(v map[string]*string) *OpenXJsonSerDe { + s.ColumnToJsonKeyMappings = v + return s +} + +// SetConvertDotsInJsonKeysToUnderscores sets the ConvertDotsInJsonKeysToUnderscores field's value. +func (s *OpenXJsonSerDe) SetConvertDotsInJsonKeysToUnderscores(v bool) *OpenXJsonSerDe { + s.ConvertDotsInJsonKeysToUnderscores = &v + return s +} + +// A serializer to use for converting data to the ORC format before storing +// it in Amazon S3. For more information, see Apache ORC (https://orc.apache.org/docs/). +type OrcSerDe struct { + _ struct{} `type:"structure"` + + // The Hadoop Distributed File System (HDFS) block size. This is useful if you + // intend to copy the data from Amazon S3 to HDFS before querying. The default + // is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value + // for padding calculations. + BlockSizeBytes *int64 `min:"6.7108864e+07" type:"integer"` + + // The column names for which you want Kinesis Data Firehose to create bloom + // filters. The default is null. + BloomFilterColumns []*string `type:"list"` + + // The Bloom filter false positive probability (FPP). The lower the FPP, the + // bigger the Bloom filter. The default value is 0.05, the minimum is 0, and + // the maximum is 1. + BloomFilterFalsePositiveProbability *float64 `type:"double"` + + // The compression code to use over data blocks. The default is SNAPPY. + Compression *string `type:"string" enum:"OrcCompression"` + + // Represents the fraction of the total number of non-null rows. To turn off + // dictionary encoding, set this fraction to a number that is less than the + // number of distinct keys in a dictionary. To always use dictionary encoding, + // set this threshold to 1. + DictionaryKeyThreshold *float64 `type:"double"` + + // Set this to true to indicate that you want stripes to be padded to the HDFS + // block boundaries. This is useful if you intend to copy the data from Amazon + // S3 to HDFS before querying. The default is false. + EnablePadding *bool `type:"boolean"` + + // The version of the file to write. The possible values are V0_11 and V0_12. + // The default is V0_12. + FormatVersion *string `type:"string" enum:"OrcFormatVersion"` + + // A number between 0 and 1 that defines the tolerance for block padding as + // a decimal fraction of stripe size. The default value is 0.05, which means + // 5 percent of stripe size. + // + // For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the + // default block padding tolerance of 5 percent reserves a maximum of 3.2 MiB + // for padding within the 256 MiB block. In such a case, if the available size + // within the block is more than 3.2 MiB, a new, smaller stripe is inserted + // to fit within that space. This ensures that no stripe crosses block boundaries + // and causes remote reads within a node-local task. + // + // Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding + // is false. + PaddingTolerance *float64 `type:"double"` + + // The number of rows between index entries. The default is 10,000 and the minimum + // is 1,000. + RowIndexStride *int64 `min:"1000" type:"integer"` + + // The number of bytes in each stripe. The default is 64 MiB and the minimum + // is 8 MiB. + StripeSizeBytes *int64 `min:"8.388608e+06" type:"integer"` +} + +// String returns the string representation +func (s OrcSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrcSerDe) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OrcSerDe) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OrcSerDe"} + if s.BlockSizeBytes != nil && *s.BlockSizeBytes < 6.7108864e+07 { + invalidParams.Add(request.NewErrParamMinValue("BlockSizeBytes", 6.7108864e+07)) + } + if s.RowIndexStride != nil && *s.RowIndexStride < 1000 { + invalidParams.Add(request.NewErrParamMinValue("RowIndexStride", 1000)) + } + if s.StripeSizeBytes != nil && *s.StripeSizeBytes < 8.388608e+06 { + invalidParams.Add(request.NewErrParamMinValue("StripeSizeBytes", 8.388608e+06)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBlockSizeBytes sets the BlockSizeBytes field's value. +func (s *OrcSerDe) SetBlockSizeBytes(v int64) *OrcSerDe { + s.BlockSizeBytes = &v + return s +} + +// SetBloomFilterColumns sets the BloomFilterColumns field's value. +func (s *OrcSerDe) SetBloomFilterColumns(v []*string) *OrcSerDe { + s.BloomFilterColumns = v + return s +} + +// SetBloomFilterFalsePositiveProbability sets the BloomFilterFalsePositiveProbability field's value. +func (s *OrcSerDe) SetBloomFilterFalsePositiveProbability(v float64) *OrcSerDe { + s.BloomFilterFalsePositiveProbability = &v + return s +} + +// SetCompression sets the Compression field's value. +func (s *OrcSerDe) SetCompression(v string) *OrcSerDe { + s.Compression = &v + return s +} + +// SetDictionaryKeyThreshold sets the DictionaryKeyThreshold field's value. +func (s *OrcSerDe) SetDictionaryKeyThreshold(v float64) *OrcSerDe { + s.DictionaryKeyThreshold = &v + return s +} + +// SetEnablePadding sets the EnablePadding field's value. +func (s *OrcSerDe) SetEnablePadding(v bool) *OrcSerDe { + s.EnablePadding = &v + return s +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *OrcSerDe) SetFormatVersion(v string) *OrcSerDe { + s.FormatVersion = &v + return s +} + +// SetPaddingTolerance sets the PaddingTolerance field's value. +func (s *OrcSerDe) SetPaddingTolerance(v float64) *OrcSerDe { + s.PaddingTolerance = &v + return s +} + +// SetRowIndexStride sets the RowIndexStride field's value. +func (s *OrcSerDe) SetRowIndexStride(v int64) *OrcSerDe { + s.RowIndexStride = &v + return s +} + +// SetStripeSizeBytes sets the StripeSizeBytes field's value. +func (s *OrcSerDe) SetStripeSizeBytes(v int64) *OrcSerDe { + s.StripeSizeBytes = &v + return s +} + +// Specifies the serializer that you want Kinesis Data Firehose to use to convert +// the format of your data before it writes it to Amazon S3. +type OutputFormatConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies which serializer to use. You can choose either the ORC SerDe or + // the Parquet SerDe. If both are non-null, the server rejects the request. + Serializer *Serializer `type:"structure"` +} + +// String returns the string representation +func (s OutputFormatConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputFormatConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputFormatConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputFormatConfiguration"} + if s.Serializer != nil { + if err := s.Serializer.Validate(); err != nil { + invalidParams.AddNested("Serializer", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSerializer sets the Serializer field's value. +func (s *OutputFormatConfiguration) SetSerializer(v *Serializer) *OutputFormatConfiguration { + s.Serializer = v + return s +} + +// A serializer to use for converting data to the Parquet format before storing +// it in Amazon S3. For more information, see Apache Parquet (https://parquet.apache.org/documentation/latest/). +type ParquetSerDe struct { + _ struct{} `type:"structure"` + + // The Hadoop Distributed File System (HDFS) block size. This is useful if you + // intend to copy the data from Amazon S3 to HDFS before querying. The default + // is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value + // for padding calculations. + BlockSizeBytes *int64 `min:"6.7108864e+07" type:"integer"` + + // The compression code to use over data blocks. The possible values are UNCOMPRESSED, + // SNAPPY, and GZIP, with the default being SNAPPY. Use SNAPPY for higher decompression + // speed. Use GZIP if the compression ration is more important than speed. + Compression *string `type:"string" enum:"ParquetCompression"` + + // Indicates whether to enable dictionary compression. + EnableDictionaryCompression *bool `type:"boolean"` + + // The maximum amount of padding to apply. This is useful if you intend to copy + // the data from Amazon S3 to HDFS before querying. The default is 0. + MaxPaddingBytes *int64 `type:"integer"` + + // The Parquet page size. Column chunks are divided into pages. A page is conceptually + // an indivisible unit (in terms of compression and encoding). The minimum value + // is 64 KiB and the default is 1 MiB. + PageSizeBytes *int64 `min:"65536" type:"integer"` + + // Indicates the version of row format to output. The possible values are V1 + // and V2. The default is V1. + WriterVersion *string `type:"string" enum:"ParquetWriterVersion"` +} + +// String returns the string representation +func (s ParquetSerDe) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParquetSerDe) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParquetSerDe) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParquetSerDe"} + if s.BlockSizeBytes != nil && *s.BlockSizeBytes < 6.7108864e+07 { + invalidParams.Add(request.NewErrParamMinValue("BlockSizeBytes", 6.7108864e+07)) + } + if s.PageSizeBytes != nil && *s.PageSizeBytes < 65536 { + invalidParams.Add(request.NewErrParamMinValue("PageSizeBytes", 65536)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBlockSizeBytes sets the BlockSizeBytes field's value. +func (s *ParquetSerDe) SetBlockSizeBytes(v int64) *ParquetSerDe { + s.BlockSizeBytes = &v + return s +} + +// SetCompression sets the Compression field's value. +func (s *ParquetSerDe) SetCompression(v string) *ParquetSerDe { + s.Compression = &v + return s +} + +// SetEnableDictionaryCompression sets the EnableDictionaryCompression field's value. +func (s *ParquetSerDe) SetEnableDictionaryCompression(v bool) *ParquetSerDe { + s.EnableDictionaryCompression = &v + return s +} + +// SetMaxPaddingBytes sets the MaxPaddingBytes field's value. +func (s *ParquetSerDe) SetMaxPaddingBytes(v int64) *ParquetSerDe { + s.MaxPaddingBytes = &v + return s +} + +// SetPageSizeBytes sets the PageSizeBytes field's value. +func (s *ParquetSerDe) SetPageSizeBytes(v int64) *ParquetSerDe { + s.PageSizeBytes = &v + return s +} + +// SetWriterVersion sets the WriterVersion field's value. +func (s *ParquetSerDe) SetWriterVersion(v string) *ParquetSerDe { + s.WriterVersion = &v + return s +} + // Describes a data processing configuration. type ProcessingConfiguration struct { _ struct{} `type:"structure"` @@ -3606,7 +4195,8 @@ type RedshiftDestinationConfiguration struct { // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3773,7 +4363,7 @@ func (s *RedshiftDestinationConfiguration) SetUsername(v string) *RedshiftDestin type RedshiftDestinationDescription struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The database connection string. @@ -3793,7 +4383,8 @@ type RedshiftDestinationDescription struct { // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -3889,7 +4480,7 @@ func (s *RedshiftDestinationDescription) SetUsername(v string) *RedshiftDestinat type RedshiftDestinationUpdate struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The database connection string. @@ -3908,7 +4499,8 @@ type RedshiftDestinationUpdate struct { // to Amazon Redshift. Default value is 3600 (60 minutes). RetryOptions *RedshiftRetryOptions `type:"structure"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` // The Amazon S3 backup mode. @@ -4079,7 +4671,8 @@ func (s *RedshiftRetryOptions) SetDurationInSeconds(v int64) *RedshiftRetryOptio type S3DestinationConfiguration struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -4110,7 +4703,8 @@ type S3DestinationConfiguration struct { // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -4204,7 +4798,8 @@ func (s *S3DestinationConfiguration) SetRoleARN(v string) *S3DestinationConfigur type S3DestinationDescription struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // BucketARN is a required field BucketARN *string `min:"1" type:"string" required:"true"` @@ -4215,7 +4810,7 @@ type S3DestinationDescription struct { // BufferingHints is a required field BufferingHints *BufferingHints `type:"structure" required:"true"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The compression format. If no value is specified, the default is UNCOMPRESSED. @@ -4237,7 +4832,8 @@ type S3DestinationDescription struct { // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // // RoleARN is a required field RoleARN *string `min:"1" type:"string" required:"true"` @@ -4299,7 +4895,8 @@ func (s *S3DestinationDescription) SetRoleARN(v string) *S3DestinationDescriptio type S3DestinationUpdate struct { _ struct{} `type:"structure"` - // The ARN of the S3 bucket. + // The ARN of the S3 bucket. For more information, see Amazon Resource Names + // (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). BucketARN *string `min:"1" type:"string"` // The buffering option. If no value is specified, BufferingHints object default @@ -4328,7 +4925,8 @@ type S3DestinationUpdate struct { // in the Amazon Kinesis Data Firehose Developer Guide. Prefix *string `type:"string"` - // The Amazon Resource Name (ARN) of the AWS credentials. + // The Amazon Resource Name (ARN) of the AWS credentials. For more information, + // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). RoleARN *string `min:"1" type:"string"` } @@ -4410,6 +5008,142 @@ func (s *S3DestinationUpdate) SetRoleARN(v string) *S3DestinationUpdate { return s } +// Specifies the schema to which you want Kinesis Data Firehose to configure +// your data before it writes it to Amazon S3. +type SchemaConfiguration struct { + _ struct{} `type:"structure"` + + // The ID of the AWS Glue Data Catalog. If you don't supply this, the AWS account + // ID is used by default. + CatalogId *string `type:"string"` + + // Specifies the name of the AWS Glue database that contains the schema for + // the output data. + DatabaseName *string `type:"string"` + + // If you don't specify an AWS Region, the default is the current Region. + Region *string `type:"string"` + + // The role that Kinesis Data Firehose can use to access AWS Glue. This role + // must be in the same account you use for Kinesis Data Firehose. Cross-account + // roles aren't allowed. + RoleARN *string `type:"string"` + + // Specifies the AWS Glue table that contains the column information that constitutes + // your data schema. + TableName *string `type:"string"` + + // Specifies the table version for the output data schema. If you don't specify + // this version ID, or if you set it to LATEST, Kinesis Data Firehose uses the + // most recent version. This means that any updates to the table are automatically + // picked up. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s SchemaConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SchemaConfiguration) GoString() string { + return s.String() +} + +// SetCatalogId sets the CatalogId field's value. +func (s *SchemaConfiguration) SetCatalogId(v string) *SchemaConfiguration { + s.CatalogId = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *SchemaConfiguration) SetDatabaseName(v string) *SchemaConfiguration { + s.DatabaseName = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *SchemaConfiguration) SetRegion(v string) *SchemaConfiguration { + s.Region = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *SchemaConfiguration) SetRoleARN(v string) *SchemaConfiguration { + s.RoleARN = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *SchemaConfiguration) SetTableName(v string) *SchemaConfiguration { + s.TableName = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *SchemaConfiguration) SetVersionId(v string) *SchemaConfiguration { + s.VersionId = &v + return s +} + +// The serializer that you want Kinesis Data Firehose to use to convert data +// to the target format before writing it to Amazon S3. Kinesis Data Firehose +// supports two types of serializers: the ORC SerDe (https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hadoop/hive/ql/io/orc/OrcSerde.html) +// and the Parquet SerDe (https://hive.apache.org/javadocs/r1.2.2/api/org/apache/hadoop/hive/ql/io/parquet/serde/ParquetHiveSerDe.html). +type Serializer struct { + _ struct{} `type:"structure"` + + // A serializer to use for converting data to the ORC format before storing + // it in Amazon S3. For more information, see Apache ORC (https://orc.apache.org/docs/). + OrcSerDe *OrcSerDe `type:"structure"` + + // A serializer to use for converting data to the Parquet format before storing + // it in Amazon S3. For more information, see Apache Parquet (https://parquet.apache.org/documentation/latest/). + ParquetSerDe *ParquetSerDe `type:"structure"` +} + +// String returns the string representation +func (s Serializer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Serializer) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Serializer) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Serializer"} + if s.OrcSerDe != nil { + if err := s.OrcSerDe.Validate(); err != nil { + invalidParams.AddNested("OrcSerDe", err.(request.ErrInvalidParams)) + } + } + if s.ParquetSerDe != nil { + if err := s.ParquetSerDe.Validate(); err != nil { + invalidParams.AddNested("ParquetSerDe", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOrcSerDe sets the OrcSerDe field's value. +func (s *Serializer) SetOrcSerDe(v *OrcSerDe) *Serializer { + s.OrcSerDe = v + return s +} + +// SetParquetSerDe sets the ParquetSerDe field's value. +func (s *Serializer) SetParquetSerDe(v *ParquetSerDe) *Serializer { + s.ParquetSerDe = v + return s +} + // Details about a Kinesis data stream used as the source for a Kinesis Data // Firehose delivery stream. type SourceDescription struct { @@ -4439,7 +5173,7 @@ func (s *SourceDescription) SetKinesisStreamSourceDescription(v *KinesisStreamSo type SplunkDestinationConfiguration struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment @@ -4588,7 +5322,7 @@ func (s *SplunkDestinationConfiguration) SetS3Configuration(v *S3DestinationConf type SplunkDestinationDescription struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment @@ -4604,8 +5338,7 @@ type SplunkDestinationDescription struct { // This type can be either "Raw" or "Event." HECEndpointType *string `type:"string" enum:"HECEndpointType"` - // This is a GUID you obtain from your Splunk cluster when you create a new - // HEC endpoint. + // A GUID you obtain from your Splunk cluster when you create a new HEC endpoint. HECToken *string `type:"string"` // The data processing configuration. @@ -4694,7 +5427,7 @@ func (s *SplunkDestinationDescription) SetS3DestinationDescription(v *S3Destinat type SplunkDestinationUpdate struct { _ struct{} `type:"structure"` - // The CloudWatch logging options for your delivery stream. + // The Amazon CloudWatch logging options for your delivery stream. CloudWatchLoggingOptions *CloudWatchLoggingOptions `type:"structure"` // The amount of time that Kinesis Data Firehose waits to receive an acknowledgment @@ -5060,7 +5793,7 @@ type UpdateDestinationInput struct { _ struct{} `type:"structure"` // Obtain this value from the VersionId result of DeliveryStreamDescription. - // This value is required, and it helps the service perform conditional operations. + // This value is required, and helps the service perform conditional operations. // For example, if there is an interleaving update and this value is null, then // the update destination fails. After the update is successful, the VersionId // value is updated. The service then performs a merge of the old configuration @@ -5291,6 +6024,44 @@ const ( NoEncryptionConfigNoEncryption = "NoEncryption" ) +const ( + // OrcCompressionNone is a OrcCompression enum value + OrcCompressionNone = "NONE" + + // OrcCompressionZlib is a OrcCompression enum value + OrcCompressionZlib = "ZLIB" + + // OrcCompressionSnappy is a OrcCompression enum value + OrcCompressionSnappy = "SNAPPY" +) + +const ( + // OrcFormatVersionV011 is a OrcFormatVersion enum value + OrcFormatVersionV011 = "V0_11" + + // OrcFormatVersionV012 is a OrcFormatVersion enum value + OrcFormatVersionV012 = "V0_12" +) + +const ( + // ParquetCompressionUncompressed is a ParquetCompression enum value + ParquetCompressionUncompressed = "UNCOMPRESSED" + + // ParquetCompressionGzip is a ParquetCompression enum value + ParquetCompressionGzip = "GZIP" + + // ParquetCompressionSnappy is a ParquetCompression enum value + ParquetCompressionSnappy = "SNAPPY" +) + +const ( + // ParquetWriterVersionV1 is a ParquetWriterVersion enum value + ParquetWriterVersionV1 = "V1" + + // ParquetWriterVersionV2 is a ParquetWriterVersion enum value + ParquetWriterVersionV2 = "V2" +) + const ( // ProcessorParameterNameLambdaArn is a ProcessorParameterName enum value ProcessorParameterNameLambdaArn = "LambdaArn" diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go index 7be8756207b..5765986d997 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go @@ -509,16 +509,22 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -531,21 +537,11 @@ func (c *GameLift) CreateFleetRequest(input *CreateFleetInput) (req *request.Req // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) +// * Manage fleet actions: // -// DeleteScalingPolicy (automatic scaling) +// StartFleetActions // -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -1975,16 +1971,22 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -1997,21 +1999,11 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions // // 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 @@ -2328,49 +2320,30 @@ func (c *GameLift) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) ( // in force and removes all record of it. To delete a scaling policy, specify // both the scaling policy name and the fleet ID it is associated with. // -// Fleet-related operations include: +// To temporarily suspend scaling policies, call StopFleetActions. This operation +// suspends all policies for the fleet. // -// * CreateFleet +// Operations related to fleet capacity scaling include: // -// * ListFleets -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetPortSettings +// * DescribeFleetCapacity // -// DescribeFleetUtilization +// * UpdateFleetCapacity // -// DescribeRuntimeConfiguration +// * DescribeEC2InstanceLimits // -// DescribeFleetEvents +// * Manage scaling policies: // -// * Update fleets: +// PutScalingPolicy (auto-scaling) // -// UpdateFleetAttributes +// DescribeScalingPolicies (auto-scaling) // -// UpdateFleetCapacity +// DeleteScalingPolicy (auto-scaling) // -// UpdateFleetPortSettings +// * Manage fleet actions: // -// UpdateRuntimeConfiguration +// StartFleetActions // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -2915,16 +2888,22 @@ func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLi // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -2937,21 +2916,11 @@ func (c *GameLift) DescribeEC2InstanceLimitsRequest(input *DescribeEC2InstanceLi // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions // // 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 @@ -3057,16 +3026,22 @@ func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributes // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3079,21 +3054,11 @@ func (c *GameLift) DescribeFleetAttributesRequest(input *DescribeFleetAttributes // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions // // 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 @@ -3204,16 +3169,22 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3226,21 +3197,11 @@ func (c *GameLift) DescribeFleetCapacityRequest(input *DescribeFleetCapacityInpu // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3343,16 +3304,22 @@ func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) ( // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3365,21 +3332,11 @@ func (c *GameLift) DescribeFleetEventsRequest(input *DescribeFleetEventsInput) ( // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3484,16 +3441,22 @@ func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSett // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3506,21 +3469,11 @@ func (c *GameLift) DescribeFleetPortSettingsRequest(input *DescribeFleetPortSett // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity +// StartFleetActions // -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -3629,16 +3582,22 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -3651,21 +3610,11 @@ func (c *GameLift) DescribeFleetUtilizationRequest(input *DescribeFleetUtilizati // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions // // 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 @@ -4805,16 +4754,22 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -4827,21 +4782,11 @@ func (c *GameLift) DescribeRuntimeConfigurationRequest(input *DescribeRuntimeCon // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity +// * Manage fleet actions: // -// PutScalingPolicy (automatic scaling) +// StartFleetActions // -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -4940,49 +4885,32 @@ func (c *GameLift) DescribeScalingPoliciesRequest(input *DescribeScalingPolicies // Use the pagination parameters to retrieve results as a set of sequential // pages. If successful, set of ScalingPolicy objects is returned for the fleet. // -// Fleet-related operations include: +// A fleet may have all of its scaling policies suspended (StopFleetActions). +// This action does not affect the status of the scaling policies, which remains +// ACTIVE. To see whether a fleet's scaling policies are in force or suspended, +// call DescribeFleetAttributes and check the stopped actions. // -// * CreateFleet +// Operations related to fleet capacity scaling include: // -// * ListFleets +// * DescribeFleetCapacity // -// * Describe fleets: +// * UpdateFleetCapacity // -// DescribeFleetAttributes +// * DescribeEC2InstanceLimits // -// DescribeFleetPortSettings +// * Manage scaling policies: // -// DescribeFleetUtilization +// PutScalingPolicy (auto-scaling) // -// DescribeRuntimeConfiguration +// DescribeScalingPolicies (auto-scaling) // -// DescribeFleetEvents +// DeleteScalingPolicy (auto-scaling) // -// * Update fleets: +// * Manage fleet actions: // -// UpdateFleetAttributes +// StartFleetActions // -// UpdateFleetCapacity -// -// UpdateFleetPortSettings -// -// UpdateRuntimeConfiguration -// -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -5742,16 +5670,22 @@ func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Reque // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -5764,21 +5698,11 @@ func (c *GameLift) ListFleetsRequest(input *ListFleetsInput) (req *request.Reque // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: +// * Manage fleet actions: // -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) +// StartFleetActions // -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -5870,72 +5794,102 @@ func (c *GameLift) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *r // PutScalingPolicy API operation for Amazon GameLift. // -// Creates or updates a scaling policy for a fleet. An active scaling policy -// prompts Amazon GameLift to track a certain metric for a fleet and automatically -// change the fleet's capacity in specific circumstances. Each scaling policy -// contains one rule statement. Fleets can have multiple scaling policies in -// force simultaneously. -// -// A scaling policy rule statement has the following structure: +// Creates or updates a scaling policy for a fleet. Scaling policies are used +// to automatically scale a fleet's hosting capacity to meet player demand. +// An active scaling policy instructs Amazon GameLift to track a fleet metric +// and automatically change the fleet's capacity when a certain threshold is +// reached. There are two types of scaling policies: target-based and rule-based. +// Use a target-based policy to quickly and efficiently manage fleet scaling; +// this option is the most commonly used. Use rule-based policies when you need +// to exert fine-grained control over auto-scaling. +// +// Fleets can have multiple scaling policies of each type in force at the same +// time; you can have one target-based policy, one or multiple rule-based scaling +// policies, or both. We recommend caution, however, because multiple auto-scaling +// policies can have unintended consequences. +// +// You can temporarily suspend all scaling policies for a fleet by calling StopFleetActions +// with the fleet action AUTO_SCALING. To resume scaling policies, call StartFleetActions +// with the same fleet action. To stop just one scaling policy--or to permanently +// remove it, you must delete the policy with DeleteScalingPolicy. +// +// Learn more about how to work with auto-scaling in Set Up Fleet Automatic +// Scaling (http://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-autoscaling.html). +// +// Target-based policy +// +// A target-based policy tracks a single metric: PercentAvailableGameSessions. +// This metric tells us how much of a fleet's hosting capacity is ready to host +// game sessions but is not currently in use. This is the fleet's buffer; it +// measures the additional player demand that the fleet could handle at current +// capacity. With a target-based policy, you set your ideal buffer size and +// leave it to Amazon GameLift to take whatever action is needed to maintain +// that target. +// +// For example, you might choose to maintain a 10% buffer for a fleet that has +// the capacity to host 100 simultaneous game sessions. This policy tells Amazon +// GameLift to take action whenever the fleet's available capacity falls below +// or rises above 10 game sessions. Amazon GameLift will start new instances +// or stop unused instances in order to return to the 10% buffer. +// +// To create or update a target-based policy, specify a fleet ID and name, and +// set the policy type to "TargetBased". Specify the metric to track (PercentAvailableGameSessions) +// and reference a TargetConfiguration object with your desired buffer value. +// Exclude all other parameters. On a successful request, the policy name is +// returned. The scaling policy is automatically in force as soon as it's successfully +// created. If the fleet's auto-scaling actions are temporarily suspended, the +// new policy will be in force once the fleet actions are restarted. +// +// Rule-based policy +// +// A rule-based policy tracks specified fleet metric, sets a threshold value, +// and specifies the type of action to initiate when triggered. With a rule-based +// policy, you can select from several available fleet metrics. Each policy +// specifies whether to scale up or scale down (and by how much), so you need +// one policy for each type of action. +// +// For example, a policy may make the following statement: "If the percentage +// of idle instances is greater than 20% for more than 15 minutes, then reduce +// the fleet capacity by 10%." +// +// A policy's rule statement has the following structure: // // If [MetricName] is [ComparisonOperator][Threshold] for [EvaluationPeriods] // minutes, then [ScalingAdjustmentType] to/by [ScalingAdjustment]. // -// For example, this policy: "If the number of idle instances exceeds 20 for -// more than 15 minutes, then reduce the fleet capacity by 10 instances" could -// be implemented as the following rule statement: +// To implement the example, the rule statement would look like this: // -// If [IdleInstances] is [GreaterThanOrEqualToThreshold] [20] for [15] minutes, -// then [ChangeInCapacity] by [-10]. +// If [PercentIdleInstances] is [GreaterThanThreshold][20] for [15] minutes, +// then [PercentChangeInCapacity] to/by [10]. // // To create or update a scaling policy, specify a unique combination of name -// and fleet ID, and set the rule values. All parameters for this action are -// required. If successful, the policy name is returned. Scaling policies cannot -// be suspended or made inactive. To stop enforcing a scaling policy, call DeleteScalingPolicy. -// -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes +// and fleet ID, and set the policy type to "RuleBased". Specify the parameter +// values for a policy rule statement. On a successful request, the policy name +// is returned. Scaling policies are automatically in force as soon as they're +// successfully created. If the fleet's auto-scaling actions are temporarily +// suspended, the new policy will be in force once the fleet actions are restarted. // -// UpdateFleetCapacity +// Operations related to fleet capacity scaling include: // -// UpdateFleetPortSettings +// * DescribeFleetCapacity // -// UpdateRuntimeConfiguration +// * UpdateFleetCapacity // -// * Manage fleet capacity: +// * DescribeEC2InstanceLimits // -// DescribeFleetCapacity +// * Manage scaling policies: // -// UpdateFleetCapacity +// PutScalingPolicy (auto-scaling) // -// PutScalingPolicy (automatic scaling) +// DescribeScalingPolicies (auto-scaling) // -// DescribeScalingPolicies (automatic scaling) +// DeleteScalingPolicy (auto-scaling) // -// DeleteScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions // // 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 @@ -6363,6 +6317,127 @@ func (c *GameLift) SearchGameSessionsWithContext(ctx aws.Context, input *SearchG return out, req.Send() } +const opStartFleetActions = "StartFleetActions" + +// StartFleetActionsRequest generates a "aws/request.Request" representing the +// client's request for the StartFleetActions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartFleetActions for more information on using the StartFleetActions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartFleetActionsRequest method. +// req, resp := client.StartFleetActionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartFleetActions +func (c *GameLift) StartFleetActionsRequest(input *StartFleetActionsInput) (req *request.Request, output *StartFleetActionsOutput) { + op := &request.Operation{ + Name: opStartFleetActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartFleetActionsInput{} + } + + output = &StartFleetActionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartFleetActions API operation for Amazon GameLift. +// +// Resumes activity on a fleet that was suspended with StopFleetActions. Currently, +// this operation is used to restart a fleet's auto-scaling activity. +// +// To start fleet actions, specify the fleet ID and the type of actions to restart. +// When auto-scaling fleet actions are restarted, Amazon GameLift once again +// initiates scaling events as triggered by the fleet's scaling policies. If +// actions on the fleet were never stopped, this operation will have no effect. +// You can view a fleet's stopped actions using DescribeFleetAttributes. +// +// Operations related to fleet capacity scaling include: +// +// * DescribeFleetCapacity +// +// * UpdateFleetCapacity +// +// * DescribeEC2InstanceLimits +// +// * Manage scaling policies: +// +// PutScalingPolicy (auto-scaling) +// +// DescribeScalingPolicies (auto-scaling) +// +// DeleteScalingPolicy (auto-scaling) +// +// * Manage fleet actions: +// +// StartFleetActions +// +// StopFleetActions +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation StartFleetActions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The client failed authentication. Clients should not retry such requests. +// +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StartFleetActions +func (c *GameLift) StartFleetActions(input *StartFleetActionsInput) (*StartFleetActionsOutput, error) { + req, out := c.StartFleetActionsRequest(input) + return out, req.Send() +} + +// StartFleetActionsWithContext is the same as StartFleetActions with the addition of +// the ability to pass a context and additional request options. +// +// See StartFleetActions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) StartFleetActionsWithContext(ctx aws.Context, input *StartFleetActionsInput, opts ...request.Option) (*StartFleetActionsOutput, error) { + req, out := c.StartFleetActionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartGameSessionPlacement = "StartGameSessionPlacement" // StartGameSessionPlacementRequest generates a "aws/request.Request" representing the @@ -6809,6 +6884,107 @@ func (c *GameLift) StartMatchmakingWithContext(ctx aws.Context, input *StartMatc return out, req.Send() } +const opStopFleetActions = "StopFleetActions" + +// StopFleetActionsRequest generates a "aws/request.Request" representing the +// client's request for the StopFleetActions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopFleetActions for more information on using the StopFleetActions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopFleetActionsRequest method. +// req, resp := client.StopFleetActionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopFleetActions +func (c *GameLift) StopFleetActionsRequest(input *StopFleetActionsInput) (req *request.Request, output *StopFleetActionsOutput) { + op := &request.Operation{ + Name: opStopFleetActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopFleetActionsInput{} + } + + output = &StopFleetActionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopFleetActions API operation for Amazon GameLift. +// +// Suspends activity on a fleet. Currently, this operation is used to stop a +// fleet's auto-scaling activity. It is used to temporarily stop scaling events +// triggered by the fleet's scaling policies. The policies can be retained and +// auto-scaling activity can be restarted using StartFleetActions. You can view +// a fleet's stopped actions using DescribeFleetAttributes. +// +// To stop fleet actions, specify the fleet ID and the type of actions to suspend. +// When auto-scaling fleet actions are stopped, Amazon GameLift no longer initiates +// scaling events except to maintain the fleet's desired instances setting (FleetCapacity. +// Changes to the fleet's capacity must be done manually using UpdateFleetCapacity. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon GameLift's +// API operation StopFleetActions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// The service encountered an unrecoverable internal failure while processing +// the request. Clients can retry such requests immediately or after a waiting +// period. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// One or more parameter values in the request are invalid. Correct the invalid +// parameter values before retrying. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The client failed authentication. Clients should not retry such requests. +// +// * ErrCodeNotFoundException "NotFoundException" +// A service resource associated with the request could not be found. Clients +// should not retry such requests. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/StopFleetActions +func (c *GameLift) StopFleetActions(input *StopFleetActionsInput) (*StopFleetActionsOutput, error) { + req, out := c.StopFleetActionsRequest(input) + return out, req.Send() +} + +// StopFleetActionsWithContext is the same as StopFleetActions with the addition of +// the ability to pass a context and additional request options. +// +// See StopFleetActions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GameLift) StopFleetActionsWithContext(ctx aws.Context, input *StopFleetActionsInput, opts ...request.Option) (*StopFleetActionsOutput, error) { + req, out := c.StopFleetActionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStopGameSessionPlacement = "StopGameSessionPlacement" // StopGameSessionPlacementRequest generates a "aws/request.Request" representing the @@ -7301,16 +7477,22 @@ func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInpu // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -7323,21 +7505,11 @@ func (c *GameLift) UpdateFleetAttributesRequest(input *UpdateFleetAttributesInpu // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) +// * Manage fleet actions: // -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions // // 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 @@ -7448,9 +7620,10 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // this action, you may want to call DescribeEC2InstanceLimits to get the maximum // capacity based on the fleet's EC2 instance type. // -// If you're using autoscaling (see PutScalingPolicy), you may want to specify -// a minimum and/or maximum capacity. If you don't provide these, autoscaling -// can set capacity anywhere between zero and the service limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_gamelift). +// Specify minimum and maximum number of instances. Amazon GameLift will not +// change fleet capacity to values fall outside of this range. This is particularly +// important when using auto-scaling (see PutScalingPolicy) to allow capacity +// to adjust based on player demand while imposing limits on automatic adjustments. // // To update fleet capacity, specify the fleet ID and the number of instances // you want the fleet to host. If successful, Amazon GameLift starts or terminates @@ -7465,16 +7638,22 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -7487,21 +7666,11 @@ func (c *GameLift) UpdateFleetCapacityRequest(input *UpdateFleetCapacityInput) ( // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeScalingPolicies (automatic scaling) +// StartFleetActions // -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -7620,16 +7789,22 @@ func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettings // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -7642,21 +7817,11 @@ func (c *GameLift) UpdateFleetPortSettingsRequest(input *UpdateFleetPortSettings // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeScalingPolicies (automatic scaling) +// StartFleetActions // -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -8129,16 +8294,22 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -8151,21 +8322,11 @@ func (c *GameLift) UpdateRuntimeConfigurationRequest(input *UpdateRuntimeConfigu // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) +// * Manage fleet actions: // -// DeleteScalingPolicy (automatic scaling) +// StartFleetActions // -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions // // 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 @@ -12702,16 +12863,22 @@ func (s *DesiredPlayerSession) SetPlayerId(v string) *DesiredPlayerSession { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -12724,21 +12891,11 @@ func (s *DesiredPlayerSession) SetPlayerId(v string) *DesiredPlayerSession { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeScalingPolicies (automatic scaling) +// StartFleetActions // -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type EC2InstanceCounts struct { _ struct{} `type:"structure"` @@ -13042,16 +13199,22 @@ func (s *Event) SetResourceId(v string) *Event { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -13064,21 +13227,11 @@ func (s *Event) SetResourceId(v string) *Event { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions type FleetAttributes struct { _ struct{} `type:"structure"` @@ -13178,6 +13331,10 @@ type FleetAttributes struct { // * TERMINATED -- The fleet no longer exists. Status *string `type:"string" enum:"FleetStatus"` + // List of fleet actions that have been suspended using StopFleetActions. This + // includes auto-scaling. + StoppedActions []*string `min:"1" type:"list"` + // Time stamp indicating when this data object was terminated. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). TerminationTime *time.Time `type:"timestamp" timestampFormat:"unix"` @@ -13289,6 +13446,12 @@ func (s *FleetAttributes) SetStatus(v string) *FleetAttributes { return s } +// SetStoppedActions sets the StoppedActions field's value. +func (s *FleetAttributes) SetStoppedActions(v []*string) *FleetAttributes { + s.StoppedActions = v + return s +} + // SetTerminationTime sets the TerminationTime field's value. func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { s.TerminationTime = &v @@ -13306,16 +13469,22 @@ func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -13328,21 +13497,11 @@ func (s *FleetAttributes) SetTerminationTime(v time.Time) *FleetAttributes { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity +// * Manage fleet actions: // -// PutScalingPolicy (automatic scaling) +// StartFleetActions // -// DescribeScalingPolicies (automatic scaling) -// -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type FleetCapacity struct { _ struct{} `type:"structure"` @@ -13397,16 +13556,22 @@ func (s *FleetCapacity) SetInstanceType(v string) *FleetCapacity { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -13419,21 +13584,11 @@ func (s *FleetCapacity) SetInstanceType(v string) *FleetCapacity { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) +// * Manage fleet actions: // -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions type FleetUtilization struct { _ struct{} `type:"structure"` @@ -13625,7 +13780,7 @@ type GameSession struct { IpAddress *string `type:"string"` // Information about the matchmaking process that was used to create the game - // session. It is in JSON syntax, formated as a string. In addition the matchmaking + // session. It is in JSON syntax, formatted as a string. In addition the matchmaking // configuration used, it contains data on all players assigned to the match, // including player attributes and team assignments. For more details on matchmaker // data, see Match Data (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). @@ -13924,7 +14079,7 @@ type GameSessionPlacement struct { IpAddress *string `type:"string"` // Information on the matchmaking process for this game. Data is in JSON syntax, - // formated as a string. It identifies the matchmaking configuration used to + // formatted as a string. It identifies the matchmaking configuration used to // create the match, and contains data on all players assigned to the match, // including player attributes and team assignments. For more details on matchmaker // data, see Match Data (http://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-data). @@ -15834,41 +15989,54 @@ type PutScalingPolicyInput struct { // Comparison operator to use when measuring the metric against the threshold // value. - // - // ComparisonOperator is a required field - ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperatorType"` + ComparisonOperator *string `type:"string" enum:"ComparisonOperatorType"` // Length of time (in minutes) the metric must be at or beyond the threshold // before a scaling event is triggered. - // - // EvaluationPeriods is a required field - EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"` + EvaluationPeriods *int64 `min:"1" type:"integer"` - // Unique identifier for a fleet to apply this policy to. + // Unique identifier for a fleet to apply this policy to. The fleet cannot be + // in any of the following statuses: ERROR or DELETING. // // FleetId is a required field FleetId *string `type:"string" required:"true"` - // Name of the Amazon GameLift-defined metric that is used to trigger an adjustment. + // Name of the Amazon GameLift-defined metric that is used to trigger a scaling + // adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon + // GameLift with Amazon CloudWatch (http://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html). + // + // * ActivatingGameSessions -- Game sessions in the process of being created. + // + // * ActiveGameSessions -- Game sessions that are currently running. + // + // * ActiveInstances -- Fleet instances that are currently running at least + // one game session. // - // * ActivatingGameSessions -- number of game sessions in the process of - // being created (game session status = ACTIVATING). + // * AvailableGameSessions -- Additional game sessions that fleet could host + // simultaneously, given current capacity. // - // * ActiveGameSessions -- number of game sessions currently running (game - // session status = ACTIVE). + // * AvailablePlayerSessions -- Empty player slots in currently active game + // sessions. This includes game sessions that are not currently accepting + // players. Reserved player slots are not included. // - // * CurrentPlayerSessions -- number of active or reserved player sessions - // (player session status = ACTIVE or RESERVED). + // * CurrentPlayerSessions -- Player slots in active game sessions that are + // being used by a player or are reserved for a player. // - // * AvailablePlayerSessions -- number of player session slots currently - // available in active game sessions across the fleet, calculated by subtracting - // a game session's current player session count from its maximum player - // session count. This number includes game sessions that are not currently - // accepting players (game session PlayerSessionCreationPolicy = DENY_ALL). + // * IdleInstances -- Active instances that are currently hosting zero game + // sessions. // - // * ActiveInstances -- number of instances currently running a game session. + // * PercentAvailableGameSessions -- Unused percentage of the total number + // of game sessions that a fleet could host simultaneously, given current + // capacity. Use this metric for a target-based scaling policy. // - // * IdleInstances -- number of instances not currently running a game session. + // * PercentIdleInstances -- Percentage of the total number of active instances + // that are hosting zero game sessions. + // + // * QueueDepth -- Pending game session placement requests, in any queue, + // where the current fleet is the top-priority destination. + // + // * WaitTime -- Current wait time for pending game session placement requests, + // in any queue, where the current fleet is the top-priority destination. // // MetricName is a required field MetricName *string `type:"string" required:"true" enum:"MetricName"` @@ -15880,10 +16048,14 @@ type PutScalingPolicyInput struct { // Name is a required field Name *string `min:"1" type:"string" required:"true"` + // Type of scaling policy to create. For a target-based policy, set the parameter + // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. + // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, + // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. + PolicyType *string `type:"string" enum:"PolicyType"` + // Amount of adjustment to make, based on the scaling adjustment type. - // - // ScalingAdjustment is a required field - ScalingAdjustment *int64 `type:"integer" required:"true"` + ScalingAdjustment *int64 `type:"integer"` // Type of adjustment to make to a fleet's instance count (see FleetCapacity): // @@ -15897,14 +16069,13 @@ type PutScalingPolicyInput struct { // by the scaling adjustment, read as a percentage. Positive values scale // up while negative values scale down; for example, a value of "-10" scales // the fleet down by 10%. - // - // ScalingAdjustmentType is a required field - ScalingAdjustmentType *string `type:"string" required:"true" enum:"ScalingAdjustmentType"` + ScalingAdjustmentType *string `type:"string" enum:"ScalingAdjustmentType"` + + // Object that contains settings for a target-based scaling policy. + TargetConfiguration *TargetConfiguration `type:"structure"` // Metric value used to trigger a scaling event. - // - // Threshold is a required field - Threshold *float64 `type:"double" required:"true"` + Threshold *float64 `type:"double"` } // String returns the string representation @@ -15920,12 +16091,6 @@ func (s PutScalingPolicyInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PutScalingPolicyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"} - if s.ComparisonOperator == nil { - invalidParams.Add(request.NewErrParamRequired("ComparisonOperator")) - } - if s.EvaluationPeriods == nil { - invalidParams.Add(request.NewErrParamRequired("EvaluationPeriods")) - } if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 { invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1)) } @@ -15941,14 +16106,10 @@ func (s *PutScalingPolicyInput) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } - if s.ScalingAdjustment == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment")) - } - if s.ScalingAdjustmentType == nil { - invalidParams.Add(request.NewErrParamRequired("ScalingAdjustmentType")) - } - if s.Threshold == nil { - invalidParams.Add(request.NewErrParamRequired("Threshold")) + if s.TargetConfiguration != nil { + if err := s.TargetConfiguration.Validate(); err != nil { + invalidParams.AddNested("TargetConfiguration", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -15987,6 +16148,12 @@ func (s *PutScalingPolicyInput) SetName(v string) *PutScalingPolicyInput { return s } +// SetPolicyType sets the PolicyType field's value. +func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput { + s.PolicyType = &v + return s +} + // SetScalingAdjustment sets the ScalingAdjustment field's value. func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput { s.ScalingAdjustment = &v @@ -15999,6 +16166,12 @@ func (s *PutScalingPolicyInput) SetScalingAdjustmentType(v string) *PutScalingPo return s } +// SetTargetConfiguration sets the TargetConfiguration field's value. +func (s *PutScalingPolicyInput) SetTargetConfiguration(v *TargetConfiguration) *PutScalingPolicyInput { + s.TargetConfiguration = v + return s +} + // SetThreshold sets the Threshold field's value. func (s *PutScalingPolicyInput) SetThreshold(v float64) *PutScalingPolicyInput { s.Threshold = &v @@ -16219,16 +16392,22 @@ func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *Resourc // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -16241,21 +16420,11 @@ func (s *ResourceCreationLimitPolicy) SetPolicyPeriodInMinutes(v int64) *Resourc // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeScalingPolicies (automatic scaling) +// StartFleetActions // -// DeleteScalingPolicy (automatic scaling) -// -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type RoutingStrategy struct { _ struct{} `type:"structure"` @@ -16334,16 +16503,22 @@ func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { // // * ListFleets // +// * DeleteFleet +// // * Describe fleets: // // DescribeFleetAttributes // +// DescribeFleetCapacity +// // DescribeFleetPortSettings // // DescribeFleetUtilization // // DescribeRuntimeConfiguration // +// DescribeEC2InstanceLimits +// // DescribeFleetEvents // // * Update fleets: @@ -16356,21 +16531,11 @@ func (s *RoutingStrategy) SetType(v string) *RoutingStrategy { // // UpdateRuntimeConfiguration // -// * Manage fleet capacity: -// -// DescribeFleetCapacity -// -// UpdateFleetCapacity -// -// PutScalingPolicy (automatic scaling) -// -// DescribeScalingPolicies (automatic scaling) +// * Manage fleet actions: // -// DeleteScalingPolicy (automatic scaling) +// StartFleetActions // -// DescribeEC2InstanceLimits -// -// * DeleteFleet +// StopFleetActions type RuntimeConfiguration struct { _ struct{} `type:"structure"` @@ -16514,49 +16679,27 @@ func (s *S3Location) SetRoleArn(v string) *S3Location { // Rule that controls how a fleet is scaled. Scaling policies are uniquely identified // by the combination of name and fleet ID. // -// Fleet-related operations include: -// -// * CreateFleet -// -// * ListFleets -// -// * Describe fleets: -// -// DescribeFleetAttributes -// -// DescribeFleetPortSettings -// -// DescribeFleetUtilization -// -// DescribeRuntimeConfiguration -// -// DescribeFleetEvents -// -// * Update fleets: -// -// UpdateFleetAttributes -// -// UpdateFleetCapacity +// Operations related to fleet capacity scaling include: // -// UpdateFleetPortSettings +// * DescribeFleetCapacity // -// UpdateRuntimeConfiguration +// * UpdateFleetCapacity // -// * Manage fleet capacity: +// * DescribeEC2InstanceLimits // -// DescribeFleetCapacity +// * Manage scaling policies: // -// UpdateFleetCapacity +// PutScalingPolicy (auto-scaling) // -// PutScalingPolicy (automatic scaling) +// DescribeScalingPolicies (auto-scaling) // -// DescribeScalingPolicies (automatic scaling) +// DeleteScalingPolicy (auto-scaling) // -// DeleteScalingPolicy (automatic scaling) +// * Manage fleet actions: // -// DescribeEC2InstanceLimits +// StartFleetActions // -// * DeleteFleet +// StopFleetActions type ScalingPolicy struct { _ struct{} `type:"structure"` @@ -16571,32 +16714,54 @@ type ScalingPolicy struct { // Unique identifier for a fleet that is associated with this scaling policy. FleetId *string `type:"string"` - // Name of the Amazon GameLift-defined metric that is used to trigger an adjustment. + // Name of the Amazon GameLift-defined metric that is used to trigger a scaling + // adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon + // GameLift with Amazon CloudWatch (http://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html). + // + // * ActivatingGameSessions -- Game sessions in the process of being created. + // + // * ActiveGameSessions -- Game sessions that are currently running. + // + // * ActiveInstances -- Fleet instances that are currently running at least + // one game session. + // + // * AvailableGameSessions -- Additional game sessions that fleet could host + // simultaneously, given current capacity. // - // * ActivatingGameSessions -- number of game sessions in the process of - // being created (game session status = ACTIVATING). + // * AvailablePlayerSessions -- Empty player slots in currently active game + // sessions. This includes game sessions that are not currently accepting + // players. Reserved player slots are not included. // - // * ActiveGameSessions -- number of game sessions currently running (game - // session status = ACTIVE). + // * CurrentPlayerSessions -- Player slots in active game sessions that are + // being used by a player or are reserved for a player. // - // * CurrentPlayerSessions -- number of active or reserved player sessions - // (player session status = ACTIVE or RESERVED). + // * IdleInstances -- Active instances that are currently hosting zero game + // sessions. // - // * AvailablePlayerSessions -- number of player session slots currently - // available in active game sessions across the fleet, calculated by subtracting - // a game session's current player session count from its maximum player - // session count. This number does include game sessions that are not currently - // accepting players (game session PlayerSessionCreationPolicy = DENY_ALL). + // * PercentAvailableGameSessions -- Unused percentage of the total number + // of game sessions that a fleet could host simultaneously, given current + // capacity. Use this metric for a target-based scaling policy. // - // * ActiveInstances -- number of instances currently running a game session. + // * PercentIdleInstances -- Percentage of the total number of active instances + // that are hosting zero game sessions. // - // * IdleInstances -- number of instances not currently running a game session. + // * QueueDepth -- Pending game session placement requests, in any queue, + // where the current fleet is the top-priority destination. + // + // * WaitTime -- Current wait time for pending game session placement requests, + // in any queue, where the current fleet is the top-priority destination. MetricName *string `type:"string" enum:"MetricName"` // Descriptive label that is associated with a scaling policy. Policy names // do not need to be unique. Name *string `min:"1" type:"string"` + // Type of scaling policy to create. For a target-based policy, set the parameter + // MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. + // For a rule-based policy set the following parameters: MetricName, ComparisonOperator, + // Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment. + PolicyType *string `type:"string" enum:"PolicyType"` + // Amount of adjustment to make, based on the scaling adjustment type. ScalingAdjustment *int64 `type:"integer"` @@ -16613,10 +16778,12 @@ type ScalingPolicy struct { // up while negative values scale down. ScalingAdjustmentType *string `type:"string" enum:"ScalingAdjustmentType"` - // Current status of the scaling policy. The scaling policy is only in force - // when in an ACTIVE status. + // Current status of the scaling policy. The scaling policy can be in force + // only when in an ACTIVE status. Scaling policies can be suspended for individual + // fleets (see StopFleetActions; if suspended for a fleet, the policy status + // does not change. View a fleet's stopped actions by calling DescribeFleetCapacity. // - // * ACTIVE -- The scaling policy is currently in force. + // * ACTIVE -- The scaling policy can be used for auto-scaling a fleet. // // * UPDATE_REQUESTED -- A request to update the scaling policy has been // received. @@ -16634,6 +16801,9 @@ type ScalingPolicy struct { // and recreated. Status *string `type:"string" enum:"ScalingStatusType"` + // Object that contains settings for a target-based scaling policy. + TargetConfiguration *TargetConfiguration `type:"structure"` + // Metric value used to trigger a scaling event. Threshold *float64 `type:"double"` } @@ -16678,6 +16848,12 @@ func (s *ScalingPolicy) SetName(v string) *ScalingPolicy { return s } +// SetPolicyType sets the PolicyType field's value. +func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy { + s.PolicyType = &v + return s +} + // SetScalingAdjustment sets the ScalingAdjustment field's value. func (s *ScalingPolicy) SetScalingAdjustment(v int64) *ScalingPolicy { s.ScalingAdjustment = &v @@ -16696,6 +16872,12 @@ func (s *ScalingPolicy) SetStatus(v string) *ScalingPolicy { return s } +// SetTargetConfiguration sets the TargetConfiguration field's value. +func (s *ScalingPolicy) SetTargetConfiguration(v *TargetConfiguration) *ScalingPolicy { + s.TargetConfiguration = v + return s +} + // SetThreshold sets the Threshold field's value. func (s *ScalingPolicy) SetThreshold(v float64) *ScalingPolicy { s.Threshold = &v @@ -16967,6 +17149,75 @@ func (s *ServerProcess) SetParameters(v string) *ServerProcess { return s } +type StartFleetActionsInput struct { + _ struct{} `type:"structure"` + + // List of actions to restart on the fleet. + // + // Actions is a required field + Actions []*string `min:"1" type:"list" required:"true"` + + // Unique identifier for a fleet + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartFleetActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartFleetActionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartFleetActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartFleetActionsInput"} + if s.Actions == nil { + invalidParams.Add(request.NewErrParamRequired("Actions")) + } + if s.Actions != nil && len(s.Actions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Actions", 1)) + } + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActions sets the Actions field's value. +func (s *StartFleetActionsInput) SetActions(v []*string) *StartFleetActionsInput { + s.Actions = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *StartFleetActionsInput) SetFleetId(v string) *StartFleetActionsInput { + s.FleetId = &v + return s +} + +type StartFleetActionsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartFleetActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartFleetActionsOutput) GoString() string { + return s.String() +} + // Represents the input for a request action. type StartGameSessionPlacementInput struct { _ struct{} `type:"structure"` @@ -17410,6 +17661,75 @@ func (s *StartMatchmakingOutput) SetMatchmakingTicket(v *MatchmakingTicket) *Sta return s } +type StopFleetActionsInput struct { + _ struct{} `type:"structure"` + + // List of actions to suspend on the fleet. + // + // Actions is a required field + Actions []*string `min:"1" type:"list" required:"true"` + + // Unique identifier for a fleet + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StopFleetActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopFleetActionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopFleetActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopFleetActionsInput"} + if s.Actions == nil { + invalidParams.Add(request.NewErrParamRequired("Actions")) + } + if s.Actions != nil && len(s.Actions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Actions", 1)) + } + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActions sets the Actions field's value. +func (s *StopFleetActionsInput) SetActions(v []*string) *StopFleetActionsInput { + s.Actions = v + return s +} + +// SetFleetId sets the FleetId field's value. +func (s *StopFleetActionsInput) SetFleetId(v string) *StopFleetActionsInput { + s.FleetId = &v + return s +} + +type StopFleetActionsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopFleetActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopFleetActionsOutput) GoString() string { + return s.String() +} + // Represents the input for a request action. type StopGameSessionPlacementInput struct { _ struct{} `type:"structure"` @@ -17533,6 +17853,76 @@ func (s StopMatchmakingOutput) GoString() string { return s.String() } +// Settings for a target-based scaling policy (see ScalingPolicy. A target-based +// policy tracks a particular fleet metric specifies a target value for the +// metric. As player usage changes, the policy triggers Amazon GameLift to adjust +// capacity so that the metric returns to the target value. The target configuration +// specifies settings as needed for the target based policy, including the target +// value. +// +// Operations related to fleet capacity scaling include: +// +// * DescribeFleetCapacity +// +// * UpdateFleetCapacity +// +// * DescribeEC2InstanceLimits +// +// * Manage scaling policies: +// +// PutScalingPolicy (auto-scaling) +// +// DescribeScalingPolicies (auto-scaling) +// +// DeleteScalingPolicy (auto-scaling) +// +// * Manage fleet actions: +// +// StartFleetActions +// +// StopFleetActions +type TargetConfiguration struct { + _ struct{} `type:"structure"` + + // Desired value to use with a target-based scaling policy. The value must be + // relevant for whatever metric the scaling policy is using. For example, in + // a policy using the metric PercentAvailableGameSessions, the target value + // should be the preferred size of the fleet's buffer (the percent of capacity + // that should be idle and ready for new game sessions). + // + // TargetValue is a required field + TargetValue *float64 `type:"double" required:"true"` +} + +// String returns the string representation +func (s TargetConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetConfiguration"} + if s.TargetValue == nil { + invalidParams.Add(request.NewErrParamRequired("TargetValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetValue sets the TargetValue field's value. +func (s *TargetConfiguration) SetTargetValue(v float64) *TargetConfiguration { + s.TargetValue = &v + return s +} + // Represents the input for a request action. type UpdateAliasInput struct { _ struct{} `type:"structure"` @@ -19090,6 +19480,11 @@ const ( EventCodeInstanceInterrupted = "INSTANCE_INTERRUPTED" ) +const ( + // FleetActionAutoScaling is a FleetAction enum value + FleetActionAutoScaling = "AUTO_SCALING" +) + const ( // FleetStatusNew is a FleetStatus enum value FleetStatusNew = "NEW" @@ -19273,6 +19668,14 @@ const ( PlayerSessionStatusTimedout = "TIMEDOUT" ) +const ( + // PolicyTypeRuleBased is a PolicyType enum value + PolicyTypeRuleBased = "RuleBased" + + // PolicyTypeTargetBased is a PolicyType enum value + PolicyTypeTargetBased = "TargetBased" +) + const ( // ProtectionPolicyNoProtection is a ProtectionPolicy enum value ProtectionPolicyNoProtection = "NoProtection" diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go index 0e2d3bdaafd..def8e05107d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go @@ -17,7 +17,7 @@ // a game session. // // * Configure and manage game server resources -- Manage builds, fleets, -// queues, and aliases; set autoscaling policies; retrieve logs and metrics. +// queues, and aliases; set auto-scaling 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: @@ -188,16 +188,20 @@ // 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. +// Autoscale -- Manage auto-scaling rules and apply them to a fleet. // -// PutScalingPolicy -- Create a new autoscaling policy, or update an existing +// PutScalingPolicy -- Create a new auto-scaling policy, or update an existing // one. // -// DescribeScalingPolicies -- Retrieve an existing autoscaling policy. +// DescribeScalingPolicies -- Retrieve an existing auto-scaling policy. // -// DeleteScalingPolicy -- Delete an autoscaling policy and stop it from affecting +// DeleteScalingPolicy -- Delete an auto-scaling policy and stop it from affecting // a fleet's capacity. // +// StartFleetActions -- Restart a fleet's auto-scaling policies. +// +// StopFleetActions -- Suspend a fleet's auto-scaling policies. +// // * Manage VPC peering connections for fleets // // CreateVpcPeeringAuthorization -- Authorize a peering connection to one of diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 4ec0b408685..66002f1a88e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -72,14 +72,14 @@ func (c *RDS) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *re // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBClusterRoleAlreadyExistsFault "DBClusterRoleAlreadyExists" // The specified IAM role Amazon Resource Name (ARN) is already associated with // the specified DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeDBClusterRoleQuotaExceededFault "DBClusterRoleQuotaExceeded" // You have exceeded the maximum number of IAM roles that can be associated @@ -251,13 +251,13 @@ func (c *RDS) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddTagsToResource func (c *RDS) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { @@ -428,17 +428,17 @@ func (c *RDS) AuthorizeDBSecurityGroupIngressRequest(input *AuthorizeDBSecurityG // // Returned Error Codes: // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeAuthorizationAlreadyExistsFault "AuthorizationAlreadyExists" -// The specified CIDRIP or EC2 security group is already authorized for the -// specified DB security group. +// The specified CIDRIP or Amazon EC2 security group is already authorized for +// the specified DB security group. // // * ErrCodeAuthorizationQuotaExceededFault "AuthorizationQuotaExceeded" -// DB security group authorization quota has been reached. +// The DB security group authorization quota has been reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AuthorizeDBSecurityGroupIngress func (c *RDS) AuthorizeDBSecurityGroupIngress(input *AuthorizeDBSecurityGroupIngressInput) (*AuthorizeDBSecurityGroupIngressOutput, error) { @@ -462,6 +462,92 @@ func (c *RDS) AuthorizeDBSecurityGroupIngressWithContext(ctx aws.Context, input return out, req.Send() } +const opBacktrackDBCluster = "BacktrackDBCluster" + +// BacktrackDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the BacktrackDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BacktrackDBCluster for more information on using the BacktrackDBCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BacktrackDBClusterRequest method. +// req, resp := client.BacktrackDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster +func (c *RDS) BacktrackDBClusterRequest(input *BacktrackDBClusterInput) (req *request.Request, output *BacktrackDBClusterOutput) { + op := &request.Operation{ + Name: opBacktrackDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BacktrackDBClusterInput{} + } + + output = &BacktrackDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// BacktrackDBCluster API operation for Amazon Relational Database Service. +// +// Backtracks a DB cluster to a specific time, without creating a new DB cluster. +// +// For more information on backtracking, see Backtracking an Aurora DB Cluster +// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Managing.Backtrack.html) +// in the Amazon RDS User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation BacktrackDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster +func (c *RDS) BacktrackDBCluster(input *BacktrackDBClusterInput) (*BacktrackDBClusterOutput, error) { + req, out := c.BacktrackDBClusterRequest(input) + return out, req.Send() +} + +// BacktrackDBClusterWithContext is the same as BacktrackDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See BacktrackDBCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) BacktrackDBClusterWithContext(ctx aws.Context, input *BacktrackDBClusterInput, opts ...request.Option) (*BacktrackDBClusterOutput, error) { + req, out := c.BacktrackDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" // CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the @@ -517,10 +603,10 @@ func (c *RDS) CopyDBClusterParameterGroupRequest(input *CopyDBClusterParameterGr // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" @@ -665,22 +751,22 @@ func (c *RDS) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (r // // Returned Error Codes: // * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. +// The user already has a DB cluster snapshot with the given identifier. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBClusterSnapshot func (c *RDS) CopyDBClusterSnapshot(input *CopyDBClusterSnapshotInput) (*CopyDBClusterSnapshotOutput, error) { @@ -759,13 +845,13 @@ func (c *RDS) CopyDBParameterGroupRequest(input *CopyDBParameterGroupInput) (req // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" // A DB parameter group with the same name exists. // // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBParameterGroup @@ -856,16 +942,16 @@ func (c *RDS) CopyDBSnapshotRequest(input *CopyDBSnapshotInput) (req *request.Re // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CopyDBSnapshot func (c *RDS) CopyDBSnapshot(input *CopyDBSnapshotInput) (*CopyDBSnapshotOutput, error) { @@ -1037,53 +1123,53 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -1193,7 +1279,7 @@ func (c *RDS) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParamet // // Returned Error Codes: // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" @@ -1278,19 +1364,19 @@ func (c *RDS) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput // // Returned Error Codes: // * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. +// The user already has a DB cluster snapshot with the given identifier. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterSnapshot func (c *RDS) CreateDBClusterSnapshot(input *CreateDBClusterSnapshotInput) (*CreateDBClusterSnapshotOutput, error) { @@ -1369,42 +1455,42 @@ func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones // unless there is only one Availability Zone. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -1413,23 +1499,23 @@ func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *reques // The specified option group could not be found. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance func (c *RDS) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { @@ -1520,33 +1606,33 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -1557,8 +1643,8 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -1567,18 +1653,18 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // The specified option group could not be found. // // * ErrCodeDBSubnetGroupNotAllowedFault "DBSubnetGroupNotAllowedFault" -// Indicates that the DBSubnetGroup should not be specified while creating read -// replicas that lie in the same region as the source instance. +// The DBSubnetGroup shouldn't be specified while creating read replicas that +// lie in the same region as the source instance. // // * ErrCodeInvalidDBSubnetGroupFault "InvalidDBSubnetGroupFault" -// Indicates the DBSubnetGroup does not belong to the same VPC as that of an -// existing cross region read replica of the same source instance. +// The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region +// read replica of the same source instance. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstanceReadReplica func (c *RDS) CreateDBInstanceReadReplica(input *CreateDBInstanceReadReplicaInput) (*CreateDBInstanceReadReplicaOutput, error) { @@ -1677,7 +1763,7 @@ func (c *RDS) CreateDBParameterGroupRequest(input *CreateDBParameterGroupInput) // // Returned Error Codes: // * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB parameter +// The request would result in the user exceeding the allowed number of DB parameter // groups. // // * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" @@ -1765,11 +1851,11 @@ func (c *RDS) CreateDBSecurityGroupRequest(input *CreateDBSecurityGroupInput) (r // exists. // // * ErrCodeDBSecurityGroupQuotaExceededFault "QuotaExceeded.DBSecurityGroup" -// Request would result in user exceeding the allowed number of DB security +// The request would result in the user exceeding the allowed number of DB security // groups. // // * ErrCodeDBSecurityGroupNotSupportedFault "DBSecurityGroupNotSupported" -// A DB security group is not allowed for this action. +// A DB security group isn't allowed for this action. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSecurityGroup func (c *RDS) CreateDBSecurityGroup(input *CreateDBSecurityGroupInput) (*CreateDBSecurityGroupOutput, error) { @@ -1851,13 +1937,13 @@ func (c *RDS) CreateDBSnapshotRequest(input *CreateDBSnapshotInput) (req *reques // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBSnapshot func (c *RDS) CreateDBSnapshot(input *CreateDBSnapshotInput) (*CreateDBSnapshotOutput, error) { @@ -1940,11 +2026,12 @@ func (c *RDS) CreateDBSubnetGroupRequest(input *CreateDBSubnetGroupInput) (req * // DBSubnetGroupName is already used by an existing DB subnet group. // // * ErrCodeDBSubnetGroupQuotaExceededFault "DBSubnetGroupQuotaExceeded" -// Request would result in user exceeding the allowed number of DB subnet groups. +// The request would result in the user exceeding the allowed number of DB subnet +// groups. // // * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// Request would result in user exceeding the allowed number of subnets in a -// DB subnet groups. +// The request would result in the user exceeding the allowed number of subnets +// in a DB subnet groups. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -2232,19 +2319,19 @@ func (c *RDS) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request. // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" -// User already has a DB cluster snapshot with the given identifier. +// The user already has a DB cluster snapshot with the given identifier. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBCluster func (c *RDS) DeleteDBCluster(input *DeleteDBClusterInput) (*DeleteDBClusterOutput, error) { @@ -2330,11 +2417,11 @@ func (c *RDS) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParamet // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterParameterGroup func (c *RDS) DeleteDBClusterParameterGroup(input *DeleteDBClusterParameterGroupInput) (*DeleteDBClusterParameterGroupOutput, error) { @@ -2419,10 +2506,10 @@ func (c *RDS) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput // // Returned Error Codes: // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterSnapshot func (c *RDS) DeleteDBClusterSnapshot(input *DeleteDBClusterSnapshotInput) (*DeleteDBClusterSnapshotOutput, error) { @@ -2525,19 +2612,19 @@ func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstance func (c *RDS) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { @@ -2620,11 +2707,11 @@ func (c *RDS) DeleteDBParameterGroupRequest(input *DeleteDBParameterGroupInput) // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBParameterGroup func (c *RDS) DeleteDBParameterGroup(input *DeleteDBParameterGroupInput) (*DeleteDBParameterGroupOutput, error) { @@ -2707,10 +2794,10 @@ func (c *RDS) DeleteDBSecurityGroupRequest(input *DeleteDBSecurityGroupInput) (r // // Returned Error Codes: // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSecurityGroup func (c *RDS) DeleteDBSecurityGroup(input *DeleteDBSecurityGroupInput) (*DeleteDBSecurityGroupOutput, error) { @@ -2792,10 +2879,10 @@ func (c *RDS) DeleteDBSnapshotRequest(input *DeleteDBSnapshotInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSnapshot func (c *RDS) DeleteDBSnapshot(input *DeleteDBSnapshotInput) (*DeleteDBSnapshotOutput, error) { @@ -2878,13 +2965,13 @@ func (c *RDS) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req * // // Returned Error Codes: // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidDBSubnetStateFault "InvalidDBSubnetStateFault" -// The DB subnet is not in the available state. +// The DB subnet isn't in the available state. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBSubnetGroup func (c *RDS) DeleteDBSubnetGroup(input *DeleteDBSubnetGroupInput) (*DeleteDBSubnetGroupOutput, error) { @@ -3051,7 +3138,7 @@ func (c *RDS) DeleteOptionGroupRequest(input *DeleteOptionGroupInput) (req *requ // The specified option group could not be found. // // * ErrCodeInvalidOptionGroupStateFault "InvalidOptionGroupStateFault" -// The option group is not in the available state. +// The option group isn't in the available state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteOptionGroup func (c *RDS) DeleteOptionGroup(input *DeleteOptionGroupInput) (*DeleteOptionGroupOutput, error) { @@ -3209,7 +3296,7 @@ func (c *RDS) DescribeCertificatesRequest(input *DescribeCertificatesInput) (req // // Returned Error Codes: // * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier does not refer to an existing certificate. +// CertificateIdentifier doesn't refer to an existing certificate. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeCertificates func (c *RDS) DescribeCertificates(input *DescribeCertificatesInput) (*DescribeCertificatesOutput, error) { @@ -3233,6 +3320,91 @@ func (c *RDS) DescribeCertificatesWithContext(ctx aws.Context, input *DescribeCe return out, req.Send() } +const opDescribeDBClusterBacktracks = "DescribeDBClusterBacktracks" + +// DescribeDBClusterBacktracksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterBacktracks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBClusterBacktracks for more information on using the DescribeDBClusterBacktracks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBClusterBacktracksRequest method. +// req, resp := client.DescribeDBClusterBacktracksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks +func (c *RDS) DescribeDBClusterBacktracksRequest(input *DescribeDBClusterBacktracksInput) (req *request.Request, output *DescribeDBClusterBacktracksOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterBacktracks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterBacktracksInput{} + } + + output = &DescribeDBClusterBacktracksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterBacktracks API operation for Amazon Relational Database Service. +// +// Returns information about backtracks for a DB cluster. +// +// For more information on Amazon Aurora, see Aurora on Amazon RDS (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html) +// in the Amazon RDS User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation DescribeDBClusterBacktracks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeDBClusterBacktrackNotFoundFault "DBClusterBacktrackNotFoundFault" +// BacktrackIdentifier doesn't refer to an existing backtrack. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterBacktracks +func (c *RDS) DescribeDBClusterBacktracks(input *DescribeDBClusterBacktracksInput) (*DescribeDBClusterBacktracksOutput, error) { + req, out := c.DescribeDBClusterBacktracksRequest(input) + return out, req.Send() +} + +// DescribeDBClusterBacktracksWithContext is the same as DescribeDBClusterBacktracks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterBacktracks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) DescribeDBClusterBacktracksWithContext(ctx aws.Context, input *DescribeDBClusterBacktracksInput, opts ...request.Option) (*DescribeDBClusterBacktracksOutput, error) { + req, out := c.DescribeDBClusterBacktracksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" // DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the @@ -3293,7 +3465,7 @@ func (c *RDS) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterPa // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameterGroups func (c *RDS) DescribeDBClusterParameterGroups(input *DescribeDBClusterParameterGroupsInput) (*DescribeDBClusterParameterGroupsOutput, error) { @@ -3376,7 +3548,7 @@ func (c *RDS) DescribeDBClusterParametersRequest(input *DescribeDBClusterParamet // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterParameters func (c *RDS) DescribeDBClusterParameters(input *DescribeDBClusterParametersInput) (*DescribeDBClusterParametersOutput, error) { @@ -3466,7 +3638,7 @@ func (c *RDS) DescribeDBClusterSnapshotAttributesRequest(input *DescribeDBCluste // // Returned Error Codes: // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshotAttributes func (c *RDS) DescribeDBClusterSnapshotAttributes(input *DescribeDBClusterSnapshotAttributesInput) (*DescribeDBClusterSnapshotAttributesOutput, error) { @@ -3549,7 +3721,7 @@ func (c *RDS) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshot // // Returned Error Codes: // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterSnapshots func (c *RDS) DescribeDBClusterSnapshots(input *DescribeDBClusterSnapshotsInput) (*DescribeDBClusterSnapshotsOutput, error) { @@ -3632,7 +3804,7 @@ func (c *RDS) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *re // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusters func (c *RDS) DescribeDBClusters(input *DescribeDBClustersInput) (*DescribeDBClustersOutput, error) { @@ -3847,7 +4019,7 @@ func (c *RDS) DescribeDBInstancesRequest(input *DescribeDBInstancesInput) (req * // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstances func (c *RDS) DescribeDBInstances(input *DescribeDBInstancesInput) (*DescribeDBInstancesOutput, error) { @@ -3982,7 +4154,7 @@ func (c *RDS) DescribeDBLogFilesRequest(input *DescribeDBLogFilesInput) (req *re // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBLogFiles func (c *RDS) DescribeDBLogFiles(input *DescribeDBLogFilesInput) (*DescribeDBLogFilesOutput, error) { @@ -4119,7 +4291,7 @@ func (c *RDS) DescribeDBParameterGroupsRequest(input *DescribeDBParameterGroupsI // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameterGroups func (c *RDS) DescribeDBParameterGroups(input *DescribeDBParameterGroupsInput) (*DescribeDBParameterGroupsOutput, error) { @@ -4254,7 +4426,7 @@ func (c *RDS) DescribeDBParametersRequest(input *DescribeDBParametersInput) (req // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBParameters func (c *RDS) DescribeDBParameters(input *DescribeDBParametersInput) (*DescribeDBParametersOutput, error) { @@ -4391,7 +4563,7 @@ func (c *RDS) DescribeDBSecurityGroupsRequest(input *DescribeDBSecurityGroupsInp // // Returned Error Codes: // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSecurityGroups func (c *RDS) DescribeDBSecurityGroups(input *DescribeDBSecurityGroupsInput) (*DescribeDBSecurityGroupsOutput, error) { @@ -4531,7 +4703,7 @@ func (c *RDS) DescribeDBSnapshotAttributesRequest(input *DescribeDBSnapshotAttri // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshotAttributes func (c *RDS) DescribeDBSnapshotAttributes(input *DescribeDBSnapshotAttributesInput) (*DescribeDBSnapshotAttributesOutput, error) { @@ -4616,7 +4788,7 @@ func (c *RDS) DescribeDBSnapshotsRequest(input *DescribeDBSnapshotsInput) (req * // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSnapshots func (c *RDS) DescribeDBSnapshots(input *DescribeDBSnapshotsInput) (*DescribeDBSnapshotsOutput, error) { @@ -4754,7 +4926,7 @@ func (c *RDS) DescribeDBSubnetGroupsRequest(input *DescribeDBSubnetGroupsInput) // // Returned Error Codes: // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBSubnetGroups func (c *RDS) DescribeDBSubnetGroups(input *DescribeDBSubnetGroupsInput) (*DescribeDBSubnetGroupsOutput, error) { @@ -6266,10 +6438,10 @@ func (c *RDS) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDB // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications func (c *RDS) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { @@ -6354,10 +6526,10 @@ func (c *RDS) DownloadDBLogFilePortionRequest(input *DownloadDBLogFilePortionInp // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBLogFileNotFoundFault "DBLogFileNotFoundFault" -// LogFileName does not refer to an existing DB log file. +// LogFileName doesn't refer to an existing DB log file. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DownloadDBLogFilePortion func (c *RDS) DownloadDBLogFilePortion(input *DownloadDBLogFilePortionInput) (*DownloadDBLogFilePortionOutput, error) { @@ -6499,13 +6671,13 @@ func (c *RDS) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *requ // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster func (c *RDS) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { @@ -6587,13 +6759,13 @@ func (c *RDS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req * // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ListTagsForResource func (c *RDS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { @@ -6676,41 +6848,41 @@ func (c *RDS) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request. // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBCluster func (c *RDS) ModifyDBCluster(input *ModifyDBClusterInput) (*ModifyDBClusterOutput, error) { @@ -6809,11 +6981,11 @@ func (c *RDS) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParamet // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterParameterGroup @@ -6909,10 +7081,10 @@ func (c *RDS) ModifyDBClusterSnapshotAttributeRequest(input *ModifyDBClusterSnap // // Returned Error Codes: // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" // You have exceeded the maximum number of accounts that you can share a manual @@ -6998,34 +7170,34 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -7034,23 +7206,23 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // The specified option group could not be found. // // * ErrCodeDBUpgradeDependencyFailureFault "DBUpgradeDependencyFailure" -// The DB upgrade failed because a resource the DB depends on could not be modified. +// The DB upgrade failed because a resource the DB depends on can't be modified. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeCertificateNotFoundFault "CertificateNotFound" -// CertificateIdentifier does not refer to an existing certificate. +// CertificateIdentifier doesn't refer to an existing certificate. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance func (c *RDS) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { @@ -7146,11 +7318,11 @@ func (c *RDS) ModifyDBParameterGroupRequest(input *ModifyDBParameterGroupInput) // // Returned Error Codes: // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBParameterGroup @@ -7233,7 +7405,7 @@ func (c *RDS) ModifyDBSnapshotRequest(input *ModifyDBSnapshotInput) (req *reques // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBSnapshot func (c *RDS) ModifyDBSnapshot(input *ModifyDBSnapshotInput) (*ModifyDBSnapshotOutput, error) { @@ -7328,10 +7500,10 @@ func (c *RDS) ModifyDBSnapshotAttributeRequest(input *ModifyDBSnapshotAttributeI // // Returned Error Codes: // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" // You have exceeded the maximum number of accounts that you can share a manual @@ -7415,11 +7587,11 @@ func (c *RDS) ModifyDBSubnetGroupRequest(input *ModifyDBSubnetGroupInput) (req * // // Returned Error Codes: // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" -// Request would result in user exceeding the allowed number of subnets in a -// DB subnet groups. +// The request would result in the user exceeding the allowed number of subnets +// in a DB subnet groups. // // * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" // The DB subnet is already in use in the Availability Zone. @@ -7611,7 +7783,7 @@ func (c *RDS) ModifyOptionGroupRequest(input *ModifyOptionGroupInput) (req *requ // // Returned Error Codes: // * ErrCodeInvalidOptionGroupStateFault "InvalidOptionGroupStateFault" -// The option group is not in the available state. +// The option group isn't in the available state. // // * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" // The specified option group could not be found. @@ -7703,10 +7875,10 @@ func (c *RDS) PromoteReadReplicaRequest(input *PromoteReadReplicaInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplica func (c *RDS) PromoteReadReplica(input *PromoteReadReplicaInput) (*PromoteReadReplicaOutput, error) { @@ -7785,10 +7957,10 @@ func (c *RDS) PromoteReadReplicaDBClusterRequest(input *PromoteReadReplicaDBClus // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaDBCluster func (c *RDS) PromoteReadReplicaDBCluster(input *PromoteReadReplicaDBClusterInput) (*PromoteReadReplicaDBClusterOutput, error) { @@ -7961,10 +8133,10 @@ func (c *RDS) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RebootDBInstance func (c *RDS) RebootDBInstance(input *RebootDBInstanceInput) (*RebootDBInstanceOutput, error) { @@ -8047,14 +8219,14 @@ func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput // // Returned Error Codes: // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBClusterRoleNotFoundFault "DBClusterRoleNotFound" -// The specified IAM role Amazon Resource Name (ARN) is not associated with -// the specified DB cluster. +// The specified IAM role Amazon Resource Name (ARN) isn't associated with the +// specified DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster func (c *RDS) RemoveRoleFromDBCluster(input *RemoveRoleFromDBClusterInput) (*RemoveRoleFromDBClusterOutput, error) { @@ -8220,13 +8392,13 @@ func (c *RDS) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveTagsFromResource func (c *RDS) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { @@ -8318,11 +8490,11 @@ func (c *RDS) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameter // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBClusterParameterGroup func (c *RDS) ResetDBClusterParameterGroup(input *ResetDBClusterParameterGroupInput) (*DBClusterParameterGroupNameMessage, error) { @@ -8408,11 +8580,11 @@ func (c *RDS) ResetDBParameterGroupRequest(input *ResetDBParameterGroupInput) (r // Returned Error Codes: // * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" // The DB parameter group is in use or is in an invalid state. If you are attempting -// to delete the parameter group, you cannot delete it when the parameter group +// to delete the parameter group, you can't delete it when the parameter group // is in this state. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ResetDBParameterGroup func (c *RDS) ResetDBParameterGroup(input *ResetDBParameterGroupInput) (*DBParameterGroupNameMessage, error) { @@ -8494,51 +8666,51 @@ func (c *RDS) RestoreDBClusterFromS3Request(input *RestoreDBClusterFromS3Input) // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" -// The DB subnet group cannot be deleted because it is in use. +// The DB subnet group cannot be deleted because it's in use. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidS3BucketFault "InvalidS3BucketFault" -// The specified Amazon S3 bucket name could not be found or Amazon RDS is not -// authorized to access the specified Amazon S3 bucket. Verify the SourceS3BucketName -// and S3IngestionRoleArn values and try again. +// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized +// to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and +// S3IngestionRoleArn values and try again. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" -// DBClusterParameterGroupName does not refer to an existing DB Cluster parameter +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromS3 @@ -8629,52 +8801,52 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster does not have enough capacity for the current operation. +// The DB cluster doesn't have enough capacity for the current operation. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that @@ -8684,7 +8856,7 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // The specified option group could not be found. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromSnapshot func (c *RDS) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { @@ -8777,58 +8949,58 @@ func (c *RDS) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPoin // // Returned Error Codes: // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" -// User already has a DB cluster with the given identifier. +// The user already has a DB cluster with the given identifier. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" -// User attempted to create a new DB cluster and the user has already reached +// The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. // // * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" -// DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" -// The DB cluster does not have enough capacity for the current operation. +// The DB cluster doesn't have enough capacity for the current operation. // // * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" -// There is insufficient storage available for the current action. You may be -// able to resolve this error by updating your subnet group to use different +// There is insufficient storage available for the current action. You might +// be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" -// The supplied value is not a valid DB cluster snapshot state. +// The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeOptionGroupNotFoundFault "OptionGroupNotFoundFault" // The specified option group could not be found. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterToPointInTime func (c *RDS) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { @@ -8928,34 +9100,34 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" -// DBSnapshotIdentifier does not refer to an existing DB snapshot. +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" -// The state of the DB snapshot does not allow deletion. +// The state of the DB snapshot doesn't allow deletion. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -8972,23 +9144,23 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // The specified option group could not be found. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot func (c *RDS) RestoreDBInstanceFromDBSnapshot(input *RestoreDBInstanceFromDBSnapshotInput) (*RestoreDBInstanceFromDBSnapshotOutput, error) { @@ -9072,27 +9244,27 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" -// DBParameterGroupName does not refer to an existing DB parameter group. +// DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -9103,13 +9275,13 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidS3BucketFault "InvalidS3BucketFault" -// The specified Amazon S3 bucket name could not be found or Amazon RDS is not -// authorized to access the specified Amazon S3 bucket. Verify the SourceS3BucketName -// and S3IngestionRoleArn values and try again. +// The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized +// to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and +// S3IngestionRoleArn values and try again. // // * ErrCodeProvisionedIopsNotAvailableInAZFault "ProvisionedIopsNotAvailableInAZFault" // Provisioned IOPS not available in the specified Availability Zone. @@ -9118,17 +9290,17 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // The specified option group could not be found. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3 func (c *RDS) RestoreDBInstanceFromS3(input *RestoreDBInstanceFromS3Input) (*RestoreDBInstanceFromS3Output, error) { @@ -9221,38 +9393,38 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // // Returned Error Codes: // * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" -// User already has a DB instance with the given identifier. +// The user already has a DB instance with the given identifier. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" -// Request would result in user exceeding the allowed number of DB instances. +// The request would result in the user exceeding the allowed number of DB instances. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodePointInTimeRestoreNotEnabledFault "PointInTimeRestoreNotEnabled" // SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod // equal to 0. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" -// Request would result in user exceeding the allowed amount of storage available -// across all DB instances. +// The request would result in the user exceeding the allowed amount of storage +// available across all DB instances. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeInvalidRestoreFault "InvalidRestoreFault" -// Cannot restore from vpc backup to non-vpc DB instance. +// Cannot restore from VPC backup to non-VPC DB instance. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones @@ -9269,23 +9441,23 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // The specified option group could not be found. // // * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" -// StorageType specified cannot be associated with the DB Instance. +// Storage of the StorageType specified can't be associated with the DB instance. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" -// Domain does not refer to an existing Active Directory Domain. +// Domain doesn't refer to an existing Active Directory domain. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime func (c *RDS) RestoreDBInstanceToPointInTime(input *RestoreDBInstanceToPointInTimeInput) (*RestoreDBInstanceToPointInTimeOutput, error) { @@ -9367,17 +9539,17 @@ func (c *RDS) RevokeDBSecurityGroupIngressRequest(input *RevokeDBSecurityGroupIn // // Returned Error Codes: // * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" -// DBSecurityGroupName does not refer to an existing DB security group. +// DBSecurityGroupName doesn't refer to an existing DB security group. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" -// The state of the DB security group does not allow deletion. +// The state of the DB security group doesn't allow deletion. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RevokeDBSecurityGroupIngress func (c *RDS) RevokeDBSecurityGroupIngress(input *RevokeDBSecurityGroupIngressInput) (*RevokeDBSecurityGroupIngressOutput, error) { @@ -9460,45 +9632,45 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" -// Specified DB instance class is not available in the specified Availability +// The specified DB instance class isn't available in the specified Availability // Zone. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" -// DBSubnetGroupName does not refer to an existing DB subnet group. +// DBSubnetGroupName doesn't refer to an existing DB subnet group. // // * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" // Subnets in the DB subnet group should cover at least two Availability Zones // unless there is only one Availability Zone. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that // are not all in a common VPC. // // * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" -// DB subnet group does not cover all Availability Zones after it is created -// because users' change. +// The DB subnet group doesn't cover all Availability Zones after it's created +// because of users' change. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" -// DBClusterIdentifier does not refer to an existing DB cluster. +// DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" -// Specified CIDRIP or EC2 security group is not authorized for the specified -// DB security group. +// The specified CIDRIP or Amazon EC2 security group isn't authorized for the +// specified DB security group. // -// RDS may not also be authorized via IAM to perform necessary actions on your -// behalf. +// RDS also may not be authorized by using IAM to perform necessary actions +// on your behalf. // // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" -// Error accessing KMS key. +// An error occurred accessing an AWS KMS key. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBInstance func (c *RDS) StartDBInstance(input *StartDBInstanceInput) (*StartDBInstanceOutput, error) { @@ -9583,19 +9755,19 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // // Returned Error Codes: // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" -// DBInstanceIdentifier does not refer to an existing DB instance. +// DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance is not in the available state. +// The specified DB instance isn't in the available state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" -// Request would result in user exceeding the allowed number of DB snapshots. +// The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster is not in a valid state. +// The DB cluster isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance func (c *RDS) StopDBInstance(input *StopDBInstanceInput) (*StopDBInstanceOutput, error) { @@ -10127,6 +10299,186 @@ func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { return s } +type BacktrackDBClusterInput struct { + _ struct{} `type:"structure"` + + // The timestamp of the time to backtrack the DB cluster to, specified in ISO + // 8601 format. For more information about ISO 8601, see the ISO8601 Wikipedia + // page. (http://en.wikipedia.org/wiki/ISO_8601) + // + // If the specified time is not a consistent time for the DB cluster, Aurora + // automatically chooses the nearest possible consistent time for the DB cluster. + // + // Constraints: + // + // * Must contain a valid ISO 8601 timestamp. + // + // * Cannot contain a timestamp set in the future. + // + // Example: 2017-07-08T18:00Z + // + // BacktrackTo is a required field + BacktrackTo *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // The DB cluster identifier of the DB cluster to be backtracked. This parameter + // is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // A value that, if specified, forces the DB cluster to backtrack when binary + // logging is enabled. Otherwise, an error occurs when binary logging is enabled. + Force *bool `type:"boolean"` + + // If BacktrackTo is set to a timestamp earlier than the earliest backtrack + // time, this value backtracks the DB cluster to the earliest possible backtrack + // time. Otherwise, an error occurs. + UseEarliestTimeOnPointInTimeUnavailable *bool `type:"boolean"` +} + +// String returns the string representation +func (s BacktrackDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BacktrackDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BacktrackDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BacktrackDBClusterInput"} + if s.BacktrackTo == nil { + invalidParams.Add(request.NewErrParamRequired("BacktrackTo")) + } + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBacktrackTo sets the BacktrackTo field's value. +func (s *BacktrackDBClusterInput) SetBacktrackTo(v time.Time) *BacktrackDBClusterInput { + s.BacktrackTo = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *BacktrackDBClusterInput) SetDBClusterIdentifier(v string) *BacktrackDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetForce sets the Force field's value. +func (s *BacktrackDBClusterInput) SetForce(v bool) *BacktrackDBClusterInput { + s.Force = &v + return s +} + +// SetUseEarliestTimeOnPointInTimeUnavailable sets the UseEarliestTimeOnPointInTimeUnavailable field's value. +func (s *BacktrackDBClusterInput) SetUseEarliestTimeOnPointInTimeUnavailable(v bool) *BacktrackDBClusterInput { + s.UseEarliestTimeOnPointInTimeUnavailable = &v + return s +} + +// This data type is used as a response element in the DescribeDBClusterBacktracks +// action. +type BacktrackDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the backtrack identifier. + BacktrackIdentifier *string `type:"string"` + + // The timestamp of the time at which the backtrack was requested. + BacktrackRequestCreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The timestamp of the time to which the DB cluster was backtracked. + BacktrackTo *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The timestamp of the time from which the DB cluster was backtracked. + BacktrackedFrom *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // Contains a user-supplied DB cluster identifier. This identifier is the unique + // key that identifies a DB cluster. + DBClusterIdentifier *string `type:"string"` + + // The status of the backtrack. This property returns one of the following values: + // + // * applying - The backtrack is currently being applied to or rolled back + // from the DB cluster. + // + // * completed - The backtrack has successfully been applied to or rolled + // back from the DB cluster. + // + // * failed - An error occurred while the backtrack was applied to or rolled + // back from the DB cluster. + // + // * pending - The backtrack is currently pending application to or rollback + // from the DB cluster. + Status *string `type:"string"` +} + +// String returns the string representation +func (s BacktrackDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BacktrackDBClusterOutput) GoString() string { + return s.String() +} + +// SetBacktrackIdentifier sets the BacktrackIdentifier field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackIdentifier(v string) *BacktrackDBClusterOutput { + s.BacktrackIdentifier = &v + return s +} + +// SetBacktrackRequestCreationTime sets the BacktrackRequestCreationTime field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackRequestCreationTime(v time.Time) *BacktrackDBClusterOutput { + s.BacktrackRequestCreationTime = &v + return s +} + +// SetBacktrackTo sets the BacktrackTo field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackTo(v time.Time) *BacktrackDBClusterOutput { + s.BacktrackTo = &v + return s +} + +// SetBacktrackedFrom sets the BacktrackedFrom field's value. +func (s *BacktrackDBClusterOutput) SetBacktrackedFrom(v time.Time) *BacktrackDBClusterOutput { + s.BacktrackedFrom = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *BacktrackDBClusterOutput) SetDBClusterIdentifier(v string) *BacktrackDBClusterOutput { + s.DBClusterIdentifier = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *BacktrackDBClusterOutput) SetStatus(v string) *BacktrackDBClusterOutput { + s.Status = &v + return s +} + // A CA certificate for an AWS account. type Certificate struct { _ struct{} `type:"structure"` @@ -10403,10 +10755,6 @@ type CopyDBClusterSnapshotInput struct { // ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key // alias for the KMS encryption key. // - // If you copy an unencrypted DB cluster snapshot and specify a value for the - // KmsKeyId parameter, Amazon RDS encrypts the target DB cluster snapshot using - // the specified KMS encryption key. - // // If you copy an encrypted DB cluster snapshot from your AWS account, you can // specify a value for KmsKeyId to encrypt the copy with a new KMS encryption // key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster @@ -10420,6 +10768,9 @@ type CopyDBClusterSnapshotInput struct { // DB cluster snapshot in the destination AWS Region. KMS encryption keys are // specific to the AWS Region that they are created in, and you can't use encryption // keys from one AWS Region in another AWS Region. + // + // If you copy an unencrypted DB cluster snapshot and specify a value for the + // KmsKeyId parameter, an error is returned. KmsKeyId *string `type:"string"` // The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot @@ -11091,6 +11442,17 @@ type CreateDBClusterInput struct { // and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The number of days for which automated backups are retained. You must specify // a minimum value of 1. // @@ -11339,6 +11701,12 @@ func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBCluste return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *CreateDBClusterInput) SetBacktrackWindow(v int64) *CreateDBClusterInput { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput { s.BackupRetentionPeriod = &v @@ -13954,6 +14322,13 @@ type DBCluster struct { // can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The number of change records stored for Backtrack. + BacktrackConsumedChangeRecords *int64 `type:"long"` + + // The target backtrack window, in seconds. If this value is set to 0, backtracking + // is disabled for the DB cluster. Otherwise, backtracking is enabled. + BacktrackWindow *int64 `type:"long"` + // Specifies the number of days for which automatic DB snapshots are retained. BackupRetentionPeriod *int64 `type:"integer"` @@ -13998,7 +14373,10 @@ type DBCluster struct { // cluster is accessed. DbClusterResourceId *string `type:"string"` - // Specifies the earliest time to which a database can be restored with point-in-time + // The earliest time to which a DB cluster can be backtracked. + EarliestBacktrackTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // The earliest time to which a database can be restored with point-in-time // restore. EarliestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` @@ -14105,6 +14483,18 @@ func (s *DBCluster) SetAvailabilityZones(v []*string) *DBCluster { return s } +// SetBacktrackConsumedChangeRecords sets the BacktrackConsumedChangeRecords field's value. +func (s *DBCluster) SetBacktrackConsumedChangeRecords(v int64) *DBCluster { + s.BacktrackConsumedChangeRecords = &v + return s +} + +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *DBCluster) SetBacktrackWindow(v int64) *DBCluster { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { s.BackupRetentionPeriod = &v @@ -14177,6 +14567,12 @@ func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { return s } +// SetEarliestBacktrackTime sets the EarliestBacktrackTime field's value. +func (s *DBCluster) SetEarliestBacktrackTime(v time.Time) *DBCluster { + s.EarliestBacktrackTime = &v + return s +} + // SetEarliestRestorableTime sets the EarliestRestorableTime field's value. func (s *DBCluster) SetEarliestRestorableTime(v time.Time) *DBCluster { s.EarliestRestorableTime = &v @@ -17089,6 +17485,173 @@ func (s *DescribeCertificatesOutput) SetMarker(v string) *DescribeCertificatesOu return s } +type DescribeDBClusterBacktracksInput struct { + _ struct{} `type:"structure"` + + // If specified, this value is the backtrack identifier of the backtrack to + // be described. + // + // Constraints: + // + // * Must contain a valid universally unique identifier (UUID). For more + // information about UUIDs, see A Universally Unique Identifier (UUID) URN + // Namespace (http://www.ietf.org/rfc/rfc4122.txt). + // + // Example: 123e4567-e89b-12d3-a456-426655440000 + BacktrackIdentifier *string `type:"string"` + + // The DB cluster identifier of the DB cluster to be described. This parameter + // is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 alphanumeric characters or hyphens. + // + // * First character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // A filter that specifies one or more DB clusters to describe. Supported filters + // include the following: + // + // * db-cluster-backtrack-id - Accepts backtrack identifiers. The results + // list includes information about only the backtracks identified by these + // identifiers. + // + // * db-cluster-backtrack-status - Accepts any of the following backtrack + // status values: + // + // applying + // + // completed + // + // failed + // + // pending + // + // The results list includes information about only the backtracks identified + // by these values. For more information about backtrack status values, see + // DBClusterBacktrack. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterBacktracks + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBClusterBacktracksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterBacktracksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterBacktracksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterBacktracksInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBacktrackIdentifier sets the BacktrackIdentifier field's value. +func (s *DescribeDBClusterBacktracksInput) SetBacktrackIdentifier(v string) *DescribeDBClusterBacktracksInput { + s.BacktrackIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DescribeDBClusterBacktracksInput) SetDBClusterIdentifier(v string) *DescribeDBClusterBacktracksInput { + s.DBClusterIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterBacktracksInput) SetFilters(v []*Filter) *DescribeDBClusterBacktracksInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterBacktracksInput) SetMarker(v string) *DescribeDBClusterBacktracksInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterBacktracksInput) SetMaxRecords(v int64) *DescribeDBClusterBacktracksInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBClusterBacktracks +// action. +type DescribeDBClusterBacktracksOutput struct { + _ struct{} `type:"structure"` + + // Contains a list of backtracks for the user. + DBClusterBacktracks []*BacktrackDBClusterOutput `locationNameList:"DBClusterBacktrack" type:"list"` + + // A pagination token that can be used in a subsequent DescribeDBClusterBacktracks + // request. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterBacktracksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterBacktracksOutput) GoString() string { + return s.String() +} + +// SetDBClusterBacktracks sets the DBClusterBacktracks field's value. +func (s *DescribeDBClusterBacktracksOutput) SetDBClusterBacktracks(v []*BacktrackDBClusterOutput) *DescribeDBClusterBacktracksOutput { + s.DBClusterBacktracks = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterBacktracksOutput) SetMarker(v string) *DescribeDBClusterBacktracksOutput { + s.Marker = &v + return s +} + type DescribeDBClusterParameterGroupsInput struct { _ struct{} `type:"structure"` @@ -17749,7 +18312,7 @@ type DescribeDBEngineVersionsInput struct { // Example: 5.1.49 EngineVersion *string `type:"string"` - // Not currently supported. + // This parameter is not currently supported. Filters []*Filter `locationNameList:"Filter" type:"list"` // If this parameter is specified and the requested engine supports the CharacterSetName @@ -19075,7 +19638,7 @@ type DescribeEngineDefaultParametersInput struct { // DBParameterGroupFamily is a required field DBParameterGroupFamily *string `type:"string" required:"true"` - // Not currently supported. + // This parameter is not currently supported. Filters []*Filter `locationNameList:"Filter" type:"list"` // An optional pagination token provided by a previous DescribeEngineDefaultParameters @@ -21294,16 +21857,31 @@ func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterO return s } -// This type is not currently supported. +// A filter name and value pair that is used to return a more specific list +// of results from a describe operation. Filters can be used to match a set +// of resources by specific criteria, such as IDs. The filters supported by +// a describe operation are documented with the describe operation. +// +// Currently, wildcards are not supported in filters. +// +// The following actions can be filtered: +// +// * DescribeDBClusterBacktracks +// +// * DescribeDBClusters +// +// * DescribeDBInstances +// +// * DescribePendingMaintenanceActions type Filter struct { _ struct{} `type:"structure"` - // This parameter is not currently supported. + // The name of the filter. Filter names are case-sensitive. // // Name is a required field Name *string `type:"string" required:"true"` - // This parameter is not currently supported. + // One or more filter values. Filter values are case-sensitive. // // Values is a required field Values []*string `locationNameList:"Value" type:"list" required:"true"` @@ -21483,6 +22061,17 @@ type ModifyDBClusterInput struct { // Default: false ApplyImmediately *bool `type:"boolean"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The number of days for which automated backups are retained. You must specify // a minimum value of 1. // @@ -21626,6 +22215,12 @@ func (s *ModifyDBClusterInput) SetApplyImmediately(v bool) *ModifyDBClusterInput return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *ModifyDBClusterInput) SetBacktrackWindow(v int64) *ModifyDBClusterInput { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput { s.BackupRetentionPeriod = &v @@ -25564,6 +26159,17 @@ type RestoreDBClusterFromS3Input struct { // can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The number of days for which automated backups of the restored DB cluster // are retained. You must specify a minimum value of 1. // @@ -25814,6 +26420,12 @@ func (s *RestoreDBClusterFromS3Input) SetAvailabilityZones(v []*string) *Restore return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *RestoreDBClusterFromS3Input) SetBacktrackWindow(v int64) *RestoreDBClusterFromS3Input { + s.BacktrackWindow = &v + return s +} + // SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. func (s *RestoreDBClusterFromS3Input) SetBackupRetentionPeriod(v int64) *RestoreDBClusterFromS3Input { s.BackupRetentionPeriod = &v @@ -25990,6 +26602,17 @@ type RestoreDBClusterFromSnapshotInput struct { // DB cluster can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. // This parameter isn't case-sensitive. // @@ -26118,6 +26741,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetAvailabilityZones(v []*string) *R return s } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetBacktrackWindow(v int64) *RestoreDBClusterFromSnapshotInput { + s.BacktrackWindow = &v + return s +} + // SetDBClusterIdentifier sets the DBClusterIdentifier field's value. func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *RestoreDBClusterFromSnapshotInput { s.DBClusterIdentifier = &v @@ -26218,6 +26847,17 @@ func (s *RestoreDBClusterFromSnapshotOutput) SetDBCluster(v *DBCluster) *Restore type RestoreDBClusterToPointInTimeInput struct { _ struct{} `type:"structure"` + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + // The name of the new DB cluster to be created. // // Constraints: @@ -26363,6 +27003,12 @@ func (s *RestoreDBClusterToPointInTimeInput) Validate() error { return nil } +// SetBacktrackWindow sets the BacktrackWindow field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetBacktrackWindow(v int64) *RestoreDBClusterToPointInTimeInput { + s.BacktrackWindow = &v + return s +} + // SetDBClusterIdentifier sets the DBClusterIdentifier field's value. func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { s.DBClusterIdentifier = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go index 4cb1983df84..a4201c6da1a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go @@ -7,55 +7,61 @@ const ( // ErrCodeAuthorizationAlreadyExistsFault for service response error code // "AuthorizationAlreadyExists". // - // The specified CIDRIP or EC2 security group is already authorized for the - // specified DB security group. + // The specified CIDRIP or Amazon EC2 security group is already authorized for + // the specified DB security group. ErrCodeAuthorizationAlreadyExistsFault = "AuthorizationAlreadyExists" // ErrCodeAuthorizationNotFoundFault for service response error code // "AuthorizationNotFound". // - // Specified CIDRIP or EC2 security group is not authorized for the specified - // DB security group. + // The specified CIDRIP or Amazon EC2 security group isn't authorized for the + // specified DB security group. // - // RDS may not also be authorized via IAM to perform necessary actions on your - // behalf. + // RDS also may not be authorized by using IAM to perform necessary actions + // on your behalf. ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" // ErrCodeAuthorizationQuotaExceededFault for service response error code // "AuthorizationQuotaExceeded". // - // DB security group authorization quota has been reached. + // The DB security group authorization quota has been reached. ErrCodeAuthorizationQuotaExceededFault = "AuthorizationQuotaExceeded" // ErrCodeCertificateNotFoundFault for service response error code // "CertificateNotFound". // - // CertificateIdentifier does not refer to an existing certificate. + // CertificateIdentifier doesn't refer to an existing certificate. ErrCodeCertificateNotFoundFault = "CertificateNotFound" // ErrCodeDBClusterAlreadyExistsFault for service response error code // "DBClusterAlreadyExistsFault". // - // User already has a DB cluster with the given identifier. + // The user already has a DB cluster with the given identifier. ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault" + // ErrCodeDBClusterBacktrackNotFoundFault for service response error code + // "DBClusterBacktrackNotFoundFault". + // + // BacktrackIdentifier doesn't refer to an existing backtrack. + ErrCodeDBClusterBacktrackNotFoundFault = "DBClusterBacktrackNotFoundFault" + // ErrCodeDBClusterNotFoundFault for service response error code // "DBClusterNotFoundFault". // - // DBClusterIdentifier does not refer to an existing DB cluster. + // DBClusterIdentifier doesn't refer to an existing DB cluster. ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault" // ErrCodeDBClusterParameterGroupNotFoundFault for service response error code // "DBClusterParameterGroupNotFound". // - // DBClusterParameterGroupName does not refer to an existing DB Cluster parameter + // DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter // group. ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound" // ErrCodeDBClusterQuotaExceededFault for service response error code // "DBClusterQuotaExceededFault". // - // User attempted to create a new DB cluster and the user has already reached + // The user attempted to create a new DB cluster and the user has already reached // the maximum allowed DB cluster quota. ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault" @@ -69,8 +75,8 @@ const ( // ErrCodeDBClusterRoleNotFoundFault for service response error code // "DBClusterRoleNotFound". // - // The specified IAM role Amazon Resource Name (ARN) is not associated with - // the specified DB cluster. + // The specified IAM role Amazon Resource Name (ARN) isn't associated with the + // specified DB cluster. ErrCodeDBClusterRoleNotFoundFault = "DBClusterRoleNotFound" // ErrCodeDBClusterRoleQuotaExceededFault for service response error code @@ -83,31 +89,31 @@ const ( // ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code // "DBClusterSnapshotAlreadyExistsFault". // - // User already has a DB cluster snapshot with the given identifier. + // The user already has a DB cluster snapshot with the given identifier. ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault" // ErrCodeDBClusterSnapshotNotFoundFault for service response error code // "DBClusterSnapshotNotFoundFault". // - // DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. + // DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault" // ErrCodeDBInstanceAlreadyExistsFault for service response error code // "DBInstanceAlreadyExists". // - // User already has a DB instance with the given identifier. + // The user already has a DB instance with the given identifier. ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" // ErrCodeDBInstanceNotFoundFault for service response error code // "DBInstanceNotFound". // - // DBInstanceIdentifier does not refer to an existing DB instance. + // DBInstanceIdentifier doesn't refer to an existing DB instance. ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" // ErrCodeDBLogFileNotFoundFault for service response error code // "DBLogFileNotFoundFault". // - // LogFileName does not refer to an existing DB log file. + // LogFileName doesn't refer to an existing DB log file. ErrCodeDBLogFileNotFoundFault = "DBLogFileNotFoundFault" // ErrCodeDBParameterGroupAlreadyExistsFault for service response error code @@ -119,13 +125,13 @@ const ( // ErrCodeDBParameterGroupNotFoundFault for service response error code // "DBParameterGroupNotFound". // - // DBParameterGroupName does not refer to an existing DB parameter group. + // DBParameterGroupName doesn't refer to an existing DB parameter group. ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound" // ErrCodeDBParameterGroupQuotaExceededFault for service response error code // "DBParameterGroupQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB parameter + // The request would result in the user exceeding the allowed number of DB parameter // groups. ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded" @@ -139,19 +145,19 @@ const ( // ErrCodeDBSecurityGroupNotFoundFault for service response error code // "DBSecurityGroupNotFound". // - // DBSecurityGroupName does not refer to an existing DB security group. + // DBSecurityGroupName doesn't refer to an existing DB security group. ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound" // ErrCodeDBSecurityGroupNotSupportedFault for service response error code // "DBSecurityGroupNotSupported". // - // A DB security group is not allowed for this action. + // A DB security group isn't allowed for this action. ErrCodeDBSecurityGroupNotSupportedFault = "DBSecurityGroupNotSupported" // ErrCodeDBSecurityGroupQuotaExceededFault for service response error code // "QuotaExceeded.DBSecurityGroup". // - // Request would result in user exceeding the allowed number of DB security + // The request would result in the user exceeding the allowed number of DB security // groups. ErrCodeDBSecurityGroupQuotaExceededFault = "QuotaExceeded.DBSecurityGroup" @@ -164,7 +170,7 @@ const ( // ErrCodeDBSnapshotNotFoundFault for service response error code // "DBSnapshotNotFound". // - // DBSnapshotIdentifier does not refer to an existing DB snapshot. + // DBSnapshotIdentifier doesn't refer to an existing DB snapshot. ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound" // ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code @@ -183,39 +189,40 @@ const ( // ErrCodeDBSubnetGroupNotAllowedFault for service response error code // "DBSubnetGroupNotAllowedFault". // - // Indicates that the DBSubnetGroup should not be specified while creating read - // replicas that lie in the same region as the source instance. + // The DBSubnetGroup shouldn't be specified while creating read replicas that + // lie in the same region as the source instance. ErrCodeDBSubnetGroupNotAllowedFault = "DBSubnetGroupNotAllowedFault" // ErrCodeDBSubnetGroupNotFoundFault for service response error code // "DBSubnetGroupNotFoundFault". // - // DBSubnetGroupName does not refer to an existing DB subnet group. + // DBSubnetGroupName doesn't refer to an existing DB subnet group. ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault" // ErrCodeDBSubnetGroupQuotaExceededFault for service response error code // "DBSubnetGroupQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB subnet groups. + // The request would result in the user exceeding the allowed number of DB subnet + // groups. ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded" // ErrCodeDBSubnetQuotaExceededFault for service response error code // "DBSubnetQuotaExceededFault". // - // Request would result in user exceeding the allowed number of subnets in a - // DB subnet groups. + // The request would result in the user exceeding the allowed number of subnets + // in a DB subnet groups. ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault" // ErrCodeDBUpgradeDependencyFailureFault for service response error code // "DBUpgradeDependencyFailure". // - // The DB upgrade failed because a resource the DB depends on could not be modified. + // The DB upgrade failed because a resource the DB depends on can't be modified. ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure" // ErrCodeDomainNotFoundFault for service response error code // "DomainNotFoundFault". // - // Domain does not refer to an existing Active Directory Domain. + // Domain doesn't refer to an existing Active Directory domain. ErrCodeDomainNotFoundFault = "DomainNotFoundFault" // ErrCodeEventSubscriptionQuotaExceededFault for service response error code @@ -227,85 +234,85 @@ const ( // ErrCodeInstanceQuotaExceededFault for service response error code // "InstanceQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB instances. + // The request would result in the user exceeding the allowed number of DB instances. ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded" // ErrCodeInsufficientDBClusterCapacityFault for service response error code // "InsufficientDBClusterCapacityFault". // - // The DB cluster does not have enough capacity for the current operation. + // The DB cluster doesn't have enough capacity for the current operation. ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault" // ErrCodeInsufficientDBInstanceCapacityFault for service response error code // "InsufficientDBInstanceCapacity". // - // Specified DB instance class is not available in the specified Availability + // The specified DB instance class isn't available in the specified Availability // Zone. ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity" // ErrCodeInsufficientStorageClusterCapacityFault for service response error code // "InsufficientStorageClusterCapacity". // - // There is insufficient storage available for the current action. You may be - // able to resolve this error by updating your subnet group to use different + // There is insufficient storage available for the current action. You might + // be able to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code // "InvalidDBClusterSnapshotStateFault". // - // The supplied value is not a valid DB cluster snapshot state. + // The supplied value isn't a valid DB cluster snapshot state. ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault" // ErrCodeInvalidDBClusterStateFault for service response error code // "InvalidDBClusterStateFault". // - // The DB cluster is not in a valid state. + // The DB cluster isn't in a valid state. ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" // ErrCodeInvalidDBInstanceStateFault for service response error code // "InvalidDBInstanceState". // - // The specified DB instance is not in the available state. + // The specified DB instance isn't in the available state. ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" // ErrCodeInvalidDBParameterGroupStateFault for service response error code // "InvalidDBParameterGroupState". // // The DB parameter group is in use or is in an invalid state. If you are attempting - // to delete the parameter group, you cannot delete it when the parameter group + // to delete the parameter group, you can't delete it when the parameter group // is in this state. ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState" // ErrCodeInvalidDBSecurityGroupStateFault for service response error code // "InvalidDBSecurityGroupState". // - // The state of the DB security group does not allow deletion. + // The state of the DB security group doesn't allow deletion. ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState" // ErrCodeInvalidDBSnapshotStateFault for service response error code // "InvalidDBSnapshotState". // - // The state of the DB snapshot does not allow deletion. + // The state of the DB snapshot doesn't allow deletion. ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState" // ErrCodeInvalidDBSubnetGroupFault for service response error code // "InvalidDBSubnetGroupFault". // - // Indicates the DBSubnetGroup does not belong to the same VPC as that of an - // existing cross region read replica of the same source instance. + // The DBSubnetGroup doesn't belong to the same VPC as that of an existing cross-region + // read replica of the same source instance. ErrCodeInvalidDBSubnetGroupFault = "InvalidDBSubnetGroupFault" // ErrCodeInvalidDBSubnetGroupStateFault for service response error code // "InvalidDBSubnetGroupStateFault". // - // The DB subnet group cannot be deleted because it is in use. + // The DB subnet group cannot be deleted because it's in use. ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault" // ErrCodeInvalidDBSubnetStateFault for service response error code // "InvalidDBSubnetStateFault". // - // The DB subnet is not in the available state. + // The DB subnet isn't in the available state. ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault" // ErrCodeInvalidEventSubscriptionStateFault for service response error code @@ -318,21 +325,21 @@ const ( // ErrCodeInvalidOptionGroupStateFault for service response error code // "InvalidOptionGroupStateFault". // - // The option group is not in the available state. + // The option group isn't in the available state. ErrCodeInvalidOptionGroupStateFault = "InvalidOptionGroupStateFault" // ErrCodeInvalidRestoreFault for service response error code // "InvalidRestoreFault". // - // Cannot restore from vpc backup to non-vpc DB instance. + // Cannot restore from VPC backup to non-VPC DB instance. ErrCodeInvalidRestoreFault = "InvalidRestoreFault" // ErrCodeInvalidS3BucketFault for service response error code // "InvalidS3BucketFault". // - // The specified Amazon S3 bucket name could not be found or Amazon RDS is not - // authorized to access the specified Amazon S3 bucket. Verify the SourceS3BucketName - // and S3IngestionRoleArn values and try again. + // The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized + // to access the specified Amazon S3 bucket. Verify the SourceS3BucketName and + // S3IngestionRoleArn values and try again. ErrCodeInvalidS3BucketFault = "InvalidS3BucketFault" // ErrCodeInvalidSubnet for service response error code @@ -345,14 +352,14 @@ const ( // ErrCodeInvalidVPCNetworkStateFault for service response error code // "InvalidVPCNetworkStateFault". // - // DB subnet group does not cover all Availability Zones after it is created - // because users' change. + // The DB subnet group doesn't cover all Availability Zones after it's created + // because of users' change. ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" // ErrCodeKMSKeyNotAccessibleFault for service response error code // "KMSKeyNotAccessibleFault". // - // Error accessing KMS key. + // An error occurred accessing an AWS KMS key. ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" // ErrCodeOptionGroupAlreadyExistsFault for service response error code @@ -444,7 +451,7 @@ const ( // ErrCodeSnapshotQuotaExceededFault for service response error code // "SnapshotQuotaExceeded". // - // Request would result in user exceeding the allowed number of DB snapshots. + // The request would result in the user exceeding the allowed number of DB snapshots. ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded" // ErrCodeSourceNotFoundFault for service response error code @@ -456,14 +463,14 @@ const ( // ErrCodeStorageQuotaExceededFault for service response error code // "StorageQuotaExceeded". // - // Request would result in user exceeding the allowed amount of storage available - // across all DB instances. + // The request would result in the user exceeding the allowed amount of storage + // available across all DB instances. ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded" // ErrCodeStorageTypeNotSupportedFault for service response error code // "StorageTypeNotSupported". // - // StorageType specified cannot be associated with the DB Instance. + // Storage of the StorageType specified can't be associated with the DB instance. ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported" // ErrCodeSubnetAlreadyInUse for service response error code diff --git a/vendor/vendor.json b/vendor/vendor.json index e1e387a73c5..bac8e97eaad 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,916 +39,916 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "Chrl+rJ8+nI3K8BcLIaVqKdUgTw=", + "checksumSHA1": "t3jF/z1q8MUsLfxmDaDWYISNfZk=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { - "checksumSHA1": "EIW1Cy3S1YvIXRfUSLoW7YuDUPc=", + "checksumSHA1": "HyynTJ+UU7h0vv85x18zxc9h8C8=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "CntJM8T3dRgC0e1i66CIbP8uCSY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "J66FLqo++F1PXLUU8XQqYaageSc=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "BqDC+Sxo3hrC6WYvwx1U4OObaT4=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "NStHCXEvYqG72GknZyv1jaKaeH0=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "pkeoOfZpHRvFG/AOZeTf0lwtsFg=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "6zosteWJqUGM9+t9dkANQymMA9s=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "yqQRtxoLmiwe3lUvTx81hxfy+S0=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "WliJXTogdly9qe5xEV6Fn2zklcs=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "rQmpNRto8bpB17qNubhGzRh/Aj8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "7o1gMXoE8cemDzkZFUrQknQS4Yo=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "DtAllf3BfE0Z5JOhcdYHQnv1jnY=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "YlKOG1eZClZYmcRwJQO+LfEQrVY=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "58ARAtV4EKAIv5zpieVjvJMFjO0=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "s6of5mfMFZtYy6BRo/tIafylOUc=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { - "checksumSHA1": "MJPsaJkyrCml4VZOsbNGo9Fl0C8=", + "checksumSHA1": "ToedYe8j0Uiv9NkIIu48SWTjexU=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "AQGPL+fXjjKhBmyb37QAG05R/Qw=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "NU6AqUCd5TOrxaqFdWmo8l2oeOI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "hCz5z7QQz1416cCjbhjGjvbrdpY=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "8PdtKqSEcLQ1V0Gnl2FAHJoOQy0=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "kM7Fxkb1OdCiOOmTlRIadqnsdt0=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "pKJec2iJiKDSY5UKmLSeYxLxucg=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "BD7EvXghMHMw52wtxISIhpJ4CTk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "6Q9ZHEAsu92jsFOCwJAI+SjYYAk=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "YNl9xTPOb1SFVmwXDtmwzyGsx8U=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "p/I/GLsXOoZ0XdhDuSQ+lP4NlYM=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "4KiQdvEfpTf2g+UF2rWlLg/kgok=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "vT7k8uQ7ZfBVVJIYc/Yxui+yWI8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "5uQsnuE2bMWQ2ypmll1rzXyNqPw=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "cx2wG4c6Q5gSTsAU6D/UZMQN/Kg=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "k4lfEcz91J29Wax6GPBlUUQb5bk=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "Pib86kjnYwOlLwU/98ITXtAXA0g=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "FEUIC6EG3tPnTuvmIsV4b3r9D+k=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "I5sSvXLvlj9Ppv0HCbFXdN4tqn4=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "/Wa2paWfntnF+4pRSsgMffedplE=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "hurqUivjVxLHaXEd2oS8JrwMGQs=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "zxX7V0AIU1x2yX5Uyd9RMe0C3ok=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "mJR+NQiCTZGMy+eaCzbP4sEnX6w=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { - "checksumSHA1": "OYW6KOQn3+mHCHpqhlZOUsFEpUE=", + "checksumSHA1": "oQoHW3h6PHv4cRCoyfEicajeguY=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "V3D5pDdtXS0yVShpS/fOqFGxCrA=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "7igFr0esmtcs9V0F9iMs2k5uNDI=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "PQnfXJ0ZQIIMiqUUFs4bkUPHqnc=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "pZoO4JKc/TJACuq1n9IHuhovD4k=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "Z2ql82q2CJ3AXQ/Wi+3jhkpXmt0=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { - "checksumSHA1": "BSSURh/ALTj0QW5BWPJkW3i+FN0=", + "checksumSHA1": "mPE8FtH4eBfXADHlCh6WE3b7Lvk=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "JpvcQ+tc0yz2WZ0ne6zzxlbfscI=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "MgdGxbP8vjCkzkj1ukmU5Uqh3UA=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "hgqHUngsP+NPjkZVqevXuioHnkE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "OQuas8ovzB34Yb2bCMBDsu8teu4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { - "checksumSHA1": "P9J4eI4+Bde2V4P5SbQ5yrkC4v8=", + "checksumSHA1": "ACpOdHZr9nuPF1y/GSDiHTZd4GQ=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "4DYLn0HnMhZvXXgx6VjbS/V0srA=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { - "checksumSHA1": "UPwhm+XWgDTDZ4wUziP+9RHOozg=", + "checksumSHA1": "/cpOFocraRx5nL1OB0ux2KDKytk=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "pOhtcgvfgH3qPUiqZrBgpawiu8I=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "2bqJtsfs1LDLLhczU/SNtmvkjcw=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "yMGyjJHSsK+Mb+SbNxGIcXhl67o=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "DHrIPXQ0QzjE+Hnfwk0INR4rUkU=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "pvrqgHDeZ3gAHIiZyZfwXOi9GD4=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "lKGIKcPcMErM1NJdXBsHLic1E8w=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "zdG3e3bdyNaBuApO06pygeSJsJ4=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "zmOo5EeLSGFEuIBiRQsVd4+SBJ0=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "nlvFlqVKHyuyYHG88H3Yt/OA1e0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "AO97b1GChOs2geiFc//6YcpVfX8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "jyxQ6TEdSl9/j7qC0LCkVMSXkog=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "lKyAXJ4S6uXuSR1/pQ9gCGHYSLI=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "NVSUO8GRtIWDm7IexnBSmQWvBh8=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "ETmB3lf15r4sn18bB9ilBQVXto4=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "I1sxeu8aJOiM3a5/tnJya8blE3A=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "AnipOpUAJroLkoknx4xacrO0qSA=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "lAweYYdjcZ6acj6oI3HI9hX3eIQ=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "X/WdGuHGMxRCvufmQxstVjdbFT4=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "smOJ/rypXb18/Rjryf2a85paSa4=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { - "checksumSHA1": "l3VeRGYSCtkXBvqVNVwRqb03Jko=", + "checksumSHA1": "0NGBJyXbKYwa+5iOOaDLkhV11OQ=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "kapXC7OZ1fnkZ3N6p19+WUafn40=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "Hi/sxx81pqe+fI5VrS5+UK2DsDU=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "KidzwXO5VKKI9zIuTAUsuF7KxIM=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "OUQpREA6ZLi/zTX4vZc56+ZoZLI=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "PfOnZISLrj6QcD+BpZH0EAeawQU=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "cyCJGeDReKwRq69kTcd4lozkuIg=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "NLj37wyUZIo8/Rp3zp+LDfr878M=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "nXAp7K8BCFvsaSdorGV7swBEQgA=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "q4qCE/5OiBJA1k8P0jQRx9UhKvs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "hAIPfcEcdc8xJ7MseIufmssdE/s=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "1Fin0tclPDC/+rL7V06GrzXaMXI=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "T8ABBS2aS6yRTD6w3kjpgFLe/Zw=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "q5ApQXXApBOPXOYOLDOetdC4MNw=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "llx3DydC0nTbF0cZoYUjO9P1eZw=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "i1yLjEKjcDxm0rakhcaDuAcQb7I=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "Mf9nXjY0+Lq5RxEGEIYCYL8u+Kc=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "iRNs3RoLjrzcBsPrSynhbEqY/4s=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "LzD/Yb1Xzc4OPKZZadOGV2fpQto=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "4f5d298bd2dcb34b06d944594f458d1f77ac4d66", - "revisionTime": "2018-05-04T20:21:19Z", - "version": "v1.13.42", - "versionExact": "v1.13.42" + "revision": "31a85efbe3bc741eb539d6310c8e66030b7c5cb7", + "revisionTime": "2018-05-10T23:29:53Z", + "version": "v1.13.47", + "versionExact": "v1.13.47" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From e5e831aa4b0479479c2267b11340375f05384a1b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 09:50:51 -0400 Subject: [PATCH 1024/3316] Update CHANGELOG for #4506 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24221343ca2..6bb4b02a17f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.19.0 (Unreleased) +ENHANCEMENTS: + +* resource/aws_dms_endpoint: Add `azuredb` for `engine_name` validation [GH-4506] + BUG FIXES: * resource/aws_security_group: Fix rule description handling when gathering multiple rules with same permissions [GH-4416] From 747c9e8f9ab398d184e7e12ee1b79cc62b3065d2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 09:51:50 -0400 Subject: [PATCH 1025/3316] Document s3 as valid engine_name --- website/docs/r/dms_endpoint.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/dms_endpoint.html.markdown b/website/docs/r/dms_endpoint.html.markdown index df6253ed6b7..d5d6462226e 100644 --- a/website/docs/r/dms_endpoint.html.markdown +++ b/website/docs/r/dms_endpoint.html.markdown @@ -53,7 +53,7 @@ The following arguments are supported: - Must not contain two consecutive hyphens * `endpoint_type` - (Required) The type of endpoint. Can be one of `source | target`. -* `engine_name` - (Required) The type of engine for the endpoint. Can be one of `mysql | oracle | postgres | mariadb | aurora | redshift | sybase | sqlserver | dynamodb | mongodb | azuredb`. +* `engine_name` - (Required) The type of engine for the endpoint. Can be one of `mysql | oracle | postgres | mariadb | aurora | redshift | sybase | sqlserver | dynamodb | mongodb | s3 | azuredb`. * `extra_connection_attributes` - (Optional) Additional attributes associated with the connection. For available attributes see [Using Extra Connection Attributes with AWS Database Migration Service](http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Introduction.ConnectionAttributes.html). * `kms_key_arn` - (Optional) The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kms_key_arn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region. * `password` - (Optional) The password to be used to login to the endpoint database. From 5c23665c4386a0c86662392bec54fb1e6c45882a Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 11 May 2018 18:24:25 +0400 Subject: [PATCH 1026/3316] issue #4449 Add new attribute iam_instance_profile_arn --- aws/resource_aws_spot_fleet_request.go | 17 ++++++++++++++++- website/docs/r/spot_fleet_request.html.markdown | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index fa95c77044a..009019664d6 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -191,6 +191,11 @@ func resourceAwsSpotFleetRequest() *schema.Resource { ForceNew: true, Optional: true, }, + "iam_instance_profile_arn": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + }, "ami": { Type: schema.TypeString, Required: true, @@ -371,6 +376,12 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{ } if v, ok := d["iam_instance_profile"]; ok { + opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ + Name: aws.String(v.(string)), + } + } + + if v, ok := d["iam_instance_profile_arn"]; ok { opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ Arn: aws.String(v.(string)), } @@ -935,8 +946,12 @@ func launchSpecToMap(l *ec2.SpotFleetLaunchSpecification, rootDevName *string) m m["monitoring"] = aws.BoolValue(l.Monitoring.Enabled) } + if l.IamInstanceProfile != nil && l.IamInstanceProfile.Name != nil { + m["iam_instance_profile"] = aws.StringValue(l.IamInstanceProfile.Name) + } + if l.IamInstanceProfile != nil && l.IamInstanceProfile.Arn != nil { - m["iam_instance_profile"] = aws.StringValue(l.IamInstanceProfile.Arn) + m["iam_instance_profile_arn"] = aws.StringValue(l.IamInstanceProfile.Arn) } if l.UserData != nil { diff --git a/website/docs/r/spot_fleet_request.html.markdown b/website/docs/r/spot_fleet_request.html.markdown index 14008c58b30..3a87ca5a592 100644 --- a/website/docs/r/spot_fleet_request.html.markdown +++ b/website/docs/r/spot_fleet_request.html.markdown @@ -27,7 +27,7 @@ resource "aws_spot_fleet_request" "cheap_compute" { ami = "ami-1234" spot_price = "2.793" placement_tenancy = "dedicated" - iam_instance_profile = "arn:aws:iam::12345678:instance-profile/webserver-role" + iam_instance_profile_arn = "arn:aws:iam::12345678:instance-profile/webserver-role" } launch_specification { @@ -35,7 +35,7 @@ resource "aws_spot_fleet_request" "cheap_compute" { ami = "ami-5678" key_name = "my-key" spot_price = "1.117" - iam_instance_profile = "arn:aws:iam::12345678:instance-profile/webserver-role" + iam_instance_profile_arn = "arn:aws:iam::12345678:instance-profile/webserver-role" availability_zone = "us-west-1a" subnet_id = "subnet-1234" weighted_capacity = 35 From dd2611c01312f8c28f899b643920c84dec3c6ce0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 11:51:28 -0400 Subject: [PATCH 1027/3316] Update CHANGELOG for #4248 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bb4b02a17f..3f5ac312de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ ## 1.19.0 (Unreleased) +NOTES: + +* data-source/aws_iam_policy_document: Please note there is a behavior change in the rendering of `principal`/`not_principal` in the case of `type = "AWS"` and `identifiers = ["*"]`. This will now render as `Principal": {"AWS": "*"}` instead of `"Principal": "*"`. This change is required for IAM role trust policy support as well as differentiating between anonymous access versus AWS access in policies. To keep the old behavior of anonymous access, use `type = "*"` and `identifiers = ["*"]`, which will continue to render as `"Principal": "*"`. For additional information, see the [`aws_iam_policy_document` documentation](https://www.terraform.io/docs/providers/aws/d/iam_policy_document.html). + ENHANCEMENTS: +* data-source/aws_iam_policy_document: Allow rendering of `Principal": {"AWS": "*"}` (required for IAM role trust policies) [GH-4248] * resource/aws_dms_endpoint: Add `azuredb` for `engine_name` validation [GH-4506] BUG FIXES: From e00f22f6a73a97c2977263e9fd337e6cc6037c17 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 11:52:30 -0400 Subject: [PATCH 1028/3316] Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f5ac312de2..93790d5a129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ NOTES: ENHANCEMENTS: -* data-source/aws_iam_policy_document: Allow rendering of `Principal": {"AWS": "*"}` (required for IAM role trust policies) [GH-4248] +* data-source/aws_iam_policy_document: Allow rendering of `"Principal": {"AWS": "*"}` (required for IAM role trust policies) [GH-4248] * resource/aws_dms_endpoint: Add `azuredb` for `engine_name` validation [GH-4506] BUG FIXES: From dac19e1f8d83cde6b5c6d781d078d61b1b9df92f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 12:10:35 -0400 Subject: [PATCH 1029/3316] Update CHANGELOG for #3968 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93790d5a129..a965078da1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ NOTES: ENHANCEMENTS: * data-source/aws_iam_policy_document: Allow rendering of `"Principal": {"AWS": "*"}` (required for IAM role trust policies) [GH-4248] +* resource/aws_api_gateway_rest_api: Add `execution_arn` attribute [GH-3968] * resource/aws_dms_endpoint: Add `azuredb` for `engine_name` validation [GH-4506] BUG FIXES: From c3cf278cad93db32dd1670bdca16547bcec7daf9 Mon Sep 17 00:00:00 2001 From: Richard Henning Date: Fri, 11 May 2018 12:43:41 -0400 Subject: [PATCH 1030/3316] Fix typo in documentation for route53_record * `multivalue_answer_routing_policy` is a boolean, not a block. --- website/docs/r/route53_record.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/route53_record.html.markdown b/website/docs/r/route53_record.html.markdown index cb2a6e40b52..9b2eb92aa88 100644 --- a/website/docs/r/route53_record.html.markdown +++ b/website/docs/r/route53_record.html.markdown @@ -107,7 +107,7 @@ The following arguments are supported: * `geolocation_routing_policy` - (Optional) A block indicating a routing policy based on the geolocation of the requestor. Conflicts with any other routing policy. Documented below. * `latency_routing_policy` - (Optional) A block indicating a routing policy based on the latency between the requestor and an AWS region. Conflicts with any other routing policy. Documented below. * `weighted_routing_policy` - (Optional) A block indicating a weighted routing policy. Conflicts with any other routing policy. Documented below. -* `multivalue_answer_routing_policy` - (Optional) A block indicating a multivalue answer routing policy. Conflicts with any other routing policy. +* `multivalue_answer_routing_policy` - (Optional) Set to `true` to indicate a multivalue answer routing policy. Conflicts with any other routing policy. * `allow_overwrite` - (Optional) Allow creation of this record in Terraform to overwrite an existing record, if any. This does not prevent other resources within Terraform or manual Route53 changes from overwriting this record. `true` by default. Exactly one of `records` or `alias` must be specified: this determines whether it's an alias record. From 255112592b0661da7528bb8137082deb0337bfe8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 12:46:16 -0400 Subject: [PATCH 1031/3316] Update CHANGELOG for #4383 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a965078da1d..330a6d17fc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_elb: Ensure `bucket_prefix` for access logging can be updated to `""` [GH-4383] +* resource/aws_lb: Ensure `bucket_prefix` for access logging can be updated to `""` [GH-4383] * resource/aws_security_group: Fix rule description handling when gathering multiple rules with same permissions [GH-4416] ## 1.18.0 (May 10, 2018) From f3bee62fddc27e1ad9f8aa5d90acb53bcfb49741 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 13:19:40 -0400 Subject: [PATCH 1032/3316] resource/aws_lb: Ensure `access_logs` is properly set into Terraform state --- aws/resource_aws_lb.go | 11 ++++++----- aws/resource_aws_lb_test.go | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index ff022d89ba6..a6a254d1e66 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -714,11 +714,11 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo for _, attr := range attributesResp.Attributes { switch *attr.Key { case "access_logs.s3.enabled": - accessLogMap["enabled"] = *attr.Value + accessLogMap["enabled"] = aws.StringValue(attr.Value) == "true" case "access_logs.s3.bucket": - accessLogMap["bucket"] = *attr.Value + accessLogMap["bucket"] = aws.StringValue(attr.Value) case "access_logs.s3.prefix": - accessLogMap["prefix"] = *attr.Value + accessLogMap["prefix"] = aws.StringValue(attr.Value) case "idle_timeout.timeout_seconds": timeout, err := strconv.Atoi(*attr.Value) if err != nil { @@ -741,9 +741,10 @@ func flattenAwsLbResource(d *schema.ResourceData, meta interface{}, lb *elbv2.Lo } } - log.Printf("[DEBUG] Setting ALB Access Logs: %#v", accessLogMap) if accessLogMap["bucket"] != "" || accessLogMap["prefix"] != "" { - d.Set("access_logs", []interface{}{accessLogMap}) + if err := d.Set("access_logs", []interface{}{accessLogMap}); err != nil { + return fmt.Errorf("error setting access_logs: %s", err) + } } else { d.Set("access_logs", []interface{}{}) } diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 8e72328ec75..c37d90f001e 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -584,6 +584,11 @@ func TestAccAWSLB_accesslogs(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb.lb_test", "arn"), ), }, + { + ResourceName: "aws_lb.lb_test", + ImportState: true, + ImportStateVerify: true, + }, }, }) } From f80d53b54fddfbe6a9f6a31a128f660570fb996e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 13:32:09 -0400 Subject: [PATCH 1033/3316] Update CHANGELOG for #4367 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 330a6d17fc2..70b8b07bc99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_elb: Ensure `bucket_prefix` for access logging can be updated to `""` [GH-4383] +* resource/aws_launch_template: Allow `network_interfaces` `device_index` to be set to 0 [GH-4367] * resource/aws_lb: Ensure `bucket_prefix` for access logging can be updated to `""` [GH-4383] * resource/aws_security_group: Fix rule description handling when gathering multiple rules with same permissions [GH-4416] From dfa205f65bc0c25f18c7b38923ba797cb988f495 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 14:02:41 -0400 Subject: [PATCH 1034/3316] resource/aws_kinesis_firehose_delivery_stream: Retry on Elasticsearch destination IAM role errors and update IAM errors --- ...ce_aws_kinesis_firehose_delivery_stream.go | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index fa09a219ce4..0a2fb320ecc 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -1426,7 +1426,7 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) // Retry for IAM eventual consistency - if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to perform") { + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") { return resource.RetryableError(err) } // IAM roles can take ~10 seconds to propagate in AWS: @@ -1545,7 +1545,28 @@ func resourceAwsKinesisFirehoseDeliveryStreamUpdate(d *schema.ResourceData, meta } } - _, err := conn.UpdateDestination(updateInput) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.UpdateDestination(updateInput) + if err != nil { + log.Printf("[DEBUG] Error creating Firehose Delivery Stream: %s", err) + + // Retry for IAM eventual consistency + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") { + return resource.RetryableError(err) + } + // IAM roles can take ~10 seconds to propagate in AWS: + // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console + if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Firehose is unable to assume role") { + log.Printf("[DEBUG] Firehose could not assume role referenced, retrying...") + return resource.RetryableError(err) + } + // Not retryable + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { return fmt.Errorf( "Error Updating Kinesis Firehose Delivery Stream: \"%s\"\n%s", From ad5673f21e18b05beed918341a59652d54f8b4d3 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 11 May 2018 22:22:04 +0400 Subject: [PATCH 1035/3316] issue #4449 Add acceptance test --- aws/resource_aws_spot_fleet_request_test.go | 167 ++++++++++++++++++ .../docs/r/spot_fleet_request.html.markdown | 29 +-- 2 files changed, 182 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index 918dbc995de..c4dbb88555e 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "log" + "regexp" "testing" "time" @@ -107,6 +108,30 @@ func TestAccAWSSpotFleetRequest_instanceInterruptionBehavior(t *testing.T) { }) } +func TestAccAWSSpotFleetRequest_iamInstanceProfileArn(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestConfigIamInstanceProfileArn(rName, rInt), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists( + "aws_spot_fleet_request.foo", &sfr), + resource.TestCheckResourceAttr( + "aws_spot_fleet_request.foo", "spot_request_state", "active"), + testAccCheckAWSSpotFleetRequest_IamInstanceProfileArn(&sfr), + ), + }, + }, + }) +} + func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(t *testing.T) { var before, after ec2.SpotFleetRequestConfig rName := acctest.RandString(10) @@ -602,6 +627,29 @@ func TestAccAWSSpotFleetRequest_WithELBs(t *testing.T) { }) } +func testAccCheckAWSSpotFleetRequest_IamInstanceProfileArn( + sfr *ec2.SpotFleetRequestConfig) resource.TestCheckFunc { + return func(s *terraform.State) error { + if len(sfr.SpotFleetRequestConfig.LaunchSpecifications) == 0 { + return errors.New("Missing launch specification") + } + + spec := *sfr.SpotFleetRequestConfig.LaunchSpecifications[0] + + profile := spec.IamInstanceProfile + if profile == nil { + return fmt.Errorf("Expected IamInstanceProfile to be set, got nil") + } + //Validate the string whether it is ARN + re := regexp.MustCompile("arn:aws:iam::\\d{12}:instance-profile/?[a-zA-Z0-9+=,.@-_].*") + if !re.MatchString(*profile.Arn) { + return fmt.Errorf("Expected IamInstanceProfile input as ARN, got %s", *profile.Arn) + } + + return nil + } +} + func TestAccAWSSpotFleetRequest_WithTargetGroups(t *testing.T) { var sfr ec2.SpotFleetRequestConfig rName := acctest.RandString(10) @@ -757,6 +805,125 @@ resource "aws_spot_fleet_request" "foo" { `, rName, rInt, rInt, rName) } +func testAccAWSSpotFleetRequestConfigIamInstanceProfileArn(rName string, rInt int) string { + return fmt.Sprintf(` +resource "aws_key_pair" "debugging" { + key_name = "tmp-key-%s" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 phodgson@thoughtworks.com" +} + +resource "aws_iam_policy" "test-policy" { + name = "test-policy-%d" + path = "/" + description = "Spot Fleet Request ACCTest Policy" + policy = < Date: Fri, 11 May 2018 15:38:47 -0400 Subject: [PATCH 1036/3316] Update CHANGELOG for #4511 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b8b07bc99..9910d09cd95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: * data-source/aws_iam_policy_document: Allow rendering of `"Principal": {"AWS": "*"}` (required for IAM role trust policies) [GH-4248] * resource/aws_api_gateway_rest_api: Add `execution_arn` attribute [GH-3968] * resource/aws_dms_endpoint: Add `azuredb` for `engine_name` validation [GH-4506] +* resource/aws_spot_fleet_request: Add `launch_specification` `iam_instance_profile_arn` argument [GH-4511] BUG FIXES: From c1c6ac48920afa86278f11184ac5e108d501de02 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 15:50:19 -0400 Subject: [PATCH 1037/3316] tests/resource/aws_kinesis_firehose_delivery_stream: Fix Elasticsearch IAM policy handling --- ...s_kinesis_firehose_delivery_stream_test.go | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index b389939e0d0..d499a3797d9 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -414,10 +414,10 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates(t *testi policyName := fmt.Sprintf("tf_acc_policy_%s", rString) roleName := fmt.Sprintf("tf_acc_role_%s", rString) preConfig := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_ElasticsearchBasic, - ri, ri, ri, ri, ri, ri) + ri, ri, ri, ri, ri) postConfig := testAccFirehoseAWSLambdaConfigBasic(funcName, policyName, roleName) + fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_ElasticsearchUpdate, - ri, ri, ri, ri, ri, ri) + ri, ri, ri, ri, ri) updatedElasticSearchConfig := &firehose.ElasticsearchDestinationDescription{ BufferingHints: &firehose.ElasticsearchBufferingHints{ @@ -1285,27 +1285,35 @@ resource "aws_elasticsearch_domain" "test_cluster" { cluster_config { instance_type = "m3.medium.elasticsearch" } +} - access_policies = < Date: Fri, 11 May 2018 16:00:57 -0400 Subject: [PATCH 1038/3316] resource/aws_db_event_subscription: Fix read function to use ID and add Computed: true to name attribute --- aws/resource_aws_db_event_subscription.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_db_event_subscription.go b/aws/resource_aws_db_event_subscription.go index 0f1d8ce4a7f..e3991b32f89 100644 --- a/aws/resource_aws_db_event_subscription.go +++ b/aws/resource_aws_db_event_subscription.go @@ -33,6 +33,7 @@ func resourceAwsDbEventSubscription() *schema.Resource { "name": { Type: schema.TypeString, Optional: true, + Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, ValidateFunc: validateDbEventSubscriptionName, @@ -151,7 +152,7 @@ func resourceAwsDbEventSubscriptionCreate(d *schema.ResourceData, meta interface func resourceAwsDbEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn - sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Get("name").(string), conn) + sub, err := resourceAwsDbEventSubscriptionRetrieve(d.Id(), conn) if err != nil { return fmt.Errorf("Error retrieving RDS Event Subscription %s: %s", d.Id(), err) } From 0cbaba33ec491e12f46808ec74e67a35eb5b0c5c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 16:17:20 -0400 Subject: [PATCH 1039/3316] tests/resource/aws_sns_sms_preferences: Serialize testing and fix destroy function --- aws/resource_aws_sns_sms_preferences_test.go | 60 +++++++++++++++----- 1 file changed, 47 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_sns_sms_preferences_test.go b/aws/resource_aws_sns_sms_preferences_test.go index 10a749eb9ea..a5c26b4f08d 100644 --- a/aws/resource_aws_sns_sms_preferences_test.go +++ b/aws/resource_aws_sns_sms_preferences_test.go @@ -5,18 +5,37 @@ import ( "regexp" "testing" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sns" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSSNSSMSPreferences_empty(t *testing.T) { +// The preferences are account-wide, so the tests must be serialized +func TestAccAWSSNSSMSPreferences(t *testing.T) { + testCases := map[string]func(t *testing.T){ + "almostAll": testAccAWSSNSSMSPreferences_almostAll, + "defaultSMSType": testAccAWSSNSSMSPreferences_defaultSMSType, + "deliveryRole": testAccAWSSNSSMSPreferences_deliveryRole, + "empty": testAccAWSSNSSMSPreferences_empty, + } + + for name, tc := range testCases { + tc := tc + t.Run(name, func(t *testing.T) { + tc(t) + }) + } +} + +func testAccAWSSNSSMSPreferences_empty(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSSNSSMSPreferences_empty, + Config: testAccAWSSNSSMSPreferencesConfig_empty, Check: resource.ComposeTestCheckFunc( resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit"), resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn"), @@ -30,14 +49,14 @@ func TestAccAWSSNSSMSPreferences_empty(t *testing.T) { }) } -func TestAccAWSSNSSMSPreferences_defaultSMSType(t *testing.T) { +func testAccAWSSNSSMSPreferences_defaultSMSType(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSSNSSMSPreferences_defSMSType, + Config: testAccAWSSNSSMSPreferencesConfig_defSMSType, Check: resource.ComposeTestCheckFunc( resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit"), resource.TestCheckNoResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn"), @@ -51,14 +70,14 @@ func TestAccAWSSNSSMSPreferences_defaultSMSType(t *testing.T) { }) } -func TestAccAWSSNSSMSPreferences_almostAll(t *testing.T) { +func testAccAWSSNSSMSPreferences_almostAll(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSSNSSMSPreferences_almostAll, + Config: testAccAWSSNSSMSPreferencesConfig_almostAll, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "monthly_spend_limit", "1"), resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "default_sms_type", "Transactional"), @@ -69,7 +88,7 @@ func TestAccAWSSNSSMSPreferences_almostAll(t *testing.T) { }) } -func TestAccAWSSNSSMSPreferences_deliveryRole(t *testing.T) { +func testAccAWSSNSSMSPreferences_deliveryRole(t *testing.T) { arnRole := regexp.MustCompile(`^arn:aws:iam::\d+:role/test_smsdelivery_role$`) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -77,7 +96,7 @@ func TestAccAWSSNSSMSPreferences_deliveryRole(t *testing.T) { CheckDestroy: testAccCheckAWSSNSSMSPrefsDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccAWSSNSSMSPreferences_deliveryRole, + Config: testAccAWSSNSSMSPreferencesConfig_deliveryRole, Check: resource.ComposeTestCheckFunc( resource.TestMatchResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_iam_role_arn", arnRole), resource.TestCheckResourceAttr("aws_sns_sms_preferences.test_pref", "delivery_status_success_sampling_rate", "75"), @@ -93,28 +112,43 @@ func testAccCheckAWSSNSSMSPrefsDestroy(s *terraform.State) error { continue } - return fmt.Errorf("SNS SMS Preferences resource exists when it should be destroyed!") + conn := testAccProvider.Meta().(*AWSClient).snsconn + attrs, err := conn.GetSMSAttributes(&sns.GetSMSAttributesInput{}) + if err != nil { + return fmt.Errorf("error getting SMS attributes: %s", err) + } + if attrs == nil || len(attrs.Attributes) == 0 { + return nil + } + + for attrName, attrValue := range attrs.Attributes { + if aws.StringValue(attrValue) != "" { + return fmt.Errorf("expected SMS attribute %q to be empty, but received: %s", attrName, aws.StringValue(attrValue)) + } + } + + return nil } return nil } -const testAccAWSSNSSMSPreferences_empty = ` +const testAccAWSSNSSMSPreferencesConfig_empty = ` resource "aws_sns_sms_preferences" "test_pref" {} ` -const testAccAWSSNSSMSPreferences_defSMSType = ` +const testAccAWSSNSSMSPreferencesConfig_defSMSType = ` resource "aws_sns_sms_preferences" "test_pref" { default_sms_type = "Transactional" } ` -const testAccAWSSNSSMSPreferences_almostAll = ` +const testAccAWSSNSSMSPreferencesConfig_almostAll = ` resource "aws_sns_sms_preferences" "test_pref" { monthly_spend_limit = "1", default_sms_type = "Transactional", usage_report_s3_bucket = "some-bucket", } ` -const testAccAWSSNSSMSPreferences_deliveryRole = ` +const testAccAWSSNSSMSPreferencesConfig_deliveryRole = ` resource "aws_iam_role" "test_smsdelivery_role" { name = "test_smsdelivery_role" path = "/" From 0f420f0ffe0601ec8882247662e2562d127b2739 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 16:38:57 -0400 Subject: [PATCH 1040/3316] Update CHANGELOG for #3858 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9910d09cd95..ddc6eff77f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ NOTES: * data-source/aws_iam_policy_document: Please note there is a behavior change in the rendering of `principal`/`not_principal` in the case of `type = "AWS"` and `identifiers = ["*"]`. This will now render as `Principal": {"AWS": "*"}` instead of `"Principal": "*"`. This change is required for IAM role trust policy support as well as differentiating between anonymous access versus AWS access in policies. To keep the old behavior of anonymous access, use `type = "*"` and `identifiers = ["*"]`, which will continue to render as `"Principal": "*"`. For additional information, see the [`aws_iam_policy_document` documentation](https://www.terraform.io/docs/providers/aws/d/iam_policy_document.html). +FEATURES: + +* **New Resource:** `aws_sns_sms_preferences` [GH-3858] + ENHANCEMENTS: * data-source/aws_iam_policy_document: Allow rendering of `"Principal": {"AWS": "*"}` (required for IAM role trust policies) [GH-4248] From 0b9dcb95a6559e55c045577cb5cb1c1ebf27c498 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 16:56:23 -0400 Subject: [PATCH 1041/3316] Update CHANGELOG for #2754 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddc6eff77f0..2f5517a6a1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ENHANCEMENTS: * data-source/aws_iam_policy_document: Allow rendering of `"Principal": {"AWS": "*"}` (required for IAM role trust policies) [GH-4248] * resource/aws_api_gateway_rest_api: Add `execution_arn` attribute [GH-3968] +* resource/aws_db_event_subscription: Add `name_prefix` argument [GH-2754] * resource/aws_dms_endpoint: Add `azuredb` for `engine_name` validation [GH-4506] * resource/aws_spot_fleet_request: Add `launch_specification` `iam_instance_profile_arn` argument [GH-4511] From e3b9efcc0781193992a79fc34793d36e84ac86b8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 11 May 2018 22:31:40 -0400 Subject: [PATCH 1042/3316] Update CHANGELOG for #4517 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f5517a6a1d..543900b13db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ BUG FIXES: * resource/aws_elb: Ensure `bucket_prefix` for access logging can be updated to `""` [GH-4383] * resource/aws_launch_template: Allow `network_interfaces` `device_index` to be set to 0 [GH-4367] * resource/aws_lb: Ensure `bucket_prefix` for access logging can be updated to `""` [GH-4383] +* resource/aws_lb: Ensure `access_logs` is properly set into Terraform state [GH-4517] * resource/aws_security_group: Fix rule description handling when gathering multiple rules with same permissions [GH-4416] ## 1.18.0 (May 10, 2018) From 22c253e255a8482e84e59ae9cad3d59767a26bd0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 12 May 2018 01:34:14 -0400 Subject: [PATCH 1043/3316] resource/aws_rds_cluster: Add backtrack_window argument and wait for updates to complete --- aws/resource_aws_rds_cluster.go | 43 ++++++++++++++++++-- aws/resource_aws_rds_cluster_test.go | 52 ++++++++++++++++++++++++ website/docs/r/rds_cluster.html.markdown | 4 +- 3 files changed, 94 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index 02b6dfcb22c..5a7de7d610e 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -43,6 +43,12 @@ func resourceAwsRDSCluster() *schema.Resource { Set: schema.HashString, }, + "backtrack_window": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 259200), + }, + "cluster_identifier": { Type: schema.TypeString, Optional: true, @@ -328,9 +334,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error if _, ok := d.GetOk("snapshot_identifier"); ok { opts := rds.RestoreDBClusterFromSnapshotInput{ + BacktrackWindow: aws.Int64(int64(d.Get("backtrack_window").(int))), DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), - SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), + SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), Tags: tags, } @@ -420,6 +427,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } } else if _, ok := d.GetOk("replication_source_identifier"); ok { createOpts := &rds.CreateDBClusterInput{ + BacktrackWindow: aws.Int64(int64(d.Get("backtrack_window").(int))), DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), @@ -499,17 +507,18 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } s3_bucket := v.([]interface{})[0].(map[string]interface{}) createOpts := &rds.RestoreDBClusterFromS3Input{ + BacktrackWindow: aws.Int64(int64(d.Get("backtrack_window").(int))), DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), MasterUsername: aws.String(d.Get("master_username").(string)), MasterUserPassword: aws.String(d.Get("master_password").(string)), - StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), - Tags: tags, S3BucketName: aws.String(s3_bucket["bucket_name"].(string)), S3IngestionRoleArn: aws.String(s3_bucket["ingestion_role"].(string)), S3Prefix: aws.String(s3_bucket["bucket_prefix"].(string)), SourceEngine: aws.String(s3_bucket["source_engine"].(string)), SourceEngineVersion: aws.String(s3_bucket["source_engine_version"].(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + Tags: tags, } if v := d.Get("database_name"); v.(string) != "" { @@ -591,6 +600,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } createOpts := &rds.CreateDBClusterInput{ + BacktrackWindow: aws.Int64(int64(d.Get("backtrack_window").(int))), DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), MasterUserPassword: aws.String(d.Get("master_password").(string)), @@ -751,6 +761,7 @@ func flattenAwsRdsClusterResource(d *schema.ResourceData, meta interface{}, dbc d.Set("database_name", dbc.DatabaseName) } + d.Set("backtrack_window", int(aws.Int64Value(dbc.BacktrackWindow))) d.Set("cluster_identifier", dbc.DBClusterIdentifier) d.Set("cluster_resource_id", dbc.DbClusterResourceId) d.Set("db_subnet_group_name", dbc.DBSubnetGroup) @@ -819,6 +830,11 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error DBClusterIdentifier: aws.String(d.Id()), } + if d.HasChange("backtrack_window") { + req.BacktrackWindow = aws.Int64(int64(d.Get("backtrack_window").(int))) + requestUpdate = true + } + if d.HasChange("master_password") { req.MasterUserPassword = aws.String(d.Get("master_password").(string)) requestUpdate = true @@ -876,6 +892,21 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("Failed to modify RDS Cluster (%s): %s", d.Id(), err) } + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsRdsClusterUpdatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsRDSClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutUpdate), + MinTimeout: 10 * time.Second, + Delay: 10 * time.Second, + } + + log.Printf("[INFO] Waiting for RDS Cluster (%s) to modify", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for RDS Cluster (%s) to modify: %s", d.Id(), err) + } } if d.HasChange("iam_roles") { @@ -1059,3 +1090,9 @@ var resourceAwsRdsClusterDeletePendingStates = []string{ "backing-up", "modifying", } + +var resourceAwsRdsClusterUpdatePendingStates = []string{ + "backing-up", + "modifying", + "resetting-master-credentials", +} diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index 729cda55842..b1171ad78b6 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -31,6 +31,7 @@ func TestAccAWSRDSCluster_basic(t *testing.T) { Config: testAccAWSClusterConfig(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "backtrack_window", "0"), resource.TestCheckResourceAttr(resourceName, "storage_encrypted", "false"), resource.TestCheckResourceAttr(resourceName, "db_cluster_parameter_group_name", "default.aurora5.6"), resource.TestCheckResourceAttrSet(resourceName, "reader_endpoint"), @@ -44,6 +45,44 @@ func TestAccAWSRDSCluster_basic(t *testing.T) { }) } +func TestAccAWSRDSCluster_BacktrackWindow(t *testing.T) { + var dbCluster rds.DBCluster + resourceName := "aws_rds_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSClusterConfig_BacktrackWindow(43200), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "backtrack_window", "43200"), + ), + }, + { + Config: testAccAWSClusterConfig_BacktrackWindow(86400), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "backtrack_window", "86400"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "apply_immediately", + "cluster_identifier_prefix", + "master_password", + "skip_final_snapshot", + }, + }, + }, + }) +} + func TestAccAWSRDSCluster_namePrefix(t *testing.T) { var v rds.DBCluster @@ -535,6 +574,19 @@ resource "aws_rds_cluster" "default" { }`, n) } +func testAccAWSClusterConfig_BacktrackWindow(backtrackWindow int) string { + return fmt.Sprintf(` +resource "aws_rds_cluster" "test" { + apply_immediately = true + backtrack_window = %d + cluster_identifier_prefix = "tf-acc-test-" + master_password = "mustbeeightcharaters" + master_username = "test" + skip_final_snapshot = true +} +`, backtrackWindow) +} + func testAccAWSClusterConfig_namePrefix(n int) string { return fmt.Sprintf(` resource "aws_rds_cluster" "test" { diff --git a/website/docs/r/rds_cluster.html.markdown b/website/docs/r/rds_cluster.html.markdown index 78146709159..b9fdbeefb80 100644 --- a/website/docs/r/rds_cluster.html.markdown +++ b/website/docs/r/rds_cluster.html.markdown @@ -94,8 +94,8 @@ The following arguments are supported: * `skip_final_snapshot` - (Optional) Determines whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from `final_snapshot_identifier`. Default is `false`. * `availability_zones` - (Optional) A list of EC2 Availability Zones that instances in the DB cluster can be created in -* `backup_retention_period` - (Optional) The days to retain backups for. Default -1 +* `backtrack_window` - (Optional) The target backtrack window, in seconds. To disable backtracking, set this value to `0`. Default `0`. Must be between `0` and `259200` (72 hours) +* `backup_retention_period` - (Optional) The days to retain backups for. Default `1` * `preferred_backup_window` - (Optional) The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC Default: A 30-minute window selected at random from an 8-hour block of time per region. e.g. 04:00-09:00 * `preferred_maintenance_window` - (Optional) The weekly time range during which system maintenance can occur, in (UTC) e.g. wed:04:00-wed:04:30 From ab6876fd095e9ce2f8413819c580b905c813b7a0 Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Sat, 12 May 2018 21:14:11 +0100 Subject: [PATCH 1044/3316] Attempt to implement #4525 aws_db_cluster_snapshot based on aws_db_snapshot ``` % TESTARGS="-run TestAccAwsDbClusterSnapshotDataSource_basic" make testacc ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./... -v -run TestAccAwsDbClusterSnapshotDataSource_basic -timeout 120m ? github.com/terraform-providers/terraform-provider-aws [no test files] === RUN TestAccAwsDbClusterSnapshotDataSource_basic --- PASS: TestAccAwsDbClusterSnapshotDataSource_basic (693.03s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 693.069s % TESTARGS="-run TestAccAWSDBClusterSnapshot_basic" make testacc ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./... -v -run TestAccAWSDBClusterSnapshot_basic -timeout 120m ? github.com/terraform-providers/terraform-provider-aws [no test files] === RUN TestAccAWSDBClusterSnapshot_basic --- PASS: TestAccAWSDBClusterSnapshot_basic (699.86s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 699.907s ``` --- aws/data_source_aws_db_cluster_snapshot.go | 210 ++++++++++++++++++ ...ata_source_aws_db_cluster_snapshot_test.go | 101 +++++++++ aws/provider.go | 2 + aws/resource_aws_db_cluster_snapshot.go | 199 +++++++++++++++++ aws/resource_aws_db_cluster_snapshot_test.go | 112 ++++++++++ 5 files changed, 624 insertions(+) create mode 100644 aws/data_source_aws_db_cluster_snapshot.go create mode 100644 aws/data_source_aws_db_cluster_snapshot_test.go create mode 100644 aws/resource_aws_db_cluster_snapshot.go create mode 100644 aws/resource_aws_db_cluster_snapshot_test.go diff --git a/aws/data_source_aws_db_cluster_snapshot.go b/aws/data_source_aws_db_cluster_snapshot.go new file mode 100644 index 00000000000..6aa4f280fa5 --- /dev/null +++ b/aws/data_source_aws_db_cluster_snapshot.go @@ -0,0 +1,210 @@ +package aws + +import ( + "fmt" + "log" + "sort" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsDbClusterSnapshot() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsDbClusterSnapshotRead, + + Schema: map[string]*schema.Schema{ + //selection criteria + "db_cluster_identifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + + "db_cluster_snapshot_identifier": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + + "snapshot_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + + "include_shared": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + + "include_public": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + "most_recent": { + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + + //Computed values returned + "allocated_storage": { + Type: schema.TypeInt, + Computed: true, + }, + "availability_zones": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "db_cluster_snapshot_arn": { + Type: schema.TypeString, + Computed: true, + }, + "storage_encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + "engine": { + Type: schema.TypeString, + Computed: true, + }, + "engine_version": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "license_model": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "source_db_cluster_snapshot_arn": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_create_time": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + clusterIdentifier, clusterIdentifierOk := d.GetOk("db_cluster_identifier") + snapshotIdentifier, snapshotIdentifierOk := d.GetOk("db_cluster_snapshot_identifier") + + if !clusterIdentifierOk && !snapshotIdentifierOk { + return fmt.Errorf("One of db_cluster_snapshot_identifier or db_cluster_identifier must be assigned") + } + + params := &rds.DescribeDBClusterSnapshotsInput{ + IncludePublic: aws.Bool(d.Get("include_public").(bool)), + IncludeShared: aws.Bool(d.Get("include_shared").(bool)), + } + if v, ok := d.GetOk("snapshot_type"); ok { + params.SnapshotType = aws.String(v.(string)) + } + if clusterIdentifierOk { + params.DBClusterIdentifier = aws.String(clusterIdentifier.(string)) + } + if snapshotIdentifierOk { + params.DBClusterSnapshotIdentifier = aws.String(snapshotIdentifier.(string)) + } + + log.Printf("[DEBUG] Reading DB Cluster Snapshot: %s", params) + resp, err := conn.DescribeDBClusterSnapshots(params) + if err != nil { + return err + } + + if len(resp.DBClusterSnapshots) < 1 { + return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") + } + + var snapshot *rds.DBClusterSnapshot + if len(resp.DBClusterSnapshots) > 1 { + recent := d.Get("most_recent").(bool) + log.Printf("[DEBUG] aws_db_cluster_snapshot - multiple results found and `most_recent` is set to: %t", recent) + if recent { + snapshot = mostRecentDbClusterSnapshot(resp.DBClusterSnapshots) + } else { + return fmt.Errorf("Your query returned more than one result. Please try a more specific search criteria.") + } + } else { + snapshot = resp.DBClusterSnapshots[0] + } + + return DBClusterSnapshotDescriptionAttributes(d, snapshot) +} + +type rdsClusterSnapshotSort []*rds.DBClusterSnapshot + +func (a rdsClusterSnapshotSort) Len() int { return len(a) } +func (a rdsClusterSnapshotSort) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a rdsClusterSnapshotSort) Less(i, j int) bool { + // Snapshot creation can be in progress + if a[i].SnapshotCreateTime == nil { + return true + } + if a[j].SnapshotCreateTime == nil { + return false + } + + return (*a[i].SnapshotCreateTime).Before(*a[j].SnapshotCreateTime) +} + +func mostRecentDbClusterSnapshot(snapshots []*rds.DBClusterSnapshot) *rds.DBClusterSnapshot { + sortedSnapshots := snapshots + sort.Sort(rdsClusterSnapshotSort(sortedSnapshots)) + return sortedSnapshots[len(sortedSnapshots)-1] +} + +func DBClusterSnapshotDescriptionAttributes(d *schema.ResourceData, snapshot *rds.DBClusterSnapshot) error { + d.SetId(*snapshot.DBClusterSnapshotIdentifier) + d.Set("allocated_storage", snapshot.AllocatedStorage) + d.Set("availability_zones", flattenStringList(snapshot.AvailabilityZones)) + d.Set("db_cluster_identifier", snapshot.DBClusterIdentifier) + d.Set("db_cluster_snapshot_arn", snapshot.DBClusterSnapshotArn) + d.Set("db_cluster_snapshot_identifier", snapshot.DBClusterSnapshotIdentifier) + d.Set("engine", snapshot.Engine) + d.Set("engine_version", snapshot.EngineVersion) + d.Set("kms_key_id", snapshot.KmsKeyId) + d.Set("license_model", snapshot.LicenseModel) + d.Set("port", snapshot.Port) + if snapshot.SnapshotCreateTime != nil { + d.Set("snapshot_create_time", snapshot.SnapshotCreateTime.Format(time.RFC3339)) + } + d.Set("snapshot_type", snapshot.SnapshotType) + d.Set("source_db_cluster_snapshot_arn", snapshot.SourceDBClusterSnapshotArn) + d.Set("status", snapshot.Status) + d.Set("storage_encrypted", snapshot.StorageEncrypted) + d.Set("vpc_id", snapshot.VpcId) + + return nil +} diff --git a/aws/data_source_aws_db_cluster_snapshot_test.go b/aws/data_source_aws_db_cluster_snapshot_test.go new file mode 100644 index 00000000000..d1d77dd1e27 --- /dev/null +++ b/aws/data_source_aws_db_cluster_snapshot_test.go @@ -0,0 +1,101 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsDbClusterSnapshotDataSource_basic(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAwsDbClusterSnapshotDataSourceConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDbClusterSnapshotDataSourceID("data.aws_db_cluster_snapshot.snapshot"), + ), + }, + }, + }) +} + +func testAccCheckAwsDbClusterSnapshotDataSourceID(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Can't find data source: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("Snapshot data source ID not set") + } + return nil + } +} + +func testAccCheckAwsDbClusterSnapshotDataSourceConfig(rInt int) string { + return fmt.Sprintf(` +resource "aws_rds_cluster" "aurora" { + master_username = "foo" + master_password = "barbarbarbar" + db_subnet_group_name = "${aws_db_subnet_group.aurora.name}" + backup_retention_period = 1 + skip_final_snapshot = true +} + +resource "aws_rds_cluster_instance" "aurora" { + count=1 + cluster_identifier = "${aws_rds_cluster.aurora.id}" + instance_class = "db.t2.small" + db_subnet_group_name = "${aws_db_subnet_group.aurora.name}" +} + +resource "aws_vpc" "aurora" { + cidr_block = "192.168.0.0/16" + tags { + Name = "data_source_aws_db_cluster_snapshot_test" + } +} + +resource "aws_subnet" "aurora1" { + vpc_id = "${aws_vpc.aurora.id}" + cidr_block = "192.168.0.0/20" + availability_zone = "us-west-2a" + tags { + Name = "data_source_aws_db_cluster_snapshot_test" + } +} + +resource "aws_subnet" "aurora2" { + vpc_id = "${aws_vpc.aurora.id}" + cidr_block = "192.168.16.0/20" + availability_zone = "us-west-2b" + tags { + Name = "data_source_aws_db_cluster_snapshot_test" + } +} + +resource "aws_db_subnet_group" "aurora" { + subnet_ids = [ + "${aws_subnet.aurora1.id}", + "${aws_subnet.aurora2.id}" + ] +} + +data "aws_db_cluster_snapshot" "snapshot" { + most_recent = "true" + db_cluster_snapshot_identifier = "${aws_db_cluster_snapshot.test.id}" +} + + +resource "aws_db_cluster_snapshot" "test" { + db_cluster_identifier = "${aws_rds_cluster.aurora.id}" + db_cluster_snapshot_identifier = "testsnapshot%d" +}`, rInt) +} diff --git a/aws/provider.go b/aws/provider.go index caa4620de62..870e0e84604 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -177,6 +177,7 @@ func Provider() terraform.ResourceProvider { "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), "aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), "aws_cognito_user_pools": dataSourceAwsCognitoUserPools(), + "aws_db_cluster_snapshot": dataSourceAwsDbClusterSnapshot(), "aws_db_instance": dataSourceAwsDbInstance(), "aws_db_snapshot": dataSourceAwsDbSnapshot(), "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), @@ -337,6 +338,7 @@ func Provider() terraform.ResourceProvider { "aws_dax_cluster": resourceAwsDaxCluster(), "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), + "aws_db_cluster_snapshot": resourceAwsDbClusterSnapshot(), "aws_db_event_subscription": resourceAwsDbEventSubscription(), "aws_db_instance": resourceAwsDbInstance(), "aws_db_option_group": resourceAwsDbOptionGroup(), diff --git a/aws/resource_aws_db_cluster_snapshot.go b/aws/resource_aws_db_cluster_snapshot.go new file mode 100644 index 00000000000..2f68dcd1841 --- /dev/null +++ b/aws/resource_aws_db_cluster_snapshot.go @@ -0,0 +1,199 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDbClusterSnapshot() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDbClusterSnapshotCreate, + Read: resourceAwsDbClusterSnapshotRead, + Delete: resourceAwsDbClusterSnapshotDelete, + + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(20 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "db_cluster_snapshot_identifier": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "db_cluster_identifier": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "allocated_storage": { + Type: schema.TypeInt, + Computed: true, + }, + "availability_zones": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "db_cluster_snapshot_arn": { + Type: schema.TypeString, + Computed: true, + }, + "source_encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + "engine": { + Type: schema.TypeString, + Computed: true, + }, + "engine_version": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "license_model": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "source_db_cluster_snapshot_arn": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_type": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsDbClusterSnapshotCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + params := &rds.CreateDBClusterSnapshotInput{ + DBClusterIdentifier: aws.String(d.Get("db_cluster_identifier").(string)), + DBClusterSnapshotIdentifier: aws.String(d.Get("db_cluster_snapshot_identifier").(string)), + } + + _, err := conn.CreateDBClusterSnapshot(params) + if err != nil { + return err + } + d.SetId(d.Get("db_cluster_snapshot_identifier").(string)) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating"}, + Target: []string{"available"}, + Refresh: resourceAwsDbClusterSnapshotStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutRead), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, // Wait 30 secs before starting + } + + // Wait, catching any errors + _, err = stateConf.WaitForState() + if err != nil { + return err + } + + return resourceAwsDbClusterSnapshotRead(d, meta) +} + +func resourceAwsDbClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + params := &rds.DescribeDBClusterSnapshotsInput{ + DBClusterSnapshotIdentifier: aws.String(d.Id()), + } + resp, err := conn.DescribeDBClusterSnapshots(params) + if err != nil { + return err + } + + snapshot := resp.DBClusterSnapshots[0] + + d.Set("allocated_storage", snapshot.AllocatedStorage) + d.Set("availability_zones", flattenStringList(snapshot.AvailabilityZones)) + + d.Set("db_cluster_snapshot_arn", snapshot.DBClusterSnapshotArn) + d.Set("storage_encrypted", snapshot.StorageEncrypted) + d.Set("engine", snapshot.Engine) + d.Set("engine_version", snapshot.EngineVersion) + d.Set("kms_key_id", snapshot.KmsKeyId) + d.Set("license_model", snapshot.LicenseModel) + d.Set("port", snapshot.Port) + d.Set("source_db_cluster_snapshot_arn", snapshot.SourceDBClusterSnapshotArn) + d.Set("snapshot_type", snapshot.SnapshotType) + d.Set("status", snapshot.Status) + d.Set("vpc_id", snapshot.VpcId) + + return nil +} + +func resourceAwsDbClusterSnapshotDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + params := &rds.DeleteDBClusterSnapshotInput{ + DBClusterSnapshotIdentifier: aws.String(d.Id()), + } + _, err := conn.DeleteDBClusterSnapshot(params) + if err != nil { + return err + } + + return nil +} + +func resourceAwsDbClusterSnapshotStateRefreshFunc( + d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + conn := meta.(*AWSClient).rdsconn + + opts := &rds.DescribeDBClusterSnapshotsInput{ + DBClusterSnapshotIdentifier: aws.String(d.Id()), + } + + log.Printf("[DEBUG] DB Cluster Snapshot describe configuration: %#v", opts) + + resp, err := conn.DescribeDBClusterSnapshots(opts) + if err != nil { + snapshoterr, ok := err.(awserr.Error) + if ok && snapshoterr.Code() == "DBClusterSnapshotNotFound" { + return nil, "", nil + } + return nil, "", fmt.Errorf("Error retrieving DB Cluster Snapshots: %s", err) + } + + if len(resp.DBClusterSnapshots) != 1 { + return nil, "", fmt.Errorf("No snapshots returned for %s", d.Id()) + } + + snapshot := resp.DBClusterSnapshots[0] + + return resp, *snapshot.Status, nil + } +} diff --git a/aws/resource_aws_db_cluster_snapshot_test.go b/aws/resource_aws_db_cluster_snapshot_test.go new file mode 100644 index 00000000000..ae9182ffcc0 --- /dev/null +++ b/aws/resource_aws_db_cluster_snapshot_test.go @@ -0,0 +1,112 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSDBClusterSnapshot_basic(t *testing.T) { + var v rds.DBClusterSnapshot + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsDbClusterSnapshotConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckDbClusterSnapshotExists("aws_db_cluster_snapshot.test", &v), + ), + }, + }, + }) +} + +func testAccCheckDbClusterSnapshotExists(n string, v *rds.DBClusterSnapshot) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).rdsconn + + request := &rds.DescribeDBClusterSnapshotsInput{ + DBClusterSnapshotIdentifier: aws.String(rs.Primary.ID), + } + + response, err := conn.DescribeDBClusterSnapshots(request) + if err == nil { + if response.DBClusterSnapshots != nil && len(response.DBClusterSnapshots) > 0 { + *v = *response.DBClusterSnapshots[0] + return nil + } + } + return fmt.Errorf("Error finding RDS DB Cluster Snapshot %s", rs.Primary.ID) + } +} + +func testAccAwsDbClusterSnapshotConfig(rInt int) string { + return fmt.Sprintf(` +resource "aws_rds_cluster" "aurora" { + master_username = "foo" + master_password = "barbarbarbar" + db_subnet_group_name = "${aws_db_subnet_group.aurora.name}" + backup_retention_period = 1 + skip_final_snapshot = true +} + +resource "aws_rds_cluster_instance" "aurora" { + count=1 + cluster_identifier = "${aws_rds_cluster.aurora.id}" + instance_class = "db.t2.small" + db_subnet_group_name = "${aws_db_subnet_group.aurora.name}" +} + +resource "aws_vpc" "aurora" { + cidr_block = "192.168.0.0/16" + tags { + Name = "resource_aws_db_cluster_snapshot_test" + } +} + +resource "aws_subnet" "aurora1" { + vpc_id = "${aws_vpc.aurora.id}" + cidr_block = "192.168.0.0/20" + availability_zone = "us-west-2a" + tags { + Name = "resource_aws_db_cluster_snapshot_test" + } +} + +resource "aws_subnet" "aurora2" { + vpc_id = "${aws_vpc.aurora.id}" + cidr_block = "192.168.16.0/20" + availability_zone = "us-west-2b" + tags { + Name = "resource_aws_db_cluster_snapshot_test" + } +} + +resource "aws_db_subnet_group" "aurora" { + subnet_ids = [ + "${aws_subnet.aurora1.id}", + "${aws_subnet.aurora2.id}" + ] +} + +resource "aws_db_cluster_snapshot" "test" { + db_cluster_identifier = "${aws_rds_cluster.aurora.id}" + db_cluster_snapshot_identifier = "resourcetestsnapshot%d" +}`, rInt) +} From 70a3f81fdf8c59b25d52868c8c021312622063eb Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Sun, 13 May 2018 11:09:44 +0100 Subject: [PATCH 1045/3316] Documentation for aws_db_cluster_snapshot (resource and data source) See also #4525 --- website/aws.erb | 7 ++ .../docs/d/db_cluster_snapshot.html.markdown | 86 +++++++++++++++++ website/docs/d/db_snapshot.html.markdown | 1 + .../docs/r/db_cluster_snapshot.html.markdown | 92 +++++++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 website/docs/d/db_cluster_snapshot.html.markdown create mode 100644 website/docs/r/db_cluster_snapshot.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 91f132be189..0204291c0fb 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -85,6 +85,9 @@ > aws_cognito_user_pools + > + aws_db_cluster_snapshot + > aws_db_instance @@ -1496,6 +1499,10 @@ RDS Resources diff --git a/website/docs/r/dx_public_virtual_interface.html.markdown b/website/docs/r/dx_public_virtual_interface.html.markdown new file mode 100644 index 00000000000..05d611d40bb --- /dev/null +++ b/website/docs/r/dx_public_virtual_interface.html.markdown @@ -0,0 +1,69 @@ +--- +layout: "aws" +page_title: "AWS: aws_dx_public_virtual_interface" +sidebar_current: "docs-aws-resource-dx-public-virtual-interface" +description: |- + Provides a Direct Connect public virtual interface resource. +--- + +# aws_dx_public_virtual_interface + +Provides a Direct Connect public virtual interface resource. + +## Example Usage + +```hcl +resource "aws_dx_public_virtual_interface" "foo" { + connection_id = "dxcon-zzzzzzzz" + + name = "vif-foo" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 + + customer_address = "175.45.176.1/30" + amazon_address = "175.45.176.2/30" + route_filter_prefixes = [ + "210.52.109.0/24", + "175.45.176.0/22" + ] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. +* `name` - (Required) The name for the virtual interface. +* `vlan` - (Required) The VLAN ID. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `bgp_auth_key` - (Optional) The authentication key for BGP configuration. +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. +* `route_filter_prefixes` - (Required) A list of routes to be advertised to the AWS network in this region. +* `tags` - (Optional) A mapping of tags to assign to the resource. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the virtual interface. +* `arn` - The ARN of the virtual interface. + +## Timeouts + +`aws_dx_public_virtual_interface` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating virtual interface +- `delete` - (Default `10 minutes`) Used for destroying virtual interface + +## Import + +Direct Connect public virtual interfaces can be imported using the `vif id`, e.g. + +``` +$ terraform import aws_dx_public_virtual_interface.test dxvif-33cc44dd +``` From dad1c60044b9edc1074ade16da2487a7cc5d128f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 09:45:51 -0500 Subject: [PATCH 1535/3316] Fix indentation for configuration generation. --- aws/resource_aws_dx_public_virtual_interface_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_dx_public_virtual_interface_test.go b/aws/resource_aws_dx_public_virtual_interface_test.go index f5a951c5245..13ccf43d5dd 100644 --- a/aws/resource_aws_dx_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_public_virtual_interface_test.go @@ -105,7 +105,7 @@ resource "aws_dx_public_virtual_interface" "foo" { "175.45.176.0/22" ] } - `, cid, n) +`, cid, n) } func testAccDxPublicVirtualInterfaceConfig_tags(cid, n string) string { @@ -129,5 +129,5 @@ resource "aws_dx_public_virtual_interface" "foo" { Environment = "test" } } - `, cid, n) +`, cid, n) } From 48de7470d9546496818d8ddabd2f1b9fa3e334d3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 09:52:42 -0500 Subject: [PATCH 1536/3316] Move schema-related code to the top of 'dx_vif.go'. --- aws/dx_vif.go | 118 +++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 903c5ca4fed..ca6403f8d2e 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -13,6 +13,65 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) +// Schemas common to all (public/private, hosted or not) virtual interfaces. +var dxVirtualInterfaceSchemaWithTags = mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "tags": tagsSchema(), + }, +) +var dxVirtualInterfaceSchema = map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, +} + func isNoSuchDxVirtualInterfaceErr(err error) bool { return isAWSErr(err, "DirectConnectClientException", "does not exist") } @@ -195,62 +254,3 @@ func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) * } return schema.NewSet(schema.HashString, out) } - -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} From 317543243c6d66f1882336b360eb6025262ab0fa Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 11:20:02 -0500 Subject: [PATCH 1537/3316] Change interface to 'dxVirtualInterfaceRead'. --- aws/dx_vif.go | 15 +++------------ aws/resource_aws_dx_public_virtual_interface.go | 4 +++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index ca6403f8d2e..27a83780c50 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -76,21 +76,12 @@ func isNoSuchDxVirtualInterfaceErr(err error) bool { return isAWSErr(err, "DirectConnectClientException", "does not exist") } -func dxVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) (*directconnect.VirtualInterface, error) { - conn := meta.(*AWSClient).dxconn - - resp, state, err := dxVirtualInterfaceStateRefresh(conn, d.Id())() +func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { + resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) } - terminalStates := map[string]bool{ - directconnect.VirtualInterfaceStateDeleted: true, - directconnect.VirtualInterfaceStateDeleting: true, - directconnect.VirtualInterfaceStateRejected: true, - } - if _, ok := terminalStates[state]; ok { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") + if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil } diff --git a/aws/resource_aws_dx_public_virtual_interface.go b/aws/resource_aws_dx_public_virtual_interface.go index 731cf7428fc..3cd91f2e6e7 100644 --- a/aws/resource_aws_dx_public_virtual_interface.go +++ b/aws/resource_aws_dx_public_virtual_interface.go @@ -95,11 +95,13 @@ func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta inte func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - vif, err := dxVirtualInterfaceRead(d, meta) + vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { return err } if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") return nil } From bbd895ef6bd9ca347f8d35136f37a55e0388add6 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 11 May 2018 15:20:33 -0400 Subject: [PATCH 1538/3316] Minor refactoring. --- aws/dx_vif.go | 25 ++--------- ...esource_aws_dx_public_virtual_interface.go | 41 +++++++++++-------- aws/structure.go | 20 +++++++++ 3 files changed, 46 insertions(+), 40 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 27a83780c50..787e9d0c6d5 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -79,7 +79,7 @@ func isNoSuchDxVirtualInterfaceErr(err error) bool { func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { - return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err) } if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil @@ -116,7 +116,7 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { if isNoSuchDxVirtualInterfaceErr(err) { return nil } - return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err.Error()) + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) } deleteStateConf := &resource.StateChangeConf{ @@ -175,7 +175,7 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err) } return nil @@ -226,22 +226,3 @@ func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) er return nil } - -func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { - prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) - for i, p := range cfg { - prefix := &directconnect.RouteFilterPrefix{ - Cidr: aws.String(p.(string)), - } - prefixes[i] = prefix - } - return prefixes -} - -func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { - out := make([]interface{}, 0) - for _, prefix := range prefixes { - out = append(out, aws.StringValue(prefix.Cidr)) - } - return schema.NewSet(schema.HashString, out) -} diff --git a/aws/resource_aws_dx_public_virtual_interface.go b/aws/resource_aws_dx_public_virtual_interface.go index 3cd91f2e6e7..d23a2a92978 100644 --- a/aws/resource_aws_dx_public_virtual_interface.go +++ b/aws/resource_aws_dx_public_virtual_interface.go @@ -19,6 +19,7 @@ func resourceAwsDxPublicVirtualInterface() *schema.Resource { Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, }, + CustomizeDiff: resourceAwsDxPublicVirtualInterfaceCustomizeDiff, Schema: mergeSchemas( dxVirtualInterfaceSchemaWithTags, @@ -43,35 +44,23 @@ func resourceAwsDxPublicVirtualInterface() *schema.Resource { func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - addressFamily := d.Get("address_family").(string) - caRaw, caOk := d.GetOk("customer_address") - aaRaw, aaOk := d.GetOk("amazon_address") - if addressFamily == directconnect.AddressFamilyIpv4 { - if !caOk { - return fmt.Errorf("'customer_address' must be set when 'address_family' is '%s'", addressFamily) - } - if !aaOk { - return fmt.Errorf("'amazon_address' must be set when 'address_family' is '%s'", addressFamily) - } - } - req := &directconnect.CreatePublicVirtualInterfaceInput{ ConnectionId: aws.String(d.Get("connection_id").(string)), NewPublicVirtualInterface: &directconnect.NewPublicVirtualInterface{ VirtualInterfaceName: aws.String(d.Get("name").(string)), Vlan: aws.Int64(int64(d.Get("vlan").(int))), Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), - AddressFamily: aws.String(addressFamily), + AddressFamily: aws.String(d.Get("address_family").(string)), }, } if v, ok := d.GetOk("bgp_auth_key"); ok { req.NewPublicVirtualInterface.AuthKey = aws.String(v.(string)) } - if caOk { - req.NewPublicVirtualInterface.CustomerAddress = aws.String(caRaw.(string)) + if v, ok := d.GetOk("customer_address"); ok { + req.NewPublicVirtualInterface.CustomerAddress = aws.String(v.(string)) } - if aaOk { - req.NewPublicVirtualInterface.AmazonAddress = aws.String(aaRaw.(string)) + if v, ok := d.GetOk("amazon_address"); ok { + req.NewPublicVirtualInterface.AmazonAddress = aws.String(v.(string)) } if v, ok := d.GetOk("route_filter_prefixes"); ok { req.NewPublicVirtualInterface.RouteFilterPrefixes = expandDxRouteFilterPrefixes(v.(*schema.Set).List()) @@ -80,7 +69,7 @@ func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta inte log.Printf("[DEBUG] Creating Direct Connect public virtual interface: %#v", req) resp, err := conn.CreatePublicVirtualInterface(req) if err != nil { - return fmt.Errorf("Error creating Direct Connect public virtual interface: %s", err.Error()) + return fmt.Errorf("Error creating Direct Connect public virtual interface: %s", err) } d.SetId(aws.StringValue(resp.VirtualInterfaceId)) @@ -127,6 +116,22 @@ func resourceAwsDxPublicVirtualInterfaceDelete(d *schema.ResourceData, meta inte return dxVirtualInterfaceDelete(d, meta) } +func resourceAwsDxPublicVirtualInterfaceCustomizeDiff(diff *schema.ResourceDiff, meta interface{}) error { + if diff.Id() == "" { + // New resource. + if addressFamily := diff.Get("address_family").(string); addressFamily == directconnect.AddressFamilyIpv4 { + if _, ok := diff.GetOk("customer_address"); !ok { + return fmt.Errorf("'customer_address' must be set when 'address_family' is '%s'", addressFamily) + } + if _, ok := diff.GetOk("amazon_address"); !ok { + return fmt.Errorf("'amazon_address' must be set when 'address_family' is '%s'", addressFamily) + } + } + } + + return nil +} + func dxPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { return dxVirtualInterfaceWaitUntilAvailable( d, diff --git a/aws/structure.go b/aws/structure.go index 11eca3b1efb..9370d54e470 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -20,6 +20,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/dax" + "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -4268,3 +4269,22 @@ func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringCon return options } + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} From 9c9b6769404a05c61fe826df89655e10b065f3af Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 11 May 2018 16:19:32 -0400 Subject: [PATCH 1539/3316] Standardize resource name for testing. --- aws/resource_aws_dx_public_virtual_interface_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_public_virtual_interface_test.go b/aws/resource_aws_dx_public_virtual_interface_test.go index 13ccf43d5dd..28e94108674 100644 --- a/aws/resource_aws_dx_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_public_virtual_interface_test.go @@ -18,7 +18,7 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { if connectionId == "" { t.Skipf("Environment variable %s is not set", key) } - vifName := fmt.Sprintf("tf-dx-vif-%s", acctest.RandString(5)) + vifName := fmt.Sprintf("terraform-testacc-dx-vif-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, From 07324ec13190bdb667662f45a4de8a588b6a9505 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 19 Jun 2018 22:53:25 -0400 Subject: [PATCH 1540/3316] Make consistent with Direct Connect gateway. --- aws/dx_vif.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 787e9d0c6d5..0898583598c 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -72,10 +72,6 @@ var dxVirtualInterfaceSchema = map[string]*schema.Schema{ }, } -func isNoSuchDxVirtualInterfaceErr(err error) bool { - return isAWSErr(err, "DirectConnectClientException", "does not exist") -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { @@ -113,7 +109,7 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { + if isAWSErr(err, "DirectConnectClientException", "does not exist") { return nil } return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) @@ -151,17 +147,21 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str VirtualInterfaceId: aws.String(vifId), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { - return nil, directconnect.VirtualInterfaceStateDeleted, nil - } return nil, "", err } - if len(resp.VirtualInterfaces) < 1 { - return nil, directconnect.ConnectionStateDeleted, nil + n := len(resp.VirtualInterfaces) + switch n { + case 0: + return "", directconnect.VirtualInterfaceStateDeleted, nil + + case 1: + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + + default: + return nil, "", fmt.Errorf("Found %d Direct Connect virtual interfaces for %s, expected 1", n, vifId) } - vif := resp.VirtualInterfaces[0] - return vif, aws.StringValue(vif.VirtualInterfaceState), nil } } @@ -175,7 +175,7 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) } return nil From 90488e00bc72cc0a20e8508e7b01ec4a8a9d1626 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Sun, 21 Jan 2018 17:15:44 -0500 Subject: [PATCH 1541/3316] Add 'aws_dx_private_virtual_interface' resource. --- aws/dx_vif.go | 256 ++++++++++++++++++ aws/provider.go | 1 + ...source_aws_dx_private_virtual_interface.go | 144 ++++++++++ ...e_aws_dx_private_virtual_interface_test.go | 133 +++++++++ aws/utils.go | 13 + aws/utils_test.go | 32 ++- website/aws.erb | 3 + ...dx_private_virtual_interface.html.markdown | 63 +++++ 8 files changed, 644 insertions(+), 1 deletion(-) create mode 100644 aws/dx_vif.go create mode 100644 aws/resource_aws_dx_private_virtual_interface.go create mode 100644 aws/resource_aws_dx_private_virtual_interface_test.go create mode 100644 website/docs/r/dx_private_virtual_interface.html.markdown diff --git a/aws/dx_vif.go b/aws/dx_vif.go new file mode 100644 index 00000000000..903c5ca4fed --- /dev/null +++ b/aws/dx_vif.go @@ -0,0 +1,256 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func isNoSuchDxVirtualInterfaceErr(err error) bool { + return isAWSErr(err, "DirectConnectClientException", "does not exist") +} + +func dxVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) (*directconnect.VirtualInterface, error) { + conn := meta.(*AWSClient).dxconn + + resp, state, err := dxVirtualInterfaceStateRefresh(conn, d.Id())() + if err != nil { + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) + } + terminalStates := map[string]bool{ + directconnect.VirtualInterfaceStateDeleted: true, + directconnect.VirtualInterfaceStateDeleting: true, + directconnect.VirtualInterfaceStateRejected: true, + } + if _, ok := terminalStates[state]; ok { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil, nil + } + + return resp.(*directconnect.VirtualInterface), nil +} + +func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + if err := setTagsDX(conn, d, arn); err != nil { + return err + } + + return nil +} + +func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + log.Printf("[DEBUG] Deleting Direct Connect virtual interface: %s", d.Id()) + _, err := conn.DeleteVirtualInterface(&directconnect.DeleteVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(d.Id()), + }) + if err != nil { + if isNoSuchDxVirtualInterfaceErr(err) { + return nil + } + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err.Error()) + } + + deleteStateConf := &resource.StateChangeConf{ + Pending: []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDeleting, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStatePending, + directconnect.VirtualInterfaceStateRejected, + directconnect.VirtualInterfaceStateVerifying, + }, + Target: []string{ + directconnect.VirtualInterfaceStateDeleted, + }, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = deleteStateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeVirtualInterfaces(&directconnect.DescribeVirtualInterfacesInput{ + VirtualInterfaceId: aws.String(vifId), + }) + if err != nil { + if isNoSuchDxVirtualInterfaceErr(err) { + return nil, directconnect.VirtualInterfaceStateDeleted, nil + } + return nil, "", err + } + + if len(resp.VirtualInterfaces) < 1 { + return nil, directconnect.ConnectionStateDeleted, nil + } + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + } +} + +func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: target, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + if _, err := stateConf.WaitForState(); err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err.Error()) + } + + return nil +} + +// Attributes common to public VIFs and creator side of hosted public VIFs. +func dxPublicVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + if err := dxVirtualInterfaceAttributes(d, meta, vif); err != nil { + return err + } + d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) + + return nil +} + +// Attributes common to private VIFs and creator side of hosted private VIFs. +func dxPrivateVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + return dxVirtualInterfaceAttributes(d, meta, vif) +} + +// Attributes common to public/private VIFs and creator side of hosted public/private VIFs. +func dxVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { + return err + } + + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + + return nil +} + +func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) error { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return nil +} + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} + +// Schemas common to all (public/private, hosted or not) virtual interfaces. +var dxVirtualInterfaceSchemaWithTags = mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "tags": tagsSchema(), + }, +) +var dxVirtualInterfaceSchema = map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, +} diff --git a/aws/provider.go b/aws/provider.go index 1939f4dd146..c5c8fa31ef1 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -371,6 +371,7 @@ func Provider() terraform.ResourceProvider { "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), "aws_dx_gateway": resourceAwsDxGateway(), "aws_dx_gateway_association": resourceAwsDxGatewayAssociation(), + "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), "aws_dynamodb_table": resourceAwsDynamoDbTable(), "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go new file mode 100644 index 00000000000..19e59e4cec7 --- /dev/null +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -0,0 +1,144 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxPrivateVirtualInterface() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxPrivateVirtualInterfaceCreate, + Read: resourceAwsDxPrivateVirtualInterfaceRead, + Update: resourceAwsDxPrivateVirtualInterfaceUpdate, + Delete: resourceAwsDxPrivateVirtualInterfaceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: mergeSchemas( + dxVirtualInterfaceSchemaWithTags, + map[string]*schema.Schema{ + "vpn_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"dx_gateway_id"}, + }, + "dx_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"vpn_gateway_id"}, + }, + }, + ), + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vgwIdRaw, vgwOk := d.GetOk("vpn_gateway_id") + dxgwIdRaw, dxgwOk := d.GetOk("dx_gateway_id") + if vgwOk == dxgwOk { + return fmt.Errorf( + "One of ['vpn_gateway_id', 'dx_gateway_id'] must be set to create a Direct Connect private virtual interface") + } + + req := &directconnect.CreatePrivateVirtualInterfaceInput{ + ConnectionId: aws.String(d.Get("connection_id").(string)), + NewPrivateVirtualInterface: &directconnect.NewPrivateVirtualInterface{ + VirtualInterfaceName: aws.String(d.Get("name").(string)), + Vlan: aws.Int64(int64(d.Get("vlan").(int))), + Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), + AddressFamily: aws.String(d.Get("address_family").(string)), + }, + } + if vgwOk { + req.NewPrivateVirtualInterface.VirtualGatewayId = aws.String(vgwIdRaw.(string)) + } + if dxgwOk { + req.NewPrivateVirtualInterface.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) + } + if v, ok := d.GetOk("bgp_auth_key"); ok { + req.NewPrivateVirtualInterface.AuthKey = aws.String(v.(string)) + } + if v, ok := d.GetOk("customer_address"); ok { + req.NewPrivateVirtualInterface.CustomerAddress = aws.String(v.(string)) + } + if v, ok := d.GetOk("amazon_address"); ok { + req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Direct Connect private virtual interface: %#v", req) + resp, err := conn.CreatePrivateVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect private virtual interface: %s", err.Error()) + } + + d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxPrivateVirtualInterfaceUpdate(d, meta) +} + +func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d, meta) + if err != nil { + return err + } + if vif == nil { + return nil + } + + if err := dxPrivateVirtualInterfaceAttributes(d, meta, vif); err != nil { + return err + } + d.Set("vpn_gateway_id", vif.VirtualGatewayId) + d.Set("dx_gateway_id", vif.DirectConnectGatewayId) + if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func resourceAwsDxPrivateVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { + if err := dxVirtualInterfaceUpdate(d, meta); err != nil { + return err + } + + return resourceAwsDxPrivateVirtualInterfaceRead(d, meta) +} + +func resourceAwsDxPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateDown, + }) +} diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go new file mode 100644 index 00000000000..1d7bb13551d --- /dev/null +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -0,0 +1,133 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { + key := "DX_CONNECTION_ID" + connectionId := os.Getenv(key) + if connectionId == "" { + t.Skipf("Environment variable %s is not set", key) + } + vifName := fmt.Sprintf("tf-dx-vif-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "tags.%", "0"), + ), + }, + { + Config: testAccDxPrivateVirtualInterfaceConfig_tags(connectionId, vifName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "tags.Environment", "test"), + ), + }, + // Test import. + { + ResourceName: "aws_dx_private_virtual_interface.foo", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsDxPrivateVirtualInterfaceDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).dxconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_dx_private_virtual_interface" { + continue + } + + input := &directconnect.DescribeVirtualInterfacesInput{ + VirtualInterfaceId: aws.String(rs.Primary.ID), + } + + resp, err := conn.DescribeVirtualInterfaces(input) + if err != nil { + return err + } + for _, v := range resp.VirtualInterfaces { + if *v.VirtualInterfaceId == rs.Primary.ID && !(*v.VirtualInterfaceState == directconnect.VirtualInterfaceStateDeleted) { + return fmt.Errorf("[DESTROY ERROR] Dx Private VIF (%s) not deleted", rs.Primary.ID) + } + } + } + return nil +} + +func testAccCheckAwsDxPrivateVirtualInterfaceExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + return nil + } +} + +func testAccDxPrivateVirtualInterfaceConfig_noTags(cid, n string) string { + return fmt.Sprintf(` +resource "aws_vpn_gateway" "foo" { + tags { + Name = "Testing %s" + } +} + +resource "aws_dx_private_virtual_interface" "foo" { + connection_id = "%s" + + vpn_gateway_id = "${aws_vpn_gateway.foo.id}" + name = "%s" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 +} + `, n, cid, n) +} + +func testAccDxPrivateVirtualInterfaceConfig_tags(cid, n string) string { + return fmt.Sprintf(` +resource "aws_vpn_gateway" "foo" { + tags { + Name = "Testing %s" + } +} + +resource "aws_dx_private_virtual_interface" "foo" { + connection_id = "%s" + + vpn_gateway_id = "${aws_vpn_gateway.foo.id}" + name = "%s" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 + + tags { + Environment = "test" + } +} + `, n, cid, n) +} diff --git a/aws/utils.go b/aws/utils.go index 21c3aab7ef3..6a120cccff8 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -7,6 +7,7 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -47,3 +48,15 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } + +func mergeSchemas(schemas ...map[string]*schema.Schema) map[string]*schema.Schema { + merged := make(map[string]*schema.Schema) + + for _, schema := range schemas { + for k, v := range schema { + merged[k] = v + } + } + + return merged +} diff --git a/aws/utils_test.go b/aws/utils_test.go index 8248f4384d2..a5854e7ef4b 100644 --- a/aws/utils_test.go +++ b/aws/utils_test.go @@ -1,6 +1,10 @@ package aws -import "testing" +import ( + "testing" + + "github.com/hashicorp/terraform/helper/schema" +) var base64encodingTests = []struct { in []byte @@ -70,3 +74,29 @@ func TestJsonBytesEqualWhitespaceAndNoWhitespace(t *testing.T) { t.Errorf("Expected jsonBytesEqual to return false for %s == %s", noWhitespaceDiff, whitespaceDiff) } } + +func TestMergeSchemas(t *testing.T) { + s1 := map[string]*schema.Schema{ + "aaa": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "zzz": { + Type: schema.TypeInt, + Optional: true, + Default: 42, + }, + } + s2 := map[string]*schema.Schema{ + "xxx": { + Type: schema.TypeFloat, + Computed: true, + }, + } + + s3 := mergeSchemas(s1, s2) + if len(s3) != 3 { + t.Errorf("Expected merge schema to be of size 3, got %d", len(s3)) + } +} diff --git a/website/aws.erb b/website/aws.erb index 0e07c6a0f18..582984f5107 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -776,6 +776,9 @@ > aws_dx_lag + > + aws_dx_private_virtual_interface + diff --git a/website/docs/r/dx_private_virtual_interface.html.markdown b/website/docs/r/dx_private_virtual_interface.html.markdown new file mode 100644 index 00000000000..1afa9920c2e --- /dev/null +++ b/website/docs/r/dx_private_virtual_interface.html.markdown @@ -0,0 +1,63 @@ +--- +layout: "aws" +page_title: "AWS: aws_dx_private_virtual_interface" +sidebar_current: "docs-aws-resource-dx-private-virtual-interface" +description: |- + Provides a Direct Connect private virtual interface resource. +--- + +# aws_dx_private_virtual_interface + +Provides a Direct Connect private virtual interface resource. + +## Example Usage + +```hcl +resource "aws_dx_private_virtual_interface" "foo" { + connection_id = "dxcon-zzzzzzzz" + + name = "vif-foo" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 +} +``` + +## Argument Reference + +The following arguments are supported: + +* `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. +* `vpn_gateway_id` - (Optional) The ID of the [virtual private gateway](vpn_gateway.html) to which to connect the virtual interface. +* `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. +* `name` - (Required) The name for the virtual interface. +* `vlan` - (Required) The VLAN ID. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `bgp_auth_key` - (Optional) The authentication key for BGP configuration. +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. +* `tags` - (Optional) A mapping of tags to assign to the resource. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the virtual interface. +* `arn` - The ARN of the virtual interface. + +## Timeouts + +`aws_dx_private_virtual_interface` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating virtual interface +- `delete` - (Default `10 minutes`) Used for destroying virtual interface + +## Import + +Direct Connect private virtual interfaces can be imported using the `vif id`, e.g. + +``` +$ terraform import aws_dx_private_virtual_interface.test dxvif-33cc44dd +``` From d7bd808741c616aac04944019808ae98daaace05 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 11:47:44 -0500 Subject: [PATCH 1542/3316] Fix indentation for configuration generation. --- aws/resource_aws_dx_private_virtual_interface_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 1d7bb13551d..ec33ec1fe77 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -105,7 +105,7 @@ resource "aws_dx_private_virtual_interface" "foo" { address_family = "ipv4" bgp_asn = 65352 } - `, n, cid, n) +`, n, cid, n) } func testAccDxPrivateVirtualInterfaceConfig_tags(cid, n string) string { @@ -129,5 +129,5 @@ resource "aws_dx_private_virtual_interface" "foo" { Environment = "test" } } - `, n, cid, n) +`, n, cid, n) } From 6a1f5a4948af54fa6b3f923942a0a5df9453414a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 11:48:05 -0500 Subject: [PATCH 1543/3316] Change interface to 'dxVirtualInterfaceRead'. --- aws/dx_vif.go | 133 ++++++++---------- ...source_aws_dx_private_virtual_interface.go | 4 +- 2 files changed, 65 insertions(+), 72 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 903c5ca4fed..27a83780c50 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -13,25 +13,75 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) +// Schemas common to all (public/private, hosted or not) virtual interfaces. +var dxVirtualInterfaceSchemaWithTags = mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "tags": tagsSchema(), + }, +) +var dxVirtualInterfaceSchema = map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, +} + func isNoSuchDxVirtualInterfaceErr(err error) bool { return isAWSErr(err, "DirectConnectClientException", "does not exist") } -func dxVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) (*directconnect.VirtualInterface, error) { - conn := meta.(*AWSClient).dxconn - - resp, state, err := dxVirtualInterfaceStateRefresh(conn, d.Id())() +func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { + resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) } - terminalStates := map[string]bool{ - directconnect.VirtualInterfaceStateDeleted: true, - directconnect.VirtualInterfaceStateDeleting: true, - directconnect.VirtualInterfaceStateRejected: true, - } - if _, ok := terminalStates[state]; ok { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") + if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil } @@ -195,62 +245,3 @@ func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) * } return schema.NewSet(schema.HashString, out) } - -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 19e59e4cec7..449ac120e13 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -98,11 +98,13 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - vif, err := dxVirtualInterfaceRead(d, meta) + vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { return err } if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") return nil } From a0d27c0a7ca30c117e458e1db40acf1793bd2076 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Mon, 22 Jan 2018 18:36:37 -0500 Subject: [PATCH 1544/3316] Add 'aws_dx_hosted_public_virtual_interface' resource. Add 'aws_dx_hosted_public_virtual_interface_accepter' resource. --- aws/dx_vif.go | 256 ++++++ aws/provider.go | 736 +++++++++--------- ..._aws_dx_hosted_public_virtual_interface.go | 131 ++++ ...osted_public_virtual_interface_accepter.go | 113 +++ ...dx_hosted_public_virtual_interface_test.go | 105 +++ aws/utils.go | 13 + aws/utils_test.go | 32 +- website/aws.erb | 6 + ...ted_public_virtual_interface.html.markdown | 70 ++ ...c_virtual_interface_accepter.html.markdown | 88 +++ 10 files changed, 1182 insertions(+), 368 deletions(-) create mode 100644 aws/dx_vif.go create mode 100644 aws/resource_aws_dx_hosted_public_virtual_interface.go create mode 100644 aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go create mode 100644 aws/resource_aws_dx_hosted_public_virtual_interface_test.go create mode 100644 website/docs/r/dx_hosted_public_virtual_interface.html.markdown create mode 100644 website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown diff --git a/aws/dx_vif.go b/aws/dx_vif.go new file mode 100644 index 00000000000..903c5ca4fed --- /dev/null +++ b/aws/dx_vif.go @@ -0,0 +1,256 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func isNoSuchDxVirtualInterfaceErr(err error) bool { + return isAWSErr(err, "DirectConnectClientException", "does not exist") +} + +func dxVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) (*directconnect.VirtualInterface, error) { + conn := meta.(*AWSClient).dxconn + + resp, state, err := dxVirtualInterfaceStateRefresh(conn, d.Id())() + if err != nil { + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) + } + terminalStates := map[string]bool{ + directconnect.VirtualInterfaceStateDeleted: true, + directconnect.VirtualInterfaceStateDeleting: true, + directconnect.VirtualInterfaceStateRejected: true, + } + if _, ok := terminalStates[state]; ok { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil, nil + } + + return resp.(*directconnect.VirtualInterface), nil +} + +func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + if err := setTagsDX(conn, d, arn); err != nil { + return err + } + + return nil +} + +func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + log.Printf("[DEBUG] Deleting Direct Connect virtual interface: %s", d.Id()) + _, err := conn.DeleteVirtualInterface(&directconnect.DeleteVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(d.Id()), + }) + if err != nil { + if isNoSuchDxVirtualInterfaceErr(err) { + return nil + } + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err.Error()) + } + + deleteStateConf := &resource.StateChangeConf{ + Pending: []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDeleting, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStatePending, + directconnect.VirtualInterfaceStateRejected, + directconnect.VirtualInterfaceStateVerifying, + }, + Target: []string{ + directconnect.VirtualInterfaceStateDeleted, + }, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = deleteStateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeVirtualInterfaces(&directconnect.DescribeVirtualInterfacesInput{ + VirtualInterfaceId: aws.String(vifId), + }) + if err != nil { + if isNoSuchDxVirtualInterfaceErr(err) { + return nil, directconnect.VirtualInterfaceStateDeleted, nil + } + return nil, "", err + } + + if len(resp.VirtualInterfaces) < 1 { + return nil, directconnect.ConnectionStateDeleted, nil + } + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + } +} + +func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: target, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + if _, err := stateConf.WaitForState(); err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err.Error()) + } + + return nil +} + +// Attributes common to public VIFs and creator side of hosted public VIFs. +func dxPublicVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + if err := dxVirtualInterfaceAttributes(d, meta, vif); err != nil { + return err + } + d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) + + return nil +} + +// Attributes common to private VIFs and creator side of hosted private VIFs. +func dxPrivateVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + return dxVirtualInterfaceAttributes(d, meta, vif) +} + +// Attributes common to public/private VIFs and creator side of hosted public/private VIFs. +func dxVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { + return err + } + + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + + return nil +} + +func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) error { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return nil +} + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} + +// Schemas common to all (public/private, hosted or not) virtual interfaces. +var dxVirtualInterfaceSchemaWithTags = mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "tags": tagsSchema(), + }, +) +var dxVirtualInterfaceSchema = map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, +} diff --git a/aws/provider.go b/aws/provider.go index 1939f4dd146..aa33cf025bf 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -263,373 +263,375 @@ func Provider() terraform.ResourceProvider { }, ResourcesMap: map[string]*schema.Resource{ - "aws_acm_certificate": resourceAwsAcmCertificate(), - "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), - "aws_acmpca_certificate_authority": resourceAwsAcmpcaCertificateAuthority(), - "aws_ami": resourceAwsAmi(), - "aws_ami_copy": resourceAwsAmiCopy(), - "aws_ami_from_instance": resourceAwsAmiFromInstance(), - "aws_ami_launch_permission": resourceAwsAmiLaunchPermission(), - "aws_api_gateway_account": resourceAwsApiGatewayAccount(), - "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), - "aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(), - "aws_api_gateway_base_path_mapping": resourceAwsApiGatewayBasePathMapping(), - "aws_api_gateway_client_certificate": resourceAwsApiGatewayClientCertificate(), - "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), - "aws_api_gateway_documentation_part": resourceAwsApiGatewayDocumentationPart(), - "aws_api_gateway_documentation_version": resourceAwsApiGatewayDocumentationVersion(), - "aws_api_gateway_domain_name": resourceAwsApiGatewayDomainName(), - "aws_api_gateway_gateway_response": resourceAwsApiGatewayGatewayResponse(), - "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), - "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), - "aws_api_gateway_method": resourceAwsApiGatewayMethod(), - "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), - "aws_api_gateway_method_settings": resourceAwsApiGatewayMethodSettings(), - "aws_api_gateway_model": resourceAwsApiGatewayModel(), - "aws_api_gateway_request_validator": resourceAwsApiGatewayRequestValidator(), - "aws_api_gateway_resource": resourceAwsApiGatewayResource(), - "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), - "aws_api_gateway_stage": resourceAwsApiGatewayStage(), - "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), - "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), - "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), - "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), - "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), - "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), - "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), - "aws_appsync_datasource": resourceAwsAppsyncDatasource(), - "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), - "aws_athena_database": resourceAwsAthenaDatabase(), - "aws_athena_named_query": resourceAwsAthenaNamedQuery(), - "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), - "aws_autoscaling_group": resourceAwsAutoscalingGroup(), - "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), - "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), - "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), - "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), - "aws_budgets_budget": resourceAwsBudgetsBudget(), - "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), - "aws_cloudformation_stack": resourceAwsCloudFormationStack(), - "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), - "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), - "aws_cloudtrail": resourceAwsCloudTrail(), - "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), - "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), - "aws_cloudwatch_event_target": resourceAwsCloudWatchEventTarget(), - "aws_cloudwatch_log_destination": resourceAwsCloudWatchLogDestination(), - "aws_cloudwatch_log_destination_policy": resourceAwsCloudWatchLogDestinationPolicy(), - "aws_cloudwatch_log_group": resourceAwsCloudWatchLogGroup(), - "aws_cloudwatch_log_metric_filter": resourceAwsCloudWatchLogMetricFilter(), - "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), - "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), - "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), - "aws_config_aggregate_authorization": resourceAwsConfigAggregateAuthorization(), - "aws_config_config_rule": resourceAwsConfigConfigRule(), - "aws_config_configuration_aggregator": resourceAwsConfigConfigurationAggregator(), - "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), - "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), - "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), - "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), - "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), - "aws_cognito_identity_provider": resourceAwsCognitoIdentityProvider(), - "aws_cognito_user_group": resourceAwsCognitoUserGroup(), - "aws_cognito_user_pool": resourceAwsCognitoUserPool(), - "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), - "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), - "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), - "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), - "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), - "aws_codedeploy_app": resourceAwsCodeDeployApp(), - "aws_codedeploy_deployment_config": resourceAwsCodeDeployDeploymentConfig(), - "aws_codedeploy_deployment_group": resourceAwsCodeDeployDeploymentGroup(), - "aws_codecommit_repository": resourceAwsCodeCommitRepository(), - "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), - "aws_codebuild_project": resourceAwsCodeBuildProject(), - "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), - "aws_codepipeline": resourceAwsCodePipeline(), - "aws_customer_gateway": resourceAwsCustomerGateway(), - "aws_dax_cluster": resourceAwsDaxCluster(), - "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), - "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), - "aws_db_event_subscription": resourceAwsDbEventSubscription(), - "aws_db_instance": resourceAwsDbInstance(), - "aws_db_option_group": resourceAwsDbOptionGroup(), - "aws_db_parameter_group": resourceAwsDbParameterGroup(), - "aws_db_security_group": resourceAwsDbSecurityGroup(), - "aws_db_snapshot": resourceAwsDbSnapshot(), - "aws_db_subnet_group": resourceAwsDbSubnetGroup(), - "aws_devicefarm_project": resourceAwsDevicefarmProject(), - "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), - "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), - "aws_dms_certificate": resourceAwsDmsCertificate(), - "aws_dms_endpoint": resourceAwsDmsEndpoint(), - "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), - "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), - "aws_dms_replication_task": resourceAwsDmsReplicationTask(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_connection": resourceAwsDxConnection(), - "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), - "aws_dx_gateway": resourceAwsDxGateway(), - "aws_dx_gateway_association": resourceAwsDxGatewayAssociation(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_eks_cluster": resourceAwsEksCluster(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), - "aws_glue_classifier": resourceAwsGlueClassifier(), - "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_crawler": resourceAwsGlueCrawler(), - "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_trigger": resourceAwsGlueTrigger(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), - "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_launch_template": resourceAwsLaunchTemplate(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_organizations_policy": resourceAwsOrganizationsPolicy(), - "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), - "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), - "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_acm_certificate": resourceAwsAcmCertificate(), + "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), + "aws_acmpca_certificate_authority": resourceAwsAcmpcaCertificateAuthority(), + "aws_ami": resourceAwsAmi(), + "aws_ami_copy": resourceAwsAmiCopy(), + "aws_ami_from_instance": resourceAwsAmiFromInstance(), + "aws_ami_launch_permission": resourceAwsAmiLaunchPermission(), + "aws_api_gateway_account": resourceAwsApiGatewayAccount(), + "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), + "aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(), + "aws_api_gateway_base_path_mapping": resourceAwsApiGatewayBasePathMapping(), + "aws_api_gateway_client_certificate": resourceAwsApiGatewayClientCertificate(), + "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), + "aws_api_gateway_documentation_part": resourceAwsApiGatewayDocumentationPart(), + "aws_api_gateway_documentation_version": resourceAwsApiGatewayDocumentationVersion(), + "aws_api_gateway_domain_name": resourceAwsApiGatewayDomainName(), + "aws_api_gateway_gateway_response": resourceAwsApiGatewayGatewayResponse(), + "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), + "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), + "aws_api_gateway_method": resourceAwsApiGatewayMethod(), + "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), + "aws_api_gateway_method_settings": resourceAwsApiGatewayMethodSettings(), + "aws_api_gateway_model": resourceAwsApiGatewayModel(), + "aws_api_gateway_request_validator": resourceAwsApiGatewayRequestValidator(), + "aws_api_gateway_resource": resourceAwsApiGatewayResource(), + "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), + "aws_api_gateway_stage": resourceAwsApiGatewayStage(), + "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), + "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), + "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), + "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), + "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), + "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), + "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), + "aws_appsync_datasource": resourceAwsAppsyncDatasource(), + "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), + "aws_athena_database": resourceAwsAthenaDatabase(), + "aws_athena_named_query": resourceAwsAthenaNamedQuery(), + "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), + "aws_autoscaling_group": resourceAwsAutoscalingGroup(), + "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), + "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), + "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), + "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), + "aws_budgets_budget": resourceAwsBudgetsBudget(), + "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), + "aws_cloudformation_stack": resourceAwsCloudFormationStack(), + "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), + "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), + "aws_cloudtrail": resourceAwsCloudTrail(), + "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), + "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), + "aws_cloudwatch_event_target": resourceAwsCloudWatchEventTarget(), + "aws_cloudwatch_log_destination": resourceAwsCloudWatchLogDestination(), + "aws_cloudwatch_log_destination_policy": resourceAwsCloudWatchLogDestinationPolicy(), + "aws_cloudwatch_log_group": resourceAwsCloudWatchLogGroup(), + "aws_cloudwatch_log_metric_filter": resourceAwsCloudWatchLogMetricFilter(), + "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), + "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), + "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), + "aws_config_aggregate_authorization": resourceAwsConfigAggregateAuthorization(), + "aws_config_config_rule": resourceAwsConfigConfigRule(), + "aws_config_configuration_aggregator": resourceAwsConfigConfigurationAggregator(), + "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), + "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), + "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), + "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), + "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), + "aws_cognito_identity_provider": resourceAwsCognitoIdentityProvider(), + "aws_cognito_user_group": resourceAwsCognitoUserGroup(), + "aws_cognito_user_pool": resourceAwsCognitoUserPool(), + "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), + "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), + "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), + "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), + "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), + "aws_codedeploy_app": resourceAwsCodeDeployApp(), + "aws_codedeploy_deployment_config": resourceAwsCodeDeployDeploymentConfig(), + "aws_codedeploy_deployment_group": resourceAwsCodeDeployDeploymentGroup(), + "aws_codecommit_repository": resourceAwsCodeCommitRepository(), + "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), + "aws_codebuild_project": resourceAwsCodeBuildProject(), + "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), + "aws_codepipeline": resourceAwsCodePipeline(), + "aws_customer_gateway": resourceAwsCustomerGateway(), + "aws_dax_cluster": resourceAwsDaxCluster(), + "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), + "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), + "aws_db_event_subscription": resourceAwsDbEventSubscription(), + "aws_db_instance": resourceAwsDbInstance(), + "aws_db_option_group": resourceAwsDbOptionGroup(), + "aws_db_parameter_group": resourceAwsDbParameterGroup(), + "aws_db_security_group": resourceAwsDbSecurityGroup(), + "aws_db_snapshot": resourceAwsDbSnapshot(), + "aws_db_subnet_group": resourceAwsDbSubnetGroup(), + "aws_devicefarm_project": resourceAwsDevicefarmProject(), + "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), + "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), + "aws_dms_certificate": resourceAwsDmsCertificate(), + "aws_dms_endpoint": resourceAwsDmsEndpoint(), + "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), + "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), + "aws_dms_replication_task": resourceAwsDmsReplicationTask(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_connection": resourceAwsDxConnection(), + "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), + "aws_dx_gateway": resourceAwsDxGateway(), + "aws_dx_gateway_association": resourceAwsDxGatewayAssociation(), + "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), + "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), + "aws_dynamodb_table": resourceAwsDynamoDbTable(), + "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), + "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), + "aws_ecr_repository": resourceAwsEcrRepository(), + "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), + "aws_ecs_cluster": resourceAwsEcsCluster(), + "aws_ecs_service": resourceAwsEcsService(), + "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_mount_target": resourceAwsEfsMountTarget(), + "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), + "aws_eip": resourceAwsEip(), + "aws_eip_association": resourceAwsEipAssociation(), + "aws_eks_cluster": resourceAwsEksCluster(), + "aws_elasticache_cluster": resourceAwsElasticacheCluster(), + "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), + "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), + "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), + "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), + "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), + "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), + "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), + "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), + "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), + "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), + "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), + "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), + "aws_elb": resourceAwsElb(), + "aws_elb_attachment": resourceAwsElbAttachment(), + "aws_emr_cluster": resourceAwsEMRCluster(), + "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), + "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), + "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), + "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), + "aws_glue_classifier": resourceAwsGlueClassifier(), + "aws_glue_connection": resourceAwsGlueConnection(), + "aws_glue_crawler": resourceAwsGlueCrawler(), + "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_trigger": resourceAwsGlueTrigger(), + "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), + "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), + "aws_iam_access_key": resourceAwsIamAccessKey(), + "aws_iam_account_alias": resourceAwsIamAccountAlias(), + "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), + "aws_iam_group_policy": resourceAwsIamGroupPolicy(), + "aws_iam_group": resourceAwsIamGroup(), + "aws_iam_group_membership": resourceAwsIamGroupMembership(), + "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), + "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), + "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), + "aws_iam_policy": resourceAwsIamPolicy(), + "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), + "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), + "aws_iam_role_policy": resourceAwsIamRolePolicy(), + "aws_iam_role": resourceAwsIamRole(), + "aws_iam_saml_provider": resourceAwsIamSamlProvider(), + "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), + "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), + "aws_iam_user_policy": resourceAwsIamUserPolicy(), + "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), + "aws_iam_user": resourceAwsIamUser(), + "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), + "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), + "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), + "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), + "aws_instance": resourceAwsInstance(), + "aws_internet_gateway": resourceAwsInternetGateway(), + "aws_iot_certificate": resourceAwsIotCertificate(), + "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_type": resourceAwsIotThingType(), + "aws_iot_topic_rule": resourceAwsIotTopicRule(), + "aws_key_pair": resourceAwsKeyPair(), + "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), + "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kms_alias": resourceAwsKmsAlias(), + "aws_kms_grant": resourceAwsKmsGrant(), + "aws_kms_key": resourceAwsKmsKey(), + "aws_lambda_function": resourceAwsLambdaFunction(), + "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), + "aws_lambda_alias": resourceAwsLambdaAlias(), + "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_lightsail_domain": resourceAwsLightsailDomain(), + "aws_lightsail_instance": resourceAwsLightsailInstance(), + "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), + "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), + "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), + "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), + "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), + "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), + "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), + "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), + "aws_mq_broker": resourceAwsMqBroker(), + "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_nat_gateway": resourceAwsNatGateway(), + "aws_network_acl": resourceAwsNetworkAcl(), + "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), + "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), + "aws_network_acl_rule": resourceAwsNetworkAclRule(), + "aws_network_interface": resourceAwsNetworkInterface(), + "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), + "aws_opsworks_application": resourceAwsOpsworksApplication(), + "aws_opsworks_stack": resourceAwsOpsworksStack(), + "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), + "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), + "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), + "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), + "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), + "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), + "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), + "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), + "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), + "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), + "aws_opsworks_instance": resourceAwsOpsworksInstance(), + "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), + "aws_opsworks_permission": resourceAwsOpsworksPermission(), + "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), + "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), + "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), + "aws_placement_group": resourceAwsPlacementGroup(), + "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), + "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_redshift_cluster": resourceAwsRedshiftCluster(), + "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), + "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), + "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), + "aws_route53_query_log": resourceAwsRoute53QueryLog(), + "aws_route53_record": resourceAwsRoute53Record(), + "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), + "aws_route53_zone": resourceAwsRoute53Zone(), + "aws_route53_health_check": resourceAwsRoute53HealthCheck(), + "aws_route": resourceAwsRoute(), + "aws_route_table": resourceAwsRouteTable(), + "aws_default_route_table": resourceAwsDefaultRouteTable(), + "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), + "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), + "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), + "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), + "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), + "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), + "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), + "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), + "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_bucket": resourceAwsS3Bucket(), + "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_object": resourceAwsS3BucketObject(), + "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_security_group": resourceAwsSecurityGroup(), + "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), + "aws_default_security_group": resourceAwsDefaultSecurityGroup(), + "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), + "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), + "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), + "aws_simpledb_domain": resourceAwsSimpleDBDomain(), + "aws_ssm_activation": resourceAwsSsmActivation(), + "aws_ssm_association": resourceAwsSsmAssociation(), + "aws_ssm_document": resourceAwsSsmDocument(), + "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), + "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), + "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), + "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), + "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), + "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), + "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), + "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), + "aws_sqs_queue": resourceAwsSqsQueue(), + "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), + "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), + "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), + "aws_sns_topic": resourceAwsSnsTopic(), + "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), + "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), + "aws_sfn_activity": resourceAwsSfnActivity(), + "aws_sfn_state_machine": resourceAwsSfnStateMachine(), + "aws_default_subnet": resourceAwsDefaultSubnet(), + "aws_subnet": resourceAwsSubnet(), + "aws_volume_attachment": resourceAwsVolumeAttachment(), + "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), + "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), + "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), + "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), + "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), + "aws_default_vpc": resourceAwsDefaultVpc(), + "aws_vpc": resourceAwsVpc(), + "aws_vpc_endpoint": resourceAwsVpcEndpoint(), + "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), + "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), + "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), + "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), + "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpn_connection": resourceAwsVpnConnection(), + "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), + "aws_vpn_gateway": resourceAwsVpnGateway(), + "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), + "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), + "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), + "aws_waf_ipset": resourceAwsWafIPSet(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), + "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), + "aws_waf_web_acl": resourceAwsWafWebAcl(), + "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), + "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), + "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), + "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), + "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), + "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), + "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), + "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface.go b/aws/resource_aws_dx_hosted_public_virtual_interface.go new file mode 100644 index 00000000000..dcd1aa71f8c --- /dev/null +++ b/aws/resource_aws_dx_hosted_public_virtual_interface.go @@ -0,0 +1,131 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxHostedPublicVirtualInterface() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPublicVirtualInterfaceCreate, + Read: resourceAwsDxHostedPublicVirtualInterfaceRead, + Delete: resourceAwsDxHostedPublicVirtualInterfaceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "owner_account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "route_filter_prefixes": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + MinItems: 1, + }, + }, + ), + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + addressFamily := d.Get("address_family").(string) + caRaw, caOk := d.GetOk("customer_address") + aaRaw, aaOk := d.GetOk("amazon_address") + if addressFamily == directconnect.AddressFamilyIpv4 { + if !caOk { + return fmt.Errorf("'customer_address' must be set when 'address_family' is '%s'", addressFamily) + } + if !aaOk { + return fmt.Errorf("'amazon_address' must be set when 'address_family' is '%s'", addressFamily) + } + } + + req := &directconnect.AllocatePublicVirtualInterfaceInput{ + ConnectionId: aws.String(d.Get("connection_id").(string)), + OwnerAccount: aws.String(d.Get("owner_account_id").(string)), + NewPublicVirtualInterfaceAllocation: &directconnect.NewPublicVirtualInterfaceAllocation{ + VirtualInterfaceName: aws.String(d.Get("name").(string)), + Vlan: aws.Int64(int64(d.Get("vlan").(int))), + Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), + AddressFamily: aws.String(addressFamily), + }, + } + if v, ok := d.GetOk("bgp_auth_key"); ok { + req.NewPublicVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) + } + if caOk { + req.NewPublicVirtualInterfaceAllocation.CustomerAddress = aws.String(caRaw.(string)) + } + if aaOk { + req.NewPublicVirtualInterfaceAllocation.AmazonAddress = aws.String(aaRaw.(string)) + } + if v, ok := d.GetOk("route_filter_prefixes"); ok { + req.NewPublicVirtualInterfaceAllocation.RouteFilterPrefixes = expandDxRouteFilterPrefixes(v.(*schema.Set).List()) + } + + log.Printf("[DEBUG] Allocating Direct Connect hosted public virtual interface: %#v", req) + resp, err := conn.AllocatePublicVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error allocating Direct Connect hosted public virtual interface: %s", err.Error()) + } + + d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + + if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPublicVirtualInterfaceRead(d, meta) +} + +func resourceAwsDxHostedPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { + vif, err := dxVirtualInterfaceRead(d, meta) + if err != nil { + return err + } + if vif == nil { + return nil + } + + d.Set("owner_account_id", vif.OwnerAccount) + return dxPublicVirtualInterfaceAttributes(d, meta, vif) +} + +func resourceAwsDxHostedPublicVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func dxHostedPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStateVerifying, + }) +} diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go new file mode 100644 index 00000000000..e3cf0f8911d --- /dev/null +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -0,0 +1,113 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxHostedPublicVirtualInterfaceAccepter() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate, + Read: resourceAwsDxHostedPublicVirtualInterfaceAccepterRead, + Update: resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate, + Delete: resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "virtual_interface_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "tags": tagsSchema(), + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vifId := d.Get("virtual_interface_id").(string) + req := &directconnect.ConfirmPublicVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(vifId), + } + + log.Printf("[DEBUG] Accepting Direct Connect hosted public virtual interface: %#v", req) + _, err := conn.ConfirmPublicVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error accepting Direct Connect hosted public virtual interface: %s", err.Error()) + } + + d.SetId(vifId) + + if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d, meta) +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d, meta) + if err != nil { + return err + } + if vif == nil { + return nil + } + + if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { + return err + } + d.Set("virtual_interface_id", vif.VirtualInterfaceId) + if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { + if err := dxVirtualInterfaceUpdate(d, meta); err != nil { + return err + } + + return resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d, meta) +} + +func resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStateVerifying, + }) +} diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go new file mode 100644 index 00000000000..19a48986e5a --- /dev/null +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go @@ -0,0 +1,105 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsDxHostedPublicVirtualInterface_basic(t *testing.T) { + key := "DX_CONNECTION_ID" + connectionId := os.Getenv(key) + if connectionId == "" { + t.Skipf("Environment variable %s is not set", key) + } + key = "DX_HOSTED_VIF_OWNER_ACCOUNT" + ownerAccountId := os.Getenv(key) + if ownerAccountId == "" { + t.Skipf("Environment variable %s is not set", key) + } + vifName := fmt.Sprintf("tf-dx-vif-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxHostedPublicVirtualInterfaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDxHostedPublicVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxHostedPublicVirtualInterfaceExists("aws_dx_hosted_public_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_hosted_public_virtual_interface.foo", "name", vifName), + ), + }, + // Test import. + { + ResourceName: "aws_dx_hosted_public_virtual_interface.foo", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsDxHostedPublicVirtualInterfaceDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).dxconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_dx_hosted_public_virtual_interface" { + continue + } + + input := &directconnect.DescribeVirtualInterfacesInput{ + VirtualInterfaceId: aws.String(rs.Primary.ID), + } + + resp, err := conn.DescribeVirtualInterfaces(input) + if err != nil { + return err + } + for _, v := range resp.VirtualInterfaces { + if *v.VirtualInterfaceId == rs.Primary.ID && !(*v.VirtualInterfaceState == directconnect.VirtualInterfaceStateDeleted) { + return fmt.Errorf("[DESTROY ERROR] Dx Public VIF (%s) not deleted", rs.Primary.ID) + } + } + } + return nil +} + +func testAccCheckAwsDxHostedPublicVirtualInterfaceExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + return nil + } +} + +func testAccDxHostedPublicVirtualInterfaceConfig_basic(cid, ownerAcctId, n string) string { + return fmt.Sprintf(` +resource "aws_dx_hosted_public_virtual_interface" "foo" { + connection_id = "%s" + owner_account_id = "%s" + + name = "%s" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 + + customer_address = "175.45.176.1/30" + amazon_address = "175.45.176.2/30" + route_filter_prefixes = [ + "210.52.109.0/24", + "175.45.176.0/22" + ] +} + `, cid, ownerAcctId, n) +} diff --git a/aws/utils.go b/aws/utils.go index 21c3aab7ef3..6a120cccff8 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -7,6 +7,7 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -47,3 +48,15 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } + +func mergeSchemas(schemas ...map[string]*schema.Schema) map[string]*schema.Schema { + merged := make(map[string]*schema.Schema) + + for _, schema := range schemas { + for k, v := range schema { + merged[k] = v + } + } + + return merged +} diff --git a/aws/utils_test.go b/aws/utils_test.go index 8248f4384d2..a5854e7ef4b 100644 --- a/aws/utils_test.go +++ b/aws/utils_test.go @@ -1,6 +1,10 @@ package aws -import "testing" +import ( + "testing" + + "github.com/hashicorp/terraform/helper/schema" +) var base64encodingTests = []struct { in []byte @@ -70,3 +74,29 @@ func TestJsonBytesEqualWhitespaceAndNoWhitespace(t *testing.T) { t.Errorf("Expected jsonBytesEqual to return false for %s == %s", noWhitespaceDiff, whitespaceDiff) } } + +func TestMergeSchemas(t *testing.T) { + s1 := map[string]*schema.Schema{ + "aaa": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "zzz": { + Type: schema.TypeInt, + Optional: true, + Default: 42, + }, + } + s2 := map[string]*schema.Schema{ + "xxx": { + Type: schema.TypeFloat, + Computed: true, + }, + } + + s3 := mergeSchemas(s1, s2) + if len(s3) != 3 { + t.Errorf("Expected merge schema to be of size 3, got %d", len(s3)) + } +} diff --git a/website/aws.erb b/website/aws.erb index 0e07c6a0f18..004310ed07c 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -773,6 +773,12 @@ > aws_dx_gateway_association + > + aws_dx_hosted_public_virtual_interface + + > + aws_dx_hosted_public_virtual_interface_accepter + > aws_dx_lag diff --git a/website/docs/r/dx_hosted_public_virtual_interface.html.markdown b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown new file mode 100644 index 00000000000..1d5a5d57987 --- /dev/null +++ b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown @@ -0,0 +1,70 @@ +--- +layout: "aws" +page_title: "AWS: aws_dx_hosted_public_virtual_interface" +sidebar_current: "docs-aws-resource-dx-hosted-public-virtual-interface" +description: |- + Provides a Direct Connect hosted public virtual interface resource. +--- + +# aws_dx_hosted_public_virtual_interface + +Provides a Direct Connect hosted public virtual interface resource. +A hosted virtual interface is a virtual interface that is owned by another AWS account. + +## Example Usage + +```hcl +resource "aws_dx_hosted_public_virtual_interface" "foo" { + connection_id = "dxcon-zzzzzzzz" + + name = "vif-foo" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 + + customer_address = "175.45.176.1/30" + amazon_address = "175.45.176.2/30" + route_filter_prefixes = [ + "210.52.109.0/24", + "175.45.176.0/22" + ] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. +* `owner_account_id` - (Required) The AWS account that will own the new virtual interface. +* `name` - (Required) The name for the virtual interface. +* `vlan` - (Required) The VLAN ID. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `bgp_auth_key` - (Optional) The authentication key for BGP configuration. +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. +* `route_filter_prefixes` - (Required) A list of routes to be advertised to the AWS network in this region. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the virtual interface. +* `arn` - The ARN of the virtual interface. + +## Timeouts + +`aws_dx_hosted_public_virtual_interface` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating virtual interface +- `delete` - (Default `10 minutes`) Used for destroying virtual interface + +## Import + +Direct Connect hosted public virtual interfaces can be imported using the `vif id`, e.g. + +``` +$ terraform import aws_dx_hosted_public_virtual_interface.test dxvif-33cc44dd +``` diff --git a/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown b/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown new file mode 100644 index 00000000000..04a5df26b13 --- /dev/null +++ b/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown @@ -0,0 +1,88 @@ +--- +layout: "aws" +page_title: "AWS: aws_dx_hosted_public_virtual_interface_accepter" +sidebar_current: "docs-aws-resource-dx-hosted-public-virtual-interface-accepter" +description: |- + Provides a resource to manage the accepter's side of a Direct Connect hosted public virtual interface. +--- + +# aws_dx_hosted_public_virtual_interface_accepter + +Provides a resource to manage the accepter's side of a Direct Connect hosted public virtual interface. +This resource accepts ownership of a public virtual interface created by another AWS account. + +## Example Usage + +```hcl +provider "aws" { + # Creator's credentials. +} + +provider "aws" { + alias = "accepter" + + # Accepter's credentials. +} + +data "aws_caller_identity" "accepter" { + provider = "aws.accepter" +} + +# Creator's side of the VIF +resource "aws_dx_hosted_public_virtual_interface" "creator" { + connection_id = "dxcon-zzzzzzzz" + owner_account_id = "${data.aws_caller_identity.accepter.account_id}" + + name = "vif-foo" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 + + customer_address = "175.45.176.1/30" + amazon_address = "175.45.176.2/30" + route_filter_prefixes = [ + "210.52.109.0/24", + "175.45.176.0/22" + ] +} + +# Accepter's side of the VIF. +resource "aws_dx_hosted_public_virtual_interface_accepter" "accepter" { + provider = "aws.accepter" + virtual_interface_id = "${aws_dx_hosted_public_virtual_interface.creator.id}" + + tags { + Side = "Accepter" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `virtual_interface_id` - (Required) The ID of the Direct Connect virtual interface to accept. +* `tags` - (Optional) A mapping of tags to assign to the resource. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the virtual interface. +* `arn` - The ARN of the virtual interface. + +## Timeouts + +`aws_dx_hosted_public_virtual_interface_accepter` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating virtual interface +- `delete` - (Default `10 minutes`) Used for destroying virtual interface + +## Import + +Direct Connect hosted public virtual interfaces can be imported using the `vif id`, e.g. + +``` +$ terraform import aws_dx_hosted_public_virtual_interface_accepter.test dxvif-33cc44dd +``` From 120e6ee70667fa283489eb696f21e1f6ef6df14c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 11:52:26 -0500 Subject: [PATCH 1545/3316] Fix indentation for configuration generation. --- aws/resource_aws_dx_hosted_public_virtual_interface_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go index 19a48986e5a..46a737d63b5 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go @@ -101,5 +101,5 @@ resource "aws_dx_hosted_public_virtual_interface" "foo" { "175.45.176.0/22" ] } - `, cid, ownerAcctId, n) +`, cid, ownerAcctId, n) } From 4f77ce9a8a99ab168ded3ce4955a6e8ab3eb7212 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 11:52:32 -0500 Subject: [PATCH 1546/3316] Change interface to 'dxVirtualInterfaceRead'. --- aws/dx_vif.go | 133 ++++++++---------- ..._aws_dx_hosted_public_virtual_interface.go | 6 +- ...osted_public_virtual_interface_accepter.go | 4 +- 3 files changed, 70 insertions(+), 73 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 903c5ca4fed..27a83780c50 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -13,25 +13,75 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) +// Schemas common to all (public/private, hosted or not) virtual interfaces. +var dxVirtualInterfaceSchemaWithTags = mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "tags": tagsSchema(), + }, +) +var dxVirtualInterfaceSchema = map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, +} + func isNoSuchDxVirtualInterfaceErr(err error) bool { return isAWSErr(err, "DirectConnectClientException", "does not exist") } -func dxVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) (*directconnect.VirtualInterface, error) { - conn := meta.(*AWSClient).dxconn - - resp, state, err := dxVirtualInterfaceStateRefresh(conn, d.Id())() +func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { + resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) } - terminalStates := map[string]bool{ - directconnect.VirtualInterfaceStateDeleted: true, - directconnect.VirtualInterfaceStateDeleting: true, - directconnect.VirtualInterfaceStateRejected: true, - } - if _, ok := terminalStates[state]; ok { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") + if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil } @@ -195,62 +245,3 @@ func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) * } return schema.NewSet(schema.HashString, out) } - -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface.go b/aws/resource_aws_dx_hosted_public_virtual_interface.go index dcd1aa71f8c..9d933e96d05 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface.go @@ -99,11 +99,15 @@ func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, met } func resourceAwsDxHostedPublicVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { - vif, err := dxVirtualInterfaceRead(d, meta) + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { return err } if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") return nil } diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go index e3cf0f8911d..1e09750fc3d 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -66,11 +66,13 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceD func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - vif, err := dxVirtualInterfaceRead(d, meta) + vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { return err } if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") return nil } From 7455d5a782cff4a45c8ac614f47ebf0109ac9a5a Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Thu, 21 Jun 2018 15:58:30 -0700 Subject: [PATCH 1547/3316] Adding codebuild.EnvironmentTypeWindowsContainer as valid type for aws_codepipeline_project/environment/type. Fixes #4940 --- aws/resource_aws_codebuild_project.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 4a378ecf048..6705fc82bc7 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -157,6 +157,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { Required: true, ValidateFunc: validation.StringInSlice([]string{ codebuild.EnvironmentTypeLinuxContainer, + codebuild.EnvironmentTypeWindowsContainer, }, false), }, "privileged_mode": { From 72bbc3975603e367bb6787de77717281cbd9707d Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 25 Jan 2018 18:48:12 -0500 Subject: [PATCH 1548/3316] Add 'aws_dx_hosted_private_virtual_interface' resource. Add 'aws_dx_hosted_private_virtual_interface_accepter' resource. --- aws/dx_vif.go | 256 ++++++ aws/provider.go | 736 +++++++++--------- ...aws_dx_hosted_private_virtual_interface.go | 108 +++ ...sted_private_virtual_interface_accepter.go | 139 ++++ ...x_hosted_private_virtual_interface_test.go | 98 +++ aws/utils.go | 13 + aws/utils_test.go | 32 +- website/aws.erb | 6 + ...ed_private_virtual_interface.html.markdown | 62 ++ ...e_virtual_interface_accepter.html.markdown | 88 +++ 10 files changed, 1170 insertions(+), 368 deletions(-) create mode 100644 aws/dx_vif.go create mode 100644 aws/resource_aws_dx_hosted_private_virtual_interface.go create mode 100644 aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go create mode 100644 aws/resource_aws_dx_hosted_private_virtual_interface_test.go create mode 100644 website/docs/r/dx_hosted_private_virtual_interface.html.markdown create mode 100644 website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown diff --git a/aws/dx_vif.go b/aws/dx_vif.go new file mode 100644 index 00000000000..903c5ca4fed --- /dev/null +++ b/aws/dx_vif.go @@ -0,0 +1,256 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func isNoSuchDxVirtualInterfaceErr(err error) bool { + return isAWSErr(err, "DirectConnectClientException", "does not exist") +} + +func dxVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) (*directconnect.VirtualInterface, error) { + conn := meta.(*AWSClient).dxconn + + resp, state, err := dxVirtualInterfaceStateRefresh(conn, d.Id())() + if err != nil { + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) + } + terminalStates := map[string]bool{ + directconnect.VirtualInterfaceStateDeleted: true, + directconnect.VirtualInterfaceStateDeleting: true, + directconnect.VirtualInterfaceStateRejected: true, + } + if _, ok := terminalStates[state]; ok { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil, nil + } + + return resp.(*directconnect.VirtualInterface), nil +} + +func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + if err := setTagsDX(conn, d, arn); err != nil { + return err + } + + return nil +} + +func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + log.Printf("[DEBUG] Deleting Direct Connect virtual interface: %s", d.Id()) + _, err := conn.DeleteVirtualInterface(&directconnect.DeleteVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(d.Id()), + }) + if err != nil { + if isNoSuchDxVirtualInterfaceErr(err) { + return nil + } + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err.Error()) + } + + deleteStateConf := &resource.StateChangeConf{ + Pending: []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDeleting, + directconnect.VirtualInterfaceStateDown, + directconnect.VirtualInterfaceStatePending, + directconnect.VirtualInterfaceStateRejected, + directconnect.VirtualInterfaceStateVerifying, + }, + Target: []string{ + directconnect.VirtualInterfaceStateDeleted, + }, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = deleteStateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeVirtualInterfaces(&directconnect.DescribeVirtualInterfacesInput{ + VirtualInterfaceId: aws.String(vifId), + }) + if err != nil { + if isNoSuchDxVirtualInterfaceErr(err) { + return nil, directconnect.VirtualInterfaceStateDeleted, nil + } + return nil, "", err + } + + if len(resp.VirtualInterfaces) < 1 { + return nil, directconnect.ConnectionStateDeleted, nil + } + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + } +} + +func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: target, + Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + if _, err := stateConf.WaitForState(); err != nil { + return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err.Error()) + } + + return nil +} + +// Attributes common to public VIFs and creator side of hosted public VIFs. +func dxPublicVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + if err := dxVirtualInterfaceAttributes(d, meta, vif); err != nil { + return err + } + d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) + + return nil +} + +// Attributes common to private VIFs and creator side of hosted private VIFs. +func dxPrivateVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + return dxVirtualInterfaceAttributes(d, meta, vif) +} + +// Attributes common to public/private VIFs and creator side of hosted public/private VIFs. +func dxVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { + if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { + return err + } + + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + + return nil +} + +func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) error { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return nil +} + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} + +// Schemas common to all (public/private, hosted or not) virtual interfaces. +var dxVirtualInterfaceSchemaWithTags = mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "tags": tagsSchema(), + }, +) +var dxVirtualInterfaceSchema = map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, +} diff --git a/aws/provider.go b/aws/provider.go index 1939f4dd146..1f64f97ef3e 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -263,373 +263,375 @@ func Provider() terraform.ResourceProvider { }, ResourcesMap: map[string]*schema.Resource{ - "aws_acm_certificate": resourceAwsAcmCertificate(), - "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), - "aws_acmpca_certificate_authority": resourceAwsAcmpcaCertificateAuthority(), - "aws_ami": resourceAwsAmi(), - "aws_ami_copy": resourceAwsAmiCopy(), - "aws_ami_from_instance": resourceAwsAmiFromInstance(), - "aws_ami_launch_permission": resourceAwsAmiLaunchPermission(), - "aws_api_gateway_account": resourceAwsApiGatewayAccount(), - "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), - "aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(), - "aws_api_gateway_base_path_mapping": resourceAwsApiGatewayBasePathMapping(), - "aws_api_gateway_client_certificate": resourceAwsApiGatewayClientCertificate(), - "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), - "aws_api_gateway_documentation_part": resourceAwsApiGatewayDocumentationPart(), - "aws_api_gateway_documentation_version": resourceAwsApiGatewayDocumentationVersion(), - "aws_api_gateway_domain_name": resourceAwsApiGatewayDomainName(), - "aws_api_gateway_gateway_response": resourceAwsApiGatewayGatewayResponse(), - "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), - "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), - "aws_api_gateway_method": resourceAwsApiGatewayMethod(), - "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), - "aws_api_gateway_method_settings": resourceAwsApiGatewayMethodSettings(), - "aws_api_gateway_model": resourceAwsApiGatewayModel(), - "aws_api_gateway_request_validator": resourceAwsApiGatewayRequestValidator(), - "aws_api_gateway_resource": resourceAwsApiGatewayResource(), - "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), - "aws_api_gateway_stage": resourceAwsApiGatewayStage(), - "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), - "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), - "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), - "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), - "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), - "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), - "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), - "aws_appsync_datasource": resourceAwsAppsyncDatasource(), - "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), - "aws_athena_database": resourceAwsAthenaDatabase(), - "aws_athena_named_query": resourceAwsAthenaNamedQuery(), - "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), - "aws_autoscaling_group": resourceAwsAutoscalingGroup(), - "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), - "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), - "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), - "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), - "aws_budgets_budget": resourceAwsBudgetsBudget(), - "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), - "aws_cloudformation_stack": resourceAwsCloudFormationStack(), - "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), - "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), - "aws_cloudtrail": resourceAwsCloudTrail(), - "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), - "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), - "aws_cloudwatch_event_target": resourceAwsCloudWatchEventTarget(), - "aws_cloudwatch_log_destination": resourceAwsCloudWatchLogDestination(), - "aws_cloudwatch_log_destination_policy": resourceAwsCloudWatchLogDestinationPolicy(), - "aws_cloudwatch_log_group": resourceAwsCloudWatchLogGroup(), - "aws_cloudwatch_log_metric_filter": resourceAwsCloudWatchLogMetricFilter(), - "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), - "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), - "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), - "aws_config_aggregate_authorization": resourceAwsConfigAggregateAuthorization(), - "aws_config_config_rule": resourceAwsConfigConfigRule(), - "aws_config_configuration_aggregator": resourceAwsConfigConfigurationAggregator(), - "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), - "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), - "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), - "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), - "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), - "aws_cognito_identity_provider": resourceAwsCognitoIdentityProvider(), - "aws_cognito_user_group": resourceAwsCognitoUserGroup(), - "aws_cognito_user_pool": resourceAwsCognitoUserPool(), - "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), - "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), - "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), - "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), - "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), - "aws_codedeploy_app": resourceAwsCodeDeployApp(), - "aws_codedeploy_deployment_config": resourceAwsCodeDeployDeploymentConfig(), - "aws_codedeploy_deployment_group": resourceAwsCodeDeployDeploymentGroup(), - "aws_codecommit_repository": resourceAwsCodeCommitRepository(), - "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), - "aws_codebuild_project": resourceAwsCodeBuildProject(), - "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), - "aws_codepipeline": resourceAwsCodePipeline(), - "aws_customer_gateway": resourceAwsCustomerGateway(), - "aws_dax_cluster": resourceAwsDaxCluster(), - "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), - "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), - "aws_db_event_subscription": resourceAwsDbEventSubscription(), - "aws_db_instance": resourceAwsDbInstance(), - "aws_db_option_group": resourceAwsDbOptionGroup(), - "aws_db_parameter_group": resourceAwsDbParameterGroup(), - "aws_db_security_group": resourceAwsDbSecurityGroup(), - "aws_db_snapshot": resourceAwsDbSnapshot(), - "aws_db_subnet_group": resourceAwsDbSubnetGroup(), - "aws_devicefarm_project": resourceAwsDevicefarmProject(), - "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), - "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), - "aws_dms_certificate": resourceAwsDmsCertificate(), - "aws_dms_endpoint": resourceAwsDmsEndpoint(), - "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), - "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), - "aws_dms_replication_task": resourceAwsDmsReplicationTask(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_connection": resourceAwsDxConnection(), - "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), - "aws_dx_gateway": resourceAwsDxGateway(), - "aws_dx_gateway_association": resourceAwsDxGatewayAssociation(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_eks_cluster": resourceAwsEksCluster(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), - "aws_glue_classifier": resourceAwsGlueClassifier(), - "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_crawler": resourceAwsGlueCrawler(), - "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_trigger": resourceAwsGlueTrigger(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), - "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_launch_template": resourceAwsLaunchTemplate(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_organizations_policy": resourceAwsOrganizationsPolicy(), - "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), - "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), - "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_acm_certificate": resourceAwsAcmCertificate(), + "aws_acm_certificate_validation": resourceAwsAcmCertificateValidation(), + "aws_acmpca_certificate_authority": resourceAwsAcmpcaCertificateAuthority(), + "aws_ami": resourceAwsAmi(), + "aws_ami_copy": resourceAwsAmiCopy(), + "aws_ami_from_instance": resourceAwsAmiFromInstance(), + "aws_ami_launch_permission": resourceAwsAmiLaunchPermission(), + "aws_api_gateway_account": resourceAwsApiGatewayAccount(), + "aws_api_gateway_api_key": resourceAwsApiGatewayApiKey(), + "aws_api_gateway_authorizer": resourceAwsApiGatewayAuthorizer(), + "aws_api_gateway_base_path_mapping": resourceAwsApiGatewayBasePathMapping(), + "aws_api_gateway_client_certificate": resourceAwsApiGatewayClientCertificate(), + "aws_api_gateway_deployment": resourceAwsApiGatewayDeployment(), + "aws_api_gateway_documentation_part": resourceAwsApiGatewayDocumentationPart(), + "aws_api_gateway_documentation_version": resourceAwsApiGatewayDocumentationVersion(), + "aws_api_gateway_domain_name": resourceAwsApiGatewayDomainName(), + "aws_api_gateway_gateway_response": resourceAwsApiGatewayGatewayResponse(), + "aws_api_gateway_integration": resourceAwsApiGatewayIntegration(), + "aws_api_gateway_integration_response": resourceAwsApiGatewayIntegrationResponse(), + "aws_api_gateway_method": resourceAwsApiGatewayMethod(), + "aws_api_gateway_method_response": resourceAwsApiGatewayMethodResponse(), + "aws_api_gateway_method_settings": resourceAwsApiGatewayMethodSettings(), + "aws_api_gateway_model": resourceAwsApiGatewayModel(), + "aws_api_gateway_request_validator": resourceAwsApiGatewayRequestValidator(), + "aws_api_gateway_resource": resourceAwsApiGatewayResource(), + "aws_api_gateway_rest_api": resourceAwsApiGatewayRestApi(), + "aws_api_gateway_stage": resourceAwsApiGatewayStage(), + "aws_api_gateway_usage_plan": resourceAwsApiGatewayUsagePlan(), + "aws_api_gateway_usage_plan_key": resourceAwsApiGatewayUsagePlanKey(), + "aws_api_gateway_vpc_link": resourceAwsApiGatewayVpcLink(), + "aws_app_cookie_stickiness_policy": resourceAwsAppCookieStickinessPolicy(), + "aws_appautoscaling_target": resourceAwsAppautoscalingTarget(), + "aws_appautoscaling_policy": resourceAwsAppautoscalingPolicy(), + "aws_appautoscaling_scheduled_action": resourceAwsAppautoscalingScheduledAction(), + "aws_appsync_datasource": resourceAwsAppsyncDatasource(), + "aws_appsync_graphql_api": resourceAwsAppsyncGraphqlApi(), + "aws_athena_database": resourceAwsAthenaDatabase(), + "aws_athena_named_query": resourceAwsAthenaNamedQuery(), + "aws_autoscaling_attachment": resourceAwsAutoscalingAttachment(), + "aws_autoscaling_group": resourceAwsAutoscalingGroup(), + "aws_autoscaling_lifecycle_hook": resourceAwsAutoscalingLifecycleHook(), + "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), + "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), + "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), + "aws_budgets_budget": resourceAwsBudgetsBudget(), + "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), + "aws_cloudformation_stack": resourceAwsCloudFormationStack(), + "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), + "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), + "aws_cloudtrail": resourceAwsCloudTrail(), + "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), + "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), + "aws_cloudwatch_event_target": resourceAwsCloudWatchEventTarget(), + "aws_cloudwatch_log_destination": resourceAwsCloudWatchLogDestination(), + "aws_cloudwatch_log_destination_policy": resourceAwsCloudWatchLogDestinationPolicy(), + "aws_cloudwatch_log_group": resourceAwsCloudWatchLogGroup(), + "aws_cloudwatch_log_metric_filter": resourceAwsCloudWatchLogMetricFilter(), + "aws_cloudwatch_log_resource_policy": resourceAwsCloudWatchLogResourcePolicy(), + "aws_cloudwatch_log_stream": resourceAwsCloudWatchLogStream(), + "aws_cloudwatch_log_subscription_filter": resourceAwsCloudwatchLogSubscriptionFilter(), + "aws_config_aggregate_authorization": resourceAwsConfigAggregateAuthorization(), + "aws_config_config_rule": resourceAwsConfigConfigRule(), + "aws_config_configuration_aggregator": resourceAwsConfigConfigurationAggregator(), + "aws_config_configuration_recorder": resourceAwsConfigConfigurationRecorder(), + "aws_config_configuration_recorder_status": resourceAwsConfigConfigurationRecorderStatus(), + "aws_config_delivery_channel": resourceAwsConfigDeliveryChannel(), + "aws_cognito_identity_pool": resourceAwsCognitoIdentityPool(), + "aws_cognito_identity_pool_roles_attachment": resourceAwsCognitoIdentityPoolRolesAttachment(), + "aws_cognito_identity_provider": resourceAwsCognitoIdentityProvider(), + "aws_cognito_user_group": resourceAwsCognitoUserGroup(), + "aws_cognito_user_pool": resourceAwsCognitoUserPool(), + "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), + "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), + "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), + "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), + "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), + "aws_codedeploy_app": resourceAwsCodeDeployApp(), + "aws_codedeploy_deployment_config": resourceAwsCodeDeployDeploymentConfig(), + "aws_codedeploy_deployment_group": resourceAwsCodeDeployDeploymentGroup(), + "aws_codecommit_repository": resourceAwsCodeCommitRepository(), + "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), + "aws_codebuild_project": resourceAwsCodeBuildProject(), + "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), + "aws_codepipeline": resourceAwsCodePipeline(), + "aws_customer_gateway": resourceAwsCustomerGateway(), + "aws_dax_cluster": resourceAwsDaxCluster(), + "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), + "aws_dax_subnet_group": resourceAwsDaxSubnetGroup(), + "aws_db_event_subscription": resourceAwsDbEventSubscription(), + "aws_db_instance": resourceAwsDbInstance(), + "aws_db_option_group": resourceAwsDbOptionGroup(), + "aws_db_parameter_group": resourceAwsDbParameterGroup(), + "aws_db_security_group": resourceAwsDbSecurityGroup(), + "aws_db_snapshot": resourceAwsDbSnapshot(), + "aws_db_subnet_group": resourceAwsDbSubnetGroup(), + "aws_devicefarm_project": resourceAwsDevicefarmProject(), + "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), + "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), + "aws_dms_certificate": resourceAwsDmsCertificate(), + "aws_dms_endpoint": resourceAwsDmsEndpoint(), + "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), + "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), + "aws_dms_replication_task": resourceAwsDmsReplicationTask(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_connection": resourceAwsDxConnection(), + "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), + "aws_dx_gateway": resourceAwsDxGateway(), + "aws_dx_gateway_association": resourceAwsDxGatewayAssociation(), + "aws_dx_hosted_private_virtual_interface": resourceAwsDxHostedPrivateVirtualInterface(), + "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), + "aws_dynamodb_table": resourceAwsDynamoDbTable(), + "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), + "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), + "aws_ecr_repository": resourceAwsEcrRepository(), + "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), + "aws_ecs_cluster": resourceAwsEcsCluster(), + "aws_ecs_service": resourceAwsEcsService(), + "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_mount_target": resourceAwsEfsMountTarget(), + "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), + "aws_eip": resourceAwsEip(), + "aws_eip_association": resourceAwsEipAssociation(), + "aws_eks_cluster": resourceAwsEksCluster(), + "aws_elasticache_cluster": resourceAwsElasticacheCluster(), + "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), + "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), + "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), + "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), + "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), + "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), + "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), + "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), + "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), + "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), + "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), + "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), + "aws_elb": resourceAwsElb(), + "aws_elb_attachment": resourceAwsElbAttachment(), + "aws_emr_cluster": resourceAwsEMRCluster(), + "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), + "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), + "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), + "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), + "aws_glue_classifier": resourceAwsGlueClassifier(), + "aws_glue_connection": resourceAwsGlueConnection(), + "aws_glue_crawler": resourceAwsGlueCrawler(), + "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_trigger": resourceAwsGlueTrigger(), + "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), + "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), + "aws_iam_access_key": resourceAwsIamAccessKey(), + "aws_iam_account_alias": resourceAwsIamAccountAlias(), + "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), + "aws_iam_group_policy": resourceAwsIamGroupPolicy(), + "aws_iam_group": resourceAwsIamGroup(), + "aws_iam_group_membership": resourceAwsIamGroupMembership(), + "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), + "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), + "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), + "aws_iam_policy": resourceAwsIamPolicy(), + "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), + "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), + "aws_iam_role_policy": resourceAwsIamRolePolicy(), + "aws_iam_role": resourceAwsIamRole(), + "aws_iam_saml_provider": resourceAwsIamSamlProvider(), + "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), + "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), + "aws_iam_user_policy": resourceAwsIamUserPolicy(), + "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), + "aws_iam_user": resourceAwsIamUser(), + "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), + "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), + "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), + "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), + "aws_instance": resourceAwsInstance(), + "aws_internet_gateway": resourceAwsInternetGateway(), + "aws_iot_certificate": resourceAwsIotCertificate(), + "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_type": resourceAwsIotThingType(), + "aws_iot_topic_rule": resourceAwsIotTopicRule(), + "aws_key_pair": resourceAwsKeyPair(), + "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), + "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kms_alias": resourceAwsKmsAlias(), + "aws_kms_grant": resourceAwsKmsGrant(), + "aws_kms_key": resourceAwsKmsKey(), + "aws_lambda_function": resourceAwsLambdaFunction(), + "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), + "aws_lambda_alias": resourceAwsLambdaAlias(), + "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_lightsail_domain": resourceAwsLightsailDomain(), + "aws_lightsail_instance": resourceAwsLightsailInstance(), + "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), + "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), + "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), + "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), + "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), + "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), + "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), + "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), + "aws_mq_broker": resourceAwsMqBroker(), + "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_nat_gateway": resourceAwsNatGateway(), + "aws_network_acl": resourceAwsNetworkAcl(), + "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), + "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), + "aws_network_acl_rule": resourceAwsNetworkAclRule(), + "aws_network_interface": resourceAwsNetworkInterface(), + "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), + "aws_opsworks_application": resourceAwsOpsworksApplication(), + "aws_opsworks_stack": resourceAwsOpsworksStack(), + "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), + "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), + "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), + "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), + "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), + "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), + "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), + "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), + "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), + "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), + "aws_opsworks_instance": resourceAwsOpsworksInstance(), + "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), + "aws_opsworks_permission": resourceAwsOpsworksPermission(), + "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), + "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), + "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), + "aws_placement_group": resourceAwsPlacementGroup(), + "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), + "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_redshift_cluster": resourceAwsRedshiftCluster(), + "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), + "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), + "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), + "aws_route53_query_log": resourceAwsRoute53QueryLog(), + "aws_route53_record": resourceAwsRoute53Record(), + "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), + "aws_route53_zone": resourceAwsRoute53Zone(), + "aws_route53_health_check": resourceAwsRoute53HealthCheck(), + "aws_route": resourceAwsRoute(), + "aws_route_table": resourceAwsRouteTable(), + "aws_default_route_table": resourceAwsDefaultRouteTable(), + "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), + "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), + "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), + "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), + "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), + "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), + "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), + "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), + "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_bucket": resourceAwsS3Bucket(), + "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_object": resourceAwsS3BucketObject(), + "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_security_group": resourceAwsSecurityGroup(), + "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), + "aws_default_security_group": resourceAwsDefaultSecurityGroup(), + "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), + "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), + "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), + "aws_simpledb_domain": resourceAwsSimpleDBDomain(), + "aws_ssm_activation": resourceAwsSsmActivation(), + "aws_ssm_association": resourceAwsSsmAssociation(), + "aws_ssm_document": resourceAwsSsmDocument(), + "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), + "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), + "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), + "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), + "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), + "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), + "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), + "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), + "aws_sqs_queue": resourceAwsSqsQueue(), + "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), + "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), + "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), + "aws_sns_topic": resourceAwsSnsTopic(), + "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), + "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), + "aws_sfn_activity": resourceAwsSfnActivity(), + "aws_sfn_state_machine": resourceAwsSfnStateMachine(), + "aws_default_subnet": resourceAwsDefaultSubnet(), + "aws_subnet": resourceAwsSubnet(), + "aws_volume_attachment": resourceAwsVolumeAttachment(), + "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), + "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), + "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), + "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), + "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), + "aws_default_vpc": resourceAwsDefaultVpc(), + "aws_vpc": resourceAwsVpc(), + "aws_vpc_endpoint": resourceAwsVpcEndpoint(), + "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), + "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), + "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), + "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), + "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpn_connection": resourceAwsVpnConnection(), + "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), + "aws_vpn_gateway": resourceAwsVpnGateway(), + "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), + "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), + "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), + "aws_waf_ipset": resourceAwsWafIPSet(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), + "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), + "aws_waf_web_acl": resourceAwsWafWebAcl(), + "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), + "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), + "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), + "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), + "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), + "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), + "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), + "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go new file mode 100644 index 00000000000..716f322b668 --- /dev/null +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -0,0 +1,108 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPrivateVirtualInterfaceCreate, + Read: resourceAwsDxHostedPrivateVirtualInterfaceRead, + Delete: resourceAwsDxHostedPrivateVirtualInterfaceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "owner_account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + }, + ), + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + req := &directconnect.AllocatePrivateVirtualInterfaceInput{ + ConnectionId: aws.String(d.Get("connection_id").(string)), + OwnerAccount: aws.String(d.Get("owner_account_id").(string)), + NewPrivateVirtualInterfaceAllocation: &directconnect.NewPrivateVirtualInterfaceAllocation{ + VirtualInterfaceName: aws.String(d.Get("name").(string)), + Vlan: aws.Int64(int64(d.Get("vlan").(int))), + Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), + AddressFamily: aws.String(d.Get("address_family").(string)), + }, + } + if v, ok := d.GetOk("bgp_auth_key"); ok { + req.NewPrivateVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) + } + if v, ok := d.GetOk("customer_address"); ok { + req.NewPrivateVirtualInterfaceAllocation.CustomerAddress = aws.String(v.(string)) + } + if v, ok := d.GetOk("amazon_address"); ok { + req.NewPrivateVirtualInterfaceAllocation.AmazonAddress = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Direct Connect hosted private virtual interface: %#v", req) + resp, err := conn.AllocatePrivateVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect hosted private virtual interface: %s", err.Error()) + } + + d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + + if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPrivateVirtualInterfaceRead(d, meta) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { + vif, err := dxVirtualInterfaceRead(d, meta) + if err != nil { + return err + } + if vif == nil { + return nil + } + + d.Set("owner_account_id", vif.OwnerAccount) + return dxPrivateVirtualInterfaceAttributes(d, meta, vif) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStateDown, + }) +} diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go new file mode 100644 index 00000000000..b3370a83063 --- /dev/null +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -0,0 +1,139 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepter() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate, + Read: resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead, + Update: resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate, + Delete: resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "virtual_interface_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vpn_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"dx_gateway_id"}, + }, + "dx_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"vpn_gateway_id"}, + }, + "tags": tagsSchema(), + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vgwIdRaw, vgwOk := d.GetOk("vpn_gateway_id") + dxgwIdRaw, dxgwOk := d.GetOk("dx_gateway_id") + if vgwOk == dxgwOk { + return fmt.Errorf( + "One of ['vpn_gateway_id', 'dx_gateway_id'] must be set to create a Direct Connect private virtual interface accepter") + } + + vifId := d.Get("virtual_interface_id").(string) + req := &directconnect.ConfirmPrivateVirtualInterfaceInput{ + VirtualInterfaceId: aws.String(vifId), + } + if vgwOk { + req.VirtualGatewayId = aws.String(vgwIdRaw.(string)) + } + if dxgwOk { + req.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) + } + + log.Printf("[DEBUG] Accepting Direct Connect hosted private virtual interface: %#v", req) + _, err := conn.ConfirmPrivateVirtualInterface(req) + if err != nil { + return fmt.Errorf("Error accepting Direct Connect hosted private virtual interface: %s", err.Error()) + } + + d.SetId(vifId) + + if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + return err + } + + return resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d, meta) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d, meta) + if err != nil { + return err + } + if vif == nil { + return nil + } + + if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { + return err + } + d.Set("virtual_interface_id", vif.VirtualInterfaceId) + d.Set("vpn_gateway_id", vif.VirtualGatewayId) + d.Set("dx_gateway_id", vif.DirectConnectGatewayId) + if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { + return err + } + + return nil +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { + if err := dxVirtualInterfaceUpdate(d, meta); err != nil { + return err + } + + return resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d, meta) +} + +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { + return dxVirtualInterfaceDelete(d, meta) +} + +func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { + return dxVirtualInterfaceWaitUntilAvailable( + d, + conn, + []string{ + directconnect.VirtualInterfaceStateConfirming, + directconnect.VirtualInterfaceStatePending, + }, + []string{ + directconnect.VirtualInterfaceStateAvailable, + directconnect.VirtualInterfaceStateDown, + }) +} diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go new file mode 100644 index 00000000000..25ed5dce711 --- /dev/null +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -0,0 +1,98 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { + key := "DX_CONNECTION_ID" + connectionId := os.Getenv(key) + if connectionId == "" { + t.Skipf("Environment variable %s is not set", key) + } + key = "DX_HOSTED_VIF_OWNER_ACCOUNT" + ownerAccountId := os.Getenv(key) + if ownerAccountId == "" { + t.Skipf("Environment variable %s is not set", key) + } + vifName := fmt.Sprintf("tf-dx-vif-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), + ), + }, + // Test import. + { + ResourceName: "aws_dx_hosted_private_virtual_interface.foo", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).dxconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_dx_hosted_private_virtual_interface" { + continue + } + + input := &directconnect.DescribeVirtualInterfacesInput{ + VirtualInterfaceId: aws.String(rs.Primary.ID), + } + + resp, err := conn.DescribeVirtualInterfaces(input) + if err != nil { + return err + } + for _, v := range resp.VirtualInterfaces { + if *v.VirtualInterfaceId == rs.Primary.ID && !(*v.VirtualInterfaceState == directconnect.VirtualInterfaceStateDeleted) { + return fmt.Errorf("[DESTROY ERROR] Dx Public VIF (%s) not deleted", rs.Primary.ID) + } + } + } + return nil +} + +func testAccCheckAwsDxHostedPrivateVirtualInterfaceExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + return nil + } +} + +func testAccDxHostedPrivateVirtualInterfaceConfig_basic(cid, ownerAcctId, n string) string { + return fmt.Sprintf(` +resource "aws_dx_hosted_private_virtual_interface" "foo" { + connection_id = "%s" + owner_account_id = "%s" + + name = "%s" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 +} + `, cid, ownerAcctId, n) +} diff --git a/aws/utils.go b/aws/utils.go index 21c3aab7ef3..6a120cccff8 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -7,6 +7,7 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -47,3 +48,15 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } + +func mergeSchemas(schemas ...map[string]*schema.Schema) map[string]*schema.Schema { + merged := make(map[string]*schema.Schema) + + for _, schema := range schemas { + for k, v := range schema { + merged[k] = v + } + } + + return merged +} diff --git a/aws/utils_test.go b/aws/utils_test.go index 8248f4384d2..a5854e7ef4b 100644 --- a/aws/utils_test.go +++ b/aws/utils_test.go @@ -1,6 +1,10 @@ package aws -import "testing" +import ( + "testing" + + "github.com/hashicorp/terraform/helper/schema" +) var base64encodingTests = []struct { in []byte @@ -70,3 +74,29 @@ func TestJsonBytesEqualWhitespaceAndNoWhitespace(t *testing.T) { t.Errorf("Expected jsonBytesEqual to return false for %s == %s", noWhitespaceDiff, whitespaceDiff) } } + +func TestMergeSchemas(t *testing.T) { + s1 := map[string]*schema.Schema{ + "aaa": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "zzz": { + Type: schema.TypeInt, + Optional: true, + Default: 42, + }, + } + s2 := map[string]*schema.Schema{ + "xxx": { + Type: schema.TypeFloat, + Computed: true, + }, + } + + s3 := mergeSchemas(s1, s2) + if len(s3) != 3 { + t.Errorf("Expected merge schema to be of size 3, got %d", len(s3)) + } +} diff --git a/website/aws.erb b/website/aws.erb index 0e07c6a0f18..1fe25fe0164 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -773,6 +773,12 @@ > aws_dx_gateway_association + > + aws_dx_hosted_private_virtual_interface + + > + aws_dx_hosted_private_virtual_interface_accepter + > aws_dx_lag diff --git a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown new file mode 100644 index 00000000000..85b0cf79db9 --- /dev/null +++ b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown @@ -0,0 +1,62 @@ +--- +layout: "aws" +page_title: "AWS: aws_dx_hosted_private_virtual_interface" +sidebar_current: "docs-aws-resource-dx-hosted-private-virtual-interface" +description: |- + Provides a Direct Connect hosted private virtual interface resource. +--- + +# aws_dx_hosted_private_virtual_interface + +Provides a Direct Connect hosted private virtual interface resource. +A hosted virtual interface is a virtual interface that is owned by another AWS account. + +## Example Usage + +```hcl +resource "aws_dx_hosted_private_virtual_interface" "foo" { + connection_id = "dxcon-zzzzzzzz" + + name = "vif-foo" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 +} +``` + +## Argument Reference + +The following arguments are supported: + +* `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. +* `owner_account_id` - (Required) The AWS account that will own the new virtual interface. +* `name` - (Required) The name for the virtual interface. +* `vlan` - (Required) The VLAN ID. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `bgp_auth_key` - (Optional) The authentication key for BGP configuration. +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the virtual interface. +* `arn` - The ARN of the virtual interface. + +## Timeouts + +`aws_dx_hosted_private_virtual_interface` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating virtual interface +- `delete` - (Default `10 minutes`) Used for destroying virtual interface + +## Import + +Direct Connect hosted private virtual interfaces can be imported using the `vif id`, e.g. + +``` +$ terraform import aws_dx_hosted_private_virtual_interface.test dxvif-33cc44dd +``` diff --git a/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown new file mode 100644 index 00000000000..d346a24a62c --- /dev/null +++ b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown @@ -0,0 +1,88 @@ +--- +layout: "aws" +page_title: "AWS: aws_dx_hosted_private_virtual_interface_accepter" +sidebar_current: "docs-aws-resource-dx-hosted-private-virtual-interface-accepter" +description: |- + Provides a resource to manage the accepter's side of a Direct Connect hosted private virtual interface. +--- + +# aws_dx_hosted_private_virtual_interface_accepter + +Provides a resource to manage the accepter's side of a Direct Connect hosted private virtual interface. +This resource accepts ownership of a private virtual interface created by another AWS account. + +## Example Usage + +```hcl +provider "aws" { + # Creator's credentials. +} + +provider "aws" { + alias = "accepter" + + # Accepter's credentials. +} + +data "aws_caller_identity" "accepter" { + provider = "aws.accepter" +} + +# Creator's side of the VIF +resource "aws_dx_hosted_private_virtual_interface" "creator" { + connection_id = "dxcon-zzzzzzzz" + owner_account_id = "${data.aws_caller_identity.accepter.account_id}" + + name = "vif-foo" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 +} + +# Accepter's side of the VIF. +resource "aws_vpn_gateway" "vpn_gw" { + provider = "aws.accepter" +} + +resource "aws_dx_hosted_private_virtual_interface_accepter" "accepter" { + provider = "aws.accepter" + virtual_interface_id = "${aws_dx_hosted_private_virtual_interface.creator.id}" + vpn_gateway_id = "${aws_vpn_gateway.vpn_gw.id}" + + tags { + Side = "Accepter" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `virtual_interface_id` - (Required) The ID of the Direct Connect virtual interface to accept. +* `vpn_gateway_id` - (Optional) The ID of the [virtual private gateway](vpn_gateway.html) to which to connect the virtual interface. +* `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. +* `tags` - (Optional) A mapping of tags to assign to the resource. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the virtual interface. +* `arn` - The ARN of the virtual interface. + +## Timeouts + +`aws_dx_hosted_private_virtual_interface_accepter` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating virtual interface +- `delete` - (Default `10 minutes`) Used for destroying virtual interface + +## Import + +Direct Connect hosted private virtual interfaces can be imported using the `vif id`, e.g. + +``` +$ terraform import aws_dx_hosted_private_virtual_interface_accepter.test dxvif-33cc44dd +``` From 884a706289dd26ed13590f65fb5d9a70c283df05 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 11:54:33 -0500 Subject: [PATCH 1549/3316] Fix indentation for configuration generation. --- aws/resource_aws_dx_hosted_private_virtual_interface_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index 25ed5dce711..451bd87ed7c 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -94,5 +94,5 @@ resource "aws_dx_hosted_private_virtual_interface" "foo" { address_family = "ipv4" bgp_asn = 65352 } - `, cid, ownerAcctId, n) +`, cid, ownerAcctId, n) } From e70337c9e4fe57f8a9cf10312f8a9248d0078ddf Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 13 Feb 2018 11:56:45 -0500 Subject: [PATCH 1550/3316] Change interface to 'dxVirtualInterfaceRead'. --- aws/dx_vif.go | 133 ++++++++---------- ...aws_dx_hosted_private_virtual_interface.go | 6 +- ...sted_private_virtual_interface_accepter.go | 4 +- 3 files changed, 70 insertions(+), 73 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 903c5ca4fed..27a83780c50 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -13,25 +13,75 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) +// Schemas common to all (public/private, hosted or not) virtual interfaces. +var dxVirtualInterfaceSchemaWithTags = mergeSchemas( + dxVirtualInterfaceSchema, + map[string]*schema.Schema{ + "tags": tagsSchema(), + }, +) +var dxVirtualInterfaceSchema = map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, +} + func isNoSuchDxVirtualInterfaceErr(err error) bool { return isAWSErr(err, "DirectConnectClientException", "does not exist") } -func dxVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) (*directconnect.VirtualInterface, error) { - conn := meta.(*AWSClient).dxconn - - resp, state, err := dxVirtualInterfaceStateRefresh(conn, d.Id())() +func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { + resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) } - terminalStates := map[string]bool{ - directconnect.VirtualInterfaceStateDeleted: true, - directconnect.VirtualInterfaceStateDeleting: true, - directconnect.VirtualInterfaceStateRejected: true, - } - if _, ok := terminalStates[state]; ok { - log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) - d.SetId("") + if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil } @@ -195,62 +245,3 @@ func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) * } return schema.NewSet(schema.HashString, out) } - -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index 716f322b668..b45b63cdf92 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -77,11 +77,15 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me } func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta interface{}) error { - vif, err := dxVirtualInterfaceRead(d, meta) + conn := meta.(*AWSClient).dxconn + + vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { return err } if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") return nil } diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index b3370a83063..cea7d588b1b 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -91,11 +91,13 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.Resource func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - vif, err := dxVirtualInterfaceRead(d, meta) + vif, err := dxVirtualInterfaceRead(d.Id(), conn) if err != nil { return err } if vif == nil { + log.Printf("[WARN] Direct Connect virtual interface (%s) not found, removing from state", d.Id()) + d.SetId("") return nil } From e3b13ce1cc74d0f3da9f859b346af035636eecba Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 21 Jun 2018 19:10:16 -0400 Subject: [PATCH 1551/3316] Copy changes to 'dx_vif.go' and 'structure.go' from the 'issue-3248' branch. --- aws/dx_vif.go | 49 +++++++++++++++--------------------------------- aws/structure.go | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 27a83780c50..0898583598c 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -72,14 +72,10 @@ var dxVirtualInterfaceSchema = map[string]*schema.Schema{ }, } -func isNoSuchDxVirtualInterfaceErr(err error) bool { - return isAWSErr(err, "DirectConnectClientException", "does not exist") -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { - return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err) } if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil @@ -113,10 +109,10 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { + if isAWSErr(err, "DirectConnectClientException", "does not exist") { return nil } - return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err.Error()) + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) } deleteStateConf := &resource.StateChangeConf{ @@ -151,17 +147,21 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str VirtualInterfaceId: aws.String(vifId), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { - return nil, directconnect.VirtualInterfaceStateDeleted, nil - } return nil, "", err } - if len(resp.VirtualInterfaces) < 1 { - return nil, directconnect.ConnectionStateDeleted, nil + n := len(resp.VirtualInterfaces) + switch n { + case 0: + return "", directconnect.VirtualInterfaceStateDeleted, nil + + case 1: + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + + default: + return nil, "", fmt.Errorf("Found %d Direct Connect virtual interfaces for %s, expected 1", n, vifId) } - vif := resp.VirtualInterfaces[0] - return vif, aws.StringValue(vif.VirtualInterfaceState), nil } } @@ -175,7 +175,7 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) } return nil @@ -226,22 +226,3 @@ func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) er return nil } - -func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { - prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) - for i, p := range cfg { - prefix := &directconnect.RouteFilterPrefix{ - Cidr: aws.String(p.(string)), - } - prefixes[i] = prefix - } - return prefixes -} - -func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { - out := make([]interface{}, 0) - for _, prefix := range prefixes { - out = append(out, aws.StringValue(prefix.Cidr)) - } - return schema.NewSet(schema.HashString, out) -} diff --git a/aws/structure.go b/aws/structure.go index 11eca3b1efb..9370d54e470 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -20,6 +20,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/dax" + "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -4268,3 +4269,22 @@ func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringCon return options } + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} From bf47ac327dba33c341bef288909e2fb2fbbad1c4 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 21 Jun 2018 19:11:58 -0400 Subject: [PATCH 1552/3316] Copy changes to 'dx_vif.go' and 'structure.go' from the 'issue-3248' branch. --- aws/dx_vif.go | 49 +++++++++++++++--------------------------------- aws/structure.go | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 27a83780c50..0898583598c 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -72,14 +72,10 @@ var dxVirtualInterfaceSchema = map[string]*schema.Schema{ }, } -func isNoSuchDxVirtualInterfaceErr(err error) bool { - return isAWSErr(err, "DirectConnectClientException", "does not exist") -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { - return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err) } if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil @@ -113,10 +109,10 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { + if isAWSErr(err, "DirectConnectClientException", "does not exist") { return nil } - return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err.Error()) + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) } deleteStateConf := &resource.StateChangeConf{ @@ -151,17 +147,21 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str VirtualInterfaceId: aws.String(vifId), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { - return nil, directconnect.VirtualInterfaceStateDeleted, nil - } return nil, "", err } - if len(resp.VirtualInterfaces) < 1 { - return nil, directconnect.ConnectionStateDeleted, nil + n := len(resp.VirtualInterfaces) + switch n { + case 0: + return "", directconnect.VirtualInterfaceStateDeleted, nil + + case 1: + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + + default: + return nil, "", fmt.Errorf("Found %d Direct Connect virtual interfaces for %s, expected 1", n, vifId) } - vif := resp.VirtualInterfaces[0] - return vif, aws.StringValue(vif.VirtualInterfaceState), nil } } @@ -175,7 +175,7 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) } return nil @@ -226,22 +226,3 @@ func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) er return nil } - -func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { - prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) - for i, p := range cfg { - prefix := &directconnect.RouteFilterPrefix{ - Cidr: aws.String(p.(string)), - } - prefixes[i] = prefix - } - return prefixes -} - -func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { - out := make([]interface{}, 0) - for _, prefix := range prefixes { - out = append(out, aws.StringValue(prefix.Cidr)) - } - return schema.NewSet(schema.HashString, out) -} diff --git a/aws/structure.go b/aws/structure.go index 11eca3b1efb..9370d54e470 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -20,6 +20,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/dax" + "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -4268,3 +4269,22 @@ func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringCon return options } + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} From 654b5b83aad5d66cf5f4169dbc2a62e7456c3332 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 21 Jun 2018 19:13:01 -0400 Subject: [PATCH 1553/3316] Copy changes to 'dx_vif.go' and 'structure.go' from the 'issue-3248' branch. --- aws/dx_vif.go | 49 +++++++++++++++--------------------------------- aws/structure.go | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 27a83780c50..0898583598c 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -72,14 +72,10 @@ var dxVirtualInterfaceSchema = map[string]*schema.Schema{ }, } -func isNoSuchDxVirtualInterfaceErr(err error) bool { - return isAWSErr(err, "DirectConnectClientException", "does not exist") -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { - return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err.Error()) + return nil, fmt.Errorf("Error reading Direct Connect virtual interface: %s", err) } if state == directconnect.VirtualInterfaceStateDeleted { return nil, nil @@ -113,10 +109,10 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { + if isAWSErr(err, "DirectConnectClientException", "does not exist") { return nil } - return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err.Error()) + return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) } deleteStateConf := &resource.StateChangeConf{ @@ -151,17 +147,21 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str VirtualInterfaceId: aws.String(vifId), }) if err != nil { - if isNoSuchDxVirtualInterfaceErr(err) { - return nil, directconnect.VirtualInterfaceStateDeleted, nil - } return nil, "", err } - if len(resp.VirtualInterfaces) < 1 { - return nil, directconnect.ConnectionStateDeleted, nil + n := len(resp.VirtualInterfaces) + switch n { + case 0: + return "", directconnect.VirtualInterfaceStateDeleted, nil + + case 1: + vif := resp.VirtualInterfaces[0] + return vif, aws.StringValue(vif.VirtualInterfaceState), nil + + default: + return nil, "", fmt.Errorf("Found %d Direct Connect virtual interfaces for %s, expected 1", n, vifId) } - vif := resp.VirtualInterfaces[0] - return vif, aws.StringValue(vif.VirtualInterfaceState), nil } } @@ -175,7 +175,7 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface %s to become available: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) } return nil @@ -226,22 +226,3 @@ func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) er return nil } - -func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { - prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) - for i, p := range cfg { - prefix := &directconnect.RouteFilterPrefix{ - Cidr: aws.String(p.(string)), - } - prefixes[i] = prefix - } - return prefixes -} - -func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { - out := make([]interface{}, 0) - for _, prefix := range prefixes { - out = append(out, aws.StringValue(prefix.Cidr)) - } - return schema.NewSet(schema.HashString, out) -} diff --git a/aws/structure.go b/aws/structure.go index 11eca3b1efb..9370d54e470 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -20,6 +20,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/dax" + "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" @@ -4268,3 +4269,22 @@ func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringCon return options } + +func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + for i, p := range cfg { + prefix := &directconnect.RouteFilterPrefix{ + Cidr: aws.String(p.(string)), + } + prefixes[i] = prefix + } + return prefixes +} + +func flattenDxRouteFilterPrefixes(prefixes []*directconnect.RouteFilterPrefix) *schema.Set { + out := make([]interface{}, 0) + for _, prefix := range prefixes { + out = append(out, aws.StringValue(prefix.Cidr)) + } + return schema.NewSet(schema.HashString, out) +} From 0a84a62df499be84b6b5493fa470c9210c815ecc Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Fri, 22 Jun 2018 00:24:08 +0100 Subject: [PATCH 1554/3316] Fix the access policy in the ES domain docs If a resource isn't specified AWS automatically adds it to point to the ES domain it has been created for. This causes a perpetual diff where Terraform keeps attempting to remove the Resource key and AWS keeps adding it back. Also adds a note drawing attention to the fact that the values for the advanced options _must_ be strings or this will also cause a perpetual diff. --- website/docs/r/elasticsearch_domain.html.markdown | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/website/docs/r/elasticsearch_domain.html.markdown b/website/docs/r/elasticsearch_domain.html.markdown index d3d1c403983..2b74247d976 100644 --- a/website/docs/r/elasticsearch_domain.html.markdown +++ b/website/docs/r/elasticsearch_domain.html.markdown @@ -12,8 +12,16 @@ description: |- ## Example Usage ```hcl +variable "domain" { + default = "tf-test" +} + +data "aws_region" "current" {} + +data "aws_caller_identity" "current" {} + resource "aws_elasticsearch_domain" "es" { - domain_name = "tf-test" + domain_name = "${var.domain}" elasticsearch_version = "1.5" cluster_config { instance_type = "r3.large.elasticsearch" @@ -31,6 +39,7 @@ resource "aws_elasticsearch_domain" "es" { "Action": "es:*", "Principal": "*", "Effect": "Allow", + "Resource": "arn:aws:es:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:domain/${var.domain}/*" "Condition": { "IpAddress": {"aws:SourceIp": ["66.193.100.22/32"]} } @@ -56,6 +65,9 @@ The following arguments are supported: * `domain_name` - (Required) Name of the domain. * `access_policies` - (Optional) IAM policy document specifying the access policies for the domain * `advanced_options` - (Optional) Key-value string pairs to specify advanced configuration options. + Note that the values for these configuration options must be strings (wrapped in quotes) or they + may be wrong and cause a perpetual diff, causing Terraform to want to recreate your Elasticsearch + domain on every apply. * `ebs_options` - (Optional) EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/). See below. * `encrypt_at_rest` - (Optional) Encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). See below. * `cluster_config` - (Optional) Cluster configuration of the domain, see below. From 1f057f7ab372ed72b612f771ad87283359342920 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Fri, 22 Jun 2018 00:58:11 +0100 Subject: [PATCH 1555/3316] Raise an error when failing to retrieve RDS instance tags Just logging the error means that if the user is unable to call the ListTagsForResource API endpoint then they will see a diff showing that they need to add the tags each time. Instead it's better to actually error instead of hiding this from the user (unless they happen to check the logs). Closes https://github.com/terraform-providers/terraform-provider-aws/issues/345 --- aws/resource_aws_db_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index f06ad81e79d..ccd154014b3 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -1035,7 +1035,7 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { }) if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + return fmt.Errorf("Error retrieving tags for ARN: %s", arn) } var dt []*rds.Tag From 5f884bda13ad1f3bb665aff353a3332585a4ac86 Mon Sep 17 00:00:00 2001 From: Louis Larry Date: Fri, 22 Jun 2018 07:29:54 +0700 Subject: [PATCH 1556/3316] Update iam_access_key.html.markdown --- website/docs/r/iam_access_key.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/iam_access_key.html.markdown b/website/docs/r/iam_access_key.html.markdown index 5a838f23517..8f7d81fd513 100644 --- a/website/docs/r/iam_access_key.html.markdown +++ b/website/docs/r/iam_access_key.html.markdown @@ -69,7 +69,7 @@ to the state file. Please supply a `pgp_key` instead, which will prevent the secret from being stored in plain text * `encrypted_secret` - The encrypted secret, base64 encoded. ~> **NOTE:** The encrypted secret may be decrypted using the command line, - for example: `terraform output secret | base64 --decode | keybase pgp decrypt`. + for example: `terraform output encrypted_secret | base64 --decode | keybase pgp decrypt`. * `ses_smtp_password` - The secret access key converted into an SES SMTP password by applying [AWS's documented conversion algorithm](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html#smtp-credentials-convert). From 48030942d6759311685f767d6e62aa6a47ee5a8d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 21 Jun 2018 20:42:55 -0400 Subject: [PATCH 1557/3316] docs: Add RDS Cluster and Instance Parameter Group links to available parameters --- website/docs/r/db_parameter_group.html.markdown | 7 ++++++- website/docs/r/rds_cluster_parameter_group.markdown | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/website/docs/r/db_parameter_group.html.markdown b/website/docs/r/db_parameter_group.html.markdown index f9fa1b3cbca..2855788940d 100644 --- a/website/docs/r/db_parameter_group.html.markdown +++ b/website/docs/r/db_parameter_group.html.markdown @@ -8,7 +8,12 @@ description: |- # aws_db_parameter_group -Provides an RDS DB parameter group resource. +Provides an RDS DB parameter group resource .Documentation of the available parameters for various RDS engines can be found at: +* [Aurora MySQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Reference.html) +* [Aurora PostgreSQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraPostgreSQL.Reference.html) +* [MariaDB Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MariaDB.Parameters.html) +* [Oracle Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ModifyInstance.Oracle.html#USER_ModifyInstance.Oracle.sqlnet) +* [PostgreSQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Parameters) ## Example Usage diff --git a/website/docs/r/rds_cluster_parameter_group.markdown b/website/docs/r/rds_cluster_parameter_group.markdown index 1f21259fe84..578b4ff5c0d 100644 --- a/website/docs/r/rds_cluster_parameter_group.markdown +++ b/website/docs/r/rds_cluster_parameter_group.markdown @@ -8,7 +8,9 @@ description: |- # aws_rds_cluster_parameter_group -Provides an RDS DB cluster parameter group resource. +Provides an RDS DB cluster parameter group resource. Documentation of the available parameters for various Aurora engines can be found at: +* [Aurora MySQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Reference.html) +* [Aurora PostgreSQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraPostgreSQL.Reference.html) ## Example Usage From f4be339ef6743815e9110b178ad14e4e95e67873 Mon Sep 17 00:00:00 2001 From: Jesse DeFer Date: Thu, 21 Jun 2018 11:10:48 -0700 Subject: [PATCH 1558/3316] add create_date as an attribute to aws_iam_instance_profile resource --- aws/resource_aws_iam_instance_profile.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_iam_instance_profile.go b/aws/resource_aws_iam_instance_profile.go index 1c32c7824ea..2e8f9bc62b4 100644 --- a/aws/resource_aws_iam_instance_profile.go +++ b/aws/resource_aws_iam_instance_profile.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "regexp" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -307,6 +308,9 @@ func instanceProfileReadResult(d *schema.ResourceData, result *iam.InstanceProfi if err := d.Set("arn", result.Arn); err != nil { return err } + if err := d.Set("create_date", result.CreateDate.Format(time.RFC3339)); err != nil { + return err + } if err := d.Set("path", result.Path); err != nil { return err } From 82ecde840d7fd5db529a5b155232a4c092d615c1 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Fri, 22 Jun 2018 02:04:25 +0100 Subject: [PATCH 1559/3316] Force new route when changing the route table Before this change, changing the route table of a route showed an in place modification for Terraform to perform. AWS actually creates a new route in the new route table with the ReplaceRoute API call but this left the old route lying around and no longer managed. The acceptance test provided in this commit was failing before because Terraform was attempting to update the new route's 10.3.0.0/16 route to point to the new target but the 10.3.0.0/16 route didn't exist in that route table and instead wanted Terraform to call the CreateRoute API instead: > There is no route defined for '10.3.0.0/16' in the route table. Use CreateRoute instead. Instead we should just use ForceNew to make Terraform create a new route in the new route table and then delete the old one. --- aws/resource_aws_route.go | 1 + aws/resource_aws_route_test.go | 81 ++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/aws/resource_aws_route.go b/aws/resource_aws_route.go index 3208f453714..16f9b026183 100644 --- a/aws/resource_aws_route.go +++ b/aws/resource_aws_route.go @@ -98,6 +98,7 @@ func resourceAwsRoute() *schema.Resource { "route_table_id": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "vpc_peering_connection_id": { diff --git a/aws/resource_aws_route_test.go b/aws/resource_aws_route_test.go index 3a69a9671fb..595c517c8b6 100644 --- a/aws/resource_aws_route_test.go +++ b/aws/resource_aws_route_test.go @@ -166,6 +166,33 @@ func TestAccAWSRoute_ipv6ToPeeringConnection(t *testing.T) { }) } +func TestAccAWSRoute_changeRouteTable(t *testing.T) { + var before ec2.Route + var after ec2.Route + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRouteDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRouteBasicConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRouteExists("aws_route.bar", &before), + ), + }, + { + Config: testAccAWSRouteNewRouteTable, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRouteExists("aws_route.bar", &after), + ), + }, + }, + }) +} + func TestAccAWSRoute_changeCidr(t *testing.T) { var route ec2.Route var routeTable ec2.RouteTable @@ -801,3 +828,57 @@ resource "aws_vpc_endpoint" "baz" { route_table_ids = ["${aws_route_table.foo.id}"] } `) + +var testAccAWSRouteNewRouteTable = fmt.Sprint(` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-route-basic" + } +} + +resource "aws_vpc" "bar" { + cidr_block = "10.2.0.0/16" + tags { + Name = "terraform-testacc-route-new-route-table" + } +} + +resource "aws_internet_gateway" "foo" { + vpc_id = "${aws_vpc.foo.id}" + + tags { + Name = "terraform-testacc-route-basic" + } +} + +resource "aws_internet_gateway" "bar" { + vpc_id = "${aws_vpc.bar.id}" + + tags { + Name = "terraform-testacc-route-new-route-table" + } +} + +resource "aws_route_table" "foo" { + vpc_id = "${aws_vpc.foo.id}" + + tags { + Name = "terraform-testacc-route-basic" + } +} + +resource "aws_route_table" "bar" { + vpc_id = "${aws_vpc.bar.id}" + + tags { + Name = "terraform-testacc-route-new-route-table" + } +} + +resource "aws_route" "bar" { + route_table_id = "${aws_route_table.bar.id}" + destination_cidr_block = "10.4.0.0/16" + gateway_id = "${aws_internet_gateway.bar.id}" +} +`) From 2db7e9a73d9735811f5fdfb561cea3a9985a0d40 Mon Sep 17 00:00:00 2001 From: Dieter De Meyer Date: Fri, 22 Jun 2018 12:10:36 +0200 Subject: [PATCH 1560/3316] Also retrieve AWS instances that are in a state other than running --- aws/data_source_aws_instances.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aws/data_source_aws_instances.go b/aws/data_source_aws_instances.go index 7196e3189e7..33f6e8a760d 100644 --- a/aws/data_source_aws_instances.go +++ b/aws/data_source_aws_instances.go @@ -50,8 +50,14 @@ func dataSourceAwsInstancesRead(d *schema.ResourceData, meta interface{}) error params := &ec2.DescribeInstancesInput{ Filters: []*ec2.Filter{ &ec2.Filter{ - Name: aws.String("instance-state-name"), - Values: []*string{aws.String("running")}, + Name: aws.String("instance-state-name"), + Values: []*string{ + aws.String("running"), + aws.String("stopped"), + aws.String("stopping"), + aws.String("pending"), + aws.String("shutting-down"), + }, }, }, } From cf613fab036918528ce096c1685b90d93ebc2d21 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Fri, 22 Jun 2018 11:21:34 +0100 Subject: [PATCH 1561/3316] Lightsail instances are imported via their name not ARN The aws_lightsail_instance uses the 'ImportStatePassthrough' which uses the ID of the resource. In this case the ID is the name of the Lightsail instance. --- website/docs/r/lightsail_instance.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/lightsail_instance.html.markdown b/website/docs/r/lightsail_instance.html.markdown index 2815acf3d49..b9375bd4878 100644 --- a/website/docs/r/lightsail_instance.html.markdown +++ b/website/docs/r/lightsail_instance.html.markdown @@ -85,8 +85,8 @@ The following attributes are exported in addition to the arguments listed above: ## Import -Lightsail Instances can be imported using their ARN, e.g. +Lightsail Instances can be imported using their name, e.g. ``` -$ terraform import aws_lightsail_instance.bar +$ terraform import aws_lightsail_instance.gitlab_test 'custom gitlab' ``` From 3c1d2d2477256312c689801af470f3342e5fce4f Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 22 Jun 2018 14:53:23 +0400 Subject: [PATCH 1562/3316] issue #4857 Can't use spot instances with aws_launch_template --- aws/resource_aws_launch_template.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 32a41c5dba9..3416a56bad4 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -225,6 +225,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { "valid_until": { Type: schema.TypeString, Optional: true, + Computed: true, ValidateFunc: validation.ValidateRFC3339TimeString, }, }, @@ -673,7 +674,7 @@ func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []inte "instance_interruption_behavior": aws.StringValue(so.InstanceInterruptionBehavior), "max_price": aws.StringValue(so.MaxPrice), "spot_instance_type": aws.StringValue(so.SpotInstanceType), - "valid_until": aws.TimeValue(so.ValidUntil), + "valid_until": aws.TimeValue(so.ValidUntil).Format(time.RFC3339), }) mo["spot_options"] = spot } @@ -1101,11 +1102,13 @@ func readInstanceMarketOptionsFromConfig(imo map[string]interface{}) (*ec2.Launc spotOptions.SpotInstanceType = aws.String(v) } - t, err := time.Parse(time.RFC3339, so["valid_until"].(string)) - if err != nil { - return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) + if v, ok := so["valid_until"].(string); ok && v != "" { + t, err := time.Parse(time.RFC3339, v) + if err != nil { + return nil, fmt.Errorf("Error Parsing Launch Template Spot Options valid until: %s", err.Error()) + } + spotOptions.ValidUntil = aws.Time(t) } - spotOptions.ValidUntil = aws.Time(t) } instanceMarketOptions.SpotOptions = spotOptions } From 83bf3f50edb0715217699d5585417906539fd853 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 08:57:47 -0400 Subject: [PATCH 1563/3316] Update CHANGELOG for #4917 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6725f6ac407..188f21df911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ ENHANCEMENTS: * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] +BUG FIXES: + +* resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] + ## 1.24.0 (June 21, 2018) FEATURES: From 406e3b07cd90a0478c6975d77d048ed8aca7e76f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 09:06:27 -0400 Subject: [PATCH 1564/3316] Update CHANGELOG for #4927 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 188f21df911..11370c04f2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ENHANCEMENTS: BUG FIXES: +* data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 [GH-4927] * resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] ## 1.24.0 (June 21, 2018) From 6e61f9a5bdc0e9f0682ccd4136ee4ba8eb87e5be Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 10:17:01 -0400 Subject: [PATCH 1565/3316] Update CHANGELOG for #4903 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11370c04f2a..99ed5518de1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ BUG FIXES: * data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 [GH-4927] * resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] +* resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] ## 1.24.0 (June 21, 2018) From f8e1387a339f5ea9d4fc73a09c808b6820d86a22 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 10:40:39 -0400 Subject: [PATCH 1566/3316] Update CHANGELOG for #4952 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ed5518de1..4afd91f0a06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ BUG FIXES: * data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 [GH-4927] * resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] +* resource/aws_launch_template: Prevent error when using `valid_until` [GH-4952] * resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] ## 1.24.0 (June 21, 2018) From 33a9a72844bf229ca2cd6d1f8c110fc29d8d3dff Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 10:48:19 -0400 Subject: [PATCH 1567/3316] Update CHANGELOG for #4946 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4afd91f0a06..a5b0f36d771 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ BUG FIXES: * data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 [GH-4927] * resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] * resource/aws_launch_template: Prevent error when using `valid_until` [GH-4952] +* resource/aws_route: Properly force resource recreation when updating `route_table_id` [GH-4946] * resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] ## 1.24.0 (June 21, 2018) From 4e5f6d2bbddb60e954129f5c1c6aa2d67ed059f3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 11:06:31 -0400 Subject: [PATCH 1568/3316] Update CHANGELOG for #4943 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5b0f36d771..8246f9f7d14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ BUG FIXES: * data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 [GH-4927] * resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] +* resource/aws_db_instance: Properly raise any `ListTagsForResource` error instead of presenting a perpetual difference with `tags` [GH-4943] * resource/aws_launch_template: Prevent error when using `valid_until` [GH-4952] * resource/aws_route: Properly force resource recreation when updating `route_table_id` [GH-4946] * resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] From 58751bb82dc237d42746251f3068621a554434d6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 11:32:26 -0400 Subject: [PATCH 1569/3316] Update CHANGELOG for #4941 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8246f9f7d14..23905ee0de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ BUG FIXES: * data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 [GH-4927] * resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] * resource/aws_db_instance: Properly raise any `ListTagsForResource` error instead of presenting a perpetual difference with `tags` [GH-4943] +* resource/aws_instance: Prevent extraneous ModifyInstanceAttribute call for `disable_api_termination` on resource creation [GH-4941] * resource/aws_launch_template: Prevent error when using `valid_until` [GH-4952] * resource/aws_route: Properly force resource recreation when updating `route_table_id` [GH-4946] * resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] From cdc016b50ec730e7060eba88061931c52843ee36 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 11:41:19 -0400 Subject: [PATCH 1570/3316] tests/data-source/aws_codecommit_repository: Use TestCheckResourceAttrPair everywhere make testacc TEST=./aws TESTARGS='-run=TestAccAWSCodeCommitRepositoryDataSource_basic' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSCodeCommitRepositoryDataSource_basic -timeout 120m === RUN TestAccAWSCodeCommitRepositoryDataSource_basic --- PASS: TestAccAWSCodeCommitRepositoryDataSource_basic (16.09s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 16.131s --- aws/data_source_aws_codecommit_repository_test.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/aws/data_source_aws_codecommit_repository_test.go b/aws/data_source_aws_codecommit_repository_test.go index 90cbdcfe8b7..0a8fb07cfc3 100644 --- a/aws/data_source_aws_codecommit_repository_test.go +++ b/aws/data_source_aws_codecommit_repository_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/hashicorp/terraform/helper/acctest" @@ -11,6 +10,8 @@ import ( func TestAccAWSCodeCommitRepositoryDataSource_basic(t *testing.T) { rName := fmt.Sprintf("tf-acctest-%d", acctest.RandInt()) + resourceName := "aws_codecommit_repository.default" + datasourceName := "data.aws_codecommit_repository.default" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -19,14 +20,10 @@ func TestAccAWSCodeCommitRepositoryDataSource_basic(t *testing.T) { { Config: testAccCheckAwsCodeCommitRepositoryDataSourceConfig(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrPair("data.aws_codecommit_repository.default", "repository_name", - "aws_codecommit_repository.default", "repository_name"), - resource.TestMatchResourceAttr("data.aws_codecommit_repository.default", "arn", - regexp.MustCompile(fmt.Sprintf("^arn:aws:codecommit:[^:]+:\\d{12}:%s", rName))), - resource.TestMatchResourceAttr("data.aws_codecommit_repository.default", "clone_url_http", - regexp.MustCompile(fmt.Sprintf("^https://git-codecommit.[^:]+.amazonaws.com/v1/repos/%s", rName))), - resource.TestMatchResourceAttr("data.aws_codecommit_repository.default", "clone_url_ssh", - regexp.MustCompile(fmt.Sprintf("^ssh://git-codecommit.[^:]+.amazonaws.com/v1/repos/%s", rName))), + resource.TestCheckResourceAttrPair(datasourceName, "arn", resourceName, "arn"), + resource.TestCheckResourceAttrPair(datasourceName, "clone_url_http", resourceName, "clone_url_http"), + resource.TestCheckResourceAttrPair(datasourceName, "clone_url_ssh", resourceName, "clone_url_ssh"), + resource.TestCheckResourceAttrPair(datasourceName, "repository_name", resourceName, "repository_name"), ), }, }, From d9b36f6e47bbee6328b3f451f8f039914d0f98af Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 11:45:15 -0400 Subject: [PATCH 1571/3316] Update CHANGELOG for #4934 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23905ee0de8..e28fa0ef14a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.25.0 (Unreleased) +FEATURES: + +* **New Data Source:** `aws_codecommit_repository` [GH-4934] + ENHANCEMENTS: * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] From 48084ab85b6c9ee51c67037d1245f1dc76e65729 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 11:51:16 -0400 Subject: [PATCH 1572/3316] Update CHANGELOG for #4932 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e28fa0ef14a..dfde3e86831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: ENHANCEMENTS: +* resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] BUG FIXES: From 9f73bbfaf929aee6218eeefcde80215cdbccf116 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 1 Dec 2017 16:32:18 -0500 Subject: [PATCH 1573/3316] Support switching VPC tenancy from Dedicated to Default. --- aws/resource_aws_vpc.go | 42 +++++++++++++++++----- aws/resource_aws_vpc_test.go | 69 +++++++++++++++++++++++++++++++++--- 2 files changed, 98 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index 9fa19f1592d..e1687477d0a 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsVpc() *schema.Resource { @@ -21,6 +22,7 @@ func resourceAwsVpc() *schema.Resource { Importer: &schema.ResourceImporter{ State: resourceAwsVpcInstanceImport, }, + CustomizeDiff: resourceAwsVpcCustomizeDiff, SchemaVersion: 1, MigrateState: resourceAwsVpcMigrateState, @@ -34,10 +36,10 @@ func resourceAwsVpc() *schema.Resource { }, "instance_tenancy": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Default: ec2.TenancyDefault, + ValidateFunc: validation.StringInSlice([]string{ec2.TenancyDefault, ec2.TenancyDedicated}, false), }, "enable_dns_hostnames": { @@ -112,15 +114,11 @@ func resourceAwsVpc() *schema.Resource { func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - instance_tenancy := "default" - if v, ok := d.GetOk("instance_tenancy"); ok { - instance_tenancy = v.(string) - } // Create the VPC createOpts := &ec2.CreateVpcInput{ CidrBlock: aws.String(d.Get("cidr_block").(string)), - InstanceTenancy: aws.String(instance_tenancy), + InstanceTenancy: aws.String(d.Get("instance_tenancy").(string)), AmazonProvidedIpv6CidrBlock: aws.Bool(d.Get("assign_generated_ipv6_cidr_block").(bool)), } @@ -452,6 +450,21 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { d.SetPartial("assign_generated_ipv6_cidr_block") } + if d.HasChange("instance_tenancy") && !d.IsNewResource() { + modifyOpts := &ec2.ModifyVpcTenancyInput{ + VpcId: aws.String(vpcid), + InstanceTenancy: aws.String(d.Get("instance_tenancy").(string)), + } + log.Printf( + "[INFO] Modifying instance_tenancy vpc attribute for %s: %#v", + d.Id(), modifyOpts) + if _, err := conn.ModifyVpcTenancy(modifyOpts); err != nil { + return err + } + + d.SetPartial("instance_tenancy") + } + if err := setTags(conn, d); err != nil { return err } else { @@ -492,6 +505,17 @@ func resourceAwsVpcDelete(d *schema.ResourceData, meta interface{}) error { }) } +func resourceAwsVpcCustomizeDiff(diff *schema.ResourceDiff, v interface{}) error { + if diff.HasChange("instance_tenancy") { + old, new := diff.GetChange("instance_tenancy") + if old.(string) != ec2.TenancyDedicated || new.(string) != ec2.TenancyDefault { + diff.ForceNew("instance_tenancy") + } + } + + return nil +} + // VPCStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch // a VPC. func VPCStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index 457a542facf..1059b255975 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -89,6 +89,8 @@ func TestAccAWSVpc_basic(t *testing.T) { testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), resource.TestCheckResourceAttr( "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "instance_tenancy", "default"), resource.TestCheckResourceAttrSet( "aws_vpc.foo", "default_route_table_id"), resource.TestCheckResourceAttr( @@ -163,9 +165,48 @@ func TestAccAWSVpc_dedicatedTenancy(t *testing.T) { { Config: testAccVpcDedicatedConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckVpcExists("aws_vpc.bar", &vpc), + testAccCheckVpcExists("aws_vpc.foo", &vpc), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "instance_tenancy", "dedicated"), + ), + }, + }, + }) +} + +func TestAccAWSVpc_modifyTenancy(t *testing.T) { + var vpcDedicated ec2.Vpc + var vpcDefault ec2.Vpc + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcDestroy, + Steps: []resource.TestStep{ + { + Config: testAccVpcDedicatedConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcExists("aws_vpc.foo", &vpcDedicated), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "instance_tenancy", "dedicated"), + ), + }, + { + Config: testAccVpcConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcExists("aws_vpc.foo", &vpcDefault), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "instance_tenancy", "default"), + testAccCheckVpcIdsEqual(&vpcDedicated, &vpcDefault), + ), + }, + { + Config: testAccVpcDedicatedConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcExists("aws_vpc.foo", &vpcDedicated), resource.TestCheckResourceAttr( - "aws_vpc.bar", "instance_tenancy", "dedicated"), + "aws_vpc.foo", "instance_tenancy", "dedicated"), + testAccCheckVpcIdsNotEqual(&vpcDedicated, &vpcDefault), ), }, }, @@ -277,6 +318,26 @@ func testAccCheckVpcCidr(vpc *ec2.Vpc, expected string) resource.TestCheckFunc { } } +func testAccCheckVpcIdsEqual(vpc1, vpc2 *ec2.Vpc) resource.TestCheckFunc { + return func(s *terraform.State) error { + if *vpc1.VpcId != *vpc2.VpcId { + return fmt.Errorf("VPC IDs not equal") + } + + return nil + } +} + +func testAccCheckVpcIdsNotEqual(vpc1, vpc2 *ec2.Vpc) resource.TestCheckFunc { + return func(s *terraform.State) error { + if *vpc1.VpcId == *vpc2.VpcId { + return fmt.Errorf("VPC IDs are equal") + } + + return nil + } +} + func testAccCheckVpcExists(n string, vpc *ec2.Vpc) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -438,9 +499,9 @@ resource "aws_vpc" "foo" { } ` const testAccVpcDedicatedConfig = ` -resource "aws_vpc" "bar" { +resource "aws_vpc" "foo" { instance_tenancy = "dedicated" - cidr_block = "10.2.0.0/16" + cidr_block = "10.1.0.0/16" tags { Name = "terraform-testacc-vpc-dedicated" } From 4b7d6222d57de7a7b4abbb365f4c9ec5d9d29ad5 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 12:46:28 -0400 Subject: [PATCH 1574/3316] Add 'TestAccAwsDxPrivateVirtualInterface_dxGateway'. --- ...e_aws_dx_private_virtual_interface_test.go | 49 +++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index ec33ec1fe77..01fd022811c 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -18,7 +18,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { if connectionId == "" { t.Skipf("Environment variable %s is not set", key) } - vifName := fmt.Sprintf("tf-dx-vif-%s", acctest.RandString(5)) + vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -52,6 +52,30 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { }) } +func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { + key := "DX_CONNECTION_ID" + connectionId := os.Getenv(key) + if connectionId == "" { + t.Skipf("Environment variable %s is not set", key) + } + vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDxPrivateVirtualInterfaceConfig_dxGateway(connectionId, vifName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + ), + }, + }, + }) +} + func testAccCheckAwsDxPrivateVirtualInterfaceDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).dxconn @@ -92,7 +116,7 @@ func testAccDxPrivateVirtualInterfaceConfig_noTags(cid, n string) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { - Name = "Testing %s" + Name = "%s" } } @@ -112,7 +136,7 @@ func testAccDxPrivateVirtualInterfaceConfig_tags(cid, n string) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { - Name = "Testing %s" + Name = "%s" } } @@ -131,3 +155,22 @@ resource "aws_dx_private_virtual_interface" "foo" { } `, n, cid, n) } + +func testAccDxPrivateVirtualInterfaceConfig_dxGateway(cid, n string) string { + return fmt.Sprintf(` +resource "aws_dx_gateway" "foo" { + name = "%s" + amazon_side_asn = 65351 +} + +resource "aws_dx_private_virtual_interface" "foo" { + connection_id = "%s" + + dx_gateway_id = "${aws_dx_gateway.foo.id}" + name = "%s" + vlan = 4094 + address_family = "ipv4" + bgp_asn = 65352 +} +`, n, cid, n) +} From 2b93824bd8baccabef4210448495c66dcfaf4343 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 12:49:22 -0400 Subject: [PATCH 1575/3316] Remove 'mergeSchemas'. --- aws/dx_vif.go | 60 -------------- ...source_aws_dx_private_virtual_interface.go | 80 +++++++++++++++---- aws/utils.go | 13 --- aws/utils_test.go | 28 ------- 4 files changed, 64 insertions(+), 117 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 0898583598c..92ee5358cc7 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -10,68 +10,8 @@ import ( "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" ) -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 449ac120e13..04bca1a521d 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsDxPrivateVirtualInterface() *schema.Resource { @@ -20,23 +21,70 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { State: schema.ImportStatePassthrough, }, - Schema: mergeSchemas( - dxVirtualInterfaceSchemaWithTags, - map[string]*schema.Schema{ - "vpn_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"dx_gateway_id"}, - }, - "dx_gateway_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{"vpn_gateway_id"}, - }, + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, }, - ), + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vpn_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"dx_gateway_id"}, + }, + "dx_gateway_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"vpn_gateway_id"}, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tags": tagsSchema(), + }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), diff --git a/aws/utils.go b/aws/utils.go index 6a120cccff8..21c3aab7ef3 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -7,7 +7,6 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -48,15 +47,3 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } - -func mergeSchemas(schemas ...map[string]*schema.Schema) map[string]*schema.Schema { - merged := make(map[string]*schema.Schema) - - for _, schema := range schemas { - for k, v := range schema { - merged[k] = v - } - } - - return merged -} diff --git a/aws/utils_test.go b/aws/utils_test.go index a5854e7ef4b..785ad141ed3 100644 --- a/aws/utils_test.go +++ b/aws/utils_test.go @@ -2,8 +2,6 @@ package aws import ( "testing" - - "github.com/hashicorp/terraform/helper/schema" ) var base64encodingTests = []struct { @@ -74,29 +72,3 @@ func TestJsonBytesEqualWhitespaceAndNoWhitespace(t *testing.T) { t.Errorf("Expected jsonBytesEqual to return false for %s == %s", noWhitespaceDiff, whitespaceDiff) } } - -func TestMergeSchemas(t *testing.T) { - s1 := map[string]*schema.Schema{ - "aaa": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "zzz": { - Type: schema.TypeInt, - Optional: true, - Default: 42, - }, - } - s2 := map[string]*schema.Schema{ - "xxx": { - Type: schema.TypeFloat, - Computed: true, - }, - } - - s3 := mergeSchemas(s1, s2) - if len(s3) != 3 { - t.Errorf("Expected merge schema to be of size 3, got %d", len(s3)) - } -} From 534e0ad23548f573edb8f23760230696f107feda Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 12:59:30 -0400 Subject: [PATCH 1576/3316] Update CHANGELOG for #2514 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfde3e86831..bfc20c52dd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ENHANCEMENTS: * resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] +* resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` [GH-2514] BUG FIXES: From 025d799ebf3510b3c085d47dd53fb735ef6a9c84 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 12:58:29 -0400 Subject: [PATCH 1577/3316] Remove 'mergeSchemas'. --- aws/dx_vif.go | 60 ----------------- ...aws_dx_hosted_private_virtual_interface.go | 67 ++++++++++++++++--- aws/utils.go | 13 ---- aws/utils_test.go | 28 -------- 4 files changed, 57 insertions(+), 111 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 0898583598c..92ee5358cc7 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -10,68 +10,8 @@ import ( "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" ) -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index b45b63cdf92..c793bbbe98d 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { @@ -19,17 +20,63 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { State: schema.ImportStatePassthrough, }, - Schema: mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "owner_account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, }, - ), + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "owner_account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), diff --git a/aws/utils.go b/aws/utils.go index 6a120cccff8..21c3aab7ef3 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -7,7 +7,6 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -48,15 +47,3 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } - -func mergeSchemas(schemas ...map[string]*schema.Schema) map[string]*schema.Schema { - merged := make(map[string]*schema.Schema) - - for _, schema := range schemas { - for k, v := range schema { - merged[k] = v - } - } - - return merged -} diff --git a/aws/utils_test.go b/aws/utils_test.go index a5854e7ef4b..785ad141ed3 100644 --- a/aws/utils_test.go +++ b/aws/utils_test.go @@ -2,8 +2,6 @@ package aws import ( "testing" - - "github.com/hashicorp/terraform/helper/schema" ) var base64encodingTests = []struct { @@ -74,29 +72,3 @@ func TestJsonBytesEqualWhitespaceAndNoWhitespace(t *testing.T) { t.Errorf("Expected jsonBytesEqual to return false for %s == %s", noWhitespaceDiff, whitespaceDiff) } } - -func TestMergeSchemas(t *testing.T) { - s1 := map[string]*schema.Schema{ - "aaa": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "zzz": { - Type: schema.TypeInt, - Optional: true, - Default: 42, - }, - } - s2 := map[string]*schema.Schema{ - "xxx": { - Type: schema.TypeFloat, - Computed: true, - }, - } - - s3 := mergeSchemas(s1, s2) - if len(s3) != 3 { - t.Errorf("Expected merge schema to be of size 3, got %d", len(s3)) - } -} From 9fde05d0769a7d00d78a9a6e66b26fd505e16b18 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 13:09:25 -0400 Subject: [PATCH 1578/3316] Remove 'mergeSchemas'. --- aws/dx_vif.go | 60 ---------------- ...esource_aws_dx_public_virtual_interface.go | 70 ++++++++++++++++--- aws/utils.go | 13 ---- aws/utils_test.go | 28 -------- 4 files changed, 59 insertions(+), 112 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 0898583598c..92ee5358cc7 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -10,68 +10,8 @@ import ( "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" ) -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { diff --git a/aws/resource_aws_dx_public_virtual_interface.go b/aws/resource_aws_dx_public_virtual_interface.go index d23a2a92978..88cfd30a5c1 100644 --- a/aws/resource_aws_dx_public_virtual_interface.go +++ b/aws/resource_aws_dx_public_virtual_interface.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsDxPublicVirtualInterface() *schema.Resource { @@ -21,18 +22,65 @@ func resourceAwsDxPublicVirtualInterface() *schema.Resource { }, CustomizeDiff: resourceAwsDxPublicVirtualInterfaceCustomizeDiff, - Schema: mergeSchemas( - dxVirtualInterfaceSchemaWithTags, - map[string]*schema.Schema{ - "route_filter_prefixes": &schema.Schema{ - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - MinItems: 1, - }, + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, }, - ), + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "route_filter_prefixes": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + MinItems: 1, + }, + "tags": tagsSchema(), + }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), diff --git a/aws/utils.go b/aws/utils.go index 6a120cccff8..21c3aab7ef3 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -7,7 +7,6 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -48,15 +47,3 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } - -func mergeSchemas(schemas ...map[string]*schema.Schema) map[string]*schema.Schema { - merged := make(map[string]*schema.Schema) - - for _, schema := range schemas { - for k, v := range schema { - merged[k] = v - } - } - - return merged -} diff --git a/aws/utils_test.go b/aws/utils_test.go index a5854e7ef4b..785ad141ed3 100644 --- a/aws/utils_test.go +++ b/aws/utils_test.go @@ -2,8 +2,6 @@ package aws import ( "testing" - - "github.com/hashicorp/terraform/helper/schema" ) var base64encodingTests = []struct { @@ -74,29 +72,3 @@ func TestJsonBytesEqualWhitespaceAndNoWhitespace(t *testing.T) { t.Errorf("Expected jsonBytesEqual to return false for %s == %s", noWhitespaceDiff, whitespaceDiff) } } - -func TestMergeSchemas(t *testing.T) { - s1 := map[string]*schema.Schema{ - "aaa": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "zzz": { - Type: schema.TypeInt, - Optional: true, - Default: 42, - }, - } - s2 := map[string]*schema.Schema{ - "xxx": { - Type: schema.TypeFloat, - Computed: true, - }, - } - - s3 := mergeSchemas(s1, s2) - if len(s3) != 3 { - t.Errorf("Expected merge schema to be of size 3, got %d", len(s3)) - } -} From e4feda3a052013e3eb0cc2d2a66985f513c16ffe Mon Sep 17 00:00:00 2001 From: stolfi Date: Fri, 22 Jun 2018 13:23:45 -0400 Subject: [PATCH 1579/3316] Add full mapping of protocol names to protocol numbers --- aws/network_acl_entry.go | 152 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 145 insertions(+), 7 deletions(-) diff --git a/aws/network_acl_entry.go b/aws/network_acl_entry.go index c57f82222c5..5b92c8d9f32 100644 --- a/aws/network_acl_entry.go +++ b/aws/network_acl_entry.go @@ -99,13 +99,151 @@ func protocolIntegers() map[string]int { var protocolIntegers = make(map[string]int) protocolIntegers = map[string]int{ // defined at https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml - "ah": 51, - "esp": 50, - "udp": 17, - "tcp": 6, - "icmp": 1, - "all": -1, - "vrrp": 112, + "all": -1, + "hopopt": 0, + "icmp": 1, + "igmp": 2, + "ggp": 3, + "ipv4": 4, + "st": 5, + "tcp": 6, + "cbt": 7, + "egp": 8, + "igp": 9, + "bbn-rcc-mon": 10, + "nvp-ii": 11, + "pup": 12, + "argus": 13, + "emcon": 14, + "xnet": 15, + "chaos": 16, + "udp": 17, + "mux": 18, + "dcn-meas": 19, + "hmp": 20, + "prm": 21, + "xns-idp": 22, + "trunk-1": 23, + "trunk-2": 24, + "leaf-1": 25, + "leaf-2": 26, + "rdp": 27, + "irtp": 28, + "iso-tp4": 29, + "netblt": 30, + "mfe-nsp": 31, + "merit-inp": 32, + "dccp": 33, + "3pc": 34, + "idpr": 35, + "xtp": 36, + "ddp": 37, + "idpr-cmtp": 38, + "tp++": 39, + "il": 40, + "ipv6": 41, + "sdrp": 42, + "ipv6-route": 43, + "ipv6-frag": 44, + "idrp": 45, + "rsvp": 46, + "gre": 47, + "dsr": 48, + "bna": 49, + "esp": 50, + "ah": 51, + "i-nlsp": 52, + "swipe": 53, + "narp": 54, + "mobile": 55, + "tlsp": 56, + "ipv6-icmp": 58, + "ipv6-nonxt": 59, + "ipv6-opts": 60, + "61": 61, + "cftp": 62, + "63": 63, + "sat-expak": 64, + "kryptolan": 65, + "rvd": 66, + "ippc": 67, + "68": 68, + "sat-mon": 69, + "visa": 70, + "ipcv": 71, + "cpnx": 72, + "cphb": 73, + "wsn": 74, + "pvp": 75, + "br-sat-mon": 76, + "sun-nd": 77, + "wb-mon": 78, + "wb-expak": 79, + "iso-ip": 80, + "vmtp": 81, + "secure-vmtp": 82, + "vines": 83, + "ttp": 84, + "nsfnet-igp": 85, + "dgp": 86, + "tcf": 87, + "eigrp": 88, + "ospfigp": 89, + "sprite-rpc": 90, + "larp": 91, + "mtp": 92, + "ax.25": 93, + "ipip": 94, + "micp": 95, + "scc-sp": 96, + "etherip": 97, + "encap": 98, + "99": 99, + "gmtp": 100, + "ifmp": 101, + "pnni": 102, + "pim": 103, + "aris": 104, + "scps": 105, + "qnx": 106, + "a/n": 107, + "ipcomp": 108, + "snp": 109, + "compaq-peer": 110, + "ipx-in-ip": 111, + "vrrp": 112, + "pgm": 113, + "114": 114, + "l2tp": 115, + "dd": 116, + "iatp": 117, + "stp": 118, + "srp": 119, + "uti": 120, + "smp": 121, + "sm": 122, + "ptp": 123, + "isis-over-ipv4": 124, + "fire": 125, + "crtp": 126, + "crudp": 127, + "sscopmce": 128, + "iplt": 129, + "sps": 130, + "pipe": 131, + "sctp": 132, + "fc": 133, + "rsvp-e2e-ignore": 134, + "mobility-header": 135, + "udplite": 136, + "mpls-in-ip": 137, + "manet": 138, + "hip": 139, + "shim6": 140, + "wesp": 141, + "rohc": 142, + "253": 253, + "254": 254, } return protocolIntegers } From 889d4c5b5eb499f524c6580e43d82c3dfdd73d40 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 14:11:36 -0400 Subject: [PATCH 1580/3316] Remove 'mergeSchemas'. --- aws/dx_vif.go | 60 -------------- ..._aws_dx_hosted_public_virtual_interface.go | 81 +++++++++++++++---- aws/utils.go | 13 --- aws/utils_test.go | 28 ------- 4 files changed, 64 insertions(+), 118 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 0898583598c..92ee5358cc7 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -10,68 +10,8 @@ import ( "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" ) -// Schemas common to all (public/private, hosted or not) virtual interfaces. -var dxVirtualInterfaceSchemaWithTags = mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "tags": tagsSchema(), - }, -) -var dxVirtualInterfaceSchema = map[string]*schema.Schema{ - "arn": { - Type: schema.TypeString, - Computed: true, - }, - "connection_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "vlan": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - ValidateFunc: validation.IntBetween(1, 4094), - }, - "bgp_asn": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "bgp_auth_key": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "address_family": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), - }, - "customer_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "amazon_address": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, -} - func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*directconnect.VirtualInterface, error) { resp, state, err := dxVirtualInterfaceStateRefresh(conn, id)() if err != nil { diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface.go b/aws/resource_aws_dx_hosted_public_virtual_interface.go index 9d933e96d05..7438e3f2aa7 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsDxHostedPublicVirtualInterface() *schema.Resource { @@ -19,24 +20,70 @@ func resourceAwsDxHostedPublicVirtualInterface() *schema.Resource { State: schema.ImportStatePassthrough, }, - Schema: mergeSchemas( - dxVirtualInterfaceSchema, - map[string]*schema.Schema{ - "owner_account_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsAccountId, - }, - "route_filter_prefixes": &schema.Schema{ - Type: schema.TypeSet, - Required: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - MinItems: 1, - }, + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, }, - ), + "connection_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "vlan": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + ValidateFunc: validation.IntBetween(1, 4094), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "owner_account_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "route_filter_prefixes": &schema.Schema{ + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + MinItems: 1, + }, + }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), diff --git a/aws/utils.go b/aws/utils.go index 6a120cccff8..21c3aab7ef3 100644 --- a/aws/utils.go +++ b/aws/utils.go @@ -7,7 +7,6 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" ) // Base64Encode encodes data if the input isn't already encoded using base64.StdEncoding.EncodeToString. @@ -48,15 +47,3 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } - -func mergeSchemas(schemas ...map[string]*schema.Schema) map[string]*schema.Schema { - merged := make(map[string]*schema.Schema) - - for _, schema := range schemas { - for k, v := range schema { - merged[k] = v - } - } - - return merged -} diff --git a/aws/utils_test.go b/aws/utils_test.go index a5854e7ef4b..785ad141ed3 100644 --- a/aws/utils_test.go +++ b/aws/utils_test.go @@ -2,8 +2,6 @@ package aws import ( "testing" - - "github.com/hashicorp/terraform/helper/schema" ) var base64encodingTests = []struct { @@ -74,29 +72,3 @@ func TestJsonBytesEqualWhitespaceAndNoWhitespace(t *testing.T) { t.Errorf("Expected jsonBytesEqual to return false for %s == %s", noWhitespaceDiff, whitespaceDiff) } } - -func TestMergeSchemas(t *testing.T) { - s1 := map[string]*schema.Schema{ - "aaa": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "zzz": { - Type: schema.TypeInt, - Optional: true, - Default: 42, - }, - } - s2 := map[string]*schema.Schema{ - "xxx": { - Type: schema.TypeFloat, - Computed: true, - }, - } - - s3 := mergeSchemas(s1, s2) - if len(s3) != 3 { - t.Errorf("Expected merge schema to be of size 3, got %d", len(s3)) - } -} From 7bd7d5866c4e00c284427f669cdc379cb59ce10a Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Fri, 22 Jun 2018 11:57:32 -0700 Subject: [PATCH 1581/3316] adding acceptance test (TestAccAWSCodeBuildProject_WindowsContainer) for #4940. credit: @callmeradical --- aws/resource_aws_codebuild_project_test.go | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 25203c3b057..e5b1a3b1165 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -418,6 +418,32 @@ func TestAccAWSCodeBuildProject_VpcConfig(t *testing.T) { }) } +func TestAccAWSCodeBuildProject_WindowsContainer(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_WindowsContainer(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "environment.#", "1"), + resource.TestCheckResourceAttr(resourceName, "environment.3935046469.compute_type", "BUILD_GENERAL1_MEDIUM"), + resource.TestCheckResourceAttr(resourceName, "environment.3935046469.environment_variable.#", "0"), + resource.TestCheckResourceAttr(resourceName, "environment.3935046469.image", "2"), + resource.TestCheckResourceAttr(resourceName, "environment.3935046469.privileged_mode", "false"), + resource.TestCheckResourceAttr(resourceName, "environment.3935046469.type", "WINDOWS_CONTAINER"), + ), + }, + }, + }) +} + func TestAWSCodeBuildProject_nameValidation(t *testing.T) { cases := []struct { Value string @@ -912,3 +938,27 @@ resource "aws_codebuild_project" "test" { } `, subnetCount, rName) } + +func testAccAWSCodeBuildProjectConfig_WindowsContainer(rName string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = "%s" + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_MEDIUM" + image = "2" + type = "WINDOWS_CONTAINER" + } + + source { + location = "%s" + type = "GITHUB" + } +} +`, rName, testAccAWSCodeBuildGitHubSourceLocationFromEnv()) +} From 173e1d936bb4dd18dcfb4a79c855d89ad12ae4e3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 14:39:18 -0400 Subject: [PATCH 1582/3316] Changes after review. --- aws/dx_vif.go | 58 +------------------ ...source_aws_dx_private_virtual_interface.go | 43 +++++++++++--- ...e_aws_dx_private_virtual_interface_test.go | 29 +++++----- ...dx_private_virtual_interface.html.markdown | 10 ++-- 4 files changed, 58 insertions(+), 82 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 92ee5358cc7..ea659c7b6c9 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -27,14 +26,7 @@ func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*dire func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - if err := setTagsDX(conn, d, arn); err != nil { + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -49,7 +41,7 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isAWSErr(err, "DirectConnectClientException", "does not exist") { + if isAWSErr(err, directconnect.ErrCodeClientException, "does not exist") { return nil } return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) @@ -120,49 +112,3 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco return nil } - -// Attributes common to public VIFs and creator side of hosted public VIFs. -func dxPublicVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceAttributes(d, meta, vif); err != nil { - return err - } - d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) - - return nil -} - -// Attributes common to private VIFs and creator side of hosted private VIFs. -func dxPrivateVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - return dxVirtualInterfaceAttributes(d, meta, vif) -} - -// Attributes common to public/private VIFs and creator side of hosted public/private VIFs. -func dxVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { - return err - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - - return nil -} - -func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) error { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return nil -} diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 04bca1a521d..cd92f28b626 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -18,7 +19,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Update: resourceAwsDxPrivateVirtualInterfaceUpdate, Delete: resourceAwsDxPrivateVirtualInterfaceDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsDxPrivateVirtualInterfaceImport, }, Schema: map[string]*schema.Schema{ @@ -112,19 +113,19 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int AddressFamily: aws.String(d.Get("address_family").(string)), }, } - if vgwOk { + if vgwOk && vgwIdRaw.(string) != "" { req.NewPrivateVirtualInterface.VirtualGatewayId = aws.String(vgwIdRaw.(string)) } - if dxgwOk { + if dxgwOk && dxgwIdRaw.(string) != "" { req.NewPrivateVirtualInterface.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) } if v, ok := d.GetOk("bgp_auth_key"); ok { req.NewPrivateVirtualInterface.AuthKey = aws.String(v.(string)) } - if v, ok := d.GetOk("customer_address"); ok { + if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterface.CustomerAddress = aws.String(v.(string)) } - if v, ok := d.GetOk("amazon_address"); ok { + if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) } @@ -135,6 +136,14 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int } d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) if err := dxPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { return err @@ -156,9 +165,14 @@ func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta inter return nil } - if err := dxPrivateVirtualInterfaceAttributes(d, meta, vif); err != nil { - return err - } + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) d.Set("vpn_gateway_id", vif.VirtualGatewayId) d.Set("dx_gateway_id", vif.DirectConnectGatewayId) if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { @@ -180,6 +194,19 @@ func resourceAwsDxPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta int return dxVirtualInterfaceDelete(d, meta) } +func resourceAwsDxPrivateVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { return dxVirtualInterfaceWaitUntilAvailable( d, diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 01fd022811c..cb5b9bee73b 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -19,6 +19,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { t.Skipf("Environment variable %s is not set", key) } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + bgpAsn := randIntRange(64512, 65534) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -26,7 +27,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName), + Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -34,7 +35,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { ), }, { - Config: testAccDxPrivateVirtualInterfaceConfig_tags(connectionId, vifName), + Config: testAccDxPrivateVirtualInterfaceConfig_tags(connectionId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -59,6 +60,8 @@ func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { t.Skipf("Environment variable %s is not set", key) } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + amzAsn := randIntRange(64512, 65534) + bgpAsn := randIntRange(64512, 65534) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -66,7 +69,7 @@ func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxPrivateVirtualInterfaceConfig_dxGateway(connectionId, vifName), + Config: testAccDxPrivateVirtualInterfaceConfig_dxGateway(connectionId, vifName, amzAsn, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -112,7 +115,7 @@ func testAccCheckAwsDxPrivateVirtualInterfaceExists(name string) resource.TestCh } } -func testAccDxPrivateVirtualInterfaceConfig_noTags(cid, n string) string { +func testAccDxPrivateVirtualInterfaceConfig_noTags(cid, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { @@ -127,12 +130,12 @@ resource "aws_dx_private_virtual_interface" "foo" { name = "%s" vlan = 4094 address_family = "ipv4" - bgp_asn = 65352 + bgp_asn = %d } -`, n, cid, n) +`, n, cid, n, bgpAsn) } -func testAccDxPrivateVirtualInterfaceConfig_tags(cid, n string) string { +func testAccDxPrivateVirtualInterfaceConfig_tags(cid, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { @@ -147,20 +150,20 @@ resource "aws_dx_private_virtual_interface" "foo" { name = "%s" vlan = 4094 address_family = "ipv4" - bgp_asn = 65352 + bgp_asn = %d tags { Environment = "test" } } -`, n, cid, n) +`, n, cid, n, bgpAsn) } -func testAccDxPrivateVirtualInterfaceConfig_dxGateway(cid, n string) string { +func testAccDxPrivateVirtualInterfaceConfig_dxGateway(cid, n string, amzAsn, bgpAsn int) string { return fmt.Sprintf(` resource "aws_dx_gateway" "foo" { name = "%s" - amazon_side_asn = 65351 + amazon_side_asn = %d } resource "aws_dx_private_virtual_interface" "foo" { @@ -170,7 +173,7 @@ resource "aws_dx_private_virtual_interface" "foo" { name = "%s" vlan = 4094 address_family = "ipv4" - bgp_asn = 65352 + bgp_asn = %d } -`, n, cid, n) +`, n, amzAsn, cid, n, bgpAsn) } diff --git a/website/docs/r/dx_private_virtual_interface.html.markdown b/website/docs/r/dx_private_virtual_interface.html.markdown index 1afa9920c2e..7db6e4a7dd8 100644 --- a/website/docs/r/dx_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_private_virtual_interface.html.markdown @@ -27,17 +27,17 @@ resource "aws_dx_private_virtual_interface" "foo" { The following arguments are supported: +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. * `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. -* `vpn_gateway_id` - (Optional) The ID of the [virtual private gateway](vpn_gateway.html) to which to connect the virtual interface. -* `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. * `name` - (Required) The name for the virtual interface. * `vlan` - (Required) The VLAN ID. -* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. -* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. -* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. +* `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. * `tags` - (Optional) A mapping of tags to assign to the resource. +* `vpn_gateway_id` - (Optional) The ID of the [virtual private gateway](vpn_gateway.html) to which to connect the virtual interface. ## Attributes Reference From 4af87fd7244ed0356dc7c96d7bec6c68025227cf Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 16:07:29 -0400 Subject: [PATCH 1583/3316] Changes after code review on https://github.com/terraform-providers/terraform-provider-aws/pull/3253. --- aws/dx_vif.go | 56 +------------------ ...aws_dx_hosted_private_virtual_interface.go | 41 ++++++++++++-- ...sted_private_virtual_interface_accepter.go | 31 ++++++++-- ...x_hosted_private_virtual_interface_test.go | 13 +++-- ...ed_private_virtual_interface.html.markdown | 8 +-- ...e_virtual_interface_accepter.html.markdown | 2 +- 6 files changed, 74 insertions(+), 77 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 92ee5358cc7..941c21c134b 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -27,14 +26,7 @@ func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*dire func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - if err := setTagsDX(conn, d, arn); err != nil { + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -120,49 +112,3 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco return nil } - -// Attributes common to public VIFs and creator side of hosted public VIFs. -func dxPublicVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceAttributes(d, meta, vif); err != nil { - return err - } - d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) - - return nil -} - -// Attributes common to private VIFs and creator side of hosted private VIFs. -func dxPrivateVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - return dxVirtualInterfaceAttributes(d, meta, vif) -} - -// Attributes common to public/private VIFs and creator side of hosted public/private VIFs. -func dxVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { - return err - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - - return nil -} - -func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) error { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return nil -} diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index c793bbbe98d..f0ce581ff78 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -17,7 +18,7 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { Read: resourceAwsDxHostedPrivateVirtualInterfaceRead, Delete: resourceAwsDxHostedPrivateVirtualInterfaceDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsDxHostedPrivateVirtualInterfaceImport, }, Schema: map[string]*schema.Schema{ @@ -98,13 +99,13 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me AddressFamily: aws.String(d.Get("address_family").(string)), }, } - if v, ok := d.GetOk("bgp_auth_key"); ok { + if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { req.NewPrivateVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) } - if v, ok := d.GetOk("customer_address"); ok { + if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterfaceAllocation.CustomerAddress = aws.String(v.(string)) } - if v, ok := d.GetOk("amazon_address"); ok { + if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterfaceAllocation.AmazonAddress = aws.String(v.(string)) } @@ -115,6 +116,14 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me } d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { return err @@ -136,14 +145,36 @@ func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta return nil } + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) d.Set("owner_account_id", vif.OwnerAccount) - return dxPrivateVirtualInterfaceAttributes(d, meta, vif) + + return nil } func resourceAwsDxHostedPrivateVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { return dxVirtualInterfaceDelete(d, meta) } +func resourceAwsDxHostedPrivateVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { return dxVirtualInterfaceWaitUntilAvailable( d, diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index cea7d588b1b..77479b4859b 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" ) @@ -17,7 +18,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepter() *schema.Resource { Update: resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate, Delete: resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport, }, Schema: map[string]*schema.Schema{ @@ -66,10 +67,10 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.Resource req := &directconnect.ConfirmPrivateVirtualInterfaceInput{ VirtualInterfaceId: aws.String(vifId), } - if vgwOk { + if vgwOk && vgwIdRaw.(string) != "" { req.VirtualGatewayId = aws.String(vgwIdRaw.(string)) } - if dxgwOk { + if dxgwOk && dxgwIdRaw.(string) != "" { req.DirectConnectGatewayId = aws.String(dxgwIdRaw.(string)) } @@ -80,6 +81,14 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.Resource } d.SetId(vifId) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { return err @@ -101,9 +110,6 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceDa return nil } - if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { - return err - } d.Set("virtual_interface_id", vif.VirtualInterfaceId) d.Set("vpn_gateway_id", vif.VirtualGatewayId) d.Set("dx_gateway_id", vif.DirectConnectGatewayId) @@ -126,6 +132,19 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete(d *schema.Resource return dxVirtualInterfaceDelete(d, meta) } +func resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { return dxVirtualInterfaceWaitUntilAvailable( d, diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index 451bd87ed7c..a7ddff6003f 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -23,7 +23,8 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { if ownerAccountId == "" { t.Skipf("Environment variable %s is not set", key) } - vifName := fmt.Sprintf("tf-dx-vif-%s", acctest.RandString(5)) + vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + bgpAsn := randIntRange(64512, 65534) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -31,7 +32,7 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName), + Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), @@ -65,7 +66,7 @@ func testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy(s *terraform.State) e } for _, v := range resp.VirtualInterfaces { if *v.VirtualInterfaceId == rs.Primary.ID && !(*v.VirtualInterfaceState == directconnect.VirtualInterfaceStateDeleted) { - return fmt.Errorf("[DESTROY ERROR] Dx Public VIF (%s) not deleted", rs.Primary.ID) + return fmt.Errorf("[DESTROY ERROR] Dx Private VIF (%s) not deleted", rs.Primary.ID) } } } @@ -83,7 +84,7 @@ func testAccCheckAwsDxHostedPrivateVirtualInterfaceExists(name string) resource. } } -func testAccDxHostedPrivateVirtualInterfaceConfig_basic(cid, ownerAcctId, n string) string { +func testAccDxHostedPrivateVirtualInterfaceConfig_basic(cid, ownerAcctId, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_dx_hosted_private_virtual_interface" "foo" { connection_id = "%s" @@ -92,7 +93,7 @@ resource "aws_dx_hosted_private_virtual_interface" "foo" { name = "%s" vlan = 4094 address_family = "ipv4" - bgp_asn = 65352 + bgp_asn = %d } -`, cid, ownerAcctId, n) +`, cid, ownerAcctId, n, bgpAsn) } diff --git a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown index 85b0cf79db9..9953d85d249 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown @@ -28,15 +28,15 @@ resource "aws_dx_hosted_private_virtual_interface" "foo" { The following arguments are supported: +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. * `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. -* `owner_account_id` - (Required) The AWS account that will own the new virtual interface. * `name` - (Required) The name for the virtual interface. +* `owner_account_id` - (Required) The AWS account that will own the new virtual interface. * `vlan` - (Required) The VLAN ID. -* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. -* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. -* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. ## Attributes Reference diff --git a/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown index d346a24a62c..ef0ebd23c2d 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown @@ -60,9 +60,9 @@ resource "aws_dx_hosted_private_virtual_interface_accepter" "accepter" { The following arguments are supported: * `virtual_interface_id` - (Required) The ID of the Direct Connect virtual interface to accept. -* `vpn_gateway_id` - (Optional) The ID of the [virtual private gateway](vpn_gateway.html) to which to connect the virtual interface. * `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. * `tags` - (Optional) A mapping of tags to assign to the resource. +* `vpn_gateway_id` - (Optional) The ID of the [virtual private gateway](vpn_gateway.html) to which to connect the virtual interface. ## Attributes Reference From eb5f5bb1bd0a2debe344ed4eb683b5bcd1569d14 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 16:19:35 -0400 Subject: [PATCH 1584/3316] Use 'directconnect.ErrCodeClientException'. --- aws/dx_vif.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 941c21c134b..ea659c7b6c9 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -41,7 +41,7 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isAWSErr(err, "DirectConnectClientException", "does not exist") { + if isAWSErr(err, directconnect.ErrCodeClientException, "does not exist") { return nil } return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) From a119b6de61f339dc69c1aac9e97132d4017a2376 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 16:32:31 -0400 Subject: [PATCH 1585/3316] Changes after code review on https://github.com/terraform-providers/terraform-provider-aws/pull/3253. --- aws/dx_vif.go | 58 +------------------ ..._aws_dx_hosted_public_virtual_interface.go | 42 ++++++++++++-- ...osted_public_virtual_interface_accepter.go | 27 +++++++-- ...dx_hosted_public_virtual_interface_test.go | 11 ++-- ...ted_public_virtual_interface.html.markdown | 10 ++-- 5 files changed, 73 insertions(+), 75 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 92ee5358cc7..ea659c7b6c9 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -27,14 +26,7 @@ func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*dire func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - if err := setTagsDX(conn, d, arn); err != nil { + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -49,7 +41,7 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isAWSErr(err, "DirectConnectClientException", "does not exist") { + if isAWSErr(err, directconnect.ErrCodeClientException, "does not exist") { return nil } return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) @@ -120,49 +112,3 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco return nil } - -// Attributes common to public VIFs and creator side of hosted public VIFs. -func dxPublicVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceAttributes(d, meta, vif); err != nil { - return err - } - d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) - - return nil -} - -// Attributes common to private VIFs and creator side of hosted private VIFs. -func dxPrivateVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - return dxVirtualInterfaceAttributes(d, meta, vif) -} - -// Attributes common to public/private VIFs and creator side of hosted public/private VIFs. -func dxVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { - return err - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - - return nil -} - -func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) error { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return nil -} diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface.go b/aws/resource_aws_dx_hosted_public_virtual_interface.go index 7438e3f2aa7..b82a04e3675 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -17,7 +18,7 @@ func resourceAwsDxHostedPublicVirtualInterface() *schema.Resource { Read: resourceAwsDxHostedPublicVirtualInterfaceRead, Delete: resourceAwsDxHostedPublicVirtualInterfaceDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsDxHostedPublicVirtualInterfaceImport, }, Schema: map[string]*schema.Schema{ @@ -117,13 +118,13 @@ func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, met AddressFamily: aws.String(addressFamily), }, } - if v, ok := d.GetOk("bgp_auth_key"); ok { + if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { req.NewPublicVirtualInterfaceAllocation.AuthKey = aws.String(v.(string)) } - if caOk { + if caOk && caRaw.(string) != "" { req.NewPublicVirtualInterfaceAllocation.CustomerAddress = aws.String(caRaw.(string)) } - if aaOk { + if aaOk && aaRaw.(string) != "" { req.NewPublicVirtualInterfaceAllocation.AmazonAddress = aws.String(aaRaw.(string)) } if v, ok := d.GetOk("route_filter_prefixes"); ok { @@ -137,6 +138,14 @@ func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, met } d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { return err @@ -158,14 +167,37 @@ func resourceAwsDxHostedPublicVirtualInterfaceRead(d *schema.ResourceData, meta return nil } + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) d.Set("owner_account_id", vif.OwnerAccount) - return dxPublicVirtualInterfaceAttributes(d, meta, vif) + + return nil } func resourceAwsDxHostedPublicVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { return dxVirtualInterfaceDelete(d, meta) } +func resourceAwsDxHostedPublicVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + func dxHostedPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { return dxVirtualInterfaceWaitUntilAvailable( d, diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go index 1e09750fc3d..0094f1b37bb 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" ) @@ -17,7 +18,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepter() *schema.Resource { Update: resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate, Delete: resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsDxHostedPublicVirtualInterfaceAccepterImport, }, Schema: map[string]*schema.Schema{ @@ -55,6 +56,14 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceD } d.SetId(vifId) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { return err @@ -76,9 +85,6 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceDat return nil } - if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { - return err - } d.Set("virtual_interface_id", vif.VirtualInterfaceId) if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err @@ -99,6 +105,19 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete(d *schema.ResourceD return dxVirtualInterfaceDelete(d, meta) } +func resourceAwsDxHostedPublicVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { return dxVirtualInterfaceWaitUntilAvailable( d, diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go index 46a737d63b5..59a865cbb49 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go @@ -23,7 +23,8 @@ func TestAccAwsDxHostedPublicVirtualInterface_basic(t *testing.T) { if ownerAccountId == "" { t.Skipf("Environment variable %s is not set", key) } - vifName := fmt.Sprintf("tf-dx-vif-%s", acctest.RandString(5)) + vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + bgpAsn := randIntRange(64512, 65534) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -31,7 +32,7 @@ func TestAccAwsDxHostedPublicVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxHostedPublicVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxHostedPublicVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName), + Config: testAccDxHostedPublicVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxHostedPublicVirtualInterfaceExists("aws_dx_hosted_public_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_hosted_public_virtual_interface.foo", "name", vifName), @@ -83,7 +84,7 @@ func testAccCheckAwsDxHostedPublicVirtualInterfaceExists(name string) resource.T } } -func testAccDxHostedPublicVirtualInterfaceConfig_basic(cid, ownerAcctId, n string) string { +func testAccDxHostedPublicVirtualInterfaceConfig_basic(cid, ownerAcctId, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_dx_hosted_public_virtual_interface" "foo" { connection_id = "%s" @@ -92,7 +93,7 @@ resource "aws_dx_hosted_public_virtual_interface" "foo" { name = "%s" vlan = 4094 address_family = "ipv4" - bgp_asn = 65352 + bgp_asn = %d customer_address = "175.45.176.1/30" amazon_address = "175.45.176.2/30" @@ -101,5 +102,5 @@ resource "aws_dx_hosted_public_virtual_interface" "foo" { "175.45.176.0/22" ] } -`, cid, ownerAcctId, n) +`, cid, ownerAcctId, n, bgpAsn) } diff --git a/website/docs/r/dx_hosted_public_virtual_interface.html.markdown b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown index 1d5a5d57987..35e72ae0b82 100644 --- a/website/docs/r/dx_hosted_public_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown @@ -35,16 +35,16 @@ resource "aws_dx_hosted_public_virtual_interface" "foo" { The following arguments are supported: +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. * `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. -* `owner_account_id` - (Required) The AWS account that will own the new virtual interface. * `name` - (Required) The name for the virtual interface. +* `owner_account_id` - (Required) The AWS account that will own the new virtual interface. +* `route_filter_prefixes` - (Required) A list of routes to be advertised to the AWS network in this region. * `vlan` - (Required) The VLAN ID. -* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. -* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. -* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. -* `route_filter_prefixes` - (Required) A list of routes to be advertised to the AWS network in this region. ## Attributes Reference From adb1caa05bd1d73c10a82f26f424d7937cbdb376 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 16:52:19 -0400 Subject: [PATCH 1586/3316] Changes after code review on https://github.com/terraform-providers/terraform-provider-aws/pull/3253. --- aws/dx_vif.go | 58 +------------------ ...esource_aws_dx_public_virtual_interface.go | 42 +++++++++++--- ...ce_aws_dx_public_virtual_interface_test.go | 19 +++--- .../dx_public_virtual_interface.html.markdown | 6 +- 4 files changed, 50 insertions(+), 75 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index 92ee5358cc7..ea659c7b6c9 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -27,14 +26,7 @@ func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*dire func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - if err := setTagsDX(conn, d, arn); err != nil { + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -49,7 +41,7 @@ func dxVirtualInterfaceDelete(d *schema.ResourceData, meta interface{}) error { VirtualInterfaceId: aws.String(d.Id()), }) if err != nil { - if isAWSErr(err, "DirectConnectClientException", "does not exist") { + if isAWSErr(err, directconnect.ErrCodeClientException, "does not exist") { return nil } return fmt.Errorf("Error deleting Direct Connect virtual interface: %s", err) @@ -120,49 +112,3 @@ func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directco return nil } - -// Attributes common to public VIFs and creator side of hosted public VIFs. -func dxPublicVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceAttributes(d, meta, vif); err != nil { - return err - } - d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) - - return nil -} - -// Attributes common to private VIFs and creator side of hosted private VIFs. -func dxPrivateVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - return dxVirtualInterfaceAttributes(d, meta, vif) -} - -// Attributes common to public/private VIFs and creator side of hosted public/private VIFs. -func dxVirtualInterfaceAttributes(d *schema.ResourceData, meta interface{}, vif *directconnect.VirtualInterface) error { - if err := dxVirtualInterfaceArnAttribute(d, meta); err != nil { - return err - } - - d.Set("connection_id", vif.ConnectionId) - d.Set("name", vif.VirtualInterfaceName) - d.Set("vlan", vif.Vlan) - d.Set("bgp_asn", vif.Asn) - d.Set("bgp_auth_key", vif.AuthKey) - d.Set("address_family", vif.AddressFamily) - d.Set("customer_address", vif.CustomerAddress) - d.Set("amazon_address", vif.AmazonAddress) - - return nil -} - -func dxVirtualInterfaceArnAttribute(d *schema.ResourceData, meta interface{}) error { - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Region: meta.(*AWSClient).region, - Service: "directconnect", - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("dxvif/%s", d.Id()), - }.String() - d.Set("arn", arn) - - return nil -} diff --git a/aws/resource_aws_dx_public_virtual_interface.go b/aws/resource_aws_dx_public_virtual_interface.go index 88cfd30a5c1..c12ba2502f3 100644 --- a/aws/resource_aws_dx_public_virtual_interface.go +++ b/aws/resource_aws_dx_public_virtual_interface.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -18,7 +19,7 @@ func resourceAwsDxPublicVirtualInterface() *schema.Resource { Update: resourceAwsDxPublicVirtualInterfaceUpdate, Delete: resourceAwsDxPublicVirtualInterfaceDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsDxPublicVirtualInterfaceImport, }, CustomizeDiff: resourceAwsDxPublicVirtualInterfaceCustomizeDiff, @@ -101,13 +102,13 @@ func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta inte AddressFamily: aws.String(d.Get("address_family").(string)), }, } - if v, ok := d.GetOk("bgp_auth_key"); ok { + if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { req.NewPublicVirtualInterface.AuthKey = aws.String(v.(string)) } - if v, ok := d.GetOk("customer_address"); ok { + if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { req.NewPublicVirtualInterface.CustomerAddress = aws.String(v.(string)) } - if v, ok := d.GetOk("amazon_address"); ok { + if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPublicVirtualInterface.AmazonAddress = aws.String(v.(string)) } if v, ok := d.GetOk("route_filter_prefixes"); ok { @@ -121,6 +122,14 @@ func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta inte } d.SetId(aws.StringValue(resp.VirtualInterfaceId)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) if err := dxPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { return err @@ -142,9 +151,15 @@ func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interf return nil } - if err := dxPublicVirtualInterfaceAttributes(d, meta, vif); err != nil { - return err - } + d.Set("connection_id", vif.ConnectionId) + d.Set("name", vif.VirtualInterfaceName) + d.Set("vlan", vif.Vlan) + d.Set("bgp_asn", vif.Asn) + d.Set("bgp_auth_key", vif.AuthKey) + d.Set("address_family", vif.AddressFamily) + d.Set("customer_address", vif.CustomerAddress) + d.Set("amazon_address", vif.AmazonAddress) + d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -164,6 +179,19 @@ func resourceAwsDxPublicVirtualInterfaceDelete(d *schema.ResourceData, meta inte return dxVirtualInterfaceDelete(d, meta) } +func resourceAwsDxPublicVirtualInterfaceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Service: "directconnect", + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("dxvif/%s", d.Id()), + }.String() + d.Set("arn", arn) + + return []*schema.ResourceData{d}, nil +} + func resourceAwsDxPublicVirtualInterfaceCustomizeDiff(diff *schema.ResourceDiff, meta interface{}) error { if diff.Id() == "" { // New resource. diff --git a/aws/resource_aws_dx_public_virtual_interface_test.go b/aws/resource_aws_dx_public_virtual_interface_test.go index 28e94108674..e498651cbb8 100644 --- a/aws/resource_aws_dx_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_public_virtual_interface_test.go @@ -18,7 +18,8 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { if connectionId == "" { t.Skipf("Environment variable %s is not set", key) } - vifName := fmt.Sprintf("terraform-testacc-dx-vif-%s", acctest.RandString(5)) + vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + bgpAsn := randIntRange(64512, 65534) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -26,7 +27,7 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxPublicVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxPublicVirtualInterfaceConfig_noTags(connectionId, vifName), + Config: testAccDxPublicVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPublicVirtualInterfaceExists("aws_dx_public_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_public_virtual_interface.foo", "name", vifName), @@ -34,7 +35,7 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { ), }, { - Config: testAccDxPublicVirtualInterfaceConfig_tags(connectionId, vifName), + Config: testAccDxPublicVirtualInterfaceConfig_tags(connectionId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPublicVirtualInterfaceExists("aws_dx_public_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_public_virtual_interface.foo", "name", vifName), @@ -88,7 +89,7 @@ func testAccCheckAwsDxPublicVirtualInterfaceExists(name string) resource.TestChe } } -func testAccDxPublicVirtualInterfaceConfig_noTags(cid, n string) string { +func testAccDxPublicVirtualInterfaceConfig_noTags(cid, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_dx_public_virtual_interface" "foo" { connection_id = "%s" @@ -96,7 +97,7 @@ resource "aws_dx_public_virtual_interface" "foo" { name = "%s" vlan = 4094 address_family = "ipv4" - bgp_asn = 65352 + bgp_asn = %d customer_address = "175.45.176.1/30" amazon_address = "175.45.176.2/30" @@ -105,10 +106,10 @@ resource "aws_dx_public_virtual_interface" "foo" { "175.45.176.0/22" ] } -`, cid, n) +`, cid, n, bgpAsn) } -func testAccDxPublicVirtualInterfaceConfig_tags(cid, n string) string { +func testAccDxPublicVirtualInterfaceConfig_tags(cid, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_dx_public_virtual_interface" "foo" { connection_id = "%s" @@ -116,7 +117,7 @@ resource "aws_dx_public_virtual_interface" "foo" { name = "%s" vlan = 4094 address_family = "ipv4" - bgp_asn = 65352 + bgp_asn = %d customer_address = "175.45.176.1/30" amazon_address = "175.45.176.2/30" @@ -129,5 +130,5 @@ resource "aws_dx_public_virtual_interface" "foo" { Environment = "test" } } -`, cid, n) +`, cid, n, bgpAsn) } diff --git a/website/docs/r/dx_public_virtual_interface.html.markdown b/website/docs/r/dx_public_virtual_interface.html.markdown index 05d611d40bb..c8d3705613a 100644 --- a/website/docs/r/dx_public_virtual_interface.html.markdown +++ b/website/docs/r/dx_public_virtual_interface.html.markdown @@ -34,14 +34,14 @@ resource "aws_dx_public_virtual_interface" "foo" { The following arguments are supported: +* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. +* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. * `connection_id` - (Required) The ID of the Direct Connect connection (or LAG) on which to create the virtual interface. * `name` - (Required) The name for the virtual interface. * `vlan` - (Required) The VLAN ID. -* `bgp_asn` - (Required) The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. +* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. -* `address_family` - (Required) The address family for the BGP peer. `ipv4 ` or `ipv6`. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. -* `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. * `route_filter_prefixes` - (Required) A list of routes to be advertised to the AWS network in this region. * `tags` - (Optional) A mapping of tags to assign to the resource. From e4c9c7acfcc83add38bdae0a7415a31cad375f39 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 17:23:17 -0400 Subject: [PATCH 1587/3316] Update CHANGELOG for #4960 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfc20c52dd2..2ab9754fe73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: ENHANCEMENTS: +* resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type [GH-4960] * resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] * resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` [GH-2514] From 5d88ab2a71b44650d79efd0e90ee235d4553fce1 Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Fri, 22 Jun 2018 14:24:19 -0700 Subject: [PATCH 1588/3316] updating codebuild_project documentation to reflect new WINDOWS_CONTAINER support --- website/docs/r/codebuild_project.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index 5afd8bd94d3..e9701bb97a4 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -174,9 +174,9 @@ The following arguments are supported: `environment` supports the following: -* `compute_type` - (Required) Information about the compute resources the build project will use. Available values for this parameter are: `BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM` or `BUILD_GENERAL1_LARGE` +* `compute_type` - (Required) Information about the compute resources the build project will use. Available values for this parameter are: `BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM` or `BUILD_GENERAL1_LARGE`. `BUILD_GENERAL1_SMALL` is only valid if `type` is set to `LINUX_CONTAINER` * `image` - (Required) The *image identifier* of the Docker image to use for this build project ([list of Docker images provided by AWS CodeBuild.](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html)). You can read more about the AWS curated environment images in the [documentation](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListCuratedEnvironmentImages.html). -* `type` - (Required) The type of build environment to use for related builds. The only valid value is `LINUX_CONTAINER`. +* `type` - (Required) The type of build environment to use for related builds. Available values are: `LINUX_CONTAINER` or `WINDOWS_CONTAINER`. * `environment_variable` - (Optional) A set of environment variables to make available to builds for this build project. * `privileged_mode` - (Optional) If set to true, enables running the Docker daemon inside a Docker container. Defaults to `false`. From 7baa7046b85ea26a7893b53ac4042a2f43da5032 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 22 Jun 2018 17:43:50 -0400 Subject: [PATCH 1589/3316] Add WINDOWS_CONTAINER to environment type --- website/docs/r/codebuild_project.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index 5afd8bd94d3..d221ee161a6 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -176,7 +176,7 @@ The following arguments are supported: * `compute_type` - (Required) Information about the compute resources the build project will use. Available values for this parameter are: `BUILD_GENERAL1_SMALL`, `BUILD_GENERAL1_MEDIUM` or `BUILD_GENERAL1_LARGE` * `image` - (Required) The *image identifier* of the Docker image to use for this build project ([list of Docker images provided by AWS CodeBuild.](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html)). You can read more about the AWS curated environment images in the [documentation](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListCuratedEnvironmentImages.html). -* `type` - (Required) The type of build environment to use for related builds. The only valid value is `LINUX_CONTAINER`. +* `type` - (Required) The type of build environment to use for related builds. Valid values: `LINUX_CONTAINER`, `WINDOWS_CONTAINER`. * `environment_variable` - (Optional) A set of environment variables to make available to builds for this build project. * `privileged_mode` - (Optional) If set to true, enables running the Docker daemon inside a Docker container. Defaults to `false`. From 64f9a629dcae7f3c7b2bbcdcf2f4a68c479a2bce Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 19:07:31 -0400 Subject: [PATCH 1590/3316] Changes after additional code review. --- ...aws_dx_hosted_private_virtual_interface_accepter.go | 10 +++++++++- .../dx_hosted_private_virtual_interface.html.markdown | 2 +- ...ed_private_virtual_interface_accepter.html.markdown | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index 77479b4859b..855061c9eef 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -109,6 +109,13 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceDa d.SetId("") return nil } + vifState := aws.StringValue(vif.VirtualInterfaceState) + if vifState != directconnect.VirtualInterfaceStateAvailable && + vifState != directconnect.VirtualInterfaceStateDown { + log.Printf("[WARN] Direct Connect virtual interface (%s) is '%s', removing from state", vifState, d.Id()) + d.SetId("") + return nil + } d.Set("virtual_interface_id", vif.VirtualInterfaceId) d.Set("vpn_gateway_id", vif.VirtualGatewayId) @@ -129,7 +136,8 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d *schema.Resource } func resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { - return dxVirtualInterfaceDelete(d, meta) + log.Printf("[WARN] Will not delete Direct Connect virtual interface. Terraform will remove this resource from the state file, however resources may remain.") + return nil } func resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { diff --git a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown index 9953d85d249..9c95cd6be61 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown @@ -8,7 +8,7 @@ description: |- # aws_dx_hosted_private_virtual_interface -Provides a Direct Connect hosted private virtual interface resource. +Provides a Direct Connect hosted private virtual interface resource. This resource represents the allocator's side of the hosted virtual interface. A hosted virtual interface is a virtual interface that is owned by another AWS account. ## Example Usage diff --git a/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown index ef0ebd23c2d..ef2301d58f6 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown @@ -64,6 +64,14 @@ The following arguments are supported: * `tags` - (Optional) A mapping of tags to assign to the resource. * `vpn_gateway_id` - (Optional) The ID of the [virtual private gateway](vpn_gateway.html) to which to connect the virtual interface. +### Removing `aws_dx_hosted_private_virtual_interface_accepter` from your configuration + +AWS allows a Direct Connect hosted private virtual interface to be deleted from either the allocator's or accepter's side. +However, Terraform only allows the Direct Connect hosted private virtual interface to be deleted from the allocator's side +by removing the corresponding `aws_dx_hosted_private_virtual_interface` resource from your configuration. +Removing a `aws_dx_hosted_private_virtual_interface_accepter` resource from your configuration will remove it +from your statefile and management, **but will not delete the Direct Connect virtual interface.** + ## Attributes Reference The following attributes are exported: From 5af45810f65c32a856d4099a62ee84b707627d8c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 22 Jun 2018 19:55:39 -0400 Subject: [PATCH 1591/3316] Changes after additional code review on https://github.com/terraform-providers/terraform-provider-aws/pull/3255. --- ...aws_dx_hosted_public_virtual_interface_accepter.go | 11 ++++++++++- .../dx_hosted_public_virtual_interface.html.markdown | 2 +- ...ed_public_virtual_interface_accepter.html.markdown | 9 +++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go index 0094f1b37bb..46bafff5917 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -84,6 +84,14 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceDat d.SetId("") return nil } + vifState := aws.StringValue(vif.VirtualInterfaceState) + if vifState != directconnect.VirtualInterfaceStateAvailable && + vifState != directconnect.VirtualInterfaceStateDown && + vifState != directconnect.VirtualInterfaceStateVerifying { + log.Printf("[WARN] Direct Connect virtual interface (%s) is '%s', removing from state", vifState, d.Id()) + d.SetId("") + return nil + } d.Set("virtual_interface_id", vif.VirtualInterfaceId) if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { @@ -102,7 +110,8 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d *schema.ResourceD } func resourceAwsDxHostedPublicVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error { - return dxVirtualInterfaceDelete(d, meta) + log.Printf("[WARN] Will not delete Direct Connect virtual interface. Terraform will remove this resource from the state file, however resources may remain.") + return nil } func resourceAwsDxHostedPublicVirtualInterfaceAccepterImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { diff --git a/website/docs/r/dx_hosted_public_virtual_interface.html.markdown b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown index 35e72ae0b82..dbf34f1fef2 100644 --- a/website/docs/r/dx_hosted_public_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown @@ -8,7 +8,7 @@ description: |- # aws_dx_hosted_public_virtual_interface -Provides a Direct Connect hosted public virtual interface resource. +Provides a Direct Connect hosted public virtual interface resource. This resource represents the allocator's side of the hosted virtual interface. A hosted virtual interface is a virtual interface that is owned by another AWS account. ## Example Usage diff --git a/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown b/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown index 04a5df26b13..5d4efe0cd87 100644 --- a/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown +++ b/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown @@ -64,6 +64,15 @@ The following arguments are supported: * `virtual_interface_id` - (Required) The ID of the Direct Connect virtual interface to accept. * `tags` - (Optional) A mapping of tags to assign to the resource. +### Removing `aws_dx_hosted_public_virtual_interface_accepter` from your configuration + +AWS allows a Direct Connect hosted public virtual interface to be deleted from either the allocator's or accepter's side. +However, Terraform only allows the Direct Connect hosted public virtual interface to be deleted from the allocator's side +by removing the corresponding `aws_dx_hosted_public_virtual_interface` resource from your configuration. +Removing a `aws_dx_hosted_public_virtual_interface_accepter` resource from your configuration will remove it +from your statefile and management, **but will not delete the Direct Connect virtual interface.** + + ## Attributes Reference The following attributes are exported: From 14e8e4a562d578d1fc844b6e976090cbca0e1093 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sat, 23 Jun 2018 12:39:01 +0400 Subject: [PATCH 1592/3316] implement value validation check --- aws/resource_aws_ses_receipt_rule.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_ses_receipt_rule.go b/aws/resource_aws_ses_receipt_rule.go index 912620acd90..86af2d2f31f 100644 --- a/aws/resource_aws_ses_receipt_rule.go +++ b/aws/resource_aws_ses_receipt_rule.go @@ -683,9 +683,15 @@ func buildReceiptRule(d *schema.ResourceData, meta interface{}) *ses.ReceiptRule elem := element.(map[string]interface{}) s3Action := &ses.S3Action{ - BucketName: aws.String(elem["bucket_name"].(string)), - KmsKeyArn: aws.String(elem["kms_key_arn"].(string)), - ObjectKeyPrefix: aws.String(elem["object_key_prefix"].(string)), + BucketName: aws.String(elem["bucket_name"].(string)), + } + + if elem["kms_key_arn"] != "" { + s3Action.KmsKeyArn = aws.String(elem["kms_key_arn"].(string)) + } + + if elem["object_key_prefix"] != "" { + s3Action.ObjectKeyPrefix = aws.String(elem["object_key_prefix"].(string)) } if elem["topic_arn"] != "" { From bfb0f4b7a6e1a8b2b2ba85cfeb94e92693257420 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sat, 23 Jun 2018 17:28:57 +0400 Subject: [PATCH 1593/3316] issue #4260 New datasource: aws_network_acls --- aws/data_source_aws_network_acls.go | 88 +++++++++++++++++++++++++++++ aws/provider.go | 1 + 2 files changed, 89 insertions(+) create mode 100644 aws/data_source_aws_network_acls.go diff --git a/aws/data_source_aws_network_acls.go b/aws/data_source_aws_network_acls.go new file mode 100644 index 00000000000..b698d929395 --- /dev/null +++ b/aws/data_source_aws_network_acls.go @@ -0,0 +1,88 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsNetworkAcls() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsNetworkAclsRead, + Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "vpc_id": { + Type: schema.TypeString, + Required: true, + }, + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsNetworkAclsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeNetworkAclsInput{} + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": d.Get("vpc_id").(string), + }, + ) + + if tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + + if filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeNetworkAcls %s\n", req) + resp, err := conn.DescribeNetworkAcls(req) + if err != nil { + return err + } + + if resp == nil || len(resp.NetworkAcls) == 0 { + return fmt.Errorf("no matching network ACL found for vpc with id %s", d.Get("vpc_id").(string)) + } + + networkAcls := make([]string, 0) + + for _, networkAcl := range resp.NetworkAcls { + networkAcls = append(networkAcls, aws.StringValue(networkAcl.NetworkAclId)) + } + + d.SetId(d.Get("vpc_id").(string)) + if err := d.Set("ids", networkAcls); err != nil { + return fmt.Errorf("Error setting network ACL ids: %s", err) + } + + return nil +} diff --git a/aws/provider.go b/aws/provider.go index a27aa307ed4..d15b226f2e2 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -226,6 +226,7 @@ func Provider() terraform.ResourceProvider { "aws_lambda_invocation": dataSourceAwsLambdaInvocation(), "aws_mq_broker": dataSourceAwsMqBroker(), "aws_nat_gateway": dataSourceAwsNatGateway(), + "aws_network_acls": dataSourceAwsNetworkAcls(), "aws_network_interface": dataSourceAwsNetworkInterface(), "aws_partition": dataSourceAwsPartition(), "aws_prefix_list": dataSourceAwsPrefixList(), From d126fad2dbc3580a5c87d81769424e1791a1a301 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sat, 23 Jun 2018 22:12:34 +0400 Subject: [PATCH 1594/3316] add acceptance test --- aws/data_source_aws_network_acls_test.go | 122 +++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 aws/data_source_aws_network_acls_test.go diff --git a/aws/data_source_aws_network_acls_test.go b/aws/data_source_aws_network_acls_test.go new file mode 100644 index 00000000000..1ef2c72e419 --- /dev/null +++ b/aws/data_source_aws_network_acls_test.go @@ -0,0 +1,122 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAwsNetworkAcls_basic(t *testing.T) { + rName := acctest.RandString(5) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsNetworkAclsConfig(rName), + }, + { + Config: testAccDataSourceAwsNetworkAclsConfigWithDataSource(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_network_acls.all", "ids.#", "3"), + resource.TestCheckResourceAttr("data.aws_network_acls.with_tags", "ids.#", "2"), + resource.TestCheckResourceAttr("data.aws_network_acls.with_filter", "ids.#", "1"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsNetworkAclsConfigWithDataSource(rName string) string { + return fmt.Sprintf(` + resource "aws_vpc" "test-vpc" { + cidr_block = "10.0.0.0/16" + } + + resource "aws_network_acl" "acl1" { + vpc_id = "${aws_vpc.test-vpc.id}" + + tags { + Name = "testacc-acl-%s" + } + } + + resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test-vpc.id}" + cidr_block = "10.0.0.0/24" + availability_zone = "us-west-2a" + + tags { + Name = "tf-acc-subnet" + } + } + + resource "aws_network_acl" "acl2" { + vpc_id = "${aws_vpc.test-vpc.id}" + subnet_ids = ["${aws_subnet.test.id}"] + + tags { + Name = "testacc-acl-%s" + } + } + + data "aws_network_acls" "all" { + vpc_id = "${aws_vpc.test-vpc.id}" + } + + data "aws_network_acls" "with_tags" { + vpc_id = "${aws_vpc.test-vpc.id}" + + tags { + Name = "testacc-acl-%s" + } + } + + data "aws_network_acls" "with_filter" { + vpc_id = "${aws_vpc.test-vpc.id}" + + filter { + name = "association.subnet-id" + values = ["${aws_subnet.test.id}"] + } + } + `, rName, rName, rName) +} + +func testAccDataSourceAwsNetworkAclsConfig(rName string) string { + return fmt.Sprintf(` + resource "aws_vpc" "test-vpc" { + cidr_block = "10.0.0.0/16" + } + + resource "aws_network_acl" "acl1" { + vpc_id = "${aws_vpc.test-vpc.id}" + + tags { + Name = "testacc-acl-%s" + } + } + + resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test-vpc.id}" + cidr_block = "10.0.0.0/24" + availability_zone = "us-west-2a" + + tags { + Name = "tf-acc-subnet" + } + } + + resource "aws_network_acl" "acl2" { + vpc_id = "${aws_vpc.test-vpc.id}" + subnet_ids = ["${aws_subnet.test.id}"] + + tags { + Name = "testacc-acl-%s" + } + } + `, rName, rName) +} From b9e05560fa99e57356de20817b05feac6cd9171a Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sat, 23 Jun 2018 22:30:25 +0400 Subject: [PATCH 1595/3316] add documentation for datasource network_acls --- website/aws.erb | 3 + website/docs/d/network_acls.html.markdown | 70 +++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 website/docs/d/network_acls.html.markdown diff --git a/website/aws.erb b/website/aws.erb index fe18e6d8e60..f2fd9f8619a 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -241,6 +241,9 @@ > aws_nat_gateway + > + aws_network_acls + > aws_network_interface diff --git a/website/docs/d/network_acls.html.markdown b/website/docs/d/network_acls.html.markdown new file mode 100644 index 00000000000..c4b9efe22d5 --- /dev/null +++ b/website/docs/d/network_acls.html.markdown @@ -0,0 +1,70 @@ +--- +layout: "aws" +page_title: "AWS: aws_network_acls" +sidebar_current: "docs-aws-datasource-network-acls" +description: |- + Provides a list of network ACL ids for a VPC +--- + +# Data Source: aws_network_acls + +## Example Usage + +The following shows outputing all network ACL ids in a vpc. + +```hcl +data "aws_network_acls" "example" { + vpc_id = "${var.vpc_id}" +} + +output "example" { + value = "${data.aws_network_acls.example.ids}" +} +``` + +The following example retrieves a list of all network ACL ids in a VPC with a custom +tag of `Tier` set to a value of "Private". + +```hcl +data "aws_network_acls" "example" { + vpc_id = "${var.vpc_id}" + tags { + Tier = "Private" + } +} +``` + +The following example retrieves a network ACL id in a VPC which associated +with specific subnet. + +```hcl +data "aws_network_acls" "example" { + vpc_id = "${var.vpc_id}" + filter { + name = "association.subnet-id" + values = ["${aws_subnet.test.id}"] + } +} +``` + +## Argument Reference + +* `vpc_id` - (Required) The VPC ID that you want to filter from. + +* `tags` - (Optional) A mapping of tags, each pair of which must exactly match + a pair on the desired network ACLs. + +* `filter` - (Optional) Custom filter block as described below. + +More complex filters can be expressed using one or more `filter` sub-blocks, +which take the following arguments: + +* `name` - (Required) The name of the field to filter by, as defined by + [the underlying AWS API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeNetworkAcls.html). + +* `values` - (Required) Set of values that are accepted for the given field. + A VPC will be selected if any one of the given values matches. + +## Attributes Reference + +* `ids` - A list of all the network ACL ids found. This data source will fail if none are found. From 42d65315efdb43f7f52760822fabfc2b956e3f77 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sun, 24 Jun 2018 23:02:06 +0400 Subject: [PATCH 1596/3316] add attribute value_list in data source aws_ssm_parameter --- aws/data_source_aws_ssm_parameter.go | 13 +++++++++++++ website/docs/d/ssm_parameter.html.markdown | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/aws/data_source_aws_ssm_parameter.go b/aws/data_source_aws_ssm_parameter.go index 8c92b9a9365..8adf399b114 100644 --- a/aws/data_source_aws_ssm_parameter.go +++ b/aws/data_source_aws_ssm_parameter.go @@ -33,6 +33,12 @@ func dataSourceAwsSsmParameter() *schema.Resource { Computed: true, Sensitive: true, }, + "value_list": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + Computed: true, + }, "with_decryption": { Type: schema.TypeBool, Optional: true, @@ -81,5 +87,12 @@ func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { d.Set("type", param.Type) d.Set("value", param.Value) + if aws.StringValue(param.Type) == "StringList" { + valueList := strings.Split(aws.StringValue(param.Value), ",") + if err := d.Set("value_list", valueList); err != nil { + return fmt.Errorf("Error setting value_list: %s", err) + } + } + return nil } diff --git a/website/docs/d/ssm_parameter.html.markdown b/website/docs/d/ssm_parameter.html.markdown index 934f050036a..abd1683d1d4 100644 --- a/website/docs/d/ssm_parameter.html.markdown +++ b/website/docs/d/ssm_parameter.html.markdown @@ -19,6 +19,24 @@ data "aws_ssm_parameter" "foo" { name = "foo" } ``` +To store a StringList parameter: + +```hcl +resource "aws_ssm_parameter" "subnets" { + name = "/my/subnets" + type = "StringList" + overwrite = true + value = "1.1.1.1,2.2.2.2" +} + +data "aws_ssm_parameter" "subnets" { + name = "/my/subnets" +} + +output "subnets_list" { + value = "${data.aws_ssm_parameter.subnets.value_list}" +} +``` ~> **Note:** The unencrypted value of a SecureString will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). @@ -37,3 +55,4 @@ In addition to all arguments above, the following attributes are exported: * `name` - (Required) The name of the parameter. * `type` - (Required) The type of the parameter. Valid types are `String`, `StringList` and `SecureString`. * `value` - (Required) The value of the parameter. +* `value_list` - (Optional) It will provide value of the parameter in a list when `type` of the parameter is `StringList`. From c617218bb055e9c269f732bf7e0dd2f5c13957b0 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Sun, 24 Jun 2018 19:03:50 +0300 Subject: [PATCH 1597/3316] Allow setting endpoint for autoscaling Adding support for setting user defined end-point Fixes #4967 --- aws/config.go | 4 +++- aws/provider.go | 11 +++++++++++ website/docs/index.html.markdown | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/aws/config.go b/aws/config.go index bd287f75d7f..61852de0477 100644 --- a/aws/config.go +++ b/aws/config.go @@ -125,6 +125,7 @@ type Config struct { DeviceFarmEndpoint string Ec2Endpoint string EcsEndpoint string + AutoscalingEndpoint string EcrEndpoint string EfsEndpoint string EsEndpoint string @@ -392,6 +393,7 @@ func (c *Config) Client() (interface{}, error) { awsCwlSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.CloudWatchLogsEndpoint)}) awsDynamoSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DynamoDBEndpoint)}) awsEc2Sess := sess.Copy(&aws.Config{Endpoint: aws.String(c.Ec2Endpoint)}) + awsAutoscalingSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.AutoscalingEndpoint)}) awsEcrSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcrEndpoint)}) awsEcsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EcsEndpoint)}) awsEfsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.EfsEndpoint)}) @@ -458,7 +460,7 @@ func (c *Config) Client() (interface{}, error) { client.acmpcaconn = acmpca.New(sess) client.apigateway = apigateway.New(awsApigatewaySess) client.appautoscalingconn = applicationautoscaling.New(sess) - client.autoscalingconn = autoscaling.New(sess) + client.autoscalingconn = autoscaling.New(awsAutoscalingSess) client.cloud9conn = cloud9.New(sess) client.cfconn = cloudformation.New(awsCfSess) client.cloudfrontconn = cloudfront.New(sess) diff --git a/aws/provider.go b/aws/provider.go index a27aa307ed4..48198ca0eb5 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -705,6 +705,8 @@ func init() { "ec2_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "autoscaling_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "efs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "elb_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", @@ -812,6 +814,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.DeviceFarmEndpoint = endpoints["devicefarm"].(string) config.DynamoDBEndpoint = endpoints["dynamodb"].(string) config.Ec2Endpoint = endpoints["ec2"].(string) + config.AutoscalingEndpoint = endpoints["autoscaling"].(string) config.EcrEndpoint = endpoints["ecr"].(string) config.EcsEndpoint = endpoints["ecs"].(string) config.EfsEndpoint = endpoints["efs"].(string) @@ -947,6 +950,13 @@ func endpointsSchema() *schema.Schema { Description: descriptions["ec2_endpoint"], }, + "autoscaling": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["autoscaling_endpoint"], + }, + "ecr": { Type: schema.TypeString, Optional: true, @@ -1058,6 +1068,7 @@ func endpointsToHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", m["dynamodb"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["iam"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["ec2"].(string))) + buf.WriteString(fmt.Sprintf("%s-", m["autoscaling"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["efs"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["elb"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["kinesis"].(string))) diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 498fd5f5cdf..50adcf955c7 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -289,6 +289,10 @@ Nested `endpoints` block supports the following: URL constructed from the `region`. It's typically used to connect to custom EC2 endpoints. +* `autoscaling` - (Optional) Use this to override the default endpoint + URL constructed from the `region`. It's typically used to connect to + custom Autoscaling endpoints. + * `ecr` - (Optional) Use this to override the default endpoint URL constructed from the `region`. It's typically used to connect to custom ECR endpoints. From 37e11d28ba614f9e57ec5f98197a83bad3a1476c Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Mon, 25 Jun 2018 10:39:28 +0200 Subject: [PATCH 1598/3316] r/Instance: making the VPC note more prominant --- website/docs/r/instance.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index fd046e99bfe..2541012e459 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -70,7 +70,9 @@ instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/Use * `get_password_data` - (Optional) If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `password_data` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. * `monitoring` - (Optional) If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0) * `security_groups` - (Optional) A list of security group names to associate with. - If you are creating Instances in a VPC, use `vpc_security_group_ids` instead. + +-> **NOTE:** If you are creating Instances in a VPC, use `vpc_security_group_ids` instead. + * `vpc_security_group_ids` - (Optional) A list of security group IDs to associate with. * `subnet_id` - (Optional) The VPC Subnet ID to launch in. * `associate_public_ip_address` - (Optional) Associate a public ip address with an instance in a VPC. Boolean value. From 06769334965f3c6b17ddb20e5667e0e69af3d607 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 07:57:15 -0400 Subject: [PATCH 1599/3316] Update CHANGELOG for #3253 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab9754fe73..168063978c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_codecommit_repository` [GH-4934] +* **New Resource:** `aws_dx_private_virtual_interface` [GH-3253] ENHANCEMENTS: From eedf97808bd2f9157b9682e68f962118b1002a0d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 08:07:11 -0400 Subject: [PATCH 1600/3316] Update CHANGELOG for #3255 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 168063978c9..835156245b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ FEATURES: * **New Data Source:** `aws_codecommit_repository` [GH-4934] +* **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] +* **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` [GH-3255] * **New Resource:** `aws_dx_private_virtual_interface` [GH-3253] ENHANCEMENTS: From fcae19cad54169b2ec4481229881e5ae68a8bd54 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 08:18:18 -0400 Subject: [PATCH 1601/3316] Update CHANGELOG for #3252 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 835156245b8..5086217b76f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: * **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] * **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` [GH-3255] * **New Resource:** `aws_dx_private_virtual_interface` [GH-3253] +* **New Resource:** `aws_dx_public_virtual_interface` [GH-3252] ENHANCEMENTS: From efb83590dcb3a33fe0880caf7b5aeae412727ebf Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 08:28:00 -0400 Subject: [PATCH 1602/3316] Update CHANGELOG for #3254 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5086217b76f..8362aa5b24b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ FEATURES: * **New Data Source:** `aws_codecommit_repository` [GH-4934] * **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] * **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` [GH-3255] +* **New Resource:** `aws_dx_hosted_public_virtual_interface` [GH-3254] +* **New Resource:** `aws_dx_hosted_public_virtual_interface_accepter` [GH-3254] * **New Resource:** `aws_dx_private_virtual_interface` [GH-3253] * **New Resource:** `aws_dx_public_virtual_interface` [GH-3252] From 40bab11251d80963dfb14b747d0531f5905f4cdc Mon Sep 17 00:00:00 2001 From: ryof Date: Mon, 25 Jun 2018 16:17:29 +0900 Subject: [PATCH 1603/3316] Add Importer to CodeBuild Project resource --- aws/resource_aws_codebuild_project.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 4a378ecf048..67d4a7a8b76 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -23,6 +23,9 @@ func resourceAwsCodeBuildProject() *schema.Resource { Read: resourceAwsCodeBuildProjectRead, Update: resourceAwsCodeBuildProjectUpdate, Delete: resourceAwsCodeBuildProjectDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "artifacts": { From 91a6f2e7ca23c6c423bbb1c7ae7ec959762dd8f1 Mon Sep 17 00:00:00 2001 From: ryof Date: Mon, 25 Jun 2018 18:08:38 +0900 Subject: [PATCH 1604/3316] Add basic import test for CodeBuild Project --- aws/import_aws_codebuild_project_test.go | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 aws/import_aws_codebuild_project_test.go diff --git a/aws/import_aws_codebuild_project_test.go b/aws/import_aws_codebuild_project_test.go new file mode 100644 index 00000000000..8068ec96066 --- /dev/null +++ b/aws/import_aws_codebuild_project_test.go @@ -0,0 +1,31 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAWSCodeBuildProject_importBasic(t *testing.T) { + resourceName := "aws_codebuild_project.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_basic(rName), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "force_destroy", "acl"}, + }, + }, + }) +} From 53b36224d0d11752dd3fcd8ec5299cb62fd0eae1 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 25 Jun 2018 18:45:36 +0400 Subject: [PATCH 1605/3316] add acceptance test --- aws/resource_aws_ses_receipt_rule_test.go | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/aws/resource_aws_ses_receipt_rule_test.go b/aws/resource_aws_ses_receipt_rule_test.go index a443ef939f1..1b77a6cc0a0 100644 --- a/aws/resource_aws_ses_receipt_rule_test.go +++ b/aws/resource_aws_ses_receipt_rule_test.go @@ -31,6 +31,24 @@ func TestAccAWSSESReceiptRule_basic(t *testing.T) { }) } +func TestAccAWSSESReceiptRule_s3Action(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckSESReceiptRuleDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSSESReceiptRuleS3ActionConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSESReceiptRuleExists("aws_ses_receipt_rule.basic"), + ), + }, + }, + }) +} + func TestAccAWSSESReceiptRule_order(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { @@ -244,6 +262,32 @@ resource "aws_ses_receipt_rule" "basic" { } `, srrsRandomInt) +var testAccAWSSESReceiptRuleS3ActionConfig = fmt.Sprintf(` +resource "aws_ses_receipt_rule_set" "test" { + rule_set_name = "test-me-%d" +} + +resource "aws_s3_bucket" "emails" { + bucket = "ses-terraform-emails" + acl = "public-read-write" + force_destroy = "true" +} + +resource "aws_ses_receipt_rule" "basic" { + name = "basic" + rule_set_name = "${aws_ses_receipt_rule_set.test.rule_set_name}" + recipients = ["test@example.com"] + enabled = true + scan_enabled = true + tls_policy = "Require" + + s3_action { + bucket_name = "${aws_s3_bucket.emails.id}" + position = 1 + } +} +`, srrsRandomInt) + var testAccAWSSESReceiptRuleOrderConfig = fmt.Sprintf(` resource "aws_ses_receipt_rule_set" "test" { rule_set_name = "test-me-%d" From f73b7c172070a45bcd1088c64deec005ce8b5d29 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 25 Jun 2018 18:57:00 +0400 Subject: [PATCH 1606/3316] randomize the acceptance test attribute value --- aws/resource_aws_ses_receipt_rule_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ses_receipt_rule_test.go b/aws/resource_aws_ses_receipt_rule_test.go index 1b77a6cc0a0..36c13ddcdad 100644 --- a/aws/resource_aws_ses_receipt_rule_test.go +++ b/aws/resource_aws_ses_receipt_rule_test.go @@ -268,7 +268,7 @@ resource "aws_ses_receipt_rule_set" "test" { } resource "aws_s3_bucket" "emails" { - bucket = "ses-terraform-emails" + bucket = "ses-terraform-emails-%d" acl = "public-read-write" force_destroy = "true" } @@ -286,7 +286,7 @@ resource "aws_ses_receipt_rule" "basic" { position = 1 } } -`, srrsRandomInt) +`, srrsRandomInt, srrsRandomInt) var testAccAWSSESReceiptRuleOrderConfig = fmt.Sprintf(` resource "aws_ses_receipt_rule_set" "test" { From 0ed21ca0eebbb8c82ff12864949023727b9d004c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 11:08:31 -0400 Subject: [PATCH 1607/3316] tests/resource/aws_ses_receipt_rule: Remove extraneous hardcoded S3 bucket resource in testAccAWSSESReceiptRuleActionsConfig --- aws/resource_aws_ses_receipt_rule_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/aws/resource_aws_ses_receipt_rule_test.go b/aws/resource_aws_ses_receipt_rule_test.go index 36c13ddcdad..31cd9b5f031 100644 --- a/aws/resource_aws_ses_receipt_rule_test.go +++ b/aws/resource_aws_ses_receipt_rule_test.go @@ -306,10 +306,6 @@ resource "aws_ses_receipt_rule" "first" { `, srrsRandomInt) var testAccAWSSESReceiptRuleActionsConfig = fmt.Sprintf(` -resource "aws_s3_bucket" "emails" { - bucket = "ses-terraform-emails" -} - resource "aws_ses_receipt_rule_set" "test" { rule_set_name = "test-me-%d" } From f68ad0c96960c344352896f34f831d64a098adc6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 11:16:23 -0400 Subject: [PATCH 1608/3316] Update CHANGELOG for #4965 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8362aa5b24b..381ec0da794 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ BUG FIXES: * resource/aws_launch_template: Prevent error when using `valid_until` [GH-4952] * resource/aws_route: Properly force resource recreation when updating `route_table_id` [GH-4946] * resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] +* resource/aws_ses_receipt_rule: Prevent error with `s3_action` when `kms_key_arn` is not specified [GH-4965] ## 1.24.0 (June 21, 2018) From 8705a20f45980dfd9b5074949fc8fc9bebdc757a Mon Sep 17 00:00:00 2001 From: ryof Date: Tue, 26 Jun 2018 00:44:30 +0900 Subject: [PATCH 1609/3316] Remove unnecessary code from test for CodeBuild import --- aws/import_aws_codebuild_project_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/aws/import_aws_codebuild_project_test.go b/aws/import_aws_codebuild_project_test.go index 8068ec96066..7694c4f6683 100644 --- a/aws/import_aws_codebuild_project_test.go +++ b/aws/import_aws_codebuild_project_test.go @@ -23,8 +23,6 @@ func TestAWSCodeBuildProject_importBasic(t *testing.T) { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{ - "force_destroy", "acl"}, }, }, }) From 0cbd700eba93ed1f4f8e37900256ad5a2ad32802 Mon Sep 17 00:00:00 2001 From: ryof Date: Tue, 26 Jun 2018 00:44:56 +0900 Subject: [PATCH 1610/3316] Add documentation for CodeBuild import functionality --- website/docs/r/codebuild_project.html.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index 5afd8bd94d3..bcd0ee5ebf0 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -212,3 +212,11 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ARN of the CodeBuild project. * `badge_url` - The URL of the build badge when `badge_enabled` is enabled. + +## Import + +CodeBuild Project can be imported using the `name`, e.g. + +``` +$ terraform import aws_codebuild_project.name project-name +``` \ No newline at end of file From 40f95c8a67e5aea39ac5a350a4657e8993adacdc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 11:56:02 -0400 Subject: [PATCH 1611/3316] test/resource/aws_codebuild_project: Add missing Acc to TestAccAWSCodeBuildProject_importBasic function naming --- aws/import_aws_codebuild_project_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/import_aws_codebuild_project_test.go b/aws/import_aws_codebuild_project_test.go index 7694c4f6683..9968e298af2 100644 --- a/aws/import_aws_codebuild_project_test.go +++ b/aws/import_aws_codebuild_project_test.go @@ -7,7 +7,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" ) -func TestAWSCodeBuildProject_importBasic(t *testing.T) { +func TestAccAWSCodeBuildProject_importBasic(t *testing.T) { resourceName := "aws_codebuild_project.test" rName := acctest.RandomWithPrefix("tf-acc-test") From 4959029044b80eae3f4a70edfd41b50caec2f6cf Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 11:58:56 -0400 Subject: [PATCH 1612/3316] Update CHANGELOG for #4976 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 381ec0da794..7cc21ef15fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ FEATURES: ENHANCEMENTS: * resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type [GH-4960] +* resource/aws_codebuild_project: Support resource import [GH-4976] * resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] * resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` [GH-2514] From 7f4e1845223e2739293ef17bda176ef87b6af548 Mon Sep 17 00:00:00 2001 From: Sven Walter Date: Mon, 25 Jun 2018 18:02:36 +0200 Subject: [PATCH 1613/3316] resources/wafregional_web_acl: add rule type test --- aws/resource_aws_wafregional_web_acl_test.go | 57 ++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/aws/resource_aws_wafregional_web_acl_test.go b/aws/resource_aws_wafregional_web_acl_test.go index d57d162e1bc..8e338ec8eb7 100644 --- a/aws/resource_aws_wafregional_web_acl_test.go +++ b/aws/resource_aws_wafregional_web_acl_test.go @@ -43,6 +43,35 @@ func TestAccAWSWafRegionalWebAcl_basic(t *testing.T) { }) } +func TestAccAWSWafRegionalWebAcl_createRateBased(t *testing.T) { + var v waf.WebACL + wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegionalWebAclConfigRateBased(wafAclName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalWebAclExists("aws_wafregional_web_acl.waf_acl", &v), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "default_action.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "default_action.0.type", "ALLOW"), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "name", wafAclName), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "rule.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "metric_name", wafAclName), + ), + }, + }, + }) +} + func TestAccAWSWafRegionalWebAcl_changeNameForceNew(t *testing.T) { var before, after waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) @@ -374,6 +403,34 @@ resource "aws_wafregional_web_acl" "waf_acl" { }`, name, name, name, name) } +func testAccAWSWafRegionalWebAclConfigRateBased(name string) string { + return fmt.Sprintf(` + +resource "aws_wafregional_rate_based_rule" "wafrule" { + name = "%s" + metric_name = "%s" + + rate_key = "IP" + rate_limit = 2000 +} + +resource "aws_wafregional_web_acl" "waf_acl" { + name = "%s" + metric_name = "%s" + default_action { + type = "ALLOW" + } + rule { + action { + type = "BLOCK" + } + priority = 1 + type = "RATE_BASED" + rule_id = "${aws_wafregional_rate_based_rule.wafrule.id}" + } +}`, name, name, name, name) +} + func testAccAWSWafRegionalWebAclConfig_changeName(name string) string { return fmt.Sprintf(` resource "aws_wafregional_rule" "wafrule" { From ba5918c063cd42a762859275fddc010d63352ae8 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 25 Jun 2018 20:28:06 +0400 Subject: [PATCH 1614/3316] update documentation to suggest split() function --- aws/data_source_aws_ssm_parameter.go | 14 -------------- website/docs/d/ssm_parameter.html.markdown | 21 +++------------------ 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/aws/data_source_aws_ssm_parameter.go b/aws/data_source_aws_ssm_parameter.go index 8adf399b114..c813e7fe16e 100644 --- a/aws/data_source_aws_ssm_parameter.go +++ b/aws/data_source_aws_ssm_parameter.go @@ -33,12 +33,6 @@ func dataSourceAwsSsmParameter() *schema.Resource { Computed: true, Sensitive: true, }, - "value_list": { - Type: schema.TypeSet, - Elem: &schema.Schema{Type: schema.TypeString}, - Optional: true, - Computed: true, - }, "with_decryption": { Type: schema.TypeBool, Optional: true, @@ -82,17 +76,9 @@ func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { Resource: fmt.Sprintf("parameter/%s", strings.TrimPrefix(d.Id(), "/")), } d.Set("arn", arn.String()) - d.Set("name", param.Name) d.Set("type", param.Type) d.Set("value", param.Value) - if aws.StringValue(param.Type) == "StringList" { - valueList := strings.Split(aws.StringValue(param.Value), ",") - if err := d.Set("value_list", valueList); err != nil { - return fmt.Errorf("Error setting value_list: %s", err) - } - } - return nil } diff --git a/website/docs/d/ssm_parameter.html.markdown b/website/docs/d/ssm_parameter.html.markdown index abd1683d1d4..4039cb9250f 100644 --- a/website/docs/d/ssm_parameter.html.markdown +++ b/website/docs/d/ssm_parameter.html.markdown @@ -19,27 +19,13 @@ data "aws_ssm_parameter" "foo" { name = "foo" } ``` -To store a StringList parameter: -```hcl -resource "aws_ssm_parameter" "subnets" { - name = "/my/subnets" - type = "StringList" - overwrite = true - value = "1.1.1.1,2.2.2.2" -} +~> **Note:** The unencrypted value of a SecureString will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). -data "aws_ssm_parameter" "subnets" { - name = "/my/subnets" -} -output "subnets_list" { - value = "${data.aws_ssm_parameter.subnets.value_list}" -} -``` +~> **Note:** The data source is currently following the behavior of the [SSM API](https://docs.aws.amazon.com/sdk-for-go/api/service/ssm/#Parameter) to return a string value, regardless of parameter type. For type `StringList`, we can use [split()](https://www.terraform.io/docs/configuration/interpolation.html#split-delim-string-) built-in function to get values in a list. Example: `split(",", data.aws_ssm_parameter.subnets.value)` -~> **Note:** The unencrypted value of a SecureString will be stored in the raw state as plain-text. -[Read more about sensitive data in state](/docs/state/sensitive-data.html). ## Argument Reference @@ -55,4 +41,3 @@ In addition to all arguments above, the following attributes are exported: * `name` - (Required) The name of the parameter. * `type` - (Required) The type of the parameter. Valid types are `String`, `StringList` and `SecureString`. * `value` - (Required) The value of the parameter. -* `value_list` - (Optional) It will provide value of the parameter in a list when `type` of the parameter is `StringList`. From 3d69341c5f1a3a971a1df3a4ce16c4050034e540 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Mon, 25 Jun 2018 14:42:05 +0200 Subject: [PATCH 1615/3316] cross-resource referencing for Key Pairs --- website/docs/r/instance.html.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index fd046e99bfe..59606413ffe 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -66,11 +66,14 @@ instance. Amazon defaults this to `stop` for EBS-backed instances and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior) for more information. * `instance_type` - (Required) The type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance. -* `key_name` - (Optional) The key name to use for the instance. +* `key_name` - (Optional) The key name of the Key Pair to use for the instance; which can be managed using [the `aws_key_pair` resource](key_pair.html). + * `get_password_data` - (Optional) If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `password_data` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. * `monitoring` - (Optional) If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0) * `security_groups` - (Optional) A list of security group names to associate with. - If you are creating Instances in a VPC, use `vpc_security_group_ids` instead. + +-> **NOTE:** If you are creating Instances in a VPC, use `vpc_security_group_ids` instead. + * `vpc_security_group_ids` - (Optional) A list of security group IDs to associate with. * `subnet_id` - (Optional) The VPC Subnet ID to launch in. * `associate_public_ip_address` - (Optional) Associate a public ip address with an instance in a VPC. Boolean value. From f247cb95279262ecfa12ed5688e02cc0359bf676 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 13:25:10 -0400 Subject: [PATCH 1616/3316] Update CHANGELOG for #4970 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cc21ef15fc..8bb1f7bb7de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ FEATURES: ENHANCEMENTS: +* provider: Support custom endpoint for `autoscaling` [GH-4970] * resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type [GH-4960] * resource/aws_codebuild_project: Support resource import [GH-4976] * resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] From ac1427f9f52d7977ec7ef56a7f27f2586964cacb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 13:42:51 -0400 Subject: [PATCH 1617/3316] Update CHANGELOG for #4956 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bb1f7bb7de..6f4babd95af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ ENHANCEMENTS: * resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type [GH-4960] * resource/aws_codebuild_project: Support resource import [GH-4976] * resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] +* resource/aws_network_acl: Add full mapping of protocol names to protocol numbers [GH-4956] +* resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers [GH-4956] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] * resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` [GH-2514] From e6e0e6287cda8117b7b458067258c00f270203f0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 14:17:41 -0400 Subject: [PATCH 1618/3316] tests/resource/aws_wafregional_web_acl: Add rule type to computeWafRegionalWebAclRuleIndex --- aws/resource_aws_wafregional_web_acl_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_wafregional_web_acl_test.go b/aws/resource_aws_wafregional_web_acl_test.go index 8e338ec8eb7..8d9b9cbf34f 100644 --- a/aws/resource_aws_wafregional_web_acl_test.go +++ b/aws/resource_aws_wafregional_web_acl_test.go @@ -236,7 +236,7 @@ func TestAccAWSWafRegionalWebAcl_changeRules(t *testing.T) { "aws_wafregional_web_acl.waf_acl", "name", wafAclName), resource.TestCheckResourceAttr( "aws_wafregional_web_acl.waf_acl", "rule.#", "1"), - computeWafRegionalWebAclRuleIndex(&r.RuleId, 1, "BLOCK", &idx), + computeWafRegionalWebAclRuleIndex(&r.RuleId, 1, "REGULAR", "BLOCK", &idx), testCheckResourceAttrWithIndexesAddr("aws_wafregional_web_acl.waf_acl", "rule.%d.priority", &idx, "1"), ), }, @@ -259,7 +259,7 @@ func TestAccAWSWafRegionalWebAcl_changeRules(t *testing.T) { } // Calculates the index which isn't static because ruleId is generated as part of the test -func computeWafRegionalWebAclRuleIndex(ruleId **string, priority int, actionType string, idx *int) resource.TestCheckFunc { +func computeWafRegionalWebAclRuleIndex(ruleId **string, priority int, ruleType string, actionType string, idx *int) resource.TestCheckFunc { return func(s *terraform.State) error { ruleResource := resourceAwsWafRegionalWebAcl().Schema["rule"].Elem.(*schema.Resource) actionMap := map[string]interface{}{ @@ -267,6 +267,7 @@ func computeWafRegionalWebAclRuleIndex(ruleId **string, priority int, actionType } m := map[string]interface{}{ "rule_id": **ruleId, + "type": ruleType, "priority": priority, "action": []interface{}{actionMap}, } From 049021232beb79ead2bd51dbdcd4a7c23df21090 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 14:26:29 -0400 Subject: [PATCH 1619/3316] Update CHANGELOG for #4307 and #4978 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f4babd95af..f170e9e6686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ENHANCEMENTS: * resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers [GH-4956] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] * resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` [GH-2514] +* resource/aws_wafregional_web_acl: Add rule `type` argument (support rate limited rules) [GH-4307] / [GH-4978] BUG FIXES: From d05c3a0232faade5b8334e996952e4173f810c27 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 25 Jun 2018 22:27:25 +0400 Subject: [PATCH 1620/3316] correction based on feedback --- aws/data_source_aws_network_acls.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/aws/data_source_aws_network_acls.go b/aws/data_source_aws_network_acls.go index b698d929395..88454f894a0 100644 --- a/aws/data_source_aws_network_acls.go +++ b/aws/data_source_aws_network_acls.go @@ -19,7 +19,7 @@ func dataSourceAwsNetworkAcls() *schema.Resource { "vpc_id": { Type: schema.TypeString, - Required: true, + Optional: true, }, "ids": { @@ -37,15 +37,17 @@ func dataSourceAwsNetworkAclsRead(d *schema.ResourceData, meta interface{}) erro req := &ec2.DescribeNetworkAclsInput{} + if v, ok := d.GetOk("vpc_id"); ok { + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": v.(string), + }, + ) + } + filters, filtersOk := d.GetOk("filter") tags, tagsOk := d.GetOk("tags") - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": d.Get("vpc_id").(string), - }, - ) - if tagsOk { req.Filters = append(req.Filters, buildEC2TagFilterList( tagsFromMap(tags.(map[string]interface{})), From 742357c2701fd4d63e4a6d7e030f7c27e6ea98d5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 14:42:51 -0400 Subject: [PATCH 1621/3316] resource/aws_waf_ipset: Support resource import --- aws/resource_aws_waf_ipset.go | 3 +++ aws/resource_aws_waf_ipset_test.go | 5 +++++ website/docs/r/waf_ipset.html.markdown | 12 +++++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_waf_ipset.go b/aws/resource_aws_waf_ipset.go index 39a744d1a59..e1e2746bf7e 100644 --- a/aws/resource_aws_waf_ipset.go +++ b/aws/resource_aws_waf_ipset.go @@ -17,6 +17,9 @@ func resourceAwsWafIPSet() *schema.Resource { Read: resourceAwsWafIPSetRead, Update: resourceAwsWafIPSetUpdate, Delete: resourceAwsWafIPSetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{ diff --git a/aws/resource_aws_waf_ipset_test.go b/aws/resource_aws_waf_ipset_test.go index df6175106af..de7b56aaded 100644 --- a/aws/resource_aws_waf_ipset_test.go +++ b/aws/resource_aws_waf_ipset_test.go @@ -38,6 +38,11 @@ func TestAccAWSWafIPSet_basic(t *testing.T) { regexp.MustCompile(`^arn:[\w-]+:waf::\d{12}:ipset/.+$`)), ), }, + { + ResourceName: "aws_waf_ipset.ipset", + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/website/docs/r/waf_ipset.html.markdown b/website/docs/r/waf_ipset.html.markdown index 87b5f105feb..3b508d34d02 100644 --- a/website/docs/r/waf_ipset.html.markdown +++ b/website/docs/r/waf_ipset.html.markdown @@ -45,11 +45,17 @@ The following arguments are supported: * `value` - (Required) An IPv4 or IPv6 address specified via CIDR notation. e.g. `192.0.2.44/32` or `1111:0000:0000:0000:0000:0000:0000:0000/64` -## Remarks - ## Attributes Reference In addition to all arguments above, the following attributes are exported: * `id` - The ID of the WAF IPSet. -* `arn` - The ARN of the WAF IPSet. \ No newline at end of file +* `arn` - The ARN of the WAF IPSet. + +## Import + +WAF IPSets can be imported using their ID, e.g. + +``` +$ terraform import aws_waf_ipset.example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc +``` From 8be34c11930aa1bffc26b409f30e87192297b26a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 25 Jun 2018 15:42:16 -0400 Subject: [PATCH 1622/3316] Update CHANGELOG for #4979 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f170e9e6686..52dc1853960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ENHANCEMENTS: * resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers [GH-4956] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] * resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` [GH-2514] +* resource/aws_waf_ipset: Support resource import [GH-4979] * resource/aws_wafregional_web_acl: Add rule `type` argument (support rate limited rules) [GH-4307] / [GH-4978] BUG FIXES: From e1b2ab9ff1eb1b5b51c1ab35cc04766fbf50e5c0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 08:56:17 -0400 Subject: [PATCH 1623/3316] data-source/aws_network_acls: Use resource.UniqueId() for resource ID instead of vpc_id, refactor testing for parallelism --- aws/data_source_aws_network_acls.go | 6 +- aws/data_source_aws_network_acls_test.go | 183 ++++++++++++---------- website/docs/d/network_acls.html.markdown | 2 +- 3 files changed, 106 insertions(+), 85 deletions(-) diff --git a/aws/data_source_aws_network_acls.go b/aws/data_source_aws_network_acls.go index 88454f894a0..bd99ed18a65 100644 --- a/aws/data_source_aws_network_acls.go +++ b/aws/data_source_aws_network_acls.go @@ -1,11 +1,13 @@ package aws import ( + "errors" "fmt" "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -72,7 +74,7 @@ func dataSourceAwsNetworkAclsRead(d *schema.ResourceData, meta interface{}) erro } if resp == nil || len(resp.NetworkAcls) == 0 { - return fmt.Errorf("no matching network ACL found for vpc with id %s", d.Get("vpc_id").(string)) + return errors.New("no matching network ACLs found") } networkAcls := make([]string, 0) @@ -81,7 +83,7 @@ func dataSourceAwsNetworkAclsRead(d *schema.ResourceData, meta interface{}) erro networkAcls = append(networkAcls, aws.StringValue(networkAcl.NetworkAclId)) } - d.SetId(d.Get("vpc_id").(string)) + d.SetId(resource.UniqueId()) if err := d.Set("ids", networkAcls); err != nil { return fmt.Errorf("Error setting network ACL ids: %s", err) } diff --git a/aws/data_source_aws_network_acls_test.go b/aws/data_source_aws_network_acls_test.go index 1ef2c72e419..3aae0175291 100644 --- a/aws/data_source_aws_network_acls_test.go +++ b/aws/data_source_aws_network_acls_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/hashicorp/terraform/helper/acctest" @@ -16,107 +17,125 @@ func TestAccDataSourceAwsNetworkAcls_basic(t *testing.T) { CheckDestroy: testAccCheckVpcDestroy, Steps: []resource.TestStep{ { - Config: testAccDataSourceAwsNetworkAclsConfig(rName), + // Ensure at least 1 network ACL exists. We cannot use depends_on. + Config: testAccDataSourceAwsNetworkAclsConfig_Base(rName), }, { - Config: testAccDataSourceAwsNetworkAclsConfigWithDataSource(rName), + Config: testAccDataSourceAwsNetworkAclsConfig_basic(rName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_network_acls.all", "ids.#", "3"), - resource.TestCheckResourceAttr("data.aws_network_acls.with_tags", "ids.#", "2"), - resource.TestCheckResourceAttr("data.aws_network_acls.with_filter", "ids.#", "1"), + // At least 1 + resource.TestMatchResourceAttr("data.aws_network_acls.test", "ids.#", regexp.MustCompile(`^[1-9][0-9]*`)), ), }, }, }) } -func testAccDataSourceAwsNetworkAclsConfigWithDataSource(rName string) string { - return fmt.Sprintf(` - resource "aws_vpc" "test-vpc" { - cidr_block = "10.0.0.0/16" - } - - resource "aws_network_acl" "acl1" { - vpc_id = "${aws_vpc.test-vpc.id}" - - tags { - Name = "testacc-acl-%s" - } - } - - resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.test-vpc.id}" - cidr_block = "10.0.0.0/24" - availability_zone = "us-west-2a" - - tags { - Name = "tf-acc-subnet" - } - } - - resource "aws_network_acl" "acl2" { - vpc_id = "${aws_vpc.test-vpc.id}" - subnet_ids = ["${aws_subnet.test.id}"] - - tags { - Name = "testacc-acl-%s" - } - } - - data "aws_network_acls" "all" { - vpc_id = "${aws_vpc.test-vpc.id}" - } +func TestAccDataSourceAwsNetworkAcls_Filter(t *testing.T) { + rName := acctest.RandString(5) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsNetworkAclsConfig_Filter(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_network_acls.test", "ids.#", "1"), + ), + }, + }, + }) +} - data "aws_network_acls" "with_tags" { - vpc_id = "${aws_vpc.test-vpc.id}" +func TestAccDataSourceAwsNetworkAcls_Tags(t *testing.T) { + rName := acctest.RandString(5) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsNetworkAclsConfig_Tags(rName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_network_acls.test", "ids.#", "2"), + ), + }, + }, + }) +} - tags { - Name = "testacc-acl-%s" - } - } +func TestAccDataSourceAwsNetworkAcls_VpcID(t *testing.T) { + rName := acctest.RandString(5) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsNetworkAclsConfig_VpcID(rName), + Check: resource.ComposeTestCheckFunc( + // The VPC will have a default network ACL + resource.TestCheckResourceAttr("data.aws_network_acls.test", "ids.#", "3"), + ), + }, + }, + }) +} - data "aws_network_acls" "with_filter" { - vpc_id = "${aws_vpc.test-vpc.id}" +func testAccDataSourceAwsNetworkAclsConfig_Base(rName string) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" - filter { - name = "association.subnet-id" - values = ["${aws_subnet.test.id}"] - } - } - `, rName, rName, rName) + tags { + Name = "testacc-acl-%s" + } } -func testAccDataSourceAwsNetworkAclsConfig(rName string) string { - return fmt.Sprintf(` - resource "aws_vpc" "test-vpc" { - cidr_block = "10.0.0.0/16" - } +resource "aws_network_acl" "acl" { + count = 2 - resource "aws_network_acl" "acl1" { - vpc_id = "${aws_vpc.test-vpc.id}" + vpc_id = "${aws_vpc.test.id}" - tags { - Name = "testacc-acl-%s" - } - } + tags { + Name = "testacc-acl-%s" + } +} +`, rName, rName) +} - resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.test-vpc.id}" - cidr_block = "10.0.0.0/24" - availability_zone = "us-west-2a" +func testAccDataSourceAwsNetworkAclsConfig_basic(rName string) string { + return testAccDataSourceAwsNetworkAclsConfig_Base(rName) + ` +data "aws_network_acls" "test" {} +` +} - tags { - Name = "tf-acc-subnet" - } - } +func testAccDataSourceAwsNetworkAclsConfig_Filter(rName string) string { + return testAccDataSourceAwsNetworkAclsConfig_Base(rName) + ` +data "aws_network_acls" "test" { + filter { + name = "network-acl-id" + values = ["${aws_network_acl.acl.0.id}"] + } +} +` +} - resource "aws_network_acl" "acl2" { - vpc_id = "${aws_vpc.test-vpc.id}" - subnet_ids = ["${aws_subnet.test.id}"] +func testAccDataSourceAwsNetworkAclsConfig_Tags(rName string) string { + return testAccDataSourceAwsNetworkAclsConfig_Base(rName) + ` +data "aws_network_acls" "test" { + tags { + Name = "${aws_network_acl.acl.0.tags.Name}" + } +} +` +} - tags { - Name = "testacc-acl-%s" - } - } - `, rName, rName) +func testAccDataSourceAwsNetworkAclsConfig_VpcID(rName string) string { + return testAccDataSourceAwsNetworkAclsConfig_Base(rName) + ` +data "aws_network_acls" "test" { + vpc_id = "${aws_network_acl.acl.0.vpc_id}" +} +` } diff --git a/website/docs/d/network_acls.html.markdown b/website/docs/d/network_acls.html.markdown index c4b9efe22d5..54ff69ed35c 100644 --- a/website/docs/d/network_acls.html.markdown +++ b/website/docs/d/network_acls.html.markdown @@ -49,7 +49,7 @@ data "aws_network_acls" "example" { ## Argument Reference -* `vpc_id` - (Required) The VPC ID that you want to filter from. +* `vpc_id` - (Optional) The VPC ID that you want to filter from. * `tags` - (Optional) A mapping of tags, each pair of which must exactly match a pair on the desired network ACLs. From 833dd138d18b4e41666390e3403d28fc4e75d97c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 09:04:30 -0400 Subject: [PATCH 1624/3316] Update CHANGELOG for #4966 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52dc1853960..14c348096b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_codecommit_repository` [GH-4934] +* **New Data Source:** `aws_network_acls` [GH-4966] * **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] * **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` [GH-3255] * **New Resource:** `aws_dx_hosted_public_virtual_interface` [GH-3254] From aca44f4677fc6b8d4bf1b94bf4430a0abd091b39 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 09:54:31 -0400 Subject: [PATCH 1625/3316] resource/aws_ecs_service: Additional handling to support DAEMON scheduling strategy --- aws/resource_aws_ecs_service.go | 30 ++++++++++++++++++------ aws/resource_aws_ecs_service_test.go | 1 - website/docs/r/ecs_service.html.markdown | 5 ++-- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 5df81ad34ff..228b36d6f63 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -51,6 +51,12 @@ func resourceAwsEcsService() *schema.Resource { "desired_count": { Type: schema.TypeInt, Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + return true + } + return false + }, }, "health_check_grace_period_seconds": { @@ -88,12 +94,24 @@ func resourceAwsEcsService() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 200, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + return true + } + return false + }, }, "deployment_minimum_healthy_percent": { Type: schema.TypeInt, Optional: true, Default: 100, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + return true + } + return false + }, }, "load_balancer": { @@ -335,7 +353,8 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error schedulingStrategy := d.Get("scheduling_strategy").(string) input.SchedulingStrategy = aws.String(schedulingStrategy) if schedulingStrategy == ecs.SchedulingStrategyDaemon { - // unset desired count if DAEMON + // unset these if DAEMON + input.DeploymentConfiguration = nil input.DesiredCount = nil } @@ -508,10 +527,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { } d.Set("scheduling_strategy", service.SchedulingStrategy) - // Automatically ignore desired count if DAEMON - if *service.SchedulingStrategy != ecs.SchedulingStrategyDaemon { - d.Set("desired_count", service.DesiredCount) - } + d.Set("desired_count", service.DesiredCount) d.Set("health_check_grace_period_seconds", service.HealthCheckGracePeriodSeconds) d.Set("launch_type", service.LaunchType) @@ -746,7 +762,7 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error input.TaskDefinition = aws.String(n.(string)) } - if d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent") { + if schedulingStrategy != ecs.SchedulingStrategyDaemon && (d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent")) { input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), @@ -805,7 +821,7 @@ func resourceAwsEcsServiceDelete(d *schema.ResourceData, meta interface{}) error } // Drain the ECS service - if *resp.Services[0].Status != "DRAINING" { + if *resp.Services[0].Status != "DRAINING" && aws.StringValue(resp.Services[0].SchedulingStrategy) != ecs.SchedulingStrategyDaemon { log.Printf("[DEBUG] Draining ECS service %s", d.Id()) _, err = conn.UpdateService(&ecs.UpdateServiceInput{ Service: aws.String(d.Id()), diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index e95b2f7307d..92179182ad0 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -2030,7 +2030,6 @@ resource "aws_ecs_service" "ghost" { cluster = "${aws_ecs_cluster.default.id}" task_definition = "${aws_ecs_task_definition.ghost.family}:${aws_ecs_task_definition.ghost.revision}" scheduling_strategy = "DAEMON" - deployment_maximum_percent = 100 } `, clusterName, tdName, svcName) } diff --git a/website/docs/r/ecs_service.html.markdown b/website/docs/r/ecs_service.html.markdown index f1336692b23..a9ffefe97b2 100644 --- a/website/docs/r/ecs_service.html.markdown +++ b/website/docs/r/ecs_service.html.markdown @@ -69,7 +69,6 @@ resource "aws_ecs_service" "bar" { cluster = "${aws_ecs_cluster.foo.id}" task_definition = "${aws_ecs_task_definition.bar.arn}" scheduling_strategy = "DAEMON" - deployment_maximum_percent = 100 } ``` @@ -84,8 +83,8 @@ The following arguments are supported: * `scheduling_strategy` - (Optional) The scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Fargate tasks do not support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html). * `cluster` - (Optional) ARN of an ECS cluster * `iam_role` - (Optional) ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here. -* `deployment_maximum_percent` - (Optional) The upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. When using the `DAEMON` scheduling strategy, this should be set to 100. -* `deployment_minimum_healthy_percent` - (Optional) The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. +* `deployment_maximum_percent` - (Optional) The upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy. +* `deployment_minimum_healthy_percent` - (Optional) The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy. * `placement_strategy` - (Optional) **Deprecated**, use `ordered_placement_strategy` instead. * `ordered_placement_strategy` - (Optional) Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of `ordered_placement_strategy` blocks is `5`. Defined below. * `health_check_grace_period_seconds` - (Optional) Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers. From 1665116e0617fb011b6cb299407f063ea3bd3cf3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 10:57:55 -0400 Subject: [PATCH 1626/3316] Update CHANGELOG for #4825 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14c348096b9..2bd838087e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: * provider: Support custom endpoint for `autoscaling` [GH-4970] * resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type [GH-4960] * resource/aws_codebuild_project: Support resource import [GH-4976] +* resource/aws_ecs_service: Add `scheduling_strategy` argument (support `DAEMON` scheduling strategy) [GH-4825] * resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] * resource/aws_network_acl: Add full mapping of protocol names to protocol numbers [GH-4956] * resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers [GH-4956] From 3a75c4567a01abe63169d42fb3ca08dc2daeeea9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 11:28:45 -0400 Subject: [PATCH 1627/3316] resource/aws_instance: Ignore empty user_data SHA1 sum --- aws/resource_aws_instance.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index d51efefd223..0f0cb7c70f1 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -119,6 +119,14 @@ func resourceAwsInstance() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"user_data_base64"}, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Sometimes the EC2 API responds with the equivalent, empty SHA1 sum + // echo -n "" | shasum + if old == "da39a3ee5e6b4b0d3255bfef95601890afd80709" && new == "" { + return true + } + return false + }, StateFunc: func(v interface{}) string { switch v.(type) { case string: From b4cf044b39e06617826fa9e64c80bcc9a782ca35 Mon Sep 17 00:00:00 2001 From: Jesse Aukeman Date: Tue, 26 Jun 2018 11:33:03 -0400 Subject: [PATCH 1628/3316] Renamed data source from aws_route_table_ids to aws_route_tables. Renamed the files and functions to match. --- ...e_aws_route_table_ids.go => data_source_aws_route_tables.go} | 2 +- ...e_table_ids_test.go => data_source_aws_route_tables_test.go} | 0 aws/provider.go | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename aws/{data_source_aws_route_table_ids.go => data_source_aws_route_tables.go} (96%) rename aws/{data_source_aws_route_table_ids_test.go => data_source_aws_route_tables_test.go} (100%) diff --git a/aws/data_source_aws_route_table_ids.go b/aws/data_source_aws_route_tables.go similarity index 96% rename from aws/data_source_aws_route_table_ids.go rename to aws/data_source_aws_route_tables.go index 04a3fa7cf6e..831d420debb 100644 --- a/aws/data_source_aws_route_table_ids.go +++ b/aws/data_source_aws_route_tables.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func dataSourceAwsRouteTableIDs() *schema.Resource { +func dataSourceAwsRouteTables() *schema.Resource { return &schema.Resource{ Read: dataSourceAwsRouteTableIDsRead, Schema: map[string]*schema.Schema{ diff --git a/aws/data_source_aws_route_table_ids_test.go b/aws/data_source_aws_route_tables_test.go similarity index 100% rename from aws/data_source_aws_route_table_ids_test.go rename to aws/data_source_aws_route_tables_test.go diff --git a/aws/provider.go b/aws/provider.go index 561b2baaf3d..7a220b560f4 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -233,7 +233,7 @@ func Provider() terraform.ResourceProvider { "aws_region": dataSourceAwsRegion(), "aws_route": dataSourceAwsRoute(), "aws_route_table": dataSourceAwsRouteTable(), - "aws_route_table_ids": dataSourceAwsRouteTableIDs(), + "aws_route_tables": dataSourceAwsRouteTables(), "aws_route53_zone": dataSourceAwsRoute53Zone(), "aws_s3_bucket": dataSourceAwsS3Bucket(), "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), From 1eeea372b27c17d5d8f7154d50f38654d2468e56 Mon Sep 17 00:00:00 2001 From: Jesse Aukeman Date: Tue, 26 Jun 2018 12:25:29 -0400 Subject: [PATCH 1629/3316] - Update naming references consistent for aws_route_tables (rather than aws_route_table_ids). - Change vpc_id to be optional rather than required attribute. - Update to use aws.StringValue helper rather than directly dereferencing routeTable.RouteTableId - Add check for error when using d.Set with aggregate type. --- aws/data_source_aws_route_tables.go | 28 +++++++++------ aws/data_source_aws_route_tables_test.go | 34 +++++++++---------- ...ml.markdown => route_tables.html.markdown} | 22 ++++++------ 3 files changed, 44 insertions(+), 40 deletions(-) rename website/docs/d/{route_table_ids.html.markdown => route_tables.html.markdown} (53%) diff --git a/aws/data_source_aws_route_tables.go b/aws/data_source_aws_route_tables.go index 831d420debb..2864ae5ac76 100644 --- a/aws/data_source_aws_route_tables.go +++ b/aws/data_source_aws_route_tables.go @@ -4,20 +4,22 @@ import ( "fmt" "log" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) func dataSourceAwsRouteTables() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsRouteTableIDsRead, + Read: dataSourceAwsRouteTablesRead, Schema: map[string]*schema.Schema{ "tags": tagsSchemaComputed(), "vpc_id": { Type: schema.TypeString, - Required: true, + Optional: true, }, "ids": { @@ -30,16 +32,18 @@ func dataSourceAwsRouteTables() *schema.Resource { } } -func dataSourceAwsRouteTableIDsRead(d *schema.ResourceData, meta interface{}) error { +func dataSourceAwsRouteTablesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn req := &ec2.DescribeRouteTablesInput{} - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": d.Get("vpc_id").(string), - }, - ) + if v, ok := d.GetOk("vpc_id"); ok { + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": v.(string), + }, + ) + } req.Filters = append(req.Filters, buildEC2TagFilterList( tagsFromMap(d.Get("tags").(map[string]interface{})), @@ -58,11 +62,13 @@ func dataSourceAwsRouteTableIDsRead(d *schema.ResourceData, meta interface{}) er routeTables := make([]string, 0) for _, routeTable := range resp.RouteTables { - routeTables = append(routeTables, *routeTable.RouteTableId) + routeTables = append(routeTables, aws.StringValue(routeTable.RouteTableId)) } - d.SetId(d.Get("vpc_id").(string)) - d.Set("ids", routeTables) + d.SetId(resource.UniqueId()) + if err = d.Set("ids", routeTables); err != nil { + return fmt.Errorf("error setting ids: %s", err) + } return nil } diff --git a/aws/data_source_aws_route_tables_test.go b/aws/data_source_aws_route_tables_test.go index 0a9440ea627..802f48ff01b 100644 --- a/aws/data_source_aws_route_tables_test.go +++ b/aws/data_source_aws_route_tables_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" ) -func TestAccDataSourceAwsRouteTableIDs(t *testing.T) { +func TestAccDataSourceAwsRouteTables(t *testing.T) { rInt := acctest.RandIntRange(0, 256) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -16,26 +16,26 @@ func TestAccDataSourceAwsRouteTableIDs(t *testing.T) { CheckDestroy: testAccCheckVpcDestroy, Steps: []resource.TestStep{ { - Config: testAccDataSourceAwsRouteTableIDsConfig(rInt), + Config: testAccDataSourceAwsRouteTablesConfig(rInt), }, { - Config: testAccDataSourceAwsRouteTableIDsConfigWithDataSource(rInt), + Config: testAccDataSourceAwsRouteTablesConfigWithDataSource(rInt), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_route_table_ids.selected", "ids.#", "3"), - resource.TestCheckResourceAttr("data.aws_route_table_ids.private", "ids.#", "2"), + resource.TestCheckResourceAttr("data.aws_route_tables.selected", "ids.#", "3"), + resource.TestCheckResourceAttr("data.aws_route_tables.private", "ids.#", "2"), ), }, }, }) } -func testAccDataSourceAwsRouteTableIDsConfigWithDataSource(rInt int) string { +func testAccDataSourceAwsRouteTablesConfigWithDataSource(rInt int) string { return fmt.Sprintf(` resource "aws_vpc" "test" { cidr_block = "172.%d.0.0/16" tags { - Name = "terraform-testacc-route-table-ids-data-source" + Name = "terraform-testacc-route-tables-data-source" } } @@ -43,7 +43,7 @@ resource "aws_route_table" "test_public_a" { vpc_id = "${aws_vpc.test.id}" tags { - Name = "tf-acc-route-table-ids-data-source-public-a" + Name = "tf-acc-route-tables-data-source-public-a" Tier = "Public" } } @@ -52,7 +52,7 @@ resource "aws_route_table" "test_private_a" { vpc_id = "${aws_vpc.test.id}" tags { - Name = "tf-acc-route-table-ids-data-source-private-a" + Name = "tf-acc-route-tables-data-source-private-a" Tier = "Private" } } @@ -61,16 +61,16 @@ resource "aws_route_table" "test_private_b" { vpc_id = "${aws_vpc.test.id}" tags { - Name = "tf-acc-route-table-ids-data-source-private-b" + Name = "tf-acc-route-tables-data-source-private-b" Tier = "Private" } } -data "aws_route_table_ids" "selected" { +data "aws_route_tables" "selected" { vpc_id = "${aws_vpc.test.id}" } -data "aws_route_table_ids" "private" { +data "aws_route_tables" "private" { vpc_id = "${aws_vpc.test.id}" tags { Tier = "Private" @@ -79,13 +79,13 @@ data "aws_route_table_ids" "private" { `, rInt) } -func testAccDataSourceAwsRouteTableIDsConfig(rInt int) string { +func testAccDataSourceAwsRouteTablesConfig(rInt int) string { return fmt.Sprintf(` resource "aws_vpc" "test" { cidr_block = "172.%d.0.0/16" tags { - Name = "terraform-testacc-route-table-ids-data-source" + Name = "terraform-testacc-route-tables-data-source" } } @@ -93,7 +93,7 @@ resource "aws_route_table" "test_public_a" { vpc_id = "${aws_vpc.test.id}" tags { - Name = "tf-acc-route-table-ids-data-source-public-a" + Name = "tf-acc-route-tables-data-source-public-a" Tier = "Public" } } @@ -102,7 +102,7 @@ resource "aws_route_table" "test_private_a" { vpc_id = "${aws_vpc.test.id}" tags { - Name = "tf-acc-route-table-ids-data-source-private-a" + Name = "tf-acc-route-tables-data-source-private-a" Tier = "Private" } } @@ -111,7 +111,7 @@ resource "aws_route_table" "test_private_b" { vpc_id = "${aws_vpc.test.id}" tags { - Name = "tf-acc-route-table-ids-data-source-private-b" + Name = "tf-acc-route-tables-data-source-private-b" Tier = "Private" } } diff --git a/website/docs/d/route_table_ids.html.markdown b/website/docs/d/route_tables.html.markdown similarity index 53% rename from website/docs/d/route_table_ids.html.markdown rename to website/docs/d/route_tables.html.markdown index 5f3f7c1bae4..7456017b91c 100644 --- a/website/docs/d/route_table_ids.html.markdown +++ b/website/docs/d/route_tables.html.markdown @@ -1,31 +1,29 @@ --- layout: "aws" -page_title: "AWS: aws_route_table_ids" -sidebar_current: "docs-aws-datasource-route-table-ids" +page_title: "AWS: aws_route_tables" +sidebar_current: "docs-aws-datasource-route-tables" description: |- - Provides a list of route table Ids for a VPC + Get information on Amazon route tables. --- -# Data Source: aws_route_table_ids +# Data Source: aws_route_tables -`aws_route_table_ids` provides a list of ids for a vpc_id - -This resource can be useful for getting back a list of route table ids for a vpc. +This resource can be useful for getting back a list of route table ids to be referenced elsewhere. ## Example Usage The following adds a route for a particular cidr block to every route table -in the vpc to use a particular vpc peering connection. +in a specified vpc to use a particular vpc peering connection. ```hcl -data "aws_route_table_ids" "rts" { +data "aws_route_tables" "rts" { vpc_id = "${var.vpc_id}" } resource "aws_route" "r" { - count = "${length(data.aws_route_table_ids.rts.ids)}" - route_table_id = "${data.aws_route_table_ids.rts.ids[count.index]}" + count = "${length(data.aws_route_tables.rts.ids)}" + route_table_id = "${data.aws_route_tables.rts.ids[count.index]}" destination_cidr_block = "10.0.1.0/22" vpc_peering_connection_id = "pcx-0e9a7a9ecd137dc54" } @@ -34,7 +32,7 @@ resource "aws_route" "r" { ## Argument Reference -* `vpc_id` - (Required) The VPC ID that you want to filter from. +* `vpc_id` - (Optional) The VPC ID that you want to filter from. * `tags` - (Optional) A mapping of tags, each pair of which must exactly match a pair on the desired route tables. From 3a14da706936d77088fcb40134fc4c381a690d04 Mon Sep 17 00:00:00 2001 From: Francesco Laurita Date: Tue, 26 Jun 2018 09:19:21 -0700 Subject: [PATCH 1630/3316] Adding support for cluster engine upgrade --- aws/resource_aws_rds_cluster.go | 15 ++++- aws/resource_aws_rds_cluster_instance.go | 2 +- aws/resource_aws_rds_cluster_test.go | 76 +++++++++++++++++++++++- 3 files changed, 89 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index e407d6b8571..f3c0147f2b7 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -119,7 +119,7 @@ func resourceAwsRDSCluster() *schema.Resource { "engine_version": { Type: schema.TypeString, Optional: true, - ForceNew: true, + ForceNew: false, Computed: true, }, @@ -163,7 +163,7 @@ func resourceAwsRDSCluster() *schema.Resource { "source_engine_version": { Type: schema.TypeString, Required: true, - ForceNew: true, + ForceNew: false, }, }, }, @@ -901,6 +901,11 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("engine_version") { + req.EngineVersion = aws.String(d.Get("engine_version").(string)) + requestUpdate = true + } + if d.HasChange("vpc_security_group_ids") { if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { req.VpcSecurityGroupIds = expandStringList(attr.List()) @@ -949,6 +954,11 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { return resource.RetryableError(err) } + + if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "Cannot modify engine version without a primary instance in DB cluster") { + return resource.NonRetryableError(err) + } + if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "") { return resource.RetryableError(err) } @@ -1162,4 +1172,5 @@ var resourceAwsRdsClusterUpdatePendingStates = []string{ "backing-up", "modifying", "resetting-master-credentials", + "upgrading", } diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index 6825b3f4095..e66bb495e69 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -97,7 +97,7 @@ func resourceAwsRDSClusterInstance() *schema.Resource { "engine_version": { Type: schema.TypeString, Optional: true, - ForceNew: true, + ForceNew: false, Computed: true, }, diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index c7f3fbe4970..db5856248c0 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -420,7 +420,41 @@ func TestAccAWSRDSCluster_EngineVersion(t *testing.T) { CheckDestroy: testAccCheckAWSClusterDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSClusterConfig_EngineVersion(rInt, "aurora-postgresql", "9.6.6"), + Config: testAccAWSClusterConfig_EngineVersion(rInt, "aurora-postgresql", "9.6.3"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "engine", "aurora-postgresql"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "9.6.3"), + ), + }, + { + Config: testAccAWSClusterConfig_EngineVersion(rInt, "aurora-postgresql", "9.6.6"), + ExpectError: regexp.MustCompile(`Cannot modify engine version without a primary instance in DB cluster`), + }, + }, + }) +} + +func TestAccAWSRDSCluster_EngineVersionWithPrimaryInstance(t *testing.T) { + var dbCluster rds.DBCluster + rInt := acctest.RandInt() + resourceName := "aws_rds_cluster.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSClusterConfig_EngineVersionWithPrimaryInstance(rInt, "aurora-postgresql", "9.6.3"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "engine", "aurora-postgresql"), + resource.TestCheckResourceAttr(resourceName, "engine_version", "9.6.3"), + ), + }, + { + Config: testAccAWSClusterConfig_EngineVersionWithPrimaryInstance(rInt, "aurora-postgresql", "9.6.6"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSClusterExists(resourceName, &dbCluster), resource.TestCheckResourceAttr(resourceName, "engine", "aurora-postgresql"), @@ -995,8 +1029,48 @@ resource "aws_rds_cluster" "test" { engine = "%s" engine_version = "%s" master_password = "mustbeeightcharaters" + master_username = "foo" + skip_final_snapshot = true + apply_immediately = true +}`, rInt, engine, engineVersion) +} + +func testAccAWSClusterConfig_EngineVersionWithPrimaryInstance(rInt int, engine, engineVersion string) string { + return fmt.Sprintf(` + +data "aws_availability_zones" "available" {} + +variable "cluster_identifier" { + default = "tf-acc-test-%d" +} + +variable "engine" { + default = "%s" +} + +variable "engine_version" { + default = "%s" +} + +resource "aws_rds_cluster" "test" { + availability_zones = ["${data.aws_availability_zones.available.names}"] + cluster_identifier = "${var.cluster_identifier}" + database_name = "mydb" + db_cluster_parameter_group_name = "default.aurora-postgresql9.6" + engine = "${var.engine}" + engine_version = "${var.engine_version}" + master_password = "mustbeeightcharaters" master_username = "foo" skip_final_snapshot = true + apply_immediately = true +} + +resource "aws_rds_cluster_instance" "test" { + identifier = "${var.cluster_identifier}" + cluster_identifier = "${aws_rds_cluster.test.cluster_identifier}" + engine = "${var.engine}" + engine_version = "${var.engine_version}" + instance_class = "db.r4.large" }`, rInt, engine, engineVersion) } From 43ea4382d43a8918fb44cc9179ab2e3fb9b5b2b5 Mon Sep 17 00:00:00 2001 From: Jesse Aukeman Date: Tue, 26 Jun 2018 13:42:28 -0400 Subject: [PATCH 1631/3316] Updated and fixed test cases --- aws/data_source_aws_route_tables_test.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/aws/data_source_aws_route_tables_test.go b/aws/data_source_aws_route_tables_test.go index 802f48ff01b..7843157a44b 100644 --- a/aws/data_source_aws_route_tables_test.go +++ b/aws/data_source_aws_route_tables_test.go @@ -21,8 +21,9 @@ func TestAccDataSourceAwsRouteTables(t *testing.T) { { Config: testAccDataSourceAwsRouteTablesConfigWithDataSource(rInt), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_route_tables.selected", "ids.#", "3"), + resource.TestCheckResourceAttr("data.aws_route_tables.test", "ids.#", "4"), resource.TestCheckResourceAttr("data.aws_route_tables.private", "ids.#", "2"), + resource.TestCheckResourceAttr("data.aws_route_tables.test2", "ids.#", "1"), ), }, }, @@ -39,6 +40,14 @@ resource "aws_vpc" "test" { } } +resource "aws_vpc" "test2" { + cidr_block = "172.%d.0.0/16" + + tags { + Name = "terraform-test2acc-route-tables-data-source" + } +} + resource "aws_route_table" "test_public_a" { vpc_id = "${aws_vpc.test.id}" @@ -66,17 +75,21 @@ resource "aws_route_table" "test_private_b" { } } -data "aws_route_tables" "selected" { +data "aws_route_tables" "test" { vpc_id = "${aws_vpc.test.id}" } +data "aws_route_tables" "test2" { + vpc_id = "${aws_vpc.test2.id}" +} + data "aws_route_tables" "private" { vpc_id = "${aws_vpc.test.id}" tags { Tier = "Private" } } -`, rInt) +`, rInt, rInt) } func testAccDataSourceAwsRouteTablesConfig(rInt int) string { From 8fefd68bade5576185c2fdc072f3b41ef46083e4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 13:59:17 -0400 Subject: [PATCH 1632/3316] New Data Source: aws_dx_gateway --- aws/data_source_aws_dx_gateway.go | 66 +++++++++++++++++++++++++ aws/data_source_aws_dx_gateway_test.go | 58 ++++++++++++++++++++++ aws/provider.go | 1 + website/aws.erb | 3 ++ website/docs/d/dx_gateway.html.markdown | 28 +++++++++++ 5 files changed, 156 insertions(+) create mode 100644 aws/data_source_aws_dx_gateway.go create mode 100644 aws/data_source_aws_dx_gateway_test.go create mode 100644 website/docs/d/dx_gateway.html.markdown diff --git a/aws/data_source_aws_dx_gateway.go b/aws/data_source_aws_dx_gateway.go new file mode 100644 index 00000000000..f80025c9e3a --- /dev/null +++ b/aws/data_source_aws_dx_gateway.go @@ -0,0 +1,66 @@ +package aws + +import ( + "fmt" + "strconv" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsDxGateway() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsDxGatewayRead, + + Schema: map[string]*schema.Schema{ + "amazon_side_asn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func dataSourceAwsDxGatewayRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + name := d.Get("name").(string) + + gateways := make([]*directconnect.Gateway, 0) + // DescribeDirectConnectGatewaysInput does not have a name parameter for filtering + input := &directconnect.DescribeDirectConnectGatewaysInput{} + for { + output, err := conn.DescribeDirectConnectGateways(input) + if err != nil { + return fmt.Errorf("error reading Direct Connect Gateway: %s", err) + } + for _, gateway := range output.DirectConnectGateways { + if aws.StringValue(gateway.DirectConnectGatewayName) == name { + gateways = append(gateways, gateway) + } + } + if output.NextToken == nil { + break + } + input.NextToken = output.NextToken + } + + if len(gateways) == 0 { + return fmt.Errorf("Direct Connect Gateway not found for name: %s", name) + } + + if len(gateways) > 1 { + return fmt.Errorf("Multiple Direct Connect Gateways found for name: %s", name) + } + + gateway := gateways[0] + + d.SetId(aws.StringValue(gateway.DirectConnectGatewayId)) + d.Set("amazon_side_asn", strconv.FormatInt(aws.Int64Value(gateway.AmazonSideAsn), 10)) + + return nil +} diff --git a/aws/data_source_aws_dx_gateway_test.go b/aws/data_source_aws_dx_gateway_test.go new file mode 100644 index 00000000000..1521fac9e44 --- /dev/null +++ b/aws/data_source_aws_dx_gateway_test.go @@ -0,0 +1,58 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccDataSourceAwsDxGateway_Basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_dx_gateway.test" + datasourceName := "data.aws_dx_gateway.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsDxGatewayConfig_NonExistent, + ExpectError: regexp.MustCompile(`Direct Connect Gateway not found`), + }, + { + Config: testAccDataSourceAwsDxGatewayConfig_Name(rName, randIntRange(64512, 65534)), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(datasourceName, "amazon_side_asn", resourceName, "amazon_side_asn"), + resource.TestCheckResourceAttrPair(datasourceName, "id", resourceName, "id"), + resource.TestCheckResourceAttrPair(datasourceName, "name", resourceName, "name"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsDxGatewayConfig_Name(rName string, rBgpAsn int) string { + return fmt.Sprintf(` +resource "aws_dx_gateway" "wrong" { + amazon_side_asn = "%d" + name = "%s-wrong" +} +resource "aws_dx_gateway" "test" { + amazon_side_asn = "%d" + name = "%s" +} + +data "aws_dx_gateway" "test" { + name = "${aws_dx_gateway.test.name}" +} +`, rBgpAsn+1, rName, rBgpAsn, rName) +} + +const testAccDataSourceAwsDxGatewayConfig_NonExistent = ` +data "aws_dx_gateway" "test" { + name = "tf-acc-test-does-not-exist" +} +` diff --git a/aws/provider.go b/aws/provider.go index bf127acb5a0..d38b67e318a 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -182,6 +182,7 @@ func Provider() terraform.ResourceProvider { "aws_codecommit_repository": dataSourceAwsCodeCommitRepository(), "aws_db_instance": dataSourceAwsDbInstance(), "aws_db_snapshot": dataSourceAwsDbSnapshot(), + "aws_dx_gateway": dataSourceAwsDxGateway(), "aws_dynamodb_table": dataSourceAwsDynamoDbTable(), "aws_ebs_snapshot": dataSourceAwsEbsSnapshot(), "aws_ebs_snapshot_ids": dataSourceAwsEbsSnapshotIds(), diff --git a/website/aws.erb b/website/aws.erb index 13b4e176468..4446c7d26b6 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -115,6 +115,9 @@ > aws_db_snapshot + > + aws_dx_gateway + > aws_dynamodb_table diff --git a/website/docs/d/dx_gateway.html.markdown b/website/docs/d/dx_gateway.html.markdown new file mode 100644 index 00000000000..1ac9c34d397 --- /dev/null +++ b/website/docs/d/dx_gateway.html.markdown @@ -0,0 +1,28 @@ +--- +layout: "aws" +page_title: "AWS: aws_dx_gateway" +sidebar_current: "docs-aws-datasource-dx-gateway" +description: |- + Retrieve information about a Direct Connect Gateway +--- + +# Data Source: aws_dx_gateway + +Retrieve information about a Direct Connect Gateway. + +## Example Usage + +```hcl +data "aws_dx_gateway" "example" { + name = "example" +} +``` + +## Argument Reference + +* `name` - (Required) The name of the gateway to retrieve. + +## Attributes Reference + +* `amazon_side_asn` - The ASN on the Amazon side of the connection. +* `id` - The ID of the gateway. From ba7240d3c47ffaad8e28b508dfe6f6926a64a3a1 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Tue, 26 Jun 2018 22:04:34 +0400 Subject: [PATCH 1633/3316] removing optional schema reference --- aws/resource_aws_api_gateway_account.go | 8 ++++---- aws/resource_aws_api_gateway_api_key.go | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_api_gateway_account.go b/aws/resource_aws_api_gateway_account.go index 45408362701..29365633b2a 100644 --- a/aws/resource_aws_api_gateway_account.go +++ b/aws/resource_aws_api_gateway_account.go @@ -22,21 +22,21 @@ func resourceAwsApiGatewayAccount() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "cloudwatch_role_arn": &schema.Schema{ + "cloudwatch_role_arn": { Type: schema.TypeString, Optional: true, }, - "throttle_settings": &schema.Schema{ + "throttle_settings": { Type: schema.TypeList, Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "burst_limit": &schema.Schema{ + "burst_limit": { Type: schema.TypeInt, Computed: true, }, - "rate_limit": &schema.Schema{ + "rate_limit": { Type: schema.TypeFloat, Computed: true, }, diff --git a/aws/resource_aws_api_gateway_api_key.go b/aws/resource_aws_api_gateway_api_key.go index ec8b151a646..7748a74ec7f 100644 --- a/aws/resource_aws_api_gateway_api_key.go +++ b/aws/resource_aws_api_gateway_api_key.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -98,7 +97,7 @@ func resourceAwsApiGatewayApiKeyCreate(d *schema.ResourceData, meta interface{}) return fmt.Errorf("Error creating API Gateway: %s", err) } - d.SetId(*apiKey.Id) + d.SetId(aws.StringValue(apiKey.Id)) return resourceAwsApiGatewayApiKeyRead(d, meta) } @@ -112,7 +111,7 @@ func resourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) e IncludeValue: aws.Bool(true), }) if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { log.Printf("[WARN] API Gateway API Key (%s) not found, removing from state", d.Id()) d.SetId("") return nil @@ -195,8 +194,10 @@ func resourceAwsApiGatewayApiKeyDelete(d *schema.ResourceData, meta interface{}) return nil } - if apigatewayErr, ok := err.(awserr.Error); ok && apigatewayErr.Code() == "NotFoundException" { - return nil + if err != nil { + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + return nil + } } return resource.NonRetryableError(err) From a1f11950dc34febea9361985267f4f0948c6c5bc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 14:17:41 -0400 Subject: [PATCH 1634/3316] Update CHANGELOG for #4841 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bd838087e5..fcb658c51a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Data Source:** `aws_codecommit_repository` [GH-4934] * **New Data Source:** `aws_network_acls` [GH-4966] +* **New Data Source:** `aws_route_tables` [GH-4841] * **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] * **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` [GH-3255] * **New Resource:** `aws_dx_hosted_public_virtual_interface` [GH-3254] From 744ff3719eabf5d3d1931f8258da95606734e548 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 14:19:43 -0400 Subject: [PATCH 1635/3316] data-source/aws_route_tables: Add sidebar link --- website/aws.erb | 5 ++++- website/docs/d/route_table.html.markdown | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/website/aws.erb b/website/aws.erb index 13b4e176468..27f4f7a1481 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -283,9 +283,12 @@ > aws_route53_zone - > + > aws_route_table + > + aws_route_tables + > aws_route diff --git a/website/docs/d/route_table.html.markdown b/website/docs/d/route_table.html.markdown index 6286932d27a..d439afd51b3 100644 --- a/website/docs/d/route_table.html.markdown +++ b/website/docs/d/route_table.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" page_title: "AWS: aws_route_table" -sidebar_current: "docs-aws-datasource-route-table" +sidebar_current: "docs-aws-datasource-route-table-x" description: |- Provides details about a specific Route Table --- From a569ee771568392a49a6fca28706483fa69b3270 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 15:03:25 -0400 Subject: [PATCH 1636/3316] Update CHANGELOG for #4988 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb658c51a8..c6795b81fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_codecommit_repository` [GH-4934] +* **New Data Source:** `aws_dx_gateway` [GH-4988] * **New Data Source:** `aws_network_acls` [GH-4966] * **New Data Source:** `aws_route_tables` [GH-4841] * **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] From cef6e7d212331a3a5171a0a9572fed64c9d3d46a Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 26 Jun 2018 15:38:09 -0400 Subject: [PATCH 1637/3316] govendor fetch github.com/aws/aws-sdk-go/...@v1.14.13 --- .../aws/aws-sdk-go/aws/client/client.go | 4 +- .../aws/aws-sdk-go/aws/client/logger.go | 102 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 12 + .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/acm/service.go | 6 +- .../aws/aws-sdk-go/service/acmpca/api.go | 399 ++- .../aws/aws-sdk-go/service/acmpca/doc.go | 14 +- .../aws/aws-sdk-go/service/acmpca/service.go | 6 +- .../aws-sdk-go/service/apigateway/service.go | 6 +- .../service/applicationautoscaling/service.go | 6 +- .../aws/aws-sdk-go/service/appsync/service.go | 6 +- .../aws/aws-sdk-go/service/athena/service.go | 6 +- .../aws-sdk-go/service/autoscaling/service.go | 6 +- .../aws/aws-sdk-go/service/batch/service.go | 6 +- .../aws/aws-sdk-go/service/budgets/service.go | 6 +- .../aws/aws-sdk-go/service/cloud9/service.go | 6 +- .../service/cloudformation/service.go | 6 +- .../aws-sdk-go/service/cloudfront/service.go | 6 +- .../aws-sdk-go/service/cloudhsmv2/service.go | 6 +- .../aws-sdk-go/service/cloudsearch/service.go | 6 +- .../aws-sdk-go/service/cloudtrail/service.go | 6 +- .../aws-sdk-go/service/cloudwatch/service.go | 6 +- .../service/cloudwatchevents/service.go | 6 +- .../service/cloudwatchlogs/service.go | 6 +- .../aws-sdk-go/service/codebuild/service.go | 6 +- .../aws-sdk-go/service/codecommit/service.go | 6 +- .../aws-sdk-go/service/codedeploy/service.go | 6 +- .../service/codepipeline/service.go | 6 +- .../service/cognitoidentity/service.go | 6 +- .../cognitoidentityprovider/service.go | 6 +- .../service/configservice/service.go | 6 +- .../databasemigrationservice/service.go | 6 +- .../aws/aws-sdk-go/service/dax/service.go | 6 +- .../aws-sdk-go/service/devicefarm/service.go | 6 +- .../service/directconnect/service.go | 6 +- .../service/directoryservice/service.go | 6 +- .../aws-sdk-go/service/dynamodb/service.go | 6 +- .../aws/aws-sdk-go/service/ec2/service.go | 6 +- .../aws/aws-sdk-go/service/ecr/service.go | 6 +- .../aws/aws-sdk-go/service/ecs/service.go | 6 +- .../aws/aws-sdk-go/service/efs/service.go | 6 +- .../aws/aws-sdk-go/service/eks/service.go | 6 +- .../aws-sdk-go/service/elasticache/service.go | 6 +- .../service/elasticbeanstalk/service.go | 6 +- .../service/elasticsearchservice/service.go | 6 +- .../service/elastictranscoder/service.go | 6 +- .../aws/aws-sdk-go/service/elb/service.go | 6 +- .../aws/aws-sdk-go/service/elbv2/service.go | 6 +- .../aws/aws-sdk-go/service/emr/service.go | 6 +- .../aws-sdk-go/service/firehose/service.go | 6 +- .../aws/aws-sdk-go/service/fms/service.go | 6 +- .../aws-sdk-go/service/gamelift/service.go | 6 +- .../aws/aws-sdk-go/service/glacier/service.go | 6 +- .../aws/aws-sdk-go/service/glue/service.go | 6 +- .../aws-sdk-go/service/guardduty/service.go | 6 +- .../aws/aws-sdk-go/service/iam/service.go | 6 +- .../aws-sdk-go/service/inspector/service.go | 6 +- .../aws/aws-sdk-go/service/iot/service.go | 6 +- .../aws/aws-sdk-go/service/kinesis/service.go | 6 +- .../aws/aws-sdk-go/service/kms/service.go | 6 +- .../aws/aws-sdk-go/service/lambda/service.go | 6 +- .../lexmodelbuildingservice/service.go | 6 +- .../aws-sdk-go/service/lightsail/service.go | 6 +- .../service/mediaconvert/service.go | 6 +- .../aws/aws-sdk-go/service/medialive/api.go | 2192 ++++++++++++++++- .../aws-sdk-go/service/medialive/service.go | 6 +- .../service/mediapackage/service.go | 6 +- .../aws-sdk-go/service/mediastore/service.go | 6 +- .../service/mediastoredata/service.go | 6 +- .../aws/aws-sdk-go/service/mq/service.go | 6 +- .../aws/aws-sdk-go/service/neptune/api.go | 54 +- .../aws/aws-sdk-go/service/neptune/service.go | 6 +- .../aws-sdk-go/service/opsworks/service.go | 6 +- .../service/organizations/service.go | 6 +- .../aws/aws-sdk-go/service/rds/api.go | 71 + .../aws/aws-sdk-go/service/rds/service.go | 6 +- .../aws-sdk-go/service/redshift/service.go | 6 +- .../aws/aws-sdk-go/service/route53/service.go | 6 +- .../aws/aws-sdk-go/service/s3/api.go | 2 + .../aws/aws-sdk-go/service/s3/service.go | 6 +- .../aws-sdk-go/service/sagemaker/service.go | 6 +- .../service/secretsmanager/service.go | 6 +- .../service/servicecatalog/service.go | 6 +- .../service/servicediscovery/service.go | 6 +- .../aws/aws-sdk-go/service/ses/service.go | 6 +- .../aws/aws-sdk-go/service/sfn/service.go | 6 +- .../aws-sdk-go/service/simpledb/service.go | 6 +- .../aws/aws-sdk-go/service/sns/service.go | 6 +- .../aws/aws-sdk-go/service/sqs/service.go | 6 +- .../aws/aws-sdk-go/service/ssm/api.go | 51 + .../aws/aws-sdk-go/service/ssm/service.go | 6 +- .../aws/aws-sdk-go/service/sts/service.go | 6 +- .../aws/aws-sdk-go/service/swf/service.go | 6 +- .../aws/aws-sdk-go/service/waf/service.go | 6 +- .../aws-sdk-go/service/wafregional/service.go | 6 +- .../aws-sdk-go/service/workspaces/service.go | 6 +- vendor/vendor.json | 1128 ++++----- 97 files changed, 3458 insertions(+), 1083 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 3271a18e80e..212fe25e71e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -91,6 +91,6 @@ func (c *Client) AddDebugHandlers() { return } - c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest}) - c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse}) + c.Handlers.Send.PushFrontNamed(LogHTTPRequestHandler) + c.Handlers.Send.PushBackNamed(LogHTTPResponseHandler) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go index e223c54cc6c..ce9fb896d94 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go @@ -44,12 +44,22 @@ func (reader *teeReaderCloser) Close() error { return reader.Source.Close() } +// LogHTTPRequestHandler is a SDK request handler to log the HTTP request sent +// to a service. Will include the HTTP request body if the LogLevel of the +// request matches LogDebugWithHTTPBody. +var LogHTTPRequestHandler = request.NamedHandler{ + Name: "awssdk.client.LogRequest", + Fn: logRequest, +} + func logRequest(r *request.Request) { logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) bodySeekable := aws.IsReaderSeekable(r.Body) - dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) + + b, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) if err != nil { - r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) + r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, + r.ClientInfo.ServiceName, r.Operation.Name, err)) return } @@ -63,7 +73,28 @@ func logRequest(r *request.Request) { r.ResetBody() } - r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody))) + r.Config.Logger.Log(fmt.Sprintf(logReqMsg, + r.ClientInfo.ServiceName, r.Operation.Name, string(b))) +} + +// LogHTTPRequestHeaderHandler is a SDK request handler to log the HTTP request sent +// to a service. Will only log the HTTP request's headers. The request payload +// will not be read. +var LogHTTPRequestHeaderHandler = request.NamedHandler{ + Name: "awssdk.client.LogRequestHeader", + Fn: logRequestHeader, +} + +func logRequestHeader(r *request.Request) { + b, err := httputil.DumpRequestOut(r.HTTPRequest, false) + if err != nil { + r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, + r.ClientInfo.ServiceName, r.Operation.Name, err)) + return + } + + r.Config.Logger.Log(fmt.Sprintf(logReqMsg, + r.ClientInfo.ServiceName, r.Operation.Name, string(b))) } const logRespMsg = `DEBUG: Response %s/%s Details: @@ -76,27 +107,44 @@ const logRespErrMsg = `DEBUG ERROR: Response %s/%s: %s -----------------------------------------------------` +// LogHTTPResponseHandler is a SDK request handler to log the HTTP response +// received from a service. Will include the HTTP response body if the LogLevel +// of the request matches LogDebugWithHTTPBody. +var LogHTTPResponseHandler = request.NamedHandler{ + Name: "awssdk.client.LogResponse", + Fn: logResponse, +} + func logResponse(r *request.Request) { lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)} - r.HTTPResponse.Body = &teeReaderCloser{ - Reader: io.TeeReader(r.HTTPResponse.Body, lw), - Source: r.HTTPResponse.Body, + + logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) + if logBody { + r.HTTPResponse.Body = &teeReaderCloser{ + Reader: io.TeeReader(r.HTTPResponse.Body, lw), + Source: r.HTTPResponse.Body, + } } handlerFn := func(req *request.Request) { - body, err := httputil.DumpResponse(req.HTTPResponse, false) + b, err := httputil.DumpResponse(req.HTTPResponse, false) if err != nil { - lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, + req.ClientInfo.ServiceName, req.Operation.Name, err)) return } - b, err := ioutil.ReadAll(lw.buf) - if err != nil { - lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) - return - } - lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(body))) - if req.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) { + lw.Logger.Log(fmt.Sprintf(logRespMsg, + req.ClientInfo.ServiceName, req.Operation.Name, string(b))) + + if logBody { + b, err := ioutil.ReadAll(lw.buf) + if err != nil { + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, + req.ClientInfo.ServiceName, req.Operation.Name, err)) + return + } + lw.Logger.Log(string(b)) } } @@ -110,3 +158,27 @@ func logResponse(r *request.Request) { Name: handlerName, Fn: handlerFn, }) } + +// LogHTTPResponseHeaderHandler is a SDK request handler to log the HTTP +// response received from a service. Will only log the HTTP response's headers. +// The response payload will not be read. +var LogHTTPResponseHeaderHandler = request.NamedHandler{ + Name: "awssdk.client.LogResponseHeader", + Fn: logResponseHeader, +} + +func logResponseHeader(r *request.Request) { + if r.Config.Logger == nil { + return + } + + b, err := httputil.DumpResponse(r.HTTPResponse, false) + if err != nil { + r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, + r.ClientInfo.ServiceName, r.Operation.Name, err)) + return + } + + r.Config.Logger.Log(fmt.Sprintf(logRespMsg, + r.ClientInfo.ServiceName, r.Operation.Name, string(b))) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index c3043279d86..75c351d0f62 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -571,6 +571,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1193,8 +1194,10 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, @@ -1208,6 +1211,7 @@ var awsPartition = partition{ Protocols: []string{"https"}, }, Endpoints: endpoints{ + "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1528,6 +1532,7 @@ var awsPartition = partition{ "ap-northeast-2": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, @@ -2039,6 +2044,7 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -2981,6 +2987,12 @@ var awsusgovPartition = partition{ }, }, }, + "inspector": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "kinesis": service{ Endpoints: endpoints{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index c05626e2935..38caca42e7f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.14.8" +const SDKVersion = "1.14.13" diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/service.go b/vendor/github.com/aws/aws-sdk-go/service/acm/service.go index b151f51acae..9817d0c0a5a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "acm" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "ACM" // ServiceID is a unique identifer of a specific service + ServiceName = "acm" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ACM" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ACM client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go index c6a2d319b10..1987336d54f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -65,7 +65,7 @@ func (c *ACMPCA) CreateCertificateAuthorityRequest(input *CreateCertificateAutho // (certificate revocation list) configuration specifies the CRL expiration // period in days (the validity period of the CRL), the Amazon S3 bucket that // will contain the CRL, and a CNAME alias for the S3 bucket that is included -// in certificates issued by the CA. If successful, this function returns the +// in certificates issued by the CA. If successful, this operation returns the // Amazon Resource Name (ARN) of the CA. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -155,7 +155,7 @@ func (c *ACMPCA) CreateCertificateAuthorityAuditReportRequest(input *CreateCerti // // Creates an audit report that lists every time that the your CA private key // is used. The report is saved in the Amazon S3 bucket that you specify on -// input. The IssueCertificate and RevokeCertificate functions use the private +// input. The IssueCertificate and RevokeCertificate operations use the private // key. You can generate a new report every 30 minutes. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -253,17 +253,25 @@ func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAutho // DeleteCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. // -// Deletes the private certificate authority (CA) that you created or started -// to create by calling the CreateCertificateAuthority function. This action -// requires that you enter an ARN (Amazon Resource Name) for the private CA -// that you want to delete. You can find the ARN by calling the ListCertificateAuthorities -// function. You can delete the CA if you are waiting for it to be created (the -// Status field of the CertificateAuthority is CREATING) or if the CA has been -// created but you haven't yet imported the signed certificate (the Status is -// PENDING_CERTIFICATE) into ACM PCA. If you've already imported the certificate, -// you cannot delete the CA unless it has been disabled for more than 30 days. -// To disable a CA, call the UpdateCertificateAuthority function and set the -// CertificateAuthorityStatus argument to DISABLED. +// Deletes a private certificate authority (CA). You must provide the ARN (Amazon +// Resource Name) of the private CA that you want to delete. You can find the +// ARN by calling the ListCertificateAuthorities operation. Before you can delete +// a CA, you must disable it. Call the UpdateCertificateAuthority operation +// and set the CertificateAuthorityStatus parameter to DISABLED. +// +// Additionally, you can delete a CA if you are waiting for it to be created +// (the Status field of the CertificateAuthority is CREATING). You can also +// delete it if the CA has been created but you haven't yet imported the signed +// certificate (the Status is PENDING_CERTIFICATE) into ACM PCA. +// +// If the CA is in one of the aforementioned states and you call DeleteCertificateAuthority, +// the CA's status changes to DELETED. However, the CA won't be permentantly +// deleted until the restoration period has passed. By default, if you do not +// set the PermanentDeletionTimeInDays parameter, the CA remains restorable +// for 30 days. You can set the parameter from 7 to 30 days. The DescribeCertificateAuthority +// operation returns the time remaining in the restoration window of a Private +// CA in the DELETED state. To restore an eligable CA, call the RestoreCertificateAuthority +// operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -356,21 +364,25 @@ func (c *ACMPCA) DescribeCertificateAuthorityRequest(input *DescribeCertificateA // the private CA on input by its ARN (Amazon Resource Name). The output contains // the status of your CA. This can be any of the following: // -// * CREATING: ACM PCA is creating your private certificate authority. +// * CREATING - ACM PCA is creating your private certificate authority. // -// * PENDING_CERTIFICATE: The certificate is pending. You must use your on-premises -// root or subordinate CA to sign your private CA CSR and then import it -// into PCA. +// * PENDING_CERTIFICATE - The certificate is pending. You must use your +// on-premises root or subordinate CA to sign your private CA CSR and then +// import it into PCA. // -// * ACTIVE: Your private CA is active. +// * ACTIVE - Your private CA is active. // -// * DISABLED: Your private CA has been disabled. +// * DISABLED - Your private CA has been disabled. // -// * EXPIRED: Your private CA certificate has expired. +// * EXPIRED - Your private CA certificate has expired. // -// * FAILED: Your private CA has failed. Your CA can fail for problems such -// a network outage or backend AWS failure or other errors. A failed CA can -// never return to the pending state. You must create a new CA. +// * FAILED - Your private CA has failed. Your CA can fail because of problems +// such a network outage or backend AWS failure or other errors. A failed +// CA can never return to the pending state. You must create a new CA. +// +// * DELETED - Your private CA is within the restoration period, after which +// it will be permanently deleted. The length of time remaining in the CA's +// restoration period will also be included in this operation's output. // // 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 @@ -454,9 +466,9 @@ func (c *ACMPCA) DescribeCertificateAuthorityAuditReportRequest(input *DescribeC // DescribeCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority. // // Lists information about a specific audit report created by calling the CreateCertificateAuthorityAuditReport -// function. Audit information is created every time the certificate authority +// operation. Audit information is created every time the certificate authority // (CA) private key is used. The private key is used when you call the IssueCertificate -// function or the RevokeCertificate function. +// operation or the RevokeCertificate operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -470,6 +482,9 @@ func (c *ACMPCA) DescribeCertificateAuthorityAuditReportRequest(input *DescribeC // A resource such as a private CA, S3 bucket, certificate, or audit report // cannot be found. // +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// // * ErrCodeInvalidArgsException "InvalidArgsException" // One or more of the specified arguments was not valid. // @@ -540,11 +555,11 @@ func (c *ACMPCA) GetCertificateRequest(input *GetCertificateInput) (req *request // GetCertificate API operation for AWS Certificate Manager Private Certificate Authority. // // Retrieves a certificate from your private CA. The ARN of the certificate -// is returned when you call the IssueCertificate function. You must specify +// is returned when you call the IssueCertificate operation. You must specify // both the ARN of your private CA and the ARN of the issued certificate when -// calling the GetCertificate function. You can retrieve the certificate if +// calling the GetCertificate operation. You can retrieve the certificate if // it is in the ISSUED state. You can call the CreateCertificateAuthorityAuditReport -// function to create a report that contains information about all of the certificates +// operation to create a report that contains information about all of the certificates // issued and revoked by your private CA. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -728,9 +743,9 @@ func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorit // // Retrieves the certificate signing request (CSR) for your private certificate // authority (CA). The CSR is created when you call the CreateCertificateAuthority -// function. Take the CSR to your on-premises X.509 infrastructure and sign +// operation. Take the CSR to your on-premises X.509 infrastructure and sign // it by using your root or a subordinate CA. Then import the signed certificate -// back into ACM PCA by calling the ImportCertificateAuthorityCertificate function. +// back into ACM PCA by calling the ImportCertificateAuthorityCertificate operation. // The CSR is returned as a base64 PEM-encoded string. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -754,6 +769,9 @@ func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorit // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr func (c *ACMPCA) GetCertificateAuthorityCsr(input *GetCertificateAuthorityCsrInput) (*GetCertificateAuthorityCsrOutput, error) { req, out := c.GetCertificateAuthorityCsrRequest(input) @@ -823,9 +841,9 @@ func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCerti // ImportCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority. // // Imports your signed private CA certificate into ACM PCA. Before you can call -// this function, you must create the private certificate authority by calling -// the CreateCertificateAuthority function. You must then generate a certificate -// signing request (CSR) by calling the GetCertificateAuthorityCsr function. +// this operation, you must create the private certificate authority by calling +// the CreateCertificateAuthority operation. You must then generate a certificate +// signing request (CSR) by calling the GetCertificateAuthorityCsr operation. // Take the CSR to your on-premises CA and use the root certificate or a subordinate // certificate to sign it. Create a certificate chain and copy the signed certificate // and the certificate chain to your working directory. @@ -864,6 +882,9 @@ func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCerti // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// // * ErrCodeMalformedCertificateException "MalformedCertificateException" // One or more fields in the certificate are invalid. // @@ -938,11 +959,11 @@ func (c *ACMPCA) IssueCertificateRequest(input *IssueCertificateInput) (req *req // IssueCertificate API operation for AWS Certificate Manager Private Certificate Authority. // // Uses your private certificate authority (CA) to issue a client certificate. -// This function returns the Amazon Resource Name (ARN) of the certificate. -// You can retrieve the certificate by calling the GetCertificate function and -// specifying the ARN. +// This operation returns the Amazon Resource Name (ARN) of the certificate. +// You can retrieve the certificate by calling the GetCertificate operation +// and specifying the ARN. // -// You cannot use the ACM ListCertificateAuthorities function to retrieve the +// You cannot use the ACM ListCertificateAuthorities operation to retrieve the // ARNs of the certificates that you issue by using ACM PCA. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1040,7 +1061,7 @@ func (c *ACMPCA) ListCertificateAuthoritiesRequest(input *ListCertificateAuthori // ListCertificateAuthorities API operation for AWS Certificate Manager Private Certificate Authority. // // Lists the private certificate authorities that you created by using the CreateCertificateAuthority -// function. +// operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1122,8 +1143,8 @@ func (c *ACMPCA) ListTagsRequest(input *ListTagsInput) (req *request.Request, ou // // Lists the tags, if any, that are associated with your private CA. Tags are // labels that you can use to identify and organize your CAs. Each tag consists -// of a key and an optional value. Call the TagCertificateAuthority function -// to add one or more tags to your CA. Call the UntagCertificateAuthority function +// of a key and an optional value. Call the TagCertificateAuthority operation +// to add one or more tags to your CA. Call the UntagCertificateAuthority operation // to remove tags. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1163,6 +1184,107 @@ func (c *ACMPCA) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts return out, req.Send() } +const opRestoreCertificateAuthority = "RestoreCertificateAuthority" + +// RestoreCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the RestoreCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RestoreCertificateAuthority for more information on using the RestoreCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RestoreCertificateAuthorityRequest method. +// req, resp := client.RestoreCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority +func (c *ACMPCA) RestoreCertificateAuthorityRequest(input *RestoreCertificateAuthorityInput) (req *request.Request, output *RestoreCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opRestoreCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreCertificateAuthorityInput{} + } + + output = &RestoreCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// RestoreCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority. +// +// Restores a certificate authority (CA) that is in the DELETED state. You can +// restore a CA during the period that you defined in the PermanentDeletionTimeInDays +// parameter of the DeleteCertificateAuthority operation. Currently, you can +// specify 7 to 30 days. If you did not specify a PermanentDeletionTimeInDays +// value, by default you can restore the CA at any time in a 30 day period. +// You can check the time remaining in the restoration period of a private CA +// in the DELETED state by calling the DescribeCertificateAuthority or ListCertificateAuthorities +// operations. The status of a restored CA is set to its pre-deletion status +// when the RestoreCertificateAuthority operation returns. To change its status +// to ACTIVE, call the UpdateCertificateAuthority operation. If the private +// CA was in the PENDING_CERTIFICATE state at deletion, you must use the ImportCertificateAuthorityCertificate +// operation to import a certificate authority into the private CA before it +// can be activated. You cannot restore a CA after the restoration period has +// ended. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's +// API operation RestoreCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource such as a private CA, S3 bucket, certificate, or audit report +// cannot be found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// +// * ErrCodeInvalidArnException "InvalidArnException" +// The requested Amazon Resource Name (ARN) does not refer to an existing resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority +func (c *ACMPCA) RestoreCertificateAuthority(input *RestoreCertificateAuthorityInput) (*RestoreCertificateAuthorityOutput, error) { + req, out := c.RestoreCertificateAuthorityRequest(input) + return out, req.Send() +} + +// RestoreCertificateAuthorityWithContext is the same as RestoreCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) RestoreCertificateAuthorityWithContext(ctx aws.Context, input *RestoreCertificateAuthorityInput, opts ...request.Option) (*RestoreCertificateAuthorityOutput, error) { + req, out := c.RestoreCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRevokeCertificate = "RevokeCertificate" // RevokeCertificateRequest generates a "aws/request.Request" representing the @@ -1209,7 +1331,7 @@ func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *r // RevokeCertificate API operation for AWS Certificate Manager Private Certificate Authority. // -// Revokes a certificate that you issued by calling the IssueCertificate function. +// Revokes a certificate that you issued by calling the IssueCertificate operation. // If you enable a certificate revocation list (CRL) when you create or update // your private CA, information about the revoked certificates will be included // in the CRL. ACM PCA writes the CRL to an S3 bucket that you specify. For @@ -1322,8 +1444,8 @@ func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityIn // a tag to just one private CA if you want to identify a specific characteristic // of that CA, or you can apply the same tag to multiple private CAs if you // want to filter for a common relationship among those CAs. To remove one or -// more tags, use the UntagCertificateAuthority function. Call the ListTags -// function to see what tags are associated with your CA. +// more tags, use the UntagCertificateAuthority operation. Call the ListTags +// operation to see what tags are associated with your CA. // // 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 @@ -1340,6 +1462,9 @@ func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityIn // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// // * ErrCodeInvalidTagException "InvalidTagException" // The tag associated with the CA is not valid. The invalid argument is contained // in the message field. @@ -1418,10 +1543,10 @@ func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthori // // Remove one or more tags from your private CA. A tag consists of a key-value // pair. If you do not specify the value portion of the tag when calling this -// function, the tag will be removed regardless of value. If you specify a value, -// the tag is removed only if it is associated with the specified value. To -// add tags to a private CA, use the TagCertificateAuthority. Call the ListTags -// function to see what tags are associated with your CA. +// operation, the tag will be removed regardless of value. If you specify a +// value, the tag is removed only if it is associated with the specified value. +// To add tags to a private CA, use the TagCertificateAuthority. Call the ListTags +// operation to see what tags are associated with your CA. // // 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 @@ -1438,6 +1563,9 @@ func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthori // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // +// * ErrCodeInvalidStateException "InvalidStateException" +// The private CA is in a state during which a report cannot be generated. +// // * ErrCodeInvalidTagException "InvalidTagException" // The tag associated with the CA is not valid. The invalid argument is contained // in the message field. @@ -1572,15 +1700,15 @@ func (c *ACMPCA) UpdateCertificateAuthorityWithContext(ctx aws.Context, input *U // a user, computer, device, or service. The Subject must contain an X.500 distinguished // name (DN). A DN is a sequence of relative distinguished names (RDNs). The // RDNs are separated by commas in the certificate. The DN must be unique for -// each for each entity, but your private CA can issue more than one certificate -// with the same DN to the same entity. +// each entity, but your private CA can issue more than one certificate with +// the same DN to the same entity. type ASN1Subject struct { _ struct{} `type:"structure"` // Fully qualified domain name (FQDN) associated with the certificate subject. CommonName *string `type:"string"` - // Two digit code that specifies the country in which the certificate subject + // Two-digit code that specifies the country in which the certificate subject // located. Country *string `type:"string"` @@ -1621,11 +1749,11 @@ type ASN1Subject struct { // State in which the subject of the certificate is located. State *string `type:"string"` - // Family name. In the US and the UK for example, the surname of an individual + // Family name. In the US and the UK, for example, the surname of an individual // is ordered last. In Asian cultures the surname is typically ordered first. Surname *string `type:"string"` - // A title such as Mr. or Ms. which is pre-pended to the name to refer formally + // A title such as Mr. or Ms., which is pre-pended to the name to refer formally // to the certificate subject. Title *string `type:"string"` } @@ -1728,11 +1856,11 @@ func (s *ASN1Subject) SetTitle(v string) *ASN1Subject { // private CA can issue and revoke X.509 digital certificates. Digital certificates // verify that the entity named in the certificate Subject field owns or controls // the public key contained in the Subject Public Key Info field. Call the CreateCertificateAuthority -// function to create your private CA. You must then call the GetCertificateAuthorityCertificate -// function to retrieve a private CA certificate signing request (CSR). Take +// operation to create your private CA. You must then call the GetCertificateAuthorityCertificate +// operation to retrieve a private CA certificate signing request (CSR). Take // the CSR to your on-premises CA and sign it with the root CA certificate or // a subordinate certificate. Call the ImportCertificateAuthorityCertificate -// function to import the signed certificate into AWS Certificate Manager (ACM). +// operation to import the signed certificate into AWS Certificate Manager (ACM). type CertificateAuthority struct { _ struct{} `type:"structure"` @@ -1758,6 +1886,11 @@ type CertificateAuthority struct { // Date and time before which your private CA certificate is not valid. NotBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + // The period during which a deleted CA can be restored. For more information, + // see the PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest + // operation. + RestorableUntil *time.Time `type:"timestamp" timestampFormat:"unix"` + // Information about the certificate revocation list (CRL) created and maintained // by your private CA. RevocationConfiguration *RevocationConfiguration `type:"structure"` @@ -1824,6 +1957,12 @@ func (s *CertificateAuthority) SetNotBefore(v time.Time) *CertificateAuthority { return s } +// SetRestorableUntil sets the RestorableUntil field's value. +func (s *CertificateAuthority) SetRestorableUntil(v time.Time) *CertificateAuthority { + s.RestorableUntil = &v + return s +} + // SetRevocationConfiguration sets the RevocationConfiguration field's value. func (s *CertificateAuthority) SetRevocationConfiguration(v *RevocationConfiguration) *CertificateAuthority { s.RevocationConfiguration = v @@ -1853,7 +1992,7 @@ func (s *CertificateAuthority) SetType(v string) *CertificateAuthority { // the key pair that your private CA creates when it issues a certificate, the // signature algorithm it uses used when issuing certificates, and its X.500 // distinguished name. You must specify this information when you call the CreateCertificateAuthority -// function. +// operation. type CertificateAuthorityConfiguration struct { _ struct{} `type:"structure"` @@ -1932,7 +2071,7 @@ type CreateCertificateAuthorityAuditReportInput struct { // Amazon Resource Name (ARN) of the CA to be audited. This is of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2042,9 +2181,9 @@ type CreateCertificateAuthorityInput struct { // Alphanumeric string that can be used to distinguish between calls to CreateCertificateAuthority. // Idempotency tokens time out after five minutes. Therefore, if you call CreateCertificateAuthority // multiple times with the same idempotency token within a five minute period, - // ACM PCA recognizes that you are requesting only one certificate and will - // issue only one. If you change the idempotency token for each call, however, - // ACM PCA recognizes that you are requesting multiple certificates. + // ACM PCA recognizes that you are requesting only one certificate. As a result, + // ACM PCA issues only one. If you change the idempotency token for each call, + // however, ACM PCA recognizes that you are requesting multiple certificates. IdempotencyToken *string `min:"1" type:"string"` // Contains a Boolean value that you can use to enable a certification revocation @@ -2124,7 +2263,7 @@ type CreateCertificateAuthorityOutput struct { // If successful, the Amazon Resource Name (ARN) of the certificate authority // (CA). This is of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. CertificateAuthorityArn *string `min:"5" type:"string"` } @@ -2211,8 +2350,8 @@ type CrlConfiguration struct { // Boolean value that specifies whether certificate revocation lists (CRLs) // are enabled. You can use this value to enable certificate revocation for - // a new CA when you call the CreateCertificateAuthority function or for an - // existing CA when you call the UpdateCertificateAuthority function. + // a new CA when you call the CreateCertificateAuthority operation or for an + // existing CA when you call the UpdateCertificateAuthority operation. // // Enabled is a required field Enabled *bool `type:"boolean" required:"true"` @@ -2223,7 +2362,7 @@ type CrlConfiguration struct { // Name of the S3 bucket that contains the CRL. If you do not provide a value // for the CustomCname argument, the name of your S3 bucket is placed into the // CRL Distribution Points extension of the issued certificate. You can change - // the name of your bucket by calling the UpdateCertificateAuthority function. + // the name of your bucket by calling the UpdateCertificateAuthority operation. // You must specify a bucket policy that allows ACM PCA to write the CRL to // your bucket. S3BucketName *string `min:"3" type:"string"` @@ -2286,12 +2425,16 @@ type DeleteCertificateAuthorityInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. - // This must be of the form: + // This must have the following form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` + + // The number of days to make a CA restorable after it has been deleted. This + // can be anywhere from 7 to 30 days, with 30 being the default. + PermanentDeletionTimeInDays *int64 `min:"7" type:"integer"` } // String returns the string representation @@ -2313,6 +2456,9 @@ func (s *DeleteCertificateAuthorityInput) Validate() error { if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) } + if s.PermanentDeletionTimeInDays != nil && *s.PermanentDeletionTimeInDays < 7 { + invalidParams.Add(request.NewErrParamMinValue("PermanentDeletionTimeInDays", 7)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2326,6 +2472,12 @@ func (s *DeleteCertificateAuthorityInput) SetCertificateAuthorityArn(v string) * return s } +// SetPermanentDeletionTimeInDays sets the PermanentDeletionTimeInDays field's value. +func (s *DeleteCertificateAuthorityInput) SetPermanentDeletionTimeInDays(v int64) *DeleteCertificateAuthorityInput { + s.PermanentDeletionTimeInDays = &v + return s +} + type DeleteCertificateAuthorityOutput struct { _ struct{} `type:"structure"` } @@ -2344,14 +2496,14 @@ type DescribeCertificateAuthorityAuditReportInput struct { _ struct{} `type:"structure"` // The report ID returned by calling the CreateCertificateAuthorityAuditReport - // function. + // operation. // // AuditReportId is a required field AuditReportId *string `min:"36" type:"string" required:"true"` // The Amazon Resource Name (ARN) of the private CA. This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2457,7 +2609,7 @@ type DescribeCertificateAuthorityInput struct { // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. // This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2524,7 +2676,7 @@ type GetCertificateAuthorityCertificateInput struct { // The Amazon Resource Name (ARN) of your private CA. This is of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2600,9 +2752,9 @@ type GetCertificateAuthorityCsrInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority - // function. This must be of the form: + // operation. This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2670,7 +2822,7 @@ type GetCertificateInput struct { // The ARN of the issued certificate. The ARN contains the certificate serial // number and must be in the following form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 // // CertificateArn is a required field CertificateArn *string `min:"5" type:"string" required:"true"` @@ -2678,7 +2830,7 @@ type GetCertificateInput struct { // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. // This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012. // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2775,7 +2927,7 @@ type ImportCertificateAuthorityCertificateInput struct { // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. // This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2864,7 +3016,7 @@ type IssueCertificateInput struct { // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. // This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -2889,9 +3041,9 @@ type IssueCertificateInput struct { Csr []byte `min:"1" type:"blob" required:"true"` // Custom string that can be used to distinguish between calls to the IssueCertificate - // function. Idempotency tokens time out after one hour. Therefore, if you call - // IssueCertificate multiple times with the same idempotency token within 5 - // minutes, ACM PCA recognizes that you are requesting only one certificate + // operation. Idempotency tokens time out after one hour. Therefore, if you + // call IssueCertificate multiple times with the same idempotency token within + // 5 minutes, ACM PCA recognizes that you are requesting only one certificate // and will issue only one. If you change the idempotency token for each call, // PCA recognizes that you are requesting multiple certificates. IdempotencyToken *string `min:"1" type:"string"` @@ -2990,7 +3142,7 @@ type IssueCertificateOutput struct { // The Amazon Resource Name (ARN) of the issued certificate and the certificate // serial number. This is of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245 CertificateArn *string `min:"5" type:"string"` } @@ -3100,9 +3252,9 @@ type ListTagsInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority - // function. This must be of the form: + // operation. This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -3202,8 +3354,66 @@ func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { return s } +type RestoreCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority + // operation. This must be of the form: + // + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // + // CertificateAuthorityArn is a required field + CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` +} + +// String returns the string representation +func (s RestoreCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreCertificateAuthorityInput"} + if s.CertificateAuthorityArn == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn")) + } + if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 { + invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value. +func (s *RestoreCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *RestoreCertificateAuthorityInput { + s.CertificateAuthorityArn = &v + return s +} + +type RestoreCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RestoreCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreCertificateAuthorityOutput) GoString() string { + return s.String() +} + // Certificate revocation information used by the CreateCertificateAuthority -// and UpdateCertificateAuthority functions. Your private certificate authority +// and UpdateCertificateAuthority operations. Your private certificate authority // (CA) can create and maintain a certificate revocation list (CRL). A CRL contains // information about certificates revoked by your CA. For more information, // see RevokeCertificate. @@ -3252,7 +3462,7 @@ type RevokeCertificateInput struct { // Amazon Resource Name (ARN) of the private CA that issued the certificate // to be revoked. This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -3260,15 +3470,15 @@ type RevokeCertificateInput struct { // Serial number of the certificate to be revoked. This must be in hexadecimal // format. You can retrieve the serial number by calling GetCertificate with // the Amazon Resource Name (ARN) of the certificate you want and the ARN of - // your private CA. The GetCertificate function retrieves the certificate in + // your private CA. The GetCertificate operation retrieves the certificate in // the PEM format. You can use the following OpenSSL command to list the certificate // in text format and copy the hexadecimal serial number. // // openssl x509 -in file_path -text -noout // // You can also copy the serial number from the console or use the DescribeCertificate - // (http://docs.aws.amazon.comacm/latest/APIReferenceAPI_DescribeCertificate.html) - // function in the AWS Certificate Manager API Reference. + // (https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html) + // operation in the AWS Certificate Manager API Reference. // // CertificateSerial is a required field CertificateSerial *string `type:"string" required:"true"` @@ -3346,8 +3556,8 @@ func (s RevokeCertificateOutput) GoString() string { // Tags are labels that you can use to identify and organize your private CAs. // Each tag consists of a key and an optional value. You can associate up to // 50 tags with a private CA. To add one or more tags to a private CA, call -// the TagCertificateAuthority function. To remove a tag, call the UntagCertificateAuthority -// function. +// the TagCertificateAuthority operation. To remove a tag, call the UntagCertificateAuthority +// operation. type Tag struct { _ struct{} `type:"structure"` @@ -3404,7 +3614,7 @@ type TagCertificateAuthorityInput struct { // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. // This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -3489,7 +3699,7 @@ type UntagCertificateAuthorityInput struct { // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. // This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -3574,7 +3784,7 @@ type UpdateCertificateAuthorityInput struct { // Amazon Resource Name (ARN) of the private CA that issued the certificate // to be revoked. This must be of the form: // - // arn:aws:acm:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 + // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 // // CertificateAuthorityArn is a required field CertificateAuthorityArn *string `min:"5" type:"string" required:"true"` @@ -3651,7 +3861,7 @@ func (s UpdateCertificateAuthorityOutput) GoString() string { // Length of time for which the certificate issued by your private certificate // authority (CA), or by the private CA itself, is valid in days, months, or -// years. You can issue a certificate by calling the IssueCertificate function. +// years. You can issue a certificate by calling the IssueCertificate operation. type Validity struct { _ struct{} `type:"structure"` @@ -3736,6 +3946,9 @@ const ( // CertificateAuthorityStatusActive is a CertificateAuthorityStatus enum value CertificateAuthorityStatusActive = "ACTIVE" + // CertificateAuthorityStatusDeleted is a CertificateAuthorityStatus enum value + CertificateAuthorityStatusDeleted = "DELETED" + // CertificateAuthorityStatusDisabled is a CertificateAuthorityStatus enum value CertificateAuthorityStatusDisabled = "DISABLED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go index f20c964ff94..3ca43776465 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go @@ -4,9 +4,9 @@ // requests to AWS Certificate Manager Private Certificate Authority. // // You can use the ACM PCA API to create a private certificate authority (CA). -// You must first call the CreateCertificateAuthority function. If successful, -// the function returns an Amazon Resource Name (ARN) for your private CA. Use -// this ARN as input to the GetCertificateAuthorityCsr function to retrieve +// You must first call the CreateCertificateAuthority operation. If successful, +// the operation returns an Amazon Resource Name (ARN) for your private CA. +// Use this ARN as input to the GetCertificateAuthorityCsr operation to retrieve // the certificate signing request (CSR) for your private CA certificate. Sign // the CSR using the root or an intermediate CA in your on-premises PKI hierarchy, // and call the ImportCertificateAuthorityCertificate to import your signed @@ -15,8 +15,8 @@ // Use your private CA to issue and revoke certificates. These are private certificates // that identify and secure client computers, servers, applications, services, // devices, and users over SSLS/TLS connections within your organization. Call -// the IssueCertificate function to issue a certificate. Call the RevokeCertificate -// function to revoke a certificate. +// the IssueCertificate operation to issue a certificate. Call the RevokeCertificate +// operation to revoke a certificate. // // Certificates issued by your private CA can be trusted only within your organization, // not publicly. @@ -24,13 +24,13 @@ // Your private CA can optionally create a certificate revocation list (CRL) // to track the certificates you revoke. To create a CRL, you must specify a // RevocationConfiguration object when you call the CreateCertificateAuthority -// function. ACM PCA writes the CRL to an S3 bucket that you specify. You must +// operation. ACM PCA writes the CRL to an S3 bucket that you specify. You must // specify a bucket policy that grants ACM PCA write permission. // // You can also call the CreateCertificateAuthorityAuditReport to create an // optional audit report that lists every time the CA private key is used. The // private key is used for signing when the IssueCertificate or RevokeCertificate -// function is called. +// operation is called. // // See https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go index b51c5df4583..6c231c1d700 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "acm-pca" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "ACM PCA" // ServiceID is a unique identifer of a specific service + ServiceName = "acm-pca" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ACM PCA" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ACMPCA client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go index b799ac398ed..8064d24fc02 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "apigateway" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "API Gateway" // ServiceID is a unique identifer of a specific service + ServiceName = "apigateway" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "API Gateway" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the APIGateway client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go index 45c4b8b6e8e..902d81d426e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "autoscaling" // Service endpoint prefix API calls made to. - EndpointsID = "application-autoscaling" // Service ID for Regions and Endpoints metadata. - ServiceID = "Application Auto Scaling" // ServiceID is a unique identifer of a specific service + ServiceName = "autoscaling" // Name of service. + EndpointsID = "application-autoscaling" // ID to lookup a service endpoint with. + ServiceID = "Application Auto Scaling" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ApplicationAutoScaling client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go index 24b389ca669..e53f6e71b48 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "appsync" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "AppSync" // ServiceID is a unique identifer of a specific service + ServiceName = "appsync" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "AppSync" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the AppSync client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/service.go b/vendor/github.com/aws/aws-sdk-go/service/athena/service.go index 216cfc790d9..6806a62ec95 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "athena" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Athena" // ServiceID is a unique identifer of a specific service + ServiceName = "athena" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Athena" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Athena client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go index a844a83f50d..e1da9fd7546 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "autoscaling" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Auto Scaling" // ServiceID is a unique identifer of a specific service + ServiceName = "autoscaling" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Auto Scaling" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the AutoScaling client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/service.go b/vendor/github.com/aws/aws-sdk-go/service/batch/service.go index 6764142cad8..0d04e7497ec 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "batch" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Batch" // ServiceID is a unique identifer of a specific service + ServiceName = "batch" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Batch" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Batch client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go index 769c7b3b193..dc10c2aaa1b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "budgets" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Budgets" // ServiceID is a unique identifer of a specific service + ServiceName = "budgets" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Budgets" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Budgets client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go index 16f6ec1fc88..8b9d30d5440 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloud9/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloud9" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Cloud9" // ServiceID is a unique identifer of a specific service + ServiceName = "cloud9" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Cloud9" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Cloud9 client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go index efcd1c5ac76..65df49a0cc8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudformation" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudFormation" // ServiceID is a unique identifer of a specific service + ServiceName = "cloudformation" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudFormation" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudFormation client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go index d52d30a343d..103bab6a272 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudfront" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudFront" // ServiceID is a unique identifer of a specific service + ServiceName = "cloudfront" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudFront" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudFront client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go index f76436c9f1b..c86db6ae7b0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudhsmv2" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudHSM V2" // ServiceID is a unique identifer of a specific service + ServiceName = "cloudhsmv2" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudHSM V2" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudHSMV2 client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go index f7e8e25f4a6..850bc137051 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudsearch" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudSearch" // ServiceID is a unique identifer of a specific service + ServiceName = "cloudsearch" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudSearch" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudSearch client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go index d7b6b567d38..5f1d4ddc41f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cloudtrail" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudTrail" // ServiceID is a unique identifer of a specific service + ServiceName = "cloudtrail" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudTrail" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudTrail client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go index 6252912e802..0d478662240 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "monitoring" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudWatch" // ServiceID is a unique identifer of a specific service + ServiceName = "monitoring" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudWatch" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudWatch client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go index e92116d6499..2a7f6969cd8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "events" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudWatch Events" // ServiceID is a unique identifer of a specific service + ServiceName = "events" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudWatch Events" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudWatchEvents client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go index e51dae3b611..8d5f929df84 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "logs" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CloudWatch Logs" // ServiceID is a unique identifer of a specific service + ServiceName = "logs" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudWatch Logs" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CloudWatchLogs client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go index f894719719d..b9ff2b6f76e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codebuild" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CodeBuild" // ServiceID is a unique identifer of a specific service + ServiceName = "codebuild" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodeBuild" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodeBuild client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go index cf9bbd5478e..c8cad394ab0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codecommit" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CodeCommit" // ServiceID is a unique identifer of a specific service + ServiceName = "codecommit" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodeCommit" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodeCommit client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go index eca08b6bec9..dd1eaf41355 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codedeploy" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CodeDeploy" // ServiceID is a unique identifer of a specific service + ServiceName = "codedeploy" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodeDeploy" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodeDeploy client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go index 84af6f5e869..397a00f9eb2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "codepipeline" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "CodePipeline" // ServiceID is a unique identifer of a specific service + ServiceName = "codepipeline" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CodePipeline" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CodePipeline client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go index a2b190b83a3..9ebae103f36 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cognito-identity" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Cognito Identity" // ServiceID is a unique identifer of a specific service + ServiceName = "cognito-identity" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Cognito Identity" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CognitoIdentity client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go index 02b51b489f4..68efbd80b6e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "cognito-idp" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Cognito Identity Provider" // ServiceID is a unique identifer of a specific service + ServiceName = "cognito-idp" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Cognito Identity Provider" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the CognitoIdentityProvider client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go index 58611d6121a..2fdea95561f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "config" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Config Service" // ServiceID is a unique identifer of a specific service + ServiceName = "config" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Config Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ConfigService client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go index cdbdc191b2e..8ee775e03ca 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "dms" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Database Migration Service" // ServiceID is a unique identifer of a specific service + ServiceName = "dms" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Database Migration Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DatabaseMigrationService client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/service.go b/vendor/github.com/aws/aws-sdk-go/service/dax/service.go index 1ffb2a570d2..545ea0312c3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "dax" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "DAX" // ServiceID is a unique identifer of a specific service + ServiceName = "dax" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "DAX" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DAX client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go index 7e2418b4455..0f2354a4e1c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "devicefarm" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Device Farm" // ServiceID is a unique identifer of a specific service + ServiceName = "devicefarm" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Device Farm" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DeviceFarm client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go index 15ca0b673cc..bb182821c59 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "directconnect" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Direct Connect" // ServiceID is a unique identifer of a specific service + ServiceName = "directconnect" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Direct Connect" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DirectConnect client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go index 8b3992aa9ff..0743c9632ca 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ds" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Directory Service" // ServiceID is a unique identifer of a specific service + ServiceName = "ds" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Directory Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DirectoryService client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go index b4da51e74d2..346f52ce4ad 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "dynamodb" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "DynamoDB" // ServiceID is a unique identifer of a specific service + ServiceName = "dynamodb" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "DynamoDB" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the DynamoDB client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go index 199c64c872e..6acbc43fe3d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ec2" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "EC2" // ServiceID is a unique identifer of a specific service + ServiceName = "ec2" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EC2" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the EC2 client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go index 0bd6bfd3835..7bdf2137099 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ecr" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "ECR" // ServiceID is a unique identifer of a specific service + ServiceName = "ecr" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ECR" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ECR client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go index dc44382f929..c268614ecb9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ecs" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "ECS" // ServiceID is a unique identifer of a specific service + ServiceName = "ecs" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ECS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ECS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go index 761b6ce8d1c..6b1a11c900a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticfilesystem" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "EFS" // ServiceID is a unique identifer of a specific service + ServiceName = "elasticfilesystem" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EFS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the EFS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/service.go b/vendor/github.com/aws/aws-sdk-go/service/eks/service.go index 2a81801341a..e72b2c362e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "eks" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "EKS" // ServiceID is a unique identifer of a specific service + ServiceName = "eks" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EKS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the EKS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go index 8b0a8979f60..fd5f8c51707 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticache" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "ElastiCache" // ServiceID is a unique identifer of a specific service + ServiceName = "elasticache" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ElastiCache" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElastiCache client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go index 7ab643454af..12e8b1c819a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticbeanstalk" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Elastic Beanstalk" // ServiceID is a unique identifer of a specific service + ServiceName = "elasticbeanstalk" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Beanstalk" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElasticBeanstalk client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go index 5ef3fc5e454..d2f8f382733 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "es" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Elasticsearch Service" // ServiceID is a unique identifer of a specific service + ServiceName = "es" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elasticsearch Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElasticsearchService client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go index 52c0ba157c0..30acb8d1bc0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elastictranscoder" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Elastic Transcoder" // ServiceID is a unique identifer of a specific service + ServiceName = "elastictranscoder" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Transcoder" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ElasticTranscoder client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go b/vendor/github.com/aws/aws-sdk-go/service/elb/service.go index 78782028c22..5dfdd322c9b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticloadbalancing" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Elastic Load Balancing" // ServiceID is a unique identifer of a specific service + ServiceName = "elasticloadbalancing" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Load Balancing" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ELB client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go index d8af6aeae75..ad97e8df885 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticloadbalancing" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Elastic Load Balancing v2" // ServiceID is a unique identifer of a specific service + ServiceName = "elasticloadbalancing" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Elastic Load Balancing v2" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ELBV2 client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/service.go b/vendor/github.com/aws/aws-sdk-go/service/emr/service.go index b4131ad4442..92735a793d4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "elasticmapreduce" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "EMR" // ServiceID is a unique identifer of a specific service + ServiceName = "elasticmapreduce" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "EMR" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the EMR client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go index ae974f52e60..bcdf23dffb9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "firehose" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Firehose" // ServiceID is a unique identifer of a specific service + ServiceName = "firehose" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Firehose" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Firehose client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/service.go b/vendor/github.com/aws/aws-sdk-go/service/fms/service.go index 38cb8f017d4..6103e57fd82 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "fms" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "FMS" // ServiceID is a unique identifer of a specific service + ServiceName = "fms" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "FMS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the FMS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go index 10e3961df78..a2361e47690 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/service.go @@ -29,9 +29,9 @@ 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. - ServiceID = "GameLift" // ServiceID is a unique identifer of a specific service + ServiceName = "gamelift" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "GameLift" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the GameLift client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go index 3976c455c13..85e6e367b20 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "glacier" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Glacier" // ServiceID is a unique identifer of a specific service + ServiceName = "glacier" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Glacier" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Glacier client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/service.go b/vendor/github.com/aws/aws-sdk-go/service/glue/service.go index 65f5bf00886..075b0a1df6c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "glue" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Glue" // ServiceID is a unique identifer of a specific service + ServiceName = "glue" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Glue" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Glue client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go index c2e04748130..0ca09946c29 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "guardduty" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "GuardDuty" // ServiceID is a unique identifer of a specific service + ServiceName = "guardduty" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "GuardDuty" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the GuardDuty client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go index 28e4d3cd692..940b4ce3283 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "iam" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "IAM" // ServiceID is a unique identifer of a specific service + ServiceName = "iam" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "IAM" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the IAM client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go index 41d58a7699d..2e68b4e4d23 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "inspector" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Inspector" // ServiceID is a unique identifer of a specific service + ServiceName = "inspector" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Inspector" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Inspector client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go b/vendor/github.com/aws/aws-sdk-go/service/iot/service.go index dd1296f4e7d..10a95d5607c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "iot" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "IoT" // ServiceID is a unique identifer of a specific service + ServiceName = "iot" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "IoT" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the IoT client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go index be58ed5ae73..2d55ac9579e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "kinesis" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Kinesis" // ServiceID is a unique identifer of a specific service + ServiceName = "kinesis" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Kinesis" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Kinesis client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go b/vendor/github.com/aws/aws-sdk-go/service/kms/service.go index c74598eb549..6d062f32fc8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "kms" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "KMS" // ServiceID is a unique identifer of a specific service + ServiceName = "kms" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "KMS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the KMS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go index 5f48dc84575..1cccdda0842 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "lambda" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Lambda" // ServiceID is a unique identifer of a specific service + ServiceName = "lambda" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Lambda" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Lambda client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go index bb057fa530c..86d1a44d24b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "models.lex" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Lex Model Building Service" // ServiceID is a unique identifer of a specific service + ServiceName = "models.lex" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Lex Model Building Service" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the LexModelBuildingService client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go index 9bf27dfb336..b9f97faa8a6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "lightsail" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Lightsail" // ServiceID is a unique identifer of a specific service + ServiceName = "lightsail" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Lightsail" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Lightsail client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go index 6da22775cd3..441039b6851 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "mediaconvert" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "MediaConvert" // ServiceID is a unique identifer of a specific service + ServiceName = "mediaconvert" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaConvert" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MediaConvert client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go index 14b48a773b4..be658cc0092 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go @@ -552,6 +552,98 @@ func (c *MediaLive) DeleteInputSecurityGroupWithContext(ctx aws.Context, input * return out, req.Send() } +const opDeleteReservation = "DeleteReservation" + +// DeleteReservationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteReservation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteReservation for more information on using the DeleteReservation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteReservationRequest method. +// req, resp := client.DeleteReservationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteReservation +func (c *MediaLive) DeleteReservationRequest(input *DeleteReservationInput) (req *request.Request, output *DeleteReservationOutput) { + op := &request.Operation{ + Name: opDeleteReservation, + HTTPMethod: "DELETE", + HTTPPath: "/prod/reservations/{reservationId}", + } + + if input == nil { + input = &DeleteReservationInput{} + } + + output = &DeleteReservationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteReservation API operation for AWS Elemental MediaLive. +// +// Delete an expired reservation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DeleteReservation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteReservation +func (c *MediaLive) DeleteReservation(input *DeleteReservationInput) (*DeleteReservationOutput, error) { + req, out := c.DeleteReservationRequest(input) + return out, req.Send() +} + +// DeleteReservationWithContext is the same as DeleteReservation with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteReservation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DeleteReservationWithContext(ctx aws.Context, input *DeleteReservationInput, opts ...request.Option) (*DeleteReservationOutput, error) { + req, out := c.DeleteReservationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeChannel = "DescribeChannel" // DescribeChannelRequest generates a "aws/request.Request" representing the @@ -822,6 +914,186 @@ func (c *MediaLive) DescribeInputSecurityGroupWithContext(ctx aws.Context, input return out, req.Send() } +const opDescribeOffering = "DescribeOffering" + +// DescribeOfferingRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOffering operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeOffering for more information on using the DescribeOffering +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeOfferingRequest method. +// req, resp := client.DescribeOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeOffering +func (c *MediaLive) DescribeOfferingRequest(input *DescribeOfferingInput) (req *request.Request, output *DescribeOfferingOutput) { + op := &request.Operation{ + Name: opDescribeOffering, + HTTPMethod: "GET", + HTTPPath: "/prod/offerings/{offeringId}", + } + + if input == nil { + input = &DescribeOfferingInput{} + } + + output = &DescribeOfferingOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOffering API operation for AWS Elemental MediaLive. +// +// Get details for an offering. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeOffering for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeOffering +func (c *MediaLive) DescribeOffering(input *DescribeOfferingInput) (*DescribeOfferingOutput, error) { + req, out := c.DescribeOfferingRequest(input) + return out, req.Send() +} + +// DescribeOfferingWithContext is the same as DescribeOffering with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOffering for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeOfferingWithContext(ctx aws.Context, input *DescribeOfferingInput, opts ...request.Option) (*DescribeOfferingOutput, error) { + req, out := c.DescribeOfferingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeReservation = "DescribeReservation" + +// DescribeReservationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeReservation for more information on using the DescribeReservation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeReservationRequest method. +// req, resp := client.DescribeReservationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeReservation +func (c *MediaLive) DescribeReservationRequest(input *DescribeReservationInput) (req *request.Request, output *DescribeReservationOutput) { + op := &request.Operation{ + Name: opDescribeReservation, + HTTPMethod: "GET", + HTTPPath: "/prod/reservations/{reservationId}", + } + + if input == nil { + input = &DescribeReservationInput{} + } + + output = &DescribeReservationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReservation API operation for AWS Elemental MediaLive. +// +// Get details for a reservation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeReservation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeReservation +func (c *MediaLive) DescribeReservation(input *DescribeReservationInput) (*DescribeReservationOutput, error) { + req, out := c.DescribeReservationRequest(input) + return out, req.Send() +} + +// DescribeReservationWithContext is the same as DescribeReservation with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReservation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeReservationWithContext(ctx aws.Context, input *DescribeReservationInput, opts ...request.Option) (*DescribeReservationOutput, error) { + req, out := c.DescribeReservationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListChannels = "ListChannels" // ListChannelsRequest generates a "aws/request.Request" representing the @@ -1254,58 +1526,64 @@ func (c *MediaLive) ListInputsPagesWithContext(ctx aws.Context, input *ListInput return p.Err() } -const opStartChannel = "StartChannel" +const opListOfferings = "ListOfferings" -// StartChannelRequest generates a "aws/request.Request" representing the -// client's request for the StartChannel operation. The "output" return +// ListOfferingsRequest generates a "aws/request.Request" representing the +// client's request for the ListOfferings operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartChannel for more information on using the StartChannel +// See ListOfferings for more information on using the ListOfferings // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StartChannelRequest method. -// req, resp := client.StartChannelRequest(params) +// // Example sending a request using the ListOfferingsRequest method. +// req, resp := client.ListOfferingsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel -func (c *MediaLive) StartChannelRequest(input *StartChannelInput) (req *request.Request, output *StartChannelOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListOfferings +func (c *MediaLive) ListOfferingsRequest(input *ListOfferingsInput) (req *request.Request, output *ListOfferingsOutput) { op := &request.Operation{ - Name: opStartChannel, - HTTPMethod: "POST", - HTTPPath: "/prod/channels/{channelId}/start", + Name: opListOfferings, + HTTPMethod: "GET", + HTTPPath: "/prod/offerings", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { - input = &StartChannelInput{} + input = &ListOfferingsInput{} } - output = &StartChannelOutput{} + output = &ListOfferingsOutput{} req = c.newRequest(op, input, output) return } -// StartChannel API operation for AWS Elemental MediaLive. +// ListOfferings API operation for AWS Elemental MediaLive. // -// Starts an existing channel +// List offerings available for purchase. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Elemental MediaLive's -// API operation StartChannel for usage and error information. +// API operation ListOfferings for usage and error information. // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" @@ -1316,51 +1594,425 @@ func (c *MediaLive) StartChannelRequest(input *StartChannelInput) (req *request. // // * ErrCodeBadGatewayException "BadGatewayException" // -// * ErrCodeNotFoundException "NotFoundException" -// // * ErrCodeGatewayTimeoutException "GatewayTimeoutException" // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // -// * ErrCodeConflictException "ConflictException" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel -func (c *MediaLive) StartChannel(input *StartChannelInput) (*StartChannelOutput, error) { - req, out := c.StartChannelRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListOfferings +func (c *MediaLive) ListOfferings(input *ListOfferingsInput) (*ListOfferingsOutput, error) { + req, out := c.ListOfferingsRequest(input) return out, req.Send() } -// StartChannelWithContext is the same as StartChannel with the addition of +// ListOfferingsWithContext is the same as ListOfferings with the addition of // the ability to pass a context and additional request options. // -// See StartChannel for details on how to use this API operation. +// See ListOfferings for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *MediaLive) StartChannelWithContext(ctx aws.Context, input *StartChannelInput, opts ...request.Option) (*StartChannelOutput, error) { - req, out := c.StartChannelRequest(input) +func (c *MediaLive) ListOfferingsWithContext(ctx aws.Context, input *ListOfferingsInput, opts ...request.Option) (*ListOfferingsOutput, error) { + req, out := c.ListOfferingsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopChannel = "StopChannel" - -// StopChannelRequest generates a "aws/request.Request" representing the -// client's request for the StopChannel operation. The "output" return -// value will be populated with the request's response once the request completes -// successfuly. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. +// ListOfferingsPages iterates over the pages of a ListOfferings operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. // -// See StopChannel for more information on using the StopChannel -// API call, and error handling. +// See ListOfferings method for more information on how to use this operation. // -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListOfferings operation. +// pageNum := 0 +// err := client.ListOfferingsPages(params, +// func(page *ListOfferingsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListOfferingsPages(input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool) error { + return c.ListOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListOfferingsPagesWithContext same as ListOfferingsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListOfferingsPagesWithContext(ctx aws.Context, input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListOfferingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListOfferingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListReservations = "ListReservations" + +// ListReservationsRequest generates a "aws/request.Request" representing the +// client's request for the ListReservations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListReservations for more information on using the ListReservations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListReservationsRequest method. +// req, resp := client.ListReservationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListReservations +func (c *MediaLive) ListReservationsRequest(input *ListReservationsInput) (req *request.Request, output *ListReservationsOutput) { + op := &request.Operation{ + Name: opListReservations, + HTTPMethod: "GET", + HTTPPath: "/prod/reservations", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListReservationsInput{} + } + + output = &ListReservationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListReservations API operation for AWS Elemental MediaLive. +// +// List purchased reservations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation ListReservations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListReservations +func (c *MediaLive) ListReservations(input *ListReservationsInput) (*ListReservationsOutput, error) { + req, out := c.ListReservationsRequest(input) + return out, req.Send() +} + +// ListReservationsWithContext is the same as ListReservations with the addition of +// the ability to pass a context and additional request options. +// +// See ListReservations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListReservationsWithContext(ctx aws.Context, input *ListReservationsInput, opts ...request.Option) (*ListReservationsOutput, error) { + req, out := c.ListReservationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListReservationsPages iterates over the pages of a ListReservations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListReservations method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListReservations operation. +// pageNum := 0 +// err := client.ListReservationsPages(params, +// func(page *ListReservationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListReservationsPages(input *ListReservationsInput, fn func(*ListReservationsOutput, bool) bool) error { + return c.ListReservationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListReservationsPagesWithContext same as ListReservationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListReservationsPagesWithContext(ctx aws.Context, input *ListReservationsInput, fn func(*ListReservationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListReservationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListReservationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListReservationsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPurchaseOffering = "PurchaseOffering" + +// PurchaseOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseOffering operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PurchaseOffering for more information on using the PurchaseOffering +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PurchaseOfferingRequest method. +// req, resp := client.PurchaseOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/PurchaseOffering +func (c *MediaLive) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req *request.Request, output *PurchaseOfferingOutput) { + op := &request.Operation{ + Name: opPurchaseOffering, + HTTPMethod: "POST", + HTTPPath: "/prod/offerings/{offeringId}/purchase", + } + + if input == nil { + input = &PurchaseOfferingInput{} + } + + output = &PurchaseOfferingOutput{} + req = c.newRequest(op, input, output) + return +} + +// PurchaseOffering API operation for AWS Elemental MediaLive. +// +// Purchase an offering and create a reservation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation PurchaseOffering for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/PurchaseOffering +func (c *MediaLive) PurchaseOffering(input *PurchaseOfferingInput) (*PurchaseOfferingOutput, error) { + req, out := c.PurchaseOfferingRequest(input) + return out, req.Send() +} + +// PurchaseOfferingWithContext is the same as PurchaseOffering with the addition of +// the ability to pass a context and additional request options. +// +// See PurchaseOffering for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) PurchaseOfferingWithContext(ctx aws.Context, input *PurchaseOfferingInput, opts ...request.Option) (*PurchaseOfferingOutput, error) { + req, out := c.PurchaseOfferingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartChannel = "StartChannel" + +// StartChannelRequest generates a "aws/request.Request" representing the +// client's request for the StartChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartChannel for more information on using the StartChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartChannelRequest method. +// req, resp := client.StartChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel +func (c *MediaLive) StartChannelRequest(input *StartChannelInput) (req *request.Request, output *StartChannelOutput) { + op := &request.Operation{ + Name: opStartChannel, + HTTPMethod: "POST", + HTTPPath: "/prod/channels/{channelId}/start", + } + + if input == nil { + input = &StartChannelInput{} + } + + output = &StartChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartChannel API operation for AWS Elemental MediaLive. +// +// Starts an existing channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation StartChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel +func (c *MediaLive) StartChannel(input *StartChannelInput) (*StartChannelOutput, error) { + req, out := c.StartChannelRequest(input) + return out, req.Send() +} + +// StartChannelWithContext is the same as StartChannel with the addition of +// the ability to pass a context and additional request options. +// +// See StartChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) StartChannelWithContext(ctx aws.Context, input *StartChannelInput, opts ...request.Option) (*StartChannelOutput, error) { + req, out := c.StartChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopChannel = "StopChannel" + +// StopChannelRequest generates a "aws/request.Request" representing the +// client's request for the StopChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopChannel for more information on using the StopChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the StopChannelRequest method. @@ -4296,74 +4948,264 @@ func (s *DeleteInputInput) Validate() error { return nil } -// SetInputId sets the InputId field's value. -func (s *DeleteInputInput) SetInputId(v string) *DeleteInputInput { - s.InputId = &v +// SetInputId sets the InputId field's value. +func (s *DeleteInputInput) SetInputId(v string) *DeleteInputInput { + s.InputId = &v + return s +} + +type DeleteInputOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteInputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInputOutput) GoString() string { + return s.String() +} + +type DeleteInputSecurityGroupInput struct { + _ struct{} `type:"structure"` + + // InputSecurityGroupId is a required field + InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInputSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInputSecurityGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInputSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInputSecurityGroupInput"} + if s.InputSecurityGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. +func (s *DeleteInputSecurityGroupInput) SetInputSecurityGroupId(v string) *DeleteInputSecurityGroupInput { + s.InputSecurityGroupId = &v + return s +} + +type DeleteInputSecurityGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteInputSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInputSecurityGroupOutput) GoString() string { + return s.String() +} + +type DeleteReservationInput struct { + _ struct{} `type:"structure"` + + // ReservationId is a required field + ReservationId *string `location:"uri" locationName:"reservationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteReservationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteReservationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteReservationInput"} + if s.ReservationId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReservationId sets the ReservationId field's value. +func (s *DeleteReservationInput) SetReservationId(v string) *DeleteReservationInput { + s.ReservationId = &v + return s +} + +type DeleteReservationOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Count *int64 `locationName:"count" type:"integer"` + + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + End *string `locationName:"end" type:"string"` + + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + Name *string `locationName:"name" type:"string"` + + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + Region *string `locationName:"region" type:"string"` + + ReservationId *string `locationName:"reservationId" type:"string"` + + // Resource configuration (codec, resolution, bitrate, ...) + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + Start *string `locationName:"start" type:"string"` + + // Current reservation state + State *string `locationName:"state" type:"string" enum:"ReservationState"` + + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s DeleteReservationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteReservationOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DeleteReservationOutput) SetArn(v string) *DeleteReservationOutput { + s.Arn = &v + return s +} + +// SetCount sets the Count field's value. +func (s *DeleteReservationOutput) SetCount(v int64) *DeleteReservationOutput { + s.Count = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *DeleteReservationOutput) SetCurrencyCode(v string) *DeleteReservationOutput { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DeleteReservationOutput) SetDuration(v int64) *DeleteReservationOutput { + s.Duration = &v return s } -type DeleteInputOutput struct { - _ struct{} `type:"structure"` +// SetDurationUnits sets the DurationUnits field's value. +func (s *DeleteReservationOutput) SetDurationUnits(v string) *DeleteReservationOutput { + s.DurationUnits = &v + return s } -// String returns the string representation -func (s DeleteInputOutput) String() string { - return awsutil.Prettify(s) +// SetEnd sets the End field's value. +func (s *DeleteReservationOutput) SetEnd(v string) *DeleteReservationOutput { + s.End = &v + return s } -// GoString returns the string representation -func (s DeleteInputOutput) GoString() string { - return s.String() +// SetFixedPrice sets the FixedPrice field's value. +func (s *DeleteReservationOutput) SetFixedPrice(v float64) *DeleteReservationOutput { + s.FixedPrice = &v + return s } -type DeleteInputSecurityGroupInput struct { - _ struct{} `type:"structure"` +// SetName sets the Name field's value. +func (s *DeleteReservationOutput) SetName(v string) *DeleteReservationOutput { + s.Name = &v + return s +} - // InputSecurityGroupId is a required field - InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *DeleteReservationOutput) SetOfferingDescription(v string) *DeleteReservationOutput { + s.OfferingDescription = &v + return s } -// String returns the string representation -func (s DeleteInputSecurityGroupInput) String() string { - return awsutil.Prettify(s) +// SetOfferingId sets the OfferingId field's value. +func (s *DeleteReservationOutput) SetOfferingId(v string) *DeleteReservationOutput { + s.OfferingId = &v + return s } -// GoString returns the string representation -func (s DeleteInputSecurityGroupInput) GoString() string { - return s.String() +// SetOfferingType sets the OfferingType field's value. +func (s *DeleteReservationOutput) SetOfferingType(v string) *DeleteReservationOutput { + s.OfferingType = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInputSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInputSecurityGroupInput"} - if s.InputSecurityGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) - } +// SetRegion sets the Region field's value. +func (s *DeleteReservationOutput) SetRegion(v string) *DeleteReservationOutput { + s.Region = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetReservationId sets the ReservationId field's value. +func (s *DeleteReservationOutput) SetReservationId(v string) *DeleteReservationOutput { + s.ReservationId = &v + return s } -// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. -func (s *DeleteInputSecurityGroupInput) SetInputSecurityGroupId(v string) *DeleteInputSecurityGroupInput { - s.InputSecurityGroupId = &v +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *DeleteReservationOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DeleteReservationOutput { + s.ResourceSpecification = v return s } -type DeleteInputSecurityGroupOutput struct { - _ struct{} `type:"structure"` +// SetStart sets the Start field's value. +func (s *DeleteReservationOutput) SetStart(v string) *DeleteReservationOutput { + s.Start = &v + return s } -// String returns the string representation -func (s DeleteInputSecurityGroupOutput) String() string { - return awsutil.Prettify(s) +// SetState sets the State field's value. +func (s *DeleteReservationOutput) SetState(v string) *DeleteReservationOutput { + s.State = &v + return s } -// GoString returns the string representation -func (s DeleteInputSecurityGroupOutput) GoString() string { - return s.String() +// SetUsagePrice sets the UsagePrice field's value. +func (s *DeleteReservationOutput) SetUsagePrice(v float64) *DeleteReservationOutput { + s.UsagePrice = &v + return s } type DescribeChannelInput struct { @@ -4713,14 +5555,345 @@ func (s *DescribeInputSecurityGroupOutput) SetInputs(v []*string) *DescribeInput } // SetState sets the State field's value. -func (s *DescribeInputSecurityGroupOutput) SetState(v string) *DescribeInputSecurityGroupOutput { +func (s *DescribeInputSecurityGroupOutput) SetState(v string) *DescribeInputSecurityGroupOutput { + s.State = &v + return s +} + +// SetWhitelistRules sets the WhitelistRules field's value. +func (s *DescribeInputSecurityGroupOutput) SetWhitelistRules(v []*InputWhitelistRule) *DescribeInputSecurityGroupOutput { + s.WhitelistRules = v + return s +} + +type DescribeOfferingInput struct { + _ struct{} `type:"structure"` + + // OfferingId is a required field + OfferingId *string `location:"uri" locationName:"offeringId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeOfferingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOfferingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOfferingInput"} + if s.OfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("OfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DescribeOfferingInput) SetOfferingId(v string) *DescribeOfferingInput { + s.OfferingId = &v + return s +} + +type DescribeOfferingOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + Region *string `locationName:"region" type:"string"` + + // Resource configuration (codec, resolution, bitrate, ...) + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s DescribeOfferingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOfferingOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeOfferingOutput) SetArn(v string) *DescribeOfferingOutput { + s.Arn = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *DescribeOfferingOutput) SetCurrencyCode(v string) *DescribeOfferingOutput { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DescribeOfferingOutput) SetDuration(v int64) *DescribeOfferingOutput { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *DescribeOfferingOutput) SetDurationUnits(v string) *DescribeOfferingOutput { + s.DurationUnits = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *DescribeOfferingOutput) SetFixedPrice(v float64) *DescribeOfferingOutput { + s.FixedPrice = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *DescribeOfferingOutput) SetOfferingDescription(v string) *DescribeOfferingOutput { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DescribeOfferingOutput) SetOfferingId(v string) *DescribeOfferingOutput { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeOfferingOutput) SetOfferingType(v string) *DescribeOfferingOutput { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *DescribeOfferingOutput) SetRegion(v string) *DescribeOfferingOutput { + s.Region = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *DescribeOfferingOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DescribeOfferingOutput { + s.ResourceSpecification = v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *DescribeOfferingOutput) SetUsagePrice(v float64) *DescribeOfferingOutput { + s.UsagePrice = &v + return s +} + +type DescribeReservationInput struct { + _ struct{} `type:"structure"` + + // ReservationId is a required field + ReservationId *string `location:"uri" locationName:"reservationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeReservationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeReservationInput"} + if s.ReservationId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReservationId sets the ReservationId field's value. +func (s *DescribeReservationInput) SetReservationId(v string) *DescribeReservationInput { + s.ReservationId = &v + return s +} + +type DescribeReservationOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Count *int64 `locationName:"count" type:"integer"` + + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + End *string `locationName:"end" type:"string"` + + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + Name *string `locationName:"name" type:"string"` + + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + Region *string `locationName:"region" type:"string"` + + ReservationId *string `locationName:"reservationId" type:"string"` + + // Resource configuration (codec, resolution, bitrate, ...) + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + Start *string `locationName:"start" type:"string"` + + // Current reservation state + State *string `locationName:"state" type:"string" enum:"ReservationState"` + + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s DescribeReservationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservationOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeReservationOutput) SetArn(v string) *DescribeReservationOutput { + s.Arn = &v + return s +} + +// SetCount sets the Count field's value. +func (s *DescribeReservationOutput) SetCount(v int64) *DescribeReservationOutput { + s.Count = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *DescribeReservationOutput) SetCurrencyCode(v string) *DescribeReservationOutput { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DescribeReservationOutput) SetDuration(v int64) *DescribeReservationOutput { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *DescribeReservationOutput) SetDurationUnits(v string) *DescribeReservationOutput { + s.DurationUnits = &v + return s +} + +// SetEnd sets the End field's value. +func (s *DescribeReservationOutput) SetEnd(v string) *DescribeReservationOutput { + s.End = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *DescribeReservationOutput) SetFixedPrice(v float64) *DescribeReservationOutput { + s.FixedPrice = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeReservationOutput) SetName(v string) *DescribeReservationOutput { + s.Name = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *DescribeReservationOutput) SetOfferingDescription(v string) *DescribeReservationOutput { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DescribeReservationOutput) SetOfferingId(v string) *DescribeReservationOutput { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeReservationOutput) SetOfferingType(v string) *DescribeReservationOutput { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *DescribeReservationOutput) SetRegion(v string) *DescribeReservationOutput { + s.Region = &v + return s +} + +// SetReservationId sets the ReservationId field's value. +func (s *DescribeReservationOutput) SetReservationId(v string) *DescribeReservationOutput { + s.ReservationId = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *DescribeReservationOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DescribeReservationOutput { + s.ResourceSpecification = v + return s +} + +// SetStart sets the Start field's value. +func (s *DescribeReservationOutput) SetStart(v string) *DescribeReservationOutput { + s.Start = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeReservationOutput) SetState(v string) *DescribeReservationOutput { s.State = &v return s } -// SetWhitelistRules sets the WhitelistRules field's value. -func (s *DescribeInputSecurityGroupOutput) SetWhitelistRules(v []*InputWhitelistRule) *DescribeInputSecurityGroupOutput { - s.WhitelistRules = v +// SetUsagePrice sets the UsagePrice field's value. +func (s *DescribeReservationOutput) SetUsagePrice(v float64) *DescribeReservationOutput { + s.UsagePrice = &v return s } @@ -8164,6 +9337,272 @@ func (s *ListInputsOutput) SetNextToken(v string) *ListInputsOutput { return s } +type ListOfferingsInput struct { + _ struct{} `type:"structure"` + + ChannelConfiguration *string `location:"querystring" locationName:"channelConfiguration" type:"string"` + + Codec *string `location:"querystring" locationName:"codec" type:"string"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + MaximumBitrate *string `location:"querystring" locationName:"maximumBitrate" type:"string"` + + MaximumFramerate *string `location:"querystring" locationName:"maximumFramerate" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + Resolution *string `location:"querystring" locationName:"resolution" type:"string"` + + ResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` + + SpecialFeature *string `location:"querystring" locationName:"specialFeature" type:"string"` + + VideoQuality *string `location:"querystring" locationName:"videoQuality" type:"string"` +} + +// String returns the string representation +func (s ListOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOfferingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListOfferingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOfferingsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelConfiguration sets the ChannelConfiguration field's value. +func (s *ListOfferingsInput) SetChannelConfiguration(v string) *ListOfferingsInput { + s.ChannelConfiguration = &v + return s +} + +// SetCodec sets the Codec field's value. +func (s *ListOfferingsInput) SetCodec(v string) *ListOfferingsInput { + s.Codec = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListOfferingsInput) SetMaxResults(v int64) *ListOfferingsInput { + s.MaxResults = &v + return s +} + +// SetMaximumBitrate sets the MaximumBitrate field's value. +func (s *ListOfferingsInput) SetMaximumBitrate(v string) *ListOfferingsInput { + s.MaximumBitrate = &v + return s +} + +// SetMaximumFramerate sets the MaximumFramerate field's value. +func (s *ListOfferingsInput) SetMaximumFramerate(v string) *ListOfferingsInput { + s.MaximumFramerate = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOfferingsInput) SetNextToken(v string) *ListOfferingsInput { + s.NextToken = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *ListOfferingsInput) SetResolution(v string) *ListOfferingsInput { + s.Resolution = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListOfferingsInput) SetResourceType(v string) *ListOfferingsInput { + s.ResourceType = &v + return s +} + +// SetSpecialFeature sets the SpecialFeature field's value. +func (s *ListOfferingsInput) SetSpecialFeature(v string) *ListOfferingsInput { + s.SpecialFeature = &v + return s +} + +// SetVideoQuality sets the VideoQuality field's value. +func (s *ListOfferingsInput) SetVideoQuality(v string) *ListOfferingsInput { + s.VideoQuality = &v + return s +} + +type ListOfferingsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `locationName:"nextToken" type:"string"` + + Offerings []*Offering `locationName:"offerings" type:"list"` +} + +// String returns the string representation +func (s ListOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOfferingsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOfferingsOutput) SetNextToken(v string) *ListOfferingsOutput { + s.NextToken = &v + return s +} + +// SetOfferings sets the Offerings field's value. +func (s *ListOfferingsOutput) SetOfferings(v []*Offering) *ListOfferingsOutput { + s.Offerings = v + return s +} + +type ListReservationsInput struct { + _ struct{} `type:"structure"` + + Codec *string `location:"querystring" locationName:"codec" type:"string"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + MaximumBitrate *string `location:"querystring" locationName:"maximumBitrate" type:"string"` + + MaximumFramerate *string `location:"querystring" locationName:"maximumFramerate" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + Resolution *string `location:"querystring" locationName:"resolution" type:"string"` + + ResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` + + SpecialFeature *string `location:"querystring" locationName:"specialFeature" type:"string"` + + VideoQuality *string `location:"querystring" locationName:"videoQuality" type:"string"` +} + +// String returns the string representation +func (s ListReservationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListReservationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListReservationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListReservationsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodec sets the Codec field's value. +func (s *ListReservationsInput) SetCodec(v string) *ListReservationsInput { + s.Codec = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListReservationsInput) SetMaxResults(v int64) *ListReservationsInput { + s.MaxResults = &v + return s +} + +// SetMaximumBitrate sets the MaximumBitrate field's value. +func (s *ListReservationsInput) SetMaximumBitrate(v string) *ListReservationsInput { + s.MaximumBitrate = &v + return s +} + +// SetMaximumFramerate sets the MaximumFramerate field's value. +func (s *ListReservationsInput) SetMaximumFramerate(v string) *ListReservationsInput { + s.MaximumFramerate = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListReservationsInput) SetNextToken(v string) *ListReservationsInput { + s.NextToken = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *ListReservationsInput) SetResolution(v string) *ListReservationsInput { + s.Resolution = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListReservationsInput) SetResourceType(v string) *ListReservationsInput { + s.ResourceType = &v + return s +} + +// SetSpecialFeature sets the SpecialFeature field's value. +func (s *ListReservationsInput) SetSpecialFeature(v string) *ListReservationsInput { + s.SpecialFeature = &v + return s +} + +// SetVideoQuality sets the VideoQuality field's value. +func (s *ListReservationsInput) SetVideoQuality(v string) *ListReservationsInput { + s.VideoQuality = &v + return s +} + +type ListReservationsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `locationName:"nextToken" type:"string"` + + Reservations []*Reservation `locationName:"reservations" type:"list"` +} + +// String returns the string representation +func (s ListReservationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListReservationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListReservationsOutput) SetNextToken(v string) *ListReservationsOutput { + s.NextToken = &v + return s +} + +// SetReservations sets the Reservations field's value. +func (s *ListReservationsOutput) SetReservations(v []*Reservation) *ListReservationsOutput { + s.Reservations = v + return s +} + type M2tsSettings struct { _ struct{} `type:"structure"` @@ -9190,25 +10629,140 @@ type NetworkInputSettings struct { ServerValidation *string `locationName:"serverValidation" type:"string" enum:"NetworkInputServerValidation"` } -// String returns the string representation -func (s NetworkInputSettings) String() string { - return awsutil.Prettify(s) +// String returns the string representation +func (s NetworkInputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInputSettings) GoString() string { + return s.String() +} + +// SetHlsInputSettings sets the HlsInputSettings field's value. +func (s *NetworkInputSettings) SetHlsInputSettings(v *HlsInputSettings) *NetworkInputSettings { + s.HlsInputSettings = v + return s +} + +// SetServerValidation sets the ServerValidation field's value. +func (s *NetworkInputSettings) SetServerValidation(v string) *NetworkInputSettings { + s.ServerValidation = &v + return s +} + +// Reserved resources available for purchase +type Offering struct { + _ struct{} `type:"structure"` + + // Unique offering ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:offering:87654321' + Arn *string `locationName:"arn" type:"string"` + + // Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + // Lease duration, e.g. '12' + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + // One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + // Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard + // VQ in US West (Oregon)' + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + // Unique offering ID, e.g. '87654321' + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + // AWS region, e.g. 'us-west-2' + Region *string `locationName:"region" type:"string"` + + // Resource configuration details + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + // Recurring usage charge for each reserved resource, e.g. '157.0' + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s Offering) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Offering) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Offering) SetArn(v string) *Offering { + s.Arn = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *Offering) SetCurrencyCode(v string) *Offering { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *Offering) SetDuration(v int64) *Offering { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *Offering) SetDurationUnits(v string) *Offering { + s.DurationUnits = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *Offering) SetFixedPrice(v float64) *Offering { + s.FixedPrice = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *Offering) SetOfferingDescription(v string) *Offering { + s.OfferingDescription = &v + return s } -// GoString returns the string representation -func (s NetworkInputSettings) GoString() string { - return s.String() +// SetOfferingId sets the OfferingId field's value. +func (s *Offering) SetOfferingId(v string) *Offering { + s.OfferingId = &v + return s } -// SetHlsInputSettings sets the HlsInputSettings field's value. -func (s *NetworkInputSettings) SetHlsInputSettings(v *HlsInputSettings) *NetworkInputSettings { - s.HlsInputSettings = v +// SetOfferingType sets the OfferingType field's value. +func (s *Offering) SetOfferingType(v string) *Offering { + s.OfferingType = &v return s } -// SetServerValidation sets the ServerValidation field's value. -func (s *NetworkInputSettings) SetServerValidation(v string) *NetworkInputSettings { - s.ServerValidation = &v +// SetRegion sets the Region field's value. +func (s *Offering) SetRegion(v string) *Offering { + s.Region = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *Offering) SetResourceSpecification(v *ReservationResourceSpecification) *Offering { + s.ResourceSpecification = v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *Offering) SetUsagePrice(v float64) *Offering { + s.UsagePrice = &v return s } @@ -9659,6 +11213,92 @@ func (s PassThroughSettings) GoString() string { return s.String() } +type PurchaseOfferingInput struct { + _ struct{} `type:"structure"` + + Count *int64 `locationName:"count" min:"1" type:"integer"` + + Name *string `locationName:"name" type:"string"` + + // OfferingId is a required field + OfferingId *string `location:"uri" locationName:"offeringId" type:"string" required:"true"` + + RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` +} + +// String returns the string representation +func (s PurchaseOfferingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseOfferingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseOfferingInput"} + if s.Count != nil && *s.Count < 1 { + invalidParams.Add(request.NewErrParamMinValue("Count", 1)) + } + if s.OfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("OfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCount sets the Count field's value. +func (s *PurchaseOfferingInput) SetCount(v int64) *PurchaseOfferingInput { + s.Count = &v + return s +} + +// SetName sets the Name field's value. +func (s *PurchaseOfferingInput) SetName(v string) *PurchaseOfferingInput { + s.Name = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *PurchaseOfferingInput) SetOfferingId(v string) *PurchaseOfferingInput { + s.OfferingId = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *PurchaseOfferingInput) SetRequestId(v string) *PurchaseOfferingInput { + s.RequestId = &v + return s +} + +type PurchaseOfferingOutput struct { + _ struct{} `type:"structure"` + + // Reserved resources available to use + Reservation *Reservation `locationName:"reservation" type:"structure"` +} + +// String returns the string representation +func (s PurchaseOfferingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseOfferingOutput) GoString() string { + return s.String() +} + +// SetReservation sets the Reservation field's value. +func (s *PurchaseOfferingOutput) SetReservation(v *Reservation) *PurchaseOfferingOutput { + s.Reservation = v + return s +} + type RemixSettings struct { _ struct{} `type:"structure"` @@ -9731,6 +11371,253 @@ func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { return s } +// Reserved resources available to use +type Reservation struct { + _ struct{} `type:"structure"` + + // Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567' + Arn *string `locationName:"arn" type:"string"` + + // Number of reserved resources + Count *int64 `locationName:"count" type:"integer"` + + // Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + // Lease duration, e.g. '12' + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + // Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00' + End *string `locationName:"end" type:"string"` + + // One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + // User specified reservation name + Name *string `locationName:"name" type:"string"` + + // Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard + // VQ in US West (Oregon)' + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + // Unique offering ID, e.g. '87654321' + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + // AWS region, e.g. 'us-west-2' + Region *string `locationName:"region" type:"string"` + + // Unique reservation ID, e.g. '1234567' + ReservationId *string `locationName:"reservationId" type:"string"` + + // Resource configuration details + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + // Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00' + Start *string `locationName:"start" type:"string"` + + // Current state of reservation, e.g. 'ACTIVE' + State *string `locationName:"state" type:"string" enum:"ReservationState"` + + // Recurring usage charge for each reserved resource, e.g. '157.0' + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s Reservation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Reservation) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Reservation) SetArn(v string) *Reservation { + s.Arn = &v + return s +} + +// SetCount sets the Count field's value. +func (s *Reservation) SetCount(v int64) *Reservation { + s.Count = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *Reservation) SetCurrencyCode(v string) *Reservation { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *Reservation) SetDuration(v int64) *Reservation { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *Reservation) SetDurationUnits(v string) *Reservation { + s.DurationUnits = &v + return s +} + +// SetEnd sets the End field's value. +func (s *Reservation) SetEnd(v string) *Reservation { + s.End = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *Reservation) SetFixedPrice(v float64) *Reservation { + s.FixedPrice = &v + return s +} + +// SetName sets the Name field's value. +func (s *Reservation) SetName(v string) *Reservation { + s.Name = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *Reservation) SetOfferingDescription(v string) *Reservation { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *Reservation) SetOfferingId(v string) *Reservation { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *Reservation) SetOfferingType(v string) *Reservation { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *Reservation) SetRegion(v string) *Reservation { + s.Region = &v + return s +} + +// SetReservationId sets the ReservationId field's value. +func (s *Reservation) SetReservationId(v string) *Reservation { + s.ReservationId = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *Reservation) SetResourceSpecification(v *ReservationResourceSpecification) *Reservation { + s.ResourceSpecification = v + return s +} + +// SetStart sets the Start field's value. +func (s *Reservation) SetStart(v string) *Reservation { + s.Start = &v + return s +} + +// SetState sets the State field's value. +func (s *Reservation) SetState(v string) *Reservation { + s.State = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *Reservation) SetUsagePrice(v float64) *Reservation { + s.UsagePrice = &v + return s +} + +// Resource configuration (codec, resolution, bitrate, ...) +type ReservationResourceSpecification struct { + _ struct{} `type:"structure"` + + // Codec, e.g. 'AVC' + Codec *string `locationName:"codec" type:"string" enum:"ReservationCodec"` + + // Maximum bitrate, e.g. 'MAX_20_MBPS' + MaximumBitrate *string `locationName:"maximumBitrate" type:"string" enum:"ReservationMaximumBitrate"` + + // Maximum framerate, e.g. 'MAX_30_FPS' (Outputs only) + MaximumFramerate *string `locationName:"maximumFramerate" type:"string" enum:"ReservationMaximumFramerate"` + + // Resolution, e.g. 'HD' + Resolution *string `locationName:"resolution" type:"string" enum:"ReservationResolution"` + + // Resource type, 'INPUT', 'OUTPUT', or 'CHANNEL' + ResourceType *string `locationName:"resourceType" type:"string" enum:"ReservationResourceType"` + + // Special feature, e.g. 'AUDIO_NORMALIZATION' (Channels only) + SpecialFeature *string `locationName:"specialFeature" type:"string" enum:"ReservationSpecialFeature"` + + // Video quality, e.g. 'STANDARD' (Outputs only) + VideoQuality *string `locationName:"videoQuality" type:"string" enum:"ReservationVideoQuality"` +} + +// String returns the string representation +func (s ReservationResourceSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservationResourceSpecification) GoString() string { + return s.String() +} + +// SetCodec sets the Codec field's value. +func (s *ReservationResourceSpecification) SetCodec(v string) *ReservationResourceSpecification { + s.Codec = &v + return s +} + +// SetMaximumBitrate sets the MaximumBitrate field's value. +func (s *ReservationResourceSpecification) SetMaximumBitrate(v string) *ReservationResourceSpecification { + s.MaximumBitrate = &v + return s +} + +// SetMaximumFramerate sets the MaximumFramerate field's value. +func (s *ReservationResourceSpecification) SetMaximumFramerate(v string) *ReservationResourceSpecification { + s.MaximumFramerate = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *ReservationResourceSpecification) SetResolution(v string) *ReservationResourceSpecification { + s.Resolution = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ReservationResourceSpecification) SetResourceType(v string) *ReservationResourceSpecification { + s.ResourceType = &v + return s +} + +// SetSpecialFeature sets the SpecialFeature field's value. +func (s *ReservationResourceSpecification) SetSpecialFeature(v string) *ReservationResourceSpecification { + s.SpecialFeature = &v + return s +} + +// SetVideoQuality sets the VideoQuality field's value. +func (s *ReservationResourceSpecification) SetVideoQuality(v string) *ReservationResourceSpecification { + s.VideoQuality = &v + return s +} + type RtmpCaptionInfoDestinationSettings struct { _ struct{} `type:"structure"` } @@ -12887,6 +14774,115 @@ const ( NetworkInputServerValidationCheckCryptographyOnly = "CHECK_CRYPTOGRAPHY_ONLY" ) +// Units for duration, e.g. 'MONTHS' +const ( + // OfferingDurationUnitsMonths is a OfferingDurationUnits enum value + OfferingDurationUnitsMonths = "MONTHS" +) + +// Offering type, e.g. 'NO_UPFRONT' +const ( + // OfferingTypeNoUpfront is a OfferingType enum value + OfferingTypeNoUpfront = "NO_UPFRONT" +) + +// Codec, 'MPEG2', 'AVC', 'HEVC', or 'AUDIO' +const ( + // ReservationCodecMpeg2 is a ReservationCodec enum value + ReservationCodecMpeg2 = "MPEG2" + + // ReservationCodecAvc is a ReservationCodec enum value + ReservationCodecAvc = "AVC" + + // ReservationCodecHevc is a ReservationCodec enum value + ReservationCodecHevc = "HEVC" + + // ReservationCodecAudio is a ReservationCodec enum value + ReservationCodecAudio = "AUDIO" +) + +// Maximum bitrate in megabits per second +const ( + // ReservationMaximumBitrateMax10Mbps is a ReservationMaximumBitrate enum value + ReservationMaximumBitrateMax10Mbps = "MAX_10_MBPS" + + // ReservationMaximumBitrateMax20Mbps is a ReservationMaximumBitrate enum value + ReservationMaximumBitrateMax20Mbps = "MAX_20_MBPS" + + // ReservationMaximumBitrateMax50Mbps is a ReservationMaximumBitrate enum value + ReservationMaximumBitrateMax50Mbps = "MAX_50_MBPS" +) + +// Maximum framerate in frames per second (Outputs only) +const ( + // ReservationMaximumFramerateMax30Fps is a ReservationMaximumFramerate enum value + ReservationMaximumFramerateMax30Fps = "MAX_30_FPS" + + // ReservationMaximumFramerateMax60Fps is a ReservationMaximumFramerate enum value + ReservationMaximumFramerateMax60Fps = "MAX_60_FPS" +) + +// Resolution based on lines of vertical resolution; SD is less than 720 lines, +// HD is 720 to 1080 lines, UHD is greater than 1080 lines +const ( + // ReservationResolutionSd is a ReservationResolution enum value + ReservationResolutionSd = "SD" + + // ReservationResolutionHd is a ReservationResolution enum value + ReservationResolutionHd = "HD" + + // ReservationResolutionUhd is a ReservationResolution enum value + ReservationResolutionUhd = "UHD" +) + +// Resource type, 'INPUT', 'OUTPUT', or 'CHANNEL' +const ( + // ReservationResourceTypeInput is a ReservationResourceType enum value + ReservationResourceTypeInput = "INPUT" + + // ReservationResourceTypeOutput is a ReservationResourceType enum value + ReservationResourceTypeOutput = "OUTPUT" + + // ReservationResourceTypeChannel is a ReservationResourceType enum value + ReservationResourceTypeChannel = "CHANNEL" +) + +// Special features, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION' +const ( + // ReservationSpecialFeatureAdvancedAudio is a ReservationSpecialFeature enum value + ReservationSpecialFeatureAdvancedAudio = "ADVANCED_AUDIO" + + // ReservationSpecialFeatureAudioNormalization is a ReservationSpecialFeature enum value + ReservationSpecialFeatureAudioNormalization = "AUDIO_NORMALIZATION" +) + +// Current reservation state +const ( + // ReservationStateActive is a ReservationState enum value + ReservationStateActive = "ACTIVE" + + // ReservationStateExpired is a ReservationState enum value + ReservationStateExpired = "EXPIRED" + + // ReservationStateCanceled is a ReservationState enum value + ReservationStateCanceled = "CANCELED" + + // ReservationStateDeleted is a ReservationState enum value + ReservationStateDeleted = "DELETED" +) + +// Video quality, e.g. 'STANDARD' (Outputs only) +const ( + // ReservationVideoQualityStandard is a ReservationVideoQuality enum value + ReservationVideoQualityStandard = "STANDARD" + + // ReservationVideoQualityEnhanced is a ReservationVideoQuality enum value + ReservationVideoQualityEnhanced = "ENHANCED" + + // ReservationVideoQualityPremium is a ReservationVideoQuality enum value + ReservationVideoQualityPremium = "PREMIUM" +) + const ( // RtmpCacheFullBehaviorDisconnectImmediately is a RtmpCacheFullBehavior enum value RtmpCacheFullBehaviorDisconnectImmediately = "DISCONNECT_IMMEDIATELY" diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go index 669f396c46f..582d570f177 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "medialive" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "MediaLive" // ServiceID is a unique identifer of a specific service + ServiceName = "medialive" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaLive" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MediaLive client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go index b91a6bc1d89..96dd74dcf3d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "mediapackage" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "MediaPackage" // ServiceID is a unique identifer of a specific service + ServiceName = "mediapackage" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaPackage" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MediaPackage client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go index bfc2d35ee37..492b3bf04c3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "mediastore" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "MediaStore" // ServiceID is a unique identifer of a specific service + ServiceName = "mediastore" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaStore" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MediaStore client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go index e51161f936b..4203140146d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "data.mediastore" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "MediaStore Data" // ServiceID is a unique identifer of a specific service + ServiceName = "data.mediastore" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaStore Data" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MediaStoreData client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go b/vendor/github.com/aws/aws-sdk-go/service/mq/service.go index 127c29625c4..1ebb5aeca21 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mq/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "mq" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "mq" // ServiceID is a unique identifer of a specific service + ServiceName = "mq" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "mq" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the MQ client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go index c8e01602534..ecf6f2b286b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go @@ -7550,23 +7550,8 @@ type CreateDBInstanceInput struct { // Valid Values: 0 - 15 PromotionTier *int64 `type:"integer"` - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. - // - // Default: The default behavior varies depending on whether a VPC has been - // requested or not. The following list shows the default behavior in each case. - // - // * Default VPC: true - // - // * VPC: false - // - // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is publicly accessible. If a specific - // DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is private. - PubliclyAccessible *bool `type:"boolean"` + // This parameter is not supported. + PubliclyAccessible *bool `deprecated:"true" type:"boolean"` // Specifies whether the DB instance is encrypted. // @@ -9410,23 +9395,8 @@ type DBInstance struct { // primary instance after a failure of the existing primary instance. PromotionTier *int64 `type:"integer"` - // Specifies the accessibility options for the DB instance. A value of true - // specifies an Internet-facing instance with a publicly resolvable DNS name, - // which resolves to a public IP address. A value of false specifies an internal - // instance with a DNS name that resolves to a private IP address. - // - // Default: The default behavior varies depending on whether a VPC has been - // requested or not. The following list shows the default behavior in each case. - // - // * Default VPC:true - // - // * VPC:false - // - // If no DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is publicly accessible. If a specific - // DB subnet group has been specified as part of the request and the PubliclyAccessible - // value has not been set, the DB instance is private. - PubliclyAccessible *bool `type:"boolean"` + // This parameter is not supported. + PubliclyAccessible *bool `deprecated:"true" type:"boolean"` // Contains one or more identifiers of DB clusters that are Read Replicas of // this DB instance. @@ -14118,20 +14088,8 @@ type ModifyDBInstanceInput struct { // Valid Values: 0 - 15 PromotionTier *int64 `type:"integer"` - // Boolean value that indicates if the DB instance has a publicly resolvable - // DNS name. Set to True to make the DB instance Internet-facing with a publicly - // resolvable DNS name, which resolves to a public IP address. Set to False - // to make the DB instance internal with a DNS name that resolves to a private - // IP address. - // - // The DB instance must be part of a public subnet and PubliclyAccessible must - // be true in order for it to be publicly accessible. - // - // Changes to the PubliclyAccessible parameter are applied immediately regardless - // of the value of the ApplyImmediately parameter. - // - // Default: false - PubliclyAccessible *bool `type:"boolean"` + // This parameter is not supported. + PubliclyAccessible *bool `deprecated:"true" type:"boolean"` // Specifies the storage type to be associated with the DB instance. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go index 54a9c745172..3ddc5e5fba7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "rds" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Neptune" // ServiceID is a unique identifer of a specific service + ServiceName = "rds" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Neptune" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Neptune client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go index e8db18bd408..a1a8307cae4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "opsworks" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "OpsWorks" // ServiceID is a unique identifer of a specific service + ServiceName = "opsworks" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "OpsWorks" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the OpsWorks client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go index aa36b74343d..565c1715f3c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "organizations" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Organizations" // ServiceID is a unique identifer of a specific service + ServiceName = "organizations" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Organizations" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Organizations client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index a2a9197d2d0..51b8dcf6bb7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -8861,6 +8861,10 @@ func (c *RDS) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSna // * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" // An error occurred accessing an AWS KMS key. // +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter +// group. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterFromSnapshot func (c *RDS) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { req, out := c.RestoreDBClusterFromSnapshotRequest(input) @@ -9005,6 +9009,10 @@ func (c *RDS) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPoin // The request would result in the user exceeding the allowed amount of storage // available across all DB instances. // +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter +// group. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBClusterToPointInTime func (c *RDS) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { req, out := c.RestoreDBClusterToPointInTimeRequest(input) @@ -9165,6 +9173,9 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" // Domain doesn't refer to an existing Active Directory domain. // +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot func (c *RDS) RestoreDBInstanceFromDBSnapshot(input *RestoreDBInstanceFromDBSnapshotInput) (*RestoreDBInstanceFromDBSnapshotOutput, error) { req, out := c.RestoreDBInstanceFromDBSnapshotRequest(input) @@ -9462,6 +9473,9 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" // Domain doesn't refer to an existing Active Directory domain. // +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime func (c *RDS) RestoreDBInstanceToPointInTime(input *RestoreDBInstanceToPointInTimeInput) (*RestoreDBInstanceToPointInTimeOutput, error) { req, out := c.RestoreDBInstanceToPointInTimeRequest(input) @@ -12682,6 +12696,10 @@ type CreateDBInstanceInput struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The port number on which the database accepts connections. // // MySQL @@ -13052,6 +13070,12 @@ func (s *CreateDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *Create return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *CreateDBInstanceInput) SetPerformanceInsightsRetentionPeriod(v int64) *CreateDBInstanceInput { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPort sets the Port field's value. func (s *CreateDBInstanceInput) SetPort(v int64) *CreateDBInstanceInput { s.Port = &v @@ -13301,6 +13325,10 @@ type CreateDBInstanceReadReplicaInput struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The port number that the DB instance uses for connections. // // Default: Inherits from the source DB instance @@ -13551,6 +13579,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetPerformanceInsightsKMSKeyId(v stri return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *CreateDBInstanceReadReplicaInput) SetPerformanceInsightsRetentionPeriod(v int64) *CreateDBInstanceReadReplicaInput { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPort sets the Port field's value. func (s *CreateDBInstanceReadReplicaInput) SetPort(v int64) *CreateDBInstanceReadReplicaInput { s.Port = &v @@ -13638,6 +13672,13 @@ type CreateDBParameterGroupInput struct { // to a DB instance running a database engine and engine version compatible // with that DB parameter group family. // + // To list all of the available parameter group families, use the following + // command: + // + // aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" + // + // The output contains duplicates. + // // DBParameterGroupFamily is a required field DBParameterGroupFamily *string `type:"string" required:"true"` @@ -15540,6 +15581,10 @@ type DBInstance struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // Specifies the daily time range during which automated backups are created // if automated backups are enabled, as determined by the BackupRetentionPeriod. PreferredBackupWindow *string `type:"string"` @@ -15853,6 +15898,12 @@ func (s *DBInstance) SetPerformanceInsightsKMSKeyId(v string) *DBInstance { return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *DBInstance) SetPerformanceInsightsRetentionPeriod(v int64) *DBInstance { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPreferredBackupWindow sets the PreferredBackupWindow field's value. func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { s.PreferredBackupWindow = &v @@ -22929,6 +22980,10 @@ type ModifyDBInstanceInput struct { // KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The daily time range during which automated backups are created if automated // backups are enabled, as determined by the BackupRetentionPeriod parameter. // Changing this parameter doesn't result in an outage and the change is asynchronously @@ -23236,6 +23291,12 @@ func (s *ModifyDBInstanceInput) SetPerformanceInsightsKMSKeyId(v string) *Modify return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *ModifyDBInstanceInput) SetPerformanceInsightsRetentionPeriod(v int64) *ModifyDBInstanceInput { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPreferredBackupWindow sets the PreferredBackupWindow field's value. func (s *ModifyDBInstanceInput) SetPreferredBackupWindow(v string) *ModifyDBInstanceInput { s.PreferredBackupWindow = &v @@ -27917,6 +27978,10 @@ type RestoreDBInstanceFromS3Input struct { // the KMS key alias for the KMS encryption key. PerformanceInsightsKMSKeyId *string `type:"string"` + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). + PerformanceInsightsRetentionPeriod *int64 `type:"integer"` + // The port number on which the database accepts connections. // // Type: Integer @@ -28214,6 +28279,12 @@ func (s *RestoreDBInstanceFromS3Input) SetPerformanceInsightsKMSKeyId(v string) return s } +// SetPerformanceInsightsRetentionPeriod sets the PerformanceInsightsRetentionPeriod field's value. +func (s *RestoreDBInstanceFromS3Input) SetPerformanceInsightsRetentionPeriod(v int64) *RestoreDBInstanceFromS3Input { + s.PerformanceInsightsRetentionPeriod = &v + return s +} + // SetPort sets the Port field's value. func (s *RestoreDBInstanceFromS3Input) SetPort(v int64) *RestoreDBInstanceFromS3Input { s.Port = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/service.go b/vendor/github.com/aws/aws-sdk-go/service/rds/service.go index 473984a9113..f2d0efaf7d0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "rds" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "RDS" // ServiceID is a unique identifer of a specific service + ServiceName = "rds" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "RDS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the RDS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go index 5791ac2a73e..a750d141c62 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "redshift" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Redshift" // ServiceID is a unique identifer of a specific service + ServiceName = "redshift" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Redshift" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Redshift client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/service.go b/vendor/github.com/aws/aws-sdk-go/service/route53/service.go index e56a34e1c75..dd22cb2cd84 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "route53" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Route 53" // ServiceID is a unique identifer of a specific service + ServiceName = "route53" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Route 53" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the Route53 client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index f887cb8b38f..07fc06af1f9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/eventstream" @@ -6062,6 +6063,7 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r output = &SelectObjectContentOutput{} req = c.newRequest(op, input, output) + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler) req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop) return diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go index 775f235c5a4..20de53f29d7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "s3" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "S3" // ServiceID is a unique identifer of a specific service + ServiceName = "s3" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "S3" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the S3 client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go index 8e827a185ae..f21c94c7949 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sagemaker" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SageMaker" // ServiceID is a unique identifer of a specific service + ServiceName = "sagemaker" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SageMaker" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SageMaker client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go index 743cfadbe1b..c4758e96dac 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "secretsmanager" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Secrets Manager" // ServiceID is a unique identifer of a specific service + ServiceName = "secretsmanager" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Secrets Manager" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SecretsManager client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go index 10a42b5036d..f15a5b8024d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "servicecatalog" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "Service Catalog" // ServiceID is a unique identifer of a specific service + ServiceName = "servicecatalog" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Service Catalog" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ServiceCatalog client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go index 4cf300aa387..b5c177a62d4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "servicediscovery" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "ServiceDiscovery" // ServiceID is a unique identifer of a specific service + ServiceName = "servicediscovery" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ServiceDiscovery" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ServiceDiscovery client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go b/vendor/github.com/aws/aws-sdk-go/service/ses/service.go index 9f2f33508ae..0e33b771f53 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "email" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SES" // ServiceID is a unique identifer of a specific service + ServiceName = "email" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SES" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SES client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go index eeb5a50b598..2436268f075 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "states" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SFN" // ServiceID is a unique identifer of a specific service + ServiceName = "states" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SFN" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SFN client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go index 36da84455ae..d4de27413cb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/simpledb/service.go @@ -30,9 +30,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sdb" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SimpleDB" // ServiceID is a unique identifer of a specific service + ServiceName = "sdb" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SimpleDB" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SimpleDB client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/service.go b/vendor/github.com/aws/aws-sdk-go/service/sns/service.go index faab65ecdc2..96d7c8ba05c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sns" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SNS" // ServiceID is a unique identifer of a specific service + ServiceName = "sns" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SNS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SNS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go index a3a3dc22fe2..d463ecf0ddb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sqs" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SQS" // ServiceID is a unique identifer of a specific service + ServiceName = "sqs" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SQS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SQS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index e4bc51877ec..b476871388a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -3142,6 +3142,10 @@ func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformat // information for all your instances. If you specify an instance ID that is // not valid or an instance that you do not own, you receive an error. // +// The IamRole field for this API action is the Amazon Identity and Access Management +// (IAM) role assigned to on-premises instances. This call does not return the +// IAM role for Amazon EC2 instances. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -24970,6 +24974,50 @@ func (s *PatchComplianceData) SetTitle(v string) *PatchComplianceData { // // * Low // +// Amazon Linux 2 Operating Systems +// +// The supported keys for Amazon Linux 2 operating systems are PRODUCT, CLASSIFICATION, +// and SEVERITY. See the following lists for valid values for each of these +// keys. +// +// Supported key:PRODUCT +// +// Supported values: +// +// * AmazonLinux2 +// +// * AmazonLinux2.0 +// +// * * +// +// Use a wildcard character (*) to target all supported operating system versions. +// +// Supported key:CLASSIFICATION +// +// Supported values: +// +// * Security +// +// * Bugfix +// +// * Enhancement +// +// * Recommended +// +// * Newpackage +// +// Supported key:SEVERITY +// +// Supported values: +// +// * Critical +// +// * Important +// +// * Medium +// +// * Low +// // RedHat Enterprise Linux (RHEL) Operating Systems // // The supported keys for RedHat Enterprise Linux operating systems are PRODUCT, @@ -30184,6 +30232,9 @@ const ( // OperatingSystemAmazonLinux is a OperatingSystem enum value OperatingSystemAmazonLinux = "AMAZON_LINUX" + // OperatingSystemAmazonLinux2 is a OperatingSystem enum value + OperatingSystemAmazonLinux2 = "AMAZON_LINUX_2" + // OperatingSystemUbuntu is a OperatingSystem enum value OperatingSystemUbuntu = "UBUNTU" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go index 1d8c43537ff..9a6b8f71c22 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ssm" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SSM" // ServiceID is a unique identifer of a specific service + ServiceName = "ssm" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SSM" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SSM client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go index 15ab7b46ede..185c914d1b3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "sts" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "STS" // ServiceID is a unique identifer of a specific service + ServiceName = "sts" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "STS" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the STS client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/service.go b/vendor/github.com/aws/aws-sdk-go/service/swf/service.go index 1d550c296ea..014d89a5241 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "swf" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "SWF" // ServiceID is a unique identifer of a specific service + ServiceName = "swf" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "SWF" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the SWF client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/service.go b/vendor/github.com/aws/aws-sdk-go/service/waf/service.go index 78d45b82b64..09bf43d9eeb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "waf" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "WAF" // ServiceID is a unique identifer of a specific service + ServiceName = "waf" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "WAF" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the WAF client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go index 6ba69bed320..3a267ae6360 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "waf-regional" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "WAF Regional" // ServiceID is a unique identifer of a specific service + ServiceName = "waf-regional" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "WAF Regional" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the WAFRegional client with a session. diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go index f282a95d752..38e1cc2ee1f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "workspaces" // Service endpoint prefix API calls made to. - EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. - ServiceID = "WorkSpaces" // ServiceID is a unique identifer of a specific service + ServiceName = "workspaces" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "WorkSpaces" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the WorkSpaces client with a session. diff --git a/vendor/vendor.json b/vendor/vendor.json index 6adc31c35ea..a1877ca6580 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,956 +39,956 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "fs4F1ZnfU4kbpNvgnBd6nxcejGM=", + "checksumSHA1": "c9/ZRCZXp9Q2wzRTWiEC6JAlC/g=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "hicPtITUionsA+dgs1SpsZUkQu4=", + "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "925zPp8gtaXi2gkWrgZ1gAA003A=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "W4R+WW4t2Ty5mbKypFoATk3tqTA=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "grMynvpfyTKuULQ6KFTZqQFA76M=", + "checksumSHA1": "SiJtmziOCUHNwVwWjrD5ccxbEN0=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "CYLheDSqXftEAmmdj+tTiT+83Ko=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "+d8hhT6Ih+DsRpkF44pvw+IkI7w=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "u3cA2IiD36A+VnFIH7XtGjYk2NU=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "Ij9RP5HrBWBYYb3/LEMHNNZXH9g=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "2ywNMWQ3qxbz/dzuuOC/42xXzWM=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "/JJPEdYxSgTTDqUDTAaSJQSKNn0=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "/2Ppb4vP/H+B3cM7bOOEeA7Z0iY=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "6zosteWJqUGM9+t9dkANQymMA9s=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "icNLLSAexjtbkVyi/mEoowKn7TM=", + "checksumSHA1": "ZXFD3oHS8QZ3GgWn+k4lMnUaEUk=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "HplIlQpFWtaMwe0olJfmoo3sJcc=", + "checksumSHA1": "k1TqEWHeP84mmRewv19ZVORhSm8=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "ATvLk4/ffZU/b15zvZUJTqXrLj4=", + "checksumSHA1": "MKWkj+pGwGygVTVTg/Q38JY+mhU=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "WueKFMAZM7iPJSihPp/0Mry3b5w=", + "checksumSHA1": "hq8SWUb/J1wEZ1O3TkV8xma5EXk=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "nzUGe3sO4xxtH83cw7rBZq9lyiI=", + "checksumSHA1": "NaaFnxUCj2cKaWagwc9ZP6Su2UQ=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "dN8v1XcKbVAkfnw+MuQhbip9jTw=", + "checksumSHA1": "/nF1VEl/Y9I9EYbUHvUuhqjipUk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "AnXBeqOKS0ad/OmaN9QlFCgSdeY=", + "checksumSHA1": "kko+es9ly+l/e9ngcpCdPx2DBAc=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "z0/DLuHQZzChNvLzUInKV+Lev/k=", + "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "s+CV8CfnX7YJLG0zcAa+gvTrq9g=", + "checksumSHA1": "kHOf0VEd2Qy8PYZsg7/zG+JkF1o=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "yZLZ2ku9xdQHGbOmWBAqUQFtpg0=", + "checksumSHA1": "gJiK41PSoCEfE02VEry4f6nBg0s=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "lKIc8G2LzbdDilnsUdPFzXpIZN0=", + "checksumSHA1": "bbCNma+YJRqcjnIqmTagqs1IwWI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "qGchJkU7EOQ6+Sw97pYZ5jNdemE=", + "checksumSHA1": "qbncX66lCkonIyPd/YimSRtSzhI=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "Cw8nuWo0kgac7Ospu6pcPiWGLP8=", + "checksumSHA1": "P8cLAj/ovFt7uH3bB4dRg/2KApI=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "UpLN7n+Gh5GH4MQxaAz8rv8jJXg=", + "checksumSHA1": "eCrAi2QJw0Ft6A8XK5ZGLpsPKwM=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "TI5seh5lq95G6sAl8zvjPAYbPrE=", + "checksumSHA1": "ItkRLsVGZt8uvkI4+7+mi9Ccy28=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "N4DxAf2obzkWyhZXi6sjzvrvfkE=", + "checksumSHA1": "Y+x1N7TFB7OesWPRoYXRwGOdQzs=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "k8qFGvgSm7+IxvsBwubScOheA5I=", + "checksumSHA1": "PxsIahbkFuks12VthBlqFJIUzX0=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "gyc9YgSiM3BUm0xq2bq6wAjIye4=", + "checksumSHA1": "ciAsJhe41ygl47dhStzMJfGVFPQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "nRCAv4j8pK6Yo0Cct1sO6UqtUsc=", + "checksumSHA1": "tHLvGt81PahiKYHOXlF7bFvE9cE=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "PkFtAdj1+DkwlDynYcA0qk0Ie1Q=", + "checksumSHA1": "Q+W+AVveTI7xM3ay6HAi0FB4Dpc=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "jNdpbNmmirlluTWU9FFUIOcOtOw=", + "checksumSHA1": "6lozLpoMkQvw1r2cZMXujYiLqK8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "hrxEpIJA4pw/QIvsQGRA5ie8u3Q=", + "checksumSHA1": "uIURH7FXD0WRKqSv2uNsMM4a1nE=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "VICTgoxfIUQDmEPzz/x+vNAVWdU=", + "checksumSHA1": "iPP1QQAsTiK0TYWVn7ksDLfDXDE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "SsvLlbsC9ivlJ8HNE4/EpFXlJSE=", + "checksumSHA1": "JbgQL/r+cBKIKt+tQY8VSj0C2j8=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "OHN5BEcmi7CJIlx+6Uze+aMA49s=", + "checksumSHA1": "orboEPrXFUPc3m7ZG8uPhZNZDdM=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "5tc1cqGB2fQvgbm5Dy2xRkw5hAU=", + "checksumSHA1": "C0by27wccwVfdXwaNNyvDEYUPdA=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "NzIc6fQDS/r7cPiS+mymXIwAZ2o=", + "checksumSHA1": "/zBS/FARxFnNMfLUg1Vq1FVK95c=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "o0nYsx8mGrJEAVhwJIfxnRDb93I=", + "checksumSHA1": "olDBindEWwTHzKfpWaS+xID4y90=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "txT38J2l/2IRxx0zBfLgo6wfsCk=", + "checksumSHA1": "i7fuDfXYhe4JMJhail5nZUg69Dk=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "yp4/e0fwfubFFvVwf5fjCq8+g8A=", + "checksumSHA1": "jURA8oKlQkbYPPrBQIeOPbQAVN0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "MzEHDd8iHphIPbECDHlLrJaChaQ=", + "checksumSHA1": "GFq6SaQ4h48iP+gjllWjMyIbQfU=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "cuffkFl2LN+J/n8KG7pi3DL4+W0=", + "checksumSHA1": "SfYmxNsUZdSLy6VahSyRVaACeSU=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "IVYXmukn+rPCj0Sq/VEdnXIbams=", + "checksumSHA1": "T4Yw3GPZg+KwAEudsypRfhbUrVw=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "xQUSLO+otgiCywMlVCyeCitD644=", + "checksumSHA1": "niBN6QYBEhoHvxQpSH8qWjEMNYo=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "65m8IegeLtRStO3Vlsk1n1xjctk=", + "checksumSHA1": "cmqLlPyg/fwIy8M3qaZTdBt0CGQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "b94Lg6Cd3RFRKfKBrOVpjkrVh/Y=", + "checksumSHA1": "mzgRjocmzU6VLUsim7E8/fffffk=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "z9BRP3NdNqas2z81TySw2dujS3A=", + "checksumSHA1": "A5DCzVFhE5iT60fQXjlyLDHKFsg=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "wVSdzCjBAE3enZXGlQqQhwe1t84=", + "checksumSHA1": "qMusrd+gH5em91bS9/tvXBfnivQ=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "iGNKg4PFBRfB6DX3TMv6K2sP7QQ=", + "checksumSHA1": "aNIs4oJTp3x73Fx24tKO2cDY5OM=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "XSffwdsnhaFywzoP2yxkjPaJf1Y=", + "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "dRf+FPPbJm74GqF3BDbaoaf5KbM=", + "checksumSHA1": "cRuJDtc9rVpXUqfLrg1cJleaPjQ=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "tnBLz+je0qxfYTfOWqZVyzCVajI=", + "checksumSHA1": "XKNeVP6DCohd9Re9g4xGLuqXe0c=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "F0m/QORHlxssOUE3bksmZTrpyzM=", + "checksumSHA1": "MWADuSvEQnYoVAI/HCnmJetMle4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "0XG6jo3rddARKG79z5ryqB3Zb7M=", + "checksumSHA1": "X+8twdJk/x1+8y1LxnKXXd3eVoY=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "l1UuSbyIJYSLB/dE/RLjHHr6+g0=", + "checksumSHA1": "PJQ5SFC+Ai5Mqn8rfGhuwttfqZk=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "MWYtV542JKbmzC0WqmklCp8u34g=", + "checksumSHA1": "xI94HsdAG+dBFCm38FoELBdbe9c=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "lHpe5oh6xF3tATbJ0hA8YwpZqP4=", + "checksumSHA1": "FEfr6yYlSRWsIV0M0kxm0/jOw0E=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "yxQpD1A+3Vxe3IKGX/Jwve0tkJ0=", + "checksumSHA1": "k/XNa0qsR9DMIG8Sqg4cGlePTKE=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "amSxqxRb2nDFXm9vPasvG24C904=", + "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "2fW5rVTwFXBjEsV8TfQNdibLQQM=", + "checksumSHA1": "1tAb3rvB34c3zsX+DRY5xDJqNUA=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "ArB4JBn8TxkODaCzg3o7JaCe1TA=", + "checksumSHA1": "/QVDbdrmz2TRkMG1m/aCmuAWfIk=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "Pj10knRcMdJvMk8PonY3QEaXhOc=", + "checksumSHA1": "Q2K/MWy6yy/kV9CZ0YhaEHBNgkI=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "vJCPPvHq0jmGC1GEf4SrsjUHRxk=", + "checksumSHA1": "OvCoIYyhBSlrCvsk8uidGznXIss=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "ARppTdal/LnCl/FXh28Ii31GQMs=", + "checksumSHA1": "44R3VB9KreeYj0LFf3KBd37kPXI=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "3EVmOU4ALB/2+lxV+y8eFmCGvb4=", + "checksumSHA1": "r5C9HizIrv+MWzpgHoJstHKZOOE=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "wrEpYDyNKpsXNsPoV2r/q6VnLzM=", + "checksumSHA1": "zrWHv2XG/KP9E82ophSO0XF+Cu8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "4/xr/6I0+oOyOcpN2HbIr31OVxc=", + "checksumSHA1": "xq1jxTLdjjWU+aupMh143C+Yb1Q=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "5zTgRBKYsAqSi79rxmOVlVCzPGE=", + "checksumSHA1": "onhxya8p2Q2wgT2TakO+ZcjwY/I=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "59WNio3jETOsju0fKep+jLiudck=", + "checksumSHA1": "HoX+EX8JW8kDZxJAs8545YRfjuI=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "C0IVbo/IIqtwjN9FzBP2xuN9tVE=", + "checksumSHA1": "ahm1SzqWwGUqPih6jPZwIevl2Pg=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "t/R/0xU0mufuVqFm7eupnGJHEMY=", + "checksumSHA1": "0YZZzbKYjappFNT8MUR5qNGQkRY=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "JblylaVkaXAJpDarZTfOoqEOzPA=", + "checksumSHA1": "rrANYUKEHHEofZJYCP1pQhO35TE=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "u0iow8ORt9b268lcJAVCVPbOIww=", + "checksumSHA1": "p/+jOAMB5MSAnPloxJIFy77Hfck=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "1MgcJOzhM8dpb8ioMiYKZUusUR8=", + "checksumSHA1": "W6AvJYPtvCLTeA0USbhvid2rP1o=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "3fL2AHxNGt5Zneao0L0rPWicP+A=", + "checksumSHA1": "yV8F3bM8W2kSZJH4TDx4mJWnrac=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "8+Ut2yZlstbgm65CRwoJvDenGZY=", + "checksumSHA1": "Davg8yRIMOcfa7/6zp7Fj6GnpuA=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "QGUC3zDm5lKE+RYZsqvG4QAl53g=", + "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "W5RS2LpTpmZcg5Zx/XZ4dC337Ts=", + "checksumSHA1": "KRtVvKvBRTs2cTTuiRWzjhJ8OC0=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "lFXM8XpT1dzK+5hazyEY2zgrqAk=", + "checksumSHA1": "oe9xtK3GMCwCDmra0+JC6GwJ99k=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "YmZtX0SKULpSeWWtmq15Etnxdj4=", + "checksumSHA1": "nWA8sdsU3+nBLaN1Jk0zWRtuD6Q=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "9yFRAnN7WYBGrqhuTiG9de9czaM=", + "checksumSHA1": "zTqXRGkYH+IyYOH5Uezj2M4B9xM=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "EOrj5kAayRQsGyiROCSn7dTdTHo=", + "checksumSHA1": "p3B8yEFBlkwheiXKRHtLz/Yvcew=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "PVO2BA9vUNGnBLc4MXdlDKBZwv8=", + "checksumSHA1": "x2vfgk/EnGjOWPywWL+LKJKYCF0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "/kV4ehPl3wDXCpz5bKBvetJzX+I=", + "checksumSHA1": "Z61MRqI0vu8oGAaCZSCDes9gIvk=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "pP0jHii9PCvEsmrmgnFzgU2b3xA=", + "checksumSHA1": "TPGJU1VzYOhJIdTbWal1ivDwT+4=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "yrnNkOvlN6kG8KfO+NZ5fZA5hew=", + "checksumSHA1": "7kmVHadImICOa4/MOXErR53CdbQ=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "FxyGpQxZZj95K+HmtFtkJZEXi5E=", + "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "sEeC7D4grNggaKxWcofBQX/HyAw=", + "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "c7VBBFkctgWKeIbnwuuKmYpzocQ=", + "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "3e/vxdlFv3/yaY/MAiwtAUyr+ag=", + "checksumSHA1": "Zu/wepnCWpEe8M2DEYTaVTteys8=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "8oXVUCBenZzaXkvkfx5H7hDEpnY=", + "checksumSHA1": "uguCtF1eoCG71dvEVqrYbFs7py0=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "Wy0MZEERBJE4cKOzIX3LW/cV2CU=", + "checksumSHA1": "vlL9ibWgidiPj0uQ2L/OF6DCVEs=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "b8m3sDM8RBL16Su60vWEVLbYGvA=", + "checksumSHA1": "Ro5RX6aw32UGrGueBK+zhA8+Z30=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "kaO7lKAVw7wdfBF9qW6WhaBKBMQ=", + "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { - "checksumSHA1": "QQEtSKxzvK3pYO4S0+JjtsJypmw=", + "checksumSHA1": "UGQwnAeB9SoJKyPPIpbDJVQws5g=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "bfc1a07cf158c30c41a3eefba8aae043d0bb5bff", - "revisionTime": "2018-06-15T21:57:29Z", - "version": "v1.14.8", - "versionExact": "v1.14.8" + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 8abeb8549a3d29af9da347d0a820556368157eca Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 26 Jun 2018 15:42:38 -0400 Subject: [PATCH 1638/3316] govendor fetch github.com/aws/aws-sdk-go/service/macie@v1.14.13 --- .../aws/aws-sdk-go/service/macie/api.go | 1611 +++++++++++++++++ .../aws/aws-sdk-go/service/macie/doc.go | 33 + .../aws/aws-sdk-go/service/macie/errors.go | 32 + .../aws/aws-sdk-go/service/macie/service.go | 97 + vendor/vendor.json | 8 + 5 files changed, 1781 insertions(+) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/macie/service.go diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go new file mode 100644 index 00000000000..62a12b0c1a7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go @@ -0,0 +1,1611 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package macie + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opAssociateMemberAccount = "AssociateMemberAccount" + +// AssociateMemberAccountRequest generates a "aws/request.Request" representing the +// client's request for the AssociateMemberAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateMemberAccount for more information on using the AssociateMemberAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateMemberAccountRequest method. +// req, resp := client.AssociateMemberAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount +func (c *Macie) AssociateMemberAccountRequest(input *AssociateMemberAccountInput) (req *request.Request, output *AssociateMemberAccountOutput) { + op := &request.Operation{ + Name: opAssociateMemberAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateMemberAccountInput{} + } + + output = &AssociateMemberAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateMemberAccount API operation for Amazon Macie. +// +// Associates a specified AWS account with Amazon Macie as a member account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Macie's +// API operation AssociateMemberAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount +func (c *Macie) AssociateMemberAccount(input *AssociateMemberAccountInput) (*AssociateMemberAccountOutput, error) { + req, out := c.AssociateMemberAccountRequest(input) + return out, req.Send() +} + +// AssociateMemberAccountWithContext is the same as AssociateMemberAccount with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateMemberAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) AssociateMemberAccountWithContext(ctx aws.Context, input *AssociateMemberAccountInput, opts ...request.Option) (*AssociateMemberAccountOutput, error) { + req, out := c.AssociateMemberAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateS3Resources = "AssociateS3Resources" + +// AssociateS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the AssociateS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateS3Resources for more information on using the AssociateS3Resources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateS3ResourcesRequest method. +// req, resp := client.AssociateS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources +func (c *Macie) AssociateS3ResourcesRequest(input *AssociateS3ResourcesInput) (req *request.Request, output *AssociateS3ResourcesOutput) { + op := &request.Operation{ + Name: opAssociateS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateS3ResourcesInput{} + } + + output = &AssociateS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateS3Resources API operation for Amazon Macie. +// +// Associates specified S3 resources with Amazon Macie for monitoring and data +// classification. If memberAccountId isn't specified, the action associates +// specified S3 resources with Macie for the current master account. If memberAccountId +// is specified, the action associates specified S3 resources with Macie for +// the specified member account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Macie's +// API operation AssociateS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error code describes the limit exceeded. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources +func (c *Macie) AssociateS3Resources(input *AssociateS3ResourcesInput) (*AssociateS3ResourcesOutput, error) { + req, out := c.AssociateS3ResourcesRequest(input) + return out, req.Send() +} + +// AssociateS3ResourcesWithContext is the same as AssociateS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateS3Resources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) AssociateS3ResourcesWithContext(ctx aws.Context, input *AssociateS3ResourcesInput, opts ...request.Option) (*AssociateS3ResourcesOutput, error) { + req, out := c.AssociateS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateMemberAccount = "DisassociateMemberAccount" + +// DisassociateMemberAccountRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateMemberAccount operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateMemberAccount for more information on using the DisassociateMemberAccount +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateMemberAccountRequest method. +// req, resp := client.DisassociateMemberAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount +func (c *Macie) DisassociateMemberAccountRequest(input *DisassociateMemberAccountInput) (req *request.Request, output *DisassociateMemberAccountOutput) { + op := &request.Operation{ + Name: opDisassociateMemberAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateMemberAccountInput{} + } + + output = &DisassociateMemberAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateMemberAccount API operation for Amazon Macie. +// +// Removes the specified member account from Amazon Macie. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Macie's +// API operation DisassociateMemberAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount +func (c *Macie) DisassociateMemberAccount(input *DisassociateMemberAccountInput) (*DisassociateMemberAccountOutput, error) { + req, out := c.DisassociateMemberAccountRequest(input) + return out, req.Send() +} + +// DisassociateMemberAccountWithContext is the same as DisassociateMemberAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateMemberAccount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) DisassociateMemberAccountWithContext(ctx aws.Context, input *DisassociateMemberAccountInput, opts ...request.Option) (*DisassociateMemberAccountOutput, error) { + req, out := c.DisassociateMemberAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateS3Resources = "DisassociateS3Resources" + +// DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateS3Resources for more information on using the DisassociateS3Resources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateS3ResourcesRequest method. +// req, resp := client.DisassociateS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources +func (c *Macie) DisassociateS3ResourcesRequest(input *DisassociateS3ResourcesInput) (req *request.Request, output *DisassociateS3ResourcesOutput) { + op := &request.Operation{ + Name: opDisassociateS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateS3ResourcesInput{} + } + + output = &DisassociateS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateS3Resources API operation for Amazon Macie. +// +// Removes specified S3 resources from being monitored by Amazon Macie. If memberAccountId +// isn't specified, the action removes specified S3 resources from Macie for +// the current master account. If memberAccountId is specified, the action removes +// specified S3 resources from Macie for the specified member account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Macie's +// API operation DisassociateS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources +func (c *Macie) DisassociateS3Resources(input *DisassociateS3ResourcesInput) (*DisassociateS3ResourcesOutput, error) { + req, out := c.DisassociateS3ResourcesRequest(input) + return out, req.Send() +} + +// DisassociateS3ResourcesWithContext is the same as DisassociateS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateS3Resources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) DisassociateS3ResourcesWithContext(ctx aws.Context, input *DisassociateS3ResourcesInput, opts ...request.Option) (*DisassociateS3ResourcesOutput, error) { + req, out := c.DisassociateS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListMemberAccounts = "ListMemberAccounts" + +// ListMemberAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListMemberAccounts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListMemberAccounts for more information on using the ListMemberAccounts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListMemberAccountsRequest method. +// req, resp := client.ListMemberAccountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts +func (c *Macie) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { + op := &request.Operation{ + Name: opListMemberAccounts, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListMemberAccountsInput{} + } + + output = &ListMemberAccountsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMemberAccounts API operation for Amazon Macie. +// +// Lists all Amazon Macie member accounts for the current Amazon Macie master +// account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Macie's +// API operation ListMemberAccounts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts +func (c *Macie) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + return out, req.Send() +} + +// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of +// the ability to pass a context and additional request options. +// +// See ListMemberAccounts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListMemberAccountsPages iterates over the pages of a ListMemberAccounts operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListMemberAccounts method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListMemberAccounts operation. +// pageNum := 0 +// err := client.ListMemberAccountsPages(params, +// func(page *ListMemberAccountsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Macie) ListMemberAccountsPages(input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool) error { + return c.ListMemberAccountsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListMemberAccountsPagesWithContext same as ListMemberAccountsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListMemberAccountsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListMemberAccountsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListS3Resources = "ListS3Resources" + +// ListS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListS3Resources for more information on using the ListS3Resources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListS3ResourcesRequest method. +// req, resp := client.ListS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources +func (c *Macie) ListS3ResourcesRequest(input *ListS3ResourcesInput) (req *request.Request, output *ListS3ResourcesOutput) { + op := &request.Operation{ + Name: opListS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListS3ResourcesInput{} + } + + output = &ListS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListS3Resources API operation for Amazon Macie. +// +// Lists all the S3 resources associated with Amazon Macie. If memberAccountId +// isn't specified, the action lists the S3 resources associated with Amazon +// Macie for the current master account. If memberAccountId is specified, the +// action lists the S3 resources associated with Amazon Macie for the specified +// member account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Macie's +// API operation ListS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources +func (c *Macie) ListS3Resources(input *ListS3ResourcesInput) (*ListS3ResourcesOutput, error) { + req, out := c.ListS3ResourcesRequest(input) + return out, req.Send() +} + +// ListS3ResourcesWithContext is the same as ListS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See ListS3Resources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) ListS3ResourcesWithContext(ctx aws.Context, input *ListS3ResourcesInput, opts ...request.Option) (*ListS3ResourcesOutput, error) { + req, out := c.ListS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListS3ResourcesPages iterates over the pages of a ListS3Resources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListS3Resources method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListS3Resources operation. +// pageNum := 0 +// err := client.ListS3ResourcesPages(params, +// func(page *ListS3ResourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Macie) ListS3ResourcesPages(input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool) error { + return c.ListS3ResourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListS3ResourcesPagesWithContext same as ListS3ResourcesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) ListS3ResourcesPagesWithContext(ctx aws.Context, input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListS3ResourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListS3ResourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opUpdateS3Resources = "UpdateS3Resources" + +// UpdateS3ResourcesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateS3Resources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateS3Resources for more information on using the UpdateS3Resources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateS3ResourcesRequest method. +// req, resp := client.UpdateS3ResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources +func (c *Macie) UpdateS3ResourcesRequest(input *UpdateS3ResourcesInput) (req *request.Request, output *UpdateS3ResourcesOutput) { + op := &request.Operation{ + Name: opUpdateS3Resources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateS3ResourcesInput{} + } + + output = &UpdateS3ResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateS3Resources API operation for Amazon Macie. +// +// Updates the classification types for the specified S3 resources. If memberAccountId +// isn't specified, the action updates the classification types of the S3 resources +// associated with Amazon Macie for the current master account. If memberAccountId +// is specified, the action updates the classification types of the S3 resources +// associated with Amazon Macie for the specified member account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Macie's +// API operation UpdateS3Resources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources +func (c *Macie) UpdateS3Resources(input *UpdateS3ResourcesInput) (*UpdateS3ResourcesOutput, error) { + req, out := c.UpdateS3ResourcesRequest(input) + return out, req.Send() +} + +// UpdateS3ResourcesWithContext is the same as UpdateS3Resources with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateS3Resources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Macie) UpdateS3ResourcesWithContext(ctx aws.Context, input *UpdateS3ResourcesInput, opts ...request.Option) (*UpdateS3ResourcesOutput, error) { + req, out := c.UpdateS3ResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AssociateMemberAccountInput struct { + _ struct{} `type:"structure"` + + // The ID of the AWS account that you want to associate with Amazon Macie as + // a member account. + // + // MemberAccountId is a required field + MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateMemberAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateMemberAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateMemberAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateMemberAccountInput"} + if s.MemberAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *AssociateMemberAccountInput) SetMemberAccountId(v string) *AssociateMemberAccountInput { + s.MemberAccountId = &v + return s +} + +type AssociateMemberAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateMemberAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateMemberAccountOutput) GoString() string { + return s.String() +} + +type AssociateS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // The ID of the Amazon Macie member account whose resources you want to associate + // with Macie. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` + + // The S3 resources that you want to associate with Amazon Macie for monitoring + // and data classification. + // + // S3Resources is a required field + S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list" required:"true"` +} + +// String returns the string representation +func (s AssociateS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateS3ResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateS3ResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateS3ResourcesInput"} + if s.S3Resources == nil { + invalidParams.Add(request.NewErrParamRequired("S3Resources")) + } + if s.S3Resources != nil { + for i, v := range s.S3Resources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3Resources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *AssociateS3ResourcesInput) SetMemberAccountId(v string) *AssociateS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +// SetS3Resources sets the S3Resources field's value. +func (s *AssociateS3ResourcesInput) SetS3Resources(v []*S3ResourceClassification) *AssociateS3ResourcesInput { + s.S3Resources = v + return s +} + +type AssociateS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // S3 resources that couldn't be associated with Amazon Macie. An error code + // and an error message are provided for each failed item. + FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` +} + +// String returns the string representation +func (s AssociateS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetFailedS3Resources sets the FailedS3Resources field's value. +func (s *AssociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *AssociateS3ResourcesOutput { + s.FailedS3Resources = v + return s +} + +// The classification type that Amazon Macie applies to the associated S3 resources. +type ClassificationType struct { + _ struct{} `type:"structure"` + + // A continuous classification of the objects that are added to a specified + // S3 bucket. Amazon Macie begins performing continuous classification after + // a bucket is successfully associated with Amazon Macie. + // + // Continuous is a required field + Continuous *string `locationName:"continuous" type:"string" required:"true" enum:"S3ContinuousClassificationType"` + + // A one-time classification of all of the existing objects in a specified S3 + // bucket. + // + // OneTime is a required field + OneTime *string `locationName:"oneTime" type:"string" required:"true" enum:"S3OneTimeClassificationType"` +} + +// String returns the string representation +func (s ClassificationType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClassificationType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ClassificationType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ClassificationType"} + if s.Continuous == nil { + invalidParams.Add(request.NewErrParamRequired("Continuous")) + } + if s.OneTime == nil { + invalidParams.Add(request.NewErrParamRequired("OneTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContinuous sets the Continuous field's value. +func (s *ClassificationType) SetContinuous(v string) *ClassificationType { + s.Continuous = &v + return s +} + +// SetOneTime sets the OneTime field's value. +func (s *ClassificationType) SetOneTime(v string) *ClassificationType { + s.OneTime = &v + return s +} + +// The classification type that Amazon Macie applies to the associated S3 resources. +// At least one of the classification types (oneTime or continuous) must be +// specified. +type ClassificationTypeUpdate struct { + _ struct{} `type:"structure"` + + // A continuous classification of the objects that are added to a specified + // S3 bucket. Amazon Macie begins performing continuous classification after + // a bucket is successfully associated with Amazon Macie. + Continuous *string `locationName:"continuous" type:"string" enum:"S3ContinuousClassificationType"` + + // A one-time classification of all of the existing objects in a specified S3 + // bucket. + OneTime *string `locationName:"oneTime" type:"string" enum:"S3OneTimeClassificationType"` +} + +// String returns the string representation +func (s ClassificationTypeUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClassificationTypeUpdate) GoString() string { + return s.String() +} + +// SetContinuous sets the Continuous field's value. +func (s *ClassificationTypeUpdate) SetContinuous(v string) *ClassificationTypeUpdate { + s.Continuous = &v + return s +} + +// SetOneTime sets the OneTime field's value. +func (s *ClassificationTypeUpdate) SetOneTime(v string) *ClassificationTypeUpdate { + s.OneTime = &v + return s +} + +type DisassociateMemberAccountInput struct { + _ struct{} `type:"structure"` + + // The ID of the member account that you want to remove from Amazon Macie. + // + // MemberAccountId is a required field + MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateMemberAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateMemberAccountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateMemberAccountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberAccountInput"} + if s.MemberAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *DisassociateMemberAccountInput) SetMemberAccountId(v string) *DisassociateMemberAccountInput { + s.MemberAccountId = &v + return s +} + +type DisassociateMemberAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateMemberAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateMemberAccountOutput) GoString() string { + return s.String() +} + +type DisassociateS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // The S3 resources (buckets or prefixes) that you want to remove from being + // monitored and classified by Amazon Macie. + // + // AssociatedS3Resources is a required field + AssociatedS3Resources []*S3Resource `locationName:"associatedS3Resources" type:"list" required:"true"` + + // The ID of the Amazon Macie member account whose resources you want to remove + // from being monitored by Amazon Macie. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` +} + +// String returns the string representation +func (s DisassociateS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateS3ResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateS3ResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateS3ResourcesInput"} + if s.AssociatedS3Resources == nil { + invalidParams.Add(request.NewErrParamRequired("AssociatedS3Resources")) + } + if s.AssociatedS3Resources != nil { + for i, v := range s.AssociatedS3Resources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociatedS3Resources", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociatedS3Resources sets the AssociatedS3Resources field's value. +func (s *DisassociateS3ResourcesInput) SetAssociatedS3Resources(v []*S3Resource) *DisassociateS3ResourcesInput { + s.AssociatedS3Resources = v + return s +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *DisassociateS3ResourcesInput) SetMemberAccountId(v string) *DisassociateS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +type DisassociateS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // S3 resources that couldn't be removed from being monitored and classified + // by Amazon Macie. An error code and an error message are provided for each + // failed item. + FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` +} + +// String returns the string representation +func (s DisassociateS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetFailedS3Resources sets the FailedS3Resources field's value. +func (s *DisassociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *DisassociateS3ResourcesOutput { + s.FailedS3Resources = v + return s +} + +// Includes details about the failed S3 resources. +type FailedS3Resource struct { + _ struct{} `type:"structure"` + + // The status code of a failed item. + ErrorCode *string `locationName:"errorCode" type:"string"` + + // The error message of a failed item. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // The failed S3 resources. + FailedItem *S3Resource `locationName:"failedItem" type:"structure"` +} + +// String returns the string representation +func (s FailedS3Resource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedS3Resource) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *FailedS3Resource) SetErrorCode(v string) *FailedS3Resource { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *FailedS3Resource) SetErrorMessage(v string) *FailedS3Resource { + s.ErrorMessage = &v + return s +} + +// SetFailedItem sets the FailedItem field's value. +func (s *FailedS3Resource) SetFailedItem(v *S3Resource) *FailedS3Resource { + s.FailedItem = v + return s +} + +type ListMemberAccountsInput struct { + _ struct{} `type:"structure"` + + // Use this parameter to indicate the maximum number of items that you want + // in the response. The default value is 250. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // Use this parameter when paginating results. Set the value of this parameter + // to null on your first call to the ListMemberAccounts action. Subsequent calls + // to the action fill nextToken in the request with the value of nextToken from + // the previous response to continue listing data. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { + s.NextToken = &v + return s +} + +type ListMemberAccountsOutput struct { + _ struct{} `type:"structure"` + + // A list of the Amazon Macie member accounts returned by the action. The current + // master account is also included in this list. + MemberAccounts []*MemberAccount `locationName:"memberAccounts" type:"list"` + + // When a response is generated, if there is more data to be listed, this parameter + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsOutput) GoString() string { + return s.String() +} + +// SetMemberAccounts sets the MemberAccounts field's value. +func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*MemberAccount) *ListMemberAccountsOutput { + s.MemberAccounts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { + s.NextToken = &v + return s +} + +type ListS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // Use this parameter to indicate the maximum number of items that you want + // in the response. The default value is 250. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The Amazon Macie member account ID whose associated S3 resources you want + // to list. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` + + // Use this parameter when paginating results. Set its value to null on your + // first call to the ListS3Resources action. Subsequent calls to the action + // fill nextToken in the request with the value of nextToken from the previous + // response to continue listing data. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListS3ResourcesInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListS3ResourcesInput) SetMaxResults(v int64) *ListS3ResourcesInput { + s.MaxResults = &v + return s +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *ListS3ResourcesInput) SetMemberAccountId(v string) *ListS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListS3ResourcesInput) SetNextToken(v string) *ListS3ResourcesInput { + s.NextToken = &v + return s +} + +type ListS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // When a response is generated, if there is more data to be listed, this parameter + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of the associated S3 resources returned by the action. + S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list"` +} + +// String returns the string representation +func (s ListS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListS3ResourcesOutput) SetNextToken(v string) *ListS3ResourcesOutput { + s.NextToken = &v + return s +} + +// SetS3Resources sets the S3Resources field's value. +func (s *ListS3ResourcesOutput) SetS3Resources(v []*S3ResourceClassification) *ListS3ResourcesOutput { + s.S3Resources = v + return s +} + +// Contains information about the Amazon Macie member account. +type MemberAccount struct { + _ struct{} `type:"structure"` + + // The AWS account ID of the Amazon Macie member account. + AccountId *string `locationName:"accountId" type:"string"` +} + +// String returns the string representation +func (s MemberAccount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MemberAccount) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *MemberAccount) SetAccountId(v string) *MemberAccount { + s.AccountId = &v + return s +} + +// Contains information about the S3 resource. This data type is used as a request +// parameter in the DisassociateS3Resources action and can be used as a response +// parameter in the AssociateS3Resources and UpdateS3Resources actions. +type S3Resource struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" type:"string" required:"true"` + + // The prefix of the S3 bucket. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3Resource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Resource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Resource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Resource"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketName sets the BucketName field's value. +func (s *S3Resource) SetBucketName(v string) *S3Resource { + s.BucketName = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3Resource) SetPrefix(v string) *S3Resource { + s.Prefix = &v + return s +} + +// The S3 resources that you want to associate with Amazon Macie for monitoring +// and data classification. This data type is used as a request parameter in +// the AssociateS3Resources action and a response parameter in the ListS3Resources +// action. +type S3ResourceClassification struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket that you want to associate with Amazon Macie. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" type:"string" required:"true"` + + // The classification type that you want to specify for the resource associated + // with Amazon Macie. + // + // ClassificationType is a required field + ClassificationType *ClassificationType `locationName:"classificationType" type:"structure" required:"true"` + + // The prefix of the S3 bucket that you want to associate with Amazon Macie. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3ResourceClassification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ResourceClassification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3ResourceClassification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassification"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + if s.ClassificationType == nil { + invalidParams.Add(request.NewErrParamRequired("ClassificationType")) + } + if s.ClassificationType != nil { + if err := s.ClassificationType.Validate(); err != nil { + invalidParams.AddNested("ClassificationType", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketName sets the BucketName field's value. +func (s *S3ResourceClassification) SetBucketName(v string) *S3ResourceClassification { + s.BucketName = &v + return s +} + +// SetClassificationType sets the ClassificationType field's value. +func (s *S3ResourceClassification) SetClassificationType(v *ClassificationType) *S3ResourceClassification { + s.ClassificationType = v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3ResourceClassification) SetPrefix(v string) *S3ResourceClassification { + s.Prefix = &v + return s +} + +// The S3 resources whose classification types you want to update. This data +// type is used as a request parameter in the UpdateS3Resources action. +type S3ResourceClassificationUpdate struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket whose classification types you want to update. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" type:"string" required:"true"` + + // The classification type that you want to update for the resource associated + // with Amazon Macie. + // + // ClassificationTypeUpdate is a required field + ClassificationTypeUpdate *ClassificationTypeUpdate `locationName:"classificationTypeUpdate" type:"structure" required:"true"` + + // The prefix of the S3 bucket whose classification types you want to update. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3ResourceClassificationUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ResourceClassificationUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3ResourceClassificationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassificationUpdate"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + if s.ClassificationTypeUpdate == nil { + invalidParams.Add(request.NewErrParamRequired("ClassificationTypeUpdate")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketName sets the BucketName field's value. +func (s *S3ResourceClassificationUpdate) SetBucketName(v string) *S3ResourceClassificationUpdate { + s.BucketName = &v + return s +} + +// SetClassificationTypeUpdate sets the ClassificationTypeUpdate field's value. +func (s *S3ResourceClassificationUpdate) SetClassificationTypeUpdate(v *ClassificationTypeUpdate) *S3ResourceClassificationUpdate { + s.ClassificationTypeUpdate = v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3ResourceClassificationUpdate) SetPrefix(v string) *S3ResourceClassificationUpdate { + s.Prefix = &v + return s +} + +type UpdateS3ResourcesInput struct { + _ struct{} `type:"structure"` + + // The AWS ID of the Amazon Macie member account whose S3 resources' classification + // types you want to update. + MemberAccountId *string `locationName:"memberAccountId" type:"string"` + + // The S3 resources whose classification types you want to update. + // + // S3ResourcesUpdate is a required field + S3ResourcesUpdate []*S3ResourceClassificationUpdate `locationName:"s3ResourcesUpdate" type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateS3ResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateS3ResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateS3ResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateS3ResourcesInput"} + if s.S3ResourcesUpdate == nil { + invalidParams.Add(request.NewErrParamRequired("S3ResourcesUpdate")) + } + if s.S3ResourcesUpdate != nil { + for i, v := range s.S3ResourcesUpdate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3ResourcesUpdate", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMemberAccountId sets the MemberAccountId field's value. +func (s *UpdateS3ResourcesInput) SetMemberAccountId(v string) *UpdateS3ResourcesInput { + s.MemberAccountId = &v + return s +} + +// SetS3ResourcesUpdate sets the S3ResourcesUpdate field's value. +func (s *UpdateS3ResourcesInput) SetS3ResourcesUpdate(v []*S3ResourceClassificationUpdate) *UpdateS3ResourcesInput { + s.S3ResourcesUpdate = v + return s +} + +type UpdateS3ResourcesOutput struct { + _ struct{} `type:"structure"` + + // The S3 resources whose classification types can't be updated. An error code + // and an error message are provided for each failed item. + FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` +} + +// String returns the string representation +func (s UpdateS3ResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateS3ResourcesOutput) GoString() string { + return s.String() +} + +// SetFailedS3Resources sets the FailedS3Resources field's value. +func (s *UpdateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *UpdateS3ResourcesOutput { + s.FailedS3Resources = v + return s +} + +const ( + // S3ContinuousClassificationTypeFull is a S3ContinuousClassificationType enum value + S3ContinuousClassificationTypeFull = "FULL" +) + +const ( + // S3OneTimeClassificationTypeFull is a S3OneTimeClassificationType enum value + S3OneTimeClassificationTypeFull = "FULL" + + // S3OneTimeClassificationTypeNone is a S3OneTimeClassificationType enum value + S3OneTimeClassificationTypeNone = "NONE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go b/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go new file mode 100644 index 00000000000..1b8f9632f37 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/doc.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package macie provides the client and types for making API +// requests to Amazon Macie. +// +// Amazon Macie is a security service that uses machine learning to automatically +// discover, classify, and protect sensitive data in AWS. Macie recognizes sensitive +// data such as personally identifiable information (PII) or intellectual property, +// and provides you with dashboards and alerts that give visibility into how +// this data is being accessed or moved. For more information, see the Macie +// User Guide (https://docs.aws.amazon.com/macie/latest/userguide/what-is-macie.html). +// +// See https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19 for more information on this service. +// +// See macie package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/ +// +// Using the Client +// +// To contact Amazon Macie 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 Macie client Macie for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/#New +package macie diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go b/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go new file mode 100644 index 00000000000..77768d52eb5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/errors.go @@ -0,0 +1,32 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package macie + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You do not have required permissions to access the requested resource. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeInternalException for service response error code + // "InternalException". + // + // Internal server error. + ErrCodeInternalException = "InternalException" + + // ErrCodeInvalidInputException for service response error code + // "InvalidInputException". + // + // The request was rejected because an invalid or out-of-range value was supplied + // for an input parameter. + ErrCodeInvalidInputException = "InvalidInputException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request was rejected because it attempted to create resources beyond + // the current AWS account limits. The error code describes the limit exceeded. + ErrCodeLimitExceededException = "LimitExceededException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/service.go b/vendor/github.com/aws/aws-sdk-go/service/macie/service.go new file mode 100644 index 00000000000..0b38598f0fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package macie + +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" +) + +// Macie provides the API operation methods for making requests to +// Amazon Macie. See this package's package overview docs +// for details on the service. +// +// Macie methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Macie 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 = "Macie" // Name of service. + EndpointsID = "macie" // ID to lookup a service endpoint with. + ServiceID = "Macie" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Macie 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 Macie client from just a session. +// svc := macie.New(mySession) +// +// // Create a Macie client with additional configuration +// svc := macie.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Macie { + 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) *Macie { + svc := &Macie{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-12-19", + JSONVersion: "1.1", + TargetPrefix: "MacieService", + }, + 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 Macie operation and runs any +// custom request initialization. +func (c *Macie) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/vendor.json b/vendor/vendor.json index a1877ca6580..1cdd10ba52f 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -766,6 +766,14 @@ "version": "v1.14.13", "versionExact": "v1.14.13" }, + { + "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", + "path": "github.com/aws/aws-sdk-go/service/macie", + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" + }, { "checksumSHA1": "onhxya8p2Q2wgT2TakO+ZcjwY/I=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", From a978b2678fd0b93181db444ccffee9c8440447dc Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 26 Jun 2018 15:43:18 -0400 Subject: [PATCH 1639/3316] govendor fetch github.com/aws/aws-sdk-go/service/pinpoint@v1.14.13 --- .../aws/aws-sdk-go/service/pinpoint/api.go | 16938 ++++++++++++++++ .../aws/aws-sdk-go/service/pinpoint/doc.go | 26 + .../aws/aws-sdk-go/service/pinpoint/errors.go | 30 + .../aws-sdk-go/service/pinpoint/service.go | 99 + vendor/vendor.json | 8 + 5 files changed, 17101 insertions(+) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go new file mode 100644 index 00000000000..86c17e13615 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -0,0 +1,16938 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pinpoint + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCreateApp = "CreateApp" + +// CreateAppRequest generates a "aws/request.Request" representing the +// client's request for the CreateApp operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateApp for more information on using the CreateApp +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateAppRequest method. +// req, resp := client.CreateAppRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApp +func (c *Pinpoint) CreateAppRequest(input *CreateAppInput) (req *request.Request, output *CreateAppOutput) { + op := &request.Operation{ + Name: opCreateApp, + HTTPMethod: "POST", + HTTPPath: "/v1/apps", + } + + if input == nil { + input = &CreateAppInput{} + } + + output = &CreateAppOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApp API operation for Amazon Pinpoint. +// +// Creates or updates an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation CreateApp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApp +func (c *Pinpoint) CreateApp(input *CreateAppInput) (*CreateAppOutput, error) { + req, out := c.CreateAppRequest(input) + return out, req.Send() +} + +// CreateAppWithContext is the same as CreateApp with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApp for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) CreateAppWithContext(ctx aws.Context, input *CreateAppInput, opts ...request.Option) (*CreateAppOutput, error) { + req, out := c.CreateAppRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCampaign = "CreateCampaign" + +// CreateCampaignRequest generates a "aws/request.Request" representing the +// client's request for the CreateCampaign operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCampaign for more information on using the CreateCampaign +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCampaignRequest method. +// req, resp := client.CreateCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaign +func (c *Pinpoint) CreateCampaignRequest(input *CreateCampaignInput) (req *request.Request, output *CreateCampaignOutput) { + op := &request.Operation{ + Name: opCreateCampaign, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/campaigns", + } + + if input == nil { + input = &CreateCampaignInput{} + } + + output = &CreateCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCampaign API operation for Amazon Pinpoint. +// +// Creates or updates a campaign. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation CreateCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaign +func (c *Pinpoint) CreateCampaign(input *CreateCampaignInput) (*CreateCampaignOutput, error) { + req, out := c.CreateCampaignRequest(input) + return out, req.Send() +} + +// CreateCampaignWithContext is the same as CreateCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCampaign for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) CreateCampaignWithContext(ctx aws.Context, input *CreateCampaignInput, opts ...request.Option) (*CreateCampaignOutput, error) { + req, out := c.CreateCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateExportJob = "CreateExportJob" + +// CreateExportJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateExportJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateExportJob for more information on using the CreateExportJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateExportJobRequest method. +// req, resp := client.CreateExportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateExportJob +func (c *Pinpoint) CreateExportJobRequest(input *CreateExportJobInput) (req *request.Request, output *CreateExportJobOutput) { + op := &request.Operation{ + Name: opCreateExportJob, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/jobs/export", + } + + if input == nil { + input = &CreateExportJobInput{} + } + + output = &CreateExportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateExportJob API operation for Amazon Pinpoint. +// +// Creates an export job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation CreateExportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateExportJob +func (c *Pinpoint) CreateExportJob(input *CreateExportJobInput) (*CreateExportJobOutput, error) { + req, out := c.CreateExportJobRequest(input) + return out, req.Send() +} + +// CreateExportJobWithContext is the same as CreateExportJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateExportJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) CreateExportJobWithContext(ctx aws.Context, input *CreateExportJobInput, opts ...request.Option) (*CreateExportJobOutput, error) { + req, out := c.CreateExportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateImportJob = "CreateImportJob" + +// CreateImportJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateImportJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateImportJob for more information on using the CreateImportJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateImportJobRequest method. +// req, resp := client.CreateImportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJob +func (c *Pinpoint) CreateImportJobRequest(input *CreateImportJobInput) (req *request.Request, output *CreateImportJobOutput) { + op := &request.Operation{ + Name: opCreateImportJob, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/jobs/import", + } + + if input == nil { + input = &CreateImportJobInput{} + } + + output = &CreateImportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateImportJob API operation for Amazon Pinpoint. +// +// Creates or updates an import job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation CreateImportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJob +func (c *Pinpoint) CreateImportJob(input *CreateImportJobInput) (*CreateImportJobOutput, error) { + req, out := c.CreateImportJobRequest(input) + return out, req.Send() +} + +// CreateImportJobWithContext is the same as CreateImportJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateImportJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) CreateImportJobWithContext(ctx aws.Context, input *CreateImportJobInput, opts ...request.Option) (*CreateImportJobOutput, error) { + req, out := c.CreateImportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSegment = "CreateSegment" + +// CreateSegmentRequest generates a "aws/request.Request" representing the +// client's request for the CreateSegment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSegment for more information on using the CreateSegment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSegmentRequest method. +// req, resp := client.CreateSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegment +func (c *Pinpoint) CreateSegmentRequest(input *CreateSegmentInput) (req *request.Request, output *CreateSegmentOutput) { + op := &request.Operation{ + Name: opCreateSegment, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/segments", + } + + if input == nil { + input = &CreateSegmentInput{} + } + + output = &CreateSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSegment API operation for Amazon Pinpoint. +// +// Used to create or update a segment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation CreateSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegment +func (c *Pinpoint) CreateSegment(input *CreateSegmentInput) (*CreateSegmentOutput, error) { + req, out := c.CreateSegmentRequest(input) + return out, req.Send() +} + +// CreateSegmentWithContext is the same as CreateSegment with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSegment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) CreateSegmentWithContext(ctx aws.Context, input *CreateSegmentInput, opts ...request.Option) (*CreateSegmentOutput, error) { + req, out := c.CreateSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAdmChannel = "DeleteAdmChannel" + +// DeleteAdmChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAdmChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAdmChannel for more information on using the DeleteAdmChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAdmChannelRequest method. +// req, resp := client.DeleteAdmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannel +func (c *Pinpoint) DeleteAdmChannelRequest(input *DeleteAdmChannelInput) (req *request.Request, output *DeleteAdmChannelOutput) { + op := &request.Operation{ + Name: opDeleteAdmChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/adm", + } + + if input == nil { + input = &DeleteAdmChannelInput{} + } + + output = &DeleteAdmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteAdmChannel API operation for Amazon Pinpoint. +// +// Delete an ADM channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteAdmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannel +func (c *Pinpoint) DeleteAdmChannel(input *DeleteAdmChannelInput) (*DeleteAdmChannelOutput, error) { + req, out := c.DeleteAdmChannelRequest(input) + return out, req.Send() +} + +// DeleteAdmChannelWithContext is the same as DeleteAdmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAdmChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteAdmChannelWithContext(ctx aws.Context, input *DeleteAdmChannelInput, opts ...request.Option) (*DeleteAdmChannelOutput, error) { + req, out := c.DeleteAdmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsChannel = "DeleteApnsChannel" + +// DeleteApnsChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApnsChannel for more information on using the DeleteApnsChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApnsChannelRequest method. +// req, resp := client.DeleteApnsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannel +func (c *Pinpoint) DeleteApnsChannelRequest(input *DeleteApnsChannelInput) (req *request.Request, output *DeleteApnsChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns", + } + + if input == nil { + input = &DeleteApnsChannelInput{} + } + + output = &DeleteApnsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsChannel API operation for Amazon Pinpoint. +// +// Deletes the APNs channel for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteApnsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannel +func (c *Pinpoint) DeleteApnsChannel(input *DeleteApnsChannelInput) (*DeleteApnsChannelOutput, error) { + req, out := c.DeleteApnsChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsChannelWithContext is the same as DeleteApnsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteApnsChannelWithContext(ctx aws.Context, input *DeleteApnsChannelInput, opts ...request.Option) (*DeleteApnsChannelOutput, error) { + req, out := c.DeleteApnsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsSandboxChannel = "DeleteApnsSandboxChannel" + +// DeleteApnsSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsSandboxChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApnsSandboxChannel for more information on using the DeleteApnsSandboxChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApnsSandboxChannelRequest method. +// req, resp := client.DeleteApnsSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannel +func (c *Pinpoint) DeleteApnsSandboxChannelRequest(input *DeleteApnsSandboxChannelInput) (req *request.Request, output *DeleteApnsSandboxChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsSandboxChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", + } + + if input == nil { + input = &DeleteApnsSandboxChannelInput{} + } + + output = &DeleteApnsSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsSandboxChannel API operation for Amazon Pinpoint. +// +// Delete an APNS sandbox channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteApnsSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannel +func (c *Pinpoint) DeleteApnsSandboxChannel(input *DeleteApnsSandboxChannelInput) (*DeleteApnsSandboxChannelOutput, error) { + req, out := c.DeleteApnsSandboxChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsSandboxChannelWithContext is the same as DeleteApnsSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsSandboxChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteApnsSandboxChannelWithContext(ctx aws.Context, input *DeleteApnsSandboxChannelInput, opts ...request.Option) (*DeleteApnsSandboxChannelOutput, error) { + req, out := c.DeleteApnsSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsVoipChannel = "DeleteApnsVoipChannel" + +// DeleteApnsVoipChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsVoipChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApnsVoipChannel for more information on using the DeleteApnsVoipChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApnsVoipChannelRequest method. +// req, resp := client.DeleteApnsVoipChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannel +func (c *Pinpoint) DeleteApnsVoipChannelRequest(input *DeleteApnsVoipChannelInput) (req *request.Request, output *DeleteApnsVoipChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsVoipChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", + } + + if input == nil { + input = &DeleteApnsVoipChannelInput{} + } + + output = &DeleteApnsVoipChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsVoipChannel API operation for Amazon Pinpoint. +// +// Delete an APNS VoIP channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteApnsVoipChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannel +func (c *Pinpoint) DeleteApnsVoipChannel(input *DeleteApnsVoipChannelInput) (*DeleteApnsVoipChannelOutput, error) { + req, out := c.DeleteApnsVoipChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsVoipChannelWithContext is the same as DeleteApnsVoipChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsVoipChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteApnsVoipChannelWithContext(ctx aws.Context, input *DeleteApnsVoipChannelInput, opts ...request.Option) (*DeleteApnsVoipChannelOutput, error) { + req, out := c.DeleteApnsVoipChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsVoipSandboxChannel = "DeleteApnsVoipSandboxChannel" + +// DeleteApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsVoipSandboxChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApnsVoipSandboxChannel for more information on using the DeleteApnsVoipSandboxChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApnsVoipSandboxChannelRequest method. +// req, resp := client.DeleteApnsVoipSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannel +func (c *Pinpoint) DeleteApnsVoipSandboxChannelRequest(input *DeleteApnsVoipSandboxChannelInput) (req *request.Request, output *DeleteApnsVoipSandboxChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsVoipSandboxChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", + } + + if input == nil { + input = &DeleteApnsVoipSandboxChannelInput{} + } + + output = &DeleteApnsVoipSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsVoipSandboxChannel API operation for Amazon Pinpoint. +// +// Delete an APNS VoIP sandbox channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteApnsVoipSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannel +func (c *Pinpoint) DeleteApnsVoipSandboxChannel(input *DeleteApnsVoipSandboxChannelInput) (*DeleteApnsVoipSandboxChannelOutput, error) { + req, out := c.DeleteApnsVoipSandboxChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsVoipSandboxChannelWithContext is the same as DeleteApnsVoipSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsVoipSandboxChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteApnsVoipSandboxChannelWithContext(ctx aws.Context, input *DeleteApnsVoipSandboxChannelInput, opts ...request.Option) (*DeleteApnsVoipSandboxChannelOutput, error) { + req, out := c.DeleteApnsVoipSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApp = "DeleteApp" + +// DeleteAppRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApp operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApp for more information on using the DeleteApp +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAppRequest method. +// req, resp := client.DeleteAppRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApp +func (c *Pinpoint) DeleteAppRequest(input *DeleteAppInput) (req *request.Request, output *DeleteAppOutput) { + op := &request.Operation{ + Name: opDeleteApp, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}", + } + + if input == nil { + input = &DeleteAppInput{} + } + + output = &DeleteAppOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApp API operation for Amazon Pinpoint. +// +// Deletes an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteApp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApp +func (c *Pinpoint) DeleteApp(input *DeleteAppInput) (*DeleteAppOutput, error) { + req, out := c.DeleteAppRequest(input) + return out, req.Send() +} + +// DeleteAppWithContext is the same as DeleteApp with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApp for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteAppWithContext(ctx aws.Context, input *DeleteAppInput, opts ...request.Option) (*DeleteAppOutput, error) { + req, out := c.DeleteAppRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBaiduChannel = "DeleteBaiduChannel" + +// DeleteBaiduChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBaiduChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBaiduChannel for more information on using the DeleteBaiduChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBaiduChannelRequest method. +// req, resp := client.DeleteBaiduChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannel +func (c *Pinpoint) DeleteBaiduChannelRequest(input *DeleteBaiduChannelInput) (req *request.Request, output *DeleteBaiduChannelOutput) { + op := &request.Operation{ + Name: opDeleteBaiduChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/baidu", + } + + if input == nil { + input = &DeleteBaiduChannelInput{} + } + + output = &DeleteBaiduChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBaiduChannel API operation for Amazon Pinpoint. +// +// Delete a BAIDU GCM channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteBaiduChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannel +func (c *Pinpoint) DeleteBaiduChannel(input *DeleteBaiduChannelInput) (*DeleteBaiduChannelOutput, error) { + req, out := c.DeleteBaiduChannelRequest(input) + return out, req.Send() +} + +// DeleteBaiduChannelWithContext is the same as DeleteBaiduChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBaiduChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteBaiduChannelWithContext(ctx aws.Context, input *DeleteBaiduChannelInput, opts ...request.Option) (*DeleteBaiduChannelOutput, error) { + req, out := c.DeleteBaiduChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCampaign = "DeleteCampaign" + +// DeleteCampaignRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCampaign operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCampaign for more information on using the DeleteCampaign +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteCampaignRequest method. +// req, resp := client.DeleteCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaign +func (c *Pinpoint) DeleteCampaignRequest(input *DeleteCampaignInput) (req *request.Request, output *DeleteCampaignOutput) { + op := &request.Operation{ + Name: opDeleteCampaign, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", + } + + if input == nil { + input = &DeleteCampaignInput{} + } + + output = &DeleteCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteCampaign API operation for Amazon Pinpoint. +// +// Deletes a campaign. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaign +func (c *Pinpoint) DeleteCampaign(input *DeleteCampaignInput) (*DeleteCampaignOutput, error) { + req, out := c.DeleteCampaignRequest(input) + return out, req.Send() +} + +// DeleteCampaignWithContext is the same as DeleteCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCampaign for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteCampaignWithContext(ctx aws.Context, input *DeleteCampaignInput, opts ...request.Option) (*DeleteCampaignOutput, error) { + req, out := c.DeleteCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEmailChannel = "DeleteEmailChannel" + +// DeleteEmailChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEmailChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteEmailChannel for more information on using the DeleteEmailChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteEmailChannelRequest method. +// req, resp := client.DeleteEmailChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannel +func (c *Pinpoint) DeleteEmailChannelRequest(input *DeleteEmailChannelInput) (req *request.Request, output *DeleteEmailChannelOutput) { + op := &request.Operation{ + Name: opDeleteEmailChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/email", + } + + if input == nil { + input = &DeleteEmailChannelInput{} + } + + output = &DeleteEmailChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteEmailChannel API operation for Amazon Pinpoint. +// +// Delete an email channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteEmailChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannel +func (c *Pinpoint) DeleteEmailChannel(input *DeleteEmailChannelInput) (*DeleteEmailChannelOutput, error) { + req, out := c.DeleteEmailChannelRequest(input) + return out, req.Send() +} + +// DeleteEmailChannelWithContext is the same as DeleteEmailChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEmailChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteEmailChannelWithContext(ctx aws.Context, input *DeleteEmailChannelInput, opts ...request.Option) (*DeleteEmailChannelOutput, error) { + req, out := c.DeleteEmailChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEndpoint = "DeleteEndpoint" + +// DeleteEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteEndpoint for more information on using the DeleteEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteEndpointRequest method. +// req, resp := client.DeleteEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEndpoint +func (c *Pinpoint) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { + op := &request.Operation{ + Name: opDeleteEndpoint, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", + } + + if input == nil { + input = &DeleteEndpointInput{} + } + + output = &DeleteEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteEndpoint API operation for Amazon Pinpoint. +// +// Deletes an endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEndpoint +func (c *Pinpoint) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { + req, out := c.DeleteEndpointRequest(input) + return out, req.Send() +} + +// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { + req, out := c.DeleteEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEventStream = "DeleteEventStream" + +// DeleteEventStreamRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEventStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteEventStream for more information on using the DeleteEventStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteEventStreamRequest method. +// req, resp := client.DeleteEventStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStream +func (c *Pinpoint) DeleteEventStreamRequest(input *DeleteEventStreamInput) (req *request.Request, output *DeleteEventStreamOutput) { + op := &request.Operation{ + Name: opDeleteEventStream, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/eventstream", + } + + if input == nil { + input = &DeleteEventStreamInput{} + } + + output = &DeleteEventStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteEventStream API operation for Amazon Pinpoint. +// +// Deletes the event stream for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteEventStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStream +func (c *Pinpoint) DeleteEventStream(input *DeleteEventStreamInput) (*DeleteEventStreamOutput, error) { + req, out := c.DeleteEventStreamRequest(input) + return out, req.Send() +} + +// DeleteEventStreamWithContext is the same as DeleteEventStream with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEventStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteEventStreamWithContext(ctx aws.Context, input *DeleteEventStreamInput, opts ...request.Option) (*DeleteEventStreamOutput, error) { + req, out := c.DeleteEventStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGcmChannel = "DeleteGcmChannel" + +// DeleteGcmChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGcmChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGcmChannel for more information on using the DeleteGcmChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGcmChannelRequest method. +// req, resp := client.DeleteGcmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannel +func (c *Pinpoint) DeleteGcmChannelRequest(input *DeleteGcmChannelInput) (req *request.Request, output *DeleteGcmChannelOutput) { + op := &request.Operation{ + Name: opDeleteGcmChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/gcm", + } + + if input == nil { + input = &DeleteGcmChannelInput{} + } + + output = &DeleteGcmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGcmChannel API operation for Amazon Pinpoint. +// +// Deletes the GCM channel for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteGcmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannel +func (c *Pinpoint) DeleteGcmChannel(input *DeleteGcmChannelInput) (*DeleteGcmChannelOutput, error) { + req, out := c.DeleteGcmChannelRequest(input) + return out, req.Send() +} + +// DeleteGcmChannelWithContext is the same as DeleteGcmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGcmChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteGcmChannelWithContext(ctx aws.Context, input *DeleteGcmChannelInput, opts ...request.Option) (*DeleteGcmChannelOutput, error) { + req, out := c.DeleteGcmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSegment = "DeleteSegment" + +// DeleteSegmentRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSegment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSegment for more information on using the DeleteSegment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSegmentRequest method. +// req, resp := client.DeleteSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegment +func (c *Pinpoint) DeleteSegmentRequest(input *DeleteSegmentInput) (req *request.Request, output *DeleteSegmentOutput) { + op := &request.Operation{ + Name: opDeleteSegment, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", + } + + if input == nil { + input = &DeleteSegmentInput{} + } + + output = &DeleteSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSegment API operation for Amazon Pinpoint. +// +// Deletes a segment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegment +func (c *Pinpoint) DeleteSegment(input *DeleteSegmentInput) (*DeleteSegmentOutput, error) { + req, out := c.DeleteSegmentRequest(input) + return out, req.Send() +} + +// DeleteSegmentWithContext is the same as DeleteSegment with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSegment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteSegmentWithContext(ctx aws.Context, input *DeleteSegmentInput, opts ...request.Option) (*DeleteSegmentOutput, error) { + req, out := c.DeleteSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSmsChannel = "DeleteSmsChannel" + +// DeleteSmsChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSmsChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSmsChannel for more information on using the DeleteSmsChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSmsChannelRequest method. +// req, resp := client.DeleteSmsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannel +func (c *Pinpoint) DeleteSmsChannelRequest(input *DeleteSmsChannelInput) (req *request.Request, output *DeleteSmsChannelOutput) { + op := &request.Operation{ + Name: opDeleteSmsChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/sms", + } + + if input == nil { + input = &DeleteSmsChannelInput{} + } + + output = &DeleteSmsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSmsChannel API operation for Amazon Pinpoint. +// +// Delete an SMS channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteSmsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannel +func (c *Pinpoint) DeleteSmsChannel(input *DeleteSmsChannelInput) (*DeleteSmsChannelOutput, error) { + req, out := c.DeleteSmsChannelRequest(input) + return out, req.Send() +} + +// DeleteSmsChannelWithContext is the same as DeleteSmsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSmsChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteSmsChannelWithContext(ctx aws.Context, input *DeleteSmsChannelInput, opts ...request.Option) (*DeleteSmsChannelOutput, error) { + req, out := c.DeleteSmsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAdmChannel = "GetAdmChannel" + +// GetAdmChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetAdmChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAdmChannel for more information on using the GetAdmChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAdmChannelRequest method. +// req, resp := client.GetAdmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannel +func (c *Pinpoint) GetAdmChannelRequest(input *GetAdmChannelInput) (req *request.Request, output *GetAdmChannelOutput) { + op := &request.Operation{ + Name: opGetAdmChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/adm", + } + + if input == nil { + input = &GetAdmChannelInput{} + } + + output = &GetAdmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAdmChannel API operation for Amazon Pinpoint. +// +// Get an ADM channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetAdmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannel +func (c *Pinpoint) GetAdmChannel(input *GetAdmChannelInput) (*GetAdmChannelOutput, error) { + req, out := c.GetAdmChannelRequest(input) + return out, req.Send() +} + +// GetAdmChannelWithContext is the same as GetAdmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetAdmChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetAdmChannelWithContext(ctx aws.Context, input *GetAdmChannelInput, opts ...request.Option) (*GetAdmChannelOutput, error) { + req, out := c.GetAdmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsChannel = "GetApnsChannel" + +// GetApnsChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApnsChannel for more information on using the GetApnsChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApnsChannelRequest method. +// req, resp := client.GetApnsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannel +func (c *Pinpoint) GetApnsChannelRequest(input *GetApnsChannelInput) (req *request.Request, output *GetApnsChannelOutput) { + op := &request.Operation{ + Name: opGetApnsChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns", + } + + if input == nil { + input = &GetApnsChannelInput{} + } + + output = &GetApnsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsChannel API operation for Amazon Pinpoint. +// +// Returns information about the APNs channel for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetApnsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannel +func (c *Pinpoint) GetApnsChannel(input *GetApnsChannelInput) (*GetApnsChannelOutput, error) { + req, out := c.GetApnsChannelRequest(input) + return out, req.Send() +} + +// GetApnsChannelWithContext is the same as GetApnsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetApnsChannelWithContext(ctx aws.Context, input *GetApnsChannelInput, opts ...request.Option) (*GetApnsChannelOutput, error) { + req, out := c.GetApnsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsSandboxChannel = "GetApnsSandboxChannel" + +// GetApnsSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsSandboxChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApnsSandboxChannel for more information on using the GetApnsSandboxChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApnsSandboxChannelRequest method. +// req, resp := client.GetApnsSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannel +func (c *Pinpoint) GetApnsSandboxChannelRequest(input *GetApnsSandboxChannelInput) (req *request.Request, output *GetApnsSandboxChannelOutput) { + op := &request.Operation{ + Name: opGetApnsSandboxChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", + } + + if input == nil { + input = &GetApnsSandboxChannelInput{} + } + + output = &GetApnsSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsSandboxChannel API operation for Amazon Pinpoint. +// +// Get an APNS sandbox channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetApnsSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannel +func (c *Pinpoint) GetApnsSandboxChannel(input *GetApnsSandboxChannelInput) (*GetApnsSandboxChannelOutput, error) { + req, out := c.GetApnsSandboxChannelRequest(input) + return out, req.Send() +} + +// GetApnsSandboxChannelWithContext is the same as GetApnsSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsSandboxChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetApnsSandboxChannelWithContext(ctx aws.Context, input *GetApnsSandboxChannelInput, opts ...request.Option) (*GetApnsSandboxChannelOutput, error) { + req, out := c.GetApnsSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsVoipChannel = "GetApnsVoipChannel" + +// GetApnsVoipChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsVoipChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApnsVoipChannel for more information on using the GetApnsVoipChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApnsVoipChannelRequest method. +// req, resp := client.GetApnsVoipChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannel +func (c *Pinpoint) GetApnsVoipChannelRequest(input *GetApnsVoipChannelInput) (req *request.Request, output *GetApnsVoipChannelOutput) { + op := &request.Operation{ + Name: opGetApnsVoipChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", + } + + if input == nil { + input = &GetApnsVoipChannelInput{} + } + + output = &GetApnsVoipChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsVoipChannel API operation for Amazon Pinpoint. +// +// Get an APNS VoIP channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetApnsVoipChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannel +func (c *Pinpoint) GetApnsVoipChannel(input *GetApnsVoipChannelInput) (*GetApnsVoipChannelOutput, error) { + req, out := c.GetApnsVoipChannelRequest(input) + return out, req.Send() +} + +// GetApnsVoipChannelWithContext is the same as GetApnsVoipChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsVoipChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetApnsVoipChannelWithContext(ctx aws.Context, input *GetApnsVoipChannelInput, opts ...request.Option) (*GetApnsVoipChannelOutput, error) { + req, out := c.GetApnsVoipChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsVoipSandboxChannel = "GetApnsVoipSandboxChannel" + +// GetApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsVoipSandboxChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApnsVoipSandboxChannel for more information on using the GetApnsVoipSandboxChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApnsVoipSandboxChannelRequest method. +// req, resp := client.GetApnsVoipSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel +func (c *Pinpoint) GetApnsVoipSandboxChannelRequest(input *GetApnsVoipSandboxChannelInput) (req *request.Request, output *GetApnsVoipSandboxChannelOutput) { + op := &request.Operation{ + Name: opGetApnsVoipSandboxChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", + } + + if input == nil { + input = &GetApnsVoipSandboxChannelInput{} + } + + output = &GetApnsVoipSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsVoipSandboxChannel API operation for Amazon Pinpoint. +// +// Get an APNS VoIPSandbox channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetApnsVoipSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel +func (c *Pinpoint) GetApnsVoipSandboxChannel(input *GetApnsVoipSandboxChannelInput) (*GetApnsVoipSandboxChannelOutput, error) { + req, out := c.GetApnsVoipSandboxChannelRequest(input) + return out, req.Send() +} + +// GetApnsVoipSandboxChannelWithContext is the same as GetApnsVoipSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsVoipSandboxChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetApnsVoipSandboxChannelWithContext(ctx aws.Context, input *GetApnsVoipSandboxChannelInput, opts ...request.Option) (*GetApnsVoipSandboxChannelOutput, error) { + req, out := c.GetApnsVoipSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApp = "GetApp" + +// GetAppRequest generates a "aws/request.Request" representing the +// client's request for the GetApp operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApp for more information on using the GetApp +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAppRequest method. +// req, resp := client.GetAppRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApp +func (c *Pinpoint) GetAppRequest(input *GetAppInput) (req *request.Request, output *GetAppOutput) { + op := &request.Operation{ + Name: opGetApp, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}", + } + + if input == nil { + input = &GetAppInput{} + } + + output = &GetAppOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApp API operation for Amazon Pinpoint. +// +// Returns information about an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetApp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApp +func (c *Pinpoint) GetApp(input *GetAppInput) (*GetAppOutput, error) { + req, out := c.GetAppRequest(input) + return out, req.Send() +} + +// GetAppWithContext is the same as GetApp with the addition of +// the ability to pass a context and additional request options. +// +// See GetApp for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetAppWithContext(ctx aws.Context, input *GetAppInput, opts ...request.Option) (*GetAppOutput, error) { + req, out := c.GetAppRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApplicationSettings = "GetApplicationSettings" + +// GetApplicationSettingsRequest generates a "aws/request.Request" representing the +// client's request for the GetApplicationSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApplicationSettings for more information on using the GetApplicationSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApplicationSettingsRequest method. +// req, resp := client.GetApplicationSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings +func (c *Pinpoint) GetApplicationSettingsRequest(input *GetApplicationSettingsInput) (req *request.Request, output *GetApplicationSettingsOutput) { + op := &request.Operation{ + Name: opGetApplicationSettings, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/settings", + } + + if input == nil { + input = &GetApplicationSettingsInput{} + } + + output = &GetApplicationSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApplicationSettings API operation for Amazon Pinpoint. +// +// Used to request the settings for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetApplicationSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings +func (c *Pinpoint) GetApplicationSettings(input *GetApplicationSettingsInput) (*GetApplicationSettingsOutput, error) { + req, out := c.GetApplicationSettingsRequest(input) + return out, req.Send() +} + +// GetApplicationSettingsWithContext is the same as GetApplicationSettings with the addition of +// the ability to pass a context and additional request options. +// +// See GetApplicationSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetApplicationSettingsWithContext(ctx aws.Context, input *GetApplicationSettingsInput, opts ...request.Option) (*GetApplicationSettingsOutput, error) { + req, out := c.GetApplicationSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApps = "GetApps" + +// GetAppsRequest generates a "aws/request.Request" representing the +// client's request for the GetApps operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApps for more information on using the GetApps +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAppsRequest method. +// req, resp := client.GetAppsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps +func (c *Pinpoint) GetAppsRequest(input *GetAppsInput) (req *request.Request, output *GetAppsOutput) { + op := &request.Operation{ + Name: opGetApps, + HTTPMethod: "GET", + HTTPPath: "/v1/apps", + } + + if input == nil { + input = &GetAppsInput{} + } + + output = &GetAppsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApps API operation for Amazon Pinpoint. +// +// Returns information about your apps. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetApps for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps +func (c *Pinpoint) GetApps(input *GetAppsInput) (*GetAppsOutput, error) { + req, out := c.GetAppsRequest(input) + return out, req.Send() +} + +// GetAppsWithContext is the same as GetApps with the addition of +// the ability to pass a context and additional request options. +// +// See GetApps for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetAppsWithContext(ctx aws.Context, input *GetAppsInput, opts ...request.Option) (*GetAppsOutput, error) { + req, out := c.GetAppsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBaiduChannel = "GetBaiduChannel" + +// GetBaiduChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetBaiduChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBaiduChannel for more information on using the GetBaiduChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBaiduChannelRequest method. +// req, resp := client.GetBaiduChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel +func (c *Pinpoint) GetBaiduChannelRequest(input *GetBaiduChannelInput) (req *request.Request, output *GetBaiduChannelOutput) { + op := &request.Operation{ + Name: opGetBaiduChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/baidu", + } + + if input == nil { + input = &GetBaiduChannelInput{} + } + + output = &GetBaiduChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBaiduChannel API operation for Amazon Pinpoint. +// +// Get a BAIDU GCM channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetBaiduChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel +func (c *Pinpoint) GetBaiduChannel(input *GetBaiduChannelInput) (*GetBaiduChannelOutput, error) { + req, out := c.GetBaiduChannelRequest(input) + return out, req.Send() +} + +// GetBaiduChannelWithContext is the same as GetBaiduChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetBaiduChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetBaiduChannelWithContext(ctx aws.Context, input *GetBaiduChannelInput, opts ...request.Option) (*GetBaiduChannelOutput, error) { + req, out := c.GetBaiduChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaign = "GetCampaign" + +// GetCampaignRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaign operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCampaign for more information on using the GetCampaign +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCampaignRequest method. +// req, resp := client.GetCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign +func (c *Pinpoint) GetCampaignRequest(input *GetCampaignInput) (req *request.Request, output *GetCampaignOutput) { + op := &request.Operation{ + Name: opGetCampaign, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", + } + + if input == nil { + input = &GetCampaignInput{} + } + + output = &GetCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaign API operation for Amazon Pinpoint. +// +// Returns information about a campaign. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign +func (c *Pinpoint) GetCampaign(input *GetCampaignInput) (*GetCampaignOutput, error) { + req, out := c.GetCampaignRequest(input) + return out, req.Send() +} + +// GetCampaignWithContext is the same as GetCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaign for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetCampaignWithContext(ctx aws.Context, input *GetCampaignInput, opts ...request.Option) (*GetCampaignOutput, error) { + req, out := c.GetCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaignActivities = "GetCampaignActivities" + +// GetCampaignActivitiesRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaignActivities operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCampaignActivities for more information on using the GetCampaignActivities +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCampaignActivitiesRequest method. +// req, resp := client.GetCampaignActivitiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities +func (c *Pinpoint) GetCampaignActivitiesRequest(input *GetCampaignActivitiesInput) (req *request.Request, output *GetCampaignActivitiesOutput) { + op := &request.Operation{ + Name: opGetCampaignActivities, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/activities", + } + + if input == nil { + input = &GetCampaignActivitiesInput{} + } + + output = &GetCampaignActivitiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaignActivities API operation for Amazon Pinpoint. +// +// Returns information about the activity performed by a campaign. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetCampaignActivities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities +func (c *Pinpoint) GetCampaignActivities(input *GetCampaignActivitiesInput) (*GetCampaignActivitiesOutput, error) { + req, out := c.GetCampaignActivitiesRequest(input) + return out, req.Send() +} + +// GetCampaignActivitiesWithContext is the same as GetCampaignActivities with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaignActivities for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetCampaignActivitiesWithContext(ctx aws.Context, input *GetCampaignActivitiesInput, opts ...request.Option) (*GetCampaignActivitiesOutput, error) { + req, out := c.GetCampaignActivitiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaignVersion = "GetCampaignVersion" + +// GetCampaignVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaignVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCampaignVersion for more information on using the GetCampaignVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCampaignVersionRequest method. +// req, resp := client.GetCampaignVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion +func (c *Pinpoint) GetCampaignVersionRequest(input *GetCampaignVersionInput) (req *request.Request, output *GetCampaignVersionOutput) { + op := &request.Operation{ + Name: opGetCampaignVersion, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/versions/{version}", + } + + if input == nil { + input = &GetCampaignVersionInput{} + } + + output = &GetCampaignVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaignVersion API operation for Amazon Pinpoint. +// +// Returns information about a specific version of a campaign. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetCampaignVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion +func (c *Pinpoint) GetCampaignVersion(input *GetCampaignVersionInput) (*GetCampaignVersionOutput, error) { + req, out := c.GetCampaignVersionRequest(input) + return out, req.Send() +} + +// GetCampaignVersionWithContext is the same as GetCampaignVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaignVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetCampaignVersionWithContext(ctx aws.Context, input *GetCampaignVersionInput, opts ...request.Option) (*GetCampaignVersionOutput, error) { + req, out := c.GetCampaignVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaignVersions = "GetCampaignVersions" + +// GetCampaignVersionsRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaignVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCampaignVersions for more information on using the GetCampaignVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCampaignVersionsRequest method. +// req, resp := client.GetCampaignVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions +func (c *Pinpoint) GetCampaignVersionsRequest(input *GetCampaignVersionsInput) (req *request.Request, output *GetCampaignVersionsOutput) { + op := &request.Operation{ + Name: opGetCampaignVersions, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/versions", + } + + if input == nil { + input = &GetCampaignVersionsInput{} + } + + output = &GetCampaignVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaignVersions API operation for Amazon Pinpoint. +// +// Returns information about your campaign versions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetCampaignVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions +func (c *Pinpoint) GetCampaignVersions(input *GetCampaignVersionsInput) (*GetCampaignVersionsOutput, error) { + req, out := c.GetCampaignVersionsRequest(input) + return out, req.Send() +} + +// GetCampaignVersionsWithContext is the same as GetCampaignVersions with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaignVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetCampaignVersionsWithContext(ctx aws.Context, input *GetCampaignVersionsInput, opts ...request.Option) (*GetCampaignVersionsOutput, error) { + req, out := c.GetCampaignVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaigns = "GetCampaigns" + +// GetCampaignsRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaigns operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCampaigns for more information on using the GetCampaigns +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCampaignsRequest method. +// req, resp := client.GetCampaignsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns +func (c *Pinpoint) GetCampaignsRequest(input *GetCampaignsInput) (req *request.Request, output *GetCampaignsOutput) { + op := &request.Operation{ + Name: opGetCampaigns, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns", + } + + if input == nil { + input = &GetCampaignsInput{} + } + + output = &GetCampaignsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaigns API operation for Amazon Pinpoint. +// +// Returns information about your campaigns. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetCampaigns for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns +func (c *Pinpoint) GetCampaigns(input *GetCampaignsInput) (*GetCampaignsOutput, error) { + req, out := c.GetCampaignsRequest(input) + return out, req.Send() +} + +// GetCampaignsWithContext is the same as GetCampaigns with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaigns for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetCampaignsWithContext(ctx aws.Context, input *GetCampaignsInput, opts ...request.Option) (*GetCampaignsOutput, error) { + req, out := c.GetCampaignsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetEmailChannel = "GetEmailChannel" + +// GetEmailChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetEmailChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetEmailChannel for more information on using the GetEmailChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetEmailChannelRequest method. +// req, resp := client.GetEmailChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel +func (c *Pinpoint) GetEmailChannelRequest(input *GetEmailChannelInput) (req *request.Request, output *GetEmailChannelOutput) { + op := &request.Operation{ + Name: opGetEmailChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/email", + } + + if input == nil { + input = &GetEmailChannelInput{} + } + + output = &GetEmailChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEmailChannel API operation for Amazon Pinpoint. +// +// Get an email channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetEmailChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel +func (c *Pinpoint) GetEmailChannel(input *GetEmailChannelInput) (*GetEmailChannelOutput, error) { + req, out := c.GetEmailChannelRequest(input) + return out, req.Send() +} + +// GetEmailChannelWithContext is the same as GetEmailChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetEmailChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetEmailChannelWithContext(ctx aws.Context, input *GetEmailChannelInput, opts ...request.Option) (*GetEmailChannelOutput, error) { + req, out := c.GetEmailChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetEndpoint = "GetEndpoint" + +// GetEndpointRequest generates a "aws/request.Request" representing the +// client's request for the GetEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetEndpoint for more information on using the GetEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetEndpointRequest method. +// req, resp := client.GetEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint +func (c *Pinpoint) GetEndpointRequest(input *GetEndpointInput) (req *request.Request, output *GetEndpointOutput) { + op := &request.Operation{ + Name: opGetEndpoint, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", + } + + if input == nil { + input = &GetEndpointInput{} + } + + output = &GetEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEndpoint API operation for Amazon Pinpoint. +// +// Returns information about an endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint +func (c *Pinpoint) GetEndpoint(input *GetEndpointInput) (*GetEndpointOutput, error) { + req, out := c.GetEndpointRequest(input) + return out, req.Send() +} + +// GetEndpointWithContext is the same as GetEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See GetEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetEndpointWithContext(ctx aws.Context, input *GetEndpointInput, opts ...request.Option) (*GetEndpointOutput, error) { + req, out := c.GetEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetEventStream = "GetEventStream" + +// GetEventStreamRequest generates a "aws/request.Request" representing the +// client's request for the GetEventStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetEventStream for more information on using the GetEventStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetEventStreamRequest method. +// req, resp := client.GetEventStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream +func (c *Pinpoint) GetEventStreamRequest(input *GetEventStreamInput) (req *request.Request, output *GetEventStreamOutput) { + op := &request.Operation{ + Name: opGetEventStream, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/eventstream", + } + + if input == nil { + input = &GetEventStreamInput{} + } + + output = &GetEventStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEventStream API operation for Amazon Pinpoint. +// +// Returns the event stream for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetEventStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream +func (c *Pinpoint) GetEventStream(input *GetEventStreamInput) (*GetEventStreamOutput, error) { + req, out := c.GetEventStreamRequest(input) + return out, req.Send() +} + +// GetEventStreamWithContext is the same as GetEventStream with the addition of +// the ability to pass a context and additional request options. +// +// See GetEventStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetEventStreamWithContext(ctx aws.Context, input *GetEventStreamInput, opts ...request.Option) (*GetEventStreamOutput, error) { + req, out := c.GetEventStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetExportJob = "GetExportJob" + +// GetExportJobRequest generates a "aws/request.Request" representing the +// client's request for the GetExportJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetExportJob for more information on using the GetExportJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetExportJobRequest method. +// req, resp := client.GetExportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob +func (c *Pinpoint) GetExportJobRequest(input *GetExportJobInput) (req *request.Request, output *GetExportJobOutput) { + op := &request.Operation{ + Name: opGetExportJob, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/export/{job-id}", + } + + if input == nil { + input = &GetExportJobInput{} + } + + output = &GetExportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetExportJob API operation for Amazon Pinpoint. +// +// Returns information about an export job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetExportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob +func (c *Pinpoint) GetExportJob(input *GetExportJobInput) (*GetExportJobOutput, error) { + req, out := c.GetExportJobRequest(input) + return out, req.Send() +} + +// GetExportJobWithContext is the same as GetExportJob with the addition of +// the ability to pass a context and additional request options. +// +// See GetExportJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetExportJobWithContext(ctx aws.Context, input *GetExportJobInput, opts ...request.Option) (*GetExportJobOutput, error) { + req, out := c.GetExportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetExportJobs = "GetExportJobs" + +// GetExportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetExportJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetExportJobs for more information on using the GetExportJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetExportJobsRequest method. +// req, resp := client.GetExportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs +func (c *Pinpoint) GetExportJobsRequest(input *GetExportJobsInput) (req *request.Request, output *GetExportJobsOutput) { + op := &request.Operation{ + Name: opGetExportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/export", + } + + if input == nil { + input = &GetExportJobsInput{} + } + + output = &GetExportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetExportJobs API operation for Amazon Pinpoint. +// +// Returns information about your export jobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetExportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs +func (c *Pinpoint) GetExportJobs(input *GetExportJobsInput) (*GetExportJobsOutput, error) { + req, out := c.GetExportJobsRequest(input) + return out, req.Send() +} + +// GetExportJobsWithContext is the same as GetExportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetExportJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetExportJobsWithContext(ctx aws.Context, input *GetExportJobsInput, opts ...request.Option) (*GetExportJobsOutput, error) { + req, out := c.GetExportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGcmChannel = "GetGcmChannel" + +// GetGcmChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetGcmChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGcmChannel for more information on using the GetGcmChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGcmChannelRequest method. +// req, resp := client.GetGcmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel +func (c *Pinpoint) GetGcmChannelRequest(input *GetGcmChannelInput) (req *request.Request, output *GetGcmChannelOutput) { + op := &request.Operation{ + Name: opGetGcmChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/gcm", + } + + if input == nil { + input = &GetGcmChannelInput{} + } + + output = &GetGcmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGcmChannel API operation for Amazon Pinpoint. +// +// Returns information about the GCM channel for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetGcmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel +func (c *Pinpoint) GetGcmChannel(input *GetGcmChannelInput) (*GetGcmChannelOutput, error) { + req, out := c.GetGcmChannelRequest(input) + return out, req.Send() +} + +// GetGcmChannelWithContext is the same as GetGcmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetGcmChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetGcmChannelWithContext(ctx aws.Context, input *GetGcmChannelInput, opts ...request.Option) (*GetGcmChannelOutput, error) { + req, out := c.GetGcmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetImportJob = "GetImportJob" + +// GetImportJobRequest generates a "aws/request.Request" representing the +// client's request for the GetImportJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetImportJob for more information on using the GetImportJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetImportJobRequest method. +// req, resp := client.GetImportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob +func (c *Pinpoint) GetImportJobRequest(input *GetImportJobInput) (req *request.Request, output *GetImportJobOutput) { + op := &request.Operation{ + Name: opGetImportJob, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/import/{job-id}", + } + + if input == nil { + input = &GetImportJobInput{} + } + + output = &GetImportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetImportJob API operation for Amazon Pinpoint. +// +// Returns information about an import job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetImportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob +func (c *Pinpoint) GetImportJob(input *GetImportJobInput) (*GetImportJobOutput, error) { + req, out := c.GetImportJobRequest(input) + return out, req.Send() +} + +// GetImportJobWithContext is the same as GetImportJob with the addition of +// the ability to pass a context and additional request options. +// +// See GetImportJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetImportJobWithContext(ctx aws.Context, input *GetImportJobInput, opts ...request.Option) (*GetImportJobOutput, error) { + req, out := c.GetImportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetImportJobs = "GetImportJobs" + +// GetImportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetImportJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetImportJobs for more information on using the GetImportJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetImportJobsRequest method. +// req, resp := client.GetImportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs +func (c *Pinpoint) GetImportJobsRequest(input *GetImportJobsInput) (req *request.Request, output *GetImportJobsOutput) { + op := &request.Operation{ + Name: opGetImportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/import", + } + + if input == nil { + input = &GetImportJobsInput{} + } + + output = &GetImportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetImportJobs API operation for Amazon Pinpoint. +// +// Returns information about your import jobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetImportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs +func (c *Pinpoint) GetImportJobs(input *GetImportJobsInput) (*GetImportJobsOutput, error) { + req, out := c.GetImportJobsRequest(input) + return out, req.Send() +} + +// GetImportJobsWithContext is the same as GetImportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetImportJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetImportJobsWithContext(ctx aws.Context, input *GetImportJobsInput, opts ...request.Option) (*GetImportJobsOutput, error) { + req, out := c.GetImportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegment = "GetSegment" + +// GetSegmentRequest generates a "aws/request.Request" representing the +// client's request for the GetSegment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSegment for more information on using the GetSegment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSegmentRequest method. +// req, resp := client.GetSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment +func (c *Pinpoint) GetSegmentRequest(input *GetSegmentInput) (req *request.Request, output *GetSegmentOutput) { + op := &request.Operation{ + Name: opGetSegment, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", + } + + if input == nil { + input = &GetSegmentInput{} + } + + output = &GetSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegment API operation for Amazon Pinpoint. +// +// Returns information about a segment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment +func (c *Pinpoint) GetSegment(input *GetSegmentInput) (*GetSegmentOutput, error) { + req, out := c.GetSegmentRequest(input) + return out, req.Send() +} + +// GetSegmentWithContext is the same as GetSegment with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetSegmentWithContext(ctx aws.Context, input *GetSegmentInput, opts ...request.Option) (*GetSegmentOutput, error) { + req, out := c.GetSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentExportJobs = "GetSegmentExportJobs" + +// GetSegmentExportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentExportJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSegmentExportJobs for more information on using the GetSegmentExportJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSegmentExportJobsRequest method. +// req, resp := client.GetSegmentExportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs +func (c *Pinpoint) GetSegmentExportJobsRequest(input *GetSegmentExportJobsInput) (req *request.Request, output *GetSegmentExportJobsOutput) { + op := &request.Operation{ + Name: opGetSegmentExportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/jobs/export", + } + + if input == nil { + input = &GetSegmentExportJobsInput{} + } + + output = &GetSegmentExportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentExportJobs API operation for Amazon Pinpoint. +// +// Returns a list of export jobs for a specific segment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetSegmentExportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs +func (c *Pinpoint) GetSegmentExportJobs(input *GetSegmentExportJobsInput) (*GetSegmentExportJobsOutput, error) { + req, out := c.GetSegmentExportJobsRequest(input) + return out, req.Send() +} + +// GetSegmentExportJobsWithContext is the same as GetSegmentExportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentExportJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetSegmentExportJobsWithContext(ctx aws.Context, input *GetSegmentExportJobsInput, opts ...request.Option) (*GetSegmentExportJobsOutput, error) { + req, out := c.GetSegmentExportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentImportJobs = "GetSegmentImportJobs" + +// GetSegmentImportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentImportJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSegmentImportJobs for more information on using the GetSegmentImportJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSegmentImportJobsRequest method. +// req, resp := client.GetSegmentImportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs +func (c *Pinpoint) GetSegmentImportJobsRequest(input *GetSegmentImportJobsInput) (req *request.Request, output *GetSegmentImportJobsOutput) { + op := &request.Operation{ + Name: opGetSegmentImportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/jobs/import", + } + + if input == nil { + input = &GetSegmentImportJobsInput{} + } + + output = &GetSegmentImportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentImportJobs API operation for Amazon Pinpoint. +// +// Returns a list of import jobs for a specific segment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetSegmentImportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs +func (c *Pinpoint) GetSegmentImportJobs(input *GetSegmentImportJobsInput) (*GetSegmentImportJobsOutput, error) { + req, out := c.GetSegmentImportJobsRequest(input) + return out, req.Send() +} + +// GetSegmentImportJobsWithContext is the same as GetSegmentImportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentImportJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetSegmentImportJobsWithContext(ctx aws.Context, input *GetSegmentImportJobsInput, opts ...request.Option) (*GetSegmentImportJobsOutput, error) { + req, out := c.GetSegmentImportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentVersion = "GetSegmentVersion" + +// GetSegmentVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSegmentVersion for more information on using the GetSegmentVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSegmentVersionRequest method. +// req, resp := client.GetSegmentVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion +func (c *Pinpoint) GetSegmentVersionRequest(input *GetSegmentVersionInput) (req *request.Request, output *GetSegmentVersionOutput) { + op := &request.Operation{ + Name: opGetSegmentVersion, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/versions/{version}", + } + + if input == nil { + input = &GetSegmentVersionInput{} + } + + output = &GetSegmentVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentVersion API operation for Amazon Pinpoint. +// +// Returns information about a segment version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetSegmentVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion +func (c *Pinpoint) GetSegmentVersion(input *GetSegmentVersionInput) (*GetSegmentVersionOutput, error) { + req, out := c.GetSegmentVersionRequest(input) + return out, req.Send() +} + +// GetSegmentVersionWithContext is the same as GetSegmentVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetSegmentVersionWithContext(ctx aws.Context, input *GetSegmentVersionInput, opts ...request.Option) (*GetSegmentVersionOutput, error) { + req, out := c.GetSegmentVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentVersions = "GetSegmentVersions" + +// GetSegmentVersionsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSegmentVersions for more information on using the GetSegmentVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSegmentVersionsRequest method. +// req, resp := client.GetSegmentVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions +func (c *Pinpoint) GetSegmentVersionsRequest(input *GetSegmentVersionsInput) (req *request.Request, output *GetSegmentVersionsOutput) { + op := &request.Operation{ + Name: opGetSegmentVersions, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/versions", + } + + if input == nil { + input = &GetSegmentVersionsInput{} + } + + output = &GetSegmentVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentVersions API operation for Amazon Pinpoint. +// +// Returns information about your segment versions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetSegmentVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions +func (c *Pinpoint) GetSegmentVersions(input *GetSegmentVersionsInput) (*GetSegmentVersionsOutput, error) { + req, out := c.GetSegmentVersionsRequest(input) + return out, req.Send() +} + +// GetSegmentVersionsWithContext is the same as GetSegmentVersions with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetSegmentVersionsWithContext(ctx aws.Context, input *GetSegmentVersionsInput, opts ...request.Option) (*GetSegmentVersionsOutput, error) { + req, out := c.GetSegmentVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegments = "GetSegments" + +// GetSegmentsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegments operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSegments for more information on using the GetSegments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSegmentsRequest method. +// req, resp := client.GetSegmentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments +func (c *Pinpoint) GetSegmentsRequest(input *GetSegmentsInput) (req *request.Request, output *GetSegmentsOutput) { + op := &request.Operation{ + Name: opGetSegments, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments", + } + + if input == nil { + input = &GetSegmentsInput{} + } + + output = &GetSegmentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegments API operation for Amazon Pinpoint. +// +// Used to get information about your segments. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetSegments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments +func (c *Pinpoint) GetSegments(input *GetSegmentsInput) (*GetSegmentsOutput, error) { + req, out := c.GetSegmentsRequest(input) + return out, req.Send() +} + +// GetSegmentsWithContext is the same as GetSegments with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegments for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetSegmentsWithContext(ctx aws.Context, input *GetSegmentsInput, opts ...request.Option) (*GetSegmentsOutput, error) { + req, out := c.GetSegmentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSmsChannel = "GetSmsChannel" + +// GetSmsChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetSmsChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSmsChannel for more information on using the GetSmsChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSmsChannelRequest method. +// req, resp := client.GetSmsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel +func (c *Pinpoint) GetSmsChannelRequest(input *GetSmsChannelInput) (req *request.Request, output *GetSmsChannelOutput) { + op := &request.Operation{ + Name: opGetSmsChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/sms", + } + + if input == nil { + input = &GetSmsChannelInput{} + } + + output = &GetSmsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSmsChannel API operation for Amazon Pinpoint. +// +// Get an SMS channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetSmsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel +func (c *Pinpoint) GetSmsChannel(input *GetSmsChannelInput) (*GetSmsChannelOutput, error) { + req, out := c.GetSmsChannelRequest(input) + return out, req.Send() +} + +// GetSmsChannelWithContext is the same as GetSmsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetSmsChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetSmsChannelWithContext(ctx aws.Context, input *GetSmsChannelInput, opts ...request.Option) (*GetSmsChannelOutput, error) { + req, out := c.GetSmsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutEventStream = "PutEventStream" + +// PutEventStreamRequest generates a "aws/request.Request" representing the +// client's request for the PutEventStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutEventStream for more information on using the PutEventStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutEventStreamRequest method. +// req, resp := client.PutEventStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream +func (c *Pinpoint) PutEventStreamRequest(input *PutEventStreamInput) (req *request.Request, output *PutEventStreamOutput) { + op := &request.Operation{ + Name: opPutEventStream, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/eventstream", + } + + if input == nil { + input = &PutEventStreamInput{} + } + + output = &PutEventStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutEventStream API operation for Amazon Pinpoint. +// +// Use to create or update the event stream for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation PutEventStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream +func (c *Pinpoint) PutEventStream(input *PutEventStreamInput) (*PutEventStreamOutput, error) { + req, out := c.PutEventStreamRequest(input) + return out, req.Send() +} + +// PutEventStreamWithContext is the same as PutEventStream with the addition of +// the ability to pass a context and additional request options. +// +// See PutEventStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) PutEventStreamWithContext(ctx aws.Context, input *PutEventStreamInput, opts ...request.Option) (*PutEventStreamOutput, error) { + req, out := c.PutEventStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSendMessages = "SendMessages" + +// SendMessagesRequest generates a "aws/request.Request" representing the +// client's request for the SendMessages operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SendMessages for more information on using the SendMessages +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SendMessagesRequest method. +// req, resp := client.SendMessagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages +func (c *Pinpoint) SendMessagesRequest(input *SendMessagesInput) (req *request.Request, output *SendMessagesOutput) { + op := &request.Operation{ + Name: opSendMessages, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/messages", + } + + if input == nil { + input = &SendMessagesInput{} + } + + output = &SendMessagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendMessages API operation for Amazon Pinpoint. +// +// Send a batch of messages +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation SendMessages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages +func (c *Pinpoint) SendMessages(input *SendMessagesInput) (*SendMessagesOutput, error) { + req, out := c.SendMessagesRequest(input) + return out, req.Send() +} + +// SendMessagesWithContext is the same as SendMessages with the addition of +// the ability to pass a context and additional request options. +// +// See SendMessages for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) SendMessagesWithContext(ctx aws.Context, input *SendMessagesInput, opts ...request.Option) (*SendMessagesOutput, error) { + req, out := c.SendMessagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSendUsersMessages = "SendUsersMessages" + +// SendUsersMessagesRequest generates a "aws/request.Request" representing the +// client's request for the SendUsersMessages operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SendUsersMessages for more information on using the SendUsersMessages +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SendUsersMessagesRequest method. +// req, resp := client.SendUsersMessagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages +func (c *Pinpoint) SendUsersMessagesRequest(input *SendUsersMessagesInput) (req *request.Request, output *SendUsersMessagesOutput) { + op := &request.Operation{ + Name: opSendUsersMessages, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/users-messages", + } + + if input == nil { + input = &SendUsersMessagesInput{} + } + + output = &SendUsersMessagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendUsersMessages API operation for Amazon Pinpoint. +// +// Send a batch of messages to users +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation SendUsersMessages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages +func (c *Pinpoint) SendUsersMessages(input *SendUsersMessagesInput) (*SendUsersMessagesOutput, error) { + req, out := c.SendUsersMessagesRequest(input) + return out, req.Send() +} + +// SendUsersMessagesWithContext is the same as SendUsersMessages with the addition of +// the ability to pass a context and additional request options. +// +// See SendUsersMessages for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) SendUsersMessagesWithContext(ctx aws.Context, input *SendUsersMessagesInput, opts ...request.Option) (*SendUsersMessagesOutput, error) { + req, out := c.SendUsersMessagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAdmChannel = "UpdateAdmChannel" + +// UpdateAdmChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAdmChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAdmChannel for more information on using the UpdateAdmChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAdmChannelRequest method. +// req, resp := client.UpdateAdmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel +func (c *Pinpoint) UpdateAdmChannelRequest(input *UpdateAdmChannelInput) (req *request.Request, output *UpdateAdmChannelOutput) { + op := &request.Operation{ + Name: opUpdateAdmChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/adm", + } + + if input == nil { + input = &UpdateAdmChannelInput{} + } + + output = &UpdateAdmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAdmChannel API operation for Amazon Pinpoint. +// +// Update an ADM channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateAdmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel +func (c *Pinpoint) UpdateAdmChannel(input *UpdateAdmChannelInput) (*UpdateAdmChannelOutput, error) { + req, out := c.UpdateAdmChannelRequest(input) + return out, req.Send() +} + +// UpdateAdmChannelWithContext is the same as UpdateAdmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAdmChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateAdmChannelWithContext(ctx aws.Context, input *UpdateAdmChannelInput, opts ...request.Option) (*UpdateAdmChannelOutput, error) { + req, out := c.UpdateAdmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsChannel = "UpdateApnsChannel" + +// UpdateApnsChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApnsChannel for more information on using the UpdateApnsChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApnsChannelRequest method. +// req, resp := client.UpdateApnsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel +func (c *Pinpoint) UpdateApnsChannelRequest(input *UpdateApnsChannelInput) (req *request.Request, output *UpdateApnsChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns", + } + + if input == nil { + input = &UpdateApnsChannelInput{} + } + + output = &UpdateApnsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsChannel API operation for Amazon Pinpoint. +// +// Use to update the APNs channel for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateApnsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel +func (c *Pinpoint) UpdateApnsChannel(input *UpdateApnsChannelInput) (*UpdateApnsChannelOutput, error) { + req, out := c.UpdateApnsChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsChannelWithContext is the same as UpdateApnsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateApnsChannelWithContext(ctx aws.Context, input *UpdateApnsChannelInput, opts ...request.Option) (*UpdateApnsChannelOutput, error) { + req, out := c.UpdateApnsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsSandboxChannel = "UpdateApnsSandboxChannel" + +// UpdateApnsSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsSandboxChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApnsSandboxChannel for more information on using the UpdateApnsSandboxChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApnsSandboxChannelRequest method. +// req, resp := client.UpdateApnsSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel +func (c *Pinpoint) UpdateApnsSandboxChannelRequest(input *UpdateApnsSandboxChannelInput) (req *request.Request, output *UpdateApnsSandboxChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsSandboxChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", + } + + if input == nil { + input = &UpdateApnsSandboxChannelInput{} + } + + output = &UpdateApnsSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsSandboxChannel API operation for Amazon Pinpoint. +// +// Update an APNS sandbox channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateApnsSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel +func (c *Pinpoint) UpdateApnsSandboxChannel(input *UpdateApnsSandboxChannelInput) (*UpdateApnsSandboxChannelOutput, error) { + req, out := c.UpdateApnsSandboxChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsSandboxChannelWithContext is the same as UpdateApnsSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsSandboxChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateApnsSandboxChannelWithContext(ctx aws.Context, input *UpdateApnsSandboxChannelInput, opts ...request.Option) (*UpdateApnsSandboxChannelOutput, error) { + req, out := c.UpdateApnsSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsVoipChannel = "UpdateApnsVoipChannel" + +// UpdateApnsVoipChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsVoipChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApnsVoipChannel for more information on using the UpdateApnsVoipChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApnsVoipChannelRequest method. +// req, resp := client.UpdateApnsVoipChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel +func (c *Pinpoint) UpdateApnsVoipChannelRequest(input *UpdateApnsVoipChannelInput) (req *request.Request, output *UpdateApnsVoipChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsVoipChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", + } + + if input == nil { + input = &UpdateApnsVoipChannelInput{} + } + + output = &UpdateApnsVoipChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsVoipChannel API operation for Amazon Pinpoint. +// +// Update an APNS VoIP channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateApnsVoipChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel +func (c *Pinpoint) UpdateApnsVoipChannel(input *UpdateApnsVoipChannelInput) (*UpdateApnsVoipChannelOutput, error) { + req, out := c.UpdateApnsVoipChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsVoipChannelWithContext is the same as UpdateApnsVoipChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsVoipChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateApnsVoipChannelWithContext(ctx aws.Context, input *UpdateApnsVoipChannelInput, opts ...request.Option) (*UpdateApnsVoipChannelOutput, error) { + req, out := c.UpdateApnsVoipChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsVoipSandboxChannel = "UpdateApnsVoipSandboxChannel" + +// UpdateApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsVoipSandboxChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApnsVoipSandboxChannel for more information on using the UpdateApnsVoipSandboxChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApnsVoipSandboxChannelRequest method. +// req, resp := client.UpdateApnsVoipSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel +func (c *Pinpoint) UpdateApnsVoipSandboxChannelRequest(input *UpdateApnsVoipSandboxChannelInput) (req *request.Request, output *UpdateApnsVoipSandboxChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsVoipSandboxChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", + } + + if input == nil { + input = &UpdateApnsVoipSandboxChannelInput{} + } + + output = &UpdateApnsVoipSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsVoipSandboxChannel API operation for Amazon Pinpoint. +// +// Update an APNS VoIP sandbox channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateApnsVoipSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel +func (c *Pinpoint) UpdateApnsVoipSandboxChannel(input *UpdateApnsVoipSandboxChannelInput) (*UpdateApnsVoipSandboxChannelOutput, error) { + req, out := c.UpdateApnsVoipSandboxChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsVoipSandboxChannelWithContext is the same as UpdateApnsVoipSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsVoipSandboxChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateApnsVoipSandboxChannelWithContext(ctx aws.Context, input *UpdateApnsVoipSandboxChannelInput, opts ...request.Option) (*UpdateApnsVoipSandboxChannelOutput, error) { + req, out := c.UpdateApnsVoipSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApplicationSettings = "UpdateApplicationSettings" + +// UpdateApplicationSettingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApplicationSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApplicationSettings for more information on using the UpdateApplicationSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApplicationSettingsRequest method. +// req, resp := client.UpdateApplicationSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings +func (c *Pinpoint) UpdateApplicationSettingsRequest(input *UpdateApplicationSettingsInput) (req *request.Request, output *UpdateApplicationSettingsOutput) { + op := &request.Operation{ + Name: opUpdateApplicationSettings, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/settings", + } + + if input == nil { + input = &UpdateApplicationSettingsInput{} + } + + output = &UpdateApplicationSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApplicationSettings API operation for Amazon Pinpoint. +// +// Used to update the settings for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateApplicationSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings +func (c *Pinpoint) UpdateApplicationSettings(input *UpdateApplicationSettingsInput) (*UpdateApplicationSettingsOutput, error) { + req, out := c.UpdateApplicationSettingsRequest(input) + return out, req.Send() +} + +// UpdateApplicationSettingsWithContext is the same as UpdateApplicationSettings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApplicationSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateApplicationSettingsWithContext(ctx aws.Context, input *UpdateApplicationSettingsInput, opts ...request.Option) (*UpdateApplicationSettingsOutput, error) { + req, out := c.UpdateApplicationSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateBaiduChannel = "UpdateBaiduChannel" + +// UpdateBaiduChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBaiduChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateBaiduChannel for more information on using the UpdateBaiduChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateBaiduChannelRequest method. +// req, resp := client.UpdateBaiduChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel +func (c *Pinpoint) UpdateBaiduChannelRequest(input *UpdateBaiduChannelInput) (req *request.Request, output *UpdateBaiduChannelOutput) { + op := &request.Operation{ + Name: opUpdateBaiduChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/baidu", + } + + if input == nil { + input = &UpdateBaiduChannelInput{} + } + + output = &UpdateBaiduChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBaiduChannel API operation for Amazon Pinpoint. +// +// Update a BAIDU GCM channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateBaiduChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel +func (c *Pinpoint) UpdateBaiduChannel(input *UpdateBaiduChannelInput) (*UpdateBaiduChannelOutput, error) { + req, out := c.UpdateBaiduChannelRequest(input) + return out, req.Send() +} + +// UpdateBaiduChannelWithContext is the same as UpdateBaiduChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBaiduChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateBaiduChannelWithContext(ctx aws.Context, input *UpdateBaiduChannelInput, opts ...request.Option) (*UpdateBaiduChannelOutput, error) { + req, out := c.UpdateBaiduChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCampaign = "UpdateCampaign" + +// UpdateCampaignRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCampaign operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCampaign for more information on using the UpdateCampaign +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCampaignRequest method. +// req, resp := client.UpdateCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign +func (c *Pinpoint) UpdateCampaignRequest(input *UpdateCampaignInput) (req *request.Request, output *UpdateCampaignOutput) { + op := &request.Operation{ + Name: opUpdateCampaign, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", + } + + if input == nil { + input = &UpdateCampaignInput{} + } + + output = &UpdateCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateCampaign API operation for Amazon Pinpoint. +// +// Use to update a campaign. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign +func (c *Pinpoint) UpdateCampaign(input *UpdateCampaignInput) (*UpdateCampaignOutput, error) { + req, out := c.UpdateCampaignRequest(input) + return out, req.Send() +} + +// UpdateCampaignWithContext is the same as UpdateCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCampaign for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateCampaignWithContext(ctx aws.Context, input *UpdateCampaignInput, opts ...request.Option) (*UpdateCampaignOutput, error) { + req, out := c.UpdateCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEmailChannel = "UpdateEmailChannel" + +// UpdateEmailChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEmailChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateEmailChannel for more information on using the UpdateEmailChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateEmailChannelRequest method. +// req, resp := client.UpdateEmailChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel +func (c *Pinpoint) UpdateEmailChannelRequest(input *UpdateEmailChannelInput) (req *request.Request, output *UpdateEmailChannelOutput) { + op := &request.Operation{ + Name: opUpdateEmailChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/email", + } + + if input == nil { + input = &UpdateEmailChannelInput{} + } + + output = &UpdateEmailChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEmailChannel API operation for Amazon Pinpoint. +// +// Update an email channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateEmailChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel +func (c *Pinpoint) UpdateEmailChannel(input *UpdateEmailChannelInput) (*UpdateEmailChannelOutput, error) { + req, out := c.UpdateEmailChannelRequest(input) + return out, req.Send() +} + +// UpdateEmailChannelWithContext is the same as UpdateEmailChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEmailChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateEmailChannelWithContext(ctx aws.Context, input *UpdateEmailChannelInput, opts ...request.Option) (*UpdateEmailChannelOutput, error) { + req, out := c.UpdateEmailChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEndpoint = "UpdateEndpoint" + +// UpdateEndpointRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateEndpoint for more information on using the UpdateEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateEndpointRequest method. +// req, resp := client.UpdateEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpoint +func (c *Pinpoint) UpdateEndpointRequest(input *UpdateEndpointInput) (req *request.Request, output *UpdateEndpointOutput) { + op := &request.Operation{ + Name: opUpdateEndpoint, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", + } + + if input == nil { + input = &UpdateEndpointInput{} + } + + output = &UpdateEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEndpoint API operation for Amazon Pinpoint. +// +// Use to update an endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpoint +func (c *Pinpoint) UpdateEndpoint(input *UpdateEndpointInput) (*UpdateEndpointOutput, error) { + req, out := c.UpdateEndpointRequest(input) + return out, req.Send() +} + +// UpdateEndpointWithContext is the same as UpdateEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateEndpointWithContext(ctx aws.Context, input *UpdateEndpointInput, opts ...request.Option) (*UpdateEndpointOutput, error) { + req, out := c.UpdateEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEndpointsBatch = "UpdateEndpointsBatch" + +// UpdateEndpointsBatchRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEndpointsBatch operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateEndpointsBatch for more information on using the UpdateEndpointsBatch +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateEndpointsBatchRequest method. +// req, resp := client.UpdateEndpointsBatchRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch +func (c *Pinpoint) UpdateEndpointsBatchRequest(input *UpdateEndpointsBatchInput) (req *request.Request, output *UpdateEndpointsBatchOutput) { + op := &request.Operation{ + Name: opUpdateEndpointsBatch, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/endpoints", + } + + if input == nil { + input = &UpdateEndpointsBatchInput{} + } + + output = &UpdateEndpointsBatchOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEndpointsBatch API operation for Amazon Pinpoint. +// +// Use to update a batch of endpoints. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateEndpointsBatch for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch +func (c *Pinpoint) UpdateEndpointsBatch(input *UpdateEndpointsBatchInput) (*UpdateEndpointsBatchOutput, error) { + req, out := c.UpdateEndpointsBatchRequest(input) + return out, req.Send() +} + +// UpdateEndpointsBatchWithContext is the same as UpdateEndpointsBatch with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEndpointsBatch for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateEndpointsBatchWithContext(ctx aws.Context, input *UpdateEndpointsBatchInput, opts ...request.Option) (*UpdateEndpointsBatchOutput, error) { + req, out := c.UpdateEndpointsBatchRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGcmChannel = "UpdateGcmChannel" + +// UpdateGcmChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGcmChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGcmChannel for more information on using the UpdateGcmChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGcmChannelRequest method. +// req, resp := client.UpdateGcmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel +func (c *Pinpoint) UpdateGcmChannelRequest(input *UpdateGcmChannelInput) (req *request.Request, output *UpdateGcmChannelOutput) { + op := &request.Operation{ + Name: opUpdateGcmChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/gcm", + } + + if input == nil { + input = &UpdateGcmChannelInput{} + } + + output = &UpdateGcmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGcmChannel API operation for Amazon Pinpoint. +// +// Use to update the GCM channel for an app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateGcmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel +func (c *Pinpoint) UpdateGcmChannel(input *UpdateGcmChannelInput) (*UpdateGcmChannelOutput, error) { + req, out := c.UpdateGcmChannelRequest(input) + return out, req.Send() +} + +// UpdateGcmChannelWithContext is the same as UpdateGcmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGcmChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateGcmChannelWithContext(ctx aws.Context, input *UpdateGcmChannelInput, opts ...request.Option) (*UpdateGcmChannelOutput, error) { + req, out := c.UpdateGcmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSegment = "UpdateSegment" + +// UpdateSegmentRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSegment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSegment for more information on using the UpdateSegment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSegmentRequest method. +// req, resp := client.UpdateSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment +func (c *Pinpoint) UpdateSegmentRequest(input *UpdateSegmentInput) (req *request.Request, output *UpdateSegmentOutput) { + op := &request.Operation{ + Name: opUpdateSegment, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", + } + + if input == nil { + input = &UpdateSegmentInput{} + } + + output = &UpdateSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSegment API operation for Amazon Pinpoint. +// +// Use to update a segment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment +func (c *Pinpoint) UpdateSegment(input *UpdateSegmentInput) (*UpdateSegmentOutput, error) { + req, out := c.UpdateSegmentRequest(input) + return out, req.Send() +} + +// UpdateSegmentWithContext is the same as UpdateSegment with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSegment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateSegmentWithContext(ctx aws.Context, input *UpdateSegmentInput, opts ...request.Option) (*UpdateSegmentOutput, error) { + req, out := c.UpdateSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSmsChannel = "UpdateSmsChannel" + +// UpdateSmsChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSmsChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSmsChannel for more information on using the UpdateSmsChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSmsChannelRequest method. +// req, resp := client.UpdateSmsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel +func (c *Pinpoint) UpdateSmsChannelRequest(input *UpdateSmsChannelInput) (req *request.Request, output *UpdateSmsChannelOutput) { + op := &request.Operation{ + Name: opUpdateSmsChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/sms", + } + + if input == nil { + input = &UpdateSmsChannelInput{} + } + + output = &UpdateSmsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSmsChannel API operation for Amazon Pinpoint. +// +// Update an SMS channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateSmsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel +func (c *Pinpoint) UpdateSmsChannel(input *UpdateSmsChannelInput) (*UpdateSmsChannelOutput, error) { + req, out := c.UpdateSmsChannelRequest(input) + return out, req.Send() +} + +// UpdateSmsChannelWithContext is the same as UpdateSmsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSmsChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateSmsChannelWithContext(ctx aws.Context, input *UpdateSmsChannelInput, opts ...request.Option) (*UpdateSmsChannelOutput, error) { + req, out := c.UpdateSmsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Amazon Device Messaging channel definition. +type ADMChannelRequest struct { + _ struct{} `type:"structure"` + + // Client ID as gotten from Amazon + ClientId *string `type:"string"` + + // Client secret as gotten from Amazon + ClientSecret *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s ADMChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ADMChannelRequest) GoString() string { + return s.String() +} + +// SetClientId sets the ClientId field's value. +func (s *ADMChannelRequest) SetClientId(v string) *ADMChannelRequest { + s.ClientId = &v + return s +} + +// SetClientSecret sets the ClientSecret field's value. +func (s *ADMChannelRequest) SetClientSecret(v string) *ADMChannelRequest { + s.ClientSecret = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ADMChannelRequest) SetEnabled(v bool) *ADMChannelRequest { + s.Enabled = &v + return s +} + +// Amazon Device Messaging channel definition. +type ADMChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the channel applies. + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Indicates whether the channel is configured with ADM credentials. Amazon + // Pinpoint uses your credentials to authenticate push notifications with ADM. + // Provide your credentials by setting the ClientId and ClientSecret attributes. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Platform type. Will be "ADM" + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s ADMChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ADMChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ADMChannelResponse) SetApplicationId(v string) *ADMChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ADMChannelResponse) SetCreationDate(v string) *ADMChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ADMChannelResponse) SetEnabled(v bool) *ADMChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *ADMChannelResponse) SetHasCredential(v bool) *ADMChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *ADMChannelResponse) SetId(v string) *ADMChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *ADMChannelResponse) SetIsArchived(v bool) *ADMChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *ADMChannelResponse) SetLastModifiedBy(v string) *ADMChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *ADMChannelResponse) SetLastModifiedDate(v string) *ADMChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *ADMChannelResponse) SetPlatform(v string) *ADMChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *ADMChannelResponse) SetVersion(v int64) *ADMChannelResponse { + s.Version = &v + return s +} + +// ADM Message. +type ADMMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // Optional. Arbitrary string used to indicate multiple messages are logically + // the same and that ADM is allowed to drop previously enqueued messages in + // favor of this one. + ConsolidationKey *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // Optional. Number of seconds ADM should retain the message if the device is + // offline + ExpiresAfter *string `type:"string"` + + // The icon image name of the asset saved in your application. + IconReference *string `type:"string"` + + // The URL that points to an image used as the large icon to the notification + // content view. + ImageIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify + // data integrity + MD5 *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // The URL that points to an image used as the small icon for the notification + // which will be used to represent the notification in the status bar and content + // view + SmallImageIconUrl *string `type:"string"` + + // Indicates a sound to play when the device receives the notification. Supports + // default, or the filename of a sound resource bundled in the app. Android + // sound files must reside in /res/raw/ + Sound *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s ADMMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ADMMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *ADMMessage) SetAction(v string) *ADMMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *ADMMessage) SetBody(v string) *ADMMessage { + s.Body = &v + return s +} + +// SetConsolidationKey sets the ConsolidationKey field's value. +func (s *ADMMessage) SetConsolidationKey(v string) *ADMMessage { + s.ConsolidationKey = &v + return s +} + +// SetData sets the Data field's value. +func (s *ADMMessage) SetData(v map[string]*string) *ADMMessage { + s.Data = v + return s +} + +// SetExpiresAfter sets the ExpiresAfter field's value. +func (s *ADMMessage) SetExpiresAfter(v string) *ADMMessage { + s.ExpiresAfter = &v + return s +} + +// SetIconReference sets the IconReference field's value. +func (s *ADMMessage) SetIconReference(v string) *ADMMessage { + s.IconReference = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *ADMMessage) SetImageIconUrl(v string) *ADMMessage { + s.ImageIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *ADMMessage) SetImageUrl(v string) *ADMMessage { + s.ImageUrl = &v + return s +} + +// SetMD5 sets the MD5 field's value. +func (s *ADMMessage) SetMD5(v string) *ADMMessage { + s.MD5 = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *ADMMessage) SetRawContent(v string) *ADMMessage { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *ADMMessage) SetSilentPush(v bool) *ADMMessage { + s.SilentPush = &v + return s +} + +// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. +func (s *ADMMessage) SetSmallImageIconUrl(v string) *ADMMessage { + s.SmallImageIconUrl = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *ADMMessage) SetSound(v string) *ADMMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *ADMMessage) SetSubstitutions(v map[string][]*string) *ADMMessage { + s.Substitutions = v + return s +} + +// SetTitle sets the Title field's value. +func (s *ADMMessage) SetTitle(v string) *ADMMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *ADMMessage) SetUrl(v string) *ADMMessage { + s.Url = &v + return s +} + +// Apple Push Notification Service channel definition. +type APNSChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSChannelRequest) SetBundleId(v string) *APNSChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSChannelRequest) SetCertificate(v string) *APNSChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSChannelRequest) SetEnabled(v bool) *APNSChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSChannelRequest) SetPrivateKey(v string) *APNSChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSChannelRequest) SetTeamId(v string) *APNSChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSChannelRequest) SetTokenKey(v string) *APNSChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSChannelRequest) SetTokenKeyId(v string) *APNSChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple Distribution Push Notification Service channel definition. +type APNSChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the channel applies. + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Indicates whether the channel is configured with APNs credentials. Amazon + // Pinpoint uses your credentials to authenticate push notifications with APNs. + // To use APNs token authentication, set the BundleId, TeamId, TokenKey, and + // TokenKeyId attributes. To use certificate authentication, set the Certificate + // and PrivateKey attributes. + HasCredential *bool `type:"boolean"` + + // Indicates whether the channel is configured with a key for APNs token authentication. + // Provide a token key by setting the TokenKey attribute. + HasTokenKey *bool `type:"boolean"` + + // Channel ID. Not used. Present only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be APNS. + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSChannelResponse) SetApplicationId(v string) *APNSChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSChannelResponse) SetCreationDate(v string) *APNSChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSChannelResponse) SetEnabled(v bool) *APNSChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSChannelResponse) SetHasCredential(v bool) *APNSChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSChannelResponse) SetHasTokenKey(v bool) *APNSChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSChannelResponse) SetId(v string) *APNSChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSChannelResponse) SetIsArchived(v bool) *APNSChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSChannelResponse) SetLastModifiedBy(v string) *APNSChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSChannelResponse) SetLastModifiedDate(v string) *APNSChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSChannelResponse) SetPlatform(v string) *APNSChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSChannelResponse) SetVersion(v int64) *APNSChannelResponse { + s.Version = &v + return s +} + +// APNS Message. +type APNSMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // Include this key when you want the system to modify the badge of your app + // icon. If this key is not included in the dictionary, the badge is not changed. + // To remove the badge, set the value of this key to 0. + Badge *int64 `type:"integer"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // Provide this key with a string value that represents the notification's type. + // This value corresponds to the value in the identifier property of one of + // your app's registered categories. + Category *string `type:"string"` + + // An ID that, if assigned to multiple messages, causes APNs to coalesce the + // messages into a single push notification instead of delivering each message + // individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this + // value to set the apns-collapse-id request header when it sends the message + // to APNs. + CollapseId *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // The URL that points to a video used in the push notification. + MediaUrl *string `type:"string"` + + // The preferred authentication method, either "CERTIFICATE" or "TOKEN" + PreferredAuthenticationMethod *string `type:"string"` + + // The message priority. Amazon Pinpoint uses this value to set the apns-priority + // request header when it sends the message to APNs. Accepts the following values:"5" + // - Low priority. Messages might be delayed, delivered in groups, and throttled."10" + // - High priority. Messages are sent immediately. High priority messages must + // cause an alert, sound, or badge on the receiving device.The default value + // is "10".The equivalent values for FCM or GCM messages are "normal" and "high". + // Amazon Pinpoint accepts these values for APNs messages and converts them.For + // more information about the apns-priority parameter, see Communicating with + // APNs in the APNs Local and Remote Notification Programming Guide. + Priority *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // Include this key when you want the system to play a sound. The value of this + // key is the name of a sound file in your app's main bundle or in the Library/Sounds + // folder of your app's data container. If the sound file cannot be found, or + // if you specify defaultfor the value, the system plays the default alert sound. + Sound *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` + + // Provide this key with a string value that represents the app-specific identifier + // for grouping notifications. If you provide a Notification Content app extension, + // you can use this value to group your notifications together. + ThreadId *string `type:"string"` + + // The length of time (in seconds) that APNs stores and attempts to deliver + // the message. If the value is 0, APNs does not store the message or attempt + // to deliver it more than once. Amazon Pinpoint uses this value to set the + // apns-expiration request header when it sends the message to APNs. + TimeToLive *int64 `type:"integer"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s APNSMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *APNSMessage) SetAction(v string) *APNSMessage { + s.Action = &v + return s +} + +// SetBadge sets the Badge field's value. +func (s *APNSMessage) SetBadge(v int64) *APNSMessage { + s.Badge = &v + return s +} + +// SetBody sets the Body field's value. +func (s *APNSMessage) SetBody(v string) *APNSMessage { + s.Body = &v + return s +} + +// SetCategory sets the Category field's value. +func (s *APNSMessage) SetCategory(v string) *APNSMessage { + s.Category = &v + return s +} + +// SetCollapseId sets the CollapseId field's value. +func (s *APNSMessage) SetCollapseId(v string) *APNSMessage { + s.CollapseId = &v + return s +} + +// SetData sets the Data field's value. +func (s *APNSMessage) SetData(v map[string]*string) *APNSMessage { + s.Data = v + return s +} + +// SetMediaUrl sets the MediaUrl field's value. +func (s *APNSMessage) SetMediaUrl(v string) *APNSMessage { + s.MediaUrl = &v + return s +} + +// SetPreferredAuthenticationMethod sets the PreferredAuthenticationMethod field's value. +func (s *APNSMessage) SetPreferredAuthenticationMethod(v string) *APNSMessage { + s.PreferredAuthenticationMethod = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *APNSMessage) SetPriority(v string) *APNSMessage { + s.Priority = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *APNSMessage) SetRawContent(v string) *APNSMessage { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *APNSMessage) SetSilentPush(v bool) *APNSMessage { + s.SilentPush = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *APNSMessage) SetSound(v string) *APNSMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *APNSMessage) SetSubstitutions(v map[string][]*string) *APNSMessage { + s.Substitutions = v + return s +} + +// SetThreadId sets the ThreadId field's value. +func (s *APNSMessage) SetThreadId(v string) *APNSMessage { + s.ThreadId = &v + return s +} + +// SetTimeToLive sets the TimeToLive field's value. +func (s *APNSMessage) SetTimeToLive(v int64) *APNSMessage { + s.TimeToLive = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *APNSMessage) SetTitle(v string) *APNSMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *APNSMessage) SetUrl(v string) *APNSMessage { + s.Url = &v + return s +} + +// Apple Development Push Notification Service channel definition. +type APNSSandboxChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSSandboxChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSSandboxChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSSandboxChannelRequest) SetBundleId(v string) *APNSSandboxChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSSandboxChannelRequest) SetCertificate(v string) *APNSSandboxChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSSandboxChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSSandboxChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSSandboxChannelRequest) SetEnabled(v bool) *APNSSandboxChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSSandboxChannelRequest) SetPrivateKey(v string) *APNSSandboxChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSSandboxChannelRequest) SetTeamId(v string) *APNSSandboxChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSSandboxChannelRequest) SetTokenKey(v string) *APNSSandboxChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSSandboxChannelRequest) SetTokenKeyId(v string) *APNSSandboxChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple Development Push Notification Service channel definition. +type APNSSandboxChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the channel applies. + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Indicates whether the channel is configured with APNs credentials. Amazon + // Pinpoint uses your credentials to authenticate push notifications with APNs. + // To use APNs token authentication, set the BundleId, TeamId, TokenKey, and + // TokenKeyId attributes. To use certificate authentication, set the Certificate + // and PrivateKey attributes. + HasCredential *bool `type:"boolean"` + + // Indicates whether the channel is configured with a key for APNs token authentication. + // Provide a token key by setting the TokenKey attribute. + HasTokenKey *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be APNS_SANDBOX. + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSSandboxChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSSandboxChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSSandboxChannelResponse) SetApplicationId(v string) *APNSSandboxChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSSandboxChannelResponse) SetCreationDate(v string) *APNSSandboxChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSSandboxChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSSandboxChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSSandboxChannelResponse) SetEnabled(v bool) *APNSSandboxChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSSandboxChannelResponse) SetHasCredential(v bool) *APNSSandboxChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSSandboxChannelResponse) SetHasTokenKey(v bool) *APNSSandboxChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSSandboxChannelResponse) SetId(v string) *APNSSandboxChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSSandboxChannelResponse) SetIsArchived(v bool) *APNSSandboxChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSSandboxChannelResponse) SetLastModifiedBy(v string) *APNSSandboxChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSSandboxChannelResponse) SetLastModifiedDate(v string) *APNSSandboxChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSSandboxChannelResponse) SetPlatform(v string) *APNSSandboxChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSSandboxChannelResponse) SetVersion(v int64) *APNSSandboxChannelResponse { + s.Version = &v + return s +} + +// Apple VoIP Push Notification Service channel definition. +type APNSVoipChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSVoipChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSVoipChannelRequest) SetBundleId(v string) *APNSVoipChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSVoipChannelRequest) SetCertificate(v string) *APNSVoipChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSVoipChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipChannelRequest) SetEnabled(v bool) *APNSVoipChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSVoipChannelRequest) SetPrivateKey(v string) *APNSVoipChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSVoipChannelRequest) SetTeamId(v string) *APNSVoipChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSVoipChannelRequest) SetTokenKey(v string) *APNSVoipChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSVoipChannelRequest) SetTokenKeyId(v string) *APNSVoipChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple VoIP Push Notification Service channel definition. +type APNSVoipChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // If the channel is registered with a credential for authentication. + HasCredential *bool `type:"boolean"` + + // If the channel is registered with a token key for authentication. + HasTokenKey *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be APNS. + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSVoipChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSVoipChannelResponse) SetApplicationId(v string) *APNSVoipChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSVoipChannelResponse) SetCreationDate(v string) *APNSVoipChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSVoipChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipChannelResponse) SetEnabled(v bool) *APNSVoipChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSVoipChannelResponse) SetHasCredential(v bool) *APNSVoipChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSVoipChannelResponse) SetHasTokenKey(v bool) *APNSVoipChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSVoipChannelResponse) SetId(v string) *APNSVoipChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSVoipChannelResponse) SetIsArchived(v bool) *APNSVoipChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSVoipChannelResponse) SetLastModifiedBy(v string) *APNSVoipChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSVoipChannelResponse) SetLastModifiedDate(v string) *APNSVoipChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSVoipChannelResponse) SetPlatform(v string) *APNSVoipChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSVoipChannelResponse) SetVersion(v int64) *APNSVoipChannelResponse { + s.Version = &v + return s +} + +// Apple VoIP Developer Push Notification Service channel definition. +type APNSVoipSandboxChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSVoipSandboxChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipSandboxChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSVoipSandboxChannelRequest) SetBundleId(v string) *APNSVoipSandboxChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSVoipSandboxChannelRequest) SetCertificate(v string) *APNSVoipSandboxChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipSandboxChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSVoipSandboxChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipSandboxChannelRequest) SetEnabled(v bool) *APNSVoipSandboxChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSVoipSandboxChannelRequest) SetPrivateKey(v string) *APNSVoipSandboxChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSVoipSandboxChannelRequest) SetTeamId(v string) *APNSVoipSandboxChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSVoipSandboxChannelRequest) SetTokenKey(v string) *APNSVoipSandboxChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSVoipSandboxChannelRequest) SetTokenKeyId(v string) *APNSVoipSandboxChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple VoIP Developer Push Notification Service channel definition. +type APNSVoipSandboxChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // If the channel is registered with a credential for authentication. + HasCredential *bool `type:"boolean"` + + // If the channel is registered with a token key for authentication. + HasTokenKey *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be APNS. + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSVoipSandboxChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipSandboxChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSVoipSandboxChannelResponse) SetApplicationId(v string) *APNSVoipSandboxChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSVoipSandboxChannelResponse) SetCreationDate(v string) *APNSVoipSandboxChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipSandboxChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSVoipSandboxChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipSandboxChannelResponse) SetEnabled(v bool) *APNSVoipSandboxChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSVoipSandboxChannelResponse) SetHasCredential(v bool) *APNSVoipSandboxChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSVoipSandboxChannelResponse) SetHasTokenKey(v bool) *APNSVoipSandboxChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSVoipSandboxChannelResponse) SetId(v string) *APNSVoipSandboxChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSVoipSandboxChannelResponse) SetIsArchived(v bool) *APNSVoipSandboxChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSVoipSandboxChannelResponse) SetLastModifiedBy(v string) *APNSVoipSandboxChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSVoipSandboxChannelResponse) SetLastModifiedDate(v string) *APNSVoipSandboxChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSVoipSandboxChannelResponse) SetPlatform(v string) *APNSVoipSandboxChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSVoipSandboxChannelResponse) SetVersion(v int64) *APNSVoipSandboxChannelResponse { + s.Version = &v + return s +} + +// Activities for campaign. +type ActivitiesResponse struct { + _ struct{} `type:"structure"` + + // List of campaign activities + Item []*ActivityResponse `type:"list"` +} + +// String returns the string representation +func (s ActivitiesResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivitiesResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ActivitiesResponse) SetItem(v []*ActivityResponse) *ActivitiesResponse { + s.Item = v + return s +} + +// Activity definition +type ActivityResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the campaign applies. + ApplicationId *string `type:"string"` + + // The ID of the campaign to which the activity applies. + CampaignId *string `type:"string"` + + // The actual time the activity was marked CANCELLED or COMPLETED. Provided + // in ISO 8601 format. + End *string `type:"string"` + + // The unique activity ID. + Id *string `type:"string"` + + // Indicates whether the activity succeeded.Valid values: SUCCESS, FAIL + Result *string `type:"string"` + + // The scheduled start time for the activity in ISO 8601 format. + ScheduledStart *string `type:"string"` + + // The actual start time of the activity in ISO 8601 format. + Start *string `type:"string"` + + // The state of the activity.Valid values: PENDING, INITIALIZING, RUNNING, PAUSED, + // CANCELLED, COMPLETED + State *string `type:"string"` + + // The total number of endpoints to which the campaign successfully delivered + // messages. + SuccessfulEndpointCount *int64 `type:"integer"` + + // The total number of timezones completed. + TimezonesCompletedCount *int64 `type:"integer"` + + // The total number of unique timezones present in the segment. + TimezonesTotalCount *int64 `type:"integer"` + + // The total number of endpoints to which the campaign attempts to deliver messages. + TotalEndpointCount *int64 `type:"integer"` + + // The ID of a variation of the campaign used for A/B testing. + TreatmentId *string `type:"string"` +} + +// String returns the string representation +func (s ActivityResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ActivityResponse) SetApplicationId(v string) *ActivityResponse { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *ActivityResponse) SetCampaignId(v string) *ActivityResponse { + s.CampaignId = &v + return s +} + +// SetEnd sets the End field's value. +func (s *ActivityResponse) SetEnd(v string) *ActivityResponse { + s.End = &v + return s +} + +// SetId sets the Id field's value. +func (s *ActivityResponse) SetId(v string) *ActivityResponse { + s.Id = &v + return s +} + +// SetResult sets the Result field's value. +func (s *ActivityResponse) SetResult(v string) *ActivityResponse { + s.Result = &v + return s +} + +// SetScheduledStart sets the ScheduledStart field's value. +func (s *ActivityResponse) SetScheduledStart(v string) *ActivityResponse { + s.ScheduledStart = &v + return s +} + +// SetStart sets the Start field's value. +func (s *ActivityResponse) SetStart(v string) *ActivityResponse { + s.Start = &v + return s +} + +// SetState sets the State field's value. +func (s *ActivityResponse) SetState(v string) *ActivityResponse { + s.State = &v + return s +} + +// SetSuccessfulEndpointCount sets the SuccessfulEndpointCount field's value. +func (s *ActivityResponse) SetSuccessfulEndpointCount(v int64) *ActivityResponse { + s.SuccessfulEndpointCount = &v + return s +} + +// SetTimezonesCompletedCount sets the TimezonesCompletedCount field's value. +func (s *ActivityResponse) SetTimezonesCompletedCount(v int64) *ActivityResponse { + s.TimezonesCompletedCount = &v + return s +} + +// SetTimezonesTotalCount sets the TimezonesTotalCount field's value. +func (s *ActivityResponse) SetTimezonesTotalCount(v int64) *ActivityResponse { + s.TimezonesTotalCount = &v + return s +} + +// SetTotalEndpointCount sets the TotalEndpointCount field's value. +func (s *ActivityResponse) SetTotalEndpointCount(v int64) *ActivityResponse { + s.TotalEndpointCount = &v + return s +} + +// SetTreatmentId sets the TreatmentId field's value. +func (s *ActivityResponse) SetTreatmentId(v string) *ActivityResponse { + s.TreatmentId = &v + return s +} + +// Address configuration. +type AddressConfiguration struct { + _ struct{} `type:"structure"` + + // Body override. If specified will override default body. + BodyOverride *string `type:"string"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // A map of custom attributes to attributes to be attached to the message for + // this address. This payload is added to the push notification's 'data.pinpoint' + // object or added to the email/sms delivery receipt event attributes. + Context map[string]*string `type:"map"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` + + // Title override. If specified will override default title if applicable. + TitleOverride *string `type:"string"` +} + +// String returns the string representation +func (s AddressConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddressConfiguration) GoString() string { + return s.String() +} + +// SetBodyOverride sets the BodyOverride field's value. +func (s *AddressConfiguration) SetBodyOverride(v string) *AddressConfiguration { + s.BodyOverride = &v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *AddressConfiguration) SetChannelType(v string) *AddressConfiguration { + s.ChannelType = &v + return s +} + +// SetContext sets the Context field's value. +func (s *AddressConfiguration) SetContext(v map[string]*string) *AddressConfiguration { + s.Context = v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *AddressConfiguration) SetRawContent(v string) *AddressConfiguration { + s.RawContent = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *AddressConfiguration) SetSubstitutions(v map[string][]*string) *AddressConfiguration { + s.Substitutions = v + return s +} + +// SetTitleOverride sets the TitleOverride field's value. +func (s *AddressConfiguration) SetTitleOverride(v string) *AddressConfiguration { + s.TitleOverride = &v + return s +} + +// Application Response. +type ApplicationResponse struct { + _ struct{} `type:"structure"` + + // The unique application ID. + Id *string `type:"string"` + + // The display name of the application. + Name *string `type:"string"` +} + +// String returns the string representation +func (s ApplicationResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationResponse) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *ApplicationResponse) SetId(v string) *ApplicationResponse { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ApplicationResponse) SetName(v string) *ApplicationResponse { + s.Name = &v + return s +} + +// Application settings. +type ApplicationSettingsResource struct { + _ struct{} `type:"structure"` + + // The unique ID for the application. + ApplicationId *string `type:"string"` + + // Default campaign hook. + CampaignHook *CampaignHook `type:"structure"` + + // The date that the settings were last updated in ISO 8601 format. + LastModifiedDate *string `type:"string"` + + // The default campaign limits for the app. These limits apply to each campaign + // for the app, unless the campaign overrides the default with limits of its + // own. + Limits *CampaignLimits `type:"structure"` + + // The default quiet time for the app. Each campaign for this app sends no messages + // during this time unless the campaign overrides the default with a quiet time + // of its own. + QuietTime *QuietTime `type:"structure"` +} + +// String returns the string representation +func (s ApplicationSettingsResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationSettingsResource) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ApplicationSettingsResource) SetApplicationId(v string) *ApplicationSettingsResource { + s.ApplicationId = &v + return s +} + +// SetCampaignHook sets the CampaignHook field's value. +func (s *ApplicationSettingsResource) SetCampaignHook(v *CampaignHook) *ApplicationSettingsResource { + s.CampaignHook = v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *ApplicationSettingsResource) SetLastModifiedDate(v string) *ApplicationSettingsResource { + s.LastModifiedDate = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *ApplicationSettingsResource) SetLimits(v *CampaignLimits) *ApplicationSettingsResource { + s.Limits = v + return s +} + +// SetQuietTime sets the QuietTime field's value. +func (s *ApplicationSettingsResource) SetQuietTime(v *QuietTime) *ApplicationSettingsResource { + s.QuietTime = v + return s +} + +// Get Applications Result. +type ApplicationsResponse struct { + _ struct{} `type:"structure"` + + // List of applications returned in this page. + Item []*ApplicationResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ApplicationsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ApplicationsResponse) SetItem(v []*ApplicationResponse) *ApplicationsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ApplicationsResponse) SetNextToken(v string) *ApplicationsResponse { + s.NextToken = &v + return s +} + +// Custom attibute dimension +type AttributeDimension struct { + _ struct{} `type:"structure"` + + // The type of dimension:INCLUSIVE - Endpoints that match the criteria are included + // in the segment.EXCLUSIVE - Endpoints that match the criteria are excluded + // from the segment. + AttributeType *string `type:"string" enum:"AttributeType"` + + Values []*string `type:"list"` +} + +// String returns the string representation +func (s AttributeDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributeDimension) GoString() string { + return s.String() +} + +// SetAttributeType sets the AttributeType field's value. +func (s *AttributeDimension) SetAttributeType(v string) *AttributeDimension { + s.AttributeType = &v + return s +} + +// SetValues sets the Values field's value. +func (s *AttributeDimension) SetValues(v []*string) *AttributeDimension { + s.Values = v + return s +} + +// Baidu Cloud Push credentials +type BaiduChannelRequest struct { + _ struct{} `type:"structure"` + + // Platform credential API key from Baidu. + ApiKey *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Platform credential Secret key from Baidu. + SecretKey *string `type:"string"` +} + +// String returns the string representation +func (s BaiduChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaiduChannelRequest) GoString() string { + return s.String() +} + +// SetApiKey sets the ApiKey field's value. +func (s *BaiduChannelRequest) SetApiKey(v string) *BaiduChannelRequest { + s.ApiKey = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *BaiduChannelRequest) SetEnabled(v bool) *BaiduChannelRequest { + s.Enabled = &v + return s +} + +// SetSecretKey sets the SecretKey field's value. +func (s *BaiduChannelRequest) SetSecretKey(v string) *BaiduChannelRequest { + s.SecretKey = &v + return s +} + +// Baidu Cloud Messaging channel definition +type BaiduChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The Baidu API key from Baidu. + Credential *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Indicates whether the channel is configured with Baidu Cloud Push credentials. + // Amazon Pinpoint uses your credentials to authenticate push notifications + // with Baidu Cloud Push. Provide your credentials by setting the ApiKey and + // SecretKey attributes. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be BAIDU + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s BaiduChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaiduChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *BaiduChannelResponse) SetApplicationId(v string) *BaiduChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *BaiduChannelResponse) SetCreationDate(v string) *BaiduChannelResponse { + s.CreationDate = &v + return s +} + +// SetCredential sets the Credential field's value. +func (s *BaiduChannelResponse) SetCredential(v string) *BaiduChannelResponse { + s.Credential = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *BaiduChannelResponse) SetEnabled(v bool) *BaiduChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *BaiduChannelResponse) SetHasCredential(v bool) *BaiduChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *BaiduChannelResponse) SetId(v string) *BaiduChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *BaiduChannelResponse) SetIsArchived(v bool) *BaiduChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *BaiduChannelResponse) SetLastModifiedBy(v string) *BaiduChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *BaiduChannelResponse) SetLastModifiedDate(v string) *BaiduChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *BaiduChannelResponse) SetPlatform(v string) *BaiduChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *BaiduChannelResponse) SetVersion(v int64) *BaiduChannelResponse { + s.Version = &v + return s +} + +// Baidu Message. +type BaiduMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // The icon image name of the asset saved in your application. + IconReference *string `type:"string"` + + // The URL that points to an image used as the large icon to the notification + // content view. + ImageIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // The URL that points to an image used as the small icon for the notification + // which will be used to represent the notification in the status bar and content + // view + SmallImageIconUrl *string `type:"string"` + + // Indicates a sound to play when the device receives the notification. Supports + // default, or the filename of a sound resource bundled in the app. Android + // sound files must reside in /res/raw/ + Sound *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s BaiduMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaiduMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *BaiduMessage) SetAction(v string) *BaiduMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *BaiduMessage) SetBody(v string) *BaiduMessage { + s.Body = &v + return s +} + +// SetData sets the Data field's value. +func (s *BaiduMessage) SetData(v map[string]*string) *BaiduMessage { + s.Data = v + return s +} + +// SetIconReference sets the IconReference field's value. +func (s *BaiduMessage) SetIconReference(v string) *BaiduMessage { + s.IconReference = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *BaiduMessage) SetImageIconUrl(v string) *BaiduMessage { + s.ImageIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *BaiduMessage) SetImageUrl(v string) *BaiduMessage { + s.ImageUrl = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *BaiduMessage) SetRawContent(v string) *BaiduMessage { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *BaiduMessage) SetSilentPush(v bool) *BaiduMessage { + s.SilentPush = &v + return s +} + +// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. +func (s *BaiduMessage) SetSmallImageIconUrl(v string) *BaiduMessage { + s.SmallImageIconUrl = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *BaiduMessage) SetSound(v string) *BaiduMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *BaiduMessage) SetSubstitutions(v map[string][]*string) *BaiduMessage { + s.Substitutions = v + return s +} + +// SetTitle sets the Title field's value. +func (s *BaiduMessage) SetTitle(v string) *BaiduMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *BaiduMessage) SetUrl(v string) *BaiduMessage { + s.Url = &v + return s +} + +// The email message configuration. +type CampaignEmailMessage struct { + _ struct{} `type:"structure"` + + // The email text body. + Body *string `type:"string"` + + // The email address used to send the email from. Defaults to use FromAddress + // specified in the Email Channel. + FromAddress *string `type:"string"` + + // The email html body. + HtmlBody *string `type:"string"` + + // The email title (Or subject). + Title *string `type:"string"` +} + +// String returns the string representation +func (s CampaignEmailMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignEmailMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *CampaignEmailMessage) SetBody(v string) *CampaignEmailMessage { + s.Body = &v + return s +} + +// SetFromAddress sets the FromAddress field's value. +func (s *CampaignEmailMessage) SetFromAddress(v string) *CampaignEmailMessage { + s.FromAddress = &v + return s +} + +// SetHtmlBody sets the HtmlBody field's value. +func (s *CampaignEmailMessage) SetHtmlBody(v string) *CampaignEmailMessage { + s.HtmlBody = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *CampaignEmailMessage) SetTitle(v string) *CampaignEmailMessage { + s.Title = &v + return s +} + +type CampaignHook struct { + _ struct{} `type:"structure"` + + // Lambda function name or arn to be called for delivery + LambdaFunctionName *string `type:"string"` + + // What mode Lambda should be invoked in. + Mode *string `type:"string" enum:"Mode"` + + // Web URL to call for hook. If the URL has authentication specified it will + // be added as authentication to the request + WebUrl *string `type:"string"` +} + +// String returns the string representation +func (s CampaignHook) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignHook) GoString() string { + return s.String() +} + +// SetLambdaFunctionName sets the LambdaFunctionName field's value. +func (s *CampaignHook) SetLambdaFunctionName(v string) *CampaignHook { + s.LambdaFunctionName = &v + return s +} + +// SetMode sets the Mode field's value. +func (s *CampaignHook) SetMode(v string) *CampaignHook { + s.Mode = &v + return s +} + +// SetWebUrl sets the WebUrl field's value. +func (s *CampaignHook) SetWebUrl(v string) *CampaignHook { + s.WebUrl = &v + return s +} + +// Campaign Limits are used to limit the number of messages that can be sent +// to a user. +type CampaignLimits struct { + _ struct{} `type:"structure"` + + // The maximum number of messages that the campaign can send daily. + Daily *int64 `type:"integer"` + + // The length of time (in seconds) that the campaign can run before it ends + // and message deliveries stop. This duration begins at the scheduled start + // time for the campaign. The minimum value is 60. + MaximumDuration *int64 `type:"integer"` + + // The number of messages that the campaign can send per second. The minimum + // value is 50, and the maximum is 20000. + MessagesPerSecond *int64 `type:"integer"` + + // The maximum total number of messages that the campaign can send. + Total *int64 `type:"integer"` +} + +// String returns the string representation +func (s CampaignLimits) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignLimits) GoString() string { + return s.String() +} + +// SetDaily sets the Daily field's value. +func (s *CampaignLimits) SetDaily(v int64) *CampaignLimits { + s.Daily = &v + return s +} + +// SetMaximumDuration sets the MaximumDuration field's value. +func (s *CampaignLimits) SetMaximumDuration(v int64) *CampaignLimits { + s.MaximumDuration = &v + return s +} + +// SetMessagesPerSecond sets the MessagesPerSecond field's value. +func (s *CampaignLimits) SetMessagesPerSecond(v int64) *CampaignLimits { + s.MessagesPerSecond = &v + return s +} + +// SetTotal sets the Total field's value. +func (s *CampaignLimits) SetTotal(v int64) *CampaignLimits { + s.Total = &v + return s +} + +// Campaign definition +type CampaignResponse struct { + _ struct{} `type:"structure"` + + // Treatments that are defined in addition to the default treatment. + AdditionalTreatments []*TreatmentResource `type:"list"` + + // The ID of the application to which the campaign applies. + ApplicationId *string `type:"string"` + + // The date the campaign was created in ISO 8601 format. + CreationDate *string `type:"string"` + + // The status of the campaign's default treatment. Only present for A/B test + // campaigns. + DefaultState *CampaignState `type:"structure"` + + // A description of the campaign. + Description *string `type:"string"` + + // The allocated percentage of end users who will not receive messages from + // this campaign. + HoldoutPercent *int64 `type:"integer"` + + // Campaign hook information. + Hook *CampaignHook `type:"structure"` + + // The unique campaign ID. + Id *string `type:"string"` + + // Indicates whether the campaign is paused. A paused campaign does not send + // messages unless you resume it by setting IsPaused to false. + IsPaused *bool `type:"boolean"` + + // The date the campaign was last updated in ISO 8601 format. + LastModifiedDate *string `type:"string"` + + // The campaign limits settings. + Limits *CampaignLimits `type:"structure"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The custom name of the campaign. + Name *string `type:"string"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The ID of the segment to which the campaign sends messages. + SegmentId *string `type:"string"` + + // The version of the segment to which the campaign sends messages. + SegmentVersion *int64 `type:"integer"` + + // The campaign status.An A/B test campaign will have a status of COMPLETED + // only when all treatments have a status of COMPLETED. + State *CampaignState `type:"structure"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` + + // The campaign version number. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s CampaignResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignResponse) GoString() string { + return s.String() +} + +// SetAdditionalTreatments sets the AdditionalTreatments field's value. +func (s *CampaignResponse) SetAdditionalTreatments(v []*TreatmentResource) *CampaignResponse { + s.AdditionalTreatments = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CampaignResponse) SetApplicationId(v string) *CampaignResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *CampaignResponse) SetCreationDate(v string) *CampaignResponse { + s.CreationDate = &v + return s +} + +// SetDefaultState sets the DefaultState field's value. +func (s *CampaignResponse) SetDefaultState(v *CampaignState) *CampaignResponse { + s.DefaultState = v + return s +} + +// SetDescription sets the Description field's value. +func (s *CampaignResponse) SetDescription(v string) *CampaignResponse { + s.Description = &v + return s +} + +// SetHoldoutPercent sets the HoldoutPercent field's value. +func (s *CampaignResponse) SetHoldoutPercent(v int64) *CampaignResponse { + s.HoldoutPercent = &v + return s +} + +// SetHook sets the Hook field's value. +func (s *CampaignResponse) SetHook(v *CampaignHook) *CampaignResponse { + s.Hook = v + return s +} + +// SetId sets the Id field's value. +func (s *CampaignResponse) SetId(v string) *CampaignResponse { + s.Id = &v + return s +} + +// SetIsPaused sets the IsPaused field's value. +func (s *CampaignResponse) SetIsPaused(v bool) *CampaignResponse { + s.IsPaused = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *CampaignResponse) SetLastModifiedDate(v string) *CampaignResponse { + s.LastModifiedDate = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *CampaignResponse) SetLimits(v *CampaignLimits) *CampaignResponse { + s.Limits = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *CampaignResponse) SetMessageConfiguration(v *MessageConfiguration) *CampaignResponse { + s.MessageConfiguration = v + return s +} + +// SetName sets the Name field's value. +func (s *CampaignResponse) SetName(v string) *CampaignResponse { + s.Name = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *CampaignResponse) SetSchedule(v *Schedule) *CampaignResponse { + s.Schedule = v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *CampaignResponse) SetSegmentId(v string) *CampaignResponse { + s.SegmentId = &v + return s +} + +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *CampaignResponse) SetSegmentVersion(v int64) *CampaignResponse { + s.SegmentVersion = &v + return s +} + +// SetState sets the State field's value. +func (s *CampaignResponse) SetState(v *CampaignState) *CampaignResponse { + s.State = v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *CampaignResponse) SetTreatmentDescription(v string) *CampaignResponse { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *CampaignResponse) SetTreatmentName(v string) *CampaignResponse { + s.TreatmentName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CampaignResponse) SetVersion(v int64) *CampaignResponse { + s.Version = &v + return s +} + +// SMS message configuration. +type CampaignSmsMessage struct { + _ struct{} `type:"structure"` + + // The SMS text body. + Body *string `type:"string"` + + // Is this is a transactional SMS message, otherwise a promotional message. + MessageType *string `type:"string" enum:"MessageType"` + + // Sender ID of sent message. + SenderId *string `type:"string"` +} + +// String returns the string representation +func (s CampaignSmsMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignSmsMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *CampaignSmsMessage) SetBody(v string) *CampaignSmsMessage { + s.Body = &v + return s +} + +// SetMessageType sets the MessageType field's value. +func (s *CampaignSmsMessage) SetMessageType(v string) *CampaignSmsMessage { + s.MessageType = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *CampaignSmsMessage) SetSenderId(v string) *CampaignSmsMessage { + s.SenderId = &v + return s +} + +// State of the Campaign +type CampaignState struct { + _ struct{} `type:"structure"` + + // The status of the campaign, or the status of a treatment that belongs to + // an A/B test campaign.Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, + // COMPLETED, PAUSED + CampaignStatus *string `type:"string" enum:"CampaignStatus"` +} + +// String returns the string representation +func (s CampaignState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignState) GoString() string { + return s.String() +} + +// SetCampaignStatus sets the CampaignStatus field's value. +func (s *CampaignState) SetCampaignStatus(v string) *CampaignState { + s.CampaignStatus = &v + return s +} + +// List of available campaigns. +type CampaignsResponse struct { + _ struct{} `type:"structure"` + + // A list of campaigns. + Item []*CampaignResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s CampaignsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *CampaignsResponse) SetItem(v []*CampaignResponse) *CampaignsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *CampaignsResponse) SetNextToken(v string) *CampaignsResponse { + s.NextToken = &v + return s +} + +type CreateAppInput struct { + _ struct{} `type:"structure" payload:"CreateApplicationRequest"` + + // Application Request. + // + // CreateApplicationRequest is a required field + CreateApplicationRequest *CreateApplicationRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateAppInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAppInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAppInput"} + if s.CreateApplicationRequest == nil { + invalidParams.Add(request.NewErrParamRequired("CreateApplicationRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreateApplicationRequest sets the CreateApplicationRequest field's value. +func (s *CreateAppInput) SetCreateApplicationRequest(v *CreateApplicationRequest) *CreateAppInput { + s.CreateApplicationRequest = v + return s +} + +type CreateAppOutput struct { + _ struct{} `type:"structure" payload:"ApplicationResponse"` + + // Application Response. + // + // ApplicationResponse is a required field + ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateAppOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAppOutput) GoString() string { + return s.String() +} + +// SetApplicationResponse sets the ApplicationResponse field's value. +func (s *CreateAppOutput) SetApplicationResponse(v *ApplicationResponse) *CreateAppOutput { + s.ApplicationResponse = v + return s +} + +// Application Request. +type CreateApplicationRequest struct { + _ struct{} `type:"structure"` + + // The display name of the application. Used in the Amazon Pinpoint console. + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateApplicationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationRequest) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *CreateApplicationRequest) SetName(v string) *CreateApplicationRequest { + s.Name = &v + return s +} + +type CreateCampaignInput struct { + _ struct{} `type:"structure" payload:"WriteCampaignRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Used to create a campaign. + // + // WriteCampaignRequest is a required field + WriteCampaignRequest *WriteCampaignRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.WriteCampaignRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteCampaignRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateCampaignInput) SetApplicationId(v string) *CreateCampaignInput { + s.ApplicationId = &v + return s +} + +// SetWriteCampaignRequest sets the WriteCampaignRequest field's value. +func (s *CreateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) *CreateCampaignInput { + s.WriteCampaignRequest = v + return s +} + +type CreateCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *CreateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *CreateCampaignOutput { + s.CampaignResponse = v + return s +} + +type CreateExportJobInput struct { + _ struct{} `type:"structure" payload:"ExportJobRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // ExportJobRequest is a required field + ExportJobRequest *ExportJobRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateExportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateExportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateExportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ExportJobRequest == nil { + invalidParams.Add(request.NewErrParamRequired("ExportJobRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateExportJobInput) SetApplicationId(v string) *CreateExportJobInput { + s.ApplicationId = &v + return s +} + +// SetExportJobRequest sets the ExportJobRequest field's value. +func (s *CreateExportJobInput) SetExportJobRequest(v *ExportJobRequest) *CreateExportJobInput { + s.ExportJobRequest = v + return s +} + +type CreateExportJobOutput struct { + _ struct{} `type:"structure" payload:"ExportJobResponse"` + + // ExportJobResponse is a required field + ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateExportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExportJobOutput) GoString() string { + return s.String() +} + +// SetExportJobResponse sets the ExportJobResponse field's value. +func (s *CreateExportJobOutput) SetExportJobResponse(v *ExportJobResponse) *CreateExportJobOutput { + s.ExportJobResponse = v + return s +} + +type CreateImportJobInput struct { + _ struct{} `type:"structure" payload:"ImportJobRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // ImportJobRequest is a required field + ImportJobRequest *ImportJobRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateImportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateImportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateImportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateImportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ImportJobRequest == nil { + invalidParams.Add(request.NewErrParamRequired("ImportJobRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateImportJobInput) SetApplicationId(v string) *CreateImportJobInput { + s.ApplicationId = &v + return s +} + +// SetImportJobRequest sets the ImportJobRequest field's value. +func (s *CreateImportJobInput) SetImportJobRequest(v *ImportJobRequest) *CreateImportJobInput { + s.ImportJobRequest = v + return s +} + +type CreateImportJobOutput struct { + _ struct{} `type:"structure" payload:"ImportJobResponse"` + + // ImportJobResponse is a required field + ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateImportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateImportJobOutput) GoString() string { + return s.String() +} + +// SetImportJobResponse sets the ImportJobResponse field's value. +func (s *CreateImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *CreateImportJobOutput { + s.ImportJobResponse = v + return s +} + +type CreateSegmentInput struct { + _ struct{} `type:"structure" payload:"WriteSegmentRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Segment definition. + // + // WriteSegmentRequest is a required field + WriteSegmentRequest *WriteSegmentRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.WriteSegmentRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteSegmentRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateSegmentInput) SetApplicationId(v string) *CreateSegmentInput { + s.ApplicationId = &v + return s +} + +// SetWriteSegmentRequest sets the WriteSegmentRequest field's value. +func (s *CreateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *CreateSegmentInput { + s.WriteSegmentRequest = v + return s +} + +type CreateSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *CreateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *CreateSegmentOutput { + s.SegmentResponse = v + return s +} + +// Default Message across push notification, email, and sms. +type DefaultMessage struct { + _ struct{} `type:"structure"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` +} + +// String returns the string representation +func (s DefaultMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefaultMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *DefaultMessage) SetBody(v string) *DefaultMessage { + s.Body = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *DefaultMessage) SetSubstitutions(v map[string][]*string) *DefaultMessage { + s.Substitutions = v + return s +} + +// Default Push Notification Message. +type DefaultPushNotificationMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + Substitutions map[string][]*string `type:"map"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s DefaultPushNotificationMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefaultPushNotificationMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *DefaultPushNotificationMessage) SetAction(v string) *DefaultPushNotificationMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *DefaultPushNotificationMessage) SetBody(v string) *DefaultPushNotificationMessage { + s.Body = &v + return s +} + +// SetData sets the Data field's value. +func (s *DefaultPushNotificationMessage) SetData(v map[string]*string) *DefaultPushNotificationMessage { + s.Data = v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *DefaultPushNotificationMessage) SetSilentPush(v bool) *DefaultPushNotificationMessage { + s.SilentPush = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *DefaultPushNotificationMessage) SetSubstitutions(v map[string][]*string) *DefaultPushNotificationMessage { + s.Substitutions = v + return s +} + +// SetTitle sets the Title field's value. +func (s *DefaultPushNotificationMessage) SetTitle(v string) *DefaultPushNotificationMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *DefaultPushNotificationMessage) SetUrl(v string) *DefaultPushNotificationMessage { + s.Url = &v + return s +} + +type DeleteAdmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAdmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAdmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAdmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAdmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteAdmChannelInput) SetApplicationId(v string) *DeleteAdmChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteAdmChannelOutput struct { + _ struct{} `type:"structure" payload:"ADMChannelResponse"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelResponse is a required field + ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteAdmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAdmChannelOutput) GoString() string { + return s.String() +} + +// SetADMChannelResponse sets the ADMChannelResponse field's value. +func (s *DeleteAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *DeleteAdmChannelOutput { + s.ADMChannelResponse = v + return s +} + +type DeleteApnsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsChannelInput) SetApplicationId(v string) *DeleteApnsChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSChannelResponse"` + + // Apple Distribution Push Notification Service channel definition. + // + // APNSChannelResponse is a required field + APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSChannelResponse sets the APNSChannelResponse field's value. +func (s *DeleteApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *DeleteApnsChannelOutput { + s.APNSChannelResponse = v + return s +} + +type DeleteApnsSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsSandboxChannelInput) SetApplicationId(v string) *DeleteApnsSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelResponse is a required field + APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. +func (s *DeleteApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *DeleteApnsSandboxChannelOutput { + s.APNSSandboxChannelResponse = v + return s +} + +type DeleteApnsVoipChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsVoipChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsVoipChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsVoipChannelInput) SetApplicationId(v string) *DeleteApnsVoipChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsVoipChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelResponse is a required field + APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. +func (s *DeleteApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *DeleteApnsVoipChannelOutput { + s.APNSVoipChannelResponse = v + return s +} + +type DeleteApnsVoipSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsVoipSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsVoipSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsVoipSandboxChannelInput) SetApplicationId(v string) *DeleteApnsVoipSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsVoipSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelResponse is a required field + APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. +func (s *DeleteApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *DeleteApnsVoipSandboxChannelOutput { + s.APNSVoipSandboxChannelResponse = v + return s +} + +type DeleteAppInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAppInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAppInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAppInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteAppInput) SetApplicationId(v string) *DeleteAppInput { + s.ApplicationId = &v + return s +} + +type DeleteAppOutput struct { + _ struct{} `type:"structure" payload:"ApplicationResponse"` + + // Application Response. + // + // ApplicationResponse is a required field + ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteAppOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAppOutput) GoString() string { + return s.String() +} + +// SetApplicationResponse sets the ApplicationResponse field's value. +func (s *DeleteAppOutput) SetApplicationResponse(v *ApplicationResponse) *DeleteAppOutput { + s.ApplicationResponse = v + return s +} + +type DeleteBaiduChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBaiduChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBaiduChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBaiduChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBaiduChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteBaiduChannelInput) SetApplicationId(v string) *DeleteBaiduChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteBaiduChannelOutput struct { + _ struct{} `type:"structure" payload:"BaiduChannelResponse"` + + // Baidu Cloud Messaging channel definition + // + // BaiduChannelResponse is a required field + BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteBaiduChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBaiduChannelOutput) GoString() string { + return s.String() +} + +// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. +func (s *DeleteBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *DeleteBaiduChannelOutput { + s.BaiduChannelResponse = v + return s +} + +type DeleteCampaignInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteCampaignInput) SetApplicationId(v string) *DeleteCampaignInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *DeleteCampaignInput) SetCampaignId(v string) *DeleteCampaignInput { + s.CampaignId = &v + return s +} + +type DeleteCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *DeleteCampaignOutput) SetCampaignResponse(v *CampaignResponse) *DeleteCampaignOutput { + s.CampaignResponse = v + return s +} + +type DeleteEmailChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEmailChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEmailChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEmailChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEmailChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteEmailChannelInput) SetApplicationId(v string) *DeleteEmailChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteEmailChannelOutput struct { + _ struct{} `type:"structure" payload:"EmailChannelResponse"` + + // Email Channel Response. + // + // EmailChannelResponse is a required field + EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteEmailChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEmailChannelOutput) GoString() string { + return s.String() +} + +// SetEmailChannelResponse sets the EmailChannelResponse field's value. +func (s *DeleteEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *DeleteEmailChannelOutput { + s.EmailChannelResponse = v + return s +} + +type DeleteEndpointInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // EndpointId is a required field + EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.EndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteEndpointInput) SetApplicationId(v string) *DeleteEndpointInput { + s.ApplicationId = &v + return s +} + +// SetEndpointId sets the EndpointId field's value. +func (s *DeleteEndpointInput) SetEndpointId(v string) *DeleteEndpointInput { + s.EndpointId = &v + return s +} + +type DeleteEndpointOutput struct { + _ struct{} `type:"structure" payload:"EndpointResponse"` + + // Endpoint response + // + // EndpointResponse is a required field + EndpointResponse *EndpointResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointOutput) GoString() string { + return s.String() +} + +// SetEndpointResponse sets the EndpointResponse field's value. +func (s *DeleteEndpointOutput) SetEndpointResponse(v *EndpointResponse) *DeleteEndpointOutput { + s.EndpointResponse = v + return s +} + +type DeleteEventStreamInput struct { + _ struct{} `type:"structure"` + + // Application Id. + // + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEventStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventStreamInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteEventStreamInput) SetApplicationId(v string) *DeleteEventStreamInput { + s.ApplicationId = &v + return s +} + +type DeleteEventStreamOutput struct { + _ struct{} `type:"structure" payload:"EventStream"` + + // Model for an event publishing subscription export. + // + // EventStream is a required field + EventStream *EventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteEventStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventStreamOutput) GoString() string { + return s.String() +} + +// SetEventStream sets the EventStream field's value. +func (s *DeleteEventStreamOutput) SetEventStream(v *EventStream) *DeleteEventStreamOutput { + s.EventStream = v + return s +} + +type DeleteGcmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGcmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGcmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGcmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGcmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteGcmChannelInput) SetApplicationId(v string) *DeleteGcmChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteGcmChannelOutput struct { + _ struct{} `type:"structure" payload:"GCMChannelResponse"` + + // Google Cloud Messaging channel definition + // + // GCMChannelResponse is a required field + GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteGcmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGcmChannelOutput) GoString() string { + return s.String() +} + +// SetGCMChannelResponse sets the GCMChannelResponse field's value. +func (s *DeleteGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *DeleteGcmChannelOutput { + s.GCMChannelResponse = v + return s +} + +type DeleteSegmentInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteSegmentInput) SetApplicationId(v string) *DeleteSegmentInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *DeleteSegmentInput) SetSegmentId(v string) *DeleteSegmentInput { + s.SegmentId = &v + return s +} + +type DeleteSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *DeleteSegmentOutput) SetSegmentResponse(v *SegmentResponse) *DeleteSegmentOutput { + s.SegmentResponse = v + return s +} + +type DeleteSmsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSmsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSmsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSmsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSmsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteSmsChannelInput) SetApplicationId(v string) *DeleteSmsChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteSmsChannelOutput struct { + _ struct{} `type:"structure" payload:"SMSChannelResponse"` + + // SMS Channel Response. + // + // SMSChannelResponse is a required field + SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteSmsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSmsChannelOutput) GoString() string { + return s.String() +} + +// SetSMSChannelResponse sets the SMSChannelResponse field's value. +func (s *DeleteSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *DeleteSmsChannelOutput { + s.SMSChannelResponse = v + return s +} + +// The message configuration. +type DirectMessageConfiguration struct { + _ struct{} `type:"structure"` + + // The message to ADM channels. Overrides the default push notification message. + ADMMessage *ADMMessage `type:"structure"` + + // The message to APNS channels. Overrides the default push notification message. + APNSMessage *APNSMessage `type:"structure"` + + // The message to Baidu GCM channels. Overrides the default push notification + // message. + BaiduMessage *BaiduMessage `type:"structure"` + + // The default message for all channels. + DefaultMessage *DefaultMessage `type:"structure"` + + // The default push notification message for all push channels. + DefaultPushNotificationMessage *DefaultPushNotificationMessage `type:"structure"` + + // The message to GCM channels. Overrides the default push notification message. + GCMMessage *GCMMessage `type:"structure"` + + // The message to SMS channels. Overrides the default message. + SMSMessage *SMSMessage `type:"structure"` +} + +// String returns the string representation +func (s DirectMessageConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DirectMessageConfiguration) GoString() string { + return s.String() +} + +// SetADMMessage sets the ADMMessage field's value. +func (s *DirectMessageConfiguration) SetADMMessage(v *ADMMessage) *DirectMessageConfiguration { + s.ADMMessage = v + return s +} + +// SetAPNSMessage sets the APNSMessage field's value. +func (s *DirectMessageConfiguration) SetAPNSMessage(v *APNSMessage) *DirectMessageConfiguration { + s.APNSMessage = v + return s +} + +// SetBaiduMessage sets the BaiduMessage field's value. +func (s *DirectMessageConfiguration) SetBaiduMessage(v *BaiduMessage) *DirectMessageConfiguration { + s.BaiduMessage = v + return s +} + +// SetDefaultMessage sets the DefaultMessage field's value. +func (s *DirectMessageConfiguration) SetDefaultMessage(v *DefaultMessage) *DirectMessageConfiguration { + s.DefaultMessage = v + return s +} + +// SetDefaultPushNotificationMessage sets the DefaultPushNotificationMessage field's value. +func (s *DirectMessageConfiguration) SetDefaultPushNotificationMessage(v *DefaultPushNotificationMessage) *DirectMessageConfiguration { + s.DefaultPushNotificationMessage = v + return s +} + +// SetGCMMessage sets the GCMMessage field's value. +func (s *DirectMessageConfiguration) SetGCMMessage(v *GCMMessage) *DirectMessageConfiguration { + s.GCMMessage = v + return s +} + +// SetSMSMessage sets the SMSMessage field's value. +func (s *DirectMessageConfiguration) SetSMSMessage(v *SMSMessage) *DirectMessageConfiguration { + s.SMSMessage = v + return s +} + +// Email Channel Request +type EmailChannelRequest struct { + _ struct{} `type:"structure"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The email address used to send emails from. + FromAddress *string `type:"string"` + + // The ARN of an identity verified with SES. + Identity *string `type:"string"` + + // The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion + // service + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s EmailChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmailChannelRequest) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *EmailChannelRequest) SetEnabled(v bool) *EmailChannelRequest { + s.Enabled = &v + return s +} + +// SetFromAddress sets the FromAddress field's value. +func (s *EmailChannelRequest) SetFromAddress(v string) *EmailChannelRequest { + s.FromAddress = &v + return s +} + +// SetIdentity sets the Identity field's value. +func (s *EmailChannelRequest) SetIdentity(v string) *EmailChannelRequest { + s.Identity = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *EmailChannelRequest) SetRoleArn(v string) *EmailChannelRequest { + s.RoleArn = &v + return s +} + +// Email Channel Response. +type EmailChannelResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application to which the email channel belongs. + ApplicationId *string `type:"string"` + + // The date that the settings were last updated in ISO 8601 format. + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The email address used to send emails from. + FromAddress *string `type:"string"` + + // If the channel is registered with a credential for authentication. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // The ARN of an identity verified with SES. + Identity *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Platform type. Will be "EMAIL" + Platform *string `type:"string"` + + // The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion + // service + RoleArn *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s EmailChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmailChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *EmailChannelResponse) SetApplicationId(v string) *EmailChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *EmailChannelResponse) SetCreationDate(v string) *EmailChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *EmailChannelResponse) SetEnabled(v bool) *EmailChannelResponse { + s.Enabled = &v + return s +} + +// SetFromAddress sets the FromAddress field's value. +func (s *EmailChannelResponse) SetFromAddress(v string) *EmailChannelResponse { + s.FromAddress = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *EmailChannelResponse) SetHasCredential(v bool) *EmailChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *EmailChannelResponse) SetId(v string) *EmailChannelResponse { + s.Id = &v + return s +} + +// SetIdentity sets the Identity field's value. +func (s *EmailChannelResponse) SetIdentity(v string) *EmailChannelResponse { + s.Identity = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *EmailChannelResponse) SetIsArchived(v bool) *EmailChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *EmailChannelResponse) SetLastModifiedBy(v string) *EmailChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *EmailChannelResponse) SetLastModifiedDate(v string) *EmailChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *EmailChannelResponse) SetPlatform(v string) *EmailChannelResponse { + s.Platform = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *EmailChannelResponse) SetRoleArn(v string) *EmailChannelResponse { + s.RoleArn = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *EmailChannelResponse) SetVersion(v int64) *EmailChannelResponse { + s.Version = &v + return s +} + +// Endpoint update request +type EndpointBatchItem struct { + _ struct{} `type:"structure"` + + // The address or token of the endpoint as provided by your push provider (e.g. + // DeviceToken or RegistrationId). + Address *string `type:"string"` + + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // The endpoint demographic attributes. + Demographic *EndpointDemographic `type:"structure"` + + // The last time the endpoint was updated. Provided in ISO 8601 format. + EffectiveDate *string `type:"string"` + + // The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE + // if a delivery fails. Will be set to ACTIVE if the address is updated. + EndpointStatus *string `type:"string"` + + // The unique Id for the Endpoint in the batch. + Id *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // The unique ID for the most recent request to update the endpoint. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s EndpointBatchItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointBatchItem) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointBatchItem) SetAddress(v string) *EndpointBatchItem { + s.Address = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *EndpointBatchItem) SetAttributes(v map[string][]*string) *EndpointBatchItem { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *EndpointBatchItem) SetChannelType(v string) *EndpointBatchItem { + s.ChannelType = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *EndpointBatchItem) SetDemographic(v *EndpointDemographic) *EndpointBatchItem { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *EndpointBatchItem) SetEffectiveDate(v string) *EndpointBatchItem { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *EndpointBatchItem) SetEndpointStatus(v string) *EndpointBatchItem { + s.EndpointStatus = &v + return s +} + +// SetId sets the Id field's value. +func (s *EndpointBatchItem) SetId(v string) *EndpointBatchItem { + s.Id = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *EndpointBatchItem) SetLocation(v *EndpointLocation) *EndpointBatchItem { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *EndpointBatchItem) SetMetrics(v map[string]*float64) *EndpointBatchItem { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *EndpointBatchItem) SetOptOut(v string) *EndpointBatchItem { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *EndpointBatchItem) SetRequestId(v string) *EndpointBatchItem { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *EndpointBatchItem) SetUser(v *EndpointUser) *EndpointBatchItem { + s.User = v + return s +} + +// Endpoint batch update request. +type EndpointBatchRequest struct { + _ struct{} `type:"structure"` + + // List of items to update. Maximum 100 items + Item []*EndpointBatchItem `type:"list"` +} + +// String returns the string representation +func (s EndpointBatchRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointBatchRequest) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *EndpointBatchRequest) SetItem(v []*EndpointBatchItem) *EndpointBatchRequest { + s.Item = v + return s +} + +// Endpoint demographic data +type EndpointDemographic struct { + _ struct{} `type:"structure"` + + // The version of the application associated with the endpoint. + AppVersion *string `type:"string"` + + // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, + // followed by an underscore, followed by an ISO 3166-1 alpha-2 value. + Locale *string `type:"string"` + + // The endpoint make, such as such as Apple or Samsung. + Make *string `type:"string"` + + // The endpoint model, such as iPhone. + Model *string `type:"string"` + + // The endpoint model version. + ModelVersion *string `type:"string"` + + // The endpoint platform, such as ios or android. + Platform *string `type:"string"` + + // The endpoint platform version. + PlatformVersion *string `type:"string"` + + // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles. + Timezone *string `type:"string"` +} + +// String returns the string representation +func (s EndpointDemographic) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointDemographic) GoString() string { + return s.String() +} + +// SetAppVersion sets the AppVersion field's value. +func (s *EndpointDemographic) SetAppVersion(v string) *EndpointDemographic { + s.AppVersion = &v + return s +} + +// SetLocale sets the Locale field's value. +func (s *EndpointDemographic) SetLocale(v string) *EndpointDemographic { + s.Locale = &v + return s +} + +// SetMake sets the Make field's value. +func (s *EndpointDemographic) SetMake(v string) *EndpointDemographic { + s.Make = &v + return s +} + +// SetModel sets the Model field's value. +func (s *EndpointDemographic) SetModel(v string) *EndpointDemographic { + s.Model = &v + return s +} + +// SetModelVersion sets the ModelVersion field's value. +func (s *EndpointDemographic) SetModelVersion(v string) *EndpointDemographic { + s.ModelVersion = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *EndpointDemographic) SetPlatform(v string) *EndpointDemographic { + s.Platform = &v + return s +} + +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *EndpointDemographic) SetPlatformVersion(v string) *EndpointDemographic { + s.PlatformVersion = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *EndpointDemographic) SetTimezone(v string) *EndpointDemographic { + s.Timezone = &v + return s +} + +// Endpoint location data +type EndpointLocation struct { + _ struct{} `type:"structure"` + + // The city where the endpoint is located. + City *string `type:"string"` + + // Country according to ISO 3166-1 Alpha-2 codes. For example, US. + Country *string `type:"string"` + + // The latitude of the endpoint location. Rounded to one decimal (Roughly corresponding + // to a mile). + Latitude *float64 `type:"double"` + + // The longitude of the endpoint location. Rounded to one decimal (Roughly corresponding + // to a mile). + Longitude *float64 `type:"double"` + + // The postal code or zip code of the endpoint. + PostalCode *string `type:"string"` + + // The region of the endpoint location. For example, corresponds to a state + // in US. + Region *string `type:"string"` +} + +// String returns the string representation +func (s EndpointLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointLocation) GoString() string { + return s.String() +} + +// SetCity sets the City field's value. +func (s *EndpointLocation) SetCity(v string) *EndpointLocation { + s.City = &v + return s +} + +// SetCountry sets the Country field's value. +func (s *EndpointLocation) SetCountry(v string) *EndpointLocation { + s.Country = &v + return s +} + +// SetLatitude sets the Latitude field's value. +func (s *EndpointLocation) SetLatitude(v float64) *EndpointLocation { + s.Latitude = &v + return s +} + +// SetLongitude sets the Longitude field's value. +func (s *EndpointLocation) SetLongitude(v float64) *EndpointLocation { + s.Longitude = &v + return s +} + +// SetPostalCode sets the PostalCode field's value. +func (s *EndpointLocation) SetPostalCode(v string) *EndpointLocation { + s.PostalCode = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *EndpointLocation) SetRegion(v string) *EndpointLocation { + s.Region = &v + return s +} + +// The result from sending a message to an endpoint. +type EndpointMessageResult struct { + _ struct{} `type:"structure"` + + // Address that endpoint message was delivered to. + Address *string `type:"string"` + + // Delivery status of message. + DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` + + // Downstream service status code. + StatusCode *int64 `type:"integer"` + + // Status message for message delivery. + StatusMessage *string `type:"string"` + + // If token was updated as part of delivery. (This is GCM Specific) + UpdatedToken *string `type:"string"` +} + +// String returns the string representation +func (s EndpointMessageResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointMessageResult) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointMessageResult) SetAddress(v string) *EndpointMessageResult { + s.Address = &v + return s +} + +// SetDeliveryStatus sets the DeliveryStatus field's value. +func (s *EndpointMessageResult) SetDeliveryStatus(v string) *EndpointMessageResult { + s.DeliveryStatus = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *EndpointMessageResult) SetStatusCode(v int64) *EndpointMessageResult { + s.StatusCode = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *EndpointMessageResult) SetStatusMessage(v string) *EndpointMessageResult { + s.StatusMessage = &v + return s +} + +// SetUpdatedToken sets the UpdatedToken field's value. +func (s *EndpointMessageResult) SetUpdatedToken(v string) *EndpointMessageResult { + s.UpdatedToken = &v + return s +} + +// Endpoint update request +type EndpointRequest struct { + _ struct{} `type:"structure"` + + // The address or token of the endpoint as provided by your push provider (e.g. + // DeviceToken or RegistrationId). + Address *string `type:"string"` + + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // The endpoint demographic attributes. + Demographic *EndpointDemographic `type:"structure"` + + // The last time the endpoint was updated. Provided in ISO 8601 format. + EffectiveDate *string `type:"string"` + + // The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE + // if a delivery fails. Will be set to ACTIVE if the address is updated. + EndpointStatus *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // The unique ID for the most recent request to update the endpoint. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s EndpointRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointRequest) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointRequest) SetAddress(v string) *EndpointRequest { + s.Address = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *EndpointRequest) SetAttributes(v map[string][]*string) *EndpointRequest { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *EndpointRequest) SetChannelType(v string) *EndpointRequest { + s.ChannelType = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *EndpointRequest) SetDemographic(v *EndpointDemographic) *EndpointRequest { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *EndpointRequest) SetEffectiveDate(v string) *EndpointRequest { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *EndpointRequest) SetEndpointStatus(v string) *EndpointRequest { + s.EndpointStatus = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *EndpointRequest) SetLocation(v *EndpointLocation) *EndpointRequest { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *EndpointRequest) SetMetrics(v map[string]*float64) *EndpointRequest { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *EndpointRequest) SetOptOut(v string) *EndpointRequest { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *EndpointRequest) SetRequestId(v string) *EndpointRequest { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *EndpointRequest) SetUser(v *EndpointUser) *EndpointRequest { + s.User = v + return s +} + +// Endpoint response +type EndpointResponse struct { + _ struct{} `type:"structure"` + + // The address or token of the endpoint as provided by your push provider (e.g. + // DeviceToken or RegistrationId). + Address *string `type:"string"` + + // The ID of the application associated with the endpoint. + ApplicationId *string `type:"string"` + + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // A number from 0 - 99 that represents the cohort the endpoint is assigned + // to. Endpoints are grouped into cohorts randomly, and each cohort contains + // approximately 1 percent of the endpoints for an app. Amazon Pinpoint assigns + // cohorts to the holdout or treatment allocations for a campaign. + CohortId *string `type:"string"` + + // The last time the endpoint was created. Provided in ISO 8601 format. + CreationDate *string `type:"string"` + + // The endpoint demographic attributes. + Demographic *EndpointDemographic `type:"structure"` + + // The last time the endpoint was updated. Provided in ISO 8601 format. + EffectiveDate *string `type:"string"` + + // The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE + // if a delivery fails. Will be set to ACTIVE if the address is updated. + EndpointStatus *string `type:"string"` + + // The unique ID that you assigned to the endpoint. The ID should be a globally + // unique identifier (GUID) to ensure that it is unique compared to all other + // endpoints for the application. + Id *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // The unique ID for the most recent request to update the endpoint. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s EndpointResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointResponse) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointResponse) SetAddress(v string) *EndpointResponse { + s.Address = &v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *EndpointResponse) SetApplicationId(v string) *EndpointResponse { + s.ApplicationId = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *EndpointResponse) SetAttributes(v map[string][]*string) *EndpointResponse { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *EndpointResponse) SetChannelType(v string) *EndpointResponse { + s.ChannelType = &v + return s +} + +// SetCohortId sets the CohortId field's value. +func (s *EndpointResponse) SetCohortId(v string) *EndpointResponse { + s.CohortId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *EndpointResponse) SetCreationDate(v string) *EndpointResponse { + s.CreationDate = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *EndpointResponse) SetDemographic(v *EndpointDemographic) *EndpointResponse { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *EndpointResponse) SetEffectiveDate(v string) *EndpointResponse { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *EndpointResponse) SetEndpointStatus(v string) *EndpointResponse { + s.EndpointStatus = &v + return s +} + +// SetId sets the Id field's value. +func (s *EndpointResponse) SetId(v string) *EndpointResponse { + s.Id = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *EndpointResponse) SetLocation(v *EndpointLocation) *EndpointResponse { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *EndpointResponse) SetMetrics(v map[string]*float64) *EndpointResponse { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *EndpointResponse) SetOptOut(v string) *EndpointResponse { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *EndpointResponse) SetRequestId(v string) *EndpointResponse { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *EndpointResponse) SetUser(v *EndpointUser) *EndpointResponse { + s.User = v + return s +} + +// Endpoint send configuration. +type EndpointSendConfiguration struct { + _ struct{} `type:"structure"` + + // Body override. If specified will override default body. + BodyOverride *string `type:"string"` + + // A map of custom attributes to attributes to be attached to the message for + // this address. This payload is added to the push notification's 'data.pinpoint' + // object or added to the email/sms delivery receipt event attributes. + Context map[string]*string `type:"map"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` + + // Title override. If specified will override default title if applicable. + TitleOverride *string `type:"string"` +} + +// String returns the string representation +func (s EndpointSendConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointSendConfiguration) GoString() string { + return s.String() +} + +// SetBodyOverride sets the BodyOverride field's value. +func (s *EndpointSendConfiguration) SetBodyOverride(v string) *EndpointSendConfiguration { + s.BodyOverride = &v + return s +} + +// SetContext sets the Context field's value. +func (s *EndpointSendConfiguration) SetContext(v map[string]*string) *EndpointSendConfiguration { + s.Context = v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *EndpointSendConfiguration) SetRawContent(v string) *EndpointSendConfiguration { + s.RawContent = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *EndpointSendConfiguration) SetSubstitutions(v map[string][]*string) *EndpointSendConfiguration { + s.Substitutions = v + return s +} + +// SetTitleOverride sets the TitleOverride field's value. +func (s *EndpointSendConfiguration) SetTitleOverride(v string) *EndpointSendConfiguration { + s.TitleOverride = &v + return s +} + +// Endpoint user specific custom userAttributes +type EndpointUser struct { + _ struct{} `type:"structure"` + + UserAttributes map[string][]*string `type:"map"` + + // The unique ID of the user. + UserId *string `type:"string"` +} + +// String returns the string representation +func (s EndpointUser) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointUser) GoString() string { + return s.String() +} + +// SetUserAttributes sets the UserAttributes field's value. +func (s *EndpointUser) SetUserAttributes(v map[string][]*string) *EndpointUser { + s.UserAttributes = v + return s +} + +// SetUserId sets the UserId field's value. +func (s *EndpointUser) SetUserId(v string) *EndpointUser { + s.UserId = &v + return s +} + +// Model for an event publishing subscription export. +type EventStream struct { + _ struct{} `type:"structure"` + + // The ID of the application from which events should be published. + ApplicationId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery + // stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME + // Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME + DestinationStreamArn *string `type:"string"` + + // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The date the event stream was last updated in ISO 8601 format. + LastModifiedDate *string `type:"string"` + + // The IAM user who last modified the event stream. + LastUpdatedBy *string `type:"string"` + + // The IAM role that authorizes Amazon Pinpoint to publish events to the stream + // in your account. + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s EventStream) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventStream) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *EventStream) SetApplicationId(v string) *EventStream { + s.ApplicationId = &v + return s +} + +// SetDestinationStreamArn sets the DestinationStreamArn field's value. +func (s *EventStream) SetDestinationStreamArn(v string) *EventStream { + s.DestinationStreamArn = &v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *EventStream) SetExternalId(v string) *EventStream { + s.ExternalId = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *EventStream) SetLastModifiedDate(v string) *EventStream { + s.LastModifiedDate = &v + return s +} + +// SetLastUpdatedBy sets the LastUpdatedBy field's value. +func (s *EventStream) SetLastUpdatedBy(v string) *EventStream { + s.LastUpdatedBy = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *EventStream) SetRoleArn(v string) *EventStream { + s.RoleArn = &v + return s +} + +type ExportJobRequest struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that endpoints will be exported to. + RoleArn *string `type:"string"` + + // A URL that points to the location within an Amazon S3 bucket that will receive + // the export. The location is typically a folder with multiple files.The URL + // should follow this format: s3://bucket-name/folder-name/Amazon Pinpoint will + // export endpoints to this location. + S3UrlPrefix *string `type:"string"` + + // The ID of the segment to export endpoints from. If not present, all endpoints + // will be exported. + SegmentId *string `type:"string"` +} + +// String returns the string representation +func (s ExportJobRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobRequest) GoString() string { + return s.String() +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ExportJobRequest) SetRoleArn(v string) *ExportJobRequest { + s.RoleArn = &v + return s +} + +// SetS3UrlPrefix sets the S3UrlPrefix field's value. +func (s *ExportJobRequest) SetS3UrlPrefix(v string) *ExportJobRequest { + s.S3UrlPrefix = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ExportJobRequest) SetSegmentId(v string) *ExportJobRequest { + s.SegmentId = &v + return s +} + +type ExportJobResource struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that endpoints will be exported to. + RoleArn *string `type:"string"` + + // A URL that points to the location within an Amazon S3 bucket that will receive + // the export. The location is typically a folder with multiple files.The URL + // should follow this format: s3://bucket-name/folder-name/Amazon Pinpoint will + // export endpoints to this location. + S3UrlPrefix *string `type:"string"` + + // The ID of the segment to export endpoints from. If not present all endpoints + // will be exported. + SegmentId *string `type:"string"` +} + +// String returns the string representation +func (s ExportJobResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobResource) GoString() string { + return s.String() +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ExportJobResource) SetRoleArn(v string) *ExportJobResource { + s.RoleArn = &v + return s +} + +// SetS3UrlPrefix sets the S3UrlPrefix field's value. +func (s *ExportJobResource) SetS3UrlPrefix(v string) *ExportJobResource { + s.S3UrlPrefix = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ExportJobResource) SetSegmentId(v string) *ExportJobResource { + s.SegmentId = &v + return s +} + +type ExportJobResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application to which the job applies. + ApplicationId *string `type:"string"` + + // The number of pieces that have successfully completed as of the time of the + // request. + CompletedPieces *int64 `type:"integer"` + + // The date the job completed in ISO 8601 format. + CompletionDate *string `type:"string"` + + // The date the job was created in ISO 8601 format. + CreationDate *string `type:"string"` + + // The export job settings. + Definition *ExportJobResource `type:"structure"` + + // The number of pieces that failed to be processed as of the time of the request. + FailedPieces *int64 `type:"integer"` + + Failures []*string `type:"list"` + + // The unique ID of the job. + Id *string `type:"string"` + + // The status of the export job.Valid values: CREATED, INITIALIZING, PROCESSING, + // COMPLETING, COMPLETED, FAILING, FAILEDThe job status is FAILED if one or + // more pieces failed. + JobStatus *string `type:"string" enum:"JobStatus"` + + // The number of endpoints that were not processed; for example, because of + // syntax errors. + TotalFailures *int64 `type:"integer"` + + // The total number of pieces that must be processed to finish the job. Each + // piece is an approximately equal portion of the endpoints. + TotalPieces *int64 `type:"integer"` + + // The number of endpoints that were processed by the job. + TotalProcessed *int64 `type:"integer"` + + // The job type. Will be 'EXPORT'. + Type *string `type:"string"` +} + +// String returns the string representation +func (s ExportJobResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ExportJobResponse) SetApplicationId(v string) *ExportJobResponse { + s.ApplicationId = &v + return s +} + +// SetCompletedPieces sets the CompletedPieces field's value. +func (s *ExportJobResponse) SetCompletedPieces(v int64) *ExportJobResponse { + s.CompletedPieces = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *ExportJobResponse) SetCompletionDate(v string) *ExportJobResponse { + s.CompletionDate = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ExportJobResponse) SetCreationDate(v string) *ExportJobResponse { + s.CreationDate = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *ExportJobResponse) SetDefinition(v *ExportJobResource) *ExportJobResponse { + s.Definition = v + return s +} + +// SetFailedPieces sets the FailedPieces field's value. +func (s *ExportJobResponse) SetFailedPieces(v int64) *ExportJobResponse { + s.FailedPieces = &v + return s +} + +// SetFailures sets the Failures field's value. +func (s *ExportJobResponse) SetFailures(v []*string) *ExportJobResponse { + s.Failures = v + return s +} + +// SetId sets the Id field's value. +func (s *ExportJobResponse) SetId(v string) *ExportJobResponse { + s.Id = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *ExportJobResponse) SetJobStatus(v string) *ExportJobResponse { + s.JobStatus = &v + return s +} + +// SetTotalFailures sets the TotalFailures field's value. +func (s *ExportJobResponse) SetTotalFailures(v int64) *ExportJobResponse { + s.TotalFailures = &v + return s +} + +// SetTotalPieces sets the TotalPieces field's value. +func (s *ExportJobResponse) SetTotalPieces(v int64) *ExportJobResponse { + s.TotalPieces = &v + return s +} + +// SetTotalProcessed sets the TotalProcessed field's value. +func (s *ExportJobResponse) SetTotalProcessed(v int64) *ExportJobResponse { + s.TotalProcessed = &v + return s +} + +// SetType sets the Type field's value. +func (s *ExportJobResponse) SetType(v string) *ExportJobResponse { + s.Type = &v + return s +} + +// Export job list. +type ExportJobsResponse struct { + _ struct{} `type:"structure"` + + // A list of export jobs for the application. + Item []*ExportJobResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ExportJobsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ExportJobsResponse) SetItem(v []*ExportJobResponse) *ExportJobsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ExportJobsResponse) SetNextToken(v string) *ExportJobsResponse { + s.NextToken = &v + return s +} + +// Google Cloud Messaging credentials +type GCMChannelRequest struct { + _ struct{} `type:"structure"` + + // Platform credential API key from Google. + ApiKey *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s GCMChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GCMChannelRequest) GoString() string { + return s.String() +} + +// SetApiKey sets the ApiKey field's value. +func (s *GCMChannelRequest) SetApiKey(v string) *GCMChannelRequest { + s.ApiKey = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *GCMChannelRequest) SetEnabled(v bool) *GCMChannelRequest { + s.Enabled = &v + return s +} + +// Google Cloud Messaging channel definition +type GCMChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the channel applies. + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The GCM API key from Google. + Credential *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Indicates whether the channel is configured with FCM or GCM credentials. + // Amazon Pinpoint uses your credentials to authenticate push notifications + // with FCM or GCM. Provide your credentials by setting the ApiKey attribute. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used. Present only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be GCM + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s GCMChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GCMChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GCMChannelResponse) SetApplicationId(v string) *GCMChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *GCMChannelResponse) SetCreationDate(v string) *GCMChannelResponse { + s.CreationDate = &v + return s +} + +// SetCredential sets the Credential field's value. +func (s *GCMChannelResponse) SetCredential(v string) *GCMChannelResponse { + s.Credential = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *GCMChannelResponse) SetEnabled(v bool) *GCMChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *GCMChannelResponse) SetHasCredential(v bool) *GCMChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *GCMChannelResponse) SetId(v string) *GCMChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *GCMChannelResponse) SetIsArchived(v bool) *GCMChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *GCMChannelResponse) SetLastModifiedBy(v string) *GCMChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *GCMChannelResponse) SetLastModifiedDate(v string) *GCMChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *GCMChannelResponse) SetPlatform(v string) *GCMChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GCMChannelResponse) SetVersion(v int64) *GCMChannelResponse { + s.Version = &v + return s +} + +// GCM Message. +type GCMMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // This parameter identifies a group of messages (e.g., with collapse_key: "Updates + // Available") that can be collapsed, so that only the last message gets sent + // when delivery can be resumed. This is intended to avoid sending too many + // of the same messages when the device comes back online or becomes active. + CollapseKey *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // The icon image name of the asset saved in your application. + IconReference *string `type:"string"` + + // The URL that points to an image used as the large icon to the notification + // content view. + ImageIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // The message priority. Amazon Pinpoint uses this value to set the FCM or GCM + // priority parameter when it sends the message. Accepts the following values:"Normal" + // - Messages might be delayed. Delivery is optimized for battery usage on the + // receiving device. Use normal priority unless immediate delivery is required."High" + // - Messages are sent immediately and might wake a sleeping device.The equivalent + // values for APNs messages are "5" and "10". Amazon Pinpoint accepts these + // values here and converts them.For more information, see About FCM Messages + // in the Firebase documentation. + Priority *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // This parameter specifies the package name of the application where the registration + // tokens must match in order to receive the message. + RestrictedPackageName *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // The URL that points to an image used as the small icon for the notification + // which will be used to represent the notification in the status bar and content + // view + SmallImageIconUrl *string `type:"string"` + + // Indicates a sound to play when the device receives the notification. Supports + // default, or the filename of a sound resource bundled in the app. Android + // sound files must reside in /res/raw/ + Sound *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` + + // The length of time (in seconds) that FCM or GCM stores and attempts to deliver + // the message. If unspecified, the value defaults to the maximum, which is + // 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM + // or GCM time_to_live parameter. + TimeToLive *int64 `type:"integer"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s GCMMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GCMMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *GCMMessage) SetAction(v string) *GCMMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *GCMMessage) SetBody(v string) *GCMMessage { + s.Body = &v + return s +} + +// SetCollapseKey sets the CollapseKey field's value. +func (s *GCMMessage) SetCollapseKey(v string) *GCMMessage { + s.CollapseKey = &v + return s +} + +// SetData sets the Data field's value. +func (s *GCMMessage) SetData(v map[string]*string) *GCMMessage { + s.Data = v + return s +} + +// SetIconReference sets the IconReference field's value. +func (s *GCMMessage) SetIconReference(v string) *GCMMessage { + s.IconReference = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *GCMMessage) SetImageIconUrl(v string) *GCMMessage { + s.ImageIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *GCMMessage) SetImageUrl(v string) *GCMMessage { + s.ImageUrl = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *GCMMessage) SetPriority(v string) *GCMMessage { + s.Priority = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *GCMMessage) SetRawContent(v string) *GCMMessage { + s.RawContent = &v + return s +} + +// SetRestrictedPackageName sets the RestrictedPackageName field's value. +func (s *GCMMessage) SetRestrictedPackageName(v string) *GCMMessage { + s.RestrictedPackageName = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *GCMMessage) SetSilentPush(v bool) *GCMMessage { + s.SilentPush = &v + return s +} + +// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. +func (s *GCMMessage) SetSmallImageIconUrl(v string) *GCMMessage { + s.SmallImageIconUrl = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *GCMMessage) SetSound(v string) *GCMMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *GCMMessage) SetSubstitutions(v map[string][]*string) *GCMMessage { + s.Substitutions = v + return s +} + +// SetTimeToLive sets the TimeToLive field's value. +func (s *GCMMessage) SetTimeToLive(v int64) *GCMMessage { + s.TimeToLive = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *GCMMessage) SetTitle(v string) *GCMMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *GCMMessage) SetUrl(v string) *GCMMessage { + s.Url = &v + return s +} + +type GetAdmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAdmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAdmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAdmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetAdmChannelInput) SetApplicationId(v string) *GetAdmChannelInput { + s.ApplicationId = &v + return s +} + +type GetAdmChannelOutput struct { + _ struct{} `type:"structure" payload:"ADMChannelResponse"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelResponse is a required field + ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetAdmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdmChannelOutput) GoString() string { + return s.String() +} + +// SetADMChannelResponse sets the ADMChannelResponse field's value. +func (s *GetAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *GetAdmChannelOutput { + s.ADMChannelResponse = v + return s +} + +type GetApnsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsChannelInput) SetApplicationId(v string) *GetApnsChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSChannelResponse"` + + // Apple Distribution Push Notification Service channel definition. + // + // APNSChannelResponse is a required field + APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSChannelResponse sets the APNSChannelResponse field's value. +func (s *GetApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *GetApnsChannelOutput { + s.APNSChannelResponse = v + return s +} + +type GetApnsSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsSandboxChannelInput) SetApplicationId(v string) *GetApnsSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelResponse is a required field + APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. +func (s *GetApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *GetApnsSandboxChannelOutput { + s.APNSSandboxChannelResponse = v + return s +} + +type GetApnsVoipChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsVoipChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsVoipChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsVoipChannelInput) SetApplicationId(v string) *GetApnsVoipChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsVoipChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelResponse is a required field + APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. +func (s *GetApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *GetApnsVoipChannelOutput { + s.APNSVoipChannelResponse = v + return s +} + +type GetApnsVoipSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsVoipSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsVoipSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsVoipSandboxChannelInput) SetApplicationId(v string) *GetApnsVoipSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsVoipSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelResponse is a required field + APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. +func (s *GetApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *GetApnsVoipSandboxChannelOutput { + s.APNSVoipSandboxChannelResponse = v + return s +} + +type GetAppInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAppInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAppInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetAppInput) SetApplicationId(v string) *GetAppInput { + s.ApplicationId = &v + return s +} + +type GetAppOutput struct { + _ struct{} `type:"structure" payload:"ApplicationResponse"` + + // Application Response. + // + // ApplicationResponse is a required field + ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetAppOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppOutput) GoString() string { + return s.String() +} + +// SetApplicationResponse sets the ApplicationResponse field's value. +func (s *GetAppOutput) SetApplicationResponse(v *ApplicationResponse) *GetAppOutput { + s.ApplicationResponse = v + return s +} + +type GetApplicationSettingsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApplicationSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApplicationSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApplicationSettingsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApplicationSettingsInput) SetApplicationId(v string) *GetApplicationSettingsInput { + s.ApplicationId = &v + return s +} + +type GetApplicationSettingsOutput struct { + _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` + + // Application settings. + // + // ApplicationSettingsResource is a required field + ApplicationSettingsResource *ApplicationSettingsResource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApplicationSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationSettingsOutput) GoString() string { + return s.String() +} + +// SetApplicationSettingsResource sets the ApplicationSettingsResource field's value. +func (s *GetApplicationSettingsOutput) SetApplicationSettingsResource(v *ApplicationSettingsResource) *GetApplicationSettingsOutput { + s.ApplicationSettingsResource = v + return s +} + +type GetAppsInput struct { + _ struct{} `type:"structure"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetAppsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppsInput) GoString() string { + return s.String() +} + +// SetPageSize sets the PageSize field's value. +func (s *GetAppsInput) SetPageSize(v string) *GetAppsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetAppsInput) SetToken(v string) *GetAppsInput { + s.Token = &v + return s +} + +type GetAppsOutput struct { + _ struct{} `type:"structure" payload:"ApplicationsResponse"` + + // Get Applications Result. + // + // ApplicationsResponse is a required field + ApplicationsResponse *ApplicationsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetAppsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppsOutput) GoString() string { + return s.String() +} + +// SetApplicationsResponse sets the ApplicationsResponse field's value. +func (s *GetAppsOutput) SetApplicationsResponse(v *ApplicationsResponse) *GetAppsOutput { + s.ApplicationsResponse = v + return s +} + +type GetBaiduChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBaiduChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBaiduChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBaiduChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBaiduChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetBaiduChannelInput) SetApplicationId(v string) *GetBaiduChannelInput { + s.ApplicationId = &v + return s +} + +type GetBaiduChannelOutput struct { + _ struct{} `type:"structure" payload:"BaiduChannelResponse"` + + // Baidu Cloud Messaging channel definition + // + // BaiduChannelResponse is a required field + BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetBaiduChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBaiduChannelOutput) GoString() string { + return s.String() +} + +// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. +func (s *GetBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *GetBaiduChannelOutput { + s.BaiduChannelResponse = v + return s +} + +type GetCampaignActivitiesInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetCampaignActivitiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignActivitiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignActivitiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignActivitiesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignActivitiesInput) SetApplicationId(v string) *GetCampaignActivitiesInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignActivitiesInput) SetCampaignId(v string) *GetCampaignActivitiesInput { + s.CampaignId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetCampaignActivitiesInput) SetPageSize(v string) *GetCampaignActivitiesInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetCampaignActivitiesInput) SetToken(v string) *GetCampaignActivitiesInput { + s.Token = &v + return s +} + +type GetCampaignActivitiesOutput struct { + _ struct{} `type:"structure" payload:"ActivitiesResponse"` + + // Activities for campaign. + // + // ActivitiesResponse is a required field + ActivitiesResponse *ActivitiesResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignActivitiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignActivitiesOutput) GoString() string { + return s.String() +} + +// SetActivitiesResponse sets the ActivitiesResponse field's value. +func (s *GetCampaignActivitiesOutput) SetActivitiesResponse(v *ActivitiesResponse) *GetCampaignActivitiesOutput { + s.ActivitiesResponse = v + return s +} + +type GetCampaignInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignInput) SetApplicationId(v string) *GetCampaignInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignInput) SetCampaignId(v string) *GetCampaignInput { + s.CampaignId = &v + return s +} + +type GetCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *GetCampaignOutput) SetCampaignResponse(v *CampaignResponse) *GetCampaignOutput { + s.CampaignResponse = v + return s +} + +type GetCampaignVersionInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + // Version is a required field + Version *string `location:"uri" locationName:"version" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCampaignVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignVersionInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignVersionInput) SetApplicationId(v string) *GetCampaignVersionInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignVersionInput) SetCampaignId(v string) *GetCampaignVersionInput { + s.CampaignId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetCampaignVersionInput) SetVersion(v string) *GetCampaignVersionInput { + s.Version = &v + return s +} + +type GetCampaignVersionOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *GetCampaignVersionOutput) SetCampaignResponse(v *CampaignResponse) *GetCampaignVersionOutput { + s.CampaignResponse = v + return s +} + +type GetCampaignVersionsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetCampaignVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignVersionsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignVersionsInput) SetApplicationId(v string) *GetCampaignVersionsInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignVersionsInput) SetCampaignId(v string) *GetCampaignVersionsInput { + s.CampaignId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetCampaignVersionsInput) SetPageSize(v string) *GetCampaignVersionsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetCampaignVersionsInput) SetToken(v string) *GetCampaignVersionsInput { + s.Token = &v + return s +} + +type GetCampaignVersionsOutput struct { + _ struct{} `type:"structure" payload:"CampaignsResponse"` + + // List of available campaigns. + // + // CampaignsResponse is a required field + CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionsOutput) GoString() string { + return s.String() +} + +// SetCampaignsResponse sets the CampaignsResponse field's value. +func (s *GetCampaignVersionsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignVersionsOutput { + s.CampaignsResponse = v + return s +} + +type GetCampaignsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetCampaignsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignsInput) SetApplicationId(v string) *GetCampaignsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetCampaignsInput) SetPageSize(v string) *GetCampaignsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetCampaignsInput) SetToken(v string) *GetCampaignsInput { + s.Token = &v + return s +} + +type GetCampaignsOutput struct { + _ struct{} `type:"structure" payload:"CampaignsResponse"` + + // List of available campaigns. + // + // CampaignsResponse is a required field + CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignsOutput) GoString() string { + return s.String() +} + +// SetCampaignsResponse sets the CampaignsResponse field's value. +func (s *GetCampaignsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignsOutput { + s.CampaignsResponse = v + return s +} + +type GetEmailChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetEmailChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEmailChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEmailChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEmailChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetEmailChannelInput) SetApplicationId(v string) *GetEmailChannelInput { + s.ApplicationId = &v + return s +} + +type GetEmailChannelOutput struct { + _ struct{} `type:"structure" payload:"EmailChannelResponse"` + + // Email Channel Response. + // + // EmailChannelResponse is a required field + EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetEmailChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEmailChannelOutput) GoString() string { + return s.String() +} + +// SetEmailChannelResponse sets the EmailChannelResponse field's value. +func (s *GetEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *GetEmailChannelOutput { + s.EmailChannelResponse = v + return s +} + +type GetEndpointInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // EndpointId is a required field + EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEndpointInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.EndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetEndpointInput) SetApplicationId(v string) *GetEndpointInput { + s.ApplicationId = &v + return s +} + +// SetEndpointId sets the EndpointId field's value. +func (s *GetEndpointInput) SetEndpointId(v string) *GetEndpointInput { + s.EndpointId = &v + return s +} + +type GetEndpointOutput struct { + _ struct{} `type:"structure" payload:"EndpointResponse"` + + // Endpoint response + // + // EndpointResponse is a required field + EndpointResponse *EndpointResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEndpointOutput) GoString() string { + return s.String() +} + +// SetEndpointResponse sets the EndpointResponse field's value. +func (s *GetEndpointOutput) SetEndpointResponse(v *EndpointResponse) *GetEndpointOutput { + s.EndpointResponse = v + return s +} + +type GetEventStreamInput struct { + _ struct{} `type:"structure"` + + // Application Id. + // + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetEventStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEventStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEventStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEventStreamInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetEventStreamInput) SetApplicationId(v string) *GetEventStreamInput { + s.ApplicationId = &v + return s +} + +type GetEventStreamOutput struct { + _ struct{} `type:"structure" payload:"EventStream"` + + // Model for an event publishing subscription export. + // + // EventStream is a required field + EventStream *EventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetEventStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEventStreamOutput) GoString() string { + return s.String() +} + +// SetEventStream sets the EventStream field's value. +func (s *GetEventStreamOutput) SetEventStream(v *EventStream) *GetEventStreamOutput { + s.EventStream = v + return s +} + +type GetExportJobInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // JobId is a required field + JobId *string `location:"uri" locationName:"job-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetExportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetExportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetExportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetExportJobInput) SetApplicationId(v string) *GetExportJobInput { + s.ApplicationId = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *GetExportJobInput) SetJobId(v string) *GetExportJobInput { + s.JobId = &v + return s +} + +type GetExportJobOutput struct { + _ struct{} `type:"structure" payload:"ExportJobResponse"` + + // ExportJobResponse is a required field + ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetExportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobOutput) GoString() string { + return s.String() +} + +// SetExportJobResponse sets the ExportJobResponse field's value. +func (s *GetExportJobOutput) SetExportJobResponse(v *ExportJobResponse) *GetExportJobOutput { + s.ExportJobResponse = v + return s +} + +type GetExportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetExportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetExportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetExportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetExportJobsInput) SetApplicationId(v string) *GetExportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetExportJobsInput) SetPageSize(v string) *GetExportJobsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetExportJobsInput) SetToken(v string) *GetExportJobsInput { + s.Token = &v + return s +} + +type GetExportJobsOutput struct { + _ struct{} `type:"structure" payload:"ExportJobsResponse"` + + // Export job list. + // + // ExportJobsResponse is a required field + ExportJobsResponse *ExportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetExportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobsOutput) GoString() string { + return s.String() +} + +// SetExportJobsResponse sets the ExportJobsResponse field's value. +func (s *GetExportJobsOutput) SetExportJobsResponse(v *ExportJobsResponse) *GetExportJobsOutput { + s.ExportJobsResponse = v + return s +} + +type GetGcmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGcmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGcmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGcmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGcmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetGcmChannelInput) SetApplicationId(v string) *GetGcmChannelInput { + s.ApplicationId = &v + return s +} + +type GetGcmChannelOutput struct { + _ struct{} `type:"structure" payload:"GCMChannelResponse"` + + // Google Cloud Messaging channel definition + // + // GCMChannelResponse is a required field + GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetGcmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGcmChannelOutput) GoString() string { + return s.String() +} + +// SetGCMChannelResponse sets the GCMChannelResponse field's value. +func (s *GetGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *GetGcmChannelOutput { + s.GCMChannelResponse = v + return s +} + +type GetImportJobInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // JobId is a required field + JobId *string `location:"uri" locationName:"job-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetImportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetImportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetImportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetImportJobInput) SetApplicationId(v string) *GetImportJobInput { + s.ApplicationId = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *GetImportJobInput) SetJobId(v string) *GetImportJobInput { + s.JobId = &v + return s +} + +type GetImportJobOutput struct { + _ struct{} `type:"structure" payload:"ImportJobResponse"` + + // ImportJobResponse is a required field + ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetImportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobOutput) GoString() string { + return s.String() +} + +// SetImportJobResponse sets the ImportJobResponse field's value. +func (s *GetImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *GetImportJobOutput { + s.ImportJobResponse = v + return s +} + +type GetImportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetImportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetImportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetImportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetImportJobsInput) SetApplicationId(v string) *GetImportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetImportJobsInput) SetPageSize(v string) *GetImportJobsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetImportJobsInput) SetToken(v string) *GetImportJobsInput { + s.Token = &v + return s +} + +type GetImportJobsOutput struct { + _ struct{} `type:"structure" payload:"ImportJobsResponse"` + + // Import job list. + // + // ImportJobsResponse is a required field + ImportJobsResponse *ImportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetImportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobsOutput) GoString() string { + return s.String() +} + +// SetImportJobsResponse sets the ImportJobsResponse field's value. +func (s *GetImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse) *GetImportJobsOutput { + s.ImportJobsResponse = v + return s +} + +type GetSegmentExportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentExportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentExportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentExportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentExportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentExportJobsInput) SetApplicationId(v string) *GetSegmentExportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentExportJobsInput) SetPageSize(v string) *GetSegmentExportJobsInput { + s.PageSize = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentExportJobsInput) SetSegmentId(v string) *GetSegmentExportJobsInput { + s.SegmentId = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentExportJobsInput) SetToken(v string) *GetSegmentExportJobsInput { + s.Token = &v + return s +} + +type GetSegmentExportJobsOutput struct { + _ struct{} `type:"structure" payload:"ExportJobsResponse"` + + // Export job list. + // + // ExportJobsResponse is a required field + ExportJobsResponse *ExportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentExportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentExportJobsOutput) GoString() string { + return s.String() +} + +// SetExportJobsResponse sets the ExportJobsResponse field's value. +func (s *GetSegmentExportJobsOutput) SetExportJobsResponse(v *ExportJobsResponse) *GetSegmentExportJobsOutput { + s.ExportJobsResponse = v + return s +} + +type GetSegmentImportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentImportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentImportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentImportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentImportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentImportJobsInput) SetApplicationId(v string) *GetSegmentImportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentImportJobsInput) SetPageSize(v string) *GetSegmentImportJobsInput { + s.PageSize = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentImportJobsInput) SetSegmentId(v string) *GetSegmentImportJobsInput { + s.SegmentId = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentImportJobsInput) SetToken(v string) *GetSegmentImportJobsInput { + s.Token = &v + return s +} + +type GetSegmentImportJobsOutput struct { + _ struct{} `type:"structure" payload:"ImportJobsResponse"` + + // Import job list. + // + // ImportJobsResponse is a required field + ImportJobsResponse *ImportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentImportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentImportJobsOutput) GoString() string { + return s.String() +} + +// SetImportJobsResponse sets the ImportJobsResponse field's value. +func (s *GetSegmentImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse) *GetSegmentImportJobsOutput { + s.ImportJobsResponse = v + return s +} + +type GetSegmentInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentInput) SetApplicationId(v string) *GetSegmentInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentInput) SetSegmentId(v string) *GetSegmentInput { + s.SegmentId = &v + return s +} + +type GetSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *GetSegmentOutput) SetSegmentResponse(v *SegmentResponse) *GetSegmentOutput { + s.SegmentResponse = v + return s +} + +type GetSegmentVersionInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + // Version is a required field + Version *string `location:"uri" locationName:"version" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSegmentVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentVersionInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentVersionInput) SetApplicationId(v string) *GetSegmentVersionInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentVersionInput) SetSegmentId(v string) *GetSegmentVersionInput { + s.SegmentId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetSegmentVersionInput) SetVersion(v string) *GetSegmentVersionInput { + s.Version = &v + return s +} + +type GetSegmentVersionOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *GetSegmentVersionOutput) SetSegmentResponse(v *SegmentResponse) *GetSegmentVersionOutput { + s.SegmentResponse = v + return s +} + +type GetSegmentVersionsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentVersionsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentVersionsInput) SetApplicationId(v string) *GetSegmentVersionsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentVersionsInput) SetPageSize(v string) *GetSegmentVersionsInput { + s.PageSize = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentVersionsInput) SetSegmentId(v string) *GetSegmentVersionsInput { + s.SegmentId = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentVersionsInput) SetToken(v string) *GetSegmentVersionsInput { + s.Token = &v + return s +} + +type GetSegmentVersionsOutput struct { + _ struct{} `type:"structure" payload:"SegmentsResponse"` + + // Segments in your account. + // + // SegmentsResponse is a required field + SegmentsResponse *SegmentsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionsOutput) GoString() string { + return s.String() +} + +// SetSegmentsResponse sets the SegmentsResponse field's value. +func (s *GetSegmentVersionsOutput) SetSegmentsResponse(v *SegmentsResponse) *GetSegmentVersionsOutput { + s.SegmentsResponse = v + return s +} + +type GetSegmentsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentsInput) SetApplicationId(v string) *GetSegmentsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentsInput) SetPageSize(v string) *GetSegmentsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentsInput) SetToken(v string) *GetSegmentsInput { + s.Token = &v + return s +} + +type GetSegmentsOutput struct { + _ struct{} `type:"structure" payload:"SegmentsResponse"` + + // Segments in your account. + // + // SegmentsResponse is a required field + SegmentsResponse *SegmentsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentsOutput) GoString() string { + return s.String() +} + +// SetSegmentsResponse sets the SegmentsResponse field's value. +func (s *GetSegmentsOutput) SetSegmentsResponse(v *SegmentsResponse) *GetSegmentsOutput { + s.SegmentsResponse = v + return s +} + +type GetSmsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSmsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSmsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSmsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSmsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSmsChannelInput) SetApplicationId(v string) *GetSmsChannelInput { + s.ApplicationId = &v + return s +} + +type GetSmsChannelOutput struct { + _ struct{} `type:"structure" payload:"SMSChannelResponse"` + + // SMS Channel Response. + // + // SMSChannelResponse is a required field + SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSmsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSmsChannelOutput) GoString() string { + return s.String() +} + +// SetSMSChannelResponse sets the SMSChannelResponse field's value. +func (s *GetSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *GetSmsChannelOutput { + s.SMSChannelResponse = v + return s +} + +type ImportJobRequest struct { + _ struct{} `type:"structure"` + + // Sets whether the endpoints create a segment when they are imported. + DefineSegment *bool `type:"boolean"` + + // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The format of the files that contain the endpoint definitions.Valid values: + // CSV, JSON + Format *string `type:"string" enum:"Format"` + + // Sets whether the endpoints are registered with Amazon Pinpoint when they + // are imported. + RegisterEndpoints *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that contains the endpoints to import. + RoleArn *string `type:"string"` + + // A URL that points to the location within an Amazon S3 bucket that contains + // the endpoints to import. The location can be a folder or a single file.The + // URL should follow this format: s3://bucket-name/folder-name/file-nameAmazon + // Pinpoint will import endpoints from this location and any subfolders it contains. + S3Url *string `type:"string"` + + // The ID of the segment to update if the import job is meant to update an existing + // segment. + SegmentId *string `type:"string"` + + // A custom name for the segment created by the import job. Use if DefineSegment + // is true. + SegmentName *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobRequest) GoString() string { + return s.String() +} + +// SetDefineSegment sets the DefineSegment field's value. +func (s *ImportJobRequest) SetDefineSegment(v bool) *ImportJobRequest { + s.DefineSegment = &v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *ImportJobRequest) SetExternalId(v string) *ImportJobRequest { + s.ExternalId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *ImportJobRequest) SetFormat(v string) *ImportJobRequest { + s.Format = &v + return s +} + +// SetRegisterEndpoints sets the RegisterEndpoints field's value. +func (s *ImportJobRequest) SetRegisterEndpoints(v bool) *ImportJobRequest { + s.RegisterEndpoints = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ImportJobRequest) SetRoleArn(v string) *ImportJobRequest { + s.RoleArn = &v + return s +} + +// SetS3Url sets the S3Url field's value. +func (s *ImportJobRequest) SetS3Url(v string) *ImportJobRequest { + s.S3Url = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ImportJobRequest) SetSegmentId(v string) *ImportJobRequest { + s.SegmentId = &v + return s +} + +// SetSegmentName sets the SegmentName field's value. +func (s *ImportJobRequest) SetSegmentName(v string) *ImportJobRequest { + s.SegmentName = &v + return s +} + +type ImportJobResource struct { + _ struct{} `type:"structure"` + + // Sets whether the endpoints create a segment when they are imported. + DefineSegment *bool `type:"boolean"` + + // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The format of the files that contain the endpoint definitions.Valid values: + // CSV, JSON + Format *string `type:"string" enum:"Format"` + + // Sets whether the endpoints are registered with Amazon Pinpoint when they + // are imported. + RegisterEndpoints *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that contains the endpoints to import. + RoleArn *string `type:"string"` + + // A URL that points to the location within an Amazon S3 bucket that contains + // the endpoints to import. The location can be a folder or a single file.The + // URL should follow this format: s3://bucket-name/folder-name/file-nameAmazon + // Pinpoint will import endpoints from this location and any subfolders it contains. + S3Url *string `type:"string"` + + // The ID of the segment to update if the import job is meant to update an existing + // segment. + SegmentId *string `type:"string"` + + // A custom name for the segment created by the import job. Use if DefineSegment + // is true. + SegmentName *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobResource) GoString() string { + return s.String() +} + +// SetDefineSegment sets the DefineSegment field's value. +func (s *ImportJobResource) SetDefineSegment(v bool) *ImportJobResource { + s.DefineSegment = &v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *ImportJobResource) SetExternalId(v string) *ImportJobResource { + s.ExternalId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *ImportJobResource) SetFormat(v string) *ImportJobResource { + s.Format = &v + return s +} + +// SetRegisterEndpoints sets the RegisterEndpoints field's value. +func (s *ImportJobResource) SetRegisterEndpoints(v bool) *ImportJobResource { + s.RegisterEndpoints = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ImportJobResource) SetRoleArn(v string) *ImportJobResource { + s.RoleArn = &v + return s +} + +// SetS3Url sets the S3Url field's value. +func (s *ImportJobResource) SetS3Url(v string) *ImportJobResource { + s.S3Url = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ImportJobResource) SetSegmentId(v string) *ImportJobResource { + s.SegmentId = &v + return s +} + +// SetSegmentName sets the SegmentName field's value. +func (s *ImportJobResource) SetSegmentName(v string) *ImportJobResource { + s.SegmentName = &v + return s +} + +type ImportJobResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application to which the import job applies. + ApplicationId *string `type:"string"` + + // The number of pieces that have successfully imported as of the time of the + // request. + CompletedPieces *int64 `type:"integer"` + + // The date the import job completed in ISO 8601 format. + CompletionDate *string `type:"string"` + + // The date the import job was created in ISO 8601 format. + CreationDate *string `type:"string"` + + // The import job settings. + Definition *ImportJobResource `type:"structure"` + + // The number of pieces that have failed to import as of the time of the request. + FailedPieces *int64 `type:"integer"` + + Failures []*string `type:"list"` + + // The unique ID of the import job. + Id *string `type:"string"` + + // The status of the import job.Valid values: CREATED, INITIALIZING, PROCESSING, + // COMPLETING, COMPLETED, FAILING, FAILEDThe job status is FAILED if one or + // more pieces failed to import. + JobStatus *string `type:"string" enum:"JobStatus"` + + // The number of endpoints that failed to import; for example, because of syntax + // errors. + TotalFailures *int64 `type:"integer"` + + // The total number of pieces that must be imported to finish the job. Each + // piece is an approximately equal portion of the endpoints to import. + TotalPieces *int64 `type:"integer"` + + // The number of endpoints that were processed by the import job. + TotalProcessed *int64 `type:"integer"` + + // The job type. Will be Import. + Type *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ImportJobResponse) SetApplicationId(v string) *ImportJobResponse { + s.ApplicationId = &v + return s +} + +// SetCompletedPieces sets the CompletedPieces field's value. +func (s *ImportJobResponse) SetCompletedPieces(v int64) *ImportJobResponse { + s.CompletedPieces = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *ImportJobResponse) SetCompletionDate(v string) *ImportJobResponse { + s.CompletionDate = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ImportJobResponse) SetCreationDate(v string) *ImportJobResponse { + s.CreationDate = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *ImportJobResponse) SetDefinition(v *ImportJobResource) *ImportJobResponse { + s.Definition = v + return s +} + +// SetFailedPieces sets the FailedPieces field's value. +func (s *ImportJobResponse) SetFailedPieces(v int64) *ImportJobResponse { + s.FailedPieces = &v + return s +} + +// SetFailures sets the Failures field's value. +func (s *ImportJobResponse) SetFailures(v []*string) *ImportJobResponse { + s.Failures = v + return s +} + +// SetId sets the Id field's value. +func (s *ImportJobResponse) SetId(v string) *ImportJobResponse { + s.Id = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *ImportJobResponse) SetJobStatus(v string) *ImportJobResponse { + s.JobStatus = &v + return s +} + +// SetTotalFailures sets the TotalFailures field's value. +func (s *ImportJobResponse) SetTotalFailures(v int64) *ImportJobResponse { + s.TotalFailures = &v + return s +} + +// SetTotalPieces sets the TotalPieces field's value. +func (s *ImportJobResponse) SetTotalPieces(v int64) *ImportJobResponse { + s.TotalPieces = &v + return s +} + +// SetTotalProcessed sets the TotalProcessed field's value. +func (s *ImportJobResponse) SetTotalProcessed(v int64) *ImportJobResponse { + s.TotalProcessed = &v + return s +} + +// SetType sets the Type field's value. +func (s *ImportJobResponse) SetType(v string) *ImportJobResponse { + s.Type = &v + return s +} + +// Import job list. +type ImportJobsResponse struct { + _ struct{} `type:"structure"` + + // A list of import jobs for the application. + Item []*ImportJobResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ImportJobsResponse) SetItem(v []*ImportJobResponse) *ImportJobsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { + s.NextToken = &v + return s +} + +type Message struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign:OPEN_APP - Your app launches, or it becomes the foreground app + // if it has been sent to the background. This is the default action.DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app.URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + Action *string `type:"string" enum:"Action"` + + // The message body. Can include up to 140 characters. + Body *string `type:"string"` + + // The URL that points to the icon image for the push notification icon, for + // example, the app icon. + ImageIconUrl *string `type:"string"` + + // The URL that points to the small icon image for the push notification icon, + // for example, the app icon. + ImageSmallIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // The JSON payload used for a silent push. + JsonBody *string `type:"string"` + + // The URL that points to the media resource, for example a .mp4 or .gif file. + MediaUrl *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device.Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s Message) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Message) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *Message) SetAction(v string) *Message { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *Message) SetBody(v string) *Message { + s.Body = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *Message) SetImageIconUrl(v string) *Message { + s.ImageIconUrl = &v + return s +} + +// SetImageSmallIconUrl sets the ImageSmallIconUrl field's value. +func (s *Message) SetImageSmallIconUrl(v string) *Message { + s.ImageSmallIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *Message) SetImageUrl(v string) *Message { + s.ImageUrl = &v + return s +} + +// SetJsonBody sets the JsonBody field's value. +func (s *Message) SetJsonBody(v string) *Message { + s.JsonBody = &v + return s +} + +// SetMediaUrl sets the MediaUrl field's value. +func (s *Message) SetMediaUrl(v string) *Message { + s.MediaUrl = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *Message) SetRawContent(v string) *Message { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *Message) SetSilentPush(v bool) *Message { + s.SilentPush = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *Message) SetTitle(v string) *Message { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *Message) SetUrl(v string) *Message { + s.Url = &v + return s +} + +// Simple message object. +type MessageBody struct { + _ struct{} `type:"structure"` + + // The error message returned from the API. + Message *string `type:"string"` + + // The unique message body ID. + RequestID *string `type:"string"` +} + +// String returns the string representation +func (s MessageBody) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageBody) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *MessageBody) SetMessage(v string) *MessageBody { + s.Message = &v + return s +} + +// SetRequestID sets the RequestID field's value. +func (s *MessageBody) SetRequestID(v string) *MessageBody { + s.RequestID = &v + return s +} + +// Message configuration for a campaign. +type MessageConfiguration struct { + _ struct{} `type:"structure"` + + // The message that the campaign delivers to ADM channels. Overrides the default + // message. + ADMMessage *Message `type:"structure"` + + // The message that the campaign delivers to APNS channels. Overrides the default + // message. + APNSMessage *Message `type:"structure"` + + // The message that the campaign delivers to Baidu channels. Overrides the default + // message. + BaiduMessage *Message `type:"structure"` + + // The default message for all channels. + DefaultMessage *Message `type:"structure"` + + // The email message configuration. + EmailMessage *CampaignEmailMessage `type:"structure"` + + // The message that the campaign delivers to GCM channels. Overrides the default + // message. + GCMMessage *Message `type:"structure"` + + // The SMS message configuration. + SMSMessage *CampaignSmsMessage `type:"structure"` +} + +// String returns the string representation +func (s MessageConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageConfiguration) GoString() string { + return s.String() +} + +// SetADMMessage sets the ADMMessage field's value. +func (s *MessageConfiguration) SetADMMessage(v *Message) *MessageConfiguration { + s.ADMMessage = v + return s +} + +// SetAPNSMessage sets the APNSMessage field's value. +func (s *MessageConfiguration) SetAPNSMessage(v *Message) *MessageConfiguration { + s.APNSMessage = v + return s +} + +// SetBaiduMessage sets the BaiduMessage field's value. +func (s *MessageConfiguration) SetBaiduMessage(v *Message) *MessageConfiguration { + s.BaiduMessage = v + return s +} + +// SetDefaultMessage sets the DefaultMessage field's value. +func (s *MessageConfiguration) SetDefaultMessage(v *Message) *MessageConfiguration { + s.DefaultMessage = v + return s +} + +// SetEmailMessage sets the EmailMessage field's value. +func (s *MessageConfiguration) SetEmailMessage(v *CampaignEmailMessage) *MessageConfiguration { + s.EmailMessage = v + return s +} + +// SetGCMMessage sets the GCMMessage field's value. +func (s *MessageConfiguration) SetGCMMessage(v *Message) *MessageConfiguration { + s.GCMMessage = v + return s +} + +// SetSMSMessage sets the SMSMessage field's value. +func (s *MessageConfiguration) SetSMSMessage(v *CampaignSmsMessage) *MessageConfiguration { + s.SMSMessage = v + return s +} + +// Send message request. +type MessageRequest struct { + _ struct{} `type:"structure"` + + // A map of destination addresses, with the address as the key(Email address, + // phone number or push token) and the Address Configuration as the value. + Addresses map[string]*AddressConfiguration `type:"map"` + + // A map of custom attributes to attributes to be attached to the message. This + // payload is added to the push notification's 'data.pinpoint' object or added + // to the email/sms delivery receipt event attributes. + Context map[string]*string `type:"map"` + + // A map of destination addresses, with the address as the key(Email address, + // phone number or push token) and the Address Configuration as the value. + Endpoints map[string]*EndpointSendConfiguration `type:"map"` + + // Message configuration. + MessageConfiguration *DirectMessageConfiguration `type:"structure"` +} + +// String returns the string representation +func (s MessageRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageRequest) GoString() string { + return s.String() +} + +// SetAddresses sets the Addresses field's value. +func (s *MessageRequest) SetAddresses(v map[string]*AddressConfiguration) *MessageRequest { + s.Addresses = v + return s +} + +// SetContext sets the Context field's value. +func (s *MessageRequest) SetContext(v map[string]*string) *MessageRequest { + s.Context = v + return s +} + +// SetEndpoints sets the Endpoints field's value. +func (s *MessageRequest) SetEndpoints(v map[string]*EndpointSendConfiguration) *MessageRequest { + s.Endpoints = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *MessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) *MessageRequest { + s.MessageConfiguration = v + return s +} + +// Send message response. +type MessageResponse struct { + _ struct{} `type:"structure"` + + // Application id of the message. + ApplicationId *string `type:"string"` + + // A map containing a multi part response for each address, with the endpointId + // as the key and the result as the value. + EndpointResult map[string]*EndpointMessageResult `type:"map"` + + // Original request Id for which this message was delivered. + RequestId *string `type:"string"` + + // A map containing a multi part response for each address, with the address + // as the key(Email address, phone number or push token) and the result as the + // value. + Result map[string]*MessageResult `type:"map"` +} + +// String returns the string representation +func (s MessageResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *MessageResponse) SetApplicationId(v string) *MessageResponse { + s.ApplicationId = &v + return s +} + +// SetEndpointResult sets the EndpointResult field's value. +func (s *MessageResponse) SetEndpointResult(v map[string]*EndpointMessageResult) *MessageResponse { + s.EndpointResult = v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *MessageResponse) SetRequestId(v string) *MessageResponse { + s.RequestId = &v + return s +} + +// SetResult sets the Result field's value. +func (s *MessageResponse) SetResult(v map[string]*MessageResult) *MessageResponse { + s.Result = v + return s +} + +// The result from sending a message to an address. +type MessageResult struct { + _ struct{} `type:"structure"` + + // Delivery status of message. + DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` + + // Downstream service status code. + StatusCode *int64 `type:"integer"` + + // Status message for message delivery. + StatusMessage *string `type:"string"` + + // If token was updated as part of delivery. (This is GCM Specific) + UpdatedToken *string `type:"string"` +} + +// String returns the string representation +func (s MessageResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageResult) GoString() string { + return s.String() +} + +// SetDeliveryStatus sets the DeliveryStatus field's value. +func (s *MessageResult) SetDeliveryStatus(v string) *MessageResult { + s.DeliveryStatus = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *MessageResult) SetStatusCode(v int64) *MessageResult { + s.StatusCode = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *MessageResult) SetStatusMessage(v string) *MessageResult { + s.StatusMessage = &v + return s +} + +// SetUpdatedToken sets the UpdatedToken field's value. +func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { + s.UpdatedToken = &v + return s +} + +type PutEventStreamInput struct { + _ struct{} `type:"structure" payload:"WriteEventStream"` + + // Application Id. + // + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Write event stream wrapper. + // + // WriteEventStream is a required field + WriteEventStream *WriteEventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventStreamInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.WriteEventStream == nil { + invalidParams.Add(request.NewErrParamRequired("WriteEventStream")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *PutEventStreamInput) SetApplicationId(v string) *PutEventStreamInput { + s.ApplicationId = &v + return s +} + +// SetWriteEventStream sets the WriteEventStream field's value. +func (s *PutEventStreamInput) SetWriteEventStream(v *WriteEventStream) *PutEventStreamInput { + s.WriteEventStream = v + return s +} + +type PutEventStreamOutput struct { + _ struct{} `type:"structure" payload:"EventStream"` + + // Model for an event publishing subscription export. + // + // EventStream is a required field + EventStream *EventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventStreamOutput) GoString() string { + return s.String() +} + +// SetEventStream sets the EventStream field's value. +func (s *PutEventStreamOutput) SetEventStream(v *EventStream) *PutEventStreamOutput { + s.EventStream = v + return s +} + +// Quiet Time +type QuietTime struct { + _ struct{} `type:"structure"` + + // The default end time for quiet time in ISO 8601 format. + End *string `type:"string"` + + // The default start time for quiet time in ISO 8601 format. + Start *string `type:"string"` +} + +// String returns the string representation +func (s QuietTime) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QuietTime) GoString() string { + return s.String() +} + +// SetEnd sets the End field's value. +func (s *QuietTime) SetEnd(v string) *QuietTime { + s.End = &v + return s +} + +// SetStart sets the Start field's value. +func (s *QuietTime) SetStart(v string) *QuietTime { + s.Start = &v + return s +} + +// Define how a segment based on recency of use. +type RecencyDimension struct { + _ struct{} `type:"structure"` + + // The length of time during which users have been active or inactive with your + // app.Valid values: HR_24, DAY_7, DAY_14, DAY_30 + Duration *string `type:"string" enum:"Duration"` + + // The recency dimension type:ACTIVE - Users who have used your app within the + // specified duration are included in the segment.INACTIVE - Users who have + // not used your app within the specified duration are included in the segment. + RecencyType *string `type:"string" enum:"RecencyType"` +} + +// String returns the string representation +func (s RecencyDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecencyDimension) GoString() string { + return s.String() +} + +// SetDuration sets the Duration field's value. +func (s *RecencyDimension) SetDuration(v string) *RecencyDimension { + s.Duration = &v + return s +} + +// SetRecencyType sets the RecencyType field's value. +func (s *RecencyDimension) SetRecencyType(v string) *RecencyDimension { + s.RecencyType = &v + return s +} + +// SMS Channel Request +type SMSChannelRequest struct { + _ struct{} `type:"structure"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Sender identifier of your messages. + SenderId *string `type:"string"` + + // ShortCode registered with phone provider. + ShortCode *string `type:"string"` +} + +// String returns the string representation +func (s SMSChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMSChannelRequest) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *SMSChannelRequest) SetEnabled(v bool) *SMSChannelRequest { + s.Enabled = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *SMSChannelRequest) SetSenderId(v string) *SMSChannelRequest { + s.SenderId = &v + return s +} + +// SetShortCode sets the ShortCode field's value. +func (s *SMSChannelRequest) SetShortCode(v string) *SMSChannelRequest { + s.ShortCode = &v + return s +} + +// SMS Channel Response. +type SMSChannelResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application to which the SMS channel belongs. + ApplicationId *string `type:"string"` + + // The date that the settings were last updated in ISO 8601 format. + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // If the channel is registered with a credential for authentication. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Platform type. Will be "SMS" + Platform *string `type:"string"` + + // Sender identifier of your messages. + SenderId *string `type:"string"` + + // The short code registered with the phone provider. + ShortCode *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s SMSChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMSChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SMSChannelResponse) SetApplicationId(v string) *SMSChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *SMSChannelResponse) SetCreationDate(v string) *SMSChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *SMSChannelResponse) SetEnabled(v bool) *SMSChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *SMSChannelResponse) SetHasCredential(v bool) *SMSChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *SMSChannelResponse) SetId(v string) *SMSChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *SMSChannelResponse) SetIsArchived(v bool) *SMSChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *SMSChannelResponse) SetLastModifiedBy(v string) *SMSChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *SMSChannelResponse) SetLastModifiedDate(v string) *SMSChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *SMSChannelResponse) SetPlatform(v string) *SMSChannelResponse { + s.Platform = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *SMSChannelResponse) SetSenderId(v string) *SMSChannelResponse { + s.SenderId = &v + return s +} + +// SetShortCode sets the ShortCode field's value. +func (s *SMSChannelResponse) SetShortCode(v string) *SMSChannelResponse { + s.ShortCode = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *SMSChannelResponse) SetVersion(v int64) *SMSChannelResponse { + s.Version = &v + return s +} + +// SMS Message. +type SMSMessage struct { + _ struct{} `type:"structure"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // Is this a transaction priority message or lower priority. + MessageType *string `type:"string" enum:"MessageType"` + + // The phone number that the SMS message originates from. Specify one of the + // dedicated long codes or short codes that you requested from AWS Support and + // that is assigned to your account. If this attribute is not specified, Amazon + // Pinpoint randomly assigns a long code. + OriginationNumber *string `type:"string"` + + // The sender ID that is shown as the message sender on the recipient's device. + // Support for sender IDs varies by country or region. + SenderId *string `type:"string"` + + Substitutions map[string][]*string `type:"map"` +} + +// String returns the string representation +func (s SMSMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMSMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *SMSMessage) SetBody(v string) *SMSMessage { + s.Body = &v + return s +} + +// SetMessageType sets the MessageType field's value. +func (s *SMSMessage) SetMessageType(v string) *SMSMessage { + s.MessageType = &v + return s +} + +// SetOriginationNumber sets the OriginationNumber field's value. +func (s *SMSMessage) SetOriginationNumber(v string) *SMSMessage { + s.OriginationNumber = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *SMSMessage) SetSenderId(v string) *SMSMessage { + s.SenderId = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *SMSMessage) SetSubstitutions(v map[string][]*string) *SMSMessage { + s.Substitutions = v + return s +} + +// Shcedule that defines when a campaign is run. +type Schedule struct { + _ struct{} `type:"structure"` + + // The scheduled time that the campaign ends in ISO 8601 format. + EndTime *string `type:"string"` + + // How often the campaign delivers messages.Valid values: ONCE, HOURLY, DAILY, + // WEEKLY, MONTHLY + Frequency *string `type:"string" enum:"Frequency"` + + // Indicates whether the campaign schedule takes effect according to each user's + // local time. + IsLocalTime *bool `type:"boolean"` + + // The time during which the campaign sends no messages. + QuietTime *QuietTime `type:"structure"` + + // The scheduled time that the campaign begins in ISO 8601 format. + StartTime *string `type:"string"` + + // The starting UTC offset for the schedule if the value for isLocalTime is + // trueValid values: UTCUTC+01UTC+02UTC+03UTC+03:30UTC+04UTC+04:30UTC+05UTC+05:30UTC+05:45UTC+06UTC+06:30UTC+07UTC+08UTC+09UTC+09:30UTC+10UTC+10:30UTC+11UTC+12UTC+13UTC-02UTC-03UTC-04UTC-05UTC-06UTC-07UTC-08UTC-09UTC-10UTC-11 + Timezone *string `type:"string"` +} + +// String returns the string representation +func (s Schedule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Schedule) GoString() string { + return s.String() +} + +// SetEndTime sets the EndTime field's value. +func (s *Schedule) SetEndTime(v string) *Schedule { + s.EndTime = &v + return s +} + +// SetFrequency sets the Frequency field's value. +func (s *Schedule) SetFrequency(v string) *Schedule { + s.Frequency = &v + return s +} + +// SetIsLocalTime sets the IsLocalTime field's value. +func (s *Schedule) SetIsLocalTime(v bool) *Schedule { + s.IsLocalTime = &v + return s +} + +// SetQuietTime sets the QuietTime field's value. +func (s *Schedule) SetQuietTime(v *QuietTime) *Schedule { + s.QuietTime = v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *Schedule) SetStartTime(v string) *Schedule { + s.StartTime = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *Schedule) SetTimezone(v string) *Schedule { + s.Timezone = &v + return s +} + +// Segment behavior dimensions +type SegmentBehaviors struct { + _ struct{} `type:"structure"` + + // The recency of use. + Recency *RecencyDimension `type:"structure"` +} + +// String returns the string representation +func (s SegmentBehaviors) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentBehaviors) GoString() string { + return s.String() +} + +// SetRecency sets the Recency field's value. +func (s *SegmentBehaviors) SetRecency(v *RecencyDimension) *SegmentBehaviors { + s.Recency = v + return s +} + +// Segment demographic dimensions +type SegmentDemographics struct { + _ struct{} `type:"structure"` + + // The app version criteria for the segment. + AppVersion *SetDimension `type:"structure"` + + // The channel criteria for the segment. + Channel *SetDimension `type:"structure"` + + // The device type criteria for the segment. + DeviceType *SetDimension `type:"structure"` + + // The device make criteria for the segment. + Make *SetDimension `type:"structure"` + + // The device model criteria for the segment. + Model *SetDimension `type:"structure"` + + // The device platform criteria for the segment. + Platform *SetDimension `type:"structure"` +} + +// String returns the string representation +func (s SegmentDemographics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentDemographics) GoString() string { + return s.String() +} + +// SetAppVersion sets the AppVersion field's value. +func (s *SegmentDemographics) SetAppVersion(v *SetDimension) *SegmentDemographics { + s.AppVersion = v + return s +} + +// SetChannel sets the Channel field's value. +func (s *SegmentDemographics) SetChannel(v *SetDimension) *SegmentDemographics { + s.Channel = v + return s +} + +// SetDeviceType sets the DeviceType field's value. +func (s *SegmentDemographics) SetDeviceType(v *SetDimension) *SegmentDemographics { + s.DeviceType = v + return s +} + +// SetMake sets the Make field's value. +func (s *SegmentDemographics) SetMake(v *SetDimension) *SegmentDemographics { + s.Make = v + return s +} + +// SetModel sets the Model field's value. +func (s *SegmentDemographics) SetModel(v *SetDimension) *SegmentDemographics { + s.Model = v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *SegmentDemographics) SetPlatform(v *SetDimension) *SegmentDemographics { + s.Platform = v + return s +} + +// Segment dimensions +type SegmentDimensions struct { + _ struct{} `type:"structure"` + + // Custom segment attributes. + Attributes map[string]*AttributeDimension `type:"map"` + + // The segment behaviors attributes. + Behavior *SegmentBehaviors `type:"structure"` + + // The segment demographics attributes. + Demographic *SegmentDemographics `type:"structure"` + + // The segment location attributes. + Location *SegmentLocation `type:"structure"` + + // Custom segment user attributes. + UserAttributes map[string]*AttributeDimension `type:"map"` +} + +// String returns the string representation +func (s SegmentDimensions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentDimensions) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *SegmentDimensions) SetAttributes(v map[string]*AttributeDimension) *SegmentDimensions { + s.Attributes = v + return s +} + +// SetBehavior sets the Behavior field's value. +func (s *SegmentDimensions) SetBehavior(v *SegmentBehaviors) *SegmentDimensions { + s.Behavior = v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *SegmentDimensions) SetDemographic(v *SegmentDemographics) *SegmentDimensions { + s.Demographic = v + return s +} + +// SetLocation sets the Location field's value. +func (s *SegmentDimensions) SetLocation(v *SegmentLocation) *SegmentDimensions { + s.Location = v + return s +} + +// SetUserAttributes sets the UserAttributes field's value. +func (s *SegmentDimensions) SetUserAttributes(v map[string]*AttributeDimension) *SegmentDimensions { + s.UserAttributes = v + return s +} + +// Segment import definition. +type SegmentImportResource struct { + _ struct{} `type:"structure"` + + // Channel type counts + ChannelCounts map[string]*int64 `type:"map"` + + // DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The format of the endpoint files that were imported to create this segment.Valid + // values: CSV, JSON + Format *string `type:"string" enum:"Format"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the endpoints in Amazon S3. + RoleArn *string `type:"string"` + + // A URL that points to the Amazon S3 location from which the endpoints for + // this segment were imported. + S3Url *string `type:"string"` + + // The number of endpoints that were successfully imported to create this segment. + Size *int64 `type:"integer"` +} + +// String returns the string representation +func (s SegmentImportResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentImportResource) GoString() string { + return s.String() +} + +// SetChannelCounts sets the ChannelCounts field's value. +func (s *SegmentImportResource) SetChannelCounts(v map[string]*int64) *SegmentImportResource { + s.ChannelCounts = v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *SegmentImportResource) SetExternalId(v string) *SegmentImportResource { + s.ExternalId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *SegmentImportResource) SetFormat(v string) *SegmentImportResource { + s.Format = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *SegmentImportResource) SetRoleArn(v string) *SegmentImportResource { + s.RoleArn = &v + return s +} + +// SetS3Url sets the S3Url field's value. +func (s *SegmentImportResource) SetS3Url(v string) *SegmentImportResource { + s.S3Url = &v + return s +} + +// SetSize sets the Size field's value. +func (s *SegmentImportResource) SetSize(v int64) *SegmentImportResource { + s.Size = &v + return s +} + +// Segment location dimensions +type SegmentLocation struct { + _ struct{} `type:"structure"` + + // The country filter according to ISO 3166-1 Alpha-2 codes. + Country *SetDimension `type:"structure"` +} + +// String returns the string representation +func (s SegmentLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentLocation) GoString() string { + return s.String() +} + +// SetCountry sets the Country field's value. +func (s *SegmentLocation) SetCountry(v *SetDimension) *SegmentLocation { + s.Country = v + return s +} + +// Segment definition. +type SegmentResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the segment applies. + ApplicationId *string `type:"string"` + + // The date the segment was created in ISO 8601 format. + CreationDate *string `type:"string"` + + // The segment dimensions attributes. + Dimensions *SegmentDimensions `type:"structure"` + + // The unique segment ID. + Id *string `type:"string"` + + // The import job settings. + ImportDefinition *SegmentImportResource `type:"structure"` + + // The date the segment was last updated in ISO 8601 format. + LastModifiedDate *string `type:"string"` + + // The name of segment + Name *string `type:"string"` + + // The segment type:DIMENSIONAL - A dynamic segment built from selection criteria + // based on endpoint data reported by your app. You create this type of segment + // by using the segment builder in the Amazon Pinpoint console or by making + // a POST request to the segments resource.IMPORT - A static segment built from + // an imported set of endpoint definitions. You create this type of segment + // by importing a segment in the Amazon Pinpoint console or by making a POST + // request to the jobs/import resource. + SegmentType *string `type:"string" enum:"SegmentType"` + + // The segment version number. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s SegmentResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SegmentResponse) SetApplicationId(v string) *SegmentResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *SegmentResponse) SetCreationDate(v string) *SegmentResponse { + s.CreationDate = &v + return s +} + +// SetDimensions sets the Dimensions field's value. +func (s *SegmentResponse) SetDimensions(v *SegmentDimensions) *SegmentResponse { + s.Dimensions = v + return s +} + +// SetId sets the Id field's value. +func (s *SegmentResponse) SetId(v string) *SegmentResponse { + s.Id = &v + return s +} + +// SetImportDefinition sets the ImportDefinition field's value. +func (s *SegmentResponse) SetImportDefinition(v *SegmentImportResource) *SegmentResponse { + s.ImportDefinition = v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *SegmentResponse) SetLastModifiedDate(v string) *SegmentResponse { + s.LastModifiedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *SegmentResponse) SetName(v string) *SegmentResponse { + s.Name = &v + return s +} + +// SetSegmentType sets the SegmentType field's value. +func (s *SegmentResponse) SetSegmentType(v string) *SegmentResponse { + s.SegmentType = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *SegmentResponse) SetVersion(v int64) *SegmentResponse { + s.Version = &v + return s +} + +// Segments in your account. +type SegmentsResponse struct { + _ struct{} `type:"structure"` + + // The list of segments. + Item []*SegmentResponse `type:"list"` + + // An identifier used to retrieve the next page of results. The token is null + // if no additional pages exist. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s SegmentsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *SegmentsResponse) SetItem(v []*SegmentResponse) *SegmentsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *SegmentsResponse) SetNextToken(v string) *SegmentsResponse { + s.NextToken = &v + return s +} + +type SendMessagesInput struct { + _ struct{} `type:"structure" payload:"MessageRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Send message request. + // + // MessageRequest is a required field + MessageRequest *MessageRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendMessagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendMessagesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendMessagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendMessagesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.MessageRequest == nil { + invalidParams.Add(request.NewErrParamRequired("MessageRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SendMessagesInput) SetApplicationId(v string) *SendMessagesInput { + s.ApplicationId = &v + return s +} + +// SetMessageRequest sets the MessageRequest field's value. +func (s *SendMessagesInput) SetMessageRequest(v *MessageRequest) *SendMessagesInput { + s.MessageRequest = v + return s +} + +type SendMessagesOutput struct { + _ struct{} `type:"structure" payload:"MessageResponse"` + + // Send message response. + // + // MessageResponse is a required field + MessageResponse *MessageResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendMessagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendMessagesOutput) GoString() string { + return s.String() +} + +// SetMessageResponse sets the MessageResponse field's value. +func (s *SendMessagesOutput) SetMessageResponse(v *MessageResponse) *SendMessagesOutput { + s.MessageResponse = v + return s +} + +// Send message request. +type SendUsersMessageRequest struct { + _ struct{} `type:"structure"` + + // A map of custom attributes to attributes to be attached to the message. This + // payload is added to the push notification's 'data.pinpoint' object or added + // to the email/sms delivery receipt event attributes. + Context map[string]*string `type:"map"` + + // Message configuration. + MessageConfiguration *DirectMessageConfiguration `type:"structure"` + + // A map of destination endpoints, with the EndpointId as the key Endpoint Message + // Configuration as the value. + Users map[string]*EndpointSendConfiguration `type:"map"` +} + +// String returns the string representation +func (s SendUsersMessageRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessageRequest) GoString() string { + return s.String() +} + +// SetContext sets the Context field's value. +func (s *SendUsersMessageRequest) SetContext(v map[string]*string) *SendUsersMessageRequest { + s.Context = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *SendUsersMessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) *SendUsersMessageRequest { + s.MessageConfiguration = v + return s +} + +// SetUsers sets the Users field's value. +func (s *SendUsersMessageRequest) SetUsers(v map[string]*EndpointSendConfiguration) *SendUsersMessageRequest { + s.Users = v + return s +} + +// User send message response. +type SendUsersMessageResponse struct { + _ struct{} `type:"structure"` + + // Application id of the message. + ApplicationId *string `type:"string"` + + // Original request Id for which this message was delivered. + RequestId *string `type:"string"` + + // A map containing of UserId to Map of EndpointId to Endpoint Message Result. + Result map[string]map[string]*EndpointMessageResult `type:"map"` +} + +// String returns the string representation +func (s SendUsersMessageResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessageResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SendUsersMessageResponse) SetApplicationId(v string) *SendUsersMessageResponse { + s.ApplicationId = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *SendUsersMessageResponse) SetRequestId(v string) *SendUsersMessageResponse { + s.RequestId = &v + return s +} + +// SetResult sets the Result field's value. +func (s *SendUsersMessageResponse) SetResult(v map[string]map[string]*EndpointMessageResult) *SendUsersMessageResponse { + s.Result = v + return s +} + +type SendUsersMessagesInput struct { + _ struct{} `type:"structure" payload:"SendUsersMessageRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Send message request. + // + // SendUsersMessageRequest is a required field + SendUsersMessageRequest *SendUsersMessageRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendUsersMessagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessagesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendUsersMessagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendUsersMessagesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SendUsersMessageRequest == nil { + invalidParams.Add(request.NewErrParamRequired("SendUsersMessageRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SendUsersMessagesInput) SetApplicationId(v string) *SendUsersMessagesInput { + s.ApplicationId = &v + return s +} + +// SetSendUsersMessageRequest sets the SendUsersMessageRequest field's value. +func (s *SendUsersMessagesInput) SetSendUsersMessageRequest(v *SendUsersMessageRequest) *SendUsersMessagesInput { + s.SendUsersMessageRequest = v + return s +} + +type SendUsersMessagesOutput struct { + _ struct{} `type:"structure" payload:"SendUsersMessageResponse"` + + // User send message response. + // + // SendUsersMessageResponse is a required field + SendUsersMessageResponse *SendUsersMessageResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendUsersMessagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessagesOutput) GoString() string { + return s.String() +} + +// SetSendUsersMessageResponse sets the SendUsersMessageResponse field's value. +func (s *SendUsersMessagesOutput) SetSendUsersMessageResponse(v *SendUsersMessageResponse) *SendUsersMessagesOutput { + s.SendUsersMessageResponse = v + return s +} + +// Dimension specification of a segment. +type SetDimension struct { + _ struct{} `type:"structure"` + + // The type of dimension:INCLUSIVE - Endpoints that match the criteria are included + // in the segment.EXCLUSIVE - Endpoints that match the criteria are excluded + // from the segment. + DimensionType *string `type:"string" enum:"DimensionType"` + + Values []*string `type:"list"` +} + +// String returns the string representation +func (s SetDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetDimension) GoString() string { + return s.String() +} + +// SetDimensionType sets the DimensionType field's value. +func (s *SetDimension) SetDimensionType(v string) *SetDimension { + s.DimensionType = &v + return s +} + +// SetValues sets the Values field's value. +func (s *SetDimension) SetValues(v []*string) *SetDimension { + s.Values = v + return s +} + +// Treatment resource +type TreatmentResource struct { + _ struct{} `type:"structure"` + + // The unique treatment ID. + Id *string `type:"string"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The allocated percentage of users for this treatment. + SizePercent *int64 `type:"integer"` + + // The treatment status. + State *CampaignState `type:"structure"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` +} + +// String returns the string representation +func (s TreatmentResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TreatmentResource) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *TreatmentResource) SetId(v string) *TreatmentResource { + s.Id = &v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *TreatmentResource) SetMessageConfiguration(v *MessageConfiguration) *TreatmentResource { + s.MessageConfiguration = v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *TreatmentResource) SetSchedule(v *Schedule) *TreatmentResource { + s.Schedule = v + return s +} + +// SetSizePercent sets the SizePercent field's value. +func (s *TreatmentResource) SetSizePercent(v int64) *TreatmentResource { + s.SizePercent = &v + return s +} + +// SetState sets the State field's value. +func (s *TreatmentResource) SetState(v *CampaignState) *TreatmentResource { + s.State = v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *TreatmentResource) SetTreatmentDescription(v string) *TreatmentResource { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *TreatmentResource) SetTreatmentName(v string) *TreatmentResource { + s.TreatmentName = &v + return s +} + +type UpdateAdmChannelInput struct { + _ struct{} `type:"structure" payload:"ADMChannelRequest"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelRequest is a required field + ADMChannelRequest *ADMChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateAdmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAdmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAdmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAdmChannelInput"} + if s.ADMChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("ADMChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetADMChannelRequest sets the ADMChannelRequest field's value. +func (s *UpdateAdmChannelInput) SetADMChannelRequest(v *ADMChannelRequest) *UpdateAdmChannelInput { + s.ADMChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateAdmChannelInput) SetApplicationId(v string) *UpdateAdmChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateAdmChannelOutput struct { + _ struct{} `type:"structure" payload:"ADMChannelResponse"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelResponse is a required field + ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateAdmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAdmChannelOutput) GoString() string { + return s.String() +} + +// SetADMChannelResponse sets the ADMChannelResponse field's value. +func (s *UpdateAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *UpdateAdmChannelOutput { + s.ADMChannelResponse = v + return s +} + +type UpdateApnsChannelInput struct { + _ struct{} `type:"structure" payload:"APNSChannelRequest"` + + // Apple Push Notification Service channel definition. + // + // APNSChannelRequest is a required field + APNSChannelRequest *APNSChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsChannelInput"} + if s.APNSChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSChannelRequest sets the APNSChannelRequest field's value. +func (s *UpdateApnsChannelInput) SetAPNSChannelRequest(v *APNSChannelRequest) *UpdateApnsChannelInput { + s.APNSChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsChannelInput) SetApplicationId(v string) *UpdateApnsChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSChannelResponse"` + + // Apple Distribution Push Notification Service channel definition. + // + // APNSChannelResponse is a required field + APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSChannelResponse sets the APNSChannelResponse field's value. +func (s *UpdateApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *UpdateApnsChannelOutput { + s.APNSChannelResponse = v + return s +} + +type UpdateApnsSandboxChannelInput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelRequest"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelRequest is a required field + APNSSandboxChannelRequest *APNSSandboxChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsSandboxChannelInput"} + if s.APNSSandboxChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSSandboxChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSSandboxChannelRequest sets the APNSSandboxChannelRequest field's value. +func (s *UpdateApnsSandboxChannelInput) SetAPNSSandboxChannelRequest(v *APNSSandboxChannelRequest) *UpdateApnsSandboxChannelInput { + s.APNSSandboxChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsSandboxChannelInput) SetApplicationId(v string) *UpdateApnsSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelResponse is a required field + APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. +func (s *UpdateApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *UpdateApnsSandboxChannelOutput { + s.APNSSandboxChannelResponse = v + return s +} + +type UpdateApnsVoipChannelInput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelRequest"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelRequest is a required field + APNSVoipChannelRequest *APNSVoipChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsVoipChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsVoipChannelInput"} + if s.APNSVoipChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSVoipChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSVoipChannelRequest sets the APNSVoipChannelRequest field's value. +func (s *UpdateApnsVoipChannelInput) SetAPNSVoipChannelRequest(v *APNSVoipChannelRequest) *UpdateApnsVoipChannelInput { + s.APNSVoipChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsVoipChannelInput) SetApplicationId(v string) *UpdateApnsVoipChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsVoipChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelResponse is a required field + APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. +func (s *UpdateApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *UpdateApnsVoipChannelOutput { + s.APNSVoipChannelResponse = v + return s +} + +type UpdateApnsVoipSandboxChannelInput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelRequest"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelRequest is a required field + APNSVoipSandboxChannelRequest *APNSVoipSandboxChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsVoipSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsVoipSandboxChannelInput"} + if s.APNSVoipSandboxChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSVoipSandboxChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSVoipSandboxChannelRequest sets the APNSVoipSandboxChannelRequest field's value. +func (s *UpdateApnsVoipSandboxChannelInput) SetAPNSVoipSandboxChannelRequest(v *APNSVoipSandboxChannelRequest) *UpdateApnsVoipSandboxChannelInput { + s.APNSVoipSandboxChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsVoipSandboxChannelInput) SetApplicationId(v string) *UpdateApnsVoipSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsVoipSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelResponse is a required field + APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. +func (s *UpdateApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *UpdateApnsVoipSandboxChannelOutput { + s.APNSVoipSandboxChannelResponse = v + return s +} + +type UpdateApplicationSettingsInput struct { + _ struct{} `type:"structure" payload:"WriteApplicationSettingsRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Creating application setting request + // + // WriteApplicationSettingsRequest is a required field + WriteApplicationSettingsRequest *WriteApplicationSettingsRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApplicationSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApplicationSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationSettingsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.WriteApplicationSettingsRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteApplicationSettingsRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApplicationSettingsInput) SetApplicationId(v string) *UpdateApplicationSettingsInput { + s.ApplicationId = &v + return s +} + +// SetWriteApplicationSettingsRequest sets the WriteApplicationSettingsRequest field's value. +func (s *UpdateApplicationSettingsInput) SetWriteApplicationSettingsRequest(v *WriteApplicationSettingsRequest) *UpdateApplicationSettingsInput { + s.WriteApplicationSettingsRequest = v + return s +} + +type UpdateApplicationSettingsOutput struct { + _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` + + // Application settings. + // + // ApplicationSettingsResource is a required field + ApplicationSettingsResource *ApplicationSettingsResource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApplicationSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationSettingsOutput) GoString() string { + return s.String() +} + +// SetApplicationSettingsResource sets the ApplicationSettingsResource field's value. +func (s *UpdateApplicationSettingsOutput) SetApplicationSettingsResource(v *ApplicationSettingsResource) *UpdateApplicationSettingsOutput { + s.ApplicationSettingsResource = v + return s +} + +type UpdateBaiduChannelInput struct { + _ struct{} `type:"structure" payload:"BaiduChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Baidu Cloud Push credentials + // + // BaiduChannelRequest is a required field + BaiduChannelRequest *BaiduChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateBaiduChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBaiduChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBaiduChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBaiduChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.BaiduChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("BaiduChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateBaiduChannelInput) SetApplicationId(v string) *UpdateBaiduChannelInput { + s.ApplicationId = &v + return s +} + +// SetBaiduChannelRequest sets the BaiduChannelRequest field's value. +func (s *UpdateBaiduChannelInput) SetBaiduChannelRequest(v *BaiduChannelRequest) *UpdateBaiduChannelInput { + s.BaiduChannelRequest = v + return s +} + +type UpdateBaiduChannelOutput struct { + _ struct{} `type:"structure" payload:"BaiduChannelResponse"` + + // Baidu Cloud Messaging channel definition + // + // BaiduChannelResponse is a required field + BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateBaiduChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBaiduChannelOutput) GoString() string { + return s.String() +} + +// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. +func (s *UpdateBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *UpdateBaiduChannelOutput { + s.BaiduChannelResponse = v + return s +} + +type UpdateCampaignInput struct { + _ struct{} `type:"structure" payload:"WriteCampaignRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + // Used to create a campaign. + // + // WriteCampaignRequest is a required field + WriteCampaignRequest *WriteCampaignRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.WriteCampaignRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteCampaignRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateCampaignInput) SetApplicationId(v string) *UpdateCampaignInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *UpdateCampaignInput) SetCampaignId(v string) *UpdateCampaignInput { + s.CampaignId = &v + return s +} + +// SetWriteCampaignRequest sets the WriteCampaignRequest field's value. +func (s *UpdateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) *UpdateCampaignInput { + s.WriteCampaignRequest = v + return s +} + +type UpdateCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *UpdateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *UpdateCampaignOutput { + s.CampaignResponse = v + return s +} + +type UpdateEmailChannelInput struct { + _ struct{} `type:"structure" payload:"EmailChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Email Channel Request + // + // EmailChannelRequest is a required field + EmailChannelRequest *EmailChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEmailChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEmailChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEmailChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEmailChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.EmailChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EmailChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateEmailChannelInput) SetApplicationId(v string) *UpdateEmailChannelInput { + s.ApplicationId = &v + return s +} + +// SetEmailChannelRequest sets the EmailChannelRequest field's value. +func (s *UpdateEmailChannelInput) SetEmailChannelRequest(v *EmailChannelRequest) *UpdateEmailChannelInput { + s.EmailChannelRequest = v + return s +} + +type UpdateEmailChannelOutput struct { + _ struct{} `type:"structure" payload:"EmailChannelResponse"` + + // Email Channel Response. + // + // EmailChannelResponse is a required field + EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEmailChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEmailChannelOutput) GoString() string { + return s.String() +} + +// SetEmailChannelResponse sets the EmailChannelResponse field's value. +func (s *UpdateEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *UpdateEmailChannelOutput { + s.EmailChannelResponse = v + return s +} + +type UpdateEndpointInput struct { + _ struct{} `type:"structure" payload:"EndpointRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // EndpointId is a required field + EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` + + // Endpoint update request + // + // EndpointRequest is a required field + EndpointRequest *EndpointRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.EndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointId")) + } + if s.EndpointRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateEndpointInput) SetApplicationId(v string) *UpdateEndpointInput { + s.ApplicationId = &v + return s +} + +// SetEndpointId sets the EndpointId field's value. +func (s *UpdateEndpointInput) SetEndpointId(v string) *UpdateEndpointInput { + s.EndpointId = &v + return s +} + +// SetEndpointRequest sets the EndpointRequest field's value. +func (s *UpdateEndpointInput) SetEndpointRequest(v *EndpointRequest) *UpdateEndpointInput { + s.EndpointRequest = v + return s +} + +type UpdateEndpointOutput struct { + _ struct{} `type:"structure" payload:"MessageBody"` + + // Simple message object. + // + // MessageBody is a required field + MessageBody *MessageBody `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointOutput) GoString() string { + return s.String() +} + +// SetMessageBody sets the MessageBody field's value. +func (s *UpdateEndpointOutput) SetMessageBody(v *MessageBody) *UpdateEndpointOutput { + s.MessageBody = v + return s +} + +type UpdateEndpointsBatchInput struct { + _ struct{} `type:"structure" payload:"EndpointBatchRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Endpoint batch update request. + // + // EndpointBatchRequest is a required field + EndpointBatchRequest *EndpointBatchRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointsBatchInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointsBatchInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEndpointsBatchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointsBatchInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.EndpointBatchRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointBatchRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateEndpointsBatchInput) SetApplicationId(v string) *UpdateEndpointsBatchInput { + s.ApplicationId = &v + return s +} + +// SetEndpointBatchRequest sets the EndpointBatchRequest field's value. +func (s *UpdateEndpointsBatchInput) SetEndpointBatchRequest(v *EndpointBatchRequest) *UpdateEndpointsBatchInput { + s.EndpointBatchRequest = v + return s +} + +type UpdateEndpointsBatchOutput struct { + _ struct{} `type:"structure" payload:"MessageBody"` + + // Simple message object. + // + // MessageBody is a required field + MessageBody *MessageBody `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointsBatchOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointsBatchOutput) GoString() string { + return s.String() +} + +// SetMessageBody sets the MessageBody field's value. +func (s *UpdateEndpointsBatchOutput) SetMessageBody(v *MessageBody) *UpdateEndpointsBatchOutput { + s.MessageBody = v + return s +} + +type UpdateGcmChannelInput struct { + _ struct{} `type:"structure" payload:"GCMChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Google Cloud Messaging credentials + // + // GCMChannelRequest is a required field + GCMChannelRequest *GCMChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateGcmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGcmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGcmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGcmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.GCMChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("GCMChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateGcmChannelInput) SetApplicationId(v string) *UpdateGcmChannelInput { + s.ApplicationId = &v + return s +} + +// SetGCMChannelRequest sets the GCMChannelRequest field's value. +func (s *UpdateGcmChannelInput) SetGCMChannelRequest(v *GCMChannelRequest) *UpdateGcmChannelInput { + s.GCMChannelRequest = v + return s +} + +type UpdateGcmChannelOutput struct { + _ struct{} `type:"structure" payload:"GCMChannelResponse"` + + // Google Cloud Messaging channel definition + // + // GCMChannelResponse is a required field + GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateGcmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGcmChannelOutput) GoString() string { + return s.String() +} + +// SetGCMChannelResponse sets the GCMChannelResponse field's value. +func (s *UpdateGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *UpdateGcmChannelOutput { + s.GCMChannelResponse = v + return s +} + +type UpdateSegmentInput struct { + _ struct{} `type:"structure" payload:"WriteSegmentRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + // Segment definition. + // + // WriteSegmentRequest is a required field + WriteSegmentRequest *WriteSegmentRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.WriteSegmentRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteSegmentRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateSegmentInput) SetApplicationId(v string) *UpdateSegmentInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *UpdateSegmentInput) SetSegmentId(v string) *UpdateSegmentInput { + s.SegmentId = &v + return s +} + +// SetWriteSegmentRequest sets the WriteSegmentRequest field's value. +func (s *UpdateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *UpdateSegmentInput { + s.WriteSegmentRequest = v + return s +} + +type UpdateSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *UpdateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *UpdateSegmentOutput { + s.SegmentResponse = v + return s +} + +type UpdateSmsChannelInput struct { + _ struct{} `type:"structure" payload:"SMSChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SMS Channel Request + // + // SMSChannelRequest is a required field + SMSChannelRequest *SMSChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSmsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSmsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSmsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSmsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.SMSChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("SMSChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateSmsChannelInput) SetApplicationId(v string) *UpdateSmsChannelInput { + s.ApplicationId = &v + return s +} + +// SetSMSChannelRequest sets the SMSChannelRequest field's value. +func (s *UpdateSmsChannelInput) SetSMSChannelRequest(v *SMSChannelRequest) *UpdateSmsChannelInput { + s.SMSChannelRequest = v + return s +} + +type UpdateSmsChannelOutput struct { + _ struct{} `type:"structure" payload:"SMSChannelResponse"` + + // SMS Channel Response. + // + // SMSChannelResponse is a required field + SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSmsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSmsChannelOutput) GoString() string { + return s.String() +} + +// SetSMSChannelResponse sets the SMSChannelResponse field's value. +func (s *UpdateSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *UpdateSmsChannelOutput { + s.SMSChannelResponse = v + return s +} + +// Creating application setting request +type WriteApplicationSettingsRequest struct { + _ struct{} `type:"structure"` + + // Default campaign hook information. + CampaignHook *CampaignHook `type:"structure"` + + // The default campaign limits for the app. These limits apply to each campaign + // for the app, unless the campaign overrides the default with limits of its + // own. + Limits *CampaignLimits `type:"structure"` + + // The default quiet time for the app. Each campaign for this app sends no messages + // during this time unless the campaign overrides the default with a quiet time + // of its own. + QuietTime *QuietTime `type:"structure"` +} + +// String returns the string representation +func (s WriteApplicationSettingsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteApplicationSettingsRequest) GoString() string { + return s.String() +} + +// SetCampaignHook sets the CampaignHook field's value. +func (s *WriteApplicationSettingsRequest) SetCampaignHook(v *CampaignHook) *WriteApplicationSettingsRequest { + s.CampaignHook = v + return s +} + +// SetLimits sets the Limits field's value. +func (s *WriteApplicationSettingsRequest) SetLimits(v *CampaignLimits) *WriteApplicationSettingsRequest { + s.Limits = v + return s +} + +// SetQuietTime sets the QuietTime field's value. +func (s *WriteApplicationSettingsRequest) SetQuietTime(v *QuietTime) *WriteApplicationSettingsRequest { + s.QuietTime = v + return s +} + +// Used to create a campaign. +type WriteCampaignRequest struct { + _ struct{} `type:"structure"` + + // Treatments that are defined in addition to the default treatment. + AdditionalTreatments []*WriteTreatmentResource `type:"list"` + + // A description of the campaign. + Description *string `type:"string"` + + // The allocated percentage of end users who will not receive messages from + // this campaign. + HoldoutPercent *int64 `type:"integer"` + + // Campaign hook information. + Hook *CampaignHook `type:"structure"` + + // Indicates whether the campaign is paused. A paused campaign does not send + // messages unless you resume it by setting IsPaused to false. + IsPaused *bool `type:"boolean"` + + // The campaign limits settings. + Limits *CampaignLimits `type:"structure"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The custom name of the campaign. + Name *string `type:"string"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The ID of the segment to which the campaign sends messages. + SegmentId *string `type:"string"` + + // The version of the segment to which the campaign sends messages. + SegmentVersion *int64 `type:"integer"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` +} + +// String returns the string representation +func (s WriteCampaignRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteCampaignRequest) GoString() string { + return s.String() +} + +// SetAdditionalTreatments sets the AdditionalTreatments field's value. +func (s *WriteCampaignRequest) SetAdditionalTreatments(v []*WriteTreatmentResource) *WriteCampaignRequest { + s.AdditionalTreatments = v + return s +} + +// SetDescription sets the Description field's value. +func (s *WriteCampaignRequest) SetDescription(v string) *WriteCampaignRequest { + s.Description = &v + return s +} + +// SetHoldoutPercent sets the HoldoutPercent field's value. +func (s *WriteCampaignRequest) SetHoldoutPercent(v int64) *WriteCampaignRequest { + s.HoldoutPercent = &v + return s +} + +// SetHook sets the Hook field's value. +func (s *WriteCampaignRequest) SetHook(v *CampaignHook) *WriteCampaignRequest { + s.Hook = v + return s +} + +// SetIsPaused sets the IsPaused field's value. +func (s *WriteCampaignRequest) SetIsPaused(v bool) *WriteCampaignRequest { + s.IsPaused = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *WriteCampaignRequest) SetLimits(v *CampaignLimits) *WriteCampaignRequest { + s.Limits = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *WriteCampaignRequest) SetMessageConfiguration(v *MessageConfiguration) *WriteCampaignRequest { + s.MessageConfiguration = v + return s +} + +// SetName sets the Name field's value. +func (s *WriteCampaignRequest) SetName(v string) *WriteCampaignRequest { + s.Name = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *WriteCampaignRequest) SetSchedule(v *Schedule) *WriteCampaignRequest { + s.Schedule = v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *WriteCampaignRequest) SetSegmentId(v string) *WriteCampaignRequest { + s.SegmentId = &v + return s +} + +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *WriteCampaignRequest) SetSegmentVersion(v int64) *WriteCampaignRequest { + s.SegmentVersion = &v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *WriteCampaignRequest) SetTreatmentDescription(v string) *WriteCampaignRequest { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *WriteCampaignRequest) SetTreatmentName(v string) *WriteCampaignRequest { + s.TreatmentName = &v + return s +} + +// Request to save an EventStream. +type WriteEventStream struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery + // stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME + // Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME + DestinationStreamArn *string `type:"string"` + + // The IAM role that authorizes Amazon Pinpoint to publish events to the stream + // in your account. + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s WriteEventStream) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteEventStream) GoString() string { + return s.String() +} + +// SetDestinationStreamArn sets the DestinationStreamArn field's value. +func (s *WriteEventStream) SetDestinationStreamArn(v string) *WriteEventStream { + s.DestinationStreamArn = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *WriteEventStream) SetRoleArn(v string) *WriteEventStream { + s.RoleArn = &v + return s +} + +// Segment definition. +type WriteSegmentRequest struct { + _ struct{} `type:"structure"` + + // The segment dimensions attributes. + Dimensions *SegmentDimensions `type:"structure"` + + // The name of segment + Name *string `type:"string"` +} + +// String returns the string representation +func (s WriteSegmentRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteSegmentRequest) GoString() string { + return s.String() +} + +// SetDimensions sets the Dimensions field's value. +func (s *WriteSegmentRequest) SetDimensions(v *SegmentDimensions) *WriteSegmentRequest { + s.Dimensions = v + return s +} + +// SetName sets the Name field's value. +func (s *WriteSegmentRequest) SetName(v string) *WriteSegmentRequest { + s.Name = &v + return s +} + +// Used to create a campaign treatment. +type WriteTreatmentResource struct { + _ struct{} `type:"structure"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The allocated percentage of users for this treatment. + SizePercent *int64 `type:"integer"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` +} + +// String returns the string representation +func (s WriteTreatmentResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteTreatmentResource) GoString() string { + return s.String() +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *WriteTreatmentResource) SetMessageConfiguration(v *MessageConfiguration) *WriteTreatmentResource { + s.MessageConfiguration = v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *WriteTreatmentResource) SetSchedule(v *Schedule) *WriteTreatmentResource { + s.Schedule = v + return s +} + +// SetSizePercent sets the SizePercent field's value. +func (s *WriteTreatmentResource) SetSizePercent(v int64) *WriteTreatmentResource { + s.SizePercent = &v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *WriteTreatmentResource) SetTreatmentDescription(v string) *WriteTreatmentResource { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *WriteTreatmentResource) SetTreatmentName(v string) *WriteTreatmentResource { + s.TreatmentName = &v + return s +} + +const ( + // ActionOpenApp is a Action enum value + ActionOpenApp = "OPEN_APP" + + // ActionDeepLink is a Action enum value + ActionDeepLink = "DEEP_LINK" + + // ActionUrl is a Action enum value + ActionUrl = "URL" +) + +const ( + // AttributeTypeInclusive is a AttributeType enum value + AttributeTypeInclusive = "INCLUSIVE" + + // AttributeTypeExclusive is a AttributeType enum value + AttributeTypeExclusive = "EXCLUSIVE" +) + +const ( + // CampaignStatusScheduled is a CampaignStatus enum value + CampaignStatusScheduled = "SCHEDULED" + + // CampaignStatusExecuting is a CampaignStatus enum value + CampaignStatusExecuting = "EXECUTING" + + // CampaignStatusPendingNextRun is a CampaignStatus enum value + CampaignStatusPendingNextRun = "PENDING_NEXT_RUN" + + // CampaignStatusCompleted is a CampaignStatus enum value + CampaignStatusCompleted = "COMPLETED" + + // CampaignStatusPaused is a CampaignStatus enum value + CampaignStatusPaused = "PAUSED" +) + +const ( + // ChannelTypeGcm is a ChannelType enum value + ChannelTypeGcm = "GCM" + + // ChannelTypeApns is a ChannelType enum value + ChannelTypeApns = "APNS" + + // ChannelTypeApnsSandbox is a ChannelType enum value + ChannelTypeApnsSandbox = "APNS_SANDBOX" + + // ChannelTypeApnsVoip is a ChannelType enum value + ChannelTypeApnsVoip = "APNS_VOIP" + + // ChannelTypeApnsVoipSandbox is a ChannelType enum value + ChannelTypeApnsVoipSandbox = "APNS_VOIP_SANDBOX" + + // ChannelTypeAdm is a ChannelType enum value + ChannelTypeAdm = "ADM" + + // ChannelTypeSms is a ChannelType enum value + ChannelTypeSms = "SMS" + + // ChannelTypeEmail is a ChannelType enum value + ChannelTypeEmail = "EMAIL" + + // ChannelTypeBaidu is a ChannelType enum value + ChannelTypeBaidu = "BAIDU" + + // ChannelTypeCustom is a ChannelType enum value + ChannelTypeCustom = "CUSTOM" +) + +const ( + // DeliveryStatusSuccessful is a DeliveryStatus enum value + DeliveryStatusSuccessful = "SUCCESSFUL" + + // DeliveryStatusThrottled is a DeliveryStatus enum value + DeliveryStatusThrottled = "THROTTLED" + + // DeliveryStatusTemporaryFailure is a DeliveryStatus enum value + DeliveryStatusTemporaryFailure = "TEMPORARY_FAILURE" + + // DeliveryStatusPermanentFailure is a DeliveryStatus enum value + DeliveryStatusPermanentFailure = "PERMANENT_FAILURE" + + // DeliveryStatusUnknownFailure is a DeliveryStatus enum value + DeliveryStatusUnknownFailure = "UNKNOWN_FAILURE" + + // DeliveryStatusOptOut is a DeliveryStatus enum value + DeliveryStatusOptOut = "OPT_OUT" + + // DeliveryStatusDuplicate is a DeliveryStatus enum value + DeliveryStatusDuplicate = "DUPLICATE" +) + +const ( + // DimensionTypeInclusive is a DimensionType enum value + DimensionTypeInclusive = "INCLUSIVE" + + // DimensionTypeExclusive is a DimensionType enum value + DimensionTypeExclusive = "EXCLUSIVE" +) + +const ( + // DurationHr24 is a Duration enum value + DurationHr24 = "HR_24" + + // DurationDay7 is a Duration enum value + DurationDay7 = "DAY_7" + + // DurationDay14 is a Duration enum value + DurationDay14 = "DAY_14" + + // DurationDay30 is a Duration enum value + DurationDay30 = "DAY_30" +) + +const ( + // FormatCsv is a Format enum value + FormatCsv = "CSV" + + // FormatJson is a Format enum value + FormatJson = "JSON" +) + +const ( + // FrequencyOnce is a Frequency enum value + FrequencyOnce = "ONCE" + + // FrequencyHourly is a Frequency enum value + FrequencyHourly = "HOURLY" + + // FrequencyDaily is a Frequency enum value + FrequencyDaily = "DAILY" + + // FrequencyWeekly is a Frequency enum value + FrequencyWeekly = "WEEKLY" + + // FrequencyMonthly is a Frequency enum value + FrequencyMonthly = "MONTHLY" +) + +const ( + // JobStatusCreated is a JobStatus enum value + JobStatusCreated = "CREATED" + + // JobStatusInitializing is a JobStatus enum value + JobStatusInitializing = "INITIALIZING" + + // JobStatusProcessing is a JobStatus enum value + JobStatusProcessing = "PROCESSING" + + // JobStatusCompleting is a JobStatus enum value + JobStatusCompleting = "COMPLETING" + + // JobStatusCompleted is a JobStatus enum value + JobStatusCompleted = "COMPLETED" + + // JobStatusFailing is a JobStatus enum value + JobStatusFailing = "FAILING" + + // JobStatusFailed is a JobStatus enum value + JobStatusFailed = "FAILED" +) + +const ( + // MessageTypeTransactional is a MessageType enum value + MessageTypeTransactional = "TRANSACTIONAL" + + // MessageTypePromotional is a MessageType enum value + MessageTypePromotional = "PROMOTIONAL" +) + +const ( + // ModeDelivery is a Mode enum value + ModeDelivery = "DELIVERY" + + // ModeFilter is a Mode enum value + ModeFilter = "FILTER" +) + +const ( + // RecencyTypeActive is a RecencyType enum value + RecencyTypeActive = "ACTIVE" + + // RecencyTypeInactive is a RecencyType enum value + RecencyTypeInactive = "INACTIVE" +) + +const ( + // SegmentTypeDimensional is a SegmentType enum value + SegmentTypeDimensional = "DIMENSIONAL" + + // SegmentTypeImport is a SegmentType enum value + SegmentTypeImport = "IMPORT" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go new file mode 100644 index 00000000000..f41551af66e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go @@ -0,0 +1,26 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package pinpoint provides the client and types for making API +// requests to Amazon Pinpoint. +// +// See https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01 for more information on this service. +// +// See pinpoint package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pinpoint/ +// +// Using the Client +// +// To contact Amazon Pinpoint 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 Pinpoint client Pinpoint for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pinpoint/#New +package pinpoint diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go new file mode 100644 index 00000000000..2a619d1c271 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pinpoint + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeMethodNotAllowedException for service response error code + // "MethodNotAllowedException". + ErrCodeMethodNotAllowedException = "MethodNotAllowedException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go new file mode 100644 index 00000000000..9bee611da82 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pinpoint + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// Pinpoint provides the API operation methods for making requests to +// Amazon Pinpoint. See this package's package overview docs +// for details on the service. +// +// Pinpoint methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Pinpoint 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 = "pinpoint" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Pinpoint" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Pinpoint 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 Pinpoint client from just a session. +// svc := pinpoint.New(mySession) +// +// // Create a Pinpoint client with additional configuration +// svc := pinpoint.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Pinpoint { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mobiletargeting" + } + 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) *Pinpoint { + svc := &Pinpoint{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2016-12-01", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Pinpoint operation and runs any +// custom request initialization. +func (c *Pinpoint) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 1cdd10ba52f..289fc68c062 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -846,6 +846,14 @@ "version": "v1.14.13", "versionExact": "v1.14.13" }, + { + "checksumSHA1": "32fGeVnRDBhJlp3Oc25r4R2M3oc=", + "path": "github.com/aws/aws-sdk-go/service/pinpoint", + "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", + "revisionTime": "2018-06-22T22:18:31Z", + "version": "v1.14.13", + "versionExact": "v1.14.13" + }, { "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", "path": "github.com/aws/aws-sdk-go/service/rds", From 4e707d43f4f9232334abb1563c1af24ad4fb1303 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 26 Jun 2018 16:54:29 -0400 Subject: [PATCH 1640/3316] Deps: Bump aws-sdk-go@v1.14.14 --- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/inspector/api.go | 1204 ++++++++++++++++- .../aws-sdk-go/service/inspector/errors.go | 7 + .../aws/aws-sdk-go/service/s3/api.go | 11 + .../aws-sdk-go/service/secretsmanager/api.go | 772 ++++++++++- .../service/secretsmanager/errors.go | 19 +- vendor/vendor.json | 976 ++++++------- 7 files changed, 2401 insertions(+), 590 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 38caca42e7f..96fc1306898 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.14.13" +const SDKVersion = "1.14.14" diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index b9647c45753..9bda4e8414b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -306,6 +306,102 @@ func (c *Inspector) CreateAssessmentTemplateWithContext(ctx aws.Context, input * return out, req.Send() } +const opCreateExclusionsPreview = "CreateExclusionsPreview" + +// CreateExclusionsPreviewRequest generates a "aws/request.Request" representing the +// client's request for the CreateExclusionsPreview operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateExclusionsPreview for more information on using the CreateExclusionsPreview +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateExclusionsPreviewRequest method. +// req, resp := client.CreateExclusionsPreviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview +func (c *Inspector) CreateExclusionsPreviewRequest(input *CreateExclusionsPreviewInput) (req *request.Request, output *CreateExclusionsPreviewOutput) { + op := &request.Operation{ + Name: opCreateExclusionsPreview, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateExclusionsPreviewInput{} + } + + output = &CreateExclusionsPreviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateExclusionsPreview API operation for Amazon Inspector. +// +// Starts the generation of an exclusions preview for the specified assessment +// template. The exclusions preview lists the potential exclusions (ExclusionPreview) +// that Inspector can detect before it runs the assessment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Inspector's +// API operation CreateExclusionsPreview for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodePreviewGenerationInProgressException "PreviewGenerationInProgressException" +// The request is rejected. The specified assessment template is currently generating +// an exclusions preview. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeNoSuchEntityException "NoSuchEntityException" +// The request was rejected because it referenced an entity that does not exist. +// The error code describes the entity. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/CreateExclusionsPreview +func (c *Inspector) CreateExclusionsPreview(input *CreateExclusionsPreviewInput) (*CreateExclusionsPreviewOutput, error) { + req, out := c.CreateExclusionsPreviewRequest(input) + return out, req.Send() +} + +// CreateExclusionsPreviewWithContext is the same as CreateExclusionsPreview with the addition of +// the ability to pass a context and additional request options. +// +// See CreateExclusionsPreview for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Inspector) CreateExclusionsPreviewWithContext(ctx aws.Context, input *CreateExclusionsPreviewInput, opts ...request.Option) (*CreateExclusionsPreviewOutput, error) { + req, out := c.CreateExclusionsPreviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateResourceGroup = "CreateResourceGroup" // CreateResourceGroupRequest generates a "aws/request.Request" representing the @@ -1021,6 +1117,89 @@ func (c *Inspector) DescribeCrossAccountAccessRoleWithContext(ctx aws.Context, i return out, req.Send() } +const opDescribeExclusions = "DescribeExclusions" + +// DescribeExclusionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeExclusions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeExclusions for more information on using the DescribeExclusions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeExclusionsRequest method. +// req, resp := client.DescribeExclusionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions +func (c *Inspector) DescribeExclusionsRequest(input *DescribeExclusionsInput) (req *request.Request, output *DescribeExclusionsOutput) { + op := &request.Operation{ + Name: opDescribeExclusions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeExclusionsInput{} + } + + output = &DescribeExclusionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeExclusions API operation for Amazon Inspector. +// +// Describes the exclusions that are specified by the exclusions' ARNs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Inspector's +// API operation DescribeExclusions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/DescribeExclusions +func (c *Inspector) DescribeExclusions(input *DescribeExclusionsInput) (*DescribeExclusionsOutput, error) { + req, out := c.DescribeExclusionsRequest(input) + return out, req.Send() +} + +// DescribeExclusionsWithContext is the same as DescribeExclusions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeExclusions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Inspector) DescribeExclusionsWithContext(ctx aws.Context, input *DescribeExclusionsInput, opts ...request.Option) (*DescribeExclusionsOutput, error) { + req, out := c.DescribeExclusionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeFindings = "DescribeFindings" // DescribeFindingsRequest generates a "aws/request.Request" representing the @@ -1374,6 +1553,154 @@ func (c *Inspector) GetAssessmentReportWithContext(ctx aws.Context, input *GetAs return out, req.Send() } +const opGetExclusionsPreview = "GetExclusionsPreview" + +// GetExclusionsPreviewRequest generates a "aws/request.Request" representing the +// client's request for the GetExclusionsPreview operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetExclusionsPreview for more information on using the GetExclusionsPreview +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetExclusionsPreviewRequest method. +// req, resp := client.GetExclusionsPreviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview +func (c *Inspector) GetExclusionsPreviewRequest(input *GetExclusionsPreviewInput) (req *request.Request, output *GetExclusionsPreviewOutput) { + op := &request.Operation{ + Name: opGetExclusionsPreview, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetExclusionsPreviewInput{} + } + + output = &GetExclusionsPreviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetExclusionsPreview API operation for Amazon Inspector. +// +// Retrieves the exclusions preview (a list of ExclusionPreview objects) specified +// by the preview token. You can obtain the preview token by running the CreateExclusionsPreview +// API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Inspector's +// API operation GetExclusionsPreview for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeNoSuchEntityException "NoSuchEntityException" +// The request was rejected because it referenced an entity that does not exist. +// The error code describes the entity. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/GetExclusionsPreview +func (c *Inspector) GetExclusionsPreview(input *GetExclusionsPreviewInput) (*GetExclusionsPreviewOutput, error) { + req, out := c.GetExclusionsPreviewRequest(input) + return out, req.Send() +} + +// GetExclusionsPreviewWithContext is the same as GetExclusionsPreview with the addition of +// the ability to pass a context and additional request options. +// +// See GetExclusionsPreview for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Inspector) GetExclusionsPreviewWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, opts ...request.Option) (*GetExclusionsPreviewOutput, error) { + req, out := c.GetExclusionsPreviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetExclusionsPreviewPages iterates over the pages of a GetExclusionsPreview operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetExclusionsPreview method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetExclusionsPreview operation. +// pageNum := 0 +// err := client.GetExclusionsPreviewPages(params, +// func(page *GetExclusionsPreviewOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Inspector) GetExclusionsPreviewPages(input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool) error { + return c.GetExclusionsPreviewPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetExclusionsPreviewPagesWithContext same as GetExclusionsPreviewPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Inspector) GetExclusionsPreviewPagesWithContext(ctx aws.Context, input *GetExclusionsPreviewInput, fn func(*GetExclusionsPreviewOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetExclusionsPreviewInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetExclusionsPreviewRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetExclusionsPreviewOutput), !p.HasNextPage()) + } + return p.Err() +} + const opGetTelemetryMetadata = "GetTelemetryMetadata" // GetTelemetryMetadataRequest generates a "aws/request.Request" representing the @@ -2004,39 +2331,187 @@ func (c *Inspector) ListAssessmentTemplatesWithContext(ctx aws.Context, input *L // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListAssessmentTemplates method for more information on how to use this operation. +// See ListAssessmentTemplates method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListAssessmentTemplates operation. +// pageNum := 0 +// err := client.ListAssessmentTemplatesPages(params, +// func(page *ListAssessmentTemplatesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Inspector) ListAssessmentTemplatesPages(input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool) error { + return c.ListAssessmentTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListAssessmentTemplatesPagesWithContext same as ListAssessmentTemplatesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Inspector) ListAssessmentTemplatesPagesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListAssessmentTemplatesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListAssessmentTemplatesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListAssessmentTemplatesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListEventSubscriptions = "ListEventSubscriptions" + +// ListEventSubscriptionsRequest generates a "aws/request.Request" representing the +// client's request for the ListEventSubscriptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEventSubscriptions for more information on using the ListEventSubscriptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEventSubscriptionsRequest method. +// req, resp := client.ListEventSubscriptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions +func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsInput) (req *request.Request, output *ListEventSubscriptionsOutput) { + op := &request.Operation{ + Name: opListEventSubscriptions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListEventSubscriptionsInput{} + } + + output = &ListEventSubscriptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEventSubscriptions API operation for Amazon Inspector. +// +// Lists all the event subscriptions for the assessment template that is specified +// by the ARN of the assessment template. For more information, see SubscribeToEvent +// and UnsubscribeFromEvent. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Inspector's +// API operation ListEventSubscriptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// Internal server error. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have required permissions to access the requested resource. +// +// * ErrCodeNoSuchEntityException "NoSuchEntityException" +// The request was rejected because it referenced an entity that does not exist. +// The error code describes the entity. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions +func (c *Inspector) ListEventSubscriptions(input *ListEventSubscriptionsInput) (*ListEventSubscriptionsOutput, error) { + req, out := c.ListEventSubscriptionsRequest(input) + return out, req.Send() +} + +// ListEventSubscriptionsWithContext is the same as ListEventSubscriptions with the addition of +// the ability to pass a context and additional request options. +// +// See ListEventSubscriptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Inspector) ListEventSubscriptionsWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, opts ...request.Option) (*ListEventSubscriptionsOutput, error) { + req, out := c.ListEventSubscriptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListEventSubscriptionsPages iterates over the pages of a ListEventSubscriptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListEventSubscriptions method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a ListAssessmentTemplates operation. +// // Example iterating over at most 3 pages of a ListEventSubscriptions operation. // pageNum := 0 -// err := client.ListAssessmentTemplatesPages(params, -// func(page *ListAssessmentTemplatesOutput, lastPage bool) bool { +// err := client.ListEventSubscriptionsPages(params, +// func(page *ListEventSubscriptionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *Inspector) ListAssessmentTemplatesPages(input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool) error { - return c.ListAssessmentTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *Inspector) ListEventSubscriptionsPages(input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool) error { + return c.ListEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListAssessmentTemplatesPagesWithContext same as ListAssessmentTemplatesPages except +// ListEventSubscriptionsPagesWithContext same as ListEventSubscriptionsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Inspector) ListAssessmentTemplatesPagesWithContext(ctx aws.Context, input *ListAssessmentTemplatesInput, fn func(*ListAssessmentTemplatesOutput, bool) bool, opts ...request.Option) error { +func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListAssessmentTemplatesInput + var inCpy *ListEventSubscriptionsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListAssessmentTemplatesRequest(inCpy) + req, _ := c.ListEventSubscriptionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2045,40 +2520,40 @@ func (c *Inspector) ListAssessmentTemplatesPagesWithContext(ctx aws.Context, inp cont := true for p.Next() && cont { - cont = fn(p.Page().(*ListAssessmentTemplatesOutput), !p.HasNextPage()) + cont = fn(p.Page().(*ListEventSubscriptionsOutput), !p.HasNextPage()) } return p.Err() } -const opListEventSubscriptions = "ListEventSubscriptions" +const opListExclusions = "ListExclusions" -// ListEventSubscriptionsRequest generates a "aws/request.Request" representing the -// client's request for the ListEventSubscriptions operation. The "output" return +// ListExclusionsRequest generates a "aws/request.Request" representing the +// client's request for the ListExclusions operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListEventSubscriptions for more information on using the ListEventSubscriptions +// See ListExclusions for more information on using the ListExclusions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListEventSubscriptionsRequest method. -// req, resp := client.ListEventSubscriptionsRequest(params) +// // Example sending a request using the ListExclusionsRequest method. +// req, resp := client.ListExclusionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions -func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsInput) (req *request.Request, output *ListEventSubscriptionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions +func (c *Inspector) ListExclusionsRequest(input *ListExclusionsInput) (req *request.Request, output *ListExclusionsOutput) { op := &request.Operation{ - Name: opListEventSubscriptions, + Name: opListExclusions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -2090,26 +2565,24 @@ func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsI } if input == nil { - input = &ListEventSubscriptionsInput{} + input = &ListExclusionsInput{} } - output = &ListEventSubscriptionsOutput{} + output = &ListExclusionsOutput{} req = c.newRequest(op, input, output) return } -// ListEventSubscriptions API operation for Amazon Inspector. +// ListExclusions API operation for Amazon Inspector. // -// Lists all the event subscriptions for the assessment template that is specified -// by the ARN of the assessment template. For more information, see SubscribeToEvent -// and UnsubscribeFromEvent. +// List exclusions that are generated by the assessment run. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Inspector's -// API operation ListEventSubscriptions for usage and error information. +// API operation ListExclusions for usage and error information. // // Returned Error Codes: // * ErrCodeInternalException "InternalException" @@ -2126,65 +2599,65 @@ func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsI // The request was rejected because it referenced an entity that does not exist. // The error code describes the entity. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListEventSubscriptions -func (c *Inspector) ListEventSubscriptions(input *ListEventSubscriptionsInput) (*ListEventSubscriptionsOutput, error) { - req, out := c.ListEventSubscriptionsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListExclusions +func (c *Inspector) ListExclusions(input *ListExclusionsInput) (*ListExclusionsOutput, error) { + req, out := c.ListExclusionsRequest(input) return out, req.Send() } -// ListEventSubscriptionsWithContext is the same as ListEventSubscriptions with the addition of +// ListExclusionsWithContext is the same as ListExclusions with the addition of // the ability to pass a context and additional request options. // -// See ListEventSubscriptions for details on how to use this API operation. +// See ListExclusions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Inspector) ListEventSubscriptionsWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, opts ...request.Option) (*ListEventSubscriptionsOutput, error) { - req, out := c.ListEventSubscriptionsRequest(input) +func (c *Inspector) ListExclusionsWithContext(ctx aws.Context, input *ListExclusionsInput, opts ...request.Option) (*ListExclusionsOutput, error) { + req, out := c.ListExclusionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListEventSubscriptionsPages iterates over the pages of a ListEventSubscriptions operation, +// ListExclusionsPages iterates over the pages of a ListExclusions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListEventSubscriptions method for more information on how to use this operation. +// See ListExclusions method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a ListEventSubscriptions operation. +// // Example iterating over at most 3 pages of a ListExclusions operation. // pageNum := 0 -// err := client.ListEventSubscriptionsPages(params, -// func(page *ListEventSubscriptionsOutput, lastPage bool) bool { +// err := client.ListExclusionsPages(params, +// func(page *ListExclusionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *Inspector) ListEventSubscriptionsPages(input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool) error { - return c.ListEventSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *Inspector) ListExclusionsPages(input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool) error { + return c.ListExclusionsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListEventSubscriptionsPagesWithContext same as ListEventSubscriptionsPages except +// ListExclusionsPagesWithContext same as ListExclusionsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, input *ListEventSubscriptionsInput, fn func(*ListEventSubscriptionsOutput, bool) bool, opts ...request.Option) error { +func (c *Inspector) ListExclusionsPagesWithContext(ctx aws.Context, input *ListExclusionsInput, fn func(*ListExclusionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListEventSubscriptionsInput + var inCpy *ListExclusionsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListEventSubscriptionsRequest(inCpy) + req, _ := c.ListExclusionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2193,7 +2666,7 @@ func (c *Inspector) ListEventSubscriptionsPagesWithContext(ctx aws.Context, inpu cont := true for p.Next() && cont { - cont = fn(p.Page().(*ListEventSubscriptionsOutput), !p.HasNextPage()) + cont = fn(p.Page().(*ListExclusionsOutput), !p.HasNextPage()) } return p.Err() } @@ -4396,7 +4869,7 @@ type AssessmentTemplate struct { // CreatedAt is a required field CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` - // The duration in seconds specified for this assessment tempate. The default + // The duration in seconds specified for this assessment template. The default // value is 3600 seconds (one hour). The maximum value is 86400 seconds (one // day). // @@ -4405,7 +4878,7 @@ type AssessmentTemplate struct { // The Amazon Resource Name (ARN) of the most recent assessment run associated // with this assessment template. This value exists only when the value of assessmentRunCount - // is greater than zero. + // is greaterpa than zero. LastAssessmentRunArn *string `locationName:"lastAssessmentRunArn" min:"1" type:"string"` // The name of the assessment template. @@ -4905,6 +5378,75 @@ func (s *CreateAssessmentTemplateOutput) SetAssessmentTemplateArn(v string) *Cre return s } +type CreateExclusionsPreviewInput struct { + _ struct{} `type:"structure"` + + // The ARN that specifies the assessment template for which you want to create + // an exclusions preview. + // + // AssessmentTemplateArn is a required field + AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateExclusionsPreviewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExclusionsPreviewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateExclusionsPreviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateExclusionsPreviewInput"} + if s.AssessmentTemplateArn == nil { + invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) + } + if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. +func (s *CreateExclusionsPreviewInput) SetAssessmentTemplateArn(v string) *CreateExclusionsPreviewInput { + s.AssessmentTemplateArn = &v + return s +} + +type CreateExclusionsPreviewOutput struct { + _ struct{} `type:"structure"` + + // Specifies the unique identifier of the requested exclusions preview. You + // can use the unique identifier to retrieve the exclusions preview when running + // the GetExclusionsPreview API. + // + // PreviewToken is a required field + PreviewToken *string `locationName:"previewToken" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateExclusionsPreviewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExclusionsPreviewOutput) GoString() string { + return s.String() +} + +// SetPreviewToken sets the PreviewToken field's value. +func (s *CreateExclusionsPreviewOutput) SetPreviewToken(v string) *CreateExclusionsPreviewOutput { + s.PreviewToken = &v + return s +} + type CreateResourceGroupInput struct { _ struct{} `type:"structure"` @@ -5443,6 +5985,94 @@ func (s *DescribeCrossAccountAccessRoleOutput) SetValid(v bool) *DescribeCrossAc return s } +type DescribeExclusionsInput struct { + _ struct{} `type:"structure"` + + // The list of ARNs that specify the exclusions that you want to describe. + // + // ExclusionArns is a required field + ExclusionArns []*string `locationName:"exclusionArns" min:"1" type:"list" required:"true"` + + // The locale into which you want to translate the exclusion's title, description, + // and recommendation. + Locale *string `locationName:"locale" type:"string" enum:"Locale"` +} + +// String returns the string representation +func (s DescribeExclusionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExclusionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeExclusionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeExclusionsInput"} + if s.ExclusionArns == nil { + invalidParams.Add(request.NewErrParamRequired("ExclusionArns")) + } + if s.ExclusionArns != nil && len(s.ExclusionArns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusionArns", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExclusionArns sets the ExclusionArns field's value. +func (s *DescribeExclusionsInput) SetExclusionArns(v []*string) *DescribeExclusionsInput { + s.ExclusionArns = v + return s +} + +// SetLocale sets the Locale field's value. +func (s *DescribeExclusionsInput) SetLocale(v string) *DescribeExclusionsInput { + s.Locale = &v + return s +} + +type DescribeExclusionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the exclusions. + // + // Exclusions is a required field + Exclusions map[string]*Exclusion `locationName:"exclusions" min:"1" type:"map" required:"true"` + + // Exclusion details that cannot be described. An error code is provided for + // each failed item. + // + // FailedItems is a required field + FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"` +} + +// String returns the string representation +func (s DescribeExclusionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExclusionsOutput) GoString() string { + return s.String() +} + +// SetExclusions sets the Exclusions field's value. +func (s *DescribeExclusionsOutput) SetExclusions(v map[string]*Exclusion) *DescribeExclusionsOutput { + s.Exclusions = v + return s +} + +// SetFailedItems sets the FailedItems field's value. +func (s *DescribeExclusionsOutput) SetFailedItems(v map[string]*FailedItemDetails) *DescribeExclusionsOutput { + s.FailedItems = v + return s +} + type DescribeFindingsInput struct { _ struct{} `type:"structure"` @@ -5740,47 +6370,195 @@ func (s *DurationRange) SetMaxSeconds(v int64) *DurationRange { return s } -// SetMinSeconds sets the MinSeconds field's value. -func (s *DurationRange) SetMinSeconds(v int64) *DurationRange { - s.MinSeconds = &v +// SetMinSeconds sets the MinSeconds field's value. +func (s *DurationRange) SetMinSeconds(v int64) *DurationRange { + s.MinSeconds = &v + return s +} + +// This data type is used in the Subscription data type. +type EventSubscription struct { + _ struct{} `type:"structure"` + + // The event for which Amazon Simple Notification Service (SNS) notifications + // are sent. + // + // Event is a required field + Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` + + // The time at which SubscribeToEvent is called. + // + // SubscribedAt is a required field + SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" timestampFormat:"unix" required:"true"` +} + +// String returns the string representation +func (s EventSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventSubscription) GoString() string { + return s.String() +} + +// SetEvent sets the Event field's value. +func (s *EventSubscription) SetEvent(v string) *EventSubscription { + s.Event = &v + return s +} + +// SetSubscribedAt sets the SubscribedAt field's value. +func (s *EventSubscription) SetSubscribedAt(v time.Time) *EventSubscription { + s.SubscribedAt = &v + return s +} + +// Contains information about what was excluded from an assessment run. +type Exclusion struct { + _ struct{} `type:"structure"` + + // The ARN that specifies the exclusion. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` + + // The system-defined attributes for the exclusion. + Attributes []*Attribute `locationName:"attributes" type:"list"` + + // The description of the exclusion. + // + // Description is a required field + Description *string `locationName:"description" type:"string" required:"true"` + + // The recommendation for the exclusion. + // + // Recommendation is a required field + Recommendation *string `locationName:"recommendation" type:"string" required:"true"` + + // The AWS resources for which the exclusion pertains. + // + // Scopes is a required field + Scopes []*Scope `locationName:"scopes" min:"1" type:"list" required:"true"` + + // The name of the exclusion. + // + // Title is a required field + Title *string `locationName:"title" type:"string" required:"true"` +} + +// String returns the string representation +func (s Exclusion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Exclusion) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Exclusion) SetArn(v string) *Exclusion { + s.Arn = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *Exclusion) SetAttributes(v []*Attribute) *Exclusion { + s.Attributes = v + return s +} + +// SetDescription sets the Description field's value. +func (s *Exclusion) SetDescription(v string) *Exclusion { + s.Description = &v + return s +} + +// SetRecommendation sets the Recommendation field's value. +func (s *Exclusion) SetRecommendation(v string) *Exclusion { + s.Recommendation = &v + return s +} + +// SetScopes sets the Scopes field's value. +func (s *Exclusion) SetScopes(v []*Scope) *Exclusion { + s.Scopes = v + return s +} + +// SetTitle sets the Title field's value. +func (s *Exclusion) SetTitle(v string) *Exclusion { + s.Title = &v return s } -// This data type is used in the Subscription data type. -type EventSubscription struct { +// Contains information about what is excluded from an assessment run given +// the current state of the assessment template. +type ExclusionPreview struct { _ struct{} `type:"structure"` - // The event for which Amazon Simple Notification Service (SNS) notifications - // are sent. + // The system-defined attributes for the exclusion preview. + Attributes []*Attribute `locationName:"attributes" type:"list"` + + // The description of the exclusion preview. // - // Event is a required field - Event *string `locationName:"event" type:"string" required:"true" enum:"Event"` + // Description is a required field + Description *string `locationName:"description" type:"string" required:"true"` - // The time at which SubscribeToEvent is called. + // The recommendation for the exclusion preview. // - // SubscribedAt is a required field - SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + // Recommendation is a required field + Recommendation *string `locationName:"recommendation" type:"string" required:"true"` + + // The AWS resources for which the exclusion preview pertains. + // + // Scopes is a required field + Scopes []*Scope `locationName:"scopes" min:"1" type:"list" required:"true"` + + // The name of the exclusion preview. + // + // Title is a required field + Title *string `locationName:"title" type:"string" required:"true"` } // String returns the string representation -func (s EventSubscription) String() string { +func (s ExclusionPreview) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EventSubscription) GoString() string { +func (s ExclusionPreview) GoString() string { return s.String() } -// SetEvent sets the Event field's value. -func (s *EventSubscription) SetEvent(v string) *EventSubscription { - s.Event = &v +// SetAttributes sets the Attributes field's value. +func (s *ExclusionPreview) SetAttributes(v []*Attribute) *ExclusionPreview { + s.Attributes = v return s } -// SetSubscribedAt sets the SubscribedAt field's value. -func (s *EventSubscription) SetSubscribedAt(v time.Time) *EventSubscription { - s.SubscribedAt = &v +// SetDescription sets the Description field's value. +func (s *ExclusionPreview) SetDescription(v string) *ExclusionPreview { + s.Description = &v + return s +} + +// SetRecommendation sets the Recommendation field's value. +func (s *ExclusionPreview) SetRecommendation(v string) *ExclusionPreview { + s.Recommendation = &v + return s +} + +// SetScopes sets the Scopes field's value. +func (s *ExclusionPreview) SetScopes(v []*Scope) *ExclusionPreview { + s.Scopes = v + return s +} + +// SetTitle sets the Title field's value. +func (s *ExclusionPreview) SetTitle(v string) *ExclusionPreview { + s.Title = &v return s } @@ -6249,6 +7027,143 @@ func (s *GetAssessmentReportOutput) SetUrl(v string) *GetAssessmentReportOutput return s } +type GetExclusionsPreviewInput struct { + _ struct{} `type:"structure"` + + // The ARN that specifies the assessment template for which the exclusions preview + // was requested. + // + // AssessmentTemplateArn is a required field + AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"` + + // The locale into which you want to translate the exclusion's title, description, + // and recommendation. + Locale *string `locationName:"locale" type:"string" enum:"Locale"` + + // You can use this parameter to indicate the maximum number of items you want + // in the response. The default value is 100. The maximum value is 500. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // You can use this parameter when paginating results. Set the value of this + // parameter to null on your first call to the GetExclusionsPreviewRequest action. + // Subsequent calls to the action fill nextToken in the request with the value + // of nextToken from the previous response to continue listing data. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The unique identifier associated of the exclusions preview. + // + // PreviewToken is a required field + PreviewToken *string `locationName:"previewToken" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetExclusionsPreviewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExclusionsPreviewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetExclusionsPreviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetExclusionsPreviewInput"} + if s.AssessmentTemplateArn == nil { + invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn")) + } + if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.PreviewToken == nil { + invalidParams.Add(request.NewErrParamRequired("PreviewToken")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssessmentTemplateArn sets the AssessmentTemplateArn field's value. +func (s *GetExclusionsPreviewInput) SetAssessmentTemplateArn(v string) *GetExclusionsPreviewInput { + s.AssessmentTemplateArn = &v + return s +} + +// SetLocale sets the Locale field's value. +func (s *GetExclusionsPreviewInput) SetLocale(v string) *GetExclusionsPreviewInput { + s.Locale = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetExclusionsPreviewInput) SetMaxResults(v int64) *GetExclusionsPreviewInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetExclusionsPreviewInput) SetNextToken(v string) *GetExclusionsPreviewInput { + s.NextToken = &v + return s +} + +// SetPreviewToken sets the PreviewToken field's value. +func (s *GetExclusionsPreviewInput) SetPreviewToken(v string) *GetExclusionsPreviewInput { + s.PreviewToken = &v + return s +} + +type GetExclusionsPreviewOutput struct { + _ struct{} `type:"structure"` + + // Information about the exclusions included in the preview. + ExclusionPreviews []*ExclusionPreview `locationName:"exclusionPreviews" type:"list"` + + // When a response is generated, if there is more data to be listed, this parameters + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Specifies the status of the request to generate an exclusions preview. + // + // PreviewStatus is a required field + PreviewStatus *string `locationName:"previewStatus" type:"string" required:"true" enum:"PreviewStatus"` +} + +// String returns the string representation +func (s GetExclusionsPreviewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExclusionsPreviewOutput) GoString() string { + return s.String() +} + +// SetExclusionPreviews sets the ExclusionPreviews field's value. +func (s *GetExclusionsPreviewOutput) SetExclusionPreviews(v []*ExclusionPreview) *GetExclusionsPreviewOutput { + s.ExclusionPreviews = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetExclusionsPreviewOutput) SetNextToken(v string) *GetExclusionsPreviewOutput { + s.NextToken = &v + return s +} + +// SetPreviewStatus sets the PreviewStatus field's value. +func (s *GetExclusionsPreviewOutput) SetPreviewStatus(v string) *GetExclusionsPreviewOutput { + s.PreviewStatus = &v + return s +} + type GetTelemetryMetadataInput struct { _ struct{} `type:"structure"` @@ -6874,6 +7789,110 @@ func (s *ListEventSubscriptionsOutput) SetSubscriptions(v []*Subscription) *List return s } +type ListExclusionsInput struct { + _ struct{} `type:"structure"` + + // The ARN of the assessment run that generated the exclusions that you want + // to list. + // + // AssessmentRunArn is a required field + AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"` + + // You can use this parameter to indicate the maximum number of items you want + // in the response. The default value is 100. The maximum value is 500. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // You can use this parameter when paginating results. Set the value of this + // parameter to null on your first call to the ListExclusionsRequest action. + // Subsequent calls to the action fill nextToken in the request with the value + // of nextToken from the previous response to continue listing data. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s ListExclusionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListExclusionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListExclusionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListExclusionsInput"} + if s.AssessmentRunArn == nil { + invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn")) + } + if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssessmentRunArn sets the AssessmentRunArn field's value. +func (s *ListExclusionsInput) SetAssessmentRunArn(v string) *ListExclusionsInput { + s.AssessmentRunArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListExclusionsInput) SetMaxResults(v int64) *ListExclusionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListExclusionsInput) SetNextToken(v string) *ListExclusionsInput { + s.NextToken = &v + return s +} + +type ListExclusionsOutput struct { + _ struct{} `type:"structure"` + + // A list of exclusions' ARNs returned by the action. + // + // ExclusionArns is a required field + ExclusionArns []*string `locationName:"exclusionArns" type:"list" required:"true"` + + // When a response is generated, if there is more data to be listed, this parameters + // is present in the response and contains the value to use for the nextToken + // parameter in a subsequent pagination request. If there is no more data to + // be listed, this parameter is set to null. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s ListExclusionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListExclusionsOutput) GoString() string { + return s.String() +} + +// SetExclusionArns sets the ExclusionArns field's value. +func (s *ListExclusionsOutput) SetExclusionArns(v []*string) *ListExclusionsOutput { + s.ExclusionArns = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListExclusionsOutput) SetNextToken(v string) *ListExclusionsOutput { + s.NextToken = &v + return s +} + type ListFindingsInput struct { _ struct{} `type:"structure"` @@ -7556,6 +8575,39 @@ func (s *RulesPackage) SetVersion(v string) *RulesPackage { return s } +// This data type contains key-value pairs that identify various Amazon resources. +type Scope struct { + _ struct{} `type:"structure"` + + // The type of the scope. + Key *string `locationName:"key" type:"string" enum:"ScopeType"` + + // The resource identifier for the specified scope type. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Scope) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scope) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Scope) SetKey(v string) *Scope { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Scope) SetValue(v string) *Scope { + s.Value = &v + return s +} + // This data type is used in the Finding data type. type ServiceAttributes struct { _ struct{} `type:"structure"` @@ -8644,6 +9696,14 @@ const ( NoSuchEntityErrorCodeIamRoleDoesNotExist = "IAM_ROLE_DOES_NOT_EXIST" ) +const ( + // PreviewStatusWorkInProgress is a PreviewStatus enum value + PreviewStatusWorkInProgress = "WORK_IN_PROGRESS" + + // PreviewStatusCompleted is a PreviewStatus enum value + PreviewStatusCompleted = "COMPLETED" +) + const ( // ReportFileFormatHtml is a ReportFileFormat enum value ReportFileFormatHtml = "HTML" @@ -8671,6 +9731,14 @@ const ( ReportTypeFull = "FULL" ) +const ( + // ScopeTypeInstanceId is a ScopeType enum value + ScopeTypeInstanceId = "INSTANCE_ID" + + // ScopeTypeRulesPackageArn is a ScopeType enum value + ScopeTypeRulesPackageArn = "RULES_PACKAGE_ARN" +) + const ( // SeverityLow is a Severity enum value SeverityLow = "Low" diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go index abdadcccbb6..8d532b03ed5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/errors.go @@ -58,6 +58,13 @@ const ( // The error code describes the entity. ErrCodeNoSuchEntityException = "NoSuchEntityException" + // ErrCodePreviewGenerationInProgressException for service response error code + // "PreviewGenerationInProgressException". + // + // The request is rejected. The specified assessment template is currently generating + // an exclusions preview. + ErrCodePreviewGenerationInProgressException = "PreviewGenerationInProgressException" + // ErrCodeUnsupportedFeatureException for service response error code // "UnsupportedFeatureException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 07fc06af1f9..f83dcb8ecc7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -7066,6 +7066,11 @@ func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule { type CSVInput struct { _ struct{} `type:"structure"` + // Specifies that CSV field values may contain quoted record delimiters and + // such records should be allowed. Default value is FALSE. Setting this value + // to TRUE may lower performance. + AllowQuotedRecordDelimiter *bool `type:"boolean"` + // Single character used to indicate a row should be ignored when present at // the start of a row. Comments *string `type:"string"` @@ -7097,6 +7102,12 @@ func (s CSVInput) GoString() string { return s.String() } +// SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value. +func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput { + s.AllowQuotedRecordDelimiter = &v + return s +} + // SetComments sets the Comments field's value. func (s *CSVInput) SetComments(v string) *CSVInput { s.Comments = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index 357583fcada..1cd7f4b96e8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -119,9 +119,16 @@ func (c *SecretsManager) CancelRotateSecretRequest(input *CancelRotateSecretInpu // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CancelRotateSecret func (c *SecretsManager) CancelRotateSecret(input *CancelRotateSecretInput) (*CancelRotateSecretOutput, error) { @@ -272,9 +279,16 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeLimitExceededException "LimitExceededException" // The request failed because it would exceed one of the Secrets Manager internal @@ -298,6 +312,9 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // * ErrCodeInternalServiceError "InternalServiceError" // An error occurred on the server side. // +// * ErrCodePreconditionNotMetException "PreconditionNotMetException" +// The request failed because you did not complete all the prerequisite steps. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/CreateSecret func (c *SecretsManager) CreateSecret(input *CreateSecretInput) (*CreateSecretOutput, error) { req, out := c.CreateSecretRequest(input) @@ -320,6 +337,116 @@ func (c *SecretsManager) CreateSecretWithContext(ctx aws.Context, input *CreateS return out, req.Send() } +const opDeleteResourcePolicy = "DeleteResourcePolicy" + +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy +func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { + op := &request.Operation{ + Name: opDeleteResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResourcePolicyInput{} + } + + output = &DeleteResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResourcePolicy API operation for AWS Secrets Manager. +// +// Deletes the resource-based policy currently attached to the secret. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:DeleteResourcePolicy +// +// Related operations +// +// * To attach a resource policy to a secret, use PutResourcePolicy. +// +// * To retrieve the current resource-based policy that is attached to a +// secret, use GetResourcePolicy. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation DeleteResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/DeleteResourcePolicy +func (c *SecretsManager) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + return out, req.Send() +} + +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteSecret = "DeleteSecret" // DeleteSecretRequest generates a "aws/request.Request" representing the @@ -417,9 +544,16 @@ func (c *SecretsManager) DeleteSecretRequest(input *DeleteSecretInput) (req *req // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeInternalServiceError "InternalServiceError" // An error occurred on the server side. @@ -614,9 +748,16 @@ func (c *SecretsManager) GetRandomPasswordRequest(input *GetRandomPasswordInput) // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeInternalServiceError "InternalServiceError" // An error occurred on the server side. @@ -643,6 +784,119 @@ func (c *SecretsManager) GetRandomPasswordWithContext(ctx aws.Context, input *Ge return out, req.Send() } +const opGetResourcePolicy = "GetResourcePolicy" + +// GetResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourcePolicy for more information on using the GetResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourcePolicyRequest method. +// req, resp := client.GetResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy +func (c *SecretsManager) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { + op := &request.Operation{ + Name: opGetResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResourcePolicyInput{} + } + + output = &GetResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourcePolicy API operation for AWS Secrets Manager. +// +// Retrieves the JSON text of the resource-based policy attached to the specified +// secret. The JSON request string input and response output are shown formatted +// with whitespace and line breaks for better readability. Submit your input +// as a single line JSON string. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:GetResourcePolicy +// +// Related operations +// +// * To attach a resource policy to a secret, use PutResourcePolicy. +// +// * To delete the resource-based policy that is attached to a secret, use +// DeleteResourcePolicy. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation GetResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/GetResourcePolicy +func (c *SecretsManager) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + return out, req.Send() +} + +// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetSecretValue = "GetSecretValue" // GetSecretValueRequest generates a "aws/request.Request" representing the @@ -723,9 +977,16 @@ func (c *SecretsManager) GetSecretValueRequest(input *GetSecretValueInput) (req // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeDecryptionFailure "DecryptionFailure" // Secrets Manager can't decrypt the protected secret text using the provided @@ -1076,6 +1337,131 @@ func (c *SecretsManager) ListSecretsPagesWithContext(ctx aws.Context, input *Lis return p.Err() } +const opPutResourcePolicy = "PutResourcePolicy" + +// PutResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutResourcePolicy for more information on using the PutResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutResourcePolicyRequest method. +// req, resp := client.PutResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy +func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { + op := &request.Operation{ + Name: opPutResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutResourcePolicyInput{} + } + + output = &PutResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutResourcePolicy API operation for AWS Secrets Manager. +// +// Attaches the contents of the specified resource-based policy to a secret. +// A resource-based policy is optional. Alternatively, you can use IAM user-based +// policies that specify the secret's ARN in the policy statement's Resources +// element. You can also use a combination of both identity- an resource-based +// policies. The affected users and roles receive the permissions permitted +// by all of the relevant policies. For more information, see Using Resource-Based +// Policies for AWS Secrets Manager (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). +// For the complete description of the AWS policy syntax and grammar, see IAM +// JSON Policy Reference (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) +// in the IAM User Guide. +// +// Minimum permissions +// +// To run this command, you must have the following permissions: +// +// * secretsmanager:PutResourcePolicy +// +// Related operations +// +// * To retrieve the resource policy attached to a secret, use GetResourcePolicy. +// +// * To delete the resource-based policy that is attached to a secret, use +// DeleteResourcePolicy. +// +// * To list all of the currently available secrets, use ListSecrets. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Secrets Manager's +// API operation PutResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" +// The policy document that you provided isn't valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// We can't find the resource that you asked for. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// You provided an invalid value for a parameter. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An error occurred on the server side. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/PutResourcePolicy +func (c *SecretsManager) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + return out, req.Send() +} + +// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SecretsManager) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutSecretValue = "PutSecretValue" // PutSecretValueRequest generates a "aws/request.Request" representing the @@ -1203,9 +1589,16 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeLimitExceededException "LimitExceededException" // The request failed because it would exceed one of the Secrets Manager internal @@ -1321,9 +1714,16 @@ func (c *SecretsManager) RestoreSecretRequest(input *RestoreSecretInput) (req *r // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeInternalServiceError "InternalServiceError" // An error occurred on the server side. @@ -1463,9 +1863,16 @@ func (c *SecretsManager) RotateSecretRequest(input *RotateSecretInput) (req *req // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotateSecret func (c *SecretsManager) RotateSecret(input *RotateSecretInput) (*RotateSecretOutput, error) { @@ -1590,6 +1997,19 @@ func (c *SecretsManager) TagResourceRequest(input *TagResourceInput) (req *reque // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // We can't find the resource that you asked for. // +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// // * ErrCodeInvalidParameterException "InvalidParameterException" // You provided an invalid value for a parameter. // @@ -1698,6 +2118,19 @@ func (c *SecretsManager) UntagResourceRequest(input *UntagResourceInput) (req *r // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // We can't find the resource that you asked for. // +// * ErrCodeInvalidRequestException "InvalidRequestException" +// You provided a parameter value that is not valid for the current state of +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. +// // * ErrCodeInvalidParameterException "InvalidParameterException" // You provided an invalid value for a parameter. // @@ -1847,9 +2280,16 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeLimitExceededException "LimitExceededException" // The request failed because it would exceed one of the Secrets Manager internal @@ -1873,6 +2313,9 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // * ErrCodeInternalServiceError "InternalServiceError" // An error occurred on the server side. // +// * ErrCodePreconditionNotMetException "PreconditionNotMetException" +// The request failed because you did not complete all the prerequisite steps. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/UpdateSecret func (c *SecretsManager) UpdateSecret(input *UpdateSecretInput) (*UpdateSecretOutput, error) { req, out := c.UpdateSecretRequest(input) @@ -1989,9 +2432,16 @@ func (c *SecretsManager) UpdateSecretVersionStageRequest(input *UpdateSecretVers // // * ErrCodeInvalidRequestException "InvalidRequestException" // You provided a parameter value that is not valid for the current state of -// the resource. For example, if you try to enable rotation on a secret, you -// must already have a Lambda function ARN configured or included as a parameter -// in this call. +// the resource. +// +// Possible causes: +// +// * You tried to perform the operation on a secret that's currently marked +// deleted. +// +// * You tried to enable rotation on a secret that doesn't already have a +// Lambda function ARN configured and you didn't include such an ARN as a +// parameter in this call. // // * ErrCodeLimitExceededException "LimitExceededException" // The request failed because it would exceed one of the Secrets Manager internal @@ -2389,6 +2839,81 @@ func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { return s } +type DeleteResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret for which you want to delete the attached resource-based + // policy. You can specify either the Amazon Resource Name (ARN) or the friendly + // name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *DeleteResourcePolicyInput) SetSecretId(v string) *DeleteResourcePolicyInput { + s.SecretId = &v + return s +} + +type DeleteResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret for which the resource-based policy was deleted. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret for which the resource-based policy was deleted. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *DeleteResourcePolicyOutput) SetARN(v string) *DeleteResourcePolicyOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteResourcePolicyOutput) SetName(v string) *DeleteResourcePolicyOutput { + s.Name = &v + return s +} + type DeleteSecretInput struct { _ struct{} `type:"structure"` @@ -2819,6 +3344,96 @@ func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPassword return s } +type GetResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the secret for which you want to retrieve the attached resource-based + // policy. You can specify either the Amazon Resource Name (ARN) or the friendly + // name of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourcePolicyInput"} + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretId sets the SecretId field's value. +func (s *GetResourcePolicyInput) SetSecretId(v string) *GetResourcePolicyInput { + s.SecretId = &v + return s +} + +type GetResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret for which the resource-based policy was retrieved. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret for which the resource-based policy was retrieved. + Name *string `min:"1" type:"string"` + + // A JSON-formatted string that describes the permissions associated with the + // attached secret. These permissions are combined with any permissions associated + // with the user or role who attempts to access this secret. The combined permissions + // specify who can access the secret and what actions they can perform. For + // more information, see Authentication and Access Control for AWS Secrets Manager + // (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html) + // in the AWS Secrets Manager User Guide. + ResourcePolicy *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *GetResourcePolicyOutput) SetARN(v string) *GetResourcePolicyOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetResourcePolicyOutput) SetName(v string) *GetResourcePolicyOutput { + s.Name = &v + return s +} + +// SetResourcePolicy sets the ResourcePolicy field's value. +func (s *GetResourcePolicyOutput) SetResourcePolicy(v string) *GetResourcePolicyOutput { + s.ResourcePolicy = &v + return s +} + type GetSecretValueInput struct { _ struct{} `type:"structure"` @@ -3250,6 +3865,103 @@ func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutp return s } +type PutResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // A JSON-formatted string constructed according to the grammar and syntax for + // an AWS resource-based policy. The policy in the string identifies who can + // access or manage this secret and its versions. For information on how to + // format a JSON parameter for the various command line tool environments, see + // Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // in the AWS CLI User Guide. + // + // ResourcePolicy is a required field + ResourcePolicy *string `min:"1" type:"string" required:"true"` + + // Specifies the secret to which you want to attach the resource-based policy. + // You can specify either the Amazon Resource Name (ARN) or the friendly name + // of the secret. + // + // SecretId is a required field + SecretId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} + if s.ResourcePolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ResourcePolicy")) + } + if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) + } + if s.SecretId == nil { + invalidParams.Add(request.NewErrParamRequired("SecretId")) + } + if s.SecretId != nil && len(*s.SecretId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourcePolicy sets the ResourcePolicy field's value. +func (s *PutResourcePolicyInput) SetResourcePolicy(v string) *PutResourcePolicyInput { + s.ResourcePolicy = &v + return s +} + +// SetSecretId sets the SecretId field's value. +func (s *PutResourcePolicyInput) SetSecretId(v string) *PutResourcePolicyInput { + s.SecretId = &v + return s +} + +type PutResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the secret for which the resource-based policy was retrieved. + ARN *string `min:"20" type:"string"` + + // The friendly name of the secret for which the resource-based policy was retrieved. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *PutResourcePolicyOutput) SetARN(v string) *PutResourcePolicyOutput { + s.ARN = &v + return s +} + +// SetName sets the Name field's value. +func (s *PutResourcePolicyOutput) SetName(v string) *PutResourcePolicyOutput { + s.Name = &v + return s +} + type PutSecretValueInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go index 46b28d334b9..b3c0c48fdcc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/errors.go @@ -42,9 +42,16 @@ const ( // "InvalidRequestException". // // You provided a parameter value that is not valid for the current state of - // the resource. For example, if you try to enable rotation on a secret, you - // must already have a Lambda function ARN configured or included as a parameter - // in this call. + // the resource. + // + // Possible causes: + // + // * You tried to perform the operation on a secret that's currently marked + // deleted. + // + // * You tried to enable rotation on a secret that doesn't already have a + // Lambda function ARN configured and you didn't include such an ARN as a + // parameter in this call. ErrCodeInvalidRequestException = "InvalidRequestException" // ErrCodeLimitExceededException for service response error code @@ -60,6 +67,12 @@ const ( // The policy document that you provided isn't valid. ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException" + // ErrCodePreconditionNotMetException for service response error code + // "PreconditionNotMetException". + // + // The request failed because you did not complete all the prerequisite steps. + ErrCodePreconditionNotMetException = "PreconditionNotMetException" + // ErrCodeResourceExistsException for service response error code // "ResourceExistsException". // diff --git a/vendor/vendor.json b/vendor/vendor.json index 289fc68c062..1af7c3f7a92 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,972 +39,972 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "c9/ZRCZXp9Q2wzRTWiEC6JAlC/g=", + "checksumSHA1": "RVZfumYpBd2IRNpNI0UDX91cba4=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "925zPp8gtaXi2gkWrgZ1gAA003A=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "W4R+WW4t2Ty5mbKypFoATk3tqTA=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "SiJtmziOCUHNwVwWjrD5ccxbEN0=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "CYLheDSqXftEAmmdj+tTiT+83Ko=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "+d8hhT6Ih+DsRpkF44pvw+IkI7w=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "u3cA2IiD36A+VnFIH7XtGjYk2NU=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Ij9RP5HrBWBYYb3/LEMHNNZXH9g=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "2ywNMWQ3qxbz/dzuuOC/42xXzWM=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "/JJPEdYxSgTTDqUDTAaSJQSKNn0=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "/2Ppb4vP/H+B3cM7bOOEeA7Z0iY=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "6zosteWJqUGM9+t9dkANQymMA9s=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "ZXFD3oHS8QZ3GgWn+k4lMnUaEUk=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "k1TqEWHeP84mmRewv19ZVORhSm8=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "MKWkj+pGwGygVTVTg/Q38JY+mhU=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "hq8SWUb/J1wEZ1O3TkV8xma5EXk=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "NaaFnxUCj2cKaWagwc9ZP6Su2UQ=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "/nF1VEl/Y9I9EYbUHvUuhqjipUk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "kko+es9ly+l/e9ngcpCdPx2DBAc=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "kHOf0VEd2Qy8PYZsg7/zG+JkF1o=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "gJiK41PSoCEfE02VEry4f6nBg0s=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "bbCNma+YJRqcjnIqmTagqs1IwWI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "qbncX66lCkonIyPd/YimSRtSzhI=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "P8cLAj/ovFt7uH3bB4dRg/2KApI=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "eCrAi2QJw0Ft6A8XK5ZGLpsPKwM=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "ItkRLsVGZt8uvkI4+7+mi9Ccy28=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Y+x1N7TFB7OesWPRoYXRwGOdQzs=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "PxsIahbkFuks12VthBlqFJIUzX0=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "ciAsJhe41ygl47dhStzMJfGVFPQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "tHLvGt81PahiKYHOXlF7bFvE9cE=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Q+W+AVveTI7xM3ay6HAi0FB4Dpc=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "6lozLpoMkQvw1r2cZMXujYiLqK8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "uIURH7FXD0WRKqSv2uNsMM4a1nE=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "iPP1QQAsTiK0TYWVn7ksDLfDXDE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "JbgQL/r+cBKIKt+tQY8VSj0C2j8=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "orboEPrXFUPc3m7ZG8uPhZNZDdM=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "C0by27wccwVfdXwaNNyvDEYUPdA=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "/zBS/FARxFnNMfLUg1Vq1FVK95c=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "olDBindEWwTHzKfpWaS+xID4y90=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "i7fuDfXYhe4JMJhail5nZUg69Dk=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "jURA8oKlQkbYPPrBQIeOPbQAVN0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "GFq6SaQ4h48iP+gjllWjMyIbQfU=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "SfYmxNsUZdSLy6VahSyRVaACeSU=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "T4Yw3GPZg+KwAEudsypRfhbUrVw=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "niBN6QYBEhoHvxQpSH8qWjEMNYo=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "cmqLlPyg/fwIy8M3qaZTdBt0CGQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "mzgRjocmzU6VLUsim7E8/fffffk=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "A5DCzVFhE5iT60fQXjlyLDHKFsg=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "qMusrd+gH5em91bS9/tvXBfnivQ=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "aNIs4oJTp3x73Fx24tKO2cDY5OM=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "cRuJDtc9rVpXUqfLrg1cJleaPjQ=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "XKNeVP6DCohd9Re9g4xGLuqXe0c=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "MWADuSvEQnYoVAI/HCnmJetMle4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "X+8twdJk/x1+8y1LxnKXXd3eVoY=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "PJQ5SFC+Ai5Mqn8rfGhuwttfqZk=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "xI94HsdAG+dBFCm38FoELBdbe9c=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "FEfr6yYlSRWsIV0M0kxm0/jOw0E=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "k/XNa0qsR9DMIG8Sqg4cGlePTKE=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "1tAb3rvB34c3zsX+DRY5xDJqNUA=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { - "checksumSHA1": "/QVDbdrmz2TRkMG1m/aCmuAWfIk=", + "checksumSHA1": "si/Re/DEfX8xWIjpLS4NNISO/Ns=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Q2K/MWy6yy/kV9CZ0YhaEHBNgkI=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "OvCoIYyhBSlrCvsk8uidGznXIss=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "44R3VB9KreeYj0LFf3KBd37kPXI=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "r5C9HizIrv+MWzpgHoJstHKZOOE=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "zrWHv2XG/KP9E82ophSO0XF+Cu8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "xq1jxTLdjjWU+aupMh143C+Yb1Q=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "onhxya8p2Q2wgT2TakO+ZcjwY/I=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "HoX+EX8JW8kDZxJAs8545YRfjuI=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "ahm1SzqWwGUqPih6jPZwIevl2Pg=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "0YZZzbKYjappFNT8MUR5qNGQkRY=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "rrANYUKEHHEofZJYCP1pQhO35TE=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "p/+jOAMB5MSAnPloxJIFy77Hfck=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "W6AvJYPtvCLTeA0USbhvid2rP1o=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "yV8F3bM8W2kSZJH4TDx4mJWnrac=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Davg8yRIMOcfa7/6zp7Fj6GnpuA=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "32fGeVnRDBhJlp3Oc25r4R2M3oc=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "KRtVvKvBRTs2cTTuiRWzjhJ8OC0=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "oe9xtK3GMCwCDmra0+JC6GwJ99k=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { - "checksumSHA1": "nWA8sdsU3+nBLaN1Jk0zWRtuD6Q=", + "checksumSHA1": "YB8Nvesxefrheq/zAGyO3NzSEYI=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "zTqXRGkYH+IyYOH5Uezj2M4B9xM=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { - "checksumSHA1": "p3B8yEFBlkwheiXKRHtLz/Yvcew=", + "checksumSHA1": "bFSEGt/5kqW51wnxs2CWyBh83RU=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "x2vfgk/EnGjOWPywWL+LKJKYCF0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Z61MRqI0vu8oGAaCZSCDes9gIvk=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "TPGJU1VzYOhJIdTbWal1ivDwT+4=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "7kmVHadImICOa4/MOXErR53CdbQ=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Zu/wepnCWpEe8M2DEYTaVTteys8=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "uguCtF1eoCG71dvEVqrYbFs7py0=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "vlL9ibWgidiPj0uQ2L/OF6DCVEs=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "Ro5RX6aw32UGrGueBK+zhA8+Z30=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "UGQwnAeB9SoJKyPPIpbDJVQws5g=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "e79e9fd4ec11ccc242a472f980be78830f9eba80", - "revisionTime": "2018-06-22T22:18:31Z", - "version": "v1.14.13", - "versionExact": "v1.14.13" + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 861f481f02594d06543dff99dd1515a564d10a48 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 27 Jun 2018 07:36:04 -0400 Subject: [PATCH 1641/3316] Update CHANGELOG for #4991 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6795b81fc1..58b63c096db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.25.0 (Unreleased) +NOTES: + +* resource/aws_instance: Starting around June 21, 2018, the EC2 API began responding with an empty string value for user data for some instances instead of a completely empty response. In Terraform, it would show as a difference of `user_data: "da39a3ee5e6b4b0d3255bfef95601890afd80709" => "" (forces new resource)` if the `user_data` argument was not defined in the Terraform configuration for the resource. This release ignores that difference as equivalent. + FEATURES: * **New Data Source:** `aws_codecommit_repository` [GH-4934] @@ -33,6 +37,7 @@ BUG FIXES: * resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] * resource/aws_db_instance: Properly raise any `ListTagsForResource` error instead of presenting a perpetual difference with `tags` [GH-4943] * resource/aws_instance: Prevent extraneous ModifyInstanceAttribute call for `disable_api_termination` on resource creation [GH-4941] +* resource/aws_instance: Ignore empty string SHA (`da39a3ee5e6b4b0d3255bfef95601890afd80709`) `user_data` difference due to EC2 API response changes [GH-4991] * resource/aws_launch_template: Prevent error when using `valid_until` [GH-4952] * resource/aws_route: Properly force resource recreation when updating `route_table_id` [GH-4946] * resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] From 5781220a5d2429f6fcd6135a4c2543a08a2e0b71 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 27 Jun 2018 07:38:35 -0400 Subject: [PATCH 1642/3316] Update CHANGELOG for #3501 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b63c096db..3163a653664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ ENHANCEMENTS: * resource/aws_codebuild_project: Support resource import [GH-4976] * resource/aws_ecs_service: Add `scheduling_strategy` argument (support `DAEMON` scheduling strategy) [GH-4825] * resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] +* resource/aws_media_store_container: Support resource import [GH-3501] * resource/aws_network_acl: Add full mapping of protocol names to protocol numbers [GH-4956] * resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers [GH-4956] * resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] From fc8e0a40ef93d2f4fc804f5ab581e366f77cdc6a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 27 Jun 2018 07:46:08 -0400 Subject: [PATCH 1643/3316] Update CHANGELOG for #3507 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3163a653664..a3379457145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ FEATURES: * **New Resource:** `aws_dx_hosted_public_virtual_interface_accepter` [GH-3254] * **New Resource:** `aws_dx_private_virtual_interface` [GH-3253] * **New Resource:** `aws_dx_public_virtual_interface` [GH-3252] +* **New Resource:** `aws_media_store_container_policy` [GH-3507] ENHANCEMENTS: From 87215b7baa5106af32f6da282138c96886e8e31a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 27 Jun 2018 09:01:10 -0400 Subject: [PATCH 1644/3316] data-source/aws_security_groups: Implement #2947 PR feedback make testacc TEST=./aws TESTARGS='-run=TestAccDataSourceAwsSecurityGroups' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccDataSourceAwsSecurityGroups -timeout 120m === RUN TestAccDataSourceAwsSecurityGroups_tag --- PASS: TestAccDataSourceAwsSecurityGroups_tag (31.31s) === RUN TestAccDataSourceAwsSecurityGroups_filter --- PASS: TestAccDataSourceAwsSecurityGroups_filter (28.44s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 59.788s --- aws/data_source_aws_security_groups.go | 16 ++++++---------- website/aws.erb | 2 +- website/docs/d/security_group.html.markdown | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/aws/data_source_aws_security_groups.go b/aws/data_source_aws_security_groups.go index 603d655375e..aa00db51888 100644 --- a/aws/data_source_aws_security_groups.go +++ b/aws/data_source_aws_security_groups.go @@ -2,11 +2,12 @@ package aws import ( "fmt" + "log" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "log" ) func dataSourceAwsSecurityGroups() *schema.Resource { @@ -55,26 +56,21 @@ func dataSourceAwsSecurityGroupsRead(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Reading Security Groups with request: %s", req) var ids, vpc_ids []string - nextToken := "" for { - if nextToken != "" { - req.NextToken = aws.String(nextToken) - } - resp, err := conn.DescribeSecurityGroups(req) if err != nil { - return err + return fmt.Errorf("error reading security groups: %s", err) } for _, sg := range resp.SecurityGroups { - ids = append(ids, *sg.GroupId) - vpc_ids = append(vpc_ids, *sg.VpcId) + ids = append(ids, aws.StringValue(sg.GroupId)) + vpc_ids = append(vpc_ids, aws.StringValue(sg.VpcId)) } if resp.NextToken == nil { break } - nextToken = *resp.NextToken + req.NextToken = resp.NextToken } if len(ids) < 1 { diff --git a/website/aws.erb b/website/aws.erb index c7f8b78225e..01fba3efc5e 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -307,7 +307,7 @@ > aws_secretsmanager_secret_version - > + > aws_security_group > diff --git a/website/docs/d/security_group.html.markdown b/website/docs/d/security_group.html.markdown index 65175790033..3e4f59e143d 100644 --- a/website/docs/d/security_group.html.markdown +++ b/website/docs/d/security_group.html.markdown @@ -1,7 +1,7 @@ --- layout: "aws" page_title: "AWS: aws_security_group" -sidebar_current: "docs-aws-datasource-security-group" +sidebar_current: "docs-aws-datasource-security-group-x" description: |- Provides details about a specific Security Group --- From f9d1ca3ec98fe42ba7cc1676690c94218b7ace10 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 27 Jun 2018 09:02:13 -0400 Subject: [PATCH 1645/3316] Update CHANGELOG for #2947 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3379457145..fde0f966fd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ FEATURES: * **New Data Source:** `aws_dx_gateway` [GH-4988] * **New Data Source:** `aws_network_acls` [GH-4966] * **New Data Source:** `aws_route_tables` [GH-4841] +* **New Data Source:** `aws_security_groups` [GH-2947] * **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] * **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` [GH-3255] * **New Resource:** `aws_dx_hosted_public_virtual_interface` [GH-3254] From f09d5b59b28c2160f439f78b11343dd7e04883ca Mon Sep 17 00:00:00 2001 From: Gauthier Wallet Date: Wed, 27 Jun 2018 15:08:36 +0200 Subject: [PATCH 1646/3316] Update the AppSync DataSource types documentation --- website/docs/r/appsync_datasource.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/appsync_datasource.html.markdown b/website/docs/r/appsync_datasource.html.markdown index b28f1d2cd52..e2f2f017068 100644 --- a/website/docs/r/appsync_datasource.html.markdown +++ b/website/docs/r/appsync_datasource.html.markdown @@ -88,7 +88,7 @@ The following arguments are supported: * `api_id` - (Required) The API ID for the GraphQL API for the DataSource. * `name` - (Required) A user-supplied name for the DataSource. -* `type` - (Required) The type of the DataSource. Valid values: `AWS_LAMBDA`, `AMAZON_DYNAMODB` and `AMAZON_ELASTICSEARCH` +* `type` - (Required) The type of the DataSource. Valid values: `AWS_LAMBDA`, `AMAZON_DYNAMODB` and `AMAZON_ELASTICSEARCH`, `NONE`. * `description` - (Optional) A description of the DataSource. * `service_role_arn` - (Optional) The IAM service role ARN for the data source. * `dynamodb_config` - (Optional) DynamoDB settings. See [below](#dynamodb_config) From 34d3d23fa5f6db073e3bba4903e582ad905e1e94 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 27 Jun 2018 13:39:54 +0000 Subject: [PATCH 1647/3316] v1.25.0 --- CHANGELOG.md | 68 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fde0f966fd5..218e5c32e2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.25.0 (Unreleased) +## 1.25.0 (June 27, 2018) NOTES: @@ -6,45 +6,45 @@ NOTES: FEATURES: -* **New Data Source:** `aws_codecommit_repository` [GH-4934] -* **New Data Source:** `aws_dx_gateway` [GH-4988] -* **New Data Source:** `aws_network_acls` [GH-4966] -* **New Data Source:** `aws_route_tables` [GH-4841] -* **New Data Source:** `aws_security_groups` [GH-2947] -* **New Resource:** `aws_dx_hosted_private_virtual_interface` [GH-3255] -* **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` [GH-3255] -* **New Resource:** `aws_dx_hosted_public_virtual_interface` [GH-3254] -* **New Resource:** `aws_dx_hosted_public_virtual_interface_accepter` [GH-3254] -* **New Resource:** `aws_dx_private_virtual_interface` [GH-3253] -* **New Resource:** `aws_dx_public_virtual_interface` [GH-3252] -* **New Resource:** `aws_media_store_container_policy` [GH-3507] +* **New Data Source:** `aws_codecommit_repository` ([#4934](https://github.com/terraform-providers/terraform-provider-aws/issues/4934)) +* **New Data Source:** `aws_dx_gateway` ([#4988](https://github.com/terraform-providers/terraform-provider-aws/issues/4988)) +* **New Data Source:** `aws_network_acls` ([#4966](https://github.com/terraform-providers/terraform-provider-aws/issues/4966)) +* **New Data Source:** `aws_route_tables` ([#4841](https://github.com/terraform-providers/terraform-provider-aws/issues/4841)) +* **New Data Source:** `aws_security_groups` ([#2947](https://github.com/terraform-providers/terraform-provider-aws/issues/2947)) +* **New Resource:** `aws_dx_hosted_private_virtual_interface` ([#3255](https://github.com/terraform-providers/terraform-provider-aws/issues/3255)) +* **New Resource:** `aws_dx_hosted_private_virtual_interface_accepter` ([#3255](https://github.com/terraform-providers/terraform-provider-aws/issues/3255)) +* **New Resource:** `aws_dx_hosted_public_virtual_interface` ([#3254](https://github.com/terraform-providers/terraform-provider-aws/issues/3254)) +* **New Resource:** `aws_dx_hosted_public_virtual_interface_accepter` ([#3254](https://github.com/terraform-providers/terraform-provider-aws/issues/3254)) +* **New Resource:** `aws_dx_private_virtual_interface` ([#3253](https://github.com/terraform-providers/terraform-provider-aws/issues/3253)) +* **New Resource:** `aws_dx_public_virtual_interface` ([#3252](https://github.com/terraform-providers/terraform-provider-aws/issues/3252)) +* **New Resource:** `aws_media_store_container_policy` ([#3507](https://github.com/terraform-providers/terraform-provider-aws/issues/3507)) ENHANCEMENTS: -* provider: Support custom endpoint for `autoscaling` [GH-4970] -* resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type [GH-4960] -* resource/aws_codebuild_project: Support resource import [GH-4976] -* resource/aws_ecs_service: Add `scheduling_strategy` argument (support `DAEMON` scheduling strategy) [GH-4825] -* resource/aws_iam_instance_profile: Add `create_date` attribute [GH-4932] -* resource/aws_media_store_container: Support resource import [GH-3501] -* resource/aws_network_acl: Add full mapping of protocol names to protocol numbers [GH-4956] -* resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers [GH-4956] -* resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` [GH-4929] -* resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` [GH-2514] -* resource/aws_waf_ipset: Support resource import [GH-4979] -* resource/aws_wafregional_web_acl: Add rule `type` argument (support rate limited rules) [GH-4307] / [GH-4978] +* provider: Support custom endpoint for `autoscaling` ([#4970](https://github.com/terraform-providers/terraform-provider-aws/issues/4970)) +* resource/aws_codebuild_project: Support `WINDOWS_CONTAINER` as valid environment type ([#4960](https://github.com/terraform-providers/terraform-provider-aws/issues/4960)) +* resource/aws_codebuild_project: Support resource import ([#4976](https://github.com/terraform-providers/terraform-provider-aws/issues/4976)) +* resource/aws_ecs_service: Add `scheduling_strategy` argument (support `DAEMON` scheduling strategy) ([#4825](https://github.com/terraform-providers/terraform-provider-aws/issues/4825)) +* resource/aws_iam_instance_profile: Add `create_date` attribute ([#4932](https://github.com/terraform-providers/terraform-provider-aws/issues/4932)) +* resource/aws_media_store_container: Support resource import ([#3501](https://github.com/terraform-providers/terraform-provider-aws/issues/3501)) +* resource/aws_network_acl: Add full mapping of protocol names to protocol numbers ([#4956](https://github.com/terraform-providers/terraform-provider-aws/issues/4956)) +* resource/aws_network_acl_rule: Add full mapping of protocol names to protocol numbers ([#4956](https://github.com/terraform-providers/terraform-provider-aws/issues/4956)) +* resource/aws_sqs_queue: Add .fifo suffix for FIFO queues using `name_prefix` ([#4929](https://github.com/terraform-providers/terraform-provider-aws/issues/4929)) +* resource/aws_vpc: Support update of `instance_tenancy` from `dedicated` to `default` ([#2514](https://github.com/terraform-providers/terraform-provider-aws/issues/2514)) +* resource/aws_waf_ipset: Support resource import ([#4979](https://github.com/terraform-providers/terraform-provider-aws/issues/4979)) +* resource/aws_wafregional_web_acl: Add rule `type` argument (support rate limited rules) ([#4307](https://github.com/terraform-providers/terraform-provider-aws/issues/4307)] / [[#4978](https://github.com/terraform-providers/terraform-provider-aws/issues/4978)) BUG FIXES: -* data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 [GH-4927] -* resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read [GH-4917] -* resource/aws_db_instance: Properly raise any `ListTagsForResource` error instead of presenting a perpetual difference with `tags` [GH-4943] -* resource/aws_instance: Prevent extraneous ModifyInstanceAttribute call for `disable_api_termination` on resource creation [GH-4941] -* resource/aws_instance: Ignore empty string SHA (`da39a3ee5e6b4b0d3255bfef95601890afd80709`) `user_data` difference due to EC2 API response changes [GH-4991] -* resource/aws_launch_template: Prevent error when using `valid_until` [GH-4952] -* resource/aws_route: Properly force resource recreation when updating `route_table_id` [GH-4946] -* resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors [GH-4903] -* resource/aws_ses_receipt_rule: Prevent error with `s3_action` when `kms_key_arn` is not specified [GH-4965] +* data-source/aws_rds_cluster: Prevent panic with new CloudWatch logs support (`enabled_cloudwatch_logs_exports`) introduced in 1.23.0 ([#4927](https://github.com/terraform-providers/terraform-provider-aws/issues/4927)) +* resource/aws_codebuild_webhook: Prevent panic when webhook is missing during read ([#4917](https://github.com/terraform-providers/terraform-provider-aws/issues/4917)) +* resource/aws_db_instance: Properly raise any `ListTagsForResource` error instead of presenting a perpetual difference with `tags` ([#4943](https://github.com/terraform-providers/terraform-provider-aws/issues/4943)) +* resource/aws_instance: Prevent extraneous ModifyInstanceAttribute call for `disable_api_termination` on resource creation ([#4941](https://github.com/terraform-providers/terraform-provider-aws/issues/4941)) +* resource/aws_instance: Ignore empty string SHA (`da39a3ee5e6b4b0d3255bfef95601890afd80709`) `user_data` difference due to EC2 API response changes ([#4991](https://github.com/terraform-providers/terraform-provider-aws/issues/4991)) +* resource/aws_launch_template: Prevent error when using `valid_until` ([#4952](https://github.com/terraform-providers/terraform-provider-aws/issues/4952)) +* resource/aws_route: Properly force resource recreation when updating `route_table_id` ([#4946](https://github.com/terraform-providers/terraform-provider-aws/issues/4946)) +* resource/aws_route53_zone: Further prevent HostedZoneAlreadyExists with specified caller reference errors ([#4903](https://github.com/terraform-providers/terraform-provider-aws/issues/4903)) +* resource/aws_ses_receipt_rule: Prevent error with `s3_action` when `kms_key_arn` is not specified ([#4965](https://github.com/terraform-providers/terraform-provider-aws/issues/4965)) ## 1.24.0 (June 21, 2018) From 4c3aaf03f9c41650c1b2aecb8ab3375d792938cb Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 27 Jun 2018 13:46:47 +0000 Subject: [PATCH 1648/3316] Cleanup after v1.25.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 218e5c32e2a..162a3811667 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.26.0 (Unreleased) ## 1.25.0 (June 27, 2018) NOTES: From bbceaaac4d89eec5ac8adde70f50819f3bddf133 Mon Sep 17 00:00:00 2001 From: Kash Date: Wed, 27 Jun 2018 11:32:50 -0400 Subject: [PATCH 1649/3316] add import for eip association --- aws/resource_aws_eip_association.go | 3 + aws/resource_aws_eip_association_test.go | 81 ++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/aws/resource_aws_eip_association.go b/aws/resource_aws_eip_association.go index e5a051631b0..7c53cf44ef7 100644 --- a/aws/resource_aws_eip_association.go +++ b/aws/resource_aws_eip_association.go @@ -18,6 +18,9 @@ func resourceAwsEipAssociation() *schema.Resource { Create: resourceAwsEipAssociationCreate, Read: resourceAwsEipAssociationRead, Delete: resourceAwsEipAssociationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "allocation_id": &schema.Schema{ diff --git a/aws/resource_aws_eip_association_test.go b/aws/resource_aws_eip_association_test.go index 71c873f1c2e..9791dbaa616 100644 --- a/aws/resource_aws_eip_association_test.go +++ b/aws/resource_aws_eip_association_test.go @@ -12,6 +12,46 @@ import ( "github.com/hashicorp/terraform/terraform" ) +func TestAccAWSEIPAssociation_importInstance(t *testing.T) { + resourceName := "aws_eip_association.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEIPAssociationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEIPAssociationConfig_instance, + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSEIPAssociation_importNetworkInterface(t *testing.T) { + resourceName := "aws_eip_association.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEIPAssociationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEIPAssociationConfig_networkInterface, + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSEIPAssociation_basic(t *testing.T) { var a ec2.Address @@ -345,3 +385,44 @@ resource "aws_eip_association" "test" { } `, testAccAWSSpotInstanceRequestConfig(rInt)) } + +const testAccAWSEIPAssociationConfig_instance = ` +resource "aws_instance" "test" { + # us-west-2 + ami = "ami-4fccb37f" + instance_type = "m1.small" +} + +resource "aws_eip" "test" {} + +resource "aws_eip_association" "test" { + allocation_id = "${aws_eip.test.id}" + instance_id = "${aws_instance.test.id}" +} +` + +const testAccAWSEIPAssociationConfig_networkInterface = ` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "10.1.1.0/24" +} + +resource "aws_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_network_interface" "test" { + subnet_id = "${aws_subnet.test.id}" +} + +resource "aws_eip" "test" {} + +resource "aws_eip_association" "test" { + allocation_id = "${aws_eip.test.id}" + network_interface_id = "${aws_network_interface.test.id}" +} +` From 198ee6c7cd4ad59741b3b26273cc938bab1ff065 Mon Sep 17 00:00:00 2001 From: Kash Date: Wed, 27 Jun 2018 11:39:23 -0400 Subject: [PATCH 1650/3316] add documentation --- website/docs/r/eip_association.html.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/docs/r/eip_association.html.markdown b/website/docs/r/eip_association.html.markdown index 42bf1420202..952977e82df 100644 --- a/website/docs/r/eip_association.html.markdown +++ b/website/docs/r/eip_association.html.markdown @@ -68,3 +68,11 @@ address with an instance. * `network_interface_id` - As above * `private_ip_address` - As above * `public_ip` - As above + +## Import + +EIP Assocations can be imported using their association ID. + +``` +$ terraform import aws_eip_association.test eipassoc-ab12c345 +``` From 454db9d175fadb9bddce736024681c8bdb511308 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Wed, 27 Jun 2018 22:27:58 +0400 Subject: [PATCH 1651/3316] add schema for neptune cluster --- aws/resource_aws_neptune_cluster.go | 253 ++++++++++++++++++++++++++++ aws/validators.go | 44 +++++ 2 files changed, 297 insertions(+) create mode 100644 aws/resource_aws_neptune_cluster.go diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go new file mode 100644 index 00000000000..ff5c94cb216 --- /dev/null +++ b/aws/resource_aws_neptune_cluster.go @@ -0,0 +1,253 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/neptune" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsNeptuneCluster() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsNeptuneClusterCreate, + Read: resourceAwsNeptuneClusterRead, + Update: resourceAwsNeptuneClusterUpdate, + Delete: resourceAwsNeptuneClusterDelete, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(120 * time.Minute), + Update: schema.DefaultTimeout(120 * time.Minute), + Delete: schema.DefaultTimeout(120 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + + "availability_zones": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + ForceNew: true, + Computed: true, + Set: schema.HashString, + }, + + "backup_retention_period": { + Type: schema.TypeInt, + Optional: true, + Default: 1, + ValidateFunc: validation.IntAtMost(35), + }, + + "cluster_identifier": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"cluster_identifier_prefix"}, + ValidateFunc: validateNeptuneIdentifier, + }, + + "cluster_identifier_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateNeptuneIdentifierPrefix, + }, + + "cluster_members": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + Computed: true, + Set: schema.HashString, + }, + + "database_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + "db_subnet_group_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + + "db_cluster_parameter_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "reader_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "hosted_zone_id": { + Type: schema.TypeString, + Computed: true, + }, + + "engine": { + Type: schema.TypeString, + Optional: true, + Default: "neptune", + ForceNew: true, + ValidateFunc: validateNeptuneEngine(), + }, + + "engine_version": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + + "storage_encrypted": { + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + + "final_snapshot_identifier": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + es = append(es, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + es = append(es, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + es = append(es, fmt.Errorf("%q cannot end in a hyphen", k)) + } + return + }, + }, + + "skip_final_snapshot": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + + "master_username": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + }, + + "master_password": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + + "snapshot_identifier": { + Type: schema.TypeString, + Computed: false, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "port": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + + // apply_immediately is used to determine when the update modifications + // take place. + "apply_immediately": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + + "vpc_security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "preferred_backup_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateOnceADayWindowFormat, + }, + + "preferred_maintenance_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + StateFunc: func(val interface{}) string { + if val == nil { + return "" + } + return strings.ToLower(val.(string)) + }, + ValidateFunc: validateOnceAWeekWindowFormat, + }, + + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + + "replication_source_identifier": { + Type: schema.TypeString, + Optional: true, + }, + + "iam_roles": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "iam_database_authentication_enabled": { + Type: schema.TypeBool, + Optional: true, + }, + + "cluster_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + + "tags": tagsSchema(), + }, + } +} diff --git a/aws/validators.go b/aws/validators.go index 2b1ebfe2955..b990947144c 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -53,6 +53,27 @@ func validateRdsIdentifier(v interface{}, k string) (ws []string, errors []error return } +func validateNeptuneIdentifier(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + return +} + func validateRdsIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { @@ -70,6 +91,23 @@ func validateRdsIdentifierPrefix(v interface{}, k string) (ws []string, errors [ return } +func validateNeptuneIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + return +} + func validateRdsEngine() schema.SchemaValidateFunc { return validation.StringInSlice([]string{ "aurora", @@ -78,6 +116,12 @@ func validateRdsEngine() schema.SchemaValidateFunc { }, false) } +func validateNeptuneEngine() schema.SchemaValidateFunc { + return validation.StringInSlice([]string{ + "neptune", + }, false) +} + func validateElastiCacheClusterId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if (len(value) < 1) || (len(value) > 20) { From 6958243ccf576779b83c76c3264df4924670c24a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 27 Jun 2018 15:55:10 -0400 Subject: [PATCH 1652/3316] Update CHANGELOG for #5006 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 162a3811667..eb19a76867a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.26.0 (Unreleased) + +ENHANCEMENTS: + +* resource/aws_eip_association: Support resource import [GH-5006] + ## 1.25.0 (June 27, 2018) NOTES: From cc5b78eedea468b37a81dfc389bb7a94a6c6c713 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Thu, 28 Jun 2018 07:38:01 +0400 Subject: [PATCH 1653/3316] create cluster from snapshot --- aws/resource_aws_neptune_cluster.go | 109 ++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index ff5c94cb216..a7cf89ec94d 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -251,3 +251,112 @@ func resourceAwsNeptuneCluster() *schema.Resource { }, } } + +func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + tags := tagsFromMapNeptune(d.Get("tags").(map[string]interface{})) + + var identifier string + if v, ok := d.GetOk("cluster_identifier"); ok { + identifier = v.(string) + } else { + if v, ok := d.GetOk("cluster_identifier_prefix"); ok { + identifier = resource.PrefixedUniqueId(v.(string)) + } else { + identifier = resource.PrefixedUniqueId("tf-") + } + + d.Set("cluster_identifier", identifier) + } + + if _, ok := d.GetOk("snapshot_identifier"); ok { + opts := neptune.RestoreDBClusterFromSnapshotInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), + Tags: tags, + } + + if attr, ok := d.GetOk("engine_version"); ok { + opts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + opts.AvailabilityZones = expandStringList(attr.List()) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + opts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("database_name"); ok { + opts.DatabaseName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("port"); ok { + opts.Port = aws.Int64(int64(attr.(int))) + } + + // Check if any of the parameters that require a cluster modification after creation are set + var clusterUpdate bool + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + clusterUpdate = true + opts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if _, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + clusterUpdate = true + } + + if _, ok := d.GetOk("backup_retention_period"); ok { + clusterUpdate = true + } + + log.Printf("[DEBUG] Neptune Cluster restore from snapshot configuration: %s", opts) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RestoreDBClusterFromSnapshot(&opts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error creating Neptune Cluster: %s", err) + } + + if clusterUpdate { + log.Printf("[INFO] Neptune Cluster is restoring from snapshot with default db_cluster_parameter_group_name, backup_retention_period and vpc_security_group_ids" + + "but custom values should be set, will now update after snapshot is restored!") + + d.SetId(d.Get("cluster_identifier").(string)) + + log.Printf("[INFO] Neptune Cluster ID: %s", d.Id()) + + log.Println("[INFO] Waiting for Neptune Cluster to be available") + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsNeptuneClusterCreatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, err := stateConf.WaitForState() + if err != nil { + return err + } + + err = resourceAwsNeptuneClusterUpdate(d, meta) + if err != nil { + return err + } + } + } + +} From 4dd88866bd8c0b91534fca7b9b7ad91f3452bf38 Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 2 Mar 2018 17:59:31 -0500 Subject: [PATCH 1654/3316] add launch configuration data source --- aws/data_source_aws_launch_configuration.go | 221 ++++++++++++++++++ ...ta_source_aws_launch_configuration_test.go | 68 ++++++ aws/provider.go | 1 + 3 files changed, 290 insertions(+) create mode 100644 aws/data_source_aws_launch_configuration.go create mode 100644 aws/data_source_aws_launch_configuration_test.go diff --git a/aws/data_source_aws_launch_configuration.go b/aws/data_source_aws_launch_configuration.go new file mode 100644 index 00000000000..7f257eca24d --- /dev/null +++ b/aws/data_source_aws_launch_configuration.go @@ -0,0 +1,221 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsLaunchConfiguration() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsLaunchConfigurationRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + + "image_id": { + Type: schema.TypeString, + Computed: true, + }, + + "instance_type": { + Type: schema.TypeString, + Computed: true, + }, + + "iam_instance_profile": { + Type: schema.TypeString, + Computed: true, + }, + + "key_name": { + Type: schema.TypeString, + Computed: true, + }, + + "user_data": { + Type: schema.TypeString, + Computed: true, + }, + + "security_groups": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "vpc_classic_link_id": { + Type: schema.TypeString, + Computed: true, + }, + + "vpc_classic_link_security_groups": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "associate_public_ip_address": { + Type: schema.TypeBool, + Computed: true, + }, + + "spot_price": { + Type: schema.TypeString, + Computed: true, + }, + + "ebs_optimized": { + Type: schema.TypeBool, + Computed: true, + }, + + "placement_tenancy": { + Type: schema.TypeString, + Computed: true, + }, + + "enable_monitoring": { + Type: schema.TypeBool, + Computed: true, + }, + + "ebs_block_device": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_on_termination": { + Type: schema.TypeBool, + Computed: true, + }, + + "device_name": { + Type: schema.TypeString, + Computed: true, + }, + + "iops": { + Type: schema.TypeInt, + Computed: true, + }, + + "snapshot_id": { + Type: schema.TypeString, + Computed: true, + }, + + "volume_size": { + Type: schema.TypeInt, + Computed: true, + }, + + "volume_type": { + Type: schema.TypeString, + Computed: true, + }, + + "encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + + "ephemeral_block_device": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "device_name": { + Type: schema.TypeString, + Computed: true, + }, + + "virtual_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + + "root_block_device": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_on_termination": { + Type: schema.TypeBool, + Computed: true, + }, + + "iops": { + Type: schema.TypeInt, + Computed: true, + }, + + "volume_size": { + Type: schema.TypeInt, + Computed: true, + }, + + "volume_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface{}) error { + autoscalingconn := meta.(*AWSClient).autoscalingconn + ec2conn := meta.(*AWSClient).ec2conn + + if v, ok := d.GetOk("name"); ok { + d.SetId(v.(string)) + } + + describeOpts := autoscaling.DescribeLaunchConfigurationsInput{ + LaunchConfigurationNames: []*string{aws.String(d.Id())}, + } + + log.Printf("[DEBUG] launch configuration describe configuration: %s", describeOpts) + describConfs, err := autoscalingconn.DescribeLaunchConfigurations(&describeOpts) + if err != nil { + return fmt.Errorf("Error retrieving launch configuration: %s", err) + } + + lc := describConfs.LaunchConfigurations[0] + + d.Set("key_name", lc.KeyName) + d.Set("image_id", lc.ImageId) + d.Set("instance_type", lc.InstanceType) + d.Set("name", lc.LaunchConfigurationName) + d.Set("user_data", lc.UserData) + + d.Set("iam_instance_profile", lc.IamInstanceProfile) + d.Set("ebs_optimized", lc.EbsOptimized) + d.Set("spot_price", lc.SpotPrice) + d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) + d.Set("security_groups", lc.SecurityGroups) + d.Set("associate_public_ip_address", lc.AssociatePublicIpAddress) + + d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) + d.Set("vpc_classic_link_security_groups", lc.ClassicLinkVPCSecurityGroups) + + if err := readLCBlockDevices(d, lc, ec2conn); err != nil { + return err + } + + return nil +} diff --git a/aws/data_source_aws_launch_configuration_test.go b/aws/data_source_aws_launch_configuration_test.go new file mode 100644 index 00000000000..7722c6134c0 --- /dev/null +++ b/aws/data_source_aws_launch_configuration_test.go @@ -0,0 +1,68 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSLaunchConfigurationDataSource_basic(t *testing.T) { + rInt := acctest.RandInt() + rName := "data.aws_launch_configuration.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccLaunchConfigurationDataSourceConfig(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(rName, "image_id"), + resource.TestCheckResourceAttrSet(rName, "instance_type"), + resource.TestCheckResourceAttrSet(rName, "associate_public_ip_address"), + resource.TestCheckResourceAttrSet(rName, "user_data"), + resource.TestCheckResourceAttr(rName, "root_block_device.#", "1"), + resource.TestCheckResourceAttr(rName, "ebs_block_device.#", "1"), + resource.TestCheckResourceAttr(rName, "ephemeral_block_device.#", "1"), + ), + }, + }, + }) +} + +func testAccLaunchConfigurationDataSourceConfig(rInt int) string { + return fmt.Sprintf(` +resource "aws_launch_configuration" "foo" { + name = "terraform-test-%d" + image_id = "ami-21f78e11" + instance_type = "m1.small" + associate_public_ip_address = true + user_data = "foobar-user-data" + + root_block_device { + volume_type = "gp2" + volume_size = 11 + } + ebs_block_device { + device_name = "/dev/sdb" + volume_size = 9 + } + ebs_block_device { + device_name = "/dev/sdc" + volume_size = 10 + volume_type = "io1" + iops = 100 + } + ephemeral_block_device { + device_name = "/dev/sde" + virtual_name = "ephemeral0" + } +} + +data "aws_launch_configuration" "foo" { + name = "${aws_launch_configuration.foo.name}" +} +`, rInt) +} diff --git a/aws/provider.go b/aws/provider.go index 380e2f75207..a5020dfe052 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -225,6 +225,7 @@ func Provider() terraform.ResourceProvider { "aws_kms_secret": dataSourceAwsKmsSecret(), "aws_lambda_function": dataSourceAwsLambdaFunction(), "aws_lambda_invocation": dataSourceAwsLambdaInvocation(), + "aws_launch_configuration": dataSourceAwsLaunchConfiguration(), "aws_mq_broker": dataSourceAwsMqBroker(), "aws_nat_gateway": dataSourceAwsNatGateway(), "aws_network_acls": dataSourceAwsNetworkAcls(), From 5d6fb812a99ccb1f18d425fe25b619fd34cc7760 Mon Sep 17 00:00:00 2001 From: Kash Date: Mon, 5 Mar 2018 11:03:21 -0500 Subject: [PATCH 1655/3316] add documentation --- website/aws.erb | 3 ++ .../docs/d/launch_configuration.html.markdown | 48 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 website/docs/d/launch_configuration.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 01fba3efc5e..0070bbdc6e5 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -253,6 +253,9 @@ > aws_lambda_function + > + aws_launch_configuration + > aws_lb diff --git a/website/docs/d/launch_configuration.html.markdown b/website/docs/d/launch_configuration.html.markdown new file mode 100644 index 00000000000..76b6054639c --- /dev/null +++ b/website/docs/d/launch_configuration.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "aws" +page_title: "AWS: aws_launch_configuration" +sidebar_current: "docs-aws-datasource-launch-configuration" +description: |- + Provides a Launch Configuration data source. +--- + +# aws_launch_configuration + +Provides information about a Launch Configuration. + +## Example Usage + +```hcl +data "aws_launch_configuration" "ubuntu" { + name = "test-launch-config" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the launch configuration. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the launch configuration. +* `name` - The name of the launch configuration. +* `image_id` - The EC2 image ID of the instance. +* `instance_type` - The type of the instance to launch. +* `iam_instance_profile` - The IAM instance profile to associate with launched instances. +* `key_name` - The key name that should be used for the instance. +* `security_groups` - A list of associated security group IDS. +* `associate_public_ip_address` - Whether a public ip address is associated with the instance. +* `vpc_classic_link_id` - The ID of a ClassicLink-enabled VPC. +* `vpc_classic_link_security_groups` - The IDs of one or more security groups for the specified ClassicLink-enabled VPC. +* `user_data` - The user data of the instance. +* `enable_monitoring` - Whether detailed monitoring is enabled. +* `ebs_optimized` - Whether the launched EC2 instance will be EBS-optimized. +* `root_block_device` - The root block device of the instance. +* `ebs_block_device` - The EBS block devices attached to the instance. +* `ephemeral_block_device` - The Ephemeral volumes on the instance. +* `spot_price` - The price to use for reserving spot instances. +* `placement_tenancy` - The tenancy of the instance. From 88ef715ee551acf9e8d13c1b610b8dfe6f137357 Mon Sep 17 00:00:00 2001 From: Kash Date: Thu, 28 Jun 2018 10:18:03 -0400 Subject: [PATCH 1656/3316] nil checks and update documentation --- aws/data_source_aws_launch_configuration.go | 27 ++++++++-- .../docs/d/launch_configuration.html.markdown | 52 +++++++++++++------ 2 files changed, 59 insertions(+), 20 deletions(-) diff --git a/aws/data_source_aws_launch_configuration.go b/aws/data_source_aws_launch_configuration.go index 7f257eca24d..94822f5c444 100644 --- a/aws/data_source_aws_launch_configuration.go +++ b/aws/data_source_aws_launch_configuration.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" @@ -195,6 +196,14 @@ func dataSourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface return fmt.Errorf("Error retrieving launch configuration: %s", err) } + if describConfs == nil || len(describConfs.LaunchConfigurations) == 0 { + return errors.New("No matching Launch Configuration found") + } + + if len(describConfs.LaunchConfigurations) > 1 { + return errors.New("Multiple matching Launch Configurations found") + } + lc := describConfs.LaunchConfigurations[0] d.Set("key_name", lc.KeyName) @@ -202,16 +211,24 @@ func dataSourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface d.Set("instance_type", lc.InstanceType) d.Set("name", lc.LaunchConfigurationName) d.Set("user_data", lc.UserData) - d.Set("iam_instance_profile", lc.IamInstanceProfile) d.Set("ebs_optimized", lc.EbsOptimized) d.Set("spot_price", lc.SpotPrice) - d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) - d.Set("security_groups", lc.SecurityGroups) d.Set("associate_public_ip_address", lc.AssociatePublicIpAddress) - d.Set("vpc_classic_link_id", lc.ClassicLinkVPCId) - d.Set("vpc_classic_link_security_groups", lc.ClassicLinkVPCSecurityGroups) + d.Set("enable_monitoring", false) + + if lc.InstanceMonitoring != nil { + d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) + } + + if err := d.Set("security_groups", lc.SecurityGroups); err != nil { + return fmt.Errorf("error setting security_groups: %s", err) + } + + if err := d.Set("vpc_classic_link_security_groups", lc.ClassicLinkVPCSecurityGroups); err != nil { + return fmt.Errorf("error setting vpc_classic_link_security_groups: %s", err) + } if err := readLCBlockDevices(d, lc, ec2conn); err != nil { return err diff --git a/website/docs/d/launch_configuration.html.markdown b/website/docs/d/launch_configuration.html.markdown index 76b6054639c..ff3582b73b0 100644 --- a/website/docs/d/launch_configuration.html.markdown +++ b/website/docs/d/launch_configuration.html.markdown @@ -6,7 +6,7 @@ description: |- Provides a Launch Configuration data source. --- -# aws_launch_configuration +# Data Source: aws_launch_configuration Provides information about a Launch Configuration. @@ -29,20 +29,42 @@ The following arguments are supported: The following attributes are exported: * `id` - The ID of the launch configuration. -* `name` - The name of the launch configuration. -* `image_id` - The EC2 image ID of the instance. -* `instance_type` - The type of the instance to launch. -* `iam_instance_profile` - The IAM instance profile to associate with launched instances. -* `key_name` - The key name that should be used for the instance. -* `security_groups` - A list of associated security group IDS. -* `associate_public_ip_address` - Whether a public ip address is associated with the instance. +* `name` - The Name of the launch configuration. +* `image_id` - The EC2 Image ID of the instance. +* `instance_type` - The Instance Type of the instance to launch. +* `iam_instance_profile` - The IAM Instance Profile to associate with launched instances. +* `key_name` - The Key Name that should be used for the instance. +* `security_groups` - A list of associated Security Group IDS. +* `associate_public_ip_address` - Whether a Public IP address is associated with the instance. * `vpc_classic_link_id` - The ID of a ClassicLink-enabled VPC. -* `vpc_classic_link_security_groups` - The IDs of one or more security groups for the specified ClassicLink-enabled VPC. -* `user_data` - The user data of the instance. -* `enable_monitoring` - Whether detailed monitoring is enabled. +* `vpc_classic_link_security_groups` - The IDs of one or more Security Groups for the specified ClassicLink-enabled VPC. +* `user_data` - The User Data of the instance. +* `enable_monitoring` - Whether Detailed Monitoring is Enabled. * `ebs_optimized` - Whether the launched EC2 instance will be EBS-optimized. -* `root_block_device` - The root block device of the instance. -* `ebs_block_device` - The EBS block devices attached to the instance. +* `root_block_device` - The Root Block Device of the instance. +* `ebs_block_device` - The EBS Block Devices attached to the instance. * `ephemeral_block_device` - The Ephemeral volumes on the instance. -* `spot_price` - The price to use for reserving spot instances. -* `placement_tenancy` - The tenancy of the instance. +* `spot_price` - The Price to use for reserving Spot instances. +* `placement_tenancy` - The Tenancy of the instance. + +`root_block_device` is exported with the following attributes: + +* `delete_on_termination` - Whether the EBS Volume will be deleted on instance termination. +* `iops` - The provisioned IOPs of the volume. +* `volume_size` - The Size of the volume. +* `volume_type` - The Type of the volume. + +`ebs_block_device` is exported with the following attributes: + +* `delete_on_termination` - Whether the EBS Volume will be deleted on instance termination. +* `device_name` - The Name of the device. +* `iops` - The provisioned IOPs of the volume. +* `snapshot_id` - The Snapshot ID of the mount. +* `volume_size` - The Size of the volume. +* `volume_type` - The Type of the volume. +* `encrypted` - Whether the volume is Encrypted. + +`ephemeral_block_device` is exported with the following attributes: + +* `device_name` - The Name of the device. +* `virtual_name` - The Virtual Name of the device. From 40d6ecfb965b8d75b42021ae9c28db45bf039c88 Mon Sep 17 00:00:00 2001 From: Kash Date: Thu, 28 Jun 2018 11:25:15 -0400 Subject: [PATCH 1657/3316] fix setting security group --- aws/data_source_aws_launch_configuration.go | 12 ++++- ...ta_source_aws_launch_configuration_test.go | 45 ++++++++++++++++++- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/aws/data_source_aws_launch_configuration.go b/aws/data_source_aws_launch_configuration.go index 94822f5c444..e02cbd2a06a 100644 --- a/aws/data_source_aws_launch_configuration.go +++ b/aws/data_source_aws_launch_configuration.go @@ -222,11 +222,19 @@ func dataSourceAwsLaunchConfigurationRead(d *schema.ResourceData, meta interface d.Set("enable_monitoring", lc.InstanceMonitoring.Enabled) } - if err := d.Set("security_groups", lc.SecurityGroups); err != nil { + vpcSGs := make([]string, 0, len(lc.SecurityGroups)) + for _, sg := range lc.SecurityGroups { + vpcSGs = append(vpcSGs, *sg) + } + if err := d.Set("security_groups", vpcSGs); err != nil { return fmt.Errorf("error setting security_groups: %s", err) } - if err := d.Set("vpc_classic_link_security_groups", lc.ClassicLinkVPCSecurityGroups); err != nil { + classicSGs := make([]string, 0, len(lc.ClassicLinkVPCSecurityGroups)) + for _, sg := range lc.ClassicLinkVPCSecurityGroups { + classicSGs = append(classicSGs, *sg) + } + if err := d.Set("vpc_classic_link_security_groups", classicSGs); err != nil { return fmt.Errorf("error setting vpc_classic_link_security_groups: %s", err) } diff --git a/aws/data_source_aws_launch_configuration_test.go b/aws/data_source_aws_launch_configuration_test.go index 7722c6134c0..880e842e134 100644 --- a/aws/data_source_aws_launch_configuration_test.go +++ b/aws/data_source_aws_launch_configuration_test.go @@ -17,7 +17,7 @@ func TestAccAWSLaunchConfigurationDataSource_basic(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccLaunchConfigurationDataSourceConfig(rInt), + Config: testAccLaunchConfigurationDataSourceConfig_basic(rInt), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet(rName, "image_id"), resource.TestCheckResourceAttrSet(rName, "instance_type"), @@ -31,8 +31,25 @@ func TestAccAWSLaunchConfigurationDataSource_basic(t *testing.T) { }, }) } +func TestAccAWSLaunchConfigurationDataSource_securityGroups(t *testing.T) { + rInt := acctest.RandInt() + rName := "data.aws_launch_configuration.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccLaunchConfigurationDataSourceConfig_securityGroups(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(rName, "security_groups.#", "1"), + ), + }, + }, + }) +} -func testAccLaunchConfigurationDataSourceConfig(rInt int) string { +func testAccLaunchConfigurationDataSourceConfig_basic(rInt int) string { return fmt.Sprintf(` resource "aws_launch_configuration" "foo" { name = "terraform-test-%d" @@ -66,3 +83,27 @@ data "aws_launch_configuration" "foo" { } `, rInt) } + +func testAccLaunchConfigurationDataSourceConfig_securityGroups(rInt int) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_security_group" "test" { + name = "terraform-test_%d" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_launch_configuration" "test" { + name = "terraform-test-%d" + image_id = "ami-21f78e11" + instance_type = "m1.small" + security_groups = ["${aws_security_group.test.id}"] +} + +data "aws_launch_configuration" "foo" { + name = "${aws_launch_configuration.test.name}" +} +`, rInt, rInt) +} From 37249a597cd3ef07791f1e49f1e609ffb29fdd15 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 28 Jun 2018 13:21:41 -0400 Subject: [PATCH 1658/3316] resource/aws_ssm_document: Support tagging --- aws/resource_aws_ssm_document.go | 21 +++++ aws/resource_aws_ssm_document_test.go | 106 ++++++++++++++++++++++ website/docs/r/ssm_document.html.markdown | 1 + 3 files changed, 128 insertions(+) diff --git a/aws/resource_aws_ssm_document.go b/aws/resource_aws_ssm_document.go index 2bb17929040..73ea866f130 100644 --- a/aws/resource_aws_ssm_document.go +++ b/aws/resource_aws_ssm_document.go @@ -141,6 +141,7 @@ func resourceAwsSsmDocument() *schema.Resource { }, }, }, + "tags": tagsSchema(), }, } } @@ -181,6 +182,10 @@ func resourceAwsSsmDocumentCreate(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] Not setting permissions for %q", d.Id()) } + if err := setTagsSSM(ssmconn, d, d.Id(), ssm.ResourceTypeForTaggingDocument); err != nil { + return fmt.Errorf("error setting SSM Document tags: %s", err) + } + return resourceAwsSsmDocumentRead(d, meta) } @@ -271,10 +276,26 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error return err } + tagList, err := ssmconn.ListTagsForResource(&ssm.ListTagsForResourceInput{ + ResourceId: aws.String(d.Id()), + ResourceType: aws.String(ssm.ResourceTypeForTaggingDocument), + }) + if err != nil { + return fmt.Errorf("error listing SSM Document tags for %s: %s", d.Id(), err) + } + d.Set("tags", tagsToMapSSM(tagList.TagList)) + return nil } func resourceAwsSsmDocumentUpdate(d *schema.ResourceData, meta interface{}) error { + ssmconn := meta.(*AWSClient).ssmconn + + if d.HasChange("tags") { + if err := setTagsSSM(ssmconn, d, d.Id(), ssm.ResourceTypeForTaggingDocument); err != nil { + return fmt.Errorf("error setting SSM Document tags: %s", err) + } + } if _, ok := d.GetOk("permissions"); ok { if err := setDocumentPermissions(d, meta); err != nil { diff --git a/aws/resource_aws_ssm_document_test.go b/aws/resource_aws_ssm_document_test.go index 685158d78dc..5794b62dbd5 100644 --- a/aws/resource_aws_ssm_document_test.go +++ b/aws/resource_aws_ssm_document_test.go @@ -27,6 +27,7 @@ func TestAccAWSSSMDocument_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_ssm_document.foo", "document_format", "JSON"), resource.TestMatchResourceAttr("aws_ssm_document.foo", "arn", regexp.MustCompile(`^arn:aws:ssm:[a-z]{2}-[a-z]+-\d{1}:\d{12}:document/.*$`)), + resource.TestCheckResourceAttr("aws_ssm_document.foo", "tags.%", "0"), ), }, }, @@ -184,6 +185,44 @@ mainSteps: }) } +func TestAccAWSSSMDocument_Tags(t *testing.T) { + rName := acctest.RandString(10) + resourceName := "aws_ssm_document.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSSMDocumentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSSMDocumentConfig_Tags_Single(rName, "key1", "value1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSSMDocumentExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1"), + ), + }, + { + Config: testAccAWSSSMDocumentConfig_Tags_Multiple(rName, "key1", "value1updated", "key2", "value2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSSMDocumentExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "2"), + resource.TestCheckResourceAttr(resourceName, "tags.key1", "value1updated"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2"), + ), + }, + { + Config: testAccAWSSSMDocumentConfig_Tags_Single(rName, "key2", "value2updated"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSSMDocumentExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.key2", "value2updated"), + ), + }, + }, + }) +} + func testAccCheckAWSSSMDocumentExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -518,3 +557,70 @@ DOC } `, rName, content) } + +func testAccAWSSSMDocumentConfig_Tags_Single(rName, key1, value1 string) string { + return fmt.Sprintf(` +resource "aws_ssm_document" "foo" { + document_type = "Command" + name = "test_document-%s" + + content = < Date: Thu, 28 Jun 2018 22:23:34 +0400 Subject: [PATCH 1659/3316] create cluster from input param --- aws/resource_aws_neptune_cluster.go | 245 ++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index a7cf89ec94d..d22f7c3075e 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -357,6 +357,251 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e return err } } + } else if _, ok := d.GetOk("replication_source_identifier"); ok { + createOpts := &neptune.CreateDBClusterInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + ReplicationSourceIdentifier: aws.String(d.Get("replication_source_identifier").(string)), + Tags: tags, + } + + if attr, ok := d.GetOk("port"); ok { + createOpts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + createOpts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + createOpts.AvailabilityZones = expandStringList(attr.List()) + } + + if v, ok := d.GetOk("backup_retention_period"); ok { + createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("preferred_backup_window"); ok { + createOpts.PreferredBackupWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("preferred_maintenance_window"); ok { + createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("kms_key_arn"); ok { + createOpts.KmsKeyId = aws.String(attr.(string)) + } + + log.Printf("[DEBUG] Create Neptune Cluster as read replica: %s", createOpts) + var resp *neptune.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating Neptune cluster: %s", err) + } + + log.Printf("[DEBUG]: Neptune Cluster create response: %s", resp) + + } else { + if _, ok := d.GetOk("master_password"); !ok { + return fmt.Errorf(`provider.aws: aws_neptune_cluster: %s: "master_password": required field is not set`, d.Get("database_name").(string)) + } + + if _, ok := d.GetOk("master_username"); !ok { + return fmt.Errorf(`provider.aws: aws_neptune_cluster: %s: "master_username": required field is not set`, d.Get("database_name").(string)) + } + + createOpts := &neptune.CreateDBClusterInput{ + DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + Engine: aws.String(d.Get("engine").(string)), + MasterUserPassword: aws.String(d.Get("master_password").(string)), + MasterUsername: aws.String(d.Get("master_username").(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + Tags: tags, + } + + if v := d.Get("database_name"); v.(string) != "" { + createOpts.DatabaseName = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("port"); ok { + createOpts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + createOpts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + createOpts.AvailabilityZones = expandStringList(attr.List()) + } + + if v, ok := d.GetOk("backup_retention_period"); ok { + createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("preferred_backup_window"); ok { + createOpts.PreferredBackupWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("preferred_maintenance_window"); ok { + createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("kms_key_arn"); ok { + createOpts.KmsKeyId = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("iam_database_authentication_enabled"); ok { + createOpts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) + } + + log.Printf("[DEBUG] Neptune Cluster create options: %s", createOpts) + var resp *neptune.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating Neptune cluster: %s", err) + } + + log.Printf("[DEBUG]: Neptune Cluster create response: %s", resp) + } + + d.SetId(d.Get("cluster_identifier").(string)) + + log.Printf("[INFO] Neptune Cluster ID: %s", d.Id()) + + log.Println( + "[INFO] Waiting for Neptune Cluster to be available") + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsNeptuneClusterCreatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("[WARN] Error waiting for Neptune Cluster state to be \"available\": %s", err) } + if v, ok := d.GetOk("iam_roles"); ok { + for _, role := range v.(*schema.Set).List() { + err := setIamRoleToNeptuneCluster(d.Id(), role.(string), conn) + if err != nil { + return err + } + } + } + + return resourceAwsNeptuneClusterRead(d, meta) + +} + +func resourceAwsNeptuneClusterStateRefreshFunc( + d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + conn := meta.(*AWSClient).neptuneconn + + resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + log.Printf("[WARN] Neptune Cluster (%s) not found", d.Id()) + return 42, "destroyed", nil + } + log.Printf("[WARN] Error on retrieving DB Cluster (%s) when waiting: %s", d.Id(), err) + return nil, "", err + } + + var dbc *neptune.DBCluster + + for _, v := range resp.DBClusters { + if aws.StringValue(v.DBClusterIdentifier) == d.Id() { + dbc = v + } + } + + if dbc == nil { + return 42, "destroyed", nil + } + + if dbc.Status != nil { + log.Printf("[DEBUG] Neptune Cluster status (%s): %s", d.Id(), aws.StringValue(dbc.Status)) + } + + return dbc, aws.StringValue(dbc.Status), nil + } +} + +func setIamRoleToNeptuneCluster(clusterIdentifier string, roleArn string, conn *neptune.Neptune) error { + params := &neptune.AddRoleToDBClusterInput{ + DBClusterIdentifier: aws.String(clusterIdentifier), + RoleArn: aws.String(roleArn), + } + _, err := conn.AddRoleToDBCluster(params) + if err != nil { + return err + } + + return nil +} + +var resourceAwsNeptuneClusterCreatePendingStates = []string{ + "creating", + "backing-up", + "modifying", + "preparing-data-migration", + "migrating", + "resetting-master-credentials", } From 0d3e9c73520c076c21f0775456061e812f31fbe4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 28 Jun 2018 14:36:55 -0400 Subject: [PATCH 1660/3316] Update CHANGELOG for #3624 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb19a76867a..9d2a1152474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.26.0 (Unreleased) +FEATURES: + +* **New Data Source:** `aws_launch_configuration` [GH-3624] + ENHANCEMENTS: * resource/aws_eip_association: Support resource import [GH-5006] From 8fd3da2a26a88a903947ba106b188668e983d943 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 29 Jun 2018 00:11:57 +0400 Subject: [PATCH 1661/3316] add read func for neptune cluster --- aws/resource_aws_neptune_cluster.go | 106 +++++++++++++++++++++++++++- aws/tagsNeptune.go | 17 +++++ 2 files changed, 121 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index d22f7c3075e..84cbcfd3194 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -30,6 +30,10 @@ func resourceAwsNeptuneCluster() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "availability_zones": { Type: schema.TypeSet, @@ -546,6 +550,104 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e } +func resourceAwsNeptuneClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + + resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + d.SetId("") + log.Printf("[DEBUG] Neptune Cluster (%s) not found", d.Id()) + return nil + } + log.Printf("[DEBUG] Error describing Neptune Cluster (%s) when waiting: %s", d.Id(), err) + return err + } + + var dbc *neptune.DBCluster + for _, v := range resp.DBClusters { + if aws.StringValue(v.DBClusterIdentifier) == d.Id() { + dbc = v + } + } + + if dbc == nil { + log.Printf("[WARN] Neptune Cluster (%s) not found", d.Id()) + d.SetId("") + return nil + } + + return flattenAwsNeptuneClusterResource(d, meta, dbc) +} + +func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, dbc *neptune.DBCluster) error { + conn := meta.(*AWSClient).neptuneconn + + if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { + return fmt.Errorf("[DEBUG] Error saving AvailabilityZones to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + if dbc.DatabaseName != nil { + d.Set("database_name", dbc.DatabaseName) + } + + d.Set("cluster_identifier", dbc.DBClusterIdentifier) + d.Set("cluster_resource_id", dbc.DbClusterResourceId) + d.Set("db_subnet_group_name", dbc.DBSubnetGroup) + d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) + d.Set("endpoint", dbc.Endpoint) + d.Set("engine", dbc.Engine) + d.Set("engine_version", dbc.EngineVersion) + d.Set("master_username", dbc.MasterUsername) + d.Set("port", dbc.Port) + d.Set("storage_encrypted", dbc.StorageEncrypted) + d.Set("backup_retention_period", dbc.BackupRetentionPeriod) + d.Set("preferred_backup_window", dbc.PreferredBackupWindow) + d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) + d.Set("kms_key_arn", dbc.KmsKeyId) + d.Set("reader_endpoint", dbc.ReaderEndpoint) + d.Set("replication_source_identifier", dbc.ReplicationSourceIdentifier) + d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled) + d.Set("hosted_zone_id", dbc.HostedZoneId) + + var sg []string + for _, g := range dbc.VpcSecurityGroups { + sg = append(sg, aws.StringValue(g.VpcSecurityGroupId)) + } + if err := d.Set("vpc_security_group_ids", sg); err != nil { + return fmt.Errorf("[DEBUG] Error saving VPC Security Group IDs to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + var cm []string + for _, m := range dbc.DBClusterMembers { + cm = append(cm, aws.StringValue(m.DBInstanceIdentifier)) + } + if err := d.Set("cluster_members", cm); err != nil { + return fmt.Errorf("[DEBUG] Error saving Neptune Cluster Members to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + var roles []string + for _, r := range dbc.AssociatedRoles { + roles = append(roles, aws.StringValue(r.RoleArn)) + } + + if err := d.Set("iam_roles", roles); err != nil { + return fmt.Errorf("[DEBUG] Error saving IAM Roles to state for Neptune Cluster (%s): %s", d.Id(), err) + } + + arn := aws.StringValue(dbc.DBClusterArn) + d.Set("arn", arn) + + if err := saveTagsNeptune(conn, d, arn); err != nil { + log.Printf("[WARN] Failed to save tags for Neptune Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) + } + + return nil +} + func resourceAwsNeptuneClusterStateRefreshFunc( d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { return func() (interface{}, string, error) { @@ -557,10 +659,10 @@ func resourceAwsNeptuneClusterStateRefreshFunc( if err != nil { if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { - log.Printf("[WARN] Neptune Cluster (%s) not found", d.Id()) + log.Printf("[DEBUG] Neptune Cluster (%s) not found", d.Id()) return 42, "destroyed", nil } - log.Printf("[WARN] Error on retrieving DB Cluster (%s) when waiting: %s", d.Id(), err) + log.Printf("[DEBUG] Error on retrieving DB Cluster (%s) when waiting: %s", d.Id(), err) return nil, "", err } diff --git a/aws/tagsNeptune.go b/aws/tagsNeptune.go index e15b8de5279..5fb056d04f4 100644 --- a/aws/tagsNeptune.go +++ b/aws/tagsNeptune.go @@ -113,3 +113,20 @@ func tagIgnoredNeptune(t *neptune.Tag) bool { } return false } + +func saveTagsNeptune(conn *neptune.Neptune, d *schema.ResourceData, arn string) error { + resp, err := conn.ListTagsForResource(&neptune.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) + + if err != nil { + return fmt.Errorf("[DEBUG] Error retreiving tags for ARN: %s", arn) + } + + var dt []*neptune.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList + } + + return d.Set("tags", tagsToMapNeptune(dt)) +} From cedf1fc8203093c905a186dc5c7d3dd02a0ea8bc Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Thu, 28 Jun 2018 19:29:48 -0400 Subject: [PATCH 1662/3316] Add pricing vendor and client --- aws/config.go | 3 + .../aws/aws-sdk-go/service/pricing/api.go | 955 ++++++++++++++++++ .../aws/aws-sdk-go/service/pricing/doc.go | 51 + .../aws/aws-sdk-go/service/pricing/errors.go | 37 + .../aws/aws-sdk-go/service/pricing/service.go | 100 ++ vendor/vendor.json | 10 +- 6 files changed, 1155 insertions(+), 1 deletion(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pricing/service.go diff --git a/aws/config.go b/aws/config.go index 61852de0477..19a8affccdc 100644 --- a/aws/config.go +++ b/aws/config.go @@ -75,6 +75,7 @@ import ( "github.com/aws/aws-sdk-go/service/neptune" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" + "github.com/aws/aws-sdk-go/service/pricing" "github.com/aws/aws-sdk-go/service/rds" "github.com/aws/aws-sdk-go/service/redshift" "github.com/aws/aws-sdk-go/service/route53" @@ -232,6 +233,7 @@ type AWSClient struct { lexmodelconn *lexmodelbuildingservice.LexModelBuildingService budgetconn *budgets.Budgets neptuneconn *neptune.Neptune + pricingconn *pricing.Pricing } func (c *AWSClient) S3() *s3.S3 { @@ -528,6 +530,7 @@ func (c *Config) Client() (interface{}, error) { client.mediastoreconn = mediastore.New(sess) client.appsyncconn = appsync.New(sess) client.neptuneconn = neptune.New(sess) + client.pricingconn = pricing.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go new file mode 100644 index 00000000000..f5be2db265a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go @@ -0,0 +1,955 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pricing + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opDescribeServices = "DescribeServices" + +// DescribeServicesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeServices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeServices for more information on using the DescribeServices +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeServicesRequest method. +// req, resp := client.DescribeServicesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServices +func (c *Pricing) DescribeServicesRequest(input *DescribeServicesInput) (req *request.Request, output *DescribeServicesOutput) { + op := &request.Operation{ + Name: opDescribeServices, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeServicesInput{} + } + + output = &DescribeServicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeServices API operation for AWS Price List Service. +// +// Returns the metadata for one service or a list of the metadata for all services. +// Use this without a service code to get the service codes for all services. +// Use it with a service code, such as AmazonEC2, to get information specific +// to that service, such as the attribute names available for that service. +// For example, some of the attribute names available for EC2 are volumeType, +// maxIopsVolume, operation, locationType, and instanceCapacity10xlarge. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Price List Service's +// API operation DescribeServices for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters had an invalid value. +// +// * ErrCodeNotFoundException "NotFoundException" +// The requested resource can't be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. Try again without a pagination token. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. Try again without a pagination token. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServices +func (c *Pricing) DescribeServices(input *DescribeServicesInput) (*DescribeServicesOutput, error) { + req, out := c.DescribeServicesRequest(input) + return out, req.Send() +} + +// DescribeServicesWithContext is the same as DescribeServices with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeServices for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pricing) DescribeServicesWithContext(ctx aws.Context, input *DescribeServicesInput, opts ...request.Option) (*DescribeServicesOutput, error) { + req, out := c.DescribeServicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeServicesPages iterates over the pages of a DescribeServices operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeServices method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeServices operation. +// pageNum := 0 +// err := client.DescribeServicesPages(params, +// func(page *DescribeServicesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Pricing) DescribeServicesPages(input *DescribeServicesInput, fn func(*DescribeServicesOutput, bool) bool) error { + return c.DescribeServicesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeServicesPagesWithContext same as DescribeServicesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pricing) DescribeServicesPagesWithContext(ctx aws.Context, input *DescribeServicesInput, fn func(*DescribeServicesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeServicesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeServicesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeServicesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetAttributeValues = "GetAttributeValues" + +// GetAttributeValuesRequest generates a "aws/request.Request" representing the +// client's request for the GetAttributeValues operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAttributeValues for more information on using the GetAttributeValues +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAttributeValuesRequest method. +// req, resp := client.GetAttributeValuesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues +func (c *Pricing) GetAttributeValuesRequest(input *GetAttributeValuesInput) (req *request.Request, output *GetAttributeValuesOutput) { + op := &request.Operation{ + Name: opGetAttributeValues, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetAttributeValuesInput{} + } + + output = &GetAttributeValuesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAttributeValues API operation for AWS Price List Service. +// +// Returns a list of attribute values. Attibutes are similar to the details +// in a Price List API offer file. For a list of available attributes, see Offer +// File Definitions (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs) +// in the AWS Billing and Cost Management User Guide (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Price List Service's +// API operation GetAttributeValues for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters had an invalid value. +// +// * ErrCodeNotFoundException "NotFoundException" +// The requested resource can't be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. Try again without a pagination token. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. Try again without a pagination token. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues +func (c *Pricing) GetAttributeValues(input *GetAttributeValuesInput) (*GetAttributeValuesOutput, error) { + req, out := c.GetAttributeValuesRequest(input) + return out, req.Send() +} + +// GetAttributeValuesWithContext is the same as GetAttributeValues with the addition of +// the ability to pass a context and additional request options. +// +// See GetAttributeValues for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pricing) GetAttributeValuesWithContext(ctx aws.Context, input *GetAttributeValuesInput, opts ...request.Option) (*GetAttributeValuesOutput, error) { + req, out := c.GetAttributeValuesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetAttributeValuesPages iterates over the pages of a GetAttributeValues operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetAttributeValues method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetAttributeValues operation. +// pageNum := 0 +// err := client.GetAttributeValuesPages(params, +// func(page *GetAttributeValuesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Pricing) GetAttributeValuesPages(input *GetAttributeValuesInput, fn func(*GetAttributeValuesOutput, bool) bool) error { + return c.GetAttributeValuesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetAttributeValuesPagesWithContext same as GetAttributeValuesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pricing) GetAttributeValuesPagesWithContext(ctx aws.Context, input *GetAttributeValuesInput, fn func(*GetAttributeValuesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetAttributeValuesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetAttributeValuesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetAttributeValuesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetProducts = "GetProducts" + +// GetProductsRequest generates a "aws/request.Request" representing the +// client's request for the GetProducts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetProducts for more information on using the GetProducts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetProductsRequest method. +// req, resp := client.GetProductsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProducts +func (c *Pricing) GetProductsRequest(input *GetProductsInput) (req *request.Request, output *GetProductsOutput) { + op := &request.Operation{ + Name: opGetProducts, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetProductsInput{} + } + + output = &GetProductsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetProducts API operation for AWS Price List Service. +// +// Returns a list of all products that match the filter criteria. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Price List Service's +// API operation GetProducts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters had an invalid value. +// +// * ErrCodeNotFoundException "NotFoundException" +// The requested resource can't be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. Try again without a pagination token. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. Try again without a pagination token. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProducts +func (c *Pricing) GetProducts(input *GetProductsInput) (*GetProductsOutput, error) { + req, out := c.GetProductsRequest(input) + return out, req.Send() +} + +// GetProductsWithContext is the same as GetProducts with the addition of +// the ability to pass a context and additional request options. +// +// See GetProducts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pricing) GetProductsWithContext(ctx aws.Context, input *GetProductsInput, opts ...request.Option) (*GetProductsOutput, error) { + req, out := c.GetProductsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetProductsPages iterates over the pages of a GetProducts operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetProducts method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetProducts operation. +// pageNum := 0 +// err := client.GetProductsPages(params, +// func(page *GetProductsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Pricing) GetProductsPages(input *GetProductsInput, fn func(*GetProductsOutput, bool) bool) error { + return c.GetProductsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetProductsPagesWithContext same as GetProductsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pricing) GetProductsPagesWithContext(ctx aws.Context, input *GetProductsInput, fn func(*GetProductsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetProductsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetProductsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetProductsOutput), !p.HasNextPage()) + } + return p.Err() +} + +// The values of a given attribute, such as Throughput Optimized HDD or Provisioned +// IOPS for the Amazon EC2volumeType attribute. +type AttributeValue struct { + _ struct{} `type:"structure"` + + // The specific value of an attributeName. + Value *string `type:"string"` +} + +// String returns the string representation +func (s AttributeValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributeValue) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *AttributeValue) SetValue(v string) *AttributeValue { + s.Value = &v + return s +} + +type DescribeServicesInput struct { + _ struct{} `type:"structure"` + + // The format version that you want the response to be in. + // + // Valid values are: aws_v1 + FormatVersion *string `type:"string"` + + // The maximum number of results that you want returned in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results that you want + // to retrieve. + NextToken *string `type:"string"` + + // The code for the service whose information you want to retrieve, such as + // AmazonEC2. You can use the ServiceCode to filter the results in a GetProducts + // call. To retrieve a list of all services, leave this blank. + ServiceCode *string `type:"string"` +} + +// String returns the string representation +func (s DescribeServicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServicesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeServicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeServicesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *DescribeServicesInput) SetFormatVersion(v string) *DescribeServicesInput { + s.FormatVersion = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeServicesInput) SetMaxResults(v int64) *DescribeServicesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeServicesInput) SetNextToken(v string) *DescribeServicesInput { + s.NextToken = &v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *DescribeServicesInput) SetServiceCode(v string) *DescribeServicesInput { + s.ServiceCode = &v + return s +} + +type DescribeServicesOutput struct { + _ struct{} `type:"structure"` + + // The format version of the response. For example, aws_v1. + FormatVersion *string `type:"string"` + + // The pagination token for the next set of retreivable results. + NextToken *string `type:"string"` + + // The service metadata for the service or services in the response. + Services []*Service `type:"list"` +} + +// String returns the string representation +func (s DescribeServicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServicesOutput) GoString() string { + return s.String() +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *DescribeServicesOutput) SetFormatVersion(v string) *DescribeServicesOutput { + s.FormatVersion = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeServicesOutput) SetNextToken(v string) *DescribeServicesOutput { + s.NextToken = &v + return s +} + +// SetServices sets the Services field's value. +func (s *DescribeServicesOutput) SetServices(v []*Service) *DescribeServicesOutput { + s.Services = v + return s +} + +// The constraints that you want all returned products to match. +type Filter struct { + _ struct{} `type:"structure"` + + // The product metadata field that you want to filter on. You can filter by + // just the service code to see all products for a specific service, filter + // by just the attribute name to see a specific attribute for multiple services, + // or use both a service code and an attribute name to retrieve only products + // that match both fields. + // + // Valid values include: ServiceCode, and all attribute names + // + // For example, you can filter by the AmazonEC2 service code and the volumeType + // attribute name to get the prices for only Amazon EC2 volumes. + // + // Field is a required field + Field *string `type:"string" required:"true"` + + // The type of filter that you want to use. + // + // Valid values are: TERM_MATCH. TERM_MATCH returns only products that match + // both the given filter field and the given value. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"FilterType"` + + // The service code or attribute value that you want to filter by. If you are + // filtering by service code this is the actual service code, such as AmazonEC2. + // If you are filtering by attribute name, this is the attribute value that + // you want the returned products to match, such as a Provisioned IOPS volume. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Field == nil { + invalidParams.Add(request.NewErrParamRequired("Field")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetField sets the Field field's value. +func (s *Filter) SetField(v string) *Filter { + s.Field = &v + return s +} + +// SetType sets the Type field's value. +func (s *Filter) SetType(v string) *Filter { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Filter) SetValue(v string) *Filter { + s.Value = &v + return s +} + +type GetAttributeValuesInput struct { + _ struct{} `type:"structure"` + + // The name of the attribute that you want to retrieve the values for, such + // as volumeType. + // + // AttributeName is a required field + AttributeName *string `type:"string" required:"true"` + + // The maximum number of results to return in response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results that you want + // to retrieve. + NextToken *string `type:"string"` + + // The service code for the service whose attributes you want to retrieve. For + // example, if you want the retrieve an EC2 attribute, use AmazonEC2. + // + // ServiceCode is a required field + ServiceCode *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAttributeValuesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAttributeValuesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAttributeValuesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAttributeValuesInput"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ServiceCode == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributeName sets the AttributeName field's value. +func (s *GetAttributeValuesInput) SetAttributeName(v string) *GetAttributeValuesInput { + s.AttributeName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetAttributeValuesInput) SetMaxResults(v int64) *GetAttributeValuesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAttributeValuesInput) SetNextToken(v string) *GetAttributeValuesInput { + s.NextToken = &v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *GetAttributeValuesInput) SetServiceCode(v string) *GetAttributeValuesInput { + s.ServiceCode = &v + return s +} + +type GetAttributeValuesOutput struct { + _ struct{} `type:"structure"` + + // The list of values for an attribute. For example, Throughput Optimized HDD + // and Provisioned IOPS are two available values for the AmazonEC2volumeType. + AttributeValues []*AttributeValue `type:"list"` + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetAttributeValuesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAttributeValuesOutput) GoString() string { + return s.String() +} + +// SetAttributeValues sets the AttributeValues field's value. +func (s *GetAttributeValuesOutput) SetAttributeValues(v []*AttributeValue) *GetAttributeValuesOutput { + s.AttributeValues = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAttributeValuesOutput) SetNextToken(v string) *GetAttributeValuesOutput { + s.NextToken = &v + return s +} + +type GetProductsInput struct { + _ struct{} `type:"structure"` + + // The list of filters that limit the returned products. only products that + // match all filters are returned. + Filters []*Filter `type:"list"` + + // The format version that you want the response to be in. + // + // Valid values are: aws_v1 + FormatVersion *string `type:"string"` + + // The maximum number of results to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token that indicates the next set of results that you want + // to retrieve. + NextToken *string `type:"string"` + + // The code for the service whose products you want to retrieve. + ServiceCode *string `type:"string"` +} + +// String returns the string representation +func (s GetProductsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetProductsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetProductsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetProductsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *GetProductsInput) SetFilters(v []*Filter) *GetProductsInput { + s.Filters = v + return s +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *GetProductsInput) SetFormatVersion(v string) *GetProductsInput { + s.FormatVersion = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetProductsInput) SetMaxResults(v int64) *GetProductsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetProductsInput) SetNextToken(v string) *GetProductsInput { + s.NextToken = &v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *GetProductsInput) SetServiceCode(v string) *GetProductsInput { + s.ServiceCode = &v + return s +} + +type GetProductsOutput struct { + _ struct{} `type:"structure"` + + // The format version of the response. For example, aws_v1. + FormatVersion *string `type:"string"` + + // The pagination token that indicates the next set of results to retrieve. + NextToken *string `type:"string"` + + // The list of products that match your filters. The list contains both the + // product metadata and the price information. + PriceList []aws.JSONValue `type:"list"` +} + +// String returns the string representation +func (s GetProductsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetProductsOutput) GoString() string { + return s.String() +} + +// SetFormatVersion sets the FormatVersion field's value. +func (s *GetProductsOutput) SetFormatVersion(v string) *GetProductsOutput { + s.FormatVersion = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetProductsOutput) SetNextToken(v string) *GetProductsOutput { + s.NextToken = &v + return s +} + +// SetPriceList sets the PriceList field's value. +func (s *GetProductsOutput) SetPriceList(v []aws.JSONValue) *GetProductsOutput { + s.PriceList = v + return s +} + +// The metadata for a service, such as the service code and available attribute +// names. +type Service struct { + _ struct{} `type:"structure"` + + // The attributes that are available for this service. + AttributeNames []*string `type:"list"` + + // The code for the AWS service. + ServiceCode *string `type:"string"` +} + +// String returns the string representation +func (s Service) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Service) GoString() string { + return s.String() +} + +// SetAttributeNames sets the AttributeNames field's value. +func (s *Service) SetAttributeNames(v []*string) *Service { + s.AttributeNames = v + return s +} + +// SetServiceCode sets the ServiceCode field's value. +func (s *Service) SetServiceCode(v string) *Service { + s.ServiceCode = &v + return s +} + +const ( + // FilterTypeTermMatch is a FilterType enum value + FilterTypeTermMatch = "TERM_MATCH" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go new file mode 100644 index 00000000000..0555bc4c3cb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/doc.go @@ -0,0 +1,51 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package pricing provides the client and types for making API +// requests to AWS Price List Service. +// +// AWS Price List Service API (AWS Price List Service) is a centralized and +// convenient way to programmatically query Amazon Web Services for services, +// products, and pricing information. The AWS Price List Service uses standardized +// product attributes such as Location, Storage Class, and Operating System, +// and provides prices at the SKU level. You can use the AWS Price List Service +// to build cost control and scenario planning tools, reconcile billing data, +// forecast future spend for budgeting purposes, and provide cost benefit analysis +// that compare your internal workloads with AWS. +// +// Use GetServices without a service code to retrieve the service codes for +// all AWS services, then GetServices with a service code to retreive the attribute +// names for that service. After you have the service code and attribute names, +// you can use GetAttributeValues to see what values are available for an attribute. +// With the service code and an attribute name and value, you can use GetProducts +// to find specific products that you're interested in, such as an AmazonEC2 +// instance, with a Provisioned IOPSvolumeType. +// +// Service Endpoint +// +// AWS Price List Service API provides the following two endpoints: +// +// * https://api.pricing.us-east-1.amazonaws.com +// +// * https://api.pricing.ap-south-1.amazonaws.com +// +// See https://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15 for more information on this service. +// +// See pricing package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pricing/ +// +// Using the Client +// +// To contact AWS Price List Service with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Price List Service client Pricing for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pricing/#New +package pricing diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go new file mode 100644 index 00000000000..10e4c44fe92 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/errors.go @@ -0,0 +1,37 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pricing + +const ( + + // ErrCodeExpiredNextTokenException for service response error code + // "ExpiredNextTokenException". + // + // The pagination token expired. Try again without a pagination token. + ErrCodeExpiredNextTokenException = "ExpiredNextTokenException" + + // ErrCodeInternalErrorException for service response error code + // "InternalErrorException". + // + // An error on the server occurred during the processing of your request. Try + // again later. + ErrCodeInternalErrorException = "InternalErrorException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The pagination token is invalid. Try again without a pagination token. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // One or more parameters had an invalid value. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // The requested resource can't be found. + ErrCodeNotFoundException = "NotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go new file mode 100644 index 00000000000..90ff33d0a08 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pricing + +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" +) + +// Pricing provides the API operation methods for making requests to +// AWS Price List Service. See this package's package overview docs +// for details on the service. +// +// Pricing methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Pricing 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 = "api.pricing" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Pricing" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Pricing 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 Pricing client from just a session. +// svc := pricing.New(mySession) +// +// // Create a Pricing client with additional configuration +// svc := pricing.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Pricing { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "pricing" + } + 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) *Pricing { + svc := &Pricing{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-10-15", + JSONVersion: "1.1", + TargetPrefix: "AWSPriceListService", + }, + 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 Pricing operation and runs any +// custom request initialization. +func (c *Pricing) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 1af7c3f7a92..5f332977ed0 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -854,6 +854,14 @@ "version": "v1.14.14", "versionExact": "v1.14.14" }, + { + "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", + "path": "github.com/aws/aws-sdk-go/service/pricing", + "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", + "revisionTime": "2018-06-26T20:42:33Z", + "version": "v1.14.14", + "versionExact": "v1.14.14" + }, { "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", "path": "github.com/aws/aws-sdk-go/service/rds", @@ -2083,4 +2091,4 @@ } ], "rootPath": "github.com/terraform-providers/terraform-provider-aws" -} +} \ No newline at end of file From 93e11382b83c1ceb6e1f49f56d6b7e2ca8a534cd Mon Sep 17 00:00:00 2001 From: Daniel White Date: Mon, 25 Jun 2018 18:41:43 +1000 Subject: [PATCH 1663/3316] New Resource: aws_s3_bucket_inventory --- aws/provider.go | 1 + aws/resource_aws_s3_bucket_inventory.go | 451 ++++++++++++++++++ aws/resource_aws_s3_bucket_inventory_test.go | 296 ++++++++++++ website/aws.erb | 4 + .../docs/r/s3_bucket_inventory.html.markdown | 127 +++++ 5 files changed, 879 insertions(+) create mode 100644 aws/resource_aws_s3_bucket_inventory.go create mode 100644 aws/resource_aws_s3_bucket_inventory_test.go create mode 100644 website/docs/r/s3_bucket_inventory.html.markdown diff --git a/aws/provider.go b/aws/provider.go index a5020dfe052..6a513c7249f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -559,6 +559,7 @@ func Provider() terraform.ResourceProvider { "aws_s3_bucket_object": resourceAwsS3BucketObject(), "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), "aws_security_group": resourceAwsSecurityGroup(), "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), "aws_default_security_group": resourceAwsDefaultSecurityGroup(), diff --git a/aws/resource_aws_s3_bucket_inventory.go b/aws/resource_aws_s3_bucket_inventory.go new file mode 100644 index 00000000000..eb4e8c62b77 --- /dev/null +++ b/aws/resource_aws_s3_bucket_inventory.go @@ -0,0 +1,451 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsS3BucketInventory() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsS3BucketInventoryPut, + Read: resourceAwsS3BucketInventoryRead, + Update: resourceAwsS3BucketInventoryPut, + Delete: resourceAwsS3BucketInventoryDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateMaxLength(64), + }, + "enabled": { + Type: schema.TypeBool, + Default: true, + Optional: true, + }, + "filter": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "destination": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "format": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryFormatCsv, + s3.InventoryFormatOrc, + }, false), + }, + "bucket_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "account_id": { + Type: schema.TypeString, + Optional: true, + }, + "prefix": { + Type: schema.TypeString, + Optional: true, + }, + "encryption": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "sse_kms": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"destination.0.bucket.0.encryption.0.sse_s3"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key_id": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + "sse_s3": &schema.Schema{ + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ConflictsWith: []string{"destination.0.bucket.0.encryption.0.sse_kms"}, + Elem: &schema.Resource{ + // No options currently; just existence of "sse_s3". + Schema: map[string]*schema.Schema{}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "schedule": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "frequency": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryFrequencyDaily, + s3.InventoryFrequencyWeekly, + }, false), + }, + }, + }, + }, + // TODO: Is there a sensible default for this? + "included_object_versions": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryIncludedObjectVersionsCurrent, + s3.InventoryIncludedObjectVersionsAll, + }, false), + }, + "optional_fields": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + s3.InventoryOptionalFieldSize, + s3.InventoryOptionalFieldLastModifiedDate, + s3.InventoryOptionalFieldStorageClass, + s3.InventoryOptionalFieldEtag, + s3.InventoryOptionalFieldIsMultipartUploaded, + s3.InventoryOptionalFieldReplicationStatus, + s3.InventoryOptionalFieldEncryptionStatus, + }, false), + }, + Set: schema.HashString, + }, + }, + } +} + +func resourceAwsS3BucketInventoryPut(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + bucket := d.Get("bucket").(string) + name := d.Get("name").(string) + + inventoryConfiguration := &s3.InventoryConfiguration{ + Id: aws.String(name), + IsEnabled: aws.Bool(d.Get("enabled").(bool)), + } + + if v, ok := d.GetOk("included_object_versions"); ok { + inventoryConfiguration.IncludedObjectVersions = aws.String(v.(string)) + } + + if v, ok := d.GetOk("optional_fields"); ok { + inventoryConfiguration.OptionalFields = expandStringList(v.(*schema.Set).List()) + } + + if v, ok := d.GetOk("schedule"); ok { + scheduleList := v.([]interface{}) + scheduleMap := scheduleList[0].(map[string]interface{}) + inventoryConfiguration.Schedule = &s3.InventorySchedule{ + Frequency: aws.String(scheduleMap["frequency"].(string)), + } + } + + if v, ok := d.GetOk("filter"); ok { + filterList := v.([]interface{}) + filterMap := filterList[0].(map[string]interface{}) + inventoryConfiguration.Filter = expandS3InventoryFilter(filterMap) + } + + if v, ok := d.GetOk("destination"); ok { + destinationList := v.([]interface{}) + destinationMap := destinationList[0].(map[string]interface{}) + bucketList := destinationMap["bucket"].([]interface{}) + bucketMap := bucketList[0].(map[string]interface{}) + + inventoryConfiguration.Destination = &s3.InventoryDestination{ + S3BucketDestination: expandS3InventoryS3BucketDestination(bucketMap), + } + } + + input := &s3.PutBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + InventoryConfiguration: inventoryConfiguration, + } + + log.Printf("[DEBUG] Putting S3 bucket inventory configuration: %s", input) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.PutBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error putting S3 bucket inventory configuration: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", bucket, name)) + + return resourceAwsS3BucketInventoryRead(d, meta) +} + +func resourceAwsS3BucketInventoryDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + + bucket, name, err := resourceAwsS3BucketInventoryParseID(d.Id()) + if err != nil { + return err + } + + input := &s3.DeleteBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + + log.Printf("[DEBUG] Deleting S3 bucket inventory configuration: %s", input) + _, err = conn.DeleteBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + return nil + } + return fmt.Errorf("Error deleting S3 bucket inventory configuration: %s", err) + } + + return nil +} + +func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3conn + + bucket, name, err := resourceAwsS3BucketInventoryParseID(d.Id()) + if err != nil { + return err + } + + d.Set("bucket", bucket) + d.Set("name", name) + + input := &s3.GetBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + + log.Printf("[DEBUG] Reading S3 bucket inventory configuration: %s", input) + output, err := conn.GetBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + log.Printf("[WARN] %s S3 bucket inventory configuration not found, removing from state.", d.Id()) + d.SetId("") + return nil + } + return err + } + + d.Set("enabled", aws.BoolValue(output.InventoryConfiguration.IsEnabled)) + d.Set("included_object_versions", aws.StringValue(output.InventoryConfiguration.IncludedObjectVersions)) + + if err := d.Set("optional_fields", flattenStringList(output.InventoryConfiguration.OptionalFields)); err != nil { + return fmt.Errorf("error setting optional_fields: %s", err) + } + + if err := d.Set("filter", flattenS3InventoryFilter(output.InventoryConfiguration.Filter)); err != nil { + return fmt.Errorf("error setting filter: %s", err) + } + + if err := d.Set("schedule", flattenS3InventorySchedule(output.InventoryConfiguration.Schedule)); err != nil { + return fmt.Errorf("error setting schedule: %s", err) + } + + if output.InventoryConfiguration.Destination != nil { + destination := map[string]interface{}{ + "bucket": flattenS3InventoryS3BucketDestination(output.InventoryConfiguration.Destination.S3BucketDestination), + } + + if err := d.Set("destination", []map[string]interface{}{destination}); err != nil { + return fmt.Errorf("error setting destination: %s", err) + } + } + + return nil +} + +func expandS3InventoryFilter(m map[string]interface{}) *s3.InventoryFilter { + v, ok := m["prefix"] + if !ok { + return nil + } + return &s3.InventoryFilter{ + Prefix: aws.String(v.(string)), + } +} + +func flattenS3InventoryFilter(filter *s3.InventoryFilter) []map[string]interface{} { + if filter == nil { + return nil + } + + result := make([]map[string]interface{}, 0, 1) + + m := make(map[string]interface{}, 0) + if filter.Prefix != nil { + m["prefix"] = aws.StringValue(filter.Prefix) + } + + result = append(result, m) + + return result +} + +func flattenS3InventorySchedule(schedule *s3.InventorySchedule) []map[string]interface{} { + result := make([]map[string]interface{}, 0, 1) + + m := make(map[string]interface{}, 1) + m["frequency"] = aws.StringValue(schedule.Frequency) + + result = append(result, m) + + return result +} + +func expandS3InventoryS3BucketDestination(m map[string]interface{}) *s3.InventoryS3BucketDestination { + destination := &s3.InventoryS3BucketDestination{ + Format: aws.String(m["format"].(string)), + Bucket: aws.String(m["bucket_arn"].(string)), + } + + if v, ok := m["account_id"]; ok && v.(string) != "" { + destination.AccountId = aws.String(v.(string)) + } + + if v, ok := m["prefix"]; ok && v.(string) != "" { + destination.Prefix = aws.String(v.(string)) + } + + if v, ok := m["encryption"].([]interface{}); ok && len(v) > 0 { + encryptionMap := v[0].(map[string]interface{}) + + encryption := &s3.InventoryEncryption{} + + for k, v := range encryptionMap { + data := v.([]interface{}) + + if len(data) == 0 { + continue + } + + switch k { + case "sse_kms": + m := data[0].(map[string]interface{}) + encryption.SSEKMS = &s3.SSEKMS{ + KeyId: aws.String(m["key_id"].(string)), + } + case "sse_s3": + encryption.SSES3 = &s3.SSES3{} + } + } + + destination.Encryption = encryption + } + + return destination +} + +func flattenS3InventoryS3BucketDestination(destination *s3.InventoryS3BucketDestination) []map[string]interface{} { + result := make([]map[string]interface{}, 0, 1) + + m := map[string]interface{}{ + "format": aws.StringValue(destination.Format), + "bucket_arn": aws.StringValue(destination.Bucket), + } + + if destination.AccountId != nil { + m["account_id"] = aws.StringValue(destination.AccountId) + } + if destination.Prefix != nil { + m["prefix"] = aws.StringValue(destination.Prefix) + } + + if destination.Encryption != nil { + encryption := make(map[string]interface{}, 1) + if destination.Encryption.SSES3 != nil { + encryption["sse_s3"] = []map[string]interface{}{{}} + } else if destination.Encryption.SSEKMS != nil { + encryption["sse_kms"] = []map[string]interface{}{ + { + "key_id": aws.StringValue(destination.Encryption.SSEKMS.KeyId), + }, + } + } + m["encryption"] = []map[string]interface{}{encryption} + } + + result = append(result, m) + + return result +} + +func resourceAwsS3BucketInventoryParseID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("please make sure the ID is in the form BUCKET:NAME (i.e. my-bucket:EntireBucket") + } + bucket := idParts[0] + name := idParts[1] + return bucket, name, nil +} diff --git a/aws/resource_aws_s3_bucket_inventory_test.go b/aws/resource_aws_s3_bucket_inventory_test.go new file mode 100644 index 00000000000..50561fba280 --- /dev/null +++ b/aws/resource_aws_s3_bucket_inventory_test.go @@ -0,0 +1,296 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSS3BucketInventory_basic(t *testing.T) { + var conf s3.InventoryConfiguration + rString := acctest.RandString(8) + resourceName := "aws_s3_bucket_inventory.test" + + bucketName := fmt.Sprintf("tf-acc-bucket-inventory-%s", rString) + inventoryName := t.Name() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketInventoryDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSS3BucketInventoryConfig(bucketName, inventoryName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketInventoryConfigExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "bucket", bucketName), + resource.TestCheckNoResourceAttr(resourceName, "filter"), + resource.TestCheckResourceAttr(resourceName, "name", inventoryName), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "included_object_versions", "All"), + + resource.TestCheckResourceAttr(resourceName, "optional_fields.#", "2"), + + resource.TestCheckResourceAttr(resourceName, "schedule.#", "1"), + resource.TestCheckResourceAttr(resourceName, "schedule.0.frequency", "Weekly"), + + resource.TestCheckResourceAttr(resourceName, "destination.#", "1"), + resource.TestCheckResourceAttr(resourceName, "destination.0.bucket.#", "1"), + resource.TestCheckResourceAttr(resourceName, "destination.0.bucket.0.bucket_arn", "arn:aws:s3:::"+bucketName), + resource.TestCheckResourceAttrSet(resourceName, "destination.0.bucket.0.account_id"), + resource.TestCheckResourceAttr(resourceName, "destination.0.bucket.0.format", "ORC"), + resource.TestCheckResourceAttr(resourceName, "destination.0.bucket.0.prefix", "inventory"), + ), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSS3BucketInventory_encryptWithSSES3(t *testing.T) { + var conf s3.InventoryConfiguration + rString := acctest.RandString(8) + resourceName := "aws_s3_bucket_inventory.test" + + bucketName := fmt.Sprintf("tf-acc-bucket-inventory-%s", rString) + inventoryName := t.Name() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketInventoryDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSS3BucketInventoryConfigEncryptWithSSES3(bucketName, inventoryName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketInventoryConfigExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "destination.0.bucket.0.encryption.0.sse_s3.#", "1"), + ), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSS3BucketInventory_encryptWithSSEKMS(t *testing.T) { + var conf s3.InventoryConfiguration + rString := acctest.RandString(8) + resourceName := "aws_s3_bucket_inventory.test" + + bucketName := fmt.Sprintf("tf-acc-bucket-inventory-%s", rString) + inventoryName := t.Name() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSS3BucketInventoryDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSS3BucketInventoryConfigEncryptWithSSEKMS(bucketName, inventoryName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketInventoryConfigExists(resourceName, &conf), + resource.TestCheckResourceAttr(resourceName, "destination.0.bucket.0.encryption.0.sse_kms.#", "1"), + resource.TestMatchResourceAttr(resourceName, "destination.0.bucket.0.encryption.0.sse_kms.0.key_id", regexp.MustCompile("^arn:aws:kms:")), + ), + }, + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSS3BucketInventoryConfigExists(n string, res *s3.InventoryConfiguration) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No S3 bucket inventory configuration ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).s3conn + bucket, name, err := resourceAwsS3BucketInventoryParseID(rs.Primary.ID) + if err != nil { + return err + } + + input := &s3.GetBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + log.Printf("[DEBUG] Reading S3 bucket inventory configuration: %s", input) + output, err := conn.GetBucketInventoryConfiguration(input) + if err != nil { + return err + } + + *res = *output.InventoryConfiguration + + return nil + } +} + +func testAccCheckAWSS3BucketInventoryDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).s3conn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_s3_bucket_inventory" { + continue + } + + bucket, name, err := resourceAwsS3BucketInventoryParseID(rs.Primary.ID) + if err != nil { + return err + } + + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + input := &s3.GetBucketInventoryConfigurationInput{ + Bucket: aws.String(bucket), + Id: aws.String(name), + } + log.Printf("[DEBUG] Reading S3 bucket inventory configuration: %s", input) + output, err := conn.GetBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + return nil + } + return resource.NonRetryableError(err) + } + if output.InventoryConfiguration != nil { + return resource.RetryableError(fmt.Errorf("S3 bucket inventory configuration exists: %v", output)) + } + return nil + }) + if err != nil { + return err + } + } + return nil +} + +func testAccAWSS3BucketInventoryConfigBucket(name string) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "bucket" { + bucket = "%s" + acl = "private" +} +`, name) +} + +func testAccAWSS3BucketInventoryConfig(bucketName, inventoryName string) string { + return fmt.Sprintf(` +%s +data "aws_caller_identity" "current" {} + +resource "aws_s3_bucket_inventory" "test" { + bucket = "${aws_s3_bucket.bucket.id}" + name = "%s" + + included_object_versions = "All" + + optional_fields = [ + "Size", + "LastModifiedDate", + ] + + filter { + prefix = "documents/" + } + + schedule { + frequency = "Weekly" + } + + destination { + bucket { + format = "ORC" + bucket_arn = "${aws_s3_bucket.bucket.arn}" + account_id = "${data.aws_caller_identity.current.account_id}" + prefix = "inventory" + } + } +} +`, testAccAWSS3BucketMetricsConfigBucket(bucketName), inventoryName) +} + +func testAccAWSS3BucketInventoryConfigEncryptWithSSES3(bucketName, inventoryName string) string { + return fmt.Sprintf(` +%s +resource "aws_s3_bucket_inventory" "test" { + bucket = "${aws_s3_bucket.bucket.id}" + name = "%s" + + included_object_versions = "Current" + + schedule { + frequency = "Daily" + } + + destination { + bucket { + format = "CSV" + bucket_arn = "${aws_s3_bucket.bucket.arn}" + + encryption { + sse_s3 {} + } + } + } +} +`, testAccAWSS3BucketMetricsConfigBucket(bucketName), inventoryName) +} + +func testAccAWSS3BucketInventoryConfigEncryptWithSSEKMS(bucketName, inventoryName string) string { + return fmt.Sprintf(` +%s +resource "aws_kms_key" "inventory" { + description = "Terraform acc test S3 inventory SSE-KMS encryption: %s" + deletion_window_in_days = 7 +} + +resource "aws_s3_bucket_inventory" "test" { + bucket = "${aws_s3_bucket.bucket.id}" + name = "%s" + + included_object_versions = "Current" + + schedule { + frequency = "Daily" + } + + destination { + bucket { + format = "ORC" + bucket_arn = "${aws_s3_bucket.bucket.arn}" + + encryption { + sse_kms { + key_id = "${aws_kms_key.inventory.arn}" + } + } + } + } +} +`, testAccAWSS3BucketMetricsConfigBucket(bucketName), bucketName, inventoryName) +} diff --git a/website/aws.erb b/website/aws.erb index 0070bbdc6e5..3a8625d111e 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1861,6 +1861,10 @@ aws_s3_bucket + > + aws_s3_bucket_inventory + + > aws_s3_bucket_metric diff --git a/website/docs/r/s3_bucket_inventory.html.markdown b/website/docs/r/s3_bucket_inventory.html.markdown new file mode 100644 index 00000000000..2d85b2805b0 --- /dev/null +++ b/website/docs/r/s3_bucket_inventory.html.markdown @@ -0,0 +1,127 @@ +--- +layout: "aws" +page_title: "AWS: aws_s3_bucket_inventory" +sidebar_current: "docs-aws-resource-s3-bucket-inventory" +description: |- + Provides a S3 bucket inventory configuration resource. +--- + +# aws_s3_bucket_inventory + +Provides a S3 bucket [inventory configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) resource. + +## Example Usage + +### Add inventory configuration + +```hcl +resource "aws_s3_bucket" "test" { + bucket = "my-tf-test-bucket" +} + +resource "aws_s3_bucket" "inventory" { + bucket = "my-tf-inventory-bucket" +} + +resource "aws_s3_bucket_inventory" "test" { + bucket = "${aws_s3_bucket.test.id}" + name = "EntireBucketDaily" + + included_object_versions = "All" + + schedule { + frequency = "Daily" + } + + destination { + bucket { + format = "ORC" + bucket_arn = "${aws_s3_bucket.inventory.arn}" + } +} +``` + +### Add inventory configuration with S3 bucket object prefix + +```hcl +resource "aws_s3_bucket" "test" { + bucket = "my-tf-test-bucket" +} + +resource "aws_s3_bucket" "inventory" { + bucket = "my-tf-inventory-bucket" +} + +resource "aws_s3_bucket_inventory" "test-prefix" { + bucket = "${aws_s3_bucket.test.id}" + name = "DocumentsWeekly" + + included_object_versions = "Weekly" + + schedule { + frequency = "Daily" + } + + filter { + prefix = "documents/" + } + + destination { + bucket { + format = "ORC" + bucket = "${aws_s3_bucket.inventory.arn}" + prefix = "inventory" + } + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `bucket` - (Required) The name of the bucket to put inventory configuration. +* `name` - (Required) Unique identifier of the inventory configuration for the bucket. +* `included_object_versions` - (Required) Object filtering that accepts a prefix (documented below). Can be `All` or `Current`. +* `schedule` - (Required) Contains the frequency for generating inventory results (documented below). +* `destination` - (Required) Destination bucket where inventory list files are written (documented below). +* `enabled` - (Optional, Default: true) Specifies whether the inventory is enabled or disabled. +* `filter` - (Optional) Object filtering that accepts a prefix (documented below). +* `optional_fields` - (Optional) Contains the optional fields that are included in the inventory results. + +The `filter` configuration supports the following: + +* `prefix` - (Optional) Object prefix for filtering (singular). + +The `schedule` configuration supports the following: + +* `frequency` - (Required) Specifies how frequently inventory results are produced. Can be `Daily` or `Weekly`. + +The `destination` configuration supports the following: + +* `bucket` - (Required) The S3 bucket configuration where inventory results are published (documented below). + +The `bucket` configuration supports the following: + +* `bucket_arn` - (Required) The Amazon S3 bucket ARN of the destination. +* `format` - (Required) Specifies the output format of the inventory results. Can be `CSV` or [`ORC`](https://orc.apache.org/). +* `account_id` - (Optional) The ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes. +* `prefix` - (Optional) The prefix that is prepended to all inventory results. +* `encryption` - (Optional) Contains the type of server-side encryption to use to encrypt the inventory (documented below). + +The `encryption` configuration supports the following: + +* `sse_kms` - (Optional) Specifies to use server-side encryption with AWS KMS-managed keys to encrypt the inventory file (documented below). +* `sse_s3` - (Optional) Specifies to use server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file. + +The `sse_kms` configuration supports the following: + +* `kms_id` - (Required) The ARN of the KMS customer master key (CMK) used to encrypt the inventory file. + +## Import + +S3 bucket inventory configurations can be imported using `bucket:inventory`, e.g. + +``` +$ terraform import aws_s3_bucket_inventory.my-bucket-entire-bucket my-bucket:EntireBucket +``` From 42bbf33109cf97a43d55bdc180209130acc40ba8 Mon Sep 17 00:00:00 2001 From: Daniel White Date: Fri, 29 Jun 2018 15:05:59 +1000 Subject: [PATCH 1664/3316] aws/resource_aws_s3_bucket_inventory: Retry reads on creation This is to ensure that a recently created resource doesn't immediately fail due to eventual consistency. --- aws/resource_aws_s3_bucket_inventory.go | 26 ++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_s3_bucket_inventory.go b/aws/resource_aws_s3_bucket_inventory.go index eb4e8c62b77..4c3d7c597d4 100644 --- a/aws/resource_aws_s3_bucket_inventory.go +++ b/aws/resource_aws_s3_bucket_inventory.go @@ -287,14 +287,26 @@ func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{}) } log.Printf("[DEBUG] Reading S3 bucket inventory configuration: %s", input) - output, err := conn.GetBucketInventoryConfiguration(input) - if err != nil { - if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { - log.Printf("[WARN] %s S3 bucket inventory configuration not found, removing from state.", d.Id()) - d.SetId("") - return nil + var output *s3.GetBucketInventoryConfigurationOutput + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + output, err = conn.GetBucketInventoryConfiguration(input) + if err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || isAWSErr(err, "NoSuchConfiguration", "The specified configuration does not exist.") { + if d.IsNewResource() { + return resource.RetryableError(err) + } + return nil + } + return resource.NonRetryableError(err) } - return err + return nil + }) + + if output == nil || output.InventoryConfiguration == nil { + log.Printf("[WARN] %s S3 bucket inventory configuration not found, removing from state.", d.Id()) + d.SetId("") + return nil } d.Set("enabled", aws.BoolValue(output.InventoryConfiguration.IsEnabled)) From 2c4b05b1982e9dd3d3dd1cfe90ccb7f301dc7ee7 Mon Sep 17 00:00:00 2001 From: Daniel White Date: Fri, 29 Jun 2018 09:54:49 +1000 Subject: [PATCH 1665/3316] aws/resource_aws_s3_bucket_inventory: Prevent import if SSE-S3 encryption is enabled This prevents importing a resource that has the feature enabled so that future updates don't accidentally stomp on the data. The SDK currently fails to marshal this option correctly in a create/update request. The risk is minimal since the create/update request fails anyway, but this will avoid a user being surprised by a failed update _after_ they've imported it into their state. See: https://github.com/aws/aws-sdk-go/issues/2015 --- aws/resource_aws_s3_bucket_inventory.go | 9 +++++++++ aws/resource_aws_s3_bucket_inventory_test.go | 2 ++ website/docs/r/s3_bucket_inventory.html.markdown | 2 ++ 3 files changed, 13 insertions(+) diff --git a/aws/resource_aws_s3_bucket_inventory.go b/aws/resource_aws_s3_bucket_inventory.go index 4c3d7c597d4..87a90f72de0 100644 --- a/aws/resource_aws_s3_bucket_inventory.go +++ b/aws/resource_aws_s3_bucket_inventory.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" "strings" @@ -325,6 +326,14 @@ func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{}) } if output.InventoryConfiguration.Destination != nil { + // Flag the existence of SSE-S3 encryption because it cannot be marshaled when updating a resource. + // Allowing import would risk disabling encryption inadvertently when applying updates. + if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption != nil { + if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption.SSES3 != nil { + return errors.New("sse_s3 encryption is unsupported") + } + } + destination := map[string]interface{}{ "bucket": flattenS3InventoryS3BucketDestination(output.InventoryConfiguration.Destination.S3BucketDestination), } diff --git a/aws/resource_aws_s3_bucket_inventory_test.go b/aws/resource_aws_s3_bucket_inventory_test.go index 50561fba280..b69365ceb78 100644 --- a/aws/resource_aws_s3_bucket_inventory_test.go +++ b/aws/resource_aws_s3_bucket_inventory_test.go @@ -60,6 +60,8 @@ func TestAccAWSS3BucketInventory_basic(t *testing.T) { } func TestAccAWSS3BucketInventory_encryptWithSSES3(t *testing.T) { + t.Skip("SSE-S3 is not supported by the SDK.") + var conf s3.InventoryConfiguration rString := acctest.RandString(8) resourceName := "aws_s3_bucket_inventory.test" diff --git a/website/docs/r/s3_bucket_inventory.html.markdown b/website/docs/r/s3_bucket_inventory.html.markdown index 2d85b2805b0..d648fb13d86 100644 --- a/website/docs/r/s3_bucket_inventory.html.markdown +++ b/website/docs/r/s3_bucket_inventory.html.markdown @@ -111,6 +111,8 @@ The `bucket` configuration supports the following: The `encryption` configuration supports the following: +~> **NOTE:** `sse_s3` is currently unsupported. + * `sse_kms` - (Optional) Specifies to use server-side encryption with AWS KMS-managed keys to encrypt the inventory file (documented below). * `sse_s3` - (Optional) Specifies to use server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file. From dbba6f4e89416318fdc57c6b5b7a98a846f99000 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 29 Jun 2018 12:19:28 +0400 Subject: [PATCH 1666/3316] add update func for neptune cluster --- aws/resource_aws_neptune_cluster.go | 142 ++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index 84cbcfd3194..b97feb146a4 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -648,6 +648,129 @@ func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, return nil } +func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + requestUpdate := false + + req := &neptune.ModifyDBClusterInput{ + ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), + DBClusterIdentifier: aws.String(d.Id()), + } + + if d.HasChange("master_password") { + req.MasterUserPassword = aws.String(d.Get("master_password").(string)) + requestUpdate = true + } + + if d.HasChange("vpc_security_group_ids") { + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + req.VpcSecurityGroupIds = expandStringList(attr.List()) + } else { + req.VpcSecurityGroupIds = []*string{} + } + requestUpdate = true + } + + if d.HasChange("preferred_backup_window") { + req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) + requestUpdate = true + } + + if d.HasChange("preferred_maintenance_window") { + req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) + requestUpdate = true + } + + if d.HasChange("backup_retention_period") { + req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) + requestUpdate = true + } + + if d.HasChange("db_cluster_parameter_group_name") { + d.SetPartial("db_cluster_parameter_group_name") + req.DBClusterParameterGroupName = aws.String(d.Get("db_cluster_parameter_group_name").(string)) + requestUpdate = true + } + + if d.HasChange("iam_database_authentication_enabled") { + req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) + requestUpdate = true + } + + if requestUpdate { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.ModifyDBCluster(req) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + if isAWSErr(err, neptune.ErrCodeInvalidDBClusterStateFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Failed to modify Neptune Cluster (%s): %s", d.Id(), err) + } + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsNeptuneClusterUpdatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutUpdate), + MinTimeout: 10 * time.Second, + Delay: 10 * time.Second, + } + + log.Printf("[INFO] Waiting for Neptune Cluster (%s) to modify", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for Neptune Cluster (%s) to modify: %s", d.Id(), err) + } + } + + if d.HasChange("iam_roles") { + oraw, nraw := d.GetChange("iam_roles") + if oraw == nil { + oraw = new(schema.Set) + } + if nraw == nil { + nraw = new(schema.Set) + } + + os := oraw.(*schema.Set) + ns := nraw.(*schema.Set) + removeRoles := os.Difference(ns) + enableRoles := ns.Difference(os) + + for _, role := range enableRoles.List() { + err := setIamRoleToNeptuneCluster(d.Id(), role.(string), conn) + if err != nil { + return err + } + } + + for _, role := range removeRoles.List() { + err := removeIamRoleFromNeptuneCluster(d.Id(), role.(string), conn) + if err != nil { + return err + } + } + } + + if arn, ok := d.GetOk("arn"); ok { + if err := setTagsNeptune(conn, d, arn.(string)); err != nil { + return err + } else { + d.SetPartial("tags") + } + } + + return resourceAwsRDSClusterRead(d, meta) +} + func resourceAwsNeptuneClusterStateRefreshFunc( d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { return func() (interface{}, string, error) { @@ -699,6 +822,19 @@ func setIamRoleToNeptuneCluster(clusterIdentifier string, roleArn string, conn * return nil } +func removeIamRoleFromNeptuneCluster(clusterIdentifier string, roleArn string, conn *neptune.Neptune) error { + params := &neptune.RemoveRoleFromDBClusterInput{ + DBClusterIdentifier: aws.String(clusterIdentifier), + RoleArn: aws.String(roleArn), + } + _, err := conn.RemoveRoleFromDBCluster(params) + if err != nil { + return err + } + + return nil +} + var resourceAwsNeptuneClusterCreatePendingStates = []string{ "creating", "backing-up", @@ -707,3 +843,9 @@ var resourceAwsNeptuneClusterCreatePendingStates = []string{ "migrating", "resetting-master-credentials", } + +var resourceAwsNeptuneClusterUpdatePendingStates = []string{ + "backing-up", + "modifying", + "resetting-master-credentials", +} From 39f045e5784cc77bba1da1e721a89dfbbb16d744 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 29 Jun 2018 13:02:58 +0400 Subject: [PATCH 1667/3316] add delete func for neptune cluster --- aws/resource_aws_neptune_cluster.go | 97 +++++++++++++++++++++++------ aws/tagsNeptune.go | 1 + 2 files changed, 80 insertions(+), 18 deletions(-) diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index b97feb146a4..57e2e0e2a7a 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -8,8 +8,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/neptune" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -83,14 +81,14 @@ func resourceAwsNeptuneCluster() *schema.Resource { ForceNew: true, }, - "db_subnet_group_name": { + "neptune_subnet_group_name": { Type: schema.TypeString, Optional: true, ForceNew: true, Computed: true, }, - "db_cluster_parameter_group_name": { + "neptune_cluster_parameter_group_name": { Type: schema.TypeString, Optional: true, Computed: true, @@ -289,7 +287,7 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e opts.AvailabilityZones = expandStringList(attr.List()) } - if attr, ok := d.GetOk("db_subnet_group_name"); ok { + if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { opts.DBSubnetGroupName = aws.String(attr.(string)) } @@ -308,7 +306,7 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e opts.VpcSecurityGroupIds = expandStringList(attr.List()) } - if _, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + if _, ok := d.GetOk("neptune_cluster_parameter_group_name"); ok { clusterUpdate = true } @@ -332,7 +330,7 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e } if clusterUpdate { - log.Printf("[INFO] Neptune Cluster is restoring from snapshot with default db_cluster_parameter_group_name, backup_retention_period and vpc_security_group_ids" + + log.Printf("[INFO] Neptune Cluster is restoring from snapshot with default neptune_cluster_parameter_group_name, backup_retention_period and vpc_security_group_ids" + "but custom values should be set, will now update after snapshot is restored!") d.SetId(d.Get("cluster_identifier").(string)) @@ -374,11 +372,11 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e createOpts.Port = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("db_subnet_group_name"); ok { + if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { createOpts.DBSubnetGroupName = aws.String(attr.(string)) } - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + if attr, ok := d.GetOk("neptune_cluster_parameter_group_name"); ok { createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) } @@ -455,11 +453,11 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e createOpts.Port = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("db_subnet_group_name"); ok { + if attr, ok := d.GetOk("neptune_subnet_group_name"); ok { createOpts.DBSubnetGroupName = aws.String(attr.(string)) } - if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + if attr, ok := d.GetOk("neptune_cluster_parameter_group_name"); ok { createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) } @@ -596,8 +594,8 @@ func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, d.Set("cluster_identifier", dbc.DBClusterIdentifier) d.Set("cluster_resource_id", dbc.DbClusterResourceId) - d.Set("db_subnet_group_name", dbc.DBSubnetGroup) - d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) + d.Set("neptune_subnet_group_name", dbc.DBSubnetGroup) + d.Set("neptune_cluster_parameter_group_name", dbc.DBClusterParameterGroup) d.Set("endpoint", dbc.Endpoint) d.Set("engine", dbc.Engine) d.Set("engine_version", dbc.EngineVersion) @@ -686,9 +684,9 @@ func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) e requestUpdate = true } - if d.HasChange("db_cluster_parameter_group_name") { - d.SetPartial("db_cluster_parameter_group_name") - req.DBClusterParameterGroupName = aws.String(d.Get("db_cluster_parameter_group_name").(string)) + if d.HasChange("neptune_cluster_parameter_group_name") { + d.SetPartial("neptune_cluster_parameter_group_name") + req.DBClusterParameterGroupName = aws.String(d.Get("neptune_cluster_parameter_group_name").(string)) requestUpdate = true } @@ -768,7 +766,63 @@ func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) e } } - return resourceAwsRDSClusterRead(d, meta) + return resourceAwsNeptuneClusterRead(d, meta) +} + +func resourceAwsNeptuneClusterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).neptuneconn + log.Printf("[DEBUG] Destroying Neptune Cluster (%s)", d.Id()) + + deleteOpts := neptune.DeleteDBClusterInput{ + DBClusterIdentifier: aws.String(d.Id()), + } + + skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) + deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) + + if skipFinalSnapshot == false { + if name, present := d.GetOk("final_snapshot_identifier"); present { + deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) + } else { + return fmt.Errorf("Neptune Cluster FinalSnapshotIdentifier is required when a final snapshot is required") + } + } + + log.Printf("[DEBUG] Neptune Cluster delete options: %s", deleteOpts) + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteDBCluster(&deleteOpts) + if err != nil { + if isAWSErr(err, neptune.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { + return resource.RetryableError(err) + } + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + return nil + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Neptune Cluster cannot be deleted: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsNeptuneClusterDeletePendingStates, + Target: []string{"destroyed"}, + Refresh: resourceAwsNeptuneClusterStateRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutDelete), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("[WARN] Error deleting Neptune Cluster (%s): %s", d.Id(), err) + } + + return nil } func resourceAwsNeptuneClusterStateRefreshFunc( @@ -785,7 +839,7 @@ func resourceAwsNeptuneClusterStateRefreshFunc( log.Printf("[DEBUG] Neptune Cluster (%s) not found", d.Id()) return 42, "destroyed", nil } - log.Printf("[DEBUG] Error on retrieving DB Cluster (%s) when waiting: %s", d.Id(), err) + log.Printf("[DEBUG] Error on retrieving Neptune Cluster (%s) when waiting: %s", d.Id(), err) return nil, "", err } @@ -849,3 +903,10 @@ var resourceAwsNeptuneClusterUpdatePendingStates = []string{ "modifying", "resetting-master-credentials", } + +var resourceAwsNeptuneClusterDeletePendingStates = []string{ + "available", + "deleting", + "backing-up", + "modifying", +} diff --git a/aws/tagsNeptune.go b/aws/tagsNeptune.go index 5fb056d04f4..3c54716c9ff 100644 --- a/aws/tagsNeptune.go +++ b/aws/tagsNeptune.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "regexp" From 410d387927c45078dd3cec910fb05fe2fc56ce09 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 29 Jun 2018 15:41:29 +0400 Subject: [PATCH 1668/3316] issue #4266 add Type attribute in aws_spot_fleet_request --- aws/resource_aws_spot_fleet_request.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index 21c06cef0d8..4fcf6bd8415 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -319,6 +319,12 @@ func resourceAwsSpotFleetRequest() *schema.Resource { ForceNew: true, ValidateFunc: validateRFC3339TimeString, }, + "fleet_type": { + Type: schema.TypeString, + Optional: true, + Default: "maintain", + ForceNew: true, + }, "spot_request_state": { Type: schema.TypeString, Computed: true, @@ -600,6 +606,7 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), + Type: aws.String(d.Get("fleet_type").(string)), } if v, ok := d.GetOk("excess_capacity_termination_policy"); ok { @@ -906,6 +913,7 @@ func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) e d.Set("replace_unhealthy_instances", config.ReplaceUnhealthyInstances) d.Set("instance_interruption_behaviour", config.InstanceInterruptionBehavior) + d.Set("fleet_type", config.Type) d.Set("launch_specification", launchSpecsToSet(config.LaunchSpecifications, conn)) return nil From e205afcffaf88697d8e8df663179f89f7d78d92c Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 29 Jun 2018 16:13:49 +0400 Subject: [PATCH 1669/3316] add acceptance test --- aws/resource_aws_spot_fleet_request_test.go | 95 +++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index d0be16d8ae5..99cd327e34e 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -108,6 +108,31 @@ func TestAccAWSSpotFleetRequest_instanceInterruptionBehavior(t *testing.T) { }) } +func TestAccAWSSpotFleetRequest_fleetType(t *testing.T) { + var sfr ec2.SpotFleetRequestConfig + rName := acctest.RandString(10) + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSpotFleetRequestConfigFleetType(rName, rInt), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSSpotFleetRequestExists( + "aws_spot_fleet_request.foo", &sfr), + resource.TestCheckResourceAttr( + "aws_spot_fleet_request.foo", "spot_request_state", "active"), + resource.TestCheckResourceAttr( + "aws_spot_fleet_request.foo", "fleet_type", "request"), + ), + }, + }, + }) +} + func TestAccAWSSpotFleetRequest_iamInstanceProfileArn(t *testing.T) { var sfr ec2.SpotFleetRequestConfig rName := acctest.RandString(10) @@ -830,6 +855,76 @@ resource "aws_spot_fleet_request" "foo" { `, rName, rInt, rInt, rName) } +func testAccAWSSpotFleetRequestConfigFleetType(rName string, rInt int) string { + return fmt.Sprintf(` +resource "aws_iam_policy" "test-policy" { + name = "test-policy-%d" + path = "/" + description = "Spot Fleet Request ACCTest Policy" + policy = < Date: Fri, 29 Jun 2018 08:15:05 -0400 Subject: [PATCH 1670/3316] vendor: aws-sdk-go@v1.14.16 --- .../aws/csm/{metricChan.go => metric_chan.go} | 0 .../aws/aws-sdk-go/aws/csm/reporter.go | 4 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/cloudfront/api.go | 136 --- .../aws-sdk-go/service/cloudfront/errors.go | 4 - .../aws-sdk-go/service/codepipeline/api.go | 4 + .../service/elasticbeanstalk/api.go | 50 +- .../aws/aws-sdk-go/service/lambda/api.go | 63 +- .../aws/aws-sdk-go/service/lambda/errors.go | 8 + .../aws-sdk-go/service/secretsmanager/api.go | 91 +- vendor/vendor.json | 992 +++++++++--------- 11 files changed, 640 insertions(+), 714 deletions(-) rename vendor/github.com/aws/aws-sdk-go/aws/csm/{metricChan.go => metric_chan.go} (100%) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go similarity index 100% rename from vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go rename to vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go index 1484c8fc5b1..d2481c18d27 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -223,8 +223,10 @@ func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { } apiCallHandler := request.NamedHandler{Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric} + apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric} + handlers.Complete.PushFrontNamed(apiCallHandler) + handlers.Complete.PushFrontNamed(apiCallAttemptHandler) - apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric} handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 96fc1306898..75fbf2f2c3e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.14.14" +const SDKVersion = "1.14.16" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index f3d4ee55e1d..3c98c555e9e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -1638,92 +1638,6 @@ func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePu return out, req.Send() } -const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole2017_10_30" - -// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceLinkedRole operation. The "output" return -// value will be populated with the request's response once the request completes -// successfuly. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// -// // Example sending a request using the DeleteServiceLinkedRoleRequest method. -// req, resp := client.DeleteServiceLinkedRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteServiceLinkedRole -func (c *CloudFront) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { - op := &request.Operation{ - Name: opDeleteServiceLinkedRole, - HTTPMethod: "DELETE", - HTTPPath: "/2017-10-30/service-linked-role/{RoleName}", - } - - if input == nil { - input = &DeleteServiceLinkedRoleInput{} - } - - output = &DeleteServiceLinkedRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServiceLinkedRole API operation for Amazon CloudFront. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudFront's -// API operation DeleteServiceLinkedRole for usage and error information. -// -// Returned Error Codes: -// * ErrCodeInvalidArgument "InvalidArgument" -// The argument is invalid. -// -// * ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// * ErrCodeResourceInUse "ResourceInUse" -// -// * ErrCodeNoSuchResource "NoSuchResource" -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-10-30/DeleteServiceLinkedRole -func (c *CloudFront) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - return out, req.Send() -} - -// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServiceLinkedRole for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudFront) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - const opDeleteStreamingDistribution = "DeleteStreamingDistribution2017_10_30" // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the @@ -7551,56 +7465,6 @@ func (s DeletePublicKeyOutput) GoString() string { return s.String() } -type DeleteServiceLinkedRoleInput struct { - _ struct{} `type:"structure"` - - // RoleName is a required field - RoleName *string `location:"uri" locationName:"RoleName" type:"string" required:"true"` -} - -// String returns the string representation -func (s DeleteServiceLinkedRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceLinkedRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceLinkedRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { - s.RoleName = &v - return s -} - -type DeleteServiceLinkedRoleOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteServiceLinkedRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteServiceLinkedRoleOutput) GoString() string { - return s.String() -} - // The request to delete a streaming distribution. type DeleteStreamingDistributionInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go index 9894904782e..ede41494f30 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go @@ -301,10 +301,6 @@ const ( // No profile specified for the field-level encryption query argument. ErrCodeQueryArgProfileEmpty = "QueryArgProfileEmpty" - // ErrCodeResourceInUse for service response error code - // "ResourceInUse". - ErrCodeResourceInUse = "ResourceInUse" - // ErrCodeStreamingDistributionAlreadyExists for service response error code // "StreamingDistributionAlreadyExists". ErrCodeStreamingDistributionAlreadyExists = "StreamingDistributionAlreadyExists" diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index d308cfb9460..466db4a05d6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -2809,6 +2809,10 @@ func (c *CodePipeline) UpdatePipelineRequest(input *UpdatePipelineInput) (req *r // * ErrCodeInvalidStructureException "InvalidStructureException" // The specified structure was specified in an invalid format. // +// * ErrCodeLimitExceededException "LimitExceededException" +// The number of pipelines associated with the AWS account has exceeded the +// limit allowed for the account. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/UpdatePipeline func (c *CodePipeline) UpdatePipeline(input *UpdatePipelineInput) (*UpdatePipelineOutput, error) { req, out := c.UpdatePipelineRequest(input) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index f5e0fc7389a..d3c3004c931 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -2322,8 +2322,8 @@ func (c *ElasticBeanstalk) DescribeInstancesHealthRequest(input *DescribeInstanc // DescribeInstancesHealth API operation for AWS Elastic Beanstalk. // -// Retrives detailed information about the health of instances in your AWS Elastic -// Beanstalk. This operation requires enhanced health reporting (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced.html). +// Retrieves detailed information about the health of instances in your AWS +// Elastic Beanstalk. This operation requires enhanced health reporting (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4039,6 +4039,14 @@ type ApplicationResourceLifecycleConfig struct { _ struct{} `type:"structure"` // The ARN of an IAM service role that Elastic Beanstalk has permission to assume. + // + // The ServiceRole property is required the first time that you provide a VersionLifecycleConfig + // for the application in one of the supporting calls (CreateApplication or + // UpdateApplicationResourceLifecycle). After you provide it once, in either + // one of the calls, Elastic Beanstalk persists the Service Role with the application, + // and you don't need to specify it again in subsequent UpdateApplicationResourceLifecycle + // calls. You can, however, specify it in subsequent calls to change the Service + // Role to another value. ServiceRole *string `type:"string"` // The application version lifecycle configuration. @@ -4112,7 +4120,25 @@ type ApplicationVersionDescription struct { // S3. SourceBundle *S3Location `type:"structure"` - // The processing status of the application version. + // The processing status of the application version. Reflects the state of the + // application version during its creation. Many of the values are only applicable + // if you specified True for the Process parameter of the CreateApplicationVersion + // action. The following list describes the possible values. + // + // * Unprocessed – Application version wasn't pre-processed or validated. + // Elastic Beanstalk will validate configuration files during deployment + // of the application version to an environment. + // + // * Processing – Elastic Beanstalk is currently processing the application + // version. + // + // * Building – Application version is currently undergoing an AWS CodeBuild + // build. + // + // * Processed – Elastic Beanstalk was successfully pre-processed and validated. + // + // * Failed – Either the AWS CodeBuild build failed or configuration files + // didn't pass validation. This application version isn't usable. Status *string `type:"string" enum:"ApplicationVersionStatus"` // A unique identifier for the application version. @@ -5180,11 +5206,15 @@ type CreateApplicationVersionInput struct { // Describes this version. Description *string `type:"string"` - // Preprocesses and validates the environment manifest (env.yaml) and configuration + // Pre-processes and validates the environment manifest (env.yaml) and configuration // files (*.config files in the .ebextensions folder) in the source bundle. // Validating configuration files can identify issues prior to deploying the // application version to an environment. // + // You must turn processing on for application versions that you create using + // AWS CodeBuild or AWS CodeCommit. For application versions built from a source + // bundle in Amazon S3, processing is optional. + // // The Process option validates Elastic Beanstalk configuration files. It doesn't // validate your application's configuration files, like proxy server or Docker // configuration. @@ -5518,6 +5548,9 @@ type CreateEnvironmentInput struct { // This is an alternative to specifying a template name. If specified, AWS Elastic // Beanstalk sets the configuration values to the default values associated // with the specified solution stack. + // + // For a list of current solution stacks, see Elastic Beanstalk Supported Platforms + // (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html). SolutionStackName *string `type:"string"` // This specifies the tags applied to resources in the environment. @@ -8063,7 +8096,11 @@ type EnvironmentTier struct { // The type of this environment tier. Type *string `type:"string"` - // The version of this environment tier. + // The version of this environment tier. When you don't set a value to it, Elastic + // Beanstalk uses the latest compatible worker tier version. + // + // This member is deprecated. Any specific version that you set may become out + // of date. We recommend leaving it unspecified. Version *string `type:"string"` } @@ -11512,6 +11549,9 @@ const ( // EnvironmentHealthStatusSevere is a EnvironmentHealthStatus enum value EnvironmentHealthStatusSevere = "Severe" + + // EnvironmentHealthStatusSuspended is a EnvironmentHealthStatus enum value + EnvironmentHealthStatusSuspended = "Suspended" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index 8024623fe93..8babcb6868a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -269,19 +269,21 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // CreateEventSourceMapping API operation for AWS Lambda. // -// Identifies a stream as an event source for a Lambda function. It can be either -// an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes -// the specified function when records are posted to the stream. +// Identifies a poll-based event source for a Lambda function. It can be either +// an Amazon Kinesis or DynamoDB stream, or an Amazon SQS queue. AWS Lambda +// invokes the specified function when records are posted to the event source. // -// This association between a stream source and a Lambda function is called +// This association between a poll-based source and a Lambda function is called // the event source mapping. // -// You provide mapping information (for example, which stream to read from and -// which Lambda function to invoke) in the request body. +// You provide mapping information (for example, which stream or SQS queue to +// read from and which Lambda function to invoke) in the request body. // -// Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be -// associated with multiple AWS Lambda functions. A given Lambda function can -// be associated with multiple AWS event sources. +// Amazon Kinesis or DynamoDB stream event sources can be associated with multiple +// AWS Lambda functions and a given Lambda function can be associated with multiple +// AWS event sources. For Amazon SQS, you can configure multiple queues as event +// sources for a single Lambda function, but an SQS queue can be mapped only +// to a single Lambda function. // // If you are using versioning, you can specify a specific function version // or an alias via the function name parameter. For more information about versioning, @@ -605,6 +607,11 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation conflicts with the resource's availability. For example, you +// attempted to update an EventSoure Mapping in CREATING, or tried to delete +// a EventSoure mapping currently in the UPDATING state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.DeleteEventSourceMappingRequest(input) @@ -2935,6 +2942,11 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. // +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation conflicts with the resource's availability. For example, you +// attempted to update an EventSoure Mapping in CREATING, or tried to delete +// a EventSoure mapping currently in the UPDATING state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { req, out := c.UpdateEventSourceMappingRequest(input) @@ -3684,18 +3696,18 @@ type CreateEventSourceMappingInput struct { // The largest number of records that AWS Lambda will retrieve from your event // source at the time of invoking your function. Your function receives an event - // with all the retrieved records. The default is 100 records. + // with all the retrieved records. The default for Amazon Kinesis and Amazon + // DynamoDB is 100 records. For SQS, the default is 1. BatchSize *int64 `min:"1" type:"integer"` // Indicates whether AWS Lambda should begin polling the event source. By default, // Enabled is true. Enabled *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB - // stream that is the event source. Any record added to this stream could cause - // AWS Lambda to invoke your Lambda function, it depends on the BatchSize. AWS - // Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda - // function as JSON. + // The Amazon Resource Name (ARN) of the event source. Any record added to this + // source could cause AWS Lambda to invoke your Lambda function, it depends + // on the BatchSize. AWS Lambda POSTs the event's records to your Lambda function + // as JSON. // // EventSourceArn is a required field EventSourceArn *string `type:"string" required:"true"` @@ -3724,9 +3736,7 @@ type CreateEventSourceMappingInput struct { // in the Amazon Kinesis API Reference Guide or GetShardIterator (http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) // in the Amazon DynamoDB API Reference Guide. The AT_TIMESTAMP value is supported // only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). - // - // StartingPosition is a required field - StartingPosition *string `type:"string" required:"true" enum:"EventSourcePosition"` + StartingPosition *string `type:"string" enum:"EventSourcePosition"` // The timestamp of the data record from which to start reading. Used with shard // iterator type (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) @@ -3762,9 +3772,6 @@ func (s *CreateEventSourceMappingInput) Validate() error { if s.FunctionName != nil && len(*s.FunctionName) < 1 { invalidParams.Add(request.NewErrParamMinLen("FunctionName", 1)) } - if s.StartingPosition == nil { - invalidParams.Add(request.NewErrParamRequired("StartingPosition")) - } if invalidParams.Len() > 0 { return invalidParams @@ -4422,7 +4429,8 @@ func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentRes return s } -// Describes mapping between an Amazon Kinesis stream and a Lambda function. +// Describes mapping between an Amazon Kinesis or DynamoDB stream or an Amazon +// SQS queue and a Lambda function. type EventSourceMappingConfiguration struct { _ struct{} `type:"structure"` @@ -4431,11 +4439,12 @@ type EventSourceMappingConfiguration struct { // with all the retrieved records. BatchSize *int64 `min:"1" type:"integer"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the source - // of events. + // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream or + // the SQS queue that is the source of events. EventSourceArn *string `type:"string"` - // The Lambda function to invoke when AWS Lambda detects an event on the stream. + // The Lambda function to invoke when AWS Lambda detects an event on the poll-based + // source. FunctionArn *string `type:"string"` // The UTC time string indicating the last time the event mapping was updated. @@ -5648,8 +5657,8 @@ func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { type ListEventSourceMappingsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis stream. (This parameter - // is optional.) + // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream, + // or an SQS queue. (This parameter is optional.) EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"` // The name of the Lambda function. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go index 57daa1c34e6..447b49ed1a9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go @@ -130,6 +130,14 @@ const ( // The resource already exists. ErrCodeResourceConflictException = "ResourceConflictException" + // ErrCodeResourceInUseException for service response error code + // "ResourceInUseException". + // + // The operation conflicts with the resource's availability. For example, you + // attempted to update an EventSoure Mapping in CREATING, or tried to delete + // a EventSoure mapping currently in the UPDATING state. + ErrCodeResourceInUseException = "ResourceInUseException" + // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index 1cd7f4b96e8..3c89d60c4bc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -381,7 +381,7 @@ func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicy // DeleteResourcePolicy API operation for AWS Secrets Manager. // -// Deletes the resource-based policy currently attached to the secret. +// Deletes the resource-based permission policy that's attached to the secret. // // Minimum permissions // @@ -393,8 +393,8 @@ func (c *SecretsManager) DeleteResourcePolicyRequest(input *DeleteResourcePolicy // // * To attach a resource policy to a secret, use PutResourcePolicy. // -// * To retrieve the current resource-based policy that is attached to a -// secret, use GetResourcePolicy. +// * To retrieve the current resource-based policy that's attached to a secret, +// use GetResourcePolicy. // // * To list all of the currently available secrets, use ListSecrets. // @@ -828,10 +828,10 @@ func (c *SecretsManager) GetResourcePolicyRequest(input *GetResourcePolicyInput) // GetResourcePolicy API operation for AWS Secrets Manager. // -// Retrieves the JSON text of the resource-based policy attached to the specified -// secret. The JSON request string input and response output are shown formatted -// with whitespace and line breaks for better readability. Submit your input -// as a single line JSON string. +// Retrieves the JSON text of the resource-based policy document that's attached +// to the specified secret. The JSON request string input and response output +// are shown formatted with white space and line breaks for better readability. +// Submit your input as a single line JSON string. // // Minimum permissions // @@ -843,7 +843,7 @@ func (c *SecretsManager) GetResourcePolicyRequest(input *GetResourcePolicyInput) // // * To attach a resource policy to a secret, use PutResourcePolicy. // -// * To delete the resource-based policy that is attached to a secret, use +// * To delete the resource-based policy that's attached to a secret, use // DeleteResourcePolicy. // // * To list all of the currently available secrets, use ListSecrets. @@ -1381,13 +1381,14 @@ func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) // PutResourcePolicy API operation for AWS Secrets Manager. // -// Attaches the contents of the specified resource-based policy to a secret. -// A resource-based policy is optional. Alternatively, you can use IAM user-based -// policies that specify the secret's ARN in the policy statement's Resources -// element. You can also use a combination of both identity- an resource-based -// policies. The affected users and roles receive the permissions permitted -// by all of the relevant policies. For more information, see Using Resource-Based -// Policies for AWS Secrets Manager (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). +// Attaches the contents of the specified resource-based permission policy to +// a secret. A resource-based policy is optional. Alternatively, you can use +// IAM identity-based policies that specify the secret's Amazon Resource Name +// (ARN) in the policy statement's Resources element. You can also use a combination +// of both identity-based and resource-based policies. The affected users and +// roles receive the permissions that are permitted by all of the relevant policies. +// For more information, see Using Resource-Based Policies for AWS Secrets Manager +// (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). // For the complete description of the AWS policy syntax and grammar, see IAM // JSON Policy Reference (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) // in the IAM User Guide. @@ -1400,9 +1401,9 @@ func (c *SecretsManager) PutResourcePolicyRequest(input *PutResourcePolicyInput) // // Related operations // -// * To retrieve the resource policy attached to a secret, use GetResourcePolicy. +// * To retrieve the resource policy that's attached to a secret, use GetResourcePolicy. // -// * To delete the resource-based policy that is attached to a secret, use +// * To delete the resource-based policy that's attached to a secret, use // DeleteResourcePolicy. // // * To list all of the currently available secrets, use ListSecrets. @@ -2620,7 +2621,7 @@ type CreateSecretInput struct { // Specifies the friendly name of the new secret. // // The secret name must be ASCII letters, digits, or the following characters - // : /_+=,.@- + // : /_+=.@- // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -2842,9 +2843,9 @@ func (s *CreateSecretOutput) SetVersionId(v string) *CreateSecretOutput { type DeleteResourcePolicyInput struct { _ struct{} `type:"structure"` - // Specifies the secret for which you want to delete the attached resource-based - // policy. You can specify either the Amazon Resource Name (ARN) or the friendly - // name of the secret. + // Specifies the secret that you want to delete the attached resource-based + // policy for. You can specify either the Amazon Resource Name (ARN) or the + // friendly name of the secret. // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -2885,10 +2886,11 @@ func (s *DeleteResourcePolicyInput) SetSecretId(v string) *DeleteResourcePolicyI type DeleteResourcePolicyOutput struct { _ struct{} `type:"structure"` - // The ARN of the secret for which the resource-based policy was deleted. + // The ARN of the secret that the resource-based policy was deleted for. ARN *string `min:"20" type:"string"` - // The friendly name of the secret for which the resource-based policy was deleted. + // The friendly name of the secret that the resource-based policy was deleted + // for. Name *string `min:"1" type:"string"` } @@ -3347,9 +3349,9 @@ func (s *GetRandomPasswordOutput) SetRandomPassword(v string) *GetRandomPassword type GetResourcePolicyInput struct { _ struct{} `type:"structure"` - // Specifies the secret for which you want to retrieve the attached resource-based - // policy. You can specify either the Amazon Resource Name (ARN) or the friendly - // name of the secret. + // Specifies the secret that you want to retrieve the attached resource-based + // policy for. You can specify either the Amazon Resource Name (ARN) or the + // friendly name of the secret. // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -3390,18 +3392,19 @@ func (s *GetResourcePolicyInput) SetSecretId(v string) *GetResourcePolicyInput { type GetResourcePolicyOutput struct { _ struct{} `type:"structure"` - // The ARN of the secret for which the resource-based policy was retrieved. + // The ARN of the secret that the resource-based policy was retrieved for. ARN *string `min:"20" type:"string"` - // The friendly name of the secret for which the resource-based policy was retrieved. + // The friendly name of the secret that the resource-based policy was retrieved + // for. Name *string `min:"1" type:"string"` - // A JSON-formatted string that describes the permissions associated with the - // attached secret. These permissions are combined with any permissions associated - // with the user or role who attempts to access this secret. The combined permissions - // specify who can access the secret and what actions they can perform. For - // more information, see Authentication and Access Control for AWS Secrets Manager - // (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html) + // A JSON-formatted string that describes the permissions that are associated + // with the attached secret. These permissions are combined with any permissions + // that are associated with the user or role that attempts to access this secret. + // The combined permissions specify who can access the secret and what actions + // they can perform. For more information, see Authentication and Access Control + // for AWS Secrets Manager (http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html) // in the AWS Secrets Manager User Guide. ResourcePolicy *string `min:"1" type:"string"` } @@ -3868,19 +3871,18 @@ func (s *ListSecretsOutput) SetSecretList(v []*SecretListEntry) *ListSecretsOutp type PutResourcePolicyInput struct { _ struct{} `type:"structure"` - // A JSON-formatted string constructed according to the grammar and syntax for - // an AWS resource-based policy. The policy in the string identifies who can - // access or manage this secret and its versions. For information on how to - // format a JSON parameter for the various command line tool environments, see - // Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) + // A JSON-formatted string that's constructed according to the grammar and syntax + // for an AWS resource-based policy. The policy in the string identifies who + // can access or manage this secret and its versions. For information on how + // to format a JSON parameter for the various command line tool environments, + // see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json) // in the AWS CLI User Guide. // // ResourcePolicy is a required field ResourcePolicy *string `min:"1" type:"string" required:"true"` - // Specifies the secret to which you want to attach the resource-based policy. - // You can specify either the Amazon Resource Name (ARN) or the friendly name - // of the secret. + // Specifies the secret that you want to attach the resource-based policy to. + // You can specify either the ARN or the friendly name of the secret. // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -3933,10 +3935,11 @@ func (s *PutResourcePolicyInput) SetSecretId(v string) *PutResourcePolicyInput { type PutResourcePolicyOutput struct { _ struct{} `type:"structure"` - // The ARN of the secret for which the resource-based policy was retrieved. + // The ARN of the secret that the resource-based policy was retrieved for. ARN *string `min:"20" type:"string"` - // The friendly name of the secret for which the resource-based policy was retrieved. + // The friendly name of the secret that the resource-based policy was retrieved + // for. Name *string `min:"1" type:"string"` } diff --git a/vendor/vendor.json b/vendor/vendor.json index 5f332977ed0..a38b8f0b93a 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,980 +39,980 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "RVZfumYpBd2IRNpNI0UDX91cba4=", + "checksumSHA1": "f02wA9pKt/oP/zrPtJipDZznSp0=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "925zPp8gtaXi2gkWrgZ1gAA003A=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { - "checksumSHA1": "W4R+WW4t2Ty5mbKypFoATk3tqTA=", + "checksumSHA1": "GTdSvwEbZz636RtRQDrQMOU9q9Q=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "SiJtmziOCUHNwVwWjrD5ccxbEN0=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "CYLheDSqXftEAmmdj+tTiT+83Ko=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "+d8hhT6Ih+DsRpkF44pvw+IkI7w=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "u3cA2IiD36A+VnFIH7XtGjYk2NU=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Ij9RP5HrBWBYYb3/LEMHNNZXH9g=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "2ywNMWQ3qxbz/dzuuOC/42xXzWM=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "/JJPEdYxSgTTDqUDTAaSJQSKNn0=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "/2Ppb4vP/H+B3cM7bOOEeA7Z0iY=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "6zosteWJqUGM9+t9dkANQymMA9s=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "ZXFD3oHS8QZ3GgWn+k4lMnUaEUk=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "k1TqEWHeP84mmRewv19ZVORhSm8=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "MKWkj+pGwGygVTVTg/Q38JY+mhU=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "hq8SWUb/J1wEZ1O3TkV8xma5EXk=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "NaaFnxUCj2cKaWagwc9ZP6Su2UQ=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "/nF1VEl/Y9I9EYbUHvUuhqjipUk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "kko+es9ly+l/e9ngcpCdPx2DBAc=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "kHOf0VEd2Qy8PYZsg7/zG+JkF1o=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "gJiK41PSoCEfE02VEry4f6nBg0s=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "bbCNma+YJRqcjnIqmTagqs1IwWI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { - "checksumSHA1": "qbncX66lCkonIyPd/YimSRtSzhI=", + "checksumSHA1": "bupt0rs/P2QN+iuFeFC7oY1HZ14=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "P8cLAj/ovFt7uH3bB4dRg/2KApI=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "eCrAi2QJw0Ft6A8XK5ZGLpsPKwM=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "ItkRLsVGZt8uvkI4+7+mi9Ccy28=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Y+x1N7TFB7OesWPRoYXRwGOdQzs=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "PxsIahbkFuks12VthBlqFJIUzX0=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "ciAsJhe41ygl47dhStzMJfGVFPQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "tHLvGt81PahiKYHOXlF7bFvE9cE=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Q+W+AVveTI7xM3ay6HAi0FB4Dpc=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "6lozLpoMkQvw1r2cZMXujYiLqK8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { - "checksumSHA1": "uIURH7FXD0WRKqSv2uNsMM4a1nE=", + "checksumSHA1": "JNLWxWRvZ8UNPV8nWHgzIybuMuE=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "iPP1QQAsTiK0TYWVn7ksDLfDXDE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "JbgQL/r+cBKIKt+tQY8VSj0C2j8=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "orboEPrXFUPc3m7ZG8uPhZNZDdM=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "C0by27wccwVfdXwaNNyvDEYUPdA=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "/zBS/FARxFnNMfLUg1Vq1FVK95c=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "olDBindEWwTHzKfpWaS+xID4y90=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "i7fuDfXYhe4JMJhail5nZUg69Dk=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "jURA8oKlQkbYPPrBQIeOPbQAVN0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "GFq6SaQ4h48iP+gjllWjMyIbQfU=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "SfYmxNsUZdSLy6VahSyRVaACeSU=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "T4Yw3GPZg+KwAEudsypRfhbUrVw=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "niBN6QYBEhoHvxQpSH8qWjEMNYo=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "cmqLlPyg/fwIy8M3qaZTdBt0CGQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "mzgRjocmzU6VLUsim7E8/fffffk=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "A5DCzVFhE5iT60fQXjlyLDHKFsg=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { - "checksumSHA1": "qMusrd+gH5em91bS9/tvXBfnivQ=", + "checksumSHA1": "K0yPG0O4/Wv2pYASbxO6LjH8318=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "aNIs4oJTp3x73Fx24tKO2cDY5OM=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "cRuJDtc9rVpXUqfLrg1cJleaPjQ=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "XKNeVP6DCohd9Re9g4xGLuqXe0c=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "MWADuSvEQnYoVAI/HCnmJetMle4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "X+8twdJk/x1+8y1LxnKXXd3eVoY=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "PJQ5SFC+Ai5Mqn8rfGhuwttfqZk=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "xI94HsdAG+dBFCm38FoELBdbe9c=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "FEfr6yYlSRWsIV0M0kxm0/jOw0E=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "k/XNa0qsR9DMIG8Sqg4cGlePTKE=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "1tAb3rvB34c3zsX+DRY5xDJqNUA=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "si/Re/DEfX8xWIjpLS4NNISO/Ns=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Q2K/MWy6yy/kV9CZ0YhaEHBNgkI=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "OvCoIYyhBSlrCvsk8uidGznXIss=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "44R3VB9KreeYj0LFf3KBd37kPXI=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { - "checksumSHA1": "r5C9HizIrv+MWzpgHoJstHKZOOE=", + "checksumSHA1": "H49wXCqvNMWvsuj6+MfzsvLVE9s=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "zrWHv2XG/KP9E82ophSO0XF+Cu8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "xq1jxTLdjjWU+aupMh143C+Yb1Q=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "onhxya8p2Q2wgT2TakO+ZcjwY/I=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "HoX+EX8JW8kDZxJAs8545YRfjuI=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "ahm1SzqWwGUqPih6jPZwIevl2Pg=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "0YZZzbKYjappFNT8MUR5qNGQkRY=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "rrANYUKEHHEofZJYCP1pQhO35TE=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "p/+jOAMB5MSAnPloxJIFy77Hfck=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "W6AvJYPtvCLTeA0USbhvid2rP1o=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "yV8F3bM8W2kSZJH4TDx4mJWnrac=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Davg8yRIMOcfa7/6zp7Fj6GnpuA=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "32fGeVnRDBhJlp3Oc25r4R2M3oc=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "KRtVvKvBRTs2cTTuiRWzjhJ8OC0=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "oe9xtK3GMCwCDmra0+JC6GwJ99k=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "YB8Nvesxefrheq/zAGyO3NzSEYI=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "zTqXRGkYH+IyYOH5Uezj2M4B9xM=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { - "checksumSHA1": "bFSEGt/5kqW51wnxs2CWyBh83RU=", + "checksumSHA1": "JqG/wC6zOGiK99YlSy31DADaV5w=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "x2vfgk/EnGjOWPywWL+LKJKYCF0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Z61MRqI0vu8oGAaCZSCDes9gIvk=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "TPGJU1VzYOhJIdTbWal1ivDwT+4=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "7kmVHadImICOa4/MOXErR53CdbQ=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Zu/wepnCWpEe8M2DEYTaVTteys8=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "uguCtF1eoCG71dvEVqrYbFs7py0=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "vlL9ibWgidiPj0uQ2L/OF6DCVEs=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "Ro5RX6aw32UGrGueBK+zhA8+Z30=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "UGQwnAeB9SoJKyPPIpbDJVQws5g=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "aff39e8473db578a1cec9ac2f829a56813c1d631", - "revisionTime": "2018-06-26T20:42:33Z", - "version": "v1.14.14", - "versionExact": "v1.14.14" + "revision": "5e98666858b97db54a61044bb1150d3b81436860", + "revisionTime": "2018-06-28T21:27:56Z", + "version": "v1.14.16", + "versionExact": "v1.14.16" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", @@ -2091,4 +2091,4 @@ } ], "rootPath": "github.com/terraform-providers/terraform-provider-aws" -} \ No newline at end of file +} From 93791224618c0fbfc894089c346298d383f13768 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 29 Jun 2018 16:25:00 +0400 Subject: [PATCH 1671/3316] update documentation in spot_fleet_request --- website/docs/r/spot_fleet_request.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/spot_fleet_request.html.markdown b/website/docs/r/spot_fleet_request.html.markdown index 0f602a7edca..3226c26ae98 100644 --- a/website/docs/r/spot_fleet_request.html.markdown +++ b/website/docs/r/spot_fleet_request.html.markdown @@ -118,6 +118,8 @@ lowestPrice. * `instance_interruption_behaviour` - (Optional) Indicates whether a Spot instance stops or terminates when it is interrupted. Default is `terminate`. +* `fleet_type` - (Optional) The type of fleet request. Indicates whether the Spot Fleet only requests the target + capacity or also attempts to maintain it. Default is `maintain`. * `valid_until` - (Optional) The end date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request. Defaults to 24 hours. * `valid_from` - (Optional) The start date and time of the request, in UTC [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.8) format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately. * `load_balancers` (Optional) A list of elastic load balancer names to add to the Spot fleet. From 42e594918a1ae25e35d8d70affbd203a973bcbb0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 08:29:37 -0400 Subject: [PATCH 1672/3316] docs/resource/aws_s3_bucket_inventory: Fix sidebar link --- website/aws.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/aws.erb b/website/aws.erb index 3a8625d111e..9fdefaafb52 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1862,7 +1862,7 @@ > - aws_s3_bucket_inventory + aws_s3_bucket_inventory > From 57e2ae19c6aa9e91121281a73180feda9e17efbe Mon Sep 17 00:00:00 2001 From: Fred Dubois Date: Fri, 29 Jun 2018 08:46:01 -0400 Subject: [PATCH 1673/3316] Added filter to aws_route_tables --- aws/data_source_aws_route_tables.go | 6 ++++ aws/data_source_aws_route_tables_test.go | 40 ++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/aws/data_source_aws_route_tables.go b/aws/data_source_aws_route_tables.go index 2864ae5ac76..ef34987c37f 100644 --- a/aws/data_source_aws_route_tables.go +++ b/aws/data_source_aws_route_tables.go @@ -15,6 +15,8 @@ func dataSourceAwsRouteTables() *schema.Resource { Read: dataSourceAwsRouteTablesRead, Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), + "tags": tagsSchemaComputed(), "vpc_id": { @@ -49,6 +51,10 @@ func dataSourceAwsRouteTablesRead(d *schema.ResourceData, meta interface{}) erro tagsFromMap(d.Get("tags").(map[string]interface{})), )...) + req.Filters = append(req.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + log.Printf("[DEBUG] DescribeRouteTables %s\n", req) resp, err := conn.DescribeRouteTables(req) if err != nil { diff --git a/aws/data_source_aws_route_tables_test.go b/aws/data_source_aws_route_tables_test.go index 7843157a44b..8d5ae449afa 100644 --- a/aws/data_source_aws_route_tables_test.go +++ b/aws/data_source_aws_route_tables_test.go @@ -21,9 +21,10 @@ func TestAccDataSourceAwsRouteTables(t *testing.T) { { Config: testAccDataSourceAwsRouteTablesConfigWithDataSource(rInt), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_route_tables.test", "ids.#", "4"), - resource.TestCheckResourceAttr("data.aws_route_tables.private", "ids.#", "2"), + resource.TestCheckResourceAttr("data.aws_route_tables.test", "ids.#", "5"), + resource.TestCheckResourceAttr("data.aws_route_tables.private", "ids.#", "3"), resource.TestCheckResourceAttr("data.aws_route_tables.test2", "ids.#", "1"), + resource.TestCheckResourceAttr("data.aws_route_tables.filter_test", "ids.#", "2"), ), }, }, @@ -54,6 +55,7 @@ resource "aws_route_table" "test_public_a" { tags { Name = "tf-acc-route-tables-data-source-public-a" Tier = "Public" + Component = "Frontend" } } @@ -63,6 +65,7 @@ resource "aws_route_table" "test_private_a" { tags { Name = "tf-acc-route-tables-data-source-private-a" Tier = "Private" + Component = "Database" } } @@ -72,6 +75,17 @@ resource "aws_route_table" "test_private_b" { tags { Name = "tf-acc-route-tables-data-source-private-b" Tier = "Private" + Component = "Backend-1" + } +} + +resource "aws_route_table" "test_private_c" { + vpc_id = "${aws_vpc.test.id}" + + tags { + Name = "tf-acc-route-tables-data-source-private-c" + Tier = "Private" + Component = "Backend-2" } } @@ -89,6 +103,15 @@ data "aws_route_tables" "private" { Tier = "Private" } } + +data "aws_route_tables" "filter_test" { + vpc_id = "${aws_vpc.test.id}" + + filter { + name = "tag:Component" + values = ["Backend*"] + } +} `, rInt, rInt) } @@ -108,6 +131,7 @@ resource "aws_route_table" "test_public_a" { tags { Name = "tf-acc-route-tables-data-source-public-a" Tier = "Public" + Component = "Frontend" } } @@ -117,6 +141,7 @@ resource "aws_route_table" "test_private_a" { tags { Name = "tf-acc-route-tables-data-source-private-a" Tier = "Private" + Component = "Database" } } @@ -126,6 +151,17 @@ resource "aws_route_table" "test_private_b" { tags { Name = "tf-acc-route-tables-data-source-private-b" Tier = "Private" + Component = "Backend-1" + } +} + +resource "aws_route_table" "test_private_c" { + vpc_id = "${aws_vpc.test.id}" + + tags { + Name = "tf-acc-route-tables-data-source-private-c" + Tier = "Private" + Component = "Backend-2" } } `, rInt) From b82237f64c7644b0cf9bd1b304cd9226fda607be Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 08:57:32 -0400 Subject: [PATCH 1674/3316] Update CHANGELOG for #5019 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2a1152474..1db085a98bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_launch_configuration` [GH-3624] +* **New Resource:** `aws_s3_bucket_inventory` [GH-5019] ENHANCEMENTS: From c006eb226c56c9978ee4898ecb7021f28b50b29a Mon Sep 17 00:00:00 2001 From: stack72 Date: Thu, 31 Aug 2017 16:35:36 +0100 Subject: [PATCH 1675/3316] New Resource: aws_vpc_associate_cidr_block Adds the ability to associate extra IPv4 or IPv6 CIDR Blocks with a VPC. In order to avoid getting into the same issue as security_group and security_group_rule, we added a diffSuppressFunc that stops people enabling `ipv6` for an existant AWS VPC. We added a note to the documentation to talk about this ``` % make testacc TEST=./aws TESTARGS='-run=TestAccAWSVpc_' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSVpc_ -timeout 120m === RUN TestAccAWSVpc_importBasic --- PASS: TestAccAWSVpc_importBasic (54.16s) === RUN TestAccAWSVpc_basic --- PASS: TestAccAWSVpc_basic (45.26s) === RUN TestAccAWSVpc_enableIpv6 --- PASS: TestAccAWSVpc_enableIpv6 (87.40s) === RUN TestAccAWSVpc_dedicatedTenancy --- PASS: TestAccAWSVpc_dedicatedTenancy (45.51s) === RUN TestAccAWSVpc_tags --- PASS: TestAccAWSVpc_tags (84.80s) === RUN TestAccAWSVpc_update --- PASS: TestAccAWSVpc_update (97.12s) === RUN TestAccAWSVpc_bothDnsOptionsSet --- PASS: TestAccAWSVpc_bothDnsOptionsSet (19.82s) === RUN TestAccAWSVpc_DisabledDnsSupport --- PASS: TestAccAWSVpc_DisabledDnsSupport (44.93s) === RUN TestAccAWSVpc_classiclinkOptionSet --- PASS: TestAccAWSVpc_classiclinkOptionSet (46.18s) === RUN TestAccAWSVpc_classiclinkDnsSupportOptionSet --- PASS: TestAccAWSVpc_classiclinkDnsSupportOptionSet (47.51s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 572.738s ``` ``` % make testacc TEST=./aws TESTARGS='-run=TestAccAWSVpcAssociat' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSVpcAssociat -timeout 120m === RUN TestAccAWSVpcAssociateIpv4CidrBlock --- PASS: TestAccAWSVpcAssociateIpv4CidrBlock (51.48s) === RUN TestAccAWSVpcAssociateIpv6CidrBlock --- PASS: TestAccAWSVpcAssociateIpv6CidrBlock (50.16s) === RUN TestAccAWSVpcAssociateIpv4AndIpv6CidrBlock --- PASS: TestAccAWSVpcAssociateIpv4AndIpv6CidrBlock (2.13s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 103.802s ``` --- aws/resource_aws_vpc.go | 100 +++----- aws/resource_aws_vpc_associate_cidr_block.go | 128 +++++++++ ...ource_aws_vpc_associate_cidr_block_test.go | 242 ++++++++++++++++++ aws/resource_aws_vpc_test.go | 20 +- website/aws.erb | 4 + website/docs/r/vpc.html.markdown | 4 + .../r/vpc_associate_cidr_block.html.markdown | 58 +++++ 7 files changed, 472 insertions(+), 84 deletions(-) create mode 100644 aws/resource_aws_vpc_associate_cidr_block.go create mode 100644 aws/resource_aws_vpc_associate_cidr_block_test.go create mode 100644 website/docs/r/vpc_associate_cidr_block.html.markdown diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index e1687477d0a..6b5d2dea88a 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -20,7 +20,7 @@ func resourceAwsVpc() *schema.Resource { Update: resourceAwsVpcUpdate, Delete: resourceAwsVpcDelete, Importer: &schema.ResourceImporter{ - State: resourceAwsVpcInstanceImport, + State: schema.ImportStatePassthrough, }, CustomizeDiff: resourceAwsVpcCustomizeDiff, @@ -69,7 +69,13 @@ func resourceAwsVpc() *schema.Resource { "assign_generated_ipv6_cidr_block": { Type: schema.TypeBool, Optional: true, - Default: false, + Computed: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if !d.IsNewResource() && old == "false" { + return true + } + return false + }, }, "main_route_table_id": { @@ -180,6 +186,10 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { // Tags d.Set("tags", tagsToMap(vpc.Tags)) + if len(vpc.Ipv6CidrBlockAssociationSet) == 0 { + d.Set("assign_generated_ipv6_cidr_block", false) + } + for _, a := range vpc.Ipv6CidrBlockAssociationSet { if *a.Ipv6CidrBlockState.State == "associated" { //we can only ever have 1 IPv6 block associated at once d.Set("assign_generated_ipv6_cidr_block", true) @@ -389,65 +399,31 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { } if d.HasChange("assign_generated_ipv6_cidr_block") && !d.IsNewResource() { - toAssign := d.Get("assign_generated_ipv6_cidr_block").(bool) - - log.Printf("[INFO] Modifying assign_generated_ipv6_cidr_block to %#v", toAssign) - - if toAssign { - modifyOpts := &ec2.AssociateVpcCidrBlockInput{ - VpcId: &vpcid, - AmazonProvidedIpv6CidrBlock: aws.Bool(toAssign), - } - log.Printf("[INFO] Enabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", - d.Id(), modifyOpts) - resp, err := conn.AssociateVpcCidrBlock(modifyOpts) - if err != nil { - return err - } - - // Wait for the CIDR to become available - log.Printf( - "[DEBUG] Waiting for IPv6 CIDR (%s) to become associated", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"associating", "disassociated"}, - Target: []string{"associated"}, - Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), *resp.Ipv6CidrBlockAssociation.AssociationId), - Timeout: 1 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for IPv6 CIDR (%s) to become associated: %s", - d.Id(), err) - } - } else { - modifyOpts := &ec2.DisassociateVpcCidrBlockInput{ - AssociationId: aws.String(d.Get("ipv6_association_id").(string)), - } - log.Printf("[INFO] Disabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.DisassociateVpcCidrBlock(modifyOpts); err != nil { - return err - } - - // Wait for the CIDR to become available - log.Printf( - "[DEBUG] Waiting for IPv6 CIDR (%s) to become disassociated", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"disassociating", "associated"}, - Target: []string{"disassociated"}, - Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), d.Get("ipv6_association_id").(string)), - Timeout: 1 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for IPv6 CIDR (%s) to become disassociated: %s", - d.Id(), err) - } + //we know that the change is only going to be to disable IPv6 as we suppress the func for enabling + modifyOpts := &ec2.DisassociateVpcCidrBlockInput{ + AssociationId: aws.String(d.Get("ipv6_association_id").(string)), + } + log.Printf("[INFO] Disabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", + d.Id(), modifyOpts) + if _, err := conn.DisassociateVpcCidrBlock(modifyOpts); err != nil { + return err } - d.SetPartial("assign_generated_ipv6_cidr_block") + // Wait for the CIDR to become available + log.Printf( + "[DEBUG] Waiting for IPv6 CIDR (%s) to become disassociated", + d.Id()) + stateConf := &resource.StateChangeConf{ + Pending: []string{"disassociating", "associated"}, + Target: []string{"disassociated"}, + Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), d.Get("ipv6_association_id").(string)), + Timeout: 1 * time.Minute, + } + if _, err := stateConf.WaitForState(); err != nil { + return fmt.Errorf( + "Error waiting for IPv6 CIDR (%s) to become disassociated: %s", + d.Id(), err) + } } if d.HasChange("instance_tenancy") && !d.IsNewResource() { @@ -656,12 +632,6 @@ func resourceAwsVpcSetDefaultRouteTable(conn *ec2.EC2, d *schema.ResourceData) e return nil } -func resourceAwsVpcInstanceImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("assign_generated_ipv6_cidr_block", false) - return []*schema.ResourceData{d}, nil -} - func awsVpcDescribeVpcAttribute(attribute string, vpcId string, conn *ec2.EC2) (*ec2.DescribeVpcAttributeOutput, error) { describeAttrOpts := &ec2.DescribeVpcAttributeInput{ Attribute: aws.String(attribute), diff --git a/aws/resource_aws_vpc_associate_cidr_block.go b/aws/resource_aws_vpc_associate_cidr_block.go new file mode 100644 index 00000000000..9c19a90f2e5 --- /dev/null +++ b/aws/resource_aws_vpc_associate_cidr_block.go @@ -0,0 +1,128 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsVpcAssociateCidrBlock() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsVpcAssociateCidrBlockCreate, + Read: resourceAwsVpcAssociateCidrBlockRead, + Delete: resourceAwsVpcAssociateCidrBlockDelete, + + Schema: map[string]*schema.Schema{ + + "vpc_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "ipv4_cidr_block": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateCIDRNetworkAddress, + }, + + "assign_generated_ipv6_cidr_block": { + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + ConflictsWith: []string{"ipv4_cidr_block"}, + }, + + "ipv6_cidr_block": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsVpcAssociateCidrBlockCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + params := &ec2.AssociateVpcCidrBlockInput{ + VpcId: aws.String(d.Get("vpc_id").(string)), + AmazonProvidedIpv6CidrBlock: aws.Bool(d.Get("assign_generated_ipv6_cidr_block").(bool)), + } + + if v, ok := d.GetOk("ipv4_cidr_block"); ok { + params.CidrBlock = aws.String(v.(string)) + } + + resp, err := conn.AssociateVpcCidrBlock(params) + if err != nil { + return err + } + + if d.Get("assign_generated_ipv6_cidr_block").(bool) == true { + d.SetId(*resp.Ipv6CidrBlockAssociation.AssociationId) + } else { + d.SetId(*resp.CidrBlockAssociation.AssociationId) + } + + return resourceAwsVpcAssociateCidrBlockRead(d, meta) +} + +func resourceAwsVpcAssociateCidrBlockRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + vpcRaw, _, err := VPCStateRefreshFunc(conn, d.Get("vpc_id").(string))() + if err != nil { + return err + } + + if vpcRaw == nil { + log.Printf("[INFO] No VPC Found for id %q", d.Get("vpc_id").(string)) + d.SetId("") + return nil + } + + vpc := vpcRaw.(*ec2.Vpc) + found := false + + if d.Get("assign_generated_ipv6_cidr_block").(bool) == true { + for _, ipv6Association := range vpc.Ipv6CidrBlockAssociationSet { + if *ipv6Association.AssociationId == d.Id() { + found = true + d.Set("ipv6_cidr_block", ipv6Association.Ipv6CidrBlock) + break + } + } + } else { + for _, cidrAssociation := range vpc.CidrBlockAssociationSet { + if *cidrAssociation.AssociationId == d.Id() { + found = true + d.Set("ipv4_cidr_block", cidrAssociation.CidrBlock) + } + } + } + + if !found { + log.Printf("[INFO] No VPC CIDR Association found for ID: %q", d.Id()) + } + + return nil +} + +func resourceAwsVpcAssociateCidrBlockDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + params := &ec2.DisassociateVpcCidrBlockInput{ + AssociationId: aws.String(d.Id()), + } + + _, err := conn.DisassociateVpcCidrBlock(params) + if err != nil { + return err + } + + return nil +} diff --git a/aws/resource_aws_vpc_associate_cidr_block_test.go b/aws/resource_aws_vpc_associate_cidr_block_test.go new file mode 100644 index 00000000000..f8a00942520 --- /dev/null +++ b/aws/resource_aws_vpc_associate_cidr_block_test.go @@ -0,0 +1,242 @@ +package aws + +import ( + "fmt" + "testing" + + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSVpcAssociateIpv4CidrBlock(t *testing.T) { + var association ec2.VpcCidrBlockAssociation + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcAssociateCidrBlockDestroy, + Steps: []resource.TestStep{ + { + Config: testAccVpcIpv4CidrAssociationConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcIpv4CidrAssociationExists("aws_vpc_associate_cidr_block.secondary_cidr", &association), + testAccCheckVpcIpv4AssociationCidr(&association, "172.2.0.0/16"), + ), + }, + }, + }) +} + +func TestAccAWSVpcAssociateIpv6CidrBlock(t *testing.T) { + var association ec2.VpcIpv6CidrBlockAssociation + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcAssociateCidrBlockDestroy, + Steps: []resource.TestStep{ + { + Config: testAccVpcIpv6CidrAssociationConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcIpv6CidrAssociationExists("aws_vpc_associate_cidr_block.secondary_ipv6_cidr", &association), + resource.TestCheckResourceAttrSet("aws_vpc_associate_cidr_block.secondary_ipv6_cidr", "ipv6_cidr_block"), + ), + }, + }, + }) +} + +func TestAccAWSVpcAssociateIpv4AndIpv6CidrBlock(t *testing.T) { + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcAssociateCidrBlockDestroy, + Steps: []resource.TestStep{ + { + Config: testAccVpcIpv4AndIpv6CidrAssociationConfig, + ExpectError: regexp.MustCompile(`: conflicts with`), + }, + }, + }) +} + +func testAccCheckVpcIpv4AssociationCidr(association *ec2.VpcCidrBlockAssociation, expected string) resource.TestCheckFunc { + return func(s *terraform.State) error { + CIDRBlock := association.CidrBlock + if *CIDRBlock != expected { + return fmt.Errorf("Bad cidr: %s", *association.CidrBlock) + } + + return nil + } +} + +func testAccCheckVpcAssociateCidrBlockDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_vpc_associate_cidr_block" { + continue + } + + // Try to find the VPC + DescribeVpcOpts := &ec2.DescribeVpcsInput{ + VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, + } + resp, err := conn.DescribeVpcs(DescribeVpcOpts) + if err == nil { + vpc := resp.Vpcs[0] + + for _, ipv4Association := range vpc.CidrBlockAssociationSet { + if *ipv4Association.AssociationId == rs.Primary.ID { + return fmt.Errorf("VPC CIDR Association still exists.") + } + } + + for _, ipv6Association := range vpc.Ipv6CidrBlockAssociationSet { + if *ipv6Association.AssociationId == rs.Primary.ID { + return fmt.Errorf("VPC CIDR Association still exists.") + } + } + + return nil + } + + // Verify the error is what we want + ec2err, ok := err.(awserr.Error) + if !ok { + return err + } + if ec2err.Code() != "InvalidVpcID.NotFound" { + return err + } + } + + return nil +} + +func testAccCheckVpcIpv4CidrAssociationExists(n string, association *ec2.VpcCidrBlockAssociation) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No VPC ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + DescribeVpcOpts := &ec2.DescribeVpcsInput{ + VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, + } + resp, err := conn.DescribeVpcs(DescribeVpcOpts) + if err != nil { + return err + } + if len(resp.Vpcs) == 0 { + return fmt.Errorf("VPC not found") + } + + vpc := resp.Vpcs[0] + found := false + for _, cidrAssociation := range vpc.CidrBlockAssociationSet { + if *cidrAssociation.AssociationId == rs.Primary.ID { + *association = *cidrAssociation + found = true + } + } + + if !found { + return fmt.Errorf("VPC CIDR Association not found") + } + + return nil + } +} + +func testAccCheckVpcIpv6CidrAssociationExists(n string, association *ec2.VpcIpv6CidrBlockAssociation) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No VPC ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + DescribeVpcOpts := &ec2.DescribeVpcsInput{ + VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, + } + resp, err := conn.DescribeVpcs(DescribeVpcOpts) + if err != nil { + return err + } + if len(resp.Vpcs) == 0 { + return fmt.Errorf("VPC not found") + } + + vpc := resp.Vpcs[0] + found := false + for _, cidrAssociation := range vpc.Ipv6CidrBlockAssociationSet { + if *cidrAssociation.AssociationId == rs.Primary.ID { + *association = *cidrAssociation + found = true + } + } + + if !found { + return fmt.Errorf("VPC CIDR Association not found") + } + + return nil + } +} + +const testAccVpcIpv4CidrAssociationConfig = ` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_vpc_associate_cidr_block" "secondary_cidr" { + vpc_id = "${aws_vpc.foo.id}" + ipv4_cidr_block = "172.2.0.0/16" +} + +resource "aws_vpc_associate_cidr_block" "tertiary_cidr" { + vpc_id = "${aws_vpc.foo.id}" + ipv4_cidr_block = "170.2.0.0/16" +} +` + +const testAccVpcIpv6CidrAssociationConfig = ` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_vpc_associate_cidr_block" "secondary_ipv6_cidr" { + vpc_id = "${aws_vpc.foo.id}" + assign_generated_ipv6_cidr_block = true +} +` + +const testAccVpcIpv4AndIpv6CidrAssociationConfig = ` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" + assign_generated_ipv6_cidr_block = true +} + +resource "aws_vpc_associate_cidr_block" "secondary_ipv6_cidr" { + vpc_id = "${aws_vpc.foo.id}" + ipv4_cidr_block = "172.2.0.0/16" + assign_generated_ipv6_cidr_block = true +} +` diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index 1059b255975..d13f0055b15 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -113,7 +113,6 @@ func TestAccAWSVpc_enableIpv6(t *testing.T) { Config: testAccVpcConfigIpv6Enabled, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVpcExists("aws_vpc.foo", &vpc), - testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), resource.TestCheckResourceAttr( "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), resource.TestCheckResourceAttrSet( @@ -128,28 +127,10 @@ func TestAccAWSVpc_enableIpv6(t *testing.T) { Config: testAccVpcConfigIpv6Disabled, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVpcExists("aws_vpc.foo", &vpc), - testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), - resource.TestCheckResourceAttr( - "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), resource.TestCheckResourceAttr( "aws_vpc.foo", "assign_generated_ipv6_cidr_block", "false"), ), }, - { - Config: testAccVpcConfigIpv6Enabled, - Check: resource.ComposeAggregateTestCheckFunc( - testAccCheckVpcExists("aws_vpc.foo", &vpc), - testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), - resource.TestCheckResourceAttr( - "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), - resource.TestCheckResourceAttrSet( - "aws_vpc.foo", "ipv6_association_id"), - resource.TestCheckResourceAttrSet( - "aws_vpc.foo", "ipv6_cidr_block"), - resource.TestCheckResourceAttr( - "aws_vpc.foo", "assign_generated_ipv6_cidr_block", "true"), - ), - }, }, }) } @@ -461,6 +442,7 @@ resource "aws_vpc" "foo" { const testAccVpcConfigIpv6Disabled = ` resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" + assign_generated_ipv6_cidr_block = false tags { Name = "terraform-testacc-vpc-ipv6" } diff --git a/website/aws.erb b/website/aws.erb index 9fdefaafb52..7c2e6635788 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -2198,6 +2198,10 @@ aws_vpc + > + aws_vpc_associate_cidr_block + + > aws_vpc_dhcp_options diff --git a/website/docs/r/vpc.html.markdown b/website/docs/r/vpc.html.markdown index 16e7bfe851f..8bc99e93f51 100644 --- a/website/docs/r/vpc.html.markdown +++ b/website/docs/r/vpc.html.markdown @@ -51,6 +51,10 @@ block with a /56 prefix length for the VPC. You cannot specify the range of IP a the size of the CIDR block. Default is `false`. * `tags` - (Optional) A mapping of tags to assign to the resource. +~> **Note:** If you create a VPC with `assign_generated_ipv6_cidr_block` set to `false` and want to +update that to `true`, Terraform will no longer support this operation and we suggest to use `aws_vpc_associate_cidr_block` resource instead. +The VPC won't reflect the new IPv6 values from the new resource until `terraform refresh` happens. + ## Attributes Reference In addition to all arguments above, the following attributes are exported: diff --git a/website/docs/r/vpc_associate_cidr_block.html.markdown b/website/docs/r/vpc_associate_cidr_block.html.markdown new file mode 100644 index 00000000000..276f5beec6d --- /dev/null +++ b/website/docs/r/vpc_associate_cidr_block.html.markdown @@ -0,0 +1,58 @@ +--- +layout: "aws" +page_title: "AWS: aws_vpc_associate_cidr_block" +sidebar_current: "docs-aws-resource-vpc-associate-cidr-block" +description: |- + Associates a CIDR block to a VPC +--- + +# aws_vpc_associate_cidr_block + +Associates a CIDR block to a VPC + +## Example Usage + +IPv4 CIDR Block Association: + +```hcl +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_vpc_associate_cidr_block" "secondary_cidr" { + vpc_id = "${aws_vpc.main.id}" + ipv4_cidr_block = "172.2.0.0/16" +} +``` + +IPv6 CIDR Block Association: + +```hcl +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" + assign_generated_ipv6_cidr_block = true +} + +resource "aws_vpc_associate_cidr_block" "secondary_ipv6_cidr" { + vpc_id = "${aws_vpc.main.id}" + assign_generated_ipv6_cidr_block = true +} +``` + +## Argument Reference + +The following arguments are supported: + +* `vpc_id` - (Required) The ID of the VPC to make the association with +* `cidr_block` - (Optional) The IPv4 CIDR block to associate to the VPC. +* `assign_generated_ipv6_cidr_block` - (Optional) Requests an Amazon-provided IPv6 CIDR +block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or +the size of the CIDR block. Default is `false`. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the VPC CIDR Association +* `ipv6_cidr_block` - The IPv6 CIDR block. + From 3e43f34c3c4a0db8c419ceef7d4ebe2384eebacf Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 9 Mar 2018 14:50:17 -0500 Subject: [PATCH 1676/3316] Restore original 'aws_vpc.assign_generated_ipv6_cidr_block' functionality. --- aws/resource_aws_vpc.go | 100 ++++++++++++++++++++----------- aws/resource_aws_vpc_test.go | 20 ++++++- website/docs/r/vpc.html.markdown | 4 -- 3 files changed, 84 insertions(+), 40 deletions(-) diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index 6b5d2dea88a..e1687477d0a 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -20,7 +20,7 @@ func resourceAwsVpc() *schema.Resource { Update: resourceAwsVpcUpdate, Delete: resourceAwsVpcDelete, Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, + State: resourceAwsVpcInstanceImport, }, CustomizeDiff: resourceAwsVpcCustomizeDiff, @@ -69,13 +69,7 @@ func resourceAwsVpc() *schema.Resource { "assign_generated_ipv6_cidr_block": { Type: schema.TypeBool, Optional: true, - Computed: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if !d.IsNewResource() && old == "false" { - return true - } - return false - }, + Default: false, }, "main_route_table_id": { @@ -186,10 +180,6 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { // Tags d.Set("tags", tagsToMap(vpc.Tags)) - if len(vpc.Ipv6CidrBlockAssociationSet) == 0 { - d.Set("assign_generated_ipv6_cidr_block", false) - } - for _, a := range vpc.Ipv6CidrBlockAssociationSet { if *a.Ipv6CidrBlockState.State == "associated" { //we can only ever have 1 IPv6 block associated at once d.Set("assign_generated_ipv6_cidr_block", true) @@ -399,31 +389,65 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { } if d.HasChange("assign_generated_ipv6_cidr_block") && !d.IsNewResource() { - //we know that the change is only going to be to disable IPv6 as we suppress the func for enabling - modifyOpts := &ec2.DisassociateVpcCidrBlockInput{ - AssociationId: aws.String(d.Get("ipv6_association_id").(string)), - } - log.Printf("[INFO] Disabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", - d.Id(), modifyOpts) - if _, err := conn.DisassociateVpcCidrBlock(modifyOpts); err != nil { - return err - } + toAssign := d.Get("assign_generated_ipv6_cidr_block").(bool) - // Wait for the CIDR to become available - log.Printf( - "[DEBUG] Waiting for IPv6 CIDR (%s) to become disassociated", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"disassociating", "associated"}, - Target: []string{"disassociated"}, - Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), d.Get("ipv6_association_id").(string)), - Timeout: 1 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for IPv6 CIDR (%s) to become disassociated: %s", - d.Id(), err) + log.Printf("[INFO] Modifying assign_generated_ipv6_cidr_block to %#v", toAssign) + + if toAssign { + modifyOpts := &ec2.AssociateVpcCidrBlockInput{ + VpcId: &vpcid, + AmazonProvidedIpv6CidrBlock: aws.Bool(toAssign), + } + log.Printf("[INFO] Enabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", + d.Id(), modifyOpts) + resp, err := conn.AssociateVpcCidrBlock(modifyOpts) + if err != nil { + return err + } + + // Wait for the CIDR to become available + log.Printf( + "[DEBUG] Waiting for IPv6 CIDR (%s) to become associated", + d.Id()) + stateConf := &resource.StateChangeConf{ + Pending: []string{"associating", "disassociated"}, + Target: []string{"associated"}, + Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), *resp.Ipv6CidrBlockAssociation.AssociationId), + Timeout: 1 * time.Minute, + } + if _, err := stateConf.WaitForState(); err != nil { + return fmt.Errorf( + "Error waiting for IPv6 CIDR (%s) to become associated: %s", + d.Id(), err) + } + } else { + modifyOpts := &ec2.DisassociateVpcCidrBlockInput{ + AssociationId: aws.String(d.Get("ipv6_association_id").(string)), + } + log.Printf("[INFO] Disabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", + d.Id(), modifyOpts) + if _, err := conn.DisassociateVpcCidrBlock(modifyOpts); err != nil { + return err + } + + // Wait for the CIDR to become available + log.Printf( + "[DEBUG] Waiting for IPv6 CIDR (%s) to become disassociated", + d.Id()) + stateConf := &resource.StateChangeConf{ + Pending: []string{"disassociating", "associated"}, + Target: []string{"disassociated"}, + Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), d.Get("ipv6_association_id").(string)), + Timeout: 1 * time.Minute, + } + if _, err := stateConf.WaitForState(); err != nil { + return fmt.Errorf( + "Error waiting for IPv6 CIDR (%s) to become disassociated: %s", + d.Id(), err) + } } + + d.SetPartial("assign_generated_ipv6_cidr_block") } if d.HasChange("instance_tenancy") && !d.IsNewResource() { @@ -632,6 +656,12 @@ func resourceAwsVpcSetDefaultRouteTable(conn *ec2.EC2, d *schema.ResourceData) e return nil } +func resourceAwsVpcInstanceImport( + d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + d.Set("assign_generated_ipv6_cidr_block", false) + return []*schema.ResourceData{d}, nil +} + func awsVpcDescribeVpcAttribute(attribute string, vpcId string, conn *ec2.EC2) (*ec2.DescribeVpcAttributeOutput, error) { describeAttrOpts := &ec2.DescribeVpcAttributeInput{ Attribute: aws.String(attribute), diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index d13f0055b15..1059b255975 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -113,6 +113,7 @@ func TestAccAWSVpc_enableIpv6(t *testing.T) { Config: testAccVpcConfigIpv6Enabled, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVpcExists("aws_vpc.foo", &vpc), + testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), resource.TestCheckResourceAttr( "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), resource.TestCheckResourceAttrSet( @@ -127,10 +128,28 @@ func TestAccAWSVpc_enableIpv6(t *testing.T) { Config: testAccVpcConfigIpv6Disabled, Check: resource.ComposeAggregateTestCheckFunc( testAccCheckVpcExists("aws_vpc.foo", &vpc), + testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), resource.TestCheckResourceAttr( "aws_vpc.foo", "assign_generated_ipv6_cidr_block", "false"), ), }, + { + Config: testAccVpcConfigIpv6Enabled, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckVpcExists("aws_vpc.foo", &vpc), + testAccCheckVpcCidr(&vpc, "10.1.0.0/16"), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), + resource.TestCheckResourceAttrSet( + "aws_vpc.foo", "ipv6_association_id"), + resource.TestCheckResourceAttrSet( + "aws_vpc.foo", "ipv6_cidr_block"), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "assign_generated_ipv6_cidr_block", "true"), + ), + }, }, }) } @@ -442,7 +461,6 @@ resource "aws_vpc" "foo" { const testAccVpcConfigIpv6Disabled = ` resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" - assign_generated_ipv6_cidr_block = false tags { Name = "terraform-testacc-vpc-ipv6" } diff --git a/website/docs/r/vpc.html.markdown b/website/docs/r/vpc.html.markdown index 8bc99e93f51..16e7bfe851f 100644 --- a/website/docs/r/vpc.html.markdown +++ b/website/docs/r/vpc.html.markdown @@ -51,10 +51,6 @@ block with a /56 prefix length for the VPC. You cannot specify the range of IP a the size of the CIDR block. Default is `false`. * `tags` - (Optional) A mapping of tags to assign to the resource. -~> **Note:** If you create a VPC with `assign_generated_ipv6_cidr_block` set to `false` and want to -update that to `true`, Terraform will no longer support this operation and we suggest to use `aws_vpc_associate_cidr_block` resource instead. -The VPC won't reflect the new IPv6 values from the new resource until `terraform refresh` happens. - ## Attributes Reference In addition to all arguments above, the following attributes are exported: From 839d50badc5a0fcf53ccbfd284176d8a9a6e9203 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 9 Mar 2018 15:52:27 -0500 Subject: [PATCH 1677/3316] 'aws_vpc_associate_cidr_block' -> 'aws_vpc_secondary_ipv4_cidr_block'. --- aws/aws_vpc_secondary_ipv4_cidr_block.go | 96 +++++++ aws/aws_vpc_secondary_ipv4_cidr_block_test.go | 138 ++++++++++ aws/provider.go | 1 + aws/resource_aws_vpc_associate_cidr_block.go | 128 --------- ...ource_aws_vpc_associate_cidr_block_test.go | 242 ------------------ website/aws.erb | 8 +- .../r/vpc_associate_cidr_block.html.markdown | 58 ----- ...pc_secondary_ipv4_cidr_block.html.markdown | 37 +++ 8 files changed, 276 insertions(+), 432 deletions(-) create mode 100644 aws/aws_vpc_secondary_ipv4_cidr_block.go create mode 100644 aws/aws_vpc_secondary_ipv4_cidr_block_test.go delete mode 100644 aws/resource_aws_vpc_associate_cidr_block.go delete mode 100644 aws/resource_aws_vpc_associate_cidr_block_test.go delete mode 100644 website/docs/r/vpc_associate_cidr_block.html.markdown create mode 100644 website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown diff --git a/aws/aws_vpc_secondary_ipv4_cidr_block.go b/aws/aws_vpc_secondary_ipv4_cidr_block.go new file mode 100644 index 00000000000..ca6f81ae714 --- /dev/null +++ b/aws/aws_vpc_secondary_ipv4_cidr_block.go @@ -0,0 +1,96 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsVpcSecondaryIpv4CidrBlock() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsVpcSecondaryIpv4CidrBlockCreate, + Read: resourceAwsVpcSecondaryIpv4CidrBlockRead, + Delete: resourceAwsVpcSecondaryIpv4CidrBlockDelete, + + Schema: map[string]*schema.Schema{ + "vpc_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "ipv4_cidr_block": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.CIDRNetwork(16, 28), // The allowed block size is between a /28 netmask and /16 netmask. + }, + }, + } +} + +func resourceAwsVpcSecondaryIpv4CidrBlockCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.AssociateVpcCidrBlockInput{ + VpcId: aws.String(d.Get("vpc_id").(string)), + CidrBlock: aws.String(d.Get("ipv4_cidr_block").(string)), + } + log.Printf("[DEBUG] Creating VPC secondary IPv4 CIDR block: %#v", req) + resp, err := conn.AssociateVpcCidrBlock(req) + if err != nil { + return fmt.Errorf("Error creating VPC secondary IPv4 CIDR block: %s", err.Error()) + } + + d.SetId(aws.StringValue(resp.CidrBlockAssociation.AssociationId)) + + return resourceAwsVpcSecondaryIpv4CidrBlockRead(d, meta) +} + +func resourceAwsVpcSecondaryIpv4CidrBlockRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + vpcId := d.Get("vpc_id").(string) + vpcRaw, _, err := VPCStateRefreshFunc(conn, vpcId)() + if err != nil { + return fmt.Errorf("Error reading VPC: %s", err.Error()) + } + if vpcRaw == nil { + log.Printf("[WARN] VPC (%s) not found, removing secondary IPv4 CIDR block from state", vpcId) + d.SetId("") + return nil + } + + vpc := vpcRaw.(*ec2.Vpc) + found := false + for _, cidrAssociation := range vpc.CidrBlockAssociationSet { + if aws.StringValue(cidrAssociation.AssociationId) == d.Id() { + found = true + d.Set("ipv4_cidr_block", cidrAssociation.CidrBlock) + } + } + if !found { + log.Printf("[WARN] VPC secondary IPv4 CIDR block (%s) not found, removing from state", d.Id()) + d.SetId("") + } + + return nil +} + +func resourceAwsVpcSecondaryIpv4CidrBlockDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + log.Printf("[DEBUG] Deleting VPC secondary IPv4 CIDR block: %s", d.Id()) + _, err := conn.DisassociateVpcCidrBlock(&ec2.DisassociateVpcCidrBlockInput{ + AssociationId: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("Error deleting VPC secondary IPv4 CIDR block: %s", err.Error()) + } + + return nil +} diff --git a/aws/aws_vpc_secondary_ipv4_cidr_block_test.go b/aws/aws_vpc_secondary_ipv4_cidr_block_test.go new file mode 100644 index 00000000000..c603368e356 --- /dev/null +++ b/aws/aws_vpc_secondary_ipv4_cidr_block_test.go @@ -0,0 +1,138 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAwsVpcSecondaryIpv4CidrBlock_basic(t *testing.T) { + var associationSecondary, associationTertiary ec2.VpcCidrBlockAssociation + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsVpcSecondaryIpv4CidrBlockDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsVpcSecondaryIpv4CidrBlockConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsVpcSecondaryIpv4CidrBlockExists("aws_vpc_secondary_ipv4_cidr_block.secondary_cidr", &associationSecondary), + testAccCheckAwsVpcSecondaryIpv4CidrBlock(&associationSecondary, "172.2.0.0/16"), + testAccCheckAwsVpcSecondaryIpv4CidrBlockExists("aws_vpc_secondary_ipv4_cidr_block.tertiary_cidr", &associationTertiary), + testAccCheckAwsVpcSecondaryIpv4CidrBlock(&associationTertiary, "170.2.0.0/16"), + ), + }, + }, + }) +} + +func testAccCheckAwsVpcSecondaryIpv4CidrBlock(association *ec2.VpcCidrBlockAssociation, expected string) resource.TestCheckFunc { + return func(s *terraform.State) error { + CIDRBlock := association.CidrBlock + if *CIDRBlock != expected { + return fmt.Errorf("Bad CIDR: %s", *association.CidrBlock) + } + + return nil + } +} + +func testAccCheckAwsVpcSecondaryIpv4CidrBlockDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_vpc_secondary_ipv4_cidr_block" { + continue + } + + // Try to find the VPC + DescribeVpcOpts := &ec2.DescribeVpcsInput{ + VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, + } + resp, err := conn.DescribeVpcs(DescribeVpcOpts) + if err == nil { + vpc := resp.Vpcs[0] + + for _, ipv4Association := range vpc.CidrBlockAssociationSet { + if *ipv4Association.AssociationId == rs.Primary.ID { + return fmt.Errorf("VPC secondary CIDR block still exists") + } + } + + return nil + } + + // Verify the error is what we want + ec2err, ok := err.(awserr.Error) + if !ok { + return err + } + if ec2err.Code() != "InvalidVpcID.NotFound" { + return err + } + } + + return nil +} + +func testAccCheckAwsVpcSecondaryIpv4CidrBlockExists(n string, association *ec2.VpcCidrBlockAssociation) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No VPC ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + DescribeVpcOpts := &ec2.DescribeVpcsInput{ + VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, + } + resp, err := conn.DescribeVpcs(DescribeVpcOpts) + if err != nil { + return err + } + if len(resp.Vpcs) == 0 { + return fmt.Errorf("VPC not found") + } + + vpc := resp.Vpcs[0] + found := false + for _, cidrAssociation := range vpc.CidrBlockAssociationSet { + if *cidrAssociation.AssociationId == rs.Primary.ID { + *association = *cidrAssociation + found = true + } + } + + if !found { + return fmt.Errorf("VPC secondary CIDR block not found") + } + + return nil + } +} + +const testAccAwsVpcSecondaryIpv4CidrBlockConfig = ` +resource "aws_vpc" "foo" { + cidr_block = "10.1.0.0/16" +} + +resource "aws_vpc_secondary_ipv4_cidr_block" "secondary_cidr" { + vpc_id = "${aws_vpc.foo.id}" + ipv4_cidr_block = "172.2.0.0/16" +} + +resource "aws_vpc_secondary_ipv4_cidr_block" "tertiary_cidr" { + vpc_id = "${aws_vpc.foo.id}" + ipv4_cidr_block = "170.2.0.0/16" +} +` diff --git a/aws/provider.go b/aws/provider.go index 6a513c7249f..a5c7e9e1b4e 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -609,6 +609,7 @@ func Provider() terraform.ResourceProvider { "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), "aws_vpn_connection": resourceAwsVpnConnection(), "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), "aws_vpn_gateway": resourceAwsVpnGateway(), diff --git a/aws/resource_aws_vpc_associate_cidr_block.go b/aws/resource_aws_vpc_associate_cidr_block.go deleted file mode 100644 index 9c19a90f2e5..00000000000 --- a/aws/resource_aws_vpc_associate_cidr_block.go +++ /dev/null @@ -1,128 +0,0 @@ -package aws - -import ( - "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/schema" -) - -func resourceAwsVpcAssociateCidrBlock() *schema.Resource { - return &schema.Resource{ - Create: resourceAwsVpcAssociateCidrBlockCreate, - Read: resourceAwsVpcAssociateCidrBlockRead, - Delete: resourceAwsVpcAssociateCidrBlockDelete, - - Schema: map[string]*schema.Schema{ - - "vpc_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - - "ipv4_cidr_block": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateCIDRNetworkAddress, - }, - - "assign_generated_ipv6_cidr_block": { - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - ConflictsWith: []string{"ipv4_cidr_block"}, - }, - - "ipv6_cidr_block": { - Type: schema.TypeString, - Computed: true, - }, - }, - } -} - -func resourceAwsVpcAssociateCidrBlockCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - params := &ec2.AssociateVpcCidrBlockInput{ - VpcId: aws.String(d.Get("vpc_id").(string)), - AmazonProvidedIpv6CidrBlock: aws.Bool(d.Get("assign_generated_ipv6_cidr_block").(bool)), - } - - if v, ok := d.GetOk("ipv4_cidr_block"); ok { - params.CidrBlock = aws.String(v.(string)) - } - - resp, err := conn.AssociateVpcCidrBlock(params) - if err != nil { - return err - } - - if d.Get("assign_generated_ipv6_cidr_block").(bool) == true { - d.SetId(*resp.Ipv6CidrBlockAssociation.AssociationId) - } else { - d.SetId(*resp.CidrBlockAssociation.AssociationId) - } - - return resourceAwsVpcAssociateCidrBlockRead(d, meta) -} - -func resourceAwsVpcAssociateCidrBlockRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - vpcRaw, _, err := VPCStateRefreshFunc(conn, d.Get("vpc_id").(string))() - if err != nil { - return err - } - - if vpcRaw == nil { - log.Printf("[INFO] No VPC Found for id %q", d.Get("vpc_id").(string)) - d.SetId("") - return nil - } - - vpc := vpcRaw.(*ec2.Vpc) - found := false - - if d.Get("assign_generated_ipv6_cidr_block").(bool) == true { - for _, ipv6Association := range vpc.Ipv6CidrBlockAssociationSet { - if *ipv6Association.AssociationId == d.Id() { - found = true - d.Set("ipv6_cidr_block", ipv6Association.Ipv6CidrBlock) - break - } - } - } else { - for _, cidrAssociation := range vpc.CidrBlockAssociationSet { - if *cidrAssociation.AssociationId == d.Id() { - found = true - d.Set("ipv4_cidr_block", cidrAssociation.CidrBlock) - } - } - } - - if !found { - log.Printf("[INFO] No VPC CIDR Association found for ID: %q", d.Id()) - } - - return nil -} - -func resourceAwsVpcAssociateCidrBlockDelete(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).ec2conn - - params := &ec2.DisassociateVpcCidrBlockInput{ - AssociationId: aws.String(d.Id()), - } - - _, err := conn.DisassociateVpcCidrBlock(params) - if err != nil { - return err - } - - return nil -} diff --git a/aws/resource_aws_vpc_associate_cidr_block_test.go b/aws/resource_aws_vpc_associate_cidr_block_test.go deleted file mode 100644 index f8a00942520..00000000000 --- a/aws/resource_aws_vpc_associate_cidr_block_test.go +++ /dev/null @@ -1,242 +0,0 @@ -package aws - -import ( - "fmt" - "testing" - - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccAWSVpcAssociateIpv4CidrBlock(t *testing.T) { - var association ec2.VpcCidrBlockAssociation - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckVpcAssociateCidrBlockDestroy, - Steps: []resource.TestStep{ - { - Config: testAccVpcIpv4CidrAssociationConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckVpcIpv4CidrAssociationExists("aws_vpc_associate_cidr_block.secondary_cidr", &association), - testAccCheckVpcIpv4AssociationCidr(&association, "172.2.0.0/16"), - ), - }, - }, - }) -} - -func TestAccAWSVpcAssociateIpv6CidrBlock(t *testing.T) { - var association ec2.VpcIpv6CidrBlockAssociation - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckVpcAssociateCidrBlockDestroy, - Steps: []resource.TestStep{ - { - Config: testAccVpcIpv6CidrAssociationConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckVpcIpv6CidrAssociationExists("aws_vpc_associate_cidr_block.secondary_ipv6_cidr", &association), - resource.TestCheckResourceAttrSet("aws_vpc_associate_cidr_block.secondary_ipv6_cidr", "ipv6_cidr_block"), - ), - }, - }, - }) -} - -func TestAccAWSVpcAssociateIpv4AndIpv6CidrBlock(t *testing.T) { - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckVpcAssociateCidrBlockDestroy, - Steps: []resource.TestStep{ - { - Config: testAccVpcIpv4AndIpv6CidrAssociationConfig, - ExpectError: regexp.MustCompile(`: conflicts with`), - }, - }, - }) -} - -func testAccCheckVpcIpv4AssociationCidr(association *ec2.VpcCidrBlockAssociation, expected string) resource.TestCheckFunc { - return func(s *terraform.State) error { - CIDRBlock := association.CidrBlock - if *CIDRBlock != expected { - return fmt.Errorf("Bad cidr: %s", *association.CidrBlock) - } - - return nil - } -} - -func testAccCheckVpcAssociateCidrBlockDestroy(s *terraform.State) error { - conn := testAccProvider.Meta().(*AWSClient).ec2conn - - for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_vpc_associate_cidr_block" { - continue - } - - // Try to find the VPC - DescribeVpcOpts := &ec2.DescribeVpcsInput{ - VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, - } - resp, err := conn.DescribeVpcs(DescribeVpcOpts) - if err == nil { - vpc := resp.Vpcs[0] - - for _, ipv4Association := range vpc.CidrBlockAssociationSet { - if *ipv4Association.AssociationId == rs.Primary.ID { - return fmt.Errorf("VPC CIDR Association still exists.") - } - } - - for _, ipv6Association := range vpc.Ipv6CidrBlockAssociationSet { - if *ipv6Association.AssociationId == rs.Primary.ID { - return fmt.Errorf("VPC CIDR Association still exists.") - } - } - - return nil - } - - // Verify the error is what we want - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "InvalidVpcID.NotFound" { - return err - } - } - - return nil -} - -func testAccCheckVpcIpv4CidrAssociationExists(n string, association *ec2.VpcCidrBlockAssociation) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Not found: %s", n) - } - - if rs.Primary.ID == "" { - return fmt.Errorf("No VPC ID is set") - } - - conn := testAccProvider.Meta().(*AWSClient).ec2conn - DescribeVpcOpts := &ec2.DescribeVpcsInput{ - VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, - } - resp, err := conn.DescribeVpcs(DescribeVpcOpts) - if err != nil { - return err - } - if len(resp.Vpcs) == 0 { - return fmt.Errorf("VPC not found") - } - - vpc := resp.Vpcs[0] - found := false - for _, cidrAssociation := range vpc.CidrBlockAssociationSet { - if *cidrAssociation.AssociationId == rs.Primary.ID { - *association = *cidrAssociation - found = true - } - } - - if !found { - return fmt.Errorf("VPC CIDR Association not found") - } - - return nil - } -} - -func testAccCheckVpcIpv6CidrAssociationExists(n string, association *ec2.VpcIpv6CidrBlockAssociation) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Not found: %s", n) - } - - if rs.Primary.ID == "" { - return fmt.Errorf("No VPC ID is set") - } - - conn := testAccProvider.Meta().(*AWSClient).ec2conn - DescribeVpcOpts := &ec2.DescribeVpcsInput{ - VpcIds: []*string{aws.String(rs.Primary.Attributes["vpc_id"])}, - } - resp, err := conn.DescribeVpcs(DescribeVpcOpts) - if err != nil { - return err - } - if len(resp.Vpcs) == 0 { - return fmt.Errorf("VPC not found") - } - - vpc := resp.Vpcs[0] - found := false - for _, cidrAssociation := range vpc.Ipv6CidrBlockAssociationSet { - if *cidrAssociation.AssociationId == rs.Primary.ID { - *association = *cidrAssociation - found = true - } - } - - if !found { - return fmt.Errorf("VPC CIDR Association not found") - } - - return nil - } -} - -const testAccVpcIpv4CidrAssociationConfig = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" -} - -resource "aws_vpc_associate_cidr_block" "secondary_cidr" { - vpc_id = "${aws_vpc.foo.id}" - ipv4_cidr_block = "172.2.0.0/16" -} - -resource "aws_vpc_associate_cidr_block" "tertiary_cidr" { - vpc_id = "${aws_vpc.foo.id}" - ipv4_cidr_block = "170.2.0.0/16" -} -` - -const testAccVpcIpv6CidrAssociationConfig = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" -} - -resource "aws_vpc_associate_cidr_block" "secondary_ipv6_cidr" { - vpc_id = "${aws_vpc.foo.id}" - assign_generated_ipv6_cidr_block = true -} -` - -const testAccVpcIpv4AndIpv6CidrAssociationConfig = ` -resource "aws_vpc" "foo" { - cidr_block = "10.1.0.0/16" - assign_generated_ipv6_cidr_block = true -} - -resource "aws_vpc_associate_cidr_block" "secondary_ipv6_cidr" { - vpc_id = "${aws_vpc.foo.id}" - ipv4_cidr_block = "172.2.0.0/16" - assign_generated_ipv6_cidr_block = true -} -` diff --git a/website/aws.erb b/website/aws.erb index 7c2e6635788..e65e202886a 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -2198,10 +2198,6 @@ aws_vpc - > - aws_vpc_associate_cidr_block - - > aws_vpc_dhcp_options @@ -2246,6 +2242,10 @@ aws_vpc_peering_connection_options + > + aws_vpc_secondary_ipv4_cidr_block + + > aws_vpn_connection diff --git a/website/docs/r/vpc_associate_cidr_block.html.markdown b/website/docs/r/vpc_associate_cidr_block.html.markdown deleted file mode 100644 index 276f5beec6d..00000000000 --- a/website/docs/r/vpc_associate_cidr_block.html.markdown +++ /dev/null @@ -1,58 +0,0 @@ ---- -layout: "aws" -page_title: "AWS: aws_vpc_associate_cidr_block" -sidebar_current: "docs-aws-resource-vpc-associate-cidr-block" -description: |- - Associates a CIDR block to a VPC ---- - -# aws_vpc_associate_cidr_block - -Associates a CIDR block to a VPC - -## Example Usage - -IPv4 CIDR Block Association: - -```hcl -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" -} - -resource "aws_vpc_associate_cidr_block" "secondary_cidr" { - vpc_id = "${aws_vpc.main.id}" - ipv4_cidr_block = "172.2.0.0/16" -} -``` - -IPv6 CIDR Block Association: - -```hcl -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" - assign_generated_ipv6_cidr_block = true -} - -resource "aws_vpc_associate_cidr_block" "secondary_ipv6_cidr" { - vpc_id = "${aws_vpc.main.id}" - assign_generated_ipv6_cidr_block = true -} -``` - -## Argument Reference - -The following arguments are supported: - -* `vpc_id` - (Required) The ID of the VPC to make the association with -* `cidr_block` - (Optional) The IPv4 CIDR block to associate to the VPC. -* `assign_generated_ipv6_cidr_block` - (Optional) Requests an Amazon-provided IPv6 CIDR -block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or -the size of the CIDR block. Default is `false`. - -## Attributes Reference - -The following attributes are exported: - -* `id` - The ID of the VPC CIDR Association -* `ipv6_cidr_block` - The IPv6 CIDR block. - diff --git a/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown b/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown new file mode 100644 index 00000000000..b8d8dfd8e46 --- /dev/null +++ b/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown @@ -0,0 +1,37 @@ +--- +layout: "aws" +page_title: "AWS: aws_vpc_secondary_ipv4_cidr_block" +sidebar_current: "docs-aws-resource-vpc-secondary-ipv4-cidr-block" +description: |- + Associate a secondary IPv4 CIDR blocks with a VPC +--- + +# aws_vpc_secondary_ipv4_cidr_block + +Provides a resource to associate a secondary IPv4 CIDR blocks with a VPC. + +## Example Usage + +```hcl +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_vpc_secondary_ipv4_cidr_block" "secondary_cidr" { + vpc_id = "${aws_vpc.main.id}" + ipv4_cidr_block = "172.2.0.0/16" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `vpc_id` - (Required) The ID of the VPC to make the association with. +* `ipv4_cidr_block` - (Required) The secondary IPv4 CIDR block to associate with the VPC. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the VPC CIDR association From ecad19d21bc83a51acb0e41dc2e7080c1aa47196 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 9 Mar 2018 16:38:27 -0500 Subject: [PATCH 1678/3316] 'ipv4_cidr_block' -> 'cidr_block'. --- aws/aws_vpc_secondary_ipv4_cidr_block.go | 6 +++--- aws/aws_vpc_secondary_ipv4_cidr_block_test.go | 4 ++-- website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aws/aws_vpc_secondary_ipv4_cidr_block.go b/aws/aws_vpc_secondary_ipv4_cidr_block.go index ca6f81ae714..49ad422bbb4 100644 --- a/aws/aws_vpc_secondary_ipv4_cidr_block.go +++ b/aws/aws_vpc_secondary_ipv4_cidr_block.go @@ -23,7 +23,7 @@ func resourceAwsVpcSecondaryIpv4CidrBlock() *schema.Resource { ForceNew: true, }, - "ipv4_cidr_block": { + "cidr_block": { Type: schema.TypeString, Required: true, ForceNew: true, @@ -38,7 +38,7 @@ func resourceAwsVpcSecondaryIpv4CidrBlockCreate(d *schema.ResourceData, meta int req := &ec2.AssociateVpcCidrBlockInput{ VpcId: aws.String(d.Get("vpc_id").(string)), - CidrBlock: aws.String(d.Get("ipv4_cidr_block").(string)), + CidrBlock: aws.String(d.Get("cidr_block").(string)), } log.Printf("[DEBUG] Creating VPC secondary IPv4 CIDR block: %#v", req) resp, err := conn.AssociateVpcCidrBlock(req) @@ -70,7 +70,7 @@ func resourceAwsVpcSecondaryIpv4CidrBlockRead(d *schema.ResourceData, meta inter for _, cidrAssociation := range vpc.CidrBlockAssociationSet { if aws.StringValue(cidrAssociation.AssociationId) == d.Id() { found = true - d.Set("ipv4_cidr_block", cidrAssociation.CidrBlock) + d.Set("cidr_block", cidrAssociation.CidrBlock) } } if !found { diff --git a/aws/aws_vpc_secondary_ipv4_cidr_block_test.go b/aws/aws_vpc_secondary_ipv4_cidr_block_test.go index c603368e356..42582d29234 100644 --- a/aws/aws_vpc_secondary_ipv4_cidr_block_test.go +++ b/aws/aws_vpc_secondary_ipv4_cidr_block_test.go @@ -128,11 +128,11 @@ resource "aws_vpc" "foo" { resource "aws_vpc_secondary_ipv4_cidr_block" "secondary_cidr" { vpc_id = "${aws_vpc.foo.id}" - ipv4_cidr_block = "172.2.0.0/16" + cidr_block = "172.2.0.0/16" } resource "aws_vpc_secondary_ipv4_cidr_block" "tertiary_cidr" { vpc_id = "${aws_vpc.foo.id}" - ipv4_cidr_block = "170.2.0.0/16" + cidr_block = "170.2.0.0/16" } ` diff --git a/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown b/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown index b8d8dfd8e46..74c4b1d5561 100644 --- a/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown +++ b/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown @@ -19,7 +19,7 @@ resource "aws_vpc" "main" { resource "aws_vpc_secondary_ipv4_cidr_block" "secondary_cidr" { vpc_id = "${aws_vpc.main.id}" - ipv4_cidr_block = "172.2.0.0/16" + cidr_block = "172.2.0.0/16" } ``` @@ -28,7 +28,7 @@ resource "aws_vpc_secondary_ipv4_cidr_block" "secondary_cidr" { The following arguments are supported: * `vpc_id` - (Required) The ID of the VPC to make the association with. -* `ipv4_cidr_block` - (Required) The secondary IPv4 CIDR block to associate with the VPC. +* `cidr_block` - (Required) The secondary IPv4 CIDR block to associate with the VPC. ## Attributes Reference From 043935747383a40418239e4489f3de868801bb37 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 29 Jun 2018 10:44:58 -0400 Subject: [PATCH 1679/3316] 'aws_vpc_secondary_ipv4_cidr_block' -> 'aws_vpc_ipv4_cidr_block_association'. --- ...=> aws_vpc_ipv4_cidr_block_association.go} | 30 +++++++------- ...s_vpc_ipv4_cidr_block_association_test.go} | 35 ++++++++-------- website/aws.erb | 8 ++-- ..._ipv4_cidr_block_association.html.markdown | 40 +++++++++++++++++++ ...pc_secondary_ipv4_cidr_block.html.markdown | 37 ----------------- 5 files changed, 78 insertions(+), 72 deletions(-) rename aws/{aws_vpc_secondary_ipv4_cidr_block.go => aws_vpc_ipv4_cidr_block_association.go} (59%) rename aws/{aws_vpc_secondary_ipv4_cidr_block_test.go => aws_vpc_ipv4_cidr_block_association_test.go} (63%) create mode 100644 website/docs/r/vpc_ipv4_cidr_block_association.html.markdown delete mode 100644 website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown diff --git a/aws/aws_vpc_secondary_ipv4_cidr_block.go b/aws/aws_vpc_ipv4_cidr_block_association.go similarity index 59% rename from aws/aws_vpc_secondary_ipv4_cidr_block.go rename to aws/aws_vpc_ipv4_cidr_block_association.go index 49ad422bbb4..a07a4f731ca 100644 --- a/aws/aws_vpc_secondary_ipv4_cidr_block.go +++ b/aws/aws_vpc_ipv4_cidr_block_association.go @@ -10,11 +10,11 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) -func resourceAwsVpcSecondaryIpv4CidrBlock() *schema.Resource { +func resourceAwsVpcIpv4CidrBlockAssociation() *schema.Resource { return &schema.Resource{ - Create: resourceAwsVpcSecondaryIpv4CidrBlockCreate, - Read: resourceAwsVpcSecondaryIpv4CidrBlockRead, - Delete: resourceAwsVpcSecondaryIpv4CidrBlockDelete, + Create: resourceAwsVpcIpv4CidrBlockAssociationCreate, + Read: resourceAwsVpcIpv4CidrBlockAssociationRead, + Delete: resourceAwsVpcIpv4CidrBlockAssociationDelete, Schema: map[string]*schema.Schema{ "vpc_id": { @@ -33,34 +33,34 @@ func resourceAwsVpcSecondaryIpv4CidrBlock() *schema.Resource { } } -func resourceAwsVpcSecondaryIpv4CidrBlockCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsVpcIpv4CidrBlockAssociationCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn req := &ec2.AssociateVpcCidrBlockInput{ VpcId: aws.String(d.Get("vpc_id").(string)), CidrBlock: aws.String(d.Get("cidr_block").(string)), } - log.Printf("[DEBUG] Creating VPC secondary IPv4 CIDR block: %#v", req) + log.Printf("[DEBUG] Creating VPC IPv4 CIDR block association: %#v", req) resp, err := conn.AssociateVpcCidrBlock(req) if err != nil { - return fmt.Errorf("Error creating VPC secondary IPv4 CIDR block: %s", err.Error()) + return fmt.Errorf("Error creating VPC IPv4 CIDR block association: %s", err) } d.SetId(aws.StringValue(resp.CidrBlockAssociation.AssociationId)) - return resourceAwsVpcSecondaryIpv4CidrBlockRead(d, meta) + return resourceAwsVpcIpv4CidrBlockAssociationRead(d, meta) } -func resourceAwsVpcSecondaryIpv4CidrBlockRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsVpcIpv4CidrBlockAssociationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn vpcId := d.Get("vpc_id").(string) vpcRaw, _, err := VPCStateRefreshFunc(conn, vpcId)() if err != nil { - return fmt.Errorf("Error reading VPC: %s", err.Error()) + return fmt.Errorf("Error reading VPC: %s", err) } if vpcRaw == nil { - log.Printf("[WARN] VPC (%s) not found, removing secondary IPv4 CIDR block from state", vpcId) + log.Printf("[WARN] VPC (%s) not found, removing IPv4 CIDR block association from state", vpcId) d.SetId("") return nil } @@ -74,22 +74,22 @@ func resourceAwsVpcSecondaryIpv4CidrBlockRead(d *schema.ResourceData, meta inter } } if !found { - log.Printf("[WARN] VPC secondary IPv4 CIDR block (%s) not found, removing from state", d.Id()) + log.Printf("[WARN] VPC IPv4 CIDR block association (%s) not found, removing from state", d.Id()) d.SetId("") } return nil } -func resourceAwsVpcSecondaryIpv4CidrBlockDelete(d *schema.ResourceData, meta interface{}) error { +func resourceAwsVpcIpv4CidrBlockAssociationDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - log.Printf("[DEBUG] Deleting VPC secondary IPv4 CIDR block: %s", d.Id()) + log.Printf("[DEBUG] Deleting VPC IPv4 CIDR block association: %s", d.Id()) _, err := conn.DisassociateVpcCidrBlock(&ec2.DisassociateVpcCidrBlockInput{ AssociationId: aws.String(d.Id()), }) if err != nil { - return fmt.Errorf("Error deleting VPC secondary IPv4 CIDR block: %s", err.Error()) + return fmt.Errorf("Error deleting VPC IPv4 CIDR block association: %s", err) } return nil diff --git a/aws/aws_vpc_secondary_ipv4_cidr_block_test.go b/aws/aws_vpc_ipv4_cidr_block_association_test.go similarity index 63% rename from aws/aws_vpc_secondary_ipv4_cidr_block_test.go rename to aws/aws_vpc_ipv4_cidr_block_association_test.go index 42582d29234..7a60173a612 100644 --- a/aws/aws_vpc_secondary_ipv4_cidr_block_test.go +++ b/aws/aws_vpc_ipv4_cidr_block_association_test.go @@ -11,28 +11,28 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAwsVpcSecondaryIpv4CidrBlock_basic(t *testing.T) { +func TestAccAwsVpcIpv4CidrBlockAssociation_basic(t *testing.T) { var associationSecondary, associationTertiary ec2.VpcCidrBlockAssociation resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, - CheckDestroy: testAccCheckAwsVpcSecondaryIpv4CidrBlockDestroy, + CheckDestroy: testAccCheckAwsVpcIpv4CidrBlockAssociationDestroy, Steps: []resource.TestStep{ { - Config: testAccAwsVpcSecondaryIpv4CidrBlockConfig, + Config: testAccAwsVpcIpv4CidrBlockAssociationConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckAwsVpcSecondaryIpv4CidrBlockExists("aws_vpc_secondary_ipv4_cidr_block.secondary_cidr", &associationSecondary), - testAccCheckAwsVpcSecondaryIpv4CidrBlock(&associationSecondary, "172.2.0.0/16"), - testAccCheckAwsVpcSecondaryIpv4CidrBlockExists("aws_vpc_secondary_ipv4_cidr_block.tertiary_cidr", &associationTertiary), - testAccCheckAwsVpcSecondaryIpv4CidrBlock(&associationTertiary, "170.2.0.0/16"), + testAccCheckAwsVpcIpv4CidrBlockAssociationExists("aws_vpc_ipv4_cidr_block_association.secondary_cidr", &associationSecondary), + testAccCheckAdditionalAwsVpcIpv4CidrBlock(&associationSecondary, "172.2.0.0/16"), + testAccCheckAwsVpcIpv4CidrBlockAssociationExists("aws_vpc_ipv4_cidr_block_association.tertiary_cidr", &associationTertiary), + testAccCheckAdditionalAwsVpcIpv4CidrBlock(&associationTertiary, "170.2.0.0/16"), ), }, }, }) } -func testAccCheckAwsVpcSecondaryIpv4CidrBlock(association *ec2.VpcCidrBlockAssociation, expected string) resource.TestCheckFunc { +func testAccCheckAdditionalAwsVpcIpv4CidrBlock(association *ec2.VpcCidrBlockAssociation, expected string) resource.TestCheckFunc { return func(s *terraform.State) error { CIDRBlock := association.CidrBlock if *CIDRBlock != expected { @@ -43,11 +43,11 @@ func testAccCheckAwsVpcSecondaryIpv4CidrBlock(association *ec2.VpcCidrBlockAssoc } } -func testAccCheckAwsVpcSecondaryIpv4CidrBlockDestroy(s *terraform.State) error { +func testAccCheckAwsVpcIpv4CidrBlockAssociationDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn for _, rs := range s.RootModule().Resources { - if rs.Type != "aws_vpc_secondary_ipv4_cidr_block" { + if rs.Type != "aws_vpc_ipv4_cidr_block_association" { continue } @@ -61,7 +61,7 @@ func testAccCheckAwsVpcSecondaryIpv4CidrBlockDestroy(s *terraform.State) error { for _, ipv4Association := range vpc.CidrBlockAssociationSet { if *ipv4Association.AssociationId == rs.Primary.ID { - return fmt.Errorf("VPC secondary CIDR block still exists") + return fmt.Errorf("VPC CIDR block association still exists") } } @@ -81,7 +81,7 @@ func testAccCheckAwsVpcSecondaryIpv4CidrBlockDestroy(s *terraform.State) error { return nil } -func testAccCheckAwsVpcSecondaryIpv4CidrBlockExists(n string, association *ec2.VpcCidrBlockAssociation) resource.TestCheckFunc { +func testAccCheckAwsVpcIpv4CidrBlockAssociationExists(n string, association *ec2.VpcCidrBlockAssociation) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -114,24 +114,27 @@ func testAccCheckAwsVpcSecondaryIpv4CidrBlockExists(n string, association *ec2.V } if !found { - return fmt.Errorf("VPC secondary CIDR block not found") + return fmt.Errorf("VPC CIDR block association not found") } return nil } } -const testAccAwsVpcSecondaryIpv4CidrBlockConfig = ` +const testAccAwsVpcIpv4CidrBlockAssociationConfig = ` resource "aws_vpc" "foo" { cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-vpc-ipv4-cidr-block-association" + } } -resource "aws_vpc_secondary_ipv4_cidr_block" "secondary_cidr" { +resource "aws_vpc_ipv4_cidr_block_association" "secondary_cidr" { vpc_id = "${aws_vpc.foo.id}" cidr_block = "172.2.0.0/16" } -resource "aws_vpc_secondary_ipv4_cidr_block" "tertiary_cidr" { +resource "aws_vpc_ipv4_cidr_block_association" "tertiary_cidr" { vpc_id = "${aws_vpc.foo.id}" cidr_block = "170.2.0.0/16" } diff --git a/website/aws.erb b/website/aws.erb index e65e202886a..f4d36921980 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -2230,6 +2230,10 @@ aws_vpc_endpoint_subnet_association + > + aws_vpc_ipv4_cidr_block_association + + > aws_vpc_peering_connection @@ -2242,10 +2246,6 @@ aws_vpc_peering_connection_options - > - aws_vpc_secondary_ipv4_cidr_block - - > aws_vpn_connection diff --git a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown new file mode 100644 index 00000000000..14a82e76fbb --- /dev/null +++ b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown @@ -0,0 +1,40 @@ +--- +layout: "aws" +page_title: "AWS: aws_vpc_ipv4_cidr_block_association" +sidebar_current: "docs-aws-resource-vpc-ipv4-cidr-block-association" +description: |- + Associate additional IPv4 CIDR blocks with a VPC +--- + +# aws_vpc_ipv4_cidr_block_association + +Provides a resource to associate additional IPv4 CIDR blocks with a VPC. + +When a VPC is created, a primary IPv4 CIDR block for the VPC must be specified. +The `aws_vpc_ipv4_cidr_block_association` resource allows further IPv4 CIDR blocks to be added to the VPC. + +## Example Usage + +```hcl +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_vpc_ipv4_cidr_block_association" "secondary_cidr" { + vpc_id = "${aws_vpc.main.id}" + cidr_block = "172.2.0.0/16" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `cidr_block` - (Required) The additional IPv4 CIDR block to associate with the VPC. +* `vpc_id` - (Required) The ID of the VPC to make the association with. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the VPC CIDR association diff --git a/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown b/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown deleted file mode 100644 index 74c4b1d5561..00000000000 --- a/website/docs/r/vpc_secondary_ipv4_cidr_block.html.markdown +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: "aws" -page_title: "AWS: aws_vpc_secondary_ipv4_cidr_block" -sidebar_current: "docs-aws-resource-vpc-secondary-ipv4-cidr-block" -description: |- - Associate a secondary IPv4 CIDR blocks with a VPC ---- - -# aws_vpc_secondary_ipv4_cidr_block - -Provides a resource to associate a secondary IPv4 CIDR blocks with a VPC. - -## Example Usage - -```hcl -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" -} - -resource "aws_vpc_secondary_ipv4_cidr_block" "secondary_cidr" { - vpc_id = "${aws_vpc.main.id}" - cidr_block = "172.2.0.0/16" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `vpc_id` - (Required) The ID of the VPC to make the association with. -* `cidr_block` - (Required) The secondary IPv4 CIDR block to associate with the VPC. - -## Attributes Reference - -The following attributes are exported: - -* `id` - The ID of the VPC CIDR association From 884792a43a87e7096b882ac58c7e7a1b329e23b6 Mon Sep 17 00:00:00 2001 From: Fred Dubois Date: Fri, 29 Jun 2018 11:04:37 -0400 Subject: [PATCH 1680/3316] Add documentation for new aws_route_tables filter arg --- website/docs/d/route_tables.html.markdown | 27 ++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/website/docs/d/route_tables.html.markdown b/website/docs/d/route_tables.html.markdown index 7456017b91c..f33dd113f85 100644 --- a/website/docs/d/route_tables.html.markdown +++ b/website/docs/d/route_tables.html.markdown @@ -12,19 +12,25 @@ This resource can be useful for getting back a list of route table ids to be ref ## Example Usage -The following adds a route for a particular cidr block to every route table -in a specified vpc to use a particular vpc peering connection. +The following adds a route for a particular cidr block to every (private +kops) route table in a specified vpc to use a particular vpc peering +connection. ```hcl data "aws_route_tables" "rts" { vpc_id = "${var.vpc_id}" + + filter { + name = "tag:kubernetes.io/kops/role" + values = ["private*"] + } } resource "aws_route" "r" { - count = "${length(data.aws_route_tables.rts.ids)}" - route_table_id = "${data.aws_route_tables.rts.ids[count.index]}" - destination_cidr_block = "10.0.1.0/22" + count = "${length(data.aws_route_tables.rts.ids)}" + route_table_id = "${data.aws_route_tables.rts.ids[count.index]}" + destination_cidr_block = "10.0.1.0/22" vpc_peering_connection_id = "pcx-0e9a7a9ecd137dc54" } @@ -32,11 +38,22 @@ resource "aws_route" "r" { ## Argument Reference +* `filter` - (Optional) Custom filter block as described below. + * `vpc_id` - (Optional) The VPC ID that you want to filter from. * `tags` - (Optional) A mapping of tags, each pair of which must exactly match a pair on the desired route tables. +More complex filters can be expressed using one or more `filter` sub-blocks, +which take the following arguments: + +* `name` - (Required) The name of the field to filter by, as defined by + [the underlying AWS API](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRouteTables.html). + +* `values` - (Required) Set of values that are accepted for the given field. + A Route Table will be selected if any one of the given values matches. + ## Attributes Reference * `ids` - A list of all the route table ids found. This data source will fail if none are found. From ebdcb40cb70a7ed8b8ea6862413f301197915ef7 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 29 Jun 2018 19:28:48 +0400 Subject: [PATCH 1681/3316] add validation func --- aws/resource_aws_spot_fleet_request.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index 4fcf6bd8415..d794d09c508 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -322,8 +322,12 @@ func resourceAwsSpotFleetRequest() *schema.Resource { "fleet_type": { Type: schema.TypeString, Optional: true, - Default: "maintain", + Default: ec2.FleetTypeMaintain, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.FleetTypeMaintain, + ec2.FleetTypeRequest, + }, false), }, "spot_request_state": { Type: schema.TypeString, From 506cc150f7f25b12aec689807e0d7e3323cd8718 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 29 Jun 2018 11:29:08 -0400 Subject: [PATCH 1682/3316] Minor changes after code review. --- aws/aws_vpc_ipv4_cidr_block_association.go | 4 ++++ website/docs/r/subnet.html.markdown | 21 ++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/aws/aws_vpc_ipv4_cidr_block_association.go b/aws/aws_vpc_ipv4_cidr_block_association.go index a07a4f731ca..1aa5deee43a 100644 --- a/aws/aws_vpc_ipv4_cidr_block_association.go +++ b/aws/aws_vpc_ipv4_cidr_block_association.go @@ -71,6 +71,7 @@ func resourceAwsVpcIpv4CidrBlockAssociationRead(d *schema.ResourceData, meta int if aws.StringValue(cidrAssociation.AssociationId) == d.Id() { found = true d.Set("cidr_block", cidrAssociation.CidrBlock) + break } } if !found { @@ -89,6 +90,9 @@ func resourceAwsVpcIpv4CidrBlockAssociationDelete(d *schema.ResourceData, meta i AssociationId: aws.String(d.Id()), }) if err != nil { + if isAWSErr(err, "InvalidVpcID.NotFound", "") { + return nil + } return fmt.Errorf("Error deleting VPC IPv4 CIDR block association: %s", err) } diff --git a/website/docs/r/subnet.html.markdown b/website/docs/r/subnet.html.markdown index cda826371de..32a6a0e41cb 100644 --- a/website/docs/r/subnet.html.markdown +++ b/website/docs/r/subnet.html.markdown @@ -12,6 +12,8 @@ Provides an VPC subnet resource. ## Example Usage +### Basic Usage + ```hcl resource "aws_subnet" "main" { vpc_id = "${aws_vpc.main.id}" @@ -23,6 +25,23 @@ resource "aws_subnet" "main" { } ``` +### Subnets In Secondary VPC CIDR Blocks + +When managing subnets in one of a VPC's secondary CIDR blocks created using a [`aws_vpc_ipv4_cidr_block_association`](vpc_ipv4_cidr_block_association.html) +resource, it is recommended to reference that resource's `vpc_id` attribute to ensure correct dependency ordering. + +```hcl +resource "aws_vpc_ipv4_cidr_block_association" "secondary_cidr" { + vpc_id = "${aws_vpc.main.id}" + cidr_block = "172.2.0.0/16" +} + +resource "aws_subnet" "in_secondary_cidr" { + vpc_id = "${aws_vpc_ipv4_cidr_block_association.secondary_cidr.vpc_id}" + cidr_block = "172.2.0.0/24" +} +``` + ## Argument Reference The following arguments are supported: @@ -57,4 +76,4 @@ Subnets can be imported using the `subnet id`, e.g. ``` $ terraform import aws_subnet.public_subnet subnet-9d4a7b6c -``` \ No newline at end of file +``` From ca2beb36c90f8819c3a75dbc6397e279337313bc Mon Sep 17 00:00:00 2001 From: Logan Attwood Date: Fri, 29 Jun 2018 12:48:59 -0300 Subject: [PATCH 1683/3316] Update aws_db_instance documentation to use correct units Reference for gibibytes over gigabytes: https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html --- website/docs/r/db_instance.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index 04e81c9787a..481c8881da9 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -58,7 +58,7 @@ documentation](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_Crea The following arguments are supported: * `allocated_storage` - (Required unless a `snapshot_identifier` or -`replicate_source_db` is provided) The allocated storage in gigabytes. +`replicate_source_db` is provided) The allocated storage in gibibytes. * `allow_major_version_upgrade` - (Optional) Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible. From 5fca4227f68d7bd9c9befc9a151469f38537b516 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 12:12:26 -0400 Subject: [PATCH 1684/3316] Update CHANGELOG for #3951 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1db085a98bb..62328ebb4c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ FEATURES: ENHANCEMENTS: * resource/aws_eip_association: Support resource import [GH-5006] +* resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] ## 1.25.0 (June 27, 2018) From 0ef33b6cfa9ae724f197b0801aec503791e2fe96 Mon Sep 17 00:00:00 2001 From: Marcos Diez Date: Fri, 29 Jun 2018 13:16:04 -0300 Subject: [PATCH 1685/3316] codedeploy documentation --- .../r/codedeploy_deployment_group.html.markdown | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/website/docs/r/codedeploy_deployment_group.html.markdown b/website/docs/r/codedeploy_deployment_group.html.markdown index 93500147ab8..38d73f1fe84 100644 --- a/website/docs/r/codedeploy_deployment_group.html.markdown +++ b/website/docs/r/codedeploy_deployment_group.html.markdown @@ -50,9 +50,20 @@ resource "aws_iam_role_policy" "example" { "autoscaling:DescribeLifecycleHooks", "autoscaling:PutLifecycleHook", "autoscaling:RecordLifecycleActionHeartbeat", - "codedeploy:*", + + "codedeploy:Batch*", + "codedeploy:Get*", + "codedeploy:List*", + "ec2:DescribeInstances", "ec2:DescribeInstanceStatus", + + "elasticloadbalancing:Describe*", + "elasticloadbalancing:DeregisterInstancesFromLoadBalancer", + "elasticloadbalancing:RegisterInstancesWithLoadBalancer", + "elasticloadbalancing:RegisterTargets", + "elasticloadbalancing:DeregisterTargets", + "tag:GetTags", "tag:GetResources", "sns:Publish" From a980ff400f670d115c0acd911785c5a2a4187928 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 13:30:47 -0400 Subject: [PATCH 1686/3316] Update CHANGELOG for #4010 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62328ebb4c9..fe69b7215cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ENHANCEMENTS: * resource/aws_eip_association: Support resource import [GH-5006] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] +BUG FIXES: + +* resource/aws_kms_alias: Fix perpetual plan when `target_key_id` is ARN [GH-4010] + ## 1.25.0 (June 27, 2018) NOTES: From 3855870058db7702225d05a1fd2bb436d4efae83 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 13:42:22 -0400 Subject: [PATCH 1687/3316] Update CHANGELOG for #5020 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe69b7215cb..22ba59ca948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: * resource/aws_eip_association: Support resource import [GH-5006] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] +* resource/aws_ssm_document: Add `tags` argument (support tagging) [GH-5020] BUG FIXES: From ff10478925671c53f5d3e91af0b0604d96245a0b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 29 Jun 2018 13:51:07 -0400 Subject: [PATCH 1688/3316] Correctly handle VPC IPv4 CIDR block association state changes. --- aws/aws_vpc_ipv4_cidr_block_association.go | 80 ++++++++++++++----- aws/resource_aws_vpc.go | 30 +++++++ ..._ipv4_cidr_block_association.html.markdown | 8 ++ 3 files changed, 100 insertions(+), 18 deletions(-) diff --git a/aws/aws_vpc_ipv4_cidr_block_association.go b/aws/aws_vpc_ipv4_cidr_block_association.go index 1aa5deee43a..54cf6c01e12 100644 --- a/aws/aws_vpc_ipv4_cidr_block_association.go +++ b/aws/aws_vpc_ipv4_cidr_block_association.go @@ -3,13 +3,19 @@ package aws import ( "fmt" "log" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" ) +const ( + VpcCidrBlockStateCodeDeleted = "deleted" +) + func resourceAwsVpcIpv4CidrBlockAssociation() *schema.Resource { return &schema.Resource{ Create: resourceAwsVpcIpv4CidrBlockAssociationCreate, @@ -30,6 +36,11 @@ func resourceAwsVpcIpv4CidrBlockAssociation() *schema.Resource { ValidateFunc: validation.CIDRNetwork(16, 28), // The allowed block size is between a /28 netmask and /16 netmask. }, }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, } } @@ -48,36 +59,37 @@ func resourceAwsVpcIpv4CidrBlockAssociationCreate(d *schema.ResourceData, meta i d.SetId(aws.StringValue(resp.CidrBlockAssociation.AssociationId)) + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.VpcCidrBlockStateCodeAssociating}, + Target: []string{ec2.VpcCidrBlockStateCodeAssociated}, + Refresh: vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for IPv4 CIDR block association (%s) to become available: %s", d.Id(), err) + } + return resourceAwsVpcIpv4CidrBlockAssociationRead(d, meta) } func resourceAwsVpcIpv4CidrBlockAssociationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - vpcId := d.Get("vpc_id").(string) - vpcRaw, _, err := VPCStateRefreshFunc(conn, vpcId)() + assocRaw, state, err := vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id())() if err != nil { - return fmt.Errorf("Error reading VPC: %s", err) + return fmt.Errorf("Error reading IPv4 CIDR block association: %s", err) } - if vpcRaw == nil { - log.Printf("[WARN] VPC (%s) not found, removing IPv4 CIDR block association from state", vpcId) + if state == VpcCidrBlockStateCodeDeleted { + log.Printf("[WARN] IPv4 CIDR block association (%s) not found, removing from state", d.Id()) d.SetId("") return nil } - vpc := vpcRaw.(*ec2.Vpc) - found := false - for _, cidrAssociation := range vpc.CidrBlockAssociationSet { - if aws.StringValue(cidrAssociation.AssociationId) == d.Id() { - found = true - d.Set("cidr_block", cidrAssociation.CidrBlock) - break - } - } - if !found { - log.Printf("[WARN] VPC IPv4 CIDR block association (%s) not found, removing from state", d.Id()) - d.SetId("") - } + assoc := assocRaw.(*ec2.VpcCidrBlockAssociation) + d.Set("cidr_block", assoc.CidrBlock) return nil } @@ -96,5 +108,37 @@ func resourceAwsVpcIpv4CidrBlockAssociationDelete(d *schema.ResourceData, meta i return fmt.Errorf("Error deleting VPC IPv4 CIDR block association: %s", err) } + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.VpcCidrBlockStateCodeDisassociating}, + Target: []string{ec2.VpcCidrBlockStateCodeDisassociated, VpcCidrBlockStateCodeDeleted}, + Refresh: vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for VPC IPv4 CIDR block association (%s) to be deleted: %s", d.Id(), err.Error()) + } + return nil } + +func vpcIpv4CidrBlockAssociationStateRefresh(conn *ec2.EC2, vpcId, assocId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + vpc, err := vpcDescribe(conn, vpcId) + if err != nil { + return nil, "", err + } + + if vpc != nil { + for _, cidrAssociation := range vpc.CidrBlockAssociationSet { + if aws.StringValue(cidrAssociation.AssociationId) == assocId { + return cidrAssociation, aws.StringValue(cidrAssociation.CidrBlockState.State), nil + } + } + } + + return "", VpcCidrBlockStateCodeDeleted, nil + } +} diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index e1687477d0a..1006d9d29ca 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -674,3 +674,33 @@ func awsVpcDescribeVpcAttribute(attribute string, vpcId string, conn *ec2.EC2) ( return resp, nil } + +// vpcDescribe returns EC2 API information about the specified VPC. +// If the VPC doesn't exist, return nil. +func vpcDescribe(conn *ec2.EC2, vpcId string) (*ec2.Vpc, error) { + resp, err := conn.DescribeVpcs(&ec2.DescribeVpcsInput{ + VpcIds: aws.StringSlice([]string{vpcId}), + }) + if err != nil { + if !isAWSErr(err, "InvalidVpcID.NotFound", "") { + return nil, err + } + resp = nil + } + + if resp == nil { + return nil, nil + } + + n := len(resp.Vpcs) + switch n { + case 0: + return nil, nil + + case 1: + return resp.Vpcs[0], nil + + default: + return nil, fmt.Errorf("Found %d VPCs for %s, expected 1", n, vpcId) + } +} diff --git a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown index 14a82e76fbb..e33cc898faa 100644 --- a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown +++ b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown @@ -33,6 +33,14 @@ The following arguments are supported: * `cidr_block` - (Required) The additional IPv4 CIDR block to associate with the VPC. * `vpc_id` - (Required) The ID of the VPC to make the association with. +## Timeouts + +`aws_vpc_ipv4_cidr_block_association` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating the association +- `delete` - (Default `10 minutes`) Used for destroying the association + ## Attributes Reference The following attributes are exported: From 1fa528d4b46a0db351bf35154321d8323954ec20 Mon Sep 17 00:00:00 2001 From: Marcos Diez Date: Fri, 29 Jun 2018 15:49:32 -0300 Subject: [PATCH 1689/3316] aws_iam_role_policy_attachment documentation update2 --- .../codedeploy_deployment_group.html.markdown | 43 ++----------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/website/docs/r/codedeploy_deployment_group.html.markdown b/website/docs/r/codedeploy_deployment_group.html.markdown index 38d73f1fe84..92ae2a6dc1c 100644 --- a/website/docs/r/codedeploy_deployment_group.html.markdown +++ b/website/docs/r/codedeploy_deployment_group.html.markdown @@ -33,46 +33,9 @@ resource "aws_iam_role" "example" { EOF } -resource "aws_iam_role_policy" "example" { - name = "example-policy" - role = "${aws_iam_role.example.id}" - - policy = < Date: Fri, 29 Jun 2018 14:56:52 -0400 Subject: [PATCH 1690/3316] Update CHANGELOG for #5032 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ba59ca948..68944500297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ENHANCEMENTS: * resource/aws_eip_association: Support resource import [GH-5006] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] +* resource/aws_spot_fleet_request: Add `fleet_type` argument [GH-5032] * resource/aws_ssm_document: Add `tags` argument (support tagging) [GH-5020] BUG FIXES: From 208c9eb7aa41d62f041f7594e97490c41902e109 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 14:59:35 -0400 Subject: [PATCH 1691/3316] Update CHANGELOG for #5035 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68944500297..da738fc0bb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ FEATURES: ENHANCEMENTS: +* data-source/aws_route_tables: Add `filter` argument [GH-5035] * resource/aws_eip_association: Support resource import [GH-5006] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] * resource/aws_spot_fleet_request: Add `fleet_type` argument [GH-5032] From 994e919b29225bee91111b2bac025983f84aa5d3 Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 29 Jun 2018 15:40:52 -0400 Subject: [PATCH 1692/3316] Add filtering to subnet ids data source --- aws/data_source_aws_subnet_ids.go | 31 ++++++++++---- aws/data_source_aws_subnet_ids_test.go | 56 ++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 8 deletions(-) diff --git a/aws/data_source_aws_subnet_ids.go b/aws/data_source_aws_subnet_ids.go index a2f5f0c46aa..21339f1ab91 100644 --- a/aws/data_source_aws_subnet_ids.go +++ b/aws/data_source_aws_subnet_ids.go @@ -12,6 +12,7 @@ func dataSourceAwsSubnetIDs() *schema.Resource { return &schema.Resource{ Read: dataSourceAwsSubnetIDsRead, Schema: map[string]*schema.Schema{ + "filter": ec2CustomFiltersSchema(), "tags": tagsSchemaComputed(), @@ -35,15 +36,29 @@ func dataSourceAwsSubnetIDsRead(d *schema.ResourceData, meta interface{}) error req := &ec2.DescribeSubnetsInput{} - req.Filters = buildEC2AttributeFilterList( - map[string]string{ - "vpc-id": d.Get("vpc_id").(string), - }, - ) + if vpc, vpcOk := d.GetOk("vpc_id"); vpcOk { + req.Filters = buildEC2AttributeFilterList( + map[string]string{ + "vpc-id": vpc.(string), + }, + ) + } + + if tags, tagsOk := d.GetOk("tags"); tagsOk { + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + + if filters, filtersOk := d.GetOk("filter"); filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } - req.Filters = append(req.Filters, buildEC2TagFilterList( - tagsFromMap(d.Get("tags").(map[string]interface{})), - )...) + if len(req.Filters) == 0 { + req.Filters = nil + } log.Printf("[DEBUG] DescribeSubnets %s\n", req) resp, err := conn.DescribeSubnets(req) diff --git a/aws/data_source_aws_subnet_ids_test.go b/aws/data_source_aws_subnet_ids_test.go index c4826446b2e..3702c3cf47f 100644 --- a/aws/data_source_aws_subnet_ids_test.go +++ b/aws/data_source_aws_subnet_ids_test.go @@ -29,6 +29,25 @@ func TestAccDataSourceAwsSubnetIDs(t *testing.T) { }) } +func TestAccDataSourceAwsSubnetIDs_filter(t *testing.T) { + rInt := acctest.RandIntRange(0, 256) + rName := "data.aws_subnet_ids.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSubnetIDs_filter(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(rName, "ids.#", "2"), + ), + }, + }, + }) +} + func testAccDataSourceAwsSubnetIDsConfigWithDataSource(rInt int) string { return fmt.Sprintf(` resource "aws_vpc" "test" { @@ -129,3 +148,40 @@ resource "aws_subnet" "test_private_b" { } `, rInt, rInt, rInt, rInt) } + +func testAccDataSourceAwsSubnetIDs_filter(rInt int) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "172.%d.0.0/16" + tags { + Name = "terraform-testacc-subnet-ids-data-source" + } +} + +resource "aws_subnet" "test_a_one" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "172.%d.1.0/24" + availability_zone = "us-west-2a" +} + +resource "aws_subnet" "test_a_two" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "172.%d.2.0/24" + availability_zone = "us-west-2a" +} + +resource "aws_subnet" "test_b" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "172.%d.3.0/24" + availability_zone = "us-west-2b" +} + +data "aws_subnet_ids" "test" { + vpc_id = "${aws_subnet.test_a_two.vpc_id}" + filter { + name = "availabilityZone" + values = ["${aws_subnet.test_a_one.availability_zone}"] + } +} +`, rInt, rInt, rInt, rInt) +} From 7c3c613d11fba32a9ec0df31d4bb96b55d53ce20 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 16:39:06 -0400 Subject: [PATCH 1693/3316] Update CHANGELOG for #3723 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da738fc0bb7..902bd9cf89c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Data Source:** `aws_launch_configuration` [GH-3624] * **New Resource:** `aws_s3_bucket_inventory` [GH-5019] +* **New Resource:** `aws_vpc_ipv4_cidr_block_association` [GH-3723] ENHANCEMENTS: From 2b7d3dab10d61442fd65ce2fe8da2f3eda39e3b0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 29 Jun 2018 16:47:55 -0400 Subject: [PATCH 1694/3316] Update CHANGELOG for #5038 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 902bd9cf89c..4b7d58a93d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ FEATURES: ENHANCEMENTS: * data-source/aws_route_tables: Add `filter` argument [GH-5035] +* data-source/aws_subnet_ids: Add `filter` argument [GH-5038] * resource/aws_eip_association: Support resource import [GH-5006] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] * resource/aws_spot_fleet_request: Add `fleet_type` argument [GH-5032] From 2e427e657df595771de4a0d7e95d194eb1af1171 Mon Sep 17 00:00:00 2001 From: CyrusNajmabadi Date: Thu, 28 Jun 2018 15:35:37 -0700 Subject: [PATCH 1695/3316] Make EventSourceMapping.starting_position optional. Amazon recently made it possible to have SQS events trigger Lambdas. See: https://aws.amazon.com/blogs/aws/aws-lambda-adds-amazon-simple-queue-service-to-supported-event-sources/ for more details. As part of this they specifically utilize CreateSourceEventMapping to describe the mapping between SQS and Lambda: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html *However*, as part of this, they changed the StartingPosition message property from required to optional. You can see that it was previous required here: https://web.archive.org/web/20171222204154/https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html ``` StartingPosition The position in the stream where Lambda starts reading. For valid values, see CreateEventSourceMapping in the AWS Lambda Developer Guide. Required: Yes Type: String Update requires: Replacement ``` But now is optional in the current set of docs: ``` StartingPosition The position in the stream where Lambda starts reading. For valid values, see CreateEventSourceMapping in the AWS Lambda Developer Guide. Required: No Type: String Update requires: Replacement ``` Unfortunately, this makes is (afaict) impossible to use terraform to configure this EventSourceMapping. If i leave out the starting_position property, terraform complains with: ``` Plan apply failed: Error creating Lambda event source mapping: ValidationException: 1 validation error detected: Value '' at 'startingPosition' failed to satisfy constraint: Member must satisfy enum value set: [LATEST, AT_TIMESTAMP, TRIM_HORIZON] ``` However, if i supply any of those, AWS itself errors out with: ``` Plan apply failed: Error creating Lambda event source mapping: InvalidParameterValueException: StartingPosition is not valid for SQS event sources. ``` This PR attempts to rectify things by making this property optional to match current AWS expectations. --- aws/resource_aws_lambda_event_source_mapping.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index 579b3c5a7c1..5bb1f58ac29 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -35,7 +35,7 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { }, "starting_position": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, }, "batch_size": { From 9fbac0df4005a28c13d47dec1e0bd4e1f260b99d Mon Sep 17 00:00:00 2001 From: CyrusNajmabadi Date: Thu, 28 Jun 2018 15:40:33 -0700 Subject: [PATCH 1696/3316] Update documentatoin as well. --- website/docs/r/lambda_event_source_mapping.html.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/r/lambda_event_source_mapping.html.markdown b/website/docs/r/lambda_event_source_mapping.html.markdown index 931f9e220f3..d00effbe38e 100644 --- a/website/docs/r/lambda_event_source_mapping.html.markdown +++ b/website/docs/r/lambda_event_source_mapping.html.markdown @@ -3,12 +3,12 @@ layout: "aws" page_title: "AWS: aws_lambda_event_source_mapping" sidebar_current: "docs-aws-resource-lambda-event-source-mapping" description: |- - Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis and DynamoDB. + Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB and SQS --- # aws_lambda_event_source_mapping -Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis and DynamoDB. +Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB and SQS For information about Lambda and how to use it, see [What is AWS Lambda?][1] For information about event source mappings, see [CreateEventSourceMapping][2] in the API docs. @@ -31,7 +31,7 @@ resource "aws_lambda_event_source_mapping" "event_source_mapping" { * `event_source_arn` - (Required) The event source ARN - can either be a Kinesis or DynamoDB stream. * `enabled` - (Optional) Determines if the mapping will be enabled on creation. Defaults to `true`. * `function_name` - (Required) The name or the ARN of the Lambda function that will be subscribing to events. -* `starting_position` - (Required) The position in the stream where AWS Lambda should start reading. Can be one of either `TRIM_HORIZON` or `LATEST`. +* `starting_position` - (Optional) The position in the stream where AWS Lambda should start reading. Must be one of either `TRIM_HORIZON` or `LATEST` if getting events from Kinesis or DynamoDB. Must not be provided if getting events from SQS. ## Attributes Reference @@ -53,4 +53,4 @@ Lambda Event Source Mappings can be imported using the `UUID` (event source mapp ``` $ terraform import aws_lambda_event_source_mapping.event_source_mapping 12345kxodurf3443 -``` \ No newline at end of file +``` From 6230a5c3ea13ef056e8c645c37608e0c6c29dd95 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 29 Jun 2018 14:31:42 -0700 Subject: [PATCH 1697/3316] Add event source mapping tests without a starting_position. --- ...esource_aws_lambda_event_source_mapping.go | 31 +- ...ce_aws_lambda_event_source_mapping_test.go | 307 ++++++++++++++++-- 2 files changed, 301 insertions(+), 37 deletions(-) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index 5bb1f58ac29..d9cc71130ba 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -87,11 +87,14 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte log.Printf("[DEBUG] Creating Lambda event source mapping: source %s to function %s", eventSourceArn, functionName) params := &lambda.CreateEventSourceMappingInput{ - EventSourceArn: aws.String(eventSourceArn), - FunctionName: aws.String(functionName), - StartingPosition: aws.String(d.Get("starting_position").(string)), - BatchSize: aws.Int64(int64(d.Get("batch_size").(int))), - Enabled: aws.Bool(d.Get("enabled").(bool)), + EventSourceArn: aws.String(eventSourceArn), + FunctionName: aws.String(functionName), + BatchSize: aws.Int64(int64(d.Get("batch_size").(int))), + Enabled: aws.Bool(d.Get("enabled").(bool)), + } + + if startingPosition := d.Get("starting_position"); startingPosition != "" { + params.StartingPosition = aws.String(startingPosition.(string)) } // IAM profiles and roles can take some time to propagate in AWS: @@ -170,7 +173,19 @@ func resourceAwsLambdaEventSourceMappingDelete(d *schema.ResourceData, meta inte UUID: aws.String(d.Id()), } - _, err := conn.DeleteEventSourceMapping(params) + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteEventSourceMapping(params) + if err != nil { + if awserr, ok := err.(awserr.Error); ok { + if awserr.Code() == "ResourceInUseException" { + return resource.RetryableError(awserr) + } + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { return fmt.Errorf("Error deleting Lambda event source mapping: %s", err) } @@ -196,7 +211,9 @@ func resourceAwsLambdaEventSourceMappingUpdate(d *schema.ResourceData, meta inte _, err := conn.UpdateEventSourceMapping(params) if err != nil { if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "InvalidParameterValueException" { + if awserr.Code() == "InvalidParameterValueException" || + awserr.Code() == "ResourceInUseException" { + return resource.RetryableError(awserr) } } diff --git a/aws/resource_aws_lambda_event_source_mapping_test.go b/aws/resource_aws_lambda_event_source_mapping_test.go index 9823081a115..bf586bbd64b 100644 --- a/aws/resource_aws_lambda_event_source_mapping_test.go +++ b/aws/resource_aws_lambda_event_source_mapping_test.go @@ -33,14 +33,14 @@ func TestAccAWSLambdaEventSourceMapping_basic(t *testing.T) { CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLambdaEventSourceMappingConfig(roleName, policyName, attName, streamName, funcName, uFuncName), + Config: testAccAWSLambdaEventSourceMappingConfig_kinesis(roleName, policyName, attName, streamName, funcName, uFuncName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), testAccCheckAWSLambdaEventSourceMappingAttributes(&conf), ), }, { - Config: testAccAWSLambdaEventSourceMappingConfigUpdate(roleName, policyName, attName, streamName, funcName, uFuncName), + Config: testAccAWSLambdaEventSourceMappingConfigUpdate_kinesis(roleName, policyName, attName, streamName, funcName, uFuncName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), resource.TestCheckResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", @@ -49,6 +49,52 @@ func TestAccAWSLambdaEventSourceMapping_basic(t *testing.T) { "enabled", strconv.FormatBool(false)), resource.TestMatchResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", "function_arn", uFuncArnRe), + resource.TestCheckResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "starting_position", "TRIM_HORIZON"), + ), + }, + }, + }) +} + +func TestAccAWSLambdaEventSourceMapping_sqsBasic(t *testing.T) { + var conf lambda.EventSourceMappingConfiguration + + rString := acctest.RandString(8) + roleName := fmt.Sprintf("tf_acc_role_lambda_sqs_basic_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_sqs_basic_%s", rString) + attName := fmt.Sprintf("tf_acc_att_lambda_sqs_basic_%s", rString) + streamName := fmt.Sprintf("tf_acc_stream_lambda_sqs_basic_%s", rString) + funcName := fmt.Sprintf("tf_acc_lambda_sqs_basic_%s", rString) + uFuncName := fmt.Sprintf("tf_acc_lambda_sqs_basic_updated_%s", rString) + uFuncArnRe := regexp.MustCompile(":" + uFuncName + "$") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLambdaEventSourceMappingConfig_sqs(roleName, policyName, attName, streamName, funcName, uFuncName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), + testAccCheckAWSLambdaEventSourceMappingAttributes(&conf), + resource.TestCheckNoResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "starting_position"), + ), + }, + { + Config: testAccAWSLambdaEventSourceMappingConfigUpdate_sqs(roleName, policyName, attName, streamName, funcName, uFuncName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), + resource.TestCheckResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "batch_size", strconv.Itoa(5)), + resource.TestCheckResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "enabled", strconv.FormatBool(false)), + resource.TestMatchResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "function_arn", uFuncArnRe), + resource.TestCheckNoResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "starting_position"), ), }, }, @@ -72,7 +118,7 @@ func TestAccAWSLambdaEventSourceMapping_importBasic(t *testing.T) { CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLambdaEventSourceMappingConfig(roleName, policyName, attName, streamName, funcName, uFuncName), + Config: testAccAWSLambdaEventSourceMappingConfig_kinesis(roleName, policyName, attName, streamName, funcName, uFuncName), }, { @@ -102,7 +148,35 @@ func TestAccAWSLambdaEventSourceMapping_disappears(t *testing.T) { CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSLambdaEventSourceMappingConfig(roleName, policyName, attName, streamName, funcName, uFuncName), + Config: testAccAWSLambdaEventSourceMappingConfig_kinesis(roleName, policyName, attName, streamName, funcName, uFuncName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), + testAccCheckAWSLambdaEventSourceMappingDisappears(&conf), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func TestAccAWSLambdaEventSourceMapping_sqsDisappears(t *testing.T) { + var conf lambda.EventSourceMappingConfiguration + + rString := acctest.RandString(8) + roleName := fmt.Sprintf("tf_acc_role_lambda_sqs_import_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_sqs_import_%s", rString) + attName := fmt.Sprintf("tf_acc_att_lambda_sqs_import_%s", rString) + streamName := fmt.Sprintf("tf_acc_stream_lambda_sqs_import_%s", rString) + funcName := fmt.Sprintf("tf_acc_lambda_sqs_import_%s", rString) + uFuncName := fmt.Sprintf("tf_acc_lambda_sqs_import_updated_%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLambdaEventSourceMappingConfig_sqs(roleName, policyName, attName, streamName, funcName, uFuncName), Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), testAccCheckAWSLambdaEventSourceMappingDisappears(&conf), @@ -117,32 +191,49 @@ func testAccCheckAWSLambdaEventSourceMappingDisappears(conf *lambda.EventSourceM return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).lambdaconn - params := &lambda.DeleteEventSourceMappingInput{ - UUID: conf.UUID, - } - - _, err := conn.DeleteEventSourceMapping(params) - if err != nil { + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + params := &lambda.DeleteEventSourceMappingInput{ + UUID: conf.UUID, + } + _, err := conn.DeleteEventSourceMapping(params) if err != nil { - return err + cgw, ok := err.(awserr.Error) + if ok { + if cgw.Code() == "ResourceNotFoundException" { + return nil + } + + if cgw.Code() == "ResourceInUseException" { + return resource.RetryableError(fmt.Errorf( + "Waiting for Lambda Event Source Mapping to delete: %v", conf.UUID)) + } + } + return resource.NonRetryableError( + fmt.Errorf("Error deleting Lambda Event Source Mapping: %s", err)) } + + return nil + }) + + if err != nil { + return err } return resource.Retry(10*time.Minute, func() *resource.RetryError { params := &lambda.GetEventSourceMappingInput{ UUID: conf.UUID, } - _, err := conn.GetEventSourceMapping(params) + _, err = conn.GetEventSourceMapping(params) if err != nil { cgw, ok := err.(awserr.Error) if ok && cgw.Code() == "ResourceNotFoundException" { return nil } return resource.NonRetryableError( - fmt.Errorf("Error retrieving Lambda Event Source Mapping: %s", err)) + fmt.Errorf("Error getting Lambda Event Source Mapping: %s", err)) } return resource.RetryableError(fmt.Errorf( - "Waiting for Lambda Event Source Mapping: %v", conf.UUID)) + "Waiting to get Lambda Event Source Mapping: %v", conf.UUID)) }) } } @@ -209,7 +300,7 @@ func testAccCheckAWSLambdaEventSourceMappingAttributes(mapping *lambda.EventSour } } -func testAccAWSLambdaEventSourceMappingConfig(roleName, policyName, attName, streamName, +func testAccAWSLambdaEventSourceMappingConfig_kinesis(roleName, policyName, attName, streamName, funcName, uFuncName string) string { return fmt.Sprintf(` resource "aws_iam_role" "iam_for_lambda" { @@ -234,7 +325,7 @@ EOF resource "aws_iam_policy" "policy_for_role" { name = "%s" path = "/" - description = "IAM policy for for Lamda event mapping testing" + description = "IAM policy for for Lambda event mapping testing" policy = < Date: Fri, 29 Jun 2018 21:12:29 -0400 Subject: [PATCH 1698/3316] - #4762 -Add support for glue availability zones (required currently) --- aws/resource_aws_glue_connection.go | 9 +++++++++ aws/resource_aws_glue_connection_test.go | 1 + website/docs/r/glue_connection.html.markdown | 2 ++ 3 files changed, 12 insertions(+) diff --git a/aws/resource_aws_glue_connection.go b/aws/resource_aws_glue_connection.go index ee9c02b4056..546f3e9f4a5 100644 --- a/aws/resource_aws_glue_connection.go +++ b/aws/resource_aws_glue_connection.go @@ -62,6 +62,10 @@ func resourceAwsGlueConnection() *schema.Resource { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "availability_zone": { + Type: schema.TypeString, + Optional: true, + }, "security_group_id_list": { Type: schema.TypeList, Optional: true, @@ -249,6 +253,10 @@ func expandGlueConnectionInput(d *schema.ResourceData) *glue.ConnectionInput { func expandGluePhysicalConnectionRequirements(m map[string]interface{}) *glue.PhysicalConnectionRequirements { physicalConnectionRequirements := &glue.PhysicalConnectionRequirements{} + if v, ok := m["availability_zone"]; ok { + physicalConnectionRequirements.AvailabilityZone = aws.String(v.(string)) + } + if v, ok := m["security_group_id_list"]; ok { physicalConnectionRequirements.SecurityGroupIdList = expandStringList(v.([]interface{})) } @@ -266,6 +274,7 @@ func flattenGluePhysicalConnectionRequirements(physicalConnectionRequirements *g } m := map[string]interface{}{ + "availability_zone": aws.StringValue(physicalConnectionRequirements.AvailabilityZone), "security_group_id_list": flattenStringList(physicalConnectionRequirements.SecurityGroupIdList), "subnet_id": aws.StringValue(physicalConnectionRequirements.SubnetId), } diff --git a/aws/resource_aws_glue_connection_test.go b/aws/resource_aws_glue_connection_test.go index 1757c20a829..51a39e72933 100644 --- a/aws/resource_aws_glue_connection_test.go +++ b/aws/resource_aws_glue_connection_test.go @@ -426,6 +426,7 @@ resource "aws_glue_connection" "test" { name = "%[1]s" physical_connection_requirements { + availability_zone = "${aws_availability_zones.available[0].id}" security_group_id_list = ["${aws_security_group.test.id}"] subnet_id = "${aws_subnet.test.0.id}" } diff --git a/website/docs/r/glue_connection.html.markdown b/website/docs/r/glue_connection.html.markdown index 8011a6b8199..888295045ba 100644 --- a/website/docs/r/glue_connection.html.markdown +++ b/website/docs/r/glue_connection.html.markdown @@ -41,6 +41,7 @@ resource "aws_glue_connection" "example" { name = "example" physical_connection_requirements { + availability_zone = "${aws_subnet.example.availability_zone}" security_group_id_list = ["${aws_security_group.example.id}"] subnet_id = "${aws_subnet.example.id}" } @@ -61,6 +62,7 @@ The following arguments are supported: ### physical_connection_requirements +* `availability_zone` - (Optional) The availability zone of the connection. This field is redundant and implied by `subnet_id`, but is currently an api requirement. * `security_group_id_list` - (Optional) The security group ID list used by the connection. * `subnet_id` - (Optional) The subnet ID used by the connection. From c22797ae6bea4148221d29fe4cac1edd1a24719a Mon Sep 17 00:00:00 2001 From: Anton Kuraev Date: Thu, 7 Jun 2018 18:11:53 -0700 Subject: [PATCH 1699/3316] Add test --- aws/resource_aws_security_group.go | 111 +++++++-- aws/resource_aws_security_group_test.go | 314 ++++++++++++++++++++++++ 2 files changed, 398 insertions(+), 27 deletions(-) diff --git a/aws/resource_aws_security_group.go b/aws/resource_aws_security_group.go index 012456782fd..09fe4a7ca26 100644 --- a/aws/resource_aws_security_group.go +++ b/aws/resource_aws_security_group.go @@ -688,14 +688,14 @@ func resourceAwsSecurityGroupUpdateRules( n = new(schema.Set) } - os := expandRules(o.(*schema.Set)) - ns := expandRules(n.(*schema.Set)) + os := resourceAwsSecurityGroupExpandRules(o.(*schema.Set)) + ns := resourceAwsSecurityGroupExpandRules(n.(*schema.Set)) - remove, err := expandIPPerms(group, collapseRules(ruleset, os.Difference(ns).List())) + remove, err := expandIPPerms(group, resourceAwsSecurityGroupCollapseRules(ruleset, os.Difference(ns).List())) if err != nil { return err } - add, err := expandIPPerms(group, collapseRules(ruleset, ns.Difference(os).List())) + add, err := expandIPPerms(group, resourceAwsSecurityGroupCollapseRules(ruleset, ns.Difference(os).List())) if err != nil { return err } @@ -1143,7 +1143,34 @@ func matchRules(rType string, local []interface{}, remote []map[string]interface return saves } -func collapseRules(ruleset string, rules []interface{}) []interface{} { +// Duplicate ingress/egress block structure and fill out all +// the required fields +func resourceAwsSecurityGroupCopyRule(src map[string]interface{}, self bool, k string, v interface{}) map[string]interface{} { + var keys_to_copy = []string{"description", "from_port", "to_port", "protocol"} + + dst := make(map[string]interface{}) + for _, key := range keys_to_copy { + if val, ok := src[key]; ok { + dst[key] = val + } + } + if k != "" { + dst[k] = v + } + if _, ok := src["self"]; ok { + dst["self"] = self + } + return dst +} + +// Given a set of SG rules (ingress/egress blocks), this function +// will group the rules by from_port/to_port/protocol/description +// tuples. This is inverse operation of +// resourceAwsSecurityGroupExpandRules() +// +// For more detail, see comments for +// resourceAwsSecurityGroupExpandRules() +func resourceAwsSecurityGroupCollapseRules(ruleset string, rules []interface{}) []interface{} { var keys_to_collapse = []string{"cidr_blocks", "ipv6_cidr_blocks", "prefix_list_ids", "security_groups"} @@ -1185,25 +1212,53 @@ func collapseRules(ruleset string, rules []interface{}) []interface{} { return values } -func copyRule(src map[string]interface{}, self bool, k string, v interface{}) map[string]interface{} { - var keys_to_copy = []string{"description", "from_port", "to_port", "protocol"} - - dst := make(map[string]interface{}) - for _, key := range keys_to_copy { - if val, ok := src[key]; ok { - dst[key] = val - } - } - if k != "" { - dst[k] = v - } - if _, ok := src["self"]; ok { - dst["self"] = self - } - return dst -} - -func expandRules(rules *schema.Set) *schema.Set { +// resourceAwsSecurityGroupExpandRules works in pair with +// resourceAwsSecurityGroupCollapseRules and is used as a +// workaround for the problem explained in +// https://github.com/terraform-providers/terraform-provider-aws/pull/4726 +// +// This function converts every ingress/egress block that +// contains multiple rules to multiple blocks with only one +// rule. Doing a Difference operation on such a normalized +// set helps to avoid unnecessary removal of unchanged +// rules during the Apply step. +// +// For example, in terraform syntax, the following block: +// +// ingress { +// from_port = 80 +// to_port = 80 +// protocol = "tcp" +// cidr_blocks = [ +// "192.168.0.1/32", +// "192.168.0.2/32", +// ] +// } +// +// will be converted to the two blocks below: +// +// ingress { +// from_port = 80 +// to_port = 80 +// protocol = "tcp" +// cidr_blocks = [ "192.168.0.1/32" ] +// } +// +// ingress { +// from_port = 80 +// to_port = 80 +// protocol = "tcp" +// cidr_blocks = [ "192.168.0.2/32" ] +// } +// +// Then the Difference operation is executed on the new set +// to find which rules got modified, and the resulting set +// is then passed to resourceAwsSecurityGroupCollapseRules +// to convert the "diff" back to a more compact form for +// execution. Such compact form helps reduce the number of +// API calls. +// +func resourceAwsSecurityGroupExpandRules(rules *schema.Set) *schema.Set { var keys_to_expand = []string{"cidr_blocks", "ipv6_cidr_blocks", "prefix_list_ids", "security_groups"} normalized := schema.NewSet(resourceAwsSecurityGroupRuleHash, nil) @@ -1212,7 +1267,7 @@ func expandRules(rules *schema.Set) *schema.Set { rule := rawRule.(map[string]interface{}) if v, ok := rule["self"]; ok && v.(bool) { - new_rule := copyRule(rule, true, "", nil) + new_rule := resourceAwsSecurityGroupCopyRule(rule, true, "", nil) normalized.Add(new_rule) } for _, key := range keys_to_expand { @@ -1229,11 +1284,11 @@ func expandRules(rules *schema.Set) *schema.Set { if key == "security_groups" { new_v := schema.NewSet(schema.HashString, nil) new_v.Add(v) - new_rule = copyRule(rule, false, key, new_v) + new_rule = resourceAwsSecurityGroupCopyRule(rule, false, key, new_v) } else { new_v := make([]interface{}, 0) new_v = append(new_v, v) - new_rule = copyRule(rule, false, key, new_v) + new_rule = resourceAwsSecurityGroupCopyRule(rule, false, key, new_v) } normalized.Add(new_rule) } @@ -1244,6 +1299,8 @@ func expandRules(rules *schema.Set) *schema.Set { return normalized } +// Convert type-to_port-from_port-protocol-description tuple +// to a hash to use as a key in Set. func idCollapseHash(rType, protocol string, toPort, fromPort int64, description string) string { var buf bytes.Buffer buf.WriteString(fmt.Sprintf("%s-", rType)) diff --git a/aws/resource_aws_security_group_test.go b/aws/resource_aws_security_group_test.go index e52c501a6cf..97825f8cfc8 100644 --- a/aws/resource_aws_security_group_test.go +++ b/aws/resource_aws_security_group_test.go @@ -216,6 +216,212 @@ func TestProtocolForValue(t *testing.T) { } } +func calcSecurityGroupChecksum(rules []interface{}) int { + var sum int = 0 + for _, rule := range rules { + sum += resourceAwsSecurityGroupRuleHash(rule) + } + return sum +} + +func TestResourceAwsSecurityGroupExpandCollapseRules(t *testing.T) { + expected_compact_list := []interface{}{ + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with description", + "self": true, + "cidr_blocks": []interface{}{ + "10.0.0.1/32", + "10.0.0.2/32", + "10.0.0.3/32", + }, + }, + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with another description", + "self": false, + "cidr_blocks": []interface{}{ + "192.168.0.1/32", + "192.168.0.2/32", + }, + }, + map[string]interface{}{ + "protocol": "-1", + "from_port": int(8000), + "to_port": int(8080), + "description": "", + "self": false, + "ipv6_cidr_blocks": []interface{}{ + "fd00::1/128", + "fd00::2/128", + }, + "security_groups": schema.NewSet(schema.HashString, []interface{}{ + "sg-11111", + "sg-22222", + "sg-33333", + }), + }, + map[string]interface{}{ + "protocol": "udp", + "from_port": int(10000), + "to_port": int(10000), + "description": "", + "self": false, + "prefix_list_ids": []interface{}{ + "pl-111111", + "pl-222222", + }, + }, + } + + expected_expanded_list := []interface{}{ + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with description", + "self": true, + }, + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with description", + "self": false, + "cidr_blocks": []interface{}{ + "10.0.0.1/32", + }, + }, + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with description", + "self": false, + "cidr_blocks": []interface{}{ + "10.0.0.2/32", + }, + }, + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with description", + "self": false, + "cidr_blocks": []interface{}{ + "10.0.0.3/32", + }, + }, + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with another description", + "self": false, + "cidr_blocks": []interface{}{ + "192.168.0.1/32", + }, + }, + map[string]interface{}{ + "protocol": "tcp", + "from_port": int(443), + "to_port": int(443), + "description": "block with another description", + "self": false, + "cidr_blocks": []interface{}{ + "192.168.0.2/32", + }, + }, + map[string]interface{}{ + "protocol": "-1", + "from_port": int(8000), + "to_port": int(8080), + "description": "", + "self": false, + "ipv6_cidr_blocks": []interface{}{ + "fd00::1/128", + }, + }, + map[string]interface{}{ + "protocol": "-1", + "from_port": int(8000), + "to_port": int(8080), + "description": "", + "self": false, + "ipv6_cidr_blocks": []interface{}{ + "fd00::2/128", + }, + }, + map[string]interface{}{ + "protocol": "-1", + "from_port": int(8000), + "to_port": int(8080), + "description": "", + "self": false, + "security_groups": schema.NewSet(schema.HashString, []interface{}{ + "sg-11111", + }), + }, + map[string]interface{}{ + "protocol": "-1", + "from_port": int(8000), + "to_port": int(8080), + "description": "", + "self": false, + "security_groups": schema.NewSet(schema.HashString, []interface{}{ + "sg-22222", + }), + }, + map[string]interface{}{ + "protocol": "-1", + "from_port": int(8000), + "to_port": int(8080), + "description": "", + "self": false, + "security_groups": schema.NewSet(schema.HashString, []interface{}{ + "sg-33333", + }), + }, + map[string]interface{}{ + "protocol": "udp", + "from_port": int(10000), + "to_port": int(10000), + "description": "", + "self": false, + "prefix_list_ids": []interface{}{ + "pl-111111", + }, + }, + map[string]interface{}{ + "protocol": "udp", + "from_port": int(10000), + "to_port": int(10000), + "description": "", + "self": false, + "prefix_list_ids": []interface{}{ + "pl-222222", + }, + }, + } + + expected_compact_set := schema.NewSet(resourceAwsSecurityGroupRuleHash, expected_compact_list) + actual_expanded_list := resourceAwsSecurityGroupExpandRules(expected_compact_set).List() + + if calcSecurityGroupChecksum(expected_expanded_list) != calcSecurityGroupChecksum(actual_expanded_list) { + t.Fatalf("error matching expanded set for resourceAwsSecurityGroupExpandRules()") + } + + actual_collapsed_list := resourceAwsSecurityGroupCollapseRules("ingress", expected_expanded_list) + + if calcSecurityGroupChecksum(expected_compact_list) != calcSecurityGroupChecksum(actual_collapsed_list) { + t.Fatalf("error matching collapsed set for resourceAwsSecurityGroupCollapseRules()") + } +} + func TestResourceAwsSecurityGroupIPPermGather(t *testing.T) { raw := []*ec2.IpPermission{ { @@ -1957,6 +2163,35 @@ func TestAccAWSSecurityGroup_ruleLimitExceededAllNew(t *testing.T) { }) } +func TestAccAWSSecurityGroup_rulesDropOnError(t *testing.T) { + var group ec2.SecurityGroup + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSSecurityGroupDestroy, + Steps: []resource.TestStep{ + // Create a valid security group with some rules and make sure it exists + { + Config: testAccAWSSecurityGroupConfig_rulesDropOnError_Init, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSSecurityGroupExists("aws_security_group.test", &group), + ), + }, + // Add a bad rule to trigger API error + { + Config: testAccAWSSecurityGroupConfig_rulesDropOnError_AddBadRule, + ExpectError: regexp.MustCompile("InvalidGroupId.Malformed"), + }, + // All originally added rules must survive. This will return non-empty plan if anything changed. + { + Config: testAccAWSSecurityGroupConfig_rulesDropOnError_Init, + PlanOnly: true, + }, + }, + }) +} + func testAccCheckAWSSecurityGroupRuleCount(group *ec2.SecurityGroup, expectedIngressCount, expectedEgressCount int) resource.TestCheckFunc { return func(s *terraform.State) error { id := *group.GroupId @@ -3300,3 +3535,82 @@ resource "aws_security_group" "test" { } `, sgName) } + +const testAccAWSSecurityGroupConfig_rulesDropOnError_Init = ` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-security-group-drop-rules-test" + } +} + +resource "aws_security_group" "test_ref0" { + name = "terraform_acceptance_test_drop_rules_ref0" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_security_group" "test_ref1" { + name = "terraform_acceptance_test_drop_rules_ref1" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_security_group" "test" { + name = "terraform_acceptance_test_drop_rules" + description = "Used in the terraform acceptance tests" + vpc_id = "${aws_vpc.test.id}" + + tags { + Name = "tf-acc-test" + } + + ingress { + protocol = "tcp" + from_port = "80" + to_port = "80" + security_groups = [ + "${aws_security_group.test_ref0.id}", + "${aws_security_group.test_ref1.id}", + ] + } +} +` + +const testAccAWSSecurityGroupConfig_rulesDropOnError_AddBadRule = ` +resource "aws_vpc" "test" { + cidr_block = "10.1.0.0/16" + tags { + Name = "terraform-testacc-security-group-drop-rules-test" + } +} + +resource "aws_security_group" "test_ref0" { + name = "terraform_acceptance_test_drop_rules_ref0" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_security_group" "test_ref1" { + name = "terraform_acceptance_test_drop_rules_ref1" + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_security_group" "test" { + name = "terraform_acceptance_test_drop_rules" + description = "Used in the terraform acceptance tests" + vpc_id = "${aws_vpc.test.id}" + + tags { + Name = "tf-acc-test" + } + + ingress { + protocol = "tcp" + from_port = "80" + to_port = "80" + security_groups = [ + "${aws_security_group.test_ref0.id}", + "${aws_security_group.test_ref1.id}", + "sg-malformed", # non-existent rule to trigger API error + ] + } +} +` From 65e4c7d2039fb02b47765d6c8a9a8b5497d50e85 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sun, 1 Jul 2018 21:07:20 +0400 Subject: [PATCH 1700/3316] remove invalid parameters --- aws/provider.go | 1 + aws/resource_aws_neptune_cluster.go | 47 ----------------------------- 2 files changed, 1 insertion(+), 47 deletions(-) diff --git a/aws/provider.go b/aws/provider.go index 380e2f75207..d4f4cb616b4 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -642,6 +642,7 @@ func Provider() terraform.ResourceProvider { "aws_batch_job_queue": resourceAwsBatchJobQueue(), "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_neptune_cluster": resourceAwsNeptuneCluster(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index 57e2e0e2a7a..55831fa0e1e 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -74,13 +74,6 @@ func resourceAwsNeptuneCluster() *schema.Resource { Set: schema.HashString, }, - "database_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "neptune_subnet_group_name": { Type: schema.TypeString, Optional: true, @@ -156,19 +149,6 @@ func resourceAwsNeptuneCluster() *schema.Resource { Default: false, }, - "master_username": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - }, - - "master_password": { - Type: schema.TypeString, - Optional: true, - Sensitive: true, - }, - "snapshot_identifier": { Type: schema.TypeString, Computed: false, @@ -291,10 +271,6 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e opts.DBSubnetGroupName = aws.String(attr.(string)) } - if attr, ok := d.GetOk("database_name"); ok { - opts.DatabaseName = aws.String(attr.(string)) - } - if attr, ok := d.GetOk("port"); ok { opts.Port = aws.Int64(int64(attr.(int))) } @@ -428,27 +404,14 @@ func resourceAwsNeptuneClusterCreate(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG]: Neptune Cluster create response: %s", resp) } else { - if _, ok := d.GetOk("master_password"); !ok { - return fmt.Errorf(`provider.aws: aws_neptune_cluster: %s: "master_password": required field is not set`, d.Get("database_name").(string)) - } - - if _, ok := d.GetOk("master_username"); !ok { - return fmt.Errorf(`provider.aws: aws_neptune_cluster: %s: "master_username": required field is not set`, d.Get("database_name").(string)) - } createOpts := &neptune.CreateDBClusterInput{ DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), Engine: aws.String(d.Get("engine").(string)), - MasterUserPassword: aws.String(d.Get("master_password").(string)), - MasterUsername: aws.String(d.Get("master_username").(string)), StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), Tags: tags, } - if v := d.Get("database_name"); v.(string) != "" { - createOpts.DatabaseName = aws.String(v.(string)) - } - if attr, ok := d.GetOk("port"); ok { createOpts.Port = aws.Int64(int64(attr.(int))) } @@ -588,10 +551,6 @@ func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, return fmt.Errorf("[DEBUG] Error saving AvailabilityZones to state for Neptune Cluster (%s): %s", d.Id(), err) } - if dbc.DatabaseName != nil { - d.Set("database_name", dbc.DatabaseName) - } - d.Set("cluster_identifier", dbc.DBClusterIdentifier) d.Set("cluster_resource_id", dbc.DbClusterResourceId) d.Set("neptune_subnet_group_name", dbc.DBSubnetGroup) @@ -599,7 +558,6 @@ func flattenAwsNeptuneClusterResource(d *schema.ResourceData, meta interface{}, d.Set("endpoint", dbc.Endpoint) d.Set("engine", dbc.Engine) d.Set("engine_version", dbc.EngineVersion) - d.Set("master_username", dbc.MasterUsername) d.Set("port", dbc.Port) d.Set("storage_encrypted", dbc.StorageEncrypted) d.Set("backup_retention_period", dbc.BackupRetentionPeriod) @@ -655,11 +613,6 @@ func resourceAwsNeptuneClusterUpdate(d *schema.ResourceData, meta interface{}) e DBClusterIdentifier: aws.String(d.Id()), } - if d.HasChange("master_password") { - req.MasterUserPassword = aws.String(d.Get("master_password").(string)) - requestUpdate = true - } - if d.HasChange("vpc_security_group_ids") { if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { req.VpcSecurityGroupIds = expandStringList(attr.List()) From cd6f391e6dfa8e551c7d1b58a8e8bb06557ae7a7 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sun, 1 Jul 2018 22:26:29 +0400 Subject: [PATCH 1701/3316] Fix update func pending state variable --- aws/resource_aws_neptune_cluster.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aws/resource_aws_neptune_cluster.go b/aws/resource_aws_neptune_cluster.go index 55831fa0e1e..9436102f270 100644 --- a/aws/resource_aws_neptune_cluster.go +++ b/aws/resource_aws_neptune_cluster.go @@ -848,13 +848,12 @@ var resourceAwsNeptuneClusterCreatePendingStates = []string{ "modifying", "preparing-data-migration", "migrating", - "resetting-master-credentials", } var resourceAwsNeptuneClusterUpdatePendingStates = []string{ "backing-up", "modifying", - "resetting-master-credentials", + "configuring-iam-database-auth", } var resourceAwsNeptuneClusterDeletePendingStates = []string{ From aa7d4bb33467033ccca23f7b270ebd9c914799ea Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sun, 1 Jul 2018 23:36:05 +0400 Subject: [PATCH 1702/3316] add basic acceptance test --- aws/resource_aws_neptune_cluster_test.go | 246 +++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 aws/resource_aws_neptune_cluster_test.go diff --git a/aws/resource_aws_neptune_cluster_test.go b/aws/resource_aws_neptune_cluster_test.go new file mode 100644 index 00000000000..5b5a46a43b8 --- /dev/null +++ b/aws/resource_aws_neptune_cluster_test.go @@ -0,0 +1,246 @@ +package aws + +import ( + //"errors" + "fmt" + "log" + "regexp" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/terraform" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/neptune" +) + +func TestAccAWSNeptuneCluster_basic(t *testing.T) { + var dbCluster neptune.DBCluster + rInt := acctest.RandInt() + resourceName := "aws_neptune_cluster.default" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists(resourceName, &dbCluster), + resource.TestCheckResourceAttr(resourceName, "storage_encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "neptune_cluster_parameter_group_name", "default.neptune1"), + resource.TestCheckResourceAttrSet(resourceName, "reader_endpoint"), + resource.TestCheckResourceAttrSet(resourceName, "cluster_resource_id"), + resource.TestCheckResourceAttr(resourceName, "engine", "neptune"), + resource.TestCheckResourceAttrSet(resourceName, "engine_version"), + resource.TestCheckResourceAttrSet(resourceName, "hosted_zone_id"), + ), + }, + }, + }) +} + +func TestAccAWSNeptuneCluster_namePrefix(t *testing.T) { + var v neptune.DBCluster + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfig_namePrefix(), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.test", &v), + resource.TestMatchResourceAttr( + "aws_neptune_cluster.test", "cluster_identifier", regexp.MustCompile("^tf-test-")), + ), + }, + }, + }) +} + +func TestAccAWSNeptuneCluster_takeFinalSnapshot(t *testing.T) { + var v neptune.DBCluster + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterSnapshot(rInt), + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfigWithFinalSnapshot(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + ), + }, + }, + }) +} + +func testAccCheckAWSNeptuneClusterDestroy(s *terraform.State) error { + return testAccCheckAWSNeptuneClusterDestroyWithProvider(s, testAccProvider) +} + +func testAccCheckAWSNeptuneClusterDestroyWithProvider(s *terraform.State, provider *schema.Provider) error { + conn := provider.Meta().(*AWSClient).neptuneconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_neptune_cluster" { + continue + } + + // Try to find the Group + var err error + resp, err := conn.DescribeDBClusters( + &neptune.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(rs.Primary.ID), + }) + + if err == nil { + if len(resp.DBClusters) != 0 && + aws.StringValue(resp.DBClusters[0].DBClusterIdentifier) == rs.Primary.ID { + return fmt.Errorf("Neptune Cluster %s still exists", rs.Primary.ID) + } + } + + // Return nil if the cluster is already destroyed + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + return nil + } + } + + return err + } + + return nil +} + +func testAccCheckAWSNeptuneClusterExists(n string, v *neptune.DBCluster) resource.TestCheckFunc { + return testAccCheckAWSNeptuneClusterExistsWithProvider(n, v, func() *schema.Provider { return testAccProvider }) +} + +func testAccCheckAWSNeptuneClusterExistsWithProvider(n string, v *neptune.DBCluster, providerF func() *schema.Provider) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Neptune Instance ID is set") + } + + provider := providerF() + conn := provider.Meta().(*AWSClient).neptuneconn + resp, err := conn.DescribeDBClusters(&neptune.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + for _, c := range resp.DBClusters { + if *c.DBClusterIdentifier == rs.Primary.ID { + *v = *c + return nil + } + } + + return fmt.Errorf("Neptune Cluster (%s) not found", rs.Primary.ID) + } +} + +func testAccCheckAWSNeptuneClusterSnapshot(rInt int) resource.TestCheckFunc { + return func(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_neptune_cluster" { + continue + } + + // Try and delete the snapshot before we check for the cluster not found + snapshot_identifier := fmt.Sprintf("tf-acctest-neptunecluster-snapshot-%d", rInt) + + awsClient := testAccProvider.Meta().(*AWSClient) + conn := awsClient.neptuneconn + + log.Printf("[INFO] Deleting the Snapshot %s", snapshot_identifier) + _, snapDeleteErr := conn.DeleteDBClusterSnapshot( + &neptune.DeleteDBClusterSnapshotInput{ + DBClusterSnapshotIdentifier: aws.String(snapshot_identifier), + }) + if snapDeleteErr != nil { + return snapDeleteErr + } + + // Try to find the Group + var err error + resp, err := conn.DescribeDBClusters( + &neptune.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(rs.Primary.ID), + }) + + if err == nil { + if len(resp.DBClusters) != 0 && + aws.StringValue(resp.DBClusters[0].DBClusterIdentifier) == rs.Primary.ID { + return fmt.Errorf("Neptune Cluster %s still exists", rs.Primary.ID) + } + } + + // Return nil if the cluster is already destroyed + if err != nil { + if isAWSErr(err, neptune.ErrCodeDBClusterNotFoundFault, "") { + return nil + } + } + + return err + } + + return nil + } +} + +func testAccAWSNeptuneClusterConfig(n int) string { + return fmt.Sprintf(` +resource "aws_neptune_cluster" "default" { + cluster_identifier = "tf-neptune-cluster-%d" + availability_zones = ["us-west-2a","us-west-2b","us-west-2c"] + engine = "neptune" + neptune_cluster_parameter_group_name = "default.neptune1" + skip_final_snapshot = true + tags { + Environment = "production" + } +}`, n) +} + +func testAccAWSNeptuneClusterConfig_namePrefix() string { + return fmt.Sprintf(` +resource "aws_neptune_cluster" "test" { + cluster_identifier_prefix = "tf-test-" + engine = "neptune" + neptune_cluster_parameter_group_name = "default.neptune1" + skip_final_snapshot = true +} +`) +} + +func testAccAWSNeptuneClusterConfigWithFinalSnapshot(n int) string { + return fmt.Sprintf(` +resource "aws_neptune_cluster" "default" { + cluster_identifier = "tf-neptune-cluster-%d" + availability_zones = ["us-west-2a","us-west-2b","us-west-2c"] + neptune_cluster_parameter_group_name = "default.neptune1" + final_snapshot_identifier = "tf-acctest-neptunecluster-snapshot-%d" + tags { + Environment = "production" + } +}`, n, n) +} From e595f053d1555bc11c02407b3000c3507410aaca Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 2 Jul 2018 02:44:41 -0700 Subject: [PATCH 1703/3316] Remove the batch size default. It no longer applies as the sqs mapping default is 10. --- aws/resource_aws_lambda_event_source_mapping.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index d9cc71130ba..e62e9d24b0d 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -41,7 +41,6 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { "batch_size": { Type: schema.TypeInt, Optional: true, - Default: 100, }, "enabled": { Type: schema.TypeBool, @@ -89,11 +88,14 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte params := &lambda.CreateEventSourceMappingInput{ EventSourceArn: aws.String(eventSourceArn), FunctionName: aws.String(functionName), - BatchSize: aws.Int64(int64(d.Get("batch_size").(int))), Enabled: aws.Bool(d.Get("enabled").(bool)), } - if startingPosition := d.Get("starting_position"); startingPosition != "" { + if batchSize, ok := d.GetOk("batch_size"); ok { + params.BatchSize = aws.Int64(int64(batchSize.(int))) + } + + if startingPosition, ok := d.GetOk("starting_position"); ok { params.StartingPosition = aws.String(startingPosition.(string)) } From 79eb7fd7e4e3f3a76833ddb78aa6273e91f8f3c7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 2 Jul 2018 08:33:59 -0400 Subject: [PATCH 1704/3316] resource/aws_lambda_alias: Consolidate update function to also use expandLambdaAliasRoutingConfiguration and remove readAdditionalVersionWeights --- aws/resource_aws_lambda_alias.go | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index 09d2416a4e9..b60eb99c0ed 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -1,7 +1,6 @@ package aws import ( - "errors" "fmt" "log" "strings" @@ -74,10 +73,7 @@ func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) erro FunctionName: aws.String(functionName), FunctionVersion: aws.String(d.Get("function_version").(string)), Name: aws.String(aliasName), - } - - if v, ok := d.GetOk("routing_config"); ok { - params.RoutingConfig = expandLambdaAliasRoutingConfiguration(v.([]interface{})) + RoutingConfig: expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})), } aliasConfiguration, err := conn.CreateAlias(params) @@ -157,20 +153,7 @@ func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) erro FunctionName: aws.String(d.Get("function_name").(string)), FunctionVersion: aws.String(d.Get("function_version").(string)), Name: aws.String(d.Get("name").(string)), - RoutingConfig: &lambda.AliasRoutingConfiguration{}, - } - - if v, ok := d.GetOk("routing_config"); ok { - routingConfigs := v.([]interface{}) - routingConfig, ok := routingConfigs[0].(map[string]interface{}) - if !ok { - return errors.New("At least one field is expected inside routing_config") - } - - if additionalVersionWeights, ok := routingConfig["additional_version_weights"]; ok { - weights := readAdditionalVersionWeights(additionalVersionWeights.(map[string]interface{})) - params.RoutingConfig.AdditionalVersionWeights = aws.Float64Map(weights) - } + RoutingConfig: expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})), } _, err := conn.UpdateAlias(params) @@ -196,12 +179,3 @@ func expandLambdaAliasRoutingConfiguration(l []interface{}) *lambda.AliasRouting return aliasRoutingConfiguration } - -func readAdditionalVersionWeights(avw map[string]interface{}) map[string]float64 { - weights := make(map[string]float64) - for k, v := range avw { - weights[k] = v.(float64) - } - - return weights -} From 2860515609842ab2a0afbb6606430e575f642887 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 2 Jul 2018 08:36:22 -0400 Subject: [PATCH 1705/3316] Update CHANGELOG for #3316 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b7d58a93d9..216464b62b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ENHANCEMENTS: * data-source/aws_route_tables: Add `filter` argument [GH-5035] * data-source/aws_subnet_ids: Add `filter` argument [GH-5038] * resource/aws_eip_association: Support resource import [GH-5006] +* resource/aws_lambda_alias: Add `routing_config` argument (support traffic shifting) [GH-3316] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] * resource/aws_spot_fleet_request: Add `fleet_type` argument [GH-5032] * resource/aws_ssm_document: Add `tags` argument (support tagging) [GH-5020] From b335935a8f22492e5db5edd06d776367d386d0e9 Mon Sep 17 00:00:00 2001 From: chroju Date: Mon, 2 Jul 2018 21:54:26 +0900 Subject: [PATCH 1706/3316] docs/resource/aws_wafregional_ipset: Fix typo --- website/docs/r/wafregional_ipset.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/wafregional_ipset.html.markdown b/website/docs/r/wafregional_ipset.html.markdown index d0248e0a3c6..c799da6e3da 100644 --- a/website/docs/r/wafregional_ipset.html.markdown +++ b/website/docs/r/wafregional_ipset.html.markdown @@ -33,7 +33,7 @@ resource "aws_wafregional_ipset" "ipset" { The following arguments are supported: * `name` - (Required) The name or description of the IPSet. -* `ip_set_descriptor` - (Optional) One or more pairs specifying the IP address type (IPV4 or IPV5) and the IP address range (in CIDR notation) from which web requests originate. +* `ip_set_descriptor` - (Optional) One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate. ## Nested Blocks From e2a7ef96e36f9777c4897d4bbb1c48e273fdfa60 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 2 Jul 2018 16:55:00 +0400 Subject: [PATCH 1707/3316] acceptance tests for remaining features --- aws/resource_aws_neptune_cluster_test.go | 466 +++++++++++++++++++++++ 1 file changed, 466 insertions(+) diff --git a/aws/resource_aws_neptune_cluster_test.go b/aws/resource_aws_neptune_cluster_test.go index 5b5a46a43b8..808790c79d1 100644 --- a/aws/resource_aws_neptune_cluster_test.go +++ b/aws/resource_aws_neptune_cluster_test.go @@ -82,6 +82,169 @@ func TestAccAWSNeptuneCluster_takeFinalSnapshot(t *testing.T) { }) } +func TestAccAWSNeptuneCluster_updateTags(t *testing.T) { + var v neptune.DBCluster + ri := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfig(ri), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "tags.%", "1"), + ), + }, + { + Config: testAccAWSNeptuneClusterConfigUpdatedTags(ri), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "tags.%", "2"), + ), + }, + }, + }) +} + +func TestAccAWSNeptuneCluster_updateIamRoles(t *testing.T) { + var v neptune.DBCluster + ri := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfigIncludingIamRoles(ri), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + ), + }, + { + Config: testAccAWSNeptuneClusterConfigAddIamRoles(ri), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "iam_roles.#", "2"), + ), + }, + { + Config: testAccAWSNeptuneClusterConfigRemoveIamRoles(ri), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "iam_roles.#", "1"), + ), + }, + }, + }) +} + +func TestAccAWSNeptuneCluster_kmsKey(t *testing.T) { + var v neptune.DBCluster + keyRegex := regexp.MustCompile("^arn:aws:kms:") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfig_kmsKey(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestMatchResourceAttr( + "aws_neptune_cluster.default", "kms_key_arn", keyRegex), + ), + }, + }, + }) +} + +func TestAccAWSNeptuneCluster_encrypted(t *testing.T) { + var v neptune.DBCluster + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfig_encrypted(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "storage_encrypted", "true"), + ), + }, + }, + }) +} + +func TestAccAWSNeptuneCluster_backupsUpdate(t *testing.T) { + var v neptune.DBCluster + + ri := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfig_backups(ri), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "preferred_backup_window", "07:00-09:00"), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "backup_retention_period", "5"), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "preferred_maintenance_window", "tue:04:00-tue:04:30"), + ), + }, + + resource.TestStep{ + Config: testAccAWSNeptuneClusterConfig_backupsUpdate(ri), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "preferred_backup_window", "03:00-09:00"), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "backup_retention_period", "10"), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "preferred_maintenance_window", "wed:01:00-wed:01:30"), + ), + }, + }, + }) +} + +func TestAccAWSNeptuneCluster_iamAuth(t *testing.T) { + var v neptune.DBCluster + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSNeptuneClusterConfig_iamAuth(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSNeptuneClusterExists("aws_neptune_cluster.default", &v), + resource.TestCheckResourceAttr( + "aws_neptune_cluster.default", "iam_database_authentication_enabled", "true"), + ), + }, + }, + }) +} + func testAccCheckAWSNeptuneClusterDestroy(s *terraform.State) error { return testAccCheckAWSNeptuneClusterDestroyWithProvider(s, testAccProvider) } @@ -244,3 +407,306 @@ resource "aws_neptune_cluster" "default" { } }`, n, n) } + +func testAccAWSNeptuneClusterConfigUpdatedTags(n int) string { + return fmt.Sprintf(` +resource "aws_neptune_cluster" "default" { + cluster_identifier = "tf-neptune-cluster-%d" + availability_zones = ["us-west-2a","us-west-2b","us-west-2c"] + neptune_cluster_parameter_group_name = "default.neptune1" + skip_final_snapshot = true + tags { + Environment = "production" + AnotherTag = "test" + } +}`, n) +} + +func testAccAWSNeptuneClusterConfigIncludingIamRoles(n int) string { + return fmt.Sprintf(` +resource "aws_iam_role" "neptune_sample_role" { + name = "neptune_sample_role_%d" + path = "/" + assume_role_policy = < Date: Mon, 2 Jul 2018 16:15:26 +0100 Subject: [PATCH 1708/3316] re-added tests --- aws/resource_aws_lambda_alias_test.go | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index 683bf0b7317..0fc5b9fa2a3 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -32,6 +32,7 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasRoutingConfigDoesNotExist(&conf), resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), ), @@ -78,6 +79,35 @@ func TestAccAWSLambdaAlias_nameupdate(t *testing.T) { }) } +func TestAccAWSLambdaAlias_routingconfig(t *testing.T) { + var conf lambda.AliasConfiguration + + rString := acctest.RandString(8) + roleName := fmt.Sprintf("tf_acc_role_lambda_alias_basic_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_alias_basic_%s", rString) + attachmentName := fmt.Sprintf("tf_acc_attachment_%s", rString) + funcName := fmt.Sprintf("tf_acc_lambda_func_alias_basic_%s", rString) + aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsLambdaAliasDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsLambdaAliasConfigWithRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasRoutingConfigExists(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), + ), + }, + }, + }) +} + func testAccCheckAwsLambdaAliasDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).lambdaconn From 62945860c1d4e700441f52f5065832d8ad928572 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 2 Jul 2018 19:55:33 +0400 Subject: [PATCH 1709/3316] add documentation for aws_neptune_cluster --- website/aws.erb | 4 + website/docs/r/neptune_cluster.html.markdown | 103 +++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 website/docs/r/neptune_cluster.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 01fba3efc5e..a840dd5ea05 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1677,6 +1677,10 @@ aws_neptune_cluster_parameter_group + > + aws_neptune_cluster + + diff --git a/website/docs/r/neptune_cluster.html.markdown b/website/docs/r/neptune_cluster.html.markdown new file mode 100644 index 00000000000..cc849e209f5 --- /dev/null +++ b/website/docs/r/neptune_cluster.html.markdown @@ -0,0 +1,103 @@ +--- +layout: "aws" +page_title: "AWS: aws_neptune_cluster" +sidebar_current: "docs-aws-resource-neptune-cluster" +description: |- + Provides an Neptune Cluster Resource +--- + +# aws_neptune_cluster + +Provides an Neptune Cluster Resource. A Cluster Resource defines attributes that are +applied to the entire cluster of Neptune Cluster Instances. + +Changes to a Neptune Cluster can occur when you manually change a +parameter, such as `backup_retention_period`, and are reflected in the next maintenance +window. Because of this, Terraform may report a difference in its planning +phase because a modification has not yet taken place. You can use the +`apply_immediately` flag to instruct the service to apply the change immediately +(see documentation below). + +## Example Usage + +```hcl +resource "aws_neptune_cluster" "default" { + cluster_identifier = "neptune-cluster-demo" + engine = "neptune" + backup_retention_period = 5 + preferred_backup_window = "07:00-09:00" + skip_final_snapshot = "true" + iam_database_authentication_enabled = "true" + apply_immediately = "true" +} +``` + +~> **Note:** AWS Neptune does not support user name/password–based access control. +See the AWS [Docs](https://docs.aws.amazon.com/neptune/latest/userguide/limits.html) for more information. + +## Argument Reference + +The following arguments are supported: + +* `cluster_identifier` - (Optional, Forces new resources) The cluster identifier. If omitted, Terraform will assign a random, unique identifier. +* `cluster_identifier_prefix` - (Optional, Forces new resource) Creates a unique cluster identifier beginning with the specified prefix. Conflicts with `cluster_identifer`. +* `final_snapshot_identifier` - (Optional) The name of your final Neptune snapshot + when this Neptune cluster is deleted. If omitted, no final snapshot will be + made. +* `skip_final_snapshot` - (Optional) Determines whether a final Neptune snapshot is created before the Neptune cluster is deleted. If true is specified, no Neptune snapshot is created. If false is specified, a Neptune snapshot is created before the Neptune cluster is deleted, using the value from `final_snapshot_identifier`. Default is `false`. +* `availability_zones` - (Optional) A list of EC2 Availability Zones that + instances in the Neptune cluster can be created in. +* `backup_retention_period` - (Optional) The days to retain backups for. Default `1` +* `preferred_backup_window` - (Optional) The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC +Default: A 30-minute window selected at random from an 8-hour block of time per region. e.g. 04:00-09:00 +* `preferred_maintenance_window` - (Optional) The weekly time range during which system maintenance can occur, in (UTC) e.g. wed:04:00-wed:04:30 +* `port` - (Optional) The port on which the Neptune accepts connections. Default is `8182`. +* `vpc_security_group_ids` - (Optional) List of VPC security groups to associate + with the Cluster +* `snapshot_identifier` - (Optional) Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a Neptune cluster snapshot, or the ARN when specifying a Neptune snapshot. +* `storage_encrypted` - (Optional) Specifies whether the Neptune cluster is encrypted. The default is `false` if not specified. +* `replication_source_identifier` - (Optional) ARN of a source Neptune cluster or Neptune instance if this Neptune cluster is to be created as a Read Replica. +* `apply_immediately` - (Optional) Specifies whether any cluster modifications + are applied immediately, or during the next maintenance window. Default is + `false`. +* `neptune_subnet_group_name` - (Optional) A Neptune subnet group to associate with this Neptune instance. +* `neptune_cluster_parameter_group_name` - (Optional) A cluster parameter group to associate with the cluster. +* `kms_key_arn` - (Optional) The ARN for the KMS encryption key. When specifying `kms_key_arn`, `storage_encrypted` needs to be set to true. +* `iam_roles` - (Optional) A List of ARNs for the IAM roles to associate to the Neptune Cluster. +* `iam_database_authentication_enabled` - (Optional) Specifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. +* `engine` - (Optional) The name of the database engine to be used for this Neptune cluster. Defaults to `neptune`. +* `engine_version` - (Optional) The database engine version. +* `tags` - (Optional) A mapping of tags to assign to the Neptune cluster. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The Neptune Cluster Identifier +* `cluster_identifier` - The Neptune Cluster Identifier +* `cluster_resource_id` - The Neptune Cluster Resource ID +* `cluster_members` – List of Neptune Instances that are a part of this cluster +* `availability_zones` - The availability zone of the instance +* `backup_retention_period` - The backup retention period +* `preferred_backup_window` - The daily time range during which the backups happen +* `preferred_maintenance_window` - The maintenance window +* `endpoint` - The DNS address of the Neptune instance +* `reader_endpoint` - A read-only endpoint for the Neptune cluster, automatically +load-balanced across replicas +* `engine` - The database engine +* `engine_version` - The database engine version +* `port` - The database port +* `status` - The Neptune instance status +* `storage_encrypted` - Specifies whether the Neptune cluster is encrypted +* `replication_source_identifier` - ARN of the source Neptune cluster or Neptune instance if this Neptune cluster is created as a Read Replica. +* `hosted_zone_id` - The Route53 Hosted Zone ID of the endpoint + +## Timeouts + +`aws_neptune_cluster` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `120 minutes`) Used for Cluster creation +- `update` - (Default `120 minutes`) Used for Cluster modifications +- `delete` - (Default `120 minutes`) Used for destroying cluster. This includes +any cleanup task during the destroying process. \ No newline at end of file From 01b83e05184f10f005857bbcc88588bc7278e522 Mon Sep 17 00:00:00 2001 From: John Sandmeyer Date: Mon, 2 Jul 2018 10:15:07 -0600 Subject: [PATCH 1710/3316] Update wafregional_web_acl to support rule groups --- aws/resource_aws_wafregional_web_acl.go | 60 ++++++++++++++++++++----- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_wafregional_web_acl.go b/aws/resource_aws_wafregional_web_acl.go index ff72c1d1ceb..3a57eff5674 100644 --- a/aws/resource_aws_wafregional_web_acl.go +++ b/aws/resource_aws_wafregional_web_acl.go @@ -49,7 +49,20 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { Schema: map[string]*schema.Schema{ "action": &schema.Schema{ Type: schema.TypeList, - Required: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "override_action": &schema.Schema{ + Type: schema.TypeList, + Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -71,6 +84,7 @@ func resourceAwsWafRegionalWebAcl() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ waf.WafRuleTypeRegular, waf.WafRuleTypeRateBased, + waf.WafRuleTypeGroup, }, false), }, "rule_id": &schema.Schema{ @@ -227,11 +241,21 @@ func flattenDefaultActionWR(n *waf.WafAction) []map[string]interface{} { func flattenWafWebAclRules(ts []*waf.ActivatedRule) []interface{} { out := make([]interface{}, len(ts), len(ts)) for i, r := range ts { - actionMap := map[string]interface{}{ - "type": *r.Action.Type, - } m := make(map[string]interface{}) - m["action"] = []interface{}{actionMap} + + switch *r.Type { + case waf.WafRuleTypeGroup: + actionMap := map[string]interface{}{ + "type": *r.OverrideAction.Type, + } + m["override_action"] = []interface{}{actionMap} + default: + actionMap := map[string]interface{}{ + "type": *r.Action.Type, + } + m["action"] = []interface{}{actionMap} + } + m["priority"] = *r.Priority m["rule_id"] = *r.RuleId m["type"] = *r.Type @@ -241,13 +265,27 @@ func flattenWafWebAclRules(ts []*waf.ActivatedRule) []interface{} { } func expandWafWebAclUpdate(updateAction string, aclRule map[string]interface{}) *waf.WebACLUpdate { - ruleAction := aclRule["action"].([]interface{})[0].(map[string]interface{}) + var rule *waf.ActivatedRule + + switch aclRule["type"].(string) { + case waf.WafRuleTypeGroup: + ruleAction := aclRule["override_action"].([]interface{})[0].(map[string]interface{}) - rule := &waf.ActivatedRule{ - Action: &waf.WafAction{Type: aws.String(ruleAction["type"].(string))}, - Priority: aws.Int64(int64(aclRule["priority"].(int))), - RuleId: aws.String(aclRule["rule_id"].(string)), - Type: aws.String(aclRule["type"].(string)), + rule = &waf.ActivatedRule{ + OverrideAction: &waf.WafOverrideAction{Type: aws.String(ruleAction["type"].(string))}, + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + } + default: + ruleAction := aclRule["action"].([]interface{})[0].(map[string]interface{}) + + rule = &waf.ActivatedRule{ + Action: &waf.WafAction{Type: aws.String(ruleAction["type"].(string))}, + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + } } update := &waf.WebACLUpdate{ From 93ca8b8a038ded137d54a3a1527ab70b4a328615 Mon Sep 17 00:00:00 2001 From: John Sandmeyer Date: Mon, 2 Jul 2018 10:15:51 -0600 Subject: [PATCH 1711/3316] Add test for wafregional_web_acl rule group support --- aws/resource_aws_wafregional_web_acl_test.go | 54 ++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/aws/resource_aws_wafregional_web_acl_test.go b/aws/resource_aws_wafregional_web_acl_test.go index 8d9b9cbf34f..afcc568ef70 100644 --- a/aws/resource_aws_wafregional_web_acl_test.go +++ b/aws/resource_aws_wafregional_web_acl_test.go @@ -72,6 +72,35 @@ func TestAccAWSWafRegionalWebAcl_createRateBased(t *testing.T) { }) } +func TestAccAWSWafRegionalWebAcl_createGroup(t *testing.T) { + var v waf.WebACL + wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafRegionalWebAclConfigGroup(wafAclName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafRegionalWebAclExists("aws_wafregional_web_acl.waf_acl", &v), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "default_action.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "default_action.0.type", "ALLOW"), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "name", wafAclName), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "rule.#", "1"), + resource.TestCheckResourceAttr( + "aws_wafregional_web_acl.waf_acl", "metric_name", wafAclName), + ), + }, + }, + }) +} + func TestAccAWSWafRegionalWebAcl_changeNameForceNew(t *testing.T) { var before, after waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) @@ -432,6 +461,31 @@ resource "aws_wafregional_web_acl" "waf_acl" { }`, name, name, name, name) } +func testAccAWSWafRegionalWebAclConfigGroup(name string) string { + return fmt.Sprintf(` + +resource "aws_wafregional_rule_group" "wafrulegroup" { + name = "%s" + metric_name = "%s" +} + +resource "aws_wafregional_web_acl" "waf_acl" { + name = "%s" + metric_name = "%s" + default_action { + type = "ALLOW" + } + rule { + override_action { + type = "NONE" + } + priority = 1 + type = "GROUP" + rule_id = "${aws_wafregional_rule_group.wafrulegroup.id}" # todo + } +}`, name, name, name, name) +} + func testAccAWSWafRegionalWebAclConfig_changeName(name string) string { return fmt.Sprintf(` resource "aws_wafregional_rule" "wafrule" { From 7804ff82b27a5a0949b3ee4ff828e415e99cd1dd Mon Sep 17 00:00:00 2001 From: John Sandmeyer Date: Mon, 2 Jul 2018 10:16:07 -0600 Subject: [PATCH 1712/3316] Add documentation for wafregional_web_acl rule group support --- website/docs/r/wafregional_web_acl.html.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/docs/r/wafregional_web_acl.html.markdown b/website/docs/r/wafregional_web_acl.html.markdown index 723b9988884..de25a59ba27 100644 --- a/website/docs/r/wafregional_web_acl.html.markdown +++ b/website/docs/r/wafregional_web_acl.html.markdown @@ -70,11 +70,12 @@ See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_regional_Acti #### Arguments -* `action` - (Required) The action that CloudFront or AWS WAF takes when a web request matches the conditions in the rule. +* `action` - (Required) The action that CloudFront or AWS WAF takes when a web request matches the conditions in the rule. Not used if `type` is `GROUP`. +* `override_action` - (Required) Override the action that a group requests CloudFront or AWS WAF takes when a web request matches the conditions in the rule. Only used if `type` is `GROUP`. * `priority` - (Required) Specifies the order in which the rules in a WebACL are evaluated. Rules with a lower value are evaluated before rules with a higher value. * `rule_id` - (Required) ID of the associated [rule](/docs/providers/aws/r/wafregional_rule.html) -* `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), or `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. +* `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html), or `GROUP`, as defined by [RuleGroup](https://docs.aws.amazon.com/waf/latest/APIReference/API_RuleGroup.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. ### `default_action` / `action` From 92971fd3c82c0d3127e6869d9414268a10f9a785 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 2 Jul 2018 13:10:14 -0400 Subject: [PATCH 1713/3316] resousrce/aws_codebuild_project: Prevent panic with environment variable difference handling --- aws/resource_aws_codebuild_project.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 2db1752d114..e0ba5134dac 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -835,7 +835,12 @@ func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { for _, e := range environmentVariables { if e != nil { // Old statefiles might have nil values in them ev := e.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s:%s:%s-", ev["name"].(string), ev["type"].(string), ev["value"].(string))) + buf.WriteString(fmt.Sprintf("%s:", ev["name"].(string))) + // type is sometimes not returned by the API + if v, ok := ev["type"]; ok { + buf.WriteString(fmt.Sprintf("%s:", v.(string))) + } + buf.WriteString(fmt.Sprintf("%s-", ev["value"].(string))) } } From 5bc39f3965e542da514b74fe9798f08259edb3ed Mon Sep 17 00:00:00 2001 From: John Sandmeyer Date: Mon, 2 Jul 2018 12:19:09 -0600 Subject: [PATCH 1714/3316] wafregional_web_acl - fix issue causing acceptance test to fail --- aws/resource_aws_wafregional_web_acl_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_wafregional_web_acl_test.go b/aws/resource_aws_wafregional_web_acl_test.go index afcc568ef70..3de2ca4bbbf 100644 --- a/aws/resource_aws_wafregional_web_acl_test.go +++ b/aws/resource_aws_wafregional_web_acl_test.go @@ -295,10 +295,11 @@ func computeWafRegionalWebAclRuleIndex(ruleId **string, priority int, ruleType s "type": actionType, } m := map[string]interface{}{ - "rule_id": **ruleId, - "type": ruleType, - "priority": priority, - "action": []interface{}{actionMap}, + "rule_id": **ruleId, + "type": ruleType, + "priority": priority, + "action": []interface{}{actionMap}, + "override_action": []interface{}{}, } f := schema.HashResource(ruleResource) From 879ea1bed3ff54c48ffbb64bbfd9244bc7b98720 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 2 Jul 2018 14:25:52 -0400 Subject: [PATCH 1715/3316] Update CHANGELOG for #5052 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 216464b62b6..e6d31bcfd6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_codebuild_project: Prevent panic with missing environment variable type [GH-5052] * resource/aws_kms_alias: Fix perpetual plan when `target_key_id` is ARN [GH-4010] ## 1.25.0 (June 27, 2018) From 424624d260f9b4cd03196cb6c4a51e1b799685b6 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 2 Jul 2018 11:53:18 -0700 Subject: [PATCH 1716/3316] use appropriate terraform error helpers. --- aws/resource_aws_lambda_event_source_mapping.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index e62e9d24b0d..f2a491b8921 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -178,10 +178,8 @@ func resourceAwsLambdaEventSourceMappingDelete(d *schema.ResourceData, meta inte err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.DeleteEventSourceMapping(params) if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "ResourceInUseException" { - return resource.RetryableError(awserr) - } + if isAWSErr(err, lambda.ErrCodeResourceInUseException, "") { + return resource.RetryableError(err) } return resource.NonRetryableError(err) } @@ -212,12 +210,10 @@ func resourceAwsLambdaEventSourceMappingUpdate(d *schema.ResourceData, meta inte err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.UpdateEventSourceMapping(params) if err != nil { - if awserr, ok := err.(awserr.Error); ok { - if awserr.Code() == "InvalidParameterValueException" || - awserr.Code() == "ResourceInUseException" { + if isAWSErr(err, lambda.ErrCodeInvalidParameterValueException, "") || + isAWSErr(err, lambda.ErrCodeResourceInUseException, "") { - return resource.RetryableError(awserr) - } + return resource.RetryableError(err) } return resource.NonRetryableError(err) } From ee2848777b6d6eb37850383b2447f4cd277eb698 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 2 Jul 2018 12:06:28 -0700 Subject: [PATCH 1717/3316] Fix test text duplication. --- aws/resource_aws_lambda_event_source_mapping_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_lambda_event_source_mapping_test.go b/aws/resource_aws_lambda_event_source_mapping_test.go index bf586bbd64b..3794187da02 100644 --- a/aws/resource_aws_lambda_event_source_mapping_test.go +++ b/aws/resource_aws_lambda_event_source_mapping_test.go @@ -325,7 +325,7 @@ EOF resource "aws_iam_policy" "policy_for_role" { name = "%s" path = "/" - description = "IAM policy for for Lambda event mapping testing" + description = "IAM policy for Lambda event mapping testing" policy = < Date: Mon, 2 Jul 2018 13:41:35 -0700 Subject: [PATCH 1718/3316] Suppress diffs when batch_size is removed, but keeps the default size. --- ...esource_aws_lambda_event_source_mapping.go | 29 ++++ ...ce_aws_lambda_event_source_mapping_test.go | 139 +++++++++++++++++- 2 files changed, 164 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index f2a491b8921..3917529dea4 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -6,8 +6,12 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/dynamodb" + "github.com/aws/aws-sdk-go/service/kinesis" "github.com/aws/aws-sdk-go/service/lambda" + "github.com/aws/aws-sdk-go/service/sqs" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -41,6 +45,31 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { "batch_size": { Type: schema.TypeInt, Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // When AWS repurposed EventSourceMapping for use with SQS they kept + // the default for BatchSize at 100 for Kinesis and DynamoDB, but made + // the default 10 for SWS. As such, we had to make batch_size optional. + // Because of this, we need to ensure that if someone doesn't have + // batch_size specified that it is not treated as a diff for those + + eventSourceARN, err := arn.Parse(d.Get("event_source_arn").(string)) + if err != nil { + return false + } + switch eventSourceARN.Service { + case dynamodb.ServiceName, kinesis.ServiceName: + if old == "100" && (new == "" || new == "0") { + return true + } + case sqs.ServiceName: + if old == "1" && (new == "" || new == "0") { + return true + } + default: + panic(eventSourceARN.Service) + } + return false + }, }, "enabled": { Type: schema.TypeBool, diff --git a/aws/resource_aws_lambda_event_source_mapping_test.go b/aws/resource_aws_lambda_event_source_mapping_test.go index 3794187da02..9e4452a895a 100644 --- a/aws/resource_aws_lambda_event_source_mapping_test.go +++ b/aws/resource_aws_lambda_event_source_mapping_test.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSLambdaEventSourceMapping_basic(t *testing.T) { +func TestAccAWSLambdaEventSourceMapping_kinesis_basic(t *testing.T) { var conf lambda.EventSourceMappingConfiguration rString := acctest.RandString(8) @@ -57,7 +57,51 @@ func TestAccAWSLambdaEventSourceMapping_basic(t *testing.T) { }) } -func TestAccAWSLambdaEventSourceMapping_sqsBasic(t *testing.T) { +func TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize(t *testing.T) { + // batch_size became optional. Ensure that if the user supplies the default + // value, but then moves to not providing the value, that we don't consider this + // a diff. + + var conf lambda.EventSourceMappingConfiguration + + rString := acctest.RandString(8) + roleName := fmt.Sprintf("tf_acc_role_lambda_esm_basic_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_esm_basic_%s", rString) + attName := fmt.Sprintf("tf_acc_att_lambda_esm_basic_%s", rString) + streamName := fmt.Sprintf("tf_acc_stream_lambda_esm_basic_%s", rString) + funcName := fmt.Sprintf("tf_acc_lambda_esm_basic_%s", rString) + uFuncName := fmt.Sprintf("tf_acc_lambda_esm_basic_updated_%s", rString) + uFuncArnRe := regexp.MustCompile(":" + uFuncName + "$") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLambdaEventSourceMappingConfig_kinesis(roleName, policyName, attName, streamName, funcName, uFuncName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), + testAccCheckAWSLambdaEventSourceMappingAttributes(&conf), + ), + }, + { + Config: testAccAWSLambdaEventSourceMappingConfigUpdate_kinesis_removeBatchSize(roleName, policyName, attName, streamName, funcName, uFuncName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), + resource.TestCheckResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "batch_size", strconv.Itoa(100)), + resource.TestCheckResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "enabled", strconv.FormatBool(true)), + resource.TestCheckResourceAttr("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", + "starting_position", "TRIM_HORIZON"), + ), + }, + }, + }) +} + +func TestAccAWSLambdaEventSourceMapping_sqs_basic(t *testing.T) { var conf lambda.EventSourceMappingConfiguration rString := acctest.RandString(8) @@ -101,7 +145,7 @@ func TestAccAWSLambdaEventSourceMapping_sqsBasic(t *testing.T) { }) } -func TestAccAWSLambdaEventSourceMapping_importBasic(t *testing.T) { +func TestAccAWSLambdaEventSourceMapping_kinesis_import(t *testing.T) { resourceName := "aws_lambda_event_source_mapping.lambda_event_source_mapping_test" rString := acctest.RandString(8) @@ -131,7 +175,7 @@ func TestAccAWSLambdaEventSourceMapping_importBasic(t *testing.T) { }) } -func TestAccAWSLambdaEventSourceMapping_disappears(t *testing.T) { +func TestAccAWSLambdaEventSourceMapping_kinesis_disappears(t *testing.T) { var conf lambda.EventSourceMappingConfiguration rString := acctest.RandString(8) @@ -388,6 +432,93 @@ resource "aws_lambda_event_source_mapping" "lambda_event_source_mapping_test" { }`, roleName, policyName, attName, streamName, funcName, uFuncName) } +func testAccAWSLambdaEventSourceMappingConfigUpdate_kinesis_removeBatchSize(roleName, policyName, attName, streamName, + funcName, uFuncName string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "iam_for_lambda" { + name = "%s" + assume_role_policy = < Date: Mon, 2 Jul 2018 13:54:05 -0700 Subject: [PATCH 1719/3316] Cleanup. --- aws/resource_aws_lambda_event_source_mapping.go | 9 ++++++--- aws/resource_aws_lambda_event_source_mapping_test.go | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index 3917529dea4..8dc51aaecf9 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -48,9 +48,12 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { // When AWS repurposed EventSourceMapping for use with SQS they kept // the default for BatchSize at 100 for Kinesis and DynamoDB, but made - // the default 10 for SWS. As such, we had to make batch_size optional. + // the default 10 for SQS. As such, we had to make batch_size optional. // Because of this, we need to ensure that if someone doesn't have // batch_size specified that it is not treated as a diff for those + if new != "" && new != "0" { + return false + } eventSourceARN, err := arn.Parse(d.Get("event_source_arn").(string)) if err != nil { @@ -58,11 +61,11 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { } switch eventSourceARN.Service { case dynamodb.ServiceName, kinesis.ServiceName: - if old == "100" && (new == "" || new == "0") { + if old == "100" { return true } case sqs.ServiceName: - if old == "1" && (new == "" || new == "0") { + if old == "10" { return true } default: diff --git a/aws/resource_aws_lambda_event_source_mapping_test.go b/aws/resource_aws_lambda_event_source_mapping_test.go index 9e4452a895a..06661465338 100644 --- a/aws/resource_aws_lambda_event_source_mapping_test.go +++ b/aws/resource_aws_lambda_event_source_mapping_test.go @@ -71,7 +71,6 @@ func TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize(t *testing.T) { streamName := fmt.Sprintf("tf_acc_stream_lambda_esm_basic_%s", rString) funcName := fmt.Sprintf("tf_acc_lambda_esm_basic_%s", rString) uFuncName := fmt.Sprintf("tf_acc_lambda_esm_basic_updated_%s", rString) - uFuncArnRe := regexp.MustCompile(":" + uFuncName + "$") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, From 33f00e5fca6e874468ede05d27f1bb91b6cfd709 Mon Sep 17 00:00:00 2001 From: eggsbenjamin Date: Mon, 2 Jul 2018 23:28:05 +0100 Subject: [PATCH 1720/3316] re-added old acceptance tests --- aws/resource_aws_lambda_alias.go | 4 ++-- aws/resource_aws_lambda_alias_test.go | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_lambda_alias.go b/aws/resource_aws_lambda_alias.go index 09d2416a4e9..110ea8cf4ea 100644 --- a/aws/resource_aws_lambda_alias.go +++ b/aws/resource_aws_lambda_alias.go @@ -190,8 +190,8 @@ func expandLambdaAliasRoutingConfiguration(l []interface{}) *lambda.AliasRouting m := l[0].(map[string]interface{}) - if _, ok := m["additional_version_weights"]; ok { - aliasRoutingConfiguration.AdditionalVersionWeights = expandFloat64Map(m) + if v, ok := m["additional_version_weights"]; ok { + aliasRoutingConfiguration.AdditionalVersionWeights = expandFloat64Map(v.(map[string]interface{})) } return aliasRoutingConfiguration diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index 0fc5b9fa2a3..6a6113700d4 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -94,6 +94,15 @@ func TestAccAWSLambdaAlias_routingconfig(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAwsLambdaAliasDestroy, Steps: []resource.TestStep{ + { + Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), + ), + }, { Config: testAccAwsLambdaAliasConfigWithRoutingConfig(roleName, policyName, attachmentName, funcName, aliasName), Check: resource.ComposeTestCheckFunc( @@ -104,6 +113,16 @@ func TestAccAWSLambdaAlias_routingconfig(t *testing.T) { regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), ), }, + { + Config: testAccAwsLambdaAliasConfig(roleName, policyName, attachmentName, funcName, aliasName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaAliasExists("aws_lambda_alias.lambda_alias_test", &conf), + testAccCheckAwsLambdaAttributes(&conf), + testAccCheckAwsLambdaAliasRoutingConfigDoesNotExist(&conf), + resource.TestMatchResourceAttr("aws_lambda_alias.lambda_alias_test", "arn", + regexp.MustCompile(`^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]+:\d{12}:function:`+funcName+`:`+aliasName+`$`)), + ), + }, }, }) } From fff24f7a1fa0c6b167e6a614c63b95f6979e1d38 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Mon, 2 Jul 2018 18:54:33 -0400 Subject: [PATCH 1721/3316] Implement aws pricing data source --- aws/data_source_aws_pricing_product.go | 110 + aws/provider.go | 1 + vendor/github.com/tidwall/gjson/LICENSE | 20 + vendor/github.com/tidwall/gjson/README.md | 401 ++++ vendor/github.com/tidwall/gjson/gjson.go | 2087 +++++++++++++++++ vendor/github.com/tidwall/gjson/gjson_gae.go | 10 + vendor/github.com/tidwall/gjson/gjson_ngae.go | 73 + vendor/github.com/tidwall/gjson/logo.png | Bin 0 -> 15936 bytes vendor/github.com/tidwall/match/LICENSE | 20 + vendor/github.com/tidwall/match/README.md | 32 + vendor/github.com/tidwall/match/match.go | 192 ++ vendor/vendor.json | 14 + 12 files changed, 2960 insertions(+) create mode 100644 aws/data_source_aws_pricing_product.go create mode 100644 vendor/github.com/tidwall/gjson/LICENSE create mode 100644 vendor/github.com/tidwall/gjson/README.md create mode 100644 vendor/github.com/tidwall/gjson/gjson.go create mode 100644 vendor/github.com/tidwall/gjson/gjson_gae.go create mode 100644 vendor/github.com/tidwall/gjson/gjson_ngae.go create mode 100644 vendor/github.com/tidwall/gjson/logo.png create mode 100644 vendor/github.com/tidwall/match/LICENSE create mode 100644 vendor/github.com/tidwall/match/README.md create mode 100644 vendor/github.com/tidwall/match/match.go diff --git a/aws/data_source_aws_pricing_product.go b/aws/data_source_aws_pricing_product.go new file mode 100644 index 00000000000..e354f4daad6 --- /dev/null +++ b/aws/data_source_aws_pricing_product.go @@ -0,0 +1,110 @@ +package aws + +import ( + "log" + + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pricing" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/schema" + "github.com/tidwall/gjson" +) + +const ( + awsPricingTermMatch = "TERM_MATCH" +) + +func dataSourceAwsPricingProduct() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsPricingProductRead, + Schema: map[string]*schema.Schema{ + "service_code": { + Type: schema.TypeString, + Required: true, + }, + "filters": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "json_query": { + Type: schema.TypeString, + Required: true, + }, + "query_result": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsPricingProductRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pricingconn + + params := &pricing.GetProductsInput{ + ServiceCode: aws.String(d.Get("service_code").(string)), + Filters: []*pricing.Filter{}, + } + + filters := d.Get("filters") + for _, v := range filters.([]interface{}) { + m := v.(map[string]interface{}) + params.Filters = append(params.Filters, &pricing.Filter{ + Field: aws.String(m["field"].(string)), + Value: aws.String(m["value"].(string)), + Type: aws.String(awsPricingTermMatch), + }) + } + + log.Printf("[DEBUG] Reading Pricing of EC2 products: %s", params) + resp, err := conn.GetProducts(params) + if err != nil { + return fmt.Errorf("Error reading Pricing of EC2 products: %s", err) + } + + if err = verifyProductsPriceListLength(resp.PriceList); err != nil { + return err + } + + pricingResult, err := json.Marshal(resp.PriceList[0]) + if err != nil { + return fmt.Errorf("Invalid JSON value returned by AWS: %s", err) + } + + jsonQuery := d.Get("json_query").(string) + queryResult := gjson.Get(string(pricingResult), jsonQuery) + + d.SetId(fmt.Sprintf("%d-%d", hashcode.String(params.String()), hashcode.String(jsonQuery))) + d.Set("query_result", queryResult.String()) + return nil +} + +func verifyProductsPriceListLength(priceList []aws.JSONValue) error { + numberOfElements := len(priceList) + if numberOfElements == 0 { + return fmt.Errorf("Pricing product query did not return any elements") + } else if numberOfElements > 1 { + priceListBytes, err := json.Marshal(priceList) + priceListString := string(priceListBytes) + if err != nil { + priceListString = err.Error() + } + return fmt.Errorf("Pricing product query not precise enough. Returned more than one element: %s", priceListString) + } + return nil +} diff --git a/aws/provider.go b/aws/provider.go index a5c7e9e1b4e..4cab3f6c79f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -232,6 +232,7 @@ func Provider() terraform.ResourceProvider { "aws_network_interface": dataSourceAwsNetworkInterface(), "aws_partition": dataSourceAwsPartition(), "aws_prefix_list": dataSourceAwsPrefixList(), + "aws_pricing_product": dataSourceAwsPricingProduct(), "aws_rds_cluster": dataSourceAwsRdsCluster(), "aws_redshift_cluster": dataSourceAwsRedshiftCluster(), "aws_redshift_service_account": dataSourceAwsRedshiftServiceAccount(), diff --git a/vendor/github.com/tidwall/gjson/LICENSE b/vendor/github.com/tidwall/gjson/LICENSE new file mode 100644 index 00000000000..58f5819a438 --- /dev/null +++ b/vendor/github.com/tidwall/gjson/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2016 Josh Baker + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/tidwall/gjson/README.md b/vendor/github.com/tidwall/gjson/README.md new file mode 100644 index 00000000000..70240d99279 --- /dev/null +++ b/vendor/github.com/tidwall/gjson/README.md @@ -0,0 +1,401 @@ +

+GJSON +
+Build Status +GoDoc +GJSON Playground +

+ + + +

get json values quickly

+ +GJSON is a Go package that provides a [fast](#performance) and [simple](#get-a-value) way to get values from a json document. +It has features such as [one line retrieval](#get-a-value), [dot notation paths](#path-syntax), [iteration](#iterate-through-an-object-or-array), and [parsing json lines](#json-lines). + +Also check out [SJSON](https://github.com/tidwall/sjson) for modifying json, and the [JJ](https://github.com/tidwall/jj) command line tool. + +Getting Started +=============== + +## Installing + +To start using GJSON, install Go and run `go get`: + +```sh +$ go get -u github.com/tidwall/gjson +``` + +This will retrieve the library. + +## Get a value +Get searches json for the specified path. A path is in dot syntax, such as "name.last" or "age". When the value is found it's returned immediately. + +```go +package main + +import "github.com/tidwall/gjson" + +const json = `{"name":{"first":"Janet","last":"Prichard"},"age":47}` + +func main() { + value := gjson.Get(json, "name.last") + println(value.String()) +} +``` + +This will print: + +``` +Prichard +``` +*There's also the [GetMany](#get-multiple-values-at-once) function to get multiple values at once, and [GetBytes](#working-with-bytes) for working with JSON byte slices.* + +## Path Syntax + +A path is a series of keys separated by a dot. +A key may contain special wildcard characters '\*' and '?'. +To access an array value use the index as the key. +To get the number of elements in an array or to access a child path, use the '#' character. +The dot and wildcard characters can be escaped with '\\'. + +```json +{ + "name": {"first": "Tom", "last": "Anderson"}, + "age":37, + "children": ["Sara","Alex","Jack"], + "fav.movie": "Deer Hunter", + "friends": [ + {"first": "Dale", "last": "Murphy", "age": 44}, + {"first": "Roger", "last": "Craig", "age": 68}, + {"first": "Jane", "last": "Murphy", "age": 47} + ] +} +``` +``` +"name.last" >> "Anderson" +"age" >> 37 +"children" >> ["Sara","Alex","Jack"] +"children.#" >> 3 +"children.1" >> "Alex" +"child*.2" >> "Jack" +"c?ildren.0" >> "Sara" +"fav\.movie" >> "Deer Hunter" +"friends.#.first" >> ["Dale","Roger","Jane"] +"friends.1.last" >> "Craig" +``` + +You can also query an array for the first match by using `#[...]`, or find all matches with `#[...]#`. +Queries support the `==`, `!=`, `<`, `<=`, `>`, `>=` comparison operators and the simple pattern matching `%` operator. + +``` +friends.#[last=="Murphy"].first >> "Dale" +friends.#[last=="Murphy"]#.first >> ["Dale","Jane"] +friends.#[age>45]#.last >> ["Craig","Murphy"] +friends.#[first%"D*"].last >> "Murphy" +``` + +## JSON Lines + +There's support for [JSON Lines](http://jsonlines.org/) using the `..` prefix, which treats a multilined document as an array. + +For example: + +``` +{"name": "Gilbert", "age": 61} +{"name": "Alexa", "age": 34} +{"name": "May", "age": 57} +{"name": "Deloise", "age": 44} +``` + +``` +..# >> 4 +..1 >> {"name": "Alexa", "age": 34} +..3 >> {"name": "Deloise", "age": 44} +..#.name >> ["Gilbert","Alexa","May","Deloise"] +..#[name="May"].age >> 57 +``` + +The `ForEachLines` function will iterate through JSON lines. + +```go +gjson.ForEachLine(json, func(line gjson.Result) bool{ + println(line.String()) + return true +}) +``` + +## Result Type + +GJSON supports the json types `string`, `number`, `bool`, and `null`. +Arrays and Objects are returned as their raw json types. + +The `Result` type holds one of these: + +``` +bool, for JSON booleans +float64, for JSON numbers +string, for JSON string literals +nil, for JSON null +``` + +To directly access the value: + +```go +result.Type // can be String, Number, True, False, Null, or JSON +result.Str // holds the string +result.Num // holds the float64 number +result.Raw // holds the raw json +result.Index // index of raw value in original json, zero means index unknown +``` + +There are a variety of handy functions that work on a result: + +```go +result.Exists() bool +result.Value() interface{} +result.Int() int64 +result.Uint() uint64 +result.Float() float64 +result.String() string +result.Bool() bool +result.Time() time.Time +result.Array() []gjson.Result +result.Map() map[string]gjson.Result +result.Get(path string) Result +result.ForEach(iterator func(key, value Result) bool) +result.Less(token Result, caseSensitive bool) bool +``` + +The `result.Value()` function returns an `interface{}` which requires type assertion and is one of the following Go types: + +The `result.Array()` function returns back an array of values. +If the result represents a non-existent value, then an empty array will be returned. +If the result is not a JSON array, the return value will be an array containing one result. + +```go +boolean >> bool +number >> float64 +string >> string +null >> nil +array >> []interface{} +object >> map[string]interface{} +``` + +### 64-bit integers + +The `result.Int()` and `result.Uint()` calls are capable of reading all 64 bits, allowing for large JSON integers. + +```go +result.Int() int64 // -9223372036854775808 to 9223372036854775807 +result.Uint() int64 // 0 to 18446744073709551615 +``` + +## Get nested array values + +Suppose you want all the last names from the following json: + +```json +{ + "programmers": [ + { + "firstName": "Janet", + "lastName": "McLaughlin", + }, { + "firstName": "Elliotte", + "lastName": "Hunter", + }, { + "firstName": "Jason", + "lastName": "Harold", + } + ] +} +``` + +You would use the path "programmers.#.lastName" like such: + +```go +result := gjson.Get(json, "programmers.#.lastName") +for _, name := range result.Array() { + println(name.String()) +} +``` + +You can also query an object inside an array: + +```go +name := gjson.Get(json, `programmers.#[lastName="Hunter"].firstName`) +println(name.String()) // prints "Elliotte" +``` + +## Iterate through an object or array + +The `ForEach` function allows for quickly iterating through an object or array. +The key and value are passed to the iterator function for objects. +Only the value is passed for arrays. +Returning `false` from an iterator will stop iteration. + +```go +result := gjson.Get(json, "programmers") +result.ForEach(func(key, value gjson.Result) bool { + println(value.String()) + return true // keep iterating +}) +``` + +## Simple Parse and Get + +There's a `Parse(json)` function that will do a simple parse, and `result.Get(path)` that will search a result. + +For example, all of these will return the same result: + +```go +gjson.Parse(json).Get("name").Get("last") +gjson.Get(json, "name").Get("last") +gjson.Get(json, "name.last") +``` + +## Check for the existence of a value + +Sometimes you just want to know if a value exists. + +```go +value := gjson.Get(json, "name.last") +if !value.Exists() { + println("no last name") +} else { + println(value.String()) +} + +// Or as one step +if gjson.Get(json, "name.last").Exists() { + println("has a last name") +} +``` + +## Validate JSON + +The `Get*` and `Parse*` functions expects that the json is well-formed. Bad json will not panic, but it may return back unexpected results. + +If you are consuming JSON from an unpredictable source then you may want to validate prior to using GJSON. + +```go +if !gjson.Valid(json) { + return errors.New("invalid json") +} +value := gjson.Get(json, "name.last") +``` + +## Unmarshal to a map + +To unmarshal to a `map[string]interface{}`: + +```go +m, ok := gjson.Parse(json).Value().(map[string]interface{}) +if !ok { + // not a map +} +``` + +## Working with Bytes + +If your JSON is contained in a `[]byte` slice, there's the [GetBytes](https://godoc.org/github.com/tidwall/gjson#GetBytes) function. This is preferred over `Get(string(data), path)`. + +```go +var json []byte = ... +result := gjson.GetBytes(json, path) +``` + +If you are using the `gjson.GetBytes(json, path)` function and you want to avoid converting `result.Raw` to a `[]byte`, then you can use this pattern: + +```go +var json []byte = ... +result := gjson.GetBytes(json, path) +var raw []byte +if result.Index > 0 { + raw = json[result.Index:result.Index+len(result.Raw)] +} else { + raw = []byte(result.Raw) +} +``` + +This is a best-effort no allocation sub slice of the original json. This method utilizes the `result.Index` field, which is the position of the raw data in the original json. It's possible that the value of `result.Index` equals zero, in which case the `result.Raw` is converted to a `[]byte`. + +## Get multiple values at once + +The `GetMany` function can be used to get multiple values at the same time. + +```go +results := gjson.GetMany(json, "name.first", "name.last", "age") +``` + +The return value is a `[]Result`, which will always contain exactly the same number of items as the input paths. + +## Performance + +Benchmarks of GJSON alongside [encoding/json](https://golang.org/pkg/encoding/json/), +[ffjson](https://github.com/pquerna/ffjson), +[EasyJSON](https://github.com/mailru/easyjson), +[jsonparser](https://github.com/buger/jsonparser), +and [json-iterator](https://github.com/json-iterator/go) + +``` +BenchmarkGJSONGet-8 3000000 372 ns/op 0 B/op 0 allocs/op +BenchmarkGJSONUnmarshalMap-8 900000 4154 ns/op 1920 B/op 26 allocs/op +BenchmarkJSONUnmarshalMap-8 600000 9019 ns/op 3048 B/op 69 allocs/op +BenchmarkJSONDecoder-8 300000 14120 ns/op 4224 B/op 184 allocs/op +BenchmarkFFJSONLexer-8 1500000 3111 ns/op 896 B/op 8 allocs/op +BenchmarkEasyJSONLexer-8 3000000 887 ns/op 613 B/op 6 allocs/op +BenchmarkJSONParserGet-8 3000000 499 ns/op 21 B/op 0 allocs/op +BenchmarkJSONIterator-8 3000000 812 ns/op 544 B/op 9 allocs/op +``` + +JSON document used: + +```json +{ + "widget": { + "debug": "on", + "window": { + "title": "Sample Konfabulator Widget", + "name": "main_window", + "width": 500, + "height": 500 + }, + "image": { + "src": "Images/Sun.png", + "hOffset": 250, + "vOffset": 250, + "alignment": "center" + }, + "text": { + "data": "Click Here", + "size": 36, + "style": "bold", + "vOffset": 100, + "alignment": "center", + "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" + } + } +} +``` + +Each operation was rotated though one of the following search paths: + +``` +widget.window.name +widget.image.hOffset +widget.text.onMouseUp +``` + +*These benchmarks were run on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.8 and can be be found [here](https://github.com/tidwall/gjson-benchmarks).* + + +## Contact +Josh Baker [@tidwall](http://twitter.com/tidwall) + +## License + +GJSON source code is available under the MIT [License](/LICENSE). diff --git a/vendor/github.com/tidwall/gjson/gjson.go b/vendor/github.com/tidwall/gjson/gjson.go new file mode 100644 index 00000000000..9ffd77dad5d --- /dev/null +++ b/vendor/github.com/tidwall/gjson/gjson.go @@ -0,0 +1,2087 @@ +// Package gjson provides searching for json strings. +package gjson + +import ( + "encoding/base64" + "encoding/json" + "errors" + "reflect" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + "unicode/utf16" + "unicode/utf8" + + "github.com/tidwall/match" +) + +// Type is Result type +type Type int + +const ( + // Null is a null json value + Null Type = iota + // False is a json false boolean + False + // Number is json number + Number + // String is a json string + String + // True is a json true boolean + True + // JSON is a raw block of JSON + JSON +) + +// String returns a string representation of the type. +func (t Type) String() string { + switch t { + default: + return "" + case Null: + return "Null" + case False: + return "False" + case Number: + return "Number" + case String: + return "String" + case True: + return "True" + case JSON: + return "JSON" + } +} + +// Result represents a json value that is returned from Get(). +type Result struct { + // Type is the json type + Type Type + // Raw is the raw json + Raw string + // Str is the json string + Str string + // Num is the json number + Num float64 + // Index of raw value in original json, zero means index unknown + Index int +} + +// String returns a string representation of the value. +func (t Result) String() string { + switch t.Type { + default: + return "" + case False: + return "false" + case Number: + return strconv.FormatFloat(t.Num, 'f', -1, 64) + case String: + return t.Str + case JSON: + return t.Raw + case True: + return "true" + } +} + +// Bool returns an boolean representation. +func (t Result) Bool() bool { + switch t.Type { + default: + return false + case True: + return true + case String: + return t.Str != "" && t.Str != "0" && t.Str != "false" + case Number: + return t.Num != 0 + } +} + +// Int returns an integer representation. +func (t Result) Int() int64 { + switch t.Type { + default: + return 0 + case True: + return 1 + case String: + n, _ := parseInt(t.Str) + return n + case Number: + // try to directly convert the float64 to int64 + n, ok := floatToInt(t.Num) + if !ok { + // now try to parse the raw string + n, ok = parseInt(t.Raw) + if !ok { + // fallback to a standard conversion + return int64(t.Num) + } + } + return n + } +} + +// Uint returns an unsigned integer representation. +func (t Result) Uint() uint64 { + switch t.Type { + default: + return 0 + case True: + return 1 + case String: + n, _ := parseUint(t.Str) + return n + case Number: + // try to directly convert the float64 to uint64 + n, ok := floatToUint(t.Num) + if !ok { + // now try to parse the raw string + n, ok = parseUint(t.Raw) + if !ok { + // fallback to a standard conversion + return uint64(t.Num) + } + } + return n + } +} + +// Float returns an float64 representation. +func (t Result) Float() float64 { + switch t.Type { + default: + return 0 + case True: + return 1 + case String: + n, _ := strconv.ParseFloat(t.Str, 64) + return n + case Number: + return t.Num + } +} + +// Time returns a time.Time representation. +func (t Result) Time() time.Time { + res, _ := time.Parse(time.RFC3339, t.String()) + return res +} + +// Array returns back an array of values. +// If the result represents a non-existent value, then an empty array will be returned. +// If the result is not a JSON array, the return value will be an array containing one result. +func (t Result) Array() []Result { + if t.Type == Null { + return []Result{} + } + if t.Type != JSON { + return []Result{t} + } + r := t.arrayOrMap('[', false) + return r.a +} + +// IsObject returns true if the result value is a JSON object. +func (t Result) IsObject() bool { + return t.Type == JSON && len(t.Raw) > 0 && t.Raw[0] == '{' +} + +// IsArray returns true if the result value is a JSON array. +func (t Result) IsArray() bool { + return t.Type == JSON && len(t.Raw) > 0 && t.Raw[0] == '[' +} + +// ForEach iterates through values. +// If the result represents a non-existent value, then no values will be iterated. +// If the result is an Object, the iterator will pass the key and value of each item. +// If the result is an Array, the iterator will only pass the value of each item. +// If the result is not a JSON array or object, the iterator will pass back one value equal to the result. +func (t Result) ForEach(iterator func(key, value Result) bool) { + if !t.Exists() { + return + } + if t.Type != JSON { + iterator(Result{}, t) + return + } + json := t.Raw + var keys bool + var i int + var key, value Result + for ; i < len(json); i++ { + if json[i] == '{' { + i++ + key.Type = String + keys = true + break + } else if json[i] == '[' { + i++ + break + } + if json[i] > ' ' { + return + } + } + var str string + var vesc bool + var ok bool + for ; i < len(json); i++ { + if keys { + if json[i] != '"' { + continue + } + s := i + i, str, vesc, ok = parseString(json, i+1) + if !ok { + return + } + if vesc { + key.Str = unescape(str[1 : len(str)-1]) + } else { + key.Str = str[1 : len(str)-1] + } + key.Raw = str + key.Index = s + } + for ; i < len(json); i++ { + if json[i] <= ' ' || json[i] == ',' || json[i] == ':' { + continue + } + break + } + s := i + i, value, ok = parseAny(json, i, true) + if !ok { + return + } + value.Index = s + if !iterator(key, value) { + return + } + } +} + +// Map returns back an map of values. The result should be a JSON array. +func (t Result) Map() map[string]Result { + if t.Type != JSON { + return map[string]Result{} + } + r := t.arrayOrMap('{', false) + return r.o +} + +// Get searches result for the specified path. +// The result should be a JSON array or object. +func (t Result) Get(path string) Result { + return Get(t.Raw, path) +} + +type arrayOrMapResult struct { + a []Result + ai []interface{} + o map[string]Result + oi map[string]interface{} + vc byte +} + +func (t Result) arrayOrMap(vc byte, valueize bool) (r arrayOrMapResult) { + var json = t.Raw + var i int + var value Result + var count int + var key Result + if vc == 0 { + for ; i < len(json); i++ { + if json[i] == '{' || json[i] == '[' { + r.vc = json[i] + i++ + break + } + if json[i] > ' ' { + goto end + } + } + } else { + for ; i < len(json); i++ { + if json[i] == vc { + i++ + break + } + if json[i] > ' ' { + goto end + } + } + r.vc = vc + } + if r.vc == '{' { + if valueize { + r.oi = make(map[string]interface{}) + } else { + r.o = make(map[string]Result) + } + } else { + if valueize { + r.ai = make([]interface{}, 0) + } else { + r.a = make([]Result, 0) + } + } + for ; i < len(json); i++ { + if json[i] <= ' ' { + continue + } + // get next value + if json[i] == ']' || json[i] == '}' { + break + } + switch json[i] { + default: + if (json[i] >= '0' && json[i] <= '9') || json[i] == '-' { + value.Type = Number + value.Raw, value.Num = tonum(json[i:]) + } else { + continue + } + case '{', '[': + value.Type = JSON + value.Raw = squash(json[i:]) + case 'n': + value.Type = Null + value.Raw = tolit(json[i:]) + case 't': + value.Type = True + value.Raw = tolit(json[i:]) + case 'f': + value.Type = False + value.Raw = tolit(json[i:]) + case '"': + value.Type = String + value.Raw, value.Str = tostr(json[i:]) + } + i += len(value.Raw) - 1 + + if r.vc == '{' { + if count%2 == 0 { + key = value + } else { + if valueize { + r.oi[key.Str] = value.Value() + } else { + r.o[key.Str] = value + } + } + count++ + } else { + if valueize { + r.ai = append(r.ai, value.Value()) + } else { + r.a = append(r.a, value) + } + } + } +end: + return +} + +// Parse parses the json and returns a result. +// +// This function expects that the json is well-formed, and does not validate. +// Invalid json will not panic, but it may return back unexpected results. +// If you are consuming JSON from an unpredictable source then you may want to +// use the Valid function first. +func Parse(json string) Result { + var value Result + for i := 0; i < len(json); i++ { + if json[i] == '{' || json[i] == '[' { + value.Type = JSON + value.Raw = json[i:] // just take the entire raw + break + } + if json[i] <= ' ' { + continue + } + switch json[i] { + default: + if (json[i] >= '0' && json[i] <= '9') || json[i] == '-' { + value.Type = Number + value.Raw, value.Num = tonum(json[i:]) + } else { + return Result{} + } + case 'n': + value.Type = Null + value.Raw = tolit(json[i:]) + case 't': + value.Type = True + value.Raw = tolit(json[i:]) + case 'f': + value.Type = False + value.Raw = tolit(json[i:]) + case '"': + value.Type = String + value.Raw, value.Str = tostr(json[i:]) + } + break + } + return value +} + +// ParseBytes parses the json and returns a result. +// If working with bytes, this method preferred over Parse(string(data)) +func ParseBytes(json []byte) Result { + return Parse(string(json)) +} + +func squash(json string) string { + // expects that the lead character is a '[' or '{' + // squash the value, ignoring all nested arrays and objects. + // the first '[' or '{' has already been read + depth := 1 + for i := 1; i < len(json); i++ { + if json[i] >= '"' && json[i] <= '}' { + switch json[i] { + case '"': + i++ + s2 := i + for ; i < len(json); i++ { + if json[i] > '\\' { + continue + } + if json[i] == '"' { + // look for an escaped slash + if json[i-1] == '\\' { + n := 0 + for j := i - 2; j > s2-1; j-- { + if json[j] != '\\' { + break + } + n++ + } + if n%2 == 0 { + continue + } + } + break + } + } + case '{', '[': + depth++ + case '}', ']': + depth-- + if depth == 0 { + return json[:i+1] + } + } + } + } + return json +} + +func tonum(json string) (raw string, num float64) { + for i := 1; i < len(json); i++ { + // less than dash might have valid characters + if json[i] <= '-' { + if json[i] <= ' ' || json[i] == ',' { + // break on whitespace and comma + raw = json[:i] + num, _ = strconv.ParseFloat(raw, 64) + return + } + // could be a '+' or '-'. let's assume so. + continue + } + if json[i] < ']' { + // probably a valid number + continue + } + if json[i] == 'e' || json[i] == 'E' { + // allow for exponential numbers + continue + } + // likely a ']' or '}' + raw = json[:i] + num, _ = strconv.ParseFloat(raw, 64) + return + } + raw = json + num, _ = strconv.ParseFloat(raw, 64) + return +} + +func tolit(json string) (raw string) { + for i := 1; i < len(json); i++ { + if json[i] < 'a' || json[i] > 'z' { + return json[:i] + } + } + return json +} + +func tostr(json string) (raw string, str string) { + // expects that the lead character is a '"' + for i := 1; i < len(json); i++ { + if json[i] > '\\' { + continue + } + if json[i] == '"' { + return json[:i+1], json[1:i] + } + if json[i] == '\\' { + i++ + for ; i < len(json); i++ { + if json[i] > '\\' { + continue + } + if json[i] == '"' { + // look for an escaped slash + if json[i-1] == '\\' { + n := 0 + for j := i - 2; j > 0; j-- { + if json[j] != '\\' { + break + } + n++ + } + if n%2 == 0 { + continue + } + } + break + } + } + var ret string + if i+1 < len(json) { + ret = json[:i+1] + } else { + ret = json[:i] + } + return ret, unescape(json[1:i]) + } + } + return json, json[1:] +} + +// Exists returns true if value exists. +// +// if gjson.Get(json, "name.last").Exists(){ +// println("value exists") +// } +func (t Result) Exists() bool { + return t.Type != Null || len(t.Raw) != 0 +} + +// Value returns one of these types: +// +// bool, for JSON booleans +// float64, for JSON numbers +// Number, for JSON numbers +// string, for JSON string literals +// nil, for JSON null +// map[string]interface{}, for JSON objects +// []interface{}, for JSON arrays +// +func (t Result) Value() interface{} { + if t.Type == String { + return t.Str + } + switch t.Type { + default: + return nil + case False: + return false + case Number: + return t.Num + case JSON: + r := t.arrayOrMap(0, true) + if r.vc == '{' { + return r.oi + } else if r.vc == '[' { + return r.ai + } + return nil + case True: + return true + } +} + +func parseString(json string, i int) (int, string, bool, bool) { + var s = i + for ; i < len(json); i++ { + if json[i] > '\\' { + continue + } + if json[i] == '"' { + return i + 1, json[s-1 : i+1], false, true + } + if json[i] == '\\' { + i++ + for ; i < len(json); i++ { + if json[i] > '\\' { + continue + } + if json[i] == '"' { + // look for an escaped slash + if json[i-1] == '\\' { + n := 0 + for j := i - 2; j > 0; j-- { + if json[j] != '\\' { + break + } + n++ + } + if n%2 == 0 { + continue + } + } + return i + 1, json[s-1 : i+1], true, true + } + } + break + } + } + return i, json[s-1:], false, false +} + +func parseNumber(json string, i int) (int, string) { + var s = i + i++ + for ; i < len(json); i++ { + if json[i] <= ' ' || json[i] == ',' || json[i] == ']' || json[i] == '}' { + return i, json[s:i] + } + } + return i, json[s:] +} + +func parseLiteral(json string, i int) (int, string) { + var s = i + i++ + for ; i < len(json); i++ { + if json[i] < 'a' || json[i] > 'z' { + return i, json[s:i] + } + } + return i, json[s:] +} + +type arrayPathResult struct { + part string + path string + more bool + alogok bool + arrch bool + alogkey string + query struct { + on bool + path string + op string + value string + all bool + } +} + +func parseArrayPath(path string) (r arrayPathResult) { + for i := 0; i < len(path); i++ { + if path[i] == '.' { + r.part = path[:i] + r.path = path[i+1:] + r.more = true + return + } + if path[i] == '#' { + r.arrch = true + if i == 0 && len(path) > 1 { + if path[1] == '.' { + r.alogok = true + r.alogkey = path[2:] + r.path = path[:1] + } else if path[1] == '[' { + r.query.on = true + // query + i += 2 + // whitespace + for ; i < len(path); i++ { + if path[i] > ' ' { + break + } + } + s := i + for ; i < len(path); i++ { + if path[i] <= ' ' || + path[i] == '!' || + path[i] == '=' || + path[i] == '<' || + path[i] == '>' || + path[i] == '%' || + path[i] == ']' { + break + } + } + r.query.path = path[s:i] + // whitespace + for ; i < len(path); i++ { + if path[i] > ' ' { + break + } + } + if i < len(path) { + s = i + if path[i] == '!' { + if i < len(path)-1 && path[i+1] == '=' { + i++ + } + } else if path[i] == '<' || path[i] == '>' { + if i < len(path)-1 && path[i+1] == '=' { + i++ + } + } else if path[i] == '=' { + if i < len(path)-1 && path[i+1] == '=' { + s++ + i++ + } + } + i++ + r.query.op = path[s:i] + // whitespace + for ; i < len(path); i++ { + if path[i] > ' ' { + break + } + } + s = i + for ; i < len(path); i++ { + if path[i] == '"' { + i++ + s2 := i + for ; i < len(path); i++ { + if path[i] > '\\' { + continue + } + if path[i] == '"' { + // look for an escaped slash + if path[i-1] == '\\' { + n := 0 + for j := i - 2; j > s2-1; j-- { + if path[j] != '\\' { + break + } + n++ + } + if n%2 == 0 { + continue + } + } + break + } + } + } else if path[i] == ']' { + if i+1 < len(path) && path[i+1] == '#' { + r.query.all = true + } + break + } + } + if i > len(path) { + i = len(path) + } + v := path[s:i] + for len(v) > 0 && v[len(v)-1] <= ' ' { + v = v[:len(v)-1] + } + r.query.value = v + } + } + } + continue + } + } + r.part = path + r.path = "" + return +} + +type objectPathResult struct { + part string + path string + wild bool + more bool +} + +func parseObjectPath(path string) (r objectPathResult) { + for i := 0; i < len(path); i++ { + if path[i] == '.' { + r.part = path[:i] + r.path = path[i+1:] + r.more = true + return + } + if path[i] == '*' || path[i] == '?' { + r.wild = true + continue + } + if path[i] == '\\' { + // go into escape mode. this is a slower path that + // strips off the escape character from the part. + epart := []byte(path[:i]) + i++ + if i < len(path) { + epart = append(epart, path[i]) + i++ + for ; i < len(path); i++ { + if path[i] == '\\' { + i++ + if i < len(path) { + epart = append(epart, path[i]) + } + continue + } else if path[i] == '.' { + r.part = string(epart) + r.path = path[i+1:] + r.more = true + return + } else if path[i] == '*' || path[i] == '?' { + r.wild = true + } + epart = append(epart, path[i]) + } + } + // append the last part + r.part = string(epart) + return + } + } + r.part = path + return +} + +func parseSquash(json string, i int) (int, string) { + // expects that the lead character is a '[' or '{' + // squash the value, ignoring all nested arrays and objects. + // the first '[' or '{' has already been read + s := i + i++ + depth := 1 + for ; i < len(json); i++ { + if json[i] >= '"' && json[i] <= '}' { + switch json[i] { + case '"': + i++ + s2 := i + for ; i < len(json); i++ { + if json[i] > '\\' { + continue + } + if json[i] == '"' { + // look for an escaped slash + if json[i-1] == '\\' { + n := 0 + for j := i - 2; j > s2-1; j-- { + if json[j] != '\\' { + break + } + n++ + } + if n%2 == 0 { + continue + } + } + break + } + } + case '{', '[': + depth++ + case '}', ']': + depth-- + if depth == 0 { + i++ + return i, json[s:i] + } + } + } + } + return i, json[s:] +} + +func parseObject(c *parseContext, i int, path string) (int, bool) { + var pmatch, kesc, vesc, ok, hit bool + var key, val string + rp := parseObjectPath(path) + for i < len(c.json) { + for ; i < len(c.json); i++ { + if c.json[i] == '"' { + // parse_key_string + // this is slightly different from getting s string value + // because we don't need the outer quotes. + i++ + var s = i + for ; i < len(c.json); i++ { + if c.json[i] > '\\' { + continue + } + if c.json[i] == '"' { + i, key, kesc, ok = i+1, c.json[s:i], false, true + goto parse_key_string_done + } + if c.json[i] == '\\' { + i++ + for ; i < len(c.json); i++ { + if c.json[i] > '\\' { + continue + } + if c.json[i] == '"' { + // look for an escaped slash + if c.json[i-1] == '\\' { + n := 0 + for j := i - 2; j > 0; j-- { + if c.json[j] != '\\' { + break + } + n++ + } + if n%2 == 0 { + continue + } + } + i, key, kesc, ok = i+1, c.json[s:i], true, true + goto parse_key_string_done + } + } + break + } + } + key, kesc, ok = c.json[s:], false, false + parse_key_string_done: + break + } + if c.json[i] == '}' { + return i + 1, false + } + } + if !ok { + return i, false + } + if rp.wild { + if kesc { + pmatch = match.Match(unescape(key), rp.part) + } else { + pmatch = match.Match(key, rp.part) + } + } else { + if kesc { + pmatch = rp.part == unescape(key) + } else { + pmatch = rp.part == key + } + } + hit = pmatch && !rp.more + for ; i < len(c.json); i++ { + switch c.json[i] { + default: + continue + case '"': + i++ + i, val, vesc, ok = parseString(c.json, i) + if !ok { + return i, false + } + if hit { + if vesc { + c.value.Str = unescape(val[1 : len(val)-1]) + } else { + c.value.Str = val[1 : len(val)-1] + } + c.value.Raw = val + c.value.Type = String + return i, true + } + case '{': + if pmatch && !hit { + i, hit = parseObject(c, i+1, rp.path) + if hit { + return i, true + } + } else { + i, val = parseSquash(c.json, i) + if hit { + c.value.Raw = val + c.value.Type = JSON + return i, true + } + } + case '[': + if pmatch && !hit { + i, hit = parseArray(c, i+1, rp.path) + if hit { + return i, true + } + } else { + i, val = parseSquash(c.json, i) + if hit { + c.value.Raw = val + c.value.Type = JSON + return i, true + } + } + case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + i, val = parseNumber(c.json, i) + if hit { + c.value.Raw = val + c.value.Type = Number + c.value.Num, _ = strconv.ParseFloat(val, 64) + return i, true + } + case 't', 'f', 'n': + vc := c.json[i] + i, val = parseLiteral(c.json, i) + if hit { + c.value.Raw = val + switch vc { + case 't': + c.value.Type = True + case 'f': + c.value.Type = False + } + return i, true + } + } + break + } + } + return i, false +} +func queryMatches(rp *arrayPathResult, value Result) bool { + rpv := rp.query.value + if len(rpv) > 2 && rpv[0] == '"' && rpv[len(rpv)-1] == '"' { + rpv = rpv[1 : len(rpv)-1] + } + switch value.Type { + case String: + switch rp.query.op { + case "=": + return value.Str == rpv + case "!=": + return value.Str != rpv + case "<": + return value.Str < rpv + case "<=": + return value.Str <= rpv + case ">": + return value.Str > rpv + case ">=": + return value.Str >= rpv + case "%": + return match.Match(value.Str, rpv) + } + case Number: + rpvn, _ := strconv.ParseFloat(rpv, 64) + switch rp.query.op { + case "=": + return value.Num == rpvn + case "!=": + return value.Num != rpvn + case "<": + return value.Num < rpvn + case "<=": + return value.Num <= rpvn + case ">": + return value.Num > rpvn + case ">=": + return value.Num >= rpvn + } + case True: + switch rp.query.op { + case "=": + return rpv == "true" + case "!=": + return rpv != "true" + case ">": + return rpv == "false" + case ">=": + return true + } + case False: + switch rp.query.op { + case "=": + return rpv == "false" + case "!=": + return rpv != "false" + case "<": + return rpv == "true" + case "<=": + return true + } + } + return false +} +func parseArray(c *parseContext, i int, path string) (int, bool) { + var pmatch, vesc, ok, hit bool + var val string + var h int + var alog []int + var partidx int + var multires []byte + rp := parseArrayPath(path) + if !rp.arrch { + n, ok := parseUint(rp.part) + if !ok { + partidx = -1 + } else { + partidx = int(n) + } + } + for i < len(c.json)+1 { + if !rp.arrch { + pmatch = partidx == h + hit = pmatch && !rp.more + } + h++ + if rp.alogok { + alog = append(alog, i) + } + for ; ; i++ { + var ch byte + if i > len(c.json) { + break + } else if i == len(c.json) { + ch = ']' + } else { + ch = c.json[i] + } + switch ch { + default: + continue + case '"': + i++ + i, val, vesc, ok = parseString(c.json, i) + if !ok { + return i, false + } + if hit { + if rp.alogok { + break + } + if vesc { + c.value.Str = unescape(val[1 : len(val)-1]) + } else { + c.value.Str = val[1 : len(val)-1] + } + c.value.Raw = val + c.value.Type = String + return i, true + } + case '{': + if pmatch && !hit { + i, hit = parseObject(c, i+1, rp.path) + if hit { + if rp.alogok { + break + } + return i, true + } + } else { + i, val = parseSquash(c.json, i) + if rp.query.on { + res := Get(val, rp.query.path) + if queryMatches(&rp, res) { + if rp.more { + res = Get(val, rp.path) + } else { + res = Result{Raw: val, Type: JSON} + } + if rp.query.all { + if len(multires) == 0 { + multires = append(multires, '[') + } else { + multires = append(multires, ',') + } + multires = append(multires, res.Raw...) + } else { + c.value = res + return i, true + } + } + } else if hit { + if rp.alogok { + break + } + c.value.Raw = val + c.value.Type = JSON + return i, true + } + } + case '[': + if pmatch && !hit { + i, hit = parseArray(c, i+1, rp.path) + if hit { + if rp.alogok { + break + } + return i, true + } + } else { + i, val = parseSquash(c.json, i) + if hit { + if rp.alogok { + break + } + c.value.Raw = val + c.value.Type = JSON + return i, true + } + } + case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + i, val = parseNumber(c.json, i) + if hit { + if rp.alogok { + break + } + c.value.Raw = val + c.value.Type = Number + c.value.Num, _ = strconv.ParseFloat(val, 64) + return i, true + } + case 't', 'f', 'n': + vc := c.json[i] + i, val = parseLiteral(c.json, i) + if hit { + if rp.alogok { + break + } + c.value.Raw = val + switch vc { + case 't': + c.value.Type = True + case 'f': + c.value.Type = False + } + return i, true + } + case ']': + if rp.arrch && rp.part == "#" { + if rp.alogok { + var jsons = make([]byte, 0, 64) + jsons = append(jsons, '[') + + for j, k := 0, 0; j < len(alog); j++ { + _, res, ok := parseAny(c.json, alog[j], true) + if ok { + res := res.Get(rp.alogkey) + if res.Exists() { + if k > 0 { + jsons = append(jsons, ',') + } + jsons = append(jsons, []byte(res.Raw)...) + k++ + } + } + } + jsons = append(jsons, ']') + c.value.Type = JSON + c.value.Raw = string(jsons) + return i + 1, true + } + if rp.alogok { + break + } + c.value.Raw = val + c.value.Type = Number + c.value.Num = float64(h - 1) + c.calcd = true + return i + 1, true + } + if len(multires) > 0 && !c.value.Exists() { + c.value = Result{ + Raw: string(append(multires, ']')), + Type: JSON, + } + } + return i + 1, false + } + break + } + } + return i, false +} + +// ForEachLine iterates through lines of JSON as specified by the JSON Lines +// format (http://jsonlines.org/). +// Each line is returned as a GJSON Result. +func ForEachLine(json string, iterator func(line Result) bool) { + var res Result + var i int + for { + i, res, _ = parseAny(json, i, true) + if !res.Exists() { + break + } + if !iterator(res) { + return + } + } +} + +type parseContext struct { + json string + value Result + calcd bool + lines bool +} + +// Get searches json for the specified path. +// A path is in dot syntax, such as "name.last" or "age". +// When the value is found it's returned immediately. +// +// A path is a series of keys searated by a dot. +// A key may contain special wildcard characters '*' and '?'. +// To access an array value use the index as the key. +// To get the number of elements in an array or to access a child path, use the '#' character. +// The dot and wildcard character can be escaped with '\'. +// +// { +// "name": {"first": "Tom", "last": "Anderson"}, +// "age":37, +// "children": ["Sara","Alex","Jack"], +// "friends": [ +// {"first": "James", "last": "Murphy"}, +// {"first": "Roger", "last": "Craig"} +// ] +// } +// "name.last" >> "Anderson" +// "age" >> 37 +// "children" >> ["Sara","Alex","Jack"] +// "children.#" >> 3 +// "children.1" >> "Alex" +// "child*.2" >> "Jack" +// "c?ildren.0" >> "Sara" +// "friends.#.first" >> ["James","Roger"] +// +// This function expects that the json is well-formed, and does not validate. +// Invalid json will not panic, but it may return back unexpected results. +// If you are consuming JSON from an unpredictable source then you may want to +// use the Valid function first. +func Get(json, path string) Result { + var i int + var c = &parseContext{json: json} + if len(path) >= 2 && path[0] == '.' && path[1] == '.' { + c.lines = true + parseArray(c, 0, path[2:]) + } else { + for ; i < len(c.json); i++ { + if c.json[i] == '{' { + i++ + parseObject(c, i, path) + break + } + if c.json[i] == '[' { + i++ + parseArray(c, i, path) + break + } + } + } + fillIndex(json, c) + return c.value +} + +// GetBytes searches json for the specified path. +// If working with bytes, this method preferred over Get(string(data), path) +func GetBytes(json []byte, path string) Result { + return getBytes(json, path) +} + +// runeit returns the rune from the the \uXXXX +func runeit(json string) rune { + n, _ := strconv.ParseUint(json[:4], 16, 64) + return rune(n) +} + +// unescape unescapes a string +func unescape(json string) string { //, error) { + var str = make([]byte, 0, len(json)) + for i := 0; i < len(json); i++ { + switch { + default: + str = append(str, json[i]) + case json[i] < ' ': + return string(str) + case json[i] == '\\': + i++ + if i >= len(json) { + return string(str) + } + switch json[i] { + default: + return string(str) + case '\\': + str = append(str, '\\') + case '/': + str = append(str, '/') + case 'b': + str = append(str, '\b') + case 'f': + str = append(str, '\f') + case 'n': + str = append(str, '\n') + case 'r': + str = append(str, '\r') + case 't': + str = append(str, '\t') + case '"': + str = append(str, '"') + case 'u': + if i+5 > len(json) { + return string(str) + } + r := runeit(json[i+1:]) + i += 5 + if utf16.IsSurrogate(r) { + // need another code + if len(json[i:]) >= 6 && json[i] == '\\' && json[i+1] == 'u' { + // we expect it to be correct so just consume it + r = utf16.DecodeRune(r, runeit(json[i+2:])) + i += 6 + } + } + // provide enough space to encode the largest utf8 possible + str = append(str, 0, 0, 0, 0, 0, 0, 0, 0) + n := utf8.EncodeRune(str[len(str)-8:], r) + str = str[:len(str)-8+n] + i-- // backtrack index by one + } + } + } + return string(str) +} + +// Less return true if a token is less than another token. +// The caseSensitive paramater is used when the tokens are Strings. +// The order when comparing two different type is: +// +// Null < False < Number < String < True < JSON +// +func (t Result) Less(token Result, caseSensitive bool) bool { + if t.Type < token.Type { + return true + } + if t.Type > token.Type { + return false + } + if t.Type == String { + if caseSensitive { + return t.Str < token.Str + } + return stringLessInsensitive(t.Str, token.Str) + } + if t.Type == Number { + return t.Num < token.Num + } + return t.Raw < token.Raw +} + +func stringLessInsensitive(a, b string) bool { + for i := 0; i < len(a) && i < len(b); i++ { + if a[i] >= 'A' && a[i] <= 'Z' { + if b[i] >= 'A' && b[i] <= 'Z' { + // both are uppercase, do nothing + if a[i] < b[i] { + return true + } else if a[i] > b[i] { + return false + } + } else { + // a is uppercase, convert a to lowercase + if a[i]+32 < b[i] { + return true + } else if a[i]+32 > b[i] { + return false + } + } + } else if b[i] >= 'A' && b[i] <= 'Z' { + // b is uppercase, convert b to lowercase + if a[i] < b[i]+32 { + return true + } else if a[i] > b[i]+32 { + return false + } + } else { + // neither are uppercase + if a[i] < b[i] { + return true + } else if a[i] > b[i] { + return false + } + } + } + return len(a) < len(b) +} + +// parseAny parses the next value from a json string. +// A Result is returned when the hit param is set. +// The return values are (i int, res Result, ok bool) +func parseAny(json string, i int, hit bool) (int, Result, bool) { + var res Result + var val string + for ; i < len(json); i++ { + if json[i] == '{' || json[i] == '[' { + i, val = parseSquash(json, i) + if hit { + res.Raw = val + res.Type = JSON + } + return i, res, true + } + if json[i] <= ' ' { + continue + } + switch json[i] { + case '"': + i++ + var vesc bool + var ok bool + i, val, vesc, ok = parseString(json, i) + if !ok { + return i, res, false + } + if hit { + res.Type = String + res.Raw = val + if vesc { + res.Str = unescape(val[1 : len(val)-1]) + } else { + res.Str = val[1 : len(val)-1] + } + } + return i, res, true + case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + i, val = parseNumber(json, i) + if hit { + res.Raw = val + res.Type = Number + res.Num, _ = strconv.ParseFloat(val, 64) + } + return i, res, true + case 't', 'f', 'n': + vc := json[i] + i, val = parseLiteral(json, i) + if hit { + res.Raw = val + switch vc { + case 't': + res.Type = True + case 'f': + res.Type = False + } + return i, res, true + } + } + } + return i, res, false +} + +var ( // used for testing + testWatchForFallback bool + testLastWasFallback bool +) + +// GetMany searches json for the multiple paths. +// The return value is a Result array where the number of items +// will be equal to the number of input paths. +func GetMany(json string, path ...string) []Result { + res := make([]Result, len(path)) + for i, path := range path { + res[i] = Get(json, path) + } + return res +} + +// GetManyBytes searches json for the multiple paths. +// The return value is a Result array where the number of items +// will be equal to the number of input paths. +func GetManyBytes(json []byte, path ...string) []Result { + return GetMany(string(json), path...) +} + +var fieldsmu sync.RWMutex +var fields = make(map[string]map[string]int) + +func assign(jsval Result, goval reflect.Value) { + if jsval.Type == Null { + return + } + switch goval.Kind() { + default: + case reflect.Ptr: + if !goval.IsNil() { + newval := reflect.New(goval.Elem().Type()) + assign(jsval, newval.Elem()) + goval.Elem().Set(newval.Elem()) + } else { + newval := reflect.New(goval.Type().Elem()) + assign(jsval, newval.Elem()) + goval.Set(newval) + } + case reflect.Struct: + fieldsmu.RLock() + sf := fields[goval.Type().String()] + fieldsmu.RUnlock() + if sf == nil { + fieldsmu.Lock() + sf = make(map[string]int) + for i := 0; i < goval.Type().NumField(); i++ { + f := goval.Type().Field(i) + tag := strings.Split(f.Tag.Get("json"), ",")[0] + if tag != "-" { + if tag != "" { + sf[tag] = i + sf[f.Name] = i + } else { + sf[f.Name] = i + } + } + } + fields[goval.Type().String()] = sf + fieldsmu.Unlock() + } + jsval.ForEach(func(key, value Result) bool { + if idx, ok := sf[key.Str]; ok { + f := goval.Field(idx) + if f.CanSet() { + assign(value, f) + } + } + return true + }) + case reflect.Slice: + if goval.Type().Elem().Kind() == reflect.Uint8 && jsval.Type == String { + data, _ := base64.StdEncoding.DecodeString(jsval.String()) + goval.Set(reflect.ValueOf(data)) + } else { + jsvals := jsval.Array() + slice := reflect.MakeSlice(goval.Type(), len(jsvals), len(jsvals)) + for i := 0; i < len(jsvals); i++ { + assign(jsvals[i], slice.Index(i)) + } + goval.Set(slice) + } + case reflect.Array: + i, n := 0, goval.Len() + jsval.ForEach(func(_, value Result) bool { + if i == n { + return false + } + assign(value, goval.Index(i)) + i++ + return true + }) + case reflect.Map: + if goval.Type().Key().Kind() == reflect.String && goval.Type().Elem().Kind() == reflect.Interface { + goval.Set(reflect.ValueOf(jsval.Value())) + } + case reflect.Interface: + goval.Set(reflect.ValueOf(jsval.Value())) + case reflect.Bool: + goval.SetBool(jsval.Bool()) + case reflect.Float32, reflect.Float64: + goval.SetFloat(jsval.Float()) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + goval.SetInt(jsval.Int()) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + goval.SetUint(jsval.Uint()) + case reflect.String: + goval.SetString(jsval.String()) + } + if len(goval.Type().PkgPath()) > 0 { + v := goval.Addr() + if v.Type().NumMethod() > 0 { + if u, ok := v.Interface().(json.Unmarshaler); ok { + u.UnmarshalJSON([]byte(jsval.Raw)) + } + } + } +} + +var validate uintptr = 1 + +// UnmarshalValidationEnabled provides the option to disable JSON validation +// during the Unmarshal routine. Validation is enabled by default. +// +// Deprecated: Use encoder/json.Unmarshal instead +func UnmarshalValidationEnabled(enabled bool) { + if enabled { + atomic.StoreUintptr(&validate, 1) + } else { + atomic.StoreUintptr(&validate, 0) + } +} + +// Unmarshal loads the JSON data into the value pointed to by v. +// +// This function works almost identically to json.Unmarshal except that +// gjson.Unmarshal will automatically attempt to convert JSON values to any Go +// type. For example, the JSON string "100" or the JSON number 100 can be equally +// assigned to Go string, int, byte, uint64, etc. This rule applies to all types. +// +// Deprecated: Use encoder/json.Unmarshal instead +func Unmarshal(data []byte, v interface{}) error { + if atomic.LoadUintptr(&validate) == 1 { + _, ok := validpayload(data, 0) + if !ok { + return errors.New("invalid json") + } + } + if v := reflect.ValueOf(v); v.Kind() == reflect.Ptr { + assign(ParseBytes(data), v) + } + return nil +} + +func validpayload(data []byte, i int) (outi int, ok bool) { + for ; i < len(data); i++ { + switch data[i] { + default: + i, ok = validany(data, i) + if !ok { + return i, false + } + for ; i < len(data); i++ { + switch data[i] { + default: + return i, false + case ' ', '\t', '\n', '\r': + continue + } + } + return i, true + case ' ', '\t', '\n', '\r': + continue + } + } + return i, false +} +func validany(data []byte, i int) (outi int, ok bool) { + for ; i < len(data); i++ { + switch data[i] { + default: + return i, false + case ' ', '\t', '\n', '\r': + continue + case '{': + return validobject(data, i+1) + case '[': + return validarray(data, i+1) + case '"': + return validstring(data, i+1) + case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + return validnumber(data, i+1) + case 't': + return validtrue(data, i+1) + case 'f': + return validfalse(data, i+1) + case 'n': + return validnull(data, i+1) + } + } + return i, false +} +func validobject(data []byte, i int) (outi int, ok bool) { + for ; i < len(data); i++ { + switch data[i] { + default: + return i, false + case ' ', '\t', '\n', '\r': + continue + case '}': + return i + 1, true + case '"': + key: + if i, ok = validstring(data, i+1); !ok { + return i, false + } + if i, ok = validcolon(data, i); !ok { + return i, false + } + if i, ok = validany(data, i); !ok { + return i, false + } + if i, ok = validcomma(data, i, '}'); !ok { + return i, false + } + if data[i] == '}' { + return i + 1, true + } + i++ + for ; i < len(data); i++ { + switch data[i] { + default: + return i, false + case ' ', '\t', '\n', '\r': + continue + case '"': + goto key + } + } + return i, false + } + } + return i, false +} +func validcolon(data []byte, i int) (outi int, ok bool) { + for ; i < len(data); i++ { + switch data[i] { + default: + return i, false + case ' ', '\t', '\n', '\r': + continue + case ':': + return i + 1, true + } + } + return i, false +} +func validcomma(data []byte, i int, end byte) (outi int, ok bool) { + for ; i < len(data); i++ { + switch data[i] { + default: + return i, false + case ' ', '\t', '\n', '\r': + continue + case ',': + return i, true + case end: + return i, true + } + } + return i, false +} +func validarray(data []byte, i int) (outi int, ok bool) { + for ; i < len(data); i++ { + switch data[i] { + default: + for ; i < len(data); i++ { + if i, ok = validany(data, i); !ok { + return i, false + } + if i, ok = validcomma(data, i, ']'); !ok { + return i, false + } + if data[i] == ']' { + return i + 1, true + } + } + case ' ', '\t', '\n', '\r': + continue + case ']': + return i + 1, true + } + } + return i, false +} +func validstring(data []byte, i int) (outi int, ok bool) { + for ; i < len(data); i++ { + if data[i] < ' ' { + return i, false + } else if data[i] == '\\' { + i++ + if i == len(data) { + return i, false + } + switch data[i] { + default: + return i, false + case '"', '\\', '/', 'b', 'f', 'n', 'r', 't': + case 'u': + for j := 0; j < 4; j++ { + i++ + if i >= len(data) { + return i, false + } + if !((data[i] >= '0' && data[i] <= '9') || + (data[i] >= 'a' && data[i] <= 'f') || + (data[i] >= 'A' && data[i] <= 'F')) { + return i, false + } + } + } + } else if data[i] == '"' { + return i + 1, true + } + } + return i, false +} +func validnumber(data []byte, i int) (outi int, ok bool) { + i-- + // sign + if data[i] == '-' { + i++ + } + // int + if i == len(data) { + return i, false + } + if data[i] == '0' { + i++ + } else { + for ; i < len(data); i++ { + if data[i] >= '0' && data[i] <= '9' { + continue + } + break + } + } + // frac + if i == len(data) { + return i, true + } + if data[i] == '.' { + i++ + if i == len(data) { + return i, false + } + if data[i] < '0' || data[i] > '9' { + return i, false + } + i++ + for ; i < len(data); i++ { + if data[i] >= '0' && data[i] <= '9' { + continue + } + break + } + } + // exp + if i == len(data) { + return i, true + } + if data[i] == 'e' || data[i] == 'E' { + i++ + if i == len(data) { + return i, false + } + if data[i] == '+' || data[i] == '-' { + i++ + } + if i == len(data) { + return i, false + } + if data[i] < '0' || data[i] > '9' { + return i, false + } + i++ + for ; i < len(data); i++ { + if data[i] >= '0' && data[i] <= '9' { + continue + } + break + } + } + return i, true +} + +func validtrue(data []byte, i int) (outi int, ok bool) { + if i+3 <= len(data) && data[i] == 'r' && data[i+1] == 'u' && data[i+2] == 'e' { + return i + 3, true + } + return i, false +} +func validfalse(data []byte, i int) (outi int, ok bool) { + if i+4 <= len(data) && data[i] == 'a' && data[i+1] == 'l' && data[i+2] == 's' && data[i+3] == 'e' { + return i + 4, true + } + return i, false +} +func validnull(data []byte, i int) (outi int, ok bool) { + if i+3 <= len(data) && data[i] == 'u' && data[i+1] == 'l' && data[i+2] == 'l' { + return i + 3, true + } + return i, false +} + +// Valid returns true if the input is valid json. +// +// if !gjson.Valid(json) { +// return errors.New("invalid json") +// } +// value := gjson.Get(json, "name.last") +// +func Valid(json string) bool { + _, ok := validpayload([]byte(json), 0) + return ok +} + +// ValidBytes returns true if the input is valid json. +// +// if !gjson.Valid(json) { +// return errors.New("invalid json") +// } +// value := gjson.Get(json, "name.last") +// +// If working with bytes, this method preferred over Valid(string(data)) +// +func ValidBytes(json []byte) bool { + _, ok := validpayload(json, 0) + return ok +} + +func parseUint(s string) (n uint64, ok bool) { + var i int + if i == len(s) { + return 0, false + } + for ; i < len(s); i++ { + if s[i] >= '0' && s[i] <= '9' { + n = n*10 + uint64(s[i]-'0') + } else { + return 0, false + } + } + return n, true +} + +func parseInt(s string) (n int64, ok bool) { + var i int + var sign bool + if len(s) > 0 && s[0] == '-' { + sign = true + i++ + } + if i == len(s) { + return 0, false + } + for ; i < len(s); i++ { + if s[i] >= '0' && s[i] <= '9' { + n = n*10 + int64(s[i]-'0') + } else { + return 0, false + } + } + if sign { + return n * -1, true + } + return n, true +} + +const minUint53 = 0 +const maxUint53 = 4503599627370495 +const minInt53 = -2251799813685248 +const maxInt53 = 2251799813685247 + +func floatToUint(f float64) (n uint64, ok bool) { + n = uint64(f) + if float64(n) == f && n >= minUint53 && n <= maxUint53 { + return n, true + } + return 0, false +} + +func floatToInt(f float64) (n int64, ok bool) { + n = int64(f) + if float64(n) == f && n >= minInt53 && n <= maxInt53 { + return n, true + } + return 0, false +} diff --git a/vendor/github.com/tidwall/gjson/gjson_gae.go b/vendor/github.com/tidwall/gjson/gjson_gae.go new file mode 100644 index 00000000000..cbe2ab420b7 --- /dev/null +++ b/vendor/github.com/tidwall/gjson/gjson_gae.go @@ -0,0 +1,10 @@ +//+build appengine + +package gjson + +func getBytes(json []byte, path string) Result { + return Get(string(json), path) +} +func fillIndex(json string, c *parseContext) { + // noop. Use zero for the Index value. +} diff --git a/vendor/github.com/tidwall/gjson/gjson_ngae.go b/vendor/github.com/tidwall/gjson/gjson_ngae.go new file mode 100644 index 00000000000..ff313a78796 --- /dev/null +++ b/vendor/github.com/tidwall/gjson/gjson_ngae.go @@ -0,0 +1,73 @@ +//+build !appengine + +package gjson + +import ( + "reflect" + "unsafe" +) + +// getBytes casts the input json bytes to a string and safely returns the +// results as uniquely allocated data. This operation is intended to minimize +// copies and allocations for the large json string->[]byte. +func getBytes(json []byte, path string) Result { + var result Result + if json != nil { + // unsafe cast to string + result = Get(*(*string)(unsafe.Pointer(&json)), path) + result = fromBytesGet(result) + } + return result +} + +func fromBytesGet(result Result) Result { + // safely get the string headers + rawhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Raw)) + strhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Str)) + // create byte slice headers + rawh := reflect.SliceHeader{Data: rawhi.Data, Len: rawhi.Len} + strh := reflect.SliceHeader{Data: strhi.Data, Len: strhi.Len} + if strh.Data == 0 { + // str is nil + if rawh.Data == 0 { + // raw is nil + result.Raw = "" + } else { + // raw has data, safely copy the slice header to a string + result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) + } + result.Str = "" + } else if rawh.Data == 0 { + // raw is nil + result.Raw = "" + // str has data, safely copy the slice header to a string + result.Str = string(*(*[]byte)(unsafe.Pointer(&strh))) + } else if strh.Data >= rawh.Data && + int(strh.Data)+strh.Len <= int(rawh.Data)+rawh.Len { + // Str is a substring of Raw. + start := int(strh.Data - rawh.Data) + // safely copy the raw slice header + result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) + // substring the raw + result.Str = result.Raw[start : start+strh.Len] + } else { + // safely copy both the raw and str slice headers to strings + result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) + result.Str = string(*(*[]byte)(unsafe.Pointer(&strh))) + } + return result +} + +// fillIndex finds the position of Raw data and assigns it to the Index field +// of the resulting value. If the position cannot be found then Index zero is +// used instead. +func fillIndex(json string, c *parseContext) { + if len(c.value.Raw) > 0 && !c.calcd { + jhdr := *(*reflect.StringHeader)(unsafe.Pointer(&json)) + rhdr := *(*reflect.StringHeader)(unsafe.Pointer(&(c.value.Raw))) + c.value.Index = int(rhdr.Data - jhdr.Data) + if c.value.Index < 0 || c.value.Index >= len(json) { + c.value.Index = 0 + } + } +} diff --git a/vendor/github.com/tidwall/gjson/logo.png b/vendor/github.com/tidwall/gjson/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..17a8bbe9d651e5d79cbd59a3645a152443440ad6 GIT binary patch literal 15936 zcmdseRa9I})9xU_0znfrFi3EBcXtB8-Q8tyw?MEE+&u)>;O-g-!QF!n?wrm0ecyln zi+`Pqb92@@b204MboZ|AuIj4isoIgsic)AO1SlX72u(&>{38ei4_w2jBEbT8g#0}> zfj{`J5}K~64(6^NM$Tp+5mN_aGq8-Ek%ieuGb2+^ry(I^6HUo1oax$2(u&{u+covw&X$WR|Y3j=W4v9v&Wy9&C&b&K688JUl#1%&bhTtPDU41{Y6zS0f06 zy$kt&Mi4i1F>$tXbhUD@2fvJHWbEMPDnJHE`mZV2IVvdp*TD8J|6V9y$(SHUj!Z0! z%uIH6FZ24RwTtUVv;Qr||Jd3^&C}70>7$v8gPXGnupj2+|LF{@-T(PPFAV`{c$J*3 zfK4&76?ZUkvoo`Il@S*p1OCHkYGukR$|buuylm3H z<}7aJY~^ldD(UQC2mWW3d9D5jDR|g;*tw0_nHkJkjZ7HWS$Vh_jJR2u8Q6HtIgQO& zSd4j$Sjqm~-}Jw&-oLaIxC6|@@jn9bnzJ+W7@M$}GZ-0hn=-JlaPctk7_+f5@NjXm zahsTP8Jln!kud=xGQB9ye^aFY+yb=o6ILj1BiHWiOsHjwSN(6-S#&IQQX(?!~oRWla6k zvj3m#lk>9cCv!wc6L6R*c~`T5NT-O!e%&k`LRLWCk5V)xyH@qD}#ba7*ern zD^KwwL26x@_H9n^_xJEwj%`LF z2_M&3l{$q7;~URr@StEw0z3u!#j3ZdE5%$S1w0iM^K2@_(3KW1T0xFBPH3#1nB2_f zvBMJo!z+(+E_6G$0(R-JL<$OXHd^e=iug&_x%->yfVBZnFV3sIHbvZbAFwXaW7AoKsJ9QG z>$+mQV_~P4&z8jBcSvrf!^$eZC-BSslJQJOm4Sir>t!xQeA0}meB*bk78Ll6JYotw zFN_tm1+Ok3dz)A2wN_Xinfj#Ee?*6SsMzd_g;n4n@*KNU9c5|uUDdVb5;09jU=BA8 z7Ip^CUs>Q(aGI&ybtyH$7K|L2U(LdFslcD0RJYaHH%xx{O^TZmsdabO$yfZSTX|)r z=-oR$toP)*A6N)!Ci&fYk#B|NMo}VC;kw_(;DJ=HK8MnXxCRjx zm+Ele5%M~`%RXZFhRaja zofW}k`izaw_BnN>(4NODngeC2ev#$a0Za@}FunO>tS9?CYq6*J5?4v-!SCmNEg}($ zsiIfoly7`UXRh?F`!)YcJa>S4yLz&L#;kL&6#~9Ni+?|0z}yLl+KUVh*{UN zQL82>H7J0_BwzsZbE2-owg@HT^}ncXoZ;dh4@Ag(^&lQPK)^E=LOJs3m1N!Uj9F54V7Fy*9;Hf!S| z2Vtfjj8{AZ6|UJ&-*wZR;=h8&K-WF?$U44F^rNysF*k#YfwM3ww(UIiz!K$Vl6g^; zpZSmDI41>YtUMi>*8?muaBUxB;C6#-g+)6l$2v@q$uZDbJ6wES8#l*s2D<1?VzXJ$ zNn3AE*NNnAtmKenlM+7=mM9>ZV6zb+`lI$2@hpIeP1DdcS*Cvz5A~9(XQ5ee8Zy?1 zV$H!Cd=InD(OPcd;^t`I|2d8dNC%ws6z&4#gegDv>rH+oz!8Nz>NP}eD-R;bVvA0S z5fJb?Ou@|fK(P*e**ICmfISbcs}Y$fZuREW@ZFBDNYmhXW7PA6V7+}jLHzU1y=p!n z^hyRvQ|hIqYYoin6oO1NuT}m&C#3Y93YZnNA2Tz$8cr96%FkEFIxLhO1c8xa?YS>1 zYfbRvnrv%W@wwZlMg$41zv!F1Uthy~PJ0n;XM;%WG#G1Z(D~^_heW34*YaC}4fwaY zQ_|5S2@Q6+L&grf$wpF2KXm2n`%skl-*5HsEQC3gz~7nJ8i!$efQc!-p`}FGdT|bp zjc+K291ok>nAU4-{|as^#|^q`l>3ommlA=!Yk*~f4lIlN?BhIKO<)tnThs?ySx%(Q zZ{BqMNZOg7QO=}w219Yn;z5ayrjclN12jx{->DqdA?>)@B*M55Z6*>9uOVG^g4+gB$$ z&!XEFAyF0vK@Hi45CHqg@K*IEb;v3e@Qc{QP%M+qSM^o+6flzV`6>&uh)6U4UOl>Y zUko)LSj?`l;=xRs21!m{!rvOi>)at<`A6r#TDg{HRsnKvk6eoC&S-x#Mq{7vf>j;i zpoU-IgJbwqGu*^D+T5dUG0a_I-j;HEIj*%e?#p&>hhO%ho;0*k&ga~7^2w21Ks!^N zJ88HQ;e-ECm0XE^;oQz-+JymauGTlg2o=jQD#D!&eneT>3#Y{`@=}~!gct3epErdK zU`nI?9GgnOgA%X>7A8>kKcDjv8zn1;!d*!BC&n1*8?K}4xYS*8J-uGJt;RUTVXir%{}C0=q5B02D<=xOiYxcn?4l1}Em4lV07IMeqs8t@G*e)leU z^LZ&bK;v9xiiAiYvcgAIY^ z{hsN<54t}2vf2`*A~p<)503a+JOop=cS87$R%0Y9b}n%u{HMx2QvUVcnksc$0lfh| zO+0575+Z)~?&@C8M99dsa?f$2%sd?hq|Ds&;G=9fK537ECE{4uO>1(q_^&|Vlh_Gr>&p4j#CTe1bR2DJ_0}1+G9&6IH~WZ{A=YBXE4q6-nx9bn^kCGD zKq`a|i1oH?5f(Dp2PUamK}6jL3(BY6_{%!xtDA#drfkJ=#M6{`HRjVF)bpUQq&Ef6 zyRCSNEr>MF%a_m1u9p-Py~pK8D7c5rSo^`&g9y&-@)_~;#h*R~7VEJ@5*>Y+Ig5{* z{KaPMCB3%XAcWYoc^46OK;ZSTx9HGO-}GxhBWm@2u4qc+2r6b_aBFo$7yfX_H3CEQ zaAx(~OTHSE^w9jPe|Db0^FFGfRAv|V-o14(YFFLKu2^KV)OYV$MilR}0%8L8mXrX# z?aXNsv{y&t%MTik%-A};(yQA&Eexy&Tel+t@?5=F>qE*mRdi^0cko1yYtB`K{ocK2 ze?^g1EeKeXFLrFjvhUiy$_GM26OFkX+qLLsXfuf_ zAiE6m$DGN>RDMk}<35n$|sHc(gYzBw5(l8USpk56G_tt5v zT2RPk>)0{R5nwf2>%09ZBb^t1O4UtbrXz%J=bQ7Aj>{^+T`g!YD&6-HAA&h~?oH{F z-*(;OvA=)%wE6M!TY|;d-~Kce;ebbI&U$_a!QI&6cp@;QC-Ynh;FOeB9wl}vAGWi_ zI6Eb)y%&;;oN5BIUcqEK(H~zuZ*l#_kGGu+l9nrvvTET;x{?m&Pz z)6(6l?`Nf+N{at87srvs@R$3YNC|1B5vn8BpnndfCUEtywUobq0}Eh3Y)W$a((OMt zeVTMUi_J2y7^X9|!b=N>O53xrkSYtG=HIjP+ixUv0p0}H|0JbRs^%hA!Jwk}>L&MM z80l=$8*p?p5nqzB2flUC+qS5co0cA{{~DgUCuuOfxzg5oVle|X6R|&z9HyjTBz7=W z6(hQ3!ou1{BT@o3I#0`zwh{7Z9D2aZ8IS0|LDbPB~{a9 zxp|-)J|}zIePx$CI@kZ{&VL_`9mP8HDU)6(_8QG5JF(05;fr7V+K5bA1Etfxgh#5W>6P@@ucg&Jzly%#@3VwSKV{@&j#^M( zTlz^^ZmfJ%6rHQ3%yEH?9(L!Qb(!Do<{dt5FB1GvxNV4LI{Pjr0R!MUrMb5A4pX>C zAxvpRy)idQ1E-@e{fUAX=xnu;V!H}&V4CM$%=yv*v=$M;MOYIcj@A-jG z?Rpip=$Wr@_3CPVC#tvr@>g2)Q4aUQ5cATrcEjnW2##{myh=>MLI$B&y6jSWY!swkxM01Od*SEg zL*Mh~ni#4$)U3y+i&vQhK|9qf!@Ie%77J-pfjx;IqN%|*VX(lO%{8>t0l{p^gB)j@ zJH57Z00N>gy2Swd*!!iFW0?|!a>O(rOZL2g&I>ppw~Od1Z5(JPKd=Q&^ICR7OvUvu z?=;QVzQ(dwYT=aA*Bg?3&P}yAThCa2|K}GvR-m-L*_!MseF=o;M zOc|!hnA_@||7VYZk>zZ=UNBMA*Vtu^yo#aiaXg2+Bh3A_ z*k(u*3VX`)Fpa0tfiD<{pqWjZHrb&h8UI8iP-1;S@Ctq-P$n^!{&NzMp(LvzzPbW5 z&{drM`nf{0E^A*AS;QZ4;qFHOENld#)$;q_vGmq_=O^r}ovg!Le`|uzGHczAnUBcG z`*F2&g&n(N8{#Biba+rq`+AT}7E##C*+mWAHcl~e8IF*BlD}ptBDDp7inFHgCu%CG zMQGj9<9umYwTdv9IK}7?I-Az9B4JJeXGNp&Y~9dg6EMByhM;=CJgzMOHPo|HyPwEF z>AJ~_8b(2SFF>9)iwy@AzPGmoydb?M{G9dKy6!c@N}i|Lt*7q!;Msy>FWlp16n&Oo zmA=5&{-W||a^yg79H=mpEMh=;B08fpy9ZhoVvt6ohvYk&9Dko*huy|_Vcj-#n-^%Y zs(?&;92eWq(+`)_??I^-a?v+g0KQKt*?l$Eba3dO7`iLIHz8VPfP?g+cWvw%=+?0$ zw8JC0o-q5rI(C{(+>M|Yd?#NqbO%~Z8MLGynQ3(_s2no9^BqZSUb>Vsq3+-&Z~pLd z_+I&t*zl@gEawwB70Gx!2LBP^FYe$`QL1{2+{*4>GM~87Lx9~C-tG~*?hRhhc=M|v zKz`3aEk0yz8Txxs?~Urdp+R0uG5?!T)2G;O-?IC#fm9y}er2kwt<)7;#|LG5_jh)$ z2Sc<@EHgtod#3K*7;KqZ%_)YTiJL+t8o!4XIkwUN@t`E$Yq7=AK*!U9H?3HzBPCK4 z1;{FwV^;P{uD18>%3tX3j%6R_MIMv&@f1V4k%w(DWcZccnI;9GVC^$jwAX_dysW1j zM`z~{y%DsP60N1h*GBx4LRqvFn|B3AG`4>4XHx@(`6tg$H8rQaVQ_b9%`q`{{4}r2 z=OP;`SSJVDA#p82i#aqb_VL+eJ|9?gaG4go0A~hZ1+MA=FDhbXUeMCt&#CDcTTP6} zxtZStJ{EiC|G-Fk6MeJpZ%|$9Rn@xfF(WyQBgyfy#vHNweKWz*P#EpEYl?H6KHpMe zvf?*tGh4Og7>Gv?^om*Qpu)Eyho@?PDF~@Ea^wN^&DqhE;aD3KU>Xh(01Gsi_yYOZ*mM@2DpdkOw<+vQpws53fo{ z&wajB`u(vzs_9!4?h&i8?CuR2u+G84+26IV*Kn`^r>fu|-veN(1Zn=_`3YN(XcZ|e1tk=THcWJbl zsYeS(c=;b95uXNv-?n*7v=S{~uMPFRje+fM2G~eIo<0k{7KhLSksr739qkp}2P;MF z#RHd6+;5fK#zzu#)US{5c4HuGKPuG*;1FXZM{@sop4IH+(rfX}ZIm^whc{X<>-WUx=Qlw6^^~L>&&#_wbjA%NM-BO- ziWfJ(=D?Q^MhL3 zhf&VlDz1)-0Zchw2k$O-icKDM^}Uif#Kk9m;R`tpuwOp5cG?~QR}6ZxbSN_q>1prP zakr4;NOzZ;Y^{A;uGpF=CV3`sPEq~4a=}w;)_$M_5ewbN6EZm-FnM6t)+yo$1Xzo8 zIpW+8HNz7 zlkMVkuwUHCF6C}Aw-E@>xDL3Tfbn_4oq*Rv>wJw&{jvDbvdHt}yMJ0Gb!csez+k{> zteQ9MH2^!E*)-B03O|-kOhidM>4!7jddvni6e+3Rhgmz{jFUl94}&j}0ME)Fp%mZ0 zXlE;DA$P!z`Ey7={LOdHkNp(zqOd+a5rWUY-&`B1w6#jF;9ooo#D?cdNf9r=4ZwBl zOS1FBam;Twsy90oaUIT{CrE+w=xr2`$no9-7C=scPgFEzAOBOZ<*$GeQ77bZwMSg@@7fXHj)VSZO3m{PYxnm7QPW=ydOs z{#chl`}vB`$gV*CX!a!p0D-WAVE#D;v=)%6LUt~fUM3C-2r&%X-h~3n92m=ymRYwXeipL(xBw46A4m}b zz`ipJfSi^h{{;9`Am@=3^@?4(vH)Plzr`-h3~f>NWL@{d&CLaZiG|xLcAC$!-`noB z4&_SEZ1pq&)UusTnZ1RoHFypZcN}#Eq#vv|MOIILF6sZa{{;$X363&PR_E3MC1@C^ zx;^*2YnYQiXAqu1qRWO2EB%sab?nau7YG4niID=(CE2JAH3TMJ{gmd4t!{42oMXA5 z=pHOdBnf^{06X{BZ;N29axO0saaETG~y-q@bv})p+406EHxk$8IMo93knK5R6iV?^+?4JEa=@BB{Wr;7$09%)WWpwdSJpc&gy?Xb#y=!13d4 znM6rJyf+X%lZo?o%SI9DF_A11@m+d`!3G!<29W9k_{MPczg;h)nTL@kmCpN_655)+ zV4#=PKa9~L!Z2&Ah&=5fCU1*LOJ_x$W27L$LOfiib%hP1*Z~zUp#+jQq7DbI-U%rP zk^T9Tl?*Eoupe)4-y&KT~+O##fDEImn4y>NutF;IVJ3=m*! z*rEW%TlVNiM?a>>U$u_$JuA>L6CZFXb!s@yP&g!R3gv~Bp}AgpK2=m0jV8VvIZv2C zmd^lRyVaiKaS$v6oYCt@$k#%)MsE3;z}yQ2L<8`{hpSucn4z6B`)k9mk!I(}zCa8Y zec8sli-a|~e-I8yodRg%#-Fe zUUq-YRYyjqA8u02I*uj{d;W>=)zk|nH^OPBH+T%!|4ND7zpZ*;!cs{XDZAc=)TpYy zygF?tJ_g{6^&8==X_&x=`hHuSa{O~;8JsY}g+Ry)97Lmf`m;+MhVx9uQw2LJB)YCN z@x%=aA>jGW@-K6kNsyeSxy?!*B;mpG3B8IhiJ`aL(iYA4>ejWW`Ba}KuFQ=qb|9UD zd1@S)Q6&PF^2(HexS@I93W4L)kM;M0t02}wjNHH_W_t5)TVGK6pzr>0Q^W#T7H~ar z!`O{mW@83Sl9!-P1c_I-0Gd=n(Al2Ah)MotJ8AbzM;HOuxA3PI2G5Xa4-KFnd(R<& zl~(O&-Jsc|!_LVQcPi|XD}`wzR1Xn(cG2(D_N3D~k*V(8k4i+i9K+ulxOuCy!l zG3U%zV9j+$hqsRH4K8qiX)Y%5kpNKe-@i7c^ly-X9EHpqEaj*3o>oZwj-~iM`20S0 zT+X3*f&BF+O!NkR{xf~GM<9^RlYs$K*d}c0boMm+LsFzfZDJ%7->?En1@nR69#5W9 zha7r+_<*>ozO^~mkB|Jz*z!F@=x~3DwK8pu~`vT=$gd#s-trjR06bA&FSRn zXosx!+Ar!=CCEZdm*mgGVygGr=a;bPp3`1$ojoLd5*z)h`E`i{b~Tk6I_M{*hrhdq z%km?-j{K^V=N^-HEYrs)!oparg}x|u^fEHypM^&WQ?T7d$N;k6=t`n8b5A;R7+fd< zweEqw_&I7h2Q`^|Nhl+xehysMZI!+Zv%IfOO*?!yw98BGB}51~t1J8V4~T$`Y~Rpg zC&EB-_kDWzSVdXeG7o$eVQN}aM@*<;RL@^rCgVF8kWxLDx|}q#y}Sgg z??KODbbqBH3$u%uWAZp`x1p_9+vh$RDq>q8DArehLiv#? zS7p(k_klZ2h^UNb09!*yqk7YKmjb|*xuZ{kcYnK_eZDQDgCKrv@~G^rCEkhh1KQ8t zT~&5d1+9jn{HLO`4hJ}XbT4W*8iQ!OH&R^30MdVf>goXR<52$G7-HwbKISxdG2?gX zUWamaU{hM>`{N6CBF`m|UO7f;#%00^HUQjv90sS3{=D}p=qL&|w9G5VQ=hdE?qpB* z8CVyn;Vhr1QP!CQcS~LOSrN!b4hgV%PU9lhY4qrPo;TID@g4v|;8auwD2G~SY|8TM zRd4Zg*tNyl*2c@A_Z{0+cYF_Pnwm+58d;%$qhs2q2XkwXMBxG|t)dcF{495+0LXAt z%=xkC)NYk>2z6<8b(io?P7{c7z!dMrujH=okhn5qE$`KV2r?QH33y;KVw{~_a|@d1 zgc0Z`b1>*sRl_Co)qBcExZwdxbAVy&napFK=rMOLMPFe2WYbbO%19sPa*w$o;yi)Q z){i?j*$ujpB;L{(m!Q9Sdnfg#tTM-#YfR{CBw}t`;qUq-!x&bmVfcN}-Po_I4}X}_ z^t5y1VNMmk9z)``Ic6iQsFY7DwU8AJM3TN>l5#qSx#b5zyk}gA%k0LtM)YSep6s(K^!|HPUZnNmZx2o z56)-Om(G2o{0FL>zz=R>3h!{P^*+b!qaH#4@l(IQkuiEnE!ScPnFiaVAO&1gyai|l zAdJrT+kK3Se%<(USIy}n=jk}2Ht2IX#e*edEZ~-uUSJSqWC~k*1T5@YJrKyPnw|X< z+W3-Y{WKrQdHr~R3#5&-TZ3zM;w6TqCbhn|Rj2*Z?S*6e-R?XXaRSs|oId=TVXLu{ zj|URNRPe7+kR)4)8|nkVLsFM7<=Vmf~HeV0cp1|XXS5L@wjNj5yKie+KA z%09g+z^n`}M7P_vg>2)FYXMz=YLgchlQ~%ARY;7G(ys;3HB-ed^wLOTkupT@Nfk&o zqI^Bl$76XEwk1?h=qO6mkigTz!Fhq&Y~rX|9n!A;SBB16W?nFjd=|4(?*6`uT>Om4 zq!ivu+WiqM6jPn_bYNMC+&k!sajqnXW6Bh6mHZwrOTOLYAspD>VRI&w0>>Ym%QSk7jV!gm~4K#@3Ekv@C& z1ZW^9I}1pIxbnRqUm@~9k$hFsgO$SclmV)dsY(@axX-x;K@08<7z*M;!)D+)GnB-h_pX#E4&BdOm}hnZK05O34%JkmnSPvltCp%pfh1YkKaB; z3r{eK1y}F0zteZ!VbKxN(mGE+RBO2}il&HvJsmW5)9f&i7~9pNsoJ;9UuU{fdVZPdaTpl3xn;a*6FGldFooO)ID5!f~o{A(@Q|Z#mgd97e)$p~ZNmCyO%SVP)0qcao?}@xnBznLG_-jRz&F1t?k^&(O-9@Xe66ob6E_pADB_QBgqLn-gy;LfXQBSJbXm4Qa z)@0fUbjL-DMg$ghS|B?CBkpf7|ESPv)cUf`>w<=*s{H62A8V`IiK$3LELwT3jzOb8 zl!S`+Tx&GX2;@<}_wVf9BLV{P^(7He508+NcJ@gXb$|bH_KiMExuqD$AfHUdt4cDv znhtuostMM!A9W3zyP;)%a8-~&aywa>^w*%F9kkeh*?k3sl)5}_ql5OAK9{{G;i=&{ zUtHfQwYq)Mv2b#<<*l>m4R5ck-D}D4z}ASJ5n|#5oacfBD7c8Ej7x(YE2s{iT$}G8 zwe%kv{OB)T?3TF&{@pgAVDqA%#pj(8sb{K9MGKWIs8|2FC9!(el>JYu3twNt=QY>E zEfe)z$ve+s#4HImOHv>x>;K~XCmW++46hoJ3_n6i`N8IeHpqE;laOh)fhBpsdn`Zm z=#=<=nmx{M{f?01b_7r#Sw*A=7N%8-I`SyqirAZn#cfO6?4!h|ub2b6?Zr>?Gx+w7 z<{S4WRHS>hqD7{`zLA&m^E6s)FM4@tcOl;dBnnQWimCjB_^)p8k672RtIbfAuFEw6 zgYuq`4j>h|oy0tO_clJuOF6%_;JJXGg4^VC^xm%7&7Hy10VSjE=3!N?H7J&iqdP}I zNOMAsr-?az+$AOgF>TROKSqm>+JU2`&iM{Ko72ZNnN>6ZNGPvfr7rwp!%~yBJSI?n zB3R6?SX`*e^MKP=??Xlg7}vTlQ%RIYvO<*`dtIXjAi@O&*XGS5Uh^+>(R3{UOg9!# zeFU6}>N+X$p5K_^4*d4ma(tvz--++&_^^mulRJJ-8!^^{Pd@#l&?DVnNZmyNE?sJo z1v4i@CO?oX!Dg1Lqv3TWiOw2-FS)k+Ljd}Ilpuew^DX&cs7!n~Bu5*_ zbNkTWkOG>zvpx~^d~foOLY<`#J9-4ss8Adupv(u66p=MohfRAYxhNA>HSU|gUFPg!w!n|-*n&2dvMVX3i(q* z9avlqEO5CvT+~(A1xN=y58K~En@L`vMnKT5ufo5MXk%ca7vW2=31I*Km~>+KC%76EmzQ{Epl*zpBy66^=k| zgxepQc7MxTEKkj~;bY@6Gd!n`K!v>&``bhrGUsu ziUsg|6^14}8h@IKz!**2yt0@~gdZ8TQ6A456}yw%F8pOXchJfG;IsFRiK@Z=(_=hNf1EVaQxVt%sqi_6s+|aA2Hs^Z1^jkF} z)1c0f3(n&QqBF4M>5l>N+2Cviy}C>Nvp)=5PwiM9D`yM8h&eBJ^iH_7m4)X9Q%5MW z!_c~><|XVWOt+Ve`j5xtKb#eCe342+D}=)aV%}@?*l_nK;*CILu4J}tqmJH`|Q{N79k>Ago$ zw+kbnqFbA;2Yd~D;IrHI?7OkQTl}|AhyXHl!kF?*%64_xllGp7XvzmFLZx)x^DQ#( z8yw9_Kg)1_V%`v*<7w+#aJ1^1V0 zi}6B_vKX`{IOQ9xZOX1JvESZ!V(|c{SDSNfEs(d|CL$lQ?eu!R|NTpI?eS+Kf7vNl z%!IbKTC}f)@d@}t?+klTHUjTrMxbJXOeb(+XezwY*G|WOOma4Pdp;kk0Fl~k&%h$# zkNqIcqQ*;D3DT7}0g$zkqn+g9IR#X2V^fthIf z6xut?2mox2Q$mF~UZ_v*={bqjQ*QF8smcNS^TPHE8vGd1^gz*sl^2S)?%;8oMxCX* z0SKz`wGxRnWD$dRPEJ3QEZIK37gU^>f=z&GmJiDQqp92G7HAK&!?*nn%c^fgy_Rc6 z2i%y;23Y}W_x9$Q$t)tiX=};p&i0?ga{!QL{KM0y9!)RXqLg$ix6$n3zDrBF#amXMJ8=viyxAutbQYXsIV&Y%NuDPMK&4 z49)cj0zMhnla%IgMc=|Vc20Hv6p#_`b$l?h_yQC$DIz&u_>1yOOYIZ}$7ErKy`9Iw zO&^zH_d%1a{z{drpduoOO9>4K0hs_Wqej8OE3;~Jz;l|XDy($&>P*2><8H_*uLF

Bg_)L$48&o}ack zt!HAQladuqH6nxcdZjxF6vTK*7%AV0IOX}JZ^u_OkMumMel#gIzv1VJUb|?$j71?Q zE%B-a&vFk0&Z20HLn$L5hH9dQ4Ef5bKHOX_RfA5_`gJvR%bW4}0DCGg0Va&YC>upU z1&8GC>xLY}LkxejF;yq2sOY~5Cqo4UPpDVfIk~O=P(Gb%k`up^XsPRv9)fXL9y}y5 z_nYE{jUJUly7pJ?$r_eiajL0B@N?t6efF1pS9lk2UGDMWIj>@eS3OH*kme)>qMs4c zXm_q!8hu`I8Dhv5J1?UvlYLJ*X6D(~=y^sb&mT@}>JxIp-$sTvzSdP`p2 zJSTpI%GX_eG4+h<`8LXOC{XRWB^Zd0<_&>b2eoF`!(!~j1?f~Xrey`D;63!OSo@1j zhVkNITfkbp3}EkdgcmMq1ZjCrPrG8@X$!y3nZFDG<8?k82gdmVJ<<=koN(R0uQJ&q&;Hm9we)+ z>EiW_<2L!S=W{bXQR{t-Xk&^=i3!xJ1GH*$ft^*`kFY2U5$7}?R(xpv1OE!wXhM-U z{|-m&g!{Wci5J~AR7xhAcz2%T1X}X;Lm5kqn$n>CdZG%!jlgyEgu}8cSE=Tna>KaW zE{i{1$MRasX61aWzh$Kz+gg_XXfmLI)gJjN8%-etjvKrZa0TIVu@FNzi_DBbgG}?X zc%`<^VRHLdaERnl?k6tkmy~V-6wDDz--2n{wg8GA9pEX|*>WDA)uFS%@&MN%-fruuv;9cz5hkb^M5ny{e|a>hsQrwX-D^ zNBO*f*^1b~?2NHQ2g~@Hiq$_V;Z8|Q@sz(OJ-_;@xOeF3^57a-&;bjXTR0^(9&O1`Qs5mDXKaZ{gYh~^a4>N0el@Q8ji@;G0VwtnJC=gh zkvhS5%hY0~-FeS=8*`P?hYjBB(TJ(h3vvLJ;q{z?7Jf~hQZOlh z8(M!wZ6}#fur(A{mkQvWp^(z{kJ9Qcf&hRH6HK!c5b1?W28wck^aQ{Ju^0{PD&(m< zLbu{`I17`!l>tz)uDi~j;Q*7#M!X;*rP#E#K`0MHVO=C_Y>Kpq3I%tz)KS21z(70w zu+S+efLBlwQ<3knLW3-aM&dW%uuv1r?kQqDWsn|wHc35K!jBl%t~9oLn(8w!(iF2Y zj)Ca3zC|-dT69O*c44Drzb zTWRcGB4pjuzq;tNLKJ7H7&3CTH`^5&fs^&Csh+4TdNT~n>o18P123FK1<6Ap7>9OE zH?~wjjt8TicxY-E;Ld@{^P%j9BpeC^HJlw8iW2I<*Vc#1VH5Y&k@$T23>riN5a^fE z1xtK3We+L~pTm`C@mKj&g@flbKtRjuc?i2+3nW^d516YT2Qx*|&}0%IIZ{BK)n@-A z7W$f>T8g%2qR?15Ezb7#Al1jSng=Um;<;^4CZ)UF4*B#s16}WxXDR&e;IFDemyJBP zQD>pCTMx2W)Iwg$ckc4ElkYeRp?hVt(&_O^6u-=WO4y!T>T70vx)M)1f17nmsqw{$ zZhYP=C<2j}m^Lg-ex&8RKf~0WrfrL!~NLQ^Xk?)No>Z1xiNn~MBa)Y#@)-369lm6 zDH#U3Pv&kw{mt3+_t3uW8=*{`^%?Rl0~ff@XZrjZDZCjasI5PtLP6)zBrRO$pYlfV z4DCdS&(8)uR*23AuP?jhTi@#6yL=G*b~7!5d3?2d_2DzzR3V+SVCZe@ULo|*Qz`CV z*j}+=>D|^uy$<{s0tgCLYba;t*4jWsj}CfRI?T4cS90us!fy8Lz;(qp7V}H&`+loKEpPZr6wt`2EqWMWj z6-EjjNWU@D@IQdNmlvT5>qUq{`9mBuild Status +GoDoc + +Match is a very simple pattern matcher where '*' matches on any +number characters and '?' matches on any one character. + +Installing +---------- + +``` +go get -u github.com/tidwall/match +``` + +Example +------- + +```go +match.Match("hello", "*llo") +match.Match("jello", "?ello") +match.Match("hello", "h*o") +``` + + +Contact +------- +Josh Baker [@tidwall](http://twitter.com/tidwall) + +License +------- +Redcon source code is available under the MIT [License](/LICENSE). diff --git a/vendor/github.com/tidwall/match/match.go b/vendor/github.com/tidwall/match/match.go new file mode 100644 index 00000000000..8885add63c8 --- /dev/null +++ b/vendor/github.com/tidwall/match/match.go @@ -0,0 +1,192 @@ +// Match provides a simple pattern matcher with unicode support. +package match + +import "unicode/utf8" + +// Match returns true if str matches pattern. This is a very +// simple wildcard match where '*' matches on any number characters +// and '?' matches on any one character. + +// pattern: +// { term } +// term: +// '*' matches any sequence of non-Separator characters +// '?' matches any single non-Separator character +// c matches character c (c != '*', '?', '\\') +// '\\' c matches character c +// +func Match(str, pattern string) bool { + if pattern == "*" { + return true + } + return deepMatch(str, pattern) +} +func deepMatch(str, pattern string) bool { + for len(pattern) > 0 { + if pattern[0] > 0x7f { + return deepMatchRune(str, pattern) + } + switch pattern[0] { + default: + if len(str) == 0 { + return false + } + if str[0] > 0x7f { + return deepMatchRune(str, pattern) + } + if str[0] != pattern[0] { + return false + } + case '?': + if len(str) == 0 { + return false + } + case '*': + return deepMatch(str, pattern[1:]) || + (len(str) > 0 && deepMatch(str[1:], pattern)) + } + str = str[1:] + pattern = pattern[1:] + } + return len(str) == 0 && len(pattern) == 0 +} + +func deepMatchRune(str, pattern string) bool { + var sr, pr rune + var srsz, prsz int + + // read the first rune ahead of time + if len(str) > 0 { + if str[0] > 0x7f { + sr, srsz = utf8.DecodeRuneInString(str) + } else { + sr, srsz = rune(str[0]), 1 + } + } else { + sr, srsz = utf8.RuneError, 0 + } + if len(pattern) > 0 { + if pattern[0] > 0x7f { + pr, prsz = utf8.DecodeRuneInString(pattern) + } else { + pr, prsz = rune(pattern[0]), 1 + } + } else { + pr, prsz = utf8.RuneError, 0 + } + // done reading + for pr != utf8.RuneError { + switch pr { + default: + if srsz == utf8.RuneError { + return false + } + if sr != pr { + return false + } + case '?': + if srsz == utf8.RuneError { + return false + } + case '*': + return deepMatchRune(str, pattern[prsz:]) || + (srsz > 0 && deepMatchRune(str[srsz:], pattern)) + } + str = str[srsz:] + pattern = pattern[prsz:] + // read the next runes + if len(str) > 0 { + if str[0] > 0x7f { + sr, srsz = utf8.DecodeRuneInString(str) + } else { + sr, srsz = rune(str[0]), 1 + } + } else { + sr, srsz = utf8.RuneError, 0 + } + if len(pattern) > 0 { + if pattern[0] > 0x7f { + pr, prsz = utf8.DecodeRuneInString(pattern) + } else { + pr, prsz = rune(pattern[0]), 1 + } + } else { + pr, prsz = utf8.RuneError, 0 + } + // done reading + } + + return srsz == 0 && prsz == 0 +} + +var maxRuneBytes = func() []byte { + b := make([]byte, 4) + if utf8.EncodeRune(b, '\U0010FFFF') != 4 { + panic("invalid rune encoding") + } + return b +}() + +// Allowable parses the pattern and determines the minimum and maximum allowable +// values that the pattern can represent. +// When the max cannot be determined, 'true' will be returned +// for infinite. +func Allowable(pattern string) (min, max string) { + if pattern == "" || pattern[0] == '*' { + return "", "" + } + + minb := make([]byte, 0, len(pattern)) + maxb := make([]byte, 0, len(pattern)) + var wild bool + for i := 0; i < len(pattern); i++ { + if pattern[i] == '*' { + wild = true + break + } + if pattern[i] == '?' { + minb = append(minb, 0) + maxb = append(maxb, maxRuneBytes...) + } else { + minb = append(minb, pattern[i]) + maxb = append(maxb, pattern[i]) + } + } + if wild { + r, n := utf8.DecodeLastRune(maxb) + if r != utf8.RuneError { + if r < utf8.MaxRune { + r++ + if r > 0x7f { + b := make([]byte, 4) + nn := utf8.EncodeRune(b, r) + maxb = append(maxb[:len(maxb)-n], b[:nn]...) + } else { + maxb = append(maxb[:len(maxb)-n], byte(r)) + } + } + } + } + return string(minb), string(maxb) + /* + return + if wild { + r, n := utf8.DecodeLastRune(maxb) + if r != utf8.RuneError { + if r < utf8.MaxRune { + infinite = true + } else { + r++ + if r > 0x7f { + b := make([]byte, 4) + nn := utf8.EncodeRune(b, r) + maxb = append(maxb[:len(maxb)-n], b[:nn]...) + } else { + maxb = append(maxb[:len(maxb)-n], byte(r)) + } + } + } + } + return string(minb), string(maxb), infinite + */ +} diff --git a/vendor/vendor.json b/vendor/vendor.json index a38b8f0b93a..18a8bfd6b5b 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1717,6 +1717,20 @@ "version": "v0.1.0", "versionExact": "v0.1.0" }, + { + "checksumSHA1": "d+4iuDj/qQ+2LiWEbQ+AWjxEJOc=", + "path": "github.com/tidwall/gjson", + "revision": "f123b340873a0084cb27267eddd8ff615115fbff", + "revisionTime": "2018-06-21T18:09:58Z", + "version": "v1.1.2", + "versionExact": "v1.1.2" + }, + { + "checksumSHA1": "Tk+aXpWRuTQhURlO79bd7YogcU0=", + "path": "github.com/tidwall/match", + "revision": "1731857f09b1f38450e2c12409748407822dc6be", + "revisionTime": "2017-10-02T07:59:45Z" + }, { "checksumSHA1": "qgMa75aMGbkFY0jIqqqgVnCUoNA=", "path": "github.com/ulikunitz/xz", From a2e194b726a40310667022403bd5e26e4e568c35 Mon Sep 17 00:00:00 2001 From: Dieter De Meyer Date: Tue, 3 Jul 2018 10:34:19 +0200 Subject: [PATCH 1722/3316] Added argument for defining instance state names + added test case --- aws/data_source_aws_instances.go | 31 +++++++++++---- aws/data_source_aws_instances_test.go | 54 ++++++++++++++++++++++++++ website/docs/d/instances.html.markdown | 4 ++ 3 files changed, 81 insertions(+), 8 deletions(-) diff --git a/aws/data_source_aws_instances.go b/aws/data_source_aws_instances.go index 33f6e8a760d..e0b094e2042 100644 --- a/aws/data_source_aws_instances.go +++ b/aws/data_source_aws_instances.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsInstances() *schema.Resource { @@ -17,6 +18,21 @@ func dataSourceAwsInstances() *schema.Resource { Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "instance_tags": tagsSchemaComputed(), + "instance_state_names": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + ec2.InstanceStateNamePending, + ec2.InstanceStateNameRunning, + ec2.InstanceStateNameShuttingDown, + ec2.InstanceStateNameStopped, + ec2.InstanceStateNameStopping, + ec2.InstanceStateNameTerminated, + }, false), + }, + }, "ids": { Type: schema.TypeList, @@ -47,20 +63,19 @@ func dataSourceAwsInstancesRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("One of filters or instance_tags must be assigned") } + instanceStateNames := []*string{aws.String(ec2.InstanceStateNameRunning)} + if v, ok := d.GetOk("instance_state_names"); ok && len(v.(*schema.Set).List()) > 0 { + instanceStateNames = expandStringSet(v.(*schema.Set)) + } params := &ec2.DescribeInstancesInput{ Filters: []*ec2.Filter{ &ec2.Filter{ - Name: aws.String("instance-state-name"), - Values: []*string{ - aws.String("running"), - aws.String("stopped"), - aws.String("stopping"), - aws.String("pending"), - aws.String("shutting-down"), - }, + Name: aws.String("instance-state-name"), + Values: instanceStateNames, }, }, } + if filtersOk { params.Filters = append(params.Filters, buildAwsDataSourceFilters(filters.(*schema.Set))...) diff --git a/aws/data_source_aws_instances_test.go b/aws/data_source_aws_instances_test.go index 2dd92bfa5b1..60c7f7cb2e3 100644 --- a/aws/data_source_aws_instances_test.go +++ b/aws/data_source_aws_instances_test.go @@ -43,6 +43,22 @@ func TestAccAWSInstancesDataSource_tags(t *testing.T) { }) } +func TestAccAWSInstancesDataSource_instance_state_names(t *testing.T) { + rInt := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccInstancesDataSourceConfig_instance_state_names(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("data.aws_instances.test", "ids.#", "2"), + ), + }, + }, + }) +} + const testAccInstancesDataSourceConfig_ids = ` data "aws_ami" "ubuntu" { most_recent = true @@ -113,3 +129,41 @@ data "aws_instances" "test" { } `, rInt) } + +func testAccInstancesDataSourceConfig_instance_state_names(rInt int) string { + return fmt.Sprintf(` +data "aws_ami" "ubuntu" { + most_recent = true + + filter { + name = "name" + values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"] + } + + filter { + name = "virtualization-type" + values = ["hvm"] + } + + owners = ["099720109477"] # Canonical +} + +resource "aws_instance" "test" { + count = 2 + ami = "${data.aws_ami.ubuntu.id}" + instance_type = "t2.micro" + tags { + Name = "TfAccTest-HelloWorld" + TestSeed = "%[1]d" + } +} + +data "aws_instances" "test" { + instance_tags { + Name = "*" + } + + instance_state_names = [ "pending", "running" ] +} +`, rInt) +} diff --git a/website/docs/d/instances.html.markdown b/website/docs/d/instances.html.markdown index d09e16c3cc6..c67f990862d 100644 --- a/website/docs/d/instances.html.markdown +++ b/website/docs/d/instances.html.markdown @@ -32,6 +32,8 @@ data "aws_instances" "test" { name = "instance.group-id" values = ["sg-12345678"] } + + instance_state_names = [ "running", "stopped" ] } resource "aws_eip" "test" { @@ -45,6 +47,8 @@ resource "aws_eip" "test" { * `instance_tags` - (Optional) A mapping of tags, each pair of which must exactly match a pair on desired instances. +* `instance_state_names` - (Optional) A list of instance states that should be applicable to the desired instances. The permitted values are: `pending, running, shutting-down, stopped, stopping, terminated` + * `filter` - (Optional) One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out [describe-instances in the AWS CLI reference][1]. From 8674ed80526390d70a9066a083764920cc5b8a63 Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Tue, 3 Jul 2018 10:34:27 +0100 Subject: [PATCH 1723/3316] Add member_clusters to aws_elasticache_replication_group --- aws/data_source_aws_elasticache_replication_group.go | 7 +++++++ aws/data_source_aws_elasticache_replication_group_test.go | 1 + aws/resource_aws_elasticache_replication_group.go | 8 ++++++++ aws/resource_aws_elasticache_replication_group_test.go | 2 ++ .../docs/d/elasticache_replication_group.html.markdown | 1 + .../docs/r/elasticache_replication_group.html.markdown | 1 + 6 files changed, 20 insertions(+) diff --git a/aws/data_source_aws_elasticache_replication_group.go b/aws/data_source_aws_elasticache_replication_group.go index 938eea1a613..77ec2e8780c 100644 --- a/aws/data_source_aws_elasticache_replication_group.go +++ b/aws/data_source_aws_elasticache_replication_group.go @@ -45,6 +45,12 @@ func dataSourceAwsElasticacheReplicationGroup() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "member_clusters": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, "node_type": { Type: schema.TypeString, Computed: true, @@ -106,6 +112,7 @@ func dataSourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta i d.Set("primary_endpoint_address", rg.NodeGroups[0].PrimaryEndpoint.Address) } d.Set("number_cache_clusters", len(rg.MemberClusters)) + d.Set("member_clusters", flattenStringList(rg.MemberClusters)) d.Set("node_type", rg.CacheNodeType) d.Set("snapshot_window", rg.SnapshotWindow) d.Set("snapshot_retention_limit", rg.SnapshotRetentionLimit) diff --git a/aws/data_source_aws_elasticache_replication_group_test.go b/aws/data_source_aws_elasticache_replication_group_test.go index 0a13345b2ee..00e361bbfcf 100644 --- a/aws/data_source_aws_elasticache_replication_group_test.go +++ b/aws/data_source_aws_elasticache_replication_group_test.go @@ -24,6 +24,7 @@ func TestAccDataSourceAwsElasticacheReplicationGroup_basic(t *testing.T) { resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "port", "6379"), resource.TestCheckResourceAttrSet("data.aws_elasticache_replication_group.bar", "primary_endpoint_address"), resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "number_cache_clusters", "2"), + resource.TestCheckResourceAttrSet("data.aws_elasticache_replication_group.bar", "member_clusters"), resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "node_type", "cache.m1.small"), resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "snapshot_window", "01:00-02:00"), ), diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index 192ffbacecd..db52c9eb2cc 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -50,6 +50,13 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { Optional: true, } + resourceSchema["member_clusters"] = &schema.Schema{ + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + } + resourceSchema["primary_endpoint_address"] = &schema.Schema{ Type: schema.TypeString, Computed: true, @@ -313,6 +320,7 @@ func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta int d.Set("replication_group_description", rgp.Description) d.Set("number_cache_clusters", len(rgp.MemberClusters)) + d.Set("member_clusters", flattenStringList(rgp.MemberClusters)) if err := d.Set("cluster_mode", flattenElasticacheNodeGroupsToClusterMode(aws.BoolValue(rgp.ClusterEnabled), rgp.NodeGroups)); err != nil { return fmt.Errorf("error setting cluster_mode attribute: %s", err) } diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index 012994b9126..03425bf836e 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -89,6 +89,8 @@ func TestAccAWSElasticacheReplicationGroup_basic(t *testing.T) { "aws_elasticache_replication_group.bar", "cluster_mode.#", "0"), resource.TestCheckResourceAttr( "aws_elasticache_replication_group.bar", "number_cache_clusters", "2"), + resource.TestCheckResourceAttrSet( + "aws_elasticache_replication_group.bar", "member_clusters"), resource.TestCheckResourceAttr( "aws_elasticache_replication_group.bar", "auto_minor_version_upgrade", "false"), ), diff --git a/website/docs/d/elasticache_replication_group.html.markdown b/website/docs/d/elasticache_replication_group.html.markdown index 8d658bf6e37..ec0f9d71c6c 100644 --- a/website/docs/d/elasticache_replication_group.html.markdown +++ b/website/docs/d/elasticache_replication_group.html.markdown @@ -34,6 +34,7 @@ In addition to all arguments above, the following attributes are exported: * `automatic_failover_enabled` - A flag whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. * `node_type` – The cluster node type. * `number_cache_clusters` – The number of cache clusters that the replication group has. +* `member_clusters` - The identifiers of all the nodes that are part of this replication group. * `snapshot_window` - The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). * `snapshot_retention_limit` - The number of days for which ElastiCache retains automatic cache cluster snapshots before deleting them. * `port` – The port number on which the configuration endpoint will accept connections. diff --git a/website/docs/r/elasticache_replication_group.html.markdown b/website/docs/r/elasticache_replication_group.html.markdown index c2cdc13b4ed..70e2982abe2 100644 --- a/website/docs/r/elasticache_replication_group.html.markdown +++ b/website/docs/r/elasticache_replication_group.html.markdown @@ -140,6 +140,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the ElastiCache Replication Group. * `configuration_endpoint_address` - The address of the replication group configuration endpoint when cluster mode is enabled. * `primary_endpoint_address` - (Redis only) The address of the endpoint for the primary node in the replication group, if the cluster mode is disabled. +* `member_clusters` - The identifiers of all the nodes that are part of this replication group. ## Timeouts From d3e1cd50fc2ccfa7b62c8d68c7aeb4b084736f5e Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 3 Jul 2018 07:33:51 -0400 Subject: [PATCH 1724/3316] Added tests for aws_pricing_product --- aws/data_source_aws_pricing_product_test.go | 144 ++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 aws/data_source_aws_pricing_product_test.go diff --git a/aws/data_source_aws_pricing_product_test.go b/aws/data_source_aws_pricing_product_test.go new file mode 100644 index 00000000000..8f90c5224f3 --- /dev/null +++ b/aws/data_source_aws_pricing_product_test.go @@ -0,0 +1,144 @@ +package aws + +import ( + "fmt" + "os" + "strconv" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccDataSourceAwsPricingProduct_ec2(t *testing.T) { + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsPricingProductConfigEc2("test1", "c5.large") + testAccDataSourceAwsPricingProductConfigEc2("test2", "c5.xlarge"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_pricing_product.test1", "query_result"), + resource.TestCheckResourceAttrSet("data.aws_pricing_product.test2", "query_result"), + testAccPricingCheckValueIsFloat("data.aws_pricing_product.test1"), + testAccPricingCheckValueIsFloat("data.aws_pricing_product.test2"), + testAccPricingCheckGreaterValue("data.aws_pricing_product.test2", "data.aws_pricing_product.test1"), + ), + }, + }, + }) +} + +func TestAccDataSourceAwsPricingProduct_redshift(t *testing.T) { + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsPricingProductConfigRedshift(), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("data.aws_pricing_product.test", "query_result"), + testAccPricingCheckValueIsFloat("data.aws_pricing_product.test"), + ), + }, + }, + }) +} + +func testAccDataSourceAwsPricingProductConfigEc2(dataName string, instanceType string) string { + return fmt.Sprintf(`data "aws_pricing_product" "%s" { + service_code = "AmazonEC2" + + filters = [ + { + field = "instanceType" + value = "%s" + }, + { + field = "operatingSystem" + value = "Linux" + }, + { + field = "location" + value = "US East (N. Virginia)" + }, + { + field = "preInstalledSw" + value = "NA" + }, + { + field = "licenseModel" + value = "No License required" + }, + { + field = "tenancy" + value = "Shared" + }, + ] + + json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" +} +`, dataName, instanceType) +} + +func testAccDataSourceAwsPricingProductConfigRedshift() string { + return fmt.Sprintf(`data "aws_pricing_product" "test" { + service_code = "AmazonRedshift" + + filters = [ + { + field = "instanceType" + value = "ds1.xlarge" + }, + { + field = "location" + value = "US East (N. Virginia)" + }, + ] + + json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" +} +`) +} + +func testAccPricingCheckValueIsFloat(data string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[data] + + if !ok { + return fmt.Errorf("Can't find resource: %s", data) + } + + queryResult := rs.Primary.Attributes["query_result"] + if _, err := strconv.ParseFloat(queryResult, 32); err != nil { + return fmt.Errorf("%s query_result value (%s) is not a float: %s", data, queryResult, err) + } + + return nil + } +} + +func testAccPricingCheckGreaterValue(dataWithGreaterValue string, otherData string) resource.TestCheckFunc { + return func(s *terraform.State) error { + greaterResource, ok := s.RootModule().Resources[dataWithGreaterValue] + if !ok { + return fmt.Errorf("Can't find resource: %s", dataWithGreaterValue) + } + + lesserResource, ok := s.RootModule().Resources[otherData] + if !ok { + return fmt.Errorf("Can't find resource: %s", otherData) + } + + greaterValue := greaterResource.Primary.Attributes["query_result"] + lesserValue := lesserResource.Primary.Attributes["query_result"] + + if greaterValue <= lesserValue { + return fmt.Errorf("%s (%s) has a greater value than %s (%s). Should have been the opposite", otherData, lesserValue, dataWithGreaterValue, greaterValue) + } + + return nil + } +} From 68d64c17c55a1f37405968c9a8d8fef41b2d8b03 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 3 Jul 2018 07:53:22 -0400 Subject: [PATCH 1725/3316] Add aws_pricing_product doc --- aws/data_source_aws_pricing_product.go | 4 +- website/docs/d/pricing_product.html.markdown | 76 ++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 website/docs/d/pricing_product.html.markdown diff --git a/aws/data_source_aws_pricing_product.go b/aws/data_source_aws_pricing_product.go index e354f4daad6..43502b06688 100644 --- a/aws/data_source_aws_pricing_product.go +++ b/aws/data_source_aws_pricing_product.go @@ -71,10 +71,10 @@ func dataSourceAwsPricingProductRead(d *schema.ResourceData, meta interface{}) e }) } - log.Printf("[DEBUG] Reading Pricing of EC2 products: %s", params) + log.Printf("[DEBUG] Reading pricing of products: %s", params) resp, err := conn.GetProducts(params) if err != nil { - return fmt.Errorf("Error reading Pricing of EC2 products: %s", err) + return fmt.Errorf("Error reading pricing of products: %s", err) } if err = verifyProductsPriceListLength(resp.PriceList); err != nil { diff --git a/website/docs/d/pricing_product.html.markdown b/website/docs/d/pricing_product.html.markdown new file mode 100644 index 00000000000..1233f314515 --- /dev/null +++ b/website/docs/d/pricing_product.html.markdown @@ -0,0 +1,76 @@ +--- +layout: "aws" +page_title: "AWS: aws_pricing_product" +sidebar_current: "docs-aws-datasource-pricing-product" +description: |- + Get information regarding the pricing of an Amazon product +--- + +# Data Source: aws_pricing_product + +Use this data source to get the pricing information of all products in AWS. +This data source is only available in a us-east-1 or ap-south-1 provider. + +## Example Usage + +```hcl +data "aws_pricing_product" "test1" { + service_code = "AmazonEC2" + + filters = [ + { + field = "instanceType" + value = "c5.xlarge" + }, + { + field = "operatingSystem" + value = "Linux" + }, + { + field = "location" + value = "US East (N. Virginia)" + }, + { + field = "preInstalledSw" + value = "NA" + }, + { + field = "licenseModel" + value = "No License required" + }, + { + field = "tenancy" + value = "Shared" + }, + ] + + json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" +} + +data "aws_pricing_product" "test2" { + service_code = "AmazonRedshift" + + filters = [ + { + field = "instanceType" + value = "ds1.xlarge" + }, + { + field = "location" + value = "US East (N. Virginia)" + }, + ] + + json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" +} +``` + +## Argument Reference + + * `service_code` - (Required) The code of the service. Available service codes can be fetched using the DescribeServices pricing API call. + * `filters` - (Required) A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API. + * `json_query` - (Required) The JSON query used to fetch the wanted value. In a [GJSON format](https://github.com/tidwall/gjson). + +## Attributes Reference + + * `query_result` - Set to the result of the JSON query applied on the product returned from the API. From 6c3c1fbb219496139d4a1ce9c096b57ae0554e6e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Jul 2018 13:48:43 -0400 Subject: [PATCH 1726/3316] resource/aws_kms_grant: Properly return error when listing KMS grants --- aws/resource_aws_kms_grant.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_kms_grant.go b/aws/resource_aws_kms_grant.go index 880cbaf074a..585ce6b93b8 100644 --- a/aws/resource_aws_kms_grant.go +++ b/aws/resource_aws_kms_grant.go @@ -393,13 +393,16 @@ func findKmsGrantById(conn *kms.KMS, keyId string, grantId string, marker *strin return nil }) + if err != nil { + return nil, fmt.Errorf("error listing KMS Grants: %s", err) + } grant = getKmsGrantById(out.Grants, grantId) if grant != nil { return grant, nil } - if *out.Truncated { - log.Printf("[DEBUG] KMS Grant list truncated, getting next page via marker: %s", *out.NextMarker) + if aws.BoolValue(out.Truncated) { + log.Printf("[DEBUG] KMS Grant list truncated, getting next page via marker: %s", aws.StringValue(out.NextMarker)) return findKmsGrantById(conn, keyId, grantId, out.NextMarker) } From 35790716f0bda46491b771611686459e176a4188 Mon Sep 17 00:00:00 2001 From: Dieter De Meyer Date: Tue, 3 Jul 2018 20:10:20 +0200 Subject: [PATCH 1727/3316] Fix test case + update documentation --- aws/data_source_aws_instances_test.go | 2 +- website/docs/d/instances.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/data_source_aws_instances_test.go b/aws/data_source_aws_instances_test.go index 60c7f7cb2e3..a886e3b68af 100644 --- a/aws/data_source_aws_instances_test.go +++ b/aws/data_source_aws_instances_test.go @@ -160,7 +160,7 @@ resource "aws_instance" "test" { data "aws_instances" "test" { instance_tags { - Name = "*" + Name = "${aws_instance.test.0.tags["Name"]}" } instance_state_names = [ "pending", "running" ] diff --git a/website/docs/d/instances.html.markdown b/website/docs/d/instances.html.markdown index c67f990862d..dd16fe7a70e 100644 --- a/website/docs/d/instances.html.markdown +++ b/website/docs/d/instances.html.markdown @@ -47,7 +47,7 @@ resource "aws_eip" "test" { * `instance_tags` - (Optional) A mapping of tags, each pair of which must exactly match a pair on desired instances. -* `instance_state_names` - (Optional) A list of instance states that should be applicable to the desired instances. The permitted values are: `pending, running, shutting-down, stopped, stopping, terminated` +* `instance_state_names` - (Optional) A list of instance states that should be applicable to the desired instances. The permitted values are: `pending, running, shutting-down, stopped, stopping, terminated`. The default value is `running`. * `filter` - (Optional) One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out From d403191e3ff0940bd76c687707719b04a5c2fa2a Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 3 Jul 2018 18:53:54 -0400 Subject: [PATCH 1728/3316] Remove JSON dependency according to PR comments --- aws/data_source_aws_pricing_product.go | 14 +- aws/data_source_aws_pricing_product_test.go | 50 +- vendor/github.com/tidwall/gjson/LICENSE | 20 - vendor/github.com/tidwall/gjson/README.md | 401 ---- vendor/github.com/tidwall/gjson/gjson.go | 2087 ----------------- vendor/github.com/tidwall/gjson/gjson_gae.go | 10 - vendor/github.com/tidwall/gjson/gjson_ngae.go | 73 - vendor/github.com/tidwall/gjson/logo.png | Bin 15936 -> 0 bytes vendor/github.com/tidwall/match/LICENSE | 20 - vendor/github.com/tidwall/match/README.md | 32 - vendor/github.com/tidwall/match/match.go | 192 -- vendor/vendor.json | 14 - website/docs/d/pricing_product.html.markdown | 7 +- 13 files changed, 17 insertions(+), 2903 deletions(-) delete mode 100644 vendor/github.com/tidwall/gjson/LICENSE delete mode 100644 vendor/github.com/tidwall/gjson/README.md delete mode 100644 vendor/github.com/tidwall/gjson/gjson.go delete mode 100644 vendor/github.com/tidwall/gjson/gjson_gae.go delete mode 100644 vendor/github.com/tidwall/gjson/gjson_ngae.go delete mode 100644 vendor/github.com/tidwall/gjson/logo.png delete mode 100644 vendor/github.com/tidwall/match/LICENSE delete mode 100644 vendor/github.com/tidwall/match/README.md delete mode 100644 vendor/github.com/tidwall/match/match.go diff --git a/aws/data_source_aws_pricing_product.go b/aws/data_source_aws_pricing_product.go index 43502b06688..79d26b9d350 100644 --- a/aws/data_source_aws_pricing_product.go +++ b/aws/data_source_aws_pricing_product.go @@ -9,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/service/pricing" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" - "github.com/tidwall/gjson" ) const ( @@ -41,11 +40,7 @@ func dataSourceAwsPricingProduct() *schema.Resource { }, }, }, - "json_query": { - Type: schema.TypeString, - Required: true, - }, - "query_result": { + "result": { Type: schema.TypeString, Computed: true, }, @@ -86,11 +81,8 @@ func dataSourceAwsPricingProductRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Invalid JSON value returned by AWS: %s", err) } - jsonQuery := d.Get("json_query").(string) - queryResult := gjson.Get(string(pricingResult), jsonQuery) - - d.SetId(fmt.Sprintf("%d-%d", hashcode.String(params.String()), hashcode.String(jsonQuery))) - d.Set("query_result", queryResult.String()) + d.SetId(fmt.Sprintf("%d", hashcode.String(params.String()))) + d.Set("result", string(pricingResult)) return nil } diff --git a/aws/data_source_aws_pricing_product_test.go b/aws/data_source_aws_pricing_product_test.go index 8f90c5224f3..ed9ee03c264 100644 --- a/aws/data_source_aws_pricing_product_test.go +++ b/aws/data_source_aws_pricing_product_test.go @@ -1,9 +1,9 @@ package aws import ( + "encoding/json" "fmt" "os" - "strconv" "testing" "github.com/hashicorp/terraform/helper/resource" @@ -17,13 +17,10 @@ func TestAccDataSourceAwsPricingProduct_ec2(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccDataSourceAwsPricingProductConfigEc2("test1", "c5.large") + testAccDataSourceAwsPricingProductConfigEc2("test2", "c5.xlarge"), + Config: testAccDataSourceAwsPricingProductConfigEc2("test", "c5.large"), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttrSet("data.aws_pricing_product.test1", "query_result"), - resource.TestCheckResourceAttrSet("data.aws_pricing_product.test2", "query_result"), - testAccPricingCheckValueIsFloat("data.aws_pricing_product.test1"), - testAccPricingCheckValueIsFloat("data.aws_pricing_product.test2"), - testAccPricingCheckGreaterValue("data.aws_pricing_product.test2", "data.aws_pricing_product.test1"), + resource.TestCheckResourceAttrSet("data.aws_pricing_product.test", "result"), + testAccPricingCheckValueIsJSON("data.aws_pricing_product.test"), ), }, }, @@ -39,8 +36,8 @@ func TestAccDataSourceAwsPricingProduct_redshift(t *testing.T) { { Config: testAccDataSourceAwsPricingProductConfigRedshift(), Check: resource.ComposeAggregateTestCheckFunc( - resource.TestCheckResourceAttrSet("data.aws_pricing_product.test", "query_result"), - testAccPricingCheckValueIsFloat("data.aws_pricing_product.test"), + resource.TestCheckResourceAttrSet("data.aws_pricing_product.test", "result"), + testAccPricingCheckValueIsJSON("data.aws_pricing_product.test"), ), }, }, @@ -77,8 +74,6 @@ func testAccDataSourceAwsPricingProductConfigEc2(dataName string, instanceType s value = "Shared" }, ] - - json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" } `, dataName, instanceType) } @@ -97,13 +92,11 @@ func testAccDataSourceAwsPricingProductConfigRedshift() string { value = "US East (N. Virginia)" }, ] - - json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" } `) } -func testAccPricingCheckValueIsFloat(data string) resource.TestCheckFunc { +func testAccPricingCheckValueIsJSON(data string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[data] @@ -111,32 +104,15 @@ func testAccPricingCheckValueIsFloat(data string) resource.TestCheckFunc { return fmt.Errorf("Can't find resource: %s", data) } - queryResult := rs.Primary.Attributes["query_result"] - if _, err := strconv.ParseFloat(queryResult, 32); err != nil { - return fmt.Errorf("%s query_result value (%s) is not a float: %s", data, queryResult, err) - } - - return nil - } -} + result := rs.Primary.Attributes["result"] + var objmap map[string]*json.RawMessage -func testAccPricingCheckGreaterValue(dataWithGreaterValue string, otherData string) resource.TestCheckFunc { - return func(s *terraform.State) error { - greaterResource, ok := s.RootModule().Resources[dataWithGreaterValue] - if !ok { - return fmt.Errorf("Can't find resource: %s", dataWithGreaterValue) - } - - lesserResource, ok := s.RootModule().Resources[otherData] - if !ok { - return fmt.Errorf("Can't find resource: %s", otherData) + if err := json.Unmarshal([]byte(result), &objmap); err != nil { + return fmt.Errorf("%s result value (%s) is not JSON: %s", data, result, err) } - greaterValue := greaterResource.Primary.Attributes["query_result"] - lesserValue := lesserResource.Primary.Attributes["query_result"] - - if greaterValue <= lesserValue { - return fmt.Errorf("%s (%s) has a greater value than %s (%s). Should have been the opposite", otherData, lesserValue, dataWithGreaterValue, greaterValue) + if len(objmap) == 0 { + return fmt.Errorf("%s result value (%s) unmarshalling resulted in an empty map", data, result) } return nil diff --git a/vendor/github.com/tidwall/gjson/LICENSE b/vendor/github.com/tidwall/gjson/LICENSE deleted file mode 100644 index 58f5819a438..00000000000 --- a/vendor/github.com/tidwall/gjson/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Josh Baker - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/tidwall/gjson/README.md b/vendor/github.com/tidwall/gjson/README.md deleted file mode 100644 index 70240d99279..00000000000 --- a/vendor/github.com/tidwall/gjson/README.md +++ /dev/null @@ -1,401 +0,0 @@ -

-GJSON -
-Build Status -GoDoc -GJSON Playground -

- - - -

get json values quickly

- -GJSON is a Go package that provides a [fast](#performance) and [simple](#get-a-value) way to get values from a json document. -It has features such as [one line retrieval](#get-a-value), [dot notation paths](#path-syntax), [iteration](#iterate-through-an-object-or-array), and [parsing json lines](#json-lines). - -Also check out [SJSON](https://github.com/tidwall/sjson) for modifying json, and the [JJ](https://github.com/tidwall/jj) command line tool. - -Getting Started -=============== - -## Installing - -To start using GJSON, install Go and run `go get`: - -```sh -$ go get -u github.com/tidwall/gjson -``` - -This will retrieve the library. - -## Get a value -Get searches json for the specified path. A path is in dot syntax, such as "name.last" or "age". When the value is found it's returned immediately. - -```go -package main - -import "github.com/tidwall/gjson" - -const json = `{"name":{"first":"Janet","last":"Prichard"},"age":47}` - -func main() { - value := gjson.Get(json, "name.last") - println(value.String()) -} -``` - -This will print: - -``` -Prichard -``` -*There's also the [GetMany](#get-multiple-values-at-once) function to get multiple values at once, and [GetBytes](#working-with-bytes) for working with JSON byte slices.* - -## Path Syntax - -A path is a series of keys separated by a dot. -A key may contain special wildcard characters '\*' and '?'. -To access an array value use the index as the key. -To get the number of elements in an array or to access a child path, use the '#' character. -The dot and wildcard characters can be escaped with '\\'. - -```json -{ - "name": {"first": "Tom", "last": "Anderson"}, - "age":37, - "children": ["Sara","Alex","Jack"], - "fav.movie": "Deer Hunter", - "friends": [ - {"first": "Dale", "last": "Murphy", "age": 44}, - {"first": "Roger", "last": "Craig", "age": 68}, - {"first": "Jane", "last": "Murphy", "age": 47} - ] -} -``` -``` -"name.last" >> "Anderson" -"age" >> 37 -"children" >> ["Sara","Alex","Jack"] -"children.#" >> 3 -"children.1" >> "Alex" -"child*.2" >> "Jack" -"c?ildren.0" >> "Sara" -"fav\.movie" >> "Deer Hunter" -"friends.#.first" >> ["Dale","Roger","Jane"] -"friends.1.last" >> "Craig" -``` - -You can also query an array for the first match by using `#[...]`, or find all matches with `#[...]#`. -Queries support the `==`, `!=`, `<`, `<=`, `>`, `>=` comparison operators and the simple pattern matching `%` operator. - -``` -friends.#[last=="Murphy"].first >> "Dale" -friends.#[last=="Murphy"]#.first >> ["Dale","Jane"] -friends.#[age>45]#.last >> ["Craig","Murphy"] -friends.#[first%"D*"].last >> "Murphy" -``` - -## JSON Lines - -There's support for [JSON Lines](http://jsonlines.org/) using the `..` prefix, which treats a multilined document as an array. - -For example: - -``` -{"name": "Gilbert", "age": 61} -{"name": "Alexa", "age": 34} -{"name": "May", "age": 57} -{"name": "Deloise", "age": 44} -``` - -``` -..# >> 4 -..1 >> {"name": "Alexa", "age": 34} -..3 >> {"name": "Deloise", "age": 44} -..#.name >> ["Gilbert","Alexa","May","Deloise"] -..#[name="May"].age >> 57 -``` - -The `ForEachLines` function will iterate through JSON lines. - -```go -gjson.ForEachLine(json, func(line gjson.Result) bool{ - println(line.String()) - return true -}) -``` - -## Result Type - -GJSON supports the json types `string`, `number`, `bool`, and `null`. -Arrays and Objects are returned as their raw json types. - -The `Result` type holds one of these: - -``` -bool, for JSON booleans -float64, for JSON numbers -string, for JSON string literals -nil, for JSON null -``` - -To directly access the value: - -```go -result.Type // can be String, Number, True, False, Null, or JSON -result.Str // holds the string -result.Num // holds the float64 number -result.Raw // holds the raw json -result.Index // index of raw value in original json, zero means index unknown -``` - -There are a variety of handy functions that work on a result: - -```go -result.Exists() bool -result.Value() interface{} -result.Int() int64 -result.Uint() uint64 -result.Float() float64 -result.String() string -result.Bool() bool -result.Time() time.Time -result.Array() []gjson.Result -result.Map() map[string]gjson.Result -result.Get(path string) Result -result.ForEach(iterator func(key, value Result) bool) -result.Less(token Result, caseSensitive bool) bool -``` - -The `result.Value()` function returns an `interface{}` which requires type assertion and is one of the following Go types: - -The `result.Array()` function returns back an array of values. -If the result represents a non-existent value, then an empty array will be returned. -If the result is not a JSON array, the return value will be an array containing one result. - -```go -boolean >> bool -number >> float64 -string >> string -null >> nil -array >> []interface{} -object >> map[string]interface{} -``` - -### 64-bit integers - -The `result.Int()` and `result.Uint()` calls are capable of reading all 64 bits, allowing for large JSON integers. - -```go -result.Int() int64 // -9223372036854775808 to 9223372036854775807 -result.Uint() int64 // 0 to 18446744073709551615 -``` - -## Get nested array values - -Suppose you want all the last names from the following json: - -```json -{ - "programmers": [ - { - "firstName": "Janet", - "lastName": "McLaughlin", - }, { - "firstName": "Elliotte", - "lastName": "Hunter", - }, { - "firstName": "Jason", - "lastName": "Harold", - } - ] -} -``` - -You would use the path "programmers.#.lastName" like such: - -```go -result := gjson.Get(json, "programmers.#.lastName") -for _, name := range result.Array() { - println(name.String()) -} -``` - -You can also query an object inside an array: - -```go -name := gjson.Get(json, `programmers.#[lastName="Hunter"].firstName`) -println(name.String()) // prints "Elliotte" -``` - -## Iterate through an object or array - -The `ForEach` function allows for quickly iterating through an object or array. -The key and value are passed to the iterator function for objects. -Only the value is passed for arrays. -Returning `false` from an iterator will stop iteration. - -```go -result := gjson.Get(json, "programmers") -result.ForEach(func(key, value gjson.Result) bool { - println(value.String()) - return true // keep iterating -}) -``` - -## Simple Parse and Get - -There's a `Parse(json)` function that will do a simple parse, and `result.Get(path)` that will search a result. - -For example, all of these will return the same result: - -```go -gjson.Parse(json).Get("name").Get("last") -gjson.Get(json, "name").Get("last") -gjson.Get(json, "name.last") -``` - -## Check for the existence of a value - -Sometimes you just want to know if a value exists. - -```go -value := gjson.Get(json, "name.last") -if !value.Exists() { - println("no last name") -} else { - println(value.String()) -} - -// Or as one step -if gjson.Get(json, "name.last").Exists() { - println("has a last name") -} -``` - -## Validate JSON - -The `Get*` and `Parse*` functions expects that the json is well-formed. Bad json will not panic, but it may return back unexpected results. - -If you are consuming JSON from an unpredictable source then you may want to validate prior to using GJSON. - -```go -if !gjson.Valid(json) { - return errors.New("invalid json") -} -value := gjson.Get(json, "name.last") -``` - -## Unmarshal to a map - -To unmarshal to a `map[string]interface{}`: - -```go -m, ok := gjson.Parse(json).Value().(map[string]interface{}) -if !ok { - // not a map -} -``` - -## Working with Bytes - -If your JSON is contained in a `[]byte` slice, there's the [GetBytes](https://godoc.org/github.com/tidwall/gjson#GetBytes) function. This is preferred over `Get(string(data), path)`. - -```go -var json []byte = ... -result := gjson.GetBytes(json, path) -``` - -If you are using the `gjson.GetBytes(json, path)` function and you want to avoid converting `result.Raw` to a `[]byte`, then you can use this pattern: - -```go -var json []byte = ... -result := gjson.GetBytes(json, path) -var raw []byte -if result.Index > 0 { - raw = json[result.Index:result.Index+len(result.Raw)] -} else { - raw = []byte(result.Raw) -} -``` - -This is a best-effort no allocation sub slice of the original json. This method utilizes the `result.Index` field, which is the position of the raw data in the original json. It's possible that the value of `result.Index` equals zero, in which case the `result.Raw` is converted to a `[]byte`. - -## Get multiple values at once - -The `GetMany` function can be used to get multiple values at the same time. - -```go -results := gjson.GetMany(json, "name.first", "name.last", "age") -``` - -The return value is a `[]Result`, which will always contain exactly the same number of items as the input paths. - -## Performance - -Benchmarks of GJSON alongside [encoding/json](https://golang.org/pkg/encoding/json/), -[ffjson](https://github.com/pquerna/ffjson), -[EasyJSON](https://github.com/mailru/easyjson), -[jsonparser](https://github.com/buger/jsonparser), -and [json-iterator](https://github.com/json-iterator/go) - -``` -BenchmarkGJSONGet-8 3000000 372 ns/op 0 B/op 0 allocs/op -BenchmarkGJSONUnmarshalMap-8 900000 4154 ns/op 1920 B/op 26 allocs/op -BenchmarkJSONUnmarshalMap-8 600000 9019 ns/op 3048 B/op 69 allocs/op -BenchmarkJSONDecoder-8 300000 14120 ns/op 4224 B/op 184 allocs/op -BenchmarkFFJSONLexer-8 1500000 3111 ns/op 896 B/op 8 allocs/op -BenchmarkEasyJSONLexer-8 3000000 887 ns/op 613 B/op 6 allocs/op -BenchmarkJSONParserGet-8 3000000 499 ns/op 21 B/op 0 allocs/op -BenchmarkJSONIterator-8 3000000 812 ns/op 544 B/op 9 allocs/op -``` - -JSON document used: - -```json -{ - "widget": { - "debug": "on", - "window": { - "title": "Sample Konfabulator Widget", - "name": "main_window", - "width": 500, - "height": 500 - }, - "image": { - "src": "Images/Sun.png", - "hOffset": 250, - "vOffset": 250, - "alignment": "center" - }, - "text": { - "data": "Click Here", - "size": 36, - "style": "bold", - "vOffset": 100, - "alignment": "center", - "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" - } - } -} -``` - -Each operation was rotated though one of the following search paths: - -``` -widget.window.name -widget.image.hOffset -widget.text.onMouseUp -``` - -*These benchmarks were run on a MacBook Pro 15" 2.8 GHz Intel Core i7 using Go 1.8 and can be be found [here](https://github.com/tidwall/gjson-benchmarks).* - - -## Contact -Josh Baker [@tidwall](http://twitter.com/tidwall) - -## License - -GJSON source code is available under the MIT [License](/LICENSE). diff --git a/vendor/github.com/tidwall/gjson/gjson.go b/vendor/github.com/tidwall/gjson/gjson.go deleted file mode 100644 index 9ffd77dad5d..00000000000 --- a/vendor/github.com/tidwall/gjson/gjson.go +++ /dev/null @@ -1,2087 +0,0 @@ -// Package gjson provides searching for json strings. -package gjson - -import ( - "encoding/base64" - "encoding/json" - "errors" - "reflect" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - "unicode/utf16" - "unicode/utf8" - - "github.com/tidwall/match" -) - -// Type is Result type -type Type int - -const ( - // Null is a null json value - Null Type = iota - // False is a json false boolean - False - // Number is json number - Number - // String is a json string - String - // True is a json true boolean - True - // JSON is a raw block of JSON - JSON -) - -// String returns a string representation of the type. -func (t Type) String() string { - switch t { - default: - return "" - case Null: - return "Null" - case False: - return "False" - case Number: - return "Number" - case String: - return "String" - case True: - return "True" - case JSON: - return "JSON" - } -} - -// Result represents a json value that is returned from Get(). -type Result struct { - // Type is the json type - Type Type - // Raw is the raw json - Raw string - // Str is the json string - Str string - // Num is the json number - Num float64 - // Index of raw value in original json, zero means index unknown - Index int -} - -// String returns a string representation of the value. -func (t Result) String() string { - switch t.Type { - default: - return "" - case False: - return "false" - case Number: - return strconv.FormatFloat(t.Num, 'f', -1, 64) - case String: - return t.Str - case JSON: - return t.Raw - case True: - return "true" - } -} - -// Bool returns an boolean representation. -func (t Result) Bool() bool { - switch t.Type { - default: - return false - case True: - return true - case String: - return t.Str != "" && t.Str != "0" && t.Str != "false" - case Number: - return t.Num != 0 - } -} - -// Int returns an integer representation. -func (t Result) Int() int64 { - switch t.Type { - default: - return 0 - case True: - return 1 - case String: - n, _ := parseInt(t.Str) - return n - case Number: - // try to directly convert the float64 to int64 - n, ok := floatToInt(t.Num) - if !ok { - // now try to parse the raw string - n, ok = parseInt(t.Raw) - if !ok { - // fallback to a standard conversion - return int64(t.Num) - } - } - return n - } -} - -// Uint returns an unsigned integer representation. -func (t Result) Uint() uint64 { - switch t.Type { - default: - return 0 - case True: - return 1 - case String: - n, _ := parseUint(t.Str) - return n - case Number: - // try to directly convert the float64 to uint64 - n, ok := floatToUint(t.Num) - if !ok { - // now try to parse the raw string - n, ok = parseUint(t.Raw) - if !ok { - // fallback to a standard conversion - return uint64(t.Num) - } - } - return n - } -} - -// Float returns an float64 representation. -func (t Result) Float() float64 { - switch t.Type { - default: - return 0 - case True: - return 1 - case String: - n, _ := strconv.ParseFloat(t.Str, 64) - return n - case Number: - return t.Num - } -} - -// Time returns a time.Time representation. -func (t Result) Time() time.Time { - res, _ := time.Parse(time.RFC3339, t.String()) - return res -} - -// Array returns back an array of values. -// If the result represents a non-existent value, then an empty array will be returned. -// If the result is not a JSON array, the return value will be an array containing one result. -func (t Result) Array() []Result { - if t.Type == Null { - return []Result{} - } - if t.Type != JSON { - return []Result{t} - } - r := t.arrayOrMap('[', false) - return r.a -} - -// IsObject returns true if the result value is a JSON object. -func (t Result) IsObject() bool { - return t.Type == JSON && len(t.Raw) > 0 && t.Raw[0] == '{' -} - -// IsArray returns true if the result value is a JSON array. -func (t Result) IsArray() bool { - return t.Type == JSON && len(t.Raw) > 0 && t.Raw[0] == '[' -} - -// ForEach iterates through values. -// If the result represents a non-existent value, then no values will be iterated. -// If the result is an Object, the iterator will pass the key and value of each item. -// If the result is an Array, the iterator will only pass the value of each item. -// If the result is not a JSON array or object, the iterator will pass back one value equal to the result. -func (t Result) ForEach(iterator func(key, value Result) bool) { - if !t.Exists() { - return - } - if t.Type != JSON { - iterator(Result{}, t) - return - } - json := t.Raw - var keys bool - var i int - var key, value Result - for ; i < len(json); i++ { - if json[i] == '{' { - i++ - key.Type = String - keys = true - break - } else if json[i] == '[' { - i++ - break - } - if json[i] > ' ' { - return - } - } - var str string - var vesc bool - var ok bool - for ; i < len(json); i++ { - if keys { - if json[i] != '"' { - continue - } - s := i - i, str, vesc, ok = parseString(json, i+1) - if !ok { - return - } - if vesc { - key.Str = unescape(str[1 : len(str)-1]) - } else { - key.Str = str[1 : len(str)-1] - } - key.Raw = str - key.Index = s - } - for ; i < len(json); i++ { - if json[i] <= ' ' || json[i] == ',' || json[i] == ':' { - continue - } - break - } - s := i - i, value, ok = parseAny(json, i, true) - if !ok { - return - } - value.Index = s - if !iterator(key, value) { - return - } - } -} - -// Map returns back an map of values. The result should be a JSON array. -func (t Result) Map() map[string]Result { - if t.Type != JSON { - return map[string]Result{} - } - r := t.arrayOrMap('{', false) - return r.o -} - -// Get searches result for the specified path. -// The result should be a JSON array or object. -func (t Result) Get(path string) Result { - return Get(t.Raw, path) -} - -type arrayOrMapResult struct { - a []Result - ai []interface{} - o map[string]Result - oi map[string]interface{} - vc byte -} - -func (t Result) arrayOrMap(vc byte, valueize bool) (r arrayOrMapResult) { - var json = t.Raw - var i int - var value Result - var count int - var key Result - if vc == 0 { - for ; i < len(json); i++ { - if json[i] == '{' || json[i] == '[' { - r.vc = json[i] - i++ - break - } - if json[i] > ' ' { - goto end - } - } - } else { - for ; i < len(json); i++ { - if json[i] == vc { - i++ - break - } - if json[i] > ' ' { - goto end - } - } - r.vc = vc - } - if r.vc == '{' { - if valueize { - r.oi = make(map[string]interface{}) - } else { - r.o = make(map[string]Result) - } - } else { - if valueize { - r.ai = make([]interface{}, 0) - } else { - r.a = make([]Result, 0) - } - } - for ; i < len(json); i++ { - if json[i] <= ' ' { - continue - } - // get next value - if json[i] == ']' || json[i] == '}' { - break - } - switch json[i] { - default: - if (json[i] >= '0' && json[i] <= '9') || json[i] == '-' { - value.Type = Number - value.Raw, value.Num = tonum(json[i:]) - } else { - continue - } - case '{', '[': - value.Type = JSON - value.Raw = squash(json[i:]) - case 'n': - value.Type = Null - value.Raw = tolit(json[i:]) - case 't': - value.Type = True - value.Raw = tolit(json[i:]) - case 'f': - value.Type = False - value.Raw = tolit(json[i:]) - case '"': - value.Type = String - value.Raw, value.Str = tostr(json[i:]) - } - i += len(value.Raw) - 1 - - if r.vc == '{' { - if count%2 == 0 { - key = value - } else { - if valueize { - r.oi[key.Str] = value.Value() - } else { - r.o[key.Str] = value - } - } - count++ - } else { - if valueize { - r.ai = append(r.ai, value.Value()) - } else { - r.a = append(r.a, value) - } - } - } -end: - return -} - -// Parse parses the json and returns a result. -// -// This function expects that the json is well-formed, and does not validate. -// Invalid json will not panic, but it may return back unexpected results. -// If you are consuming JSON from an unpredictable source then you may want to -// use the Valid function first. -func Parse(json string) Result { - var value Result - for i := 0; i < len(json); i++ { - if json[i] == '{' || json[i] == '[' { - value.Type = JSON - value.Raw = json[i:] // just take the entire raw - break - } - if json[i] <= ' ' { - continue - } - switch json[i] { - default: - if (json[i] >= '0' && json[i] <= '9') || json[i] == '-' { - value.Type = Number - value.Raw, value.Num = tonum(json[i:]) - } else { - return Result{} - } - case 'n': - value.Type = Null - value.Raw = tolit(json[i:]) - case 't': - value.Type = True - value.Raw = tolit(json[i:]) - case 'f': - value.Type = False - value.Raw = tolit(json[i:]) - case '"': - value.Type = String - value.Raw, value.Str = tostr(json[i:]) - } - break - } - return value -} - -// ParseBytes parses the json and returns a result. -// If working with bytes, this method preferred over Parse(string(data)) -func ParseBytes(json []byte) Result { - return Parse(string(json)) -} - -func squash(json string) string { - // expects that the lead character is a '[' or '{' - // squash the value, ignoring all nested arrays and objects. - // the first '[' or '{' has already been read - depth := 1 - for i := 1; i < len(json); i++ { - if json[i] >= '"' && json[i] <= '}' { - switch json[i] { - case '"': - i++ - s2 := i - for ; i < len(json); i++ { - if json[i] > '\\' { - continue - } - if json[i] == '"' { - // look for an escaped slash - if json[i-1] == '\\' { - n := 0 - for j := i - 2; j > s2-1; j-- { - if json[j] != '\\' { - break - } - n++ - } - if n%2 == 0 { - continue - } - } - break - } - } - case '{', '[': - depth++ - case '}', ']': - depth-- - if depth == 0 { - return json[:i+1] - } - } - } - } - return json -} - -func tonum(json string) (raw string, num float64) { - for i := 1; i < len(json); i++ { - // less than dash might have valid characters - if json[i] <= '-' { - if json[i] <= ' ' || json[i] == ',' { - // break on whitespace and comma - raw = json[:i] - num, _ = strconv.ParseFloat(raw, 64) - return - } - // could be a '+' or '-'. let's assume so. - continue - } - if json[i] < ']' { - // probably a valid number - continue - } - if json[i] == 'e' || json[i] == 'E' { - // allow for exponential numbers - continue - } - // likely a ']' or '}' - raw = json[:i] - num, _ = strconv.ParseFloat(raw, 64) - return - } - raw = json - num, _ = strconv.ParseFloat(raw, 64) - return -} - -func tolit(json string) (raw string) { - for i := 1; i < len(json); i++ { - if json[i] < 'a' || json[i] > 'z' { - return json[:i] - } - } - return json -} - -func tostr(json string) (raw string, str string) { - // expects that the lead character is a '"' - for i := 1; i < len(json); i++ { - if json[i] > '\\' { - continue - } - if json[i] == '"' { - return json[:i+1], json[1:i] - } - if json[i] == '\\' { - i++ - for ; i < len(json); i++ { - if json[i] > '\\' { - continue - } - if json[i] == '"' { - // look for an escaped slash - if json[i-1] == '\\' { - n := 0 - for j := i - 2; j > 0; j-- { - if json[j] != '\\' { - break - } - n++ - } - if n%2 == 0 { - continue - } - } - break - } - } - var ret string - if i+1 < len(json) { - ret = json[:i+1] - } else { - ret = json[:i] - } - return ret, unescape(json[1:i]) - } - } - return json, json[1:] -} - -// Exists returns true if value exists. -// -// if gjson.Get(json, "name.last").Exists(){ -// println("value exists") -// } -func (t Result) Exists() bool { - return t.Type != Null || len(t.Raw) != 0 -} - -// Value returns one of these types: -// -// bool, for JSON booleans -// float64, for JSON numbers -// Number, for JSON numbers -// string, for JSON string literals -// nil, for JSON null -// map[string]interface{}, for JSON objects -// []interface{}, for JSON arrays -// -func (t Result) Value() interface{} { - if t.Type == String { - return t.Str - } - switch t.Type { - default: - return nil - case False: - return false - case Number: - return t.Num - case JSON: - r := t.arrayOrMap(0, true) - if r.vc == '{' { - return r.oi - } else if r.vc == '[' { - return r.ai - } - return nil - case True: - return true - } -} - -func parseString(json string, i int) (int, string, bool, bool) { - var s = i - for ; i < len(json); i++ { - if json[i] > '\\' { - continue - } - if json[i] == '"' { - return i + 1, json[s-1 : i+1], false, true - } - if json[i] == '\\' { - i++ - for ; i < len(json); i++ { - if json[i] > '\\' { - continue - } - if json[i] == '"' { - // look for an escaped slash - if json[i-1] == '\\' { - n := 0 - for j := i - 2; j > 0; j-- { - if json[j] != '\\' { - break - } - n++ - } - if n%2 == 0 { - continue - } - } - return i + 1, json[s-1 : i+1], true, true - } - } - break - } - } - return i, json[s-1:], false, false -} - -func parseNumber(json string, i int) (int, string) { - var s = i - i++ - for ; i < len(json); i++ { - if json[i] <= ' ' || json[i] == ',' || json[i] == ']' || json[i] == '}' { - return i, json[s:i] - } - } - return i, json[s:] -} - -func parseLiteral(json string, i int) (int, string) { - var s = i - i++ - for ; i < len(json); i++ { - if json[i] < 'a' || json[i] > 'z' { - return i, json[s:i] - } - } - return i, json[s:] -} - -type arrayPathResult struct { - part string - path string - more bool - alogok bool - arrch bool - alogkey string - query struct { - on bool - path string - op string - value string - all bool - } -} - -func parseArrayPath(path string) (r arrayPathResult) { - for i := 0; i < len(path); i++ { - if path[i] == '.' { - r.part = path[:i] - r.path = path[i+1:] - r.more = true - return - } - if path[i] == '#' { - r.arrch = true - if i == 0 && len(path) > 1 { - if path[1] == '.' { - r.alogok = true - r.alogkey = path[2:] - r.path = path[:1] - } else if path[1] == '[' { - r.query.on = true - // query - i += 2 - // whitespace - for ; i < len(path); i++ { - if path[i] > ' ' { - break - } - } - s := i - for ; i < len(path); i++ { - if path[i] <= ' ' || - path[i] == '!' || - path[i] == '=' || - path[i] == '<' || - path[i] == '>' || - path[i] == '%' || - path[i] == ']' { - break - } - } - r.query.path = path[s:i] - // whitespace - for ; i < len(path); i++ { - if path[i] > ' ' { - break - } - } - if i < len(path) { - s = i - if path[i] == '!' { - if i < len(path)-1 && path[i+1] == '=' { - i++ - } - } else if path[i] == '<' || path[i] == '>' { - if i < len(path)-1 && path[i+1] == '=' { - i++ - } - } else if path[i] == '=' { - if i < len(path)-1 && path[i+1] == '=' { - s++ - i++ - } - } - i++ - r.query.op = path[s:i] - // whitespace - for ; i < len(path); i++ { - if path[i] > ' ' { - break - } - } - s = i - for ; i < len(path); i++ { - if path[i] == '"' { - i++ - s2 := i - for ; i < len(path); i++ { - if path[i] > '\\' { - continue - } - if path[i] == '"' { - // look for an escaped slash - if path[i-1] == '\\' { - n := 0 - for j := i - 2; j > s2-1; j-- { - if path[j] != '\\' { - break - } - n++ - } - if n%2 == 0 { - continue - } - } - break - } - } - } else if path[i] == ']' { - if i+1 < len(path) && path[i+1] == '#' { - r.query.all = true - } - break - } - } - if i > len(path) { - i = len(path) - } - v := path[s:i] - for len(v) > 0 && v[len(v)-1] <= ' ' { - v = v[:len(v)-1] - } - r.query.value = v - } - } - } - continue - } - } - r.part = path - r.path = "" - return -} - -type objectPathResult struct { - part string - path string - wild bool - more bool -} - -func parseObjectPath(path string) (r objectPathResult) { - for i := 0; i < len(path); i++ { - if path[i] == '.' { - r.part = path[:i] - r.path = path[i+1:] - r.more = true - return - } - if path[i] == '*' || path[i] == '?' { - r.wild = true - continue - } - if path[i] == '\\' { - // go into escape mode. this is a slower path that - // strips off the escape character from the part. - epart := []byte(path[:i]) - i++ - if i < len(path) { - epart = append(epart, path[i]) - i++ - for ; i < len(path); i++ { - if path[i] == '\\' { - i++ - if i < len(path) { - epart = append(epart, path[i]) - } - continue - } else if path[i] == '.' { - r.part = string(epart) - r.path = path[i+1:] - r.more = true - return - } else if path[i] == '*' || path[i] == '?' { - r.wild = true - } - epart = append(epart, path[i]) - } - } - // append the last part - r.part = string(epart) - return - } - } - r.part = path - return -} - -func parseSquash(json string, i int) (int, string) { - // expects that the lead character is a '[' or '{' - // squash the value, ignoring all nested arrays and objects. - // the first '[' or '{' has already been read - s := i - i++ - depth := 1 - for ; i < len(json); i++ { - if json[i] >= '"' && json[i] <= '}' { - switch json[i] { - case '"': - i++ - s2 := i - for ; i < len(json); i++ { - if json[i] > '\\' { - continue - } - if json[i] == '"' { - // look for an escaped slash - if json[i-1] == '\\' { - n := 0 - for j := i - 2; j > s2-1; j-- { - if json[j] != '\\' { - break - } - n++ - } - if n%2 == 0 { - continue - } - } - break - } - } - case '{', '[': - depth++ - case '}', ']': - depth-- - if depth == 0 { - i++ - return i, json[s:i] - } - } - } - } - return i, json[s:] -} - -func parseObject(c *parseContext, i int, path string) (int, bool) { - var pmatch, kesc, vesc, ok, hit bool - var key, val string - rp := parseObjectPath(path) - for i < len(c.json) { - for ; i < len(c.json); i++ { - if c.json[i] == '"' { - // parse_key_string - // this is slightly different from getting s string value - // because we don't need the outer quotes. - i++ - var s = i - for ; i < len(c.json); i++ { - if c.json[i] > '\\' { - continue - } - if c.json[i] == '"' { - i, key, kesc, ok = i+1, c.json[s:i], false, true - goto parse_key_string_done - } - if c.json[i] == '\\' { - i++ - for ; i < len(c.json); i++ { - if c.json[i] > '\\' { - continue - } - if c.json[i] == '"' { - // look for an escaped slash - if c.json[i-1] == '\\' { - n := 0 - for j := i - 2; j > 0; j-- { - if c.json[j] != '\\' { - break - } - n++ - } - if n%2 == 0 { - continue - } - } - i, key, kesc, ok = i+1, c.json[s:i], true, true - goto parse_key_string_done - } - } - break - } - } - key, kesc, ok = c.json[s:], false, false - parse_key_string_done: - break - } - if c.json[i] == '}' { - return i + 1, false - } - } - if !ok { - return i, false - } - if rp.wild { - if kesc { - pmatch = match.Match(unescape(key), rp.part) - } else { - pmatch = match.Match(key, rp.part) - } - } else { - if kesc { - pmatch = rp.part == unescape(key) - } else { - pmatch = rp.part == key - } - } - hit = pmatch && !rp.more - for ; i < len(c.json); i++ { - switch c.json[i] { - default: - continue - case '"': - i++ - i, val, vesc, ok = parseString(c.json, i) - if !ok { - return i, false - } - if hit { - if vesc { - c.value.Str = unescape(val[1 : len(val)-1]) - } else { - c.value.Str = val[1 : len(val)-1] - } - c.value.Raw = val - c.value.Type = String - return i, true - } - case '{': - if pmatch && !hit { - i, hit = parseObject(c, i+1, rp.path) - if hit { - return i, true - } - } else { - i, val = parseSquash(c.json, i) - if hit { - c.value.Raw = val - c.value.Type = JSON - return i, true - } - } - case '[': - if pmatch && !hit { - i, hit = parseArray(c, i+1, rp.path) - if hit { - return i, true - } - } else { - i, val = parseSquash(c.json, i) - if hit { - c.value.Raw = val - c.value.Type = JSON - return i, true - } - } - case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - i, val = parseNumber(c.json, i) - if hit { - c.value.Raw = val - c.value.Type = Number - c.value.Num, _ = strconv.ParseFloat(val, 64) - return i, true - } - case 't', 'f', 'n': - vc := c.json[i] - i, val = parseLiteral(c.json, i) - if hit { - c.value.Raw = val - switch vc { - case 't': - c.value.Type = True - case 'f': - c.value.Type = False - } - return i, true - } - } - break - } - } - return i, false -} -func queryMatches(rp *arrayPathResult, value Result) bool { - rpv := rp.query.value - if len(rpv) > 2 && rpv[0] == '"' && rpv[len(rpv)-1] == '"' { - rpv = rpv[1 : len(rpv)-1] - } - switch value.Type { - case String: - switch rp.query.op { - case "=": - return value.Str == rpv - case "!=": - return value.Str != rpv - case "<": - return value.Str < rpv - case "<=": - return value.Str <= rpv - case ">": - return value.Str > rpv - case ">=": - return value.Str >= rpv - case "%": - return match.Match(value.Str, rpv) - } - case Number: - rpvn, _ := strconv.ParseFloat(rpv, 64) - switch rp.query.op { - case "=": - return value.Num == rpvn - case "!=": - return value.Num != rpvn - case "<": - return value.Num < rpvn - case "<=": - return value.Num <= rpvn - case ">": - return value.Num > rpvn - case ">=": - return value.Num >= rpvn - } - case True: - switch rp.query.op { - case "=": - return rpv == "true" - case "!=": - return rpv != "true" - case ">": - return rpv == "false" - case ">=": - return true - } - case False: - switch rp.query.op { - case "=": - return rpv == "false" - case "!=": - return rpv != "false" - case "<": - return rpv == "true" - case "<=": - return true - } - } - return false -} -func parseArray(c *parseContext, i int, path string) (int, bool) { - var pmatch, vesc, ok, hit bool - var val string - var h int - var alog []int - var partidx int - var multires []byte - rp := parseArrayPath(path) - if !rp.arrch { - n, ok := parseUint(rp.part) - if !ok { - partidx = -1 - } else { - partidx = int(n) - } - } - for i < len(c.json)+1 { - if !rp.arrch { - pmatch = partidx == h - hit = pmatch && !rp.more - } - h++ - if rp.alogok { - alog = append(alog, i) - } - for ; ; i++ { - var ch byte - if i > len(c.json) { - break - } else if i == len(c.json) { - ch = ']' - } else { - ch = c.json[i] - } - switch ch { - default: - continue - case '"': - i++ - i, val, vesc, ok = parseString(c.json, i) - if !ok { - return i, false - } - if hit { - if rp.alogok { - break - } - if vesc { - c.value.Str = unescape(val[1 : len(val)-1]) - } else { - c.value.Str = val[1 : len(val)-1] - } - c.value.Raw = val - c.value.Type = String - return i, true - } - case '{': - if pmatch && !hit { - i, hit = parseObject(c, i+1, rp.path) - if hit { - if rp.alogok { - break - } - return i, true - } - } else { - i, val = parseSquash(c.json, i) - if rp.query.on { - res := Get(val, rp.query.path) - if queryMatches(&rp, res) { - if rp.more { - res = Get(val, rp.path) - } else { - res = Result{Raw: val, Type: JSON} - } - if rp.query.all { - if len(multires) == 0 { - multires = append(multires, '[') - } else { - multires = append(multires, ',') - } - multires = append(multires, res.Raw...) - } else { - c.value = res - return i, true - } - } - } else if hit { - if rp.alogok { - break - } - c.value.Raw = val - c.value.Type = JSON - return i, true - } - } - case '[': - if pmatch && !hit { - i, hit = parseArray(c, i+1, rp.path) - if hit { - if rp.alogok { - break - } - return i, true - } - } else { - i, val = parseSquash(c.json, i) - if hit { - if rp.alogok { - break - } - c.value.Raw = val - c.value.Type = JSON - return i, true - } - } - case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - i, val = parseNumber(c.json, i) - if hit { - if rp.alogok { - break - } - c.value.Raw = val - c.value.Type = Number - c.value.Num, _ = strconv.ParseFloat(val, 64) - return i, true - } - case 't', 'f', 'n': - vc := c.json[i] - i, val = parseLiteral(c.json, i) - if hit { - if rp.alogok { - break - } - c.value.Raw = val - switch vc { - case 't': - c.value.Type = True - case 'f': - c.value.Type = False - } - return i, true - } - case ']': - if rp.arrch && rp.part == "#" { - if rp.alogok { - var jsons = make([]byte, 0, 64) - jsons = append(jsons, '[') - - for j, k := 0, 0; j < len(alog); j++ { - _, res, ok := parseAny(c.json, alog[j], true) - if ok { - res := res.Get(rp.alogkey) - if res.Exists() { - if k > 0 { - jsons = append(jsons, ',') - } - jsons = append(jsons, []byte(res.Raw)...) - k++ - } - } - } - jsons = append(jsons, ']') - c.value.Type = JSON - c.value.Raw = string(jsons) - return i + 1, true - } - if rp.alogok { - break - } - c.value.Raw = val - c.value.Type = Number - c.value.Num = float64(h - 1) - c.calcd = true - return i + 1, true - } - if len(multires) > 0 && !c.value.Exists() { - c.value = Result{ - Raw: string(append(multires, ']')), - Type: JSON, - } - } - return i + 1, false - } - break - } - } - return i, false -} - -// ForEachLine iterates through lines of JSON as specified by the JSON Lines -// format (http://jsonlines.org/). -// Each line is returned as a GJSON Result. -func ForEachLine(json string, iterator func(line Result) bool) { - var res Result - var i int - for { - i, res, _ = parseAny(json, i, true) - if !res.Exists() { - break - } - if !iterator(res) { - return - } - } -} - -type parseContext struct { - json string - value Result - calcd bool - lines bool -} - -// Get searches json for the specified path. -// A path is in dot syntax, such as "name.last" or "age". -// When the value is found it's returned immediately. -// -// A path is a series of keys searated by a dot. -// A key may contain special wildcard characters '*' and '?'. -// To access an array value use the index as the key. -// To get the number of elements in an array or to access a child path, use the '#' character. -// The dot and wildcard character can be escaped with '\'. -// -// { -// "name": {"first": "Tom", "last": "Anderson"}, -// "age":37, -// "children": ["Sara","Alex","Jack"], -// "friends": [ -// {"first": "James", "last": "Murphy"}, -// {"first": "Roger", "last": "Craig"} -// ] -// } -// "name.last" >> "Anderson" -// "age" >> 37 -// "children" >> ["Sara","Alex","Jack"] -// "children.#" >> 3 -// "children.1" >> "Alex" -// "child*.2" >> "Jack" -// "c?ildren.0" >> "Sara" -// "friends.#.first" >> ["James","Roger"] -// -// This function expects that the json is well-formed, and does not validate. -// Invalid json will not panic, but it may return back unexpected results. -// If you are consuming JSON from an unpredictable source then you may want to -// use the Valid function first. -func Get(json, path string) Result { - var i int - var c = &parseContext{json: json} - if len(path) >= 2 && path[0] == '.' && path[1] == '.' { - c.lines = true - parseArray(c, 0, path[2:]) - } else { - for ; i < len(c.json); i++ { - if c.json[i] == '{' { - i++ - parseObject(c, i, path) - break - } - if c.json[i] == '[' { - i++ - parseArray(c, i, path) - break - } - } - } - fillIndex(json, c) - return c.value -} - -// GetBytes searches json for the specified path. -// If working with bytes, this method preferred over Get(string(data), path) -func GetBytes(json []byte, path string) Result { - return getBytes(json, path) -} - -// runeit returns the rune from the the \uXXXX -func runeit(json string) rune { - n, _ := strconv.ParseUint(json[:4], 16, 64) - return rune(n) -} - -// unescape unescapes a string -func unescape(json string) string { //, error) { - var str = make([]byte, 0, len(json)) - for i := 0; i < len(json); i++ { - switch { - default: - str = append(str, json[i]) - case json[i] < ' ': - return string(str) - case json[i] == '\\': - i++ - if i >= len(json) { - return string(str) - } - switch json[i] { - default: - return string(str) - case '\\': - str = append(str, '\\') - case '/': - str = append(str, '/') - case 'b': - str = append(str, '\b') - case 'f': - str = append(str, '\f') - case 'n': - str = append(str, '\n') - case 'r': - str = append(str, '\r') - case 't': - str = append(str, '\t') - case '"': - str = append(str, '"') - case 'u': - if i+5 > len(json) { - return string(str) - } - r := runeit(json[i+1:]) - i += 5 - if utf16.IsSurrogate(r) { - // need another code - if len(json[i:]) >= 6 && json[i] == '\\' && json[i+1] == 'u' { - // we expect it to be correct so just consume it - r = utf16.DecodeRune(r, runeit(json[i+2:])) - i += 6 - } - } - // provide enough space to encode the largest utf8 possible - str = append(str, 0, 0, 0, 0, 0, 0, 0, 0) - n := utf8.EncodeRune(str[len(str)-8:], r) - str = str[:len(str)-8+n] - i-- // backtrack index by one - } - } - } - return string(str) -} - -// Less return true if a token is less than another token. -// The caseSensitive paramater is used when the tokens are Strings. -// The order when comparing two different type is: -// -// Null < False < Number < String < True < JSON -// -func (t Result) Less(token Result, caseSensitive bool) bool { - if t.Type < token.Type { - return true - } - if t.Type > token.Type { - return false - } - if t.Type == String { - if caseSensitive { - return t.Str < token.Str - } - return stringLessInsensitive(t.Str, token.Str) - } - if t.Type == Number { - return t.Num < token.Num - } - return t.Raw < token.Raw -} - -func stringLessInsensitive(a, b string) bool { - for i := 0; i < len(a) && i < len(b); i++ { - if a[i] >= 'A' && a[i] <= 'Z' { - if b[i] >= 'A' && b[i] <= 'Z' { - // both are uppercase, do nothing - if a[i] < b[i] { - return true - } else if a[i] > b[i] { - return false - } - } else { - // a is uppercase, convert a to lowercase - if a[i]+32 < b[i] { - return true - } else if a[i]+32 > b[i] { - return false - } - } - } else if b[i] >= 'A' && b[i] <= 'Z' { - // b is uppercase, convert b to lowercase - if a[i] < b[i]+32 { - return true - } else if a[i] > b[i]+32 { - return false - } - } else { - // neither are uppercase - if a[i] < b[i] { - return true - } else if a[i] > b[i] { - return false - } - } - } - return len(a) < len(b) -} - -// parseAny parses the next value from a json string. -// A Result is returned when the hit param is set. -// The return values are (i int, res Result, ok bool) -func parseAny(json string, i int, hit bool) (int, Result, bool) { - var res Result - var val string - for ; i < len(json); i++ { - if json[i] == '{' || json[i] == '[' { - i, val = parseSquash(json, i) - if hit { - res.Raw = val - res.Type = JSON - } - return i, res, true - } - if json[i] <= ' ' { - continue - } - switch json[i] { - case '"': - i++ - var vesc bool - var ok bool - i, val, vesc, ok = parseString(json, i) - if !ok { - return i, res, false - } - if hit { - res.Type = String - res.Raw = val - if vesc { - res.Str = unescape(val[1 : len(val)-1]) - } else { - res.Str = val[1 : len(val)-1] - } - } - return i, res, true - case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - i, val = parseNumber(json, i) - if hit { - res.Raw = val - res.Type = Number - res.Num, _ = strconv.ParseFloat(val, 64) - } - return i, res, true - case 't', 'f', 'n': - vc := json[i] - i, val = parseLiteral(json, i) - if hit { - res.Raw = val - switch vc { - case 't': - res.Type = True - case 'f': - res.Type = False - } - return i, res, true - } - } - } - return i, res, false -} - -var ( // used for testing - testWatchForFallback bool - testLastWasFallback bool -) - -// GetMany searches json for the multiple paths. -// The return value is a Result array where the number of items -// will be equal to the number of input paths. -func GetMany(json string, path ...string) []Result { - res := make([]Result, len(path)) - for i, path := range path { - res[i] = Get(json, path) - } - return res -} - -// GetManyBytes searches json for the multiple paths. -// The return value is a Result array where the number of items -// will be equal to the number of input paths. -func GetManyBytes(json []byte, path ...string) []Result { - return GetMany(string(json), path...) -} - -var fieldsmu sync.RWMutex -var fields = make(map[string]map[string]int) - -func assign(jsval Result, goval reflect.Value) { - if jsval.Type == Null { - return - } - switch goval.Kind() { - default: - case reflect.Ptr: - if !goval.IsNil() { - newval := reflect.New(goval.Elem().Type()) - assign(jsval, newval.Elem()) - goval.Elem().Set(newval.Elem()) - } else { - newval := reflect.New(goval.Type().Elem()) - assign(jsval, newval.Elem()) - goval.Set(newval) - } - case reflect.Struct: - fieldsmu.RLock() - sf := fields[goval.Type().String()] - fieldsmu.RUnlock() - if sf == nil { - fieldsmu.Lock() - sf = make(map[string]int) - for i := 0; i < goval.Type().NumField(); i++ { - f := goval.Type().Field(i) - tag := strings.Split(f.Tag.Get("json"), ",")[0] - if tag != "-" { - if tag != "" { - sf[tag] = i - sf[f.Name] = i - } else { - sf[f.Name] = i - } - } - } - fields[goval.Type().String()] = sf - fieldsmu.Unlock() - } - jsval.ForEach(func(key, value Result) bool { - if idx, ok := sf[key.Str]; ok { - f := goval.Field(idx) - if f.CanSet() { - assign(value, f) - } - } - return true - }) - case reflect.Slice: - if goval.Type().Elem().Kind() == reflect.Uint8 && jsval.Type == String { - data, _ := base64.StdEncoding.DecodeString(jsval.String()) - goval.Set(reflect.ValueOf(data)) - } else { - jsvals := jsval.Array() - slice := reflect.MakeSlice(goval.Type(), len(jsvals), len(jsvals)) - for i := 0; i < len(jsvals); i++ { - assign(jsvals[i], slice.Index(i)) - } - goval.Set(slice) - } - case reflect.Array: - i, n := 0, goval.Len() - jsval.ForEach(func(_, value Result) bool { - if i == n { - return false - } - assign(value, goval.Index(i)) - i++ - return true - }) - case reflect.Map: - if goval.Type().Key().Kind() == reflect.String && goval.Type().Elem().Kind() == reflect.Interface { - goval.Set(reflect.ValueOf(jsval.Value())) - } - case reflect.Interface: - goval.Set(reflect.ValueOf(jsval.Value())) - case reflect.Bool: - goval.SetBool(jsval.Bool()) - case reflect.Float32, reflect.Float64: - goval.SetFloat(jsval.Float()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - goval.SetInt(jsval.Int()) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - goval.SetUint(jsval.Uint()) - case reflect.String: - goval.SetString(jsval.String()) - } - if len(goval.Type().PkgPath()) > 0 { - v := goval.Addr() - if v.Type().NumMethod() > 0 { - if u, ok := v.Interface().(json.Unmarshaler); ok { - u.UnmarshalJSON([]byte(jsval.Raw)) - } - } - } -} - -var validate uintptr = 1 - -// UnmarshalValidationEnabled provides the option to disable JSON validation -// during the Unmarshal routine. Validation is enabled by default. -// -// Deprecated: Use encoder/json.Unmarshal instead -func UnmarshalValidationEnabled(enabled bool) { - if enabled { - atomic.StoreUintptr(&validate, 1) - } else { - atomic.StoreUintptr(&validate, 0) - } -} - -// Unmarshal loads the JSON data into the value pointed to by v. -// -// This function works almost identically to json.Unmarshal except that -// gjson.Unmarshal will automatically attempt to convert JSON values to any Go -// type. For example, the JSON string "100" or the JSON number 100 can be equally -// assigned to Go string, int, byte, uint64, etc. This rule applies to all types. -// -// Deprecated: Use encoder/json.Unmarshal instead -func Unmarshal(data []byte, v interface{}) error { - if atomic.LoadUintptr(&validate) == 1 { - _, ok := validpayload(data, 0) - if !ok { - return errors.New("invalid json") - } - } - if v := reflect.ValueOf(v); v.Kind() == reflect.Ptr { - assign(ParseBytes(data), v) - } - return nil -} - -func validpayload(data []byte, i int) (outi int, ok bool) { - for ; i < len(data); i++ { - switch data[i] { - default: - i, ok = validany(data, i) - if !ok { - return i, false - } - for ; i < len(data); i++ { - switch data[i] { - default: - return i, false - case ' ', '\t', '\n', '\r': - continue - } - } - return i, true - case ' ', '\t', '\n', '\r': - continue - } - } - return i, false -} -func validany(data []byte, i int) (outi int, ok bool) { - for ; i < len(data); i++ { - switch data[i] { - default: - return i, false - case ' ', '\t', '\n', '\r': - continue - case '{': - return validobject(data, i+1) - case '[': - return validarray(data, i+1) - case '"': - return validstring(data, i+1) - case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - return validnumber(data, i+1) - case 't': - return validtrue(data, i+1) - case 'f': - return validfalse(data, i+1) - case 'n': - return validnull(data, i+1) - } - } - return i, false -} -func validobject(data []byte, i int) (outi int, ok bool) { - for ; i < len(data); i++ { - switch data[i] { - default: - return i, false - case ' ', '\t', '\n', '\r': - continue - case '}': - return i + 1, true - case '"': - key: - if i, ok = validstring(data, i+1); !ok { - return i, false - } - if i, ok = validcolon(data, i); !ok { - return i, false - } - if i, ok = validany(data, i); !ok { - return i, false - } - if i, ok = validcomma(data, i, '}'); !ok { - return i, false - } - if data[i] == '}' { - return i + 1, true - } - i++ - for ; i < len(data); i++ { - switch data[i] { - default: - return i, false - case ' ', '\t', '\n', '\r': - continue - case '"': - goto key - } - } - return i, false - } - } - return i, false -} -func validcolon(data []byte, i int) (outi int, ok bool) { - for ; i < len(data); i++ { - switch data[i] { - default: - return i, false - case ' ', '\t', '\n', '\r': - continue - case ':': - return i + 1, true - } - } - return i, false -} -func validcomma(data []byte, i int, end byte) (outi int, ok bool) { - for ; i < len(data); i++ { - switch data[i] { - default: - return i, false - case ' ', '\t', '\n', '\r': - continue - case ',': - return i, true - case end: - return i, true - } - } - return i, false -} -func validarray(data []byte, i int) (outi int, ok bool) { - for ; i < len(data); i++ { - switch data[i] { - default: - for ; i < len(data); i++ { - if i, ok = validany(data, i); !ok { - return i, false - } - if i, ok = validcomma(data, i, ']'); !ok { - return i, false - } - if data[i] == ']' { - return i + 1, true - } - } - case ' ', '\t', '\n', '\r': - continue - case ']': - return i + 1, true - } - } - return i, false -} -func validstring(data []byte, i int) (outi int, ok bool) { - for ; i < len(data); i++ { - if data[i] < ' ' { - return i, false - } else if data[i] == '\\' { - i++ - if i == len(data) { - return i, false - } - switch data[i] { - default: - return i, false - case '"', '\\', '/', 'b', 'f', 'n', 'r', 't': - case 'u': - for j := 0; j < 4; j++ { - i++ - if i >= len(data) { - return i, false - } - if !((data[i] >= '0' && data[i] <= '9') || - (data[i] >= 'a' && data[i] <= 'f') || - (data[i] >= 'A' && data[i] <= 'F')) { - return i, false - } - } - } - } else if data[i] == '"' { - return i + 1, true - } - } - return i, false -} -func validnumber(data []byte, i int) (outi int, ok bool) { - i-- - // sign - if data[i] == '-' { - i++ - } - // int - if i == len(data) { - return i, false - } - if data[i] == '0' { - i++ - } else { - for ; i < len(data); i++ { - if data[i] >= '0' && data[i] <= '9' { - continue - } - break - } - } - // frac - if i == len(data) { - return i, true - } - if data[i] == '.' { - i++ - if i == len(data) { - return i, false - } - if data[i] < '0' || data[i] > '9' { - return i, false - } - i++ - for ; i < len(data); i++ { - if data[i] >= '0' && data[i] <= '9' { - continue - } - break - } - } - // exp - if i == len(data) { - return i, true - } - if data[i] == 'e' || data[i] == 'E' { - i++ - if i == len(data) { - return i, false - } - if data[i] == '+' || data[i] == '-' { - i++ - } - if i == len(data) { - return i, false - } - if data[i] < '0' || data[i] > '9' { - return i, false - } - i++ - for ; i < len(data); i++ { - if data[i] >= '0' && data[i] <= '9' { - continue - } - break - } - } - return i, true -} - -func validtrue(data []byte, i int) (outi int, ok bool) { - if i+3 <= len(data) && data[i] == 'r' && data[i+1] == 'u' && data[i+2] == 'e' { - return i + 3, true - } - return i, false -} -func validfalse(data []byte, i int) (outi int, ok bool) { - if i+4 <= len(data) && data[i] == 'a' && data[i+1] == 'l' && data[i+2] == 's' && data[i+3] == 'e' { - return i + 4, true - } - return i, false -} -func validnull(data []byte, i int) (outi int, ok bool) { - if i+3 <= len(data) && data[i] == 'u' && data[i+1] == 'l' && data[i+2] == 'l' { - return i + 3, true - } - return i, false -} - -// Valid returns true if the input is valid json. -// -// if !gjson.Valid(json) { -// return errors.New("invalid json") -// } -// value := gjson.Get(json, "name.last") -// -func Valid(json string) bool { - _, ok := validpayload([]byte(json), 0) - return ok -} - -// ValidBytes returns true if the input is valid json. -// -// if !gjson.Valid(json) { -// return errors.New("invalid json") -// } -// value := gjson.Get(json, "name.last") -// -// If working with bytes, this method preferred over Valid(string(data)) -// -func ValidBytes(json []byte) bool { - _, ok := validpayload(json, 0) - return ok -} - -func parseUint(s string) (n uint64, ok bool) { - var i int - if i == len(s) { - return 0, false - } - for ; i < len(s); i++ { - if s[i] >= '0' && s[i] <= '9' { - n = n*10 + uint64(s[i]-'0') - } else { - return 0, false - } - } - return n, true -} - -func parseInt(s string) (n int64, ok bool) { - var i int - var sign bool - if len(s) > 0 && s[0] == '-' { - sign = true - i++ - } - if i == len(s) { - return 0, false - } - for ; i < len(s); i++ { - if s[i] >= '0' && s[i] <= '9' { - n = n*10 + int64(s[i]-'0') - } else { - return 0, false - } - } - if sign { - return n * -1, true - } - return n, true -} - -const minUint53 = 0 -const maxUint53 = 4503599627370495 -const minInt53 = -2251799813685248 -const maxInt53 = 2251799813685247 - -func floatToUint(f float64) (n uint64, ok bool) { - n = uint64(f) - if float64(n) == f && n >= minUint53 && n <= maxUint53 { - return n, true - } - return 0, false -} - -func floatToInt(f float64) (n int64, ok bool) { - n = int64(f) - if float64(n) == f && n >= minInt53 && n <= maxInt53 { - return n, true - } - return 0, false -} diff --git a/vendor/github.com/tidwall/gjson/gjson_gae.go b/vendor/github.com/tidwall/gjson/gjson_gae.go deleted file mode 100644 index cbe2ab420b7..00000000000 --- a/vendor/github.com/tidwall/gjson/gjson_gae.go +++ /dev/null @@ -1,10 +0,0 @@ -//+build appengine - -package gjson - -func getBytes(json []byte, path string) Result { - return Get(string(json), path) -} -func fillIndex(json string, c *parseContext) { - // noop. Use zero for the Index value. -} diff --git a/vendor/github.com/tidwall/gjson/gjson_ngae.go b/vendor/github.com/tidwall/gjson/gjson_ngae.go deleted file mode 100644 index ff313a78796..00000000000 --- a/vendor/github.com/tidwall/gjson/gjson_ngae.go +++ /dev/null @@ -1,73 +0,0 @@ -//+build !appengine - -package gjson - -import ( - "reflect" - "unsafe" -) - -// getBytes casts the input json bytes to a string and safely returns the -// results as uniquely allocated data. This operation is intended to minimize -// copies and allocations for the large json string->[]byte. -func getBytes(json []byte, path string) Result { - var result Result - if json != nil { - // unsafe cast to string - result = Get(*(*string)(unsafe.Pointer(&json)), path) - result = fromBytesGet(result) - } - return result -} - -func fromBytesGet(result Result) Result { - // safely get the string headers - rawhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Raw)) - strhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Str)) - // create byte slice headers - rawh := reflect.SliceHeader{Data: rawhi.Data, Len: rawhi.Len} - strh := reflect.SliceHeader{Data: strhi.Data, Len: strhi.Len} - if strh.Data == 0 { - // str is nil - if rawh.Data == 0 { - // raw is nil - result.Raw = "" - } else { - // raw has data, safely copy the slice header to a string - result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) - } - result.Str = "" - } else if rawh.Data == 0 { - // raw is nil - result.Raw = "" - // str has data, safely copy the slice header to a string - result.Str = string(*(*[]byte)(unsafe.Pointer(&strh))) - } else if strh.Data >= rawh.Data && - int(strh.Data)+strh.Len <= int(rawh.Data)+rawh.Len { - // Str is a substring of Raw. - start := int(strh.Data - rawh.Data) - // safely copy the raw slice header - result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) - // substring the raw - result.Str = result.Raw[start : start+strh.Len] - } else { - // safely copy both the raw and str slice headers to strings - result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh))) - result.Str = string(*(*[]byte)(unsafe.Pointer(&strh))) - } - return result -} - -// fillIndex finds the position of Raw data and assigns it to the Index field -// of the resulting value. If the position cannot be found then Index zero is -// used instead. -func fillIndex(json string, c *parseContext) { - if len(c.value.Raw) > 0 && !c.calcd { - jhdr := *(*reflect.StringHeader)(unsafe.Pointer(&json)) - rhdr := *(*reflect.StringHeader)(unsafe.Pointer(&(c.value.Raw))) - c.value.Index = int(rhdr.Data - jhdr.Data) - if c.value.Index < 0 || c.value.Index >= len(json) { - c.value.Index = 0 - } - } -} diff --git a/vendor/github.com/tidwall/gjson/logo.png b/vendor/github.com/tidwall/gjson/logo.png deleted file mode 100644 index 17a8bbe9d651e5d79cbd59a3645a152443440ad6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15936 zcmdseRa9I})9xU_0znfrFi3EBcXtB8-Q8tyw?MEE+&u)>;O-g-!QF!n?wrm0ecyln zi+`Pqb92@@b204MboZ|AuIj4isoIgsic)AO1SlX72u(&>{38ei4_w2jBEbT8g#0}> zfj{`J5}K~64(6^NM$Tp+5mN_aGq8-Ek%ieuGb2+^ry(I^6HUo1oax$2(u&{u+covw&X$WR|Y3j=W4v9v&Wy9&C&b&K688JUl#1%&bhTtPDU41{Y6zS0f06 zy$kt&Mi4i1F>$tXbhUD@2fvJHWbEMPDnJHE`mZV2IVvdp*TD8J|6V9y$(SHUj!Z0! z%uIH6FZ24RwTtUVv;Qr||Jd3^&C}70>7$v8gPXGnupj2+|LF{@-T(PPFAV`{c$J*3 zfK4&76?ZUkvoo`Il@S*p1OCHkYGukR$|buuylm3H z<}7aJY~^ldD(UQC2mWW3d9D5jDR|g;*tw0_nHkJkjZ7HWS$Vh_jJR2u8Q6HtIgQO& zSd4j$Sjqm~-}Jw&-oLaIxC6|@@jn9bnzJ+W7@M$}GZ-0hn=-JlaPctk7_+f5@NjXm zahsTP8Jln!kud=xGQB9ye^aFY+yb=o6ILj1BiHWiOsHjwSN(6-S#&IQQX(?!~oRWla6k zvj3m#lk>9cCv!wc6L6R*c~`T5NT-O!e%&k`LRLWCk5V)xyH@qD}#ba7*ern zD^KwwL26x@_H9n^_xJEwj%`LF z2_M&3l{$q7;~URr@StEw0z3u!#j3ZdE5%$S1w0iM^K2@_(3KW1T0xFBPH3#1nB2_f zvBMJo!z+(+E_6G$0(R-JL<$OXHd^e=iug&_x%->yfVBZnFV3sIHbvZbAFwXaW7AoKsJ9QG z>$+mQV_~P4&z8jBcSvrf!^$eZC-BSslJQJOm4Sir>t!xQeA0}meB*bk78Ll6JYotw zFN_tm1+Ok3dz)A2wN_Xinfj#Ee?*6SsMzd_g;n4n@*KNU9c5|uUDdVb5;09jU=BA8 z7Ip^CUs>Q(aGI&ybtyH$7K|L2U(LdFslcD0RJYaHH%xx{O^TZmsdabO$yfZSTX|)r z=-oR$toP)*A6N)!Ci&fYk#B|NMo}VC;kw_(;DJ=HK8MnXxCRjx zm+Ele5%M~`%RXZFhRaja zofW}k`izaw_BnN>(4NODngeC2ev#$a0Za@}FunO>tS9?CYq6*J5?4v-!SCmNEg}($ zsiIfoly7`UXRh?F`!)YcJa>S4yLz&L#;kL&6#~9Ni+?|0z}yLl+KUVh*{UN zQL82>H7J0_BwzsZbE2-owg@HT^}ncXoZ;dh4@Ag(^&lQPK)^E=LOJs3m1N!Uj9F54V7Fy*9;Hf!S| z2Vtfjj8{AZ6|UJ&-*wZR;=h8&K-WF?$U44F^rNysF*k#YfwM3ww(UIiz!K$Vl6g^; zpZSmDI41>YtUMi>*8?muaBUxB;C6#-g+)6l$2v@q$uZDbJ6wES8#l*s2D<1?VzXJ$ zNn3AE*NNnAtmKenlM+7=mM9>ZV6zb+`lI$2@hpIeP1DdcS*Cvz5A~9(XQ5ee8Zy?1 zV$H!Cd=InD(OPcd;^t`I|2d8dNC%ws6z&4#gegDv>rH+oz!8Nz>NP}eD-R;bVvA0S z5fJb?Ou@|fK(P*e**ICmfISbcs}Y$fZuREW@ZFBDNYmhXW7PA6V7+}jLHzU1y=p!n z^hyRvQ|hIqYYoin6oO1NuT}m&C#3Y93YZnNA2Tz$8cr96%FkEFIxLhO1c8xa?YS>1 zYfbRvnrv%W@wwZlMg$41zv!F1Uthy~PJ0n;XM;%WG#G1Z(D~^_heW34*YaC}4fwaY zQ_|5S2@Q6+L&grf$wpF2KXm2n`%skl-*5HsEQC3gz~7nJ8i!$efQc!-p`}FGdT|bp zjc+K291ok>nAU4-{|as^#|^q`l>3ommlA=!Yk*~f4lIlN?BhIKO<)tnThs?ySx%(Q zZ{BqMNZOg7QO=}w219Yn;z5ayrjclN12jx{->DqdA?>)@B*M55Z6*>9uOVG^g4+gB$$ z&!XEFAyF0vK@Hi45CHqg@K*IEb;v3e@Qc{QP%M+qSM^o+6flzV`6>&uh)6U4UOl>Y zUko)LSj?`l;=xRs21!m{!rvOi>)at<`A6r#TDg{HRsnKvk6eoC&S-x#Mq{7vf>j;i zpoU-IgJbwqGu*^D+T5dUG0a_I-j;HEIj*%e?#p&>hhO%ho;0*k&ga~7^2w21Ks!^N zJ88HQ;e-ECm0XE^;oQz-+JymauGTlg2o=jQD#D!&eneT>3#Y{`@=}~!gct3epErdK zU`nI?9GgnOgA%X>7A8>kKcDjv8zn1;!d*!BC&n1*8?K}4xYS*8J-uGJt;RUTVXir%{}C0=q5B02D<=xOiYxcn?4l1}Em4lV07IMeqs8t@G*e)leU z^LZ&bK;v9xiiAiYvcgAIY^ z{hsN<54t}2vf2`*A~p<)503a+JOop=cS87$R%0Y9b}n%u{HMx2QvUVcnksc$0lfh| zO+0575+Z)~?&@C8M99dsa?f$2%sd?hq|Ds&;G=9fK537ECE{4uO>1(q_^&|Vlh_Gr>&p4j#CTe1bR2DJ_0}1+G9&6IH~WZ{A=YBXE4q6-nx9bn^kCGD zKq`a|i1oH?5f(Dp2PUamK}6jL3(BY6_{%!xtDA#drfkJ=#M6{`HRjVF)bpUQq&Ef6 zyRCSNEr>MF%a_m1u9p-Py~pK8D7c5rSo^`&g9y&-@)_~;#h*R~7VEJ@5*>Y+Ig5{* z{KaPMCB3%XAcWYoc^46OK;ZSTx9HGO-}GxhBWm@2u4qc+2r6b_aBFo$7yfX_H3CEQ zaAx(~OTHSE^w9jPe|Db0^FFGfRAv|V-o14(YFFLKu2^KV)OYV$MilR}0%8L8mXrX# z?aXNsv{y&t%MTik%-A};(yQA&Eexy&Tel+t@?5=F>qE*mRdi^0cko1yYtB`K{ocK2 ze?^g1EeKeXFLrFjvhUiy$_GM26OFkX+qLLsXfuf_ zAiE6m$DGN>RDMk}<35n$|sHc(gYzBw5(l8USpk56G_tt5v zT2RPk>)0{R5nwf2>%09ZBb^t1O4UtbrXz%J=bQ7Aj>{^+T`g!YD&6-HAA&h~?oH{F z-*(;OvA=)%wE6M!TY|;d-~Kce;ebbI&U$_a!QI&6cp@;QC-Ynh;FOeB9wl}vAGWi_ zI6Eb)y%&;;oN5BIUcqEK(H~zuZ*l#_kGGu+l9nrvvTET;x{?m&Pz z)6(6l?`Nf+N{at87srvs@R$3YNC|1B5vn8BpnndfCUEtywUobq0}Eh3Y)W$a((OMt zeVTMUi_J2y7^X9|!b=N>O53xrkSYtG=HIjP+ixUv0p0}H|0JbRs^%hA!Jwk}>L&MM z80l=$8*p?p5nqzB2flUC+qS5co0cA{{~DgUCuuOfxzg5oVle|X6R|&z9HyjTBz7=W z6(hQ3!ou1{BT@o3I#0`zwh{7Z9D2aZ8IS0|LDbPB~{a9 zxp|-)J|}zIePx$CI@kZ{&VL_`9mP8HDU)6(_8QG5JF(05;fr7V+K5bA1Etfxgh#5W>6P@@ucg&Jzly%#@3VwSKV{@&j#^M( zTlz^^ZmfJ%6rHQ3%yEH?9(L!Qb(!Do<{dt5FB1GvxNV4LI{Pjr0R!MUrMb5A4pX>C zAxvpRy)idQ1E-@e{fUAX=xnu;V!H}&V4CM$%=yv*v=$M;MOYIcj@A-jG z?Rpip=$Wr@_3CPVC#tvr@>g2)Q4aUQ5cATrcEjnW2##{myh=>MLI$B&y6jSWY!swkxM01Od*SEg zL*Mh~ni#4$)U3y+i&vQhK|9qf!@Ie%77J-pfjx;IqN%|*VX(lO%{8>t0l{p^gB)j@ zJH57Z00N>gy2Swd*!!iFW0?|!a>O(rOZL2g&I>ppw~Od1Z5(JPKd=Q&^ICR7OvUvu z?=;QVzQ(dwYT=aA*Bg?3&P}yAThCa2|K}GvR-m-L*_!MseF=o;M zOc|!hnA_@||7VYZk>zZ=UNBMA*Vtu^yo#aiaXg2+Bh3A_ z*k(u*3VX`)Fpa0tfiD<{pqWjZHrb&h8UI8iP-1;S@Ctq-P$n^!{&NzMp(LvzzPbW5 z&{drM`nf{0E^A*AS;QZ4;qFHOENld#)$;q_vGmq_=O^r}ovg!Le`|uzGHczAnUBcG z`*F2&g&n(N8{#Biba+rq`+AT}7E##C*+mWAHcl~e8IF*BlD}ptBDDp7inFHgCu%CG zMQGj9<9umYwTdv9IK}7?I-Az9B4JJeXGNp&Y~9dg6EMByhM;=CJgzMOHPo|HyPwEF z>AJ~_8b(2SFF>9)iwy@AzPGmoydb?M{G9dKy6!c@N}i|Lt*7q!;Msy>FWlp16n&Oo zmA=5&{-W||a^yg79H=mpEMh=;B08fpy9ZhoVvt6ohvYk&9Dko*huy|_Vcj-#n-^%Y zs(?&;92eWq(+`)_??I^-a?v+g0KQKt*?l$Eba3dO7`iLIHz8VPfP?g+cWvw%=+?0$ zw8JC0o-q5rI(C{(+>M|Yd?#NqbO%~Z8MLGynQ3(_s2no9^BqZSUb>Vsq3+-&Z~pLd z_+I&t*zl@gEawwB70Gx!2LBP^FYe$`QL1{2+{*4>GM~87Lx9~C-tG~*?hRhhc=M|v zKz`3aEk0yz8Txxs?~Urdp+R0uG5?!T)2G;O-?IC#fm9y}er2kwt<)7;#|LG5_jh)$ z2Sc<@EHgtod#3K*7;KqZ%_)YTiJL+t8o!4XIkwUN@t`E$Yq7=AK*!U9H?3HzBPCK4 z1;{FwV^;P{uD18>%3tX3j%6R_MIMv&@f1V4k%w(DWcZccnI;9GVC^$jwAX_dysW1j zM`z~{y%DsP60N1h*GBx4LRqvFn|B3AG`4>4XHx@(`6tg$H8rQaVQ_b9%`q`{{4}r2 z=OP;`SSJVDA#p82i#aqb_VL+eJ|9?gaG4go0A~hZ1+MA=FDhbXUeMCt&#CDcTTP6} zxtZStJ{EiC|G-Fk6MeJpZ%|$9Rn@xfF(WyQBgyfy#vHNweKWz*P#EpEYl?H6KHpMe zvf?*tGh4Og7>Gv?^om*Qpu)Eyho@?PDF~@Ea^wN^&DqhE;aD3KU>Xh(01Gsi_yYOZ*mM@2DpdkOw<+vQpws53fo{ z&wajB`u(vzs_9!4?h&i8?CuR2u+G84+26IV*Kn`^r>fu|-veN(1Zn=_`3YN(XcZ|e1tk=THcWJbl zsYeS(c=;b95uXNv-?n*7v=S{~uMPFRje+fM2G~eIo<0k{7KhLSksr739qkp}2P;MF z#RHd6+;5fK#zzu#)US{5c4HuGKPuG*;1FXZM{@sop4IH+(rfX}ZIm^whc{X<>-WUx=Qlw6^^~L>&&#_wbjA%NM-BO- ziWfJ(=D?Q^MhL3 zhf&VlDz1)-0Zchw2k$O-icKDM^}Uif#Kk9m;R`tpuwOp5cG?~QR}6ZxbSN_q>1prP zakr4;NOzZ;Y^{A;uGpF=CV3`sPEq~4a=}w;)_$M_5ewbN6EZm-FnM6t)+yo$1Xzo8 zIpW+8HNz7 zlkMVkuwUHCF6C}Aw-E@>xDL3Tfbn_4oq*Rv>wJw&{jvDbvdHt}yMJ0Gb!csez+k{> zteQ9MH2^!E*)-B03O|-kOhidM>4!7jddvni6e+3Rhgmz{jFUl94}&j}0ME)Fp%mZ0 zXlE;DA$P!z`Ey7={LOdHkNp(zqOd+a5rWUY-&`B1w6#jF;9ooo#D?cdNf9r=4ZwBl zOS1FBam;Twsy90oaUIT{CrE+w=xr2`$no9-7C=scPgFEzAOBOZ<*$GeQ77bZwMSg@@7fXHj)VSZO3m{PYxnm7QPW=ydOs z{#chl`}vB`$gV*CX!a!p0D-WAVE#D;v=)%6LUt~fUM3C-2r&%X-h~3n92m=ymRYwXeipL(xBw46A4m}b zz`ipJfSi^h{{;9`Am@=3^@?4(vH)Plzr`-h3~f>NWL@{d&CLaZiG|xLcAC$!-`noB z4&_SEZ1pq&)UusTnZ1RoHFypZcN}#Eq#vv|MOIILF6sZa{{;$X363&PR_E3MC1@C^ zx;^*2YnYQiXAqu1qRWO2EB%sab?nau7YG4niID=(CE2JAH3TMJ{gmd4t!{42oMXA5 z=pHOdBnf^{06X{BZ;N29axO0saaETG~y-q@bv})p+406EHxk$8IMo93knK5R6iV?^+?4JEa=@BB{Wr;7$09%)WWpwdSJpc&gy?Xb#y=!13d4 znM6rJyf+X%lZo?o%SI9DF_A11@m+d`!3G!<29W9k_{MPczg;h)nTL@kmCpN_655)+ zV4#=PKa9~L!Z2&Ah&=5fCU1*LOJ_x$W27L$LOfiib%hP1*Z~zUp#+jQq7DbI-U%rP zk^T9Tl?*Eoupe)4-y&KT~+O##fDEImn4y>NutF;IVJ3=m*! z*rEW%TlVNiM?a>>U$u_$JuA>L6CZFXb!s@yP&g!R3gv~Bp}AgpK2=m0jV8VvIZv2C zmd^lRyVaiKaS$v6oYCt@$k#%)MsE3;z}yQ2L<8`{hpSucn4z6B`)k9mk!I(}zCa8Y zec8sli-a|~e-I8yodRg%#-Fe zUUq-YRYyjqA8u02I*uj{d;W>=)zk|nH^OPBH+T%!|4ND7zpZ*;!cs{XDZAc=)TpYy zygF?tJ_g{6^&8==X_&x=`hHuSa{O~;8JsY}g+Ry)97Lmf`m;+MhVx9uQw2LJB)YCN z@x%=aA>jGW@-K6kNsyeSxy?!*B;mpG3B8IhiJ`aL(iYA4>ejWW`Ba}KuFQ=qb|9UD zd1@S)Q6&PF^2(HexS@I93W4L)kM;M0t02}wjNHH_W_t5)TVGK6pzr>0Q^W#T7H~ar z!`O{mW@83Sl9!-P1c_I-0Gd=n(Al2Ah)MotJ8AbzM;HOuxA3PI2G5Xa4-KFnd(R<& zl~(O&-Jsc|!_LVQcPi|XD}`wzR1Xn(cG2(D_N3D~k*V(8k4i+i9K+ulxOuCy!l zG3U%zV9j+$hqsRH4K8qiX)Y%5kpNKe-@i7c^ly-X9EHpqEaj*3o>oZwj-~iM`20S0 zT+X3*f&BF+O!NkR{xf~GM<9^RlYs$K*d}c0boMm+LsFzfZDJ%7->?En1@nR69#5W9 zha7r+_<*>ozO^~mkB|Jz*z!F@=x~3DwK8pu~`vT=$gd#s-trjR06bA&FSRn zXosx!+Ar!=CCEZdm*mgGVygGr=a;bPp3`1$ojoLd5*z)h`E`i{b~Tk6I_M{*hrhdq z%km?-j{K^V=N^-HEYrs)!oparg}x|u^fEHypM^&WQ?T7d$N;k6=t`n8b5A;R7+fd< zweEqw_&I7h2Q`^|Nhl+xehysMZI!+Zv%IfOO*?!yw98BGB}51~t1J8V4~T$`Y~Rpg zC&EB-_kDWzSVdXeG7o$eVQN}aM@*<;RL@^rCgVF8kWxLDx|}q#y}Sgg z??KODbbqBH3$u%uWAZp`x1p_9+vh$RDq>q8DArehLiv#? zS7p(k_klZ2h^UNb09!*yqk7YKmjb|*xuZ{kcYnK_eZDQDgCKrv@~G^rCEkhh1KQ8t zT~&5d1+9jn{HLO`4hJ}XbT4W*8iQ!OH&R^30MdVf>goXR<52$G7-HwbKISxdG2?gX zUWamaU{hM>`{N6CBF`m|UO7f;#%00^HUQjv90sS3{=D}p=qL&|w9G5VQ=hdE?qpB* z8CVyn;Vhr1QP!CQcS~LOSrN!b4hgV%PU9lhY4qrPo;TID@g4v|;8auwD2G~SY|8TM zRd4Zg*tNyl*2c@A_Z{0+cYF_Pnwm+58d;%$qhs2q2XkwXMBxG|t)dcF{495+0LXAt z%=xkC)NYk>2z6<8b(io?P7{c7z!dMrujH=okhn5qE$`KV2r?QH33y;KVw{~_a|@d1 zgc0Z`b1>*sRl_Co)qBcExZwdxbAVy&napFK=rMOLMPFe2WYbbO%19sPa*w$o;yi)Q z){i?j*$ujpB;L{(m!Q9Sdnfg#tTM-#YfR{CBw}t`;qUq-!x&bmVfcN}-Po_I4}X}_ z^t5y1VNMmk9z)``Ic6iQsFY7DwU8AJM3TN>l5#qSx#b5zyk}gA%k0LtM)YSep6s(K^!|HPUZnNmZx2o z56)-Om(G2o{0FL>zz=R>3h!{P^*+b!qaH#4@l(IQkuiEnE!ScPnFiaVAO&1gyai|l zAdJrT+kK3Se%<(USIy}n=jk}2Ht2IX#e*edEZ~-uUSJSqWC~k*1T5@YJrKyPnw|X< z+W3-Y{WKrQdHr~R3#5&-TZ3zM;w6TqCbhn|Rj2*Z?S*6e-R?XXaRSs|oId=TVXLu{ zj|URNRPe7+kR)4)8|nkVLsFM7<=Vmf~HeV0cp1|XXS5L@wjNj5yKie+KA z%09g+z^n`}M7P_vg>2)FYXMz=YLgchlQ~%ARY;7G(ys;3HB-ed^wLOTkupT@Nfk&o zqI^Bl$76XEwk1?h=qO6mkigTz!Fhq&Y~rX|9n!A;SBB16W?nFjd=|4(?*6`uT>Om4 zq!ivu+WiqM6jPn_bYNMC+&k!sajqnXW6Bh6mHZwrOTOLYAspD>VRI&w0>>Ym%QSk7jV!gm~4K#@3Ekv@C& z1ZW^9I}1pIxbnRqUm@~9k$hFsgO$SclmV)dsY(@axX-x;K@08<7z*M;!)D+)GnB-h_pX#E4&BdOm}hnZK05O34%JkmnSPvltCp%pfh1YkKaB; z3r{eK1y}F0zteZ!VbKxN(mGE+RBO2}il&HvJsmW5)9f&i7~9pNsoJ;9UuU{fdVZPdaTpl3xn;a*6FGldFooO)ID5!f~o{A(@Q|Z#mgd97e)$p~ZNmCyO%SVP)0qcao?}@xnBznLG_-jRz&F1t?k^&(O-9@Xe66ob6E_pADB_QBgqLn-gy;LfXQBSJbXm4Qa z)@0fUbjL-DMg$ghS|B?CBkpf7|ESPv)cUf`>w<=*s{H62A8V`IiK$3LELwT3jzOb8 zl!S`+Tx&GX2;@<}_wVf9BLV{P^(7He508+NcJ@gXb$|bH_KiMExuqD$AfHUdt4cDv znhtuostMM!A9W3zyP;)%a8-~&aywa>^w*%F9kkeh*?k3sl)5}_ql5OAK9{{G;i=&{ zUtHfQwYq)Mv2b#<<*l>m4R5ck-D}D4z}ASJ5n|#5oacfBD7c8Ej7x(YE2s{iT$}G8 zwe%kv{OB)T?3TF&{@pgAVDqA%#pj(8sb{K9MGKWIs8|2FC9!(el>JYu3twNt=QY>E zEfe)z$ve+s#4HImOHv>x>;K~XCmW++46hoJ3_n6i`N8IeHpqE;laOh)fhBpsdn`Zm z=#=<=nmx{M{f?01b_7r#Sw*A=7N%8-I`SyqirAZn#cfO6?4!h|ub2b6?Zr>?Gx+w7 z<{S4WRHS>hqD7{`zLA&m^E6s)FM4@tcOl;dBnnQWimCjB_^)p8k672RtIbfAuFEw6 zgYuq`4j>h|oy0tO_clJuOF6%_;JJXGg4^VC^xm%7&7Hy10VSjE=3!N?H7J&iqdP}I zNOMAsr-?az+$AOgF>TROKSqm>+JU2`&iM{Ko72ZNnN>6ZNGPvfr7rwp!%~yBJSI?n zB3R6?SX`*e^MKP=??Xlg7}vTlQ%RIYvO<*`dtIXjAi@O&*XGS5Uh^+>(R3{UOg9!# zeFU6}>N+X$p5K_^4*d4ma(tvz--++&_^^mulRJJ-8!^^{Pd@#l&?DVnNZmyNE?sJo z1v4i@CO?oX!Dg1Lqv3TWiOw2-FS)k+Ljd}Ilpuew^DX&cs7!n~Bu5*_ zbNkTWkOG>zvpx~^d~foOLY<`#J9-4ss8Adupv(u66p=MohfRAYxhNA>HSU|gUFPg!w!n|-*n&2dvMVX3i(q* z9avlqEO5CvT+~(A1xN=y58K~En@L`vMnKT5ufo5MXk%ca7vW2=31I*Km~>+KC%76EmzQ{Epl*zpBy66^=k| zgxepQc7MxTEKkj~;bY@6Gd!n`K!v>&``bhrGUsu ziUsg|6^14}8h@IKz!**2yt0@~gdZ8TQ6A456}yw%F8pOXchJfG;IsFRiK@Z=(_=hNf1EVaQxVt%sqi_6s+|aA2Hs^Z1^jkF} z)1c0f3(n&QqBF4M>5l>N+2Cviy}C>Nvp)=5PwiM9D`yM8h&eBJ^iH_7m4)X9Q%5MW z!_c~><|XVWOt+Ve`j5xtKb#eCe342+D}=)aV%}@?*l_nK;*CILu4J}tqmJH`|Q{N79k>Ago$ zw+kbnqFbA;2Yd~D;IrHI?7OkQTl}|AhyXHl!kF?*%64_xllGp7XvzmFLZx)x^DQ#( z8yw9_Kg)1_V%`v*<7w+#aJ1^1V0 zi}6B_vKX`{IOQ9xZOX1JvESZ!V(|c{SDSNfEs(d|CL$lQ?eu!R|NTpI?eS+Kf7vNl z%!IbKTC}f)@d@}t?+klTHUjTrMxbJXOeb(+XezwY*G|WOOma4Pdp;kk0Fl~k&%h$# zkNqIcqQ*;D3DT7}0g$zkqn+g9IR#X2V^fthIf z6xut?2mox2Q$mF~UZ_v*={bqjQ*QF8smcNS^TPHE8vGd1^gz*sl^2S)?%;8oMxCX* z0SKz`wGxRnWD$dRPEJ3QEZIK37gU^>f=z&GmJiDQqp92G7HAK&!?*nn%c^fgy_Rc6 z2i%y;23Y}W_x9$Q$t)tiX=};p&i0?ga{!QL{KM0y9!)RXqLg$ix6$n3zDrBF#amXMJ8=viyxAutbQYXsIV&Y%NuDPMK&4 z49)cj0zMhnla%IgMc=|Vc20Hv6p#_`b$l?h_yQC$DIz&u_>1yOOYIZ}$7ErKy`9Iw zO&^zH_d%1a{z{drpduoOO9>4K0hs_Wqej8OE3;~Jz;l|XDy($&>P*2><8H_*uLF

Bg_)L$48&o}ack zt!HAQladuqH6nxcdZjxF6vTK*7%AV0IOX}JZ^u_OkMumMel#gIzv1VJUb|?$j71?Q zE%B-a&vFk0&Z20HLn$L5hH9dQ4Ef5bKHOX_RfA5_`gJvR%bW4}0DCGg0Va&YC>upU z1&8GC>xLY}LkxejF;yq2sOY~5Cqo4UPpDVfIk~O=P(Gb%k`up^XsPRv9)fXL9y}y5 z_nYE{jUJUly7pJ?$r_eiajL0B@N?t6efF1pS9lk2UGDMWIj>@eS3OH*kme)>qMs4c zXm_q!8hu`I8Dhv5J1?UvlYLJ*X6D(~=y^sb&mT@}>JxIp-$sTvzSdP`p2 zJSTpI%GX_eG4+h<`8LXOC{XRWB^Zd0<_&>b2eoF`!(!~j1?f~Xrey`D;63!OSo@1j zhVkNITfkbp3}EkdgcmMq1ZjCrPrG8@X$!y3nZFDG<8?k82gdmVJ<<=koN(R0uQJ&q&;Hm9we)+ z>EiW_<2L!S=W{bXQR{t-Xk&^=i3!xJ1GH*$ft^*`kFY2U5$7}?R(xpv1OE!wXhM-U z{|-m&g!{Wci5J~AR7xhAcz2%T1X}X;Lm5kqn$n>CdZG%!jlgyEgu}8cSE=Tna>KaW zE{i{1$MRasX61aWzh$Kz+gg_XXfmLI)gJjN8%-etjvKrZa0TIVu@FNzi_DBbgG}?X zc%`<^VRHLdaERnl?k6tkmy~V-6wDDz--2n{wg8GA9pEX|*>WDA)uFS%@&MN%-fruuv;9cz5hkb^M5ny{e|a>hsQrwX-D^ zNBO*f*^1b~?2NHQ2g~@Hiq$_V;Z8|Q@sz(OJ-_;@xOeF3^57a-&;bjXTR0^(9&O1`Qs5mDXKaZ{gYh~^a4>N0el@Q8ji@;G0VwtnJC=gh zkvhS5%hY0~-FeS=8*`P?hYjBB(TJ(h3vvLJ;q{z?7Jf~hQZOlh z8(M!wZ6}#fur(A{mkQvWp^(z{kJ9Qcf&hRH6HK!c5b1?W28wck^aQ{Ju^0{PD&(m< zLbu{`I17`!l>tz)uDi~j;Q*7#M!X;*rP#E#K`0MHVO=C_Y>Kpq3I%tz)KS21z(70w zu+S+efLBlwQ<3knLW3-aM&dW%uuv1r?kQqDWsn|wHc35K!jBl%t~9oLn(8w!(iF2Y zj)Ca3zC|-dT69O*c44Drzb zTWRcGB4pjuzq;tNLKJ7H7&3CTH`^5&fs^&Csh+4TdNT~n>o18P123FK1<6Ap7>9OE zH?~wjjt8TicxY-E;Ld@{^P%j9BpeC^HJlw8iW2I<*Vc#1VH5Y&k@$T23>riN5a^fE z1xtK3We+L~pTm`C@mKj&g@flbKtRjuc?i2+3nW^d516YT2Qx*|&}0%IIZ{BK)n@-A z7W$f>T8g%2qR?15Ezb7#Al1jSng=Um;<;^4CZ)UF4*B#s16}WxXDR&e;IFDemyJBP zQD>pCTMx2W)Iwg$ckc4ElkYeRp?hVt(&_O^6u-=WO4y!T>T70vx)M)1f17nmsqw{$ zZhYP=C<2j}m^Lg-ex&8RKf~0WrfrL!~NLQ^Xk?)No>Z1xiNn~MBa)Y#@)-369lm6 zDH#U3Pv&kw{mt3+_t3uW8=*{`^%?Rl0~ff@XZrjZDZCjasI5PtLP6)zBrRO$pYlfV z4DCdS&(8)uR*23AuP?jhTi@#6yL=G*b~7!5d3?2d_2DzzR3V+SVCZe@ULo|*Qz`CV z*j}+=>D|^uy$<{s0tgCLYba;t*4jWsj}CfRI?T4cS90us!fy8Lz;(qp7V}H&`+loKEpPZr6wt`2EqWMWj z6-EjjNWU@D@IQdNmlvT5>qUq{`9mBuild Status -GoDoc - -Match is a very simple pattern matcher where '*' matches on any -number characters and '?' matches on any one character. - -Installing ----------- - -``` -go get -u github.com/tidwall/match -``` - -Example -------- - -```go -match.Match("hello", "*llo") -match.Match("jello", "?ello") -match.Match("hello", "h*o") -``` - - -Contact -------- -Josh Baker [@tidwall](http://twitter.com/tidwall) - -License -------- -Redcon source code is available under the MIT [License](/LICENSE). diff --git a/vendor/github.com/tidwall/match/match.go b/vendor/github.com/tidwall/match/match.go deleted file mode 100644 index 8885add63c8..00000000000 --- a/vendor/github.com/tidwall/match/match.go +++ /dev/null @@ -1,192 +0,0 @@ -// Match provides a simple pattern matcher with unicode support. -package match - -import "unicode/utf8" - -// Match returns true if str matches pattern. This is a very -// simple wildcard match where '*' matches on any number characters -// and '?' matches on any one character. - -// pattern: -// { term } -// term: -// '*' matches any sequence of non-Separator characters -// '?' matches any single non-Separator character -// c matches character c (c != '*', '?', '\\') -// '\\' c matches character c -// -func Match(str, pattern string) bool { - if pattern == "*" { - return true - } - return deepMatch(str, pattern) -} -func deepMatch(str, pattern string) bool { - for len(pattern) > 0 { - if pattern[0] > 0x7f { - return deepMatchRune(str, pattern) - } - switch pattern[0] { - default: - if len(str) == 0 { - return false - } - if str[0] > 0x7f { - return deepMatchRune(str, pattern) - } - if str[0] != pattern[0] { - return false - } - case '?': - if len(str) == 0 { - return false - } - case '*': - return deepMatch(str, pattern[1:]) || - (len(str) > 0 && deepMatch(str[1:], pattern)) - } - str = str[1:] - pattern = pattern[1:] - } - return len(str) == 0 && len(pattern) == 0 -} - -func deepMatchRune(str, pattern string) bool { - var sr, pr rune - var srsz, prsz int - - // read the first rune ahead of time - if len(str) > 0 { - if str[0] > 0x7f { - sr, srsz = utf8.DecodeRuneInString(str) - } else { - sr, srsz = rune(str[0]), 1 - } - } else { - sr, srsz = utf8.RuneError, 0 - } - if len(pattern) > 0 { - if pattern[0] > 0x7f { - pr, prsz = utf8.DecodeRuneInString(pattern) - } else { - pr, prsz = rune(pattern[0]), 1 - } - } else { - pr, prsz = utf8.RuneError, 0 - } - // done reading - for pr != utf8.RuneError { - switch pr { - default: - if srsz == utf8.RuneError { - return false - } - if sr != pr { - return false - } - case '?': - if srsz == utf8.RuneError { - return false - } - case '*': - return deepMatchRune(str, pattern[prsz:]) || - (srsz > 0 && deepMatchRune(str[srsz:], pattern)) - } - str = str[srsz:] - pattern = pattern[prsz:] - // read the next runes - if len(str) > 0 { - if str[0] > 0x7f { - sr, srsz = utf8.DecodeRuneInString(str) - } else { - sr, srsz = rune(str[0]), 1 - } - } else { - sr, srsz = utf8.RuneError, 0 - } - if len(pattern) > 0 { - if pattern[0] > 0x7f { - pr, prsz = utf8.DecodeRuneInString(pattern) - } else { - pr, prsz = rune(pattern[0]), 1 - } - } else { - pr, prsz = utf8.RuneError, 0 - } - // done reading - } - - return srsz == 0 && prsz == 0 -} - -var maxRuneBytes = func() []byte { - b := make([]byte, 4) - if utf8.EncodeRune(b, '\U0010FFFF') != 4 { - panic("invalid rune encoding") - } - return b -}() - -// Allowable parses the pattern and determines the minimum and maximum allowable -// values that the pattern can represent. -// When the max cannot be determined, 'true' will be returned -// for infinite. -func Allowable(pattern string) (min, max string) { - if pattern == "" || pattern[0] == '*' { - return "", "" - } - - minb := make([]byte, 0, len(pattern)) - maxb := make([]byte, 0, len(pattern)) - var wild bool - for i := 0; i < len(pattern); i++ { - if pattern[i] == '*' { - wild = true - break - } - if pattern[i] == '?' { - minb = append(minb, 0) - maxb = append(maxb, maxRuneBytes...) - } else { - minb = append(minb, pattern[i]) - maxb = append(maxb, pattern[i]) - } - } - if wild { - r, n := utf8.DecodeLastRune(maxb) - if r != utf8.RuneError { - if r < utf8.MaxRune { - r++ - if r > 0x7f { - b := make([]byte, 4) - nn := utf8.EncodeRune(b, r) - maxb = append(maxb[:len(maxb)-n], b[:nn]...) - } else { - maxb = append(maxb[:len(maxb)-n], byte(r)) - } - } - } - } - return string(minb), string(maxb) - /* - return - if wild { - r, n := utf8.DecodeLastRune(maxb) - if r != utf8.RuneError { - if r < utf8.MaxRune { - infinite = true - } else { - r++ - if r > 0x7f { - b := make([]byte, 4) - nn := utf8.EncodeRune(b, r) - maxb = append(maxb[:len(maxb)-n], b[:nn]...) - } else { - maxb = append(maxb[:len(maxb)-n], byte(r)) - } - } - } - } - return string(minb), string(maxb), infinite - */ -} diff --git a/vendor/vendor.json b/vendor/vendor.json index 18a8bfd6b5b..a38b8f0b93a 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1717,20 +1717,6 @@ "version": "v0.1.0", "versionExact": "v0.1.0" }, - { - "checksumSHA1": "d+4iuDj/qQ+2LiWEbQ+AWjxEJOc=", - "path": "github.com/tidwall/gjson", - "revision": "f123b340873a0084cb27267eddd8ff615115fbff", - "revisionTime": "2018-06-21T18:09:58Z", - "version": "v1.1.2", - "versionExact": "v1.1.2" - }, - { - "checksumSHA1": "Tk+aXpWRuTQhURlO79bd7YogcU0=", - "path": "github.com/tidwall/match", - "revision": "1731857f09b1f38450e2c12409748407822dc6be", - "revisionTime": "2017-10-02T07:59:45Z" - }, { "checksumSHA1": "qgMa75aMGbkFY0jIqqqgVnCUoNA=", "path": "github.com/ulikunitz/xz", diff --git a/website/docs/d/pricing_product.html.markdown b/website/docs/d/pricing_product.html.markdown index 1233f314515..2379ce5419e 100644 --- a/website/docs/d/pricing_product.html.markdown +++ b/website/docs/d/pricing_product.html.markdown @@ -43,8 +43,6 @@ data "aws_pricing_product" "test1" { value = "Shared" }, ] - - json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" } data "aws_pricing_product" "test2" { @@ -60,8 +58,6 @@ data "aws_pricing_product" "test2" { value = "US East (N. Virginia)" }, ] - - json_query = "terms.OnDemand.*.priceDimensions.*.pricePerUnit.USD" } ``` @@ -69,8 +65,7 @@ data "aws_pricing_product" "test2" { * `service_code` - (Required) The code of the service. Available service codes can be fetched using the DescribeServices pricing API call. * `filters` - (Required) A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API. - * `json_query` - (Required) The JSON query used to fetch the wanted value. In a [GJSON format](https://github.com/tidwall/gjson). ## Attributes Reference - * `query_result` - Set to the result of the JSON query applied on the product returned from the API. + * `result` - Set to the product returned from the API. From e3685af6a7ff24563a302048c13ed990dfd94ce8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Jul 2018 19:57:42 -0400 Subject: [PATCH 1729/3316] resource/aws_lambda_event_source_mapping: Remove panic() and update batch_size default documentation --- aws/resource_aws_lambda_event_source_mapping.go | 2 -- website/docs/r/lambda_event_source_mapping.html.markdown | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index 8dc51aaecf9..8b20bb94997 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -68,8 +68,6 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { if old == "10" { return true } - default: - panic(eventSourceARN.Service) } return false }, diff --git a/website/docs/r/lambda_event_source_mapping.html.markdown b/website/docs/r/lambda_event_source_mapping.html.markdown index d00effbe38e..a4aad55cfdb 100644 --- a/website/docs/r/lambda_event_source_mapping.html.markdown +++ b/website/docs/r/lambda_event_source_mapping.html.markdown @@ -27,7 +27,7 @@ resource "aws_lambda_event_source_mapping" "event_source_mapping" { ## Argument Reference -* `batch_size` - (Optional) The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to `100`. +* `batch_size` - (Optional) The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to `100` for DynamoDB and Kinesis, `10` for SQS. * `event_source_arn` - (Required) The event source ARN - can either be a Kinesis or DynamoDB stream. * `enabled` - (Optional) Determines if the mapping will be enabled on creation. Defaults to `true`. * `function_name` - (Required) The name or the ARN of the Lambda function that will be subscribing to events. From 5247217ecc45b3867eb8ca4cd9ae934054a339de Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Jul 2018 20:03:20 -0400 Subject: [PATCH 1730/3316] Update CHANGELOG for #5024 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6d31bcfd6a..7af64dd7e54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ENHANCEMENTS: * data-source/aws_subnet_ids: Add `filter` argument [GH-5038] * resource/aws_eip_association: Support resource import [GH-5006] * resource/aws_lambda_alias: Add `routing_config` argument (support traffic shifting) [GH-3316] +* resource/aws_lambda_event_source_mapping: Make `starting_position` optional and allow `batch_size` to support default of 10 for SQS [GH-5024] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] * resource/aws_spot_fleet_request: Add `fleet_type` argument [GH-5032] * resource/aws_ssm_document: Add `tags` argument (support tagging) [GH-5020] From fba6e5daeb9046eb439ff94ba15bcc7091b6aeb1 Mon Sep 17 00:00:00 2001 From: Tim Malone Date: Wed, 4 Jul 2018 10:13:47 +1000 Subject: [PATCH 1731/3316] db_event_subscription source_type doc expansion - Adds valid options for `source_type` argument (sourced from running `aws rds describe-event-categories`) - Fixes double slash in URL given for `event_categories` argument - Adds AWS CLI command for describing valid options for `event_categories` argument --- website/docs/r/db_event_subscription.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/db_event_subscription.html.markdown b/website/docs/r/db_event_subscription.html.markdown index 7f043235d5f..aa5d73640fd 100644 --- a/website/docs/r/db_event_subscription.html.markdown +++ b/website/docs/r/db_event_subscription.html.markdown @@ -59,8 +59,8 @@ The following arguments are supported: * `name_prefix` - (Optional) The name of the DB event subscription. Conflicts with `name`. * `sns_topic` - (Required) The SNS topic to send events to. * `source_ids` - (Optional) A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. -* `source_type` - (Optional) The type of source that will be generating the events. -* `event_categories` - (Optional) A list of event categories for a SourceType that you want to subscribe to. See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide//USER_Events.html +* `source_type` - (Optional) The type of source that will be generating the events. Valid options are `db-instance`, `db-security-group`, `db-parameter-group`, `db-cluster` or `db-cluster-snapshot`. If not set, all sources will be subscribed to. +* `event_categories` - (Optional) A list of event categories for a SourceType that you want to subscribe to. See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html or run `aws rds describe-event-categories`. * `enabled` - (Optional) A boolean flag to enable/disable the subscription. Defaults to true. * `tags` - (Optional) A mapping of tags to assign to the resource. From 1590956ae2f6d042135480b018cd06088e984cd3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Jul 2018 22:13:01 -0400 Subject: [PATCH 1732/3316] Update CHANGELOG for #4950 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af64dd7e54..7f699da3a04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ FEATURES: ENHANCEMENTS: +* data-source/aws_instances: Add `instance_state_names` argument (support non-`running` instances) [GH-4950] * data-source/aws_route_tables: Add `filter` argument [GH-5035] * data-source/aws_subnet_ids: Add `filter` argument [GH-5038] * resource/aws_eip_association: Support resource import [GH-5006] From 1d729c1337740193e0bab1cbca8c43f7826047f1 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 3 Jul 2018 22:12:57 -0400 Subject: [PATCH 1733/3316] Fix comments from PR #5057 (pricing_product) --- aws/data_source_aws_pricing_product.go | 34 +++++++------------- aws/data_source_aws_pricing_product_test.go | 4 +++ website/aws.erb | 3 ++ website/docs/d/pricing_product.html.markdown | 11 +++++-- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/aws/data_source_aws_pricing_product.go b/aws/data_source_aws_pricing_product.go index 79d26b9d350..393acef12a6 100644 --- a/aws/data_source_aws_pricing_product.go +++ b/aws/data_source_aws_pricing_product.go @@ -5,16 +5,13 @@ import ( "encoding/json" "fmt" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/pricing" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" ) -const ( - awsPricingTermMatch = "TERM_MATCH" -) - func dataSourceAwsPricingProduct() *schema.Resource { return &schema.Resource{ Read: dataSourceAwsPricingProductRead, @@ -62,7 +59,7 @@ func dataSourceAwsPricingProductRead(d *schema.ResourceData, meta interface{}) e params.Filters = append(params.Filters, &pricing.Filter{ Field: aws.String(m["field"].(string)), Value: aws.String(m["value"].(string)), - Type: aws.String(awsPricingTermMatch), + Type: aws.String(pricing.FilterTypeTermMatch), }) } @@ -72,31 +69,24 @@ func dataSourceAwsPricingProductRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error reading pricing of products: %s", err) } - if err = verifyProductsPriceListLength(resp.PriceList); err != nil { - return err - } - - pricingResult, err := json.Marshal(resp.PriceList[0]) - if err != nil { - return fmt.Errorf("Invalid JSON value returned by AWS: %s", err) - } - - d.SetId(fmt.Sprintf("%d", hashcode.String(params.String()))) - d.Set("result", string(pricingResult)) - return nil -} - -func verifyProductsPriceListLength(priceList []aws.JSONValue) error { - numberOfElements := len(priceList) + numberOfElements := len(resp.PriceList) if numberOfElements == 0 { return fmt.Errorf("Pricing product query did not return any elements") } else if numberOfElements > 1 { - priceListBytes, err := json.Marshal(priceList) + priceListBytes, err := json.Marshal(resp.PriceList) priceListString := string(priceListBytes) if err != nil { priceListString = err.Error() } return fmt.Errorf("Pricing product query not precise enough. Returned more than one element: %s", priceListString) } + + pricingResult, err := json.Marshal(resp.PriceList[0]) + if err != nil { + return fmt.Errorf("Invalid JSON value returned by AWS: %s", err) + } + + d.SetId(fmt.Sprintf("%d", hashcode.String(params.String()))) + d.Set("result", string(pricingResult)) return nil } diff --git a/aws/data_source_aws_pricing_product_test.go b/aws/data_source_aws_pricing_product_test.go index ed9ee03c264..17e9d278a65 100644 --- a/aws/data_source_aws_pricing_product_test.go +++ b/aws/data_source_aws_pricing_product_test.go @@ -11,7 +11,9 @@ import ( ) func TestAccDataSourceAwsPricingProduct_ec2(t *testing.T) { + oldRegion := os.Getenv("AWS_DEFAULT_REGION") os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldRegion) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -28,7 +30,9 @@ func TestAccDataSourceAwsPricingProduct_ec2(t *testing.T) { } func TestAccDataSourceAwsPricingProduct_redshift(t *testing.T) { + oldRegion := os.Getenv("AWS_DEFAULT_REGION") os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldRegion) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, diff --git a/website/aws.erb b/website/aws.erb index f4d36921980..43b5197ba53 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -274,6 +274,9 @@ > aws_prefix_list + > + aws_pricing_product + > aws_rds_cluster diff --git a/website/docs/d/pricing_product.html.markdown b/website/docs/d/pricing_product.html.markdown index 2379ce5419e..b60952a0936 100644 --- a/website/docs/d/pricing_product.html.markdown +++ b/website/docs/d/pricing_product.html.markdown @@ -14,7 +14,7 @@ This data source is only available in a us-east-1 or ap-south-1 provider. ## Example Usage ```hcl -data "aws_pricing_product" "test1" { +data "aws_pricing_product" "example" { service_code = "AmazonEC2" filters = [ @@ -44,8 +44,10 @@ data "aws_pricing_product" "test1" { }, ] } +``` -data "aws_pricing_product" "test2" { +```hcl +data "aws_pricing_product" "example" { service_code = "AmazonRedshift" filters = [ @@ -66,6 +68,11 @@ data "aws_pricing_product" "test2" { * `service_code` - (Required) The code of the service. Available service codes can be fetched using the DescribeServices pricing API call. * `filters` - (Required) A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API. +### `filters` + + * `field` (Required) The product attribute name that you want to filter on. + * `value` (Required) The product attribute value that you want to filter on. + ## Attributes Reference * `result` - Set to the product returned from the API. From 35c0728d588eca6fdcb94b516eae4c40401125e1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Jul 2018 22:22:13 -0400 Subject: [PATCH 1734/3316] Update CHANGELOG for #5057 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f699da3a04..f54b67950ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_launch_configuration` [GH-3624] +* **New Data Source:** `aws_pricing_product` [GH-5057] * **New Resource:** `aws_s3_bucket_inventory` [GH-5019] * **New Resource:** `aws_vpc_ipv4_cidr_block_association` [GH-3723] From 4bd7c4aaf208b89740d219d6f65f6696bb2f3256 Mon Sep 17 00:00:00 2001 From: Tim Malone Date: Wed, 4 Jul 2018 12:53:30 +1000 Subject: [PATCH 1735/3316] db_event_subscription add missing db-snapshot type --- website/docs/r/db_event_subscription.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/db_event_subscription.html.markdown b/website/docs/r/db_event_subscription.html.markdown index aa5d73640fd..e8e0afe9d63 100644 --- a/website/docs/r/db_event_subscription.html.markdown +++ b/website/docs/r/db_event_subscription.html.markdown @@ -59,7 +59,7 @@ The following arguments are supported: * `name_prefix` - (Optional) The name of the DB event subscription. Conflicts with `name`. * `sns_topic` - (Required) The SNS topic to send events to. * `source_ids` - (Optional) A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. -* `source_type` - (Optional) The type of source that will be generating the events. Valid options are `db-instance`, `db-security-group`, `db-parameter-group`, `db-cluster` or `db-cluster-snapshot`. If not set, all sources will be subscribed to. +* `source_type` - (Optional) The type of source that will be generating the events. Valid options are `db-instance`, `db-security-group`, `db-parameter-group`, `db-snapshot`, `db-cluster` or `db-cluster-snapshot`. If not set, all sources will be subscribed to. * `event_categories` - (Optional) A list of event categories for a SourceType that you want to subscribe to. See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html or run `aws rds describe-event-categories`. * `enabled` - (Optional) A boolean flag to enable/disable the subscription. Defaults to true. * `tags` - (Optional) A mapping of tags to assign to the resource. From 43634bb6a9aa9b81e80a48ac3290dc704aed6798 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Jul 2018 23:32:01 -0400 Subject: [PATCH 1736/3316] Address #5056 PR feedback --- aws/data_source_aws_elasticache_replication_group.go | 4 +++- aws/data_source_aws_elasticache_replication_group_test.go | 4 +--- aws/resource_aws_elasticache_replication_group.go | 4 +++- aws/resource_aws_elasticache_replication_group_test.go | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/aws/data_source_aws_elasticache_replication_group.go b/aws/data_source_aws_elasticache_replication_group.go index 77ec2e8780c..7c3ee5e2ca5 100644 --- a/aws/data_source_aws_elasticache_replication_group.go +++ b/aws/data_source_aws_elasticache_replication_group.go @@ -112,7 +112,9 @@ func dataSourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta i d.Set("primary_endpoint_address", rg.NodeGroups[0].PrimaryEndpoint.Address) } d.Set("number_cache_clusters", len(rg.MemberClusters)) - d.Set("member_clusters", flattenStringList(rg.MemberClusters)) + if err := d.Set("member_clusters", flattenStringList(rg.MemberClusters)); err != nil { + return fmt.Errorf("error setting member_clusters: %s", err) + } d.Set("node_type", rg.CacheNodeType) d.Set("snapshot_window", rg.SnapshotWindow) d.Set("snapshot_retention_limit", rg.SnapshotRetentionLimit) diff --git a/aws/data_source_aws_elasticache_replication_group_test.go b/aws/data_source_aws_elasticache_replication_group_test.go index 00e361bbfcf..409b2fd4259 100644 --- a/aws/data_source_aws_elasticache_replication_group_test.go +++ b/aws/data_source_aws_elasticache_replication_group_test.go @@ -24,7 +24,7 @@ func TestAccDataSourceAwsElasticacheReplicationGroup_basic(t *testing.T) { resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "port", "6379"), resource.TestCheckResourceAttrSet("data.aws_elasticache_replication_group.bar", "primary_endpoint_address"), resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "number_cache_clusters", "2"), - resource.TestCheckResourceAttrSet("data.aws_elasticache_replication_group.bar", "member_clusters"), + resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "member_clusters.#", "2"), resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "node_type", "cache.m1.small"), resource.TestCheckResourceAttr("data.aws_elasticache_replication_group.bar", "snapshot_window", "01:00-02:00"), ), @@ -65,7 +65,6 @@ resource "aws_elasticache_replication_group" "bar" { node_type = "cache.m1.small" number_cache_clusters = 2 port = 6379 - parameter_group_name = "default.redis3.2" availability_zones = ["${data.aws_availability_zones.available.names[0]}", "${data.aws_availability_zones.available.names[1]}"] automatic_failover_enabled = true snapshot_window = "01:00-02:00" @@ -83,7 +82,6 @@ resource "aws_elasticache_replication_group" "cluster" { replication_group_description = "test description" node_type = "cache.m1.small" port = 6379 - parameter_group_name = "default.redis3.2.cluster.on" automatic_failover_enabled = true cluster_mode { replicas_per_node_group = 1 diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index db52c9eb2cc..af8bee44722 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -320,7 +320,9 @@ func resourceAwsElasticacheReplicationGroupRead(d *schema.ResourceData, meta int d.Set("replication_group_description", rgp.Description) d.Set("number_cache_clusters", len(rgp.MemberClusters)) - d.Set("member_clusters", flattenStringList(rgp.MemberClusters)) + if err := d.Set("member_clusters", flattenStringList(rgp.MemberClusters)); err != nil { + return fmt.Errorf("error setting member_clusters: %s", err) + } if err := d.Set("cluster_mode", flattenElasticacheNodeGroupsToClusterMode(aws.BoolValue(rgp.ClusterEnabled), rgp.NodeGroups)); err != nil { return fmt.Errorf("error setting cluster_mode attribute: %s", err) } diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index 03425bf836e..32e66ba52dc 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -89,8 +89,8 @@ func TestAccAWSElasticacheReplicationGroup_basic(t *testing.T) { "aws_elasticache_replication_group.bar", "cluster_mode.#", "0"), resource.TestCheckResourceAttr( "aws_elasticache_replication_group.bar", "number_cache_clusters", "2"), - resource.TestCheckResourceAttrSet( - "aws_elasticache_replication_group.bar", "member_clusters"), + resource.TestCheckResourceAttr( + "aws_elasticache_replication_group.bar", "member_clusters.#", "2"), resource.TestCheckResourceAttr( "aws_elasticache_replication_group.bar", "auto_minor_version_upgrade", "false"), ), From dc4b26f52d16ca0b8269473ff4339a03b65c909e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 3 Jul 2018 23:33:47 -0400 Subject: [PATCH 1737/3316] Update CHANGELOG for #5056 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f54b67950ec..50b9a09e848 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,12 @@ FEATURES: ENHANCEMENTS: +* data-source/aws_elasticache_replication_group: Add `member_clusters` attribute [GH-5056] * data-source/aws_instances: Add `instance_state_names` argument (support non-`running` instances) [GH-4950] * data-source/aws_route_tables: Add `filter` argument [GH-5035] * data-source/aws_subnet_ids: Add `filter` argument [GH-5038] * resource/aws_eip_association: Support resource import [GH-5006] +* resource/aws_elasticache_replication_group: Add `member_clusters` attribute [GH-5056] * resource/aws_lambda_alias: Add `routing_config` argument (support traffic shifting) [GH-3316] * resource/aws_lambda_event_source_mapping: Make `starting_position` optional and allow `batch_size` to support default of 10 for SQS [GH-5024] * resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] From e65841bfd8344ab5d2badf8de00ee1edf8499b87 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Jul 2018 00:38:48 -0400 Subject: [PATCH 1738/3316] resource/aws_vpc_ipv4_cidr_block_association: Support resource import --- aws/aws_vpc_ipv4_cidr_block_association.go | 39 ++++++++++++++++--- ...ws_vpc_ipv4_cidr_block_association_test.go | 10 +++++ ..._ipv4_cidr_block_association.html.markdown | 8 ++++ 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/aws/aws_vpc_ipv4_cidr_block_association.go b/aws/aws_vpc_ipv4_cidr_block_association.go index 54cf6c01e12..03708b2cfb0 100644 --- a/aws/aws_vpc_ipv4_cidr_block_association.go +++ b/aws/aws_vpc_ipv4_cidr_block_association.go @@ -21,6 +21,9 @@ func resourceAwsVpcIpv4CidrBlockAssociation() *schema.Resource { Create: resourceAwsVpcIpv4CidrBlockAssociationCreate, Read: resourceAwsVpcIpv4CidrBlockAssociationRead, Delete: resourceAwsVpcIpv4CidrBlockAssociationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "vpc_id": { @@ -78,18 +81,44 @@ func resourceAwsVpcIpv4CidrBlockAssociationCreate(d *schema.ResourceData, meta i func resourceAwsVpcIpv4CidrBlockAssociationRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - assocRaw, state, err := vpcIpv4CidrBlockAssociationStateRefresh(conn, d.Get("vpc_id").(string), d.Id())() + input := &ec2.DescribeVpcsInput{ + Filters: buildEC2AttributeFilterList( + map[string]string{ + "cidr-block-association.association-id": d.Id(), + }, + ), + } + + log.Printf("[DEBUG] Describing VPCs: %s", input) + output, err := conn.DescribeVpcs(input) if err != nil { - return fmt.Errorf("Error reading IPv4 CIDR block association: %s", err) + return fmt.Errorf("error describing VPCs: %s", err) + } + + if output == nil || len(output.Vpcs) == 0 || output.Vpcs[0] == nil { + log.Printf("[WARN] IPv4 CIDR block association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } - if state == VpcCidrBlockStateCodeDeleted { + + vpc := output.Vpcs[0] + + var vpcCidrBlockAssociation *ec2.VpcCidrBlockAssociation + for _, cidrBlockAssociation := range vpc.CidrBlockAssociationSet { + if aws.StringValue(cidrBlockAssociation.AssociationId) == d.Id() { + vpcCidrBlockAssociation = cidrBlockAssociation + break + } + } + + if vpcCidrBlockAssociation == nil { log.Printf("[WARN] IPv4 CIDR block association (%s) not found, removing from state", d.Id()) d.SetId("") return nil } - assoc := assocRaw.(*ec2.VpcCidrBlockAssociation) - d.Set("cidr_block", assoc.CidrBlock) + d.Set("cidr_block", vpcCidrBlockAssociation.CidrBlock) + d.Set("vpc_id", vpc.VpcId) return nil } diff --git a/aws/aws_vpc_ipv4_cidr_block_association_test.go b/aws/aws_vpc_ipv4_cidr_block_association_test.go index 7a60173a612..4095ec5af9a 100644 --- a/aws/aws_vpc_ipv4_cidr_block_association_test.go +++ b/aws/aws_vpc_ipv4_cidr_block_association_test.go @@ -28,6 +28,16 @@ func TestAccAwsVpcIpv4CidrBlockAssociation_basic(t *testing.T) { testAccCheckAdditionalAwsVpcIpv4CidrBlock(&associationTertiary, "170.2.0.0/16"), ), }, + { + ResourceName: "aws_vpc_ipv4_cidr_block_association.secondary_cidr", + ImportState: true, + ImportStateVerify: true, + }, + { + ResourceName: "aws_vpc_ipv4_cidr_block_association.tertiary_cidr", + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown index e33cc898faa..796b5d88153 100644 --- a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown +++ b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown @@ -46,3 +46,11 @@ The following arguments are supported: The following attributes are exported: * `id` - The ID of the VPC CIDR association + +## Import + +`aws_vpc_ipv4_cidr_block_association` can be imported by using the VPC CIDR Association ID, e.g. + +``` +$ terraform import aws_vpc_ipv4_cidr_block_association.example vpc-cidr-assoc-xxxxxxxx +``` From 66cd159296892c92ba5c64e75ff8df80effb06ca Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 4 Jul 2018 01:19:47 -0400 Subject: [PATCH 1739/3316] resource/aws_codebuild_project: Prevent panic when empty vpc_config block is configured --- aws/resource_aws_codebuild_project.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index e0ba5134dac..1b95c6a513b 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -489,17 +489,16 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm func expandCodeBuildVpcConfig(rawVpcConfig []interface{}) *codebuild.VpcConfig { vpcConfig := codebuild.VpcConfig{} - if len(rawVpcConfig) == 0 { + if len(rawVpcConfig) == 0 || rawVpcConfig[0] == nil { return &vpcConfig - } else { + } - data := rawVpcConfig[0].(map[string]interface{}) - vpcConfig.VpcId = aws.String(data["vpc_id"].(string)) - vpcConfig.Subnets = expandStringList(data["subnets"].(*schema.Set).List()) - vpcConfig.SecurityGroupIds = expandStringList(data["security_group_ids"].(*schema.Set).List()) + data := rawVpcConfig[0].(map[string]interface{}) + vpcConfig.VpcId = aws.String(data["vpc_id"].(string)) + vpcConfig.Subnets = expandStringList(data["subnets"].(*schema.Set).List()) + vpcConfig.SecurityGroupIds = expandStringList(data["security_group_ids"].(*schema.Set).List()) - return &vpcConfig - } + return &vpcConfig } func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { From 7b7d817c4fdb15ee41e41e69e7e5ca0fc459119d Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 4 Jul 2018 10:13:57 +0000 Subject: [PATCH 1740/3316] v1.26.0 --- CHANGELOG.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50b9a09e848..8d6ad6fb9b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,30 @@ -## 1.26.0 (Unreleased) +## 1.26.0 (July 04, 2018) FEATURES: -* **New Data Source:** `aws_launch_configuration` [GH-3624] -* **New Data Source:** `aws_pricing_product` [GH-5057] -* **New Resource:** `aws_s3_bucket_inventory` [GH-5019] -* **New Resource:** `aws_vpc_ipv4_cidr_block_association` [GH-3723] +* **New Data Source:** `aws_launch_configuration` ([#3624](https://github.com/terraform-providers/terraform-provider-aws/issues/3624)) +* **New Data Source:** `aws_pricing_product` ([#5057](https://github.com/terraform-providers/terraform-provider-aws/issues/5057)) +* **New Resource:** `aws_s3_bucket_inventory` ([#5019](https://github.com/terraform-providers/terraform-provider-aws/issues/5019)) +* **New Resource:** `aws_vpc_ipv4_cidr_block_association` ([#3723](https://github.com/terraform-providers/terraform-provider-aws/issues/3723)) ENHANCEMENTS: -* data-source/aws_elasticache_replication_group: Add `member_clusters` attribute [GH-5056] -* data-source/aws_instances: Add `instance_state_names` argument (support non-`running` instances) [GH-4950] -* data-source/aws_route_tables: Add `filter` argument [GH-5035] -* data-source/aws_subnet_ids: Add `filter` argument [GH-5038] -* resource/aws_eip_association: Support resource import [GH-5006] -* resource/aws_elasticache_replication_group: Add `member_clusters` attribute [GH-5056] -* resource/aws_lambda_alias: Add `routing_config` argument (support traffic shifting) [GH-3316] -* resource/aws_lambda_event_source_mapping: Make `starting_position` optional and allow `batch_size` to support default of 10 for SQS [GH-5024] -* resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` [GH-3951] -* resource/aws_spot_fleet_request: Add `fleet_type` argument [GH-5032] -* resource/aws_ssm_document: Add `tags` argument (support tagging) [GH-5020] +* data-source/aws_elasticache_replication_group: Add `member_clusters` attribute ([#5056](https://github.com/terraform-providers/terraform-provider-aws/issues/5056)) +* data-source/aws_instances: Add `instance_state_names` argument (support non-`running` instances) ([#4950](https://github.com/terraform-providers/terraform-provider-aws/issues/4950)) +* data-source/aws_route_tables: Add `filter` argument ([#5035](https://github.com/terraform-providers/terraform-provider-aws/issues/5035)) +* data-source/aws_subnet_ids: Add `filter` argument ([#5038](https://github.com/terraform-providers/terraform-provider-aws/issues/5038)) +* resource/aws_eip_association: Support resource import ([#5006](https://github.com/terraform-providers/terraform-provider-aws/issues/5006)) +* resource/aws_elasticache_replication_group: Add `member_clusters` attribute ([#5056](https://github.com/terraform-providers/terraform-provider-aws/issues/5056)) +* resource/aws_lambda_alias: Add `routing_config` argument (support traffic shifting) ([#3316](https://github.com/terraform-providers/terraform-provider-aws/issues/3316)) +* resource/aws_lambda_event_source_mapping: Make `starting_position` optional and allow `batch_size` to support default of 10 for SQS ([#5024](https://github.com/terraform-providers/terraform-provider-aws/issues/5024)) +* resource/aws_network_acl_rule: Add plan time conflict validation with `cidr_block` and `ipv6_cidr_block` ([#3951](https://github.com/terraform-providers/terraform-provider-aws/issues/3951)) +* resource/aws_spot_fleet_request: Add `fleet_type` argument ([#5032](https://github.com/terraform-providers/terraform-provider-aws/issues/5032)) +* resource/aws_ssm_document: Add `tags` argument (support tagging) ([#5020](https://github.com/terraform-providers/terraform-provider-aws/issues/5020)) BUG FIXES: -* resource/aws_codebuild_project: Prevent panic with missing environment variable type [GH-5052] -* resource/aws_kms_alias: Fix perpetual plan when `target_key_id` is ARN [GH-4010] +* resource/aws_codebuild_project: Prevent panic with missing environment variable type ([#5052](https://github.com/terraform-providers/terraform-provider-aws/issues/5052)) +* resource/aws_kms_alias: Fix perpetual plan when `target_key_id` is ARN ([#4010](https://github.com/terraform-providers/terraform-provider-aws/issues/4010)) ## 1.25.0 (June 27, 2018) From f86cbff8bc3246d6e1b605b999430e7d11275b40 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 4 Jul 2018 10:20:40 +0000 Subject: [PATCH 1741/3316] Cleanup after v1.26.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d6ad6fb9b6..58d90923b64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.27.0 (Unreleased) ## 1.26.0 (July 04, 2018) FEATURES: From fd9a3f78c2a83c4821b6cf143ee19cc32002c796 Mon Sep 17 00:00:00 2001 From: Vladislav Rassokhin Date: Wed, 4 Jul 2018 13:38:41 +0300 Subject: [PATCH 1742/3316] Consistent ConflictsWith --- aws/resource_aws_db_event_subscription.go | 9 +++++---- aws/resource_aws_db_option_group.go | 11 ++++++----- aws/resource_aws_db_parameter_group.go | 11 ++++++----- aws/resource_aws_db_subnet_group.go | 11 ++++++----- ...resource_aws_elastic_beanstalk_environment.go | 5 +++-- aws/resource_aws_elb.go | 9 +++++---- aws/resource_aws_emr_security_configuration.go | 9 +++++---- aws/resource_aws_iam_group_policy.go | 7 ++++--- aws/resource_aws_iam_instance_profile.go | 7 ++++--- aws/resource_aws_iam_policy.go | 7 ++++--- aws/resource_aws_iam_role.go | 7 ++++--- aws/resource_aws_iam_role_policy.go | 9 +++++---- aws/resource_aws_iam_server_certificate.go | 9 +++++---- aws/resource_aws_iam_user_policy.go | 7 ++++--- aws/resource_aws_key_pair.go | 9 +++++---- aws/resource_aws_kms_alias.go | 9 +++++---- aws/resource_aws_lambda_permission.go | 9 +++++---- aws/resource_aws_launch_configuration.go | 9 +++++---- aws/resource_aws_launch_template.go | 16 +++++++++------- aws/resource_aws_lb.go | 9 +++++---- aws/resource_aws_lb_target_group.go | 9 +++++---- aws/resource_aws_lightsail_key_pair.go | 7 ++++--- ...source_aws_neptune_cluster_parameter_group.go | 11 ++++++----- aws/resource_aws_neptune_subnet_group.go | 11 ++++++----- aws/resource_aws_network_acl.go | 11 ++++++----- aws/resource_aws_rds_cluster.go | 11 ++++++----- aws/resource_aws_rds_cluster_parameter_group.go | 11 ++++++----- aws/resource_aws_s3_bucket.go | 7 ++++--- aws/resource_aws_security_group.go | 9 +++++---- aws/resource_aws_sns_topic.go | 7 ++++--- aws/resource_aws_sqs_queue.go | 7 ++++--- 31 files changed, 156 insertions(+), 124 deletions(-) diff --git a/aws/resource_aws_db_event_subscription.go b/aws/resource_aws_db_event_subscription.go index e3991b32f89..e3838695e26 100644 --- a/aws/resource_aws_db_event_subscription.go +++ b/aws/resource_aws_db_event_subscription.go @@ -39,10 +39,11 @@ func resourceAwsDbEventSubscription() *schema.Resource { ValidateFunc: validateDbEventSubscriptionName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateDbEventSubscriptionName, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbEventSubscriptionName, }, "sns_topic": { Type: schema.TypeString, diff --git a/aws/resource_aws_db_option_group.go b/aws/resource_aws_db_option_group.go index 821b3b407c2..4651f4437cd 100644 --- a/aws/resource_aws_db_option_group.go +++ b/aws/resource_aws_db_option_group.go @@ -45,11 +45,12 @@ func resourceAwsDbOptionGroup() *schema.Resource { ValidateFunc: validateDbOptionGroupName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbOptionGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbOptionGroupNamePrefix, }, "engine_name": { Type: schema.TypeString, diff --git a/aws/resource_aws_db_parameter_group.go b/aws/resource_aws_db_parameter_group.go index aab4fe97d6a..f1f8208a9c6 100644 --- a/aws/resource_aws_db_parameter_group.go +++ b/aws/resource_aws_db_parameter_group.go @@ -41,11 +41,12 @@ func resourceAwsDbParameterGroup() *schema.Resource { ValidateFunc: validateDbParamGroupName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbParamGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbParamGroupNamePrefix, }, "family": &schema.Schema{ Type: schema.TypeString, diff --git a/aws/resource_aws_db_subnet_group.go b/aws/resource_aws_db_subnet_group.go index b46f5066e83..3d027d8cf66 100644 --- a/aws/resource_aws_db_subnet_group.go +++ b/aws/resource_aws_db_subnet_group.go @@ -40,11 +40,12 @@ func resourceAwsDbSubnetGroup() *schema.Resource { ValidateFunc: validateDbSubnetGroupName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbSubnetGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbSubnetGroupNamePrefix, }, "description": &schema.Schema{ diff --git a/aws/resource_aws_elastic_beanstalk_environment.go b/aws/resource_aws_elastic_beanstalk_environment.go index 1f1579f9538..19aa4dffaef 100644 --- a/aws/resource_aws_elastic_beanstalk_environment.go +++ b/aws/resource_aws_elastic_beanstalk_environment.go @@ -124,8 +124,9 @@ func resourceAwsElasticBeanstalkEnvironment() *schema.Resource { ConflictsWith: []string{"template_name"}, }, "template_name": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"solution_stack_name"}, }, "wait_for_ready_timeout": { Type: schema.TypeString, diff --git a/aws/resource_aws_elb.go b/aws/resource_aws_elb.go index f38983d627e..3a692a68c37 100644 --- a/aws/resource_aws_elb.go +++ b/aws/resource_aws_elb.go @@ -40,10 +40,11 @@ func resourceAwsElb() *schema.Resource { ValidateFunc: validateElbName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateElbNamePrefix, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateElbNamePrefix, }, "arn": &schema.Schema{ diff --git a/aws/resource_aws_emr_security_configuration.go b/aws/resource_aws_emr_security_configuration.go index 069b08c9d36..45beffc6d1a 100644 --- a/aws/resource_aws_emr_security_configuration.go +++ b/aws/resource_aws_emr_security_configuration.go @@ -28,10 +28,11 @@ func resourceAwsEMRSecurityConfiguration() *schema.Resource { ValidateFunc: validateMaxLength(10280), }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(10280 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(10280 - resource.UniqueIDSuffixLength), }, "configuration": { diff --git a/aws/resource_aws_iam_group_policy.go b/aws/resource_aws_iam_group_policy.go index 6aafe644dc8..83999bdf309 100644 --- a/aws/resource_aws_iam_group_policy.go +++ b/aws/resource_aws_iam_group_policy.go @@ -35,9 +35,10 @@ func resourceAwsIamGroupPolicy() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "group": &schema.Schema{ Type: schema.TypeString, diff --git a/aws/resource_aws_iam_instance_profile.go b/aws/resource_aws_iam_instance_profile.go index 2e8f9bc62b4..070614cb212 100644 --- a/aws/resource_aws_iam_instance_profile.go +++ b/aws/resource_aws_iam_instance_profile.go @@ -61,9 +61,10 @@ func resourceAwsIamInstanceProfile() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8196-L8201 value := v.(string) diff --git a/aws/resource_aws_iam_policy.go b/aws/resource_aws_iam_policy.go index 11c4fbf4d00..7b208cf250e 100644 --- a/aws/resource_aws_iam_policy.go +++ b/aws/resource_aws_iam_policy.go @@ -62,9 +62,10 @@ func resourceAwsIamPolicy() *schema.Resource { }, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 value := v.(string) diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index c5cfef9805e..a0815049711 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -59,9 +59,10 @@ func resourceAwsIamRole() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { // https://github.com/boto/botocore/blob/2485f5c/botocore/data/iam/2010-05-08/service-2.json#L8329-L8334 value := v.(string) diff --git a/aws/resource_aws_iam_role_policy.go b/aws/resource_aws_iam_role_policy.go index ec05a225953..451e9211bf0 100644 --- a/aws/resource_aws_iam_role_policy.go +++ b/aws/resource_aws_iam_role_policy.go @@ -41,10 +41,11 @@ func resourceAwsIamRolePolicy() *schema.Resource { ValidateFunc: validateIamRolePolicyName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateIamRolePolicyNamePrefix, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateIamRolePolicyNamePrefix, }, "role": { Type: schema.TypeString, diff --git a/aws/resource_aws_iam_server_certificate.go b/aws/resource_aws_iam_server_certificate.go index 0e7f746544c..2a14150ec5f 100644 --- a/aws/resource_aws_iam_server_certificate.go +++ b/aws/resource_aws_iam_server_certificate.go @@ -66,10 +66,11 @@ func resourceAwsIAMServerCertificate() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), }, "arn": { diff --git a/aws/resource_aws_iam_user_policy.go b/aws/resource_aws_iam_user_policy.go index 0c6e0f6ed71..31df91f0116 100644 --- a/aws/resource_aws_iam_user_policy.go +++ b/aws/resource_aws_iam_user_policy.go @@ -40,9 +40,10 @@ func resourceAwsIamUserPolicy() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "user": &schema.Schema{ Type: schema.TypeString, diff --git a/aws/resource_aws_key_pair.go b/aws/resource_aws_key_pair.go index a8f30c99269..4d5f26e1c40 100644 --- a/aws/resource_aws_key_pair.go +++ b/aws/resource_aws_key_pair.go @@ -35,10 +35,11 @@ func resourceAwsKeyPair() *schema.Resource { ValidateFunc: validateMaxLength(255), }, "key_name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(255 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"key_name"}, + ValidateFunc: validateMaxLength(255 - resource.UniqueIDSuffixLength), }, "public_key": { Type: schema.TypeString, diff --git a/aws/resource_aws_kms_alias.go b/aws/resource_aws_kms_alias.go index 06ad981b4c5..68ee76f1783 100644 --- a/aws/resource_aws_kms_alias.go +++ b/aws/resource_aws_kms_alias.go @@ -38,10 +38,11 @@ func resourceAwsKmsAlias() *schema.Resource { ValidateFunc: validateAwsKmsName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateAwsKmsName, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateAwsKmsName, }, "target_key_id": { Type: schema.TypeString, diff --git a/aws/resource_aws_lambda_permission.go b/aws/resource_aws_lambda_permission.go index 4ff9e3a4c3f..005f4dbc3b4 100644 --- a/aws/resource_aws_lambda_permission.go +++ b/aws/resource_aws_lambda_permission.go @@ -68,10 +68,11 @@ func resourceAwsLambdaPermission() *schema.Resource { ValidateFunc: validatePolicyStatementId, }, "statement_id_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validatePolicyStatementId, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"statement_id"}, + ValidateFunc: validatePolicyStatementId, }, }, } diff --git a/aws/resource_aws_launch_configuration.go b/aws/resource_aws_launch_configuration.go index 806320af56c..ca406e30573 100644 --- a/aws/resource_aws_launch_configuration.go +++ b/aws/resource_aws_launch_configuration.go @@ -35,10 +35,11 @@ func resourceAwsLaunchConfiguration() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 255-resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validation.StringLenBetween(1, 255-resource.UniqueIDSuffixLength), }, "image_id": { diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 3416a56bad4..dfff76c8998 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -34,10 +34,11 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateLaunchTemplateName, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateLaunchTemplateName, }, "description": { @@ -376,9 +377,10 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "vpc_security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + ConflictsWith: []string{"security_group_names"}, }, "tag_specifications": { diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index b4a6056c905..f9a6fd29d36 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -56,10 +56,11 @@ func resourceAwsLb() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateElbNamePrefix, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateElbNamePrefix, }, "internal": { diff --git a/aws/resource_aws_lb_target_group.go b/aws/resource_aws_lb_target_group.go index a501eb1bdba..a31d9ced68b 100644 --- a/aws/resource_aws_lb_target_group.go +++ b/aws/resource_aws_lb_target_group.go @@ -50,10 +50,11 @@ func resourceAwsLbTargetGroup() *schema.Resource { ValidateFunc: validateMaxLength(32), }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(32 - resource.UniqueIDSuffixLength), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(32 - resource.UniqueIDSuffixLength), }, "port": { diff --git a/aws/resource_aws_lightsail_key_pair.go b/aws/resource_aws_lightsail_key_pair.go index 08357506b7f..1d4ac551738 100644 --- a/aws/resource_aws_lightsail_key_pair.go +++ b/aws/resource_aws_lightsail_key_pair.go @@ -28,9 +28,10 @@ func resourceAwsLightsailKeyPair() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, // optional fields diff --git a/aws/resource_aws_neptune_cluster_parameter_group.go b/aws/resource_aws_neptune_cluster_parameter_group.go index 4e5932d91e2..a04db20a2d5 100644 --- a/aws/resource_aws_neptune_cluster_parameter_group.go +++ b/aws/resource_aws_neptune_cluster_parameter_group.go @@ -38,11 +38,12 @@ func resourceAwsNeptuneClusterParameterGroup() *schema.Resource { ValidateFunc: validateNeptuneParamGroupName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateNeptuneParamGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateNeptuneParamGroupNamePrefix, }, "family": { Type: schema.TypeString, diff --git a/aws/resource_aws_neptune_subnet_group.go b/aws/resource_aws_neptune_subnet_group.go index 6ef094beaf9..3db16ee108e 100644 --- a/aws/resource_aws_neptune_subnet_group.go +++ b/aws/resource_aws_neptune_subnet_group.go @@ -36,11 +36,12 @@ func resourceAwsNeptuneSubnetGroup() *schema.Resource { ValidateFunc: validateNeptuneSubnetGroupName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateNeptuneSubnetGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateNeptuneSubnetGroupNamePrefix, }, "description": { diff --git a/aws/resource_aws_network_acl.go b/aws/resource_aws_network_acl.go index f742841517c..2e1ce235e5e 100644 --- a/aws/resource_aws_network_acl.go +++ b/aws/resource_aws_network_acl.go @@ -36,11 +36,12 @@ func resourceAwsNetworkAcl() *schema.Resource { Computed: false, }, "subnet_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: false, - Deprecated: "Attribute subnet_id is deprecated on network_acl resources. Use subnet_ids instead", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: false, + ConflictsWith: []string{"subnet_ids"}, + Deprecated: "Attribute subnet_id is deprecated on network_acl resources. Use subnet_ids instead", }, "subnet_ids": { Type: schema.TypeSet, diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index e407d6b8571..18418edfe00 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -58,11 +58,12 @@ func resourceAwsRDSCluster() *schema.Resource { ValidateFunc: validateRdsIdentifier, }, "cluster_identifier_prefix": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateRdsIdentifierPrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"cluster_identifier"}, + ValidateFunc: validateRdsIdentifierPrefix, }, "cluster_members": { diff --git a/aws/resource_aws_rds_cluster_parameter_group.go b/aws/resource_aws_rds_cluster_parameter_group.go index e2d7aad801f..198f8cc32e8 100644 --- a/aws/resource_aws_rds_cluster_parameter_group.go +++ b/aws/resource_aws_rds_cluster_parameter_group.go @@ -40,11 +40,12 @@ func resourceAwsRDSClusterParameterGroup() *schema.Resource { ValidateFunc: validateDbParamGroupName, }, "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validateDbParamGroupNamePrefix, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDbParamGroupNamePrefix, }, "family": &schema.Schema{ Type: schema.TypeString, diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 8b159cc6359..6b05d99e697 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -42,9 +42,10 @@ func resourceAwsS3Bucket() *schema.Resource { ConflictsWith: []string{"bucket_prefix"}, }, "bucket_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"bucket"}, }, "bucket_domain_name": { diff --git a/aws/resource_aws_security_group.go b/aws/resource_aws_security_group.go index ad1c1aea2ff..8ec8abf02d8 100644 --- a/aws/resource_aws_security_group.go +++ b/aws/resource_aws_security_group.go @@ -47,10 +47,11 @@ func resourceAwsSecurityGroup() *schema.Resource { }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validateMaxLength(100), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateMaxLength(100), }, "description": { diff --git a/aws/resource_aws_sns_topic.go b/aws/resource_aws_sns_topic.go index 7818c94a67a..055202ebf85 100644 --- a/aws/resource_aws_sns_topic.go +++ b/aws/resource_aws_sns_topic.go @@ -52,9 +52,10 @@ func resourceAwsSnsTopic() *schema.Resource { ConflictsWith: []string{"name_prefix"}, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "display_name": { Type: schema.TypeString, diff --git a/aws/resource_aws_sqs_queue.go b/aws/resource_aws_sqs_queue.go index bd0126759f6..51f02971a90 100644 --- a/aws/resource_aws_sqs_queue.go +++ b/aws/resource_aws_sqs_queue.go @@ -56,9 +56,10 @@ func resourceAwsSqsQueue() *schema.Resource { ValidateFunc: validateSQSQueueName, }, "name_prefix": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, "delay_seconds": { Type: schema.TypeInt, From c8ead27464f6a1d30292dcf5e74f68492632aece Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Wed, 4 Jul 2018 08:13:07 -0400 Subject: [PATCH 1743/3316] Minor pricing_product doc adjustments --- website/docs/d/pricing_product.html.markdown | 34 ++++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/docs/d/pricing_product.html.markdown b/website/docs/d/pricing_product.html.markdown index b60952a0936..94f9b5be39d 100644 --- a/website/docs/d/pricing_product.html.markdown +++ b/website/docs/d/pricing_product.html.markdown @@ -19,28 +19,28 @@ data "aws_pricing_product" "example" { filters = [ { - field = "instanceType" - value = "c5.xlarge" + field = "instanceType" + value = "c5.xlarge" }, { - field = "operatingSystem" - value = "Linux" + field = "operatingSystem" + value = "Linux" }, { - field = "location" - value = "US East (N. Virginia)" + field = "location" + value = "US East (N. Virginia)" }, { - field = "preInstalledSw" - value = "NA" + field = "preInstalledSw" + value = "NA" }, { - field = "licenseModel" - value = "No License required" + field = "licenseModel" + value = "No License required" }, { - field = "tenancy" - value = "Shared" + field = "tenancy" + value = "Shared" }, ] } @@ -52,12 +52,12 @@ data "aws_pricing_product" "example" { filters = [ { - field = "instanceType" - value = "ds1.xlarge" + field = "instanceType" + value = "ds1.xlarge" }, { - field = "location" - value = "US East (N. Virginia)" + field = "location" + value = "US East (N. Virginia)" }, ] } @@ -68,7 +68,7 @@ data "aws_pricing_product" "example" { * `service_code` - (Required) The code of the service. Available service codes can be fetched using the DescribeServices pricing API call. * `filters` - (Required) A list of filters. Passed directly to the API (see GetProducts API reference). These filters must describe a single product, this resource will fail if more than one product is returned by the API. -### `filters` +### filters * `field` (Required) The product attribute name that you want to filter on. * `value` (Required) The product attribute value that you want to filter on. From f7d78380c66df1385917d60c193ae40d5915dc6a Mon Sep 17 00:00:00 2001 From: Stephen Paulger Date: Wed, 4 Jul 2018 16:28:16 +0100 Subject: [PATCH 1744/3316] Correct aws_glue_job resource's docs Changed role to role_arn. This is already correct in the provided examples. --- website/docs/r/glue_job.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/glue_job.html.markdown b/website/docs/r/glue_job.html.markdown index 490f0dcf4e1..598bb1c922c 100644 --- a/website/docs/r/glue_job.html.markdown +++ b/website/docs/r/glue_job.html.markdown @@ -54,7 +54,7 @@ The following arguments are supported: * `execution_property` – (Optional) Execution property of the job. Defined below. * `max_retries` – (Optional) The maximum number of times to retry this job if it fails. * `name` – (Required) The name you assign to this job. It must be unique in your account. -* `role` – (Required) The ARN of the IAM role associated with this job. +* `role_arn` – (Required) The ARN of the IAM role associated with this job. * `timeout` – (Optional) The job timeout in minutes. The default is 2880 minutes (48 hours). ### command Argument Reference From e1a540db419fb6f74de2003ec25940810759230c Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Wed, 4 Jul 2018 11:36:29 -0400 Subject: [PATCH 1745/3316] Add description to region data source --- aws/data_source_aws_region.go | 7 +++++++ aws/data_source_aws_region_test.go | 14 ++++++++++++++ website/docs/d/region.html.markdown | 2 ++ 3 files changed, 23 insertions(+) diff --git a/aws/data_source_aws_region.go b/aws/data_source_aws_region.go index b3424a8cbb7..b3112a34b62 100644 --- a/aws/data_source_aws_region.go +++ b/aws/data_source_aws_region.go @@ -31,6 +31,11 @@ func dataSourceAwsRegion() *schema.Resource { Optional: true, Computed: true, }, + + "description": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -81,6 +86,8 @@ func dataSourceAwsRegionRead(d *schema.ResourceData, meta interface{}) error { d.Set("name", region.ID()) + d.Set("description", region.Description()) + return nil } diff --git a/aws/data_source_aws_region_test.go b/aws/data_source_aws_region_test.go index 2f7d051df25..d7c055c219f 100644 --- a/aws/data_source_aws_region_test.go +++ b/aws/data_source_aws_region_test.go @@ -93,6 +93,7 @@ func TestAccDataSourceAwsRegion_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "true"), resource.TestCheckResourceAttr(resourceName, "endpoint", "ec2.us-east-1.amazonaws.com"), resource.TestCheckResourceAttr(resourceName, "name", "us-east-1"), + resource.TestCheckResourceAttr(resourceName, "description", "US East (N. Virginia)"), ), }, }, @@ -109,6 +110,8 @@ func TestAccDataSourceAwsRegion_endpoint(t *testing.T) { endpoint2 := "ec2.us-east-2.amazonaws.com" name1 := "us-east-1" name2 := "us-east-2" + description1 := "US East (N. Virginia)" + description2 := "US East (Ohio)" resourceName := "data.aws_region.test" resource.Test(t, resource.TestCase{ @@ -122,6 +125,7 @@ func TestAccDataSourceAwsRegion_endpoint(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "true"), resource.TestCheckResourceAttr(resourceName, "endpoint", endpoint1), resource.TestCheckResourceAttr(resourceName, "name", name1), + resource.TestCheckResourceAttr(resourceName, "description", description1), ), }, resource.TestStep{ @@ -131,6 +135,7 @@ func TestAccDataSourceAwsRegion_endpoint(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "false"), resource.TestCheckResourceAttr(resourceName, "endpoint", endpoint2), resource.TestCheckResourceAttr(resourceName, "name", name2), + resource.TestCheckResourceAttr(resourceName, "description", description2), ), }, resource.TestStep{ @@ -151,6 +156,8 @@ func TestAccDataSourceAwsRegion_endpointAndName(t *testing.T) { endpoint2 := "ec2.us-east-2.amazonaws.com" name1 := "us-east-1" name2 := "us-east-2" + description1 := "US East (N. Virginia)" + description2 := "US East (Ohio)" resourceName := "data.aws_region.test" resource.Test(t, resource.TestCase{ @@ -164,6 +171,7 @@ func TestAccDataSourceAwsRegion_endpointAndName(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "true"), resource.TestCheckResourceAttr(resourceName, "endpoint", endpoint1), resource.TestCheckResourceAttr(resourceName, "name", name1), + resource.TestCheckResourceAttr(resourceName, "description", description1), ), }, resource.TestStep{ @@ -173,6 +181,7 @@ func TestAccDataSourceAwsRegion_endpointAndName(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "false"), resource.TestCheckResourceAttr(resourceName, "endpoint", endpoint2), resource.TestCheckResourceAttr(resourceName, "name", name2), + resource.TestCheckResourceAttr(resourceName, "description", description2), ), }, resource.TestStep{ @@ -182,6 +191,7 @@ func TestAccDataSourceAwsRegion_endpointAndName(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "true"), resource.TestCheckResourceAttr(resourceName, "endpoint", endpoint1), resource.TestCheckResourceAttr(resourceName, "name", name1), + resource.TestCheckResourceAttr(resourceName, "description", description1), ), }, resource.TestStep{ @@ -206,6 +216,8 @@ func TestAccDataSourceAwsRegion_name(t *testing.T) { endpoint2 := "ec2.us-east-2.amazonaws.com" name1 := "us-east-1" name2 := "us-east-2" + description1 := "US East (N. Virginia)" + description2 := "US East (Ohio)" resourceName := "data.aws_region.test" resource.Test(t, resource.TestCase{ @@ -219,6 +231,7 @@ func TestAccDataSourceAwsRegion_name(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "true"), resource.TestCheckResourceAttr(resourceName, "endpoint", endpoint1), resource.TestCheckResourceAttr(resourceName, "name", name1), + resource.TestCheckResourceAttr(resourceName, "description", description1), ), }, resource.TestStep{ @@ -228,6 +241,7 @@ func TestAccDataSourceAwsRegion_name(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "current", "false"), resource.TestCheckResourceAttr(resourceName, "endpoint", endpoint2), resource.TestCheckResourceAttr(resourceName, "name", name2), + resource.TestCheckResourceAttr(resourceName, "description", description2), ), }, resource.TestStep{ diff --git a/website/docs/d/region.html.markdown b/website/docs/d/region.html.markdown index ca109e12183..92b5cfb464f 100644 --- a/website/docs/d/region.html.markdown +++ b/website/docs/d/region.html.markdown @@ -44,3 +44,5 @@ In addition to all arguments above, the following attributes are exported: provider, or `false` otherwise. * `endpoint` - The EC2 endpoint for the selected region. + +* `description` - The region's description in this format: "Location (Region name)". From 36c953689d2defa802150fc4a37ee911f97d82b5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Jul 2018 09:43:21 -0400 Subject: [PATCH 1746/3316] docs/resource/aws_codebuild_webhook: Further clarifications about CodeBuild and GitHub webhook behaviors --- website/docs/r/codebuild_webhook.html.markdown | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/docs/r/codebuild_webhook.html.markdown b/website/docs/r/codebuild_webhook.html.markdown index 55cb596b911..7750b32b3f5 100644 --- a/website/docs/r/codebuild_webhook.html.markdown +++ b/website/docs/r/codebuild_webhook.html.markdown @@ -8,13 +8,17 @@ description: |- # aws_codebuild_webhook -Provides a CodeBuild Webhook resource. +Manages a CodeBuild webhook, which is an endpoint accepted by the CodeBuild service to trigger builds from source code repositories. Depending on the source type of the CodeBuild project, the CodeBuild service may also automatically create and delete the actual repository webhook as well. ## Example Usage ### GitHub -~> **Note:** For GitHub source projects, the AWS account that Terraform uses to create this resource *must* have authorized CodeBuild to access GitHub's OAuth API in each applicable region. This is a manual step that must be done *before* creating webhooks with this resource. If OAuth is not configured, AWS will return an error similar to `ResourceNotFoundException: Could not find access token for server type github`. More information can be found in the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html). +When working with GitHub (github.com) source CodeBuild webhooks, the CodeBuild service will automatically create (on `aws_codebuild_webhook` resource creation) and delete (on `aws_codebuild_webhook` resource deletion) the GitHub repository webhook using its granted OAuth permissions. This behavior cannot be controlled by Terraform. + +~> **Note:** The AWS account that Terraform uses to create this resource *must* have authorized CodeBuild to access GitHub's OAuth API in each applicable region. This is a manual step that must be done *before* creating webhooks with this resource. If OAuth is not configured, AWS will return an error similar to `ResourceNotFoundException: Could not find access token for server type github`. More information can be found in the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html). + +~> **Note:** Further managing the automatically created GitHub webhook with the `github_repository_webhook` resource is only possible with importing that resource after creation of the `aws_codebuild_webhook` resource. The CodeBuild API does not ever provide the `secret` attribute for the `aws_codebuild_webhook` resource in this scenario. ```hcl resource "aws_codebuild_webhook" "example" { @@ -24,6 +28,8 @@ resource "aws_codebuild_webhook" "example" { ### GitHub Enterprise +When working with GitHub Enterprise (GHE) source CodeBuild webhooks, the GHE repository webhook must be separately managed (e.g. manually or with the `github_repository_webhook` resource). + More information creating webhooks with GitHub Enterprise can be found in the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-enterprise.html). ```hcl @@ -59,7 +65,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The name of the build project. * `payload_url` - The CodeBuild endpoint where webhook events are sent. -* `secret` - The secret token of the associated repository. Not returned for all source types. +* `secret` - The secret token of the associated repository. Not returned by the CodeBuild API for all source types. * `url` - The URL to the webhook. ~> **Note:** The `secret` attribute is only set on resource creation, so if the secret is manually rotated, terraform will not pick up the change on subsequent runs. In that case, the webhook resource should be tainted and re-created to get the secret back in sync. From 26f98de4719b2990b280c55b0e42b84c7f150b37 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Jul 2018 12:12:42 -0400 Subject: [PATCH 1747/3316] docs/resource/aws_codebuild_webhook: Link to GitHub and GitHub Enterprise directly --- website/docs/r/codebuild_webhook.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/codebuild_webhook.html.markdown b/website/docs/r/codebuild_webhook.html.markdown index 7750b32b3f5..a32a049c253 100644 --- a/website/docs/r/codebuild_webhook.html.markdown +++ b/website/docs/r/codebuild_webhook.html.markdown @@ -14,7 +14,7 @@ Manages a CodeBuild webhook, which is an endpoint accepted by the CodeBuild serv ### GitHub -When working with GitHub (github.com) source CodeBuild webhooks, the CodeBuild service will automatically create (on `aws_codebuild_webhook` resource creation) and delete (on `aws_codebuild_webhook` resource deletion) the GitHub repository webhook using its granted OAuth permissions. This behavior cannot be controlled by Terraform. +When working with [GitHub](https://github.com) source CodeBuild webhooks, the CodeBuild service will automatically create (on `aws_codebuild_webhook` resource creation) and delete (on `aws_codebuild_webhook` resource deletion) the GitHub repository webhook using its granted OAuth permissions. This behavior cannot be controlled by Terraform. ~> **Note:** The AWS account that Terraform uses to create this resource *must* have authorized CodeBuild to access GitHub's OAuth API in each applicable region. This is a manual step that must be done *before* creating webhooks with this resource. If OAuth is not configured, AWS will return an error similar to `ResourceNotFoundException: Could not find access token for server type github`. More information can be found in the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html). @@ -28,7 +28,7 @@ resource "aws_codebuild_webhook" "example" { ### GitHub Enterprise -When working with GitHub Enterprise (GHE) source CodeBuild webhooks, the GHE repository webhook must be separately managed (e.g. manually or with the `github_repository_webhook` resource). +When working with [GitHub Enterprise](https://enterprise.github.com/) source CodeBuild webhooks, the GHE repository webhook must be separately managed (e.g. manually or with the `github_repository_webhook` resource). More information creating webhooks with GitHub Enterprise can be found in the [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-enterprise.html). From bb040e3c85392e6162e7af289f557c24d023ac5a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Jul 2018 12:23:06 -0400 Subject: [PATCH 1748/3316] Update CHANGELOG for #5063 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58d90923b64..a88c1ac42f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.27.0 (Unreleased) + +BUG FIXES: + +* resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] + ## 1.26.0 (July 04, 2018) FEATURES: From 8a98672bd4c77c4c7f2fd830c78b1f5903540af3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Jul 2018 12:33:59 -0400 Subject: [PATCH 1749/3316] Update CHANGELOG for #5070 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a88c1ac42f7..f4dabc9cbf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: +* resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] ## 1.26.0 (July 04, 2018) From f4fa444744f2854148b2fcf86cd7d216b78b4d9a Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Thu, 5 Jul 2018 20:46:49 +0400 Subject: [PATCH 1750/3316] issue #633 confusing error message db_parameter_group syntax fail --- aws/validators.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/aws/validators.go b/aws/validators.go index 2b1ebfe2955..806167f0b60 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -129,23 +129,23 @@ func validateDbParamGroupName(v interface{}, k string) (ws []string, errors []er value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) } if !regexp.MustCompile(`^[a-z]`).MatchString(value) { errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) + "first character of parameter group %q must be a letter", k)) } if regexp.MustCompile(`--`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) + "parameter group %q cannot contain two consecutive hyphens", k)) } if regexp.MustCompile(`-$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot end with a hyphen", k)) + "parameter group %q cannot end with a hyphen", k)) } if len(value) > 255 { errors = append(errors, fmt.Errorf( - "%q cannot be greater than 255 characters", k)) + "parameter group %q cannot be greater than 255 characters", k)) } return } @@ -154,19 +154,19 @@ func validateDbParamGroupNamePrefix(v interface{}, k string) (ws []string, error value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) } if !regexp.MustCompile(`^[a-z]`).MatchString(value) { errors = append(errors, fmt.Errorf( - "first character of %q must be a letter", k)) + "first character of parameter group %q must be a letter", k)) } if regexp.MustCompile(`--`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q cannot contain two consecutive hyphens", k)) + "parameter group %q cannot contain two consecutive hyphens", k)) } if len(value) > 255 { errors = append(errors, fmt.Errorf( - "%q cannot be greater than 226 characters", k)) + "parameter group %q cannot be greater than 226 characters", k)) } return } From 2ad4dac62ec6f01fc3c0accb80701f37b5410bf5 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Thu, 5 Jul 2018 21:27:14 +0400 Subject: [PATCH 1751/3316] issue #702 fix aws_ses_receipt_rule s3_action position drift change --- aws/resource_aws_ses_receipt_rule.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ses_receipt_rule.go b/aws/resource_aws_ses_receipt_rule.go index 86af2d2f31f..383ab5b4ef3 100644 --- a/aws/resource_aws_ses_receipt_rule.go +++ b/aws/resource_aws_ses_receipt_rule.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/service/ses" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSesReceiptRule() *schema.Resource { @@ -225,8 +226,9 @@ func resourceAwsSesReceiptRule() *schema.Resource { }, "position": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(1), }, }, }, From ba5e9235626a1a6de3e39195e4ef195079de3d7d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Jul 2018 13:50:32 -0400 Subject: [PATCH 1752/3316] Update CHANGELOG for #4726 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4dabc9cbf3..b2642bad52b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.27.0 (Unreleased) +ENHANCEMENTS: + +* resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] + BUG FIXES: * resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] From 455093e92d78aebc8f94abf076e025a4094a2707 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Jul 2018 14:19:05 -0400 Subject: [PATCH 1753/3316] tests/resource/aws_security_group: Enable TestAccAWSSecurityGroup_ruleLimitCidrBlockExceededAppend --- aws/resource_aws_security_group_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/aws/resource_aws_security_group_test.go b/aws/resource_aws_security_group_test.go index 97825f8cfc8..ebcf3058f42 100644 --- a/aws/resource_aws_security_group_test.go +++ b/aws/resource_aws_security_group_test.go @@ -2016,13 +2016,6 @@ func TestAccAWSSecurityGroup_ruleLimitExceededAppend(t *testing.T) { } func TestAccAWSSecurityGroup_ruleLimitCidrBlockExceededAppend(t *testing.T) { - t.Skip( - "currently AWS does not offer the ability to update the CIDR blocks " + - "you must revoke the entire rule per the docs and re-authorize a new " + - "rule, if this changes it's worth revisiting this test to avoid all CIDR " + - "blocks being revoked and the the authorize failing", - ) - var group ec2.SecurityGroup resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, From 39f69b78b1cfc2b4431d8d57a351b5bf478de138 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Thu, 5 Jul 2018 23:45:03 +0400 Subject: [PATCH 1754/3316] issue #4350 change datapointsToAlarm attribute --- aws/resource_aws_cloudwatch_metric_alarm.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_cloudwatch_metric_alarm.go b/aws/resource_aws_cloudwatch_metric_alarm.go index e4a039eb03c..81afb0e309b 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/aws/resource_aws_cloudwatch_metric_alarm.go @@ -75,8 +75,10 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { Optional: true, }, "datapoints_to_alarm": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: validation.IntAtLeast(1), }, "dimensions": { Type: schema.TypeMap, From 1a05a042b74468bfd93b1a329133bc206debaf1c Mon Sep 17 00:00:00 2001 From: Kash Date: Thu, 5 Jul 2018 17:39:42 -0400 Subject: [PATCH 1755/3316] allow for multiple cidr blocks --- aws/data_source_aws_vpc.go | 32 +++++++++++++++++++++++++++ aws/data_source_aws_vpc_test.go | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/aws/data_source_aws_vpc.go b/aws/data_source_aws_vpc.go index 583d69333fb..e2434d95aee 100644 --- a/aws/data_source_aws_vpc.go +++ b/aws/data_source_aws_vpc.go @@ -20,6 +20,27 @@ func dataSourceAwsVpc() *schema.Resource { Computed: true, }, + "cidr_block_associations": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "association_id": { + Type: schema.TypeString, + Computed: true, + }, + "cidr_block": { + Type: schema.TypeString, + Computed: true, + }, + "state": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "dhcp_options_id": { Type: schema.TypeString, Optional: true, @@ -141,6 +162,17 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { d.Set("state", vpc.State) d.Set("tags", tagsToMap(vpc.Tags)) + cidrAssociations := []interface{}{} + for _, associationSet := range vpc.CidrBlockAssociationSet { + association := map[string]interface{}{ + "association_id": aws.StringValue(associationSet.AssociationId), + "cidr_block": aws.StringValue(associationSet.CidrBlock), + "state": aws.StringValue(associationSet.CidrBlockState.State), + } + cidrAssociations = append(cidrAssociations, association) + } + d.Set("cidr_block_associations", cidrAssociations) + if vpc.Ipv6CidrBlockAssociationSet != nil { d.Set("ipv6_association_id", vpc.Ipv6CidrBlockAssociationSet[0].AssociationId) d.Set("ipv6_cidr_block", vpc.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock) diff --git a/aws/data_source_aws_vpc_test.go b/aws/data_source_aws_vpc_test.go index a3784c7124d..7470f44c184 100644 --- a/aws/data_source_aws_vpc_test.go +++ b/aws/data_source_aws_vpc_test.go @@ -59,6 +59,25 @@ func TestAccDataSourceAwsVpc_ipv6Associated(t *testing.T) { }) } +func TestAccDataSourceAwsVpc_multipleCidr(t *testing.T) { + rInt := rand.Intn(16) + rName := "data.aws_vpc.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsVpcConfigMultipleCidr(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(rName, "cidr_block_associations.#", "2"), + ), + }, + }, + }) +} + func testAccDataSourceAwsVpcCheck(name, cidr, tag string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[name] @@ -147,3 +166,23 @@ data "aws_vpc" "by_filter" { } }`, cidr, tag) } + +func testAccDataSourceAwsVpcConfigMultipleCidr(octet int) string { + return fmt.Sprintf(` +resource "aws_vpc" "test" { + cidr_block = "10.%d.0.0/16" +} + +resource "aws_vpc_ipv4_cidr_block_association" "test" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "172.%d.0.0/16" +} + +data "aws_vpc" "test" { + filter { + name = "cidr-block-association.cidr-block" + values = ["${aws_vpc_ipv4_cidr_block_association.test.cidr_block}"] + } +} +`, octet, octet) +} From 1ff555571562d552ad888f96d4231a7b828b61d7 Mon Sep 17 00:00:00 2001 From: Kash Date: Thu, 5 Jul 2018 17:45:17 -0400 Subject: [PATCH 1756/3316] add documentation --- website/docs/d/vpc.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/docs/d/vpc.html.markdown b/website/docs/d/vpc.html.markdown index a003c0311d4..ada23d676b5 100644 --- a/website/docs/d/vpc.html.markdown +++ b/website/docs/d/vpc.html.markdown @@ -81,3 +81,9 @@ The following attribute is additionally exported: * `ipv6_cidr_block` - The IPv6 CIDR block. * `enable_dns_support` - Whether or not the VPC has DNS support * `enable_dns_hostnames` - Whether or not the VPC has DNS hostname support + +`cidr_block_associations` is also exported with the following attributes: + +* `association_id` - The association ID for the the IPv4 CIDR block. +* `cidr_block` - The CIDR block for the association. +* `state` - The State of the association. From dc2d3a77f108d688898a3c279a75240c69786da8 Mon Sep 17 00:00:00 2001 From: Richie Vos Date: Thu, 5 Jul 2018 15:27:43 -0700 Subject: [PATCH 1757/3316] Ignore propagated routes during table import Similar to how they're ignored when performing a `resourceAwsRouteTableRead`. Relates to #5099 --- aws/import_aws_route_table.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/import_aws_route_table.go b/aws/import_aws_route_table.go index 185d994111f..d96b7324947 100644 --- a/aws/import_aws_route_table.go +++ b/aws/import_aws_route_table.go @@ -40,6 +40,10 @@ func resourceAwsRouteTableImportState( continue } + if route.Origin != nil && *route.Origin == "EnableVgwRoutePropagation" { + continue + } + if route.DestinationPrefixListId != nil { // Skipping because VPC endpoint routes are handled separately // See aws_vpc_endpoint From aaced38e54a27a1f7026f2fb6e2fc49023e446f0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 5 Jul 2018 20:54:11 -0400 Subject: [PATCH 1758/3316] docs/resource/aws_kinesis_firehose_delivery_stream: Add missing processing_configuration argument for splunk_configuration --- website/docs/r/kinesis_firehose_delivery_stream.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown index 14864dddb71..289c324e9bc 100644 --- a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown +++ b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown @@ -328,6 +328,7 @@ The `splunk_configuration` objects supports the following: * `s3_backup_mode` - (Optional) Defines how documents should be delivered to Amazon S3. Valid values are `FailedEventsOnly` and `AllEvents`. Default value is `FailedEventsOnly`. * `retry_duration` - (Optional) After an initial failure to deliver to Amazon Elasticsearch, the total amount of time, in seconds between 0 to 7200, during which Firehose re-attempts delivery (including the first attempt). After this time has elapsed, the failed documents are written to Amazon S3. The default value is 300s. There will be no retry if the value is 0. * `cloudwatch_logging_options` - (Optional) The CloudWatch Logging Options for the delivery stream. More details are given below. +* `processing_configuration` - (Optional) The data processing configuration. More details are given below. The `cloudwatch_logging_options` object supports the following: From 8b259ea613ed01822a896fdab4b853e32f58cc51 Mon Sep 17 00:00:00 2001 From: anna-lyse <38033179+anna-lyse@users.noreply.github.com> Date: Fri, 6 Jul 2018 10:48:09 +0200 Subject: [PATCH 1759/3316] fix list formatting for kinesis_firehose_delivery_stream --- website/docs/r/kinesis_firehose_delivery_stream.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown index 14864dddb71..d57c0b02433 100644 --- a/website/docs/r/kinesis_firehose_delivery_stream.html.markdown +++ b/website/docs/r/kinesis_firehose_delivery_stream.html.markdown @@ -266,7 +266,8 @@ is redshift). More details are given below. Using `redshift_configuration` requires the user to also specify a `s3_configuration` block. More details are given below. -The `kinesis_source_configuration` object supports the following: +The `kinesis_source_configuration` object supports the following: + * `kinesis_stream_arn` (Required) The kinesis stream used as the source of the firehose delivery stream. * `role_arn` (Required) The ARN of the role that provides access to the source Kinesis stream. From 1d375d35f5d2c0d856a2fd924613e4053f1edf40 Mon Sep 17 00:00:00 2001 From: domwong Date: Fri, 6 Jul 2018 09:55:57 +0100 Subject: [PATCH 1760/3316] Update vol tags for restricted cloud since cannot create with vol tags --- aws/resource_aws_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 0f0cb7c70f1..6e705fe5222 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -854,7 +854,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } if d.HasChange("volume_tags") { - if !d.IsNewResource() || !restricted { + if !d.IsNewResource() || restricted { if err := setVolumeTags(conn, d); err != nil { return err } else { From 77995816ee70829f6416d904e376cbadda9bb020 Mon Sep 17 00:00:00 2001 From: domwong Date: Fri, 6 Jul 2018 10:00:16 +0100 Subject: [PATCH 1761/3316] Only update acl for existing bucket, new buckets already created with acl --- aws/resource_aws_s3_bucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 8b159cc6359..9ba8b72f47e 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -588,7 +588,7 @@ func resourceAwsS3BucketUpdate(d *schema.ResourceData, meta interface{}) error { return err } } - if d.HasChange("acl") { + if d.HasChange("acl") && !d.IsNewResource() { if err := resourceAwsS3BucketAclUpdate(s3conn, d); err != nil { return err } From fb91a4974954367b1b747fea68745d40b8399e08 Mon Sep 17 00:00:00 2001 From: domwong Date: Fri, 6 Jul 2018 11:24:42 +0100 Subject: [PATCH 1762/3316] diffTags should not identify existing tags as needing creation --- aws/tags.go | 3 +++ aws/tags_test.go | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/aws/tags.go b/aws/tags.go index 7a4bfdef174..6aa8453c03a 100644 --- a/aws/tags.go +++ b/aws/tags.go @@ -197,6 +197,9 @@ func diffTags(oldTags, newTags []*ec2.Tag) ([]*ec2.Tag, []*ec2.Tag) { old, ok := create[*t.Key] if !ok || old != *t.Value { remove = append(remove, t) + } else if ok { + // already present so remove from new + delete(create, *t.Key) } } diff --git a/aws/tags_test.go b/aws/tags_test.go index 1777c376408..c9c9109bf49 100644 --- a/aws/tags_test.go +++ b/aws/tags_test.go @@ -47,6 +47,24 @@ func TestDiffTags(t *testing.T) { "foo": "bar", }, }, + + // Overlap + { + Old: map[string]interface{}{ + "foo": "bar", + "hello": "world", + }, + New: map[string]interface{}{ + "foo": "baz", + "hello": "world", + }, + Create: map[string]string{ + "foo": "baz", + }, + Remove: map[string]string{ + "foo": "bar", + }, + }, } for i, tc := range cases { From 34e03931adbca723119a188eb45f0c6b22ed9a7a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 07:59:33 -0400 Subject: [PATCH 1763/3316] Update CHANGELOG for #5069 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2642bad52b..bc23495ae68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] +* resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] BUG FIXES: From c4578036c60d004af244162eee7b6f3462e5ae84 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 08:41:29 -0400 Subject: [PATCH 1764/3316] docs/resource/api_gateway_request_validator: Add missing resource documentation --- website/aws.erb | 3 ++ ...pi_gateway_request_validator.html.markdown | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 website/docs/r/api_gateway_request_validator.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 43b5197ba53..fe35af9ff07 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -430,6 +430,9 @@ > aws_api_gateway_model + > + aws_api_gateway_request_validator + > aws_api_gateway_resource diff --git a/website/docs/r/api_gateway_request_validator.html.markdown b/website/docs/r/api_gateway_request_validator.html.markdown new file mode 100644 index 00000000000..4fd41b4c688 --- /dev/null +++ b/website/docs/r/api_gateway_request_validator.html.markdown @@ -0,0 +1,37 @@ +--- +layout: "aws" +page_title: "AWS: aws_api_gateway_request_validator" +sidebar_current: "docs-aws-resource-api-gateway-request-validator" +description: |- + Manages an API Gateway Request Validator. +--- + +# aws_api_gateway_request_validator + +Manages an API Gateway Request Validator. + +## Example Usage + +```hcl +resource "aws_api_gateway_request_validator" "example" { + name = "example" + rest_api_id = "${aws_api_gateway_rest_api.example.id}" + validate_request_body = true + validate_request_parameters = true +} +``` + +## Argument Reference + +The following argument is supported: + +* `name` - (Required) The name of the request validator +* `rest_api_id` - (Required) The ID of the associated Rest API +* `validate_request_body` - (Optional) Boolean whether to validate request body. Defaults to `false`. +* `validate_request_parameters` - (Optional) Boolean whether to validate request parameters. Defaults to `false`. + +## Attribute Reference + +The following attribute is exported in addition to the arguments listed above: + +* `id` - The unique ID of the request validator From 9b6739c35f2df0702e1dbd51dca9fcbd56c50e86 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 6 Jul 2018 18:59:29 +0400 Subject: [PATCH 1765/3316] set arn from parameter group response --- aws/resource_aws_db_parameter_group.go | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/aws/resource_aws_db_parameter_group.go b/aws/resource_aws_db_parameter_group.go index aab4fe97d6a..0898dd8e040 100644 --- a/aws/resource_aws_db_parameter_group.go +++ b/aws/resource_aws_db_parameter_group.go @@ -12,7 +12,6 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" ) @@ -109,7 +108,7 @@ func resourceAwsDbParameterGroupCreate(d *schema.ResourceData, meta interface{}) } log.Printf("[DEBUG] Create DB Parameter Group: %#v", createOpts) - _, err := rdsconn.CreateDBParameterGroup(&createOpts) + resp, err := rdsconn.CreateDBParameterGroup(&createOpts) if err != nil { return fmt.Errorf("Error creating DB Parameter Group: %s", err) } @@ -120,7 +119,8 @@ func resourceAwsDbParameterGroupCreate(d *schema.ResourceData, meta interface{}) d.SetPartial("description") d.Partial(false) - d.SetId(*createOpts.DBParameterGroupName) + d.SetId(aws.StringValue(resp.DBParameterGroup.DBParameterGroupName)) + d.Set("arn", resp.DBParameterGroup.DBParameterGroupArn) log.Printf("[INFO] DB Parameter Group ID: %s", d.Id()) return resourceAwsDbParameterGroupUpdate(d, meta) @@ -227,14 +227,9 @@ func resourceAwsDbParameterGroupRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("error setting 'parameter' in state: %#v", err) } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("pg:%s", d.Id()), - }.String() + arn := aws.StringValue(describeResp.DBParameterGroups[0].DBParameterGroupArn) d.Set("arn", arn) + resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ ResourceName: aws.String(arn), }) @@ -301,14 +296,7 @@ func resourceAwsDbParameterGroupUpdate(d *schema.ResourceData, meta interface{}) } } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("pg:%s", d.Id()), - }.String() - if err := setTagsRDS(rdsconn, d, arn); err != nil { + if err := setTagsRDS(rdsconn, d, d.Get("arn").(string)); err != nil { return err } else { d.SetPartial("tags") From 33e417ae92df79d2eefcef4509ca270caafcdace Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 6 Jul 2018 19:06:36 +0400 Subject: [PATCH 1766/3316] add acceptance test for attribute arn --- aws/resource_aws_db_parameter_group_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_db_parameter_group_test.go b/aws/resource_aws_db_parameter_group_test.go index dc726c166ed..bfed9794e81 100644 --- a/aws/resource_aws_db_parameter_group_test.go +++ b/aws/resource_aws_db_parameter_group_test.go @@ -250,6 +250,8 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) { "aws_db_parameter_group.bar", "parameter.2478663599.value", "utf8"), resource.TestCheckResourceAttr( "aws_db_parameter_group.bar", "tags.%", "1"), + resource.TestMatchResourceAttr( + "aws_db_parameter_group.bar", "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:rds:[^:]+:\\d{12}:pg:%s", groupName))), ), }, resource.TestStep{ @@ -285,6 +287,8 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) { "aws_db_parameter_group.bar", "parameter.2478663599.value", "utf8"), resource.TestCheckResourceAttr( "aws_db_parameter_group.bar", "tags.%", "2"), + resource.TestMatchResourceAttr( + "aws_db_parameter_group.bar", "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:rds:[^:]+:\\d{12}:pg:%s", groupName))), ), }, }, From 22b84e4c8c897d213d5d6297766c797338a6fa45 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 6 Jul 2018 19:19:38 +0400 Subject: [PATCH 1767/3316] set arn from DB subnet group response --- aws/resource_aws_db_subnet_group.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_db_subnet_group.go b/aws/resource_aws_db_subnet_group.go index 3d027d8cf66..7170b5dfb64 100644 --- a/aws/resource_aws_db_subnet_group.go +++ b/aws/resource_aws_db_subnet_group.go @@ -7,7 +7,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" @@ -151,13 +150,7 @@ func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) erro // set tags conn := meta.(*AWSClient).rdsconn - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subgrp:%s", d.Id()), - }.String() + arn := aws.StringValue(subnetGroup.DBSubnetGroupArn) d.Set("arn", arn) resp, err := conn.ListTagsForResource(&rds.ListTagsForResourceInput{ ResourceName: aws.String(arn), @@ -201,13 +194,7 @@ func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) er } } - arn := arn.ARN{ - Partition: meta.(*AWSClient).partition, - Service: "rds", - Region: meta.(*AWSClient).region, - AccountID: meta.(*AWSClient).accountid, - Resource: fmt.Sprintf("subgrp:%s", d.Id()), - }.String() + arn := d.Get("arn").(string) if err := setTagsRDS(conn, d, arn); err != nil { return err } else { From 1642c12fdd7a4933fac169b58a17dd3c16134ce0 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 6 Jul 2018 19:27:58 +0400 Subject: [PATCH 1768/3316] add acceptance test for db subnet group --- aws/resource_aws_db_subnet_group_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/resource_aws_db_subnet_group_test.go b/aws/resource_aws_db_subnet_group_test.go index 260e1ab36a4..05964d1b68e 100644 --- a/aws/resource_aws_db_subnet_group_test.go +++ b/aws/resource_aws_db_subnet_group_test.go @@ -37,6 +37,8 @@ func TestAccAWSDBSubnetGroup_basic(t *testing.T) { "aws_db_subnet_group.foo", "name", rName), resource.TestCheckResourceAttr( "aws_db_subnet_group.foo", "description", "Managed by Terraform"), + resource.TestMatchResourceAttr( + "aws_db_subnet_group.foo", "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:rds:[^:]+:\\d{12}:subgrp:%s", rName))), testCheck, ), }, From 2901330e11fd8ba2f324d6506d7261c1168a92e0 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 6 Jul 2018 19:52:55 +0400 Subject: [PATCH 1769/3316] only adding validation --- aws/resource_aws_cloudwatch_metric_alarm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_cloudwatch_metric_alarm.go b/aws/resource_aws_cloudwatch_metric_alarm.go index 81afb0e309b..c3824434add 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/aws/resource_aws_cloudwatch_metric_alarm.go @@ -35,8 +35,9 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { Required: true, }, "evaluation_periods": { - Type: schema.TypeInt, - Required: true, + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(1), }, "metric_name": { Type: schema.TypeString, @@ -77,7 +78,6 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { "datapoints_to_alarm": { Type: schema.TypeInt, Optional: true, - Computed: true, ValidateFunc: validation.IntAtLeast(1), }, "dimensions": { From 7f45a0eff537a2fa97e96d4d2f4d46c926afb20e Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Fri, 6 Jul 2018 17:57:17 +0100 Subject: [PATCH 1770/3316] Ignore CPU credit specification when not using a T2 type If the 'CreditSpecificationRequest' struct is provided at all then the AWS API will throw an error saying that the instance type does not support T2 unlimited even if it is set to 'standard'. Instead we check if the instance type is 't2' before adding it to the instance opts and if not just warn that it was specified but then ignored. Fixes #5067. --- aws/resource_aws_instance.go | 14 +++++++--- aws/resource_aws_instance_test.go | 45 +++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 0f0cb7c70f1..25deabcea3e 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -1694,17 +1694,23 @@ func buildAwsInstanceOpts( d *schema.ResourceData, meta interface{}) (*awsInstanceOpts, error) { conn := meta.(*AWSClient).ec2conn + instanceType := d.Get("instance_type").(string) opts := &awsInstanceOpts{ DisableAPITermination: aws.Bool(d.Get("disable_api_termination").(bool)), EBSOptimized: aws.Bool(d.Get("ebs_optimized").(bool)), ImageID: aws.String(d.Get("ami").(string)), - InstanceType: aws.String(d.Get("instance_type").(string)), + InstanceType: aws.String(instanceType), } if v, ok := d.GetOk("credit_specification"); ok { - cs := v.([]interface{})[0].(map[string]interface{}) - opts.CreditSpecification = &ec2.CreditSpecificationRequest{ - CpuCredits: aws.String(cs["cpu_credits"].(string)), + // Only T2 instances support T2 Unlimited + if strings.HasPrefix(instanceType, "t2") { + cs := v.([]interface{})[0].(map[string]interface{}) + opts.CreditSpecification = &ec2.CreditSpecificationRequest{ + CpuCredits: aws.String(cs["cpu_credits"].(string)), + } + } else { + log.Print("[WARN] credit_specification is defined but instance type is not T2. Ignoring...") } } diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index 151483fcb30..2a1dc453363 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -1579,6 +1579,25 @@ func TestAccAWSInstance_creditSpecification_removalReturnsStandard(t *testing.T) }) } +func TestAccAWSInstance_creditSpecification_isNotAppliedToNonBurstable(t *testing.T) { + var instance ec2.Instance + resName := "aws_instance.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccInstanceConfig_creditSpecification_isNotAppliedToNonBurstable(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckInstanceExists(resName, &instance), + ), + }, + }, + }) +} + func testAccCheckInstanceNotRecreated(t *testing.T, before, after *ec2.Instance) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -3227,3 +3246,29 @@ resource "aws_instance" "foo" { } `, rInt) } + +func testAccInstanceConfig_creditSpecification_isNotAppliedToNonBurstable(rInt int) string { + return fmt.Sprintf(` +resource "aws_vpc" "my_vpc" { + cidr_block = "172.16.0.0/16" + tags { + Name = "tf-acctest-%d" + } +} + +resource "aws_subnet" "my_subnet" { + vpc_id = "${aws_vpc.my_vpc.id}" + cidr_block = "172.16.20.0/24" + availability_zone = "us-west-2a" +} + +resource "aws_instance" "foo" { + ami = "ami-22b9a343" # us-west-2 + instance_type = "m1.small" + subnet_id = "${aws_subnet.my_subnet.id}" + credit_specification { + cpu_credits = "standard" + } +} +`, rInt) +} From 81f72d181bd3637d3f35fde53cef23fb5fe610db Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 13:00:43 -0400 Subject: [PATCH 1771/3316] Update CHANGELOG for #5077 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc23495ae68..5f22aa8e951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* data-source/aws_region: Add `description` attribute [GH-5077] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] From 02029c68633deafdae9d598639635711b09b8c7d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 13:04:27 -0400 Subject: [PATCH 1772/3316] Update CHANGELOG for #5090 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f22aa8e951..6b24db14bbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * data-source/aws_region: Add `description` attribute [GH-5077] +* resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] From 9926ae6e682b0969815d036442ac00470d7d727d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 13:10:49 -0400 Subject: [PATCH 1773/3316] data-source/aws_vpc: Add err check for d.Set() on cidr_block_associations --- aws/data_source_aws_vpc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aws/data_source_aws_vpc.go b/aws/data_source_aws_vpc.go index e2434d95aee..9692854b62a 100644 --- a/aws/data_source_aws_vpc.go +++ b/aws/data_source_aws_vpc.go @@ -171,7 +171,9 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { } cidrAssociations = append(cidrAssociations, association) } - d.Set("cidr_block_associations", cidrAssociations) + if err := d.Set("cidr_block_associations", cidrAssociations); err != nil { + return fmt.Errorf("error setting cidr_block_associations: %s", err) + } if vpc.Ipv6CidrBlockAssociationSet != nil { d.Set("ipv6_association_id", vpc.Ipv6CidrBlockAssociationSet[0].AssociationId) From 94df6261f98c5d9dfbb671e457541c95962c8592 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 13:16:09 -0400 Subject: [PATCH 1774/3316] Update CHANGELOG for #5098 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b24db14bbc..ce8dd2269a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * data-source/aws_region: Add `description` attribute [GH-5077] +* data-source/aws_vpc: Add `cidr_block_associations` attribute [GH-5098] * resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] From c82c9e8899aca7fb89178671f9df135c36269b8a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 14:49:11 -0400 Subject: [PATCH 1775/3316] Update CHANGELOG for #5100 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce8dd2269a0..33f63718930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ENHANCEMENTS: * data-source/aws_region: Add `description` attribute [GH-5077] * data-source/aws_vpc: Add `cidr_block_associations` attribute [GH-5098] * resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] +* resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] From 00a1aa79c2ecbb88782f50e0efc7f00b5f3650f1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 15:34:17 -0400 Subject: [PATCH 1776/3316] Update CHANGELOG for #5114 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33f63718930..af0d6c01f3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ENHANCEMENTS: * data-source/aws_region: Add `description` attribute [GH-5077] * data-source/aws_vpc: Add `cidr_block_associations` attribute [GH-5098] * resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] +* resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` [GH-5114] * resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] From 25050a768cd020eb33fd3913692322eb92d8c3d6 Mon Sep 17 00:00:00 2001 From: John Robison Date: Fri, 6 Jul 2018 15:41:42 -0400 Subject: [PATCH 1777/3316] documentation only: add a note to /r/codepipeline.markdown to indicate that a minimum of two stage blocks is required --- website/docs/r/codepipeline.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/codepipeline.markdown b/website/docs/r/codepipeline.markdown index dc1a04fa722..94bef27fcb0 100644 --- a/website/docs/r/codepipeline.markdown +++ b/website/docs/r/codepipeline.markdown @@ -133,7 +133,7 @@ The following arguments are supported: * `name` - (Required) The name of the pipeline. * `role_arn` - (Required) A service role Amazon Resource Name (ARN) that grants AWS CodePipeline permission to make calls to AWS services on your behalf. * `artifact_store` (Required) An artifact_store block. Artifact stores are documented below. -* `stage` (Required) A stage block. Stages are documented below. +* `stage` (Minimum of at least two `stage` blocks is required) A stage block. Stages are documented below. An `artifact_store` block supports the following arguments: From 1e150085fe6b00dfe3a173b6caff8f77aebba6f6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 6 Jul 2018 15:50:09 -0400 Subject: [PATCH 1778/3316] Update CHANGELOG for #5095 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af0d6c01f3b..93b6a8f1a9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * data-source/aws_region: Add `description` attribute [GH-5077] * data-source/aws_vpc: Add `cidr_block_associations` attribute [GH-5098] +* resource/aws_cloudwatch_metric_alarm: Add `datapoints_to_alarm` and `evaluation_period` plan time validation [GH-5095] * resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] * resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` [GH-5114] * resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] From e46f5df4bf8880fee40be3b3829df73fca4e7ae7 Mon Sep 17 00:00:00 2001 From: John Sandmeyer Date: Fri, 6 Jul 2018 17:32:00 -0600 Subject: [PATCH 1779/3316] waf_web_acl - add rule group support similar to wafregional_web_acl --- aws/resource_aws_waf_web_acl.go | 51 ++++++++++++++---- aws/resource_aws_waf_web_acl_test.go | 54 +++++++++++++++++++ website/docs/r/waf_web_acl.html.markdown | 5 +- .../docs/r/wafregional_web_acl.html.markdown | 2 +- 4 files changed, 99 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_waf_web_acl.go b/aws/resource_aws_waf_web_acl.go index 92032a70245..9e4a1fb3da0 100644 --- a/aws/resource_aws_waf_web_acl.go +++ b/aws/resource_aws_waf_web_acl.go @@ -50,7 +50,20 @@ func resourceAwsWafWebAcl() *schema.Resource { Schema: map[string]*schema.Schema{ "action": &schema.Schema{ Type: schema.TypeSet, - Required: true, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "override_action": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -72,6 +85,7 @@ func resourceAwsWafWebAcl() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{ waf.WafRuleTypeRegular, waf.WafRuleTypeRateBased, + waf.WafRuleTypeGroup, }, false), }, "rule_id": &schema.Schema{ @@ -184,16 +198,33 @@ func updateWebAclResource(d *schema.ResourceData, meta interface{}, ChangeAction rules := d.Get("rules").(*schema.Set) for _, rule := range rules.List() { aclRule := rule.(map[string]interface{}) - action := aclRule["action"].(*schema.Set).List()[0].(map[string]interface{}) - aclRuleUpdate := &waf.WebACLUpdate{ - Action: aws.String(ChangeAction), - ActivatedRule: &waf.ActivatedRule{ - Priority: aws.Int64(int64(aclRule["priority"].(int))), - RuleId: aws.String(aclRule["rule_id"].(string)), - Type: aws.String(aclRule["type"].(string)), - Action: &waf.WafAction{Type: aws.String(action["type"].(string))}, - }, + + var aclRuleUpdate *waf.WebACLUpdate + switch aclRule["type"].(string) { + case waf.WafRuleTypeGroup: + overrideAction := aclRule["override_action"].(*schema.Set).List()[0].(map[string]interface{}) + aclRuleUpdate = &waf.WebACLUpdate{ + Action: aws.String(ChangeAction), + ActivatedRule: &waf.ActivatedRule{ + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + OverrideAction: &waf.WafOverrideAction{Type: aws.String(overrideAction["type"].(string))}, + }, + } + default: + action := aclRule["action"].(*schema.Set).List()[0].(map[string]interface{}) + aclRuleUpdate = &waf.WebACLUpdate{ + Action: aws.String(ChangeAction), + ActivatedRule: &waf.ActivatedRule{ + Priority: aws.Int64(int64(aclRule["priority"].(int))), + RuleId: aws.String(aclRule["rule_id"].(string)), + Type: aws.String(aclRule["type"].(string)), + Action: &waf.WafAction{Type: aws.String(action["type"].(string))}, + }, + } } + req.Updates = append(req.Updates, aclRuleUpdate) } return conn.UpdateWebACL(req) diff --git a/aws/resource_aws_waf_web_acl_test.go b/aws/resource_aws_waf_web_acl_test.go index 6591fed0e4f..b01ffba2aa0 100644 --- a/aws/resource_aws_waf_web_acl_test.go +++ b/aws/resource_aws_waf_web_acl_test.go @@ -42,6 +42,35 @@ func TestAccAWSWafWebAcl_basic(t *testing.T) { }) } +func TestAccAWSWafWebAcl_group(t *testing.T) { + var v waf.WebACL + wafAclName := fmt.Sprintf("wafaclgroup%s", acctest.RandString(5)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSWafWebAclDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSWafWebAclGroupConfig(wafAclName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSWafWebAclExists("aws_waf_web_acl.waf_acl", &v), + resource.TestCheckResourceAttr( + "aws_waf_web_acl.waf_acl", "default_action.#", "1"), + resource.TestCheckResourceAttr( + "aws_waf_web_acl.waf_acl", "default_action.4234791575.type", "ALLOW"), + resource.TestCheckResourceAttr( + "aws_waf_web_acl.waf_acl", "name", wafAclName), + resource.TestCheckResourceAttr( + "aws_waf_web_acl.waf_acl", "rules.#", "1"), + resource.TestCheckResourceAttr( + "aws_waf_web_acl.waf_acl", "metric_name", wafAclName), + ), + }, + }, + }) +} + func TestAccAWSWafWebAcl_changeNameForceNew(t *testing.T) { var before, after waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) @@ -294,6 +323,31 @@ resource "aws_waf_web_acl" "waf_acl" { }`, name, name, name, name, name) } +func testAccAWSWafWebAclGroupConfig(name string) string { + return fmt.Sprintf(` + +resource "aws_waf_rule_group" "wafrulegroup" { + name = "%s" + metric_name = "%s" +} +resource "aws_waf_web_acl" "waf_acl" { + depends_on = ["aws_waf_rule_group.wafrulegroup"] + name = "%s" + metric_name = "%s" + default_action { + type = "ALLOW" + } + rules { + override_action { + type = "NONE" + } + type = "GROUP" + priority = 1 + rule_id = "${aws_waf_rule_group.wafrulegroup.id}" + } +}`, name, name, name, name) +} + func testAccAWSWafWebAclConfigChangeName(name string) string { return fmt.Sprintf(`resource "aws_waf_ipset" "ipset" { name = "%s" diff --git a/website/docs/r/waf_web_acl.html.markdown b/website/docs/r/waf_web_acl.html.markdown index 498ce5e51b9..1f8be13bca7 100644 --- a/website/docs/r/waf_web_acl.html.markdown +++ b/website/docs/r/waf_web_acl.html.markdown @@ -80,11 +80,12 @@ See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ActivatedRule. #### Arguments * `action` - (Required) The action that CloudFront or AWS WAF takes when a web request matches the conditions in the rule. - e.g. `ALLOW`, `BLOCK` or `COUNT` + e.g. `ALLOW`, `BLOCK` or `COUNT`. Not used if `type` is `GROUP`. +* `override_action` - (Required) Override the action that a group requests CloudFront or AWS WAF takes when a web request matches the conditions in the rule. Only used if `type` is `GROUP`. * `priority` - (Required) Specifies the order in which the rules in a WebACL are evaluated. Rules with a lower value are evaluated before rules with a higher value. * `rule_id` - (Required) ID of the associated [rule](/docs/providers/aws/r/waf_rule.html) -* `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), or `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. +* `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html), or `GROUP`, as defined by [RuleGroup](https://docs.aws.amazon.com/waf/latest/APIReference/API_RuleGroup.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. If you add a GROUP rule, you need to set `type` as `GROUP`. ## Attributes Reference diff --git a/website/docs/r/wafregional_web_acl.html.markdown b/website/docs/r/wafregional_web_acl.html.markdown index de25a59ba27..0e27eb13983 100644 --- a/website/docs/r/wafregional_web_acl.html.markdown +++ b/website/docs/r/wafregional_web_acl.html.markdown @@ -75,7 +75,7 @@ See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_regional_Acti * `priority` - (Required) Specifies the order in which the rules in a WebACL are evaluated. Rules with a lower value are evaluated before rules with a higher value. * `rule_id` - (Required) ID of the associated [rule](/docs/providers/aws/r/wafregional_rule.html) -* `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html), or `GROUP`, as defined by [RuleGroup](https://docs.aws.amazon.com/waf/latest/APIReference/API_RuleGroup.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. +* `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html), or `GROUP`, as defined by [RuleGroup](https://docs.aws.amazon.com/waf/latest/APIReference/API_RuleGroup.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. If you add a GROUP rule, you need to set `type` as `GROUP`. ### `default_action` / `action` From 7b945c54d78e0361d56c303e110a99cd4ba25d12 Mon Sep 17 00:00:00 2001 From: chroju Date: Sat, 7 Jul 2018 16:40:48 +0900 Subject: [PATCH 1780/3316] resource/aws_wafregional_byte_match_set: Rename byte_match_tuple --- ...resource_aws_wafregional_byte_match_set.go | 60 +++++++- ...rce_aws_wafregional_byte_match_set_test.go | 130 +++++++++--------- .../wafregional_byte_match_set.html.markdown | 8 +- 3 files changed, 128 insertions(+), 70 deletions(-) diff --git a/aws/resource_aws_wafregional_byte_match_set.go b/aws/resource_aws_wafregional_byte_match_set.go index 9321367ff75..790ee5797d4 100644 --- a/aws/resource_aws_wafregional_byte_match_set.go +++ b/aws/resource_aws_wafregional_byte_match_set.go @@ -25,6 +25,45 @@ func resourceAwsWafRegionalByteMatchSet() *schema.Resource { ForceNew: true, }, "byte_match_tuple": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + ConflictsWith: []string{"byte_match_tuples"}, + Deprecated: "use `byte_match_tuples` instead", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "field_to_match": { + Type: schema.TypeSet, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "data": { + Type: schema.TypeString, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "positional_constraint": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "target_string": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "text_transformation": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "byte_match_tuples": &schema.Schema{ Type: schema.TypeSet, Optional: true, Elem: &schema.Resource{ @@ -110,7 +149,11 @@ func resourceAwsWafRegionalByteMatchSetRead(d *schema.ResourceData, meta interfa return err } - d.Set("byte_match_tuple", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + if _, ok := d.GetOk("byte_match_tuple"); ok { + d.Set("byte_match_tuple", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + } else { + d.Set("byte_match_tuples", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + } d.Set("name", resp.ByteMatchSet.Name) return nil @@ -155,6 +198,14 @@ func resourceAwsWafRegionalByteMatchSetUpdate(d *schema.ResourceData, meta inter o, n := d.GetChange("byte_match_tuple") oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) + if err != nil { + return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) + } + } else if d.HasChange("byte_match_tuples") { + o, n := d.GetChange("byte_match_tuples") + oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() + err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) if err != nil { return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) @@ -169,7 +220,12 @@ func resourceAwsWafRegionalByteMatchSetDelete(d *schema.ResourceData, meta inter log.Printf("[INFO] Deleting ByteMatchSet: %s", d.Get("name").(string)) - oldT := d.Get("byte_match_tuple").(*schema.Set).List() + var oldT []interface{} + if _, ok := d.GetOk("byte_match_tuple"); ok { + oldT = d.Get("byte_match_tuple").(*schema.Set).List() + } else { + oldT = d.Get("byte_match_tuples").(*schema.Set).List() + } if len(oldT) > 0 { var newT []interface{} diff --git a/aws/resource_aws_wafregional_byte_match_set_test.go b/aws/resource_aws_wafregional_byte_match_set_test.go index 2600349aee5..5ae91139fe7 100644 --- a/aws/resource_aws_wafregional_byte_match_set_test.go +++ b/aws/resource_aws_wafregional_byte_match_set_test.go @@ -30,27 +30,27 @@ func TestAccAWSWafRegionalByteMatchSet_basic(t *testing.T) { resource.TestCheckResourceAttr( "aws_wafregional_byte_match_set.byte_set", "name", byteMatchSet), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.#", "2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.#", "2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.target_string", "badrefer1"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.target_string", "badrefer1"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.text_transformation", "NONE"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.target_string", "badrefer2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.target_string", "badrefer2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.text_transformation", "NONE"), ), }, }, @@ -74,27 +74,27 @@ func TestAccAWSWafRegionalByteMatchSet_changeNameForceNew(t *testing.T) { resource.TestCheckResourceAttr( "aws_wafregional_byte_match_set.byte_set", "name", byteMatchSet), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.#", "2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.#", "2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.target_string", "badrefer1"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.target_string", "badrefer1"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.text_transformation", "NONE"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.target_string", "badrefer2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.target_string", "badrefer2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.text_transformation", "NONE"), ), }, { @@ -104,34 +104,34 @@ func TestAccAWSWafRegionalByteMatchSet_changeNameForceNew(t *testing.T) { resource.TestCheckResourceAttr( "aws_wafregional_byte_match_set.byte_set", "name", byteMatchSetNewName), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.#", "2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.#", "2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.target_string", "badrefer1"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.target_string", "badrefer1"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.text_transformation", "NONE"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.target_string", "badrefer2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.target_string", "badrefer2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.text_transformation", "NONE"), ), }, }, }) } -func TestAccAWSWafRegionalByteMatchSet_changeByteMatchTuple(t *testing.T) { +func TestAccAWSWafRegionalByteMatchSet_changeByteMatchTuples(t *testing.T) { var before, after waf.ByteMatchSet byteMatchSetName := fmt.Sprintf("byte-batch-set-%s", acctest.RandString(5)) @@ -147,57 +147,57 @@ func TestAccAWSWafRegionalByteMatchSet_changeByteMatchTuple(t *testing.T) { resource.TestCheckResourceAttr( "aws_wafregional_byte_match_set.byte_set", "name", byteMatchSetName), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.#", "2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.#", "2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.target_string", "badrefer1"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.target_string", "badrefer1"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2174619346.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2174619346.text_transformation", "NONE"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.data", "referer"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.data", "referer"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.field_to_match.2991901334.type", "HEADER"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.field_to_match.2991901334.type", "HEADER"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.positional_constraint", "CONTAINS"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.positional_constraint", "CONTAINS"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.target_string", "badrefer2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.target_string", "badrefer2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.839525137.text_transformation", "NONE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.839525137.text_transformation", "NONE"), ), }, { - Config: testAccAWSWafRegionalByteMatchSetConfigChangeByteMatchTuple(byteMatchSetName), + Config: testAccAWSWafRegionalByteMatchSetConfigChangeByteMatchTuples(byteMatchSetName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSWafRegionalByteMatchSetExists("aws_wafregional_byte_match_set.byte_set", &after), resource.TestCheckResourceAttr( "aws_wafregional_byte_match_set.byte_set", "name", byteMatchSetName), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.#", "2"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.#", "2"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2397850647.field_to_match.4253810390.data", "GET"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2397850647.field_to_match.4253810390.data", "GET"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2397850647.field_to_match.4253810390.type", "METHOD"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2397850647.field_to_match.4253810390.type", "METHOD"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2397850647.positional_constraint", "STARTS_WITH"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2397850647.positional_constraint", "STARTS_WITH"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2397850647.target_string", "badrefer1+"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2397850647.target_string", "badrefer1+"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.2397850647.text_transformation", "LOWERCASE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.2397850647.text_transformation", "LOWERCASE"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.4153613423.field_to_match.3756326843.data", ""), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.4153613423.field_to_match.3756326843.data", ""), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.4153613423.field_to_match.3756326843.type", "URI"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.4153613423.field_to_match.3756326843.type", "URI"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.4153613423.positional_constraint", "ENDS_WITH"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.4153613423.positional_constraint", "ENDS_WITH"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.4153613423.target_string", "badrefer2+"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.4153613423.target_string", "badrefer2+"), resource.TestCheckResourceAttr( - "aws_wafregional_byte_match_set.byte_set", "byte_match_tuple.4153613423.text_transformation", "LOWERCASE"), + "aws_wafregional_byte_match_set.byte_set", "byte_match_tuples.4153613423.text_transformation", "LOWERCASE"), ), }, }, @@ -218,7 +218,7 @@ func TestAccAWSWafRegionalByteMatchSet_noByteMatchTuples(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSWafRegionalByteMatchSetExists("aws_wafregional_byte_match_set.byte_match_set", &byteMatchSet), resource.TestCheckResourceAttr("aws_wafregional_byte_match_set.byte_match_set", "name", byteMatchSetName), - resource.TestCheckResourceAttr("aws_wafregional_byte_match_set.byte_match_set", "byte_match_tuple.#", "0"), + resource.TestCheckResourceAttr("aws_wafregional_byte_match_set.byte_match_set", "byte_match_tuples.#", "0"), ), }, }, @@ -356,7 +356,7 @@ func testAccAWSWafRegionalByteMatchSetConfig(name string) string { return fmt.Sprintf(` resource "aws_wafregional_byte_match_set" "byte_set" { name = "%s" - byte_match_tuple { + byte_match_tuples { text_transformation = "NONE" target_string = "badrefer1" positional_constraint = "CONTAINS" @@ -366,7 +366,7 @@ resource "aws_wafregional_byte_match_set" "byte_set" { } } - byte_match_tuple { + byte_match_tuples { text_transformation = "NONE" target_string = "badrefer2" positional_constraint = "CONTAINS" @@ -382,7 +382,7 @@ func testAccAWSWafRegionalByteMatchSetConfigChangeName(name string) string { return fmt.Sprintf(` resource "aws_wafregional_byte_match_set" "byte_set" { name = "%s" - byte_match_tuple { + byte_match_tuples { text_transformation = "NONE" target_string = "badrefer1" positional_constraint = "CONTAINS" @@ -392,7 +392,7 @@ resource "aws_wafregional_byte_match_set" "byte_set" { } } - byte_match_tuple { + byte_match_tuples { text_transformation = "NONE" target_string = "badrefer2" positional_constraint = "CONTAINS" @@ -411,11 +411,11 @@ resource "aws_wafregional_byte_match_set" "byte_match_set" { }`, name) } -func testAccAWSWafRegionalByteMatchSetConfigChangeByteMatchTuple(name string) string { +func testAccAWSWafRegionalByteMatchSetConfigChangeByteMatchTuples(name string) string { return fmt.Sprintf(` resource "aws_wafregional_byte_match_set" "byte_set" { name = "%s" - byte_match_tuple { + byte_match_tuples { text_transformation = "LOWERCASE" target_string = "badrefer1+" positional_constraint = "STARTS_WITH" @@ -425,7 +425,7 @@ resource "aws_wafregional_byte_match_set" "byte_set" { } } - byte_match_tuple { + byte_match_tuples { text_transformation = "LOWERCASE" target_string = "badrefer2+" positional_constraint = "ENDS_WITH" diff --git a/website/docs/r/wafregional_byte_match_set.html.markdown b/website/docs/r/wafregional_byte_match_set.html.markdown index a38eca13d3f..2450fffeba7 100644 --- a/website/docs/r/wafregional_byte_match_set.html.markdown +++ b/website/docs/r/wafregional_byte_match_set.html.markdown @@ -15,7 +15,7 @@ Provides a WAF Regional Byte Match Set Resource for use with Application Load Ba ```hcl resource "aws_wafregional_byte_match_set" "byte_set" { name = "tf_waf_byte_match_set" - byte_match_tuple { + byte_match_tuples { text_transformation = "NONE" target_string = "badrefer1" positional_constraint = "CONTAINS" @@ -32,9 +32,11 @@ resource "aws_wafregional_byte_match_set" "byte_set" { The following arguments are supported: * `name` - (Required) The name or description of the ByteMatchSet. -* `byte_match_tuple` - (Optional)Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below. +* `byte_match_tuple` - **Deprecated**, use `byte_match_tuples` instead. +* `byte_match_tuples` - (Optional)Settings for the ByteMatchSet, such as the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests. ByteMatchTuple documented below. -ByteMatchTuple(byte_match_tuple) support the following: + +ByteMatchTuples(byte_match_tuples) support the following: * `field_to_match` - (Required) Settings for the ByteMatchTuple. FieldToMatch documented below. * `positional_constraint` - (Required) Within the portion of a web request that you want to search. From 4a103f29ea015697e1a38b7f63cd1e71dda019be Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Sun, 8 Jul 2018 23:31:13 -0400 Subject: [PATCH 1781/3316] Update ebs acceptance tests to run in multiple regions. --- aws/data_source_aws_ebs_volume_test.go | 8 ++++-- aws/resource_aws_ebs_volume_test.go | 40 +++++++++++++++++--------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/aws/data_source_aws_ebs_volume_test.go b/aws/data_source_aws_ebs_volume_test.go index 072b471910e..f60cad79785 100644 --- a/aws/data_source_aws_ebs_volume_test.go +++ b/aws/data_source_aws_ebs_volume_test.go @@ -61,8 +61,10 @@ func testAccCheckAwsEbsVolumeDataSourceID(n string) resource.TestCheckFunc { } const testAccCheckAwsEbsVolumeDataSourceConfig = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "example" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "gp2" size = 40 tags { @@ -84,8 +86,10 @@ data "aws_ebs_volume" "ebs_volume" { ` const testAccCheckAwsEbsVolumeDataSourceConfigWithMultipleFilters = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "external1" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "gp2" size = 10 tags { diff --git a/aws/resource_aws_ebs_volume_test.go b/aws/resource_aws_ebs_volume_test.go index fbee38d767e..2078b015a7c 100644 --- a/aws/resource_aws_ebs_volume_test.go +++ b/aws/resource_aws_ebs_volume_test.go @@ -135,7 +135,7 @@ func TestAccAWSEBSVolume_kmsKey(t *testing.T) { var v ec2.Volume ri := acctest.RandInt() config := fmt.Sprintf(testAccAwsEbsVolumeConfigWithKmsKey, ri) - keyRegex := regexp.MustCompile("^arn:aws:([a-zA-Z0-9\\-])+:([a-z]{2}-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$") + keyRegex := regexp.MustCompile("^arn:aws[\\w-]*:([a-zA-Z0-9\\-])+:([a-z-]+-\\d{1})?:(\\d{12})?:(.*)$") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -216,8 +216,10 @@ func testAccCheckVolumeExists(n string, v *ec2.Volume) resource.TestCheckFunc { } const testAccAwsEbsVolumeConfig = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "gp2" size = 1 tags { @@ -249,8 +251,6 @@ data "aws_ami" "debian_jessie_latest" { name = "root-device-type" values = ["ebs"] } - - owners = ["379101102735"] # Debian } resource "aws_instance" "test" { @@ -270,6 +270,8 @@ resource "aws_instance" "test" { } } +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "test" { depends_on = ["aws_instance.test"] availability_zone = "${aws_instance.test.availability_zone}" @@ -308,8 +310,6 @@ data "aws_ami" "debian_jessie_latest" { name = "root-device-type" values = ["ebs"] } - - owners = ["379101102735"] # Debian } resource "aws_instance" "test" { @@ -345,8 +345,10 @@ resource "aws_volume_attachment" "test" { ` const testAccAwsEbsVolumeConfigUpdateSize = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "gp2" size = 10 tags { @@ -356,8 +358,10 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigUpdateType = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "sc1" size = 500 tags { @@ -367,8 +371,10 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigWithIops = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "io1" size = 4 iops = 100 @@ -379,8 +385,10 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigWithIopsUpdated = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" type = "io1" size = 4 iops = 200 @@ -412,8 +420,10 @@ resource "aws_kms_key" "foo" { POLICY } +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" size = 1 encrypted = true kms_key_id = "${aws_kms_key.foo.arn}" @@ -421,8 +431,10 @@ resource "aws_ebs_volume" "test" { ` const testAccAwsEbsVolumeConfigWithTags = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "tags_test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" size = 1 tags { Name = "TerraformTest" @@ -431,8 +443,10 @@ resource "aws_ebs_volume" "tags_test" { ` const testAccAwsEbsVolumeConfigWithNoIops = ` +data "aws_availability_zones" "available" {} + resource "aws_ebs_volume" "iops_test" { - availability_zone = "us-west-2a" + availability_zone = "${data.aws_availability_zones.available.names[0]}" size = 10 type = "gp2" iops = 0 From 983eb02f813c1a39cceba9e28d420c68f41867a4 Mon Sep 17 00:00:00 2001 From: domwong Date: Mon, 9 Jul 2018 09:58:16 +0100 Subject: [PATCH 1782/3316] Tag on create is actually available everywhere now https://aws.amazon.com/about-aws/whats-new/2018/07/tag-on-create-for-amazon-ec2-and-amazon-ebs-is-now-available-in-the-aws-govcloud-region/ --- aws/resource_aws_instance.go | 45 ++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 6e705fe5222..52daead2d5f 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -514,35 +514,32 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Only 1 of `ipv6_address_count` or `ipv6_addresses` can be specified") } - restricted := meta.(*AWSClient).IsGovCloud() || meta.(*AWSClient).IsChinaCloud() - if !restricted { - tagsSpec := make([]*ec2.TagSpecification, 0) + tagsSpec := make([]*ec2.TagSpecification, 0) - if v, ok := d.GetOk("tags"); ok { - tags := tagsFromMap(v.(map[string]interface{})) + if v, ok := d.GetOk("tags"); ok { + tags := tagsFromMap(v.(map[string]interface{})) - spec := &ec2.TagSpecification{ - ResourceType: aws.String("instance"), - Tags: tags, - } - - tagsSpec = append(tagsSpec, spec) + spec := &ec2.TagSpecification{ + ResourceType: aws.String("instance"), + Tags: tags, } - if v, ok := d.GetOk("volume_tags"); ok { - tags := tagsFromMap(v.(map[string]interface{})) + tagsSpec = append(tagsSpec, spec) + } - spec := &ec2.TagSpecification{ - ResourceType: aws.String("volume"), - Tags: tags, - } + if v, ok := d.GetOk("volume_tags"); ok { + tags := tagsFromMap(v.(map[string]interface{})) - tagsSpec = append(tagsSpec, spec) + spec := &ec2.TagSpecification{ + ResourceType: aws.String("volume"), + Tags: tags, } - if len(tagsSpec) > 0 { - runOpts.TagSpecifications = tagsSpec - } + tagsSpec = append(tagsSpec, spec) + } + + if len(tagsSpec) > 0 { + runOpts.TagSpecifications = tagsSpec } // Create the instance @@ -842,10 +839,8 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { d.Partial(true) - restricted := meta.(*AWSClient).IsGovCloud() || meta.(*AWSClient).IsChinaCloud() - if d.HasChange("tags") { - if !d.IsNewResource() || restricted { + if !d.IsNewResource() { if err := setTags(conn, d); err != nil { return err } else { @@ -854,7 +849,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } if d.HasChange("volume_tags") { - if !d.IsNewResource() || restricted { + if !d.IsNewResource() { if err := setVolumeTags(conn, d); err != nil { return err } else { From 7d0c7cb860506320dd2554902cb527985daac72a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 07:45:30 -0400 Subject: [PATCH 1783/3316] resource/aws_glue_catalog_database: Properly return error when missing colon during import --- aws/resource_aws_glue_catalog_database.go | 31 ++++++++++++++----- ...resource_aws_glue_catalog_database_test.go | 10 ++++-- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_glue_catalog_database.go b/aws/resource_aws_glue_catalog_database.go index 9fde86994c1..bc035a9390e 100644 --- a/aws/resource_aws_glue_catalog_database.go +++ b/aws/resource_aws_glue_catalog_database.go @@ -76,7 +76,10 @@ func resourceAwsGlueCatalogDatabaseCreate(d *schema.ResourceData, meta interface func resourceAwsGlueCatalogDatabaseUpdate(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return err + } dbUpdateInput := &glue.UpdateDatabaseInput{ CatalogId: aws.String(catalogID), @@ -117,7 +120,10 @@ func resourceAwsGlueCatalogDatabaseUpdate(d *schema.ResourceData, meta interface func resourceAwsGlueCatalogDatabaseRead(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return err + } input := &glue.GetDatabaseInput{ CatalogId: aws.String(catalogID), @@ -153,10 +159,13 @@ func resourceAwsGlueCatalogDatabaseRead(d *schema.ResourceData, meta interface{} func resourceAwsGlueCatalogDatabaseDelete(d *schema.ResourceData, meta interface{}) error { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return err + } log.Printf("[DEBUG] Glue Catalog Database: %s:%s", catalogID, name) - _, err := glueconn.DeleteDatabase(&glue.DeleteDatabaseInput{ + _, err = glueconn.DeleteDatabase(&glue.DeleteDatabaseInput{ Name: aws.String(name), }) if err != nil { @@ -167,20 +176,26 @@ func resourceAwsGlueCatalogDatabaseDelete(d *schema.ResourceData, meta interface func resourceAwsGlueCatalogDatabaseExists(d *schema.ResourceData, meta interface{}) (bool, error) { glueconn := meta.(*AWSClient).glueconn - catalogID, name := readAwsGlueCatalogID(d.Id()) + catalogID, name, err := readAwsGlueCatalogID(d.Id()) + if err != nil { + return false, err + } input := &glue.GetDatabaseInput{ CatalogId: aws.String(catalogID), Name: aws.String(name), } - _, err := glueconn.GetDatabase(input) + _, err = glueconn.GetDatabase(input) return err == nil, err } -func readAwsGlueCatalogID(id string) (catalogID string, name string) { +func readAwsGlueCatalogID(id string) (catalogID string, name string, err error) { idParts := strings.Split(id, ":") - return idParts[0], idParts[1] + if len(idParts) != 2 { + return "", "", fmt.Errorf("Unexpected format of ID (%q), expected CATALOG-ID:DATABASE-NAME", id) + } + return idParts[0], idParts[1], nil } func createAwsGlueCatalogID(d *schema.ResourceData, accountid string) (catalogID string) { diff --git a/aws/resource_aws_glue_catalog_database_test.go b/aws/resource_aws_glue_catalog_database_test.go index 14ddcca007f..e7dbe4c8b5e 100644 --- a/aws/resource_aws_glue_catalog_database_test.go +++ b/aws/resource_aws_glue_catalog_database_test.go @@ -121,7 +121,10 @@ func testAccCheckGlueDatabaseDestroy(s *terraform.State) error { continue } - catalogId, dbName := readAwsGlueCatalogID(rs.Primary.ID) + catalogId, dbName, err := readAwsGlueCatalogID(rs.Primary.ID) + if err != nil { + return err + } input := &glue.GetDatabaseInput{ CatalogId: aws.String(catalogId), @@ -174,7 +177,10 @@ func testAccCheckGlueCatalogDatabaseExists(name string) resource.TestCheckFunc { return fmt.Errorf("No ID is set") } - catalogId, dbName := readAwsGlueCatalogID(rs.Primary.ID) + catalogId, dbName, err := readAwsGlueCatalogID(rs.Primary.ID) + if err != nil { + return err + } glueconn := testAccProvider.Meta().(*AWSClient).glueconn out, err := glueconn.GetDatabase(&glue.GetDatabaseInput{ From a51afe76aa0668b39d04fb2d04d7ff2696b998b5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 08:04:12 -0400 Subject: [PATCH 1784/3316] resource/aws_rds_cluster_instance: Support configuring-log-exports status --- aws/resource_aws_rds_cluster_instance.go | 40 ++++++++++++++++++------ 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index 6825b3f4095..d3652268b9e 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -288,10 +288,19 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying", - "configuring-enhanced-monitoring", "maintenance", - "rebooting", "renaming", "resetting-master-credentials", - "starting", "upgrading"}, + Pending: []string{ + "backing-up", + "configuring-enhanced-monitoring", + "configuring-log-exports", + "creating", + "maintenance", + "modifying", + "rebooting", + "renaming", + "resetting-master-credentials", + "starting", + "upgrading", + }, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutCreate), @@ -492,10 +501,19 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{"creating", "backing-up", "modifying", - "configuring-enhanced-monitoring", "maintenance", - "rebooting", "renaming", "resetting-master-credentials", - "starting", "upgrading"}, + Pending: []string{ + "backing-up", + "configuring-enhanced-monitoring", + "configuring-log-exports", + "creating", + "maintenance", + "modifying", + "rebooting", + "renaming", + "resetting-master-credentials", + "starting", + "upgrading", + }, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutUpdate), @@ -540,7 +558,11 @@ func resourceAwsRDSClusterInstanceDelete(d *schema.ResourceData, meta interface{ // re-uses db_instance refresh func log.Println("[INFO] Waiting for RDS Cluster Instance to be destroyed") stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying", "deleting"}, + Pending: []string{ + "configuring-log-exports", + "modifying", + "deleting", + }, Target: []string{}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutDelete), From b99c2f2cae8e308f36d9b0f553f1bfb6175c1ff6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 08:12:43 -0400 Subject: [PATCH 1785/3316] Update CHANGELOG for #5123 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93b6a8f1a9f..80f9762085e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] +* resource/aws_glue_catalog_database: Properly return error when missing colon during import [GH-5123] * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] ## 1.26.0 (July 04, 2018) From 5bdff413af80c7d2fce33a3bfb8fffb2cbb679e5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 09:17:37 -0400 Subject: [PATCH 1786/3316] resource/aws_rds_cluster_instance: Move pending status slices to shared variables --- aws/resource_aws_rds_cluster_instance.go | 54 ++++++++++-------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index d3652268b9e..d3a4465963d 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -288,19 +288,7 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{ - "backing-up", - "configuring-enhanced-monitoring", - "configuring-log-exports", - "creating", - "maintenance", - "modifying", - "rebooting", - "renaming", - "resetting-master-credentials", - "starting", - "upgrading", - }, + Pending: resourceAwsRdsClusterInstanceCreateUpdatePendingStates, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutCreate), @@ -501,19 +489,7 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ // reuse db_instance refresh func stateConf := &resource.StateChangeConf{ - Pending: []string{ - "backing-up", - "configuring-enhanced-monitoring", - "configuring-log-exports", - "creating", - "maintenance", - "modifying", - "rebooting", - "renaming", - "resetting-master-credentials", - "starting", - "upgrading", - }, + Pending: resourceAwsRdsClusterInstanceCreateUpdatePendingStates, Target: []string{"available"}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutUpdate), @@ -558,11 +534,7 @@ func resourceAwsRDSClusterInstanceDelete(d *schema.ResourceData, meta interface{ // re-uses db_instance refresh func log.Println("[INFO] Waiting for RDS Cluster Instance to be destroyed") stateConf := &resource.StateChangeConf{ - Pending: []string{ - "configuring-log-exports", - "modifying", - "deleting", - }, + Pending: resourceAwsRdsClusterInstanceDeletePendingStates, Target: []string{}, Refresh: resourceAwsDbInstanceStateRefreshFunc(d.Id(), conn), Timeout: d.Timeout(schema.TimeoutDelete), @@ -577,3 +549,23 @@ func resourceAwsRDSClusterInstanceDelete(d *schema.ResourceData, meta interface{ return nil } + +var resourceAwsRdsClusterInstanceCreateUpdatePendingStates = []string{ + "backing-up", + "configuring-enhanced-monitoring", + "configuring-log-exports", + "creating", + "maintenance", + "modifying", + "rebooting", + "renaming", + "resetting-master-credentials", + "starting", + "upgrading", +} + +var resourceAwsRdsClusterInstanceDeletePendingStates = []string{ + "configuring-log-exports", + "modifying", + "deleting", +} From daa854e53fde801c35b0379711341a029a22241f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 09:48:24 -0400 Subject: [PATCH 1787/3316] Update CHANGELOG for #5124 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80f9762085e..63318d7ef94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ BUG FIXES: * resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] * resource/aws_glue_catalog_database: Properly return error when missing colon during import [GH-5123] * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] +* resource/aws_rds_cluster_instance: Support `configuring-log-exports` status [GH-5124] ## 1.26.0 (July 04, 2018) From 0712af74378eec698bc0b1ee04819d4e5c077742 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 10:12:35 -0400 Subject: [PATCH 1788/3316] Update CHANGELOG for #5107 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63318d7ef94..9e155635128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ BUG FIXES: * resource/aws_glue_catalog_database: Properly return error when missing colon during import [GH-5123] * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] * resource/aws_rds_cluster_instance: Support `configuring-log-exports` status [GH-5124] +* resource/aws_s3_bucket: Prevent extraneous ACL update during resource creation [GH-5107] ## 1.26.0 (July 04, 2018) From 7678449c0f737d1f2f2b96af1b3d544f45cc1b04 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 10:51:09 -0400 Subject: [PATCH 1789/3316] Update CHANGELOG for #5043 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e155635128..2c5d0175f2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.27.0 (Unreleased) +NOTES: + +* resource/aws_wafregional_byte_match_set: The `byte_match_tuple` argument name has been deprecated in preference of a new `byte_match_tuples` argument name, for consistency with the `aws_waf_byte_match_set` resource to reduce any confusion working between the two resources and to denote its multiple value support. Its behavior is exactly the same as the old argument. Simply changing the argument name (adding the `s`) to configurations should upgrade without other changes. + ENHANCEMENTS: * data-source/aws_region: Add `description` attribute [GH-5077] @@ -18,6 +22,7 @@ BUG FIXES: * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] * resource/aws_rds_cluster_instance: Support `configuring-log-exports` status [GH-5124] * resource/aws_s3_bucket: Prevent extraneous ACL update during resource creation [GH-5107] +* resource/aws_wafregional_byte_match_set: Deprecate `byte_match_tuple` argument for `byte_match_tuples` [GH-5043] ## 1.26.0 (July 04, 2018) From f4a09f3209102befda81dd9686d8e236895a621f Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Mon, 9 Jul 2018 11:51:07 -0400 Subject: [PATCH 1790/3316] Bugfix / Documentation Correction S3 Inventory - Change `include_object_versions` for second example from `Weekly` to `All`; `Weekly` is not a supported/valid response - Change `destination.bucket` for second example from `bucket` to `bucket_arn` to match required field name --- website/docs/r/s3_bucket_inventory.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/s3_bucket_inventory.html.markdown b/website/docs/r/s3_bucket_inventory.html.markdown index d648fb13d86..3892b968979 100644 --- a/website/docs/r/s3_bucket_inventory.html.markdown +++ b/website/docs/r/s3_bucket_inventory.html.markdown @@ -56,7 +56,7 @@ resource "aws_s3_bucket_inventory" "test-prefix" { bucket = "${aws_s3_bucket.test.id}" name = "DocumentsWeekly" - included_object_versions = "Weekly" + included_object_versions = "All" schedule { frequency = "Daily" @@ -69,7 +69,7 @@ resource "aws_s3_bucket_inventory" "test-prefix" { destination { bucket { format = "ORC" - bucket = "${aws_s3_bucket.inventory.arn}" + bucket_arn = "${aws_s3_bucket.inventory.arn}" prefix = "inventory" } } From 871c703d41136d518a6e1f7382d3ddad49cc2a9c Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Mon, 9 Jul 2018 12:18:53 -0400 Subject: [PATCH 1791/3316] Switch ebs tests to amazon-owned ami. h/t @bflad --- aws/resource_aws_ebs_volume_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_ebs_volume_test.go b/aws/resource_aws_ebs_volume_test.go index 2078b015a7c..b5b26071c35 100644 --- a/aws/resource_aws_ebs_volume_test.go +++ b/aws/resource_aws_ebs_volume_test.go @@ -234,7 +234,7 @@ data "aws_ami" "debian_jessie_latest" { filter { name = "name" - values = ["debian-jessie-*"] + values = ["amzn-ami-*"] } filter { @@ -251,6 +251,8 @@ data "aws_ami" "debian_jessie_latest" { name = "root-device-type" values = ["ebs"] } + + owners = ["amazon"] } resource "aws_instance" "test" { @@ -293,7 +295,7 @@ data "aws_ami" "debian_jessie_latest" { filter { name = "name" - values = ["debian-jessie-*"] + values = ["amzn-ami-*"] } filter { @@ -310,6 +312,8 @@ data "aws_ami" "debian_jessie_latest" { name = "root-device-type" values = ["ebs"] } + + owners = ["amazon"] } resource "aws_instance" "test" { From 4c14f4eacdf1b0651f86e318fde0159559541b50 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 12:34:29 -0400 Subject: [PATCH 1792/3316] Update CHANGELOG for #4826 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c5d0175f2a..28745c99569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ NOTES: +* resource/aws_codebuild_project: The `service_role` argument is now required to match the API behavior and provide plan time validation. Additional details from AWS Support can be found in: https://github.com/terraform-providers/terraform-provider-aws/pull/4826 * resource/aws_wafregional_byte_match_set: The `byte_match_tuple` argument name has been deprecated in preference of a new `byte_match_tuples` argument name, for consistency with the `aws_waf_byte_match_set` resource to reduce any confusion working between the two resources and to denote its multiple value support. Its behavior is exactly the same as the old argument. Simply changing the argument name (adding the `s`) to configurations should upgrade without other changes. ENHANCEMENTS: @@ -18,6 +19,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] +* resource/aws_codebuild_project: Mark `service_role` as required [GH-4826] * resource/aws_glue_catalog_database: Properly return error when missing colon during import [GH-5123] * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] * resource/aws_rds_cluster_instance: Support `configuring-log-exports` status [GH-5124] From 75399534d6e31460ebfabda04a4cba0fc6c6fe25 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 12:45:02 -0400 Subject: [PATCH 1793/3316] Update CHANGELOG for #5092 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28745c99569..8dc912112ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: * resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` [GH-5114] * resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] +* resource/aws_ses_receipt_rule: Add plan time validation for `s3_action` argument `position` [GH-5092] * resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] BUG FIXES: From fd64094fdbf7bac4970ad64db215161ce5368f79 Mon Sep 17 00:00:00 2001 From: domwong Date: Mon, 9 Jul 2018 17:58:31 +0100 Subject: [PATCH 1794/3316] Reinstate restricted check for China cloud only --- aws/resource_aws_instance.go | 45 ++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 52daead2d5f..3937084d371 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -514,32 +514,36 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Only 1 of `ipv6_address_count` or `ipv6_addresses` can be specified") } - tagsSpec := make([]*ec2.TagSpecification, 0) + restricted := meta.(*AWSClient).IsChinaCloud() + if !restricted { - if v, ok := d.GetOk("tags"); ok { - tags := tagsFromMap(v.(map[string]interface{})) + tagsSpec := make([]*ec2.TagSpecification, 0) - spec := &ec2.TagSpecification{ - ResourceType: aws.String("instance"), - Tags: tags, + if v, ok := d.GetOk("tags"); ok { + tags := tagsFromMap(v.(map[string]interface{})) + + spec := &ec2.TagSpecification{ + ResourceType: aws.String("instance"), + Tags: tags, + } + + tagsSpec = append(tagsSpec, spec) } - tagsSpec = append(tagsSpec, spec) - } + if v, ok := d.GetOk("volume_tags"); ok { + tags := tagsFromMap(v.(map[string]interface{})) - if v, ok := d.GetOk("volume_tags"); ok { - tags := tagsFromMap(v.(map[string]interface{})) + spec := &ec2.TagSpecification{ + ResourceType: aws.String("volume"), + Tags: tags, + } - spec := &ec2.TagSpecification{ - ResourceType: aws.String("volume"), - Tags: tags, + tagsSpec = append(tagsSpec, spec) } - tagsSpec = append(tagsSpec, spec) - } - - if len(tagsSpec) > 0 { - runOpts.TagSpecifications = tagsSpec + if len(tagsSpec) > 0 { + runOpts.TagSpecifications = tagsSpec + } } // Create the instance @@ -838,9 +842,10 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn d.Partial(true) + restricted := meta.(*AWSClient).IsChinaCloud() if d.HasChange("tags") { - if !d.IsNewResource() { + if !d.IsNewResource() || restricted { if err := setTags(conn, d); err != nil { return err } else { @@ -849,7 +854,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { } } if d.HasChange("volume_tags") { - if !d.IsNewResource() { + if !d.IsNewResource() || restricted { if err := setVolumeTags(conn, d); err != nil { return err } else { From ec2540658fa855b1629d9642f75508ce5b136446 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 13:09:01 -0400 Subject: [PATCH 1795/3316] resource/aws_swf_domain: Address #2803 PR feedback make testacc TEST=./aws TESTARGS='-run=TestAccAWSSwfDomain' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSSwfDomain -timeout 120m === RUN TestAccAWSSwfDomain_basic --- PASS: TestAccAWSSwfDomain_basic (13.01s) === RUN TestAccAWSSwfDomain_NamePrefix --- PASS: TestAccAWSSwfDomain_NamePrefix (11.40s) === RUN TestAccAWSSwfDomain_GeneratedName --- PASS: TestAccAWSSwfDomain_GeneratedName (12.78s) === RUN TestAccAWSSwfDomain_Description --- PASS: TestAccAWSSwfDomain_Description (11.61s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 48.829s --- aws/resource_aws_swf_domain.go | 46 ++++++--- aws/resource_aws_swf_domain_test.go | 130 ++++++++++++++++++++++-- website/docs/r/swf_domain.html.markdown | 6 +- 3 files changed, 156 insertions(+), 26 deletions(-) diff --git a/aws/resource_aws_swf_domain.go b/aws/resource_aws_swf_domain.go index cf155c7d041..5e254496611 100644 --- a/aws/resource_aws_swf_domain.go +++ b/aws/resource_aws_swf_domain.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "strconv" "github.com/aws/aws-sdk-go/aws" @@ -27,17 +28,18 @@ func resourceAwsSwfDomain() *schema.Resource { ForceNew: true, ConflictsWith: []string{"name_prefix"}, }, - "name_prefix": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"name"}, }, - "description": &schema.Schema{ + "description": { Type: schema.TypeString, Optional: true, ForceNew: true, }, - "workflow_execution_retention_period_in_days": &schema.Schema{ + "workflow_execution_retention_period_in_days": { Type: schema.TypeString, Required: true, ForceNew: true, @@ -66,7 +68,6 @@ func resourceAwsSwfDomainCreate(d *schema.ResourceData, meta interface{}) error } else { name = resource.UniqueId() } - d.Set("name", name) input := &swf.RegisterDomainInput{ Name: aws.String(name), @@ -96,14 +97,23 @@ func resourceAwsSwfDomainRead(d *schema.ResourceData, meta interface{}) error { resp, err := conn.DescribeDomain(input) if err != nil { - return err + if isAWSErr(err, swf.ErrCodeUnknownResourceFault, "") { + log.Printf("[WARN] SWF Domain %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading SWF Domain: %s", err) + } + + if resp == nil || resp.Configuration == nil || resp.DomainInfo == nil { + log.Printf("[WARN] SWF Domain %q not found, removing from state", d.Id()) + d.SetId("") + return nil } - info := resp.DomainInfo - config := resp.Configuration - d.Set("name", info.Name) - d.Set("description", info.Description) - d.Set("workflow_execution_retention_period_in_days", config.WorkflowExecutionRetentionPeriodInDays) + d.Set("name", resp.DomainInfo.Name) + d.Set("description", resp.DomainInfo.Description) + d.Set("workflow_execution_retention_period_in_days", resp.Configuration.WorkflowExecutionRetentionPeriodInDays) return nil } @@ -117,10 +127,14 @@ func resourceAwsSwfDomainDelete(d *schema.ResourceData, meta interface{}) error _, err := conn.DeprecateDomain(input) if err != nil { - return err + if isAWSErr(err, swf.ErrCodeDomainDeprecatedFault, "") { + return nil + } + if isAWSErr(err, swf.ErrCodeUnknownResourceFault, "") { + return nil + } + return fmt.Errorf("error deleting SWF Domain: %s", err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_swf_domain_test.go b/aws/resource_aws_swf_domain_test.go index ad16c159e0e..91a4a603fff 100644 --- a/aws/resource_aws_swf_domain_test.go +++ b/aws/resource_aws_swf_domain_test.go @@ -2,15 +2,47 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/swf" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) -func TestAccAwsSwfDomain_basic(t *testing.T) { +func TestAccAWSSwfDomain_basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_swf_domain.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSwfDomainDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSwfDomainConfig_Name(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsSwfDomainExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSSwfDomain_NamePrefix(t *testing.T) { + resourceName := "aws_swf_domain.test" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) @@ -19,8 +51,69 @@ func TestAccAwsSwfDomain_basic(t *testing.T) { CheckDestroy: testAccCheckAwsSwfDomainDestroy, Steps: []resource.TestStep{ { - Config: fmt.Sprintf(testAccAwsSwfDomainConfig, "test_swf_domain_"), - Check: testAccCheckAwsSwfDomainExists("aws_swf_domain.test"), + Config: testAccAWSSwfDomainConfig_NamePrefix, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsSwfDomainExists(resourceName), + resource.TestMatchResourceAttr(resourceName, "name", regexp.MustCompile(`^tf-acc-test`)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name_prefix"}, // this line is only necessary if the test configuration is using name_prefix + }, + }, + }) +} + +func TestAccAWSSwfDomain_GeneratedName(t *testing.T) { + resourceName := "aws_swf_domain.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSwfDomainDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSwfDomainConfig_GeneratedName, + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsSwfDomainExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSSwfDomain_Description(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_swf_domain.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSwfDomainDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSSwfDomainConfig_Description(rName, "description1"), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAwsSwfDomainExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "description1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, }, }, }) @@ -82,9 +175,34 @@ func testAccCheckAwsSwfDomainExists(n string) resource.TestCheckFunc { } } -const testAccAwsSwfDomainConfig = ` +func testAccAWSSwfDomainConfig_Description(rName, description string) string { + return fmt.Sprintf(` +resource "aws_swf_domain" "test" { + description = %q + name = %q + workflow_execution_retention_period_in_days = 1 +} +`, description, rName) +} + +const testAccAWSSwfDomainConfig_GeneratedName = ` +resource "aws_swf_domain" "test" { + workflow_execution_retention_period_in_days = 1 +} +` + +func testAccAWSSwfDomainConfig_Name(rName string) string { + return fmt.Sprintf(` +resource "aws_swf_domain" "test" { + name = %q + workflow_execution_retention_period_in_days = 1 +} +`, rName) +} + +const testAccAWSSwfDomainConfig_NamePrefix = ` resource "aws_swf_domain" "test" { - name_prefix = "%s" - workflow_execution_retention_period_in_days = 1 + name_prefix = "tf-acc-test" + workflow_execution_retention_period_in_days = 1 } ` diff --git a/website/docs/r/swf_domain.html.markdown b/website/docs/r/swf_domain.html.markdown index 13e63feaa94..a1cc20df9c6 100644 --- a/website/docs/r/swf_domain.html.markdown +++ b/website/docs/r/swf_domain.html.markdown @@ -33,11 +33,9 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: -* `name` - The name of the parameter. -* `description` - The domain description. -* `workflow_execution_retention_period_in_days` - Length of time that SWF will continue to retain information about the workflow execution after the workflow execution is complete. +* `id` - The name of the domain. ## Import From d0ada4d52ae7783ccff9cf2431bdc6a34502815b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 13:11:31 -0400 Subject: [PATCH 1796/3316] Update CHANGELOG for #2803 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dc912112ef..0749921a7cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ NOTES: * resource/aws_codebuild_project: The `service_role` argument is now required to match the API behavior and provide plan time validation. Additional details from AWS Support can be found in: https://github.com/terraform-providers/terraform-provider-aws/pull/4826 * resource/aws_wafregional_byte_match_set: The `byte_match_tuple` argument name has been deprecated in preference of a new `byte_match_tuples` argument name, for consistency with the `aws_waf_byte_match_set` resource to reduce any confusion working between the two resources and to denote its multiple value support. Its behavior is exactly the same as the old argument. Simply changing the argument name (adding the `s`) to configurations should upgrade without other changes. +FEATURES: + +* **New Resource:** `aws_swf_domain` [GH-2803] + ENHANCEMENTS: * data-source/aws_region: Add `description` attribute [GH-5077] From e1a61109dfffcf4aa2dce490fa0b2bddc849d72d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 14:03:11 -0400 Subject: [PATCH 1797/3316] tests/resource/aws_glue_connection: Fix availability_zone reference and check new attribute is set in state make testacc TEST=./aws TESTARGS='-run=TestAccAWSGlueConnection' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSGlueConnection -timeout 120m === RUN TestAccAWSGlueConnection_Basic --- PASS: TestAccAWSGlueConnection_Basic (13.37s) === RUN TestAccAWSGlueConnection_Description --- PASS: TestAccAWSGlueConnection_Description (21.69s) === RUN TestAccAWSGlueConnection_MatchCriteria --- PASS: TestAccAWSGlueConnection_MatchCriteria (27.52s) === RUN TestAccAWSGlueConnection_PhysicalConnectionRequirements --- PASS: TestAccAWSGlueConnection_PhysicalConnectionRequirements (651.64s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 714.249s --- aws/resource_aws_glue_connection_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_glue_connection_test.go b/aws/resource_aws_glue_connection_test.go index 51a39e72933..a2f15b2a2b2 100644 --- a/aws/resource_aws_glue_connection_test.go +++ b/aws/resource_aws_glue_connection_test.go @@ -210,6 +210,7 @@ func TestAccAWSGlueConnection_PhysicalConnectionRequirements(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "match_criteria.#", "0"), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "physical_connection_requirements.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "physical_connection_requirements.0.availability_zone"), resource.TestCheckResourceAttr(resourceName, "physical_connection_requirements.0.security_group_id_list.#", "1"), resource.TestCheckResourceAttrSet(resourceName, "physical_connection_requirements.0.subnet_id"), ), @@ -426,7 +427,7 @@ resource "aws_glue_connection" "test" { name = "%[1]s" physical_connection_requirements { - availability_zone = "${aws_availability_zones.available[0].id}" + availability_zone = "${aws_subnet.test.0.availability_zone}" security_group_id_list = ["${aws_security_group.test.id}"] subnet_id = "${aws_subnet.test.0.id}" } From c76d71024d055f92f6defa4525ff814b7f5904ce Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 14:06:49 -0400 Subject: [PATCH 1798/3316] Update CHANGELOG for #5039 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0749921a7cc..62c7896ee8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ENHANCEMENTS: * data-source/aws_vpc: Add `cidr_block_associations` attribute [GH-5098] * resource/aws_cloudwatch_metric_alarm: Add `datapoints_to_alarm` and `evaluation_period` plan time validation [GH-5095] * resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] +* resource/aws_glue_connection: Add `physical_connection_requirements` argument `availability_zone` (currently required by the API) [GH-5039] * resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` [GH-5114] * resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] From c2dff71595c5ec409477c5166b38f10da9675eae Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 15:02:59 -0400 Subject: [PATCH 1799/3316] Update CHANGELOG for #5106 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62c7896ee8a..f3487db7ebd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ENHANCEMENTS: * resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] * resource/aws_glue_connection: Add `physical_connection_requirements` argument `availability_zone` (currently required by the API) [GH-5039] * resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` [GH-5114] +* resource/aws_instance: Allow AWS GovCloud (US) to perform tagging on creation [GH-5106] * resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_ses_receipt_rule: Add plan time validation for `s3_action` argument `position` [GH-5092] @@ -27,6 +28,7 @@ BUG FIXES: * resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] * resource/aws_codebuild_project: Mark `service_role` as required [GH-4826] * resource/aws_glue_catalog_database: Properly return error when missing colon during import [GH-5123] +* resource/aws_instance: Allow AWS China to perform volume tagging post-creation on first apply [GH-5106] * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] * resource/aws_rds_cluster_instance: Support `configuring-log-exports` status [GH-5124] * resource/aws_s3_bucket: Prevent extraneous ACL update during resource creation [GH-5107] From 3ab959673c6c40ea2fa3317454f60e21766813dd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 16:12:41 -0400 Subject: [PATCH 1800/3316] Update CHANGELOG for #5053 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3487db7ebd..db3615ef28b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ ENHANCEMENTS: * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_ses_receipt_rule: Add plan time validation for `s3_action` argument `position` [GH-5092] * resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] +* resource/aws_waf_web_acl: Add `rules` `override_action` argument and support `GROUP` type [GH-5053] +* resource/aws_wafregional_web_acl: Add `rules` `override_action` argument and support `GROUP` type [GH-5053] BUG FIXES: From bfc612a54d17c872798bf6ec22d55fe74a030945 Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Mon, 9 Jul 2018 18:51:39 -0400 Subject: [PATCH 1801/3316] initial commit on snapshot copy grant --- ...source_aws_redshift_snapshot_copy_grant.go | 275 ++++++++++++++++++ ...e_aws_redshift_snapshot_copy_grant_test.go | 68 +++++ 2 files changed, 343 insertions(+) create mode 100644 aws/resource_aws_redshift_snapshot_copy_grant.go create mode 100644 aws/resource_aws_redshift_snapshot_copy_grant_test.go diff --git a/aws/resource_aws_redshift_snapshot_copy_grant.go b/aws/resource_aws_redshift_snapshot_copy_grant.go new file mode 100644 index 00000000000..45ca44bf7d4 --- /dev/null +++ b/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -0,0 +1,275 @@ +package aws + +import ( + "bytes" + "fmt" + "log" + "sort" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { + return &schema.Resource{ + // There is no API for updating/modifying grants, hence no Update + // Instead changes to most fields will force a new resource + Create: resourceAwsRedshiftSnapshotCopyGrantCreate, + Read: resourceAwsRedshiftSnapshotCopyGrantRead, + Delete: resourceAwsRedshiftSnapshotCopyGrantDelete, + Exists: resourceAwsRedshiftSnapshotCopyGrantExists, + + Schema: map[string]*schema.Schema{ + "snapshot_copy_grant_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsRedshiftSnapshotCopyGrantName, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + grantName := d.Get("snapshot_copy_grant_name").(string) + keyId := d.Get("kms_key_id").(string) + + input := redshift.CreateSnapshotCopyGrantInput{ + SnapshotCopyGrantName: aws.String(grantName), + } + + if v, ok := d.GetOk("kms_key_id"); ok { + input.KmsKeyId = aws.String(v.(string)) + } + + log.Printf("[DEBUG]: Adding new Redshift SnapshotCopyGrant: %s", input) + + var out *redshift.CreateSnapshotCopyGrantOutput + + err := resource.Retry(3*time.Minute, func() *resource.RetryError { + var err error + + out, err = conn.CreateSnapshotCopyGrant(&input) + + if err != nil { + log.Printf("[ERROR] An error occured creating new AWS Redshift SnapshotCopyGrant: %s", err) + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrantName) + d.SetId(grantName) + d.Set("snapshot_copy_grant_name", out.SnapshotCopyGrantName) + d.Set("kms_key_id", out.KmsKeyId) + + return resourceAwsSnapshotCopyGrantRead(d, meta) +} + +func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + grantName := d.Id() + log.Printf("[DEBUG] Looking for grant: %s", grantName) + grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) + + if err != nil { + return err + } + + if grant == nil { + log.Printf("[WARN] %s Redshift snapshot copy grant not found, removing from state file", grantName) + d.SetId("") + return nil + } + + if *grant.KmsKeyId != "" { + d.Set("kms_key_id", grant.KmsKeyId) + } + + return nil +} + +func resourceAwsRedshiftSnapshotCopyGrantDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + grantName := d.Id() + + deleteInput := redshift.DeleteSnapshotCopyGrantInput{ + SnapshotCopyGrantName: aws.String(grantName), + } + + log.Printf("[DEBUG] Deleting snapshot copy grant: %s", grantName) + _, err = conn.DeleteSnapshotCopyGrant(&deleteInput) + + if err != nil { + if isAWSErr(err, redshift.SnapshotCopyGrantNotFoundFault, "") { + return nil + } + return err + } + + log.Printf("[DEBUG] Checking if grant is deleted: %s", grantName) + err = waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn, grantName) + + if err != nil { + return err + } + + return nil +} + +func resourceAwsRedshiftSnapshotCopyGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { + conn := meta.(*AWSClient).redshiftconn + + grantName = d.Id() + + log.Printf("[DEBUG] Looking for Grant: %s", grantName) + grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) + + if err != nil { + return true, err + } + if grant != nil { + return true, err + } + + return false, nil +} + +func getAwsRedshiftSnapshotCopyGrant(grants []*redshift.SnapshotCopyGrant, grantName string) *redshift.SnapshotCopyGrant { + for _, grant := range grants { + if *grant.SnapshotCopyGrantName == grantName { + return grant + } + } + + return nil +} + +/* +In the functions below it is not possible to use retryOnAwsCodes function, as there +is no get grant call, so an error has to be created if the grant is or isn't returned +by the describe grants call when expected. +*/ + +// NB: This function only retries the grant not being returned and some edge cases, while AWS Errors +// are handled by the findAwsRedshiftSnapshotCopyGrant function +func findAwsRedshiftSnapshotGrantWithRetry(conn *redshift.Redshift, grantName string) (*redshift.SnapshotCopyGrant, error) { + var grant *redshift.SnapshotCopyGrant + err := resource.Retry(3*time.Minute, func() *resource.RetryError { + var err error + grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) + + if err != nil { + if serr, ok := err.(ErrCodeSnapshotCopyGrantNotFoundFault); ok { + // Force a retry if the grant should exist + return resource.RetryableError(serr) + } + + return resource.NonRetryableError(err) + } + + return nil + }) + + return grant, err +} + +// Used by the tests as well +func waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn *redshift.Redshift, grantName string) error { + err := resource.Retry(3*time.Minute, func() *resource.RetryError { + grant, err := findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) + if err != nil { + if _, ok := err.(ErrCodeSnapshotCopyGrantNotFoundFault); ok { + return nil + } + } + + if grant != nil { + // Force a retry if the grant still exists + return resource.RetryableError( + fmt.Errorf("[DEBUG] Grant still exists while expected to be deleted: %s", *grant.SnapshotCopyGrantName)) + } + + return resource.NonRetryableError(err) + }) + + return err +} + +// The DescribeSnapshotCopyGrants API defaults to listing only 100 grants +// Use a marker to iterate over all grants in "pages" +// NB: This function only retries on AWS Errors +func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string, marker *string) (*redshift.SnapshotCopyGrant, error) { + + input := redshift.DescribeSnapshotCopyGrantsInput{ + MaxRecords: aws.Int64(int64(100)), + } + + // marker and grant name are mutually exclusive + if marker != nil { + input.Marker = marker + } else { + input.SnapshotCopyGrantName = aws.String(grantName) + } + + var out *redshift.DescribeSnapshotCopyGrantsOutput + var err error + var grant *redshift.SnapshotCopyGrant + + err = resource.Retry(3*time.Minute, func() *resource.RetryError { + out, err = conn.DescribeSnapshotCopyGrants(&input) + + if err != nil { + if isAWSErr(err, redshift.SnapshotCopyGrantNotFoundFault, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { + return nil, fmt.Errorf("error listing snapshot copy grants: %s", err) + } + + grant = getAwsRedshiftSnapshotCopyGrant(out.SnapshotCopyGrants, grantName) + if grant != nil { + return grant, nil + } else if out.Marker != nil { + log.Printf("[DEBUG] Snapshot copy grant not found but marker returned, getting next page via marker: %s", aws.StringValue(out.Marker)) + return findAwsRedshiftSnapshotCopyGrant(conn, grantName, out.Marker) + } + + return nil, NewAwsRedshiftSnapshotCopyGrantMissingError(fmt.Sprintf("[DEBUG] Grant %s not found", grantName)) +} + +// Custom error, so we don't have to rely on +// the content of an error message +type AwsRedshiftSnapshotCopyGrantMissingError string + +func (e AwsRedshiftSnapshotCopyGrantMissingError) Error() string { + return e.Error() +} + +func NewAwsRedshiftSnapshotCopyGrantMissingError(msg string) AwsRedshiftSnapshotCopyGrantMissingError { + return AwsRedshiftSnapshotCopyGrantMissingError(msg) +} diff --git a/aws/resource_aws_redshift_snapshot_copy_grant_test.go b/aws/resource_aws_redshift_snapshot_copy_grant_test.go new file mode 100644 index 00000000000..a55278ff388 --- /dev/null +++ b/aws/resource_aws_redshift_snapshot_copy_grant_test.go @@ -0,0 +1,68 @@ +package aws + +import ( + "fmt" + "testing" + "time" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { + timestamp := time.Now().Format(time.RFC1123) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftSnapshotCopyGrantDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRedshiftSnapshotCopyGrant_Basic("basic"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftSnapshotCopyGrantExists("aws_redshift_snapshot_copy_grant.basic"), + resource.TestCheckResourceAttr("aws_redshift_snapshot_copy_grant.basic", "snapshot_copy_grant_name", "basic"), + resource.TestCheckResourceAttrSet("aws_redshift_snapshot_copy_grant.basic", "kms_key_id"), + ), + }, + }, + }) +} + +func testAccCheckAWSRedshiftSnapshotCopyGrantDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).redshiftconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_redshift_snapshot_copy_grant" { + continue + } + + err := waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn, rs.Primary.ID) + if err != nil { + return err + } + + return nil + } + + return nil +} + +func testAccCheckAWSRedshiftSnapshotCopyGrantExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("not found: %s", name) + } + + return nil + } +} + +func testAccAWSRedshiftSnapshotCopyGrant_Basic(rName string) string { + return fmt.Sprintf(` +resource "aws_redshift_snapshot_copy_grant" "tf-acc-test-grant" { + snapshot_copy_grant_name = "%s" +} +`, rName) +} From bcd231904d623de9195e9a8224fb408755cf21f0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 19:39:55 -0400 Subject: [PATCH 1802/3316] resource/aws_appsync_api_key: Finish implementation make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppsyncApiKey' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSAppsyncApiKey -timeout 120m === RUN TestAccAWSAppsyncApiKey_basic --- PASS: TestAccAWSAppsyncApiKey_basic (12.30s) === RUN TestAccAWSAppsyncApiKey_Description --- PASS: TestAccAWSAppsyncApiKey_Description (18.26s) === RUN TestAccAWSAppsyncApiKey_Expires --- PASS: TestAccAWSAppsyncApiKey_Expires (19.80s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 50.401s --- aws/resource_aws_appsync_api_key.go | 110 ++++++----- aws/resource_aws_appsync_api_key_test.go | 196 ++++++++++++++----- website/docs/r/appsync_api_key.html.markdown | 23 ++- 3 files changed, 232 insertions(+), 97 deletions(-) diff --git a/aws/resource_aws_appsync_api_key.go b/aws/resource_aws_appsync_api_key.go index 1285e67eeaa..fd519e348ac 100644 --- a/aws/resource_aws_appsync_api_key.go +++ b/aws/resource_aws_appsync_api_key.go @@ -19,6 +19,9 @@ func resourceAwsAppsyncApiKey() *schema.Resource { Read: resourceAwsAppsyncApiKeyRead, Update: resourceAwsAppsyncApiKeyUpdate, Delete: resourceAwsAppsyncApiKeyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "description": { @@ -31,8 +34,15 @@ func resourceAwsAppsyncApiKey() *schema.Resource { Required: true, }, "expires": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Ignore unsetting value + if old != "" && new == "" { + return true + } + return false + }, ValidateFunc: validation.ValidateRFC3339TimeString, }, "key": { @@ -46,8 +56,11 @@ func resourceAwsAppsyncApiKey() *schema.Resource { func resourceAwsAppsyncApiKeyCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + + apiID := d.Get("api_id").(string) + params := &appsync.CreateApiKeyInput{ - ApiId: aws.String(d.Get("api_id").(string)), + ApiId: aws.String(apiID), Description: aws.String(d.Get("description").(string)), } if v, ok := d.GetOk("expires"); ok { @@ -56,66 +69,49 @@ func resourceAwsAppsyncApiKeyCreate(d *schema.ResourceData, meta interface{}) er } resp, err := conn.CreateApiKey(params) if err != nil { - return err + return fmt.Errorf("error creating Appsync API Key: %s", err) } - d.SetId(fmt.Sprintf("%s:%s", d.Get("api_id").(string), *resp.ApiKey.Id)) + d.SetId(fmt.Sprintf("%s:%s", apiID, aws.StringValue(resp.ApiKey.Id))) return resourceAwsAppsyncApiKeyRead(d, meta) } func resourceAwsAppsyncApiKeyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn - var listKeys func(*appsync.ListApiKeysInput) (*appsync.ApiKey, error) - ApiId, Id, er := decodeAppSyncApiKeyId(d.Id()) - if er != nil { - return er - } - listKeys = func(input *appsync.ListApiKeysInput) (*appsync.ApiKey, error) { - resp, err := conn.ListApiKeys(input) - if err != nil { - return nil, err - } - for _, v := range resp.ApiKeys { - if *v.Id == Id { - return v, nil - } - } - if resp.NextToken != nil { - listKeys(&appsync.ListApiKeysInput{ - ApiId: aws.String(ApiId), - NextToken: resp.NextToken, - }) - } - return nil, nil - } - key, err := listKeys( - &appsync.ListApiKeysInput{ - ApiId: aws.String(ApiId), - }) + + apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) if err != nil { return err } + + key, err := getAppsyncApiKey(apiID, keyID, conn) + if err != nil { + return fmt.Errorf("error getting Appsync API Key %q: %s", d.Id(), err) + } if key == nil { log.Printf("[WARN] AppSync API Key %q not found, removing from state", d.Id()) d.SetId("") return nil } + d.Set("api_id", apiID) d.Set("key", key.Id) d.Set("description", key.Description) - d.Set("expires", time.Unix(*key.Expires, 0).Format(time.RFC3339)) + d.Set("expires", time.Unix(aws.Int64Value(key.Expires), 0).UTC().Format(time.RFC3339)) return nil } func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn - ApiId, Id, er := decodeAppSyncApiKeyId(d.Id()) - if er != nil { - return er + + apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) + if err != nil { + return err } + params := &appsync.UpdateApiKeyInput{ - ApiId: aws.String(ApiId), - Id: aws.String(Id), + ApiId: aws.String(apiID), + Id: aws.String(keyID), } if d.HasChange("description") { params.Description = aws.String(d.Get("description").(string)) @@ -125,7 +121,7 @@ func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) er params.Expires = aws.Int64(t.Unix()) } - _, err := conn.UpdateApiKey(params) + _, err = conn.UpdateApiKey(params) if err != nil { return err } @@ -136,15 +132,17 @@ func resourceAwsAppsyncApiKeyUpdate(d *schema.ResourceData, meta interface{}) er func resourceAwsAppsyncApiKeyDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn - ApiId, Id, er := decodeAppSyncApiKeyId(d.Id()) - if er != nil { - return er + + apiID, keyID, err := decodeAppSyncApiKeyId(d.Id()) + if err != nil { + return err } + input := &appsync.DeleteApiKeyInput{ - ApiId: aws.String(ApiId), - Id: aws.String(Id), + ApiId: aws.String(apiID), + Id: aws.String(keyID), } - _, err := conn.DeleteApiKey(input) + _, err = conn.DeleteApiKey(input) if err != nil { if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { return nil @@ -162,3 +160,25 @@ func decodeAppSyncApiKeyId(id string) (string, string, error) { } return parts[0], parts[1], nil } + +func getAppsyncApiKey(apiID, keyID string, conn *appsync.AppSync) (*appsync.ApiKey, error) { + input := &appsync.ListApiKeysInput{ + ApiId: aws.String(apiID), + } + for { + resp, err := conn.ListApiKeys(input) + if err != nil { + return nil, err + } + for _, apiKey := range resp.ApiKeys { + if aws.StringValue(apiKey.Id) == keyID { + return apiKey, nil + } + } + if resp.NextToken == nil { + break + } + input.NextToken = resp.NextToken + } + return nil, nil +} diff --git a/aws/resource_aws_appsync_api_key_test.go b/aws/resource_aws_appsync_api_key_test.go index 030d0dd9b8d..716a1dee711 100644 --- a/aws/resource_aws_appsync_api_key_test.go +++ b/aws/resource_aws_appsync_api_key_test.go @@ -2,34 +2,110 @@ package aws import ( "fmt" - "strings" + "regexp" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/appsync" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) -func TestAccAwsAppsyncApiKey_basic(t *testing.T) { - // sample date to test - dateAfterOneYear := time.Now().Add(time.Hour * 24 * time.Duration(364)) +func TestAccAWSAppsyncApiKey_basic(t *testing.T) { + var apiKey appsync.ApiKey + dateAfterSevenDays := time.Now().UTC().Add(time.Hour * 24 * time.Duration(7)).Truncate(time.Hour) + resourceName := "aws_appsync_api_key.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncApiKeyConfigBasic(dateAfterOneYear.Format(time.RFC3339)), - ResourceName: "aws_appsync_api_key.test", + Config: testAccAppsyncApiKeyConfig_Required(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncApiKeyExistsTillDate( - "aws_appsync_api_key.test", - dateAfterOneYear.Unix(), - ), + testAccCheckAwsAppsyncApiKeyExists(resourceName, &apiKey), + resource.TestCheckResourceAttr(resourceName, "description", "Managed by Terraform"), + testAccCheckAwsAppsyncApiKeyExpiresDate(&apiKey, dateAfterSevenDays), + resource.TestMatchResourceAttr(resourceName, "key", regexp.MustCompile(`.+`)), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncApiKey_Description(t *testing.T) { + var apiKey appsync.ApiKey + resourceName := "aws_appsync_api_key.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncApiKeyConfig_Description(rName, "description1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncApiKeyExists(resourceName, &apiKey), + resource.TestCheckResourceAttr(resourceName, "description", "description1"), + ), + }, + { + Config: testAccAppsyncApiKeyConfig_Description(rName, "description2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncApiKeyExists(resourceName, &apiKey), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncApiKey_Expires(t *testing.T) { + var apiKey appsync.ApiKey + dateAfterTenDays := time.Now().UTC().Add(time.Hour * 24 * time.Duration(10)).Truncate(time.Hour) + dateAfterTwentyDays := time.Now().UTC().Add(time.Hour * 24 * time.Duration(20)).Truncate(time.Hour) + resourceName := "aws_appsync_api_key.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncApiKeyConfig_Expires(rName, dateAfterTenDays.Format(time.RFC3339)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncApiKeyExists(resourceName, &apiKey), + testAccCheckAwsAppsyncApiKeyExpiresDate(&apiKey, dateAfterTenDays), + ), + }, + { + Config: testAccAppsyncApiKeyConfig_Expires(rName, dateAfterTwentyDays.Format(time.RFC3339)), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncApiKeyExists(resourceName, &apiKey), + testAccCheckAwsAppsyncApiKeyExpiresDate(&apiKey, dateAfterTwentyDays), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -40,15 +116,22 @@ func testAccCheckAwsAppsyncApiKeyDestroy(s *terraform.State) error { if rs.Type != "aws_appsync_api_key" { continue } - ApiId, _, er := decodeAppSyncApiKeyId(rs.Primary.ID) - if er != nil { - return er + + apiID, keyID, err := decodeAppSyncApiKeyId(rs.Primary.ID) + if err != nil { + return err } - describe, err := conn.ListApiKeys(&appsync.ListApiKeysInput{ApiId: aws.String(ApiId)}) + + apiKey, err := getAppsyncApiKey(apiID, keyID, conn) if err == nil { - if len(describe.ApiKeys) != 0 { - return fmt.Errorf("Appsync ApiKey still exists") + if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { + return nil } + return err + } + + if apiKey != nil && aws.StringValue(apiKey.Id) == keyID { + return fmt.Errorf("Appsync API Key ID %q still exists", rs.Primary.ID) } return nil @@ -57,58 +140,83 @@ func testAccCheckAwsAppsyncApiKeyDestroy(s *terraform.State) error { return nil } -func testAccCheckAwsAppsyncApiKeyExistsTillDate(ApiKeyName string, date int64) resource.TestCheckFunc { +func testAccCheckAwsAppsyncApiKeyExists(resourceName string, apiKey *appsync.ApiKey) resource.TestCheckFunc { return func(s *terraform.State) error { - rsApiKey, ok := s.RootModule().Resources[ApiKeyName] + rs, ok := s.RootModule().Resources[resourceName] if !ok { - return fmt.Errorf("Key Not found in state: %s", ApiKeyName) - } - ApiId, Id, er := decodeAppSyncApiKeyId(rsApiKey.Primary.ID) - if er != nil { - return er + return fmt.Errorf("Appsync API Key Not found in state: %s", resourceName) } - conn := testAccProvider.Meta().(*AWSClient).appsyncconn - input := &appsync.ListApiKeysInput{ - ApiId: aws.String(ApiId), + apiID, keyID, err := decodeAppSyncApiKeyId(rs.Primary.ID) + if err != nil { + return err } - resp, err := conn.ListApiKeys(input) + conn := testAccProvider.Meta().(*AWSClient).appsyncconn + key, err := getAppsyncApiKey(apiID, keyID, conn) if err != nil { return err } - var key appsync.ApiKey - for _, v := range resp.ApiKeys { - if *v.Id == *aws.String(Id) { - key = *v - } + if key == nil || key.Id == nil { + return fmt.Errorf("Appsync API Key %q not found", rs.Primary.ID) } - if key.Id == nil { - return fmt.Errorf("Key Not found: %s %s", ApiKeyName, *aws.String(rsApiKey.Primary.ID)) - } - // aws when they create, slight difference will be in the minutes, so better check date - if time.Unix(*key.Expires, 0).Format("02/01/2006") != time.Unix(date, 0).Format("02/01/2006") { - return fmt.Errorf("Expiry date got is: %s and expected is %s", time.Unix(*key.Expires, 0).Format("02/01/2006"), - time.Unix(date, 0).Format("02/01/2006")) + *apiKey = *key + + return nil + } +} + +func testAccCheckAwsAppsyncApiKeyExpiresDate(apiKey *appsync.ApiKey, expectedTime time.Time) resource.TestCheckFunc { + return func(s *terraform.State) error { + apiKeyExpiresTime := time.Unix(aws.Int64Value(apiKey.Expires), 0) + if !apiKeyExpiresTime.Equal(expectedTime) { + return fmt.Errorf("Appsync API Key expires difference: got %s and expected %s", apiKeyExpiresTime.Format(time.RFC3339), expectedTime.Format(time.RFC3339)) } return nil } } -func testAccAppsyncApiKeyConfigBasic(rDate string) string { +func testAccAppsyncApiKeyConfig_Description(rName, description string) string { + return fmt.Sprintf(` +resource "aws_appsync_graphql_api" "test" { + authentication_type = "API_KEY" + name = %q +} +resource "aws_appsync_api_key" "test" { + api_id = "${aws_appsync_graphql_api.test.id}" + description = %q +} + +`, rName, description) +} + +func testAccAppsyncApiKeyConfig_Expires(rName, expires string) string { + return fmt.Sprintf(` +resource "aws_appsync_graphql_api" "test" { + authentication_type = "API_KEY" + name = %q +} +resource "aws_appsync_api_key" "test" { + api_id = "${aws_appsync_graphql_api.test.id}" + expires = %q +} + +`, rName, expires) +} + +func testAccAppsyncApiKeyConfig_Required(rName string) string { return fmt.Sprintf(` resource "aws_appsync_graphql_api" "test" { authentication_type = "API_KEY" - name = "tf_appsync_test" + name = %q } resource "aws_appsync_api_key" "test" { - api_id = "${aws_appsync_graphql_api.test.id}" - expires = "%sT00:00:00Z" + api_id = "${aws_appsync_graphql_api.test.id}" } -`, strings.Split(rDate, "T")[0]) +`, rName) } diff --git a/website/docs/r/appsync_api_key.html.markdown b/website/docs/r/appsync_api_key.html.markdown index 86b016f1ce2..3874591d407 100644 --- a/website/docs/r/appsync_api_key.html.markdown +++ b/website/docs/r/appsync_api_key.html.markdown @@ -15,13 +15,13 @@ Provides an AppSync API Key. ```hcl resource "aws_appsync_graphql_api" "example" { authentication_type = "API_KEY" - name = "example" -} -resource "aws_appsync_api_key" "self" { - api_id = "${aws_appsync_graphql_api.example.id}" - expires = "2018-05-03T04:21:15+01:00" + name = "example" } +resource "aws_appsync_api_key" "example" { + api_id = "${aws_appsync_graphql_api.example.id}" + expires = "2018-05-03T04:00:00Z" +} ``` ## Argument Reference @@ -30,12 +30,19 @@ The following arguments are supported: * `api_id` - (Required) The ID of the associated AppSync API * `description` - (Optional) The API key description. Defaults to "Managed by Terraform". -* `expires` - (Optional) RFC3339 string representation of the expiry date. By default, it is 7 days from the date of creation. - +* `expires` - (Optional) RFC3339 string representation of the expiry date. Rounded down to nearest hour. By default, it is 7 days from the date of creation. ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - API Key ID (Formatted as ApiId:Key) * `key` - The API key + +## Import + +`aws_appsync_api_key` can be imported using the AppSync API ID and key separated by `:`, e.g. + +``` +$ terraform import aws_appsync_api_key.example xxxxx:yyyyy +``` From 083bccb553beb03195534e0824b8b607ec58eb11 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 9 Jul 2018 19:42:53 -0400 Subject: [PATCH 1803/3316] Update CHANGELOG for #3827 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db3615ef28b..0d67f6a0420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ NOTES: FEATURES: +* **New Resource:** `aws_appsync_api_key` [GH-3827] * **New Resource:** `aws_swf_domain` [GH-2803] ENHANCEMENTS: From 97cdc6064186a3b8f2452f33a9c8c61ac8f464b6 Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Mon, 9 Jul 2018 21:21:51 -0400 Subject: [PATCH 1804/3316] mostly complete implementation of redshift snapshot copy grant --- aws/provider.go | 1 + ...source_aws_redshift_snapshot_copy_grant.go | 40 +++--- ...e_aws_redshift_snapshot_copy_grant_test.go | 6 +- ...redshift_snapshot_copy_grant.html.markdown | 118 ++++++++++++++++++ 4 files changed, 137 insertions(+), 28 deletions(-) create mode 100644 website/docs/r/redshift_snapshot_copy_grant.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 9b8f5069140..34ef14a4581 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -531,6 +531,7 @@ func Provider() terraform.ResourceProvider { "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), "aws_route53_query_log": resourceAwsRoute53QueryLog(), "aws_route53_record": resourceAwsRoute53Record(), diff --git a/aws/resource_aws_redshift_snapshot_copy_grant.go b/aws/resource_aws_redshift_snapshot_copy_grant.go index 45ca44bf7d4..7b526649edc 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -1,19 +1,14 @@ package aws import ( - "bytes" "fmt" "log" - "sort" - "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { @@ -27,16 +22,17 @@ func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { Schema: map[string]*schema.Schema{ "snapshot_copy_grant_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsRedshiftSnapshotCopyGrantName, + Type: schema.TypeString, + Required: true, + ForceNew: true, }, "kms_key_id": { Type: schema.TypeString, Optional: true, ForceNew: true, + Computed: true, }, + "tags": tagsSchema(), }, } } @@ -45,7 +41,6 @@ func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta int conn := meta.(*AWSClient).redshiftconn grantName := d.Get("snapshot_copy_grant_name").(string) - keyId := d.Get("kms_key_id").(string) input := redshift.CreateSnapshotCopyGrantInput{ SnapshotCopyGrantName: aws.String(grantName), @@ -75,12 +70,12 @@ func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta int return err } - log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrantName) + log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrant.SnapshotCopyGrantName) d.SetId(grantName) - d.Set("snapshot_copy_grant_name", out.SnapshotCopyGrantName) - d.Set("kms_key_id", out.KmsKeyId) + d.Set("snapshot_copy_grant_name", out.SnapshotCopyGrant.SnapshotCopyGrantName) + d.Set("kms_key_id", out.SnapshotCopyGrant.KmsKeyId) - return resourceAwsSnapshotCopyGrantRead(d, meta) + return resourceAwsRedshiftSnapshotCopyGrantRead(d, meta) } func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta interface{}) error { @@ -117,10 +112,10 @@ func resourceAwsRedshiftSnapshotCopyGrantDelete(d *schema.ResourceData, meta int } log.Printf("[DEBUG] Deleting snapshot copy grant: %s", grantName) - _, err = conn.DeleteSnapshotCopyGrant(&deleteInput) + _, err := conn.DeleteSnapshotCopyGrant(&deleteInput) if err != nil { - if isAWSErr(err, redshift.SnapshotCopyGrantNotFoundFault, "") { + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { return nil } return err @@ -139,7 +134,7 @@ func resourceAwsRedshiftSnapshotCopyGrantDelete(d *schema.ResourceData, meta int func resourceAwsRedshiftSnapshotCopyGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { conn := meta.(*AWSClient).redshiftconn - grantName = d.Id() + grantName := d.Id() log.Printf("[DEBUG] Looking for Grant: %s", grantName) grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) @@ -172,14 +167,14 @@ by the describe grants call when expected. // NB: This function only retries the grant not being returned and some edge cases, while AWS Errors // are handled by the findAwsRedshiftSnapshotCopyGrant function -func findAwsRedshiftSnapshotGrantWithRetry(conn *redshift.Redshift, grantName string) (*redshift.SnapshotCopyGrant, error) { +func findAwsRedshiftSnapshotCopyGrantWithRetry(conn *redshift.Redshift, grantName string) (*redshift.SnapshotCopyGrant, error) { var grant *redshift.SnapshotCopyGrant err := resource.Retry(3*time.Minute, func() *resource.RetryError { var err error grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) if err != nil { - if serr, ok := err.(ErrCodeSnapshotCopyGrantNotFoundFault); ok { + if serr, ok := err.(AwsRedshiftSnapshotCopyGrantMissingError); ok { // Force a retry if the grant should exist return resource.RetryableError(serr) } @@ -198,7 +193,7 @@ func waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn *redshift.Redshift, gra err := resource.Retry(3*time.Minute, func() *resource.RetryError { grant, err := findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) if err != nil { - if _, ok := err.(ErrCodeSnapshotCopyGrantNotFoundFault); ok { + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { return nil } } @@ -239,16 +234,13 @@ func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string, out, err = conn.DescribeSnapshotCopyGrants(&input) if err != nil { - if isAWSErr(err, redshift.SnapshotCopyGrantNotFoundFault, "") { - return resource.RetryableError(err) - } return resource.NonRetryableError(err) } return nil }) if err != nil { - return nil, fmt.Errorf("error listing snapshot copy grants: %s", err) + return nil, err } grant = getAwsRedshiftSnapshotCopyGrant(out.SnapshotCopyGrants, grantName) diff --git a/aws/resource_aws_redshift_snapshot_copy_grant_test.go b/aws/resource_aws_redshift_snapshot_copy_grant_test.go index a55278ff388..21f11c79b68 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant_test.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant_test.go @@ -3,14 +3,12 @@ package aws import ( "fmt" "testing" - "time" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { - timestamp := time.Now().Format(time.RFC1123) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -61,8 +59,8 @@ func testAccCheckAWSRedshiftSnapshotCopyGrantExists(name string) resource.TestCh func testAccAWSRedshiftSnapshotCopyGrant_Basic(rName string) string { return fmt.Sprintf(` -resource "aws_redshift_snapshot_copy_grant" "tf-acc-test-grant" { +resource "aws_redshift_snapshot_copy_grant" "%s" { snapshot_copy_grant_name = "%s" } -`, rName) +`, rName, rName) } diff --git a/website/docs/r/redshift_snapshot_copy_grant.html.markdown b/website/docs/r/redshift_snapshot_copy_grant.html.markdown new file mode 100644 index 00000000000..4506baad950 --- /dev/null +++ b/website/docs/r/redshift_snapshot_copy_grant.html.markdown @@ -0,0 +1,118 @@ +--- +layout: "aws" +page_title: "AWS: aws_redshift_snapshot_copy_grant" +sidebar_current: "docs-aws-resource-redshift-snapshot-copy-grant" +description: |- + Creates a snapshot copy grant that allows AWS Redshift to encrypt copied snapshots with a customer master key from AWS KMS in a destination region. +--- + +# aws_redshift_snapshot_copy_grant + +Creates a snapshot copy grant that allows AWS Redshift to encrypt copied snapshots with a customer master key from AWS KMS in a destination region. + +Note that the grant must exist in the destination region, and not in the region of the cluster. + +## Example Usage + +```hcl +resource "aws_redshift_snapshot_copy_grant" "test" { + snapshot_copy_grant_name = "my-grant" +} + +resource "aws_redshift_parameter_group" "test" { + name = "main" + family = "redshift-1.0" + + parameter { + name = "require_ssl" + value = true + } +} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + enable_dns_hostnames = true + tags { + Name = "test" + } +} + +variable "test_subnet_count" { + default = 2 +} + +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test.id}" + count = "${var.test_subnet_count}" + cidr_block = "${cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)}" + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + + tags { + Name = "${data.aws_availability_zones.available.names[count.index]}-private-test" + } +} + +resource "aws_redshift_subnet_group" "test" { + name = "test" + subnet_ids = ["${aws_subnet.test.*.id}"] + + tags = { + Name = "test-subnet-group" + } +} + +resource "aws_security_group" "test" { + name = "test" + + description = "Managed by Terraform" + vpc_id = "${aws_vpc.test.id}" + + # only postgres in + ingress { + from_port = 5432 + to_port = 5432 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + + # allow all outbound traffic + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_redshift_cluster" "test" { + cluster_identifier = "test" + database_name = "test" + node_type = "dc1.large" + cluster_type = "single-node" + master_username = "test" + master_password = "Test12345Test" + vpc_security_group_ids = ["${aws_security_group.test.id}"] + cluster_subnet_group_name = "${aws_redshift_subnet_group.test.id}" + cluster_parameter_group_name = "${aws_redshift_parameter_group.test.name}" + automated_snapshot_retention_period = 3 # days + port = 5432 + allow_version_upgrade = true + publicly_accessible = false + encrypted = true + snapshot_copy { + destination_region = "us-east-2" + grant_name = "${aws_redshift_snapshot_copy_grant.test.snapshot_copy_grant_name}" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `snapshot_copy_grant_name` - (Required, Forces new resource) A friendly name for identifying the grant. +* `kms_key_id` - (Optional, Forces new resource) The unique identifier for the customer master key (CMK) that the grant applies to. Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify a CMK in a different AWS account, you must use the key ARN. If not specified, the default key is used. + +## Attributes Reference + +No additional attributes beyond the arguments above are exported. From bf1e5831299b3b9b881f39212a33ef7ddac3e151 Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Mon, 9 Jul 2018 21:25:22 -0400 Subject: [PATCH 1805/3316] no tags support for now --- aws/resource_aws_redshift_snapshot_copy_grant.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/resource_aws_redshift_snapshot_copy_grant.go b/aws/resource_aws_redshift_snapshot_copy_grant.go index 7b526649edc..a36939d4a34 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -32,7 +32,6 @@ func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { ForceNew: true, Computed: true, }, - "tags": tagsSchema(), }, } } From 9561f267b1f0a8eb54e8671bdc85151dd7d445a1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 10 Jul 2018 11:29:01 -0400 Subject: [PATCH 1806/3316] resource/aws_glue_catalog_database: Prevent error when deleted outside Terraform --- aws/resource_aws_glue_catalog_database.go | 9 ++++- ...resource_aws_glue_catalog_database_test.go | 35 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_glue_catalog_database.go b/aws/resource_aws_glue_catalog_database.go index bc035a9390e..8e9478dea13 100644 --- a/aws/resource_aws_glue_catalog_database.go +++ b/aws/resource_aws_glue_catalog_database.go @@ -136,6 +136,7 @@ func resourceAwsGlueCatalogDatabaseRead(d *schema.ResourceData, meta interface{} if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { log.Printf("[WARN] Glue Catalog Database (%s) not found, removing from state", d.Id()) d.SetId("") + return nil } return fmt.Errorf("Error reading Glue Catalog Database: %s", err.Error()) @@ -187,7 +188,13 @@ func resourceAwsGlueCatalogDatabaseExists(d *schema.ResourceData, meta interface } _, err = glueconn.GetDatabase(input) - return err == nil, err + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return false, nil + } + return false, err + } + return true, nil } func readAwsGlueCatalogID(id string) (catalogID string, name string, err error) { diff --git a/aws/resource_aws_glue_catalog_database_test.go b/aws/resource_aws_glue_catalog_database_test.go index e7dbe4c8b5e..14ca815fe14 100644 --- a/aws/resource_aws_glue_catalog_database_test.go +++ b/aws/resource_aws_glue_catalog_database_test.go @@ -113,6 +113,41 @@ func TestAccAWSGlueCatalogDatabase_full(t *testing.T) { }) } +func TestAccAWSGlueCatalogDatabase_recreates(t *testing.T) { + resourceName := "aws_glue_catalog_database.test" + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckGlueDatabaseDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCatalogDatabase_basic(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckGlueCatalogDatabaseExists(resourceName), + ), + }, + { + // Simulate deleting the database outside Terraform + PreConfig: func() { + conn := testAccProvider.Meta().(*AWSClient).glueconn + input := &glue.DeleteDatabaseInput{ + Name: aws.String(fmt.Sprintf("my_test_catalog_database_%d", rInt)), + } + _, err := conn.DeleteDatabase(input) + if err != nil { + t.Fatalf("error deleting Glue Catalog Database: %s", err) + } + }, + Config: testAccGlueCatalogDatabase_basic(rInt), + ExpectNonEmptyPlan: true, + PlanOnly: true, + }, + }, + }) +} + func testAccCheckGlueDatabaseDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).glueconn From e2e8042688b2f21a3179db3c1450b8cfd6ffab6c Mon Sep 17 00:00:00 2001 From: Jason Wieringa Date: Fri, 19 Jan 2018 18:04:46 -0800 Subject: [PATCH 1807/3316] Added resource_aws_copy_snapshot --- aws/provider.go | 1 + aws/resource_aws_copy_snapshot.go | 176 +++++++++++++++++++++++++ aws/resource_aws_copy_snapshot_test.go | 127 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 aws/resource_aws_copy_snapshot.go create mode 100644 aws/resource_aws_copy_snapshot_test.go diff --git a/aws/provider.go b/aws/provider.go index fc8848da8f9..69bdc0e51ed 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -389,6 +389,7 @@ func Provider() terraform.ResourceProvider { "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_copy_snapshot": resourceAwsCopySnapshot(), "aws_ebs_volume": resourceAwsEbsVolume(), "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), "aws_ecr_repository": resourceAwsEcrRepository(), diff --git a/aws/resource_aws_copy_snapshot.go b/aws/resource_aws_copy_snapshot.go new file mode 100644 index 00000000000..9a6e10228c1 --- /dev/null +++ b/aws/resource_aws_copy_snapshot.go @@ -0,0 +1,176 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCopySnapshot() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCopySnapshotCreate, + Read: resourceAwsCopySnapshotRead, + Delete: resourceAwsCopySnapshotDelete, + + Schema: map[string]*schema.Schema{ + "volume_id": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, + "owner_alias": { + Type: schema.TypeString, + Computed: true, + }, + "encrypted": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "volume_size": { + Type: schema.TypeInt, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "data_encryption_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "source_region": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_snapshot_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsCopySnapshotCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + request := &ec2.CopySnapshotInput{ + SourceRegion: aws.String(d.Get("source_region").(string)), + SourceSnapshotId: aws.String(d.Get("source_snapshot_id").(string)), + } + if v, ok := d.GetOk("description"); ok { + request.Description = aws.String(v.(string)) + } + if v, ok := d.GetOk("encrypted"); ok { + request.Encrypted = aws.Bool(v.(bool)) + } + if v, ok := d.GetOk("kms_key_id"); ok { + request.KmsKeyId = aws.String(v.(string)) + } + + res, err := conn.CopySnapshot(request) + if err != nil { + return err + } + + d.SetId(*res.SnapshotId) + + err = resourceAwsCopySnapshotWaitForAvailable(d.Id(), conn) + if err != nil { + return err + } + + if err := setTags(conn, d); err != nil { + log.Printf("[WARN] error setting tags: %s", err) + } + + return resourceAwsCopySnapshotRead(d, meta) +} + +func resourceAwsCopySnapshotRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeSnapshotsInput{ + SnapshotIds: []*string{aws.String(d.Id())}, + } + res, err := conn.DescribeSnapshots(req) + if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSnapshotID.NotFound" { + log.Printf("Snapshot %q Not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + snapshot := res.Snapshots[0] + + d.Set("description", snapshot.Description) + d.Set("owner_id", snapshot.OwnerId) + d.Set("encrypted", snapshot.Encrypted) + d.Set("owner_alias", snapshot.OwnerAlias) + d.Set("volume_id", snapshot.VolumeId) + d.Set("data_encryption_key_id", snapshot.DataEncryptionKeyId) + d.Set("kms_key_id", snapshot.KmsKeyId) + d.Set("volume_size", snapshot.VolumeSize) + + if err := d.Set("tags", tagsToMap(snapshot.Tags)); err != nil { + log.Printf("[WARN] error saving tags to state: %s", err) + } + + return nil +} + +func resourceAwsCopySnapshotDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + return resource.Retry(5*time.Minute, func() *resource.RetryError { + request := &ec2.DeleteSnapshotInput{ + SnapshotId: aws.String(d.Id()), + } + _, err := conn.DeleteSnapshot(request) + if err == nil { + return nil + } + + ebsErr, ok := err.(awserr.Error) + if ebsErr.Code() == "SnapshotInUse" { + return resource.RetryableError(fmt.Errorf("EBS SnapshotInUse - trying again while it detaches")) + } + + if !ok { + return resource.NonRetryableError(err) + } + + return resource.NonRetryableError(err) + }) +} + +func resourceAwsCopySnapshotWaitForAvailable(id string, conn *ec2.EC2) error { + log.Printf("Waiting for Snapshot %s to become available...", id) + + req := &ec2.DescribeSnapshotsInput{ + SnapshotIds: []*string{aws.String(id)}, + } + err := conn.WaitUntilSnapshotCompleted(req) + return err +} diff --git a/aws/resource_aws_copy_snapshot_test.go b/aws/resource_aws_copy_snapshot_test.go new file mode 100644 index 00000000000..b8e100e270f --- /dev/null +++ b/aws/resource_aws_copy_snapshot_test.go @@ -0,0 +1,127 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSCopySnapshot_basic(t *testing.T) { + var v ec2.Snapshot + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsCopySnapshotConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckCopySnapshotExists("aws_copy_snapshot.test", &v), + testAccCheckTags(&v.Tags, "Name", "testAccAwsCopySnapshotConfig"), + ), + }, + }, + }) +} + +func TestAccAWSCopySnapshot_withDescription(t *testing.T) { + var v ec2.Snapshot + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsCopySnapshotConfigWithDescription, + Check: resource.ComposeTestCheckFunc( + testAccCheckCopySnapshotExists("aws_copy_snapshot.description_test", &v), + resource.TestCheckResourceAttr("aws_copy_snapshot.description_test", "description", "Copy Snapshot Acceptance Test"), + ), + }, + }, + }) +} + +func testAccCheckCopySnapshotExists(n string, v *ec2.Snapshot) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + + request := &ec2.DescribeSnapshotsInput{ + SnapshotIds: []*string{aws.String(rs.Primary.ID)}, + } + + response, err := conn.DescribeSnapshots(request) + if err == nil { + if response.Snapshots != nil && len(response.Snapshots) > 0 { + *v = *response.Snapshots[0] + return nil + } + } + return fmt.Errorf("Error finding EC2 Snapshot %s", rs.Primary.ID) + } +} + +const testAccAwsCopySnapshotConfig = ` +resource "aws_ebs_volume" "test" { + availability_zone = "us-west-2a" + size = 1 +} + +resource "aws_ebs_snapshot" "test" { + volume_id = "${aws_ebs_volume.test.id}" + + tags { + Name = "testAccAwsEbsSnapshotConfig" + } +} + +resource "aws_copy_snapshot" "test" { + source_snapshot_id = "${aws_ebs_snapshot.test.id}" + source_region = "us-west-2" + + tags { + Name = "testAccAwsCopySnapshotConfig" + } +} +` + +const testAccAwsCopySnapshotConfigWithDescription = ` +resource "aws_ebs_volume" "description_test" { + availability_zone = "us-west-2a" + size = 1 + + tags { + Name = "testAccAwsCopySnapshotConfigWithDescription" + } +} + +resource "aws_ebs_snapshot" "description_test" { + volume_id = "${aws_ebs_volume.description_test.id}" + description = "EBS Snapshot Acceptance Test" + + tags { + Name = "testAccAwsCopySnapshotConfigWithDescription" + } +} + +resource "aws_copy_snapshot" "description_test" { + description = "Copy Snapshot Acceptance Test" + source_snapshot_id = "${aws_ebs_snapshot.description_test.id}" + source_region = "us-west-2" + + tags { + Name = "testAccAwsCopySnapshotConfigWithDescription" + } +} +` From 226f5ce647d5d75b49e475a06c08facb28bf0821 Mon Sep 17 00:00:00 2001 From: Jason Wieringa Date: Mon, 22 Jan 2018 13:32:10 -0800 Subject: [PATCH 1808/3316] Added aws_copy_snapshot multi region acceptance test Used TestAccAWSInstance_multipleRegions as an example: https://github.com/terraform-providers/terraform-provider-aws/blob/2a36215957d15aab4c7260a20742980ba70533cb/aws/resource_aws_instance_test.go#L655 --- aws/resource_aws_copy_snapshot_test.go | 101 ++++++++++++++++++++++--- 1 file changed, 92 insertions(+), 9 deletions(-) diff --git a/aws/resource_aws_copy_snapshot_test.go b/aws/resource_aws_copy_snapshot_test.go index b8e100e270f..3d5a89aaf15 100644 --- a/aws/resource_aws_copy_snapshot_test.go +++ b/aws/resource_aws_copy_snapshot_test.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/terraform" ) @@ -44,7 +45,41 @@ func TestAccAWSCopySnapshot_withDescription(t *testing.T) { }) } +func TestAccAWSCopySnapshot_withRegions(t *testing.T) { + var v ec2.Snapshot + + // record the initialized providers so that we can use them to + // check for the instances in each region + var providers []*schema.Provider + providerFactories := map[string]terraform.ResourceProviderFactory{ + "aws": func() (terraform.ResourceProvider, error) { + p := Provider() + providers = append(providers, p.(*schema.Provider)) + return p, nil + }, + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProviderFactories: providerFactories, + Steps: []resource.TestStep{ + { + Config: testAccAwsCopySnapshotConfigWithRegions, + Check: resource.ComposeTestCheckFunc( + testAccCheckCopySnapshotExistsWithProviders("aws_copy_snapshot.region_test", &v, &providers), + ), + }, + }, + }) + +} + func testAccCheckCopySnapshotExists(n string, v *ec2.Snapshot) resource.TestCheckFunc { + providers := []*schema.Provider{testAccProvider} + return testAccCheckCopySnapshotExistsWithProviders(n, v, &providers) +} + +func testAccCheckCopySnapshotExistsWithProviders(n string, v *ec2.Snapshot, providers *[]*schema.Provider) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -55,17 +90,24 @@ func testAccCheckCopySnapshotExists(n string, v *ec2.Snapshot) resource.TestChec return fmt.Errorf("No ID is set") } - conn := testAccProvider.Meta().(*AWSClient).ec2conn + for _, provider := range *providers { + // Ignore if Meta is empty, this can happen for validation providers + if provider.Meta() == nil { + continue + } - request := &ec2.DescribeSnapshotsInput{ - SnapshotIds: []*string{aws.String(rs.Primary.ID)}, - } + conn := provider.Meta().(*AWSClient).ec2conn + + request := &ec2.DescribeSnapshotsInput{ + SnapshotIds: []*string{aws.String(rs.Primary.ID)}, + } - response, err := conn.DescribeSnapshots(request) - if err == nil { - if response.Snapshots != nil && len(response.Snapshots) > 0 { - *v = *response.Snapshots[0] - return nil + response, err := conn.DescribeSnapshots(request) + if err == nil { + if response.Snapshots != nil && len(response.Snapshots) > 0 { + *v = *response.Snapshots[0] + return nil + } } } return fmt.Errorf("Error finding EC2 Snapshot %s", rs.Primary.ID) @@ -125,3 +167,44 @@ resource "aws_copy_snapshot" "description_test" { } } ` + +const testAccAwsCopySnapshotConfigWithRegions = ` +provider "aws" { + region = "us-west-2" + alias = "uswest2" +} + +provider "aws" { + region = "us-east-1" + alias = "useast1" +} + +resource "aws_ebs_volume" "region_test" { + provider = "aws.uswest2" + availability_zone = "us-west-2a" + size = 1 + + tags { + Name = "testAccAwsCopySnapshotConfigWithRegions" + } +} + +resource "aws_ebs_snapshot" "region_test" { + provider = "aws.uswest2" + volume_id = "${aws_ebs_volume.region_test.id}" + + tags { + Name = "testAccAwsCopySnapshotConfigWithRegions" + } +} + +resource "aws_copy_snapshot" "region_test" { + provider = "aws.useast1" + source_snapshot_id = "${aws_ebs_snapshot.region_test.id}" + source_region = "us-west-2" + + tags { + Name = "testAccAwsCopySnapshotConfigWithRegions" + } +} +` From f414b7d571aa867a24f7716f6dd6ac91ba9bde8f Mon Sep 17 00:00:00 2001 From: Jason Wieringa Date: Mon, 22 Jan 2018 15:15:43 -0800 Subject: [PATCH 1809/3316] Added aws_copy_snapshot with KMS acceptance test --- aws/resource_aws_copy_snapshot_test.go | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/aws/resource_aws_copy_snapshot_test.go b/aws/resource_aws_copy_snapshot_test.go index 3d5a89aaf15..95936b4ab53 100644 --- a/aws/resource_aws_copy_snapshot_test.go +++ b/aws/resource_aws_copy_snapshot_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -74,6 +75,24 @@ func TestAccAWSCopySnapshot_withRegions(t *testing.T) { } +func TestAccAWSCopySnapshot_withKms(t *testing.T) { + var v ec2.Snapshot + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAwsCopySnapshotConfigWithKms, + Check: resource.ComposeTestCheckFunc( + testAccCheckCopySnapshotExists("aws_copy_snapshot.kms_test", &v), + resource.TestMatchResourceAttr("aws_copy_snapshot.kms_test", "kms_key_id", + regexp.MustCompile("^arn:aws:kms:[a-z]{2}-[a-z]+-\\d{1}:[0-9]{12}:key/[a-z0-9-]{36}$")), + ), + }, + }, + }) +} + func testAccCheckCopySnapshotExists(n string, v *ec2.Snapshot) resource.TestCheckFunc { providers := []*schema.Provider{testAccProvider} return testAccCheckCopySnapshotExistsWithProviders(n, v, &providers) @@ -208,3 +227,42 @@ resource "aws_copy_snapshot" "region_test" { } } ` + +const testAccAwsCopySnapshotConfigWithKms = ` +provider "aws" { + region = "us-west-2" +} + +resource "aws_kms_key" "kms_test" { + description = "testAccAwsCopySnapshotConfigWithKms" + deletion_window_in_days = 7 +} + +resource "aws_ebs_volume" "kms_test" { + availability_zone = "us-west-2a" + size = 1 + + tags { + Name = "testAccAwsCopySnapshotConfigWithKms" + } +} + +resource "aws_ebs_snapshot" "kms_test" { + volume_id = "${aws_ebs_volume.kms_test.id}" + + tags { + Name = "testAccAwsCopySnapshotConfigWithKms" + } +} + +resource "aws_copy_snapshot" "kms_test" { + source_snapshot_id = "${aws_ebs_snapshot.kms_test.id}" + source_region = "us-west-2" + encrypted = true + kms_key_id = "${aws_kms_key.kms_test.arn}" + + tags { + Name = "testAccAwsCopySnapshotConfigWithKms" + } +} +` From 0fe1b9cdb04704aa8a5ffa05a98313abe9780d1a Mon Sep 17 00:00:00 2001 From: Jason Wieringa Date: Thu, 25 Jan 2018 18:49:28 -0800 Subject: [PATCH 1810/3316] website/docs/r/copy_snapshot added documentation for new resource --- website/docs/r/copy_snapshot.html.md | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 website/docs/r/copy_snapshot.html.md diff --git a/website/docs/r/copy_snapshot.html.md b/website/docs/r/copy_snapshot.html.md new file mode 100644 index 00000000000..f51ed369ecf --- /dev/null +++ b/website/docs/r/copy_snapshot.html.md @@ -0,0 +1,66 @@ +--- +layout: "aws" +page_title: "AWS: aws_copy_snapshot" +sidebar_current: "docs-aws-resource-copy-snapshot" +description: |- + Duplicates an existing Amazon snapshot +--- + +# aws_copy_snapshot + +Creates a Snapshot of a snapshot. + +## Example Usage + +```hcl +resource "aws_ebs_volume" "example" { + availability_zone = "us-west-2a" + size = 40 + tags { + Name = "HelloWorld" + } +} + +resource "aws_ebs_snapshot" "example_snapshot" { + volume_id = "${aws_ebs_volume.example.id}" + + tags { + Name = "HelloWorld_snap" + } +} + +resource "aws_copy_snapshot" "example_copy" { + source_snapshot_id = "${aws_ebs_snapshot.example_snapshot.id}" + source_region = "us-west-2" + + tags { + Name = "HelloWorld_copy_snap" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `description` - (Optional) A description of what the snapshot is. +* `encrypted` - Whether the snapshot is encrypted. +* `kms_key_id` - The ARN for the KMS encryption key. +* `source_snapshot_id` The ARN for the snapshot to be copied. +* `source_region` The region of the source snapshot. +* `tags` - A mapping of tags for the snapshot. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The snapshot ID (e.g. snap-59fcb34e). +* `owner_id` - The AWS account ID of the snapshot owner. +* `owner_alias` - Value from an Amazon-maintained list (`amazon`, `aws-marketplace`, `microsoft`) of snapshot owners. +* `encrypted` - Whether the snapshot is encrypted. +* `volume_size` - The size of the drive in GiBs. +* `kms_key_id` - The ARN for the KMS encryption key. +* `data_encryption_key_id` - The data encryption key identifier for the snapshot. +* `source_snapshot_id` The ARN of the copied snapshot. +* `source_region` The region of the source snapshot. +* `tags` - A mapping of tags for the snapshot. From 70f66c84739592bd2bbda781fe39cefb425defc2 Mon Sep 17 00:00:00 2001 From: Alois Date: Tue, 10 Jul 2018 13:15:32 -0500 Subject: [PATCH 1811/3316] Updating Heptio Authenticator to new name The heptio authenticator binary name has changed to aws-iam-authenticator. --- website/docs/guides/eks-getting-started.html.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/guides/eks-getting-started.html.md b/website/docs/guides/eks-getting-started.html.md index 4f44f10337f..d9f05d8c40c 100644 --- a/website/docs/guides/eks-getting-started.html.md +++ b/website/docs/guides/eks-getting-started.html.md @@ -79,13 +79,13 @@ full administrative access to the target AWS account. If you are planning to locally use the standard Kubernetes client, `kubectl`, it must be at least version 1.10 to support `exec` authentication with usage -of `heptio-authenticator-aws`. For additional information about installation +of `aws-iam-authenticator`. For additional information about installation and configuration of these applications, see their official documentation. Relevant Links: * [Kubernetes Client Downloads](https://kubernetes.io/docs/imported/release/notes/#client-binaries) -* [Heptio Authenticator](https://github.com/heptio/authenticator) +* [AWS IAM Authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator) ## Create Sample Architecture in AWS @@ -318,7 +318,7 @@ users: user: exec: apiVersion: client.authentication.k8s.io/v1alpha1 - command: heptio-authenticator-aws + command: aws-iam-authenticator args: - "token" - "-i" From 7e7dc07eca1ec8fe3e7ae4f741a9ef7d7004f3d8 Mon Sep 17 00:00:00 2001 From: Jason Wieringa Date: Tue, 10 Jul 2018 11:15:18 -0700 Subject: [PATCH 1812/3316] Renamed aws_copy_snapshot to aws_ebs_snapshot_copy I took another look at the original naming, aws_copy_snapshot, and I've reasoned that it was not consistent with resources like aws_ami_copy. Thus, I've modified the resource to be aws_ebs_snapshot_copy to conform to aws__ which I thought matched existing resources better. --- aws/provider.go | 2 +- ...t.go => resource_aws_ebs_snapshot_copy.go} | 20 ++--- ...=> resource_aws_ebs_snapshot_copy_test.go} | 76 +++++++++---------- website/docs/r/copy_snapshot.html.md | 8 +- 4 files changed, 53 insertions(+), 53 deletions(-) rename aws/{resource_aws_copy_snapshot.go => resource_aws_ebs_snapshot_copy.go} (85%) rename aws/{resource_aws_copy_snapshot_test.go => resource_aws_ebs_snapshot_copy_test.go} (64%) diff --git a/aws/provider.go b/aws/provider.go index 69bdc0e51ed..1b04b6a2daa 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -389,7 +389,7 @@ func Provider() terraform.ResourceProvider { "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_copy_snapshot": resourceAwsCopySnapshot(), + "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), "aws_ebs_volume": resourceAwsEbsVolume(), "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), "aws_ecr_repository": resourceAwsEcrRepository(), diff --git a/aws/resource_aws_copy_snapshot.go b/aws/resource_aws_ebs_snapshot_copy.go similarity index 85% rename from aws/resource_aws_copy_snapshot.go rename to aws/resource_aws_ebs_snapshot_copy.go index 9a6e10228c1..f1595412888 100644 --- a/aws/resource_aws_copy_snapshot.go +++ b/aws/resource_aws_ebs_snapshot_copy.go @@ -12,11 +12,11 @@ import ( "github.com/hashicorp/terraform/helper/schema" ) -func resourceAwsCopySnapshot() *schema.Resource { +func resourceAwsEbsSnapshotCopy() *schema.Resource { return &schema.Resource{ - Create: resourceAwsCopySnapshotCreate, - Read: resourceAwsCopySnapshotRead, - Delete: resourceAwsCopySnapshotDelete, + Create: resourceAwsEbsSnapshotCopyCreate, + Read: resourceAwsEbsSnapshotCopyRead, + Delete: resourceAwsEbsSnapshotCopyDelete, Schema: map[string]*schema.Schema{ "volume_id": { @@ -73,7 +73,7 @@ func resourceAwsCopySnapshot() *schema.Resource { } } -func resourceAwsCopySnapshotCreate(d *schema.ResourceData, meta interface{}) error { +func resourceAwsEbsSnapshotCopyCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn request := &ec2.CopySnapshotInput{ @@ -97,7 +97,7 @@ func resourceAwsCopySnapshotCreate(d *schema.ResourceData, meta interface{}) err d.SetId(*res.SnapshotId) - err = resourceAwsCopySnapshotWaitForAvailable(d.Id(), conn) + err = resourceAwsEbsSnapshotCopyWaitForAvailable(d.Id(), conn) if err != nil { return err } @@ -106,10 +106,10 @@ func resourceAwsCopySnapshotCreate(d *schema.ResourceData, meta interface{}) err log.Printf("[WARN] error setting tags: %s", err) } - return resourceAwsCopySnapshotRead(d, meta) + return resourceAwsEbsSnapshotCopyRead(d, meta) } -func resourceAwsCopySnapshotRead(d *schema.ResourceData, meta interface{}) error { +func resourceAwsEbsSnapshotCopyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn req := &ec2.DescribeSnapshotsInput{ @@ -140,7 +140,7 @@ func resourceAwsCopySnapshotRead(d *schema.ResourceData, meta interface{}) error return nil } -func resourceAwsCopySnapshotDelete(d *schema.ResourceData, meta interface{}) error { +func resourceAwsEbsSnapshotCopyDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn return resource.Retry(5*time.Minute, func() *resource.RetryError { @@ -165,7 +165,7 @@ func resourceAwsCopySnapshotDelete(d *schema.ResourceData, meta interface{}) err }) } -func resourceAwsCopySnapshotWaitForAvailable(id string, conn *ec2.EC2) error { +func resourceAwsEbsSnapshotCopyWaitForAvailable(id string, conn *ec2.EC2) error { log.Printf("Waiting for Snapshot %s to become available...", id) req := &ec2.DescribeSnapshotsInput{ diff --git a/aws/resource_aws_copy_snapshot_test.go b/aws/resource_aws_ebs_snapshot_copy_test.go similarity index 64% rename from aws/resource_aws_copy_snapshot_test.go rename to aws/resource_aws_ebs_snapshot_copy_test.go index 95936b4ab53..965a00a283a 100644 --- a/aws/resource_aws_copy_snapshot_test.go +++ b/aws/resource_aws_ebs_snapshot_copy_test.go @@ -12,41 +12,41 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSCopySnapshot_basic(t *testing.T) { +func TestAccAWSEbsSnapshotCopy_basic(t *testing.T) { var v ec2.Snapshot resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccAwsCopySnapshotConfig, + Config: testAccAwsEbsSnapshotCopyConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckCopySnapshotExists("aws_copy_snapshot.test", &v), - testAccCheckTags(&v.Tags, "Name", "testAccAwsCopySnapshotConfig"), + testAccCheckEbsSnapshotCopyExists("aws_ebs_snapshot_copy.test", &v), + testAccCheckTags(&v.Tags, "Name", "testAccAwsEbsSnapshotCopyConfig"), ), }, }, }) } -func TestAccAWSCopySnapshot_withDescription(t *testing.T) { +func TestAccAWSEbsSnapshotCopy_withDescription(t *testing.T) { var v ec2.Snapshot resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccAwsCopySnapshotConfigWithDescription, + Config: testAccAwsEbsSnapshotCopyConfigWithDescription, Check: resource.ComposeTestCheckFunc( - testAccCheckCopySnapshotExists("aws_copy_snapshot.description_test", &v), - resource.TestCheckResourceAttr("aws_copy_snapshot.description_test", "description", "Copy Snapshot Acceptance Test"), + testAccCheckEbsSnapshotCopyExists("aws_ebs_snapshot_copy.description_test", &v), + resource.TestCheckResourceAttr("aws_ebs_snapshot_copy.description_test", "description", "Copy Snapshot Acceptance Test"), ), }, }, }) } -func TestAccAWSCopySnapshot_withRegions(t *testing.T) { +func TestAccAWSEbsSnapshotCopy_withRegions(t *testing.T) { var v ec2.Snapshot // record the initialized providers so that we can use them to @@ -65,9 +65,9 @@ func TestAccAWSCopySnapshot_withRegions(t *testing.T) { ProviderFactories: providerFactories, Steps: []resource.TestStep{ { - Config: testAccAwsCopySnapshotConfigWithRegions, + Config: testAccAwsEbsSnapshotCopyConfigWithRegions, Check: resource.ComposeTestCheckFunc( - testAccCheckCopySnapshotExistsWithProviders("aws_copy_snapshot.region_test", &v, &providers), + testAccCheckEbsSnapshotCopyExistsWithProviders("aws_ebs_snapshot_copy.region_test", &v, &providers), ), }, }, @@ -75,17 +75,17 @@ func TestAccAWSCopySnapshot_withRegions(t *testing.T) { } -func TestAccAWSCopySnapshot_withKms(t *testing.T) { +func TestAccAWSEbsSnapshotCopy_withKms(t *testing.T) { var v ec2.Snapshot resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccAwsCopySnapshotConfigWithKms, + Config: testAccAwsEbsSnapshotCopyConfigWithKms, Check: resource.ComposeTestCheckFunc( - testAccCheckCopySnapshotExists("aws_copy_snapshot.kms_test", &v), - resource.TestMatchResourceAttr("aws_copy_snapshot.kms_test", "kms_key_id", + testAccCheckEbsSnapshotCopyExists("aws_ebs_snapshot_copy.kms_test", &v), + resource.TestMatchResourceAttr("aws_ebs_snapshot_copy.kms_test", "kms_key_id", regexp.MustCompile("^arn:aws:kms:[a-z]{2}-[a-z]+-\\d{1}:[0-9]{12}:key/[a-z0-9-]{36}$")), ), }, @@ -93,12 +93,12 @@ func TestAccAWSCopySnapshot_withKms(t *testing.T) { }) } -func testAccCheckCopySnapshotExists(n string, v *ec2.Snapshot) resource.TestCheckFunc { +func testAccCheckEbsSnapshotCopyExists(n string, v *ec2.Snapshot) resource.TestCheckFunc { providers := []*schema.Provider{testAccProvider} - return testAccCheckCopySnapshotExistsWithProviders(n, v, &providers) + return testAccCheckEbsSnapshotCopyExistsWithProviders(n, v, &providers) } -func testAccCheckCopySnapshotExistsWithProviders(n string, v *ec2.Snapshot, providers *[]*schema.Provider) resource.TestCheckFunc { +func testAccCheckEbsSnapshotCopyExistsWithProviders(n string, v *ec2.Snapshot, providers *[]*schema.Provider) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -133,7 +133,7 @@ func testAccCheckCopySnapshotExistsWithProviders(n string, v *ec2.Snapshot, prov } } -const testAccAwsCopySnapshotConfig = ` +const testAccAwsEbsSnapshotCopyConfig = ` resource "aws_ebs_volume" "test" { availability_zone = "us-west-2a" size = 1 @@ -143,27 +143,27 @@ resource "aws_ebs_snapshot" "test" { volume_id = "${aws_ebs_volume.test.id}" tags { - Name = "testAccAwsEbsSnapshotConfig" + Name = "testAccAwsEbsSnapshotCopyConfig" } } -resource "aws_copy_snapshot" "test" { +resource "aws_ebs_snapshot_copy" "test" { source_snapshot_id = "${aws_ebs_snapshot.test.id}" source_region = "us-west-2" tags { - Name = "testAccAwsCopySnapshotConfig" + Name = "testAccAwsEbsSnapshotCopyConfig" } } ` -const testAccAwsCopySnapshotConfigWithDescription = ` +const testAccAwsEbsSnapshotCopyConfigWithDescription = ` resource "aws_ebs_volume" "description_test" { availability_zone = "us-west-2a" size = 1 tags { - Name = "testAccAwsCopySnapshotConfigWithDescription" + Name = "testAccAwsEbsSnapshotCopyConfigWithDescription" } } @@ -172,22 +172,22 @@ resource "aws_ebs_snapshot" "description_test" { description = "EBS Snapshot Acceptance Test" tags { - Name = "testAccAwsCopySnapshotConfigWithDescription" + Name = "testAccAwsEbsSnapshotCopyConfigWithDescription" } } -resource "aws_copy_snapshot" "description_test" { +resource "aws_ebs_snapshot_copy" "description_test" { description = "Copy Snapshot Acceptance Test" source_snapshot_id = "${aws_ebs_snapshot.description_test.id}" source_region = "us-west-2" tags { - Name = "testAccAwsCopySnapshotConfigWithDescription" + Name = "testAccAwsEbsSnapshotCopyConfigWithDescription" } } ` -const testAccAwsCopySnapshotConfigWithRegions = ` +const testAccAwsEbsSnapshotCopyConfigWithRegions = ` provider "aws" { region = "us-west-2" alias = "uswest2" @@ -204,7 +204,7 @@ resource "aws_ebs_volume" "region_test" { size = 1 tags { - Name = "testAccAwsCopySnapshotConfigWithRegions" + Name = "testAccAwsEbsSnapshotCopyConfigWithRegions" } } @@ -213,28 +213,28 @@ resource "aws_ebs_snapshot" "region_test" { volume_id = "${aws_ebs_volume.region_test.id}" tags { - Name = "testAccAwsCopySnapshotConfigWithRegions" + Name = "testAccAwsEbsSnapshotCopyConfigWithRegions" } } -resource "aws_copy_snapshot" "region_test" { +resource "aws_ebs_snapshot_copy" "region_test" { provider = "aws.useast1" source_snapshot_id = "${aws_ebs_snapshot.region_test.id}" source_region = "us-west-2" tags { - Name = "testAccAwsCopySnapshotConfigWithRegions" + Name = "testAccAwsEbsSnapshotCopyConfigWithRegions" } } ` -const testAccAwsCopySnapshotConfigWithKms = ` +const testAccAwsEbsSnapshotCopyConfigWithKms = ` provider "aws" { region = "us-west-2" } resource "aws_kms_key" "kms_test" { - description = "testAccAwsCopySnapshotConfigWithKms" + description = "testAccAwsEbsSnapshotCopyConfigWithKms" deletion_window_in_days = 7 } @@ -243,7 +243,7 @@ resource "aws_ebs_volume" "kms_test" { size = 1 tags { - Name = "testAccAwsCopySnapshotConfigWithKms" + Name = "testAccAwsEbsSnapshotCopyConfigWithKms" } } @@ -251,18 +251,18 @@ resource "aws_ebs_snapshot" "kms_test" { volume_id = "${aws_ebs_volume.kms_test.id}" tags { - Name = "testAccAwsCopySnapshotConfigWithKms" + Name = "testAccAwsEbsSnapshotCopyConfigWithKms" } } -resource "aws_copy_snapshot" "kms_test" { +resource "aws_ebs_snapshot_copy" "kms_test" { source_snapshot_id = "${aws_ebs_snapshot.kms_test.id}" source_region = "us-west-2" encrypted = true kms_key_id = "${aws_kms_key.kms_test.arn}" tags { - Name = "testAccAwsCopySnapshotConfigWithKms" + Name = "testAccAwsEbsSnapshotCopyConfigWithKms" } } ` diff --git a/website/docs/r/copy_snapshot.html.md b/website/docs/r/copy_snapshot.html.md index f51ed369ecf..d5d7a6fe759 100644 --- a/website/docs/r/copy_snapshot.html.md +++ b/website/docs/r/copy_snapshot.html.md @@ -1,12 +1,12 @@ --- layout: "aws" -page_title: "AWS: aws_copy_snapshot" -sidebar_current: "docs-aws-resource-copy-snapshot" +page_title: "AWS: aws_ebs_snapshot_copy" +sidebar_current: "docs-aws-resource-ebs-snapshot-copy" description: |- Duplicates an existing Amazon snapshot --- -# aws_copy_snapshot +# aws_ebs_snapshot_copy Creates a Snapshot of a snapshot. @@ -29,7 +29,7 @@ resource "aws_ebs_snapshot" "example_snapshot" { } } -resource "aws_copy_snapshot" "example_copy" { +resource "aws_ebs_snapshot_copy" "example_copy" { source_snapshot_id = "${aws_ebs_snapshot.example_snapshot.id}" source_region = "us-west-2" From cfdd8ae041af1986561f738c226d23e0a227dd31 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 08:16:27 -0400 Subject: [PATCH 1813/3316] vendor: aws-sdk-go@v1.14.24 --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 53 +- .../aws/aws-sdk-go/aws/session/doc.go | 2 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../eventstream/eventstreamapi/api.go | 36 + .../protocol/eventstream/header_value.go | 2 +- .../private/protocol/xml/xmlutil/build.go | 10 +- .../protocol/xml/xmlutil/xml_to_struct.go | 1 + .../aws/aws-sdk-go/service/acm/waiters.go | 71 + .../service/applicationautoscaling/api.go | 196 +- .../service/applicationautoscaling/doc.go | 23 +- .../aws/aws-sdk-go/service/codebuild/api.go | 34 +- .../service/databasemigrationservice/api.go | 158 +- .../aws/aws-sdk-go/service/ec2/api.go | 720 ++--- .../aws/aws-sdk-go/service/glue/api.go | 114 +- .../aws/aws-sdk-go/service/lambda/api.go | 3 + .../aws-sdk-go/service/mediaconvert/api.go | 596 +++- .../aws/aws-sdk-go/service/opsworks/api.go | 215 +- .../aws/aws-sdk-go/service/pinpoint/api.go | 2605 +++++++++++++++-- .../aws/aws-sdk-go/service/pinpoint/errors.go | 12 + .../aws/aws-sdk-go/service/redshift/api.go | 854 +++++- .../aws/aws-sdk-go/service/redshift/errors.go | 28 +- .../aws/aws-sdk-go/service/s3/api.go | 22 +- .../aws/aws-sdk-go/service/sagemaker/api.go | 224 +- .../aws/aws-sdk-go/service/ssm/api.go | 1266 +++++++- .../aws/aws-sdk-go/service/ssm/errors.go | 16 +- vendor/vendor.json | 1016 +++---- 26 files changed, 6657 insertions(+), 1622 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 75c351d0f62..8e823bec068 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -1534,6 +1534,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1926,6 +1927,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2135,11 +2137,31 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "fips-us-east-1": endpoint{}, - "fips-us-east-2": endpoint{}, - "fips-us-west-1": endpoint{}, - "fips-us-west-2": endpoint{}, - "sa-east-1": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "sqs-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "sqs-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "sqs-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "sqs-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "sa-east-1": endpoint{}, "us-east-1": endpoint{ SSLCommonName: "queue.{dnsSuffix}", }, @@ -2467,7 +2489,8 @@ var awscnPartition = partition{ "apigateway": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "application-autoscaling": service{ @@ -2533,6 +2556,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "ds": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "dynamodb": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -2663,7 +2693,8 @@ var awscnPartition = partition{ "lambda": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "logs": service{ @@ -3149,5 +3180,13 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "translate": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, }, } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go index ea7b886f81f..98d420fd64d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go @@ -128,7 +128,7 @@ read. The Session will be created from configuration values from the shared credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config). Credentials are the values the SDK should use for authenticating requests with -AWS Services. They arfrom a configuration file will need to include both +AWS Services. They are from a configuration file will need to include both aws_access_key_id and aws_secret_access_key must be provided together in the same file to be considered valid. The values will be ignored if not a complete group. aws_session_token is an optional field that can be provided if both of diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 75fbf2f2c3e..afd20fb1219 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.14.16" +const SDKVersion = "1.14.24" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go index 4a4e64c713e..97937c8e598 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/api.go @@ -94,6 +94,9 @@ func (r *EventReader) ReadEvent() (event interface{}, err error) { switch typ { case EventMessageType: return r.unmarshalEventMessage(msg) + case ExceptionMessageType: + err = r.unmarshalEventException(msg) + return nil, err case ErrorMessageType: return nil, r.unmarshalErrorMessage(msg) default: @@ -122,6 +125,39 @@ func (r *EventReader) unmarshalEventMessage( return ev, nil } +func (r *EventReader) unmarshalEventException( + msg eventstream.Message, +) (err error) { + eventType, err := GetHeaderString(msg, ExceptionTypeHeader) + if err != nil { + return err + } + + ev, err := r.unmarshalerForEventType(eventType) + if err != nil { + return err + } + + err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg) + if err != nil { + return err + } + + var ok bool + err, ok = ev.(error) + if !ok { + err = messageError{ + code: "SerializationError", + msg: fmt.Sprintf( + "event stream exception %s mapped to non-error %T, %v", + eventType, ev, ev, + ), + } + } + + return err +} + func (r *EventReader) unmarshalErrorMessage(msg eventstream.Message) (err error) { var msgErr messageError diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go index d7786f92ce5..e3fc0766a9e 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go @@ -464,7 +464,7 @@ func (v *TimestampValue) decode(r io.Reader) error { func timeFromEpochMilli(t int64) time.Time { secs := t / 1e3 msec := t % 1e3 - return time.Unix(secs, msec*int64(time.Millisecond)) + return time.Unix(secs, msec*int64(time.Millisecond)).UTC() } // An UUIDValue provides eventstream encoding, and representation of a UUID diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go index 7091b456d18..f3e64094bbb 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go @@ -13,9 +13,13 @@ import ( "github.com/aws/aws-sdk-go/private/protocol" ) -// BuildXML will serialize params into an xml.Encoder. -// Error will be returned if the serialization of any of the params or nested values fails. +// BuildXML will serialize params into an xml.Encoder. Error will be returned +// if the serialization of any of the params or nested values fails. func BuildXML(params interface{}, e *xml.Encoder) error { + return buildXML(params, e, false) +} + +func buildXML(params interface{}, e *xml.Encoder, sorted bool) error { b := xmlBuilder{encoder: e, namespaces: map[string]string{}} root := NewXMLElement(xml.Name{}) if err := b.buildValue(reflect.ValueOf(params), root, ""); err != nil { @@ -23,7 +27,7 @@ func BuildXML(params interface{}, e *xml.Encoder) error { } for _, c := range root.Children { for _, v := range c { - return StructToXML(e, v, false) + return StructToXML(e, v, sorted) } } return nil diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go index 3e970b629da..515ce15215b 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go @@ -29,6 +29,7 @@ func NewXMLElement(name xml.Name) *XMLNode { // AddChild adds child to the XMLNode. func (n *XMLNode) AddChild(child *XMLNode) { + child.parent = n if _, ok := n.Children[child.Name.Local]; !ok { n.Children[child.Name.Local] = []*XMLNode{} } diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go new file mode 100644 index 00000000000..6d63b88bc04 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/waiters.go @@ -0,0 +1,71 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acm + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilCertificateValidated uses the ACM API operation +// DescribeCertificate to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ACM) WaitUntilCertificateValidated(input *DescribeCertificateInput) error { + return c.WaitUntilCertificateValidatedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilCertificateValidatedWithContext is an extended version of WaitUntilCertificateValidated. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACM) WaitUntilCertificateValidatedWithContext(ctx aws.Context, input *DescribeCertificateInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilCertificateValidated", + MaxAttempts: 40, + Delay: request.ConstantWaiterDelay(60 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "Certificate.DomainValidationOptions[].ValidationStatus", + Expected: "SUCCESS", + }, + { + State: request.RetryWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "Certificate.DomainValidationOptions[].ValidationStatus", + Expected: "PENDING_VALIDATION", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "Certificate.Status", + Expected: "FAILED", + }, + { + State: request.FailureWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ResourceNotFoundException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeCertificateInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeCertificateRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go index 1586778ca8b..9cfbb0c5f7b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go @@ -1362,6 +1362,11 @@ type DeleteScalingPolicyInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1397,11 +1402,15 @@ type DeleteScalingPolicyInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1514,6 +1523,11 @@ type DeleteScheduledActionInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1548,6 +1562,9 @@ type DeleteScheduledActionInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The name of the scheduled action. @@ -1555,8 +1572,9 @@ type DeleteScheduledActionInput struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1666,6 +1684,11 @@ type DeregisterScalableTargetInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -1701,11 +1724,15 @@ type DeregisterScalableTargetInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1818,6 +1845,11 @@ type DescribeScalableTargetsInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceIds []*string `type:"list"` // The scalable dimension associated with the scalable target. This string consists @@ -1852,10 +1884,14 @@ type DescribeScalableTargetsInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -1990,6 +2026,11 @@ type DescribeScalingActivitiesInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2024,10 +2065,14 @@ type DescribeScalingActivitiesInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2168,6 +2213,11 @@ type DescribeScalingPoliciesInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2202,10 +2252,14 @@ type DescribeScalingPoliciesInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2349,6 +2403,11 @@ type DescribeScheduledActionsInput struct { // // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. + // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. ResourceId *string `min:"1" type:"string"` // The scalable dimension. This string consists of the service namespace, resource @@ -2383,13 +2442,17 @@ type DescribeScheduledActionsInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The names of the scheduled actions to describe. ScheduledActionNames []*string `type:"list"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2649,6 +2712,11 @@ type PutScalingPolicyInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -2684,11 +2752,15 @@ type PutScalingPolicyInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -2864,6 +2936,11 @@ type PutScheduledActionInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -2899,6 +2976,9 @@ type PutScheduledActionInput struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The new minimum and maximum capacity. You can set both values or just one. @@ -2921,7 +3001,8 @@ type PutScheduledActionInput struct { // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. // - // For more information about cron expressions, see Cron (https://en.wikipedia.org/wiki/Cron). + // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) + // in the Amazon CloudWatch Events User Guide. Schedule *string `min:"1" type:"string"` // The name of the scheduled action. @@ -2929,8 +3010,9 @@ type PutScheduledActionInput struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3078,12 +3160,17 @@ type RegisterScalableTargetInput struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` // 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). + // Roles for Application Auto Scaling (http://docs.aws.amazon.com/autoscaling/application/userguide/application-autoscaling-service-linked-roles.html). // // For resources that are not supported using a service-linked role, this parameter // is required and must specify the ARN of an IAM role that allows Application @@ -3122,11 +3209,15 @@ type RegisterScalableTargetInput struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3264,6 +3355,11 @@ type ScalableTarget struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3305,11 +3401,15 @@ type ScalableTarget struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3453,6 +3553,11 @@ type ScalingActivity struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3488,11 +3593,15 @@ type ScalingActivity struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3642,6 +3751,11 @@ type ScalingPolicy struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3677,11 +3791,15 @@ type ScalingPolicy struct { // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. + // // ScalableDimension is a required field ScalableDimension *string `type:"string" required:"true" enum:"ScalableDimension"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -3803,6 +3921,11 @@ type ScheduledAction struct { // * Amazon SageMaker endpoint variants - The resource type is variant and // the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering. // + // * Custom resources are not supported with a resource type. This parameter + // must specify the OutputValue from the CloudFormation template stack used + // to access the resources. The unique identifier is defined by the service + // provider. + // // ResourceId is a required field ResourceId *string `min:"1" type:"string" required:"true"` @@ -3837,6 +3960,9 @@ type ScheduledAction struct { // // * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances // for an Amazon SageMaker model endpoint variant. + // + // * custom-resource:ResourceType:Property - The scalable dimension for a + // custom resource provided by your own application or service. ScalableDimension *string `type:"string" enum:"ScalableDimension"` // The new minimum and maximum capacity. You can set both values or just one. @@ -3859,7 +3985,8 @@ type ScheduledAction struct { // For rate expressions, value is a positive integer and unit is minute | minutes // | hour | hours | day | days. // - // For more information about cron expressions, see Cron (https://en.wikipedia.org/wiki/Cron). + // For more information about cron expressions, see Cron Expressions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions) + // in the Amazon CloudWatch Events User Guide. // // Schedule is a required field Schedule *string `min:"1" type:"string" required:"true"` @@ -3874,8 +4001,9 @@ type ScheduledAction struct { // ScheduledActionName is a required field ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The namespace of the AWS service. For more information, see AWS Service Namespaces - // (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // The namespace of the AWS service that provides the resource or custom-resource + // for a resource provided by your own application or service. For more information, + // see AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) // in the Amazon Web Services General Reference. // // ServiceNamespace is a required field @@ -4381,6 +4509,9 @@ const ( // ScalableDimensionSagemakerVariantDesiredInstanceCount is a ScalableDimension enum value ScalableDimensionSagemakerVariantDesiredInstanceCount = "sagemaker:variant:DesiredInstanceCount" + + // ScalableDimensionCustomResourceResourceTypeProperty is a ScalableDimension enum value + ScalableDimensionCustomResourceResourceTypeProperty = "custom-resource:ResourceType:Property" ) const ( @@ -4424,4 +4555,7 @@ const ( // ServiceNamespaceSagemaker is a ServiceNamespace enum value ServiceNamespaceSagemaker = "sagemaker" + + // ServiceNamespaceCustomResource is a ServiceNamespace enum value + ServiceNamespaceCustomResource = "custom-resource" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go index 67430038166..9d1c051a255 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go @@ -4,10 +4,10 @@ // requests to Application Auto Scaling. // // With Application Auto Scaling, you can configure automatic scaling for your -// scalable AWS resources. You can use Application Auto Scaling to accomplish -// the following tasks: +// scalable resources. You can use Application Auto Scaling to accomplish the +// following tasks: // -// * Define scaling policies to automatically scale your AWS resources +// * Define scaling policies to automatically scale your AWS or custom resources // // * Scale your resources in response to CloudWatch alarms // @@ -15,7 +15,7 @@ // // * View the history of your scaling events // -// Application Auto Scaling can scale the following AWS resources: +// Application Auto Scaling can scale the following resources: // // * Amazon ECS services. For more information, see Service Auto Scaling // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html) @@ -41,16 +41,19 @@ // * 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). // -// * Amazon SageMaker endpoints. For more information, see Automatically +// * Amazon SageMaker endpoint variants. For more information, see Automatically // Scaling Amazon SageMaker Models (http://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling.html). // +// * Custom resources provided by your own applications or services. More +// information is available in our GitHub repository (https://github.com/aws/aws-auto-scaling-custom-resource). +// +// +// To learn more about Application Auto Scaling, see the Application Auto Scaling +// User Guide (http://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html). +// // To configure automatic scaling for multiple resources across multiple services, // use AWS Auto Scaling to create a scaling plan for your application. For more -// information, see AWS Auto Scaling (http://aws.amazon.com/autoscaling). -// -// 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) -// in the AWS General Reference. +// information, see the AWS Auto Scaling User Guide (http://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html). // // See https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 816aff01464..6f19566e5a4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -3542,8 +3542,17 @@ type ProjectEnvironment struct { // build commands. (Do not run the following build commands if the specified // build environment image is provided by AWS CodeBuild with Docker support.) // + // If the operating system's base image is Ubuntu Linux: + // // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 - // --storage-driver=overlay& - timeout -t 15 sh -c "until docker info; do echo + // --storage-driver=overlay& - timeout 15 sh -c "until docker info; do echo + // .; sleep 1; done" + // + // If the operating system's base image is Alpine Linux, add the -t argument + // to timeout: + // + // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 + // --storage-driver=overlay& - timeout 15 -t sh -c "until docker info; do echo // .; sleep 1; done" PrivilegedMode *bool `locationName:"privilegedMode" type:"boolean"` @@ -3697,6 +3706,12 @@ type ProjectSource struct { // source object, set the auth object's type value to OAUTH. Location *string `locationName:"location" type:"string"` + // Set to true to report the status of a build's start and finish to your source + // provider. This option is only valid when your source provider is GitHub. + // If this is set and you use a different source provider, an invalidInputException + // is thrown. + ReportBuildStatus *bool `locationName:"reportBuildStatus" type:"boolean"` + // The type of repository that contains the source code to be built. Valid values // include: // @@ -3774,6 +3789,12 @@ func (s *ProjectSource) SetLocation(v string) *ProjectSource { return s } +// SetReportBuildStatus sets the ReportBuildStatus field's value. +func (s *ProjectSource) SetReportBuildStatus(v bool) *ProjectSource { + s.ReportBuildStatus = &v + return s +} + // SetType sets the Type field's value. func (s *ProjectSource) SetType(v string) *ProjectSource { s.Type = &v @@ -3894,6 +3915,11 @@ type StartBuildInput struct { // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` + // Set to true to report to your source provider the status of a build's start + // and completion. If you use this option with a source provider other than + // GitHub, an invalidInputException is thrown. + ReportBuildStatusOverride *bool `locationName:"reportBuildStatusOverride" type:"boolean"` + // The name of a service role for this build that overrides the one specified // in the build project. ServiceRoleOverride *string `locationName:"serviceRoleOverride" min:"1" type:"string"` @@ -4075,6 +4101,12 @@ func (s *StartBuildInput) SetProjectName(v string) *StartBuildInput { return s } +// SetReportBuildStatusOverride sets the ReportBuildStatusOverride field's value. +func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput { + s.ReportBuildStatusOverride = &v + return s +} + // SetServiceRoleOverride sets the ServiceRoleOverride field's value. func (s *StartBuildInput) SetServiceRoleOverride(v string) *StartBuildInput { s.ServiceRoleOverride = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 7dc5e7d5441..746d2ec81f2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -4878,6 +4878,27 @@ type CreateEndpointInput struct { // The name of the endpoint database. DatabaseName *string `type:"string"` + // The settings in JSON format for the DMS Transfer type source endpoint. + // + // Attributes include: + // + // * serviceAccessRoleArn - The IAM role that has permission to access the + // Amazon S3 bucket. + // + // * bucketName - The name of the S3 bucket to use. + // + // * compressionType - An optional parameter to use GZIP to compress the + // target files. Set to NONE (the default) or do not use to leave the files + // uncompressed. + // + // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string + // + // JSON syntax: + // + // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": + // "none"|"gzip" } + DmsTransferSettings *DmsTransferSettings `type:"structure"` + // Settings in JSON format for the target Amazon DynamoDB endpoint. For more // information about the available settings, see the Using Object Mapping to // Migrate Data to DynamoDB section at Using an Amazon DynamoDB Database as @@ -4919,7 +4940,7 @@ type CreateEndpointInput struct { // Settings in JSON format for the source MongoDB endpoint. For more information // about the available settings, see the Configuration Properties When Using // MongoDB as a Source for AWS Database Migration Service section at Using - // Amazon S3 as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html). + // MongoDB as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html). MongoDbSettings *MongoDbSettings `type:"structure"` // The password to be used to login to the endpoint database. @@ -5000,6 +5021,12 @@ func (s *CreateEndpointInput) SetDatabaseName(v string) *CreateEndpointInput { return s } +// SetDmsTransferSettings sets the DmsTransferSettings field's value. +func (s *CreateEndpointInput) SetDmsTransferSettings(v *DmsTransferSettings) *CreateEndpointInput { + s.DmsTransferSettings = v + return s +} + // SetDynamoDbSettings sets the DynamoDbSettings field's value. func (s *CreateEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *CreateEndpointInput { s.DynamoDbSettings = v @@ -5595,6 +5622,8 @@ type CreateReplicationTaskInput struct { // Indicates the start time for a change data capture (CDC) operation. Use either // CdcStartTime or CdcStartPosition to specify when you want a CDC operation // to start. Specifying both values results in an error. + // + // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` // Indicates when you want a change data capture (CDC) operation to stop. The @@ -7824,6 +7853,39 @@ func (s *DescribeTableStatisticsOutput) SetTableStatistics(v []*TableStatistics) return s } +// The settings in JSON format for the DMS Transfer type source endpoint. +type DmsTransferSettings struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket to use. + BucketName *string `type:"string"` + + // The IAM role that has permission to access the Amazon S3 bucket. + ServiceAccessRoleArn *string `type:"string"` +} + +// String returns the string representation +func (s DmsTransferSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DmsTransferSettings) GoString() string { + return s.String() +} + +// SetBucketName sets the BucketName field's value. +func (s *DmsTransferSettings) SetBucketName(v string) *DmsTransferSettings { + s.BucketName = &v + return s +} + +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *DmsTransferSettings) SetServiceAccessRoleArn(v string) *DmsTransferSettings { + s.ServiceAccessRoleArn = &v + return s +} + type DynamoDbSettings struct { _ struct{} `type:"structure"` @@ -7871,6 +7933,27 @@ type Endpoint struct { // The name of the database at the endpoint. DatabaseName *string `type:"string"` + // The settings in JSON format for the DMS Transfer type source endpoint. + // + // Attributes include: + // + // * serviceAccessRoleArn - The IAM role that has permission to access the + // Amazon S3 bucket. + // + // * bucketName - The name of the S3 bucket to use. + // + // * compressionType - An optional parameter to use GZIP to compress the + // target files. Set to NONE (the default) or do not use to leave the files + // uncompressed. + // + // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string + // + // JSON syntax: + // + // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": + // "none"|"gzip" } + DmsTransferSettings *DmsTransferSettings `type:"structure"` + // The settings for the target DynamoDB database. For more information, see // the DynamoDBSettings structure. DynamoDbSettings *DynamoDbSettings `type:"structure"` @@ -7966,6 +8049,12 @@ func (s *Endpoint) SetDatabaseName(v string) *Endpoint { return s } +// SetDmsTransferSettings sets the DmsTransferSettings field's value. +func (s *Endpoint) SetDmsTransferSettings(v *DmsTransferSettings) *Endpoint { + s.DmsTransferSettings = v + return s +} + // SetDynamoDbSettings sets the DynamoDbSettings field's value. func (s *Endpoint) SetDynamoDbSettings(v *DynamoDbSettings) *Endpoint { s.DynamoDbSettings = v @@ -8495,6 +8584,27 @@ type ModifyEndpointInput struct { // The name of the endpoint database. DatabaseName *string `type:"string"` + // The settings in JSON format for the DMS Transfer type source endpoint. + // + // Attributes include: + // + // * serviceAccessRoleArn - The IAM role that has permission to access the + // Amazon S3 bucket. + // + // * BucketName - The name of the S3 bucket to use. + // + // * compressionType - An optional parameter to use GZIP to compress the + // target files. Set to NONE (the default) or do not use to leave the files + // uncompressed. + // + // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string + // + // JSON syntax: + // + // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": + // "none"|"gzip" } + DmsTransferSettings *DmsTransferSettings `type:"structure"` + // Settings in JSON format for the target Amazon DynamoDB endpoint. For more // information about the available settings, see the Using Object Mapping to // Migrate Data to DynamoDB section at Using an Amazon DynamoDB Database as @@ -8601,6 +8711,12 @@ func (s *ModifyEndpointInput) SetDatabaseName(v string) *ModifyEndpointInput { return s } +// SetDmsTransferSettings sets the DmsTransferSettings field's value. +func (s *ModifyEndpointInput) SetDmsTransferSettings(v *DmsTransferSettings) *ModifyEndpointInput { + s.DmsTransferSettings = v + return s +} + // SetDynamoDbSettings sets the DynamoDbSettings field's value. func (s *ModifyEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *ModifyEndpointInput { s.DynamoDbSettings = v @@ -9105,6 +9221,8 @@ type ModifyReplicationTaskInput struct { // Indicates the start time for a change data capture (CDC) operation. Use either // CdcStartTime or CdcStartPosition to specify when you want a CDC operation // to start. Specifying both values results in an error. + // + // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` // Indicates when you want a change data capture (CDC) operation to stop. The @@ -9683,7 +9801,16 @@ func (s *RefreshSchemasStatus) SetStatus(v string) *RefreshSchemasStatus { type ReloadTablesInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the replication instance. + // Options for reload. Specify data-reload to reload the data and re-validate + // it if validation is enabled. Specify validate-only to re-validate the table. + // This option applies only when validation is enabled for the task. + // + // Valid values: data-reload, validate-only + // + // Default value is data-reload. + ReloadOption *string `type:"string" enum:"ReloadOptionValue"` + + // The Amazon Resource Name (ARN) of the replication task. // // ReplicationTaskArn is a required field ReplicationTaskArn *string `type:"string" required:"true"` @@ -9720,6 +9847,12 @@ func (s *ReloadTablesInput) Validate() error { return nil } +// SetReloadOption sets the ReloadOption field's value. +func (s *ReloadTablesInput) SetReloadOption(v string) *ReloadTablesInput { + s.ReloadOption = &v + return s +} + // SetReplicationTaskArn sets the ReplicationTaskArn field's value. func (s *ReloadTablesInput) SetReplicationTaskArn(v string) *ReloadTablesInput { s.ReplicationTaskArn = &v @@ -10259,7 +10392,7 @@ type ReplicationTask struct { // The date the replication task was created. ReplicationTaskCreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` - // The replication task identifier. + // The user-assigned replication task identifier or name. // // Constraints: // @@ -10718,6 +10851,8 @@ type StartReplicationTaskInput struct { // Indicates the start time for a change data capture (CDC) operation. Use either // CdcStartTime or CdcStartPosition to specify when you want a CDC operation // to start. Specifying both values results in an error. + // + // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` // Indicates when you want a change data capture (CDC) operation to stop. The @@ -11049,6 +11184,9 @@ type TableStatistics struct { // * Error—The table could not be validated because of an unexpected error. ValidationState *string `type:"string"` + // Additional details about the state of validation. + ValidationStateDetails *string `type:"string"` + // The number of records that could not be validated. ValidationSuspendedRecords *int64 `type:"long"` } @@ -11147,6 +11285,12 @@ func (s *TableStatistics) SetValidationState(v string) *TableStatistics { return s } +// SetValidationStateDetails sets the ValidationStateDetails field's value. +func (s *TableStatistics) SetValidationStateDetails(v string) *TableStatistics { + s.ValidationStateDetails = &v + return s +} + // SetValidationSuspendedRecords sets the ValidationSuspendedRecords field's value. func (s *TableStatistics) SetValidationSuspendedRecords(v int64) *TableStatistics { s.ValidationSuspendedRecords = &v @@ -11401,6 +11545,14 @@ const ( RefreshSchemasStatusTypeValueRefreshing = "refreshing" ) +const ( + // ReloadOptionValueDataReload is a ReloadOptionValue enum value + ReloadOptionValueDataReload = "data-reload" + + // ReloadOptionValueValidateOnly is a ReloadOptionValue enum value + ReloadOptionValueValidateOnly = "validate-only" +) + const ( // ReplicationEndpointTypeValueSource is a ReplicationEndpointTypeValue enum value ReplicationEndpointTypeValueSource = "source" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index b48e40e205c..157c3f9dbbb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -373,9 +373,8 @@ func (c *EC2) AllocateHostsRequest(input *AllocateHostsInput) (req *request.Requ // AllocateHosts API operation for Amazon Elastic Compute Cloud. // -// Allocates a Dedicated Host to your account. At minimum you need to specify -// the instance size type, Availability Zone, and quantity of hosts you want -// to allocate. +// Allocates a Dedicated Host to your account. At a minimum, specify the instance +// size type, Availability Zone, and quantity of hosts to allocate. // // 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 @@ -1374,8 +1373,6 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques // the product. For example, you can't detach a volume from a Windows instance // and attach it to a Linux instance. // -// For an overview of the AWS Marketplace, see Introducing AWS Marketplace (https://aws.amazon.com/marketplace/help/200900000). -// // For more information about EBS volumes, see Attaching Amazon EBS Volumes // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -2590,7 +2587,7 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Reques // To copy an encrypted snapshot that has been shared from another account, // you must have permissions for the CMK used to encrypt the snapshot. // -// Snapshots created by the CopySnapshot action have an arbitrary volume ID +// Snapshots created by copying another snapshot have an arbitrary volume ID // that should not be used for any purpose. // // For more information, see Copying an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) @@ -4731,7 +4728,8 @@ func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Re // protected. // // You can tag your snapshots during creation. For more information, see Tagging -// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). +// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) +// in the Amazon Elastic Compute Cloud User Guide. // // For more information, see Amazon Elastic Block Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) // and Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) @@ -5085,7 +5083,8 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques // in the Amazon Elastic Compute Cloud User Guide. // // You can tag your volumes during creation. For more information, see Tagging -// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). +// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) +// in the Amazon Elastic Compute Cloud User Guide. // // For more information, see Creating an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -6081,12 +6080,11 @@ func (c *EC2) DeleteFleetsRequest(input *DeleteFleetsInput) (req *request.Reques // // Deletes the specified EC2 Fleet. // -// After you delete an EC2 Fleet, the EC2 Fleet launches no new instances. You -// must specify whether the EC2 Fleet should also terminate its instances. If -// you terminate the instances, the EC2 Fleet enters the deleted_terminating -// state. Otherwise, the EC2 Fleet enters the deleted_running state, and the -// instances continue to run until they are interrupted or you terminate them -// manually. +// After you delete an EC2 Fleet, it launches no new instances. You must specify +// whether an EC2 Fleet should also terminate its instances. If you terminate +// the instances, the EC2 Fleet enters the deleted_terminating state. Otherwise, +// the EC2 Fleet enters the deleted_running state, and the instances continue +// to run until they are interrupted or you terminate them manually. // // 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 @@ -7638,7 +7636,7 @@ func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Reques // Deletes the specified EBS volume. The volume must be in the available state // (not attached to an instance). // -// The volume may remain in the deleting state for several minutes. +// The volume can remain in the deleting state for several minutes. // // For more information, see Deleting an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -9527,7 +9525,7 @@ func (c *EC2) DescribeFleetsRequest(input *DescribeFleetsInput) (req *request.Re // DescribeFleets API operation for Amazon Elastic Compute Cloud. // -// Describes the specified EC2 Fleet. +// Describes one or more of your EC2 Fleet. // // 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 @@ -11974,7 +11972,8 @@ func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req * // the prefix list name and prefix list ID of the service and the IP address // range for the service. A prefix list ID is required for creating an outbound // security group rule that allows traffic from a VPC to access an AWS service -// through a gateway VPC endpoint. +// through a gateway VPC endpoint. Currently, the services that support this +// action are Amazon S3 and Amazon DynamoDB. // // 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 @@ -14279,8 +14278,9 @@ func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req // status of the volume is ok. If the check fails, the overall status is impaired. // If the status is insufficient-data, then the checks may still be taking place // on your volume at the time. We recommend that you retry the request. For -// more information on volume status, see Monitoring the Status of Your Volumes -// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html). +// more information about volume status, see Monitoring the Status of Your Volumes +// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html) +// in the Amazon Elastic Compute Cloud User Guide. // // Events: Reflect the cause of a volume status and may require you to take // action. For example, if your volume returns an impaired status, then the @@ -14572,7 +14572,8 @@ func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModifica // You can also use CloudWatch Events to check the status of a modification // to an EBS volume. For information about CloudWatch Events, see the Amazon // CloudWatch Events User Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). -// For more information, see Monitoring Volume Modifications" (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods). +// For more information, see Monitoring Volume Modifications" (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods) +// in the Amazon Elastic Compute Cloud User Guide. // // 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 @@ -18861,7 +18862,7 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput // be made public. Snapshots encrypted with your default CMK cannot be shared // with other accounts. // -// For more information on modifying snapshot permissions, see Sharing Snapshots +// For more information about modifying snapshot permissions, see Sharing Snapshots // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -19134,10 +19135,9 @@ func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Reques // // With previous-generation instance types, resizing an EBS volume may require // detaching and reattaching the volume or stopping and restarting the instance. -// For more information about modifying an EBS volume running Linux, see Modifying -// the Size, IOPS, or Type of an EBS Volume on Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html). -// For more information about modifying an EBS volume running Windows, see Modifying -// the Size, IOPS, or Type of an EBS Volume on Windows (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html). +// For more information, see Modifying the Size, IOPS, or Type of an EBS Volume +// on Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html) +// and Modifying the Size, IOPS, or Type of an EBS Volume on Windows (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html). // // If you reach the maximum volume modification rate per volume limit, you will // need to wait at least six hours before applying further modifications to @@ -21754,7 +21754,7 @@ func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) // // Resets permission settings for the specified snapshot. // -// For more information on modifying snapshot permissions, see Sharing Snapshots +// For more information about modifying snapshot permissions, see Sharing Snapshots // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -23498,20 +23498,19 @@ type AllocateHostsInput struct { // AvailabilityZone is a required field AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) // in the Amazon Elastic Compute Cloud User Guide. ClientToken *string `locationName:"clientToken" type:"string"` - // Specify the instance type that you want your Dedicated Hosts to be configured - // for. When you specify the instance type, that is the only instance type that - // you can launch onto that host. + // Specify the instance type for which to configure your Dedicated Hosts. When + // you specify the instance type, that is the only instance type that you can + // launch onto that host. // // InstanceType is a required field InstanceType *string `locationName:"instanceType" type:"string" required:"true"` - // The number of Dedicated Hosts you want to allocate to your account with these - // parameters. + // The number of Dedicated Hosts to allocate to your account with these parameters. // // Quantity is a required field Quantity *int64 `locationName:"quantity" type:"integer" required:"true"` @@ -23580,8 +23579,8 @@ func (s *AllocateHostsInput) SetQuantity(v int64) *AllocateHostsInput { type AllocateHostsOutput struct { _ struct{} `type:"structure"` - // The ID of the allocated Dedicated Host. This is used when you want to launch - // an instance onto a specific host. + // The ID of the allocated Dedicated Host. This is used to launch an instance + // onto a specific host. HostIds []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` } @@ -27038,10 +27037,10 @@ type CopySnapshotInput struct { // copy operation. This parameter is only valid for specifying the destination // region in a PresignedUrl parameter, where it is required. // - // CopySnapshot sends the snapshot copy to the regional endpoint that you send - // the HTTP request to, such as ec2.us-east-1.amazonaws.com (in the AWS CLI, - // this is specified with the --region parameter or the default region in your - // AWS configuration file). + // The snapshot copy is sent to the regional endpoint that you sent the HTTP + // request to (for example, ec2.us-east-1.amazonaws.com). With the AWS CLI, + // this is specified using the --region parameter or the default region in your + // AWS configuration file. DestinationRegion *string `locationName:"destinationRegion" type:"string"` // Checks whether you have the required permissions for the action, without @@ -27707,7 +27706,10 @@ type CreateFleetInput struct { // this structure. SpotOptions *SpotOptionsRequest `type:"structure"` - // The tags for an EC2 Fleet resource. + // The key-value pair for tagging the EC2 Fleet request on creation. The value + // for ResourceType must be fleet, otherwise the fleet request fails. To tag + // instances at launch, specify the tags in the launch template (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). + // For information about tagging after launch, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` // The TotalTargetCapacity, OnDemandTargetCapacity, SpotTargetCapacity, and @@ -29167,16 +29169,6 @@ func (s *CreateNetworkInterfaceInput) Validate() error { if s.SubnetId == nil { invalidParams.Add(request.NewErrParamRequired("SubnetId")) } - if s.PrivateIpAddresses != nil { - for i, v := range s.PrivateIpAddresses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -30270,7 +30262,8 @@ type CreateVolumeInput struct { // The number of I/O operations per second (IOPS) to provision for the volume, // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 32000 IOPS for volumes - // in most regions. For exceptions, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). + // in most regions. For exceptions, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon Elastic Compute Cloud User Guide. // // This parameter is valid only for Provisioned IOPS SSD (io1) volumes. Iops *int64 `type:"integer"` @@ -34140,12 +34133,9 @@ type DescribeAddressesInput struct { // 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. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // [EC2-Classic] One or more Elastic IP addresses. @@ -34463,16 +34453,9 @@ type DescribeClassicLinkInstancesInput struct { // // * tag:key=value - The key/value combination of a tag assigned to the resource. // - // * 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC that the instance is linked to. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -34664,16 +34647,9 @@ type DescribeCustomerGatewaysInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` } @@ -34757,16 +34733,9 @@ type DescribeDhcpOptionsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` } @@ -35241,6 +35210,8 @@ type DescribeFleetInstancesInput struct { DryRun *bool `type:"boolean"` // One or more filters. + // + // * instance-type - The instance type. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The ID of the EC2 Fleet. @@ -35362,6 +35333,21 @@ type DescribeFleetsInput struct { DryRun *bool `type:"boolean"` // One or more filters. + // + // * activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment + // | pending-termination | fulfilled). + // + // * excess-capacity-termination-policy - Indicates whether to terminate + // running instances if the target capacity is decreased below the current + // EC2 Fleet size (true | false). + // + // * fleet-state - The state of the EC2 Fleet (submitted | active | deleted + // | failed | deleted-running | deleted-terminating | modifying). + // + // * replace-unhealthy-instances - Indicates whether EC2 Fleet should replace + // unhealthy instances (true | false). + // + // * type - The type of request (request | maintain). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The ID of the EC2 Fleets. @@ -35419,7 +35405,7 @@ func (s *DescribeFleetsInput) SetNextToken(v string) *DescribeFleetsInput { type DescribeFleetsOutput struct { _ struct{} `type:"structure"` - // The EC2 Fleets. + // Information about the EC2 Fleets. Fleets []*FleetData `locationName:"fleetSet" locationNameList:"item" type:"list"` // The token for the next set of results. @@ -35667,16 +35653,9 @@ type DescribeFpgaImagesInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * update-time - The time of the most recent update. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -36020,6 +35999,10 @@ type DescribeHostsInput struct { // // * state - The allocation state of the Dedicated Host (available | under-assessment // | permanent-failure | released | released-permanent-failure). + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filter []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches. @@ -36584,16 +36567,9 @@ type DescribeImagesInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * virtualization-type - The virtualization type (paravirtual | hvm). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -37581,15 +37557,9 @@ type DescribeInstancesInput struct { // 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. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * tenancy - The tenancy of an instance (dedicated | default | host). // @@ -37712,16 +37682,9 @@ type DescribeInternetGatewaysInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more Internet gateway IDs. @@ -37897,7 +37860,7 @@ type DescribeLaunchTemplateVersionsInput struct { // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 1000. + // value can be between 1 and 200. MaxResults *int64 `type:"integer"` // The version number up to which to describe launch template versions. @@ -38043,12 +38006,9 @@ type DescribeLaunchTemplatesInput struct { // 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. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more launch template IDs. @@ -38268,16 +38228,9 @@ type DescribeNatGatewaysInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC in which the NAT gateway resides. Filter []*Filter `locationNameList:"Filter" type:"list"` @@ -38418,16 +38371,9 @@ type DescribeNetworkAclsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the network ACL. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -38818,16 +38764,9 @@ type DescribeNetworkInterfacesInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the network interface. Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` @@ -39291,16 +39230,9 @@ type DescribeReservedInstancesInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * usage-price - The usage price of the Reserved Instance, per hour (for // example, 0.84). @@ -39875,16 +39807,9 @@ type DescribeRouteTablesInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the route table. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -40375,9 +40300,9 @@ type DescribeSecurityGroupsInput struct { // // * owner-id - The AWS account ID of the owner of the security group. // - // * tag-key - The key of a tag assigned to the security group. - // - // * tag-value - The value of a tag assigned to the security group. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC specified when the security group was created. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -40627,16 +40552,9 @@ type DescribeSnapshotsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * volume-id - The ID of the volume the snapshot is for. // @@ -41296,16 +41214,9 @@ type DescribeSpotInstanceRequestsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * type - The type of Spot Instance request (one-time | persistent). // @@ -41676,16 +41587,9 @@ type DescribeSubnetsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC for the subnet. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -41765,9 +41669,9 @@ type DescribeTagsInput struct { // * resource-id - The resource ID. // // * resource-type - The resource type (customer-gateway | dhcp-options | - // 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 + // elastic-ip | fleet | 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. @@ -42134,16 +42038,9 @@ type DescribeVolumesInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * volume-id - The volume ID. // @@ -42571,16 +42468,9 @@ type DescribeVpcClassicLinkInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more VPCs for which you want to describe the ClassicLink status. @@ -43336,16 +43226,9 @@ type DescribeVpcPeeringConnectionsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-peering-connection-id - The ID of the VPC peering connection. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -43454,16 +43337,9 @@ type DescribeVpcsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * vpc-id - The ID of the VPC. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -43562,16 +43438,9 @@ type DescribeVpnConnectionsInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * type - The type of VPN connection. Currently the only supported type // is ipsec.1. @@ -43671,16 +43540,9 @@ type DescribeVpnGatewaysInput struct { // 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 what the tag's key is). If you - // want to list only resources where Purpose is X, see the tag:key=value - // filter. - // - // * tag-value - The value of a tag assigned to the resource. This filter - // is independent of the tag-key filter. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. // // * type - The type of virtual private gateway. Currently the only supported // type is ipsec.1. @@ -45042,8 +44904,8 @@ type EbsBlockDevice struct { // Identifier (key ID, key alias, ID ARN, or alias ARN) for a user-managed CMK // under which the EBS volume is encrypted. // - // Note: This parameter is only supported on BlockDeviceMapping objects called - // by RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), + // This parameter is only supported on BlockDeviceMapping objects called by + // RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), // RequestSpotFleet (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html), // and RequestSpotInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html). KmsKeyId *string `type:"string"` @@ -47620,7 +47482,7 @@ func (s *HistoryRecord) SetTimestamp(v time.Time) *HistoryRecord { return s } -// Describes an event in the history of the EC2 Fleet. +// Describes an event in the history of an EC2 Fleet. type HistoryRecordEntry struct { _ struct{} `type:"structure"` @@ -47701,6 +47563,9 @@ type Host struct { // The Dedicated Host's state. State *string `locationName:"state" type:"string" enum:"AllocationState"` + + // Any tags assigned to the Dedicated Host. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -47779,6 +47644,12 @@ func (s *Host) SetState(v string) *Host { return s } +// SetTags sets the Tags field's value. +func (s *Host) SetTags(v []*Tag) *Host { + s.Tags = v + return s +} + // Describes an instance running on a Dedicated Host. type HostInstance struct { _ struct{} `type:"structure"` @@ -50855,26 +50726,6 @@ func (s InstanceNetworkInterfaceSpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *InstanceNetworkInterfaceSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InstanceNetworkInterfaceSpecification"} - if s.PrivateIpAddresses != nil { - for i, v := range s.PrivateIpAddresses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. func (s *InstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *InstanceNetworkInterfaceSpecification { s.AssociatePublicIpAddress = &v @@ -52059,6 +51910,75 @@ func (s *LaunchTemplateConfig) SetOverrides(v []*LaunchTemplateOverrides) *Launc return s } +// The CPU options for the instance. +type LaunchTemplateCpuOptions struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `locationName:"coreCount" type:"integer"` + + // The number of threads per CPU core. + ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` +} + +// String returns the string representation +func (s LaunchTemplateCpuOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateCpuOptions) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *LaunchTemplateCpuOptions) SetCoreCount(v int64) *LaunchTemplateCpuOptions { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *LaunchTemplateCpuOptions) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptions { + s.ThreadsPerCore = &v + return s +} + +// The CPU options for the instance. Both the core count and threads per core +// must be specified in the request. +type LaunchTemplateCpuOptionsRequest struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `type:"integer"` + + // The number of threads per CPU core. To disable Intel Hyper-Threading Technology + // for the instance, specify a value of 1. Otherwise, specify the default value + // of 2. + ThreadsPerCore *int64 `type:"integer"` +} + +// String returns the string representation +func (s LaunchTemplateCpuOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateCpuOptionsRequest) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *LaunchTemplateCpuOptionsRequest) SetCoreCount(v int64) *LaunchTemplateCpuOptionsRequest { + s.CoreCount = &v + return s +} + +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *LaunchTemplateCpuOptionsRequest) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptionsRequest { + s.ThreadsPerCore = &v + return s +} + // Describes a block device for an EBS volume. type LaunchTemplateEbsBlockDevice struct { _ struct{} `type:"structure"` @@ -52539,26 +52459,6 @@ func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) GoString() s return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateInstanceNetworkInterfaceSpecificationRequest"} - if s.PrivateIpAddresses != nil { - for i, v := range s.PrivateIpAddresses { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { s.AssociatePublicIpAddress = &v @@ -53045,7 +52945,8 @@ type LaunchTemplateTagSpecificationRequest struct { _ struct{} `type:"structure"` // The type of resource to tag. Currently, the resource types that support tagging - // on creation are instance and volume. + // on creation are instance and volume. To tag a resource after it has been + // created, see CreateTags. ResourceType *string `type:"string" enum:"ResourceType"` // The tags to apply to the resource. @@ -54743,9 +54644,8 @@ func (s *ModifyReservedInstancesOutput) SetReservedInstancesModificationId(v str type ModifySnapshotAttributeInput struct { _ struct{} `type:"structure"` - // The snapshot attribute to modify. - // - // Only volume creation permissions may be modified at the customer level. + // The snapshot attribute to modify. Only volume creation permissions can be + // modified. Attribute *string `type:"string" enum:"SnapshotAttributeName"` // A JSON representation of the snapshot attribute modification. @@ -55098,19 +54998,17 @@ type ModifyVolumeInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // Target IOPS rate of the volume to be modified. + // The target IOPS rate of the volume. // - // Only valid for Provisioned IOPS SSD (io1) volumes. For more information about - // io1 IOPS configuration, see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops). + // This is only valid for Provisioned IOPS SSD (io1) volumes. For more information, + // see Provisioned IOPS SSD (io1) Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops). // // Default: If no IOPS value is specified, the existing value is retained. Iops *int64 `type:"integer"` - // Target size in GiB of the volume to be modified. Target volume size must - // be greater than or equal to than the existing size of the volume. For information - // about available EBS volume sizes, see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). + // The target size of the volume, in GiB. The target volume size must be greater + // than or equal to than the existing size of the volume. For information about + // available EBS volume sizes, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). // // Default: If no size is specified, the existing size is retained. Size *int64 `type:"integer"` @@ -55120,10 +55018,7 @@ type ModifyVolumeInput struct { // VolumeId is a required field VolumeId *string `type:"string" required:"true"` - // Target EBS volume type of the volume to be modified - // - // The API does not support modifications for volume type standard. You also - // cannot change the type of a volume to standard. + // The target EBS volume type of the volume. // // Default: If no type is specified, the existing type is retained. VolumeType *string `type:"string" enum:"VolumeType"` @@ -55185,7 +55080,7 @@ func (s *ModifyVolumeInput) SetVolumeType(v string) *ModifyVolumeInput { type ModifyVolumeOutput struct { _ struct{} `type:"structure"` - // A VolumeModification object. + // Information about the volume modification. VolumeModification *VolumeModification `locationName:"volumeModification" type:"structure"` } @@ -57675,9 +57570,7 @@ type PrivateIpAddressSpecification struct { Primary *bool `locationName:"primary" type:"boolean"` // The private IPv4 addresses. - // - // PrivateIpAddress is a required field - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string" required:"true"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` } // String returns the string representation @@ -57690,19 +57583,6 @@ func (s PrivateIpAddressSpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *PrivateIpAddressSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PrivateIpAddressSpecification"} - if s.PrivateIpAddress == nil { - invalidParams.Add(request.NewErrParamRequired("PrivateIpAddress")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetPrimary sets the Primary field's value. func (s *PrivateIpAddressSpecification) SetPrimary(v bool) *PrivateIpAddressSpecification { s.Primary = &v @@ -59671,6 +59551,11 @@ type RequestLaunchTemplateData struct { // cannot be changed using this action. BlockDeviceMappings []*LaunchTemplateBlockDeviceMappingRequest `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *LaunchTemplateCpuOptionsRequest `type:"structure"` + // The credit option for CPU usage of the instance. Valid for T2 instances only. CreditSpecification *CreditSpecificationRequest `type:"structure"` @@ -59747,9 +59632,10 @@ type RequestLaunchTemplateData struct { // group ID and security name in the same request. SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` - // The tags to apply to the resources during launch. You can tag instances and - // volumes. The specified tags are applied to all instances or volumes that - // are created during launch. + // The tags to apply to the resources during launch. You can only tag instances + // and volumes on launch. The specified tags are applied to all instances or + // volumes that are created during launch. To tag a resource after it has been + // created, see CreateTags. TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"` // The Base64-encoded user data to make available to the instance. For more @@ -59787,16 +59673,6 @@ func (s *RequestLaunchTemplateData) Validate() error { } } } - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -59810,6 +59686,12 @@ func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBl return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *RequestLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptionsRequest) *RequestLaunchTemplateData { + s.CpuOptions = v + return s +} + // SetCreditSpecification sets the CreditSpecification field's value. func (s *RequestLaunchTemplateData) SetCreditSpecification(v *CreditSpecificationRequest) *RequestLaunchTemplateData { s.CreditSpecification = v @@ -60302,16 +60184,6 @@ func (s *RequestSpotLaunchSpecification) Validate() error { invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) } } - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -61688,6 +61560,11 @@ type ResponseLaunchTemplateData struct { // The block device mappings. BlockDeviceMappings []*LaunchTemplateBlockDeviceMapping `locationName:"blockDeviceMappingSet" locationNameList:"item" type:"list"` + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *LaunchTemplateCpuOptions `locationName:"cpuOptions" type:"structure"` + // The credit option for CPU usage of the instance. CreditSpecification *CreditSpecification `locationName:"creditSpecification" type:"structure"` @@ -61764,6 +61641,12 @@ func (s *ResponseLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateB return s } +// SetCpuOptions sets the CpuOptions field's value. +func (s *ResponseLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptions) *ResponseLaunchTemplateData { + s.CpuOptions = v + return s +} + // SetCreditSpecification sets the CreditSpecification field's value. func (s *ResponseLaunchTemplateData) SetCreditSpecification(v *CreditSpecification) *ResponseLaunchTemplateData { s.CreditSpecification = v @@ -62664,9 +62547,10 @@ type RunInstancesInput struct { // [EC2-VPC] The ID of the subnet to launch the instance into. SubnetId *string `type:"string"` - // The tags to apply to the resources during launch. You can tag instances and - // volumes. The specified tags are applied to all instances or volumes that - // are created during launch. + // The tags to apply to the resources during launch. You can only tag instances + // and volumes on launch. The specified tags are applied to all instances or + // volumes that are created during launch. To tag a resource after it has been + // created, see CreateTags. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` // The user data to make available to the instance. For more information, see @@ -62717,16 +62601,6 @@ func (s *RunInstancesInput) Validate() error { invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) } } - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -65177,26 +65051,6 @@ func (s SpotFleetLaunchSpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *SpotFleetLaunchSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SpotFleetLaunchSpecification"} - if s.NetworkInterfaces != nil { - for i, v := range s.NetworkInterfaces { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetAddressingType sets the AddressingType field's value. func (s *SpotFleetLaunchSpecification) SetAddressingType(v string) *SpotFleetLaunchSpecification { s.AddressingType = &v @@ -65519,16 +65373,6 @@ func (s *SpotFleetRequestConfigData) Validate() error { if s.TargetCapacity == nil { invalidParams.Add(request.NewErrParamRequired("TargetCapacity")) } - if s.LaunchSpecifications != nil { - for i, v := range s.LaunchSpecifications { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchSpecifications", i), err.(request.ErrInvalidParams)) - } - } - } if s.LaunchTemplateConfigs != nil { for i, v := range s.LaunchTemplateConfigs { if v == nil { @@ -66968,7 +66812,8 @@ type TagSpecification struct { _ struct{} `type:"structure"` // The type of resource to tag. Currently, the resource types that support tagging - // on creation are instance, snapshot, and volume. + // on creation are fleet, instance, snapshot, and volume. To tag a resource + // after it has been created, see CreateTags. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tags to apply to the resource. @@ -68238,8 +68083,9 @@ type Volume struct { // For Provisioned IOPS SSD volumes, this represents the number of IOPS that // are provisioned for the volume. For General Purpose SSD volumes, this represents // the baseline performance of the volume and the rate at which the volume accumulates - // I/O credits for bursting. For more information on General Purpose SSD baseline - // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // I/O credits for bursting. For more information about General Purpose SSD + // baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // // Constraint: Range is 100-32000 IOPS for io1 volumes and 100-10000 IOPS for @@ -68470,41 +68316,41 @@ func (s *VolumeDetail) SetSize(v int64) *VolumeDetail { type VolumeModification struct { _ struct{} `type:"structure"` - // Modification completion or failure time. + // The modification completion or failure time. EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` - // Current state of modification. Modification state is null for unmodified + // The current modification state. The modification state is null for unmodified // volumes. ModificationState *string `locationName:"modificationState" type:"string" enum:"VolumeModificationState"` - // Original IOPS rate of the volume being modified. + // The original IOPS rate of the volume. OriginalIops *int64 `locationName:"originalIops" type:"integer"` - // Original size of the volume being modified. + // The original size of the volume. OriginalSize *int64 `locationName:"originalSize" type:"integer"` - // Original EBS volume type of the volume being modified. + // The original EBS volume type of the volume. OriginalVolumeType *string `locationName:"originalVolumeType" type:"string" enum:"VolumeType"` - // Modification progress from 0 to 100%. + // The modification progress, from 0 to 100 percent complete. Progress *int64 `locationName:"progress" type:"long"` - // Modification start time + // The modification start time. StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` - // Generic status message on modification progress or failure. + // A status message about the modification progress or failure. StatusMessage *string `locationName:"statusMessage" type:"string"` - // Target IOPS rate of the volume being modified. + // The target IOPS rate of the volume. TargetIops *int64 `locationName:"targetIops" type:"integer"` - // Target size of the volume being modified. + // The target size of the volume, in GiB. TargetSize *int64 `locationName:"targetSize" type:"integer"` - // Target EBS volume type of the volume being modified. + // The target EBS volume type of the volume. TargetVolumeType *string `locationName:"targetVolumeType" type:"string" enum:"VolumeType"` - // ID of the volume being modified. + // The ID of the volume. VolumeId *string `locationName:"volumeId" type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index fe60755aca1..6f81b681946 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -844,8 +844,8 @@ func (c *Glue) CreateCrawlerRequest(input *CreateCrawlerInput) (req *request.Req // CreateCrawler API operation for AWS Glue. // // Creates a new crawler with specified targets, role, configuration, and optional -// schedule. At least one crawl target must be specified, in either the s3Targets -// or the jdbcTargets field. +// schedule. At least one crawl target must be specified, in the s3Targets field, +// the jdbcTargets field, or the DynamoDBTargets field. // // 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 @@ -6027,7 +6027,7 @@ func (c *Glue) StartCrawlerRequest(input *StartCrawlerInput) (req *request.Reque // StartCrawler API operation for AWS Glue. // // Starts a crawl using the specified crawler, regardless of what is scheduled. -// If the crawler is already running, does nothing. +// If the crawler is already running, returns a CrawlerRunningException (https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-exceptions.html#aws-glue-api-exceptions-CrawlerRunningException). // // 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 @@ -8604,14 +8604,15 @@ func (s *CatalogImportStatus) SetImportedBy(v string) *CatalogImportStatus { return s } -// Classifiers are written in Python and triggered during a crawl task. You -// can write your own classifiers to best categorize your data sources and specify -// the appropriate schemas to use for them. A classifier checks whether a given -// file is in a format it can handle, and if it is, the classifier creates a -// schema in the form of a StructType object that matches that data format. +// Classifiers are triggered during a crawl task. A classifier checks whether +// a given file is in a format it can handle, and if it is, the classifier creates +// a schema in the form of a StructType object that matches that data format. // -// A classifier can be a grok classifier, an XML classifier, or a JSON classifier, -// asspecified in one of the fields in the Classifier object. +// You can use the standard classifiers that AWS Glue supplies, or you can write +// your own classifiers to best categorize your data sources and specify the +// appropriate schemas to use for them. A classifier can be a grok classifier, +// an XML classifier, or a JSON classifier, as specified in one of the fields +// in the Classifier object. type Classifier struct { _ struct{} `type:"structure"` @@ -9225,15 +9226,8 @@ type Crawler struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // If the crawler is running, contains the total time elapsed since the last @@ -9480,6 +9474,9 @@ func (s *CrawlerMetrics) SetTimeLeftSeconds(v float64) *CrawlerMetrics { type CrawlerTargets struct { _ struct{} `type:"structure"` + // Specifies DynamoDB targets. + DynamoDBTargets []*DynamoDBTarget `type:"list"` + // Specifies JDBC targets. JdbcTargets []*JdbcTarget `type:"list"` @@ -9497,6 +9494,12 @@ func (s CrawlerTargets) GoString() string { return s.String() } +// SetDynamoDBTargets sets the DynamoDBTargets field's value. +func (s *CrawlerTargets) SetDynamoDBTargets(v []*DynamoDBTarget) *CrawlerTargets { + s.DynamoDBTargets = v + return s +} + // SetJdbcTargets sets the JdbcTargets field's value. func (s *CrawlerTargets) SetJdbcTargets(v []*JdbcTarget) *CrawlerTargets { s.JdbcTargets = v @@ -9663,20 +9666,13 @@ type CreateCrawlerInput struct { _ struct{} `type:"structure"` // A list of custom classifiers that the user has registered. By default, all - // AWS classifiers are included in a crawl, but these custom classifiers always - // override the default classifiers for a given classification. + // built-in classifiers are included in a crawl, but these custom classifiers + // always override the default classifiers for a given classification. Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The AWS Glue database where results are written, such as: arn:aws:daylight:us-east-1::database/sometable/*. @@ -12267,6 +12263,30 @@ func (s *DevEndpointCustomLibraries) SetExtraPythonLibsS3Path(v string) *DevEndp return s } +// Specifies a DynamoDB table to crawl. +type DynamoDBTarget struct { + _ struct{} `type:"structure"` + + // The name of the DynamoDB table to crawl. + Path *string `type:"string"` +} + +// String returns the string representation +func (s DynamoDBTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DynamoDBTarget) GoString() string { + return s.String() +} + +// SetPath sets the Path field's value. +func (s *DynamoDBTarget) SetPath(v string) *DynamoDBTarget { + s.Path = &v + return s +} + // Contains details about an error. type ErrorDetail struct { _ struct{} `type:"structure"` @@ -15862,6 +15882,9 @@ func (s *LastCrawlInfo) SetStatus(v string) *LastCrawlInfo { type Location struct { _ struct{} `type:"structure"` + // A DynamoDB Table location. + DynamoDB []*CodeGenNodeArg `type:"list"` + // A JDBC location. Jdbc []*CodeGenNodeArg `type:"list"` @@ -15882,6 +15905,16 @@ func (s Location) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *Location) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Location"} + if s.DynamoDB != nil { + for i, v := range s.DynamoDB { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DynamoDB", i), err.(request.ErrInvalidParams)) + } + } + } if s.Jdbc != nil { for i, v := range s.Jdbc { if v == nil { @@ -15909,6 +15942,12 @@ func (s *Location) Validate() error { return nil } +// SetDynamoDB sets the DynamoDB field's value. +func (s *Location) SetDynamoDB(v []*CodeGenNodeArg) *Location { + s.DynamoDB = v + return s +} + // SetJdbc sets the Jdbc field's value. func (s *Location) SetJdbc(v []*CodeGenNodeArg) *Location { s.Jdbc = v @@ -18272,20 +18311,13 @@ type UpdateCrawlerInput struct { _ struct{} `type:"structure"` // A list of custom classifiers that the user has registered. By default, all - // classifiers are included in a crawl, but these custom classifiers always - // override the default classifiers for a given classification. + // built-in classifiers are included in a crawl, but these custom classifiers + // always override the default classifiers for a given classification. Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The AWS Glue database where results are stored, such as: arn:aws:daylight:us-east-1::database/sometable/*. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index 8babcb6868a..28ba4fc830f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -7170,6 +7170,9 @@ const ( // RuntimeDotnetcore20 is a Runtime enum value RuntimeDotnetcore20 = "dotnetcore2.0" + // RuntimeDotnetcore21 is a Runtime enum value + RuntimeDotnetcore21 = "dotnetcore2.1" + // RuntimeNodejs43Edge is a Runtime enum value RuntimeNodejs43Edge = "nodejs4.3-edge" diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go index 576c5431001..3364552ebfd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go @@ -1522,6 +1522,272 @@ func (c *MediaConvert) ListQueuesWithContext(ctx aws.Context, input *ListQueuesI return out, req.Send() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListTagsForResource +func (c *MediaConvert) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/tags/{arn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Elemental MediaConvert. +// +// Retrieve the tags for a MediaConvert resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListTagsForResource +func (c *MediaConvert) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TagResource +func (c *MediaConvert) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/tags", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// TagResource API operation for AWS Elemental MediaConvert. +// +// Tag a MediaConvert queue, preset, or job template. For information about +// these resource types, see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TagResource +func (c *MediaConvert) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UntagResource +func (c *MediaConvert) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/2017-08-29/tags", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UntagResource API operation for AWS Elemental MediaConvert. +// +// Untag a MediaConvert queue, preset, or job template. For information about +// these resource types, see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UntagResource +func (c *MediaConvert) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateJobTemplate = "UpdateJobTemplate" // UpdateJobTemplateRequest generates a "aws/request.Request" representing the @@ -4226,6 +4492,10 @@ type CreateJobTemplateInput struct { // // Settings is a required field Settings *JobTemplateSettings `locationName:"settings" type:"structure" required:"true"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + Tags map[string]*string `locationName:"tags" type:"map"` } // String returns the string representation @@ -4289,6 +4559,12 @@ func (s *CreateJobTemplateInput) SetSettings(v *JobTemplateSettings) *CreateJobT return s } +// SetTags sets the Tags field's value. +func (s *CreateJobTemplateInput) SetTags(v map[string]*string) *CreateJobTemplateInput { + s.Tags = v + return s +} + // Successful create job template requests will return the template JSON. type CreateJobTemplateOutput struct { _ struct{} `type:"structure"` @@ -4334,6 +4610,10 @@ type CreatePresetInput struct { // // Settings is a required field Settings *PresetSettings `locationName:"settings" type:"structure" required:"true"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + Tags map[string]*string `locationName:"tags" type:"map"` } // String returns the string representation @@ -4391,6 +4671,12 @@ func (s *CreatePresetInput) SetSettings(v *PresetSettings) *CreatePresetInput { return s } +// SetTags sets the Tags field's value. +func (s *CreatePresetInput) SetTags(v map[string]*string) *CreatePresetInput { + s.Tags = v + return s +} + // Successful create preset requests will return the preset JSON. type CreatePresetOutput struct { _ struct{} `type:"structure"` @@ -4427,6 +4713,10 @@ type CreateQueueInput struct { // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + Tags map[string]*string `locationName:"tags" type:"map"` } // String returns the string representation @@ -4464,6 +4754,12 @@ func (s *CreateQueueInput) SetName(v string) *CreateQueueInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateQueueInput) SetTags(v map[string]*string) *CreateQueueInput { + s.Tags = v + return s +} + // Successful create queue requests will return the name of the queue you just // created and information about it. type CreateQueueOutput struct { @@ -9163,7 +9459,7 @@ type ListJobTemplatesInput struct { // Optional. Number of job templates, up to twenty, that will be returned at // one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // Use this string, provided with the response to a previous request, to request // the next batch of job templates. @@ -9184,6 +9480,19 @@ func (s ListJobTemplatesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListJobTemplatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListJobTemplatesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetCategory sets the Category field's value. func (s *ListJobTemplatesInput) SetCategory(v string) *ListJobTemplatesInput { s.Category = &v @@ -9257,7 +9566,7 @@ type ListJobsInput struct { _ struct{} `type:"structure"` // Optional. Number of jobs, up to twenty, that will be returned at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // Use this string, provided with the response to a previous request, to request // the next batch of jobs. @@ -9284,6 +9593,19 @@ func (s ListJobsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetMaxResults sets the MaxResults field's value. func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput { s.MaxResults = &v @@ -9366,7 +9688,7 @@ type ListPresetsInput struct { ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"PresetListBy"` // Optional. Number of presets, up to twenty, that will be returned at one time - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // Use this string, provided with the response to a previous request, to request // the next batch of presets. @@ -9387,6 +9709,19 @@ func (s ListPresetsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPresetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPresetsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetCategory sets the Category field's value. func (s *ListPresetsInput) SetCategory(v string) *ListPresetsInput { s.Category = &v @@ -9463,7 +9798,7 @@ type ListQueuesInput struct { ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"QueueListBy"` // Optional. Number of queues, up to twenty, that will be returned at one time. - MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` // Use this string, provided with the response to a previous request, to request // the next batch of queues. @@ -9484,6 +9819,19 @@ func (s ListQueuesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListQueuesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListQueuesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetListBy sets the ListBy field's value. func (s *ListQueuesInput) SetListBy(v string) *ListQueuesInput { s.ListBy = &v @@ -9542,6 +9890,73 @@ func (s *ListQueuesOutput) SetQueues(v []*Queue) *ListQueuesOutput { return s } +// List the tags for your MediaConvert resource by sending a request with the +// Amazon Resource Name (ARN) of the resource. To get the ARN, send a GET request +// with the resource name. +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to list tags + // for. To get the ARN, send a GET request with the resource name. + // + // Arn is a required field + Arn *string `location:"uri" locationName:"arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { + s.Arn = &v + return s +} + +// Successful list tags for resource requests return a JSON map of tags. +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) and tags for an AWS Elemental MediaConvert + // resource. + ResourceTags *ResourceTags `locationName:"resourceTags" type:"structure"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetResourceTags sets the ResourceTags field's value. +func (s *ListTagsForResourceOutput) SetResourceTags(v *ResourceTags) *ListTagsForResourceOutput { + s.ResourceTags = v + return s +} + // Settings for M2TS Container. type M2tsSettings struct { _ struct{} `type:"structure"` @@ -11891,11 +12306,17 @@ type Queue struct { // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` + // Estimated number of jobs in PROGRESSING status. + ProgressingJobsCount *int64 `locationName:"progressingJobsCount" type:"integer"` + // Queues can be ACTIVE or PAUSED. If you pause a queue, jobs in that queue // will not begin. Jobs running when a queue is paused continue to run until // they finish or error out. Status *string `locationName:"status" type:"string" enum:"QueueStatus"` + // Estimated number of jobs in SUBMITTED status. + SubmittedJobsCount *int64 `locationName:"submittedJobsCount" type:"integer"` + // A queue can be of two types: system or custom. System or built-in queues // can't be modified or deleted by the user. Type *string `locationName:"type" type:"string" enum:"Type"` @@ -11941,12 +12362,24 @@ func (s *Queue) SetName(v string) *Queue { return s } +// SetProgressingJobsCount sets the ProgressingJobsCount field's value. +func (s *Queue) SetProgressingJobsCount(v int64) *Queue { + s.ProgressingJobsCount = &v + return s +} + // SetStatus sets the Status field's value. func (s *Queue) SetStatus(v string) *Queue { s.Status = &v return s } +// SetSubmittedJobsCount sets the SubmittedJobsCount field's value. +func (s *Queue) SetSubmittedJobsCount(v int64) *Queue { + s.SubmittedJobsCount = &v + return s +} + // SetType sets the Type field's value. func (s *Queue) SetType(v string) *Queue { s.Type = &v @@ -12134,6 +12567,40 @@ func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { return s } +// The Amazon Resource Name (ARN) and tags for an AWS Elemental MediaConvert +// resource. +type ResourceTags struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. + Arn *string `locationName:"arn" type:"string"` + + // The tags for the resource. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s ResourceTags) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceTags) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ResourceTags) SetArn(v string) *ResourceTags { + s.Arn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ResourceTags) SetTags(v map[string]*string) *ResourceTags { + s.Tags = v + return s +} + // Settings for SCC caption output. type SccDestinationSettings struct { _ struct{} `type:"structure"` @@ -12307,6 +12774,77 @@ func (s *StaticKeyProvider) SetUrl(v string) *StaticKeyProvider { return s } +// To tag a queue, preset, or job template, send a request with the tags and +// the Amazon Resource Name (ARN) of the resource that you want to tag. +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to tag. To get + // the ARN, send a GET request with the resource name. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + // + // Tags is a required field + Tags map[string]*string `locationName:"tags" type:"map" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *TagResourceInput) SetArn(v string) *TagResourceInput { + s.Arn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { + s.Tags = v + return s +} + +// Successful tag resource requests return an OK message. +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + // Settings for Teletext caption output type TeletextDestinationSettings struct { _ struct{} `type:"structure"` @@ -12649,6 +13187,56 @@ func (s *TtmlDestinationSettings) SetStylePassthrough(v string) *TtmlDestination return s } +// To remove tags from a resource, send a request with the Amazon Resource Name +// (ARN) of the resource and the keys of the tags that you want to remove. +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to remove tags + // from. To get the ARN, send a GET request with the resource name. + Arn *string `locationName:"arn" type:"string"` + + // The keys of the tags that you want to remove from the resource. + TagKeys []*string `locationName:"tagKeys" type:"list"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { + s.Arn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +// Successful untag resource requests return an OK message. +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + // Modify a job template by sending a request with the job template name and // any of the following that you wish to change: description, category, and // queue. diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go index 51065004df1..9fac484cfee 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go @@ -437,8 +437,8 @@ func (c *OpsWorks) CloneStackRequest(input *CloneStackInput) (req *request.Reque // By default, all parameters are set to the values used by the parent stack. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -882,8 +882,8 @@ func (c *OpsWorks) CreateStackRequest(input *CreateStackInput) (req *request.Req // Creates a new stack. For more information, see Create a New Stack (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-edit.html). // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -965,8 +965,8 @@ func (c *OpsWorks) CreateUserProfileRequest(input *CreateUserProfileInput) (req // Creates a new user profile. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1413,8 +1413,8 @@ func (c *OpsWorks) DeleteUserProfileRequest(input *DeleteUserProfileInput) (req // Deletes a user profile. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1679,8 +1679,8 @@ func (c *OpsWorks) DeregisterInstanceRequest(input *DeregisterInstanceInput) (re // DeregisterInstance API operation for AWS OpsWorks. // // Deregister a registered Amazon EC2 or on-premises instance. This action removes -// the instance from the stack and returns it to your control. This action can -// not be used with instances that were created with AWS OpsWorks Stacks. +// the instance from the stack and returns it to your control. This action cannot +// be used with instances that were created with AWS OpsWorks Stacks. // // Required Permissions: To use this action, an IAM user must have a Manage // permissions level for the stack or an attached policy that explicitly grants @@ -2036,7 +2036,7 @@ func (c *OpsWorks) DescribeAppsRequest(input *DescribeAppsInput) (req *request.R // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2125,7 +2125,7 @@ func (c *OpsWorks) DescribeCommandsRequest(input *DescribeCommandsInput) (req *r // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2214,7 +2214,7 @@ func (c *OpsWorks) DescribeDeploymentsRequest(input *DescribeDeploymentsInput) ( // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2310,7 +2310,7 @@ func (c *OpsWorks) DescribeEcsClustersRequest(input *DescribeEcsClustersInput) ( // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack or an attached policy that explicitly -// grants permission. For more information on user permissions, see Managing +// grants permission. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // This call accepts only one resource-identifying parameter. @@ -2451,7 +2451,7 @@ func (c *OpsWorks) DescribeElasticIpsRequest(input *DescribeElasticIpsInput) (re // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2540,7 +2540,7 @@ func (c *OpsWorks) DescribeElasticLoadBalancersRequest(input *DescribeElasticLoa // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2629,7 +2629,7 @@ func (c *OpsWorks) DescribeInstancesRequest(input *DescribeInstancesInput) (req // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2718,7 +2718,7 @@ func (c *OpsWorks) DescribeLayersRequest(input *DescribeLayersInput) (req *reque // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2807,7 +2807,7 @@ func (c *OpsWorks) DescribeLoadBasedAutoScalingRequest(input *DescribeLoadBasedA // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2894,7 +2894,7 @@ func (c *OpsWorks) DescribeMyUserProfileRequest(input *DescribeMyUserProfileInpu // // Required Permissions: To use this action, an IAM user must have self-management // enabled or an attached policy that explicitly grants permissions. For more -// information on user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// information about user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3135,7 +3135,7 @@ func (c *OpsWorks) DescribeRaidArraysRequest(input *DescribeRaidArraysInput) (re // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3222,7 +3222,7 @@ func (c *OpsWorks) DescribeRdsDbInstancesRequest(input *DescribeRdsDbInstancesIn // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // This call accepts only one resource-identifying parameter. @@ -3311,7 +3311,7 @@ func (c *OpsWorks) DescribeServiceErrorsRequest(input *DescribeServiceErrorsInpu // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // This call accepts only one resource-identifying parameter. @@ -3400,7 +3400,7 @@ func (c *OpsWorks) DescribeStackProvisioningParametersRequest(input *DescribeSta // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3488,7 +3488,7 @@ func (c *OpsWorks) DescribeStackSummaryRequest(input *DescribeStackSummaryInput) // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3575,7 +3575,7 @@ func (c *OpsWorks) DescribeStacksRequest(input *DescribeStacksInput) (req *reque // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3664,7 +3664,7 @@ func (c *OpsWorks) DescribeTimeBasedAutoScalingRequest(input *DescribeTimeBasedA // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3750,8 +3750,8 @@ func (c *OpsWorks) DescribeUserProfilesRequest(input *DescribeUserProfilesInput) // Describe specified users. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3839,7 +3839,7 @@ func (c *OpsWorks) DescribeVolumesRequest(input *DescribeVolumesInput) (req *req // // Required Permissions: To use this action, an IAM user must have a Show, Deploy, // or Manage permissions level for the stack, or an attached policy that explicitly -// grants permissions. For more information on user permissions, see Managing +// grants permissions. For more information about user permissions, see Managing // User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5627,14 +5627,14 @@ func (c *OpsWorks) UnassignInstanceRequest(input *UnassignInstanceInput) (req *r // UnassignInstance API operation for AWS OpsWorks. // -// Unassigns a registered instance from all of it's layers. The instance remains -// in the stack as an unassigned instance and can be assigned to another layer, -// as needed. You cannot use this action with instances that were created with -// AWS OpsWorks Stacks. +// Unassigns a registered instance from all layers that are using the instance. +// The instance remains in the stack as an unassigned instance, and can be assigned +// to another layer as needed. You cannot use this action with instances that +// were created with AWS OpsWorks Stacks. // // Required Permissions: To use this action, an IAM user must have a Manage // permissions level for the stack or an attached policy that explicitly grants -// permissions. For more information on user permissions, see Managing User +// permissions. For more information about user permissions, see Managing User // Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6254,7 +6254,7 @@ func (c *OpsWorks) UpdateMyUserProfileRequest(input *UpdateMyUserProfileInput) ( // // Required Permissions: To use this action, an IAM user must have self-management // enabled or an attached policy that explicitly grants permissions. For more -// information on user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// information about user permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -6516,8 +6516,8 @@ func (c *OpsWorks) UpdateUserProfileRequest(input *UpdateUserProfileInput) (req // Updates a specified user profile. // // Required Permissions: To use this action, an IAM user must have an attached -// policy that explicitly grants permissions. For more information on user permissions, -// see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). +// policy that explicitly grants permissions. For more information about user +// permissions, see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -7027,8 +7027,8 @@ type AttachElasticLoadBalancerInput struct { // ElasticLoadBalancerName is a required field ElasticLoadBalancerName *string `type:"string" required:"true"` - // The ID of the layer that the Elastic Load Balancing instance is to be attached - // to. + // The ID of the layer to which the Elastic Load Balancing instance is to be + // attached. // // LayerId is a required field LayerId *string `type:"string" required:"true"` @@ -7343,8 +7343,8 @@ type CloneStackInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html) + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html) CustomJson *string `type:"string"` // The cloned stack's default Availability Zone, which must be in the specified @@ -7376,11 +7376,11 @@ type CloneStackInput struct { // Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web. // // * A custom AMI: Custom. You specify the custom AMI you want to use when - // you create instances. For more information on how to use custom AMIs with - // OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). + // you create instances. For more information about how to use custom AMIs + // with OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // The default option is the parent stack's operating system. For more information - // on the supported operating systems, see AWS OpsWorks Stacks Operating Systems + // about supported operating systems, see AWS OpsWorks Stacks Operating Systems // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). // // You can specify a different Linux operating system for the cloned stack, @@ -7515,9 +7515,9 @@ type CloneStackInput struct { // // * You must specify a value for DefaultSubnetId. // - // For more information on how to use AWS OpsWorks Stacks with a VPC, see Running - // a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). - // For more information on default VPC and EC2 Classic, see Supported Platforms + // For more information about how to use AWS OpsWorks Stacks with a VPC, see + // Running a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). + // For more information about default VPC and EC2 Classic, see Supported Platforms // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). VpcId *string `type:"string"` } @@ -8244,8 +8244,8 @@ type CreateDeploymentInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). CustomJson *string `type:"string"` // The instance IDs for the deployment targets. @@ -8453,15 +8453,15 @@ type CreateInstanceInput struct { // // * A custom AMI: Custom. // - // For more information on the supported operating systems, see AWS OpsWorks + // For more information about the supported operating systems, see AWS OpsWorks // Stacks Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). // // The default option is the current Amazon Linux version. If you set this parameter // to Custom, you must use the CreateInstance action's AmiId parameter to specify // the custom AMI that you want to use. Block device mappings are not supported - // if the value is Custom. For more information on the supported operating systems, + // if the value is Custom. For more information about supported operating systems, // see Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html)For - // more information on how to use custom AMIs with AWS OpsWorks Stacks, see + // more information about how to use custom AMIs with AWS OpsWorks Stacks, see // Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). Os *string `type:"string"` @@ -8962,7 +8962,7 @@ type CreateStackInput struct { // The configuration manager. When you create a stack we recommend that you // use the configuration manager to specify the Chef version: 12, 11.10, or // 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for - // Linux stacks is currently 11.4. + // Linux stacks is currently 12. ConfigurationManager *StackConfigurationManager `type:"structure"` // Contains the information required to retrieve an app or cookbook from a repository. @@ -8976,8 +8976,8 @@ type CreateStackInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). CustomJson *string `type:"string"` // The stack's default Availability Zone, which must be in the specified region. @@ -9017,7 +9017,7 @@ type CreateStackInput struct { // you create instances. For more information, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // The default option is the current Amazon Linux version. For more information - // on the supported operating systems, see AWS OpsWorks Stacks Operating Systems + // about supported operating systems, see AWS OpsWorks Stacks Operating Systems // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). DefaultOs *string `type:"string"` @@ -9080,8 +9080,24 @@ type CreateStackInput struct { // Name is a required field Name *string `type:"string" required:"true"` - // The stack's AWS region, such as "ap-south-1". For more information about - // Amazon regions, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). + // The stack's AWS region, such as ap-south-1. For more information about Amazon + // regions, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html). + // + // In the AWS CLI, this API maps to the --stack-region parameter. If the --stack-region + // parameter and the AWS CLI common parameter --region are set to the same value, + // the stack uses a regional endpoint. If the --stack-region parameter is not + // set, but the AWS CLI --region parameter is, this also results in a stack + // with a regional endpoint. However, if the --region parameter is set to us-east-1, + // and the --stack-region parameter is set to one of the following, then the + // stack uses a legacy or classic region: us-west-1, us-west-2, sa-east-1, eu-central-1, + // eu-west-1, ap-northeast-1, ap-southeast-1, ap-southeast-2. In this case, + // the actual API endpoint of the stack is in us-east-1. Only the preceding + // regions are supported as classic regions in the us-east-1 API endpoint. Because + // it is a best practice to choose the regional endpoint that is closest to + // where you manage AWS, we recommend that you use regional endpoints for new + // stacks. The AWS CLI common --region parameter always specifies a regional + // API endpoint; it cannot be used to specify a classic AWS OpsWorks Stacks + // region. // // Region is a required field Region *string `type:"string" required:"true"` @@ -9142,9 +9158,9 @@ type CreateStackInput struct { // // * You must specify a value for DefaultSubnetId. // - // For more information on how to use AWS OpsWorks Stacks with a VPC, see Running - // a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). - // For more information on default VPC and EC2-Classic, see Supported Platforms + // For more information about how to use AWS OpsWorks Stacks with a VPC, see + // Running a Stack in a VPC (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-vpc.html). + // For more information about default VPC and EC2-Classic, see Supported Platforms // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). VpcId *string `type:"string"` } @@ -9976,7 +9992,7 @@ func (s *DeploymentCommand) SetName(v string) *DeploymentCommand { type DeregisterEcsClusterInput struct { _ struct{} `type:"structure"` - // The cluster's ARN. + // The cluster's Amazon Resource Number (ARN). // // EcsClusterArn is a required field EcsClusterArn *string `type:"string" required:"true"` @@ -10958,6 +10974,7 @@ func (s DescribeOperatingSystemsInput) GoString() string { type DescribeOperatingSystemsOutput struct { _ struct{} `type:"structure"` + // Contains information in response to a DescribeOperatingSystems request. OperatingSystems []*OperatingSystem `type:"list"` } @@ -11118,8 +11135,8 @@ type DescribeRdsDbInstancesInput struct { // An array containing the ARNs of the instances to be described. RdsDbInstanceArns []*string `type:"list"` - // The stack ID that the instances are registered with. The operation returns - // descriptions of all registered Amazon RDS instances. + // The ID of the stack with which the instances are registered. The operation + // returns descriptions of all registered Amazon RDS instances. // // StackId is a required field StackId *string `type:"string" required:"true"` @@ -11256,7 +11273,7 @@ func (s *DescribeServiceErrorsOutput) SetServiceErrors(v []*ServiceError) *Descr type DescribeStackProvisioningParametersInput struct { _ struct{} `type:"structure"` - // The stack ID + // The stack ID. // // StackId is a required field StackId *string `type:"string" required:"true"` @@ -12253,6 +12270,7 @@ type Instance struct { // The instance architecture: "i386" or "x86_64". Architecture *string `type:"string" enum:"Architecture"` + // The instance's Amazon Resource Number (ARN). Arn *string `type:"string"` // For load-based or time-based instances, the type. @@ -12744,6 +12762,7 @@ type InstancesCount struct { // The number of instances with start_failed status. StartFailed *int64 `type:"integer"` + // The number of instances with stop_failed status. StopFailed *int64 `type:"integer"` // The number of instances with stopped status. @@ -12896,6 +12915,7 @@ func (s *InstancesCount) SetUnassigning(v int64) *InstancesCount { type Layer struct { _ struct{} `type:"structure"` + // The Amazon Resource Number (ARN) of a layer. Arn *string `type:"string"` // The layer attributes. @@ -14575,8 +14595,8 @@ type SetPermissionInput struct { // // * iam_only // - // For more information on the permissions associated with these levels, see - // Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). + // For more information about the permissions associated with these levels, + // see Managing User Permissions (http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html). Level *string `type:"string"` // The stack ID. @@ -15352,6 +15372,7 @@ func (s StartStackOutput) GoString() string { type StopInstanceInput struct { _ struct{} `type:"structure"` + // Specifies whether to force an instance to stop. Force *bool `type:"boolean"` // The instance ID. @@ -15975,7 +15996,7 @@ func (s UpdateAppOutput) GoString() string { type UpdateElasticIpInput struct { _ struct{} `type:"structure"` - // The address. + // The IP address for which you want to update the name. // // ElasticIp is a required field ElasticIp *string `type:"string" required:"true"` @@ -16118,15 +16139,15 @@ type UpdateInstanceInput struct { // Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft // Windows Server 2012 R2 with SQL Server Web. // - // For more information on the supported operating systems, see AWS OpsWorks + // For more information about supported operating systems, see AWS OpsWorks // Stacks Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). // // The default option is the current Amazon Linux version. If you set this parameter // to Custom, you must use the AmiId parameter to specify the custom AMI that - // you want to use. For more information on the supported operating systems, + // you want to use. For more information about supported operating systems, // see Operating Systems (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). - // For more information on how to use custom AMIs with OpsWorks, see Using Custom - // AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). + // For more information about how to use custom AMIs with OpsWorks, see Using + // Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // You can specify a different Linux operating system for the updated stack, // but you cannot change from Linux to Windows or Windows to Linux. @@ -16613,7 +16634,7 @@ type UpdateStackInput struct { // The configuration manager. When you update a stack, we recommend that you // use the configuration manager to specify the Chef version: 12, 11.10, or // 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for - // Linux stacks is currently 11.4. + // Linux stacks is currently 12. ConfigurationManager *StackConfigurationManager `type:"structure"` // Contains the information required to retrieve an app or cookbook from a repository. @@ -16627,8 +16648,8 @@ type UpdateStackInput struct { // // "{\"key1\": \"value1\", \"key2\": \"value2\",...}" // - // For more information on custom JSON, see Use Custom JSON to Modify the Stack - // Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). + // For more information about custom JSON, see Use Custom JSON to Modify the + // Stack Configuration Attributes (http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html). CustomJson *string `type:"string"` // The stack's default Availability Zone, which must be in the stack's region. @@ -16661,11 +16682,11 @@ type UpdateStackInput struct { // Windows Server 2012 R2 with SQL Server Web. // // * A custom AMI: Custom. You specify the custom AMI you want to use when - // you create instances. For more information on how to use custom AMIs with - // OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). + // you create instances. For more information about how to use custom AMIs + // with OpsWorks, see Using Custom AMIs (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html). // // The default option is the stack's current operating system. For more information - // on the supported operating systems, see AWS OpsWorks Stacks Operating Systems + // about supported operating systems, see AWS OpsWorks Stacks Operating Systems // (http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html). DefaultOs *string `type:"string"` @@ -17133,6 +17154,8 @@ type Volume struct { // The Amazon EC2 volume ID. Ec2VolumeId *string `type:"string"` + // Specifies whether an Amazon EBS volume is encrypted. For more information, + // see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html). Encrypted *bool `type:"boolean"` // The instance ID. @@ -17163,7 +17186,23 @@ type Volume struct { // The volume ID. VolumeId *string `type:"string"` - // The volume type, standard or PIOPS. + // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). + // + // * standard - Magnetic. Magnetic volumes must have a minimum size of 1 + // GiB and a maximum size of 1024 GiB. + // + // * io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size + // of 4 GiB and a maximum size of 16384 GiB. + // + // * gp2 - General Purpose (SSD). General purpose volumes must have a minimum + // size of 1 GiB and a maximum size of 16384 GiB. + // + // * st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized + // HDD volumes must have a minimum size of 500 GiB and a maximum size of + // 16384 GiB. + // + // * sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 500 GiB + // and a maximum size of 16384 GiB. VolumeType *string `type:"string"` } @@ -17292,15 +17331,21 @@ type VolumeConfiguration struct { // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). // - // * standard - Magnetic + // * standard - Magnetic. Magnetic volumes must have a minimum size of 1 + // GiB and a maximum size of 1024 GiB. // - // * io1 - Provisioned IOPS (SSD) + // * io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size + // of 4 GiB and a maximum size of 16384 GiB. // - // * gp2 - General Purpose (SSD) + // * gp2 - General Purpose (SSD). General purpose volumes must have a minimum + // size of 1 GiB and a maximum size of 16384 GiB. // - // * st1 - Throughput Optimized hard disk drive (HDD) + // * st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized + // HDD volumes must have a minimum size of 500 GiB and a maximum size of + // 16384 GiB. // - // * sc1 - Cold HDD + // * sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 500 GiB + // and a maximum size of 16384 GiB. VolumeType *string `type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go index 86c17e13615..5ecfc42dbf4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -63,16 +63,22 @@ func (c *Pinpoint) CreateAppRequest(input *CreateAppInput) (req *request.Request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApp func (c *Pinpoint) CreateApp(input *CreateAppInput) (*CreateAppOutput, error) { @@ -151,16 +157,22 @@ func (c *Pinpoint) CreateCampaignRequest(input *CreateCampaignInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaign func (c *Pinpoint) CreateCampaign(input *CreateCampaignInput) (*CreateCampaignOutput, error) { @@ -239,16 +251,22 @@ func (c *Pinpoint) CreateExportJobRequest(input *CreateExportJobInput) (req *req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateExportJob func (c *Pinpoint) CreateExportJob(input *CreateExportJobInput) (*CreateExportJobOutput, error) { @@ -327,16 +345,22 @@ func (c *Pinpoint) CreateImportJobRequest(input *CreateImportJobInput) (req *req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJob func (c *Pinpoint) CreateImportJob(input *CreateImportJobInput) (*CreateImportJobOutput, error) { @@ -415,16 +439,22 @@ func (c *Pinpoint) CreateSegmentRequest(input *CreateSegmentInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegment func (c *Pinpoint) CreateSegment(input *CreateSegmentInput) (*CreateSegmentOutput, error) { @@ -492,7 +522,7 @@ func (c *Pinpoint) DeleteAdmChannelRequest(input *DeleteAdmChannelInput) (req *r // DeleteAdmChannel API operation for Amazon Pinpoint. // -// Delete an ADM channel +// Delete an ADM channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -503,16 +533,22 @@ func (c *Pinpoint) DeleteAdmChannelRequest(input *DeleteAdmChannelInput) (req *r // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannel func (c *Pinpoint) DeleteAdmChannel(input *DeleteAdmChannelInput) (*DeleteAdmChannelOutput, error) { @@ -591,16 +627,22 @@ func (c *Pinpoint) DeleteApnsChannelRequest(input *DeleteApnsChannelInput) (req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannel func (c *Pinpoint) DeleteApnsChannel(input *DeleteApnsChannelInput) (*DeleteApnsChannelOutput, error) { @@ -668,7 +710,7 @@ func (c *Pinpoint) DeleteApnsSandboxChannelRequest(input *DeleteApnsSandboxChann // DeleteApnsSandboxChannel API operation for Amazon Pinpoint. // -// Delete an APNS sandbox channel +// Delete an APNS sandbox channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -679,16 +721,22 @@ func (c *Pinpoint) DeleteApnsSandboxChannelRequest(input *DeleteApnsSandboxChann // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannel func (c *Pinpoint) DeleteApnsSandboxChannel(input *DeleteApnsSandboxChannelInput) (*DeleteApnsSandboxChannelOutput, error) { @@ -767,16 +815,22 @@ func (c *Pinpoint) DeleteApnsVoipChannelRequest(input *DeleteApnsVoipChannelInpu // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannel func (c *Pinpoint) DeleteApnsVoipChannel(input *DeleteApnsVoipChannelInput) (*DeleteApnsVoipChannelOutput, error) { @@ -855,16 +909,22 @@ func (c *Pinpoint) DeleteApnsVoipSandboxChannelRequest(input *DeleteApnsVoipSand // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannel func (c *Pinpoint) DeleteApnsVoipSandboxChannel(input *DeleteApnsVoipSandboxChannelInput) (*DeleteApnsVoipSandboxChannelOutput, error) { @@ -943,16 +1003,22 @@ func (c *Pinpoint) DeleteAppRequest(input *DeleteAppInput) (req *request.Request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApp func (c *Pinpoint) DeleteApp(input *DeleteAppInput) (*DeleteAppOutput, error) { @@ -1031,16 +1097,22 @@ func (c *Pinpoint) DeleteBaiduChannelRequest(input *DeleteBaiduChannelInput) (re // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannel func (c *Pinpoint) DeleteBaiduChannel(input *DeleteBaiduChannelInput) (*DeleteBaiduChannelOutput, error) { @@ -1119,16 +1191,22 @@ func (c *Pinpoint) DeleteCampaignRequest(input *DeleteCampaignInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaign func (c *Pinpoint) DeleteCampaign(input *DeleteCampaignInput) (*DeleteCampaignOutput, error) { @@ -1196,7 +1274,7 @@ func (c *Pinpoint) DeleteEmailChannelRequest(input *DeleteEmailChannelInput) (re // DeleteEmailChannel API operation for Amazon Pinpoint. // -// Delete an email channel +// Delete an email channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1207,16 +1285,22 @@ func (c *Pinpoint) DeleteEmailChannelRequest(input *DeleteEmailChannelInput) (re // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannel func (c *Pinpoint) DeleteEmailChannel(input *DeleteEmailChannelInput) (*DeleteEmailChannelOutput, error) { @@ -1295,16 +1379,22 @@ func (c *Pinpoint) DeleteEndpointRequest(input *DeleteEndpointInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEndpoint func (c *Pinpoint) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { @@ -1383,16 +1473,22 @@ func (c *Pinpoint) DeleteEventStreamRequest(input *DeleteEventStreamInput) (req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStream func (c *Pinpoint) DeleteEventStream(input *DeleteEventStreamInput) (*DeleteEventStreamOutput, error) { @@ -1471,16 +1567,22 @@ func (c *Pinpoint) DeleteGcmChannelRequest(input *DeleteGcmChannelInput) (req *r // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannel func (c *Pinpoint) DeleteGcmChannel(input *DeleteGcmChannelInput) (*DeleteGcmChannelOutput, error) { @@ -1559,16 +1661,22 @@ func (c *Pinpoint) DeleteSegmentRequest(input *DeleteSegmentInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegment func (c *Pinpoint) DeleteSegment(input *DeleteSegmentInput) (*DeleteSegmentOutput, error) { @@ -1636,7 +1744,7 @@ func (c *Pinpoint) DeleteSmsChannelRequest(input *DeleteSmsChannelInput) (req *r // DeleteSmsChannel API operation for Amazon Pinpoint. // -// Delete an SMS channel +// Delete an SMS channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1647,16 +1755,22 @@ func (c *Pinpoint) DeleteSmsChannelRequest(input *DeleteSmsChannelInput) (req *r // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannel func (c *Pinpoint) DeleteSmsChannel(input *DeleteSmsChannelInput) (*DeleteSmsChannelOutput, error) { @@ -1680,6 +1794,100 @@ func (c *Pinpoint) DeleteSmsChannelWithContext(ctx aws.Context, input *DeleteSms return out, req.Send() } +const opDeleteUserEndpoints = "DeleteUserEndpoints" + +// DeleteUserEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteUserEndpoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteUserEndpoints for more information on using the DeleteUserEndpoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteUserEndpointsRequest method. +// req, resp := client.DeleteUserEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteUserEndpoints +func (c *Pinpoint) DeleteUserEndpointsRequest(input *DeleteUserEndpointsInput) (req *request.Request, output *DeleteUserEndpointsOutput) { + op := &request.Operation{ + Name: opDeleteUserEndpoints, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/users/{user-id}", + } + + if input == nil { + input = &DeleteUserEndpointsInput{} + } + + output = &DeleteUserEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteUserEndpoints API operation for Amazon Pinpoint. +// +// Deletes endpoints associated with an user id. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation DeleteUserEndpoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteUserEndpoints +func (c *Pinpoint) DeleteUserEndpoints(input *DeleteUserEndpointsInput) (*DeleteUserEndpointsOutput, error) { + req, out := c.DeleteUserEndpointsRequest(input) + return out, req.Send() +} + +// DeleteUserEndpointsWithContext is the same as DeleteUserEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteUserEndpoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) DeleteUserEndpointsWithContext(ctx aws.Context, input *DeleteUserEndpointsInput, opts ...request.Option) (*DeleteUserEndpointsOutput, error) { + req, out := c.DeleteUserEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAdmChannel = "GetAdmChannel" // GetAdmChannelRequest generates a "aws/request.Request" representing the @@ -1724,7 +1932,7 @@ func (c *Pinpoint) GetAdmChannelRequest(input *GetAdmChannelInput) (req *request // GetAdmChannel API operation for Amazon Pinpoint. // -// Get an ADM channel +// Get an ADM channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1735,16 +1943,22 @@ func (c *Pinpoint) GetAdmChannelRequest(input *GetAdmChannelInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannel func (c *Pinpoint) GetAdmChannel(input *GetAdmChannelInput) (*GetAdmChannelOutput, error) { @@ -1823,16 +2037,22 @@ func (c *Pinpoint) GetApnsChannelRequest(input *GetApnsChannelInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannel func (c *Pinpoint) GetApnsChannel(input *GetApnsChannelInput) (*GetApnsChannelOutput, error) { @@ -1900,7 +2120,7 @@ func (c *Pinpoint) GetApnsSandboxChannelRequest(input *GetApnsSandboxChannelInpu // GetApnsSandboxChannel API operation for Amazon Pinpoint. // -// Get an APNS sandbox channel +// Get an APNS sandbox channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1911,16 +2131,22 @@ func (c *Pinpoint) GetApnsSandboxChannelRequest(input *GetApnsSandboxChannelInpu // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannel func (c *Pinpoint) GetApnsSandboxChannel(input *GetApnsSandboxChannelInput) (*GetApnsSandboxChannelOutput, error) { @@ -1999,16 +2225,22 @@ func (c *Pinpoint) GetApnsVoipChannelRequest(input *GetApnsVoipChannelInput) (re // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannel func (c *Pinpoint) GetApnsVoipChannel(input *GetApnsVoipChannelInput) (*GetApnsVoipChannelOutput, error) { @@ -2087,16 +2319,22 @@ func (c *Pinpoint) GetApnsVoipSandboxChannelRequest(input *GetApnsVoipSandboxCha // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel func (c *Pinpoint) GetApnsVoipSandboxChannel(input *GetApnsVoipSandboxChannelInput) (*GetApnsVoipSandboxChannelOutput, error) { @@ -2175,16 +2413,22 @@ func (c *Pinpoint) GetAppRequest(input *GetAppInput) (req *request.Request, outp // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApp func (c *Pinpoint) GetApp(input *GetAppInput) (*GetAppOutput, error) { @@ -2263,16 +2507,22 @@ func (c *Pinpoint) GetApplicationSettingsRequest(input *GetApplicationSettingsIn // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings func (c *Pinpoint) GetApplicationSettings(input *GetApplicationSettingsInput) (*GetApplicationSettingsOutput, error) { @@ -2351,16 +2601,22 @@ func (c *Pinpoint) GetAppsRequest(input *GetAppsInput) (req *request.Request, ou // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps func (c *Pinpoint) GetApps(input *GetAppsInput) (*GetAppsOutput, error) { @@ -2439,16 +2695,22 @@ func (c *Pinpoint) GetBaiduChannelRequest(input *GetBaiduChannelInput) (req *req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel func (c *Pinpoint) GetBaiduChannel(input *GetBaiduChannelInput) (*GetBaiduChannelOutput, error) { @@ -2527,16 +2789,22 @@ func (c *Pinpoint) GetCampaignRequest(input *GetCampaignInput) (req *request.Req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign func (c *Pinpoint) GetCampaign(input *GetCampaignInput) (*GetCampaignOutput, error) { @@ -2615,16 +2883,22 @@ func (c *Pinpoint) GetCampaignActivitiesRequest(input *GetCampaignActivitiesInpu // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities func (c *Pinpoint) GetCampaignActivities(input *GetCampaignActivitiesInput) (*GetCampaignActivitiesOutput, error) { @@ -2703,16 +2977,22 @@ func (c *Pinpoint) GetCampaignVersionRequest(input *GetCampaignVersionInput) (re // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion func (c *Pinpoint) GetCampaignVersion(input *GetCampaignVersionInput) (*GetCampaignVersionOutput, error) { @@ -2791,16 +3071,22 @@ func (c *Pinpoint) GetCampaignVersionsRequest(input *GetCampaignVersionsInput) ( // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions func (c *Pinpoint) GetCampaignVersions(input *GetCampaignVersionsInput) (*GetCampaignVersionsOutput, error) { @@ -2879,16 +3165,22 @@ func (c *Pinpoint) GetCampaignsRequest(input *GetCampaignsInput) (req *request.R // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns func (c *Pinpoint) GetCampaigns(input *GetCampaignsInput) (*GetCampaignsOutput, error) { @@ -2912,6 +3204,100 @@ func (c *Pinpoint) GetCampaignsWithContext(ctx aws.Context, input *GetCampaignsI return out, req.Send() } +const opGetChannels = "GetChannels" + +// GetChannelsRequest generates a "aws/request.Request" representing the +// client's request for the GetChannels operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetChannels for more information on using the GetChannels +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetChannelsRequest method. +// req, resp := client.GetChannelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetChannels +func (c *Pinpoint) GetChannelsRequest(input *GetChannelsInput) (req *request.Request, output *GetChannelsOutput) { + op := &request.Operation{ + Name: opGetChannels, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels", + } + + if input == nil { + input = &GetChannelsInput{} + } + + output = &GetChannelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetChannels API operation for Amazon Pinpoint. +// +// Get all channels. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation GetChannels for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetChannels +func (c *Pinpoint) GetChannels(input *GetChannelsInput) (*GetChannelsOutput, error) { + req, out := c.GetChannelsRequest(input) + return out, req.Send() +} + +// GetChannelsWithContext is the same as GetChannels with the addition of +// the ability to pass a context and additional request options. +// +// See GetChannels for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) GetChannelsWithContext(ctx aws.Context, input *GetChannelsInput, opts ...request.Option) (*GetChannelsOutput, error) { + req, out := c.GetChannelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetEmailChannel = "GetEmailChannel" // GetEmailChannelRequest generates a "aws/request.Request" representing the @@ -2956,7 +3342,7 @@ func (c *Pinpoint) GetEmailChannelRequest(input *GetEmailChannelInput) (req *req // GetEmailChannel API operation for Amazon Pinpoint. // -// Get an email channel +// Get an email channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2967,16 +3353,22 @@ func (c *Pinpoint) GetEmailChannelRequest(input *GetEmailChannelInput) (req *req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel func (c *Pinpoint) GetEmailChannel(input *GetEmailChannelInput) (*GetEmailChannelOutput, error) { @@ -3055,16 +3447,22 @@ func (c *Pinpoint) GetEndpointRequest(input *GetEndpointInput) (req *request.Req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint func (c *Pinpoint) GetEndpoint(input *GetEndpointInput) (*GetEndpointOutput, error) { @@ -3143,16 +3541,22 @@ func (c *Pinpoint) GetEventStreamRequest(input *GetEventStreamInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream func (c *Pinpoint) GetEventStream(input *GetEventStreamInput) (*GetEventStreamOutput, error) { @@ -3231,16 +3635,22 @@ func (c *Pinpoint) GetExportJobRequest(input *GetExportJobInput) (req *request.R // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob func (c *Pinpoint) GetExportJob(input *GetExportJobInput) (*GetExportJobOutput, error) { @@ -3319,16 +3729,22 @@ func (c *Pinpoint) GetExportJobsRequest(input *GetExportJobsInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs func (c *Pinpoint) GetExportJobs(input *GetExportJobsInput) (*GetExportJobsOutput, error) { @@ -3407,16 +3823,22 @@ func (c *Pinpoint) GetGcmChannelRequest(input *GetGcmChannelInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel func (c *Pinpoint) GetGcmChannel(input *GetGcmChannelInput) (*GetGcmChannelOutput, error) { @@ -3495,16 +3917,22 @@ func (c *Pinpoint) GetImportJobRequest(input *GetImportJobInput) (req *request.R // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob func (c *Pinpoint) GetImportJob(input *GetImportJobInput) (*GetImportJobOutput, error) { @@ -3583,16 +4011,22 @@ func (c *Pinpoint) GetImportJobsRequest(input *GetImportJobsInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs func (c *Pinpoint) GetImportJobs(input *GetImportJobsInput) (*GetImportJobsOutput, error) { @@ -3671,16 +4105,22 @@ func (c *Pinpoint) GetSegmentRequest(input *GetSegmentInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment func (c *Pinpoint) GetSegment(input *GetSegmentInput) (*GetSegmentOutput, error) { @@ -3759,16 +4199,22 @@ func (c *Pinpoint) GetSegmentExportJobsRequest(input *GetSegmentExportJobsInput) // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs func (c *Pinpoint) GetSegmentExportJobs(input *GetSegmentExportJobsInput) (*GetSegmentExportJobsOutput, error) { @@ -3847,16 +4293,22 @@ func (c *Pinpoint) GetSegmentImportJobsRequest(input *GetSegmentImportJobsInput) // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs func (c *Pinpoint) GetSegmentImportJobs(input *GetSegmentImportJobsInput) (*GetSegmentImportJobsOutput, error) { @@ -3935,16 +4387,22 @@ func (c *Pinpoint) GetSegmentVersionRequest(input *GetSegmentVersionInput) (req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion func (c *Pinpoint) GetSegmentVersion(input *GetSegmentVersionInput) (*GetSegmentVersionOutput, error) { @@ -4023,16 +4481,22 @@ func (c *Pinpoint) GetSegmentVersionsRequest(input *GetSegmentVersionsInput) (re // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions func (c *Pinpoint) GetSegmentVersions(input *GetSegmentVersionsInput) (*GetSegmentVersionsOutput, error) { @@ -4111,16 +4575,22 @@ func (c *Pinpoint) GetSegmentsRequest(input *GetSegmentsInput) (req *request.Req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments func (c *Pinpoint) GetSegments(input *GetSegmentsInput) (*GetSegmentsOutput, error) { @@ -4188,7 +4658,7 @@ func (c *Pinpoint) GetSmsChannelRequest(input *GetSmsChannelInput) (req *request // GetSmsChannel API operation for Amazon Pinpoint. // -// Get an SMS channel +// Get an SMS channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4199,16 +4669,22 @@ func (c *Pinpoint) GetSmsChannelRequest(input *GetSmsChannelInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel func (c *Pinpoint) GetSmsChannel(input *GetSmsChannelInput) (*GetSmsChannelOutput, error) { @@ -4232,386 +4708,714 @@ func (c *Pinpoint) GetSmsChannelWithContext(ctx aws.Context, input *GetSmsChanne return out, req.Send() } -const opPutEventStream = "PutEventStream" +const opGetUserEndpoints = "GetUserEndpoints" -// PutEventStreamRequest generates a "aws/request.Request" representing the -// client's request for the PutEventStream operation. The "output" return +// GetUserEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the GetUserEndpoints operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutEventStream for more information on using the PutEventStream +// See GetUserEndpoints for more information on using the GetUserEndpoints // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PutEventStreamRequest method. -// req, resp := client.PutEventStreamRequest(params) +// // Example sending a request using the GetUserEndpointsRequest method. +// req, resp := client.GetUserEndpointsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream -func (c *Pinpoint) PutEventStreamRequest(input *PutEventStreamInput) (req *request.Request, output *PutEventStreamOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetUserEndpoints +func (c *Pinpoint) GetUserEndpointsRequest(input *GetUserEndpointsInput) (req *request.Request, output *GetUserEndpointsOutput) { op := &request.Operation{ - Name: opPutEventStream, - HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/eventstream", + Name: opGetUserEndpoints, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/users/{user-id}", } if input == nil { - input = &PutEventStreamInput{} + input = &GetUserEndpointsInput{} } - output = &PutEventStreamOutput{} + output = &GetUserEndpointsOutput{} req = c.newRequest(op, input, output) return } -// PutEventStream API operation for Amazon Pinpoint. +// GetUserEndpoints API operation for Amazon Pinpoint. // -// Use to create or update the event stream for an app. +// Returns information about the endpoints associated with an user id. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Pinpoint's -// API operation PutEventStream for usage and error information. +// API operation GetUserEndpoints for usage and error information. // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream -func (c *Pinpoint) PutEventStream(input *PutEventStreamInput) (*PutEventStreamOutput, error) { - req, out := c.PutEventStreamRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetUserEndpoints +func (c *Pinpoint) GetUserEndpoints(input *GetUserEndpointsInput) (*GetUserEndpointsOutput, error) { + req, out := c.GetUserEndpointsRequest(input) return out, req.Send() } -// PutEventStreamWithContext is the same as PutEventStream with the addition of +// GetUserEndpointsWithContext is the same as GetUserEndpoints with the addition of // the ability to pass a context and additional request options. // -// See PutEventStream for details on how to use this API operation. +// See GetUserEndpoints for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Pinpoint) PutEventStreamWithContext(ctx aws.Context, input *PutEventStreamInput, opts ...request.Option) (*PutEventStreamOutput, error) { - req, out := c.PutEventStreamRequest(input) +func (c *Pinpoint) GetUserEndpointsWithContext(ctx aws.Context, input *GetUserEndpointsInput, opts ...request.Option) (*GetUserEndpointsOutput, error) { + req, out := c.GetUserEndpointsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opSendMessages = "SendMessages" +const opPhoneNumberValidate = "PhoneNumberValidate" -// SendMessagesRequest generates a "aws/request.Request" representing the -// client's request for the SendMessages operation. The "output" return +// PhoneNumberValidateRequest generates a "aws/request.Request" representing the +// client's request for the PhoneNumberValidate operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See SendMessages for more information on using the SendMessages +// See PhoneNumberValidate for more information on using the PhoneNumberValidate // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the SendMessagesRequest method. -// req, resp := client.SendMessagesRequest(params) +// // Example sending a request using the PhoneNumberValidateRequest method. +// req, resp := client.PhoneNumberValidateRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages -func (c *Pinpoint) SendMessagesRequest(input *SendMessagesInput) (req *request.Request, output *SendMessagesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PhoneNumberValidate +func (c *Pinpoint) PhoneNumberValidateRequest(input *PhoneNumberValidateInput) (req *request.Request, output *PhoneNumberValidateOutput) { op := &request.Operation{ - Name: opSendMessages, + Name: opPhoneNumberValidate, HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/messages", + HTTPPath: "/v1/phone/number/validate", } if input == nil { - input = &SendMessagesInput{} + input = &PhoneNumberValidateInput{} } - output = &SendMessagesOutput{} + output = &PhoneNumberValidateOutput{} req = c.newRequest(op, input, output) return } -// SendMessages API operation for Amazon Pinpoint. +// PhoneNumberValidate API operation for Amazon Pinpoint. // -// Send a batch of messages +// Returns information about the specified phone number. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Pinpoint's -// API operation SendMessages for usage and error information. +// API operation PhoneNumberValidate for usage and error information. // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages -func (c *Pinpoint) SendMessages(input *SendMessagesInput) (*SendMessagesOutput, error) { - req, out := c.SendMessagesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PhoneNumberValidate +func (c *Pinpoint) PhoneNumberValidate(input *PhoneNumberValidateInput) (*PhoneNumberValidateOutput, error) { + req, out := c.PhoneNumberValidateRequest(input) return out, req.Send() } -// SendMessagesWithContext is the same as SendMessages with the addition of +// PhoneNumberValidateWithContext is the same as PhoneNumberValidate with the addition of // the ability to pass a context and additional request options. // -// See SendMessages for details on how to use this API operation. +// See PhoneNumberValidate for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Pinpoint) SendMessagesWithContext(ctx aws.Context, input *SendMessagesInput, opts ...request.Option) (*SendMessagesOutput, error) { - req, out := c.SendMessagesRequest(input) +func (c *Pinpoint) PhoneNumberValidateWithContext(ctx aws.Context, input *PhoneNumberValidateInput, opts ...request.Option) (*PhoneNumberValidateOutput, error) { + req, out := c.PhoneNumberValidateRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opSendUsersMessages = "SendUsersMessages" +const opPutEventStream = "PutEventStream" -// SendUsersMessagesRequest generates a "aws/request.Request" representing the -// client's request for the SendUsersMessages operation. The "output" return +// PutEventStreamRequest generates a "aws/request.Request" representing the +// client's request for the PutEventStream operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See SendUsersMessages for more information on using the SendUsersMessages +// See PutEventStream for more information on using the PutEventStream // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the SendUsersMessagesRequest method. -// req, resp := client.SendUsersMessagesRequest(params) +// // Example sending a request using the PutEventStreamRequest method. +// req, resp := client.PutEventStreamRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages -func (c *Pinpoint) SendUsersMessagesRequest(input *SendUsersMessagesInput) (req *request.Request, output *SendUsersMessagesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream +func (c *Pinpoint) PutEventStreamRequest(input *PutEventStreamInput) (req *request.Request, output *PutEventStreamOutput) { op := &request.Operation{ - Name: opSendUsersMessages, + Name: opPutEventStream, HTTPMethod: "POST", - HTTPPath: "/v1/apps/{application-id}/users-messages", + HTTPPath: "/v1/apps/{application-id}/eventstream", } if input == nil { - input = &SendUsersMessagesInput{} + input = &PutEventStreamInput{} } - output = &SendUsersMessagesOutput{} + output = &PutEventStreamOutput{} req = c.newRequest(op, input, output) return } -// SendUsersMessages API operation for Amazon Pinpoint. +// PutEventStream API operation for Amazon Pinpoint. // -// Send a batch of messages to users +// Use to create or update the event stream for an app. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Pinpoint's -// API operation SendUsersMessages for usage and error information. +// API operation PutEventStream for usage and error information. // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages -func (c *Pinpoint) SendUsersMessages(input *SendUsersMessagesInput) (*SendUsersMessagesOutput, error) { - req, out := c.SendUsersMessagesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream +func (c *Pinpoint) PutEventStream(input *PutEventStreamInput) (*PutEventStreamOutput, error) { + req, out := c.PutEventStreamRequest(input) return out, req.Send() } -// SendUsersMessagesWithContext is the same as SendUsersMessages with the addition of +// PutEventStreamWithContext is the same as PutEventStream with the addition of // the ability to pass a context and additional request options. // -// See SendUsersMessages for details on how to use this API operation. +// See PutEventStream for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Pinpoint) SendUsersMessagesWithContext(ctx aws.Context, input *SendUsersMessagesInput, opts ...request.Option) (*SendUsersMessagesOutput, error) { - req, out := c.SendUsersMessagesRequest(input) +func (c *Pinpoint) PutEventStreamWithContext(ctx aws.Context, input *PutEventStreamInput, opts ...request.Option) (*PutEventStreamOutput, error) { + req, out := c.PutEventStreamRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateAdmChannel = "UpdateAdmChannel" +const opRemoveAttributes = "RemoveAttributes" -// UpdateAdmChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAdmChannel operation. The "output" return +// RemoveAttributesRequest generates a "aws/request.Request" representing the +// client's request for the RemoveAttributes operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateAdmChannel for more information on using the UpdateAdmChannel +// See RemoveAttributes for more information on using the RemoveAttributes // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateAdmChannelRequest method. -// req, resp := client.UpdateAdmChannelRequest(params) +// // Example sending a request using the RemoveAttributesRequest method. +// req, resp := client.RemoveAttributesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel -func (c *Pinpoint) UpdateAdmChannelRequest(input *UpdateAdmChannelInput) (req *request.Request, output *UpdateAdmChannelOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RemoveAttributes +func (c *Pinpoint) RemoveAttributesRequest(input *RemoveAttributesInput) (req *request.Request, output *RemoveAttributesOutput) { op := &request.Operation{ - Name: opUpdateAdmChannel, + Name: opRemoveAttributes, HTTPMethod: "PUT", - HTTPPath: "/v1/apps/{application-id}/channels/adm", + HTTPPath: "/v1/apps/{application-id}/attributes/{attribute-type}", } if input == nil { - input = &UpdateAdmChannelInput{} + input = &RemoveAttributesInput{} } - output = &UpdateAdmChannelOutput{} + output = &RemoveAttributesOutput{} req = c.newRequest(op, input, output) return } -// UpdateAdmChannel API operation for Amazon Pinpoint. +// RemoveAttributes API operation for Amazon Pinpoint. // -// Update an ADM channel +// Used to remove the attributes for an app // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Pinpoint's -// API operation UpdateAdmChannel for usage and error information. +// API operation RemoveAttributes for usage and error information. // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel -func (c *Pinpoint) UpdateAdmChannel(input *UpdateAdmChannelInput) (*UpdateAdmChannelOutput, error) { - req, out := c.UpdateAdmChannelRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RemoveAttributes +func (c *Pinpoint) RemoveAttributes(input *RemoveAttributesInput) (*RemoveAttributesOutput, error) { + req, out := c.RemoveAttributesRequest(input) return out, req.Send() } -// UpdateAdmChannelWithContext is the same as UpdateAdmChannel with the addition of +// RemoveAttributesWithContext is the same as RemoveAttributes with the addition of // the ability to pass a context and additional request options. // -// See UpdateAdmChannel for details on how to use this API operation. +// See RemoveAttributes for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Pinpoint) UpdateAdmChannelWithContext(ctx aws.Context, input *UpdateAdmChannelInput, opts ...request.Option) (*UpdateAdmChannelOutput, error) { - req, out := c.UpdateAdmChannelRequest(input) +func (c *Pinpoint) RemoveAttributesWithContext(ctx aws.Context, input *RemoveAttributesInput, opts ...request.Option) (*RemoveAttributesOutput, error) { + req, out := c.RemoveAttributesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateApnsChannel = "UpdateApnsChannel" +const opSendMessages = "SendMessages" -// UpdateApnsChannelRequest generates a "aws/request.Request" representing the -// client's request for the UpdateApnsChannel operation. The "output" return +// SendMessagesRequest generates a "aws/request.Request" representing the +// client's request for the SendMessages operation. The "output" return // value will be populated with the request's response once the request completes // successfuly. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateApnsChannel for more information on using the UpdateApnsChannel +// See SendMessages for more information on using the SendMessages // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateApnsChannelRequest method. -// req, resp := client.UpdateApnsChannelRequest(params) +// // Example sending a request using the SendMessagesRequest method. +// req, resp := client.SendMessagesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel -func (c *Pinpoint) UpdateApnsChannelRequest(input *UpdateApnsChannelInput) (req *request.Request, output *UpdateApnsChannelOutput) { - op := &request.Operation{ +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages +func (c *Pinpoint) SendMessagesRequest(input *SendMessagesInput) (req *request.Request, output *SendMessagesOutput) { + op := &request.Operation{ + Name: opSendMessages, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/messages", + } + + if input == nil { + input = &SendMessagesInput{} + } + + output = &SendMessagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendMessages API operation for Amazon Pinpoint. +// +// Use this resource to send a direct message, which is a one time message that +// you send to a limited audience without creating a campaign. You can send +// the message to up to 100 recipients. You cannot use the message to engage +// a segment. When you send the message, Amazon Pinpoint delivers it immediately, +// and you cannot schedule the delivery. To engage a user segment, and to schedule +// the message delivery, create a campaign instead of sending a direct message.You +// can send a direct message as a push notification to your mobile app or as +// an SMS message to SMS-enabled devices. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation SendMessages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages +func (c *Pinpoint) SendMessages(input *SendMessagesInput) (*SendMessagesOutput, error) { + req, out := c.SendMessagesRequest(input) + return out, req.Send() +} + +// SendMessagesWithContext is the same as SendMessages with the addition of +// the ability to pass a context and additional request options. +// +// See SendMessages for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) SendMessagesWithContext(ctx aws.Context, input *SendMessagesInput, opts ...request.Option) (*SendMessagesOutput, error) { + req, out := c.SendMessagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSendUsersMessages = "SendUsersMessages" + +// SendUsersMessagesRequest generates a "aws/request.Request" representing the +// client's request for the SendUsersMessages operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SendUsersMessages for more information on using the SendUsersMessages +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SendUsersMessagesRequest method. +// req, resp := client.SendUsersMessagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages +func (c *Pinpoint) SendUsersMessagesRequest(input *SendUsersMessagesInput) (req *request.Request, output *SendUsersMessagesOutput) { + op := &request.Operation{ + Name: opSendUsersMessages, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/users-messages", + } + + if input == nil { + input = &SendUsersMessagesInput{} + } + + output = &SendUsersMessagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendUsersMessages API operation for Amazon Pinpoint. +// +// Use this resource to message a list of users. Amazon Pinpoint sends the message +// to all of the endpoints that are associated with each user.A user represents +// an individual who is assigned a unique user ID, and this ID is assigned to +// one or more endpoints. For example, if an individual uses your app on multiple +// devices, your app could assign that person's user ID to the endpoint for +// each device.With the users-messages resource, you specify the message recipients +// as user IDs. For each user ID, Amazon Pinpoint delivers the message to all +// of the user's endpoints. Within the body of your request, you can specify +// a default message, and you can tailor your message for different channels, +// including those for mobile push and SMS.With this resource, you send a direct +// message, which is a one time message that you send to a limited audience +// without creating a campaign. You can send the message to up to 100 users +// per request. You cannot use the message to engage a segment. When you send +// the message, Amazon Pinpoint delivers it immediately, and you cannot schedule +// the delivery. To engage a user segment, and to schedule the message delivery, +// create a campaign instead of using the users-messages resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation SendUsersMessages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages +func (c *Pinpoint) SendUsersMessages(input *SendUsersMessagesInput) (*SendUsersMessagesOutput, error) { + req, out := c.SendUsersMessagesRequest(input) + return out, req.Send() +} + +// SendUsersMessagesWithContext is the same as SendUsersMessages with the addition of +// the ability to pass a context and additional request options. +// +// See SendUsersMessages for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) SendUsersMessagesWithContext(ctx aws.Context, input *SendUsersMessagesInput, opts ...request.Option) (*SendUsersMessagesOutput, error) { + req, out := c.SendUsersMessagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAdmChannel = "UpdateAdmChannel" + +// UpdateAdmChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAdmChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAdmChannel for more information on using the UpdateAdmChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAdmChannelRequest method. +// req, resp := client.UpdateAdmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel +func (c *Pinpoint) UpdateAdmChannelRequest(input *UpdateAdmChannelInput) (req *request.Request, output *UpdateAdmChannelOutput) { + op := &request.Operation{ + Name: opUpdateAdmChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/adm", + } + + if input == nil { + input = &UpdateAdmChannelInput{} + } + + output = &UpdateAdmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAdmChannel API operation for Amazon Pinpoint. +// +// Update an ADM channel. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Pinpoint's +// API operation UpdateAdmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel +func (c *Pinpoint) UpdateAdmChannel(input *UpdateAdmChannelInput) (*UpdateAdmChannelOutput, error) { + req, out := c.UpdateAdmChannelRequest(input) + return out, req.Send() +} + +// UpdateAdmChannelWithContext is the same as UpdateAdmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAdmChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Pinpoint) UpdateAdmChannelWithContext(ctx aws.Context, input *UpdateAdmChannelInput, opts ...request.Option) (*UpdateAdmChannelOutput, error) { + req, out := c.UpdateAdmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsChannel = "UpdateApnsChannel" + +// UpdateApnsChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApnsChannel for more information on using the UpdateApnsChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApnsChannelRequest method. +// req, resp := client.UpdateApnsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel +func (c *Pinpoint) UpdateApnsChannelRequest(input *UpdateApnsChannelInput) (req *request.Request, output *UpdateApnsChannelOutput) { + op := &request.Operation{ Name: opUpdateApnsChannel, HTTPMethod: "PUT", HTTPPath: "/v1/apps/{application-id}/channels/apns", @@ -4639,16 +5443,22 @@ func (c *Pinpoint) UpdateApnsChannelRequest(input *UpdateApnsChannelInput) (req // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel func (c *Pinpoint) UpdateApnsChannel(input *UpdateApnsChannelInput) (*UpdateApnsChannelOutput, error) { @@ -4716,7 +5526,7 @@ func (c *Pinpoint) UpdateApnsSandboxChannelRequest(input *UpdateApnsSandboxChann // UpdateApnsSandboxChannel API operation for Amazon Pinpoint. // -// Update an APNS sandbox channel +// Update an APNS sandbox channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4727,16 +5537,22 @@ func (c *Pinpoint) UpdateApnsSandboxChannelRequest(input *UpdateApnsSandboxChann // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel func (c *Pinpoint) UpdateApnsSandboxChannel(input *UpdateApnsSandboxChannelInput) (*UpdateApnsSandboxChannelOutput, error) { @@ -4815,16 +5631,22 @@ func (c *Pinpoint) UpdateApnsVoipChannelRequest(input *UpdateApnsVoipChannelInpu // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel func (c *Pinpoint) UpdateApnsVoipChannel(input *UpdateApnsVoipChannelInput) (*UpdateApnsVoipChannelOutput, error) { @@ -4903,16 +5725,22 @@ func (c *Pinpoint) UpdateApnsVoipSandboxChannelRequest(input *UpdateApnsVoipSand // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel func (c *Pinpoint) UpdateApnsVoipSandboxChannel(input *UpdateApnsVoipSandboxChannelInput) (*UpdateApnsVoipSandboxChannelOutput, error) { @@ -4991,16 +5819,22 @@ func (c *Pinpoint) UpdateApplicationSettingsRequest(input *UpdateApplicationSett // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings func (c *Pinpoint) UpdateApplicationSettings(input *UpdateApplicationSettingsInput) (*UpdateApplicationSettingsOutput, error) { @@ -5079,16 +5913,22 @@ func (c *Pinpoint) UpdateBaiduChannelRequest(input *UpdateBaiduChannelInput) (re // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel func (c *Pinpoint) UpdateBaiduChannel(input *UpdateBaiduChannelInput) (*UpdateBaiduChannelOutput, error) { @@ -5167,16 +6007,22 @@ func (c *Pinpoint) UpdateCampaignRequest(input *UpdateCampaignInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign func (c *Pinpoint) UpdateCampaign(input *UpdateCampaignInput) (*UpdateCampaignOutput, error) { @@ -5244,7 +6090,7 @@ func (c *Pinpoint) UpdateEmailChannelRequest(input *UpdateEmailChannelInput) (re // UpdateEmailChannel API operation for Amazon Pinpoint. // -// Update an email channel +// Update an email channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5255,16 +6101,22 @@ func (c *Pinpoint) UpdateEmailChannelRequest(input *UpdateEmailChannelInput) (re // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel func (c *Pinpoint) UpdateEmailChannel(input *UpdateEmailChannelInput) (*UpdateEmailChannelOutput, error) { @@ -5332,7 +6184,7 @@ func (c *Pinpoint) UpdateEndpointRequest(input *UpdateEndpointInput) (req *reque // UpdateEndpoint API operation for Amazon Pinpoint. // -// Use to update an endpoint. +// Creates or updates an endpoint. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5343,16 +6195,22 @@ func (c *Pinpoint) UpdateEndpointRequest(input *UpdateEndpointInput) (req *reque // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpoint func (c *Pinpoint) UpdateEndpoint(input *UpdateEndpointInput) (*UpdateEndpointOutput, error) { @@ -5431,16 +6289,22 @@ func (c *Pinpoint) UpdateEndpointsBatchRequest(input *UpdateEndpointsBatchInput) // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch func (c *Pinpoint) UpdateEndpointsBatch(input *UpdateEndpointsBatchInput) (*UpdateEndpointsBatchOutput, error) { @@ -5519,16 +6383,22 @@ func (c *Pinpoint) UpdateGcmChannelRequest(input *UpdateGcmChannelInput) (req *r // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel func (c *Pinpoint) UpdateGcmChannel(input *UpdateGcmChannelInput) (*UpdateGcmChannelOutput, error) { @@ -5607,16 +6477,22 @@ func (c *Pinpoint) UpdateSegmentRequest(input *UpdateSegmentInput) (req *request // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment func (c *Pinpoint) UpdateSegment(input *UpdateSegmentInput) (*UpdateSegmentOutput, error) { @@ -5684,7 +6560,7 @@ func (c *Pinpoint) UpdateSmsChannelRequest(input *UpdateSmsChannelInput) (req *r // UpdateSmsChannel API operation for Amazon Pinpoint. // -// Update an SMS channel +// Update an SMS channel. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5695,16 +6571,22 @@ func (c *Pinpoint) UpdateSmsChannelRequest(input *UpdateSmsChannelInput) (req *r // // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" +// Simple message object. // // * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. // // * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. // // * ErrCodeNotFoundException "NotFoundException" +// Simple message object. // // * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. // // See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel func (c *Pinpoint) UpdateSmsChannel(input *UpdateSmsChannelInput) (*UpdateSmsChannelOutput, error) { @@ -5783,9 +6665,7 @@ type ADMChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // Indicates whether the channel is configured with ADM credentials. Amazon - // Pinpoint uses your credentials to authenticate push notifications with ADM. - // Provide your credentials by setting the ClientId and ClientSecret attributes. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // Channel ID. Not used, only for backwards compatibility. @@ -5938,6 +6818,7 @@ type ADMMessage struct { // sound files must reside in /res/raw/ Sound *string `type:"string"` + // Default message substitutions. Can be overridden by individual address substitutions. Substitutions map[string][]*string `type:"map"` // The message title that displays above the message on the user's device. @@ -6157,11 +7038,7 @@ type APNSChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // Indicates whether the channel is configured with APNs credentials. Amazon - // Pinpoint uses your credentials to authenticate push notifications with APNs. - // To use APNs token authentication, set the BundleId, TeamId, TokenKey, and - // TokenKeyId attributes. To use certificate authentication, set the Certificate - // and PrivateKey attributes. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // Indicates whether the channel is configured with a key for APNs token authentication. @@ -6337,6 +7214,7 @@ type APNSMessage struct { // if you specify defaultfor the value, the system plays the default alert sound. Sound *string `type:"string"` + // Default message substitutions. Can be overridden by individual address substitutions. Substitutions map[string][]*string `type:"map"` // Provide this key with a string value that represents the app-specific identifier @@ -6573,11 +7451,7 @@ type APNSSandboxChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // Indicates whether the channel is configured with APNs credentials. Amazon - // Pinpoint uses your credentials to authenticate push notifications with APNs. - // To use APNs token authentication, set the BundleId, TeamId, TokenKey, and - // TokenKeyId attributes. To use certificate authentication, set the Certificate - // and PrivateKey attributes. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // Indicates whether the channel is configured with a key for APNs token authentication. @@ -6788,7 +7662,7 @@ type APNSVoipChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // If the channel is registered with a credential for authentication. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // If the channel is registered with a token key for authentication. @@ -6998,7 +7872,7 @@ type APNSVoipSandboxChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // If the channel is registered with a credential for authentication. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // If the channel is registered with a token key for authentication. @@ -7284,6 +8158,9 @@ type AddressConfiguration struct { // the message. RawContent *string `type:"string"` + // A map of substitution values for the message to be merged with the DefaultMessage's + // substitutions. Substitutions on this map take precedence over the all other + // substitutions. Substitutions map[string][]*string `type:"map"` // Title override. If specified will override default title if applicable. @@ -7476,6 +8353,9 @@ type AttributeDimension struct { // from the segment. AttributeType *string `type:"string" enum:"AttributeType"` + // The criteria values for the segment dimension. Endpoints with matching attribute + // values are included or excluded from the segment, depending on the setting + // for Type. Values []*string `type:"list"` } @@ -7501,6 +8381,48 @@ func (s *AttributeDimension) SetValues(v []*string) *AttributeDimension { return s } +// Attributes. +type AttributesResource struct { + _ struct{} `type:"structure"` + + // The unique ID for the application. + ApplicationId *string `type:"string"` + + // The attribute type for the application. + AttributeType *string `type:"string"` + + // The attributes for the application. + Attributes []*string `type:"list"` +} + +// String returns the string representation +func (s AttributesResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributesResource) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *AttributesResource) SetApplicationId(v string) *AttributesResource { + s.ApplicationId = &v + return s +} + +// SetAttributeType sets the AttributeType field's value. +func (s *AttributesResource) SetAttributeType(v string) *AttributesResource { + s.AttributeType = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *AttributesResource) SetAttributes(v []*string) *AttributesResource { + s.Attributes = v + return s +} + // Baidu Cloud Push credentials type BaiduChannelRequest struct { _ struct{} `type:"structure"` @@ -7559,10 +8481,7 @@ type BaiduChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // Indicates whether the channel is configured with Baidu Cloud Push credentials. - // Amazon Pinpoint uses your credentials to authenticate push notifications - // with Baidu Cloud Push. Provide your credentials by setting the ApiKey and - // SecretKey attributes. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // Channel ID. Not used, only for backwards compatibility. @@ -7708,8 +8627,14 @@ type BaiduMessage struct { // sound files must reside in /res/raw/ Sound *string `type:"string"` + // Default message substitutions. Can be overridden by individual address substitutions. Substitutions map[string][]*string `type:"map"` + // This parameter specifies how long (in seconds) the message should be kept + // in Baidu storage if the device is offline. The and the default value and + // the maximum time to live supported is 7 days (604800 seconds) + TimeToLive *int64 `type:"integer"` + // The message title that displays above the message on the user's device. Title *string `type:"string"` @@ -7794,6 +8719,12 @@ func (s *BaiduMessage) SetSubstitutions(v map[string][]*string) *BaiduMessage { return s } +// SetTimeToLive sets the TimeToLive field's value. +func (s *BaiduMessage) SetTimeToLive(v int64) *BaiduMessage { + s.TimeToLive = &v + return s +} + // SetTitle sets the Title field's value. func (s *BaiduMessage) SetTitle(v string) *BaiduMessage { s.Title = &v @@ -7858,6 +8789,7 @@ func (s *CampaignEmailMessage) SetTitle(v string) *CampaignEmailMessage { return s } +// Campaign hook information. type CampaignHook struct { _ struct{} `type:"structure"` @@ -8206,53 +9138,174 @@ type CampaignState struct { CampaignStatus *string `type:"string" enum:"CampaignStatus"` } -// String returns the string representation -func (s CampaignState) String() string { - return awsutil.Prettify(s) +// String returns the string representation +func (s CampaignState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignState) GoString() string { + return s.String() +} + +// SetCampaignStatus sets the CampaignStatus field's value. +func (s *CampaignState) SetCampaignStatus(v string) *CampaignState { + s.CampaignStatus = &v + return s +} + +// List of available campaigns. +type CampaignsResponse struct { + _ struct{} `type:"structure"` + + // A list of campaigns. + Item []*CampaignResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s CampaignsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *CampaignsResponse) SetItem(v []*CampaignResponse) *CampaignsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *CampaignsResponse) SetNextToken(v string) *CampaignsResponse { + s.NextToken = &v + return s +} + +// Base definition for channel response. +type ChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s ChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ChannelResponse) SetApplicationId(v string) *ChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ChannelResponse) SetCreationDate(v string) *ChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ChannelResponse) SetEnabled(v bool) *ChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *ChannelResponse) SetHasCredential(v bool) *ChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *ChannelResponse) SetId(v string) *ChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *ChannelResponse) SetIsArchived(v bool) *ChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *ChannelResponse) SetLastModifiedBy(v string) *ChannelResponse { + s.LastModifiedBy = &v + return s } -// GoString returns the string representation -func (s CampaignState) GoString() string { - return s.String() +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *ChannelResponse) SetLastModifiedDate(v string) *ChannelResponse { + s.LastModifiedDate = &v + return s } -// SetCampaignStatus sets the CampaignStatus field's value. -func (s *CampaignState) SetCampaignStatus(v string) *CampaignState { - s.CampaignStatus = &v +// SetVersion sets the Version field's value. +func (s *ChannelResponse) SetVersion(v int64) *ChannelResponse { + s.Version = &v return s } -// List of available campaigns. -type CampaignsResponse struct { +// Get channels definition +type ChannelsResponse struct { _ struct{} `type:"structure"` - // A list of campaigns. - Item []*CampaignResponse `type:"list"` - - // The string that you use in a subsequent request to get the next page of results - // in a paginated response. - NextToken *string `type:"string"` + // A map of channels, with the ChannelType as the key and the Channel as the + // value. + Channels map[string]*ChannelResponse `type:"map"` } // String returns the string representation -func (s CampaignsResponse) String() string { +func (s ChannelsResponse) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CampaignsResponse) GoString() string { +func (s ChannelsResponse) GoString() string { return s.String() } -// SetItem sets the Item field's value. -func (s *CampaignsResponse) SetItem(v []*CampaignResponse) *CampaignsResponse { - s.Item = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *CampaignsResponse) SetNextToken(v string) *CampaignsResponse { - s.NextToken = &v +// SetChannels sets the Channels field's value. +func (s *ChannelsResponse) SetChannels(v map[string]*ChannelResponse) *ChannelsResponse { + s.Channels = v return s } @@ -8424,6 +9477,8 @@ type CreateExportJobInput struct { // ApplicationId is a required field ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + // Export job request. + // // ExportJobRequest is a required field ExportJobRequest *ExportJobRequest `type:"structure" required:"true"` } @@ -8469,6 +9524,8 @@ func (s *CreateExportJobInput) SetExportJobRequest(v *ExportJobRequest) *CreateE type CreateExportJobOutput struct { _ struct{} `type:"structure" payload:"ExportJobResponse"` + // Export job response. + // // ExportJobResponse is a required field ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` } @@ -8495,6 +9552,8 @@ type CreateImportJobInput struct { // ApplicationId is a required field ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + // Import job request. + // // ImportJobRequest is a required field ImportJobRequest *ImportJobRequest `type:"structure" required:"true"` } @@ -8540,6 +9599,8 @@ func (s *CreateImportJobInput) SetImportJobRequest(v *ImportJobRequest) *CreateI type CreateImportJobOutput struct { _ struct{} `type:"structure" payload:"ImportJobResponse"` + // Import job response. + // // ImportJobResponse is a required field ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` } @@ -8642,6 +9703,7 @@ type DefaultMessage struct { // The message body of the notification, the email body or the text message. Body *string `type:"string"` + // Default message substitutions. Can be overridden by individual address substitutions. Substitutions map[string][]*string `type:"map"` } @@ -8691,6 +9753,7 @@ type DefaultPushNotificationMessage struct { // can be used for Remote Configuration and Phone Home use cases. SilentPush *bool `type:"boolean"` + // Default message substitutions. Can be overridden by individual address substitutions. Substitutions map[string][]*string `type:"map"` // The message title that displays above the message on the user's device. @@ -9390,8 +10453,6 @@ func (s *DeleteEndpointOutput) SetEndpointResponse(v *EndpointResponse) *DeleteE type DeleteEventStreamInput struct { _ struct{} `type:"structure"` - // Application Id. - // // ApplicationId is a required field ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` } @@ -9645,7 +10706,81 @@ func (s *DeleteSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *D return s } -// The message configuration. +type DeleteUserEndpointsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // UserId is a required field + UserId *string `location:"uri" locationName:"user-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteUserEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserEndpointsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.UserId == nil { + invalidParams.Add(request.NewErrParamRequired("UserId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteUserEndpointsInput) SetApplicationId(v string) *DeleteUserEndpointsInput { + s.ApplicationId = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *DeleteUserEndpointsInput) SetUserId(v string) *DeleteUserEndpointsInput { + s.UserId = &v + return s +} + +type DeleteUserEndpointsOutput struct { + _ struct{} `type:"structure" payload:"EndpointsResponse"` + + // List of endpoints + // + // EndpointsResponse is a required field + EndpointsResponse *EndpointsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteUserEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpointsResponse sets the EndpointsResponse field's value. +func (s *DeleteUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) *DeleteUserEndpointsOutput { + s.EndpointsResponse = v + return s +} + +// Message definitions for the default message and any messages that are tailored +// for specific channels. type DirectMessageConfiguration struct { _ struct{} `type:"structure"` @@ -9792,7 +10927,7 @@ type EmailChannelResponse struct { // The email address used to send emails from. FromAddress *string `type:"string"` - // If the channel is registered with a credential for authentication. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // Channel ID. Not used, only for backwards compatibility. @@ -9810,6 +10945,9 @@ type EmailChannelResponse struct { // Last date this was updated LastModifiedDate *string `type:"string"` + // Messages per second that can be sent + MessagesPerSecond *int64 `type:"integer"` + // Platform type. Will be "EMAIL" Platform *string `type:"string"` @@ -9891,6 +11029,12 @@ func (s *EmailChannelResponse) SetLastModifiedDate(v string) *EmailChannelRespon return s } +// SetMessagesPerSecond sets the MessagesPerSecond field's value. +func (s *EmailChannelResponse) SetMessagesPerSecond(v int64) *EmailChannelResponse { + s.MessagesPerSecond = &v + return s +} + // SetPlatform sets the Platform field's value. func (s *EmailChannelResponse) SetPlatform(v string) *EmailChannelResponse { s.Platform = &v @@ -9913,10 +11057,21 @@ func (s *EmailChannelResponse) SetVersion(v int64) *EmailChannelResponse { type EndpointBatchItem struct { _ struct{} `type:"structure"` - // The address or token of the endpoint as provided by your push provider (e.g. - // DeviceToken or RegistrationId). + // The destination for messages that you send to this endpoint. The address + // varies by channel. For mobile push channels, use the token provided by the + // push notification service, such as the APNs device token or the FCM registration + // token. For the SMS channel, use a phone number in E.164 format, such as +1206XXX5550100. + // For the email channel, use an email address. Address *string `type:"string"` + // Custom attributes that describe the endpoint by associating a name with an + // array of values. For example, an attribute named "interests" might have the + // values ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create a segment of users to engage with a messaging + // campaign.The following characters are not recommended in attribute names: + // # : ? \ /. The Amazon Pinpoint console does not display attributes that include + // these characters in the name. This limitation does not apply to attribute + // values. Attributes map[string][]*string `type:"map"` // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX @@ -9929,8 +11084,7 @@ type EndpointBatchItem struct { // The last time the endpoint was updated. Provided in ISO 8601 format. EffectiveDate *string `type:"string"` - // The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE - // if a delivery fails. Will be set to ACTIVE if the address is updated. + // Unused. EndpointStatus *string `type:"string"` // The unique Id for the Endpoint in the batch. @@ -10230,6 +11384,9 @@ type EndpointMessageResult struct { // Delivery status of message. DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` + // Unique message identifier associated with the message that was sent. + MessageId *string `type:"string"` + // Downstream service status code. StatusCode *int64 `type:"integer"` @@ -10262,6 +11419,12 @@ func (s *EndpointMessageResult) SetDeliveryStatus(v string) *EndpointMessageResu return s } +// SetMessageId sets the MessageId field's value. +func (s *EndpointMessageResult) SetMessageId(v string) *EndpointMessageResult { + s.MessageId = &v + return s +} + // SetStatusCode sets the StatusCode field's value. func (s *EndpointMessageResult) SetStatusCode(v int64) *EndpointMessageResult { s.StatusCode = &v @@ -10284,10 +11447,21 @@ func (s *EndpointMessageResult) SetUpdatedToken(v string) *EndpointMessageResult type EndpointRequest struct { _ struct{} `type:"structure"` - // The address or token of the endpoint as provided by your push provider (e.g. - // DeviceToken or RegistrationId). + // The destination for messages that you send to this endpoint. The address + // varies by channel. For mobile push channels, use the token provided by the + // push notification service, such as the APNs device token or the FCM registration + // token. For the SMS channel, use a phone number in E.164 format, such as +1206XXX5550100. + // For the email channel, use an email address. Address *string `type:"string"` + // Custom attributes that describe the endpoint by associating a name with an + // array of values. For example, an attribute named "interests" might have the + // values ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create a segment of users to engage with a messaging + // campaign.The following characters are not recommended in attribute names: + // # : ? \ /. The Amazon Pinpoint console does not display attributes that include + // these characters in the name. This limitation does not apply to attribute + // values. Attributes map[string][]*string `type:"map"` // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX @@ -10300,8 +11474,7 @@ type EndpointRequest struct { // The last time the endpoint was updated. Provided in ISO 8601 format. EffectiveDate *string `type:"string"` - // The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE - // if a delivery fails. Will be set to ACTIVE if the address is updated. + // Unused. EndpointStatus *string `type:"string"` // The endpoint location attributes. @@ -10409,6 +11582,14 @@ type EndpointResponse struct { // The ID of the application associated with the endpoint. ApplicationId *string `type:"string"` + // Custom attributes that describe the endpoint by associating a name with an + // array of values. For example, an attribute named "interests" might have the + // values ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create a segment of users to engage with a messaging + // campaign.The following characters are not recommended in attribute names: + // # : ? \ /. The Amazon Pinpoint console does not display attributes that include + // these characters in the name. This limitation does not apply to attribute + // values. Attributes map[string][]*string `type:"map"` // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX @@ -10430,8 +11611,7 @@ type EndpointResponse struct { // The last time the endpoint was updated. Provided in ISO 8601 format. EffectiveDate *string `type:"string"` - // The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE - // if a delivery fails. Will be set to ACTIVE if the address is updated. + // Unused. EndpointStatus *string `type:"string"` // The unique ID that you assigned to the endpoint. The ID should be a globally @@ -10573,6 +11753,9 @@ type EndpointSendConfiguration struct { // the message. RawContent *string `type:"string"` + // A map of substitution values for the message to be merged with the DefaultMessage's + // substitutions. Substitutions on this map take precedence over the all other + // substitutions. Substitutions map[string][]*string `type:"map"` // Title override. If specified will override default title if applicable. @@ -10623,6 +11806,14 @@ func (s *EndpointSendConfiguration) SetTitleOverride(v string) *EndpointSendConf type EndpointUser struct { _ struct{} `type:"structure"` + // Custom attributes that describe an end user by associating a name with an + // array of values. For example, an attribute named "interests" might have the + // values ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create a segment of users to engage with a messaging + // campaign.The following characters are not recommended in attribute names: + // # : ? \ /. The Amazon Pinpoint console does not display attributes that include + // these characters in the name. This limitation does not apply to attribute + // values. UserAttributes map[string][]*string `type:"map"` // The unique ID of the user. @@ -10651,6 +11842,30 @@ func (s *EndpointUser) SetUserId(v string) *EndpointUser { return s } +// List of endpoints +type EndpointsResponse struct { + _ struct{} `type:"structure"` + + // The list of endpoints. + Item []*EndpointResponse `type:"list"` +} + +// String returns the string representation +func (s EndpointsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *EndpointsResponse) SetItem(v []*EndpointResponse) *EndpointsResponse { + s.Item = v + return s +} + // Model for an event publishing subscription export. type EventStream struct { _ struct{} `type:"structure"` @@ -10726,6 +11941,7 @@ func (s *EventStream) SetRoleArn(v string) *EventStream { return s } +// Export job request. type ExportJobRequest struct { _ struct{} `type:"structure"` @@ -10739,9 +11955,12 @@ type ExportJobRequest struct { // export endpoints to this location. S3UrlPrefix *string `type:"string"` - // The ID of the segment to export endpoints from. If not present, all endpoints - // will be exported. + // The ID of the segment to export endpoints from. If not present, Amazon Pinpoint + // exports all of the endpoints that belong to the application. SegmentId *string `type:"string"` + + // The version of the segment to export if specified. + SegmentVersion *int64 `type:"integer"` } // String returns the string representation @@ -10772,6 +11991,13 @@ func (s *ExportJobRequest) SetSegmentId(v string) *ExportJobRequest { return s } +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *ExportJobRequest) SetSegmentVersion(v int64) *ExportJobRequest { + s.SegmentVersion = &v + return s +} + +// Export job resource. type ExportJobResource struct { _ struct{} `type:"structure"` @@ -10785,9 +12011,12 @@ type ExportJobResource struct { // export endpoints to this location. S3UrlPrefix *string `type:"string"` - // The ID of the segment to export endpoints from. If not present all endpoints - // will be exported. + // The ID of the segment to export endpoints from. If not present, Amazon Pinpoint + // exports all of the endpoints that belong to the application. SegmentId *string `type:"string"` + + // The version of the segment to export if specified. + SegmentVersion *int64 `type:"integer"` } // String returns the string representation @@ -10818,6 +12047,13 @@ func (s *ExportJobResource) SetSegmentId(v string) *ExportJobResource { return s } +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *ExportJobResource) SetSegmentVersion(v int64) *ExportJobResource { + s.SegmentVersion = &v + return s +} + +// Export job response. type ExportJobResponse struct { _ struct{} `type:"structure"` @@ -10840,14 +12076,15 @@ type ExportJobResponse struct { // The number of pieces that failed to be processed as of the time of the request. FailedPieces *int64 `type:"integer"` + // Provides up to 100 of the first failed entries for the job, if any exist. Failures []*string `type:"list"` // The unique ID of the job. Id *string `type:"string"` - // The status of the export job.Valid values: CREATED, INITIALIZING, PROCESSING, - // COMPLETING, COMPLETED, FAILING, FAILEDThe job status is FAILED if one or - // more pieces failed. + // The status of the job.Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, + // COMPLETED, FAILING, FAILEDThe job status is FAILED if one or more pieces + // failed. JobStatus *string `type:"string" enum:"JobStatus"` // The number of endpoints that were not processed; for example, because of @@ -11036,9 +12273,7 @@ type GCMChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // Indicates whether the channel is configured with FCM or GCM credentials. - // Amazon Pinpoint uses your credentials to authenticate push notifications - // with FCM or GCM. Provide your credentials by setting the ApiKey attribute. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // Channel ID. Not used. Present only for backwards compatibility. @@ -11204,6 +12439,7 @@ type GCMMessage struct { // sound files must reside in /res/raw/ Sound *string `type:"string"` + // Default message substitutions. Can be overridden by individual address substitutions. Substitutions map[string][]*string `type:"map"` // The length of time (in seconds) that FCM or GCM stores and attempts to deliver @@ -11332,6 +12568,72 @@ func (s *GCMMessage) SetUrl(v string) *GCMMessage { return s } +// GPS coordinates +type GPSCoordinates struct { + _ struct{} `type:"structure"` + + // Latitude + Latitude *float64 `type:"double"` + + // Longitude + Longitude *float64 `type:"double"` +} + +// String returns the string representation +func (s GPSCoordinates) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GPSCoordinates) GoString() string { + return s.String() +} + +// SetLatitude sets the Latitude field's value. +func (s *GPSCoordinates) SetLatitude(v float64) *GPSCoordinates { + s.Latitude = &v + return s +} + +// SetLongitude sets the Longitude field's value. +func (s *GPSCoordinates) SetLongitude(v float64) *GPSCoordinates { + s.Longitude = &v + return s +} + +// GPS point location dimension +type GPSPointDimension struct { + _ struct{} `type:"structure"` + + // Coordinate to measure distance from. + Coordinates *GPSCoordinates `type:"structure"` + + // Range in kilometers from the coordinate. + RangeInKilometers *float64 `type:"double"` +} + +// String returns the string representation +func (s GPSPointDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GPSPointDimension) GoString() string { + return s.String() +} + +// SetCoordinates sets the Coordinates field's value. +func (s *GPSPointDimension) SetCoordinates(v *GPSCoordinates) *GPSPointDimension { + s.Coordinates = v + return s +} + +// SetRangeInKilometers sets the RangeInKilometers field's value. +func (s *GPSPointDimension) SetRangeInKilometers(v float64) *GPSPointDimension { + s.RangeInKilometers = &v + return s +} + type GetAdmChannelInput struct { _ struct{} `type:"structure"` @@ -12246,45 +13548,106 @@ func (s *GetCampaignsInput) Validate() error { } // SetApplicationId sets the ApplicationId field's value. -func (s *GetCampaignsInput) SetApplicationId(v string) *GetCampaignsInput { +func (s *GetCampaignsInput) SetApplicationId(v string) *GetCampaignsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetCampaignsInput) SetPageSize(v string) *GetCampaignsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetCampaignsInput) SetToken(v string) *GetCampaignsInput { + s.Token = &v + return s +} + +type GetCampaignsOutput struct { + _ struct{} `type:"structure" payload:"CampaignsResponse"` + + // List of available campaigns. + // + // CampaignsResponse is a required field + CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignsOutput) GoString() string { + return s.String() +} + +// SetCampaignsResponse sets the CampaignsResponse field's value. +func (s *GetCampaignsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignsOutput { + s.CampaignsResponse = v + return s +} + +type GetChannelsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetChannelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetChannelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetChannelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetChannelsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetChannelsInput) SetApplicationId(v string) *GetChannelsInput { s.ApplicationId = &v return s } -// SetPageSize sets the PageSize field's value. -func (s *GetCampaignsInput) SetPageSize(v string) *GetCampaignsInput { - s.PageSize = &v - return s -} - -// SetToken sets the Token field's value. -func (s *GetCampaignsInput) SetToken(v string) *GetCampaignsInput { - s.Token = &v - return s -} - -type GetCampaignsOutput struct { - _ struct{} `type:"structure" payload:"CampaignsResponse"` +type GetChannelsOutput struct { + _ struct{} `type:"structure" payload:"ChannelsResponse"` - // List of available campaigns. + // Get channels definition // - // CampaignsResponse is a required field - CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` + // ChannelsResponse is a required field + ChannelsResponse *ChannelsResponse `type:"structure" required:"true"` } // String returns the string representation -func (s GetCampaignsOutput) String() string { +func (s GetChannelsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetCampaignsOutput) GoString() string { +func (s GetChannelsOutput) GoString() string { return s.String() } -// SetCampaignsResponse sets the CampaignsResponse field's value. -func (s *GetCampaignsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignsOutput { - s.CampaignsResponse = v +// SetChannelsResponse sets the ChannelsResponse field's value. +func (s *GetChannelsOutput) SetChannelsResponse(v *ChannelsResponse) *GetChannelsOutput { + s.ChannelsResponse = v return s } @@ -12425,8 +13788,6 @@ func (s *GetEndpointOutput) SetEndpointResponse(v *EndpointResponse) *GetEndpoin type GetEventStreamInput struct { _ struct{} `type:"structure"` - // Application Id. - // // ApplicationId is a required field ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` } @@ -12536,6 +13897,8 @@ func (s *GetExportJobInput) SetJobId(v string) *GetExportJobInput { type GetExportJobOutput struct { _ struct{} `type:"structure" payload:"ExportJobResponse"` + // Export job response. + // // ExportJobResponse is a required field ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` } @@ -12745,6 +14108,8 @@ func (s *GetImportJobInput) SetJobId(v string) *GetImportJobInput { type GetImportJobOutput struct { _ struct{} `type:"structure" payload:"ImportJobResponse"` + // Import job response. + // // ImportJobResponse is a required field ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` } @@ -13405,6 +14770,80 @@ func (s *GetSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *GetS return s } +type GetUserEndpointsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // UserId is a required field + UserId *string `location:"uri" locationName:"user-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetUserEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUserEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetUserEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetUserEndpointsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.UserId == nil { + invalidParams.Add(request.NewErrParamRequired("UserId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetUserEndpointsInput) SetApplicationId(v string) *GetUserEndpointsInput { + s.ApplicationId = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *GetUserEndpointsInput) SetUserId(v string) *GetUserEndpointsInput { + s.UserId = &v + return s +} + +type GetUserEndpointsOutput struct { + _ struct{} `type:"structure" payload:"EndpointsResponse"` + + // List of endpoints + // + // EndpointsResponse is a required field + EndpointsResponse *EndpointsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetUserEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUserEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpointsResponse sets the EndpointsResponse field's value. +func (s *GetUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) *GetUserEndpointsOutput { + s.EndpointsResponse = v + return s +} + +// Import job request. type ImportJobRequest struct { _ struct{} `type:"structure"` @@ -13502,6 +14941,7 @@ func (s *ImportJobRequest) SetSegmentName(v string) *ImportJobRequest { return s } +// Import job resource type ImportJobResource struct { _ struct{} `type:"structure"` @@ -13599,6 +15039,7 @@ func (s *ImportJobResource) SetSegmentName(v string) *ImportJobResource { return s } +// Import job response. type ImportJobResponse struct { _ struct{} `type:"structure"` @@ -13621,6 +15062,7 @@ type ImportJobResponse struct { // The number of pieces that have failed to import as of the time of the request. FailedPieces *int64 `type:"integer"` + // Provides up to 100 of the first failed entries for the job, if any exist. Failures []*string `type:"list"` // The unique ID of the import job. @@ -13768,6 +15210,7 @@ func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { return s } +// Message to send type Message struct { _ struct{} `type:"structure"` @@ -13807,6 +15250,14 @@ type Message struct { // can be used for Remote Configuration and Phone Home use cases. SilentPush *bool `type:"boolean"` + // This parameter specifies how long (in seconds) the message should be kept + // if the service is unable to deliver the notification the first time. If the + // value is 0, it treats the notification as if it expires immediately and does + // not store the notification or attempt to redeliver it. This value is converted + // to the expiration field when sent to the service. It only applies to APNs + // and GCM + TimeToLive *int64 `type:"integer"` + // The message title that displays above the message on the user's device. Title *string `type:"string"` @@ -13879,6 +15330,12 @@ func (s *Message) SetSilentPush(v bool) *Message { return s } +// SetTimeToLive sets the TimeToLive field's value. +func (s *Message) SetTimeToLive(v int64) *Message { + s.TimeToLive = &v + return s +} + // SetTitle sets the Title field's value. func (s *Message) SetTitle(v string) *Message { s.Title = &v @@ -13895,7 +15352,7 @@ func (s *Message) SetUrl(v string) *Message { type MessageBody struct { _ struct{} `type:"structure"` - // The error message returned from the API. + // The error message that's returned from the API. Message *string `type:"string"` // The unique message body ID. @@ -14010,8 +15467,9 @@ func (s *MessageConfiguration) SetSMSMessage(v *CampaignSmsMessage) *MessageConf type MessageRequest struct { _ struct{} `type:"structure"` - // A map of destination addresses, with the address as the key(Email address, - // phone number or push token) and the Address Configuration as the value. + // A map of key-value pairs, where each key is an address and each value is + // an AddressConfiguration object. An address can be a push notification token, + // a phone number, or an email address. Addresses map[string]*AddressConfiguration `type:"map"` // A map of custom attributes to attributes to be attached to the message. This @@ -14019,8 +15477,10 @@ type MessageRequest struct { // to the email/sms delivery receipt event attributes. Context map[string]*string `type:"map"` - // A map of destination addresses, with the address as the key(Email address, - // phone number or push token) and the Address Configuration as the value. + // A map of key-value pairs, where each key is an endpoint ID and each value + // is an EndpointSendConfiguration object. Within an EndpointSendConfiguration + // object, you can tailor the message for an endpoint by specifying message + // overrides or substitutions. Endpoints map[string]*EndpointSendConfiguration `type:"map"` // Message configuration. @@ -14109,72 +15569,354 @@ func (s *MessageResponse) SetRequestId(v string) *MessageResponse { return s } -// SetResult sets the Result field's value. -func (s *MessageResponse) SetResult(v map[string]*MessageResult) *MessageResponse { - s.Result = v +// SetResult sets the Result field's value. +func (s *MessageResponse) SetResult(v map[string]*MessageResult) *MessageResponse { + s.Result = v + return s +} + +// The result from sending a message to an address. +type MessageResult struct { + _ struct{} `type:"structure"` + + // Delivery status of message. + DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` + + // Unique message identifier associated with the message that was sent. + MessageId *string `type:"string"` + + // Downstream service status code. + StatusCode *int64 `type:"integer"` + + // Status message for message delivery. + StatusMessage *string `type:"string"` + + // If token was updated as part of delivery. (This is GCM Specific) + UpdatedToken *string `type:"string"` +} + +// String returns the string representation +func (s MessageResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageResult) GoString() string { + return s.String() +} + +// SetDeliveryStatus sets the DeliveryStatus field's value. +func (s *MessageResult) SetDeliveryStatus(v string) *MessageResult { + s.DeliveryStatus = &v + return s +} + +// SetMessageId sets the MessageId field's value. +func (s *MessageResult) SetMessageId(v string) *MessageResult { + s.MessageId = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *MessageResult) SetStatusCode(v int64) *MessageResult { + s.StatusCode = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *MessageResult) SetStatusMessage(v string) *MessageResult { + s.StatusMessage = &v + return s +} + +// SetUpdatedToken sets the UpdatedToken field's value. +func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { + s.UpdatedToken = &v + return s +} + +// Custom metric dimension +type MetricDimension struct { + _ struct{} `type:"structure"` + + // GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL + ComparisonOperator *string `type:"string"` + + // Value to be compared. + Value *float64 `type:"double"` +} + +// String returns the string representation +func (s MetricDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricDimension) GoString() string { + return s.String() +} + +// SetComparisonOperator sets the ComparisonOperator field's value. +func (s *MetricDimension) SetComparisonOperator(v string) *MetricDimension { + s.ComparisonOperator = &v + return s +} + +// SetValue sets the Value field's value. +func (s *MetricDimension) SetValue(v float64) *MetricDimension { + s.Value = &v + return s +} + +// Phone Number Information request. +type NumberValidateRequest struct { + _ struct{} `type:"structure"` + + // (Optional) The two-character ISO country code for the country where the phone + // number was originally registered. + IsoCountryCode *string `type:"string"` + + // The phone number to get information about. + PhoneNumber *string `type:"string"` +} + +// String returns the string representation +func (s NumberValidateRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NumberValidateRequest) GoString() string { + return s.String() +} + +// SetIsoCountryCode sets the IsoCountryCode field's value. +func (s *NumberValidateRequest) SetIsoCountryCode(v string) *NumberValidateRequest { + s.IsoCountryCode = &v + return s +} + +// SetPhoneNumber sets the PhoneNumber field's value. +func (s *NumberValidateRequest) SetPhoneNumber(v string) *NumberValidateRequest { + s.PhoneNumber = &v + return s +} + +// Phone Number Information response. +type NumberValidateResponse struct { + _ struct{} `type:"structure"` + + // The carrier that the phone number is registered with. + Carrier *string `type:"string"` + + // The city where the phone number was originally registered. + City *string `type:"string"` + + // The cleansed (standardized) phone number in E.164 format. + CleansedPhoneNumberE164 *string `type:"string"` + + // The cleansed phone number in national format. + CleansedPhoneNumberNational *string `type:"string"` + + // The country where the phone number was originally registered. + Country *string `type:"string"` + + // The two-character ISO country code for the country where the phone number + // was originally registered. + CountryCodeIso2 *string `type:"string"` + + // The numeric country code for the country where the phone number was originally + // registered. + CountryCodeNumeric *string `type:"string"` + + // The county where the phone number was originally registered. + County *string `type:"string"` + + // The two-character ISO country code that was included in the request body. + OriginalCountryCodeIso2 *string `type:"string"` + + // The phone number that you included in the request body. + OriginalPhoneNumber *string `type:"string"` + + // A description of the phone type. Possible values include MOBILE, LANDLINE, + // VOIP, INVALID, and OTHER. + PhoneType *string `type:"string"` + + // The phone type as an integer. Possible values include 0 (MOBILE), 1 (LANDLINE), + // 2 (VOIP), 3 (INVALID), and 4 (OTHER). + PhoneTypeCode *int64 `type:"integer"` + + // The time zone for the location where the phone number was originally registered. + Timezone *string `type:"string"` + + // The zip code for the location where the phone number was originally registered. + ZipCode *string `type:"string"` +} + +// String returns the string representation +func (s NumberValidateResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NumberValidateResponse) GoString() string { + return s.String() +} + +// SetCarrier sets the Carrier field's value. +func (s *NumberValidateResponse) SetCarrier(v string) *NumberValidateResponse { + s.Carrier = &v + return s +} + +// SetCity sets the City field's value. +func (s *NumberValidateResponse) SetCity(v string) *NumberValidateResponse { + s.City = &v + return s +} + +// SetCleansedPhoneNumberE164 sets the CleansedPhoneNumberE164 field's value. +func (s *NumberValidateResponse) SetCleansedPhoneNumberE164(v string) *NumberValidateResponse { + s.CleansedPhoneNumberE164 = &v + return s +} + +// SetCleansedPhoneNumberNational sets the CleansedPhoneNumberNational field's value. +func (s *NumberValidateResponse) SetCleansedPhoneNumberNational(v string) *NumberValidateResponse { + s.CleansedPhoneNumberNational = &v + return s +} + +// SetCountry sets the Country field's value. +func (s *NumberValidateResponse) SetCountry(v string) *NumberValidateResponse { + s.Country = &v + return s +} + +// SetCountryCodeIso2 sets the CountryCodeIso2 field's value. +func (s *NumberValidateResponse) SetCountryCodeIso2(v string) *NumberValidateResponse { + s.CountryCodeIso2 = &v + return s +} + +// SetCountryCodeNumeric sets the CountryCodeNumeric field's value. +func (s *NumberValidateResponse) SetCountryCodeNumeric(v string) *NumberValidateResponse { + s.CountryCodeNumeric = &v + return s +} + +// SetCounty sets the County field's value. +func (s *NumberValidateResponse) SetCounty(v string) *NumberValidateResponse { + s.County = &v + return s +} + +// SetOriginalCountryCodeIso2 sets the OriginalCountryCodeIso2 field's value. +func (s *NumberValidateResponse) SetOriginalCountryCodeIso2(v string) *NumberValidateResponse { + s.OriginalCountryCodeIso2 = &v + return s +} + +// SetOriginalPhoneNumber sets the OriginalPhoneNumber field's value. +func (s *NumberValidateResponse) SetOriginalPhoneNumber(v string) *NumberValidateResponse { + s.OriginalPhoneNumber = &v + return s +} + +// SetPhoneType sets the PhoneType field's value. +func (s *NumberValidateResponse) SetPhoneType(v string) *NumberValidateResponse { + s.PhoneType = &v + return s +} + +// SetPhoneTypeCode sets the PhoneTypeCode field's value. +func (s *NumberValidateResponse) SetPhoneTypeCode(v int64) *NumberValidateResponse { + s.PhoneTypeCode = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *NumberValidateResponse) SetTimezone(v string) *NumberValidateResponse { + s.Timezone = &v + return s +} + +// SetZipCode sets the ZipCode field's value. +func (s *NumberValidateResponse) SetZipCode(v string) *NumberValidateResponse { + s.ZipCode = &v return s } -// The result from sending a message to an address. -type MessageResult struct { - _ struct{} `type:"structure"` - - // Delivery status of message. - DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` - - // Downstream service status code. - StatusCode *int64 `type:"integer"` - - // Status message for message delivery. - StatusMessage *string `type:"string"` +type PhoneNumberValidateInput struct { + _ struct{} `type:"structure" payload:"NumberValidateRequest"` - // If token was updated as part of delivery. (This is GCM Specific) - UpdatedToken *string `type:"string"` + // Phone Number Information request. + // + // NumberValidateRequest is a required field + NumberValidateRequest *NumberValidateRequest `type:"structure" required:"true"` } // String returns the string representation -func (s MessageResult) String() string { +func (s PhoneNumberValidateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s MessageResult) GoString() string { +func (s PhoneNumberValidateInput) GoString() string { return s.String() } -// SetDeliveryStatus sets the DeliveryStatus field's value. -func (s *MessageResult) SetDeliveryStatus(v string) *MessageResult { - s.DeliveryStatus = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *PhoneNumberValidateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PhoneNumberValidateInput"} + if s.NumberValidateRequest == nil { + invalidParams.Add(request.NewErrParamRequired("NumberValidateRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetStatusCode sets the StatusCode field's value. -func (s *MessageResult) SetStatusCode(v int64) *MessageResult { - s.StatusCode = &v +// SetNumberValidateRequest sets the NumberValidateRequest field's value. +func (s *PhoneNumberValidateInput) SetNumberValidateRequest(v *NumberValidateRequest) *PhoneNumberValidateInput { + s.NumberValidateRequest = v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *MessageResult) SetStatusMessage(v string) *MessageResult { - s.StatusMessage = &v - return s +type PhoneNumberValidateOutput struct { + _ struct{} `type:"structure" payload:"NumberValidateResponse"` + + // Phone Number Information response. + // + // NumberValidateResponse is a required field + NumberValidateResponse *NumberValidateResponse `type:"structure" required:"true"` } -// SetUpdatedToken sets the UpdatedToken field's value. -func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { - s.UpdatedToken = &v +// String returns the string representation +func (s PhoneNumberValidateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PhoneNumberValidateOutput) GoString() string { + return s.String() +} + +// SetNumberValidateResponse sets the NumberValidateResponse field's value. +func (s *PhoneNumberValidateOutput) SetNumberValidateResponse(v *NumberValidateResponse) *PhoneNumberValidateOutput { + s.NumberValidateResponse = v return s } type PutEventStreamInput struct { _ struct{} `type:"structure" payload:"WriteEventStream"` - // Application Id. - // // ApplicationId is a required field ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` - // Write event stream wrapper. + // Request to save an EventStream. // // WriteEventStream is a required field WriteEventStream *WriteEventStream `type:"structure" required:"true"` @@ -14312,6 +16054,93 @@ func (s *RecencyDimension) SetRecencyType(v string) *RecencyDimension { return s } +type RemoveAttributesInput struct { + _ struct{} `type:"structure" payload:"UpdateAttributesRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // AttributeType is a required field + AttributeType *string `location:"uri" locationName:"attribute-type" type:"string" required:"true"` + + // Update attributes request + // + // UpdateAttributesRequest is a required field + UpdateAttributesRequest *UpdateAttributesRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RemoveAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveAttributesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveAttributesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.AttributeType == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeType")) + } + if s.UpdateAttributesRequest == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateAttributesRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *RemoveAttributesInput) SetApplicationId(v string) *RemoveAttributesInput { + s.ApplicationId = &v + return s +} + +// SetAttributeType sets the AttributeType field's value. +func (s *RemoveAttributesInput) SetAttributeType(v string) *RemoveAttributesInput { + s.AttributeType = &v + return s +} + +// SetUpdateAttributesRequest sets the UpdateAttributesRequest field's value. +func (s *RemoveAttributesInput) SetUpdateAttributesRequest(v *UpdateAttributesRequest) *RemoveAttributesInput { + s.UpdateAttributesRequest = v + return s +} + +type RemoveAttributesOutput struct { + _ struct{} `type:"structure" payload:"AttributesResource"` + + // Attributes. + // + // AttributesResource is a required field + AttributesResource *AttributesResource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RemoveAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveAttributesOutput) GoString() string { + return s.String() +} + +// SetAttributesResource sets the AttributesResource field's value. +func (s *RemoveAttributesOutput) SetAttributesResource(v *AttributesResource) *RemoveAttributesOutput { + s.AttributesResource = v + return s +} + // SMS Channel Request type SMSChannelRequest struct { _ struct{} `type:"structure"` @@ -14367,7 +16196,7 @@ type SMSChannelResponse struct { // If the channel is enabled for sending messages. Enabled *bool `type:"boolean"` - // If the channel is registered with a credential for authentication. + // Not used. Retained for backwards compatibility. HasCredential *bool `type:"boolean"` // Channel ID. Not used, only for backwards compatibility. @@ -14385,12 +16214,18 @@ type SMSChannelResponse struct { // Platform type. Will be "SMS" Platform *string `type:"string"` + // Promotional messages per second that can be sent + PromotionalMessagesPerSecond *int64 `type:"integer"` + // Sender identifier of your messages. SenderId *string `type:"string"` // The short code registered with the phone provider. ShortCode *string `type:"string"` + // Transactional messages per second that can be sent + TransactionalMessagesPerSecond *int64 `type:"integer"` + // Version of channel Version *int64 `type:"integer"` } @@ -14459,6 +16294,12 @@ func (s *SMSChannelResponse) SetPlatform(v string) *SMSChannelResponse { return s } +// SetPromotionalMessagesPerSecond sets the PromotionalMessagesPerSecond field's value. +func (s *SMSChannelResponse) SetPromotionalMessagesPerSecond(v int64) *SMSChannelResponse { + s.PromotionalMessagesPerSecond = &v + return s +} + // SetSenderId sets the SenderId field's value. func (s *SMSChannelResponse) SetSenderId(v string) *SMSChannelResponse { s.SenderId = &v @@ -14471,6 +16312,12 @@ func (s *SMSChannelResponse) SetShortCode(v string) *SMSChannelResponse { return s } +// SetTransactionalMessagesPerSecond sets the TransactionalMessagesPerSecond field's value. +func (s *SMSChannelResponse) SetTransactionalMessagesPerSecond(v int64) *SMSChannelResponse { + s.TransactionalMessagesPerSecond = &v + return s +} + // SetVersion sets the Version field's value. func (s *SMSChannelResponse) SetVersion(v int64) *SMSChannelResponse { s.Version = &v @@ -14481,9 +16328,13 @@ func (s *SMSChannelResponse) SetVersion(v int64) *SMSChannelResponse { type SMSMessage struct { _ struct{} `type:"structure"` - // The message body of the notification, the email body or the text message. + // The body of the SMS message. Body *string `type:"string"` + // The SMS program name that you provided to AWS Support when you requested + // your dedicated number. + Keyword *string `type:"string"` + // Is this a transaction priority message or lower priority. MessageType *string `type:"string" enum:"MessageType"` @@ -14497,6 +16348,7 @@ type SMSMessage struct { // Support for sender IDs varies by country or region. SenderId *string `type:"string"` + // Default message substitutions. Can be overridden by individual address substitutions. Substitutions map[string][]*string `type:"map"` } @@ -14516,6 +16368,12 @@ func (s *SMSMessage) SetBody(v string) *SMSMessage { return s } +// SetKeyword sets the Keyword field's value. +func (s *SMSMessage) SetKeyword(v string) *SMSMessage { + s.Keyword = &v + return s +} + // SetMessageType sets the MessageType field's value. func (s *SMSMessage) SetMessageType(v string) *SMSMessage { s.MessageType = &v @@ -14721,6 +16579,9 @@ type SegmentDimensions struct { // The segment location attributes. Location *SegmentLocation `type:"structure"` + // Custom segment metrics. + Metrics map[string]*MetricDimension `type:"map"` + // Custom segment user attributes. UserAttributes map[string]*AttributeDimension `type:"map"` } @@ -14759,12 +16620,103 @@ func (s *SegmentDimensions) SetLocation(v *SegmentLocation) *SegmentDimensions { return s } +// SetMetrics sets the Metrics field's value. +func (s *SegmentDimensions) SetMetrics(v map[string]*MetricDimension) *SegmentDimensions { + s.Metrics = v + return s +} + // SetUserAttributes sets the UserAttributes field's value. func (s *SegmentDimensions) SetUserAttributes(v map[string]*AttributeDimension) *SegmentDimensions { s.UserAttributes = v return s } +// Segment group definition. +type SegmentGroup struct { + _ struct{} `type:"structure"` + + // List of dimensions to include or exclude. + Dimensions []*SegmentDimensions `type:"list"` + + // Segments that define the source of this segment. Currently a maximum of 1 + // import segment is supported. + SourceSegments []*SegmentReference `type:"list"` + + // Include or exclude the source. + SourceType *string `type:"string" enum:"SourceType"` + + // How should the dimensions be applied for the result + Type *string `type:"string" enum:"Type"` +} + +// String returns the string representation +func (s SegmentGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentGroup) GoString() string { + return s.String() +} + +// SetDimensions sets the Dimensions field's value. +func (s *SegmentGroup) SetDimensions(v []*SegmentDimensions) *SegmentGroup { + s.Dimensions = v + return s +} + +// SetSourceSegments sets the SourceSegments field's value. +func (s *SegmentGroup) SetSourceSegments(v []*SegmentReference) *SegmentGroup { + s.SourceSegments = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *SegmentGroup) SetSourceType(v string) *SegmentGroup { + s.SourceType = &v + return s +} + +// SetType sets the Type field's value. +func (s *SegmentGroup) SetType(v string) *SegmentGroup { + s.Type = &v + return s +} + +// Segment group definition. +type SegmentGroupList struct { + _ struct{} `type:"structure"` + + // List of dimension groups to evaluate. + Groups []*SegmentGroup `type:"list"` + + // How should the groups be applied for the result + Include *string `type:"string" enum:"Include"` +} + +// String returns the string representation +func (s SegmentGroupList) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentGroupList) GoString() string { + return s.String() +} + +// SetGroups sets the Groups field's value. +func (s *SegmentGroupList) SetGroups(v []*SegmentGroup) *SegmentGroupList { + s.Groups = v + return s +} + +// SetInclude sets the Include field's value. +func (s *SegmentGroupList) SetInclude(v string) *SegmentGroupList { + s.Include = &v + return s +} + // Segment import definition. type SegmentImportResource struct { _ struct{} `type:"structure"` @@ -14846,6 +16798,9 @@ type SegmentLocation struct { // The country filter according to ISO 3166-1 Alpha-2 codes. Country *SetDimension `type:"structure"` + + // The GPS Point dimension. + GPSPoint *GPSPointDimension `type:"structure"` } // String returns the string representation @@ -14864,6 +16819,45 @@ func (s *SegmentLocation) SetCountry(v *SetDimension) *SegmentLocation { return s } +// SetGPSPoint sets the GPSPoint field's value. +func (s *SegmentLocation) SetGPSPoint(v *GPSPointDimension) *SegmentLocation { + s.GPSPoint = v + return s +} + +// Segment reference. +type SegmentReference struct { + _ struct{} `type:"structure"` + + // Segment Id. + Id *string `type:"string"` + + // If specified contains a specific version of the segment included. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s SegmentReference) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentReference) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *SegmentReference) SetId(v string) *SegmentReference { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *SegmentReference) SetVersion(v int64) *SegmentReference { + s.Version = &v + return s +} + // Segment definition. type SegmentResponse struct { _ struct{} `type:"structure"` @@ -14889,6 +16883,10 @@ type SegmentResponse struct { // The name of segment Name *string `type:"string"` + // Segment definition groups. We currently only support one. If specified Dimensions + // must be empty. + SegmentGroups *SegmentGroupList `type:"structure"` + // The segment type:DIMENSIONAL - A dynamic segment built from selection criteria // based on endpoint data reported by your app. You create this type of segment // by using the segment builder in the Amazon Pinpoint console or by making @@ -14954,6 +16952,12 @@ func (s *SegmentResponse) SetName(v string) *SegmentResponse { return s } +// SetSegmentGroups sets the SegmentGroups field's value. +func (s *SegmentResponse) SetSegmentGroups(v *SegmentGroupList) *SegmentResponse { + s.SegmentGroups = v + return s +} + // SetSegmentType sets the SegmentType field's value. func (s *SegmentResponse) SetSegmentType(v string) *SegmentResponse { s.SegmentType = &v @@ -15079,16 +17083,19 @@ func (s *SendMessagesOutput) SetMessageResponse(v *MessageResponse) *SendMessage type SendUsersMessageRequest struct { _ struct{} `type:"structure"` - // A map of custom attributes to attributes to be attached to the message. This - // payload is added to the push notification's 'data.pinpoint' object or added - // to the email/sms delivery receipt event attributes. + // A map of custom attribute-value pairs. Amazon Pinpoint adds these attributes + // to the data.pinpoint object in the body of the push notification payload. + // Amazon Pinpoint also provides these attributes in the events that it generates + // for users-messages deliveries. Context map[string]*string `type:"map"` - // Message configuration. + // Message definitions for the default message and any messages that are tailored + // for specific channels. MessageConfiguration *DirectMessageConfiguration `type:"structure"` - // A map of destination endpoints, with the EndpointId as the key Endpoint Message - // Configuration as the value. + // A map that associates user IDs with EndpointSendConfiguration objects. Within + // an EndpointSendConfiguration object, you can tailor the message for a user + // by specifying message overrides or substitutions. Users map[string]*EndpointSendConfiguration `type:"map"` } @@ -15124,13 +17131,16 @@ func (s *SendUsersMessageRequest) SetUsers(v map[string]*EndpointSendConfigurati type SendUsersMessageResponse struct { _ struct{} `type:"structure"` - // Application id of the message. + // The unique ID of the Amazon Pinpoint project used to send the message. ApplicationId *string `type:"string"` - // Original request Id for which this message was delivered. + // The unique ID assigned to the users-messages request. RequestId *string `type:"string"` - // A map containing of UserId to Map of EndpointId to Endpoint Message Result. + // An object that shows the endpoints that were messaged for each user. The + // object provides a list of user IDs. For each user ID, it provides the endpoint + // IDs that were messaged. For each endpoint ID, it provides an EndpointMessageResult + // object. Result map[string]map[string]*EndpointMessageResult `type:"map"` } @@ -15246,6 +17256,9 @@ type SetDimension struct { // from the segment. DimensionType *string `type:"string" enum:"DimensionType"` + // The criteria values for the segment dimension. Endpoints with matching attribute + // values are included or excluded from the segment, depending on the setting + // for Type. Values []*string `type:"list"` } @@ -15799,6 +17812,30 @@ func (s *UpdateApplicationSettingsOutput) SetApplicationSettingsResource(v *Appl return s } +// Update attributes request +type UpdateAttributesRequest struct { + _ struct{} `type:"structure"` + + // The GLOB wildcard for removing the attributes in the application + Blacklist []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateAttributesRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAttributesRequest) GoString() string { + return s.String() +} + +// SetBlacklist sets the Blacklist field's value. +func (s *UpdateAttributesRequest) SetBlacklist(v []*string) *UpdateAttributesRequest { + s.Blacklist = v + return s +} + type UpdateBaiduChannelInput struct { _ struct{} `type:"structure" payload:"BaiduChannelRequest"` @@ -16442,6 +18479,9 @@ type WriteApplicationSettingsRequest struct { // Default campaign hook information. CampaignHook *CampaignHook `type:"structure"` + // The CloudWatchMetrics settings for the app. + CloudWatchMetricsEnabled *bool `type:"boolean"` + // The default campaign limits for the app. These limits apply to each campaign // for the app, unless the campaign overrides the default with limits of its // own. @@ -16469,6 +18509,12 @@ func (s *WriteApplicationSettingsRequest) SetCampaignHook(v *CampaignHook) *Writ return s } +// SetCloudWatchMetricsEnabled sets the CloudWatchMetricsEnabled field's value. +func (s *WriteApplicationSettingsRequest) SetCloudWatchMetricsEnabled(v bool) *WriteApplicationSettingsRequest { + s.CloudWatchMetricsEnabled = &v + return s +} + // SetLimits sets the Limits field's value. func (s *WriteApplicationSettingsRequest) SetLimits(v *CampaignLimits) *WriteApplicationSettingsRequest { s.Limits = v @@ -16660,6 +18706,10 @@ type WriteSegmentRequest struct { // The name of segment Name *string `type:"string"` + + // Segment definition groups. We currently only support one. If specified Dimensions + // must be empty. + SegmentGroups *SegmentGroupList `type:"structure"` } // String returns the string representation @@ -16684,6 +18734,12 @@ func (s *WriteSegmentRequest) SetName(v string) *WriteSegmentRequest { return s } +// SetSegmentGroups sets the SegmentGroups field's value. +func (s *WriteSegmentRequest) SetSegmentGroups(v *SegmentGroupList) *WriteSegmentRequest { + s.SegmentGroups = v + return s +} + // Used to create a campaign treatment. type WriteTreatmentResource struct { _ struct{} `type:"structure"` @@ -16778,6 +18834,9 @@ const ( // CampaignStatusPaused is a CampaignStatus enum value CampaignStatusPaused = "PAUSED" + + // CampaignStatusDeleted is a CampaignStatus enum value + CampaignStatusDeleted = "DELETED" ) const ( @@ -16882,6 +18941,17 @@ const ( FrequencyMonthly = "MONTHLY" ) +const ( + // IncludeAll is a Include enum value + IncludeAll = "ALL" + + // IncludeAny is a Include enum value + IncludeAny = "ANY" + + // IncludeNone is a Include enum value + IncludeNone = "NONE" +) + const ( // JobStatusCreated is a JobStatus enum value JobStatusCreated = "CREATED" @@ -16936,3 +19006,22 @@ const ( // SegmentTypeImport is a SegmentType enum value SegmentTypeImport = "IMPORT" ) + +const ( + // SourceTypeAll is a SourceType enum value + SourceTypeAll = "ALL" + + // SourceTypeAny is a SourceType enum value + SourceTypeAny = "ANY" +) + +const ( + // TypeAll is a Type enum value + TypeAll = "ALL" + + // TypeAny is a Type enum value + TypeAny = "ANY" + + // TypeNone is a Type enum value + TypeNone = "NONE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go index 2a619d1c271..7bd7525b6a6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go @@ -6,25 +6,37 @@ const ( // ErrCodeBadRequestException for service response error code // "BadRequestException". + // + // Simple message object. ErrCodeBadRequestException = "BadRequestException" // ErrCodeForbiddenException for service response error code // "ForbiddenException". + // + // Simple message object. ErrCodeForbiddenException = "ForbiddenException" // ErrCodeInternalServerErrorException for service response error code // "InternalServerErrorException". + // + // Simple message object. ErrCodeInternalServerErrorException = "InternalServerErrorException" // ErrCodeMethodNotAllowedException for service response error code // "MethodNotAllowedException". + // + // Simple message object. ErrCodeMethodNotAllowedException = "MethodNotAllowedException" // ErrCodeNotFoundException for service response error code // "NotFoundException". + // + // Simple message object. ErrCodeNotFoundException = "NotFoundException" // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". + // + // Simple message object. ErrCodeTooManyRequestsException = "TooManyRequestsException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index a2d952afb04..48e7cf4a539 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -12,6 +12,106 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/query" ) +const opAcceptReservedNodeExchange = "AcceptReservedNodeExchange" + +// AcceptReservedNodeExchangeRequest generates a "aws/request.Request" representing the +// client's request for the AcceptReservedNodeExchange operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AcceptReservedNodeExchange for more information on using the AcceptReservedNodeExchange +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AcceptReservedNodeExchangeRequest method. +// req, resp := client.AcceptReservedNodeExchangeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AcceptReservedNodeExchange +func (c *Redshift) AcceptReservedNodeExchangeRequest(input *AcceptReservedNodeExchangeInput) (req *request.Request, output *AcceptReservedNodeExchangeOutput) { + op := &request.Operation{ + Name: opAcceptReservedNodeExchange, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptReservedNodeExchangeInput{} + } + + output = &AcceptReservedNodeExchangeOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptReservedNodeExchange API operation for Amazon Redshift. +// +// Exchanges a DC1 Reserved Node for a DC2 Reserved Node with no changes to +// the configuration (term, payment type, or number of nodes) and no additional +// costs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation AcceptReservedNodeExchange for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReservedNodeNotFoundFault "ReservedNodeNotFound" +// The specified reserved compute node not found. +// +// * ErrCodeInvalidReservedNodeStateFault "InvalidReservedNodeState" +// Indicates that the Reserved Node being exchanged is not in an active state. +// +// * ErrCodeReservedNodeAlreadyMigratedFault "ReservedNodeAlreadyMigrated" +// Indicates that the reserved node has already been exchanged. +// +// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" +// Specified offering does not exist. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" +// Your request cannot be completed because a dependent internal service is +// temporarily unavailable. Wait 30 to 60 seconds and try again. +// +// * ErrCodeReservedNodeAlreadyExistsFault "ReservedNodeAlreadyExists" +// User already has a reservation with the given identifier. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/AcceptReservedNodeExchange +func (c *Redshift) AcceptReservedNodeExchange(input *AcceptReservedNodeExchangeInput) (*AcceptReservedNodeExchangeOutput, error) { + req, out := c.AcceptReservedNodeExchangeRequest(input) + return out, req.Send() +} + +// AcceptReservedNodeExchangeWithContext is the same as AcceptReservedNodeExchange with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptReservedNodeExchange for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) AcceptReservedNodeExchangeWithContext(ctx aws.Context, input *AcceptReservedNodeExchangeInput, opts ...request.Option) (*AcceptReservedNodeExchangeOutput, error) { + req, out := c.AcceptReservedNodeExchangeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAuthorizeClusterSecurityGroupIngress = "AuthorizeClusterSecurityGroupIngress" // AuthorizeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the @@ -371,10 +471,10 @@ func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request // // Creates a new cluster. // -// To create the cluster in Virtual Private Cloud (VPC), you must provide a -// cluster subnet group name. The cluster subnet group identifies the subnets -// of your VPC that Amazon Redshift uses when creating the cluster. For more -// information about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) +// To create a cluster in Virtual Private Cloud (VPC), you must provide a cluster +// subnet group name. The cluster subnet group identifies the subnets of your +// VPC that Amazon Redshift uses when creating the cluster. For more information +// about managing clusters, go to Amazon Redshift Clusters (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) // in the Amazon Redshift Cluster Management Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -440,7 +540,8 @@ func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request // The Elastic IP (EIP) is invalid or cannot be found. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -548,7 +649,8 @@ func (c *Redshift) CreateClusterParameterGroupRequest(input *CreateClusterParame // A cluster parameter group with the same name already exists. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -644,7 +746,8 @@ func (c *Redshift) CreateClusterSecurityGroupRequest(input *CreateClusterSecurit // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -745,7 +848,8 @@ func (c *Redshift) CreateClusterSnapshotRequest(input *CreateClusterSnapshotInpu // snapshots. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -855,7 +959,8 @@ func (c *Redshift) CreateClusterSubnetGroupRequest(input *CreateClusterSubnetGro // Your account is not authorized to perform the requested operation. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -999,7 +1104,8 @@ func (c *Redshift) CreateEventSubscriptionRequest(input *CreateEventSubscription // The specified Amazon Redshift event source could not be found. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1098,7 +1204,8 @@ func (c *Redshift) CreateHsmClientCertificateRequest(input *CreateHsmClientCerti // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1198,7 +1305,8 @@ func (c *Redshift) CreateHsmConfigurationRequest(input *CreateHsmConfigurationIn // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1297,7 +1405,8 @@ func (c *Redshift) CreateSnapshotCopyGrantRequest(input *CreateSnapshotCopyGrant // The encryption key has exceeded its grant limit in AWS KMS. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1391,7 +1500,8 @@ func (c *Redshift) CreateTagsRequest(input *CreateTagsInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The request exceeds the limit of 10 tags for the resource. +// The number of tables in your source cluster exceeds the limit for the target +// cluster. Resize to a larger cluster node type. // // * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" // The resource could not be found. @@ -2312,6 +2422,85 @@ func (c *Redshift) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput return out, req.Send() } +const opDescribeClusterDbRevisions = "DescribeClusterDbRevisions" + +// DescribeClusterDbRevisionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClusterDbRevisions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClusterDbRevisions for more information on using the DescribeClusterDbRevisions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClusterDbRevisionsRequest method. +// req, resp := client.DescribeClusterDbRevisionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterDbRevisions +func (c *Redshift) DescribeClusterDbRevisionsRequest(input *DescribeClusterDbRevisionsInput) (req *request.Request, output *DescribeClusterDbRevisionsOutput) { + op := &request.Operation{ + Name: opDescribeClusterDbRevisions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClusterDbRevisionsInput{} + } + + output = &DescribeClusterDbRevisionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClusterDbRevisions API operation for Amazon Redshift. +// +// Returns an array of ClusterDbRevision objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation DescribeClusterDbRevisions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterDbRevisions +func (c *Redshift) DescribeClusterDbRevisions(input *DescribeClusterDbRevisionsInput) (*DescribeClusterDbRevisionsOutput, error) { + req, out := c.DescribeClusterDbRevisionsRequest(input) + return out, req.Send() +} + +// DescribeClusterDbRevisionsWithContext is the same as DescribeClusterDbRevisions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClusterDbRevisions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) DescribeClusterDbRevisionsWithContext(ctx aws.Context, input *DescribeClusterDbRevisionsInput, opts ...request.Option) (*DescribeClusterDbRevisionsOutput, error) { + req, out := c.DescribeClusterDbRevisionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeClusterParameterGroups = "DescribeClusterParameterGroups" // DescribeClusterParameterGroupsRequest generates a "aws/request.Request" representing the @@ -5511,6 +5700,102 @@ func (c *Redshift) GetClusterCredentialsWithContext(ctx aws.Context, input *GetC return out, req.Send() } +const opGetReservedNodeExchangeOfferings = "GetReservedNodeExchangeOfferings" + +// GetReservedNodeExchangeOfferingsRequest generates a "aws/request.Request" representing the +// client's request for the GetReservedNodeExchangeOfferings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetReservedNodeExchangeOfferings for more information on using the GetReservedNodeExchangeOfferings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetReservedNodeExchangeOfferingsRequest method. +// req, resp := client.GetReservedNodeExchangeOfferingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetReservedNodeExchangeOfferings +func (c *Redshift) GetReservedNodeExchangeOfferingsRequest(input *GetReservedNodeExchangeOfferingsInput) (req *request.Request, output *GetReservedNodeExchangeOfferingsOutput) { + op := &request.Operation{ + Name: opGetReservedNodeExchangeOfferings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetReservedNodeExchangeOfferingsInput{} + } + + output = &GetReservedNodeExchangeOfferingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetReservedNodeExchangeOfferings API operation for Amazon Redshift. +// +// Returns an array of ReservedNodeOfferings which is filtered by payment type, +// term, and instance type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation GetReservedNodeExchangeOfferings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReservedNodeNotFoundFault "ReservedNodeNotFound" +// The specified reserved compute node not found. +// +// * ErrCodeInvalidReservedNodeStateFault "InvalidReservedNodeState" +// Indicates that the Reserved Node being exchanged is not in an active state. +// +// * ErrCodeReservedNodeAlreadyMigratedFault "ReservedNodeAlreadyMigrated" +// Indicates that the reserved node has already been exchanged. +// +// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" +// Specified offering does not exist. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// * ErrCodeDependentServiceUnavailableFault "DependentServiceUnavailableFault" +// Your request cannot be completed because a dependent internal service is +// temporarily unavailable. Wait 30 to 60 seconds and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/GetReservedNodeExchangeOfferings +func (c *Redshift) GetReservedNodeExchangeOfferings(input *GetReservedNodeExchangeOfferingsInput) (*GetReservedNodeExchangeOfferingsOutput, error) { + req, out := c.GetReservedNodeExchangeOfferingsRequest(input) + return out, req.Send() +} + +// GetReservedNodeExchangeOfferingsWithContext is the same as GetReservedNodeExchangeOfferings with the addition of +// the ability to pass a context and additional request options. +// +// See GetReservedNodeExchangeOfferings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) GetReservedNodeExchangeOfferingsWithContext(ctx aws.Context, input *GetReservedNodeExchangeOfferingsInput, opts ...request.Option) (*GetReservedNodeExchangeOfferingsOutput, error) { + req, out := c.GetReservedNodeExchangeOfferingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyCluster = "ModifyCluster" // ModifyClusterRequest generates a "aws/request.Request" representing the @@ -5628,6 +5913,10 @@ func (c *Redshift) ModifyClusterRequest(input *ModifyClusterInput) (req *request // * ErrCodeInvalidElasticIpFault "InvalidElasticIpFault" // The Elastic IP (EIP) is invalid or cannot be found. // +// * ErrCodeTableLimitExceededFault "TableLimitExceeded" +// The number of tables in the cluster exceeds the limit for the requested new +// cluster node type. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyCluster func (c *Redshift) ModifyCluster(input *ModifyClusterInput) (*ModifyClusterOutput, error) { req, out := c.ModifyClusterRequest(input) @@ -5650,6 +5939,92 @@ func (c *Redshift) ModifyClusterWithContext(ctx aws.Context, input *ModifyCluste return out, req.Send() } +const opModifyClusterDbRevision = "ModifyClusterDbRevision" + +// ModifyClusterDbRevisionRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClusterDbRevision operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyClusterDbRevision for more information on using the ModifyClusterDbRevision +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyClusterDbRevisionRequest method. +// req, resp := client.ModifyClusterDbRevisionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterDbRevision +func (c *Redshift) ModifyClusterDbRevisionRequest(input *ModifyClusterDbRevisionInput) (req *request.Request, output *ModifyClusterDbRevisionOutput) { + op := &request.Operation{ + Name: opModifyClusterDbRevision, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClusterDbRevisionInput{} + } + + output = &ModifyClusterDbRevisionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyClusterDbRevision API operation for Amazon Redshift. +// +// Modifies the database revision of a cluster. The database revision is a unique +// revision of the database running in a cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Redshift's +// API operation ModifyClusterDbRevision for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeClusterOnLatestRevisionFault "ClusterOnLatestRevision" +// Cluster is already on the latest database revision. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterDbRevision +func (c *Redshift) ModifyClusterDbRevision(input *ModifyClusterDbRevisionInput) (*ModifyClusterDbRevisionOutput, error) { + req, out := c.ModifyClusterDbRevisionRequest(input) + return out, req.Send() +} + +// ModifyClusterDbRevisionWithContext is the same as ModifyClusterDbRevision with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClusterDbRevision for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Redshift) ModifyClusterDbRevisionWithContext(ctx aws.Context, input *ModifyClusterDbRevisionInput, opts ...request.Option) (*ModifyClusterDbRevisionOutput, error) { + req, out := c.ModifyClusterDbRevisionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyClusterIamRoles = "ModifyClusterIamRoles" // ModifyClusterIamRolesRequest generates a "aws/request.Request" representing the @@ -6945,6 +7320,82 @@ func (c *Redshift) RotateEncryptionKeyWithContext(ctx aws.Context, input *Rotate return out, req.Send() } +type AcceptReservedNodeExchangeInput struct { + _ struct{} `type:"structure"` + + // A string representing the identifier of the Reserved Node to be exchanged. + // + // ReservedNodeId is a required field + ReservedNodeId *string `type:"string" required:"true"` + + // The unique identifier of the Reserved Node offering to be used for the exchange. + // + // TargetReservedNodeOfferingId is a required field + TargetReservedNodeOfferingId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptReservedNodeExchangeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptReservedNodeExchangeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptReservedNodeExchangeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptReservedNodeExchangeInput"} + if s.ReservedNodeId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedNodeId")) + } + if s.TargetReservedNodeOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetReservedNodeOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReservedNodeId sets the ReservedNodeId field's value. +func (s *AcceptReservedNodeExchangeInput) SetReservedNodeId(v string) *AcceptReservedNodeExchangeInput { + s.ReservedNodeId = &v + return s +} + +// SetTargetReservedNodeOfferingId sets the TargetReservedNodeOfferingId field's value. +func (s *AcceptReservedNodeExchangeInput) SetTargetReservedNodeOfferingId(v string) *AcceptReservedNodeExchangeInput { + s.TargetReservedNodeOfferingId = &v + return s +} + +type AcceptReservedNodeExchangeOutput struct { + _ struct{} `type:"structure"` + + // Describes a reserved node. You can call the DescribeReservedNodeOfferings + // API to obtain the available reserved node offerings. + ExchangedReservedNode *ReservedNode `type:"structure"` +} + +// String returns the string representation +func (s AcceptReservedNodeExchangeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptReservedNodeExchangeOutput) GoString() string { + return s.String() +} + +// SetExchangedReservedNode sets the ExchangedReservedNode field's value. +func (s *AcceptReservedNodeExchangeOutput) SetExchangedReservedNode(v *ReservedNode) *AcceptReservedNodeExchangeOutput { + s.ExchangedReservedNode = v + return s +} + // Describes an AWS customer account authorized to restore a snapshot. type AccountWithRestoreAccess struct { _ struct{} `type:"structure"` @@ -7334,6 +7785,9 @@ type Cluster struct { // The number of compute nodes in the cluster. NumberOfNodes *int64 `type:"integer"` + // Cluster operations that are waiting to be started. + PendingActions []*string `type:"list"` + // A value that, if present, indicates that changes to the cluster are pending. // Specific pending changes are identified by subelements. PendingModifiedValues *PendingModifiedValues `type:"structure"` @@ -7528,6 +7982,12 @@ func (s *Cluster) SetNumberOfNodes(v int64) *Cluster { return s } +// SetPendingActions sets the PendingActions field's value. +func (s *Cluster) SetPendingActions(v []*string) *Cluster { + s.PendingActions = v + return s +} + // SetPendingModifiedValues sets the PendingModifiedValues field's value. func (s *Cluster) SetPendingModifiedValues(v *PendingModifiedValues) *Cluster { s.PendingModifiedValues = v @@ -7570,6 +8030,58 @@ func (s *Cluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *Cluster return s } +// Describes a ClusterDbRevision. +type ClusterDbRevision struct { + _ struct{} `type:"structure"` + + // The unique identifier of the cluster. + ClusterIdentifier *string `type:"string"` + + // A string representing the current cluster version. + CurrentDatabaseRevision *string `type:"string"` + + // The date on which the database revision was released. + DatabaseRevisionReleaseDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // A list of RevisionTarget objects, where each object describes the database + // revision that a cluster can be updated to. + RevisionTargets []*RevisionTarget `locationNameList:"RevisionTarget" type:"list"` +} + +// String returns the string representation +func (s ClusterDbRevision) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClusterDbRevision) GoString() string { + return s.String() +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ClusterDbRevision) SetClusterIdentifier(v string) *ClusterDbRevision { + s.ClusterIdentifier = &v + return s +} + +// SetCurrentDatabaseRevision sets the CurrentDatabaseRevision field's value. +func (s *ClusterDbRevision) SetCurrentDatabaseRevision(v string) *ClusterDbRevision { + s.CurrentDatabaseRevision = &v + return s +} + +// SetDatabaseRevisionReleaseDate sets the DatabaseRevisionReleaseDate field's value. +func (s *ClusterDbRevision) SetDatabaseRevisionReleaseDate(v time.Time) *ClusterDbRevision { + s.DatabaseRevisionReleaseDate = &v + return s +} + +// SetRevisionTargets sets the RevisionTargets field's value. +func (s *ClusterDbRevision) SetRevisionTargets(v []*RevisionTarget) *ClusterDbRevision { + s.RevisionTargets = v + return s +} + // An AWS Identity and Access Management (IAM) role that can be used by the // associated Amazon Redshift cluster to access other AWS services. type ClusterIamRole struct { @@ -10343,6 +10855,100 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +type DescribeClusterDbRevisionsInput struct { + _ struct{} `type:"structure"` + + // A unique identifier for a cluster whose ClusterDbRevisions you are requesting. + // This parameter is case sensitive. All clusters defined for an account are + // returned by default. + ClusterIdentifier *string `type:"string"` + + // An optional parameter that specifies the starting point for returning a set + // of response records. When the results of a DescribeClusterDbRevisions request + // exceed the value specified in MaxRecords, Amazon Redshift returns a value + // in the marker field of the response. You can retrieve the next set of response + // records by providing the returned marker value in the marker parameter and + // retrying the request. + // + // Constraints: You can specify either the ClusterIdentifier parameter, or the + // marker parameter, but not both. + Marker *string `type:"string"` + + // The maximum number of response records to return in each call. If the number + // of remaining response records exceeds the specified MaxRecords value, a value + // is returned in the marker field of the response. You can retrieve the next + // set of response records by providing the returned marker value in the marker + // parameter and retrying the request. + // + // Default: 100 + // + // Constraints: minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeClusterDbRevisionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterDbRevisionsInput) GoString() string { + return s.String() +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *DescribeClusterDbRevisionsInput) SetClusterIdentifier(v string) *DescribeClusterDbRevisionsInput { + s.ClusterIdentifier = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeClusterDbRevisionsInput) SetMarker(v string) *DescribeClusterDbRevisionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeClusterDbRevisionsInput) SetMaxRecords(v int64) *DescribeClusterDbRevisionsInput { + s.MaxRecords = &v + return s +} + +type DescribeClusterDbRevisionsOutput struct { + _ struct{} `type:"structure"` + + // A list of revisions. + ClusterDbRevisions []*ClusterDbRevision `locationNameList:"ClusterDbRevision" type:"list"` + + // A string representing the starting point for the next set of revisions. If + // a value is returned in a response, you can retrieve the next set of revisions + // by providing the value in the marker parameter and retrying the command. + // If the marker field is empty, all revisions have already been returned. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClusterDbRevisionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterDbRevisionsOutput) GoString() string { + return s.String() +} + +// SetClusterDbRevisions sets the ClusterDbRevisions field's value. +func (s *DescribeClusterDbRevisionsOutput) SetClusterDbRevisions(v []*ClusterDbRevision) *DescribeClusterDbRevisionsOutput { + s.ClusterDbRevisions = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeClusterDbRevisionsOutput) SetMarker(v string) *DescribeClusterDbRevisionsOutput { + s.Marker = &v + return s +} + type DescribeClusterParameterGroupsInput struct { _ struct{} `type:"structure"` @@ -13701,6 +14307,99 @@ func (s *GetClusterCredentialsOutput) SetExpiration(v time.Time) *GetClusterCred return s } +type GetReservedNodeExchangeOfferingsInput struct { + _ struct{} `type:"structure"` + + // A value that indicates the starting point for the next set of ReservedNodeOfferings. + Marker *string `type:"string"` + + // An integer setting the maximum number of ReservedNodeOfferings to retrieve. + MaxRecords *int64 `type:"integer"` + + // A string representing the node identifier for the Reserved Node to be exchanged. + // + // ReservedNodeId is a required field + ReservedNodeId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetReservedNodeExchangeOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetReservedNodeExchangeOfferingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetReservedNodeExchangeOfferingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetReservedNodeExchangeOfferingsInput"} + if s.ReservedNodeId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedNodeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMarker sets the Marker field's value. +func (s *GetReservedNodeExchangeOfferingsInput) SetMarker(v string) *GetReservedNodeExchangeOfferingsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *GetReservedNodeExchangeOfferingsInput) SetMaxRecords(v int64) *GetReservedNodeExchangeOfferingsInput { + s.MaxRecords = &v + return s +} + +// SetReservedNodeId sets the ReservedNodeId field's value. +func (s *GetReservedNodeExchangeOfferingsInput) SetReservedNodeId(v string) *GetReservedNodeExchangeOfferingsInput { + s.ReservedNodeId = &v + return s +} + +type GetReservedNodeExchangeOfferingsOutput struct { + _ struct{} `type:"structure"` + + // An optional parameter that specifies the starting point for returning a set + // of response records. When the results of a GetReservedNodeExchangeOfferings + // request exceed the value specified in MaxRecords, Amazon Redshift returns + // a value in the marker field of the response. You can retrieve the next set + // of response records by providing the returned marker value in the marker + // parameter and retrying the request. + Marker *string `type:"string"` + + // Returns an array of ReservedNodeOffering objects. + ReservedNodeOfferings []*ReservedNodeOffering `locationNameList:"ReservedNodeOffering" type:"list"` +} + +// String returns the string representation +func (s GetReservedNodeExchangeOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetReservedNodeExchangeOfferingsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *GetReservedNodeExchangeOfferingsOutput) SetMarker(v string) *GetReservedNodeExchangeOfferingsOutput { + s.Marker = &v + return s +} + +// SetReservedNodeOfferings sets the ReservedNodeOfferings field's value. +func (s *GetReservedNodeExchangeOfferingsOutput) SetReservedNodeOfferings(v []*ReservedNodeOffering) *GetReservedNodeExchangeOfferingsOutput { + s.ReservedNodeOfferings = v + return s +} + // Returns information about an HSM client certificate. The certificate is stored // in a secure Hardware Storage Module (HSM), and used by the Amazon Redshift // cluster to encrypt data files. @@ -13967,6 +14666,84 @@ func (s *LoggingStatus) SetS3KeyPrefix(v string) *LoggingStatus { return s } +type ModifyClusterDbRevisionInput struct { + _ struct{} `type:"structure"` + + // The unique identifier of a cluster whose database revision you want to modify. + // + // Example: examplecluster + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` + + // The identifier of the database revision. You can retrieve this value from + // the response to the DescribeClusterDbRevisions request. + // + // RevisionTarget is a required field + RevisionTarget *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyClusterDbRevisionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterDbRevisionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterDbRevisionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterDbRevisionInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + if s.RevisionTarget == nil { + invalidParams.Add(request.NewErrParamRequired("RevisionTarget")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ModifyClusterDbRevisionInput) SetClusterIdentifier(v string) *ModifyClusterDbRevisionInput { + s.ClusterIdentifier = &v + return s +} + +// SetRevisionTarget sets the RevisionTarget field's value. +func (s *ModifyClusterDbRevisionInput) SetRevisionTarget(v string) *ModifyClusterDbRevisionInput { + s.RevisionTarget = &v + return s +} + +type ModifyClusterDbRevisionOutput struct { + _ struct{} `type:"structure"` + + // Describes a cluster. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s ModifyClusterDbRevisionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterDbRevisionOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *ModifyClusterDbRevisionOutput) SetCluster(v *Cluster) *ModifyClusterDbRevisionOutput { + s.Cluster = v + return s +} + type ModifyClusterIamRolesInput struct { _ struct{} `type:"structure"` @@ -15252,6 +16029,11 @@ type ReservedNode struct { // use. // // * payment-failed-Payment failed for the purchase attempt. + // + // * retired-The reserved node is no longer available. + // + // * exchanging-The owner is exchanging the reserved node for another reserved + // node. State *string `type:"string"` // The hourly rate Amazon Redshift charges you for this reserved node. @@ -16084,6 +16866,50 @@ func (s *RestoreTableFromClusterSnapshotOutput) SetTableRestoreStatus(v *TableRe return s } +// Describes a RevisionTarget. +type RevisionTarget struct { + _ struct{} `type:"structure"` + + // A unique string that identifies the version to update the cluster to. You + // can use this value in ModifyClusterDbRevision. + DatabaseRevision *string `type:"string"` + + // The date on which the database revision was released. + DatabaseRevisionReleaseDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + // A string that describes the changes and features that will be applied to + // the cluster when it is updated to the corresponding ClusterDbRevision. + Description *string `type:"string"` +} + +// String returns the string representation +func (s RevisionTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevisionTarget) GoString() string { + return s.String() +} + +// SetDatabaseRevision sets the DatabaseRevision field's value. +func (s *RevisionTarget) SetDatabaseRevision(v string) *RevisionTarget { + s.DatabaseRevision = &v + return s +} + +// SetDatabaseRevisionReleaseDate sets the DatabaseRevisionReleaseDate field's value. +func (s *RevisionTarget) SetDatabaseRevisionReleaseDate(v time.Time) *RevisionTarget { + s.DatabaseRevisionReleaseDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RevisionTarget) SetDescription(v string) *RevisionTarget { + s.Description = &v + return s +} + type RevokeClusterSecurityGroupIngressInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go index 8b0570fe3e3..0cf4ad603b1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go @@ -49,6 +49,12 @@ const ( // The ClusterIdentifier parameter does not refer to an existing cluster. ErrCodeClusterNotFoundFault = "ClusterNotFound" + // ErrCodeClusterOnLatestRevisionFault for service response error code + // "ClusterOnLatestRevision". + // + // Cluster is already on the latest database revision. + ErrCodeClusterOnLatestRevisionFault = "ClusterOnLatestRevision" + // ErrCodeClusterParameterGroupAlreadyExistsFault for service response error code // "ClusterParameterGroupAlreadyExists". // @@ -308,6 +314,12 @@ const ( // in use by one or more Amazon Redshift clusters. ErrCodeInvalidHsmConfigurationStateFault = "InvalidHsmConfigurationStateFault" + // ErrCodeInvalidReservedNodeStateFault for service response error code + // "InvalidReservedNodeState". + // + // Indicates that the Reserved Node being exchanged is not in an active state. + ErrCodeInvalidReservedNodeStateFault = "InvalidReservedNodeState" + // ErrCodeInvalidRestoreFault for service response error code // "InvalidRestore". // @@ -396,6 +408,12 @@ const ( // User already has a reservation with the given identifier. ErrCodeReservedNodeAlreadyExistsFault = "ReservedNodeAlreadyExists" + // ErrCodeReservedNodeAlreadyMigratedFault for service response error code + // "ReservedNodeAlreadyMigrated". + // + // Indicates that the reserved node has already been exchanged. + ErrCodeReservedNodeAlreadyMigratedFault = "ReservedNodeAlreadyMigrated" + // ErrCodeReservedNodeNotFoundFault for service response error code // "ReservedNodeNotFound". // @@ -535,6 +553,13 @@ const ( // The allowed values are ERROR and INFO. ErrCodeSubscriptionSeverityNotFoundFault = "SubscriptionSeverityNotFound" + // ErrCodeTableLimitExceededFault for service response error code + // "TableLimitExceeded". + // + // The number of tables in the cluster exceeds the limit for the requested new + // cluster node type. + ErrCodeTableLimitExceededFault = "TableLimitExceeded" + // ErrCodeTableRestoreNotFoundFault for service response error code // "TableRestoreNotFoundFault". // @@ -544,7 +569,8 @@ const ( // ErrCodeTagLimitExceededFault for service response error code // "TagLimitExceededFault". // - // The request exceeds the limit of 10 tags for the resource. + // The number of tables in your source cluster exceeds the limit for the target + // cluster. Resize to a larger cluster node type. ErrCodeTagLimitExceededFault = "TagLimitExceededFault" // ErrCodeUnauthorizedOperation for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index f83dcb8ecc7..a5c51bbe71e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -11,6 +11,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" @@ -7575,7 +7576,7 @@ func (s *Condition) SetKeyPrefixEquals(v string) *Condition { } type ContinuationEvent struct { - _ struct{} `type:"structure"` + _ struct{} `locationName:"ContinuationEvent" type:"structure"` } // String returns the string representation @@ -10046,7 +10047,7 @@ func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfig } type EndEvent struct { - _ struct{} `type:"structure"` + _ struct{} `locationName:"EndEvent" type:"structure"` } // String returns the string representation @@ -16574,7 +16575,7 @@ func (s *Progress) SetBytesScanned(v int64) *Progress { } type ProgressEvent struct { - _ struct{} `type:"structure" payload:"Details"` + _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"` // The Progress event details. Details *Progress `locationName:"Details" type:"structure"` @@ -16608,7 +16609,7 @@ func (s *ProgressEvent) UnmarshalEvent( if err := payloadUnmarshaler.UnmarshalPayload( bytes.NewReader(msg.Payload), s, ); err != nil { - return fmt.Errorf("failed to unmarshal payload, %v", err) + return err } return nil } @@ -18856,7 +18857,7 @@ func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDep } type RecordsEvent struct { - _ struct{} `type:"structure" payload:"Payload"` + _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"` // The byte array of partial, one or more result records. // @@ -19900,8 +19901,11 @@ func (r *readSelectObjectContentEventStream) unmarshalerForEventType( case "Stats": return &StatsEvent{}, nil default: - return nil, fmt.Errorf( - "unknown event type name, %s, for SelectObjectContentEventStream", eventType) + return nil, awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("unknown event type name, %s, for SelectObjectContentEventStream", eventType), + nil, + ) } } @@ -20464,7 +20468,7 @@ func (s *Stats) SetBytesScanned(v int64) *Stats { } type StatsEvent struct { - _ struct{} `type:"structure" payload:"Details"` + _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"` // The Stats event details. Details *Stats `locationName:"Details" type:"structure"` @@ -20498,7 +20502,7 @@ func (s *StatsEvent) UnmarshalEvent( if err := payloadUnmarshaler.UnmarshalPayload( bytes.NewReader(msg.Payload), s, ); err != nil { - return fmt.Errorf("failed to unmarshal payload, %v", err) + return err } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go index f9fcf9314b5..be7e8105227 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go @@ -159,6 +159,14 @@ func (c *SageMaker) CreateEndpointRequest(input *CreateEndpointInput) (req *requ // For an example, see Exercise 1: Using the K-Means Algorithm Provided by Amazon // SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ex1.html). // +// If any of the models hosted at this endpoint get model data from an Amazon +// S3 location, Amazon SageMaker uses AWS Security Token Service to download +// model artifacts from the S3 path you provided. AWS STS is activated in your +// IAM user account by default. If you previously deactivated AWS STS for a +// region, you need to reactivate AWS STS for that region. For more information, +// see Activating and Deactivating AWS STS i an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// in the AWS Identity and Access Management User Guide. +// // 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. @@ -2191,8 +2199,8 @@ func (c *SageMaker) ListHyperParameterTuningJobsRequest(input *ListHyperParamete // ListHyperParameterTuningJobs API operation for Amazon SageMaker Service. // -// Gets a list of objects that describe the hyperparameter tuning jobs launched -// in your account. +// Gets a list of HyperParameterTuningJobSummary objects that describe the hyperparameter +// tuning jobs launched in your account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2453,7 +2461,8 @@ func (c *SageMaker) ListNotebookInstanceLifecycleConfigsRequest(input *ListNoteb // ListNotebookInstanceLifecycleConfigs API operation for Amazon SageMaker Service. // -// Lists notebook instance lifestyle configurations created with the API. +// Lists notebook instance lifestyle configurations created with the CreateNotebookInstanceLifecycleConfig +// API. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2974,8 +2983,8 @@ func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobRequest(input *Lis // ListTrainingJobsForHyperParameterTuningJob API operation for Amazon SageMaker Service. // -// Gets a list of objects that describe the training jobs that a hyperparameter -// tuning job launched. +// Gets a list of TrainingJobSummary objects that describe the training jobs +// that a hyperparameter tuning job launched. // // 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 @@ -3462,6 +3471,9 @@ func (c *SageMaker) UpdateEndpointRequest(input *UpdateEndpointInput) (req *requ // check the status of an endpoint, use the DescribeEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) // API. // +// You cannot update an endpoint with the current EndpointConfig. To update +// an endpoint, you must create a new EndpointConfig. +// // 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. @@ -3708,7 +3720,8 @@ func (c *SageMaker) UpdateNotebookInstanceLifecycleConfigRequest(input *UpdateNo // UpdateNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. // -// Updates a notebook instance lifecycle configuration created with the API. +// Updates a notebook instance lifecycle configuration created with the CreateNotebookInstanceLifecycleConfig +// API. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4074,8 +4087,9 @@ type ContainerDefinition struct { // The Amazon EC2 Container Registry (Amazon ECR) path where inference code // is stored. If you are using your own custom algorithm instead of an algorithm // provided by Amazon SageMaker, the inference code must meet Amazon SageMaker - // requirements. For more information, see Using Your Own Algorithms with Amazon - // SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html) + // requirements. Amazon SageMaker supports both registry/repository[:tag] and + // registry/repository[@digest] image path formats. For more information, see + // Using Your Own Algorithms with Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html) // // Image is a required field Image *string `type:"string" required:"true"` @@ -4083,6 +4097,14 @@ type ContainerDefinition struct { // The S3 path where the model artifacts, which result from model training, // are stored. This path must point to a single gzip compressed tar archive // (.tar.gz suffix). + // + // If you provide a value for this parameter, Amazon SageMaker uses AWS Security + // Token Service to download model artifacts from the S3 path you provide. AWS + // STS is activated in your IAM user account by default. If you previously deactivated + // AWS STS for a region, you need to reactivate AWS STS for that region. For + // more information, see Activating and Deactivating AWS STS i an AWS Region + // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) + // in the AWS Identity and Access Management User Guide. ModelDataUrl *string `type:"string"` } @@ -4430,9 +4452,9 @@ func (s *CreateEndpointOutput) SetEndpointArn(v string) *CreateEndpointOutput { type CreateHyperParameterTuningJobInput struct { _ struct{} `type:"structure"` - // The object that describes the tuning job, including the search strategy, - // metric used to evaluate training jobs, ranges of parameters to search, and - // resource limits for the tuning job. + // The HyperParameterTuningJobConfig object that describes the tuning job, including + // the search strategy, metric used to evaluate training jobs, ranges of parameters + // to search, and resource limits for the tuning job. // // HyperParameterTuningJobConfig is a required field HyperParameterTuningJobConfig *HyperParameterTuningJobConfig `type:"structure" required:"true"` @@ -4451,9 +4473,10 @@ type CreateHyperParameterTuningJobInput struct { // in the AWS Billing and Cost Management User Guide. Tags []*Tag `type:"list"` - // The object that describes the training jobs that this tuning job launches, - // including static hyperparameters, input data configuration, output data configuration, - // resource configuration, and stopping condition. + // The HyperParameterTrainingJobDefinition object that describes the training + // jobs that this tuning job launches, including static hyperparameters, input + // data configuration, output data configuration, resource configuration, and + // stopping condition. // // TrainingJobDefinition is a required field TrainingJobDefinition *HyperParameterTrainingJobDefinition `type:"structure" required:"true"` @@ -4591,9 +4614,9 @@ type CreateModelInput struct { // in the AWS Billing and Cost Management User Guide. Tags []*Tag `type:"list"` - // A object that specifies the VPC that you want your model to connect to. Control - // access to and from your model container by configuring the VPC. For more - // information, see host-vpc. + // A VpcConfig object that specifies the VPC that you want your model to connect + // to. Control access to and from your model container by configuring the VPC. + // For more information, see host-vpc. VpcConfig *VpcConfig `type:"structure"` } @@ -5149,9 +5172,9 @@ type CreateTrainingJobInput struct { // TrainingJobName is a required field TrainingJobName *string `min:"1" type:"string" required:"true"` - // A object that specifies the VPC that you want your training job to connect - // to. Control access to and from your training container by configuring the - // VPC. For more information, see train-vpc + // A VpcConfig object that specifies the VPC that you want your training job + // to connect to. Control access to and from your training container by configuring + // the VPC. For more information, see train-vpc VpcConfig *VpcConfig `type:"structure"` } @@ -5708,6 +5731,56 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +// Gets the Amazon EC2 Container Registry path of the docker image of the model +// that is hosted in this ProductionVariant. +// +// If you used the registry/repository[:tag] form to to specify the image path +// of the primary container when you created the model hosted in this ProductionVariant, +// the path resolves to a path of the form registry/repository[@digest]. A digest +// is a hash value that identifies a specific version of an image. For information +// about Amazon ECR paths, see Pulling an Image (http://docs.aws.amazon.com//AmazonECR/latest/userguide/docker-pull-ecr-image.html) +// in the Amazon ECR User Guide. +type DeployedImage struct { + _ struct{} `type:"structure"` + + // The date and time when the image path for the model resolved to the ResolvedImage + ResolutionTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The specific digest path of the image hosted in this ProductionVariant. + ResolvedImage *string `type:"string"` + + // The image path you specified when you created the model. + SpecifiedImage *string `type:"string"` +} + +// String returns the string representation +func (s DeployedImage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeployedImage) GoString() string { + return s.String() +} + +// SetResolutionTime sets the ResolutionTime field's value. +func (s *DeployedImage) SetResolutionTime(v time.Time) *DeployedImage { + s.ResolutionTime = &v + return s +} + +// SetResolvedImage sets the ResolvedImage field's value. +func (s *DeployedImage) SetResolvedImage(v string) *DeployedImage { + s.ResolvedImage = &v + return s +} + +// SetSpecifiedImage sets the SpecifiedImage field's value. +func (s *DeployedImage) SetSpecifiedImage(v string) *DeployedImage { + s.SpecifiedImage = &v + return s +} + type DescribeEndpointConfigInput struct { _ struct{} `type:"structure"` @@ -5889,8 +5962,8 @@ type DescribeEndpointOutput struct { // LastModifiedTime is a required field LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` - // An array of ProductionVariant objects, one for each model hosted behind this - // endpoint. + // An array of ProductionVariantSummary objects, one for each model hosted behind + // this endpoint. ProductionVariants []*ProductionVariantSummary `min:"1" type:"list"` } @@ -5996,8 +6069,8 @@ func (s *DescribeHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v type DescribeHyperParameterTuningJobOutput struct { _ struct{} `type:"structure"` - // A object that describes the training job that completed with the best current - // . + // A TrainingJobSummary object that describes the training job that completed + // with the best current HyperParameterTuningJobObjective. BestTrainingJob *HyperParameterTrainingJobSummary `type:"structure"` // The date and time that the tuning job started. @@ -6016,7 +6089,8 @@ type DescribeHyperParameterTuningJobOutput struct { // HyperParameterTuningJobArn is a required field HyperParameterTuningJobArn *string `type:"string" required:"true"` - // The object that specifies the configuration of the tuning job. + // The HyperParameterTuningJobConfig object that specifies the configuration + // of the tuning job. // // HyperParameterTuningJobConfig is a required field HyperParameterTuningJobConfig *HyperParameterTuningJobConfig `type:"structure" required:"true"` @@ -6035,20 +6109,21 @@ type DescribeHyperParameterTuningJobOutput struct { // The date and time that the status of the tuning job was modified. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` - // The object that specifies the number of training jobs, categorized by the - // status of their final objective metric, that this tuning job launched. + // The ObjectiveStatusCounters object that specifies the number of training + // jobs, categorized by the status of their final objective metric, that this + // tuning job launched. // // ObjectiveStatusCounters is a required field ObjectiveStatusCounters *ObjectiveStatusCounters `type:"structure" required:"true"` - // The object that specifies the definition of the training jobs that this tuning - // job launches. + // The HyperParameterTrainingJobDefinition object that specifies the definition + // of the training jobs that this tuning job launches. // // TrainingJobDefinition is a required field TrainingJobDefinition *HyperParameterTrainingJobDefinition `type:"structure" required:"true"` - // The object that specifies the number of training jobs, categorized by status, - // that this tuning job launched. + // The TrainingJobStatusCounters object that specifies the number of training + // jobs, categorized by status, that this tuning job launched. // // TrainingJobStatusCounters is a required field TrainingJobStatusCounters *TrainingJobStatusCounters `type:"structure" required:"true"` @@ -6204,8 +6279,8 @@ type DescribeModelOutput struct { // PrimaryContainer is a required field PrimaryContainer *ContainerDefinition `type:"structure" required:"true"` - // A object that specifies the VPC that this model has access to. For more information, - // see host-vpc + // A VpcConfig object that specifies the VPC that this model has access to. + // For more information, see host-vpc VpcConfig *VpcConfig `type:"structure"` } @@ -6710,8 +6785,8 @@ type DescribeTrainingJobOutput struct { // if the training job was launched by a hyperparameter tuning job. TuningJobArn *string `type:"string"` - // A object that specifies the VPC that this training job has access to. For - // more information, see train-vpc. + // A VpcConfig object that specifies the VPC that this training job has access + // to. For more information, see train-vpc. VpcConfig *VpcConfig `type:"structure"` } @@ -7071,7 +7146,8 @@ func (s *FinalHyperParameterTuningJobObjectiveMetric) SetValue(v float64) *Final type HyperParameterAlgorithmSpecification struct { _ struct{} `type:"structure"` - // An array of objects that specify the metrics that the algorithm emits. + // An array of MetricDefinition objects that specify the metrics that the algorithm + // emits. MetricDefinitions []*MetricDefinition `type:"list"` // The registry path of the Docker image that contains the training algorithm. @@ -7156,14 +7232,14 @@ func (s *HyperParameterAlgorithmSpecification) SetTrainingInputMode(v string) *H type HyperParameterTrainingJobDefinition struct { _ struct{} `type:"structure"` - // The object that specifies the algorithm to use for the training jobs that - // the tuning job launches. + // The HyperParameterAlgorithmSpecification object that specifies the algorithm + // to use for the training jobs that the tuning job launches. // // AlgorithmSpecification is a required field AlgorithmSpecification *HyperParameterAlgorithmSpecification `type:"structure" required:"true"` - // An array of objects that specify the input for the training jobs that the - // tuning job launches. + // An array of Channel objects that specify the input for the training jobs + // that the tuning job launches. // // InputDataConfig is a required field InputDataConfig []*Channel `min:"1" type:"list" required:"true"` @@ -7210,10 +7286,10 @@ type HyperParameterTrainingJobDefinition struct { // StoppingCondition is a required field StoppingCondition *StoppingCondition `type:"structure" required:"true"` - // The object that specifies the VPC that you want the training jobs that this - // hyperparameter tuning job launches to connect to. Control access to and from - // your training container by configuring the VPC. For more information, see - // train-vpc. + // The VpcConfig object that specifies the VPC that you want the training jobs + // that this hyperparameter tuning job launches to connect to. Control access + // to and from your training container by configuring the VPC. For more information, + // see train-vpc. VpcConfig *VpcConfig `type:"structure"` } @@ -7353,11 +7429,12 @@ type HyperParameterTrainingJobSummary struct { // CreationTime is a required field CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` - // The reason that the + // The reason that the training job failed. FailureReason *string `type:"string"` - // The object that specifies the value of the objective metric of the tuning - // job that launched this training job. + // The FinalHyperParameterTuningJobObjectiveMetric object that specifies the + // value of the objective metric of the tuning job that launched this training + // job. FinalHyperParameterTuningJobObjectiveMetric *FinalHyperParameterTuningJobObjectiveMetric `type:"structure"` // The status of the objective metric for the training job: @@ -7475,19 +7552,20 @@ func (s *HyperParameterTrainingJobSummary) SetTunedHyperParameters(v map[string] type HyperParameterTuningJobConfig struct { _ struct{} `type:"structure"` - // The object that specifies the objective metric for this tuning job. + // The HyperParameterTuningJobObjective object that specifies the objective + // metric for this tuning job. // // HyperParameterTuningJobObjective is a required field HyperParameterTuningJobObjective *HyperParameterTuningJobObjective `type:"structure" required:"true"` - // The object that specifies the ranges of hyperparameters that this tuning - // job searches. + // The ParameterRanges object that specifies the ranges of hyperparameters that + // this tuning job searches. // // ParameterRanges is a required field ParameterRanges *ParameterRanges `type:"structure" required:"true"` - // The object that specifies the maximum number of training jobs and parallel - // training jobs for this tuning job. + // The ResourceLimits object that specifies the maximum number of training jobs + // and parallel training jobs for this tuning job. // // ResourceLimits is a required field ResourceLimits *ResourceLimits `type:"structure" required:"true"` @@ -7659,14 +7737,14 @@ type HyperParameterTuningJobSummary struct { // The date and time that the tuning job was modified. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` - // The object that specifies the numbers of training jobs, categorized by objective - // metric status, that this tuning job launched. + // The ObjectiveStatusCounters object that specifies the numbers of training + // jobs, categorized by objective metric status, that this tuning job launched. // // ObjectiveStatusCounters is a required field ObjectiveStatusCounters *ObjectiveStatusCounters `type:"structure" required:"true"` - // The object that specifies the maximum number of training jobs and parallel - // training jobs allowed for this tuning job. + // The ResourceLimits object that specifies the maximum number of training jobs + // and parallel training jobs allowed for this tuning job. ResourceLimits *ResourceLimits `type:"structure"` // Specifies the search strategy hyperparameter tuning uses to choose which @@ -7676,8 +7754,8 @@ type HyperParameterTuningJobSummary struct { // Strategy is a required field Strategy *string `type:"string" required:"true" enum:"HyperParameterTuningJobStrategyType"` - // The object that specifies the numbers of training jobs, categorized by status, - // that this tuning job launched. + // The TrainingJobStatusCounters object that specifies the numbers of training + // jobs, categorized by status, that this tuning job launched. // // TrainingJobStatusCounters is a required field TrainingJobStatusCounters *TrainingJobStatusCounters `type:"structure" required:"true"` @@ -8129,7 +8207,7 @@ type ListHyperParameterTuningJobsInput struct { // time. LastModifiedTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` - // The maximum number of tuning jobs to return. + // The maximum number of tuning jobs to return. The default value is 10. MaxResults *int64 `min:"1" type:"integer"` // A string in the tuning job name. This filter returns only tuning jobs whose @@ -8237,8 +8315,8 @@ func (s *ListHyperParameterTuningJobsInput) SetStatusEquals(v string) *ListHyper type ListHyperParameterTuningJobsOutput struct { _ struct{} `type:"structure"` - // A list of objects that describe the tuning jobs that the ListHyperParameterTuningJobs - // request returned. + // A list of HyperParameterTuningJobSummary objects that describe the tuning + // jobs that the ListHyperParameterTuningJobs request returned. // // HyperParameterTuningJobSummaries is a required field HyperParameterTuningJobSummaries []*HyperParameterTuningJobSummary `type:"list" required:"true"` @@ -8824,7 +8902,7 @@ type ListTrainingJobsForHyperParameterTuningJobInput struct { // HyperParameterTuningJobName is a required field HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` - // The maximum number of training jobs to return. + // The maximum number of training jobs to return. The default value is 10. MaxResults *int64 `min:"1" type:"integer"` // If the result of the previous ListTrainingJobsForHyperParameterTuningJob @@ -8833,6 +8911,9 @@ type ListTrainingJobsForHyperParameterTuningJobInput struct { NextToken *string `type:"string"` // The field to sort results by. The default is Name. + // + // If the value of this field is FinalObjectiveMetricValue, any training jobs + // that did not return an objective metric are not listed. SortBy *string `type:"string" enum:"TrainingJobSortByOptions"` // The sort order for results. The default is Ascending. @@ -8915,8 +8996,8 @@ type ListTrainingJobsForHyperParameterTuningJobOutput struct { // of training jobs, use the token in the next request. NextToken *string `type:"string"` - // A list of objects that describe the training jobs that the ListTrainingJobsForHyperParameterTuningJob - // request returned. + // A list of TrainingJobSummary objects that describe the training jobs that + // the ListTrainingJobsForHyperParameterTuningJob request returned. // // TrainingJobSummaries is a required field TrainingJobSummaries []*HyperParameterTrainingJobSummary `type:"list" required:"true"` @@ -9116,7 +9197,7 @@ type MetricDefinition struct { // A regular expression that searches the output of a training job and gets // the value of the metric. For more information about using regular expressions - // to define metrics, see hpo-define-metrics. + // to define metrics, see automatic-model-tuning-define-metrics. // // Regex is a required field Regex *string `min:"1" type:"string" required:"true"` @@ -9751,6 +9832,10 @@ type ProductionVariantSummary struct { // The weight associated with the variant. CurrentWeight *float64 `type:"float"` + // An array of DeployedImage objects that specify the Amazon EC2 Container Registry + // paths of the inference images deployed on instances of this ProductionVariant. + DeployedImages []*DeployedImage `type:"list"` + // The number of instances requested in the UpdateEndpointWeightsAndCapacities // request. DesiredInstanceCount *int64 `min:"1" type:"integer"` @@ -9787,6 +9872,12 @@ func (s *ProductionVariantSummary) SetCurrentWeight(v float64) *ProductionVarian return s } +// SetDeployedImages sets the DeployedImages field's value. +func (s *ProductionVariantSummary) SetDeployedImages(v []*DeployedImage) *ProductionVariantSummary { + s.DeployedImages = v + return s +} + // SetDesiredInstanceCount sets the DesiredInstanceCount field's value. func (s *ProductionVariantSummary) SetDesiredInstanceCount(v int64) *ProductionVariantSummary { s.DesiredInstanceCount = &v @@ -11159,6 +11250,9 @@ const ( // NotebookInstanceStatusDeleting is a NotebookInstanceStatus enum value NotebookInstanceStatusDeleting = "Deleting" + + // NotebookInstanceStatusUpdating is a NotebookInstanceStatus enum value + NotebookInstanceStatusUpdating = "Updating" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index b476871388a..25be676e944 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -2361,6 +2361,180 @@ func (c *SSM) DescribeAssociationWithContext(ctx aws.Context, input *DescribeAss return out, req.Send() } +const opDescribeAssociationExecutionTargets = "DescribeAssociationExecutionTargets" + +// DescribeAssociationExecutionTargetsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAssociationExecutionTargets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAssociationExecutionTargets for more information on using the DescribeAssociationExecutionTargets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAssociationExecutionTargetsRequest method. +// req, resp := client.DescribeAssociationExecutionTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets +func (c *SSM) DescribeAssociationExecutionTargetsRequest(input *DescribeAssociationExecutionTargetsInput) (req *request.Request, output *DescribeAssociationExecutionTargetsOutput) { + op := &request.Operation{ + Name: opDescribeAssociationExecutionTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAssociationExecutionTargetsInput{} + } + + output = &DescribeAssociationExecutionTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAssociationExecutionTargets API operation for Amazon Simple Systems Manager (SSM). +// +// Use this API action to view information about a specific execution of a specific +// association. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DescribeAssociationExecutionTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" +// The specified association does not exist. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// * ErrCodeAssociationExecutionDoesNotExist "AssociationExecutionDoesNotExist" +// The specified execution ID does not exist. Verify the ID number and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutionTargets +func (c *SSM) DescribeAssociationExecutionTargets(input *DescribeAssociationExecutionTargetsInput) (*DescribeAssociationExecutionTargetsOutput, error) { + req, out := c.DescribeAssociationExecutionTargetsRequest(input) + return out, req.Send() +} + +// DescribeAssociationExecutionTargetsWithContext is the same as DescribeAssociationExecutionTargets with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAssociationExecutionTargets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DescribeAssociationExecutionTargetsWithContext(ctx aws.Context, input *DescribeAssociationExecutionTargetsInput, opts ...request.Option) (*DescribeAssociationExecutionTargetsOutput, error) { + req, out := c.DescribeAssociationExecutionTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAssociationExecutions = "DescribeAssociationExecutions" + +// DescribeAssociationExecutionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAssociationExecutions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAssociationExecutions for more information on using the DescribeAssociationExecutions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAssociationExecutionsRequest method. +// req, resp := client.DescribeAssociationExecutionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions +func (c *SSM) DescribeAssociationExecutionsRequest(input *DescribeAssociationExecutionsInput) (req *request.Request, output *DescribeAssociationExecutionsOutput) { + op := &request.Operation{ + Name: opDescribeAssociationExecutions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAssociationExecutionsInput{} + } + + output = &DescribeAssociationExecutionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAssociationExecutions API operation for Amazon Simple Systems Manager (SSM). +// +// Use this API action to view all executions for a specific association ID. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DescribeAssociationExecutions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" +// The specified association does not exist. +// +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The specified token is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeAssociationExecutions +func (c *SSM) DescribeAssociationExecutions(input *DescribeAssociationExecutionsInput) (*DescribeAssociationExecutionsOutput, error) { + req, out := c.DescribeAssociationExecutionsRequest(input) + return out, req.Send() +} + +// DescribeAssociationExecutionsWithContext is the same as DescribeAssociationExecutions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAssociationExecutions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DescribeAssociationExecutionsWithContext(ctx aws.Context, input *DescribeAssociationExecutionsInput, opts ...request.Option) (*DescribeAssociationExecutionsOutput, error) { + req, out := c.DescribeAssociationExecutionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeAutomationExecutions = "DescribeAutomationExecutions" // DescribeAutomationExecutionsRequest generates a "aws/request.Request" representing the @@ -7979,8 +8153,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 15 levels. 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 Requirements +// and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. // // * ErrCodeHierarchyTypeMismatchException "HierarchyTypeMismatchException" @@ -8722,6 +8896,89 @@ func (c *SSM) SendCommandWithContext(ctx aws.Context, input *SendCommandInput, o return out, req.Send() } +const opStartAssociationsOnce = "StartAssociationsOnce" + +// StartAssociationsOnceRequest generates a "aws/request.Request" representing the +// client's request for the StartAssociationsOnce operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartAssociationsOnce for more information on using the StartAssociationsOnce +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartAssociationsOnceRequest method. +// req, resp := client.StartAssociationsOnceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce +func (c *SSM) StartAssociationsOnceRequest(input *StartAssociationsOnceInput) (req *request.Request, output *StartAssociationsOnceOutput) { + op := &request.Operation{ + Name: opStartAssociationsOnce, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartAssociationsOnceInput{} + } + + output = &StartAssociationsOnceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartAssociationsOnce API operation for Amazon Simple Systems Manager (SSM). +// +// Use this API action to execute an association immediately and only one time. +// This action can be helpful when troubleshooting associations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation StartAssociationsOnce for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidAssociation "InvalidAssociation" +// The association is not valid or does not exist. +// +// * ErrCodeAssociationDoesNotExist "AssociationDoesNotExist" +// The specified association does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAssociationsOnce +func (c *SSM) StartAssociationsOnce(input *StartAssociationsOnceInput) (*StartAssociationsOnceOutput, error) { + req, out := c.StartAssociationsOnceRequest(input) + return out, req.Send() +} + +// StartAssociationsOnceWithContext is the same as StartAssociationsOnce with the addition of +// the ability to pass a context and additional request options. +// +// See StartAssociationsOnce for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) StartAssociationsOnceWithContext(ctx aws.Context, input *StartAssociationsOnceInput, opts ...request.Option) (*StartAssociationsOnceOutput, error) { + req, out := c.StartAssociationsOnceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartAutomationExecution = "StartAutomationExecution" // StartAutomationExecutionRequest generates a "aws/request.Request" representing the @@ -10283,68 +10540,381 @@ func (s *AssociationDescription) SetTargets(v []*Target) *AssociationDescription return s } -// Describes a filter. -type AssociationFilter struct { +// Includes information about the specified association. +type AssociationExecution struct { _ struct{} `type:"structure"` - // The name of the filter. - // - // Key is a required field - Key *string `locationName:"key" type:"string" required:"true" enum:"AssociationFilterKey"` + // The association ID. + AssociationId *string `type:"string"` - // The filter value. - // - // Value is a required field - Value *string `locationName:"value" min:"1" type:"string" required:"true"` + // The association version. + AssociationVersion *string `type:"string"` + + // The time the execution started. + CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Detailed status information about the execution. + DetailedStatus *string `type:"string"` + + // The execution ID for the association. If the association does not run at + // intervals or according to a schedule, then the ExecutionID is the same as + // the AssociationID. + ExecutionId *string `type:"string"` + + // The date of the last execution. + LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // An aggregate status of the resources in the execution based on the status + // type. + ResourceCountByStatus *string `type:"string"` + + // The status of the association execution. + Status *string `type:"string"` } // String returns the string representation -func (s AssociationFilter) String() string { +func (s AssociationExecution) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AssociationFilter) GoString() string { +func (s AssociationExecution) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociationFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociationFilter"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) - } +// SetAssociationId sets the AssociationId field's value. +func (s *AssociationExecution) SetAssociationId(v string) *AssociationExecution { + s.AssociationId = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAssociationVersion sets the AssociationVersion field's value. +func (s *AssociationExecution) SetAssociationVersion(v string) *AssociationExecution { + s.AssociationVersion = &v + return s } -// SetKey sets the Key field's value. -func (s *AssociationFilter) SetKey(v string) *AssociationFilter { - s.Key = &v +// SetCreatedTime sets the CreatedTime field's value. +func (s *AssociationExecution) SetCreatedTime(v time.Time) *AssociationExecution { + s.CreatedTime = &v return s } -// SetValue sets the Value field's value. -func (s *AssociationFilter) SetValue(v string) *AssociationFilter { - s.Value = &v +// SetDetailedStatus sets the DetailedStatus field's value. +func (s *AssociationExecution) SetDetailedStatus(v string) *AssociationExecution { + s.DetailedStatus = &v return s } -// Information about the association. -type AssociationOverview struct { - _ struct{} `type:"structure"` +// SetExecutionId sets the ExecutionId field's value. +func (s *AssociationExecution) SetExecutionId(v string) *AssociationExecution { + s.ExecutionId = &v + return s +} - // Returns the number of targets for the association status. For example, if - // you created an association with two instances, and one of them was successful, +// SetLastExecutionDate sets the LastExecutionDate field's value. +func (s *AssociationExecution) SetLastExecutionDate(v time.Time) *AssociationExecution { + s.LastExecutionDate = &v + return s +} + +// SetResourceCountByStatus sets the ResourceCountByStatus field's value. +func (s *AssociationExecution) SetResourceCountByStatus(v string) *AssociationExecution { + s.ResourceCountByStatus = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AssociationExecution) SetStatus(v string) *AssociationExecution { + s.Status = &v + return s +} + +// Filters used in the request. +type AssociationExecutionFilter struct { + _ struct{} `type:"structure"` + + // The key value used in the request. + // + // Key is a required field + Key *string `type:"string" required:"true" enum:"AssociationExecutionFilterKey"` + + // The filter type specified in the request. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"AssociationFilterOperatorType"` + + // The value specified for the key. + // + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociationExecutionFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationExecutionFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociationExecutionFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *AssociationExecutionFilter) SetKey(v string) *AssociationExecutionFilter { + s.Key = &v + return s +} + +// SetType sets the Type field's value. +func (s *AssociationExecutionFilter) SetType(v string) *AssociationExecutionFilter { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *AssociationExecutionFilter) SetValue(v string) *AssociationExecutionFilter { + s.Value = &v + return s +} + +// Includes information about the specified association execution. +type AssociationExecutionTarget struct { + _ struct{} `type:"structure"` + + // The association ID. + AssociationId *string `type:"string"` + + // The association version. + AssociationVersion *string `type:"string"` + + // Detailed information about the execution status. + DetailedStatus *string `type:"string"` + + // The execution ID. If the association does not run at intervals or according + // to a schedule, then the ExecutionID is the same as the AssociationID. + ExecutionId *string `type:"string"` + + // The date of the last execution. + LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The location where the association details are saved. + OutputSource *OutputSource `type:"structure"` + + // The resource ID, for example, the instance ID where the association ran. + ResourceId *string `min:"1" type:"string"` + + // The resource type, for example, instance. + ResourceType *string `min:"1" type:"string"` + + // The association execution status. + Status *string `type:"string"` +} + +// String returns the string representation +func (s AssociationExecutionTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationExecutionTarget) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *AssociationExecutionTarget) SetAssociationId(v string) *AssociationExecutionTarget { + s.AssociationId = &v + return s +} + +// SetAssociationVersion sets the AssociationVersion field's value. +func (s *AssociationExecutionTarget) SetAssociationVersion(v string) *AssociationExecutionTarget { + s.AssociationVersion = &v + return s +} + +// SetDetailedStatus sets the DetailedStatus field's value. +func (s *AssociationExecutionTarget) SetDetailedStatus(v string) *AssociationExecutionTarget { + s.DetailedStatus = &v + return s +} + +// SetExecutionId sets the ExecutionId field's value. +func (s *AssociationExecutionTarget) SetExecutionId(v string) *AssociationExecutionTarget { + s.ExecutionId = &v + return s +} + +// SetLastExecutionDate sets the LastExecutionDate field's value. +func (s *AssociationExecutionTarget) SetLastExecutionDate(v time.Time) *AssociationExecutionTarget { + s.LastExecutionDate = &v + return s +} + +// SetOutputSource sets the OutputSource field's value. +func (s *AssociationExecutionTarget) SetOutputSource(v *OutputSource) *AssociationExecutionTarget { + s.OutputSource = v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *AssociationExecutionTarget) SetResourceId(v string) *AssociationExecutionTarget { + s.ResourceId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *AssociationExecutionTarget) SetResourceType(v string) *AssociationExecutionTarget { + s.ResourceType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AssociationExecutionTarget) SetStatus(v string) *AssociationExecutionTarget { + s.Status = &v + return s +} + +// Filters for the association execution. +type AssociationExecutionTargetsFilter struct { + _ struct{} `type:"structure"` + + // The key value used in the request. + // + // Key is a required field + Key *string `type:"string" required:"true" enum:"AssociationExecutionTargetsFilterKey"` + + // The value specified for the key. + // + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociationExecutionTargetsFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationExecutionTargetsFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociationExecutionTargetsFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociationExecutionTargetsFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *AssociationExecutionTargetsFilter) SetKey(v string) *AssociationExecutionTargetsFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *AssociationExecutionTargetsFilter) SetValue(v string) *AssociationExecutionTargetsFilter { + s.Value = &v + return s +} + +// Describes a filter. +type AssociationFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter. + // + // Key is a required field + Key *string `locationName:"key" type:"string" required:"true" enum:"AssociationFilterKey"` + + // The filter value. + // + // Value is a required field + Value *string `locationName:"value" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociationFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociationFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociationFilter"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *AssociationFilter) SetKey(v string) *AssociationFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *AssociationFilter) SetValue(v string) *AssociationFilter { + s.Value = &v + return s +} + +// Information about the association. +type AssociationOverview struct { + _ struct{} `type:"structure"` + + // Returns the number of targets for the association status. For example, if + // you created an association with two instances, and one of them was successful, // this would return the count of instances by status. AssociationStatusAggregatedCount map[string]*int64 `type:"map"` @@ -14144,65 +14714,305 @@ type DeregisterTargetFromMaintenanceWindowOutput struct { } // String returns the string representation -func (s DeregisterTargetFromMaintenanceWindowOutput) String() string { +func (s DeregisterTargetFromMaintenanceWindowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterTargetFromMaintenanceWindowOutput) GoString() string { + return s.String() +} + +// SetWindowId sets the WindowId field's value. +func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTargetFromMaintenanceWindowOutput { + s.WindowId = &v + return s +} + +// SetWindowTargetId sets the WindowTargetId field's value. +func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowTargetId(v string) *DeregisterTargetFromMaintenanceWindowOutput { + s.WindowTargetId = &v + return s +} + +type DeregisterTaskFromMaintenanceWindowInput struct { + _ struct{} `type:"structure"` + + // The ID of the Maintenance Window the task should be removed from. + // + // WindowId is a required field + WindowId *string `min:"20" type:"string" required:"true"` + + // The ID of the task to remove from the Maintenance Window. + // + // WindowTaskId is a required field + WindowTaskId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeregisterTaskFromMaintenanceWindowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterTaskFromMaintenanceWindowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterTaskFromMaintenanceWindowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskFromMaintenanceWindowInput"} + if s.WindowId == nil { + invalidParams.Add(request.NewErrParamRequired("WindowId")) + } + if s.WindowId != nil && len(*s.WindowId) < 20 { + invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) + } + if s.WindowTaskId == nil { + invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) + } + if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWindowId sets the WindowId field's value. +func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowInput { + s.WindowId = &v + return s +} + +// SetWindowTaskId sets the WindowTaskId field's value. +func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowInput { + s.WindowTaskId = &v + return s +} + +type DeregisterTaskFromMaintenanceWindowOutput struct { + _ struct{} `type:"structure"` + + // The ID of the Maintenance Window the task was removed from. + WindowId *string `min:"20" type:"string"` + + // The ID of the task removed from the Maintenance Window. + WindowTaskId *string `min:"36" type:"string"` +} + +// String returns the string representation +func (s DeregisterTaskFromMaintenanceWindowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterTaskFromMaintenanceWindowOutput) GoString() string { + return s.String() +} + +// SetWindowId sets the WindowId field's value. +func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowOutput { + s.WindowId = &v + return s +} + +// SetWindowTaskId sets the WindowTaskId field's value. +func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowOutput { + s.WindowTaskId = &v + return s +} + +// Filter for the DescribeActivation API. +type DescribeActivationsFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter. + FilterKey *string `type:"string" enum:"DescribeActivationsFilterKeys"` + + // The filter values. + FilterValues []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeActivationsFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeActivationsFilter) GoString() string { + return s.String() +} + +// SetFilterKey sets the FilterKey field's value. +func (s *DescribeActivationsFilter) SetFilterKey(v string) *DescribeActivationsFilter { + s.FilterKey = &v + return s +} + +// SetFilterValues sets the FilterValues field's value. +func (s *DescribeActivationsFilter) SetFilterValues(v []*string) *DescribeActivationsFilter { + s.FilterValues = v + return s +} + +type DescribeActivationsInput struct { + _ struct{} `type:"structure"` + + // A filter to view information about your activations. + Filters []*DescribeActivationsFilter `type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // A token to start the list. Use this token to get the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeActivationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeActivationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeActivationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeActivationsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeActivationsInput) SetFilters(v []*DescribeActivationsFilter) *DescribeActivationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeActivationsInput) SetMaxResults(v int64) *DescribeActivationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeActivationsInput) SetNextToken(v string) *DescribeActivationsInput { + s.NextToken = &v + return s +} + +type DescribeActivationsOutput struct { + _ struct{} `type:"structure"` + + // A list of activations for your AWS account. + ActivationList []*Activation `type:"list"` + + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeActivationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeregisterTargetFromMaintenanceWindowOutput) GoString() string { +func (s DescribeActivationsOutput) GoString() string { return s.String() } -// SetWindowId sets the WindowId field's value. -func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTargetFromMaintenanceWindowOutput { - s.WindowId = &v +// SetActivationList sets the ActivationList field's value. +func (s *DescribeActivationsOutput) SetActivationList(v []*Activation) *DescribeActivationsOutput { + s.ActivationList = v return s } -// SetWindowTargetId sets the WindowTargetId field's value. -func (s *DeregisterTargetFromMaintenanceWindowOutput) SetWindowTargetId(v string) *DeregisterTargetFromMaintenanceWindowOutput { - s.WindowTargetId = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeActivationsOutput) SetNextToken(v string) *DescribeActivationsOutput { + s.NextToken = &v return s } -type DeregisterTaskFromMaintenanceWindowInput struct { +type DescribeAssociationExecutionTargetsInput struct { _ struct{} `type:"structure"` - // The ID of the Maintenance Window the task should be removed from. + // The association ID that includes the execution for which you want to view + // details. // - // WindowId is a required field - WindowId *string `min:"20" type:"string" required:"true"` + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` - // The ID of the task to remove from the Maintenance Window. + // The execution ID for which you want to view details. // - // WindowTaskId is a required field - WindowTaskId *string `min:"36" type:"string" required:"true"` + // ExecutionId is a required field + ExecutionId *string `type:"string" required:"true"` + + // Filters for the request. You can specify the following filters and values. + // + // Status (EQUAL) + // + // ResourceId (EQUAL) + // + // ResourceType (EQUAL) + Filters []*AssociationExecutionTargetsFilter `min:"1" type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // A token to start the list. Use this token to get the next set of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DeregisterTaskFromMaintenanceWindowInput) String() string { +func (s DescribeAssociationExecutionTargetsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeregisterTaskFromMaintenanceWindowInput) GoString() string { +func (s DescribeAssociationExecutionTargetsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterTaskFromMaintenanceWindowInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterTaskFromMaintenanceWindowInput"} - if s.WindowId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowId")) +func (s *DescribeAssociationExecutionTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionTargetsInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) } - if s.WindowId != nil && len(*s.WindowId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) + if s.ExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionId")) } - if s.WindowTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("WindowTaskId")) + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) } - if s.WindowTaskId != nil && len(*s.WindowTaskId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("WindowTaskId", 36)) + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } } if invalidParams.Len() > 0 { @@ -14211,88 +15021,85 @@ func (s *DeregisterTaskFromMaintenanceWindowInput) Validate() error { return nil } -// SetWindowId sets the WindowId field's value. -func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowInput { - s.WindowId = &v +// SetAssociationId sets the AssociationId field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetAssociationId(v string) *DescribeAssociationExecutionTargetsInput { + s.AssociationId = &v return s } -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *DeregisterTaskFromMaintenanceWindowInput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowInput { - s.WindowTaskId = &v +// SetExecutionId sets the ExecutionId field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetExecutionId(v string) *DescribeAssociationExecutionTargetsInput { + s.ExecutionId = &v return s } -type DeregisterTaskFromMaintenanceWindowOutput struct { - _ struct{} `type:"structure"` - - // The ID of the Maintenance Window the task was removed from. - WindowId *string `min:"20" type:"string"` - - // The ID of the task removed from the Maintenance Window. - WindowTaskId *string `min:"36" type:"string"` -} - -// String returns the string representation -func (s DeregisterTaskFromMaintenanceWindowOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeregisterTaskFromMaintenanceWindowOutput) GoString() string { - return s.String() +// SetFilters sets the Filters field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetFilters(v []*AssociationExecutionTargetsFilter) *DescribeAssociationExecutionTargetsInput { + s.Filters = v + return s } -// SetWindowId sets the WindowId field's value. -func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowId(v string) *DeregisterTaskFromMaintenanceWindowOutput { - s.WindowId = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetMaxResults(v int64) *DescribeAssociationExecutionTargetsInput { + s.MaxResults = &v return s } -// SetWindowTaskId sets the WindowTaskId field's value. -func (s *DeregisterTaskFromMaintenanceWindowOutput) SetWindowTaskId(v string) *DeregisterTaskFromMaintenanceWindowOutput { - s.WindowTaskId = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeAssociationExecutionTargetsInput) SetNextToken(v string) *DescribeAssociationExecutionTargetsInput { + s.NextToken = &v return s } -// Filter for the DescribeActivation API. -type DescribeActivationsFilter struct { +type DescribeAssociationExecutionTargetsOutput struct { _ struct{} `type:"structure"` - // The name of the filter. - FilterKey *string `type:"string" enum:"DescribeActivationsFilterKeys"` + // Information about the execution. + AssociationExecutionTargets []*AssociationExecutionTarget `type:"list"` - // The filter values. - FilterValues []*string `type:"list"` + // The token for the next set of items to return. Use this token to get the + // next set of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeActivationsFilter) String() string { +func (s DescribeAssociationExecutionTargetsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeActivationsFilter) GoString() string { +func (s DescribeAssociationExecutionTargetsOutput) GoString() string { return s.String() } -// SetFilterKey sets the FilterKey field's value. -func (s *DescribeActivationsFilter) SetFilterKey(v string) *DescribeActivationsFilter { - s.FilterKey = &v +// SetAssociationExecutionTargets sets the AssociationExecutionTargets field's value. +func (s *DescribeAssociationExecutionTargetsOutput) SetAssociationExecutionTargets(v []*AssociationExecutionTarget) *DescribeAssociationExecutionTargetsOutput { + s.AssociationExecutionTargets = v return s } -// SetFilterValues sets the FilterValues field's value. -func (s *DescribeActivationsFilter) SetFilterValues(v []*string) *DescribeActivationsFilter { - s.FilterValues = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeAssociationExecutionTargetsOutput) SetNextToken(v string) *DescribeAssociationExecutionTargetsOutput { + s.NextToken = &v return s } -type DescribeActivationsInput struct { +type DescribeAssociationExecutionsInput struct { _ struct{} `type:"structure"` - // A filter to view information about your activations. - Filters []*DescribeActivationsFilter `type:"list"` + // The association ID for which you want to view execution history details. + // + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` + + // Filters for the request. You can specify the following filters and values. + // + // ExecutionId (EQUAL) + // + // Status (EQUAL) + // + // CreatedTime (EQUAL, GREATER_THAN, LESS_THAN) + Filters []*AssociationExecutionFilter `min:"1" type:"list"` // The maximum number of items to return for this call. The call also returns // a token that you can specify in a subsequent call to get the next set of @@ -14304,21 +15111,37 @@ type DescribeActivationsInput struct { } // String returns the string representation -func (s DescribeActivationsInput) String() string { +func (s DescribeAssociationExecutionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeActivationsInput) GoString() string { +func (s DescribeAssociationExecutionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeActivationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeActivationsInput"} +func (s *DescribeAssociationExecutionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationExecutionsInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -14326,29 +15149,35 @@ func (s *DescribeActivationsInput) Validate() error { return nil } +// SetAssociationId sets the AssociationId field's value. +func (s *DescribeAssociationExecutionsInput) SetAssociationId(v string) *DescribeAssociationExecutionsInput { + s.AssociationId = &v + return s +} + // SetFilters sets the Filters field's value. -func (s *DescribeActivationsInput) SetFilters(v []*DescribeActivationsFilter) *DescribeActivationsInput { +func (s *DescribeAssociationExecutionsInput) SetFilters(v []*AssociationExecutionFilter) *DescribeAssociationExecutionsInput { s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. -func (s *DescribeActivationsInput) SetMaxResults(v int64) *DescribeActivationsInput { +func (s *DescribeAssociationExecutionsInput) SetMaxResults(v int64) *DescribeAssociationExecutionsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeActivationsInput) SetNextToken(v string) *DescribeActivationsInput { +func (s *DescribeAssociationExecutionsInput) SetNextToken(v string) *DescribeAssociationExecutionsInput { s.NextToken = &v return s } -type DescribeActivationsOutput struct { +type DescribeAssociationExecutionsOutput struct { _ struct{} `type:"structure"` - // A list of activations for your AWS account. - ActivationList []*Activation `type:"list"` + // A list of the executions for the specified association ID. + AssociationExecutions []*AssociationExecution `type:"list"` // The token for the next set of items to return. Use this token to get the // next set of results. @@ -14356,23 +15185,23 @@ type DescribeActivationsOutput struct { } // String returns the string representation -func (s DescribeActivationsOutput) String() string { +func (s DescribeAssociationExecutionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeActivationsOutput) GoString() string { +func (s DescribeAssociationExecutionsOutput) GoString() string { return s.String() } -// SetActivationList sets the ActivationList field's value. -func (s *DescribeActivationsOutput) SetActivationList(v []*Activation) *DescribeActivationsOutput { - s.ActivationList = v +// SetAssociationExecutions sets the AssociationExecutions field's value. +func (s *DescribeAssociationExecutionsOutput) SetAssociationExecutions(v []*AssociationExecution) *DescribeAssociationExecutionsOutput { + s.AssociationExecutions = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeActivationsOutput) SetNextToken(v string) *DescribeActivationsOutput { +func (s *DescribeAssociationExecutionsOutput) SetNextToken(v string) *DescribeAssociationExecutionsOutput { s.NextToken = &v return s } @@ -19591,8 +20420,8 @@ type GetParametersByPathInput struct { ParameterFilters []*ParameterStringFilter `type:"list"` // The hierarchy for the parameter. Hierarchies start with a forward slash (/) - // and end with the parameter name. A hierarchy can have a maximum of 15 levels. - // Here is an example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33 + // and end with the parameter name. A parameter name hierarchy can have a maximum + // of 15 levels. Here is an example of a hierarchy: /Finance/Prod/IAD/WinServ2016/license33 // // Path is a required field Path *string `min:"1" type:"string" required:"true"` @@ -24143,6 +24972,41 @@ func (s *NotificationConfig) SetNotificationType(v string) *NotificationConfig { return s } +// Information about the source where the association execution details are +// stored. +type OutputSource struct { + _ struct{} `type:"structure"` + + // The ID of the output source, for example the URL of an Amazon S3 bucket. + OutputSourceId *string `min:"36" type:"string"` + + // The type of source where the association execution details are stored, for + // example, Amazon S3. + OutputSourceType *string `type:"string"` +} + +// String returns the string representation +func (s OutputSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputSource) GoString() string { + return s.String() +} + +// SetOutputSourceId sets the OutputSourceId field's value. +func (s *OutputSource) SetOutputSourceId(v string) *OutputSource { + s.OutputSourceId = &v + return s +} + +// SetOutputSourceType sets the OutputSourceType field's value. +func (s *OutputSource) SetOutputSourceType(v string) *OutputSource { + s.OutputSourceType = &v + return s +} + // An Amazon EC2 Systems Manager parameter in Parameter Store. type Parameter struct { _ struct{} `type:"structure"` @@ -25532,7 +26396,7 @@ type PatchSource struct { // // keepcache=0 // - // debualevel=2 + // debuglevel=2 // // Configuration is a required field Configuration *string `min:"1" type:"string" required:"true"` @@ -25892,22 +26756,49 @@ type PutParameterInput struct { // AllowedPattern=^\d+$ AllowedPattern *string `type:"string"` - // Information about the parameter that you want to add to the system. + // Information about the parameter that you want to add to the system. Optional + // but recommended. // // Do not enter personally identifiable information in this field. Description *string `type:"string"` - // The KMS Key ID that you want to use to encrypt a parameter when you choose - // the SecureString data type. If you don't specify a key ID, the system uses - // the default key associated with your AWS account. + // The KMS Key ID that you want to use to encrypt a parameter. Either the default + // AWS Key Management Service (AWS KMS) key automatically assigned to your AWS + // account or a custom key. Required for parameters that use the SecureString + // data type. + // + // If you don't specify a key ID, the system uses the default key associated + // with your AWS account. + // + // * To use your default AWS KMS key, choose the SecureString data type, + // and do not specify the Key ID when you create the parameter. The system + // automatically populates Key ID with your default KMS key. + // + // * To use a custom KMS key, choose the SecureString data type with the + // Key ID parameter. KeyId *string `min:"1" type:"string"` // The fully qualified name of the parameter that you want to add to the system. // The fully qualified name includes the complete hierarchy of the parameter // path and name. For example: /Dev/DBServer/MySQL/db-string13 // - // For information about parameter name requirements and restrictions, see Creating - // Systems Manager Parameters (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html) + // Naming Constraints: + // + // * Parameter names are case sensitive. + // + // * A parameter name must be unique within an AWS Region + // + // * A parameter name can't be prefixed with "aws" or "ssm" (case-insensitive). + // + // * Parameter names can include only the following symbols and letters: + // a-zA-Z0-9_.-/ + // + // * A parameter name can't include spaces. + // + // * Parameter hierarchies are limited to a maximum depth of fifteen levels. + // + // For additional information about valid values for parameter names, see Requirements + // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. // // The maximum length constraint listed below includes capacity for additional @@ -25922,6 +26813,13 @@ type PutParameterInput struct { // The type of parameter that you want to add to the system. // + // Items in a StringList must be separated by a comma (,). You can't use other + // punctuation or special character to escape items in the list. If you have + // a parameter value that requires a comma, then use the String data type. + // + // SecureString is not currently supported for AWS CloudFormation templates + // or in the China Regions. + // // Type is a required field Type *string `type:"string" required:"true" enum:"ParameterType"` @@ -27590,6 +28488,61 @@ func (s *SeveritySummary) SetUnspecifiedCount(v int64) *SeveritySummary { return s } +type StartAssociationsOnceInput struct { + _ struct{} `type:"structure"` + + // The association IDs that you want to execute immediately and only one time. + // + // AssociationIds is a required field + AssociationIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s StartAssociationsOnceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartAssociationsOnceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartAssociationsOnceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartAssociationsOnceInput"} + if s.AssociationIds == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationIds")) + } + if s.AssociationIds != nil && len(s.AssociationIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AssociationIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationIds sets the AssociationIds field's value. +func (s *StartAssociationsOnceInput) SetAssociationIds(v []*string) *StartAssociationsOnceInput { + s.AssociationIds = v + return s +} + +type StartAssociationsOnceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartAssociationsOnceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartAssociationsOnceOutput) GoString() string { + return s.String() +} + type StartAutomationExecutionInput struct { _ struct{} `type:"structure"` @@ -29754,6 +30707,28 @@ func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBas return s } +const ( + // AssociationExecutionFilterKeyExecutionId is a AssociationExecutionFilterKey enum value + AssociationExecutionFilterKeyExecutionId = "ExecutionId" + + // AssociationExecutionFilterKeyStatus is a AssociationExecutionFilterKey enum value + AssociationExecutionFilterKeyStatus = "Status" + + // AssociationExecutionFilterKeyCreatedTime is a AssociationExecutionFilterKey enum value + AssociationExecutionFilterKeyCreatedTime = "CreatedTime" +) + +const ( + // AssociationExecutionTargetsFilterKeyStatus is a AssociationExecutionTargetsFilterKey enum value + AssociationExecutionTargetsFilterKeyStatus = "Status" + + // AssociationExecutionTargetsFilterKeyResourceId is a AssociationExecutionTargetsFilterKey enum value + AssociationExecutionTargetsFilterKeyResourceId = "ResourceId" + + // AssociationExecutionTargetsFilterKeyResourceType is a AssociationExecutionTargetsFilterKey enum value + AssociationExecutionTargetsFilterKeyResourceType = "ResourceType" +) + const ( // AssociationFilterKeyInstanceId is a AssociationFilterKey enum value AssociationFilterKeyInstanceId = "InstanceId" @@ -29777,6 +30752,17 @@ const ( AssociationFilterKeyAssociationName = "AssociationName" ) +const ( + // AssociationFilterOperatorTypeEqual is a AssociationFilterOperatorType enum value + AssociationFilterOperatorTypeEqual = "EQUAL" + + // AssociationFilterOperatorTypeLessThan is a AssociationFilterOperatorType enum value + AssociationFilterOperatorTypeLessThan = "LESS_THAN" + + // AssociationFilterOperatorTypeGreaterThan is a AssociationFilterOperatorType enum value + AssociationFilterOperatorTypeGreaterThan = "GREATER_THAN" +) + const ( // AssociationStatusNamePending is a AssociationStatusName enum value AssociationStatusNamePending = "Pending" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index 4cb00aed6fb..b95f36009d1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -30,6 +30,12 @@ const ( // The specified association does not exist. ErrCodeAssociationDoesNotExist = "AssociationDoesNotExist" + // ErrCodeAssociationExecutionDoesNotExist for service response error code + // "AssociationExecutionDoesNotExist". + // + // The specified execution ID does not exist. Verify the ID number and try again. + ErrCodeAssociationExecutionDoesNotExist = "AssociationExecutionDoesNotExist" + // ErrCodeAssociationLimitExceeded for service response error code // "AssociationLimitExceeded". // @@ -150,8 +156,8 @@ const ( // ErrCodeHierarchyLevelLimitExceededException for service response error code // "HierarchyLevelLimitExceededException". // - // 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) + // A hierarchy can have a maximum of 15 levels. For more information, see Requirements + // and Constraints for Parameter Names (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html) // in the AWS Systems Manager User Guide. ErrCodeHierarchyLevelLimitExceededException = "HierarchyLevelLimitExceededException" @@ -196,6 +202,12 @@ const ( // The request does not meet the regular expression requirement. ErrCodeInvalidAllowedPatternException = "InvalidAllowedPatternException" + // ErrCodeInvalidAssociation for service response error code + // "InvalidAssociation". + // + // The association is not valid or does not exist. + ErrCodeInvalidAssociation = "InvalidAssociation" + // ErrCodeInvalidAssociationVersion for service response error code // "InvalidAssociationVersion". // diff --git a/vendor/vendor.json b/vendor/vendor.json index a38b8f0b93a..b35d5753023 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,980 +39,980 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "f02wA9pKt/oP/zrPtJipDZznSp0=", + "checksumSHA1": "ZfB35vNNj+4AXCsW5UbYY8Pogwg=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "925zPp8gtaXi2gkWrgZ1gAA003A=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "GTdSvwEbZz636RtRQDrQMOU9q9Q=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "SiJtmziOCUHNwVwWjrD5ccxbEN0=", + "checksumSHA1": "Q1co3y5Y8rRIEjEXEfUZ9SwTmic=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "CYLheDSqXftEAmmdj+tTiT+83Ko=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "+d8hhT6Ih+DsRpkF44pvw+IkI7w=", + "checksumSHA1": "zx1mZCdOwgbjBV3jMfb0kyDd//Q=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "u3cA2IiD36A+VnFIH7XtGjYk2NU=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Ij9RP5HrBWBYYb3/LEMHNNZXH9g=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "2ywNMWQ3qxbz/dzuuOC/42xXzWM=", + "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "/JJPEdYxSgTTDqUDTAaSJQSKNn0=", + "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "/2Ppb4vP/H+B3cM7bOOEeA7Z0iY=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "6zosteWJqUGM9+t9dkANQymMA9s=", + "checksumSHA1": "cW7mfCta/3RjWAsEn4BeJKe8TdI=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "ZXFD3oHS8QZ3GgWn+k4lMnUaEUk=", + "checksumSHA1": "d8MH0CgeCpRAQTFIjcEaPFDXw0w=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "k1TqEWHeP84mmRewv19ZVORhSm8=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "MKWkj+pGwGygVTVTg/Q38JY+mhU=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "hq8SWUb/J1wEZ1O3TkV8xma5EXk=", + "checksumSHA1": "RpzI2CVxVXCkMK0Tuhc54YvyoqE=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "NaaFnxUCj2cKaWagwc9ZP6Su2UQ=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "/nF1VEl/Y9I9EYbUHvUuhqjipUk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "kko+es9ly+l/e9ngcpCdPx2DBAc=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "kHOf0VEd2Qy8PYZsg7/zG+JkF1o=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "gJiK41PSoCEfE02VEry4f6nBg0s=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "bbCNma+YJRqcjnIqmTagqs1IwWI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "bupt0rs/P2QN+iuFeFC7oY1HZ14=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "P8cLAj/ovFt7uH3bB4dRg/2KApI=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "eCrAi2QJw0Ft6A8XK5ZGLpsPKwM=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "ItkRLsVGZt8uvkI4+7+mi9Ccy28=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Y+x1N7TFB7OesWPRoYXRwGOdQzs=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "PxsIahbkFuks12VthBlqFJIUzX0=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "ciAsJhe41ygl47dhStzMJfGVFPQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "tHLvGt81PahiKYHOXlF7bFvE9cE=", + "checksumSHA1": "ogQG+VXR3g5K6O09wFSsPp0g7fs=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Q+W+AVveTI7xM3ay6HAi0FB4Dpc=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "6lozLpoMkQvw1r2cZMXujYiLqK8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "JNLWxWRvZ8UNPV8nWHgzIybuMuE=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "iPP1QQAsTiK0TYWVn7ksDLfDXDE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "JbgQL/r+cBKIKt+tQY8VSj0C2j8=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "orboEPrXFUPc3m7ZG8uPhZNZDdM=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "C0by27wccwVfdXwaNNyvDEYUPdA=", + "checksumSHA1": "spYFA1gAmUHAUFd24v2xwMOLxrY=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "/zBS/FARxFnNMfLUg1Vq1FVK95c=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "olDBindEWwTHzKfpWaS+xID4y90=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "i7fuDfXYhe4JMJhail5nZUg69Dk=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "jURA8oKlQkbYPPrBQIeOPbQAVN0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "GFq6SaQ4h48iP+gjllWjMyIbQfU=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "SfYmxNsUZdSLy6VahSyRVaACeSU=", + "checksumSHA1": "aBYDdFhx/8bxKl0l++Gh2P2+4eM=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "T4Yw3GPZg+KwAEudsypRfhbUrVw=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "niBN6QYBEhoHvxQpSH8qWjEMNYo=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "cmqLlPyg/fwIy8M3qaZTdBt0CGQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "mzgRjocmzU6VLUsim7E8/fffffk=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "A5DCzVFhE5iT60fQXjlyLDHKFsg=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "K0yPG0O4/Wv2pYASbxO6LjH8318=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "aNIs4oJTp3x73Fx24tKO2cDY5OM=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "cRuJDtc9rVpXUqfLrg1cJleaPjQ=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "XKNeVP6DCohd9Re9g4xGLuqXe0c=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "MWADuSvEQnYoVAI/HCnmJetMle4=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "X+8twdJk/x1+8y1LxnKXXd3eVoY=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "PJQ5SFC+Ai5Mqn8rfGhuwttfqZk=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "xI94HsdAG+dBFCm38FoELBdbe9c=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "FEfr6yYlSRWsIV0M0kxm0/jOw0E=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "k/XNa0qsR9DMIG8Sqg4cGlePTKE=", + "checksumSHA1": "KWE5gG/M/Fz9tnmcFgGPphwwX2Y=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "1tAb3rvB34c3zsX+DRY5xDJqNUA=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "si/Re/DEfX8xWIjpLS4NNISO/Ns=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Q2K/MWy6yy/kV9CZ0YhaEHBNgkI=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "OvCoIYyhBSlrCvsk8uidGznXIss=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "44R3VB9KreeYj0LFf3KBd37kPXI=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "H49wXCqvNMWvsuj6+MfzsvLVE9s=", + "checksumSHA1": "rwHYPohmwgbKTkEpVoR3PtvqU28=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "zrWHv2XG/KP9E82ophSO0XF+Cu8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "xq1jxTLdjjWU+aupMh143C+Yb1Q=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "onhxya8p2Q2wgT2TakO+ZcjwY/I=", + "checksumSHA1": "8p+iBG3V+xlFkx+j4QJrjRsRWCk=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "HoX+EX8JW8kDZxJAs8545YRfjuI=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "ahm1SzqWwGUqPih6jPZwIevl2Pg=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "0YZZzbKYjappFNT8MUR5qNGQkRY=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "rrANYUKEHHEofZJYCP1pQhO35TE=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "p/+jOAMB5MSAnPloxJIFy77Hfck=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "W6AvJYPtvCLTeA0USbhvid2rP1o=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "yV8F3bM8W2kSZJH4TDx4mJWnrac=", + "checksumSHA1": "x3PsW91a7fh+Q466y3WM3fdtnGg=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Davg8yRIMOcfa7/6zp7Fj6GnpuA=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "32fGeVnRDBhJlp3Oc25r4R2M3oc=", + "checksumSHA1": "RfTumx3C/ryCRp8ACLwhfnF+Cw0=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "KRtVvKvBRTs2cTTuiRWzjhJ8OC0=", + "checksumSHA1": "wLRUH2H2vTS7yMgnCqhMcZ8GvWc=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "oe9xtK3GMCwCDmra0+JC6GwJ99k=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "YB8Nvesxefrheq/zAGyO3NzSEYI=", + "checksumSHA1": "1qeG+wA9KLSzxwsAYd+e0LZTtPY=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "zTqXRGkYH+IyYOH5Uezj2M4B9xM=", + "checksumSHA1": "0U6ukhqF23CsyO8oOX2vqWCAEoY=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "JqG/wC6zOGiK99YlSy31DADaV5w=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "x2vfgk/EnGjOWPywWL+LKJKYCF0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Z61MRqI0vu8oGAaCZSCDes9gIvk=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "TPGJU1VzYOhJIdTbWal1ivDwT+4=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "7kmVHadImICOa4/MOXErR53CdbQ=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { - "checksumSHA1": "Zu/wepnCWpEe8M2DEYTaVTteys8=", + "checksumSHA1": "dNqHygRKji7C2fk9m04roQovors=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "uguCtF1eoCG71dvEVqrYbFs7py0=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "vlL9ibWgidiPj0uQ2L/OF6DCVEs=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "Ro5RX6aw32UGrGueBK+zhA8+Z30=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "UGQwnAeB9SoJKyPPIpbDJVQws5g=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "5e98666858b97db54a61044bb1150d3b81436860", - "revisionTime": "2018-06-28T21:27:56Z", - "version": "v1.14.16", - "versionExact": "v1.14.16" + "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", + "revisionTime": "2018-07-10T21:25:17Z", + "version": "v1.14.24", + "versionExact": "v1.14.24" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 8ed286293666f23adadf9745a65289f3a22fd5a5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 09:12:39 -0400 Subject: [PATCH 1814/3316] resource/aws_lambda_function: Support dotnetcore2.1 runtime validation --- aws/resource_aws_lambda_function.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index 1b85448dc17..8144b2aedb2 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -104,6 +104,7 @@ func resourceAwsLambdaFunction() *schema.Resource { // lambda.RuntimeNodejs has reached end of life since October 2016 so not included here lambda.RuntimeDotnetcore10, lambda.RuntimeDotnetcore20, + lambda.RuntimeDotnetcore21, lambda.RuntimeGo1X, lambda.RuntimeJava8, lambda.RuntimeNodejs43, From 39238cbd44a539ce6d571b02e1cb8dbbb04df00f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 09:45:50 -0400 Subject: [PATCH 1815/3316] resource/aws_glue_crawler: Support DynamoDB targets --- aws/resource_aws_glue_crawler.go | 64 +++++++++++++++-- aws/resource_aws_glue_crawler_test.go | 85 +++++++++++++++++++++++ website/docs/r/glue_crawler.html.markdown | 21 +++++- 3 files changed, 163 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_glue_crawler.go b/aws/resource_aws_glue_crawler.go index aa4e0c5d0f3..25333a69a52 100644 --- a/aws/resource_aws_glue_crawler.go +++ b/aws/resource_aws_glue_crawler.go @@ -108,6 +108,19 @@ func resourceAwsGlueCrawler() *schema.Resource { }, }, }, + "dynamodb_target": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "path": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "jdbc_target": { Type: schema.TypeList, Optional: true, @@ -235,19 +248,42 @@ func expandGlueSchemaChangePolicy(v []interface{}) *glue.SchemaChangePolicy { func expandGlueCrawlerTargets(d *schema.ResourceData) (*glue.CrawlerTargets, error) { crawlerTargets := &glue.CrawlerTargets{} + dynamodbTargets, dynamodbTargetsOk := d.GetOk("dynamodb_target") jdbcTargets, jdbcTargetsOk := d.GetOk("jdbc_target") s3Targets, s3TargetsOk := d.GetOk("s3_target") - if !jdbcTargetsOk && !s3TargetsOk { - return nil, fmt.Errorf("jdbc targets or s3 targets configuration is required") + if !dynamodbTargetsOk && !jdbcTargetsOk && !s3TargetsOk { + return nil, fmt.Errorf("One of the following configurations is required: dynamodb_target, jdbc_target, s3_target") } log.Print("[DEBUG] Creating crawler target") - crawlerTargets.S3Targets = expandGlueS3Targets(s3Targets.([]interface{})) + crawlerTargets.DynamoDBTargets = expandGlueDynamoDBTargets(dynamodbTargets.([]interface{})) crawlerTargets.JdbcTargets = expandGlueJdbcTargets(jdbcTargets.([]interface{})) + crawlerTargets.S3Targets = expandGlueS3Targets(s3Targets.([]interface{})) return crawlerTargets, nil } +func expandGlueDynamoDBTargets(targets []interface{}) []*glue.DynamoDBTarget { + if len(targets) < 1 { + return []*glue.DynamoDBTarget{} + } + + perms := make([]*glue.DynamoDBTarget, len(targets), len(targets)) + for i, rawCfg := range targets { + cfg := rawCfg.(map[string]interface{}) + perms[i] = expandGlueDynamoDBTarget(cfg) + } + return perms +} + +func expandGlueDynamoDBTarget(cfg map[string]interface{}) *glue.DynamoDBTarget { + target := &glue.DynamoDBTarget{ + Path: aws.String(cfg["path"].(string)), + } + + return target +} + func expandGlueS3Targets(targets []interface{}) []*glue.S3Target { if len(targets) < 1 { return []*glue.S3Target{} @@ -364,12 +400,16 @@ func resourceAwsGlueCrawlerRead(d *schema.ResourceData, meta interface{}) error } if crawlerOutput.Crawler.Targets != nil { - if err := d.Set("s3_target", flattenGlueS3Targets(crawlerOutput.Crawler.Targets.S3Targets)); err != nil { - log.Printf("[ERR] Error setting Glue S3 Targets: %s", err) + if err := d.Set("dynamodb_target", flattenGlueDynamoDBTargets(crawlerOutput.Crawler.Targets.DynamoDBTargets)); err != nil { + return fmt.Errorf("error setting dynamodb_target: %s", err) } if err := d.Set("jdbc_target", flattenGlueJdbcTargets(crawlerOutput.Crawler.Targets.JdbcTargets)); err != nil { - log.Printf("[ERR] Error setting Glue JDBC Targets: %s", err) + return fmt.Errorf("error setting jdbc_target: %s", err) + } + + if err := d.Set("s3_target", flattenGlueS3Targets(crawlerOutput.Crawler.Targets.S3Targets)); err != nil { + return fmt.Errorf("error setting s3_target: %s", err) } } @@ -389,6 +429,18 @@ func flattenGlueS3Targets(s3Targets []*glue.S3Target) []map[string]interface{} { return result } +func flattenGlueDynamoDBTargets(dynamodbTargets []*glue.DynamoDBTarget) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + + for _, dynamodbTarget := range dynamodbTargets { + attrs := make(map[string]interface{}) + attrs["path"] = aws.StringValue(dynamodbTarget.Path) + + result = append(result, attrs) + } + return result +} + func flattenGlueJdbcTargets(jdbcTargets []*glue.JdbcTarget) []map[string]interface{} { result := make([]map[string]interface{}, 0) diff --git a/aws/resource_aws_glue_crawler_test.go b/aws/resource_aws_glue_crawler_test.go index 81ad0f878c7..36252efd964 100644 --- a/aws/resource_aws_glue_crawler_test.go +++ b/aws/resource_aws_glue_crawler_test.go @@ -64,6 +64,67 @@ func testSweepGlueCrawlers(region string) error { return nil } +func TestAccAWSGlueCrawler_DynamodbTarget(t *testing.T) { + var crawler glue.Crawler + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_glue_crawler.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCrawlerConfig_DynamodbTarget(rName, "table1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueCrawlerExists(resourceName, &crawler), + resource.TestCheckResourceAttr(resourceName, "classifiers.#", "0"), + resource.TestCheckResourceAttr(resourceName, "configuration", ""), + resource.TestCheckResourceAttr(resourceName, "database_name", rName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.#", "1"), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.0.path", "table1"), + resource.TestCheckResourceAttr(resourceName, "jdbc_target.#", "0"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "role", rName), + resource.TestCheckResourceAttr(resourceName, "s3_target.#", "0"), + resource.TestCheckResourceAttr(resourceName, "schedule", ""), + resource.TestCheckResourceAttr(resourceName, "schema_change_policy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), + resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), + resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + ), + }, + { + Config: testAccGlueCrawlerConfig_DynamodbTarget(rName, "table2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueCrawlerExists(resourceName, &crawler), + resource.TestCheckResourceAttr(resourceName, "classifiers.#", "0"), + resource.TestCheckResourceAttr(resourceName, "configuration", ""), + resource.TestCheckResourceAttr(resourceName, "database_name", rName), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.#", "1"), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.0.path", "table2"), + resource.TestCheckResourceAttr(resourceName, "jdbc_target.#", "0"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "role", rName), + resource.TestCheckResourceAttr(resourceName, "s3_target.#", "0"), + resource.TestCheckResourceAttr(resourceName, "schedule", ""), + resource.TestCheckResourceAttr(resourceName, "schema_change_policy.#", "1"), + resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.delete_behavior", "DEPRECATE_IN_DATABASE"), + resource.TestCheckResourceAttr(resourceName, "schema_change_policy.0.update_behavior", "UPDATE_IN_DATABASE"), + resource.TestCheckResourceAttr(resourceName, "table_prefix", ""), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAWSGlueCrawler_JdbcTarget(t *testing.T) { var crawler glue.Crawler rName := acctest.RandomWithPrefix("tf-acc-test") @@ -82,6 +143,7 @@ func TestAccAWSGlueCrawler_JdbcTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "configuration", ""), resource.TestCheckResourceAttr(resourceName, "database_name", rName), resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.#", "0"), resource.TestCheckResourceAttr(resourceName, "jdbc_target.#", "1"), resource.TestCheckResourceAttr(resourceName, "jdbc_target.0.connection_name", rName), resource.TestCheckResourceAttr(resourceName, "jdbc_target.0.exclusions.#", "0"), @@ -104,6 +166,7 @@ func TestAccAWSGlueCrawler_JdbcTarget(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "configuration", ""), resource.TestCheckResourceAttr(resourceName, "database_name", rName), resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.#", "0"), resource.TestCheckResourceAttr(resourceName, "jdbc_target.#", "1"), resource.TestCheckResourceAttr(resourceName, "jdbc_target.0.connection_name", rName), resource.TestCheckResourceAttr(resourceName, "jdbc_target.0.exclusions.#", "0"), @@ -238,6 +301,7 @@ func TestAccAWSGlueCrawler_S3Target(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "configuration", ""), resource.TestCheckResourceAttr(resourceName, "database_name", rName), resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.#", "0"), resource.TestCheckResourceAttr(resourceName, "jdbc_target.#", "0"), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "role", rName), @@ -259,6 +323,7 @@ func TestAccAWSGlueCrawler_S3Target(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "configuration", ""), resource.TestCheckResourceAttr(resourceName, "database_name", rName), resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "dynamodb_target.#", "0"), resource.TestCheckResourceAttr(resourceName, "jdbc_target.#", "0"), resource.TestCheckResourceAttr(resourceName, "name", rName), resource.TestCheckResourceAttr(resourceName, "role", rName), @@ -811,6 +876,26 @@ resource "aws_glue_crawler" "test" { `, rName, description, rName) } +func testAccGlueCrawlerConfig_DynamodbTarget(rName, path string) string { + return testAccGlueCrawlerConfig_Base(rName) + fmt.Sprintf(` +resource "aws_glue_catalog_database" "test" { + name = %q +} + +resource "aws_glue_crawler" "test" { + depends_on = ["aws_iam_role_policy_attachment.test-AWSGlueServiceRole"] + + database_name = "${aws_glue_catalog_database.test.name}" + name = %q + role = "${aws_iam_role.test.name}" + + dynamodb_target { + path = %q + } +} +`, rName, rName, path) +} + func testAccGlueCrawlerConfig_JdbcTarget(rName, path string) string { return testAccGlueCrawlerConfig_Base(rName) + fmt.Sprintf(` resource "aws_glue_catalog_database" "test" { diff --git a/website/docs/r/glue_crawler.html.markdown b/website/docs/r/glue_crawler.html.markdown index 9d2eeca4bb4..cfb86ff4eca 100644 --- a/website/docs/r/glue_crawler.html.markdown +++ b/website/docs/r/glue_crawler.html.markdown @@ -12,6 +12,20 @@ Manages a Glue Crawler. More information can be found in the [AWS Glue Develeper ## Example Usage +### DynamoDB Target + +```hcl +resource "aws_glue_crawler" "example" { + database_name = "${aws_glue_catalog_database.example.name}" + name = "example" + role = "${aws_iam_role.example.name}" + + dynamodb_target { + path = "table-name" + } +} +``` + ### JDBC Target ```hcl @@ -36,7 +50,7 @@ resource "aws_glue_crawler" "example" { role = "${aws_iam_role.example.name}" s3_target { - path = "s3://${aws_s3_bucket.example.bucket} + path = "s3://${aws_s3_bucket.example.bucket}" } } ``` @@ -53,12 +67,17 @@ The following arguments are supported: * `classifiers` (Optional) List of custom classifiers. By default, all AWS classifiers are included in a crawl, but these custom classifiers always override the default classifiers for a given classification. * `configuration` (Optional) JSON string of configuration information. * `description` (Optional) Description of the crawler. +* `dynamodb_target` (Optional) List of nested DynamoDB target arguments. See below. * `jdbc_target` (Optional) List of nested JBDC target arguments. See below. * `s3_target` (Optional) List nested Amazon S3 target arguments. See below. * `schedule` (Optional) A cron expression used to specify the schedule. For more information, see [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html). For example, to run something every day at 12:15 UTC, you would specify: `cron(15 12 * * ? *)`. * `schema_change_policy` (Optional) Policy for the crawler's update and deletion behavior. * `table_prefix` (Optional) The table prefix used for catalog tables that are created. +### dynamodb_target Argument Reference + +* `path` - (Required) The name of the DynamoDB table to crawl. + ### jdbc_target Argument Reference * `connection_name` - (Required) The name of the connection to use to connect to the JDBC target. From adf3980e2ae46ddb7cee605058da2e73aefd81b9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 09:56:41 -0400 Subject: [PATCH 1816/3316] Update CHANGELOG for #5150 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d67f6a0420..e175ebb51ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ ENHANCEMENTS: * resource/aws_glue_connection: Add `physical_connection_requirements` argument `availability_zone` (currently required by the API) [GH-5039] * resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` [GH-5114] * resource/aws_instance: Allow AWS GovCloud (US) to perform tagging on creation [GH-5106] +* resource/aws_lambda_function: Support `dotnetcore2.1` in `runtime` validation [GH-5150] * resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] * resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] * resource/aws_ses_receipt_rule: Add plan time validation for `s3_action` argument `position` [GH-5092] From 899d6f71a5d771fbe8a031002058bd8fd1c6de29 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 11:13:01 -0400 Subject: [PATCH 1817/3316] resource/aws_codebuild_project: Support report build status for GitHub source type --- aws/resource_aws_codebuild_project.go | 54 ++-- aws/resource_aws_codebuild_project_test.go | 302 +++++++++++++++++- .../docs/r/codebuild_project.html.markdown | 1 + 3 files changed, 317 insertions(+), 40 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 0ff25f5663e..275c04ce822 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -236,6 +236,10 @@ func resourceAwsCodeBuildProject() *schema.Resource { Type: schema.TypeBool, Optional: true, }, + "report_build_status": { + Type: schema.TypeBool, + Optional: true, + }, }, }, Required: true, @@ -508,17 +512,19 @@ func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { data := configRaw.(map[string]interface{}) sourceType := data["type"].(string) - location := data["location"].(string) - buildspec := data["buildspec"].(string) - gitCloneDepth := aws.Int64(int64(data["git_clone_depth"].(int))) - insecureSsl := aws.Bool(data["insecure_ssl"].(bool)) projectSource = codebuild.ProjectSource{ - Type: &sourceType, - Location: &location, - Buildspec: &buildspec, - GitCloneDepth: gitCloneDepth, - InsecureSsl: insecureSsl, + Buildspec: aws.String(data["buildspec"].(string)), + GitCloneDepth: aws.Int64(int64(data["git_clone_depth"].(int))), + InsecureSsl: aws.Bool(data["insecure_ssl"].(bool)), + Location: aws.String(data["location"].(string)), + Type: aws.String(sourceType), + } + + // Only valid for GITHUB source type, e.g. + // InvalidInputException: Source type GITHUB_ENTERPRISE does not support ReportBuildStatus + if sourceType == codebuild.SourceTypeGithub { + projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) } if v, ok := data["auth"]; ok { @@ -764,30 +770,19 @@ func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnviron func flattenAwsCodeBuildProjectSource(source *codebuild.ProjectSource) []interface{} { l := make([]interface{}, 1) - m := map[string]interface{}{} - - m["type"] = *source.Type + m := map[string]interface{}{ + "buildspec": aws.StringValue(source.Buildspec), + "location": aws.StringValue(source.Location), + "git_clone_depth": int(aws.Int64Value(source.GitCloneDepth)), + "insecure_ssl": aws.BoolValue(source.InsecureSsl), + "report_build_status": aws.BoolValue(source.ReportBuildStatus), + "type": aws.StringValue(source.Type), + } if source.Auth != nil { m["auth"] = schema.NewSet(resourceAwsCodeBuildProjectSourceAuthHash, []interface{}{sourceAuthToMap(source.Auth)}) } - if source.Buildspec != nil { - m["buildspec"] = *source.Buildspec - } - - if source.Location != nil { - m["location"] = *source.Location - } - - if source.GitCloneDepth != nil { - m["git_clone_depth"] = *source.GitCloneDepth - } - - if source.InsecureSsl != nil { - m["insecure_ssl"] = *source.InsecureSsl - } - l[0] = m return l @@ -862,6 +857,9 @@ func resourceAwsCodeBuildProjectSourceHash(v interface{}) int { if v, ok := m["insecure_ssl"]; ok { buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) } + if v, ok := m["report_build_status"]; ok { + buf.WriteString(fmt.Sprintf("%s-", strconv.FormatBool(v.(bool)))) + } return hashcode.String(buf.String()) } diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index e5b1a3b1165..60e5b07c298 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -60,11 +60,12 @@ func TestAccAWSCodeBuildProject_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "environment.1974383098.type", "LINUX_CONTAINER"), resource.TestMatchResourceAttr(resourceName, "service_role", regexp.MustCompile(`^arn:[^:]+:iam::[^:]+:role/tf-acc-test-[0-9]+$`)), resource.TestCheckResourceAttr(resourceName, "source.#", "1"), - resource.TestCheckResourceAttr(resourceName, "source.3661695266.auth.#", "0"), - resource.TestCheckResourceAttr(resourceName, "source.3661695266.git_clone_depth", "0"), - resource.TestCheckResourceAttr(resourceName, "source.3661695266.insecure_ssl", "false"), - resource.TestCheckResourceAttr(resourceName, "source.3661695266.location", "https://github.com/hashibot-test/aws-test.git"), - resource.TestCheckResourceAttr(resourceName, "source.3661695266.type", "GITHUB"), + resource.TestCheckResourceAttr(resourceName, "source.1441597390.auth.#", "0"), + resource.TestCheckResourceAttr(resourceName, "source.1441597390.git_clone_depth", "0"), + resource.TestCheckResourceAttr(resourceName, "source.1441597390.insecure_ssl", "false"), + resource.TestCheckResourceAttr(resourceName, "source.1441597390.location", "https://github.com/hashibot-test/aws-test.git"), + resource.TestCheckResourceAttr(resourceName, "source.1441597390.report_build_status", "false"), + resource.TestCheckResourceAttr(resourceName, "source.1441597390.type", "GITHUB"), resource.TestCheckResourceAttr(resourceName, "vpc_config.#", "0"), resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), ), @@ -280,9 +281,9 @@ func TestAccAWSCodeBuildProject_Source_Auth(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_Auth(rName, "FAKERESOURCE1", "OAUTH"), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3680370172.auth.#", "1"), - resource.TestCheckResourceAttr(resourceName, "source.3680370172.auth.2706882902.resource", "FAKERESOURCE1"), - resource.TestCheckResourceAttr(resourceName, "source.3680370172.auth.2706882902.type", "OAUTH"), + resource.TestCheckResourceAttr(resourceName, "source.3680505372.auth.#", "1"), + resource.TestCheckResourceAttr(resourceName, "source.3680505372.auth.2706882902.resource", "FAKERESOURCE1"), + resource.TestCheckResourceAttr(resourceName, "source.3680505372.auth.2706882902.type", "OAUTH"), ), }, }, @@ -303,14 +304,14 @@ func TestAccAWSCodeBuildProject_Source_GitCloneDepth(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_GitCloneDepth(rName, 1), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.402128226.git_clone_depth", "1"), + resource.TestCheckResourceAttr(resourceName, "source.1181740906.git_clone_depth", "1"), ), }, { Config: testAccAWSCodeBuildProjectConfig_Source_GitCloneDepth(rName, 2), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.2574842497.git_clone_depth", "2"), + resource.TestCheckResourceAttr(resourceName, "source.974047921.git_clone_depth", "2"), ), }, }, @@ -331,14 +332,147 @@ func TestAccAWSCodeBuildProject_Source_InsecureSSL(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Source_InsecureSSL(rName, true), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3334111800.insecure_ssl", "true"), + resource.TestCheckResourceAttr(resourceName, "source.1976396802.insecure_ssl", "true"), ), }, { Config: testAccAWSCodeBuildProjectConfig_Source_InsecureSSL(rName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "source.3680370172.insecure_ssl", "false"), + resource.TestCheckResourceAttr(resourceName, "source.3680505372.insecure_ssl", "false"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_ReportBuildStatus(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus(rName, true), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.4215890488.report_build_status", "true"), + ), + }, + { + Config: testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus(rName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.3680505372.report_build_status", "false"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_Type_Bitbucket(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_Bitbucket(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.2806293607.type", "BITBUCKET"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_Type_CodeCommit(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_CodeCommit(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.3715340088.type", "CODECOMMIT"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_Type_CodePipeline(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_CodePipeline(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.2280907000.type", "CODEPIPELINE"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_GitHubEnterprise(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.553628638.type", "GITHUB_ENTERPRISE"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_Type_S3(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_S3(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.2751363124.type", "S3"), ), }, }, @@ -861,6 +995,150 @@ resource "aws_codebuild_project" "test" { `, rName, insecureSSL) } +func testAccAWSCodeBuildProjectConfig_Source_ReportBuildStatus(rName string, reportBuildStatus bool) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = %q + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "2" + type = "LINUX_CONTAINER" + } + + source { + location = "https://github.com/hashicorp/packer.git" + report_build_status = %t + type = "GITHUB" + } +} +`, rName, reportBuildStatus) +} + +func testAccAWSCodeBuildProjectConfig_Source_Type_Bitbucket(rName string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = %q + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "2" + type = "LINUX_CONTAINER" + } + + source { + location = "https://bitbucket.org/organization/repository.git" + type = "BITBUCKET" + } +} +`, rName) +} + +func testAccAWSCodeBuildProjectConfig_Source_Type_CodeCommit(rName string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = %q + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "2" + type = "LINUX_CONTAINER" + } + + source { + location = "https://git-codecommit.region-id.amazonaws.com/v1/repos/repo-name" + type = "CODECOMMIT" + } +} +`, rName) +} + +func testAccAWSCodeBuildProjectConfig_Source_Type_CodePipeline(rName string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = %q + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "CODEPIPELINE" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "2" + type = "LINUX_CONTAINER" + } + + source { + type = "CODEPIPELINE" + } +} +`, rName) +} + +func testAccAWSCodeBuildProjectConfig_Source_Type_GitHubEnterprise(rName string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = %q + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "2" + type = "LINUX_CONTAINER" + } + + source { + location = "https://example.com/organization/repository.git" + type = "GITHUB_ENTERPRISE" + } +} +`, rName) +} + +func testAccAWSCodeBuildProjectConfig_Source_Type_S3(rName string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = %q + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "2" + type = "LINUX_CONTAINER" + } + + source { + location = "bucket-name/object-name.zip" + type = "S3" + } +} +`, rName) +} + func testAccAWSCodeBuildProjectConfig_Tags(rName, tagKey, tagValue string) string { return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` resource "aws_codebuild_project" "test" { diff --git a/website/docs/r/codebuild_project.html.markdown b/website/docs/r/codebuild_project.html.markdown index a8512c6a37e..35ac817a59d 100644 --- a/website/docs/r/codebuild_project.html.markdown +++ b/website/docs/r/codebuild_project.html.markdown @@ -194,6 +194,7 @@ The following arguments are supported: * `git_clone_depth` - (Optional) Truncate git history to this many commits. * `insecure_ssl` - (Optional) Ignore SSL warnings when connecting to source control. * `location` - (Optional) The location of the source code from git or s3. +* `report_build_status` - (Optional) Set to `true` to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub. `auth` supports the following: From 6f018f4d55d14a5b7fa71af81220e7fcbedf4de0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 12:47:26 -0400 Subject: [PATCH 1818/3316] Update CHANGELOG for #5141 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e175ebb51ab..895cff15d62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ BUG FIXES: * resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] * resource/aws_codebuild_project: Mark `service_role` as required [GH-4826] * resource/aws_glue_catalog_database: Properly return error when missing colon during import [GH-5123] +* resource/aws_glue_catalog_database: Prevent error when deleted outside Terraform [GH-5141] * resource/aws_instance: Allow AWS China to perform volume tagging post-creation on first apply [GH-5106] * resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] * resource/aws_rds_cluster_instance: Support `configuring-log-exports` status [GH-5124] From a493381f1c853de362570f23903ff2f9074063ce Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 12:56:10 -0400 Subject: [PATCH 1819/3316] resource/aws_glue_crawler: Prevent error when deleted outside Terraform --- aws/resource_aws_glue_crawler.go | 8 +++++- aws/resource_aws_glue_crawler_test.go | 36 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_glue_crawler.go b/aws/resource_aws_glue_crawler.go index aa4e0c5d0f3..eaccef24c7d 100644 --- a/aws/resource_aws_glue_crawler.go +++ b/aws/resource_aws_glue_crawler.go @@ -427,5 +427,11 @@ func resourceAwsGlueCrawlerExists(d *schema.ResourceData, meta interface{}) (boo } _, err := glueConn.GetCrawler(input) - return err == nil, err + if err != nil { + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return false, nil + } + return false, err + } + return true, nil } diff --git a/aws/resource_aws_glue_crawler_test.go b/aws/resource_aws_glue_crawler_test.go index 81ad0f878c7..f77abc494e2 100644 --- a/aws/resource_aws_glue_crawler_test.go +++ b/aws/resource_aws_glue_crawler_test.go @@ -369,6 +369,42 @@ func TestAccAWSGlueCrawler_S3Target_Multiple(t *testing.T) { }) } +func TestAccAWSGlueCrawler_recreates(t *testing.T) { + var crawler glue.Crawler + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_glue_crawler.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccGlueCrawlerConfig_S3Target(rName, "s3://bucket1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueCrawlerExists(resourceName, &crawler), + ), + }, + { + // Simulate deleting the crawler outside Terraform + PreConfig: func() { + conn := testAccProvider.Meta().(*AWSClient).glueconn + input := &glue.DeleteCrawlerInput{ + Name: aws.String(rName), + } + _, err := conn.DeleteCrawler(input) + if err != nil { + t.Fatalf("error deleting Glue Crawler: %s", err) + } + }, + Config: testAccGlueCrawlerConfig_S3Target(rName, "s3://bucket1"), + ExpectNonEmptyPlan: true, + PlanOnly: true, + }, + }, + }) +} + func TestAccAWSGlueCrawler_Classifiers(t *testing.T) { var crawler glue.Crawler rName := acctest.RandomWithPrefix("tf-acc-test") From 506e047dec9ec3b091597e8bc1d7a9c7aad8b32a Mon Sep 17 00:00:00 2001 From: Dave Sanderson Date: Wed, 11 Jul 2018 12:18:24 -0600 Subject: [PATCH 1820/3316] add support for cpu options via cpu_core_count and cpu_threads_per_core --- aws/resource_aws_instance.go | 32 +++++++++++++++++++++++++++ aws/resource_aws_instance_test.go | 32 +++++++++++++++++++++++++++ website/docs/r/instance.html.markdown | 5 +++++ 3 files changed, 69 insertions(+) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 83a32aee0de..18781205893 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -280,6 +280,20 @@ func resourceAwsInstance() *schema.Resource { ForceNew: true, }, + "cpu_core_count": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + + "cpu_threads_per_core": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tags": tagsSchema(), "volume_tags": tagsSchemaComputed(), @@ -505,6 +519,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { SubnetId: instanceOpts.SubnetID, UserData: instanceOpts.UserData64, CreditSpecification: instanceOpts.CreditSpecification, + CpuOptions: instanceOpts.CpuOptions, } _, ipv6CountOk := d.GetOk("ipv6_address_count") @@ -672,6 +687,11 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("tenancy", instance.Placement.Tenancy) } + if instance.CpuOptions != nil { + d.Set("cpu_core_count", instance.CpuOptions.CoreCount) + d.Set("cpu_threads_per_core", instance.CpuOptions.ThreadsPerCore) + } + d.Set("ami", instance.ImageId) d.Set("instance_type", instance.InstanceType) d.Set("key_name", instance.KeyName) @@ -1688,6 +1708,7 @@ type awsInstanceOpts struct { SubnetID *string UserData64 *string CreditSpecification *ec2.CreditSpecificationRequest + CpuOptions *ec2.CpuOptionsRequest } func buildAwsInstanceOpts( @@ -1755,6 +1776,17 @@ func buildAwsInstanceOpts( opts.Placement.Tenancy = aws.String(v) } + if v := d.Get("cpu_core_count").(int); v > 0 { + tc := d.Get("cpu_threads_per_core").(int) + if tc < 0 { + tc = 2 + } + opts.CpuOptions = &ec2.CpuOptionsRequest{ + CoreCount: aws.Int64(int64(v)), + ThreadsPerCore: aws.Int64(int64(tc)), + } + } + var groups []*string if v := d.Get("security_groups"); v != nil { // Security group names. diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index 2a1dc453363..96e42b8177d 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -1695,6 +1695,38 @@ func TestInstanceTenancySchema(t *testing.T) { } } +func TestInstanceCpuCoreCountSchema(t *testing.T) { + actualSchema := resourceAwsInstance().Schema["cpu_core_count"] + expectedSchema := &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + } + if !reflect.DeepEqual(actualSchema, expectedSchema) { + t.Fatalf( + "Got:\n\n%#v\n\nExpected:\n\n%#v\n", + actualSchema, + expectedSchema) + } +} + +func TestInstanceCpuThreadsPerCoreSchema(t *testing.T) { + actualSchema := resourceAwsInstance().Schema["cpu_threads_per_core"] + expectedSchema := &schema.Schema{ + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + } + if !reflect.DeepEqual(actualSchema, expectedSchema) { + t.Fatalf( + "Got:\n\n%#v\n\nExpected:\n\n%#v\n", + actualSchema, + expectedSchema) + } +} + func driftTags(instance *ec2.Instance) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index 59606413ffe..a39b79b773b 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -54,6 +54,11 @@ The following arguments are supported: * `availability_zone` - (Optional) The AZ to start the instance in. * `placement_group` - (Optional) The Placement Group to start the instance in. * `tenancy` - (Optional) The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. +* `cpu_core_count` - (Optional) Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values), specifying this option for non supported instance types throws an EC2 error. +* `cpu_threads_per_core` - (Optional) This option has no effect unless `cpu_core_count` is also set. Setting this to 1 will disable hyperthreading, otherwise it defaults to 2 if not set, see [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information. + +-> **NOTE:** Changing `cpu_core_count` and/or `cpu_threads_per_core` will cause the resouc to be recreated. + * `ebs_optimized` - (Optional) If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then this will show as disabled but if the instance type is optimized by default then From 070dd7da7a40057c2a0b2a245263c251863f327b Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Mon, 26 Feb 2018 08:39:14 +0000 Subject: [PATCH 1821/3316] Retry ECS create/update when target group isn't yet attached to load balancer The ECS service can be attached to a load balancer's target group but at that point it may not yet be attached to a load balancer as the dependency graph Terraform generates normally will create the ECS service at the same time as the load balancer listener/listener rule. This could be avoided by setting the ECS service 'depends_on' to include the load balancer listener/listener rule but this is not usable if the load balancer listener/listener rule is created in another module. The target group in the acceptance test now gets the name from the load balancer, forcing a dependency between the load balancer and the target group. Unfortunately it's not possible to use something from the listener to force the dependency as the listener already has a dependency on the target group. --- aws/resource_aws_ecs_service.go | 6 ++++++ aws/resource_aws_ecs_service_test.go | 26 +++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index 5b5111c2f07..a8050269baa 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -443,6 +443,9 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "Please verify that the ECS service role being passed has the proper permissions.") { return resource.RetryableError(err) } + if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "does not have an associated load balancer") { + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } @@ -780,6 +783,9 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "Please verify that the ECS service role being passed has the proper permissions.") { return resource.RetryableError(err) } + if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "does not have an associated load balancer") { + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index 918112c04be..9d18822d3e2 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -263,7 +263,6 @@ func TestAccAWSEcsService_healthCheckGracePeriodSeconds(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-hcgps-%s", rString) roleName := fmt.Sprintf("tf-acc-role-svc-w-hcgps-%s", rString) policyName := fmt.Sprintf("tf-acc-policy-svc-w-hcgps-%s", rString) - tgName := fmt.Sprintf("tf-acc-tg-svc-w-hcgps-%s", rString) lbName := fmt.Sprintf("tf-acc-lb-svc-w-hcgps-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-hcgps-%s", rString) @@ -276,17 +275,17 @@ func TestAccAWSEcsService_healthCheckGracePeriodSeconds(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, - roleName, policyName, tgName, lbName, svcName, -1), + roleName, policyName, lbName, svcName, -1), ExpectError: regexp.MustCompile(`expected health_check_grace_period_seconds to be in the range`), }, { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, - roleName, policyName, tgName, lbName, svcName, 7201), + roleName, policyName, lbName, svcName, 7201), ExpectError: regexp.MustCompile(`expected health_check_grace_period_seconds to be in the range`), }, { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, - roleName, policyName, tgName, lbName, svcName, 300), + roleName, policyName, lbName, svcName, 300), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsServiceExists(resourceName, &service), resource.TestCheckResourceAttr(resourceName, "health_check_grace_period_seconds", "300"), @@ -294,7 +293,7 @@ func TestAccAWSEcsService_healthCheckGracePeriodSeconds(t *testing.T) { }, { Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, - roleName, policyName, tgName, lbName, svcName, 600), + roleName, policyName, lbName, svcName, 600), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsServiceExists(resourceName, &service), resource.TestCheckResourceAttr(resourceName, "health_check_grace_period_seconds", "600"), @@ -422,7 +421,6 @@ func TestAccAWSEcsService_withAlb(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-alb-%s", rString) roleName := fmt.Sprintf("tf-acc-role-svc-w-alb-%s", rString) policyName := fmt.Sprintf("tf-acc-policy-svc-w-alb-%s", rString) - tgName := fmt.Sprintf("tf-acc-tg-svc-w-alb-%s", rString) lbName := fmt.Sprintf("tf-acc-lb-svc-w-alb-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-alb-%s", rString) @@ -432,7 +430,7 @@ func TestAccAWSEcsService_withAlb(t *testing.T) { CheckDestroy: testAccCheckAWSEcsServiceDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEcsServiceWithAlb(clusterName, tdName, roleName, policyName, tgName, lbName, svcName), + Config: testAccAWSEcsServiceWithAlb(clusterName, tdName, roleName, policyName, lbName, svcName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEcsServiceExists("aws_ecs_service.with_alb", &service), resource.TestCheckResourceAttr("aws_ecs_service.with_alb", "load_balancer.#", "1"), @@ -1127,7 +1125,7 @@ resource "aws_ecs_service" "main" { } func testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName, roleName, policyName, - tgName, lbName, svcName string, healthCheckGracePeriodSeconds int) string { + lbName, svcName string, healthCheckGracePeriodSeconds int) string { return fmt.Sprintf(` data "aws_availability_zones" "available" {} @@ -1217,7 +1215,7 @@ EOF } resource "aws_lb_target_group" "test" { - name = "%s" + name = "${aws_lb.main.name}" port = 80 protocol = "HTTP" vpc_id = "${aws_vpc.main.id}" @@ -1256,11 +1254,10 @@ resource "aws_ecs_service" "with_alb" { depends_on = [ "aws_iam_role_policy.ecs_service", - "aws_lb_listener.front_end" ] } `, vpcNameTag, clusterName, tdName, roleName, policyName, - tgName, lbName, svcName, healthCheckGracePeriodSeconds) + lbName, svcName, healthCheckGracePeriodSeconds) } func testAccAWSEcsService_withIamRole(clusterName, tdName, roleName, policyName, svcName string) string { @@ -1613,7 +1610,7 @@ resource "aws_ecs_service" "jenkins" { `, clusterName, tdName, svcName) } -func testAccAWSEcsServiceWithAlb(clusterName, tdName, roleName, policyName, tgName, lbName, svcName string) string { +func testAccAWSEcsServiceWithAlb(clusterName, tdName, roleName, policyName, lbName, svcName string) string { return fmt.Sprintf(` data "aws_availability_zones" "available" {} @@ -1703,7 +1700,7 @@ EOF } resource "aws_lb_target_group" "test" { - name = "%s" + name = "${aws_lb.main.name}" port = 80 protocol = "HTTP" vpc_id = "${aws_vpc.main.id}" @@ -1741,10 +1738,9 @@ resource "aws_ecs_service" "with_alb" { depends_on = [ "aws_iam_role_policy.ecs_service", - "aws_lb_listener.front_end" ] } -`, clusterName, tdName, roleName, policyName, tgName, lbName, svcName) +`, clusterName, tdName, roleName, policyName, lbName, svcName) } func testAccAWSEcsServiceWithNetworkConfiguration(sg1Name, sg2Name, clusterName, tdName, svcName string) string { From 464e3406a738a4f77b1960be6fefb346d10af53b Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 11 Jul 2018 18:57:31 +0000 Subject: [PATCH 1822/3316] v1.27.0 --- CHANGELOG.md | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 895cff15d62..9a8ab727597 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.27.0 (Unreleased) +## 1.27.0 (July 11, 2018) NOTES: @@ -7,37 +7,37 @@ NOTES: FEATURES: -* **New Resource:** `aws_appsync_api_key` [GH-3827] -* **New Resource:** `aws_swf_domain` [GH-2803] +* **New Resource:** `aws_appsync_api_key` ([#3827](https://github.com/terraform-providers/terraform-provider-aws/issues/3827)) +* **New Resource:** `aws_swf_domain` ([#2803](https://github.com/terraform-providers/terraform-provider-aws/issues/2803)) ENHANCEMENTS: -* data-source/aws_region: Add `description` attribute [GH-5077] -* data-source/aws_vpc: Add `cidr_block_associations` attribute [GH-5098] -* resource/aws_cloudwatch_metric_alarm: Add `datapoints_to_alarm` and `evaluation_period` plan time validation [GH-5095] -* resource/aws_db_parameter_group: Clarify naming validation error messages [GH-5090] -* resource/aws_glue_connection: Add `physical_connection_requirements` argument `availability_zone` (currently required by the API) [GH-5039] -* resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` [GH-5114] -* resource/aws_instance: Allow AWS GovCloud (US) to perform tagging on creation [GH-5106] -* resource/aws_lambda_function: Support `dotnetcore2.1` in `runtime` validation [GH-5150] -* resource/aws_route_table: Ignore propagated routes during resource import [GH-5100] -* resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) [GH-4726] -* resource/aws_ses_receipt_rule: Add plan time validation for `s3_action` argument `position` [GH-5092] -* resource/aws_vpc_ipv4_cidr_block_association: Support resource import [GH-5069] -* resource/aws_waf_web_acl: Add `rules` `override_action` argument and support `GROUP` type [GH-5053] -* resource/aws_wafregional_web_acl: Add `rules` `override_action` argument and support `GROUP` type [GH-5053] +* data-source/aws_region: Add `description` attribute ([#5077](https://github.com/terraform-providers/terraform-provider-aws/issues/5077)) +* data-source/aws_vpc: Add `cidr_block_associations` attribute ([#5098](https://github.com/terraform-providers/terraform-provider-aws/issues/5098)) +* resource/aws_cloudwatch_metric_alarm: Add `datapoints_to_alarm` and `evaluation_period` plan time validation ([#5095](https://github.com/terraform-providers/terraform-provider-aws/issues/5095)) +* resource/aws_db_parameter_group: Clarify naming validation error messages ([#5090](https://github.com/terraform-providers/terraform-provider-aws/issues/5090)) +* resource/aws_glue_connection: Add `physical_connection_requirements` argument `availability_zone` (currently required by the API) ([#5039](https://github.com/terraform-providers/terraform-provider-aws/issues/5039)) +* resource/aws_instance: Ignore `credit_specifications` when not using T2 `instance_type` ([#5114](https://github.com/terraform-providers/terraform-provider-aws/issues/5114)) +* resource/aws_instance: Allow AWS GovCloud (US) to perform tagging on creation ([#5106](https://github.com/terraform-providers/terraform-provider-aws/issues/5106)) +* resource/aws_lambda_function: Support `dotnetcore2.1` in `runtime` validation ([#5150](https://github.com/terraform-providers/terraform-provider-aws/issues/5150)) +* resource/aws_route_table: Ignore propagated routes during resource import ([#5100](https://github.com/terraform-providers/terraform-provider-aws/issues/5100)) +* resource/aws_security_group: Authorize and revoke only changed individual `ingress`/`egress` rules despite their configuration grouping (e.g. replacing an individual element in a multiple element `cidr_blocks` list) ([#4726](https://github.com/terraform-providers/terraform-provider-aws/issues/4726)) +* resource/aws_ses_receipt_rule: Add plan time validation for `s3_action` argument `position` ([#5092](https://github.com/terraform-providers/terraform-provider-aws/issues/5092)) +* resource/aws_vpc_ipv4_cidr_block_association: Support resource import ([#5069](https://github.com/terraform-providers/terraform-provider-aws/issues/5069)) +* resource/aws_waf_web_acl: Add `rules` `override_action` argument and support `GROUP` type ([#5053](https://github.com/terraform-providers/terraform-provider-aws/issues/5053)) +* resource/aws_wafregional_web_acl: Add `rules` `override_action` argument and support `GROUP` type ([#5053](https://github.com/terraform-providers/terraform-provider-aws/issues/5053)) BUG FIXES: -* resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured [GH-5070] -* resource/aws_codebuild_project: Mark `service_role` as required [GH-4826] -* resource/aws_glue_catalog_database: Properly return error when missing colon during import [GH-5123] -* resource/aws_glue_catalog_database: Prevent error when deleted outside Terraform [GH-5141] -* resource/aws_instance: Allow AWS China to perform volume tagging post-creation on first apply [GH-5106] -* resource/aws_kms_grant: Properly return error when listing KMS grants [GH-5063] -* resource/aws_rds_cluster_instance: Support `configuring-log-exports` status [GH-5124] -* resource/aws_s3_bucket: Prevent extraneous ACL update during resource creation [GH-5107] -* resource/aws_wafregional_byte_match_set: Deprecate `byte_match_tuple` argument for `byte_match_tuples` [GH-5043] +* resource/aws_codebuild_project: Prevent panic when empty `vpc_config` block is configured ([#5070](https://github.com/terraform-providers/terraform-provider-aws/issues/5070)) +* resource/aws_codebuild_project: Mark `service_role` as required ([#4826](https://github.com/terraform-providers/terraform-provider-aws/issues/4826)) +* resource/aws_glue_catalog_database: Properly return error when missing colon during import ([#5123](https://github.com/terraform-providers/terraform-provider-aws/issues/5123)) +* resource/aws_glue_catalog_database: Prevent error when deleted outside Terraform ([#5141](https://github.com/terraform-providers/terraform-provider-aws/issues/5141)) +* resource/aws_instance: Allow AWS China to perform volume tagging post-creation on first apply ([#5106](https://github.com/terraform-providers/terraform-provider-aws/issues/5106)) +* resource/aws_kms_grant: Properly return error when listing KMS grants ([#5063](https://github.com/terraform-providers/terraform-provider-aws/issues/5063)) +* resource/aws_rds_cluster_instance: Support `configuring-log-exports` status ([#5124](https://github.com/terraform-providers/terraform-provider-aws/issues/5124)) +* resource/aws_s3_bucket: Prevent extraneous ACL update during resource creation ([#5107](https://github.com/terraform-providers/terraform-provider-aws/issues/5107)) +* resource/aws_wafregional_byte_match_set: Deprecate `byte_match_tuple` argument for `byte_match_tuples` ([#5043](https://github.com/terraform-providers/terraform-provider-aws/issues/5043)) ## 1.26.0 (July 04, 2018) From 25655c2b04b8f354701d3a0c99ce36c21949de92 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 11 Jul 2018 19:04:18 +0000 Subject: [PATCH 1823/3316] Cleanup after v1.27.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a8ab727597..e9b41f7324b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.28.0 (Unreleased) ## 1.27.0 (July 11, 2018) NOTES: From 24c99c0a411277a6b54e62dcf9d0c1e692125b70 Mon Sep 17 00:00:00 2001 From: Dave Sanderson Date: Wed, 11 Jul 2018 13:18:10 -0600 Subject: [PATCH 1824/3316] Fixed Type in TestInstanceCpuCoreCountSchema Fixed Type in TestInstanceCpuThreadsPerCoreSchema --- aws/resource_aws_instance_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index 96e42b8177d..ebfb1729fb9 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -1698,7 +1698,7 @@ func TestInstanceTenancySchema(t *testing.T) { func TestInstanceCpuCoreCountSchema(t *testing.T) { actualSchema := resourceAwsInstance().Schema["cpu_core_count"] expectedSchema := &schema.Schema{ - Type: schema.TypeString, + Type: schema.TypeInt, Optional: true, Computed: true, ForceNew: true, @@ -1714,7 +1714,7 @@ func TestInstanceCpuCoreCountSchema(t *testing.T) { func TestInstanceCpuThreadsPerCoreSchema(t *testing.T) { actualSchema := resourceAwsInstance().Schema["cpu_threads_per_core"] expectedSchema := &schema.Schema{ - Type: schema.TypeString, + Type: schema.TypeInt, Optional: true, Computed: true, ForceNew: true, From 5a556fb60310d9b48489bad5d689854daa6df372 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 11 Jul 2018 15:26:18 -0400 Subject: [PATCH 1825/3316] examples/eks-getting-started: Update heptio-authenticator-aws to aws-iam-authenticator --- examples/eks-getting-started/outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/eks-getting-started/outputs.tf b/examples/eks-getting-started/outputs.tf index f0a2eb774b6..d882082ae40 100644 --- a/examples/eks-getting-started/outputs.tf +++ b/examples/eks-getting-started/outputs.tf @@ -42,7 +42,7 @@ users: user: exec: apiVersion: client.authentication.k8s.io/v1alpha1 - command: heptio-authenticator-aws + command: aws-iam-authenticator args: - "token" - "-i" From 46b511fe3100c9d531b6eac91255cf63a9825a22 Mon Sep 17 00:00:00 2001 From: Mildred Ki'Lya Date: Wed, 21 Mar 2018 11:45:58 +0100 Subject: [PATCH 1826/3316] Add retry mechanism and timeout when reading ecr_repository When creating an ECR repository, creation can be successful but it may not be available right away through DescribeRepositories API request. We add a retry mechanism until the repository appears instead of marking the repository as not existing. Fixes #3849 --- aws/resource_aws_ecr_repository.go | 25 ++++++++++++++++++--- website/docs/r/ecr_repository.html.markdown | 7 ++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_ecr_repository.go b/aws/resource_aws_ecr_repository.go index 1de9cff36f9..67efcc58de9 100644 --- a/aws/resource_aws_ecr_repository.go +++ b/aws/resource_aws_ecr_repository.go @@ -22,6 +22,11 @@ func resourceAwsEcrRepository() *schema.Resource { State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(1 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + Schema: map[string]*schema.Schema{ "name": &schema.Schema{ Type: schema.TypeString, @@ -72,11 +77,25 @@ func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) erro conn := meta.(*AWSClient).ecrconn log.Printf("[DEBUG] Reading repository %s", d.Id()) - out, err := conn.DescribeRepositories(&ecr.DescribeRepositoriesInput{ + var out *ecr.DescribeRepositoriesOutput + input := &ecr.DescribeRepositoriesInput{ RepositoryNames: []*string{aws.String(d.Id())}, + } + + err := resource.Retry(d.Timeout(schema.TimeoutRead), func() *resource.RetryError { + var err error + out, err = conn.DescribeRepositories(input) + if err != nil { + if d.IsNewResource() && isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil }) + if err != nil { - if ecrerr, ok := err.(awserr.Error); ok && ecrerr.Code() == "RepositoryNotFoundException" { + if !d.IsNewResource() && isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { d.SetId("") return nil } @@ -119,7 +138,7 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er } log.Printf("[DEBUG] Waiting for ECR Repository %q to be deleted", d.Id()) - err = resource.Retry(20*time.Minute, func() *resource.RetryError { + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { _, err := conn.DescribeRepositories(&ecr.DescribeRepositoriesInput{ RepositoryNames: []*string{aws.String(d.Id())}, }) diff --git a/website/docs/r/ecr_repository.html.markdown b/website/docs/r/ecr_repository.html.markdown index eb90f5b6085..a64ba9ea9f6 100644 --- a/website/docs/r/ecr_repository.html.markdown +++ b/website/docs/r/ecr_repository.html.markdown @@ -37,6 +37,13 @@ In addition to all arguments above, the following attributes are exported: * `registry_id` - The registry ID where the repository was created. * `repository_url` - The URL of the repository (in the form `aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName` +## Timeouts + +`aws_ecr_repository` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) +configuration options: + +- `read` - (Default `1 minute`) How long to wait for a repository to be listed after creation. +- `delete` - (Default `20 minutes`) How long to wait for a repository to be deleted. ## Import From dfc900ad5d8ce61a7df47ad7e49ae342a135e8aa Mon Sep 17 00:00:00 2001 From: Mildred Ki'Lya Date: Thu, 12 Jul 2018 10:26:33 +0000 Subject: [PATCH 1827/3316] aws_lb_listener: wait fir listener creation AWS resources can take some time to appear in listings. When we created a listener before, it could happen that the creation succeeded but the listing of the resource right after creation would return a resource not found. This can me normal on AWS where changes can take some time to propagate. The correct behaviour in this case is to retry reading the resource until we find it (because we know that it has been created successfully). We don't change the behaviour on resource reads that are not following a creation where a resource not found is still going to remove the resource from the tfstate. This should fix https://github.com/terraform-providers/terraform-provider-aws/issues/2456 --- aws/resource_aws_lb_listener.go | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index 918d05250b0..133271b77c1 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -25,6 +25,10 @@ func resourceAwsLbListener() *schema.Resource { State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(10 * time.Minute), + }, + Schema: map[string]*schema.Schema{ "arn": { Type: schema.TypeString, @@ -151,11 +155,26 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - resp, err := elbconn.DescribeListeners(&elbv2.DescribeListenersInput{ + var resp *elbv2.DescribeListenersOutput + var request = &elbv2.DescribeListenersInput{ ListenerArns: []*string{aws.String(d.Id())}, + } + + err := resource.Retry(d.Timeout(schema.TimeoutRead), func() *resource.RetryError { + var err error + resp, err = elbconn.DescribeListeners(request) + if err != nil { + if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { + return resource.RetryableError(err) + } else { + return resource.NonRetryableError(err) + } + } + return nil }) + if err != nil { - if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { + if !d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { log.Printf("[WARN] DescribeListeners - removing %s from state", d.Id()) d.SetId("") return nil From e7372d10a9e951b0bf03ace58ea67dae238a969b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Jul 2018 08:05:39 -0400 Subject: [PATCH 1828/3316] resource/aws_vpc_ipv4_cidr_block_association: Fix filenames for consistency --- ...ciation.go => resource_aws_vpc_ipv4_cidr_block_association.go} | 0 ...st.go => resource_aws_vpc_ipv4_cidr_block_association_test.go} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename aws/{aws_vpc_ipv4_cidr_block_association.go => resource_aws_vpc_ipv4_cidr_block_association.go} (100%) rename aws/{aws_vpc_ipv4_cidr_block_association_test.go => resource_aws_vpc_ipv4_cidr_block_association_test.go} (100%) diff --git a/aws/aws_vpc_ipv4_cidr_block_association.go b/aws/resource_aws_vpc_ipv4_cidr_block_association.go similarity index 100% rename from aws/aws_vpc_ipv4_cidr_block_association.go rename to aws/resource_aws_vpc_ipv4_cidr_block_association.go diff --git a/aws/aws_vpc_ipv4_cidr_block_association_test.go b/aws/resource_aws_vpc_ipv4_cidr_block_association_test.go similarity index 100% rename from aws/aws_vpc_ipv4_cidr_block_association_test.go rename to aws/resource_aws_vpc_ipv4_cidr_block_association_test.go From 02e5101b60ace116fc85d4060c32421ae17e7bec Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Jul 2018 08:18:26 -0400 Subject: [PATCH 1829/3316] Update CHANGELOG for #5158 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b41f7324b..bf468cc656b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.28.0 (Unreleased) + +BUG FIXES: + +* resource/aws_glue_crawler: Prevent error when deleted outside Terraform [GH-5158] + ## 1.27.0 (July 11, 2018) NOTES: From b83df1617e5b3fddd2511c82e40ca1e77997b6ff Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Jul 2018 08:28:18 -0400 Subject: [PATCH 1830/3316] Update CHANGELOG for #5156 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf468cc656b..e726109b279 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.28.0 (Unreleased) +ENHANCEMENTS: + +* resource/aws_codebuild_project: Add `report_build_status` argument under `source` (support report build status for GitHub source type) [GH-5156] + BUG FIXES: * resource/aws_glue_crawler: Prevent error when deleted outside Terraform [GH-5158] From cfc2d29f9e88aced705d441979cd61dfc6cfe868 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Jul 2018 08:47:58 -0400 Subject: [PATCH 1831/3316] docs: Adjust older attributes bylines to "In addition to all arguments above, the following attributes are exported:" --- website/docs/d/cloudformation_export.html.markdown | 2 +- website/docs/d/ecs_service.html.markdown | 2 +- website/docs/d/launch_configuration.html.markdown | 2 +- website/docs/r/dx_gateway.html.markdown | 2 +- .../docs/r/dx_hosted_private_virtual_interface.html.markdown | 2 +- .../dx_hosted_private_virtual_interface_accepter.html.markdown | 2 +- website/docs/r/dx_hosted_public_virtual_interface.html.markdown | 2 +- .../r/dx_hosted_public_virtual_interface_accepter.html.markdown | 2 +- website/docs/r/dx_private_virtual_interface.html.markdown | 2 +- website/docs/r/dx_public_virtual_interface.html.markdown | 2 +- website/docs/r/neptune_parameter_group.html.markdown | 2 +- website/docs/r/vpc_ipv4_cidr_block_association.html.markdown | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/docs/d/cloudformation_export.html.markdown b/website/docs/d/cloudformation_export.html.markdown index 92cd13436e4..46cdc989968 100644 --- a/website/docs/d/cloudformation_export.html.markdown +++ b/website/docs/d/cloudformation_export.html.markdown @@ -33,7 +33,7 @@ resource "aws_instance" "web" { ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `value` - The value from Cloudformation export identified by the export name found from [list-exports](http://docs.aws.amazon.com/cli/latest/reference/cloudformation/list-exports.html) * `exporting_stack_id` - The exporting_stack_id (AWS ARNs) equivalent `ExportingStackId` from [list-exports](http://docs.aws.amazon.com/cli/latest/reference/cloudformation/list-exports.html) diff --git a/website/docs/d/ecs_service.html.markdown b/website/docs/d/ecs_service.html.markdown index a642e155558..afa5746a011 100644 --- a/website/docs/d/ecs_service.html.markdown +++ b/website/docs/d/ecs_service.html.markdown @@ -29,7 +29,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `arn` - The ARN of the ECS Service * `desired_count` - The number of tasks for the ECS Service diff --git a/website/docs/d/launch_configuration.html.markdown b/website/docs/d/launch_configuration.html.markdown index ff3582b73b0..d7aa281739d 100644 --- a/website/docs/d/launch_configuration.html.markdown +++ b/website/docs/d/launch_configuration.html.markdown @@ -26,7 +26,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the launch configuration. * `name` - The Name of the launch configuration. diff --git a/website/docs/r/dx_gateway.html.markdown b/website/docs/r/dx_gateway.html.markdown index 78a7183d123..a4269808a1b 100644 --- a/website/docs/r/dx_gateway.html.markdown +++ b/website/docs/r/dx_gateway.html.markdown @@ -28,7 +28,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the gateway. diff --git a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown index 9c95cd6be61..ebecd6d428a 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown @@ -40,7 +40,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. diff --git a/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown index ef2301d58f6..55943e482b9 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface_accepter.html.markdown @@ -74,7 +74,7 @@ from your statefile and management, **but will not delete the Direct Connect vir ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. diff --git a/website/docs/r/dx_hosted_public_virtual_interface.html.markdown b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown index dbf34f1fef2..06c3a5f79e9 100644 --- a/website/docs/r/dx_hosted_public_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_public_virtual_interface.html.markdown @@ -48,7 +48,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. diff --git a/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown b/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown index 5d4efe0cd87..6375fd1d9d9 100644 --- a/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown +++ b/website/docs/r/dx_hosted_public_virtual_interface_accepter.html.markdown @@ -75,7 +75,7 @@ from your statefile and management, **but will not delete the Direct Connect vir ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. diff --git a/website/docs/r/dx_private_virtual_interface.html.markdown b/website/docs/r/dx_private_virtual_interface.html.markdown index 7db6e4a7dd8..2503eb17fa0 100644 --- a/website/docs/r/dx_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_private_virtual_interface.html.markdown @@ -41,7 +41,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. diff --git a/website/docs/r/dx_public_virtual_interface.html.markdown b/website/docs/r/dx_public_virtual_interface.html.markdown index c8d3705613a..b3f52c5c88d 100644 --- a/website/docs/r/dx_public_virtual_interface.html.markdown +++ b/website/docs/r/dx_public_virtual_interface.html.markdown @@ -47,7 +47,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. diff --git a/website/docs/r/neptune_parameter_group.html.markdown b/website/docs/r/neptune_parameter_group.html.markdown index 86dfcd1a73e..d4523a7ae3c 100644 --- a/website/docs/r/neptune_parameter_group.html.markdown +++ b/website/docs/r/neptune_parameter_group.html.markdown @@ -43,7 +43,7 @@ Parameter blocks support the following: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The Neptune parameter group name. * `arn` - The Neptune parameter group Amazon Resource Name (ARN). diff --git a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown index 796b5d88153..b74cec20775 100644 --- a/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown +++ b/website/docs/r/vpc_ipv4_cidr_block_association.html.markdown @@ -43,7 +43,7 @@ The following arguments are supported: ## Attributes Reference -The following attributes are exported: +In addition to all arguments above, the following attributes are exported: * `id` - The ID of the VPC CIDR association From d358cd8d4d3ae557f82213d8bb18c3ed959aeb55 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Jul 2018 17:33:13 -0400 Subject: [PATCH 1832/3316] resource/aws_cloudwatch_log_group: Remove tags restrictions in AWS GovCloud (US) and AWS China --- aws/config.go | 5 -- aws/resource_aws_cloudwatch_log_group.go | 77 +++++++------------ aws/resource_aws_cloudwatch_log_group_test.go | 8 +- 3 files changed, 30 insertions(+), 60 deletions(-) diff --git a/aws/config.go b/aws/config.go index 9e0e2fa738c..df113d1869e 100644 --- a/aws/config.go +++ b/aws/config.go @@ -246,11 +246,6 @@ func (c *AWSClient) DynamoDB() *dynamodb.DynamoDB { return c.dynamodbconn } -func (c *AWSClient) IsGovCloud() bool { - _, isGovCloud := endpoints.PartitionForRegion([]endpoints.Partition{endpoints.AwsUsGovPartition()}, c.region) - return isGovCloud -} - func (c *AWSClient) IsChinaCloud() bool { _, isChinaCloud := endpoints.PartitionForRegion([]endpoints.Partition{endpoints.AwsCnPartition()}, c.region) return isChinaCloud diff --git a/aws/resource_aws_cloudwatch_log_group.go b/aws/resource_aws_cloudwatch_log_group.go index 496ab42071d..1e5b13b0b90 100644 --- a/aws/resource_aws_cloudwatch_log_group.go +++ b/aws/resource_aws_cloudwatch_log_group.go @@ -10,7 +10,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/hashicorp/errwrap" ) func resourceAwsCloudWatchLogGroup() *schema.Resource { @@ -100,12 +99,12 @@ func resourceAwsCloudWatchLogGroupCreate(d *schema.ResourceData, meta interface{ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudwatchlogsconn log.Printf("[DEBUG] Reading CloudWatch Log Group: %q", d.Get("name").(string)) - lg, exists, err := lookupCloudWatchLogGroup(conn, d.Id(), nil) + lg, err := lookupCloudWatchLogGroup(conn, d.Id()) if err != nil { return err } - if !exists { + if lg == nil { log.Printf("[DEBUG] CloudWatch Group %q Not Found", d.Id()) d.SetId("") return nil @@ -116,44 +115,42 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{}) d.Set("arn", lg.Arn) d.Set("name", lg.LogGroupName) d.Set("kms_key_id", lg.KmsKeyId) + d.Set("retention_in_days", lg.RetentionInDays) - if lg.RetentionInDays != nil { - d.Set("retention_in_days", lg.RetentionInDays) + tags := make(map[string]string, 0) + tagsOutput, err := conn.ListTagsLogGroup(&cloudwatchlogs.ListTagsLogGroupInput{ + LogGroupName: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("error listing CloudWatch Logs Group %q tags: %s", d.Id(), err) } - - if !meta.(*AWSClient).IsChinaCloud() && !meta.(*AWSClient).IsGovCloud() { - tags, err := flattenCloudWatchTags(d, conn) - if err != nil { - return err - } - d.Set("tags", tags) + if tagsOutput != nil { + tags = aws.StringValueMap(tagsOutput.Tags) } + d.Set("tags", tags) return nil } -func lookupCloudWatchLogGroup(conn *cloudwatchlogs.CloudWatchLogs, - name string, nextToken *string) (*cloudwatchlogs.LogGroup, bool, error) { +func lookupCloudWatchLogGroup(conn *cloudwatchlogs.CloudWatchLogs, name string) (*cloudwatchlogs.LogGroup, error) { input := &cloudwatchlogs.DescribeLogGroupsInput{ LogGroupNamePrefix: aws.String(name), - NextToken: nextToken, } - resp, err := conn.DescribeLogGroups(input) - if err != nil { - return nil, true, err - } - - for _, lg := range resp.LogGroups { - if *lg.LogGroupName == name { - return lg, true, nil + var logGroup *cloudwatchlogs.LogGroup + err := conn.DescribeLogGroupsPages(input, func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { + for _, lg := range page.LogGroups { + if aws.StringValue(lg.LogGroupName) == name { + logGroup = lg + return false + } } + return !lastPage + }) + if err != nil { + return nil, err } - if resp.NextToken != nil { - return lookupCloudWatchLogGroup(conn, name, resp.NextToken) - } - - return nil, false, nil + return logGroup, nil } func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{}) error { @@ -184,9 +181,7 @@ func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{ } } - restricted := meta.(*AWSClient).IsChinaCloud() || meta.(*AWSClient).IsGovCloud() - - if !restricted && d.HasChange("tags") { + if d.HasChange("tags") { oraw, nraw := d.GetChange("tags") o := oraw.(map[string]interface{}) n := nraw.(map[string]interface{}) @@ -269,23 +264,3 @@ func resourceAwsCloudWatchLogGroupDelete(d *schema.ResourceData, meta interface{ return nil } - -func flattenCloudWatchTags(d *schema.ResourceData, conn *cloudwatchlogs.CloudWatchLogs) (map[string]interface{}, error) { - tagsOutput, err := conn.ListTagsLogGroup(&cloudwatchlogs.ListTagsLogGroupInput{ - LogGroupName: aws.String(d.Get("name").(string)), - }) - if err != nil { - return nil, errwrap.Wrapf("Error Getting CloudWatch Logs Tag List: {{err}}", err) - } - if tagsOutput != nil { - output := make(map[string]interface{}, len(tagsOutput.Tags)) - - for i, v := range tagsOutput.Tags { - output[i] = *v - } - - return output, nil - } - - return make(map[string]interface{}), nil -} diff --git a/aws/resource_aws_cloudwatch_log_group_test.go b/aws/resource_aws_cloudwatch_log_group_test.go index 525fef09dc9..d7aa3c4c0ab 100644 --- a/aws/resource_aws_cloudwatch_log_group_test.go +++ b/aws/resource_aws_cloudwatch_log_group_test.go @@ -271,11 +271,11 @@ func testAccCheckCloudWatchLogGroupExists(n string, lg *cloudwatchlogs.LogGroup) } conn := testAccProvider.Meta().(*AWSClient).cloudwatchlogsconn - logGroup, exists, err := lookupCloudWatchLogGroup(conn, rs.Primary.ID, nil) + logGroup, err := lookupCloudWatchLogGroup(conn, rs.Primary.ID) if err != nil { return err } - if !exists { + if logGroup == nil { return fmt.Errorf("Bad: LogGroup %q does not exist", rs.Primary.ID) } @@ -292,12 +292,12 @@ func testAccCheckAWSCloudWatchLogGroupDestroy(s *terraform.State) error { if rs.Type != "aws_cloudwatch_log_group" { continue } - _, exists, err := lookupCloudWatchLogGroup(conn, rs.Primary.ID, nil) + logGroup, err := lookupCloudWatchLogGroup(conn, rs.Primary.ID) if err != nil { return nil } - if exists { + if logGroup != nil { return fmt.Errorf("Bad: LogGroup still exists: %q", rs.Primary.ID) } From 8ed66de1b270418a5c22008004550609c5ba4de1 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Thu, 12 Jul 2018 18:35:21 -0700 Subject: [PATCH 1833/3316] Flesh out more of the CodePipeline webhook resource. --- aws/provider.go | 1 + aws/resource_aws_codepipeline_webhook.go | 197 +++++++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 aws/resource_aws_codepipeline_webhook.go diff --git a/aws/provider.go b/aws/provider.go index c093890c444..e865e55fdff 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -331,6 +331,7 @@ func Provider() terraform.ResourceProvider { "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), "aws_codebuild_project": resourceAwsCodeBuildProject(), "aws_codepipeline": resourceAwsCodePipeline(), + "aws_codepipeline_webhook": resourceAwsCodePipelineWebhook(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_dax_cluster": resourceAwsDaxCluster(), "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go new file mode 100644 index 00000000000..af7984a6a69 --- /dev/null +++ b/aws/resource_aws_codepipeline_webhook.go @@ -0,0 +1,197 @@ +package aws + +import ( + "fmt" + "strings" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" +) + +func resourceAwsCodePipelineWebhook() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCodePipelineWebhookCreate, + Read: resourceAwsCodePipelineWebhookRead, + Update: nil, + Delete: resourceAwsCodePipelineWebhookDelete, + SchemaVersion: 1, + + Schema: map[string]*schema.Schema{ + "auth": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + "secret_token": { + Type: schema.TypeString, + Optional: true, + }, + "allowed_ip_range": { + Type: schema.TypeList, + Default: "0.0.0.0/0", + Optional: true, + }, + }, + }, + }, + "filter": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{ + Schema: map[string]*schema.Schema{ + "json_path": { + Type: schema.TypeString, + Required: true, + }, + + "match_equals": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "target": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "action": { + Type: schema.TypeString, + Required: true, + }, + "pipeline": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + + auth := d.Get("auth").(map[string]interface{}) + target := d.Get("target").(map[string]interface{}) + filters := d.Get("filter").(*schema.Set) + + var rules []aws.WebhookFilterRule + + for _, f := range filters.List() { + r = f.(map[string]interface{}) + rules = append(rules, &aws.WebhookFilterRule{ + JsonPath: aws.String(r["json_path"]), + MatchEquals: aws.String(r["match_equals"]), + }) + } + + request = &codepipeline.PutWebhookInput{ + Webhook: &codepipeline.WebhookDefinition{ + Authentication: &aws.String(auth["type"]), + Filters: &rules, + Name: &aws.String(d.Get("name").(string)), + TargetAction: &aws.String(target["action"]), + TargetPipeline: &aws.String(target["pipeline"]), + }, + } + + var authConfig WebhookAuthConfiguration + switch auth["type"] { + case "IP": + authConfig.AllowedIPRange = auth["allowed_ip_range"] + break + case "GITHUB_HMAC": + authConfig.SecretToken = auth["allowed_ip_range"] + break + case "UNAUTHENTICATED": + break + default: + return fmt.Errorf("Invalid authentication type %s", auth["type"]) + } + + request.Webhook.AuthenticationConfiguration = &authConfig + webhook, err := codepipeline.PutWebhook(request) + if err != nil { + return fmt.Errorf("Error creating webhook: %s", err) + } + + d.SetId(webhook.Arn) + + return resourceAwsCodePipelineWebhookRead(d, meta) +} + +func getAllCodePipelineWebhooks(conn *codepipeline.CodePipeline) ([]*codepipeline.ListWebhookItem, error) { + var webhooks []*codepipeline.ListWebhookItem + var nextToken string + + for { + input := &codepipeline.ListWebhooksInput{ + MaxResults: aws.Int64(int64(60)), + } + if nextToken != "" { + input.NextToken = aws.String(nextToken) + } + out, err := conn.ListWebhooks(input) + if err != nil { + return pools, err + } + pools = append(pools, out.Webhooks...) + + if out.NextToken == nil { + break + } + nextToken = aws.StringValue(out.NextToken) + } + + return webhooks, nil +} + +func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + arn := d.Id() + webhooks, err := getAllCodePipelineWebhooks(conn) + if err != nil { + return fmt.Errorf("Error fetching webhooks: %s", err) + } + + if len(webhooks) == 0 { + return fmt.Errorf("No webhooks returned!") + } + + found * codepipeline.ListWebhookItem + for _, w := range webhooks { + if w.Arn == arn { + found = w + break + } + } + + if found.Arn == "" { + return fmt.Errorf("Webhook not found: %s", arn) + } + + d.Set("name", found.Definition.Name) +} + +func resourceAwsCodePipelineWebhookDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + return nil +} From 2fcbdfbb8230ca41d6ec4b2036fdfab5e9b4c752 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Thu, 12 Jul 2018 18:38:27 -0700 Subject: [PATCH 1834/3316] Remove to make merge from master easier. --- aws/provider.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/provider.go b/aws/provider.go index e865e55fdff..c093890c444 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -331,7 +331,6 @@ func Provider() terraform.ResourceProvider { "aws_codecommit_trigger": resourceAwsCodeCommitTrigger(), "aws_codebuild_project": resourceAwsCodeBuildProject(), "aws_codepipeline": resourceAwsCodePipeline(), - "aws_codepipeline_webhook": resourceAwsCodePipelineWebhook(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_dax_cluster": resourceAwsDaxCluster(), "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), From 51d3d798a0a1d4179d58cfcae98e8895e89cce4b Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Thu, 12 Jul 2018 18:39:05 -0700 Subject: [PATCH 1835/3316] Add the resource back into the resource map. --- aws/provider.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/provider.go b/aws/provider.go index fc8848da8f9..046eb658478 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -355,6 +355,7 @@ func Provider() terraform.ResourceProvider { "aws_codebuild_project": resourceAwsCodeBuildProject(), "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), "aws_codepipeline": resourceAwsCodePipeline(), + "aws_codepipeline_webhook": resourceAwsCodePipelineWebhook(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_dax_cluster": resourceAwsDaxCluster(), "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), From 49f6e96d28667afe2353230e5a8ebf0b2b5ea05a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 02:16:39 -0400 Subject: [PATCH 1836/3316] vendor: aws-sdk-go@v1.14.26 --- .../ec2rolecreds/ec2_role_provider.go | 6 +- .../aws/aws-sdk-go/aws/ec2metadata/api.go | 8 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/internal/sdkuri/path.go | 23 + .../protocol/json/jsonutil/unmarshal.go | 9 +- .../aws/aws-sdk-go/service/apigateway/api.go | 10 + .../aws/aws-sdk-go/service/appsync/api.go | 59 + .../aws/aws-sdk-go/service/codebuild/api.go | 7 +- .../aws/aws-sdk-go/service/efs/api.go | 594 +++++++--- .../aws/aws-sdk-go/service/efs/errors.go | 45 +- .../aws/aws-sdk-go/service/emr/api.go | 79 +- .../aws/aws-sdk-go/service/iam/api.go | 961 +++++++++++++++- .../aws/aws-sdk-go/service/s3/api.go | 24 +- .../aws/aws-sdk-go/service/ssm/api.go | 47 + vendor/vendor.json | 1008 +++++++++-------- 15 files changed, 2099 insertions(+), 783 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go index c39749524ec..0ed791be641 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go @@ -4,7 +4,6 @@ import ( "bufio" "encoding/json" "fmt" - "path" "strings" "time" @@ -12,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/internal/sdkuri" ) // ProviderName provides a name of EC2Role provider @@ -125,7 +125,7 @@ type ec2RoleCredRespBody struct { Message string } -const iamSecurityCredsPath = "/iam/security-credentials" +const iamSecurityCredsPath = "iam/security-credentials/" // requestCredList requests a list of credentials from the EC2 service. // If there are no credentials, or there is an error making or receiving the request @@ -153,7 +153,7 @@ func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) { // If the credentials cannot be found, or there is an error reading the response // and error will be returned. func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) { - resp, err := client.GetMetadata(path.Join(iamSecurityCredsPath, credsName)) + resp, err := client.GetMetadata(sdkuri.PathJoin(iamSecurityCredsPath, credsName)) if err != nil { return ec2RoleCredRespBody{}, awserr.New("EC2RoleRequestError", diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go index 984407a580f..c215cd3f599 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go @@ -4,12 +4,12 @@ import ( "encoding/json" "fmt" "net/http" - "path" "strings" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/sdkuri" ) // GetMetadata uses the path provided to request information from the EC2 @@ -19,7 +19,7 @@ func (c *EC2Metadata) GetMetadata(p string) (string, error) { op := &request.Operation{ Name: "GetMetadata", HTTPMethod: "GET", - HTTPPath: path.Join("/", "meta-data", p), + HTTPPath: sdkuri.PathJoin("/meta-data", p), } output := &metadataOutput{} @@ -35,7 +35,7 @@ func (c *EC2Metadata) GetUserData() (string, error) { op := &request.Operation{ Name: "GetUserData", HTTPMethod: "GET", - HTTPPath: path.Join("/", "user-data"), + HTTPPath: "/user-data", } output := &metadataOutput{} @@ -56,7 +56,7 @@ func (c *EC2Metadata) GetDynamicData(p string) (string, error) { op := &request.Operation{ Name: "GetDynamicData", HTTPMethod: "GET", - HTTPPath: path.Join("/", "dynamic", p), + HTTPPath: sdkuri.PathJoin("/dynamic", p), } output := &metadataOutput{} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index afd20fb1219..dee00a1f3ac 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.14.24" +const SDKVersion = "1.14.26" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go new file mode 100644 index 00000000000..38ea61afeaa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go @@ -0,0 +1,23 @@ +package sdkuri + +import ( + "path" + "strings" +) + +// PathJoin will join the elements of the path delimited by the "/" +// character. Similar to path.Join with the exception the trailing "/" +// character is preserved if present. +func PathJoin(elems ...string) string { + if len(elems) == 0 { + return "" + } + + hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/") + str := path.Join(elems...) + if hasTrailing && str != "/" { + str += "/" + } + + return str +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go index 037e1e7be78..c7e6db72c69 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go @@ -172,9 +172,6 @@ func unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) } func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error { - errf := func() error { - return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) - } switch d := data.(type) { case nil: @@ -197,7 +194,7 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa } value.Set(reflect.ValueOf(v)) default: - return errf() + return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } case float64: switch value.Interface().(type) { @@ -210,14 +207,14 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa t := time.Unix(int64(d), 0).UTC() value.Set(reflect.ValueOf(&t)) default: - return errf() + return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } case bool: switch value.Interface().(type) { case *bool: value.Set(reflect.ValueOf(&d)) default: - return errf() + return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type()) } default: return fmt.Errorf("unsupported JSON value (%v)", data) diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index d1804357cef..b1a63ebd903 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -11563,6 +11563,10 @@ type ApiStage struct { // API stage name of the associated API stage in a usage plan. Stage *string `locationName:"stage" type:"string"` + + // Map containing method level throttling information for API stage in a usage + // plan. + Throttle map[string]*ThrottleSettings `locationName:"throttle" type:"map"` } // String returns the string representation @@ -11587,6 +11591,12 @@ func (s *ApiStage) SetStage(v string) *ApiStage { return s } +// SetThrottle sets the Throttle field's value. +func (s *ApiStage) SetThrottle(v map[string]*ThrottleSettings) *ApiStage { + s.Throttle = v + return s +} + // Represents an authorization layer for methods. If enabled on a method, API // Gateway will activate the authorizer when a client calls the method. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go index e75e8b141ce..bd42011dd4c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go @@ -2694,6 +2694,9 @@ type CreateDataSourceInput struct { // Amazon Elasticsearch settings. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + // Http endpoint settings. + HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` + // AWS Lambda settings. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` @@ -2780,6 +2783,12 @@ func (s *CreateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourc return s } +// SetHttpConfig sets the HttpConfig field's value. +func (s *CreateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *CreateDataSourceInput { + s.HttpConfig = v + return s +} + // SetLambdaConfig sets the LambdaConfig field's value. func (s *CreateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *CreateDataSourceInput { s.LambdaConfig = v @@ -3187,6 +3196,9 @@ type DataSource struct { // Amazon Elasticsearch settings. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + // Http endpoint settings. + HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` + // Lambda settings. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` @@ -3210,6 +3222,8 @@ type DataSource struct { // to invoke a GraphQL operation without connecting to a data source, such // as performing data transformation with resolvers or triggering a subscription // to be invoked from a mutation. + // + // * HTTP: The data source is an HTTP endpoint. Type *string `locationName:"type" type:"string" enum:"DataSourceType"` } @@ -3247,6 +3261,12 @@ func (s *DataSource) SetElasticsearchConfig(v *ElasticsearchDataSourceConfig) *D return s } +// SetHttpConfig sets the HttpConfig field's value. +func (s *DataSource) SetHttpConfig(v *HttpDataSourceConfig) *DataSource { + s.HttpConfig = v + return s +} + // SetLambdaConfig sets the LambdaConfig field's value. func (s *DataSource) SetLambdaConfig(v *LambdaDataSourceConfig) *DataSource { s.LambdaConfig = v @@ -4265,6 +4285,33 @@ func (s *GraphqlApi) SetUserPoolConfig(v *UserPoolConfig) *GraphqlApi { return s } +// Describes a Http data source configuration. +type HttpDataSourceConfig struct { + _ struct{} `type:"structure"` + + // The Http url endpoint. You can either specify the domain name or ip and port + // combination and the url scheme must be http(s). If the port is not specified, + // AWS AppSync will use the default port 80 for http endpoint and port 443 for + // https endpoints. + Endpoint *string `locationName:"endpoint" type:"string"` +} + +// String returns the string representation +func (s HttpDataSourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HttpDataSourceConfig) GoString() string { + return s.String() +} + +// SetEndpoint sets the Endpoint field's value. +func (s *HttpDataSourceConfig) SetEndpoint(v string) *HttpDataSourceConfig { + s.Endpoint = &v + return s +} + // Describes a Lambda data source configuration. type LambdaDataSourceConfig struct { _ struct{} `type:"structure"` @@ -5217,6 +5264,9 @@ type UpdateDataSourceInput struct { // The new Elasticsearch configuration. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` + // The new http endpoint configuration + HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` + // The new Lambda configuration. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` @@ -5302,6 +5352,12 @@ func (s *UpdateDataSourceInput) SetElasticsearchConfig(v *ElasticsearchDataSourc return s } +// SetHttpConfig sets the HttpConfig field's value. +func (s *UpdateDataSourceInput) SetHttpConfig(v *HttpDataSourceConfig) *UpdateDataSourceInput { + s.HttpConfig = v + return s +} + // SetLambdaConfig sets the LambdaConfig field's value. func (s *UpdateDataSourceInput) SetLambdaConfig(v *LambdaDataSourceConfig) *UpdateDataSourceInput { s.LambdaConfig = v @@ -5810,6 +5866,9 @@ const ( // DataSourceTypeNone is a DataSourceType enum value DataSourceTypeNone = "NONE" + + // DataSourceTypeHttp is a DataSourceType enum value + DataSourceTypeHttp = "HTTP" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 6f19566e5a4..5799a8ab95b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -2002,7 +2002,9 @@ type CreateProjectInput struct { // The ARN of the AWS Identity and Access Management (IAM) role that enables // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS // account. - ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` + // + // ServiceRole is a required field + ServiceRole *string `locationName:"serviceRole" min:"1" type:"string" required:"true"` // Information about the build input source code for the build project. // @@ -2052,6 +2054,9 @@ func (s *CreateProjectInput) Validate() error { if s.Name != nil && len(*s.Name) < 2 { invalidParams.Add(request.NewErrParamMinLen("Name", 2)) } + if s.ServiceRole == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceRole")) + } if s.ServiceRole != nil && len(*s.ServiceRole) < 1 { invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1)) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index 12909345823..3471dff8455 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -39,7 +39,7 @@ const opCreateFileSystem = "CreateFileSystem" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) { +func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { op := &request.Operation{ Name: opCreateFileSystem, HTTPMethod: "POST", @@ -50,7 +50,7 @@ func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *reques input = &CreateFileSystemInput{} } - output = &FileSystemDescription{} + output = &UpdateFileSystemOutput{} req = c.newRequest(op, input, output) return } @@ -124,11 +124,22 @@ func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *reques // the creation token you provided. // // * ErrCodeFileSystemLimitExceeded "FileSystemLimitExceeded" -// Returned if the AWS account has already created maximum number of file systems -// allowed per account. +// Returned if the AWS account has already created the maximum number of file +// systems allowed per account. +// +// * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity" +// Returned if there's not enough capacity to provision additional throughput. +// This value might be returned when you try to create a file system in provisioned +// throughput mode, when you attempt to increase the provisioned throughput +// of an existing file system, or when you attempt to change an existing file +// system from bursting to provisioned throughput mode. +// +// * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded" +// Returned if the throughput mode or amount of provisioned throughput can't +// be changed because the throughput limit of 1024 MiB/s has been reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) { +func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*UpdateFileSystemOutput, error) { req, out := c.CreateFileSystemRequest(input) return out, req.Send() } @@ -142,7 +153,7 @@ func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescrip // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*FileSystemDescription, error) { +func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { req, out := c.CreateFileSystemRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) @@ -305,11 +316,11 @@ func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *requ // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState" -// Returned if the file system's life cycle state is not "created". +// Returned if the file system's lifecycle state is not "available". // // * ErrCodeMountTargetConflict "MountTargetConflict" // Returned if the mount target would violate one of the specified restrictions @@ -327,18 +338,19 @@ func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *requ // the subnet. // // * ErrCodeNetworkInterfaceLimitExceeded "NetworkInterfaceLimitExceeded" -// The calling account has reached the ENI limit for the specific AWS region. -// Client should try to delete some ENIs or get its account limit raised. For -// more information, see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) -// in the Amazon Virtual Private Cloud User Guide (see the Network interfaces -// per VPC entry in the table). +// The calling account has reached the limit for elastic network interfaces +// for the specific AWS Region. The client should try to delete some elastic +// network interfaces or get the account limit raised. For more information, +// see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) +// in the Amazon VPC User Guide (see the Network interfaces per VPC entry in +// the table). // // * ErrCodeSecurityGroupLimitExceeded "SecurityGroupLimitExceeded" // Returned if the size of SecurityGroups specified in the request is greater // than five. // // * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound" -// Returned if one of the specified security groups does not exist in the subnet's +// Returned if one of the specified security groups doesn't exist in the subnet's // VPC. // // * ErrCodeUnsupportedAvailabilityZone "UnsupportedAvailabilityZone" @@ -435,7 +447,7 @@ func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, o // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags @@ -539,7 +551,7 @@ func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *reques // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // * ErrCodeFileSystemInUse "FileSystemInUse" @@ -755,7 +767,7 @@ func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags @@ -867,7 +879,7 @@ func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req * // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems @@ -1060,7 +1072,7 @@ func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // * ErrCodeMountTargetNotFound "MountTargetNotFound" @@ -1156,7 +1168,7 @@ func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Reques // Returned if an error occurred on the server side. // // * ErrCodeFileSystemNotFound "FileSystemNotFound" -// Returned if the specified FileSystemId does not exist in the requester's +// Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags @@ -1271,7 +1283,7 @@ func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSec // than five. // // * ErrCodeSecurityGroupNotFound "SecurityGroupNotFound" -// Returned if one of the specified security groups does not exist in the subnet's +// Returned if one of the specified security groups doesn't exist in the subnet's // VPC. // // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups @@ -1296,6 +1308,112 @@ func (c *EFS) ModifyMountTargetSecurityGroupsWithContext(ctx aws.Context, input return out, req.Send() } +const opUpdateFileSystem = "UpdateFileSystem" + +// UpdateFileSystemRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFileSystem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFileSystem for more information on using the UpdateFileSystem +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFileSystemRequest method. +// req, resp := client.UpdateFileSystemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem +func (c *EFS) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { + op := &request.Operation{ + Name: opUpdateFileSystem, + HTTPMethod: "PUT", + HTTPPath: "/2015-02-01/file-systems/{FileSystemId}", + } + + if input == nil { + input = &UpdateFileSystemInput{} + } + + output = &UpdateFileSystemOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFileSystem API operation for Amazon Elastic File System. +// +// Updates the throughput mode or the amount of provisioned throughput of an +// existing file system. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic File System's +// API operation UpdateFileSystem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// Returned if the request is malformed or contains an error such as an invalid +// parameter value or a missing required parameter. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// Returned if the specified FileSystemId value doesn't exist in the requester's +// AWS account. +// +// * ErrCodeIncorrectFileSystemLifeCycleState "IncorrectFileSystemLifeCycleState" +// Returned if the file system's lifecycle state is not "available". +// +// * ErrCodeInsufficientThroughputCapacity "InsufficientThroughputCapacity" +// Returned if there's not enough capacity to provision additional throughput. +// This value might be returned when you try to create a file system in provisioned +// throughput mode, when you attempt to increase the provisioned throughput +// of an existing file system, or when you attempt to change an existing file +// system from bursting to provisioned throughput mode. +// +// * ErrCodeInternalServerError "InternalServerError" +// Returned if an error occurred on the server side. +// +// * ErrCodeThroughputLimitExceeded "ThroughputLimitExceeded" +// Returned if the throughput mode or amount of provisioned throughput can't +// be changed because the throughput limit of 1024 MiB/s has been reached. +// +// * ErrCodeTooManyRequests "TooManyRequests" +// Returned if you don’t wait at least 24 hours before changing the throughput +// mode, or decreasing the Provisioned Throughput value. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem +func (c *EFS) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) { + req, out := c.UpdateFileSystemRequest(input) + return out, req.Send() +} + +// UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFileSystem for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EFS) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { + req, out := c.UpdateFileSystemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type CreateFileSystemInput struct { _ struct{} `type:"structure"` @@ -1305,30 +1423,29 @@ type CreateFileSystemInput struct { // CreationToken is a required field CreationToken *string `min:"1" type:"string" required:"true"` - // A boolean value that, if true, creates an encrypted file system. When creating + // A Boolean value that, if true, creates an encrypted file system. When creating // an encrypted file system, you have the option of specifying a CreateFileSystemRequest$KmsKeyId // for an existing AWS Key Management Service (AWS KMS) customer master key // (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, /aws/elasticfilesystem, // is used to protect the encrypted file system. Encrypted *bool `type:"boolean"` - // The id of the AWS KMS CMK that will be used to protect the encrypted file - // system. This parameter is only required if you want to use a non-default - // CMK. If this parameter is not specified, the default CMK for Amazon EFS is - // used. This id can be in one of the following formats: + // The ID of the AWS KMS CMK to be used to protect the encrypted file system. + // This parameter is only required if you want to use a non-default CMK. If + // this parameter is not specified, the default CMK for Amazon EFS is used. + // This ID can be in one of the following formats: // - // * Key ID - A unique identifier of the key. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. + // * Key ID - A unique identifier of the key, for example, 1234abcd-12ab-34cd-56ef-1234567890ab. // - // * ARN - An Amazon Resource Name for the key. For example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + // * ARN - An Amazon Resource Name (ARN) for the key, for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. // // * Key alias - A previously created display name for a key. For example, // alias/projectKey1. // - // * Key alias ARN - An Amazon Resource Name for a key alias. For example, - // arn:aws:kms:us-west-2:444455556666:alias/projectKey1. + // * Key alias ARN - An ARN for a key alias, for example, arn:aws:kms:us-west-2:444455556666:alias/projectKey1. // - // Note that if the KmsKeyId is specified, the CreateFileSystemRequest$Encrypted - // parameter must be set to true. + // If KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter + // must be set to true. KmsKeyId *string `min:"1" type:"string"` // The PerformanceMode of the file system. We recommend generalPurpose performance @@ -1337,6 +1454,20 @@ type CreateFileSystemInput struct { // with a tradeoff of slightly higher latencies for most file operations. This // can't be changed after the file system has been created. PerformanceMode *string `type:"string" enum:"PerformanceMode"` + + // The throughput, measured in MiB/s, that you want to provision for a file + // system that you're creating. The limit on throughput is 1024 MiB/s. You can + // get these limits increased by contacting AWS Support. For more information, + // see Amazon EFS Limits That You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) + // in the Amazon EFS User Guide. + ProvisionedThroughputInMibps *float64 `type:"double"` + + // The throughput mode for the file system to be created. There are two throughput + // modes to choose from for your file system: bursting and provisioned. You + // can decrease your file system's throughput in Provisioned Throughput mode + // or change between the throughput modes as long as it’s been more than 24 + // hours since the last decrease or throughput mode change. + ThroughputMode *string `type:"string" enum:"ThroughputMode"` } // String returns the string representation @@ -1392,6 +1523,18 @@ func (s *CreateFileSystemInput) SetPerformanceMode(v string) *CreateFileSystemIn return s } +// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. +func (s *CreateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *CreateFileSystemInput { + s.ProvisionedThroughputInMibps = &v + return s +} + +// SetThroughputMode sets the ThroughputMode field's value. +func (s *CreateFileSystemInput) SetThroughputMode(v string) *CreateFileSystemInput { + s.ThroughputMode = &v + return s +} + type CreateMountTargetInput struct { _ struct{} `type:"structure"` @@ -1788,7 +1931,7 @@ type DescribeFileSystemsOutput struct { _ struct{} `type:"structure"` // Array of file system descriptions. - FileSystems []*FileSystemDescription `type:"list"` + FileSystems []*UpdateFileSystemOutput `type:"list"` // Present if provided by caller in the request (String). Marker *string `type:"string"` @@ -1809,7 +1952,7 @@ func (s DescribeFileSystemsOutput) GoString() string { } // SetFileSystems sets the FileSystems field's value. -func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystemDescription) *DescribeFileSystemsOutput { +func (s *DescribeFileSystemsOutput) SetFileSystems(v []*UpdateFileSystemOutput) *DescribeFileSystemsOutput { s.FileSystems = v return s } @@ -2110,149 +2253,6 @@ func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput { return s } -// Description of the file system. -type FileSystemDescription struct { - _ struct{} `type:"structure"` - - // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` - - // Opaque string specified in the request. - // - // CreationToken is a required field - CreationToken *string `min:"1" type:"string" required:"true"` - - // A boolean value that, if true, indicates that the file system is encrypted. - Encrypted *bool `type:"boolean"` - - // ID of the file system, assigned by Amazon EFS. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // The id of an AWS Key Management Service (AWS KMS) customer master key (CMK) - // that was used to protect the encrypted file system. - KmsKeyId *string `min:"1" type:"string"` - - // Lifecycle phase of the file system. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // You can add tags to a file system, including a Name tag. For more information, - // see CreateTags. If the file system has a Name tag, Amazon EFS returns the - // value in this field. - Name *string `type:"string"` - - // Current number of mount targets that the file system has. For more information, - // see CreateMountTarget. - // - // NumberOfMountTargets is a required field - NumberOfMountTargets *int64 `type:"integer" required:"true"` - - // AWS account that created the file system. If the file system was created - // by an IAM user, the parent account to which the user belongs is the owner. - // - // OwnerId is a required field - OwnerId *string `type:"string" required:"true"` - - // The PerformanceMode of the file system. - // - // PerformanceMode is a required field - PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` - - // Latest known metered size (in bytes) of data stored in the file system, in - // bytes, in its Value field, and the time at which that size was determined - // in its Timestamp field. The Timestamp value is the integer number of seconds - // since 1970-01-01T00:00:00Z. Note that the value does not represent the size - // of a consistent snapshot of the file system, but it is eventually consistent - // when there are no writes to the file system. That is, the value will represent - // actual size only if the file system is not modified for a period longer than - // a couple of hours. Otherwise, the value is not the exact size the file system - // was at any instant in time. - // - // SizeInBytes is a required field - SizeInBytes *FileSystemSize `type:"structure" required:"true"` -} - -// String returns the string representation -func (s FileSystemDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FileSystemDescription) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *FileSystemDescription) SetCreationTime(v time.Time) *FileSystemDescription { - s.CreationTime = &v - return s -} - -// SetCreationToken sets the CreationToken field's value. -func (s *FileSystemDescription) SetCreationToken(v string) *FileSystemDescription { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *FileSystemDescription) SetEncrypted(v bool) *FileSystemDescription { - s.Encrypted = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *FileSystemDescription) SetFileSystemId(v string) *FileSystemDescription { - s.FileSystemId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *FileSystemDescription) SetKmsKeyId(v string) *FileSystemDescription { - s.KmsKeyId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *FileSystemDescription) SetLifeCycleState(v string) *FileSystemDescription { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *FileSystemDescription) SetName(v string) *FileSystemDescription { - s.Name = &v - return s -} - -// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. -func (s *FileSystemDescription) SetNumberOfMountTargets(v int64) *FileSystemDescription { - s.NumberOfMountTargets = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *FileSystemDescription) SetOwnerId(v string) *FileSystemDescription { - s.OwnerId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *FileSystemDescription) SetPerformanceMode(v string) *FileSystemDescription { - s.PerformanceMode = &v - return s -} - -// SetSizeInBytes sets the SizeInBytes field's value. -func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDescription { - s.SizeInBytes = v - return s -} - // Latest known metered size (in bytes) of data stored in the file system, in // its Value field, and the time at which that size was determined in its Timestamp // field. Note that the value does not represent the size of a consistent snapshot @@ -2501,6 +2501,235 @@ func (s *Tag) SetValue(v string) *Tag { return s } +type UpdateFileSystemInput struct { + _ struct{} `type:"structure"` + + // The ID of the file system that you want to update. + // + // FileSystemId is a required field + FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` + + // (Optional) The amount of throughput, in MiB/s, that you want to provision + // for your file system. If you're not updating the amount of provisioned throughput + // for your file system, you don't need to provide this value in your request. + ProvisionedThroughputInMibps *float64 `type:"double"` + + // (Optional) The throughput mode that you want your file system to use. If + // you're not updating your throughput mode, you don't need to provide this + // value in your request. + ThroughputMode *string `type:"string" enum:"ThroughputMode"` +} + +// String returns the string representation +func (s UpdateFileSystemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFileSystemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"} + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput { + s.FileSystemId = &v + return s +} + +// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. +func (s *UpdateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemInput { + s.ProvisionedThroughputInMibps = &v + return s +} + +// SetThroughputMode sets the ThroughputMode field's value. +func (s *UpdateFileSystemInput) SetThroughputMode(v string) *UpdateFileSystemInput { + s.ThroughputMode = &v + return s +} + +// Description of the file system. +type UpdateFileSystemOutput struct { + _ struct{} `type:"structure"` + + // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + + // Opaque string specified in the request. + // + // CreationToken is a required field + CreationToken *string `min:"1" type:"string" required:"true"` + + // A Boolean value that, if true, indicates that the file system is encrypted. + Encrypted *bool `type:"boolean"` + + // ID of the file system, assigned by Amazon EFS. + // + // FileSystemId is a required field + FileSystemId *string `type:"string" required:"true"` + + // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK) + // that was used to protect the encrypted file system. + KmsKeyId *string `min:"1" type:"string"` + + // Lifecycle phase of the file system. + // + // LifeCycleState is a required field + LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` + + // You can add tags to a file system, including a Name tag. For more information, + // see CreateTags. If the file system has a Name tag, Amazon EFS returns the + // value in this field. + Name *string `type:"string"` + + // Current number of mount targets that the file system has. For more information, + // see CreateMountTarget. + // + // NumberOfMountTargets is a required field + NumberOfMountTargets *int64 `type:"integer" required:"true"` + + // AWS account that created the file system. If the file system was created + // by an IAM user, the parent account to which the user belongs is the owner. + // + // OwnerId is a required field + OwnerId *string `type:"string" required:"true"` + + // The PerformanceMode of the file system. + // + // PerformanceMode is a required field + PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` + + // The throughput, measured in MiB/s, that you want to provision for a file + // system. The limit on throughput is 1024 MiB/s. You can get these limits increased + // by contacting AWS Support. For more information, see Amazon EFS Limits That + // You Can Increase (http://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) + // in the Amazon EFS User Guide. + ProvisionedThroughputInMibps *float64 `type:"double"` + + // Latest known metered size (in bytes) of data stored in the file system, in + // its Value field, and the time at which that size was determined in its Timestamp + // field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z. + // The SizeInBytes value doesn't represent the size of a consistent snapshot + // of the file system, but it is eventually consistent when there are no writes + // to the file system. That is, SizeInBytes represents actual size only if the + // file system is not modified for a period longer than a couple of hours. Otherwise, + // the value is not the exact size that the file system was at any point in + // time. + // + // SizeInBytes is a required field + SizeInBytes *FileSystemSize `type:"structure" required:"true"` + + // The throughput mode for a file system. There are two throughput modes to + // choose from for your file system: bursting and provisioned. You can decrease + // your file system's throughput in Provisioned Throughput mode or change between + // the throughput modes as long as it’s been more than 24 hours since the last + // decrease or throughput mode change. + ThroughputMode *string `type:"string" enum:"ThroughputMode"` +} + +// String returns the string representation +func (s UpdateFileSystemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *UpdateFileSystemOutput) SetCreationTime(v time.Time) *UpdateFileSystemOutput { + s.CreationTime = &v + return s +} + +// SetCreationToken sets the CreationToken field's value. +func (s *UpdateFileSystemOutput) SetCreationToken(v string) *UpdateFileSystemOutput { + s.CreationToken = &v + return s +} + +// SetEncrypted sets the Encrypted field's value. +func (s *UpdateFileSystemOutput) SetEncrypted(v bool) *UpdateFileSystemOutput { + s.Encrypted = &v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *UpdateFileSystemOutput) SetFileSystemId(v string) *UpdateFileSystemOutput { + s.FileSystemId = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *UpdateFileSystemOutput) SetKmsKeyId(v string) *UpdateFileSystemOutput { + s.KmsKeyId = &v + return s +} + +// SetLifeCycleState sets the LifeCycleState field's value. +func (s *UpdateFileSystemOutput) SetLifeCycleState(v string) *UpdateFileSystemOutput { + s.LifeCycleState = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateFileSystemOutput) SetName(v string) *UpdateFileSystemOutput { + s.Name = &v + return s +} + +// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. +func (s *UpdateFileSystemOutput) SetNumberOfMountTargets(v int64) *UpdateFileSystemOutput { + s.NumberOfMountTargets = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *UpdateFileSystemOutput) SetOwnerId(v string) *UpdateFileSystemOutput { + s.OwnerId = &v + return s +} + +// SetPerformanceMode sets the PerformanceMode field's value. +func (s *UpdateFileSystemOutput) SetPerformanceMode(v string) *UpdateFileSystemOutput { + s.PerformanceMode = &v + return s +} + +// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. +func (s *UpdateFileSystemOutput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemOutput { + s.ProvisionedThroughputInMibps = &v + return s +} + +// SetSizeInBytes sets the SizeInBytes field's value. +func (s *UpdateFileSystemOutput) SetSizeInBytes(v *FileSystemSize) *UpdateFileSystemOutput { + s.SizeInBytes = v + return s +} + +// SetThroughputMode sets the ThroughputMode field's value. +func (s *UpdateFileSystemOutput) SetThroughputMode(v string) *UpdateFileSystemOutput { + s.ThroughputMode = &v + return s +} + const ( // LifeCycleStateCreating is a LifeCycleState enum value LifeCycleStateCreating = "creating" @@ -2508,6 +2737,9 @@ const ( // LifeCycleStateAvailable is a LifeCycleState enum value LifeCycleStateAvailable = "available" + // LifeCycleStateUpdating is a LifeCycleState enum value + LifeCycleStateUpdating = "updating" + // LifeCycleStateDeleting is a LifeCycleState enum value LifeCycleStateDeleting = "deleting" @@ -2522,3 +2754,11 @@ const ( // PerformanceModeMaxIo is a PerformanceMode enum value PerformanceModeMaxIo = "maxIO" ) + +const ( + // ThroughputModeBursting is a ThroughputMode enum value + ThroughputModeBursting = "bursting" + + // ThroughputModeProvisioned is a ThroughputMode enum value + ThroughputModeProvisioned = "provisioned" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go index 950e4ca5fcc..b616a864c7d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go @@ -34,21 +34,21 @@ const ( // ErrCodeFileSystemLimitExceeded for service response error code // "FileSystemLimitExceeded". // - // Returned if the AWS account has already created maximum number of file systems - // allowed per account. + // Returned if the AWS account has already created the maximum number of file + // systems allowed per account. ErrCodeFileSystemLimitExceeded = "FileSystemLimitExceeded" // ErrCodeFileSystemNotFound for service response error code // "FileSystemNotFound". // - // Returned if the specified FileSystemId does not exist in the requester's + // Returned if the specified FileSystemId value doesn't exist in the requester's // AWS account. ErrCodeFileSystemNotFound = "FileSystemNotFound" // ErrCodeIncorrectFileSystemLifeCycleState for service response error code // "IncorrectFileSystemLifeCycleState". // - // Returned if the file system's life cycle state is not "created". + // Returned if the file system's lifecycle state is not "available". ErrCodeIncorrectFileSystemLifeCycleState = "IncorrectFileSystemLifeCycleState" // ErrCodeIncorrectMountTargetState for service response error code @@ -57,6 +57,16 @@ const ( // Returned if the mount target is not in the correct state for the operation. ErrCodeIncorrectMountTargetState = "IncorrectMountTargetState" + // ErrCodeInsufficientThroughputCapacity for service response error code + // "InsufficientThroughputCapacity". + // + // Returned if there's not enough capacity to provision additional throughput. + // This value might be returned when you try to create a file system in provisioned + // throughput mode, when you attempt to increase the provisioned throughput + // of an existing file system, or when you attempt to change an existing file + // system from bursting to provisioned throughput mode. + ErrCodeInsufficientThroughputCapacity = "InsufficientThroughputCapacity" + // ErrCodeInternalServerError for service response error code // "InternalServerError". // @@ -87,11 +97,12 @@ const ( // ErrCodeNetworkInterfaceLimitExceeded for service response error code // "NetworkInterfaceLimitExceeded". // - // The calling account has reached the ENI limit for the specific AWS region. - // Client should try to delete some ENIs or get its account limit raised. For - // more information, see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) - // in the Amazon Virtual Private Cloud User Guide (see the Network interfaces - // per VPC entry in the table). + // The calling account has reached the limit for elastic network interfaces + // for the specific AWS Region. The client should try to delete some elastic + // network interfaces or get the account limit raised. For more information, + // see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) + // in the Amazon VPC User Guide (see the Network interfaces per VPC entry in + // the table). ErrCodeNetworkInterfaceLimitExceeded = "NetworkInterfaceLimitExceeded" // ErrCodeNoFreeAddressesInSubnet for service response error code @@ -111,7 +122,7 @@ const ( // ErrCodeSecurityGroupNotFound for service response error code // "SecurityGroupNotFound". // - // Returned if one of the specified security groups does not exist in the subnet's + // Returned if one of the specified security groups doesn't exist in the subnet's // VPC. ErrCodeSecurityGroupNotFound = "SecurityGroupNotFound" @@ -121,6 +132,20 @@ const ( // Returned if there is no subnet with ID SubnetId provided in the request. ErrCodeSubnetNotFound = "SubnetNotFound" + // ErrCodeThroughputLimitExceeded for service response error code + // "ThroughputLimitExceeded". + // + // Returned if the throughput mode or amount of provisioned throughput can't + // be changed because the throughput limit of 1024 MiB/s has been reached. + ErrCodeThroughputLimitExceeded = "ThroughputLimitExceeded" + + // ErrCodeTooManyRequests for service response error code + // "TooManyRequests". + // + // Returned if you don’t wait at least 24 hours before changing the throughput + // mode, or decreasing the Provisioned Throughput value. + ErrCodeTooManyRequests = "TooManyRequests" + // ErrCodeUnsupportedAvailabilityZone for service response error code // "UnsupportedAvailabilityZone". ErrCodeUnsupportedAvailabilityZone = "UnsupportedAvailabilityZone" diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index 09c135c9750..1ef78fdfbe2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -661,7 +661,7 @@ func (c *EMR) DescribeClusterRequest(input *DescribeClusterInput) (req *request. // DescribeCluster API operation for Amazon Elastic MapReduce. // // Provides cluster-level details including status, hardware and software configuration, -// VPC settings, and so on. For information about the cluster steps, see ListSteps. +// VPC settings, and so on. // // 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 @@ -3675,7 +3675,14 @@ type Cluster struct { // the actual billing rate. NormalizedInstanceHours *int64 `type:"integer"` - // The release label for the Amazon EMR release. + // The Amazon EMR release label, which determines the version of open-source + // application packages installed on the cluster. Release labels are in the + // form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, + // emr-5.14.0. For more information about Amazon EMR release versions and included + // application versions and features, see http://docs.aws.amazon.com/emr/latest/ReleaseGuide/ + // (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). The release label + // applies only to Amazon EMR releases versions 4.x and later. Earlier versions + // use AmiVersion. ReleaseLabel *string `type:"string"` // Applies only when CustomAmiID is used. Specifies the type of updates that @@ -5761,8 +5768,12 @@ type InstanceGroup struct { // of a CloudWatch metric. See PutAutoScalingPolicy. AutoScalingPolicy *AutoScalingPolicyDescription `type:"structure"` - // The bid price for each EC2 instance in the instance group when launching - // nodes as Spot Instances, expressed in USD. + // The maximum Spot price your are willing to pay for EC2 instances. + // + // An optional, nullable field that applies if the MarketType for the instance + // group is specified as SPOT. Specify the maximum spot price in USD. If the + // value is NULL and SPOT is specified, the maximum Spot price is set equal + // to the On-Demand price. BidPrice *string `type:"string"` // Amazon EMR releases 4.x or later. @@ -5913,8 +5924,12 @@ type InstanceGroupConfig struct { // of a CloudWatch metric. See PutAutoScalingPolicy. AutoScalingPolicy *AutoScalingPolicy `type:"structure"` - // Bid price for each EC2 instance in the instance group when launching nodes - // as Spot Instances, expressed in USD. + // The maximum Spot price your are willing to pay for EC2 instances. + // + // An optional, nullable field that applies if the MarketType for the instance + // group is specified as SPOT. Specify the maximum spot price in USD. If the + // value is NULL and SPOT is specified, the maximum Spot price is set equal + // to the On-Demand price. BidPrice *string `type:"string"` // Amazon EMR releases 4.x or later. @@ -6050,8 +6065,11 @@ func (s *InstanceGroupConfig) SetName(v string) *InstanceGroupConfig { type InstanceGroupDetail struct { _ struct{} `type:"structure"` - // Bid price for EC2 Instances when launching nodes as Spot Instances, expressed - // in USD. + // The maximum Spot price your are willing to pay for EC2 instances. + // + // An optional, nullable field that applies if the MarketType for the instance + // group is specified as SPOT. Specified in USD. If the value is NULL and SPOT + // is specified, the maximum Spot price is set equal to the On-Demand price. BidPrice *string `type:"string"` // The date/time the instance group was created. @@ -6751,10 +6769,8 @@ func (s *InstanceTypeSpecification) SetWeightedCapacity(v int64) *InstanceTypeSp type JobFlowDetail struct { _ struct{} `type:"structure"` - // Used only for version 2.x and 3.x of Amazon EMR. The version of the AMI used - // to initialize Amazon EC2 instances in the job flow. For a list of AMI versions - // supported by Amazon EMR, see AMI Versions Supported in EMR (http://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf#nameddest=ami-versions-supported) - // in the Amazon EMR Developer Guide. + // Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases + // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. AmiVersion *string `type:"string"` // An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. @@ -7041,11 +7057,12 @@ type JobFlowInstancesConfig struct { // The identifier of the Amazon EC2 security group for the slave nodes. EmrManagedSlaveSecurityGroup *string `type:"string"` - // The Hadoop version for the cluster. Valid inputs are "0.18" (deprecated), - // "0.20" (deprecated), "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". - // If you do not set this value, the default of 0.18 is used, unless the AmiVersion - // parameter is set in the RunJobFlow call, in which case the default version - // of Hadoop for that AMI version is used. + // Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop + // version for the cluster. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), + // "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". If you do not set + // this value, the default of 0.18 is used, unless the AmiVersion parameter + // is set in the RunJobFlow call, in which case the default version of Hadoop + // for that AMI version is used. HadoopVersion *string `type:"string"` // The number of EC2 instances in the cluster. @@ -8591,22 +8608,8 @@ type RunJobFlowInput struct { // A JSON string for selecting additional features. AdditionalInfo *string `type:"string"` - // For Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and - // later, the Linux AMI is determined by the ReleaseLabel specified or by CustomAmiID. - // The version of the Amazon Machine Image (AMI) to use when launching Amazon - // EC2 instances in the job flow. For details about the AMI versions currently - // supported in EMR version 3.x and 2.x, see AMI Versions Supported in EMR (emr/latest/DeveloperGuide/emr-dg.pdf#nameddest=ami-versions-supported) - // in the Amazon EMR Developer Guide. - // - // If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports - // both Hadoop 0.18 and 0.20), you can use the JobFlowInstancesConfigHadoopVersion - // parameter to modify the version of Hadoop from the defaults shown above. - // - // Previously, the EMR AMI version API parameter options allowed you to use - // latest for the latest AMI version rather than specify a numerical value. - // Some regions no longer support this deprecated option as they only have a - // newer release label version of EMR, which requires you to specify an EMR - // release label release (EMR 4.x or later). + // Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases + // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. AmiVersion *string `type:"string"` // For Amazon EMR releases 4.0 and later. A list of applications for the cluster. @@ -8698,8 +8701,14 @@ type RunJobFlowInput struct { // * "ganglia" - launch the cluster with the Ganglia Monitoring System installed. NewSupportedProducts []*SupportedProductConfig `type:"list"` - // The release label for the Amazon EMR release. For Amazon EMR 3.x and 2.x - // AMIs, use AmiVersion instead. + // The Amazon EMR release label, which determines the version of open-source + // application packages installed on the cluster. Release labels are in the + // form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, + // emr-5.14.0. For more information about Amazon EMR release versions and included + // application versions and features, see http://docs.aws.amazon.com/emr/latest/ReleaseGuide/ + // (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). The release label + // applies only to Amazon EMR releases versions 4.x and later. Earlier versions + // use AmiVersion. ReleaseLabel *string `type:"string"` // Applies only when CustomAmiID is used. Specifies which updates from the Amazon diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 81bab06bfac..33e20caddaf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -3378,6 +3378,102 @@ func (c *IAM) DeleteRoleWithContext(ctx aws.Context, input *DeleteRoleInput, opt return out, req.Send() } +const opDeleteRolePermissionsBoundary = "DeleteRolePermissionsBoundary" + +// DeleteRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRolePermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRolePermissionsBoundary for more information on using the DeleteRolePermissionsBoundary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRolePermissionsBoundaryRequest method. +// req, resp := client.DeleteRolePermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary +func (c *IAM) DeleteRolePermissionsBoundaryRequest(input *DeleteRolePermissionsBoundaryInput) (req *request.Request, output *DeleteRolePermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opDeleteRolePermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRolePermissionsBoundaryInput{} + } + + output = &DeleteRolePermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRolePermissionsBoundary API operation for AWS Identity and Access Management. +// +// Deletes the permissions boundary for the specified IAM role. +// +// Deleting the permissions boundary for a role might increase its permissions +// by allowing anyone who assumes the role to perform all the actions granted +// in its permissions policies. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Identity and Access Management's +// API operation DeleteRolePermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeUnmodifiableEntityException "UnmodifiableEntity" +// The request was rejected because only the service that depends on the service-linked +// role can modify or delete the role on your behalf. The error message includes +// the name of the service that depends on this service-linked role. You must +// request the change through that service. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary +func (c *IAM) DeleteRolePermissionsBoundary(input *DeleteRolePermissionsBoundaryInput) (*DeleteRolePermissionsBoundaryOutput, error) { + req, out := c.DeleteRolePermissionsBoundaryRequest(input) + return out, req.Send() +} + +// DeleteRolePermissionsBoundaryWithContext is the same as DeleteRolePermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRolePermissionsBoundary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IAM) DeleteRolePermissionsBoundaryWithContext(ctx aws.Context, input *DeleteRolePermissionsBoundaryInput, opts ...request.Option) (*DeleteRolePermissionsBoundaryOutput, error) { + req, out := c.DeleteRolePermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRolePolicy = "DeleteRolePolicy" // DeleteRolePolicyRequest generates a "aws/request.Request" representing the @@ -4158,6 +4254,96 @@ func (c *IAM) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opt return out, req.Send() } +const opDeleteUserPermissionsBoundary = "DeleteUserPermissionsBoundary" + +// DeleteUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteUserPermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteUserPermissionsBoundary for more information on using the DeleteUserPermissionsBoundary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteUserPermissionsBoundaryRequest method. +// req, resp := client.DeleteUserPermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary +func (c *IAM) DeleteUserPermissionsBoundaryRequest(input *DeleteUserPermissionsBoundaryInput) (req *request.Request, output *DeleteUserPermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opDeleteUserPermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteUserPermissionsBoundaryInput{} + } + + output = &DeleteUserPermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteUserPermissionsBoundary API operation for AWS Identity and Access Management. +// +// Deletes the permissions boundary for the specified IAM user. +// +// Deleting the permissions boundary for a user might increase its permissions +// by allowing the user to perform all the actions granted in its permissions +// policies. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Identity and Access Management's +// API operation DeleteUserPermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary +func (c *IAM) DeleteUserPermissionsBoundary(input *DeleteUserPermissionsBoundaryInput) (*DeleteUserPermissionsBoundaryOutput, error) { + req, out := c.DeleteUserPermissionsBoundaryRequest(input) + return out, req.Send() +} + +// DeleteUserPermissionsBoundaryWithContext is the same as DeleteUserPermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteUserPermissionsBoundary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IAM) DeleteUserPermissionsBoundaryWithContext(ctx aws.Context, input *DeleteUserPermissionsBoundaryInput, opts ...request.Option) (*DeleteUserPermissionsBoundaryOutput, error) { + req, out := c.DeleteUserPermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteUserPolicy = "DeleteUserPolicy" // DeleteUserPolicyRequest generates a "aws/request.Request" representing the @@ -10572,6 +10758,118 @@ func (c *IAM) PutGroupPolicyWithContext(ctx aws.Context, input *PutGroupPolicyIn return out, req.Send() } +const opPutRolePermissionsBoundary = "PutRolePermissionsBoundary" + +// PutRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the PutRolePermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutRolePermissionsBoundary for more information on using the PutRolePermissionsBoundary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutRolePermissionsBoundaryRequest method. +// req, resp := client.PutRolePermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary +func (c *IAM) PutRolePermissionsBoundaryRequest(input *PutRolePermissionsBoundaryInput) (req *request.Request, output *PutRolePermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opPutRolePermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutRolePermissionsBoundaryInput{} + } + + output = &PutRolePermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutRolePermissionsBoundary API operation for AWS Identity and Access Management. +// +// Adds or updates the policy that is specified as the IAM role's permissions +// boundary. You can use an AWS managed policy or a customer managed policy +// to set the boundary for a role. Use the boundary to control the maximum permissions +// that the role can have. Setting a permissions boundary is an advanced feature +// that can affect the permissions for the role. +// +// You cannot set the boundary for a service-linked role. +// +// Policies used as permissions boundaries do not provide permissions. You must +// also attach a permissions policy to the role. To learn how the effective +// permissions for a role are evaluated, see IAM JSON Policy Evaluation Logic +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// in the IAM User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Identity and Access Management's +// API operation PutRolePermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeUnmodifiableEntityException "UnmodifiableEntity" +// The request was rejected because only the service that depends on the service-linked +// role can modify or delete the role on your behalf. The error message includes +// the name of the service that depends on this service-linked role. You must +// request the change through that service. +// +// * ErrCodePolicyNotAttachableException "PolicyNotAttachable" +// The request failed because AWS service role policies can only be attached +// to the service-linked role for that service. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary +func (c *IAM) PutRolePermissionsBoundary(input *PutRolePermissionsBoundaryInput) (*PutRolePermissionsBoundaryOutput, error) { + req, out := c.PutRolePermissionsBoundaryRequest(input) + return out, req.Send() +} + +// PutRolePermissionsBoundaryWithContext is the same as PutRolePermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See PutRolePermissionsBoundary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IAM) PutRolePermissionsBoundaryWithContext(ctx aws.Context, input *PutRolePermissionsBoundaryInput, opts ...request.Option) (*PutRolePermissionsBoundaryOutput, error) { + req, out := c.PutRolePermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutRolePolicy = "PutRolePolicy" // PutRolePolicyRequest generates a "aws/request.Request" representing the @@ -10694,6 +10992,110 @@ func (c *IAM) PutRolePolicyWithContext(ctx aws.Context, input *PutRolePolicyInpu return out, req.Send() } +const opPutUserPermissionsBoundary = "PutUserPermissionsBoundary" + +// PutUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the +// client's request for the PutUserPermissionsBoundary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutUserPermissionsBoundary for more information on using the PutUserPermissionsBoundary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutUserPermissionsBoundaryRequest method. +// req, resp := client.PutUserPermissionsBoundaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary +func (c *IAM) PutUserPermissionsBoundaryRequest(input *PutUserPermissionsBoundaryInput) (req *request.Request, output *PutUserPermissionsBoundaryOutput) { + op := &request.Operation{ + Name: opPutUserPermissionsBoundary, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutUserPermissionsBoundaryInput{} + } + + output = &PutUserPermissionsBoundaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) + req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutUserPermissionsBoundary API operation for AWS Identity and Access Management. +// +// Adds or updates the policy that is specified as the IAM user's permissions +// boundary. You can use an AWS managed policy or a customer managed policy +// to set the boundary for a user. Use the boundary to control the maximum permissions +// that the user can have. Setting a permissions boundary is an advanced feature +// that can affect the permissions for the user. +// +// Policies that are used as permissions boundaries do not provide permissions. +// You must also attach a permissions policy to the user. To learn how the effective +// permissions for a user are evaluated, see IAM JSON Policy Evaluation Logic +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// in the IAM User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Identity and Access Management's +// API operation PutUserPermissionsBoundary for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced an entity that does not exist. +// The error message describes the entity. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodePolicyNotAttachableException "PolicyNotAttachable" +// The request failed because AWS service role policies can only be attached +// to the service-linked role for that service. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary +func (c *IAM) PutUserPermissionsBoundary(input *PutUserPermissionsBoundaryInput) (*PutUserPermissionsBoundaryOutput, error) { + req, out := c.PutUserPermissionsBoundaryRequest(input) + return out, req.Send() +} + +// PutUserPermissionsBoundaryWithContext is the same as PutUserPermissionsBoundary with the addition of +// the ability to pass a context and additional request options. +// +// See PutUserPermissionsBoundary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IAM) PutUserPermissionsBoundaryWithContext(ctx aws.Context, input *PutUserPermissionsBoundaryInput, opts ...request.Option) (*PutUserPermissionsBoundaryOutput, error) { + req, out := c.PutUserPermissionsBoundaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutUserPolicy = "PutUserPolicy" // PutUserPolicyRequest generates a "aws/request.Request" representing the @@ -12855,7 +13257,7 @@ func (c *IAM) UpdateServiceSpecificCredentialRequest(input *UpdateServiceSpecifi // // Sets the status of a service-specific credential to Active or Inactive. Service-specific // credentials that are inactive cannot be used for authentication to the service. -// This operation can be used to disable a user’s service-specific credential +// This operation can be used to disable a user's service-specific credential // as part of a credential rotation work flow. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -14129,6 +14531,49 @@ func (s AttachUserPolicyOutput) GoString() string { return s.String() } +// Contains information about an attached permissions boundary. +// +// An attached permissions boundary is a managed policy that has been attached +// to a user or role to set the permissions boundary. +// +// For more information about permissions boundaries, see Permissions Boundaries +// for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) +// in the IAM User Guide. +type AttachedPermissionsBoundary struct { + _ struct{} `type:"structure"` + + // The ARN of the policy used to set the permissions boundary for the user or + // role. + PermissionsBoundaryArn *string `min:"20" type:"string"` + + // The permissions boundary usage type that indicates what type of IAM resource + // is used as the permissions boundary for an entity. This data type can only + // have a value of Policy. + PermissionsBoundaryType *string `type:"string" enum:"PermissionsBoundaryAttachmentType"` +} + +// String returns the string representation +func (s AttachedPermissionsBoundary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachedPermissionsBoundary) GoString() string { + return s.String() +} + +// SetPermissionsBoundaryArn sets the PermissionsBoundaryArn field's value. +func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryArn(v string) *AttachedPermissionsBoundary { + s.PermissionsBoundaryArn = &v + return s +} + +// SetPermissionsBoundaryType sets the PermissionsBoundaryType field's value. +func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryType(v string) *AttachedPermissionsBoundary { + s.PermissionsBoundaryType = &v + return s +} + // Contains information about an attached policy. // // An attached policy is a managed policy that has been attached to a user, @@ -15180,6 +15625,10 @@ type CreateRoleInput struct { // letters. Path *string `min:"1" type:"string"` + // The ARN of the policy that is used to set the permissions boundary for the + // role. + PermissionsBoundary *string `min:"20" type:"string"` + // The name of the role to create. // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) @@ -15218,6 +15667,9 @@ func (s *CreateRoleInput) Validate() error { if s.Path != nil && len(*s.Path) < 1 { invalidParams.Add(request.NewErrParamMinLen("Path", 1)) } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } if s.RoleName == nil { invalidParams.Add(request.NewErrParamRequired("RoleName")) } @@ -15255,6 +15707,12 @@ func (s *CreateRoleInput) SetPath(v string) *CreateRoleInput { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *CreateRoleInput) SetPermissionsBoundary(v string) *CreateRoleInput { + s.PermissionsBoundary = &v + return s +} + // SetRoleName sets the RoleName field's value. func (s *CreateRoleInput) SetRoleName(v string) *CreateRoleInput { s.RoleName = &v @@ -15579,6 +16037,10 @@ type CreateUserInput struct { // letters. Path *string `min:"1" type:"string"` + // The ARN of the policy that is used to set the permissions boundary for the + // user. + PermissionsBoundary *string `min:"20" type:"string"` + // The name of the user to create. // // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) @@ -15607,6 +16069,9 @@ func (s *CreateUserInput) Validate() error { if s.Path != nil && len(*s.Path) < 1 { invalidParams.Add(request.NewErrParamMinLen("Path", 1)) } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } @@ -15626,6 +16091,12 @@ func (s *CreateUserInput) SetPath(v string) *CreateUserInput { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *CreateUserInput) SetPermissionsBoundary(v string) *CreateUserInput { + s.PermissionsBoundary = &v + return s +} + // SetUserName sets the UserName field's value. func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { s.UserName = &v @@ -16418,8 +16889,73 @@ func (s *DeletePolicyVersionInput) Validate() error { if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) + if s.VersionId == nil { + invalidParams.Add(request.NewErrParamRequired("VersionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *DeletePolicyVersionInput) SetPolicyArn(v string) *DeletePolicyVersionInput { + s.PolicyArn = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *DeletePolicyVersionInput) SetVersionId(v string) *DeletePolicyVersionInput { + s.VersionId = &v + return s +} + +type DeletePolicyVersionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePolicyVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePolicyVersionOutput) GoString() string { + return s.String() +} + +type DeleteRoleInput struct { + _ struct{} `type:"structure"` + + // The name of the role to delete. + // + // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters consisting of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRoleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRoleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) } if invalidParams.Len() > 0 { @@ -16428,58 +16964,49 @@ func (s *DeletePolicyVersionInput) Validate() error { return nil } -// SetPolicyArn sets the PolicyArn field's value. -func (s *DeletePolicyVersionInput) SetPolicyArn(v string) *DeletePolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeletePolicyVersionInput) SetVersionId(v string) *DeletePolicyVersionInput { - s.VersionId = &v +// SetRoleName sets the RoleName field's value. +func (s *DeleteRoleInput) SetRoleName(v string) *DeleteRoleInput { + s.RoleName = &v return s } -type DeletePolicyVersionOutput struct { +type DeleteRoleOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeletePolicyVersionOutput) String() string { +func (s DeleteRoleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeletePolicyVersionOutput) GoString() string { +func (s DeleteRoleOutput) GoString() string { return s.String() } -type DeleteRoleInput struct { +type DeleteRolePermissionsBoundaryInput struct { _ struct{} `type:"structure"` - // The name of the role to delete. - // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name (friendly name, not ARN) of the IAM role from which you want to + // remove the permissions boundary. // // RoleName is a required field RoleName *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s DeleteRoleInput) String() string { +func (s DeleteRolePermissionsBoundaryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRoleInput) GoString() string { +func (s DeleteRolePermissionsBoundaryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRoleInput"} +func (s *DeleteRolePermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRolePermissionsBoundaryInput"} if s.RoleName == nil { invalidParams.Add(request.NewErrParamRequired("RoleName")) } @@ -16494,22 +17021,22 @@ func (s *DeleteRoleInput) Validate() error { } // SetRoleName sets the RoleName field's value. -func (s *DeleteRoleInput) SetRoleName(v string) *DeleteRoleInput { +func (s *DeleteRolePermissionsBoundaryInput) SetRoleName(v string) *DeleteRolePermissionsBoundaryInput { s.RoleName = &v return s } -type DeleteRoleOutput struct { +type DeleteRolePermissionsBoundaryOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteRoleOutput) String() string { +func (s DeleteRolePermissionsBoundaryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRoleOutput) GoString() string { +func (s DeleteRolePermissionsBoundaryOutput) GoString() string { return s.String() } @@ -17067,6 +17594,62 @@ func (s DeleteUserOutput) GoString() string { return s.String() } +type DeleteUserPermissionsBoundaryInput struct { + _ struct{} `type:"structure"` + + // The name (friendly name, not ARN) of the IAM user from which you want to + // remove the permissions boundary. + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteUserPermissionsBoundaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserPermissionsBoundaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserPermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserPermissionsBoundaryInput"} + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetUserName sets the UserName field's value. +func (s *DeleteUserPermissionsBoundaryInput) SetUserName(v string) *DeleteUserPermissionsBoundaryInput { + s.UserName = &v + return s +} + +type DeleteUserPermissionsBoundaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteUserPermissionsBoundaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserPermissionsBoundaryOutput) GoString() string { + return s.String() +} + type DeleteUserPolicyInput struct { _ struct{} `type:"structure"` @@ -19530,6 +20113,23 @@ type GetUserOutput struct { // A structure containing details about the IAM user. // + // Due to a service issue, password last used data does not include password + // use from May 3rd 2018 22:50 PDT to May 23rd 2018 14:08 PDT. This affects + // last sign-in (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) + // dates shown in the IAM console and password last used dates in the IAM credential + // report (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html), + // and returned by this GetUser API. If users signed in during the affected + // time, the password last used date that is returned is the date the user last + // signed in before May 3rd 2018. For users that signed in after May 23rd 2018 + // 14:08 PDT, the returned password last used date is accurate. + // + // If you use password last used information to identify unused credentials + // for deletion, such as deleting users who did not sign in to AWS in the last + // 90 days, we recommend that you adjust your evaluation window to include dates + // after May 23rd 2018. Alternatively, if your users use access keys to access + // AWS programmatically you can refer to access key last used information because + // it is accurate for all dates. + // // User is a required field User *User `type:"structure" required:"true"` } @@ -20655,6 +21255,15 @@ type ListEntitiesForPolicyInput struct { // // PolicyArn is a required field PolicyArn *string `min:"20" type:"string" required:"true"` + + // The policy usage method to use for filtering the results. + // + // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. + // To list only the policies used to set permissions boundaries, set the value + // to PermissionsBoundary. + // + // This parameter is optional. If it is not included, all policies are returned. + PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` } // String returns the string representation @@ -20722,6 +21331,12 @@ func (s *ListEntitiesForPolicyInput) SetPolicyArn(v string) *ListEntitiesForPoli return s } +// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. +func (s *ListEntitiesForPolicyInput) SetPolicyUsageFilter(v string) *ListEntitiesForPolicyInput { + s.PolicyUsageFilter = &v + return s +} + // Contains the response to a successful ListEntitiesForPolicy request. type ListEntitiesForPolicyOutput struct { _ struct{} `type:"structure"` @@ -21642,6 +22257,15 @@ type ListPoliciesInput struct { // letters. PathPrefix *string `type:"string"` + // The policy usage method to use for filtering the results. + // + // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. + // To list only the policies used to set permissions boundaries, set the value + // to PermissionsBoundary. + // + // This parameter is optional. If it is not included, all policies are returned. + PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` + // The scope to use for filtering the results. // // To list only AWS managed policies, set Scope to AWS. To list only the customer @@ -21702,6 +22326,12 @@ func (s *ListPoliciesInput) SetPathPrefix(v string) *ListPoliciesInput { return s } +// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. +func (s *ListPoliciesInput) SetPolicyUsageFilter(v string) *ListPoliciesInput { + s.PolicyUsageFilter = &v + return s +} + // SetScope sets the Scope field's value. func (s *ListPoliciesInput) SetScope(v string) *ListPoliciesInput { s.Scope = &v @@ -23171,6 +23801,14 @@ type ManagedPolicyDetail struct { // in the Using IAM guide. Path *string `type:"string"` + // The number of entities (users and roles) for which the policy is used as + // the permissions boundary. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundaryUsageCount *int64 `type:"integer"` + // The stable and unique string identifying the policy. // // For more information about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -23245,6 +23883,12 @@ func (s *ManagedPolicyDetail) SetPath(v string) *ManagedPolicyDetail { return s } +// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. +func (s *ManagedPolicyDetail) SetPermissionsBoundaryUsageCount(v int64) *ManagedPolicyDetail { + s.PermissionsBoundaryUsageCount = &v + return s +} + // SetPolicyId sets the PolicyId field's value. func (s *ManagedPolicyDetail) SetPolicyId(v string) *ManagedPolicyDetail { s.PolicyId = &v @@ -23478,6 +24122,14 @@ type Policy struct { // in the Using IAM guide. Path *string `type:"string"` + // The number of entities (users and roles) for which the policy is used to + // set the permissions boundary. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundaryUsageCount *int64 `type:"integer"` + // The stable and unique string identifying the policy. // // For more information about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -23549,6 +24201,12 @@ func (s *Policy) SetPath(v string) *Policy { return s } +// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. +func (s *Policy) SetPermissionsBoundaryUsageCount(v int64) *Policy { + s.PermissionsBoundaryUsageCount = &v + return s +} + // SetPolicyId sets the PolicyId field's value. func (s *Policy) SetPolicyId(v string) *Policy { s.PolicyId = &v @@ -23947,6 +24605,80 @@ func (s PutGroupPolicyOutput) GoString() string { return s.String() } +type PutRolePermissionsBoundaryInput struct { + _ struct{} `type:"structure"` + + // The ARN of the policy that is used to set the permissions boundary for the + // role. + // + // PermissionsBoundary is a required field + PermissionsBoundary *string `min:"20" type:"string" required:"true"` + + // The name (friendly name, not ARN) of the IAM role for which you want to set + // the permissions boundary. + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutRolePermissionsBoundaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRolePermissionsBoundaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRolePermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRolePermissionsBoundaryInput"} + if s.PermissionsBoundary == nil { + invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) + } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *PutRolePermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutRolePermissionsBoundaryInput { + s.PermissionsBoundary = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *PutRolePermissionsBoundaryInput) SetRoleName(v string) *PutRolePermissionsBoundaryInput { + s.RoleName = &v + return s +} + +type PutRolePermissionsBoundaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutRolePermissionsBoundaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRolePermissionsBoundaryOutput) GoString() string { + return s.String() +} + type PutRolePolicyInput struct { _ struct{} `type:"structure"` @@ -24056,6 +24788,80 @@ func (s PutRolePolicyOutput) GoString() string { return s.String() } +type PutUserPermissionsBoundaryInput struct { + _ struct{} `type:"structure"` + + // The ARN of the policy that is used to set the permissions boundary for the + // user. + // + // PermissionsBoundary is a required field + PermissionsBoundary *string `min:"20" type:"string" required:"true"` + + // The name (friendly name, not ARN) of the IAM user for which you want to set + // the permissions boundary. + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutUserPermissionsBoundaryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutUserPermissionsBoundaryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutUserPermissionsBoundaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutUserPermissionsBoundaryInput"} + if s.PermissionsBoundary == nil { + invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) + } + if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *PutUserPermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutUserPermissionsBoundaryInput { + s.PermissionsBoundary = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *PutUserPermissionsBoundaryInput) SetUserName(v string) *PutUserPermissionsBoundaryInput { + s.UserName = &v + return s +} + +type PutUserPermissionsBoundaryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutUserPermissionsBoundaryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutUserPermissionsBoundaryOutput) GoString() string { + return s.String() +} + type PutUserPolicyInput struct { _ struct{} `type:"structure"` @@ -24731,6 +25537,13 @@ type Role struct { // Path is a required field Path *string `min:"1" type:"string" required:"true"` + // The ARN of the policy used to set the permissions boundary for the role. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the role. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -24790,6 +25603,12 @@ func (s *Role) SetPath(v string) *Role { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *Role) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *Role { + s.PermissionsBoundary = v + return s +} + // SetRoleId sets the RoleId field's value. func (s *Role) SetRoleId(v string) *Role { s.RoleId = &v @@ -24835,6 +25654,13 @@ type RoleDetail struct { // in the Using IAM guide. Path *string `min:"1" type:"string"` + // The ARN of the policy used to set the permissions boundary for the role. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the role. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -24894,6 +25720,12 @@ func (s *RoleDetail) SetPath(v string) *RoleDetail { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *RoleDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *RoleDetail { + s.PermissionsBoundary = v + return s +} + // SetRoleId sets the RoleId field's value. func (s *RoleDetail) SetRoleId(v string) *RoleDetail { s.RoleId = &v @@ -25733,15 +26565,19 @@ type SimulateCustomPolicyInput struct { // instance, image, security-group, network-interface, subnet, volume ResourceHandlingOption *string `min:"1" type:"string"` - // An AWS account ID that specifies the owner of any simulated resource that - // does not identify its owner in the resource ARN, such as an S3 bucket or - // object. If ResourceOwner is specified, it is also used as the account owner - // of any ResourcePolicy included in the simulation. If the ResourceOwner parameter - // is not specified, then the owner of the resources and the resource policy - // defaults to the account of the identity provided in CallerArn. This parameter - // is required only if you specify a resource-based policy and account that - // owns the resource is different from the account that owns the simulated calling - // user CallerArn. + // An ARN representing the AWS account ID that specifies the owner of any simulated + // resource that does not identify its owner in the resource ARN, such as an + // S3 bucket or object. If ResourceOwner is specified, it is also used as the + // account owner of any ResourcePolicy included in the simulation. If the ResourceOwner + // parameter is not specified, then the owner of the resources and the resource + // policy defaults to the account of the identity provided in CallerArn. This + // parameter is required only if you specify a resource-based policy and account + // that owns the resource is different from the account that owns the simulated + // calling user CallerArn. + // + // The ARN for an account uses the following syntax: arn:aws:iam::AWS-account-ID:root. + // For example, to represent the account with the 112233445566 ID, use the following + // ARN: arn:aws:iam::112233445566-ID:root. ResourceOwner *string `min:"1" type:"string"` // A resource-based policy to include in the simulation provided as a string. @@ -27623,7 +28459,9 @@ type UploadSSHPublicKeyInput struct { _ struct{} `type:"structure"` // The SSH public key. The public key must be encoded in ssh-rsa format or PEM - // format. + // format. The miminum bit-length of the public key is 2048 bits. For example, + // you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes + // long. // // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this // parameter is a string of characters consisting of the following: @@ -28047,6 +28885,13 @@ type User struct { // Path is a required field Path *string `min:"1" type:"string" required:"true"` + // The ARN of the policy used to set the permissions boundary for the user. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the user. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -28094,6 +28939,12 @@ func (s *User) SetPath(v string) *User { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *User) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *User { + s.PermissionsBoundary = v + return s +} + // SetUserId sets the UserId field's value. func (s *User) SetUserId(v string) *User { s.UserId = &v @@ -28136,6 +28987,13 @@ type UserDetail struct { // in the Using IAM guide. Path *string `min:"1" type:"string"` + // The ARN of the policy used to set the permissions boundary for the user. + // + // For more information about permissions boundaries, see Permissions Boundaries + // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // in the IAM User Guide. + PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // The stable and unique string identifying the user. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -28188,6 +29046,12 @@ func (s *UserDetail) SetPath(v string) *UserDetail { return s } +// SetPermissionsBoundary sets the PermissionsBoundary field's value. +func (s *UserDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *UserDetail { + s.PermissionsBoundary = v + return s +} + // SetUserId sets the UserId field's value. func (s *UserDetail) SetUserId(v string) *UserDetail { s.UserId = &v @@ -28345,6 +29209,11 @@ const ( EntityTypeAwsmanagedPolicy = "AWSManagedPolicy" ) +const ( + // PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy is a PermissionsBoundaryAttachmentType enum value + PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy = "PermissionsBoundaryPolicy" +) + const ( // PolicyEvaluationDecisionTypeAllowed is a PolicyEvaluationDecisionType enum value PolicyEvaluationDecisionTypeAllowed = "allowed" @@ -28379,6 +29248,20 @@ const ( PolicySourceTypeNone = "none" ) +// The policy usage type that indicates whether the policy is used as a permissions +// policy or as the permissions boundary for an entity. +// +// For more information about permissions boundaries, see Permissions Boundaries +// for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) +// in the IAM User Guide. +const ( + // PolicyUsageTypePermissionsPolicy is a PolicyUsageType enum value + PolicyUsageTypePermissionsPolicy = "PermissionsPolicy" + + // PolicyUsageTypePermissionsBoundary is a PolicyUsageType enum value + PolicyUsageTypePermissionsBoundary = "PermissionsBoundary" +) + const ( // ReportFormatTypeTextCsv is a ReportFormatType enum value ReportFormatTypeTextCsv = "text/csv" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index a5c51bbe71e..523f6b601c3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -10167,6 +10167,7 @@ type FilterRule struct { // the filtering rule applies. Maximum prefix length can be up to 1,024 characters. // Overlapping prefixes and suffixes are not supported. For more information, // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Name *string `type:"string" enum:"FilterRuleName"` Value *string `type:"string"` @@ -13025,7 +13026,7 @@ type InputSerialization struct { // Describes the serialization of a CSV-encoded object. CSV *CSVInput `type:"structure"` - // Specifies object's compression format. Valid values: NONE, GZIP. Default + // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default // Value: NONE. CompressionType *string `type:"string" enum:"CompressionType"` @@ -13531,6 +13532,7 @@ type LambdaFunctionConfiguration struct { // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` // Optional unique identifier for configurations in a notification configuration. @@ -15978,7 +15980,8 @@ type NoncurrentVersionExpiration struct { // Specifies the number of days an object is noncurrent before Amazon S3 can // perform the associated action. For information about the noncurrent days // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent - // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) + // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in + // the Amazon Simple Storage Service Developer Guide. NoncurrentDays *int64 `type:"integer"` } @@ -16010,7 +16013,8 @@ type NoncurrentVersionTransition struct { // Specifies the number of days an object is noncurrent before Amazon S3 can // perform the associated action. For information about the noncurrent days // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent - // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) + // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in + // the Amazon Simple Storage Service Developer Guide. NoncurrentDays *int64 `type:"integer"` // The class of storage used to store the object. @@ -16159,6 +16163,7 @@ func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConf // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) +// in the Amazon Simple Storage Service Developer Guide. type NotificationConfigurationFilter struct { _ struct{} `type:"structure"` @@ -18744,6 +18749,7 @@ type QueueConfiguration struct { // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` // Optional unique identifier for configurations in a notification configuration. @@ -19915,7 +19921,7 @@ func (r *readSelectObjectContentEventStream) unmarshalerForEventType( // Amazon S3 uses this to parse object data into records, and returns only records // that match the specified SQL expression. You must also specify the data serialization // format for the response. For more information, go to S3Select API Documentation -// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html) +// (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html). type SelectObjectContentInput struct { _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` @@ -19953,15 +19959,15 @@ type SelectObjectContentInput struct { RequestProgress *RequestProgress `type:"structure"` // The SSE Algorithm used to encrypt the object. For more information, go to - // Server-Side Encryption (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) + // Server-Side Encryption (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` // The SSE Customer Key. For more information, go to Server-Side Encryption - // (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) + // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` // The SSE Customer Key MD5. For more information, go to Server-Side Encryption - // (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) + // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` } @@ -20760,6 +20766,7 @@ type TopicConfiguration struct { // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` // Optional unique identifier for configurations in a notification configuration. @@ -21693,6 +21700,9 @@ const ( // CompressionTypeGzip is a CompressionType enum value CompressionTypeGzip = "GZIP" + + // CompressionTypeBzip2 is a CompressionType enum value + CompressionTypeBzip2 = "BZIP2" ) // Requests Amazon S3 to encode the object keys in the response and specifies diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index 25be676e944..4b6bf323e80 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -28745,10 +28745,23 @@ type StepExecution struct { // Fully-resolved values passed into the step before execution. Inputs map[string]*string `type:"map"` + // Enable this option to designate a step as critical for the successful completion + // of the Automation. If a step with this designation fails, then Automation + // reports the final status of the Automation as Failed. + IsCritical *bool `type:"boolean"` + + // Enable this option to stop an Automation execution at the end of a specific + // step. The Automation execution stops if the step execution failed or succeeded. + IsEnd *bool `type:"boolean"` + // The maximum number of tries to run the action of the step. The default value // is 1. MaxAttempts *int64 `type:"integer"` + // Specifies which step in an Automation to process next after successfully + // completing a step. + NextStep *string `type:"string"` + // The action to take if the step fails. The default value is Abort. OnFailure *string `type:"string"` @@ -28776,6 +28789,16 @@ type StepExecution struct { // The timeout seconds of the step. TimeoutSeconds *int64 `type:"long"` + + // ValidNextSteps offer different strategies for managing an Automation workflow + // when a step finishes. Automation dynamically processes ValidNextSteps when + // a step is completed. For example, you can specify Abort to stop the Automation + // when a step fails or Continue to ignore the failure of the current step and + // allow Automation to continue processing the next step. You can also specify + // step:step_name to jump to a designated step after a step succeeds. The result + // of the current step dynamically determines the ValidNextSteps. If a step + // finishes and no ValidNextStep is designated, then the Automation stops. + ValidNextSteps []*string `type:"list"` } // String returns the string representation @@ -28824,12 +28847,30 @@ func (s *StepExecution) SetInputs(v map[string]*string) *StepExecution { return s } +// SetIsCritical sets the IsCritical field's value. +func (s *StepExecution) SetIsCritical(v bool) *StepExecution { + s.IsCritical = &v + return s +} + +// SetIsEnd sets the IsEnd field's value. +func (s *StepExecution) SetIsEnd(v bool) *StepExecution { + s.IsEnd = &v + return s +} + // SetMaxAttempts sets the MaxAttempts field's value. func (s *StepExecution) SetMaxAttempts(v int64) *StepExecution { s.MaxAttempts = &v return s } +// SetNextStep sets the NextStep field's value. +func (s *StepExecution) SetNextStep(v string) *StepExecution { + s.NextStep = &v + return s +} + // SetOnFailure sets the OnFailure field's value. func (s *StepExecution) SetOnFailure(v string) *StepExecution { s.OnFailure = &v @@ -28884,6 +28925,12 @@ func (s *StepExecution) SetTimeoutSeconds(v int64) *StepExecution { return s } +// SetValidNextSteps sets the ValidNextSteps field's value. +func (s *StepExecution) SetValidNextSteps(v []*string) *StepExecution { + s.ValidNextSteps = v + return s +} + // A filter to limit the amount of step execution information returned by the // call. type StepExecutionFilter struct { diff --git a/vendor/vendor.json b/vendor/vendor.json index b35d5753023..e4aa88f2e6f 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,980 +39,988 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "ZfB35vNNj+4AXCsW5UbYY8Pogwg=", + "checksumSHA1": "uwTg0AHlK9Mt3NIjhzf/LpmDnH4=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "925zPp8gtaXi2gkWrgZ1gAA003A=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=", + "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "GTdSvwEbZz636RtRQDrQMOU9q9Q=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "pDnK93CqjQ4ROSW8Y/RuHXjv52M=", + "checksumSHA1": "uPkjJo+J10vbEukYYXmf0w7Cn4Q=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Q1co3y5Y8rRIEjEXEfUZ9SwTmic=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "CYLheDSqXftEAmmdj+tTiT+83Ko=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "zx1mZCdOwgbjBV3jMfb0kyDd//Q=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "u3cA2IiD36A+VnFIH7XtGjYk2NU=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" + }, + { + "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", + "path": "github.com/aws/aws-sdk-go/internal/sdkuri", + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Ij9RP5HrBWBYYb3/LEMHNNZXH9g=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "yHfT5DTbeCLs4NE2Rgnqrhe15ls=", + "checksumSHA1": "ftqeTvBbv+e/ozhnlAgbO1CEbLs=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "/2Ppb4vP/H+B3cM7bOOEeA7Z0iY=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "cW7mfCta/3RjWAsEn4BeJKe8TdI=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "d8MH0CgeCpRAQTFIjcEaPFDXw0w=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "k1TqEWHeP84mmRewv19ZVORhSm8=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "MKWkj+pGwGygVTVTg/Q38JY+mhU=", + "checksumSHA1": "OsJUdGg5DvY7vtvPfGcixbKX3kQ=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "RpzI2CVxVXCkMK0Tuhc54YvyoqE=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "NaaFnxUCj2cKaWagwc9ZP6Su2UQ=", + "checksumSHA1": "owhfVKeKxjXt4P5KO6PSIjnMLIA=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "/nF1VEl/Y9I9EYbUHvUuhqjipUk=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "kko+es9ly+l/e9ngcpCdPx2DBAc=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "kHOf0VEd2Qy8PYZsg7/zG+JkF1o=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "gJiK41PSoCEfE02VEry4f6nBg0s=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "bbCNma+YJRqcjnIqmTagqs1IwWI=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "bupt0rs/P2QN+iuFeFC7oY1HZ14=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "P8cLAj/ovFt7uH3bB4dRg/2KApI=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "eCrAi2QJw0Ft6A8XK5ZGLpsPKwM=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "ItkRLsVGZt8uvkI4+7+mi9Ccy28=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Y+x1N7TFB7OesWPRoYXRwGOdQzs=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "PxsIahbkFuks12VthBlqFJIUzX0=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "ciAsJhe41ygl47dhStzMJfGVFPQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "ogQG+VXR3g5K6O09wFSsPp0g7fs=", + "checksumSHA1": "SZxCqkGWIvyq5Rtl0haxfOgwKdE=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Q+W+AVveTI7xM3ay6HAi0FB4Dpc=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "6lozLpoMkQvw1r2cZMXujYiLqK8=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "JNLWxWRvZ8UNPV8nWHgzIybuMuE=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "iPP1QQAsTiK0TYWVn7ksDLfDXDE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "JbgQL/r+cBKIKt+tQY8VSj0C2j8=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "orboEPrXFUPc3m7ZG8uPhZNZDdM=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "spYFA1gAmUHAUFd24v2xwMOLxrY=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "/zBS/FARxFnNMfLUg1Vq1FVK95c=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "olDBindEWwTHzKfpWaS+xID4y90=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "i7fuDfXYhe4JMJhail5nZUg69Dk=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "jURA8oKlQkbYPPrBQIeOPbQAVN0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "GFq6SaQ4h48iP+gjllWjMyIbQfU=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "aBYDdFhx/8bxKl0l++Gh2P2+4eM=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "T4Yw3GPZg+KwAEudsypRfhbUrVw=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "niBN6QYBEhoHvxQpSH8qWjEMNYo=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "cmqLlPyg/fwIy8M3qaZTdBt0CGQ=", + "checksumSHA1": "UuBR+vag1picSiwj3T5mcl1a0Jc=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "mzgRjocmzU6VLUsim7E8/fffffk=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "A5DCzVFhE5iT60fQXjlyLDHKFsg=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "K0yPG0O4/Wv2pYASbxO6LjH8318=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "aNIs4oJTp3x73Fx24tKO2cDY5OM=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "cRuJDtc9rVpXUqfLrg1cJleaPjQ=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "XKNeVP6DCohd9Re9g4xGLuqXe0c=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "MWADuSvEQnYoVAI/HCnmJetMle4=", + "checksumSHA1": "Xv0Wj758E+E1a+cBdH2xy15wuOU=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "X+8twdJk/x1+8y1LxnKXXd3eVoY=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "PJQ5SFC+Ai5Mqn8rfGhuwttfqZk=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "xI94HsdAG+dBFCm38FoELBdbe9c=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "FEfr6yYlSRWsIV0M0kxm0/jOw0E=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "KWE5gG/M/Fz9tnmcFgGPphwwX2Y=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "1tAb3rvB34c3zsX+DRY5xDJqNUA=", + "checksumSHA1": "vbd5sSkaWFvxpM//BkS7IQffm5U=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "si/Re/DEfX8xWIjpLS4NNISO/Ns=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Q2K/MWy6yy/kV9CZ0YhaEHBNgkI=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "OvCoIYyhBSlrCvsk8uidGznXIss=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "44R3VB9KreeYj0LFf3KBd37kPXI=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "rwHYPohmwgbKTkEpVoR3PtvqU28=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "zrWHv2XG/KP9E82ophSO0XF+Cu8=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "xq1jxTLdjjWU+aupMh143C+Yb1Q=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "8p+iBG3V+xlFkx+j4QJrjRsRWCk=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "HoX+EX8JW8kDZxJAs8545YRfjuI=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "ahm1SzqWwGUqPih6jPZwIevl2Pg=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "0YZZzbKYjappFNT8MUR5qNGQkRY=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "rrANYUKEHHEofZJYCP1pQhO35TE=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "p/+jOAMB5MSAnPloxJIFy77Hfck=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "W6AvJYPtvCLTeA0USbhvid2rP1o=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "x3PsW91a7fh+Q466y3WM3fdtnGg=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Davg8yRIMOcfa7/6zp7Fj6GnpuA=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "RfTumx3C/ryCRp8ACLwhfnF+Cw0=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "wLRUH2H2vTS7yMgnCqhMcZ8GvWc=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "oe9xtK3GMCwCDmra0+JC6GwJ99k=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "1qeG+wA9KLSzxwsAYd+e0LZTtPY=", + "checksumSHA1": "kDpS3awFGJ29i8/crTXFM20AEcU=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "0U6ukhqF23CsyO8oOX2vqWCAEoY=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "JqG/wC6zOGiK99YlSy31DADaV5w=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "x2vfgk/EnGjOWPywWL+LKJKYCF0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Z61MRqI0vu8oGAaCZSCDes9gIvk=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "TPGJU1VzYOhJIdTbWal1ivDwT+4=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "7kmVHadImICOa4/MOXErR53CdbQ=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { - "checksumSHA1": "dNqHygRKji7C2fk9m04roQovors=", + "checksumSHA1": "6QZEYfLhDmYpeqGlClYSZkYnvjY=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "uguCtF1eoCG71dvEVqrYbFs7py0=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "vlL9ibWgidiPj0uQ2L/OF6DCVEs=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "Ro5RX6aw32UGrGueBK+zhA8+Z30=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "UGQwnAeB9SoJKyPPIpbDJVQws5g=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "eeb327a02aac261d701e102e14993eae4d5ab844", - "revisionTime": "2018-07-10T21:25:17Z", - "version": "v1.14.24", - "versionExact": "v1.14.24" + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From 919eee83143a2895901e83b95c5db620b8d04666 Mon Sep 17 00:00:00 2001 From: Boris Schrijver Date: Fri, 13 Jul 2018 12:35:27 +0200 Subject: [PATCH 1837/3316] [GLUE] Add missing quote to Glue example --- website/docs/r/glue_crawler.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/glue_crawler.html.markdown b/website/docs/r/glue_crawler.html.markdown index 9d2eeca4bb4..e78ed11d689 100644 --- a/website/docs/r/glue_crawler.html.markdown +++ b/website/docs/r/glue_crawler.html.markdown @@ -36,7 +36,7 @@ resource "aws_glue_crawler" "example" { role = "${aws_iam_role.example.name}" s3_target { - path = "s3://${aws_s3_bucket.example.bucket} + path = "s3://${aws_s3_bucket.example.bucket}" } } ``` From e73566d52dae6da7b71ef9067e3f93a9d28c1bee Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 10:59:41 -0400 Subject: [PATCH 1838/3316] efs: Handle aws-sdk-go@v1.14.26 renaming of FileSystemDescription to UpsteFileSystemOutput --- aws/data_source_aws_efs_file_system.go | 2 +- aws/resource_aws_efs_file_system.go | 2 +- aws/resource_aws_efs_file_system_test.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/data_source_aws_efs_file_system.go b/aws/data_source_aws_efs_file_system.go index ab518d6f80c..3958cdbffe5 100644 --- a/aws/data_source_aws_efs_file_system.go +++ b/aws/data_source_aws_efs_file_system.go @@ -105,7 +105,7 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er return err } - var fs *efs.FileSystemDescription + var fs *efs.UpdateFileSystemOutput for _, f := range describeResp.FileSystems { if d.Id() == *f.FileSystemId { fs = f diff --git a/aws/resource_aws_efs_file_system.go b/aws/resource_aws_efs_file_system.go index b842e506c97..3674c911802 100644 --- a/aws/resource_aws_efs_file_system.go +++ b/aws/resource_aws_efs_file_system.go @@ -221,7 +221,7 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro return err } - var fs *efs.FileSystemDescription + var fs *efs.UpdateFileSystemOutput for _, f := range resp.FileSystems { if d.Id() == *f.FileSystemId { fs = f diff --git a/aws/resource_aws_efs_file_system_test.go b/aws/resource_aws_efs_file_system_test.go index 5717c3a709a..58ddebecfda 100644 --- a/aws/resource_aws_efs_file_system_test.go +++ b/aws/resource_aws_efs_file_system_test.go @@ -34,7 +34,7 @@ func TestResourceAWSEFSFileSystem_validateReferenceName(t *testing.T) { func TestResourceAWSEFSFileSystem_hasEmptyFileSystems(t *testing.T) { fs := &efs.DescribeFileSystemsOutput{ - FileSystems: []*efs.FileSystemDescription{}, + FileSystems: []*efs.UpdateFileSystemOutput{}, } var actual bool @@ -45,7 +45,7 @@ func TestResourceAWSEFSFileSystem_hasEmptyFileSystems(t *testing.T) { } // Add an empty file system. - fs.FileSystems = append(fs.FileSystems, &efs.FileSystemDescription{}) + fs.FileSystems = append(fs.FileSystems, &efs.UpdateFileSystemOutput{}) actual = hasEmptyFileSystems(fs) if actual { From e1aa889e58097edcfe0a5863b840b425fe2825d3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 16 Feb 2018 08:13:41 -0500 Subject: [PATCH 1839/3316] Fix issue with parallel calls to 'ModifyVpcEndpoint'. --- ...rce_aws_vpc_endpoint_subnet_association.go | 25 +++++- ...ws_vpc_endpoint_subnet_association_test.go | 87 +++++++++++++++++-- 2 files changed, 100 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_vpc_endpoint_subnet_association.go b/aws/resource_aws_vpc_endpoint_subnet_association.go index 1fe3c4a1898..ee5b753be82 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association.go @@ -3,11 +3,13 @@ package aws import ( "fmt" "log" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -46,10 +48,25 @@ func resourceAwsVpcEndpointSubnetAssociationCreate(d *schema.ResourceData, meta return err } - _, err = conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - AddSubnetIds: aws.StringSlice([]string{snId}), - }) + // See https://github.com/terraform-providers/terraform-provider-aws/issues/3382. + // Prevent concurrent subnet association requests and delay between requests. + mk := "vpc_endpoint_subnet_association_" + endpointId + awsMutexKV.Lock(mk) + defer awsMutexKV.Unlock(mk) + + c := &resource.StateChangeConf{ + Delay: 1 * time.Minute, + Timeout: 3 * time.Minute, + Target: []string{"ok"}, + Refresh: func() (interface{}, string, error) { + res, err := conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ + VpcEndpointId: aws.String(endpointId), + AddSubnetIds: aws.StringSlice([]string{snId}), + }) + return res, "ok", err + }, + } + _, err = c.WaitForState() if err != nil { return fmt.Errorf("Error creating Vpc Endpoint/Subnet association: %s", err.Error()) } diff --git a/aws/resource_aws_vpc_endpoint_subnet_association_test.go b/aws/resource_aws_vpc_endpoint_subnet_association_test.go index eeb5c922135..f5acda6da25 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association_test.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association_test.go @@ -30,6 +30,29 @@ func TestAccAWSVpcEndpointSubnetAssociation_basic(t *testing.T) { }) } +func TestAccAwsVpcEndpointSubnetAssociation_multiple(t *testing.T) { + var vpce ec2.VpcEndpoint + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckVpcEndpointSubnetAssociationDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccVpcEndpointSubnetAssociationConfig_multiple, + Check: resource.ComposeTestCheckFunc( + testAccCheckVpcEndpointSubnetAssociationExists( + "aws_vpc_endpoint_subnet_association.a.0", &vpce), + testAccCheckVpcEndpointSubnetAssociationExists( + "aws_vpc_endpoint_subnet_association.a.1", &vpce), + testAccCheckVpcEndpointSubnetAssociationExists( + "aws_vpc_endpoint_subnet_association.a.2", &vpce), + ), + }, + }, + }) +} + func testAccCheckVpcEndpointSubnetAssociationDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn @@ -116,28 +139,76 @@ resource "aws_vpc" "foo" { data "aws_security_group" "default" { vpc_id = "${aws_vpc.foo.id}" - name = "default" + name = "default" } +data "aws_availability_zones" "available" {} + resource "aws_vpc_endpoint" "ec2" { - vpc_id = "${aws_vpc.foo.id}" - vpc_endpoint_type = "Interface" - service_name = "com.amazonaws.us-west-2.ec2" - security_group_ids = ["${data.aws_security_group.default.id}"] + vpc_id = "${aws_vpc.foo.id}" + vpc_endpoint_type = "Interface" + service_name = "com.amazonaws.us-west-2.ec2" + security_group_ids = ["${data.aws_security_group.default.id}"] private_dns_enabled = false } resource "aws_subnet" "sn" { + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "${data.aws_availability_zones.available.names[0]}" + cidr_block = "10.0.0.0/17" + tags { + Name = "tf-acc-vpc-endpoint-subnet-association" + } +} + +resource "aws_vpc_endpoint_subnet_association" "a" { + vpc_endpoint_id = "${aws_vpc_endpoint.ec2.id}" + subnet_id = "${aws_subnet.sn.id}" +} +` + +const testAccVpcEndpointSubnetAssociationConfig_multiple = ` +provider "aws" { + region = "us-west-2" +} + +resource "aws_vpc" "foo" { + cidr_block = "10.0.0.0/16" + tags { + Name = "terraform-testacc-vpc-endpoint-subnet-association" + } +} + +data "aws_security_group" "default" { vpc_id = "${aws_vpc.foo.id}" - availability_zone = "us-west-2a" - cidr_block = "10.0.0.0/17" + name = "default" +} + +data "aws_availability_zones" "available" {} + +resource "aws_vpc_endpoint" "ec2" { + vpc_id = "${aws_vpc.foo.id}" + vpc_endpoint_type = "Interface" + service_name = "com.amazonaws.us-west-2.ec2" + security_group_ids = ["${data.aws_security_group.default.id}"] + private_dns_enabled = false +} + +resource "aws_subnet" "sn" { + count = 3 + + vpc_id = "${aws_vpc.foo.id}" + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, count.index)}" tags { Name = "tf-acc-vpc-endpoint-subnet-association" } } resource "aws_vpc_endpoint_subnet_association" "a" { + count = 3 + vpc_endpoint_id = "${aws_vpc_endpoint.ec2.id}" - subnet_id = "${aws_subnet.sn.id}" + subnet_id = "${aws_subnet.sn.*.id[count.index]}" } ` From f3f6979a7f3cd4fadf071e0cd522b608c41ad1f1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 11:06:17 -0400 Subject: [PATCH 1840/3316] tests/provider: Adjust mock EC2 metadata URL path to match aws-sdk-go@v1.14.26 update which added a trailing slash to prevent redirects --- aws/auth_helpers_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/auth_helpers_test.go b/aws/auth_helpers_test.go index de7d8162aa6..5ae68dc6c56 100644 --- a/aws/auth_helpers_test.go +++ b/aws/auth_helpers_test.go @@ -798,7 +798,7 @@ var instanceIdEndpoint = &endpoint{ var securityCredentialsEndpoints = []*endpoint{ &endpoint{ - Uri: "/latest/meta-data/iam/security-credentials", + Uri: "/latest/meta-data/iam/security-credentials/", Body: "test_role", }, &endpoint{ From aba933f9dce9caafdf033d907c21bbe78b0cdf83 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 11:40:07 -0400 Subject: [PATCH 1841/3316] Update CHANGELOG for #5175 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e726109b279..34590e3ad47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/aws_cloudwatch_log_group: Allow `tags` handling in AWS GovCloud (US) and AWS China [GH-5175] * resource/aws_codebuild_project: Add `report_build_status` argument under `source` (support report build status for GitHub source type) [GH-5156] BUG FIXES: From a561cb15977830daf3b3ecf6b2382344acc9b6be Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Fri, 13 Jul 2018 08:52:23 -0700 Subject: [PATCH 1842/3316] Add in a delete call to remove webhooks. --- aws/resource_aws_codepipeline_webhook.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index af7984a6a69..ef54324b6e2 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -193,5 +193,15 @@ func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{} func resourceAwsCodePipelineWebhookDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn + name := d.Get("name").(string) + + resp, err := conn.DeleteWebhook(&DeleteWebhookInput{ + Name: &name, + }) + + if err != nil { + return fmt.Errorf("Could not delete webhook: %s", err) + } + return nil } From 7bef84f0d8e6ce8b7508b72e81ab775eca7676be Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 12:54:33 -0400 Subject: [PATCH 1843/3316] resource/aws_iam_user: Add permissions_boundary argument --- aws/resource_aws_iam_user.go | 108 +++++++++++++++++++------- aws/resource_aws_iam_user_test.go | 82 ++++++++++++++++--- website/docs/r/iam_user.html.markdown | 1 + 3 files changed, 151 insertions(+), 40 deletions(-) diff --git a/aws/resource_aws_iam_user.go b/aws/resource_aws_iam_user.go index b7930f1d0e1..42b47a46df8 100644 --- a/aws/resource_aws_iam_user.go +++ b/aws/resource_aws_iam_user.go @@ -7,11 +7,11 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsIamUser() *schema.Resource { @@ -25,7 +25,7 @@ func resourceAwsIamUser() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "arn": &schema.Schema{ + "arn": { Type: schema.TypeString, Computed: true, }, @@ -37,21 +37,26 @@ func resourceAwsIamUser() *schema.Resource { and inefficient. Still, there are other reasons one might want the UniqueID, so we can make it available. */ - "unique_id": &schema.Schema{ + "unique_id": { Type: schema.TypeString, Computed: true, }, - "name": &schema.Schema{ + "name": { Type: schema.TypeString, Required: true, ValidateFunc: validateAwsIamUserName, }, - "path": &schema.Schema{ + "path": { Type: schema.TypeString, Optional: true, Default: "/", }, - "force_destroy": &schema.Schema{ + "permissions_boundary": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(20, 2048), + }, + "force_destroy": { Type: schema.TypeBool, Optional: true, Default: false, @@ -71,13 +76,19 @@ func resourceAwsIamUserCreate(d *schema.ResourceData, meta interface{}) error { UserName: aws.String(name), } + if v, ok := d.GetOk("permissions_boundary"); ok && v.(string) != "" { + request.PermissionsBoundary = aws.String(v.(string)) + } + log.Println("[DEBUG] Create IAM User request:", request) createResp, err := iamconn.CreateUser(request) if err != nil { return fmt.Errorf("Error creating IAM User %s: %s", name, err) } - d.SetId(*createResp.User.UserName) - return resourceAwsIamUserReadResult(d, createResp.User) + + d.SetId(aws.StringValue(createResp.User.UserName)) + + return resourceAwsIamUserRead(d, meta) } func resourceAwsIamUserRead(d *schema.ResourceData, meta interface{}) error { @@ -87,37 +98,37 @@ func resourceAwsIamUserRead(d *schema.ResourceData, meta interface{}) error { UserName: aws.String(d.Id()), } - getResp, err := iamconn.GetUser(request) + output, err := iamconn.GetUser(request) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { // XXX test me + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { // XXX test me log.Printf("[WARN] No IAM user by name (%s) found", d.Id()) d.SetId("") return nil } return fmt.Errorf("Error reading IAM User %s: %s", d.Id(), err) } - return resourceAwsIamUserReadResult(d, getResp.User) -} -func resourceAwsIamUserReadResult(d *schema.ResourceData, user *iam.User) error { - if err := d.Set("name", user.UserName); err != nil { - return err - } - if err := d.Set("arn", user.Arn); err != nil { - return err - } - if err := d.Set("path", user.Path); err != nil { - return err + if output == nil || output.User == nil { + log.Printf("[WARN] No IAM user by name (%s) found", d.Id()) + d.SetId("") + return nil } - if err := d.Set("unique_id", user.UserId); err != nil { - return err + + d.Set("arn", output.User.Arn) + d.Set("name", output.User.UserName) + d.Set("path", output.User.Path) + if output.User.PermissionsBoundary != nil { + d.Set("permissions_boundary", output.User.PermissionsBoundary.PermissionsBoundaryArn) } + d.Set("unique_id", output.User.UserId) + return nil } func resourceAwsIamUserUpdate(d *schema.ResourceData, meta interface{}) error { + iamconn := meta.(*AWSClient).iamconn + if d.HasChange("name") || d.HasChange("path") { - iamconn := meta.(*AWSClient).iamconn on, nn := d.GetChange("name") _, np := d.GetChange("path") @@ -130,7 +141,7 @@ func resourceAwsIamUserUpdate(d *schema.ResourceData, meta interface{}) error { log.Println("[DEBUG] Update IAM User request:", request) _, err := iamconn.UpdateUser(request) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { log.Printf("[WARN] No IAM user by name (%s) found", d.Id()) d.SetId("") return nil @@ -139,9 +150,31 @@ func resourceAwsIamUserUpdate(d *schema.ResourceData, meta interface{}) error { } d.SetId(nn.(string)) - return resourceAwsIamUserRead(d, meta) } - return nil + + if d.HasChange("permissions_boundary") { + permissionsBoundary := d.Get("permissions_boundary").(string) + if permissionsBoundary != "" { + input := &iam.PutUserPermissionsBoundaryInput{ + PermissionsBoundary: aws.String(permissionsBoundary), + UserName: aws.String(d.Id()), + } + _, err := iamconn.PutUserPermissionsBoundary(input) + if err != nil { + return fmt.Errorf("error updating IAM User permissions boundary: %s", err) + } + } else { + input := &iam.DeleteUserPermissionsBoundaryInput{ + UserName: aws.String(d.Id()), + } + _, err := iamconn.DeleteUserPermissionsBoundary(input) + if err != nil { + return fmt.Errorf("error deleting IAM User permissions boundary: %s", err) + } + } + } + + return resourceAwsIamUserRead(d, meta) } func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { @@ -242,14 +275,29 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { } } - request := &iam.DeleteUserInput{ + deleteUserPermissionsBoundaryInput := &iam.DeleteUserPermissionsBoundaryInput{ UserName: aws.String(d.Id()), } - log.Println("[DEBUG] Delete IAM User request:", request) - if _, err := iamconn.DeleteUser(request); err != nil { + log.Println("[DEBUG] Delete IAM User Permissions Boundary request:", deleteUserPermissionsBoundaryInput) + _, err = iamconn.DeleteUserPermissionsBoundary(deleteUserPermissionsBoundaryInput) + if err != nil && !isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return fmt.Errorf("Error deleting IAM User %s Permissions Boundary: %s", d.Id(), err) + } + + deleteUserInput := &iam.DeleteUserInput{ + UserName: aws.String(d.Id()), + } + + log.Println("[DEBUG] Delete IAM User request:", deleteUserInput) + _, err = iamconn.DeleteUser(deleteUserInput) + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } return fmt.Errorf("Error deleting IAM User %s: %s", d.Id(), err) } + return nil } diff --git a/aws/resource_aws_iam_user_test.go b/aws/resource_aws_iam_user_test.go index 99721537ede..8a689a95d6b 100644 --- a/aws/resource_aws_iam_user_test.go +++ b/aws/resource_aws_iam_user_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" @@ -136,6 +135,63 @@ func TestAccAWSUser_pathChange(t *testing.T) { }) } +func TestAccAWSUser_permissionsBoundary(t *testing.T) { + var user iam.GetUserOutput + + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_user.user" + + permissionsBoundary1 := fmt.Sprintf("arn:%s:iam::aws:policy/AdministratorAccess", testAccGetPartition()) + permissionsBoundary2 := fmt.Sprintf("arn:%s:iam::aws:policy/ReadOnlyAccess", testAccGetPartition()) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + // Test creation + { + Config: testAccAWSUserConfig_permissionsBoundary(rName, permissionsBoundary1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), + ), + }, + // Test update + { + Config: testAccAWSUserConfig_permissionsBoundary(rName, permissionsBoundary2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary2), + ), + }, + // Test import + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy"}, + }, + // Test removal + { + Config: testAccAWSUserConfig(rName, "/"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", ""), + ), + }, + // Test addition + { + Config: testAccAWSUserConfig_permissionsBoundary(rName, permissionsBoundary1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), + ), + }, + }, + }) +} + func testAccCheckAWSUserDestroy(s *terraform.State) error { iamconn := testAccProvider.Meta().(*AWSClient).iamconn @@ -153,11 +209,7 @@ func testAccCheckAWSUserDestroy(s *terraform.State) error { } // Verify the error is what we want - ec2err, ok := err.(awserr.Error) - if !ok { - return err - } - if ec2err.Code() != "NoSuchEntity" { + if !isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { return err } } @@ -205,10 +257,20 @@ func testAccCheckAWSUserAttributes(user *iam.GetUserOutput, name string, path st } } -func testAccAWSUserConfig(r, p string) string { +func testAccAWSUserConfig(rName, path string) string { return fmt.Sprintf(` resource "aws_iam_user" "user" { - name = "%s" - path = "%s" -}`, r, p) + name = %q + path = %q +} +`, rName, path) +} + +func testAccAWSUserConfig_permissionsBoundary(rName, permissionsBoundary string) string { + return fmt.Sprintf(` +resource "aws_iam_user" "user" { + name = %q + permissions_boundary = %q +} +`, rName, permissionsBoundary) } diff --git a/website/docs/r/iam_user.html.markdown b/website/docs/r/iam_user.html.markdown index f6ee3a9795d..3c6a29f58d8 100644 --- a/website/docs/r/iam_user.html.markdown +++ b/website/docs/r/iam_user.html.markdown @@ -49,6 +49,7 @@ The following arguments are supported: * `name` - (Required) The user's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: `=,.@-_.`. User names are not distinguished by case. For example, you cannot create users named both "TESTUSER" and "testuser". * `path` - (Optional, default "/") Path in which to create the user. +* `permissions_boundary` - (Optional) The ARN of the policy that is used to set the permissions boundary for the user. * `force_destroy` - (Optional, default false) When destroying this user, destroy even if it has non-Terraform-managed IAM access keys, login profile or MFA devices. Without `force_destroy` a user with non-Terraform-managed access keys and login profile will fail to be destroyed. From 1a8c21470c1d7866aec1ac7eddc823df3c98fea5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 13:18:23 -0400 Subject: [PATCH 1844/3316] resource/aws_iam_role: Add permissions_boundary argument --- aws/resource_aws_iam_role.go | 88 ++++++++++++++++++--------- aws/resource_aws_iam_role_test.go | 76 ++++++++++++++++++++++- website/docs/r/iam_role.html.markdown | 1 + 3 files changed, 133 insertions(+), 32 deletions(-) diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index a0815049711..af04d831292 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -8,7 +8,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" @@ -85,6 +84,12 @@ func resourceAwsIamRole() *schema.Resource { ForceNew: true, }, + "permissions_boundary": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(20, 2048), + }, + "description": { Type: schema.TypeString, Optional: true, @@ -151,6 +156,10 @@ func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error { request.MaxSessionDuration = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("permissions_boundary"); ok { + request.PermissionsBoundary = aws.String(v.(string)) + } + var createResp *iam.CreateRoleOutput err := resource.Retry(30*time.Second, func() *resource.RetryError { var err error @@ -178,7 +187,8 @@ func resourceAwsIamRoleRead(d *schema.ResourceData, meta interface{}) error { getResp, err := iamconn.GetRole(request) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { // XXX test me + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { // XXX test me + log.Printf("[WARN] IAM Role %q not found, removing from state", d.Id()) d.SetId("") return nil } @@ -187,31 +197,18 @@ func resourceAwsIamRoleRead(d *schema.ResourceData, meta interface{}) error { role := getResp.Role - if err := d.Set("name", role.RoleName); err != nil { - return err - } - if err := d.Set("max_session_duration", role.MaxSessionDuration); err != nil { - return err - } - if err := d.Set("arn", role.Arn); err != nil { - return err - } - if err := d.Set("path", role.Path); err != nil { - return err - } - if err := d.Set("unique_id", role.RoleId); err != nil { - return err - } + d.Set("arn", role.Arn) if err := d.Set("create_date", role.CreateDate.Format(time.RFC3339)); err != nil { return err } - - if role.Description != nil { - // the description isn't present in the response to CreateRole. - if err := d.Set("description", role.Description); err != nil { - return err - } + d.Set("description", role.Description) + d.Set("max_session_duration", role.MaxSessionDuration) + d.Set("name", role.RoleName) + d.Set("path", role.Path) + if role.PermissionsBoundary != nil { + d.Set("permissions_boundary", role.PermissionsBoundary.PermissionsBoundaryArn) } + d.Set("unique_id", role.RoleId) assumRolePolicy, err := url.QueryUnescape(*role.AssumeRolePolicyDocument) if err != nil { @@ -233,7 +230,7 @@ func resourceAwsIamRoleUpdate(d *schema.ResourceData, meta interface{}) error { } _, err := iamconn.UpdateAssumeRolePolicy(assumeRolePolicyInput) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { d.SetId("") return nil } @@ -248,7 +245,7 @@ func resourceAwsIamRoleUpdate(d *schema.ResourceData, meta interface{}) error { } _, err := iamconn.UpdateRoleDescription(roleDescriptionInput) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { d.SetId("") return nil } @@ -271,7 +268,29 @@ func resourceAwsIamRoleUpdate(d *schema.ResourceData, meta interface{}) error { } } - return nil + if d.HasChange("permissions_boundary") { + permissionsBoundary := d.Get("permissions_boundary").(string) + if permissionsBoundary != "" { + input := &iam.PutRolePermissionsBoundaryInput{ + PermissionsBoundary: aws.String(permissionsBoundary), + RoleName: aws.String(d.Id()), + } + _, err := iamconn.PutRolePermissionsBoundary(input) + if err != nil { + return fmt.Errorf("error updating IAM Role permissions boundary: %s", err) + } + } else { + input := &iam.DeleteRolePermissionsBoundaryInput{ + RoleName: aws.String(d.Id()), + } + _, err := iamconn.DeleteRolePermissionsBoundary(input) + if err != nil { + return fmt.Errorf("error deleting IAM Role permissions boundary: %s", err) + } + } + } + + return resourceAwsIamRoleRead(d, meta) } func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { @@ -358,16 +377,25 @@ func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { } } - request := &iam.DeleteRoleInput{ + deleteRolePermissionsBoundaryInput := &iam.DeleteRolePermissionsBoundaryInput{ + RoleName: aws.String(d.Id()), + } + + log.Println("[DEBUG] Delete IAM Role Permissions Boundary request:", deleteRolePermissionsBoundaryInput) + _, err = iamconn.DeleteRolePermissionsBoundary(deleteRolePermissionsBoundaryInput) + if err != nil && !isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return fmt.Errorf("Error deleting IAM Role %s Permissions Boundary: %s", d.Id(), err) + } + + deleteRoleInput := &iam.DeleteRoleInput{ RoleName: aws.String(d.Id()), } // IAM is eventually consistent and deletion of attached policies may take time return resource.Retry(30*time.Second, func() *resource.RetryError { - _, err := iamconn.DeleteRole(request) + _, err := iamconn.DeleteRole(deleteRoleInput) if err != nil { - awsErr, ok := err.(awserr.Error) - if ok && awsErr.Code() == "DeleteConflict" { + if isAWSErr(err, iam.ErrCodeDeleteConflictException, "") { return resource.RetryableError(err) } diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index dd286f7fb58..0fd8fc7e060 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -199,6 +199,63 @@ func TestAccAWSIAMRole_MaxSessionDuration(t *testing.T) { }) } +func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { + var role iam.GetRoleOutput + + rName := acctest.RandString(10) + resourceName := "aws_iam_role.role" + + permissionsBoundary1 := fmt.Sprintf("arn:%s:iam::aws:policy/AdministratorAccess", testAccGetPartition()) + permissionsBoundary2 := fmt.Sprintf("arn:%s:iam::aws:policy/ReadOnlyAccess", testAccGetPartition()) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + // Test creation + { + Config: testAccCheckIAMRoleConfig_PermissionsBoundary(rName, permissionsBoundary1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRoleExists(resourceName, &role), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), + ), + }, + // Test update + { + Config: testAccCheckIAMRoleConfig_PermissionsBoundary(rName, permissionsBoundary2), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRoleExists(resourceName, &role), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary2), + ), + }, + // Test import + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"force_destroy"}, + }, + // Test removal + { + Config: testAccAWSIAMRoleConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRoleExists(resourceName, &role), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", ""), + ), + }, + // Test addition + { + Config: testAccCheckIAMRoleConfig_PermissionsBoundary(rName, permissionsBoundary1), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRoleExists(resourceName, &role), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), + ), + }, + }, + }) +} + func testAccCheckAWSRoleDestroy(s *terraform.State) error { iamconn := testAccProvider.Meta().(*AWSClient).iamconn @@ -313,6 +370,17 @@ resource "aws_iam_role" "test" { `, rName, maxSessionDuration) } +func testAccCheckIAMRoleConfig_PermissionsBoundary(rName, permissionsBoundary string) string { + return fmt.Sprintf(` +resource "aws_iam_role" "role" { + assume_role_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"ec2.amazonaws.com\"]},\"Action\":[\"sts:AssumeRole\"]}]}" + name = "test-role-%s" + path = "/" + permissions_boundary = %q +} +`, rName, permissionsBoundary) +} + func testAccAWSIAMRoleConfig(rName string) string { return fmt.Sprintf(` resource "aws_iam_role" "role" { @@ -357,6 +425,8 @@ resource "aws_iam_role" "role" { func testAccAWSIAMRolePre(rName string) string { return fmt.Sprintf(` +data "aws_partition" "current" {} + resource "aws_iam_role" "role_update_test" { name = "tf_old_name_%s" path = "/test/" @@ -390,7 +460,7 @@ resource "aws_iam_role_policy" "role_update_test" { "s3:GetBucketLocation", "s3:ListAllMyBuckets" ], - "Resource": "arn:aws:s3:::*" + "Resource": "arn:${data.aws_partition.current.partition}:s3:::*" } ] } @@ -407,6 +477,8 @@ resource "aws_iam_instance_profile" "role_update_test" { func testAccAWSIAMRolePost(rName string) string { return fmt.Sprintf(` +data "aws_partition" "current" {} + resource "aws_iam_role" "role_update_test" { name = "tf_new_name_%s" path = "/test/" @@ -440,7 +512,7 @@ resource "aws_iam_role_policy" "role_update_test" { "s3:GetBucketLocation", "s3:ListAllMyBuckets" ], - "Resource": "arn:aws:s3:::*" + "Resource": "arn:${data.aws_partition.current.partition}:s3:::*" } ] } diff --git a/website/docs/r/iam_role.html.markdown b/website/docs/r/iam_role.html.markdown index 98002ccf177..54921ac98d1 100644 --- a/website/docs/r/iam_role.html.markdown +++ b/website/docs/r/iam_role.html.markdown @@ -50,6 +50,7 @@ The following arguments are supported: * `description` - (Optional) The description of the role. * `max_session_duration` - (Optional) The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 1 hour to 12 hours. +* `permissions_boundary` - (Optional) The ARN of the policy that is used to set the permissions boundary for the role. ## Attributes Reference From 2f77213ccb6f97552da17729dc1ccc469b7fd62e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 13:41:27 -0400 Subject: [PATCH 1845/3316] data-source/aws_iam_role: Add permissions_boundary attribute --- aws/data_source_aws_iam_role.go | 48 ++++++++++++++++++++++++--- aws/data_source_aws_iam_role_test.go | 1 + website/docs/d/iam_role.html.markdown | 1 + 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/aws/data_source_aws_iam_role.go b/aws/data_source_aws_iam_role.go index fe4f6f657c4..26af5a2fb01 100644 --- a/aws/data_source_aws_iam_role.go +++ b/aws/data_source_aws_iam_role.go @@ -2,7 +2,11 @@ package aws import ( "fmt" + "net/url" + "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/schema" ) @@ -28,6 +32,10 @@ func dataSourceAwsIAMRole() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "permissions_boundary": { + Type: schema.TypeString, + Computed: true, + }, "role_id": { Type: schema.TypeString, Computed: true, @@ -63,6 +71,8 @@ func dataSourceAwsIAMRole() *schema.Resource { } func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error { + iamconn := meta.(*AWSClient).iamconn + name, hasName := d.GetOk("name") roleName, hasRoleName := d.GetOk("role_name") @@ -78,10 +88,40 @@ func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error { } d.SetId(id) - data := resourceAwsIamRoleRead(d, meta) + input := &iam.GetRoleInput{ + RoleName: aws.String(d.Id()), + } + + output, err := iamconn.GetRole(input) + if err != nil { + return fmt.Errorf("Error reading IAM Role %s: %s", d.Id(), err) + } + + d.Set("arn", output.Role.Arn) + if err := d.Set("create_date", output.Role.CreateDate.Format(time.RFC3339)); err != nil { + return err + } + d.Set("description", output.Role.Description) + d.Set("max_session_duration", output.Role.MaxSessionDuration) + d.Set("name", output.Role.RoleName) + d.Set("path", output.Role.Path) + d.Set("permissions_boundary", "") + if output.Role.PermissionsBoundary != nil { + d.Set("permissions_boundary", output.Role.PermissionsBoundary.PermissionsBoundaryArn) + } + d.Set("unique_id", output.Role.RoleId) + + assumRolePolicy, err := url.QueryUnescape(aws.StringValue(output.Role.AssumeRolePolicyDocument)) + if err != nil { + return err + } + if err := d.Set("assume_role_policy", assumRolePolicy); err != nil { + return err + } + // Keep backward compatibility with previous attributes - d.Set("role_id", d.Get("unique_id").(string)) - d.Set("assume_role_policy_document", d.Get("assume_role_policy").(string)) + d.Set("role_id", output.Role.RoleId) + d.Set("assume_role_policy_document", assumRolePolicy) - return data + return nil } diff --git a/aws/data_source_aws_iam_role_test.go b/aws/data_source_aws_iam_role_test.go index e0f34481d62..ffdd10cc451 100644 --- a/aws/data_source_aws_iam_role_test.go +++ b/aws/data_source_aws_iam_role_test.go @@ -22,6 +22,7 @@ func TestAccAWSDataSourceIAMRole_basic(t *testing.T) { resource.TestCheckResourceAttrSet("data.aws_iam_role.test", "unique_id"), resource.TestCheckResourceAttrSet("data.aws_iam_role.test", "assume_role_policy"), resource.TestCheckResourceAttr("data.aws_iam_role.test", "path", "/testpath/"), + resource.TestCheckResourceAttr("data.aws_iam_role.test", "permissions_boundary", ""), resource.TestCheckResourceAttr("data.aws_iam_role.test", "name", roleName), resource.TestCheckResourceAttrSet("data.aws_iam_role.test", "create_date"), resource.TestMatchResourceAttr("data.aws_iam_role.test", "arn", diff --git a/website/docs/d/iam_role.html.markdown b/website/docs/d/iam_role.html.markdown index b2e981794e3..a23ff830b95 100644 --- a/website/docs/d/iam_role.html.markdown +++ b/website/docs/d/iam_role.html.markdown @@ -30,4 +30,5 @@ data "aws_iam_role" "example" { * `arn` - The Amazon Resource Name (ARN) specifying the role. * `assume_role_policy` - The policy document associated with the role. * `path` - The path to the role. +* `permissions_boundary` - The ARN of the policy that is used to set the permissions boundary for the role. * `unique_id` - The stable and unique string identifying the role. From 0f7b0dff5deb3ecbfc18c881529a3be779285ab8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 13:44:38 -0400 Subject: [PATCH 1846/3316] data-source/aws_iam_user: Add permissions_boundary attribute --- aws/data_source_aws_iam_user.go | 14 +++++++++++--- aws/data_source_aws_iam_user_test.go | 3 ++- website/docs/d/iam_user.html.markdown | 3 +-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/aws/data_source_aws_iam_user.go b/aws/data_source_aws_iam_user.go index 72d3e47d938..2a627b918bb 100644 --- a/aws/data_source_aws_iam_user.go +++ b/aws/data_source_aws_iam_user.go @@ -1,11 +1,11 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -22,6 +22,10 @@ func dataSourceAwsIAMUser() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "permissions_boundary": { + Type: schema.TypeString, + Computed: true, + }, "user_id": { Type: schema.TypeString, Computed: true, @@ -44,13 +48,17 @@ func dataSourceAwsIAMUserRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Reading IAM User: %s", req) resp, err := iamconn.GetUser(req) if err != nil { - return errwrap.Wrapf("error getting user: {{err}}", err) + return fmt.Errorf("error getting user: %s", err) } user := resp.User - d.SetId(*user.UserId) + d.SetId(aws.StringValue(user.UserId)) d.Set("arn", user.Arn) d.Set("path", user.Path) + d.Set("permissions_boundary", "") + if user.PermissionsBoundary != nil { + d.Set("permissions_boundary", user.PermissionsBoundary.PermissionsBoundaryArn) + } d.Set("user_id", user.UserId) return nil diff --git a/aws/data_source_aws_iam_user_test.go b/aws/data_source_aws_iam_user_test.go index df96b0e7f92..7c2015b1c5b 100644 --- a/aws/data_source_aws_iam_user_test.go +++ b/aws/data_source_aws_iam_user_test.go @@ -21,8 +21,9 @@ func TestAccAWSDataSourceIAMUser_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet("data.aws_iam_user.test", "user_id"), resource.TestCheckResourceAttr("data.aws_iam_user.test", "path", "/"), + resource.TestCheckResourceAttr("data.aws_iam_user.test", "permissions_boundary", ""), resource.TestCheckResourceAttr("data.aws_iam_user.test", "user_name", userName), - resource.TestMatchResourceAttr("data.aws_iam_user.test", "arn", regexp.MustCompile("^arn:aws:iam::[0-9]{12}:user/"+userName)), + resource.TestMatchResourceAttr("data.aws_iam_user.test", "arn", regexp.MustCompile("^arn:[^:]+:iam::[0-9]{12}:user/"+userName)), ), }, }, diff --git a/website/docs/d/iam_user.html.markdown b/website/docs/d/iam_user.html.markdown index 09835aad46f..b7c3672276f 100644 --- a/website/docs/d/iam_user.html.markdown +++ b/website/docs/d/iam_user.html.markdown @@ -27,7 +27,6 @@ data "aws_iam_user" "example" { ## Attributes Reference * `arn` - The Amazon Resource Name (ARN) assigned by AWS for this user. - * `path` - Path in which this user was created. - +* `permissions_boundary` - The ARN of the policy that is used to set the permissions boundary for the user. * `user_id` - The unique ID assigned by AWS for this user. From 2222b7f446da9a18dc21f7a37ce9eab387c87540 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 13 Jul 2018 11:16:03 -0400 Subject: [PATCH 1847/3316] Make aws_vpc_endpoint_subnet_association acceptance tests region-agnostic. --- ...ws_vpc_endpoint_subnet_association_test.go | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_vpc_endpoint_subnet_association_test.go b/aws/resource_aws_vpc_endpoint_subnet_association_test.go index f5acda6da25..174fc5304ce 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association_test.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association_test.go @@ -30,7 +30,7 @@ func TestAccAWSVpcEndpointSubnetAssociation_basic(t *testing.T) { }) } -func TestAccAwsVpcEndpointSubnetAssociation_multiple(t *testing.T) { +func TestAccAWSVpcEndpointSubnetAssociation_multiple(t *testing.T) { var vpce ec2.VpcEndpoint resource.Test(t, resource.TestCase{ @@ -126,10 +126,6 @@ func testAccCheckVpcEndpointSubnetAssociationExists(n string, vpce *ec2.VpcEndpo } const testAccVpcEndpointSubnetAssociationConfig_basic = ` -provider "aws" { - region = "us-west-2" -} - resource "aws_vpc" "foo" { cidr_block = "10.0.0.0/16" tags { @@ -142,12 +138,14 @@ data "aws_security_group" "default" { name = "default" } +data "aws_region" "current" {} + data "aws_availability_zones" "available" {} resource "aws_vpc_endpoint" "ec2" { vpc_id = "${aws_vpc.foo.id}" vpc_endpoint_type = "Interface" - service_name = "com.amazonaws.us-west-2.ec2" + service_name = "com.amazonaws.${data.aws_region.current.name}.ec2" security_group_ids = ["${data.aws_security_group.default.id}"] private_dns_enabled = false } @@ -155,7 +153,7 @@ resource "aws_vpc_endpoint" "ec2" { resource "aws_subnet" "sn" { vpc_id = "${aws_vpc.foo.id}" availability_zone = "${data.aws_availability_zones.available.names[0]}" - cidr_block = "10.0.0.0/17" + cidr_block = "10.0.0.0/17" tags { Name = "tf-acc-vpc-endpoint-subnet-association" } @@ -168,12 +166,8 @@ resource "aws_vpc_endpoint_subnet_association" "a" { ` const testAccVpcEndpointSubnetAssociationConfig_multiple = ` -provider "aws" { - region = "us-west-2" -} - resource "aws_vpc" "foo" { - cidr_block = "10.0.0.0/16" + cidr_block = "10.0.0.0/16" tags { Name = "terraform-testacc-vpc-endpoint-subnet-association" } @@ -184,12 +178,14 @@ data "aws_security_group" "default" { name = "default" } +data "aws_region" "current" {} + data "aws_availability_zones" "available" {} resource "aws_vpc_endpoint" "ec2" { vpc_id = "${aws_vpc.foo.id}" vpc_endpoint_type = "Interface" - service_name = "com.amazonaws.us-west-2.ec2" + service_name = "com.amazonaws.${data.aws_region.current.name}.ec2" security_group_ids = ["${data.aws_security_group.default.id}"] private_dns_enabled = false } @@ -199,9 +195,9 @@ resource "aws_subnet" "sn" { vpc_id = "${aws_vpc.foo.id}" availability_zone = "${data.aws_availability_zones.available.names[count.index]}" - cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, count.index)}" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, count.index)}" tags { - Name = "tf-acc-vpc-endpoint-subnet-association" + Name = "${format("tf-acc-vpc-endpoint-subnet-association-%d", count.index + 1)}" } } From 6cf9541413bbd11120de47afbd811f3d3f7b7af3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 13 Jul 2018 14:39:11 -0400 Subject: [PATCH 1848/3316] Make aws_vpc_endpoint acceptance tests region-agnostic. --- aws/resource_aws_vpc_endpoint_test.go | 94 ++++++++++++++++----------- 1 file changed, 57 insertions(+), 37 deletions(-) diff --git a/aws/resource_aws_vpc_endpoint_test.go b/aws/resource_aws_vpc_endpoint_test.go index f8d90d20177..7b7669d0f1d 100644 --- a/aws/resource_aws_vpc_endpoint_test.go +++ b/aws/resource_aws_vpc_endpoint_test.go @@ -309,9 +309,11 @@ resource "aws_subnet" "foo" { } } +data "aws_region" "current" {} + resource "aws_vpc_endpoint" "s3" { vpc_id = "${aws_vpc.foo.id}" - service_name = "com.amazonaws.us-west-2.s3" + service_name = "com.amazonaws.${data.aws_region.current.name}.s3" route_table_ids = ["${aws_route_table.default.id}"] policy = < Date: Fri, 13 Jul 2018 14:55:26 -0400 Subject: [PATCH 1849/3316] Wait for VPC Endpoint status to return to 'available' when associating subnet. --- aws/resource_aws_vpc_endpoint.go | 58 ++++++++++++------- ...rce_aws_vpc_endpoint_subnet_association.go | 49 +++++++--------- website/docs/r/vpc_endpoint.html.markdown | 9 +++ ..._endpoint_subnet_association.html.markdown | 8 +++ 4 files changed, 76 insertions(+), 48 deletions(-) diff --git a/aws/resource_aws_vpc_endpoint.go b/aws/resource_aws_vpc_endpoint.go index 2826f490468..96b072f8454 100644 --- a/aws/resource_aws_vpc_endpoint.go +++ b/aws/resource_aws_vpc_endpoint.go @@ -122,6 +122,12 @@ func resourceAwsVpcEndpoint() *schema.Resource { Optional: true, }, }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, } } @@ -155,7 +161,7 @@ func resourceAwsVpcEndpointCreate(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] Creating VPC Endpoint: %#v", req) resp, err := conn.CreateVpcEndpoint(req) if err != nil { - return fmt.Errorf("Error creating VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error creating VPC Endpoint: %s", err) } vpce := resp.VpcEndpoint @@ -167,7 +173,7 @@ func resourceAwsVpcEndpointCreate(d *schema.ResourceData, meta interface{}) erro } } - if err := vpcEndpointWaitUntilAvailable(d, conn); err != nil { + if err := vpcEndpointWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -179,7 +185,7 @@ func resourceAwsVpcEndpointRead(d *schema.ResourceData, meta interface{}) error vpce, state, err := vpcEndpointStateRefresh(conn, d.Id())() if err != nil && state != "failed" { - return fmt.Errorf("Error reading VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error reading VPC Endpoint: %s", err) } terminalStates := map[string]bool{ @@ -234,10 +240,10 @@ func resourceAwsVpcEndpointUpdate(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] Updating VPC Endpoint: %#v", req) if _, err := conn.ModifyVpcEndpoint(req); err != nil { - return fmt.Errorf("Error updating VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error updating VPC Endpoint: %s", err) } - if err := vpcEndpointWaitUntilAvailable(d, conn); err != nil { + if err := vpcEndpointWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)); err != nil { return err } @@ -255,7 +261,7 @@ func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) erro if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { log.Printf("[DEBUG] VPC Endpoint %s is already gone", d.Id()) } else { - return fmt.Errorf("Error deleting VPC Endpoint: %s", err.Error()) + return fmt.Errorf("Error deleting VPC Endpoint: %s", err) } } @@ -263,12 +269,12 @@ func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) erro Pending: []string{"available", "pending", "deleting"}, Target: []string{"deleted"}, Refresh: vpcEndpointStateRefresh(conn, d.Id()), - Timeout: 10 * time.Minute, + Timeout: d.Timeout(schema.TimeoutDelete), Delay: 5 * time.Second, MinTimeout: 5 * time.Second, } if _, err = stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint %s to delete: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for VPC Endpoint (%s) to delete: %s", d.Id(), err) } return nil @@ -284,7 +290,7 @@ func vpcEndpointAccept(conn *ec2.EC2, vpceId, svcName string) error { describeSvcResp, err := conn.DescribeVpcEndpointServiceConfigurations(describeSvcReq) if err != nil { - return fmt.Errorf("Error reading VPC Endpoint Service: %s", err.Error()) + return fmt.Errorf("Error reading VPC Endpoint Service: %s", err) } if describeSvcResp == nil || len(describeSvcResp.ServiceConfigurations) == 0 { return fmt.Errorf("No matching VPC Endpoint Service found") @@ -298,7 +304,7 @@ func vpcEndpointAccept(conn *ec2.EC2, vpceId, svcName string) error { log.Printf("[DEBUG] Accepting VPC Endpoint connection: %#v", acceptEpReq) _, err = conn.AcceptVpcEndpointConnections(acceptEpReq) if err != nil { - return fmt.Errorf("Error accepting VPC Endpoint connection: %s", err.Error()) + return fmt.Errorf("Error accepting VPC Endpoint connection: %s", err) } return nil @@ -312,33 +318,43 @@ func vpcEndpointStateRefresh(conn *ec2.EC2, vpceId string) resource.StateRefresh }) if err != nil { if isAWSErr(err, "InvalidVpcEndpointId.NotFound", "") { - return false, "deleted", nil + return "", "deleted", nil } return nil, "", err } - vpce := resp.VpcEndpoints[0] - state := aws.StringValue(vpce.State) - // No use in retrying if the endpoint is in a failed state. - if state == "failed" { - return nil, state, errors.New("VPC Endpoint is in a failed state") + n := len(resp.VpcEndpoints) + switch n { + case 0: + return "", "deleted", nil + + case 1: + vpce := resp.VpcEndpoints[0] + state := aws.StringValue(vpce.State) + // No use in retrying if the endpoint is in a failed state. + if state == "failed" { + return nil, state, errors.New("VPC Endpoint is in a failed state") + } + return vpce, state, nil + + default: + return nil, "", fmt.Errorf("Found %d VPC Endpoints for %s, expected 1", n, vpceId) } - return vpce, state, nil } } -func vpcEndpointWaitUntilAvailable(d *schema.ResourceData, conn *ec2.EC2) error { +func vpcEndpointWaitUntilAvailable(conn *ec2.EC2, vpceId string, timeout time.Duration) error { stateConf := &resource.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"available", "pendingAcceptance"}, - Refresh: vpcEndpointStateRefresh(conn, d.Id()), - Timeout: 10 * time.Minute, + Refresh: vpcEndpointStateRefresh(conn, vpceId), + Timeout: timeout, Delay: 5 * time.Second, MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint %s to become available: %s", d.Id(), err.Error()) + return fmt.Errorf("Error waiting for VPC Endpoint (%s) to become available: %s", vpceId, err) } return nil diff --git a/aws/resource_aws_vpc_endpoint_subnet_association.go b/aws/resource_aws_vpc_endpoint_subnet_association.go index ee5b753be82..ab3f4bb0d90 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association.go @@ -9,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -34,6 +33,11 @@ func resourceAwsVpcEndpointSubnetAssociation() *schema.Resource { ForceNew: true, }, }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, } } @@ -48,30 +52,19 @@ func resourceAwsVpcEndpointSubnetAssociationCreate(d *schema.ResourceData, meta return err } - // See https://github.com/terraform-providers/terraform-provider-aws/issues/3382. - // Prevent concurrent subnet association requests and delay between requests. - mk := "vpc_endpoint_subnet_association_" + endpointId - awsMutexKV.Lock(mk) - defer awsMutexKV.Unlock(mk) - - c := &resource.StateChangeConf{ - Delay: 1 * time.Minute, - Timeout: 3 * time.Minute, - Target: []string{"ok"}, - Refresh: func() (interface{}, string, error) { - res, err := conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - AddSubnetIds: aws.StringSlice([]string{snId}), - }) - return res, "ok", err - }, - } - _, err = c.WaitForState() + _, err = conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ + VpcEndpointId: aws.String(endpointId), + AddSubnetIds: aws.StringSlice([]string{snId}), + }) if err != nil { - return fmt.Errorf("Error creating Vpc Endpoint/Subnet association: %s", err.Error()) + return fmt.Errorf("Error creating Vpc Endpoint/Subnet association: %s", err) } - d.SetId(vpcEndpointIdSubnetIdHash(endpointId, snId)) + d.SetId(vpcEndpointSubnetAssociationId(endpointId, snId)) + + if err := vpcEndpointWaitUntilAvailable(conn, endpointId, d.Timeout(schema.TimeoutCreate)); err != nil { + return err + } return resourceAwsVpcEndpointSubnetAssociationRead(d, meta) } @@ -122,24 +115,26 @@ func resourceAwsVpcEndpointSubnetAssociationDelete(d *schema.ResourceData, meta if err != nil { ec2err, ok := err.(awserr.Error) if !ok { - return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err.Error()) + return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err) } switch ec2err.Code() { case "InvalidVpcEndpointId.NotFound": fallthrough - case "InvalidRouteTableId.NotFound": - fallthrough case "InvalidParameter": log.Printf("[DEBUG] Vpc Endpoint/Subnet association is already gone") default: - return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err.Error()) + return fmt.Errorf("Error deleting Vpc Endpoint/Subnet association: %s", err) } } + if err := vpcEndpointWaitUntilAvailable(conn, endpointId, d.Timeout(schema.TimeoutDelete)); err != nil { + return err + } + return nil } -func vpcEndpointIdSubnetIdHash(endpointId, snId string) string { +func vpcEndpointSubnetAssociationId(endpointId, snId string) string { return fmt.Sprintf("a-%s%d", endpointId, hashcode.String(snId)) } diff --git a/website/docs/r/vpc_endpoint.html.markdown b/website/docs/r/vpc_endpoint.html.markdown index 7799f638e59..b6efd4d6bd9 100644 --- a/website/docs/r/vpc_endpoint.html.markdown +++ b/website/docs/r/vpc_endpoint.html.markdown @@ -93,6 +93,15 @@ Defaults to full access. * `private_dns_enabled` - (Optional) Whether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type `Interface`. Defaults to `false`. +### Timeouts + +`aws_vpc_endpoint` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating a VPC endpoint +- `update` - (Default `10 minutes`) Used for VPC endpoint modifications +- `delete` - (Default `10 minutes`) Used for destroying VPC endpoints + ## Attributes Reference In addition to all arguments above, the following attributes are exported: diff --git a/website/docs/r/vpc_endpoint_subnet_association.html.markdown b/website/docs/r/vpc_endpoint_subnet_association.html.markdown index 67fb602a338..5ffb5cc76f2 100644 --- a/website/docs/r/vpc_endpoint_subnet_association.html.markdown +++ b/website/docs/r/vpc_endpoint_subnet_association.html.markdown @@ -34,6 +34,14 @@ The following arguments are supported: * `vpc_endpoint_id` - (Required) The ID of the VPC endpoint with which the subnet will be associated. * `subnet_id` - (Required) The ID of the subnet to be associated with the VPC endpoint. +### Timeouts + +`aws_vpc_endpoint_subnet_association` provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - (Default `10 minutes`) Used for creating the association +- `delete` - (Default `10 minutes`) Used for destroying the association + ## Attributes Reference In addition to all arguments above, the following attributes are exported: From fc8202d78d78cac42b3a27688b81c3259ca399aa Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Jul 2018 15:22:23 -0400 Subject: [PATCH 1850/3316] vendor: hashicorp/terraform@ec998a21bc95366269fbd196e09d3a458bba8be7 --- .../schema/data_source_resource_shim.go | 2 +- .../terraform/helper/schema/resource.go | 8 +- .../hashicorp/terraform/helper/schema/set.go | 6 + .../hashicorp/terraform/version/version.go | 4 +- vendor/vendor.json | 196 ++++++------------ 5 files changed, 78 insertions(+), 138 deletions(-) diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/data_source_resource_shim.go b/vendor/github.com/hashicorp/terraform/helper/schema/data_source_resource_shim.go index 5a03d2d8018..8d93750aede 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/data_source_resource_shim.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/data_source_resource_shim.go @@ -32,7 +32,7 @@ func DataSourceResourceShim(name string, dataSource *Resource) *Resource { // FIXME: Link to some further docs either on the website or in the // changelog, once such a thing exists. - dataSource.deprecationMessage = fmt.Sprintf( + dataSource.DeprecationMessage = fmt.Sprintf( "using %s as a resource is deprecated; consider using the data source instead", name, ) diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource.go index 8f726bfbe47..d3be2d61489 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/resource.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource.go @@ -124,9 +124,7 @@ type Resource struct { Importer *ResourceImporter // If non-empty, this string is emitted as a warning during Validate. - // This is a private interface for now, for use by DataSourceResourceShim, - // and not for general use. (But maybe later...) - deprecationMessage string + DeprecationMessage string // Timeouts allow users to specify specific time durations in which an // operation should time out, to allow them to extend an action to suit their @@ -269,8 +267,8 @@ func (r *Resource) Diff( func (r *Resource) Validate(c *terraform.ResourceConfig) ([]string, []error) { warns, errs := schemaMap(r.Schema).Validate(c) - if r.deprecationMessage != "" { - warns = append(warns, r.deprecationMessage) + if r.DeprecationMessage != "" { + warns = append(warns, r.DeprecationMessage) } return warns, errs diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/set.go b/vendor/github.com/hashicorp/terraform/helper/schema/set.go index bb194ee6505..cba289035d9 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/set.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/set.go @@ -17,6 +17,12 @@ func HashString(v interface{}) int { return hashcode.String(v.(string)) } +// HashInt hashes integers. If you want a Set of integers, this is the +// SchemaSetFunc you want. +func HashInt(v interface{}) int { + return hashcode.String(strconv.Itoa(v.(int))) +} + // HashResource hashes complex structures that are described using // a *Resource. This is the default set implementation used when a set's // element type is a full resource. diff --git a/vendor/github.com/hashicorp/terraform/version/version.go b/vendor/github.com/hashicorp/terraform/version/version.go index 3b982dbdb44..34cc8bbb98f 100644 --- a/vendor/github.com/hashicorp/terraform/version/version.go +++ b/vendor/github.com/hashicorp/terraform/version/version.go @@ -11,12 +11,12 @@ import ( ) // The main version number that is being run at the moment. -const Version = "0.11.7" +const Version = "0.11.8" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. -var Prerelease = "" +var Prerelease = "dev" // SemVer is an instance of version.Version. This has the secondary // benefit of verifying during tests and init time that our version is a diff --git a/vendor/vendor.json b/vendor/vendor.json index e4aa88f2e6f..374a3cf8174 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1276,258 +1276,194 @@ { "checksumSHA1": "D2qVXjDywJu6wLj/4NCTsFnRrvw=", "path": "github.com/hashicorp/terraform/config", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "WzQP2WfiCYlaALKZVqEFsxZsG1o=", "path": "github.com/hashicorp/terraform/config/configschema", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "3V7300kyZF+AGy/cOKV0+P6M3LY=", "path": "github.com/hashicorp/terraform/config/hcl2shim", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "HayBWvFE+t9aERoz9kpE2MODurk=", "path": "github.com/hashicorp/terraform/config/module", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "mPbjVPD2enEey45bP4M83W2AxlY=", "path": "github.com/hashicorp/terraform/dag", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "P8gNPDuOzmiK4Lz9xG7OBy4Rlm8=", "path": "github.com/hashicorp/terraform/flatmap", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "zx5DLo5aV0xDqxGTzSibXg7HHAA=", "path": "github.com/hashicorp/terraform/helper/acctest", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "uT6Q9RdSRAkDjyUgQlJ2XKJRab4=", "path": "github.com/hashicorp/terraform/helper/config", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "qVmQPoZmJ2w2OnaxIheWfuwun6g=", "path": "github.com/hashicorp/terraform/helper/customdiff", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "FH5eOEHfHgdxPC/JnfmCeSBk66U=", "path": "github.com/hashicorp/terraform/helper/encryption", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "KNvbU1r5jv0CBeQLnEtDoL3dRtc=", "path": "github.com/hashicorp/terraform/helper/hashcode", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "B267stWNQd0/pBTXHfI/tJsxzfc=", "path": "github.com/hashicorp/terraform/helper/hilmapstructure", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "BAXV9ruAyno3aFgwYI2/wWzB2Gc=", "path": "github.com/hashicorp/terraform/helper/logging", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "twkFd4x71kBnDfrdqO5nhs8dMOY=", "path": "github.com/hashicorp/terraform/helper/mutexkv", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "ImyqbHM/xe3eAT2moIjLI8ksuks=", "path": "github.com/hashicorp/terraform/helper/pathorcontents", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "ryCWu7RtMlYrAfSevaI7RtaXe98=", "path": "github.com/hashicorp/terraform/helper/resource", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { - "checksumSHA1": "JHxGzmxcIS8NyLX9pGhK5beIra4=", + "checksumSHA1": "zA2C6Pg+7DII0K3M0g49R/nRLvc=", "path": "github.com/hashicorp/terraform/helper/schema", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "Fzbv+N7hFXOtrR6E7ZcHT3jEE9s=", "path": "github.com/hashicorp/terraform/helper/structure", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "nEC56vB6M60BJtGPe+N9rziHqLg=", "path": "github.com/hashicorp/terraform/helper/validation", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "kD1ayilNruf2cES1LDfNZjYRscQ=", "path": "github.com/hashicorp/terraform/httpclient", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "yFWmdS6yEJZpRJzUqd/mULqCYGk=", "path": "github.com/hashicorp/terraform/moduledeps", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "DqaoG++NXRCfvH/OloneLWrM+3k=", "path": "github.com/hashicorp/terraform/plugin", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "tx5xrdiUWdAHqoRV5aEfALgT1aU=", "path": "github.com/hashicorp/terraform/plugin/discovery", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "f6wDpr0uHKZqQw4ztvxMrtiuvQo=", "path": "github.com/hashicorp/terraform/registry", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "cR87P4V5aiEfvF+1qoBi2JQyQS4=", "path": "github.com/hashicorp/terraform/registry/regsrc", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "y9IXgIJQq9XNy1zIYUV2Kc0KsnA=", "path": "github.com/hashicorp/terraform/registry/response", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "VXlzRRDVOqeMvnnrbUcR9H64OA4=", "path": "github.com/hashicorp/terraform/svchost", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "GzcKNlFL0N77JVjU8qbltXE4R3k=", "path": "github.com/hashicorp/terraform/svchost/auth", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "jiDWmQieUE6OoUBMs53hj9P/JDQ=", "path": "github.com/hashicorp/terraform/svchost/disco", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "lHCKONqlaHsn5cEaYltad7dvRq8=", "path": "github.com/hashicorp/terraform/terraform", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "+K+oz9mMTmQMxIA3KVkGRfjvm9I=", "path": "github.com/hashicorp/terraform/tfdiags", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { - "checksumSHA1": "+attjxAt9nwFpCjxWEL08YwpGD8=", + "checksumSHA1": "F1m/rnzqtFsc6PNMv2HWC1KZANY=", "path": "github.com/hashicorp/terraform/version", - "revision": "41e50bd32a8825a84535e353c3674af8ce799161", - "revisionTime": "2018-04-10T16:50:42Z", - "version": "v0.11.7", - "versionExact": "v0.11.7" + "revision": "ec998a21bc95366269fbd196e09d3a458bba8be7", + "revisionTime": "2018-06-20T18:39:08Z" }, { "checksumSHA1": "ft77GtqeZEeCXioGpF/s6DlGm/U=", From 65d5ea0b600ae549e3083648eee82eefd7d0d764 Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 13 Jul 2018 16:22:00 -0400 Subject: [PATCH 1851/3316] only set credit specification if t2 instance type --- aws/resource_aws_launch_template.go | 14 ++++++++---- aws/resource_aws_launch_template_test.go | 29 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index dfff76c8998..0923437c1b8 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "strconv" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -510,8 +511,10 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err return err } - if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { - return err + if strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t2") { + if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { + return err + } } if err := d.Set("elastic_gpu_specifications", getElasticGpuSpecifications(ltData.ElasticGpuSpecifications)); err != nil { @@ -786,8 +789,9 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.Req opts.InstanceInitiatedShutdownBehavior = aws.String(v.(string)) } - if v, ok := d.GetOk("instance_type"); ok { - opts.InstanceType = aws.String(v.(string)) + instanceType := d.Get("instance_type").(string) + if instanceType != "" { + opts.InstanceType = aws.String(instanceType) } if v, ok := d.GetOk("kernel_id"); ok { @@ -828,7 +832,7 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.Req opts.BlockDeviceMappings = blockDeviceMappings } - if v, ok := d.GetOk("credit_specification"); ok { + if v, ok := d.GetOk("credit_specification"); ok && strings.HasPrefix(instanceType, "t2") { cs := v.([]interface{}) if len(cs) > 0 { diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index 48f40d9f011..caee1e80b5f 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -161,6 +161,25 @@ func TestAccAWSLaunchTemplate_tags(t *testing.T) { }) } +func TestAccAWSLaunchTemplate_nonBurstable(t *testing.T) { + var template ec2.LaunchTemplate + resName := "aws_launch_template.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLaunchTemplateConfig_nonBurstable, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSLaunchTemplateExists(resName, &template), + ), + }, + }, + }) +} + func testAccCheckAWSLaunchTemplateExists(n string, t *ec2.LaunchTemplate) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -341,3 +360,13 @@ resource "aws_launch_template" "foo" { } `, rInt) } + +const testAccAWSLaunchTemplateConfig_nonBurstable = ` +resource "aws_launch_template" "foo" { + name = "non-burstable-launch-template" + instance_type = "m1.small" + credit_specification { + cpu_credits = "standard" + } +} +` From 57c8e49e209e29098d1f3acccf9e57158b8c3b26 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 13 Jul 2018 17:07:52 -0400 Subject: [PATCH 1852/3316] Enhance 'TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup'. --- ...ws_vpc_endpoint_subnet_association_test.go | 2 +- aws/resource_aws_vpc_endpoint_test.go | 30 +++++++++++++++---- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_vpc_endpoint_subnet_association_test.go b/aws/resource_aws_vpc_endpoint_subnet_association_test.go index 174fc5304ce..6aa78c832a9 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association_test.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association_test.go @@ -197,7 +197,7 @@ resource "aws_subnet" "sn" { availability_zone = "${data.aws_availability_zones.available.names[count.index]}" cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, count.index)}" tags { - Name = "${format("tf-acc-vpc-endpoint-subnet-association-%d", count.index + 1)}" + Name = "${format("tf-acc-vpc-endpoint-subnet-association-%d", count.index + 1)}" } } diff --git a/aws/resource_aws_vpc_endpoint_test.go b/aws/resource_aws_vpc_endpoint_test.go index 7b7669d0f1d..c5c462de541 100644 --- a/aws/resource_aws_vpc_endpoint_test.go +++ b/aws/resource_aws_vpc_endpoint_test.go @@ -135,7 +135,7 @@ func TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup(t *testing.T) { resource.TestCheckResourceAttr("aws_vpc_endpoint.ec2", "cidr_blocks.#", "0"), resource.TestCheckResourceAttr("aws_vpc_endpoint.ec2", "vpc_endpoint_type", "Interface"), resource.TestCheckResourceAttr("aws_vpc_endpoint.ec2", "route_table_ids.#", "0"), - resource.TestCheckResourceAttr("aws_vpc_endpoint.ec2", "subnet_ids.#", "2"), + resource.TestCheckResourceAttr("aws_vpc_endpoint.ec2", "subnet_ids.#", "3"), resource.TestCheckResourceAttr("aws_vpc_endpoint.ec2", "security_group_ids.#", "1"), resource.TestCheckResourceAttr("aws_vpc_endpoint.ec2", "private_dns_enabled", "true"), ), @@ -438,7 +438,7 @@ data "aws_availability_zones" "available" {} resource "aws_subnet" "sn1" { vpc_id = "${aws_vpc.foo.id}" - cidr_block = "10.0.0.0/17" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, 0)}" availability_zone = "${data.aws_availability_zones.available.names[0]}" tags { Name = "tf-acc-vpc-endpoint-iface-w-subnet-1" @@ -447,13 +447,22 @@ resource "aws_subnet" "sn1" { resource "aws_subnet" "sn2" { vpc_id = "${aws_vpc.foo.id}" - cidr_block = "10.0.128.0/17" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, 1)}" availability_zone = "${data.aws_availability_zones.available.names[1]}" tags { Name = "tf-acc-vpc-endpoint-iface-w-subnet-2" } } +resource "aws_subnet" "sn3" { + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, 2)}" + availability_zone = "${data.aws_availability_zones.available.names[2]}" + tags { + Name = "tf-acc-vpc-endpoint-iface-w-subnet-3" + } +} + resource "aws_security_group" "sg1" { vpc_id = "${aws_vpc.foo.id}" } @@ -488,7 +497,7 @@ data "aws_availability_zones" "available" {} resource "aws_subnet" "sn1" { vpc_id = "${aws_vpc.foo.id}" - cidr_block = "10.0.0.0/17" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, 0)}" availability_zone = "${data.aws_availability_zones.available.names[0]}" tags { Name = "tf-acc-vpc-endpoint-iface-w-subnet-1" @@ -497,13 +506,22 @@ resource "aws_subnet" "sn1" { resource "aws_subnet" "sn2" { vpc_id = "${aws_vpc.foo.id}" - cidr_block = "10.0.128.0/17" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, 1)}" availability_zone = "${data.aws_availability_zones.available.names[1]}" tags { Name = "tf-acc-vpc-endpoint-iface-w-subnet-2" } } +resource "aws_subnet" "sn3" { + vpc_id = "${aws_vpc.foo.id}" + cidr_block = "${cidrsubnet(aws_vpc.foo.cidr_block, 2, 2)}" + availability_zone = "${data.aws_availability_zones.available.names[2]}" + tags { + Name = "tf-acc-vpc-endpoint-iface-w-subnet-3" + } +} + resource "aws_security_group" "sg1" { vpc_id = "${aws_vpc.foo.id}" } @@ -516,7 +534,7 @@ resource "aws_vpc_endpoint" "ec2" { vpc_id = "${aws_vpc.foo.id}" service_name = "com.amazonaws.${data.aws_region.current.name}.ec2" vpc_endpoint_type = "Interface" - subnet_ids = ["${aws_subnet.sn1.id}", "${aws_subnet.sn2.id}"] + subnet_ids = ["${aws_subnet.sn1.id}", "${aws_subnet.sn2.id}", "${aws_subnet.sn3.id}"] security_group_ids = ["${aws_security_group.sg1.id}"] private_dns_enabled = true } From eca12c6871facfbbe846d5589551191e08ca6d20 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 13 Jul 2018 17:27:03 -0400 Subject: [PATCH 1853/3316] Add back mutex and delay for concurrent modifications. --- ...rce_aws_vpc_endpoint_subnet_association.go | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_vpc_endpoint_subnet_association.go b/aws/resource_aws_vpc_endpoint_subnet_association.go index ab3f4bb0d90..0527eb14374 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -52,10 +53,25 @@ func resourceAwsVpcEndpointSubnetAssociationCreate(d *schema.ResourceData, meta return err } - _, err = conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ - VpcEndpointId: aws.String(endpointId), - AddSubnetIds: aws.StringSlice([]string{snId}), - }) + // See https://github.com/terraform-providers/terraform-provider-aws/issues/3382. + // Prevent concurrent subnet association requests and delay between requests. + mk := "vpc_endpoint_subnet_association_" + endpointId + awsMutexKV.Lock(mk) + defer awsMutexKV.Unlock(mk) + + c := &resource.StateChangeConf{ + Delay: 1 * time.Minute, + Timeout: 3 * time.Minute, + Target: []string{"ok"}, + Refresh: func() (interface{}, string, error) { + res, err := conn.ModifyVpcEndpoint(&ec2.ModifyVpcEndpointInput{ + VpcEndpointId: aws.String(endpointId), + AddSubnetIds: aws.StringSlice([]string{snId}), + }) + return res, "ok", err + }, + } + _, err = c.WaitForState() if err != nil { return fmt.Errorf("Error creating Vpc Endpoint/Subnet association: %s", err) } From 2689979973b1fd6c3a9426977569fe431323ff09 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sat, 14 Jul 2018 12:21:19 +0400 Subject: [PATCH 1854/3316] add attribute configurations_json --- aws/resource_aws_emr_cluster.go | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index a8190f44940..1ea96f534bf 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -350,6 +350,17 @@ func resourceAwsEMRCluster() *schema.Resource { ForceNew: true, Optional: true, }, + "configurations_json": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateJsonString, + DiffSuppressFunc: suppressEquivalentJsonDiffs, + StateFunc: func(v interface{}) string { + json, _ := structure.NormalizeJsonString(v) + return json + }, + }, "service_role": { Type: schema.TypeString, ForceNew: true, @@ -542,6 +553,14 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error params.Configurations = expandConfigures(confUrl) } + if v, ok := d.GetOk("configurations_json"); ok { + info, err := structure.NormalizeJsonString(v) + if err != nil { + return fmt.Errorf("configurations_json contains an invalid JSON: %v", err) + } + params.Configurations = expandConfigurationJson(info) + } + if v, ok := d.GetOk("kerberos_attributes"); ok { kerberosAttributesList := v.([]interface{}) kerberosAttributesMap := kerberosAttributesList[0].(map[string]interface{}) @@ -666,6 +685,10 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[ERR] Error setting EMR configurations for cluster (%s): %s", d.Id(), err) } + if err := d.Set("configurations_json", cluster.Configurations); err != nil { + log.Printf("[ERR] Error setting EMR configurations_json for cluster (%s): %s", d.Id(), err) + } + if err := d.Set("ec2_attributes", flattenEc2Attributes(cluster.Ec2InstanceAttributes)); err != nil { log.Printf("[ERR] Error setting EMR Ec2 Attributes: %s", err) } @@ -1338,6 +1361,17 @@ func expandAutoScalingPolicy(rawDefinitions string) (*emr.AutoScalingPolicy, err return policy, nil } +func expandConfigurationJson(input string) []*emr.Configuration { + configsOut := []*emr.Configuration{} + err := json.Unmarshal([]byte(input), &configsOut) + if err != nil { + log.Printf("[ERROR] parsing JSON: %s", err) + } + log.Printf("[DEBUG] Expanded EMR Configurations %s", configsOut) + + return configsOut +} + func expandConfigures(input string) []*emr.Configuration { configsOut := []*emr.Configuration{} if strings.HasPrefix(input, "http") { From 8d5f859337a227b981c210891629a2319dfba709 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sat, 14 Jul 2018 12:57:27 +0400 Subject: [PATCH 1855/3316] add acceptance test for configurations_json --- aws/resource_aws_emr_cluster_test.go | 352 +++++++++++++++++++++++++++ 1 file changed, 352 insertions(+) diff --git a/aws/resource_aws_emr_cluster_test.go b/aws/resource_aws_emr_cluster_test.go index 48f44d31496..8f65778601d 100644 --- a/aws/resource_aws_emr_cluster_test.go +++ b/aws/resource_aws_emr_cluster_test.go @@ -54,6 +54,25 @@ func TestAccAWSEMRCluster_additionalInfo(t *testing.T) { }) } +func TestAccAWSEMRCluster_configurationsJson(t *testing.T) { + var cluster emr.Cluster + r := acctest.RandInt() + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSEmrDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSEmrClusterConfigConfigurationsJson(r), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), + resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "step.#", "0"), + ), + }, + }, + }) +} + func TestAccAWSEMRCluster_instance_group(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() @@ -1403,6 +1422,339 @@ resource "aws_iam_role_policy_attachment" "emr-autoscaling-role" { `, r) } +func testAccAWSEmrClusterConfigConfigurationsJson(r int) string { + return fmt.Sprintf(` +resource "aws_emr_cluster" "tf-test-cluster" { + name = "emr-test-%[1]d" + release_label = "emr-4.6.0" + applications = ["Hadoop","Spark"] + + ec2_attributes { + subnet_id = "${aws_subnet.main.id}" + emr_managed_master_security_group = "${aws_security_group.allow_all.id}" + emr_managed_slave_security_group = "${aws_security_group.allow_all.id}" + instance_profile = "${aws_iam_instance_profile.emr_profile.arn}" + } + + master_instance_type = "c4.large" + core_instance_type = "c4.large" + core_instance_count = 1 + + tags { + role = "rolename" + dns_zone = "env_zone" + env = "env" + name = "name-env" + } + + keep_job_flow_alive_when_no_steps = true + termination_protection = false + + + bootstrap_action { + path = "s3://elasticmapreduce/bootstrap-actions/run-if" + name = "runif" + args = ["instance.isMaster=true", "echo running on master node"] + } + + configurations_json = < Date: Sat, 14 Jul 2018 14:29:58 +0400 Subject: [PATCH 1856/3316] add documentation for configurations_json --- website/docs/r/emr_cluster.html.markdown | 63 +++++++++++++++++++++++- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/website/docs/r/emr_cluster.html.markdown b/website/docs/r/emr_cluster.html.markdown index 64e86fa5129..6adaaef877d 100644 --- a/website/docs/r/emr_cluster.html.markdown +++ b/website/docs/r/emr_cluster.html.markdown @@ -99,7 +99,36 @@ EOF args = ["instance.isMaster=true", "echo running on master node"] } - configurations = "test-fixtures/emr_configurations.json" + configurations_json = < Date: Sat, 14 Jul 2018 15:09:51 +0400 Subject: [PATCH 1857/3316] update acceptance test for configurations_json --- aws/resource_aws_emr_cluster_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_emr_cluster_test.go b/aws/resource_aws_emr_cluster_test.go index 8f65778601d..05505290045 100644 --- a/aws/resource_aws_emr_cluster_test.go +++ b/aws/resource_aws_emr_cluster_test.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "reflect" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -66,7 +67,8 @@ func TestAccAWSEMRCluster_configurationsJson(t *testing.T) { Config: testAccAWSEmrClusterConfigConfigurationsJson(r), Check: resource.ComposeTestCheckFunc( testAccCheckAWSEmrClusterExists("aws_emr_cluster.tf-test-cluster", &cluster), - resource.TestCheckResourceAttr("aws_emr_cluster.tf-test-cluster", "step.#", "0"), + resource.TestMatchResourceAttr("aws_emr_cluster.tf-test-cluster", "configurations_json", + regexp.MustCompile("{\"JAVA_HOME\":\"/usr/lib/jvm/java-1.8.0\".+")), ), }, }, From 9d5073106fd2f9524efadf86049f7adcad318c08 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 14 Jul 2018 14:11:37 -0400 Subject: [PATCH 1858/3316] vendor: aws/aws-sdk-go/service/storagegateway@v1.14.26 --- .../aws-sdk-go/service/storagegateway/api.go | 15667 ++++++++++++++++ .../aws-sdk-go/service/storagegateway/doc.go | 79 + .../service/storagegateway/errors.go | 27 + .../service/storagegateway/service.go | 97 + vendor/vendor.json | 8 + 5 files changed, 15878 insertions(+) create mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go new file mode 100644 index 00000000000..25a3628b6aa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -0,0 +1,15667 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package storagegateway + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opActivateGateway = "ActivateGateway" + +// ActivateGatewayRequest generates a "aws/request.Request" representing the +// client's request for the ActivateGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ActivateGateway for more information on using the ActivateGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ActivateGatewayRequest method. +// req, resp := client.ActivateGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway +func (c *StorageGateway) ActivateGatewayRequest(input *ActivateGatewayInput) (req *request.Request, output *ActivateGatewayOutput) { + op := &request.Operation{ + Name: opActivateGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ActivateGatewayInput{} + } + + output = &ActivateGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// ActivateGateway API operation for AWS Storage Gateway. +// +// Activates the gateway you previously deployed on your host. In the activation +// process, you specify information such as the region you want to use for storing +// snapshots or tapes, the time zone for scheduled snapshots the gateway snapshot +// schedule window, an activation key, and a name for your gateway. The activation +// process also associates your gateway with your account; for more information, +// see UpdateGatewayInformation. +// +// You must turn on the gateway VM before you can activate your gateway. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ActivateGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway +func (c *StorageGateway) ActivateGateway(input *ActivateGatewayInput) (*ActivateGatewayOutput, error) { + req, out := c.ActivateGatewayRequest(input) + return out, req.Send() +} + +// ActivateGatewayWithContext is the same as ActivateGateway with the addition of +// the ability to pass a context and additional request options. +// +// See ActivateGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ActivateGatewayWithContext(ctx aws.Context, input *ActivateGatewayInput, opts ...request.Option) (*ActivateGatewayOutput, error) { + req, out := c.ActivateGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddCache = "AddCache" + +// AddCacheRequest generates a "aws/request.Request" representing the +// client's request for the AddCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddCache for more information on using the AddCache +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddCacheRequest method. +// req, resp := client.AddCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache +func (c *StorageGateway) AddCacheRequest(input *AddCacheInput) (req *request.Request, output *AddCacheOutput) { + op := &request.Operation{ + Name: opAddCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddCacheInput{} + } + + output = &AddCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddCache API operation for AWS Storage Gateway. +// +// Configures one or more gateway local disks as cache for a gateway. This operation +// is only supported in the cached volume, tape and file gateway type (see Storage +// Gateway Concepts (http://docs.aws.amazon.com/storagegateway/latest/userguide/StorageGatewayConcepts.html)). +// +// In the request, you specify the gateway Amazon Resource Name (ARN) to which +// you want to add cache, and one or more disk IDs that you want to configure +// as cache. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation AddCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache +func (c *StorageGateway) AddCache(input *AddCacheInput) (*AddCacheOutput, error) { + req, out := c.AddCacheRequest(input) + return out, req.Send() +} + +// AddCacheWithContext is the same as AddCache with the addition of +// the ability to pass a context and additional request options. +// +// See AddCache for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) AddCacheWithContext(ctx aws.Context, input *AddCacheInput, opts ...request.Option) (*AddCacheOutput, error) { + req, out := c.AddCacheRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddTagsToResource = "AddTagsToResource" + +// AddTagsToResourceRequest generates a "aws/request.Request" representing the +// client's request for the AddTagsToResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddTagsToResource for more information on using the AddTagsToResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddTagsToResourceRequest method. +// req, resp := client.AddTagsToResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddTagsToResource +func (c *StorageGateway) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { + op := &request.Operation{ + Name: opAddTagsToResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddTagsToResourceInput{} + } + + output = &AddTagsToResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddTagsToResource API operation for AWS Storage Gateway. +// +// Adds one or more tags to the specified resource. You use tags to add metadata +// to resources, which you can use to categorize these resources. For example, +// you can categorize resources by purpose, owner, environment, or team. Each +// tag consists of a key and a value, which you define. You can add tags to +// the following AWS Storage Gateway resources: +// +// * Storage gateways of all types +// +// * Storage Volumes +// +// * Virtual Tapes +// +// You can create a maximum of 10 tags for each resource. Virtual tapes and +// storage volumes that are recovered to a new gateway maintain their tags. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation AddTagsToResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddTagsToResource +func (c *StorageGateway) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { + req, out := c.AddTagsToResourceRequest(input) + return out, req.Send() +} + +// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of +// the ability to pass a context and additional request options. +// +// See AddTagsToResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { + req, out := c.AddTagsToResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddUploadBuffer = "AddUploadBuffer" + +// AddUploadBufferRequest generates a "aws/request.Request" representing the +// client's request for the AddUploadBuffer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddUploadBuffer for more information on using the AddUploadBuffer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddUploadBufferRequest method. +// req, resp := client.AddUploadBufferRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer +func (c *StorageGateway) AddUploadBufferRequest(input *AddUploadBufferInput) (req *request.Request, output *AddUploadBufferOutput) { + op := &request.Operation{ + Name: opAddUploadBuffer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddUploadBufferInput{} + } + + output = &AddUploadBufferOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddUploadBuffer API operation for AWS Storage Gateway. +// +// Configures one or more gateway local disks as upload buffer for a specified +// gateway. This operation is supported for the stored volume, cached volume +// and tape gateway types. +// +// In the request, you specify the gateway Amazon Resource Name (ARN) to which +// you want to add upload buffer, and one or more disk IDs that you want to +// configure as upload buffer. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation AddUploadBuffer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer +func (c *StorageGateway) AddUploadBuffer(input *AddUploadBufferInput) (*AddUploadBufferOutput, error) { + req, out := c.AddUploadBufferRequest(input) + return out, req.Send() +} + +// AddUploadBufferWithContext is the same as AddUploadBuffer with the addition of +// the ability to pass a context and additional request options. +// +// See AddUploadBuffer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) AddUploadBufferWithContext(ctx aws.Context, input *AddUploadBufferInput, opts ...request.Option) (*AddUploadBufferOutput, error) { + req, out := c.AddUploadBufferRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddWorkingStorage = "AddWorkingStorage" + +// AddWorkingStorageRequest generates a "aws/request.Request" representing the +// client's request for the AddWorkingStorage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddWorkingStorage for more information on using the AddWorkingStorage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddWorkingStorageRequest method. +// req, resp := client.AddWorkingStorageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage +func (c *StorageGateway) AddWorkingStorageRequest(input *AddWorkingStorageInput) (req *request.Request, output *AddWorkingStorageOutput) { + op := &request.Operation{ + Name: opAddWorkingStorage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddWorkingStorageInput{} + } + + output = &AddWorkingStorageOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddWorkingStorage API operation for AWS Storage Gateway. +// +// Configures one or more gateway local disks as working storage for a gateway. +// This operation is only supported in the stored volume gateway type. This +// operation is deprecated in cached volume API version 20120630. Use AddUploadBuffer +// instead. +// +// Working storage is also referred to as upload buffer. You can also use the +// AddUploadBuffer operation to add upload buffer to a stored volume gateway. +// +// In the request, you specify the gateway Amazon Resource Name (ARN) to which +// you want to add working storage, and one or more disk IDs that you want to +// configure as working storage. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation AddWorkingStorage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage +func (c *StorageGateway) AddWorkingStorage(input *AddWorkingStorageInput) (*AddWorkingStorageOutput, error) { + req, out := c.AddWorkingStorageRequest(input) + return out, req.Send() +} + +// AddWorkingStorageWithContext is the same as AddWorkingStorage with the addition of +// the ability to pass a context and additional request options. +// +// See AddWorkingStorage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) AddWorkingStorageWithContext(ctx aws.Context, input *AddWorkingStorageInput, opts ...request.Option) (*AddWorkingStorageOutput, error) { + req, out := c.AddWorkingStorageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCancelArchival = "CancelArchival" + +// CancelArchivalRequest generates a "aws/request.Request" representing the +// client's request for the CancelArchival operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelArchival for more information on using the CancelArchival +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelArchivalRequest method. +// req, resp := client.CancelArchivalRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival +func (c *StorageGateway) CancelArchivalRequest(input *CancelArchivalInput) (req *request.Request, output *CancelArchivalOutput) { + op := &request.Operation{ + Name: opCancelArchival, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelArchivalInput{} + } + + output = &CancelArchivalOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelArchival API operation for AWS Storage Gateway. +// +// Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after +// the archiving process is initiated. This operation is only supported in the +// tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CancelArchival for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival +func (c *StorageGateway) CancelArchival(input *CancelArchivalInput) (*CancelArchivalOutput, error) { + req, out := c.CancelArchivalRequest(input) + return out, req.Send() +} + +// CancelArchivalWithContext is the same as CancelArchival with the addition of +// the ability to pass a context and additional request options. +// +// See CancelArchival for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CancelArchivalWithContext(ctx aws.Context, input *CancelArchivalInput, opts ...request.Option) (*CancelArchivalOutput, error) { + req, out := c.CancelArchivalRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCancelRetrieval = "CancelRetrieval" + +// CancelRetrievalRequest generates a "aws/request.Request" representing the +// client's request for the CancelRetrieval operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelRetrieval for more information on using the CancelRetrieval +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelRetrievalRequest method. +// req, resp := client.CancelRetrievalRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval +func (c *StorageGateway) CancelRetrievalRequest(input *CancelRetrievalInput) (req *request.Request, output *CancelRetrievalOutput) { + op := &request.Operation{ + Name: opCancelRetrieval, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelRetrievalInput{} + } + + output = &CancelRetrievalOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelRetrieval API operation for AWS Storage Gateway. +// +// Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to +// a gateway after the retrieval process is initiated. The virtual tape is returned +// to the VTS. This operation is only supported in the tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CancelRetrieval for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval +func (c *StorageGateway) CancelRetrieval(input *CancelRetrievalInput) (*CancelRetrievalOutput, error) { + req, out := c.CancelRetrievalRequest(input) + return out, req.Send() +} + +// CancelRetrievalWithContext is the same as CancelRetrieval with the addition of +// the ability to pass a context and additional request options. +// +// See CancelRetrieval for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CancelRetrievalWithContext(ctx aws.Context, input *CancelRetrievalInput, opts ...request.Option) (*CancelRetrievalOutput, error) { + req, out := c.CancelRetrievalRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCachediSCSIVolume = "CreateCachediSCSIVolume" + +// CreateCachediSCSIVolumeRequest generates a "aws/request.Request" representing the +// client's request for the CreateCachediSCSIVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCachediSCSIVolume for more information on using the CreateCachediSCSIVolume +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCachediSCSIVolumeRequest method. +// req, resp := client.CreateCachediSCSIVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume +func (c *StorageGateway) CreateCachediSCSIVolumeRequest(input *CreateCachediSCSIVolumeInput) (req *request.Request, output *CreateCachediSCSIVolumeOutput) { + op := &request.Operation{ + Name: opCreateCachediSCSIVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCachediSCSIVolumeInput{} + } + + output = &CreateCachediSCSIVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCachediSCSIVolume API operation for AWS Storage Gateway. +// +// Creates a cached volume on a specified cached volume gateway. This operation +// is only supported in the cached volume gateway type. +// +// Cache storage must be allocated to the gateway before you can create a cached +// volume. Use the AddCache operation to add cache storage to a gateway. +// +// In the request, you must specify the gateway, size of the volume in bytes, +// the iSCSI target name, an IP address on which to expose the target, and a +// unique client token. In response, the gateway creates the volume and returns +// information about it. This information includes the volume Amazon Resource +// Name (ARN), its size, and the iSCSI target ARN that initiators can use to +// connect to the volume target. +// +// Optionally, you can provide the ARN for an existing volume as the SourceVolumeARN +// for this cached volume, which creates an exact copy of the existing volume’s +// latest recovery point. The VolumeSizeInBytes value must be equal to or larger +// than the size of the copied volume, in bytes. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateCachediSCSIVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume +func (c *StorageGateway) CreateCachediSCSIVolume(input *CreateCachediSCSIVolumeInput) (*CreateCachediSCSIVolumeOutput, error) { + req, out := c.CreateCachediSCSIVolumeRequest(input) + return out, req.Send() +} + +// CreateCachediSCSIVolumeWithContext is the same as CreateCachediSCSIVolume with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCachediSCSIVolume for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateCachediSCSIVolumeWithContext(ctx aws.Context, input *CreateCachediSCSIVolumeInput, opts ...request.Option) (*CreateCachediSCSIVolumeOutput, error) { + req, out := c.CreateCachediSCSIVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateNFSFileShare = "CreateNFSFileShare" + +// CreateNFSFileShareRequest generates a "aws/request.Request" representing the +// client's request for the CreateNFSFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateNFSFileShare for more information on using the CreateNFSFileShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateNFSFileShareRequest method. +// req, resp := client.CreateNFSFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare +func (c *StorageGateway) CreateNFSFileShareRequest(input *CreateNFSFileShareInput) (req *request.Request, output *CreateNFSFileShareOutput) { + op := &request.Operation{ + Name: opCreateNFSFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateNFSFileShareInput{} + } + + output = &CreateNFSFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateNFSFileShare API operation for AWS Storage Gateway. +// +// Creates a Network File System (NFS) file share on an existing file gateway. +// In Storage Gateway, a file share is a file system mount point backed by Amazon +// S3 cloud storage. Storage Gateway exposes file shares using a NFS interface. +// This operation is only supported in the file gateway type. +// +// File gateway requires AWS Security Token Service (AWS STS) to be activated +// to enable you create a file share. Make sure AWS STS is activated in the +// region you are creating your file gateway in. If AWS STS is not activated +// in the region, activate it. For information about how to activate AWS STS, +// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity +// and Access Management User Guide. +// +// File gateway does not support creating hard or symbolic links on a file share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateNFSFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare +func (c *StorageGateway) CreateNFSFileShare(input *CreateNFSFileShareInput) (*CreateNFSFileShareOutput, error) { + req, out := c.CreateNFSFileShareRequest(input) + return out, req.Send() +} + +// CreateNFSFileShareWithContext is the same as CreateNFSFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See CreateNFSFileShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateNFSFileShareWithContext(ctx aws.Context, input *CreateNFSFileShareInput, opts ...request.Option) (*CreateNFSFileShareOutput, error) { + req, out := c.CreateNFSFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSMBFileShare = "CreateSMBFileShare" + +// CreateSMBFileShareRequest generates a "aws/request.Request" representing the +// client's request for the CreateSMBFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSMBFileShare for more information on using the CreateSMBFileShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSMBFileShareRequest method. +// req, resp := client.CreateSMBFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare +func (c *StorageGateway) CreateSMBFileShareRequest(input *CreateSMBFileShareInput) (req *request.Request, output *CreateSMBFileShareOutput) { + op := &request.Operation{ + Name: opCreateSMBFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSMBFileShareInput{} + } + + output = &CreateSMBFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSMBFileShare API operation for AWS Storage Gateway. +// +// Creates a Server Message Block (SMB) file share on an existing file gateway. +// In Storage Gateway, a file share is a file system mount point backed by Amazon +// S3 cloud storage. Storage Gateway expose file shares using a SMB interface. +// This operation is only supported in the file gateway type. +// +// File gateway requires AWS Security Token Service (AWS STS) to be activated +// to enable you create a file share. Make sure AWS STS is activated in the +// region you are creating your file gateway in. If AWS STS is not activated +// in the region, activate it. For information about how to activate AWS STS, +// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity +// and Access Management User Guide. +// +// File gateway does not support creating hard or symbolic links on a file share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateSMBFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare +func (c *StorageGateway) CreateSMBFileShare(input *CreateSMBFileShareInput) (*CreateSMBFileShareOutput, error) { + req, out := c.CreateSMBFileShareRequest(input) + return out, req.Send() +} + +// CreateSMBFileShareWithContext is the same as CreateSMBFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSMBFileShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateSMBFileShareWithContext(ctx aws.Context, input *CreateSMBFileShareInput, opts ...request.Option) (*CreateSMBFileShareOutput, error) { + req, out := c.CreateSMBFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSnapshot = "CreateSnapshot" + +// CreateSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSnapshot for more information on using the CreateSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSnapshotRequest method. +// req, resp := client.CreateSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot +func (c *StorageGateway) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *CreateSnapshotOutput) { + op := &request.Operation{ + Name: opCreateSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSnapshotInput{} + } + + output = &CreateSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSnapshot API operation for AWS Storage Gateway. +// +// Initiates a snapshot of a volume. +// +// AWS Storage Gateway provides the ability to back up point-in-time snapshots +// of your data to Amazon Simple Storage (S3) for durable off-site recovery, +// as well as import the data to an Amazon Elastic Block Store (EBS) volume +// in Amazon Elastic Compute Cloud (EC2). You can take snapshots of your gateway +// volume on a scheduled or ad-hoc basis. This API enables you to take ad-hoc +// snapshot. For more information, see Editing a Snapshot Schedule (http://docs.aws.amazon.com/storagegateway/latest/userguide/managing-volumes.html#SchedulingSnapshot). +// +// In the CreateSnapshot request you identify the volume by providing its Amazon +// Resource Name (ARN). You must also provide description for the snapshot. +// When AWS Storage Gateway takes the snapshot of specified volume, the snapshot +// and description appears in the AWS Storage Gateway Console. In response, +// AWS Storage Gateway returns you a snapshot ID. You can use this snapshot +// ID to check the snapshot progress or later use it when you want to create +// a volume from a snapshot. This operation is only supported in stored and +// cached volume gateway type. +// +// To list or delete a snapshot, you must use the Amazon EC2 API. For more information, +// see DescribeSnapshots or DeleteSnapshot in the EC2 API reference (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Operations.html). +// +// Volume and snapshot IDs are changing to a longer length ID format. For more +// information, see the important note on the Welcome (http://docs.aws.amazon.com/storagegateway/latest/APIReference/Welcome.html) +// page. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// * ErrCodeServiceUnavailableError "ServiceUnavailableError" +// An internal server error has occurred because the service is unavailable. +// For more information, see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot +func (c *StorageGateway) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error) { + req, out := c.CreateSnapshotRequest(input) + return out, req.Send() +} + +// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*CreateSnapshotOutput, error) { + req, out := c.CreateSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSnapshotFromVolumeRecoveryPoint = "CreateSnapshotFromVolumeRecoveryPoint" + +// CreateSnapshotFromVolumeRecoveryPointRequest generates a "aws/request.Request" representing the +// client's request for the CreateSnapshotFromVolumeRecoveryPoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateSnapshotFromVolumeRecoveryPoint for more information on using the CreateSnapshotFromVolumeRecoveryPoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateSnapshotFromVolumeRecoveryPointRequest method. +// req, resp := client.CreateSnapshotFromVolumeRecoveryPointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint +func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPointRequest(input *CreateSnapshotFromVolumeRecoveryPointInput) (req *request.Request, output *CreateSnapshotFromVolumeRecoveryPointOutput) { + op := &request.Operation{ + Name: opCreateSnapshotFromVolumeRecoveryPoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSnapshotFromVolumeRecoveryPointInput{} + } + + output = &CreateSnapshotFromVolumeRecoveryPointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSnapshotFromVolumeRecoveryPoint API operation for AWS Storage Gateway. +// +// Initiates a snapshot of a gateway from a volume recovery point. This operation +// is only supported in the cached volume gateway type. +// +// A volume recovery point is a point in time at which all data of the volume +// is consistent and from which you can create a snapshot. To get a list of +// volume recovery point for cached volume gateway, use ListVolumeRecoveryPoints. +// +// In the CreateSnapshotFromVolumeRecoveryPoint request, you identify the volume +// by providing its Amazon Resource Name (ARN). You must also provide a description +// for the snapshot. When the gateway takes a snapshot of the specified volume, +// the snapshot and its description appear in the AWS Storage Gateway console. +// In response, the gateway returns you a snapshot ID. You can use this snapshot +// ID to check the snapshot progress or later use it when you want to create +// a volume from a snapshot. +// +// To list or delete a snapshot, you must use the Amazon EC2 API. For more information, +// in Amazon Elastic Compute Cloud API Reference. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateSnapshotFromVolumeRecoveryPoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// * ErrCodeServiceUnavailableError "ServiceUnavailableError" +// An internal server error has occurred because the service is unavailable. +// For more information, see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint +func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPoint(input *CreateSnapshotFromVolumeRecoveryPointInput) (*CreateSnapshotFromVolumeRecoveryPointOutput, error) { + req, out := c.CreateSnapshotFromVolumeRecoveryPointRequest(input) + return out, req.Send() +} + +// CreateSnapshotFromVolumeRecoveryPointWithContext is the same as CreateSnapshotFromVolumeRecoveryPoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSnapshotFromVolumeRecoveryPoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPointWithContext(ctx aws.Context, input *CreateSnapshotFromVolumeRecoveryPointInput, opts ...request.Option) (*CreateSnapshotFromVolumeRecoveryPointOutput, error) { + req, out := c.CreateSnapshotFromVolumeRecoveryPointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateStorediSCSIVolume = "CreateStorediSCSIVolume" + +// CreateStorediSCSIVolumeRequest generates a "aws/request.Request" representing the +// client's request for the CreateStorediSCSIVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateStorediSCSIVolume for more information on using the CreateStorediSCSIVolume +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateStorediSCSIVolumeRequest method. +// req, resp := client.CreateStorediSCSIVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume +func (c *StorageGateway) CreateStorediSCSIVolumeRequest(input *CreateStorediSCSIVolumeInput) (req *request.Request, output *CreateStorediSCSIVolumeOutput) { + op := &request.Operation{ + Name: opCreateStorediSCSIVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateStorediSCSIVolumeInput{} + } + + output = &CreateStorediSCSIVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateStorediSCSIVolume API operation for AWS Storage Gateway. +// +// Creates a volume on a specified gateway. This operation is only supported +// in the stored volume gateway type. +// +// The size of the volume to create is inferred from the disk size. You can +// choose to preserve existing data on the disk, create volume from an existing +// snapshot, or create an empty volume. If you choose to create an empty gateway +// volume, then any existing data on the disk is erased. +// +// In the request you must specify the gateway and the disk information on which +// you are creating the volume. In response, the gateway creates the volume +// and returns volume information such as the volume Amazon Resource Name (ARN), +// its size, and the iSCSI target ARN that initiators can use to connect to +// the volume target. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateStorediSCSIVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume +func (c *StorageGateway) CreateStorediSCSIVolume(input *CreateStorediSCSIVolumeInput) (*CreateStorediSCSIVolumeOutput, error) { + req, out := c.CreateStorediSCSIVolumeRequest(input) + return out, req.Send() +} + +// CreateStorediSCSIVolumeWithContext is the same as CreateStorediSCSIVolume with the addition of +// the ability to pass a context and additional request options. +// +// See CreateStorediSCSIVolume for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateStorediSCSIVolumeWithContext(ctx aws.Context, input *CreateStorediSCSIVolumeInput, opts ...request.Option) (*CreateStorediSCSIVolumeOutput, error) { + req, out := c.CreateStorediSCSIVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTapeWithBarcode = "CreateTapeWithBarcode" + +// CreateTapeWithBarcodeRequest generates a "aws/request.Request" representing the +// client's request for the CreateTapeWithBarcode operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTapeWithBarcode for more information on using the CreateTapeWithBarcode +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTapeWithBarcodeRequest method. +// req, resp := client.CreateTapeWithBarcodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode +func (c *StorageGateway) CreateTapeWithBarcodeRequest(input *CreateTapeWithBarcodeInput) (req *request.Request, output *CreateTapeWithBarcodeOutput) { + op := &request.Operation{ + Name: opCreateTapeWithBarcode, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTapeWithBarcodeInput{} + } + + output = &CreateTapeWithBarcodeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTapeWithBarcode API operation for AWS Storage Gateway. +// +// Creates a virtual tape by using your own barcode. You write data to the virtual +// tape and then archive the tape. A barcode is unique and can not be reused +// if it has already been used on a tape . This applies to barcodes used on +// deleted tapes. This operation is only supported in the tape gateway type. +// +// Cache storage must be allocated to the gateway before you can create a virtual +// tape. Use the AddCache operation to add cache storage to a gateway. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateTapeWithBarcode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode +func (c *StorageGateway) CreateTapeWithBarcode(input *CreateTapeWithBarcodeInput) (*CreateTapeWithBarcodeOutput, error) { + req, out := c.CreateTapeWithBarcodeRequest(input) + return out, req.Send() +} + +// CreateTapeWithBarcodeWithContext is the same as CreateTapeWithBarcode with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTapeWithBarcode for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateTapeWithBarcodeWithContext(ctx aws.Context, input *CreateTapeWithBarcodeInput, opts ...request.Option) (*CreateTapeWithBarcodeOutput, error) { + req, out := c.CreateTapeWithBarcodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTapes = "CreateTapes" + +// CreateTapesRequest generates a "aws/request.Request" representing the +// client's request for the CreateTapes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTapes for more information on using the CreateTapes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTapesRequest method. +// req, resp := client.CreateTapesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes +func (c *StorageGateway) CreateTapesRequest(input *CreateTapesInput) (req *request.Request, output *CreateTapesOutput) { + op := &request.Operation{ + Name: opCreateTapes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTapesInput{} + } + + output = &CreateTapesOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTapes API operation for AWS Storage Gateway. +// +// Creates one or more virtual tapes. You write data to the virtual tapes and +// then archive the tapes. This operation is only supported in the tape gateway +// type. +// +// Cache storage must be allocated to the gateway before you can create virtual +// tapes. Use the AddCache operation to add cache storage to a gateway. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation CreateTapes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes +func (c *StorageGateway) CreateTapes(input *CreateTapesInput) (*CreateTapesOutput, error) { + req, out := c.CreateTapesRequest(input) + return out, req.Send() +} + +// CreateTapesWithContext is the same as CreateTapes with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTapes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) CreateTapesWithContext(ctx aws.Context, input *CreateTapesInput, opts ...request.Option) (*CreateTapesOutput, error) { + req, out := c.CreateTapesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBandwidthRateLimit = "DeleteBandwidthRateLimit" + +// DeleteBandwidthRateLimitRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBandwidthRateLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBandwidthRateLimit for more information on using the DeleteBandwidthRateLimit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBandwidthRateLimitRequest method. +// req, resp := client.DeleteBandwidthRateLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit +func (c *StorageGateway) DeleteBandwidthRateLimitRequest(input *DeleteBandwidthRateLimitInput) (req *request.Request, output *DeleteBandwidthRateLimitOutput) { + op := &request.Operation{ + Name: opDeleteBandwidthRateLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteBandwidthRateLimitInput{} + } + + output = &DeleteBandwidthRateLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBandwidthRateLimit API operation for AWS Storage Gateway. +// +// Deletes the bandwidth rate limits of a gateway. You can delete either the +// upload and download bandwidth rate limit, or you can delete both. If you +// delete only one of the limits, the other limit remains unchanged. To specify +// which gateway to work with, use the Amazon Resource Name (ARN) of the gateway +// in your request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteBandwidthRateLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit +func (c *StorageGateway) DeleteBandwidthRateLimit(input *DeleteBandwidthRateLimitInput) (*DeleteBandwidthRateLimitOutput, error) { + req, out := c.DeleteBandwidthRateLimitRequest(input) + return out, req.Send() +} + +// DeleteBandwidthRateLimitWithContext is the same as DeleteBandwidthRateLimit with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBandwidthRateLimit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteBandwidthRateLimitWithContext(ctx aws.Context, input *DeleteBandwidthRateLimitInput, opts ...request.Option) (*DeleteBandwidthRateLimitOutput, error) { + req, out := c.DeleteBandwidthRateLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteChapCredentials = "DeleteChapCredentials" + +// DeleteChapCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteChapCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteChapCredentials for more information on using the DeleteChapCredentials +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteChapCredentialsRequest method. +// req, resp := client.DeleteChapCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials +func (c *StorageGateway) DeleteChapCredentialsRequest(input *DeleteChapCredentialsInput) (req *request.Request, output *DeleteChapCredentialsOutput) { + op := &request.Operation{ + Name: opDeleteChapCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteChapCredentialsInput{} + } + + output = &DeleteChapCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteChapCredentials API operation for AWS Storage Gateway. +// +// Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for +// a specified iSCSI target and initiator pair. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteChapCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials +func (c *StorageGateway) DeleteChapCredentials(input *DeleteChapCredentialsInput) (*DeleteChapCredentialsOutput, error) { + req, out := c.DeleteChapCredentialsRequest(input) + return out, req.Send() +} + +// DeleteChapCredentialsWithContext is the same as DeleteChapCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteChapCredentials for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteChapCredentialsWithContext(ctx aws.Context, input *DeleteChapCredentialsInput, opts ...request.Option) (*DeleteChapCredentialsOutput, error) { + req, out := c.DeleteChapCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteFileShare = "DeleteFileShare" + +// DeleteFileShareRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFileShare for more information on using the DeleteFileShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFileShareRequest method. +// req, resp := client.DeleteFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare +func (c *StorageGateway) DeleteFileShareRequest(input *DeleteFileShareInput) (req *request.Request, output *DeleteFileShareOutput) { + op := &request.Operation{ + Name: opDeleteFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFileShareInput{} + } + + output = &DeleteFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFileShare API operation for AWS Storage Gateway. +// +// Deletes a file share from a file gateway. This operation is only supported +// in the file gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare +func (c *StorageGateway) DeleteFileShare(input *DeleteFileShareInput) (*DeleteFileShareOutput, error) { + req, out := c.DeleteFileShareRequest(input) + return out, req.Send() +} + +// DeleteFileShareWithContext is the same as DeleteFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFileShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteFileShareWithContext(ctx aws.Context, input *DeleteFileShareInput, opts ...request.Option) (*DeleteFileShareOutput, error) { + req, out := c.DeleteFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGateway = "DeleteGateway" + +// DeleteGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGateway for more information on using the DeleteGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGatewayRequest method. +// req, resp := client.DeleteGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway +func (c *StorageGateway) DeleteGatewayRequest(input *DeleteGatewayInput) (req *request.Request, output *DeleteGatewayOutput) { + op := &request.Operation{ + Name: opDeleteGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteGatewayInput{} + } + + output = &DeleteGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGateway API operation for AWS Storage Gateway. +// +// Deletes a gateway. To specify which gateway to delete, use the Amazon Resource +// Name (ARN) of the gateway in your request. The operation deletes the gateway; +// however, it does not delete the gateway virtual machine (VM) from your host +// computer. +// +// After you delete a gateway, you cannot reactivate it. Completed snapshots +// of the gateway volumes are not deleted upon deleting the gateway, however, +// pending snapshots will not complete. After you delete a gateway, your next +// step is to remove it from your environment. +// +// You no longer pay software charges after the gateway is deleted; however, +// your existing Amazon EBS snapshots persist and you will continue to be billed +// for these snapshots. You can choose to remove all remaining Amazon EBS snapshots +// by canceling your Amazon EC2 subscription.  If you prefer not to cancel your +// Amazon EC2 subscription, you can delete your snapshots using the Amazon EC2 +// console. For more information, see the AWS Storage Gateway Detail Page (http://aws.amazon.com/storagegateway). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway +func (c *StorageGateway) DeleteGateway(input *DeleteGatewayInput) (*DeleteGatewayOutput, error) { + req, out := c.DeleteGatewayRequest(input) + return out, req.Send() +} + +// DeleteGatewayWithContext is the same as DeleteGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteGatewayWithContext(ctx aws.Context, input *DeleteGatewayInput, opts ...request.Option) (*DeleteGatewayOutput, error) { + req, out := c.DeleteGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSnapshotSchedule = "DeleteSnapshotSchedule" + +// DeleteSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSnapshotSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSnapshotSchedule for more information on using the DeleteSnapshotSchedule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSnapshotScheduleRequest method. +// req, resp := client.DeleteSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule +func (c *StorageGateway) DeleteSnapshotScheduleRequest(input *DeleteSnapshotScheduleInput) (req *request.Request, output *DeleteSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opDeleteSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSnapshotScheduleInput{} + } + + output = &DeleteSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSnapshotSchedule API operation for AWS Storage Gateway. +// +// Deletes a snapshot of a volume. +// +// You can take snapshots of your gateway volumes on a scheduled or ad hoc basis. +// This API action enables you to delete a snapshot schedule for a volume. For +// more information, see Working with Snapshots (http://docs.aws.amazon.com/storagegateway/latest/userguide/WorkingWithSnapshots.html). +// In the DeleteSnapshotSchedule request, you identify the volume by providing +// its Amazon Resource Name (ARN). This operation is only supported in stored +// and cached volume gateway types. +// +// To list or delete a snapshot, you must use the Amazon EC2 API. in Amazon +// Elastic Compute Cloud API Reference. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule +func (c *StorageGateway) DeleteSnapshotSchedule(input *DeleteSnapshotScheduleInput) (*DeleteSnapshotScheduleOutput, error) { + req, out := c.DeleteSnapshotScheduleRequest(input) + return out, req.Send() +} + +// DeleteSnapshotScheduleWithContext is the same as DeleteSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSnapshotSchedule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteSnapshotScheduleWithContext(ctx aws.Context, input *DeleteSnapshotScheduleInput, opts ...request.Option) (*DeleteSnapshotScheduleOutput, error) { + req, out := c.DeleteSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTape = "DeleteTape" + +// DeleteTapeRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTape operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTape for more information on using the DeleteTape +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTapeRequest method. +// req, resp := client.DeleteTapeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape +func (c *StorageGateway) DeleteTapeRequest(input *DeleteTapeInput) (req *request.Request, output *DeleteTapeOutput) { + op := &request.Operation{ + Name: opDeleteTape, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTapeInput{} + } + + output = &DeleteTapeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTape API operation for AWS Storage Gateway. +// +// Deletes the specified virtual tape. This operation is only supported in the +// tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteTape for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape +func (c *StorageGateway) DeleteTape(input *DeleteTapeInput) (*DeleteTapeOutput, error) { + req, out := c.DeleteTapeRequest(input) + return out, req.Send() +} + +// DeleteTapeWithContext is the same as DeleteTape with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTape for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteTapeWithContext(ctx aws.Context, input *DeleteTapeInput, opts ...request.Option) (*DeleteTapeOutput, error) { + req, out := c.DeleteTapeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTapeArchive = "DeleteTapeArchive" + +// DeleteTapeArchiveRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTapeArchive operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTapeArchive for more information on using the DeleteTapeArchive +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTapeArchiveRequest method. +// req, resp := client.DeleteTapeArchiveRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive +func (c *StorageGateway) DeleteTapeArchiveRequest(input *DeleteTapeArchiveInput) (req *request.Request, output *DeleteTapeArchiveOutput) { + op := &request.Operation{ + Name: opDeleteTapeArchive, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTapeArchiveInput{} + } + + output = &DeleteTapeArchiveOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTapeArchive API operation for AWS Storage Gateway. +// +// Deletes the specified virtual tape from the virtual tape shelf (VTS). This +// operation is only supported in the tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteTapeArchive for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive +func (c *StorageGateway) DeleteTapeArchive(input *DeleteTapeArchiveInput) (*DeleteTapeArchiveOutput, error) { + req, out := c.DeleteTapeArchiveRequest(input) + return out, req.Send() +} + +// DeleteTapeArchiveWithContext is the same as DeleteTapeArchive with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTapeArchive for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteTapeArchiveWithContext(ctx aws.Context, input *DeleteTapeArchiveInput, opts ...request.Option) (*DeleteTapeArchiveOutput, error) { + req, out := c.DeleteTapeArchiveRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteVolume = "DeleteVolume" + +// DeleteVolumeRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteVolume for more information on using the DeleteVolume +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteVolumeRequest method. +// req, resp := client.DeleteVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume +func (c *StorageGateway) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput) { + op := &request.Operation{ + Name: opDeleteVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVolumeInput{} + } + + output = &DeleteVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVolume API operation for AWS Storage Gateway. +// +// Deletes the specified storage volume that you previously created using the +// CreateCachediSCSIVolume or CreateStorediSCSIVolume API. This operation is +// only supported in the cached volume and stored volume types. For stored volume +// gateways, the local disk that was configured as the storage volume is not +// deleted. You can reuse the local disk to create another storage volume. +// +// Before you delete a volume, make sure there are no iSCSI connections to the +// volume you are deleting. You should also make sure there is no snapshot in +// progress. You can use the Amazon Elastic Compute Cloud (Amazon EC2) API to +// query snapshots on the volume you are deleting and check the snapshot status. +// For more information, go to DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) +// in the Amazon Elastic Compute Cloud API Reference. +// +// In the request, you must provide the Amazon Resource Name (ARN) of the storage +// volume you want to delete. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DeleteVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume +func (c *StorageGateway) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) { + req, out := c.DeleteVolumeRequest(input) + return out, req.Send() +} + +// DeleteVolumeWithContext is the same as DeleteVolume with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVolume for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DeleteVolumeWithContext(ctx aws.Context, input *DeleteVolumeInput, opts ...request.Option) (*DeleteVolumeOutput, error) { + req, out := c.DeleteVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBandwidthRateLimit = "DescribeBandwidthRateLimit" + +// DescribeBandwidthRateLimitRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBandwidthRateLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeBandwidthRateLimit for more information on using the DescribeBandwidthRateLimit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeBandwidthRateLimitRequest method. +// req, resp := client.DescribeBandwidthRateLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit +func (c *StorageGateway) DescribeBandwidthRateLimitRequest(input *DescribeBandwidthRateLimitInput) (req *request.Request, output *DescribeBandwidthRateLimitOutput) { + op := &request.Operation{ + Name: opDescribeBandwidthRateLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeBandwidthRateLimitInput{} + } + + output = &DescribeBandwidthRateLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBandwidthRateLimit API operation for AWS Storage Gateway. +// +// Returns the bandwidth rate limits of a gateway. By default, these limits +// are not set, which means no bandwidth rate limiting is in effect. +// +// This operation only returns a value for a bandwidth rate limit only if the +// limit is set. If no limits are set for the gateway, then this operation returns +// only the gateway ARN in the response body. To specify which gateway to describe, +// use the Amazon Resource Name (ARN) of the gateway in your request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeBandwidthRateLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit +func (c *StorageGateway) DescribeBandwidthRateLimit(input *DescribeBandwidthRateLimitInput) (*DescribeBandwidthRateLimitOutput, error) { + req, out := c.DescribeBandwidthRateLimitRequest(input) + return out, req.Send() +} + +// DescribeBandwidthRateLimitWithContext is the same as DescribeBandwidthRateLimit with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBandwidthRateLimit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeBandwidthRateLimitWithContext(ctx aws.Context, input *DescribeBandwidthRateLimitInput, opts ...request.Option) (*DescribeBandwidthRateLimitOutput, error) { + req, out := c.DescribeBandwidthRateLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCache = "DescribeCache" + +// DescribeCacheRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCache for more information on using the DescribeCache +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCacheRequest method. +// req, resp := client.DescribeCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache +func (c *StorageGateway) DescribeCacheRequest(input *DescribeCacheInput) (req *request.Request, output *DescribeCacheOutput) { + op := &request.Operation{ + Name: opDescribeCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCacheInput{} + } + + output = &DescribeCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCache API operation for AWS Storage Gateway. +// +// Returns information about the cache of a gateway. This operation is only +// supported in the cached volume, tape and file gateway types. +// +// The response includes disk IDs that are configured as cache, and it includes +// the amount of cache allocated and used. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache +func (c *StorageGateway) DescribeCache(input *DescribeCacheInput) (*DescribeCacheOutput, error) { + req, out := c.DescribeCacheRequest(input) + return out, req.Send() +} + +// DescribeCacheWithContext is the same as DescribeCache with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCache for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeCacheWithContext(ctx aws.Context, input *DescribeCacheInput, opts ...request.Option) (*DescribeCacheOutput, error) { + req, out := c.DescribeCacheRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCachediSCSIVolumes = "DescribeCachediSCSIVolumes" + +// DescribeCachediSCSIVolumesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCachediSCSIVolumes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCachediSCSIVolumes for more information on using the DescribeCachediSCSIVolumes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCachediSCSIVolumesRequest method. +// req, resp := client.DescribeCachediSCSIVolumesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes +func (c *StorageGateway) DescribeCachediSCSIVolumesRequest(input *DescribeCachediSCSIVolumesInput) (req *request.Request, output *DescribeCachediSCSIVolumesOutput) { + op := &request.Operation{ + Name: opDescribeCachediSCSIVolumes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCachediSCSIVolumesInput{} + } + + output = &DescribeCachediSCSIVolumesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCachediSCSIVolumes API operation for AWS Storage Gateway. +// +// Returns a description of the gateway volumes specified in the request. This +// operation is only supported in the cached volume gateway types. +// +// The list of gateway volumes in the request must be from one gateway. In the +// response Amazon Storage Gateway returns volume information sorted by volume +// Amazon Resource Name (ARN). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeCachediSCSIVolumes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes +func (c *StorageGateway) DescribeCachediSCSIVolumes(input *DescribeCachediSCSIVolumesInput) (*DescribeCachediSCSIVolumesOutput, error) { + req, out := c.DescribeCachediSCSIVolumesRequest(input) + return out, req.Send() +} + +// DescribeCachediSCSIVolumesWithContext is the same as DescribeCachediSCSIVolumes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCachediSCSIVolumes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeCachediSCSIVolumesWithContext(ctx aws.Context, input *DescribeCachediSCSIVolumesInput, opts ...request.Option) (*DescribeCachediSCSIVolumesOutput, error) { + req, out := c.DescribeCachediSCSIVolumesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeChapCredentials = "DescribeChapCredentials" + +// DescribeChapCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeChapCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeChapCredentials for more information on using the DescribeChapCredentials +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeChapCredentialsRequest method. +// req, resp := client.DescribeChapCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials +func (c *StorageGateway) DescribeChapCredentialsRequest(input *DescribeChapCredentialsInput) (req *request.Request, output *DescribeChapCredentialsOutput) { + op := &request.Operation{ + Name: opDescribeChapCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeChapCredentialsInput{} + } + + output = &DescribeChapCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeChapCredentials API operation for AWS Storage Gateway. +// +// Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials +// information for a specified iSCSI target, one for each target-initiator pair. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeChapCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials +func (c *StorageGateway) DescribeChapCredentials(input *DescribeChapCredentialsInput) (*DescribeChapCredentialsOutput, error) { + req, out := c.DescribeChapCredentialsRequest(input) + return out, req.Send() +} + +// DescribeChapCredentialsWithContext is the same as DescribeChapCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeChapCredentials for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeChapCredentialsWithContext(ctx aws.Context, input *DescribeChapCredentialsInput, opts ...request.Option) (*DescribeChapCredentialsOutput, error) { + req, out := c.DescribeChapCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeGatewayInformation = "DescribeGatewayInformation" + +// DescribeGatewayInformationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGatewayInformation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeGatewayInformation for more information on using the DescribeGatewayInformation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeGatewayInformationRequest method. +// req, resp := client.DescribeGatewayInformationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation +func (c *StorageGateway) DescribeGatewayInformationRequest(input *DescribeGatewayInformationInput) (req *request.Request, output *DescribeGatewayInformationOutput) { + op := &request.Operation{ + Name: opDescribeGatewayInformation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeGatewayInformationInput{} + } + + output = &DescribeGatewayInformationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeGatewayInformation API operation for AWS Storage Gateway. +// +// Returns metadata about a gateway such as its name, network interfaces, configured +// time zone, and the state (whether the gateway is running or not). To specify +// which gateway to describe, use the Amazon Resource Name (ARN) of the gateway +// in your request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeGatewayInformation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation +func (c *StorageGateway) DescribeGatewayInformation(input *DescribeGatewayInformationInput) (*DescribeGatewayInformationOutput, error) { + req, out := c.DescribeGatewayInformationRequest(input) + return out, req.Send() +} + +// DescribeGatewayInformationWithContext is the same as DescribeGatewayInformation with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeGatewayInformation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeGatewayInformationWithContext(ctx aws.Context, input *DescribeGatewayInformationInput, opts ...request.Option) (*DescribeGatewayInformationOutput, error) { + req, out := c.DescribeGatewayInformationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeMaintenanceStartTime = "DescribeMaintenanceStartTime" + +// DescribeMaintenanceStartTimeRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMaintenanceStartTime operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeMaintenanceStartTime for more information on using the DescribeMaintenanceStartTime +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeMaintenanceStartTimeRequest method. +// req, resp := client.DescribeMaintenanceStartTimeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime +func (c *StorageGateway) DescribeMaintenanceStartTimeRequest(input *DescribeMaintenanceStartTimeInput) (req *request.Request, output *DescribeMaintenanceStartTimeOutput) { + op := &request.Operation{ + Name: opDescribeMaintenanceStartTime, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeMaintenanceStartTimeInput{} + } + + output = &DescribeMaintenanceStartTimeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeMaintenanceStartTime API operation for AWS Storage Gateway. +// +// Returns your gateway's weekly maintenance start time including the day and +// time of the week. Note that values are in terms of the gateway's time zone. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeMaintenanceStartTime for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime +func (c *StorageGateway) DescribeMaintenanceStartTime(input *DescribeMaintenanceStartTimeInput) (*DescribeMaintenanceStartTimeOutput, error) { + req, out := c.DescribeMaintenanceStartTimeRequest(input) + return out, req.Send() +} + +// DescribeMaintenanceStartTimeWithContext is the same as DescribeMaintenanceStartTime with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeMaintenanceStartTime for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeMaintenanceStartTimeWithContext(ctx aws.Context, input *DescribeMaintenanceStartTimeInput, opts ...request.Option) (*DescribeMaintenanceStartTimeOutput, error) { + req, out := c.DescribeMaintenanceStartTimeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeNFSFileShares = "DescribeNFSFileShares" + +// DescribeNFSFileSharesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeNFSFileShares operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeNFSFileShares for more information on using the DescribeNFSFileShares +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeNFSFileSharesRequest method. +// req, resp := client.DescribeNFSFileSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares +func (c *StorageGateway) DescribeNFSFileSharesRequest(input *DescribeNFSFileSharesInput) (req *request.Request, output *DescribeNFSFileSharesOutput) { + op := &request.Operation{ + Name: opDescribeNFSFileShares, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeNFSFileSharesInput{} + } + + output = &DescribeNFSFileSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeNFSFileShares API operation for AWS Storage Gateway. +// +// Gets a description for one or more Network File System (NFS) file shares +// from a file gateway. This operation is only supported in the file gateway +// type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeNFSFileShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares +func (c *StorageGateway) DescribeNFSFileShares(input *DescribeNFSFileSharesInput) (*DescribeNFSFileSharesOutput, error) { + req, out := c.DescribeNFSFileSharesRequest(input) + return out, req.Send() +} + +// DescribeNFSFileSharesWithContext is the same as DescribeNFSFileShares with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeNFSFileShares for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeNFSFileSharesWithContext(ctx aws.Context, input *DescribeNFSFileSharesInput, opts ...request.Option) (*DescribeNFSFileSharesOutput, error) { + req, out := c.DescribeNFSFileSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSMBFileShares = "DescribeSMBFileShares" + +// DescribeSMBFileSharesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSMBFileShares operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSMBFileShares for more information on using the DescribeSMBFileShares +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSMBFileSharesRequest method. +// req, resp := client.DescribeSMBFileSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares +func (c *StorageGateway) DescribeSMBFileSharesRequest(input *DescribeSMBFileSharesInput) (req *request.Request, output *DescribeSMBFileSharesOutput) { + op := &request.Operation{ + Name: opDescribeSMBFileShares, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSMBFileSharesInput{} + } + + output = &DescribeSMBFileSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSMBFileShares API operation for AWS Storage Gateway. +// +// Gets a description for one or more Server Message Block (SMB) file shares +// from a file gateway. This operation is only supported in the file gateway +// type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeSMBFileShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares +func (c *StorageGateway) DescribeSMBFileShares(input *DescribeSMBFileSharesInput) (*DescribeSMBFileSharesOutput, error) { + req, out := c.DescribeSMBFileSharesRequest(input) + return out, req.Send() +} + +// DescribeSMBFileSharesWithContext is the same as DescribeSMBFileShares with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSMBFileShares for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeSMBFileSharesWithContext(ctx aws.Context, input *DescribeSMBFileSharesInput, opts ...request.Option) (*DescribeSMBFileSharesOutput, error) { + req, out := c.DescribeSMBFileSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSMBSettings = "DescribeSMBSettings" + +// DescribeSMBSettingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSMBSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSMBSettings for more information on using the DescribeSMBSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSMBSettingsRequest method. +// req, resp := client.DescribeSMBSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings +func (c *StorageGateway) DescribeSMBSettingsRequest(input *DescribeSMBSettingsInput) (req *request.Request, output *DescribeSMBSettingsOutput) { + op := &request.Operation{ + Name: opDescribeSMBSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSMBSettingsInput{} + } + + output = &DescribeSMBSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSMBSettings API operation for AWS Storage Gateway. +// +// Gets a description of a Server Message Block (SMB) file share settings from +// a file gateway. This operation is only supported in the file gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeSMBSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings +func (c *StorageGateway) DescribeSMBSettings(input *DescribeSMBSettingsInput) (*DescribeSMBSettingsOutput, error) { + req, out := c.DescribeSMBSettingsRequest(input) + return out, req.Send() +} + +// DescribeSMBSettingsWithContext is the same as DescribeSMBSettings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSMBSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeSMBSettingsWithContext(ctx aws.Context, input *DescribeSMBSettingsInput, opts ...request.Option) (*DescribeSMBSettingsOutput, error) { + req, out := c.DescribeSMBSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSnapshotSchedule = "DescribeSnapshotSchedule" + +// DescribeSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSnapshotSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSnapshotSchedule for more information on using the DescribeSnapshotSchedule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSnapshotScheduleRequest method. +// req, resp := client.DescribeSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule +func (c *StorageGateway) DescribeSnapshotScheduleRequest(input *DescribeSnapshotScheduleInput) (req *request.Request, output *DescribeSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opDescribeSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSnapshotScheduleInput{} + } + + output = &DescribeSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSnapshotSchedule API operation for AWS Storage Gateway. +// +// Describes the snapshot schedule for the specified gateway volume. The snapshot +// schedule information includes intervals at which snapshots are automatically +// initiated on the volume. This operation is only supported in the cached volume +// and stored volume types. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule +func (c *StorageGateway) DescribeSnapshotSchedule(input *DescribeSnapshotScheduleInput) (*DescribeSnapshotScheduleOutput, error) { + req, out := c.DescribeSnapshotScheduleRequest(input) + return out, req.Send() +} + +// DescribeSnapshotScheduleWithContext is the same as DescribeSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSnapshotSchedule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeSnapshotScheduleWithContext(ctx aws.Context, input *DescribeSnapshotScheduleInput, opts ...request.Option) (*DescribeSnapshotScheduleOutput, error) { + req, out := c.DescribeSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeStorediSCSIVolumes = "DescribeStorediSCSIVolumes" + +// DescribeStorediSCSIVolumesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeStorediSCSIVolumes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeStorediSCSIVolumes for more information on using the DescribeStorediSCSIVolumes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeStorediSCSIVolumesRequest method. +// req, resp := client.DescribeStorediSCSIVolumesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes +func (c *StorageGateway) DescribeStorediSCSIVolumesRequest(input *DescribeStorediSCSIVolumesInput) (req *request.Request, output *DescribeStorediSCSIVolumesOutput) { + op := &request.Operation{ + Name: opDescribeStorediSCSIVolumes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeStorediSCSIVolumesInput{} + } + + output = &DescribeStorediSCSIVolumesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeStorediSCSIVolumes API operation for AWS Storage Gateway. +// +// Returns the description of the gateway volumes specified in the request. +// The list of gateway volumes in the request must be from one gateway. In the +// response Amazon Storage Gateway returns volume information sorted by volume +// ARNs. This operation is only supported in stored volume gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeStorediSCSIVolumes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes +func (c *StorageGateway) DescribeStorediSCSIVolumes(input *DescribeStorediSCSIVolumesInput) (*DescribeStorediSCSIVolumesOutput, error) { + req, out := c.DescribeStorediSCSIVolumesRequest(input) + return out, req.Send() +} + +// DescribeStorediSCSIVolumesWithContext is the same as DescribeStorediSCSIVolumes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeStorediSCSIVolumes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeStorediSCSIVolumesWithContext(ctx aws.Context, input *DescribeStorediSCSIVolumesInput, opts ...request.Option) (*DescribeStorediSCSIVolumesOutput, error) { + req, out := c.DescribeStorediSCSIVolumesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTapeArchives = "DescribeTapeArchives" + +// DescribeTapeArchivesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTapeArchives operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTapeArchives for more information on using the DescribeTapeArchives +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTapeArchivesRequest method. +// req, resp := client.DescribeTapeArchivesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives +func (c *StorageGateway) DescribeTapeArchivesRequest(input *DescribeTapeArchivesInput) (req *request.Request, output *DescribeTapeArchivesOutput) { + op := &request.Operation{ + Name: opDescribeTapeArchives, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTapeArchivesInput{} + } + + output = &DescribeTapeArchivesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTapeArchives API operation for AWS Storage Gateway. +// +// Returns a description of specified virtual tapes in the virtual tape shelf +// (VTS). This operation is only supported in the tape gateway type. +// +// If a specific TapeARN is not specified, AWS Storage Gateway returns a description +// of all virtual tapes found in the VTS associated with your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeTapeArchives for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives +func (c *StorageGateway) DescribeTapeArchives(input *DescribeTapeArchivesInput) (*DescribeTapeArchivesOutput, error) { + req, out := c.DescribeTapeArchivesRequest(input) + return out, req.Send() +} + +// DescribeTapeArchivesWithContext is the same as DescribeTapeArchives with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTapeArchives for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeTapeArchivesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, opts ...request.Option) (*DescribeTapeArchivesOutput, error) { + req, out := c.DescribeTapeArchivesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTapeArchivesPages iterates over the pages of a DescribeTapeArchives operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTapeArchives method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeTapeArchives operation. +// pageNum := 0 +// err := client.DescribeTapeArchivesPages(params, +// func(page *DescribeTapeArchivesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeTapeArchivesPages(input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool) error { + return c.DescribeTapeArchivesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTapeArchivesPagesWithContext same as DescribeTapeArchivesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeTapeArchivesPagesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTapeArchivesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTapeArchivesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTapeArchivesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeTapeRecoveryPoints = "DescribeTapeRecoveryPoints" + +// DescribeTapeRecoveryPointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTapeRecoveryPoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTapeRecoveryPoints for more information on using the DescribeTapeRecoveryPoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTapeRecoveryPointsRequest method. +// req, resp := client.DescribeTapeRecoveryPointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints +func (c *StorageGateway) DescribeTapeRecoveryPointsRequest(input *DescribeTapeRecoveryPointsInput) (req *request.Request, output *DescribeTapeRecoveryPointsOutput) { + op := &request.Operation{ + Name: opDescribeTapeRecoveryPoints, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTapeRecoveryPointsInput{} + } + + output = &DescribeTapeRecoveryPointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTapeRecoveryPoints API operation for AWS Storage Gateway. +// +// Returns a list of virtual tape recovery points that are available for the +// specified tape gateway. +// +// A recovery point is a point-in-time view of a virtual tape at which all the +// data on the virtual tape is consistent. If your gateway crashes, virtual +// tapes that have recovery points can be recovered to a new gateway. This operation +// is only supported in the tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeTapeRecoveryPoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints +func (c *StorageGateway) DescribeTapeRecoveryPoints(input *DescribeTapeRecoveryPointsInput) (*DescribeTapeRecoveryPointsOutput, error) { + req, out := c.DescribeTapeRecoveryPointsRequest(input) + return out, req.Send() +} + +// DescribeTapeRecoveryPointsWithContext is the same as DescribeTapeRecoveryPoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTapeRecoveryPoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeTapeRecoveryPointsWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, opts ...request.Option) (*DescribeTapeRecoveryPointsOutput, error) { + req, out := c.DescribeTapeRecoveryPointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTapeRecoveryPointsPages iterates over the pages of a DescribeTapeRecoveryPoints operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTapeRecoveryPoints method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeTapeRecoveryPoints operation. +// pageNum := 0 +// err := client.DescribeTapeRecoveryPointsPages(params, +// func(page *DescribeTapeRecoveryPointsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeTapeRecoveryPointsPages(input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool) error { + return c.DescribeTapeRecoveryPointsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTapeRecoveryPointsPagesWithContext same as DescribeTapeRecoveryPointsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeTapeRecoveryPointsPagesWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTapeRecoveryPointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTapeRecoveryPointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTapeRecoveryPointsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeTapes = "DescribeTapes" + +// DescribeTapesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTapes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTapes for more information on using the DescribeTapes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTapesRequest method. +// req, resp := client.DescribeTapesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes +func (c *StorageGateway) DescribeTapesRequest(input *DescribeTapesInput) (req *request.Request, output *DescribeTapesOutput) { + op := &request.Operation{ + Name: opDescribeTapes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTapesInput{} + } + + output = &DescribeTapesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTapes API operation for AWS Storage Gateway. +// +// Returns a description of the specified Amazon Resource Name (ARN) of virtual +// tapes. If a TapeARN is not specified, returns a description of all virtual +// tapes associated with the specified gateway. This operation is only supported +// in the tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeTapes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes +func (c *StorageGateway) DescribeTapes(input *DescribeTapesInput) (*DescribeTapesOutput, error) { + req, out := c.DescribeTapesRequest(input) + return out, req.Send() +} + +// DescribeTapesWithContext is the same as DescribeTapes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTapes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeTapesWithContext(ctx aws.Context, input *DescribeTapesInput, opts ...request.Option) (*DescribeTapesOutput, error) { + req, out := c.DescribeTapesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTapesPages iterates over the pages of a DescribeTapes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTapes method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeTapes operation. +// pageNum := 0 +// err := client.DescribeTapesPages(params, +// func(page *DescribeTapesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeTapesPages(input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool) error { + return c.DescribeTapesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTapesPagesWithContext same as DescribeTapesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeTapesPagesWithContext(ctx aws.Context, input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTapesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTapesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeTapesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeUploadBuffer = "DescribeUploadBuffer" + +// DescribeUploadBufferRequest generates a "aws/request.Request" representing the +// client's request for the DescribeUploadBuffer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeUploadBuffer for more information on using the DescribeUploadBuffer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeUploadBufferRequest method. +// req, resp := client.DescribeUploadBufferRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer +func (c *StorageGateway) DescribeUploadBufferRequest(input *DescribeUploadBufferInput) (req *request.Request, output *DescribeUploadBufferOutput) { + op := &request.Operation{ + Name: opDescribeUploadBuffer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeUploadBufferInput{} + } + + output = &DescribeUploadBufferOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeUploadBuffer API operation for AWS Storage Gateway. +// +// Returns information about the upload buffer of a gateway. This operation +// is supported for the stored volume, cached volume and tape gateway types. +// +// The response includes disk IDs that are configured as upload buffer space, +// and it includes the amount of upload buffer space allocated and used. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeUploadBuffer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer +func (c *StorageGateway) DescribeUploadBuffer(input *DescribeUploadBufferInput) (*DescribeUploadBufferOutput, error) { + req, out := c.DescribeUploadBufferRequest(input) + return out, req.Send() +} + +// DescribeUploadBufferWithContext is the same as DescribeUploadBuffer with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeUploadBuffer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeUploadBufferWithContext(ctx aws.Context, input *DescribeUploadBufferInput, opts ...request.Option) (*DescribeUploadBufferOutput, error) { + req, out := c.DescribeUploadBufferRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeVTLDevices = "DescribeVTLDevices" + +// DescribeVTLDevicesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeVTLDevices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeVTLDevices for more information on using the DescribeVTLDevices +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeVTLDevicesRequest method. +// req, resp := client.DescribeVTLDevicesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices +func (c *StorageGateway) DescribeVTLDevicesRequest(input *DescribeVTLDevicesInput) (req *request.Request, output *DescribeVTLDevicesOutput) { + op := &request.Operation{ + Name: opDescribeVTLDevices, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeVTLDevicesInput{} + } + + output = &DescribeVTLDevicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeVTLDevices API operation for AWS Storage Gateway. +// +// Returns a description of virtual tape library (VTL) devices for the specified +// tape gateway. In the response, AWS Storage Gateway returns VTL device information. +// +// This operation is only supported in the tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeVTLDevices for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices +func (c *StorageGateway) DescribeVTLDevices(input *DescribeVTLDevicesInput) (*DescribeVTLDevicesOutput, error) { + req, out := c.DescribeVTLDevicesRequest(input) + return out, req.Send() +} + +// DescribeVTLDevicesWithContext is the same as DescribeVTLDevices with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeVTLDevices for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeVTLDevicesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, opts ...request.Option) (*DescribeVTLDevicesOutput, error) { + req, out := c.DescribeVTLDevicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeVTLDevicesPages iterates over the pages of a DescribeVTLDevices operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeVTLDevices method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeVTLDevices operation. +// pageNum := 0 +// err := client.DescribeVTLDevicesPages(params, +// func(page *DescribeVTLDevicesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) DescribeVTLDevicesPages(input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool) error { + return c.DescribeVTLDevicesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeVTLDevicesPagesWithContext same as DescribeVTLDevicesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeVTLDevicesPagesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeVTLDevicesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeVTLDevicesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeVTLDevicesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeWorkingStorage = "DescribeWorkingStorage" + +// DescribeWorkingStorageRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkingStorage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeWorkingStorage for more information on using the DescribeWorkingStorage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeWorkingStorageRequest method. +// req, resp := client.DescribeWorkingStorageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage +func (c *StorageGateway) DescribeWorkingStorageRequest(input *DescribeWorkingStorageInput) (req *request.Request, output *DescribeWorkingStorageOutput) { + op := &request.Operation{ + Name: opDescribeWorkingStorage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkingStorageInput{} + } + + output = &DescribeWorkingStorageOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkingStorage API operation for AWS Storage Gateway. +// +// Returns information about the working storage of a gateway. This operation +// is only supported in the stored volumes gateway type. This operation is deprecated +// in cached volumes API version (20120630). Use DescribeUploadBuffer instead. +// +// Working storage is also referred to as upload buffer. You can also use the +// DescribeUploadBuffer operation to add upload buffer to a stored volume gateway. +// +// The response includes disk IDs that are configured as working storage, and +// it includes the amount of working storage allocated and used. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DescribeWorkingStorage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage +func (c *StorageGateway) DescribeWorkingStorage(input *DescribeWorkingStorageInput) (*DescribeWorkingStorageOutput, error) { + req, out := c.DescribeWorkingStorageRequest(input) + return out, req.Send() +} + +// DescribeWorkingStorageWithContext is the same as DescribeWorkingStorage with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkingStorage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DescribeWorkingStorageWithContext(ctx aws.Context, input *DescribeWorkingStorageInput, opts ...request.Option) (*DescribeWorkingStorageOutput, error) { + req, out := c.DescribeWorkingStorageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableGateway = "DisableGateway" + +// DisableGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DisableGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableGateway for more information on using the DisableGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableGatewayRequest method. +// req, resp := client.DisableGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway +func (c *StorageGateway) DisableGatewayRequest(input *DisableGatewayInput) (req *request.Request, output *DisableGatewayOutput) { + op := &request.Operation{ + Name: opDisableGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableGatewayInput{} + } + + output = &DisableGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisableGateway API operation for AWS Storage Gateway. +// +// Disables a tape gateway when the gateway is no longer functioning. For example, +// if your gateway VM is damaged, you can disable the gateway so you can recover +// virtual tapes. +// +// Use this operation for a tape gateway that is not reachable or not functioning. +// This operation is only supported in the tape gateway type. +// +// Once a gateway is disabled it cannot be 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 +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DisableGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway +func (c *StorageGateway) DisableGateway(input *DisableGatewayInput) (*DisableGatewayOutput, error) { + req, out := c.DisableGatewayRequest(input) + return out, req.Send() +} + +// DisableGatewayWithContext is the same as DisableGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DisableGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DisableGatewayWithContext(ctx aws.Context, input *DisableGatewayInput, opts ...request.Option) (*DisableGatewayOutput, error) { + req, out := c.DisableGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opJoinDomain = "JoinDomain" + +// JoinDomainRequest generates a "aws/request.Request" representing the +// client's request for the JoinDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See JoinDomain for more information on using the JoinDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the JoinDomainRequest method. +// req, resp := client.JoinDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain +func (c *StorageGateway) JoinDomainRequest(input *JoinDomainInput) (req *request.Request, output *JoinDomainOutput) { + op := &request.Operation{ + Name: opJoinDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &JoinDomainInput{} + } + + output = &JoinDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// JoinDomain API operation for AWS Storage Gateway. +// +// Adds a file gateway to an Active Directory domain. This operation is only +// supported in the file gateway type that supports the SMB file protocol. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation JoinDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain +func (c *StorageGateway) JoinDomain(input *JoinDomainInput) (*JoinDomainOutput, error) { + req, out := c.JoinDomainRequest(input) + return out, req.Send() +} + +// JoinDomainWithContext is the same as JoinDomain with the addition of +// the ability to pass a context and additional request options. +// +// See JoinDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) JoinDomainWithContext(ctx aws.Context, input *JoinDomainInput, opts ...request.Option) (*JoinDomainOutput, error) { + req, out := c.JoinDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListFileShares = "ListFileShares" + +// ListFileSharesRequest generates a "aws/request.Request" representing the +// client's request for the ListFileShares operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListFileShares for more information on using the ListFileShares +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListFileSharesRequest method. +// req, resp := client.ListFileSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares +func (c *StorageGateway) ListFileSharesRequest(input *ListFileSharesInput) (req *request.Request, output *ListFileSharesOutput) { + op := &request.Operation{ + Name: opListFileShares, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListFileSharesInput{} + } + + output = &ListFileSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFileShares API operation for AWS Storage Gateway. +// +// Gets a list of the file shares for a specific file gateway, or the list of +// file shares that belong to the calling user account. This operation is only +// supported in the file gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListFileShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares +func (c *StorageGateway) ListFileShares(input *ListFileSharesInput) (*ListFileSharesOutput, error) { + req, out := c.ListFileSharesRequest(input) + return out, req.Send() +} + +// ListFileSharesWithContext is the same as ListFileShares with the addition of +// the ability to pass a context and additional request options. +// +// See ListFileShares for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListFileSharesWithContext(ctx aws.Context, input *ListFileSharesInput, opts ...request.Option) (*ListFileSharesOutput, error) { + req, out := c.ListFileSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGateways = "ListGateways" + +// ListGatewaysRequest generates a "aws/request.Request" representing the +// client's request for the ListGateways operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGateways for more information on using the ListGateways +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGatewaysRequest method. +// req, resp := client.ListGatewaysRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways +func (c *StorageGateway) ListGatewaysRequest(input *ListGatewaysInput) (req *request.Request, output *ListGatewaysOutput) { + op := &request.Operation{ + Name: opListGateways, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListGatewaysInput{} + } + + output = &ListGatewaysOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGateways API operation for AWS Storage Gateway. +// +// Lists gateways owned by an AWS account in a region specified in the request. +// The returned list is ordered by gateway Amazon Resource Name (ARN). +// +// By default, the operation returns a maximum of 100 gateways. This operation +// supports pagination that allows you to optionally reduce the number of gateways +// returned in a response. +// +// If you have more gateways than are returned in a response (that is, the response +// returns only a truncated list of your gateways), the response contains a +// marker that you can specify in your next request to fetch the next page of +// gateways. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListGateways for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways +func (c *StorageGateway) ListGateways(input *ListGatewaysInput) (*ListGatewaysOutput, error) { + req, out := c.ListGatewaysRequest(input) + return out, req.Send() +} + +// ListGatewaysWithContext is the same as ListGateways with the addition of +// the ability to pass a context and additional request options. +// +// See ListGateways for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListGatewaysWithContext(ctx aws.Context, input *ListGatewaysInput, opts ...request.Option) (*ListGatewaysOutput, error) { + req, out := c.ListGatewaysRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListGatewaysPages iterates over the pages of a ListGateways operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListGateways method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListGateways operation. +// pageNum := 0 +// err := client.ListGatewaysPages(params, +// func(page *ListGatewaysOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) ListGatewaysPages(input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool) error { + return c.ListGatewaysPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListGatewaysPagesWithContext same as ListGatewaysPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListGatewaysPagesWithContext(ctx aws.Context, input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListGatewaysInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListGatewaysRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListGatewaysOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListLocalDisks = "ListLocalDisks" + +// ListLocalDisksRequest generates a "aws/request.Request" representing the +// client's request for the ListLocalDisks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLocalDisks for more information on using the ListLocalDisks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLocalDisksRequest method. +// req, resp := client.ListLocalDisksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks +func (c *StorageGateway) ListLocalDisksRequest(input *ListLocalDisksInput) (req *request.Request, output *ListLocalDisksOutput) { + op := &request.Operation{ + Name: opListLocalDisks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLocalDisksInput{} + } + + output = &ListLocalDisksOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLocalDisks API operation for AWS Storage Gateway. +// +// Returns a list of the gateway's local disks. To specify which gateway to +// describe, you use the Amazon Resource Name (ARN) of the gateway in the body +// of the request. +// +// The request returns a list of all disks, specifying which are configured +// as working storage, cache storage, or stored volume or not configured at +// all. The response includes a DiskStatus field. This field can have a value +// of present (the disk is available to use), missing (the disk is no longer +// connected to the gateway), or mismatch (the disk node is occupied by a disk +// that has incorrect metadata or the disk content is corrupted). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListLocalDisks for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks +func (c *StorageGateway) ListLocalDisks(input *ListLocalDisksInput) (*ListLocalDisksOutput, error) { + req, out := c.ListLocalDisksRequest(input) + return out, req.Send() +} + +// ListLocalDisksWithContext is the same as ListLocalDisks with the addition of +// the ability to pass a context and additional request options. +// +// See ListLocalDisks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListLocalDisksWithContext(ctx aws.Context, input *ListLocalDisksInput, opts ...request.Option) (*ListLocalDisksOutput, error) { + req, out := c.ListLocalDisksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource +func (c *StorageGateway) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Storage Gateway. +// +// Lists the tags that have been added to the specified resource. This operation +// is only supported in the cached volume, stored volume and tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource +func (c *StorageGateway) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTapes = "ListTapes" + +// ListTapesRequest generates a "aws/request.Request" representing the +// client's request for the ListTapes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTapes for more information on using the ListTapes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTapesRequest method. +// req, resp := client.ListTapesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes +func (c *StorageGateway) ListTapesRequest(input *ListTapesInput) (req *request.Request, output *ListTapesOutput) { + op := &request.Operation{ + Name: opListTapes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTapesInput{} + } + + output = &ListTapesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTapes API operation for AWS Storage Gateway. +// +// Lists virtual tapes in your virtual tape library (VTL) and your virtual tape +// shelf (VTS). You specify the tapes to list by specifying one or more tape +// Amazon Resource Names (ARNs). If you don't specify a tape ARN, the operation +// lists all virtual tapes in both your VTL and VTS. +// +// This operation supports pagination. By default, the operation returns a maximum +// of up to 100 tapes. You can optionally specify the Limit parameter in the +// body to limit the number of tapes in the response. If the number of tapes +// returned in the response is truncated, the response includes a Marker element +// that you can use in your subsequent request to retrieve the next set of tapes. +// This operation is only supported in the tape gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListTapes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes +func (c *StorageGateway) ListTapes(input *ListTapesInput) (*ListTapesOutput, error) { + req, out := c.ListTapesRequest(input) + return out, req.Send() +} + +// ListTapesWithContext is the same as ListTapes with the addition of +// the ability to pass a context and additional request options. +// +// See ListTapes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListTapesWithContext(ctx aws.Context, input *ListTapesInput, opts ...request.Option) (*ListTapesOutput, error) { + req, out := c.ListTapesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListVolumeInitiators = "ListVolumeInitiators" + +// ListVolumeInitiatorsRequest generates a "aws/request.Request" representing the +// client's request for the ListVolumeInitiators operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListVolumeInitiators for more information on using the ListVolumeInitiators +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListVolumeInitiatorsRequest method. +// req, resp := client.ListVolumeInitiatorsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators +func (c *StorageGateway) ListVolumeInitiatorsRequest(input *ListVolumeInitiatorsInput) (req *request.Request, output *ListVolumeInitiatorsOutput) { + op := &request.Operation{ + Name: opListVolumeInitiators, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListVolumeInitiatorsInput{} + } + + output = &ListVolumeInitiatorsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVolumeInitiators API operation for AWS Storage Gateway. +// +// Lists iSCSI initiators that are connected to a volume. You can use this operation +// to determine whether a volume is being used or not. This operation is only +// supported in the cached volume and stored volume gateway types. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListVolumeInitiators for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators +func (c *StorageGateway) ListVolumeInitiators(input *ListVolumeInitiatorsInput) (*ListVolumeInitiatorsOutput, error) { + req, out := c.ListVolumeInitiatorsRequest(input) + return out, req.Send() +} + +// ListVolumeInitiatorsWithContext is the same as ListVolumeInitiators with the addition of +// the ability to pass a context and additional request options. +// +// See ListVolumeInitiators for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListVolumeInitiatorsWithContext(ctx aws.Context, input *ListVolumeInitiatorsInput, opts ...request.Option) (*ListVolumeInitiatorsOutput, error) { + req, out := c.ListVolumeInitiatorsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListVolumeRecoveryPoints = "ListVolumeRecoveryPoints" + +// ListVolumeRecoveryPointsRequest generates a "aws/request.Request" representing the +// client's request for the ListVolumeRecoveryPoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListVolumeRecoveryPoints for more information on using the ListVolumeRecoveryPoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListVolumeRecoveryPointsRequest method. +// req, resp := client.ListVolumeRecoveryPointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints +func (c *StorageGateway) ListVolumeRecoveryPointsRequest(input *ListVolumeRecoveryPointsInput) (req *request.Request, output *ListVolumeRecoveryPointsOutput) { + op := &request.Operation{ + Name: opListVolumeRecoveryPoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListVolumeRecoveryPointsInput{} + } + + output = &ListVolumeRecoveryPointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVolumeRecoveryPoints API operation for AWS Storage Gateway. +// +// Lists the recovery points for a specified gateway. This operation is only +// supported in the cached volume gateway type. +// +// Each cache volume has one recovery point. A volume recovery point is a point +// in time at which all data of the volume is consistent and from which you +// can create a snapshot or clone a new cached volume from a source volume. +// To create a snapshot from a volume recovery point use the CreateSnapshotFromVolumeRecoveryPoint +// operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListVolumeRecoveryPoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints +func (c *StorageGateway) ListVolumeRecoveryPoints(input *ListVolumeRecoveryPointsInput) (*ListVolumeRecoveryPointsOutput, error) { + req, out := c.ListVolumeRecoveryPointsRequest(input) + return out, req.Send() +} + +// ListVolumeRecoveryPointsWithContext is the same as ListVolumeRecoveryPoints with the addition of +// the ability to pass a context and additional request options. +// +// See ListVolumeRecoveryPoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListVolumeRecoveryPointsWithContext(ctx aws.Context, input *ListVolumeRecoveryPointsInput, opts ...request.Option) (*ListVolumeRecoveryPointsOutput, error) { + req, out := c.ListVolumeRecoveryPointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListVolumes = "ListVolumes" + +// ListVolumesRequest generates a "aws/request.Request" representing the +// client's request for the ListVolumes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListVolumes for more information on using the ListVolumes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListVolumesRequest method. +// req, resp := client.ListVolumesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes +func (c *StorageGateway) ListVolumesRequest(input *ListVolumesInput) (req *request.Request, output *ListVolumesOutput) { + op := &request.Operation{ + Name: opListVolumes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListVolumesInput{} + } + + output = &ListVolumesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListVolumes API operation for AWS Storage Gateway. +// +// Lists the iSCSI stored volumes of a gateway. Results are sorted by volume +// ARN. The response includes only the volume ARNs. If you want additional volume +// information, use the DescribeStorediSCSIVolumes or the DescribeCachediSCSIVolumes +// API. +// +// The operation supports pagination. By default, the operation returns a maximum +// of up to 100 volumes. You can optionally specify the Limit field in the body +// to limit the number of volumes in the response. If the number of volumes +// returned in the response is truncated, the response includes a Marker field. +// You can use this Marker value in your subsequent request to retrieve the +// next set of volumes. This operation is only supported in the cached volume +// and stored volume gateway types. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ListVolumes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes +func (c *StorageGateway) ListVolumes(input *ListVolumesInput) (*ListVolumesOutput, error) { + req, out := c.ListVolumesRequest(input) + return out, req.Send() +} + +// ListVolumesWithContext is the same as ListVolumes with the addition of +// the ability to pass a context and additional request options. +// +// See ListVolumes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListVolumesWithContext(ctx aws.Context, input *ListVolumesInput, opts ...request.Option) (*ListVolumesOutput, error) { + req, out := c.ListVolumesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListVolumesPages iterates over the pages of a ListVolumes operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListVolumes method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListVolumes operation. +// pageNum := 0 +// err := client.ListVolumesPages(params, +// func(page *ListVolumesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *StorageGateway) ListVolumesPages(input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool) error { + return c.ListVolumesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListVolumesPagesWithContext same as ListVolumesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ListVolumesPagesWithContext(ctx aws.Context, input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListVolumesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListVolumesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListVolumesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opNotifyWhenUploaded = "NotifyWhenUploaded" + +// NotifyWhenUploadedRequest generates a "aws/request.Request" representing the +// client's request for the NotifyWhenUploaded operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See NotifyWhenUploaded for more information on using the NotifyWhenUploaded +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the NotifyWhenUploadedRequest method. +// req, resp := client.NotifyWhenUploadedRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded +func (c *StorageGateway) NotifyWhenUploadedRequest(input *NotifyWhenUploadedInput) (req *request.Request, output *NotifyWhenUploadedOutput) { + op := &request.Operation{ + Name: opNotifyWhenUploaded, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &NotifyWhenUploadedInput{} + } + + output = &NotifyWhenUploadedOutput{} + req = c.newRequest(op, input, output) + return +} + +// NotifyWhenUploaded API operation for AWS Storage Gateway. +// +// Sends you notification through CloudWatch Events when all files written to +// your NFS file share have been uploaded to Amazon S3. +// +// AWS Storage Gateway can send a notification through Amazon CloudWatch Events +// when all files written to your file share up to that point in time have been +// uploaded to Amazon S3. These files include files written to the NFS file +// share up to the time that you make a request for notification. When the upload +// is done, Storage Gateway sends you notification through an Amazon CloudWatch +// Event. You can configure CloudWatch Events to send the notification through +// event targets such as Amazon SNS or AWS Lambda function. This operation is +// only supported in the file gateway type. +// +// For more information, see Getting File Upload Notification in the Storage +// Gateway User Guide (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-upload-notification). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation NotifyWhenUploaded for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded +func (c *StorageGateway) NotifyWhenUploaded(input *NotifyWhenUploadedInput) (*NotifyWhenUploadedOutput, error) { + req, out := c.NotifyWhenUploadedRequest(input) + return out, req.Send() +} + +// NotifyWhenUploadedWithContext is the same as NotifyWhenUploaded with the addition of +// the ability to pass a context and additional request options. +// +// See NotifyWhenUploaded for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) NotifyWhenUploadedWithContext(ctx aws.Context, input *NotifyWhenUploadedInput, opts ...request.Option) (*NotifyWhenUploadedOutput, error) { + req, out := c.NotifyWhenUploadedRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRefreshCache = "RefreshCache" + +// RefreshCacheRequest generates a "aws/request.Request" representing the +// client's request for the RefreshCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RefreshCache for more information on using the RefreshCache +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RefreshCacheRequest method. +// req, resp := client.RefreshCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache +func (c *StorageGateway) RefreshCacheRequest(input *RefreshCacheInput) (req *request.Request, output *RefreshCacheOutput) { + op := &request.Operation{ + Name: opRefreshCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RefreshCacheInput{} + } + + output = &RefreshCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// RefreshCache API operation for AWS Storage Gateway. +// +// Refreshes the cache for the specified file share. This operation finds objects +// in the Amazon S3 bucket that were added, removed or replaced since the gateway +// last listed the bucket's contents and cached the results. This operation +// is only supported in the file gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation RefreshCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache +func (c *StorageGateway) RefreshCache(input *RefreshCacheInput) (*RefreshCacheOutput, error) { + req, out := c.RefreshCacheRequest(input) + return out, req.Send() +} + +// RefreshCacheWithContext is the same as RefreshCache with the addition of +// the ability to pass a context and additional request options. +// +// See RefreshCache for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) RefreshCacheWithContext(ctx aws.Context, input *RefreshCacheInput, opts ...request.Option) (*RefreshCacheOutput, error) { + req, out := c.RefreshCacheRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveTagsFromResource = "RemoveTagsFromResource" + +// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the +// client's request for the RemoveTagsFromResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveTagsFromResourceRequest method. +// req, resp := client.RemoveTagsFromResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RemoveTagsFromResource +func (c *StorageGateway) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { + op := &request.Operation{ + Name: opRemoveTagsFromResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveTagsFromResourceInput{} + } + + output = &RemoveTagsFromResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveTagsFromResource API operation for AWS Storage Gateway. +// +// Removes one or more tags from the specified resource. This operation is only +// supported in the cached volume, stored volume and tape gateway types. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation RemoveTagsFromResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RemoveTagsFromResource +func (c *StorageGateway) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { + req, out := c.RemoveTagsFromResourceRequest(input) + return out, req.Send() +} + +// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveTagsFromResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { + req, out := c.RemoveTagsFromResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opResetCache = "ResetCache" + +// ResetCacheRequest generates a "aws/request.Request" representing the +// client's request for the ResetCache operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResetCache for more information on using the ResetCache +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResetCacheRequest method. +// req, resp := client.ResetCacheRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache +func (c *StorageGateway) ResetCacheRequest(input *ResetCacheInput) (req *request.Request, output *ResetCacheOutput) { + op := &request.Operation{ + Name: opResetCache, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetCacheInput{} + } + + output = &ResetCacheOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetCache API operation for AWS Storage Gateway. +// +// Resets all cache disks that have encountered a error and makes the disks +// available for reconfiguration as cache storage. If your cache disk encounters +// a error, the gateway prevents read and write operations on virtual tapes +// in the gateway. For example, an error can occur when a disk is corrupted +// or removed from the gateway. When a cache is reset, the gateway loses its +// cache storage. At this point you can reconfigure the disks as cache disks. +// This operation is only supported in the cached volume and tape types. +// +// If the cache disk you are resetting contains data that has not been uploaded +// to Amazon S3 yet, that data can be lost. After you reset cache disks, there +// will be no configured cache disks left in the gateway, so you must configure +// at least one new cache disk for your gateway to function properly. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ResetCache for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache +func (c *StorageGateway) ResetCache(input *ResetCacheInput) (*ResetCacheOutput, error) { + req, out := c.ResetCacheRequest(input) + return out, req.Send() +} + +// ResetCacheWithContext is the same as ResetCache with the addition of +// the ability to pass a context and additional request options. +// +// See ResetCache for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ResetCacheWithContext(ctx aws.Context, input *ResetCacheInput, opts ...request.Option) (*ResetCacheOutput, error) { + req, out := c.ResetCacheRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRetrieveTapeArchive = "RetrieveTapeArchive" + +// RetrieveTapeArchiveRequest generates a "aws/request.Request" representing the +// client's request for the RetrieveTapeArchive operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RetrieveTapeArchive for more information on using the RetrieveTapeArchive +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RetrieveTapeArchiveRequest method. +// req, resp := client.RetrieveTapeArchiveRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive +func (c *StorageGateway) RetrieveTapeArchiveRequest(input *RetrieveTapeArchiveInput) (req *request.Request, output *RetrieveTapeArchiveOutput) { + op := &request.Operation{ + Name: opRetrieveTapeArchive, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RetrieveTapeArchiveInput{} + } + + output = &RetrieveTapeArchiveOutput{} + req = c.newRequest(op, input, output) + return +} + +// RetrieveTapeArchive API operation for AWS Storage Gateway. +// +// Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a +// tape gateway. Virtual tapes archived in the VTS are not associated with any +// gateway. However after a tape is retrieved, it is associated with a gateway, +// even though it is also listed in the VTS, that is, archive. This operation +// is only supported in the tape gateway type. +// +// Once a tape is successfully retrieved to a gateway, it cannot be retrieved +// again to another gateway. You must archive the tape again before you can +// retrieve it to another gateway. This operation is only supported in the tape +// gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation RetrieveTapeArchive for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive +func (c *StorageGateway) RetrieveTapeArchive(input *RetrieveTapeArchiveInput) (*RetrieveTapeArchiveOutput, error) { + req, out := c.RetrieveTapeArchiveRequest(input) + return out, req.Send() +} + +// RetrieveTapeArchiveWithContext is the same as RetrieveTapeArchive with the addition of +// the ability to pass a context and additional request options. +// +// See RetrieveTapeArchive for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) RetrieveTapeArchiveWithContext(ctx aws.Context, input *RetrieveTapeArchiveInput, opts ...request.Option) (*RetrieveTapeArchiveOutput, error) { + req, out := c.RetrieveTapeArchiveRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRetrieveTapeRecoveryPoint = "RetrieveTapeRecoveryPoint" + +// RetrieveTapeRecoveryPointRequest generates a "aws/request.Request" representing the +// client's request for the RetrieveTapeRecoveryPoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RetrieveTapeRecoveryPoint for more information on using the RetrieveTapeRecoveryPoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RetrieveTapeRecoveryPointRequest method. +// req, resp := client.RetrieveTapeRecoveryPointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint +func (c *StorageGateway) RetrieveTapeRecoveryPointRequest(input *RetrieveTapeRecoveryPointInput) (req *request.Request, output *RetrieveTapeRecoveryPointOutput) { + op := &request.Operation{ + Name: opRetrieveTapeRecoveryPoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RetrieveTapeRecoveryPointInput{} + } + + output = &RetrieveTapeRecoveryPointOutput{} + req = c.newRequest(op, input, output) + return +} + +// RetrieveTapeRecoveryPoint API operation for AWS Storage Gateway. +// +// Retrieves the recovery point for the specified virtual tape. This operation +// is only supported in the tape gateway type. +// +// A recovery point is a point in time view of a virtual tape at which all the +// data on the tape is consistent. If your gateway crashes, virtual tapes that +// have recovery points can be recovered to a new gateway. +// +// The virtual tape can be retrieved to only one gateway. The retrieved tape +// is read-only. The virtual tape can be retrieved to only a tape gateway. There +// is no charge for retrieving recovery points. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation RetrieveTapeRecoveryPoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint +func (c *StorageGateway) RetrieveTapeRecoveryPoint(input *RetrieveTapeRecoveryPointInput) (*RetrieveTapeRecoveryPointOutput, error) { + req, out := c.RetrieveTapeRecoveryPointRequest(input) + return out, req.Send() +} + +// RetrieveTapeRecoveryPointWithContext is the same as RetrieveTapeRecoveryPoint with the addition of +// the ability to pass a context and additional request options. +// +// See RetrieveTapeRecoveryPoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) RetrieveTapeRecoveryPointWithContext(ctx aws.Context, input *RetrieveTapeRecoveryPointInput, opts ...request.Option) (*RetrieveTapeRecoveryPointOutput, error) { + req, out := c.RetrieveTapeRecoveryPointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSetLocalConsolePassword = "SetLocalConsolePassword" + +// SetLocalConsolePasswordRequest generates a "aws/request.Request" representing the +// client's request for the SetLocalConsolePassword operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SetLocalConsolePassword for more information on using the SetLocalConsolePassword +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SetLocalConsolePasswordRequest method. +// req, resp := client.SetLocalConsolePasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword +func (c *StorageGateway) SetLocalConsolePasswordRequest(input *SetLocalConsolePasswordInput) (req *request.Request, output *SetLocalConsolePasswordOutput) { + op := &request.Operation{ + Name: opSetLocalConsolePassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SetLocalConsolePasswordInput{} + } + + output = &SetLocalConsolePasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// SetLocalConsolePassword API operation for AWS Storage Gateway. +// +// Sets the password for your VM local console. When you log in to the local +// console for the first time, you log in to the VM with the default credentials. +// We recommend that you set a new password. You don't need to know the default +// password to set a new password. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation SetLocalConsolePassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword +func (c *StorageGateway) SetLocalConsolePassword(input *SetLocalConsolePasswordInput) (*SetLocalConsolePasswordOutput, error) { + req, out := c.SetLocalConsolePasswordRequest(input) + return out, req.Send() +} + +// SetLocalConsolePasswordWithContext is the same as SetLocalConsolePassword with the addition of +// the ability to pass a context and additional request options. +// +// See SetLocalConsolePassword for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) SetLocalConsolePasswordWithContext(ctx aws.Context, input *SetLocalConsolePasswordInput, opts ...request.Option) (*SetLocalConsolePasswordOutput, error) { + req, out := c.SetLocalConsolePasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSetSMBGuestPassword = "SetSMBGuestPassword" + +// SetSMBGuestPasswordRequest generates a "aws/request.Request" representing the +// client's request for the SetSMBGuestPassword operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SetSMBGuestPassword for more information on using the SetSMBGuestPassword +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SetSMBGuestPasswordRequest method. +// req, resp := client.SetSMBGuestPasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword +func (c *StorageGateway) SetSMBGuestPasswordRequest(input *SetSMBGuestPasswordInput) (req *request.Request, output *SetSMBGuestPasswordOutput) { + op := &request.Operation{ + Name: opSetSMBGuestPassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SetSMBGuestPasswordInput{} + } + + output = &SetSMBGuestPasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// SetSMBGuestPassword API operation for AWS Storage Gateway. +// +// Sets the password for the guest user “smbguest”. "smbguest" is the user when +// the Authentication method for the file share is “GuestAccess”. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation SetSMBGuestPassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword +func (c *StorageGateway) SetSMBGuestPassword(input *SetSMBGuestPasswordInput) (*SetSMBGuestPasswordOutput, error) { + req, out := c.SetSMBGuestPasswordRequest(input) + return out, req.Send() +} + +// SetSMBGuestPasswordWithContext is the same as SetSMBGuestPassword with the addition of +// the ability to pass a context and additional request options. +// +// See SetSMBGuestPassword for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) SetSMBGuestPasswordWithContext(ctx aws.Context, input *SetSMBGuestPasswordInput, opts ...request.Option) (*SetSMBGuestPasswordOutput, error) { + req, out := c.SetSMBGuestPasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opShutdownGateway = "ShutdownGateway" + +// ShutdownGatewayRequest generates a "aws/request.Request" representing the +// client's request for the ShutdownGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ShutdownGateway for more information on using the ShutdownGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ShutdownGatewayRequest method. +// req, resp := client.ShutdownGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway +func (c *StorageGateway) ShutdownGatewayRequest(input *ShutdownGatewayInput) (req *request.Request, output *ShutdownGatewayOutput) { + op := &request.Operation{ + Name: opShutdownGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ShutdownGatewayInput{} + } + + output = &ShutdownGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// ShutdownGateway API operation for AWS Storage Gateway. +// +// Shuts down a gateway. To specify which gateway to shut down, use the Amazon +// Resource Name (ARN) of the gateway in the body of your request. +// +// The operation shuts down the gateway service component running in the gateway's +// virtual machine (VM) and not the host VM. +// +// If you want to shut down the VM, it is recommended that you first shut down +// the gateway component in the VM to avoid unpredictable conditions. +// +// After the gateway is shutdown, you cannot call any other API except StartGateway, +// DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway. +// Your applications cannot read from or write to the gateway's storage volumes, +// and there are no snapshots taken. +// +// When you make a shutdown request, you will get a 200 OK success response +// immediately. However, it might take some time for the gateway to shut down. +// You can call the DescribeGatewayInformation API to check the status. For +// more information, see ActivateGateway. +// +// If do not intend to use the gateway again, you must delete the gateway (using +// DeleteGateway) to no longer pay software charges associated with the gateway. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation ShutdownGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway +func (c *StorageGateway) ShutdownGateway(input *ShutdownGatewayInput) (*ShutdownGatewayOutput, error) { + req, out := c.ShutdownGatewayRequest(input) + return out, req.Send() +} + +// ShutdownGatewayWithContext is the same as ShutdownGateway with the addition of +// the ability to pass a context and additional request options. +// +// See ShutdownGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) ShutdownGatewayWithContext(ctx aws.Context, input *ShutdownGatewayInput, opts ...request.Option) (*ShutdownGatewayOutput, error) { + req, out := c.ShutdownGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartGateway = "StartGateway" + +// StartGatewayRequest generates a "aws/request.Request" representing the +// client's request for the StartGateway operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartGateway for more information on using the StartGateway +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartGatewayRequest method. +// req, resp := client.StartGatewayRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway +func (c *StorageGateway) StartGatewayRequest(input *StartGatewayInput) (req *request.Request, output *StartGatewayOutput) { + op := &request.Operation{ + Name: opStartGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartGatewayInput{} + } + + output = &StartGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartGateway API operation for AWS Storage Gateway. +// +// Starts a gateway that you previously shut down (see ShutdownGateway). After +// the gateway starts, you can then make other API calls, your applications +// can read from or write to the gateway's storage volumes and you will be able +// to take snapshot backups. +// +// When you make a request, you will get a 200 OK success response immediately. +// However, it might take some time for the gateway to be ready. You should +// call DescribeGatewayInformation and check the status before making any additional +// API calls. For more information, see ActivateGateway. +// +// To specify which gateway to start, use the Amazon Resource Name (ARN) of +// the gateway in your request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation StartGateway for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway +func (c *StorageGateway) StartGateway(input *StartGatewayInput) (*StartGatewayOutput, error) { + req, out := c.StartGatewayRequest(input) + return out, req.Send() +} + +// StartGatewayWithContext is the same as StartGateway with the addition of +// the ability to pass a context and additional request options. +// +// See StartGateway for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) StartGatewayWithContext(ctx aws.Context, input *StartGatewayInput, opts ...request.Option) (*StartGatewayOutput, error) { + req, out := c.StartGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateBandwidthRateLimit = "UpdateBandwidthRateLimit" + +// UpdateBandwidthRateLimitRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBandwidthRateLimit operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateBandwidthRateLimit for more information on using the UpdateBandwidthRateLimit +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateBandwidthRateLimitRequest method. +// req, resp := client.UpdateBandwidthRateLimitRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit +func (c *StorageGateway) UpdateBandwidthRateLimitRequest(input *UpdateBandwidthRateLimitInput) (req *request.Request, output *UpdateBandwidthRateLimitOutput) { + op := &request.Operation{ + Name: opUpdateBandwidthRateLimit, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateBandwidthRateLimitInput{} + } + + output = &UpdateBandwidthRateLimitOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBandwidthRateLimit API operation for AWS Storage Gateway. +// +// Updates the bandwidth rate limits of a gateway. You can update both the upload +// and download bandwidth rate limit or specify only one of the two. If you +// don't set a bandwidth rate limit, the existing rate limit remains. +// +// By default, a gateway's bandwidth rate limits are not set. If you don't set +// any limit, the gateway does not have any limitations on its bandwidth usage +// and could potentially use the maximum available bandwidth. +// +// To specify which gateway to update, use the Amazon Resource Name (ARN) of +// the gateway in your request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateBandwidthRateLimit for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit +func (c *StorageGateway) UpdateBandwidthRateLimit(input *UpdateBandwidthRateLimitInput) (*UpdateBandwidthRateLimitOutput, error) { + req, out := c.UpdateBandwidthRateLimitRequest(input) + return out, req.Send() +} + +// UpdateBandwidthRateLimitWithContext is the same as UpdateBandwidthRateLimit with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBandwidthRateLimit for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateBandwidthRateLimitWithContext(ctx aws.Context, input *UpdateBandwidthRateLimitInput, opts ...request.Option) (*UpdateBandwidthRateLimitOutput, error) { + req, out := c.UpdateBandwidthRateLimitRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateChapCredentials = "UpdateChapCredentials" + +// UpdateChapCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateChapCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateChapCredentials for more information on using the UpdateChapCredentials +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateChapCredentialsRequest method. +// req, resp := client.UpdateChapCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials +func (c *StorageGateway) UpdateChapCredentialsRequest(input *UpdateChapCredentialsInput) (req *request.Request, output *UpdateChapCredentialsOutput) { + op := &request.Operation{ + Name: opUpdateChapCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateChapCredentialsInput{} + } + + output = &UpdateChapCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateChapCredentials API operation for AWS Storage Gateway. +// +// Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials +// for a specified iSCSI target. By default, a gateway does not have CHAP enabled; +// however, for added security, you might use it. +// +// When you update CHAP credentials, all existing connections on the target +// are closed and initiators must reconnect with the new credentials. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateChapCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials +func (c *StorageGateway) UpdateChapCredentials(input *UpdateChapCredentialsInput) (*UpdateChapCredentialsOutput, error) { + req, out := c.UpdateChapCredentialsRequest(input) + return out, req.Send() +} + +// UpdateChapCredentialsWithContext is the same as UpdateChapCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateChapCredentials for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateChapCredentialsWithContext(ctx aws.Context, input *UpdateChapCredentialsInput, opts ...request.Option) (*UpdateChapCredentialsOutput, error) { + req, out := c.UpdateChapCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGatewayInformation = "UpdateGatewayInformation" + +// UpdateGatewayInformationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGatewayInformation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGatewayInformation for more information on using the UpdateGatewayInformation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGatewayInformationRequest method. +// req, resp := client.UpdateGatewayInformationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation +func (c *StorageGateway) UpdateGatewayInformationRequest(input *UpdateGatewayInformationInput) (req *request.Request, output *UpdateGatewayInformationOutput) { + op := &request.Operation{ + Name: opUpdateGatewayInformation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGatewayInformationInput{} + } + + output = &UpdateGatewayInformationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGatewayInformation API operation for AWS Storage Gateway. +// +// Updates a gateway's metadata, which includes the gateway's name and time +// zone. To specify which gateway to update, use the Amazon Resource Name (ARN) +// of the gateway in your request. +// +// For Gateways activated after September 2, 2015, the gateway's ARN contains +// the gateway ID rather than the gateway name. However, changing the name of +// the gateway has no effect on the gateway's ARN. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateGatewayInformation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation +func (c *StorageGateway) UpdateGatewayInformation(input *UpdateGatewayInformationInput) (*UpdateGatewayInformationOutput, error) { + req, out := c.UpdateGatewayInformationRequest(input) + return out, req.Send() +} + +// UpdateGatewayInformationWithContext is the same as UpdateGatewayInformation with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGatewayInformation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateGatewayInformationWithContext(ctx aws.Context, input *UpdateGatewayInformationInput, opts ...request.Option) (*UpdateGatewayInformationOutput, error) { + req, out := c.UpdateGatewayInformationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGatewaySoftwareNow = "UpdateGatewaySoftwareNow" + +// UpdateGatewaySoftwareNowRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGatewaySoftwareNow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGatewaySoftwareNow for more information on using the UpdateGatewaySoftwareNow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGatewaySoftwareNowRequest method. +// req, resp := client.UpdateGatewaySoftwareNowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow +func (c *StorageGateway) UpdateGatewaySoftwareNowRequest(input *UpdateGatewaySoftwareNowInput) (req *request.Request, output *UpdateGatewaySoftwareNowOutput) { + op := &request.Operation{ + Name: opUpdateGatewaySoftwareNow, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateGatewaySoftwareNowInput{} + } + + output = &UpdateGatewaySoftwareNowOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGatewaySoftwareNow API operation for AWS Storage Gateway. +// +// Updates the gateway virtual machine (VM) software. The request immediately +// triggers the software update. +// +// When you make this request, you get a 200 OK success response immediately. +// However, it might take some time for the update to complete. You can call +// DescribeGatewayInformation to verify the gateway is in the STATE_RUNNING +// state. +// +// A software update forces a system restart of your gateway. You can minimize +// the chance of any disruption to your applications by increasing your iSCSI +// Initiators' timeouts. For more information about increasing iSCSI Initiator +// timeouts for Windows and Linux, see Customizing Your Windows iSCSI Settings +// (http://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorWindowsClient.html#CustomizeWindowsiSCSISettings) +// and Customizing Your Linux iSCSI Settings (http://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorRedHatClient.html#CustomizeLinuxiSCSISettings), +// respectively. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateGatewaySoftwareNow for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow +func (c *StorageGateway) UpdateGatewaySoftwareNow(input *UpdateGatewaySoftwareNowInput) (*UpdateGatewaySoftwareNowOutput, error) { + req, out := c.UpdateGatewaySoftwareNowRequest(input) + return out, req.Send() +} + +// UpdateGatewaySoftwareNowWithContext is the same as UpdateGatewaySoftwareNow with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGatewaySoftwareNow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateGatewaySoftwareNowWithContext(ctx aws.Context, input *UpdateGatewaySoftwareNowInput, opts ...request.Option) (*UpdateGatewaySoftwareNowOutput, error) { + req, out := c.UpdateGatewaySoftwareNowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateMaintenanceStartTime = "UpdateMaintenanceStartTime" + +// UpdateMaintenanceStartTimeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateMaintenanceStartTime operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateMaintenanceStartTime for more information on using the UpdateMaintenanceStartTime +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateMaintenanceStartTimeRequest method. +// req, resp := client.UpdateMaintenanceStartTimeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime +func (c *StorageGateway) UpdateMaintenanceStartTimeRequest(input *UpdateMaintenanceStartTimeInput) (req *request.Request, output *UpdateMaintenanceStartTimeOutput) { + op := &request.Operation{ + Name: opUpdateMaintenanceStartTime, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateMaintenanceStartTimeInput{} + } + + output = &UpdateMaintenanceStartTimeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateMaintenanceStartTime API operation for AWS Storage Gateway. +// +// Updates a gateway's weekly maintenance start time information, including +// day and time of the week. The maintenance time is the time in your gateway's +// time zone. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateMaintenanceStartTime for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime +func (c *StorageGateway) UpdateMaintenanceStartTime(input *UpdateMaintenanceStartTimeInput) (*UpdateMaintenanceStartTimeOutput, error) { + req, out := c.UpdateMaintenanceStartTimeRequest(input) + return out, req.Send() +} + +// UpdateMaintenanceStartTimeWithContext is the same as UpdateMaintenanceStartTime with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateMaintenanceStartTime for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateMaintenanceStartTimeWithContext(ctx aws.Context, input *UpdateMaintenanceStartTimeInput, opts ...request.Option) (*UpdateMaintenanceStartTimeOutput, error) { + req, out := c.UpdateMaintenanceStartTimeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateNFSFileShare = "UpdateNFSFileShare" + +// UpdateNFSFileShareRequest generates a "aws/request.Request" representing the +// client's request for the UpdateNFSFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateNFSFileShare for more information on using the UpdateNFSFileShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateNFSFileShareRequest method. +// req, resp := client.UpdateNFSFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare +func (c *StorageGateway) UpdateNFSFileShareRequest(input *UpdateNFSFileShareInput) (req *request.Request, output *UpdateNFSFileShareOutput) { + op := &request.Operation{ + Name: opUpdateNFSFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateNFSFileShareInput{} + } + + output = &UpdateNFSFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateNFSFileShare API operation for AWS Storage Gateway. +// +// Updates a Network File System (NFS) file share. This operation is only supported +// in the file gateway type. +// +// To leave a file share field unchanged, set the corresponding input field +// to null. +// +// Updates the following file share setting: +// +// * Default storage class for your S3 bucket +// +// * Metadata defaults for your S3 bucket +// +// * Allowed NFS clients for your file share +// +// * Squash settings +// +// * Write status of your file share +// +// To leave a file share field unchanged, set the corresponding input field +// to null. This operation is only supported in file gateways. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateNFSFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare +func (c *StorageGateway) UpdateNFSFileShare(input *UpdateNFSFileShareInput) (*UpdateNFSFileShareOutput, error) { + req, out := c.UpdateNFSFileShareRequest(input) + return out, req.Send() +} + +// UpdateNFSFileShareWithContext is the same as UpdateNFSFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateNFSFileShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateNFSFileShareWithContext(ctx aws.Context, input *UpdateNFSFileShareInput, opts ...request.Option) (*UpdateNFSFileShareOutput, error) { + req, out := c.UpdateNFSFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSMBFileShare = "UpdateSMBFileShare" + +// UpdateSMBFileShareRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSMBFileShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSMBFileShare for more information on using the UpdateSMBFileShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSMBFileShareRequest method. +// req, resp := client.UpdateSMBFileShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare +func (c *StorageGateway) UpdateSMBFileShareRequest(input *UpdateSMBFileShareInput) (req *request.Request, output *UpdateSMBFileShareOutput) { + op := &request.Operation{ + Name: opUpdateSMBFileShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSMBFileShareInput{} + } + + output = &UpdateSMBFileShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSMBFileShare API operation for AWS Storage Gateway. +// +// Updates a Server Message Block (SMB) file share. This operation is only supported +// in the file gateway type. +// +// To leave a file share field unchanged, set the corresponding input field +// to null. This operation is only supported in the file gateway type. +// +// File gateway requires AWS Security Token Service (AWS STS) to be activated +// to enable you create a file share. Make sure AWS STS is activated in the +// region you are creating your file gateway in. If AWS STS is not activated +// in the region, activate it. For information about how to activate AWS STS, +// see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity +// and Access Management User Guide. +// +// File gateway does not support creating hard or symbolic links on a file share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateSMBFileShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare +func (c *StorageGateway) UpdateSMBFileShare(input *UpdateSMBFileShareInput) (*UpdateSMBFileShareOutput, error) { + req, out := c.UpdateSMBFileShareRequest(input) + return out, req.Send() +} + +// UpdateSMBFileShareWithContext is the same as UpdateSMBFileShare with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSMBFileShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateSMBFileShareWithContext(ctx aws.Context, input *UpdateSMBFileShareInput, opts ...request.Option) (*UpdateSMBFileShareOutput, error) { + req, out := c.UpdateSMBFileShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSnapshotSchedule = "UpdateSnapshotSchedule" + +// UpdateSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSnapshotSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateSnapshotSchedule for more information on using the UpdateSnapshotSchedule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateSnapshotScheduleRequest method. +// req, resp := client.UpdateSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule +func (c *StorageGateway) UpdateSnapshotScheduleRequest(input *UpdateSnapshotScheduleInput) (req *request.Request, output *UpdateSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opUpdateSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateSnapshotScheduleInput{} + } + + output = &UpdateSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSnapshotSchedule API operation for AWS Storage Gateway. +// +// Updates a snapshot schedule configured for a gateway volume. This operation +// is only supported in the cached volume and stored volume gateway types. +// +// The default snapshot schedule for volume is once every 24 hours, starting +// at the creation time of the volume. You can use this API to change the snapshot +// schedule configured for the volume. +// +// In the request you must identify the gateway volume whose snapshot schedule +// you want to update, and the schedule information, including when you want +// the snapshot to begin on a day and the frequency (in hours) of snapshots. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule +func (c *StorageGateway) UpdateSnapshotSchedule(input *UpdateSnapshotScheduleInput) (*UpdateSnapshotScheduleOutput, error) { + req, out := c.UpdateSnapshotScheduleRequest(input) + return out, req.Send() +} + +// UpdateSnapshotScheduleWithContext is the same as UpdateSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSnapshotSchedule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateSnapshotScheduleWithContext(ctx aws.Context, input *UpdateSnapshotScheduleInput, opts ...request.Option) (*UpdateSnapshotScheduleOutput, error) { + req, out := c.UpdateSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateVTLDeviceType = "UpdateVTLDeviceType" + +// UpdateVTLDeviceTypeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVTLDeviceType operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVTLDeviceType for more information on using the UpdateVTLDeviceType +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVTLDeviceTypeRequest method. +// req, resp := client.UpdateVTLDeviceTypeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType +func (c *StorageGateway) UpdateVTLDeviceTypeRequest(input *UpdateVTLDeviceTypeInput) (req *request.Request, output *UpdateVTLDeviceTypeOutput) { + op := &request.Operation{ + Name: opUpdateVTLDeviceType, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVTLDeviceTypeInput{} + } + + output = &UpdateVTLDeviceTypeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVTLDeviceType API operation for AWS Storage Gateway. +// +// Updates the type of medium changer in a tape gateway. When you activate a +// tape gateway, you select a medium changer type for the tape gateway. This +// operation enables you to select a different type of medium changer after +// a tape gateway is activated. This operation is only supported in the tape +// gateway type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation UpdateVTLDeviceType for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType +func (c *StorageGateway) UpdateVTLDeviceType(input *UpdateVTLDeviceTypeInput) (*UpdateVTLDeviceTypeOutput, error) { + req, out := c.UpdateVTLDeviceTypeRequest(input) + return out, req.Send() +} + +// UpdateVTLDeviceTypeWithContext is the same as UpdateVTLDeviceType with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVTLDeviceType for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) UpdateVTLDeviceTypeWithContext(ctx aws.Context, input *UpdateVTLDeviceTypeInput, opts ...request.Option) (*UpdateVTLDeviceTypeOutput, error) { + req, out := c.UpdateVTLDeviceTypeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A JSON object containing one or more of the following fields: +// +// * ActivateGatewayInput$ActivationKey +// +// * ActivateGatewayInput$GatewayName +// +// * ActivateGatewayInput$GatewayRegion +// +// * ActivateGatewayInput$GatewayTimezone +// +// * ActivateGatewayInput$GatewayType +// +// * ActivateGatewayInput$TapeDriveType +// +// * ActivateGatewayInput$MediumChangerType +type ActivateGatewayInput struct { + _ struct{} `type:"structure"` + + // Your gateway activation key. You can obtain the activation key by sending + // an HTTP GET request with redirects enabled to the gateway IP address (port + // 80). The redirect URL returned in the response provides you the activation + // key for your gateway in the query string parameter activationKey. It may + // also include other activation-related parameters, however, these are merely + // defaults -- the arguments you pass to the ActivateGateway API call determine + // the actual configuration of your gateway. + // + // For more information, see https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html + // in the Storage Gateway User Guide. + // + // ActivationKey is a required field + ActivationKey *string `min:"1" type:"string" required:"true"` + + // The name you configured for your gateway. + // + // GatewayName is a required field + GatewayName *string `min:"2" type:"string" required:"true"` + + // A value that indicates the region where you want to store your data. The + // gateway region specified must be the same region as the region in your Host + // header in the request. For more information about available regions and endpoints + // for AWS Storage Gateway, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sg_region) + // in the Amazon Web Services Glossary. + // + // Valid Values: "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ca-central-1", + // "eu-west-1", "eu-central-1", "eu-west-2", "eu-west-3", "ap-northeast-1", + // "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-south-1", "sa-east-1" + // + // GatewayRegion is a required field + GatewayRegion *string `min:"1" type:"string" required:"true"` + + // A value that indicates the time zone you want to set for the gateway. The + // time zone is of the format "GMT-hr:mm" or "GMT+hr:mm". For example, GMT-4:00 + // indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is + // 2 hours ahead of GMT. The time zone is used, for example, for scheduling + // snapshots and your gateway's maintenance schedule. + // + // GatewayTimezone is a required field + GatewayTimezone *string `min:"3" type:"string" required:"true"` + + // A value that defines the type of gateway to activate. The type specified + // is critical to all later functions of the gateway and cannot be changed after + // activation. The default value is STORED. + // + // Valid Values: "STORED", "CACHED", "VTL", "FILE_S3" + GatewayType *string `min:"2" type:"string"` + + // The value that indicates the type of medium changer to use for tape gateway. + // This field is optional. + // + // Valid Values: "STK-L700", "AWS-Gateway-VTL" + MediumChangerType *string `min:"2" type:"string"` + + // The value that indicates the type of tape drive to use for tape gateway. + // This field is optional. + // + // Valid Values: "IBM-ULT3580-TD5" + TapeDriveType *string `min:"2" type:"string"` +} + +// String returns the string representation +func (s ActivateGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActivateGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActivateGatewayInput"} + if s.ActivationKey == nil { + invalidParams.Add(request.NewErrParamRequired("ActivationKey")) + } + if s.ActivationKey != nil && len(*s.ActivationKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ActivationKey", 1)) + } + if s.GatewayName == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayName")) + } + if s.GatewayName != nil && len(*s.GatewayName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("GatewayName", 2)) + } + if s.GatewayRegion == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayRegion")) + } + if s.GatewayRegion != nil && len(*s.GatewayRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GatewayRegion", 1)) + } + if s.GatewayTimezone == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayTimezone")) + } + if s.GatewayTimezone != nil && len(*s.GatewayTimezone) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GatewayTimezone", 3)) + } + if s.GatewayType != nil && len(*s.GatewayType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("GatewayType", 2)) + } + if s.MediumChangerType != nil && len(*s.MediumChangerType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("MediumChangerType", 2)) + } + if s.TapeDriveType != nil && len(*s.TapeDriveType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("TapeDriveType", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActivationKey sets the ActivationKey field's value. +func (s *ActivateGatewayInput) SetActivationKey(v string) *ActivateGatewayInput { + s.ActivationKey = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *ActivateGatewayInput) SetGatewayName(v string) *ActivateGatewayInput { + s.GatewayName = &v + return s +} + +// SetGatewayRegion sets the GatewayRegion field's value. +func (s *ActivateGatewayInput) SetGatewayRegion(v string) *ActivateGatewayInput { + s.GatewayRegion = &v + return s +} + +// SetGatewayTimezone sets the GatewayTimezone field's value. +func (s *ActivateGatewayInput) SetGatewayTimezone(v string) *ActivateGatewayInput { + s.GatewayTimezone = &v + return s +} + +// SetGatewayType sets the GatewayType field's value. +func (s *ActivateGatewayInput) SetGatewayType(v string) *ActivateGatewayInput { + s.GatewayType = &v + return s +} + +// SetMediumChangerType sets the MediumChangerType field's value. +func (s *ActivateGatewayInput) SetMediumChangerType(v string) *ActivateGatewayInput { + s.MediumChangerType = &v + return s +} + +// SetTapeDriveType sets the TapeDriveType field's value. +func (s *ActivateGatewayInput) SetTapeDriveType(v string) *ActivateGatewayInput { + s.TapeDriveType = &v + return s +} + +// AWS Storage Gateway returns the Amazon Resource Name (ARN) of the activated +// gateway. It is a string made of information such as your account, gateway +// name, and region. This ARN is used to reference the gateway in other API +// operations as well as resource-based authorization. +// +// For gateways activated prior to September 02, 2015, the gateway ARN contains +// the gateway name rather than the gateway ID. Changing the name of the gateway +// has no effect on the gateway ARN. +type ActivateGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ActivateGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ActivateGatewayOutput) SetGatewayARN(v string) *ActivateGatewayOutput { + s.GatewayARN = &v + return s +} + +type AddCacheInput struct { + _ struct{} `type:"structure"` + + // DiskIds is a required field + DiskIds []*string `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AddCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddCacheInput"} + if s.DiskIds == nil { + invalidParams.Add(request.NewErrParamRequired("DiskIds")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskIds sets the DiskIds field's value. +func (s *AddCacheInput) SetDiskIds(v []*string) *AddCacheInput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddCacheInput) SetGatewayARN(v string) *AddCacheInput { + s.GatewayARN = &v + return s +} + +type AddCacheOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AddCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddCacheOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddCacheOutput) SetGatewayARN(v string) *AddCacheOutput { + s.GatewayARN = &v + return s +} + +// AddTagsToResourceInput +type AddTagsToResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource you want to add tags to. + // + // ResourceARN is a required field + ResourceARN *string `min:"50" type:"string" required:"true"` + + // The key-value pair that represents the tag you want to add to the resource. + // The value can be an empty string. + // + // Valid characters for key and value are letters, spaces, and numbers representable + // in UTF-8 format, and the following special characters: + - = . _ : / @. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s AddTagsToResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsToResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *AddTagsToResourceInput) SetResourceARN(v string) *AddTagsToResourceInput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { + s.Tags = v + return s +} + +// AddTagsToResourceOutput +type AddTagsToResourceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource you want to add tags to. + ResourceARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AddTagsToResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsToResourceOutput) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *AddTagsToResourceOutput) SetResourceARN(v string) *AddTagsToResourceOutput { + s.ResourceARN = &v + return s +} + +type AddUploadBufferInput struct { + _ struct{} `type:"structure"` + + // DiskIds is a required field + DiskIds []*string `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AddUploadBufferInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddUploadBufferInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddUploadBufferInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddUploadBufferInput"} + if s.DiskIds == nil { + invalidParams.Add(request.NewErrParamRequired("DiskIds")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskIds sets the DiskIds field's value. +func (s *AddUploadBufferInput) SetDiskIds(v []*string) *AddUploadBufferInput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddUploadBufferInput) SetGatewayARN(v string) *AddUploadBufferInput { + s.GatewayARN = &v + return s +} + +type AddUploadBufferOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AddUploadBufferOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddUploadBufferOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddUploadBufferOutput) SetGatewayARN(v string) *AddUploadBufferOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * AddWorkingStorageInput$DiskIds +type AddWorkingStorageInput struct { + _ struct{} `type:"structure"` + + // An array of strings that identify disks that are to be configured as working + // storage. Each string have a minimum length of 1 and maximum length of 300. + // You can get the disk IDs from the ListLocalDisks API. + // + // DiskIds is a required field + DiskIds []*string `type:"list" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AddWorkingStorageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddWorkingStorageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddWorkingStorageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddWorkingStorageInput"} + if s.DiskIds == nil { + invalidParams.Add(request.NewErrParamRequired("DiskIds")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskIds sets the DiskIds field's value. +func (s *AddWorkingStorageInput) SetDiskIds(v []*string) *AddWorkingStorageInput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddWorkingStorageInput) SetGatewayARN(v string) *AddWorkingStorageInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway for which working storage was +// configured. +type AddWorkingStorageOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AddWorkingStorageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddWorkingStorageOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AddWorkingStorageOutput) SetGatewayARN(v string) *AddWorkingStorageOutput { + s.GatewayARN = &v + return s +} + +// Describes an iSCSI cached volume. +type CachediSCSIVolume struct { + _ struct{} `type:"structure"` + + // The date the volume was created. Volumes created prior to March 28, 2017 + // don’t have this time stamp. + CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // If the cached volume was created from a snapshot, this field contains the + // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. + SourceSnapshotId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the storage volume. + VolumeARN *string `min:"50" type:"string"` + + // The unique identifier of the volume, e.g. vol-AE4B946D. + VolumeId *string `min:"12" type:"string"` + + // Represents the percentage complete if the volume is restoring or bootstrapping + // that represents the percent of data transferred. This field does not appear + // in the response if the cached volume is not restoring or bootstrapping. + VolumeProgress *float64 `type:"double"` + + // The size, in bytes, of the volume capacity. + VolumeSizeInBytes *int64 `type:"long"` + + // One of the VolumeStatus values that indicates the state of the storage volume. + VolumeStatus *string `min:"3" type:"string"` + + // One of the VolumeType enumeration values that describes the type of the volume. + VolumeType *string `min:"3" type:"string"` + + // The size of the data stored on the volume in bytes. + // + // This value is not available for volumes created prior to May 13, 2015, until + // you store data on the volume. + VolumeUsedInBytes *int64 `type:"long"` + + // An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes + // for one stored volume. + VolumeiSCSIAttributes *VolumeiSCSIAttributes `type:"structure"` +} + +// String returns the string representation +func (s CachediSCSIVolume) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CachediSCSIVolume) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *CachediSCSIVolume) SetCreatedDate(v time.Time) *CachediSCSIVolume { + s.CreatedDate = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CachediSCSIVolume) SetKMSKey(v string) *CachediSCSIVolume { + s.KMSKey = &v + return s +} + +// SetSourceSnapshotId sets the SourceSnapshotId field's value. +func (s *CachediSCSIVolume) SetSourceSnapshotId(v string) *CachediSCSIVolume { + s.SourceSnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CachediSCSIVolume) SetVolumeARN(v string) *CachediSCSIVolume { + s.VolumeARN = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *CachediSCSIVolume) SetVolumeId(v string) *CachediSCSIVolume { + s.VolumeId = &v + return s +} + +// SetVolumeProgress sets the VolumeProgress field's value. +func (s *CachediSCSIVolume) SetVolumeProgress(v float64) *CachediSCSIVolume { + s.VolumeProgress = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *CachediSCSIVolume) SetVolumeSizeInBytes(v int64) *CachediSCSIVolume { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeStatus sets the VolumeStatus field's value. +func (s *CachediSCSIVolume) SetVolumeStatus(v string) *CachediSCSIVolume { + s.VolumeStatus = &v + return s +} + +// SetVolumeType sets the VolumeType field's value. +func (s *CachediSCSIVolume) SetVolumeType(v string) *CachediSCSIVolume { + s.VolumeType = &v + return s +} + +// SetVolumeUsedInBytes sets the VolumeUsedInBytes field's value. +func (s *CachediSCSIVolume) SetVolumeUsedInBytes(v int64) *CachediSCSIVolume { + s.VolumeUsedInBytes = &v + return s +} + +// SetVolumeiSCSIAttributes sets the VolumeiSCSIAttributes field's value. +func (s *CachediSCSIVolume) SetVolumeiSCSIAttributes(v *VolumeiSCSIAttributes) *CachediSCSIVolume { + s.VolumeiSCSIAttributes = v + return s +} + +// CancelArchivalInput +type CancelArchivalInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape you want to cancel archiving + // for. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelArchivalInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelArchivalInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelArchivalInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelArchivalInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CancelArchivalInput) SetGatewayARN(v string) *CancelArchivalInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelArchivalInput) SetTapeARN(v string) *CancelArchivalInput { + s.TapeARN = &v + return s +} + +// CancelArchivalOutput +type CancelArchivalOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape for which archiving was + // canceled. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CancelArchivalOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelArchivalOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelArchivalOutput) SetTapeARN(v string) *CancelArchivalOutput { + s.TapeARN = &v + return s +} + +// CancelRetrievalInput +type CancelRetrievalInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape you want to cancel retrieval + // for. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelRetrievalInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRetrievalInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelRetrievalInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelRetrievalInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CancelRetrievalInput) SetGatewayARN(v string) *CancelRetrievalInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelRetrievalInput) SetTapeARN(v string) *CancelRetrievalInput { + s.TapeARN = &v + return s +} + +// CancelRetrievalOutput +type CancelRetrievalOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape for which retrieval was + // canceled. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CancelRetrievalOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelRetrievalOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CancelRetrievalOutput) SetTapeARN(v string) *CancelRetrievalOutput { + s.TapeARN = &v + return s +} + +// Describes Challenge-Handshake Authentication Protocol (CHAP) information +// that supports authentication between your gateway and iSCSI initiators. +type ChapInfo struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + InitiatorName *string `min:"1" type:"string"` + + // The secret key that the initiator (for example, the Windows client) must + // provide to participate in mutual CHAP with the target. + SecretToAuthenticateInitiator *string `min:"1" type:"string"` + + // The secret key that the target must provide to participate in mutual CHAP + // with the initiator (e.g. Windows client). + SecretToAuthenticateTarget *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the volume. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ChapInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChapInfo) GoString() string { + return s.String() +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *ChapInfo) SetInitiatorName(v string) *ChapInfo { + s.InitiatorName = &v + return s +} + +// SetSecretToAuthenticateInitiator sets the SecretToAuthenticateInitiator field's value. +func (s *ChapInfo) SetSecretToAuthenticateInitiator(v string) *ChapInfo { + s.SecretToAuthenticateInitiator = &v + return s +} + +// SetSecretToAuthenticateTarget sets the SecretToAuthenticateTarget field's value. +func (s *ChapInfo) SetSecretToAuthenticateTarget(v string) *ChapInfo { + s.SecretToAuthenticateTarget = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *ChapInfo) SetTargetARN(v string) *ChapInfo { + s.TargetARN = &v + return s +} + +type CreateCachediSCSIVolumeInput struct { + _ struct{} `type:"structure"` + + // A unique identifier that you use to retry a request. If you retry a request, + // use the same ClientToken you specified in the initial request. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The network interface of the gateway on which to expose the iSCSI target. + // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a + // list of the network interfaces available on a gateway. + // + // Valid Values: A valid IP address. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` + + // The snapshot ID (e.g. "snap-1122aabb") of the snapshot to restore as the + // new cached volume. Specify this field if you want to create the iSCSI storage + // volume from a snapshot otherwise do not include this field. To list snapshots + // for your account use DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) + // in the Amazon Elastic Compute Cloud API Reference. + SnapshotId *string `type:"string"` + + // The ARN for an existing volume. Specifying this ARN makes the new volume + // into an exact copy of the specified existing volume's latest recovery point. + // The VolumeSizeInBytes value for this new volume must be equal to or larger + // than the size of the existing volume, in bytes. + SourceVolumeARN *string `min:"50" type:"string"` + + // The name of the iSCSI target used by initiators to connect to the target + // and as a suffix for the target ARN. For example, specifying TargetName as + // myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + // The target name must be unique across all volumes of a gateway. + // + // TargetName is a required field + TargetName *string `min:"1" type:"string" required:"true"` + + // The size of the volume in bytes. + // + // VolumeSizeInBytes is a required field + VolumeSizeInBytes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s CreateCachediSCSIVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCachediSCSIVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCachediSCSIVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCachediSCSIVolumeInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.SourceVolumeARN != nil && len(*s.SourceVolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("SourceVolumeARN", 50)) + } + if s.TargetName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetName")) + } + if s.TargetName != nil && len(*s.TargetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) + } + if s.VolumeSizeInBytes == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeSizeInBytes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateCachediSCSIVolumeInput) SetClientToken(v string) *CreateCachediSCSIVolumeInput { + s.ClientToken = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateCachediSCSIVolumeInput) SetGatewayARN(v string) *CreateCachediSCSIVolumeInput { + s.GatewayARN = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateCachediSCSIVolumeInput) SetKMSEncrypted(v bool) *CreateCachediSCSIVolumeInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateCachediSCSIVolumeInput) SetKMSKey(v string) *CreateCachediSCSIVolumeInput { + s.KMSKey = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateCachediSCSIVolumeInput) SetNetworkInterfaceId(v string) *CreateCachediSCSIVolumeInput { + s.NetworkInterfaceId = &v + return s +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateCachediSCSIVolumeInput) SetSnapshotId(v string) *CreateCachediSCSIVolumeInput { + s.SnapshotId = &v + return s +} + +// SetSourceVolumeARN sets the SourceVolumeARN field's value. +func (s *CreateCachediSCSIVolumeInput) SetSourceVolumeARN(v string) *CreateCachediSCSIVolumeInput { + s.SourceVolumeARN = &v + return s +} + +// SetTargetName sets the TargetName field's value. +func (s *CreateCachediSCSIVolumeInput) SetTargetName(v string) *CreateCachediSCSIVolumeInput { + s.TargetName = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *CreateCachediSCSIVolumeInput) SetVolumeSizeInBytes(v int64) *CreateCachediSCSIVolumeInput { + s.VolumeSizeInBytes = &v + return s +} + +type CreateCachediSCSIVolumeOutput struct { + _ struct{} `type:"structure"` + + // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // name that initiators can use to connect to the target. + TargetARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of the configured volume. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateCachediSCSIVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCachediSCSIVolumeOutput) GoString() string { + return s.String() +} + +// SetTargetARN sets the TargetARN field's value. +func (s *CreateCachediSCSIVolumeOutput) SetTargetARN(v string) *CreateCachediSCSIVolumeOutput { + s.TargetARN = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateCachediSCSIVolumeOutput) SetVolumeARN(v string) *CreateCachediSCSIVolumeOutput { + s.VolumeARN = &v + return s +} + +// CreateNFSFileShareInput +type CreateNFSFileShareInput struct { + _ struct{} `type:"structure"` + + // The list of clients that are allowed to access the file gateway. The list + // must contain either valid IP addresses or valid CIDR blocks. + ClientList []*string `min:"1" type:"list"` + + // A unique string value that you supply that is used by file gateway to ensure + // idempotent file share creation. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file gateway on which you want to create + // a file share. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. + // This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backed storage used for storing file data. + // + // LocationARN is a required field + LocationARN *string `min:"16" type:"string" required:"true"` + + // File share default values. Optional. + NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` + + // Sets the access control list permission for objects in the Amazon S3 bucket + // that a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the AWS Identity and Access Management (IAM) role that a file + // gateway assumes when it accesses the underlying storage. + // + // Role is a required field + Role *string `min:"20" type:"string" required:"true"` + + // Maps a user to anonymous user. Valid options are the following: + // + // * "RootSquash" - Only root is mapped to anonymous user. + // + // * "NoSquash" - No one is mapped to anonymous user. + // + // * "AllSquash" - Everyone is mapped to anonymous user. + Squash *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s CreateNFSFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNFSFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNFSFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNFSFileShareInput"} + if s.ClientList != nil && len(s.ClientList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientList", 1)) + } + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.LocationARN == nil { + invalidParams.Add(request.NewErrParamRequired("LocationARN")) + } + if s.LocationARN != nil && len(*s.LocationARN) < 16 { + invalidParams.Add(request.NewErrParamMinLen("LocationARN", 16)) + } + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.Role != nil && len(*s.Role) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Role", 20)) + } + if s.Squash != nil && len(*s.Squash) < 5 { + invalidParams.Add(request.NewErrParamMinLen("Squash", 5)) + } + if s.NFSFileShareDefaults != nil { + if err := s.NFSFileShareDefaults.Validate(); err != nil { + invalidParams.AddNested("NFSFileShareDefaults", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientList sets the ClientList field's value. +func (s *CreateNFSFileShareInput) SetClientList(v []*string) *CreateNFSFileShareInput { + s.ClientList = v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateNFSFileShareInput) SetClientToken(v string) *CreateNFSFileShareInput { + s.ClientToken = &v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *CreateNFSFileShareInput) SetDefaultStorageClass(v string) *CreateNFSFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateNFSFileShareInput) SetGatewayARN(v string) *CreateNFSFileShareInput { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *CreateNFSFileShareInput) SetGuessMIMETypeEnabled(v bool) *CreateNFSFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateNFSFileShareInput) SetKMSEncrypted(v bool) *CreateNFSFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateNFSFileShareInput) SetKMSKey(v string) *CreateNFSFileShareInput { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *CreateNFSFileShareInput) SetLocationARN(v string) *CreateNFSFileShareInput { + s.LocationARN = &v + return s +} + +// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. +func (s *CreateNFSFileShareInput) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *CreateNFSFileShareInput { + s.NFSFileShareDefaults = v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *CreateNFSFileShareInput) SetObjectACL(v string) *CreateNFSFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *CreateNFSFileShareInput) SetReadOnly(v bool) *CreateNFSFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *CreateNFSFileShareInput) SetRequesterPays(v bool) *CreateNFSFileShareInput { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *CreateNFSFileShareInput) SetRole(v string) *CreateNFSFileShareInput { + s.Role = &v + return s +} + +// SetSquash sets the Squash field's value. +func (s *CreateNFSFileShareInput) SetSquash(v string) *CreateNFSFileShareInput { + s.Squash = &v + return s +} + +// CreateNFSFileShareOutput +type CreateNFSFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the newly created file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateNFSFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNFSFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *CreateNFSFileShareOutput) SetFileShareARN(v string) *CreateNFSFileShareOutput { + s.FileShareARN = &v + return s +} + +// CreateSMBFileShareInput +type CreateSMBFileShareInput struct { + _ struct{} `type:"structure"` + + // The authentication method that users use to access the file share. + // + // Valid values: "ActiveDirectory" or "GuestAccess". The default is "ActiveDirectory". + Authentication *string `min:"5" type:"string"` + + // A unique string value that you supply that is used by file gateway to ensure + // idempotent file share creation. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file gateway on which you want to create + // a file share. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // A list of users in the Active Directory that are not allowed to access the + // file share. Can only be set if Authentication is set to "ActiveDirectory". + InvalidUserList []*string `type:"list"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. + // This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backed storage used for storing file data. + // + // LocationARN is a required field + LocationARN *string `min:"16" type:"string" required:"true"` + + // Sets the access control list permission for objects in the Amazon S3 bucket + // that a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the AWS Identity and Access Management (IAM) role that a file + // gateway assumes when it accesses the underlying storage. + // + // Role is a required field + Role *string `min:"20" type:"string" required:"true"` + + // A list of users in the Active Directory that are allowed to access the file + // share. Can only be set if Authentication is set to "ActiveDirectory". + ValidUserList []*string `type:"list"` +} + +// String returns the string representation +func (s CreateSMBFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSMBFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSMBFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSMBFileShareInput"} + if s.Authentication != nil && len(*s.Authentication) < 5 { + invalidParams.Add(request.NewErrParamMinLen("Authentication", 5)) + } + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.LocationARN == nil { + invalidParams.Add(request.NewErrParamRequired("LocationARN")) + } + if s.LocationARN != nil && len(*s.LocationARN) < 16 { + invalidParams.Add(request.NewErrParamMinLen("LocationARN", 16)) + } + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.Role != nil && len(*s.Role) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Role", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthentication sets the Authentication field's value. +func (s *CreateSMBFileShareInput) SetAuthentication(v string) *CreateSMBFileShareInput { + s.Authentication = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateSMBFileShareInput) SetClientToken(v string) *CreateSMBFileShareInput { + s.ClientToken = &v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *CreateSMBFileShareInput) SetDefaultStorageClass(v string) *CreateSMBFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateSMBFileShareInput) SetGatewayARN(v string) *CreateSMBFileShareInput { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *CreateSMBFileShareInput) SetGuessMIMETypeEnabled(v bool) *CreateSMBFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetInvalidUserList sets the InvalidUserList field's value. +func (s *CreateSMBFileShareInput) SetInvalidUserList(v []*string) *CreateSMBFileShareInput { + s.InvalidUserList = v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateSMBFileShareInput) SetKMSEncrypted(v bool) *CreateSMBFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateSMBFileShareInput) SetKMSKey(v string) *CreateSMBFileShareInput { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *CreateSMBFileShareInput) SetLocationARN(v string) *CreateSMBFileShareInput { + s.LocationARN = &v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *CreateSMBFileShareInput) SetObjectACL(v string) *CreateSMBFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *CreateSMBFileShareInput) SetReadOnly(v bool) *CreateSMBFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *CreateSMBFileShareInput) SetRequesterPays(v bool) *CreateSMBFileShareInput { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *CreateSMBFileShareInput) SetRole(v string) *CreateSMBFileShareInput { + s.Role = &v + return s +} + +// SetValidUserList sets the ValidUserList field's value. +func (s *CreateSMBFileShareInput) SetValidUserList(v []*string) *CreateSMBFileShareInput { + s.ValidUserList = v + return s +} + +// CreateSMBFileShareOutput +type CreateSMBFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the newly created file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateSMBFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSMBFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *CreateSMBFileShareOutput) SetFileShareARN(v string) *CreateSMBFileShareOutput { + s.FileShareARN = &v + return s +} + +type CreateSnapshotFromVolumeRecoveryPointInput struct { + _ struct{} `type:"structure"` + + // SnapshotDescription is a required field + SnapshotDescription *string `min:"1" type:"string" required:"true"` + + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotFromVolumeRecoveryPointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotFromVolumeRecoveryPointInput"} + if s.SnapshotDescription == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotDescription")) + } + if s.SnapshotDescription != nil && len(*s.SnapshotDescription) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnapshotDescription", 1)) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnapshotDescription sets the SnapshotDescription field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointInput) SetSnapshotDescription(v string) *CreateSnapshotFromVolumeRecoveryPointInput { + s.SnapshotDescription = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointInput) SetVolumeARN(v string) *CreateSnapshotFromVolumeRecoveryPointInput { + s.VolumeARN = &v + return s +} + +type CreateSnapshotFromVolumeRecoveryPointOutput struct { + _ struct{} `type:"structure"` + + SnapshotId *string `type:"string"` + + VolumeARN *string `min:"50" type:"string"` + + VolumeRecoveryPointTime *string `type:"string"` +} + +// String returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotFromVolumeRecoveryPointOutput) GoString() string { + return s.String() +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetSnapshotId(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { + s.SnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetVolumeARN(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { + s.VolumeARN = &v + return s +} + +// SetVolumeRecoveryPointTime sets the VolumeRecoveryPointTime field's value. +func (s *CreateSnapshotFromVolumeRecoveryPointOutput) SetVolumeRecoveryPointTime(v string) *CreateSnapshotFromVolumeRecoveryPointOutput { + s.VolumeRecoveryPointTime = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * CreateSnapshotInput$SnapshotDescription +// +// * CreateSnapshotInput$VolumeARN +type CreateSnapshotInput struct { + _ struct{} `type:"structure"` + + // Textual description of the snapshot that appears in the Amazon EC2 console, + // Elastic Block Store snapshots panel in the Description field, and in the + // AWS Storage Gateway snapshot Details pane, Description field + // + // SnapshotDescription is a required field + SnapshotDescription *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} + if s.SnapshotDescription == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotDescription")) + } + if s.SnapshotDescription != nil && len(*s.SnapshotDescription) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SnapshotDescription", 1)) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnapshotDescription sets the SnapshotDescription field's value. +func (s *CreateSnapshotInput) SetSnapshotDescription(v string) *CreateSnapshotInput { + s.SnapshotDescription = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotInput) SetVolumeARN(v string) *CreateSnapshotInput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the following fields: +type CreateSnapshotOutput struct { + _ struct{} `type:"structure"` + + // The snapshot ID that is used to refer to the snapshot in future operations + // such as describing snapshots (Amazon Elastic Compute Cloud API DescribeSnapshots) + // or creating a volume from a snapshot (CreateStorediSCSIVolume). + SnapshotId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the volume of which the snapshot was taken. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotOutput) GoString() string { + return s.String() +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateSnapshotOutput) SetSnapshotId(v string) *CreateSnapshotOutput { + s.SnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateSnapshotOutput) SetVolumeARN(v string) *CreateSnapshotOutput { + s.VolumeARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * CreateStorediSCSIVolumeInput$DiskId +// +// * CreateStorediSCSIVolumeInput$NetworkInterfaceId +// +// * CreateStorediSCSIVolumeInput$PreserveExistingData +// +// * CreateStorediSCSIVolumeInput$SnapshotId +// +// * CreateStorediSCSIVolumeInput$TargetName +type CreateStorediSCSIVolumeInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the gateway local disk that is configured as a + // stored volume. Use ListLocalDisks (http://docs.aws.amazon.com/storagegateway/latest/userguide/API_ListLocalDisks.html) + // to list disk IDs for a gateway. + // + // DiskId is a required field + DiskId *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The network interface of the gateway on which to expose the iSCSI target. + // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a + // list of the network interfaces available on a gateway. + // + // Valid Values: A valid IP address. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` + + // Specify this field as true if you want to preserve the data on the local + // disk. Otherwise, specifying this field as false creates an empty volume. + // + // Valid Values: true, false + // + // PreserveExistingData is a required field + PreserveExistingData *bool `type:"boolean" required:"true"` + + // The snapshot ID (e.g. "snap-1122aabb") of the snapshot to restore as the + // new stored volume. Specify this field if you want to create the iSCSI storage + // volume from a snapshot otherwise do not include this field. To list snapshots + // for your account use DescribeSnapshots (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) + // in the Amazon Elastic Compute Cloud API Reference. + SnapshotId *string `type:"string"` + + // The name of the iSCSI target used by initiators to connect to the target + // and as a suffix for the target ARN. For example, specifying TargetName as + // myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + // The target name must be unique across all volumes of a gateway. + // + // TargetName is a required field + TargetName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateStorediSCSIVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStorediSCSIVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStorediSCSIVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStorediSCSIVolumeInput"} + if s.DiskId == nil { + invalidParams.Add(request.NewErrParamRequired("DiskId")) + } + if s.DiskId != nil && len(*s.DiskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DiskId", 1)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.PreserveExistingData == nil { + invalidParams.Add(request.NewErrParamRequired("PreserveExistingData")) + } + if s.TargetName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetName")) + } + if s.TargetName != nil && len(*s.TargetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskId sets the DiskId field's value. +func (s *CreateStorediSCSIVolumeInput) SetDiskId(v string) *CreateStorediSCSIVolumeInput { + s.DiskId = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateStorediSCSIVolumeInput) SetGatewayARN(v string) *CreateStorediSCSIVolumeInput { + s.GatewayARN = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateStorediSCSIVolumeInput) SetNetworkInterfaceId(v string) *CreateStorediSCSIVolumeInput { + s.NetworkInterfaceId = &v + return s +} + +// SetPreserveExistingData sets the PreserveExistingData field's value. +func (s *CreateStorediSCSIVolumeInput) SetPreserveExistingData(v bool) *CreateStorediSCSIVolumeInput { + s.PreserveExistingData = &v + return s +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateStorediSCSIVolumeInput) SetSnapshotId(v string) *CreateStorediSCSIVolumeInput { + s.SnapshotId = &v + return s +} + +// SetTargetName sets the TargetName field's value. +func (s *CreateStorediSCSIVolumeInput) SetTargetName(v string) *CreateStorediSCSIVolumeInput { + s.TargetName = &v + return s +} + +// A JSON object containing the following fields: +type CreateStorediSCSIVolumeOutput struct { + _ struct{} `type:"structure"` + + // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // name that initiators can use to connect to the target. + TargetARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of the configured volume. + VolumeARN *string `min:"50" type:"string"` + + // The size of the volume in bytes. + VolumeSizeInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s CreateStorediSCSIVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStorediSCSIVolumeOutput) GoString() string { + return s.String() +} + +// SetTargetARN sets the TargetARN field's value. +func (s *CreateStorediSCSIVolumeOutput) SetTargetARN(v string) *CreateStorediSCSIVolumeOutput { + s.TargetARN = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *CreateStorediSCSIVolumeOutput) SetVolumeARN(v string) *CreateStorediSCSIVolumeOutput { + s.VolumeARN = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *CreateStorediSCSIVolumeOutput) SetVolumeSizeInBytes(v int64) *CreateStorediSCSIVolumeOutput { + s.VolumeSizeInBytes = &v + return s +} + +// CreateTapeWithBarcodeInput +type CreateTapeWithBarcodeInput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name (ARN) that represents the gateway to associate + // the virtual tape with. Use the ListGateways operation to return a list of + // gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS Key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The barcode that you want to assign to the tape. + // + // Barcodes cannot be reused. This includes barcodes used for tapes that have + // been deleted. + // + // TapeBarcode is a required field + TapeBarcode *string `min:"7" type:"string" required:"true"` + + // The size, in bytes, of the virtual tape that you want to create. + // + // The size must be aligned by gigabyte (1024*1024*1024 byte). + // + // TapeSizeInBytes is a required field + TapeSizeInBytes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s CreateTapeWithBarcodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapeWithBarcodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTapeWithBarcodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTapeWithBarcodeInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.TapeBarcode == nil { + invalidParams.Add(request.NewErrParamRequired("TapeBarcode")) + } + if s.TapeBarcode != nil && len(*s.TapeBarcode) < 7 { + invalidParams.Add(request.NewErrParamMinLen("TapeBarcode", 7)) + } + if s.TapeSizeInBytes == nil { + invalidParams.Add(request.NewErrParamRequired("TapeSizeInBytes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateTapeWithBarcodeInput) SetGatewayARN(v string) *CreateTapeWithBarcodeInput { + s.GatewayARN = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateTapeWithBarcodeInput) SetKMSEncrypted(v bool) *CreateTapeWithBarcodeInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateTapeWithBarcodeInput) SetKMSKey(v string) *CreateTapeWithBarcodeInput { + s.KMSKey = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *CreateTapeWithBarcodeInput) SetTapeBarcode(v string) *CreateTapeWithBarcodeInput { + s.TapeBarcode = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *CreateTapeWithBarcodeInput) SetTapeSizeInBytes(v int64) *CreateTapeWithBarcodeInput { + s.TapeSizeInBytes = &v + return s +} + +// CreateTapeOutput +type CreateTapeWithBarcodeOutput struct { + _ struct{} `type:"structure"` + + // A unique Amazon Resource Name (ARN) that represents the virtual tape that + // was created. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s CreateTapeWithBarcodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapeWithBarcodeOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *CreateTapeWithBarcodeOutput) SetTapeARN(v string) *CreateTapeWithBarcodeOutput { + s.TapeARN = &v + return s +} + +// CreateTapesInput +type CreateTapesInput struct { + _ struct{} `type:"structure"` + + // A unique identifier that you use to retry a request. If you retry a request, + // use the same ClientToken you specified in the initial request. + // + // Using the same ClientToken prevents creating the tape multiple times. + // + // ClientToken is a required field + ClientToken *string `min:"5" type:"string" required:"true"` + + // The unique Amazon Resource Name (ARN) that represents the gateway to associate + // the virtual tapes with. Use the ListGateways operation to return a list of + // gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The number of virtual tapes that you want to create. + // + // NumTapesToCreate is a required field + NumTapesToCreate *int64 `min:"1" type:"integer" required:"true"` + + // A prefix that you append to the barcode of the virtual tape you are creating. + // This prefix makes the barcode unique. + // + // The prefix must be 1 to 4 characters in length and must be one of the uppercase + // letters from A to Z. + // + // TapeBarcodePrefix is a required field + TapeBarcodePrefix *string `min:"1" type:"string" required:"true"` + + // The size, in bytes, of the virtual tapes that you want to create. + // + // The size must be aligned by gigabyte (1024*1024*1024 byte). + // + // TapeSizeInBytes is a required field + TapeSizeInBytes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s CreateTapesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTapesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTapesInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.ClientToken != nil && len(*s.ClientToken) < 5 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 5)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.NumTapesToCreate == nil { + invalidParams.Add(request.NewErrParamRequired("NumTapesToCreate")) + } + if s.NumTapesToCreate != nil && *s.NumTapesToCreate < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumTapesToCreate", 1)) + } + if s.TapeBarcodePrefix == nil { + invalidParams.Add(request.NewErrParamRequired("TapeBarcodePrefix")) + } + if s.TapeBarcodePrefix != nil && len(*s.TapeBarcodePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TapeBarcodePrefix", 1)) + } + if s.TapeSizeInBytes == nil { + invalidParams.Add(request.NewErrParamRequired("TapeSizeInBytes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateTapesInput) SetClientToken(v string) *CreateTapesInput { + s.ClientToken = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *CreateTapesInput) SetGatewayARN(v string) *CreateTapesInput { + s.GatewayARN = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *CreateTapesInput) SetKMSEncrypted(v bool) *CreateTapesInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *CreateTapesInput) SetKMSKey(v string) *CreateTapesInput { + s.KMSKey = &v + return s +} + +// SetNumTapesToCreate sets the NumTapesToCreate field's value. +func (s *CreateTapesInput) SetNumTapesToCreate(v int64) *CreateTapesInput { + s.NumTapesToCreate = &v + return s +} + +// SetTapeBarcodePrefix sets the TapeBarcodePrefix field's value. +func (s *CreateTapesInput) SetTapeBarcodePrefix(v string) *CreateTapesInput { + s.TapeBarcodePrefix = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *CreateTapesInput) SetTapeSizeInBytes(v int64) *CreateTapesInput { + s.TapeSizeInBytes = &v + return s +} + +// CreateTapeOutput +type CreateTapesOutput struct { + _ struct{} `type:"structure"` + + // A list of unique Amazon Resource Names (ARNs) that represents the virtual + // tapes that were created. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s CreateTapesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTapesOutput) GoString() string { + return s.String() +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *CreateTapesOutput) SetTapeARNs(v []*string) *CreateTapesOutput { + s.TapeARNs = v + return s +} + +// A JSON object containing the following fields: +// +// * DeleteBandwidthRateLimitInput$BandwidthType +type DeleteBandwidthRateLimitInput struct { + _ struct{} `type:"structure"` + + // One of the BandwidthType values that indicates the gateway bandwidth rate + // limit to delete. + // + // Valid Values: Upload, Download, All. + // + // BandwidthType is a required field + BandwidthType *string `min:"3" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBandwidthRateLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBandwidthRateLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBandwidthRateLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBandwidthRateLimitInput"} + if s.BandwidthType == nil { + invalidParams.Add(request.NewErrParamRequired("BandwidthType")) + } + if s.BandwidthType != nil && len(*s.BandwidthType) < 3 { + invalidParams.Add(request.NewErrParamMinLen("BandwidthType", 3)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBandwidthType sets the BandwidthType field's value. +func (s *DeleteBandwidthRateLimitInput) SetBandwidthType(v string) *DeleteBandwidthRateLimitInput { + s.BandwidthType = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteBandwidthRateLimitInput) SetGatewayARN(v string) *DeleteBandwidthRateLimitInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway whose bandwidth rate information +// was deleted. +type DeleteBandwidthRateLimitOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteBandwidthRateLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBandwidthRateLimitOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteBandwidthRateLimitOutput) SetGatewayARN(v string) *DeleteBandwidthRateLimitOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * DeleteChapCredentialsInput$InitiatorName +// +// * DeleteChapCredentialsInput$TargetARN +type DeleteChapCredentialsInput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + // + // InitiatorName is a required field + InitiatorName *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes + // operation to return to retrieve the TargetARN for specified VolumeARN. + // + // TargetARN is a required field + TargetARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteChapCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChapCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteChapCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteChapCredentialsInput"} + if s.InitiatorName == nil { + invalidParams.Add(request.NewErrParamRequired("InitiatorName")) + } + if s.InitiatorName != nil && len(*s.InitiatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InitiatorName", 1)) + } + if s.TargetARN == nil { + invalidParams.Add(request.NewErrParamRequired("TargetARN")) + } + if s.TargetARN != nil && len(*s.TargetARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *DeleteChapCredentialsInput) SetInitiatorName(v string) *DeleteChapCredentialsInput { + s.InitiatorName = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DeleteChapCredentialsInput) SetTargetARN(v string) *DeleteChapCredentialsInput { + s.TargetARN = &v + return s +} + +// A JSON object containing the following fields: +type DeleteChapCredentialsOutput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + InitiatorName *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the target. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteChapCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChapCredentialsOutput) GoString() string { + return s.String() +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *DeleteChapCredentialsOutput) SetInitiatorName(v string) *DeleteChapCredentialsOutput { + s.InitiatorName = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DeleteChapCredentialsOutput) SetTargetARN(v string) *DeleteChapCredentialsOutput { + s.TargetARN = &v + return s +} + +// DeleteFileShareInput +type DeleteFileShareInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share to be deleted. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` + + // If this value is set to true, the operation deletes a file share immediately + // and aborts all data uploads to AWS. Otherwise, the file share is not deleted + // until all data is uploaded to AWS. This process aborts the data upload process, + // and the file share enters the FORCE_DELETING status. + ForceDelete *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFileShareInput"} + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *DeleteFileShareInput) SetFileShareARN(v string) *DeleteFileShareInput { + s.FileShareARN = &v + return s +} + +// SetForceDelete sets the ForceDelete field's value. +func (s *DeleteFileShareInput) SetForceDelete(v bool) *DeleteFileShareInput { + s.ForceDelete = &v + return s +} + +// DeleteFileShareOutput +type DeleteFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the deleted file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *DeleteFileShareOutput) SetFileShareARN(v string) *DeleteFileShareOutput { + s.FileShareARN = &v + return s +} + +// A JSON object containing the ID of the gateway to delete. +type DeleteGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteGatewayInput) SetGatewayARN(v string) *DeleteGatewayInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the ID of the deleted gateway. +type DeleteGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteGatewayOutput) SetGatewayARN(v string) *DeleteGatewayOutput { + s.GatewayARN = &v + return s +} + +type DeleteSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotScheduleInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteSnapshotScheduleInput) SetVolumeARN(v string) *DeleteSnapshotScheduleInput { + s.VolumeARN = &v + return s +} + +type DeleteSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteSnapshotScheduleOutput) SetVolumeARN(v string) *DeleteSnapshotScheduleOutput { + s.VolumeARN = &v + return s +} + +// DeleteTapeArchiveInput +type DeleteTapeArchiveInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape to delete from the virtual + // tape shelf (VTS). + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTapeArchiveInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeArchiveInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTapeArchiveInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTapeArchiveInput"} + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeArchiveInput) SetTapeARN(v string) *DeleteTapeArchiveInput { + s.TapeARN = &v + return s +} + +// DeleteTapeArchiveOutput +type DeleteTapeArchiveOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape that was deleted from + // the virtual tape shelf (VTS). + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteTapeArchiveOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeArchiveOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeArchiveOutput) SetTapeARN(v string) *DeleteTapeArchiveOutput { + s.TapeARN = &v + return s +} + +// DeleteTapeInput +type DeleteTapeInput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name (ARN) of the gateway that the virtual tape + // to delete is associated with. Use the ListGateways operation to return a + // list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape to delete. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTapeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTapeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTapeInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DeleteTapeInput) SetGatewayARN(v string) *DeleteTapeInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeInput) SetTapeARN(v string) *DeleteTapeInput { + s.TapeARN = &v + return s +} + +// DeleteTapeOutput +type DeleteTapeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the deleted virtual tape. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteTapeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTapeOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *DeleteTapeOutput) SetTapeARN(v string) *DeleteTapeOutput { + s.TapeARN = &v + return s +} + +// A JSON object containing the DeleteVolumeInput$VolumeARN to delete. +type DeleteVolumeInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVolumeInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteVolumeInput) SetVolumeARN(v string) *DeleteVolumeInput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the of the storage volume that was deleted +type DeleteVolumeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the storage volume that was deleted. It + // is the same ARN you provided in the request. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeleteVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVolumeOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DeleteVolumeOutput) SetVolumeARN(v string) *DeleteVolumeOutput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the of the gateway. +type DescribeBandwidthRateLimitInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeBandwidthRateLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBandwidthRateLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBandwidthRateLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBandwidthRateLimitInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeBandwidthRateLimitInput) SetGatewayARN(v string) *DescribeBandwidthRateLimitInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +type DescribeBandwidthRateLimitOutput struct { + _ struct{} `type:"structure"` + + // The average download bandwidth rate limit in bits per second. This field + // does not appear in the response if the download rate limit is not set. + AverageDownloadRateLimitInBitsPerSec *int64 `min:"102400" type:"long"` + + // The average upload bandwidth rate limit in bits per second. This field does + // not appear in the response if the upload rate limit is not set. + AverageUploadRateLimitInBitsPerSec *int64 `min:"51200" type:"long"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DescribeBandwidthRateLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBandwidthRateLimitOutput) GoString() string { + return s.String() +} + +// SetAverageDownloadRateLimitInBitsPerSec sets the AverageDownloadRateLimitInBitsPerSec field's value. +func (s *DescribeBandwidthRateLimitOutput) SetAverageDownloadRateLimitInBitsPerSec(v int64) *DescribeBandwidthRateLimitOutput { + s.AverageDownloadRateLimitInBitsPerSec = &v + return s +} + +// SetAverageUploadRateLimitInBitsPerSec sets the AverageUploadRateLimitInBitsPerSec field's value. +func (s *DescribeBandwidthRateLimitOutput) SetAverageUploadRateLimitInBitsPerSec(v int64) *DescribeBandwidthRateLimitOutput { + s.AverageUploadRateLimitInBitsPerSec = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeBandwidthRateLimitOutput) SetGatewayARN(v string) *DescribeBandwidthRateLimitOutput { + s.GatewayARN = &v + return s +} + +type DescribeCacheInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCacheInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeCacheInput) SetGatewayARN(v string) *DescribeCacheInput { + s.GatewayARN = &v + return s +} + +type DescribeCacheOutput struct { + _ struct{} `type:"structure"` + + CacheAllocatedInBytes *int64 `type:"long"` + + CacheDirtyPercentage *float64 `type:"double"` + + CacheHitPercentage *float64 `type:"double"` + + CacheMissPercentage *float64 `type:"double"` + + CacheUsedPercentage *float64 `type:"double"` + + DiskIds []*string `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DescribeCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCacheOutput) GoString() string { + return s.String() +} + +// SetCacheAllocatedInBytes sets the CacheAllocatedInBytes field's value. +func (s *DescribeCacheOutput) SetCacheAllocatedInBytes(v int64) *DescribeCacheOutput { + s.CacheAllocatedInBytes = &v + return s +} + +// SetCacheDirtyPercentage sets the CacheDirtyPercentage field's value. +func (s *DescribeCacheOutput) SetCacheDirtyPercentage(v float64) *DescribeCacheOutput { + s.CacheDirtyPercentage = &v + return s +} + +// SetCacheHitPercentage sets the CacheHitPercentage field's value. +func (s *DescribeCacheOutput) SetCacheHitPercentage(v float64) *DescribeCacheOutput { + s.CacheHitPercentage = &v + return s +} + +// SetCacheMissPercentage sets the CacheMissPercentage field's value. +func (s *DescribeCacheOutput) SetCacheMissPercentage(v float64) *DescribeCacheOutput { + s.CacheMissPercentage = &v + return s +} + +// SetCacheUsedPercentage sets the CacheUsedPercentage field's value. +func (s *DescribeCacheOutput) SetCacheUsedPercentage(v float64) *DescribeCacheOutput { + s.CacheUsedPercentage = &v + return s +} + +// SetDiskIds sets the DiskIds field's value. +func (s *DescribeCacheOutput) SetDiskIds(v []*string) *DescribeCacheOutput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeCacheOutput) SetGatewayARN(v string) *DescribeCacheOutput { + s.GatewayARN = &v + return s +} + +type DescribeCachediSCSIVolumesInput struct { + _ struct{} `type:"structure"` + + // VolumeARNs is a required field + VolumeARNs []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeCachediSCSIVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCachediSCSIVolumesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCachediSCSIVolumesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCachediSCSIVolumesInput"} + if s.VolumeARNs == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARNs")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARNs sets the VolumeARNs field's value. +func (s *DescribeCachediSCSIVolumesInput) SetVolumeARNs(v []*string) *DescribeCachediSCSIVolumesInput { + s.VolumeARNs = v + return s +} + +// A JSON object containing the following fields: +type DescribeCachediSCSIVolumesOutput struct { + _ struct{} `type:"structure"` + + // An array of objects where each object contains metadata about one cached + // volume. + CachediSCSIVolumes []*CachediSCSIVolume `type:"list"` +} + +// String returns the string representation +func (s DescribeCachediSCSIVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCachediSCSIVolumesOutput) GoString() string { + return s.String() +} + +// SetCachediSCSIVolumes sets the CachediSCSIVolumes field's value. +func (s *DescribeCachediSCSIVolumesOutput) SetCachediSCSIVolumes(v []*CachediSCSIVolume) *DescribeCachediSCSIVolumesOutput { + s.CachediSCSIVolumes = v + return s +} + +// A JSON object containing the Amazon Resource Name (ARN) of the iSCSI volume +// target. +type DescribeChapCredentialsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes + // operation to return to retrieve the TargetARN for specified VolumeARN. + // + // TargetARN is a required field + TargetARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeChapCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChapCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeChapCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeChapCredentialsInput"} + if s.TargetARN == nil { + invalidParams.Add(request.NewErrParamRequired("TargetARN")) + } + if s.TargetARN != nil && len(*s.TargetARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DescribeChapCredentialsInput) SetTargetARN(v string) *DescribeChapCredentialsInput { + s.TargetARN = &v + return s +} + +// A JSON object containing a . +type DescribeChapCredentialsOutput struct { + _ struct{} `type:"structure"` + + // An array of ChapInfo objects that represent CHAP credentials. Each object + // in the array contains CHAP credential information for one target-initiator + // pair. If no CHAP credentials are set, an empty array is returned. CHAP credential + // information is provided in a JSON object with the following fields: + // + // * InitiatorName: The iSCSI initiator that connects to the target. + // + // * SecretToAuthenticateInitiator: The secret key that the initiator (for + // example, the Windows client) must provide to participate in mutual CHAP + // with the target. + // + // * SecretToAuthenticateTarget: The secret key that the target must provide + // to participate in mutual CHAP with the initiator (e.g. Windows client). + // + // * TargetARN: The Amazon Resource Name (ARN) of the storage volume. + ChapCredentials []*ChapInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeChapCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChapCredentialsOutput) GoString() string { + return s.String() +} + +// SetChapCredentials sets the ChapCredentials field's value. +func (s *DescribeChapCredentialsOutput) SetChapCredentials(v []*ChapInfo) *DescribeChapCredentialsOutput { + s.ChapCredentials = v + return s +} + +// A JSON object containing the ID of the gateway. +type DescribeGatewayInformationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeGatewayInformationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGatewayInformationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeGatewayInformationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGatewayInformationInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeGatewayInformationInput) SetGatewayARN(v string) *DescribeGatewayInformationInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +type DescribeGatewayInformationOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The unique identifier assigned to your gateway during activation. This ID + // becomes part of the gateway Amazon Resource Name (ARN), which you use as + // input for other operations. + GatewayId *string `min:"12" type:"string"` + + // The name you configured for your gateway. + GatewayName *string `type:"string"` + + // A NetworkInterface array that contains descriptions of the gateway network + // interfaces. + GatewayNetworkInterfaces []*NetworkInterface `type:"list"` + + // A value that indicates the operating state of the gateway. + GatewayState *string `min:"2" type:"string"` + + // A value that indicates the time zone configured for the gateway. + GatewayTimezone *string `min:"3" type:"string"` + + // The type of the gateway. + GatewayType *string `min:"2" type:"string"` + + // The date on which the last software update was applied to the gateway. If + // the gateway has never been updated, this field does not return a value in + // the response. + LastSoftwareUpdate *string `min:"1" type:"string"` + + // The date on which an update to the gateway is available. This date is in + // the time zone of the gateway. If the gateway is not available for an update + // this field is not returned in the response. + NextUpdateAvailabilityDate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeGatewayInformationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGatewayInformationOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayARN(v string) *DescribeGatewayInformationOutput { + s.GatewayARN = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayId(v string) *DescribeGatewayInformationOutput { + s.GatewayId = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayName(v string) *DescribeGatewayInformationOutput { + s.GatewayName = &v + return s +} + +// SetGatewayNetworkInterfaces sets the GatewayNetworkInterfaces field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayNetworkInterfaces(v []*NetworkInterface) *DescribeGatewayInformationOutput { + s.GatewayNetworkInterfaces = v + return s +} + +// SetGatewayState sets the GatewayState field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayState(v string) *DescribeGatewayInformationOutput { + s.GatewayState = &v + return s +} + +// SetGatewayTimezone sets the GatewayTimezone field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayTimezone(v string) *DescribeGatewayInformationOutput { + s.GatewayTimezone = &v + return s +} + +// SetGatewayType sets the GatewayType field's value. +func (s *DescribeGatewayInformationOutput) SetGatewayType(v string) *DescribeGatewayInformationOutput { + s.GatewayType = &v + return s +} + +// SetLastSoftwareUpdate sets the LastSoftwareUpdate field's value. +func (s *DescribeGatewayInformationOutput) SetLastSoftwareUpdate(v string) *DescribeGatewayInformationOutput { + s.LastSoftwareUpdate = &v + return s +} + +// SetNextUpdateAvailabilityDate sets the NextUpdateAvailabilityDate field's value. +func (s *DescribeGatewayInformationOutput) SetNextUpdateAvailabilityDate(v string) *DescribeGatewayInformationOutput { + s.NextUpdateAvailabilityDate = &v + return s +} + +// A JSON object containing the of the gateway. +type DescribeMaintenanceStartTimeInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeMaintenanceStartTimeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceStartTimeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMaintenanceStartTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceStartTimeInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeMaintenanceStartTimeInput) SetGatewayARN(v string) *DescribeMaintenanceStartTimeInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +// +// * DescribeMaintenanceStartTimeOutput$DayOfWeek +// +// * DescribeMaintenanceStartTimeOutput$HourOfDay +// +// * DescribeMaintenanceStartTimeOutput$MinuteOfHour +// +// * DescribeMaintenanceStartTimeOutput$Timezone +type DescribeMaintenanceStartTimeOutput struct { + _ struct{} `type:"structure"` + + // An ordinal number between 0 and 6 that represents the day of the week, where + // 0 represents Sunday and 6 represents Saturday. The day of week is in the + // time zone of the gateway. + DayOfWeek *int64 `type:"integer"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The hour component of the maintenance start time represented as hh, where + // hh is the hour (0 to 23). The hour of the day is in the time zone of the + // gateway. + HourOfDay *int64 `type:"integer"` + + // The minute component of the maintenance start time represented as mm, where + // mm is the minute (0 to 59). The minute of the hour is in the time zone of + // the gateway. + MinuteOfHour *int64 `type:"integer"` + + Timezone *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s DescribeMaintenanceStartTimeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceStartTimeOutput) GoString() string { + return s.String() +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetDayOfWeek(v int64) *DescribeMaintenanceStartTimeOutput { + s.DayOfWeek = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetGatewayARN(v string) *DescribeMaintenanceStartTimeOutput { + s.GatewayARN = &v + return s +} + +// SetHourOfDay sets the HourOfDay field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetHourOfDay(v int64) *DescribeMaintenanceStartTimeOutput { + s.HourOfDay = &v + return s +} + +// SetMinuteOfHour sets the MinuteOfHour field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetMinuteOfHour(v int64) *DescribeMaintenanceStartTimeOutput { + s.MinuteOfHour = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *DescribeMaintenanceStartTimeOutput) SetTimezone(v string) *DescribeMaintenanceStartTimeOutput { + s.Timezone = &v + return s +} + +// DescribeNFSFileSharesInput +type DescribeNFSFileSharesInput struct { + _ struct{} `type:"structure"` + + // An array containing the Amazon Resource Name (ARN) of each file share to + // be described. + // + // FileShareARNList is a required field + FileShareARNList []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeNFSFileSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNFSFileSharesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNFSFileSharesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNFSFileSharesInput"} + if s.FileShareARNList == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARNList")) + } + if s.FileShareARNList != nil && len(s.FileShareARNList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARNList", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARNList sets the FileShareARNList field's value. +func (s *DescribeNFSFileSharesInput) SetFileShareARNList(v []*string) *DescribeNFSFileSharesInput { + s.FileShareARNList = v + return s +} + +// DescribeNFSFileSharesOutput +type DescribeNFSFileSharesOutput struct { + _ struct{} `type:"structure"` + + // An array containing a description for each requested file share. + NFSFileShareInfoList []*NFSFileShareInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeNFSFileSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNFSFileSharesOutput) GoString() string { + return s.String() +} + +// SetNFSFileShareInfoList sets the NFSFileShareInfoList field's value. +func (s *DescribeNFSFileSharesOutput) SetNFSFileShareInfoList(v []*NFSFileShareInfo) *DescribeNFSFileSharesOutput { + s.NFSFileShareInfoList = v + return s +} + +// DescribeSMBFileSharesInput +type DescribeSMBFileSharesInput struct { + _ struct{} `type:"structure"` + + // An array containing the Amazon Resource Name (ARN) of each file share to + // be described. + // + // FileShareARNList is a required field + FileShareARNList []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeSMBFileSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBFileSharesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSMBFileSharesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSMBFileSharesInput"} + if s.FileShareARNList == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARNList")) + } + if s.FileShareARNList != nil && len(s.FileShareARNList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARNList", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARNList sets the FileShareARNList field's value. +func (s *DescribeSMBFileSharesInput) SetFileShareARNList(v []*string) *DescribeSMBFileSharesInput { + s.FileShareARNList = v + return s +} + +// DescribeSMBFileSharesOutput +type DescribeSMBFileSharesOutput struct { + _ struct{} `type:"structure"` + + // An array containing a description for each requested file share. + SMBFileShareInfoList []*SMBFileShareInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeSMBFileSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBFileSharesOutput) GoString() string { + return s.String() +} + +// SetSMBFileShareInfoList sets the SMBFileShareInfoList field's value. +func (s *DescribeSMBFileSharesOutput) SetSMBFileShareInfoList(v []*SMBFileShareInfo) *DescribeSMBFileSharesOutput { + s.SMBFileShareInfoList = v + return s +} + +type DescribeSMBSettingsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSMBSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSMBSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSMBSettingsInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeSMBSettingsInput) SetGatewayARN(v string) *DescribeSMBSettingsInput { + s.GatewayARN = &v + return s +} + +type DescribeSMBSettingsOutput struct { + _ struct{} `type:"structure"` + + // The name of the domain that the gateway is joined to. + DomainName *string `type:"string"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // This value is true if a password for the guest user “smbguest” is set, and + // otherwise false. + SMBGuestPasswordSet *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeSMBSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSMBSettingsOutput) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeSMBSettingsOutput) SetDomainName(v string) *DescribeSMBSettingsOutput { + s.DomainName = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeSMBSettingsOutput) SetGatewayARN(v string) *DescribeSMBSettingsOutput { + s.GatewayARN = &v + return s +} + +// SetSMBGuestPasswordSet sets the SMBGuestPasswordSet field's value. +func (s *DescribeSMBSettingsOutput) SetSMBGuestPasswordSet(v bool) *DescribeSMBSettingsOutput { + s.SMBGuestPasswordSet = &v + return s +} + +// A JSON object containing the DescribeSnapshotScheduleInput$VolumeARN of the +// volume. +type DescribeSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSnapshotScheduleInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DescribeSnapshotScheduleInput) SetVolumeARN(v string) *DescribeSnapshotScheduleInput { + s.VolumeARN = &v + return s +} + +type DescribeSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + Description *string `min:"1" type:"string"` + + RecurrenceInHours *int64 `min:"1" type:"integer"` + + StartAt *int64 `type:"integer"` + + Timezone *string `min:"3" type:"string"` + + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DescribeSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *DescribeSnapshotScheduleOutput) SetDescription(v string) *DescribeSnapshotScheduleOutput { + s.Description = &v + return s +} + +// SetRecurrenceInHours sets the RecurrenceInHours field's value. +func (s *DescribeSnapshotScheduleOutput) SetRecurrenceInHours(v int64) *DescribeSnapshotScheduleOutput { + s.RecurrenceInHours = &v + return s +} + +// SetStartAt sets the StartAt field's value. +func (s *DescribeSnapshotScheduleOutput) SetStartAt(v int64) *DescribeSnapshotScheduleOutput { + s.StartAt = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *DescribeSnapshotScheduleOutput) SetTimezone(v string) *DescribeSnapshotScheduleOutput { + s.Timezone = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DescribeSnapshotScheduleOutput) SetVolumeARN(v string) *DescribeSnapshotScheduleOutput { + s.VolumeARN = &v + return s +} + +// A JSON object containing a list of DescribeStorediSCSIVolumesInput$VolumeARNs. +type DescribeStorediSCSIVolumesInput struct { + _ struct{} `type:"structure"` + + // An array of strings where each string represents the Amazon Resource Name + // (ARN) of a stored volume. All of the specified stored volumes must from the + // same gateway. Use ListVolumes to get volume ARNs for a gateway. + // + // VolumeARNs is a required field + VolumeARNs []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeStorediSCSIVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStorediSCSIVolumesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStorediSCSIVolumesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStorediSCSIVolumesInput"} + if s.VolumeARNs == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARNs")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARNs sets the VolumeARNs field's value. +func (s *DescribeStorediSCSIVolumesInput) SetVolumeARNs(v []*string) *DescribeStorediSCSIVolumesInput { + s.VolumeARNs = v + return s +} + +type DescribeStorediSCSIVolumesOutput struct { + _ struct{} `type:"structure"` + + StorediSCSIVolumes []*StorediSCSIVolume `type:"list"` +} + +// String returns the string representation +func (s DescribeStorediSCSIVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStorediSCSIVolumesOutput) GoString() string { + return s.String() +} + +// SetStorediSCSIVolumes sets the StorediSCSIVolumes field's value. +func (s *DescribeStorediSCSIVolumesOutput) SetStorediSCSIVolumes(v []*StorediSCSIVolume) *DescribeStorediSCSIVolumesOutput { + s.StorediSCSIVolumes = v + return s +} + +// DescribeTapeArchivesInput +type DescribeTapeArchivesInput struct { + _ struct{} `type:"structure"` + + // Specifies that the number of virtual tapes descried be limited to the specified + // number. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin describing + // virtual tapes. + Marker *string `min:"1" type:"string"` + + // Specifies one or more unique Amazon Resource Names (ARNs) that represent + // the virtual tapes you want to describe. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeTapeArchivesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeArchivesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTapeArchivesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTapeArchivesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *DescribeTapeArchivesInput) SetLimit(v int64) *DescribeTapeArchivesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeArchivesInput) SetMarker(v string) *DescribeTapeArchivesInput { + s.Marker = &v + return s +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *DescribeTapeArchivesInput) SetTapeARNs(v []*string) *DescribeTapeArchivesInput { + s.TapeARNs = v + return s +} + +// DescribeTapeArchivesOutput +type DescribeTapeArchivesOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates the position at which the virtual tapes that + // were fetched for description ended. Use this marker in your next request + // to fetch the next set of virtual tapes in the virtual tape shelf (VTS). If + // there are no more virtual tapes to describe, this field does not appear in + // the response. + Marker *string `min:"1" type:"string"` + + // An array of virtual tape objects in the virtual tape shelf (VTS). The description + // includes of the Amazon Resource Name(ARN) of the virtual tapes. The information + // returned includes the Amazon Resource Names (ARNs) of the tapes, size of + // the tapes, status of the tapes, progress of the description and tape barcode. + TapeArchives []*TapeArchive `type:"list"` +} + +// String returns the string representation +func (s DescribeTapeArchivesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeArchivesOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeArchivesOutput) SetMarker(v string) *DescribeTapeArchivesOutput { + s.Marker = &v + return s +} + +// SetTapeArchives sets the TapeArchives field's value. +func (s *DescribeTapeArchivesOutput) SetTapeArchives(v []*TapeArchive) *DescribeTapeArchivesOutput { + s.TapeArchives = v + return s +} + +// DescribeTapeRecoveryPointsInput +type DescribeTapeRecoveryPointsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Specifies that the number of virtual tape recovery points that are described + // be limited to the specified number. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin describing + // the virtual tape recovery points. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeTapeRecoveryPointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeRecoveryPointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTapeRecoveryPointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTapeRecoveryPointsInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeTapeRecoveryPointsInput) SetGatewayARN(v string) *DescribeTapeRecoveryPointsInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeTapeRecoveryPointsInput) SetLimit(v int64) *DescribeTapeRecoveryPointsInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeRecoveryPointsInput) SetMarker(v string) *DescribeTapeRecoveryPointsInput { + s.Marker = &v + return s +} + +// DescribeTapeRecoveryPointsOutput +type DescribeTapeRecoveryPointsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // An opaque string that indicates the position at which the virtual tape recovery + // points that were listed for description ended. + // + // Use this marker in your next request to list the next set of virtual tape + // recovery points in the list. If there are no more recovery points to describe, + // this field does not appear in the response. + Marker *string `min:"1" type:"string"` + + // An array of TapeRecoveryPointInfos that are available for the specified gateway. + TapeRecoveryPointInfos []*TapeRecoveryPointInfo `type:"list"` +} + +// String returns the string representation +func (s DescribeTapeRecoveryPointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapeRecoveryPointsOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeTapeRecoveryPointsOutput) SetGatewayARN(v string) *DescribeTapeRecoveryPointsOutput { + s.GatewayARN = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapeRecoveryPointsOutput) SetMarker(v string) *DescribeTapeRecoveryPointsOutput { + s.Marker = &v + return s +} + +// SetTapeRecoveryPointInfos sets the TapeRecoveryPointInfos field's value. +func (s *DescribeTapeRecoveryPointsOutput) SetTapeRecoveryPointInfos(v []*TapeRecoveryPointInfo) *DescribeTapeRecoveryPointsOutput { + s.TapeRecoveryPointInfos = v + return s +} + +// DescribeTapesInput +type DescribeTapesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Specifies that the number of virtual tapes described be limited to the specified + // number. + // + // Amazon Web Services may impose its own limit, if this field is not set. + Limit *int64 `min:"1" type:"integer"` + + // A marker value, obtained in a previous call to DescribeTapes. This marker + // indicates which page of results to retrieve. + // + // If not specified, the first page of results is retrieved. + Marker *string `min:"1" type:"string"` + + // Specifies one or more unique Amazon Resource Names (ARNs) that represent + // the virtual tapes you want to describe. If this parameter is not specified, + // Tape gateway returns a description of all virtual tapes associated with the + // specified gateway. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeTapesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTapesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTapesInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeTapesInput) SetGatewayARN(v string) *DescribeTapesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeTapesInput) SetLimit(v int64) *DescribeTapesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapesInput) SetMarker(v string) *DescribeTapesInput { + s.Marker = &v + return s +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *DescribeTapesInput) SetTapeARNs(v []*string) *DescribeTapesInput { + s.TapeARNs = v + return s +} + +// DescribeTapesOutput +type DescribeTapesOutput struct { + _ struct{} `type:"structure"` + + // An opaque string which can be used as part of a subsequent DescribeTapes + // call to retrieve the next page of results. + // + // If a response does not contain a marker, then there are no more results to + // be retrieved. + Marker *string `min:"1" type:"string"` + + // An array of virtual tape descriptions. + Tapes []*Tape `type:"list"` +} + +// String returns the string representation +func (s DescribeTapesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTapesOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeTapesOutput) SetMarker(v string) *DescribeTapesOutput { + s.Marker = &v + return s +} + +// SetTapes sets the Tapes field's value. +func (s *DescribeTapesOutput) SetTapes(v []*Tape) *DescribeTapesOutput { + s.Tapes = v + return s +} + +type DescribeUploadBufferInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeUploadBufferInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUploadBufferInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeUploadBufferInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeUploadBufferInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeUploadBufferInput) SetGatewayARN(v string) *DescribeUploadBufferInput { + s.GatewayARN = &v + return s +} + +type DescribeUploadBufferOutput struct { + _ struct{} `type:"structure"` + + DiskIds []*string `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + UploadBufferAllocatedInBytes *int64 `type:"long"` + + UploadBufferUsedInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s DescribeUploadBufferOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUploadBufferOutput) GoString() string { + return s.String() +} + +// SetDiskIds sets the DiskIds field's value. +func (s *DescribeUploadBufferOutput) SetDiskIds(v []*string) *DescribeUploadBufferOutput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeUploadBufferOutput) SetGatewayARN(v string) *DescribeUploadBufferOutput { + s.GatewayARN = &v + return s +} + +// SetUploadBufferAllocatedInBytes sets the UploadBufferAllocatedInBytes field's value. +func (s *DescribeUploadBufferOutput) SetUploadBufferAllocatedInBytes(v int64) *DescribeUploadBufferOutput { + s.UploadBufferAllocatedInBytes = &v + return s +} + +// SetUploadBufferUsedInBytes sets the UploadBufferUsedInBytes field's value. +func (s *DescribeUploadBufferOutput) SetUploadBufferUsedInBytes(v int64) *DescribeUploadBufferOutput { + s.UploadBufferUsedInBytes = &v + return s +} + +// DescribeVTLDevicesInput +type DescribeVTLDevicesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Specifies that the number of VTL devices described be limited to the specified + // number. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin describing + // the VTL devices. + Marker *string `min:"1" type:"string"` + + // An array of strings, where each string represents the Amazon Resource Name + // (ARN) of a VTL device. + // + // All of the specified VTL devices must be from the same gateway. If no VTL + // devices are specified, the result will contain all devices on the specified + // gateway. + VTLDeviceARNs []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeVTLDevicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVTLDevicesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVTLDevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVTLDevicesInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeVTLDevicesInput) SetGatewayARN(v string) *DescribeVTLDevicesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeVTLDevicesInput) SetLimit(v int64) *DescribeVTLDevicesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeVTLDevicesInput) SetMarker(v string) *DescribeVTLDevicesInput { + s.Marker = &v + return s +} + +// SetVTLDeviceARNs sets the VTLDeviceARNs field's value. +func (s *DescribeVTLDevicesInput) SetVTLDeviceARNs(v []*string) *DescribeVTLDevicesInput { + s.VTLDeviceARNs = v + return s +} + +// DescribeVTLDevicesOutput +type DescribeVTLDevicesOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // An opaque string that indicates the position at which the VTL devices that + // were fetched for description ended. Use the marker in your next request to + // fetch the next set of VTL devices in the list. If there are no more VTL devices + // to describe, this field does not appear in the response. + Marker *string `min:"1" type:"string"` + + // An array of VTL device objects composed of the Amazon Resource Name(ARN) + // of the VTL devices. + VTLDevices []*VTLDevice `type:"list"` +} + +// String returns the string representation +func (s DescribeVTLDevicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVTLDevicesOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeVTLDevicesOutput) SetGatewayARN(v string) *DescribeVTLDevicesOutput { + s.GatewayARN = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeVTLDevicesOutput) SetMarker(v string) *DescribeVTLDevicesOutput { + s.Marker = &v + return s +} + +// SetVTLDevices sets the VTLDevices field's value. +func (s *DescribeVTLDevicesOutput) SetVTLDevices(v []*VTLDevice) *DescribeVTLDevicesOutput { + s.VTLDevices = v + return s +} + +// A JSON object containing the of the gateway. +type DescribeWorkingStorageInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkingStorageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkingStorageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkingStorageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkingStorageInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeWorkingStorageInput) SetGatewayARN(v string) *DescribeWorkingStorageInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +type DescribeWorkingStorageOutput struct { + _ struct{} `type:"structure"` + + // An array of the gateway's local disk IDs that are configured as working storage. + // Each local disk ID is specified as a string (minimum length of 1 and maximum + // length of 300). If no local disks are configured as working storage, then + // the DiskIds array is empty. + DiskIds []*string `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The total working storage in bytes allocated for the gateway. If no working + // storage is configured for the gateway, this field returns 0. + WorkingStorageAllocatedInBytes *int64 `type:"long"` + + // The total working storage in bytes in use by the gateway. If no working storage + // is configured for the gateway, this field returns 0. + WorkingStorageUsedInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s DescribeWorkingStorageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkingStorageOutput) GoString() string { + return s.String() +} + +// SetDiskIds sets the DiskIds field's value. +func (s *DescribeWorkingStorageOutput) SetDiskIds(v []*string) *DescribeWorkingStorageOutput { + s.DiskIds = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DescribeWorkingStorageOutput) SetGatewayARN(v string) *DescribeWorkingStorageOutput { + s.GatewayARN = &v + return s +} + +// SetWorkingStorageAllocatedInBytes sets the WorkingStorageAllocatedInBytes field's value. +func (s *DescribeWorkingStorageOutput) SetWorkingStorageAllocatedInBytes(v int64) *DescribeWorkingStorageOutput { + s.WorkingStorageAllocatedInBytes = &v + return s +} + +// SetWorkingStorageUsedInBytes sets the WorkingStorageUsedInBytes field's value. +func (s *DescribeWorkingStorageOutput) SetWorkingStorageUsedInBytes(v int64) *DescribeWorkingStorageOutput { + s.WorkingStorageUsedInBytes = &v + return s +} + +// Lists iSCSI information about a VTL device. +type DeviceiSCSIAttributes struct { + _ struct{} `type:"structure"` + + // Indicates whether mutual CHAP is enabled for the iSCSI target. + ChapEnabled *bool `type:"boolean"` + + // The network interface identifier of the VTL device. + NetworkInterfaceId *string `type:"string"` + + // The port used to communicate with iSCSI VTL device targets. + NetworkInterfacePort *int64 `type:"integer"` + + // Specifies the unique Amazon Resource Name(ARN) that encodes the iSCSI qualified + // name(iqn) of a tape drive or media changer target. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DeviceiSCSIAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceiSCSIAttributes) GoString() string { + return s.String() +} + +// SetChapEnabled sets the ChapEnabled field's value. +func (s *DeviceiSCSIAttributes) SetChapEnabled(v bool) *DeviceiSCSIAttributes { + s.ChapEnabled = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *DeviceiSCSIAttributes) SetNetworkInterfaceId(v string) *DeviceiSCSIAttributes { + s.NetworkInterfaceId = &v + return s +} + +// SetNetworkInterfacePort sets the NetworkInterfacePort field's value. +func (s *DeviceiSCSIAttributes) SetNetworkInterfacePort(v int64) *DeviceiSCSIAttributes { + s.NetworkInterfacePort = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *DeviceiSCSIAttributes) SetTargetARN(v string) *DeviceiSCSIAttributes { + s.TargetARN = &v + return s +} + +// DisableGatewayInput +type DisableGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DisableGatewayInput) SetGatewayARN(v string) *DisableGatewayInput { + s.GatewayARN = &v + return s +} + +// DisableGatewayOutput +type DisableGatewayOutput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name of the disabled gateway. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DisableGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *DisableGatewayOutput) SetGatewayARN(v string) *DisableGatewayOutput { + s.GatewayARN = &v + return s +} + +type Disk struct { + _ struct{} `type:"structure"` + + DiskAllocationResource *string `type:"string"` + + DiskAllocationType *string `min:"3" type:"string"` + + DiskId *string `min:"1" type:"string"` + + DiskNode *string `type:"string"` + + DiskPath *string `type:"string"` + + DiskSizeInBytes *int64 `type:"long"` + + DiskStatus *string `type:"string"` +} + +// String returns the string representation +func (s Disk) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Disk) GoString() string { + return s.String() +} + +// SetDiskAllocationResource sets the DiskAllocationResource field's value. +func (s *Disk) SetDiskAllocationResource(v string) *Disk { + s.DiskAllocationResource = &v + return s +} + +// SetDiskAllocationType sets the DiskAllocationType field's value. +func (s *Disk) SetDiskAllocationType(v string) *Disk { + s.DiskAllocationType = &v + return s +} + +// SetDiskId sets the DiskId field's value. +func (s *Disk) SetDiskId(v string) *Disk { + s.DiskId = &v + return s +} + +// SetDiskNode sets the DiskNode field's value. +func (s *Disk) SetDiskNode(v string) *Disk { + s.DiskNode = &v + return s +} + +// SetDiskPath sets the DiskPath field's value. +func (s *Disk) SetDiskPath(v string) *Disk { + s.DiskPath = &v + return s +} + +// SetDiskSizeInBytes sets the DiskSizeInBytes field's value. +func (s *Disk) SetDiskSizeInBytes(v int64) *Disk { + s.DiskSizeInBytes = &v + return s +} + +// SetDiskStatus sets the DiskStatus field's value. +func (s *Disk) SetDiskStatus(v string) *Disk { + s.DiskStatus = &v + return s +} + +// Provides additional information about an error that was returned by the service +// as an or. See the errorCode and errorDetails members for more information +// about the error. +type Error struct { + _ struct{} `type:"structure"` + + // Additional information about the error. + ErrorCode *string `locationName:"errorCode" type:"string" enum:"ErrorCode"` + + // Human-readable text that provides detail about the error that occurred. + ErrorDetails map[string]*string `locationName:"errorDetails" type:"map"` +} + +// String returns the string representation +func (s Error) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Error) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *Error) SetErrorCode(v string) *Error { + s.ErrorCode = &v + return s +} + +// SetErrorDetails sets the ErrorDetails field's value. +func (s *Error) SetErrorDetails(v map[string]*string) *Error { + s.ErrorDetails = v + return s +} + +// Describes a file share. +type FileShareInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The ID of the file share. + FileShareId *string `min:"12" type:"string"` + + // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE + // and DELETING. + FileShareStatus *string `min:"3" type:"string"` + + // The type of the file share. + FileShareType *string `type:"string" enum:"FileShareType"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s FileShareInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileShareInfo) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *FileShareInfo) SetFileShareARN(v string) *FileShareInfo { + s.FileShareARN = &v + return s +} + +// SetFileShareId sets the FileShareId field's value. +func (s *FileShareInfo) SetFileShareId(v string) *FileShareInfo { + s.FileShareId = &v + return s +} + +// SetFileShareStatus sets the FileShareStatus field's value. +func (s *FileShareInfo) SetFileShareStatus(v string) *FileShareInfo { + s.FileShareStatus = &v + return s +} + +// SetFileShareType sets the FileShareType field's value. +func (s *FileShareInfo) SetFileShareType(v string) *FileShareInfo { + s.FileShareType = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *FileShareInfo) SetGatewayARN(v string) *FileShareInfo { + s.GatewayARN = &v + return s +} + +// Describes a gateway object. +type GatewayInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The unique identifier assigned to your gateway during activation. This ID + // becomes part of the gateway Amazon Resource Name (ARN), which you use as + // input for other operations. + GatewayId *string `min:"12" type:"string"` + + // The name of the gateway. + GatewayName *string `type:"string"` + + // The state of the gateway. + // + // Valid Values: DISABLED or ACTIVE + GatewayOperationalState *string `min:"2" type:"string"` + + // The type of the gateway. + GatewayType *string `min:"2" type:"string"` +} + +// String returns the string representation +func (s GatewayInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GatewayInfo) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *GatewayInfo) SetGatewayARN(v string) *GatewayInfo { + s.GatewayARN = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *GatewayInfo) SetGatewayId(v string) *GatewayInfo { + s.GatewayId = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *GatewayInfo) SetGatewayName(v string) *GatewayInfo { + s.GatewayName = &v + return s +} + +// SetGatewayOperationalState sets the GatewayOperationalState field's value. +func (s *GatewayInfo) SetGatewayOperationalState(v string) *GatewayInfo { + s.GatewayOperationalState = &v + return s +} + +// SetGatewayType sets the GatewayType field's value. +func (s *GatewayInfo) SetGatewayType(v string) *GatewayInfo { + s.GatewayType = &v + return s +} + +// JoinDomainInput +type JoinDomainInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want the gateway to join. + // + // DomainName is a required field + DomainName *string `type:"string" required:"true"` + + // The unique Amazon Resource Name of the file gateway you want to add to the + // Active Directory domain. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // Sets the password of the user who has permission to add the gateway to the + // Active Directory domain. + // + // Password is a required field + Password *string `type:"string" required:"true"` + + // Sets the user name of user who has permission to add the gateway to the Active + // Directory domain. + // + // UserName is a required field + UserName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s JoinDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JoinDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *JoinDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "JoinDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *JoinDomainInput) SetDomainName(v string) *JoinDomainInput { + s.DomainName = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *JoinDomainInput) SetGatewayARN(v string) *JoinDomainInput { + s.GatewayARN = &v + return s +} + +// SetPassword sets the Password field's value. +func (s *JoinDomainInput) SetPassword(v string) *JoinDomainInput { + s.Password = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *JoinDomainInput) SetUserName(v string) *JoinDomainInput { + s.UserName = &v + return s +} + +// JoinDomainOutput +type JoinDomainOutput struct { + _ struct{} `type:"structure"` + + // The unique Amazon Resource Name of the gateway that joined the domain. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s JoinDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JoinDomainOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *JoinDomainOutput) SetGatewayARN(v string) *JoinDomainOutput { + s.GatewayARN = &v + return s +} + +// ListFileShareInput +type ListFileSharesInput struct { + _ struct{} `type:"structure"` + + // The Amazon resource Name (ARN) of the gateway whose file shares you want + // to list. If this field is not present, all file shares under your account + // are listed. + GatewayARN *string `min:"50" type:"string"` + + // The maximum number of file shares to return in the response. The value must + // be an integer with a value greater than zero. Optional. + Limit *int64 `min:"1" type:"integer"` + + // Opaque pagination token returned from a previous ListFileShares operation. + // If present, Marker specifies where to continue the list from after a previous + // call to ListFileShares. Optional. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListFileSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFileSharesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFileSharesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFileSharesInput"} + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListFileSharesInput) SetGatewayARN(v string) *ListFileSharesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListFileSharesInput) SetLimit(v int64) *ListFileSharesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListFileSharesInput) SetMarker(v string) *ListFileSharesInput { + s.Marker = &v + return s +} + +// ListFileShareOutput +type ListFileSharesOutput struct { + _ struct{} `type:"structure"` + + // An array of information about the file gateway's file shares. + FileShareInfoList []*FileShareInfo `type:"list"` + + // If the request includes Marker, the response returns that value in this field. + Marker *string `min:"1" type:"string"` + + // If a value is present, there are more file shares to return. In a subsequent + // request, use NextMarker as the value for Marker to retrieve the next set + // of file shares. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListFileSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFileSharesOutput) GoString() string { + return s.String() +} + +// SetFileShareInfoList sets the FileShareInfoList field's value. +func (s *ListFileSharesOutput) SetFileShareInfoList(v []*FileShareInfo) *ListFileSharesOutput { + s.FileShareInfoList = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListFileSharesOutput) SetMarker(v string) *ListFileSharesOutput { + s.Marker = &v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListFileSharesOutput) SetNextMarker(v string) *ListFileSharesOutput { + s.NextMarker = &v + return s +} + +// A JSON object containing zero or more of the following fields: +// +// * ListGatewaysInput$Limit +// +// * ListGatewaysInput$Marker +type ListGatewaysInput struct { + _ struct{} `type:"structure"` + + // Specifies that the list of gateways returned be limited to the specified + // number of items. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin the returned + // list of gateways. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGatewaysInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGatewaysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGatewaysInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListGatewaysInput) SetLimit(v int64) *ListGatewaysInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListGatewaysInput) SetMarker(v string) *ListGatewaysInput { + s.Marker = &v + return s +} + +type ListGatewaysOutput struct { + _ struct{} `type:"structure"` + + Gateways []*GatewayInfo `type:"list"` + + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGatewaysOutput) GoString() string { + return s.String() +} + +// SetGateways sets the Gateways field's value. +func (s *ListGatewaysOutput) SetGateways(v []*GatewayInfo) *ListGatewaysOutput { + s.Gateways = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListGatewaysOutput) SetMarker(v string) *ListGatewaysOutput { + s.Marker = &v + return s +} + +// A JSON object containing the of the gateway. +type ListLocalDisksInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListLocalDisksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLocalDisksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLocalDisksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLocalDisksInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListLocalDisksInput) SetGatewayARN(v string) *ListLocalDisksInput { + s.GatewayARN = &v + return s +} + +type ListLocalDisksOutput struct { + _ struct{} `type:"structure"` + + Disks []*Disk `type:"list"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ListLocalDisksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLocalDisksOutput) GoString() string { + return s.String() +} + +// SetDisks sets the Disks field's value. +func (s *ListLocalDisksOutput) SetDisks(v []*Disk) *ListLocalDisksOutput { + s.Disks = v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListLocalDisksOutput) SetGatewayARN(v string) *ListLocalDisksOutput { + s.GatewayARN = &v + return s +} + +// ListTagsForResourceInput +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // Specifies that the list of tags returned be limited to the specified number + // of items. + Limit *int64 `min:"1" type:"integer"` + + // An opaque string that indicates the position at which to begin returning + // the list of tags. + Marker *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the resource for which you want to list + // tags. + // + // ResourceARN is a required field + ResourceARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListTagsForResourceInput) SetLimit(v int64) *ListTagsForResourceInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListTagsForResourceInput) SetMarker(v string) *ListTagsForResourceInput { + s.Marker = &v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v + return s +} + +// ListTagsForResourceOutput +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates the position at which to stop returning the + // list of tags. + Marker *string `min:"1" type:"string"` + + // he Amazon Resource Name (ARN) of the resource for which you want to list + // tags. + ResourceARN *string `min:"50" type:"string"` + + // An array that contains the tags for the specified resource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *ListTagsForResourceOutput) SetMarker(v string) *ListTagsForResourceOutput { + s.Marker = &v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceOutput) SetResourceARN(v string) *ListTagsForResourceOutput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// A JSON object that contains one or more of the following fields: +// +// * ListTapesInput$Limit +// +// * ListTapesInput$Marker +// +// * ListTapesInput$TapeARNs +type ListTapesInput struct { + _ struct{} `type:"structure"` + + // An optional number limit for the tapes in the list returned by this call. + Limit *int64 `min:"1" type:"integer"` + + // A string that indicates the position at which to begin the returned list + // of tapes. + Marker *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of each of the tapes you want to list. If + // you don't specify a tape ARN, the response lists all tapes in both your VTL + // and VTS. + TapeARNs []*string `type:"list"` +} + +// String returns the string representation +func (s ListTapesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTapesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTapesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTapesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListTapesInput) SetLimit(v int64) *ListTapesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListTapesInput) SetMarker(v string) *ListTapesInput { + s.Marker = &v + return s +} + +// SetTapeARNs sets the TapeARNs field's value. +func (s *ListTapesInput) SetTapeARNs(v []*string) *ListTapesInput { + s.TapeARNs = v + return s +} + +// A JSON object containing the following fields: +// +// * ListTapesOutput$Marker +// +// * ListTapesOutput$VolumeInfos +type ListTapesOutput struct { + _ struct{} `type:"structure"` + + // A string that indicates the position at which to begin returning the next + // list of tapes. Use the marker in your next request to continue pagination + // of tapes. If there are no more tapes to list, this element does not appear + // in the response body. + Marker *string `min:"1" type:"string"` + + // An array of TapeInfo objects, where each object describes an a single tape. + // If there not tapes in the tape library or VTS, then the TapeInfos is an empty + // array. + TapeInfos []*TapeInfo `type:"list"` +} + +// String returns the string representation +func (s ListTapesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTapesOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *ListTapesOutput) SetMarker(v string) *ListTapesOutput { + s.Marker = &v + return s +} + +// SetTapeInfos sets the TapeInfos field's value. +func (s *ListTapesOutput) SetTapeInfos(v []*TapeInfo) *ListTapesOutput { + s.TapeInfos = v + return s +} + +// ListVolumeInitiatorsInput +type ListVolumeInitiatorsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes for the gateway. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListVolumeInitiatorsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeInitiatorsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVolumeInitiatorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVolumeInitiatorsInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *ListVolumeInitiatorsInput) SetVolumeARN(v string) *ListVolumeInitiatorsInput { + s.VolumeARN = &v + return s +} + +// ListVolumeInitiatorsOutput +type ListVolumeInitiatorsOutput struct { + _ struct{} `type:"structure"` + + // The host names and port numbers of all iSCSI initiators that are connected + // to the gateway. + Initiators []*string `type:"list"` +} + +// String returns the string representation +func (s ListVolumeInitiatorsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeInitiatorsOutput) GoString() string { + return s.String() +} + +// SetInitiators sets the Initiators field's value. +func (s *ListVolumeInitiatorsOutput) SetInitiators(v []*string) *ListVolumeInitiatorsOutput { + s.Initiators = v + return s +} + +type ListVolumeRecoveryPointsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListVolumeRecoveryPointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeRecoveryPointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVolumeRecoveryPointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVolumeRecoveryPointsInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumeRecoveryPointsInput) SetGatewayARN(v string) *ListVolumeRecoveryPointsInput { + s.GatewayARN = &v + return s +} + +type ListVolumeRecoveryPointsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + VolumeRecoveryPointInfos []*VolumeRecoveryPointInfo `type:"list"` +} + +// String returns the string representation +func (s ListVolumeRecoveryPointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumeRecoveryPointsOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumeRecoveryPointsOutput) SetGatewayARN(v string) *ListVolumeRecoveryPointsOutput { + s.GatewayARN = &v + return s +} + +// SetVolumeRecoveryPointInfos sets the VolumeRecoveryPointInfos field's value. +func (s *ListVolumeRecoveryPointsOutput) SetVolumeRecoveryPointInfos(v []*VolumeRecoveryPointInfo) *ListVolumeRecoveryPointsOutput { + s.VolumeRecoveryPointInfos = v + return s +} + +// A JSON object that contains one or more of the following fields: +// +// * ListVolumesInput$Limit +// +// * ListVolumesInput$Marker +type ListVolumesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // Specifies that the list of volumes returned be limited to the specified number + // of items. + Limit *int64 `min:"1" type:"integer"` + + // A string that indicates the position at which to begin the returned list + // of volumes. Obtain the marker from the response of a previous List iSCSI + // Volumes request. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListVolumesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListVolumesInput"} + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumesInput) SetGatewayARN(v string) *ListVolumesInput { + s.GatewayARN = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListVolumesInput) SetLimit(v int64) *ListVolumesInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListVolumesInput) SetMarker(v string) *ListVolumesInput { + s.Marker = &v + return s +} + +type ListVolumesOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + Marker *string `min:"1" type:"string"` + + VolumeInfos []*VolumeInfo `type:"list"` +} + +// String returns the string representation +func (s ListVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListVolumesOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ListVolumesOutput) SetGatewayARN(v string) *ListVolumesOutput { + s.GatewayARN = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListVolumesOutput) SetMarker(v string) *ListVolumesOutput { + s.Marker = &v + return s +} + +// SetVolumeInfos sets the VolumeInfos field's value. +func (s *ListVolumesOutput) SetVolumeInfos(v []*VolumeInfo) *ListVolumesOutput { + s.VolumeInfos = v + return s +} + +// Describes Network File System (NFS) file share default values. Files and +// folders stored as Amazon S3 objects in S3 buckets don't, by default, have +// Unix file permissions assigned to them. Upon discovery in an S3 bucket by +// Storage Gateway, the S3 objects that represent files and folders are assigned +// these default Unix permissions. This operation is only supported in the file +// gateway type. +type NFSFileShareDefaults struct { + _ struct{} `type:"structure"` + + // The Unix directory mode in the form "nnnn". For example, "0666" represents + // the default access mode for all directories inside the file share. The default + // value is 0777. + DirectoryMode *string `min:"1" type:"string"` + + // The Unix file mode in the form "nnnn". For example, "0666" represents the + // default file mode inside the file share. The default value is 0666. + FileMode *string `min:"1" type:"string"` + + // The default group ID for the file share (unless the files have another group + // ID specified). The default value is nfsnobody. + GroupId *int64 `type:"long"` + + // The default owner ID for files in the file share (unless the files have another + // owner ID specified). The default value is nfsnobody. + OwnerId *int64 `type:"long"` +} + +// String returns the string representation +func (s NFSFileShareDefaults) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NFSFileShareDefaults) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NFSFileShareDefaults) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NFSFileShareDefaults"} + if s.DirectoryMode != nil && len(*s.DirectoryMode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DirectoryMode", 1)) + } + if s.FileMode != nil && len(*s.FileMode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileMode", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryMode sets the DirectoryMode field's value. +func (s *NFSFileShareDefaults) SetDirectoryMode(v string) *NFSFileShareDefaults { + s.DirectoryMode = &v + return s +} + +// SetFileMode sets the FileMode field's value. +func (s *NFSFileShareDefaults) SetFileMode(v string) *NFSFileShareDefaults { + s.FileMode = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *NFSFileShareDefaults) SetGroupId(v int64) *NFSFileShareDefaults { + s.GroupId = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *NFSFileShareDefaults) SetOwnerId(v int64) *NFSFileShareDefaults { + s.OwnerId = &v + return s +} + +// The Unix file permissions and ownership information assigned, by default, +// to native S3 objects when file gateway discovers them in S3 buckets. This +// operation is only supported in file gateways. +type NFSFileShareInfo struct { + _ struct{} `type:"structure"` + + // The list of clients that are allowed to access the file gateway. The list + // must contain either valid IP addresses or valid CIDR blocks. + ClientList []*string `min:"1" type:"list"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The ID of the file share. + FileShareId *string `min:"12" type:"string"` + + // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE + // and DELETING. + FileShareStatus *string `min:"3" type:"string"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // True to use Amazon S3 server side encryption with your own KMS key, or false + // to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backend storage used for storing file data. + LocationARN *string `min:"16" type:"string"` + + // Describes Network File System (NFS) file share default values. Files and + // folders stored as Amazon S3 objects in S3 buckets don't, by default, have + // Unix file permissions assigned to them. Upon discovery in an S3 bucket by + // Storage Gateway, the S3 objects that represent files and folders are assigned + // these default Unix permissions. This operation is only supported in the file + // gateway type. + NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` + + // Sets the access control list permission for objects in the S3 bucket that + // a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // The file share path used by the NFS client to identify the mount point. + Path *string `type:"string"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the IAM role that file gateway assumes when it accesses the underlying + // storage. + Role *string `min:"20" type:"string"` + + // The user mapped to anonymous user. Valid options are the following: + // + // * "RootSquash" - Only root is mapped to anonymous user. + // + // * "NoSquash" - No one is mapped to anonymous user + // + // * "AllSquash" - Everyone is mapped to anonymous user. + Squash *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s NFSFileShareInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NFSFileShareInfo) GoString() string { + return s.String() +} + +// SetClientList sets the ClientList field's value. +func (s *NFSFileShareInfo) SetClientList(v []*string) *NFSFileShareInfo { + s.ClientList = v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *NFSFileShareInfo) SetDefaultStorageClass(v string) *NFSFileShareInfo { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *NFSFileShareInfo) SetFileShareARN(v string) *NFSFileShareInfo { + s.FileShareARN = &v + return s +} + +// SetFileShareId sets the FileShareId field's value. +func (s *NFSFileShareInfo) SetFileShareId(v string) *NFSFileShareInfo { + s.FileShareId = &v + return s +} + +// SetFileShareStatus sets the FileShareStatus field's value. +func (s *NFSFileShareInfo) SetFileShareStatus(v string) *NFSFileShareInfo { + s.FileShareStatus = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *NFSFileShareInfo) SetGatewayARN(v string) *NFSFileShareInfo { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *NFSFileShareInfo) SetGuessMIMETypeEnabled(v bool) *NFSFileShareInfo { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *NFSFileShareInfo) SetKMSEncrypted(v bool) *NFSFileShareInfo { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *NFSFileShareInfo) SetKMSKey(v string) *NFSFileShareInfo { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *NFSFileShareInfo) SetLocationARN(v string) *NFSFileShareInfo { + s.LocationARN = &v + return s +} + +// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. +func (s *NFSFileShareInfo) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *NFSFileShareInfo { + s.NFSFileShareDefaults = v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *NFSFileShareInfo) SetObjectACL(v string) *NFSFileShareInfo { + s.ObjectACL = &v + return s +} + +// SetPath sets the Path field's value. +func (s *NFSFileShareInfo) SetPath(v string) *NFSFileShareInfo { + s.Path = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *NFSFileShareInfo) SetReadOnly(v bool) *NFSFileShareInfo { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *NFSFileShareInfo) SetRequesterPays(v bool) *NFSFileShareInfo { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *NFSFileShareInfo) SetRole(v string) *NFSFileShareInfo { + s.Role = &v + return s +} + +// SetSquash sets the Squash field's value. +func (s *NFSFileShareInfo) SetSquash(v string) *NFSFileShareInfo { + s.Squash = &v + return s +} + +// Describes a gateway's network interface. +type NetworkInterface struct { + _ struct{} `type:"structure"` + + // The Internet Protocol version 4 (IPv4) address of the interface. + Ipv4Address *string `type:"string"` + + // The Internet Protocol version 6 (IPv6) address of the interface. Currently + // not supported. + Ipv6Address *string `type:"string"` + + // The Media Access Control (MAC) address of the interface. + // + // This is currently unsupported and will not be returned in output. + MacAddress *string `type:"string"` +} + +// String returns the string representation +func (s NetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterface) GoString() string { + return s.String() +} + +// SetIpv4Address sets the Ipv4Address field's value. +func (s *NetworkInterface) SetIpv4Address(v string) *NetworkInterface { + s.Ipv4Address = &v + return s +} + +// SetIpv6Address sets the Ipv6Address field's value. +func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface { + s.Ipv6Address = &v + return s +} + +// SetMacAddress sets the MacAddress field's value. +func (s *NetworkInterface) SetMacAddress(v string) *NetworkInterface { + s.MacAddress = &v + return s +} + +type NotifyWhenUploadedInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s NotifyWhenUploadedInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotifyWhenUploadedInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NotifyWhenUploadedInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NotifyWhenUploadedInput"} + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *NotifyWhenUploadedInput) SetFileShareARN(v string) *NotifyWhenUploadedInput { + s.FileShareARN = &v + return s +} + +type NotifyWhenUploadedOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The randomly generated ID of the notification that was sent. This ID is in + // UUID format. + NotificationId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s NotifyWhenUploadedOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotifyWhenUploadedOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *NotifyWhenUploadedOutput) SetFileShareARN(v string) *NotifyWhenUploadedOutput { + s.FileShareARN = &v + return s +} + +// SetNotificationId sets the NotificationId field's value. +func (s *NotifyWhenUploadedOutput) SetNotificationId(v string) *NotifyWhenUploadedOutput { + s.NotificationId = &v + return s +} + +type RefreshCacheInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s RefreshCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RefreshCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RefreshCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RefreshCacheInput"} + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *RefreshCacheInput) SetFileShareARN(v string) *RefreshCacheInput { + s.FileShareARN = &v + return s +} + +type RefreshCacheOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s RefreshCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RefreshCacheOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *RefreshCacheOutput) SetFileShareARN(v string) *RefreshCacheOutput { + s.FileShareARN = &v + return s +} + +// RemoveTagsFromResourceInput +type RemoveTagsFromResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource you want to remove the tags + // from. + // + // ResourceARN is a required field + ResourceARN *string `min:"50" type:"string" required:"true"` + + // The keys of the tags you want to remove from the specified resource. A tag + // is composed of a key/value pair. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s RemoveTagsFromResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsFromResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsFromResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 50)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *RemoveTagsFromResourceInput) SetResourceARN(v string) *RemoveTagsFromResourceInput { + s.ResourceARN = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { + s.TagKeys = v + return s +} + +// RemoveTagsFromResourceOutput +type RemoveTagsFromResourceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that the tags were removed + // from. + ResourceARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s RemoveTagsFromResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsFromResourceOutput) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *RemoveTagsFromResourceOutput) SetResourceARN(v string) *RemoveTagsFromResourceOutput { + s.ResourceARN = &v + return s +} + +type ResetCacheInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ResetCacheInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetCacheInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetCacheInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetCacheInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ResetCacheInput) SetGatewayARN(v string) *ResetCacheInput { + s.GatewayARN = &v + return s +} + +type ResetCacheOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ResetCacheOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetCacheOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ResetCacheOutput) SetGatewayARN(v string) *ResetCacheOutput { + s.GatewayARN = &v + return s +} + +// RetrieveTapeArchiveInput +type RetrieveTapeArchiveInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway you want to retrieve the virtual + // tape to. Use the ListGateways operation to return a list of gateways for + // your account and region. + // + // You retrieve archived virtual tapes to only one gateway and the gateway must + // be a tape gateway. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape you want to retrieve from + // the virtual tape shelf (VTS). + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s RetrieveTapeArchiveInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeArchiveInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetrieveTapeArchiveInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetrieveTapeArchiveInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *RetrieveTapeArchiveInput) SetGatewayARN(v string) *RetrieveTapeArchiveInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeArchiveInput) SetTapeARN(v string) *RetrieveTapeArchiveInput { + s.TapeARN = &v + return s +} + +// RetrieveTapeArchiveOutput +type RetrieveTapeArchiveOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the retrieved virtual tape. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s RetrieveTapeArchiveOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeArchiveOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeArchiveOutput) SetTapeARN(v string) *RetrieveTapeArchiveOutput { + s.TapeARN = &v + return s +} + +// RetrieveTapeRecoveryPointInput +type RetrieveTapeRecoveryPointInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the virtual tape for which you want to + // retrieve the recovery point. + // + // TapeARN is a required field + TapeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s RetrieveTapeRecoveryPointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeRecoveryPointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetrieveTapeRecoveryPointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetrieveTapeRecoveryPointInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.TapeARN == nil { + invalidParams.Add(request.NewErrParamRequired("TapeARN")) + } + if s.TapeARN != nil && len(*s.TapeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TapeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *RetrieveTapeRecoveryPointInput) SetGatewayARN(v string) *RetrieveTapeRecoveryPointInput { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeRecoveryPointInput) SetTapeARN(v string) *RetrieveTapeRecoveryPointInput { + s.TapeARN = &v + return s +} + +// RetrieveTapeRecoveryPointOutput +type RetrieveTapeRecoveryPointOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape for which the recovery + // point was retrieved. + TapeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s RetrieveTapeRecoveryPointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetrieveTapeRecoveryPointOutput) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *RetrieveTapeRecoveryPointOutput) SetTapeARN(v string) *RetrieveTapeRecoveryPointOutput { + s.TapeARN = &v + return s +} + +// The Windows file permissions and ownership information assigned, by default, +// to native S3 objects when file gateway discovers them in S3 buckets. This +// operation is only supported in file gateways. +type SMBFileShareInfo struct { + _ struct{} `type:"structure"` + + // The authentication method of the file share. Valid values: "ActiveDirectory" + // or "GuestAccess". The default is "ActiveDirectory". + Authentication *string `min:"5" type:"string"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file share. + FileShareARN *string `min:"50" type:"string"` + + // The ID of the file share. + FileShareId *string `min:"12" type:"string"` + + // The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE + // and DELETING. + FileShareStatus *string `min:"3" type:"string"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // A list of users in the Active Directory that are not allowed to access the + // file share. Can only be set if Authentication is set to "ActiveDirectory". + InvalidUserList []*string `type:"list"` + + // True to use Amazon S3 server side encryption with your own KMS key, or false + // to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The ARN of the backend storage used for storing file data. + LocationARN *string `min:"16" type:"string"` + + // Sets the access control list permission for objects in the S3 bucket that + // a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // The file share path used by the SMB client to identify the mount point. + Path *string `type:"string"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The ARN of the IAM role that file gateway assumes when it accesses the underlying + // storage. + Role *string `min:"20" type:"string"` + + // A list of users in the Active Directory that are allowed to access the file + // share. Can only be set if Authentication is set to "ActiveDirectory". + ValidUserList []*string `type:"list"` +} + +// String returns the string representation +func (s SMBFileShareInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMBFileShareInfo) GoString() string { + return s.String() +} + +// SetAuthentication sets the Authentication field's value. +func (s *SMBFileShareInfo) SetAuthentication(v string) *SMBFileShareInfo { + s.Authentication = &v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *SMBFileShareInfo) SetDefaultStorageClass(v string) *SMBFileShareInfo { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *SMBFileShareInfo) SetFileShareARN(v string) *SMBFileShareInfo { + s.FileShareARN = &v + return s +} + +// SetFileShareId sets the FileShareId field's value. +func (s *SMBFileShareInfo) SetFileShareId(v string) *SMBFileShareInfo { + s.FileShareId = &v + return s +} + +// SetFileShareStatus sets the FileShareStatus field's value. +func (s *SMBFileShareInfo) SetFileShareStatus(v string) *SMBFileShareInfo { + s.FileShareStatus = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SMBFileShareInfo) SetGatewayARN(v string) *SMBFileShareInfo { + s.GatewayARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *SMBFileShareInfo) SetGuessMIMETypeEnabled(v bool) *SMBFileShareInfo { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetInvalidUserList sets the InvalidUserList field's value. +func (s *SMBFileShareInfo) SetInvalidUserList(v []*string) *SMBFileShareInfo { + s.InvalidUserList = v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *SMBFileShareInfo) SetKMSEncrypted(v bool) *SMBFileShareInfo { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *SMBFileShareInfo) SetKMSKey(v string) *SMBFileShareInfo { + s.KMSKey = &v + return s +} + +// SetLocationARN sets the LocationARN field's value. +func (s *SMBFileShareInfo) SetLocationARN(v string) *SMBFileShareInfo { + s.LocationARN = &v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *SMBFileShareInfo) SetObjectACL(v string) *SMBFileShareInfo { + s.ObjectACL = &v + return s +} + +// SetPath sets the Path field's value. +func (s *SMBFileShareInfo) SetPath(v string) *SMBFileShareInfo { + s.Path = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *SMBFileShareInfo) SetReadOnly(v bool) *SMBFileShareInfo { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *SMBFileShareInfo) SetRequesterPays(v bool) *SMBFileShareInfo { + s.RequesterPays = &v + return s +} + +// SetRole sets the Role field's value. +func (s *SMBFileShareInfo) SetRole(v string) *SMBFileShareInfo { + s.Role = &v + return s +} + +// SetValidUserList sets the ValidUserList field's value. +func (s *SMBFileShareInfo) SetValidUserList(v []*string) *SMBFileShareInfo { + s.ValidUserList = v + return s +} + +// SetLocalConsolePasswordInput +type SetLocalConsolePasswordInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The password you want to set for your VM local console. + // + // LocalConsolePassword is a required field + LocalConsolePassword *string `min:"6" type:"string" required:"true"` +} + +// String returns the string representation +func (s SetLocalConsolePasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLocalConsolePasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetLocalConsolePasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetLocalConsolePasswordInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.LocalConsolePassword == nil { + invalidParams.Add(request.NewErrParamRequired("LocalConsolePassword")) + } + if s.LocalConsolePassword != nil && len(*s.LocalConsolePassword) < 6 { + invalidParams.Add(request.NewErrParamMinLen("LocalConsolePassword", 6)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetLocalConsolePasswordInput) SetGatewayARN(v string) *SetLocalConsolePasswordInput { + s.GatewayARN = &v + return s +} + +// SetLocalConsolePassword sets the LocalConsolePassword field's value. +func (s *SetLocalConsolePasswordInput) SetLocalConsolePassword(v string) *SetLocalConsolePasswordInput { + s.LocalConsolePassword = &v + return s +} + +type SetLocalConsolePasswordOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s SetLocalConsolePasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLocalConsolePasswordOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetLocalConsolePasswordOutput) SetGatewayARN(v string) *SetLocalConsolePasswordOutput { + s.GatewayARN = &v + return s +} + +// SetSMBGuestPasswordInput +type SetSMBGuestPasswordInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the file gateway the SMB file share is + // associated with. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The password you want to set for your SMB Server. + // + // Password is a required field + Password *string `min:"6" type:"string" required:"true"` +} + +// String returns the string representation +func (s SetSMBGuestPasswordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetSMBGuestPasswordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetSMBGuestPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetSMBGuestPasswordInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.Password == nil { + invalidParams.Add(request.NewErrParamRequired("Password")) + } + if s.Password != nil && len(*s.Password) < 6 { + invalidParams.Add(request.NewErrParamMinLen("Password", 6)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetSMBGuestPasswordInput) SetGatewayARN(v string) *SetSMBGuestPasswordInput { + s.GatewayARN = &v + return s +} + +// SetPassword sets the Password field's value. +func (s *SetSMBGuestPasswordInput) SetPassword(v string) *SetSMBGuestPasswordInput { + s.Password = &v + return s +} + +type SetSMBGuestPasswordOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s SetSMBGuestPasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetSMBGuestPasswordOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *SetSMBGuestPasswordOutput) SetGatewayARN(v string) *SetSMBGuestPasswordOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway to shut down. +type ShutdownGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s ShutdownGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShutdownGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ShutdownGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ShutdownGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ShutdownGatewayInput) SetGatewayARN(v string) *ShutdownGatewayInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway that was shut down. +type ShutdownGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s ShutdownGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShutdownGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *ShutdownGatewayOutput) SetGatewayARN(v string) *ShutdownGatewayOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway to start. +type StartGatewayInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartGatewayInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *StartGatewayInput) SetGatewayARN(v string) *StartGatewayInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway that was restarted. +type StartGatewayOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s StartGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartGatewayOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *StartGatewayOutput) SetGatewayARN(v string) *StartGatewayOutput { + s.GatewayARN = &v + return s +} + +// Describes an iSCSI stored volume. +type StorediSCSIVolume struct { + _ struct{} `type:"structure"` + + // The date the volume was created. Volumes created prior to March 28, 2017 + // don’t have this time stamp. + CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // Indicates if when the stored volume was created, existing data on the underlying + // local disk was preserved. + // + // Valid Values: true, false + PreservedExistingData *bool `type:"boolean"` + + // If the stored volume was created from a snapshot, this field contains the + // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. + SourceSnapshotId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the storage volume. + VolumeARN *string `min:"50" type:"string"` + + // The ID of the local disk that was specified in the CreateStorediSCSIVolume + // operation. + VolumeDiskId *string `min:"1" type:"string"` + + // The unique identifier of the volume, e.g. vol-AE4B946D. + VolumeId *string `min:"12" type:"string"` + + // Represents the percentage complete if the volume is restoring or bootstrapping + // that represents the percent of data transferred. This field does not appear + // in the response if the stored volume is not restoring or bootstrapping. + VolumeProgress *float64 `type:"double"` + + // The size of the volume in bytes. + VolumeSizeInBytes *int64 `type:"long"` + + // One of the VolumeStatus values that indicates the state of the storage volume. + VolumeStatus *string `min:"3" type:"string"` + + // One of the VolumeType enumeration values describing the type of the volume. + VolumeType *string `min:"3" type:"string"` + + // The size of the data stored on the volume in bytes. + // + // This value is not available for volumes created prior to May 13, 2015, until + // you store data on the volume. + VolumeUsedInBytes *int64 `type:"long"` + + // An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes + // for one stored volume. + VolumeiSCSIAttributes *VolumeiSCSIAttributes `type:"structure"` +} + +// String returns the string representation +func (s StorediSCSIVolume) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StorediSCSIVolume) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *StorediSCSIVolume) SetCreatedDate(v time.Time) *StorediSCSIVolume { + s.CreatedDate = &v + return s +} + +// SetPreservedExistingData sets the PreservedExistingData field's value. +func (s *StorediSCSIVolume) SetPreservedExistingData(v bool) *StorediSCSIVolume { + s.PreservedExistingData = &v + return s +} + +// SetSourceSnapshotId sets the SourceSnapshotId field's value. +func (s *StorediSCSIVolume) SetSourceSnapshotId(v string) *StorediSCSIVolume { + s.SourceSnapshotId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *StorediSCSIVolume) SetVolumeARN(v string) *StorediSCSIVolume { + s.VolumeARN = &v + return s +} + +// SetVolumeDiskId sets the VolumeDiskId field's value. +func (s *StorediSCSIVolume) SetVolumeDiskId(v string) *StorediSCSIVolume { + s.VolumeDiskId = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *StorediSCSIVolume) SetVolumeId(v string) *StorediSCSIVolume { + s.VolumeId = &v + return s +} + +// SetVolumeProgress sets the VolumeProgress field's value. +func (s *StorediSCSIVolume) SetVolumeProgress(v float64) *StorediSCSIVolume { + s.VolumeProgress = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *StorediSCSIVolume) SetVolumeSizeInBytes(v int64) *StorediSCSIVolume { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeStatus sets the VolumeStatus field's value. +func (s *StorediSCSIVolume) SetVolumeStatus(v string) *StorediSCSIVolume { + s.VolumeStatus = &v + return s +} + +// SetVolumeType sets the VolumeType field's value. +func (s *StorediSCSIVolume) SetVolumeType(v string) *StorediSCSIVolume { + s.VolumeType = &v + return s +} + +// SetVolumeUsedInBytes sets the VolumeUsedInBytes field's value. +func (s *StorediSCSIVolume) SetVolumeUsedInBytes(v int64) *StorediSCSIVolume { + s.VolumeUsedInBytes = &v + return s +} + +// SetVolumeiSCSIAttributes sets the VolumeiSCSIAttributes field's value. +func (s *StorediSCSIVolume) SetVolumeiSCSIAttributes(v *VolumeiSCSIAttributes) *StorediSCSIVolume { + s.VolumeiSCSIAttributes = v + return s +} + +type Tag struct { + _ struct{} `type:"structure"` + + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// Describes a virtual tape object. +type Tape struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // For archiving virtual tapes, indicates how much data remains to be uploaded + // before archiving is complete. + // + // Range: 0 (not started) to 100 (complete). + Progress *float64 `type:"double"` + + // The Amazon Resource Name (ARN) of the virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The barcode that identifies a specific virtual tape. + TapeBarcode *string `min:"7" type:"string"` + + // The date the virtual tape was created. + TapeCreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The size, in bytes, of the virtual tape capacity. + TapeSizeInBytes *int64 `type:"long"` + + // The current state of the virtual tape. + TapeStatus *string `type:"string"` + + // The size, in bytes, of data stored on the virtual tape. + // + // This value is not available for tapes created prior to May 13, 2015. + TapeUsedInBytes *int64 `type:"long"` + + // The virtual tape library (VTL) device that the virtual tape is associated + // with. + VTLDevice *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s Tape) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tape) GoString() string { + return s.String() +} + +// SetKMSKey sets the KMSKey field's value. +func (s *Tape) SetKMSKey(v string) *Tape { + s.KMSKey = &v + return s +} + +// SetProgress sets the Progress field's value. +func (s *Tape) SetProgress(v float64) *Tape { + s.Progress = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *Tape) SetTapeARN(v string) *Tape { + s.TapeARN = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *Tape) SetTapeBarcode(v string) *Tape { + s.TapeBarcode = &v + return s +} + +// SetTapeCreatedDate sets the TapeCreatedDate field's value. +func (s *Tape) SetTapeCreatedDate(v time.Time) *Tape { + s.TapeCreatedDate = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *Tape) SetTapeSizeInBytes(v int64) *Tape { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *Tape) SetTapeStatus(v string) *Tape { + s.TapeStatus = &v + return s +} + +// SetTapeUsedInBytes sets the TapeUsedInBytes field's value. +func (s *Tape) SetTapeUsedInBytes(v int64) *Tape { + s.TapeUsedInBytes = &v + return s +} + +// SetVTLDevice sets the VTLDevice field's value. +func (s *Tape) SetVTLDevice(v string) *Tape { + s.VTLDevice = &v + return s +} + +// Represents a virtual tape that is archived in the virtual tape shelf (VTS). +type TapeArchive struct { + _ struct{} `type:"structure"` + + // The time that the archiving of the virtual tape was completed. + // + // The default time stamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z' + // format. + CompletionTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The Amazon Resource Name (ARN) of the tape gateway that the virtual tape + // is being retrieved to. + // + // The virtual tape is retrieved from the virtual tape shelf (VTS). + RetrievedTo *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of an archived virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The barcode that identifies the archived virtual tape. + TapeBarcode *string `min:"7" type:"string"` + + // The date the virtual tape was created. + TapeCreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The size, in bytes, of the archived virtual tape. + TapeSizeInBytes *int64 `type:"long"` + + // The current state of the archived virtual tape. + TapeStatus *string `type:"string"` + + // The size, in bytes, of data stored on the virtual tape. + // + // This value is not available for tapes created prior to May 13, 2015. + TapeUsedInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s TapeArchive) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TapeArchive) GoString() string { + return s.String() +} + +// SetCompletionTime sets the CompletionTime field's value. +func (s *TapeArchive) SetCompletionTime(v time.Time) *TapeArchive { + s.CompletionTime = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *TapeArchive) SetKMSKey(v string) *TapeArchive { + s.KMSKey = &v + return s +} + +// SetRetrievedTo sets the RetrievedTo field's value. +func (s *TapeArchive) SetRetrievedTo(v string) *TapeArchive { + s.RetrievedTo = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *TapeArchive) SetTapeARN(v string) *TapeArchive { + s.TapeARN = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *TapeArchive) SetTapeBarcode(v string) *TapeArchive { + s.TapeBarcode = &v + return s +} + +// SetTapeCreatedDate sets the TapeCreatedDate field's value. +func (s *TapeArchive) SetTapeCreatedDate(v time.Time) *TapeArchive { + s.TapeCreatedDate = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *TapeArchive) SetTapeSizeInBytes(v int64) *TapeArchive { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *TapeArchive) SetTapeStatus(v string) *TapeArchive { + s.TapeStatus = &v + return s +} + +// SetTapeUsedInBytes sets the TapeUsedInBytes field's value. +func (s *TapeArchive) SetTapeUsedInBytes(v int64) *TapeArchive { + s.TapeUsedInBytes = &v + return s +} + +// Describes a virtual tape. +type TapeInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of a virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The barcode that identifies a specific virtual tape. + TapeBarcode *string `min:"7" type:"string"` + + // The size, in bytes, of a virtual tape. + TapeSizeInBytes *int64 `type:"long"` + + // The status of the tape. + TapeStatus *string `type:"string"` +} + +// String returns the string representation +func (s TapeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TapeInfo) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *TapeInfo) SetGatewayARN(v string) *TapeInfo { + s.GatewayARN = &v + return s +} + +// SetTapeARN sets the TapeARN field's value. +func (s *TapeInfo) SetTapeARN(v string) *TapeInfo { + s.TapeARN = &v + return s +} + +// SetTapeBarcode sets the TapeBarcode field's value. +func (s *TapeInfo) SetTapeBarcode(v string) *TapeInfo { + s.TapeBarcode = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *TapeInfo) SetTapeSizeInBytes(v int64) *TapeInfo { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *TapeInfo) SetTapeStatus(v string) *TapeInfo { + s.TapeStatus = &v + return s +} + +// Describes a recovery point. +type TapeRecoveryPointInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the virtual tape. + TapeARN *string `min:"50" type:"string"` + + // The time when the point-in-time view of the virtual tape was replicated for + // later recovery. + // + // The default time stamp format of the tape recovery point time is in the ISO8601 + // extended YYYY-MM-DD'T'HH:MM:SS'Z' format. + TapeRecoveryPointTime *time.Time `type:"timestamp" timestampFormat:"unix"` + + // The size, in bytes, of the virtual tapes to recover. + TapeSizeInBytes *int64 `type:"long"` + + TapeStatus *string `type:"string"` +} + +// String returns the string representation +func (s TapeRecoveryPointInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TapeRecoveryPointInfo) GoString() string { + return s.String() +} + +// SetTapeARN sets the TapeARN field's value. +func (s *TapeRecoveryPointInfo) SetTapeARN(v string) *TapeRecoveryPointInfo { + s.TapeARN = &v + return s +} + +// SetTapeRecoveryPointTime sets the TapeRecoveryPointTime field's value. +func (s *TapeRecoveryPointInfo) SetTapeRecoveryPointTime(v time.Time) *TapeRecoveryPointInfo { + s.TapeRecoveryPointTime = &v + return s +} + +// SetTapeSizeInBytes sets the TapeSizeInBytes field's value. +func (s *TapeRecoveryPointInfo) SetTapeSizeInBytes(v int64) *TapeRecoveryPointInfo { + s.TapeSizeInBytes = &v + return s +} + +// SetTapeStatus sets the TapeStatus field's value. +func (s *TapeRecoveryPointInfo) SetTapeStatus(v string) *TapeRecoveryPointInfo { + s.TapeStatus = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * UpdateBandwidthRateLimitInput$AverageDownloadRateLimitInBitsPerSec +// +// * UpdateBandwidthRateLimitInput$AverageUploadRateLimitInBitsPerSec +type UpdateBandwidthRateLimitInput struct { + _ struct{} `type:"structure"` + + // The average download bandwidth rate limit in bits per second. + AverageDownloadRateLimitInBitsPerSec *int64 `min:"102400" type:"long"` + + // The average upload bandwidth rate limit in bits per second. + AverageUploadRateLimitInBitsPerSec *int64 `min:"51200" type:"long"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateBandwidthRateLimitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBandwidthRateLimitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBandwidthRateLimitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBandwidthRateLimitInput"} + if s.AverageDownloadRateLimitInBitsPerSec != nil && *s.AverageDownloadRateLimitInBitsPerSec < 102400 { + invalidParams.Add(request.NewErrParamMinValue("AverageDownloadRateLimitInBitsPerSec", 102400)) + } + if s.AverageUploadRateLimitInBitsPerSec != nil && *s.AverageUploadRateLimitInBitsPerSec < 51200 { + invalidParams.Add(request.NewErrParamMinValue("AverageUploadRateLimitInBitsPerSec", 51200)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAverageDownloadRateLimitInBitsPerSec sets the AverageDownloadRateLimitInBitsPerSec field's value. +func (s *UpdateBandwidthRateLimitInput) SetAverageDownloadRateLimitInBitsPerSec(v int64) *UpdateBandwidthRateLimitInput { + s.AverageDownloadRateLimitInBitsPerSec = &v + return s +} + +// SetAverageUploadRateLimitInBitsPerSec sets the AverageUploadRateLimitInBitsPerSec field's value. +func (s *UpdateBandwidthRateLimitInput) SetAverageUploadRateLimitInBitsPerSec(v int64) *UpdateBandwidthRateLimitInput { + s.AverageUploadRateLimitInBitsPerSec = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateBandwidthRateLimitInput) SetGatewayARN(v string) *UpdateBandwidthRateLimitInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway whose throttle information was +// updated. +type UpdateBandwidthRateLimitOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateBandwidthRateLimitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBandwidthRateLimitOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateBandwidthRateLimitOutput) SetGatewayARN(v string) *UpdateBandwidthRateLimitOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * UpdateChapCredentialsInput$InitiatorName +// +// * UpdateChapCredentialsInput$SecretToAuthenticateInitiator +// +// * UpdateChapCredentialsInput$SecretToAuthenticateTarget +// +// * UpdateChapCredentialsInput$TargetARN +type UpdateChapCredentialsInput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. + // + // InitiatorName is a required field + InitiatorName *string `min:"1" type:"string" required:"true"` + + // The secret key that the initiator (for example, the Windows client) must + // provide to participate in mutual CHAP with the target. + // + // The secret key must be between 12 and 16 bytes when encoded in UTF-8. + // + // SecretToAuthenticateInitiator is a required field + SecretToAuthenticateInitiator *string `min:"1" type:"string" required:"true"` + + // The secret key that the target must provide to participate in mutual CHAP + // with the initiator (e.g. Windows client). + // + // Byte constraints: Minimum bytes of 12. Maximum bytes of 16. + // + // The secret key must be between 12 and 16 bytes when encoded in UTF-8. + SecretToAuthenticateTarget *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes + // operation to return the TargetARN for specified VolumeARN. + // + // TargetARN is a required field + TargetARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateChapCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChapCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateChapCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateChapCredentialsInput"} + if s.InitiatorName == nil { + invalidParams.Add(request.NewErrParamRequired("InitiatorName")) + } + if s.InitiatorName != nil && len(*s.InitiatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InitiatorName", 1)) + } + if s.SecretToAuthenticateInitiator == nil { + invalidParams.Add(request.NewErrParamRequired("SecretToAuthenticateInitiator")) + } + if s.SecretToAuthenticateInitiator != nil && len(*s.SecretToAuthenticateInitiator) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateInitiator", 1)) + } + if s.SecretToAuthenticateTarget != nil && len(*s.SecretToAuthenticateTarget) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretToAuthenticateTarget", 1)) + } + if s.TargetARN == nil { + invalidParams.Add(request.NewErrParamRequired("TargetARN")) + } + if s.TargetARN != nil && len(*s.TargetARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("TargetARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *UpdateChapCredentialsInput) SetInitiatorName(v string) *UpdateChapCredentialsInput { + s.InitiatorName = &v + return s +} + +// SetSecretToAuthenticateInitiator sets the SecretToAuthenticateInitiator field's value. +func (s *UpdateChapCredentialsInput) SetSecretToAuthenticateInitiator(v string) *UpdateChapCredentialsInput { + s.SecretToAuthenticateInitiator = &v + return s +} + +// SetSecretToAuthenticateTarget sets the SecretToAuthenticateTarget field's value. +func (s *UpdateChapCredentialsInput) SetSecretToAuthenticateTarget(v string) *UpdateChapCredentialsInput { + s.SecretToAuthenticateTarget = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *UpdateChapCredentialsInput) SetTargetARN(v string) *UpdateChapCredentialsInput { + s.TargetARN = &v + return s +} + +// A JSON object containing the following fields: +type UpdateChapCredentialsOutput struct { + _ struct{} `type:"structure"` + + // The iSCSI initiator that connects to the target. This is the same initiator + // name specified in the request. + InitiatorName *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the target. This is the same target specified + // in the request. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateChapCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChapCredentialsOutput) GoString() string { + return s.String() +} + +// SetInitiatorName sets the InitiatorName field's value. +func (s *UpdateChapCredentialsOutput) SetInitiatorName(v string) *UpdateChapCredentialsOutput { + s.InitiatorName = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *UpdateChapCredentialsOutput) SetTargetARN(v string) *UpdateChapCredentialsOutput { + s.TargetARN = &v + return s +} + +type UpdateGatewayInformationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The name you configured for your gateway. + GatewayName *string `min:"2" type:"string"` + + GatewayTimezone *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s UpdateGatewayInformationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewayInformationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGatewayInformationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGatewayInformationInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.GatewayName != nil && len(*s.GatewayName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("GatewayName", 2)) + } + if s.GatewayTimezone != nil && len(*s.GatewayTimezone) < 3 { + invalidParams.Add(request.NewErrParamMinLen("GatewayTimezone", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewayInformationInput) SetGatewayARN(v string) *UpdateGatewayInformationInput { + s.GatewayARN = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *UpdateGatewayInformationInput) SetGatewayName(v string) *UpdateGatewayInformationInput { + s.GatewayName = &v + return s +} + +// SetGatewayTimezone sets the GatewayTimezone field's value. +func (s *UpdateGatewayInformationInput) SetGatewayTimezone(v string) *UpdateGatewayInformationInput { + s.GatewayTimezone = &v + return s +} + +// A JSON object containing the ARN of the gateway that was updated. +type UpdateGatewayInformationOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + GatewayName *string `type:"string"` +} + +// String returns the string representation +func (s UpdateGatewayInformationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewayInformationOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewayInformationOutput) SetGatewayARN(v string) *UpdateGatewayInformationOutput { + s.GatewayARN = &v + return s +} + +// SetGatewayName sets the GatewayName field's value. +func (s *UpdateGatewayInformationOutput) SetGatewayName(v string) *UpdateGatewayInformationOutput { + s.GatewayName = &v + return s +} + +// A JSON object containing the of the gateway to update. +type UpdateGatewaySoftwareNowInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateGatewaySoftwareNowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewaySoftwareNowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGatewaySoftwareNowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGatewaySoftwareNowInput"} + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewaySoftwareNowInput) SetGatewayARN(v string) *UpdateGatewaySoftwareNowInput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the of the gateway that was updated. +type UpdateGatewaySoftwareNowOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateGatewaySoftwareNowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGatewaySoftwareNowOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateGatewaySoftwareNowOutput) SetGatewayARN(v string) *UpdateGatewaySoftwareNowOutput { + s.GatewayARN = &v + return s +} + +// A JSON object containing the following fields: +// +// * UpdateMaintenanceStartTimeInput$DayOfWeek +// +// * UpdateMaintenanceStartTimeInput$HourOfDay +// +// * UpdateMaintenanceStartTimeInput$MinuteOfHour +type UpdateMaintenanceStartTimeInput struct { + _ struct{} `type:"structure"` + + // The maintenance start time day of the week represented as an ordinal number + // from 0 to 6, where 0 represents Sunday and 6 Saturday. + // + // DayOfWeek is a required field + DayOfWeek *int64 `type:"integer" required:"true"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The hour component of the maintenance start time represented as hh, where + // hh is the hour (00 to 23). The hour of the day is in the time zone of the + // gateway. + // + // HourOfDay is a required field + HourOfDay *int64 `type:"integer" required:"true"` + + // The minute component of the maintenance start time represented as mm, where + // mm is the minute (00 to 59). The minute of the hour is in the time zone of + // the gateway. + // + // MinuteOfHour is a required field + MinuteOfHour *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s UpdateMaintenanceStartTimeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateMaintenanceStartTimeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateMaintenanceStartTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateMaintenanceStartTimeInput"} + if s.DayOfWeek == nil { + invalidParams.Add(request.NewErrParamRequired("DayOfWeek")) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.HourOfDay == nil { + invalidParams.Add(request.NewErrParamRequired("HourOfDay")) + } + if s.MinuteOfHour == nil { + invalidParams.Add(request.NewErrParamRequired("MinuteOfHour")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDayOfWeek sets the DayOfWeek field's value. +func (s *UpdateMaintenanceStartTimeInput) SetDayOfWeek(v int64) *UpdateMaintenanceStartTimeInput { + s.DayOfWeek = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateMaintenanceStartTimeInput) SetGatewayARN(v string) *UpdateMaintenanceStartTimeInput { + s.GatewayARN = &v + return s +} + +// SetHourOfDay sets the HourOfDay field's value. +func (s *UpdateMaintenanceStartTimeInput) SetHourOfDay(v int64) *UpdateMaintenanceStartTimeInput { + s.HourOfDay = &v + return s +} + +// SetMinuteOfHour sets the MinuteOfHour field's value. +func (s *UpdateMaintenanceStartTimeInput) SetMinuteOfHour(v int64) *UpdateMaintenanceStartTimeInput { + s.MinuteOfHour = &v + return s +} + +// A JSON object containing the of the gateway whose maintenance start time +// is updated. +type UpdateMaintenanceStartTimeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateMaintenanceStartTimeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateMaintenanceStartTimeOutput) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *UpdateMaintenanceStartTimeOutput) SetGatewayARN(v string) *UpdateMaintenanceStartTimeOutput { + s.GatewayARN = &v + return s +} + +// UpdateNFSFileShareInput +type UpdateNFSFileShareInput struct { + _ struct{} `type:"structure"` + + // The list of clients that are allowed to access the file gateway. The list + // must contain either valid IP addresses or valid CIDR blocks. + ClientList []*string `min:"1" type:"list"` + + // The default storage class for objects put into an Amazon S3 bucket by a file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the file share to be updated. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side + // encryption. This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // The default values for the file share. Optional. + NFSFileShareDefaults *NFSFileShareDefaults `type:"structure"` + + // Sets the access control list permission for objects in the S3 bucket that + // a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // The user mapped to anonymous user. Valid options are the following: + // + // * "RootSquash" - Only root is mapped to anonymous user. + // + // * "NoSquash" - No one is mapped to anonymous user + // + // * "AllSquash" - Everyone is mapped to anonymous user. + Squash *string `min:"5" type:"string"` +} + +// String returns the string representation +func (s UpdateNFSFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNFSFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateNFSFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateNFSFileShareInput"} + if s.ClientList != nil && len(s.ClientList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientList", 1)) + } + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + if s.Squash != nil && len(*s.Squash) < 5 { + invalidParams.Add(request.NewErrParamMinLen("Squash", 5)) + } + if s.NFSFileShareDefaults != nil { + if err := s.NFSFileShareDefaults.Validate(); err != nil { + invalidParams.AddNested("NFSFileShareDefaults", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientList sets the ClientList field's value. +func (s *UpdateNFSFileShareInput) SetClientList(v []*string) *UpdateNFSFileShareInput { + s.ClientList = v + return s +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *UpdateNFSFileShareInput) SetDefaultStorageClass(v string) *UpdateNFSFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateNFSFileShareInput) SetFileShareARN(v string) *UpdateNFSFileShareInput { + s.FileShareARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *UpdateNFSFileShareInput) SetGuessMIMETypeEnabled(v bool) *UpdateNFSFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *UpdateNFSFileShareInput) SetKMSEncrypted(v bool) *UpdateNFSFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *UpdateNFSFileShareInput) SetKMSKey(v string) *UpdateNFSFileShareInput { + s.KMSKey = &v + return s +} + +// SetNFSFileShareDefaults sets the NFSFileShareDefaults field's value. +func (s *UpdateNFSFileShareInput) SetNFSFileShareDefaults(v *NFSFileShareDefaults) *UpdateNFSFileShareInput { + s.NFSFileShareDefaults = v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *UpdateNFSFileShareInput) SetObjectACL(v string) *UpdateNFSFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *UpdateNFSFileShareInput) SetReadOnly(v bool) *UpdateNFSFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *UpdateNFSFileShareInput) SetRequesterPays(v bool) *UpdateNFSFileShareInput { + s.RequesterPays = &v + return s +} + +// SetSquash sets the Squash field's value. +func (s *UpdateNFSFileShareInput) SetSquash(v string) *UpdateNFSFileShareInput { + s.Squash = &v + return s +} + +// UpdateNFSFileShareOutput +type UpdateNFSFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the updated file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateNFSFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNFSFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateNFSFileShareOutput) SetFileShareARN(v string) *UpdateNFSFileShareOutput { + s.FileShareARN = &v + return s +} + +// UpdateSMBFileShareInput +type UpdateSMBFileShareInput struct { + _ struct{} `type:"structure"` + + // The default storage class for objects put into an Amazon S3 bucket by file + // gateway. Possible values are S3_STANDARD, S3_STANDARD_IA or S3_ONEZONE_IA. + // If this field is not populated, the default value S3_STANDARD is used. Optional. + DefaultStorageClass *string `min:"5" type:"string"` + + // The Amazon Resource Name (ARN) of the SMB file share you want to update. + // + // FileShareARN is a required field + FileShareARN *string `min:"50" type:"string" required:"true"` + + // Enables guessing of the MIME type for uploaded objects based on file extensions. + // Set this value to true to enable MIME type guessing, and otherwise to false. + // The default value is true. + GuessMIMETypeEnabled *bool `type:"boolean"` + + // A list of users in the Active Directory that are not allowed to access the + // file share. Can only be set if Authentication is set to "ActiveDirectory". + InvalidUserList []*string `type:"list"` + + // True to use Amazon S3 server side encryption with your own AWS KMS key, or + // false to use a key managed by Amazon S3. Optional. + KMSEncrypted *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) KMS key used for Amazon S3 server side encryption. + // This value can only be set when KMSEncrypted is true. Optional. + KMSKey *string `min:"20" type:"string"` + + // Sets the access control list permission for objects in the Amazon S3 bucket + // that a file gateway puts objects into. The default value is "private". + ObjectACL *string `type:"string" enum:"ObjectACL"` + + // Sets the write status of a file share. This value is true if the write status + // is read-only, and otherwise false. + ReadOnly *bool `type:"boolean"` + + // Sets who pays the cost of the request and the data download from the Amazon + // S3 bucket. Set this value to true if you want the requester to pay instead + // of the bucket owner, and otherwise to false. + RequesterPays *bool `type:"boolean"` + + // A list of users in the Active Directory that are allowed to access the file + // share. Can only be set if Authentication is set to "ActiveDirectory". + ValidUserList []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateSMBFileShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSMBFileShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSMBFileShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSMBFileShareInput"} + if s.DefaultStorageClass != nil && len(*s.DefaultStorageClass) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DefaultStorageClass", 5)) + } + if s.FileShareARN == nil { + invalidParams.Add(request.NewErrParamRequired("FileShareARN")) + } + if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) + } + if s.KMSKey != nil && len(*s.KMSKey) < 20 { + invalidParams.Add(request.NewErrParamMinLen("KMSKey", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultStorageClass sets the DefaultStorageClass field's value. +func (s *UpdateSMBFileShareInput) SetDefaultStorageClass(v string) *UpdateSMBFileShareInput { + s.DefaultStorageClass = &v + return s +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateSMBFileShareInput) SetFileShareARN(v string) *UpdateSMBFileShareInput { + s.FileShareARN = &v + return s +} + +// SetGuessMIMETypeEnabled sets the GuessMIMETypeEnabled field's value. +func (s *UpdateSMBFileShareInput) SetGuessMIMETypeEnabled(v bool) *UpdateSMBFileShareInput { + s.GuessMIMETypeEnabled = &v + return s +} + +// SetInvalidUserList sets the InvalidUserList field's value. +func (s *UpdateSMBFileShareInput) SetInvalidUserList(v []*string) *UpdateSMBFileShareInput { + s.InvalidUserList = v + return s +} + +// SetKMSEncrypted sets the KMSEncrypted field's value. +func (s *UpdateSMBFileShareInput) SetKMSEncrypted(v bool) *UpdateSMBFileShareInput { + s.KMSEncrypted = &v + return s +} + +// SetKMSKey sets the KMSKey field's value. +func (s *UpdateSMBFileShareInput) SetKMSKey(v string) *UpdateSMBFileShareInput { + s.KMSKey = &v + return s +} + +// SetObjectACL sets the ObjectACL field's value. +func (s *UpdateSMBFileShareInput) SetObjectACL(v string) *UpdateSMBFileShareInput { + s.ObjectACL = &v + return s +} + +// SetReadOnly sets the ReadOnly field's value. +func (s *UpdateSMBFileShareInput) SetReadOnly(v bool) *UpdateSMBFileShareInput { + s.ReadOnly = &v + return s +} + +// SetRequesterPays sets the RequesterPays field's value. +func (s *UpdateSMBFileShareInput) SetRequesterPays(v bool) *UpdateSMBFileShareInput { + s.RequesterPays = &v + return s +} + +// SetValidUserList sets the ValidUserList field's value. +func (s *UpdateSMBFileShareInput) SetValidUserList(v []*string) *UpdateSMBFileShareInput { + s.ValidUserList = v + return s +} + +// UpdateSMBFileShareOutput +type UpdateSMBFileShareOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the updated SMB file share. + FileShareARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateSMBFileShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSMBFileShareOutput) GoString() string { + return s.String() +} + +// SetFileShareARN sets the FileShareARN field's value. +func (s *UpdateSMBFileShareOutput) SetFileShareARN(v string) *UpdateSMBFileShareOutput { + s.FileShareARN = &v + return s +} + +// A JSON object containing one or more of the following fields: +// +// * UpdateSnapshotScheduleInput$Description +// +// * UpdateSnapshotScheduleInput$RecurrenceInHours +// +// * UpdateSnapshotScheduleInput$StartAt +// +// * UpdateSnapshotScheduleInput$VolumeARN +type UpdateSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // Optional description of the snapshot that overwrites the existing description. + Description *string `min:"1" type:"string"` + + // Frequency of snapshots. Specify the number of hours between snapshots. + // + // RecurrenceInHours is a required field + RecurrenceInHours *int64 `min:"1" type:"integer" required:"true"` + + // The hour of the day at which the snapshot schedule begins represented as + // hh, where hh is the hour (0 to 23). The hour of the day is in the time zone + // of the gateway. + // + // StartAt is a required field + StartAt *int64 `type:"integer" required:"true"` + + // The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation + // to return a list of gateway volumes. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSnapshotScheduleInput"} + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.RecurrenceInHours == nil { + invalidParams.Add(request.NewErrParamRequired("RecurrenceInHours")) + } + if s.RecurrenceInHours != nil && *s.RecurrenceInHours < 1 { + invalidParams.Add(request.NewErrParamMinValue("RecurrenceInHours", 1)) + } + if s.StartAt == nil { + invalidParams.Add(request.NewErrParamRequired("StartAt")) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateSnapshotScheduleInput) SetDescription(v string) *UpdateSnapshotScheduleInput { + s.Description = &v + return s +} + +// SetRecurrenceInHours sets the RecurrenceInHours field's value. +func (s *UpdateSnapshotScheduleInput) SetRecurrenceInHours(v int64) *UpdateSnapshotScheduleInput { + s.RecurrenceInHours = &v + return s +} + +// SetStartAt sets the StartAt field's value. +func (s *UpdateSnapshotScheduleInput) SetStartAt(v int64) *UpdateSnapshotScheduleInput { + s.StartAt = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *UpdateSnapshotScheduleInput) SetVolumeARN(v string) *UpdateSnapshotScheduleInput { + s.VolumeARN = &v + return s +} + +// A JSON object containing the of the updated storage volume. +type UpdateSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *UpdateSnapshotScheduleOutput) SetVolumeARN(v string) *UpdateSnapshotScheduleOutput { + s.VolumeARN = &v + return s +} + +type UpdateVTLDeviceTypeInput struct { + _ struct{} `type:"structure"` + + // The type of medium changer you want to select. + // + // Valid Values: "STK-L700", "AWS-Gateway-VTL" + // + // DeviceType is a required field + DeviceType *string `min:"2" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the medium changer you want to select. + // + // VTLDeviceARN is a required field + VTLDeviceARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateVTLDeviceTypeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVTLDeviceTypeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVTLDeviceTypeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVTLDeviceTypeInput"} + if s.DeviceType == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceType")) + } + if s.DeviceType != nil && len(*s.DeviceType) < 2 { + invalidParams.Add(request.NewErrParamMinLen("DeviceType", 2)) + } + if s.VTLDeviceARN == nil { + invalidParams.Add(request.NewErrParamRequired("VTLDeviceARN")) + } + if s.VTLDeviceARN != nil && len(*s.VTLDeviceARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VTLDeviceARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceType sets the DeviceType field's value. +func (s *UpdateVTLDeviceTypeInput) SetDeviceType(v string) *UpdateVTLDeviceTypeInput { + s.DeviceType = &v + return s +} + +// SetVTLDeviceARN sets the VTLDeviceARN field's value. +func (s *UpdateVTLDeviceTypeInput) SetVTLDeviceARN(v string) *UpdateVTLDeviceTypeInput { + s.VTLDeviceARN = &v + return s +} + +// UpdateVTLDeviceTypeOutput +type UpdateVTLDeviceTypeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the medium changer you have selected. + VTLDeviceARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s UpdateVTLDeviceTypeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVTLDeviceTypeOutput) GoString() string { + return s.String() +} + +// SetVTLDeviceARN sets the VTLDeviceARN field's value. +func (s *UpdateVTLDeviceTypeOutput) SetVTLDeviceARN(v string) *UpdateVTLDeviceTypeOutput { + s.VTLDeviceARN = &v + return s +} + +// Represents a device object associated with a tape gateway. +type VTLDevice struct { + _ struct{} `type:"structure"` + + // A list of iSCSI information about a VTL device. + DeviceiSCSIAttributes *DeviceiSCSIAttributes `type:"structure"` + + // Specifies the unique Amazon Resource Name (ARN) of the device (tape drive + // or media changer). + VTLDeviceARN *string `min:"50" type:"string"` + + VTLDeviceProductIdentifier *string `type:"string"` + + VTLDeviceType *string `type:"string"` + + VTLDeviceVendor *string `type:"string"` +} + +// String returns the string representation +func (s VTLDevice) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VTLDevice) GoString() string { + return s.String() +} + +// SetDeviceiSCSIAttributes sets the DeviceiSCSIAttributes field's value. +func (s *VTLDevice) SetDeviceiSCSIAttributes(v *DeviceiSCSIAttributes) *VTLDevice { + s.DeviceiSCSIAttributes = v + return s +} + +// SetVTLDeviceARN sets the VTLDeviceARN field's value. +func (s *VTLDevice) SetVTLDeviceARN(v string) *VTLDevice { + s.VTLDeviceARN = &v + return s +} + +// SetVTLDeviceProductIdentifier sets the VTLDeviceProductIdentifier field's value. +func (s *VTLDevice) SetVTLDeviceProductIdentifier(v string) *VTLDevice { + s.VTLDeviceProductIdentifier = &v + return s +} + +// SetVTLDeviceType sets the VTLDeviceType field's value. +func (s *VTLDevice) SetVTLDeviceType(v string) *VTLDevice { + s.VTLDeviceType = &v + return s +} + +// SetVTLDeviceVendor sets the VTLDeviceVendor field's value. +func (s *VTLDevice) SetVTLDeviceVendor(v string) *VTLDevice { + s.VTLDeviceVendor = &v + return s +} + +// Describes a storage volume object. +type VolumeInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. + GatewayARN *string `min:"50" type:"string"` + + // The unique identifier assigned to your gateway during activation. This ID + // becomes part of the gateway Amazon Resource Name (ARN), which you use as + // input for other operations. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + GatewayId *string `min:"12" type:"string"` + + // The Amazon Resource Name (ARN) for the storage volume. For example, the following + // is a valid ARN: + // + // arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + VolumeARN *string `min:"50" type:"string"` + + // The unique identifier assigned to the volume. This ID becomes part of the + // volume Amazon Resource Name (ARN), which you use as input for other operations. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + VolumeId *string `min:"12" type:"string"` + + // The size of the volume in bytes. + // + // Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens + // (-). + VolumeSizeInBytes *int64 `type:"long"` + + VolumeType *string `min:"3" type:"string"` +} + +// String returns the string representation +func (s VolumeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeInfo) GoString() string { + return s.String() +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *VolumeInfo) SetGatewayARN(v string) *VolumeInfo { + s.GatewayARN = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *VolumeInfo) SetGatewayId(v string) *VolumeInfo { + s.GatewayId = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *VolumeInfo) SetVolumeARN(v string) *VolumeInfo { + s.VolumeARN = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *VolumeInfo) SetVolumeId(v string) *VolumeInfo { + s.VolumeId = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *VolumeInfo) SetVolumeSizeInBytes(v int64) *VolumeInfo { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeType sets the VolumeType field's value. +func (s *VolumeInfo) SetVolumeType(v string) *VolumeInfo { + s.VolumeType = &v + return s +} + +type VolumeRecoveryPointInfo struct { + _ struct{} `type:"structure"` + + VolumeARN *string `min:"50" type:"string"` + + VolumeRecoveryPointTime *string `type:"string"` + + VolumeSizeInBytes *int64 `type:"long"` + + VolumeUsageInBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s VolumeRecoveryPointInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeRecoveryPointInfo) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeARN(v string) *VolumeRecoveryPointInfo { + s.VolumeARN = &v + return s +} + +// SetVolumeRecoveryPointTime sets the VolumeRecoveryPointTime field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeRecoveryPointTime(v string) *VolumeRecoveryPointInfo { + s.VolumeRecoveryPointTime = &v + return s +} + +// SetVolumeSizeInBytes sets the VolumeSizeInBytes field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeSizeInBytes(v int64) *VolumeRecoveryPointInfo { + s.VolumeSizeInBytes = &v + return s +} + +// SetVolumeUsageInBytes sets the VolumeUsageInBytes field's value. +func (s *VolumeRecoveryPointInfo) SetVolumeUsageInBytes(v int64) *VolumeRecoveryPointInfo { + s.VolumeUsageInBytes = &v + return s +} + +// Lists iSCSI information about a volume. +type VolumeiSCSIAttributes struct { + _ struct{} `type:"structure"` + + // Indicates whether mutual CHAP is enabled for the iSCSI target. + ChapEnabled *bool `type:"boolean"` + + // The logical disk number. + LunNumber *int64 `min:"1" type:"integer"` + + // The network interface identifier. + NetworkInterfaceId *string `type:"string"` + + // The port used to communicate with iSCSI targets. + NetworkInterfacePort *int64 `type:"integer"` + + // The Amazon Resource Name (ARN) of the volume target. + TargetARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s VolumeiSCSIAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeiSCSIAttributes) GoString() string { + return s.String() +} + +// SetChapEnabled sets the ChapEnabled field's value. +func (s *VolumeiSCSIAttributes) SetChapEnabled(v bool) *VolumeiSCSIAttributes { + s.ChapEnabled = &v + return s +} + +// SetLunNumber sets the LunNumber field's value. +func (s *VolumeiSCSIAttributes) SetLunNumber(v int64) *VolumeiSCSIAttributes { + s.LunNumber = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *VolumeiSCSIAttributes) SetNetworkInterfaceId(v string) *VolumeiSCSIAttributes { + s.NetworkInterfaceId = &v + return s +} + +// SetNetworkInterfacePort sets the NetworkInterfacePort field's value. +func (s *VolumeiSCSIAttributes) SetNetworkInterfacePort(v int64) *VolumeiSCSIAttributes { + s.NetworkInterfacePort = &v + return s +} + +// SetTargetARN sets the TargetARN field's value. +func (s *VolumeiSCSIAttributes) SetTargetARN(v string) *VolumeiSCSIAttributes { + s.TargetARN = &v + return s +} + +const ( + // ErrorCodeActivationKeyExpired is a ErrorCode enum value + ErrorCodeActivationKeyExpired = "ActivationKeyExpired" + + // ErrorCodeActivationKeyInvalid is a ErrorCode enum value + ErrorCodeActivationKeyInvalid = "ActivationKeyInvalid" + + // ErrorCodeActivationKeyNotFound is a ErrorCode enum value + ErrorCodeActivationKeyNotFound = "ActivationKeyNotFound" + + // ErrorCodeGatewayInternalError is a ErrorCode enum value + ErrorCodeGatewayInternalError = "GatewayInternalError" + + // ErrorCodeGatewayNotConnected is a ErrorCode enum value + ErrorCodeGatewayNotConnected = "GatewayNotConnected" + + // ErrorCodeGatewayNotFound is a ErrorCode enum value + ErrorCodeGatewayNotFound = "GatewayNotFound" + + // ErrorCodeGatewayProxyNetworkConnectionBusy is a ErrorCode enum value + ErrorCodeGatewayProxyNetworkConnectionBusy = "GatewayProxyNetworkConnectionBusy" + + // ErrorCodeAuthenticationFailure is a ErrorCode enum value + ErrorCodeAuthenticationFailure = "AuthenticationFailure" + + // ErrorCodeBandwidthThrottleScheduleNotFound is a ErrorCode enum value + ErrorCodeBandwidthThrottleScheduleNotFound = "BandwidthThrottleScheduleNotFound" + + // ErrorCodeBlocked is a ErrorCode enum value + ErrorCodeBlocked = "Blocked" + + // ErrorCodeCannotExportSnapshot is a ErrorCode enum value + ErrorCodeCannotExportSnapshot = "CannotExportSnapshot" + + // ErrorCodeChapCredentialNotFound is a ErrorCode enum value + ErrorCodeChapCredentialNotFound = "ChapCredentialNotFound" + + // ErrorCodeDiskAlreadyAllocated is a ErrorCode enum value + ErrorCodeDiskAlreadyAllocated = "DiskAlreadyAllocated" + + // ErrorCodeDiskDoesNotExist is a ErrorCode enum value + ErrorCodeDiskDoesNotExist = "DiskDoesNotExist" + + // ErrorCodeDiskSizeGreaterThanVolumeMaxSize is a ErrorCode enum value + ErrorCodeDiskSizeGreaterThanVolumeMaxSize = "DiskSizeGreaterThanVolumeMaxSize" + + // ErrorCodeDiskSizeLessThanVolumeSize is a ErrorCode enum value + ErrorCodeDiskSizeLessThanVolumeSize = "DiskSizeLessThanVolumeSize" + + // ErrorCodeDiskSizeNotGigAligned is a ErrorCode enum value + ErrorCodeDiskSizeNotGigAligned = "DiskSizeNotGigAligned" + + // ErrorCodeDuplicateCertificateInfo is a ErrorCode enum value + ErrorCodeDuplicateCertificateInfo = "DuplicateCertificateInfo" + + // ErrorCodeDuplicateSchedule is a ErrorCode enum value + ErrorCodeDuplicateSchedule = "DuplicateSchedule" + + // ErrorCodeEndpointNotFound is a ErrorCode enum value + ErrorCodeEndpointNotFound = "EndpointNotFound" + + // ErrorCodeIamnotSupported is a ErrorCode enum value + ErrorCodeIamnotSupported = "IAMNotSupported" + + // ErrorCodeInitiatorInvalid is a ErrorCode enum value + ErrorCodeInitiatorInvalid = "InitiatorInvalid" + + // ErrorCodeInitiatorNotFound is a ErrorCode enum value + ErrorCodeInitiatorNotFound = "InitiatorNotFound" + + // ErrorCodeInternalError is a ErrorCode enum value + ErrorCodeInternalError = "InternalError" + + // ErrorCodeInvalidGateway is a ErrorCode enum value + ErrorCodeInvalidGateway = "InvalidGateway" + + // ErrorCodeInvalidEndpoint is a ErrorCode enum value + ErrorCodeInvalidEndpoint = "InvalidEndpoint" + + // ErrorCodeInvalidParameters is a ErrorCode enum value + ErrorCodeInvalidParameters = "InvalidParameters" + + // ErrorCodeInvalidSchedule is a ErrorCode enum value + ErrorCodeInvalidSchedule = "InvalidSchedule" + + // ErrorCodeLocalStorageLimitExceeded is a ErrorCode enum value + ErrorCodeLocalStorageLimitExceeded = "LocalStorageLimitExceeded" + + // ErrorCodeLunAlreadyAllocated is a ErrorCode enum value + ErrorCodeLunAlreadyAllocated = "LunAlreadyAllocated " + + // ErrorCodeLunInvalid is a ErrorCode enum value + ErrorCodeLunInvalid = "LunInvalid" + + // ErrorCodeMaximumContentLengthExceeded is a ErrorCode enum value + ErrorCodeMaximumContentLengthExceeded = "MaximumContentLengthExceeded" + + // ErrorCodeMaximumTapeCartridgeCountExceeded is a ErrorCode enum value + ErrorCodeMaximumTapeCartridgeCountExceeded = "MaximumTapeCartridgeCountExceeded" + + // ErrorCodeMaximumVolumeCountExceeded is a ErrorCode enum value + ErrorCodeMaximumVolumeCountExceeded = "MaximumVolumeCountExceeded" + + // ErrorCodeNetworkConfigurationChanged is a ErrorCode enum value + ErrorCodeNetworkConfigurationChanged = "NetworkConfigurationChanged" + + // ErrorCodeNoDisksAvailable is a ErrorCode enum value + ErrorCodeNoDisksAvailable = "NoDisksAvailable" + + // ErrorCodeNotImplemented is a ErrorCode enum value + ErrorCodeNotImplemented = "NotImplemented" + + // ErrorCodeNotSupported is a ErrorCode enum value + ErrorCodeNotSupported = "NotSupported" + + // ErrorCodeOperationAborted is a ErrorCode enum value + ErrorCodeOperationAborted = "OperationAborted" + + // ErrorCodeOutdatedGateway is a ErrorCode enum value + ErrorCodeOutdatedGateway = "OutdatedGateway" + + // ErrorCodeParametersNotImplemented is a ErrorCode enum value + ErrorCodeParametersNotImplemented = "ParametersNotImplemented" + + // ErrorCodeRegionInvalid is a ErrorCode enum value + ErrorCodeRegionInvalid = "RegionInvalid" + + // ErrorCodeRequestTimeout is a ErrorCode enum value + ErrorCodeRequestTimeout = "RequestTimeout" + + // ErrorCodeServiceUnavailable is a ErrorCode enum value + ErrorCodeServiceUnavailable = "ServiceUnavailable" + + // ErrorCodeSnapshotDeleted is a ErrorCode enum value + ErrorCodeSnapshotDeleted = "SnapshotDeleted" + + // ErrorCodeSnapshotIdInvalid is a ErrorCode enum value + ErrorCodeSnapshotIdInvalid = "SnapshotIdInvalid" + + // ErrorCodeSnapshotInProgress is a ErrorCode enum value + ErrorCodeSnapshotInProgress = "SnapshotInProgress" + + // ErrorCodeSnapshotNotFound is a ErrorCode enum value + ErrorCodeSnapshotNotFound = "SnapshotNotFound" + + // ErrorCodeSnapshotScheduleNotFound is a ErrorCode enum value + ErrorCodeSnapshotScheduleNotFound = "SnapshotScheduleNotFound" + + // ErrorCodeStagingAreaFull is a ErrorCode enum value + ErrorCodeStagingAreaFull = "StagingAreaFull" + + // ErrorCodeStorageFailure is a ErrorCode enum value + ErrorCodeStorageFailure = "StorageFailure" + + // ErrorCodeTapeCartridgeNotFound is a ErrorCode enum value + ErrorCodeTapeCartridgeNotFound = "TapeCartridgeNotFound" + + // ErrorCodeTargetAlreadyExists is a ErrorCode enum value + ErrorCodeTargetAlreadyExists = "TargetAlreadyExists" + + // ErrorCodeTargetInvalid is a ErrorCode enum value + ErrorCodeTargetInvalid = "TargetInvalid" + + // ErrorCodeTargetNotFound is a ErrorCode enum value + ErrorCodeTargetNotFound = "TargetNotFound" + + // ErrorCodeUnauthorizedOperation is a ErrorCode enum value + ErrorCodeUnauthorizedOperation = "UnauthorizedOperation" + + // ErrorCodeVolumeAlreadyExists is a ErrorCode enum value + ErrorCodeVolumeAlreadyExists = "VolumeAlreadyExists" + + // ErrorCodeVolumeIdInvalid is a ErrorCode enum value + ErrorCodeVolumeIdInvalid = "VolumeIdInvalid" + + // ErrorCodeVolumeInUse is a ErrorCode enum value + ErrorCodeVolumeInUse = "VolumeInUse" + + // ErrorCodeVolumeNotFound is a ErrorCode enum value + ErrorCodeVolumeNotFound = "VolumeNotFound" + + // ErrorCodeVolumeNotReady is a ErrorCode enum value + ErrorCodeVolumeNotReady = "VolumeNotReady" +) + +// The type of the file share. +const ( + // FileShareTypeNfs is a FileShareType enum value + FileShareTypeNfs = "NFS" + + // FileShareTypeSmb is a FileShareType enum value + FileShareTypeSmb = "SMB" +) + +// Sets the access control list permission for objects in the S3 bucket that +// a file gateway puts objects into. The default value is "private". +const ( + // ObjectACLPrivate is a ObjectACL enum value + ObjectACLPrivate = "private" + + // ObjectACLPublicRead is a ObjectACL enum value + ObjectACLPublicRead = "public-read" + + // ObjectACLPublicReadWrite is a ObjectACL enum value + ObjectACLPublicReadWrite = "public-read-write" + + // ObjectACLAuthenticatedRead is a ObjectACL enum value + ObjectACLAuthenticatedRead = "authenticated-read" + + // ObjectACLBucketOwnerRead is a ObjectACL enum value + ObjectACLBucketOwnerRead = "bucket-owner-read" + + // ObjectACLBucketOwnerFullControl is a ObjectACL enum value + ObjectACLBucketOwnerFullControl = "bucket-owner-full-control" + + // ObjectACLAwsExecRead is a ObjectACL enum value + ObjectACLAwsExecRead = "aws-exec-read" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go new file mode 100644 index 00000000000..12f57f240d5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go @@ -0,0 +1,79 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package storagegateway provides the client and types for making API +// requests to AWS Storage Gateway. +// +// AWS Storage Gateway is the service that connects an on-premises software +// appliance with cloud-based storage to provide seamless and secure integration +// between an organization's on-premises IT environment and AWS's storage infrastructure. +// The service enables you to securely upload data to the AWS cloud for cost +// effective backup and rapid disaster recovery. +// +// Use the following links to get started using the AWS Storage Gateway Service +// API Reference: +// +// * AWS Storage Gateway Required Request Headers (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#AWSStorageGatewayHTTPRequestsHeaders): +// Describes the required headers that you must send with every POST request +// to AWS Storage Gateway. +// +// * Signing Requests (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#AWSStorageGatewaySigningRequests): +// AWS Storage Gateway requires that you authenticate every request you send; +// this topic describes how sign such a request. +// +// * Error Responses (http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html#APIErrorResponses): +// Provides reference information about AWS Storage Gateway errors. +// +// * Operations in AWS Storage Gateway (http://docs.aws.amazon.com/storagegateway/latest/APIReference/API_Operations.html): +// Contains detailed descriptions of all AWS Storage Gateway operations, +// their request parameters, response elements, possible errors, and examples +// of requests and responses. +// +// * AWS Storage Gateway Regions and Endpoints: (http://docs.aws.amazon.com/general/latest/gr/rande.html#sg_region) +// Provides a list of each region and endpoints available for use with AWS +// Storage Gateway. +// +// AWS Storage Gateway resource IDs are in uppercase. When you use these resource +// IDs with the Amazon EC2 API, EC2 expects resource IDs in lowercase. You must +// change your resource ID to lowercase to use it with the EC2 API. For example, +// in Storage Gateway the ID for a volume might be vol-AA22BB012345DAF670. When +// you use this ID with the EC2 API, you must change it to vol-aa22bb012345daf670. +// Otherwise, the EC2 API might not behave as expected. +// +// IDs for Storage Gateway volumes and Amazon EBS snapshots created from gateway +// volumes are changing to a longer format. Starting in December 2016, all new +// volumes and snapshots will be created with a 17-character string. Starting +// in April 2016, you will be able to use these longer IDs so you can test your +// systems with the new format. For more information, see Longer EC2 and EBS +// Resource IDs (https://aws.amazon.com/ec2/faqs/#longer-ids). +// +// For example, a volume Amazon Resource Name (ARN) with the longer volume +// ID format looks like the following: +// +// arn:aws:storagegateway:us-west-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABBCCDDEEFFG. +// +// A snapshot ID with the longer ID format looks like the following: snap-78e226633445566ee. +// +// For more information, see Announcement: Heads-up – Longer AWS Storage Gateway +// volume and snapshot IDs coming in 2016 (https://forums.aws.amazon.com/ann.jspa?annID=3557). +// +// See https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30 for more information on this service. +// +// See storagegateway package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/storagegateway/ +// +// Using the Client +// +// To contact AWS Storage Gateway with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Storage Gateway client StorageGateway for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/storagegateway/#New +package storagegateway diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go new file mode 100644 index 00000000000..01b9816e3aa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/errors.go @@ -0,0 +1,27 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package storagegateway + +const ( + + // ErrCodeInternalServerError for service response error code + // "InternalServerError". + // + // An internal server error has occurred during the request. For more information, + // see the error and message fields. + ErrCodeInternalServerError = "InternalServerError" + + // ErrCodeInvalidGatewayRequestException for service response error code + // "InvalidGatewayRequestException". + // + // An exception occurred because an invalid gateway request was issued to the + // service. For more information, see the error and message fields. + ErrCodeInvalidGatewayRequestException = "InvalidGatewayRequestException" + + // ErrCodeServiceUnavailableError for service response error code + // "ServiceUnavailableError". + // + // An internal server error has occurred because the service is unavailable. + // For more information, see the error and message fields. + ErrCodeServiceUnavailableError = "ServiceUnavailableError" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go new file mode 100644 index 00000000000..9a0c08f6962 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package storagegateway + +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" +) + +// StorageGateway provides the API operation methods for making requests to +// AWS Storage Gateway. See this package's package overview docs +// for details on the service. +// +// StorageGateway methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type StorageGateway 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 = "storagegateway" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Storage Gateway" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the StorageGateway 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 StorageGateway client from just a session. +// svc := storagegateway.New(mySession) +// +// // Create a StorageGateway client with additional configuration +// svc := storagegateway.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *StorageGateway { + 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) *StorageGateway { + svc := &StorageGateway{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2013-06-30", + JSONVersion: "1.1", + TargetPrefix: "StorageGateway_20130630", + }, + 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 StorageGateway operation and runs any +// custom request initialization. +func (c *StorageGateway) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 374a3cf8174..c94050b025e 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -982,6 +982,14 @@ "version": "v1.14.26", "versionExact": "v1.14.26" }, + { + "checksumSHA1": "7XSW9vBDuN9ZR5wfuCvCaF6QPy0=", + "path": "github.com/aws/aws-sdk-go/service/storagegateway", + "revision": "9e9afa0895e9daff556cc18f90dc53eb91f41ffd", + "revisionTime": "2018-07-12T21:02:49Z", + "version": "v1.14.26", + "versionExact": "v1.14.26" + }, { "checksumSHA1": "uguCtF1eoCG71dvEVqrYbFs7py0=", "path": "github.com/aws/aws-sdk-go/service/sts", From 44cb645f97a896cd39a925811775fa1b82061513 Mon Sep 17 00:00:00 2001 From: Matthew McNamara Date: Sun, 15 Jul 2018 22:54:10 +0200 Subject: [PATCH 1859/3316] resource/aws_route: Print more useful error message when missing valid target type --- aws/resource_aws_route.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_route.go b/aws/resource_aws_route.go index 16f9b026183..ac4da3fb069 100644 --- a/aws/resource_aws_route.go +++ b/aws/resource_aws_route.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -206,7 +207,7 @@ func resourceAwsRouteCreate(d *schema.ResourceData, meta interface{}) error { } default: - return fmt.Errorf("An invalid target type specified: %s", setTarget) + return fmt.Errorf("A valid target type is missing. Specify one of the following attributes: %s", strings.Join(allowedTargets, ", ")) } log.Printf("[DEBUG] Route create config: %s", createOpts) From 68692c66c1456bd16e920a52e20a626b91f6c687 Mon Sep 17 00:00:00 2001 From: Mark Pitman Date: Sun, 15 Jul 2018 23:35:38 -0700 Subject: [PATCH 1860/3316] Add support for timeout in api_gateway_integration Fixes #2405 --- aws/resource_aws_api_gateway_integration.go | 26 ++++++++++++++++ ...source_aws_api_gateway_integration_test.go | 25 +++++++++++----- aws/validators.go | 9 ++++++ aws/validators_test.go | 30 +++++++++++++++++++ .../r/api_gateway_integration.html.markdown | 2 ++ 5 files changed, 85 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 93d5a18f10c..2cf92dcc0c8 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "log" + "strconv" "strings" "time" @@ -138,6 +139,13 @@ func resourceAwsApiGatewayIntegration() *schema.Resource { Optional: true, Computed: true, }, + + "timeout_milliseconds": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validateApiGatewayIntegrationTimeout, + Default: 29000, + }, }, } } @@ -213,6 +221,11 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa cacheNamespace = aws.String(v.(string)) } + var timeoutInMillis *int64 + if v, ok := d.GetOk("timeout_milliseconds"); ok { + timeoutInMillis = aws.Int64(int64(v.(int))) + } + _, err := conn.PutIntegration(&apigateway.PutIntegrationInput{ HttpMethod: aws.String(d.Get("http_method").(string)), ResourceId: aws.String(d.Get("resource_id").(string)), @@ -229,6 +242,7 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa ContentHandling: contentHandling, ConnectionType: connectionType, ConnectionId: connectionId, + TimeoutInMillis: timeoutInMillis, }) if err != nil { return fmt.Errorf("Error creating API Gateway Integration: %s", err) @@ -294,6 +308,10 @@ func resourceAwsApiGatewayIntegrationRead(d *schema.ResourceData, meta interface d.Set("cache_namespace", integration.CacheNamespace) } + if integration.TimeoutInMillis != nil { + d.Set("timeout_milliseconds", integration.TimeoutInMillis) + } + return nil } @@ -449,6 +467,14 @@ func resourceAwsApiGatewayIntegrationUpdate(d *schema.ResourceData, meta interfa }) } + if d.HasChange("timeout_milliseconds") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/timeoutInMillis"), + Value: aws.String(strconv.Itoa(d.Get("timeout_milliseconds").(int))), + }) + } + params := &apigateway.UpdateIntegrationInput{ HttpMethod: aws.String(d.Get("http_method").(string)), ResourceId: aws.String(d.Get("resource_id").(string)), diff --git a/aws/resource_aws_api_gateway_integration_test.go b/aws/resource_aws_api_gateway_integration_test.go index 3856beea559..ff7dbb96aee 100644 --- a/aws/resource_aws_api_gateway_integration_test.go +++ b/aws/resource_aws_api_gateway_integration_test.go @@ -37,6 +37,7 @@ func TestAccAWSAPIGatewayIntegration_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.%", "2"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.application/json", ""), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.application/xml", "#set($inputRoot = $input.path('$'))\n{ }"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "timeout_milliseconds", "29000"), ), }, @@ -56,6 +57,7 @@ func TestAccAWSAPIGatewayIntegration_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.%", "2"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.application/json", "{'foobar': 'bar}"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.text/html", "Foo"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "timeout_milliseconds", "2000"), ), }, @@ -75,6 +77,7 @@ func TestAccAWSAPIGatewayIntegration_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.%", "2"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.application/json", ""), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.application/xml", "#set($inputRoot = $input.path('$'))\n{ }"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "timeout_milliseconds", "2000"), ), }, @@ -90,6 +93,7 @@ func TestAccAWSAPIGatewayIntegration_basic(t *testing.T) { resource.TestCheckNoResourceAttr("aws_api_gateway_integration.test", "credentials"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_parameters.%", "0"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.%", "0"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "timeout_milliseconds", "2000"), ), }, @@ -108,6 +112,7 @@ func TestAccAWSAPIGatewayIntegration_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.%", "2"), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.application/json", ""), resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "request_templates.application/xml", "#set($inputRoot = $input.path('$'))\n{ }"), + resource.TestCheckResourceAttr("aws_api_gateway_integration.test", "timeout_milliseconds", "29000"), ), }, }, @@ -356,7 +361,7 @@ resource "aws_api_gateway_integration" "test" { uri = "https://www.google.de" integration_http_method = "GET" passthrough_behavior = "WHEN_NO_MATCH" - content_handling = "CONVERT_TO_TEXT" + content_handling = "CONVERT_TO_TEXT" } ` @@ -401,7 +406,8 @@ resource "aws_api_gateway_integration" "test" { uri = "https://www.google.de" integration_http_method = "GET" passthrough_behavior = "WHEN_NO_MATCH" - content_handling = "CONVERT_TO_TEXT" + content_handling = "CONVERT_TO_TEXT" + timeout_milliseconds = 2000 } ` @@ -446,7 +452,8 @@ resource "aws_api_gateway_integration" "test" { uri = "https://www.google.de/updated" integration_http_method = "GET" passthrough_behavior = "WHEN_NO_MATCH" - content_handling = "CONVERT_TO_TEXT" + content_handling = "CONVERT_TO_TEXT" + timeout_milliseconds = 2000 } ` @@ -491,7 +498,8 @@ resource "aws_api_gateway_integration" "test" { uri = "https://www.google.de" integration_http_method = "GET" passthrough_behavior = "WHEN_NO_MATCH" - content_handling = "CONVERT_TO_BINARY" + content_handling = "CONVERT_TO_BINARY" + timeout_milliseconds = 2000 } ` @@ -535,7 +543,8 @@ resource "aws_api_gateway_integration" "test" { type = "HTTP" uri = "https://www.google.de" integration_http_method = "GET" - passthrough_behavior = "WHEN_NO_MATCH" + passthrough_behavior = "WHEN_NO_MATCH" + timeout_milliseconds = 2000 } ` @@ -570,7 +579,8 @@ resource "aws_api_gateway_integration" "test" { uri = "https://www.google.de" integration_http_method = "GET" passthrough_behavior = "WHEN_NO_MATCH" - content_handling = "CONVERT_TO_TEXT" + content_handling = "CONVERT_TO_TEXT" + timeout_milliseconds = 2000 } ` @@ -623,7 +633,8 @@ resource "aws_api_gateway_integration" "test" { uri = "https://www.google.de" integration_http_method = "GET" passthrough_behavior = "WHEN_NO_MATCH" - content_handling = "CONVERT_TO_TEXT" + content_handling = "CONVERT_TO_TEXT" + timeout_milliseconds = 2000 } ` diff --git a/aws/validators.go b/aws/validators.go index 806167f0b60..ae67e96bfeb 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1863,3 +1863,12 @@ func validateNeptuneParamGroupNamePrefix(v interface{}, k string) (ws []string, } return } + +func validateApiGatewayIntegrationTimeout(v interface{}, k string) (ws []string, errors []error) { + value := v.(int) + if value < 50 || value > 29000 { + errors = append(errors, fmt.Errorf( + "%s must be between 50 and 29000", k)) + } + return +} diff --git a/aws/validators_test.go b/aws/validators_test.go index 94756c1b75e..6379564de1c 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -2730,3 +2730,33 @@ func TestValidateNeptuneParamGroupNamePrefix(t *testing.T) { } } } + +func TestValidateApiGatewayIntegrationTimeout(t *testing.T) { + cases := []struct { + Value int + ErrCount int + }{ + { + Value: 49, + ErrCount: 1, + }, + { + Value: 29001, + ErrCount: 1, + }, + { + Value: 50, + ErrCount: 0, + }, + { + Value: 29000, + ErrCount: 0, + }, + } + for _, tc := range cases { + _, errors := validateApiGatewayIntegrationTimeout(tc.Value, "timeout_milliseconds") + if len(errors) != tc.ErrCount { + t.Fatalf("Expected the Integration Timeout value to trigger a validation error for timeout of %d ms", tc.Value) + } + } +} diff --git a/website/docs/r/api_gateway_integration.html.markdown b/website/docs/r/api_gateway_integration.html.markdown index 0282b0b0b02..daea2d71180 100644 --- a/website/docs/r/api_gateway_integration.html.markdown +++ b/website/docs/r/api_gateway_integration.html.markdown @@ -38,6 +38,7 @@ resource "aws_api_gateway_integration" "MyDemoIntegration" { type = "MOCK" cache_key_parameters = ["method.request.path.param"] cache_namespace = "foobar" + timeout_milliseconds = 29000 request_parameters = { "integration.request.header.X-Authorization" = "'static'" @@ -223,3 +224,4 @@ The following arguments are supported: * `cache_namespace` - (Optional) The integration's cache namespace. * `request_parameters_in_json` - **Deprecated**, use `request_parameters` instead. * `content_handling` - (Optional) Specifies how to handle request payload content type conversions. Supported values are `CONVERT_TO_BINARY` and `CONVERT_TO_TEXT`. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through. +* `timeout_milliseconds` - (Optional) Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds. From c34d09e17107affc8a3c7efd2a0ff210682bb093 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 29 Jun 2018 16:01:00 -0400 Subject: [PATCH 1861/3316] Add 'aws_macie_s3_bucket_association' resource. --- aws/config.go | 3 + aws/provider.go | 1 + ...esource_aws_macie_s3_bucket_association.go | 235 ++++++++++++++++++ ...ce_aws_macie_s3_bucket_association_test.go | 174 +++++++++++++ website/aws.erb | 11 + .../macie_s3_bucket_association.html.markdown | 43 ++++ 6 files changed, 467 insertions(+) create mode 100644 aws/resource_aws_macie_s3_bucket_association.go create mode 100644 aws/resource_aws_macie_s3_bucket_association_test.go create mode 100644 website/docs/r/macie_s3_bucket_association.html.markdown diff --git a/aws/config.go b/aws/config.go index df113d1869e..12613f4c47b 100644 --- a/aws/config.go +++ b/aws/config.go @@ -70,6 +70,7 @@ import ( "github.com/aws/aws-sdk-go/service/lambda" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" "github.com/aws/aws-sdk-go/service/lightsail" + "github.com/aws/aws-sdk-go/service/macie" "github.com/aws/aws-sdk-go/service/mediastore" "github.com/aws/aws-sdk-go/service/mq" "github.com/aws/aws-sdk-go/service/neptune" @@ -210,6 +211,7 @@ type AWSClient struct { elastictranscoderconn *elastictranscoder.ElasticTranscoder lambdaconn *lambda.Lambda lightsailconn *lightsail.Lightsail + macieconn *macie.Macie mqconn *mq.MQ opsworksconn *opsworks.OpsWorks organizationsconn *organizations.Organizations @@ -501,6 +503,7 @@ func (c *Config) Client() (interface{}, error) { client.lambdaconn = lambda.New(awsLambdaSess) client.lexmodelconn = lexmodelbuildingservice.New(sess) client.lightsailconn = lightsail.New(sess) + client.macieconn = macie.New(sess) client.mqconn = mq.New(sess) client.neptuneconn = neptune.New(sess) client.opsworksconn = opsworks.New(sess) diff --git a/aws/provider.go b/aws/provider.go index fc8848da8f9..67b8866104f 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -491,6 +491,7 @@ func Provider() terraform.ResourceProvider { "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), "aws_mq_broker": resourceAwsMqBroker(), "aws_mq_configuration": resourceAwsMqConfiguration(), diff --git a/aws/resource_aws_macie_s3_bucket_association.go b/aws/resource_aws_macie_s3_bucket_association.go new file mode 100644 index 00000000000..e656e0ebfd7 --- /dev/null +++ b/aws/resource_aws_macie_s3_bucket_association.go @@ -0,0 +1,235 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/macie" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsMacieS3BucketAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsMacieS3BucketAssociationCreate, + Read: resourceAwsMacieS3BucketAssociationRead, + Update: resourceAwsMacieS3BucketAssociationUpdate, + Delete: resourceAwsMacieS3BucketAssociationDelete, + + Schema: map[string]*schema.Schema{ + "bucket_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "member_account_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "classification_type": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "one_time": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + }, + }, + }, + } +} + +func resourceAwsMacieS3BucketAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + req := &macie.AssociateS3ResourcesInput{ + S3Resources: []*macie.S3ResourceClassification{ + { + BucketName: aws.String(d.Get("bucket_name").(string)), + }, + }, + } + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + if v, ok := d.GetOk("prefix"); ok { + req.S3Resources[0].Prefix = aws.String(v.(string)) + } + + ct := &macie.ClassificationType{ + Continuous: aws.String(macie.S3ContinuousClassificationTypeFull), + } + ct.OneTime = aws.String(macieS3BucketAssociationOneTimeClassification(d)) + req.S3Resources[0].ClassificationType = ct + + log.Printf("[DEBUG] Creating Macie S3 bucket association: %#v", req) + resp, err := conn.AssociateS3Resources(req) + if err != nil { + return fmt.Errorf("Error creating Macie S3 bucket association: %s", err) + } + if len(resp.FailedS3Resources) > 0 { + return fmt.Errorf("Error creating Macie S3 bucket association: %s", resp.FailedS3Resources[0]) + } + + d.SetId(macieS3BucketAssociationId(d)) + return resourceAwsMacieS3BucketAssociationRead(d, meta) +} + +func resourceAwsMacieS3BucketAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + req := &macie.ListS3ResourcesInput{} + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + + bucketName := d.Get("bucket_name").(string) + prefix := d.Get("prefix") + var res *macie.S3ResourceClassification + for { + resp, err := conn.ListS3Resources(req) + if err != nil { + return fmt.Errorf("Error listing Macie S3 bucket associations: %s", err) + } + + for _, v := range resp.S3Resources { + if aws.StringValue(v.BucketName) == bucketName && aws.StringValue(v.Prefix) == prefix { + res = v + break + } + } + if res != nil { + break + } + + if resp.NextToken == nil { + break + } + req.NextToken = resp.NextToken + } + + if res == nil { + log.Printf("[WARN] Macie S3 bucket association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + m := map[string]interface{}{} + if aws.StringValue(res.ClassificationType.OneTime) == macie.S3OneTimeClassificationTypeFull { + m["one_time"] = true + } else { + m["one_time"] = false + } + if err := d.Set("classification_type", []map[string]interface{}{m}); err != nil { + return err + } + + return nil +} + +func resourceAwsMacieS3BucketAssociationUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + if d.HasChange("classification_type") { + req := &macie.UpdateS3ResourcesInput{ + S3ResourcesUpdate: []*macie.S3ResourceClassificationUpdate{ + { + BucketName: aws.String(d.Get("bucket_name").(string)), + ClassificationTypeUpdate: &macie.ClassificationTypeUpdate{}, + }, + }, + } + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + if v, ok := d.GetOk("prefix"); ok { + req.S3ResourcesUpdate[0].Prefix = aws.String(v.(string)) + } + req.S3ResourcesUpdate[0].ClassificationTypeUpdate.OneTime = aws.String(macieS3BucketAssociationOneTimeClassification(d)) + + log.Printf("[DEBUG] Updating Macie S3 bucket association: %#v", req) + resp, err := conn.UpdateS3Resources(req) + if err != nil { + return fmt.Errorf("Error updating Macie S3 bucket association: %s", err) + } + if len(resp.FailedS3Resources) > 0 { + return fmt.Errorf("Error updating Macie S3 bucket association: %s", resp.FailedS3Resources[0]) + } + } + + return resourceAwsMacieS3BucketAssociationRead(d, meta) +} + +func resourceAwsMacieS3BucketAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).macieconn + + log.Printf("[DEBUG] Deleting Macie S3 bucket association: %s", d.Id()) + + req := &macie.DisassociateS3ResourcesInput{ + AssociatedS3Resources: []*macie.S3Resource{ + { + BucketName: aws.String(d.Get("bucket_name").(string)), + }, + }, + } + if v, ok := d.GetOk("member_account_id"); ok { + req.MemberAccountId = aws.String(v.(string)) + } + if v, ok := d.GetOk("prefix"); ok { + req.AssociatedS3Resources[0].Prefix = aws.String(v.(string)) + } + + resp, err := conn.DisassociateS3Resources(req) + if err != nil { + return fmt.Errorf("Error deleting Macie S3 bucket association: %s", err) + } + if len(resp.FailedS3Resources) > 0 { + failed := resp.FailedS3Resources[0] + // { + // ErrorCode: "InvalidInputException", + // ErrorMessage: "The request was rejected. The specified S3 resource (bucket or prefix) is not associated with Macie.", + // FailedItem: { + // BucketName: "tf-macie-example-002" + // } + // } + if aws.StringValue(failed.ErrorCode) == macie.ErrCodeInvalidInputException && + strings.Contains(aws.StringValue(failed.ErrorMessage), "is not associated with Macie") { + return nil + } + return fmt.Errorf("Error deleting Macie S3 bucket association: %s", failed) + } + + return nil +} + +func macieS3BucketAssociationId(d *schema.ResourceData) string { + return fmt.Sprintf("%s/%s", d.Get("bucket_name"), d.Get("prefix")) +} + +func macieS3BucketAssociationOneTimeClassification(d *schema.ResourceData) string { + oneTime := false + if v := d.Get("classification_type").([]interface{}); len(v) > 0 { + if m := v[0].(map[string]interface{}); m["one_time"].(bool) { + oneTime = true + } + } + if oneTime { + return macie.S3OneTimeClassificationTypeFull + } else { + return macie.S3OneTimeClassificationTypeNone + } +} diff --git a/aws/resource_aws_macie_s3_bucket_association_test.go b/aws/resource_aws_macie_s3_bucket_association_test.go new file mode 100644 index 00000000000..ddc60512db8 --- /dev/null +++ b/aws/resource_aws_macie_s3_bucket_association_test.go @@ -0,0 +1,174 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/macie" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSMacieS3BucketAssociation_basic(t *testing.T) { + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSMacieS3BucketAssociationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSMacieS3BucketAssociationConfig_basic(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSMacieS3BucketAssociationExists("aws_macie_s3_bucket_association.test"), + resource.TestCheckResourceAttr("aws_macie_s3_bucket_association.test", "classification_type.0.one_time", "false"), + ), + }, + { + Config: testAccAWSMacieS3BucketAssociationConfig_basicOneTime(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSMacieS3BucketAssociationExists("aws_macie_s3_bucket_association.test"), + resource.TestCheckResourceAttr("aws_macie_s3_bucket_association.test", "classification_type.0.one_time", "true"), + ), + }, + }, + }) +} + +func TestAccAWSMacieS3BucketAssociation_accountIdAndPrefix(t *testing.T) { + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSMacieS3BucketAssociationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSMacieS3BucketAssociationConfig_accountIdAndPrefix(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSMacieS3BucketAssociationExists("aws_macie_s3_bucket_association.test"), + resource.TestCheckResourceAttr("aws_macie_s3_bucket_association.test", "classification_type.0.one_time", "false"), + ), + }, + { + Config: testAccAWSMacieS3BucketAssociationConfig_accountIdAndPrefixOneTime(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSMacieS3BucketAssociationExists("aws_macie_s3_bucket_association.test"), + resource.TestCheckResourceAttr("aws_macie_s3_bucket_association.test", "classification_type.0.one_time", "true"), + ), + }, + }, + }) +} + +func testAccCheckAWSMacieS3BucketAssociationDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).macieconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_macie_s3_bucket_association" { + continue + } + + req := &macie.ListS3ResourcesInput{} + acctId := rs.Primary.Attributes["member_account_id"] + if acctId != "" { + req.MemberAccountId = aws.String(acctId) + } + + for { + resp, err := conn.ListS3Resources(req) + if err != nil { + return err + } + + for _, v := range resp.S3Resources { + if aws.StringValue(v.BucketName) == rs.Primary.Attributes["bucket_name"] && aws.StringValue(v.Prefix) == rs.Primary.Attributes["prefix"] { + return fmt.Errorf("S3 resource %s/%s is not dissociated from Macie", rs.Primary.Attributes["bucket_name"], rs.Primary.Attributes["prefix"]) + } + } + + if resp.NextToken == nil { + break + } + req.NextToken = resp.NextToken + } + } + return nil +} + +func testAccCheckAWSMacieS3BucketAssociationExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + return nil + } +} + +func testAccAWSMacieS3BucketAssociationConfig_basic(randInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "tf-macie-test-bucket-%d" +} + +resource "aws_macie_s3_bucket_association" "test" { + bucket_name = "${aws_s3_bucket.test.id}" +} +`, randInt) +} + +func testAccAWSMacieS3BucketAssociationConfig_basicOneTime(randInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "tf-macie-test-bucket-%d" +} + +resource "aws_macie_s3_bucket_association" "test" { + bucket_name = "${aws_s3_bucket.test.id}" + + classification_type { + one_time = true + } +} +`, randInt) +} + +func testAccAWSMacieS3BucketAssociationConfig_accountIdAndPrefix(randInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "tf-macie-test-bucket-%d" +} + +data "aws_caller_identity" "current" {} + +resource "aws_macie_s3_bucket_association" "test" { + bucket_name = "${aws_s3_bucket.test.id}" + member_account_id = "${data.aws_caller_identity.current.account_id}" + prefix = "data" +} +`, randInt) +} + +func testAccAWSMacieS3BucketAssociationConfig_accountIdAndPrefixOneTime(randInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "tf-macie-test-bucket-%d" +} + +data "aws_caller_identity" "current" {} + +resource "aws_macie_s3_bucket_association" "test" { + bucket_name = "${aws_s3_bucket.test.id}" + member_account_id = "${data.aws_caller_identity.current.account_id}" + prefix = "data" + + classification_type { + one_time = true + } +} +`, randInt) +} diff --git a/website/aws.erb b/website/aws.erb index 828e278e00e..d9cc28defb5 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1509,6 +1509,17 @@ + > + Macie Resources +

+ + > MQ Resources + > + Storage Gateway Resources + + + > SWF Resources diff --git a/website/docs/r/storagegateway_nfs_file_share.html.markdown b/website/docs/r/storagegateway_nfs_file_share.html.markdown new file mode 100644 index 00000000000..5b54122a7af --- /dev/null +++ b/website/docs/r/storagegateway_nfs_file_share.html.markdown @@ -0,0 +1,74 @@ +--- +layout: "aws" +page_title: "AWS: aws_storagegateway_nfs_file_share" +sidebar_current: "docs-aws-resource-storagegateway-nfs-file-share" +description: |- + Manages an AWS Storage Gateway NFS File Share +--- + +# aws_storagegateway_nfs_file_share + +Manages an AWS Storage Gateway NFS File Share. + +## Example Usage + +```hcl +resource "aws_storagegateway_nfs_file_share" "example" { + client_list = ["0.0.0.0/0"] + gateway_arn = "${aws_storagegateway_gateway.example.arn}" + location_arn = "${aws_s3_bucket.example.arn}" + role_arn = "${aws_s3_bucket.example.arn}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `client_list` - (Required) The list of clients that are allowed to access the file gateway. The list must contain either valid IP addresses or valid CIDR blocks. Set to `["0.0.0.0/0"]` to not limit access. Minimum 1 item. Maximum 100 items. +* `gateway_arn` - (Required) Amazon Resource Name (ARN) of the file gateway. +* `location_arn` - (Required) The ARN of the backed storage used for storing file data. +* `role_arn` - (Required) The ARN of the AWS Identity and Access Management (IAM) role that a file gateway assumes when it accesses the underlying storage. +* `default_storage_class` - (Optional) The default storage class for objects put into an Amazon S3 bucket by the file gateway. Defaults to `S3_STANDARD`. Valid values: `S3_STANDARD`, `S3_STANDARD_IA`, `S3_ONEZONE_IA`. +* `guess_mime_type_enabled` - (Optional) Boolean value that enables guessing of the MIME type for uploaded objects based on file extensions. Defaults to `true`. +* `kms_encrypted` - (Optional) Boolean value if `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3. Defaults to `false`. +* `kms_key_arn` - (Optional) Amazon Resource Name (ARN) for KMS key used for Amazon S3 server side encryption. This value can only be set when `kms_encrypted` is true. +* `nfs_file_share_defaults` - (Optional) Nested argument with file share default values. More information below. +* `object_acl` - (Optional) Access Control List permission for S3 bucket objects. Defaults to `private`. +* `read_only` - (Optional) Boolean to indicate write status of file share. File share does not accept writes if `true`. Defaults to `false`. +* `requester_pays` - (Optional) Boolean who pays the cost of the request and the data download from the Amazon S3 bucket. Set this value to `true` if you want the requester to pay instead of the bucket owner. Defaults to `false`. +* `squash` - (Optional) Maps a user to anonymous user. Defaults to `RootSquash`. Valid values: `RootSquash` (only root is mapped to anonymous user), `NoSquash` (no one is mapped to anonymous user), `AllSquash` (everyone is mapped to anonymous user) + +### nfs_file_share_defaults + +Files and folders stored as Amazon S3 objects in S3 buckets don't, by default, have Unix file permissions assigned to them. Upon discovery in an S3 bucket by Storage Gateway, the S3 objects that represent files and folders are assigned these default Unix permissions. + +* `directory_mode` - (Optional) The Unix directory mode in the string form "nnnn". Defaults to `"0777"`. +* `file_mode` - (Optional) The Unix file mode in the string form "nnnn". Defaults to `"0666"`. +* `group_id` - (Optional) The default group ID for the file share (unless the files have another group ID specified). Defaults to `0`. Valid values: `0` through `4294967294`. +* `owner_id` - (Optional) The default owner ID for the file share (unless the files have another owner ID specified). Defaults to `0`. Valid values: `0` through `4294967294`. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - Amazon Resource Name (ARN) of the NFS File Share. +* `arn` - Amazon Resource Name (ARN) of the NFS File Share. +* `fileshare_id` - ID of the NFS File Share. +* `path` - File share path used by the NFS client to identify the mount point. + +## Timeouts + +`aws_storagegateway_nfs_file_share` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +* `create` - (Default `10m`) How long to wait for file share creation. +* `update` - (Default `10m`) How long to wait for file share updates. +* `delete` - (Default `10m`) How long to wait for file share deletion. + +## Import + +`aws_storagegateway_nfs_file_share` can be imported by using the NFS File Share Amazon Resource Name (ARN), e.g. + +``` +$ terraform import aws_storagegateway_nfs_file_share.example arn:aws:storagegateway:us-east-1:123456789012:share/share-12345678 +``` From 9db9a10996b274fe10906a51449a1a0332a0fb2b Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Thu, 19 Jul 2018 21:18:44 -0700 Subject: [PATCH 1908/3316] resource/aws_lambda_permission: Add support for event_source_token --- aws/resource_aws_lambda_permission.go | 10 +++++++ aws/resource_aws_lambda_permission_test.go | 11 +++++++- aws/validators.go | 18 +++++++++++++ aws/validators_test.go | 26 +++++++++++++++++++ .../docs/r/lambda_permission.html.markdown | 3 +++ 5 files changed, 67 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_lambda_permission.go b/aws/resource_aws_lambda_permission.go index 005f4dbc3b4..0ab996fc354 100644 --- a/aws/resource_aws_lambda_permission.go +++ b/aws/resource_aws_lambda_permission.go @@ -30,6 +30,12 @@ func resourceAwsLambdaPermission() *schema.Resource { ForceNew: true, ValidateFunc: validateLambdaPermissionAction, }, + "event_source_token": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateLambdaPermissionEventSourceToken, + }, "function_name": { Type: schema.TypeString, Required: true, @@ -105,6 +111,9 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) StatementId: aws.String(statementId), } + if v, ok := d.GetOk("event_source_token"); ok { + input.EventSourceToken = aws.String(v.(string)) + } if v, ok := d.GetOk("qualifier"); ok { input.Qualifier = aws.String(v.(string)) } @@ -257,6 +266,7 @@ func resourceAwsLambdaPermissionRead(d *schema.ResourceData, meta interface{}) e if stringEquals, ok := statement.Condition["StringEquals"]; ok { d.Set("source_account", stringEquals["AWS:SourceAccount"]) + d.Set("event_source_token", stringEquals["lambda:EventSourceToken"]) } if arnLike, ok := statement.Condition["ArnLike"]; ok { diff --git a/aws/resource_aws_lambda_permission_test.go b/aws/resource_aws_lambda_permission_test.go index e8fd3bd9612..682e9d054b3 100644 --- a/aws/resource_aws_lambda_permission_test.go +++ b/aws/resource_aws_lambda_permission_test.go @@ -49,6 +49,13 @@ func TestLambdaPermissionUnmarshalling(t *testing.T) { v.Statement[0].Condition["StringEquals"]["AWS:SourceAccount"], expectedSourceAccount) } + + expectedEventSourceToken := "test-event-source-token" + if v.Statement[0].Condition["StringEquals"]["lambda:EventSourceToken"] != expectedEventSourceToken { + t.Fatalf("Expected Event Source Token to match (%q != %q)", + v.Statement[0].Condition["StringEquals"]["lambda:EventSourceToken"], + expectedEventSourceToken) + } } func TestLambdaPermissionGetQualifierFromLambdaAliasOrVersionArn_alias(t *testing.T) { @@ -178,6 +185,7 @@ func TestAccAWSLambdaPermission_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_lambda_permission.allow_cloudwatch", "statement_id", "AllowExecutionFromCloudWatch"), resource.TestCheckResourceAttr("aws_lambda_permission.allow_cloudwatch", "qualifier", ""), resource.TestMatchResourceAttr("aws_lambda_permission.allow_cloudwatch", "function_name", funcArnRe), + resource.TestCheckResourceAttr("aws_lambda_permission.allow_cloudwatch", "event_source_token", "test-event-source-token"), ), }, }, @@ -551,6 +559,7 @@ resource "aws_lambda_permission" "allow_cloudwatch" { action = "lambda:InvokeFunction" function_name = "${aws_lambda_function.test_lambda.arn}" principal = "events.amazonaws.com" + event_source_token = "test-event-source-token" } resource "aws_lambda_function" "test_lambda" { @@ -901,7 +910,7 @@ var testLambdaPolicy = []byte(`{ "Statement": [ { "Condition": { - "StringEquals": {"AWS:SourceAccount": "319201112229"}, + "StringEquals": {"AWS:SourceAccount": "319201112229", "lambda:EventSourceToken": "test-event-source-token"}, "ArnLike":{"AWS:SourceArn":"arn:aws:events:eu-west-1:319201112229:rule/RunDaily"} }, "Action": "lambda:InvokeFunction", diff --git a/aws/validators.go b/aws/validators.go index 8d19c976251..f26861d3471 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -413,6 +413,24 @@ func validateLambdaPermissionAction(v interface{}, k string) (ws []string, error return } +func validateLambdaPermissionEventSourceToken(v interface{}, k string) (ws []string, errors []error) { + // https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html + value := v.(string) + + if len(value) > 256 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 256 characters: %q", k, value)) + } + + pattern := `^[a-zA-Z0-9._\-]+$` + if !regexp.MustCompile(pattern).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q doesn't comply with restrictions (%q): %q", + k, pattern, value)) + } + + return +} + func validateAwsAccountId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) diff --git a/aws/validators_test.go b/aws/validators_test.go index 94756c1b75e..1c4d3434766 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -266,6 +266,32 @@ func TestValidateLambdaPermissionAction(t *testing.T) { } } +func TestValidateLambdaPermissionEventSourceToken(t *testing.T) { + validTokens := []string{ + "amzn1.ask.skill.80c92c86-e6dd-4c4b-8d0d-000000000000", + "test-event-source-token", + strings.Repeat(".", 256), + } + for _, v := range validTokens { + _, errors := validateLambdaPermissionEventSourceToken(v, "event_source_token") + if len(errors) != 0 { + t.Fatalf("%q should be a valid Lambda permission event source token", v) + } + } + + invalidTokens := []string{ + "!", + "test event source token", + strings.Repeat(".", 257), + } + for _, v := range invalidTokens { + _, errors := validateLambdaPermissionEventSourceToken(v, "event_source_token") + if len(errors) == 0 { + t.Fatalf("%q should be an invalid Lambda permission event source token", v) + } + } +} + func TestValidateAwsAccountId(t *testing.T) { validNames := []string{ "123456789012", diff --git a/website/docs/r/lambda_permission.html.markdown b/website/docs/r/lambda_permission.html.markdown index f957ef8ba36..bb1dfe28475 100644 --- a/website/docs/r/lambda_permission.html.markdown +++ b/website/docs/r/lambda_permission.html.markdown @@ -132,6 +132,7 @@ resource "aws_lambda_permission" "lambda_permission" { ## Argument Reference * `action` - (Required) The AWS Lambda action you want to allow in this statement. (e.g. `lambda:InvokeFunction`) + * `event_source_token` - (Optional) The Event Source Token to validate. Used with [Alexa Skills][1]. * `function_name` - (Required) Name of the Lambda function whose resource policy you are updating * `principal` - (Required) The principal who is getting this permission. e.g. `s3.amazonaws.com`, an AWS account ID, or any valid AWS service principal @@ -148,3 +149,5 @@ resource "aws_lambda_permission" "lambda_permission" { [here](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-control-access-using-iam-policies-to-invoke-api.html). * `statement_id` - (Optional) A unique statement identifier. By default generated by Terraform. * `statement_id_prefix` - (Optional) A statement identifier prefix. Terraform will generate a unique suffix. Conflicts with `statement_id`. + +[1]: https://developer.amazon.com/docs/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html#use-aws-cli From ac909ba3930499fcc91a214b517518fe0607738f Mon Sep 17 00:00:00 2001 From: Gregory DEPUILLE Date: Fri, 20 Jul 2018 13:28:24 +0200 Subject: [PATCH 1909/3316] Change the description of iam_policy resource, force new resource --- website/docs/r/iam_policy.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/iam_policy.html.markdown b/website/docs/r/iam_policy.html.markdown index 07b7be40932..c5b23023d01 100644 --- a/website/docs/r/iam_policy.html.markdown +++ b/website/docs/r/iam_policy.html.markdown @@ -39,7 +39,7 @@ EOF The following arguments are supported: -* `description` - (Optional) Description of the IAM policy. +* `description` - (Optional, Forces new resource) Description of the IAM policy. * `name` - (Optional, Forces new resource) The name of the policy. If omitted, Terraform will assign a random, unique name. * `name_prefix` - (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts with `name`. * `path` - (Optional, default "/") Path in which to create the policy. From a0f066e1b8ceaaf5fced7934867cf932cf7f9c6a Mon Sep 17 00:00:00 2001 From: Jakub Kania Date: Fri, 20 Jul 2018 14:27:19 +0200 Subject: [PATCH 1910/3316] Update docs for aws_acm_certificate data source The aws_acm_certficate can be automated now so this description is confusing --- website/docs/d/acm_certificate.html.markdown | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/docs/d/acm_certificate.html.markdown b/website/docs/d/acm_certificate.html.markdown index 0d169a1bfda..0a30c8ace08 100644 --- a/website/docs/d/acm_certificate.html.markdown +++ b/website/docs/d/acm_certificate.html.markdown @@ -9,10 +9,8 @@ description: |- # Data Source: aws_acm_certificate Use this data source to get the ARN of a certificate in AWS Certificate -Manager (ACM). The process of requesting and verifying a certificate in ACM -requires some manual steps, which means that Terraform cannot automate the -creation of ACM certificates. But using this data source, you can reference -them by domain without having to hard code the ARNs as input. +Manager (ACM), you can reference +it by domain without having to hard code the ARNs as input. ## Example Usage From c62886059e5a36b29157449ee468e004efa2ad9e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Jul 2018 09:01:29 -0400 Subject: [PATCH 1911/3316] resource/aws_storagegateway_nfs_file_share: Fix default group_id/owner_id to 65534 (nfsnobody UID/GID) --- aws/resource_aws_storagegateway_nfs_file_share.go | 4 ++-- website/docs/r/storagegateway_nfs_file_share.html.markdown | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_storagegateway_nfs_file_share.go b/aws/resource_aws_storagegateway_nfs_file_share.go index 0fba31fd6e6..b987bea40bf 100644 --- a/aws/resource_aws_storagegateway_nfs_file_share.go +++ b/aws/resource_aws_storagegateway_nfs_file_share.go @@ -99,13 +99,13 @@ func resourceAwsStorageGatewayNfsFileShare() *schema.Resource { "group_id": { Type: schema.TypeInt, Optional: true, - Default: 0, + Default: 65534, ValidateFunc: validation.IntBetween(0, 4294967294), }, "owner_id": { Type: schema.TypeInt, Optional: true, - Default: 0, + Default: 65534, ValidateFunc: validation.IntBetween(0, 4294967294), }, }, diff --git a/website/docs/r/storagegateway_nfs_file_share.html.markdown b/website/docs/r/storagegateway_nfs_file_share.html.markdown index 5b54122a7af..1138b8877a4 100644 --- a/website/docs/r/storagegateway_nfs_file_share.html.markdown +++ b/website/docs/r/storagegateway_nfs_file_share.html.markdown @@ -45,8 +45,8 @@ Files and folders stored as Amazon S3 objects in S3 buckets don't, by default, h * `directory_mode` - (Optional) The Unix directory mode in the string form "nnnn". Defaults to `"0777"`. * `file_mode` - (Optional) The Unix file mode in the string form "nnnn". Defaults to `"0666"`. -* `group_id` - (Optional) The default group ID for the file share (unless the files have another group ID specified). Defaults to `0`. Valid values: `0` through `4294967294`. -* `owner_id` - (Optional) The default owner ID for the file share (unless the files have another owner ID specified). Defaults to `0`. Valid values: `0` through `4294967294`. +* `group_id` - (Optional) The default group ID for the file share (unless the files have another group ID specified). Defaults to `65534` (`nfsnobody`). Valid values: `0` through `4294967294`. +* `owner_id` - (Optional) The default owner ID for the file share (unless the files have another owner ID specified). Defaults to `65534` (`nfsnobody`). Valid values: `0` through `4294967294`. ## Attribute Reference From 8bf04c3de62078ba311db26bd9845a908181da92 Mon Sep 17 00:00:00 2001 From: Ali Ardestani Date: Fri, 20 Jul 2018 10:29:38 -0700 Subject: [PATCH 1912/3316] Update eks-getting-started.html.md --- website/docs/guides/eks-getting-started.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/guides/eks-getting-started.html.md b/website/docs/guides/eks-getting-started.html.md index d9f05d8c40c..6ce1a3faa01 100644 --- a/website/docs/guides/eks-getting-started.html.md +++ b/website/docs/guides/eks-getting-started.html.md @@ -12,7 +12,7 @@ The Amazon Web Services EKS service allows for simplified management of [Kubernetes](https://kubernetes.io/) servers. While the service itself is quite simple from an operator perspective, understanding how it interconnects with other pieces of the AWS service universe and how to configure local -Kubernetes clients to managed clusters can be helpful. +Kubernetes clients to manage clusters can be helpful. While the [EKS User Guide](https://docs.aws.amazon.com/eks/latest/userguide/) provides much of the up-to-date information about getting started with the service From 215668c9ee96aa1bd6e4f6a2feedbbd1edddc442 Mon Sep 17 00:00:00 2001 From: Thom Knowles Date: Fri, 20 Jul 2018 21:41:07 -0400 Subject: [PATCH 1913/3316] add docs --- website/docs/r/secretsmanager_secret.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/r/secretsmanager_secret.html.markdown b/website/docs/r/secretsmanager_secret.html.markdown index 6499e8233dc..12c4180b798 100644 --- a/website/docs/r/secretsmanager_secret.html.markdown +++ b/website/docs/r/secretsmanager_secret.html.markdown @@ -46,6 +46,7 @@ The following arguments are supported: * `name` - (Required) Specifies the friendly name of the new secret. The secret name can consist of uppercase letters, lowercase letters, digits, and any of the following characters: `/_+=.@-` Spaces are not permitted. * `description` - (Optional) A description of the secret. * `kms_key_id` - (Optional) Specifies the ARN or alias of the AWS KMS customer master key (CMK) to be used to encrypt the secret values in the versions stored in this secret. If you don't specify this value, then Secrets Manager defaults to using the AWS account's default CMK (the one named `aws/secretsmanager`). If the default KMS CMK with that name doesn't yet exist, then AWS Secrets Manager creates it for you automatically the first time. +* `policy` - (Optional) A valid JSON document representing a [resource policy](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html). * `recovery_window_in_days` - (Optional) Specifies the number of days that AWS Secrets Manager waits before it can delete the secret. This value can range from 7 to 30 days. The default value is 30. * `rotation_lambda_arn` - (Optional) Specifies the ARN of the Lambda function that can rotate the secret. * `rotation_rules` - (Optional) A structure that defines the rotation configuration for this secret. Defined below. From de935aca0e94b087bc472b9eac4df6ecf4f54344 Mon Sep 17 00:00:00 2001 From: Thom Knowles Date: Sat, 21 Jul 2018 15:44:26 -0400 Subject: [PATCH 1914/3316] Add support for policy property as well as test for it --- aws/resource_aws_secretsmanager_secret.go | 68 ++++++++++++++++ ...resource_aws_secretsmanager_secret_test.go | 81 +++++++++++++++++++ 2 files changed, 149 insertions(+) diff --git a/aws/resource_aws_secretsmanager_secret.go b/aws/resource_aws_secretsmanager_secret.go index 2156cc2a612..515ab2148ad 100644 --- a/aws/resource_aws_secretsmanager_secret.go +++ b/aws/resource_aws_secretsmanager_secret.go @@ -7,8 +7,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/secretsmanager" + "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" "github.com/hashicorp/terraform/helper/validation" ) @@ -40,6 +42,12 @@ func resourceAwsSecretsManagerSecret() *schema.Resource { Required: true, ForceNew: true, }, + "policy": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateJsonString, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + }, "recovery_window_in_days": { Type: schema.TypeInt, Optional: true, @@ -92,6 +100,19 @@ func resourceAwsSecretsManagerSecretCreate(d *schema.ResourceData, meta interfac d.SetId(aws.StringValue(output.ARN)) + if v, ok := d.GetOk("policy"); ok && v.(string) != "" { + input := &secretsmanager.PutResourcePolicyInput{ + ResourcePolicy: aws.String(v.(string)), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Setting Secrets Manager Secret resource policy; %s", input) + _, err := conn.PutResourcePolicy(input) + if err != nil { + return fmt.Errorf("error setting Secrets Manager Secret %q policy: %s", d.Id(), err) + } + } + if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { input := &secretsmanager.RotateSecretInput{ RotationLambdaARN: aws.String(v.(string)), @@ -154,6 +175,24 @@ func resourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{ d.Set("description", output.Description) d.Set("kms_key_id", output.KmsKeyId) d.Set("name", output.Name) + + pIn := &secretsmanager.GetResourcePolicyInput{ + SecretId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Reading Secrets Manager Secret policy: %s", pIn) + pOut, err := conn.GetResourcePolicy(pIn) + if err != nil { + return fmt.Errorf("error reading Secrets Manager Secret policy: %s", err) + } + + if pOut.ResourcePolicy != nil { + policy, err := structure.NormalizeJsonString(*pOut.ResourcePolicy) + if err != nil { + return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + } + d.Set("policy", policy) + } + d.Set("rotation_enabled", output.RotationEnabled) if aws.BoolValue(output.RotationEnabled) { @@ -193,6 +232,35 @@ func resourceAwsSecretsManagerSecretUpdate(d *schema.ResourceData, meta interfac } } + if d.HasChange("policy") { + if v, ok := d.GetOk("policy"); ok && v.(string) != "" { + policy, err := structure.NormalizeJsonString(v.(string)) + if err != nil { + return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + } + input := &secretsmanager.PutResourcePolicyInput{ + ResourcePolicy: aws.String(policy), + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Setting Secrets Manager Secret resource policy; %s", input) + _, err = conn.PutResourcePolicy(input) + if err != nil { + return fmt.Errorf("error setting Secrets Manager Secret %q policy: %s", d.Id(), err) + } + } else { + input := &secretsmanager.DeleteResourcePolicyInput{ + SecretId: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Removing Secrets Manager Secret policy: %s", input) + _, err := conn.DeleteResourcePolicy(input) + if err != nil { + return fmt.Errorf("error removing Secrets Manager Secret %q policy: %s", d.Id(), err) + } + } + } + if d.HasChange("rotation_lambda_arn") || d.HasChange("rotation_rules") { if v, ok := d.GetOk("rotation_lambda_arn"); ok && v.(string) != "" { input := &secretsmanager.RotateSecretInput{ diff --git a/aws/resource_aws_secretsmanager_secret_test.go b/aws/resource_aws_secretsmanager_secret_test.go index 065b6e27abc..1deded94bf4 100644 --- a/aws/resource_aws_secretsmanager_secret_test.go +++ b/aws/resource_aws_secretsmanager_secret_test.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" + "github.com/jen20/awspolicyequivalence" ) func init() { @@ -329,6 +330,28 @@ func TestAccAwsSecretsManagerSecret_Tags(t *testing.T) { }) } +func TestAccAwsSecretsManagerSecret_policy(t *testing.T) { + var secret secretsmanager.DescribeSecretOutput + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + expectedPolicyText := `{"Version":"2012-10-17","Statement":[{"Sid":"EnableAllPermissions","Effect":"Allow","Principal":{"AWS":"*"},"Action":"secretsmanager:GetSecretValue","Resource":"*"}]}` + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsSecretsManagerSecretConfig_Policy(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsSecretsManagerSecretExists(resourceName, &secret), + testAccCheckAwsSecretsManagerSecretHasPolicy(resourceName, expectedPolicyText), + ), + }, + }, + }) +} + func testAccCheckAwsSecretsManagerSecretDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).secretsmanagerconn @@ -387,6 +410,39 @@ func testAccCheckAwsSecretsManagerSecretExists(resourceName string, secret *secr } } +func testAccCheckAwsSecretsManagerSecretHasPolicy(name string, expectedPolicyText string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + conn := testAccProvider.Meta().(*AWSClient).secretsmanagerconn + input := &secretsmanager.GetResourcePolicyInput{ + SecretId: aws.String(rs.Primary.ID), + } + + out, err := conn.GetResourcePolicy(input) + + if err != nil { + return err + } + + actualPolicyText := *out.ResourcePolicy + + equivalent, err := awspolicy.PoliciesAreEquivalent(actualPolicyText, expectedPolicyText) + if err != nil { + return fmt.Errorf("Error testing policy equivalence: %s", err) + } + if !equivalent { + return fmt.Errorf("Non-equivalent policy error:\n\nexpected: %s\n\n got: %s\n", + expectedPolicyText, actualPolicyText) + } + + return nil + } +} + func testAccAwsSecretsManagerSecretConfig_Description(rName, description string) string { return fmt.Sprintf(` resource "aws_secretsmanager_secret" "test" { @@ -591,3 +647,28 @@ resource "aws_secretsmanager_secret" "test" { } `, rName) } + +func testAccAwsSecretsManagerSecretConfig_Policy(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%s" + + policy = < Date: Sat, 21 Jul 2018 17:41:48 -0500 Subject: [PATCH 1915/3316] docs: Reword CPU Options docs for aws_instance --- website/docs/r/instance.html.markdown | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index a39b79b773b..811c6fa375d 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -54,10 +54,12 @@ The following arguments are supported: * `availability_zone` - (Optional) The AZ to start the instance in. * `placement_group` - (Optional) The Placement Group to start the instance in. * `tenancy` - (Optional) The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-instance command. -* `cpu_core_count` - (Optional) Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values), specifying this option for non supported instance types throws an EC2 error. -* `cpu_threads_per_core` - (Optional) This option has no effect unless `cpu_core_count` is also set. Setting this to 1 will disable hyperthreading, otherwise it defaults to 2 if not set, see [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information. +* `cpu_core_count` - (Optional) Sets the number of CPU cores for an instance. This option is + only supported on creation of instance type that support CPU Options + [CPU Cores and Threads Per CPU Core Per Instance Type](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values) - specifying this option for unsupported instance types will return an error from the EC2 API. +* `cpu_threads_per_core` - (Optional - has no effect unless `cpu_core_count` is also set) If set to to 1, hyperthreading is disabled on the launcehd instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information. --> **NOTE:** Changing `cpu_core_count` and/or `cpu_threads_per_core` will cause the resouc to be recreated. +-> **NOTE:** Changing `cpu_core_count` and/or `cpu_threads_per_core` will cause the resource to be destroyed dand re-created. * `ebs_optimized` - (Optional) If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on an instance type that is optimized by default then From 1fc5fa3e9a1424676e092fa3682bf8b461aa4954 Mon Sep 17 00:00:00 2001 From: James Nugent Date: Sat, 21 Jul 2018 17:43:13 -0500 Subject: [PATCH 1916/3316] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ac27667fe7..bde28518eb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.29.0 (Unreleased) + +ENHANCEMENTS: + +* resource/aws_instance: Add `cpu_core_count` and `cpu_threads_per_core` arguments [GH-5159] + ## 1.28.0 (July 18, 2018) FEATURES: From 55225da37e92598575ab9f4906d0a2708983bd0f Mon Sep 17 00:00:00 2001 From: Florian Sellmayr Date: Sun, 22 Jul 2018 11:54:09 +0700 Subject: [PATCH 1917/3316] r/aws_lambda_event_source_mapping: Infer enabled status from State attribute --- ...esource_aws_lambda_event_source_mapping.go | 8 ++ ...ce_aws_lambda_event_source_mapping_test.go | 80 +++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/aws/resource_aws_lambda_event_source_mapping.go b/aws/resource_aws_lambda_event_source_mapping.go index 8b20bb94997..feb37a5f812 100644 --- a/aws/resource_aws_lambda_event_source_mapping.go +++ b/aws/resource_aws_lambda_event_source_mapping.go @@ -191,6 +191,14 @@ func resourceAwsLambdaEventSourceMappingRead(d *schema.ResourceData, meta interf d.Set("uuid", eventSourceMappingConfiguration.UUID) d.Set("function_name", eventSourceMappingConfiguration.FunctionArn) + if *eventSourceMappingConfiguration.State == "Enabled" { + d.Set("enabled", true) + } else if *eventSourceMappingConfiguration.State == "Disabled" { + d.Set("enabled", false) + } else { + log.Printf("[DEBUG] Lambda event source mapping is neither enabled nor disabled but %s", *eventSourceMappingConfiguration.State) + } + return nil } diff --git a/aws/resource_aws_lambda_event_source_mapping_test.go b/aws/resource_aws_lambda_event_source_mapping_test.go index 06661465338..6bc17e3bbf2 100644 --- a/aws/resource_aws_lambda_event_source_mapping_test.go +++ b/aws/resource_aws_lambda_event_source_mapping_test.go @@ -230,6 +230,86 @@ func TestAccAWSLambdaEventSourceMapping_sqsDisappears(t *testing.T) { }) } +func TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected(t *testing.T) { + var conf lambda.EventSourceMappingConfiguration + + rString := acctest.RandString(8) + roleName := fmt.Sprintf("tf_acc_role_lambda_sqs_import_%s", rString) + policyName := fmt.Sprintf("tf_acc_policy_lambda_sqs_import_%s", rString) + attName := fmt.Sprintf("tf_acc_att_lambda_sqs_import_%s", rString) + streamName := fmt.Sprintf("tf_acc_stream_lambda_sqs_import_%s", rString) + funcName := fmt.Sprintf("tf_acc_lambda_sqs_import_%s", rString) + uFuncName := fmt.Sprintf("tf_acc_lambda_sqs_import_updated_%s", rString) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSLambdaEventSourceMappingConfig_sqs(roleName, policyName, attName, streamName, funcName, uFuncName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsLambdaEventSourceMappingExists("aws_lambda_event_source_mapping.lambda_event_source_mapping_test", &conf), + testAccCheckAWSLambdaEventSourceMappingIsBeingDisabled(&conf), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + +func testAccCheckAWSLambdaEventSourceMappingIsBeingDisabled(conf *lambda.EventSourceMappingConfiguration) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).lambdaconn + // Disable enabled state + err := resource.Retry(10*time.Minute, func() *resource.RetryError { + params := &lambda.UpdateEventSourceMappingInput{ + UUID: conf.UUID, + Enabled: aws.Bool(false), + } + + _, err := conn.UpdateEventSourceMapping(params) + + if err != nil { + cgw, ok := err.(awserr.Error) + if ok && cgw.Code() == lambda.ErrCodeResourceInUseException { + return resource.RetryableError(fmt.Errorf( + "Waiting for Lambda Event Source Mapping to be ready to be updated: %v", conf.UUID)) + } + + return resource.NonRetryableError( + fmt.Errorf("Error updating Lambda Event Source Mapping: %s", err)) + } + + return nil + }) + + if err != nil { + return err + } + + // wait for state to be propagated + return resource.Retry(10*time.Minute, func() *resource.RetryError { + params := &lambda.GetEventSourceMappingInput{ + UUID: conf.UUID, + } + newConf, err := conn.GetEventSourceMapping(params) + if err != nil { + return resource.NonRetryableError( + fmt.Errorf("Error getting Lambda Event Source Mapping: %s", err)) + } + + if *newConf.State != "Disabled" { + return resource.RetryableError(fmt.Errorf( + "Waiting to get Lambda Event Source Mapping to be fully enabled, it's currently %s: %v", *newConf.State, conf.UUID)) + + } + + return nil + }) + + } +} + func testAccCheckAWSLambdaEventSourceMappingDisappears(conf *lambda.EventSourceMappingConfiguration) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).lambdaconn From 67a778323c3a8a5bc2bc085baa8806d18fb62b02 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sun, 22 Jul 2018 20:29:15 +0400 Subject: [PATCH 1918/3316] fix the error setting configurations_json --- aws/resource_aws_emr_cluster.go | 13 +++++++++++-- aws/resource_aws_emr_cluster_test.go | 2 -- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index 1ea96f534bf..545c6c60a27 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" "github.com/aws/aws-sdk-go/service/emr" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -685,8 +686,8 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[ERR] Error setting EMR configurations for cluster (%s): %s", d.Id(), err) } - if err := d.Set("configurations_json", cluster.Configurations); err != nil { - log.Printf("[ERR] Error setting EMR configurations_json for cluster (%s): %s", d.Id(), err) + if err := d.Set("configurations_json", flattenConfigurationJson(cluster.Configurations)); err != nil { + return fmt.Errorf("Error setting EMR configurations_json for cluster (%s): %s", d.Id(), err) } if err := d.Set("ec2_attributes", flattenEc2Attributes(cluster.Ec2InstanceAttributes)); err != nil { @@ -1372,6 +1373,14 @@ func expandConfigurationJson(input string) []*emr.Configuration { return configsOut } +func flattenConfigurationJson(config []*emr.Configuration) string { + out, err := jsonutil.BuildJSON(config) + if err != nil { + log.Printf("[ERROR] reading configurations for configurations_json: %s", err) + } + return string(out) +} + func expandConfigures(input string) []*emr.Configuration { configsOut := []*emr.Configuration{} if strings.HasPrefix(input, "http") { diff --git a/aws/resource_aws_emr_cluster_test.go b/aws/resource_aws_emr_cluster_test.go index 05505290045..a1f373036d3 100644 --- a/aws/resource_aws_emr_cluster_test.go +++ b/aws/resource_aws_emr_cluster_test.go @@ -1466,7 +1466,6 @@ resource "aws_emr_cluster" "tf-test-cluster" { "Configurations": [ { "Classification": "export", - "Configurations": [], "Properties": { "JAVA_HOME": "/usr/lib/jvm/java-1.8.0" } @@ -1479,7 +1478,6 @@ resource "aws_emr_cluster" "tf-test-cluster" { "Configurations": [ { "Classification": "export", - "Configurations": [], "Properties": { "JAVA_HOME": "/usr/lib/jvm/java-1.8.0" } From 83425c00a4ed55e569c2131474bd0808a5a7628b Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sun, 22 Jul 2018 22:11:40 +0400 Subject: [PATCH 1919/3316] make attributes conflicts with each other --- aws/resource_aws_emr_cluster.go | 31 +++++++++----- aws/resource_aws_emr_cluster_test.go | 62 ---------------------------- 2 files changed, 20 insertions(+), 73 deletions(-) diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index 545c6c60a27..4ea19bcf2da 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -347,14 +347,16 @@ func resourceAwsEMRCluster() *schema.Resource { }, "tags": tagsSchema(), "configurations": { - Type: schema.TypeString, - ForceNew: true, - Optional: true, + Type: schema.TypeString, + ForceNew: true, + Optional: true, + ConflictsWith: []string{"configurations_json"}, }, "configurations_json": { Type: schema.TypeString, Optional: true, ForceNew: true, + ConflictsWith: []string{"configurations"}, ValidateFunc: validateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { @@ -559,7 +561,10 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("configurations_json contains an invalid JSON: %v", err) } - params.Configurations = expandConfigurationJson(info) + params.Configurations, err = expandConfigurationJson(info) + if err != nil { + return fmt.Errorf("Error reading EMR configurations_json: %s", err) + } } if v, ok := d.GetOk("kerberos_attributes"); ok { @@ -686,7 +691,11 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[ERR] Error setting EMR configurations for cluster (%s): %s", d.Id(), err) } - if err := d.Set("configurations_json", flattenConfigurationJson(cluster.Configurations)); err != nil { + configOut, err := flattenConfigurationJson(cluster.Configurations) + if err != nil { + return fmt.Errorf("Error reading EMR cluster configurations: %s", err) + } + if err := d.Set("configurations_json", configOut); err != nil { return fmt.Errorf("Error setting EMR configurations_json for cluster (%s): %s", d.Id(), err) } @@ -1362,23 +1371,23 @@ func expandAutoScalingPolicy(rawDefinitions string) (*emr.AutoScalingPolicy, err return policy, nil } -func expandConfigurationJson(input string) []*emr.Configuration { +func expandConfigurationJson(input string) ([]*emr.Configuration, error) { configsOut := []*emr.Configuration{} err := json.Unmarshal([]byte(input), &configsOut) if err != nil { - log.Printf("[ERROR] parsing JSON: %s", err) + return nil, err } log.Printf("[DEBUG] Expanded EMR Configurations %s", configsOut) - return configsOut + return configsOut, nil } -func flattenConfigurationJson(config []*emr.Configuration) string { +func flattenConfigurationJson(config []*emr.Configuration) (string, error) { out, err := jsonutil.BuildJSON(config) if err != nil { - log.Printf("[ERROR] reading configurations for configurations_json: %s", err) + return "", err } - return string(out) + return string(out), nil } func expandConfigures(input string) []*emr.Configuration { diff --git a/aws/resource_aws_emr_cluster_test.go b/aws/resource_aws_emr_cluster_test.go index a1f373036d3..ea5764bc08b 100644 --- a/aws/resource_aws_emr_cluster_test.go +++ b/aws/resource_aws_emr_cluster_test.go @@ -1433,8 +1433,6 @@ resource "aws_emr_cluster" "tf-test-cluster" { ec2_attributes { subnet_id = "${aws_subnet.main.id}" - emr_managed_master_security_group = "${aws_security_group.allow_all.id}" - emr_managed_slave_security_group = "${aws_security_group.allow_all.id}" instance_profile = "${aws_iam_instance_profile.emr_profile.arn}" } @@ -1442,13 +1440,6 @@ resource "aws_emr_cluster" "tf-test-cluster" { core_instance_type = "c4.large" core_instance_count = 1 - tags { - role = "rolename" - dns_zone = "env_zone" - env = "env" - name = "name-env" - } - keep_job_flow_alive_when_no_steps = true termination_protection = false @@ -1491,40 +1482,9 @@ EOF depends_on = ["aws_main_route_table_association.a"] service_role = "${aws_iam_role.iam_emr_default_role.arn}" - autoscaling_role = "${aws_iam_role.emr-autoscaling-role.arn}" ebs_root_volume_size = 21 } -resource "aws_security_group" "allow_all" { - name = "allow_all_%[1]d" - description = "Allow all inbound traffic" - vpc_id = "${aws_vpc.main.id}" - - ingress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } - - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } - - depends_on = ["aws_subnet.main"] - - lifecycle { - ignore_changes = ["ingress", "egress"] - } - - tags { - Name = "emr_test" - } -} - resource "aws_vpc" "main" { cidr_block = "168.31.0.0/16" enable_dns_hostnames = true @@ -1730,28 +1690,6 @@ resource "aws_iam_policy" "iam_emr_profile_policy" { } EOT } - -# IAM Role for autoscaling -resource "aws_iam_role" "emr-autoscaling-role" { - name = "EMR_AutoScaling_DefaultRole_%[1]d" - assume_role_policy = "${data.aws_iam_policy_document.emr-autoscaling-role-policy.json}" -} - -data "aws_iam_policy_document" "emr-autoscaling-role-policy" { - statement { - effect = "Allow" - actions = ["sts:AssumeRole"] - principals = { - type = "Service" - identifiers = ["elasticmapreduce.amazonaws.com","application-autoscaling.amazonaws.com"] - } - } -} - -resource "aws_iam_role_policy_attachment" "emr-autoscaling-role" { - role = "${aws_iam_role.emr-autoscaling-role.name}" - policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforAutoScalingRole" -} `, r) } From 904b1e8740997445442e6cf4b10d12567b460da2 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Sun, 22 Jul 2018 23:04:17 +0400 Subject: [PATCH 1920/3316] fix test case for configurations_json --- aws/resource_aws_emr_cluster_test.go | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/aws/resource_aws_emr_cluster_test.go b/aws/resource_aws_emr_cluster_test.go index ea5764bc08b..13c5f251d7e 100644 --- a/aws/resource_aws_emr_cluster_test.go +++ b/aws/resource_aws_emr_cluster_test.go @@ -1433,6 +1433,8 @@ resource "aws_emr_cluster" "tf-test-cluster" { ec2_attributes { subnet_id = "${aws_subnet.main.id}" + emr_managed_master_security_group = "${aws_security_group.allow_all.id}" + emr_managed_slave_security_group = "${aws_security_group.allow_all.id}" instance_profile = "${aws_iam_instance_profile.emr_profile.arn}" } @@ -1485,6 +1487,36 @@ EOF ebs_root_volume_size = 21 } +resource "aws_security_group" "allow_all" { + name = "allow_all_%[1]d" + description = "Allow all inbound traffic" + vpc_id = "${aws_vpc.main.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + depends_on = ["aws_subnet.main"] + + lifecycle { + ignore_changes = ["ingress", "egress"] + } + + tags { + Name = "emr_test" + } +} + resource "aws_vpc" "main" { cidr_block = "168.31.0.0/16" enable_dns_hostnames = true From dc906e400bd2f0488848af3fc98634b3427789ec Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 10:58:12 -0400 Subject: [PATCH 1921/3316] vendor: aws/aws-sdk-go@v1.14.31 --- .../aws/aws-sdk-go/aws/defaults/defaults.go | 21 +- .../aws/aws-sdk-go/aws/signer/v4/v4.go | 38 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../private/protocol/json/jsonutil/build.go | 12 +- .../protocol/json/jsonutil/unmarshal.go | 12 + .../protocol/query/queryutil/queryutil.go | 7 +- .../aws-sdk-go/private/protocol/rest/build.go | 14 +- .../private/protocol/rest/unmarshal.go | 6 +- .../aws-sdk-go/private/protocol/timestamp.go | 72 + .../private/protocol/xml/xmlutil/build.go | 8 +- .../private/protocol/xml/xmlutil/unmarshal.go | 10 +- .../aws/aws-sdk-go/service/acm/api.go | 12 +- .../aws/aws-sdk-go/service/acmpca/api.go | 12 +- .../aws/aws-sdk-go/service/apigateway/api.go | 20 +- .../service/applicationautoscaling/api.go | 18 +- .../aws/aws-sdk-go/service/athena/api.go | 4 +- .../aws/aws-sdk-go/service/autoscaling/api.go | 24 +- .../aws/aws-sdk-go/service/budgets/api.go | 4 +- .../aws/aws-sdk-go/service/cloud9/api.go | 2 +- .../aws-sdk-go/service/cloudformation/api.go | 32 +- .../aws/aws-sdk-go/service/cloudfront/api.go | 24 +- .../aws/aws-sdk-go/service/cloudhsmv2/api.go | 4 +- .../aws/aws-sdk-go/service/cloudsearch/api.go | 4 +- .../aws/aws-sdk-go/service/cloudtrail/api.go | 26 +- .../aws/aws-sdk-go/service/cloudwatch/api.go | 24 +- .../service/cloudwatchevents/api.go | 2 +- .../aws/aws-sdk-go/service/codebuild/api.go | 14 +- .../aws/aws-sdk-go/service/codecommit/api.go | 14 +- .../aws/aws-sdk-go/service/codedeploy/api.go | 34 +- .../aws-sdk-go/service/codepipeline/api.go | 30 +- .../aws-sdk-go/service/cognitoidentity/api.go | 6 +- .../service/cognitoidentityprovider/api.go | 54 +- .../aws-sdk-go/service/configservice/api.go | 78 +- .../service/databasemigrationservice/api.go | 32 +- .../aws/aws-sdk-go/service/dax/api.go | 8 +- .../aws/aws-sdk-go/service/devicefarm/api.go | 38 +- .../aws-sdk-go/service/directconnect/api.go | 4 +- .../service/directoryservice/api.go | 24 +- .../aws/aws-sdk-go/service/dlm/api.go | 4 +- .../aws/aws-sdk-go/service/dlm/doc.go | 15 +- .../aws/aws-sdk-go/service/dynamodb/api.go | 26 +- .../aws/aws-sdk-go/service/ec2/api.go | 174 +-- .../aws/aws-sdk-go/service/ecr/api.go | 12 +- .../aws/aws-sdk-go/service/ecs/api.go | 32 +- .../aws/aws-sdk-go/service/efs/api.go | 4 +- .../aws/aws-sdk-go/service/eks/api.go | 2 +- .../aws/aws-sdk-go/service/elasticache/api.go | 18 +- .../service/elasticbeanstalk/api.go | 44 +- .../service/elasticsearchservice/api.go | 6 +- .../aws/aws-sdk-go/service/elb/api.go | 2 +- .../aws/aws-sdk-go/service/elbv2/api.go | 2 +- .../aws/aws-sdk-go/service/emr/api.go | 66 +- .../aws/aws-sdk-go/service/firehose/api.go | 6 +- .../aws/aws-sdk-go/service/fms/api.go | 4 +- .../aws/aws-sdk-go/service/gamelift/api.go | 42 +- .../aws/aws-sdk-go/service/glue/api.go | 66 +- .../aws/aws-sdk-go/service/iam/api.go | 64 +- .../aws/aws-sdk-go/service/inspector/api.go | 32 +- .../aws/aws-sdk-go/service/iot/api.go | 92 +- .../aws/aws-sdk-go/service/kinesis/api.go | 10 +- .../aws/aws-sdk-go/service/kms/api.go | 14 +- .../aws/aws-sdk-go/service/lambda/api.go | 4 +- .../service/lexmodelbuildingservice/api.go | 72 +- .../aws/aws-sdk-go/service/lightsail/api.go | 42 +- .../aws-sdk-go/service/mediaconvert/api.go | 20 +- .../aws-sdk-go/service/mediapackage/api.go | 18 + .../aws/aws-sdk-go/service/mediastore/api.go | 2 +- .../aws-sdk-go/service/mediastoredata/api.go | 6 +- .../aws/aws-sdk-go/service/neptune/api.go | 28 +- .../aws-sdk-go/service/organizations/api.go | 12 +- .../aws/aws-sdk-go/service/rds/api.go | 50 +- .../aws/aws-sdk-go/service/redshift/api.go | 32 +- .../aws/aws-sdk-go/service/route53/api.go | 4 +- .../aws/aws-sdk-go/service/s3/api.go | 48 +- .../aws/aws-sdk-go/service/sagemaker/api.go | 134 +- .../aws-sdk-go/service/secretsmanager/api.go | 24 +- .../aws-sdk-go/service/servicecatalog/api.go | 24 +- .../service/servicediscovery/api.go | 8 +- .../aws/aws-sdk-go/service/ses/api.go | 12 +- .../aws/aws-sdk-go/service/sfn/api.go | 30 +- .../aws/aws-sdk-go/service/ssm/api.go | 124 +- .../aws-sdk-go/service/storagegateway/api.go | 12 +- .../aws/aws-sdk-go/service/sts/api.go | 2 +- .../aws/aws-sdk-go/service/swf/api.go | 20 +- .../aws/aws-sdk-go/service/waf/api.go | 6 +- .../aws/aws-sdk-go/service/workspaces/api.go | 4 +- vendor/vendor.json | 1164 ++++++++--------- 87 files changed, 1770 insertions(+), 1619 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 3cf1036b625..5040a2f6477 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -92,14 +92,25 @@ func Handlers() request.Handlers { func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials { return credentials.NewCredentials(&credentials.ChainProvider{ VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors), - Providers: []credentials.Provider{ - &credentials.EnvProvider{}, - &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, - RemoteCredProvider(*cfg, handlers), - }, + Providers: CredProviders(cfg, handlers), }) } +// CredProviders returns the slice of providers used in +// the default credential chain. +// +// For applications that need to use some other provider (for example use +// different environment variables for legacy reasons) but still fall back +// on the default chain of providers. This allows that default chaint to be +// automatically updated +func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Provider { + return []credentials.Provider{ + &credentials.EnvProvider{}, + &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, + RemoteCredProvider(*cfg, handlers), + } +} + const ( httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index f3586131538..8aa0681d340 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -98,25 +98,25 @@ var ignoredHeaders = rules{ var requiredSignedHeaders = rules{ whitelist{ mapRule{ - "Cache-Control": struct{}{}, - "Content-Disposition": struct{}{}, - "Content-Encoding": struct{}{}, - "Content-Language": struct{}{}, - "Content-Md5": struct{}{}, - "Content-Type": struct{}{}, - "Expires": struct{}{}, - "If-Match": struct{}{}, - "If-Modified-Since": struct{}{}, - "If-None-Match": struct{}{}, - "If-Unmodified-Since": struct{}{}, - "Range": struct{}{}, - "X-Amz-Acl": struct{}{}, - "X-Amz-Copy-Source": struct{}{}, - "X-Amz-Copy-Source-If-Match": struct{}{}, - "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, - "X-Amz-Copy-Source-If-None-Match": struct{}{}, - "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, - "X-Amz-Copy-Source-Range": struct{}{}, + "Cache-Control": struct{}{}, + "Content-Disposition": struct{}{}, + "Content-Encoding": struct{}{}, + "Content-Language": struct{}{}, + "Content-Md5": struct{}{}, + "Content-Type": struct{}{}, + "Expires": struct{}{}, + "If-Match": struct{}{}, + "If-Modified-Since": struct{}{}, + "If-None-Match": struct{}{}, + "If-Unmodified-Since": struct{}{}, + "Range": struct{}{}, + "X-Amz-Acl": struct{}{}, + "X-Amz-Copy-Source": struct{}{}, + "X-Amz-Copy-Source-If-Match": struct{}{}, + "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, + "X-Amz-Copy-Source-If-None-Match": struct{}{}, + "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, + "X-Amz-Copy-Source-Range": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index f7149d9065e..c4d155c8e86 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.14.29" +const SDKVersion = "1.14.31" diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go index ec765ba257e..864fb6704b4 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go @@ -216,7 +216,17 @@ func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) erro default: switch converted := value.Interface().(type) { case time.Time: - buf.Write(strconv.AppendInt(scratch[:0], converted.UTC().Unix(), 10)) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.UnixTimeFormatName + } + + ts := protocol.FormatTime(format, converted) + if format != protocol.UnixTimeFormatName { + ts = `"` + ts + `"` + } + + buf.WriteString(ts) case []byte: if !value.IsNil() { buf.WriteByte('"') diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go index c7e6db72c69..2f6628d4364 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go @@ -186,6 +186,17 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa return err } value.Set(reflect.ValueOf(b)) + case *time.Time: + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + t, err := protocol.ParseTime(format, d) + if err != nil { + return err + } + value.Set(reflect.ValueOf(&t)) case aws.JSONValue: // No need to use escaping as the value is a non-quoted string. v, err := protocol.DecodeJSONValue(d, protocol.NoEscape) @@ -204,6 +215,7 @@ func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTa case *float64: value.Set(reflect.ValueOf(&d)) case *time.Time: + // Time unmarshaled from a float64 can only be epoch seconds t := time.Unix(int64(d), 0).UTC() value.Set(reflect.ValueOf(&t)) default: diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go index 5ce9cba3291..75866d01218 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go @@ -233,7 +233,12 @@ func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, ta v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32)) case time.Time: const ISO8601UTC = "2006-01-02T15:04:05Z" - v.Set(name, value.UTC().Format(ISO8601UTC)) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + v.Set(name, protocol.FormatTime(format, value)) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name()) } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go index f761e0b3a5b..b34f5258a4c 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go @@ -20,11 +20,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol" ) -// RFC1123GMT is a RFC1123 (RFC822) formated timestame. This format is not -// using the standard library's time.RFC1123 due to the desire to always use -// GMT as the timezone. -const RFC1123GMT = "Mon, 2 Jan 2006 15:04:05 GMT" - // Whether the byte value can be sent without escaping in AWS URLs var noEscape [256]bool @@ -272,7 +267,14 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) case float64: str = strconv.FormatFloat(value, 'f', -1, 64) case time.Time: - str = value.UTC().Format(RFC1123GMT) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.RFC822TimeFormatName + if tag.Get("location") == "querystring" { + format = protocol.ISO8601TimeFormatName + } + } + str = protocol.FormatTime(format, value) case aws.JSONValue: if len(value) == 0 { return "", errValueNotSet diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go index 9d4e7626775..33fd53b126a 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go @@ -198,7 +198,11 @@ func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) erro } v.Set(reflect.ValueOf(&f)) case *time.Time: - t, err := time.Parse(time.RFC1123, header) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.RFC822TimeFormatName + } + t, err := protocol.ParseTime(format, header) if err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go new file mode 100644 index 00000000000..b7ed6c6f810 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go @@ -0,0 +1,72 @@ +package protocol + +import ( + "strconv" + "time" +) + +// Names of time formats supported by the SDK +const ( + RFC822TimeFormatName = "rfc822" + ISO8601TimeFormatName = "iso8601" + UnixTimeFormatName = "unixTimestamp" +) + +// Time formats supported by the SDK +const ( + // RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT + RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT" + + // RFC3339 a subset of the ISO8601 timestamp format. e.g 2014-04-29T18:30:38Z + ISO8601TimeFormat = "2006-01-02T15:04:05Z" +) + +// IsKnownTimestampFormat returns if the timestamp format name +// is know to the SDK's protocols. +func IsKnownTimestampFormat(name string) bool { + switch name { + case RFC822TimeFormatName: + fallthrough + case ISO8601TimeFormatName: + fallthrough + case UnixTimeFormatName: + return true + default: + return false + } +} + +// FormatTime returns a string value of the time. +func FormatTime(name string, t time.Time) string { + t = t.UTC() + + switch name { + case RFC822TimeFormatName: + return t.Format(RFC822TimeFormat) + case ISO8601TimeFormatName: + return t.Format(ISO8601TimeFormat) + case UnixTimeFormatName: + return strconv.FormatInt(t.Unix(), 10) + default: + panic("unknown timestamp format name, " + name) + } +} + +// ParseTime attempts to parse the time given the format. Returns +// the time if it was able to be parsed, and fails otherwise. +func ParseTime(formatName, value string) (time.Time, error) { + switch formatName { + case RFC822TimeFormatName: + return time.Parse(RFC822TimeFormat, value) + case ISO8601TimeFormatName: + return time.Parse(ISO8601TimeFormat, value) + case UnixTimeFormatName: + v, err := strconv.ParseFloat(value, 64) + if err != nil { + return time.Time{}, err + } + return time.Unix(int64(v), 0), nil + default: + panic("unknown timestamp format name, " + formatName) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go index f3e64094bbb..07764c86264 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go @@ -282,8 +282,12 @@ func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag refl case float32: str = strconv.FormatFloat(float64(converted), 'f', -1, 32) case time.Time: - const ISO8601UTC = "2006-01-02T15:04:05Z" - str = converted.UTC().Format(ISO8601UTC) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + str = protocol.FormatTime(format, converted) default: return fmt.Errorf("unsupported value for param %s: %v (%s)", tag.Get("locationName"), value.Interface(), value.Type().Name()) diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go index a6c25ba3772..ff1ef6830b9 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go @@ -9,6 +9,8 @@ import ( "strconv" "strings" "time" + + "github.com/aws/aws-sdk-go/private/protocol" ) // UnmarshalXML deserializes an xml.Decoder into the container v. V @@ -253,8 +255,12 @@ func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { } r.Set(reflect.ValueOf(&v)) case *time.Time: - const ISO8601UTC = "2006-01-02T15:04:05Z" - t, err := time.Parse(ISO8601UTC, node.Text) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.ISO8601TimeFormatName + } + + t, err := protocol.ParseTime(format, node.Text) if err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go index ebd39034574..07fa10c9442 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go @@ -1332,7 +1332,7 @@ type CertificateDetail struct { // The time at which the certificate was requested. This value exists only when // the certificate type is AMAZON_ISSUED. - CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `type:"timestamp"` // The fully qualified domain name for the certificate, such as www.example.com // or example.com. @@ -1356,7 +1356,7 @@ type CertificateDetail struct { // The date and time at which the certificate was imported. This value exists // only when the certificate type is IMPORTED. - ImportedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + ImportedAt *time.Time `type:"timestamp"` // A list of ARNs for the AWS resources that are using the certificate. A certificate // can be used by multiple AWS resources. @@ -1364,7 +1364,7 @@ type CertificateDetail struct { // The time at which the certificate was issued. This value exists only when // the certificate type is AMAZON_ISSUED. - IssuedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + IssuedAt *time.Time `type:"timestamp"` // The name of the certificate authority that issued and signed the certificate. Issuer *string `type:"string"` @@ -1379,10 +1379,10 @@ type CertificateDetail struct { KeyUsages []*KeyUsage `type:"list"` // The time after which the certificate is not valid. - NotAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + NotAfter *time.Time `type:"timestamp"` // The time before which the certificate is not valid. - NotBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + NotBefore *time.Time `type:"timestamp"` // Value that specifies whether to add the certificate to a transparency log. // Certificate transparency makes it possible to detect SSL certificates that @@ -1405,7 +1405,7 @@ type CertificateDetail struct { // The time at which the certificate was revoked. This value exists only when // the certificate status is REVOKED. - RevokedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + RevokedAt *time.Time `type:"timestamp"` // The serial number of the certificate. Serial *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go index 1987336d54f..113c0a3ad4d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -1872,24 +1872,24 @@ type CertificateAuthority struct { CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure"` // Date and time at which your private CA was created. - CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `type:"timestamp"` // Reason the request to create your private CA failed. FailureReason *string `type:"string" enum:"FailureReason"` // Date and time at which your private CA was last updated. - LastStateChangeAt *time.Time `type:"timestamp" timestampFormat:"unix"` + LastStateChangeAt *time.Time `type:"timestamp"` // Date and time after which your private CA certificate is not valid. - NotAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + NotAfter *time.Time `type:"timestamp"` // Date and time before which your private CA certificate is not valid. - NotBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + NotBefore *time.Time `type:"timestamp"` // The period during which a deleted CA can be restored. For more information, // see the PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest // operation. - RestorableUntil *time.Time `type:"timestamp" timestampFormat:"unix"` + RestorableUntil *time.Time `type:"timestamp"` // Information about the certificate revocation list (CRL) created and maintained // by your private CA. @@ -2560,7 +2560,7 @@ type DescribeCertificateAuthorityAuditReportOutput struct { AuditReportStatus *string `type:"string" enum:"AuditReportStatus"` // The date and time at which the report was created. - CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `type:"timestamp"` // Name of the S3 bucket that contains the report. S3BucketName *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index b1a63ebd903..4d6ae02d39d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -11462,7 +11462,7 @@ type ApiKey struct { _ struct{} `type:"structure"` // The timestamp when the API Key was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // An AWS Marketplace customer identifier , when integrating with the AWS SaaS // Marketplace. @@ -11478,7 +11478,7 @@ type ApiKey struct { Id *string `locationName:"id" type:"string"` // The timestamp when the API Key was last updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the API Key. Name *string `locationName:"name" type:"string"` @@ -11861,13 +11861,13 @@ type ClientCertificate struct { ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` // The timestamp when the client certificate was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The description of the client certificate. Description *string `locationName:"description" type:"string"` // The timestamp when the client certificate will expire. - ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp" timestampFormat:"unix"` + ExpirationDate *time.Time `locationName:"expirationDate" type:"timestamp"` // The PEM-encoded public key of the client certificate, which can be used to // configure certificate authentication in the integration endpoint . @@ -14757,7 +14757,7 @@ type Deployment struct { ApiSummary map[string]map[string]*MethodSnapshot `locationName:"apiSummary" type:"map"` // The date and time that the deployment resource was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The description for the deployment resource. Description *string `locationName:"description" type:"string"` @@ -15024,7 +15024,7 @@ type DocumentationVersion struct { _ struct{} `type:"structure"` // The date when the API documentation snapshot is created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The description of the API documentation snapshot. Description *string `locationName:"description" type:"string"` @@ -15087,7 +15087,7 @@ type DomainName struct { // The timestamp when the certificate that was used by edge-optimized endpoint // for this domain name was uploaded. - CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"unix"` + CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp"` // The domain name of the Amazon CloudFront distribution associated with this // custom domain name for an edge-optimized endpoint. You set up this association @@ -21252,7 +21252,7 @@ type RestApi struct { BinaryMediaTypes []*string `locationName:"binaryMediaTypes" type:"list"` // The timestamp when the API was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The API's description. Description *string `locationName:"description" type:"string"` @@ -21501,7 +21501,7 @@ type Stage struct { ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` // The timestamp when the stage was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The identifier of the Deployment that the stage points to. DeploymentId *string `locationName:"deploymentId" type:"string"` @@ -21513,7 +21513,7 @@ type Stage struct { DocumentationVersion *string `locationName:"documentationVersion" type:"string"` // The timestamp when the stage last updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // A map that defines the method settings for a Stage resource. Keys (designated // as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go index 9cfbb0c5f7b..e2cbccd4b8a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go @@ -2907,7 +2907,7 @@ type PutScheduledActionInput struct { _ struct{} `type:"structure"` // The date and time for the scheduled action to end. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The identifier of the resource associated with the scheduled action. This // string consists of the resource type and unique identifier. @@ -3019,7 +3019,7 @@ type PutScheduledActionInput struct { ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` // The date and time for the scheduled action to start. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -3316,7 +3316,7 @@ type ScalableTarget struct { // The Unix timestamp for when the scalable target was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The maximum value to scale to in response to a scale out event. // @@ -3524,7 +3524,7 @@ type ScalingActivity struct { Details *string `type:"string"` // The Unix timestamp for when the scaling activity ended. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The identifier of the resource associated with the scaling activity. This // string consists of the resource type and unique identifier. @@ -3610,7 +3610,7 @@ type ScalingActivity struct { // The Unix timestamp for when the scaling activity began. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` // Indicates the status of the scaling activity. // @@ -3707,7 +3707,7 @@ type ScalingPolicy struct { // The Unix timestamp for when the scaling policy was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the scaling policy. // @@ -3889,10 +3889,10 @@ type ScheduledAction struct { // The date and time that the scheduled action was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The date and time that the action is scheduled to end. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The identifier of the resource associated with the scaling policy. This string // consists of the resource type and unique identifier. @@ -4010,7 +4010,7 @@ type ScheduledAction struct { ServiceNamespace *string `type:"string" required:"true" enum:"ServiceNamespace"` // The date and time that the action is scheduled to begin. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go index 535a9905566..d79704d293a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go @@ -2212,7 +2212,7 @@ type QueryExecutionStatus struct { _ struct{} `type:"structure"` // The date and time that the query completed. - CompletionDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletionDateTime *time.Time `type:"timestamp"` // The state of query execution. SUBMITTED indicates that the query is queued // for execution. RUNNING indicates that the query is scanning data and returning @@ -2225,7 +2225,7 @@ type QueryExecutionStatus struct { StateChangeReason *string `type:"string"` // The date and time that the query was submitted. - SubmissionDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + SubmissionDateTime *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index 1f1826493ba..4a973fa4dbb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -5112,7 +5112,7 @@ type Activity struct { Details *string `type:"string"` // The end time of the activity. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // A value between 0 and 100 that indicates the progress of the activity. Progress *int64 `type:"integer"` @@ -5120,7 +5120,7 @@ type Activity struct { // The start time of the activity. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` // The current status of the activity. // @@ -8018,7 +8018,7 @@ type DescribeScheduledActionsInput struct { // The latest scheduled start time to return. If scheduled action names are // provided, this parameter is ignored. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // The maximum number of items to return with this call. The default value is // 50 and the maximum value is 100. @@ -8039,7 +8039,7 @@ type DescribeScheduledActionsInput struct { // The earliest scheduled start time to return. If scheduled action names are // provided, this parameter is ignored. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -9143,7 +9143,7 @@ type Group struct { // The date and time the group was created. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. @@ -9625,7 +9625,7 @@ type LaunchConfiguration struct { // The creation date and time for the launch configuration. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // Controls whether the instance is optimized for EBS I/O (true) or not (false). EbsOptimized *bool `type:"boolean"` @@ -11007,7 +11007,7 @@ type PutScheduledUpdateGroupActionInput struct { // The time for the recurring schedule to end. Auto Scaling does not perform // the action after this time. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // The maximum size for the Auto Scaling group. MaxSize *int64 `type:"integer"` @@ -11032,10 +11032,10 @@ type PutScheduledUpdateGroupActionInput struct { // // If you try to schedule your action in the past, Auto Scaling returns an error // message. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // This parameter is deprecated. - Time *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Time *time.Time `type:"timestamp"` } // String returns the string representation @@ -11483,7 +11483,7 @@ type ScheduledUpdateGroupAction struct { // The date and time that the action is scheduled to end. This date and time // can be up to one month in the future. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // The maximum size of the group. MaxSize *int64 `type:"integer"` @@ -11505,10 +11505,10 @@ type ScheduledUpdateGroupAction struct { // // When StartTime and EndTime are specified with Recurrence, they form the boundaries // of when the recurring action will start and stop. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // This parameter is deprecated. - Time *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Time *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go index b1d7e099e6e..cfa8f0a62cc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go @@ -2832,7 +2832,7 @@ type TimePeriod struct { // // After the end date, AWS deletes the budget and all associated notifications // and subscribers. You can change your end date with the UpdateBudget operation. - End *time.Time `type:"timestamp" timestampFormat:"unix"` + End *time.Time `type:"timestamp"` // The start date for a budget. If you created your budget and didn't specify // a start date, AWS defaults to the start of your chosen time period (i.e. @@ -2843,7 +2843,7 @@ type TimePeriod struct { // and Cost Management console and the API. // // You can change your start date with the UpdateBudget operation. - Start *time.Time `type:"timestamp" timestampFormat:"unix"` + Start *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go index 1494b5c0285..581b2f0b971 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go @@ -1791,7 +1791,7 @@ type EnvironmentMember struct { // The time, expressed in epoch time format, when the environment member last // opened the environment. - LastAccess *time.Time `locationName:"lastAccess" type:"timestamp" timestampFormat:"unix"` + LastAccess *time.Time `locationName:"lastAccess" type:"timestamp"` // The type of environment member permissions associated with this environment // member. Available values include: diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 3cd9183900a..9d55afb7baa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -4056,7 +4056,7 @@ type ChangeSetSummary struct { ChangeSetName *string `min:"1" type:"string"` // The start time when the change set was created, in UTC. - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTime *time.Time `type:"timestamp"` // Descriptive information about the change set. Description *string `min:"1" type:"string"` @@ -5911,7 +5911,7 @@ type DescribeChangeSetOutput struct { Changes []*Change `type:"list"` // The start time when the change set was created, in UTC. - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTime *time.Time `type:"timestamp"` // Information about the change set. Description *string `min:"1" type:"string"` @@ -8922,10 +8922,10 @@ type Stack struct { // The time at which the stack was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The time the stack was deleted. - DeletionTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DeletionTime *time.Time `type:"timestamp"` // A user-defined description associated with the stack. Description *string `min:"1" type:"string"` @@ -8948,7 +8948,7 @@ type Stack struct { // The time the stack was last updated. This field will only be returned if // the stack has been updated at least once. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastUpdatedTime *time.Time `type:"timestamp"` // SNS topic ARNs to which stack related events are published. NotificationARNs []*string `type:"list"` @@ -9199,7 +9199,7 @@ type StackEvent struct { // Time the status was updated. // // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + Timestamp *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -9509,7 +9509,7 @@ type StackResource struct { // Time the status was updated. // // Timestamp is a required field - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + Timestamp *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -9586,7 +9586,7 @@ type StackResourceDetail struct { // Time the status was updated. // // LastUpdatedTimestamp is a required field - LastUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastUpdatedTimestamp *time.Time `type:"timestamp" required:"true"` // The logical name of the resource specified in the template. // @@ -9701,7 +9701,7 @@ type StackResourceSummary struct { // Time the status was updated. // // LastUpdatedTimestamp is a required field - LastUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastUpdatedTimestamp *time.Time `type:"timestamp" required:"true"` // The logical name of the resource specified in the template. // @@ -9931,12 +9931,12 @@ type StackSetOperation struct { // stacks themselves. This is because AWS CloudFormation needs to perform preparatory // work for the operation, such as dispatching the work to the requested regions, // before actually creating the first stacks. - CreationTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `type:"timestamp"` // The time at which the stack set operation ended, across all accounts and // regions specified. Note that this doesn't necessarily mean that the stack // set operation was successful, or even attempted, in each account or region. - EndTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTimestamp *time.Time `type:"timestamp"` // The name of the IAM execution role used to create or update the stack set. // @@ -10265,12 +10265,12 @@ type StackSetOperationSummary struct { // stacks themselves. This is because AWS CloudFormation needs to perform preparatory // work for the operation, such as dispatching the work to the requested regions, // before actually creating the first stacks. - CreationTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `type:"timestamp"` // The time at which the stack set operation ended, across all accounts and // regions specified. Note that this doesn't necessarily mean that the stack // set operation was successful, or even attempted, in each account or region. - EndTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTimestamp *time.Time `type:"timestamp"` // The unique ID of the stack set operation. OperationId *string `min:"1" type:"string"` @@ -10397,14 +10397,14 @@ type StackSummary struct { // The time the stack was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The time the stack was deleted. - DeletionTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DeletionTime *time.Time `type:"timestamp"` // The time the stack was last updated. This field will only be returned if // the stack has been updated at least once. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastUpdatedTime *time.Time `type:"timestamp"` // For nested stacks--stacks created as resources for another stack--the stack // ID of the direct parent of this stack. For the first level of nested stacks, diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index 3c98c555e9e..5109b4485f1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -7574,7 +7574,7 @@ type Distribution struct { // The date and time the distribution was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // This response element indicates the current status of the distribution. When // the status is Deployed, the distribution's information is fully propagated @@ -8296,7 +8296,7 @@ type DistributionSummary struct { // The date and time the distribution was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // A complex type that contains information about origins for this distribution. // @@ -8694,7 +8694,7 @@ type FieldLevelEncryption struct { // The last time the field-level encryption configuration was changed. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -8882,7 +8882,7 @@ type FieldLevelEncryptionProfile struct { // The last time the field-level encryption profile was updated. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -9076,7 +9076,7 @@ type FieldLevelEncryptionProfileSummary struct { // The time when the the field-level encryption profile summary was last updated. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // Name for the field-level encryption profile summary. // @@ -9142,7 +9142,7 @@ type FieldLevelEncryptionSummary struct { // The last time that the summary of field-level encryption items was modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // A summary of a query argument-profile mapping. QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"` @@ -10467,7 +10467,7 @@ type Invalidation struct { // The date and time the invalidation request was first made. // // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateTime *time.Time `type:"timestamp" required:"true"` // The identifier for the invalidation request. For example: IDFDVBD632BHDS5. // @@ -10686,7 +10686,7 @@ type InvalidationSummary struct { _ struct{} `type:"structure"` // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateTime *time.Time `type:"timestamp" required:"true"` // The unique ID for an invalidation request. // @@ -12268,7 +12268,7 @@ type PublicKey struct { // A time you added a public key to CloudFront. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // A unique ID assigned to a public key you've added to CloudFront. // @@ -12459,7 +12459,7 @@ type PublicKeySummary struct { // Creation time for public key information summary. // // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreatedTime *time.Time `type:"timestamp" required:"true"` // Encoded key for public key information summary. // @@ -12985,7 +12985,7 @@ type StreamingDistribution struct { Id *string `type:"string" required:"true"` // The date and time that the distribution was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModifiedTime *time.Time `type:"timestamp"` // The current status of the RTMP distribution. When the status is Deployed, // the distribution's information is propagated to all CloudFront edge locations. @@ -13400,7 +13400,7 @@ type StreamingDistributionSummary struct { // The date and time the distribution was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // PriceClass is a required field PriceClass *string `type:"string" required:"true" enum:"PriceClass"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go index 2d232f7d3b6..0a218fb4cdb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go @@ -1151,7 +1151,7 @@ type Backup struct { ClusterId *string `type:"string"` // The date and time when the backup was created. - CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTimestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -1264,7 +1264,7 @@ type Cluster struct { ClusterId *string `type:"string"` // The date and time when the cluster was created. - CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTimestamp *time.Time `type:"timestamp"` // The type of HSM that the cluster contains. HsmType *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go index 935811c9c16..2c38e711ffc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go @@ -5477,7 +5477,7 @@ type OptionStatus struct { // A timestamp for when this option was created. // // CreationDate is a required field - CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreationDate *time.Time `type:"timestamp" required:"true"` // Indicates that the option will be deleted once processing is complete. PendingDeletion *bool `type:"boolean"` @@ -5499,7 +5499,7 @@ type OptionStatus struct { // A timestamp for when this option was last updated. // // UpdateDate is a required field - UpdateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + UpdateDate *time.Time `type:"timestamp" required:"true"` // A unique integer that indicates when this option was last updated. UpdateVersion *int64 `type:"integer"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index c815f8a8bf5..2707209070f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -2296,7 +2296,7 @@ type Event struct { EventSource *string `type:"string"` // The date and time of the event returned. - EventTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EventTime *time.Time `type:"timestamp"` // A list of resources referenced by the event returned. Resources []*Resource `type:"list"` @@ -2564,7 +2564,7 @@ type GetTrailStatusOutput struct { // Displays the most recent date and time when CloudTrail delivered logs to // CloudWatch Logs. - LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"` // This field is deprecated. LatestDeliveryAttemptSucceeded *string `type:"string"` @@ -2585,7 +2585,7 @@ type GetTrailStatusOutput struct { // Specifies the date and time that CloudTrail last delivered log files to an // account's Amazon S3 bucket. - LatestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestDeliveryTime *time.Time `type:"timestamp"` // Displays any Amazon S3 error that CloudTrail encountered when attempting // to deliver a digest file to the designated bucket. For more information see @@ -2600,7 +2600,7 @@ type GetTrailStatusOutput struct { // Specifies the date and time that CloudTrail last delivered a digest file // to an account's Amazon S3 bucket. - LatestDigestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestDigestDeliveryTime *time.Time `type:"timestamp"` // This field is deprecated. LatestNotificationAttemptSucceeded *string `type:"string"` @@ -2615,15 +2615,15 @@ type GetTrailStatusOutput struct { // Specifies the date and time of the most recent Amazon SNS notification that // CloudTrail has written a new log file to an account's Amazon S3 bucket. - LatestNotificationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestNotificationTime *time.Time `type:"timestamp"` // Specifies the most recent date and time when CloudTrail started recording // API calls for an AWS account. - StartLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartLoggingTime *time.Time `type:"timestamp"` // Specifies the most recent date and time when CloudTrail stopped recording // API calls for an AWS account. - StopLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StopLoggingTime *time.Time `type:"timestamp"` // This field is deprecated. TimeLoggingStarted *string `type:"string"` @@ -2750,7 +2750,7 @@ type ListPublicKeysInput struct { // Optionally specifies, in UTC, the end of the time range to look up public // keys for CloudTrail digest files. If not specified, the current time is used. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Reserved for future use. NextToken *string `type:"string"` @@ -2758,7 +2758,7 @@ type ListPublicKeysInput struct { // Optionally specifies, in UTC, the start of the time range to look up public // keys for CloudTrail digest files. If not specified, the current time is used, // and the current public key is returned. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -2970,7 +2970,7 @@ type LookupEventsInput struct { // Specifies that only events that occur before or at the specified time are // returned. If the specified end time is before the specified start time, an // error is returned. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Contains a list of lookup attributes. Currently the list can contain only // one item. @@ -2990,7 +2990,7 @@ type LookupEventsInput struct { // Specifies that only events that occur after or at the specified time are // returned. If the specified start time is after the specified end time, an // error is returned. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -3103,10 +3103,10 @@ type PublicKey struct { Fingerprint *string `type:"string"` // The ending time of validity of the public key. - ValidityEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidityEndTime *time.Time `type:"timestamp"` // The starting time of validity of the public key. - ValidityStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidityStartTime *time.Time `type:"timestamp"` // The DER encoded public key value in PKCS#1 format. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go index 38519a2ac37..135c56d8976 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go @@ -1679,7 +1679,7 @@ type AlarmHistoryItem struct { HistorySummary *string `min:"1" type:"string"` // The time stamp for the alarm history item. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -1735,7 +1735,7 @@ type DashboardEntry struct { // The time stamp of when the dashboard was last modified, either by an API // call or through the console. This number is expressed as the number of milliseconds // since Jan 1, 1970 00:00:00 UTC. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` // The size of the dashboard, in bytes. Size *int64 `type:"long"` @@ -1832,7 +1832,7 @@ type Datapoint struct { Sum *float64 `type:"double"` // The time stamp used for the data point. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` // The standard unit for the data point. Unit *string `type:"string" enum:"StandardUnit"` @@ -2007,7 +2007,7 @@ type DescribeAlarmHistoryInput struct { AlarmName *string `min:"1" type:"string"` // The ending date to retrieve alarm history. - EndDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndDate *time.Time `type:"timestamp"` // The type of alarm histories to retrieve. HistoryItemType *string `type:"string" enum:"HistoryItemType"` @@ -2020,7 +2020,7 @@ type DescribeAlarmHistoryInput struct { NextToken *string `type:"string"` // The starting date to retrieve alarm history. - StartDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -2684,7 +2684,7 @@ type GetMetricDataInput struct { // The time stamp indicating the latest data to be returned. // // EndTime is a required field - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EndTime *time.Time `type:"timestamp" required:"true"` // The maximum number of data points the request should return before paginating. // If you omit this, the default of 100,800 is used. @@ -2711,7 +2711,7 @@ type GetMetricDataInput struct { // The time stamp indicating the earliest data to be returned. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -2842,7 +2842,7 @@ type GetMetricStatisticsInput struct { // time stamp. The time stamp must be in ISO 8601 UTC format (for example, 2016-10-10T23:00:00Z). // // EndTime is a required field - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EndTime *time.Time `type:"timestamp" required:"true"` // The percentile statistics. Specify values between p0.0 and p100. When calling // GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, @@ -2908,7 +2908,7 @@ type GetMetricStatisticsInput struct { // you receive data timestamped between 15:02:15 and 15:07:15. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` // The metric statistics, other than percentile. For percentile statistics, // use ExtendedStatistics. When calling GetMetricStatistics, you must specify @@ -3360,7 +3360,7 @@ type MetricAlarm struct { AlarmArn *string `min:"1" type:"string"` // The time stamp of the last update to the alarm configuration. - AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp"` // The description of the alarm. AlarmDescription *string `type:"string"` @@ -3416,7 +3416,7 @@ type MetricAlarm struct { StateReasonData *string `type:"string"` // The time stamp of the last update to the alarm state. - StateUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StateUpdatedTimestamp *time.Time `type:"timestamp"` // The state value for the alarm. StateValue *string `type:"string" enum:"StateValue"` @@ -3816,7 +3816,7 @@ type MetricDatum struct { // The time the metric data was received, expressed as the number of milliseconds // since Jan 1, 1970 00:00:00 UTC. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` // The unit of the metric. Unit *string `type:"string" enum:"StandardUnit"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 3fe033736ff..77a27140f6d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -2447,7 +2447,7 @@ type PutEventsRequestEntry struct { // The timestamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). // If no timestamp is provided, the timestamp of the PutEvents call is used. - Time *time.Time `type:"timestamp" timestampFormat:"unix"` + Time *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 5799a8ab95b..8337312ca45 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -1586,7 +1586,7 @@ type Build struct { CurrentPhase *string `locationName:"currentPhase" type:"string"` // When the build process ended, expressed in Unix time format. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // Information about the build environment for this build. Environment *ProjectEnvironment `locationName:"environment" type:"structure"` @@ -1629,7 +1629,7 @@ type Build struct { SourceVersion *string `locationName:"sourceVersion" min:"1" type:"string"` // When the build process started, expressed in Unix time format. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // How long, in minutes, for AWS CodeBuild to wait before timing out this build // if it does not get marked as completed. @@ -1872,7 +1872,7 @@ type BuildPhase struct { DurationInSeconds *int64 `locationName:"durationInSeconds" type:"long"` // When the build phase ended, expressed in Unix time format. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The current status of the build phase. Valid values include: // @@ -1914,7 +1914,7 @@ type BuildPhase struct { PhaseType *string `locationName:"phaseType" type:"string" enum:"BuildPhaseType"` // When the build phase started, expressed in Unix time format. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation @@ -3088,7 +3088,7 @@ type Project struct { Cache *ProjectCache `locationName:"cache" type:"structure"` // When the build project was created, expressed in Unix time format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // A description that makes the build project easy to identify. Description *string `locationName:"description" type:"string"` @@ -3105,7 +3105,7 @@ type Project struct { // When the build project's settings were last modified, expressed in Unix time // format. - LastModified *time.Time `locationName:"lastModified" type:"timestamp" timestampFormat:"unix"` + LastModified *time.Time `locationName:"lastModified" type:"timestamp"` // The name of the build project. Name *string `locationName:"name" min:"2" type:"string"` @@ -4663,7 +4663,7 @@ type Webhook struct { BranchFilter *string `locationName:"branchFilter" type:"string"` // A timestamp indicating the last time a repository's secret token was modified. - LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp" timestampFormat:"unix"` + LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp"` // The CodeBuild endpoint where webhook events are sent. PayloadUrl *string `locationName:"payloadUrl" min:"1" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index 7a4f4df26df..b52c0773214 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -4944,7 +4944,7 @@ type Comment struct { Content *string `locationName:"content" type:"string"` // The date and time the comment was created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // A Boolean value indicating whether the comment has been deleted. Deleted *bool `locationName:"deleted" type:"boolean"` @@ -4953,7 +4953,7 @@ type Comment struct { InReplyTo *string `locationName:"inReplyTo" type:"string"` // The date and time the comment was most recently modified, in timestamp format. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` } // String returns the string representation @@ -7912,7 +7912,7 @@ type PullRequest struct { ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` // The date and time the pull request was originally created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The user-defined description of the pull request. This description can be // used to clarify what should be reviewed and other details of the request. @@ -7920,7 +7920,7 @@ type PullRequest struct { // The day and time of the last user or system activity on the pull request, // in timestamp format. - LastActivityDate *time.Time `locationName:"lastActivityDate" type:"timestamp" timestampFormat:"unix"` + LastActivityDate *time.Time `locationName:"lastActivityDate" type:"timestamp"` // The system-generated ID of the pull request. PullRequestId *string `locationName:"pullRequestId" type:"string"` @@ -8012,7 +8012,7 @@ type PullRequestEvent struct { ActorArn *string `locationName:"actorArn" type:"string"` // The day and time of the pull request event, in timestamp format. - EventDate *time.Time `locationName:"eventDate" type:"timestamp" timestampFormat:"unix"` + EventDate *time.Time `locationName:"eventDate" type:"timestamp"` // The type of the pull request event, for example a status change event (PULL_REQUEST_STATUS_CHANGED) // or update event (PULL_REQUEST_SOURCE_REFERENCE_UPDATED). @@ -8569,13 +8569,13 @@ type RepositoryMetadata struct { CloneUrlSsh *string `locationName:"cloneUrlSsh" type:"string"` // The date and time the repository was created, in timestamp format. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The repository's default branch name. DefaultBranch *string `locationName:"defaultBranch" min:"1" type:"string"` // The date and time the repository was last modified, in timestamp format. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // A comment or description about the repository. RepositoryDescription *string `locationName:"repositoryDescription" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index 4c3a3c8d73a..bc68dcfd702 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -4458,7 +4458,7 @@ type ApplicationInfo struct { ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` // The time at which the application was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The name for a connection to a GitHub account. GitHubAccountName *string `locationName:"gitHubAccountName" type:"string"` @@ -6033,7 +6033,7 @@ type DeploymentConfigInfo struct { ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` // The time at which the deployment configuration was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The deployment configuration ID. DeploymentConfigId *string `locationName:"deploymentConfigId" type:"string"` @@ -6320,13 +6320,13 @@ type DeploymentInfo struct { BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` // A timestamp indicating when the deployment was complete. - CompleteTime *time.Time `locationName:"completeTime" type:"timestamp" timestampFormat:"unix"` + CompleteTime *time.Time `locationName:"completeTime" type:"timestamp"` // The destination platform type for the deployment (Lambda or Server). ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` // A timestamp indicating when the deployment was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The means by which the deployment was created: // @@ -6413,7 +6413,7 @@ type DeploymentInfo struct { // In some cases, the reported value of the start time may be later than the // complete time. This is due to differences in the clock settings of back-end // servers that participate in the deployment process. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The current state of the deployment as a whole. Status *string `locationName:"status" type:"string" enum:"DeploymentStatus"` @@ -7059,13 +7059,13 @@ type GenericRevisionInfo struct { Description *string `locationName:"description" type:"string"` // When the revision was first used by AWS CodeDeploy. - FirstUsedTime *time.Time `locationName:"firstUsedTime" type:"timestamp" timestampFormat:"unix"` + FirstUsedTime *time.Time `locationName:"firstUsedTime" type:"timestamp"` // When the revision was last used by AWS CodeDeploy. - LastUsedTime *time.Time `locationName:"lastUsedTime" type:"timestamp" timestampFormat:"unix"` + LastUsedTime *time.Time `locationName:"lastUsedTime" type:"timestamp"` // When the revision was registered with AWS CodeDeploy. - RegisterTime *time.Time `locationName:"registerTime" type:"timestamp" timestampFormat:"unix"` + RegisterTime *time.Time `locationName:"registerTime" type:"timestamp"` } // String returns the string representation @@ -7701,7 +7701,7 @@ type InstanceInfo struct { // If the on-premises instance was deregistered, the time at which the on-premises // instance was deregistered. - DeregisterTime *time.Time `locationName:"deregisterTime" type:"timestamp" timestampFormat:"unix"` + DeregisterTime *time.Time `locationName:"deregisterTime" type:"timestamp"` // The ARN of the IAM session associated with the on-premises instance. IamSessionArn *string `locationName:"iamSessionArn" type:"string"` @@ -7716,7 +7716,7 @@ type InstanceInfo struct { InstanceName *string `locationName:"instanceName" type:"string"` // The time at which the on-premises instance was registered. - RegisterTime *time.Time `locationName:"registerTime" type:"timestamp" timestampFormat:"unix"` + RegisterTime *time.Time `locationName:"registerTime" type:"timestamp"` // The tags currently associated with the on-premises instance. Tags []*Tag `locationName:"tags" type:"list"` @@ -7793,7 +7793,7 @@ type InstanceSummary struct { InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // A timestamp indicating when the instance information was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // A list of lifecycle events for this instance. LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` @@ -7867,14 +7867,14 @@ type LastDeploymentInfo struct { // A timestamp indicating when the most recent deployment to the deployment // group started. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The deployment ID. DeploymentId *string `locationName:"deploymentId" type:"string"` // A timestamp indicating when the most recent deployment to the deployment // group completed. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The status of the most recent deployment. Status *string `locationName:"status" type:"string" enum:"DeploymentStatus"` @@ -7922,14 +7922,14 @@ type LifecycleEvent struct { Diagnostics *Diagnostics `locationName:"diagnostics" type:"structure"` // A timestamp indicating when the deployment lifecycle event ended. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, // AfterInstall, ApplicationStart, or ValidateService. LifecycleEventName *string `locationName:"lifecycleEventName" type:"string"` // A timestamp indicating when the deployment lifecycle event started. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The deployment lifecycle event status: // @@ -9783,12 +9783,12 @@ type TimeRange struct { // The end time of the time range. // // Specify null to leave the end time open-ended. - End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"unix"` + End *time.Time `locationName:"end" type:"timestamp"` // The start time of the time range. // // Specify null to leave the start time open-ended. - Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"unix"` + Start *time.Time `locationName:"start" type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index 466db4a05d6..95f1724f1d1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -3395,7 +3395,7 @@ type ActionExecution struct { ExternalExecutionUrl *string `locationName:"externalExecutionUrl" min:"1" type:"string"` // The last status change of the action. - LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp" timestampFormat:"unix"` + LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp"` // The ARN of the user who last changed the pipeline. LastUpdatedBy *string `locationName:"lastUpdatedBy" type:"string"` @@ -3489,7 +3489,7 @@ type ActionRevision struct { // in timestamp format. // // Created is a required field - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix" required:"true"` + Created *time.Time `locationName:"created" type:"timestamp" required:"true"` // The unique identifier of the change that set the state to this revision, // for example a deployment ID or timestamp. @@ -4049,7 +4049,7 @@ type ArtifactRevision struct { // The date and time when the most recent revision of the artifact was created, // in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The name of an artifact. This name might be system-generated, such as "MyApp", // or might be defined by the user when an action is created. @@ -4509,7 +4509,7 @@ type CurrentRevision struct { // The date and time when the most recent revision of the artifact was created, // in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The revision ID of the current version of an artifact. // @@ -5535,7 +5535,7 @@ type GetPipelineStateOutput struct { _ struct{} `type:"structure"` // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The name of the pipeline for which you want to get the state. PipelineName *string `locationName:"pipelineName" min:"1" type:"string"` @@ -5550,7 +5550,7 @@ type GetPipelineStateOutput struct { StageStates []*StageState `locationName:"stageStates" type:"list"` // The date and time the pipeline was last updated, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` + Updated *time.Time `locationName:"updated" type:"timestamp"` } // String returns the string representation @@ -6199,7 +6199,7 @@ type ListWebhookItem struct { // The date and time a webhook was last successfully triggered, in timestamp // format. - LastTriggered *time.Time `locationName:"lastTriggered" type:"timestamp" timestampFormat:"unix"` + LastTriggered *time.Time `locationName:"lastTriggered" type:"timestamp"` // A unique URL generated by CodePipeline. When a POST request is made to this // URL, the defined pipeline is started as long as the body of the post request @@ -6625,7 +6625,7 @@ type PipelineExecutionSummary struct { // The date and time of the last change to the pipeline execution, in timestamp // format. - LastUpdateTime *time.Time `locationName:"lastUpdateTime" type:"timestamp" timestampFormat:"unix"` + LastUpdateTime *time.Time `locationName:"lastUpdateTime" type:"timestamp"` // The ID of the pipeline execution. PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` @@ -6633,7 +6633,7 @@ type PipelineExecutionSummary struct { SourceRevisions []*SourceRevision `locationName:"sourceRevisions" type:"list"` // The date and time when the pipeline execution began, in timestamp format. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The status of the pipeline execution. // @@ -6694,13 +6694,13 @@ type PipelineMetadata struct { _ struct{} `type:"structure"` // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The Amazon Resource Name (ARN) of the pipeline. PipelineArn *string `locationName:"pipelineArn" type:"string"` // The date and time the pipeline was last updated, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` + Updated *time.Time `locationName:"updated" type:"timestamp"` } // String returns the string representation @@ -6736,13 +6736,13 @@ type PipelineSummary struct { _ struct{} `type:"structure"` // The date and time the pipeline was created, in timestamp format. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The name of the pipeline. Name *string `locationName:"name" min:"1" type:"string"` // The date and time of the last update to the pipeline, in timestamp format. - Updated *time.Time `locationName:"updated" type:"timestamp" timestampFormat:"unix"` + Updated *time.Time `locationName:"updated" type:"timestamp"` // The version number of the pipeline. Version *int64 `locationName:"version" min:"1" type:"integer"` @@ -7200,7 +7200,7 @@ type PutApprovalResultOutput struct { _ struct{} `type:"structure"` // The timestamp showing when the approval or rejection was submitted. - ApprovedAt *time.Time `locationName:"approvedAt" type:"timestamp" timestampFormat:"unix"` + ApprovedAt *time.Time `locationName:"approvedAt" type:"timestamp"` } // String returns the string representation @@ -8383,7 +8383,7 @@ type TransitionState struct { Enabled *bool `locationName:"enabled" type:"boolean"` // The timestamp when the transition state was last changed. - LastChangedAt *time.Time `locationName:"lastChangedAt" type:"timestamp" timestampFormat:"unix"` + LastChangedAt *time.Time `locationName:"lastChangedAt" type:"timestamp"` // The ID of the user who last changed the transition state. LastChangedBy *string `locationName:"lastChangedBy" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go index 022ada85fdc..e666f732887 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go @@ -1970,7 +1970,7 @@ type Credentials struct { AccessKeyId *string `type:"string"` // The date at which these credentials will expire. - Expiration *time.Time `type:"timestamp" timestampFormat:"unix"` + Expiration *time.Time `type:"timestamp"` // The Secret Access Key portion of the credentials SecretKey *string `type:"string"` @@ -2728,13 +2728,13 @@ type IdentityDescription struct { _ struct{} `type:"structure"` // Date on which the identity was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // A unique identifier in the format REGION:GUID. IdentityId *string `min:"1" type:"string"` // Date on which the identity was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // A set of optional name-value pairs that map provider names to provider tokens. Logins []*string `type:"list"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index 0a86e0c2e02..a8f24acbe44 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -11486,10 +11486,10 @@ type AdminGetUserOutput struct { UserAttributes []*AttributeType `type:"list"` // The date the user was created. - UserCreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserCreateDate *time.Time `type:"timestamp"` // The date the user was last modified. - UserLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserLastModifiedDate *time.Time `type:"timestamp"` // The list of the user's MFA settings. UserMFASettingList []*string `type:"list"` @@ -13475,7 +13475,7 @@ type AuthEventType struct { ChallengeResponses []*ChallengeResponseType `type:"list"` // The creation date - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The user context data captured at the time of an event request. It provides // additional information about the client from which event the request is received. @@ -16612,16 +16612,16 @@ type DeviceType struct { DeviceAttributes []*AttributeType `type:"list"` // The creation date of the device. - DeviceCreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeviceCreateDate *time.Time `type:"timestamp"` // The device key. DeviceKey *string `min:"1" type:"string"` // The date in which the device was last authenticated. - DeviceLastAuthenticatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeviceLastAuthenticatedDate *time.Time `type:"timestamp"` // The last modified date of the device. - DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeviceLastModifiedDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -16853,7 +16853,7 @@ type EventFeedbackType struct { _ struct{} `type:"structure"` // The event feedback date. - FeedbackDate *time.Time `type:"timestamp" timestampFormat:"unix"` + FeedbackDate *time.Time `type:"timestamp"` // The event feedback value. // @@ -17907,7 +17907,7 @@ type GroupType struct { _ struct{} `type:"structure"` // The date the group was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // A string containing the description of the group. Description *string `type:"string"` @@ -17916,7 +17916,7 @@ type GroupType struct { GroupName *string `min:"1" type:"string"` // The date the group was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // A nonnegative integer value that specifies the precedence of this group relative // to the other groups that a user can belong to in the user pool. If a user @@ -18035,13 +18035,13 @@ type IdentityProviderType struct { AttributeMapping map[string]*string `type:"map"` // The date the identity provider was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // A list of identity provider identifiers. IdpIdentifiers []*string `type:"list"` // The date the identity provider was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The identity provider details, such as MetadataURL and MetadataFile. ProviderDetails map[string]*string `type:"map"` @@ -19869,10 +19869,10 @@ type ProviderDescription struct { _ struct{} `type:"structure"` // The date the provider was added to the user pool. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The date the provider was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The identity provider name. ProviderName *string `min:"1" type:"string"` @@ -20386,7 +20386,7 @@ type RiskConfigurationType struct { CompromisedCredentialsRiskConfiguration *CompromisedCredentialsRiskConfigurationType `type:"structure"` // The last modified date. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The configuration to override the risk decision. RiskExceptionConfiguration *RiskExceptionConfigurationType `type:"structure"` @@ -21658,13 +21658,13 @@ type UICustomizationType struct { ClientId *string `min:"1" type:"string"` // The creation date for the UI customization. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The logo image for the UI customization. ImageUrl *string `type:"string"` // The last-modified date for the UI customization. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The user pool ID for the user pool. UserPoolId *string `min:"1" type:"string"` @@ -22890,13 +22890,13 @@ type UserImportJobType struct { CloudWatchLogsRoleArn *string `min:"20" type:"string"` // The date when the user import job was completed. - CompletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletionDate *time.Time `type:"timestamp"` // The message returned when the user import job is completed. CompletionMessage *string `min:"1" type:"string"` // The date the user import job was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The number of users that could not be imported. FailedUsers *int64 `type:"long"` @@ -22917,7 +22917,7 @@ type UserImportJobType struct { SkippedUsers *int64 `type:"long"` // The date when the user import job was started. - StartDate *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDate *time.Time `type:"timestamp"` // The status of the user import job. One of the following: // @@ -23165,7 +23165,7 @@ type UserPoolClientType struct { ClientSecret *string `min:"1" type:"string"` // The date the user pool client was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The default redirect URI. Must be in the CallbackURLs list. // @@ -23186,7 +23186,7 @@ type UserPoolClientType struct { ExplicitAuthFlows []*string `type:"list"` // The date the user pool client was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // A list of allowed logout URLs for the identity providers. LogoutURLs []*string `type:"list"` @@ -23332,7 +23332,7 @@ type UserPoolDescriptionType struct { _ struct{} `type:"structure"` // The date the user pool description was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The ID in a user pool description. Id *string `min:"1" type:"string"` @@ -23341,7 +23341,7 @@ type UserPoolDescriptionType struct { LambdaConfig *LambdaConfigType `type:"structure"` // The date the user pool description was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // The name in a user pool description. Name *string `min:"1" type:"string"` @@ -23452,7 +23452,7 @@ type UserPoolType struct { AutoVerifiedAttributes []*string `type:"list"` // The date the user pool was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The device configuration. DeviceConfiguration *DeviceConfigurationType `type:"structure"` @@ -23482,7 +23482,7 @@ type UserPoolType struct { LambdaConfig *LambdaConfigType `type:"structure"` // The date the user pool was last modified. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // Can be one of the following values: // @@ -23726,10 +23726,10 @@ type UserType struct { MFAOptions []*MFAOptionType `type:"list"` // The creation date of the user. - UserCreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserCreateDate *time.Time `type:"timestamp"` // The last modified date of the user. - UserLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UserLastModifiedDate *time.Time `type:"timestamp"` // The user status. Can be one of the following: // diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index 2b9dfc548a8..b8bdc96412f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -4255,13 +4255,13 @@ type AggregateEvaluationResult struct { ComplianceType *string `type:"string" enum:"ComplianceType"` // The time when the AWS Config rule evaluated the AWS resource. - ConfigRuleInvokedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ConfigRuleInvokedTime *time.Time `type:"timestamp"` // Uniquely identifies the evaluation result. EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` // The time when AWS Config recorded the aggregate evaluation result. - ResultRecordedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResultRecordedTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -4341,7 +4341,7 @@ type AggregatedSourceStatus struct { LastUpdateStatus *string `type:"string" enum:"AggregatedSourceStatusType"` // The time of the last update. - LastUpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateTime *time.Time `type:"timestamp"` // The source account ID or an organization. SourceId *string `type:"string"` @@ -4417,7 +4417,7 @@ type AggregationAuthorization struct { AuthorizedAwsRegion *string `min:"1" type:"string"` // The time stamp when the aggregation authorization was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -4474,7 +4474,7 @@ type BaseConfigurationItem struct { Configuration *string `locationName:"configuration" type:"string"` // The time when the configuration recording was initiated. - ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp" timestampFormat:"unix"` + ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` // The configuration item status. ConfigurationItemStatus *string `locationName:"configurationItemStatus" type:"string" enum:"ConfigurationItemStatus"` @@ -4484,10 +4484,10 @@ type BaseConfigurationItem struct { ConfigurationStateId *string `locationName:"configurationStateId" type:"string"` // The time stamp when the resource was created. - ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp" timestampFormat:"unix"` + ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` // The ID of the resource (for example., sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` @@ -4855,7 +4855,7 @@ type ComplianceSummary struct { _ struct{} `type:"structure"` // The time that AWS Config created the compliance summary. - ComplianceSummaryTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + ComplianceSummaryTimestamp *time.Time `type:"timestamp"` // The number of AWS Config rules or AWS resources that are compliant, up to // a maximum of 25 for rules and 100 for resources. @@ -4936,7 +4936,7 @@ type ConfigExportDeliveryInfo struct { _ struct{} `type:"structure"` // The time of the last attempted delivery. - LastAttemptTime *time.Time `locationName:"lastAttemptTime" type:"timestamp" timestampFormat:"unix"` + LastAttemptTime *time.Time `locationName:"lastAttemptTime" type:"timestamp"` // The error code from the last attempted delivery. LastErrorCode *string `locationName:"lastErrorCode" type:"string"` @@ -4948,10 +4948,10 @@ type ConfigExportDeliveryInfo struct { LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` // The time of the last successful delivery. - LastSuccessfulTime *time.Time `locationName:"lastSuccessfulTime" type:"timestamp" timestampFormat:"unix"` + LastSuccessfulTime *time.Time `locationName:"lastSuccessfulTime" type:"timestamp"` // The time that the next delivery occurs. - NextDeliveryTime *time.Time `locationName:"nextDeliveryTime" type:"timestamp" timestampFormat:"unix"` + NextDeliveryTime *time.Time `locationName:"nextDeliveryTime" type:"timestamp"` } // String returns the string representation @@ -5308,7 +5308,7 @@ type ConfigRuleEvaluationStatus struct { ConfigRuleName *string `min:"1" type:"string"` // The time that you first activated the AWS Config rule. - FirstActivatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + FirstActivatedTime *time.Time `type:"timestamp"` // Indicates whether AWS Config has evaluated your resources against the rule // at least once. @@ -5328,19 +5328,19 @@ type ConfigRuleEvaluationStatus struct { // The time that AWS Config last failed to evaluate your AWS resources against // the rule. - LastFailedEvaluationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastFailedEvaluationTime *time.Time `type:"timestamp"` // The time that AWS Config last failed to invoke the AWS Config rule to evaluate // your AWS resources. - LastFailedInvocationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastFailedInvocationTime *time.Time `type:"timestamp"` // The time that AWS Config last successfully evaluated your AWS resources against // the rule. - LastSuccessfulEvaluationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulEvaluationTime *time.Time `type:"timestamp"` // The time that AWS Config last successfully invoked the AWS Config rule to // evaluate your AWS resources. - LastSuccessfulInvocationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulInvocationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -5500,7 +5500,7 @@ type ConfigStreamDeliveryInfo struct { LastStatus *string `locationName:"lastStatus" type:"string" enum:"DeliveryStatus"` // The time from the last status change. - LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp" timestampFormat:"unix"` + LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` } // String returns the string representation @@ -5552,10 +5552,10 @@ type ConfigurationAggregator struct { ConfigurationAggregatorName *string `min:"1" type:"string"` // The time stamp when the configuration aggregator was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The time of the last update. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedTime *time.Time `type:"timestamp"` // Provides an organization and list of regions to be aggregated. OrganizationAggregationSource *OrganizationAggregationSource `type:"structure"` @@ -5627,7 +5627,7 @@ type ConfigurationItem struct { Configuration *string `locationName:"configuration" type:"string"` // The time when the configuration recording was initiated. - ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp" timestampFormat:"unix"` + ConfigurationItemCaptureTime *time.Time `locationName:"configurationItemCaptureTime" type:"timestamp"` // Unique MD5 hash that represents the configuration item's state. // @@ -5656,10 +5656,10 @@ type ConfigurationItem struct { Relationships []*Relationship `locationName:"relationships" type:"list"` // The time stamp when the resource was created. - ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp" timestampFormat:"unix"` + ResourceCreationTime *time.Time `locationName:"resourceCreationTime" type:"timestamp"` // The ID of the resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` @@ -5867,16 +5867,16 @@ type ConfigurationRecorderStatus struct { LastErrorMessage *string `locationName:"lastErrorMessage" type:"string"` // The time the recorder was last started. - LastStartTime *time.Time `locationName:"lastStartTime" type:"timestamp" timestampFormat:"unix"` + LastStartTime *time.Time `locationName:"lastStartTime" type:"timestamp"` // The last (previous) status of the recorder. LastStatus *string `locationName:"lastStatus" type:"string" enum:"RecorderStatus"` // The time when the status was last changed. - LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp" timestampFormat:"unix"` + LastStatusChangeTime *time.Time `locationName:"lastStatusChangeTime" type:"timestamp"` // The time the recorder was last stopped. - LastStopTime *time.Time `locationName:"lastStopTime" type:"timestamp" timestampFormat:"unix"` + LastStopTime *time.Time `locationName:"lastStopTime" type:"timestamp"` // The name of the configuration recorder. Name *string `locationName:"name" type:"string"` @@ -7714,7 +7714,7 @@ type Evaluation struct { // (for example, every 24 hours). // // OrderingTimestamp is a required field - OrderingTimestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + OrderingTimestamp *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -7806,13 +7806,13 @@ type EvaluationResult struct { ComplianceType *string `type:"string" enum:"ComplianceType"` // The time when the AWS Config rule evaluated the AWS resource. - ConfigRuleInvokedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ConfigRuleInvokedTime *time.Time `type:"timestamp"` // Uniquely identifies the evaluation result. EvaluationResultIdentifier *EvaluationResultIdentifier `type:"structure"` // The time when AWS Config recorded the evaluation result. - ResultRecordedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResultRecordedTime *time.Time `type:"timestamp"` // An encrypted token that associates an evaluation with an AWS Config rule. // The token identifies the rule, the AWS resource being evaluated, and the @@ -7878,7 +7878,7 @@ type EvaluationResultIdentifier struct { // The time can indicate when AWS Config delivered a configuration item change // notification, or it can indicate when AWS Config delivered the configuration // snapshot, depending on which event triggered the evaluation. - OrderingTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + OrderingTimestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -8658,11 +8658,11 @@ type GetResourceConfigHistoryInput struct { // The time stamp that indicates an earlier time. If not specified, the action // returns paginated results that contain configuration items that start when // the first configuration item was recorded. - EarlierTime *time.Time `locationName:"earlierTime" type:"timestamp" timestampFormat:"unix"` + EarlierTime *time.Time `locationName:"earlierTime" type:"timestamp"` // The time stamp that indicates a later time. If not specified, current time // is taken. - LaterTime *time.Time `locationName:"laterTime" type:"timestamp" timestampFormat:"unix"` + LaterTime *time.Time `locationName:"laterTime" type:"timestamp"` // The maximum number of configuration items returned on each page. The default // is 10. You cannot specify a number greater than 100. If you specify 0, AWS @@ -8676,7 +8676,7 @@ type GetResourceConfigHistoryInput struct { // The ID of the resource (for example., sg-xxxxxx). // // ResourceId is a required field - ResourceId *string `locationName:"resourceId" type:"string" required:"true"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` // The resource type. // @@ -8700,6 +8700,9 @@ func (s *GetResourceConfigHistoryInput) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } @@ -9629,7 +9632,7 @@ type Relationship struct { RelationshipName *string `locationName:"relationshipName" type:"string"` // The ID of the related resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the related resource, if available. ResourceName *string `locationName:"resourceName" type:"string"` @@ -9711,10 +9714,10 @@ type ResourceIdentifier struct { _ struct{} `type:"structure"` // The time that the resource was deleted. - ResourceDeletionTime *time.Time `locationName:"resourceDeletionTime" type:"timestamp" timestampFormat:"unix"` + ResourceDeletionTime *time.Time `locationName:"resourceDeletionTime" type:"timestamp"` // The ID of the resource (for example, sg-xxxxxx). - ResourceId *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string"` // The custom name of the resource (if available). ResourceName *string `locationName:"resourceName" type:"string"` @@ -9765,7 +9768,7 @@ type ResourceKey struct { // The ID of the resource (for example., sg-xxxxxx). // // ResourceId is a required field - ResourceId *string `locationName:"resourceId" type:"string" required:"true"` + ResourceId *string `locationName:"resourceId" min:"1" type:"string" required:"true"` // The resource type. // @@ -9789,6 +9792,9 @@ func (s *ResourceKey) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 746d2ec81f2..2f746d1cab4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -4698,7 +4698,7 @@ type Certificate struct { CertificateArn *string `type:"string"` // The date that the certificate was created. - CertificateCreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CertificateCreationDate *time.Time `type:"timestamp"` // The customer-assigned name of the certificate. Valid characters are A-z and // 0-9. @@ -4722,10 +4722,10 @@ type Certificate struct { SigningAlgorithm *string `type:"string"` // The beginning date that the certificate is valid. - ValidFromDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidFromDate *time.Time `type:"timestamp"` // The final date that the certificate is valid. - ValidToDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidToDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -5624,7 +5624,7 @@ type CreateReplicationTaskInput struct { // to start. Specifying both values results in an error. // // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” - CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CdcStartTime *time.Time `type:"timestamp"` // Indicates when you want a change data capture (CDC) operation to stop. The // value can be either server time or commit time. @@ -6818,7 +6818,7 @@ type DescribeEventsInput struct { Duration *int64 `type:"integer"` // The end time for the events to be listed. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // A list of event categories for a source type that you want to subscribe to. EventCategories []*string `type:"list"` @@ -6851,7 +6851,7 @@ type DescribeEventsInput struct { SourceType *string `type:"string" enum:"SourceType"` // The start time for the events to be listed. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -8167,7 +8167,7 @@ type Event struct { _ struct{} `type:"structure"` // The date of the event. - Date *time.Time `type:"timestamp" timestampFormat:"unix"` + Date *time.Time `type:"timestamp"` // The event categories available for the specified source type. EventCategories []*string `type:"list"` @@ -9223,7 +9223,7 @@ type ModifyReplicationTaskInput struct { // to start. Specifying both values results in an error. // // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” - CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CdcStartTime *time.Time `type:"timestamp"` // Indicates when you want a change data capture (CDC) operation to stop. The // value can be either server time or commit time. @@ -9749,7 +9749,7 @@ type RefreshSchemasStatus struct { LastFailureMessage *string `type:"string"` // The date the schema was last refreshed. - LastRefreshDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastRefreshDate *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the replication instance. ReplicationInstanceArn *string `type:"string"` @@ -9974,10 +9974,10 @@ type ReplicationInstance struct { // The expiration date of the free replication instance that is part of the // Free DMS program. - FreeUntil *time.Time `type:"timestamp" timestampFormat:"unix"` + FreeUntil *time.Time `type:"timestamp"` // The time the replication instance was created. - InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + InstanceCreateTime *time.Time `type:"timestamp"` // The KMS key identifier that is used to encrypt the content on the replication // instance. If you do not specify a value for the KmsKeyId parameter, then @@ -10390,7 +10390,7 @@ type ReplicationTask struct { ReplicationTaskArn *string `type:"string"` // The date the replication task was created. - ReplicationTaskCreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReplicationTaskCreationDate *time.Time `type:"timestamp"` // The user-assigned replication task identifier or name. // @@ -10407,7 +10407,7 @@ type ReplicationTask struct { ReplicationTaskSettings *string `type:"string"` // The date the replication task is scheduled to start. - ReplicationTaskStartDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReplicationTaskStartDate *time.Time `type:"timestamp"` // The statistics for the task, including elapsed time, tables loaded, and table // errors. @@ -10562,7 +10562,7 @@ type ReplicationTaskAssessmentResult struct { ReplicationTaskIdentifier *string `type:"string"` // The date the task assessment was completed. - ReplicationTaskLastAssessmentDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReplicationTaskLastAssessmentDate *time.Time `type:"timestamp"` // The URL of the S3 object containing the task assessment results. S3ObjectUrl *string `type:"string"` @@ -10853,7 +10853,7 @@ type StartReplicationTaskInput struct { // to start. Specifying both values results in an error. // // Timestamp Example: --cdc-start-time “2018-03-08T12:12:12” - CdcStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CdcStartTime *time.Time `type:"timestamp"` // Indicates when you want a change data capture (CDC) operation to stop. The // value can be either server time or commit time. @@ -11134,7 +11134,7 @@ type TableStatistics struct { Inserts *int64 `type:"long"` // The last time the table was updated. - LastUpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateTime *time.Time `type:"timestamp"` // The schema name. SchemaName *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go index 558bb610ed8..843d7d8694f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go @@ -2925,7 +2925,7 @@ type DescribeEventsInput struct { // The end of the time interval for which to retrieve events, specified in ISO // 8601 format. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The maximum number of results to include in the response. If more results // exist than the specified MaxResults value, a token is included in the response @@ -2949,7 +2949,7 @@ type DescribeEventsInput struct { // The beginning of the time interval to retrieve events for, specified in ISO // 8601 format. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -3343,7 +3343,7 @@ type Event struct { _ struct{} `type:"structure"` // The date and time when the event occurred. - Date *time.Time `type:"timestamp" timestampFormat:"unix"` + Date *time.Time `type:"timestamp"` // A user-defined message associated with the event. Message *string `type:"string"` @@ -3573,7 +3573,7 @@ type Node struct { Endpoint *Endpoint `type:"structure"` // The date and time (in UNIX epoch format) when the node was launched. - NodeCreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + NodeCreateTime *time.Time `type:"timestamp"` // A system-generated identifier for the node. NodeId *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index f30075d6dd5..cf8deb7a7ba 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -9938,7 +9938,7 @@ type Job struct { Counters *Counters `locationName:"counters" type:"structure"` // When the job was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The device (phone or tablet). Device *Device `locationName:"device" type:"structure"` @@ -9975,7 +9975,7 @@ type Job struct { Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The job's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The job's status. // @@ -10001,7 +10001,7 @@ type Job struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The job's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The job's type. // @@ -12126,7 +12126,7 @@ type OfferingStatus struct { _ struct{} `type:"structure"` // The date on which the offering is effective. - EffectiveOn *time.Time `locationName:"effectiveOn" type:"timestamp" timestampFormat:"unix"` + EffectiveOn *time.Time `locationName:"effectiveOn" type:"timestamp"` // Represents the metadata of an offering status. Offering *Offering `locationName:"offering" type:"structure"` @@ -12180,7 +12180,7 @@ type OfferingTransaction struct { Cost *MonetaryAmount `locationName:"cost" type:"structure"` // The date on which an offering transaction was created. - CreatedOn *time.Time `locationName:"createdOn" type:"timestamp" timestampFormat:"unix"` + CreatedOn *time.Time `locationName:"createdOn" type:"timestamp"` // The ID that corresponds to a device offering promotion. OfferingPromotionId *string `locationName:"offeringPromotionId" min:"4" type:"string"` @@ -12368,7 +12368,7 @@ type Project struct { Arn *string `locationName:"arn" min:"32" type:"string"` // When the project was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The default number of minutes (at the project level) a test run will execute // before it times out. Default value is 60 minutes. @@ -12596,7 +12596,7 @@ type RemoteAccessSession struct { ClientId *string `locationName:"clientId" type:"string"` // The date and time the remote access session was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // The device (phone or tablet) used in the remote access session. Device *Device `locationName:"device" type:"structure"` @@ -12678,7 +12678,7 @@ type RemoteAccessSession struct { SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` // The date and time the remote access session was started. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The status of the remote access session. Can be any of the following: // @@ -12702,7 +12702,7 @@ type RemoteAccessSession struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The date and time the remote access session was stopped. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` } // String returns the string representation @@ -13039,7 +13039,7 @@ type Run struct { Counters *Counters `locationName:"counters" type:"structure"` // When the run was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // Output CustomerArtifactPaths object for the test run. CustomerArtifactPaths *CustomerArtifactPaths `locationName:"customerArtifactPaths" type:"structure"` @@ -13126,7 +13126,7 @@ type Run struct { SkipAppResign *bool `locationName:"skipAppResign" type:"boolean"` // The run's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The run's status. // @@ -13152,7 +13152,7 @@ type Run struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The run's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The total number of jobs for the run. TotalJobs *int64 `locationName:"totalJobs" type:"integer"` @@ -14051,7 +14051,7 @@ type Suite struct { Counters *Counters `locationName:"counters" type:"structure"` // When the suite was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // Represents the total (metered or unmetered) minutes used by the test suite. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` @@ -14082,7 +14082,7 @@ type Suite struct { Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The suite's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The suite's status. // @@ -14108,7 +14108,7 @@ type Suite struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The suite's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The suite's type. // @@ -14233,7 +14233,7 @@ type Test struct { Counters *Counters `locationName:"counters" type:"structure"` // When the test was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // Represents the total (metered or unmetered) minutes used by the test. DeviceMinutes *DeviceMinutes `locationName:"deviceMinutes" type:"structure"` @@ -14264,7 +14264,7 @@ type Test struct { Result *string `locationName:"result" type:"string" enum:"ExecutionResult"` // The test's start time. - Started *time.Time `locationName:"started" type:"timestamp" timestampFormat:"unix"` + Started *time.Time `locationName:"started" type:"timestamp"` // The test's status. // @@ -14290,7 +14290,7 @@ type Test struct { Status *string `locationName:"status" type:"string" enum:"ExecutionStatus"` // The test's stop time. - Stopped *time.Time `locationName:"stopped" type:"timestamp" timestampFormat:"unix"` + Stopped *time.Time `locationName:"stopped" type:"timestamp"` // The test's type. // @@ -15135,7 +15135,7 @@ type Upload struct { ContentType *string `locationName:"contentType" type:"string"` // When the upload was created. - Created *time.Time `locationName:"created" type:"timestamp" timestampFormat:"unix"` + Created *time.Time `locationName:"created" type:"timestamp"` // A message about the upload's result. Message *string `locationName:"message" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go index 46b46b662d3..ca88ba0f000 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go @@ -5052,7 +5052,7 @@ type Connection struct { LagId *string `locationName:"lagId" type:"string"` // The time of the most recent call to DescribeLoa for this connection. - LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp" timestampFormat:"unix"` + LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` // Where the connection is located. // @@ -7677,7 +7677,7 @@ type Interconnect struct { LagId *string `locationName:"lagId" type:"string"` // The time of the most recent call to DescribeInterconnectLoa for this Interconnect. - LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp" timestampFormat:"unix"` + LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` // Where the connection is located. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go index 55a1a120075..77c69861bb6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go @@ -6271,7 +6271,7 @@ type DirectoryDescription struct { Edition *string `type:"string" enum:"DirectoryEdition"` // Specifies when the directory was created. - LaunchTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LaunchTime *time.Time `type:"timestamp"` // The fully-qualified name of the directory. Name *string `type:"string"` @@ -6297,7 +6297,7 @@ type DirectoryDescription struct { Stage *string `type:"string" enum:"DirectoryStage"` // The date and time that the stage was last updated. - StageLastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StageLastUpdatedDateTime *time.Time `type:"timestamp"` // Additional information about the directory stage. StageReason *string `type:"string"` @@ -6802,13 +6802,13 @@ type DomainController struct { DomainControllerId *string `type:"string"` // Specifies when the domain controller was created. - LaunchTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LaunchTime *time.Time `type:"timestamp"` // The status of the domain controller. Status *string `type:"string" enum:"DomainControllerStatus"` // The date and time that the status was last updated. - StatusLastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StatusLastUpdatedDateTime *time.Time `type:"timestamp"` // A description of the domain controller state. StatusReason *string `type:"string"` @@ -7056,7 +7056,7 @@ type EventTopic struct { _ struct{} `type:"structure"` // The date and time of when you associated your directory with the SNS topic. - CreatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDateTime *time.Time `type:"timestamp"` // The Directory ID of an AWS Directory Service directory that will publish // status messages to an SNS topic. @@ -7257,7 +7257,7 @@ type IpRouteInfo struct { _ struct{} `type:"structure"` // The date and time the address block was added to the directory. - AddedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + AddedDateTime *time.Time `type:"timestamp"` // IP address block in the IpRoute. CidrIp *string `type:"string"` @@ -8063,7 +8063,7 @@ type SchemaExtensionInfo struct { DirectoryId *string `type:"string"` // The date and time that the schema extension was completed. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The identifier of the schema extension. SchemaExtensionId *string `type:"string"` @@ -8076,7 +8076,7 @@ type SchemaExtensionInfo struct { // The date and time that the schema extension started being applied to the // directory. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -8145,7 +8145,7 @@ type Snapshot struct { SnapshotId *string `type:"string"` // The date and time that the snapshot was taken. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The snapshot status. Status *string `type:"string" enum:"SnapshotStatus"` @@ -8418,20 +8418,20 @@ type Trust struct { _ struct{} `type:"structure"` // The date and time that the trust relationship was created. - CreatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDateTime *time.Time `type:"timestamp"` // The Directory ID of the AWS directory involved in the trust relationship. DirectoryId *string `type:"string"` // The date and time that the trust relationship was last updated. - LastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedDateTime *time.Time `type:"timestamp"` // The Fully Qualified Domain Name (FQDN) of the external domain involved in // the trust relationship. RemoteDomainName *string `type:"string"` // The date and time that the TrustState was last updated. - StateLastUpdatedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StateLastUpdatedDateTime *time.Time `type:"timestamp"` // The trust relationship direction. TrustDirection *string `type:"string" enum:"TrustDirection"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go index f9a985246f4..0cb19f04414 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go @@ -847,10 +847,10 @@ type LifecyclePolicy struct { _ struct{} `type:"structure"` // The local date and time when the lifecycle policy was created. - DateCreated *time.Time `type:"timestamp" timestampFormat:"unix"` + DateCreated *time.Time `type:"timestamp"` // The local date and time when the lifecycle policy was last modified. - DateModified *time.Time `type:"timestamp" timestampFormat:"unix"` + DateModified *time.Time `type:"timestamp"` // The description of the lifecycle policy. Description *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go index 401f710a4ec..52f3edd7316 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go @@ -3,13 +3,14 @@ // Package dlm provides the client and types for making API // requests to Amazon Data Lifecycle Manager. // -// With Amazon Data Lifecyle Manager, you can manage the lifecycle of your AWS -// resources. You create lifecycle policies, which are used to automate operations -// on the specified resources. -// -// Data Lifecycle Manager supports Amazon EBS volumes and snapshots. For information -// about using Data Lifecycle Manager with Amazon EBS, see Amazon Data Lifecyle -// Manager for Amazon EBS Snapshots (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html). +// With Amazon Data Lifecycle Manager, you can manage the lifecycle of your +// AWS resources. You create lifecycle policies, which are used to automate +// operations on the specified resources. +// +// Amazon DLM supports Amazon EBS volumes and snapshots. For information about +// using Amazon DLM with Amazon EBS, see Automating the Amazon EBS Snapshot +// Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html) +// in the Amazon EC2 User Guide. // // See https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index 5dc8c902151..d3fa4f9a7c4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -4246,7 +4246,7 @@ type BackupDetails struct { // Time at which the backup was created. This is the request time of the backup. // // BackupCreationDateTime is a required field - BackupCreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + BackupCreationDateTime *time.Time `type:"timestamp" required:"true"` // Name of the requested backup. // @@ -4310,7 +4310,7 @@ type BackupSummary struct { BackupArn *string `min:"37" type:"string"` // Time at which the backup was created. - BackupCreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + BackupCreationDateTime *time.Time `type:"timestamp"` // Name of the specified backup. BackupName *string `min:"3" type:"string"` @@ -7482,7 +7482,7 @@ type GlobalTableDescription struct { _ struct{} `type:"structure"` // The creation time of the global table. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The unique identifier of the global table. GlobalTableArn *string `type:"string"` @@ -7876,11 +7876,11 @@ type ListBackupsInput struct { TableName *string `min:"3" type:"string"` // Only backups created after this time are listed. TimeRangeLowerBound is inclusive. - TimeRangeLowerBound *time.Time `type:"timestamp" timestampFormat:"unix"` + TimeRangeLowerBound *time.Time `type:"timestamp"` // Only backups created before this time are listed. TimeRangeUpperBound is // exclusive. - TimeRangeUpperBound *time.Time `type:"timestamp" timestampFormat:"unix"` + TimeRangeUpperBound *time.Time `type:"timestamp"` } // String returns the string representation @@ -8513,10 +8513,10 @@ type PointInTimeRecoveryDescription struct { // Specifies the earliest point in time you can restore your table to. It You // can restore your table to any point in time during the last 35 days. - EarliestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EarliestRestorableDateTime *time.Time `type:"timestamp"` // LatestRestorableDateTime is typically 5 minutes before the current time. - LatestRestorableDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LatestRestorableDateTime *time.Time `type:"timestamp"` // The current state of point in time recovery: // @@ -8732,10 +8732,10 @@ type ProvisionedThroughputDescription struct { _ struct{} `type:"structure"` // The date and time of the last provisioned throughput decrease for this table. - LastDecreaseDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastDecreaseDateTime *time.Time `type:"timestamp"` // The date and time of the last provisioned throughput increase for this table. - LastIncreaseDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastIncreaseDateTime *time.Time `type:"timestamp"` // The number of provisioned throughput decreases for this table during this // UTC calendar day. For current maximums on provisioned throughput decreases, @@ -10064,7 +10064,7 @@ type RestoreSummary struct { // Point in time or source backup time. // // RestoreDateTime is a required field - RestoreDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + RestoreDateTime *time.Time `type:"timestamp" required:"true"` // Indicates if a restore is in progress or not. // @@ -10197,7 +10197,7 @@ type RestoreTableToPointInTimeInput struct { _ struct{} `type:"structure"` // Time in the past to restore the table to. - RestoreDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + RestoreDateTime *time.Time `type:"timestamp"` // Name of the source table that is being restored. // @@ -10887,7 +10887,7 @@ type SourceTableDetails struct { // Time when the source table was created. // // TableCreationDateTime is a required field - TableCreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + TableCreationDateTime *time.Time `type:"timestamp" required:"true"` // Unique identifier for the table for which the backup was created. // @@ -11091,7 +11091,7 @@ type TableDescription struct { // The date and time when the table was created, in UNIX epoch time (http://www.epochconverter.com/) // format. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The global secondary indexes, if any, on the table. Each index is scoped // to a given partition key value. Each element is composed of: diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 157c3f9dbbb..9a758173dd1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -25444,7 +25444,7 @@ type BundleTask struct { Progress *string `locationName:"progress" type:"string"` // The time this task started. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The state of the task. State *string `locationName:"state" type:"string" enum:"BundleTaskState"` @@ -25453,7 +25453,7 @@ type BundleTask struct { Storage *Storage `locationName:"storage" type:"structure"` // The time of the most recent update for the task. - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"` + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation @@ -26436,13 +26436,13 @@ type ClientData struct { Comment *string `type:"string"` // The time that the disk upload ends. - UploadEnd *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadEnd *time.Time `type:"timestamp"` // The size of the uploaded disk image, in GiB. UploadSize *float64 `type:"double"` // The time that the disk upload starts. - UploadStart *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadStart *time.Time `type:"timestamp"` } // String returns the string representation @@ -27734,12 +27734,12 @@ type CreateFleetInput struct { // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `type:"timestamp"` // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // At this point, no new EC2 Fleet requests are placed or able to fulfill the // request. The default end date is 7 days from the current date. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -35073,7 +35073,7 @@ type DescribeFleetHistoryInput struct { // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -35151,13 +35151,13 @@ type DescribeFleetHistoryOutput struct { // All records up to this time were retrieved. // // If nextToken indicates that there are more results, this value is not present. - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" timestampFormat:"iso8601"` + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` // The token for the next set of results. NextToken *string `locationName:"nextToken" type:"string"` // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation @@ -40879,7 +40879,7 @@ type DescribeSpotFleetRequestHistoryInput struct { // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` } // String returns the string representation @@ -40959,7 +40959,7 @@ type DescribeSpotFleetRequestHistoryOutput struct { // If nextToken indicates that there are more results, this value is not present. // // LastEvaluatedTime is a required field - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" required:"true"` // The token required to retrieve the next set of results. This value is null // when there are no more results to return. @@ -40973,7 +40973,7 @@ type DescribeSpotFleetRequestHistoryOutput struct { // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` } // String returns the string representation @@ -41296,7 +41296,7 @@ type DescribeSpotPriceHistoryInput struct { // The date and time, up to the current date, from which to stop retrieving // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // One or more filters. // @@ -41333,7 +41333,7 @@ type DescribeSpotPriceHistoryInput struct { // The date and time, up to the past 90 days, from which to start retrieving // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation @@ -44988,7 +44988,7 @@ type EbsInstanceBlockDevice struct { _ struct{} `type:"structure"` // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // Indicates whether the volume is deleted on instance termination. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -45917,7 +45917,7 @@ type FleetData struct { ClientToken *string `locationName:"clientToken" type:"string"` // The creation date and time of the EC2 Fleet. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // Indicates whether running instances should be terminated if the target capacity // of the EC2 Fleet is decreased below the current size of the EC2 Fleet. @@ -45972,12 +45972,12 @@ type FleetData struct { // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // At this point, no new instance requests are placed or able to fulfill the // request. The default end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -46415,7 +46415,7 @@ type FlowLog struct { _ struct{} `type:"structure"` // The date and time the flow log was created. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601"` + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` // Information about the error that occurred. Rate limited indicates that CloudWatch // logs throttling has been applied for one or more network interfaces, or that @@ -46516,7 +46516,7 @@ type FpgaImage struct { _ struct{} `type:"structure"` // The date and time the AFI was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The description of the AFI. Description *string `locationName:"description" type:"string"` @@ -46555,7 +46555,7 @@ type FpgaImage struct { Tags []*Tag `locationName:"tags" locationNameList:"item" type:"list"` // The time of the most recent update to the AFI. - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"` + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation @@ -46828,7 +46828,7 @@ type GetConsoleOutputOutput struct { Output *string `locationName:"output" type:"string"` // The time at which the output was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -47194,7 +47194,7 @@ type GetPasswordDataOutput struct { PasswordData *string `locationName:"passwordData" type:"string"` // The time the data was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -47307,7 +47307,7 @@ type GetReservedInstancesExchangeQuoteOutput struct { IsValidExchange *bool `locationName:"isValidExchange" type:"boolean"` // The new end date of the reservation term. - OutputReservedInstancesWillExpireAt *time.Time `locationName:"outputReservedInstancesWillExpireAt" type:"timestamp" timestampFormat:"iso8601"` + OutputReservedInstancesWillExpireAt *time.Time `locationName:"outputReservedInstancesWillExpireAt" type:"timestamp"` // The total true upfront charge for the exchange. PaymentDue *string `locationName:"paymentDue" type:"string"` @@ -47451,7 +47451,7 @@ type HistoryRecord struct { // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // // Timestamp is a required field - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601" required:"true"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` } // String returns the string representation @@ -47493,7 +47493,7 @@ type HistoryRecordEntry struct { EventType *string `locationName:"eventType" type:"string" enum:"FleetEventType"` // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -47529,7 +47529,7 @@ type Host struct { _ struct{} `type:"structure"` // The time that the Dedicated Host was allocated. - AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp" timestampFormat:"iso8601"` + AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp"` // Whether auto-placement is on or off. AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` @@ -47559,7 +47559,7 @@ type Host struct { Instances []*HostInstance `locationName:"instances" locationNameList:"item" type:"list"` // The time that the Dedicated Host was released. - ReleaseTime *time.Time `locationName:"releaseTime" type:"timestamp" timestampFormat:"iso8601"` + ReleaseTime *time.Time `locationName:"releaseTime" type:"timestamp"` // The Dedicated Host's state. State *string `locationName:"state" type:"string" enum:"AllocationState"` @@ -47828,7 +47828,7 @@ type HostReservation struct { Duration *int64 `locationName:"duration" type:"integer"` // The date and time that the reservation ends. - End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"iso8601"` + End *time.Time `locationName:"end" type:"timestamp"` // The IDs of the Dedicated Hosts associated with the reservation. HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` @@ -47852,7 +47852,7 @@ type HostReservation struct { PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` // The date and time that the reservation started. - Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"` + Start *time.Time `locationName:"start" type:"timestamp"` // The state of the reservation. State *string `locationName:"state" type:"string" enum:"ReservationState"` @@ -47999,7 +47999,7 @@ type IamInstanceProfileAssociation struct { State *string `locationName:"state" type:"string" enum:"IamInstanceProfileAssociationState"` // The time the IAM instance profile was associated with the instance. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -48115,7 +48115,7 @@ type IdFormat struct { // The date in UTC at which you are permanently switched over to using longer // IDs. If a deadline is not yet available for this resource type, this field // is not returned. - Deadline *time.Time `locationName:"deadline" type:"timestamp" timestampFormat:"iso8601"` + Deadline *time.Time `locationName:"deadline" type:"timestamp"` // The type of resource. Resource *string `locationName:"resource" type:"string"` @@ -49682,7 +49682,7 @@ type Instance struct { KeyName *string `locationName:"keyName" type:"string"` // The time the instance was launched. - LaunchTime *time.Time `locationName:"launchTime" type:"timestamp" timestampFormat:"iso8601"` + LaunchTime *time.Time `locationName:"launchTime" type:"timestamp"` // The monitoring for the instance. Monitoring *Monitoring `locationName:"monitoring" type:"structure"` @@ -50594,7 +50594,7 @@ type InstanceNetworkInterfaceAttachment struct { _ struct{} `type:"structure"` // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // The ID of the network interface attachment. AttachmentId *string `locationName:"attachmentId" type:"string"` @@ -51017,7 +51017,7 @@ type InstanceStatusDetails struct { // The time when a status check failed. For an instance that was launched and // impaired, this is the time when the instance was launched. - ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp" timestampFormat:"iso8601"` + ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp"` // The type of instance status. Name *string `locationName:"name" type:"string" enum:"StatusName"` @@ -51069,10 +51069,10 @@ type InstanceStatusEvent struct { Description *string `locationName:"description" type:"string"` // The latest scheduled end time for the event. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"` + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` // The earliest scheduled start time for the event. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"` + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` } // String returns the string representation @@ -51679,7 +51679,7 @@ type LaunchTemplate struct { _ struct{} `type:"structure"` // The time launch template was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The principal that created the launch template. CreatedBy *string `locationName:"createdBy" type:"string"` @@ -52798,7 +52798,7 @@ type LaunchTemplateSpotMarketOptions struct { // active until all instances launch, the request is canceled, or this date // is reached. If the request is persistent, it remains active until it is canceled // or this date and time is reached. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -52864,7 +52864,7 @@ type LaunchTemplateSpotMarketOptionsRequest struct { // is reached. If the request is persistent, it remains active until it is canceled // or this date and time is reached. The default end date is 7 days from the // current date. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -52980,7 +52980,7 @@ type LaunchTemplateVersion struct { _ struct{} `type:"structure"` // The time the version was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The principal that created the version. CreatedBy *string `locationName:"createdBy" type:"string"` @@ -56042,10 +56042,10 @@ type NatGateway struct { _ struct{} `type:"structure"` // The date and time the NAT gateway was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The date and time the NAT gateway was deleted, if applicable. - DeleteTime *time.Time `locationName:"deleteTime" type:"timestamp" timestampFormat:"iso8601"` + DeleteTime *time.Time `locationName:"deleteTime" type:"timestamp"` // If the NAT gateway could not be created, specifies the error code for the // failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound @@ -56705,7 +56705,7 @@ type NetworkInterfaceAttachment struct { _ struct{} `type:"structure"` // The timestamp indicating when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // The ID of the network interface attachment. AttachmentId *string `locationName:"attachmentId" type:"string"` @@ -57661,7 +57661,7 @@ type ProvisionedBandwidth struct { // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp" timestampFormat:"iso8601"` + ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp"` // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), @@ -57671,7 +57671,7 @@ type ProvisionedBandwidth struct { // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - RequestTime *time.Time `locationName:"requestTime" type:"timestamp" timestampFormat:"iso8601"` + RequestTime *time.Time `locationName:"requestTime" type:"timestamp"` // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), @@ -59411,7 +59411,7 @@ type ReportInstanceStatusInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The time at which the reported instance health state ended. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // One or more instances. // @@ -59445,7 +59445,7 @@ type ReportInstanceStatusInput struct { ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"` // The time at which the reported instance health state began. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The status of all instances listed. // @@ -59968,14 +59968,14 @@ type RequestSpotInstancesInput struct { // launch, the request expires, or the request is canceled. If the request is // persistent, the request becomes active at this date and time and remains // active until it expires or is canceled. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date of the request. If this is a one-time request, the request remains // active until all instances launch, the request is canceled, or this date // is reached. If the request is persistent, it remains active until it is canceled // or this date is reached. The default end date is 7 days from the current // date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -60474,7 +60474,7 @@ type ReservedInstances struct { Duration *int64 `locationName:"duration" type:"long"` // The time when the Reserved Instance expires. - End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"iso8601"` + End *time.Time `locationName:"end" type:"timestamp"` // The purchase price of the Reserved Instance. FixedPrice *float64 `locationName:"fixedPrice" type:"float"` @@ -60507,7 +60507,7 @@ type ReservedInstances struct { Scope *string `locationName:"scope" type:"string" enum:"scope"` // The date and time the Reserved Instance started. - Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"` + Start *time.Time `locationName:"start" type:"timestamp"` // The state of the Reserved Instance purchase. State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"` @@ -60732,7 +60732,7 @@ type ReservedInstancesListing struct { ClientToken *string `locationName:"clientToken" type:"string"` // The time the listing was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // The number of instances in this state. InstanceCounts []*InstanceCount `locationName:"instanceCounts" locationNameList:"item" type:"list"` @@ -60757,7 +60757,7 @@ type ReservedInstancesListing struct { Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The last modified timestamp of the listing. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` } // String returns the string representation @@ -60839,10 +60839,10 @@ type ReservedInstancesModification struct { ClientToken *string `locationName:"clientToken" type:"string"` // The time when the modification request was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // The time for the modification to become effective. - EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp" timestampFormat:"iso8601"` + EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp"` // Contains target configurations along with their corresponding new Reserved // Instance IDs. @@ -60861,7 +60861,7 @@ type ReservedInstancesModification struct { StatusMessage *string `locationName:"statusMessage" type:"string"` // The time when the modification request was last updated. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` } // String returns the string representation @@ -63026,7 +63026,7 @@ type ScheduledInstance struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The date when the Scheduled Instance was purchased. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // The hourly price for a single instance. HourlyPrice *string `locationName:"hourlyPrice" type:"string"` @@ -63041,13 +63041,13 @@ type ScheduledInstance struct { NetworkPlatform *string `locationName:"networkPlatform" type:"string"` // The time for the next schedule to start. - NextSlotStartTime *time.Time `locationName:"nextSlotStartTime" type:"timestamp" timestampFormat:"iso8601"` + NextSlotStartTime *time.Time `locationName:"nextSlotStartTime" type:"timestamp"` // The platform (Linux/UNIX or Windows). Platform *string `locationName:"platform" type:"string"` // The time that the previous schedule ended or will end. - PreviousSlotEndTime *time.Time `locationName:"previousSlotEndTime" type:"timestamp" timestampFormat:"iso8601"` + PreviousSlotEndTime *time.Time `locationName:"previousSlotEndTime" type:"timestamp"` // The schedule recurrence. Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` @@ -63059,10 +63059,10 @@ type ScheduledInstance struct { SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` // The end date for the Scheduled Instance. - TermEndDate *time.Time `locationName:"termEndDate" type:"timestamp" timestampFormat:"iso8601"` + TermEndDate *time.Time `locationName:"termEndDate" type:"timestamp"` // The start date for the Scheduled Instance. - TermStartDate *time.Time `locationName:"termStartDate" type:"timestamp" timestampFormat:"iso8601"` + TermStartDate *time.Time `locationName:"termStartDate" type:"timestamp"` // The total number of hours for a single instance for the entire term. TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` @@ -63179,7 +63179,7 @@ type ScheduledInstanceAvailability struct { AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` // The time period for the first schedule to start. - FirstSlotStartTime *time.Time `locationName:"firstSlotStartTime" type:"timestamp" timestampFormat:"iso8601"` + FirstSlotStartTime *time.Time `locationName:"firstSlotStartTime" type:"timestamp"` // The hourly price for a single instance. HourlyPrice *string `locationName:"hourlyPrice" type:"string"` @@ -64407,14 +64407,14 @@ type SlotDateTimeRangeRequest struct { // The earliest date and time, in UTC, for the Scheduled Instance to start. // // EarliestTime is a required field - EarliestTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EarliestTime *time.Time `type:"timestamp" required:"true"` // The latest date and time, in UTC, for the Scheduled Instance to start. This // value must be later than or equal to the earliest date and at most three // months in the future. // // LatestTime is a required field - LatestTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LatestTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -64460,10 +64460,10 @@ type SlotStartTimeRangeRequest struct { _ struct{} `type:"structure"` // The earliest date and time, in UTC, for the Scheduled Instance to start. - EarliestTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EarliestTime *time.Time `type:"timestamp"` // The latest date and time, in UTC, for the Scheduled Instance to start. - LatestTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -64527,7 +64527,7 @@ type Snapshot struct { SnapshotId *string `locationName:"snapshotId" type:"string"` // The time stamp when the snapshot was initiated. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The snapshot state. State *string `locationName:"status" type:"string" enum:"SnapshotState"` @@ -65199,7 +65199,7 @@ type SpotFleetRequestConfig struct { // The creation date and time of the request. // // CreateTime is a required field - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"` // The configuration of the Spot Fleet request. // @@ -65346,12 +65346,12 @@ type SpotFleetRequestConfigData struct { // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // At this point, no new Spot Instance requests are placed or able to fulfill // the request. The default end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -65555,7 +65555,7 @@ type SpotInstanceRequest struct { // The date and time when the Spot Instance request was created, in UTC format // (for example, YYYY-MM-DDTHH:MM:SSZ). - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The fault codes for the Spot Instance request, if any. Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` @@ -65602,14 +65602,14 @@ type SpotInstanceRequest struct { // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // The request becomes active at this date and time. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // If this is a one-time request, it remains active until all instances launch, // the request is canceled, or this date is reached. If the request is persistent, // it remains active until it is canceled or this date is reached. The default // end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation @@ -65782,7 +65782,7 @@ type SpotInstanceStatus struct { // The date and time of the most recent status update, in UTC format (for example, // YYYY-MM-DDTHH:MM:SSZ). - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"` + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation @@ -65837,7 +65837,7 @@ type SpotMarketOptions struct { // is reached. If the request is persistent, it remains active until it is canceled // or this date and time is reached. The default end date is 7 days from the // current date. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -66013,7 +66013,7 @@ type SpotPrice struct { SpotPrice *string `locationName:"spotPrice" type:"string"` // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -68010,7 +68010,7 @@ type VgwTelemetry struct { AcceptedRouteCount *int64 `locationName:"acceptedRouteCount" type:"integer"` // The date and time of the last change in status. - LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp" timestampFormat:"iso8601"` + LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp"` // The Internet-routable IP address of the virtual private gateway's outside // interface. @@ -68074,7 +68074,7 @@ type Volume struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The time stamp when volume creation was initiated. - CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // Indicates whether the volume will be encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` @@ -68207,7 +68207,7 @@ type VolumeAttachment struct { _ struct{} `type:"structure"` // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` // Indicates whether the EBS volume is deleted on instance termination. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -68317,7 +68317,7 @@ type VolumeModification struct { _ struct{} `type:"structure"` // The modification completion or failure time. - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The current modification state. The modification state is null for unmodified // volumes. @@ -68336,7 +68336,7 @@ type VolumeModification struct { Progress *int64 `locationName:"progress" type:"long"` // The modification start time. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` // A status message about the modification progress or failure. StatusMessage *string `locationName:"statusMessage" type:"string"` @@ -68534,10 +68534,10 @@ type VolumeStatusEvent struct { EventType *string `locationName:"eventType" type:"string"` // The latest end time of the event. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"` + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` // The earliest start time of the event. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"` + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` } // String returns the string representation @@ -68925,7 +68925,7 @@ type VpcEndpoint struct { _ struct{} `type:"structure"` // The date and time the VPC endpoint was created. - CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp"` // (Interface endpoint) The DNS entries for the endpoint. DnsEntries []*DnsEntry `locationName:"dnsEntrySet" locationNameList:"item" type:"list"` @@ -69059,7 +69059,7 @@ type VpcEndpointConnection struct { _ struct{} `type:"structure"` // The date and time the VPC endpoint was created. - CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"` + CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp"` // The ID of the service to which the endpoint is connected. ServiceId *string `locationName:"serviceId" type:"string"` @@ -69165,7 +69165,7 @@ type VpcPeeringConnection struct { AccepterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"accepterVpcInfo" type:"structure"` // The time that an unaccepted VPC peering connection will expire. - ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"` + ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp"` // Information about the requester VPC. CIDR block information is only returned // when describing an active VPC peering connection. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index d9bcf883b75..e7b467d3409 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -2247,7 +2247,7 @@ type AuthorizationData struct { // The Unix time in seconds and milliseconds when the authorization token expires. // Authorization tokens are valid for 12 hours. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unix"` + ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` // The registry URL to use for this authorization token in a docker login command. // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com. @@ -2857,7 +2857,7 @@ type DeleteLifecyclePolicyOutput struct { _ struct{} `type:"structure"` // The time stamp of the last time that the lifecycle policy was run. - LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp" timestampFormat:"unix"` + LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"` // The JSON lifecycle policy text. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` @@ -3579,7 +3579,7 @@ type GetLifecyclePolicyOutput struct { _ struct{} `type:"structure"` // The time stamp of the last time that the lifecycle policy was run. - LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp" timestampFormat:"unix"` + LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"` // The JSON lifecycle policy text. LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"` @@ -3964,7 +3964,7 @@ type ImageDetail struct { // The date and time, expressed in standard JavaScript date format, at which // the current image was pushed to the repository. - ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp" timestampFormat:"unix"` + ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"` // The size, in bytes, of the image in the repository. // @@ -4323,7 +4323,7 @@ type LifecyclePolicyPreviewResult struct { // The date and time, expressed in standard JavaScript date format, at which // the current image was pushed to the repository. - ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp" timestampFormat:"unix"` + ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"` // The list of tags associated with this image. ImageTags []*string `locationName:"imageTags" type:"list"` @@ -4784,7 +4784,7 @@ type Repository struct { _ struct{} `type:"structure"` // The date and time, in JavaScript date format, when the repository was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The AWS account ID associated with the registry that contains the repository. RegistryId *string `locationName:"registryId" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index ba586cfbb65..89acca2b3d9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -4701,7 +4701,7 @@ type ContainerInstance struct { PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"` // The Unix time stamp for when the container instance was registered. - RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" timestampFormat:"unix"` + RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp"` // For CPU and memory resource types, this parameter describes the amount of // each resource that was available on the container instance when the container @@ -5559,7 +5559,7 @@ type Deployment struct { _ struct{} `type:"structure"` // The Unix time stamp for when the service was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The most recent desired count of tasks that was specified for the service // to deploy or maintain. @@ -5594,7 +5594,7 @@ type Deployment struct { TaskDefinition *string `locationName:"taskDefinition" type:"string"` // The Unix time stamp for when the service was last updated. - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix"` + UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"` } // String returns the string representation @@ -8880,7 +8880,7 @@ type Service struct { ClusterArn *string `locationName:"clusterArn" type:"string"` // The Unix time stamp for when the service was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // Optional deployment parameters that control how many tasks run during the // deployment and the ordering of stopping and starting tasks. @@ -9130,7 +9130,7 @@ type ServiceEvent struct { _ struct{} `type:"structure"` // The Unix time stamp for when the event was triggered. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The ID string of the event. Id *string `locationName:"id" type:"string"` @@ -9592,13 +9592,13 @@ type SubmitTaskStateChangeInput struct { Containers []*ContainerStateChange `locationName:"containers" type:"list"` // The Unix time stamp for when the task execution stopped. - ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp" timestampFormat:"unix"` + ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` // The Unix time stamp for when the container image pull began. - PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp" timestampFormat:"unix"` + PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` // The Unix time stamp for when the container image pull completed. - PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp" timestampFormat:"unix"` + PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` // The reason for the state change request. Reason *string `locationName:"reason" type:"string"` @@ -9732,7 +9732,7 @@ type Task struct { Connectivity *string `locationName:"connectivity" type:"string" enum:"Connectivity"` // The Unix time stamp for when the task last went into CONNECTED status. - ConnectivityAt *time.Time `locationName:"connectivityAt" type:"timestamp" timestampFormat:"unix"` + ConnectivityAt *time.Time `locationName:"connectivityAt" type:"timestamp"` // The ARN of the container instances that host the task. ContainerInstanceArn *string `locationName:"containerInstanceArn" type:"string"` @@ -9770,13 +9770,13 @@ type Task struct { // The Unix time stamp for when the task was created (the task entered the PENDING // state). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The desired status of the task. DesiredStatus *string `locationName:"desiredStatus" type:"string"` // The Unix time stamp for when the task execution stopped. - ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp" timestampFormat:"unix"` + ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` // The name of the task group associated with the task. Group *string `locationName:"group" type:"string"` @@ -9836,14 +9836,14 @@ type Task struct { PlatformVersion *string `locationName:"platformVersion" type:"string"` // The Unix time stamp for when the container image pull began. - PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp" timestampFormat:"unix"` + PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` // The Unix time stamp for when the container image pull completed. - PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp" timestampFormat:"unix"` + PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` // The Unix time stamp for when the task started (the task transitioned from // the PENDING state to the RUNNING state). - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The tag specified when a task is started. If the task is started by an Amazon // ECS service, then the startedBy parameter contains the deployment ID of the @@ -9852,14 +9852,14 @@ type Task struct { // The Unix time stamp for when the task was stopped (the task transitioned // from the RUNNING state to the STOPPED state). - StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp" timestampFormat:"unix"` + StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp"` // The reason the task was stopped. StoppedReason *string `locationName:"stoppedReason" type:"string"` // The Unix time stamp for when the task will stop (transitions from the RUNNING // state to STOPPED). - StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp" timestampFormat:"unix"` + StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp"` // The Amazon Resource Name (ARN) of the task. TaskArn *string `locationName:"taskArn" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index 3471dff8455..5254d3fef75 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -2266,7 +2266,7 @@ type FileSystemSize struct { // Time at which the size of data, returned in the Value field, was determined. // The value is the integer number of seconds since 1970-01-01T00:00:00Z. - Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `type:"timestamp"` // Latest known metered size (in bytes) of data stored in the file system. // @@ -2568,7 +2568,7 @@ type UpdateFileSystemOutput struct { // Time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // Opaque string specified in the request. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go index 0c6d3421390..4d76063f1b8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go @@ -466,7 +466,7 @@ type Cluster struct { ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` // The Unix epoch time stamp in seconds for when the cluster was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The endpoint for your Kubernetes API server. Endpoint *string `locationName:"endpoint" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index 96ab771ef0b..18d404a5c6d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -4919,7 +4919,7 @@ type CacheCluster struct { AutoMinorVersionUpgrade *bool `type:"boolean"` // The date and time when the cluster was created. - CacheClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheClusterCreateTime *time.Time `type:"timestamp"` // The user-supplied identifier of the cluster. This identifier is a unique // key that identifies a cluster. @@ -5378,7 +5378,7 @@ type CacheNode struct { _ struct{} `type:"structure"` // The date and time when the cache node was created. - CacheNodeCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheNodeCreateTime *time.Time `type:"timestamp"` // The cache node identifier. A node ID is a numeric identifier (0001, 0002, // etc.). The combination of cluster ID and node ID uniquely identifies every @@ -8423,7 +8423,7 @@ type DescribeEventsInput struct { // 8601 format. // // Example: 2017-03-30T07:03:49.555Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // An optional marker returned from a prior request. Use this marker for pagination // of results from this operation. If this parameter is specified, the response @@ -8451,7 +8451,7 @@ type DescribeEventsInput struct { // 8601 format. // // Example: 2017-03-30T07:03:49.555Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -9279,7 +9279,7 @@ type Event struct { _ struct{} `type:"structure"` // The date and time when the event occurred. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Date *time.Time `type:"timestamp"` // The text of the event. Message *string `type:"string"` @@ -10595,7 +10595,7 @@ type NodeSnapshot struct { CacheClusterId *string `type:"string"` // The date and time when the cache node was created in the source cluster. - CacheNodeCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheNodeCreateTime *time.Time `type:"timestamp"` // The cache node identifier for the node in the source cluster. CacheNodeId *string `type:"string"` @@ -10611,7 +10611,7 @@ type NodeSnapshot struct { // The date and time when the source node's metadata and cache data set was // obtained for the snapshot. - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -11502,7 +11502,7 @@ type ReservedCacheNode struct { ReservedCacheNodesOfferingId *string `type:"string"` // The time the reservation started. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // The state of the reserved cache node. State *string `type:"string"` @@ -12028,7 +12028,7 @@ type Snapshot struct { AutomaticFailover *string `type:"string" enum:"AutomaticFailoverStatus"` // The date and time when the source cluster was created. - CacheClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CacheClusterCreateTime *time.Time `type:"timestamp"` // The user-supplied identifier of the source cluster. CacheClusterId *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index d3c3004c931..3424828c34d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -3877,10 +3877,10 @@ type ApplicationDescription struct { ConfigurationTemplates []*string `type:"list"` // The date when the application was created. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The date when the application was last modified. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // User-defined description of the application. Description *string `type:"string"` @@ -4104,10 +4104,10 @@ type ApplicationVersionDescription struct { BuildArn *string `type:"string"` // The creation date of the application version. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The last modified date of the application version. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // The description of the application version. Description *string `type:"string"` @@ -5008,10 +5008,10 @@ type ConfigurationSettingsDescription struct { ApplicationName *string `min:"1" type:"string"` // The date (in UTC time) when this configuration set was created. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The date (in UTC time) when this configuration set was last modified. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // If this configuration set is associated with an environment, the DeploymentStatus // parameter indicates the deployment status of this configuration set: @@ -6277,7 +6277,7 @@ type Deployment struct { // For in-progress deployments, the time that the deployment started. // // For completed deployments, the time that the deployment ended. - DeploymentTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DeploymentTime *time.Time `type:"timestamp"` // The status of the deployment: // @@ -6851,7 +6851,7 @@ type DescribeEnvironmentHealthOutput struct { InstancesHealth *InstanceHealthSummary `type:"structure"` // The date and time that the health information was retrieved. - RefreshedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RefreshedAt *time.Time `type:"timestamp"` // The environment's operational status. Ready, Launching, Updating, Terminating, // or Terminated. @@ -7184,7 +7184,7 @@ type DescribeEnvironmentsInput struct { // If specified when IncludeDeleted is set to true, then environments deleted // after this date are displayed. - IncludedDeletedBackTo *time.Time `type:"timestamp" timestampFormat:"iso8601"` + IncludedDeletedBackTo *time.Time `type:"timestamp"` // For a paginated request. Specify a maximum number of environments to include // in each response. @@ -7292,7 +7292,7 @@ type DescribeEventsInput struct { // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those that occur up to, but not including, the EndTime. - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those associated with this environment. @@ -7322,7 +7322,7 @@ type DescribeEventsInput struct { // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those that occur on or after this time. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // If specified, AWS Elastic Beanstalk restricts the returned descriptions to // those that are associated with this environment configuration. @@ -7554,7 +7554,7 @@ type DescribeInstancesHealthOutput struct { NextToken *string `min:"1" type:"string"` // The date and time that the health information was retrieved. - RefreshedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RefreshedAt *time.Time `type:"timestamp"` } // String returns the string representation @@ -7650,10 +7650,10 @@ type EnvironmentDescription struct { CNAME *string `min:"1" type:"string"` // The creation date for this environment. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The last modified date for this environment. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // Describes this environment. Description *string `type:"string"` @@ -7909,7 +7909,7 @@ type EnvironmentInfoDescription struct { Message *string `type:"string"` // The time stamp when this information was retrieved. - SampleTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SampleTimestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -8143,7 +8143,7 @@ type EventDescription struct { EnvironmentName *string `min:"4" type:"string"` // The date when the event occurred. - EventDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EventDate *time.Time `type:"timestamp"` // The event message. Message *string `type:"string"` @@ -8792,7 +8792,7 @@ type ManagedAction struct { // The start time of the maintenance window in which the managed action will // execute. - WindowStartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + WindowStartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -8849,7 +8849,7 @@ type ManagedActionHistoryItem struct { ActionType *string `type:"string" enum:"ActionType"` // The date and time that the action started executing. - ExecutedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ExecutedTime *time.Time `type:"timestamp"` // If the action failed, a description of the failure. FailureDescription *string `type:"string"` @@ -8858,7 +8858,7 @@ type ManagedActionHistoryItem struct { FailureType *string `type:"string" enum:"FailureType"` // The date and time that the action finished executing. - FinishedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + FinishedTime *time.Time `type:"timestamp"` // The status of the action. Status *string `type:"string" enum:"ActionHistoryStatus"` @@ -9138,10 +9138,10 @@ type PlatformDescription struct { CustomAmiList []*CustomAmi `type:"list"` // The date when the platform was created. - DateCreated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateCreated *time.Time `type:"timestamp"` // The date when the platform was last updated. - DateUpdated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DateUpdated *time.Time `type:"timestamp"` // The description of the platform. Description *string `type:"string"` @@ -10019,7 +10019,7 @@ type SingleInstanceHealth struct { InstanceType *string `type:"string"` // The time at which the EC2 instance was launched. - LaunchedAt *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LaunchedAt *time.Time `type:"timestamp"` // Operating system metrics from the instance. System *SystemStatus `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index 2564522033a..f3cff5fbf84 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -3979,7 +3979,7 @@ type OptionStatus struct { // Timestamp which tells the creation date for the entity. // // CreationDate is a required field - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `type:"timestamp" required:"true"` // Indicates whether the Elasticsearch domain is being deleted. PendingDeletion *bool `type:"boolean"` @@ -3992,7 +3992,7 @@ type OptionStatus struct { // Timestamp which tells the last updated time for the entity. // // UpdateDate is a required field - UpdateDate *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + UpdateDate *time.Time `type:"timestamp" required:"true"` // Specifies the latest version for the entity. UpdateVersion *int64 `type:"integer"` @@ -4282,7 +4282,7 @@ type ReservedElasticsearchInstance struct { ReservedElasticsearchInstanceOfferingId *string `type:"string"` // The time the reservation started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The state of the reserved Elasticsearch instance. State *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index 26720a34204..c41d020c5c2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -5406,7 +5406,7 @@ type LoadBalancerDescription struct { CanonicalHostedZoneNameID *string `type:"string"` // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTime *time.Time `type:"timestamp"` // The DNS name of the load balancer. DNSName *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index 228c6a56ce7..8427b6215b5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -6081,7 +6081,7 @@ type LoadBalancer struct { CanonicalHostedZoneId *string `type:"string"` // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTime *time.Time `type:"timestamp"` // The public DNS name of the load balancer. DNSName *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index 1ef78fdfbe2..12fe5fb54ba 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -4034,13 +4034,13 @@ type ClusterTimeline struct { _ struct{} `type:"structure"` // The creation date and time of the cluster. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the cluster was terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the cluster was ready to execute steps. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -4222,7 +4222,7 @@ type CreateSecurityConfigurationOutput struct { // The date and time the security configuration was created. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The name of the security configuration. // @@ -4372,10 +4372,10 @@ type DescribeJobFlowsInput struct { _ struct{} `type:"structure"` // Return only job flows created after this date and time. - CreatedAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAfter *time.Time `type:"timestamp"` // Return only job flows created before this date and time. - CreatedBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedBefore *time.Time `type:"timestamp"` // Return only job flows whose job flow ID is contained in this list. JobFlowIds []*string `type:"list"` @@ -4484,7 +4484,7 @@ type DescribeSecurityConfigurationOutput struct { _ struct{} `type:"structure"` // The date and time the security configuration was created - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The name of the security configuration. Name *string `type:"string"` @@ -5720,13 +5720,13 @@ type InstanceFleetTimeline struct { _ struct{} `type:"structure"` // The time and date the instance fleet was created. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The time and date the instance fleet terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The time and date the instance fleet was ready to run jobs. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -6075,10 +6075,10 @@ type InstanceGroupDetail struct { // The date/time the instance group was created. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The date/time the instance group was terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // Unique identifier for the instance group. InstanceGroupId *string `type:"string"` @@ -6115,10 +6115,10 @@ type InstanceGroupDetail struct { Name *string `type:"string"` // The date/time the instance group was available to the cluster. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` // The date/time the instance group was started. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` // State of instance group. The following values are deprecated: STARTING, TERMINATED, // and FAILED. @@ -6368,13 +6368,13 @@ type InstanceGroupTimeline struct { _ struct{} `type:"structure"` // The creation date and time of the instance group. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the instance group terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the instance group became ready to perform tasks. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -6529,13 +6529,13 @@ type InstanceTimeline struct { _ struct{} `type:"structure"` // The creation date and time of the instance. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the instance was terminated. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the instance was ready to perform tasks. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -6945,20 +6945,20 @@ type JobFlowExecutionStatusDetail struct { // The creation date and time of the job flow. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The completion date and time of the job flow. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // Description of the job flow last changed state. LastStateChangeReason *string `type:"string"` // The date and time when the job flow was ready to start running bootstrap // actions. - ReadyDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ReadyDateTime *time.Time `type:"timestamp"` // The start date and time of the job flow. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` // The state of the job flow. // @@ -7613,10 +7613,10 @@ type ListClustersInput struct { ClusterStates []*string `type:"list"` // The creation date and time beginning value filter for listing clusters. - CreatedAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedAfter *time.Time `type:"timestamp"` // The creation date and time end value filter for listing clusters. - CreatedBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedBefore *time.Time `type:"timestamp"` // The pagination token that indicates the next set of results to retrieve. Marker *string `type:"string"` @@ -9288,7 +9288,7 @@ type SecurityConfigurationSummary struct { _ struct{} `type:"structure"` // The date and time the security configuration was created. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The name of the security configuration. Name *string `type:"string"` @@ -9823,16 +9823,16 @@ type StepExecutionStatusDetail struct { // The creation date and time of the step. // // CreationDateTime is a required field - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDateTime *time.Time `type:"timestamp" required:"true"` // The completion date and time of the step. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // A description of the step's current state. LastStateChangeReason *string `type:"string"` // The start date and time of the step. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` // The state of the step. // @@ -10032,13 +10032,13 @@ type StepTimeline struct { _ struct{} `type:"structure"` // The date and time when the cluster step was created. - CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDateTime *time.Time `type:"timestamp"` // The date and time when the cluster step execution completed or failed. - EndDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndDateTime *time.Time `type:"timestamp"` // The date and time when the cluster step execution started. - StartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartDateTime *time.Time `type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index eab7818e9e3..5718acff4e1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -1549,7 +1549,7 @@ type DeliveryStreamDescription struct { _ struct{} `type:"structure"` // The date and time that the delivery stream was created. - CreateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTimestamp *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the delivery stream. For more information, // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). @@ -1588,7 +1588,7 @@ type DeliveryStreamDescription struct { HasMoreDestinations *bool `type:"boolean" required:"true"` // The date and time that the delivery stream was last updated. - LastUpdateTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateTimestamp *time.Time `type:"timestamp"` // If the DeliveryStreamType parameter is KinesisStreamAsSource, a SourceDescription // object describing the source Kinesis data stream. @@ -3131,7 +3131,7 @@ type KinesisStreamSourceDescription struct { // Kinesis Data Firehose starts retrieving records from the Kinesis data stream // starting with this time stamp. - DeliveryStartTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + DeliveryStartTimestamp *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the source Kinesis data stream. For more // information, see Amazon Kinesis Data Streams ARN Format (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams). diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go index 5ab16e62f9e..68169facc30 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -1972,7 +1972,7 @@ type PolicyComplianceDetail struct { // A time stamp that indicates when the returned information should be considered // out-of-date. - ExpiredAt *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpiredAt *time.Time `type:"timestamp"` // The AWS account ID. MemberAccount *string `min:"1" type:"string"` @@ -2043,7 +2043,7 @@ type PolicyComplianceStatus struct { EvaluationResults []*EvaluationResult `type:"list"` // Time stamp of the last update to the EvaluationResult objects. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The member account ID. MemberAccount *string `min:"1" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go index 5765986d997..138c469c495 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go @@ -8597,14 +8597,14 @@ type Alias struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Human-readable description of an alias. Description *string `type:"string"` // Time stamp indicating when this data object was last modified. Format is // a number expressed in Unix time as milliseconds (for example "1469498468.057"). - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedTime *time.Time `type:"timestamp"` // Descriptive label that is associated with an alias. Alias names do not need // to be unique. @@ -8802,7 +8802,7 @@ type Build struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Descriptive label that is associated with a build. Build names do not need // to be unique. It can be set using CreateBuild or UpdateBuild. @@ -11276,7 +11276,7 @@ type DescribeFleetEventsInput struct { // Most recent date to retrieve event logs for. If no end time is specified, // this call returns entries from the specified start time up to the present. // Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057"). - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Unique identifier for a fleet to get event logs for. // @@ -11296,7 +11296,7 @@ type DescribeFleetEventsInput struct { // this call returns entries starting from when the fleet was created to the // specified end time. Format is a number expressed in Unix time as milliseconds // (ex: "1469498468.057"). - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -13131,7 +13131,7 @@ type Event struct { // Time stamp indicating when this event occurred. Format is a number expressed // in Unix time as milliseconds (for example "1469498468.057"). - EventTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EventTime *time.Time `type:"timestamp"` // Additional information related to the event. Message *string `min:"1" type:"string"` @@ -13240,7 +13240,7 @@ type FleetAttributes struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Human-readable description of the fleet. Description *string `min:"1" type:"string"` @@ -13337,7 +13337,7 @@ type FleetAttributes struct { // Time stamp indicating when this data object was terminated. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TerminationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -13746,7 +13746,7 @@ type GameSession struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Unique identifier for a player. This ID is used to enforce a resource protection // policy (if one exists), that limits the number of game sessions a player @@ -13814,7 +13814,7 @@ type GameSession struct { // Time stamp indicating when this data object was terminated. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TerminationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -14038,7 +14038,7 @@ type GameSessionPlacement struct { // Time stamp indicating when this request was completed, canceled, or timed // out. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Set of custom properties for a game session, formatted as key:value pairs. // These properties are passed to a game server process in the GameSession object @@ -14111,7 +14111,7 @@ type GameSessionPlacement struct { // Time stamp indicating when this request was placed in the queue. Format is // a number expressed in Unix time as milliseconds (for example "1469498468.057"). - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // Current status of the game session placement request. // @@ -14546,7 +14546,7 @@ type Instance struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Unique identifier for a fleet that the instance is in. FleetId *string `type:"string"` @@ -15213,7 +15213,7 @@ type MatchmakingConfiguration struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Information to attached to all events related to the matchmaking configuration. CustomEventData *string `type:"string"` @@ -15387,7 +15387,7 @@ type MatchmakingRuleSet struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Collection of matchmaking rules, formatted as a JSON string. (Note that comments14 // are not allowed in JSON, but most elements support a description field.) @@ -15442,7 +15442,7 @@ type MatchmakingTicket struct { // Time stamp indicating when this matchmaking request stopped being processed // due to success, failure, or cancellation. Format is a number expressed in // Unix time as milliseconds (for example "1469498468.057"). - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // Average amount of time (in seconds) that players are currently waiting for // a match. If there is not enough recent data, this property may be empty. @@ -15461,7 +15461,7 @@ type MatchmakingTicket struct { // Time stamp indicating when this matchmaking request was received. Format // is a number expressed in Unix time as milliseconds (for example "1469498468.057"). - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // Current status of the matchmaking request. // @@ -15865,7 +15865,7 @@ type PlayerSession struct { // Time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Unique identifier for a fleet that the player's game session is running on. FleetId *string `type:"string"` @@ -15910,7 +15910,7 @@ type PlayerSession struct { // Time stamp indicating when this data object was terminated. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - TerminationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TerminationTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -19050,11 +19050,11 @@ type VpcPeeringAuthorization struct { // Time stamp indicating when this authorization was issued. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057"). - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Time stamp indicating when this authorization expires (24 hours after issuance). // Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). - ExpirationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationTime *time.Time `type:"timestamp"` // Unique identifier for the AWS account that you use to manage your Amazon // GameLift fleet. You can find your Account ID in the AWS Management Console diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index 6f81b681946..9f95a77105f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -8570,7 +8570,7 @@ type CatalogImportStatus struct { ImportCompleted *bool `type:"boolean"` // The time that the migration was started. - ImportTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ImportTime *time.Time `type:"timestamp"` // The name of the person who initiated the migration. ImportedBy *string `min:"1" type:"string"` @@ -9002,7 +9002,7 @@ type Connection struct { ConnectionType *string `type:"string" enum:"ConnectionType"` // The time this connection definition was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Description of the connection. Description *string `type:"string"` @@ -9011,7 +9011,7 @@ type Connection struct { LastUpdatedBy *string `min:"1" type:"string"` // The last time this connection definition was updated. - LastUpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdatedTime *time.Time `type:"timestamp"` // A list of criteria that can be used in selecting this connection. MatchCriteria []*string `type:"list"` @@ -9235,7 +9235,7 @@ type Crawler struct { CrawlElapsedTime *int64 `type:"long"` // The time when the crawler was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The database where metadata is written by this crawler. DatabaseName *string `type:"string"` @@ -9248,7 +9248,7 @@ type Crawler struct { LastCrawl *LastCrawlInfo `type:"structure"` // The time the crawler was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The crawler name. Name *string `min:"1" type:"string"` @@ -10011,7 +10011,7 @@ type CreateDevEndpointOutput struct { AvailabilityZone *string `type:"string"` // The point in time at which this DevEndpoint was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name assigned to the new DevEndpoint. EndpointName *string `type:"string"` @@ -11092,7 +11092,7 @@ type Database struct { _ struct{} `type:"structure"` // The time at which the metadata database was created in the catalog. - CreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `type:"timestamp"` // Description of the database. Description *string `type:"string"` @@ -12032,7 +12032,7 @@ type DevEndpoint struct { AvailabilityZone *string `type:"string"` // The point in time at which this DevEndpoint was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name of the DevEndpoint. EndpointName *string `type:"string"` @@ -12057,7 +12057,7 @@ type DevEndpoint struct { FailureReason *string `type:"string"` // The point in time at which this DevEndpoint was last modified. - LastModifiedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimestamp *time.Time `type:"timestamp"` // The status of the last update. LastUpdateStatus *string `type:"string"` @@ -14998,7 +14998,7 @@ type GrokClassifier struct { Classification *string `type:"string" required:"true"` // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Optional custom grok patterns defined by this classifier. For more information, // see custom patterns in Writing Custom Classifers (http://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html). @@ -15011,7 +15011,7 @@ type GrokClassifier struct { GrokPattern *string `min:"1" type:"string" required:"true"` // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The name of the classifier. // @@ -15186,7 +15186,7 @@ type Job struct { Connections *ConnectionsList `type:"structure"` // The time and date that this job definition was created. - CreatedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedOn *time.Time `type:"timestamp"` // The default arguments for this job, specified as name-value pairs. // @@ -15210,7 +15210,7 @@ type Job struct { ExecutionProperty *ExecutionProperty `type:"structure"` // The last point in time when this job definition was modified. - LastModifiedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedOn *time.Time `type:"timestamp"` // This field is reserved for future use. LogUri *string `type:"string"` @@ -15448,7 +15448,7 @@ type JobRun struct { Attempt *int64 `type:"integer"` // The date and time this job run completed. - CompletedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletedOn *time.Time `type:"timestamp"` // An error message associated with this job run. ErrorMessage *string `type:"string"` @@ -15466,7 +15466,7 @@ type JobRun struct { JobRunState *string `type:"string" enum:"JobRunState"` // The last time this job run was modified. - LastModifiedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedOn *time.Time `type:"timestamp"` // Specifies configuration properties of a job run notification. NotificationProperty *NotificationProperty `type:"structure"` @@ -15479,7 +15479,7 @@ type JobRun struct { PreviousRunId *string `min:"1" type:"string"` // The date and time at which this job run was started. - StartedOn *time.Time `type:"timestamp" timestampFormat:"unix"` + StartedOn *time.Time `type:"timestamp"` // The job run timeout in minutes. Timeout *int64 `min:"1" type:"integer"` @@ -15748,7 +15748,7 @@ type JsonClassifier struct { _ struct{} `type:"structure"` // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // A JsonPath string defining the JSON data for the classifier to classify. // AWS Glue supports a subset of JsonPath, as described in Writing JsonPath @@ -15758,7 +15758,7 @@ type JsonClassifier struct { JsonPath *string `type:"string" required:"true"` // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The name of the classifier. // @@ -15826,7 +15826,7 @@ type LastCrawlInfo struct { MessagePrefix *string `min:"1" type:"string"` // The time at which the crawl started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // Status of the last crawl. Status *string `type:"string" enum:"LastCrawlStatus"` @@ -16129,16 +16129,16 @@ type Partition struct { _ struct{} `type:"structure"` // The time at which the partition was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The name of the catalog database where the table in question is located. DatabaseName *string `min:"1" type:"string"` // The last time at which the partition was accessed. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // The last time at which column statistics were computed for this partition. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Partition parameters, in the form of a list of key-value pairs. Parameters map[string]*string `type:"map"` @@ -16249,10 +16249,10 @@ type PartitionInput struct { _ struct{} `type:"structure"` // The last time at which the partition was accessed. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // The last time at which column statistics were computed for this partition. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Partition parameters, in the form of a list of key-value pairs. Parameters map[string]*string `type:"map"` @@ -17528,7 +17528,7 @@ type Table struct { _ struct{} `type:"structure"` // Time when the table definition was created in the Data Catalog. - CreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `type:"timestamp"` // Person or entity who created the table. CreatedBy *string `min:"1" type:"string"` @@ -17542,10 +17542,10 @@ type Table struct { // Last time the table was accessed. This is usually taken from HDFS, and may // not be reliable. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // Last time column statistics were computed for this table. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Name of the table. For Hive compatibility, this must be entirely lowercase. // @@ -17573,7 +17573,7 @@ type Table struct { TableType *string `type:"string"` // Last time the table was updated. - UpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdateTime *time.Time `type:"timestamp"` // If the table is a view, the expanded text of the view; otherwise null. ViewExpandedText *string `type:"string"` @@ -17729,10 +17729,10 @@ type TableInput struct { Description *string `type:"string"` // Last time the table was accessed. - LastAccessTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessTime *time.Time `type:"timestamp"` // Last time column statistics were computed for this table. - LastAnalyzedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAnalyzedTime *time.Time `type:"timestamp"` // Name of the table. For Hive compatibility, this is folded to lowercase when // it is stored. @@ -19372,7 +19372,7 @@ type UserDefinedFunction struct { ClassName *string `min:"1" type:"string"` // The time at which the function was created. - CreateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateTime *time.Time `type:"timestamp"` // The name of the function. FunctionName *string `min:"1" type:"string"` @@ -19532,10 +19532,10 @@ type XMLClassifier struct { Classification *string `type:"string" required:"true"` // The time this classifier was registered. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The time this classifier was last updated. - LastUpdated *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `type:"timestamp"` // The name of the classifier. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 33e20caddaf..875df512f41 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -13864,7 +13864,7 @@ type AccessKey struct { AccessKeyId *string `min:"16" type:"string" required:"true"` // The date when the access key was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The secret key used to sign requests. // @@ -13942,7 +13942,7 @@ type AccessKeyLastUsed struct { // * There is no sign-in data associated with the user // // LastUsedDate is a required field - LastUsedDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + LastUsedDate *time.Time `type:"timestamp" required:"true"` // The AWS region where this access key was most recently used. This field is // displays "N/A" in the following situations: @@ -14012,7 +14012,7 @@ type AccessKeyMetadata struct { AccessKeyId *string `min:"16" type:"string"` // The date when the access key was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The status of the access key. Active means the key is valid for API calls; // Inactive means it is not. @@ -18848,7 +18848,7 @@ type GetCredentialReportOutput struct { // The date and time when the credential report was created, in ISO 8601 date-time // format (http://www.iso.org/iso/iso8601). - GeneratedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + GeneratedTime *time.Time `type:"timestamp"` // The format (MIME type) of the credential report. ReportFormat *string `type:"string" enum:"ReportFormatType"` @@ -19336,7 +19336,7 @@ type GetOpenIDConnectProviderOutput struct { // The date and time when the IAM OIDC provider resource object was created // in the AWS account. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // A list of certificate thumbprints that are associated with the specified // IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. @@ -19776,13 +19776,13 @@ type GetSAMLProviderOutput struct { _ struct{} `type:"structure"` // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The XML metadata document that includes information about an identity provider. SAMLMetadataDocument *string `min:"1000" type:"string"` // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -20287,7 +20287,7 @@ type Group struct { // when the group was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The stable and unique string identifying the group. For more information // about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -20368,7 +20368,7 @@ type GroupDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the group was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The stable and unique string identifying the group. For more information // about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -20464,7 +20464,7 @@ type InstanceProfile struct { // The date when the instance profile was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The stable and unique string identifying the instance profile. For more information // about IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -23662,7 +23662,7 @@ type LoginProfile struct { // The date when the password for the user was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // Specifies whether the user is required to set a new password on next sign-in. PasswordResetRequired *bool `type:"boolean"` @@ -23711,7 +23711,7 @@ type MFADevice struct { // The date when the MFA device was enabled for the user. // // EnableDate is a required field - EnableDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + EnableDate *time.Time `type:"timestamp" required:"true"` // The serial number that uniquely identifies the MFA device. For virtual MFA // devices, the serial number is the device ARN. @@ -23779,7 +23779,7 @@ type ManagedPolicyDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the policy was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The identifier for the version of the policy that is set as the default (operative) // version. @@ -23828,7 +23828,7 @@ type ManagedPolicyDetail struct { // when the policy was created. When a policy has more than one version, this // field contains the date and time when the most recent policy version was // created. - UpdateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -24102,7 +24102,7 @@ type Policy struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the policy was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The identifier for the version of the policy that is set as the default version. DefaultVersionId *string `type:"string"` @@ -24146,7 +24146,7 @@ type Policy struct { // when the policy was created. When a policy has more than one version, this // field contains the date and time when the most recent policy version was // created. - UpdateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UpdateDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -24401,7 +24401,7 @@ type PolicyVersion struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the policy version was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The policy document. // @@ -25520,7 +25520,7 @@ type Role struct { // when the role was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // A description of the role that you provide. Description *string `type:"string"` @@ -25644,7 +25644,7 @@ type RoleDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the role was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // A list of instance profiles that contain this role. InstanceProfileList []*InstanceProfile `type:"list"` @@ -25789,10 +25789,10 @@ type SAMLProviderListEntry struct { Arn *string `min:"20" type:"string"` // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation @@ -25854,7 +25854,7 @@ type SSHPublicKey struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the SSH public key was uploaded. - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadDate *time.Time `type:"timestamp"` // The name of the IAM user associated with the SSH public key. // @@ -25930,7 +25930,7 @@ type SSHPublicKeyMetadata struct { // when the SSH public key was uploaded. // // UploadDate is a required field - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + UploadDate *time.Time `type:"timestamp" required:"true"` // The name of the IAM user associated with the SSH public key. // @@ -26039,7 +26039,7 @@ type ServerCertificateMetadata struct { Arn *string `min:"20" type:"string" required:"true"` // The date on which the certificate is set to expire. - Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Expiration *time.Time `type:"timestamp"` // The path to the server certificate. For more information about paths, see // IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -26061,7 +26061,7 @@ type ServerCertificateMetadata struct { ServerCertificateName *string `min:"1" type:"string" required:"true"` // The date when the server certificate was uploaded. - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -26118,7 +26118,7 @@ type ServiceSpecificCredential struct { // when the service-specific credential were created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The name of the service associated with the service-specific credential. // @@ -26215,7 +26215,7 @@ type ServiceSpecificCredentialMetadata struct { // when the service-specific credential were created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The name of the service associated with the service-specific credential. // @@ -26392,7 +26392,7 @@ type SigningCertificate struct { Status *string `type:"string" required:"true" enum:"statusType"` // The date when the signing certificate was uploaded. - UploadDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + UploadDate *time.Time `type:"timestamp"` // The name of the user the signing certificate is associated with. // @@ -28855,7 +28855,7 @@ type User struct { // when the user was created. // // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + CreateDate *time.Time `type:"timestamp" required:"true"` // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the user's password was last used to sign in to an AWS website. For @@ -28876,7 +28876,7 @@ type User struct { // contains the date and time the most recent password was used. // // This value is returned only in the GetUser and ListUsers operations. - PasswordLastUsed *time.Time `type:"timestamp" timestampFormat:"iso8601"` + PasswordLastUsed *time.Time `type:"timestamp"` // The path to the user. For more information about paths, see IAM Identifiers // (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) @@ -28977,7 +28977,7 @@ type UserDetail struct { // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), // when the user was created. - CreateDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreateDate *time.Time `type:"timestamp"` // A list of IAM groups that the user is in. GroupList []*string `type:"list"` @@ -29081,7 +29081,7 @@ type VirtualMFADevice struct { Base32StringSeed []byte `type:"blob"` // The date and time on which the virtual MFA device was enabled. - EnableDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EnableDate *time.Time `type:"timestamp"` // A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String // where $virtualMFADeviceName is one of the create call arguments, AccountName diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index 9bda4e8414b..98fe8c4f8ca 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -4256,12 +4256,12 @@ type AssessmentRun struct { // The assessment run completion time that corresponds to the rules packages // evaluation completion time or failure. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"` + CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` // The time when StartAssessmentRun was called. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // A Boolean value (true or false) that specifies whether the process of collecting // data from the agents is completed. @@ -4296,7 +4296,7 @@ type AssessmentRun struct { RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"` // The time when StartAssessmentRun was called. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The state of the assessment run. // @@ -4306,7 +4306,7 @@ type AssessmentRun struct { // The last time when the assessment run's state changed. // // StateChangedAt is a required field - StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" required:"true"` // A list of the assessment run state changes. // @@ -4628,7 +4628,7 @@ type AssessmentRunNotification struct { // The date of the notification. // // Date is a required field - Date *time.Time `locationName:"date" type:"timestamp" timestampFormat:"unix" required:"true"` + Date *time.Time `locationName:"date" type:"timestamp" required:"true"` // The Boolean value that specifies whether the notification represents an error. // @@ -4708,7 +4708,7 @@ type AssessmentRunStateChange struct { // The last time the assessment run state changed. // // StateChangedAt is a required field - StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" required:"true"` } // String returns the string representation @@ -4746,7 +4746,7 @@ type AssessmentTarget struct { // The time at which the assessment target is created. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // The name of the Amazon Inspector assessment target. // @@ -4760,7 +4760,7 @@ type AssessmentTarget struct { // The time at which UpdateAssessmentTarget is called. // // UpdatedAt is a required field - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" required:"true"` } // String returns the string representation @@ -4867,7 +4867,7 @@ type AssessmentTemplate struct { // The time at which the assessment template is created. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // The duration in seconds specified for this assessment template. The default // value is 3600 seconds (one hour). The maximum value is 86400 seconds (one @@ -5942,7 +5942,7 @@ type DescribeCrossAccountAccessRoleOutput struct { // The date when the cross-account access role was registered. // // RegisteredAt is a required field - RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" timestampFormat:"unix" required:"true"` + RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" required:"true"` // The ARN that specifies the IAM role that Amazon Inspector uses to access // your AWS account. @@ -6389,7 +6389,7 @@ type EventSubscription struct { // The time at which SubscribeToEvent is called. // // SubscribedAt is a required field - SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" required:"true"` } // String returns the string representation @@ -6627,7 +6627,7 @@ type Finding struct { // The time when the finding was generated. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // The description of the finding. Description *string `locationName:"description" type:"string"` @@ -6662,7 +6662,7 @@ type Finding struct { // The time when AddAttributesToFindings is called. // // UpdatedAt is a required field - UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" required:"true"` // The user-defined attributes that are assigned to the finding. // @@ -8415,7 +8415,7 @@ type ResourceGroup struct { // The time at which resource group is created. // // CreatedAt is a required field - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" required:"true"` // The tags (key and value pairs) of the resource group. This data type property // is used in the CreateResourceGroup action. @@ -9122,10 +9122,10 @@ type TimestampRange struct { _ struct{} `type:"structure"` // The minimum value of the timestamp range. - BeginDate *time.Time `locationName:"beginDate" type:"timestamp" timestampFormat:"unix"` + BeginDate *time.Time `locationName:"beginDate" type:"timestamp"` // The maximum value of the timestamp range. - EndDate *time.Time `locationName:"endDate" type:"timestamp" timestampFormat:"unix"` + EndDate *time.Time `locationName:"endDate" type:"timestamp"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index 4f24727d34e..e5e5aa6fd00 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -12410,10 +12410,10 @@ type AuthorizerDescription struct { AuthorizerName *string `locationName:"authorizerName" min:"1" type:"string"` // The UNIX timestamp of when the authorizer was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The UNIX timestamp of when the authorizer was last updated. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The status of the authorizer. Status *string `locationName:"status" type:"string" enum:"AuthorizerStatus"` @@ -12528,7 +12528,7 @@ type CACertificate struct { CertificateId *string `locationName:"certificateId" min:"64" type:"string"` // The date the CA certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The status of the CA certificate. // @@ -12588,7 +12588,7 @@ type CACertificateDescription struct { CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` // The date the CA certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The customer version of the CA certificate. CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` @@ -12597,7 +12597,7 @@ type CACertificateDescription struct { GenerationId *string `locationName:"generationId" type:"string"` // The date the CA certificate was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The owner of the CA certificate. OwnedBy *string `locationName:"ownedBy" type:"string"` @@ -12967,7 +12967,7 @@ type Certificate struct { CertificateId *string `locationName:"certificateId" min:"64" type:"string"` // The date and time the certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The status of the certificate. // @@ -13026,7 +13026,7 @@ type CertificateDescription struct { CertificatePem *string `locationName:"certificatePem" min:"1" type:"string"` // The date and time the certificate was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The customer version of the certificate. CustomerVersion *int64 `locationName:"customerVersion" min:"1" type:"integer"` @@ -13035,7 +13035,7 @@ type CertificateDescription struct { GenerationId *string `locationName:"generationId" type:"string"` // The date and time the certificate was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The ID of the AWS account that owns the certificate. OwnedBy *string `locationName:"ownedBy" type:"string"` @@ -16528,13 +16528,13 @@ type DescribeEventConfigurationsOutput struct { _ struct{} `type:"structure"` // The creation date of the event configuration. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The event configurations. EventConfigurations map[string]*Configuration `locationName:"eventConfigurations" type:"map"` // The date the event configurations were last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` } // String returns the string representation @@ -17219,7 +17219,7 @@ type DescribeThingRegistrationTaskOutput struct { _ struct{} `type:"structure"` // The task creation date. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The number of things that failed to be provisioned. FailureCount *int64 `locationName:"failureCount" type:"integer"` @@ -17231,7 +17231,7 @@ type DescribeThingRegistrationTaskOutput struct { InputFileKey *string `locationName:"inputFileKey" min:"1" type:"string"` // The date when the task was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The message. Message *string `locationName:"message" type:"string"` @@ -18575,7 +18575,7 @@ type GetPolicyOutput struct { _ struct{} `type:"structure"` // The date the policy was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The default policy version ID. DefaultVersionId *string `locationName:"defaultVersionId" type:"string"` @@ -18584,7 +18584,7 @@ type GetPolicyOutput struct { GenerationId *string `locationName:"generationId" type:"string"` // The date the policy was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The policy ARN. PolicyArn *string `locationName:"policyArn" type:"string"` @@ -18709,7 +18709,7 @@ type GetPolicyVersionOutput struct { _ struct{} `type:"structure"` // The date the policy version was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The generation ID of the policy version. GenerationId *string `locationName:"generationId" type:"string"` @@ -18718,7 +18718,7 @@ type GetPolicyVersionOutput struct { IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` // The date the policy version was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The policy ARN. PolicyArn *string `locationName:"policyArn" type:"string"` @@ -19071,10 +19071,10 @@ type Job struct { Comment *string `locationName:"comment" type:"string"` // The time, in milliseconds since the epoch, when the job was completed. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"` + CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // A short text description of the job. Description *string `locationName:"description" type:"string"` @@ -19099,7 +19099,7 @@ type Job struct { JobProcessDetails *JobProcessDetails `locationName:"jobProcessDetails" type:"structure"` // The time, in milliseconds since the epoch, when the job was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // Configuration for pre-signed S3 URLs. PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` @@ -19238,13 +19238,13 @@ type JobExecution struct { // The time, in milliseconds since the epoch, when the job execution was last // updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution was queued. - QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp" timestampFormat:"unix"` + QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution started. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCESS, CANCELED, // or REJECTED). @@ -19366,13 +19366,13 @@ type JobExecutionSummary struct { // The time, in milliseconds since the epoch, when the job execution was last // updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution was queued. - QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp" timestampFormat:"unix"` + QueuedAt *time.Time `locationName:"queuedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job execution started. - StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"` + StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` // The status of the job execution. Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"` @@ -19618,10 +19618,10 @@ type JobSummary struct { _ struct{} `type:"structure"` // The time, in milliseconds since the epoch, when the job completed. - CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"` + CompletedAt *time.Time `locationName:"completedAt" type:"timestamp"` // The time, in milliseconds since the epoch, when the job was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The job ARN. JobArn *string `locationName:"jobArn" type:"string"` @@ -19630,7 +19630,7 @@ type JobSummary struct { JobId *string `locationName:"jobId" min:"1" type:"string"` // The time, in milliseconds since the epoch, when the job was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // The job summary status. Status *string `locationName:"status" type:"string" enum:"JobStatus"` @@ -22831,7 +22831,7 @@ type OTAUpdateInfo struct { AwsIotJobId *string `locationName:"awsIotJobId" type:"string"` // The date when the OTA update was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // A description of the OTA update. Description *string `locationName:"description" type:"string"` @@ -22840,7 +22840,7 @@ type OTAUpdateInfo struct { ErrorInfo *ErrorInfo `locationName:"errorInfo" type:"structure"` // The date when the OTA update was last updated. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The OTA update ARN. OtaUpdateArn *string `locationName:"otaUpdateArn" type:"string"` @@ -22959,7 +22959,7 @@ type OTAUpdateSummary struct { _ struct{} `type:"structure"` // The date when the OTA update was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The OTA update ARN. OtaUpdateArn *string `locationName:"otaUpdateArn" type:"string"` @@ -23007,10 +23007,10 @@ type OutgoingCertificate struct { CertificateId *string `locationName:"certificateId" min:"64" type:"string"` // The certificate creation date. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The date the transfer was initiated. - TransferDate *time.Time `locationName:"transferDate" type:"timestamp" timestampFormat:"unix"` + TransferDate *time.Time `locationName:"transferDate" type:"timestamp"` // The transfer message. TransferMessage *string `locationName:"transferMessage" type:"string"` @@ -23103,7 +23103,7 @@ type PolicyVersion struct { _ struct{} `type:"structure"` // The date and time the policy was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` // Specifies whether the policy version is the default. IsDefaultVersion *bool `locationName:"isDefaultVersion" type:"boolean"` @@ -23868,13 +23868,13 @@ type RoleAliasDescription struct { _ struct{} `type:"structure"` // The UNIX timestamp of when the role alias was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The number of seconds for which the credential is valid. CredentialDurationSeconds *int64 `locationName:"credentialDurationSeconds" min:"900" type:"integer"` // The UNIX timestamp of when the role alias was last modified. - LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `locationName:"lastModifiedDate" type:"timestamp"` // The role alias owner. Owner *string `locationName:"owner" type:"string"` @@ -24983,7 +24983,7 @@ type StreamInfo struct { _ struct{} `type:"structure"` // The date when the stream was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The description of the stream. Description *string `locationName:"description" type:"string"` @@ -24992,7 +24992,7 @@ type StreamInfo struct { Files []*StreamFile `locationName:"files" min:"1" type:"list"` // The date when the stream was last updated. - LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp" timestampFormat:"unix"` + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // An IAM role AWS IoT assumes to access your S3 files. RoleArn *string `locationName:"roleArn" min:"20" type:"string"` @@ -25498,7 +25498,7 @@ type ThingGroupMetadata struct { _ struct{} `type:"structure"` // The UNIX timestamp of when the thing group was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // The parent thing group name. ParentGroupName *string `locationName:"parentGroupName" min:"1" type:"string"` @@ -25659,14 +25659,14 @@ type ThingTypeMetadata struct { _ struct{} `type:"structure"` // The date and time when the thing type was created. - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` // Whether the thing type is deprecated. If true, no new things could be associated // with this type. Deprecated *bool `locationName:"deprecated" type:"boolean"` // The date and time when the thing type was deprecated. - DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp" timestampFormat:"unix"` + DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` } // String returns the string representation @@ -25742,7 +25742,7 @@ type TopicRule struct { AwsIotSqlVersion *string `locationName:"awsIotSqlVersion" type:"string"` // The date and time the rule was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The description of the rule. Description *string `locationName:"description" type:"string"` @@ -25824,7 +25824,7 @@ type TopicRuleListItem struct { _ struct{} `type:"structure"` // The date and time the rule was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The rule ARN. RuleArn *string `locationName:"ruleArn" type:"string"` @@ -26080,16 +26080,16 @@ type TransferData struct { _ struct{} `type:"structure"` // The date the transfer was accepted. - AcceptDate *time.Time `locationName:"acceptDate" type:"timestamp" timestampFormat:"unix"` + AcceptDate *time.Time `locationName:"acceptDate" type:"timestamp"` // The date the transfer was rejected. - RejectDate *time.Time `locationName:"rejectDate" type:"timestamp" timestampFormat:"unix"` + RejectDate *time.Time `locationName:"rejectDate" type:"timestamp"` // The reason why the transfer was rejected. RejectReason *string `locationName:"rejectReason" type:"string"` // The date the transfer took place. - TransferDate *time.Time `locationName:"transferDate" type:"timestamp" timestampFormat:"unix"` + TransferDate *time.Time `locationName:"transferDate" type:"timestamp"` // The transfer message. TransferMessage *string `locationName:"transferMessage" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go index b99202f131c..b13e6f677f2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go @@ -3687,7 +3687,7 @@ type GetShardIteratorInput struct { // iterator returned is for the next (later) record. If the time stamp is older // than the current trim horizon, the iterator returned is for the oldest untrimmed // data record (TRIM_HORIZON). - Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -3941,7 +3941,7 @@ type ListShardsInput struct { // for. // // You cannot specify this parameter if you specify the NextToken parameter. - StreamCreationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + StreamCreationTimestamp *time.Time `type:"timestamp"` // The name of the data stream whose shards you want to list. // @@ -4769,7 +4769,7 @@ type Record struct { _ struct{} `type:"structure"` // The approximate time that the record was inserted into the stream. - ApproximateArrivalTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + ApproximateArrivalTimestamp *time.Time `type:"timestamp"` // The data blob. The data in the blob is both opaque and immutable to Kinesis // Data Streams, which does not inspect, interpret, or change the data in the @@ -5368,7 +5368,7 @@ type StreamDescription struct { // The approximate time that the stream was created. // // StreamCreationTimestamp is a required field - StreamCreationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"` // The name of the stream being described. // @@ -5516,7 +5516,7 @@ type StreamDescriptionSummary struct { // The approximate time that the stream was created. // // StreamCreationTimestamp is a required field - StreamCreationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StreamCreationTimestamp *time.Time `type:"timestamp" required:"true"` // The name of the stream being described. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index 48efb9dd4be..2c321f04e61 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -6096,7 +6096,7 @@ type GetParametersForImportOutput struct { // The time at which the import token and public key are no longer valid. After // this time, you cannot use them to make an ImportKeyMaterial request and you // must send another GetParametersForImport request to get new ones. - ParametersValidTo *time.Time `type:"timestamp" timestampFormat:"unix"` + ParametersValidTo *time.Time `type:"timestamp"` // The public key to use to encrypt the key material before importing it with // ImportKeyMaterial. @@ -6200,7 +6200,7 @@ type GrantListEntry struct { Constraints *GrantConstraints `type:"structure"` // The date and time when the grant was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The unique identifier for the grant. GrantId *string `min:"1" type:"string"` @@ -6336,7 +6336,7 @@ type ImportKeyMaterialInput struct { // expires, AWS KMS deletes the key material and the CMK becomes unusable. You // must omit this parameter when the ExpirationModel parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE. // Otherwise it is required. - ValidTo *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidTo *time.Time `type:"timestamp"` } // String returns the string representation @@ -6470,11 +6470,11 @@ type KeyMetadata struct { Arn *string `min:"20" type:"string"` // The date and time when the CMK was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationDate *time.Time `type:"timestamp"` // The date and time after which AWS KMS deletes the CMK. This value is present // only when KeyState is PendingDeletion, otherwise this value is omitted. - DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletionDate *time.Time `type:"timestamp"` // The description of the CMK. Description *string `type:"string"` @@ -6519,7 +6519,7 @@ type KeyMetadata struct { // expires, AWS KMS deletes the key material and the CMK becomes unusable. This // value is present only for CMKs whose Origin is EXTERNAL and whose ExpirationModel // is KEY_MATERIAL_EXPIRES, otherwise this value is omitted. - ValidTo *time.Time `type:"timestamp" timestampFormat:"unix"` + ValidTo *time.Time `type:"timestamp"` } // String returns the string representation @@ -7803,7 +7803,7 @@ type ScheduleKeyDeletionOutput struct { _ struct{} `type:"structure"` // The date and time after which AWS KMS deletes the customer master key (CMK). - DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletionDate *time.Time `type:"timestamp"` // The unique identifier of the customer master key (CMK) for which deletion // is scheduled. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index 28ba4fc830f..cd81e47904d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -3744,7 +3744,7 @@ type CreateEventSourceMappingInput struct { // returned is for the next (later) record. If the timestamp is older than the // current trim horizon, the iterator returned is for the oldest untrimmed data // record (TRIM_HORIZON). Valid only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). - StartingPositionTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + StartingPositionTimestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -4448,7 +4448,7 @@ type EventSourceMappingConfiguration struct { FunctionArn *string `type:"string"` // The UTC time string indicating the last time the event mapping was updated. - LastModified *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModified *time.Time `type:"timestamp"` // The result of the last AWS Lambda invocation of your Lambda function. LastProcessingResult *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go index c396a9b784f..f38a1957106 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go @@ -4249,14 +4249,14 @@ type BotAliasMetadata struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot alias. Description *string `locationName:"description" type:"string"` // The date that the bot alias was updated. When you create a resource, the // creation date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the bot alias. Name *string `locationName:"name" min:"1" type:"string"` @@ -4334,7 +4334,7 @@ type BotChannelAssociation struct { // The date that the association between the Amazon Lex bot and the channel // was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A text description of the association you are creating. Description *string `locationName:"description" type:"string"` @@ -4430,14 +4430,14 @@ type BotMetadata struct { _ struct{} `type:"structure"` // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` // The date that the bot was updated. When you create a bot, the creation date // and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the bot. Name *string `locationName:"name" min:"2" type:"string"` @@ -4745,7 +4745,7 @@ type CreateBotVersionOutput struct { ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` // The date when the bot version was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` @@ -4762,7 +4762,7 @@ type CreateBotVersionOutput struct { Intents []*Intent `locationName:"intents" type:"list"` // The date when the $LATEST version of this bot was updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // Specifies the target locale for the bot. Locale *string `locationName:"locale" type:"string" enum:"Locale"` @@ -4954,7 +4954,7 @@ type CreateIntentVersionOutput struct { ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` @@ -4970,7 +4970,7 @@ type CreateIntentVersionOutput struct { FulfillmentActivity *FulfillmentActivity `locationName:"fulfillmentActivity" type:"structure"` // The date that the intent was updated. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -5155,7 +5155,7 @@ type CreateSlotTypeVersionOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` @@ -5166,7 +5166,7 @@ type CreateSlotTypeVersionOutput struct { // The date that the slot type was updated. When you create a resource, the // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -6128,14 +6128,14 @@ type GetBotAliasOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot alias. Description *string `locationName:"description" type:"string"` // The date that the bot alias was updated. When you create a resource, the // creation date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the bot alias. Name *string `locationName:"name" min:"1" type:"string"` @@ -6400,7 +6400,7 @@ type GetBotChannelAssociationOutput struct { BotName *string `locationName:"botName" min:"2" type:"string"` // The date that the association between the bot and the channel was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the association between the bot and the channel. Description *string `locationName:"description" type:"string"` @@ -6721,7 +6721,7 @@ type GetBotOutput struct { ClarificationPrompt *Prompt `locationName:"clarificationPrompt" type:"structure"` // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` @@ -6738,7 +6738,7 @@ type GetBotOutput struct { // The date that the bot was updated. When you create a resource, the creation // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The target locale for the bot. Locale *string `locationName:"locale" type:"string" enum:"Locale"` @@ -7562,7 +7562,7 @@ type GetImportOutput struct { _ struct{} `type:"structure"` // A timestamp for the date and time that the import job was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A string that describes why an import job failed to complete. FailureReason []*string `locationName:"failureReason" type:"list"` @@ -7710,7 +7710,7 @@ type GetIntentOutput struct { ConfirmationPrompt *Prompt `locationName:"confirmationPrompt" type:"structure"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` @@ -7728,7 +7728,7 @@ type GetIntentOutput struct { // The date that the intent was updated. When you create a resource, the creation // date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -8112,7 +8112,7 @@ type GetSlotTypeOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` @@ -8123,7 +8123,7 @@ type GetSlotTypeOutput struct { // The date that the slot type was updated. When you create a resource, the // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -8565,14 +8565,14 @@ type IntentMetadata struct { _ struct{} `type:"structure"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` // The date that the intent was updated. When you create an intent, the creation // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -8893,14 +8893,14 @@ type PutBotAliasOutput struct { Checksum *string `locationName:"checksum" type:"string"` // The date that the bot alias was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the alias. Description *string `locationName:"description" type:"string"` // The date that the bot alias was updated. When you create a resource, the // creation date and the last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the alias. Name *string `locationName:"name" min:"1" type:"string"` @@ -9251,7 +9251,7 @@ type PutBotOutput struct { CreateVersion *bool `locationName:"createVersion" type:"boolean"` // The date that the bot was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the bot. Description *string `locationName:"description" type:"string"` @@ -9269,7 +9269,7 @@ type PutBotOutput struct { // The date that the bot was updated. When you create a resource, the creation // date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The target locale for the bot. Locale *string `locationName:"locale" type:"string" enum:"Locale"` @@ -9683,7 +9683,7 @@ type PutIntentOutput struct { CreateVersion *bool `locationName:"createVersion" type:"boolean"` // The date that the intent was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the intent. Description *string `locationName:"description" type:"string"` @@ -9703,7 +9703,7 @@ type PutIntentOutput struct { // The date that the intent was updated. When you create a resource, the creation // date and last update dates are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the intent. Name *string `locationName:"name" min:"1" type:"string"` @@ -9973,7 +9973,7 @@ type PutSlotTypeOutput struct { CreateVersion *bool `locationName:"createVersion" type:"boolean"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` @@ -9984,7 +9984,7 @@ type PutSlotTypeOutput struct { // The date that the slot type was updated. When you create a slot type, the // creation date and last update date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -10248,14 +10248,14 @@ type SlotTypeMetadata struct { _ struct{} `type:"structure"` // The date that the slot type was created. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // A description of the slot type. Description *string `locationName:"description" type:"string"` // The date that the slot type was updated. When you create a resource, the // creation date and last updated date are the same. - LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"unix"` + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp"` // The name of the slot type. Name *string `locationName:"name" min:"1" type:"string"` @@ -10393,7 +10393,7 @@ type StartImportOutput struct { _ struct{} `type:"structure"` // A timestamp for the date and time that the import job was requested. - CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` // The identifier for the specific import job. ImportId *string `locationName:"importId" type:"string"` @@ -10537,10 +10537,10 @@ type UtteranceData struct { DistinctUsers *int64 `locationName:"distinctUsers" type:"integer"` // The date that the utterance was first recorded. - FirstUtteredDate *time.Time `locationName:"firstUtteredDate" type:"timestamp" timestampFormat:"unix"` + FirstUtteredDate *time.Time `locationName:"firstUtteredDate" type:"timestamp"` // The date that the utterance was last recorded. - LastUtteredDate *time.Time `locationName:"lastUtteredDate" type:"timestamp" timestampFormat:"unix"` + LastUtteredDate *time.Time `locationName:"lastUtteredDate" type:"timestamp"` // The text that was entered by the user or the text representation of an audio // clip. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 0feedda0afc..8178113cfb3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -10166,7 +10166,7 @@ type Disk struct { AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` // The date when the disk was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // (Deprecated) The number of GB in use by the disk. // @@ -10349,7 +10349,7 @@ type DiskSnapshot struct { Arn *string `locationName:"arn" type:"string"` // The date when the disk snapshot was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The Amazon Resource Name (ARN) of the source disk from which you are creating // the disk snapshot. @@ -10466,7 +10466,7 @@ type Domain struct { Arn *string `locationName:"arn" type:"string"` // The date when the domain recordset was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // An array of key-value pairs containing information about the domain entries. DomainEntries []*DomainEntry `locationName:"domainEntries" type:"list"` @@ -11325,7 +11325,7 @@ type GetInstanceMetricDataInput struct { // The end time of the time period. // // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix" required:"true"` + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` // The name of the instance for which you want to get metrics data. // @@ -11345,7 +11345,7 @@ type GetInstanceMetricDataInput struct { // The start time of the time period. // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` // The instance statistics. // @@ -11961,7 +11961,7 @@ type GetLoadBalancerMetricDataInput struct { // The end time of the period. // // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"unix" required:"true"` + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` // The name of the load balancer. // @@ -12061,7 +12061,7 @@ type GetLoadBalancerMetricDataInput struct { // The start time of the period. // // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` // An array of statistics that you want to request metrics for. Valid values // are listed below. @@ -12906,7 +12906,7 @@ type Instance struct { BundleId *string `locationName:"bundleId" type:"string"` // The timestamp when the instance was created (e.g., 1479734909.17). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The size of the vCPU and the amount of RAM for the instance. Hardware *InstanceHardware `locationName:"hardware" type:"structure"` @@ -13080,7 +13080,7 @@ type InstanceAccessDetails struct { CertKey *string `locationName:"certKey" type:"string"` // For SSH access, the date on which the temporary keys expire. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unix"` + ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` // The name of this Amazon Lightsail instance. InstanceName *string `locationName:"instanceName" type:"string"` @@ -13519,7 +13519,7 @@ type InstanceSnapshot struct { Arn *string `locationName:"arn" type:"string"` // The timestamp when the snapshot was created (e.g., 1479907467.024). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // An array of disk objects containing information about all block storage disks. FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` @@ -13735,7 +13735,7 @@ type KeyPair struct { Arn *string `locationName:"arn" type:"string"` // The timestamp when the key pair was created (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The RSA fingerprint of the key pair. Fingerprint *string `locationName:"fingerprint" type:"string"` @@ -13819,7 +13819,7 @@ type LoadBalancer struct { ConfigurationOptions map[string]*string `locationName:"configurationOptions" type:"map"` // The date when your load balancer was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The DNS name of your Lightsail load balancer. DnsName *string `locationName:"dnsName" type:"string"` @@ -13979,7 +13979,7 @@ type LoadBalancerTlsCertificate struct { Arn *string `locationName:"arn" type:"string"` // The time when you created your SSL/TLS certificate. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The domain name for your SSL/TLS certificate. DomainName *string `locationName:"domainName" type:"string"` @@ -13995,7 +13995,7 @@ type LoadBalancerTlsCertificate struct { IsAttached *bool `locationName:"isAttached" type:"boolean"` // The time when the SSL/TLS certificate was issued. - IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp" timestampFormat:"unix"` + IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp"` // The issuer of the certificate. Issuer *string `locationName:"issuer" type:"string"` @@ -14014,10 +14014,10 @@ type LoadBalancerTlsCertificate struct { Name *string `locationName:"name" type:"string"` // The timestamp when the SSL/TLS certificate expires. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"unix"` + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` // The timestamp when the SSL/TLS certificate is first valid. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"unix"` + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` // An object containing information about the status of Lightsail's managed // renewal for the certificate. @@ -14051,7 +14051,7 @@ type LoadBalancerTlsCertificate struct { RevocationReason *string `locationName:"revocationReason" type:"string" enum:"LoadBalancerTlsCertificateRevocationReason"` // The timestamp when the SSL/TLS certificate was revoked. - RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp" timestampFormat:"unix"` + RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp"` // The serial number of the certificate. Serial *string `locationName:"serial" type:"string"` @@ -14418,7 +14418,7 @@ type MetricDatapoint struct { Sum *float64 `locationName:"sum" type:"double"` // The timestamp (e.g., 1479816991.349). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` // The unit. Unit *string `locationName:"unit" type:"string" enum:"MetricUnit"` @@ -14581,7 +14581,7 @@ type Operation struct { _ struct{} `type:"structure"` // The timestamp when the operation was initialized (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The error code. ErrorCode *string `locationName:"errorCode" type:"string"` @@ -14614,7 +14614,7 @@ type Operation struct { Status *string `locationName:"status" type:"string" enum:"OperationStatus"` // The timestamp when the status was changed (e.g., 1479816991.349). - StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp" timestampFormat:"unix"` + StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp"` } // String returns the string representation @@ -15194,7 +15194,7 @@ type StaticIp struct { AttachedTo *string `locationName:"attachedTo" type:"string"` // The timestamp when the static IP was created (e.g., 1479735304.222). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The static IP address. IpAddress *string `locationName:"ipAddress" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go index 3364552ebfd..715cf06c1ee 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go @@ -8913,7 +8913,7 @@ type Job struct { Arn *string `locationName:"arn" type:"string"` // The time, in Unix epoch format in seconds, when the job got created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601"` // Error code for the job ErrorCode *int64 `locationName:"errorCode" type:"integer"` @@ -9206,13 +9206,13 @@ type JobTemplate struct { Category *string `locationName:"category" type:"string"` // The timestamp in epoch seconds for Job template creation. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601"` // An optional description you create for each job template. Description *string `locationName:"description" type:"string"` // The timestamp in epoch seconds when the Job template was last updated. - LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"iso8601"` // A name you create for each job template. Each name must be unique within // your account. @@ -11937,13 +11937,13 @@ type Preset struct { Category *string `locationName:"category" type:"string"` // The timestamp in epoch seconds for preset creation. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601"` // An optional description you create for each preset. Description *string `locationName:"description" type:"string"` // The timestamp in epoch seconds when the preset was last updated. - LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"iso8601"` // A name you create for each preset. Each name must be unique within your account. // @@ -12293,13 +12293,13 @@ type Queue struct { Arn *string `locationName:"arn" type:"string"` // The timestamp in epoch seconds for queue creation. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"iso8601"` // An optional description you create for each queue. Description *string `locationName:"description" type:"string"` // The timestamp in epoch seconds when the queue was last updated. - LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unix"` + LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"iso8601"` // A name you create for each queue. Each name must be unique within your account. // @@ -13124,13 +13124,13 @@ type Timing struct { _ struct{} `type:"structure"` // The time, in Unix epoch format, that the transcoding job finished - FinishTime *time.Time `locationName:"finishTime" type:"timestamp" timestampFormat:"unix"` + FinishTime *time.Time `locationName:"finishTime" type:"timestamp" timestampFormat:"iso8601"` // The time, in Unix epoch format, that transcoding for the job began. - StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` // The time, in Unix epoch format, that you submitted the job. - SubmitTime *time.Time `locationName:"submitTime" type:"timestamp" timestampFormat:"unix"` + SubmitTime *time.Time `locationName:"submitTime" type:"timestamp" timestampFormat:"iso8601"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go index b46ace6a6b7..fa47d515063 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go @@ -1773,6 +1773,13 @@ type DashPackage struct { // Streaming over HTTP (DASH) Media Presentation Description (MPD). MinUpdatePeriodSeconds *int64 `locationName:"minUpdatePeriodSeconds" type:"integer"` + // A list of triggers that controls when the outgoing Dynamic Adaptive Streaming + // over HTTP (DASH)Media Presentation Description (MPD) will be partitioned + // into multiple periods. If empty, the content will notbe partitioned into + // more than one period. If the list contains "ADS", new periods will be created + // wherethe Channel source contains SCTE-35 ad markers. + PeriodTriggers []*string `locationName:"periodTriggers" type:"list"` + // The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to // "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. Profile *string `locationName:"profile" type:"string" enum:"Profile"` @@ -1837,6 +1844,12 @@ func (s *DashPackage) SetMinUpdatePeriodSeconds(v int64) *DashPackage { return s } +// SetPeriodTriggers sets the PeriodTriggers field's value. +func (s *DashPackage) SetPeriodTriggers(v []*string) *DashPackage { + s.PeriodTriggers = v + return s +} + // SetProfile sets the Profile field's value. func (s *DashPackage) SetProfile(v string) *DashPackage { s.Profile = &v @@ -3687,3 +3700,8 @@ const ( // StreamOrderVideoBitrateDescending is a StreamOrder enum value StreamOrderVideoBitrateDescending = "VIDEO_BITRATE_DESCENDING" ) + +const ( + // __PeriodTriggersElementAds is a __PeriodTriggersElement enum value + __PeriodTriggersElementAds = "ADS" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go index 172f138eb0f..5d6baf7edd2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go @@ -923,7 +923,7 @@ type Container struct { ARN *string `min:"1" type:"string"` // Unix timestamp. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The DNS endpoint of the container. Use the endpoint to identify the specific // container when sending requests to the data plane. The service assigns this diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go index dfaaf25fe01..8a719cdde32 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go @@ -556,7 +556,7 @@ type DescribeObjectOutput struct { ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` // The date and time that the object was last modified. - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` } // String returns the string representation @@ -699,7 +699,7 @@ type GetObjectOutput struct { ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` // The date and time that the object was last modified. - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // The HTML status code of the request. Status codes ranging from 200 to 299 // indicate success. All other status codes indicate the type of error that @@ -781,7 +781,7 @@ type Item struct { ETag *string `min:"1" type:"string"` // The date and time that the item was last modified. - LastModified *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModified *time.Time `type:"timestamp"` // The name of the item. Name *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go index ecf6f2b286b..fc722da8e85 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go @@ -8302,7 +8302,7 @@ type DBCluster struct { // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) for the DB cluster. DBClusterArn *string `type:"string"` @@ -8336,7 +8336,7 @@ type DBCluster struct { // Specifies the earliest time to which a database can be restored with point-in-time // restore. - EarliestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EarliestRestorableTime *time.Time `type:"timestamp"` // Specifies the connection endpoint for the primary instance of the DB cluster. Endpoint *string `type:"string"` @@ -8360,7 +8360,7 @@ type DBCluster struct { // Specifies the latest time to which a database can be restored with point-in-time // restore. - LatestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestRestorableTime *time.Time `type:"timestamp"` // Contains the master username for the DB cluster. MasterUsername *string `type:"string"` @@ -8837,7 +8837,7 @@ type DBClusterSnapshot struct { // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // Specifies the DB cluster identifier of the DB cluster that this DB cluster // snapshot was created from. @@ -8878,7 +8878,7 @@ type DBClusterSnapshot struct { // Provides the time when the snapshot was taken, in Universal Coordinated Time // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` // Provides the type of the DB cluster snapshot. SnapshotType *string `type:"string"` @@ -9337,7 +9337,7 @@ type DBInstance struct { IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` // Provides the date and time the DB instance was created. - InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + InstanceCreateTime *time.Time `type:"timestamp"` // Specifies the Provisioned IOPS (I/O operations per second) value. Iops *int64 `type:"integer"` @@ -9348,7 +9348,7 @@ type DBInstance struct { // Specifies the latest time to which a database can be restored with point-in-time // restore. - LatestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestRestorableTime *time.Time `type:"timestamp"` // License model information for this DB instance. LicenseModel *string `type:"string"` @@ -12272,7 +12272,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // A list of event categories that trigger notifications for a event notification // subscription. @@ -12325,7 +12325,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -12979,7 +12979,7 @@ type Event struct { _ struct{} `type:"structure"` // Specifies the date and time of the event. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Date *time.Time `type:"timestamp"` // Specifies the category for the event. EventCategories []*string `locationNameList:"EventCategory" type:"list"` @@ -15053,14 +15053,14 @@ type PendingMaintenanceAction struct { // action is applied to the resource during its first maintenance window after // this date. If this date is specified, any next-maintenance opt-in requests // are ignored. - AutoAppliedAfterDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + AutoAppliedAfterDate *time.Time `type:"timestamp"` // The effective date when the pending maintenance action is applied to the // resource. This date takes into account opt-in requests received from the // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the ForcedApplyDate. // This value is blank if an opt-in request has not been received and nothing // has been specified as AutoAppliedAfterDate or ForcedApplyDate. - CurrentApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CurrentApplyDate *time.Time `type:"timestamp"` // A description providing more detail about the maintenance action. Description *string `type:"string"` @@ -15069,7 +15069,7 @@ type PendingMaintenanceAction struct { // action is applied to the resource on this date regardless of the maintenance // window for the resource. If this date is specified, any immediate opt-in // requests are ignored. - ForcedApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ForcedApplyDate *time.Time `type:"timestamp"` // Indicates the type of opt-in request that has been received for the resource. OptInStatus *string `type:"string"` @@ -16209,7 +16209,7 @@ type RestoreDBClusterToPointInTimeInput struct { // * Cannot be specified if RestoreType parameter is copy-on-write // // Example: 2015-03-07T23:45:00Z - RestoreToTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RestoreToTime *time.Time `type:"timestamp"` // The type of restore to be performed. You can specify one of the following // values: diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go index 7edb4447e35..104582b80fc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go @@ -9499,7 +9499,7 @@ type Account struct { JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"` // The date the account became a part of the organization. - JoinedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + JoinedTimestamp *time.Time `type:"timestamp"` // The friendly name of the account. // @@ -9908,7 +9908,7 @@ type CreateAccountStatus struct { AccountName *string `min:"1" type:"string"` // The date and time that the account was created and the request completed. - CompletedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletedTimestamp *time.Time `type:"timestamp"` // If the request failed, a description of the reason for the failure. // @@ -9937,7 +9937,7 @@ type CreateAccountStatus struct { Id *string `type:"string"` // The date and time that the request was made for the account creation. - RequestedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedTimestamp *time.Time `type:"timestamp"` // The status of the request. State *string `type:"string" enum:"CreateAccountState"` @@ -11242,7 +11242,7 @@ type EnabledServicePrincipal struct { // The date that the service principal was enabled for integration with AWS // Organizations. - DateEnabled *time.Time `type:"timestamp" timestampFormat:"unix"` + DateEnabled *time.Time `type:"timestamp"` // The name of the service principal. This is typically in the form of a URL, // such as: servicename.amazonaws.com. @@ -11310,7 +11310,7 @@ type Handshake struct { // The date and time that the handshake expires. If the recipient of the handshake // request fails to respond before the specified date and time, the handshake // becomes inactive and is no longer valid. - ExpirationTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationTimestamp *time.Time `type:"timestamp"` // The unique identifier (ID) of a handshake. The originating account creates // the ID when it initiates the handshake. @@ -11323,7 +11323,7 @@ type Handshake struct { Parties []*HandshakeParty `type:"list"` // The date and time that the handshake request was made. - RequestedTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedTimestamp *time.Time `type:"timestamp"` // Additional information that is needed to process the handshake. Resources []*HandshakeResource `type:"list"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 51b8dcf6bb7..241078f2170 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -10382,7 +10382,7 @@ type BacktrackDBClusterInput struct { // Example: 2017-07-08T18:00Z // // BacktrackTo is a required field - BacktrackTo *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + BacktrackTo *time.Time `type:"timestamp" required:"true"` // The DB cluster identifier of the DB cluster to be backtracked. This parameter // is stored as a lowercase string. @@ -10469,13 +10469,13 @@ type BacktrackDBClusterOutput struct { BacktrackIdentifier *string `type:"string"` // The timestamp of the time at which the backtrack was requested. - BacktrackRequestCreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + BacktrackRequestCreationTime *time.Time `type:"timestamp"` // The timestamp of the time to which the DB cluster was backtracked. - BacktrackTo *time.Time `type:"timestamp" timestampFormat:"iso8601"` + BacktrackTo *time.Time `type:"timestamp"` // The timestamp of the time from which the DB cluster was backtracked. - BacktrackedFrom *time.Time `type:"timestamp" timestampFormat:"iso8601"` + BacktrackedFrom *time.Time `type:"timestamp"` // Contains a user-supplied DB cluster identifier. This identifier is the unique // key that identifies a DB cluster. @@ -10560,10 +10560,10 @@ type Certificate struct { Thumbprint *string `type:"string"` // The starting date from which the certificate is valid. - ValidFrom *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidFrom *time.Time `type:"timestamp"` // The final date that the certificate continues to be valid. - ValidTill *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ValidTill *time.Time `type:"timestamp"` } // String returns the string representation @@ -14410,7 +14410,7 @@ type DBCluster struct { // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) for the DB cluster. DBClusterArn *string `type:"string"` @@ -14443,11 +14443,11 @@ type DBCluster struct { DbClusterResourceId *string `type:"string"` // The earliest time to which a DB cluster can be backtracked. - EarliestBacktrackTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EarliestBacktrackTime *time.Time `type:"timestamp"` // The earliest time to which a database can be restored with point-in-time // restore. - EarliestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EarliestRestorableTime *time.Time `type:"timestamp"` // A list of log types that this DB cluster is configured to export to CloudWatch // Logs. @@ -14475,7 +14475,7 @@ type DBCluster struct { // Specifies the latest time to which a database can be restored with point-in-time // restore. - LatestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestRestorableTime *time.Time `type:"timestamp"` // Contains the master username for the DB cluster. MasterUsername *string `type:"string"` @@ -15010,7 +15010,7 @@ type DBClusterSnapshot struct { // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // Specifies the DB cluster identifier of the DB cluster that this DB cluster // snapshot was created from. @@ -15051,7 +15051,7 @@ type DBClusterSnapshot struct { // Provides the time when the snapshot was taken, in Universal Coordinated Time // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` // Provides the type of the DB cluster snapshot. SnapshotType *string `type:"string"` @@ -15535,7 +15535,7 @@ type DBInstance struct { IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` // Provides the date and time the DB instance was created. - InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + InstanceCreateTime *time.Time `type:"timestamp"` // Specifies the Provisioned IOPS (I/O operations per second) value. Iops *int64 `type:"integer"` @@ -15546,7 +15546,7 @@ type DBInstance struct { // Specifies the latest time to which a database can be restored with point-in-time // restore. - LatestRestorableTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LatestRestorableTime *time.Time `type:"timestamp"` // License model information for this DB instance. LicenseModel *string `type:"string"` @@ -16335,7 +16335,7 @@ type DBSnapshot struct { // Specifies the time when the snapshot was taken, in Universal Coordinated // Time (UTC). - InstanceCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + InstanceCreateTime *time.Time `type:"timestamp"` // Specifies the Provisioned IOPS (I/O operations per second) value of the DB // instance at the time of the snapshot. @@ -16366,7 +16366,7 @@ type DBSnapshot struct { // Provides the time when the snapshot was taken, in Universal Coordinated Time // (UTC). - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` // Provides the type of the DB snapshot. SnapshotType *string `type:"string"` @@ -20050,7 +20050,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // A list of event categories that trigger notifications for a event notification // subscription. @@ -20103,7 +20103,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -21690,7 +21690,7 @@ type Event struct { _ struct{} `type:"structure"` // Specifies the date and time of the event. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Date *time.Time `type:"timestamp"` // Specifies the category for the event. EventCategories []*string `locationNameList:"EventCategory" type:"list"` @@ -25016,14 +25016,14 @@ type PendingMaintenanceAction struct { // action is applied to the resource during its first maintenance window after // this date. If this date is specified, any next-maintenance opt-in requests // are ignored. - AutoAppliedAfterDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + AutoAppliedAfterDate *time.Time `type:"timestamp"` // The effective date when the pending maintenance action is applied to the // resource. This date takes into account opt-in requests received from the // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate, and the ForcedApplyDate. // This value is blank if an opt-in request has not been received and nothing // has been specified as AutoAppliedAfterDate or ForcedApplyDate. - CurrentApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CurrentApplyDate *time.Time `type:"timestamp"` // A description providing more detail about the maintenance action. Description *string `type:"string"` @@ -25032,7 +25032,7 @@ type PendingMaintenanceAction struct { // action is applied to the resource on this date regardless of the maintenance // window for the resource. If this date is specified, any immediate opt-in // requests are ignored. - ForcedApplyDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ForcedApplyDate *time.Time `type:"timestamp"` // Indicates the type of opt-in request that has been received for the resource. OptInStatus *string `type:"string"` @@ -25999,7 +25999,7 @@ type ReservedDBInstance struct { ReservedDBInstancesOfferingId *string `type:"string"` // The time the reservation started. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // The state of the reserved DB instance. State *string `type:"string"` @@ -27201,7 +27201,7 @@ type RestoreDBClusterToPointInTimeInput struct { // * Cannot be specified if RestoreType parameter is copy-on-write // // Example: 2015-03-07T23:45:00Z - RestoreToTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RestoreToTime *time.Time `type:"timestamp"` // The type of restore to be performed. You can specify one of the following // values: @@ -28566,7 +28566,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // * Cannot be specified if UseLatestRestorableTime parameter is true // // Example: 2009-09-07T23:45:00Z - RestoreTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RestoreTime *time.Time `type:"timestamp"` // The identifier of the source DB instance from which to restore. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index 48e7cf4a539..82e996e83cb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -7658,7 +7658,7 @@ type Cluster struct { AvailabilityZone *string `type:"string"` // The date and time that the cluster was created. - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // The unique identifier of the cluster. ClusterIdentifier *string `type:"string"` @@ -8041,7 +8041,7 @@ type ClusterDbRevision struct { CurrentDatabaseRevision *string `type:"string"` // The date on which the database revision was released. - DatabaseRevisionReleaseDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DatabaseRevisionReleaseDate *time.Time `type:"timestamp"` // A list of RevisionTarget objects, where each object describes the database // revision that a cluster can be updated to. @@ -11331,7 +11331,7 @@ type DescribeClusterSnapshotsInput struct { // about ISO 8601, go to the ISO8601 Wikipedia page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2012-07-16T18:00:00Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // An optional parameter that specifies the starting point to return a set of // response records. When the results of a DescribeClusterSnapshots request @@ -11371,7 +11371,7 @@ type DescribeClusterSnapshotsInput struct { // ISO 8601, go to the ISO8601 Wikipedia page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2012-07-16T18:00:00Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // A tag key or keys for which you want to return all matching cluster snapshots // that are associated with the specified key or keys. For example, suppose @@ -12124,7 +12124,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + EndTime *time.Time `type:"timestamp"` // An optional parameter that specifies the starting point to return a set of // response records. When the results of a DescribeEvents request exceed the @@ -12183,7 +12183,7 @@ type DescribeEventsInput struct { // page. (http://en.wikipedia.org/wiki/ISO_8601) // // Example: 2009-07-08T18:00Z - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -13808,7 +13808,7 @@ type Event struct { _ struct{} `type:"structure"` // The date and time of the event. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Date *time.Time `type:"timestamp"` // A list of the event categories. // @@ -14023,7 +14023,7 @@ type EventSubscription struct { // The date and time the Amazon Redshift event notification subscription was // created. - SubscriptionCreationTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SubscriptionCreationTime *time.Time `type:"timestamp"` // The list of tags for the event subscription. Tags []*Tag `locationNameList:"Tag" type:"list"` @@ -14276,7 +14276,7 @@ type GetClusterCredentialsOutput struct { DbUser *string `type:"string"` // The date and time the password in DbPassword expires. - Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Expiration *time.Time `type:"timestamp"` } // String returns the string representation @@ -14608,10 +14608,10 @@ type LoggingStatus struct { LastFailureMessage *string `type:"string"` // The last time when logs failed to be delivered. - LastFailureTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastFailureTime *time.Time `type:"timestamp"` // The last time that logs were delivered. - LastSuccessfulDeliveryTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastSuccessfulDeliveryTime *time.Time `type:"timestamp"` // true if logging is on, false if logging is off. LoggingEnabled *bool `type:"boolean"` @@ -16016,7 +16016,7 @@ type ReservedNode struct { // The time the reservation started. You purchase a reserved node offering for // a duration. This is the start time of that duration. - StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + StartTime *time.Time `type:"timestamp"` // The state of the reserved compute node. // @@ -16875,7 +16875,7 @@ type RevisionTarget struct { DatabaseRevision *string `type:"string"` // The date on which the database revision was released. - DatabaseRevisionReleaseDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + DatabaseRevisionReleaseDate *time.Time `type:"timestamp"` // A string that describes the changes and features that will be applied to // the cluster when it is updated to the corresponding ClusterDbRevision. @@ -17176,7 +17176,7 @@ type Snapshot struct { BackupProgressInMegaBytes *float64 `type:"double"` // The time (UTC) when the cluster was originally created. - ClusterCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ClusterCreateTime *time.Time `type:"timestamp"` // The identifier of the cluster for which the snapshot was taken. ClusterIdentifier *string `type:"string"` @@ -17244,7 +17244,7 @@ type Snapshot struct { // The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains // a copy of the cluster data as of this exact time. - SnapshotCreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + SnapshotCreateTime *time.Time `type:"timestamp"` // The snapshot identifier that is provided in the request. SnapshotIdentifier *string `type:"string"` @@ -17598,7 +17598,7 @@ type TableRestoreStatus struct { // The time that the table restore request was made, in Universal Coordinated // Time (UTC). - RequestTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + RequestTime *time.Time `type:"timestamp"` // The identifier of the snapshot that the table is being restored from. SnapshotIdentifier *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index 5357821e837..97351a76f05 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -6401,7 +6401,7 @@ type ChangeInfo struct { // at 17:48:16.751 UTC. // // SubmittedAt is a required field - SubmittedAt *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + SubmittedAt *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -13275,7 +13275,7 @@ type StatusReport struct { // 8601 format (https://en.wikipedia.org/wiki/ISO_8601) and Coordinated Universal // Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March // 27, 2017 at 17:48:16.751 UTC. - CheckedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CheckedTime *time.Time `type:"timestamp"` // A description of the status of the health check endpoint as reported by one // of the Amazon Route 53 health checkers. diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 523f6b601c3..0e999ca3302 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -6820,7 +6820,7 @@ type Bucket struct { _ struct{} `type:"structure"` // Date the bucket was created. - CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreationDate *time.Time `type:"timestamp"` // The name of the bucket. Name *string `type:"string"` @@ -7637,14 +7637,14 @@ type CopyObjectInput struct { CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` // Copies the object if it has been modified since the specified time. - CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"` // Copies the object if its entity tag (ETag) is different than the specified // ETag. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` // Copies the object if it hasn't been modified since the specified time. - CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"` // Specifies the algorithm to use when decrypting the source object (e.g., AES256). CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"` @@ -7660,7 +7660,7 @@ type CopyObjectInput struct { CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` + Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` @@ -8089,7 +8089,7 @@ type CopyObjectResult struct { ETag *string `type:"string"` - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` } // String returns the string representation @@ -8121,7 +8121,7 @@ type CopyPartResult struct { ETag *string `type:"string"` // Date and time at which the object was uploaded. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` } // String returns the string representation @@ -8325,7 +8325,7 @@ type CreateMultipartUploadInput struct { ContentType *string `location:"header" locationName:"Content-Type" type:"string"` // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` + Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` @@ -8573,7 +8573,7 @@ type CreateMultipartUploadOutput struct { _ struct{} `type:"structure"` // Date when multipart upload will become eligible for abort operation by lifecycle. - AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"` + AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"` // Id of the lifecycle rule that makes a multipart upload eligible for abort // operation. @@ -9433,7 +9433,7 @@ type DeleteMarkerEntry struct { Key *string `min:"1" type:"string"` // Date and time the object was last modified. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` Owner *Owner `type:"structure"` @@ -11589,7 +11589,7 @@ type GetObjectInput struct { // Return the object only if it has been modified since the specified time, // otherwise return a 304 (not modified). - IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"` // Return the object only if its entity tag (ETag) is different from the one // specified, otherwise return a 304 (not modified). @@ -11597,7 +11597,7 @@ type GetObjectInput struct { // Return the object only if it has not been modified since the specified time, // otherwise return a 412 (precondition failed). - IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"` // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -11633,7 +11633,7 @@ type GetObjectInput struct { ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"` // Sets the Expires header of the response. - ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"` + ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"` // Specifies the algorithm to use to when encrypting the object (e.g., AES256). SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` @@ -11860,7 +11860,7 @@ type GetObjectOutput struct { Expires *string `location:"header" locationName:"Expires" type:"string"` // Last modified date of the object - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` @@ -12520,7 +12520,7 @@ type HeadObjectInput struct { // Return the object only if it has been modified since the specified time, // otherwise return a 304 (not modified). - IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"` // Return the object only if its entity tag (ETag) is different from the one // specified, otherwise return a 304 (not modified). @@ -12528,7 +12528,7 @@ type HeadObjectInput struct { // Return the object only if it has not been modified since the specified time, // otherwise return a 412 (precondition failed). - IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"` + IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"` // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -12732,7 +12732,7 @@ type HeadObjectOutput struct { Expires *string `location:"header" locationName:"Expires" type:"string"` // Last modified date of the object - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` @@ -15350,7 +15350,7 @@ type ListPartsOutput struct { _ struct{} `type:"structure"` // Date when multipart upload will become eligible for abort operation by lifecycle. - AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"` + AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"` // Id of the lifecycle rule that makes a multipart upload eligible for abort // operation. @@ -15906,7 +15906,7 @@ type MultipartUpload struct { _ struct{} `type:"structure"` // Date and time at which the multipart upload was initiated. - Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Initiated *time.Time `type:"timestamp"` // Identifies who initiated the multipart upload. Initiator *Initiator `type:"structure"` @@ -16194,7 +16194,7 @@ type Object struct { Key *string `min:"1" type:"string"` - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` Owner *Owner `type:"structure"` @@ -16313,7 +16313,7 @@ type ObjectVersion struct { Key *string `min:"1" type:"string"` // Date and time the object was last modified. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` Owner *Owner `type:"structure"` @@ -16494,7 +16494,7 @@ type Part struct { ETag *string `type:"string"` // Date and time at which the part was uploaded. - LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastModified *time.Time `type:"timestamp"` // Part number identifying the part. This is a positive integer between 1 and // 10,000. @@ -18276,7 +18276,7 @@ type PutObjectInput struct { ContentType *string `location:"header" locationName:"Content-Type" type:"string"` // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` + Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` @@ -20940,14 +20940,14 @@ type UploadPartCopyInput struct { CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` // Copies the object if it has been modified since the specified time. - CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"` // Copies the object if its entity tag (ETag) is different than the specified // ETag. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` // Copies the object if it hasn't been modified since the specified time. - CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"` + CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"` // The range of bytes to copy from the source object. The range value must use // the form bytes=first-last, where the first and last are the zero-based byte diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go index 11e938ce6ab..49fd76e8076 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go @@ -6355,7 +6355,7 @@ type DeployedImage struct { _ struct{} `type:"structure"` // The date and time when the image path for the model resolved to the ResolvedImage - ResolutionTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResolutionTime *time.Time `type:"timestamp"` // The specific digest path of the image hosted in this ProductionVariant. ResolvedImage *string `type:"string"` @@ -6436,7 +6436,7 @@ type DescribeEndpointConfigOutput struct { // A timestamp that shows when the endpoint configuration was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the endpoint configuration. // @@ -6543,7 +6543,7 @@ type DescribeEndpointOutput struct { // A timestamp that shows when the endpoint was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the endpoint. // @@ -6571,7 +6571,7 @@ type DescribeEndpointOutput struct { // A timestamp that shows when the endpoint was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` // An array of ProductionVariantSummary objects, one for each model hosted behind // this endpoint. @@ -6687,13 +6687,13 @@ type DescribeHyperParameterTuningJobOutput struct { // The date and time that the tuning job started. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // If the tuning job failed, the reason it failed. FailureReason *string `type:"string"` // The date and time that the tuning job ended. - HyperParameterTuningEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + HyperParameterTuningEndTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the tuning job. // @@ -6718,7 +6718,7 @@ type DescribeHyperParameterTuningJobOutput struct { HyperParameterTuningJobStatus *string `type:"string" required:"true" enum:"HyperParameterTuningJobStatus"` // The date and time that the status of the tuning job was modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // The ObjectiveStatusCounters object that specifies the number of training // jobs, categorized by the status of their final objective metric, that this @@ -6866,7 +6866,7 @@ type DescribeModelOutput struct { // A timestamp that shows when the model was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the IAM role that you specified for the // model. @@ -7021,10 +7021,10 @@ type DescribeNotebookInstanceLifecycleConfigOutput struct { _ struct{} `type:"structure"` // A timestamp that tells when the lifecycle configuration was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // A timestamp that tells when the lifecycle configuration was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the lifecycle configuration. NotebookInstanceLifecycleConfigArn *string `type:"string"` @@ -7091,7 +7091,7 @@ type DescribeNotebookInstanceOutput struct { // A timestamp. Use this parameter to return the time when the notebook instance // was created - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // Describes whether Amazon SageMaker provides internet access to the notebook // instance. If this value is set to Disabled, he notebook instance does not @@ -7113,7 +7113,7 @@ type DescribeNotebookInstanceOutput struct { // A timestamp. Use this parameter to retrieve the time when the notebook instance // was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // Network interface IDs that Amazon SageMaker created at the time of creating // the instance. @@ -7299,7 +7299,7 @@ type DescribeTrainingJobOutput struct { // A timestamp that indicates when the training job was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // If the training job failed, the reason it failed. FailureReason *string `type:"string"` @@ -7313,7 +7313,7 @@ type DescribeTrainingJobOutput struct { InputDataConfig []*Channel `min:"1" type:"list" required:"true"` // A timestamp that indicates when the status of the training job was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // Information about the Amazon S3 location that is configured for storing model // artifacts. @@ -7351,7 +7351,7 @@ type DescribeTrainingJobOutput struct { // this time. For successful jobs and stopped jobs, this is the time after model // artifacts are uploaded. For failed jobs, this is the time when Amazon SageMaker // detects a job failure. - TrainingEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TrainingEndTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the training job. // @@ -7390,7 +7390,7 @@ type DescribeTrainingJobOutput struct { // The start time in CloudWatch Logs might be later than this time. The difference // is due to the time it takes to download the training data and to the size // of the training container. - TrainingStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TrainingStartTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the associated hyperparameter tuning job // if the training job was launched by a hyperparameter tuning job. @@ -7577,7 +7577,7 @@ type DescribeTransformJobOutput struct { // A timestamp that shows when the transform Job was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` Environment map[string]*string `type:"map"` @@ -7598,7 +7598,7 @@ type DescribeTransformJobOutput struct { // Indicates when the transform job is Completed, Stopped, or Failed. You are // billed for the time interval between this time and the value of TransformStartTime. - TransformEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TransformEndTime *time.Time `type:"timestamp"` // Describes the dataset to be transformed and the Amazon S3 location where // it is stored. @@ -7634,7 +7634,7 @@ type DescribeTransformJobOutput struct { // Indicates when the transform job starts on ML instances. You are billed for // the time interval between this time and the value of TransformEndTime. - TransformStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TransformStartTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -7804,7 +7804,7 @@ type EndpointConfigSummary struct { // A timestamp that shows when the endpoint configuration was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the endpoint configuration. // @@ -7852,7 +7852,7 @@ type EndpointSummary struct { // A timestamp that shows when the endpoint was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the endpoint. // @@ -7872,7 +7872,7 @@ type EndpointSummary struct { // A timestamp that shows when the endpoint was last modified. // // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + LastModifiedTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation @@ -8250,7 +8250,7 @@ type HyperParameterTrainingJobSummary struct { // The date and time that the training job was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The reason that the training job failed. FailureReason *string `type:"string"` @@ -8275,7 +8275,7 @@ type HyperParameterTrainingJobSummary struct { ObjectiveStatus *string `type:"string" enum:"ObjectiveStatus"` // The date and time that the training job ended. - TrainingEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TrainingEndTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the training job. // @@ -8293,7 +8293,7 @@ type HyperParameterTrainingJobSummary struct { TrainingJobStatus *string `type:"string" required:"true" enum:"TrainingJobStatus"` // The date and time that the training job started. - TrainingStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TrainingStartTime *time.Time `type:"timestamp"` // A list of the hyperparameters for which you specified ranges to search. // @@ -8537,10 +8537,10 @@ type HyperParameterTuningJobSummary struct { // The date and time that the tuning job was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The date and time that the tuning job ended. - HyperParameterTuningEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + HyperParameterTuningEndTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the tuning job. // @@ -8558,7 +8558,7 @@ type HyperParameterTuningJobSummary struct { HyperParameterTuningJobStatus *string `type:"string" required:"true" enum:"HyperParameterTuningJobStatus"` // The date and time that the tuning job was modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // The ObjectiveStatusCounters object that specifies the numbers of training // jobs, categorized by objective metric status, that this tuning job launched. @@ -8727,11 +8727,11 @@ type ListEndpointConfigsInput struct { // A filter that returns only endpoint configurations created after the specified // time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only endpoint configurations created before the specified // time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // The maximum number of training jobs to return in the response. MaxResults *int64 `min:"1" type:"integer"` @@ -8857,19 +8857,19 @@ type ListEndpointsInput struct { // A filter that returns only endpoints that were created after the specified // time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only endpoints that were created before the specified // time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // A filter that returns only endpoints that were modified after the specified // timestamp. - LastModifiedTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeAfter *time.Time `type:"timestamp"` // A filter that returns only endpoints that were modified before the specified // timestamp. - LastModifiedTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeBefore *time.Time `type:"timestamp"` // The maximum number of endpoints to return in the response. MaxResults *int64 `min:"1" type:"integer"` @@ -9016,19 +9016,19 @@ type ListHyperParameterTuningJobsInput struct { // A filter that returns only tuning jobs that were created after the specified // time. - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only tuning jobs that were created before the specified // time. - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // A filter that returns only tuning jobs that were modified after the specified // time. - LastModifiedTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeAfter *time.Time `type:"timestamp"` // A filter that returns only tuning jobs that were modified before the specified // time. - LastModifiedTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeBefore *time.Time `type:"timestamp"` // The maximum number of tuning jobs to return. The default value is 10. MaxResults *int64 `min:"1" type:"integer"` @@ -9176,10 +9176,10 @@ type ListModelsInput struct { _ struct{} `type:"structure"` // A filter that returns only models created after the specified time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only models created before the specified time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // The maximum number of models to return in the response. MaxResults *int64 `min:"1" type:"integer"` @@ -9305,19 +9305,19 @@ type ListNotebookInstanceLifecycleConfigsInput struct { // A filter that returns only lifecycle configurations that were created after // the specified time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only lifecycle configurations that were created before // the specified time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // A filter that returns only lifecycle configurations that were modified after // the specified time (timestamp). - LastModifiedTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeAfter *time.Time `type:"timestamp"` // A filter that returns only lifecycle configurations that were modified before // the specified time (timestamp). - LastModifiedTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeBefore *time.Time `type:"timestamp"` // The maximum number of lifecycle configurations to return in the response. MaxResults *int64 `min:"1" type:"integer"` @@ -9454,19 +9454,19 @@ type ListNotebookInstancesInput struct { // A filter that returns only notebook instances that were created after the // specified time (timestamp). - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only notebook instances that were created before the // specified time (timestamp). - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // A filter that returns only notebook instances that were modified after the // specified time (timestamp). - LastModifiedTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeAfter *time.Time `type:"timestamp"` // A filter that returns only notebook instances that were modified before the // specified time (timestamp). - LastModifiedTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeBefore *time.Time `type:"timestamp"` // The maximum number of notebook instances to return. MaxResults *int64 `min:"1" type:"integer"` @@ -9853,19 +9853,19 @@ type ListTrainingJobsInput struct { // A filter that returns only training jobs created after the specified time // (timestamp). - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only training jobs created before the specified time // (timestamp). - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // A filter that returns only training jobs modified after the specified time // (timestamp). - LastModifiedTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeAfter *time.Time `type:"timestamp"` // A filter that returns only training jobs modified before the specified time // (timestamp). - LastModifiedTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeBefore *time.Time `type:"timestamp"` // The maximum number of training jobs to return in the response. MaxResults *int64 `min:"1" type:"integer"` @@ -10011,16 +10011,16 @@ type ListTransformJobsInput struct { _ struct{} `type:"structure"` // A filter that returns only transform jobs created after the specified time. - CreationTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeAfter *time.Time `type:"timestamp"` // A filter that returns only transform jobs created before the specified time. - CreationTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTimeBefore *time.Time `type:"timestamp"` // A filter that returns only transform jobs modified after the specified time. - LastModifiedTimeAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeAfter *time.Time `type:"timestamp"` // A filter that returns only transform jobs modified before the specified time. - LastModifiedTimeBefore *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTimeBefore *time.Time `type:"timestamp"` // The maximum number of transform jobs to return in the response. The default // value is 10. @@ -10262,7 +10262,7 @@ type ModelSummary struct { // A timestamp that indicates when the model was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the model. // @@ -10308,10 +10308,10 @@ type NotebookInstanceLifecycleConfigSummary struct { _ struct{} `type:"structure"` // A timestamp that tells when the lifecycle configuration was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // A timestamp that tells when the lifecycle configuration was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the lifecycle configuration. // @@ -10415,13 +10415,13 @@ type NotebookInstanceSummary struct { _ struct{} `type:"structure"` // A timestamp that shows when the notebook instance was created. - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreationTime *time.Time `type:"timestamp"` // The type of ML compute instance that the notebook instance is running on. InstanceType *string `type:"string" enum:"InstanceType"` // A timestamp that shows when the notebook instance was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the notebook instance. // @@ -11602,15 +11602,15 @@ type TrainingJobSummary struct { // A timestamp that shows when the training job was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // Timestamp when the training job was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // A timestamp that shows when the training job ended. This field is set only // if the training job has one of the terminal statuses (Completed, Failed, // or Stopped). - TrainingEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TrainingEndTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the training job. // @@ -11812,19 +11812,19 @@ type TransformJobSummary struct { // A timestamp that shows when the transform Job was created. // // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + CreationTime *time.Time `type:"timestamp" required:"true"` // If the transform job failed, the reason it failed. FailureReason *string `type:"string"` // Indicates when the transform job was last modified. - LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedTime *time.Time `type:"timestamp"` // Indicates when the transform job ends on compute instances. For successful // jobs and stopped jobs, this is the exact time recorded after the results // are uploaded. For failed jobs, this is when Amazon SageMaker detected that // the job failed. - TransformEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TransformEndTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the transform job. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index 3c89d60c4bc..667e1c1a13e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -2979,7 +2979,7 @@ type DeleteSecretOutput struct { // The date and time after which this secret can be deleted by Secrets Manager // and can no longer be restored. This value is the date and time of the delete // request plus the number of days specified in RecoveryWindowInDays. - DeletionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletionDate *time.Time `type:"timestamp"` // The friendly name of the secret that is now scheduled for deletion. Name *string `min:"1" type:"string"` @@ -3069,7 +3069,7 @@ type DescribeSecretOutput struct { // If a secret is scheduled for deletion, then its details, including the encrypted // secret information, is not accessible. To cancel a scheduled deletion and // restore access, use RestoreSecret. - DeletedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletedDate *time.Time `type:"timestamp"` // The user-provided description of the secret. Description *string `type:"string"` @@ -3083,14 +3083,14 @@ type DescribeSecretOutput struct { // The last date that this secret was accessed. This value is truncated to midnight // of the date and therefore shows only the date, not the time. - LastAccessedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessedDate *time.Time `type:"timestamp"` // The last date and time that this secret was modified in any way. - LastChangedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastChangedDate *time.Time `type:"timestamp"` // The last date and time that the Secrets Manager rotation process for this // secret was invoked. - LastRotatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastRotatedDate *time.Time `type:"timestamp"` // The user-provided friendly name of the secret. Name *string `min:"1" type:"string"` @@ -3525,7 +3525,7 @@ type GetSecretValueOutput struct { ARN *string `min:"20" type:"string"` // The date and time that this version of the secret was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The friendly name of the secret. Name *string `min:"1" type:"string"` @@ -4449,7 +4449,7 @@ type SecretListEntry struct { // secrets. The secret can be recovered until the number of days in the recovery // window has passed, as specified in the RecoveryWindowInDays parameter of // the DeleteSecret operation. - DeletedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletedDate *time.Time `type:"timestamp"` // The user-provided description of the secret. Description *string `type:"string"` @@ -4463,13 +4463,13 @@ type SecretListEntry struct { // The last date that this secret was accessed. This value is truncated to midnight // of the date and therefore shows only the date, not the time. - LastAccessedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessedDate *time.Time `type:"timestamp"` // The last date and time that this secret was modified in any way. - LastChangedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastChangedDate *time.Time `type:"timestamp"` // The last date and time that the rotation process for this secret was invoked. - LastRotatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastRotatedDate *time.Time `type:"timestamp"` // The friendly name of the secret. You can use forward slashes in the name // to represent a path hierarchy. For example, /prod/databases/dbserver1 could @@ -4594,11 +4594,11 @@ type SecretVersionsListEntry struct { _ struct{} `type:"structure"` // The date and time this version of the secret was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The date that this version of the secret was last accessed. Note that the // resolution of this field is at the date level and does not include the time. - LastAccessedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAccessedDate *time.Time `type:"timestamp"` // The unique version identifier of this version of the secret. VersionId *string `min:"32" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index ab68c839cb3..79d3abf8abb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -10956,7 +10956,7 @@ type PortfolioDetail struct { ARN *string `min:"1" type:"string"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the portfolio. Description *string `type:"string"` @@ -11089,7 +11089,7 @@ type ProductViewDetail struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The ARN of the product. ProductARN *string `min:"1" type:"string"` @@ -11465,7 +11465,7 @@ type ProvisionedProductAttribute struct { Arn *string `min:"1" type:"string"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The identifier of the provisioned product. Id *string `min:"1" type:"string"` @@ -11634,7 +11634,7 @@ type ProvisionedProductDetail struct { Arn *string `min:"1" type:"string"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The identifier of the provisioned product. Id *string `type:"string"` @@ -11744,7 +11744,7 @@ type ProvisionedProductPlanDetails struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related // events. @@ -11790,7 +11790,7 @@ type ProvisionedProductPlanDetails struct { Tags []*Tag `type:"list"` // The time when the plan was last updated. - UpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdatedTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -11968,7 +11968,7 @@ type ProvisioningArtifact struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the provisioning artifact. Description *string `type:"string"` @@ -12023,7 +12023,7 @@ type ProvisioningArtifactDetail struct { Active *bool `type:"boolean"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the provisioning artifact. Description *string `type:"string"` @@ -12248,7 +12248,7 @@ type ProvisioningArtifactSummary struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the provisioning artifact. Description *string `type:"string"` @@ -12355,7 +12355,7 @@ type RecordDetail struct { _ struct{} `type:"structure"` // The UTC time stamp of the creation time. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The path identifier. PathId *string `min:"1" type:"string"` @@ -12410,7 +12410,7 @@ type RecordDetail struct { Status *string `type:"string" enum:"RecordStatus"` // The time when the record was last updated. - UpdatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdatedTime *time.Time `type:"timestamp"` } // String returns the string representation @@ -12812,7 +12812,7 @@ type ResourceDetail struct { ARN *string `type:"string"` // The creation time of the resource. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // The description of the resource. Description *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go index a76d05b57be..d5410ec6ea9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go @@ -3963,7 +3963,7 @@ type Namespace struct { // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. // For example, the value 1516925490.087 represents Friday, January 26, 2018 // 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `type:"timestamp"` // A unique string that identifies the request and that allows failed requests // to be retried without the risk of executing an operation twice. @@ -4216,7 +4216,7 @@ type Operation struct { // and Coordinated Universal Time (UTC). The value of CreateDate is accurate // to milliseconds. For example, the value 1516925490.087 represents Friday, // January 26, 2018 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `type:"timestamp"` // The code associated with ErrorMessage. Values for ErrorCode include the following: // @@ -4269,7 +4269,7 @@ type Operation struct { // in Unix date/time format and Coordinated Universal Time (UTC). The value // of UpdateDate is accurate to milliseconds. For example, the value 1516925490.087 // represents Friday, January 26, 2018 12:11:30.087 AM. - UpdateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + UpdateDate *time.Time `type:"timestamp"` } // String returns the string representation @@ -4670,7 +4670,7 @@ type Service struct { // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. // For example, the value 1516925490.087 represents Friday, January 26, 2018 // 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreateDate *time.Time `type:"timestamp"` // A unique string that identifies the request and that allows failed requests // to be retried without the risk of executing the operation twice. CreatorRequestId diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index 9231afe1cb9..f93a8b73290 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -10780,7 +10780,7 @@ type MessageDsn struct { // When the message was received by the reporting mail transfer agent (MTA), // in RFC 822 (https://www.ietf.org/rfc/rfc0822.txt) date-time format. - ArrivalDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + ArrivalDate *time.Time `type:"timestamp"` // Additional X-headers to include in the DSN. ExtensionFields []*ExtensionField `type:"list"` @@ -11463,7 +11463,7 @@ type ReceiptRuleSetMetadata struct { _ struct{} `type:"structure"` // The date and time the receipt rule set was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name of the receipt rule set. The name must: // @@ -11533,7 +11533,7 @@ type RecipientDsnFields struct { // The time the final delivery attempt was made, in RFC 822 (https://www.ietf.org/rfc/rfc0822.txt) // date-time format. - LastAttemptDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastAttemptDate *time.Time `type:"timestamp"` // The MTA to which the remote MTA attempted to deliver the message, formatted // as specified in RFC 3464 (https://tools.ietf.org/html/rfc3464) (mta-name-type; @@ -11710,7 +11710,7 @@ type ReputationOptions struct { // // If email sending for the configuration set has never been disabled and later // re-enabled, the value of this attribute is null. - LastFreshStart *time.Time `type:"timestamp" timestampFormat:"iso8601"` + LastFreshStart *time.Time `type:"timestamp"` // Describes whether or not Amazon SES publishes reputation metrics for the // configuration set, such as bounce and complaint rates, to Amazon CloudWatch. @@ -12473,7 +12473,7 @@ type SendDataPoint struct { Rejects *int64 `type:"long"` // Time of the data point. - Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + Timestamp *time.Time `type:"timestamp"` } // String returns the string representation @@ -13839,7 +13839,7 @@ type TemplateMetadata struct { _ struct{} `type:"structure"` // The time and date the template was created. - CreatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"` + CreatedTimestamp *time.Time `type:"timestamp"` // The name of the template. Name *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go index 2f6f75f4c32..9a1b78af775 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go @@ -1944,7 +1944,7 @@ type ActivityListItem struct { // The date the activity is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The name of the activity. // @@ -2229,7 +2229,7 @@ type CreateActivityOutput struct { // The date the activity is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -2350,7 +2350,7 @@ type CreateStateMachineOutput struct { // The date the state machine is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) that identifies the created state machine. // @@ -2542,7 +2542,7 @@ type DescribeActivityOutput struct { // The date the activity is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The name of the activity. // @@ -2668,7 +2668,7 @@ type DescribeExecutionOutput struct { // The date the execution is started. // // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the executed stated machine. // @@ -2681,7 +2681,7 @@ type DescribeExecutionOutput struct { Status *string `locationName:"status" type:"string" required:"true" enum:"ExecutionStatus"` // If the execution has already ended, the date the execution stopped. - StopDate *time.Time `locationName:"stopDate" type:"timestamp" timestampFormat:"unix"` + StopDate *time.Time `locationName:"stopDate" type:"timestamp"` } // String returns the string representation @@ -2812,7 +2812,7 @@ type DescribeStateMachineForExecutionOutput struct { // For a newly created state machine, this is the creation date. // // UpdateDate is a required field - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -2902,7 +2902,7 @@ type DescribeStateMachineOutput struct { // The date the state machine is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The Amazon States Language definition of the state machine. // @@ -3083,7 +3083,7 @@ type ExecutionListItem struct { // The date the execution started. // // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` // The Amazon Resource Name (ARN) of the executed state machine. // @@ -3096,7 +3096,7 @@ type ExecutionListItem struct { Status *string `locationName:"status" type:"string" required:"true" enum:"ExecutionStatus"` // If the execution already ended, the date the execution stopped. - StopDate *time.Time `locationName:"stopDate" type:"timestamp" timestampFormat:"unix"` + StopDate *time.Time `locationName:"stopDate" type:"timestamp"` } // String returns the string representation @@ -3524,7 +3524,7 @@ type HistoryEvent struct { // The date the event occurred. // // Timestamp is a required field - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"unix" required:"true"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` // The type of the event. // @@ -4498,7 +4498,7 @@ type StartExecutionOutput struct { // The date the execution is started. // // StartDate is a required field - StartDate *time.Time `locationName:"startDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StartDate *time.Time `locationName:"startDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -4612,7 +4612,7 @@ type StateMachineListItem struct { // The date the state machine is created. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // The name of the state machine. // @@ -4730,7 +4730,7 @@ type StopExecutionOutput struct { // The date the execution is stopped. // // StopDate is a required field - StopDate *time.Time `locationName:"stopDate" type:"timestamp" timestampFormat:"unix" required:"true"` + StopDate *time.Time `locationName:"stopDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -4820,7 +4820,7 @@ type UpdateStateMachineOutput struct { // The date and time the state machine was updated. // // UpdateDate is a required field - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"unix" required:"true"` + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" required:"true"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index 4b6bf323e80..adbb5b2c175 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -10073,7 +10073,7 @@ type Activation struct { ActivationId *string `type:"string"` // The date the activation was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // A name for the managed instance when it is created. DefaultInstanceName *string `type:"string"` @@ -10082,7 +10082,7 @@ type Activation struct { Description *string `type:"string"` // The date when this activation can no longer be used to register managed instances. - ExpirationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationDate *time.Time `type:"timestamp"` // Whether or not the activation is expired. Expired *bool `type:"boolean"` @@ -10296,7 +10296,7 @@ type Association struct { InstanceId *string `type:"string"` // The date on which the association was last run. - LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastExecutionDate *time.Time `type:"timestamp"` // The name of the Systems Manager document. Name *string `type:"string"` @@ -10395,7 +10395,7 @@ type AssociationDescription struct { AssociationVersion *string `type:"string"` // The date when the association was made. - Date *time.Time `type:"timestamp" timestampFormat:"unix"` + Date *time.Time `type:"timestamp"` // The document version. DocumentVersion *string `type:"string"` @@ -10404,13 +10404,13 @@ type AssociationDescription struct { InstanceId *string `type:"string"` // The date on which the association was last run. - LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastExecutionDate *time.Time `type:"timestamp"` // The last date on which the association was successfully run. - LastSuccessfulExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulExecutionDate *time.Time `type:"timestamp"` // The date when the association was last updated. - LastUpdateAssociationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastUpdateAssociationDate *time.Time `type:"timestamp"` // The name of the Systems Manager document. Name *string `type:"string"` @@ -10551,7 +10551,7 @@ type AssociationExecution struct { AssociationVersion *string `type:"string"` // The time the execution started. - CreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedTime *time.Time `type:"timestamp"` // Detailed status information about the execution. DetailedStatus *string `type:"string"` @@ -10562,7 +10562,7 @@ type AssociationExecution struct { ExecutionId *string `type:"string"` // The date of the last execution. - LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastExecutionDate *time.Time `type:"timestamp"` // An aggregate status of the resources in the execution based on the status // type. @@ -10718,7 +10718,7 @@ type AssociationExecutionTarget struct { ExecutionId *string `type:"string"` // The date of the last execution. - LastExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastExecutionDate *time.Time `type:"timestamp"` // The location where the association details are saved. OutputSource *OutputSource `type:"structure"` @@ -10963,7 +10963,7 @@ type AssociationStatus struct { // The date when the status changed. // // Date is a required field - Date *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + Date *time.Time `type:"timestamp" required:"true"` // The reason for the status. // @@ -11047,7 +11047,7 @@ type AssociationVersionInfo struct { AssociationVersion *string `type:"string"` // The date the association version was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The version of a Systems Manager document used when the association version // was created. @@ -11169,10 +11169,10 @@ type AutomationExecution struct { ExecutedBy *string `type:"string"` // The time the execution finished. - ExecutionEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionEndTime *time.Time `type:"timestamp"` // The time the execution started. - ExecutionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionStartTime *time.Time `type:"timestamp"` // A message describing why an execution has failed, if the status is set to // Failed. @@ -11449,10 +11449,10 @@ type AutomationExecutionMetadata struct { // The time the execution finished. This is not populated if the execution is // still in progress. - ExecutionEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionEndTime *time.Time `type:"timestamp"` // The time the execution started.> - ExecutionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionStartTime *time.Time `type:"timestamp"` // The list of execution outputs as defined in the Automation document. FailureMessage *string `type:"string"` @@ -11769,7 +11769,7 @@ type Command struct { // If this time is reached and the command has not already started executing, // it will not run. Calculated based on the ExpiresAfter user input provided // as part of the SendCommand API. - ExpiresAfter *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpiresAfter *time.Time `type:"timestamp"` // The instance IDs against which this command was requested. InstanceIds []*string `type:"list"` @@ -11810,7 +11810,7 @@ type Command struct { Parameters map[string][]*string `type:"map"` // The date and time the command was requested. - RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedDateTime *time.Time `type:"timestamp"` // The IAM service role that Run Command uses to act on your behalf when sending // notifications about command status changes. @@ -12109,7 +12109,7 @@ type CommandInvocation struct { NotificationConfig *NotificationConfig `type:"structure"` // The time and date the request was sent to this instance. - RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + RequestedDateTime *time.Time `type:"timestamp"` // The IAM service role that Run Command uses to act on your behalf when sending // notifications about command status changes on a per instance basis. @@ -12337,10 +12337,10 @@ type CommandPlugin struct { // The time the plugin stopped executing. Could stop prematurely if, for example, // a cancel command was sent. - ResponseFinishDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResponseFinishDateTime *time.Time `type:"timestamp"` // The time the plugin started executing. - ResponseStartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ResponseStartDateTime *time.Time `type:"timestamp"` // The URL for the complete text written by the plugin to stderr. If execution // is not yet complete, then this string is empty. @@ -12496,7 +12496,7 @@ type ComplianceExecutionSummary struct { // format: yyyy-MM-dd'T'HH:mm:ss'Z'. // // ExecutionTime is a required field - ExecutionTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + ExecutionTime *time.Time `type:"timestamp" required:"true"` // The type of execution. For example, Command is a valid execution type. ExecutionType *string `type:"string"` @@ -12888,7 +12888,7 @@ type CreateActivationInput struct { // The date by which this activation request should expire. The default value // is 24 hours. - ExpirationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ExpirationDate *time.Time `type:"timestamp"` // The Amazon Identity and Access Management (IAM) role that you want to assign // to the managed instance. @@ -17793,7 +17793,7 @@ type DocumentDescription struct { _ struct{} `type:"structure"` // The date when the document was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The default version. DefaultVersion *string `type:"string"` @@ -18256,7 +18256,7 @@ type DocumentVersionInfo struct { _ struct{} `type:"structure"` // The date the document was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The document format, either JSON or YAML. DocumentFormat *string `type:"string" enum:"DocumentFormat"` @@ -19394,10 +19394,10 @@ type GetMaintenanceWindowExecutionOutput struct { _ struct{} `type:"structure"` // The time the Maintenance Window finished executing. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The time the Maintenance Window started executing. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the Maintenance Window execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -19597,7 +19597,7 @@ type GetMaintenanceWindowExecutionTaskInvocationOutput struct { _ struct{} `type:"structure"` // The time that the task finished executing on the target. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The execution ID. ExecutionId *string `type:"string"` @@ -19613,7 +19613,7 @@ type GetMaintenanceWindowExecutionTaskInvocationOutput struct { Parameters *string `type:"string"` // The time that the task started executing on the target. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The task status for an invocation. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -19722,7 +19722,7 @@ type GetMaintenanceWindowExecutionTaskOutput struct { _ struct{} `type:"structure"` // The time the task execution completed. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The defined maximum number of task executions that could be run in parallel. MaxConcurrency *string `min:"1" type:"string"` @@ -19738,7 +19738,7 @@ type GetMaintenanceWindowExecutionTaskOutput struct { ServiceRole *string `type:"string"` // The time the task execution started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the task. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -19911,7 +19911,7 @@ type GetMaintenanceWindowOutput struct { AllowUnassociatedTargets *bool `type:"boolean"` // The date the Maintenance Window was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The number of hours before the end of the Maintenance Window that Systems // Manager stops scheduling new tasks for execution. @@ -19927,7 +19927,7 @@ type GetMaintenanceWindowOutput struct { Enabled *bool `type:"boolean"` // The date the Maintenance Window was last modified. - ModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ModifiedDate *time.Time `type:"timestamp"` // The name of the Maintenance Window. Name *string `min:"3" type:"string"` @@ -20787,7 +20787,7 @@ type GetPatchBaselineOutput struct { BaselineId *string `min:"20" type:"string"` // The date the patch baseline was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // A description of the patch baseline. Description *string `min:"1" type:"string"` @@ -20796,7 +20796,7 @@ type GetPatchBaselineOutput struct { GlobalFilters *PatchFilterGroup `type:"structure"` // The date the patch baseline was last modified. - ModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ModifiedDate *time.Time `type:"timestamp"` // The name of the patch baseline. Name *string `min:"3" type:"string"` @@ -21079,7 +21079,7 @@ type InstanceAssociationStatusInfo struct { ErrorCode *string `type:"string"` // The date the instance association executed. - ExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionDate *time.Time `type:"timestamp"` // Summary information about association execution. ExecutionSummary *string `min:"1" type:"string"` @@ -21217,13 +21217,13 @@ type InstanceInformation struct { IsLatestVersion *bool `type:"boolean"` // The date the association was last executed. - LastAssociationExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastAssociationExecutionDate *time.Time `type:"timestamp"` // The date and time when agent last pinged Systems Manager service. - LastPingDateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastPingDateTime *time.Time `type:"timestamp"` // The last date the association was successfully run. - LastSuccessfulAssociationExecutionDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulAssociationExecutionDate *time.Time `type:"timestamp"` // The name of the managed instance. Name *string `type:"string"` @@ -21241,7 +21241,7 @@ type InstanceInformation struct { PlatformVersion *string `type:"string"` // The date the server or VM was registered with AWS as a managed instance. - RegistrationDate *time.Time `type:"timestamp" timestampFormat:"unix"` + RegistrationDate *time.Time `type:"timestamp"` // The type of instance. Instances are either EC2 instances or managed instances. ResourceType *string `type:"string" enum:"ResourceType"` @@ -21535,12 +21535,12 @@ type InstancePatchState struct { // The time the most recent patching operation completed on the instance. // // OperationEndTime is a required field - OperationEndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + OperationEndTime *time.Time `type:"timestamp" required:"true"` // The time the most recent patching operation was started on the instance. // // OperationStartTime is a required field - OperationStartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + OperationStartTime *time.Time `type:"timestamp" required:"true"` // Placeholder information. This field will always be empty in the current release // of the service. @@ -21787,7 +21787,7 @@ type InventoryDeletionStatusItem struct { DeletionId *string `type:"string"` // The UTC timestamp when the delete operation started. - DeletionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + DeletionStartTime *time.Time `type:"timestamp"` // Information about the delete operation. For more information about this summary, // see Understanding the Delete Inventory Summary (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-delete.html#sysman-inventory-delete-summary) @@ -21801,7 +21801,7 @@ type InventoryDeletionStatusItem struct { LastStatusMessage *string `type:"string"` // The UTC timestamp of when the last status report. - LastStatusUpdateTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastStatusUpdateTime *time.Time `type:"timestamp"` // The name of the inventory data type. TypeName *string `min:"1" type:"string"` @@ -23794,10 +23794,10 @@ type MaintenanceWindowExecution struct { _ struct{} `type:"structure"` // The time the execution finished. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The time the execution started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -23864,10 +23864,10 @@ type MaintenanceWindowExecutionTaskIdentity struct { _ struct{} `type:"structure"` // The time the task execution finished. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The time the task execution started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the task execution. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -23953,7 +23953,7 @@ type MaintenanceWindowExecutionTaskInvocationIdentity struct { _ struct{} `type:"structure"` // The time the invocation finished. - EndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + EndTime *time.Time `type:"timestamp"` // The ID of the action performed in the service that actually handled the task // invocation. If the task type is RUN_COMMAND, this value is the command ID. @@ -23971,7 +23971,7 @@ type MaintenanceWindowExecutionTaskInvocationIdentity struct { Parameters *string `type:"string"` // The time the invocation started. - StartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + StartTime *time.Time `type:"timestamp"` // The status of the task invocation. Status *string `type:"string" enum:"MaintenanceWindowExecutionStatus"` @@ -25075,7 +25075,7 @@ type ParameterHistory struct { KeyId *string `min:"1" type:"string"` // Date the parameter was last changed or updated. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // Amazon Resource Name (ARN) of the AWS user who last changed the parameter. LastModifiedUser *string `type:"string"` @@ -25174,7 +25174,7 @@ type ParameterMetadata struct { KeyId *string `min:"1" type:"string"` // Date the parameter was last changed or updated. - LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + LastModifiedDate *time.Time `type:"timestamp"` // Amazon Resource Name (ARN) of the AWS user who last changed the parameter. LastModifiedUser *string `type:"string"` @@ -25409,7 +25409,7 @@ type Patch struct { ProductFamily *string `type:"string"` // The date the patch was released. - ReleaseDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ReleaseDate *time.Time `type:"timestamp"` // The title of the patch. Title *string `type:"string"` @@ -25583,7 +25583,7 @@ type PatchComplianceData struct { // operating systems provide this level of information. // // InstalledTime is a required field - InstalledTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + InstalledTime *time.Time `type:"timestamp" required:"true"` // The operating system-specific ID of the patch. // @@ -26472,7 +26472,7 @@ type PatchStatus struct { _ struct{} `type:"structure"` // The date the patch was approved (or will be approved if the status is PENDING_APPROVAL). - ApprovalDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ApprovalDate *time.Time `type:"timestamp"` // The compliance severity level for a patch. ComplianceLevel *string `type:"string" enum:"PatchComplianceLevel"` @@ -27751,19 +27751,19 @@ type ResourceDataSyncItem struct { LastStatus *string `type:"string" enum:"LastResourceDataSyncStatus"` // The last time the sync operations returned a status of SUCCESSFUL (UTC). - LastSuccessfulSyncTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSuccessfulSyncTime *time.Time `type:"timestamp"` // The status message details reported by the last sync. LastSyncStatusMessage *string `type:"string"` // The last time the configuration attempted to sync (UTC). - LastSyncTime *time.Time `type:"timestamp" timestampFormat:"unix"` + LastSyncTime *time.Time `type:"timestamp"` // Configuration information for the target Amazon S3 bucket. S3Destination *ResourceDataSyncS3Destination `type:"structure"` // The date and time the configuration was created (UTC). - SyncCreatedTime *time.Time `type:"timestamp" timestampFormat:"unix"` + SyncCreatedTime *time.Time `type:"timestamp"` // The name of the Resource Data Sync. SyncName *string `min:"1" type:"string"` @@ -28730,11 +28730,11 @@ type StepExecution struct { // If a step has finished execution, this contains the time the execution ended. // If the step has not yet concluded, this field is not populated. - ExecutionEndTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionEndTime *time.Time `type:"timestamp"` // If a step has begun execution, this contains the time the step started. If // the step is in Pending status, this field is not populated. - ExecutionStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` + ExecutionStartTime *time.Time `type:"timestamp"` // Information about the Automation failure. FailureDetails *FailureDetails `type:"structure"` @@ -30641,7 +30641,7 @@ type UpdatePatchBaselineOutput struct { BaselineId *string `min:"20" type:"string"` // The date when the patch baseline was created. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // A description of the Patch Baseline. Description *string `min:"1" type:"string"` @@ -30650,7 +30650,7 @@ type UpdatePatchBaselineOutput struct { GlobalFilters *PatchFilterGroup `type:"structure"` // The date when the patch baseline was last modified. - ModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + ModifiedDate *time.Time `type:"timestamp"` // The name of the patch baseline. Name *string `min:"3" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go index 25a3628b6aa..0a366fb5932 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -7176,7 +7176,7 @@ type CachediSCSIVolume struct { // The date the volume was created. Volumes created prior to March 28, 2017 // don’t have this time stamp. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side // encryption. This value can only be set when KMSEncrypted is true. Optional. @@ -13610,7 +13610,7 @@ type StorediSCSIVolume struct { // The date the volume was created. Volumes created prior to March 28, 2017 // don’t have this time stamp. - CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + CreatedDate *time.Time `type:"timestamp"` // Indicates if when the stored volume was created, existing data on the underlying // local disk was preserved. @@ -13811,7 +13811,7 @@ type Tape struct { TapeBarcode *string `min:"7" type:"string"` // The date the virtual tape was created. - TapeCreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + TapeCreatedDate *time.Time `type:"timestamp"` // The size, in bytes, of the virtual tape capacity. TapeSizeInBytes *int64 `type:"long"` @@ -13901,7 +13901,7 @@ type TapeArchive struct { // // The default time stamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z' // format. - CompletionTime *time.Time `type:"timestamp" timestampFormat:"unix"` + CompletionTime *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side // encryption. This value can only be set when KMSEncrypted is true. Optional. @@ -13920,7 +13920,7 @@ type TapeArchive struct { TapeBarcode *string `min:"7" type:"string"` // The date the virtual tape was created. - TapeCreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"` + TapeCreatedDate *time.Time `type:"timestamp"` // The size, in bytes, of the archived virtual tape. TapeSizeInBytes *int64 `type:"long"` @@ -14071,7 +14071,7 @@ type TapeRecoveryPointInfo struct { // // The default time stamp format of the tape recovery point time is in the ISO8601 // extended YYYY-MM-DD'T'HH:MM:SS'Z' format. - TapeRecoveryPointTime *time.Time `type:"timestamp" timestampFormat:"unix"` + TapeRecoveryPointTime *time.Time `type:"timestamp"` // The size, in bytes, of the virtual tapes to recover. TapeSizeInBytes *int64 `type:"long"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index b46da12ca3d..6f89a796e5e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -1908,7 +1908,7 @@ type Credentials struct { // The date on which the current credentials expire. // // Expiration is a required field - Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` + Expiration *time.Time `type:"timestamp" required:"true"` // The secret access key that can be used to sign requests. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go index 505fc244a2e..66ac2df999b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go @@ -4555,10 +4555,10 @@ type ActivityTypeInfo struct { // The date and time this activity type was created through RegisterActivityType. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // If DEPRECATED, the date and time DeprecateActivityType was called. - DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp" timestampFormat:"unix"` + DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` // The description of the activity type provided in RegisterActivityType. Description *string `locationName:"description" type:"string"` @@ -7034,7 +7034,7 @@ type DescribeWorkflowExecutionOutput struct { // The time when the last activity task was scheduled for this workflow execution. // You can use this information to determine if the workflow has not made progress // for an unusually long period of time and might require a corrective action. - LatestActivityTaskTimestamp *time.Time `locationName:"latestActivityTaskTimestamp" type:"timestamp" timestampFormat:"unix"` + LatestActivityTaskTimestamp *time.Time `locationName:"latestActivityTaskTimestamp" type:"timestamp"` // The latest executionContext provided by the decider for this workflow execution. // A decider can provide an executionContext (a free-form string) when closing @@ -7283,12 +7283,12 @@ type ExecutionTimeFilter struct { _ struct{} `type:"structure"` // Specifies the latest start or close date and time to return. - LatestDate *time.Time `locationName:"latestDate" type:"timestamp" timestampFormat:"unix"` + LatestDate *time.Time `locationName:"latestDate" type:"timestamp"` // Specifies the oldest start or close date and time to return. // // OldestDate is a required field - OldestDate *time.Time `locationName:"oldestDate" type:"timestamp" timestampFormat:"unix" required:"true"` + OldestDate *time.Time `locationName:"oldestDate" type:"timestamp" required:"true"` } // String returns the string representation @@ -7897,7 +7897,7 @@ type HistoryEvent struct { // The date and time when the event occurred. // // EventTimestamp is a required field - EventTimestamp *time.Time `locationName:"eventTimestamp" type:"timestamp" timestampFormat:"unix" required:"true"` + EventTimestamp *time.Time `locationName:"eventTimestamp" type:"timestamp" required:"true"` // The type of the history event. // @@ -14108,7 +14108,7 @@ type WorkflowExecutionInfo struct { // The time when the workflow execution was closed. Set only if the execution // status is CLOSED. - CloseTimestamp *time.Time `locationName:"closeTimestamp" type:"timestamp" timestampFormat:"unix"` + CloseTimestamp *time.Time `locationName:"closeTimestamp" type:"timestamp"` // The workflow execution this information is about. // @@ -14127,7 +14127,7 @@ type WorkflowExecutionInfo struct { // The time when the execution was started. // // StartTimestamp is a required field - StartTimestamp *time.Time `locationName:"startTimestamp" type:"timestamp" timestampFormat:"unix" required:"true"` + StartTimestamp *time.Time `locationName:"startTimestamp" type:"timestamp" required:"true"` // The list of tags associated with the workflow execution. Tags can be used // to identify and list workflow executions of interest through the visibility @@ -14889,11 +14889,11 @@ type WorkflowTypeInfo struct { // The date when this type was registered. // // CreationDate is a required field - CreationDate *time.Time `locationName:"creationDate" type:"timestamp" timestampFormat:"unix" required:"true"` + CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` // If the type is in deprecated state, then it is set to the date when the type // was deprecated. - DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp" timestampFormat:"unix"` + DeprecationDate *time.Time `locationName:"deprecationDate" type:"timestamp"` // The description of the type registered through RegisterWorkflowType. Description *string `locationName:"description" type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index 5f8d42c6766..e08ff3ee98e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -15660,7 +15660,7 @@ type SampledHTTPRequest struct { // The time at which AWS WAF received the request from your AWS resource, in // Unix time format (in seconds). - Timestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + Timestamp *time.Time `type:"timestamp"` // A value that indicates how one result in the response relates proportionally // to other results in the response. A result that has a weight of 2 represents @@ -16424,7 +16424,7 @@ type TimeWindow struct { // time range in the previous three hours. // // EndTime is a required field - EndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + EndTime *time.Time `type:"timestamp" required:"true"` // The beginning of the time range from which you want GetSampledRequests to // return a sample of the requests that your AWS resource received. Specify @@ -16432,7 +16432,7 @@ type TimeWindow struct { // any time range in the previous three hours. // // StartTime is a required field - StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"` + StartTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go index a108e4bd770..989ecd5b29c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go @@ -4675,10 +4675,10 @@ type WorkspaceConnectionStatus struct { ConnectionState *string `type:"string" enum:"ConnectionState"` // The timestamp of the connection state check. - ConnectionStateCheckTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + ConnectionStateCheckTimestamp *time.Time `type:"timestamp"` // The timestamp of the last known user connection. - LastKnownUserConnectionTimestamp *time.Time `type:"timestamp" timestampFormat:"unix"` + LastKnownUserConnectionTimestamp *time.Time `type:"timestamp"` // The ID of the WorkSpace. WorkspaceId *string `type:"string"` diff --git a/vendor/vendor.json b/vendor/vendor.json index 136e4132d3f..1d8c3294bae 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,1004 +39,1004 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "vCC8pc9mFj0mor1ymm1DQ21n0W8=", + "checksumSHA1": "36e2OadMiTAbRp58Y0oBAuxJT2Y=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "925zPp8gtaXi2gkWrgZ1gAA003A=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "eI5TmiOTCFjEUNvWeceFycs9dRU=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "HogDW/Wu6ZKTDrQ2HSzG8/vj9Ag=", + "checksumSHA1": "6DRhqSAN7O45gYfRIpwDeuJE8j8=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "uPkjJo+J10vbEukYYXmf0w7Cn4Q=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "Q1co3y5Y8rRIEjEXEfUZ9SwTmic=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "Ia/AZ2fZp7J4lMO6fpkvfLU/HGY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "zx1mZCdOwgbjBV3jMfb0kyDd//Q=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "u3cA2IiD36A+VnFIH7XtGjYk2NU=", + "checksumSHA1": "Dj9WOMBPbboyUJV4GB99PwPcO4g=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", "path": "github.com/aws/aws-sdk-go/internal/sdkuri", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Ij9RP5HrBWBYYb3/LEMHNNZXH9g=", + "checksumSHA1": "ZX5QHZb0PrK4UF45um2kaAEiX+8=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "ftqeTvBbv+e/ozhnlAgbO1CEbLs=", + "checksumSHA1": "CTsp/h3FbFg9QizH4bH1abLwljg=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "9V1PvtFQ9MObZTc3sa86WcuOtOU=", + "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "/2Ppb4vP/H+B3cM7bOOEeA7Z0iY=", + "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "cW7mfCta/3RjWAsEn4BeJKe8TdI=", + "checksumSHA1": "4dWtH/HkBpS7TnTf21+HOrE1zFc=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "d8MH0CgeCpRAQTFIjcEaPFDXw0w=", + "checksumSHA1": "4xFqSOZkwDKot6FJQQgKjhJFoQw=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "k1TqEWHeP84mmRewv19ZVORhSm8=", + "checksumSHA1": "3e/4A/8NqTOSXEtJ6KhYAqqWnuY=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "OsJUdGg5DvY7vtvPfGcixbKX3kQ=", + "checksumSHA1": "FjnLIflNek7g0j5NKT3qFkNtdY8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "RpzI2CVxVXCkMK0Tuhc54YvyoqE=", + "checksumSHA1": "K/ynSj/L2OzW+9Zqs2PRe8NzYUc=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "owhfVKeKxjXt4P5KO6PSIjnMLIA=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "/nF1VEl/Y9I9EYbUHvUuhqjipUk=", + "checksumSHA1": "3JN52M5wxJMazxQWXB4epL78LNQ=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "kko+es9ly+l/e9ngcpCdPx2DBAc=", + "checksumSHA1": "O5L1jCrbPe6adyTBIpSnydpToyk=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "kHOf0VEd2Qy8PYZsg7/zG+JkF1o=", + "checksumSHA1": "kPYTVg109H4HL8CKEf1yQvwKMw4=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "gJiK41PSoCEfE02VEry4f6nBg0s=", + "checksumSHA1": "GhANcrglYWrhNSR/NzxNe3jClMk=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "bbCNma+YJRqcjnIqmTagqs1IwWI=", + "checksumSHA1": "HmZRIixQ6u+zMz2Qt0iTU42WVZU=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "bupt0rs/P2QN+iuFeFC7oY1HZ14=", + "checksumSHA1": "BXG7bjiNrt222s+bZeimLAXODp4=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "P8cLAj/ovFt7uH3bB4dRg/2KApI=", + "checksumSHA1": "WqtP2Q4z15vT4i/TLix/kcsK91w=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "eCrAi2QJw0Ft6A8XK5ZGLpsPKwM=", + "checksumSHA1": "1uyTJ/RTr7c8uL2Kbrp+60PE40M=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "ItkRLsVGZt8uvkI4+7+mi9Ccy28=", + "checksumSHA1": "3q2FBK4CEarGbVeLCuuX+g1E3jk=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Y+x1N7TFB7OesWPRoYXRwGOdQzs=", + "checksumSHA1": "o+DFxugR5Cy/Wwlv7GSRRilTW4o=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "PxsIahbkFuks12VthBlqFJIUzX0=", + "checksumSHA1": "7lCMA0KirL9isnwLj87LR2cjipU=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "ciAsJhe41ygl47dhStzMJfGVFPQ=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "SZxCqkGWIvyq5Rtl0haxfOgwKdE=", + "checksumSHA1": "PV8Gt5eOyMFCT/+Y63CUrrY4V5k=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Q+W+AVveTI7xM3ay6HAi0FB4Dpc=", + "checksumSHA1": "ysSU5yhqWT4+deQUYZiI8/1tJ2c=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "6lozLpoMkQvw1r2cZMXujYiLqK8=", + "checksumSHA1": "GvjVVg5btXuEFEHqyoe19BZogGw=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "JNLWxWRvZ8UNPV8nWHgzIybuMuE=", + "checksumSHA1": "vklitYIK0AiOXA0obSTq0c04pc4=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "iPP1QQAsTiK0TYWVn7ksDLfDXDE=", + "checksumSHA1": "rL0O6L1zSJ/UQE0kEWUoCOOFDog=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "JbgQL/r+cBKIKt+tQY8VSj0C2j8=", + "checksumSHA1": "Zc5M/qyd8bDCYuNRvFnF05gMp5s=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "orboEPrXFUPc3m7ZG8uPhZNZDdM=", + "checksumSHA1": "o9WTZk66Jlu+0UdO1wmtO3qp8ps=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "spYFA1gAmUHAUFd24v2xwMOLxrY=", + "checksumSHA1": "/y7nXSnR9OqMoxlIl1hFcCk5kT8=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "/zBS/FARxFnNMfLUg1Vq1FVK95c=", + "checksumSHA1": "X1TkBdqZ/RWin1tr/FHWOGAFGsI=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "olDBindEWwTHzKfpWaS+xID4y90=", + "checksumSHA1": "eAvb9FYZ6+lM9LhP7TrpNLrNn/Y=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "i7fuDfXYhe4JMJhail5nZUg69Dk=", + "checksumSHA1": "9AU0+8dys0VKkN4NT1N/wwhnLIU=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "jURA8oKlQkbYPPrBQIeOPbQAVN0=", + "checksumSHA1": "a02+OXxnVBBBeaZpgs8dXUHj8b0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "SbAY0nrovBl4mmb7HEzL/28JR88=", + "checksumSHA1": "aAw9xutYOwCdzo7p0QwTFVFJr8Y=", "path": "github.com/aws/aws-sdk-go/service/dlm", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "GFq6SaQ4h48iP+gjllWjMyIbQfU=", + "checksumSHA1": "iCV19HfLlnGxp/WQXnf1j0WrSNk=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "aBYDdFhx/8bxKl0l++Gh2P2+4eM=", + "checksumSHA1": "xSjeyAlY8+CyJ9nwDJ/3maeF9G4=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "T4Yw3GPZg+KwAEudsypRfhbUrVw=", + "checksumSHA1": "VD7bAh0n/UgOwRBPe5y38Ow/dHU=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "niBN6QYBEhoHvxQpSH8qWjEMNYo=", + "checksumSHA1": "xOm3N99bh70t1mP96ttlgnj/CNc=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "UuBR+vag1picSiwj3T5mcl1a0Jc=", + "checksumSHA1": "tkcjBjsY0K9byl1c0XZupuafZVQ=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "mzgRjocmzU6VLUsim7E8/fffffk=", + "checksumSHA1": "5QdblYPoDtRsQ8aczXOesIKTDpc=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "A5DCzVFhE5iT60fQXjlyLDHKFsg=", + "checksumSHA1": "kvsll2DfqS1hg97xSWMIcMan5as=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "K0yPG0O4/Wv2pYASbxO6LjH8318=", + "checksumSHA1": "fx9nf/M9h4DpZY5pEdnh9DeCnsU=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "aNIs4oJTp3x73Fx24tKO2cDY5OM=", + "checksumSHA1": "BcT1GzSQ5j/x9A3OsFZWVBLnsxc=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "cRuJDtc9rVpXUqfLrg1cJleaPjQ=", + "checksumSHA1": "Gp+QZjtg8PCNVi9X8m2SqtFvMas=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "XKNeVP6DCohd9Re9g4xGLuqXe0c=", + "checksumSHA1": "aenp73UfqiJbl1sw3Yx3fGASNjc=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Xv0Wj758E+E1a+cBdH2xy15wuOU=", + "checksumSHA1": "oNOLs79R42Vsj/jYTYtrbyTWxcw=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "X+8twdJk/x1+8y1LxnKXXd3eVoY=", + "checksumSHA1": "3hICqVOs1WmluYMZN9fTMbDQSyM=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "PJQ5SFC+Ai5Mqn8rfGhuwttfqZk=", + "checksumSHA1": "tNVmAgvnURWLWibVCL7vIDYU7UM=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "xI94HsdAG+dBFCm38FoELBdbe9c=", + "checksumSHA1": "J1SHh0J6kX8JBD0+TQCFP+1Kij4=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "FEfr6yYlSRWsIV0M0kxm0/jOw0E=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "KWE5gG/M/Fz9tnmcFgGPphwwX2Y=", + "checksumSHA1": "20er3HEJYcoJ1z0UumeaAkfOtpw=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "vbd5sSkaWFvxpM//BkS7IQffm5U=", + "checksumSHA1": "ae+jhUirSvN0IXPVU7X7xc+EbFE=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "si/Re/DEfX8xWIjpLS4NNISO/Ns=", + "checksumSHA1": "+KOm0n6lqwE3KWV4Kid2CFxmdRk=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Q2K/MWy6yy/kV9CZ0YhaEHBNgkI=", + "checksumSHA1": "AIq7YTfZFlbyPUpv7fyjfB9k2sM=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "OvCoIYyhBSlrCvsk8uidGznXIss=", + "checksumSHA1": "7PMjfoyDLrnS2N09LgR6syWP8Gk=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "44R3VB9KreeYj0LFf3KBd37kPXI=", + "checksumSHA1": "TqLWVx6OQ+VqSMlzvokkC+IEv/k=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "rwHYPohmwgbKTkEpVoR3PtvqU28=", + "checksumSHA1": "K4OamITKC7PKo1eHrSl0z8Visg0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "zrWHv2XG/KP9E82ophSO0XF+Cu8=", + "checksumSHA1": "7rQmR+jAZ4zUIC4upAxyxrbfzNM=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "xq1jxTLdjjWU+aupMh143C+Yb1Q=", + "checksumSHA1": "tX/3xEkl13DuKNIO0v3qYseEIvI=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "8p+iBG3V+xlFkx+j4QJrjRsRWCk=", + "checksumSHA1": "7PCXsr+LBF9Hvjo7ZphC/xelGMs=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "HoX+EX8JW8kDZxJAs8545YRfjuI=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "ahm1SzqWwGUqPih6jPZwIevl2Pg=", + "checksumSHA1": "CggySAQfK9WXsX37mRI8UqXGkJo=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "0YZZzbKYjappFNT8MUR5qNGQkRY=", + "checksumSHA1": "9NU6dJOvKvcgnl/4eUdwy4YD5ss=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "rrANYUKEHHEofZJYCP1pQhO35TE=", + "checksumSHA1": "qyIVtaN5mzPq4d7BDj9YpYtifKs=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "p/+jOAMB5MSAnPloxJIFy77Hfck=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "W6AvJYPtvCLTeA0USbhvid2rP1o=", + "checksumSHA1": "E3i2/WM1kDE7WBOSRnDsZkwmZwI=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "x3PsW91a7fh+Q466y3WM3fdtnGg=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Davg8yRIMOcfa7/6zp7Fj6GnpuA=", + "checksumSHA1": "YCd2EU1DPiO0QTRZk6G1fLZAyg0=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "RfTumx3C/ryCRp8ACLwhfnF+Cw0=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "YtPLtWvoM6wD68VUp7dU+qk6hyM=", + "checksumSHA1": "Kv8hkh6CxOCAG73xohmft8z4I3g=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "wLRUH2H2vTS7yMgnCqhMcZ8GvWc=", + "checksumSHA1": "rwMv5M8vL6WvdvupGF5y+xOvFuQ=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "oe9xtK3GMCwCDmra0+JC6GwJ99k=", + "checksumSHA1": "KlM6azZ5G09MmPg+lzEizW2qaLA=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "kDpS3awFGJ29i8/crTXFM20AEcU=", + "checksumSHA1": "DmKatmbYsvm+MoCP01PCdQ6Y6Tk=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "UpyYeZUppBDbik08x1K5oUwXbk0=", + "checksumSHA1": "TnYnywRdKZQ1uRVgUdeqpWO2+78=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "JqG/wC6zOGiK99YlSy31DADaV5w=", + "checksumSHA1": "vv32189Rin9Nq5GrmwmpLziJsvU=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "x2vfgk/EnGjOWPywWL+LKJKYCF0=", + "checksumSHA1": "T8dOJ1jjEBdogUE03oRPRJCOY3k=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Z61MRqI0vu8oGAaCZSCDes9gIvk=", + "checksumSHA1": "UhJ0RdPXzdMOUEBWREB5Zi9lgmY=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "TPGJU1VzYOhJIdTbWal1ivDwT+4=", + "checksumSHA1": "0vtFXRYnhlCCq8/zPv1O1YWIoSg=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "7kmVHadImICOa4/MOXErR53CdbQ=", + "checksumSHA1": "1rJbvLXRsCzWhTihruRq/i0Zawg=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "6QZEYfLhDmYpeqGlClYSZkYnvjY=", + "checksumSHA1": "UfgmCQjT787z6llIfGM9ZHzuydM=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "7XSW9vBDuN9ZR5wfuCvCaF6QPy0=", + "checksumSHA1": "baQQigT2uBO5p8GwjjoYnO0xMDw=", "path": "github.com/aws/aws-sdk-go/service/storagegateway", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "uguCtF1eoCG71dvEVqrYbFs7py0=", + "checksumSHA1": "UhIVLDgQc19wjrPj8pP7Fu2UwWc=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "vlL9ibWgidiPj0uQ2L/OF6DCVEs=", + "checksumSHA1": "zSqEhiGtEK6ll3f1Rlf2tuDKQA8=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "Ro5RX6aw32UGrGueBK+zhA8+Z30=", + "checksumSHA1": "H8Pa7irZ9gpuYGJk3uMK59gxGTs=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { - "checksumSHA1": "UGQwnAeB9SoJKyPPIpbDJVQws5g=", + "checksumSHA1": "oe8l2ibuhzz7fWM3f64cWnHwFy8=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "ad774ec7aa8110faa8acdb510930f733a874ca4c", - "revisionTime": "2018-07-18T20:23:19Z", - "version": "v1.14.29", - "versionExact": "v1.14.29" + "revision": "bc3f534c19ffdf835e524e11f0f825b3eaf541c3", + "revisionTime": "2018-07-20T20:35:14Z", + "version": "v1.14.31", + "versionExact": "v1.14.31" }, { "checksumSHA1": "usT4LCSQItkFvFOQT7cBlkCuGaE=", From d0a0badaeaa3718313e46a2c1816d40d07310ad4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 11:15:04 -0400 Subject: [PATCH 1922/3316] docs/resource/aws_elasticsearch_domain: Add missing comma in IAM policy --- website/docs/r/elasticsearch_domain.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/elasticsearch_domain.html.markdown b/website/docs/r/elasticsearch_domain.html.markdown index 2b74247d976..f12312a19bd 100644 --- a/website/docs/r/elasticsearch_domain.html.markdown +++ b/website/docs/r/elasticsearch_domain.html.markdown @@ -39,7 +39,7 @@ resource "aws_elasticsearch_domain" "es" { "Action": "es:*", "Principal": "*", "Effect": "Allow", - "Resource": "arn:aws:es:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:domain/${var.domain}/*" + "Resource": "arn:aws:es:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:domain/${var.domain}/*", "Condition": { "IpAddress": {"aws:SourceIp": ["66.193.100.22/32"]} } From 8f13308b394ce353769256299d0bc0d9b29e24c1 Mon Sep 17 00:00:00 2001 From: Matthew McNamara Date: Mon, 23 Jul 2018 18:16:46 +0100 Subject: [PATCH 1923/3316] aws_vpc: Add arn as an attribute for aws_vpc --- aws/data_source_aws_vpc.go | 15 +++++++++++++++ aws/data_source_aws_vpc_test.go | 2 ++ aws/resource_aws_default_vpc_test.go | 2 ++ aws/resource_aws_vpc.go | 16 ++++++++++++++++ aws/resource_aws_vpc_test.go | 2 ++ 5 files changed, 37 insertions(+) diff --git a/aws/data_source_aws_vpc.go b/aws/data_source_aws_vpc.go index 9692854b62a..b2ad03d1967 100644 --- a/aws/data_source_aws_vpc.go +++ b/aws/data_source_aws_vpc.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" ) @@ -92,6 +93,11 @@ func dataSourceAwsVpc() *schema.Resource { Computed: true, }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), }, } @@ -162,6 +168,15 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { d.Set("state", vpc.State) d.Set("tags", tagsToMap(vpc.Tags)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("vpc/%s", d.Id()), + }.String() + d.Set("arn", arn) + cidrAssociations := []interface{}{} for _, associationSet := range vpc.CidrBlockAssociationSet { association := map[string]interface{}{ diff --git a/aws/data_source_aws_vpc_test.go b/aws/data_source_aws_vpc_test.go index 7470f44c184..106e6bd3082 100644 --- a/aws/data_source_aws_vpc_test.go +++ b/aws/data_source_aws_vpc_test.go @@ -30,6 +30,8 @@ func TestAccDataSourceAwsVpc_basic(t *testing.T) { "data.aws_vpc.by_id", "enable_dns_support", "true"), resource.TestCheckResourceAttr( "data.aws_vpc.by_id", "enable_dns_hostnames", "false"), + resource.TestCheckResourceAttrSet( + "data.aws_vpc.by_id", "arn"), ), }, }, diff --git a/aws/resource_aws_default_vpc_test.go b/aws/resource_aws_default_vpc_test.go index 8d77f250427..e9887eb7013 100644 --- a/aws/resource_aws_default_vpc_test.go +++ b/aws/resource_aws_default_vpc_test.go @@ -27,6 +27,8 @@ func TestAccAWSDefaultVpc_basic(t *testing.T) { "aws_default_vpc.foo", "tags.%", "1"), resource.TestCheckResourceAttr( "aws_default_vpc.foo", "tags.Name", "Default VPC"), + resource.TestCheckResourceAttrSet( + "aws_default_vpc.foo", "arn"), resource.TestCheckNoResourceAttr( "aws_default_vpc.foo", "assign_generated_ipv6_cidr_block"), resource.TestCheckNoResourceAttr( diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index 1006d9d29ca..73a9defe488 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" @@ -107,6 +108,11 @@ func resourceAwsVpc() *schema.Resource { Computed: true, }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchema(), }, } @@ -177,6 +183,16 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { d.Set("dhcp_options_id", vpc.DhcpOptionsId) d.Set("instance_tenancy", vpc.InstanceTenancy) + // ARN + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("vpc/%s", d.Id()), + }.String() + d.Set("arn", arn) + // Tags d.Set("tags", tagsToMap(vpc.Tags)) diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index 1059b255975..c010015c723 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -95,6 +95,8 @@ func TestAccAWSVpc_basic(t *testing.T) { "aws_vpc.foo", "default_route_table_id"), resource.TestCheckResourceAttr( "aws_vpc.foo", "enable_dns_support", "true"), + resource.TestCheckResourceAttrSet( + "aws_vpc.foo", "arn"), ), }, }, From 7a45b20e4114c5190014ca95e8e9c4c73acc9083 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 13:40:32 -0400 Subject: [PATCH 1924/3316] docs/resource/aws_batch_compute_environment: Clarify bid_percentage as integer, not float --- website/docs/r/batch_compute_environment.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/batch_compute_environment.html.markdown b/website/docs/r/batch_compute_environment.html.markdown index 796f80f5648..a7de5b1eefa 100644 --- a/website/docs/r/batch_compute_environment.html.markdown +++ b/website/docs/r/batch_compute_environment.html.markdown @@ -116,7 +116,7 @@ resource "aws_batch_compute_environment" "sample" { **compute_resources** is a child block with a single argument: -* `bid_percentage` - (Optional) The minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20%, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. This parameter is required for SPOT compute environments. +* `bid_percentage` - (Optional) Integer of minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20% (`20`), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. This parameter is required for SPOT compute environments. * `desired_vcpus` - (Optional) The desired number of EC2 vCPUS in the compute environment. * `ec2_key_pair` - (Optional) The EC2 key pair that is used for instances launched in the compute environment. * `image_id` - (Optional) The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. From 791e2f1edbac8044ab1493008629bbc6fecab992 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 14:09:38 -0400 Subject: [PATCH 1925/3316] resource/aws_secretsmanager_secret: Use fmt.Errorf() instead of errwrap.Wrapf() and use aws.StringValue() --- aws/resource_aws_secretsmanager_secret.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_secretsmanager_secret.go b/aws/resource_aws_secretsmanager_secret.go index 515ab2148ad..1ffa093fe00 100644 --- a/aws/resource_aws_secretsmanager_secret.go +++ b/aws/resource_aws_secretsmanager_secret.go @@ -7,7 +7,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/secretsmanager" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -186,9 +185,9 @@ func resourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interface{ } if pOut.ResourcePolicy != nil { - policy, err := structure.NormalizeJsonString(*pOut.ResourcePolicy) + policy, err := structure.NormalizeJsonString(aws.StringValue(pOut.ResourcePolicy)) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } d.Set("policy", policy) } @@ -236,7 +235,7 @@ func resourceAwsSecretsManagerSecretUpdate(d *schema.ResourceData, meta interfac if v, ok := d.GetOk("policy"); ok && v.(string) != "" { policy, err := structure.NormalizeJsonString(v.(string)) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } input := &secretsmanager.PutResourcePolicyInput{ ResourcePolicy: aws.String(policy), From 1ab71112019b7c209c41f116d30e04d8df3685cd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 14:12:05 -0400 Subject: [PATCH 1926/3316] Update CHANGELOG for #5290 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bde28518eb4..f74edf00ee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ENHANCEMENTS: * resource/aws_instance: Add `cpu_core_count` and `cpu_threads_per_core` arguments [GH-5159] +* resource/aws_secretsmanager_secret: Add `policy` argument [GH-5290] ## 1.28.0 (July 18, 2018) From c3a3f56a6d178359607682af6f888373def6abc3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 14:20:33 -0400 Subject: [PATCH 1927/3316] Update CHANGELOG for #5300 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f74edf00ee9..7743a0ec29e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ENHANCEMENTS: +* data-source/aws_vpc: Add `arn` attribute [GH-5300] * resource/aws_instance: Add `cpu_core_count` and `cpu_threads_per_core` arguments [GH-5159] * resource/aws_secretsmanager_secret: Add `policy` argument [GH-5290] +* resource/aws_vpc: Add `arn` attribute [GH-5300] +* resource/aws_default_vpc: Add `arn` attribute [GH-5300] ## 1.28.0 (July 18, 2018) From a685f6872130c5698e2fdd24f40793cfe34117b5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 14:22:23 -0400 Subject: [PATCH 1928/3316] aws_vpc: Document new arn attribute for #5300 --- website/docs/d/vpc.html.markdown | 1 + website/docs/r/default_vpc.html.markdown | 1 + website/docs/r/vpc.html.markdown | 1 + 3 files changed, 3 insertions(+) diff --git a/website/docs/d/vpc.html.markdown b/website/docs/d/vpc.html.markdown index ada23d676b5..155b09880b8 100644 --- a/website/docs/d/vpc.html.markdown +++ b/website/docs/d/vpc.html.markdown @@ -75,6 +75,7 @@ the selected VPC. The following attribute is additionally exported: +* `arn` - Amazon Resource Name (ARN) of VPC * `instance_tenancy` - The allowed tenancy of instances launched into the selected VPC. May be any of `"default"`, `"dedicated"`, or `"host"`. * `ipv6_association_id` - The association ID for the IPv6 CIDR block. diff --git a/website/docs/r/default_vpc.html.markdown b/website/docs/r/default_vpc.html.markdown index c93ae4e8974..e93bc04479d 100644 --- a/website/docs/r/default_vpc.html.markdown +++ b/website/docs/r/default_vpc.html.markdown @@ -55,6 +55,7 @@ You can resume managing the VPC via the AWS Console. In addition to all arguments above, the following attributes are exported: +* `arn` - Amazon Resource Name (ARN) of VPC * `id` - The ID of the VPC * `cidr_block` - The CIDR block of the VPC * `instance_tenancy` - Tenancy of instances spin up within VPC. diff --git a/website/docs/r/vpc.html.markdown b/website/docs/r/vpc.html.markdown index 16e7bfe851f..3ece4c247b4 100644 --- a/website/docs/r/vpc.html.markdown +++ b/website/docs/r/vpc.html.markdown @@ -55,6 +55,7 @@ the size of the CIDR block. Default is `false`. In addition to all arguments above, the following attributes are exported: +* `arn` - Amazon Resource Name (ARN) of VPC * `id` - The ID of the VPC * `cidr_block` - The CIDR block of the VPC * `instance_tenancy` - Tenancy of instances spin up within VPC. From c0b216824f8814e90c861158bd949022293231b2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Jul 2018 14:53:42 -0400 Subject: [PATCH 1929/3316] docs/resource/aws_instance: Further clarify usage of security_groups versus vpc_security_group_ids --- website/docs/r/instance.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index 811c6fa375d..8f8298a9288 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -77,11 +77,11 @@ instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/Use * `get_password_data` - (Optional) If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `password_data` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. * `monitoring` - (Optional) If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0) -* `security_groups` - (Optional) A list of security group names to associate with. +* `security_groups` - (Optional, EC2-Classic and default VPC only) A list of security group names to associate with. -> **NOTE:** If you are creating Instances in a VPC, use `vpc_security_group_ids` instead. -* `vpc_security_group_ids` - (Optional) A list of security group IDs to associate with. +* `vpc_security_group_ids` - (Optional, VPC only) A list of security group IDs to associate with. * `subnet_id` - (Optional) The VPC Subnet ID to launch in. * `associate_public_ip_address` - (Optional) Associate a public ip address with an instance in a VPC. Boolean value. * `private_ip` - (Optional) Private IP address to associate with the From fa61f5e676ea785f282e6218ef9d456b8f7b4401 Mon Sep 17 00:00:00 2001 From: Matthew McNamara Date: Tue, 24 Jul 2018 09:18:57 +0100 Subject: [PATCH 1930/3316] r/aws_launch_template: Add arn as an attribute --- aws/resource_aws_launch_template.go | 15 +++++++++++++++ aws/resource_aws_launch_template_test.go | 1 + website/docs/r/launch_template.html.markdown | 1 + 3 files changed, 17 insertions(+) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 0923437c1b8..aa9a93d1d60 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -8,6 +8,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -48,6 +49,11 @@ func resourceAwsLaunchTemplate() *schema.Resource { ValidateFunc: validation.StringLenBetween(0, 255), }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "default_version": { Type: schema.TypeInt, Computed: true, @@ -482,6 +488,15 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err d.Set("default_version", lt.DefaultVersionNumber) d.Set("tags", tagsToMap(lt.Tags)) + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("launch-template/%s", d.Id()), + }.String() + d.Set("arn", arn) + version := strconv.Itoa(int(*lt.LatestVersionNumber)) dltv, err := conn.DescribeLaunchTemplateVersions(&ec2.DescribeLaunchTemplateVersionsInput{ LaunchTemplateId: aws.String(d.Id()), diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index caee1e80b5f..a865d29eba3 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -28,6 +28,7 @@ func TestAccAWSLaunchTemplate_basic(t *testing.T) { testAccCheckAWSLaunchTemplateExists(resName, &template), resource.TestCheckResourceAttr(resName, "default_version", "1"), resource.TestCheckResourceAttr(resName, "latest_version", "1"), + resource.TestCheckResourceAttrSet(resName, "arn"), ), }, }, diff --git a/website/docs/r/launch_template.html.markdown b/website/docs/r/launch_template.html.markdown index e87d6c3f86d..08d138158bc 100644 --- a/website/docs/r/launch_template.html.markdown +++ b/website/docs/r/launch_template.html.markdown @@ -245,6 +245,7 @@ Each `tag_specifications` block supports the following: The following attributes are exported along with all argument references: +* `arn` - Amazon Resource Name (ARN) of the launch template. * `id` - The ID of the launch template. * `default_version` - The default version of the launch template. * `latest_version` - The latest version of the launch template. From 74c071302467c66a4974719d95bc99926f77ef61 Mon Sep 17 00:00:00 2001 From: Andrew Ogburn Date: Tue, 24 Jul 2018 08:07:25 -0400 Subject: [PATCH 1931/3316] Add Elasticsearch CognitoOptions logic and documentation --- aws/resource_aws_elasticsearch_domain.go | 52 +++++++++++ aws/resource_aws_elasticsearch_domain_test.go | 87 +++++++++++++++++++ aws/structure.go | 45 ++++++++++ .../docs/r/elasticsearch_domain.html.markdown | 8 ++ 4 files changed, 192 insertions(+) diff --git a/aws/resource_aws_elasticsearch_domain.go b/aws/resource_aws_elasticsearch_domain.go index 53173acb69c..569fac9c472 100644 --- a/aws/resource_aws_elasticsearch_domain.go +++ b/aws/resource_aws_elasticsearch_domain.go @@ -229,6 +229,33 @@ func resourceAwsElasticSearchDomain() *schema.Resource { Default: "1.5", ForceNew: true, }, + "cognito_options": { + Type: schema.TypeList, + Optional: true, + ForceNew: false, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "user_pool_id": { + Type: schema.TypeString, + Required: true, + }, + "identity_pool_id": { + Type: schema.TypeString, + Required: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "tags": tagsSchema(), }, @@ -384,6 +411,21 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface } } + if v, ok := d.GetOk("cognito_options"); ok { + + options := v.([]interface{}) + if len(options) > 1 { + return fmt.Errorf("Only a single cognito_options block is expected") + } else if len(options) == 1 { + if options[0] == nil { + return fmt.Errorf("At least one field is expected inside cognito_options") + } + + s := options[0].(map[string]interface{}) + input.CognitoOptions = expandESCognitoOptions(s) + } + } + log.Printf("[DEBUG] Creating ElasticSearch domain: %s", input) // IAM Roles can take some time to propagate if set in AccessPolicies and created in the same terraform @@ -504,6 +546,10 @@ func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{} if err != nil { return err } + err = d.Set("cognito_options", flattenESCognitoOptions(ds.CognitoOptions)) + if err != nil { + return err + } if ds.SnapshotOptions != nil { d.Set("snapshot_options", map[string]interface{}{ "automated_snapshot_start_hour": *ds.SnapshotOptions.AutomatedSnapshotStartHour, @@ -634,6 +680,12 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface input.VPCOptions = expandESVPCOptions(s) } + if d.HasChange("cognito_options") { + options := d.Get("cognito_options").([]interface{}) + s := options[0].(map[string]interface{}) + input.CognitoOptions = expandESCognitoOptions(s) + } + if d.HasChange("log_publishing_options") { input.LogPublishingOptions = make(map[string]*elasticsearch.LogPublishingOption) options := d.Get("log_publishing_options").(*schema.Set).List() diff --git a/aws/resource_aws_elasticsearch_domain_test.go b/aws/resource_aws_elasticsearch_domain_test.go index ea9d6605022..c519ade7d9d 100644 --- a/aws/resource_aws_elasticsearch_domain_test.go +++ b/aws/resource_aws_elasticsearch_domain_test.go @@ -293,6 +293,25 @@ func TestAccAWSElasticSearchDomain_LogPublishingOptions(t *testing.T) { }) } +func TestAccAWSElasticSearchDomain_CognitoOptions(t *testing.T) { + var domain elasticsearch.ElasticsearchDomainStatus + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckESDomainDestroy, + Steps: []resource.TestStep{ + { + Config: testAccESDomainConfig_CognitoOptions(acctest.RandInt()), + Check: resource.ComposeTestCheckFunc( + testAccCheckESDomainExists("aws_elasticsearch_domain.example", &domain), + resource.TestCheckResourceAttr( + "aws_elasticsearch_domain.example", "elasticsearch_version", "6.0"), + ), + }, + }, + }) +} + func testAccCheckESNumberOfSecurityGroups(numberOfSecurityGroups int, status *elasticsearch.ElasticsearchDomainStatus) resource.TestCheckFunc { return func(s *terraform.State) error { count := len(status.VPCOptions.SecurityGroupIds) @@ -1064,3 +1083,71 @@ resource "aws_elasticsearch_domain" "example" { } `, randInt, randInt, randInt) } + +func testAccESDomainConfig_CognitoOptions(randInt int) string { + return fmt.Sprintf(` +resource "aws_cognito_user_pool" "example" { + name = "tf-test-%d" +} + +resource "aws_cognito_user_pool_domain" "example" { + domain = "tf-test-%d" + user_pool_id = "${aws_cognito_user_pool.example.id}" +} + +resource "aws_cognito_identity_pool" "example" { + identity_pool_name = "tf_test_%d" + allow_unauthenticated_identities = false +} + +resource "aws_iam_role" "example" { + name = "tf-test-%d" + path = "/service-role/" + + assume_role_policy = < Date: Tue, 24 Jul 2018 11:01:25 -0400 Subject: [PATCH 1932/3316] Update CHANGELOG for #5186 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7743a0ec29e..b01d98e001f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* data-source/aws_iam_role: Add `permissions_boundary` attribute [GH-5186] * data-source/aws_vpc: Add `arn` attribute [GH-5300] * resource/aws_instance: Add `cpu_core_count` and `cpu_threads_per_core` arguments [GH-5159] * resource/aws_secretsmanager_secret: Add `policy` argument [GH-5290] From bfd9961f23c0bfe797db2b1cc5d28dc3159e387d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Jul 2018 11:12:22 -0400 Subject: [PATCH 1933/3316] Update CHANGELOG for #5306 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b01d98e001f..ae3fcd3d7be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ENHANCEMENTS: * data-source/aws_iam_role: Add `permissions_boundary` attribute [GH-5186] * data-source/aws_vpc: Add `arn` attribute [GH-5300] * resource/aws_instance: Add `cpu_core_count` and `cpu_threads_per_core` arguments [GH-5159] +* resource/aws_launch_template: Add `arn` attribute [GH-5306] * resource/aws_secretsmanager_secret: Add `policy` argument [GH-5290] * resource/aws_vpc: Add `arn` attribute [GH-5300] * resource/aws_default_vpc: Add `arn` attribute [GH-5300] From c348a1023146d546986f76eed1dd2887f7a2120d Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Tue, 24 Jul 2018 21:05:09 +0400 Subject: [PATCH 1934/3316] new datasource aws_network_interfaces --- aws/data_source_aws_network_interfaces.go | 79 +++++++++++++++++++++++ aws/provider.go | 1 + 2 files changed, 80 insertions(+) create mode 100644 aws/data_source_aws_network_interfaces.go diff --git a/aws/data_source_aws_network_interfaces.go b/aws/data_source_aws_network_interfaces.go new file mode 100644 index 00000000000..316c598032f --- /dev/null +++ b/aws/data_source_aws_network_interfaces.go @@ -0,0 +1,79 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsNetworkInterfaces() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsNetworkInterfacesRead, + Schema: map[string]*schema.Schema{ + + "filter": ec2CustomFiltersSchema(), + + "tags": tagsSchemaComputed(), + + "ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsNetworkInterfacesRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeNetworkInterfacesInput{} + + filters, filtersOk := d.GetOk("filter") + tags, tagsOk := d.GetOk("tags") + + if tagsOk { + req.Filters = buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + ) + } + + if filtersOk { + req.Filters = append(req.Filters, buildEC2CustomFilterList( + filters.(*schema.Set), + )...) + } + + if len(req.Filters) == 0 { + req.Filters = nil + } + + log.Printf("[DEBUG] DescribeNetworkInterfaces %s\n", req) + resp, err := conn.DescribeNetworkInterfaces(req) + if err != nil { + return err + } + + if resp == nil || len(resp.NetworkInterfaces) == 0 { + return errors.New("no matching network interfaces found") + } + + networkInterfaces := make([]string, 0) + + for _, networkInterface := range resp.NetworkInterfaces { + networkInterfaces = append(networkInterfaces, aws.StringValue(networkInterface.NetworkInterfaceId)) + } + + d.SetId(resource.UniqueId()) + if err := d.Set("ids", networkInterfaces); err != nil { + return fmt.Errorf("Error setting network interfaces ids: %s", err) + } + + return nil +} diff --git a/aws/provider.go b/aws/provider.go index c52dea8bc56..6e6b38582b9 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -230,6 +230,7 @@ func Provider() terraform.ResourceProvider { "aws_nat_gateway": dataSourceAwsNatGateway(), "aws_network_acls": dataSourceAwsNetworkAcls(), "aws_network_interface": dataSourceAwsNetworkInterface(), + "aws_network_interfaces": dataSourceAwsNetworkInterfaces(), "aws_partition": dataSourceAwsPartition(), "aws_prefix_list": dataSourceAwsPrefixList(), "aws_pricing_product": dataSourceAwsPricingProduct(), From e8004961c80eacb4ade7005e7a930f668d109af4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Jul 2018 14:40:55 -0400 Subject: [PATCH 1935/3316] resource/aws_route53_record: Prevent DomainLabelEmpty errors when expanding record names with trailing period --- aws/resource_aws_route53_record.go | 2 +- aws/resource_aws_route53_record_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index 79743db3753..f0f6651065e 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -929,7 +929,7 @@ func expandRecordName(name, zone string) string { if len(name) == 0 { rn = zone } else { - rn = strings.Join([]string{name, zone}, ".") + rn = strings.Join([]string{rn, zone}, ".") } } return rn diff --git a/aws/resource_aws_route53_record_test.go b/aws/resource_aws_route53_record_test.go index 550d732cd03..dd3db05410d 100644 --- a/aws/resource_aws_route53_record_test.go +++ b/aws/resource_aws_route53_record_test.go @@ -40,6 +40,7 @@ func TestExpandRecordName(t *testing.T) { Input, Output string }{ {"www", "www.nonexample.com"}, + {"www.", "www.nonexample.com"}, {"dev.www", "dev.www.nonexample.com"}, {"*", "*.nonexample.com"}, {"nonexample.com", "nonexample.com"}, From 27b8f95df286e210f249399bedfbf87330af87d6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sat, 14 Jul 2018 12:33:06 -0400 Subject: [PATCH 1936/3316] New Data Source: aws_kms_secrets Add DeprecationMessage to existing aws_kms_secret data source --- aws/data_source_aws_kms_secret.go | 3 +- aws/data_source_aws_kms_secrets.go | 108 +++++++++++++++++++ aws/data_source_aws_kms_secrets_test.go | 105 ++++++++++++++++++ aws/provider.go | 1 + website/aws.erb | 5 +- website/docs/d/kms_secret.html.markdown | 4 +- website/docs/d/kms_secrets.html.markdown | 130 +++++++++++++++++++++++ 7 files changed, 353 insertions(+), 3 deletions(-) create mode 100644 aws/data_source_aws_kms_secrets.go create mode 100644 aws/data_source_aws_kms_secrets_test.go create mode 100644 website/docs/d/kms_secrets.html.markdown diff --git a/aws/data_source_aws_kms_secret.go b/aws/data_source_aws_kms_secret.go index 3b022dfb5f2..f2a36096d90 100644 --- a/aws/data_source_aws_kms_secret.go +++ b/aws/data_source_aws_kms_secret.go @@ -13,7 +13,8 @@ import ( func dataSourceAwsKmsSecret() *schema.Resource { return &schema.Resource{ - Read: dataSourceAwsKmsSecretRead, + DeprecationMessage: "This data source will change or be removed in Terraform AWS provider version 2.0. Please see migration information available in: https://www.terraform.io/docs/providers/aws/d/kms_secrets.html", + Read: dataSourceAwsKmsSecretRead, Schema: map[string]*schema.Schema{ "secret": { diff --git a/aws/data_source_aws_kms_secrets.go b/aws/data_source_aws_kms_secrets.go new file mode 100644 index 00000000000..97b62272201 --- /dev/null +++ b/aws/data_source_aws_kms_secrets.go @@ -0,0 +1,108 @@ +package aws + +import ( + "encoding/base64" + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kms" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsKmsSecrets() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsKmsSecretsRead, + + Schema: map[string]*schema.Schema{ + "secret": { + Type: schema.TypeSet, + Required: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "payload": { + Type: schema.TypeString, + Required: true, + }, + "context": { + Type: schema.TypeMap, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "grant_tokens": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + "plaintext": { + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + Sensitive: true, + }, + }, + }, + } +} + +func dataSourceAwsKmsSecretsRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kmsconn + + secrets := d.Get("secret").(*schema.Set) + plaintext := make(map[string]string, len(secrets.List())) + + for _, v := range secrets.List() { + secret := v.(map[string]interface{}) + + // base64 decode the payload + payload, err := base64.StdEncoding.DecodeString(secret["payload"].(string)) + if err != nil { + return fmt.Errorf("Invalid base64 value for secret '%s': %v", secret["name"].(string), err) + } + + // build the kms decrypt params + params := &kms.DecryptInput{ + CiphertextBlob: []byte(payload), + } + if context, exists := secret["context"]; exists { + params.EncryptionContext = make(map[string]*string) + for k, v := range context.(map[string]interface{}) { + params.EncryptionContext[k] = aws.String(v.(string)) + } + } + if grant_tokens, exists := secret["grant_tokens"]; exists { + params.GrantTokens = make([]*string, 0) + for _, v := range grant_tokens.([]interface{}) { + params.GrantTokens = append(params.GrantTokens, aws.String(v.(string))) + } + } + + // decrypt + resp, err := conn.Decrypt(params) + if err != nil { + return fmt.Errorf("Failed to decrypt '%s': %s", secret["name"].(string), err) + } + + // Set the secret via the name + log.Printf("[DEBUG] aws_kms_secret - successfully decrypted secret: %s", secret["name"].(string)) + plaintext[secret["name"].(string)] = string(resp.Plaintext) + } + + if err := d.Set("plaintext", plaintext); err != nil { + return fmt.Errorf("error setting plaintext: %s", err) + } + + d.SetId(time.Now().UTC().String()) + + return nil +} diff --git a/aws/data_source_aws_kms_secrets_test.go b/aws/data_source_aws_kms_secrets_test.go new file mode 100644 index 00000000000..29c2d035afb --- /dev/null +++ b/aws/data_source_aws_kms_secrets_test.go @@ -0,0 +1,105 @@ +package aws + +import ( + "encoding/base64" + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kms" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSKmsSecretsDataSource_basic(t *testing.T) { + var encryptedPayload string + var key kms.KeyMetadata + + plaintext := "my-plaintext-string" + resourceName := "aws_kms_key.test" + + // Run a resource test to setup our KMS key + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAwsKmsSecretsDataSourceKey, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSKmsKeyExists(resourceName, &key), + testAccDataSourceAwsKmsSecretsEncrypt(&key, plaintext, &encryptedPayload), + // We need to dereference the encryptedPayload in a test Terraform configuration + testAccDataSourceAwsKmsSecretsDecrypt(t, plaintext, &encryptedPayload), + ), + }, + }, + }) +} + +func testAccDataSourceAwsKmsSecretsEncrypt(key *kms.KeyMetadata, plaintext string, encryptedPayload *string) resource.TestCheckFunc { + return func(s *terraform.State) error { + kmsconn := testAccProvider.Meta().(*AWSClient).kmsconn + + input := &kms.EncryptInput{ + KeyId: key.Arn, + Plaintext: []byte(plaintext), + EncryptionContext: map[string]*string{ + "name": aws.String("value"), + }, + } + + resp, err := kmsconn.Encrypt(input) + if err != nil { + return fmt.Errorf("failed encrypting string: %s", err) + } + + *encryptedPayload = base64.StdEncoding.EncodeToString(resp.CiphertextBlob) + + return nil + } +} + +func testAccDataSourceAwsKmsSecretsDecrypt(t *testing.T, plaintext string, encryptedPayload *string) resource.TestCheckFunc { + return func(s *terraform.State) error { + dataSourceName := "data.aws_kms_secrets.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckAwsKmsSecretsDataSourceSecret(*encryptedPayload), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, "plaintext.%", "1"), + resource.TestCheckResourceAttr(dataSourceName, "plaintext.secret1", plaintext), + ), + }, + }, + }) + + return nil + } +} + +const testAccCheckAwsKmsSecretsDataSourceKey = ` +resource "aws_kms_key" "test" { + deletion_window_in_days = 7 + description = "Testing the Terraform AWS KMS Secrets data_source" +} +` + +func testAccCheckAwsKmsSecretsDataSourceSecret(payload string) string { + return testAccCheckAwsKmsSecretsDataSourceKey + fmt.Sprintf(` +data "aws_kms_secrets" "test" { + secret { + name = "secret1" + payload = %q + + context { + name = "value" + } + } +} +`, payload) +} diff --git a/aws/provider.go b/aws/provider.go index c52dea8bc56..6d1e3fa5128 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -223,6 +223,7 @@ func Provider() terraform.ResourceProvider { "aws_kms_ciphertext": dataSourceAwsKmsCiphertext(), "aws_kms_key": dataSourceAwsKmsKey(), "aws_kms_secret": dataSourceAwsKmsSecret(), + "aws_kms_secrets": dataSourceAwsKmsSecrets(), "aws_lambda_function": dataSourceAwsLambdaFunction(), "aws_lambda_invocation": dataSourceAwsLambdaInvocation(), "aws_launch_configuration": dataSourceAwsLaunchConfiguration(), diff --git a/website/aws.erb b/website/aws.erb index 305d23a6551..cd943caaa24 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -235,9 +235,12 @@ > aws_kms_ciphertext - > + > aws_kms_secret + > + aws_kms_secrets + > aws_lambda_invocation diff --git a/website/docs/d/kms_secret.html.markdown b/website/docs/d/kms_secret.html.markdown index 113ad814a02..b40e023fcc7 100644 --- a/website/docs/d/kms_secret.html.markdown +++ b/website/docs/d/kms_secret.html.markdown @@ -1,13 +1,15 @@ --- layout: "aws" page_title: "AWS: aws_kms_secret" -sidebar_current: "docs-aws-datasource-kms-secret" +sidebar_current: "docs-aws-datasource-kms-secret-x" description: |- Provides secret data encrypted with the KMS service --- # Data Source: aws_kms_secret +!> **WARNING:** The `aws_kms_secret` data source contains behavior that cannot be supported on Terraform 0.12+ and it will either introduce breaking changes or be removed completely in the next major version (2.0.0) of the AWS provider. You can migrate existing Terraform configurations to the `aws_kms_secrets` data source, which closely resembles this data source, following instructions available in the [`aws_kms_secrets` data source documentation](/docs/providers/aws/d/kms_secrets.html). + The KMS secret data source allows you to use data encrypted with the AWS KMS service within your resource definitions. diff --git a/website/docs/d/kms_secrets.html.markdown b/website/docs/d/kms_secrets.html.markdown new file mode 100644 index 00000000000..136d868a2b6 --- /dev/null +++ b/website/docs/d/kms_secrets.html.markdown @@ -0,0 +1,130 @@ +--- +layout: "aws" +page_title: "AWS: aws_kms_secrets" +sidebar_current: "docs-aws-datasource-kms-secrets" +description: |- + Decrypt multiple secrets from data encrypted with the AWS KMS service +--- + +# Data Source: aws_kms_secrets + +Decrypt multiple secrets from data encrypted with the AWS KMS service. + +~> **NOTE**: Using this data provider will allow you to conceal secret data within your resource definitions but does not take care of protecting that data in all Terraform logging and state output. Please take care to secure your secret data beyond just the Terraform configuration. + +## Example Usage + +If you do not already have a `CiphertextBlob` from encrypting a KMS secret, you can use the below commands to obtain one using the [AWS CLI kms encrypt](https://docs.aws.amazon.com/cli/latest/reference/kms/encrypt.html) command. This requires you to have your AWS CLI setup correctly and replace the `--key-id` with your own. Alternatively you can use `--plaintext 'password'` instead of reading from a file. + +-> If you have a newline character at the end of your file, it will be decrypted with this newline character intact. For most use cases this is undesirable and leads to incorrect passwords or invalid values, as well as possible changes in the plan. Be sure to use `echo -n` if necessary. + +```sh +$ echo -n 'master-password' > plaintext-password +$ aws kms encrypt --key-id ab123456-c012-4567-890a-deadbeef123 --plaintext fileb://plaintext-password --encryption-context foo=bar --output text --query CiphertextBlob +AQECAHgaPa0J8WadplGCqqVAr4HNvDaFSQ+NaiwIBhmm6qDSFwAAAGIwYAYJKoZIhvcNAQcGoFMwUQIBADBMBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDI+LoLdvYv8l41OhAAIBEIAfx49FFJCLeYrkfMfAw6XlnxP23MmDBdqP8dPp28OoAQ== +``` + +That encrypted output can now be inserted into Terraform configurations without exposing the plaintext secret directly. + +```hcl +data "aws_kms_secrets" "example" { + secret { + name = "master_password" + payload = "AQECAHgaPa0J8WadplGCqqVAr4HNvDaFSQ+NaiwIBhmm6qDSFwAAAGIwYAYJKoZIhvcNAQcGoFMwUQIBADBMBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDI+LoLdvYv8l41OhAAIBEIAfx49FFJCLeYrkfMfAw6XlnxP23MmDBdqP8dPp28OoAQ==" + + context { + foo = "bar" + } + } +} + +resource "aws_rds_cluster" "example" { + # ... other configuration ... + master_password = "${data.aws_kms_secrets.example.plaintext["master_password"]}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `secret` - (Required) One or more encrypted payload definitions from the KMS service. See the Secret Definitions below. + +### Secret Definitions + +Each `secret` supports the following arguments: + +* `name` - (Required) The name to export this secret under in the attributes. +* `payload` - (Required) Base64 encoded payload, as returned from a KMS encrypt operation. +* `context` - (Optional) An optional mapping that makes up the Encryption Context for the secret. +* `grant_tokens` (Optional) An optional list of Grant Tokens for the secret. + +For more information on `context` and `grant_tokens` see the [KMS +Concepts](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html) + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `plaintext` - Map containing each `secret` `name` as the key with its decrypted plaintext value + +## Migrating From aws_kms_secret Data Source Prior to Terraform AWS Provider Version 2.0 + +The implementation of the `aws_kms_secret` data source, prior to Terraform AWS provider version 2.0, used dynamic attribute behavior which is not supported with Terraform 0.12 and beyond (full details available in [this GitHub issue](https://github.com/terraform-providers/terraform-provider-aws/issues/5144)). + +Terraform configuration migration steps: + +* Change the data source type from `aws_kms_secret` to `aws_kms_secrets` +* Change any attribute reference (e.g. `"${data.aws_kms_secret.example.ATTRIBUTE}"`) from `.ATTRIBUTE` to `.plaintext["ATTRIBUTE"]` + +As an example, lets take the below sample configuration and migrate it. + +```hcl +# Below example configuration will not be supported in Terraform AWS provider version 2.0 + +data "aws_kms_secret" "example" { + secret { + # ... potentially other configration ... + name = "master_password" + payload = "AQEC..." + } + + secret { + # ... potentially other configration ... + name = "master_username" + payload = "AQEC..." + } +} + +resource "aws_rds_cluster" "example" { + # ... other configuration ... + master_password = "${data.aws_kms_secret.example.master_password}" + master_username = "${data.aws_kms_secret.example.master_username}" +} +``` + +Notice that the `aws_kms_secret` data source previously was taking the two `secret` configuration block `name` arguments and generating those as attribute names (`master_password` and `master_username` in this case). To remove the incompatible behavior, this updated version of the data source provides the decrypted value of each of those `secret` configuration block `name` arguments within a map attribute named `plaintext`. + +Updating the sample configuration from above: + +```hcl +data "aws_kms_secrets" "example" { + secret { + # ... potentially other configration ... + name = "master_password" + payload = "AQEC..." + } + + secret { + # ... potentially other configration ... + name = "master_username" + payload = "AQEC..." + } +} + +resource "aws_rds_cluster" "example" { + # ... other configuration ... + master_password = "${data.aws_kms_secrets.example.plaintext["master_password"]}" + master_username = "${data.aws_kms_secrets.example.plaintext["master_username"]}" +} +``` From 050fd45696160aceeb8dfe44c58cff646aef74b1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Jul 2018 15:19:34 -0400 Subject: [PATCH 1937/3316] Update CHANGELOG for #5312 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae3fcd3d7be..c7b9ca9c415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ENHANCEMENTS: * resource/aws_vpc: Add `arn` attribute [GH-5300] * resource/aws_default_vpc: Add `arn` attribute [GH-5300] +BUG FIXES: + +* resource/aws_route53_record: Prevent DomainLabelEmpty errors when expanding record names with trailing period [GH-5312] + ## 1.28.0 (July 18, 2018) FEATURES: From a56d48d77fc2d4d47a3843936ce2c50c4001621c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Jul 2018 15:30:41 -0400 Subject: [PATCH 1938/3316] New Guide: AWS Provider Version 2 Upgrade --- website/aws.erb | 4 + website/docs/d/kms_secret.html.markdown | 2 +- website/docs/d/kms_secrets.html.markdown | 61 --------------- website/docs/guides/version-2-upgrade.html.md | 78 +++++++++++++++++++ 4 files changed, 83 insertions(+), 62 deletions(-) create mode 100644 website/docs/guides/version-2-upgrade.html.md diff --git a/website/aws.erb b/website/aws.erb index cd943caaa24..cc9af5ca0bc 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -25,6 +25,10 @@ Guides diff --git a/website/docs/r/storagegateway_working_storage.html.markdown b/website/docs/r/storagegateway_working_storage.html.markdown new file mode 100644 index 00000000000..3dce28b3ffb --- /dev/null +++ b/website/docs/r/storagegateway_working_storage.html.markdown @@ -0,0 +1,43 @@ +--- +layout: "aws" +page_title: "AWS: aws_storagegateway_working_storage" +sidebar_current: "docs-aws-resource-storagegateway-working-storage" +description: |- + Manages an AWS Storage Gateway working storage +--- + +# aws_storagegateway_working_storage + +Manages an AWS Storage Gateway working storage. + +~> **NOTE:** The Storage Gateway API provides no method to remove a working storage disk. Destroying this Terraform resource does not perform any Storage Gateway actions. + +## Example Usage + +```hcl +resource "aws_storagegateway_working_storage" "example" { + disk_id = "${data.aws_storagegateway_local_disk.example.id}" + gateway_arn = "${aws_storagegateway_gateway.example.arn}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `disk_id` - (Required) Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`. +* `gateway_arn` - (Required) The Amazon Resource Name (ARN) of the gateway. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - Combined gateway Amazon Resource Name (ARN) and local disk identifier. + +## Import + +`aws_storagegateway_working_storage` can be imported by using the gateway Amazon Resource Name (ARN) and local disk identifier separated with a colon (`:`), e.g. + +``` +$ terraform import aws_storagegateway_working_storage.example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 +``` From e9d7a377b57f3080604d4768d2103fe53e2205cd Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 27 Jul 2018 15:36:31 -0400 Subject: [PATCH 2000/3316] Update CHANGELOG for #5279 and #5285 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 779cac13861..b940c79fd7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ FEATURES: +* **New Data Source:** `aws_storagegateway_local_disk` [GH-5279] +* **New Resource:** `aws_storagegateway_working_storage` [GH-5285] * **New Resource:** `aws_storagegateway_nfs_file_share` [GH-5255] ENHANCEMENTS: From 6aa56f93405e2a19c398ee12b6f83d6a9fe3821a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Jul 2018 17:36:03 -0400 Subject: [PATCH 2001/3316] New Resource: aws_storagegateway_upload_buffer --- aws/provider.go | 1 + ...source_aws_storagegateway_upload_buffer.go | 131 ++++++++++++++ ...e_aws_storagegateway_upload_buffer_test.go | 165 ++++++++++++++++++ website/aws.erb | 4 + ...storagegateway_upload_buffer.html.markdown | 43 +++++ 5 files changed, 344 insertions(+) create mode 100644 aws/resource_aws_storagegateway_upload_buffer.go create mode 100644 aws/resource_aws_storagegateway_upload_buffer_test.go create mode 100644 website/docs/r/storagegateway_upload_buffer.html.markdown diff --git a/aws/provider.go b/aws/provider.go index d91222e5430..c1912d77a4a 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -587,6 +587,7 @@ func Provider() terraform.ResourceProvider { "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), + "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), diff --git a/aws/resource_aws_storagegateway_upload_buffer.go b/aws/resource_aws_storagegateway_upload_buffer.go new file mode 100644 index 00000000000..4864c3f6567 --- /dev/null +++ b/aws/resource_aws_storagegateway_upload_buffer.go @@ -0,0 +1,131 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsStorageGatewayUploadBuffer() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsStorageGatewayUploadBufferCreate, + Read: resourceAwsStorageGatewayUploadBufferRead, + Delete: schema.Noop, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "disk_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "gateway_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + }, + } +} + +func resourceAwsStorageGatewayUploadBufferCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + + diskID := d.Get("disk_id").(string) + gatewayARN := d.Get("gateway_arn").(string) + + input := &storagegateway.AddUploadBufferInput{ + DiskIds: []*string{aws.String(diskID)}, + GatewayARN: aws.String(gatewayARN), + } + + log.Printf("[DEBUG] Adding Storage Gateway upload buffer: %s", input) + _, err := conn.AddUploadBuffer(input) + if err != nil { + return fmt.Errorf("error adding Storage Gateway upload buffer: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", gatewayARN, diskID)) + + return resourceAwsStorageGatewayUploadBufferRead(d, meta) +} + +func resourceAwsStorageGatewayUploadBufferRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + + gatewayARN, diskID, err := decodeStorageGatewayUploadBufferID(d.Id()) + if err != nil { + return err + } + + input := &storagegateway.DescribeUploadBufferInput{ + GatewayARN: aws.String(gatewayARN), + } + + log.Printf("[DEBUG] Reading Storage Gateway upload buffer: %s", input) + output, err := conn.DescribeUploadBuffer(input) + if err != nil { + if isAWSErrStorageGatewayGatewayNotFound(err) { + log.Printf("[WARN] Storage Gateway upload buffer %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Storage Gateway upload buffer: %s", err) + } + + if output == nil || len(output.DiskIds) == 0 { + log.Printf("[WARN] Storage Gateway upload buffer %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + found := false + for _, existingDiskID := range output.DiskIds { + if aws.StringValue(existingDiskID) == diskID { + found = true + break + } + } + + if !found { + log.Printf("[WARN] Storage Gateway upload buffer %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("disk_id", diskID) + d.Set("gateway_arn", gatewayARN) + + return nil +} + +func decodeStorageGatewayUploadBufferID(id string) (string, string, error) { + // id = arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 + idFormatErr := fmt.Errorf("expected ID in form of GatewayARN:DiskId, received: %s", id) + gatewayARNAndDisk, err := arn.Parse(id) + if err != nil { + return "", "", idFormatErr + } + // gatewayARNAndDisk.Resource = gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 + resourceParts := strings.SplitN(gatewayARNAndDisk.Resource, ":", 2) + if len(resourceParts) != 2 { + return "", "", idFormatErr + } + // resourceParts = ["gateway/sgw-12345678", "pci-0000:03:00.0-scsi-0:0:0:0"] + gatewayARN := &arn.ARN{ + AccountID: gatewayARNAndDisk.AccountID, + Partition: gatewayARNAndDisk.Partition, + Region: gatewayARNAndDisk.Region, + Service: gatewayARNAndDisk.Service, + Resource: resourceParts[0], + } + return gatewayARN.String(), resourceParts[1], nil +} diff --git a/aws/resource_aws_storagegateway_upload_buffer_test.go b/aws/resource_aws_storagegateway_upload_buffer_test.go new file mode 100644 index 00000000000..9af32c83214 --- /dev/null +++ b/aws/resource_aws_storagegateway_upload_buffer_test.go @@ -0,0 +1,165 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestDecodeStorageGatewayUploadBufferID(t *testing.T) { + var testCases = []struct { + Input string + ExpectedGatewayARN string + ExpectedDiskID string + ErrCount int + }{ + { + Input: "arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0", + ExpectedGatewayARN: "arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678", + ExpectedDiskID: "pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 0, + }, + { + Input: "sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 1, + }, + { + Input: "example:pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 1, + }, + { + Input: "arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678", + ErrCount: 1, + }, + { + Input: "pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 1, + }, + { + Input: "gateway/sgw-12345678", + ErrCount: 1, + }, + { + Input: "sgw-12345678", + ErrCount: 1, + }, + } + + for _, tc := range testCases { + gatewayARN, diskID, err := decodeStorageGatewayUploadBufferID(tc.Input) + if tc.ErrCount == 0 && err != nil { + t.Fatalf("expected %q not to trigger an error, received: %s", tc.Input, err) + } + if tc.ErrCount > 0 && err == nil { + t.Fatalf("expected %q to trigger an error", tc.Input) + } + if gatewayARN != tc.ExpectedGatewayARN { + t.Fatalf("expected %q to return Gateway ARN %q, received: %s", tc.Input, tc.ExpectedGatewayARN, gatewayARN) + } + if diskID != tc.ExpectedDiskID { + t.Fatalf("expected %q to return Disk ID %q, received: %s", tc.Input, tc.ExpectedDiskID, diskID) + } + } +} + +func TestAccAWSStorageGatewayUploadBuffer_Basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_storagegateway_upload_buffer.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + // Storage Gateway API does not support removing upload buffers + // CheckDestroy: testAccCheckAWSStorageGatewayUploadBufferDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSStorageGatewayUploadBufferConfig_Basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSStorageGatewayUploadBufferExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "disk_id"), + resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:[^:]+:storagegateway:[^:]+:[^:]+:gateway/sgw-.+$`)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSStorageGatewayUploadBufferExists(resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + conn := testAccProvider.Meta().(*AWSClient).storagegatewayconn + + gatewayARN, diskID, err := decodeStorageGatewayUploadBufferID(rs.Primary.ID) + if err != nil { + return err + } + + input := &storagegateway.DescribeUploadBufferInput{ + GatewayARN: aws.String(gatewayARN), + } + + output, err := conn.DescribeUploadBuffer(input) + + if err != nil { + return fmt.Errorf("error reading Storage Gateway upload buffer: %s", err) + } + + if output == nil || len(output.DiskIds) == 0 { + return fmt.Errorf("Storage Gateway upload buffer %q not found", rs.Primary.ID) + } + + for _, existingDiskID := range output.DiskIds { + if aws.StringValue(existingDiskID) == diskID { + return nil + } + } + + return fmt.Errorf("Storage Gateway upload buffer %q not found", rs.Primary.ID) + } +} + +func testAccAWSStorageGatewayUploadBufferConfig_Basic(rName string) string { + return testAccAWSStorageGatewayGatewayConfig_GatewayType_Stored(rName) + fmt.Sprintf(` +resource "aws_ebs_volume" "test" { + availability_zone = "${aws_instance.test.availability_zone}" + size = "10" + type = "gp2" + + tags { + Name = %q + } +} + +resource "aws_volume_attachment" "test" { + device_name = "/dev/xvdc" + force_detach = true + instance_id = "${aws_instance.test.id}" + volume_id = "${aws_ebs_volume.test.id}" +} + +data "aws_storagegateway_local_disk" "test" { + disk_path = "${aws_volume_attachment.test.device_name}" + gateway_arn = "${aws_storagegateway_gateway.test.arn}" +} + +resource "aws_storagegateway_upload_buffer" "test" { + disk_id = "${data.aws_storagegateway_local_disk.test.id}" + gateway_arn = "${aws_storagegateway_gateway.test.arn}" +} +`, rName) +} diff --git a/website/aws.erb b/website/aws.erb index ffadd674dbc..b01383b131b 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -2148,6 +2148,10 @@ aws_storagegateway_nfs_file_share + > + aws_storagegateway_upload_buffer + + > aws_storagegateway_working_storage diff --git a/website/docs/r/storagegateway_upload_buffer.html.markdown b/website/docs/r/storagegateway_upload_buffer.html.markdown new file mode 100644 index 00000000000..d7434972295 --- /dev/null +++ b/website/docs/r/storagegateway_upload_buffer.html.markdown @@ -0,0 +1,43 @@ +--- +layout: "aws" +page_title: "AWS: aws_storagegateway_upload_buffer" +sidebar_current: "docs-aws-resource-storagegateway-upload-buffer" +description: |- + Manages an AWS Storage Gateway upload buffer +--- + +# aws_storagegateway_upload_buffer + +Manages an AWS Storage Gateway upload buffer. + +~> **NOTE:** The Storage Gateway API provides no method to remove an upload buffer disk. Destroying this Terraform resource does not perform any Storage Gateway actions. + +## Example Usage + +```hcl +resource "aws_storagegateway_upload_buffer" "example" { + disk_id = "${data.aws_storagegateway_local_disk.example.id}" + gateway_arn = "${aws_storagegateway_gateway.example.arn}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `disk_id` - (Required) Local disk identifier. For example, `pci-0000:03:00.0-scsi-0:0:0:0`. +* `gateway_arn` - (Required) The Amazon Resource Name (ARN) of the gateway. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - Combined gateway Amazon Resource Name (ARN) and local disk identifier. + +## Import + +`aws_storagegateway_upload_buffer` can be imported by using the gateway Amazon Resource Name (ARN) and local disk identifier separated with a colon (`:`), e.g. + +``` +$ terraform import aws_storagegateway_upload_buffer.example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 +``` From 34a7ab1a6458888ba158931d4dc409faa3defbf9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 27 Jul 2018 15:53:11 -0400 Subject: [PATCH 2002/3316] Update CHANGELOG for #5284 and fix ordering for #5285 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b940c79fd7c..4b22c5e0abe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,9 @@ FEATURES: * **New Data Source:** `aws_storagegateway_local_disk` [GH-5279] -* **New Resource:** `aws_storagegateway_working_storage` [GH-5285] * **New Resource:** `aws_storagegateway_nfs_file_share` [GH-5255] +* **New Resource:** `aws_storagegateway_upload_buffer` [GH-5284] +* **New Resource:** `aws_storagegateway_working_storage` [GH-5285] ENHANCEMENTS: From db9b9b179209bff0a243bc44d068ba111c5e0e68 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Jul 2018 16:33:58 -0400 Subject: [PATCH 2003/3316] New Resource: aws_storagegateway_cache --- aws/provider.go | 1 + aws/resource_aws_storagegateway_cache.go | 131 ++++++++++++++ aws/resource_aws_storagegateway_cache_test.go | 165 ++++++++++++++++++ website/aws.erb | 4 + .../docs/r/storagegateway_cache.html.markdown | 43 +++++ 5 files changed, 344 insertions(+) create mode 100644 aws/resource_aws_storagegateway_cache.go create mode 100644 aws/resource_aws_storagegateway_cache_test.go create mode 100644 website/docs/r/storagegateway_cache.html.markdown diff --git a/aws/provider.go b/aws/provider.go index c1912d77a4a..6d1859af9ac 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -585,6 +585,7 @@ func Provider() terraform.ResourceProvider { "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), "aws_ssm_parameter": resourceAwsSsmParameter(), "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), diff --git a/aws/resource_aws_storagegateway_cache.go b/aws/resource_aws_storagegateway_cache.go new file mode 100644 index 00000000000..24b720431dc --- /dev/null +++ b/aws/resource_aws_storagegateway_cache.go @@ -0,0 +1,131 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsStorageGatewayCache() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsStorageGatewayCacheCreate, + Read: resourceAwsStorageGatewayCacheRead, + Delete: schema.Noop, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "disk_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "gateway_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + }, + } +} + +func resourceAwsStorageGatewayCacheCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + + diskID := d.Get("disk_id").(string) + gatewayARN := d.Get("gateway_arn").(string) + + input := &storagegateway.AddCacheInput{ + DiskIds: []*string{aws.String(diskID)}, + GatewayARN: aws.String(gatewayARN), + } + + log.Printf("[DEBUG] Adding Storage Gateway cache: %s", input) + _, err := conn.AddCache(input) + if err != nil { + return fmt.Errorf("error adding Storage Gateway cache: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", gatewayARN, diskID)) + + return resourceAwsStorageGatewayCacheRead(d, meta) +} + +func resourceAwsStorageGatewayCacheRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).storagegatewayconn + + gatewayARN, diskID, err := decodeStorageGatewayID(d.Id()) + if err != nil { + return err + } + + input := &storagegateway.DescribeCacheInput{ + GatewayARN: aws.String(gatewayARN), + } + + log.Printf("[DEBUG] Reading Storage Gateway cache: %s", input) + output, err := conn.DescribeCache(input) + if err != nil { + if isAWSErrStorageGatewayGatewayNotFound(err) { + log.Printf("[WARN] Storage Gateway cache %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Storage Gateway cache: %s", err) + } + + if output == nil || len(output.DiskIds) == 0 { + log.Printf("[WARN] Storage Gateway cache %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + found := false + for _, existingDiskID := range output.DiskIds { + if aws.StringValue(existingDiskID) == diskID { + found = true + break + } + } + + if !found { + log.Printf("[WARN] Storage Gateway cache %q not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("disk_id", diskID) + d.Set("gateway_arn", gatewayARN) + + return nil +} + +func decodeStorageGatewayID(id string) (string, string, error) { + // id = arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 + idFormatErr := fmt.Errorf("expected ID in form of GatewayARN:DiskId, received: %s", id) + gatewayARNAndDisk, err := arn.Parse(id) + if err != nil { + return "", "", idFormatErr + } + // gatewayARNAndDisk.Resource = gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 + resourceParts := strings.SplitN(gatewayARNAndDisk.Resource, ":", 2) + if len(resourceParts) != 2 { + return "", "", idFormatErr + } + // resourceParts = ["gateway/sgw-12345678", "pci-0000:03:00.0-scsi-0:0:0:0"] + gatewayARN := &arn.ARN{ + AccountID: gatewayARNAndDisk.AccountID, + Partition: gatewayARNAndDisk.Partition, + Region: gatewayARNAndDisk.Region, + Service: gatewayARNAndDisk.Service, + Resource: resourceParts[0], + } + return gatewayARN.String(), resourceParts[1], nil +} diff --git a/aws/resource_aws_storagegateway_cache_test.go b/aws/resource_aws_storagegateway_cache_test.go new file mode 100644 index 00000000000..9a9cc637d96 --- /dev/null +++ b/aws/resource_aws_storagegateway_cache_test.go @@ -0,0 +1,165 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/storagegateway" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestDecodeStorageGatewayCacheID(t *testing.T) { + var testCases = []struct { + Input string + ExpectedGatewayARN string + ExpectedDiskID string + ErrCount int + }{ + { + Input: "arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0", + ExpectedGatewayARN: "arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678", + ExpectedDiskID: "pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 0, + }, + { + Input: "sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 1, + }, + { + Input: "example:pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 1, + }, + { + Input: "arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678", + ErrCount: 1, + }, + { + Input: "pci-0000:03:00.0-scsi-0:0:0:0", + ErrCount: 1, + }, + { + Input: "gateway/sgw-12345678", + ErrCount: 1, + }, + { + Input: "sgw-12345678", + ErrCount: 1, + }, + } + + for _, tc := range testCases { + gatewayARN, diskID, err := decodeStorageGatewayID(tc.Input) + if tc.ErrCount == 0 && err != nil { + t.Fatalf("expected %q not to trigger an error, received: %s", tc.Input, err) + } + if tc.ErrCount > 0 && err == nil { + t.Fatalf("expected %q to trigger an error", tc.Input) + } + if gatewayARN != tc.ExpectedGatewayARN { + t.Fatalf("expected %q to return Gateway ARN %q, received: %s", tc.Input, tc.ExpectedGatewayARN, gatewayARN) + } + if diskID != tc.ExpectedDiskID { + t.Fatalf("expected %q to return Disk ID %q, received: %s", tc.Input, tc.ExpectedDiskID, diskID) + } + } +} + +func TestAccAWSStorageGatewayCache_Basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_storagegateway_cache.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + // Storage Gateway API does not support removing caches + // CheckDestroy: testAccCheckAWSStorageGatewayCacheDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSStorageGatewayCacheConfig_Basic(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSStorageGatewayCacheExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "disk_id"), + resource.TestMatchResourceAttr(resourceName, "gateway_arn", regexp.MustCompile(`^arn:[^:]+:storagegateway:[^:]+:[^:]+:gateway/sgw-.+$`)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSStorageGatewayCacheExists(resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + conn := testAccProvider.Meta().(*AWSClient).storagegatewayconn + + gatewayARN, diskID, err := decodeStorageGatewayID(rs.Primary.ID) + if err != nil { + return err + } + + input := &storagegateway.DescribeCacheInput{ + GatewayARN: aws.String(gatewayARN), + } + + output, err := conn.DescribeCache(input) + + if err != nil { + return fmt.Errorf("error reading Storage Gateway cache: %s", err) + } + + if output == nil || len(output.DiskIds) == 0 { + return fmt.Errorf("Storage Gateway cache %q not found", rs.Primary.ID) + } + + for _, existingDiskID := range output.DiskIds { + if aws.StringValue(existingDiskID) == diskID { + return nil + } + } + + return fmt.Errorf("Storage Gateway cache %q not found", rs.Primary.ID) + } +} + +func testAccAWSStorageGatewayCacheConfig_Basic(rName string) string { + return testAccAWSStorageGatewayGatewayConfig_GatewayType_FileS3(rName) + fmt.Sprintf(` +resource "aws_ebs_volume" "test" { + availability_zone = "${aws_instance.test.availability_zone}" + size = "10" + type = "gp2" + + tags { + Name = %q + } +} + +resource "aws_volume_attachment" "test" { + device_name = "/dev/xvdb" + force_detach = true + instance_id = "${aws_instance.test.id}" + volume_id = "${aws_ebs_volume.test.id}" +} + +data "aws_storagegateway_local_disk" "test" { + disk_path = "${aws_volume_attachment.test.device_name}" + gateway_arn = "${aws_storagegateway_gateway.test.arn}" +} + +resource "aws_storagegateway_cache" "test" { + disk_id = "${data.aws_storagegateway_local_disk.test.id}" + gateway_arn = "${aws_storagegateway_gateway.test.arn}" +} +`, rName) +} diff --git a/website/aws.erb b/website/aws.erb index b01383b131b..b62dbe499e4 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -2140,6 +2140,10 @@ Storage Gateway Resources diff --git a/website/docs/r/cloudfront_public_key.html.markdown b/website/docs/r/cloudfront_public_key.html.markdown new file mode 100644 index 00000000000..11b4174be14 --- /dev/null +++ b/website/docs/r/cloudfront_public_key.html.markdown @@ -0,0 +1,38 @@ +--- +layout: "aws" +page_title: "AWS: cloudfront_public_key" +sidebar_current: "docs-aws-resource-cloudfront-public-key" +description: |- + Provides a CloudFront Public Key which you add to CloudFront to use with features like field-level encryption. +--- + +# aws_cloudfront_distribution + +## Example Usage + +The following example below creates a CloudFront public key. + +```hcl +resource "aws_cloudfront_public_key" "example" { + comment = "test public key" + encoded_key = "${file("public_key.pem")}" + name = "test_key" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `comment` - (Optional) An optional comment about the public key. +* `encoded_key` - (Required) The encoded public key that you want to add to CloudFront to use with features like field-level encryption. +* `name` - (Optional) The name for the public key. By default generated by Terraform. +* `name_prefix` - (Optional) The name for the public key. Conflicts with `name`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `caller_reference` - Internal value used by CloudFront to allow future updates to the public key configuration. +* `etag` - The current version of the public key. For example: `E2QWRUHAPOMQZL`. +* `id` - The identifier for the public key. For example: `K3D5EWEUDCCXON`. From abfe7c49e90810657e9ed6b9401f2e3c439fcefc Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Thu, 30 Aug 2018 22:29:52 +0400 Subject: [PATCH 2398/3316] arrange the attributes order properly --- aws/resource_aws_cloudfront_public_key.go | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/aws/resource_aws_cloudfront_public_key.go b/aws/resource_aws_cloudfront_public_key.go index 4c6f6592982..7a6e819909f 100644 --- a/aws/resource_aws_cloudfront_public_key.go +++ b/aws/resource_aws_cloudfront_public_key.go @@ -19,6 +19,23 @@ func resourceAwsCloudFrontPublicKey() *schema.Resource { Delete: resourceAwsCloudFrontPublicKeyDelete, Schema: map[string]*schema.Schema{ + "caller_reference": { + Type: schema.TypeString, + Computed: true, + }, + "comment": { + Type: schema.TypeString, + Optional: true, + }, + "encoded_key": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "etag": { + Type: schema.TypeString, + Computed: true, + }, "name": { Type: schema.TypeString, Optional: true, @@ -35,23 +52,6 @@ func resourceAwsCloudFrontPublicKey() *schema.Resource { ConflictsWith: []string{"name"}, ValidateFunc: validateCloudFrontPublicKeyNamePrefix, }, - "encoded_key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "comment": { - Type: schema.TypeString, - Optional: true, - }, - "etag": { - Type: schema.TypeString, - Computed: true, - }, - "caller_reference": { - Type: schema.TypeString, - Computed: true, - }, }, } } From 101f95730d3fabb5fae0cad826b4e21f51bed9d6 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Thu, 30 Aug 2018 19:24:17 +0000 Subject: [PATCH 2399/3316] v1.34.0 --- CHANGELOG.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05ef70b57d0..1a47ce5942b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.34.0 (Unreleased) +## 1.34.0 (August 30, 2018) NOTES: @@ -7,23 +7,23 @@ NOTES: ENHANCEMENTS: * provider: `NO_PROXY` environment variable can accept CIDR notation and port -* data-source/aws_ip_ranges: Add `ipv6_cidr_blocks` attribute [GH-5675] -* resource/aws_codebuild_project: Add `artifacts` `encryption_disabled` argument [GH-5678] -* resource/aws_route: Support route import [GH-5687] +* data-source/aws_ip_ranges: Add `ipv6_cidr_blocks` attribute ([#5675](https://github.com/terraform-providers/terraform-provider-aws/issues/5675)) +* resource/aws_codebuild_project: Add `artifacts` `encryption_disabled` argument ([#5678](https://github.com/terraform-providers/terraform-provider-aws/issues/5678)) +* resource/aws_route: Support route import ([#5687](https://github.com/terraform-providers/terraform-provider-aws/issues/5687)) BUG FIXES: -* data-source/aws_rds_cluster: Prevent error setting `engine_mode` and `scaling_configuration` [GH-5660] -* resource/aws_autoscaling_group: Retry creation for eventual consistency with launch template IAM instance profile [GH-5633] -* resource/aws_dax_cluster: Properly recreate cluster when updating `server_side_encryption` [GH-5664] -* resource/aws_db_instance: Prevent double apply when using `replicate_source_db` parameters that require `ModifyDBInstance` during resource creation [GH-5672] -* resource/aws_db_instance: Prevent `pending-reboot` parameter group status on creation with `parameter_group_name` [GH-5672] -* resource/aws_lambda_event_source_mapping: Prevent perpetual difference when using function name with `function_name` (argument accepts both name and ARN) [GH-5454] -* resource/aws_launch_template: Prevent encrypted flag cannot be specified error with `block_device_mappings` `ebs` argument [GH-5632] -* resource/aws_key_pair: Ensure `fingerprint` attribute is saved in Terraform state during creation [GH-5732] -* resource/aws_ssm_association: Properly handle updates when multiple arguments are used [GH-5537] -* resource/aws_ssm_document: Properly handle deletion of privately shared documents [GH-5668] -* resource/aws_ssm_document: Properly update `permissions.account_ids` [GH-5685] +* data-source/aws_rds_cluster: Prevent error setting `engine_mode` and `scaling_configuration` ([#5660](https://github.com/terraform-providers/terraform-provider-aws/issues/5660)) +* resource/aws_autoscaling_group: Retry creation for eventual consistency with launch template IAM instance profile ([#5633](https://github.com/terraform-providers/terraform-provider-aws/issues/5633)) +* resource/aws_dax_cluster: Properly recreate cluster when updating `server_side_encryption` ([#5664](https://github.com/terraform-providers/terraform-provider-aws/issues/5664)) +* resource/aws_db_instance: Prevent double apply when using `replicate_source_db` parameters that require `ModifyDBInstance` during resource creation ([#5672](https://github.com/terraform-providers/terraform-provider-aws/issues/5672)) +* resource/aws_db_instance: Prevent `pending-reboot` parameter group status on creation with `parameter_group_name` ([#5672](https://github.com/terraform-providers/terraform-provider-aws/issues/5672)) +* resource/aws_lambda_event_source_mapping: Prevent perpetual difference when using function name with `function_name` (argument accepts both name and ARN) ([#5454](https://github.com/terraform-providers/terraform-provider-aws/issues/5454)) +* resource/aws_launch_template: Prevent encrypted flag cannot be specified error with `block_device_mappings` `ebs` argument ([#5632](https://github.com/terraform-providers/terraform-provider-aws/issues/5632)) +* resource/aws_key_pair: Ensure `fingerprint` attribute is saved in Terraform state during creation ([#5732](https://github.com/terraform-providers/terraform-provider-aws/issues/5732)) +* resource/aws_ssm_association: Properly handle updates when multiple arguments are used ([#5537](https://github.com/terraform-providers/terraform-provider-aws/issues/5537)) +* resource/aws_ssm_document: Properly handle deletion of privately shared documents ([#5668](https://github.com/terraform-providers/terraform-provider-aws/issues/5668)) +* resource/aws_ssm_document: Properly update `permissions.account_ids` ([#5685](https://github.com/terraform-providers/terraform-provider-aws/issues/5685)) ## 1.33.0 (August 22, 2018) From ee18327b50777d6f5e3bc06277cd723c5953ef2d Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Thu, 30 Aug 2018 19:32:19 +0000 Subject: [PATCH 2400/3316] Cleanup after v1.34.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a47ce5942b..3188d25da46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.35.0 (Unreleased) ## 1.34.0 (August 30, 2018) NOTES: From 285d9e16de0494f120a7302d11a13913b18a5e99 Mon Sep 17 00:00:00 2001 From: Mathieu Garstecki Date: Thu, 30 Aug 2018 22:28:45 +0200 Subject: [PATCH 2401/3316] Allow empty permissions boundary field in AWS role. --- aws/resource_aws_iam_role.go | 2 +- aws/resource_aws_iam_role_test.go | 48 +++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index 9bb886979c6..fdbda1f7660 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -87,7 +87,7 @@ func resourceAwsIamRole() *schema.Resource { "permissions_boundary": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.StringLenBetween(20, 2048), + ValidateFunc: validateMaxLength(2048), }, "description": { diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index bdff37478d3..fe447f57462 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -242,6 +242,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), + testAccCheckAWSRolePermissionsBoundary(resourceName, permissionsBoundary1), ), }, // Test update @@ -250,6 +251,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary2), + testAccCheckAWSRolePermissionsBoundary(resourceName, permissionsBoundary2), ), }, // Test import @@ -265,6 +267,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", ""), + testAccCheckAWSRolePermissionsBoundary(resourceName, ""), ), }, // Test addition @@ -273,6 +276,16 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), + testAccCheckAWSRolePermissionsBoundary(resourceName, permissionsBoundary1), + ), + }, + // Test empty value + { + Config: testAccCheckIAMRoleConfig_PermissionsBoundary(rName, ""), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRoleExists(resourceName, &role), + resource.TestCheckResourceAttr(resourceName, "permissions_boundary", ""), + testAccCheckAWSRolePermissionsBoundary(resourceName, ""), ), }, }, @@ -399,6 +412,41 @@ func testAccAddAwsIAMRolePolicy(n string) resource.TestCheckFunc { } } +func testAccCheckAWSRolePermissionsBoundary(n string, expectedPermissionsBoundaryArn string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Role name is set") + } + + iamconn := testAccProvider.Meta().(*AWSClient).iamconn + + resp, err := iamconn.GetRole(&iam.GetRoleInput{ + RoleName: aws.String(rs.Primary.ID), + }) + + if err != nil { + return err + } + + actualPermissionsBoundaryArn := "" + + if resp.Role.PermissionsBoundary != nil { + actualPermissionsBoundaryArn = *resp.Role.PermissionsBoundary.PermissionsBoundaryArn + } + + if actualPermissionsBoundaryArn != expectedPermissionsBoundaryArn { + return fmt.Errorf("PermissionsBoundary: '%q', expected '%q'.", actualPermissionsBoundaryArn, expectedPermissionsBoundaryArn) + } + + return nil + } +} + func testAccCheckIAMRoleConfig_MaxSessionDuration(rName string, maxSessionDuration int) string { return fmt.Sprintf(` resource "aws_iam_role" "test" { From eeb04c6a07450348b92bfa80e904f73778b5ccf8 Mon Sep 17 00:00:00 2001 From: Bastiaan Schaap Date: Fri, 31 Aug 2018 07:26:11 +0200 Subject: [PATCH 2402/3316] Add TypeStringBoolean equivalence from #5632 --- aws/resource_aws_launch_template.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 067d711c40c..7f148e6f33f 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -159,13 +159,14 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "ebs_optimized": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - "", - "false", - "true", - }, false), + // Use TypeString to allow an "unspecified" value, + // since TypeBool only has true/false with false default. + // The conversion from bare true/false values in + // configurations to TypeString value is currently safe. + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: suppressEquivalentTypeStringBoolean, + ValidateFunc: validateTypeStringNullableBoolean, }, "elastic_gpu_specifications": { From 179c3b75a372f317729e748e4132597ecf3ebdb6 Mon Sep 17 00:00:00 2001 From: Mathieu Garstecki Date: Fri, 31 Aug 2018 09:59:17 +0200 Subject: [PATCH 2403/3316] Simplify role permission boundaries test by reusing existing role object. --- aws/resource_aws_iam_role_test.go | 35 +++++++------------------------ 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index fe447f57462..d4ded888ccb 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -242,7 +242,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), - testAccCheckAWSRolePermissionsBoundary(resourceName, permissionsBoundary1), + testAccCheckAWSRolePermissionsBoundary(&role, permissionsBoundary1), ), }, // Test update @@ -251,7 +251,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary2), - testAccCheckAWSRolePermissionsBoundary(resourceName, permissionsBoundary2), + testAccCheckAWSRolePermissionsBoundary(&role, permissionsBoundary2), ), }, // Test import @@ -267,7 +267,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", ""), - testAccCheckAWSRolePermissionsBoundary(resourceName, ""), + testAccCheckAWSRolePermissionsBoundary(&role, ""), ), }, // Test addition @@ -276,7 +276,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", permissionsBoundary1), - testAccCheckAWSRolePermissionsBoundary(resourceName, permissionsBoundary1), + testAccCheckAWSRolePermissionsBoundary(&role, permissionsBoundary1), ), }, // Test empty value @@ -285,7 +285,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAWSRoleExists(resourceName, &role), resource.TestCheckResourceAttr(resourceName, "permissions_boundary", ""), - testAccCheckAWSRolePermissionsBoundary(resourceName, ""), + testAccCheckAWSRolePermissionsBoundary(&role, ""), ), }, }, @@ -412,31 +412,12 @@ func testAccAddAwsIAMRolePolicy(n string) resource.TestCheckFunc { } } -func testAccCheckAWSRolePermissionsBoundary(n string, expectedPermissionsBoundaryArn string) resource.TestCheckFunc { +func testAccCheckAWSRolePermissionsBoundary(getRoleOutput *iam.GetRoleOutput, expectedPermissionsBoundaryArn string) resource.TestCheckFunc { return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[n] - if !ok { - return fmt.Errorf("Not found: %s", n) - } - - if rs.Primary.ID == "" { - return fmt.Errorf("No Role name is set") - } - - iamconn := testAccProvider.Meta().(*AWSClient).iamconn - - resp, err := iamconn.GetRole(&iam.GetRoleInput{ - RoleName: aws.String(rs.Primary.ID), - }) - - if err != nil { - return err - } - actualPermissionsBoundaryArn := "" - if resp.Role.PermissionsBoundary != nil { - actualPermissionsBoundaryArn = *resp.Role.PermissionsBoundary.PermissionsBoundaryArn + if getRoleOutput.Role.PermissionsBoundary != nil { + actualPermissionsBoundaryArn = *getRoleOutput.Role.PermissionsBoundary.PermissionsBoundaryArn } if actualPermissionsBoundaryArn != expectedPermissionsBoundaryArn { From 3ae9e052eee95b33ee559fc4d7eea34450997155 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 31 Aug 2018 08:30:47 -0400 Subject: [PATCH 2404/3316] resource/aws_ecr_repository: Use RepositoryUri for repository_url attribute Also refactors acceptance testing and begins implementation of helper ARN attribute TestCheckFunc. AWS Commercial: ``` --- PASS: TestAccAWSEcrRepository_basic (13.26s) ``` AWS GovCloud (US): ``` --- PASS: TestAccAWSEcrRepository_basic (19.02s) ``` --- aws/import_aws_ecr_repository_test.go | 30 ---------------- aws/provider_test.go | 48 +++++++++++++++++++++++++ aws/resource_aws_ecr_repository.go | 14 ++------ aws/resource_aws_ecr_repository_test.go | 48 ++++++++++++++++++------- 4 files changed, 86 insertions(+), 54 deletions(-) delete mode 100644 aws/import_aws_ecr_repository_test.go diff --git a/aws/import_aws_ecr_repository_test.go b/aws/import_aws_ecr_repository_test.go deleted file mode 100644 index dfdcbe70cde..00000000000 --- a/aws/import_aws_ecr_repository_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package aws - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccAWSEcrRepository_importBasic(t *testing.T) { - resourceName := "aws_ecr_repository.default" - randString := acctest.RandString(10) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSEcrRepositoryDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSEcrRepository(randString), - }, - - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/aws/provider_test.go b/aws/provider_test.go index 56f7d1f8887..f9d383f049d 100644 --- a/aws/provider_test.go +++ b/aws/provider_test.go @@ -4,10 +4,12 @@ import ( "fmt" "log" "os" + "strings" "testing" "github.com/aws/aws-sdk-go/service/organizations" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/hashicorp/terraform/helper/resource" @@ -78,6 +80,44 @@ func testAccPreCheck(t *testing.T) { } } +// testAccAwsProviderAccountID returns the account ID of an AWS provider +func testAccAwsProviderAccountID(provider *schema.Provider) string { + if provider == nil { + log.Print("[DEBUG] Unable to read account ID from test provider: empty provider") + return "" + } + if provider.Meta() == nil { + log.Print("[DEBUG] Unable to read account ID from test provider: unconfigured provider") + return "" + } + client, ok := provider.Meta().(*AWSClient) + if !ok { + log.Print("[DEBUG] Unable to read account ID from test provider: non-AWS or unconfigured AWS provider") + return "" + } + return client.accountid +} + +// testAccCheckResourceAttrRegionalARN ensures the Terraform state exactly matches a formatted ARN with region +func testAccCheckResourceAttrRegionalARN(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc { + return func(s *terraform.State) error { + attributeValue := arn.ARN{ + AccountID: testAccGetAccountID(), + Partition: testAccGetPartition(), + Region: testAccGetRegion(), + Resource: arnResource, + Service: arnService, + }.String() + return resource.TestCheckResourceAttr(resourceName, attributeName, attributeValue)(s) + } +} + +// testAccGetAccountID returns the account ID of testAccProvider +// Must be used returned within a resource.TestCheckFunc +func testAccGetAccountID() string { + return testAccAwsProviderAccountID(testAccProvider) +} + func testAccGetRegion() string { v := os.Getenv("AWS_DEFAULT_REGION") if v == "" { @@ -93,6 +133,14 @@ func testAccGetPartition() string { return "aws" } +func testAccGetServiceEndpoint(service string) string { + endpoint, err := endpoints.DefaultResolver().EndpointFor(service, testAccGetRegion()) + if err != nil { + return "" + } + return strings.TrimPrefix(endpoint.URL, "https://") +} + func testAccEC2ClassicPreCheck(t *testing.T) { client := testAccProvider.Meta().(*AWSClient) platforms := client.supportedplatforms diff --git a/aws/resource_aws_ecr_repository.go b/aws/resource_aws_ecr_repository.go index 2974fc6103f..20a16387340 100644 --- a/aws/resource_aws_ecr_repository.go +++ b/aws/resource_aws_ecr_repository.go @@ -85,24 +85,14 @@ func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) erro repository := out.Repositories[0] - log.Printf("[DEBUG] Received repository %s", out) - - d.SetId(*repository.RepositoryName) d.Set("arn", repository.RepositoryArn) - d.Set("registry_id", repository.RegistryId) d.Set("name", repository.RepositoryName) - - repositoryUrl := buildRepositoryUrl(repository, meta.(*AWSClient).region) - log.Printf("[INFO] Setting the repository url to be %s", repositoryUrl) - d.Set("repository_url", repositoryUrl) + d.Set("registry_id", repository.RegistryId) + d.Set("repository_url", repository.RepositoryUri) return nil } -func buildRepositoryUrl(repo *ecr.Repository, region string) string { - return fmt.Sprintf("%s.dkr.ecr.%s.amazonaws.com/%s", *repo.RegistryId, region, *repo.RepositoryName) -} - func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecrconn diff --git a/aws/resource_aws_ecr_repository_test.go b/aws/resource_aws_ecr_repository_test.go index 23d5e3bcfed..5d4dbcda05d 100644 --- a/aws/resource_aws_ecr_repository_test.go +++ b/aws/resource_aws_ecr_repository_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ecr" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" @@ -13,7 +12,8 @@ import ( ) func TestAccAWSEcrRepository_basic(t *testing.T) { - randString := acctest.RandString(10) + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_ecr_repository.default" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,11 +21,20 @@ func TestAccAWSEcrRepository_basic(t *testing.T) { CheckDestroy: testAccCheckAWSEcrRepositoryDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSEcrRepository(randString), + Config: testAccAWSEcrRepositoryConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSEcrRepositoryExists("aws_ecr_repository.default"), + testAccCheckAWSEcrRepositoryExists(resourceName), + testAccCheckResourceAttrRegionalARN(resourceName, "arn", "ecr", fmt.Sprintf("repository/%s", rName)), + resource.TestCheckResourceAttr(resourceName, "name", rName), + testAccCheckAWSEcrRepositoryRegistryID(resourceName), + testAccCheckAWSEcrRepositoryRepositoryURL(resourceName, rName), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -44,16 +53,17 @@ func testAccCheckAWSEcrRepositoryDestroy(s *terraform.State) error { out, err := conn.DescribeRepositories(&input) + if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { + return nil + } + if err != nil { - if ecrerr, ok := err.(awserr.Error); ok && ecrerr.Code() == "RepositoryNotFoundException" { - return nil - } return err } for _, repository := range out.Repositories { - if repository.RepositoryName == aws.String(rs.Primary.Attributes["name"]) { - return fmt.Errorf("ECR repository still exists:\n%#v", repository) + if aws.StringValue(repository.RepositoryName) == rs.Primary.Attributes["name"] { + return fmt.Errorf("ECR repository still exists: %s", rs.Primary.Attributes["name"]) } } } @@ -72,10 +82,24 @@ func testAccCheckAWSEcrRepositoryExists(name string) resource.TestCheckFunc { } } -func testAccAWSEcrRepository(randString string) string { +func testAccCheckAWSEcrRepositoryRegistryID(resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + attributeValue := testAccGetAccountID() + return resource.TestCheckResourceAttr(resourceName, "registry_id", attributeValue)(s) + } +} + +func testAccCheckAWSEcrRepositoryRepositoryURL(resourceName, repositoryName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + attributeValue := fmt.Sprintf("%s.dkr.%s/%s", testAccGetAccountID(), testAccGetServiceEndpoint("ecr"), repositoryName) + return resource.TestCheckResourceAttr(resourceName, "repository_url", attributeValue)(s) + } +} + +func testAccAWSEcrRepositoryConfig(rName string) string { return fmt.Sprintf(` resource "aws_ecr_repository" "default" { - name = "tf-acc-test-ecr-%s" + name = %q } -`, randString) +`, rName) } From cb3bd94ff162f33550dc29bd2f88d385eed3b36c Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Fri, 31 Aug 2018 14:20:40 +0100 Subject: [PATCH 2405/3316] Add working URL for ICMP types and codes --- website/docs/r/network_acl.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/network_acl.html.markdown b/website/docs/r/network_acl.html.markdown index 7f0472f5fad..4a9c45e87dc 100644 --- a/website/docs/r/network_acl.html.markdown +++ b/website/docs/r/network_acl.html.markdown @@ -73,7 +73,7 @@ valid network mask. * `icmp_type` - (Optional) The ICMP type to be used. Default 0. * `icmp_code` - (Optional) The ICMP type code to be used. Default 0. -~> Note: For more information on ICMP types and codes, see here: http://www.nthelp.com/icmp.html +~> Note: For more information on ICMP types and codes, see here: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml ## Attributes Reference From 876ecafedf92811d7e1865fb85d49d51d38d0d6a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 31 Aug 2018 10:04:08 -0400 Subject: [PATCH 2406/3316] Update CHANGELOG for #5748 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3188d25da46..1a5f0dcb5fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 1.35.0 (Unreleased) + +BUG FIXES: + +* resource/aws_ecr_repository: Use `RepositoryUri` instead of our building our own URI for the `repository_url` attribute (AWS China fix) [GH-5748] + ## 1.34.0 (August 30, 2018) NOTES: From 15035b107bd36857f2d5b3307a1e6c5cef019cf2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 31 Aug 2018 10:28:49 -0400 Subject: [PATCH 2407/3316] Update CHANGELOG for #5740 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a5f0dcb5fe..c00e7730020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.35.0 (Unreleased) +ENHANCEMENTS: + +* resource/aws_iam_role: Allow empty string (`""`) value for `permissions_boundary` argument [GH-5740] + BUG FIXES: * resource/aws_ecr_repository: Use `RepositoryUri` instead of our building our own URI for the `repository_url` attribute (AWS China fix) [GH-5748] From ba713b9b051c638ca6cb4698fe4256e53494d11b Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Fri, 31 Aug 2018 15:53:56 +0100 Subject: [PATCH 2408/3316] Add working URL for ICMP types and codes --- aws/resource_aws_network_acl_rule.go | 2 +- website/docs/r/default_network_acl.html.markdown | 2 +- website/docs/r/network_acl_rule.html.markdown | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_network_acl_rule.go b/aws/resource_aws_network_acl_rule.go index 6a17cdcea4a..99157218bd0 100644 --- a/aws/resource_aws_network_acl_rule.go +++ b/aws/resource_aws_network_acl_rule.go @@ -133,7 +133,7 @@ func resourceAwsNetworkAclRuleCreate(d *schema.ResourceData, meta interface{}) e } // Specify additional required fields for ICMP. For the list - // of ICMP codes and types, see: http://www.nthelp.com/icmp.html + // of ICMP codes and types, see: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml if p == 1 { params.IcmpTypeCode = &ec2.IcmpTypeCode{} if v, ok := d.GetOk("icmp_type"); ok { diff --git a/website/docs/r/default_network_acl.html.markdown b/website/docs/r/default_network_acl.html.markdown index eddd871f8d9..13524575805 100644 --- a/website/docs/r/default_network_acl.html.markdown +++ b/website/docs/r/default_network_acl.html.markdown @@ -135,7 +135,7 @@ valid network mask. * `icmp_type` - (Optional) The ICMP type to be used. Default 0. * `icmp_code` - (Optional) The ICMP type code to be used. Default 0. -~> Note: For more information on ICMP types and codes, see here: http://www.nthelp.com/icmp.html +~> Note: For more information on ICMP types and codes, see here: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml ### Managing Subnets in the Default Network ACL diff --git a/website/docs/r/network_acl_rule.html.markdown b/website/docs/r/network_acl_rule.html.markdown index f8c8dd06fc1..9b5d55713ef 100644 --- a/website/docs/r/network_acl_rule.html.markdown +++ b/website/docs/r/network_acl_rule.html.markdown @@ -57,7 +57,7 @@ The following arguments are supported: ~> **NOTE:** If the value of `icmp_type` is `-1` (which results in a wildcard ICMP type), the `icmp_code` must also be set to `-1` (wildcard ICMP code). -~> Note: For more information on ICMP types and codes, see here: http://www.nthelp.com/icmp.html +~> Note: For more information on ICMP types and codes, see here: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml ## Attributes Reference From 4d08acbb9dcecabb49d8dc62614bb33b54d44ccb Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 31 Aug 2018 19:04:28 +0400 Subject: [PATCH 2409/3316] unit tests for validate funcs in neptune --- ...a_source_aws_cloudformation_export_test.go | 2 +- aws/opsworks_layers.go | 24 +++--- ...source_aws_acmpca_certificate_authority.go | 6 +- aws/resource_aws_api_gateway_integration.go | 30 ++++---- ...e_aws_cloudfront_origin_access_identity.go | 4 +- ...ce_aws_codedeploy_deployment_group_test.go | 8 +- aws/resource_aws_db_instance.go | 2 +- aws/resource_aws_db_security_group.go | 2 +- aws/resource_aws_dms_replication_instance.go | 2 +- ...sticache_replication_group_migrate_test.go | 2 +- ...resource_aws_emr_security_configuration.go | 2 +- aws/resource_aws_gamelift_fleet.go | 10 +-- aws/resource_aws_instance.go | 12 +-- aws/resource_aws_instance_migrate_test.go | 8 +- ...ce_aws_kinesis_firehose_delivery_stream.go | 10 +-- aws/resource_aws_neptune_cluster_instance.go | 2 +- ...rce_aws_neptune_cluster_parameter_group.go | 2 +- aws/resource_aws_rds_cluster_instance.go | 2 +- ...esource_aws_rds_cluster_parameter_group.go | 2 +- aws/resource_aws_redshift_cluster.go | 2 +- aws/resource_aws_route53_record.go | 4 +- aws/resource_aws_s3_bucket.go | 4 +- aws/resource_aws_s3_bucket_inventory.go | 4 +- aws/resource_aws_s3_bucket_notification.go | 4 +- ...esource_aws_security_group_migrate_test.go | 2 +- ..._service_discovery_service_migrate_test.go | 4 +- aws/resource_aws_sns_topic.go | 8 +- aws/resource_aws_spot_fleet_request.go | 2 +- aws/resource_aws_spot_instance_request.go | 4 +- aws/resource_aws_ssm_maintenance_window.go | 8 +- aws/resource_aws_ssm_patch_baseline.go | 2 +- aws/resource_aws_swf_domain.go | 2 +- aws/resource_aws_vpc.go | 2 +- aws/validators_test.go | 76 +++++++++++++++++-- 34 files changed, 160 insertions(+), 100 deletions(-) diff --git a/aws/data_source_aws_cloudformation_export_test.go b/aws/data_source_aws_cloudformation_export_test.go index e76f91e20b0..1ca42d7bc43 100644 --- a/aws/data_source_aws_cloudformation_export_test.go +++ b/aws/data_source_aws_cloudformation_export_test.go @@ -17,7 +17,7 @@ func TestAccAWSCloudformationExportDataSource_basic(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccCheckAwsCloudformationExportConfig(rName), + Config: testAccCheckAwsCloudformationExportConfig(rName), PreventPostDestroyRefresh: true, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("data.aws_cloudformation_export.waiter", "value", "waiter"), diff --git a/aws/opsworks_layers.go b/aws/opsworks_layers.go index 83e0b2d0284..d33eab61ca2 100644 --- a/aws/opsworks_layers.go +++ b/aws/opsworks_layers.go @@ -345,13 +345,13 @@ func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.Ops EnableAutoHealing: aws.Bool(d.Get("auto_healing").(bool)), InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), LifecycleEventConfiguration: lt.LifecycleEventConfiguration(d), - Name: aws.String(d.Get("name").(string)), - Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), - Type: aws.String(lt.TypeName), - StackId: aws.String(d.Get("stack_id").(string)), - UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), - VolumeConfigurations: lt.VolumeConfigurations(d), + Name: aws.String(d.Get("name").(string)), + Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), + Type: aws.String(lt.TypeName), + StackId: aws.String(d.Get("stack_id").(string)), + UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), + Attributes: lt.AttributeMap(d), + VolumeConfigurations: lt.VolumeConfigurations(d), } if lt.CustomShortName { @@ -399,11 +399,11 @@ func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.Ops EnableAutoHealing: aws.Bool(d.Get("auto_healing").(bool)), InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), LifecycleEventConfiguration: lt.LifecycleEventConfiguration(d), - Name: aws.String(d.Get("name").(string)), - Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), - UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), - VolumeConfigurations: lt.VolumeConfigurations(d), + Name: aws.String(d.Get("name").(string)), + Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), + UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), + Attributes: lt.AttributeMap(d), + VolumeConfigurations: lt.VolumeConfigurations(d), } if lt.CustomShortName { diff --git a/aws/resource_aws_acmpca_certificate_authority.go b/aws/resource_aws_acmpca_certificate_authority.go index e8158743c68..81bc3479f41 100644 --- a/aws/resource_aws_acmpca_certificate_authority.go +++ b/aws/resource_aws_acmpca_certificate_authority.go @@ -284,7 +284,7 @@ func resourceAwsAcmpcaCertificateAuthorityCreate(d *schema.ResourceData, meta in if v, ok := d.GetOk("tags"); ok { input := &acmpca.TagCertificateAuthorityInput{ CertificateAuthorityArn: aws.String(d.Id()), - Tags: tagsFromMapACMPCA(v.(map[string]interface{})), + Tags: tagsFromMapACMPCA(v.(map[string]interface{})), } log.Printf("[DEBUG] Tagging ACMPCA Certificate Authority: %s", input) @@ -458,7 +458,7 @@ func resourceAwsAcmpcaCertificateAuthorityUpdate(d *schema.ResourceData, meta in log.Printf("[DEBUG] Removing ACMPCA Certificate Authority %q tags: %#v", d.Id(), remove) _, err := conn.UntagCertificateAuthority(&acmpca.UntagCertificateAuthorityInput{ CertificateAuthorityArn: aws.String(d.Id()), - Tags: remove, + Tags: remove, }) if err != nil { return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) @@ -468,7 +468,7 @@ func resourceAwsAcmpcaCertificateAuthorityUpdate(d *schema.ResourceData, meta in log.Printf("[DEBUG] Creating ACMPCA Certificate Authority %q tags: %#v", d.Id(), create) _, err := conn.TagCertificateAuthority(&acmpca.TagCertificateAuthorityInput{ CertificateAuthorityArn: aws.String(d.Id()), - Tags: create, + Tags: create, }) if err != nil { return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 259d5d69136..755bcb54c09 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -243,22 +243,22 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa } _, err := conn.PutIntegration(&apigateway.PutIntegrationInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - Type: aws.String(d.Get("type").(string)), + HttpMethod: aws.String(d.Get("http_method").(string)), + ResourceId: aws.String(d.Get("resource_id").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), + Type: aws.String(d.Get("type").(string)), IntegrationHttpMethod: integrationHttpMethod, - Uri: uri, - RequestParameters: aws.StringMap(parameters), - RequestTemplates: aws.StringMap(templates), - Credentials: credentials, - CacheNamespace: cacheNamespace, - CacheKeyParameters: cacheKeyParameters, - PassthroughBehavior: passthroughBehavior, - ContentHandling: contentHandling, - ConnectionType: connectionType, - ConnectionId: connectionId, - TimeoutInMillis: timeoutInMillis, + Uri: uri, + RequestParameters: aws.StringMap(parameters), + RequestTemplates: aws.StringMap(templates), + Credentials: credentials, + CacheNamespace: cacheNamespace, + CacheKeyParameters: cacheKeyParameters, + PassthroughBehavior: passthroughBehavior, + ContentHandling: contentHandling, + ConnectionType: connectionType, + ConnectionId: connectionId, + TimeoutInMillis: timeoutInMillis, }) if err != nil { return fmt.Errorf("Error creating API Gateway Integration: %s", err) diff --git a/aws/resource_aws_cloudfront_origin_access_identity.go b/aws/resource_aws_cloudfront_origin_access_identity.go index b82296763a9..00f6b65877b 100644 --- a/aws/resource_aws_cloudfront_origin_access_identity.go +++ b/aws/resource_aws_cloudfront_origin_access_identity.go @@ -95,9 +95,9 @@ func resourceAwsCloudFrontOriginAccessIdentityRead(d *schema.ResourceData, meta func resourceAwsCloudFrontOriginAccessIdentityUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudfrontconn params := &cloudfront.UpdateCloudFrontOriginAccessIdentityInput{ - Id: aws.String(d.Id()), + Id: aws.String(d.Id()), CloudFrontOriginAccessIdentityConfig: expandOriginAccessIdentityConfig(d), - IfMatch: aws.String(d.Get("etag").(string)), + IfMatch: aws.String(d.Get("etag").(string)), } _, err := conn.UpdateCloudFrontOriginAccessIdentity(params) if err != nil { diff --git a/aws/resource_aws_codedeploy_deployment_group_test.go b/aws/resource_aws_codedeploy_deployment_group_test.go index 9f107231c5e..1ab89775d09 100644 --- a/aws/resource_aws_codedeploy_deployment_group_test.go +++ b/aws/resource_aws_codedeploy_deployment_group_test.go @@ -1568,7 +1568,7 @@ func TestAWSCodeDeployDeploymentGroup_expandBlueGreenDeploymentConfig(t *testing "terminate_blue_instances_on_deployment_success": []interface{}{ map[string]interface{}{ - "action": "TERMINATE", + "action": "TERMINATE", "termination_wait_time_in_minutes": 90, }, }, @@ -1586,7 +1586,7 @@ func TestAWSCodeDeployDeploymentGroup_expandBlueGreenDeploymentConfig(t *testing }, TerminateBlueInstancesOnDeploymentSuccess: &codedeploy.BlueInstanceTerminationOption{ - Action: aws.String("TERMINATE"), + Action: aws.String("TERMINATE"), TerminationWaitTimeInMinutes: aws.Int64(90), }, } @@ -1611,7 +1611,7 @@ func TestAWSCodeDeployDeploymentGroup_flattenBlueGreenDeploymentConfig(t *testin }, TerminateBlueInstancesOnDeploymentSuccess: &codedeploy.BlueInstanceTerminationOption{ - Action: aws.String("KEEP_ALIVE"), + Action: aws.String("KEEP_ALIVE"), TerminationWaitTimeInMinutes: aws.Int64(90), }, } @@ -1632,7 +1632,7 @@ func TestAWSCodeDeployDeploymentGroup_flattenBlueGreenDeploymentConfig(t *testin "terminate_blue_instances_on_deployment_success": []map[string]interface{}{ { - "action": "KEEP_ALIVE", + "action": "KEEP_ALIVE", "termination_wait_time_in_minutes": 90, }, }, diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 9100d9518dd..8e44d8703c3 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -460,7 +460,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error DBInstanceIdentifier: aws.String(identifier), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), SourceDBInstanceIdentifier: aws.String(v.(string)), - Tags: tags, + Tags: tags, } if attr, ok := d.GetOk("allocated_storage"); ok { diff --git a/aws/resource_aws_db_security_group.go b/aws/resource_aws_db_security_group.go index 04d4ef1f9f8..f3bd2617c2f 100644 --- a/aws/resource_aws_db_security_group.go +++ b/aws/resource_aws_db_security_group.go @@ -91,7 +91,7 @@ func resourceAwsDbSecurityGroupCreate(d *schema.ResourceData, meta interface{}) opts := rds.CreateDBSecurityGroupInput{ DBSecurityGroupName: aws.String(d.Get("name").(string)), DBSecurityGroupDescription: aws.String(d.Get("description").(string)), - Tags: tags, + Tags: tags, } log.Printf("[DEBUG] DB Security Group create configuration: %#v", opts) diff --git a/aws/resource_aws_dms_replication_instance.go b/aws/resource_aws_dms_replication_instance.go index 282451a7b0e..df12efb91d6 100644 --- a/aws/resource_aws_dms_replication_instance.go +++ b/aws/resource_aws_dms_replication_instance.go @@ -136,7 +136,7 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), ReplicationInstanceClass: aws.String(d.Get("replication_instance_class").(string)), ReplicationInstanceIdentifier: aws.String(d.Get("replication_instance_id").(string)), - Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), + Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), } // WARNING: GetOk returns the zero value for the type if the key is omitted in config. This means for optional diff --git a/aws/resource_aws_elasticache_replication_group_migrate_test.go b/aws/resource_aws_elasticache_replication_group_migrate_test.go index c014f7e6d68..1379d539a47 100644 --- a/aws/resource_aws_elasticache_replication_group_migrate_test.go +++ b/aws/resource_aws_elasticache_replication_group_migrate_test.go @@ -16,7 +16,7 @@ func TestAwsElasticacheReplicationGroupMigrateState(t *testing.T) { "v0Tov1": { StateVersion: 0, Attributes: map[string]string{ - "cluster_mode.#": "1", + "cluster_mode.#": "1", "cluster_mode.4170186206.num_node_groups": "2", "cluster_mode.4170186206.replicas_per_node_group": "1", }, diff --git a/aws/resource_aws_emr_security_configuration.go b/aws/resource_aws_emr_security_configuration.go index ff25619a361..45beffc6d1a 100644 --- a/aws/resource_aws_emr_security_configuration.go +++ b/aws/resource_aws_emr_security_configuration.go @@ -65,7 +65,7 @@ func resourceAwsEmrSecurityConfigurationCreate(d *schema.ResourceData, meta inte } resp, err := conn.CreateSecurityConfiguration(&emr.CreateSecurityConfigurationInput{ - Name: aws.String(emrSCName), + Name: aws.String(emrSCName), SecurityConfiguration: aws.String(d.Get("configuration").(string)), }) diff --git a/aws/resource_aws_gamelift_fleet.go b/aws/resource_aws_gamelift_fleet.go index 815b899d716..be1a328daab 100644 --- a/aws/resource_aws_gamelift_fleet.go +++ b/aws/resource_aws_gamelift_fleet.go @@ -301,10 +301,10 @@ func resourceAwsGameliftFleetUpdate(d *schema.ResourceData, meta interface{}) er if d.HasChange("description") || d.HasChange("metric_groups") || d.HasChange("name") || d.HasChange("new_game_session_protection_policy") || d.HasChange("resource_creation_limit_policy") { _, err := conn.UpdateFleetAttributes(&gamelift.UpdateFleetAttributesInput{ - Description: aws.String(d.Get("description").(string)), - FleetId: aws.String(d.Id()), - MetricGroups: expandStringList(d.Get("metric_groups").([]interface{})), - Name: aws.String(d.Get("name").(string)), + Description: aws.String(d.Get("description").(string)), + FleetId: aws.String(d.Id()), + MetricGroups: expandStringList(d.Get("metric_groups").([]interface{})), + Name: aws.String(d.Get("name").(string)), NewGameSessionProtectionPolicy: aws.String(d.Get("new_game_session_protection_policy").(string)), ResourceCreationLimitPolicy: expandGameliftResourceCreationLimitPolicy(d.Get("resource_creation_limit_policy").([]interface{})), }) @@ -318,7 +318,7 @@ func resourceAwsGameliftFleetUpdate(d *schema.ResourceData, meta interface{}) er authorizations, revocations := diffGameliftPortSettings(oldPerms.([]interface{}), newPerms.([]interface{})) _, err := conn.UpdateFleetPortSettings(&gamelift.UpdateFleetPortSettingsInput{ - FleetId: aws.String(d.Id()), + FleetId: aws.String(d.Id()), InboundPermissionAuthorizations: authorizations, InboundPermissionRevocations: revocations, }) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index 65637d7a05c..a51ad8f461c 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -505,12 +505,12 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { // Build the creation struct runOpts := &ec2.RunInstancesInput{ - BlockDeviceMappings: instanceOpts.BlockDeviceMappings, - DisableApiTermination: instanceOpts.DisableAPITermination, - EbsOptimized: instanceOpts.EBSOptimized, - Monitoring: instanceOpts.Monitoring, - IamInstanceProfile: instanceOpts.IAMInstanceProfile, - ImageId: instanceOpts.ImageID, + BlockDeviceMappings: instanceOpts.BlockDeviceMappings, + DisableApiTermination: instanceOpts.DisableAPITermination, + EbsOptimized: instanceOpts.EBSOptimized, + Monitoring: instanceOpts.Monitoring, + IamInstanceProfile: instanceOpts.IAMInstanceProfile, + ImageId: instanceOpts.ImageID, InstanceInitiatedShutdownBehavior: instanceOpts.InstanceInitiatedShutdownBehavior, InstanceType: instanceOpts.InstanceType, Ipv6AddressCount: instanceOpts.Ipv6AddressCount, diff --git a/aws/resource_aws_instance_migrate_test.go b/aws/resource_aws_instance_migrate_test.go index bc591fd092a..d392943315e 100644 --- a/aws/resource_aws_instance_migrate_test.go +++ b/aws/resource_aws_instance_migrate_test.go @@ -17,7 +17,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { StateVersion: 0, Attributes: map[string]string{ // EBS - "block_device.#": "2", + "block_device.#": "2", "block_device.3851383343.delete_on_termination": "true", "block_device.3851383343.device_name": "/dev/sdx", "block_device.3851383343.encrypted": "false", @@ -42,7 +42,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { "block_device.56575650.volume_type": "standard", }, Expected: map[string]string{ - "ebs_block_device.#": "1", + "ebs_block_device.#": "1", "ebs_block_device.3851383343.delete_on_termination": "true", "ebs_block_device.3851383343.device_name": "/dev/sdx", "ebs_block_device.3851383343.encrypted": "false", @@ -64,7 +64,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { StateVersion: 0, Attributes: map[string]string{ // EBS - "block_device.#": "2", + "block_device.#": "2", "block_device.3851383343.delete_on_termination": "true", "block_device.3851383343.device_name": "/dev/sdx", "block_device.3851383343.encrypted": "false", @@ -92,7 +92,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { "root_block_device.3018388612.iops": "1000", }, Expected: map[string]string{ - "ebs_block_device.#": "1", + "ebs_block_device.#": "1", "ebs_block_device.3851383343.delete_on_termination": "true", "ebs_block_device.3851383343.device_name": "/dev/sdx", "ebs_block_device.3851383343.encrypted": "false", diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index d570bb62b60..74dedf576b2 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -228,11 +228,11 @@ func flattenFirehoseExtendedS3Configuration(description *firehose.ExtendedS3Dest "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), "compression_format": aws.StringValue(description.CompressionFormat), "data_format_conversion_configuration": flattenFirehoseDataFormatConversionConfiguration(description.DataFormatConversionConfiguration), - "prefix": aws.StringValue(description.Prefix), - "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), - "role_arn": aws.StringValue(description.RoleARN), - "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), - "s3_backup_mode": aws.StringValue(description.S3BackupMode), + "prefix": aws.StringValue(description.Prefix), + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), + "role_arn": aws.StringValue(description.RoleARN), + "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), + "s3_backup_mode": aws.StringValue(description.S3BackupMode), } if description.BufferingHints != nil { diff --git a/aws/resource_aws_neptune_cluster_instance.go b/aws/resource_aws_neptune_cluster_instance.go index 6cb8ec42a41..026feeb7346 100644 --- a/aws/resource_aws_neptune_cluster_instance.go +++ b/aws/resource_aws_neptune_cluster_instance.go @@ -196,7 +196,7 @@ func resourceAwsNeptuneClusterInstanceCreate(d *schema.ResourceData, meta interf PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), PromotionTier: aws.Int64(int64(d.Get("promotion_tier").(int))), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - Tags: tags, + Tags: tags, } if attr, ok := d.GetOk("availability_zone"); ok { diff --git a/aws/resource_aws_neptune_cluster_parameter_group.go b/aws/resource_aws_neptune_cluster_parameter_group.go index 7a879889d5c..a04db20a2d5 100644 --- a/aws/resource_aws_neptune_cluster_parameter_group.go +++ b/aws/resource_aws_neptune_cluster_parameter_group.go @@ -154,7 +154,7 @@ func resourceAwsNeptuneClusterParameterGroupRead(d *schema.ResourceData, meta in // Only include user customized parameters as there's hundreds of system/default ones describeParametersOpts := neptune.DescribeDBClusterParametersInput{ DBClusterParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), + Source: aws.String("user"), } describeParametersResp, err := conn.DescribeDBClusterParameters(&describeParametersOpts) diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index 70ad3d3dafe..4a65db57786 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -216,7 +216,7 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), PromotionTier: aws.Int64(int64(d.Get("promotion_tier").(int))), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - Tags: tags, + Tags: tags, } if attr, ok := d.GetOk("availability_zone"); ok { diff --git a/aws/resource_aws_rds_cluster_parameter_group.go b/aws/resource_aws_rds_cluster_parameter_group.go index 577a5b6f4b3..c882de7660a 100644 --- a/aws/resource_aws_rds_cluster_parameter_group.go +++ b/aws/resource_aws_rds_cluster_parameter_group.go @@ -161,7 +161,7 @@ func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interf // Only include user customized parameters as there's hundreds of system/default ones describeParametersOpts := rds.DescribeDBClusterParametersInput{ DBClusterParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), + Source: aws.String("user"), } describeParametersResp, err := rdsconn.DescribeDBClusterParameters(&describeParametersOpts) diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index 9f6c99ee3cf..6cde16cef90 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -415,7 +415,7 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) AllowVersionUpgrade: aws.Bool(d.Get("allow_version_upgrade").(bool)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), AutomatedSnapshotRetentionPeriod: aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))), - Tags: tags, + Tags: tags, } if v := d.Get("number_of_nodes").(int); v > 1 { diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index 92c10adb301..f0f6651065e 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -541,8 +541,8 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro name := normalizeAwsAliasName(*alias.DNSName) d.Set("alias", []interface{}{ map[string]interface{}{ - "zone_id": *alias.HostedZoneId, - "name": name, + "zone_id": *alias.HostedZoneId, + "name": name, "evaluate_target_health": *alias.EvaluateTargetHealth, }, }) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index e304cd614ed..c935ddb2258 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -1700,7 +1700,7 @@ func resourceAwsS3BucketServerSideEncryptionConfigurationUpdate(s3conn *s3.S3, d rc.Rules = rules i := &s3.PutBucketEncryptionInput{ - Bucket: aws.String(bucket), + Bucket: aws.String(bucket), ServerSideEncryptionConfiguration: rc, } log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) @@ -1807,7 +1807,7 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. rc.Rules = rules i := &s3.PutBucketReplicationInput{ - Bucket: aws.String(bucket), + Bucket: aws.String(bucket), ReplicationConfiguration: rc, } log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) diff --git a/aws/resource_aws_s3_bucket_inventory.go b/aws/resource_aws_s3_bucket_inventory.go index 71b8f7eb0d8..43a0498fb0c 100644 --- a/aws/resource_aws_s3_bucket_inventory.go +++ b/aws/resource_aws_s3_bucket_inventory.go @@ -221,8 +221,8 @@ func resourceAwsS3BucketInventoryPut(d *schema.ResourceData, meta interface{}) e } input := &s3.PutBucketInventoryConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), + Bucket: aws.String(bucket), + Id: aws.String(name), InventoryConfiguration: inventoryConfiguration, } diff --git a/aws/resource_aws_s3_bucket_notification.go b/aws/resource_aws_s3_bucket_notification.go index 4e313b6e833..ba03a393754 100644 --- a/aws/resource_aws_s3_bucket_notification.go +++ b/aws/resource_aws_s3_bucket_notification.go @@ -304,7 +304,7 @@ func resourceAwsS3BucketNotificationPut(d *schema.ResourceData, meta interface{} notificationConfiguration.TopicConfigurations = topicConfigs } i := &s3.PutBucketNotificationConfigurationInput{ - Bucket: aws.String(bucket), + Bucket: aws.String(bucket), NotificationConfiguration: notificationConfiguration, } @@ -336,7 +336,7 @@ func resourceAwsS3BucketNotificationDelete(d *schema.ResourceData, meta interfac s3conn := meta.(*AWSClient).s3conn i := &s3.PutBucketNotificationConfigurationInput{ - Bucket: aws.String(d.Id()), + Bucket: aws.String(d.Id()), NotificationConfiguration: &s3.NotificationConfiguration{}, } diff --git a/aws/resource_aws_security_group_migrate_test.go b/aws/resource_aws_security_group_migrate_test.go index e990ef3e1f1..3b14edb0e5e 100644 --- a/aws/resource_aws_security_group_migrate_test.go +++ b/aws/resource_aws_security_group_migrate_test.go @@ -19,7 +19,7 @@ func TestAWSSecurityGroupMigrateState(t *testing.T) { "name": "test", }, Expected: map[string]string{ - "name": "test", + "name": "test", "revoke_rules_on_delete": "false", }, }, diff --git a/aws/resource_aws_service_discovery_service_migrate_test.go b/aws/resource_aws_service_discovery_service_migrate_test.go index ddd24a8f46b..8a36485b451 100644 --- a/aws/resource_aws_service_discovery_service_migrate_test.go +++ b/aws/resource_aws_service_discovery_service_migrate_test.go @@ -24,7 +24,7 @@ func TestAwsServiceDiscoveryServiceMigrateState(t *testing.T) { "dns_config.0.dns_records.#": "1", "dns_config.0.dns_records.0.ttl": "10", "dns_config.0.dns_records.0.type": "A", - "arn": "arn", + "arn": "arn", }, Expected: map[string]string{ "name": "test-name", @@ -34,7 +34,7 @@ func TestAwsServiceDiscoveryServiceMigrateState(t *testing.T) { "dns_config.0.dns_records.#": "1", "dns_config.0.dns_records.0.ttl": "10", "dns_config.0.dns_records.0.type": "A", - "arn": "arn", + "arn": "arn", }, }, } diff --git a/aws/resource_aws_sns_topic.go b/aws/resource_aws_sns_topic.go index be5d2bfcc8e..519aa4698f2 100644 --- a/aws/resource_aws_sns_topic.go +++ b/aws/resource_aws_sns_topic.go @@ -27,10 +27,10 @@ var SNSAttributeMap = map[string]string{ "lambda_failure_feedback_role_arn": "LambdaFailureFeedbackRoleArn", "lambda_success_feedback_role_arn": "LambdaSuccessFeedbackRoleArn", "lambda_success_feedback_sample_rate": "LambdaSuccessFeedbackSampleRate", - "policy": "Policy", - "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn", - "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", - "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", + "policy": "Policy", + "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn", + "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", + "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", } func resourceAwsSnsTopic() *schema.Resource { diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index 15fcb4c01ed..d794d09c508 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -610,7 +610,7 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), - Type: aws.String(d.Get("fleet_type").(string)), + Type: aws.String(d.Get("fleet_type").(string)), } if v, ok := d.GetOk("excess_capacity_termination_policy"); ok { diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index 5460b0790cc..5a0dbeabc84 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -118,8 +118,8 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface } spotOpts := &ec2.RequestSpotInstancesInput{ - SpotPrice: aws.String(d.Get("spot_price").(string)), - Type: aws.String(d.Get("spot_type").(string)), + SpotPrice: aws.String(d.Get("spot_price").(string)), + Type: aws.String(d.Get("spot_type").(string)), InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), // Though the AWS API supports creating spot instance requests for multiple diff --git a/aws/resource_aws_ssm_maintenance_window.go b/aws/resource_aws_ssm_maintenance_window.go index f9d55e8d039..a7c939cc747 100644 --- a/aws/resource_aws_ssm_maintenance_window.go +++ b/aws/resource_aws_ssm_maintenance_window.go @@ -55,10 +55,10 @@ func resourceAwsSsmMaintenanceWindowCreate(d *schema.ResourceData, meta interfac ssmconn := meta.(*AWSClient).ssmconn params := &ssm.CreateMaintenanceWindowInput{ - Name: aws.String(d.Get("name").(string)), - Schedule: aws.String(d.Get("schedule").(string)), - Duration: aws.Int64(int64(d.Get("duration").(int))), - Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), + Name: aws.String(d.Get("name").(string)), + Schedule: aws.String(d.Get("schedule").(string)), + Duration: aws.Int64(int64(d.Get("duration").(int))), + Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), AllowUnassociatedTargets: aws.Bool(d.Get("allow_unassociated_targets").(bool)), } diff --git a/aws/resource_aws_ssm_patch_baseline.go b/aws/resource_aws_ssm_patch_baseline.go index 7183190f2a9..c271c84ae40 100644 --- a/aws/resource_aws_ssm_patch_baseline.go +++ b/aws/resource_aws_ssm_patch_baseline.go @@ -147,7 +147,7 @@ func resourceAwsSsmPatchBaselineCreate(d *schema.ResourceData, meta interface{}) ssmconn := meta.(*AWSClient).ssmconn params := &ssm.CreatePatchBaselineInput{ - Name: aws.String(d.Get("name").(string)), + Name: aws.String(d.Get("name").(string)), ApprovedPatchesComplianceLevel: aws.String(d.Get("approved_patches_compliance_level").(string)), OperatingSystem: aws.String(d.Get("operating_system").(string)), } diff --git a/aws/resource_aws_swf_domain.go b/aws/resource_aws_swf_domain.go index 8668ec108fd..5e254496611 100644 --- a/aws/resource_aws_swf_domain.go +++ b/aws/resource_aws_swf_domain.go @@ -70,7 +70,7 @@ func resourceAwsSwfDomainCreate(d *schema.ResourceData, meta interface{}) error } input := &swf.RegisterDomainInput{ - Name: aws.String(name), + Name: aws.String(name), WorkflowExecutionRetentionPeriodInDays: aws.String(d.Get("workflow_execution_retention_period_in_days").(string)), } diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index f6f0b4dff7c..73a9defe488 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -411,7 +411,7 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { if toAssign { modifyOpts := &ec2.AssociateVpcCidrBlockInput{ - VpcId: &vpcid, + VpcId: &vpcid, AmazonProvidedIpv6CidrBlock: aws.Bool(toAssign), } log.Printf("[INFO] Enabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", diff --git a/aws/validators_test.go b/aws/validators_test.go index df9fed35db5..3f11fbc8807 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -1563,6 +1563,66 @@ func TestValidateElbNamePrefix(t *testing.T) { } } +func TestValidateNeptuneEventSubscriptionName(t *testing.T) { + cases := []struct { + Value string + ErrCount int + }{ + { + Value: "testing123!", + ErrCount: 1, + }, + { + Value: "testing 123", + ErrCount: 1, + }, + { + Value: "testing_123", + ErrCount: 1, + }, + { + Value: randomString(256), + ErrCount: 1, + }, + } + for _, tc := range cases { + _, errors := validateNeptuneEventSubscriptionName(tc.Value, "aws_neptune_event_subscription") + if len(errors) != tc.ErrCount { + t.Fatalf("Expected the Neptune Event Subscription Name to trigger a validation error for %q", tc.Value) + } + } +} + +func TestValidateNeptuneEventSubscriptionNamePrefix(t *testing.T) { + cases := []struct { + Value string + ErrCount int + }{ + { + Value: "testing123!", + ErrCount: 1, + }, + { + Value: "testing 123", + ErrCount: 1, + }, + { + Value: "testing_123", + ErrCount: 1, + }, + { + Value: randomString(254), + ErrCount: 1, + }, + } + for _, tc := range cases { + _, errors := validateNeptuneEventSubscriptionNamePrefix(tc.Value, "aws_neptune_event_subscription") + if len(errors) != tc.ErrCount { + t.Fatalf("Expected the Neptune Event Subscription Name Prefix to trigger a validation error for %q", tc.Value) + } + } +} + func TestValidateDbSubnetGroupName(t *testing.T) { cases := []struct { Value string @@ -2280,23 +2340,23 @@ func TestValidateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(t *testin }{ { AmbiguousRoleResolution: nil, - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 1, + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 1, }, { AmbiguousRoleResolution: "foo", - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 0, // 0 as it should be defined, the value isn't validated here + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 0, // 0 as it should be defined, the value isn't validated here }, { AmbiguousRoleResolution: cognitoidentity.AmbiguousRoleResolutionTypeAuthenticatedRole, - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 0, + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 0, }, { AmbiguousRoleResolution: cognitoidentity.AmbiguousRoleResolutionTypeDeny, - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 0, + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 0, }, } From df74055e07548a249394ec008d6a014525691bb5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 31 Aug 2018 18:54:48 -0400 Subject: [PATCH 2410/3316] vendor: aws/aws-sdk-go@v1.15.26 * Updated via `govendor fetch github.com/aws/aws-sdk-go/...@v1.15.26` --- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 10 + .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/codebuild/api.go | 298 +++++ .../aws/aws-sdk-go/service/eks/api.go | 35 +- .../aws/aws-sdk-go/service/eks/doc.go | 16 +- .../aws/aws-sdk-go/service/eks/errors.go | 6 +- .../aws/aws-sdk-go/service/iot/api.go | 456 ++++++-- .../aws-sdk-go/service/mediapackage/api.go | 203 +++- .../aws/aws-sdk-go/service/redshift/api.go | 22 +- .../aws/aws-sdk-go/service/sagemaker/api.go | 25 +- .../aws/aws-sdk-go/service/waf/api.go | 954 +++++++++++++-- .../aws/aws-sdk-go/service/waf/errors.go | 8 +- .../aws/aws-sdk-go/service/wafregional/api.go | 475 +++++++- .../aws-sdk-go/service/wafregional/errors.go | 8 +- vendor/vendor.json | 1038 ++++++++--------- 15 files changed, 2758 insertions(+), 798 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index ebce035cfdd..86788100adc 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -113,6 +113,7 @@ const ( ImportexportServiceID = "importexport" // Importexport. InspectorServiceID = "inspector" // Inspector. IotServiceID = "iot" // Iot. + IotanalyticsServiceID = "iotanalytics" // Iotanalytics. KinesisServiceID = "kinesis" // Kinesis. KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics. KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo. @@ -1409,6 +1410,15 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "iotanalytics": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "kinesis": service{ Endpoints: endpoints{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index f44b55400cf..844aa4d26f0 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.15.21" +const SDKVersion = "1.15.26" diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 52824177a7b..41ad39eeb7c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -1626,6 +1626,33 @@ type Build struct { // The name of the AWS CodeBuild project. ProjectName *string `locationName:"projectName" min:"1" type:"string"` + // An array of ProjectArtifacts objects. + SecondaryArtifacts []*BuildArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must + // be one of: + // + // * For AWS CodeCommit: the commit ID to use. + // + // * For GitHub: the commit ID, pull request ID, branch name, or tag name + // that corresponds to the version of the source code you want to build. + // If a pull request ID is specified, it must use the format pr/pull-request-ID + // (for example pr/25). If a branch name is specified, the branch's HEAD + // commit ID will be used. If not specified, the default branch's HEAD commit + // ID will be used. + // + // * For Bitbucket: the commit ID, branch name, or tag name that corresponds + // to the version of the source code you want to build. If a branch name + // is specified, the branch's HEAD commit ID will be used. If not specified, + // the default branch's HEAD commit ID will be used. + // + // * For Amazon Simple Storage Service (Amazon S3): the version ID of the + // object representing the build input ZIP file to use. + SecondarySourceVersions []*ProjectSourceVersion `locationName:"secondarySourceVersions" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The name of a service role used for this build. ServiceRole *string `locationName:"serviceRole" min:"1" type:"string"` @@ -1749,6 +1776,24 @@ func (s *Build) SetProjectName(v string) *Build { return s } +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *Build) SetSecondaryArtifacts(v []*BuildArtifacts) *Build { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySourceVersions sets the SecondarySourceVersions field's value. +func (s *Build) SetSecondarySourceVersions(v []*ProjectSourceVersion) *Build { + s.SecondarySourceVersions = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *Build) SetSecondarySources(v []*ProjectSource) *Build { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *Build) SetServiceRole(v string) *Build { s.ServiceRole = &v @@ -1789,6 +1834,9 @@ func (s *Build) SetVpcConfig(v *VpcConfig) *Build { type BuildArtifacts struct { _ struct{} `type:"structure"` + // An identifier for this artifact definition. + ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"` + // Information that tells you if encryption for build artifacts is disabled. EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"` @@ -1830,6 +1878,12 @@ func (s BuildArtifacts) GoString() string { return s.String() } +// SetArtifactIdentifier sets the ArtifactIdentifier field's value. +func (s *BuildArtifacts) SetArtifactIdentifier(v string) *BuildArtifacts { + s.ArtifactIdentifier = &v + return s +} + // SetEncryptionDisabled sets the EncryptionDisabled field's value. func (s *BuildArtifacts) SetEncryptionDisabled(v bool) *BuildArtifacts { s.EncryptionDisabled = &v @@ -2033,6 +2087,12 @@ type CreateProjectInput struct { // Name is a required field Name *string `locationName:"name" min:"2" type:"string" required:"true"` + // An array of ProjectArtifacts objects. + SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The ARN of the AWS Identity and Access Management (IAM) role that enables // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS // account. @@ -2115,6 +2175,26 @@ func (s *CreateProjectInput) Validate() error { invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) } } + if s.SecondaryArtifacts != nil { + for i, v := range s.SecondaryArtifacts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySources != nil { + for i, v := range s.SecondarySources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams)) + } + } + } if s.Source != nil { if err := s.Source.Validate(); err != nil { invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) @@ -2184,6 +2264,18 @@ func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { return s } +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *CreateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *CreateProjectInput { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *CreateProjectInput) SetSecondarySources(v []*ProjectSource) *CreateProjectInput { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *CreateProjectInput) SetServiceRole(v string) *CreateProjectInput { s.ServiceRole = &v @@ -3144,6 +3236,12 @@ type Project struct { // The name of the build project. Name *string `locationName:"name" min:"2" type:"string"` + // An array of ProjectArtifacts objects. + SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The ARN of the AWS Identity and Access Management (IAM) role that enables // AWS CodeBuild to interact with dependent AWS services on behalf of the AWS // account. @@ -3241,6 +3339,18 @@ func (s *Project) SetName(v string) *Project { return s } +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *Project) SetSecondaryArtifacts(v []*ProjectArtifacts) *Project { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *Project) SetSecondarySources(v []*ProjectSource) *Project { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *Project) SetServiceRole(v string) *Project { s.ServiceRole = &v @@ -3281,6 +3391,9 @@ func (s *Project) SetWebhook(v *Webhook) *Project { type ProjectArtifacts struct { _ struct{} `type:"structure"` + // An identifier for this artifact definition. + ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"` + // Set to true if you do not want your output artifacts encrypted. This option // is only valid if your artifacts type is Amazon S3. If this is set with another // artifacts type, an invalidInputException will be thrown. @@ -3427,6 +3540,12 @@ func (s *ProjectArtifacts) Validate() error { return nil } +// SetArtifactIdentifier sets the ArtifactIdentifier field's value. +func (s *ProjectArtifacts) SetArtifactIdentifier(v string) *ProjectArtifacts { + s.ArtifactIdentifier = &v + return s +} + // SetEncryptionDisabled sets the EncryptionDisabled field's value. func (s *ProjectArtifacts) SetEncryptionDisabled(v bool) *ProjectArtifacts { s.EncryptionDisabled = &v @@ -3774,6 +3893,9 @@ type ProjectSource struct { // is thrown. ReportBuildStatus *bool `locationName:"reportBuildStatus" type:"boolean"` + // An identifier for this project source. + SourceIdentifier *string `locationName:"sourceIdentifier" type:"string"` + // The type of repository that contains the source code to be built. Valid values // include: // @@ -3857,12 +3979,89 @@ func (s *ProjectSource) SetReportBuildStatus(v bool) *ProjectSource { return s } +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *ProjectSource) SetSourceIdentifier(v string) *ProjectSource { + s.SourceIdentifier = &v + return s +} + // SetType sets the Type field's value. func (s *ProjectSource) SetType(v string) *ProjectSource { s.Type = &v return s } +// A source identifier and its corresponding version. +type ProjectSourceVersion struct { + _ struct{} `type:"structure"` + + // An identifier for a source in the build project. + // + // SourceIdentifier is a required field + SourceIdentifier *string `locationName:"sourceIdentifier" type:"string" required:"true"` + + // The source version for the corresponding source identifier. If specified, + // must be one of: + // + // * For AWS CodeCommit: the commit ID to use. + // + // * For GitHub: the commit ID, pull request ID, branch name, or tag name + // that corresponds to the version of the source code you want to build. + // If a pull request ID is specified, it must use the format pr/pull-request-ID + // (for example pr/25). If a branch name is specified, the branch's HEAD + // commit ID will be used. If not specified, the default branch's HEAD commit + // ID will be used. + // + // * For Bitbucket: the commit ID, branch name, or tag name that corresponds + // to the version of the source code you want to build. If a branch name + // is specified, the branch's HEAD commit ID will be used. If not specified, + // the default branch's HEAD commit ID will be used. + // + // * For Amazon Simple Storage Service (Amazon S3): the version ID of the + // object representing the build input ZIP file to use. + // + // SourceVersion is a required field + SourceVersion *string `locationName:"sourceVersion" type:"string" required:"true"` +} + +// String returns the string representation +func (s ProjectSourceVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProjectSourceVersion) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProjectSourceVersion) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProjectSourceVersion"} + if s.SourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceIdentifier")) + } + if s.SourceVersion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceVersion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *ProjectSourceVersion) SetSourceIdentifier(v string) *ProjectSourceVersion { + s.SourceIdentifier = &v + return s +} + +// SetSourceVersion sets the SourceVersion field's value. +func (s *ProjectSourceVersion) SetSourceVersion(v string) *ProjectSourceVersion { + s.SourceVersion = &v + return s +} + // Information about the authorization settings for AWS CodeBuild to access // the source code to be built. // @@ -3982,6 +4181,16 @@ type StartBuildInput struct { // GitHub, an invalidInputException is thrown. ReportBuildStatusOverride *bool `locationName:"reportBuildStatusOverride" type:"boolean"` + // An array of ProjectArtifacts objects. + SecondaryArtifactsOverride []*ProjectArtifacts `locationName:"secondaryArtifactsOverride" type:"list"` + + // An array of ProjectSource objects. + SecondarySourcesOverride []*ProjectSource `locationName:"secondarySourcesOverride" type:"list"` + + // An array of ProjectSourceVersion objects that specify one or more versions + // of the project's secondary sources to be used for this build only. + SecondarySourcesVersionOverride []*ProjectSourceVersion `locationName:"secondarySourcesVersionOverride" type:"list"` + // The name of a service role for this build that overrides the one specified // in the build project. ServiceRoleOverride *string `locationName:"serviceRoleOverride" min:"1" type:"string"` @@ -4073,6 +4282,36 @@ func (s *StartBuildInput) Validate() error { } } } + if s.SecondaryArtifactsOverride != nil { + for i, v := range s.SecondaryArtifactsOverride { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifactsOverride", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySourcesOverride != nil { + for i, v := range s.SecondarySourcesOverride { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesOverride", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySourcesVersionOverride != nil { + for i, v := range s.SecondarySourcesVersionOverride { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySourcesVersionOverride", i), err.(request.ErrInvalidParams)) + } + } + } if s.SourceAuthOverride != nil { if err := s.SourceAuthOverride.Validate(); err != nil { invalidParams.AddNested("SourceAuthOverride", err.(request.ErrInvalidParams)) @@ -4169,6 +4408,24 @@ func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput return s } +// SetSecondaryArtifactsOverride sets the SecondaryArtifactsOverride field's value. +func (s *StartBuildInput) SetSecondaryArtifactsOverride(v []*ProjectArtifacts) *StartBuildInput { + s.SecondaryArtifactsOverride = v + return s +} + +// SetSecondarySourcesOverride sets the SecondarySourcesOverride field's value. +func (s *StartBuildInput) SetSecondarySourcesOverride(v []*ProjectSource) *StartBuildInput { + s.SecondarySourcesOverride = v + return s +} + +// SetSecondarySourcesVersionOverride sets the SecondarySourcesVersionOverride field's value. +func (s *StartBuildInput) SetSecondarySourcesVersionOverride(v []*ProjectSourceVersion) *StartBuildInput { + s.SecondarySourcesVersionOverride = v + return s +} + // SetServiceRoleOverride sets the ServiceRoleOverride field's value. func (s *StartBuildInput) SetServiceRoleOverride(v string) *StartBuildInput { s.ServiceRoleOverride = &v @@ -4378,6 +4635,12 @@ type UpdateProjectInput struct { // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // An array of ProjectSource objects. + SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` + + // An array of ProjectSource objects. + SecondarySources []*ProjectSource `locationName:"secondarySources" type:"list"` + // The replacement ARN of the AWS Identity and Access Management (IAM) role // that enables AWS CodeBuild to interact with dependent AWS services on behalf // of the AWS account. @@ -4444,6 +4707,26 @@ func (s *UpdateProjectInput) Validate() error { invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) } } + if s.SecondaryArtifacts != nil { + for i, v := range s.SecondaryArtifacts { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondaryArtifacts", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SecondarySources != nil { + for i, v := range s.SecondarySources { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SecondarySources", i), err.(request.ErrInvalidParams)) + } + } + } if s.Source != nil { if err := s.Source.Validate(); err != nil { invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) @@ -4513,6 +4796,18 @@ func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { return s } +// SetSecondaryArtifacts sets the SecondaryArtifacts field's value. +func (s *UpdateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *UpdateProjectInput { + s.SecondaryArtifacts = v + return s +} + +// SetSecondarySources sets the SecondarySources field's value. +func (s *UpdateProjectInput) SetSecondarySources(v []*ProjectSource) *UpdateProjectInput { + s.SecondarySources = v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *UpdateProjectInput) SetServiceRole(v string) *UpdateProjectInput { s.ServiceRole = &v @@ -4951,6 +5246,9 @@ const ( // SourceTypeGithubEnterprise is a SourceType enum value SourceTypeGithubEnterprise = "GITHUB_ENTERPRISE" + + // SourceTypeNoSource is a SourceType enum value + SourceTypeNoSource = "NO_SOURCE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go index 4d76063f1b8..bb1cefd8892 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go @@ -104,11 +104,11 @@ func (c *EKS) CreateClusterRequest(input *CreateClusterInput) (req *request.Requ // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // * ErrCodeUnsupportedAvailabilityZoneException "UnsupportedAvailabilityZoneException" // At least one of your specified cluster subnets is in an Availability Zone -// that does not support Amazon EKS. The exception output will specify the supported +// that does not support Amazon EKS. The exception output specifies the supported // Availability Zones for your account, from which you can choose subnets for // your cluster. // @@ -200,7 +200,7 @@ func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are region-specific. +// with ListClusters. Amazon EKS clusters are Region-specific. // // * ErrCodeClientException "ClientException" // These errors are usually caused by a client action, such as using an action @@ -211,7 +211,7 @@ func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DeleteCluster func (c *EKS) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { @@ -299,7 +299,7 @@ func (c *EKS) DescribeClusterRequest(input *DescribeClusterInput) (req *request. // Returned Error Codes: // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource could not be found. You can view your available clusters -// with ListClusters. Amazon EKS clusters are region-specific. +// with ListClusters. Amazon EKS clusters are Region-specific. // // * ErrCodeClientException "ClientException" // These errors are usually caused by a client action, such as using an action @@ -310,7 +310,7 @@ func (c *EKS) DescribeClusterRequest(input *DescribeClusterInput) (req *request. // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeCluster func (c *EKS) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) { @@ -378,7 +378,7 @@ func (c *EKS) ListClustersRequest(input *ListClustersInput) (req *request.Reques // ListClusters API operation for Amazon Elastic Container Service for Kubernetes. // -// Lists the Amazon EKS clusters in your AWS account in the specified region. +// Lists the Amazon EKS clusters in your AWS account in the specified Region. // // 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 @@ -401,7 +401,7 @@ func (c *EKS) ListClustersRequest(input *ListClustersInput) (req *request.Reques // These errors are usually caused by a server-side issue. // // * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The service is unavailable, back off and retry the operation. +// The service is unavailable. Back off and retry the operation. // // See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListClusters func (c *EKS) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { @@ -474,6 +474,11 @@ type Cluster struct { // The name of the cluster. Name *string `locationName:"name" type:"string"` + // The platform version of your Amazon EKS cluster. For more information, see + // Platform Versions (eks/latest/userguide/platform-versions.html) in the Amazon + // EKS User Guide. + PlatformVersion *string `locationName:"platformVersion" type:"string"` + // The VPC subnets and security groups used by the cluster control plane. Amazon // EKS VPC resources have specific requirements to work properly with Kubernetes. // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) @@ -539,6 +544,12 @@ func (s *Cluster) SetName(v string) *Cluster { return s } +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *Cluster) SetPlatformVersion(v string) *Cluster { + s.PlatformVersion = &v + return s +} + // SetResourcesVpcConfig sets the ResourcesVpcConfig field's value. func (s *Cluster) SetResourcesVpcConfig(v *VpcConfigResponse) *Cluster { s.ResourcesVpcConfig = v @@ -579,7 +590,9 @@ type CreateClusterInput struct { // EKS VPC resources have specific requirements to work properly with Kubernetes. // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) // and Cluster Security Group Considerations (http://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) - // in the Amazon EKS User Guide. + // in the Amazon EKS User Guide. You must specify at least two subnets. You + // may specify up to 5 security groups, but we recommend that you use a dedicated + // security group for your cluster control plane. // // ResourcesVpcConfig is a required field ResourcesVpcConfig *VpcConfigRequest `locationName:"resourcesVpcConfig" type:"structure" required:"true"` @@ -587,7 +600,7 @@ type CreateClusterInput struct { // The Amazon Resource Name (ARN) of the IAM role that provides permissions // for Amazon EKS to make calls to other AWS API operations on your behalf. // For more information, see Amazon EKS Service IAM Role (http://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html) - // in the Amazon EKS User Guide + // in the Amazon EKS User Guide. // // RoleArn is a required field RoleArn *string `locationName:"roleArn" type:"string" required:"true"` @@ -869,7 +882,7 @@ func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { type ListClustersOutput struct { _ struct{} `type:"structure"` - // A list of all of the clusters for your account in the specified region. + // A list of all of the clusters for your account in the specified Region. Clusters []*string `locationName:"clusters" type:"list"` // The nextToken value to include in a future ListClusters request. When the diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go b/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go index 9f819afc685..0f194107613 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/doc.go @@ -9,21 +9,7 @@ // an open-source system for automating the deployment, scaling, and management // of containerized applications. // -// Amazon EKS runs three Kubernetes control plane instances across three Availability -// Zones to ensure high availability. Amazon EKS automatically detects and replaces -// unhealthy control plane instances, and it provides automated version upgrades -// and patching for them. -// -// Amazon EKS is also integrated with many AWS services to provide scalability -// and security for your applications, including the following: -// -// * Elastic Load Balancing for load distribution -// -// * IAM for authentication -// -// * Amazon VPC for isolation -// -// Amazon EKS runs up to date versions of the open-source Kubernetes software, +// Amazon EKS runs up-to-date versions of the open-source Kubernetes software, // so you can use all the existing plugins and tooling from the Kubernetes community. // Applications running on Amazon EKS are fully compatible with applications // running on any standard Kubernetes environment, whether running in on-premises diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go index 825e7d2dbd8..98a2410c563 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go @@ -35,7 +35,7 @@ const ( // "ResourceNotFoundException". // // The specified resource could not be found. You can view your available clusters - // with ListClusters. Amazon EKS clusters are region-specific. + // with ListClusters. Amazon EKS clusters are Region-specific. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeServerException for service response error code @@ -47,14 +47,14 @@ const ( // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // - // The service is unavailable, back off and retry the operation. + // The service is unavailable. Back off and retry the operation. ErrCodeServiceUnavailableException = "ServiceUnavailableException" // ErrCodeUnsupportedAvailabilityZoneException for service response error code // "UnsupportedAvailabilityZoneException". // // At least one of your specified cluster subnets is in an Availability Zone - // that does not support Amazon EKS. The exception output will specify the supported + // that does not support Amazon EKS. The exception output specifies the supported // Availability Zones for your account, from which you can choose subnets for // your cluster. ErrCodeUnsupportedAvailabilityZoneException = "UnsupportedAvailabilityZoneException" diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index 70ebbdcd43c..5d610e3a8f5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -1604,6 +1604,9 @@ func (c *IoT) CreateOTAUpdateRequest(input *CreateOTAUpdateInput) (req *request. // * ErrCodeInvalidRequestException "InvalidRequestException" // The request is not valid. // +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource does not exist. // @@ -2170,6 +2173,9 @@ func (c *IoT) CreateStreamRequest(input *CreateStreamInput) (req *request.Reques // * ErrCodeInvalidRequestException "InvalidRequestException" // The request is not valid. // +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource does not exist. // @@ -3222,6 +3228,10 @@ func (c *IoT) DeleteOTAUpdateRequest(input *DeleteOTAUpdateInput) (req *request. // * ErrCodeServiceUnavailableException "ServiceUnavailableException" // The service is temporarily unavailable. // +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// func (c *IoT) DeleteOTAUpdate(input *DeleteOTAUpdateInput) (*DeleteOTAUpdateOutput, error) { req, out := c.DeleteOTAUpdateRequest(input) return out, req.Send() @@ -15165,6 +15175,43 @@ func (s *AuthorizerSummary) SetAuthorizerName(v string) *AuthorizerSummary { return s } +// Configuration for the rollout of OTA updates. +type AwsJobExecutionsRolloutConfig struct { + _ struct{} `type:"structure"` + + // The maximum number of OTA update job executions started per minute. + MaximumPerMinute *int64 `locationName:"maximumPerMinute" min:"1" type:"integer"` +} + +// String returns the string representation +func (s AwsJobExecutionsRolloutConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsJobExecutionsRolloutConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsJobExecutionsRolloutConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsJobExecutionsRolloutConfig"} + if s.MaximumPerMinute != nil && *s.MaximumPerMinute < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaximumPerMinute", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaximumPerMinute sets the MaximumPerMinute field's value. +func (s *AwsJobExecutionsRolloutConfig) SetMaximumPerMinute(v int64) *AwsJobExecutionsRolloutConfig { + s.MaximumPerMinute = &v + return s +} + // A Device Defender security profile behavior. type Behavior struct { _ struct{} `type:"structure"` @@ -16214,6 +16261,9 @@ type CodeSigning struct { // A custom method for code signing a file. CustomCodeSigning *CustomCodeSigning `locationName:"customCodeSigning" type:"structure"` + + // Describes the code-signing job. + StartSigningJobParameter *StartSigningJobParameter `locationName:"startSigningJobParameter" type:"structure"` } // String returns the string representation @@ -16229,9 +16279,9 @@ func (s CodeSigning) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CodeSigning) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CodeSigning"} - if s.CustomCodeSigning != nil { - if err := s.CustomCodeSigning.Validate(); err != nil { - invalidParams.AddNested("CustomCodeSigning", err.(request.ErrInvalidParams)) + if s.StartSigningJobParameter != nil { + if err := s.StartSigningJobParameter.Validate(); err != nil { + invalidParams.AddNested("StartSigningJobParameter", err.(request.ErrInvalidParams)) } } @@ -16253,6 +16303,12 @@ func (s *CodeSigning) SetCustomCodeSigning(v *CustomCodeSigning) *CodeSigning { return s } +// SetStartSigningJobParameter sets the StartSigningJobParameter field's value. +func (s *CodeSigning) SetStartSigningJobParameter(v *StartSigningJobParameter) *CodeSigning { + s.StartSigningJobParameter = v + return s +} + // Describes the certificate chain being used when code signing a file. type CodeSigningCertificateChain struct { _ struct{} `type:"structure"` @@ -16262,9 +16318,6 @@ type CodeSigningCertificateChain struct { // A base64 encoded binary representation of the code signing certificate chain. InlineDocument *string `locationName:"inlineDocument" type:"string"` - - // A stream of the certificate chain files. - Stream *Stream `locationName:"stream" type:"structure"` } // String returns the string representation @@ -16277,21 +16330,6 @@ func (s CodeSigningCertificateChain) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeSigningCertificateChain) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeSigningCertificateChain"} - if s.Stream != nil { - if err := s.Stream.Validate(); err != nil { - invalidParams.AddNested("Stream", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetCertificateName sets the CertificateName field's value. func (s *CodeSigningCertificateChain) SetCertificateName(v string) *CodeSigningCertificateChain { s.CertificateName = &v @@ -16304,12 +16342,6 @@ func (s *CodeSigningCertificateChain) SetInlineDocument(v string) *CodeSigningCe return s } -// SetStream sets the Stream field's value. -func (s *CodeSigningCertificateChain) SetStream(v *Stream) *CodeSigningCertificateChain { - s.Stream = v - return s -} - // Describes the signature for a file. type CodeSigningSignature struct { _ struct{} `type:"structure"` @@ -16318,9 +16350,6 @@ type CodeSigningSignature struct { // // InlineDocument is automatically base64 encoded/decoded by the SDK. InlineDocument []byte `locationName:"inlineDocument" type:"blob"` - - // A stream of the code signing signature. - Stream *Stream `locationName:"stream" type:"structure"` } // String returns the string representation @@ -16333,33 +16362,12 @@ func (s CodeSigningSignature) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CodeSigningSignature) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CodeSigningSignature"} - if s.Stream != nil { - if err := s.Stream.Validate(); err != nil { - invalidParams.AddNested("Stream", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetInlineDocument sets the InlineDocument field's value. func (s *CodeSigningSignature) SetInlineDocument(v []byte) *CodeSigningSignature { s.InlineDocument = v return s } -// SetStream sets the Stream field's value. -func (s *CodeSigningSignature) SetStream(v *Stream) *CodeSigningSignature { - s.Stream = v - return s -} - // Configuration. type Configuration struct { _ struct{} `type:"structure"` @@ -16861,6 +16869,9 @@ type CreateOTAUpdateInput struct { // A list of additional OTA update parameters which are name-value pairs. AdditionalParameters map[string]*string `locationName:"additionalParameters" type:"map"` + // Configuration for the rollout of OTA updates. + AwsJobExecutionsRolloutConfig *AwsJobExecutionsRolloutConfig `locationName:"awsJobExecutionsRolloutConfig" type:"structure"` + // The description of the OTA update. Description *string `locationName:"description" type:"string"` @@ -16930,6 +16941,11 @@ func (s *CreateOTAUpdateInput) Validate() error { if s.Targets != nil && len(s.Targets) < 1 { invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) } + if s.AwsJobExecutionsRolloutConfig != nil { + if err := s.AwsJobExecutionsRolloutConfig.Validate(); err != nil { + invalidParams.AddNested("AwsJobExecutionsRolloutConfig", err.(request.ErrInvalidParams)) + } + } if s.Files != nil { for i, v := range s.Files { if v == nil { @@ -16953,6 +16969,12 @@ func (s *CreateOTAUpdateInput) SetAdditionalParameters(v map[string]*string) *Cr return s } +// SetAwsJobExecutionsRolloutConfig sets the AwsJobExecutionsRolloutConfig field's value. +func (s *CreateOTAUpdateInput) SetAwsJobExecutionsRolloutConfig(v *AwsJobExecutionsRolloutConfig) *CreateOTAUpdateInput { + s.AwsJobExecutionsRolloutConfig = v + return s +} + // SetDescription sets the Description field's value. func (s *CreateOTAUpdateInput) SetDescription(v string) *CreateOTAUpdateInput { s.Description = &v @@ -18178,26 +18200,6 @@ func (s CustomCodeSigning) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomCodeSigning) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomCodeSigning"} - if s.CertificateChain != nil { - if err := s.CertificateChain.Validate(); err != nil { - invalidParams.AddNested("CertificateChain", err.(request.ErrInvalidParams)) - } - } - if s.Signature != nil { - if err := s.Signature.Validate(); err != nil { - invalidParams.AddNested("Signature", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetCertificateChain sets the CertificateChain field's value. func (s *CustomCodeSigning) SetCertificateChain(v *CodeSigningCertificateChain) *CustomCodeSigning { s.CertificateChain = v @@ -18622,6 +18624,14 @@ func (s DeleteJobOutput) GoString() string { type DeleteOTAUpdateInput struct { _ struct{} `type:"structure"` + // Specifies if the stream associated with an OTA update should be deleted when + // the OTA update is deleted. + DeleteStream *bool `location:"querystring" locationName:"deleteStream" type:"boolean"` + + // Specifies if the AWS Job associated with the OTA update should be deleted + // with the OTA update is deleted. + ForceDeleteAWSJob *bool `location:"querystring" locationName:"forceDeleteAWSJob" type:"boolean"` + // The OTA update ID to delete. // // OtaUpdateId is a required field @@ -18654,6 +18664,18 @@ func (s *DeleteOTAUpdateInput) Validate() error { return nil } +// SetDeleteStream sets the DeleteStream field's value. +func (s *DeleteOTAUpdateInput) SetDeleteStream(v bool) *DeleteOTAUpdateInput { + s.DeleteStream = &v + return s +} + +// SetForceDeleteAWSJob sets the ForceDeleteAWSJob field's value. +func (s *DeleteOTAUpdateInput) SetForceDeleteAWSJob(v bool) *DeleteOTAUpdateInput { + s.ForceDeleteAWSJob = &v + return s +} + // SetOtaUpdateId sets the OtaUpdateId field's value. func (s *DeleteOTAUpdateInput) SetOtaUpdateId(v string) *DeleteOTAUpdateInput { s.OtaUpdateId = &v @@ -21113,6 +21135,45 @@ func (s *DescribeThingTypeOutput) SetThingTypeProperties(v *ThingTypeProperties) return s } +// Describes the location of the updated firmware. +type Destination struct { + _ struct{} `type:"structure"` + + // Describes the location in S3 of the updated firmware. + S3Destination *S3Destination `locationName:"s3Destination" type:"structure"` +} + +// String returns the string representation +func (s Destination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Destination) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Destination) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Destination"} + if s.S3Destination != nil { + if err := s.S3Destination.Validate(); err != nil { + invalidParams.AddNested("S3Destination", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Destination sets the S3Destination field's value. +func (s *Destination) SetS3Destination(v *S3Destination) *Destination { + s.S3Destination = v + return s +} + type DetachPolicyInput struct { _ struct{} `type:"structure"` @@ -21914,6 +21975,59 @@ func (s *ExplicitDeny) SetPolicies(v []*Policy) *ExplicitDeny { return s } +// The location of the OTA update. +type FileLocation struct { + _ struct{} `type:"structure"` + + // The location of the updated firmware in S3. + S3Location *S3Location `locationName:"s3Location" type:"structure"` + + // The stream that contains the OTA update. + Stream *Stream `locationName:"stream" type:"structure"` +} + +// String returns the string representation +func (s FileLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileLocation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FileLocation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FileLocation"} + if s.S3Location != nil { + if err := s.S3Location.Validate(); err != nil { + invalidParams.AddNested("S3Location", err.(request.ErrInvalidParams)) + } + } + if s.Stream != nil { + if err := s.Stream.Validate(); err != nil { + invalidParams.AddNested("Stream", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Location sets the S3Location field's value. +func (s *FileLocation) SetS3Location(v *S3Location) *FileLocation { + s.S3Location = v + return s +} + +// SetStream sets the Stream field's value. +func (s *FileLocation) SetStream(v *Stream) *FileLocation { + s.Stream = v + return s +} + // Describes an action that writes data to an Amazon Kinesis Firehose stream. type FirehoseAction struct { _ struct{} `type:"structure"` @@ -27419,12 +27533,12 @@ type OTAUpdateFile struct { // The code signing method of the file. CodeSigning *CodeSigning `locationName:"codeSigning" type:"structure"` + // The location of the updated firmware. + FileLocation *FileLocation `locationName:"fileLocation" type:"structure"` + // The name of the file. FileName *string `locationName:"fileName" type:"string"` - // The source of the file. - FileSource *Stream `locationName:"fileSource" type:"structure"` - // The file version. FileVersion *string `locationName:"fileVersion" type:"string"` } @@ -27447,9 +27561,9 @@ func (s *OTAUpdateFile) Validate() error { invalidParams.AddNested("CodeSigning", err.(request.ErrInvalidParams)) } } - if s.FileSource != nil { - if err := s.FileSource.Validate(); err != nil { - invalidParams.AddNested("FileSource", err.(request.ErrInvalidParams)) + if s.FileLocation != nil { + if err := s.FileLocation.Validate(); err != nil { + invalidParams.AddNested("FileLocation", err.(request.ErrInvalidParams)) } } @@ -27471,15 +27585,15 @@ func (s *OTAUpdateFile) SetCodeSigning(v *CodeSigning) *OTAUpdateFile { return s } -// SetFileName sets the FileName field's value. -func (s *OTAUpdateFile) SetFileName(v string) *OTAUpdateFile { - s.FileName = &v +// SetFileLocation sets the FileLocation field's value. +func (s *OTAUpdateFile) SetFileLocation(v *FileLocation) *OTAUpdateFile { + s.FileLocation = v return s } -// SetFileSource sets the FileSource field's value. -func (s *OTAUpdateFile) SetFileSource(v *Stream) *OTAUpdateFile { - s.FileSource = v +// SetFileName sets the FileName field's value. +func (s *OTAUpdateFile) SetFileName(v string) *OTAUpdateFile { + s.FileName = &v return s } @@ -27502,6 +27616,9 @@ type OTAUpdateInfo struct { // The AWS IoT job ID associated with the OTA update. AwsIotJobId *string `locationName:"awsIotJobId" type:"string"` + // Configuration for the rollout of OTA updates. + AwsJobExecutionsRolloutConfig *AwsJobExecutionsRolloutConfig `locationName:"awsJobExecutionsRolloutConfig" type:"structure"` + // The date when the OTA update was created. CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` @@ -27566,6 +27683,12 @@ func (s *OTAUpdateInfo) SetAwsIotJobId(v string) *OTAUpdateInfo { return s } +// SetAwsJobExecutionsRolloutConfig sets the AwsJobExecutionsRolloutConfig field's value. +func (s *OTAUpdateInfo) SetAwsJobExecutionsRolloutConfig(v *AwsJobExecutionsRolloutConfig) *OTAUpdateInfo { + s.AwsJobExecutionsRolloutConfig = v + return s +} + // SetCreationDate sets the CreationDate field's value. func (s *OTAUpdateInfo) SetCreationDate(v time.Time) *OTAUpdateInfo { s.CreationDate = &v @@ -28871,21 +28994,63 @@ func (s *S3Action) SetRoleArn(v string) *S3Action { return s } -// The location in S3 the contains the files to stream. +// Describes the location of updated firmware in S3. +type S3Destination struct { + _ struct{} `type:"structure"` + + // The S3 bucket that contains the updated firmware. + Bucket *string `locationName:"bucket" min:"1" type:"string"` + + // The S3 prefix. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s S3Destination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Destination) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Destination) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Destination"} + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *S3Destination) SetBucket(v string) *S3Destination { + s.Bucket = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3Destination) SetPrefix(v string) *S3Destination { + s.Prefix = &v + return s +} + +// The S3 location. type S3Location struct { _ struct{} `type:"structure"` - // The S3 bucket that contains the file to stream. - // - // Bucket is a required field - Bucket *string `locationName:"bucket" min:"1" type:"string" required:"true"` + // The S3 bucket. + Bucket *string `locationName:"bucket" min:"1" type:"string"` - // The name of the file within the S3 bucket to stream. - // - // Key is a required field - Key *string `locationName:"key" min:"1" type:"string" required:"true"` + // The S3 key. + Key *string `locationName:"key" min:"1" type:"string"` - // The file version. + // The S3 bucket version. Version *string `locationName:"version" type:"string"` } @@ -28902,15 +29067,9 @@ func (s S3Location) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *S3Location) Validate() error { invalidParams := request.ErrInvalidParams{Context: "S3Location"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } if s.Bucket != nil && len(*s.Bucket) < 1 { invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) } - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } if s.Key != nil && len(*s.Key) < 1 { invalidParams.Add(request.NewErrParamMinLen("Key", 1)) } @@ -29610,6 +29769,48 @@ func (s SetV2LoggingOptionsOutput) GoString() string { return s.String() } +// Describes the code-signing profile. +type SigningProfileParameter struct { + _ struct{} `type:"structure"` + + // Certificate ARN. + CertificateArn *string `locationName:"certificateArn" type:"string"` + + // The location of the code-signing certificate on your device. + CertificatePathOnDevice *string `locationName:"certificatePathOnDevice" type:"string"` + + // The hardware platform of your device. + Platform *string `locationName:"platform" type:"string"` +} + +// String returns the string representation +func (s SigningProfileParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SigningProfileParameter) GoString() string { + return s.String() +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *SigningProfileParameter) SetCertificateArn(v string) *SigningProfileParameter { + s.CertificateArn = &v + return s +} + +// SetCertificatePathOnDevice sets the CertificatePathOnDevice field's value. +func (s *SigningProfileParameter) SetCertificatePathOnDevice(v string) *SigningProfileParameter { + s.CertificatePathOnDevice = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *SigningProfileParameter) SetPlatform(v string) *SigningProfileParameter { + s.Platform = &v + return s +} + // Describes an action to publish to an Amazon SNS topic. type SnsAction struct { _ struct{} `type:"structure"` @@ -29803,6 +30004,63 @@ func (s *StartOnDemandAuditTaskOutput) SetTaskId(v string) *StartOnDemandAuditTa return s } +// Information required to start a signing job. +type StartSigningJobParameter struct { + _ struct{} `type:"structure"` + + // The location to write the code-signed file. + Destination *Destination `locationName:"destination" type:"structure"` + + // The code-signing profile name. + SigningProfileName *string `locationName:"signingProfileName" type:"string"` + + // Describes the code-signing profile. + SigningProfileParameter *SigningProfileParameter `locationName:"signingProfileParameter" type:"structure"` +} + +// String returns the string representation +func (s StartSigningJobParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartSigningJobParameter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartSigningJobParameter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartSigningJobParameter"} + if s.Destination != nil { + if err := s.Destination.Validate(); err != nil { + invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination sets the Destination field's value. +func (s *StartSigningJobParameter) SetDestination(v *Destination) *StartSigningJobParameter { + s.Destination = v + return s +} + +// SetSigningProfileName sets the SigningProfileName field's value. +func (s *StartSigningJobParameter) SetSigningProfileName(v string) *StartSigningJobParameter { + s.SigningProfileName = &v + return s +} + +// SetSigningProfileParameter sets the SigningProfileParameter field's value. +func (s *StartSigningJobParameter) SetSigningProfileParameter(v *SigningProfileParameter) *StartSigningJobParameter { + s.SigningProfileParameter = v + return s +} + type StartThingRegistrationTaskInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go index fa47d515063..a0bac9a2f4e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go @@ -853,6 +853,9 @@ const opRotateChannelCredentials = "RotateChannelCredentials" // // See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentials func (c *MediaPackage) RotateChannelCredentialsRequest(input *RotateChannelCredentialsInput) (req *request.Request, output *RotateChannelCredentialsOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, RotateChannelCredentials, has been deprecated") + } op := &request.Operation{ Name: opRotateChannelCredentials, HTTPMethod: "PUT", @@ -870,7 +873,8 @@ func (c *MediaPackage) RotateChannelCredentialsRequest(input *RotateChannelCrede // RotateChannelCredentials API operation for AWS Elemental MediaPackage. // -// Changes the Channel ingest username and password. +// Changes the Channel's first IngestEndpoint's username and password. WARNING +// - This API is deprecated. Please use RotateIngestEndpointCredentials instead // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -914,6 +918,95 @@ func (c *MediaPackage) RotateChannelCredentialsWithContext(ctx aws.Context, inpu return out, req.Send() } +const opRotateIngestEndpointCredentials = "RotateIngestEndpointCredentials" + +// RotateIngestEndpointCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the RotateIngestEndpointCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RotateIngestEndpointCredentials for more information on using the RotateIngestEndpointCredentials +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RotateIngestEndpointCredentialsRequest method. +// req, resp := client.RotateIngestEndpointCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateIngestEndpointCredentials +func (c *MediaPackage) RotateIngestEndpointCredentialsRequest(input *RotateIngestEndpointCredentialsInput) (req *request.Request, output *RotateIngestEndpointCredentialsOutput) { + op := &request.Operation{ + Name: opRotateIngestEndpointCredentials, + HTTPMethod: "PUT", + HTTPPath: "/channels/{id}/ingest_endpoints/{ingest_endpoint_id}/credentials", + } + + if input == nil { + input = &RotateIngestEndpointCredentialsInput{} + } + + output = &RotateIngestEndpointCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// RotateIngestEndpointCredentials API operation for AWS Elemental MediaPackage. +// +// Rotate the IngestEndpoint's username and password, as specified by the IngestEndpoint's +// id. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation RotateIngestEndpointCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateIngestEndpointCredentials +func (c *MediaPackage) RotateIngestEndpointCredentials(input *RotateIngestEndpointCredentialsInput) (*RotateIngestEndpointCredentialsOutput, error) { + req, out := c.RotateIngestEndpointCredentialsRequest(input) + return out, req.Send() +} + +// RotateIngestEndpointCredentialsWithContext is the same as RotateIngestEndpointCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See RotateIngestEndpointCredentials for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) RotateIngestEndpointCredentialsWithContext(ctx aws.Context, input *RotateIngestEndpointCredentialsInput, opts ...request.Option) (*RotateIngestEndpointCredentialsOutput, error) { + req, out := c.RotateIngestEndpointCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateChannel = "UpdateChannel" // UpdateChannelRequest generates a "aws/request.Request" representing the @@ -2662,6 +2755,9 @@ func (s *HlsPackage) SetUseAudioRenditionGroup(v bool) *HlsPackage { type IngestEndpoint struct { _ struct{} `type:"structure"` + // The system generated unique identifier for the IngestEndpoint + Id *string `locationName:"id" type:"string"` + // The system generated password for ingest authentication. Password *string `locationName:"password" type:"string"` @@ -2682,6 +2778,12 @@ func (s IngestEndpoint) GoString() string { return s.String() } +// SetId sets the Id field's value. +func (s *IngestEndpoint) SetId(v string) *IngestEndpoint { + s.Id = &v + return s +} + // SetPassword sets the Password field's value. func (s *IngestEndpoint) SetPassword(v string) *IngestEndpoint { s.Password = &v @@ -3100,7 +3202,7 @@ func (s *OriginEndpoint) SetWhitelist(v []*string) *OriginEndpoint { } type RotateChannelCredentialsInput struct { - _ struct{} `type:"structure"` + _ struct{} `deprecated:"true" type:"structure"` // Id is a required field Id *string `location:"uri" locationName:"id" type:"string" required:"true"` @@ -3136,7 +3238,7 @@ func (s *RotateChannelCredentialsInput) SetId(v string) *RotateChannelCredential } type RotateChannelCredentialsOutput struct { - _ struct{} `type:"structure"` + _ struct{} `deprecated:"true" type:"structure"` Arn *string `locationName:"arn" type:"string"` @@ -3182,6 +3284,101 @@ func (s *RotateChannelCredentialsOutput) SetId(v string) *RotateChannelCredentia return s } +type RotateIngestEndpointCredentialsInput struct { + _ struct{} `type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` + + // IngestEndpointId is a required field + IngestEndpointId *string `location:"uri" locationName:"ingest_endpoint_id" type:"string" required:"true"` +} + +// String returns the string representation +func (s RotateIngestEndpointCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateIngestEndpointCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotateIngestEndpointCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotateIngestEndpointCredentialsInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.IngestEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("IngestEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *RotateIngestEndpointCredentialsInput) SetId(v string) *RotateIngestEndpointCredentialsInput { + s.Id = &v + return s +} + +// SetIngestEndpointId sets the IngestEndpointId field's value. +func (s *RotateIngestEndpointCredentialsInput) SetIngestEndpointId(v string) *RotateIngestEndpointCredentialsInput { + s.IngestEndpointId = &v + return s +} + +type RotateIngestEndpointCredentialsOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) ingest resource configuration. + HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` + + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s RotateIngestEndpointCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateIngestEndpointCredentialsOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetArn(v string) *RotateIngestEndpointCredentialsOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetDescription(v string) *RotateIngestEndpointCredentialsOutput { + s.Description = &v + return s +} + +// SetHlsIngest sets the HlsIngest field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetHlsIngest(v *HlsIngest) *RotateIngestEndpointCredentialsOutput { + s.HlsIngest = v + return s +} + +// SetId sets the Id field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetId(v string) *RotateIngestEndpointCredentialsOutput { + s.Id = &v + return s +} + // A configuration for accessing an external Secure Packager and Encoder Key // Exchange (SPEKE) service that will provide encryption keys. type SpekeKeyProvider struct { diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index 9aef96db1a2..abf5b5076c8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -6905,7 +6905,24 @@ func (c *Redshift) ResizeClusterRequest(input *ResizeClusterInput) (req *request // ResizeCluster API operation for Amazon Redshift. // -// Changes the cluster's type, node type, or number of nodes. +// Changes the size of the cluster. You can change the cluster's type, or change +// the number or type of nodes. The default behavior is to use the elastic resize +// method. With an elastic resize your cluster is avaialble for read and write +// operations more quickly than with the classic resize method. +// +// Elastic resize operations have the following restrictions: +// +// * You can only resize clusters of the following types: +// +// dc2.large +// +// dc2.8xlarge +// +// ds2.xlarge +// +// ds2.8xlarge +// +// * The type of nodes you add must match the node type for the cluster. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -16692,7 +16709,8 @@ type ResizeClusterInput struct { _ struct{} `type:"structure"` // A boolean value indicating whether the resize operation is using the classic - // resize process. + // resize process. If you don't provide this parameter or set the value to false + // the resize type is elastic. Classic *bool `type:"boolean"` // The unique identifier for the cluster to resize. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go index 76505fc2101..b070e16e246 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go @@ -750,6 +750,15 @@ func (c *SageMaker) CreatePresignedNotebookInstanceUrlRequest(input *CreatePresi // home page from the notebook instance. The console uses this API to get the // URL and show the page. // +// You can restrict access to this API and to the URL that it returns to a list +// of IP addresses that you specify. To restrict access, attach an IAM policy +// that denies access to this API unless the call comes from an IP address in +// the specified list to every AWS Identity and Access Management user, group, +// or role used to access the notebook instance. Use the NotIpAddress condition +// operator and the aws:SourceIP condition context key to specify the list of +// IP addresses that you want to have access to the notebook instance. For more +// information, see nbi-ip-filter. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4416,7 +4425,7 @@ type Channel struct { // algorithm requires the RecordIO format, in which case, Amazon SageMaker wraps // each individual S3 object in a RecordIO record. If the input data is already // in RecordIO format, you don't need to set this attribute. For more information, - // see Create a Dataset Using RecordIO (https://mxnet.incubator.apache.org/how_to/recordio.html?highlight=im2rec) + // see Create a Dataset Using RecordIO (https://mxnet.incubator.apache.org/architecture/note_data_loading.html#data-format) RecordWrapperType *string `type:"string" enum:"RecordWrapper"` } @@ -12120,6 +12129,11 @@ type TransformResources struct { // // InstanceType is a required field InstanceType *string `type:"string" required:"true" enum:"TransformInstanceType"` + + // The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon + // SageMaker uses to encrypt data on the storage volume attached to the ML compute + // instance(s) that run the batch transform job. + VolumeKmsKeyId *string `type:"string"` } // String returns the string representation @@ -12163,6 +12177,12 @@ func (s *TransformResources) SetInstanceType(v string) *TransformResources { return s } +// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. +func (s *TransformResources) SetVolumeKmsKeyId(v string) *TransformResources { + s.VolumeKmsKeyId = &v + return s +} + // Describes the S3 data source. type TransformS3DataSource struct { _ struct{} `type:"structure"` @@ -12735,6 +12755,9 @@ const ( // EndpointStatusUpdating is a EndpointStatus enum value EndpointStatusUpdating = "Updating" + // EndpointStatusSystemUpdating is a EndpointStatus enum value + EndpointStatusSystemUpdating = "SystemUpdating" + // EndpointStatusRollingBack is a EndpointStatus enum value EndpointStatusRollingBack = "RollingBack" diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index e08ff3ee98e..0d9abe4d7f3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -2094,6 +2094,93 @@ func (c *WAF) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, o return out, req.Send() } +const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" + +// DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLoggingConfigurationRequest method. +// req, resp := client.DeleteLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteLoggingConfiguration +func (c *WAF) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfigurationInput) (req *request.Request, output *DeleteLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLoggingConfigurationInput{} + } + + output = &DeleteLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLoggingConfiguration API operation for AWS WAF. +// +// Permanently deletes the LoggingConfiguration from the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation DeleteLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteLoggingConfiguration +func (c *WAF) DeleteLoggingConfiguration(input *DeleteLoggingConfigurationInput) (*DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + return out, req.Send() +} + +// DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *DeleteLoggingConfigurationInput, opts ...request.Option) (*DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the @@ -2778,6 +2865,24 @@ func (c *WAF) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request. // // * You tried to delete an IPSet that references one or more IP addresses. // +// * ErrCodeInvalidOperationException "WAFInvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/DeleteRuleGroup func (c *WAF) DeleteRuleGroup(input *DeleteRuleGroupInput) (*DeleteRuleGroupOutput, error) { req, out := c.DeleteRuleGroupRequest(input) @@ -3753,6 +3858,89 @@ func (c *WAF) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts .. return out, req.Send() } +const opGetLoggingConfiguration = "GetLoggingConfiguration" + +// GetLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLoggingConfiguration for more information on using the GetLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLoggingConfigurationRequest method. +// req, resp := client.GetLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetLoggingConfiguration +func (c *WAF) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInput) (req *request.Request, output *GetLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opGetLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLoggingConfigurationInput{} + } + + output = &GetLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLoggingConfiguration API operation for AWS WAF. +// +// Returns the LoggingConfiguration for the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation GetLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/GetLoggingConfiguration +func (c *WAF) GetLoggingConfiguration(input *GetLoggingConfigurationInput) (*GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + return out, req.Send() +} + +// GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) GetLoggingConfigurationWithContext(ctx aws.Context, input *GetLoggingConfigurationInput, opts ...request.Option) (*GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -5196,6 +5384,118 @@ func (c *WAF) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opt return out, req.Send() } +const opListLoggingConfigurations = "ListLoggingConfigurations" + +// ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListLoggingConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLoggingConfigurations for more information on using the ListLoggingConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLoggingConfigurationsRequest method. +// req, resp := client.ListLoggingConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListLoggingConfigurations +func (c *WAF) ListLoggingConfigurationsRequest(input *ListLoggingConfigurationsInput) (req *request.Request, output *ListLoggingConfigurationsOutput) { + op := &request.Operation{ + Name: opListLoggingConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLoggingConfigurationsInput{} + } + + output = &ListLoggingConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLoggingConfigurations API operation for AWS WAF. +// +// Returns an array of LoggingConfiguration objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation ListLoggingConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeInvalidParameterException "WAFInvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/ListLoggingConfigurations +func (c *WAF) ListLoggingConfigurations(input *ListLoggingConfigurationsInput) (*ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + return out, req.Send() +} + +// ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListLoggingConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) ListLoggingConfigurationsWithContext(ctx aws.Context, input *ListLoggingConfigurationsInput, opts ...request.Option) (*ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the @@ -6031,6 +6331,108 @@ func (c *WAF) ListXssMatchSetsWithContext(ctx aws.Context, input *ListXssMatchSe return out, req.Send() } +const opPutLoggingConfiguration = "PutLoggingConfiguration" + +// PutLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutLoggingConfiguration for more information on using the PutLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutLoggingConfigurationRequest method. +// req, resp := client.PutLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration +func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput) (req *request.Request, output *PutLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opPutLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutLoggingConfigurationInput{} + } + + output = &PutLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutLoggingConfiguration API operation for AWS WAF. +// +// Associates a LoggingConfiguration with a specified web ACL. +// +// You can access information about all traffic that AWS WAF inspects using +// the following steps: +// +// Create an Amazon Kinesis Data Firehose delivery stream. For more information, +// see Creating an Amazon Kinesis Data Firehose Delivery Stream (https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html). +// +// Associate that delivery stream to your web ACL using a PutLoggingConfiguration +// request. +// +// When you successfully enable logging using a PutLoggingConfiguration request, +// AWS WAF will create a service linked role with the necessary permissions +// to write logs to the Amazon Kinesis Data Firehose delivery stream. For more +// information, see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) +// in the AWS WAF Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF's +// API operation PutLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration +func (c *WAF) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + return out, req.Send() +} + +// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAF) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -6086,8 +6488,9 @@ func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req * // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL and waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6132,8 +6535,9 @@ func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req * // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6279,9 +6683,6 @@ func (c *WAF) UpdateByteMatchSetRequest(input *UpdateByteMatchSetInput) (req *re // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6473,9 +6874,6 @@ func (c *WAF) UpdateGeoMatchSetRequest(input *UpdateGeoMatchSetInput) (req *requ // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6620,9 +7018,10 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 // (for the individual IP address 192.0.2.44). // -// AWS WAF supports /8, /16, /24, and /32 IP address ranges for IPv4, and /24, -// /32, /48, /56, /64 and /128 for IPv6. For more information about CIDR notation, -// see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// AWS WAF supports IPv4 address ranges: /8 and any range between /16 through +// /32. AWS WAF supports IPv6 address ranges: /16, /24, /32, /48, /56, /64, +// and /128. For more information about CIDR notation, see the Wikipedia entry +// Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). // // IPv6 addresses can be represented using any of the following formats: // @@ -6654,6 +7053,8 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // and/or the IP addresses that you want to delete. If you want to change an // IP address, you delete the existing IP address and add the new one. // +// You can insert a maximum of 1000 addresses in a single request. +// // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). // @@ -6692,9 +7093,6 @@ func (c *WAF) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6900,9 +7298,6 @@ func (c *WAF) UpdateRateBasedRuleRequest(input *UpdateRateBasedRuleInput) (req * // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7128,9 +7523,6 @@ func (c *WAF) UpdateRegexMatchSetRequest(input *UpdateRegexMatchSetInput) (req * // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7292,9 +7684,6 @@ func (c *WAF) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (r // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7440,9 +7829,6 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7648,9 +8034,6 @@ func (c *WAF) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request. // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7770,6 +8153,8 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // of the request body are not supported because the AWS resource forwards // only the first 8192 bytes of your request to AWS WAF. // +// You can only specify a single type of TextTransformation. +// // * A ComparisonOperator used for evaluating the selected part of the request // against the specified Size, such as equals, greater than, less than, and // so on. @@ -7830,9 +8215,6 @@ func (c *WAF) UpdateSizeConstraintSetRequest(input *UpdateSizeConstraintSetInput // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7972,12 +8354,15 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // object and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for snippets of malicious // SQL code. // +// You can only specify a single type of TextTransformation. +// // You use SqlInjectionMatchSet objects to specify which CloudFront requests // you want to allow, block, or count. For example, if you're receiving requests // that contain snippets of SQL code in the query string and you want to block @@ -8028,9 +8413,6 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8242,9 +8624,6 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8387,12 +8766,15 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for cross-site scripting // attacks. // +// You can only specify a single type of TextTransformation. +// // You use XssMatchSet objects to specify which CloudFront requests you want // to allow, block, or count. For example, if you're receiving requests that // contain cross-site scripting attacks in the request body and you want to @@ -8443,9 +8825,6 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8923,6 +9302,14 @@ type ByteMatchTuple struct { // of the body, you can create a size constraint set. For more information, // see CreateSizeConstraintSet. // + // * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, + // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG + // is 30 characters. + // + // * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but instead of inspecting + // a single parameter, AWS WAF inspects all parameters within the query string + // for the value or regex pattern that you specify in TargetString. + // // If TargetString includes alphabetic characters A-Z and a-z, note that the // value is case sensitive. // @@ -8951,11 +9338,13 @@ type ByteMatchTuple struct { // AWS WAF performs the transformation on TargetString before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // - // When you're concerned that attackers are injecting an operating system commandline - // command and using unusual formatting to disguise some or all of the command, - // use this option to perform the following transformations: + // When you're concerned that attackers are injecting an operating system command + // line command and using unusual formatting to disguise some or all of the + // command, use this option to perform the following transformations: // // * Delete the following characters: \ " ' ^ // @@ -10536,8 +10925,81 @@ func (s *DeleteIPSetInput) Validate() error { if s.IPSetId == nil { invalidParams.Add(request.NewErrParamRequired("IPSetId")) } - if s.IPSetId != nil && len(*s.IPSetId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1)) + if s.IPSetId != nil && len(*s.IPSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IPSetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteIPSetInput) SetChangeToken(v string) *DeleteIPSetInput { + s.ChangeToken = &v + return s +} + +// SetIPSetId sets the IPSetId field's value. +func (s *DeleteIPSetInput) SetIPSetId(v string) *DeleteIPSetInput { + s.IPSetId = &v + return s +} + +type DeleteIPSetOutput struct { + _ struct{} `type:"structure"` + + // The ChangeToken that you used to submit the DeleteIPSet request. You can + // also use this value to query the status of the request. For more information, + // see GetChangeTokenStatus. + ChangeToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteIPSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIPSetOutput) GoString() string { + return s.String() +} + +// SetChangeToken sets the ChangeToken field's value. +func (s *DeleteIPSetOutput) SetChangeToken(v string) *DeleteIPSetOutput { + s.ChangeToken = &v + return s +} + +type DeleteLoggingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the web ACL from which you want to delete + // the LoggingConfiguration. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoggingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoggingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoggingConfigurationInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) } if invalidParams.Len() > 0 { @@ -10546,43 +11008,26 @@ func (s *DeleteIPSetInput) Validate() error { return nil } -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteIPSetInput) SetChangeToken(v string) *DeleteIPSetInput { - s.ChangeToken = &v - return s -} - -// SetIPSetId sets the IPSetId field's value. -func (s *DeleteIPSetInput) SetIPSetId(v string) *DeleteIPSetInput { - s.IPSetId = &v +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteLoggingConfigurationInput) SetResourceArn(v string) *DeleteLoggingConfigurationInput { + s.ResourceArn = &v return s } -type DeleteIPSetOutput struct { +type DeleteLoggingConfigurationOutput struct { _ struct{} `type:"structure"` - - // The ChangeToken that you used to submit the DeleteIPSet request. You can - // also use this value to query the status of the request. For more information, - // see GetChangeTokenStatus. - ChangeToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DeleteIPSetOutput) String() string { +func (s DeleteLoggingConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteIPSetOutput) GoString() string { +func (s DeleteLoggingConfigurationOutput) GoString() string { return s.String() } -// SetChangeToken sets the ChangeToken field's value. -func (s *DeleteIPSetOutput) SetChangeToken(v string) *DeleteIPSetOutput { - s.ChangeToken = &v - return s -} - type DeletePermissionPolicyInput struct { _ struct{} `type:"structure"` @@ -11406,10 +11851,14 @@ type FieldToMatch struct { _ struct{} `type:"structure"` // When the value of Type is HEADER, enter the name of the header that you want - // AWS WAF to search, for example, User-Agent or Referer. If the value of Type - // is any other value, omit Data. + // AWS WAF to search, for example, User-Agent or Referer. The name of the header + // is not case sensitive. // - // The name of the header is not case sensitive. + // When the value of Type is SINGLE_QUERY_ARG, enter the name of the parameter + // that you want AWS WAF to search, for example, UserName or SalesRegion. The + // parameter name is not case sensitive. + // + // If the value of Type is any other value, omit Data. Data *string `type:"string"` // The part of the web request that you want AWS WAF to search for a specified @@ -11437,6 +11886,14 @@ type FieldToMatch struct { // of the body, you can create a size constraint set. For more information, // see CreateSizeConstraintSet. // + // * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, + // such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG + // is 30 characters. + // + // * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but rather than inspecting + // a single parameter, AWS WAF will inspect all parameters within the query + // for the value or regex pattern that you specify in TargetString. + // // Type is a required field Type *string `type:"string" required:"true" enum:"MatchFieldType"` } @@ -11997,6 +12454,71 @@ func (s *GetIPSetOutput) SetIPSet(v *IPSet) *GetIPSetOutput { return s } +type GetLoggingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the web ACL for which you want to get the + // LoggingConfiguration. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoggingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoggingConfigurationInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *GetLoggingConfigurationInput) SetResourceArn(v string) *GetLoggingConfigurationInput { + s.ResourceArn = &v + return s +} + +type GetLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The LoggingConfiguration for the specified web ACL. + LoggingConfiguration *LoggingConfiguration `type:"structure"` +} + +// String returns the string representation +func (s GetLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLoggingConfigurationOutput) GoString() string { + return s.String() +} + +// SetLoggingConfiguration sets the LoggingConfiguration field's value. +func (s *GetLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *GetLoggingConfigurationOutput { + s.LoggingConfiguration = v + return s +} + type GetPermissionPolicyInput struct { _ struct{} `type:"structure"` @@ -13059,15 +13581,15 @@ func (s *HTTPRequest) SetURI(v string) *HTTPRequest { } // Contains one or more IP addresses or blocks of IP addresses specified in -// Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports /8, /16, -// /24, and /32 IP address ranges for IPv4, and /24, /32, /48, /56, /64 and -// /128 for IPv6. +// Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports IPv4 address +// ranges: /8 and any range between /16 through /32. AWS WAF supports IPv6 address +// ranges: /16, /24, /32, /48, /56, /64, and /128. // // To specify an individual IP address, you specify the four-part IP address // followed by a /32, for example, 192.0.2.0/31. To block a range of IP addresses, -// you can specify a /128, /64, /56, /48, /32, /24, /16, or /8 CIDR. For more -// information about CIDR notation, see the Wikipedia entry Classless Inter-Domain -// Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// you can specify /8 or any range between /16 through /32 (for IPv4) or /16, +// /24, /32, /48, /56, /64, or /128 (for IPv6). For more information about CIDR +// notation, see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). type IPSet struct { _ struct{} `type:"structure"` @@ -13656,6 +14178,94 @@ func (s *ListIPSetsOutput) SetNextMarker(v string) *ListIPSetsOutput { return s } +type ListLoggingConfigurationsInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of LoggingConfigurations that you want AWS WAF to return + // for this request. If you have more LoggingConfigurations than the number + // that you specify for Limit, the response includes a NextMarker value that + // you can use to get another batch of LoggingConfigurations. + Limit *int64 `type:"integer"` + + // If you specify a value for Limit and you have more LoggingConfigurations + // than the value of Limit, AWS WAF returns a NextMarker value in the response + // that allows you to list another group of LoggingConfigurations. For the second + // and subsequent ListLoggingConfigurations requests, specify the value of NextMarker + // from the previous response to get information about another batch of ListLoggingConfigurations. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListLoggingConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggingConfigurationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLoggingConfigurationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLoggingConfigurationsInput"} + if s.NextMarker != nil && len(*s.NextMarker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextMarker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListLoggingConfigurationsInput) SetLimit(v int64) *ListLoggingConfigurationsInput { + s.Limit = &v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListLoggingConfigurationsInput) SetNextMarker(v string) *ListLoggingConfigurationsInput { + s.NextMarker = &v + return s +} + +type ListLoggingConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // An array of LoggingConfiguration objects. + LoggingConfigurations []*LoggingConfiguration `type:"list"` + + // If you have more LoggingConfigurations than the number that you specified + // for Limit in the request, the response includes a NextMarker value. To list + // more LoggingConfigurations, submit another ListLoggingConfigurations request, + // and specify the NextMarker value from the response in the NextMarker value + // in the next request. + NextMarker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListLoggingConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLoggingConfigurationsOutput) GoString() string { + return s.String() +} + +// SetLoggingConfigurations sets the LoggingConfigurations field's value. +func (s *ListLoggingConfigurationsOutput) SetLoggingConfigurations(v []*LoggingConfiguration) *ListLoggingConfigurationsOutput { + s.LoggingConfigurations = v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListLoggingConfigurationsOutput) SetNextMarker(v string) *ListLoggingConfigurationsOutput { + s.NextMarker = &v + return s +} + type ListRateBasedRulesInput struct { _ struct{} `type:"structure"` @@ -14538,6 +15148,88 @@ func (s *ListXssMatchSetsOutput) SetXssMatchSets(v []*XssMatchSetSummary) *ListX return s } +// The Amazon Kinesis Data Firehose delivery streams, RedactedFields information, +// and the web ACL Amazon Resource Name (ARN). +type LoggingConfiguration struct { + _ struct{} `type:"structure"` + + // An array of Amazon Kinesis Data Firehose delivery stream ARNs. + // + // LogDestinationConfigs is a required field + LogDestinationConfigs []*string `min:"1" type:"list" required:"true"` + + // The parts of the request that you want redacted from the logs. For example, + // if you redact the cookie field, the cookie field in the delivery stream will + // be xxx. + RedactedFields []*FieldToMatch `type:"list"` + + // The Amazon Resource Name (ARN) of the web ACL that you want to associate + // with LogDestinationConfigs. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s LoggingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoggingConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoggingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoggingConfiguration"} + if s.LogDestinationConfigs == nil { + invalidParams.Add(request.NewErrParamRequired("LogDestinationConfigs")) + } + if s.LogDestinationConfigs != nil && len(s.LogDestinationConfigs) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogDestinationConfigs", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.RedactedFields != nil { + for i, v := range s.RedactedFields { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RedactedFields", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogDestinationConfigs sets the LogDestinationConfigs field's value. +func (s *LoggingConfiguration) SetLogDestinationConfigs(v []*string) *LoggingConfiguration { + s.LogDestinationConfigs = v + return s +} + +// SetRedactedFields sets the RedactedFields field's value. +func (s *LoggingConfiguration) SetRedactedFields(v []*FieldToMatch) *LoggingConfiguration { + s.RedactedFields = v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *LoggingConfiguration) SetResourceArn(v string) *LoggingConfiguration { + s.ResourceArn = &v + return s +} + // Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, // GeoMatchSet, and SizeConstraintSet objects that you want to add to a Rule // and, for each object, indicates whether you want to negate the settings, @@ -14566,7 +15258,7 @@ type Predicate struct { // Negated is a required field Negated *bool `type:"boolean" required:"true"` - // The type of predicate in a Rule, such as ByteMatchSet or IPSet. + // The type of predicate in a Rule, such as ByteMatch or IPSet. // // Type is a required field Type *string `type:"string" required:"true" enum:"PredicateType"` @@ -14622,6 +15314,74 @@ func (s *Predicate) SetType(v string) *Predicate { return s } +type PutLoggingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Amazon Kinesis Data Firehose delivery streams that contains the inspected + // traffic information, the redacted fields details, and the Amazon Resource + // Name (ARN) of the web ACL to monitor. + // + // LoggingConfiguration is a required field + LoggingConfiguration *LoggingConfiguration `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLoggingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutLoggingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutLoggingConfigurationInput"} + if s.LoggingConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("LoggingConfiguration")) + } + if s.LoggingConfiguration != nil { + if err := s.LoggingConfiguration.Validate(); err != nil { + invalidParams.AddNested("LoggingConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggingConfiguration sets the LoggingConfiguration field's value. +func (s *PutLoggingConfigurationInput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationInput { + s.LoggingConfiguration = v + return s +} + +type PutLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The LoggingConfiguration that you submitted in the request. + LoggingConfiguration *LoggingConfiguration `type:"structure"` +} + +// String returns the string representation +func (s PutLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLoggingConfigurationOutput) GoString() string { + return s.String() +} + +// SetLoggingConfiguration sets the LoggingConfiguration field's value. +func (s *PutLoggingConfigurationOutput) SetLoggingConfiguration(v *LoggingConfiguration) *PutLoggingConfigurationOutput { + s.LoggingConfiguration = v + return s +} + type PutPermissionPolicyInput struct { _ struct{} `type:"structure"` @@ -15010,6 +15770,8 @@ type RegexMatchTuple struct { // AWS WAF performs the transformation on RegexPatternSet before inspecting // a request for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // // When you're concerned that attackers are injecting an operating system commandline @@ -15763,6 +16525,8 @@ type SizeConstraint struct { // AWS WAF performs the transformation on FieldToMatch before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // Note that if you choose BODY for the value of Type, you must choose NONE // for TextTransformation because CloudFront forwards only the first 8192 bytes // for inspection. @@ -16240,11 +17004,13 @@ type SqlInjectionMatchTuple struct { // AWS WAF performs the transformation on FieldToMatch before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // - // When you're concerned that attackers are injecting an operating system commandline - // command and using unusual formatting to disguise some or all of the command, - // use this option to perform the following transformations: + // When you're concerned that attackers are injecting an operating system command + // line command and using unusual formatting to disguise some or all of the + // command, use this option to perform the following transformations: // // * Delete the following characters: \ " ' ^ // @@ -16732,6 +17498,8 @@ type UpdateIPSetInput struct { // // * IPSetDescriptor: Contains Type and Value // + // You can insert a maximum of 1000 addresses in a single request. + // // Updates is a required field Updates []*IPSetUpdate `min:"1" type:"list" required:"true"` } @@ -18363,11 +19131,13 @@ type XssMatchTuple struct { // AWS WAF performs the transformation on FieldToMatch before inspecting a request // for a match. // + // You can only specify a single type of TextTransformation. + // // CMD_LINE // - // When you're concerned that attackers are injecting an operating system commandline - // command and using unusual formatting to disguise some or all of the command, - // use this option to perform the following transformations: + // When you're concerned that attackers are injecting an operating system command + // line command and using unusual formatting to disguise some or all of the + // command, use this option to perform the following transformations: // // * Delete the following characters: \ " ' ^ // @@ -19292,6 +20062,12 @@ const ( // MatchFieldTypeBody is a MatchFieldType enum value MatchFieldTypeBody = "BODY" + + // MatchFieldTypeSingleQueryArg is a MatchFieldType enum value + MatchFieldTypeSingleQueryArg = "SINGLE_QUERY_ARG" + + // MatchFieldTypeAllQueryArgs is a MatchFieldType enum value + MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go index 97850b5df1e..02c9752b0bc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go @@ -41,9 +41,6 @@ const ( // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // - // * You tried to add an IP address to an IPSet, but the IP address already - // exists in the specified IPSet. - // // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. ErrCodeInvalidOperationException = "WAFInvalidOperationException" @@ -93,8 +90,9 @@ const ( // // * Effect must specify Allow. // - // * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. - // Any extra or wildcard actions in the policy will be rejected. + // * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, + // waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard + // actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go index cd5c09e23a5..470cefe4995 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go @@ -2212,6 +2212,93 @@ func (c *WAFRegional) DeleteIPSetWithContext(ctx aws.Context, input *waf.DeleteI return out, req.Send() } +const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" + +// DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLoggingConfigurationRequest method. +// req, resp := client.DeleteLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteLoggingConfiguration +func (c *WAFRegional) DeleteLoggingConfigurationRequest(input *waf.DeleteLoggingConfigurationInput) (req *request.Request, output *waf.DeleteLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.DeleteLoggingConfigurationInput{} + } + + output = &waf.DeleteLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteLoggingConfiguration API operation for AWS WAF Regional. +// +// Permanently deletes the LoggingConfiguration from the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation DeleteLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteLoggingConfiguration +func (c *WAFRegional) DeleteLoggingConfiguration(input *waf.DeleteLoggingConfigurationInput) (*waf.DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + return out, req.Send() +} + +// DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *waf.DeleteLoggingConfigurationInput, opts ...request.Option) (*waf.DeleteLoggingConfigurationOutput, error) { + req, out := c.DeleteLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the @@ -2896,6 +2983,24 @@ func (c *WAFRegional) DeleteRuleGroupRequest(input *waf.DeleteRuleGroupInput) (r // // * You tried to delete an IPSet that references one or more IP addresses. // +// * ErrCodeWAFInvalidOperationException "WAFInvalidOperationException" +// The operation failed because there was nothing to do. For example: +// +// * You tried to remove a Rule from a WebACL, but the Rule isn't in the +// specified WebACL. +// +// * You tried to remove an IP address from an IPSet, but the IP address +// isn't in the specified IPSet. +// +// * You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple +// isn't in the specified WebACL. +// +// * You tried to add a Rule to a WebACL, but the Rule already exists in +// the specified WebACL. +// +// * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple +// already exists in the specified WebACL. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRuleGroup func (c *WAFRegional) DeleteRuleGroup(input *waf.DeleteRuleGroupInput) (*waf.DeleteRuleGroupOutput, error) { req, out := c.DeleteRuleGroupRequest(input) @@ -3987,6 +4092,89 @@ func (c *WAFRegional) GetIPSetWithContext(ctx aws.Context, input *waf.GetIPSetIn return out, req.Send() } +const opGetLoggingConfiguration = "GetLoggingConfiguration" + +// GetLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLoggingConfiguration for more information on using the GetLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLoggingConfigurationRequest method. +// req, resp := client.GetLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetLoggingConfiguration +func (c *WAFRegional) GetLoggingConfigurationRequest(input *waf.GetLoggingConfigurationInput) (req *request.Request, output *waf.GetLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opGetLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.GetLoggingConfigurationInput{} + } + + output = &waf.GetLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLoggingConfiguration API operation for AWS WAF Regional. +// +// Returns the LoggingConfiguration for the specified web ACL. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation GetLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/GetLoggingConfiguration +func (c *WAFRegional) GetLoggingConfiguration(input *waf.GetLoggingConfigurationInput) (*waf.GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + return out, req.Send() +} + +// GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) GetLoggingConfigurationWithContext(ctx aws.Context, input *waf.GetLoggingConfigurationInput, opts ...request.Option) (*waf.GetLoggingConfigurationOutput, error) { + req, out := c.GetLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -5550,6 +5738,118 @@ func (c *WAFRegional) ListIPSetsWithContext(ctx aws.Context, input *waf.ListIPSe return out, req.Send() } +const opListLoggingConfigurations = "ListLoggingConfigurations" + +// ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListLoggingConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLoggingConfigurations for more information on using the ListLoggingConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLoggingConfigurationsRequest method. +// req, resp := client.ListLoggingConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListLoggingConfigurations +func (c *WAFRegional) ListLoggingConfigurationsRequest(input *waf.ListLoggingConfigurationsInput) (req *request.Request, output *waf.ListLoggingConfigurationsOutput) { + op := &request.Operation{ + Name: opListLoggingConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.ListLoggingConfigurationsInput{} + } + + output = &waf.ListLoggingConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLoggingConfigurations API operation for AWS WAF Regional. +// +// Returns an array of LoggingConfiguration objects. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation ListLoggingConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListLoggingConfigurations +func (c *WAFRegional) ListLoggingConfigurations(input *waf.ListLoggingConfigurationsInput) (*waf.ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + return out, req.Send() +} + +// ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListLoggingConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) ListLoggingConfigurationsWithContext(ctx aws.Context, input *waf.ListLoggingConfigurationsInput, opts ...request.Option) (*waf.ListLoggingConfigurationsOutput, error) { + req, out := c.ListLoggingConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the @@ -6472,6 +6772,108 @@ func (c *WAFRegional) ListXssMatchSetsWithContext(ctx aws.Context, input *waf.Li return out, req.Send() } +const opPutLoggingConfiguration = "PutLoggingConfiguration" + +// PutLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfuly. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutLoggingConfiguration for more information on using the PutLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutLoggingConfigurationRequest method. +// req, resp := client.PutLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration +func (c *WAFRegional) PutLoggingConfigurationRequest(input *waf.PutLoggingConfigurationInput) (req *request.Request, output *waf.PutLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opPutLoggingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &waf.PutLoggingConfigurationInput{} + } + + output = &waf.PutLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutLoggingConfiguration API operation for AWS WAF Regional. +// +// Associates a LoggingConfiguration with a specified web ACL. +// +// You can access information about all traffic that AWS WAF inspects using +// the following steps: +// +// Create an Amazon Kinesis Data Firehose delivery stream. For more information, +// see Creating an Amazon Kinesis Data Firehose Delivery Stream (https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html). +// +// Associate that delivery stream to your web ACL using a PutLoggingConfiguration +// request. +// +// When you successfully enable logging using a PutLoggingConfiguration request, +// AWS WAF will create a service linked role with the necessary permissions +// to write logs to the Amazon Kinesis Data Firehose delivery stream. For more +// information, see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) +// in the AWS WAF Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS WAF Regional's +// API operation PutLoggingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeWAFInternalErrorException "WAFInternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" +// The operation failed because the referenced object doesn't exist. +// +// * ErrCodeWAFStaleDataException "WAFStaleDataException" +// The operation failed because you tried to create, update, or delete an object +// by using a change token that has already been used. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration +func (c *WAFRegional) PutLoggingConfiguration(input *waf.PutLoggingConfigurationInput) (*waf.PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + return out, req.Send() +} + +// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WAFRegional) PutLoggingConfigurationWithContext(ctx aws.Context, input *waf.PutLoggingConfigurationInput, opts ...request.Option) (*waf.PutLoggingConfigurationOutput, error) { + req, out := c.PutLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the @@ -6527,8 +6929,9 @@ func (c *WAFRegional) PutPermissionPolicyRequest(input *waf.PutPermissionPolicyI // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL and waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6573,8 +6976,9 @@ func (c *WAFRegional) PutPermissionPolicyRequest(input *waf.PutPermissionPolicyI // // * Effect must specify Allow. // -// * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. -// Any extra or wildcard actions in the policy will be rejected. +// * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, +// waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard +// actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // @@ -6720,9 +7124,6 @@ func (c *WAFRegional) UpdateByteMatchSetRequest(input *waf.UpdateByteMatchSetInp // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -6914,9 +7315,6 @@ func (c *WAFRegional) UpdateGeoMatchSetRequest(input *waf.UpdateGeoMatchSetInput // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7061,9 +7459,10 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 // (for the individual IP address 192.0.2.44). // -// AWS WAF supports /8, /16, /24, and /32 IP address ranges for IPv4, and /24, -// /32, /48, /56, /64 and /128 for IPv6. For more information about CIDR notation, -// see the Wikipedia entry Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// AWS WAF supports IPv4 address ranges: /8 and any range between /16 through +// /32. AWS WAF supports IPv6 address ranges: /16, /24, /32, /48, /56, /64, +// and /128. For more information about CIDR notation, see the Wikipedia entry +// Classless Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). // // IPv6 addresses can be represented using any of the following formats: // @@ -7095,6 +7494,8 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // and/or the IP addresses that you want to delete. If you want to change an // IP address, you delete the existing IP address and add the new one. // +// You can insert a maximum of 1000 addresses in a single request. +// // For more information about how to use the AWS WAF API to allow or block HTTP // requests, see the AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/). // @@ -7133,9 +7534,6 @@ func (c *WAFRegional) UpdateIPSetRequest(input *waf.UpdateIPSetInput) (req *requ // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7341,9 +7739,6 @@ func (c *WAFRegional) UpdateRateBasedRuleRequest(input *waf.UpdateRateBasedRuleI // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7569,9 +7964,6 @@ func (c *WAFRegional) UpdateRegexMatchSetRequest(input *waf.UpdateRegexMatchSetI // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7733,9 +8125,6 @@ func (c *WAFRegional) UpdateRegexPatternSetRequest(input *waf.UpdateRegexPattern // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -7881,9 +8270,6 @@ func (c *WAFRegional) UpdateRuleRequest(input *waf.UpdateRuleInput) (req *reques // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8089,9 +8475,6 @@ func (c *WAFRegional) UpdateRuleGroupRequest(input *waf.UpdateRuleGroupInput) (r // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8211,6 +8594,8 @@ func (c *WAFRegional) UpdateSizeConstraintSetRequest(input *waf.UpdateSizeConstr // of the request body are not supported because the AWS resource forwards // only the first 8192 bytes of your request to AWS WAF. // +// You can only specify a single type of TextTransformation. +// // * A ComparisonOperator used for evaluating the selected part of the request // against the specified Size, such as equals, greater than, less than, and // so on. @@ -8271,9 +8656,6 @@ func (c *WAFRegional) UpdateSizeConstraintSetRequest(input *waf.UpdateSizeConstr // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8413,12 +8795,15 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // object and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for snippets of malicious // SQL code. // +// You can only specify a single type of TextTransformation. +// // You use SqlInjectionMatchSet objects to specify which CloudFront requests // you want to allow, block, or count. For example, if you're receiving requests // that contain snippets of SQL code in the query string and you want to block @@ -8469,9 +8854,6 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8683,9 +9065,6 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -8828,12 +9207,15 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect -// and, if you want AWS WAF to inspect a header, the name of the header. +// and, if you want AWS WAF to inspect a header or custom query parameter, +// the name of the header or parameter. // // * TextTransformation: Which text transformation, if any, to perform on // the web request before inspecting the request for cross-site scripting // attacks. // +// You can only specify a single type of TextTransformation. +// // You use XssMatchSet objects to specify which CloudFront requests you want // to allow, block, or count. For example, if you're receiving requests that // contain cross-site scripting attacks in the request body and you want to @@ -8884,9 +9266,6 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // -// * You tried to add an IP address to an IPSet, but the IP address already -// exists in the specified IPSet. -// // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. // @@ -10046,6 +10425,12 @@ const ( // MatchFieldTypeBody is a MatchFieldType enum value MatchFieldTypeBody = "BODY" + + // MatchFieldTypeSingleQueryArg is a MatchFieldType enum value + MatchFieldTypeSingleQueryArg = "SINGLE_QUERY_ARG" + + // MatchFieldTypeAllQueryArgs is a MatchFieldType enum value + MatchFieldTypeAllQueryArgs = "ALL_QUERY_ARGS" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go index 793dbc2fcae..fed17a99181 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go @@ -41,9 +41,6 @@ const ( // * You tried to add a Rule to a WebACL, but the Rule already exists in // the specified WebACL. // - // * You tried to add an IP address to an IPSet, but the IP address already - // exists in the specified IPSet. - // // * You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple // already exists in the specified WebACL. ErrCodeWAFInvalidOperationException = "WAFInvalidOperationException" @@ -93,8 +90,9 @@ const ( // // * Effect must specify Allow. // - // * The Action in the policy must be waf:UpdateWebACL or waf-regional:UpdateWebACL. - // Any extra or wildcard actions in the policy will be rejected. + // * The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, + // waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard + // actions in the policy will be rejected. // // * The policy cannot include a Resource parameter. // diff --git a/vendor/vendor.json b/vendor/vendor.json index f47ca6f5661..e4a8e464ad4 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -39,1020 +39,1020 @@ "revisionTime": "2017-07-27T15:54:43Z" }, { - "checksumSHA1": "HULJqYLUc6/Qx7ru4PrJwd+MuKQ=", + "checksumSHA1": "qO2na7vGPve58xAwBJziIc+BJb4=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "I87y3G8r14yKZQ5NlkupFUJ5jW0=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "eI5TmiOTCFjEUNvWeceFycs9dRU=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "6DRhqSAN7O45gYfRIpwDeuJE8j8=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "uPkjJo+J10vbEukYYXmf0w7Cn4Q=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "r62WcUmf2YEqmAu1QwytNo8gn+g=", + "checksumSHA1": "gbuyBRQ+CdbJrzAx+nRNMbPvW7k=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "Ia/AZ2fZp7J4lMO6fpkvfLU/HGY=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "zx1mZCdOwgbjBV3jMfb0kyDd//Q=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "Dj9WOMBPbboyUJV4GB99PwPcO4g=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", "path": "github.com/aws/aws-sdk-go/internal/sdkuri", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "ZX5QHZb0PrK4UF45um2kaAEiX+8=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "GQuRJY72iGQrufDqIaB50zG27u0=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "CTsp/h3FbFg9QizH4bH1abLwljg=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "SBBVYdLcocjdPzMWgDuR8vcOfDQ=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "Rpu8KBtHZgvhkwHxUfaky+qW+G4=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "soXVJWQ/xvEB72Mo6FresaQIxLg=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "4xFqSOZkwDKot6FJQQgKjhJFoQw=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "3e/4A/8NqTOSXEtJ6KhYAqqWnuY=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "FjnLIflNek7g0j5NKT3qFkNtdY8=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "K/ynSj/L2OzW+9Zqs2PRe8NzYUc=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "owhfVKeKxjXt4P5KO6PSIjnMLIA=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "3JN52M5wxJMazxQWXB4epL78LNQ=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "P2+Mby00TG2KXcfhiVoNoqIT1Kc=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "kPYTVg109H4HL8CKEf1yQvwKMw4=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "GhANcrglYWrhNSR/NzxNe3jClMk=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "HmZRIixQ6u+zMz2Qt0iTU42WVZU=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "1nPdiFsBAEdm+vd7Kk4+8Lx55jw=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "iFvc4+KfDeQHigAz2+TmogG1Y7M=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "1uyTJ/RTr7c8uL2Kbrp+60PE40M=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "3q2FBK4CEarGbVeLCuuX+g1E3jk=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "o+DFxugR5Cy/Wwlv7GSRRilTW4o=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "bbsROEsQ5BI5F2k8qiArbrpgH94=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "nGSD4idK9hW8o3U4gLGLESYCpwE=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "SfdREjSJPmW+OjKCjwD8m07wT+w=", + "checksumSHA1": "D3p9zRPfvqPBDBVGCCVG2wgYh38=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "ysSU5yhqWT4+deQUYZiI8/1tJ2c=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "GvjVVg5btXuEFEHqyoe19BZogGw=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "vklitYIK0AiOXA0obSTq0c04pc4=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "rL0O6L1zSJ/UQE0kEWUoCOOFDog=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "gkmRw2ZP/uU+V3b9v7CQM0CA0xs=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "o9WTZk66Jlu+0UdO1wmtO3qp8ps=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "/y7nXSnR9OqMoxlIl1hFcCk5kT8=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "TWva9VAs3zgU/FQjJkiUvY3wIXw=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "LfJ0Owy9HyaulKTvDEgCdkChMG8=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "PBdPTvba1Ci9LrAs0VExIAWtdKQ=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "a02+OXxnVBBBeaZpgs8dXUHj8b0=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "xoFqND2spsYdyoui+wKepfGQS8c=", "path": "github.com/aws/aws-sdk-go/service/dlm", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "XRzDF1GFEnm7CWURxz8oirdEty4=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "QutiSGcdlnEisOq+KNZ872PAl7I=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "VD7bAh0n/UgOwRBPe5y38Ow/dHU=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "Q8RuvleYpFO1hlm/eKRbg5wG/nQ=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "NDrEwIZeUSlHgENwBzVdy0KcCCY=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "5QdblYPoDtRsQ8aczXOesIKTDpc=", + "checksumSHA1": "dSndJIyIFwpciskUn2ZmUvIdR+c=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "kvsll2DfqS1hg97xSWMIcMan5as=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "G1BmSThB0eTjq8gSfjA+PnB9zs0=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "O++z0DZj/MzSNWgVfV+SYzTS/fM=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "VFjWDQMsGpFMrNfcc//ABRpo6Ew=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "Gp+QZjtg8PCNVi9X8m2SqtFvMas=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "wIiqI9GFAV2AQ32o2kEYHNyqVig=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "oNOLs79R42Vsj/jYTYtrbyTWxcw=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "3hICqVOs1WmluYMZN9fTMbDQSyM=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "tNVmAgvnURWLWibVCL7vIDYU7UM=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "J1SHh0J6kX8JBD0+TQCFP+1Kij4=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "BB3/VzUU5Rg4KgrezJ17D4kCnwA=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "A1E5569KvbsmoB9/eA0YxBYmjMI=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "HNndTio5+fNOiLr23i+QZpPp8HU=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "ae+jhUirSvN0IXPVU7X7xc+EbFE=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "39yMWxFP9XB+8wWWCZX4vkNWmxU=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "L4/CAGbD5ka9byuE1EC6EDGCIxc=", + "checksumSHA1": "G1GZpCmKREPPgzLOBrvXmiyhbnc=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "q9HZ/0/lBSRKtjHXMegmcRcazPo=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "nUdxsOW9jg+m+sWZYPu7oX9rZo8=", "path": "github.com/aws/aws-sdk-go/service/kinesisanalytics", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "vaMnUnRVDkpHp/e4f3dFX20JblM=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "K4OamITKC7PKo1eHrSl0z8Visg0=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "nMklVJilxMmhlmnnquFJB97isMk=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "tX/3xEkl13DuKNIO0v3qYseEIvI=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "WfsMSOC0DxRApVecptw2244Cc6w=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "PE3129yEUwSvn0rg3P86Pxqnnps=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "CggySAQfK9WXsX37mRI8UqXGkJo=", + "checksumSHA1": "4YkW/odfpvJHVz5p2RCW3cWaHOQ=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "9NU6dJOvKvcgnl/4eUdwy4YD5ss=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "qyIVtaN5mzPq4d7BDj9YpYtifKs=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "1jKxCBvS+zKzq6p2i4BqLXYHm48=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "E3i2/WM1kDE7WBOSRnDsZkwmZwI=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "x3PsW91a7fh+Q466y3WM3fdtnGg=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "YCd2EU1DPiO0QTRZk6G1fLZAyg0=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "e5v4Cc9/0H2ngQNuvVyj2Mt0vi0=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "EvlN1OFs7c7kQEIuvkwE/yTuv8o=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "N/wIyWWN2g8QcyCJQLTDoFxaoLk=", + "checksumSHA1": "1zThqt8de3tv6wOzT/8mKxqJ5kE=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "KlM6azZ5G09MmPg+lzEizW2qaLA=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "DmKatmbYsvm+MoCP01PCdQ6Y6Tk=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "b6/blG8OZ6+RRIX6fuMSCeaqNsk=", + "checksumSHA1": "qB34t8+gQAYbx7kaxDIllgM9MpQ=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "FkBALtXiN4PCzFnl/G2gXFFLV3E=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "Y29bmjwKXcPg0d0WvZNFGdhd4+E=", "path": "github.com/aws/aws-sdk-go/service/serverlessapplicationrepository", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "T8dOJ1jjEBdogUE03oRPRJCOY3k=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "UhJ0RdPXzdMOUEBWREB5Zi9lgmY=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "0vtFXRYnhlCCq8/zPv1O1YWIoSg=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "1rJbvLXRsCzWhTihruRq/i0Zawg=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "ECIZck5xhocpUl8GeUAdeSnCgvg=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "307CISQxMTTnatZ//6/p8obzeGs=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "TeuakooizAybzyMQyTXllUyhfBg=", "path": "github.com/aws/aws-sdk-go/service/storagegateway", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "UhIVLDgQc19wjrPj8pP7Fu2UwWc=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "zSqEhiGtEK6ll3f1Rlf2tuDKQA8=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "H8Pa7irZ9gpuYGJk3uMK59gxGTs=", + "checksumSHA1": "N/w20GqQBU7sVFbshxOA3AWAvDU=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { - "checksumSHA1": "uRMuwxPD/AlpvFpKppgAYzvlC0A=", + "checksumSHA1": "ocF/2t8BOrkUpc62h6kHH0WtfTg=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "oe8l2ibuhzz7fWM3f64cWnHwFy8=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "4324bc9d8865bdb3e6aa86ec7772ca1272d2750e", - "revisionTime": "2018-08-25T00:53:30Z", - "version": "v1.15.21", - "versionExact": "v1.15.21" + "revision": "04abd557eeaab3cfdded45467eea00fc03db9cb9", + "revisionTime": "2018-08-31T22:30:03Z", + "version": "v1.15.26", + "versionExact": "v1.15.26" }, { "checksumSHA1": "yBBHqv7DvZNsZdF00SO8PbEQAKU=", @@ -2136,4 +2136,4 @@ } ], "rootPath": "github.com/terraform-providers/terraform-provider-aws" -} \ No newline at end of file +} From 14a3a280d3e0b61ae24d4f4866aa74bb4dfdb996 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 31 Aug 2018 19:06:04 -0400 Subject: [PATCH 2411/3316] vendor: hashicorp/go-uuid@v1.0.0 Preparation for converting to Go modules. * Updated via: `govendor fetch github.com/hashicorp/go-uuid/...@v1.0.0` --- vendor/github.com/hashicorp/go-uuid/README.md | 4 ++-- vendor/github.com/hashicorp/go-uuid/go.mod | 1 + vendor/github.com/hashicorp/go-uuid/uuid.go | 16 ++++++++++++---- vendor/vendor.json | 9 ++++++--- 4 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-uuid/go.mod diff --git a/vendor/github.com/hashicorp/go-uuid/README.md b/vendor/github.com/hashicorp/go-uuid/README.md index 21fdda4adaf..fbde8b9aef6 100644 --- a/vendor/github.com/hashicorp/go-uuid/README.md +++ b/vendor/github.com/hashicorp/go-uuid/README.md @@ -1,6 +1,6 @@ -# uuid +# uuid [![Build Status](https://travis-ci.org/hashicorp/go-uuid.svg?branch=master)](https://travis-ci.org/hashicorp/go-uuid) -Generates UUID-format strings using purely high quality random bytes. +Generates UUID-format strings using high quality, _purely random_ bytes. It is **not** intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes. Documentation ============= diff --git a/vendor/github.com/hashicorp/go-uuid/go.mod b/vendor/github.com/hashicorp/go-uuid/go.mod new file mode 100644 index 00000000000..dd57f9d21ad --- /dev/null +++ b/vendor/github.com/hashicorp/go-uuid/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/go-uuid diff --git a/vendor/github.com/hashicorp/go-uuid/uuid.go b/vendor/github.com/hashicorp/go-uuid/uuid.go index 322b522c23f..ff9364c4040 100644 --- a/vendor/github.com/hashicorp/go-uuid/uuid.go +++ b/vendor/github.com/hashicorp/go-uuid/uuid.go @@ -6,13 +6,21 @@ import ( "fmt" ) -// GenerateUUID is used to generate a random UUID -func GenerateUUID() (string, error) { - buf := make([]byte, 16) +// GenerateRandomBytes is used to generate random bytes of given size. +func GenerateRandomBytes(size int) ([]byte, error) { + buf := make([]byte, size) if _, err := rand.Read(buf); err != nil { - return "", fmt.Errorf("failed to read random bytes: %v", err) + return nil, fmt.Errorf("failed to read random bytes: %v", err) } + return buf, nil +} +// GenerateUUID is used to generate a random UUID +func GenerateUUID() (string, error) { + buf, err := GenerateRandomBytes(16) + if err != nil { + return "", err + } return FormatUUID(buf) } diff --git a/vendor/vendor.json b/vendor/vendor.json index f47ca6f5661..e46ab8f2142 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1182,9 +1182,12 @@ "revisionTime": "2018-03-26T21:11:50Z" }, { - "checksumSHA1": "85XUnluYJL7F55ptcwdmN8eSOsk=", + "checksumSHA1": "Kjansj6ZDJrWKNS1BJpg+z7OBnI=", "path": "github.com/hashicorp/go-uuid", - "revision": "36289988d83ca270bc07c234c36f364b0dd9c9a7" + "revision": "de160f5c59f693fed329e73e291bb751fe4ea4dc", + "revisionTime": "2018-08-30T03:27:00Z", + "version": "v1.0.0", + "versionExact": "v1.0.0" }, { "checksumSHA1": "r0pj5dMHCghpaQZ3f1BRGoKiSWw=", @@ -2136,4 +2139,4 @@ } ], "rootPath": "github.com/terraform-providers/terraform-provider-aws" -} \ No newline at end of file +} From 185bccbba1c4d491a9aef18ba580a22e402a6513 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 31 Aug 2018 19:11:22 -0400 Subject: [PATCH 2412/3316] vendor: hashicorp/go-cleanhttp@v0.5.0 Preparation for migrating to Go modules. Notable change: `net.Dailer` has `DualStack` enabled. Documentation: https://golang.org/pkg/net/#Dialer ``` // DualStack enables RFC 6555-compliant "Happy Eyeballs" // dialing when the network is "tcp" and the host in the // address parameter resolves to both IPv4 and IPv6 addresses. // This allows a client to tolerate networks where one address // family is silently broken. DualStack bool ``` * Updated via `govendor fetch github.com/hashicorp/go-cleanhttp/...@v0.5.0` --- .../hashicorp/go-cleanhttp/cleanhttp.go | 1 + .../github.com/hashicorp/go-cleanhttp/go.mod | 1 + .../hashicorp/go-cleanhttp/handlers.go | 43 +++++++++++++++++++ vendor/vendor.json | 10 +++-- 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 vendor/github.com/hashicorp/go-cleanhttp/go.mod create mode 100644 vendor/github.com/hashicorp/go-cleanhttp/handlers.go diff --git a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go b/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go index 7d8a57c2807..8d306bf5134 100644 --- a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go +++ b/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go @@ -26,6 +26,7 @@ func DefaultPooledTransport() *http.Transport { DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, + DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, diff --git a/vendor/github.com/hashicorp/go-cleanhttp/go.mod b/vendor/github.com/hashicorp/go-cleanhttp/go.mod new file mode 100644 index 00000000000..310f07569fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-cleanhttp/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/go-cleanhttp diff --git a/vendor/github.com/hashicorp/go-cleanhttp/handlers.go b/vendor/github.com/hashicorp/go-cleanhttp/handlers.go new file mode 100644 index 00000000000..7eda3777f3c --- /dev/null +++ b/vendor/github.com/hashicorp/go-cleanhttp/handlers.go @@ -0,0 +1,43 @@ +package cleanhttp + +import ( + "net/http" + "strings" + "unicode" +) + +// HandlerInput provides input options to cleanhttp's handlers +type HandlerInput struct { + ErrStatus int +} + +// PrintablePathCheckHandler is a middleware that ensures the request path +// contains only printable runes. +func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler { + // Nil-check on input to make it optional + if input == nil { + input = &HandlerInput{ + ErrStatus: http.StatusBadRequest, + } + } + + // Default to http.StatusBadRequest on error + if input.ErrStatus == 0 { + input.ErrStatus = http.StatusBadRequest + } + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Check URL path for non-printable characters + idx := strings.IndexFunc(r.URL.Path, func(c rune) bool { + return !unicode.IsPrint(c) + }) + + if idx != -1 { + w.WriteHeader(input.ErrStatus) + return + } + + next.ServeHTTP(w, r) + return + }) +} diff --git a/vendor/vendor.json b/vendor/vendor.json index f47ca6f5661..2eb40a1e60e 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1140,10 +1140,12 @@ "revision": "7554cd9344cec97297fa6649b055a8c98c2a1e55" }, { - "checksumSHA1": "b8F628srIitj5p7Y130xc9k0QWs=", + "checksumSHA1": "Ihile6rE76J6SivxECovHgMROxw=", "path": "github.com/hashicorp/go-cleanhttp", - "revision": "3573b8b52aa7b37b9358d966a898feb387f62437", - "revisionTime": "2017-02-11T01:34:15Z" + "revision": "e8ab9daed8d1ddd2d3c4efba338fe2eeae2e4f18", + "revisionTime": "2018-08-30T03:37:06Z", + "version": "v0.5.0", + "versionExact": "v0.5.0" }, { "checksumSHA1": "fvjFEz5PBN1m9ALWf9UuLgTFWLg=", @@ -2136,4 +2138,4 @@ } ], "rootPath": "github.com/terraform-providers/terraform-provider-aws" -} \ No newline at end of file +} From a1444f2b6402623dcbe2737bcc5785e7900ad008 Mon Sep 17 00:00:00 2001 From: Miguel David Date: Sun, 2 Sep 2018 20:13:50 +0100 Subject: [PATCH 2413/3316] Add example of credit specification block syntax --- website/docs/r/instance.html.markdown | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index 4410345445b..80b17882427 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -226,11 +226,14 @@ resource "aws_network_interface" "foo" { } resource "aws_instance" "foo" { - ami = "ami-22b9a343" # us-west-2 - instance_type = "t2.micro" - network_interface { - network_interface_id = "${aws_network_interface.foo.id}" - device_index = 0 + ami = "ami-22b9a343" # us-west-2 + instance_type = "t2.micro" + network_interface { + network_interface_id = "${aws_network_interface.foo.id}" + device_index = 0 + } + credit_specification { + cpu_credits = "unlimited" } } ``` From a19b569428c0262f0fedeade8b2f1ea60d7d648e Mon Sep 17 00:00:00 2001 From: Victor Turbinsky Date: Sun, 2 Sep 2018 22:42:07 +0100 Subject: [PATCH 2414/3316] Fix: Added ForceNew for aws_redshift_cluster on availability_zone change --- aws/resource_aws_redshift_cluster.go | 1 + aws/resource_aws_redshift_cluster_test.go | 57 +++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index 9f6c99ee3cf..54123514d8b 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -90,6 +90,7 @@ func resourceAwsRedshiftCluster() *schema.Resource { "availability_zone": { Type: schema.TypeString, Optional: true, + ForceNew: true, Computed: true, }, diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index 3865e8e5f4a..9fc2b1e72f9 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -504,6 +504,39 @@ func TestAccAWSRedshiftCluster_forceNewUsername(t *testing.T) { }) } +func TestAccAWSRedshiftCluster_changeAvailabilityZone(t *testing.T) { + var first, second redshift.Cluster + + ri := acctest.RandInt() + preConfig := testAccAWSRedshiftClusterConfig_basic(ri) + postConfig := testAccAWSRedshiftClusterConfig_updatedAvailabilityZone(ri) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, + Steps: []resource.TestStep{ + { + Config: preConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &first), + testAccCheckAWSRedshiftClusterAvailabilityZone(&first, "us-west-2a"), + resource.TestCheckResourceAttr("aws_redshift_cluster.default", "availability_zone", "us-west-2a"), + ), + }, + + { + Config: postConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &second), + testAccCheckAWSRedshiftClusterAvailabilityZone(&second, "us-west-2b"), + resource.TestCheckResourceAttr("aws_redshift_cluster.default", "availability_zone", "us-west-2b"), + ), + }, + }, + }) +} + func testAccCheckAWSRedshiftClusterDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_redshift_cluster" { @@ -629,6 +662,15 @@ func testAccCheckAWSRedshiftClusterMasterUsername(c *redshift.Cluster, value str } } +func testAccCheckAWSRedshiftClusterAvailabilityZone(c *redshift.Cluster, value string) resource.TestCheckFunc { + return func(s *terraform.State) error { + if *c.AvailabilityZone != value { + return fmt.Errorf("Expected cluster's AvailabilityZone: %q, given: %q", value, *c.AvailabilityZone) + } + return nil + } +} + func TestResourceAWSRedshiftClusterIdentifierValidation(t *testing.T) { cases := []struct { Value string @@ -1304,3 +1346,18 @@ resource "aws_redshift_cluster" "default" { skip_final_snapshot = true }`, rInt) } + +func testAccAWSRedshiftClusterConfig_updatedAvailabilityZone(rInt int) string { + return fmt.Sprintf(` + resource "aws_redshift_cluster" "default" { + cluster_identifier = "tf-redshift-cluster-%d" + availability_zone = "us-west-2b" + database_name = "mydb" + master_username = "foo_test" + master_password = "Mustbe8characters" + node_type = "dc1.large" + automated_snapshot_retention_period = 0 + allow_version_upgrade = false + skip_final_snapshot = true + }`, rInt) +} From 73c6d10b46e20179efe67003792bba1dddf52537 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 3 Sep 2018 12:47:02 +0400 Subject: [PATCH 2415/3316] fix the gofmt issues --- ...a_source_aws_cloudformation_export_test.go | 2 +- aws/opsworks_layers.go | 24 +++++++-------- ...source_aws_acmpca_certificate_authority.go | 6 ++-- aws/resource_aws_api_gateway_integration.go | 30 +++++++++---------- ...e_aws_cloudfront_origin_access_identity.go | 4 +-- ...ce_aws_codedeploy_deployment_group_test.go | 8 ++--- aws/resource_aws_db_instance.go | 2 +- aws/resource_aws_db_security_group.go | 2 +- aws/resource_aws_dms_replication_instance.go | 2 +- ...sticache_replication_group_migrate_test.go | 2 +- ...resource_aws_emr_security_configuration.go | 2 +- aws/resource_aws_gamelift_fleet.go | 10 +++---- aws/resource_aws_instance.go | 12 ++++---- aws/resource_aws_instance_migrate_test.go | 8 ++--- ...ce_aws_kinesis_firehose_delivery_stream.go | 10 +++---- aws/resource_aws_neptune_cluster_instance.go | 2 +- ...rce_aws_neptune_cluster_parameter_group.go | 2 +- aws/resource_aws_rds_cluster_instance.go | 2 +- ...esource_aws_rds_cluster_parameter_group.go | 2 +- aws/resource_aws_redshift_cluster.go | 2 +- aws/resource_aws_route53_record.go | 4 +-- aws/resource_aws_s3_bucket.go | 4 +-- aws/resource_aws_s3_bucket_inventory.go | 4 +-- aws/resource_aws_s3_bucket_notification.go | 4 +-- ...esource_aws_security_group_migrate_test.go | 2 +- ..._service_discovery_service_migrate_test.go | 4 +-- aws/resource_aws_sns_topic.go | 8 ++--- aws/resource_aws_spot_fleet_request.go | 2 +- aws/resource_aws_spot_instance_request.go | 4 +-- aws/resource_aws_ssm_maintenance_window.go | 8 ++--- aws/resource_aws_ssm_patch_baseline.go | 2 +- aws/resource_aws_swf_domain.go | 2 +- aws/resource_aws_vpc.go | 2 +- aws/validators_test.go | 16 +++++----- 34 files changed, 100 insertions(+), 100 deletions(-) diff --git a/aws/data_source_aws_cloudformation_export_test.go b/aws/data_source_aws_cloudformation_export_test.go index 1ca42d7bc43..e76f91e20b0 100644 --- a/aws/data_source_aws_cloudformation_export_test.go +++ b/aws/data_source_aws_cloudformation_export_test.go @@ -17,7 +17,7 @@ func TestAccAWSCloudformationExportDataSource_basic(t *testing.T) { Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: testAccCheckAwsCloudformationExportConfig(rName), + Config: testAccCheckAwsCloudformationExportConfig(rName), PreventPostDestroyRefresh: true, Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("data.aws_cloudformation_export.waiter", "value", "waiter"), diff --git a/aws/opsworks_layers.go b/aws/opsworks_layers.go index d33eab61ca2..83e0b2d0284 100644 --- a/aws/opsworks_layers.go +++ b/aws/opsworks_layers.go @@ -345,13 +345,13 @@ func (lt *opsworksLayerType) Create(d *schema.ResourceData, client *opsworks.Ops EnableAutoHealing: aws.Bool(d.Get("auto_healing").(bool)), InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), LifecycleEventConfiguration: lt.LifecycleEventConfiguration(d), - Name: aws.String(d.Get("name").(string)), - Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), - Type: aws.String(lt.TypeName), - StackId: aws.String(d.Get("stack_id").(string)), - UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), - VolumeConfigurations: lt.VolumeConfigurations(d), + Name: aws.String(d.Get("name").(string)), + Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), + Type: aws.String(lt.TypeName), + StackId: aws.String(d.Get("stack_id").(string)), + UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), + Attributes: lt.AttributeMap(d), + VolumeConfigurations: lt.VolumeConfigurations(d), } if lt.CustomShortName { @@ -399,11 +399,11 @@ func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.Ops EnableAutoHealing: aws.Bool(d.Get("auto_healing").(bool)), InstallUpdatesOnBoot: aws.Bool(d.Get("install_updates_on_boot").(bool)), LifecycleEventConfiguration: lt.LifecycleEventConfiguration(d), - Name: aws.String(d.Get("name").(string)), - Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), - UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), - Attributes: lt.AttributeMap(d), - VolumeConfigurations: lt.VolumeConfigurations(d), + Name: aws.String(d.Get("name").(string)), + Packages: expandStringSet(d.Get("system_packages").(*schema.Set)), + UseEbsOptimizedInstances: aws.Bool(d.Get("use_ebs_optimized_instances").(bool)), + Attributes: lt.AttributeMap(d), + VolumeConfigurations: lt.VolumeConfigurations(d), } if lt.CustomShortName { diff --git a/aws/resource_aws_acmpca_certificate_authority.go b/aws/resource_aws_acmpca_certificate_authority.go index 81bc3479f41..e8158743c68 100644 --- a/aws/resource_aws_acmpca_certificate_authority.go +++ b/aws/resource_aws_acmpca_certificate_authority.go @@ -284,7 +284,7 @@ func resourceAwsAcmpcaCertificateAuthorityCreate(d *schema.ResourceData, meta in if v, ok := d.GetOk("tags"); ok { input := &acmpca.TagCertificateAuthorityInput{ CertificateAuthorityArn: aws.String(d.Id()), - Tags: tagsFromMapACMPCA(v.(map[string]interface{})), + Tags: tagsFromMapACMPCA(v.(map[string]interface{})), } log.Printf("[DEBUG] Tagging ACMPCA Certificate Authority: %s", input) @@ -458,7 +458,7 @@ func resourceAwsAcmpcaCertificateAuthorityUpdate(d *schema.ResourceData, meta in log.Printf("[DEBUG] Removing ACMPCA Certificate Authority %q tags: %#v", d.Id(), remove) _, err := conn.UntagCertificateAuthority(&acmpca.UntagCertificateAuthorityInput{ CertificateAuthorityArn: aws.String(d.Id()), - Tags: remove, + Tags: remove, }) if err != nil { return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) @@ -468,7 +468,7 @@ func resourceAwsAcmpcaCertificateAuthorityUpdate(d *schema.ResourceData, meta in log.Printf("[DEBUG] Creating ACMPCA Certificate Authority %q tags: %#v", d.Id(), create) _, err := conn.TagCertificateAuthority(&acmpca.TagCertificateAuthorityInput{ CertificateAuthorityArn: aws.String(d.Id()), - Tags: create, + Tags: create, }) if err != nil { return fmt.Errorf("error updating ACMPCA Certificate Authority %q tags: %s", d.Id(), err) diff --git a/aws/resource_aws_api_gateway_integration.go b/aws/resource_aws_api_gateway_integration.go index 755bcb54c09..259d5d69136 100644 --- a/aws/resource_aws_api_gateway_integration.go +++ b/aws/resource_aws_api_gateway_integration.go @@ -243,22 +243,22 @@ func resourceAwsApiGatewayIntegrationCreate(d *schema.ResourceData, meta interfa } _, err := conn.PutIntegration(&apigateway.PutIntegrationInput{ - HttpMethod: aws.String(d.Get("http_method").(string)), - ResourceId: aws.String(d.Get("resource_id").(string)), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - Type: aws.String(d.Get("type").(string)), + HttpMethod: aws.String(d.Get("http_method").(string)), + ResourceId: aws.String(d.Get("resource_id").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), + Type: aws.String(d.Get("type").(string)), IntegrationHttpMethod: integrationHttpMethod, - Uri: uri, - RequestParameters: aws.StringMap(parameters), - RequestTemplates: aws.StringMap(templates), - Credentials: credentials, - CacheNamespace: cacheNamespace, - CacheKeyParameters: cacheKeyParameters, - PassthroughBehavior: passthroughBehavior, - ContentHandling: contentHandling, - ConnectionType: connectionType, - ConnectionId: connectionId, - TimeoutInMillis: timeoutInMillis, + Uri: uri, + RequestParameters: aws.StringMap(parameters), + RequestTemplates: aws.StringMap(templates), + Credentials: credentials, + CacheNamespace: cacheNamespace, + CacheKeyParameters: cacheKeyParameters, + PassthroughBehavior: passthroughBehavior, + ContentHandling: contentHandling, + ConnectionType: connectionType, + ConnectionId: connectionId, + TimeoutInMillis: timeoutInMillis, }) if err != nil { return fmt.Errorf("Error creating API Gateway Integration: %s", err) diff --git a/aws/resource_aws_cloudfront_origin_access_identity.go b/aws/resource_aws_cloudfront_origin_access_identity.go index 00f6b65877b..b82296763a9 100644 --- a/aws/resource_aws_cloudfront_origin_access_identity.go +++ b/aws/resource_aws_cloudfront_origin_access_identity.go @@ -95,9 +95,9 @@ func resourceAwsCloudFrontOriginAccessIdentityRead(d *schema.ResourceData, meta func resourceAwsCloudFrontOriginAccessIdentityUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudfrontconn params := &cloudfront.UpdateCloudFrontOriginAccessIdentityInput{ - Id: aws.String(d.Id()), + Id: aws.String(d.Id()), CloudFrontOriginAccessIdentityConfig: expandOriginAccessIdentityConfig(d), - IfMatch: aws.String(d.Get("etag").(string)), + IfMatch: aws.String(d.Get("etag").(string)), } _, err := conn.UpdateCloudFrontOriginAccessIdentity(params) if err != nil { diff --git a/aws/resource_aws_codedeploy_deployment_group_test.go b/aws/resource_aws_codedeploy_deployment_group_test.go index 1ab89775d09..9f107231c5e 100644 --- a/aws/resource_aws_codedeploy_deployment_group_test.go +++ b/aws/resource_aws_codedeploy_deployment_group_test.go @@ -1568,7 +1568,7 @@ func TestAWSCodeDeployDeploymentGroup_expandBlueGreenDeploymentConfig(t *testing "terminate_blue_instances_on_deployment_success": []interface{}{ map[string]interface{}{ - "action": "TERMINATE", + "action": "TERMINATE", "termination_wait_time_in_minutes": 90, }, }, @@ -1586,7 +1586,7 @@ func TestAWSCodeDeployDeploymentGroup_expandBlueGreenDeploymentConfig(t *testing }, TerminateBlueInstancesOnDeploymentSuccess: &codedeploy.BlueInstanceTerminationOption{ - Action: aws.String("TERMINATE"), + Action: aws.String("TERMINATE"), TerminationWaitTimeInMinutes: aws.Int64(90), }, } @@ -1611,7 +1611,7 @@ func TestAWSCodeDeployDeploymentGroup_flattenBlueGreenDeploymentConfig(t *testin }, TerminateBlueInstancesOnDeploymentSuccess: &codedeploy.BlueInstanceTerminationOption{ - Action: aws.String("KEEP_ALIVE"), + Action: aws.String("KEEP_ALIVE"), TerminationWaitTimeInMinutes: aws.Int64(90), }, } @@ -1632,7 +1632,7 @@ func TestAWSCodeDeployDeploymentGroup_flattenBlueGreenDeploymentConfig(t *testin "terminate_blue_instances_on_deployment_success": []map[string]interface{}{ { - "action": "KEEP_ALIVE", + "action": "KEEP_ALIVE", "termination_wait_time_in_minutes": 90, }, }, diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index 8e44d8703c3..9100d9518dd 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -460,7 +460,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error DBInstanceIdentifier: aws.String(identifier), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), SourceDBInstanceIdentifier: aws.String(v.(string)), - Tags: tags, + Tags: tags, } if attr, ok := d.GetOk("allocated_storage"); ok { diff --git a/aws/resource_aws_db_security_group.go b/aws/resource_aws_db_security_group.go index f3bd2617c2f..04d4ef1f9f8 100644 --- a/aws/resource_aws_db_security_group.go +++ b/aws/resource_aws_db_security_group.go @@ -91,7 +91,7 @@ func resourceAwsDbSecurityGroupCreate(d *schema.ResourceData, meta interface{}) opts := rds.CreateDBSecurityGroupInput{ DBSecurityGroupName: aws.String(d.Get("name").(string)), DBSecurityGroupDescription: aws.String(d.Get("description").(string)), - Tags: tags, + Tags: tags, } log.Printf("[DEBUG] DB Security Group create configuration: %#v", opts) diff --git a/aws/resource_aws_dms_replication_instance.go b/aws/resource_aws_dms_replication_instance.go index df12efb91d6..282451a7b0e 100644 --- a/aws/resource_aws_dms_replication_instance.go +++ b/aws/resource_aws_dms_replication_instance.go @@ -136,7 +136,7 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), ReplicationInstanceClass: aws.String(d.Get("replication_instance_class").(string)), ReplicationInstanceIdentifier: aws.String(d.Get("replication_instance_id").(string)), - Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), + Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), } // WARNING: GetOk returns the zero value for the type if the key is omitted in config. This means for optional diff --git a/aws/resource_aws_elasticache_replication_group_migrate_test.go b/aws/resource_aws_elasticache_replication_group_migrate_test.go index 1379d539a47..c014f7e6d68 100644 --- a/aws/resource_aws_elasticache_replication_group_migrate_test.go +++ b/aws/resource_aws_elasticache_replication_group_migrate_test.go @@ -16,7 +16,7 @@ func TestAwsElasticacheReplicationGroupMigrateState(t *testing.T) { "v0Tov1": { StateVersion: 0, Attributes: map[string]string{ - "cluster_mode.#": "1", + "cluster_mode.#": "1", "cluster_mode.4170186206.num_node_groups": "2", "cluster_mode.4170186206.replicas_per_node_group": "1", }, diff --git a/aws/resource_aws_emr_security_configuration.go b/aws/resource_aws_emr_security_configuration.go index 45beffc6d1a..ff25619a361 100644 --- a/aws/resource_aws_emr_security_configuration.go +++ b/aws/resource_aws_emr_security_configuration.go @@ -65,7 +65,7 @@ func resourceAwsEmrSecurityConfigurationCreate(d *schema.ResourceData, meta inte } resp, err := conn.CreateSecurityConfiguration(&emr.CreateSecurityConfigurationInput{ - Name: aws.String(emrSCName), + Name: aws.String(emrSCName), SecurityConfiguration: aws.String(d.Get("configuration").(string)), }) diff --git a/aws/resource_aws_gamelift_fleet.go b/aws/resource_aws_gamelift_fleet.go index be1a328daab..815b899d716 100644 --- a/aws/resource_aws_gamelift_fleet.go +++ b/aws/resource_aws_gamelift_fleet.go @@ -301,10 +301,10 @@ func resourceAwsGameliftFleetUpdate(d *schema.ResourceData, meta interface{}) er if d.HasChange("description") || d.HasChange("metric_groups") || d.HasChange("name") || d.HasChange("new_game_session_protection_policy") || d.HasChange("resource_creation_limit_policy") { _, err := conn.UpdateFleetAttributes(&gamelift.UpdateFleetAttributesInput{ - Description: aws.String(d.Get("description").(string)), - FleetId: aws.String(d.Id()), - MetricGroups: expandStringList(d.Get("metric_groups").([]interface{})), - Name: aws.String(d.Get("name").(string)), + Description: aws.String(d.Get("description").(string)), + FleetId: aws.String(d.Id()), + MetricGroups: expandStringList(d.Get("metric_groups").([]interface{})), + Name: aws.String(d.Get("name").(string)), NewGameSessionProtectionPolicy: aws.String(d.Get("new_game_session_protection_policy").(string)), ResourceCreationLimitPolicy: expandGameliftResourceCreationLimitPolicy(d.Get("resource_creation_limit_policy").([]interface{})), }) @@ -318,7 +318,7 @@ func resourceAwsGameliftFleetUpdate(d *schema.ResourceData, meta interface{}) er authorizations, revocations := diffGameliftPortSettings(oldPerms.([]interface{}), newPerms.([]interface{})) _, err := conn.UpdateFleetPortSettings(&gamelift.UpdateFleetPortSettingsInput{ - FleetId: aws.String(d.Id()), + FleetId: aws.String(d.Id()), InboundPermissionAuthorizations: authorizations, InboundPermissionRevocations: revocations, }) diff --git a/aws/resource_aws_instance.go b/aws/resource_aws_instance.go index a51ad8f461c..65637d7a05c 100644 --- a/aws/resource_aws_instance.go +++ b/aws/resource_aws_instance.go @@ -505,12 +505,12 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { // Build the creation struct runOpts := &ec2.RunInstancesInput{ - BlockDeviceMappings: instanceOpts.BlockDeviceMappings, - DisableApiTermination: instanceOpts.DisableAPITermination, - EbsOptimized: instanceOpts.EBSOptimized, - Monitoring: instanceOpts.Monitoring, - IamInstanceProfile: instanceOpts.IAMInstanceProfile, - ImageId: instanceOpts.ImageID, + BlockDeviceMappings: instanceOpts.BlockDeviceMappings, + DisableApiTermination: instanceOpts.DisableAPITermination, + EbsOptimized: instanceOpts.EBSOptimized, + Monitoring: instanceOpts.Monitoring, + IamInstanceProfile: instanceOpts.IAMInstanceProfile, + ImageId: instanceOpts.ImageID, InstanceInitiatedShutdownBehavior: instanceOpts.InstanceInitiatedShutdownBehavior, InstanceType: instanceOpts.InstanceType, Ipv6AddressCount: instanceOpts.Ipv6AddressCount, diff --git a/aws/resource_aws_instance_migrate_test.go b/aws/resource_aws_instance_migrate_test.go index d392943315e..bc591fd092a 100644 --- a/aws/resource_aws_instance_migrate_test.go +++ b/aws/resource_aws_instance_migrate_test.go @@ -17,7 +17,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { StateVersion: 0, Attributes: map[string]string{ // EBS - "block_device.#": "2", + "block_device.#": "2", "block_device.3851383343.delete_on_termination": "true", "block_device.3851383343.device_name": "/dev/sdx", "block_device.3851383343.encrypted": "false", @@ -42,7 +42,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { "block_device.56575650.volume_type": "standard", }, Expected: map[string]string{ - "ebs_block_device.#": "1", + "ebs_block_device.#": "1", "ebs_block_device.3851383343.delete_on_termination": "true", "ebs_block_device.3851383343.device_name": "/dev/sdx", "ebs_block_device.3851383343.encrypted": "false", @@ -64,7 +64,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { StateVersion: 0, Attributes: map[string]string{ // EBS - "block_device.#": "2", + "block_device.#": "2", "block_device.3851383343.delete_on_termination": "true", "block_device.3851383343.device_name": "/dev/sdx", "block_device.3851383343.encrypted": "false", @@ -92,7 +92,7 @@ func TestAWSInstanceMigrateState(t *testing.T) { "root_block_device.3018388612.iops": "1000", }, Expected: map[string]string{ - "ebs_block_device.#": "1", + "ebs_block_device.#": "1", "ebs_block_device.3851383343.delete_on_termination": "true", "ebs_block_device.3851383343.device_name": "/dev/sdx", "ebs_block_device.3851383343.encrypted": "false", diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 74dedf576b2..d570bb62b60 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -228,11 +228,11 @@ func flattenFirehoseExtendedS3Configuration(description *firehose.ExtendedS3Dest "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), "compression_format": aws.StringValue(description.CompressionFormat), "data_format_conversion_configuration": flattenFirehoseDataFormatConversionConfiguration(description.DataFormatConversionConfiguration), - "prefix": aws.StringValue(description.Prefix), - "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), - "role_arn": aws.StringValue(description.RoleARN), - "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), - "s3_backup_mode": aws.StringValue(description.S3BackupMode), + "prefix": aws.StringValue(description.Prefix), + "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), + "role_arn": aws.StringValue(description.RoleARN), + "s3_backup_configuration": flattenFirehoseS3Configuration(description.S3BackupDescription), + "s3_backup_mode": aws.StringValue(description.S3BackupMode), } if description.BufferingHints != nil { diff --git a/aws/resource_aws_neptune_cluster_instance.go b/aws/resource_aws_neptune_cluster_instance.go index 026feeb7346..6cb8ec42a41 100644 --- a/aws/resource_aws_neptune_cluster_instance.go +++ b/aws/resource_aws_neptune_cluster_instance.go @@ -196,7 +196,7 @@ func resourceAwsNeptuneClusterInstanceCreate(d *schema.ResourceData, meta interf PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), PromotionTier: aws.Int64(int64(d.Get("promotion_tier").(int))), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - Tags: tags, + Tags: tags, } if attr, ok := d.GetOk("availability_zone"); ok { diff --git a/aws/resource_aws_neptune_cluster_parameter_group.go b/aws/resource_aws_neptune_cluster_parameter_group.go index a04db20a2d5..7a879889d5c 100644 --- a/aws/resource_aws_neptune_cluster_parameter_group.go +++ b/aws/resource_aws_neptune_cluster_parameter_group.go @@ -154,7 +154,7 @@ func resourceAwsNeptuneClusterParameterGroupRead(d *schema.ResourceData, meta in // Only include user customized parameters as there's hundreds of system/default ones describeParametersOpts := neptune.DescribeDBClusterParametersInput{ DBClusterParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), + Source: aws.String("user"), } describeParametersResp, err := conn.DescribeDBClusterParameters(&describeParametersOpts) diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index 4a65db57786..70ad3d3dafe 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -216,7 +216,7 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), PromotionTier: aws.Int64(int64(d.Get("promotion_tier").(int))), AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), - Tags: tags, + Tags: tags, } if attr, ok := d.GetOk("availability_zone"); ok { diff --git a/aws/resource_aws_rds_cluster_parameter_group.go b/aws/resource_aws_rds_cluster_parameter_group.go index c882de7660a..577a5b6f4b3 100644 --- a/aws/resource_aws_rds_cluster_parameter_group.go +++ b/aws/resource_aws_rds_cluster_parameter_group.go @@ -161,7 +161,7 @@ func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interf // Only include user customized parameters as there's hundreds of system/default ones describeParametersOpts := rds.DescribeDBClusterParametersInput{ DBClusterParameterGroupName: aws.String(d.Id()), - Source: aws.String("user"), + Source: aws.String("user"), } describeParametersResp, err := rdsconn.DescribeDBClusterParameters(&describeParametersOpts) diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index 6cde16cef90..9f6c99ee3cf 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -415,7 +415,7 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) AllowVersionUpgrade: aws.Bool(d.Get("allow_version_upgrade").(bool)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), AutomatedSnapshotRetentionPeriod: aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))), - Tags: tags, + Tags: tags, } if v := d.Get("number_of_nodes").(int); v > 1 { diff --git a/aws/resource_aws_route53_record.go b/aws/resource_aws_route53_record.go index f0f6651065e..92c10adb301 100644 --- a/aws/resource_aws_route53_record.go +++ b/aws/resource_aws_route53_record.go @@ -541,8 +541,8 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro name := normalizeAwsAliasName(*alias.DNSName) d.Set("alias", []interface{}{ map[string]interface{}{ - "zone_id": *alias.HostedZoneId, - "name": name, + "zone_id": *alias.HostedZoneId, + "name": name, "evaluate_target_health": *alias.EvaluateTargetHealth, }, }) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index c935ddb2258..e304cd614ed 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -1700,7 +1700,7 @@ func resourceAwsS3BucketServerSideEncryptionConfigurationUpdate(s3conn *s3.S3, d rc.Rules = rules i := &s3.PutBucketEncryptionInput{ - Bucket: aws.String(bucket), + Bucket: aws.String(bucket), ServerSideEncryptionConfiguration: rc, } log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) @@ -1807,7 +1807,7 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. rc.Rules = rules i := &s3.PutBucketReplicationInput{ - Bucket: aws.String(bucket), + Bucket: aws.String(bucket), ReplicationConfiguration: rc, } log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) diff --git a/aws/resource_aws_s3_bucket_inventory.go b/aws/resource_aws_s3_bucket_inventory.go index 43a0498fb0c..71b8f7eb0d8 100644 --- a/aws/resource_aws_s3_bucket_inventory.go +++ b/aws/resource_aws_s3_bucket_inventory.go @@ -221,8 +221,8 @@ func resourceAwsS3BucketInventoryPut(d *schema.ResourceData, meta interface{}) e } input := &s3.PutBucketInventoryConfigurationInput{ - Bucket: aws.String(bucket), - Id: aws.String(name), + Bucket: aws.String(bucket), + Id: aws.String(name), InventoryConfiguration: inventoryConfiguration, } diff --git a/aws/resource_aws_s3_bucket_notification.go b/aws/resource_aws_s3_bucket_notification.go index ba03a393754..4e313b6e833 100644 --- a/aws/resource_aws_s3_bucket_notification.go +++ b/aws/resource_aws_s3_bucket_notification.go @@ -304,7 +304,7 @@ func resourceAwsS3BucketNotificationPut(d *schema.ResourceData, meta interface{} notificationConfiguration.TopicConfigurations = topicConfigs } i := &s3.PutBucketNotificationConfigurationInput{ - Bucket: aws.String(bucket), + Bucket: aws.String(bucket), NotificationConfiguration: notificationConfiguration, } @@ -336,7 +336,7 @@ func resourceAwsS3BucketNotificationDelete(d *schema.ResourceData, meta interfac s3conn := meta.(*AWSClient).s3conn i := &s3.PutBucketNotificationConfigurationInput{ - Bucket: aws.String(d.Id()), + Bucket: aws.String(d.Id()), NotificationConfiguration: &s3.NotificationConfiguration{}, } diff --git a/aws/resource_aws_security_group_migrate_test.go b/aws/resource_aws_security_group_migrate_test.go index 3b14edb0e5e..e990ef3e1f1 100644 --- a/aws/resource_aws_security_group_migrate_test.go +++ b/aws/resource_aws_security_group_migrate_test.go @@ -19,7 +19,7 @@ func TestAWSSecurityGroupMigrateState(t *testing.T) { "name": "test", }, Expected: map[string]string{ - "name": "test", + "name": "test", "revoke_rules_on_delete": "false", }, }, diff --git a/aws/resource_aws_service_discovery_service_migrate_test.go b/aws/resource_aws_service_discovery_service_migrate_test.go index 8a36485b451..ddd24a8f46b 100644 --- a/aws/resource_aws_service_discovery_service_migrate_test.go +++ b/aws/resource_aws_service_discovery_service_migrate_test.go @@ -24,7 +24,7 @@ func TestAwsServiceDiscoveryServiceMigrateState(t *testing.T) { "dns_config.0.dns_records.#": "1", "dns_config.0.dns_records.0.ttl": "10", "dns_config.0.dns_records.0.type": "A", - "arn": "arn", + "arn": "arn", }, Expected: map[string]string{ "name": "test-name", @@ -34,7 +34,7 @@ func TestAwsServiceDiscoveryServiceMigrateState(t *testing.T) { "dns_config.0.dns_records.#": "1", "dns_config.0.dns_records.0.ttl": "10", "dns_config.0.dns_records.0.type": "A", - "arn": "arn", + "arn": "arn", }, }, } diff --git a/aws/resource_aws_sns_topic.go b/aws/resource_aws_sns_topic.go index 519aa4698f2..be5d2bfcc8e 100644 --- a/aws/resource_aws_sns_topic.go +++ b/aws/resource_aws_sns_topic.go @@ -27,10 +27,10 @@ var SNSAttributeMap = map[string]string{ "lambda_failure_feedback_role_arn": "LambdaFailureFeedbackRoleArn", "lambda_success_feedback_role_arn": "LambdaSuccessFeedbackRoleArn", "lambda_success_feedback_sample_rate": "LambdaSuccessFeedbackSampleRate", - "policy": "Policy", - "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn", - "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", - "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", + "policy": "Policy", + "sqs_failure_feedback_role_arn": "SQSFailureFeedbackRoleArn", + "sqs_success_feedback_role_arn": "SQSSuccessFeedbackRoleArn", + "sqs_success_feedback_sample_rate": "SQSSuccessFeedbackSampleRate", } func resourceAwsSnsTopic() *schema.Resource { diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index d794d09c508..15fcb4c01ed 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -610,7 +610,7 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), - Type: aws.String(d.Get("fleet_type").(string)), + Type: aws.String(d.Get("fleet_type").(string)), } if v, ok := d.GetOk("excess_capacity_termination_policy"); ok { diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index 5a0dbeabc84..5460b0790cc 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -118,8 +118,8 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface } spotOpts := &ec2.RequestSpotInstancesInput{ - SpotPrice: aws.String(d.Get("spot_price").(string)), - Type: aws.String(d.Get("spot_type").(string)), + SpotPrice: aws.String(d.Get("spot_price").(string)), + Type: aws.String(d.Get("spot_type").(string)), InstanceInterruptionBehavior: aws.String(d.Get("instance_interruption_behaviour").(string)), // Though the AWS API supports creating spot instance requests for multiple diff --git a/aws/resource_aws_ssm_maintenance_window.go b/aws/resource_aws_ssm_maintenance_window.go index a7c939cc747..f9d55e8d039 100644 --- a/aws/resource_aws_ssm_maintenance_window.go +++ b/aws/resource_aws_ssm_maintenance_window.go @@ -55,10 +55,10 @@ func resourceAwsSsmMaintenanceWindowCreate(d *schema.ResourceData, meta interfac ssmconn := meta.(*AWSClient).ssmconn params := &ssm.CreateMaintenanceWindowInput{ - Name: aws.String(d.Get("name").(string)), - Schedule: aws.String(d.Get("schedule").(string)), - Duration: aws.Int64(int64(d.Get("duration").(int))), - Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), + Name: aws.String(d.Get("name").(string)), + Schedule: aws.String(d.Get("schedule").(string)), + Duration: aws.Int64(int64(d.Get("duration").(int))), + Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), AllowUnassociatedTargets: aws.Bool(d.Get("allow_unassociated_targets").(bool)), } diff --git a/aws/resource_aws_ssm_patch_baseline.go b/aws/resource_aws_ssm_patch_baseline.go index c271c84ae40..7183190f2a9 100644 --- a/aws/resource_aws_ssm_patch_baseline.go +++ b/aws/resource_aws_ssm_patch_baseline.go @@ -147,7 +147,7 @@ func resourceAwsSsmPatchBaselineCreate(d *schema.ResourceData, meta interface{}) ssmconn := meta.(*AWSClient).ssmconn params := &ssm.CreatePatchBaselineInput{ - Name: aws.String(d.Get("name").(string)), + Name: aws.String(d.Get("name").(string)), ApprovedPatchesComplianceLevel: aws.String(d.Get("approved_patches_compliance_level").(string)), OperatingSystem: aws.String(d.Get("operating_system").(string)), } diff --git a/aws/resource_aws_swf_domain.go b/aws/resource_aws_swf_domain.go index 5e254496611..8668ec108fd 100644 --- a/aws/resource_aws_swf_domain.go +++ b/aws/resource_aws_swf_domain.go @@ -70,7 +70,7 @@ func resourceAwsSwfDomainCreate(d *schema.ResourceData, meta interface{}) error } input := &swf.RegisterDomainInput{ - Name: aws.String(name), + Name: aws.String(name), WorkflowExecutionRetentionPeriodInDays: aws.String(d.Get("workflow_execution_retention_period_in_days").(string)), } diff --git a/aws/resource_aws_vpc.go b/aws/resource_aws_vpc.go index 73a9defe488..f6f0b4dff7c 100644 --- a/aws/resource_aws_vpc.go +++ b/aws/resource_aws_vpc.go @@ -411,7 +411,7 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { if toAssign { modifyOpts := &ec2.AssociateVpcCidrBlockInput{ - VpcId: &vpcid, + VpcId: &vpcid, AmazonProvidedIpv6CidrBlock: aws.Bool(toAssign), } log.Printf("[INFO] Enabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", diff --git a/aws/validators_test.go b/aws/validators_test.go index 3f11fbc8807..6747dc6b71e 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -2340,23 +2340,23 @@ func TestValidateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(t *testin }{ { AmbiguousRoleResolution: nil, - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 1, + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 1, }, { AmbiguousRoleResolution: "foo", - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 0, // 0 as it should be defined, the value isn't validated here + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 0, // 0 as it should be defined, the value isn't validated here }, { AmbiguousRoleResolution: cognitoidentity.AmbiguousRoleResolutionTypeAuthenticatedRole, - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 0, + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 0, }, { AmbiguousRoleResolution: cognitoidentity.AmbiguousRoleResolutionTypeDeny, - Type: cognitoidentity.RoleMappingTypeToken, - ErrCount: 0, + Type: cognitoidentity.RoleMappingTypeToken, + ErrCount: 0, }, } From 2728e9d7828fd75ff07a1d539f8295f7c3fdcf58 Mon Sep 17 00:00:00 2001 From: Guimove Date: Tue, 4 Sep 2018 12:40:55 +0200 Subject: [PATCH 2416/3316] add name and description to SSM Maintenance Window Tasks --- ...esource_aws_ssm_maintenance_window_task.go | 22 +++++++++++++++++++ ...ce_aws_ssm_maintenance_window_task_test.go | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/aws/resource_aws_ssm_maintenance_window_task.go b/aws/resource_aws_ssm_maintenance_window_task.go index 072b5877c80..dc35ea853b9 100644 --- a/aws/resource_aws_ssm_maintenance_window_task.go +++ b/aws/resource_aws_ssm_maintenance_window_task.go @@ -73,6 +73,18 @@ func resourceAwsSsmMaintenanceWindowTask() *schema.Resource { }, }, + "name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "priority": { Type: schema.TypeInt, Optional: true, @@ -191,6 +203,8 @@ func resourceAwsSsmMaintenanceWindowTaskCreate(d *schema.ResourceData, meta inte TaskType: aws.String(d.Get("task_type").(string)), ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), TaskArn: aws.String(d.Get("task_arn").(string)), + Name: aws.String(d.Get("name").(string)), + Description: aws.String(d.Get("description").(string)), Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), } @@ -241,6 +255,14 @@ func resourceAwsSsmMaintenanceWindowTaskRead(d *schema.ResourceData, meta interf d.Set("task_arn", t.TaskArn) d.Set("priority", t.Priority) + if t.Name != nil { + d.Set("name", t.Name) + } + + if t.Description != nil { + d.Set("description", t.Description) + } + if t.LoggingInfo != nil { if err := d.Set("logging_info", flattenAwsSsmMaintenanceWindowLoggingInfo(t.LoggingInfo)); err != nil { return fmt.Errorf("[DEBUG] Error setting logging_info error: %#v", err) diff --git a/aws/resource_aws_ssm_maintenance_window_task_test.go b/aws/resource_aws_ssm_maintenance_window_task_test.go index ecb466953eb..815a1afd320 100644 --- a/aws/resource_aws_ssm_maintenance_window_task_test.go +++ b/aws/resource_aws_ssm_maintenance_window_task_test.go @@ -141,6 +141,8 @@ resource "aws_ssm_maintenance_window_task" "target" { task_type = "RUN_COMMAND" task_arn = "AWS-RunShellScript" priority = 1 + name = "TestMaintenanceWindowTask" + description = "This ressource is for test purpose only" service_role_arn = "${aws_iam_role.ssm_role.arn}" max_concurrency = "2" max_errors = "1" @@ -213,6 +215,8 @@ resource "aws_ssm_maintenance_window_task" "target" { task_type = "RUN_COMMAND" task_arn = "AWS-RunShellScript" priority = 1 + name = "TestMaintenanceWindowTask" + description = "This ressource is for test purpose only" service_role_arn = "${aws_iam_role.ssm_role.arn}" max_concurrency = "2" max_errors = "1" From 661280db60a62c55d71f351c3680c40031318c55 Mon Sep 17 00:00:00 2001 From: Guimove Date: Tue, 4 Sep 2018 15:41:04 +0200 Subject: [PATCH 2417/3316] Add arns as an output to data aws_autoscaling_groups and doc --- aws/data_source_aws_autoscaling_groups.go | 38 ++++++++++++++++--- ...data_source_aws_autoscaling_groups_test.go | 1 + .../docs/d/autoscaling_groups.html.markdown | 1 + 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/aws/data_source_aws_autoscaling_groups.go b/aws/data_source_aws_autoscaling_groups.go index 7bc4dc9c350..92468774746 100644 --- a/aws/data_source_aws_autoscaling_groups.go +++ b/aws/data_source_aws_autoscaling_groups.go @@ -21,6 +21,11 @@ func dataSourceAwsAutoscalingGroups() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "arns": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "filter": { Type: schema.TypeSet, Optional: true, @@ -49,7 +54,8 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} log.Printf("[DEBUG] Reading Autoscaling Groups.") d.SetId(time.Now().UTC().String()) - var raw []string + var rawName []string + var rawArn []string var err error tf := d.Get("filter").(*schema.Set) @@ -59,14 +65,31 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} } err = conn.DescribeTagsPages(input, func(resp *autoscaling.DescribeTagsOutput, lastPage bool) bool { for _, v := range resp.Tags { - raw = append(raw, aws.StringValue(v.ResourceId)) + rawName = append(rawName, aws.StringValue(v.ResourceId)) } return !lastPage }) + + for _, v := range rawName { + input := &autoscaling.DescribeAutoScalingGroupsInput{ + AutoScalingGroupNames: []*string{ + aws.String(v), + }, + } + + err = conn.DescribeAutoScalingGroupsPages(input, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { + for _, group := range resp.AutoScalingGroups { + rawArn = append(rawArn, aws.StringValue(group.AutoScalingGroupARN)) + } + return !lastPage + }) + } + } else { err = conn.DescribeAutoScalingGroupsPages(&autoscaling.DescribeAutoScalingGroupsInput{}, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { for _, group := range resp.AutoScalingGroups { - raw = append(raw, aws.StringValue(group.AutoScalingGroupName)) + rawName = append(rawName, aws.StringValue(group.AutoScalingGroupName)) + rawArn = append(rawArn, aws.StringValue(group.AutoScalingGroupARN)) } return !lastPage }) @@ -75,12 +98,17 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("Error fetching Autoscaling Groups: %s", err) } - sort.Strings(raw) + sort.Strings(rawName) + sort.Strings(rawArn) - if err := d.Set("names", raw); err != nil { + if err := d.Set("names", rawName); err != nil { return fmt.Errorf("[WARN] Error setting Autoscaling Group Names: %s", err) } + if err := d.Set("arns", rawArn); err != nil { + return fmt.Errorf("[WARN] Error setting Autoscaling Group Arns: %s", err) + } + return nil } diff --git a/aws/data_source_aws_autoscaling_groups_test.go b/aws/data_source_aws_autoscaling_groups_test.go index 67a478c59bf..a6f8c0306ca 100644 --- a/aws/data_source_aws_autoscaling_groups_test.go +++ b/aws/data_source_aws_autoscaling_groups_test.go @@ -25,6 +25,7 @@ func TestAccAWSAutoscalingGroups_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAwsAutoscalingGroups("data.aws_autoscaling_groups.group_list"), resource.TestCheckResourceAttr("data.aws_autoscaling_groups.group_list", "names.#", "3"), + resource.TestCheckResourceAttr("data.aws_autoscaling_groups.group_list", "arns.#", "3"), ), }, }, diff --git a/website/docs/d/autoscaling_groups.html.markdown b/website/docs/d/autoscaling_groups.html.markdown index 4112a6bd826..f5b4c49c6eb 100644 --- a/website/docs/d/autoscaling_groups.html.markdown +++ b/website/docs/d/autoscaling_groups.html.markdown @@ -51,3 +51,4 @@ resource "aws_autoscaling_notification" "slack_notifications" { In addition to all arguments above, the following attributes are exported: * `names` - A list of the Autoscaling Groups in the current region. +* `arns` - A list of the Autoscaling Groups Arns in the current region. From f6a9f27cdc90ba361e902137fa2a843566c041ba Mon Sep 17 00:00:00 2001 From: Patrick Rainier Juen Date: Tue, 4 Sep 2018 23:04:08 +0800 Subject: [PATCH 2418/3316] Specify when to use names or IDs in security groups --- website/docs/r/instance.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index 9e67eabbebd..21f1be81c59 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -77,7 +77,7 @@ instances. See [Shutdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/Use * `get_password_data` - (Optional) If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `password_data` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. * `monitoring` - (Optional) If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0) -* `security_groups` - (Optional, EC2-Classic and default VPC only) A list of security group names or IDs to associate with. +* `security_groups` - (Optional, EC2-Classic and default VPC only) A list of security group names (EC2-Classic) or IDs (default VPC) to associate with. -> **NOTE:** If you are creating Instances in a VPC, use `vpc_security_group_ids` instead. From 7d91d000be6adec7dae72f52e5a31f648c806441 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 4 Sep 2018 13:35:12 -0400 Subject: [PATCH 2419/3316] website: Remove Upcoming Events sidebar section Its no longer upcoming. :) Remove the existing event page from the provider as well since it now redirects to its new home: https://www.terraform.io/docs/extend/community/events/2018/summer-gardening.html --- website/aws.erb | 11 ---- .../docs/events/gardening-summer-2018.html.md | 51 ------------------- 2 files changed, 62 deletions(-) delete mode 100644 website/docs/events/gardening-summer-2018.html.md diff --git a/website/aws.erb b/website/aws.erb index c5710e4ddc8..30f400d20b9 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -10,17 +10,6 @@ AWS Provider - > - Upcoming Community Events - - - > Guides diff --git a/website/docs/r/pinpoint_sms_channel.markdown b/website/docs/r/pinpoint_sms_channel.markdown new file mode 100644 index 00000000000..1313988cf75 --- /dev/null +++ b/website/docs/r/pinpoint_sms_channel.markdown @@ -0,0 +1,46 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_sms_channel" +sidebar_current: "docs-aws-resource-pinpoint-sms-channel" +description: |- + Provides a Pinpoint SMS Channel resource. +--- + +# aws_pinpoint_sms_channel + +Provides a Pinpoint SMS Channel resource. + +## Example Usage + +```hcl +resource "aws_pinpoint_sms_channel" "sms" { + application_id = "${aws_pinpoint_app.app.application_id}" +} + +resource "aws_pinpoint_app" "app" {} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `enabled` - (Optional) Whether the channel is enabled or disabled. Defaults to `true`. +* `sender_id` - (Optional) Sender identifier of your messages. +* `short_code` - (Optional) The Short Code registered with the phone provider. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `promotional_messages_per_second` - Promotional messages per second that can be sent. +* `transactional_messages_per_second` - Transactional messages per second that can be sent. + +## Import + +Pinpoint SMS Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_sms_channel.sms application-id +``` From fb29ee6e70956c9861910e5cc9054a7855ace11a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 08:17:22 -0400 Subject: [PATCH 2756/3316] Update CHANGELOG for #6088 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a43fcaeeb22..3ebecd4022d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Data Source:** `aws_launch_template` [GH-6064] * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] +* **New Resource:** `aws_pinpoint_sms_channel` [GH-6088] ENHANCEMENTS: From af56a1f697f16dae026acc123697cd3deaf0dea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Lindstr=C3=B6m?= Date: Mon, 8 Oct 2018 15:14:05 +0200 Subject: [PATCH 2757/3316] Add lb authentication support --- aws/resource_aws_lb_listener.go | 460 +++++++++++++++--- aws/resource_aws_lb_listener_rule.go | 335 ++++++++++++- aws/resource_aws_lb_listener_rule_test.go | 422 ++++++++++++++++ aws/resource_aws_lb_listener_test.go | 357 ++++++++++++++ aws/structure.go | 15 + website/docs/r/lb_listener.html.markdown | 30 ++ website/docs/r/lb_listener_rule.html.markdown | 32 ++ 7 files changed, 1577 insertions(+), 74 deletions(-) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index 928b2a5cb87..5c8aa5949e4 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "regexp" + "strconv" "strings" "time" @@ -71,18 +72,24 @@ func resourceAwsLbListener() *schema.Resource { "default_action": { Type: schema.TypeList, Required: true, - MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ + elbv2.ActionTypeEnumAuthenticateCognito, + elbv2.ActionTypeEnumAuthenticateOidc, elbv2.ActionTypeEnumFixedResponse, elbv2.ActionTypeEnumForward, elbv2.ActionTypeEnumRedirect, }, true), }, + "order": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(1, 50000), + }, "target_group_arn": { Type: schema.TypeString, @@ -177,6 +184,123 @@ func resourceAwsLbListener() *schema.Resource { }, }, }, + + "authenticate_cognito": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-cognito"), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "user_pool_arn": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_client_id": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_domain": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "authenticate_oidc": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-oidc"), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "authorization_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "client_id": { + Type: schema.TypeString, + Required: true, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "issuer": { + Type: schema.TypeString, + Required: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateOidcActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "token_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "user_info_endpoint": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, }, }, @@ -221,56 +345,132 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error } } - if defaultActions := d.Get("default_action").([]interface{}); len(defaultActions) == 1 { - params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) + defaultActions := d.Get("default_action").([]interface{}) + params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) + for i, defaultAction := range defaultActions { + defaultActionMap := defaultAction.(map[string]interface{}) - for i, defaultAction := range defaultActions { - defaultActionMap := defaultAction.(map[string]interface{}) + action := &elbv2.Action{ + Type: aws.String(defaultActionMap["type"].(string)), + } - action := &elbv2.Action{ - Type: aws.String(defaultActionMap["type"].(string)), - } + if order, ok := defaultActionMap["order"]; ok && order != 0 { + action.Order = aws.Int64(int64(order.(int))) + } + if len(defaultActions) != 1 && action.Order == nil { + return errors.New("when using more then one action, you need to specify 'order' for each action") + } - switch defaultActionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) + switch defaultActionMap["type"].(string) { + case "forward": + action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) - case "redirect": - redirectList := defaultActionMap["redirect"].([]interface{}) + case "redirect": + redirectList := defaultActionMap["redirect"].([]interface{}) - if len(redirectList) == 1 { - redirectMap := redirectList[0].(map[string]interface{}) + if len(redirectList) == 1 { + redirectMap := redirectList[0].(map[string]interface{}) - action.RedirectConfig = &elbv2.RedirectActionConfig{ - Host: aws.String(redirectMap["host"].(string)), - Path: aws.String(redirectMap["path"].(string)), - Port: aws.String(redirectMap["port"].(string)), - Protocol: aws.String(redirectMap["protocol"].(string)), - Query: aws.String(redirectMap["query"].(string)), - StatusCode: aws.String(redirectMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") + action.RedirectConfig = &elbv2.RedirectActionConfig{ + Host: aws.String(redirectMap["host"].(string)), + Path: aws.String(redirectMap["path"].(string)), + Port: aws.String(redirectMap["port"].(string)), + Protocol: aws.String(redirectMap["protocol"].(string)), + Query: aws.String(redirectMap["query"].(string)), + StatusCode: aws.String(redirectMap["status_code"].(string)), } + } else { + return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") + } - case "fixed-response": - fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) + case "fixed-response": + fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) - if len(fixedResponseList) == 1 { - fixedResponseMap := fixedResponseList[0].(map[string]interface{}) + if len(fixedResponseList) == 1 { + fixedResponseMap := fixedResponseList[0].(map[string]interface{}) - action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ - ContentType: aws.String(fixedResponseMap["content_type"].(string)), - MessageBody: aws.String(fixedResponseMap["message_body"].(string)), - StatusCode: aws.String(fixedResponseMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") + action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ + ContentType: aws.String(fixedResponseMap["content_type"].(string)), + MessageBody: aws.String(fixedResponseMap["message_body"].(string)), + StatusCode: aws.String(fixedResponseMap["status_code"].(string)), } + } else { + return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } - params.DefaultActions[i] = action + case elbv2.ActionTypeEnumAuthenticateCognito: + authenticateCognitoList := defaultActionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case elbv2.ActionTypeEnumAuthenticateOidc: + authenticateOidcList := defaultActionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } + + params.DefaultActions[i] = action } var resp *elbv2.CreateListenerOutput @@ -332,40 +532,84 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { d.Set("certificate_arn", listener.Certificates[0].CertificateArn) } - defaultActions := make([]map[string]interface{}, 0) - if listener.DefaultActions != nil && len(listener.DefaultActions) > 0 { - for _, defaultAction := range listener.DefaultActions { - defaultActionMap := make(map[string]interface{}) - defaultActionMap["type"] = aws.StringValue(defaultAction.Type) + sortedActions := sortActionsBasedonTypeinTFFile("default_action", listener.DefaultActions, d) + defaultActions := make([]interface{}, len(sortedActions)) + for i, defaultAction := range sortedActions { + defaultActionMap := make(map[string]interface{}) + defaultActionMap["type"] = aws.StringValue(defaultAction.Type) + defaultActionMap["order"] = aws.Int64Value(defaultAction.Order) + + switch aws.StringValue(defaultAction.Type) { + case "forward": + defaultActionMap["target_group_arn"] = aws.StringValue(defaultAction.TargetGroupArn) + + case "redirect": + defaultActionMap["redirect"] = []map[string]interface{}{ + { + "host": aws.StringValue(defaultAction.RedirectConfig.Host), + "path": aws.StringValue(defaultAction.RedirectConfig.Path), + "port": aws.StringValue(defaultAction.RedirectConfig.Port), + "protocol": aws.StringValue(defaultAction.RedirectConfig.Protocol), + "query": aws.StringValue(defaultAction.RedirectConfig.Query), + "status_code": aws.StringValue(defaultAction.RedirectConfig.StatusCode), + }, + } - switch aws.StringValue(defaultAction.Type) { - case "forward": - defaultActionMap["target_group_arn"] = aws.StringValue(defaultAction.TargetGroupArn) + case "fixed-response": + defaultActionMap["fixed_response"] = []map[string]interface{}{ + { + "content_type": aws.StringValue(defaultAction.FixedResponseConfig.ContentType), + "message_body": aws.StringValue(defaultAction.FixedResponseConfig.MessageBody), + "status_code": aws.StringValue(defaultAction.FixedResponseConfig.StatusCode), + }, + } - case "redirect": - defaultActionMap["redirect"] = []map[string]interface{}{ - { - "host": aws.StringValue(defaultAction.RedirectConfig.Host), - "path": aws.StringValue(defaultAction.RedirectConfig.Path), - "port": aws.StringValue(defaultAction.RedirectConfig.Port), - "protocol": aws.StringValue(defaultAction.RedirectConfig.Protocol), - "query": aws.StringValue(defaultAction.RedirectConfig.Query), - "status_code": aws.StringValue(defaultAction.RedirectConfig.StatusCode), - }, - } + case "authenticate-cognito": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range defaultAction.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) + } + defaultActionMap["authenticate_cognito"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "on_unauthenticated_request": aws.StringValue(defaultAction.AuthenticateCognitoConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(defaultAction.AuthenticateCognitoConfig.Scope), + "session_cookie_name": aws.StringValue(defaultAction.AuthenticateCognitoConfig.SessionCookieName), + "session_timeout": aws.Int64Value(defaultAction.AuthenticateCognitoConfig.SessionTimeout), + "user_pool_arn": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolArn), + "user_pool_client_id": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolClientId), + "user_pool_domain": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolDomain), + }, + } - case "fixed-response": - defaultActionMap["fixed_response"] = []map[string]interface{}{ - { - "content_type": aws.StringValue(defaultAction.FixedResponseConfig.ContentType), - "message_body": aws.StringValue(defaultAction.FixedResponseConfig.MessageBody), - "status_code": aws.StringValue(defaultAction.FixedResponseConfig.StatusCode), - }, - } + case "authenticate-oidc": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range defaultAction.AuthenticateOidcConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) } - defaultActions = append(defaultActions, defaultActionMap) + // The LB API currently provides no way to read the ClientSecret + // Instead we passthrough the configuration value into the state + clientSecret := d.Get("default_action." + strconv.Itoa(i) + ".authenticate_oidc.0.client_secret").(string) + + defaultActionMap["authenticate_oidc"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "authorization_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.AuthorizationEndpoint), + "client_id": aws.StringValue(defaultAction.AuthenticateOidcConfig.ClientId), + "client_secret": clientSecret, + "issuer": aws.StringValue(defaultAction.AuthenticateOidcConfig.Issuer), + "on_unauthenticated_request": aws.StringValue(defaultAction.AuthenticateOidcConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(defaultAction.AuthenticateOidcConfig.Scope), + "session_cookie_name": aws.StringValue(defaultAction.AuthenticateOidcConfig.SessionCookieName), + "session_timeout": aws.Int64Value(defaultAction.AuthenticateOidcConfig.SessionTimeout), + "token_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.TokenEndpoint), + "user_info_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.UserInfoEndpoint), + }, + } } + + defaultActions[i] = defaultActionMap } d.Set("default_action", defaultActions) @@ -392,14 +636,23 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error } } - if defaultActions := d.Get("default_action").([]interface{}); len(defaultActions) == 1 { + if d.HasChange("default_action") { + defaultActions := d.Get("default_action").([]interface{}) params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) for i, defaultAction := range defaultActions { defaultActionMap := defaultAction.(map[string]interface{}) - action := &elbv2.Action{} - action.Type = aws.String(defaultActionMap["type"].(string)) + action := &elbv2.Action{ + Type: aws.String(defaultActionMap["type"].(string)), + } + + if order, ok := defaultActionMap["order"]; ok && order != 0 { + action.Order = aws.Int64(int64(order.(int))) + } + if len(defaultActions) != 1 && action.Order == nil { + return errors.New("when using more then one action, you need to specify 'order' for each action") + } switch defaultActionMap["type"].(string) { case "forward": @@ -437,6 +690,77 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error } else { return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } + + case "authenticate-cognito": + authenticateCognitoList := defaultActionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case "authenticate-oidc": + authenticateOidcList := defaultActionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } params.DefaultActions[i] = action diff --git a/aws/resource_aws_lb_listener_rule.go b/aws/resource_aws_lb_listener_rule.go index 7eac9c02fc6..e40a16ff26c 100644 --- a/aws/resource_aws_lb_listener_rule.go +++ b/aws/resource_aws_lb_listener_rule.go @@ -53,11 +53,18 @@ func resourceAwsLbbListenerRule() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ + elbv2.ActionTypeEnumAuthenticateCognito, + elbv2.ActionTypeEnumAuthenticateOidc, elbv2.ActionTypeEnumFixedResponse, elbv2.ActionTypeEnumForward, elbv2.ActionTypeEnumRedirect, }, true), }, + "order": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(1, 50000), + }, "target_group_arn": { Type: schema.TypeString, @@ -152,6 +159,123 @@ func resourceAwsLbbListenerRule() *schema.Resource { }, }, }, + + "authenticate_cognito": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateCognito), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "user_pool_arn": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_client_id": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_domain": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "authenticate_oidc": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateOidc), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "authorization_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "client_id": { + Type: schema.TypeString, + Required: true, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "issuer": { + Type: schema.TypeString, + Required: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateOidcActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "token_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "user_info_endpoint": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, }, }, @@ -206,8 +330,16 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e for i, action := range actions { actionMap := action.(map[string]interface{}) - action := &elbv2.Action{} - action.Type = aws.String(actionMap["type"].(string)) + action := &elbv2.Action{ + Type: aws.String(actionMap["type"].(string)), + } + + if order, ok := actionMap["order"]; ok && order != 0 { + action.Order = aws.Int64(int64(order.(int))) + } + if len(actions) != 1 && action.Order == nil { + return errors.New("when using more then one action, you need to specify 'order' for each action") + } switch actionMap["type"].(string) { case "forward": @@ -245,6 +377,77 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e } else { return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } + + case "authenticate-cognito": + authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case "authenticate-oidc": + authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } params.Actions[i] = action @@ -340,10 +543,12 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err } } - actions := make([]interface{}, len(rule.Actions)) - for i, action := range rule.Actions { + sortedActions := sortActionsBasedonTypeinTFFile("action", rule.Actions, d) + actions := make([]interface{}, len(sortedActions)) + for i, action := range sortedActions { actionMap := make(map[string]interface{}) actionMap["type"] = aws.StringValue(action.Type) + actionMap["order"] = aws.Int64Value(action.Order) switch actionMap["type"] { case "forward": @@ -369,6 +574,51 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err "status_code": aws.StringValue(action.FixedResponseConfig.StatusCode), }, } + + case "authenticate-cognito": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range action.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) + } + + actionMap["authenticate_cognito"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "on_unauthenticated_request": aws.StringValue(action.AuthenticateCognitoConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(action.AuthenticateCognitoConfig.Scope), + "session_cookie_name": aws.StringValue(action.AuthenticateCognitoConfig.SessionCookieName), + "session_timeout": aws.Int64Value(action.AuthenticateCognitoConfig.SessionTimeout), + "user_pool_arn": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolArn), + "user_pool_client_id": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolClientId), + "user_pool_domain": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolDomain), + }, + } + + case "authenticate-oidc": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range action.AuthenticateOidcConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) + } + + // The LB API currently provides no way to read the ClientSecret + // Instead we passthrough the configuration value into the state + clientSecret := d.Get("action." + strconv.Itoa(i) + ".authenticate_oidc.0.client_secret").(string) + + actionMap["authenticate_oidc"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "authorization_endpoint": aws.StringValue(action.AuthenticateOidcConfig.AuthorizationEndpoint), + "client_id": aws.StringValue(action.AuthenticateOidcConfig.ClientId), + "client_secret": clientSecret, + "issuer": aws.StringValue(action.AuthenticateOidcConfig.Issuer), + "on_unauthenticated_request": aws.StringValue(action.AuthenticateOidcConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(action.AuthenticateOidcConfig.Scope), + "session_cookie_name": aws.StringValue(action.AuthenticateOidcConfig.SessionCookieName), + "session_timeout": aws.Int64Value(action.AuthenticateOidcConfig.SessionTimeout), + "token_endpoint": aws.StringValue(action.AuthenticateOidcConfig.TokenEndpoint), + "user_info_endpoint": aws.StringValue(action.AuthenticateOidcConfig.UserInfoEndpoint), + }, + } } actions[i] = actionMap @@ -425,8 +675,10 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e for i, action := range actions { actionMap := action.(map[string]interface{}) - action := &elbv2.Action{} - action.Type = aws.String(actionMap["type"].(string)) + action := &elbv2.Action{ + Type: aws.String(actionMap["type"].(string)), + Order: aws.Int64(int64(actionMap["order"].(int))), // TODO, optional + } switch actionMap["type"].(string) { case "forward": @@ -464,6 +716,77 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e } else { return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } + + case "authenticate-cognito": + authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case "authenticate-oidc": + authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } params.Actions[i] = action diff --git a/aws/resource_aws_lb_listener_rule_test.go b/aws/resource_aws_lb_listener_rule_test.go index e9850740fce..2de06e8ebd2 100644 --- a/aws/resource_aws_lb_listener_rule_test.go +++ b/aws/resource_aws_lb_listener_rule_test.go @@ -341,6 +341,92 @@ func TestAccAWSLBListenerRule_priority(t *testing.T) { }) } +func TestAccAWSLBListenerRule_cognito(t *testing.T) { + var conf elbv2.Rule + lbName := fmt.Sprintf("testrule-cognito-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + certificateName := fmt.Sprintf("testcert-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + cognitoPrefix := fmt.Sprintf("testcog-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_lb_listener_rule.cognito", + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerRuleConfig_cognito(lbName, targetGroupName, certificateName, cognitoPrefix), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.cognito", &conf), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "arn"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "listener_arn"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "priority", "100"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.#", "2"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.type", "authenticate-cognito"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.order", "1"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_arn"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_client_id"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_domain"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.authentication_request_extra_params.%", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.authentication_request_extra_params.param", "test"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.1.type", "forward"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.1.order", "2"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.1.target_group_arn"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "condition.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "condition.1366281676.field", "path-pattern"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "condition.1366281676.values.#", "1"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "condition.1366281676.values.0"), + ), + }, + }, + }) +} + +func TestAccAWSLBListenerRule_oidc(t *testing.T) { + var conf elbv2.Rule + lbName := fmt.Sprintf("testrule-oidc-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) + targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + certificateName := fmt.Sprintf("testcert-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_lb_listener_rule.oidc", + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerRuleConfig_oidc(lbName, targetGroupName, certificateName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerRuleExists("aws_lb_listener_rule.oidc", &conf), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "arn"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "listener_arn"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "priority", "100"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.#", "2"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.type", "authenticate-oidc"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authorization_endpoint", "https://example.com/authorization_endpoint"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.client_id", "s6BhdRkqt3"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.client_secret", "7Fjfp0ZBr1KtDRbnfVdmIw"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.issuer", "https://example.com"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.token_endpoint", "https://example.com/token_endpoint"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.user_info_endpoint", "https://example.com/user_info_endpoint"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authentication_request_extra_params.%", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authentication_request_extra_params.param", "test"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.1.type", "forward"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.1.order", "2"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "action.1.target_group_arn"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "condition.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "condition.1366281676.field", "path-pattern"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "condition.1366281676.values.#", "1"), + resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "condition.1366281676.values.0"), + ), + }, + }, + }) +} + func testAccCheckAWSLbListenerRuleRecreated(t *testing.T, before, after *elbv2.Rule) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -1427,3 +1513,339 @@ resource "aws_lb_listener_rule" "50000_in_use" { } `) } + +func testAccAWSLBListenerRuleConfig_cognito(lbName string, targetGroupName string, certificateName string, cognitoPrefix string) string { + return fmt.Sprintf(`resource "aws_lb_listener_rule" "cognito" { + listener_arn = "${aws_lb_listener.front_end.arn}" + priority = 100 + + action { + order = 1 + type = "authenticate-cognito" + authenticate_cognito { + user_pool_arn = "${aws_cognito_user_pool.test.arn}" + user_pool_client_id = "${aws_cognito_user_pool_client.test.id}" + user_pool_domain = "${aws_cognito_user_pool_domain.test.domain}" + + authentication_request_extra_params { + param = "test" + } + } + } + + action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.test.arn}" + } + + condition { + field = "path-pattern" + values = ["/static/*"] + } +} + +resource "aws_iam_server_certificate" "test" { + name = "terraform-test-cert-%s" + certificate_body = "${tls_self_signed_cert.test.cert_pem}" + private_key = "${tls_private_key.test.private_key_pem}" +} + +resource "tls_private_key" "test" { + algorithm = "RSA" +} + +resource "tls_self_signed_cert" "test" { + key_algorithm = "RSA" + private_key_pem = "${tls_private_key.test.private_key_pem}" + + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } + + validity_period_hours = 12 + + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] +} + +resource "aws_lb_listener" "front_end" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTPS" + port = "443" + ssl_policy = "ELBSecurityPolicy-2015-05" + certificate_arn = "${aws_iam_server_certificate.test.arn}" + + default_action { + target_group_arn = "${aws_lb_target_group.test.id}" + type = "forward" + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags { + Name = "TestAccAWSALB_cognito" + } +} + +resource "aws_lb_target_group" "test" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" {} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags { + Name = "terraform-testacc-lb-listener-rule-cognito" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags { + Name = "tf-acc-lb-listener-rule-cognito-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags { + Name = "TestAccAWSALB_cognito" + } +} + +resource "aws_cognito_user_pool" "test" { + name = "%s-pool" +} + +resource "aws_cognito_user_pool_client" "test" { + name = "%s-pool-client" + user_pool_id = "${aws_cognito_user_pool.test.id}" + generate_secret = true + allowed_oauth_flows_user_pool_client = true + allowed_oauth_flows = ["code", "implicit"] + allowed_oauth_scopes = ["phone", "email", "openid", "profile", "aws.cognito.signin.user.admin"] + callback_urls = ["https://www.example.com/callback", "https://www.example.com/redirect"] + default_redirect_uri = "https://www.example.com/redirect" + logout_urls = ["https://www.example.com/login"] +} + +resource "aws_cognito_user_pool_domain" "test" { + domain = "%s-pool-domain" + user_pool_id = "${aws_cognito_user_pool.test.id}" +}`, lbName, targetGroupName, certificateName, cognitoPrefix, cognitoPrefix, cognitoPrefix) +} + +func testAccAWSLBListenerRuleConfig_oidc(lbName string, targetGroupName string, certificateName string) string { + return fmt.Sprintf(`resource "aws_lb_listener_rule" "oidc" { + listener_arn = "${aws_lb_listener.front_end.arn}" + priority = 100 + + action { + order = 1 + type = "authenticate-oidc" + authenticate_oidc { + authorization_endpoint = "https://example.com/authorization_endpoint" + client_id = "s6BhdRkqt3" + client_secret = "7Fjfp0ZBr1KtDRbnfVdmIw" + issuer = "https://example.com" + token_endpoint = "https://example.com/token_endpoint" + user_info_endpoint = "https://example.com/user_info_endpoint" + + authentication_request_extra_params { + param = "test" + } + } + } + + action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.test.arn}" + } + + condition { + field = "path-pattern" + values = ["/static/*"] + } +} + +resource "aws_iam_server_certificate" "test" { + name = "terraform-test-cert-%s" + certificate_body = "${tls_self_signed_cert.test.cert_pem}" + private_key = "${tls_private_key.test.private_key_pem}" +} + +resource "tls_private_key" "test" { + algorithm = "RSA" +} + +resource "tls_self_signed_cert" "test" { + key_algorithm = "RSA" + private_key_pem = "${tls_private_key.test.private_key_pem}" + + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } + + validity_period_hours = 12 + + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] +} + +resource "aws_lb_listener" "front_end" { + load_balancer_arn = "${aws_lb.alb_test.id}" + protocol = "HTTPS" + port = "443" + ssl_policy = "ELBSecurityPolicy-2015-05" + certificate_arn = "${aws_iam_server_certificate.test.arn}" + + default_action { + target_group_arn = "${aws_lb_target_group.test.id}" + type = "forward" + } +} + +resource "aws_lb" "alb_test" { + name = "%s" + internal = true + security_groups = ["${aws_security_group.alb_test.id}"] + subnets = ["${aws_subnet.alb_test.*.id}"] + + idle_timeout = 30 + enable_deletion_protection = false + + tags { + Name = "TestAccAWSALB_cognito" + } +} + +resource "aws_lb_target_group" "test" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.alb_test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" {} + +resource "aws_vpc" "alb_test" { + cidr_block = "10.0.0.0/16" + + tags { + Name = "terraform-testacc-lb-listener-rule-cognito" + } +} + +resource "aws_subnet" "alb_test" { + count = 2 + vpc_id = "${aws_vpc.alb_test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" + + tags { + Name = "tf-acc-lb-listener-rule-cognito-${count.index}" + } +} + +resource "aws_security_group" "alb_test" { + name = "allow_all_alb_test" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.alb_test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags { + Name = "TestAccAWSALB_cognito" + } +}`, lbName, targetGroupName, certificateName) +} diff --git a/aws/resource_aws_lb_listener_test.go b/aws/resource_aws_lb_listener_test.go index 2e8dfe90a45..3725b5f5bdb 100644 --- a/aws/resource_aws_lb_listener_test.go +++ b/aws/resource_aws_lb_listener_test.go @@ -171,6 +171,81 @@ func TestAccAWSLBListener_fixedResponse(t *testing.T) { }) } +func TestAccAWSLBListener_cognito(t *testing.T) { + var conf elbv2.Listener + rName := acctest.RandString(5) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_lb_listener.test", + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckAWSLBListenerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerConfig_cognito(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerExists("aws_lb_listener.test", &conf), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "load_balancer_arn"), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "arn"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "protocol", "HTTPS"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "port", "443"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.#", "2"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.type", "authenticate-cognito"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.user_pool_arn"), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.user_pool_client_id"), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.user_pool_domain"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.authentication_request_extra_params.%", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.authentication_request_extra_params.param", "test"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.type", "forward"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.order", "2"), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.1.target_group_arn"), + ), + }, + }, + }) +} + +func TestAccAWSLBListener_oidc(t *testing.T) { + var conf elbv2.Listener + rName := acctest.RandString(5) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: "aws_lb_listener.test", + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckAWSLBListenerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerConfig_oidc(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerExists("aws_lb_listener.test", &conf), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "load_balancer_arn"), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "arn"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "protocol", "HTTPS"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "port", "443"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.#", "2"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.type", "authenticate-oidc"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.authorization_endpoint", "https://example.com/authorization_endpoint"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.client_id", "s6BhdRkqt3"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.client_secret", "7Fjfp0ZBr1KtDRbnfVdmIw"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.issuer", "https://example.com"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.token_endpoint", "https://example.com/token_endpoint"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.user_info_endpoint", "https://example.com/user_info_endpoint"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.authentication_request_extra_params.%", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.authentication_request_extra_params.param", "test"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.type", "forward"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.order", "2"), + resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.1.target_group_arn"), + ), + }, + }, + }) +} + func testAccCheckAWSLBListenerExists(n string, res *elbv2.Listener) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -724,3 +799,285 @@ resource "aws_security_group" "alb_test" { } }`, lbName) } + +func testAccAWSLBListenerConfig_cognito(rName string) string { + return fmt.Sprintf(` +resource "aws_lb" "test" { + name = "%s" + internal = false + security_groups = ["${aws_security_group.test.id}"] + subnets = ["${aws_subnet.test.*.id}"] + enable_deletion_protection = false +} + +resource "aws_lb_target_group" "test" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" {} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_subnet" "test" { + count = 2 + vpc_id = "${aws_vpc.test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" +} + +resource "aws_security_group" "test" { + name = "%s" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_cognito_user_pool" "test" { + name = "%s" +} + +resource "aws_cognito_user_pool_client" "test" { + name = "%s" + user_pool_id = "${aws_cognito_user_pool.test.id}" + generate_secret = true + allowed_oauth_flows_user_pool_client = true + allowed_oauth_flows = ["code", "implicit"] + allowed_oauth_scopes = ["phone", "email", "openid", "profile", "aws.cognito.signin.user.admin"] + callback_urls = ["https://www.example.com/callback", "https://www.example.com/redirect"] + default_redirect_uri = "https://www.example.com/redirect" + logout_urls = ["https://www.example.com/login"] +} + +resource "aws_cognito_user_pool_domain" "test" { + domain = "%s" + user_pool_id = "${aws_cognito_user_pool.test.id}" +} + +resource "aws_iam_server_certificate" "test" { + name = "terraform-test-cert-%s" + certificate_body = "${tls_self_signed_cert.test.cert_pem}" + private_key = "${tls_private_key.test.private_key_pem}" +} + +resource "tls_private_key" "test" { + algorithm = "RSA" +} + +resource "tls_self_signed_cert" "test" { + key_algorithm = "RSA" + private_key_pem = "${tls_private_key.test.private_key_pem}" + + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } + + validity_period_hours = 12 + + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] +} + +resource "aws_lb_listener" "test" { + load_balancer_arn = "${aws_lb.test.id}" + protocol = "HTTPS" + port = "443" + ssl_policy = "ELBSecurityPolicy-2015-05" + certificate_arn = "${aws_iam_server_certificate.test.arn}" + + default_action { + order = 1 + type = "authenticate-cognito" + authenticate_cognito { + user_pool_arn = "${aws_cognito_user_pool.test.arn}" + user_pool_client_id = "${aws_cognito_user_pool_client.test.id}" + user_pool_domain = "${aws_cognito_user_pool_domain.test.domain}" + + authentication_request_extra_params { + param = "test" + } + } + } + + default_action { + order = 2 + target_group_arn = "${aws_lb_target_group.test.id}" + type = "forward" + } +} +`, rName, rName, rName, rName, rName, rName, rName) +} + +func testAccAWSLBListenerConfig_oidc(rName string) string { + return fmt.Sprintf(` +resource "aws_lb" "test" { + name = "%s" + internal = false + security_groups = ["${aws_security_group.test.id}"] + subnets = ["${aws_subnet.test.*.id}"] + enable_deletion_protection = false +} + +resource "aws_lb_target_group" "test" { + name = "%s" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +variable "subnets" { + default = ["10.0.1.0/24", "10.0.2.0/24"] + type = "list" +} + +data "aws_availability_zones" "available" {} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" +} + +resource "aws_internet_gateway" "test" { + vpc_id = "${aws_vpc.test.id}" +} + +resource "aws_subnet" "test" { + count = 2 + vpc_id = "${aws_vpc.test.id}" + cidr_block = "${element(var.subnets, count.index)}" + map_public_ip_on_launch = true + availability_zone = "${element(data.aws_availability_zones.available.names, count.index)}" +} + +resource "aws_security_group" "test" { + name = "%s" + description = "Used for ALB Testing" + vpc_id = "${aws_vpc.test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_iam_server_certificate" "test" { + name = "terraform-test-cert-%s" + certificate_body = "${tls_self_signed_cert.test.cert_pem}" + private_key = "${tls_private_key.test.private_key_pem}" +} + +resource "tls_private_key" "test" { + algorithm = "RSA" +} + +resource "tls_self_signed_cert" "test" { + key_algorithm = "RSA" + private_key_pem = "${tls_private_key.test.private_key_pem}" + + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } + + validity_period_hours = 12 + + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] +} + +resource "aws_lb_listener" "test" { + load_balancer_arn = "${aws_lb.test.id}" + protocol = "HTTPS" + port = "443" + ssl_policy = "ELBSecurityPolicy-2015-05" + certificate_arn = "${aws_iam_server_certificate.test.arn}" + + default_action { + order = 1 + type = "authenticate-oidc" + authenticate_oidc { + authorization_endpoint = "https://example.com/authorization_endpoint" + client_id = "s6BhdRkqt3" + client_secret = "7Fjfp0ZBr1KtDRbnfVdmIw" + issuer = "https://example.com" + token_endpoint = "https://example.com/token_endpoint" + user_info_endpoint = "https://example.com/user_info_endpoint" + + authentication_request_extra_params { + param = "test" + } + } + } + + default_action { + order = 2 + target_group_arn = "${aws_lb_target_group.test.id}" + type = "forward" + } +} +`, rName, rName, rName, rName) +} diff --git a/aws/structure.go b/aws/structure.go index 00856141ad9..5cd1b9c6578 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -29,6 +29,7 @@ import ( "github.com/aws/aws-sdk-go/service/elasticbeanstalk" elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" "github.com/aws/aws-sdk-go/service/elb" + "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/iot" "github.com/aws/aws-sdk-go/service/kinesis" "github.com/aws/aws-sdk-go/service/lambda" @@ -1907,6 +1908,20 @@ func sortListBasedonTFFile(in []string, d *schema.ResourceData, listName string) return in, fmt.Errorf("Could not find list: %s", listName) } +// This function sorts LB Actions to look like whats found in the tf file +func sortActionsBasedonTypeinTFFile(actionName string, actions []*elbv2.Action, d *schema.ResourceData) []*elbv2.Action { + actionCount := d.Get(actionName + ".#").(int) + for i := 0; i < actionCount; i++ { + currAction := d.Get(actionName + "." + strconv.Itoa(i)).(map[string]interface{}) + for j, action := range actions { + if currAction["type"].(string) == aws.StringValue(action.Type) { + actions[i], actions[j] = actions[j], actions[i] + } + } + } + return actions +} + func flattenApiGatewayThrottleSettings(settings *apigateway.ThrottleSettings) []map[string]interface{} { result := make([]map[string]interface{}, 0, 1) diff --git a/website/docs/r/lb_listener.html.markdown b/website/docs/r/lb_listener.html.markdown index e10ebe3d6c2..421ee27703c 100644 --- a/website/docs/r/lb_listener.html.markdown +++ b/website/docs/r/lb_listener.html.markdown @@ -123,6 +123,36 @@ Fixed-response Blocks (for `fixed_response`) support the following: * `message_body` - (Optional) The message body. * `status_code` - (Optional) The HTTP response code. Valid values are `2XX`, `4XX`, or `5XX`. +Authenticate Cognito Blocks (for `authenticate_cognito`) supports the following: + +* `authentication_request_extra_params` - (Optional) The query parameters to include in the redirect request to the authorization endpoint. Max: 10. +* `on_unauthenticated_request` - (Optional) The behavior if the user is not authenticated. Valid values: `deny`, `allow` and `authenticate` +* `scope` - (Optional) The set of user claims to be requested from the IdP. +* `session_cookie_name` - (Optional) The name of the cookie used to maintain session information. +* `session_time_out` - (Optional) The maximum duration of the authentication session, in seconds. +* `user_pool_arn` - (Required) The ARN of the Cognito user pool. +* `user_pool_client` - (Required) The ID of the Cognito user pool client. +* `user_pool_domain` - (Required) The domain prefix or fully-qualified domain name of the Cognito user pool. + +Authenticate OIDC Blocks (for `authenticate_oidc`) supports the following: + +* `authentication_request_extra_params` - (Optional) The query parameters to include in the redirect request to the authorization endpoint. Max: 10. +* `authorization_endpoint` - (Required) The authorization endpoint of the IdP. +* `client_id` - (Required) The OAuth 2.0 client identifier. +* `client_secret` - (Required) The OAuth 2.0 client secret. +* `issuer` - (Required) The OIDC issuer identifier of the IdP. +* `on_unauthenticated_request` - (Optional) The behavior if the user is not authenticated. Valid values: `deny`, `allow` and `authenticate` +* `scope` - (Optional) The set of user claims to be requested from the IdP. +* `session_cookie_name` - (Optional) The name of the cookie used to maintain session information. +* `session_time_out` - (Optional) The maximum duration of the authentication session, in seconds. +* `token_endpoint` - (Required) The token endpoint of the IdP. +* `user_info_endpoint` - (Required) The user info endpoint of the IdP. + +Authentication Request Extra Params Blocks (for `authentication_request_extra_params`) supports the following: + +* `key` - (Required) The key of query parameter +* `value` - (Required) The value of query parameter + ## Attributes Reference The following attributes are exported in addition to the arguments listed above: diff --git a/website/docs/r/lb_listener_rule.html.markdown b/website/docs/r/lb_listener_rule.html.markdown index 7bf5a7953bb..f59f7b459cf 100644 --- a/website/docs/r/lb_listener_rule.html.markdown +++ b/website/docs/r/lb_listener_rule.html.markdown @@ -112,6 +112,8 @@ Action Blocks (for `action`) support the following: * `target_group_arn` - (Optional) The ARN of the Target Group to which to route traffic. Required if `type` is `forward`. * `redirect` - (Optional) Information for creating a redirect action. Required if `type` is `redirect`. * `fixed_response` - (Optional) Information for creating an action that returns a custom HTTP response. Required if `type` is `fixed-response`. +* `authenticate_cognito` - (Optional) Information for creating an authenticate action using Cognito. Required if `type` is `authenticate-cognito`. +* `authenticate_oidc` - (Optional) Information for creating an authenticate action using OIDC. Required if `type` is `authenticate-oidc`. Redirect Blocks (for `redirect`) support the following: @@ -130,6 +132,36 @@ Fixed-response Blocks (for `fixed_response`) support the following: * `message_body` - (Optional) The message body. * `status_code` - (Optional) The HTTP response code. Valid values are `2XX`, `4XX`, or `5XX`. +Authenticate Cognito Blocks (for `authenticate_cognito`) supports the following: + +* `authentication_request_extra_params` - (Optional) The query parameters to include in the redirect request to the authorization endpoint. Max: 10. +* `on_unauthenticated_request` - (Optional) The behavior if the user is not authenticated. Valid values: `deny`, `allow` and `authenticate` +* `scope` - (Optional) The set of user claims to be requested from the IdP. +* `session_cookie_name` - (Optional) The name of the cookie used to maintain session information. +* `session_time_out` - (Optional) The maximum duration of the authentication session, in seconds. +* `user_pool_arn` - (Required) The ARN of the Cognito user pool. +* `user_pool_client` - (Required) The ID of the Cognito user pool client. +* `user_pool_domain` - (Required) The domain prefix or fully-qualified domain name of the Cognito user pool. + +Authenticate OIDC Blocks (for `authenticate_oidc`) supports the following: + +* `authentication_request_extra_params` - (Optional) The query parameters to include in the redirect request to the authorization endpoint. Max: 10. +* `authorization_endpoint` - (Required) The authorization endpoint of the IdP. +* `client_id` - (Required) The OAuth 2.0 client identifier. +* `client_secret` - (Required) The OAuth 2.0 client secret. +* `issuer` - (Required) The OIDC issuer identifier of the IdP. +* `on_unauthenticated_request` - (Optional) The behavior if the user is not authenticated. Valid values: `deny`, `allow` and `authenticate` +* `scope` - (Optional) The set of user claims to be requested from the IdP. +* `session_cookie_name` - (Optional) The name of the cookie used to maintain session information. +* `session_time_out` - (Optional) The maximum duration of the authentication session, in seconds. +* `token_endpoint` - (Required) The token endpoint of the IdP. +* `user_info_endpoint` - (Required) The user info endpoint of the IdP. + +Authentication Request Extra Params Blocks (for `authentication_request_extra_params`) supports the following: + +* `key` - (Required) The key of query parameter +* `value` - (Required) The value of query parameter + Condition Blocks (for `condition`) support the following: * `field` - (Required) The name of the field. Must be one of `path-pattern` for path based routing or `host-header` for host based routing. From af82885311fdc435c396064a251b0bbe24545939 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 8 Oct 2018 14:48:31 +0200 Subject: [PATCH 2758/3316] resource/aws_pinpoint_gcm_channel --- aws/provider.go | 1 + aws/resource_aws_pinpoint_gcm_channel.go | 113 +++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 aws/resource_aws_pinpoint_gcm_channel.go diff --git a/aws/provider.go b/aws/provider.go index d01014e8f84..709e2cfa2a7 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -674,6 +674,7 @@ func Provider() terraform.ResourceProvider { "aws_batch_job_queue": resourceAwsBatchJobQueue(), "aws_pinpoint_app": resourceAwsPinpointApp(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), + "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), // ALBs are actually LBs because they can be type `network` or `application` diff --git a/aws/resource_aws_pinpoint_gcm_channel.go b/aws/resource_aws_pinpoint_gcm_channel.go new file mode 100644 index 00000000000..328bbd24f07 --- /dev/null +++ b/aws/resource_aws_pinpoint_gcm_channel.go @@ -0,0 +1,113 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointGCMChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointGCMChannelUpsert, + Read: resourceAwsPinpointGCMChannelRead, + Update: resourceAwsPinpointGCMChannelUpsert, + Delete: resourceAwsPinpointGCMChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "api_key": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + }, + } +} + +func resourceAwsPinpointGCMChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.GCMChannelRequest{} + + if d.HasChange("api_key") { + params.ApiKey = aws.String(d.Get("api_key").(string)) + } + + if d.HasChange("enabled") { + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + } + + req := pinpoint.UpdateGcmChannelInput{ + ApplicationId: aws.String(applicationId), + GCMChannelRequest: params, + } + + _, err := conn.UpdateGcmChannel(&req) + if err != nil { + return fmt.Errorf("error putting Pinpoint GCM Channel for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointGCMChannelRead(d, meta) +} + +func resourceAwsPinpointGCMChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint GCM Channel for application %s", d.Id()) + + output, err := conn.GetGcmChannel(&pinpoint.GetGcmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint GCM Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint GCM Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.GCMChannelResponse.ApplicationId) + d.Set("enabled", output.GCMChannelResponse.Enabled) + // api_key is never returned + + return nil +} + +func resourceAwsPinpointGCMChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint GCM Channel for application %s", d.Id()) + _, err := conn.DeleteGcmChannel(&pinpoint.DeleteGcmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint GCM Channel for application %s: %s", d.Id(), err) + } + return nil +} From ebae8163a9dbc825f95fd47e8eb0f35a975d18fe Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 8 Oct 2018 15:35:40 +0200 Subject: [PATCH 2759/3316] resource/aws_pinpoint_gcm_channel: docs + tests --- aws/resource_aws_pinpoint_gcm_channel_test.go | 124 ++++++++++++++++++ website/aws.erb | 3 + website/docs/r/pinpoint_gcm_channel.markdown | 42 ++++++ 3 files changed, 169 insertions(+) create mode 100644 aws/resource_aws_pinpoint_gcm_channel_test.go create mode 100644 website/docs/r/pinpoint_gcm_channel.markdown diff --git a/aws/resource_aws_pinpoint_gcm_channel_test.go b/aws/resource_aws_pinpoint_gcm_channel_test.go new file mode 100644 index 00000000000..f7a8fbc3d58 --- /dev/null +++ b/aws/resource_aws_pinpoint_gcm_channel_test.go @@ -0,0 +1,124 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +/** + Before running this test, the following ENV variable must be set: + + GCM_API_KEY - Google Cloud Messaging Api Key +**/ + +func TestAccAWSPinpointGCMChannel_basic(t *testing.T) { + oldDefaultRegion := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldDefaultRegion) + + var channel pinpoint.GCMChannelResponse + resourceName := "aws_pinpoint_gcm_channel.test_gcm_channel" + + if os.Getenv("GCM_API_KEY") == "" { + t.Skipf("GCM_API_KEY env missing, skip test") + } + + apiKey := os.Getenv("GCM_API_KEY") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSPinpointGCMChannelDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSPinpointGCMChannelConfig_basic(apiKey), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointGCMChannelExists(resourceName, &channel), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"api_key"}, + }, + }, + }) +} + +func testAccCheckAWSPinpointGCMChannelExists(n string, channel *pinpoint.GCMChannelResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Pinpoint GCM Channel with that application ID exists") + } + + conn := testAccProvider.Meta().(*AWSClient).pinpointconn + + // Check if the app exists + params := &pinpoint.GetGcmChannelInput{ + ApplicationId: aws.String(rs.Primary.ID), + } + output, err := conn.GetGcmChannel(params) + + if err != nil { + return err + } + + *channel = *output.GCMChannelResponse + + return nil + } +} + +func testAccAWSPinpointGCMChannelConfig_basic(apiKey string) string { + return fmt.Sprintf(` +provider "aws" { + region = "us-east-1" +} + +resource "aws_pinpoint_app" "test_app" {} + +resource "aws_pinpoint_gcm_channel" "test_gcm_channel" { + application_id = "${aws_pinpoint_app.test_app.application_id}" + enabled = "true" + api_key = "%s" +}`, apiKey) +} + +func testAccCheckAWSPinpointGCMChannelDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).pinpointconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_pinpoint_gcm_channel" { + continue + } + + // Check if the event stream exists + params := &pinpoint.GetGcmChannelInput{ + ApplicationId: aws.String(rs.Primary.ID), + } + _, err := conn.GetGcmChannel(params) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + continue + } + return err + } + return fmt.Errorf("GCM Channel exists when it should be destroyed!") + } + + return nil +} diff --git a/website/aws.erb b/website/aws.erb index 4b92eb76009..7aa8603804b 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1682,6 +1682,9 @@ > aws_pinpoint_event_stream + > + aws_pinpoint_gcm_channel + > aws_pinpoint_sms_channel diff --git a/website/docs/r/pinpoint_gcm_channel.markdown b/website/docs/r/pinpoint_gcm_channel.markdown new file mode 100644 index 00000000000..2aa760f4da8 --- /dev/null +++ b/website/docs/r/pinpoint_gcm_channel.markdown @@ -0,0 +1,42 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_gcm_channel" +sidebar_current: "docs-aws-resource-pinpoint-gcm-channel" +description: |- + Provides a Pinpoint GCM Channel resource. +--- + +# aws_pinpoint_gcm_channel + +Provides a Pinpoint GCM Channel resource. + +~> **Note:** Api Key argument will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). + +## Example Usage + +```hcl +resource "aws_pinpoint_gcm_channel" "gcm" { + application_id = "${aws_pinpoint_app.app.application_id}" + api_key = "api_key" +} + +resource "aws_pinpoint_app" "app" {} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `api_key` - (Required) Platform credential API key from Google. +* `enabled` - (Optional) Whether the channel is enabled or disabled. Defaults to `true`. + +## Import + +Pinpoint GCM Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_gcm_channel.gcm application-id +``` From fd7438b931d6537e1e5d42fb43ae6ffbd553273c Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 1 Oct 2018 21:41:17 +0200 Subject: [PATCH 2760/3316] resource/aws_pinpoint_adm_channel --- aws/provider.go | 1 + aws/resource_aws_pinpoint_adm_channel.go | 120 +++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 aws/resource_aws_pinpoint_adm_channel.go diff --git a/aws/provider.go b/aws/provider.go index d01014e8f84..fcb4ead8411 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -673,6 +673,7 @@ func Provider() terraform.ResourceProvider { "aws_batch_job_definition": resourceAwsBatchJobDefinition(), "aws_batch_job_queue": resourceAwsBatchJobQueue(), "aws_pinpoint_app": resourceAwsPinpointApp(), + "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), diff --git a/aws/resource_aws_pinpoint_adm_channel.go b/aws/resource_aws_pinpoint_adm_channel.go new file mode 100644 index 00000000000..011b8cb6f4c --- /dev/null +++ b/aws/resource_aws_pinpoint_adm_channel.go @@ -0,0 +1,120 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointADMChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointADMChannelUpsert, + Read: resourceAwsPinpointADMChannelRead, + Update: resourceAwsPinpointADMChannelUpsert, + Delete: resourceAwsPinpointADMChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "client_id": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func resourceAwsPinpointADMChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + d.SetId(applicationId) + + params := &pinpoint.ADMChannelRequest{} + + if d.HasChange("client_id") { + params.ClientId = aws.String(d.Get("client_id").(string)) + } + + if d.HasChange("client_secret") { + params.ClientSecret = aws.String(d.Get("client_secret").(string)) + } + + if d.HasChange("enabled") { + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + } + + req := pinpoint.UpdateAdmChannelInput{ + ApplicationId: aws.String(applicationId), + ADMChannelRequest: params, + } + + _, err := conn.UpdateAdmChannel(&req) + if err != nil { + return err + } + + return resourceAwsPinpointADMChannelRead(d, meta) +} + +func resourceAwsPinpointADMChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint ADM Channel for application %s", d.Id()) + + channel, err := conn.GetAdmChannel(&pinpoint.GetAdmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint ADM Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("application_id", channel.ADMChannelResponse.ApplicationId) + d.Set("enabled", channel.ADMChannelResponse.Enabled) + + return nil +} + +func resourceAwsPinpointADMChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Pinpoint Delete ADM Channel: %s", d.Id()) + _, err := conn.DeleteAdmChannel(&pinpoint.DeleteAdmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return err + } + return nil +} From a7702e218142282dbb88605aa823c306204be7eb Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 1 Oct 2018 21:41:54 +0200 Subject: [PATCH 2761/3316] resource/aws_pinpoint_adm_channel: tests + docs --- aws/resource_aws_pinpoint_adm_channel_test.go | 141 ++++++++++++++++++ website/docs/r/pinpoint_adm_channel.markdown | 47 ++++++ 2 files changed, 188 insertions(+) create mode 100644 aws/resource_aws_pinpoint_adm_channel_test.go create mode 100644 website/docs/r/pinpoint_adm_channel.markdown diff --git a/aws/resource_aws_pinpoint_adm_channel_test.go b/aws/resource_aws_pinpoint_adm_channel_test.go new file mode 100644 index 00000000000..8f8484531c2 --- /dev/null +++ b/aws/resource_aws_pinpoint_adm_channel_test.go @@ -0,0 +1,141 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +/** + Before running this test, the following two ENV variables must be set: + + ADM_CLIENT_ID - Amazon ADM OAuth Credentials Client ID + ADM_CLIENT_SECRET - Amazon ADM OAuth Credentials Client Secret +**/ + +type testAccAwsPinpointADMChannelConfiguration struct { + ClientID string + ClientSecret string +} + +func testAccAwsPinpointADMChannelConfigurationFromEnv(t *testing.T) *testAccAwsPinpointADMChannelConfiguration { + + if os.Getenv("ADM_CLIENT_ID") == "" { + t.Fatalf("ADM_CLIENT_ID ENV is missing") + } + + if os.Getenv("ADM_CLIENT_SECRET") == "" { + t.Fatalf("ADM_CLIENT_SECRET ENV is missing") + } + + conf := testAccAwsPinpointADMChannelConfiguration{ + ClientID: os.Getenv("ADM_CLIENT_ID"), + ClientSecret: os.Getenv("ADM_CLIENT_SECRET"), + } + + return &conf +} + +func TestAccAWSPinpointADMChannel_basic(t *testing.T) { + oldDefaultRegion := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldDefaultRegion) + + var channel pinpoint.ADMChannelResponse + resourceName := "aws_pinpoint_adm_channel.channel" + + config := testAccAwsPinpointADMChannelConfigurationFromEnv(t) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSPinpointADMChannelDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSPinpointADMChannelConfig_basic(config), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointADMChannelExists(resourceName, &channel), + ), + }, + }, + }) +} + +func testAccCheckAWSPinpointADMChannelExists(n string, channel *pinpoint.ADMChannelResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Pinpoint ADM channel with that Application ID exists") + } + + conn := testAccProvider.Meta().(*AWSClient).pinpointconn + + // Check if the ADM Channel exists + params := &pinpoint.GetAdmChannelInput{ + ApplicationId: aws.String(rs.Primary.ID), + } + output, err := conn.GetAdmChannel(params) + + if err != nil { + return err + } + + *channel = *output.ADMChannelResponse + + return nil + } +} + +func testAccAWSPinpointADMChannelConfig_basic(conf *testAccAwsPinpointADMChannelConfiguration) string { + return fmt.Sprintf(` +provider "aws" { + region = "us-east-1" +} + +resource "aws_pinpoint_app" "test_app" {} + +resource "aws_pinpoint_adm_channel" "channel" { + application_id = "${aws_pinpoint_app.test_app.application_id}" + + client_id = "%s" + client_secret = "%s" + enabled = true +} +`, conf.ClientID, conf.ClientSecret) +} + +func testAccCheckAWSPinpointADMChannelDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).pinpointconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_pinpoint_adm_channel" { + continue + } + + // Check if the ADM channel exists by fetching its attributes + params := &pinpoint.GetAdmChannelInput{ + ApplicationId: aws.String(rs.Primary.ID), + } + _, err := conn.GetAdmChannel(params) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + continue + } + return err + } + return fmt.Errorf("ADM Channel exists when it should be destroyed!") + } + + return nil +} diff --git a/website/docs/r/pinpoint_adm_channel.markdown b/website/docs/r/pinpoint_adm_channel.markdown new file mode 100644 index 00000000000..b0645a13d9e --- /dev/null +++ b/website/docs/r/pinpoint_adm_channel.markdown @@ -0,0 +1,47 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_adm_channel" +sidebar_current: "docs-aws-resource-pinpoint-adm-channel" +description: |- + Provides a Pinpoint ADM Channel resource. +--- + +# aws_pinpoint_adm_channel + +Provides a Pinpoint ADM (Amazon Device Messaging) Channel resource. + +~> **Note:** All arguments including the Client ID and Client Secret will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). + + +## Example Usage + +```hcl +resource "aws_pinpoint_app" "app" {} + +resource "aws_pinpoint_adm_channel" "channel" { + application_id = "${aws_pinpoint_app.app.application_id}" + client_id = "" + client_secret = "" + enabled = true + +} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `client_id` - (Required) Client ID (part of OAuth Credentials) obtained via Amazon Developer Account. +* `client_secret` - (Required) Client Secret (part of OAuth Credentials) obtained via Amazon Developer Account. +* `enabled` - (Optional) Specifies whether to enable the channel. Defaults to `false`. + +## Import + +Pinpoint ADM Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_adm_channel.channel application-id +``` From 0d5890bc8cc0ed291a7a0e2ac47d85092b785a5f Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 1 Oct 2018 21:44:53 +0200 Subject: [PATCH 2762/3316] resource/aws_pinpoint_adm_channel: docs menu --- website/aws.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/aws.erb b/website/aws.erb index 4b92eb76009..d7de58350f4 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1679,6 +1679,9 @@ > aws_pinpoint_app + > + aws_pinpoint_adm_channel + > aws_pinpoint_event_stream From c03837926d87c648ea94466a5a34d526758f8cc5 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 8 Oct 2018 15:49:18 +0200 Subject: [PATCH 2763/3316] Fixes --- aws/resource_aws_pinpoint_adm_channel.go | 12 +++++++----- aws/resource_aws_pinpoint_adm_channel_test.go | 10 ++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_pinpoint_adm_channel.go b/aws/resource_aws_pinpoint_adm_channel.go index 011b8cb6f4c..e5a07ccf11b 100644 --- a/aws/resource_aws_pinpoint_adm_channel.go +++ b/aws/resource_aws_pinpoint_adm_channel.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" @@ -37,7 +38,7 @@ func resourceAwsPinpointADMChannel() *schema.Resource { "enabled": { Type: schema.TypeBool, Optional: true, - Default: false, + Default: true, }, }, } @@ -48,8 +49,6 @@ func resourceAwsPinpointADMChannelUpsert(d *schema.ResourceData, meta interface{ applicationId := d.Get("application_id").(string) - d.SetId(applicationId) - params := &pinpoint.ADMChannelRequest{} if d.HasChange("client_id") { @@ -74,6 +73,8 @@ func resourceAwsPinpointADMChannelUpsert(d *schema.ResourceData, meta interface{ return err } + d.SetId(applicationId) + return resourceAwsPinpointADMChannelRead(d, meta) } @@ -92,11 +93,12 @@ func resourceAwsPinpointADMChannelRead(d *schema.ResourceData, meta interface{}) return nil } - return err + return fmt.Errorf("error getting Pinpoint ADM Channel for application %s: %s", d.Id(), err) } d.Set("application_id", channel.ADMChannelResponse.ApplicationId) d.Set("enabled", channel.ADMChannelResponse.Enabled) + // client_id and client_secret are never returned return nil } @@ -114,7 +116,7 @@ func resourceAwsPinpointADMChannelDelete(d *schema.ResourceData, meta interface{ } if err != nil { - return err + return fmt.Errorf("error deleting Pinpoint ADM Channel for application %s: %s", d.Id(), err) } return nil } diff --git a/aws/resource_aws_pinpoint_adm_channel_test.go b/aws/resource_aws_pinpoint_adm_channel_test.go index 8f8484531c2..6a3664a08aa 100644 --- a/aws/resource_aws_pinpoint_adm_channel_test.go +++ b/aws/resource_aws_pinpoint_adm_channel_test.go @@ -27,11 +27,11 @@ type testAccAwsPinpointADMChannelConfiguration struct { func testAccAwsPinpointADMChannelConfigurationFromEnv(t *testing.T) *testAccAwsPinpointADMChannelConfiguration { if os.Getenv("ADM_CLIENT_ID") == "" { - t.Fatalf("ADM_CLIENT_ID ENV is missing") + t.Skipf("ADM_CLIENT_ID ENV is missing") } if os.Getenv("ADM_CLIENT_SECRET") == "" { - t.Fatalf("ADM_CLIENT_SECRET ENV is missing") + t.Skipf("ADM_CLIENT_SECRET ENV is missing") } conf := testAccAwsPinpointADMChannelConfiguration{ @@ -64,6 +64,12 @@ func TestAccAWSPinpointADMChannel_basic(t *testing.T) { testAccCheckAWSPinpointADMChannelExists(resourceName, &channel), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"client_id", "client_secret"}, + }, }, }) } From d58cd2efd2dba04467b9e3d1e5e6a535c3386525 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 10:54:24 -0400 Subject: [PATCH 2764/3316] docs: Cross-link aws_lb_target_group_attachment and aws_elb_attachment resources --- website/docs/r/elb_attachment.html.markdown | 3 ++- website/docs/r/lb_target_group_attachment.html.markdown | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/r/elb_attachment.html.markdown b/website/docs/r/elb_attachment.html.markdown index 85988315bf4..5470818ab56 100644 --- a/website/docs/r/elb_attachment.html.markdown +++ b/website/docs/r/elb_attachment.html.markdown @@ -8,7 +8,7 @@ description: |- # aws_elb_attachment -Provides an Elastic Load Balancer Attachment resource. +Attaches an EC2 instance to an Elastic Load Balancer (ELB). For attaching resources with Application Load Balancer (ALB) or Network Load Balancer (NLB), see the [`aws_lb_target_group_attachment` resource](/docs/providers/aws/r/lb_target_group_attachment.html). ~> **NOTE on ELB Instances and ELB Attachments:** Terraform currently provides both a standalone ELB Attachment resource (describing an instance attached to @@ -16,6 +16,7 @@ an ELB), and an [Elastic Load Balancer resource](elb.html) with `instances` defined in-line. At this time you cannot use an ELB with in-line instances in conjunction with an ELB Attachment resource. Doing so will cause a conflict and will overwrite attachments. + ## Example Usage ```hcl diff --git a/website/docs/r/lb_target_group_attachment.html.markdown b/website/docs/r/lb_target_group_attachment.html.markdown index 80c1d548619..243ddf7b776 100644 --- a/website/docs/r/lb_target_group_attachment.html.markdown +++ b/website/docs/r/lb_target_group_attachment.html.markdown @@ -9,8 +9,7 @@ description: |- # aws_lb_target_group_attachment -Provides the ability to register instances and containers with a LB -target group +Provides the ability to register instances and containers with an Application Load Balancer (ALB) or Network Load Balancer (NLB) target group. For attaching resources with Elastic Load Balancer (ELB), see the [`aws_elb_attachment` resource](/docs/providers/aws/r/elb_attachment.html). ~> **Note:** `aws_alb_target_group_attachment` is known as `aws_lb_target_group_attachment`. The functionality is identical. From b9f78abd8da2a190a3d5a62aaa93f22ff211f180 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 11:02:03 -0400 Subject: [PATCH 2765/3316] Update CHANGELOG for #6089 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ebecd4022d..d58af64ee33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Data Source:** `aws_launch_template` [GH-6064] * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] +* **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] * **New Resource:** `aws_pinpoint_sms_channel` [GH-6088] ENHANCEMENTS: From 2108feb734cbad8b301b9b2a9fbe30d59e49fe1a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 11:04:42 -0400 Subject: [PATCH 2766/3316] Update CHANGELOG for #6038 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d58af64ee33..a55e5aefbf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_launch_template` [GH-6064] +* **New Resource:** `aws_pinpoint_adm_channel` [GH-6038] * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] * **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] * **New Resource:** `aws_pinpoint_sms_channel` [GH-6088] From a7bfbe2c1e81bdc62b5ef6903d22413ce52db83b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 11:28:34 -0400 Subject: [PATCH 2767/3316] resource/aws_batch_job_queue: Provide warning log and acceptance test for state removal Previously: ``` --- FAIL: TestAccAWSBatchJobQueue_disappears (60.01s) testing.go:527: Step 0 error: Error on follow-up refresh: 1 error occurred: * aws_batch_job_queue.test_queue: 1 error occurred: * aws_batch_job_queue.test_queue: aws_batch_job_queue.test_queue: Error reading JobQueue: "%!s()" ``` Output from acceptance testing: ``` $ make testacc TEST=./aws TESTARGS='-run=TestAccAWSBatchJobQueue_' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSBatchJobQueue_ -timeout 120m === RUN TestAccAWSBatchJobQueue_basic --- PASS: TestAccAWSBatchJobQueue_basic (80.89s) === RUN TestAccAWSBatchJobQueue_disappears --- PASS: TestAccAWSBatchJobQueue_disappears (79.91s) === RUN TestAccAWSBatchJobQueue_update --- PASS: TestAccAWSBatchJobQueue_update (116.97s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 278.513s ``` --- aws/resource_aws_batch_job_queue.go | 1 + aws/resource_aws_batch_job_queue_test.go | 37 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/aws/resource_aws_batch_job_queue.go b/aws/resource_aws_batch_job_queue.go index ad87eee7996..b0393ce890a 100644 --- a/aws/resource_aws_batch_job_queue.go +++ b/aws/resource_aws_batch_job_queue.go @@ -91,6 +91,7 @@ func resourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) erro return err } if jq == nil { + log.Printf("[WARN] Batch Job Queue (%s) not found, removing from state", d.Id()) d.SetId("") return nil } diff --git a/aws/resource_aws_batch_job_queue_test.go b/aws/resource_aws_batch_job_queue_test.go index 193f7085334..c114bfacfbc 100644 --- a/aws/resource_aws_batch_job_queue_test.go +++ b/aws/resource_aws_batch_job_queue_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" @@ -91,6 +92,28 @@ func TestAccAWSBatchJobQueue_basic(t *testing.T) { }) } +func TestAccAWSBatchJobQueue_disappears(t *testing.T) { + var jobQueue1 batch.JobQueueDetail + resourceName := "aws_batch_job_queue.test_queue" + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: fmt.Sprintf(testAccBatchJobQueueBasic, rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckBatchJobQueueExists(resourceName, &jobQueue1), + testAccCheckBatchJobQueueDisappears(&jobQueue1), + ), + ExpectNonEmptyPlan: true, + }, + }, + }) +} + func TestAccAWSBatchJobQueue_update(t *testing.T) { var jq batch.JobQueueDetail ri := acctest.RandInt() @@ -190,6 +213,20 @@ func testAccCheckBatchJobQueueDestroy(s *terraform.State) error { return nil } +func testAccCheckBatchJobQueueDisappears(jobQueue *batch.JobQueueDetail) resource.TestCheckFunc { + return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).batchconn + name := aws.StringValue(jobQueue.JobQueueName) + + err := disableBatchJobQueue(name, 10*time.Minute, conn) + if err != nil { + return fmt.Errorf("error disabling Batch Job Queue (%s): %s", name, err) + } + + return deleteBatchJobQueue(name, 10*time.Minute, conn) + } +} + const testAccBatchJobQueueBaseConfig = ` ########## ecs_instance_role ########## From 989f873c1a30dfc0a7b63657d5005401bd21a6b5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 11:32:43 -0400 Subject: [PATCH 2768/3316] Update CHANGELOG for #6085 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a55e5aefbf8..74002f70521 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ BUG FIXES: * resource/aws_appautoscaling_policy: Properly handle negative values in step scaling metric intervals [GH-3480] * resource/aws_appsync_datasource: Properly pass all attributes during update [GH-5814] +* resource/aws_batch_job_queue: Prevent error during read of non-existent Job Queue [GH-6085] * resource/aws_ecs_service: Properly remove non-existent services from Terraform state [GH-6039] ## 1.39.0 (October 03, 2018) From 1a3266b2fe2a2d4d0fe2733369b3d817814417f9 Mon Sep 17 00:00:00 2001 From: KY Date: Mon, 8 Oct 2018 23:28:17 +0800 Subject: [PATCH 2769/3316] Support for policy in secrets manager datasource --- aws/data_source_aws_secretsmanager_secret.go | 23 +++++++++ ...a_source_aws_secretsmanager_secret_test.go | 50 +++++++++++++++++++ .../d/secretsmanager_secret.html.markdown | 1 + 3 files changed, 74 insertions(+) diff --git a/aws/data_source_aws_secretsmanager_secret.go b/aws/data_source_aws_secretsmanager_secret.go index b076b8d1cfd..feadc69b75b 100644 --- a/aws/data_source_aws_secretsmanager_secret.go +++ b/aws/data_source_aws_secretsmanager_secret.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" ) func dataSourceAwsSecretsManagerSecret() *schema.Resource { @@ -34,6 +35,11 @@ func dataSourceAwsSecretsManagerSecret() *schema.Resource { Optional: true, Computed: true, }, + "policy": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "rotation_enabled": { Type: schema.TypeBool, Computed: true, @@ -104,6 +110,23 @@ func dataSourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interfac d.Set("rotation_enabled", output.RotationEnabled) d.Set("rotation_lambda_arn", output.RotationLambdaARN) + pIn := &secretsmanager.GetResourcePolicyInput{ + SecretId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Reading Secrets Manager Secret policy: %s", pIn) + pOut, err := conn.GetResourcePolicy(pIn) + if err != nil { + return fmt.Errorf("error reading Secrets Manager Secret policy: %s", err) + } + + if pOut.ResourcePolicy != nil { + policy, err := structure.NormalizeJsonString(aws.StringValue(pOut.ResourcePolicy)) + if err != nil { + return fmt.Errorf("policy contains an invalid JSON: %s", err) + } + d.Set("policy", policy) + } + if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { return fmt.Errorf("error setting rotation_rules: %s", err) } diff --git a/aws/data_source_aws_secretsmanager_secret_test.go b/aws/data_source_aws_secretsmanager_secret_test.go index 7a0b24a5647..24e9c7f7da0 100644 --- a/aws/data_source_aws_secretsmanager_secret_test.go +++ b/aws/data_source_aws_secretsmanager_secret_test.go @@ -69,6 +69,25 @@ func TestAccDataSourceAwsSecretsManagerSecret_Name(t *testing.T) { }) } +func TestAccDataSourceAwsSecretsManagerSecret_Policy(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_secretsmanager_secret.test" + datasourceName := "data.aws_secretsmanager_secret.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccDataSourceAwsSecretsManagerSecretConfig_Policy(rName), + Check: resource.ComposeTestCheckFunc( + testAccDataSourceAwsSecretsManagerSecretCheck(datasourceName, resourceName), + ), + }, + }, + }) +} + func testAccDataSourceAwsSecretsManagerSecretCheck(datasourceName, resourceName string) resource.TestCheckFunc { return func(s *terraform.State) error { resource, ok := s.RootModule().Resources[datasourceName] @@ -86,6 +105,7 @@ func testAccDataSourceAwsSecretsManagerSecretCheck(datasourceName, resourceName "description", "kms_key_id", "name", + "policy", "rotation_enabled", "rotation_lambda_arn", "rotation_rules.#", @@ -148,6 +168,36 @@ data "aws_secretsmanager_secret" "test" { `, rName) } +func testAccDataSourceAwsSecretsManagerSecretConfig_Policy(rName string) string { + return fmt.Sprintf(` +resource "aws_secretsmanager_secret" "test" { + name = "%[1]s" + + policy = < Date: Mon, 8 Oct 2018 14:37:15 -0400 Subject: [PATCH 2770/3316] Update CHANGELOG for #6070 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74002f70521..ff8e353e5db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,9 @@ FEATURES: ENHANCEMENTS: * data-source/aws_iam_policy_document: Make `statement` argument optional [GH-6052] +* data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] +* resource/aws_secretsmanager_secret_version: Add `secret_binary` argument [GH-6070] BUG FIXES: From 32dafb1c176ba474d00858f0ca0571291a11499f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bie=C5=84kowski?= Date: Fri, 31 Aug 2018 17:06:17 +0200 Subject: [PATCH 2771/3316] Add support for PlatformArn to ElasticBeanstalk --- ...ource_aws_elastic_beanstalk_environment.go | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_elastic_beanstalk_environment.go b/aws/resource_aws_elastic_beanstalk_environment.go index 1a556fdd984..7ca3d656ec8 100644 --- a/aws/resource_aws_elastic_beanstalk_environment.go +++ b/aws/resource_aws_elastic_beanstalk_environment.go @@ -121,12 +121,17 @@ func resourceAwsElasticBeanstalkEnvironment() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ConflictsWith: []string{"template_name"}, + ConflictsWith: []string{"platform_arn", "template_name"}, + }, + "platform_arn": { + Type: schema.TypeString, + Optional: true, + ConflictsWith: []string{"solution_stack_name", "template_name"}, }, "template_name": { Type: schema.TypeString, Optional: true, - ConflictsWith: []string{"solution_stack_name"}, + ConflictsWith: []string{"solution_stack_name", "platform_arn"}, }, "wait_for_ready_timeout": { Type: schema.TypeString, @@ -211,6 +216,7 @@ func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta i version := d.Get("version_label").(string) settings := d.Get("setting").(*schema.Set) solutionStack := d.Get("solution_stack_name").(string) + platformArn := d.Get("platform_arn").(string) templateName := d.Get("template_name").(string) // TODO set tags @@ -254,6 +260,10 @@ func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta i createOpts.SolutionStackName = aws.String(solutionStack) } + if platformArn != "" { + createOpts.PlatformArn = aws.String(platformArn) + } + if templateName != "" { createOpts.TemplateName = aws.String(templateName) } @@ -400,6 +410,13 @@ func resourceAwsElasticBeanstalkEnvironmentUpdate(d *schema.ResourceData, meta i updateOpts.OptionSettings = add } + if d.HasChange("platform_arn") { + hasChange = true + if v, ok := d.GetOk("platform_arn"); ok { + updateOpts.PlatformArn = aws.String(v.(string)) + } + } + if d.HasChange("template_name") { hasChange = true if v, ok := d.GetOk("template_name"); ok { From e0cfdc8d07460938244bc7a3ee5388e6b0c14d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bie=C5=84kowski?= Date: Mon, 8 Oct 2018 19:19:50 +0200 Subject: [PATCH 2772/3316] Add docs for platform_arn parameter --- website/docs/r/elastic_beanstalk_environment.html.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/docs/r/elastic_beanstalk_environment.html.markdown b/website/docs/r/elastic_beanstalk_environment.html.markdown index c7ffc4eafc4..c7dd63d29c4 100644 --- a/website/docs/r/elastic_beanstalk_environment.html.markdown +++ b/website/docs/r/elastic_beanstalk_environment.html.markdown @@ -50,6 +50,8 @@ The following arguments are supported: off of. Example stacks can be found in the [Amazon API documentation][1] * `template_name` – (Optional) The name of the Elastic Beanstalk Configuration template to use in deployment +* `platform_arn` – (Optional) The [ARN][2] of the Elastic Beanstalk [Platform][3] + to use in deployment * `wait_for_ready_timeout` - (Default: `20m`) The maximum [duration](https://golang.org/pkg/time/#ParseDuration) that Terraform should wait for an Elastic Beanstalk Environment to be in a ready state before timing @@ -126,7 +128,8 @@ In addition to all arguments above, the following attributes are exported: [1]: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html - +[2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html +[3]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-beanstalk-environment.html#cfn-beanstalk-environment-platformarn ## Import From 0bc8f7ebf7a7a0beaae70899aabb007b1a0448cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bie=C5=84kowski?= Date: Mon, 8 Oct 2018 20:36:00 +0200 Subject: [PATCH 2773/3316] Cover new parameter with acceptance test --- ..._aws_elastic_beanstalk_environment_test.go | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_elastic_beanstalk_environment_test.go b/aws/resource_aws_elastic_beanstalk_environment_test.go index b8058e2e46b..ef74be189c0 100644 --- a/aws/resource_aws_elastic_beanstalk_environment_test.go +++ b/aws/resource_aws_elastic_beanstalk_environment_test.go @@ -173,7 +173,6 @@ func TestAccAWSBeanstalkEnv_basic(t *testing.T) { }, }, }) - } func TestAccAWSBeanstalkEnv_tier(t *testing.T) { @@ -539,6 +538,32 @@ func TestAccAWSBeanstalkEnv_settingWithJsonValue(t *testing.T) { }) } +func TestAccAWSBeanstalkEnv_platformArn(t *testing.T) { + var app elasticbeanstalk.EnvironmentDescription + + rString := acctest.RandString(8) + appName := fmt.Sprintf("tf_acc_app_env_platform_arn_%s", rString) + envName := fmt.Sprintf("tf-acc-env-platform-arn-%s", rString) + platformArn := "arn:aws:elasticbeanstalk:us-east-1::platform/Go 1 running on 64bit Amazon Linux/2.9.0" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckBeanstalkEnvDestroy, + Steps: []resource.TestStep{ + { + Config: testAccBeanstalkEnvConfig_platform_arn(appName, envName, platformArn), + Check: resource.ComposeTestCheckFunc( + testAccCheckBeanstalkEnvExists("aws_elastic_beanstalk_environment.tfenvtest", &app), + resource.TestMatchResourceAttr( + "aws_elastic_beanstalk_environment.tfenvtest", "platform_arn", + regexp.MustCompile(fmt.Sprintf("^%s$", platformArn))), + ), + }, + }, + }) +} + func testAccVerifyBeanstalkConfig(env *elasticbeanstalk.EnvironmentDescription, expected []string) resource.TestCheckFunc { return func(s *terraform.State) error { if env == nil { @@ -810,6 +835,26 @@ func testAccBeanstalkEnvConfig(appName, envName string) string { `, appName, envName) } +func testAccBeanstalkEnvConfig_platform_arn(appName, envName, platformArn string) string { + return fmt.Sprintf(` +provider "aws" { + region = "us-east-1" +} + +resource "aws_elastic_beanstalk_application" "tftest" { + name = "%s" + description = "tf-test-desc" +} + +resource "aws_elastic_beanstalk_environment" "tfenvtest" { + name = "%s" + application = "${aws_elastic_beanstalk_application.tftest.name}" + platform_arn = "%s" + depends_on = ["aws_elastic_beanstalk_application.tftest"] +} +`, appName, envName, platformArn) +} + func testAccBeanstalkEnvConfig_empty_settings(appName, envName string) string { return fmt.Sprintf(` resource "aws_elastic_beanstalk_application" "tftest" { From 757060799d2b05712c3741d2fcd9bcdeeffb42dc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 14:44:31 -0400 Subject: [PATCH 2774/3316] Update secretsmanager_secret_version.html.markdown --- website/docs/d/secretsmanager_secret_version.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/d/secretsmanager_secret_version.html.markdown b/website/docs/d/secretsmanager_secret_version.html.markdown index 004f71d00db..47ce1dac848 100644 --- a/website/docs/d/secretsmanager_secret_version.html.markdown +++ b/website/docs/d/secretsmanager_secret_version.html.markdown @@ -42,5 +42,5 @@ data "aws_secretsmanager_secret_version" "by-version-stage" { * `arn` - The ARN of the secret. * `id` - The unique identifier of this version of the secret. * `secret_string` - The decrypted part of the protected secret information that was originally provided as a string. -* `secret_binary` - The decrypted part of the protected secret information that was originally provided as a binary. +* `secret_binary` - The decrypted part of the protected secret information that was originally provided as a binary. Base64 encoded. * `version_id` - The unique identifier of this version of the secret. From 5d31f2ebcbc183fc33827549426bf2d8749d90b3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 14:48:14 -0400 Subject: [PATCH 2775/3316] resource/aws_security_group_rule: Simplify State Importer function to not perform duplicate read --- aws/resource_aws_security_group_rule.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/aws/resource_aws_security_group_rule.go b/aws/resource_aws_security_group_rule.go index fcbbe3f0a3b..2a285bd289b 100644 --- a/aws/resource_aws_security_group_rule.go +++ b/aws/resource_aws_security_group_rule.go @@ -33,14 +33,7 @@ func resourceAwsSecurityGroupRule() *schema.Resource { if err := populateSecurityGroupRuleFromImport(d, importParts); err != nil { return nil, err } - err = resourceAwsSecurityGroupRuleRead(d, meta) - if err != nil { - return nil, err - } - - results := make([]*schema.ResourceData, 1) - results[0] = d - return results, nil + return []*schema.ResourceData{d}, nil }, }, From 4d7d210f3643b7434db01fe189ff2424d16ae3f2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 15:48:01 -0400 Subject: [PATCH 2776/3316] Update CHANGELOG for #6027 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff8e353e5db..53696578466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: * data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] * resource/aws_secretsmanager_secret_version: Add `secret_binary` argument [GH-6070] +* resource/aws_security_group_rule: Support resource import [GH-6027] BUG FIXES: From 06343b6dce74cdf9ea4838bdd9ccf96e4fde529c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bie=C5=84kowski?= Date: Mon, 8 Oct 2018 22:16:04 +0200 Subject: [PATCH 2777/3316] PR review --- aws/resource_aws_elastic_beanstalk_environment.go | 4 ++++ aws/resource_aws_elastic_beanstalk_environment_test.go | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_elastic_beanstalk_environment.go b/aws/resource_aws_elastic_beanstalk_environment.go index 7ca3d656ec8..8ea6792ec05 100644 --- a/aws/resource_aws_elastic_beanstalk_environment.go +++ b/aws/resource_aws_elastic_beanstalk_environment.go @@ -625,6 +625,10 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int return err } + if err := d.Set("platform_arn", env.PlatformArn); err != nil { + return err + } + if err := d.Set("autoscaling_groups", flattenBeanstalkAsg(resources.EnvironmentResources.AutoScalingGroups)); err != nil { return err } diff --git a/aws/resource_aws_elastic_beanstalk_environment_test.go b/aws/resource_aws_elastic_beanstalk_environment_test.go index ef74be189c0..a411d1ff53a 100644 --- a/aws/resource_aws_elastic_beanstalk_environment_test.go +++ b/aws/resource_aws_elastic_beanstalk_environment_test.go @@ -555,9 +555,7 @@ func TestAccAWSBeanstalkEnv_platformArn(t *testing.T) { Config: testAccBeanstalkEnvConfig_platform_arn(appName, envName, platformArn), Check: resource.ComposeTestCheckFunc( testAccCheckBeanstalkEnvExists("aws_elastic_beanstalk_environment.tfenvtest", &app), - resource.TestMatchResourceAttr( - "aws_elastic_beanstalk_environment.tfenvtest", "platform_arn", - regexp.MustCompile(fmt.Sprintf("^%s$", platformArn))), + resource.TestCheckResourceAttr("aws_elastic_beanstalk_environment.tfenvtest", "platform_arn", platformArn), ), }, }, @@ -849,8 +847,7 @@ resource "aws_elastic_beanstalk_application" "tftest" { resource "aws_elastic_beanstalk_environment" "tfenvtest" { name = "%s" application = "${aws_elastic_beanstalk_application.tftest.name}" - platform_arn = "%s" - depends_on = ["aws_elastic_beanstalk_application.tftest"] + platform_arn = "%s" } `, appName, envName, platformArn) } From 046cc1b4db85c5dcf5504b5b504d531954ce18bc Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Mon, 8 Oct 2018 18:13:59 -0400 Subject: [PATCH 2778/3316] implement tags, code cleanup (thanks @bflad!) --- ...source_aws_redshift_snapshot_copy_grant.go | 50 +++++------ ...e_aws_redshift_snapshot_copy_grant_test.go | 49 +++++++++-- website/aws.erb | 4 + ...redshift_snapshot_copy_grant.html.markdown | 84 +------------------ 4 files changed, 69 insertions(+), 118 deletions(-) diff --git a/aws/resource_aws_redshift_snapshot_copy_grant.go b/aws/resource_aws_redshift_snapshot_copy_grant.go index a36939d4a34..8a61374287b 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -32,6 +32,11 @@ func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { ForceNew: true, Computed: true, }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, }, } } @@ -49,30 +54,22 @@ func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta int input.KmsKeyId = aws.String(v.(string)) } + input.Tags = tagsFromMapRedshift(d.Get("tags").(map[string]interface{})) + log.Printf("[DEBUG]: Adding new Redshift SnapshotCopyGrant: %s", input) var out *redshift.CreateSnapshotCopyGrantOutput + var err error - err := resource.Retry(3*time.Minute, func() *resource.RetryError { - var err error - - out, err = conn.CreateSnapshotCopyGrant(&input) - - if err != nil { - log.Printf("[ERROR] An error occured creating new AWS Redshift SnapshotCopyGrant: %s", err) - return resource.NonRetryableError(err) - } - return nil - }) + out, err = conn.CreateSnapshotCopyGrant(&input) if err != nil { + log.Printf("[ERROR] An error occured creating new AWS Redshift SnapshotCopyGrant: %s", err) return err } log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrant.SnapshotCopyGrantName) d.SetId(grantName) - d.Set("snapshot_copy_grant_name", out.SnapshotCopyGrant.SnapshotCopyGrantName) - d.Set("kms_key_id", out.SnapshotCopyGrant.KmsKeyId) return resourceAwsRedshiftSnapshotCopyGrantRead(d, meta) } @@ -94,8 +91,10 @@ func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta inter return nil } - if *grant.KmsKeyId != "" { - d.Set("kms_key_id", grant.KmsKeyId) + d.Set("kms_key_id", grant.KmsKeyId) + d.Set("snapshot_copy_grant_name", grant.SnapshotCopyGrantName) + if err := d.Set("tags", tagsToMapRedshift(grant.Tags)); err != nil { + return fmt.Errorf("Error setting Redshift Snapshot Copy Grant Tags: %#v", err) } return nil @@ -139,7 +138,7 @@ func resourceAwsRedshiftSnapshotCopyGrantExists(d *schema.ResourceData, meta int grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) if err != nil { - return true, err + return false, err } if grant != nil { return true, err @@ -173,7 +172,7 @@ func findAwsRedshiftSnapshotCopyGrantWithRetry(conn *redshift.Redshift, grantNam grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) if err != nil { - if serr, ok := err.(AwsRedshiftSnapshotCopyGrantMissingError); ok { + if serr, ok := err.(*resource.NotFoundError); ok { // Force a retry if the grant should exist return resource.RetryableError(serr) } @@ -250,17 +249,8 @@ func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string, return findAwsRedshiftSnapshotCopyGrant(conn, grantName, out.Marker) } - return nil, NewAwsRedshiftSnapshotCopyGrantMissingError(fmt.Sprintf("[DEBUG] Grant %s not found", grantName)) -} - -// Custom error, so we don't have to rely on -// the content of an error message -type AwsRedshiftSnapshotCopyGrantMissingError string - -func (e AwsRedshiftSnapshotCopyGrantMissingError) Error() string { - return e.Error() -} - -func NewAwsRedshiftSnapshotCopyGrantMissingError(msg string) AwsRedshiftSnapshotCopyGrantMissingError { - return AwsRedshiftSnapshotCopyGrantMissingError(msg) + return nil, &resource.NotFoundError{ + Message: fmt.Sprintf("[DEBUG] Grant %s not found", grantName), + LastRequest: input, + } } diff --git a/aws/resource_aws_redshift_snapshot_copy_grant_test.go b/aws/resource_aws_redshift_snapshot_copy_grant_test.go index 21f11c79b68..f9f3f4fafee 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant_test.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant_test.go @@ -4,11 +4,16 @@ import ( "fmt" "testing" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) -func TestAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { +func TestAccAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { + + rName := acctest.RandomWithPrefix("tf-acc-test") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -16,10 +21,11 @@ func TestAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { CheckDestroy: testAccCheckAWSRedshiftSnapshotCopyGrantDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSRedshiftSnapshotCopyGrant_Basic("basic"), + Config: testAccAWSRedshiftSnapshotCopyGrant_Basic(rName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRedshiftSnapshotCopyGrantExists("aws_redshift_snapshot_copy_grant.basic"), - resource.TestCheckResourceAttr("aws_redshift_snapshot_copy_grant.basic", "snapshot_copy_grant_name", "basic"), + resource.TestCheckResourceAttr("aws_redshift_snapshot_copy_grant.basic", "snapshot_copy_grant_name", rName), + resource.TestCheckResourceAttr("aws_redshift_snapshot_copy_grant.basic", "tags.Name", "tf-redshift-snapshot-copy-grant-basic"), resource.TestCheckResourceAttrSet("aws_redshift_snapshot_copy_grant.basic", "kms_key_id"), ), }, @@ -48,19 +54,48 @@ func testAccCheckAWSRedshiftSnapshotCopyGrantDestroy(s *terraform.State) error { func testAccCheckAWSRedshiftSnapshotCopyGrantExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("not found: %s", name) } + if rs.Primary.ID == "" { + return fmt.Errorf("Snapshot Copy Grant ID (SnapshotCopyGrantName) is not set") + } + + // retrieve the client from the test provider + conn := testAccProvider.Meta().(*AWSClient).redshiftconn + + input := redshift.DescribeSnapshotCopyGrantsInput{ + MaxRecords: aws.Int64(int64(100)), + SnapshotCopyGrantName: aws.String(rs.Primary.ID), + } + + response, err := conn.DescribeSnapshotCopyGrants(&input) + + if err != nil { + return err + } + + // we expect only a single snapshot copy grant by this ID. If we find zero, or many, + // then we consider this an error + if len(response.SnapshotCopyGrants) != 1 || + *response.SnapshotCopyGrants[0].SnapshotCopyGrantName != rs.Primary.ID { + return fmt.Errorf("Snapshot copy grant not found") + } + return nil } } func testAccAWSRedshiftSnapshotCopyGrant_Basic(rName string) string { return fmt.Sprintf(` -resource "aws_redshift_snapshot_copy_grant" "%s" { - snapshot_copy_grant_name = "%s" +resource "aws_redshift_snapshot_copy_grant" "basic" { + snapshot_copy_grant_name = "%s" + + tags { + Name = "tf-redshift-snapshot-copy-grant-basic" + } } -`, rName, rName) +`, rName) } diff --git a/website/aws.erb b/website/aws.erb index 141cef15c67..1d08cd36345 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1796,6 +1796,10 @@ aws_redshift_security_group + > + aws_redshift_snapshot_copy_grant + + > aws_redshift_subnet_group diff --git a/website/docs/r/redshift_snapshot_copy_grant.html.markdown b/website/docs/r/redshift_snapshot_copy_grant.html.markdown index 4506baad950..7fc5b6469fb 100644 --- a/website/docs/r/redshift_snapshot_copy_grant.html.markdown +++ b/website/docs/r/redshift_snapshot_copy_grant.html.markdown @@ -16,92 +16,14 @@ Note that the grant must exist in the destination region, and not in the region ```hcl resource "aws_redshift_snapshot_copy_grant" "test" { - snapshot_copy_grant_name = "my-grant" -} - -resource "aws_redshift_parameter_group" "test" { - name = "main" - family = "redshift-1.0" - - parameter { - name = "require_ssl" - value = true - } -} - -resource "aws_vpc" "test" { - cidr_block = "10.0.0.0/16" - enable_dns_hostnames = true - tags { - Name = "test" - } -} - -variable "test_subnet_count" { - default = 2 -} - -resource "aws_subnet" "test" { - vpc_id = "${aws_vpc.test.id}" - count = "${var.test_subnet_count}" - cidr_block = "${cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)}" - availability_zone = "${data.aws_availability_zones.available.names[count.index]}" - - tags { - Name = "${data.aws_availability_zones.available.names[count.index]}-private-test" - } -} - -resource "aws_redshift_subnet_group" "test" { - name = "test" - subnet_ids = ["${aws_subnet.test.*.id}"] - - tags = { - Name = "test-subnet-group" - } -} - -resource "aws_security_group" "test" { - name = "test" - - description = "Managed by Terraform" - vpc_id = "${aws_vpc.test.id}" - - # only postgres in - ingress { - from_port = 5432 - to_port = 5432 - protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] - } - - # allow all outbound traffic - egress { - from_port = 0 - to_port = 0 - protocol = "-1" - cidr_blocks = ["0.0.0.0/0"] - } + snapshot_copy_grant_name = "my-grant" } resource "aws_redshift_cluster" "test" { - cluster_identifier = "test" - database_name = "test" - node_type = "dc1.large" - cluster_type = "single-node" - master_username = "test" - master_password = "Test12345Test" - vpc_security_group_ids = ["${aws_security_group.test.id}"] - cluster_subnet_group_name = "${aws_redshift_subnet_group.test.id}" - cluster_parameter_group_name = "${aws_redshift_parameter_group.test.name}" - automated_snapshot_retention_period = 3 # days - port = 5432 - allow_version_upgrade = true - publicly_accessible = false - encrypted = true + # ... other configuration ... snapshot_copy { destination_region = "us-east-2" - grant_name = "${aws_redshift_snapshot_copy_grant.test.snapshot_copy_grant_name}" + grant_name = "${aws_redshift_snapshot_copy_grant.test.snapshot_copy_grant_name}" } } ``` From fb5a2bda432ee205e98632f9ae167d5148962c5e Mon Sep 17 00:00:00 2001 From: KY Date: Tue, 9 Oct 2018 08:51:33 +0800 Subject: [PATCH 2779/3316] Changes based upon review --- aws/data_source_aws_secretsmanager_secret.go | 4 ++-- aws/data_source_aws_secretsmanager_secret_test.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/aws/data_source_aws_secretsmanager_secret.go b/aws/data_source_aws_secretsmanager_secret.go index feadc69b75b..1cba15188c3 100644 --- a/aws/data_source_aws_secretsmanager_secret.go +++ b/aws/data_source_aws_secretsmanager_secret.go @@ -37,7 +37,6 @@ func dataSourceAwsSecretsManagerSecret() *schema.Resource { }, "policy": { Type: schema.TypeString, - Optional: true, Computed: true, }, "rotation_enabled": { @@ -109,6 +108,7 @@ func dataSourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interfac d.Set("name", output.Name) d.Set("rotation_enabled", output.RotationEnabled) d.Set("rotation_lambda_arn", output.RotationLambdaARN) + d.Set("policy", "") pIn := &secretsmanager.GetResourcePolicyInput{ SecretId: aws.String(d.Id()), @@ -119,7 +119,7 @@ func dataSourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interfac return fmt.Errorf("error reading Secrets Manager Secret policy: %s", err) } - if pOut.ResourcePolicy != nil { + if pOut != nil && pOut.ResourcePolicy != nil { policy, err := structure.NormalizeJsonString(aws.StringValue(pOut.ResourcePolicy)) if err != nil { return fmt.Errorf("policy contains an invalid JSON: %s", err) diff --git a/aws/data_source_aws_secretsmanager_secret_test.go b/aws/data_source_aws_secretsmanager_secret_test.go index 24e9c7f7da0..55accf3ce2f 100644 --- a/aws/data_source_aws_secretsmanager_secret_test.go +++ b/aws/data_source_aws_secretsmanager_secret_test.go @@ -171,7 +171,7 @@ data "aws_secretsmanager_secret" "test" { func testAccDataSourceAwsSecretsManagerSecretConfig_Policy(rName string) string { return fmt.Sprintf(` resource "aws_secretsmanager_secret" "test" { - name = "%[1]s" + name = "%[1]s" policy = < Date: Mon, 8 Oct 2018 21:56:47 -0400 Subject: [PATCH 2780/3316] Update CHANGELOG for #6091 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53696578466..e700781c57f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ FEATURES: ENHANCEMENTS: * data-source/aws_iam_policy_document: Make `statement` argument optional [GH-6052] +* data-source/aws_secretsmanager_secret: Add `policy` attribute [GH-6091] * data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] * resource/aws_secretsmanager_secret_version: Add `secret_binary` argument [GH-6070] From a4dc319df8f19b1e34dc09a303725989e6dfff1d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 22:11:40 -0400 Subject: [PATCH 2781/3316] resource/aws_redshift_snapshot_copy_grant: Fix linting issue and return context with any error message during creation to operator --- aws/resource_aws_redshift_snapshot_copy_grant.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aws/resource_aws_redshift_snapshot_copy_grant.go b/aws/resource_aws_redshift_snapshot_copy_grant.go index 8a61374287b..0e0b750c081 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -64,8 +64,7 @@ func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta int out, err = conn.CreateSnapshotCopyGrant(&input) if err != nil { - log.Printf("[ERROR] An error occured creating new AWS Redshift SnapshotCopyGrant: %s", err) - return err + return fmt.Errorf("error creating Redshift Snapshot Copy Grant (%s): %s", grantName, err) } log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrant.SnapshotCopyGrantName) From 915afe04aec13a095f1c716732d2698ef478110a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 22:12:58 -0400 Subject: [PATCH 2782/3316] Update CHANGELOG for #5134 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e700781c57f..ca05417fbd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ FEATURES: * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] * **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] * **New Resource:** `aws_pinpoint_sms_channel` [GH-6088] +* **New Resource:** `aws_redshift__snapshot_copy_grant` [GH-5134] ENHANCEMENTS: From e0a315f3e9dd37b84e88e07e6aa0862517acf3a3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 22:13:16 -0400 Subject: [PATCH 2783/3316] Typo fix in CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca05417fbd3..f1aa8e18bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ FEATURES: * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] * **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] * **New Resource:** `aws_pinpoint_sms_channel` [GH-6088] -* **New Resource:** `aws_redshift__snapshot_copy_grant` [GH-5134] +* **New Resource:** `aws_redshift_snapshot_copy_grant` [GH-5134] ENHANCEMENTS: From 2ae7c6d339e8fe16e0bead26afb18d8a3c7afc6a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 22:33:06 -0400 Subject: [PATCH 2784/3316] Update CHANGELOG for #6094 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1aa8e18bf0..04df57ebb16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ ENHANCEMENTS: * data-source/aws_iam_policy_document: Make `statement` argument optional [GH-6052] * data-source/aws_secretsmanager_secret: Add `policy` attribute [GH-6091] * data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] +* resource/aws_lb_listener: Support Cognito and OIDC authentication [GH-6094] +* resource/aws_lb_listener_rule: Support Cognito and OIDC authentication [GH-6094] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] * resource/aws_secretsmanager_secret_version: Add `secret_binary` argument [GH-6070] * resource/aws_security_group_rule: Support resource import [GH-6027] From 1085a58b715377b4a10c836d505d14a8ce025a73 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 22:43:01 -0400 Subject: [PATCH 2785/3316] resource/aws_lb_listener: Address #5167 PR feedback --- aws/resource_aws_lb_listener.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index 914e4964091..be5e341f48c 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -513,25 +513,25 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { ListenerArns: []*string{aws.String(d.Id())}, } - err := resource.Retry(d.Timeout(schema.TimeoutRead), func() *resource.RetryError { + err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error resp, err = elbconn.DescribeListeners(request) + if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { + return resource.RetryableError(err) + } if err != nil { - if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { - return resource.RetryableError(err) - } else { - return resource.NonRetryableError(err) - } + return resource.NonRetryableError(err) } return nil }) + if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { + log.Printf("[WARN] ELBv2 Listener (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if !d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { - log.Printf("[WARN] DescribeListeners - removing %s from state", d.Id()) - d.SetId("") - return nil - } return fmt.Errorf("Error retrieving Listener: %s", err) } From 2b3699c61f86e2ad4e47a1dde2d4c0e1c0021142 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 23:14:33 -0400 Subject: [PATCH 2786/3316] Update CHANGELOG for #5167 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04df57ebb16..c6b2bff017e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ BUG FIXES: * resource/aws_appsync_datasource: Properly pass all attributes during update [GH-5814] * resource/aws_batch_job_queue: Prevent error during read of non-existent Job Queue [GH-6085] * resource/aws_ecs_service: Properly remove non-existent services from Terraform state [GH-6039] +* resource/aws_lb_listener: Retry read for eventual consistency after resource creation [GH-5167] ## 1.39.0 (October 03, 2018) From f370c28f58f7197ab3a3e26747489c95023dfeb5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 23:46:18 -0400 Subject: [PATCH 2787/3316] data-source/aws_workspaces_bundle: Address #3243 PR feedback ``` --- PASS: TestAccDataSourceAwsWorkspaceBundle_basic (8.84s) ``` --- aws/config.go | 4 +- aws/data_source_aws_workspaces_bundle.go | 42 +++++++++++-------- aws/data_source_aws_workspaces_bundle_test.go | 30 ++++++++----- .../docs/d/workspaces_bundle.html.markdown | 6 +-- 4 files changed, 50 insertions(+), 32 deletions(-) diff --git a/aws/config.go b/aws/config.go index 63ef93df944..4478ba29d5c 100644 --- a/aws/config.go +++ b/aws/config.go @@ -242,7 +242,7 @@ type AWSClient struct { neptuneconn *neptune.Neptune pricingconn *pricing.Pricing pinpointconn *pinpoint.Pinpoint - wsconn *workspaces.WorkSpaces + workspacesconn *workspaces.WorkSpaces } func (c *AWSClient) S3() *s3.S3 { @@ -568,7 +568,7 @@ func (c *Config) Client() (interface{}, error) { client.neptuneconn = neptune.New(sess) client.pricingconn = pricing.New(sess) client.pinpointconn = pinpoint.New(sess) - client.wsconn = workspaces.New(sess) + client.workspacesconn = workspaces.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/aws/data_source_aws_workspaces_bundle.go b/aws/data_source_aws_workspaces_bundle.go index aeb5dd37e6e..0da1e52a1d8 100644 --- a/aws/data_source_aws_workspaces_bundle.go +++ b/aws/data_source_aws_workspaces_bundle.go @@ -16,7 +16,6 @@ func dataSourceAwsWorkspaceBundle() *schema.Resource { "bundle_id": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "description": { Type: schema.TypeString, @@ -31,7 +30,7 @@ func dataSourceAwsWorkspaceBundle() *schema.Resource { Computed: true, }, "compute_type": { - Type: schema.TypeSet, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -43,7 +42,7 @@ func dataSourceAwsWorkspaceBundle() *schema.Resource { }, }, "user_storage": { - Type: schema.TypeSet, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -55,7 +54,7 @@ func dataSourceAwsWorkspaceBundle() *schema.Resource { }, }, "root_storage": { - Type: schema.TypeSet, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -71,7 +70,7 @@ func dataSourceAwsWorkspaceBundle() *schema.Resource { } func dataSourceAwsWorkspaceBundleRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).wsconn + conn := meta.(*AWSClient).workspacesconn bundleID := d.Get("bundle_id").(string) input := &workspaces.DescribeWorkspaceBundlesInput{ @@ -92,26 +91,35 @@ func dataSourceAwsWorkspaceBundleRead(d *schema.ResourceData, meta interface{}) d.Set("description", bundle.Description) d.Set("name", bundle.Name) d.Set("owner", bundle.Owner) + + computeType := make([]map[string]interface{}, 1) if bundle.ComputeType != nil { - r := map[string]interface{}{ - "name": *bundle.ComputeType.Name, + computeType[0] = map[string]interface{}{ + "name": aws.StringValue(bundle.ComputeType.Name), } - ct := []map[string]interface{}{r} - d.Set("compute_type", ct) } + if err := d.Set("compute_type", computeType); err != nil { + return fmt.Errorf("error setting compute_type: %s", err) + } + + rootStorage := make([]map[string]interface{}, 1) if bundle.RootStorage != nil { - r := map[string]interface{}{ - "capacity": *bundle.RootStorage.Capacity, + rootStorage[0] = map[string]interface{}{ + "capacity": aws.StringValue(bundle.RootStorage.Capacity), } - rs := []map[string]interface{}{r} - d.Set("root_storage", rs) } + if err := d.Set("root_storage", rootStorage); err != nil { + return fmt.Errorf("error setting root_storage: %s", err) + } + + userStorage := make([]map[string]interface{}, 1) if bundle.UserStorage != nil { - r := map[string]interface{}{ - "capacity": *bundle.UserStorage.Capacity, + userStorage[0] = map[string]interface{}{ + "capacity": aws.StringValue(bundle.UserStorage.Capacity), } - us := []map[string]interface{}{r} - d.Set("user_storage", us) + } + if err := d.Set("user_storage", userStorage); err != nil { + return fmt.Errorf("error setting user_storage: %s", err) } return nil diff --git a/aws/data_source_aws_workspaces_bundle_test.go b/aws/data_source_aws_workspaces_bundle_test.go index 41daa092a45..e4e8b7d1156 100644 --- a/aws/data_source_aws_workspaces_bundle_test.go +++ b/aws/data_source_aws_workspaces_bundle_test.go @@ -1,32 +1,42 @@ package aws import ( + "fmt" "testing" "github.com/hashicorp/terraform/helper/resource" ) func TestAccDataSourceAwsWorkspaceBundle_basic(t *testing.T) { + dataSourceName := "data.aws_workspaces_bundle.test" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccDataSourceAwsWorkspaceBundleConfig, + { + Config: testAccDataSourceAwsWorkspaceBundleConfig("wsb-b0s22j3d7"), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_workspaces_bundle.test", "bundle_id", "wsb-b0s22j3d7"), - resource.TestCheckResourceAttrSet( - "data.aws_workspaces_bundle.test", "name"), - resource.TestCheckResourceAttrSet( - "data.aws_workspaces_bundle.test", "owner"), + resource.TestCheckResourceAttr(dataSourceName, "bundle_id", "wsb-b0s22j3d7"), + resource.TestCheckResourceAttr(dataSourceName, "compute_type.#", "1"), + resource.TestCheckResourceAttr(dataSourceName, "compute_type.0.name", "PERFORMANCE"), + resource.TestCheckResourceAttr(dataSourceName, "description", "Windows 7 Experience provided by Windows Server 2008 R2, 2 vCPU, 7.5GiB Memory, 100GB Storage"), + resource.TestCheckResourceAttr(dataSourceName, "name", "Performance with Windows 7"), + resource.TestCheckResourceAttr(dataSourceName, "owner", "Amazon"), + resource.TestCheckResourceAttr(dataSourceName, "root_storage.#", "1"), + resource.TestCheckResourceAttr(dataSourceName, "root_storage.0.capacity", "80"), + resource.TestCheckResourceAttr(dataSourceName, "user_storage.#", "1"), + resource.TestCheckResourceAttr(dataSourceName, "user_storage.0.capacity", "100"), ), }, }, }) } -const testAccDataSourceAwsWorkspaceBundleConfig = ` +func testAccDataSourceAwsWorkspaceBundleConfig(bundleID string) string { + return fmt.Sprintf(` data "aws_workspaces_bundle" "test" { - bundle_id = "wsb-b0s22j3d7" + bundle_id = %q +} +`, bundleID) } -` diff --git a/website/docs/d/workspaces_bundle.html.markdown b/website/docs/d/workspaces_bundle.html.markdown index 1b61a8b4ef9..4cbca348d2d 100644 --- a/website/docs/d/workspaces_bundle.html.markdown +++ b/website/docs/d/workspaces_bundle.html.markdown @@ -2,11 +2,11 @@ layout: "aws" page_title: "AWS: aws_workspaces_bundle" sidebar_current: "docs-aws-datasource-workspaces-bundle" -description: |- +description: |- Get information on a Workspaces Bundle. --- -# aws_workspaces_bundle +# Data Source: aws_workspaces_bundle Use this data source to get information about a Workspaces Bundle. @@ -22,7 +22,7 @@ data "aws_workspaces_bundle" "example" { The following arguments are supported: -* `bundle_id` – (Required, ForceNew) The ID of the bundle. +* `bundle_id` – (Required) The ID of the bundle. ## Attributes Reference From 2a0076d7f9b41f1a129b6d3f203b2ce5ff0f9bb5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 8 Oct 2018 23:48:08 -0400 Subject: [PATCH 2788/3316] Update CHANGELOG for #3243 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6b2bff017e..4b1b85d0dfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_launch_template` [GH-6064] +* **New Data Source:** `aws_workspaces_bundle` [GH-3243] * **New Resource:** `aws_pinpoint_adm_channel` [GH-6038] * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] * **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] From d75f8810900fae30add1980e98226a6b299229e2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 5 Oct 2018 16:10:53 -0400 Subject: [PATCH 2789/3316] tests/resource/aws_db_instance: Consolidate TestAccAWSDBInstance_basic and enhance --- aws/resource_aws_db_instance_test.go | 78 +++++++++++++--------------- 1 file changed, 35 insertions(+), 43 deletions(-) diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index fc1bd564cf2..2ef06c88a63 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -81,7 +81,8 @@ func testSweepDbInstances(region string) error { return nil } -func TestAccAWSDBInstance_importBasic(t *testing.T) { +func TestAccAWSDBInstance_basic(t *testing.T) { + var dbInstance1 rds.DBInstance resourceName := "aws_db_instance.bar" resource.Test(t, resource.TestCase{ @@ -91,8 +92,40 @@ func TestAccAWSDBInstance_importBasic(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccAWSDBInstanceConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSDBInstanceExists(resourceName, &dbInstance1), + testAccCheckAWSDBInstanceAttributes(&dbInstance1), + resource.TestCheckResourceAttr(resourceName, "allocated_storage", "10"), + resource.TestCheckResourceAttr(resourceName, "auto_minor_version_upgrade", "true"), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "rds", regexp.MustCompile(`db:.+`)), + resource.TestCheckResourceAttrSet(resourceName, "availability_zone"), + resource.TestCheckResourceAttr(resourceName, "backup_retention_period", "0"), + resource.TestCheckResourceAttrSet(resourceName, "backup_window"), + resource.TestCheckResourceAttrSet(resourceName, "ca_cert_identifier"), + resource.TestCheckResourceAttr(resourceName, "copy_tags_to_snapshot", "false"), + resource.TestCheckResourceAttr(resourceName, "db_subnet_group_name", "default"), + resource.TestCheckResourceAttr(resourceName, "deletion_protection", "false"), + resource.TestCheckResourceAttr(resourceName, "enabled_cloudwatch_logs_exports.#", "0"), + resource.TestCheckResourceAttrSet(resourceName, "endpoint"), + resource.TestCheckResourceAttr(resourceName, "engine", "mysql"), + resource.TestCheckResourceAttrSet(resourceName, "engine_version"), + resource.TestCheckResourceAttrSet(resourceName, "hosted_zone_id"), + resource.TestCheckResourceAttr(resourceName, "iam_database_authentication_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "instance_class", "db.t2.micro"), + resource.TestCheckResourceAttr(resourceName, "license_model", "general-public-license"), + resource.TestCheckResourceAttrSet(resourceName, "maintenance_window"), + resource.TestCheckResourceAttr(resourceName, "name", "baz"), + resource.TestCheckResourceAttr(resourceName, "option_group_name", "default:mysql-5-6"), + resource.TestCheckResourceAttr(resourceName, "parameter_group_name", "default.mysql5.6"), + resource.TestCheckResourceAttr(resourceName, "port", "3306"), + resource.TestCheckResourceAttr(resourceName, "publicly_accessible", "false"), + resource.TestCheckResourceAttrSet(resourceName, "resource_id"), + resource.TestCheckResourceAttr(resourceName, "status", "available"), + resource.TestCheckResourceAttr(resourceName, "storage_encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "tags.%", "0"), + resource.TestCheckResourceAttr(resourceName, "username", "foo"), + ), }, - { ResourceName: resourceName, ImportState: true, @@ -107,47 +140,6 @@ func TestAccAWSDBInstance_importBasic(t *testing.T) { }) } -func TestAccAWSDBInstance_basic(t *testing.T) { - var v rds.DBInstance - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDBInstanceDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSDBInstanceConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), - testAccCheckAWSDBInstanceAttributes(&v), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "allocated_storage", "10"), - resource.TestMatchResourceAttr("aws_db_instance.bar", "arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:\d{12}:db:.+`)), - resource.TestCheckResourceAttr("aws_db_instance.bar", "deletion_protection", "false"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "engine", "mysql"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "license_model", "general-public-license"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "instance_class", "db.t2.micro"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "name", "baz"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "username", "foo"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "parameter_group_name", "default.mysql5.6"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "enabled_cloudwatch_logs_exports.#", "0"), - resource.TestCheckResourceAttrSet("aws_db_instance.bar", "hosted_zone_id"), - resource.TestCheckResourceAttrSet("aws_db_instance.bar", "ca_cert_identifier"), - resource.TestCheckResourceAttrSet( - "aws_db_instance.bar", "resource_id"), - ), - }, - }, - }) -} - func TestAccAWSDBInstance_namePrefix(t *testing.T) { var v rds.DBInstance From fa0904b9c46320b5524aa539d1b4cb26a54ea5ab Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 02:22:29 -0400 Subject: [PATCH 2790/3316] resource/aws_ecr_repository: Address PR #3910 feedback ``` --- PASS: TestAccAWSEcrRepository_basic (11.92s) ``` --- aws/resource_aws_ecr_repository.go | 19 ++++++++++--------- website/docs/r/ecr_repository.html.markdown | 1 - 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_ecr_repository.go b/aws/resource_aws_ecr_repository.go index 236df9f79c6..8b540432b09 100644 --- a/aws/resource_aws_ecr_repository.go +++ b/aws/resource_aws_ecr_repository.go @@ -23,7 +23,6 @@ func resourceAwsEcrRepository() *schema.Resource { }, Timeouts: &schema.ResourceTimeout{ - Read: schema.DefaultTimeout(1 * time.Minute), Delete: schema.DefaultTimeout(20 * time.Minute), }, @@ -82,23 +81,25 @@ func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) erro RepositoryNames: []*string{aws.String(d.Id())}, } - err := resource.Retry(d.Timeout(schema.TimeoutRead), func() *resource.RetryError { + err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error out, err = conn.DescribeRepositories(input) + if d.IsNewResource() && isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { + return resource.RetryableError(err) + } if err != nil { - if d.IsNewResource() && isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - return resource.RetryableError(err) - } return resource.NonRetryableError(err) } return nil }) + if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { + log.Printf("[WARN] ECR Repository (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if !d.IsNewResource() && isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { - d.SetId("") - return nil - } return err } diff --git a/website/docs/r/ecr_repository.html.markdown b/website/docs/r/ecr_repository.html.markdown index a64ba9ea9f6..a9c173a6125 100644 --- a/website/docs/r/ecr_repository.html.markdown +++ b/website/docs/r/ecr_repository.html.markdown @@ -42,7 +42,6 @@ In addition to all arguments above, the following attributes are exported: `aws_ecr_repository` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: -- `read` - (Default `1 minute`) How long to wait for a repository to be listed after creation. - `delete` - (Default `20 minutes`) How long to wait for a repository to be deleted. ## Import From d5c5351086b40ddc3562b7cbc319ef757ddde704 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 02:25:58 -0400 Subject: [PATCH 2791/3316] Update CHANGELOG for #3910 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b1b85d0dfe..2d24a996fdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ENHANCEMENTS: * data-source/aws_iam_policy_document: Make `statement` argument optional [GH-6052] * data-source/aws_secretsmanager_secret: Add `policy` attribute [GH-6091] * data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] +* resource/aws_ecr_repository: Add configurable `delete` timeout [GH-3910] * resource/aws_lb_listener: Support Cognito and OIDC authentication [GH-6094] * resource/aws_lb_listener_rule: Support Cognito and OIDC authentication [GH-6094] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] @@ -26,6 +27,7 @@ BUG FIXES: * resource/aws_appautoscaling_policy: Properly handle negative values in step scaling metric intervals [GH-3480] * resource/aws_appsync_datasource: Properly pass all attributes during update [GH-5814] * resource/aws_batch_job_queue: Prevent error during read of non-existent Job Queue [GH-6085] +* resource/aws_ecr_repository: Retry read for eventual consistency after resource creation [GH-3910] * resource/aws_ecs_service: Properly remove non-existent services from Terraform state [GH-6039] * resource/aws_lb_listener: Retry read for eventual consistency after resource creation [GH-5167] From fb673bd0ae17b9f178f11f468ab90d8e9ec3dccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bie=C5=84kowski?= Date: Tue, 9 Oct 2018 09:54:26 +0200 Subject: [PATCH 2792/3316] Use computed: true with new platform_arn parameter --- aws/resource_aws_elastic_beanstalk_environment.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_elastic_beanstalk_environment.go b/aws/resource_aws_elastic_beanstalk_environment.go index 8ea6792ec05..ae7ae16d518 100644 --- a/aws/resource_aws_elastic_beanstalk_environment.go +++ b/aws/resource_aws_elastic_beanstalk_environment.go @@ -126,6 +126,7 @@ func resourceAwsElasticBeanstalkEnvironment() *schema.Resource { "platform_arn": { Type: schema.TypeString, Optional: true, + Computed: true, ConflictsWith: []string{"solution_stack_name", "template_name"}, }, "template_name": { From c72089459c1452dc39e9e70d12f41aa47ef83d3b Mon Sep 17 00:00:00 2001 From: Joakim Bomelin Date: Fri, 5 Oct 2018 15:19:15 +0200 Subject: [PATCH 2793/3316] Add Retry to instanceProfileAddRole to handle IAM's eventual consistency --- aws/resource_aws_iam_instance_profile.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_iam_instance_profile.go b/aws/resource_aws_iam_instance_profile.go index f2a5282fee6..7414ddd29da 100644 --- a/aws/resource_aws_iam_instance_profile.go +++ b/aws/resource_aws_iam_instance_profile.go @@ -160,18 +160,19 @@ func instanceProfileAddRole(iamconn *iam.IAM, profileName, roleName string) erro RoleName: aws.String(roleName), } - var createResp *iam.AddRoleToInstanceProfileOutput err := resource.Retry(30*time.Second, func() *resource.RetryError { var err error - createResp, err = iamconn.AddRoleToInstanceProfile(request) - - // Todo: handle retryable and non-retryable errors - // if isAWSErr(err, "MalformedPolicyDocument", "Invalid principal in policy") { - // return resource.RetryableError(err) - // } - //return resource.NonRetryableError(err) - - return resource.RetryableError(err) + _, err = iamconn.AddRoleToInstanceProfile(request) + // IAM unfortunately does not provide a better error code or message for eventual consistency + // InvalidParameterValue: Value (XXX) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name + // NoSuchEntity: The request was rejected because it referenced an entity that does not exist. The error message describes the entity. HTTP Status Code: 404 + if isAWSErr(err, "InvalidParameterValue", "Invalid IAM Instance Profile name") || isAWSErr(err, "NoSuchEntity", "The role with name") { + return resource.RetryableError(err) + } + if err != nil { + return resource.NonRetryableError(err) + } + return nil }) if err != nil { return fmt.Errorf("Error adding IAM Role %s to Instance Profile %s: %s", roleName, profileName, err) From aff48a7ae1ac04468962808f1af8cf7bd320151f Mon Sep 17 00:00:00 2001 From: Tobias Rask Date: Tue, 9 Oct 2018 12:59:10 +0300 Subject: [PATCH 2794/3316] Fix typo in AWS Glue Catalog documentation Descriptions are mixed between `parameters` and `serialization_library` in `ser_de_info` section. --- website/docs/r/glue_catalog_table.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/glue_catalog_table.html.markdown b/website/docs/r/glue_catalog_table.html.markdown index 0ed5fcb16b9..ad61b16ada4 100644 --- a/website/docs/r/glue_catalog_table.html.markdown +++ b/website/docs/r/glue_catalog_table.html.markdown @@ -60,8 +60,8 @@ The following arguments are supported: ##### ser_de_info * `name` - (Optional) Name of the SerDe. -* `parameters` - (Optional) Usually the class that implements the SerDe. An example is: org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe. -* `serialization_library` - (Optional) A list of initialization parameters for the SerDe, in key-value form. +* `parameters` - (Optional) A map of initialization parameters for the SerDe, in key-value form. +* `serialization_library` - (Optional) Usually the class that implements the SerDe. An example is: org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe. ##### sort_column From a15c50770d0f7a9d5efd5b8b51ffce8542ff8a2b Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Tue, 9 Oct 2018 21:24:53 +1100 Subject: [PATCH 2795/3316] Fix gofmt errors --- aws/resource_aws_mq_broker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_mq_broker.go b/aws/resource_aws_mq_broker.go index c2ae512fdf9..0a2425916a4 100644 --- a/aws/resource_aws_mq_broker.go +++ b/aws/resource_aws_mq_broker.go @@ -166,7 +166,7 @@ func resourceAwsMqBroker() *schema.Resource { Computed: true, }, "ip_address": { - Type: schema.TypeString, + Type: schema.TypeString, Computed: true, }, "endpoints": { From d0c4bd914273cc35cca060bfef5f21e8ea2973a6 Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Tue, 9 Oct 2018 21:41:55 +1100 Subject: [PATCH 2796/3316] Added IP address property to tests --- aws/resource_aws_mq_broker_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aws/resource_aws_mq_broker_test.go b/aws/resource_aws_mq_broker_test.go index 8e46e1a9ab8..ed8b4c1314d 100644 --- a/aws/resource_aws_mq_broker_test.go +++ b/aws/resource_aws_mq_broker_test.go @@ -276,6 +276,8 @@ func TestAccAWSMqBroker_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.#", "1"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), + resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.ip_address", + regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.0.endpoints.#", "5"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), @@ -348,6 +350,8 @@ func TestAccAWSMqBroker_allFieldsDefaultVpc(t *testing.T) { resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.#", "2"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), + resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.ip_address", + regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.0.endpoints.#", "5"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), @@ -356,6 +360,8 @@ func TestAccAWSMqBroker_allFieldsDefaultVpc(t *testing.T) { resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), + resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.ip_address", + regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.1.endpoints.#", "5"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), @@ -450,6 +456,8 @@ func TestAccAWSMqBroker_allFieldsCustomVpc(t *testing.T) { resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.#", "2"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), + resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.ip_address", + regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.0.endpoints.#", "5"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), @@ -458,6 +466,8 @@ func TestAccAWSMqBroker_allFieldsCustomVpc(t *testing.T) { resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.0.endpoints.4", regexp.MustCompile(`^wss://[a-z0-9-\.]+:61619$`)), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.console_url", regexp.MustCompile(`^https://[a-f0-9-]+\.mq.[a-z0-9-]+.amazonaws.com:8162$`)), + resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.ip_address", + regexp.MustCompile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)), resource.TestCheckResourceAttr("aws_mq_broker.test", "instances.1.endpoints.#", "5"), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.0", regexp.MustCompile(`^ssl://[a-z0-9-\.]+:61617$`)), resource.TestMatchResourceAttr("aws_mq_broker.test", "instances.1.endpoints.1", regexp.MustCompile(`^amqp\+ssl://[a-z0-9-\.]+:5671$`)), From 1bb5a0553b7eda56eb73d552d80c05d2e6a9f86e Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Tue, 9 Oct 2018 21:42:05 +1100 Subject: [PATCH 2797/3316] Update documentation --- website/docs/r/mq_broker.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/docs/r/mq_broker.html.markdown b/website/docs/r/mq_broker.html.markdown index 700fac0f97c..0bbc1d6e543 100644 --- a/website/docs/r/mq_broker.html.markdown +++ b/website/docs/r/mq_broker.html.markdown @@ -56,7 +56,7 @@ The following arguments are supported: * `configuration` - (Optional) Configuration of the broker. See below. * `deployment_mode` - (Optional) The deployment mode of the broker. Supported: `SINGLE_INSTANCE` and `ACTIVE_STANDBY_MULTI_AZ`. Defaults to `SINGLE_INSTANCE`. * `engine_type` - (Required) The type of broker engine. Currently, Amazon MQ supports only `ActiveMQ`. -* `engine_version` - (Required) The version of the broker engine. Currently, Amazon MQ supports only `5.15.0`. +* `engine_version` - (Required) The version of the broker engine. Currently, Amazon MQ supports only `5.15.0` or `5.15.6`. * `host_instance_type` - (Required) The broker's instance type. e.g. `mq.t2.micro` or `mq.m4.large` * `publicly_accessible` - (Optional) Whether to enable connections from applications outside of the VPC that hosts the broker's subnets. * `security_groups` - (Required) The list of security group IDs assigned to the broker. @@ -92,6 +92,7 @@ In addition to all arguments above, the following attributes are exported: * `arn` - The ARN of the broker. * `instances` - A list of information about allocated brokers (both active & standby). * `instances.0.console_url` - The URL of the broker's [ActiveMQ Web Console](http://activemq.apache.org/web-console.html). + * `instances.0.ip_address` - The IP Address of the broker. * `instances.0.endpoints` - The broker's wire-level protocol endpoints in the following order & format referenceable e.g. as `instances.0.endpoints.0` (SSL): * `ssl://broker-id.mq.us-west-2.amazonaws.com:61617` * `amqp+ssl://broker-id.mq.us-west-2.amazonaws.com:5671` From ae3310aacee153d73888f5332ebb917036fd588d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 10:05:36 -0400 Subject: [PATCH 2798/3316] Update CHANGELOG for #6079 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d24a996fdc..83692a2e011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ BUG FIXES: * resource/aws_batch_job_queue: Prevent error during read of non-existent Job Queue [GH-6085] * resource/aws_ecr_repository: Retry read for eventual consistency after resource creation [GH-3910] * resource/aws_ecs_service: Properly remove non-existent services from Terraform state [GH-6039] +* resource/aws_iam_instance_profile: Retry for eventual consistency when adding a role [GH-6079] * resource/aws_lb_listener: Retry read for eventual consistency after resource creation [GH-5167] ## 1.39.0 (October 03, 2018) From c5c262b78fa4e6db11a75ba2d00af89543e5136a Mon Sep 17 00:00:00 2001 From: KY Date: Tue, 9 Oct 2018 20:43:33 +0800 Subject: [PATCH 2799/3316] Rework the test for codebuild certificate --- aws/resource_aws_codebuild_project.go | 4 +-- aws/resource_aws_codebuild_project_test.go | 30 ++++++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index ff2092b6468..76df4277189 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -992,7 +992,7 @@ func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnviron envConfig["type"] = *environment.Type envConfig["compute_type"] = *environment.ComputeType envConfig["image"] = *environment.Image - envConfig["certificate"] = *environment.Certificate + envConfig["certificate"] = aws.StringValue(environment.Certificate) envConfig["privileged_mode"] = *environment.PrivilegedMode if environment.EnvironmentVariables != nil { @@ -1074,13 +1074,11 @@ func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { environmentType := m["type"].(string) computeType := m["compute_type"].(string) image := m["image"].(string) - certificate := m["certificate"].(string) privilegedMode := m["privileged_mode"].(bool) environmentVariables := m["environment_variable"].([]interface{}) buf.WriteString(fmt.Sprintf("%s-", environmentType)) buf.WriteString(fmt.Sprintf("%s-", computeType)) buf.WriteString(fmt.Sprintf("%s-", image)) - buf.WriteString(fmt.Sprintf("%s-", certificate)) buf.WriteString(fmt.Sprintf("%t-", privilegedMode)) for _, e := range environmentVariables { if e != nil { // Old statefiles might have nil values in them diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 21944eae119..79b5097900f 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -289,6 +289,8 @@ func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type(t *testing. func TestAccAWSCodeBuildProject_Environment_Certificate(t *testing.T) { var project codebuild.Project rName := acctest.RandomWithPrefix("tf-acc-test") + bName := acctest.RandomWithPrefix("tf-acc-test-bucket") + oName := "certificate.pem" resourceName := "aws_codebuild_project.test" resource.Test(t, resource.TestCase{ @@ -297,10 +299,10 @@ func TestAccAWSCodeBuildProject_Environment_Certificate(t *testing.T) { CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCodeBuildProjectConfig_Environment_Certificate(rName), + Config: testAccAWSCodeBuildProjectConfig_Environment_Certificate(rName, bName, oName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "environment.3925601246.certificate", "arn:aws:s3:::secret_bucket/cert.pem"), + resource.TestCheckResourceAttr(resourceName, "environment.1974383098.certificate", fmt.Sprintf("%s/%s", bName, oName)), ), }, }, @@ -1038,10 +1040,16 @@ resource "aws_codebuild_project" "test" { `, rName, environmentVariableType) } -func testAccAWSCodeBuildProjectConfig_Environment_Certificate(rName string) string { - return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +func testAccAWSCodeBuildProjectConfig_Environment_Certificate(rName string, bName string, oName string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + testAccAWSCodeBuildProjectConfig_Base_Bucket(bName) + fmt.Sprintf(` +resource "aws_s3_bucket_object" "test" { + bucket = "${aws_s3_bucket.test.bucket}" + key = "%s" + content = "foo" +} + resource "aws_codebuild_project" "test" { - name = %q + name = "%s" service_role = "${aws_iam_role.test.arn}" artifacts { @@ -1052,19 +1060,15 @@ resource "aws_codebuild_project" "test" { compute_type = "BUILD_GENERAL1_SMALL" image = "2" type = "LINUX_CONTAINER" - certificate = "arn:aws:s3:::secret_bucket/cert.pem" + certificate = "${aws_s3_bucket.test.bucket}/${aws_s3_bucket_object.test.key}" } source { - location = "https://example.com/organization/repository.git" - type = "GITHUB_ENTERPRISE" - auth { - resource = "FAKESOURCE" - type = "OAUTH" - } + type = "GITHUB" + location = "https://github.com/hashicorp/packer.git" } } -`, rName) +`, oName, rName) } func testAccAWSCodeBuildProjectConfig_Source_Auth(rName, authResource, authType string) string { From a9107839468af4ca05b164f1475aa71847ed96eb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 11:46:23 -0400 Subject: [PATCH 2800/3316] Update CHANGELOG for #6093 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83692a2e011..c9ac0548a65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: * data-source/aws_secretsmanager_secret: Add `policy` attribute [GH-6091] * data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] * resource/aws_ecr_repository: Add configurable `delete` timeout [GH-3910] +* resource/aws_elastic_beanstalk_environment: Add `platform_arn` argument (support custom platforms) [GH-6093] * resource/aws_lb_listener: Support Cognito and OIDC authentication [GH-6094] * resource/aws_lb_listener_rule: Support Cognito and OIDC authentication [GH-6094] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] From ff8a93c295f07104b817872d4b2b17289c632043 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 12:36:10 -0400 Subject: [PATCH 2801/3316] Update CHANGELOG for #3086 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ac0548a65..cb355e210f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Data Source:** `aws_launch_template` [GH-6064] * **New Data Source:** `aws_workspaces_bundle` [GH-3243] +* **New Resource:** `aws_ebs_snapshot_copy` [GH-3086] * **New Resource:** `aws_pinpoint_adm_channel` [GH-6038] * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] * **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] From ec573663035953960880758567582a065d0071fc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 15:28:55 -0400 Subject: [PATCH 2802/3316] Add aws_ebs_snapshot_copy resource link --- website/aws.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/aws.erb b/website/aws.erb index 99e939ca0cc..f5d5818888a 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -974,6 +974,10 @@ aws_ebs_snapshot + > + aws_ebs_snapshot_copy + + > aws_ebs_volume From 63fb29f01b1fdffcd082ed63bda21a99790ea51d Mon Sep 17 00:00:00 2001 From: Samir Patel Date: Tue, 9 Oct 2018 15:29:50 -0500 Subject: [PATCH 2803/3316] Added more color to fixed_gop so it is clear which property it maps to --- website/docs/r/elastic_transcoder_preset.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/elastic_transcoder_preset.html.markdown b/website/docs/r/elastic_transcoder_preset.html.markdown index 9096d36bcdf..1240fbd1fcc 100644 --- a/website/docs/r/elastic_transcoder_preset.html.markdown +++ b/website/docs/r/elastic_transcoder_preset.html.markdown @@ -124,7 +124,7 @@ The `video` object supports the following: * `bit_rate` - The bit rate of the video stream in the output file, in kilobits/second. You can configure variable bit rate or constant bit rate encoding. * `codec` - The video codec for the output file. Valid values are `gif`, `H.264`, `mpeg2`, `vp8`, and `vp9`. * `display_aspect_ratio` - The value that Elastic Transcoder adds to the metadata in the output file. If you set DisplayAspectRatio to auto, Elastic Transcoder chooses an aspect ratio that ensures square pixels. If you specify another option, Elastic Transcoder sets that value in the output file. -* `fixed_gop` - Whether to use a fixed value for Video:FixedGOP. Not applicable for containers of type gif. Valid values are true and false. +* `fixed_gop` - Whether to use a fixed value for Video:FixedGOP. Not applicable for containers of type gif. Valid values are true and false. Also known as, Fixed Number of Frames Between Keyframes. * `frame_rate` - The frames per second for the video stream in the output file. The following values are valid: `auto`, `10`, `15`, `23.97`, `24`, `25`, `29.97`, `30`, `50`, `60`. * `keyframes_max_dist` - The maximum number of frames between key frames. Not applicable for containers of type gif. * `max_frame_rate` - If you specify auto for FrameRate, Elastic Transcoder uses the frame rate of the input video for the frame rate of the output video, up to the maximum frame rate. If you do not specify a MaxFrameRate, Elastic Transcoder will use a default of 30. From c5fe073041e6d916cd5a393ad1df8631a457232b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 12:55:38 -0400 Subject: [PATCH 2804/3316] resource/aws_codebuild_project: Additional handling for environment certificate * Add certificate to resourceAwsCodeBuildProjectEnvironmentHash * Add ValidateFunc for .pem and .zip ending * Only send certificate when non-empty * Fix acceptance testing for changing TypeSet hash --- aws/resource_aws_codebuild_project.go | 10 +++++++--- aws/resource_aws_codebuild_project_test.go | 11 ++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 76df4277189..43afd135a46 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -178,8 +178,9 @@ func resourceAwsCodeBuildProject() *schema.Resource { Default: false, }, "certificate": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`\.(pem|zip)$`), "must end in .pem or .zip"), }, }, }, @@ -623,7 +624,7 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm projectEnv.Type = aws.String(v.(string)) } - if v := envConfig["certificate"]; v != nil { + if v, ok := envConfig["certificate"]; ok && v.(string) != "" { projectEnv.Certificate = aws.String(v.(string)) } @@ -1080,6 +1081,9 @@ func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", computeType)) buf.WriteString(fmt.Sprintf("%s-", image)) buf.WriteString(fmt.Sprintf("%t-", privilegedMode)) + if v, ok := m["certificate"]; ok && v.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } for _, e := range environmentVariables { if e != nil { // Old statefiles might have nil values in them ev := e.(map[string]interface{}) diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 79b5097900f..4107ab63058 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -302,7 +302,7 @@ func TestAccAWSCodeBuildProject_Environment_Certificate(t *testing.T) { Config: testAccAWSCodeBuildProjectConfig_Environment_Certificate(rName, bName, oName), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodeBuildProjectExists(resourceName, &project), - resource.TestCheckResourceAttr(resourceName, "environment.1974383098.certificate", fmt.Sprintf("%s/%s", bName, oName)), + testAccCheckAWSCodeBuildProjectCertificate(&project, fmt.Sprintf("%s/%s", bName, oName)), ), }, }, @@ -776,6 +776,15 @@ func testAccCheckAWSCodeBuildProjectDestroy(s *terraform.State) error { return nil } +func testAccCheckAWSCodeBuildProjectCertificate(project *codebuild.Project, expectedCertificate string) resource.TestCheckFunc { + return func(s *terraform.State) error { + if aws.StringValue(project.Environment.Certificate) != expectedCertificate { + return fmt.Errorf("CodeBuild Project certificate (%s) did not match: %s", aws.StringValue(project.Environment.Certificate), expectedCertificate) + } + return nil + } +} + func testAccAWSCodeBuildProjectConfig_Base_Bucket(rName string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "test" { From 483d415a41a364428d426077cc2119be675199b8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 16:33:57 -0400 Subject: [PATCH 2805/3316] Update CHANGELOG for #6087 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb355e210f5..4b3305f0c5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: * data-source/aws_iam_policy_document: Make `statement` argument optional [GH-6052] * data-source/aws_secretsmanager_secret: Add `policy` attribute [GH-6091] * data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] +* resource/aws_codebuild_project: Add `environment` `certificate` argument [GH-6087] * resource/aws_ecr_repository: Add configurable `delete` timeout [GH-3910] * resource/aws_elastic_beanstalk_environment: Add `platform_arn` argument (support custom platforms) [GH-6093] * resource/aws_lb_listener: Support Cognito and OIDC authentication [GH-6094] From 3919a5745c510d29ec49aea25931f3adbff41d18 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 9 Oct 2018 16:36:42 -0400 Subject: [PATCH 2806/3316] docs/resource/aws_ebs_snapshot_copy: Fix file name --- .../r/{copy_snapshot.html.md => ebs_snapshot_copy.html.markdown} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename website/docs/r/{copy_snapshot.html.md => ebs_snapshot_copy.html.markdown} (100%) diff --git a/website/docs/r/copy_snapshot.html.md b/website/docs/r/ebs_snapshot_copy.html.markdown similarity index 100% rename from website/docs/r/copy_snapshot.html.md rename to website/docs/r/ebs_snapshot_copy.html.markdown From 6deb8acd14c986cb6eace68d73f4b06d137a5dc0 Mon Sep 17 00:00:00 2001 From: Fotos Georgiadis Date: Tue, 9 Oct 2018 22:09:46 +0200 Subject: [PATCH 2807/3316] Add authenticate-cognito in type documentation --- website/docs/r/lb_listener.html.markdown | 2 +- website/docs/r/lb_listener_rule.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/lb_listener.html.markdown b/website/docs/r/lb_listener.html.markdown index 421ee27703c..c73587aab2b 100644 --- a/website/docs/r/lb_listener.html.markdown +++ b/website/docs/r/lb_listener.html.markdown @@ -101,7 +101,7 @@ The following arguments are supported: Action Blocks (for `default_action`) support the following: -* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect` and `fixed-response`. +* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect`, `fixed-response` and `authenticate-cognito`. * `target_group_arn` - (Optional) The ARN of the Target Group to which to route traffic. Required if `type` is `forward`. * `redirect` - (Optional) Information for creating a redirect action. Required if `type` is `redirect`. * `fixed_response` - (Optional) Information for creating an action that returns a custom HTTP response. Required if `type` is `fixed-response`. diff --git a/website/docs/r/lb_listener_rule.html.markdown b/website/docs/r/lb_listener_rule.html.markdown index f59f7b459cf..5a6ca894b59 100644 --- a/website/docs/r/lb_listener_rule.html.markdown +++ b/website/docs/r/lb_listener_rule.html.markdown @@ -108,7 +108,7 @@ The following arguments are supported: Action Blocks (for `action`) support the following: -* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect` and `fixed-response`. +* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect`, `fixed-response` and `authenticate-cognito`. * `target_group_arn` - (Optional) The ARN of the Target Group to which to route traffic. Required if `type` is `forward`. * `redirect` - (Optional) Information for creating a redirect action. Required if `type` is `redirect`. * `fixed_response` - (Optional) Information for creating an action that returns a custom HTTP response. Required if `type` is `fixed-response`. From 156807ca14524d6e9b48c5e207387a415597a9d1 Mon Sep 17 00:00:00 2001 From: Fotos Georgiadis Date: Tue, 9 Oct 2018 22:34:38 +0200 Subject: [PATCH 2808/3316] Add authenticate-cognito action example --- website/docs/r/lb_listener.html.markdown | 46 +++++++++++++++++++ website/docs/r/lb_listener_rule.html.markdown | 33 +++++++++++++ 2 files changed, 79 insertions(+) diff --git a/website/docs/r/lb_listener.html.markdown b/website/docs/r/lb_listener.html.markdown index c73587aab2b..7e2ac22dd3b 100644 --- a/website/docs/r/lb_listener.html.markdown +++ b/website/docs/r/lb_listener.html.markdown @@ -85,6 +85,52 @@ resource "aws_lb_listener" "front_end" { } ``` +### Authenticate-cognito Action + +```hcl +resource "aws_lb" "front_end" { + # ... +} + +resource "aws_lb_target_group" "front_end" { + # ... +} + +resource "aws_cognito_user_pool" "pool" { + # ... +} + +resource "aws_cognito_user_pool_client" "client" { + # ... +} + +resource "aws_cognito_user_pool_domain" "domain" { + # ... +} + +resource "aws_lb_listener" "front_end" { + load_balancer_arn = "${aws_lb.front_end.arn}" + port = "80" + protocol = "HTTP" + + default_action { + order = 1 + type = "authenticate-cognito" + authenticate_cognito { + user_pool_arn = "${aws_cognito_user_pool.pool.arn}" + user_pool_client_id = "${aws_cognito_user_pool_client.client.id}" + user_pool_domain = "${aws_cognito_user_pool_domain.domain.domain}" + } + } + + default_action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.front_end.arn}" + } +} +``` + ## Argument Reference diff --git a/website/docs/r/lb_listener_rule.html.markdown b/website/docs/r/lb_listener_rule.html.markdown index 5a6ca894b59..258ff76652a 100644 --- a/website/docs/r/lb_listener_rule.html.markdown +++ b/website/docs/r/lb_listener_rule.html.markdown @@ -95,6 +95,39 @@ resource "aws_lb_listener_rule" "health_check" { } } +# Authenticate-cognito Action + +resource "aws_cognito_user_pool" "pool" { + # ... +} + +resource "aws_cognito_user_pool_client" "client" { + # ... +} + +resource "aws_cognito_user_pool_domain" "domain" { + # ... +} + +resource "aws_lb_listener_rule" "admin" { + listener_arn = "${aws_lb_listener.front_end.arn}" + + action { + order = 1 + type = "authenticate-cognito" + authenticate_cognito { + user_pool_arn = "${aws_cognito_user_pool.pool.arn}" + user_pool_client_id = "${aws_cognito_user_pool_client.client.id}" + user_pool_domain = "${aws_cognito_user_pool_domain.domain.domain}" + } + } + + action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.static.arn}" + } +} ``` ## Argument Reference From 6e3e52090c33fb70074b4022402dab1d94df2320 Mon Sep 17 00:00:00 2001 From: Fotos Georgiadis Date: Tue, 9 Oct 2018 22:10:06 +0200 Subject: [PATCH 2809/3316] Add authenticate-oidc in type documentation --- website/docs/r/lb_listener.html.markdown | 2 +- website/docs/r/lb_listener_rule.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/lb_listener.html.markdown b/website/docs/r/lb_listener.html.markdown index 7e2ac22dd3b..2d7714569a5 100644 --- a/website/docs/r/lb_listener.html.markdown +++ b/website/docs/r/lb_listener.html.markdown @@ -147,7 +147,7 @@ The following arguments are supported: Action Blocks (for `default_action`) support the following: -* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect`, `fixed-response` and `authenticate-cognito`. +* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect`, `fixed-response`, `authenticate-cognito` and `authenticate-oidc`. * `target_group_arn` - (Optional) The ARN of the Target Group to which to route traffic. Required if `type` is `forward`. * `redirect` - (Optional) Information for creating a redirect action. Required if `type` is `redirect`. * `fixed_response` - (Optional) Information for creating an action that returns a custom HTTP response. Required if `type` is `fixed-response`. diff --git a/website/docs/r/lb_listener_rule.html.markdown b/website/docs/r/lb_listener_rule.html.markdown index 258ff76652a..4a7e711ba7a 100644 --- a/website/docs/r/lb_listener_rule.html.markdown +++ b/website/docs/r/lb_listener_rule.html.markdown @@ -141,7 +141,7 @@ The following arguments are supported: Action Blocks (for `action`) support the following: -* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect`, `fixed-response` and `authenticate-cognito`. +* `type` - (Required) The type of routing action. Valid values are `forward`, `redirect`, `fixed-response`, `authenticate-cognito` and `authenticate-oidc`. * `target_group_arn` - (Optional) The ARN of the Target Group to which to route traffic. Required if `type` is `forward`. * `redirect` - (Optional) Information for creating a redirect action. Required if `type` is `redirect`. * `fixed_response` - (Optional) Information for creating an action that returns a custom HTTP response. Required if `type` is `fixed-response`. From 388c514e0372f6e8cc07a6febf6930b1110cb2a2 Mon Sep 17 00:00:00 2001 From: Fotos Georgiadis Date: Tue, 9 Oct 2018 22:38:00 +0200 Subject: [PATCH 2810/3316] Add authenticate-oidc action example --- website/docs/r/lb_listener.html.markdown | 37 +++++++++++++++++++ website/docs/r/lb_listener_rule.html.markdown | 25 +++++++++++++ 2 files changed, 62 insertions(+) diff --git a/website/docs/r/lb_listener.html.markdown b/website/docs/r/lb_listener.html.markdown index 2d7714569a5..382976f295d 100644 --- a/website/docs/r/lb_listener.html.markdown +++ b/website/docs/r/lb_listener.html.markdown @@ -131,6 +131,43 @@ resource "aws_lb_listener" "front_end" { } ``` +### Authenticate-oidc Action + +```hcl +resource "aws_lb" "front_end" { + # ... +} + +resource "aws_lb_target_group" "front_end" { + # ... +} + +resource "aws_lb_listener" "front_end" { + load_balancer_arn = "${aws_lb.front_end.arn}" + port = "80" + protocol = "HTTP" + + default_action { + order = 1 + type = "authenticate-oidc" + authenticate_oidc { + authorization_endpoint = "https://example.com/authorization_endpoint" + client_id = "client_id" + client_secret = "client_secret" + issuer = "https://example.com" + token_endpoint = "https://example.com/token_endpoint" + user_info_endpoint = "https://example.com/user_info_endpoint" + } + } + + default_action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.front_end.arn}" + } +} +``` + ## Argument Reference diff --git a/website/docs/r/lb_listener_rule.html.markdown b/website/docs/r/lb_listener_rule.html.markdown index 4a7e711ba7a..bd1167d0ee3 100644 --- a/website/docs/r/lb_listener_rule.html.markdown +++ b/website/docs/r/lb_listener_rule.html.markdown @@ -128,6 +128,31 @@ resource "aws_lb_listener_rule" "admin" { target_group_arn = "${aws_lb_target_group.static.arn}" } } + +# Authenticate-oidc Action + +resource "aws_lb_listener" "admin" { + listener_arn = "${aws_lb_listener.front_end.arn}" + + action { + order = 1 + type = "authenticate-oidc" + authenticate_oidc { + authorization_endpoint = "https://example.com/authorization_endpoint" + client_id = "client_id" + client_secret = "client_secret" + issuer = "https://example.com" + token_endpoint = "https://example.com/token_endpoint" + user_info_endpoint = "https://example.com/user_info_endpoint" + } + } + + action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.static.arn}" + } +} ``` ## Argument Reference From af9e297c7feba7ea30b53e25c2cffbf4b8032832 Mon Sep 17 00:00:00 2001 From: Fotos Georgiadis Date: Tue, 9 Oct 2018 22:13:45 +0200 Subject: [PATCH 2811/3316] Rename user_pool_client to user_pool_client_id --- website/docs/r/lb_listener.html.markdown | 2 +- website/docs/r/lb_listener_rule.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/lb_listener.html.markdown b/website/docs/r/lb_listener.html.markdown index 382976f295d..68dbf09753b 100644 --- a/website/docs/r/lb_listener.html.markdown +++ b/website/docs/r/lb_listener.html.markdown @@ -214,7 +214,7 @@ Authenticate Cognito Blocks (for `authenticate_cognito`) supports the following: * `session_cookie_name` - (Optional) The name of the cookie used to maintain session information. * `session_time_out` - (Optional) The maximum duration of the authentication session, in seconds. * `user_pool_arn` - (Required) The ARN of the Cognito user pool. -* `user_pool_client` - (Required) The ID of the Cognito user pool client. +* `user_pool_client_id` - (Required) The ID of the Cognito user pool client. * `user_pool_domain` - (Required) The domain prefix or fully-qualified domain name of the Cognito user pool. Authenticate OIDC Blocks (for `authenticate_oidc`) supports the following: diff --git a/website/docs/r/lb_listener_rule.html.markdown b/website/docs/r/lb_listener_rule.html.markdown index bd1167d0ee3..89ba154a0a0 100644 --- a/website/docs/r/lb_listener_rule.html.markdown +++ b/website/docs/r/lb_listener_rule.html.markdown @@ -198,7 +198,7 @@ Authenticate Cognito Blocks (for `authenticate_cognito`) supports the following: * `session_cookie_name` - (Optional) The name of the cookie used to maintain session information. * `session_time_out` - (Optional) The maximum duration of the authentication session, in seconds. * `user_pool_arn` - (Required) The ARN of the Cognito user pool. -* `user_pool_client` - (Required) The ID of the Cognito user pool client. +* `user_pool_client_id` - (Required) The ID of the Cognito user pool client. * `user_pool_domain` - (Required) The domain prefix or fully-qualified domain name of the Cognito user pool. Authenticate OIDC Blocks (for `authenticate_oidc`) supports the following: From 2d33ba71083b5ec7bc66aee6924089b9a406f9f3 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Tue, 9 Oct 2018 17:12:58 -0700 Subject: [PATCH 2812/3316] Add an encryption_key attribute modeled on aws_codepipeline. --- aws/resource_aws_athena_database.go | 48 ++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index d9eb09bd2f1..10617d0e6ad 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -38,6 +38,23 @@ func resourceAwsAthenaDatabase() *schema.Resource { Optional: true, Default: false, }, + "encryption_key": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, } } @@ -45,11 +62,34 @@ func resourceAwsAthenaDatabase() *schema.Resource { func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn + e := d.Get("encryption_key").([]interface{}) + data := e[0].(map[string]interface{}) + keyType := data["type"].(string) + keyID := data["id"].(string) + + resultConfig := athena.ResultConfiguration{ + OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), + } + + if len(keyType) > 0 { + if strings.HasSuffix(keyType, "_KMS") && len(keyID) <= 0 { + return fmt.Errorf("Key type %s requires a valid KMS key ID", keyType) + } + + encryptionConfig := athena.EncryptionConfiguration{ + EncryptionOption: aws.String(keyType), + } + + if len(keyID) > 0 { + encryptionConfig.KmsKey = aws.String(keyID) + } + + resultConfig.EncryptionConfiguration = &encryptionConfig + } + input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), - ResultConfiguration: &athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), - }, + QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), + ResultConfiguration: &resultConfig, } resp, err := conn.StartQueryExecution(input) From d3ec06448a6bc92f71c57f2de6d6985f34788473 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Tue, 9 Oct 2018 17:18:54 -0700 Subject: [PATCH 2813/3316] Add docs about the encryption key. --- website/docs/r/athena_database.html.markdown | 6 ++++++ website/docs/r/codepipeline.markdown | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/website/docs/r/athena_database.html.markdown b/website/docs/r/athena_database.html.markdown index 620bd1ee6ec..f323398971e 100644 --- a/website/docs/r/athena_database.html.markdown +++ b/website/docs/r/athena_database.html.markdown @@ -29,8 +29,14 @@ The following arguments are supported: * `name` - (Required) Name of the database to create. * `bucket` - (Required) Name of s3 bucket to save the results of the query execution. +* `encryption_key` - (Optional) The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An `encryption_key` block is documented below. * `force_destroy` - (Optional, Default: false) A boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are *not* recoverable. +An `encryption_key` block supports the following arguments: + +* `type` - (Required) The type of key; one of `SSE_S3`, `SSE_KMS`, `CSE_KMS` +* `id` - (Optional) The KMS key ARN or ID; required for key types `SSE_KMS` and `CSE_KMS`. + ~> **NOTE:** When Athena queries are executed, result files may be created in the specified bucket. Consider using `force_destroy` on the bucket too in order to avoid any problems when destroying the bucket. ## Attributes Reference diff --git a/website/docs/r/codepipeline.markdown b/website/docs/r/codepipeline.markdown index 94bef27fcb0..8f096b3fba0 100644 --- a/website/docs/r/codepipeline.markdown +++ b/website/docs/r/codepipeline.markdown @@ -142,7 +142,7 @@ An `artifact_store` block supports the following arguments: * `type` - (Required) The type of the artifact store, such as Amazon S3 * `encryption_key` - (Optional) The encryption key block AWS CodePipeline uses to encrypt the data in the artifact store, such as an AWS Key Management Service (AWS KMS) key. If you don't specify a key, AWS CodePipeline uses the default key for Amazon Simple Storage Service (Amazon S3). An `encryption_key` block is documented below. -A `encryption_key` block supports the following arguments: +An `encryption_key` block supports the following arguments: * `id` - (Required) The KMS key ARN or ID * `type` - (Required) The type of key; currently only `KMS` is supported From 8a8e78528625378135da4e06b977d6c3da2ebf20 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 10 Oct 2018 12:14:42 +0200 Subject: [PATCH 2814/3316] resource/aws_pinpoint_email_channel --- aws/provider.go | 1 + aws/resource_aws_pinpoint_email_channel.go | 134 +++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 aws/resource_aws_pinpoint_email_channel.go diff --git a/aws/provider.go b/aws/provider.go index dbda0f83849..386f2b1abfe 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -677,6 +677,7 @@ func Provider() terraform.ResourceProvider { "aws_batch_job_queue": resourceAwsBatchJobQueue(), "aws_pinpoint_app": resourceAwsPinpointApp(), "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), diff --git a/aws/resource_aws_pinpoint_email_channel.go b/aws/resource_aws_pinpoint_email_channel.go new file mode 100644 index 00000000000..6bcbd00dbb5 --- /dev/null +++ b/aws/resource_aws_pinpoint_email_channel.go @@ -0,0 +1,134 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointEmailChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointEmailChannelUpsert, + Read: resourceAwsPinpointEmailChannelRead, + Update: resourceAwsPinpointEmailChannelUpsert, + Delete: resourceAwsPinpointEmailChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "from_address": { + Type: schema.TypeString, + Required: true, + }, + "identity": { + Type: schema.TypeString, + Required: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + "messages_per_second": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func resourceAwsPinpointEmailChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.EmailChannelRequest{} + + if d.HasChange("enabled") { + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + } + + if d.HasChange("from_address") { + params.FromAddress = aws.String(d.Get("from_address").(string)) + } + + if d.HasChange("identity") { + params.Identity = aws.String(d.Get("identity").(string)) + } + + if d.HasChange("role_arn") { + params.RoleArn = aws.String(d.Get("role_arn").(string)) + } + + req := pinpoint.UpdateEmailChannelInput{ + ApplicationId: aws.String(applicationId), + EmailChannelRequest: params, + } + + _, err := conn.UpdateEmailChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint Email Channel for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointEmailChannelRead(d, meta) +} + +func resourceAwsPinpointEmailChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint Email Channel for application %s", d.Id()) + + output, err := conn.GetEmailChannel(&pinpoint.GetEmailChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint Email Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint Email Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.EmailChannelResponse.ApplicationId) + d.Set("enabled", output.EmailChannelResponse.Enabled) + d.Set("from_address", output.EmailChannelResponse.FromAddress) + d.Set("identity", output.EmailChannelResponse.Identity) + d.Set("role_arn", output.EmailChannelResponse.RoleArn) + d.Set("messages_per_second", aws.Int64Value(output.EmailChannelResponse.MessagesPerSecond)) + return nil +} + +func resourceAwsPinpointEmailChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint Email Channel for application %s", d.Id()) + _, err := conn.DeleteEmailChannel(&pinpoint.DeleteEmailChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint Email Channel for application %s: %s", d.Id(), err) + } + return nil +} From e5e02312c954cee066598afdbd57a974311ed5ce Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 10 Oct 2018 12:17:21 +0200 Subject: [PATCH 2815/3316] resource/aws_pinpoint_email_channel: docs + tests --- ...esource_aws_pinpoint_email_channel_test.go | 155 ++++++++++++++++++ website/aws.erb | 3 + .../docs/r/pinpoint_email_channel.markdown | 92 +++++++++++ 3 files changed, 250 insertions(+) create mode 100644 aws/resource_aws_pinpoint_email_channel_test.go create mode 100644 website/docs/r/pinpoint_email_channel.markdown diff --git a/aws/resource_aws_pinpoint_email_channel_test.go b/aws/resource_aws_pinpoint_email_channel_test.go new file mode 100644 index 00000000000..96511215d56 --- /dev/null +++ b/aws/resource_aws_pinpoint_email_channel_test.go @@ -0,0 +1,155 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSPinpointEmailChannel_basic(t *testing.T) { + oldDefaultRegion := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldDefaultRegion) + + var channel pinpoint.EmailChannelResponse + resourceName := "aws_pinpoint_email_channel.test_email_channel" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSPinpointEmailChannelDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSPinpointEmailChannelConfig_basic, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointEmailChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttrSet(resourceName, "messages_per_second"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAWSPinpointEmailChannelExists(n string, channel *pinpoint.EmailChannelResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Pinpoint Email Channel with that application ID exists") + } + + conn := testAccProvider.Meta().(*AWSClient).pinpointconn + + // Check if the app exists + params := &pinpoint.GetEmailChannelInput{ + ApplicationId: aws.String(rs.Primary.ID), + } + output, err := conn.GetEmailChannel(params) + + if err != nil { + return err + } + + *channel = *output.EmailChannelResponse + + return nil + } +} + +const testAccAWSPinpointEmailChannelConfig_basic = ` +provider "aws" { + region = "us-east-1" +} + +resource "aws_pinpoint_app" "test_app" {} + +resource "aws_pinpoint_email_channel" "test_email_channel" { + application_id = "${aws_pinpoint_app.test_app.application_id}" + from_address = "user@example.com" + identity = "${aws_ses_domain_identity.test_identity.arn}" + role_arn = "${aws_iam_role.test_role.arn}" +} + +resource "aws_ses_domain_identity" "test_identity" { + domain = "example.com" +} + +resource "aws_iam_role" "test_role" { + assume_role_policy = <> aws_pinpoint_adm_channel + > + aws_pinpoint_email_channel + > aws_pinpoint_event_stream diff --git a/website/docs/r/pinpoint_email_channel.markdown b/website/docs/r/pinpoint_email_channel.markdown new file mode 100644 index 00000000000..6d2699bfc75 --- /dev/null +++ b/website/docs/r/pinpoint_email_channel.markdown @@ -0,0 +1,92 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_email_channel" +sidebar_current: "docs-aws-resource-pinpoint-email-channel" +description: |- + Provides a Pinpoint SMS Channel resource. +--- + +# aws_pinpoint_email_channel + +Provides a Pinpoint SMS Channel resource. + +## Example Usage + +```hcl +resource "aws_pinpoint_email_channel" "email" { + application_id = "${aws_pinpoint_app.app.application_id}" + from_address = "user@example.com" + identity = "${aws_ses_domain_identity.identity.arn}" + role_arn = "${aws_iam_role.role.arn}" +} + +resource "aws_pinpoint_app" "app" {} + +resource "aws_ses_domain_identity" "identity" { + domain = "example.com" +} + +resource "aws_iam_role" "role" { + assume_role_policy = < Date: Wed, 10 Oct 2018 12:32:41 +0200 Subject: [PATCH 2816/3316] resource/aws_pinpoint_baidu_channel --- aws/provider.go | 1 + aws/resource_aws_pinpoint_baidu_channel.go | 122 +++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 aws/resource_aws_pinpoint_baidu_channel.go diff --git a/aws/provider.go b/aws/provider.go index dbda0f83849..d61079414da 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -677,6 +677,7 @@ func Provider() terraform.ResourceProvider { "aws_batch_job_queue": resourceAwsBatchJobQueue(), "aws_pinpoint_app": resourceAwsPinpointApp(), "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), diff --git a/aws/resource_aws_pinpoint_baidu_channel.go b/aws/resource_aws_pinpoint_baidu_channel.go new file mode 100644 index 00000000000..0040485955a --- /dev/null +++ b/aws/resource_aws_pinpoint_baidu_channel.go @@ -0,0 +1,122 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointBaiduChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointBaiduChannelUpsert, + Read: resourceAwsPinpointBaiduChannelRead, + Update: resourceAwsPinpointBaiduChannelUpsert, + Delete: resourceAwsPinpointBaiduChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "api_key": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "secret_key": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointBaiduChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.BaiduChannelRequest{} + + if d.HasChange("enabled") { + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + } + + if d.HasChange("api_key") { + params.ApiKey = aws.String(d.Get("api_key").(string)) + } + + if d.HasChange("secret_key") { + params.SecretKey = aws.String(d.Get("secret_key").(string)) + } + + req := pinpoint.UpdateBaiduChannelInput{ + ApplicationId: aws.String(applicationId), + BaiduChannelRequest: params, + } + + _, err := conn.UpdateBaiduChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint Baidu Channel for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointBaiduChannelRead(d, meta) +} + +func resourceAwsPinpointBaiduChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint Baidu Channel for application %s", d.Id()) + + output, err := conn.GetBaiduChannel(&pinpoint.GetBaiduChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint Baidu Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint Baidu Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.BaiduChannelResponse.ApplicationId) + d.Set("enabled", output.BaiduChannelResponse.Enabled) + // ApiKey and SecretKey are never returned + + return nil +} + +func resourceAwsPinpointBaiduChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint Baidu Channel for application %s", d.Id()) + _, err := conn.DeleteBaiduChannel(&pinpoint.DeleteBaiduChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint Baidu Channel for application %s: %s", d.Id(), err) + } + return nil +} From bd55af8e9e3db5fdbb6e4ba8d3adb1f6de9aebba Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 10 Oct 2018 12:35:47 +0200 Subject: [PATCH 2817/3316] resource/aws_pinpoint_baidu_channel: docs + tests --- ...esource_aws_pinpoint_baidu_channel_test.go | 120 ++++++++++++++++++ website/aws.erb | 3 + .../docs/r/pinpoint_baidu_channel.markdown | 46 +++++++ 3 files changed, 169 insertions(+) create mode 100644 aws/resource_aws_pinpoint_baidu_channel_test.go create mode 100644 website/docs/r/pinpoint_baidu_channel.markdown diff --git a/aws/resource_aws_pinpoint_baidu_channel_test.go b/aws/resource_aws_pinpoint_baidu_channel_test.go new file mode 100644 index 00000000000..16cd3b4746f --- /dev/null +++ b/aws/resource_aws_pinpoint_baidu_channel_test.go @@ -0,0 +1,120 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSPinpointBaiduChannel_basic(t *testing.T) { + oldDefaultRegion := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldDefaultRegion) + + var channel pinpoint.BaiduChannelResponse + resourceName := "aws_pinpoint_baidu_channel.channel" + + apiKey := "123" + secretKey := "456" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSPinpointBaiduChannelDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSPinpointBaiduChannelConfig_basic(apiKey, secretKey), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointBaiduChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "api_key", apiKey), + resource.TestCheckResourceAttr(resourceName, "secret_key", secretKey), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"api_key", "secret_key"}, + }, + }, + }) +} + +func testAccCheckAWSPinpointBaiduChannelExists(n string, channel *pinpoint.BaiduChannelResponse) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Pinpoint Baidu channel with that Application ID exists") + } + + conn := testAccProvider.Meta().(*AWSClient).pinpointconn + + // Check if the Baidu Channel exists + params := &pinpoint.GetBaiduChannelInput{ + ApplicationId: aws.String(rs.Primary.ID), + } + output, err := conn.GetBaiduChannel(params) + + if err != nil { + return err + } + + *channel = *output.BaiduChannelResponse + + return nil + } +} + +func testAccAWSPinpointBaiduChannelConfig_basic(apiKey, secretKey string) string { + return fmt.Sprintf(` +provider "aws" { + region = "us-east-1" +} + +resource "aws_pinpoint_app" "test_app" {} + +resource "aws_pinpoint_baidu_channel" "channel" { + application_id = "${aws_pinpoint_app.test_app.application_id}" + + api_key = "%s" + secret_key = "%s" +} +`, apiKey, secretKey) +} + +func testAccCheckAWSPinpointBaiduChannelDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).pinpointconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_pinpoint_baidu_channel" { + continue + } + + // Check if the Baidu channel exists by fetching its attributes + params := &pinpoint.GetBaiduChannelInput{ + ApplicationId: aws.String(rs.Primary.ID), + } + _, err := conn.GetBaiduChannel(params) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + continue + } + return err + } + return fmt.Errorf("Baidu Channel exists when it should be destroyed!") + } + + return nil +} diff --git a/website/aws.erb b/website/aws.erb index f5d5818888a..42707fac48c 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1689,6 +1689,9 @@ > aws_pinpoint_adm_channel + > + aws_pinpoint_baidu_channel + > aws_pinpoint_event_stream diff --git a/website/docs/r/pinpoint_baidu_channel.markdown b/website/docs/r/pinpoint_baidu_channel.markdown new file mode 100644 index 00000000000..f7380e70473 --- /dev/null +++ b/website/docs/r/pinpoint_baidu_channel.markdown @@ -0,0 +1,46 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_baidu_channel" +sidebar_current: "docs-aws-resource-pinpoint-baidu-channel" +description: |- + Provides a Pinpoint Baidu Channel resource. +--- + +# aws_pinpoint_baidu_channel + +Provides a Pinpoint Baidu Channel resource. + +~> **Note:** All arguments including the Api Key and Secret Key will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). + + +## Example Usage + +```hcl +resource "aws_pinpoint_app" "app" {} + +resource "aws_pinpoint_baidu_channel" "channel" { + application_id = "${aws_pinpoint_app.app.application_id}" + api_key = "" + secret_key = "" + +} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `enabled` - (Optional) Specifies whether to enable the channel. Defaults to `true`. +* `api_key` - (Required) Platform credential API key from Baidu. +* `secret_key` - (Required) Platform credential Secret key from Baidu. + +## Import + +Pinpoint Baidu Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_baidu_channel.channel application-id +``` From b172ae7255c598ab37168e0a5f7c319da9b54fc8 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 10 Oct 2018 15:16:40 +0200 Subject: [PATCH 2818/3316] fix: update needs all the params --- aws/resource_aws_pinpoint_baidu_channel.go | 14 ++------- ...esource_aws_pinpoint_baidu_channel_test.go | 31 ++++++++++++++++++- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/aws/resource_aws_pinpoint_baidu_channel.go b/aws/resource_aws_pinpoint_baidu_channel.go index 0040485955a..595696b7a49 100644 --- a/aws/resource_aws_pinpoint_baidu_channel.go +++ b/aws/resource_aws_pinpoint_baidu_channel.go @@ -51,17 +51,9 @@ func resourceAwsPinpointBaiduChannelUpsert(d *schema.ResourceData, meta interfac params := &pinpoint.BaiduChannelRequest{} - if d.HasChange("enabled") { - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - } - - if d.HasChange("api_key") { - params.ApiKey = aws.String(d.Get("api_key").(string)) - } - - if d.HasChange("secret_key") { - params.SecretKey = aws.String(d.Get("secret_key").(string)) - } + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + params.ApiKey = aws.String(d.Get("api_key").(string)) + params.SecretKey = aws.String(d.Get("secret_key").(string)) req := pinpoint.UpdateBaiduChannelInput{ ApplicationId: aws.String(applicationId), diff --git a/aws/resource_aws_pinpoint_baidu_channel_test.go b/aws/resource_aws_pinpoint_baidu_channel_test.go index 16cd3b4746f..8292de37b5e 100644 --- a/aws/resource_aws_pinpoint_baidu_channel_test.go +++ b/aws/resource_aws_pinpoint_baidu_channel_test.go @@ -21,6 +21,7 @@ func TestAccAWSPinpointBaiduChannel_basic(t *testing.T) { resourceName := "aws_pinpoint_baidu_channel.channel" apiKey := "123" + apikeyUpdated := "234" secretKey := "456" resource.Test(t, resource.TestCase{ @@ -33,7 +34,7 @@ func TestAccAWSPinpointBaiduChannel_basic(t *testing.T) { Config: testAccAWSPinpointBaiduChannelConfig_basic(apiKey, secretKey), Check: resource.ComposeTestCheckFunc( testAccCheckAWSPinpointBaiduChannelExists(resourceName, &channel), - resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), resource.TestCheckResourceAttr(resourceName, "api_key", apiKey), resource.TestCheckResourceAttr(resourceName, "secret_key", secretKey), ), @@ -44,6 +45,15 @@ func TestAccAWSPinpointBaiduChannel_basic(t *testing.T) { ImportStateVerify: true, ImportStateVerifyIgnore: []string{"api_key", "secret_key"}, }, + { + Config: testAccAWSPinpointBaiduChannelConfig_update(apikeyUpdated, secretKey), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointBaiduChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "api_key", apikeyUpdated), + resource.TestCheckResourceAttr(resourceName, "secret_key", secretKey), + ), + }, }, }) } @@ -87,7 +97,26 @@ resource "aws_pinpoint_app" "test_app" {} resource "aws_pinpoint_baidu_channel" "channel" { application_id = "${aws_pinpoint_app.test_app.application_id}" + + enabled = "false" + api_key = "%s" + secret_key = "%s" +} +`, apiKey, secretKey) +} + +func testAccAWSPinpointBaiduChannelConfig_update(apiKey, secretKey string) string { + return fmt.Sprintf(` +provider "aws" { + region = "us-east-1" +} + +resource "aws_pinpoint_app" "test_app" {} +resource "aws_pinpoint_baidu_channel" "channel" { + application_id = "${aws_pinpoint_app.test_app.application_id}" + + enabled = "false" api_key = "%s" secret_key = "%s" } From db0ef2aae8cb86f1e598f8abe1b783b58881a90b Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 10 Oct 2018 15:23:12 +0200 Subject: [PATCH 2819/3316] fix: update needs all the params --- aws/resource_aws_pinpoint_email_channel.go | 19 ++--- ...esource_aws_pinpoint_email_channel_test.go | 69 ++++++++++++++++++- 2 files changed, 72 insertions(+), 16 deletions(-) diff --git a/aws/resource_aws_pinpoint_email_channel.go b/aws/resource_aws_pinpoint_email_channel.go index 6bcbd00dbb5..9809556e487 100644 --- a/aws/resource_aws_pinpoint_email_channel.go +++ b/aws/resource_aws_pinpoint_email_channel.go @@ -57,21 +57,10 @@ func resourceAwsPinpointEmailChannelUpsert(d *schema.ResourceData, meta interfac params := &pinpoint.EmailChannelRequest{} - if d.HasChange("enabled") { - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - } - - if d.HasChange("from_address") { - params.FromAddress = aws.String(d.Get("from_address").(string)) - } - - if d.HasChange("identity") { - params.Identity = aws.String(d.Get("identity").(string)) - } - - if d.HasChange("role_arn") { - params.RoleArn = aws.String(d.Get("role_arn").(string)) - } + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + params.FromAddress = aws.String(d.Get("from_address").(string)) + params.Identity = aws.String(d.Get("identity").(string)) + params.RoleArn = aws.String(d.Get("role_arn").(string)) req := pinpoint.UpdateEmailChannelInput{ ApplicationId: aws.String(applicationId), diff --git a/aws/resource_aws_pinpoint_email_channel_test.go b/aws/resource_aws_pinpoint_email_channel_test.go index 96511215d56..51befc34f71 100644 --- a/aws/resource_aws_pinpoint_email_channel_test.go +++ b/aws/resource_aws_pinpoint_email_channel_test.go @@ -30,7 +30,7 @@ func TestAccAWSPinpointEmailChannel_basic(t *testing.T) { Config: testAccAWSPinpointEmailChannelConfig_basic, Check: resource.ComposeTestCheckFunc( testAccCheckAWSPinpointEmailChannelExists(resourceName, &channel), - resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), resource.TestCheckResourceAttrSet(resourceName, "messages_per_second"), ), }, @@ -39,6 +39,14 @@ func TestAccAWSPinpointEmailChannel_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccAWSPinpointEmailChannelConfig_update, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointEmailChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "messages_per_second"), + ), + }, }, }) } @@ -81,6 +89,7 @@ resource "aws_pinpoint_app" "test_app" {} resource "aws_pinpoint_email_channel" "test_email_channel" { application_id = "${aws_pinpoint_app.test_app.application_id}" + enabled = "false" from_address = "user@example.com" identity = "${aws_ses_domain_identity.test_identity.arn}" role_arn = "${aws_iam_role.test_role.arn}" @@ -129,6 +138,64 @@ EOF } ` +const testAccAWSPinpointEmailChannelConfig_update = ` +provider "aws" { + region = "us-east-1" +} + +resource "aws_pinpoint_app" "test_app" {} + +resource "aws_pinpoint_email_channel" "test_email_channel" { + application_id = "${aws_pinpoint_app.test_app.application_id}" + enabled = "false" + from_address = "userupdate@example.com" + identity = "${aws_ses_domain_identity.test_identity.arn}" + role_arn = "${aws_iam_role.test_role.arn}" +} + +resource "aws_ses_domain_identity" "test_identity" { + domain = "example.com" +} + +resource "aws_iam_role" "test_role" { + assume_role_policy = < Date: Wed, 10 Oct 2018 15:43:25 +0200 Subject: [PATCH 2820/3316] aws_pinpoint_gcm_channel => update requires all params --- aws/resource_aws_pinpoint_gcm_channel.go | 9 ++------- aws/resource_aws_pinpoint_gcm_channel_test.go | 10 +++++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_pinpoint_gcm_channel.go b/aws/resource_aws_pinpoint_gcm_channel.go index 328bbd24f07..4b7232600f7 100644 --- a/aws/resource_aws_pinpoint_gcm_channel.go +++ b/aws/resource_aws_pinpoint_gcm_channel.go @@ -46,13 +46,8 @@ func resourceAwsPinpointGCMChannelUpsert(d *schema.ResourceData, meta interface{ params := &pinpoint.GCMChannelRequest{} - if d.HasChange("api_key") { - params.ApiKey = aws.String(d.Get("api_key").(string)) - } - - if d.HasChange("enabled") { - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - } + params.ApiKey = aws.String(d.Get("api_key").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) req := pinpoint.UpdateGcmChannelInput{ ApplicationId: aws.String(applicationId), diff --git a/aws/resource_aws_pinpoint_gcm_channel_test.go b/aws/resource_aws_pinpoint_gcm_channel_test.go index f7a8fbc3d58..16eaf0b0b16 100644 --- a/aws/resource_aws_pinpoint_gcm_channel_test.go +++ b/aws/resource_aws_pinpoint_gcm_channel_test.go @@ -42,6 +42,7 @@ func TestAccAWSPinpointGCMChannel_basic(t *testing.T) { Config: testAccAWSPinpointGCMChannelConfig_basic(apiKey), Check: resource.ComposeTestCheckFunc( testAccCheckAWSPinpointGCMChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), ), }, { @@ -50,6 +51,13 @@ func TestAccAWSPinpointGCMChannel_basic(t *testing.T) { ImportStateVerify: true, ImportStateVerifyIgnore: []string{"api_key"}, }, + { + Config: testAccAWSPinpointGCMChannelConfig_basic(apiKey), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointGCMChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), + ), + }, }, }) } @@ -93,7 +101,7 @@ resource "aws_pinpoint_app" "test_app" {} resource "aws_pinpoint_gcm_channel" "test_gcm_channel" { application_id = "${aws_pinpoint_app.test_app.application_id}" - enabled = "true" + enabled = "false" api_key = "%s" }`, apiKey) } From 28c91bf6f956fb496ff7f5240586f2475c4a1ff2 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 10 Oct 2018 15:44:46 +0200 Subject: [PATCH 2821/3316] aws_pinpoint_adm_channel => update requires all params + doc fix --- aws/resource_aws_pinpoint_adm_channel.go | 14 +++----------- aws/resource_aws_pinpoint_adm_channel_test.go | 10 +++++++++- website/docs/r/pinpoint_adm_channel.markdown | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_pinpoint_adm_channel.go b/aws/resource_aws_pinpoint_adm_channel.go index e5a07ccf11b..71373a98bb2 100644 --- a/aws/resource_aws_pinpoint_adm_channel.go +++ b/aws/resource_aws_pinpoint_adm_channel.go @@ -51,17 +51,9 @@ func resourceAwsPinpointADMChannelUpsert(d *schema.ResourceData, meta interface{ params := &pinpoint.ADMChannelRequest{} - if d.HasChange("client_id") { - params.ClientId = aws.String(d.Get("client_id").(string)) - } - - if d.HasChange("client_secret") { - params.ClientSecret = aws.String(d.Get("client_secret").(string)) - } - - if d.HasChange("enabled") { - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - } + params.ClientId = aws.String(d.Get("client_id").(string)) + params.ClientSecret = aws.String(d.Get("client_secret").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) req := pinpoint.UpdateAdmChannelInput{ ApplicationId: aws.String(applicationId), diff --git a/aws/resource_aws_pinpoint_adm_channel_test.go b/aws/resource_aws_pinpoint_adm_channel_test.go index 6a3664a08aa..2a4525fab6a 100644 --- a/aws/resource_aws_pinpoint_adm_channel_test.go +++ b/aws/resource_aws_pinpoint_adm_channel_test.go @@ -62,6 +62,7 @@ func TestAccAWSPinpointADMChannel_basic(t *testing.T) { Config: testAccAWSPinpointADMChannelConfig_basic(config), Check: resource.ComposeTestCheckFunc( testAccCheckAWSPinpointADMChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), ), }, { @@ -70,6 +71,13 @@ func TestAccAWSPinpointADMChannel_basic(t *testing.T) { ImportStateVerify: true, ImportStateVerifyIgnore: []string{"client_id", "client_secret"}, }, + { + Config: testAccAWSPinpointADMChannelConfig_basic(config), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointADMChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), + ), + }, }, }) } @@ -116,7 +124,7 @@ resource "aws_pinpoint_adm_channel" "channel" { client_id = "%s" client_secret = "%s" - enabled = true + enabled = false } `, conf.ClientID, conf.ClientSecret) } diff --git a/website/docs/r/pinpoint_adm_channel.markdown b/website/docs/r/pinpoint_adm_channel.markdown index b0645a13d9e..b40c2a22639 100644 --- a/website/docs/r/pinpoint_adm_channel.markdown +++ b/website/docs/r/pinpoint_adm_channel.markdown @@ -36,7 +36,7 @@ The following arguments are supported: * `application_id` - (Required) The application ID. * `client_id` - (Required) Client ID (part of OAuth Credentials) obtained via Amazon Developer Account. * `client_secret` - (Required) Client Secret (part of OAuth Credentials) obtained via Amazon Developer Account. -* `enabled` - (Optional) Specifies whether to enable the channel. Defaults to `false`. +* `enabled` - (Optional) Specifies whether to enable the channel. Defaults to `true`. ## Import From 0d9475e76c51aa1baa9f853ce52f36ba1190609b Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 10 Oct 2018 15:51:43 +0200 Subject: [PATCH 2822/3316] aws_pinpoint_event_stream => update requires all params --- aws/resource_aws_pinpoint_event_stream.go | 9 +-- ...resource_aws_pinpoint_event_stream_test.go | 63 +++++++++++++++++++ 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_pinpoint_event_stream.go b/aws/resource_aws_pinpoint_event_stream.go index 5f360fca165..f5fa4f33a07 100644 --- a/aws/resource_aws_pinpoint_event_stream.go +++ b/aws/resource_aws_pinpoint_event_stream.go @@ -44,13 +44,8 @@ func resourceAwsPinpointEventStreamUpsert(d *schema.ResourceData, meta interface params := &pinpoint.WriteEventStream{} - if d.HasChange("destination_stream_arn") { - params.DestinationStreamArn = aws.String(d.Get("destination_stream_arn").(string)) - } - - if d.HasChange("role_arn") { - params.RoleArn = aws.String(d.Get("role_arn").(string)) - } + params.DestinationStreamArn = aws.String(d.Get("destination_stream_arn").(string)) + params.RoleArn = aws.String(d.Get("role_arn").(string)) req := pinpoint.PutEventStreamInput{ ApplicationId: aws.String(applicationId), diff --git a/aws/resource_aws_pinpoint_event_stream_test.go b/aws/resource_aws_pinpoint_event_stream_test.go index dfaee7204f3..5884366b456 100644 --- a/aws/resource_aws_pinpoint_event_stream_test.go +++ b/aws/resource_aws_pinpoint_event_stream_test.go @@ -37,6 +37,12 @@ func TestAccAWSPinpointEventStream_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccAWSPinpointEventStreamConfig_update, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointEventStreamExists(resourceName, &stream), + ), + }, }, }) } @@ -127,6 +133,63 @@ EOF } ` +const testAccAWSPinpointEventStreamConfig_update = ` +provider "aws" { + region = "us-east-1" +} + +resource "aws_pinpoint_app" "test_app" {} + +resource "aws_pinpoint_event_stream" "test_event_stream" { + application_id = "${aws_pinpoint_app.test_app.application_id}" + destination_stream_arn = "${aws_kinesis_stream.test_stream_updated.arn}" + role_arn = "${aws_iam_role.test_role.arn}" +} + +resource "aws_kinesis_stream" "test_stream_updated" { + name = "terraform-kinesis-test-updated" + shard_count = 1 +} + +resource "aws_iam_role" "test_role" { + assume_role_policy = < Date: Wed, 10 Oct 2018 16:05:21 +0200 Subject: [PATCH 2823/3316] aws_pinpoint_sms_channel => update doesn't preserve enabled param --- aws/resource_aws_pinpoint_sms_channel.go | 4 +--- aws/resource_aws_pinpoint_sms_channel_test.go | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_pinpoint_sms_channel.go b/aws/resource_aws_pinpoint_sms_channel.go index a7fbf36d6a0..659d852cb3d 100644 --- a/aws/resource_aws_pinpoint_sms_channel.go +++ b/aws/resource_aws_pinpoint_sms_channel.go @@ -57,9 +57,7 @@ func resourceAwsPinpointSMSChannelUpsert(d *schema.ResourceData, meta interface{ params := &pinpoint.SMSChannelRequest{} - if d.HasChange("enabled") { - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - } + params.Enabled = aws.Bool(d.Get("enabled").(bool)) if d.HasChange("sender_id") { params.SenderId = aws.String(d.Get("sender_id").(string)) diff --git a/aws/resource_aws_pinpoint_sms_channel_test.go b/aws/resource_aws_pinpoint_sms_channel_test.go index 5ad73b642af..304f1607318 100644 --- a/aws/resource_aws_pinpoint_sms_channel_test.go +++ b/aws/resource_aws_pinpoint_sms_channel_test.go @@ -38,6 +38,13 @@ func TestAccAWSPinpointSMSChannel_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccAWSPinpointSMSChannelConfig_basic, + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointSMSChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "enabled", "true"), + ), + }, }, }) } @@ -50,6 +57,7 @@ func TestAccAWSPinpointSMSChannel_full(t *testing.T) { resourceName := "aws_pinpoint_sms_channel.test_sms_channel" senderId := "1234" shortCode := "5678" + newShortCode := "7890" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -63,6 +71,7 @@ func TestAccAWSPinpointSMSChannel_full(t *testing.T) { testAccCheckAWSPinpointSMSChannelExists(resourceName, &channel), resource.TestCheckResourceAttr(resourceName, "sender_id", senderId), resource.TestCheckResourceAttr(resourceName, "short_code", shortCode), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), resource.TestCheckResourceAttrSet(resourceName, "promotional_messages_per_second"), resource.TestCheckResourceAttrSet(resourceName, "transactional_messages_per_second"), ), @@ -72,6 +81,17 @@ func TestAccAWSPinpointSMSChannel_full(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testAccAWSPinpointSMSChannelConfig_full(senderId, newShortCode), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSPinpointSMSChannelExists(resourceName, &channel), + resource.TestCheckResourceAttr(resourceName, "sender_id", senderId), + resource.TestCheckResourceAttr(resourceName, "short_code", newShortCode), + resource.TestCheckResourceAttr(resourceName, "enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "promotional_messages_per_second"), + resource.TestCheckResourceAttrSet(resourceName, "transactional_messages_per_second"), + ), + }, }, }) } @@ -126,7 +146,7 @@ resource "aws_pinpoint_app" "test_app" {} resource "aws_pinpoint_sms_channel" "test_sms_channel" { application_id = "${aws_pinpoint_app.test_app.application_id}" - enabled = "true" + enabled = "false" sender_id = "%s" short_code = "%s" }`, senderId, shortCode) From a9c564971eb06e74452d215eab22846fa5c02a13 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 10 Oct 2018 10:16:46 -0400 Subject: [PATCH 2824/3316] resource/aws_s3_bucket: Address PR #3577 feedback * Switch replication rule destination access_control_translation from TypeSet to TypeList * Change replication rule destination account attribute naming to account_id * Add replication rule destination account_id validation * Add replication rule destination access_control_translation owner validation * Split replication rule destination access_control_translation acceptance testing into its own function and add non-encrypted configuration TestStep * Ensure testAccCheckAWSS3BucketReplicationRules can translate HIL references in Rule.Destination.Account --- aws/resource_aws_s3_bucket.go | 31 ++-- aws/resource_aws_s3_bucket_test.go | 188 +++++++++++++++++++------ website/docs/r/s3_bucket.html.markdown | 5 +- 3 files changed, 165 insertions(+), 59 deletions(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index a6c1aa05542..62fe9b2da14 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -377,9 +377,10 @@ func resourceAwsS3Bucket() *schema.Resource { Set: destinationHash, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "account": { - Type: schema.TypeString, - Optional: true, + "account_id": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateAwsAccountId, }, "bucket": { Type: schema.TypeString, @@ -401,7 +402,7 @@ func resourceAwsS3Bucket() *schema.Resource { Optional: true, }, "access_control_translation": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, MinItems: 1, MaxItems: 1, @@ -410,6 +411,9 @@ func resourceAwsS3Bucket() *schema.Resource { "owner": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.OwnerOverrideDestination, + }, false), }, }, }, @@ -1774,12 +1778,12 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. } } - if account, ok := bd["account"]; ok && account != "" { + if account, ok := bd["account_id"]; ok && account != "" { ruleDestination.Account = aws.String(account.(string)) } - if aclTranslation, ok := bd["access_control_translation"].(*schema.Set); ok && aclTranslation.Len() > 0 { - aclTranslationValues := aclTranslation.List()[0].(map[string]interface{}) + if aclTranslation, ok := bd["access_control_translation"].([]interface{}); ok && len(aclTranslation) > 0 { + aclTranslationValues := aclTranslation[0].(map[string]interface{}) ruleAclTranslation := &s3.AccessControlTranslation{} ruleAclTranslation.Owner = aws.String(aclTranslationValues["owner"].(string)) ruleDestination.AccessControlTranslation = ruleAclTranslation @@ -2031,12 +2035,13 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) } } if v.Destination.Account != nil { - rd["account"] = *v.Destination.Account + rd["account_id"] = *v.Destination.Account } if v.Destination.AccessControlTranslation != nil { - rdt := make(map[string]interface{}) - rdt["owner"] = *v.Destination.AccessControlTranslation.Owner - rd["access_control_translation"] = schema.NewSet(accessControlTranslationHash, []interface{}{rdt}) + rdt := map[string]interface{}{ + "owner": aws.StringValue(v.Destination.AccessControlTranslation.Owner), + } + rd["access_control_translation"] = []interface{}{rdt} } t["destination"] = schema.NewSet(destinationHash, []interface{}{rd}) } @@ -2227,8 +2232,8 @@ func destinationHash(v interface{}) int { if v, ok := m["account"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } - if v, ok := m["access_control_translation"].(*schema.Set); ok && v.Len() > 0 && v.List()[0] != nil { - buf.WriteString(fmt.Sprintf("%d-", accessControlTranslationHash(v.List()[0]))) + if v, ok := m["access_control_translation"].([]interface{}); ok && len(v) > 0 && v[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", accessControlTranslationHash(v[0]))) } return hashcode.String(buf.String()) } diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index 4c73ab8f74c..55ff6c17129 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -731,42 +731,6 @@ func TestAccAWSS3Bucket_Cors_EmptyOrigin(t *testing.T) { ), ), }, - { - Config: testAccAWSS3BucketConfigReplicationWithSseKmsEncryptedObjectsAndAccessControlTranslation(rInt), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc("us-west-2", &providers)), - resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), - resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), - resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), - testAccCheckAWSS3BucketReplicationRules( - "aws_s3_bucket.bucket", - testAccAwsRegionProviderFunc("us-west-2", &providers), - []*s3.ReplicationRule{ - { - ID: aws.String("foobar"), - Destination: &s3.Destination{ - Account: aws.String("${data.aws_caller_identity.current.account_id}"), - Bucket: aws.String(fmt.Sprintf("arn:aws:s3:::tf-test-bucket-destination-%d", rInt)), - StorageClass: aws.String(s3.ObjectStorageClassStandard), - EncryptionConfiguration: &s3.EncryptionConfiguration{ - ReplicaKmsKeyID: aws.String("${aws_kms_key.replica.arn}"), - }, - AccessControlTranslation: &s3.AccessControlTranslation{ - Owner: aws.String("Destination"), - }, - }, - Prefix: aws.String("foo"), - Status: aws.String(s3.ReplicationRuleStatusEnabled), - SourceSelectionCriteria: &s3.SourceSelectionCriteria{ - SseKmsEncryptedObjects: &s3.SseKmsEncryptedObjects{ - Status: aws.String(s3.SseKmsEncryptedObjectsStatusEnabled), - }, - }, - }, - }, - ), - ), - }, }, }) } @@ -1021,6 +985,90 @@ func TestAccAWSS3Bucket_Replication(t *testing.T) { }) } +func TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation(t *testing.T) { + rInt := acctest.RandInt() + region := testAccGetRegion() + partition := testAccGetPartition() + + // record the initialized providers so that we can use them to check for the instances in each region + var providers []*schema.Provider + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckWithProviders(testAccCheckAWSS3BucketDestroyWithProvider, &providers), + Steps: []resource.TestStep{ + { + Config: testAccAWSS3BucketConfigReplicationWithAccessControlTranslation(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:%s:iam::[\\d+]+:role/tf-iam-role-replication-%d", partition, rInt))), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketReplicationRules( + "aws_s3_bucket.bucket", + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Account: aws.String("${data.aws_caller_identity.current.account_id}"), + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + AccessControlTranslation: &s3.AccessControlTranslation{ + Owner: aws.String("Destination"), + }, + }, + Prefix: aws.String("foo"), + Status: aws.String(s3.ReplicationRuleStatusEnabled), + }, + }, + ), + ), + }, + { + Config: testAccAWSS3BucketConfigReplicationWithSseKmsEncryptedObjectsAndAccessControlTranslation(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:%s:iam::[\\d+]+:role/tf-iam-role-replication-%d", partition, rInt))), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketReplicationRules( + "aws_s3_bucket.bucket", + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Account: aws.String("${data.aws_caller_identity.current.account_id}"), + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + EncryptionConfiguration: &s3.EncryptionConfiguration{ + ReplicaKmsKeyID: aws.String("${aws_kms_key.replica.arn}"), + }, + AccessControlTranslation: &s3.AccessControlTranslation{ + Owner: aws.String("Destination"), + }, + }, + Prefix: aws.String("foo"), + Status: aws.String(s3.ReplicationRuleStatusEnabled), + SourceSelectionCriteria: &s3.SourceSelectionCriteria{ + SseKmsEncryptedObjects: &s3.SseKmsEncryptedObjects{ + Status: aws.String(s3.SseKmsEncryptedObjectsStatusEnabled), + }, + }, + }, + }, + ), + ), + }, + }, + }) +} + // StorageClass issue: https://github.com/hashicorp/terraform/issues/10909 func TestAccAWSS3Bucket_ReplicationWithoutStorageClass(t *testing.T) { rInt := acctest.RandInt() @@ -1513,6 +1561,15 @@ func testAccCheckAWSS3BucketReplicationRules(n string, providerF func() *schema. rs, _ := s.RootModule().Resources[n] for _, rule := range rules { if dest := rule.Destination; dest != nil { + if account := dest.Account; account != nil && strings.HasPrefix(aws.StringValue(dest.Account), "${") { + resourceReference := strings.Replace(aws.StringValue(dest.Account), "${", "", 1) + resourceReference = strings.Replace(resourceReference, "}", "", 1) + resourceReferenceParts := strings.Split(resourceReference, ".") + resourceAttribute := resourceReferenceParts[len(resourceReferenceParts)-1] + resourceName := strings.Join(resourceReferenceParts[:len(resourceReferenceParts)-1], ".") + value := s.RootModule().Resources[resourceName].Primary.Attributes[resourceAttribute] + dest.Account = aws.String(value) + } if ec := dest.EncryptionConfiguration; ec != nil { if ec.ReplicaKmsKeyID != nil { key_arn := s.RootModule().Resources["aws_kms_key.replica"].Primary.Attributes["arn"] @@ -2243,6 +2300,51 @@ resource "aws_s3_bucket" "destination" { `, randInt, randInt, randInt) } +func testAccAWSS3BucketConfigReplicationWithAccessControlTranslation(randInt int) string { + return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` +data "aws_caller_identity" "current" {} + +resource "aws_s3_bucket" "bucket" { + provider = "aws.uswest2" + bucket = "tf-test-bucket-%d" + acl = "private" + + versioning { + enabled = true + } + + replication_configuration { + role = "${aws_iam_role.role.arn}" + rules { + id = "foobar" + prefix = "foo" + status = "Enabled" + + destination { + account_id = "${data.aws_caller_identity.current.account_id}" + bucket = "${aws_s3_bucket.destination.arn}" + storage_class = "STANDARD" + + access_control_translation { + owner = "Destination" + } + } + } + } +} + +resource "aws_s3_bucket" "destination" { + provider = "aws.euwest" + bucket = "tf-test-bucket-destination-%d" + region = "eu-west-1" + + versioning { + enabled = true + } +} +`, randInt, randInt, randInt) +} + func testAccAWSS3BucketConfigReplicationWithSseKmsEncryptedObjectsAndAccessControlTranslation(randInt int) string { return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` data "aws_caller_identity" "current" {} @@ -2270,14 +2372,14 @@ resource "aws_s3_bucket" "bucket" { status = "Enabled" destination { - account = "${data.aws_caller_identity.current.account_id}" - bucket = "${aws_s3_bucket.destination.arn}" - storage_class = "STANDARD" - replica_kms_key_id = "${aws_kms_key.replica.arn}" + account_id = "${data.aws_caller_identity.current.account_id}" + bucket = "${aws_s3_bucket.destination.arn}" + storage_class = "STANDARD" + replica_kms_key_id = "${aws_kms_key.replica.arn}" - access_control_translation { - owner = "Destination" - } + access_control_translation { + owner = "Destination" + } } source_selection_criteria { diff --git a/website/docs/r/s3_bucket.html.markdown b/website/docs/r/s3_bucket.html.markdown index 131edc08961..13c20f2f4df 100644 --- a/website/docs/r/s3_bucket.html.markdown +++ b/website/docs/r/s3_bucket.html.markdown @@ -420,9 +420,8 @@ The `destination` object supports the following: * `storage_class` - (Optional) The class of storage used to store the object. * `replica_kms_key_id` - (Optional) Destination KMS encryption key ARN for SSE-KMS replication. Must be used in conjunction with `sse_kms_encrypted_objects` source selection criteria. -* `access_control_translation` - (Optional) Specifies the overrides to use for object owners on replication. Must be used in conjunction with `account` owner override configuration. -* `account` - (Optional) The Account ID to use for overriding the object owner on replication. Must be used in conjunction with - `access_control_translation` override configuration. +* `access_control_translation` - (Optional) Specifies the overrides to use for object owners on replication. Must be used in conjunction with `account_id` owner override configuration. +* `account_id` - (Optional) The Account ID to use for overriding the object owner on replication. Must be used in conjunction with `access_control_translation` override configuration. The `source_selection_criteria` object supports the following: From c9a160791fb2425ffa329cbaba46dc270545af7f Mon Sep 17 00:00:00 2001 From: Fionn Masuhr Date: Wed, 10 Oct 2018 19:08:15 +0200 Subject: [PATCH 2825/3316] Update aws_waf_web_acl action documentation --- website/docs/r/waf_web_acl.html.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/docs/r/waf_web_acl.html.markdown b/website/docs/r/waf_web_acl.html.markdown index 05103b15f09..08396ce6f3e 100644 --- a/website/docs/r/waf_web_acl.html.markdown +++ b/website/docs/r/waf_web_acl.html.markdown @@ -79,9 +79,10 @@ See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ActivatedRule. #### Arguments -* `action` - (Required) The action that CloudFront or AWS WAF takes when a web request matches the conditions in the rule. - e.g. `ALLOW`, `BLOCK` or `COUNT`. Not used if `type` is `GROUP`. -* `override_action` - (Required) Override the action that a group requests CloudFront or AWS WAF takes when a web request matches the conditions in the rule. Only used if `type` is `GROUP`. +* `action` - (Optional) The action that CloudFront or AWS WAF takes when a web request matches the conditions in the rule. Not used if `type` is `GROUP`. + * `type` - (Required) valid values are: `BLOCK`, `ALLOW`, or `COUNT` +* `override_action` - (Optional) Override the action that a group requests CloudFront or AWS WAF takes when a web request matches the conditions in the rule. Only used if `type` is `GROUP`. + * `type` - (Required) valid values are: `NONE` or `COUNT` * `priority` - (Required) Specifies the order in which the rules in a WebACL are evaluated. Rules with a lower value are evaluated before rules with a higher value. * `rule_id` - (Required) ID of the associated [rule](/docs/providers/aws/r/waf_rule.html) From 6c45469350065e85d0176de47154a30b27165ad6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 10 Oct 2018 13:08:44 -0400 Subject: [PATCH 2826/3316] Update CHANGELOG for #6110 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b3305f0c5b..58ea71e2d87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: * **New Data Source:** `aws_workspaces_bundle` [GH-3243] * **New Resource:** `aws_ebs_snapshot_copy` [GH-3086] * **New Resource:** `aws_pinpoint_adm_channel` [GH-6038] +* **New Resource:** `aws_pinpoint_email_channel` [GH-6110] * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] * **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] * **New Resource:** `aws_pinpoint_sms_channel` [GH-6088] From ee7377e30138539713ffd1d820b2a9fa0bfb1a73 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 10 Oct 2018 13:11:06 -0400 Subject: [PATCH 2827/3316] Update CHANGELOG for #6111 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58ea71e2d87..11089c13218 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: * **New Data Source:** `aws_workspaces_bundle` [GH-3243] * **New Resource:** `aws_ebs_snapshot_copy` [GH-3086] * **New Resource:** `aws_pinpoint_adm_channel` [GH-6038] +* **New Resource:** `aws_pinpoint_baidu_channel` [GH-6111] * **New Resource:** `aws_pinpoint_email_channel` [GH-6110] * **New Resource:** `aws_pinpoint_event_stream` [GH-6069] * **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] From f952a9e4f87d115a631d3553e550df456387f497 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 10 Oct 2018 13:23:16 -0400 Subject: [PATCH 2828/3316] Update CHANGELOG for #3577 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11089c13218..90fb3789737 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ ENHANCEMENTS: * resource/aws_lb_listener: Support Cognito and OIDC authentication [GH-6094] * resource/aws_lb_listener_rule: Support Cognito and OIDC authentication [GH-6094] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] +* resource/aws_s3_bucket: Add replication `access_control_translation` and `account_id` arguments (support cross-account replication ownership) [GH-3577] * resource/aws_secretsmanager_secret_version: Add `secret_binary` argument [GH-6070] * resource/aws_security_group_rule: Support resource import [GH-6027] From 055fdfa558861da125c33814e7f89cf6e0af6290 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 10 Oct 2018 13:34:22 -0400 Subject: [PATCH 2829/3316] Update CHANGELOG for #6103 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90fb3789737..a517c19f2b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ ENHANCEMENTS: * resource/aws_elastic_beanstalk_environment: Add `platform_arn` argument (support custom platforms) [GH-6093] * resource/aws_lb_listener: Support Cognito and OIDC authentication [GH-6094] * resource/aws_lb_listener_rule: Support Cognito and OIDC authentication [GH-6094] +* resource/aws_mq_broker: Add `instances` `ip_address` attribute [GH-6103] * resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] * resource/aws_s3_bucket: Add replication `access_control_translation` and `account_id` arguments (support cross-account replication ownership) [GH-3577] * resource/aws_secretsmanager_secret_version: Add `secret_binary` argument [GH-6070] From 0cb57f8869ac30d25e324b9d2cec1b5dc604ed3b Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 10 Oct 2018 18:45:25 +0000 Subject: [PATCH 2830/3316] v1.40.0 --- CHANGELOG.md | 62 ++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a517c19f2b7..8dacecc1ba6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,43 +1,43 @@ -## 1.40.0 (Unreleased) +## 1.40.0 (October 10, 2018) FEATURES: -* **New Data Source:** `aws_launch_template` [GH-6064] -* **New Data Source:** `aws_workspaces_bundle` [GH-3243] -* **New Resource:** `aws_ebs_snapshot_copy` [GH-3086] -* **New Resource:** `aws_pinpoint_adm_channel` [GH-6038] -* **New Resource:** `aws_pinpoint_baidu_channel` [GH-6111] -* **New Resource:** `aws_pinpoint_email_channel` [GH-6110] -* **New Resource:** `aws_pinpoint_event_stream` [GH-6069] -* **New Resource:** `aws_pinpoint_gcm_channel` [GH-6089] -* **New Resource:** `aws_pinpoint_sms_channel` [GH-6088] -* **New Resource:** `aws_redshift_snapshot_copy_grant` [GH-5134] +* **New Data Source:** `aws_launch_template` ([#6064](https://github.com/terraform-providers/terraform-provider-aws/issues/6064)) +* **New Data Source:** `aws_workspaces_bundle` ([#3243](https://github.com/terraform-providers/terraform-provider-aws/issues/3243)) +* **New Resource:** `aws_ebs_snapshot_copy` ([#3086](https://github.com/terraform-providers/terraform-provider-aws/issues/3086)) +* **New Resource:** `aws_pinpoint_adm_channel` ([#6038](https://github.com/terraform-providers/terraform-provider-aws/issues/6038)) +* **New Resource:** `aws_pinpoint_baidu_channel` ([#6111](https://github.com/terraform-providers/terraform-provider-aws/issues/6111)) +* **New Resource:** `aws_pinpoint_email_channel` ([#6110](https://github.com/terraform-providers/terraform-provider-aws/issues/6110)) +* **New Resource:** `aws_pinpoint_event_stream` ([#6069](https://github.com/terraform-providers/terraform-provider-aws/issues/6069)) +* **New Resource:** `aws_pinpoint_gcm_channel` ([#6089](https://github.com/terraform-providers/terraform-provider-aws/issues/6089)) +* **New Resource:** `aws_pinpoint_sms_channel` ([#6088](https://github.com/terraform-providers/terraform-provider-aws/issues/6088)) +* **New Resource:** `aws_redshift_snapshot_copy_grant` ([#5134](https://github.com/terraform-providers/terraform-provider-aws/issues/5134)) ENHANCEMENTS: -* data-source/aws_iam_policy_document: Make `statement` argument optional [GH-6052] -* data-source/aws_secretsmanager_secret: Add `policy` attribute [GH-6091] -* data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute [GH-6070] -* resource/aws_codebuild_project: Add `environment` `certificate` argument [GH-6087] -* resource/aws_ecr_repository: Add configurable `delete` timeout [GH-3910] -* resource/aws_elastic_beanstalk_environment: Add `platform_arn` argument (support custom platforms) [GH-6093] -* resource/aws_lb_listener: Support Cognito and OIDC authentication [GH-6094] -* resource/aws_lb_listener_rule: Support Cognito and OIDC authentication [GH-6094] -* resource/aws_mq_broker: Add `instances` `ip_address` attribute [GH-6103] -* resource/aws_rds_cluster: Support `engine_version` updates [GH-5010] -* resource/aws_s3_bucket: Add replication `access_control_translation` and `account_id` arguments (support cross-account replication ownership) [GH-3577] -* resource/aws_secretsmanager_secret_version: Add `secret_binary` argument [GH-6070] -* resource/aws_security_group_rule: Support resource import [GH-6027] +* data-source/aws_iam_policy_document: Make `statement` argument optional ([#6052](https://github.com/terraform-providers/terraform-provider-aws/issues/6052)) +* data-source/aws_secretsmanager_secret: Add `policy` attribute ([#6091](https://github.com/terraform-providers/terraform-provider-aws/issues/6091)) +* data-source/aws_secretsmanager_secret_version: Add `secret_binary` attribute ([#6070](https://github.com/terraform-providers/terraform-provider-aws/issues/6070)) +* resource/aws_codebuild_project: Add `environment` `certificate` argument ([#6087](https://github.com/terraform-providers/terraform-provider-aws/issues/6087)) +* resource/aws_ecr_repository: Add configurable `delete` timeout ([#3910](https://github.com/terraform-providers/terraform-provider-aws/issues/3910)) +* resource/aws_elastic_beanstalk_environment: Add `platform_arn` argument (support custom platforms) ([#6093](https://github.com/terraform-providers/terraform-provider-aws/issues/6093)) +* resource/aws_lb_listener: Support Cognito and OIDC authentication ([#6094](https://github.com/terraform-providers/terraform-provider-aws/issues/6094)) +* resource/aws_lb_listener_rule: Support Cognito and OIDC authentication ([#6094](https://github.com/terraform-providers/terraform-provider-aws/issues/6094)) +* resource/aws_mq_broker: Add `instances` `ip_address` attribute ([#6103](https://github.com/terraform-providers/terraform-provider-aws/issues/6103)) +* resource/aws_rds_cluster: Support `engine_version` updates ([#5010](https://github.com/terraform-providers/terraform-provider-aws/issues/5010)) +* resource/aws_s3_bucket: Add replication `access_control_translation` and `account_id` arguments (support cross-account replication ownership) ([#3577](https://github.com/terraform-providers/terraform-provider-aws/issues/3577)) +* resource/aws_secretsmanager_secret_version: Add `secret_binary` argument ([#6070](https://github.com/terraform-providers/terraform-provider-aws/issues/6070)) +* resource/aws_security_group_rule: Support resource import ([#6027](https://github.com/terraform-providers/terraform-provider-aws/issues/6027)) BUG FIXES: -* resource/aws_appautoscaling_policy: Properly handle negative values in step scaling metric intervals [GH-3480] -* resource/aws_appsync_datasource: Properly pass all attributes during update [GH-5814] -* resource/aws_batch_job_queue: Prevent error during read of non-existent Job Queue [GH-6085] -* resource/aws_ecr_repository: Retry read for eventual consistency after resource creation [GH-3910] -* resource/aws_ecs_service: Properly remove non-existent services from Terraform state [GH-6039] -* resource/aws_iam_instance_profile: Retry for eventual consistency when adding a role [GH-6079] -* resource/aws_lb_listener: Retry read for eventual consistency after resource creation [GH-5167] +* resource/aws_appautoscaling_policy: Properly handle negative values in step scaling metric intervals ([#3480](https://github.com/terraform-providers/terraform-provider-aws/issues/3480)) +* resource/aws_appsync_datasource: Properly pass all attributes during update ([#5814](https://github.com/terraform-providers/terraform-provider-aws/issues/5814)) +* resource/aws_batch_job_queue: Prevent error during read of non-existent Job Queue ([#6085](https://github.com/terraform-providers/terraform-provider-aws/issues/6085)) +* resource/aws_ecr_repository: Retry read for eventual consistency after resource creation ([#3910](https://github.com/terraform-providers/terraform-provider-aws/issues/3910)) +* resource/aws_ecs_service: Properly remove non-existent services from Terraform state ([#6039](https://github.com/terraform-providers/terraform-provider-aws/issues/6039)) +* resource/aws_iam_instance_profile: Retry for eventual consistency when adding a role ([#6079](https://github.com/terraform-providers/terraform-provider-aws/issues/6079)) +* resource/aws_lb_listener: Retry read for eventual consistency after resource creation ([#5167](https://github.com/terraform-providers/terraform-provider-aws/issues/5167)) ## 1.39.0 (October 03, 2018) From b0759c47618bd9746beb1ba43b0679ebbce05e98 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Wed, 10 Oct 2018 18:53:21 +0000 Subject: [PATCH 2831/3316] Cleanup after v1.40.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dacecc1ba6..ea9c8188419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.41.0 (Unreleased) ## 1.40.0 (October 10, 2018) FEATURES: From 9f42a5a79ab7d3010615cee778ca204b5f86dafe Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 10 Oct 2018 16:45:27 -0400 Subject: [PATCH 2832/3316] Update CHANGELOG for #6016 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea9c8188419..d0dd4b70003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ FEATURES: * **New Data Source:** `aws_launch_template` ([#6064](https://github.com/terraform-providers/terraform-provider-aws/issues/6064)) * **New Data Source:** `aws_workspaces_bundle` ([#3243](https://github.com/terraform-providers/terraform-provider-aws/issues/3243)) +* **New Guide:** [`AWS IAM Policy Documents`](https://www.terraform.io/docs/providers/aws/guides/iam-policy-documents.html) ([#6016](https://github.com/terraform-providers/terraform-provider-aws/issues/6016)) * **New Resource:** `aws_ebs_snapshot_copy` ([#3086](https://github.com/terraform-providers/terraform-provider-aws/issues/3086)) * **New Resource:** `aws_pinpoint_adm_channel` ([#6038](https://github.com/terraform-providers/terraform-provider-aws/issues/6038)) * **New Resource:** `aws_pinpoint_baidu_channel` ([#6111](https://github.com/terraform-providers/terraform-provider-aws/issues/6111)) From f5d2b942be742075dbbbc33a465b03c335a26cc8 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Wed, 10 Oct 2018 13:46:17 -0700 Subject: [PATCH 2833/3316] DRY the ResultConfiguration logic. --- aws/resource_aws_athena_database.go | 37 ++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index 10617d0e6ad..feb5f48f190 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -59,9 +59,7 @@ func resourceAwsAthenaDatabase() *schema.Resource { } } -func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).athenaconn - +func getResultConfig(d *schema.ResourceData) (athena.ResultConfiguration, error) { e := d.Get("encryption_key").([]interface{}) data := e[0].(map[string]interface{}) keyType := data["type"].(string) @@ -87,6 +85,17 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e resultConfig.EncryptionConfiguration = &encryptionConfig } + return resultConfig, nil +} + +func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).athenaconn + + resultConfig, err := getResultConfig(d) + if err != nil { + return err + } + input := &athena.StartQueryExecutionInput{ QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), ResultConfiguration: &resultConfig, @@ -107,12 +116,15 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn + resultConfig, err := getResultConfig(d) + if err != nil { + return err + } + bucket := d.Get("bucket").(string) input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprint("show databases;")), - ResultConfiguration: &athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + bucket), - }, + QueryString: aws.String(fmt.Sprint("show databases;")), + ResultConfiguration: &resultConfig, } resp, err := conn.StartQueryExecution(input) @@ -133,6 +145,11 @@ func resourceAwsAthenaDatabaseUpdate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn + resultConfig, err := getResultConfig(d) + if err != nil { + return err + } + name := d.Get("name").(string) bucket := d.Get("bucket").(string) @@ -143,10 +160,8 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e queryString += ";" input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(queryString), - ResultConfiguration: &athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + bucket), - }, + QueryString: aws.String(queryString), + ResultConfiguration: &resultConfig, } resp, err := conn.StartQueryExecution(input) From 2d7624b33c0b53bf194afb6e9f9c7243f86387dc Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Wed, 10 Oct 2018 15:42:54 -0700 Subject: [PATCH 2834/3316] Add a test for Athena encryption. --- GNUmakefile | 2 +- aws/resource_aws_athena_database.go | 14 +++---- aws/resource_aws_athena_database_test.go | 52 ++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index eec5686780d..b448b890bf8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,7 +16,7 @@ sweep: test: fmtcheck go test $(TEST) -timeout=30s -parallel=4 -testacc: fmtcheck +testacc: TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m fmt: diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index feb5f48f190..cc46bcebafc 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -59,7 +59,7 @@ func resourceAwsAthenaDatabase() *schema.Resource { } } -func getResultConfig(d *schema.ResourceData) (athena.ResultConfiguration, error) { +func getResultConfig(d *schema.ResourceData) (*athena.ResultConfiguration, error) { e := d.Get("encryption_key").([]interface{}) data := e[0].(map[string]interface{}) keyType := data["type"].(string) @@ -71,7 +71,7 @@ func getResultConfig(d *schema.ResourceData) (athena.ResultConfiguration, error) if len(keyType) > 0 { if strings.HasSuffix(keyType, "_KMS") && len(keyID) <= 0 { - return fmt.Errorf("Key type %s requires a valid KMS key ID", keyType) + return nil, fmt.Errorf("Key type %s requires a valid KMS key ID", keyType) } encryptionConfig := athena.EncryptionConfiguration{ @@ -85,7 +85,7 @@ func getResultConfig(d *schema.ResourceData) (athena.ResultConfiguration, error) resultConfig.EncryptionConfiguration = &encryptionConfig } - return resultConfig, nil + return &resultConfig, nil } func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { @@ -98,7 +98,7 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e input := &athena.StartQueryExecutionInput{ QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), - ResultConfiguration: &resultConfig, + ResultConfiguration: resultConfig, } resp, err := conn.StartQueryExecution(input) @@ -121,10 +121,9 @@ func resourceAwsAthenaDatabaseRead(d *schema.ResourceData, meta interface{}) err return err } - bucket := d.Get("bucket").(string) input := &athena.StartQueryExecutionInput{ QueryString: aws.String(fmt.Sprint("show databases;")), - ResultConfiguration: &resultConfig, + ResultConfiguration: resultConfig, } resp, err := conn.StartQueryExecution(input) @@ -151,7 +150,6 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e } name := d.Get("name").(string) - bucket := d.Get("bucket").(string) queryString := fmt.Sprintf("drop database `%s`", name) if d.Get("force_destroy").(bool) { @@ -161,7 +159,7 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e input := &athena.StartQueryExecutionInput{ QueryString: aws.String(queryString), - ResultConfiguration: &resultConfig, + ResultConfiguration: resultConfig, } resp, err := conn.StartQueryExecution(input) diff --git a/aws/resource_aws_athena_database_test.go b/aws/resource_aws_athena_database_test.go index 661206ef0e3..0916290a450 100644 --- a/aws/resource_aws_athena_database_test.go +++ b/aws/resource_aws_athena_database_test.go @@ -31,6 +31,25 @@ func TestAccAWSAthenaDatabase_basic(t *testing.T) { }) } +func TestAccAWSAthenaDatabase_encryption(t *testing.T) { + rInt := acctest.RandInt() + dbName := acctest.RandString(8) + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAthenaDatabaseWithKMSConfig(rInt, dbName, false), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAthenaDatabaseExists("aws_athena_database.hoge"), + resource.TestCheckResourceAttr("aws_athena_database.hoge", "encryption_key.0.type", "SSE_KMS"), + ), + }, + }, + }) +} + func TestAccAWSAthenaDatabase_nameStartsWithUnderscore(t *testing.T) { rInt := acctest.RandInt() dbName := "_" + acctest.RandString(8) @@ -333,3 +352,36 @@ func testAccAthenaDatabaseConfig(randInt int, dbName string, forceDestroy bool) } `, randInt, dbName, forceDestroy) } + +func testAccAthenaDatabaseWithKMSConfig(randInt int, dbName string, forceDestroy bool) string { + return fmt.Sprintf(` +resource "aws_kms_key" "hoge" { + deletion_window_in_days = 10 +} + +resource "aws_s3_bucket" "hoge" { + bucket = "tf-athena-db-%[1]d" + force_destroy = true + + server_side_encryption_configuration { + rule { + apply_server_side_encryption_by_default { + kms_master_key_id = "${aws_kms_key.hoge.arn}" + sse_algorithm = "aws:kms" + } + } + } +} + +resource "aws_athena_database" "hoge" { + name = "%[2]s" + bucket = "${aws_s3_bucket.hoge.bucket}" + force_destroy = %[3]t + + encryption_key { + type = "SSE_KMS" + id = "${aws_kms_key.hoge.arn}" + } +} + `, randInt, dbName, forceDestroy) +} From 6cb66f4e371d6aa7eaabfb59f7b919f269f638c2 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Wed, 10 Oct 2018 15:45:04 -0700 Subject: [PATCH 2835/3316] Back out my fmtcheck change. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index b448b890bf8..eec5686780d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,7 +16,7 @@ sweep: test: fmtcheck go test $(TEST) -timeout=30s -parallel=4 -testacc: +testacc: fmtcheck TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m fmt: From 109cacc8e1b966c3b9e5a23f9d815a9a85456802 Mon Sep 17 00:00:00 2001 From: bluskool Date: Wed, 10 Oct 2018 19:16:26 -0400 Subject: [PATCH 2836/3316] Update config_map_aws_auth in docs to match repo https://github.com/terraform-providers/terraform-provider-aws/commit/3087f1d8e00a736c01f5062c0826e2801a7a872e changed the hyphens to underscores in the name of this output variable, but the docs still have hyphens. This will change the docs so that they match the code in the terraform-providers github repo --- website/docs/guides/eks-getting-started.html.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/docs/guides/eks-getting-started.html.md b/website/docs/guides/eks-getting-started.html.md index 34fb514ff9e..7af3db71365 100644 --- a/website/docs/guides/eks-getting-started.html.md +++ b/website/docs/guides/eks-getting-started.html.md @@ -563,7 +563,7 @@ Terraform configuration: ```hcl locals { - config-map-aws-auth = < Date: Wed, 10 Oct 2018 20:45:05 -0400 Subject: [PATCH 2837/3316] resource/aws_lb_listener_rule: Set action order to Computed While the acceptance testing is not finding this scenario, the order value may return as 1. This may be caused by web console updates. --- aws/resource_aws_lb_listener_rule.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_lb_listener_rule.go b/aws/resource_aws_lb_listener_rule.go index e40a16ff26c..e1c1503f9fc 100644 --- a/aws/resource_aws_lb_listener_rule.go +++ b/aws/resource_aws_lb_listener_rule.go @@ -63,6 +63,7 @@ func resourceAwsLbbListenerRule() *schema.Resource { "order": { Type: schema.TypeInt, Optional: true, + Computed: true, ValidateFunc: validation.IntBetween(1, 50000), }, From e4efa7da84c30d40fd471e312458eab5c5c39039 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 10 Oct 2018 20:45:16 -0400 Subject: [PATCH 2838/3316] resource/aws_lb_listener: Set action order to Computed While the acceptance testing is not finding this scenario, the order value may return as 1. This may be caused by web console updates. --- aws/resource_aws_lb_listener.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index be5e341f48c..0789f835e7e 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -92,6 +92,7 @@ func resourceAwsLbListener() *schema.Resource { "order": { Type: schema.TypeInt, Optional: true, + Computed: true, ValidateFunc: validation.IntBetween(1, 50000), }, From 79016726badc208964c17459b095c89958bc8a87 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Oct 2018 10:23:43 -0400 Subject: [PATCH 2839/3316] resource/aws_lb_listener: Allow configuration ordering to automatically configure default_action order --- aws/resource_aws_lb_listener.go | 17 +-- aws/resource_aws_lb_listener_test.go | 177 +++++++++++++++++++++-- website/docs/r/lb_listener.html.markdown | 4 - 3 files changed, 175 insertions(+), 23 deletions(-) diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index be5e341f48c..cd7e8a9a030 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -92,6 +92,7 @@ func resourceAwsLbListener() *schema.Resource { "order": { Type: schema.TypeInt, Optional: true, + Computed: true, ValidateFunc: validation.IntBetween(1, 50000), }, @@ -355,15 +356,13 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error defaultActionMap := defaultAction.(map[string]interface{}) action := &elbv2.Action{ - Type: aws.String(defaultActionMap["type"].(string)), + Order: aws.Int64(int64(i + 1)), + Type: aws.String(defaultActionMap["type"].(string)), } - if order, ok := defaultActionMap["order"]; ok && order != 0 { + if order, ok := defaultActionMap["order"]; ok && order.(int) != 0 { action.Order = aws.Int64(int64(order.(int))) } - if len(defaultActions) != 1 && action.Order == nil { - return errors.New("when using more then one action, you need to specify 'order' for each action") - } switch defaultActionMap["type"].(string) { case "forward": @@ -663,15 +662,13 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error defaultActionMap := defaultAction.(map[string]interface{}) action := &elbv2.Action{ - Type: aws.String(defaultActionMap["type"].(string)), + Order: aws.Int64(int64(i + 1)), + Type: aws.String(defaultActionMap["type"].(string)), } - if order, ok := defaultActionMap["order"]; ok && order != 0 { + if order, ok := defaultActionMap["order"]; ok && order.(int) != 0 { action.Order = aws.Int64(int64(order.(int))) } - if len(defaultActions) != 1 && action.Order == nil { - return errors.New("when using more then one action, you need to specify 'order' for each action") - } switch defaultActionMap["type"].(string) { case "forward": diff --git a/aws/resource_aws_lb_listener_test.go b/aws/resource_aws_lb_listener_test.go index 3725b5f5bdb..dfd4631af00 100644 --- a/aws/resource_aws_lb_listener_test.go +++ b/aws/resource_aws_lb_listener_test.go @@ -32,6 +32,7 @@ func TestAccAWSLBListener_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener.front_end", "protocol", "HTTP"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "port", "80"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.type", "forward"), resource.TestCheckResourceAttrSet("aws_lb_listener.front_end", "default_action.0.target_group_arn"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.redirect.#", "0"), @@ -62,6 +63,7 @@ func TestAccAWSLBListenerBackwardsCompatibility(t *testing.T) { resource.TestCheckResourceAttr("aws_alb_listener.front_end", "protocol", "HTTP"), resource.TestCheckResourceAttr("aws_alb_listener.front_end", "port", "80"), resource.TestCheckResourceAttr("aws_alb_listener.front_end", "default_action.#", "1"), + resource.TestCheckResourceAttr("aws_alb_listener.front_end", "default_action.0.order", "1"), resource.TestCheckResourceAttr("aws_alb_listener.front_end", "default_action.0.type", "forward"), resource.TestCheckResourceAttrSet("aws_alb_listener.front_end", "default_action.0.target_group_arn"), resource.TestCheckResourceAttr("aws_alb_listener.front_end", "default_action.0.redirect.#", "0"), @@ -92,6 +94,7 @@ func TestAccAWSLBListener_https(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener.front_end", "protocol", "HTTPS"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "port", "443"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.type", "forward"), resource.TestCheckResourceAttrSet("aws_lb_listener.front_end", "default_action.0.target_group_arn"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.redirect.#", "0"), @@ -123,6 +126,7 @@ func TestAccAWSLBListener_redirect(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener.front_end", "protocol", "HTTP"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "port", "80"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.type", "redirect"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.target_group_arn", ""), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.redirect.#", "1"), @@ -158,6 +162,7 @@ func TestAccAWSLBListener_fixedResponse(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener.front_end", "protocol", "HTTP"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "port", "80"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.type", "fixed-response"), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.target_group_arn", ""), resource.TestCheckResourceAttr("aws_lb_listener.front_end", "default_action.0.redirect.#", "0"), @@ -190,14 +195,13 @@ func TestAccAWSLBListener_cognito(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener.test", "protocol", "HTTPS"), resource.TestCheckResourceAttr("aws_lb_listener.test", "port", "443"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.type", "authenticate-cognito"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.type", "authenticate-cognito"), resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.user_pool_arn"), resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.user_pool_client_id"), resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.user_pool_domain"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.authentication_request_extra_params.%", "1"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_cognito.0.authentication_request_extra_params.param", "test"), - resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.type", "forward"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.order", "2"), resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.1.target_group_arn"), @@ -226,8 +230,8 @@ func TestAccAWSLBListener_oidc(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener.test", "protocol", "HTTPS"), resource.TestCheckResourceAttr("aws_lb_listener.test", "port", "443"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.type", "authenticate-oidc"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.type", "authenticate-oidc"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.authorization_endpoint", "https://example.com/authorization_endpoint"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.client_id", "s6BhdRkqt3"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.client_secret", "7Fjfp0ZBr1KtDRbnfVdmIw"), @@ -236,9 +240,8 @@ func TestAccAWSLBListener_oidc(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.user_info_endpoint", "https://example.com/user_info_endpoint"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.authentication_request_extra_params.%", "1"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.authenticate_oidc.0.authentication_request_extra_params.param", "test"), - resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.type", "forward"), resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.order", "2"), + resource.TestCheckResourceAttr("aws_lb_listener.test", "default_action.1.type", "forward"), resource.TestCheckResourceAttrSet("aws_lb_listener.test", "default_action.1.target_group_arn"), ), }, @@ -246,6 +249,29 @@ func TestAccAWSLBListener_oidc(t *testing.T) { }) } +func TestAccAWSLBListener_DefaultAction_Order(t *testing.T) { + var listener elbv2.Listener + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_lb_listener.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckAWSLBListenerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerConfig_DefaultAction_Order(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerExists(resourceName, &listener), + resource.TestCheckResourceAttr(resourceName, "default_action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "default_action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "default_action.1.order", "2"), + ), + }, + }, + }) +} + func testAccCheckAWSLBListenerExists(n string, res *elbv2.Listener) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -928,7 +954,6 @@ resource "aws_lb_listener" "test" { certificate_arn = "${aws_iam_server_certificate.test.arn}" default_action { - order = 1 type = "authenticate-cognito" authenticate_cognito { user_pool_arn = "${aws_cognito_user_pool.test.arn}" @@ -942,7 +967,6 @@ resource "aws_lb_listener" "test" { } default_action { - order = 2 target_group_arn = "${aws_lb_target_group.test.id}" type = "forward" } @@ -1057,7 +1081,6 @@ resource "aws_lb_listener" "test" { certificate_arn = "${aws_iam_server_certificate.test.arn}" default_action { - order = 1 type = "authenticate-oidc" authenticate_oidc { authorization_endpoint = "https://example.com/authorization_endpoint" @@ -1074,10 +1097,146 @@ resource "aws_lb_listener" "test" { } default_action { - order = 2 target_group_arn = "${aws_lb_target_group.test.id}" type = "forward" } } `, rName, rName, rName, rName) } + +func testAccAWSLBListenerConfig_DefaultAction_Order(rName string) string { + return fmt.Sprintf(` +variable "rName" { + default = %q +} + +data "aws_availability_zones" "available" {} + +resource "aws_lb_listener" "test" { + load_balancer_arn = "${aws_lb.test.id}" + protocol = "HTTPS" + port = "443" + ssl_policy = "ELBSecurityPolicy-2015-05" + certificate_arn = "${aws_iam_server_certificate.test.arn}" + + default_action { + order = 1 + type = "authenticate-oidc" + + authenticate_oidc { + authorization_endpoint = "https://example.com/authorization_endpoint" + client_id = "s6BhdRkqt3" + client_secret = "7Fjfp0ZBr1KtDRbnfVdmIw" + issuer = "https://example.com" + token_endpoint = "https://example.com/token_endpoint" + user_info_endpoint = "https://example.com/user_info_endpoint" + + authentication_request_extra_params { + param = "test" + } + } + } + + default_action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.test.arn}" + } +} + +resource "aws_iam_server_certificate" "test" { + certificate_body = "${tls_self_signed_cert.test.cert_pem}" + name = "${var.rName}" + private_key = "${tls_private_key.test.private_key_pem}" +} + +resource "tls_private_key" "test" { + algorithm = "RSA" +} + +resource "tls_self_signed_cert" "test" { + key_algorithm = "RSA" + private_key_pem = "${tls_private_key.test.private_key_pem}" + validity_period_hours = 12 + + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } + + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] +} + +resource "aws_lb" "test" { + internal = true + name = "${var.rName}" + security_groups = ["${aws_security_group.test.id}"] + subnets = ["${aws_subnet.test.*.id}"] +} + +resource "aws_lb_target_group" "test" { + name = "${var.rName}" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + tags { + Name = "${var.rName}" + } +} + +resource "aws_subnet" "test" { + count = 2 + + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + cidr_block = "10.0.${count.index}.0/24" + map_public_ip_on_launch = true + vpc_id = "${aws_vpc.test.id}" + + tags { + Name = "${var.rName}" + } +} + +resource "aws_security_group" "test" { + name = "${var.rName}" + vpc_id = "${aws_vpc.test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags { + Name = "${var.rName}" + } +}`, rName) +} diff --git a/website/docs/r/lb_listener.html.markdown b/website/docs/r/lb_listener.html.markdown index 68dbf09753b..dd47fce3158 100644 --- a/website/docs/r/lb_listener.html.markdown +++ b/website/docs/r/lb_listener.html.markdown @@ -114,7 +114,6 @@ resource "aws_lb_listener" "front_end" { protocol = "HTTP" default_action { - order = 1 type = "authenticate-cognito" authenticate_cognito { user_pool_arn = "${aws_cognito_user_pool.pool.arn}" @@ -124,7 +123,6 @@ resource "aws_lb_listener" "front_end" { } default_action { - order = 2 type = "forward" target_group_arn = "${aws_lb_target_group.front_end.arn}" } @@ -148,7 +146,6 @@ resource "aws_lb_listener" "front_end" { protocol = "HTTP" default_action { - order = 1 type = "authenticate-oidc" authenticate_oidc { authorization_endpoint = "https://example.com/authorization_endpoint" @@ -161,7 +158,6 @@ resource "aws_lb_listener" "front_end" { } default_action { - order = 2 type = "forward" target_group_arn = "${aws_lb_target_group.front_end.arn}" } From 6438f1922847b71c86149670e3a364eeda70a28e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Oct 2018 10:23:59 -0400 Subject: [PATCH 2840/3316] resource/aws_lb_listener_rule: Allow configuration ordering to automatically configure action order --- aws/resource_aws_lb_listener_rule.go | 15 +- aws/resource_aws_lb_listener_rule_test.go | 192 +++++++++++++++++- website/docs/r/lb_listener_rule.html.markdown | 4 - 3 files changed, 191 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_lb_listener_rule.go b/aws/resource_aws_lb_listener_rule.go index e40a16ff26c..cbfab8d8458 100644 --- a/aws/resource_aws_lb_listener_rule.go +++ b/aws/resource_aws_lb_listener_rule.go @@ -63,6 +63,7 @@ func resourceAwsLbbListenerRule() *schema.Resource { "order": { Type: schema.TypeInt, Optional: true, + Computed: true, ValidateFunc: validation.IntBetween(1, 50000), }, @@ -331,15 +332,13 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e actionMap := action.(map[string]interface{}) action := &elbv2.Action{ - Type: aws.String(actionMap["type"].(string)), + Order: aws.Int64(int64(i + 1)), + Type: aws.String(actionMap["type"].(string)), } - if order, ok := actionMap["order"]; ok && order != 0 { + if order, ok := actionMap["order"]; ok && order.(int) != 0 { action.Order = aws.Int64(int64(order.(int))) } - if len(actions) != 1 && action.Order == nil { - return errors.New("when using more then one action, you need to specify 'order' for each action") - } switch actionMap["type"].(string) { case "forward": @@ -676,8 +675,12 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e actionMap := action.(map[string]interface{}) action := &elbv2.Action{ + Order: aws.Int64(int64(i + 1)), Type: aws.String(actionMap["type"].(string)), - Order: aws.Int64(int64(actionMap["order"].(int))), // TODO, optional + } + + if order, ok := actionMap["order"]; ok && order.(int) != 0 { + action.Order = aws.Int64(int64(order.(int))) } switch actionMap["type"].(string) { diff --git a/aws/resource_aws_lb_listener_rule_test.go b/aws/resource_aws_lb_listener_rule_test.go index 2de06e8ebd2..70519cc506c 100644 --- a/aws/resource_aws_lb_listener_rule_test.go +++ b/aws/resource_aws_lb_listener_rule_test.go @@ -73,6 +73,7 @@ func TestAccAWSLBListenerRule_basic(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.type", "forward"), resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "action.0.target_group_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.#", "0"), @@ -106,6 +107,7 @@ func TestAccAWSLBListenerRuleBackwardsCompatibility(t *testing.T) { resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "listener_arn"), resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "priority", "100"), resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.order", "1"), resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.type", "forward"), resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "action.0.target_group_arn"), resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.redirect.#", "0"), @@ -138,6 +140,7 @@ func TestAccAWSLBListenerRule_redirect(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.type", "redirect"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.target_group_arn", ""), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.#", "1"), @@ -176,6 +179,7 @@ func TestAccAWSLBListenerRule_fixedResponse(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb_listener_rule.static", "listener_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "priority", "100"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.#", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.order", "1"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.type", "fixed-response"), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.target_group_arn", ""), resource.TestCheckResourceAttr("aws_lb_listener_rule.static", "action.0.redirect.#", "0"), @@ -362,16 +366,15 @@ func TestAccAWSLBListenerRule_cognito(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "listener_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "priority", "100"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.type", "authenticate-cognito"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.type", "authenticate-cognito"), resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_arn"), resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_client_id"), resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.user_pool_domain"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.authentication_request_extra_params.%", "1"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.authenticate_cognito.0.authentication_request_extra_params.param", "test"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.1.type", "forward"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.1.order", "2"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "action.1.type", "forward"), resource.TestCheckResourceAttrSet("aws_lb_listener_rule.cognito", "action.1.target_group_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "condition.#", "1"), resource.TestCheckResourceAttr("aws_lb_listener_rule.cognito", "condition.1366281676.field", "path-pattern"), @@ -403,8 +406,8 @@ func TestAccAWSLBListenerRule_oidc(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "listener_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "priority", "100"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.#", "2"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.type", "authenticate-oidc"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.order", "1"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.type", "authenticate-oidc"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authorization_endpoint", "https://example.com/authorization_endpoint"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.client_id", "s6BhdRkqt3"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.client_secret", "7Fjfp0ZBr1KtDRbnfVdmIw"), @@ -413,9 +416,8 @@ func TestAccAWSLBListenerRule_oidc(t *testing.T) { resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.user_info_endpoint", "https://example.com/user_info_endpoint"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authentication_request_extra_params.%", "1"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.authenticate_oidc.0.authentication_request_extra_params.param", "test"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.0.order", "1"), - resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.1.type", "forward"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.1.order", "2"), + resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "action.1.type", "forward"), resource.TestCheckResourceAttrSet("aws_lb_listener_rule.oidc", "action.1.target_group_arn"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "condition.#", "1"), resource.TestCheckResourceAttr("aws_lb_listener_rule.oidc", "condition.1366281676.field", "path-pattern"), @@ -427,6 +429,29 @@ func TestAccAWSLBListenerRule_oidc(t *testing.T) { }) } +func TestAccAWSLBListenerRule_Action_Order(t *testing.T) { + var rule elbv2.Rule + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_lb_listener_rule.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProvidersWithTLS, + CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSLBListenerRuleConfig_Action_Order(rName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSLBListenerRuleExists(resourceName, &rule), + resource.TestCheckResourceAttr(resourceName, "action.#", "2"), + resource.TestCheckResourceAttr(resourceName, "action.0.order", "1"), + resource.TestCheckResourceAttr(resourceName, "action.1.order", "2"), + ), + }, + }, + }) +} + func testAccCheckAWSLbListenerRuleRecreated(t *testing.T, before, after *elbv2.Rule) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -1520,7 +1545,6 @@ func testAccAWSLBListenerRuleConfig_cognito(lbName string, targetGroupName strin priority = 100 action { - order = 1 type = "authenticate-cognito" authenticate_cognito { user_pool_arn = "${aws_cognito_user_pool.test.arn}" @@ -1534,7 +1558,6 @@ func testAccAWSLBListenerRuleConfig_cognito(lbName string, targetGroupName strin } action { - order = 2 type = "forward" target_group_arn = "${aws_lb_target_group.test.arn}" } @@ -1697,7 +1720,6 @@ func testAccAWSLBListenerRuleConfig_oidc(lbName string, targetGroupName string, priority = 100 action { - order = 1 type = "authenticate-oidc" authenticate_oidc { authorization_endpoint = "https://example.com/authorization_endpoint" @@ -1714,7 +1736,6 @@ func testAccAWSLBListenerRuleConfig_oidc(lbName string, targetGroupName string, } action { - order = 2 type = "forward" target_group_arn = "${aws_lb_target_group.test.arn}" } @@ -1849,3 +1870,154 @@ resource "aws_security_group" "alb_test" { } }`, lbName, targetGroupName, certificateName) } + +func testAccAWSLBListenerRuleConfig_Action_Order(rName string) string { + return fmt.Sprintf(` +variable "rName" { + default = %q +} + +data "aws_availability_zones" "available" {} + +resource "aws_lb_listener_rule" "test" { + listener_arn = "${aws_lb_listener.test.arn}" + + action { + order = 1 + type = "authenticate-oidc" + + authenticate_oidc { + authorization_endpoint = "https://example.com/authorization_endpoint" + client_id = "s6BhdRkqt3" + client_secret = "7Fjfp0ZBr1KtDRbnfVdmIw" + issuer = "https://example.com" + token_endpoint = "https://example.com/token_endpoint" + user_info_endpoint = "https://example.com/user_info_endpoint" + + authentication_request_extra_params { + param = "test" + } + } + } + + action { + order = 2 + type = "forward" + target_group_arn = "${aws_lb_target_group.test.arn}" + } + + condition { + field = "path-pattern" + values = ["/static/*"] + } +} + +resource "aws_iam_server_certificate" "test" { + certificate_body = "${tls_self_signed_cert.test.cert_pem}" + name = "${var.rName}" + private_key = "${tls_private_key.test.private_key_pem}" +} + +resource "tls_private_key" "test" { + algorithm = "RSA" +} + +resource "tls_self_signed_cert" "test" { + key_algorithm = "RSA" + private_key_pem = "${tls_private_key.test.private_key_pem}" + validity_period_hours = 12 + + subject { + common_name = "example.com" + organization = "ACME Examples, Inc" + } + + allowed_uses = [ + "key_encipherment", + "digital_signature", + "server_auth", + ] +} + +resource "aws_lb_listener" "test" { + load_balancer_arn = "${aws_lb.test.id}" + protocol = "HTTPS" + port = "443" + ssl_policy = "ELBSecurityPolicy-2015-05" + certificate_arn = "${aws_iam_server_certificate.test.arn}" + + default_action { + target_group_arn = "${aws_lb_target_group.test.id}" + type = "forward" + } +} + +resource "aws_lb" "test" { + internal = true + name = "${var.rName}" + security_groups = ["${aws_security_group.test.id}"] + subnets = ["${aws_subnet.test.*.id}"] +} + +resource "aws_lb_target_group" "test" { + name = "${var.rName}" + port = 8080 + protocol = "HTTP" + vpc_id = "${aws_vpc.test.id}" + + health_check { + path = "/health" + interval = 60 + port = 8081 + protocol = "HTTP" + timeout = 3 + healthy_threshold = 3 + unhealthy_threshold = 3 + matcher = "200-299" + } +} + +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" + + tags { + Name = "${var.rName}" + } +} + +resource "aws_subnet" "test" { + count = 2 + + availability_zone = "${data.aws_availability_zones.available.names[count.index]}" + cidr_block = "10.0.${count.index}.0/24" + map_public_ip_on_launch = true + vpc_id = "${aws_vpc.test.id}" + + tags { + Name = "${var.rName}" + } +} + +resource "aws_security_group" "test" { + name = "${var.rName}" + vpc_id = "${aws_vpc.test.id}" + + ingress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags { + Name = "${var.rName}" + } +}`, rName) +} diff --git a/website/docs/r/lb_listener_rule.html.markdown b/website/docs/r/lb_listener_rule.html.markdown index 89ba154a0a0..b26796d0349 100644 --- a/website/docs/r/lb_listener_rule.html.markdown +++ b/website/docs/r/lb_listener_rule.html.markdown @@ -113,7 +113,6 @@ resource "aws_lb_listener_rule" "admin" { listener_arn = "${aws_lb_listener.front_end.arn}" action { - order = 1 type = "authenticate-cognito" authenticate_cognito { user_pool_arn = "${aws_cognito_user_pool.pool.arn}" @@ -123,7 +122,6 @@ resource "aws_lb_listener_rule" "admin" { } action { - order = 2 type = "forward" target_group_arn = "${aws_lb_target_group.static.arn}" } @@ -135,7 +133,6 @@ resource "aws_lb_listener" "admin" { listener_arn = "${aws_lb_listener.front_end.arn}" action { - order = 1 type = "authenticate-oidc" authenticate_oidc { authorization_endpoint = "https://example.com/authorization_endpoint" @@ -148,7 +145,6 @@ resource "aws_lb_listener" "admin" { } action { - order = 2 type = "forward" target_group_arn = "${aws_lb_target_group.static.arn}" } From 871162318a777577615d51dbe3ddba0f6279a899 Mon Sep 17 00:00:00 2001 From: rayterrill Date: Thu, 11 Oct 2018 08:17:38 -0700 Subject: [PATCH 2841/3316] Update security_group markdown to add warning about protocol = all and to_port/from_port --- website/docs/r/security_group_rule.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/r/security_group_rule.html.markdown b/website/docs/r/security_group_rule.html.markdown index d636a69d93b..df4e2f93e20 100644 --- a/website/docs/r/security_group_rule.html.markdown +++ b/website/docs/r/security_group_rule.html.markdown @@ -18,6 +18,8 @@ defined in-line. At this time you cannot use a Security Group with in-line rules in conjunction with any Security Group Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules. +**WARNING on Using Protocol = "all" with from_port and to_port:** Using protocol = "all" with from_port and to_port will result in the AWS API silently creating a security group with Port Range = ALL (the from_port and to_port sections are removed entirely during creation). This may result in a security group that is MUCH more wide open than anticipated. + ## Example Usage Basic usage From 5ebb801d4e27684e979ce88ff7972206a58133c9 Mon Sep 17 00:00:00 2001 From: rayterrill Date: Thu, 11 Oct 2018 12:08:27 -0700 Subject: [PATCH 2842/3316] Update security_group_rule.html.markdown --- website/docs/r/security_group_rule.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/security_group_rule.html.markdown b/website/docs/r/security_group_rule.html.markdown index df4e2f93e20..371ea60f5a2 100644 --- a/website/docs/r/security_group_rule.html.markdown +++ b/website/docs/r/security_group_rule.html.markdown @@ -18,7 +18,7 @@ defined in-line. At this time you cannot use a Security Group with in-line rules in conjunction with any Security Group Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules. -**WARNING on Using Protocol = "all" with from_port and to_port:** Using protocol = "all" with from_port and to_port will result in the AWS API silently creating a security group with Port Range = ALL (the from_port and to_port sections are removed entirely during creation). This may result in a security group that is MUCH more wide open than anticipated. +~> **NOTE:** Setting `protocol = "all"` or `protocol = -1` with `from_port` and `to_port` will result in the EC2 API creating a security group rule with all ports open. This API behavior cannot be controlled by Terraform and may generate warnings in the future. ## Example Usage From b000b01a8c373b0d38121309d671a3ed8e608b2d Mon Sep 17 00:00:00 2001 From: Paul Rigor Date: Thu, 11 Oct 2018 13:43:22 -0700 Subject: [PATCH 2843/3316] Add JupyterHub to the list of EMR applications JupyterHub is available for EMR 5.14.0 --- website/docs/r/emr_cluster.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/emr_cluster.html.markdown b/website/docs/r/emr_cluster.html.markdown index fceda7a067c..173bb05743b 100644 --- a/website/docs/r/emr_cluster.html.markdown +++ b/website/docs/r/emr_cluster.html.markdown @@ -184,7 +184,7 @@ The following arguments are supported: * `instance_group` - (Optional) A list of `instance_group` objects for each instance group in the cluster. Exactly one of `master_instance_type` and `instance_group` must be specified. If `instance_group` is set, then it must contain a configuration block for at least the `MASTER` instance group type (as well as any additional instance groups). Defined below * `log_uri` - (Optional) S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created -* `applications` - (Optional) A list of applications for the cluster. Valid values are: `Flink`, `Hadoop`, `Hive`, `Mahout`, `Pig`, and `Spark`. Case insensitive +* `applications` - (Optional) A list of applications for the cluster. Valid values are: `Flink`, `Hadoop`, `Hive`, `Mahout`, `Pig`, `Spark`, and `JupyterHub` (as of EMR 5.14.0). Case insensitive * `termination_protection` - (Optional) Switch on/off termination protection (default is off) * `keep_job_flow_alive_when_no_steps` - (Optional) Switch on/off run cluster with no steps or when all steps are complete (default is on) * `ec2_attributes` - (Optional) Attributes for the EC2 instances running the job From 0d587804a1fa5b34455aa3fbd5e89a0c70e51cf1 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Oct 2018 19:51:59 -0400 Subject: [PATCH 2844/3316] docs/resource/aws_lb: Remove non-existent canonical_hosted_zone_id attribute --- website/docs/r/lb.html.markdown | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/r/lb.html.markdown b/website/docs/r/lb.html.markdown index 4eda9bcae86..142d1126f77 100644 --- a/website/docs/r/lb.html.markdown +++ b/website/docs/r/lb.html.markdown @@ -120,7 +120,6 @@ The following attributes are exported in addition to the arguments listed above: * `arn` - The ARN of the load balancer (matches `id`). * `arn_suffix` - The ARN suffix for use with CloudWatch Metrics. * `dns_name` - The DNS name of the load balancer. -* `canonical_hosted_zone_id` - The canonical hosted zone ID of the load balancer. * `zone_id` - The canonical hosted zone ID of the load balancer (to be used in a Route 53 Alias record). ## Timeouts From 6caeae3850b8ba0c9b566e67ef916de14493b3a8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Oct 2018 20:19:04 -0400 Subject: [PATCH 2845/3316] Update CHANGELOG for #6119 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0dd4b70003..a0b4af60e2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ ## 1.41.0 (Unreleased) + +BUG FIXES: + +* resource/aws_lb_listener: Prevent unconfigured `default_action` `order` from showing difference [GH-6119] +* resource/aws_lb_listener_rule: Prevent unconfigured `action` `order` from showing difference [GH-6119] + ## 1.40.0 (October 10, 2018) FEATURES: From a213157658179cd4cb1c191dc7f800bbdc732346 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Oct 2018 20:32:39 -0400 Subject: [PATCH 2846/3316] Update CHANGELOG for #6124 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0b4af60e2e..59f52b4baa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## 1.41.0 (Unreleased) +ENHANCEMENTS: + +* resource/aws_lb_listener: Allow `default_action` `order` to be based on Terraform configuration ordering [GH-6124] +* resource/aws_lb_listener_rule: Allow `action` `order` to be based on Terraform configuration ordering [GH-6124] + BUG FIXES: * resource/aws_lb_listener: Prevent unconfigured `default_action` `order` from showing difference [GH-6119] From 6f2ae992e94bb4b8d07bbc0d402bbfc097f7881f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 12 Oct 2018 08:52:27 -0400 Subject: [PATCH 2847/3316] Bump AWS SDK to v1.15.53. --- .../aws/aws-sdk-go/aws/csm/metric.go | 2 + .../aws/aws-sdk-go/aws/csm/reporter.go | 28 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/acm/api.go | 24 +- .../aws/aws-sdk-go/service/acmpca/api.go | 34 +- .../aws/aws-sdk-go/service/apigateway/api.go | 240 +- .../service/applicationautoscaling/api.go | 20 +- .../aws/aws-sdk-go/service/appsync/api.go | 54 +- .../aws/aws-sdk-go/service/athena/api.go | 87 +- .../aws/aws-sdk-go/service/athena/doc.go | 7 +- .../aws/aws-sdk-go/service/athena/errors.go | 3 +- .../aws/aws-sdk-go/service/autoscaling/api.go | 108 +- .../aws/aws-sdk-go/service/batch/api.go | 32 +- .../aws/aws-sdk-go/service/budgets/api.go | 26 +- .../aws/aws-sdk-go/service/cloud9/api.go | 20 +- .../aws-sdk-go/service/cloudformation/api.go | 82 +- .../aws/aws-sdk-go/service/cloudfront/api.go | 90 +- .../aws/aws-sdk-go/service/cloudhsmv2/api.go | 26 +- .../aws/aws-sdk-go/service/cloudsearch/api.go | 48 +- .../aws/aws-sdk-go/service/cloudtrail/api.go | 28 +- .../aws/aws-sdk-go/service/cloudwatch/api.go | 34 +- .../service/cloudwatchevents/api.go | 30 +- .../aws-sdk-go/service/cloudwatchlogs/api.go | 66 +- .../aws/aws-sdk-go/service/codebuild/api.go | 32 +- .../aws/aws-sdk-go/service/codecommit/api.go | 78 +- .../aws/aws-sdk-go/service/codedeploy/api.go | 80 +- .../aws-sdk-go/service/codepipeline/api.go | 64 +- .../aws-sdk-go/service/cognitoidentity/api.go | 36 +- .../service/cognitoidentityprovider/api.go | 190 +- .../aws-sdk-go/service/configservice/api.go | 86 +- .../service/databasemigrationservice/api.go | 88 +- .../aws-sdk-go/service/datapipeline/api.go | 38 +- .../aws/aws-sdk-go/service/dax/api.go | 42 +- .../aws/aws-sdk-go/service/devicefarm/api.go | 128 +- .../aws-sdk-go/service/directconnect/api.go | 2644 +++++++---------- .../aws-sdk-go/service/directconnect/doc.go | 19 +- .../service/directconnect/errors.go | 9 +- .../service/directoryservice/api.go | 368 ++- .../aws/aws-sdk-go/service/dlm/api.go | 10 +- .../aws/aws-sdk-go/service/dynamodb/api.go | 68 +- .../aws/aws-sdk-go/service/ec2/api.go | 551 ++-- .../aws/aws-sdk-go/service/ecr/api.go | 44 +- .../aws/aws-sdk-go/service/ecs/api.go | 62 +- .../aws/aws-sdk-go/service/efs/api.go | 24 +- .../aws/aws-sdk-go/service/eks/api.go | 8 +- .../aws/aws-sdk-go/service/elasticache/api.go | 84 +- .../service/elasticbeanstalk/api.go | 88 +- .../service/elasticsearchservice/api.go | 469 ++- .../service/elastictranscoder/api.go | 34 +- .../aws/aws-sdk-go/service/elb/api.go | 58 +- .../aws/aws-sdk-go/service/elbv2/api.go | 68 +- .../aws/aws-sdk-go/service/emr/api.go | 54 +- .../aws/aws-sdk-go/service/firehose/api.go | 20 +- .../aws/aws-sdk-go/service/fms/api.go | 26 +- .../aws/aws-sdk-go/service/gamelift/api.go | 134 +- .../aws/aws-sdk-go/service/glacier/api.go | 66 +- .../aws/aws-sdk-go/service/glue/api.go | 168 +- .../aws/aws-sdk-go/service/guardduty/api.go | 84 +- .../aws/aws-sdk-go/service/iam/api.go | 254 +- .../aws/aws-sdk-go/service/inspector/api.go | 74 +- .../aws/aws-sdk-go/service/iot/api.go | 401 ++- .../aws/aws-sdk-go/service/kinesis/api.go | 54 +- .../service/kinesisanalytics/api.go | 34 +- .../aws/aws-sdk-go/service/kms/api.go | 70 +- .../aws/aws-sdk-go/service/lambda/api.go | 60 +- .../service/lexmodelbuildingservice/api.go | 72 +- .../aws/aws-sdk-go/service/lightsail/api.go | 142 +- .../aws/aws-sdk-go/service/macie/api.go | 14 +- .../aws-sdk-go/service/mediaconvert/api.go | 326 +- .../aws/aws-sdk-go/service/medialive/api.go | 50 +- .../aws-sdk-go/service/mediapackage/api.go | 24 +- .../aws/aws-sdk-go/service/mediastore/api.go | 20 +- .../aws-sdk-go/service/mediastoredata/api.go | 10 +- .../aws/aws-sdk-go/service/mq/api.go | 34 +- .../aws/aws-sdk-go/service/neptune/api.go | 114 +- .../aws/aws-sdk-go/service/opsworks/api.go | 148 +- .../aws-sdk-go/service/organizations/api.go | 84 +- .../aws/aws-sdk-go/service/pinpoint/api.go | 142 +- .../aws/aws-sdk-go/service/pricing/api.go | 6 +- .../aws/aws-sdk-go/service/rds/api.go | 192 +- .../aws/aws-sdk-go/service/redshift/api.go | 138 +- .../aws/aws-sdk-go/service/route53/api.go | 112 +- .../aws/aws-sdk-go/service/s3/api.go | 156 +- .../aws/aws-sdk-go/service/sagemaker/api.go | 86 +- .../aws-sdk-go/service/secretsmanager/api.go | 36 +- .../serverlessapplicationrepository/api.go | 20 +- .../aws-sdk-go/service/servicecatalog/api.go | 120 +- .../service/servicediscovery/api.go | 36 +- .../aws/aws-sdk-go/service/ses/api.go | 140 +- .../aws/aws-sdk-go/service/sfn/api.go | 38 +- .../aws/aws-sdk-go/service/simpledb/api.go | 20 +- .../aws/aws-sdk-go/service/sns/api.go | 60 +- .../aws/aws-sdk-go/service/sqs/api.go | 40 +- .../aws/aws-sdk-go/service/ssm/api.go | 1085 ++++++- .../aws-sdk-go/service/storagegateway/api.go | 138 +- .../aws/aws-sdk-go/service/sts/api.go | 14 +- .../aws/aws-sdk-go/service/swf/api.go | 62 +- .../aws/aws-sdk-go/service/waf/api.go | 146 +- .../aws/aws-sdk-go/service/wafregional/api.go | 154 +- .../aws/aws-sdk-go/service/workspaces/api.go | 46 +- vendor/vendor.json | 1222 ++++---- 101 files changed, 7379 insertions(+), 5928 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go index 4b0d630e4c1..6f57024d743 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go @@ -48,4 +48,6 @@ type metric struct { DNSLatency *int `json:"DnsLatency,omitempty"` TCPLatency *int `json:"TcpLatency,omitempty"` SSLLatency *int `json:"SslLatency,omitempty"` + + MaxRetriesExceeded *int `json:"MaxRetriesExceeded,omitempty"` } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go index 691f8513a46..11861844246 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -112,15 +112,16 @@ func (rep *Reporter) sendAPICallMetric(r *request.Request) { now := time.Now() m := metric{ - ClientID: aws.String(rep.clientID), - API: aws.String(r.Operation.Name), - Service: aws.String(r.ClientInfo.ServiceID), - Timestamp: (*metricTime)(&now), - Type: aws.String("ApiCall"), - AttemptCount: aws.Int(r.RetryCount + 1), - Region: r.Config.Region, - Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), - XAmzRequestID: aws.String(r.RequestID), + ClientID: aws.String(rep.clientID), + API: aws.String(r.Operation.Name), + Service: aws.String(r.ClientInfo.ServiceID), + Timestamp: (*metricTime)(&now), + Type: aws.String("ApiCall"), + AttemptCount: aws.Int(r.RetryCount + 1), + Region: r.Config.Region, + Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), + XAmzRequestID: aws.String(r.RequestID), + MaxRetriesExceeded: aws.Int(boolIntValue(r.RetryCount >= r.MaxRetries())), } // TODO: Probably want to figure something out for logging dropped @@ -230,3 +231,12 @@ func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler) } + +// boolIntValue return 1 for true and 0 for false. +func boolIntValue(b bool) int { + if b { + return 1 + } + + return 0 +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 8347df073b3..d5da73b1181 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.15.48" +const SDKVersion = "1.15.53" diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go index 07fa10c9442..40cb236501d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go @@ -18,7 +18,7 @@ const opAddTagsToCertificate = "AddTagsToCertificate" // AddTagsToCertificateRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -126,7 +126,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -223,7 +223,7 @@ const opDescribeCertificate = "DescribeCertificate" // DescribeCertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -306,7 +306,7 @@ const opExportCertificate = "ExportCertificate" // ExportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ExportCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -401,7 +401,7 @@ const opGetCertificate = "GetCertificate" // GetCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -493,7 +493,7 @@ const opImportCertificate = "ImportCertificate" // ImportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -626,7 +626,7 @@ const opListCertificates = "ListCertificates" // ListCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -758,7 +758,7 @@ const opListTagsForCertificate = "ListTagsForCertificate" // ListTagsForCertificateRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -844,7 +844,7 @@ const opRemoveTagsFromCertificate = "RemoveTagsFromCertificate" // RemoveTagsFromCertificateRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -940,7 +940,7 @@ const opRequestCertificate = "RequestCertificate" // RequestCertificateRequest generates a "aws/request.Request" representing the // client's request for the RequestCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1036,7 +1036,7 @@ const opResendValidationEmail = "ResendValidationEmail" // ResendValidationEmailRequest generates a "aws/request.Request" representing the // client's request for the ResendValidationEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1137,7 +1137,7 @@ const opUpdateCertificateOptions = "UpdateCertificateOptions" // UpdateCertificateOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificateOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go index 113c0a3ad4d..02db27d9708 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -18,7 +18,7 @@ const opCreateCertificateAuthority = "CreateCertificateAuthority" // CreateCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the CreateCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -114,7 +114,7 @@ const opCreateCertificateAuthorityAuditReport = "CreateCertificateAuthorityAudit // CreateCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the // client's request for the CreateCertificateAuthorityAuditReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -212,7 +212,7 @@ const opDeleteCertificateAuthority = "DeleteCertificateAuthority" // DeleteCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -321,7 +321,7 @@ const opDescribeCertificateAuthority = "DescribeCertificateAuthority" // DescribeCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -426,7 +426,7 @@ const opDescribeCertificateAuthorityAuditReport = "DescribeCertificateAuthorityA // DescribeCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificateAuthorityAuditReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -515,7 +515,7 @@ const opGetCertificate = "GetCertificate" // GetCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -613,7 +613,7 @@ const opGetCertificateAuthorityCertificate = "GetCertificateAuthorityCertificate // GetCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetCertificateAuthorityCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -702,7 +702,7 @@ const opGetCertificateAuthorityCsr = "GetCertificateAuthorityCsr" // GetCertificateAuthorityCsrRequest generates a "aws/request.Request" representing the // client's request for the GetCertificateAuthorityCsr operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -799,7 +799,7 @@ const opImportCertificateAuthorityCertificate = "ImportCertificateAuthorityCerti // ImportCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificateAuthorityCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -919,7 +919,7 @@ const opIssueCertificate = "IssueCertificate" // IssueCertificateRequest generates a "aws/request.Request" representing the // client's request for the IssueCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1021,7 +1021,7 @@ const opListCertificateAuthorities = "ListCertificateAuthorities" // ListCertificateAuthoritiesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificateAuthorities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1102,7 +1102,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1189,7 +1189,7 @@ const opRestoreCertificateAuthority = "RestoreCertificateAuthority" // RestoreCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the RestoreCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1290,7 +1290,7 @@ const opRevokeCertificate = "RevokeCertificate" // RevokeCertificateRequest generates a "aws/request.Request" representing the // client's request for the RevokeCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1396,7 +1396,7 @@ const opTagCertificateAuthority = "TagCertificateAuthority" // TagCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the TagCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1500,7 +1500,7 @@ const opUntagCertificateAuthority = "UntagCertificateAuthority" // UntagCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the UntagCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1597,7 +1597,7 @@ const opUpdateCertificateAuthority = "UpdateCertificateAuthority" // UpdateCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index 877c1e93018..6241df6056c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -17,7 +17,7 @@ const opCreateApiKey = "CreateApiKey" // CreateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -113,7 +113,7 @@ const opCreateAuthorizer = "CreateAuthorizer" // CreateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the CreateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -205,7 +205,7 @@ const opCreateBasePathMapping = "CreateBasePathMapping" // CreateBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the CreateBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -296,7 +296,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -395,7 +395,7 @@ const opCreateDocumentationPart = "CreateDocumentationPart" // CreateDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the CreateDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -487,7 +487,7 @@ const opCreateDocumentationVersion = "CreateDocumentationVersion" // CreateDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -579,7 +579,7 @@ const opCreateDomainName = "CreateDomainName" // CreateDomainNameRequest generates a "aws/request.Request" representing the // client's request for the CreateDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -667,7 +667,7 @@ const opCreateModel = "CreateModel" // CreateModelRequest generates a "aws/request.Request" representing the // client's request for the CreateModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -761,7 +761,7 @@ const opCreateRequestValidator = "CreateRequestValidator" // CreateRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the CreateRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -851,7 +851,7 @@ const opCreateResource = "CreateResource" // CreateResourceRequest generates a "aws/request.Request" representing the // client's request for the CreateResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -945,7 +945,7 @@ const opCreateRestApi = "CreateRestApi" // CreateRestApiRequest generates a "aws/request.Request" representing the // client's request for the CreateRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1032,7 +1032,7 @@ const opCreateStage = "CreateStage" // CreateStageRequest generates a "aws/request.Request" representing the // client's request for the CreateStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1127,7 +1127,7 @@ const opCreateUsagePlan = "CreateUsagePlan" // CreateUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the CreateUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1222,7 +1222,7 @@ const opCreateUsagePlanKey = "CreateUsagePlanKey" // CreateUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateUsagePlanKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1313,7 +1313,7 @@ const opCreateVpcLink = "CreateVpcLink" // CreateVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1400,7 +1400,7 @@ const opDeleteApiKey = "DeleteApiKey" // DeleteApiKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1485,7 +1485,7 @@ const opDeleteAuthorizer = "DeleteAuthorizer" // DeleteAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DeleteAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1580,7 +1580,7 @@ const opDeleteBasePathMapping = "DeleteBasePathMapping" // DeleteBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the DeleteBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1673,7 +1673,7 @@ const opDeleteClientCertificate = "DeleteClientCertificate" // DeleteClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1762,7 +1762,7 @@ const opDeleteDeployment = "DeleteDeployment" // DeleteDeploymentRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1852,7 +1852,7 @@ const opDeleteDocumentationPart = "DeleteDocumentationPart" // DeleteDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1943,7 +1943,7 @@ const opDeleteDocumentationVersion = "DeleteDocumentationVersion" // DeleteDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2034,7 +2034,7 @@ const opDeleteDomainName = "DeleteDomainName" // DeleteDomainNameRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2119,7 +2119,7 @@ const opDeleteGatewayResponse = "DeleteGatewayResponse" // DeleteGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2213,7 +2213,7 @@ const opDeleteIntegration = "DeleteIntegration" // DeleteIntegrationRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2302,7 +2302,7 @@ const opDeleteIntegrationResponse = "DeleteIntegrationResponse" // DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2395,7 +2395,7 @@ const opDeleteMethod = "DeleteMethod" // DeleteMethodRequest generates a "aws/request.Request" representing the // client's request for the DeleteMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2484,7 +2484,7 @@ const opDeleteMethodResponse = "DeleteMethodResponse" // DeleteMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2577,7 +2577,7 @@ const opDeleteModel = "DeleteModel" // DeleteModelRequest generates a "aws/request.Request" representing the // client's request for the DeleteModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2670,7 +2670,7 @@ const opDeleteRequestValidator = "DeleteRequestValidator" // DeleteRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the DeleteRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2763,7 +2763,7 @@ const opDeleteResource = "DeleteResource" // DeleteResourceRequest generates a "aws/request.Request" representing the // client's request for the DeleteResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2856,7 +2856,7 @@ const opDeleteRestApi = "DeleteRestApi" // DeleteRestApiRequest generates a "aws/request.Request" representing the // client's request for the DeleteRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2945,7 +2945,7 @@ const opDeleteStage = "DeleteStage" // DeleteStageRequest generates a "aws/request.Request" representing the // client's request for the DeleteStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3034,7 +3034,7 @@ const opDeleteUsagePlan = "DeleteUsagePlan" // DeleteUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the DeleteUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3123,7 +3123,7 @@ const opDeleteUsagePlanKey = "DeleteUsagePlanKey" // DeleteUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteUsagePlanKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3217,7 +3217,7 @@ const opDeleteVpcLink = "DeleteVpcLink" // DeleteVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3306,7 +3306,7 @@ const opFlushStageAuthorizersCache = "FlushStageAuthorizersCache" // FlushStageAuthorizersCacheRequest generates a "aws/request.Request" representing the // client's request for the FlushStageAuthorizersCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3395,7 +3395,7 @@ const opFlushStageCache = "FlushStageCache" // FlushStageCacheRequest generates a "aws/request.Request" representing the // client's request for the FlushStageCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3484,7 +3484,7 @@ const opGenerateClientCertificate = "GenerateClientCertificate" // GenerateClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the GenerateClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3567,7 +3567,7 @@ const opGetAccount = "GetAccount" // GetAccountRequest generates a "aws/request.Request" representing the // client's request for the GetAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3650,7 +3650,7 @@ const opGetApiKey = "GetApiKey" // GetApiKeyRequest generates a "aws/request.Request" representing the // client's request for the GetApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3733,7 +3733,7 @@ const opGetApiKeys = "GetApiKeys" // GetApiKeysRequest generates a "aws/request.Request" representing the // client's request for the GetApiKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3873,7 +3873,7 @@ const opGetAuthorizer = "GetAuthorizer" // GetAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3958,7 +3958,7 @@ const opGetAuthorizers = "GetAuthorizers" // GetAuthorizersRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4047,7 +4047,7 @@ const opGetBasePathMapping = "GetBasePathMapping" // GetBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the GetBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4130,7 +4130,7 @@ const opGetBasePathMappings = "GetBasePathMappings" // GetBasePathMappingsRequest generates a "aws/request.Request" representing the // client's request for the GetBasePathMappings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4269,7 +4269,7 @@ const opGetClientCertificate = "GetClientCertificate" // GetClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4352,7 +4352,7 @@ const opGetClientCertificates = "GetClientCertificates" // GetClientCertificatesRequest generates a "aws/request.Request" representing the // client's request for the GetClientCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4492,7 +4492,7 @@ const opGetDeployment = "GetDeployment" // GetDeploymentRequest generates a "aws/request.Request" representing the // client's request for the GetDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4579,7 +4579,7 @@ const opGetDeployments = "GetDeployments" // GetDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the GetDeployments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4723,7 +4723,7 @@ const opGetDocumentationPart = "GetDocumentationPart" // GetDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4804,7 +4804,7 @@ const opGetDocumentationParts = "GetDocumentationParts" // GetDocumentationPartsRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4889,7 +4889,7 @@ const opGetDocumentationVersion = "GetDocumentationVersion" // GetDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4970,7 +4970,7 @@ const opGetDocumentationVersions = "GetDocumentationVersions" // GetDocumentationVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5055,7 +5055,7 @@ const opGetDomainName = "GetDomainName" // GetDomainNameRequest generates a "aws/request.Request" representing the // client's request for the GetDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5143,7 +5143,7 @@ const opGetDomainNames = "GetDomainNames" // GetDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the GetDomainNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5283,7 +5283,7 @@ const opGetExport = "GetExport" // GetExportRequest generates a "aws/request.Request" representing the // client's request for the GetExport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5374,7 +5374,7 @@ const opGetGatewayResponse = "GetGatewayResponse" // GetGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the GetGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5457,7 +5457,7 @@ const opGetGatewayResponses = "GetGatewayResponses" // GetGatewayResponsesRequest generates a "aws/request.Request" representing the // client's request for the GetGatewayResponses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5547,7 +5547,7 @@ const opGetIntegration = "GetIntegration" // GetIntegrationRequest generates a "aws/request.Request" representing the // client's request for the GetIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5630,7 +5630,7 @@ const opGetIntegrationResponse = "GetIntegrationResponse" // GetIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the GetIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5713,7 +5713,7 @@ const opGetMethod = "GetMethod" // GetMethodRequest generates a "aws/request.Request" representing the // client's request for the GetMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5796,7 +5796,7 @@ const opGetMethodResponse = "GetMethodResponse" // GetMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the GetMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5879,7 +5879,7 @@ const opGetModel = "GetModel" // GetModelRequest generates a "aws/request.Request" representing the // client's request for the GetModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5962,7 +5962,7 @@ const opGetModelTemplate = "GetModelTemplate" // GetModelTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetModelTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6050,7 +6050,7 @@ const opGetModels = "GetModels" // GetModelsRequest generates a "aws/request.Request" representing the // client's request for the GetModels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6193,7 +6193,7 @@ const opGetRequestValidator = "GetRequestValidator" // GetRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the GetRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6276,7 +6276,7 @@ const opGetRequestValidators = "GetRequestValidators" // GetRequestValidatorsRequest generates a "aws/request.Request" representing the // client's request for the GetRequestValidators operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6363,7 +6363,7 @@ const opGetResource = "GetResource" // GetResourceRequest generates a "aws/request.Request" representing the // client's request for the GetResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6446,7 +6446,7 @@ const opGetResources = "GetResources" // GetResourcesRequest generates a "aws/request.Request" representing the // client's request for the GetResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6589,7 +6589,7 @@ const opGetRestApi = "GetRestApi" // GetRestApiRequest generates a "aws/request.Request" representing the // client's request for the GetRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6672,7 +6672,7 @@ const opGetRestApis = "GetRestApis" // GetRestApisRequest generates a "aws/request.Request" representing the // client's request for the GetRestApis operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6812,7 +6812,7 @@ const opGetSdk = "GetSdk" // GetSdkRequest generates a "aws/request.Request" representing the // client's request for the GetSdk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6903,7 +6903,7 @@ const opGetSdkType = "GetSdkType" // GetSdkTypeRequest generates a "aws/request.Request" representing the // client's request for the GetSdkType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6984,7 +6984,7 @@ const opGetSdkTypes = "GetSdkTypes" // GetSdkTypesRequest generates a "aws/request.Request" representing the // client's request for the GetSdkTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7062,7 +7062,7 @@ const opGetStage = "GetStage" // GetStageRequest generates a "aws/request.Request" representing the // client's request for the GetStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7145,7 +7145,7 @@ const opGetStages = "GetStages" // GetStagesRequest generates a "aws/request.Request" representing the // client's request for the GetStages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7228,7 +7228,7 @@ const opGetTags = "GetTags" // GetTagsRequest generates a "aws/request.Request" representing the // client's request for the GetTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7318,7 +7318,7 @@ const opGetUsage = "GetUsage" // GetUsageRequest generates a "aws/request.Request" representing the // client's request for the GetUsage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7461,7 +7461,7 @@ const opGetUsagePlan = "GetUsagePlan" // GetUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7548,7 +7548,7 @@ const opGetUsagePlanKey = "GetUsagePlanKey" // GetUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlanKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7635,7 +7635,7 @@ const opGetUsagePlanKeys = "GetUsagePlanKeys" // GetUsagePlanKeysRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlanKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7779,7 +7779,7 @@ const opGetUsagePlans = "GetUsagePlans" // GetUsagePlansRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlans operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7926,7 +7926,7 @@ const opGetVpcLink = "GetVpcLink" // GetVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the GetVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8009,7 +8009,7 @@ const opGetVpcLinks = "GetVpcLinks" // GetVpcLinksRequest generates a "aws/request.Request" representing the // client's request for the GetVpcLinks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8149,7 +8149,7 @@ const opImportApiKeys = "ImportApiKeys" // ImportApiKeysRequest generates a "aws/request.Request" representing the // client's request for the ImportApiKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8243,7 +8243,7 @@ const opImportDocumentationParts = "ImportDocumentationParts" // ImportDocumentationPartsRequest generates a "aws/request.Request" representing the // client's request for the ImportDocumentationParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8331,7 +8331,7 @@ const opImportRestApi = "ImportRestApi" // ImportRestApiRequest generates a "aws/request.Request" representing the // client's request for the ImportRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8423,7 +8423,7 @@ const opPutGatewayResponse = "PutGatewayResponse" // PutGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the PutGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8514,7 +8514,7 @@ const opPutIntegration = "PutIntegration" // PutIntegrationRequest generates a "aws/request.Request" representing the // client's request for the PutIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8605,7 +8605,7 @@ const opPutIntegrationResponse = "PutIntegrationResponse" // PutIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the PutIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8699,7 +8699,7 @@ const opPutMethod = "PutMethod" // PutMethodRequest generates a "aws/request.Request" representing the // client's request for the PutMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8793,7 +8793,7 @@ const opPutMethodResponse = "PutMethodResponse" // PutMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the PutMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8887,7 +8887,7 @@ const opPutRestApi = "PutRestApi" // PutRestApiRequest generates a "aws/request.Request" representing the // client's request for the PutRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8984,7 +8984,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9080,7 +9080,7 @@ const opTestInvokeAuthorizer = "TestInvokeAuthorizer" // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9170,7 +9170,7 @@ const opTestInvokeMethod = "TestInvokeMethod" // TestInvokeMethodRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9258,7 +9258,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9351,7 +9351,7 @@ const opUpdateAccount = "UpdateAccount" // UpdateAccountRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9438,7 +9438,7 @@ const opUpdateApiKey = "UpdateApiKey" // UpdateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9529,7 +9529,7 @@ const opUpdateAuthorizer = "UpdateAuthorizer" // UpdateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9618,7 +9618,7 @@ const opUpdateBasePathMapping = "UpdateBasePathMapping" // UpdateBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the UpdateBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9709,7 +9709,7 @@ const opUpdateClientCertificate = "UpdateClientCertificate" // UpdateClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9796,7 +9796,7 @@ const opUpdateDeployment = "UpdateDeployment" // UpdateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9887,7 +9887,7 @@ const opUpdateDocumentationPart = "UpdateDocumentationPart" // UpdateDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9979,7 +9979,7 @@ const opUpdateDocumentationVersion = "UpdateDocumentationVersion" // UpdateDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10068,7 +10068,7 @@ const opUpdateDomainName = "UpdateDomainName" // UpdateDomainNameRequest generates a "aws/request.Request" representing the // client's request for the UpdateDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10159,7 +10159,7 @@ const opUpdateGatewayResponse = "UpdateGatewayResponse" // UpdateGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10246,7 +10246,7 @@ const opUpdateIntegration = "UpdateIntegration" // UpdateIntegrationRequest generates a "aws/request.Request" representing the // client's request for the UpdateIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10337,7 +10337,7 @@ const opUpdateIntegrationResponse = "UpdateIntegrationResponse" // UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10428,7 +10428,7 @@ const opUpdateMethod = "UpdateMethod" // UpdateMethodRequest generates a "aws/request.Request" representing the // client's request for the UpdateMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10519,7 +10519,7 @@ const opUpdateMethodResponse = "UpdateMethodResponse" // UpdateMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10613,7 +10613,7 @@ const opUpdateModel = "UpdateModel" // UpdateModelRequest generates a "aws/request.Request" representing the // client's request for the UpdateModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10704,7 +10704,7 @@ const opUpdateRequestValidator = "UpdateRequestValidator" // UpdateRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the UpdateRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10791,7 +10791,7 @@ const opUpdateResource = "UpdateResource" // UpdateResourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10882,7 +10882,7 @@ const opUpdateRestApi = "UpdateRestApi" // UpdateRestApiRequest generates a "aws/request.Request" representing the // client's request for the UpdateRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10973,7 +10973,7 @@ const opUpdateStage = "UpdateStage" // UpdateStageRequest generates a "aws/request.Request" representing the // client's request for the UpdateStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11064,7 +11064,7 @@ const opUpdateUsage = "UpdateUsage" // UpdateUsageRequest generates a "aws/request.Request" representing the // client's request for the UpdateUsage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11152,7 +11152,7 @@ const opUpdateUsagePlan = "UpdateUsagePlan" // UpdateUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the UpdateUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11243,7 +11243,7 @@ const opUpdateVpcLink = "UpdateVpcLink" // UpdateVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the UpdateVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go index e2cbccd4b8a..5df0ddb5831 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go @@ -16,7 +16,7 @@ const opDeleteScalingPolicy = "DeleteScalingPolicy" // DeleteScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -116,7 +116,7 @@ const opDeleteScheduledAction = "DeleteScheduledAction" // DeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -210,7 +210,7 @@ const opDeregisterScalableTarget = "DeregisterScalableTarget" // DeregisterScalableTargetRequest generates a "aws/request.Request" representing the // client's request for the DeregisterScalableTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -309,7 +309,7 @@ const opDescribeScalableTargets = "DescribeScalableTargets" // DescribeScalableTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalableTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -461,7 +461,7 @@ const opDescribeScalingActivities = "DescribeScalingActivities" // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingActivities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -615,7 +615,7 @@ const opDescribeScalingPolicies = "DescribeScalingPolicies" // DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -775,7 +775,7 @@ const opDescribeScheduledActions = "DescribeScheduledActions" // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -871,7 +871,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -989,7 +989,7 @@ const opPutScheduledAction = "PutScheduledAction" // PutScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the PutScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1101,7 +1101,7 @@ const opRegisterScalableTarget = "RegisterScalableTarget" // RegisterScalableTargetRequest generates a "aws/request.Request" representing the // client's request for the RegisterScalableTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go index bd42011dd4c..371d471eba9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go @@ -13,7 +13,7 @@ const opCreateApiKey = "CreateApiKey" // CreateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -117,7 +117,7 @@ const opCreateDataSource = "CreateDataSource" // CreateDataSourceRequest generates a "aws/request.Request" representing the // client's request for the CreateDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -211,7 +211,7 @@ const opCreateGraphqlApi = "CreateGraphqlApi" // CreateGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the CreateGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -307,7 +307,7 @@ const opCreateResolver = "CreateResolver" // CreateResolverRequest generates a "aws/request.Request" representing the // client's request for the CreateResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -400,7 +400,7 @@ const opCreateType = "CreateType" // CreateTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -494,7 +494,7 @@ const opDeleteApiKey = "DeleteApiKey" // DeleteApiKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -584,7 +584,7 @@ const opDeleteDataSource = "DeleteDataSource" // DeleteDataSourceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -678,7 +678,7 @@ const opDeleteGraphqlApi = "DeleteGraphqlApi" // DeleteGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the DeleteGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -772,7 +772,7 @@ const opDeleteResolver = "DeleteResolver" // DeleteResolverRequest generates a "aws/request.Request" representing the // client's request for the DeleteResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -862,7 +862,7 @@ const opDeleteType = "DeleteType" // DeleteTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -956,7 +956,7 @@ const opGetDataSource = "GetDataSource" // GetDataSourceRequest generates a "aws/request.Request" representing the // client's request for the GetDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1050,7 +1050,7 @@ const opGetGraphqlApi = "GetGraphqlApi" // GetGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the GetGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1140,7 +1140,7 @@ const opGetIntrospectionSchema = "GetIntrospectionSchema" // GetIntrospectionSchemaRequest generates a "aws/request.Request" representing the // client's request for the GetIntrospectionSchema operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1229,7 +1229,7 @@ const opGetResolver = "GetResolver" // GetResolverRequest generates a "aws/request.Request" representing the // client's request for the GetResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1316,7 +1316,7 @@ const opGetSchemaCreationStatus = "GetSchemaCreationStatus" // GetSchemaCreationStatusRequest generates a "aws/request.Request" representing the // client's request for the GetSchemaCreationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1406,7 +1406,7 @@ const opGetType = "GetType" // GetTypeRequest generates a "aws/request.Request" representing the // client's request for the GetType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1500,7 +1500,7 @@ const opListApiKeys = "ListApiKeys" // ListApiKeysRequest generates a "aws/request.Request" representing the // client's request for the ListApiKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1595,7 +1595,7 @@ const opListDataSources = "ListDataSources" // ListDataSourcesRequest generates a "aws/request.Request" representing the // client's request for the ListDataSources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1685,7 +1685,7 @@ const opListGraphqlApis = "ListGraphqlApis" // ListGraphqlApisRequest generates a "aws/request.Request" representing the // client's request for the ListGraphqlApis operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1771,7 +1771,7 @@ const opListResolvers = "ListResolvers" // ListResolversRequest generates a "aws/request.Request" representing the // client's request for the ListResolvers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1861,7 +1861,7 @@ const opListTypes = "ListTypes" // ListTypesRequest generates a "aws/request.Request" representing the // client's request for the ListTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1955,7 +1955,7 @@ const opStartSchemaCreation = "StartSchemaCreation" // StartSchemaCreationRequest generates a "aws/request.Request" representing the // client's request for the StartSchemaCreation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2051,7 +2051,7 @@ const opUpdateApiKey = "UpdateApiKey" // UpdateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2148,7 +2148,7 @@ const opUpdateDataSource = "UpdateDataSource" // UpdateDataSourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2242,7 +2242,7 @@ const opUpdateGraphqlApi = "UpdateGraphqlApi" // UpdateGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the UpdateGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2336,7 +2336,7 @@ const opUpdateResolver = "UpdateResolver" // UpdateResolverRequest generates a "aws/request.Request" representing the // client's request for the UpdateResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2426,7 +2426,7 @@ const opUpdateType = "UpdateType" // UpdateTypeRequest generates a "aws/request.Request" representing the // client's request for the UpdateType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go index d79704d293a..bbf510b9476 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go @@ -15,7 +15,7 @@ const opBatchGetNamedQuery = "BatchGetNamedQuery" // BatchGetNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the BatchGetNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -105,7 +105,7 @@ const opBatchGetQueryExecution = "BatchGetQueryExecution" // BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the BatchGetQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -193,7 +193,7 @@ const opCreateNamedQuery = "CreateNamedQuery" // CreateNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the CreateNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -281,7 +281,7 @@ const opDeleteNamedQuery = "DeleteNamedQuery" // DeleteNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the DeleteNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -369,7 +369,7 @@ const opGetNamedQuery = "GetNamedQuery" // GetNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the GetNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -453,7 +453,7 @@ const opGetQueryExecution = "GetQueryExecution" // GetQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -538,7 +538,7 @@ const opGetQueryResults = "GetQueryResults" // GetQueryResultsRequest generates a "aws/request.Request" representing the // client's request for the GetQueryResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -680,7 +680,7 @@ const opListNamedQueries = "ListNamedQueries" // ListNamedQueriesRequest generates a "aws/request.Request" representing the // client's request for the ListNamedQueries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -824,7 +824,7 @@ const opListQueryExecutions = "ListQueryExecutions" // ListQueryExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListQueryExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -968,7 +968,7 @@ const opStartQueryExecution = "StartQueryExecution" // StartQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1030,7 +1030,8 @@ func (c *Athena) StartQueryExecutionRequest(input *StartQueryExecutionInput) (re // a required parameter may be missing or out of range. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Indicates that the request was throttled. +// Indicates that the request was throttled and includes the reason for throttling, +// for example, the limit of concurrent queries has been exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution func (c *Athena) StartQueryExecution(input *StartQueryExecutionInput) (*StartQueryExecutionOutput, error) { @@ -1059,7 +1060,7 @@ const opStopQueryExecution = "StopQueryExecution" // StopQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1604,8 +1605,8 @@ func (s DeleteNamedQueryOutput) GoString() string { return s.String() } -// If query results are encrypted in Amazon S3, indicates the Amazon S3 encryption -// option used. +// If query results are encrypted in Amazon S3, indicates the encryption option +// used (for example, SSE-KMS or CSE-KMS) and key information. type EncryptionConfiguration struct { _ struct{} `type:"structure"` @@ -1842,6 +1843,9 @@ type GetQueryResultsOutput struct { // The results of the query execution. ResultSet *ResultSet `type:"structure"` + + // The number of rows inserted with a CREATE TABLE AS SELECT statement. + UpdateCount *int64 `type:"long"` } // String returns the string representation @@ -1866,6 +1870,12 @@ func (s *GetQueryResultsOutput) SetResultSet(v *ResultSet) *GetQueryResultsOutpu return s } +// SetUpdateCount sets the UpdateCount field's value. +func (s *GetQueryResultsOutput) SetUpdateCount(v int64) *GetQueryResultsOutput { + s.UpdateCount = &v + return s +} + type ListNamedQueriesInput struct { _ struct{} `type:"structure"` @@ -2080,8 +2090,14 @@ type QueryExecution struct { // option, if any, used for query results. ResultConfiguration *ResultConfiguration `type:"structure"` + // The type of query statement that was run. DDL indicates DDL query statements. + // DML indicates DML (Data Manipulation Language) query statements, such as + // CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL + // and DML, such as SHOW CREATE TABLE, or DESCRIBE . + StatementType *string `type:"string" enum:"StatementType"` + // The amount of data scanned during the query execution and the amount of time - // that it took to execute. + // that it took to execute, and the type of statement that was run. Statistics *QueryExecutionStatistics `type:"structure"` // The completion date, current state, submission time, and state change reason @@ -2123,6 +2139,12 @@ func (s *QueryExecution) SetResultConfiguration(v *ResultConfiguration) *QueryEx return s } +// SetStatementType sets the StatementType field's value. +func (s *QueryExecution) SetStatementType(v string) *QueryExecution { + s.StatementType = &v + return s +} + // SetStatistics sets the Statistics field's value. func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution { s.Statistics = v @@ -2173,7 +2195,7 @@ func (s *QueryExecutionContext) SetDatabase(v string) *QueryExecutionContext { } // The amount of data scanned during the query execution and the amount of time -// that it took to execute. +// that it took to execute, and the type of statement that was run. type QueryExecutionStatistics struct { _ struct{} `type:"structure"` @@ -2214,11 +2236,12 @@ type QueryExecutionStatus struct { // The date and time that the query completed. CompletionDateTime *time.Time `type:"timestamp"` - // The state of query execution. SUBMITTED indicates that the query is queued - // for execution. RUNNING indicates that the query is scanning data and returning - // results. SUCCEEDED indicates that the query completed without error. FAILED - // indicates that the query experienced an error and did not complete processing. - // CANCELLED indicates that user input interrupted query execution. + // The state of query execution. QUEUED state is listed but is not used by Athena + // and is reserved for future use. RUNNING indicates that the query has been + // submitted to the service, and Athena will execute the query as soon as resources + // are available. SUCCEEDED indicates that the query completed without error. + // FAILED indicates that the query experienced an error and did not complete + // processing.CANCELLED indicates that user input interrupted query execution. State *string `type:"string" enum:"QueryExecutionState"` // Further detail about the status of the query. @@ -2267,11 +2290,12 @@ func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutio type ResultConfiguration struct { _ struct{} `type:"structure"` - // If query results are encrypted in S3, indicates the S3 encryption option - // used (for example, SSE-KMS or CSE-KMS and key information. + // If query results are encrypted in Amazon S3, indicates the encryption option + // used (for example, SSE-KMS or CSE-KMS) and key information. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - // The location in S3 where query results are stored. + // The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. + // For more information, see Queries and Query Result Files. (http://docs.aws.amazon.com/athena/latest/ug/querying.html) // // OutputLocation is a required field OutputLocation *string `type:"string" required:"true"` @@ -2357,7 +2381,7 @@ func (s *ResultSet) SetRows(v []*Row) *ResultSet { type ResultSetMetadata struct { _ struct{} `type:"structure"` - // Information about the columns in a query execution result. + // Information about the columns returned in a query result metadata. ColumnInfo []*ColumnInfo `type:"list"` } @@ -2696,6 +2720,19 @@ const ( QueryExecutionStateCancelled = "CANCELLED" ) +const ( + // StatementTypeDdl is a StatementType enum value + StatementTypeDdl = "DDL" + + // StatementTypeDml is a StatementType enum value + StatementTypeDml = "DML" + + // StatementTypeUtility is a StatementType enum value + StatementTypeUtility = "UTILITY" +) + +// The reason for the query throttling, for example, when it exceeds the concurrent +// query limit. const ( // ThrottleReasonConcurrentQueryLimitExceeded is a ThrottleReason enum value ThrottleReasonConcurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go b/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go index 920fafc0c73..76b6b8989bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go @@ -12,8 +12,13 @@ // For more information, see What is Amazon Athena (http://docs.aws.amazon.com/athena/latest/ug/what-is.html) // in the Amazon Athena User Guide. // +// If you connect to Athena using the JDBC driver, use version 1.1.0 of the +// driver or later with the Amazon Athena API. Earlier version drivers do not +// support the API. For more information and to download the driver, see Accessing +// Amazon Athena with JDBC (https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html). +// // For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// (https://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon // Athena User Guide. // // See https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18 for more information on this service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go b/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go index 4060e744e36..abfa4fac398 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go @@ -21,6 +21,7 @@ const ( // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". // - // Indicates that the request was throttled. + // Indicates that the request was throttled and includes the reason for throttling, + // for example, the limit of concurrent queries has been exceeded. ErrCodeTooManyRequestsException = "TooManyRequestsException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index b883a33189a..072ef51b359 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -18,7 +18,7 @@ const opAttachInstances = "AttachInstances" // AttachInstancesRequest generates a "aws/request.Request" representing the // client's request for the AttachInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -117,7 +117,7 @@ const opAttachLoadBalancerTargetGroups = "AttachLoadBalancerTargetGroups" // AttachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -207,7 +207,7 @@ const opAttachLoadBalancers = "AttachLoadBalancers" // AttachLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -300,7 +300,7 @@ const opBatchDeleteScheduledAction = "BatchDeleteScheduledAction" // BatchDeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -380,7 +380,7 @@ const opBatchPutScheduledUpdateGroupAction = "BatchPutScheduledUpdateGroupAction // BatchPutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the // client's request for the BatchPutScheduledUpdateGroupAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -471,7 +471,7 @@ const opCompleteLifecycleAction = "CompleteLifecycleAction" // CompleteLifecycleActionRequest generates a "aws/request.Request" representing the // client's request for the CompleteLifecycleAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -574,7 +574,7 @@ const opCreateAutoScalingGroup = "CreateAutoScalingGroup" // CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -676,7 +676,7 @@ const opCreateLaunchConfiguration = "CreateLaunchConfiguration" // CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -775,7 +775,7 @@ const opCreateOrUpdateTags = "CreateOrUpdateTags" // CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateOrUpdateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -875,7 +875,7 @@ const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup" // DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -979,7 +979,7 @@ const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration" // DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1068,7 +1068,7 @@ const opDeleteLifecycleHook = "DeleteLifecycleHook" // DeleteLifecycleHookRequest generates a "aws/request.Request" representing the // client's request for the DeleteLifecycleHook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1151,7 +1151,7 @@ const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration" // DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1233,7 +1233,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1321,7 +1321,7 @@ const opDeleteScheduledAction = "DeleteScheduledAction" // DeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1403,7 +1403,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1488,7 +1488,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1572,7 +1572,7 @@ const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes" // DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAdjustmentTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1652,7 +1652,7 @@ const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups" // DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1791,7 +1791,7 @@ const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances" // DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1930,7 +1930,7 @@ const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationT // DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2010,7 +2010,7 @@ const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations" // DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2149,7 +2149,7 @@ const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes" // DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLifecycleHookTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2235,7 +2235,7 @@ const opDescribeLifecycleHooks = "DescribeLifecycleHooks" // DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the // client's request for the DescribeLifecycleHooks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2315,7 +2315,7 @@ const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups" // DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2395,7 +2395,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2478,7 +2478,7 @@ const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes" // DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeMetricCollectionTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2561,7 +2561,7 @@ const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations // DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotificationConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2701,7 +2701,7 @@ const opDescribePolicies = "DescribePolicies" // DescribePoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2843,7 +2843,7 @@ const opDescribeScalingActivities = "DescribeScalingActivities" // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingActivities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2982,7 +2982,7 @@ const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes" // DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingProcessTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3062,7 +3062,7 @@ const opDescribeScheduledActions = "DescribeScheduledActions" // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3202,7 +3202,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3350,7 +3350,7 @@ const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes" // DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTerminationPolicyTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3430,7 +3430,7 @@ const opDetachInstances = "DetachInstances" // DetachInstancesRequest generates a "aws/request.Request" representing the // client's request for the DetachInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3525,7 +3525,7 @@ const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups" // DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancerTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3605,7 +3605,7 @@ const opDetachLoadBalancers = "DetachLoadBalancers" // DetachLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3694,7 +3694,7 @@ const opDisableMetricsCollection = "DisableMetricsCollection" // DisableMetricsCollectionRequest generates a "aws/request.Request" representing the // client's request for the DisableMetricsCollection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3776,7 +3776,7 @@ const opEnableMetricsCollection = "EnableMetricsCollection" // EnableMetricsCollectionRequest generates a "aws/request.Request" representing the // client's request for the EnableMetricsCollection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3860,7 +3860,7 @@ const opEnterStandby = "EnterStandby" // EnterStandbyRequest generates a "aws/request.Request" representing the // client's request for the EnterStandby operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3944,7 +3944,7 @@ const opExecutePolicy = "ExecutePolicy" // ExecutePolicyRequest generates a "aws/request.Request" representing the // client's request for the ExecutePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4030,7 +4030,7 @@ const opExitStandby = "ExitStandby" // ExitStandbyRequest generates a "aws/request.Request" representing the // client's request for the ExitStandby operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4114,7 +4114,7 @@ const opPutLifecycleHook = "PutLifecycleHook" // PutLifecycleHookRequest generates a "aws/request.Request" representing the // client's request for the PutLifecycleHook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4230,7 +4230,7 @@ const opPutNotificationConfiguration = "PutNotificationConfiguration" // PutNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4328,7 +4328,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4424,7 +4424,7 @@ const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction" // PutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the // client's request for the PutScheduledUpdateGroupAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4520,7 +4520,7 @@ const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat" // RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the RecordLifecycleActionHeartbeat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4624,7 +4624,7 @@ const opResumeProcesses = "ResumeProcesses" // ResumeProcessesRequest generates a "aws/request.Request" representing the // client's request for the ResumeProcesses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4713,7 +4713,7 @@ const opSetDesiredCapacity = "SetDesiredCapacity" // SetDesiredCapacityRequest generates a "aws/request.Request" representing the // client's request for the SetDesiredCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4803,7 +4803,7 @@ const opSetInstanceHealth = "SetInstanceHealth" // SetInstanceHealthRequest generates a "aws/request.Request" representing the // client's request for the SetInstanceHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4888,7 +4888,7 @@ const opSetInstanceProtection = "SetInstanceProtection" // SetInstanceProtectionRequest generates a "aws/request.Request" representing the // client's request for the SetInstanceProtection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4976,7 +4976,7 @@ const opSuspendProcesses = "SuspendProcesses" // SuspendProcessesRequest generates a "aws/request.Request" representing the // client's request for the SuspendProcesses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5070,7 +5070,7 @@ const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGro // TerminateInstanceInAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the TerminateInstanceInAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5158,7 +5158,7 @@ const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup" // UpdateAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go index 194cbe82e51..62dfc841fd8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go @@ -15,7 +15,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -103,7 +103,7 @@ const opCreateComputeEnvironment = "CreateComputeEnvironment" // CreateComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the CreateComputeEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -208,7 +208,7 @@ const opCreateJobQueue = "CreateJobQueue" // CreateJobQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateJobQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -300,7 +300,7 @@ const opDeleteComputeEnvironment = "DeleteComputeEnvironment" // DeleteComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the DeleteComputeEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -388,7 +388,7 @@ const opDeleteJobQueue = "DeleteJobQueue" // DeleteJobQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteJobQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -477,7 +477,7 @@ const opDeregisterJobDefinition = "DeregisterJobDefinition" // DeregisterJobDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DeregisterJobDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -561,7 +561,7 @@ const opDescribeComputeEnvironments = "DescribeComputeEnvironments" // DescribeComputeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeComputeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -649,7 +649,7 @@ const opDescribeJobDefinitions = "DescribeJobDefinitions" // DescribeJobDefinitionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobDefinitions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -734,7 +734,7 @@ const opDescribeJobQueues = "DescribeJobQueues" // DescribeJobQueuesRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -818,7 +818,7 @@ const opDescribeJobs = "DescribeJobs" // DescribeJobsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -902,7 +902,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -988,7 +988,7 @@ const opRegisterJobDefinition = "RegisterJobDefinition" // RegisterJobDefinitionRequest generates a "aws/request.Request" representing the // client's request for the RegisterJobDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1072,7 +1072,7 @@ const opSubmitJob = "SubmitJob" // SubmitJobRequest generates a "aws/request.Request" representing the // client's request for the SubmitJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1157,7 +1157,7 @@ const opTerminateJob = "TerminateJob" // TerminateJobRequest generates a "aws/request.Request" representing the // client's request for the TerminateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1243,7 +1243,7 @@ const opUpdateComputeEnvironment = "UpdateComputeEnvironment" // UpdateComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateComputeEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1327,7 +1327,7 @@ const opUpdateJobQueue = "UpdateJobQueue" // UpdateJobQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateJobQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go index cfa8f0a62cc..9ca26f8aa13 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go @@ -16,7 +16,7 @@ const opCreateBudget = "CreateBudget" // CreateBudgetRequest generates a "aws/request.Request" representing the // client's request for the CreateBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -103,7 +103,7 @@ const opCreateNotification = "CreateNotification" // CreateNotificationRequest generates a "aws/request.Request" representing the // client's request for the CreateNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -194,7 +194,7 @@ const opCreateSubscriber = "CreateSubscriber" // CreateSubscriberRequest generates a "aws/request.Request" representing the // client's request for the CreateSubscriber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -285,7 +285,7 @@ const opDeleteBudget = "DeleteBudget" // DeleteBudgetRequest generates a "aws/request.Request" representing the // client's request for the DeleteBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -372,7 +372,7 @@ const opDeleteNotification = "DeleteNotification" // DeleteNotificationRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -459,7 +459,7 @@ const opDeleteSubscriber = "DeleteSubscriber" // DeleteSubscriberRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubscriber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -545,7 +545,7 @@ const opDescribeBudget = "DescribeBudget" // DescribeBudgetRequest generates a "aws/request.Request" representing the // client's request for the DescribeBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -629,7 +629,7 @@ const opDescribeBudgets = "DescribeBudgets" // DescribeBudgetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeBudgets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -719,7 +719,7 @@ const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget" // DescribeNotificationsForBudgetRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotificationsForBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -809,7 +809,7 @@ const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification // DescribeSubscribersForNotificationRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubscribersForNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -899,7 +899,7 @@ const opUpdateBudget = "UpdateBudget" // UpdateBudgetRequest generates a "aws/request.Request" representing the // client's request for the UpdateBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -985,7 +985,7 @@ const opUpdateNotification = "UpdateNotification" // UpdateNotificationRequest generates a "aws/request.Request" representing the // client's request for the UpdateNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1072,7 +1072,7 @@ const opUpdateSubscriber = "UpdateSubscriber" // UpdateSubscriberRequest generates a "aws/request.Request" representing the // client's request for the UpdateSubscriber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go index 581b2f0b971..1d00e9a7109 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go @@ -15,7 +15,7 @@ const opCreateEnvironmentEC2 = "CreateEnvironmentEC2" // CreateEnvironmentEC2Request generates a "aws/request.Request" representing the // client's request for the CreateEnvironmentEC2 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -114,7 +114,7 @@ const opCreateEnvironmentMembership = "CreateEnvironmentMembership" // CreateEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the CreateEnvironmentMembership operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -211,7 +211,7 @@ const opDeleteEnvironment = "DeleteEnvironment" // DeleteEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -309,7 +309,7 @@ const opDeleteEnvironmentMembership = "DeleteEnvironmentMembership" // DeleteEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironmentMembership operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -406,7 +406,7 @@ const opDescribeEnvironmentMemberships = "DescribeEnvironmentMemberships" // DescribeEnvironmentMembershipsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentMemberships operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -560,7 +560,7 @@ const opDescribeEnvironmentStatus = "DescribeEnvironmentStatus" // DescribeEnvironmentStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -657,7 +657,7 @@ const opDescribeEnvironments = "DescribeEnvironments" // DescribeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -754,7 +754,7 @@ const opListEnvironments = "ListEnvironments" // ListEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the ListEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -907,7 +907,7 @@ const opUpdateEnvironment = "UpdateEnvironment" // UpdateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1004,7 +1004,7 @@ const opUpdateEnvironmentMembership = "UpdateEnvironmentMembership" // UpdateEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironmentMembership operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 9d55afb7baa..3c0078f1f30 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -18,7 +18,7 @@ const opCancelUpdateStack = "CancelUpdateStack" // CancelUpdateStackRequest generates a "aws/request.Request" representing the // client's request for the CancelUpdateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -102,7 +102,7 @@ const opContinueUpdateRollback = "ContinueUpdateRollback" // ContinueUpdateRollbackRequest generates a "aws/request.Request" representing the // client's request for the ContinueUpdateRollback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -193,7 +193,7 @@ const opCreateChangeSet = "CreateChangeSet" // CreateChangeSetRequest generates a "aws/request.Request" representing the // client's request for the CreateChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -301,7 +301,7 @@ const opCreateStack = "CreateStack" // CreateStackRequest generates a "aws/request.Request" representing the // client's request for the CreateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -394,7 +394,7 @@ const opCreateStackInstances = "CreateStackInstances" // CreateStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the CreateStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -495,7 +495,7 @@ const opCreateStackSet = "CreateStackSet" // CreateStackSetRequest generates a "aws/request.Request" representing the // client's request for the CreateStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -582,7 +582,7 @@ const opDeleteChangeSet = "DeleteChangeSet" // DeleteChangeSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -667,7 +667,7 @@ const opDeleteStack = "DeleteStack" // DeleteStackRequest generates a "aws/request.Request" representing the // client's request for the DeleteStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -750,7 +750,7 @@ const opDeleteStackInstances = "DeleteStackInstances" // DeleteStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the DeleteStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -843,7 +843,7 @@ const opDeleteStackSet = "DeleteStackSet" // DeleteStackSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -930,7 +930,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1005,7 +1005,7 @@ const opDescribeChangeSet = "DescribeChangeSet" // DescribeChangeSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1088,7 +1088,7 @@ const opDescribeStackEvents = "DescribeStackEvents" // DescribeStackEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1223,7 +1223,7 @@ const opDescribeStackInstance = "DescribeStackInstance" // DescribeStackInstanceRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1309,7 +1309,7 @@ const opDescribeStackResource = "DescribeStackResource" // DescribeStackResourceRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1386,7 +1386,7 @@ const opDescribeStackResources = "DescribeStackResources" // DescribeStackResourcesRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1477,7 +1477,7 @@ const opDescribeStackSet = "DescribeStackSet" // DescribeStackSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1556,7 +1556,7 @@ const opDescribeStackSetOperation = "DescribeStackSetOperation" // DescribeStackSetOperationRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1638,7 +1638,7 @@ const opDescribeStacks = "DescribeStacks" // DescribeStacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1771,7 +1771,7 @@ const opEstimateTemplateCost = "EstimateTemplateCost" // EstimateTemplateCostRequest generates a "aws/request.Request" representing the // client's request for the EstimateTemplateCost operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1847,7 +1847,7 @@ const opExecuteChangeSet = "ExecuteChangeSet" // ExecuteChangeSetRequest generates a "aws/request.Request" representing the // client's request for the ExecuteChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1950,7 +1950,7 @@ const opGetStackPolicy = "GetStackPolicy" // GetStackPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetStackPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2025,7 +2025,7 @@ const opGetTemplate = "GetTemplate" // GetTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2111,7 +2111,7 @@ const opGetTemplateSummary = "GetTemplateSummary" // GetTemplateSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetTemplateSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2201,7 +2201,7 @@ const opListChangeSets = "ListChangeSets" // ListChangeSetsRequest generates a "aws/request.Request" representing the // client's request for the ListChangeSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2277,7 +2277,7 @@ const opListExports = "ListExports" // ListExportsRequest generates a "aws/request.Request" representing the // client's request for the ListExports operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2413,7 +2413,7 @@ const opListImports = "ListImports" // ListImportsRequest generates a "aws/request.Request" representing the // client's request for the ListImports operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2549,7 +2549,7 @@ const opListStackInstances = "ListStackInstances" // ListStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2630,7 +2630,7 @@ const opListStackResources = "ListStackResources" // ListStackResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListStackResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2763,7 +2763,7 @@ const opListStackSetOperationResults = "ListStackSetOperationResults" // ListStackSetOperationResultsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSetOperationResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2845,7 +2845,7 @@ const opListStackSetOperations = "ListStackSetOperations" // ListStackSetOperationsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSetOperations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2924,7 +2924,7 @@ const opListStackSets = "ListStackSets" // ListStackSetsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2999,7 +2999,7 @@ const opListStacks = "ListStacks" // ListStacksRequest generates a "aws/request.Request" representing the // client's request for the ListStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3133,7 +3133,7 @@ const opSetStackPolicy = "SetStackPolicy" // SetStackPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetStackPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3209,7 +3209,7 @@ const opSignalResource = "SignalResource" // SignalResourceRequest generates a "aws/request.Request" representing the // client's request for the SignalResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3290,7 +3290,7 @@ const opStopStackSetOperation = "StopStackSetOperation" // StopStackSetOperationRequest generates a "aws/request.Request" representing the // client's request for the StopStackSetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3375,7 +3375,7 @@ const opUpdateStack = "UpdateStack" // UpdateStackRequest generates a "aws/request.Request" representing the // client's request for the UpdateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3466,7 +3466,7 @@ const opUpdateStackInstances = "UpdateStackInstances" // UpdateStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the UpdateStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3579,7 +3579,7 @@ const opUpdateStackSet = "UpdateStackSet" // UpdateStackSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3681,7 +3681,7 @@ const opUpdateTerminationProtection = "UpdateTerminationProtection" // UpdateTerminationProtectionRequest generates a "aws/request.Request" representing the // client's request for the UpdateTerminationProtection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3763,7 +3763,7 @@ const opValidateTemplate = "ValidateTemplate" // ValidateTemplateRequest generates a "aws/request.Request" representing the // client's request for the ValidateTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index 1e4ce44ab3d..4445dd2ac5a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -18,7 +18,7 @@ const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIden // CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -119,7 +119,7 @@ const opCreateDistribution = "CreateDistribution2018_06_18" // CreateDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -338,7 +338,7 @@ const opCreateDistributionWithTags = "CreateDistributionWithTags2018_06_18" // CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateDistributionWithTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -545,7 +545,7 @@ const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2018 // CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -648,7 +648,7 @@ const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile20 // CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -750,7 +750,7 @@ const opCreateInvalidation = "CreateInvalidation2018_06_18" // CreateInvalidationRequest generates a "aws/request.Request" representing the // client's request for the CreateInvalidation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -848,7 +848,7 @@ const opCreatePublicKey = "CreatePublicKey2018_06_18" // CreatePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -935,7 +935,7 @@ const opCreateStreamingDistribution = "CreateStreamingDistribution2018_06_18" // CreateStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1074,7 +1074,7 @@ const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTa // CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistributionWithTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1188,7 +1188,7 @@ const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIden // DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1281,7 +1281,7 @@ const opDeleteDistribution = "DeleteDistribution2018_06_18" // DeleteDistributionRequest generates a "aws/request.Request" representing the // client's request for the DeleteDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1374,7 +1374,7 @@ const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2018 // DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1468,7 +1468,7 @@ const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile20 // DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1562,7 +1562,7 @@ const opDeletePublicKey = "DeletePublicKey2018_06_18" // DeletePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the DeletePublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1656,7 +1656,7 @@ const opDeleteStreamingDistribution = "DeleteStreamingDistribution2018_06_18" // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the DeleteStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1784,7 +1784,7 @@ const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity20 // GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1866,7 +1866,7 @@ const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIden // GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1948,7 +1948,7 @@ const opGetDistribution = "GetDistribution2018_06_18" // GetDistributionRequest generates a "aws/request.Request" representing the // client's request for the GetDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2030,7 +2030,7 @@ const opGetDistributionConfig = "GetDistributionConfig2018_06_18" // GetDistributionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetDistributionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2112,7 +2112,7 @@ const opGetFieldLevelEncryption = "GetFieldLevelEncryption2018_06_18" // GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2194,7 +2194,7 @@ const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2018_06_18 // GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2276,7 +2276,7 @@ const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2018_06_ // GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2358,7 +2358,7 @@ const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileCo // GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionProfileConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2440,7 +2440,7 @@ const opGetInvalidation = "GetInvalidation2018_06_18" // GetInvalidationRequest generates a "aws/request.Request" representing the // client's request for the GetInvalidation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2525,7 +2525,7 @@ const opGetPublicKey = "GetPublicKey2018_06_18" // GetPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the GetPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2607,7 +2607,7 @@ const opGetPublicKeyConfig = "GetPublicKeyConfig2018_06_18" // GetPublicKeyConfigRequest generates a "aws/request.Request" representing the // client's request for the GetPublicKeyConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2689,7 +2689,7 @@ const opGetStreamingDistribution = "GetStreamingDistribution2018_06_18" // GetStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the GetStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2772,7 +2772,7 @@ const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2018_06_ // GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetStreamingDistributionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2854,7 +2854,7 @@ const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdenti // ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2989,7 +2989,7 @@ const opListDistributions = "ListDistributions2018_06_18" // ListDistributionsRequest generates a "aws/request.Request" representing the // client's request for the ListDistributions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3124,7 +3124,7 @@ const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2018_06_18" // ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the // client's request for the ListDistributionsByWebACLId operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3205,7 +3205,7 @@ const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2018_0 // ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListFieldLevelEncryptionConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3285,7 +3285,7 @@ const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2018 // ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListFieldLevelEncryptionProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3365,7 +3365,7 @@ const opListInvalidations = "ListInvalidations2018_06_18" // ListInvalidationsRequest generates a "aws/request.Request" representing the // client's request for the ListInvalidations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3506,7 +3506,7 @@ const opListPublicKeys = "ListPublicKeys2018_06_18" // ListPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListPublicKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3585,7 +3585,7 @@ const opListStreamingDistributions = "ListStreamingDistributions2018_06_18" // ListStreamingDistributionsRequest generates a "aws/request.Request" representing the // client's request for the ListStreamingDistributions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3720,7 +3720,7 @@ const opListTagsForResource = "ListTagsForResource2018_06_18" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3806,7 +3806,7 @@ const opTagResource = "TagResource2018_06_18" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3894,7 +3894,7 @@ const opUntagResource = "UntagResource2018_06_18" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3982,7 +3982,7 @@ const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIden // UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4084,7 +4084,7 @@ const opUpdateDistribution = "UpdateDistribution2018_06_18" // UpdateDistributionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4347,7 +4347,7 @@ const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2018 // UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4459,7 +4459,7 @@ const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile20 // UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4574,7 +4574,7 @@ const opUpdatePublicKey = "UpdatePublicKey2018_06_18" // UpdatePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdatePublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4673,7 +4673,7 @@ const opUpdateStreamingDistribution = "UpdateStreamingDistribution2018_06_18" // UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the UpdateStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go index 9dc9a67e3b4..08f4efc32ee 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go @@ -16,7 +16,7 @@ const opCopyBackupToRegion = "CopyBackupToRegion" // CopyBackupToRegionRequest generates a "aws/request.Request" representing the // client's request for the CopyBackupToRegion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -109,7 +109,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -202,7 +202,7 @@ const opCreateHsm = "CreateHsm" // CreateHsmRequest generates a "aws/request.Request" representing the // client's request for the CreateHsm operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -296,7 +296,7 @@ const opDeleteBackup = "DeleteBackup" // DeleteBackupRequest generates a "aws/request.Request" representing the // client's request for the DeleteBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -391,7 +391,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -486,7 +486,7 @@ const opDeleteHsm = "DeleteHsm" // DeleteHsmRequest generates a "aws/request.Request" representing the // client's request for the DeleteHsm operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -582,7 +582,7 @@ const opDescribeBackups = "DescribeBackups" // DescribeBackupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeBackups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -738,7 +738,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -891,7 +891,7 @@ const opInitializeCluster = "InitializeCluster" // InitializeClusterRequest generates a "aws/request.Request" representing the // client's request for the InitializeCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -987,7 +987,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1142,7 +1142,7 @@ const opRestoreBackup = "RestoreBackup" // RestoreBackupRequest generates a "aws/request.Request" representing the // client's request for the RestoreBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1236,7 +1236,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1329,7 +1329,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go index 2c38e711ffc..dbbf3a16aed 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go @@ -15,7 +15,7 @@ const opBuildSuggesters = "BuildSuggesters" // BuildSuggestersRequest generates a "aws/request.Request" representing the // client's request for the BuildSuggesters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -101,7 +101,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -186,7 +186,7 @@ const opDefineAnalysisScheme = "DefineAnalysisScheme" // DefineAnalysisSchemeRequest generates a "aws/request.Request" representing the // client's request for the DefineAnalysisScheme operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -279,7 +279,7 @@ const opDefineExpression = "DefineExpression" // DefineExpressionRequest generates a "aws/request.Request" representing the // client's request for the DefineExpression operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -372,7 +372,7 @@ const opDefineIndexField = "DefineIndexField" // DefineIndexFieldRequest generates a "aws/request.Request" representing the // client's request for the DefineIndexField operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -469,7 +469,7 @@ const opDefineSuggester = "DefineSuggester" // DefineSuggesterRequest generates a "aws/request.Request" representing the // client's request for the DefineSuggester operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -564,7 +564,7 @@ const opDeleteAnalysisScheme = "DeleteAnalysisScheme" // DeleteAnalysisSchemeRequest generates a "aws/request.Request" representing the // client's request for the DeleteAnalysisScheme operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -653,7 +653,7 @@ const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -736,7 +736,7 @@ const opDeleteExpression = "DeleteExpression" // DeleteExpressionRequest generates a "aws/request.Request" representing the // client's request for the DeleteExpression operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -825,7 +825,7 @@ const opDeleteIndexField = "DeleteIndexField" // DeleteIndexFieldRequest generates a "aws/request.Request" representing the // client's request for the DeleteIndexField operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -914,7 +914,7 @@ const opDeleteSuggester = "DeleteSuggester" // DeleteSuggesterRequest generates a "aws/request.Request" representing the // client's request for the DeleteSuggester operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1003,7 +1003,7 @@ const opDescribeAnalysisSchemes = "DescribeAnalysisSchemes" // DescribeAnalysisSchemesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAnalysisSchemes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1093,7 +1093,7 @@ const opDescribeAvailabilityOptions = "DescribeAvailabilityOptions" // DescribeAvailabilityOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailabilityOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1190,7 +1190,7 @@ const opDescribeDomains = "DescribeDomains" // DescribeDomainsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1275,7 +1275,7 @@ const opDescribeExpressions = "DescribeExpressions" // DescribeExpressionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeExpressions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1364,7 +1364,7 @@ const opDescribeIndexFields = "DescribeIndexFields" // DescribeIndexFieldsRequest generates a "aws/request.Request" representing the // client's request for the DescribeIndexFields operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1453,7 +1453,7 @@ const opDescribeScalingParameters = "DescribeScalingParameters" // DescribeScalingParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1540,7 +1540,7 @@ const opDescribeServiceAccessPolicies = "DescribeServiceAccessPolicies" // DescribeServiceAccessPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeServiceAccessPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1629,7 +1629,7 @@ const opDescribeSuggesters = "DescribeSuggesters" // DescribeSuggestersRequest generates a "aws/request.Request" representing the // client's request for the DescribeSuggesters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1719,7 +1719,7 @@ const opIndexDocuments = "IndexDocuments" // IndexDocumentsRequest generates a "aws/request.Request" representing the // client's request for the IndexDocuments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1805,7 +1805,7 @@ const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the ListDomainNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1881,7 +1881,7 @@ const opUpdateAvailabilityOptions = "UpdateAvailabilityOptions" // UpdateAvailabilityOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateAvailabilityOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1979,7 +1979,7 @@ const opUpdateScalingParameters = "UpdateScalingParameters" // UpdateScalingParametersRequest generates a "aws/request.Request" representing the // client's request for the UpdateScalingParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2076,7 +2076,7 @@ const opUpdateServiceAccessPolicies = "UpdateServiceAccessPolicies" // UpdateServiceAccessPoliciesRequest generates a "aws/request.Request" representing the // client's request for the UpdateServiceAccessPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index db7a6d2ebee..155ea1d2c00 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -16,7 +16,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -140,7 +140,7 @@ const opCreateTrail = "CreateTrail" // CreateTrailRequest generates a "aws/request.Request" representing the // client's request for the CreateTrail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -298,7 +298,7 @@ const opDeleteTrail = "DeleteTrail" // DeleteTrailRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -399,7 +399,7 @@ const opDescribeTrails = "DescribeTrails" // DescribeTrailsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTrails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -482,7 +482,7 @@ const opGetEventSelectors = "GetEventSelectors" // GetEventSelectorsRequest generates a "aws/request.Request" representing the // client's request for the GetEventSelectors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -595,7 +595,7 @@ const opGetTrailStatus = "GetTrailStatus" // GetTrailStatusRequest generates a "aws/request.Request" representing the // client's request for the GetTrailStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -694,7 +694,7 @@ const opListPublicKeys = "ListPublicKeys" // ListPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListPublicKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -790,7 +790,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -904,7 +904,7 @@ const opLookupEvents = "LookupEvents" // LookupEventsRequest generates a "aws/request.Request" representing the // client's request for the LookupEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1075,7 +1075,7 @@ const opPutEventSelectors = "PutEventSelectors" // PutEventSelectorsRequest generates a "aws/request.Request" representing the // client's request for the PutEventSelectors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1219,7 +1219,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1334,7 +1334,7 @@ const opStartLogging = "StartLogging" // StartLoggingRequest generates a "aws/request.Request" representing the // client's request for the StartLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1437,7 +1437,7 @@ const opStopLogging = "StopLogging" // StopLoggingRequest generates a "aws/request.Request" representing the // client's request for the StopLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1542,7 +1542,7 @@ const opUpdateTrail = "UpdateTrail" // UpdateTrailRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go index 773336a7352..3d0f003dea7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go @@ -18,7 +18,7 @@ const opDeleteAlarms = "DeleteAlarms" // DeleteAlarmsRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlarms operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -99,7 +99,7 @@ const opDeleteDashboards = "DeleteDashboards" // DeleteDashboardsRequest generates a "aws/request.Request" representing the // client's request for the DeleteDashboards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -185,7 +185,7 @@ const opDescribeAlarmHistory = "DescribeAlarmHistory" // DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarmHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -324,7 +324,7 @@ const opDescribeAlarms = "DescribeAlarms" // DescribeAlarmsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarms operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -461,7 +461,7 @@ const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric" // DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarmsForMetric operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -536,7 +536,7 @@ const opDisableAlarmActions = "DisableAlarmActions" // DisableAlarmActionsRequest generates a "aws/request.Request" representing the // client's request for the DisableAlarmActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -613,7 +613,7 @@ const opEnableAlarmActions = "EnableAlarmActions" // EnableAlarmActionsRequest generates a "aws/request.Request" representing the // client's request for the EnableAlarmActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -689,7 +689,7 @@ const opGetDashboard = "GetDashboard" // GetDashboardRequest generates a "aws/request.Request" representing the // client's request for the GetDashboard operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -778,7 +778,7 @@ const opGetMetricData = "GetMetricData" // GetMetricDataRequest generates a "aws/request.Request" representing the // client's request for the GetMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -891,7 +891,7 @@ const opGetMetricStatistics = "GetMetricStatistics" // GetMetricStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetMetricStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1032,7 +1032,7 @@ const opGetMetricWidgetImage = "GetMetricWidgetImage" // GetMetricWidgetImageRequest generates a "aws/request.Request" representing the // client's request for the GetMetricWidgetImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1120,7 +1120,7 @@ const opListDashboards = "ListDashboards" // ListDashboardsRequest generates a "aws/request.Request" representing the // client's request for the ListDashboards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1208,7 +1208,7 @@ const opListMetrics = "ListMetrics" // ListMetricsRequest generates a "aws/request.Request" representing the // client's request for the ListMetrics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1354,7 +1354,7 @@ const opPutDashboard = "PutDashboard" // PutDashboardRequest generates a "aws/request.Request" representing the // client's request for the PutDashboard operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1454,7 +1454,7 @@ const opPutMetricAlarm = "PutMetricAlarm" // PutMetricAlarmRequest generates a "aws/request.Request" representing the // client's request for the PutMetricAlarm operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1577,7 +1577,7 @@ const opPutMetricData = "PutMetricData" // PutMetricDataRequest generates a "aws/request.Request" representing the // client's request for the PutMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1707,7 +1707,7 @@ const opSetAlarmState = "SetAlarmState" // SetAlarmStateRequest generates a "aws/request.Request" representing the // client's request for the SetAlarmState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 18bea0fa1fc..74817d4b599 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -18,7 +18,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -107,7 +107,7 @@ const opDescribeEventBus = "DescribeEventBus" // DescribeEventBusRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventBus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -191,7 +191,7 @@ const opDescribeRule = "DescribeRule" // DescribeRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -276,7 +276,7 @@ const opDisableRule = "DisableRule" // DisableRuleRequest generates a "aws/request.Request" representing the // client's request for the DisableRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -367,7 +367,7 @@ const opEnableRule = "EnableRule" // EnableRuleRequest generates a "aws/request.Request" representing the // client's request for the EnableRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -458,7 +458,7 @@ const opListRuleNamesByTarget = "ListRuleNamesByTarget" // ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the // client's request for the ListRuleNamesByTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -538,7 +538,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -621,7 +621,7 @@ const opListTargetsByRule = "ListTargetsByRule" // ListTargetsByRuleRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsByRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -703,7 +703,7 @@ const opPutEvents = "PutEvents" // PutEventsRequest generates a "aws/request.Request" representing the // client's request for the PutEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -783,7 +783,7 @@ const opPutPermission = "PutPermission" // PutPermissionRequest generates a "aws/request.Request" representing the // client's request for the PutPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -884,7 +884,7 @@ const opPutRule = "PutRule" // PutRuleRequest generates a "aws/request.Request" representing the // client's request for the PutRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -993,7 +993,7 @@ const opPutTargets = "PutTargets" // PutTargetsRequest generates a "aws/request.Request" representing the // client's request for the PutTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1176,7 +1176,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1266,7 +1266,7 @@ const opRemoveTargets = "RemoveTargets" // RemoveTargetsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1361,7 +1361,7 @@ const opTestEventPattern = "TestEventPattern" // TestEventPatternRequest generates a "aws/request.Request" representing the // client's request for the TestEventPattern operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index d93b9c41888..f873b25cc9c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -17,7 +17,7 @@ const opAssociateKmsKey = "AssociateKmsKey" // AssociateKmsKeyRequest generates a "aws/request.Request" representing the // client's request for the AssociateKmsKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -120,7 +120,7 @@ const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -212,7 +212,7 @@ const opCreateExportTask = "CreateExportTask" // CreateExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -317,7 +317,7 @@ const opCreateLogGroup = "CreateLogGroup" // CreateLogGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -431,7 +431,7 @@ const opCreateLogStream = "CreateLogStream" // CreateLogStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateLogStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -532,7 +532,7 @@ const opDeleteDestination = "DeleteDestination" // DeleteDestinationRequest generates a "aws/request.Request" representing the // client's request for the DeleteDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -624,7 +624,7 @@ const opDeleteLogGroup = "DeleteLogGroup" // DeleteLogGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -715,7 +715,7 @@ const opDeleteLogStream = "DeleteLogStream" // DeleteLogStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteLogStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -806,7 +806,7 @@ const opDeleteMetricFilter = "DeleteMetricFilter" // DeleteMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -896,7 +896,7 @@ const opDeleteResourcePolicy = "DeleteResourcePolicy" // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -984,7 +984,7 @@ const opDeleteRetentionPolicy = "DeleteRetentionPolicy" // DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRetentionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1077,7 +1077,7 @@ const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" // DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubscriptionFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1167,7 +1167,7 @@ const opDescribeDestinations = "DescribeDestinations" // DescribeDestinationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDestinations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1307,7 +1307,7 @@ const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeExportTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1390,7 +1390,7 @@ const opDescribeLogGroups = "DescribeLogGroups" // DescribeLogGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLogGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1530,7 +1530,7 @@ const opDescribeLogStreams = "DescribeLogStreams" // DescribeLogStreamsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLogStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1677,7 +1677,7 @@ const opDescribeMetricFilters = "DescribeMetricFilters" // DescribeMetricFiltersRequest generates a "aws/request.Request" representing the // client's request for the DescribeMetricFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1821,7 +1821,7 @@ const opDescribeResourcePolicies = "DescribeResourcePolicies" // DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourcePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1903,7 +1903,7 @@ const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" // DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubscriptionFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2047,7 +2047,7 @@ const opDisassociateKmsKey = "DisassociateKmsKey" // DisassociateKmsKeyRequest generates a "aws/request.Request" representing the // client's request for the DisassociateKmsKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2145,7 +2145,7 @@ const opFilterLogEvents = "FilterLogEvents" // FilterLogEventsRequest generates a "aws/request.Request" representing the // client's request for the FilterLogEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2295,7 +2295,7 @@ const opGetLogEvents = "GetLogEvents" // GetLogEventsRequest generates a "aws/request.Request" representing the // client's request for the GetLogEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2442,7 +2442,7 @@ const opListTagsLogGroup = "ListTagsLogGroup" // ListTagsLogGroupRequest generates a "aws/request.Request" representing the // client's request for the ListTagsLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2524,7 +2524,7 @@ const opPutDestination = "PutDestination" // PutDestinationRequest generates a "aws/request.Request" representing the // client's request for the PutDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2619,7 +2619,7 @@ const opPutDestinationPolicy = "PutDestinationPolicy" // PutDestinationPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutDestinationPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2709,7 +2709,7 @@ const opPutLogEvents = "PutLogEvents" // PutLogEventsRequest generates a "aws/request.Request" representing the // client's request for the PutLogEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2835,7 +2835,7 @@ const opPutMetricFilter = "PutMetricFilter" // PutMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the PutMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2933,7 +2933,7 @@ const opPutResourcePolicy = "PutResourcePolicy" // PutResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3020,7 +3020,7 @@ const opPutRetentionPolicy = "PutRetentionPolicy" // PutRetentionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutRetentionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3112,7 +3112,7 @@ const opPutSubscriptionFilter = "PutSubscriptionFilter" // PutSubscriptionFilterRequest generates a "aws/request.Request" representing the // client's request for the PutSubscriptionFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3225,7 +3225,7 @@ const opTagLogGroup = "TagLogGroup" // TagLogGroupRequest generates a "aws/request.Request" representing the // client's request for the TagLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3316,7 +3316,7 @@ const opTestMetricFilter = "TestMetricFilter" // TestMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the TestMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3400,7 +3400,7 @@ const opUntagLogGroup = "UntagLogGroup" // UntagLogGroupRequest generates a "aws/request.Request" representing the // client's request for the UntagLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index b61b96fc9a6..5fb717088f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -16,7 +16,7 @@ const opBatchDeleteBuilds = "BatchDeleteBuilds" // BatchDeleteBuildsRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -95,7 +95,7 @@ const opBatchGetBuilds = "BatchGetBuilds" // BatchGetBuildsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -174,7 +174,7 @@ const opBatchGetProjects = "BatchGetProjects" // BatchGetProjectsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetProjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -253,7 +253,7 @@ const opCreateProject = "CreateProject" // CreateProjectRequest generates a "aws/request.Request" representing the // client's request for the CreateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -339,7 +339,7 @@ const opCreateWebhook = "CreateWebhook" // CreateWebhookRequest generates a "aws/request.Request" representing the // client's request for the CreateWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -439,7 +439,7 @@ const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -518,7 +518,7 @@ const opDeleteWebhook = "DeleteWebhook" // DeleteWebhookRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -605,7 +605,7 @@ const opInvalidateProjectCache = "InvalidateProjectCache" // InvalidateProjectCacheRequest generates a "aws/request.Request" representing the // client's request for the InvalidateProjectCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -687,7 +687,7 @@ const opListBuilds = "ListBuilds" // ListBuildsRequest generates a "aws/request.Request" representing the // client's request for the ListBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -766,7 +766,7 @@ const opListBuildsForProject = "ListBuildsForProject" // ListBuildsForProjectRequest generates a "aws/request.Request" representing the // client's request for the ListBuildsForProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -849,7 +849,7 @@ const opListCuratedEnvironmentImages = "ListCuratedEnvironmentImages" // ListCuratedEnvironmentImagesRequest generates a "aws/request.Request" representing the // client's request for the ListCuratedEnvironmentImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -923,7 +923,7 @@ const opListProjects = "ListProjects" // ListProjectsRequest generates a "aws/request.Request" representing the // client's request for the ListProjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1003,7 +1003,7 @@ const opStartBuild = "StartBuild" // StartBuildRequest generates a "aws/request.Request" representing the // client's request for the StartBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1088,7 +1088,7 @@ const opStopBuild = "StopBuild" // StopBuildRequest generates a "aws/request.Request" representing the // client's request for the StopBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1170,7 +1170,7 @@ const opUpdateProject = "UpdateProject" // UpdateProjectRequest generates a "aws/request.Request" representing the // client's request for the UpdateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1252,7 +1252,7 @@ const opUpdateWebhook = "UpdateWebhook" // UpdateWebhookRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index 9553a7f5fd1..56b34429955 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -18,7 +18,7 @@ const opBatchGetRepositories = "BatchGetRepositories" // BatchGetRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetRepositories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -129,7 +129,7 @@ const opCreateBranch = "CreateBranch" // CreateBranchRequest generates a "aws/request.Request" representing the // client's request for the CreateBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -257,7 +257,7 @@ const opCreatePullRequest = "CreatePullRequest" // CreatePullRequestRequest generates a "aws/request.Request" representing the // client's request for the CreatePullRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -434,7 +434,7 @@ const opCreateRepository = "CreateRepository" // CreateRepositoryRequest generates a "aws/request.Request" representing the // client's request for the CreateRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -544,7 +544,7 @@ const opDeleteBranch = "DeleteBranch" // DeleteBranchRequest generates a "aws/request.Request" representing the // client's request for the DeleteBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -660,7 +660,7 @@ const opDeleteCommentContent = "DeleteCommentContent" // DeleteCommentContentRequest generates a "aws/request.Request" representing the // client's request for the DeleteCommentContent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -751,7 +751,7 @@ const opDeleteFile = "DeleteFile" // DeleteFileRequest generates a "aws/request.Request" representing the // client's request for the DeleteFile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -913,7 +913,7 @@ const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1019,7 +1019,7 @@ const opDescribePullRequestEvents = "DescribePullRequestEvents" // DescribePullRequestEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribePullRequestEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1195,7 +1195,7 @@ const opGetBlob = "GetBlob" // GetBlobRequest generates a "aws/request.Request" representing the // client's request for the GetBlob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1313,7 +1313,7 @@ const opGetBranch = "GetBranch" // GetBranchRequest generates a "aws/request.Request" representing the // client's request for the GetBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1427,7 +1427,7 @@ const opGetComment = "GetComment" // GetCommentRequest generates a "aws/request.Request" representing the // client's request for the GetComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1518,7 +1518,7 @@ const opGetCommentsForComparedCommit = "GetCommentsForComparedCommit" // GetCommentsForComparedCommitRequest generates a "aws/request.Request" representing the // client's request for the GetCommentsForComparedCommit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1694,7 +1694,7 @@ const opGetCommentsForPullRequest = "GetCommentsForPullRequest" // GetCommentsForPullRequestRequest generates a "aws/request.Request" representing the // client's request for the GetCommentsForPullRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1887,7 +1887,7 @@ const opGetCommit = "GetCommit" // GetCommitRequest generates a "aws/request.Request" representing the // client's request for the GetCommit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2001,7 +2001,7 @@ const opGetDifferences = "GetDifferences" // GetDifferencesRequest generates a "aws/request.Request" representing the // client's request for the GetDifferences operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2188,7 +2188,7 @@ const opGetFile = "GetFile" // GetFileRequest generates a "aws/request.Request" representing the // client's request for the GetFile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2314,7 +2314,7 @@ const opGetFolder = "GetFolder" // GetFolderRequest generates a "aws/request.Request" representing the // client's request for the GetFolder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2435,7 +2435,7 @@ const opGetMergeConflicts = "GetMergeConflicts" // GetMergeConflictsRequest generates a "aws/request.Request" representing the // client's request for the GetMergeConflicts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2569,7 +2569,7 @@ const opGetPullRequest = "GetPullRequest" // GetPullRequestRequest generates a "aws/request.Request" representing the // client's request for the GetPullRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2672,7 +2672,7 @@ const opGetRepository = "GetRepository" // GetRepositoryRequest generates a "aws/request.Request" representing the // client's request for the GetRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2782,7 +2782,7 @@ const opGetRepositoryTriggers = "GetRepositoryTriggers" // GetRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the GetRepositoryTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2886,7 +2886,7 @@ const opListBranches = "ListBranches" // ListBranchesRequest generates a "aws/request.Request" representing the // client's request for the ListBranches operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3049,7 +3049,7 @@ const opListPullRequests = "ListPullRequests" // ListPullRequestsRequest generates a "aws/request.Request" representing the // client's request for the ListPullRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3227,7 +3227,7 @@ const opListRepositories = "ListRepositories" // ListRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the ListRepositories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3368,7 +3368,7 @@ const opMergePullRequestByFastForward = "MergePullRequestByFastForward" // MergePullRequestByFastForwardRequest generates a "aws/request.Request" representing the // client's request for the MergePullRequestByFastForward operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3504,7 +3504,7 @@ const opPostCommentForComparedCommit = "PostCommentForComparedCommit" // PostCommentForComparedCommitRequest generates a "aws/request.Request" representing the // client's request for the PostCommentForComparedCommit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3664,7 +3664,7 @@ const opPostCommentForPullRequest = "PostCommentForPullRequest" // PostCommentForPullRequestRequest generates a "aws/request.Request" representing the // client's request for the PostCommentForPullRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3844,7 +3844,7 @@ const opPostCommentReply = "PostCommentReply" // PostCommentReplyRequest generates a "aws/request.Request" representing the // client's request for the PostCommentReply operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3953,7 +3953,7 @@ const opPutFile = "PutFile" // PutFileRequest generates a "aws/request.Request" representing the // client's request for the PutFile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4143,7 +4143,7 @@ const opPutRepositoryTriggers = "PutRepositoryTriggers" // PutRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the PutRepositoryTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4293,7 +4293,7 @@ const opTestRepositoryTriggers = "TestRepositoryTriggers" // TestRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the TestRepositoryTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4445,7 +4445,7 @@ const opUpdateComment = "UpdateComment" // UpdateCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4547,7 +4547,7 @@ const opUpdateDefaultBranch = "UpdateDefaultBranch" // UpdateDefaultBranchRequest generates a "aws/request.Request" representing the // client's request for the UpdateDefaultBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4666,7 +4666,7 @@ const opUpdatePullRequestDescription = "UpdatePullRequestDescription" // UpdatePullRequestDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4761,7 +4761,7 @@ const opUpdatePullRequestStatus = "UpdatePullRequestStatus" // UpdatePullRequestStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4875,7 +4875,7 @@ const opUpdatePullRequestTitle = "UpdatePullRequestTitle" // UpdatePullRequestTitleRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestTitle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4973,7 +4973,7 @@ const opUpdateRepositoryDescription = "UpdateRepositoryDescription" // UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateRepositoryDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5088,7 +5088,7 @@ const opUpdateRepositoryName = "UpdateRepositoryName" // UpdateRepositoryNameRequest generates a "aws/request.Request" representing the // client's request for the UpdateRepositoryName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index bc68dcfd702..290e541dbf3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -17,7 +17,7 @@ const opAddTagsToOnPremisesInstances = "AddTagsToOnPremisesInstances" // AddTagsToOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -117,7 +117,7 @@ const opBatchGetApplicationRevisions = "BatchGetApplicationRevisions" // BatchGetApplicationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetApplicationRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -211,7 +211,7 @@ const opBatchGetApplications = "BatchGetApplications" // BatchGetApplicationsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -299,7 +299,7 @@ const opBatchGetDeploymentGroups = "BatchGetDeploymentGroups" // BatchGetDeploymentGroupsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeploymentGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -393,7 +393,7 @@ const opBatchGetDeploymentInstances = "BatchGetDeploymentInstances" // BatchGetDeploymentInstancesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeploymentInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -488,7 +488,7 @@ const opBatchGetDeployments = "BatchGetDeployments" // BatchGetDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeployments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -573,7 +573,7 @@ const opBatchGetOnPremisesInstances = "BatchGetOnPremisesInstances" // BatchGetOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -658,7 +658,7 @@ const opContinueDeployment = "ContinueDeployment" // ContinueDeploymentRequest generates a "aws/request.Request" representing the // client's request for the ContinueDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -759,7 +759,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -851,7 +851,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1016,7 +1016,7 @@ const opCreateDeploymentConfig = "CreateDeploymentConfig" // CreateDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateDeploymentConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1115,7 +1115,7 @@ const opCreateDeploymentGroup = "CreateDeploymentGroup" // CreateDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1295,7 +1295,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1379,7 +1379,7 @@ const opDeleteDeploymentConfig = "DeleteDeploymentConfig" // DeleteDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeploymentConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1472,7 +1472,7 @@ const opDeleteDeploymentGroup = "DeleteDeploymentGroup" // DeleteDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1565,7 +1565,7 @@ const opDeleteGitHubAccountToken = "DeleteGitHubAccountToken" // DeleteGitHubAccountTokenRequest generates a "aws/request.Request" representing the // client's request for the DeleteGitHubAccountToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1656,7 +1656,7 @@ const opDeregisterOnPremisesInstance = "DeregisterOnPremisesInstance" // DeregisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterOnPremisesInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1740,7 +1740,7 @@ const opGetApplication = "GetApplication" // GetApplicationRequest generates a "aws/request.Request" representing the // client's request for the GetApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1825,7 +1825,7 @@ const opGetApplicationRevision = "GetApplicationRevision" // GetApplicationRevisionRequest generates a "aws/request.Request" representing the // client's request for the GetApplicationRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1919,7 +1919,7 @@ const opGetDeployment = "GetDeployment" // GetDeploymentRequest generates a "aws/request.Request" representing the // client's request for the GetDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2004,7 +2004,7 @@ const opGetDeploymentConfig = "GetDeploymentConfig" // GetDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2090,7 +2090,7 @@ const opGetDeploymentGroup = "GetDeploymentGroup" // GetDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2185,7 +2185,7 @@ const opGetDeploymentInstance = "GetDeploymentInstance" // GetDeploymentInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2279,7 +2279,7 @@ const opGetOnPremisesInstance = "GetOnPremisesInstance" // GetOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetOnPremisesInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2364,7 +2364,7 @@ const opListApplicationRevisions = "ListApplicationRevisions" // ListApplicationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the ListApplicationRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2527,7 +2527,7 @@ const opListApplications = "ListApplications" // ListApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2662,7 +2662,7 @@ const opListDeploymentConfigs = "ListDeploymentConfigs" // ListDeploymentConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2797,7 +2797,7 @@ const opListDeploymentGroups = "ListDeploymentGroups" // ListDeploymentGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2942,7 +2942,7 @@ const opListDeploymentInstances = "ListDeploymentInstances" // ListDeploymentInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3102,7 +3102,7 @@ const opListDeployments = "ListDeployments" // ListDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the ListDeployments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3263,7 +3263,7 @@ const opListGitHubAccountTokenNames = "ListGitHubAccountTokenNames" // ListGitHubAccountTokenNamesRequest generates a "aws/request.Request" representing the // client's request for the ListGitHubAccountTokenNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3348,7 +3348,7 @@ const opListOnPremisesInstances = "ListOnPremisesInstances" // ListOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3437,7 +3437,7 @@ const opPutLifecycleEventHookExecutionStatus = "PutLifecycleEventHookExecutionSt // PutLifecycleEventHookExecutionStatusRequest generates a "aws/request.Request" representing the // client's request for the PutLifecycleEventHookExecutionStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3538,7 +3538,7 @@ const opRegisterApplicationRevision = "RegisterApplicationRevision" // RegisterApplicationRevisionRequest generates a "aws/request.Request" representing the // client's request for the RegisterApplicationRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3634,7 +3634,7 @@ const opRegisterOnPremisesInstance = "RegisterOnPremisesInstance" // RegisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterOnPremisesInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3748,7 +3748,7 @@ const opRemoveTagsFromOnPremisesInstances = "RemoveTagsFromOnPremisesInstances" // RemoveTagsFromOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3848,7 +3848,7 @@ const opSkipWaitTimeForInstanceTermination = "SkipWaitTimeForInstanceTermination // SkipWaitTimeForInstanceTerminationRequest generates a "aws/request.Request" representing the // client's request for the SkipWaitTimeForInstanceTermination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3945,7 +3945,7 @@ const opStopDeployment = "StopDeployment" // StopDeploymentRequest generates a "aws/request.Request" representing the // client's request for the StopDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4033,7 +4033,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4124,7 +4124,7 @@ const opUpdateDeploymentGroup = "UpdateDeploymentGroup" // UpdateDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index 95f1724f1d1..87a678f08da 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -18,7 +18,7 @@ const opAcknowledgeJob = "AcknowledgeJob" // AcknowledgeJobRequest generates a "aws/request.Request" representing the // client's request for the AcknowledgeJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -104,7 +104,7 @@ const opAcknowledgeThirdPartyJob = "AcknowledgeThirdPartyJob" // AcknowledgeThirdPartyJobRequest generates a "aws/request.Request" representing the // client's request for the AcknowledgeThirdPartyJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -193,7 +193,7 @@ const opCreateCustomActionType = "CreateCustomActionType" // CreateCustomActionTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomActionType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -277,7 +277,7 @@ const opCreatePipeline = "CreatePipeline" // CreatePipelineRequest generates a "aws/request.Request" representing the // client's request for the CreatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -375,7 +375,7 @@ const opDeleteCustomActionType = "DeleteCustomActionType" // DeleteCustomActionTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomActionType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -463,7 +463,7 @@ const opDeletePipeline = "DeletePipeline" // DeletePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeletePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -544,7 +544,7 @@ const opDeleteWebhook = "DeleteWebhook" // DeleteWebhookRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -627,7 +627,7 @@ const opDeregisterWebhookWithThirdParty = "DeregisterWebhookWithThirdParty" // DeregisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the // client's request for the DeregisterWebhookWithThirdParty operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -711,7 +711,7 @@ const opDisableStageTransition = "DisableStageTransition" // DisableStageTransitionRequest generates a "aws/request.Request" representing the // client's request for the DisableStageTransition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -799,7 +799,7 @@ const opEnableStageTransition = "EnableStageTransition" // EnableStageTransitionRequest generates a "aws/request.Request" representing the // client's request for the EnableStageTransition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -886,7 +886,7 @@ const opGetJobDetails = "GetJobDetails" // GetJobDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetJobDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -973,7 +973,7 @@ const opGetPipeline = "GetPipeline" // GetPipelineRequest generates a "aws/request.Request" representing the // client's request for the GetPipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1061,7 +1061,7 @@ const opGetPipelineExecution = "GetPipelineExecution" // GetPipelineExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetPipelineExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1149,7 +1149,7 @@ const opGetPipelineState = "GetPipelineState" // GetPipelineStateRequest generates a "aws/request.Request" representing the // client's request for the GetPipelineState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1232,7 +1232,7 @@ const opGetThirdPartyJobDetails = "GetThirdPartyJobDetails" // GetThirdPartyJobDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetThirdPartyJobDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1326,7 +1326,7 @@ const opListActionTypes = "ListActionTypes" // ListActionTypesRequest generates a "aws/request.Request" representing the // client's request for the ListActionTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1410,7 +1410,7 @@ const opListPipelineExecutions = "ListPipelineExecutions" // ListPipelineExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListPipelineExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1496,7 +1496,7 @@ const opListPipelines = "ListPipelines" // ListPipelinesRequest generates a "aws/request.Request" representing the // client's request for the ListPipelines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1579,7 +1579,7 @@ const opListWebhooks = "ListWebhooks" // ListWebhooksRequest generates a "aws/request.Request" representing the // client's request for the ListWebhooks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1664,7 +1664,7 @@ const opPollForJobs = "PollForJobs" // PollForJobsRequest generates a "aws/request.Request" representing the // client's request for the PollForJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1754,7 +1754,7 @@ const opPollForThirdPartyJobs = "PollForThirdPartyJobs" // PollForThirdPartyJobsRequest generates a "aws/request.Request" representing the // client's request for the PollForThirdPartyJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1841,7 +1841,7 @@ const opPutActionRevision = "PutActionRevision" // PutActionRevisionRequest generates a "aws/request.Request" representing the // client's request for the PutActionRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1929,7 +1929,7 @@ const opPutApprovalResult = "PutApprovalResult" // PutApprovalResultRequest generates a "aws/request.Request" representing the // client's request for the PutApprovalResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2024,7 +2024,7 @@ const opPutJobFailureResult = "PutJobFailureResult" // PutJobFailureResultRequest generates a "aws/request.Request" representing the // client's request for the PutJobFailureResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2112,7 +2112,7 @@ const opPutJobSuccessResult = "PutJobSuccessResult" // PutJobSuccessResultRequest generates a "aws/request.Request" representing the // client's request for the PutJobSuccessResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2200,7 +2200,7 @@ const opPutThirdPartyJobFailureResult = "PutThirdPartyJobFailureResult" // PutThirdPartyJobFailureResultRequest generates a "aws/request.Request" representing the // client's request for the PutThirdPartyJobFailureResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2291,7 +2291,7 @@ const opPutThirdPartyJobSuccessResult = "PutThirdPartyJobSuccessResult" // PutThirdPartyJobSuccessResultRequest generates a "aws/request.Request" representing the // client's request for the PutThirdPartyJobSuccessResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2382,7 +2382,7 @@ const opPutWebhook = "PutWebhook" // PutWebhookRequest generates a "aws/request.Request" representing the // client's request for the PutWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2481,7 +2481,7 @@ const opRegisterWebhookWithThirdParty = "RegisterWebhookWithThirdParty" // RegisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the // client's request for the RegisterWebhookWithThirdParty operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2564,7 +2564,7 @@ const opRetryStageExecution = "RetryStageExecution" // RetryStageExecutionRequest generates a "aws/request.Request" representing the // client's request for the RetryStageExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2659,7 +2659,7 @@ const opStartPipelineExecution = "StartPipelineExecution" // StartPipelineExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartPipelineExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2742,7 +2742,7 @@ const opUpdatePipeline = "UpdatePipeline" // UpdatePipelineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go index e666f732887..ffafc65c278 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go @@ -18,7 +18,7 @@ const opCreateIdentityPool = "CreateIdentityPool" // CreateIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the CreateIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -127,7 +127,7 @@ const opDeleteIdentities = "DeleteIdentities" // DeleteIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -215,7 +215,7 @@ const opDeleteIdentityPool = "DeleteIdentityPool" // DeleteIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -312,7 +312,7 @@ const opDescribeIdentity = "DescribeIdentity" // DescribeIdentityRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -407,7 +407,7 @@ const opDescribeIdentityPool = "DescribeIdentityPool" // DescribeIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -502,7 +502,7 @@ const opGetCredentialsForIdentity = "GetCredentialsForIdentity" // GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCredentialsForIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -611,7 +611,7 @@ const opGetId = "GetId" // GetIdRequest generates a "aws/request.Request" representing the // client's request for the GetId operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -717,7 +717,7 @@ const opGetIdentityPoolRoles = "GetIdentityPoolRoles" // GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityPoolRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -815,7 +815,7 @@ const opGetOpenIdToken = "GetOpenIdToken" // GetOpenIdTokenRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIdToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -921,7 +921,7 @@ const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity // GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1036,7 +1036,7 @@ const opListIdentities = "ListIdentities" // ListIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1130,7 +1130,7 @@ const opListIdentityPools = "ListIdentityPools" // ListIdentityPoolsRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityPools operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1220,7 +1220,7 @@ const opLookupDeveloperIdentity = "LookupDeveloperIdentity" // LookupDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the LookupDeveloperIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1325,7 +1325,7 @@ const opMergeDeveloperIdentities = "MergeDeveloperIdentities" // MergeDeveloperIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the MergeDeveloperIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1429,7 +1429,7 @@ const opSetIdentityPoolRoles = "SetIdentityPoolRoles" // SetIdentityPoolRolesRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityPoolRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1533,7 +1533,7 @@ const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity" // UnlinkDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the UnlinkDeveloperIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1636,7 +1636,7 @@ const opUnlinkIdentity = "UnlinkIdentity" // UnlinkIdentityRequest generates a "aws/request.Request" representing the // client's request for the UnlinkIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1742,7 +1742,7 @@ const opUpdateIdentityPool = "UpdateIdentityPool" // UpdateIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index 74c49c15b29..3187edea36c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -19,7 +19,7 @@ const opAddCustomAttributes = "AddCustomAttributes" // AddCustomAttributesRequest generates a "aws/request.Request" representing the // client's request for the AddCustomAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -117,7 +117,7 @@ const opAdminAddUserToGroup = "AdminAddUserToGroup" // AdminAddUserToGroupRequest generates a "aws/request.Request" representing the // client's request for the AdminAddUserToGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -218,7 +218,7 @@ const opAdminConfirmSignUp = "AdminConfirmSignUp" // AdminConfirmSignUpRequest generates a "aws/request.Request" representing the // client's request for the AdminConfirmSignUp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -338,7 +338,7 @@ const opAdminCreateUser = "AdminCreateUser" // AdminCreateUserRequest generates a "aws/request.Request" representing the // client's request for the AdminCreateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -489,7 +489,7 @@ const opAdminDeleteUser = "AdminDeleteUser" // AdminDeleteUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -590,7 +590,7 @@ const opAdminDeleteUserAttributes = "AdminDeleteUserAttributes" // AdminDeleteUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the AdminDeleteUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -690,7 +690,7 @@ const opAdminDisableProviderForUser = "AdminDisableProviderForUser" // AdminDisableProviderForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDisableProviderForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -821,7 +821,7 @@ const opAdminDisableUser = "AdminDisableUser" // AdminDisableUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDisableUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -920,7 +920,7 @@ const opAdminEnableUser = "AdminEnableUser" // AdminEnableUserRequest generates a "aws/request.Request" representing the // client's request for the AdminEnableUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1019,7 +1019,7 @@ const opAdminForgetDevice = "AdminForgetDevice" // AdminForgetDeviceRequest generates a "aws/request.Request" representing the // client's request for the AdminForgetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1123,7 +1123,7 @@ const opAdminGetDevice = "AdminGetDevice" // AdminGetDeviceRequest generates a "aws/request.Request" representing the // client's request for the AdminGetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1222,7 +1222,7 @@ const opAdminGetUser = "AdminGetUser" // AdminGetUserRequest generates a "aws/request.Request" representing the // client's request for the AdminGetUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1322,7 +1322,7 @@ const opAdminInitiateAuth = "AdminInitiateAuth" // AdminInitiateAuthRequest generates a "aws/request.Request" representing the // client's request for the AdminInitiateAuth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1456,7 +1456,7 @@ const opAdminLinkProviderForUser = "AdminLinkProviderForUser" // AdminLinkProviderForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminLinkProviderForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1577,7 +1577,7 @@ const opAdminListDevices = "AdminListDevices" // AdminListDevicesRequest generates a "aws/request.Request" representing the // client's request for the AdminListDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1676,7 +1676,7 @@ const opAdminListGroupsForUser = "AdminListGroupsForUser" // AdminListGroupsForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminListGroupsForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1775,7 +1775,7 @@ const opAdminListUserAuthEvents = "AdminListUserAuthEvents" // AdminListUserAuthEventsRequest generates a "aws/request.Request" representing the // client's request for the AdminListUserAuthEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1876,7 +1876,7 @@ const opAdminRemoveUserFromGroup = "AdminRemoveUserFromGroup" // AdminRemoveUserFromGroupRequest generates a "aws/request.Request" representing the // client's request for the AdminRemoveUserFromGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1977,7 +1977,7 @@ const opAdminResetUserPassword = "AdminResetUserPassword" // AdminResetUserPasswordRequest generates a "aws/request.Request" representing the // client's request for the AdminResetUserPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2117,7 +2117,7 @@ const opAdminRespondToAuthChallenge = "AdminRespondToAuthChallenge" // AdminRespondToAuthChallengeRequest generates a "aws/request.Request" representing the // client's request for the AdminRespondToAuthChallenge operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2272,7 +2272,7 @@ const opAdminSetUserMFAPreference = "AdminSetUserMFAPreference" // AdminSetUserMFAPreferenceRequest generates a "aws/request.Request" representing the // client's request for the AdminSetUserMFAPreference operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2371,7 +2371,7 @@ const opAdminSetUserSettings = "AdminSetUserSettings" // AdminSetUserSettingsRequest generates a "aws/request.Request" representing the // client's request for the AdminSetUserSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2466,7 +2466,7 @@ const opAdminUpdateAuthEventFeedback = "AdminUpdateAuthEventFeedback" // AdminUpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateAuthEventFeedback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2568,7 +2568,7 @@ const opAdminUpdateDeviceStatus = "AdminUpdateDeviceStatus" // AdminUpdateDeviceStatusRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateDeviceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2670,7 +2670,7 @@ const opAdminUpdateUserAttributes = "AdminUpdateUserAttributes" // AdminUpdateUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2794,7 +2794,7 @@ const opAdminUserGlobalSignOut = "AdminUserGlobalSignOut" // AdminUserGlobalSignOutRequest generates a "aws/request.Request" representing the // client's request for the AdminUserGlobalSignOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2893,7 +2893,7 @@ const opAssociateSoftwareToken = "AssociateSoftwareToken" // AssociateSoftwareTokenRequest generates a "aws/request.Request" representing the // client's request for the AssociateSoftwareToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2988,7 +2988,7 @@ const opChangePassword = "ChangePassword" // ChangePasswordRequest generates a "aws/request.Request" representing the // client's request for the ChangePassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3100,7 +3100,7 @@ const opConfirmDevice = "ConfirmDevice" // ConfirmDeviceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3219,7 +3219,7 @@ const opConfirmForgotPassword = "ConfirmForgotPassword" // ConfirmForgotPasswordRequest generates a "aws/request.Request" representing the // client's request for the ConfirmForgotPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3351,7 +3351,7 @@ const opConfirmSignUp = "ConfirmSignUp" // ConfirmSignUpRequest generates a "aws/request.Request" representing the // client's request for the ConfirmSignUp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3483,7 +3483,7 @@ const opCreateGroup = "CreateGroup" // CreateGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3587,7 +3587,7 @@ const opCreateIdentityProvider = "CreateIdentityProvider" // CreateIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3689,7 +3689,7 @@ const opCreateResourceServer = "CreateResourceServer" // CreateResourceServerRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3787,7 +3787,7 @@ const opCreateUserImportJob = "CreateUserImportJob" // CreateUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the CreateUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3888,7 +3888,7 @@ const opCreateUserPool = "CreateUserPool" // CreateUserPoolRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4000,7 +4000,7 @@ const opCreateUserPoolClient = "CreateUserPoolClient" // CreateUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4104,7 +4104,7 @@ const opCreateUserPoolDomain = "CreateUserPoolDomain" // CreateUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPoolDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4198,7 +4198,7 @@ const opDeleteGroup = "DeleteGroup" // DeleteGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4296,7 +4296,7 @@ const opDeleteIdentityProvider = "DeleteIdentityProvider" // DeleteIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4395,7 +4395,7 @@ const opDeleteResourceServer = "DeleteResourceServer" // DeleteResourceServerRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4491,7 +4491,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4597,7 +4597,7 @@ const opDeleteUserAttributes = "DeleteUserAttributes" // DeleteUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4701,7 +4701,7 @@ const opDeleteUserPool = "DeleteUserPool" // DeleteUserPoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4801,7 +4801,7 @@ const opDeleteUserPoolClient = "DeleteUserPoolClient" // DeleteUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4897,7 +4897,7 @@ const opDeleteUserPoolDomain = "DeleteUserPoolDomain" // DeleteUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPoolDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4987,7 +4987,7 @@ const opDescribeIdentityProvider = "DescribeIdentityProvider" // DescribeIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5081,7 +5081,7 @@ const opDescribeResourceServer = "DescribeResourceServer" // DescribeResourceServerRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5175,7 +5175,7 @@ const opDescribeRiskConfiguration = "DescribeRiskConfiguration" // DescribeRiskConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeRiskConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5272,7 +5272,7 @@ const opDescribeUserImportJob = "DescribeUserImportJob" // DescribeUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5366,7 +5366,7 @@ const opDescribeUserPool = "DescribeUserPool" // DescribeUserPoolRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5464,7 +5464,7 @@ const opDescribeUserPoolClient = "DescribeUserPoolClient" // DescribeUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5559,7 +5559,7 @@ const opDescribeUserPoolDomain = "DescribeUserPoolDomain" // DescribeUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPoolDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5649,7 +5649,7 @@ const opForgetDevice = "ForgetDevice" // ForgetDeviceRequest generates a "aws/request.Request" representing the // client's request for the ForgetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5757,7 +5757,7 @@ const opForgotPassword = "ForgotPassword" // ForgotPasswordRequest generates a "aws/request.Request" representing the // client's request for the ForgotPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5898,7 +5898,7 @@ const opGetCSVHeader = "GetCSVHeader" // GetCSVHeaderRequest generates a "aws/request.Request" representing the // client's request for the GetCSVHeader operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5993,7 +5993,7 @@ const opGetDevice = "GetDevice" // GetDeviceRequest generates a "aws/request.Request" representing the // client's request for the GetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6099,7 +6099,7 @@ const opGetGroup = "GetGroup" // GetGroupRequest generates a "aws/request.Request" representing the // client's request for the GetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6195,7 +6195,7 @@ const opGetIdentityProviderByIdentifier = "GetIdentityProviderByIdentifier" // GetIdentityProviderByIdentifierRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityProviderByIdentifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6289,7 +6289,7 @@ const opGetSigningCertificate = "GetSigningCertificate" // GetSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6372,7 +6372,7 @@ const opGetUICustomization = "GetUICustomization" // GetUICustomizationRequest generates a "aws/request.Request" representing the // client's request for the GetUICustomization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6469,7 +6469,7 @@ const opGetUser = "GetUser" // GetUserRequest generates a "aws/request.Request" representing the // client's request for the GetUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6573,7 +6573,7 @@ const opGetUserAttributeVerificationCode = "GetUserAttributeVerificationCode" // GetUserAttributeVerificationCodeRequest generates a "aws/request.Request" representing the // client's request for the GetUserAttributeVerificationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6710,7 +6710,7 @@ const opGetUserPoolMfaConfig = "GetUserPoolMfaConfig" // GetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the // client's request for the GetUserPoolMfaConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6804,7 +6804,7 @@ const opGlobalSignOut = "GlobalSignOut" // GlobalSignOutRequest generates a "aws/request.Request" representing the // client's request for the GlobalSignOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6904,7 +6904,7 @@ const opInitiateAuth = "InitiateAuth" // InitiateAuthRequest generates a "aws/request.Request" representing the // client's request for the InitiateAuth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7022,7 +7022,7 @@ const opListDevices = "ListDevices" // ListDevicesRequest generates a "aws/request.Request" representing the // client's request for the ListDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7128,7 +7128,7 @@ const opListGroups = "ListGroups" // ListGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7224,7 +7224,7 @@ const opListIdentityProviders = "ListIdentityProviders" // ListIdentityProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityProviders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7318,7 +7318,7 @@ const opListResourceServers = "ListResourceServers" // ListResourceServersRequest generates a "aws/request.Request" representing the // client's request for the ListResourceServers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7412,7 +7412,7 @@ const opListUserImportJobs = "ListUserImportJobs" // ListUserImportJobsRequest generates a "aws/request.Request" representing the // client's request for the ListUserImportJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7506,7 +7506,7 @@ const opListUserPoolClients = "ListUserPoolClients" // ListUserPoolClientsRequest generates a "aws/request.Request" representing the // client's request for the ListUserPoolClients operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7600,7 +7600,7 @@ const opListUserPools = "ListUserPools" // ListUserPoolsRequest generates a "aws/request.Request" representing the // client's request for the ListUserPools operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7690,7 +7690,7 @@ const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7784,7 +7784,7 @@ const opListUsersInGroup = "ListUsersInGroup" // ListUsersInGroupRequest generates a "aws/request.Request" representing the // client's request for the ListUsersInGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7880,7 +7880,7 @@ const opResendConfirmationCode = "ResendConfirmationCode" // ResendConfirmationCodeRequest generates a "aws/request.Request" representing the // client's request for the ResendConfirmationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8012,7 +8012,7 @@ const opRespondToAuthChallenge = "RespondToAuthChallenge" // RespondToAuthChallengeRequest generates a "aws/request.Request" representing the // client's request for the RespondToAuthChallenge operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8165,7 +8165,7 @@ const opSetRiskConfiguration = "SetRiskConfiguration" // SetRiskConfigurationRequest generates a "aws/request.Request" representing the // client's request for the SetRiskConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8275,7 +8275,7 @@ const opSetUICustomization = "SetUICustomization" // SetUICustomizationRequest generates a "aws/request.Request" representing the // client's request for the SetUICustomization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8380,7 +8380,7 @@ const opSetUserMFAPreference = "SetUserMFAPreference" // SetUserMFAPreferenceRequest generates a "aws/request.Request" representing the // client's request for the SetUserMFAPreference operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8479,7 +8479,7 @@ const opSetUserPoolMfaConfig = "SetUserPoolMfaConfig" // SetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the // client's request for the SetUserPoolMfaConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8583,7 +8583,7 @@ const opSetUserSettings = "SetUserSettings" // SetUserSettingsRequest generates a "aws/request.Request" representing the // client's request for the SetUserSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8685,7 +8685,7 @@ const opSignUp = "SignUp" // SignUpRequest generates a "aws/request.Request" representing the // client's request for the SignUp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8818,7 +8818,7 @@ const opStartUserImportJob = "StartUserImportJob" // StartUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the StartUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8915,7 +8915,7 @@ const opStopUserImportJob = "StopUserImportJob" // StopUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the StopUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9012,7 +9012,7 @@ const opUpdateAuthEventFeedback = "UpdateAuthEventFeedback" // UpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthEventFeedback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9114,7 +9114,7 @@ const opUpdateDeviceStatus = "UpdateDeviceStatus" // UpdateDeviceStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeviceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9220,7 +9220,7 @@ const opUpdateGroup = "UpdateGroup" // UpdateGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9316,7 +9316,7 @@ const opUpdateIdentityProvider = "UpdateIdentityProvider" // UpdateIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the UpdateIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9413,7 +9413,7 @@ const opUpdateResourceServer = "UpdateResourceServer" // UpdateResourceServerRequest generates a "aws/request.Request" representing the // client's request for the UpdateResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9507,7 +9507,7 @@ const opUpdateUserAttributes = "UpdateUserAttributes" // UpdateUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9653,7 +9653,7 @@ const opUpdateUserPool = "UpdateUserPool" // UpdateUserPoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9773,7 +9773,7 @@ const opUpdateUserPoolClient = "UpdateUserPoolClient" // UpdateUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9879,7 +9879,7 @@ const opVerifySoftwareToken = "VerifySoftwareToken" // VerifySoftwareTokenRequest generates a "aws/request.Request" representing the // client's request for the VerifySoftwareToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10002,7 +10002,7 @@ const opVerifyUserAttribute = "VerifyUserAttribute" // VerifyUserAttributeRequest generates a "aws/request.Request" representing the // client's request for the VerifyUserAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index c77fdfb82b6..fdeb82bec85 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -18,7 +18,7 @@ const opBatchGetResourceConfig = "BatchGetResourceConfig" // BatchGetResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the BatchGetResourceConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -109,7 +109,7 @@ const opDeleteAggregationAuthorization = "DeleteAggregationAuthorization" // DeleteAggregationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAggregationAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -192,7 +192,7 @@ const opDeleteConfigRule = "DeleteConfigRule" // DeleteConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -284,7 +284,7 @@ const opDeleteConfigurationAggregator = "DeleteConfigurationAggregator" // DeleteConfigurationAggregatorRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationAggregator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -366,7 +366,7 @@ const opDeleteConfigurationRecorder = "DeleteConfigurationRecorder" // DeleteConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -456,7 +456,7 @@ const opDeleteDeliveryChannel = "DeleteDeliveryChannel" // DeleteDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeliveryChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -544,7 +544,7 @@ const opDeleteEvaluationResults = "DeleteEvaluationResults" // DeleteEvaluationResultsRequest generates a "aws/request.Request" representing the // client's request for the DeleteEvaluationResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -631,7 +631,7 @@ const opDeletePendingAggregationRequest = "DeletePendingAggregationRequest" // DeletePendingAggregationRequestRequest generates a "aws/request.Request" representing the // client's request for the DeletePendingAggregationRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -714,7 +714,7 @@ const opDeleteRetentionConfiguration = "DeleteRetentionConfiguration" // DeleteRetentionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteRetentionConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -799,7 +799,7 @@ const opDeliverConfigSnapshot = "DeliverConfigSnapshot" // DeliverConfigSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeliverConfigSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -895,7 +895,7 @@ const opDescribeAggregateComplianceByConfigRules = "DescribeAggregateComplianceB // DescribeAggregateComplianceByConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregateComplianceByConfigRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -988,7 +988,7 @@ const opDescribeAggregationAuthorizations = "DescribeAggregationAuthorizations" // DescribeAggregationAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregationAuthorizations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1076,7 +1076,7 @@ const opDescribeComplianceByConfigRule = "DescribeComplianceByConfigRule" // DescribeComplianceByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeComplianceByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1186,7 +1186,7 @@ const opDescribeComplianceByResource = "DescribeComplianceByResource" // DescribeComplianceByResourceRequest generates a "aws/request.Request" representing the // client's request for the DescribeComplianceByResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1294,7 +1294,7 @@ const opDescribeConfigRuleEvaluationStatus = "DescribeConfigRuleEvaluationStatus // DescribeConfigRuleEvaluationStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRuleEvaluationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1385,7 +1385,7 @@ const opDescribeConfigRules = "DescribeConfigRules" // DescribeConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1469,7 +1469,7 @@ const opDescribeConfigurationAggregatorSourcesStatus = "DescribeConfigurationAgg // DescribeConfigurationAggregatorSourcesStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationAggregatorSourcesStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1562,7 +1562,7 @@ const opDescribeConfigurationAggregators = "DescribeConfigurationAggregators" // DescribeConfigurationAggregatorsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationAggregators operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1654,7 +1654,7 @@ const opDescribeConfigurationRecorderStatus = "DescribeConfigurationRecorderStat // DescribeConfigurationRecorderStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRecorderStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1738,7 +1738,7 @@ const opDescribeConfigurationRecorders = "DescribeConfigurationRecorders" // DescribeConfigurationRecordersRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRecorders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1822,7 +1822,7 @@ const opDescribeDeliveryChannelStatus = "DescribeDeliveryChannelStatus" // DescribeDeliveryChannelStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannelStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1905,7 +1905,7 @@ const opDescribeDeliveryChannels = "DescribeDeliveryChannels" // DescribeDeliveryChannelsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1988,7 +1988,7 @@ const opDescribePendingAggregationRequests = "DescribePendingAggregationRequests // DescribePendingAggregationRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingAggregationRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2075,7 +2075,7 @@ const opDescribeRetentionConfigurations = "DescribeRetentionConfigurations" // DescribeRetentionConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRetentionConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2167,7 +2167,7 @@ const opGetAggregateComplianceDetailsByConfigRule = "GetAggregateComplianceDetai // GetAggregateComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateComplianceDetailsByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2262,7 +2262,7 @@ const opGetAggregateConfigRuleComplianceSummary = "GetAggregateConfigRuleComplia // GetAggregateConfigRuleComplianceSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateConfigRuleComplianceSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2355,7 +2355,7 @@ const opGetComplianceDetailsByConfigRule = "GetComplianceDetailsByConfigRule" // GetComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetailsByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2445,7 +2445,7 @@ const opGetComplianceDetailsByResource = "GetComplianceDetailsByResource" // GetComplianceDetailsByResourceRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetailsByResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2527,7 +2527,7 @@ const opGetComplianceSummaryByConfigRule = "GetComplianceSummaryByConfigRule" // GetComplianceSummaryByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceSummaryByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2602,7 +2602,7 @@ const opGetComplianceSummaryByResourceType = "GetComplianceSummaryByResourceType // GetComplianceSummaryByResourceTypeRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceSummaryByResourceType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2684,7 +2684,7 @@ const opGetDiscoveredResourceCounts = "GetDiscoveredResourceCounts" // GetDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the // client's request for the GetDiscoveredResourceCounts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2803,7 +2803,7 @@ const opGetResourceConfigHistory = "GetResourceConfigHistory" // GetResourceConfigHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetResourceConfigHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2969,7 +2969,7 @@ const opListDiscoveredResources = "ListDiscoveredResources" // ListDiscoveredResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListDiscoveredResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3072,7 +3072,7 @@ const opPutAggregationAuthorization = "PutAggregationAuthorization" // PutAggregationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the PutAggregationAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3153,7 +3153,7 @@ const opPutConfigRule = "PutConfigRule" // PutConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the PutConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3292,7 +3292,7 @@ const opPutConfigurationAggregator = "PutConfigurationAggregator" // PutConfigurationAggregatorRequest generates a "aws/request.Request" representing the // client's request for the PutConfigurationAggregator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3402,7 +3402,7 @@ const opPutConfigurationRecorder = "PutConfigurationRecorder" // PutConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the PutConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3503,7 +3503,7 @@ const opPutDeliveryChannel = "PutDeliveryChannel" // PutDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the PutDeliveryChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3616,7 +3616,7 @@ const opPutEvaluations = "PutEvaluations" // PutEvaluationsRequest generates a "aws/request.Request" representing the // client's request for the PutEvaluations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3705,7 +3705,7 @@ const opPutRetentionConfiguration = "PutRetentionConfiguration" // PutRetentionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutRetentionConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3796,7 +3796,7 @@ const opStartConfigRulesEvaluation = "StartConfigRulesEvaluation" // StartConfigRulesEvaluationRequest generates a "aws/request.Request" representing the // client's request for the StartConfigRulesEvaluation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3921,7 +3921,7 @@ const opStartConfigurationRecorder = "StartConfigurationRecorder" // StartConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the StartConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4009,7 +4009,7 @@ const opStopConfigurationRecorder = "StopConfigurationRecorder" // StopConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the StopConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 6020100f994..742254525af 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -16,7 +16,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -98,7 +98,7 @@ const opCreateEndpoint = "CreateEndpoint" // CreateEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -193,7 +193,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -300,7 +300,7 @@ const opCreateReplicationInstance = "CreateReplicationInstance" // CreateReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -408,7 +408,7 @@ const opCreateReplicationSubnetGroup = "CreateReplicationSubnetGroup" // CreateReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -503,7 +503,7 @@ const opCreateReplicationTask = "CreateReplicationTask" // CreateReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -598,7 +598,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -681,7 +681,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -767,7 +767,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -850,7 +850,7 @@ const opDeleteReplicationInstance = "DeleteReplicationInstance" // DeleteReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -936,7 +936,7 @@ const opDeleteReplicationSubnetGroup = "DeleteReplicationSubnetGroup" // DeleteReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1019,7 +1019,7 @@ const opDeleteReplicationTask = "DeleteReplicationTask" // DeleteReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1102,7 +1102,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1181,7 +1181,7 @@ const opDescribeCertificates = "DescribeCertificates" // DescribeCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1316,7 +1316,7 @@ const opDescribeConnections = "DescribeConnections" // DescribeConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1452,7 +1452,7 @@ const opDescribeEndpointTypes = "DescribeEndpointTypes" // DescribeEndpointTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpointTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1582,7 +1582,7 @@ const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1717,7 +1717,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1794,7 +1794,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1934,7 +1934,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2066,7 +2066,7 @@ const opDescribeOrderableReplicationInstances = "DescribeOrderableReplicationIns // DescribeOrderableReplicationInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableReplicationInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2197,7 +2197,7 @@ const opDescribeRefreshSchemasStatus = "DescribeRefreshSchemasStatus" // DescribeRefreshSchemasStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeRefreshSchemasStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2280,7 +2280,7 @@ const opDescribeReplicationInstanceTaskLogs = "DescribeReplicationInstanceTaskLo // DescribeReplicationInstanceTaskLogsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationInstanceTaskLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2419,7 +2419,7 @@ const opDescribeReplicationInstances = "DescribeReplicationInstances" // DescribeReplicationInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2555,7 +2555,7 @@ const opDescribeReplicationSubnetGroups = "DescribeReplicationSubnetGroups" // DescribeReplicationSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2690,7 +2690,7 @@ const opDescribeReplicationTaskAssessmentResults = "DescribeReplicationTaskAsses // DescribeReplicationTaskAssessmentResultsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationTaskAssessmentResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2826,7 +2826,7 @@ const opDescribeReplicationTasks = "DescribeReplicationTasks" // DescribeReplicationTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2962,7 +2962,7 @@ const opDescribeSchemas = "DescribeSchemas" // DescribeSchemasRequest generates a "aws/request.Request" representing the // client's request for the DescribeSchemas operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3101,7 +3101,7 @@ const opDescribeTableStatistics = "DescribeTableStatistics" // DescribeTableStatisticsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTableStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3245,7 +3245,7 @@ const opImportCertificate = "ImportCertificate" // ImportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3330,7 +3330,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3409,7 +3409,7 @@ const opModifyEndpoint = "ModifyEndpoint" // ModifyEndpointRequest generates a "aws/request.Request" representing the // client's request for the ModifyEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3501,7 +3501,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3589,7 +3589,7 @@ const opModifyReplicationInstance = "ModifyReplicationInstance" // ModifyReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3688,7 +3688,7 @@ const opModifyReplicationSubnetGroup = "ModifyReplicationSubnetGroup" // ModifyReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3783,7 +3783,7 @@ const opModifyReplicationTask = "ModifyReplicationTask" // ModifyReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3878,7 +3878,7 @@ const opRebootReplicationInstance = "RebootReplicationInstance" // RebootReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3962,7 +3962,7 @@ const opRefreshSchemas = "RefreshSchemas" // RefreshSchemasRequest generates a "aws/request.Request" representing the // client's request for the RefreshSchemas operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4053,7 +4053,7 @@ const opReloadTables = "ReloadTables" // ReloadTablesRequest generates a "aws/request.Request" representing the // client's request for the ReloadTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4136,7 +4136,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4215,7 +4215,7 @@ const opStartReplicationTask = "StartReplicationTask" // StartReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the StartReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4304,7 +4304,7 @@ const opStartReplicationTaskAssessment = "StartReplicationTaskAssessment" // StartReplicationTaskAssessmentRequest generates a "aws/request.Request" representing the // client's request for the StartReplicationTaskAssessment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4388,7 +4388,7 @@ const opStopReplicationTask = "StopReplicationTask" // StopReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the StopReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4471,7 +4471,7 @@ const opTestConnection = "TestConnection" // TestConnectionRequest generates a "aws/request.Request" representing the // client's request for the TestConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go index 36f17484774..24426726a98 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go @@ -18,7 +18,7 @@ const opActivatePipeline = "ActivatePipeline" // ActivatePipelineRequest generates a "aws/request.Request" representing the // client's request for the ActivatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -116,7 +116,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -207,7 +207,7 @@ const opCreatePipeline = "CreatePipeline" // CreatePipelineRequest generates a "aws/request.Request" representing the // client's request for the CreatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -292,7 +292,7 @@ const opDeactivatePipeline = "DeactivatePipeline" // DeactivatePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeactivatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -388,7 +388,7 @@ const opDeletePipeline = "DeletePipeline" // DeletePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeletePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -485,7 +485,7 @@ const opDescribeObjects = "DescribeObjects" // DescribeObjectsRequest generates a "aws/request.Request" representing the // client's request for the DescribeObjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -634,7 +634,7 @@ const opDescribePipelines = "DescribePipelines" // DescribePipelinesRequest generates a "aws/request.Request" representing the // client's request for the DescribePipelines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -733,7 +733,7 @@ const opEvaluateExpression = "EvaluateExpression" // EvaluateExpressionRequest generates a "aws/request.Request" representing the // client's request for the EvaluateExpression operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -829,7 +829,7 @@ const opGetPipelineDefinition = "GetPipelineDefinition" // GetPipelineDefinitionRequest generates a "aws/request.Request" representing the // client's request for the GetPipelineDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -921,7 +921,7 @@ const opListPipelines = "ListPipelines" // ListPipelinesRequest generates a "aws/request.Request" representing the // client's request for the ListPipelines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1062,7 +1062,7 @@ const opPollForTask = "PollForTask" // PollForTaskRequest generates a "aws/request.Request" representing the // client's request for the PollForTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1162,7 +1162,7 @@ const opPutPipelineDefinition = "PutPipelineDefinition" // PutPipelineDefinitionRequest generates a "aws/request.Request" representing the // client's request for the PutPipelineDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1266,7 +1266,7 @@ const opQueryObjects = "QueryObjects" // QueryObjectsRequest generates a "aws/request.Request" representing the // client's request for the QueryObjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1414,7 +1414,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1505,7 +1505,7 @@ const opReportTaskProgress = "ReportTaskProgress" // ReportTaskProgressRequest generates a "aws/request.Request" representing the // client's request for the ReportTaskProgress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1610,7 +1610,7 @@ const opReportTaskRunnerHeartbeat = "ReportTaskRunnerHeartbeat" // ReportTaskRunnerHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the ReportTaskRunnerHeartbeat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1698,7 +1698,7 @@ const opSetStatus = "SetStatus" // SetStatusRequest generates a "aws/request.Request" representing the // client's request for the SetStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1795,7 +1795,7 @@ const opSetTaskStatus = "SetTaskStatus" // SetTaskStatusRequest generates a "aws/request.Request" representing the // client's request for the SetTaskStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1893,7 +1893,7 @@ const opValidatePipelineDefinition = "ValidatePipelineDefinition" // ValidatePipelineDefinitionRequest generates a "aws/request.Request" representing the // client's request for the ValidatePipelineDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go index 73ae665e4f8..4b836d462bd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go @@ -15,7 +15,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -135,7 +135,7 @@ const opCreateParameterGroup = "CreateParameterGroup" // CreateParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -229,7 +229,7 @@ const opCreateSubnetGroup = "CreateSubnetGroup" // CreateSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -321,7 +321,7 @@ const opDecreaseReplicationFactor = "DecreaseReplicationFactor" // DecreaseReplicationFactorRequest generates a "aws/request.Request" representing the // client's request for the DecreaseReplicationFactor operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -417,7 +417,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -510,7 +510,7 @@ const opDeleteParameterGroup = "DeleteParameterGroup" // DeleteParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -601,7 +601,7 @@ const opDeleteSubnetGroup = "DeleteSubnetGroup" // DeleteSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -687,7 +687,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -790,7 +790,7 @@ const opDescribeDefaultParameters = "DescribeDefaultParameters" // DescribeDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -874,7 +874,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -963,7 +963,7 @@ const opDescribeParameterGroups = "DescribeParameterGroups" // DescribeParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1051,7 +1051,7 @@ const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1138,7 +1138,7 @@ const opDescribeSubnetGroups = "DescribeSubnetGroups" // DescribeSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1220,7 +1220,7 @@ const opIncreaseReplicationFactor = "IncreaseReplicationFactor" // IncreaseReplicationFactorRequest generates a "aws/request.Request" representing the // client's request for the IncreaseReplicationFactor operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1323,7 +1323,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1417,7 +1417,7 @@ const opRebootNode = "RebootNode" // RebootNodeRequest generates a "aws/request.Request" representing the // client's request for the RebootNode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1511,7 +1511,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1608,7 +1608,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1705,7 +1705,7 @@ const opUpdateCluster = "UpdateCluster" // UpdateClusterRequest generates a "aws/request.Request" representing the // client's request for the UpdateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1803,7 +1803,7 @@ const opUpdateParameterGroup = "UpdateParameterGroup" // UpdateParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1894,7 +1894,7 @@ const opUpdateSubnetGroup = "UpdateSubnetGroup" // UpdateSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index 4d945c971b6..d293332b7c4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -15,7 +15,7 @@ const opCreateDevicePool = "CreateDevicePool" // CreateDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the CreateDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -103,7 +103,7 @@ const opCreateInstanceProfile = "CreateInstanceProfile" // CreateInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -192,7 +192,7 @@ const opCreateNetworkProfile = "CreateNetworkProfile" // CreateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -280,7 +280,7 @@ const opCreateProject = "CreateProject" // CreateProjectRequest generates a "aws/request.Request" representing the // client's request for the CreateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -368,7 +368,7 @@ const opCreateRemoteAccessSession = "CreateRemoteAccessSession" // CreateRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the CreateRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -456,7 +456,7 @@ const opCreateUpload = "CreateUpload" // CreateUploadRequest generates a "aws/request.Request" representing the // client's request for the CreateUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -544,7 +544,7 @@ const opCreateVPCEConfiguration = "CreateVPCEConfiguration" // CreateVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -630,7 +630,7 @@ const opDeleteDevicePool = "DeleteDevicePool" // DeleteDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -719,7 +719,7 @@ const opDeleteInstanceProfile = "DeleteInstanceProfile" // DeleteInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -807,7 +807,7 @@ const opDeleteNetworkProfile = "DeleteNetworkProfile" // DeleteNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -895,7 +895,7 @@ const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -985,7 +985,7 @@ const opDeleteRemoteAccessSession = "DeleteRemoteAccessSession" // DeleteRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the DeleteRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1073,7 +1073,7 @@ const opDeleteRun = "DeleteRun" // DeleteRunRequest generates a "aws/request.Request" representing the // client's request for the DeleteRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1163,7 +1163,7 @@ const opDeleteUpload = "DeleteUpload" // DeleteUploadRequest generates a "aws/request.Request" representing the // client's request for the DeleteUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1251,7 +1251,7 @@ const opDeleteVPCEConfiguration = "DeleteVPCEConfiguration" // DeleteVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1340,7 +1340,7 @@ const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1429,7 +1429,7 @@ const opGetDevice = "GetDevice" // GetDeviceRequest generates a "aws/request.Request" representing the // client's request for the GetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1517,7 +1517,7 @@ const opGetDeviceInstance = "GetDeviceInstance" // GetDeviceInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeviceInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1606,7 +1606,7 @@ const opGetDevicePool = "GetDevicePool" // GetDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the GetDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1694,7 +1694,7 @@ const opGetDevicePoolCompatibility = "GetDevicePoolCompatibility" // GetDevicePoolCompatibilityRequest generates a "aws/request.Request" representing the // client's request for the GetDevicePoolCompatibility operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1782,7 +1782,7 @@ const opGetInstanceProfile = "GetInstanceProfile" // GetInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1870,7 +1870,7 @@ const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1958,7 +1958,7 @@ const opGetNetworkProfile = "GetNetworkProfile" // GetNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the GetNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2046,7 +2046,7 @@ const opGetOfferingStatus = "GetOfferingStatus" // GetOfferingStatusRequest generates a "aws/request.Request" representing the // client's request for the GetOfferingStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2199,7 +2199,7 @@ const opGetProject = "GetProject" // GetProjectRequest generates a "aws/request.Request" representing the // client's request for the GetProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2287,7 +2287,7 @@ const opGetRemoteAccessSession = "GetRemoteAccessSession" // GetRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the GetRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2375,7 +2375,7 @@ const opGetRun = "GetRun" // GetRunRequest generates a "aws/request.Request" representing the // client's request for the GetRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2463,7 +2463,7 @@ const opGetSuite = "GetSuite" // GetSuiteRequest generates a "aws/request.Request" representing the // client's request for the GetSuite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2551,7 +2551,7 @@ const opGetTest = "GetTest" // GetTestRequest generates a "aws/request.Request" representing the // client's request for the GetTest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2639,7 +2639,7 @@ const opGetUpload = "GetUpload" // GetUploadRequest generates a "aws/request.Request" representing the // client's request for the GetUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2727,7 +2727,7 @@ const opGetVPCEConfiguration = "GetVPCEConfiguration" // GetVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2813,7 +2813,7 @@ const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" // InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the InstallToRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2903,7 +2903,7 @@ const opListArtifacts = "ListArtifacts" // ListArtifactsRequest generates a "aws/request.Request" representing the // client's request for the ListArtifacts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3047,7 +3047,7 @@ const opListDeviceInstances = "ListDeviceInstances" // ListDeviceInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListDeviceInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3136,7 +3136,7 @@ const opListDevicePools = "ListDevicePools" // ListDevicePoolsRequest generates a "aws/request.Request" representing the // client's request for the ListDevicePools operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3280,7 +3280,7 @@ const opListDevices = "ListDevices" // ListDevicesRequest generates a "aws/request.Request" representing the // client's request for the ListDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3424,7 +3424,7 @@ const opListInstanceProfiles = "ListInstanceProfiles" // ListInstanceProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3512,7 +3512,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3656,7 +3656,7 @@ const opListNetworkProfiles = "ListNetworkProfiles" // ListNetworkProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListNetworkProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3744,7 +3744,7 @@ const opListOfferingPromotions = "ListOfferingPromotions" // ListOfferingPromotionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingPromotions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3840,7 +3840,7 @@ const opListOfferingTransactions = "ListOfferingTransactions" // ListOfferingTransactionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingTransactions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3993,7 +3993,7 @@ const opListOfferings = "ListOfferings" // ListOfferingsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4146,7 +4146,7 @@ const opListProjects = "ListProjects" // ListProjectsRequest generates a "aws/request.Request" representing the // client's request for the ListProjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4290,7 +4290,7 @@ const opListRemoteAccessSessions = "ListRemoteAccessSessions" // ListRemoteAccessSessionsRequest generates a "aws/request.Request" representing the // client's request for the ListRemoteAccessSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4378,7 +4378,7 @@ const opListRuns = "ListRuns" // ListRunsRequest generates a "aws/request.Request" representing the // client's request for the ListRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4522,7 +4522,7 @@ const opListSamples = "ListSamples" // ListSamplesRequest generates a "aws/request.Request" representing the // client's request for the ListSamples operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4666,7 +4666,7 @@ const opListSuites = "ListSuites" // ListSuitesRequest generates a "aws/request.Request" representing the // client's request for the ListSuites operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4810,7 +4810,7 @@ const opListTests = "ListTests" // ListTestsRequest generates a "aws/request.Request" representing the // client's request for the ListTests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4954,7 +4954,7 @@ const opListUniqueProblems = "ListUniqueProblems" // ListUniqueProblemsRequest generates a "aws/request.Request" representing the // client's request for the ListUniqueProblems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5098,7 +5098,7 @@ const opListUploads = "ListUploads" // ListUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListUploads operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5242,7 +5242,7 @@ const opListVPCEConfigurations = "ListVPCEConfigurations" // ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListVPCEConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5325,7 +5325,7 @@ const opPurchaseOffering = "PurchaseOffering" // PurchaseOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5422,7 +5422,7 @@ const opRenewOffering = "RenewOffering" // RenewOfferingRequest generates a "aws/request.Request" representing the // client's request for the RenewOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5518,7 +5518,7 @@ const opScheduleRun = "ScheduleRun" // ScheduleRunRequest generates a "aws/request.Request" representing the // client's request for the ScheduleRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5609,7 +5609,7 @@ const opStopJob = "StopJob" // StopJobRequest generates a "aws/request.Request" representing the // client's request for the StopJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5702,7 +5702,7 @@ const opStopRemoteAccessSession = "StopRemoteAccessSession" // StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the StopRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5790,7 +5790,7 @@ const opStopRun = "StopRun" // StopRunRequest generates a "aws/request.Request" representing the // client's request for the StopRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5883,7 +5883,7 @@ const opUpdateDeviceInstance = "UpdateDeviceInstance" // UpdateDeviceInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeviceInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5971,7 +5971,7 @@ const opUpdateDevicePool = "UpdateDevicePool" // UpdateDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6061,7 +6061,7 @@ const opUpdateInstanceProfile = "UpdateInstanceProfile" // UpdateInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6149,7 +6149,7 @@ const opUpdateNetworkProfile = "UpdateNetworkProfile" // UpdateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6237,7 +6237,7 @@ const opUpdateProject = "UpdateProject" // UpdateProjectRequest generates a "aws/request.Request" representing the // client's request for the UpdateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6325,7 +6325,7 @@ const opUpdateUpload = "UpdateUpload" // UpdateUploadRequest generates a "aws/request.Request" representing the // client's request for the UpdateUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6413,7 +6413,7 @@ const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" // UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go index 779e1409210..cfb3454eed3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go @@ -16,7 +16,7 @@ const opAllocateConnectionOnInterconnect = "AllocateConnectionOnInterconnect" // AllocateConnectionOnInterconnectRequest generates a "aws/request.Request" representing the // client's request for the AllocateConnectionOnInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -60,14 +60,14 @@ func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateC // AllocateConnectionOnInterconnect API operation for AWS Direct Connect. // -// Deprecated in favor of AllocateHostedConnection. +// Deprecated. Use AllocateHostedConnection instead. // // Creates a hosted connection on an interconnect. // // Allocates a VLAN number and a specified amount of bandwidth for use by a -// hosted connection on the given interconnect. +// hosted connection on the specified interconnect. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -78,12 +78,10 @@ func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateC // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect // @@ -116,7 +114,7 @@ const opAllocateHostedConnection = "AllocateHostedConnection" // AllocateHostedConnectionRequest generates a "aws/request.Request" representing the // client's request for the AllocateHostedConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -155,13 +153,13 @@ func (c *DirectConnect) AllocateHostedConnectionRequest(input *AllocateHostedCon // AllocateHostedConnection API operation for AWS Direct Connect. // -// Creates a hosted connection on an interconnect or a link aggregation group -// (LAG). +// Creates a hosted connection on the specified interconnect or a link aggregation +// group (LAG). // // Allocates a VLAN number and a specified amount of bandwidth for use by a -// hosted connection on the given interconnect or LAG. +// hosted connection on the specified interconnect or LAG. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -172,12 +170,10 @@ func (c *DirectConnect) AllocateHostedConnectionRequest(input *AllocateHostedCon // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateHostedConnection func (c *DirectConnect) AllocateHostedConnection(input *AllocateHostedConnectionInput) (*Connection, error) { @@ -206,7 +202,7 @@ const opAllocatePrivateVirtualInterface = "AllocatePrivateVirtualInterface" // AllocatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AllocatePrivateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -245,12 +241,11 @@ func (c *DirectConnect) AllocatePrivateVirtualInterfaceRequest(input *AllocatePr // AllocatePrivateVirtualInterface API operation for AWS Direct Connect. // -// Provisions a private virtual interface to be owned by another AWS customer. +// Provisions a private virtual interface to be owned by the specified AWS account. // -// Virtual interfaces created using this action must be confirmed by the virtual -// interface owner by using the ConfirmPrivateVirtualInterface action. Until -// then, the virtual interface will be in 'Confirming' state, and will not be -// available for handling traffic. +// Virtual interfaces created using this action must be confirmed by the owner +// using ConfirmPrivateVirtualInterface. Until then, the virtual interface is +// in the Confirming state and is not available to handle traffic. // // 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 @@ -261,12 +256,10 @@ func (c *DirectConnect) AllocatePrivateVirtualInterfaceRequest(input *AllocatePr // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePrivateVirtualInterface func (c *DirectConnect) AllocatePrivateVirtualInterface(input *AllocatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { @@ -295,7 +288,7 @@ const opAllocatePublicVirtualInterface = "AllocatePublicVirtualInterface" // AllocatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AllocatePublicVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -334,19 +327,19 @@ func (c *DirectConnect) AllocatePublicVirtualInterfaceRequest(input *AllocatePub // AllocatePublicVirtualInterface API operation for AWS Direct Connect. // -// Provisions a public virtual interface to be owned by a different customer. +// Provisions a public virtual interface to be owned by the specified AWS account. // // The owner of a connection calls this function to provision a public virtual -// interface which will be owned by another AWS customer. +// interface to be owned by the specified AWS account. // -// Virtual interfaces created using this function must be confirmed by the virtual -// interface owner by calling ConfirmPublicVirtualInterface. Until this step -// has been completed, the virtual interface will be in 'Confirming' state, -// and will not be available for handling traffic. +// Virtual interfaces created using this function must be confirmed by the owner +// using ConfirmPublicVirtualInterface. Until this step has been completed, +// the virtual interface is in the confirming state and is not available to +// handle traffic. // -// When creating an IPv6 public virtual interface (addressFamily is 'ipv6'), -// the customer and amazon address fields should be left blank to use auto-assigned -// IPv6 space. Custom IPv6 Addresses are currently not supported. +// When creating an IPv6 public virtual interface, omit the Amazon address and +// customer address. IPv6 addresses are automatically assigned from the Amazon +// pool of IPv6 addresses; you cannot specify custom IPv6 addresses. // // 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 @@ -357,12 +350,10 @@ func (c *DirectConnect) AllocatePublicVirtualInterfaceRequest(input *AllocatePub // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePublicVirtualInterface func (c *DirectConnect) AllocatePublicVirtualInterface(input *AllocatePublicVirtualInterfaceInput) (*VirtualInterface, error) { @@ -391,7 +382,7 @@ const opAssociateConnectionWithLag = "AssociateConnectionWithLag" // AssociateConnectionWithLagRequest generates a "aws/request.Request" representing the // client's request for the AssociateConnectionWithLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -432,12 +423,12 @@ func (c *DirectConnect) AssociateConnectionWithLagRequest(input *AssociateConnec // // Associates an existing connection with a link aggregation group (LAG). The // connection is interrupted and re-established as a member of the LAG (connectivity -// to AWS will be interrupted). The connection must be hosted on the same AWS -// Direct Connect endpoint as the LAG, and its bandwidth must match the bandwidth -// for the LAG. You can reassociate a connection that's currently associated -// with a different LAG; however, if removing the connection will cause the -// original LAG to fall below its setting for minimum number of operational -// connections, the request fails. +// to AWS is interrupted). The connection must be hosted on the same AWS Direct +// Connect endpoint as the LAG, and its bandwidth must match the bandwidth for +// the LAG. You can re-associate a connection that's currently associated with +// a different LAG; however, if removing the connection would cause the original +// LAG to fall below its setting for minimum number of operational connections, +// the request fails. // // Any virtual interfaces that are directly associated with the connection are // automatically re-associated with the LAG. If the connection was originally @@ -457,12 +448,10 @@ func (c *DirectConnect) AssociateConnectionWithLagRequest(input *AssociateConnec // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateConnectionWithLag func (c *DirectConnect) AssociateConnectionWithLag(input *AssociateConnectionWithLagInput) (*Connection, error) { @@ -491,7 +480,7 @@ const opAssociateHostedConnection = "AssociateHostedConnection" // AssociateHostedConnectionRequest generates a "aws/request.Request" representing the // client's request for the AssociateHostedConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -536,7 +525,7 @@ func (c *DirectConnect) AssociateHostedConnectionRequest(input *AssociateHostedC // fails. This action temporarily interrupts the hosted connection's connectivity // to AWS as it is being migrated. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -547,12 +536,10 @@ func (c *DirectConnect) AssociateHostedConnectionRequest(input *AssociateHostedC // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateHostedConnection func (c *DirectConnect) AssociateHostedConnection(input *AssociateHostedConnectionInput) (*Connection, error) { @@ -581,7 +568,7 @@ const opAssociateVirtualInterface = "AssociateVirtualInterface" // AssociateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AssociateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -630,11 +617,10 @@ func (c *DirectConnect) AssociateVirtualInterfaceRequest(input *AssociateVirtual // with a LAG; hosted connections must be migrated along with their virtual // interfaces using AssociateHostedConnection. // -// In order to reassociate a virtual interface to a new connection or LAG, the -// requester must own either the virtual interface itself or the connection -// to which the virtual interface is currently associated. Additionally, the -// requester must own the connection or LAG to which the virtual interface will -// be newly associated. +// To reassociate a virtual interface to a new connection or LAG, the requester +// must own either the virtual interface itself or the connection to which the +// virtual interface is currently associated. Additionally, the requester must +// own the connection or LAG for the association. // // 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 @@ -645,12 +631,10 @@ func (c *DirectConnect) AssociateVirtualInterfaceRequest(input *AssociateVirtual // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateVirtualInterface func (c *DirectConnect) AssociateVirtualInterface(input *AssociateVirtualInterfaceInput) (*VirtualInterface, error) { @@ -679,7 +663,7 @@ const opConfirmConnection = "ConfirmConnection" // ConfirmConnectionRequest generates a "aws/request.Request" representing the // client's request for the ConfirmConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -718,11 +702,11 @@ func (c *DirectConnect) ConfirmConnectionRequest(input *ConfirmConnectionInput) // ConfirmConnection API operation for AWS Direct Connect. // -// Confirm the creation of a hosted connection on an interconnect. +// Confirms the creation of the specified hosted connection on an interconnect. // -// Upon creation, the hosted connection is initially in the 'Ordering' state, -// and will remain in this state until the owner calls ConfirmConnection to -// confirm creation of the hosted connection. +// Upon creation, the hosted connection is initially in the Ordering state, +// and remains in this state until the owner confirms creation of the hosted +// connection. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -733,12 +717,10 @@ func (c *DirectConnect) ConfirmConnectionRequest(input *ConfirmConnectionInput) // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnection func (c *DirectConnect) ConfirmConnection(input *ConfirmConnectionInput) (*ConfirmConnectionOutput, error) { @@ -767,7 +749,7 @@ const opConfirmPrivateVirtualInterface = "ConfirmPrivateVirtualInterface" // ConfirmPrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmPrivateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -806,11 +788,11 @@ func (c *DirectConnect) ConfirmPrivateVirtualInterfaceRequest(input *ConfirmPriv // ConfirmPrivateVirtualInterface API operation for AWS Direct Connect. // -// Accept ownership of a private virtual interface created by another customer. +// Accepts ownership of a private virtual interface created by another AWS account. // -// After the virtual interface owner calls this function, the virtual interface -// will be created and attached to the given virtual private gateway or direct -// connect gateway, and will be available for handling traffic. +// After the virtual interface owner makes this call, the virtual interface +// is created and attached to the specified virtual private gateway or Direct +// Connect gateway, and is made available to handle traffic. // // 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 @@ -821,12 +803,10 @@ func (c *DirectConnect) ConfirmPrivateVirtualInterfaceRequest(input *ConfirmPriv // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterface func (c *DirectConnect) ConfirmPrivateVirtualInterface(input *ConfirmPrivateVirtualInterfaceInput) (*ConfirmPrivateVirtualInterfaceOutput, error) { @@ -855,7 +835,7 @@ const opConfirmPublicVirtualInterface = "ConfirmPublicVirtualInterface" // ConfirmPublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmPublicVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -894,10 +874,10 @@ func (c *DirectConnect) ConfirmPublicVirtualInterfaceRequest(input *ConfirmPubli // ConfirmPublicVirtualInterface API operation for AWS Direct Connect. // -// Accept ownership of a public virtual interface created by another customer. +// Accepts ownership of a public virtual interface created by another AWS account. // -// After the virtual interface owner calls this function, the specified virtual -// interface will be created and made available for handling traffic. +// After the virtual interface owner makes this call, the specified virtual +// interface is created and made available to handle traffic. // // 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 @@ -908,12 +888,10 @@ func (c *DirectConnect) ConfirmPublicVirtualInterfaceRequest(input *ConfirmPubli // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterface func (c *DirectConnect) ConfirmPublicVirtualInterface(input *ConfirmPublicVirtualInterfaceInput) (*ConfirmPublicVirtualInterfaceOutput, error) { @@ -942,7 +920,7 @@ const opCreateBGPPeer = "CreateBGPPeer" // CreateBGPPeerRequest generates a "aws/request.Request" representing the // client's request for the CreateBGPPeer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -981,16 +959,17 @@ func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *re // CreateBGPPeer API operation for AWS Direct Connect. // -// Creates a new BGP peer on a specified virtual interface. The BGP peer cannot -// be in the same address family (IPv4/IPv6) of an existing BGP peer on the -// virtual interface. +// Creates a BGP peer on the specified virtual interface. +// +// The BGP peer cannot be in the same address family (IPv4/IPv6) of an existing +// BGP peer on the virtual interface. // // You must create a BGP peer for the corresponding address family in order // to access AWS resources that also use that address family. // -// When creating a IPv6 BGP peer, the Amazon address and customer address fields -// must be left blank. IPv6 addresses are automatically assigned from Amazon's -// pool of IPv6 addresses; you cannot specify custom IPv6 addresses. +// When creating a IPv6 BGP peer, omit the Amazon address and customer address. +// IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; +// you cannot specify custom IPv6 addresses. // // For a public virtual interface, the Autonomous System Number (ASN) must be // private or already whitelisted for the virtual interface. @@ -1004,12 +983,10 @@ func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeer func (c *DirectConnect) CreateBGPPeer(input *CreateBGPPeerInput) (*CreateBGPPeerOutput, error) { @@ -1038,7 +1015,7 @@ const opCreateConnection = "CreateConnection" // CreateConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1077,24 +1054,20 @@ func (c *DirectConnect) CreateConnectionRequest(input *CreateConnectionInput) (r // CreateConnection API operation for AWS Direct Connect. // -// Creates a new connection between the customer network and a specific AWS -// Direct Connect location. +// Creates a connection between a customer network and a specific AWS Direct +// Connect location. // // A connection links your internal network to an AWS Direct Connect location -// over a standard 1 gigabit or 10 gigabit Ethernet fiber-optic cable. One end -// of the cable is connected to your router, the other to an AWS Direct Connect -// router. An AWS Direct Connect location provides access to Amazon Web Services -// in the region it is associated with. You can establish connections with AWS -// Direct Connect locations in multiple regions, but a connection in one region -// does not provide connectivity to other regions. +// over a standard Ethernet fiber-optic cable. One end of the cable is connected +// to your router, the other to an AWS Direct Connect router. // -// To find the locations for your region, use DescribeLocations. +// To find the locations for your Region, use DescribeLocations. // // You can automatically add the new connection to a link aggregation group // (LAG) by specifying a LAG ID in the request. This ensures that the new connection // is allocated on the same AWS Direct Connect endpoint that hosts the specified // LAG. If there are no available ports on the endpoint, the request fails and -// no connection will be created. +// no connection is created. // // 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 @@ -1105,12 +1078,10 @@ func (c *DirectConnect) CreateConnectionRequest(input *CreateConnectionInput) (r // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateConnection func (c *DirectConnect) CreateConnection(input *CreateConnectionInput) (*Connection, error) { @@ -1139,7 +1110,7 @@ const opCreateDirectConnectGateway = "CreateDirectConnectGateway" // CreateDirectConnectGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectConnectGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1178,14 +1149,13 @@ func (c *DirectConnect) CreateDirectConnectGatewayRequest(input *CreateDirectCon // CreateDirectConnectGateway API operation for AWS Direct Connect. // -// Creates a new direct connect gateway. A direct connect gateway is an intermediate -// object that enables you to connect a set of virtual interfaces and virtual -// private gateways. direct connect gateways are global and visible in any AWS -// region after they are created. The virtual interfaces and virtual private -// gateways that are connected through a direct connect gateway can be in different -// regions. This enables you to connect to a VPC in any region, regardless of -// the region in which the virtual interfaces are located, and pass traffic -// between them. +// Creates a Direct Connect gateway, which is an intermediate object that enables +// you to connect a set of virtual interfaces and virtual private gateways. +// A Direct Connect gateway is global and visible in any AWS Region after it +// is created. The virtual interfaces and virtual private gateways that are +// connected through a Direct Connect gateway can be in different AWS Regions. +// This enables you to connect to a VPC in any Region, regardless of the Region +// in which the virtual interfaces are located, and pass traffic between them. // // 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 @@ -1196,12 +1166,10 @@ func (c *DirectConnect) CreateDirectConnectGatewayRequest(input *CreateDirectCon // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGateway func (c *DirectConnect) CreateDirectConnectGateway(input *CreateDirectConnectGatewayInput) (*CreateDirectConnectGatewayOutput, error) { @@ -1230,7 +1198,7 @@ const opCreateDirectConnectGatewayAssociation = "CreateDirectConnectGatewayAssoc // CreateDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectConnectGatewayAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1269,9 +1237,9 @@ func (c *DirectConnect) CreateDirectConnectGatewayAssociationRequest(input *Crea // CreateDirectConnectGatewayAssociation API operation for AWS Direct Connect. // -// Creates an association between a direct connect gateway and a virtual private -// gateway (VGW). The VGW must be attached to a VPC and must not be associated -// with another direct connect gateway. +// Creates an association between a Direct Connect gateway and a virtual private +// gateway. The virtual private gateway must be attached to a VPC and must not +// be associated with another Direct Connect gateway. // // 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 @@ -1282,12 +1250,10 @@ func (c *DirectConnect) CreateDirectConnectGatewayAssociationRequest(input *Crea // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociation func (c *DirectConnect) CreateDirectConnectGatewayAssociation(input *CreateDirectConnectGatewayAssociationInput) (*CreateDirectConnectGatewayAssociationOutput, error) { @@ -1316,7 +1282,7 @@ const opCreateInterconnect = "CreateInterconnect" // CreateInterconnectRequest generates a "aws/request.Request" representing the // client's request for the CreateInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1355,30 +1321,29 @@ func (c *DirectConnect) CreateInterconnectRequest(input *CreateInterconnectInput // CreateInterconnect API operation for AWS Direct Connect. // -// Creates a new interconnect between a AWS Direct Connect partner's network -// and a specific AWS Direct Connect location. +// Creates an interconnect between an AWS Direct Connect partner's network and +// a specific AWS Direct Connect location. // // An interconnect is a connection which is capable of hosting other connections. -// The AWS Direct Connect partner can use an interconnect to provide sub-1Gbps -// AWS Direct Connect service to tier 2 customers who do not have their own -// connections. Like a standard connection, an interconnect links the AWS Direct -// Connect partner's network to an AWS Direct Connect location over a standard -// 1 Gbps or 10 Gbps Ethernet fiber-optic cable. One end is connected to the -// partner's router, the other to an AWS Direct Connect router. +// The partner can use an interconnect to provide sub-1Gbps AWS Direct Connect +// service to tier 2 customers who do not have their own connections. Like a +// standard connection, an interconnect links the partner's network to an AWS +// Direct Connect location over a standard Ethernet fiber-optic cable. One end +// is connected to the partner's router, the other to an AWS Direct Connect +// router. // // You can automatically add the new interconnect to a link aggregation group // (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect // is allocated on the same AWS Direct Connect endpoint that hosts the specified // LAG. If there are no available ports on the endpoint, the request fails and -// no interconnect will be created. +// no interconnect is created. // // For each end customer, the AWS Direct Connect partner provisions a connection // on their interconnect by calling AllocateConnectionOnInterconnect. The end // customer can then connect to AWS resources by creating a virtual interface -// on their connection, using the VLAN assigned to them by the AWS Direct Connect -// partner. +// on their connection, using the VLAN assigned to them by the partner. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -1389,12 +1354,10 @@ func (c *DirectConnect) CreateInterconnectRequest(input *CreateInterconnectInput // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateInterconnect func (c *DirectConnect) CreateInterconnect(input *CreateInterconnectInput) (*Interconnect, error) { @@ -1423,7 +1386,7 @@ const opCreateLag = "CreateLag" // CreateLagRequest generates a "aws/request.Request" representing the // client's request for the CreateLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1462,14 +1425,14 @@ func (c *DirectConnect) CreateLagRequest(input *CreateLagInput) (req *request.Re // CreateLag API operation for AWS Direct Connect. // -// Creates a new link aggregation group (LAG) with the specified number of bundled +// Creates a link aggregation group (LAG) with the specified number of bundled // physical connections between the customer network and a specific AWS Direct // Connect location. A LAG is a logical interface that uses the Link Aggregation -// Control Protocol (LACP) to aggregate multiple 1 gigabit or 10 gigabit interfaces, -// allowing you to treat them as a single interface. +// Control Protocol (LACP) to aggregate multiple interfaces, enabling you to +// treat them as a single interface. // -// All connections in a LAG must use the same bandwidth (for example, 10 Gbps), -// and must terminate at the same AWS Direct Connect endpoint. +// All connections in a LAG must use the same bandwidth and must terminate at +// the same AWS Direct Connect endpoint. // // You can have up to 10 connections per LAG. Regardless of this limit, if you // request more connections for the LAG than AWS Direct Connect can allocate @@ -1497,12 +1460,10 @@ func (c *DirectConnect) CreateLagRequest(input *CreateLagInput) (req *request.Re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateLag func (c *DirectConnect) CreateLag(input *CreateLagInput) (*Lag, error) { @@ -1531,7 +1492,7 @@ const opCreatePrivateVirtualInterface = "CreatePrivateVirtualInterface" // CreatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePrivateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1570,9 +1531,13 @@ func (c *DirectConnect) CreatePrivateVirtualInterfaceRequest(input *CreatePrivat // CreatePrivateVirtualInterface API operation for AWS Direct Connect. // -// Creates a new private virtual interface. A virtual interface is the VLAN -// that transports AWS Direct Connect traffic. A private virtual interface supports -// sending traffic to a single virtual private cloud (VPC). +// Creates a private virtual interface. A virtual interface is the VLAN that +// transports AWS Direct Connect traffic. A private virtual interface can be +// connected to either a Direct Connect gateway or a Virtual Private Gateway +// (VGW). Connecting the private virtual interface to a Direct Connect gateway +// enables the possibility for connecting to multiple VPCs, including VPCs in +// different AWS Regions. Connecting the private virtual interface to a VGW +// only provides access to a single VPC within the same Region. // // 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 @@ -1583,12 +1548,10 @@ func (c *DirectConnect) CreatePrivateVirtualInterfaceRequest(input *CreatePrivat // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePrivateVirtualInterface func (c *DirectConnect) CreatePrivateVirtualInterface(input *CreatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { @@ -1617,7 +1580,7 @@ const opCreatePublicVirtualInterface = "CreatePublicVirtualInterface" // CreatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1656,14 +1619,13 @@ func (c *DirectConnect) CreatePublicVirtualInterfaceRequest(input *CreatePublicV // CreatePublicVirtualInterface API operation for AWS Direct Connect. // -// Creates a new public virtual interface. A virtual interface is the VLAN that +// Creates a public virtual interface. A virtual interface is the VLAN that // transports AWS Direct Connect traffic. A public virtual interface supports -// sending traffic to public services of AWS such as Amazon Simple Storage Service -// (Amazon S3). +// sending traffic to public services of AWS such as Amazon S3. // -// When creating an IPv6 public virtual interface (addressFamily is 'ipv6'), -// the customer and amazon address fields should be left blank to use auto-assigned -// IPv6 space. Custom IPv6 Addresses are currently not supported. +// When creating an IPv6 public virtual interface (addressFamily is ipv6), leave +// the customer and amazon address fields blank to use auto-assigned IPv6 space. +// Custom IPv6 addresses are not supported. // // 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 @@ -1674,12 +1636,10 @@ func (c *DirectConnect) CreatePublicVirtualInterfaceRequest(input *CreatePublicV // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePublicVirtualInterface func (c *DirectConnect) CreatePublicVirtualInterface(input *CreatePublicVirtualInterfaceInput) (*VirtualInterface, error) { @@ -1708,7 +1668,7 @@ const opDeleteBGPPeer = "DeleteBGPPeer" // DeleteBGPPeerRequest generates a "aws/request.Request" representing the // client's request for the DeleteBGPPeer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1747,9 +1707,10 @@ func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *re // DeleteBGPPeer API operation for AWS Direct Connect. // -// Deletes a BGP peer on the specified virtual interface that matches the specified -// customer address and ASN. You cannot delete the last BGP peer from a virtual -// interface. +// Deletes the BGP peer on the specified virtual interface with the specified +// customer address and ASN. +// +// You cannot delete the last BGP peer from a virtual interface. // // 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 @@ -1760,12 +1721,10 @@ func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeer func (c *DirectConnect) DeleteBGPPeer(input *DeleteBGPPeerInput) (*DeleteBGPPeerOutput, error) { @@ -1794,7 +1753,7 @@ const opDeleteConnection = "DeleteConnection" // DeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1833,12 +1792,12 @@ func (c *DirectConnect) DeleteConnectionRequest(input *DeleteConnectionInput) (r // DeleteConnection API operation for AWS Direct Connect. // -// Deletes the connection. +// Deletes the specified connection. // // Deleting a connection only stops the AWS Direct Connect port hour and data -// transfer charges. You need to cancel separately with the providers any services -// or charges for cross-connects or network circuits that connect you to the -// AWS Direct Connect location. +// transfer charges. If you are partnering with any third parties to connect +// with the AWS Direct Connect location, you must cancel your service with them +// separately. // // 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 @@ -1849,12 +1808,10 @@ func (c *DirectConnect) DeleteConnectionRequest(input *DeleteConnectionInput) (r // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteConnection func (c *DirectConnect) DeleteConnection(input *DeleteConnectionInput) (*Connection, error) { @@ -1883,7 +1840,7 @@ const opDeleteDirectConnectGateway = "DeleteDirectConnectGateway" // DeleteDirectConnectGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectConnectGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1922,9 +1879,10 @@ func (c *DirectConnect) DeleteDirectConnectGatewayRequest(input *DeleteDirectCon // DeleteDirectConnectGateway API operation for AWS Direct Connect. // -// Deletes a direct connect gateway. You must first delete all virtual interfaces -// that are attached to the direct connect gateway and disassociate all virtual -// private gateways that are associated with the direct connect gateway. +// Deletes the specified Direct Connect gateway. You must first delete all virtual +// interfaces that are attached to the Direct Connect gateway and disassociate +// all virtual private gateways that are associated with the Direct Connect +// gateway. // // 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 @@ -1935,12 +1893,10 @@ func (c *DirectConnect) DeleteDirectConnectGatewayRequest(input *DeleteDirectCon // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGateway func (c *DirectConnect) DeleteDirectConnectGateway(input *DeleteDirectConnectGatewayInput) (*DeleteDirectConnectGatewayOutput, error) { @@ -1969,7 +1925,7 @@ const opDeleteDirectConnectGatewayAssociation = "DeleteDirectConnectGatewayAssoc // DeleteDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectConnectGatewayAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2008,8 +1964,8 @@ func (c *DirectConnect) DeleteDirectConnectGatewayAssociationRequest(input *Dele // DeleteDirectConnectGatewayAssociation API operation for AWS Direct Connect. // -// Deletes the association between a direct connect gateway and a virtual private -// gateway. +// Deletes the association between the specified Direct Connect gateway and +// virtual private gateway. // // 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 @@ -2020,12 +1976,10 @@ func (c *DirectConnect) DeleteDirectConnectGatewayAssociationRequest(input *Dele // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociation func (c *DirectConnect) DeleteDirectConnectGatewayAssociation(input *DeleteDirectConnectGatewayAssociationInput) (*DeleteDirectConnectGatewayAssociationOutput, error) { @@ -2054,7 +2008,7 @@ const opDeleteInterconnect = "DeleteInterconnect" // DeleteInterconnectRequest generates a "aws/request.Request" representing the // client's request for the DeleteInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2095,7 +2049,7 @@ func (c *DirectConnect) DeleteInterconnectRequest(input *DeleteInterconnectInput // // Deletes the specified interconnect. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -2106,12 +2060,10 @@ func (c *DirectConnect) DeleteInterconnectRequest(input *DeleteInterconnectInput // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnect func (c *DirectConnect) DeleteInterconnect(input *DeleteInterconnectInput) (*DeleteInterconnectOutput, error) { @@ -2140,7 +2092,7 @@ const opDeleteLag = "DeleteLag" // DeleteLagRequest generates a "aws/request.Request" representing the // client's request for the DeleteLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2179,8 +2131,8 @@ func (c *DirectConnect) DeleteLagRequest(input *DeleteLagInput) (req *request.Re // DeleteLag API operation for AWS Direct Connect. // -// Deletes a link aggregation group (LAG). You cannot delete a LAG if it has -// active virtual interfaces or hosted connections. +// Deletes the specified link aggregation group (LAG). You cannot delete a LAG +// if it has active virtual interfaces or hosted connections. // // 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 @@ -2191,12 +2143,10 @@ func (c *DirectConnect) DeleteLagRequest(input *DeleteLagInput) (req *request.Re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteLag func (c *DirectConnect) DeleteLag(input *DeleteLagInput) (*Lag, error) { @@ -2225,7 +2175,7 @@ const opDeleteVirtualInterface = "DeleteVirtualInterface" // DeleteVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2275,12 +2225,10 @@ func (c *DirectConnect) DeleteVirtualInterfaceRequest(input *DeleteVirtualInterf // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterface func (c *DirectConnect) DeleteVirtualInterface(input *DeleteVirtualInterfaceInput) (*DeleteVirtualInterfaceOutput, error) { @@ -2309,7 +2257,7 @@ const opDescribeConnectionLoa = "DescribeConnectionLoa" // DescribeConnectionLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnectionLoa operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2353,15 +2301,15 @@ func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLo // DescribeConnectionLoa API operation for AWS Direct Connect. // -// Deprecated in favor of DescribeLoa. +// Deprecated. Use DescribeLoa instead. // -// Returns the LOA-CFA for a Connection. +// Gets the LOA-CFA for a connection. // // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is // a document that your APN partner or service provider uses when establishing // your cross connect to AWS at the colocation facility. For more information, // see Requesting Cross Connects at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect user guide. +// in the AWS Direct Connect User Guide. // // 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 @@ -2372,12 +2320,10 @@ func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLo // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa // @@ -2410,7 +2356,7 @@ const opDescribeConnections = "DescribeConnections" // DescribeConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2449,9 +2395,7 @@ func (c *DirectConnect) DescribeConnectionsRequest(input *DescribeConnectionsInp // DescribeConnections API operation for AWS Direct Connect. // -// Displays all connections in this region. -// -// If a connection ID is provided, the call returns only that particular connection. +// Displays the specified connection or all connections in this Region. // // 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 @@ -2462,12 +2406,10 @@ func (c *DirectConnect) DescribeConnectionsRequest(input *DescribeConnectionsInp // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnections func (c *DirectConnect) DescribeConnections(input *DescribeConnectionsInput) (*Connections, error) { @@ -2496,7 +2438,7 @@ const opDescribeConnectionsOnInterconnect = "DescribeConnectionsOnInterconnect" // DescribeConnectionsOnInterconnectRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnectionsOnInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2540,11 +2482,11 @@ func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *Describe // DescribeConnectionsOnInterconnect API operation for AWS Direct Connect. // -// Deprecated in favor of DescribeHostedConnections. +// Deprecated. Use DescribeHostedConnections instead. // -// Returns a list of connections that have been provisioned on the given interconnect. +// Lists the connections that have been provisioned on the specified interconnect. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -2555,12 +2497,10 @@ func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *Describe // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect // @@ -2593,7 +2533,7 @@ const opDescribeDirectConnectGatewayAssociations = "DescribeDirectConnectGateway // DescribeDirectConnectGatewayAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGatewayAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2632,13 +2572,14 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsRequest(input *D // DescribeDirectConnectGatewayAssociations API operation for AWS Direct Connect. // -// Returns a list of all direct connect gateway and virtual private gateway -// (VGW) associations. Either a direct connect gateway ID or a VGW ID must be -// provided in the request. If a direct connect gateway ID is provided, the -// response returns all VGWs associated with the direct connect gateway. If -// a VGW ID is provided, the response returns all direct connect gateways associated -// with the VGW. If both are provided, the response only returns the association -// that matches both the direct connect gateway and the VGW. +// Lists the associations between your Direct Connect gateways and virtual private +// gateways. You must specify a Direct Connect gateway, a virtual private gateway, +// or both. If you specify a Direct Connect gateway, the response contains all +// virtual private gateways associated with the Direct Connect gateway. If you +// specify a virtual private gateway, the response contains all Direct Connect +// gateways associated with the virtual private gateway. If you specify both, +// the response contains the association between the Direct Connect gateway +// and the virtual private gateway. // // 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 @@ -2649,12 +2590,10 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsRequest(input *D // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociations func (c *DirectConnect) DescribeDirectConnectGatewayAssociations(input *DescribeDirectConnectGatewayAssociationsInput) (*DescribeDirectConnectGatewayAssociationsOutput, error) { @@ -2683,7 +2622,7 @@ const opDescribeDirectConnectGatewayAttachments = "DescribeDirectConnectGatewayA // DescribeDirectConnectGatewayAttachmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGatewayAttachments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2722,13 +2661,13 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsRequest(input *De // DescribeDirectConnectGatewayAttachments API operation for AWS Direct Connect. // -// Returns a list of all direct connect gateway and virtual interface (VIF) -// attachments. Either a direct connect gateway ID or a VIF ID must be provided -// in the request. If a direct connect gateway ID is provided, the response -// returns all VIFs attached to the direct connect gateway. If a VIF ID is provided, -// the response returns all direct connect gateways attached to the VIF. If -// both are provided, the response only returns the attachment that matches -// both the direct connect gateway and the VIF. +// Lists the attachments between your Direct Connect gateways and virtual interfaces. +// You must specify a Direct Connect gateway, a virtual interface, or both. +// If you specify a Direct Connect gateway, the response contains all virtual +// interfaces attached to the Direct Connect gateway. If you specify a virtual +// interface, the response contains all Direct Connect gateways attached to +// the virtual interface. If you specify both, the response contains the attachment +// between the Direct Connect gateway and the virtual interface. // // 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 @@ -2739,12 +2678,10 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsRequest(input *De // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachments func (c *DirectConnect) DescribeDirectConnectGatewayAttachments(input *DescribeDirectConnectGatewayAttachmentsInput) (*DescribeDirectConnectGatewayAttachmentsOutput, error) { @@ -2773,7 +2710,7 @@ const opDescribeDirectConnectGateways = "DescribeDirectConnectGateways" // DescribeDirectConnectGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2812,11 +2749,8 @@ func (c *DirectConnect) DescribeDirectConnectGatewaysRequest(input *DescribeDire // DescribeDirectConnectGateways API operation for AWS Direct Connect. // -// Returns a list of direct connect gateways in your account. Deleted direct -// connect gateways are not returned. You can provide a direct connect gateway -// ID in the request to return information about the specific direct connect -// gateway only. Otherwise, if a direct connect gateway ID is not provided, -// information about all of your direct connect gateways is returned. +// Lists all your Direct Connect gateways or only the specified Direct Connect +// gateway. Deleted Direct Connect gateways are not returned. // // 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 @@ -2827,12 +2761,10 @@ func (c *DirectConnect) DescribeDirectConnectGatewaysRequest(input *DescribeDire // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGateways func (c *DirectConnect) DescribeDirectConnectGateways(input *DescribeDirectConnectGatewaysInput) (*DescribeDirectConnectGatewaysOutput, error) { @@ -2861,7 +2793,7 @@ const opDescribeHostedConnections = "DescribeHostedConnections" // DescribeHostedConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostedConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2900,10 +2832,10 @@ func (c *DirectConnect) DescribeHostedConnectionsRequest(input *DescribeHostedCo // DescribeHostedConnections API operation for AWS Direct Connect. // -// Returns a list of hosted connections that have been provisioned on the given +// Lists the hosted connections that have been provisioned on the specified // interconnect or link aggregation group (LAG). // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -2914,12 +2846,10 @@ func (c *DirectConnect) DescribeHostedConnectionsRequest(input *DescribeHostedCo // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeHostedConnections func (c *DirectConnect) DescribeHostedConnections(input *DescribeHostedConnectionsInput) (*Connections, error) { @@ -2948,7 +2878,7 @@ const opDescribeInterconnectLoa = "DescribeInterconnectLoa" // DescribeInterconnectLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeInterconnectLoa operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2992,15 +2922,15 @@ func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconne // DescribeInterconnectLoa API operation for AWS Direct Connect. // -// Deprecated in favor of DescribeLoa. +// Deprecated. Use DescribeLoa instead. // -// Returns the LOA-CFA for an Interconnect. +// Gets the LOA-CFA for the specified interconnect. // // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is // a document that is used when establishing your cross connect to AWS at the // colocation facility. For more information, see Requesting Cross Connects // at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect user guide. +// in the AWS Direct Connect User Guide. // // 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 @@ -3011,12 +2941,10 @@ func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconne // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa // @@ -3049,7 +2977,7 @@ const opDescribeInterconnects = "DescribeInterconnects" // DescribeInterconnectsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInterconnects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3088,9 +3016,7 @@ func (c *DirectConnect) DescribeInterconnectsRequest(input *DescribeInterconnect // DescribeInterconnects API operation for AWS Direct Connect. // -// Returns a list of interconnects owned by the AWS account. -// -// If an interconnect ID is provided, it will only return this particular interconnect. +// Lists the interconnects owned by the AWS account or only the specified interconnect. // // 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 @@ -3101,12 +3027,10 @@ func (c *DirectConnect) DescribeInterconnectsRequest(input *DescribeInterconnect // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnects func (c *DirectConnect) DescribeInterconnects(input *DescribeInterconnectsInput) (*DescribeInterconnectsOutput, error) { @@ -3135,7 +3059,7 @@ const opDescribeLags = "DescribeLags" // DescribeLagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3174,9 +3098,7 @@ func (c *DirectConnect) DescribeLagsRequest(input *DescribeLagsInput) (req *requ // DescribeLags API operation for AWS Direct Connect. // -// Describes the link aggregation groups (LAGs) in your account. -// -// If a LAG ID is provided, only information about the specified LAG is returned. +// Describes all your link aggregation groups (LAG) or the specified LAG. // // 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 @@ -3187,12 +3109,10 @@ func (c *DirectConnect) DescribeLagsRequest(input *DescribeLagsInput) (req *requ // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLags func (c *DirectConnect) DescribeLags(input *DescribeLagsInput) (*DescribeLagsOutput, error) { @@ -3221,7 +3141,7 @@ const opDescribeLoa = "DescribeLoa" // DescribeLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoa operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3260,14 +3180,14 @@ func (c *DirectConnect) DescribeLoaRequest(input *DescribeLoaInput) (req *reques // DescribeLoa API operation for AWS Direct Connect. // -// Returns the LOA-CFA for a connection, interconnect, or link aggregation group +// Gets the LOA-CFA for a connection, interconnect, or link aggregation group // (LAG). // // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is // a document that is used when establishing your cross connect to AWS at the // colocation facility. For more information, see Requesting Cross Connects // at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect user guide. +// in the AWS Direct Connect User Guide. // // 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 @@ -3278,12 +3198,10 @@ func (c *DirectConnect) DescribeLoaRequest(input *DescribeLoaInput) (req *reques // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLoa func (c *DirectConnect) DescribeLoa(input *DescribeLoaInput) (*Loa, error) { @@ -3312,7 +3230,7 @@ const opDescribeLocations = "DescribeLocations" // DescribeLocationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3351,9 +3269,8 @@ func (c *DirectConnect) DescribeLocationsRequest(input *DescribeLocationsInput) // DescribeLocations API operation for AWS Direct Connect. // -// Returns the list of AWS Direct Connect locations in the current AWS region. -// These are the locations that may be selected when calling CreateConnection -// or CreateInterconnect. +// Lists the AWS Direct Connect locations in the current AWS Region. These are +// the locations that can be selected when calling CreateConnection or CreateInterconnect. // // 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 @@ -3364,12 +3281,10 @@ func (c *DirectConnect) DescribeLocationsRequest(input *DescribeLocationsInput) // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLocations func (c *DirectConnect) DescribeLocations(input *DescribeLocationsInput) (*DescribeLocationsOutput, error) { @@ -3398,7 +3313,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3437,7 +3352,7 @@ func (c *DirectConnect) DescribeTagsRequest(input *DescribeTagsInput) (req *requ // DescribeTags API operation for AWS Direct Connect. // -// Describes the tags associated with the specified Direct Connect resources. +// Describes the tags associated with the specified AWS Direct Connect resources. // // 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 @@ -3448,12 +3363,10 @@ func (c *DirectConnect) DescribeTagsRequest(input *DescribeTagsInput) (req *requ // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTags func (c *DirectConnect) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { @@ -3482,7 +3395,7 @@ const opDescribeVirtualGateways = "DescribeVirtualGateways" // DescribeVirtualGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeVirtualGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3521,13 +3434,10 @@ func (c *DirectConnect) DescribeVirtualGatewaysRequest(input *DescribeVirtualGat // DescribeVirtualGateways API operation for AWS Direct Connect. // -// Returns a list of virtual private gateways owned by the AWS account. +// Lists the virtual private gateways owned by the AWS account. // // You can create one or more AWS Direct Connect private virtual interfaces -// linking to a virtual private gateway. A virtual private gateway can be managed -// via Amazon Virtual Private Cloud (VPC) console or the EC2 CreateVpnGateway -// (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html) -// action. +// linked to a virtual private gateway. // // 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 @@ -3538,12 +3448,10 @@ func (c *DirectConnect) DescribeVirtualGatewaysRequest(input *DescribeVirtualGat // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualGateways func (c *DirectConnect) DescribeVirtualGateways(input *DescribeVirtualGatewaysInput) (*DescribeVirtualGatewaysOutput, error) { @@ -3572,7 +3480,7 @@ const opDescribeVirtualInterfaces = "DescribeVirtualInterfaces" // DescribeVirtualInterfacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVirtualInterfaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3618,7 +3526,7 @@ func (c *DirectConnect) DescribeVirtualInterfacesRequest(input *DescribeVirtualI // a single virtual interface is returned. // // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect -// location and the customer. +// location and the customer network. // // 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 @@ -3629,12 +3537,10 @@ func (c *DirectConnect) DescribeVirtualInterfacesRequest(input *DescribeVirtualI // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualInterfaces func (c *DirectConnect) DescribeVirtualInterfaces(input *DescribeVirtualInterfacesInput) (*DescribeVirtualInterfacesOutput, error) { @@ -3663,7 +3569,7 @@ const opDisassociateConnectionFromLag = "DisassociateConnectionFromLag" // DisassociateConnectionFromLagRequest generates a "aws/request.Request" representing the // client's request for the DisassociateConnectionFromLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3709,7 +3615,7 @@ func (c *DirectConnect) DisassociateConnectionFromLagRequest(input *Disassociate // remain associated with the LAG. A disassociated connection owned by an AWS // Direct Connect partner is automatically converted to an interconnect. // -// If disassociating the connection will cause the LAG to fall below its setting +// If disassociating the connection would cause the LAG to fall below its setting // for minimum number of operational connections, the request fails, except // when it's the last member of the LAG. If all connections are disassociated, // the LAG continues to exist as an empty LAG with no physical connections. @@ -3723,12 +3629,10 @@ func (c *DirectConnect) DisassociateConnectionFromLagRequest(input *Disassociate // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DisassociateConnectionFromLag func (c *DirectConnect) DisassociateConnectionFromLag(input *DisassociateConnectionFromLagInput) (*Connection, error) { @@ -3757,7 +3661,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3796,12 +3700,11 @@ func (c *DirectConnect) TagResourceRequest(input *TagResourceInput) (req *reques // TagResource API operation for AWS Direct Connect. // -// Adds the specified tags to the specified Direct Connect resource. Each Direct -// Connect resource can have a maximum of 50 tags. +// Adds the specified tags to the specified AWS Direct Connect resource. Each +// resource can have a maximum of 50 tags. // // Each tag consists of a key and an optional value. If a tag with the same -// key is already associated with the Direct Connect resource, this action updates -// its value. +// key is already associated with the resource, this action updates its value. // // 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 @@ -3815,16 +3718,13 @@ func (c *DirectConnect) TagResourceRequest(input *TagResourceInput) (req *reques // A tag key was specified more than once. // // * ErrCodeTooManyTagsException "TooManyTagsException" -// You have reached the limit on the number of tags that can be assigned to -// a Direct Connect resource. +// You have reached the limit on the number of tags that can be assigned. // // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/TagResource func (c *DirectConnect) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { @@ -3853,7 +3753,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3892,7 +3792,7 @@ func (c *DirectConnect) UntagResourceRequest(input *UntagResourceInput) (req *re // UntagResource API operation for AWS Direct Connect. // -// Removes one or more tags from the specified Direct Connect resource. +// Removes one or more tags from the specified AWS Direct Connect resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3903,12 +3803,10 @@ func (c *DirectConnect) UntagResourceRequest(input *UntagResourceInput) (req *re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UntagResource func (c *DirectConnect) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { @@ -3937,7 +3835,7 @@ const opUpdateLag = "UpdateLag" // UpdateLagRequest generates a "aws/request.Request" representing the // client's request for the UpdateLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3976,7 +3874,7 @@ func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Re // UpdateLag API operation for AWS Direct Connect. // -// Updates the attributes of a link aggregation group (LAG). +// Updates the attributes of the specified link aggregation group (LAG). // // You can update the following attributes: // @@ -3986,11 +3884,11 @@ func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Re // for the LAG itself to be operational. // // When you create a LAG, the default value for the minimum number of operational -// connections is zero (0). If you update this value, and the number of operational -// connections falls below the specified value, the LAG will automatically go -// down to avoid overutilization of the remaining connections. Adjusting this -// value should be done with care as it could force the LAG down if the value -// is set higher than the current number of operational connections. +// connections is zero (0). If you update this value and the number of operational +// connections falls below the specified value, the LAG automatically goes down +// to avoid over-utilization of the remaining connections. Adjust this value +// with care, as it could force the LAG down if it is set higher than the current +// number of operational connections. // // 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 @@ -4001,12 +3899,10 @@ func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateLag func (c *DirectConnect) UpdateLag(input *UpdateLagInput) (*Lag, error) { @@ -4030,54 +3926,123 @@ func (c *DirectConnect) UpdateLagWithContext(ctx aws.Context, input *UpdateLagIn return out, req.Send() } -// Container for the parameters to the AllocateConnectionOnInterconnect operation. +const opUpdateVirtualInterfaceAttributes = "UpdateVirtualInterfaceAttributes" + +// UpdateVirtualInterfaceAttributesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVirtualInterfaceAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateVirtualInterfaceAttributes for more information on using the UpdateVirtualInterfaceAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateVirtualInterfaceAttributesRequest method. +// req, resp := client.UpdateVirtualInterfaceAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateVirtualInterfaceAttributes +func (c *DirectConnect) UpdateVirtualInterfaceAttributesRequest(input *UpdateVirtualInterfaceAttributesInput) (req *request.Request, output *UpdateVirtualInterfaceAttributesOutput) { + op := &request.Operation{ + Name: opUpdateVirtualInterfaceAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVirtualInterfaceAttributesInput{} + } + + output = &UpdateVirtualInterfaceAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVirtualInterfaceAttributes API operation for AWS Direct Connect. +// +// Updates the specified attributes of the specified virtual private interface. +// +// Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an +// update to the underlying physical connection if it wasn't updated to support +// jumbo frames. Updating the connection disrupts network connectivity for all +// virtual interfaces associated with the connection for up to 30 seconds. To +// check whether your connection supports jumbo frames, call DescribeConnections. +// To check whether your virtual interface supports jumbo frames, call DescribeVirtualInterfaces. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Direct Connect's +// API operation UpdateVirtualInterfaceAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "DirectConnectServerException" +// A server-side error occurred. +// +// * ErrCodeClientException "DirectConnectClientException" +// One or more parameters are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateVirtualInterfaceAttributes +func (c *DirectConnect) UpdateVirtualInterfaceAttributes(input *UpdateVirtualInterfaceAttributesInput) (*UpdateVirtualInterfaceAttributesOutput, error) { + req, out := c.UpdateVirtualInterfaceAttributesRequest(input) + return out, req.Send() +} + +// UpdateVirtualInterfaceAttributesWithContext is the same as UpdateVirtualInterfaceAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVirtualInterfaceAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectConnect) UpdateVirtualInterfaceAttributesWithContext(ctx aws.Context, input *UpdateVirtualInterfaceAttributesInput, opts ...request.Option) (*UpdateVirtualInterfaceAttributesOutput, error) { + req, out := c.UpdateVirtualInterfaceAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type AllocateConnectionOnInterconnectInput struct { _ struct{} `type:"structure"` - // Bandwidth of the connection. - // - // Example: "500Mbps" - // - // Default: None - // - // Values: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps + // The bandwidth of the connection, in Mbps. The possible values are 50Mbps, + // 100Mbps, 200Mbps, 300Mbps, 400Mbps, and 500Mbps. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - // Name of the provisioned connection. - // - // Example: "500M Connection to AWS" - // - // Default: None + // The name of the provisioned connection. // // ConnectionName is a required field ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` - // ID of the interconnect on which the connection will be provisioned. - // - // Example: dxcon-456abc78 - // - // Default: None + // The ID of the interconnect on which the connection will be provisioned. For + // example, dxcon-456abc78. // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` - // Numeric account Id of the customer for whom the connection will be provisioned. - // - // Example: 123443215678 - // - // Default: None + // The ID of the AWS account of the customer for whom the connection will be + // provisioned. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` // The dedicated VLAN provisioned to the connection. // - // Example: 101 - // - // Default: None - // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` } @@ -4147,54 +4112,32 @@ func (s *AllocateConnectionOnInterconnectInput) SetVlan(v int64) *AllocateConnec return s } -// Container for the parameters to theHostedConnection operation. type AllocateHostedConnectionInput struct { _ struct{} `type:"structure"` - // The bandwidth of the connection. - // - // Example: 500Mbps - // - // Default: None - // - // Values: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps + // The bandwidth of the hosted connection, in Mbps. The possible values are + // 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, and 500Mbps. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - // The ID of the interconnect or LAG on which the connection will be provisioned. - // - // Example: dxcon-456abc78 or dxlag-abc123 - // - // Default: None + // The ID of the interconnect or LAG. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // The name of the provisioned connection. - // - // Example: "500M Connection to AWS" - // - // Default: None + // The name of the hosted connection. // // ConnectionName is a required field ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` - // The numeric account ID of the customer for whom the connection will be provisioned. - // - // Example: 123443215678 - // - // Default: None + // The ID of the AWS account ID of the customer for the connection. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` // The dedicated VLAN provisioned to the hosted connection. // - // Example: 101 - // - // Default: None - // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` } @@ -4264,27 +4207,20 @@ func (s *AllocateHostedConnectionInput) SetVlan(v int64) *AllocateHostedConnecti return s } -// Container for the parameters to the AllocatePrivateVirtualInterface operation. type AllocatePrivateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The connection ID on which the private virtual interface is provisioned. - // - // Default: None + // The ID of the connection on which the private virtual interface is provisioned. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the private virtual interface to be provisioned. - // - // Default: None + // Information about the private virtual interface. // // NewPrivateVirtualInterfaceAllocation is a required field NewPrivateVirtualInterfaceAllocation *NewPrivateVirtualInterfaceAllocation `locationName:"newPrivateVirtualInterfaceAllocation" type:"structure" required:"true"` - // The AWS account that will own the new private virtual interface. - // - // Default: None + // The ID of the AWS account that owns the virtual private interface. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` @@ -4342,27 +4278,20 @@ func (s *AllocatePrivateVirtualInterfaceInput) SetOwnerAccount(v string) *Alloca return s } -// Container for the parameters to the AllocatePublicVirtualInterface operation. type AllocatePublicVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The connection ID on which the public virtual interface is provisioned. - // - // Default: None + // The ID of the connection on which the public virtual interface is provisioned. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the public virtual interface to be provisioned. - // - // Default: None + // Information about the public virtual interface. // // NewPublicVirtualInterfaceAllocation is a required field NewPublicVirtualInterfaceAllocation *NewPublicVirtualInterfaceAllocation `locationName:"newPublicVirtualInterfaceAllocation" type:"structure" required:"true"` - // The AWS account that will own the new public virtual interface. - // - // Default: None + // The ID of the AWS account that owns the public virtual interface. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` @@ -4420,24 +4349,15 @@ func (s *AllocatePublicVirtualInterfaceInput) SetOwnerAccount(v string) *Allocat return s } -// Container for the parameters to the AssociateConnectionWithLag operation. type AssociateConnectionWithLagInput struct { _ struct{} `type:"structure"` - // The ID of the connection. - // - // Example: dxcon-abc123 - // - // Default: None + // The ID of the connection. For example, dxcon-abc123. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // The ID of the LAG with which to associate the connection. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG with which to associate the connection. For example, dxlag-abc123. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` @@ -4481,25 +4401,16 @@ func (s *AssociateConnectionWithLagInput) SetLagId(v string) *AssociateConnectio return s } -// Container for the parameters to the AssociateHostedConnection operation. type AssociateHostedConnectionInput struct { _ struct{} `type:"structure"` // The ID of the hosted connection. // - // Example: dxcon-abc123 - // - // Default: None - // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` // The ID of the interconnect or the LAG. // - // Example: dxcon-abc123 or dxlag-abc123 - // - // Default: None - // // ParentConnectionId is a required field ParentConnectionId *string `locationName:"parentConnectionId" type:"string" required:"true"` } @@ -4542,25 +4453,16 @@ func (s *AssociateHostedConnectionInput) SetParentConnectionId(v string) *Associ return s } -// Container for the parameters to the AssociateVirtualInterface operation. type AssociateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The ID of the LAG or connection with which to associate the virtual interface. - // - // Example: dxlag-abc123 or dxcon-abc123 - // - // Default: None + // The ID of the LAG or connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -4603,64 +4505,53 @@ func (s *AssociateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *Associ return s } -// A structure containing information about a BGP peer. +// Information about a BGP peer. type BGPPeer struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // The Direct Connection endpoint which the BGP peer terminates on. + // The Direct Connect endpoint on which the BGP peer terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // The state of the BGP peer. + // The state of the BGP peer. The following are the possible values: // - // * Verifying: The BGP peering addresses or ASN require validation before - // the BGP peer can be created. This state only applies to BGP peers on a - // public virtual interface. + // * verifying: The BGP peering addresses or ASN require validation before + // the BGP peer can be created. This state applies only to public virtual + // interfaces. // - // * Pending: The BGP peer has been created, and is in this state until it + // * pending: The BGP peer is created, and remains in this state until it // is ready to be established. // - // * Available: The BGP peer can be established. + // * available: The BGP peer is ready to be established. // - // * Deleting: The BGP peer is in the process of being deleted. + // * deleting: The BGP peer is being deleted. // - // * Deleted: The BGP peer has been deleted and cannot be established. + // * deleted: The BGP peer is deleted and cannot be established. BgpPeerState *string `locationName:"bgpPeerState" type:"string" enum:"BGPPeerState"` - // The Up/Down state of the BGP peer. + // The status of the BGP peer. The following are the possible values: // - // * Up: The BGP peer is established. + // * up: The BGP peer is established. This state does not indicate the state + // of the routing function. Ensure that you are receiving routes over the + // BGP session. // - // A state of up does not indicate the state of the routing function. Ensure - // that you are receiving routes over the BGP session. + // * down: The BGP peer is down. // - // * Down: The BGP peer is down. + // * unknown: The BGP peer status is unknown. BgpStatus *string `locationName:"bgpStatus" type:"string" enum:"BGPStatus"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` } @@ -4722,16 +4613,10 @@ func (s *BGPPeer) SetCustomerAddress(v string) *BGPPeer { return s } -// Container for the parameters to the ConfirmConnection operation. type ConfirmConnectionInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the hosted connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` @@ -4766,32 +4651,31 @@ func (s *ConfirmConnectionInput) SetConnectionId(v string) *ConfirmConnectionInp return s } -// The response received when ConfirmConnection is called. type ConfirmConnectionOutput struct { _ struct{} `type:"structure"` - // State of the connection. + // The state of the connection. The following are the possible values: // - // * Ordering: The initial state of a hosted connection provisioned on an + // * ordering: The initial state of a hosted connection provisioned on an // interconnect. The connection stays in the ordering state until the owner // of the hosted connection confirms or declines the connection order. // - // * Requested: The initial state of a standard connection. The connection + // * requested: The initial state of a standard connection. The connection // stays in the requested state until the Letter of Authorization (LOA) is // sent to the customer. // - // * Pending: The connection has been approved, and is being initialized. + // * pending: The connection has been approved and is being initialized. // - // * Available: The network link is up, and the connection is ready for use. + // * available: The network link is up and the connection is ready for use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The connection is in the process of being deleted. + // * deleting: The connection is being deleted. // - // * Deleted: The connection has been deleted. + // * deleted: The connection has been deleted. // - // * Rejected: A hosted connection in the 'Ordering' state will enter the - // 'Rejected' state if it is deleted by the end customer. + // * rejected: A hosted connection in the ordering state enters the rejected + // state if it is deleted by the customer. ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` } @@ -4811,33 +4695,17 @@ func (s *ConfirmConnectionOutput) SetConnectionState(v string) *ConfirmConnectio return s } -// Container for the parameters to the ConfirmPrivateVirtualInterface operation. type ConfirmPrivateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // ID of the direct connect gateway that will be attached to the virtual interface. - // - // A direct connect gateway can be managed via the AWS Direct Connect console - // or the CreateDirectConnectGateway action. - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // ID of the virtual private gateway that will be attached to the virtual interface. - // - // A virtual private gateway can be managed via the Amazon Virtual Private Cloud - // (VPC) console or the EC2 CreateVpnGateway (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html) - // action. - // - // Default: None + // The ID of the virtual private gateway. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -4883,37 +4751,36 @@ func (s *ConfirmPrivateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *C return s } -// The response received when ConfirmPrivateVirtualInterface is called. type ConfirmPrivateVirtualInterfaceOutput struct { _ struct{} `type:"structure"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` } @@ -4934,16 +4801,11 @@ func (s *ConfirmPrivateVirtualInterfaceOutput) SetVirtualInterfaceState(v string return s } -// Container for the parameters to the ConfirmPublicVirtualInterface operation. type ConfirmPublicVirtualInterfaceInput struct { _ struct{} `type:"structure"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -4977,37 +4839,36 @@ func (s *ConfirmPublicVirtualInterfaceInput) SetVirtualInterfaceId(v string) *Co return s } -// The response received when ConfirmPublicVirtualInterface is called. type ConfirmPublicVirtualInterfaceOutput struct { _ struct{} `type:"structure"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` } @@ -5028,96 +4889,71 @@ func (s *ConfirmPublicVirtualInterfaceOutput) SetVirtualInterfaceState(v string) return s } -// A connection represents the physical network connection between the AWS Direct -// Connect location and the customer. +// Information about an AWS Direct Connect connection. type Connection struct { _ struct{} `type:"structure"` - // Deprecated in favor of awsDeviceV2. - // - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // Bandwidth of the connection. - // - // Example: 1Gbps (for regular connections), or 500Mbps (for hosted connections) - // - // Default: None + // The bandwidth of the connection. Bandwidth *string `locationName:"bandwidth" type:"string"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` // The name of the connection. - // - // Example: "My Connection to AWS" - // - // Default: None ConnectionName *string `locationName:"connectionName" type:"string"` - // State of the connection. + // The state of the connection. The following are the possible values: // - // * Ordering: The initial state of a hosted connection provisioned on an + // * ordering: The initial state of a hosted connection provisioned on an // interconnect. The connection stays in the ordering state until the owner // of the hosted connection confirms or declines the connection order. // - // * Requested: The initial state of a standard connection. The connection + // * requested: The initial state of a standard connection. The connection // stays in the requested state until the Letter of Authorization (LOA) is // sent to the customer. // - // * Pending: The connection has been approved, and is being initialized. + // * pending: The connection has been approved and is being initialized. // - // * Available: The network link is up, and the connection is ready for use. + // * available: The network link is up and the connection is ready for use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The connection is in the process of being deleted. + // * deleting: The connection is being deleted. // - // * Deleted: The connection has been deleted. + // * deleted: The connection has been deleted. // - // * Rejected: A hosted connection in the 'Ordering' state will enter the - // 'Rejected' state if it is deleted by the end customer. + // * rejected: A hosted connection in the ordering state enters the rejected + // state if it is deleted by the customer. ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` // The time of the most recent call to DescribeLoa for this connection. LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the connection. Location *string `locationName:"location" type:"string"` - // The AWS account that will own the new connection. + // The ID of the AWS account that owns the connection. OwnerAccount *string `locationName:"ownerAccount" type:"string"` // The name of the AWS Direct Connect service provider associated with the connection. PartnerName *string `locationName:"partnerName" type:"string"` - // The AWS region where the connection is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the connection is located. Region *string `locationName:"region" type:"string"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. Vlan *int64 `locationName:"vlan" type:"integer"` } @@ -5167,6 +5003,12 @@ func (s *Connection) SetConnectionState(v string) *Connection { return s } +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *Connection) SetJumboFrameCapable(v bool) *Connection { + s.JumboFrameCapable = &v + return s +} + // SetLagId sets the LagId field's value. func (s *Connection) SetLagId(v string) *Connection { s.LagId = &v @@ -5209,11 +5051,10 @@ func (s *Connection) SetVlan(v int64) *Connection { return s } -// A structure containing a list of connections. type Connections struct { _ struct{} `type:"structure"` - // A list of connections. + // The connections. Connections []*Connection `locationName:"connections" type:"list"` } @@ -5233,20 +5074,13 @@ func (s *Connections) SetConnections(v []*Connection) *Connections { return s } -// Container for the parameters to the CreateBGPPeer operation. type CreateBGPPeerInput struct { _ struct{} `type:"structure"` - // Detailed information for the BGP peer to be created. - // - // Default: None + // Information about the BGP peer. NewBGPPeer *NewBGPPeer `locationName:"newBGPPeer" type:"structure"` - // The ID of the virtual interface on which the BGP peer will be provisioned. - // - // Example: dxvif-456abc78 - // - // Default: None + // The ID of the virtual interface. VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -5272,12 +5106,10 @@ func (s *CreateBGPPeerInput) SetVirtualInterfaceId(v string) *CreateBGPPeerInput return s } -// The response received when CreateBGPPeer is called. type CreateBGPPeerOutput struct { _ struct{} `type:"structure"` - // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect - // location and the customer. + // The virtual interface. VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` } @@ -5297,38 +5129,23 @@ func (s *CreateBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *CreateBG return s } -// Container for the parameters to the CreateConnection operation. type CreateConnectionInput struct { _ struct{} `type:"structure"` - // Bandwidth of the connection. - // - // Example: 1Gbps - // - // Default: None + // The bandwidth of the connection. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` // The name of the connection. // - // Example: "My Connection to AWS" - // - // Default: None - // // ConnectionName is a required field ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the connection. // // Location is a required field Location *string `locationName:"location" type:"string" required:"true"` @@ -5387,26 +5204,16 @@ func (s *CreateConnectionInput) SetLocation(v string) *CreateConnectionInput { return s } -// Container for the parameters to the CreateDirectConnectGatewayAssociation -// operation. type CreateDirectConnectGatewayAssociationInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. // // DirectConnectGatewayId is a required field DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` // The ID of the virtual private gateway. // - // Example: "vgw-abc123ef" - // - // Default: None - // // VirtualGatewayId is a required field VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` } @@ -5449,12 +5256,10 @@ func (s *CreateDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v strin return s } -// Container for the response from the CreateDirectConnectGatewayAssociation -// API call type CreateDirectConnectGatewayAssociationOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway association to be created. + // The association to be created. DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` } @@ -5474,24 +5279,16 @@ func (s *CreateDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAss return s } -// Container for the parameters to the CreateDirectConnectGateway operation. type CreateDirectConnectGatewayInput struct { _ struct{} `type:"structure"` // The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be // configured on the Amazon side of the connection. The ASN must be in the private - // range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294 - // - // Example: 65200 - // - // Default: 64512 + // range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default + // is 64512. AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - // The name of the direct connect gateway. - // - // Example: "My direct connect gateway" - // - // Default: None + // The name of the Direct Connect gateway. // // DirectConnectGatewayName is a required field DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string" required:"true"` @@ -5532,11 +5329,10 @@ func (s *CreateDirectConnectGatewayInput) SetDirectConnectGatewayName(v string) return s } -// Container for the response from the CreateDirectConnectGateway API call type CreateDirectConnectGatewayOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway to be created. + // The Direct Connect gateway. DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` } @@ -5556,40 +5352,23 @@ func (s *CreateDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) * return s } -// Container for the parameters to the CreateInterconnect operation. type CreateInterconnectInput struct { _ struct{} `type:"structure"` - // The port bandwidth - // - // Example: 1Gbps - // - // Default: None - // - // Available values: 1Gbps,10Gbps + // The port bandwidth, in Gbps. The possible values are 1 and 10. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` // The name of the interconnect. // - // Example: "1G Interconnect to AWS" - // - // Default: None - // // InterconnectName is a required field InterconnectName *string `locationName:"interconnectName" type:"string" required:"true"` // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` - // Where the interconnect is located - // - // Example: EqSV5 - // - // Default: None + // The location of the interconnect. // // Location is a required field Location *string `locationName:"location" type:"string" required:"true"` @@ -5648,38 +5427,24 @@ func (s *CreateInterconnectInput) SetLocation(v string) *CreateInterconnectInput return s } -// Container for the parameters to the CreateLag operation. type CreateLagInput struct { _ struct{} `type:"structure"` // The ID of an existing connection to migrate to the LAG. - // - // Default: None ConnectionId *string `locationName:"connectionId" type:"string"` // The bandwidth of the individual physical connections bundled by the LAG. - // - // Default: None - // - // Available values: 1Gbps, 10Gbps + // The possible values are 1Gbps and 10Gbps. // // ConnectionsBandwidth is a required field ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string" required:"true"` // The name of the LAG. // - // Example: "3x10G LAG to AWS" - // - // Default: None - // // LagName is a required field LagName *string `locationName:"lagName" type:"string" required:"true"` - // The AWS Direct Connect location in which the LAG should be allocated. - // - // Example: EqSV5 - // - // Default: None + // The location for the LAG. // // Location is a required field Location *string `locationName:"location" type:"string" required:"true"` @@ -5687,8 +5452,6 @@ type CreateLagInput struct { // The number of physical connections initially provisioned and bundled by the // LAG. // - // Default: None - // // NumberOfConnections is a required field NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer" required:"true"` } @@ -5755,23 +5518,15 @@ func (s *CreateLagInput) SetNumberOfConnections(v int64) *CreateLagInput { return s } -// Container for the parameters to the CreatePrivateVirtualInterface operation. type CreatePrivateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the private virtual interface to be created. - // - // Default: None + // Information about the private virtual interface. // // NewPrivateVirtualInterface is a required field NewPrivateVirtualInterface *NewPrivateVirtualInterface `locationName:"newPrivateVirtualInterface" type:"structure" required:"true"` @@ -5820,23 +5575,15 @@ func (s *CreatePrivateVirtualInterfaceInput) SetNewPrivateVirtualInterface(v *Ne return s } -// Container for the parameters to the CreatePublicVirtualInterface operation. type CreatePublicVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the public virtual interface to be created. - // - // Default: None + // Information about the public virtual interface. // // NewPublicVirtualInterface is a required field NewPublicVirtualInterface *NewPublicVirtualInterface `locationName:"newPublicVirtualInterface" type:"structure" required:"true"` @@ -5885,25 +5632,16 @@ func (s *CreatePublicVirtualInterfaceInput) SetNewPublicVirtualInterface(v *NewP return s } -// Container for the parameters to the DeleteBGPPeer operation. type DeleteBGPPeerInput struct { _ struct{} `type:"structure"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // The ID of the virtual interface from which the BGP peer will be deleted. - // - // Example: dxvif-456abc78 - // - // Default: None + // The ID of the virtual interface. VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -5935,12 +5673,10 @@ func (s *DeleteBGPPeerInput) SetVirtualInterfaceId(v string) *DeleteBGPPeerInput return s } -// The response received when DeleteBGPPeer is called. type DeleteBGPPeerOutput struct { _ struct{} `type:"structure"` - // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect - // location and the customer. + // The virtual interface. VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` } @@ -5960,16 +5696,10 @@ func (s *DeleteBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *DeleteBG return s } -// Container for the parameters to the DeleteConnection operation. type DeleteConnectionInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` @@ -6004,26 +5734,16 @@ func (s *DeleteConnectionInput) SetConnectionId(v string) *DeleteConnectionInput return s } -// Container for the parameters to the DeleteDirectConnectGatewayAssociation -// operation. type DeleteDirectConnectGatewayAssociationInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. // // DirectConnectGatewayId is a required field DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` // The ID of the virtual private gateway. // - // Example: "vgw-abc123ef" - // - // Default: None - // // VirtualGatewayId is a required field VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` } @@ -6066,12 +5786,10 @@ func (s *DeleteDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v strin return s } -// Container for the response from the DeleteDirectConnectGatewayAssociation -// API call type DeleteDirectConnectGatewayAssociationOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway association to be deleted. + // The association to be deleted. DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` } @@ -6091,15 +5809,10 @@ func (s *DeleteDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAss return s } -// Container for the parameters to the DeleteDirectConnectGateway operation. type DeleteDirectConnectGatewayInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. // // DirectConnectGatewayId is a required field DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` @@ -6134,11 +5847,10 @@ func (s *DeleteDirectConnectGatewayInput) SetDirectConnectGatewayId(v string) *D return s } -// Container for the response from the DeleteDirectConnectGateway API call type DeleteDirectConnectGatewayOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway to be deleted. + // The Direct Connect gateway. DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` } @@ -6158,14 +5870,11 @@ func (s *DeleteDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) * return s } -// Container for the parameters to the DeleteInterconnect operation. type DeleteInterconnectInput struct { _ struct{} `type:"structure"` // The ID of the interconnect. // - // Example: dxcon-abc123 - // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` } @@ -6199,26 +5908,25 @@ func (s *DeleteInterconnectInput) SetInterconnectId(v string) *DeleteInterconnec return s } -// The response received when DeleteInterconnect is called. type DeleteInterconnectOutput struct { _ struct{} `type:"structure"` - // State of the interconnect. + // The state of the interconnect. The following are the possible values: // - // * Requested: The initial state of an interconnect. The interconnect stays + // * requested: The initial state of an interconnect. The interconnect stays // in the requested state until the Letter of Authorization (LOA) is sent // to the customer. // - // * Pending: The interconnect has been approved, and is being initialized. + // * pending: The interconnect is approved, and is being initialized. // - // * Available: The network link is up, and the interconnect is ready for + // * available: The network link is up, and the interconnect is ready for // use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The interconnect is in the process of being deleted. + // * deleting: The interconnect is being deleted. // - // * Deleted: The interconnect has been deleted. + // * deleted: The interconnect is deleted. InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` } @@ -6238,15 +5946,10 @@ func (s *DeleteInterconnectOutput) SetInterconnectState(v string) *DeleteInterco return s } -// Container for the parameters to the DeleteLag operation. type DeleteLagInput struct { _ struct{} `type:"structure"` - // The ID of the LAG to delete. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` @@ -6281,16 +5984,11 @@ func (s *DeleteLagInput) SetLagId(v string) *DeleteLagInput { return s } -// Container for the parameters to the DeleteVirtualInterface operation. type DeleteVirtualInterfaceInput struct { _ struct{} `type:"structure"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -6324,37 +6022,36 @@ func (s *DeleteVirtualInterfaceInput) SetVirtualInterfaceId(v string) *DeleteVir return s } -// The response received when DeleteVirtualInterface is called. type DeleteVirtualInterfaceOutput struct { _ struct{} `type:"structure"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` } @@ -6375,31 +6072,21 @@ func (s *DeleteVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *Delet return s } -// Container for the parameters to the DescribeConnectionLoa operation. type DescribeConnectionLoaInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` // The name of the APN partner or service provider who establishes connectivity - // on your behalf. If you supply this parameter, the LOA-CFA lists the provider + // on your behalf. If you specify this parameter, the LOA-CFA lists the provider // name alongside your company name as the requester of the cross connect. - // - // Default: None ProviderName *string `locationName:"providerName" type:"string"` } @@ -6444,12 +6131,10 @@ func (s *DescribeConnectionLoaInput) SetProviderName(v string) *DescribeConnecti return s } -// The response received when DescribeConnectionLoa is called. type DescribeConnectionLoaOutput struct { _ struct{} `type:"structure"` - // A structure containing the Letter of Authorization - Connecting Facility - // Assignment (LOA-CFA) for a connection. + // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA). Loa *Loa `locationName:"loa" type:"structure"` } @@ -6469,16 +6154,10 @@ func (s *DescribeConnectionLoaOutput) SetLoa(v *Loa) *DescribeConnectionLoaOutpu return s } -// Container for the parameters to the DescribeConnections operation. type DescribeConnectionsInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` } @@ -6498,15 +6177,10 @@ func (s *DescribeConnectionsInput) SetConnectionId(v string) *DescribeConnection return s } -// Container for the parameters to the DescribeConnectionsOnInterconnect operation. type DescribeConnectionsOnInterconnectInput struct { _ struct{} `type:"structure"` - // ID of the interconnect on which a list of connection is provisioned. - // - // Example: dxcon-abc123 - // - // Default: None + // The ID of the interconnect. // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` @@ -6541,36 +6215,19 @@ func (s *DescribeConnectionsOnInterconnectInput) SetInterconnectId(v string) *De return s } -// Container for the parameters to the DescribeDirectConnectGatewayAssociations -// operation. type DescribeDirectConnectGatewayAssociationsInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The maximum number of direct connect gateway associations to return per page. - // - // Example: 15 - // - // Default: None + // The maximum number of associations to return per page. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token provided in the previous describe result to retrieve the next page - // of the result. - // - // Default: None + // The token provided in the previous call to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` // The ID of the virtual private gateway. - // - // Example: "vgw-abc123ef" - // - // Default: None VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` } @@ -6608,15 +6265,13 @@ func (s *DescribeDirectConnectGatewayAssociationsInput) SetVirtualGatewayId(v st return s } -// Container for the response from the DescribeDirectConnectGatewayAssociations -// API call type DescribeDirectConnectGatewayAssociationsOutput struct { _ struct{} `type:"structure"` - // Information about the direct connect gateway associations. + // The associations. DirectConnectGatewayAssociations []*GatewayAssociation `locationName:"directConnectGatewayAssociations" type:"list"` - // Token to retrieve the next page of the result. + // The token to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6642,36 +6297,19 @@ func (s *DescribeDirectConnectGatewayAssociationsOutput) SetNextToken(v string) return s } -// Container for the parameters to the DescribeDirectConnectGatewayAttachments -// operation. type DescribeDirectConnectGatewayAttachmentsInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The maximum number of direct connect gateway attachments to return per page. - // - // Example: 15 - // - // Default: None + // The maximum number of attachments to return per page. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token provided in the previous describe result to retrieve the next page - // of the result. - // - // Default: None + // The token provided in the previous call to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` // The ID of the virtual interface. - // - // Example: "dxvif-abc123ef" - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -6709,15 +6347,13 @@ func (s *DescribeDirectConnectGatewayAttachmentsInput) SetVirtualInterfaceId(v s return s } -// Container for the response from the DescribeDirectConnectGatewayAttachments -// API call type DescribeDirectConnectGatewayAttachmentsOutput struct { _ struct{} `type:"structure"` - // Information about the direct connect gateway attachments. + // The attachments. DirectConnectGatewayAttachments []*GatewayAttachment `locationName:"directConnectGatewayAttachments" type:"list"` - // Token to retrieve the next page of the result. + // The token to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6743,28 +6379,16 @@ func (s *DescribeDirectConnectGatewayAttachmentsOutput) SetNextToken(v string) * return s } -// Container for the parameters to the DescribeDirectConnectGateways operation. type DescribeDirectConnectGatewaysInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The maximum number of direct connect gateways to return per page. - // - // Example: 15 - // - // Default: None + // The maximum number of Direct Connect gateways to return per page. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token provided in the previous describe result to retrieve the next page - // of the result. - // - // Default: None + // The token provided in the previous call to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6796,14 +6420,13 @@ func (s *DescribeDirectConnectGatewaysInput) SetNextToken(v string) *DescribeDir return s } -// Container for the response from the DescribeDirectConnectGateways API call type DescribeDirectConnectGatewaysOutput struct { _ struct{} `type:"structure"` - // Information about the direct connect gateways. + // The Direct Connect gateways. DirectConnectGateways []*Gateway `locationName:"directConnectGateways" type:"list"` - // Token to retrieve the next page of the result. + // The token to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6829,15 +6452,10 @@ func (s *DescribeDirectConnectGatewaysOutput) SetNextToken(v string) *DescribeDi return s } -// Container for the parameters to the DescribeHostedConnections operation. type DescribeHostedConnectionsInput struct { _ struct{} `type:"structure"` - // The ID of the interconnect or LAG on which the hosted connections are provisioned. - // - // Example: dxcon-abc123 or dxlag-abc123 - // - // Default: None + // The ID of the interconnect or LAG. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` @@ -6872,28 +6490,21 @@ func (s *DescribeHostedConnectionsInput) SetConnectionId(v string) *DescribeHost return s } -// Container for the parameters to the DescribeInterconnectLoa operation. type DescribeInterconnectLoaInput struct { _ struct{} `type:"structure"` // The ID of the interconnect. // - // Example: dxcon-abc123 - // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` // The name of the service provider who establishes connectivity on your behalf. // If you supply this parameter, the LOA-CFA lists the provider name alongside // your company name as the requester of the cross connect. - // - // Default: None ProviderName *string `locationName:"providerName" type:"string"` } @@ -6938,12 +6549,10 @@ func (s *DescribeInterconnectLoaInput) SetProviderName(v string) *DescribeInterc return s } -// The response received when DescribeInterconnectLoa is called. type DescribeInterconnectLoaOutput struct { _ struct{} `type:"structure"` - // A structure containing the Letter of Authorization - Connecting Facility - // Assignment (LOA-CFA) for a connection. + // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA). Loa *Loa `locationName:"loa" type:"structure"` } @@ -6963,13 +6572,10 @@ func (s *DescribeInterconnectLoaOutput) SetLoa(v *Loa) *DescribeInterconnectLoaO return s } -// Container for the parameters to the DescribeInterconnects operation. type DescribeInterconnectsInput struct { _ struct{} `type:"structure"` // The ID of the interconnect. - // - // Example: dxcon-abc123 InterconnectId *string `locationName:"interconnectId" type:"string"` } @@ -6989,11 +6595,10 @@ func (s *DescribeInterconnectsInput) SetInterconnectId(v string) *DescribeInterc return s } -// A structure containing a list of interconnects. type DescribeInterconnectsOutput struct { _ struct{} `type:"structure"` - // A list of interconnects. + // The interconnects. Interconnects []*Interconnect `locationName:"interconnects" type:"list"` } @@ -7013,15 +6618,10 @@ func (s *DescribeInterconnectsOutput) SetInterconnects(v []*Interconnect) *Descr return s } -// Container for the parameters to the DescribeLags operation. type DescribeLagsInput struct { _ struct{} `type:"structure"` // The ID of the LAG. - // - // Example: dxlag-abc123 - // - // Default: None LagId *string `locationName:"lagId" type:"string"` } @@ -7041,11 +6641,10 @@ func (s *DescribeLagsInput) SetLagId(v string) *DescribeLagsInput { return s } -// A structure containing a list of LAGs. type DescribeLagsOutput struct { _ struct{} `type:"structure"` - // A list of LAGs. + // The LAGs. Lags []*Lag `locationName:"lags" type:"list"` } @@ -7065,31 +6664,21 @@ func (s *DescribeLagsOutput) SetLags(v []*Lag) *DescribeLagsOutput { return s } -// Container for the parameters to the DescribeLoa operation. type DescribeLoaInput struct { _ struct{} `type:"structure"` - // The ID of a connection, LAG, or interconnect for which to get the LOA-CFA - // information. - // - // Example: dxcon-abc123 or dxlag-abc123 - // - // Default: None + // The ID of a connection, LAG, or interconnect. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` // The name of the service provider who establishes connectivity on your behalf. - // If you supply this parameter, the LOA-CFA lists the provider name alongside + // If you specify this parameter, the LOA-CFA lists the provider name alongside // your company name as the requester of the cross connect. - // - // Default: None ProviderName *string `locationName:"providerName" type:"string"` } @@ -7148,15 +6737,10 @@ func (s DescribeLocationsInput) GoString() string { return s.String() } -// A location is a network facility where AWS Direct Connect routers are available -// to be connected. Generally, these are colocation hubs where many network -// providers have equipment, and where cross connects can be delivered. Locations -// include a name and facility code, and must be provided when creating a connection. type DescribeLocationsOutput struct { _ struct{} `type:"structure"` - // A list of colocation hubs where network providers have equipment. Most regions - // have multiple locations available. + // The locations. Locations []*Location `locationName:"locations" type:"list"` } @@ -7176,11 +6760,10 @@ func (s *DescribeLocationsOutput) SetLocations(v []*Location) *DescribeLocations return s } -// Container for the parameters to the DescribeTags operation. type DescribeTagsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Names (ARNs) of the Direct Connect resources. + // The Amazon Resource Names (ARNs) of the resources. // // ResourceArns is a required field ResourceArns []*string `locationName:"resourceArns" type:"list" required:"true"` @@ -7215,7 +6798,6 @@ func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput { return s } -// The response received when DescribeTags is called. type DescribeTagsOutput struct { _ struct{} `type:"structure"` @@ -7253,11 +6835,10 @@ func (s DescribeVirtualGatewaysInput) GoString() string { return s.String() } -// A structure containing a list of virtual private gateways. type DescribeVirtualGatewaysOutput struct { _ struct{} `type:"structure"` - // A list of virtual private gateways. + // The virtual private gateways. VirtualGateways []*VirtualGateway `locationName:"virtualGateways" type:"list"` } @@ -7277,23 +6858,13 @@ func (s *DescribeVirtualGatewaysOutput) SetVirtualGateways(v []*VirtualGateway) return s } -// Container for the parameters to the DescribeVirtualInterfaces operation. type DescribeVirtualInterfacesInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` // The ID of the virtual interface. - // - // Example: dxvif-123dfg56 - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -7319,11 +6890,10 @@ func (s *DescribeVirtualInterfacesInput) SetVirtualInterfaceId(v string) *Descri return s } -// A structure containing a list of virtual interfaces. type DescribeVirtualInterfacesOutput struct { _ struct{} `type:"structure"` - // A list of virtual interfaces. + // The virtual interfaces VirtualInterfaces []*VirtualInterface `locationName:"virtualInterfaces" type:"list"` } @@ -7343,24 +6913,15 @@ func (s *DescribeVirtualInterfacesOutput) SetVirtualInterfaces(v []*VirtualInter return s } -// Container for the parameters to the DisassociateConnectionFromLag operation. type DisassociateConnectionFromLagInput struct { _ struct{} `type:"structure"` - // The ID of the connection to disassociate from the LAG. - // - // Example: dxcon-abc123 - // - // Default: None + // The ID of the connection. For example, dxcon-abc123. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // The ID of the LAG. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG. For example, dxlag-abc123. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` @@ -7404,7 +6965,7 @@ func (s *DisassociateConnectionFromLagInput) SetLagId(v string) *DisassociateCon return s } -// A direct connect gateway is an intermediate object that enables you to connect +// Information about a Direct Connect gateway, which enables you to connect // virtual interfaces and virtual private gateways. type Gateway struct { _ struct{} `type:"structure"` @@ -7412,33 +6973,27 @@ type Gateway struct { // The autonomous system number (ASN) for the Amazon side of the connection. AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The name of the direct connect gateway. - // - // Example: "My direct connect gateway" - // - // Default: None + // The name of the Direct Connect gateway. DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string"` - // State of the direct connect gateway. + // The state of the Direct Connect gateway. The following are the possible values: // - // * Pending: The initial state after calling CreateDirectConnectGateway. + // * pending: The initial state after calling CreateDirectConnectGateway. // - // * Available: The direct connect gateway is ready for use. + // * available: The Direct Connect gateway is ready for use. // - // * Deleting: The initial state after calling DeleteDirectConnectGateway. + // * deleting: The initial state after calling DeleteDirectConnectGateway. // - // * Deleted: The direct connect gateway is deleted and cannot pass traffic. + // * deleted: The Direct Connect gateway is deleted and cannot pass traffic. DirectConnectGatewayState *string `locationName:"directConnectGatewayState" type:"string" enum:"GatewayState"` - // The AWS account ID of the owner of the direct connect gateway. + // The ID of the AWS account that owns the Direct Connect gateway. OwnerAccount *string `locationName:"ownerAccount" type:"string"` - // Error message when the state of an object fails to advance. + // The error message if the state of an object failed to advance. StateChangeError *string `locationName:"stateChangeError" type:"string"` } @@ -7488,44 +7043,38 @@ func (s *Gateway) SetStateChangeError(v string) *Gateway { return s } -// The association between a direct connect gateway and virtual private gateway. +// Information about an association between a Direct Connect gateway and a virtual +// private gateway. type GatewayAssociation struct { _ struct{} `type:"structure"` - // State of the direct connect gateway association. + // The state of the association. The following are the possible values: // - // * Associating: The initial state after calling CreateDirectConnectGatewayAssociation. + // * associating: The initial state after calling CreateDirectConnectGatewayAssociation. // - // * Associated: The direct connect gateway and virtual private gateway are + // * associated: The Direct Connect gateway and virtual private gateway are // successfully associated and ready to pass traffic. // - // * Disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. + // * disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. // - // * Disassociated: The virtual private gateway is successfully disassociated - // from the direct connect gateway. Traffic flow between the direct connect - // gateway and virtual private gateway stops. + // * disassociated: The virtual private gateway is disassociated from the + // Direct Connect gateway. Traffic flow between the Direct Connect gateway + // and virtual private gateway is stopped. AssociationState *string `locationName:"associationState" type:"string" enum:"GatewayAssociationState"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // Error message when the state of an object fails to advance. + // The error message if the state of an object failed to advance. StateChangeError *string `locationName:"stateChangeError" type:"string"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. - // - // Example: vgw-123er56 + // The ID of the virtual private gateway. Applies only to private virtual interfaces. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - // The AWS account ID of the owner of the virtual private gateway. + // The ID of the AWS account that owns the virtual private gateway. VirtualGatewayOwnerAccount *string `locationName:"virtualGatewayOwnerAccount" type:"string"` - // The region in which the virtual private gateway is located. - // - // Example: us-east-1 + // The AWS Region where the virtual private gateway is located. VirtualGatewayRegion *string `locationName:"virtualGatewayRegion" type:"string"` } @@ -7575,47 +7124,39 @@ func (s *GatewayAssociation) SetVirtualGatewayRegion(v string) *GatewayAssociati return s } -// The association between a direct connect gateway and virtual interface. +// Information about an attachment between a Direct Connect gateway and a virtual +// interface. type GatewayAttachment struct { _ struct{} `type:"structure"` - // State of the direct connect gateway attachment. + // The state of the attachment. The following are the possible values: // - // * Attaching: The initial state after a virtual interface is created using - // the direct connect gateway. + // * attaching: The initial state after a virtual interface is created using + // the Direct Connect gateway. // - // * Attached: The direct connect gateway and virtual interface are successfully - // attached and ready to pass traffic. + // * attached: The Direct Connect gateway and virtual interface are attached + // and ready to pass traffic. // - // * Detaching: The initial state after calling DeleteVirtualInterface on - // a virtual interface that is attached to a direct connect gateway. + // * detaching: The initial state after calling DeleteVirtualInterface. // - // * Detached: The virtual interface is successfully detached from the direct - // connect gateway. Traffic flow between the direct connect gateway and virtual - // interface stops. + // * detached: The virtual interface is detached from the Direct Connect + // gateway. Traffic flow between the Direct Connect gateway and virtual interface + // is stopped. AttachmentState *string `locationName:"attachmentState" type:"string" enum:"GatewayAttachmentState"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // Error message when the state of an object fails to advance. + // The error message if the state of an object failed to advance. StateChangeError *string `locationName:"stateChangeError" type:"string"` // The ID of the virtual interface. - // - // Example: dxvif-123dfg56 - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` - // The AWS account ID of the owner of the virtual interface. + // The ID of the AWS account that owns the virtual interface. VirtualInterfaceOwnerAccount *string `locationName:"virtualInterfaceOwnerAccount" type:"string"` - // The region in which the virtual interface is located. - // - // Example: us-east-1 + // The AWS Region where the virtual interface is located. VirtualInterfaceRegion *string `locationName:"virtualInterfaceRegion" type:"string"` } @@ -7665,84 +7206,56 @@ func (s *GatewayAttachment) SetVirtualInterfaceRegion(v string) *GatewayAttachme return s } -// An interconnect is a connection that can host other connections. -// -// Like a standard AWS Direct Connect connection, an interconnect represents -// the physical connection between an AWS Direct Connect partner's network and -// a specific Direct Connect location. An AWS Direct Connect partner who owns -// an interconnect can provision hosted connections on the interconnect for -// their end customers, thereby providing the end customers with connectivity -// to AWS services. -// -// The resources of the interconnect, including bandwidth and VLAN numbers, -// are shared by all of the hosted connections on the interconnect, and the -// owner of the interconnect determines how these resources are assigned. +// Information about an interconnect. type Interconnect struct { _ struct{} `type:"structure"` - // Deprecated in favor of awsDeviceV2. - // - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // Bandwidth of the connection. - // - // Example: 1Gbps - // - // Default: None + // The bandwidth of the connection. Bandwidth *string `locationName:"bandwidth" type:"string"` // The ID of the interconnect. - // - // Example: dxcon-abc123 InterconnectId *string `locationName:"interconnectId" type:"string"` // The name of the interconnect. - // - // Example: "1G Interconnect to AWS" InterconnectName *string `locationName:"interconnectName" type:"string"` - // State of the interconnect. + // The state of the interconnect. The following are the possible values: // - // * Requested: The initial state of an interconnect. The interconnect stays + // * requested: The initial state of an interconnect. The interconnect stays // in the requested state until the Letter of Authorization (LOA) is sent // to the customer. // - // * Pending: The interconnect has been approved, and is being initialized. + // * pending: The interconnect is approved, and is being initialized. // - // * Available: The network link is up, and the interconnect is ready for + // * available: The network link is up, and the interconnect is ready for // use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The interconnect is in the process of being deleted. + // * deleting: The interconnect is being deleted. // - // * Deleted: The interconnect has been deleted. + // * deleted: The interconnect is deleted. InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` - // The time of the most recent call to DescribeInterconnectLoa for this Interconnect. + // The time of the most recent call to DescribeLoa for this connection. LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the connection. Location *string `locationName:"location" type:"string"` - // The AWS region where the connection is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the connection is located. Region *string `locationName:"region" type:"string"` } @@ -7792,6 +7305,12 @@ func (s *Interconnect) SetInterconnectState(v string) *Interconnect { return s } +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *Interconnect) SetJumboFrameCapable(v bool) *Interconnect { + s.JumboFrameCapable = &v + return s +} + // SetLagId sets the LagId field's value. func (s *Interconnect) SetLagId(v string) *Interconnect { s.LagId = &v @@ -7816,86 +7335,67 @@ func (s *Interconnect) SetRegion(v string) *Interconnect { return s } -// Describes a link aggregation group (LAG). A LAG is a connection that uses -// the Link Aggregation Control Protocol (LACP) to logically aggregate a bundle -// of physical connections. Like an interconnect, it can host other connections. -// All connections in a LAG must terminate on the same physical AWS Direct Connect -// endpoint, and must be the same bandwidth. +// Information about a link aggregation group (LAG). type Lag struct { _ struct{} `type:"structure"` // Indicates whether the LAG can host other connections. - // - // This is intended for use by AWS Direct Connect partners only. AllowsHostedConnections *bool `locationName:"allowsHostedConnections" type:"boolean"` - // Deprecated in favor of awsDeviceV2. - // - // The AWS Direct Connection endpoint that hosts the LAG. + // The Direct Connect endpoint that hosts the LAG. AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - // The AWS Direct Connection endpoint that hosts the LAG. + // The Direct Connect endpoint that hosts the LAG. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // A list of connections bundled by this LAG. + // The connections bundled by the LAG. Connections []*Connection `locationName:"connections" type:"list"` // The individual bandwidth of the physical connections bundled by the LAG. - // - // Available values: 1Gbps, 10Gbps + // The possible values are 1Gbps and 10Gbps. ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string"` + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` // The name of the LAG. LagName *string `locationName:"lagName" type:"string"` - // The state of the LAG. + // The state of the LAG. The following are the possible values: // - // * Requested: The initial state of a LAG. The LAG stays in the requested + // * requested: The initial state of a LAG. The LAG stays in the requested // state until the Letter of Authorization (LOA) is available. // - // * Pending: The LAG has been approved, and is being initialized. + // * pending: The LAG has been approved and is being initialized. // - // * Available: The network link is established, and the LAG is ready for + // * available: The network link is established and the LAG is ready for // use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The LAG is in the process of being deleted. + // * deleting: The LAG is being deleted. // - // * Deleted: The LAG has been deleted. + // * deleted: The LAG is deleted. LagState *string `locationName:"lagState" type:"string" enum:"LagState"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the LAG. Location *string `locationName:"location" type:"string"` // The minimum number of physical connections that must be operational for the - // LAG itself to be operational. If the number of operational connections drops - // below this setting, the LAG state changes to down. This value can help to - // ensure that a LAG is not overutilized if a significant number of its bundled - // connections go down. + // LAG itself to be operational. MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` // The number of physical connections bundled by the LAG, up to a maximum of // 10. NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer"` - // The owner of the LAG. + // The ID of the AWS account that owns the LAG. OwnerAccount *string `locationName:"ownerAccount" type:"string"` - // The AWS region where the connection is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the connection is located. Region *string `locationName:"region" type:"string"` } @@ -7939,6 +7439,12 @@ func (s *Lag) SetConnectionsBandwidth(v string) *Lag { return s } +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *Lag) SetJumboFrameCapable(v bool) *Lag { + s.JumboFrameCapable = &v + return s +} + // SetLagId sets the LagId field's value. func (s *Lag) SetLagId(v string) *Lag { s.LagId = &v @@ -7987,8 +7493,8 @@ func (s *Lag) SetRegion(v string) *Lag { return s } -// A structure containing the Letter of Authorization - Connecting Facility -// Assignment (LOA-CFA) for a connection. +// Information about a Letter of Authorization - Connecting Facility Assignment +// (LOA-CFA) for a connection. type Loa struct { _ struct{} `type:"structure"` @@ -7997,10 +7503,8 @@ type Loa struct { // LoaContent is automatically base64 encoded/decoded by the SDK. LoaContent []byte `locationName:"loaContent" type:"blob"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` } @@ -8026,23 +7530,18 @@ func (s *Loa) SetLoaContentType(v string) *Loa { return s } -// An AWS Direct Connect location where connections and interconnects can be -// requested. +// Information about an AWS Direct Connect location. type Location struct { _ struct{} `type:"structure"` - // The code used to indicate the AWS Direct Connect location. + // The code for the location. LocationCode *string `locationName:"locationCode" type:"string"` - // The name of the AWS Direct Connect location. The name includes the colocation - // partner name and the physical site of the lit building. + // The name of the location. This includes the name of the colocation partner + // and the physical site of the building. LocationName *string `locationName:"locationName" type:"string"` - // The AWS region where the AWS Direct connect location is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region for the location. Region *string `locationName:"region" type:"string"` } @@ -8074,35 +7573,23 @@ func (s *Location) SetRegion(v string) *Location { return s } -// A structure containing information about a new BGP peer. +// Information about a new BGP peer. type NewBGPPeer struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` } @@ -8146,60 +7633,43 @@ func (s *NewBGPPeer) SetCustomerAddress(v string) *NewBGPPeer { return s } -// A structure containing information about a new private virtual interface. +// Information about a private virtual interface. type NewPrivateVirtualInterface struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. - // - // Example: vgw-123er56 + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the virtual private gateway. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8270,6 +7740,12 @@ func (s *NewPrivateVirtualInterface) SetDirectConnectGatewayId(v string) *NewPri return s } +// SetMtu sets the Mtu field's value. +func (s *NewPrivateVirtualInterface) SetMtu(v int64) *NewPrivateVirtualInterface { + s.Mtu = &v + return s +} + // SetVirtualGatewayId sets the VirtualGatewayId field's value. func (s *NewPrivateVirtualInterface) SetVirtualGatewayId(v string) *NewPrivateVirtualInterface { s.VirtualGatewayId = &v @@ -8288,50 +7764,37 @@ func (s *NewPrivateVirtualInterface) SetVlan(v int64) *NewPrivateVirtualInterfac return s } -// A structure containing information about a private virtual interface that -// will be provisioned on a connection. +// Information about a private virtual interface to be provisioned on a connection. type NewPrivateVirtualInterfaceAllocation struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8396,6 +7859,12 @@ func (s *NewPrivateVirtualInterfaceAllocation) SetCustomerAddress(v string) *New return s } +// SetMtu sets the Mtu field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetMtu(v int64) *NewPrivateVirtualInterfaceAllocation { + s.Mtu = &v + return s +} + // SetVirtualInterfaceName sets the VirtualInterfaceName field's value. func (s *NewPrivateVirtualInterfaceAllocation) SetVirtualInterfaceName(v string) *NewPrivateVirtualInterfaceAllocation { s.VirtualInterfaceName = &v @@ -8408,53 +7877,37 @@ func (s *NewPrivateVirtualInterfaceAllocation) SetVlan(v int64) *NewPrivateVirtu return s } -// A structure containing information about a new public virtual interface. +// Information about a public virtual interface. type NewPublicVirtualInterface struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // A list of routes to be advertised to the AWS network in this region (public - // virtual interface). + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8537,54 +7990,37 @@ func (s *NewPublicVirtualInterface) SetVlan(v int64) *NewPublicVirtualInterface return s } -// A structure containing information about a public virtual interface that -// will be provisioned on a connection. +// Information about a public virtual interface to be provisioned on a connection. type NewPublicVirtualInterfaceAllocation struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // A list of routes to be advertised to the AWS network in this region (public - // virtual interface). + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8667,11 +8103,11 @@ func (s *NewPublicVirtualInterfaceAllocation) SetVlan(v int64) *NewPublicVirtual return s } -// The tags associated with a Direct Connect resource. +// Information about a tag associated with an AWS Direct Connect resource. type ResourceTag struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Direct Connect resource. + // The Amazon Resource Name (ARN) of the resource. ResourceArn *string `locationName:"resourceArn" type:"string"` // The tags. @@ -8700,17 +8136,13 @@ func (s *ResourceTag) SetTags(v []*Tag) *ResourceTag { return s } -// A route filter prefix that the customer can advertise through Border Gateway -// Protocol (BGP) over a public virtual interface. +// Information about a route filter prefix that a customer can advertise through +// Border Gateway Protocol (BGP) over a public virtual interface. type RouteFilterPrefix struct { _ struct{} `type:"structure"` - // CIDR notation for the advertised route. Multiple routes are separated by - // commas. - // - // IPv6 CIDRs must be at least a /64 or shorter - // - // Example: 10.10.10.0/24,10.10.11.0/24,2001:db8::/64 + // The CIDR block for the advertised route. Separate multiple routes using commas. + // An IPv6 CIDR must use /64 or shorter. Cidr *string `locationName:"cidr" type:"string"` } @@ -8734,12 +8166,12 @@ func (s *RouteFilterPrefix) SetCidr(v string) *RouteFilterPrefix { type Tag struct { _ struct{} `type:"structure"` - // The key of the tag. + // The key. // // Key is a required field Key *string `locationName:"key" min:"1" type:"string" required:"true"` - // The value of the tag. + // The value. Value *string `locationName:"value" type:"string"` } @@ -8781,18 +8213,15 @@ func (s *Tag) SetValue(v string) *Tag { return s } -// Container for the parameters to the TagResource operation. type TagResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Direct Connect resource. - // - // Example: arn:aws:directconnect:us-east-1:123456789012:dxcon/dxcon-fg5678gh + // The Amazon Resource Name (ARN) of the resource. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - // The list of tags to add. + // The tags to add. // // Tags is a required field Tags []*Tag `locationName:"tags" min:"1" type:"list" required:"true"` @@ -8849,7 +8278,6 @@ func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { return s } -// The response received when TagResource is called. type TagResourceOutput struct { _ struct{} `type:"structure"` } @@ -8864,16 +8292,15 @@ func (s TagResourceOutput) GoString() string { return s.String() } -// Container for the parameters to the UntagResource operation. type UntagResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Direct Connect resource. + // The Amazon Resource Name (ARN) of the resource. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - // The list of tag keys to remove. + // The tag keys of the tags to remove. // // TagKeys is a required field TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` @@ -8917,7 +8344,6 @@ func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { return s } -// The response received when UntagResource is called. type UntagResourceOutput struct { _ struct{} `type:"structure"` } @@ -8932,30 +8358,19 @@ func (s UntagResourceOutput) GoString() string { return s.String() } -// Container for the parameters to the UpdateLag operation. type UpdateLagInput struct { _ struct{} `type:"structure"` - // The ID of the LAG to update. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` - // The name for the LAG. - // - // Example: "3x10G LAG to AWS" - // - // Default: None + // The name of the LAG. LagName *string `locationName:"lagName" type:"string"` // The minimum number of physical connections that must be operational for the // LAG itself to be operational. - // - // Default: None MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` } @@ -9000,30 +8415,323 @@ func (s *UpdateLagInput) SetMinimumLinks(v int64) *UpdateLagInput { return s } -// You can create one or more AWS Direct Connect private virtual interfaces -// linking to your virtual private gateway. -// -// Virtual private gateways can be managed using the Amazon Virtual Private -// Cloud (Amazon VPC) console or the Amazon EC2 CreateVpnGateway action (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html). -type VirtualGateway struct { +type UpdateVirtualInterfaceAttributesInput struct { _ struct{} `type:"structure"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the virtual private interface. // - // Example: vgw-123er56 + // VirtualInterfaceId is a required field + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateVirtualInterfaceAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualInterfaceAttributesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVirtualInterfaceAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualInterfaceAttributesInput"} + if s.VirtualInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMtu sets the Mtu field's value. +func (s *UpdateVirtualInterfaceAttributesInput) SetMtu(v int64) *UpdateVirtualInterfaceAttributesInput { + s.Mtu = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *UpdateVirtualInterfaceAttributesInput) SetVirtualInterfaceId(v string) *UpdateVirtualInterfaceAttributesInput { + s.VirtualInterfaceId = &v + return s +} + +// Information about a virtual interface. +type UpdateVirtualInterfaceAttributesOutput struct { + _ struct{} `type:"structure"` + + // The address family for the BGP peer. + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // The IP address assigned to the Amazon interface. + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system number (ASN) for the Amazon side of the connection. + AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + Asn *int64 `locationName:"asn" type:"integer"` + + // The authentication key for BGP configuration. + AuthKey *string `locationName:"authKey" type:"string"` + + // The Direct Connect endpoint on which the virtual interface terminates. + AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` + + // The BGP peers configured on this virtual interface. + BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` + + // The ID of the connection. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // The IP address assigned to the customer interface. + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // The customer router configuration. + CustomerRouterConfig *string `locationName:"customerRouterConfig" type:"string"` + + // The ID of the Direct Connect gateway. + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + + // The location of the connection. + Location *string `locationName:"location" type:"string"` + + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the AWS account that owns the virtual interface. + OwnerAccount *string `locationName:"ownerAccount" type:"string"` + + // The AWS Region where the virtual interface is located. + Region *string `locationName:"region" type:"string"` + + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. + RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` + + // The ID of the virtual private gateway. Applies only to private virtual interfaces. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - // State of the virtual private gateway. + // The ID of the virtual interface. + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` + + // The name of the virtual interface assigned by the customer network. + VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string"` + + // The state of the virtual interface. The following are the possible values: + // + // * confirming: The creation of the virtual interface is pending confirmation + // from the virtual interface owner. If the owner of the virtual interface + // is different from the owner of the connection on which it is provisioned, + // then the virtual interface will remain in this state until it is confirmed + // by the virtual interface owner. // - // * Pending: This is the initial state after calling CreateVpnGateway. + // * verifying: This state only applies to public virtual interfaces. Each + // public virtual interface needs validation before the virtual interface + // can be created. + // + // * pending: A virtual interface is in this state from the time that it + // is created until the virtual interface is ready to forward traffic. // - // * Available: Ready for use by a private virtual interface. + // * available: A virtual interface that is able to forward traffic. + // + // * down: A virtual interface that is BGP down. + // + // * deleting: A virtual interface is in this state immediately after calling + // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleting: This is the initial state after calling DeleteVpnGateway. + // * deleted: A virtual interface that cannot forward traffic. // - // * Deleted: In this state, a private virtual interface is unable to send - // traffic over this gateway. + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected + // state. + VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` + + // The type of virtual interface. The possible values are private and public. + VirtualInterfaceType *string `locationName:"virtualInterfaceType" type:"string"` + + // The ID of the VLAN. + Vlan *int64 `locationName:"vlan" type:"integer"` +} + +// String returns the string representation +func (s UpdateVirtualInterfaceAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualInterfaceAttributesOutput) GoString() string { + return s.String() +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAddressFamily(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAmazonAddress(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AmazonAddress = &v + return s +} + +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAmazonSideAsn(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.AmazonSideAsn = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAsn(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAuthKey(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AuthKey = &v + return s +} + +// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAwsDeviceV2(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AwsDeviceV2 = &v + return s +} + +// SetBgpPeers sets the BgpPeers field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetBgpPeers(v []*BGPPeer) *UpdateVirtualInterfaceAttributesOutput { + s.BgpPeers = v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetConnectionId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.ConnectionId = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetCustomerAddress(v string) *UpdateVirtualInterfaceAttributesOutput { + s.CustomerAddress = &v + return s +} + +// SetCustomerRouterConfig sets the CustomerRouterConfig field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetCustomerRouterConfig(v string) *UpdateVirtualInterfaceAttributesOutput { + s.CustomerRouterConfig = &v + return s +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetDirectConnectGatewayId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.DirectConnectGatewayId = &v + return s +} + +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetJumboFrameCapable(v bool) *UpdateVirtualInterfaceAttributesOutput { + s.JumboFrameCapable = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetLocation(v string) *UpdateVirtualInterfaceAttributesOutput { + s.Location = &v + return s +} + +// SetMtu sets the Mtu field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetMtu(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.Mtu = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetOwnerAccount(v string) *UpdateVirtualInterfaceAttributesOutput { + s.OwnerAccount = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetRegion(v string) *UpdateVirtualInterfaceAttributesOutput { + s.Region = &v + return s +} + +// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *UpdateVirtualInterfaceAttributesOutput { + s.RouteFilterPrefixes = v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualGatewayId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualGatewayId = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceId = &v + return s +} + +// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceName(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceName = &v + return s +} + +// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceState(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceState = &v + return s +} + +// SetVirtualInterfaceType sets the VirtualInterfaceType field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceType(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceType = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVlan(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.Vlan = &v + return s +} + +// Information about a virtual private gateway for a private virtual interface. +type VirtualGateway struct { + _ struct{} `type:"structure"` + + // The ID of the virtual private gateway. + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` + + // The state of the virtual private gateway. The following are the possible + // values: + // + // * pending: Initial state after creating the virtual private gateway. + // + // * available: Ready for use by a private virtual interface. + // + // * deleting: Initial state after deleting the virtual private gateway. + // + // * deleted: The virtual private gateway is deleted. The private virtual + // interface is unable to send traffic over this gateway. VirtualGatewayState *string `locationName:"virtualGatewayState" type:"string"` } @@ -9049,141 +8757,106 @@ func (s *VirtualGateway) SetVirtualGatewayState(v string) *VirtualGateway { return s } -// A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect -// location and the customer. +// Information about a virtual interface. type VirtualInterface struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system number (ASN) for the Amazon side of the connection. AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // The Direct Connection endpoint which the virtual interface terminates on. + // The Direct Connect endpoint on which the virtual interface terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // A list of the BGP peers configured on this virtual interface. + // The BGP peers configured on this virtual interface. BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // Information for generating the customer router configuration. + // The customer router configuration. CustomerRouterConfig *string `locationName:"customerRouterConfig" type:"string"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + + // The location of the connection. Location *string `locationName:"location" type:"string"` - // The AWS account that will own the new virtual interface. + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the AWS account that owns the virtual interface. OwnerAccount *string `locationName:"ownerAccount" type:"string"` - // The AWS region where the virtual interface is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the virtual interface is located. Region *string `locationName:"region" type:"string"` - // A list of routes to be advertised to the AWS network in this region (public - // virtual interface). + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. - // - // Example: vgw-123er56 + // The ID of the virtual private gateway. Applies only to private virtual interfaces. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` // The ID of the virtual interface. - // - // Example: dxvif-123dfg56 - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` - // The type of virtual interface. - // - // Example: private (Amazon VPC) or public (Amazon S3, Amazon DynamoDB, and - // so on.) + // The type of virtual interface. The possible values are private and public. VirtualInterfaceType *string `locationName:"virtualInterfaceType" type:"string"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. Vlan *int64 `locationName:"vlan" type:"integer"` } @@ -9263,12 +8936,24 @@ func (s *VirtualInterface) SetDirectConnectGatewayId(v string) *VirtualInterface return s } +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *VirtualInterface) SetJumboFrameCapable(v bool) *VirtualInterface { + s.JumboFrameCapable = &v + return s +} + // SetLocation sets the Location field's value. func (s *VirtualInterface) SetLocation(v string) *VirtualInterface { s.Location = &v return s } +// SetMtu sets the Mtu field's value. +func (s *VirtualInterface) SetMtu(v int64) *VirtualInterface { + s.Mtu = &v + return s +} + // SetOwnerAccount sets the OwnerAccount field's value. func (s *VirtualInterface) SetOwnerAccount(v string) *VirtualInterface { s.OwnerAccount = &v @@ -9323,11 +9008,6 @@ func (s *VirtualInterface) SetVlan(v int64) *VirtualInterface { return s } -// Indicates the address family for the BGP peer. -// -// * ipv4: IPv4 address family -// -// * ipv6: IPv6 address family const ( // AddressFamilyIpv4 is a AddressFamily enum value AddressFamilyIpv4 = "ipv4" @@ -9336,20 +9016,6 @@ const ( AddressFamilyIpv6 = "ipv6" ) -// The state of the BGP peer. -// -// * Verifying: The BGP peering addresses or ASN require validation before -// the BGP peer can be created. This state only applies to BGP peers on a -// public virtual interface. -// -// * Pending: The BGP peer has been created, and is in this state until it -// is ready to be established. -// -// * Available: The BGP peer can be established. -// -// * Deleting: The BGP peer is in the process of being deleted. -// -// * Deleted: The BGP peer has been deleted and cannot be established. const ( // BGPPeerStateVerifying is a BGPPeerState enum value BGPPeerStateVerifying = "verifying" @@ -9367,14 +9033,6 @@ const ( BGPPeerStateDeleted = "deleted" ) -// The Up/Down state of the BGP peer. -// -// * Up: The BGP peer is established. -// -// A state of up does not indicate the state of the routing function. Ensure -// that you are receiving routes over the BGP session. -// -// * Down: The BGP peer is down. const ( // BGPStatusUp is a BGPStatus enum value BGPStatusUp = "up" @@ -9383,28 +9041,6 @@ const ( BGPStatusDown = "down" ) -// State of the connection. -// -// * Ordering: The initial state of a hosted connection provisioned on an -// interconnect. The connection stays in the ordering state until the owner -// of the hosted connection confirms or declines the connection order. -// -// * Requested: The initial state of a standard connection. The connection -// stays in the requested state until the Letter of Authorization (LOA) is -// sent to the customer. -// -// * Pending: The connection has been approved, and is being initialized. -// -// * Available: The network link is up, and the connection is ready for use. -// -// * Down: The network link is down. -// -// * Deleting: The connection is in the process of being deleted. -// -// * Deleted: The connection has been deleted. -// -// * Rejected: A hosted connection in the 'Ordering' state will enter the -// 'Rejected' state if it is deleted by the end customer. const ( // ConnectionStateOrdering is a ConnectionState enum value ConnectionStateOrdering = "ordering" @@ -9431,18 +9067,6 @@ const ( ConnectionStateRejected = "rejected" ) -// State of the direct connect gateway association. -// -// * Associating: The initial state after calling CreateDirectConnectGatewayAssociation. -// -// * Associated: The direct connect gateway and virtual private gateway are -// successfully associated and ready to pass traffic. -// -// * Disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. -// -// * Disassociated: The virtual private gateway is successfully disassociated -// from the direct connect gateway. Traffic flow between the direct connect -// gateway and virtual private gateway stops. const ( // GatewayAssociationStateAssociating is a GatewayAssociationState enum value GatewayAssociationStateAssociating = "associating" @@ -9457,20 +9081,6 @@ const ( GatewayAssociationStateDisassociated = "disassociated" ) -// State of the direct connect gateway attachment. -// -// * Attaching: The initial state after a virtual interface is created using -// the direct connect gateway. -// -// * Attached: The direct connect gateway and virtual interface are successfully -// attached and ready to pass traffic. -// -// * Detaching: The initial state after calling DeleteVirtualInterface on -// a virtual interface that is attached to a direct connect gateway. -// -// * Detached: The virtual interface is successfully detached from the direct -// connect gateway. Traffic flow between the direct connect gateway and virtual -// interface stops. const ( // GatewayAttachmentStateAttaching is a GatewayAttachmentState enum value GatewayAttachmentStateAttaching = "attaching" @@ -9485,15 +9095,6 @@ const ( GatewayAttachmentStateDetached = "detached" ) -// State of the direct connect gateway. -// -// * Pending: The initial state after calling CreateDirectConnectGateway. -// -// * Available: The direct connect gateway is ready for use. -// -// * Deleting: The initial state after calling DeleteDirectConnectGateway. -// -// * Deleted: The direct connect gateway is deleted and cannot pass traffic. const ( // GatewayStatePending is a GatewayState enum value GatewayStatePending = "pending" @@ -9508,22 +9109,6 @@ const ( GatewayStateDeleted = "deleted" ) -// State of the interconnect. -// -// * Requested: The initial state of an interconnect. The interconnect stays -// in the requested state until the Letter of Authorization (LOA) is sent -// to the customer. -// -// * Pending: The interconnect has been approved, and is being initialized. -// -// * Available: The network link is up, and the interconnect is ready for -// use. -// -// * Down: The network link is down. -// -// * Deleting: The interconnect is in the process of being deleted. -// -// * Deleted: The interconnect has been deleted. const ( // InterconnectStateRequested is a InterconnectState enum value InterconnectStateRequested = "requested" @@ -9544,21 +9129,6 @@ const ( InterconnectStateDeleted = "deleted" ) -// The state of the LAG. -// -// * Requested: The initial state of a LAG. The LAG stays in the requested -// state until the Letter of Authorization (LOA) is available. -// -// * Pending: The LAG has been approved, and is being initialized. -// -// * Available: The network link is established, and the LAG is ready for -// use. -// -// * Down: The network link is down. -// -// * Deleting: The LAG is in the process of being deleted. -// -// * Deleted: The LAG has been deleted. const ( // LagStateRequested is a LagState enum value LagStateRequested = "requested" @@ -9579,43 +9149,11 @@ const ( LagStateDeleted = "deleted" ) -// A standard media type indicating the content type of the LOA-CFA document. -// Currently, the only supported value is "application/pdf". -// -// Default: application/pdf const ( // LoaContentTypeApplicationPdf is a LoaContentType enum value LoaContentTypeApplicationPdf = "application/pdf" ) -// State of the virtual interface. -// -// * Confirming: The creation of the virtual interface is pending confirmation -// from the virtual interface owner. If the owner of the virtual interface -// is different from the owner of the connection on which it is provisioned, -// then the virtual interface will remain in this state until it is confirmed -// by the virtual interface owner. -// -// * Verifying: This state only applies to public virtual interfaces. Each -// public virtual interface needs validation before the virtual interface -// can be created. -// -// * Pending: A virtual interface is in this state from the time that it -// is created until the virtual interface is ready to forward traffic. -// -// * Available: A virtual interface that is able to forward traffic. -// -// * Down: A virtual interface that is BGP down. -// -// * Deleting: A virtual interface is in this state immediately after calling -// DeleteVirtualInterface until it can no longer forward traffic. -// -// * Deleted: A virtual interface that cannot forward traffic. -// -// * Rejected: The virtual interface owner has declined creation of the virtual -// interface. If a virtual interface in the 'Confirming' state is deleted -// by the virtual interface owner, the virtual interface will enter the 'Rejected' -// state. const ( // VirtualInterfaceStateConfirming is a VirtualInterfaceState enum value VirtualInterfaceStateConfirming = "confirming" diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go index 277fbe626ff..de61cdbfa78 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go @@ -4,17 +4,14 @@ // requests to AWS Direct Connect. // // AWS Direct Connect links your internal network to an AWS Direct Connect location -// over a standard 1 gigabit or 10 gigabit Ethernet fiber-optic cable. One end -// of the cable is connected to your router, the other to an AWS Direct Connect -// router. With this connection in place, you can create virtual interfaces -// directly to the AWS cloud (for example, to Amazon Elastic Compute Cloud (Amazon -// EC2) and Amazon Simple Storage Service (Amazon S3)) and to Amazon Virtual -// Private Cloud (Amazon VPC), bypassing Internet service providers in your -// network path. An AWS Direct Connect location provides access to AWS in the -// region it is associated with, as well as access to other US regions. For -// example, you can provision a single connection to any AWS Direct Connect -// location in the US and use it to access public AWS services in all US Regions -// and AWS GovCloud (US). +// over a standard Ethernet fiber-optic cable. One end of the cable is connected +// to your router, the other to an AWS Direct Connect router. With this connection +// in place, you can create virtual interfaces directly to the AWS cloud (for +// example, to Amazon EC2 and Amazon S3) and to Amazon VPC, bypassing Internet +// service providers in your network path. A connection provides access to all +// AWS Regions except the China (Beijing) and (China) Ningxia Regions. AWS resources +// in the China Regions can only be accessed through locations associated with +// those Regions. // // See https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go index 454cfe5ae58..9d6f810311e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go @@ -7,8 +7,7 @@ const ( // ErrCodeClientException for service response error code // "DirectConnectClientException". // - // The API was called with invalid parameters. The error message will contain - // additional details about the cause. + // One or more parameters are not valid. ErrCodeClientException = "DirectConnectClientException" // ErrCodeDuplicateTagKeysException for service response error code @@ -20,14 +19,12 @@ const ( // ErrCodeServerException for service response error code // "DirectConnectServerException". // - // A server-side error occurred during the API call. The error message will - // contain additional details about the cause. + // A server-side error occurred. ErrCodeServerException = "DirectConnectServerException" // ErrCodeTooManyTagsException for service response error code // "TooManyTagsException". // - // You have reached the limit on the number of tags that can be assigned to - // a Direct Connect resource. + // You have reached the limit on the number of tags that can be assigned. ErrCodeTooManyTagsException = "TooManyTagsException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go index 5febece4957..f7f0fa7c476 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go @@ -16,7 +16,7 @@ const opAcceptSharedDirectory = "AcceptSharedDirectory" // AcceptSharedDirectoryRequest generates a "aws/request.Request" representing the // client's request for the AcceptSharedDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -108,7 +108,7 @@ const opAddIpRoutes = "AddIpRoutes" // AddIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the AddIpRoutes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -215,7 +215,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -308,7 +308,7 @@ const opCancelSchemaExtension = "CancelSchemaExtension" // CancelSchemaExtensionRequest generates a "aws/request.Request" representing the // client's request for the CancelSchemaExtension operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -396,7 +396,7 @@ const opConnectDirectory = "ConnectDirectory" // ConnectDirectoryRequest generates a "aws/request.Request" representing the // client's request for the ConnectDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -491,7 +491,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -587,7 +587,7 @@ const opCreateComputer = "CreateComputer" // CreateComputerRequest generates a "aws/request.Request" representing the // client's request for the CreateComputer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -688,7 +688,7 @@ const opCreateConditionalForwarder = "CreateConditionalForwarder" // CreateConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the CreateConditionalForwarder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -787,7 +787,7 @@ const opCreateDirectory = "CreateDirectory" // CreateDirectoryRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -882,7 +882,7 @@ const opCreateLogSubscription = "CreateLogSubscription" // CreateLogSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateLogSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -977,7 +977,7 @@ const opCreateMicrosoftAD = "CreateMicrosoftAD" // CreateMicrosoftADRequest generates a "aws/request.Request" representing the // client's request for the CreateMicrosoftAD operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1016,7 +1016,7 @@ func (c *DirectoryService) CreateMicrosoftADRequest(input *CreateMicrosoftADInpu // CreateMicrosoftAD API operation for AWS Directory Service. // -// Creates a Microsoft AD in the AWS cloud. +// Creates an AWS Managed Microsoft AD directory. // // Before you call CreateMicrosoftAD, ensure that all of the required permissions // have been explicitly granted through a policy. For details about what permissions @@ -1075,7 +1075,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1170,7 +1170,7 @@ const opCreateTrust = "CreateTrust" // CreateTrustRequest generates a "aws/request.Request" representing the // client's request for the CreateTrust operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1211,12 +1211,13 @@ func (c *DirectoryService) CreateTrustRequest(input *CreateTrustInput) (req *req // // AWS Directory Service for Microsoft Active Directory allows you to configure // trust relationships. For example, you can establish a trust between your -// Microsoft AD in the AWS cloud, and your existing on-premises Microsoft Active -// Directory. This would allow you to provide users and groups access to resources -// in either domain, with a single set of credentials. +// AWS Managed Microsoft AD directory, and your existing on-premises Microsoft +// Active Directory. This would allow you to provide users and groups access +// to resources in either domain, with a single set of credentials. // // This action initiates the creation of the AWS side of a trust relationship -// between a Microsoft AD in the AWS cloud and an external domain. +// between an AWS Managed Microsoft AD directory and an external domain. You +// can create either a forest trust or an external trust. // // 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 @@ -1271,7 +1272,7 @@ const opDeleteConditionalForwarder = "DeleteConditionalForwarder" // DeleteConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the DeleteConditionalForwarder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1365,7 +1366,7 @@ const opDeleteDirectory = "DeleteDirectory" // DeleteDirectoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1455,7 +1456,7 @@ const opDeleteLogSubscription = "DeleteLogSubscription" // DeleteLogSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteLogSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1543,7 +1544,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1631,7 +1632,7 @@ const opDeleteTrust = "DeleteTrust" // DeleteTrustRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrust operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1670,8 +1671,8 @@ func (c *DirectoryService) DeleteTrustRequest(input *DeleteTrustInput) (req *req // DeleteTrust API operation for AWS Directory Service. // -// Deletes an existing trust relationship between your Microsoft AD in the AWS -// cloud and an external domain. +// Deletes an existing trust relationship between your AWS Managed Microsoft +// AD directory and an external domain. // // 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 @@ -1723,7 +1724,7 @@ const opDeregisterEventTopic = "DeregisterEventTopic" // DeregisterEventTopicRequest generates a "aws/request.Request" representing the // client's request for the DeregisterEventTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1811,7 +1812,7 @@ const opDescribeConditionalForwarders = "DescribeConditionalForwarders" // DescribeConditionalForwardersRequest generates a "aws/request.Request" representing the // client's request for the DescribeConditionalForwarders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1908,7 +1909,7 @@ const opDescribeDirectories = "DescribeDirectories" // DescribeDirectoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2010,7 +2011,7 @@ const opDescribeDomainControllers = "DescribeDomainControllers" // DescribeDomainControllersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomainControllers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2160,7 +2161,7 @@ const opDescribeEventTopics = "DescribeEventTopics" // DescribeEventTopicsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventTopics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2252,7 +2253,7 @@ const opDescribeSharedDirectories = "DescribeSharedDirectories" // DescribeSharedDirectoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSharedDirectories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2346,7 +2347,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2444,7 +2445,7 @@ const opDescribeTrusts = "DescribeTrusts" // DescribeTrustsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTrusts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2541,7 +2542,7 @@ const opDisableRadius = "DisableRadius" // DisableRadiusRequest generates a "aws/request.Request" representing the // client's request for the DisableRadius operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2628,7 +2629,7 @@ const opDisableSso = "DisableSso" // DisableSsoRequest generates a "aws/request.Request" representing the // client's request for the DisableSso operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2719,7 +2720,7 @@ const opEnableRadius = "EnableRadius" // EnableRadiusRequest generates a "aws/request.Request" representing the // client's request for the EnableRadius operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2812,7 +2813,7 @@ const opEnableSso = "EnableSso" // EnableSsoRequest generates a "aws/request.Request" representing the // client's request for the EnableSso operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2903,7 +2904,7 @@ const opGetDirectoryLimits = "GetDirectoryLimits" // GetDirectoryLimitsRequest generates a "aws/request.Request" representing the // client's request for the GetDirectoryLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2988,7 +2989,7 @@ const opGetSnapshotLimits = "GetSnapshotLimits" // GetSnapshotLimitsRequest generates a "aws/request.Request" representing the // client's request for the GetSnapshotLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3073,7 +3074,7 @@ const opListIpRoutes = "ListIpRoutes" // ListIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the ListIpRoutes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3164,7 +3165,7 @@ const opListLogSubscriptions = "ListLogSubscriptions" // ListLogSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the ListLogSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3252,7 +3253,7 @@ const opListSchemaExtensions = "ListSchemaExtensions" // ListSchemaExtensionsRequest generates a "aws/request.Request" representing the // client's request for the ListSchemaExtensions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3340,7 +3341,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3431,7 +3432,7 @@ const opRegisterEventTopic = "RegisterEventTopic" // RegisterEventTopicRequest generates a "aws/request.Request" representing the // client's request for the RegisterEventTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3524,7 +3525,7 @@ const opRejectSharedDirectory = "RejectSharedDirectory" // RejectSharedDirectoryRequest generates a "aws/request.Request" representing the // client's request for the RejectSharedDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3616,7 +3617,7 @@ const opRemoveIpRoutes = "RemoveIpRoutes" // RemoveIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the RemoveIpRoutes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3707,7 +3708,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3795,7 +3796,7 @@ const opResetUserPassword = "ResetUserPassword" // ResetUserPasswordRequest generates a "aws/request.Request" representing the // client's request for the ResetUserPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3894,7 +3895,7 @@ const opRestoreFromSnapshot = "RestoreFromSnapshot" // RestoreFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3990,7 +3991,7 @@ const opShareDirectory = "ShareDirectory" // ShareDirectoryRequest generates a "aws/request.Request" representing the // client's request for the ShareDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4114,7 +4115,7 @@ const opStartSchemaExtension = "StartSchemaExtension" // StartSchemaExtensionRequest generates a "aws/request.Request" representing the // client's request for the StartSchemaExtension operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4210,7 +4211,7 @@ const opUnshareDirectory = "UnshareDirectory" // UnshareDirectoryRequest generates a "aws/request.Request" representing the // client's request for the UnshareDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4301,7 +4302,7 @@ const opUpdateConditionalForwarder = "UpdateConditionalForwarder" // UpdateConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the UpdateConditionalForwarder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4395,7 +4396,7 @@ const opUpdateNumberOfDomainControllers = "UpdateNumberOfDomainControllers" // UpdateNumberOfDomainControllersRequest generates a "aws/request.Request" representing the // client's request for the UpdateNumberOfDomainControllers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4498,7 +4499,7 @@ const opUpdateRadius = "UpdateRadius" // UpdateRadiusRequest generates a "aws/request.Request" representing the // client's request for the UpdateRadius operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4582,12 +4583,101 @@ func (c *DirectoryService) UpdateRadiusWithContext(ctx aws.Context, input *Updat return out, req.Send() } +const opUpdateTrust = "UpdateTrust" + +// UpdateTrustRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTrust operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTrust for more information on using the UpdateTrust +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTrustRequest method. +// req, resp := client.UpdateTrustRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateTrust +func (c *DirectoryService) UpdateTrustRequest(input *UpdateTrustInput) (req *request.Request, output *UpdateTrustOutput) { + op := &request.Operation{ + Name: opUpdateTrust, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTrustInput{} + } + + output = &UpdateTrustOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTrust API operation for AWS Directory Service. +// +// Updates the trust that has been set up between your AWS Managed Microsoft +// AD directory and an on-premises Active Directory. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Directory Service's +// API operation UpdateTrust for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateTrust +func (c *DirectoryService) UpdateTrust(input *UpdateTrustInput) (*UpdateTrustOutput, error) { + req, out := c.UpdateTrustRequest(input) + return out, req.Send() +} + +// UpdateTrustWithContext is the same as UpdateTrust with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTrust for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DirectoryService) UpdateTrustWithContext(ctx aws.Context, input *UpdateTrustInput, opts ...request.Option) (*UpdateTrustOutput, error) { + req, out := c.UpdateTrustRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opVerifyTrust = "VerifyTrust" // VerifyTrustRequest generates a "aws/request.Request" representing the // client's request for the VerifyTrust operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4629,8 +4719,8 @@ func (c *DirectoryService) VerifyTrustRequest(input *VerifyTrustInput) (req *req // AWS Directory Service for Microsoft Active Directory allows you to configure // and verify trust relationships. // -// This action verifies a trust relationship between your Microsoft AD in the -// AWS cloud and an external domain. +// This action verifies a trust relationship between your AWS Managed Microsoft +// AD directory and an external domain. // // 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 @@ -5775,7 +5865,7 @@ func (s CreateLogSubscriptionOutput) GoString() string { return s.String() } -// Creates a Microsoft AD in the AWS cloud. +// Creates an AWS Managed Microsoft AD directory. type CreateMicrosoftADInput struct { _ struct{} `type:"structure"` @@ -5783,8 +5873,8 @@ type CreateMicrosoftADInput struct { // console Directory Details page after the directory is created. Description *string `type:"string"` - // AWS Microsoft AD is available in two editions: Standard and Enterprise. Enterprise - // is the default. + // AWS Managed Microsoft AD is available in two editions: Standard and Enterprise. + // Enterprise is the default. Edition *string `type:"string" enum:"DirectoryEdition"` // The fully qualified domain name for the directory, such as corp.example.com. @@ -5978,19 +6068,19 @@ func (s *CreateSnapshotOutput) SetSnapshotId(v string) *CreateSnapshotOutput { // AWS Directory Service for Microsoft Active Directory allows you to configure // trust relationships. For example, you can establish a trust between your -// Microsoft AD in the AWS cloud, and your existing on-premises Microsoft Active -// Directory. This would allow you to provide users and groups access to resources -// in either domain, with a single set of credentials. +// AWS Managed Microsoft AD directory, and your existing on-premises Microsoft +// Active Directory. This would allow you to provide users and groups access +// to resources in either domain, with a single set of credentials. // // This action initiates the creation of the AWS side of a trust relationship -// between a Microsoft AD in the AWS cloud and an external domain. +// between an AWS Managed Microsoft AD directory and an external domain. type CreateTrustInput struct { _ struct{} `type:"structure"` // The IP addresses of the remote DNS server associated with RemoteDomainName. ConditionalForwarderIpAddrs []*string `type:"list"` - // The Directory ID of the Microsoft AD in the AWS cloud for which to establish + // The Directory ID of the AWS Managed Microsoft AD directory for which to establish // the trust relationship. // // DirectoryId is a required field @@ -6002,6 +6092,9 @@ type CreateTrustInput struct { // RemoteDomainName is a required field RemoteDomainName *string `type:"string" required:"true"` + // Optional parameter to enable selective authentication for the trust. + SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` + // The direction of the trust relationship. // // TrustDirection is a required field @@ -6013,7 +6106,7 @@ type CreateTrustInput struct { // TrustPassword is a required field TrustPassword *string `min:"1" type:"string" required:"true"` - // The trust relationship type. + // The trust relationship type. Forest is the default. TrustType *string `type:"string" enum:"TrustType"` } @@ -6070,6 +6163,12 @@ func (s *CreateTrustInput) SetRemoteDomainName(v string) *CreateTrustInput { return s } +// SetSelectiveAuth sets the SelectiveAuth field's value. +func (s *CreateTrustInput) SetSelectiveAuth(v string) *CreateTrustInput { + s.SelectiveAuth = &v + return s +} + // SetTrustDirection sets the TrustDirection field's value. func (s *CreateTrustInput) SetTrustDirection(v string) *CreateTrustInput { s.TrustDirection = &v @@ -6359,8 +6458,8 @@ func (s *DeleteSnapshotOutput) SetSnapshotId(v string) *DeleteSnapshotOutput { return s } -// Deletes the local side of an existing trust relationship between the Microsoft -// AD in the AWS cloud and the external domain. +// Deletes the local side of an existing trust relationship between the AWS +// Managed Microsoft AD directory and the external domain. type DeleteTrustInput struct { _ struct{} `type:"structure"` @@ -7022,9 +7121,9 @@ func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshots return s } -// Describes the trust relationships for a particular Microsoft AD in the AWS -// cloud. If no input parameters are are provided, such as directory ID or trust -// ID, this request describes all the trust relationships. +// Describes the trust relationships for a particular AWS Managed Microsoft +// AD directory. If no input parameters are are provided, such as directory +// ID or trust ID, this request describes all the trust relationships. type DescribeTrustsInput struct { _ struct{} `type:"structure"` @@ -7545,13 +7644,14 @@ type DirectoryLimits struct { // Indicates if the cloud directory limit has been reached. CloudOnlyDirectoriesLimitReached *bool `type:"boolean"` - // The current number of Microsoft AD directories in the region. + // The current number of AWS Managed Microsoft AD directories in the region. CloudOnlyMicrosoftADCurrentCount *int64 `type:"integer"` - // The maximum number of Microsoft AD directories allowed in the region. + // The maximum number of AWS Managed Microsoft AD directories allowed in the + // region. CloudOnlyMicrosoftADLimit *int64 `type:"integer"` - // Indicates if the Microsoft AD directory limit has been reached. + // Indicates if the AWS Managed Microsoft AD directory limit has been reached. CloudOnlyMicrosoftADLimitReached *bool `type:"boolean"` // The current number of connected directories in the region. @@ -10026,8 +10126,8 @@ func (s *Tag) SetValue(v string) *Tag { return s } -// Describes a trust relationship between an Microsoft AD in the AWS cloud and -// an external domain. +// Describes a trust relationship between an AWS Managed Microsoft AD directory +// and an external domain. type Trust struct { _ struct{} `type:"structure"` @@ -10044,6 +10144,9 @@ type Trust struct { // the trust relationship. RemoteDomainName *string `type:"string"` + // Current state of selective authentication for the trust. + SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` + // The date and time that the TrustState was last updated. StateLastUpdatedDateTime *time.Time `type:"timestamp"` @@ -10059,7 +10162,7 @@ type Trust struct { // The reason for the TrustState. TrustStateReason *string `type:"string"` - // The trust relationship type. + // The trust relationship type. Forest is the default. TrustType *string `type:"string" enum:"TrustType"` } @@ -10097,6 +10200,12 @@ func (s *Trust) SetRemoteDomainName(v string) *Trust { return s } +// SetSelectiveAuth sets the SelectiveAuth field's value. +func (s *Trust) SetSelectiveAuth(v string) *Trust { + s.SelectiveAuth = &v + return s +} + // SetStateLastUpdatedDateTime sets the StateLastUpdatedDateTime field's value. func (s *Trust) SetStateLastUpdatedDateTime(v time.Time) *Trust { s.StateLastUpdatedDateTime = &v @@ -10501,8 +10610,87 @@ func (s UpdateRadiusOutput) GoString() string { return s.String() } -// Initiates the verification of an existing trust relationship between a Microsoft -// AD in the AWS cloud and an external domain. +type UpdateTrustInput struct { + _ struct{} `type:"structure"` + + // Updates selective authentication for the trust. + SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` + + // Identifier of the trust relationship. + // + // TrustId is a required field + TrustId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTrustInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTrustInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTrustInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTrustInput"} + if s.TrustId == nil { + invalidParams.Add(request.NewErrParamRequired("TrustId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSelectiveAuth sets the SelectiveAuth field's value. +func (s *UpdateTrustInput) SetSelectiveAuth(v string) *UpdateTrustInput { + s.SelectiveAuth = &v + return s +} + +// SetTrustId sets the TrustId field's value. +func (s *UpdateTrustInput) SetTrustId(v string) *UpdateTrustInput { + s.TrustId = &v + return s +} + +type UpdateTrustOutput struct { + _ struct{} `type:"structure"` + + // The AWS request identifier. + RequestId *string `type:"string"` + + // Identifier of the trust relationship. + TrustId *string `type:"string"` +} + +// String returns the string representation +func (s UpdateTrustOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTrustOutput) GoString() string { + return s.String() +} + +// SetRequestId sets the RequestId field's value. +func (s *UpdateTrustOutput) SetRequestId(v string) *UpdateTrustOutput { + s.RequestId = &v + return s +} + +// SetTrustId sets the TrustId field's value. +func (s *UpdateTrustOutput) SetTrustId(v string) *UpdateTrustOutput { + s.TrustId = &v + return s +} + +// Initiates the verification of an existing trust relationship between an AWS +// Managed Microsoft AD directory and an external domain. type VerifyTrustInput struct { _ struct{} `type:"structure"` @@ -10732,6 +10920,14 @@ const ( SchemaExtensionStatusCompleted = "Completed" ) +const ( + // SelectiveAuthEnabled is a SelectiveAuth enum value + SelectiveAuthEnabled = "Enabled" + + // SelectiveAuthDisabled is a SelectiveAuth enum value + SelectiveAuthDisabled = "Disabled" +) + const ( // ShareMethodOrganizations is a ShareMethod enum value ShareMethodOrganizations = "ORGANIZATIONS" @@ -10834,6 +11030,15 @@ const ( // TrustStateVerified is a TrustState enum value TrustStateVerified = "Verified" + // TrustStateUpdating is a TrustState enum value + TrustStateUpdating = "Updating" + + // TrustStateUpdateFailed is a TrustState enum value + TrustStateUpdateFailed = "UpdateFailed" + + // TrustStateUpdated is a TrustState enum value + TrustStateUpdated = "Updated" + // TrustStateDeleting is a TrustState enum value TrustStateDeleting = "Deleting" @@ -10847,4 +11052,7 @@ const ( const ( // TrustTypeForest is a TrustType enum value TrustTypeForest = "Forest" + + // TrustTypeExternal is a TrustType enum value + TrustTypeExternal = "External" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go index 3ccd4c94df0..39abb31e0bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go @@ -16,7 +16,7 @@ const opCreateLifecyclePolicy = "CreateLifecyclePolicy" // CreateLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -102,7 +102,7 @@ const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -188,7 +188,7 @@ const opGetLifecyclePolicies = "GetLifecyclePolicies" // GetLifecyclePoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -278,7 +278,7 @@ const opGetLifecyclePolicy = "GetLifecyclePolicy" // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -363,7 +363,7 @@ const opUpdateLifecyclePolicy = "UpdateLifecyclePolicy" // UpdateLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdateLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index 332b76dd472..551ef3a3f77 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -18,7 +18,7 @@ const opBatchGetItem = "BatchGetItem" // BatchGetItemRequest generates a "aws/request.Request" representing the // client's request for the BatchGetItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -213,7 +213,7 @@ const opBatchWriteItem = "BatchWriteItem" // BatchWriteItemRequest generates a "aws/request.Request" representing the // client's request for the BatchWriteItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -379,7 +379,7 @@ const opCreateBackup = "CreateBackup" // CreateBackupRequest generates a "aws/request.Request" representing the // client's request for the CreateBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -514,7 +514,7 @@ const opCreateGlobalTable = "CreateGlobalTable" // CreateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the CreateGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -645,7 +645,7 @@ const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the // client's request for the CreateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -756,7 +756,7 @@ const opDeleteBackup = "DeleteBackup" // DeleteBackupRequest generates a "aws/request.Request" representing the // client's request for the DeleteBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -857,7 +857,7 @@ const opDeleteItem = "DeleteItem" // DeleteItemRequest generates a "aws/request.Request" representing the // client's request for the DeleteItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -968,7 +968,7 @@ const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1086,7 +1086,7 @@ const opDescribeBackup = "DescribeBackup" // DescribeBackupRequest generates a "aws/request.Request" representing the // client's request for the DescribeBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1170,7 +1170,7 @@ const opDescribeContinuousBackups = "DescribeContinuousBackups" // DescribeContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeContinuousBackups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1265,7 +1265,7 @@ const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1337,7 +1337,7 @@ const opDescribeGlobalTable = "DescribeGlobalTable" // DescribeGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1419,7 +1419,7 @@ const opDescribeGlobalTableSettings = "DescribeGlobalTableSettings" // DescribeGlobalTableSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGlobalTableSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1501,7 +1501,7 @@ const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1636,7 +1636,7 @@ const opDescribeTable = "DescribeTable" // DescribeTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1727,7 +1727,7 @@ const opDescribeTimeToLive = "DescribeTimeToLive" // DescribeTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the DescribeTimeToLive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1810,7 +1810,7 @@ const opGetItem = "GetItem" // GetItemRequest generates a "aws/request.Request" representing the // client's request for the GetItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1908,7 +1908,7 @@ const opListBackups = "ListBackups" // ListBackupsRequest generates a "aws/request.Request" representing the // client's request for the ListBackups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1995,7 +1995,7 @@ const opListGlobalTables = "ListGlobalTables" // ListGlobalTablesRequest generates a "aws/request.Request" representing the // client's request for the ListGlobalTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2074,7 +2074,7 @@ const opListTables = "ListTables" // ListTablesRequest generates a "aws/request.Request" representing the // client's request for the ListTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2211,7 +2211,7 @@ const opListTagsOfResource = "ListTagsOfResource" // ListTagsOfResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsOfResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2298,7 +2298,7 @@ const opPutItem = "PutItem" // PutItemRequest generates a "aws/request.Request" representing the // client's request for the PutItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2439,7 +2439,7 @@ const opQuery = "Query" // QueryRequest generates a "aws/request.Request" representing the // client's request for the Query operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2633,7 +2633,7 @@ const opRestoreTableFromBackup = "RestoreTableFromBackup" // RestoreTableFromBackupRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableFromBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2755,7 +2755,7 @@ const opRestoreTableToPointInTime = "RestoreTableToPointInTime" // RestoreTableToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2901,7 +2901,7 @@ const opScan = "Scan" // ScanRequest generates a "aws/request.Request" representing the // client's request for the Scan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3075,7 +3075,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3184,7 +3184,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3291,7 +3291,7 @@ const opUpdateContinuousBackups = "UpdateContinuousBackups" // UpdateContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the UpdateContinuousBackups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3387,7 +3387,7 @@ const opUpdateGlobalTable = "UpdateGlobalTable" // UpdateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3498,7 +3498,7 @@ const opUpdateGlobalTableSettings = "UpdateGlobalTableSettings" // UpdateGlobalTableSettingsRequest generates a "aws/request.Request" representing the // client's request for the UpdateGlobalTableSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3604,7 +3604,7 @@ const opUpdateItem = "UpdateItem" // UpdateItemRequest generates a "aws/request.Request" representing the // client's request for the UpdateItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3709,7 +3709,7 @@ const opUpdateTable = "UpdateTable" // UpdateTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3827,7 +3827,7 @@ const opUpdateTimeToLive = "UpdateTimeToLive" // UpdateTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the UpdateTimeToLive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 5e18932db67..bc96eea579a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -18,7 +18,7 @@ const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQ // AcceptReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the // client's request for the AcceptReservedInstancesExchangeQuote operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -93,7 +93,7 @@ const opAcceptVpcEndpointConnections = "AcceptVpcEndpointConnections" // AcceptVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the AcceptVpcEndpointConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -168,7 +168,7 @@ const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection" // AcceptVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the AcceptVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -248,7 +248,7 @@ const opAllocateAddress = "AllocateAddress" // AllocateAddressRequest generates a "aws/request.Request" representing the // client's request for the AllocateAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -338,7 +338,7 @@ const opAllocateHosts = "AllocateHosts" // AllocateHostsRequest generates a "aws/request.Request" representing the // client's request for the AllocateHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -413,7 +413,7 @@ const opAssignIpv6Addresses = "AssignIpv6Addresses" // AssignIpv6AddressesRequest generates a "aws/request.Request" representing the // client's request for the AssignIpv6Addresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -494,7 +494,7 @@ const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses" // AssignPrivateIpAddressesRequest generates a "aws/request.Request" representing the // client's request for the AssignPrivateIpAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -580,7 +580,7 @@ const opAssociateAddress = "AssociateAddress" // AssociateAddressRequest generates a "aws/request.Request" representing the // client's request for the AssociateAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -678,7 +678,7 @@ const opAssociateDhcpOptions = "AssociateDhcpOptions" // AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the AssociateDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -765,7 +765,7 @@ const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile" // AssociateIamInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the AssociateIamInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -840,7 +840,7 @@ const opAssociateRouteTable = "AssociateRouteTable" // AssociateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the AssociateRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -921,7 +921,7 @@ const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock" // AssociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the AssociateSubnetCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -997,7 +997,7 @@ const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock" // AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the AssociateVpcCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1077,7 +1077,7 @@ const opAttachClassicLinkVpc = "AttachClassicLinkVpc" // AttachClassicLinkVpcRequest generates a "aws/request.Request" representing the // client's request for the AttachClassicLinkVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1162,7 +1162,7 @@ const opAttachInternetGateway = "AttachInternetGateway" // AttachInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the AttachInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1240,7 +1240,7 @@ const opAttachNetworkInterface = "AttachNetworkInterface" // AttachNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AttachNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1314,7 +1314,7 @@ const opAttachVolume = "AttachVolume" // AttachVolumeRequest generates a "aws/request.Request" representing the // client's request for the AttachVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1415,7 +1415,7 @@ const opAttachVpnGateway = "AttachVpnGateway" // AttachVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the AttachVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1493,7 +1493,7 @@ const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress" // AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSecurityGroupEgress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1586,7 +1586,7 @@ const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress" // AuthorizeSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1680,7 +1680,7 @@ const opBundleInstance = "BundleInstance" // BundleInstanceRequest generates a "aws/request.Request" representing the // client's request for the BundleInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1760,7 +1760,7 @@ const opCancelBundleTask = "CancelBundleTask" // CancelBundleTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelBundleTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1834,7 +1834,7 @@ const opCancelConversionTask = "CancelConversionTask" // CancelConversionTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelConversionTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1917,7 +1917,7 @@ const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1996,7 +1996,7 @@ const opCancelImportTask = "CancelImportTask" // CancelImportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelImportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2070,7 +2070,7 @@ const opCancelReservedInstancesListing = "CancelReservedInstancesListing" // CancelReservedInstancesListingRequest generates a "aws/request.Request" representing the // client's request for the CancelReservedInstancesListing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2148,7 +2148,7 @@ const opCancelSpotFleetRequests = "CancelSpotFleetRequests" // CancelSpotFleetRequestsRequest generates a "aws/request.Request" representing the // client's request for the CancelSpotFleetRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2229,7 +2229,7 @@ const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests" // CancelSpotInstanceRequestsRequest generates a "aws/request.Request" representing the // client's request for the CancelSpotInstanceRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2306,7 +2306,7 @@ const opConfirmProductInstance = "ConfirmProductInstance" // ConfirmProductInstanceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmProductInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2382,7 +2382,7 @@ const opCopyFpgaImage = "CopyFpgaImage" // CopyFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the CopyFpgaImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2456,7 +2456,7 @@ const opCopyImage = "CopyImage" // CopyImageRequest generates a "aws/request.Request" representing the // client's request for the CopyImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2541,7 +2541,7 @@ const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopySnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2634,7 +2634,7 @@ const opCreateCustomerGateway = "CreateCustomerGateway" // CreateCustomerGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomerGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2732,7 +2732,7 @@ const opCreateDefaultSubnet = "CreateDefaultSubnet" // CreateDefaultSubnetRequest generates a "aws/request.Request" representing the // client's request for the CreateDefaultSubnet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2810,7 +2810,7 @@ const opCreateDefaultVpc = "CreateDefaultVpc" // CreateDefaultVpcRequest generates a "aws/request.Request" representing the // client's request for the CreateDefaultVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2896,7 +2896,7 @@ const opCreateDhcpOptions = "CreateDhcpOptions" // CreateDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the CreateDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3008,7 +3008,7 @@ const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway" // CreateEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateEgressOnlyInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3085,7 +3085,7 @@ const opCreateFleet = "CreateFleet" // CreateFleetRequest generates a "aws/request.Request" representing the // client's request for the CreateFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3165,7 +3165,7 @@ const opCreateFlowLogs = "CreateFlowLogs" // CreateFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the CreateFlowLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3254,7 +3254,7 @@ const opCreateFpgaImage = "CreateFpgaImage" // CreateFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the CreateFpgaImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3335,7 +3335,7 @@ const opCreateImage = "CreateImage" // CreateImageRequest generates a "aws/request.Request" representing the // client's request for the CreateImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3418,7 +3418,7 @@ const opCreateInstanceExportTask = "CreateInstanceExportTask" // CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3497,7 +3497,7 @@ const opCreateInternetGateway = "CreateInternetGateway" // CreateInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3575,7 +3575,7 @@ const opCreateKeyPair = "CreateKeyPair" // CreateKeyPairRequest generates a "aws/request.Request" representing the // client's request for the CreateKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3661,7 +3661,7 @@ const opCreateLaunchTemplate = "CreateLaunchTemplate" // CreateLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3737,7 +3737,7 @@ const opCreateLaunchTemplateVersion = "CreateLaunchTemplateVersion" // CreateLaunchTemplateVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchTemplateVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3815,7 +3815,7 @@ const opCreateNatGateway = "CreateNatGateway" // CreateNatGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateNatGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3895,7 +3895,7 @@ const opCreateNetworkAcl = "CreateNetworkAcl" // CreateNetworkAclRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3973,7 +3973,7 @@ const opCreateNetworkAclEntry = "CreateNetworkAclEntry" // CreateNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkAclEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4065,7 +4065,7 @@ const opCreateNetworkInterface = "CreateNetworkInterface" // CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4143,7 +4143,7 @@ const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission" // CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkInterfacePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4221,7 +4221,7 @@ const opCreatePlacementGroup = "CreatePlacementGroup" // CreatePlacementGroupRequest generates a "aws/request.Request" representing the // client's request for the CreatePlacementGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4305,7 +4305,7 @@ const opCreateReservedInstancesListing = "CreateReservedInstancesListing" // CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the // client's request for the CreateReservedInstancesListing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4402,7 +4402,7 @@ const opCreateRoute = "CreateRoute" // CreateRouteRequest generates a "aws/request.Request" representing the // client's request for the CreateRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4495,7 +4495,7 @@ const opCreateRouteTable = "CreateRouteTable" // CreateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the CreateRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4573,7 +4573,7 @@ const opCreateSecurityGroup = "CreateSecurityGroup" // CreateSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4673,7 +4673,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4778,7 +4778,7 @@ const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription" // CreateSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateSpotDatafeedSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4855,7 +4855,7 @@ const opCreateSubnet = "CreateSubnet" // CreateSubnetRequest generates a "aws/request.Request" representing the // client's request for the CreateSubnet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4955,7 +4955,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5039,7 +5039,7 @@ const opCreateVolume = "CreateVolume" // CreateVolumeRequest generates a "aws/request.Request" representing the // client's request for the CreateVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5132,7 +5132,7 @@ const opCreateVpc = "CreateVpc" // CreateVpcRequest generates a "aws/request.Request" representing the // client's request for the CreateVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5224,7 +5224,7 @@ const opCreateVpcEndpoint = "CreateVpcEndpoint" // CreateVpcEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5314,7 +5314,7 @@ const opCreateVpcEndpointConnectionNotification = "CreateVpcEndpointConnectionNo // CreateVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpointConnectionNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5394,7 +5394,7 @@ const opCreateVpcEndpointServiceConfiguration = "CreateVpcEndpointServiceConfigu // CreateVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpointServiceConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5475,7 +5475,7 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" // CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5564,7 +5564,7 @@ const opCreateVpnConnection = "CreateVpnConnection" // CreateVpnConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5656,7 +5656,7 @@ const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute" // CreateVpnConnectionRouteRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnConnectionRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5739,7 +5739,7 @@ const opCreateVpnGateway = "CreateVpnGateway" // CreateVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5819,7 +5819,7 @@ const opDeleteCustomerGateway = "DeleteCustomerGateway" // DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomerGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5896,7 +5896,7 @@ const opDeleteDhcpOptions = "DeleteDhcpOptions" // DeleteDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5975,7 +5975,7 @@ const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway" // DeleteEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteEgressOnlyInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6049,7 +6049,7 @@ const opDeleteFleets = "DeleteFleets" // DeleteFleetsRequest generates a "aws/request.Request" representing the // client's request for the DeleteFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6129,7 +6129,7 @@ const opDeleteFlowLogs = "DeleteFlowLogs" // DeleteFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the DeleteFlowLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6203,7 +6203,7 @@ const opDeleteFpgaImage = "DeleteFpgaImage" // DeleteFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the DeleteFpgaImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6277,7 +6277,7 @@ const opDeleteInternetGateway = "DeleteInternetGateway" // DeleteInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6354,7 +6354,7 @@ const opDeleteKeyPair = "DeleteKeyPair" // DeleteKeyPairRequest generates a "aws/request.Request" representing the // client's request for the DeleteKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6430,7 +6430,7 @@ const opDeleteLaunchTemplate = "DeleteLaunchTemplate" // DeleteLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6505,7 +6505,7 @@ const opDeleteLaunchTemplateVersions = "DeleteLaunchTemplateVersions" // DeleteLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchTemplateVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6582,7 +6582,7 @@ const opDeleteNatGateway = "DeleteNatGateway" // DeleteNatGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteNatGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6658,7 +6658,7 @@ const opDeleteNetworkAcl = "DeleteNetworkAcl" // DeleteNetworkAclRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6735,7 +6735,7 @@ const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry" // DeleteNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkAclEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6812,7 +6812,7 @@ const opDeleteNetworkInterface = "DeleteNetworkInterface" // DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6889,7 +6889,7 @@ const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission" // DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkInterfacePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6966,7 +6966,7 @@ const opDeletePlacementGroup = "DeletePlacementGroup" // DeletePlacementGroupRequest generates a "aws/request.Request" representing the // client's request for the DeletePlacementGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7045,7 +7045,7 @@ const opDeleteRoute = "DeleteRoute" // DeleteRouteRequest generates a "aws/request.Request" representing the // client's request for the DeleteRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7121,7 +7121,7 @@ const opDeleteRouteTable = "DeleteRouteTable" // DeleteRouteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7199,7 +7199,7 @@ const opDeleteSecurityGroup = "DeleteSecurityGroup" // DeleteSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7279,7 +7279,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7369,7 +7369,7 @@ const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription" // DeleteSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteSpotDatafeedSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7445,7 +7445,7 @@ const opDeleteSubnet = "DeleteSubnet" // DeleteSubnetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubnet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7522,7 +7522,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7602,7 +7602,7 @@ const opDeleteVolume = "DeleteVolume" // DeleteVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeleteVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7684,7 +7684,7 @@ const opDeleteVpc = "DeleteVpc" // DeleteVpcRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7764,7 +7764,7 @@ const opDeleteVpcEndpointConnectionNotifications = "DeleteVpcEndpointConnectionN // DeleteVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpointConnectionNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7838,7 +7838,7 @@ const opDeleteVpcEndpointServiceConfigurations = "DeleteVpcEndpointServiceConfig // DeleteVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpointServiceConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7915,7 +7915,7 @@ const opDeleteVpcEndpoints = "DeleteVpcEndpoints" // DeleteVpcEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7992,7 +7992,7 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" // DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8070,7 +8070,7 @@ const opDeleteVpnConnection = "DeleteVpnConnection" // DeleteVpnConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8155,7 +8155,7 @@ const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute" // DeleteVpnConnectionRouteRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnConnectionRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8234,7 +8234,7 @@ const opDeleteVpnGateway = "DeleteVpnGateway" // DeleteVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8314,7 +8314,7 @@ const opDeregisterImage = "DeregisterImage" // DeregisterImageRequest generates a "aws/request.Request" representing the // client's request for the DeregisterImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8398,7 +8398,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8490,7 +8490,7 @@ const opDescribeAddresses = "DescribeAddresses" // DescribeAddressesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8568,7 +8568,7 @@ const opDescribeAggregateIdFormat = "DescribeAggregateIdFormat" // DescribeAggregateIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregateIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8656,7 +8656,7 @@ const opDescribeAvailabilityZones = "DescribeAvailabilityZones" // DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailabilityZones operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8736,7 +8736,7 @@ const opDescribeBundleTasks = "DescribeBundleTasks" // DescribeBundleTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeBundleTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8815,7 +8815,7 @@ const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances" // DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeClassicLinkInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8892,7 +8892,7 @@ const opDescribeConversionTasks = "DescribeConversionTasks" // DescribeConversionTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeConversionTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8970,7 +8970,7 @@ const opDescribeCustomerGateways = "DescribeCustomerGateways" // DescribeCustomerGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeCustomerGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9048,7 +9048,7 @@ const opDescribeDhcpOptions = "DescribeDhcpOptions" // DescribeDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9125,7 +9125,7 @@ const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways // DescribeEgressOnlyInternetGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeEgressOnlyInternetGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9199,7 +9199,7 @@ const opDescribeElasticGpus = "DescribeElasticGpus" // DescribeElasticGpusRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticGpus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9274,7 +9274,7 @@ const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeExportTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9348,7 +9348,7 @@ const opDescribeFleetHistory = "DescribeFleetHistory" // DescribeFleetHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9422,7 +9422,7 @@ const opDescribeFleetInstances = "DescribeFleetInstances" // DescribeFleetInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9496,7 +9496,7 @@ const opDescribeFleets = "DescribeFleets" // DescribeFleetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9570,7 +9570,7 @@ const opDescribeFlowLogs = "DescribeFlowLogs" // DescribeFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFlowLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9646,7 +9646,7 @@ const opDescribeFpgaImageAttribute = "DescribeFpgaImageAttribute" // DescribeFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeFpgaImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9720,7 +9720,7 @@ const opDescribeFpgaImages = "DescribeFpgaImages" // DescribeFpgaImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFpgaImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9796,7 +9796,7 @@ const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings" // DescribeHostReservationOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostReservationOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9878,7 +9878,7 @@ const opDescribeHostReservations = "DescribeHostReservations" // DescribeHostReservationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostReservations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9952,7 +9952,7 @@ const opDescribeHosts = "DescribeHosts" // DescribeHostsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10030,7 +10030,7 @@ const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAsso // DescribeIamInstanceProfileAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeIamInstanceProfileAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10104,7 +10104,7 @@ const opDescribeIdFormat = "DescribeIdFormat" // DescribeIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10196,7 +10196,7 @@ const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat" // DescribeIdentityIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10286,7 +10286,7 @@ const opDescribeImageAttribute = "DescribeImageAttribute" // DescribeImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10361,7 +10361,7 @@ const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10441,7 +10441,7 @@ const opDescribeImportImageTasks = "DescribeImportImageTasks" // DescribeImportImageTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeImportImageTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10516,7 +10516,7 @@ const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks" // DescribeImportSnapshotTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeImportSnapshotTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10590,7 +10590,7 @@ const opDescribeInstanceAttribute = "DescribeInstanceAttribute" // DescribeInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10668,7 +10668,7 @@ const opDescribeInstanceCreditSpecifications = "DescribeInstanceCreditSpecificat // DescribeInstanceCreditSpecificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceCreditSpecifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10765,7 +10765,7 @@ const opDescribeInstanceStatus = "DescribeInstanceStatus" // DescribeInstanceStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10916,7 +10916,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11061,7 +11061,7 @@ const opDescribeInternetGateways = "DescribeInternetGateways" // DescribeInternetGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeInternetGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11135,7 +11135,7 @@ const opDescribeKeyPairs = "DescribeKeyPairs" // DescribeKeyPairsRequest generates a "aws/request.Request" representing the // client's request for the DescribeKeyPairs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11212,7 +11212,7 @@ const opDescribeLaunchTemplateVersions = "DescribeLaunchTemplateVersions" // DescribeLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchTemplateVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11287,7 +11287,7 @@ const opDescribeLaunchTemplates = "DescribeLaunchTemplates" // DescribeLaunchTemplatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11361,7 +11361,7 @@ const opDescribeMovingAddresses = "DescribeMovingAddresses" // DescribeMovingAddressesRequest generates a "aws/request.Request" representing the // client's request for the DescribeMovingAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11437,7 +11437,7 @@ const opDescribeNatGateways = "DescribeNatGateways" // DescribeNatGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeNatGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11567,7 +11567,7 @@ const opDescribeNetworkAcls = "DescribeNetworkAcls" // DescribeNetworkAclsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkAcls operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11644,7 +11644,7 @@ const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute" // DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfaceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11719,7 +11719,7 @@ const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissio // DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfacePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11793,7 +11793,7 @@ const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces" // DescribeNetworkInterfacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11923,7 +11923,7 @@ const opDescribePlacementGroups = "DescribePlacementGroups" // DescribePlacementGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribePlacementGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11999,7 +11999,7 @@ const opDescribePrefixLists = "DescribePrefixLists" // DescribePrefixListsRequest generates a "aws/request.Request" representing the // client's request for the DescribePrefixLists operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12078,7 +12078,7 @@ const opDescribePrincipalIdFormat = "DescribePrincipalIdFormat" // DescribePrincipalIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribePrincipalIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12166,7 +12166,7 @@ const opDescribeRegions = "DescribeRegions" // DescribeRegionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRegions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12243,7 +12243,7 @@ const opDescribeReservedInstances = "DescribeReservedInstances" // DescribeReservedInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12320,7 +12320,7 @@ const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings" // DescribeReservedInstancesListingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesListings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12415,7 +12415,7 @@ const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModif // DescribeReservedInstancesModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12551,7 +12551,7 @@ const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings // DescribeReservedInstancesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12692,7 +12692,7 @@ const opDescribeRouteTables = "DescribeRouteTables" // DescribeRouteTablesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRouteTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12774,7 +12774,7 @@ const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvaila // DescribeScheduledInstanceAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledInstanceAvailability operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12856,7 +12856,7 @@ const opDescribeScheduledInstances = "DescribeScheduledInstances" // DescribeScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12930,7 +12930,7 @@ const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences" // DescribeSecurityGroupReferencesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityGroupReferences operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13005,7 +13005,7 @@ const opDescribeSecurityGroups = "DescribeSecurityGroups" // DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13086,7 +13086,7 @@ const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute" // DescribeSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13164,7 +13164,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13339,7 +13339,7 @@ const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription" // DescribeSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotDatafeedSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13415,7 +13415,7 @@ const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances" // DescribeSpotFleetInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13489,7 +13489,7 @@ const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory" // DescribeSpotFleetRequestHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetRequestHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13568,7 +13568,7 @@ const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests" // DescribeSpotFleetRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13701,7 +13701,7 @@ const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests" // DescribeSpotInstanceRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotInstanceRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13784,7 +13784,7 @@ const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory" // DescribeSpotPriceHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotPriceHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13921,7 +13921,7 @@ const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups" // DescribeStaleSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeStaleSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13998,7 +13998,7 @@ const opDescribeSubnets = "DescribeSubnets" // DescribeSubnetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14075,7 +14075,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14208,7 +14208,7 @@ const opDescribeVolumeAttribute = "DescribeVolumeAttribute" // DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumeAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14286,7 +14286,7 @@ const opDescribeVolumeStatus = "DescribeVolumeStatus" // DescribeVolumeStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumeStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14451,7 +14451,7 @@ const opDescribeVolumes = "DescribeVolumes" // DescribeVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14591,7 +14591,7 @@ const opDescribeVolumesModifications = "DescribeVolumesModifications" // DescribeVolumesModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumesModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14678,7 +14678,7 @@ const opDescribeVpcAttribute = "DescribeVpcAttribute" // DescribeVpcAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14753,7 +14753,7 @@ const opDescribeVpcClassicLink = "DescribeVpcClassicLink" // DescribeVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcClassicLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14827,7 +14827,7 @@ const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport" // DescribeVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcClassicLinkDnsSupport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14907,7 +14907,7 @@ const opDescribeVpcEndpointConnectionNotifications = "DescribeVpcEndpointConnect // DescribeVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointConnectionNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -14982,7 +14982,7 @@ const opDescribeVpcEndpointConnections = "DescribeVpcEndpointConnections" // DescribeVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15057,7 +15057,7 @@ const opDescribeVpcEndpointServiceConfigurations = "DescribeVpcEndpointServiceCo // DescribeVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServiceConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15131,7 +15131,7 @@ const opDescribeVpcEndpointServicePermissions = "DescribeVpcEndpointServicePermi // DescribeVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServicePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15206,7 +15206,7 @@ const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices" // DescribeVpcEndpointServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15280,7 +15280,7 @@ const opDescribeVpcEndpoints = "DescribeVpcEndpoints" // DescribeVpcEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15354,7 +15354,7 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" // DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15428,7 +15428,7 @@ const opDescribeVpcs = "DescribeVpcs" // DescribeVpcsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15502,7 +15502,7 @@ const opDescribeVpnConnections = "DescribeVpnConnections" // DescribeVpnConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpnConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15580,7 +15580,7 @@ const opDescribeVpnGateways = "DescribeVpnGateways" // DescribeVpnGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpnGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15658,7 +15658,7 @@ const opDetachClassicLinkVpc = "DetachClassicLinkVpc" // DetachClassicLinkVpcRequest generates a "aws/request.Request" representing the // client's request for the DetachClassicLinkVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15734,7 +15734,7 @@ const opDetachInternetGateway = "DetachInternetGateway" // DetachInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DetachInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15812,7 +15812,7 @@ const opDetachNetworkInterface = "DetachNetworkInterface" // DetachNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DetachNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15888,7 +15888,7 @@ const opDetachVolume = "DetachVolume" // DetachVolumeRequest generates a "aws/request.Request" representing the // client's request for the DetachVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -15975,7 +15975,7 @@ const opDetachVpnGateway = "DetachVpnGateway" // DetachVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the DetachVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16058,7 +16058,7 @@ const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation" // DisableVgwRoutePropagationRequest generates a "aws/request.Request" representing the // client's request for the DisableVgwRoutePropagation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16135,7 +16135,7 @@ const opDisableVpcClassicLink = "DisableVpcClassicLink" // DisableVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the DisableVpcClassicLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16210,7 +16210,7 @@ const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport" // DisableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the DisableVpcClassicLinkDnsSupport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16288,7 +16288,7 @@ const opDisassociateAddress = "DisassociateAddress" // DisassociateAddressRequest generates a "aws/request.Request" representing the // client's request for the DisassociateAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16372,7 +16372,7 @@ const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile" // DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DisassociateIamInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16448,7 +16448,7 @@ const opDisassociateRouteTable = "DisassociateRouteTable" // DisassociateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the DisassociateRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16529,7 +16529,7 @@ const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock" // DisassociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the DisassociateSubnetCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16605,7 +16605,7 @@ const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock" // DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the DisassociateVpcCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16685,7 +16685,7 @@ const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation" // EnableVgwRoutePropagationRequest generates a "aws/request.Request" representing the // client's request for the EnableVgwRoutePropagation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16762,7 +16762,7 @@ const opEnableVolumeIO = "EnableVolumeIO" // EnableVolumeIORequest generates a "aws/request.Request" representing the // client's request for the EnableVolumeIO operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16839,7 +16839,7 @@ const opEnableVpcClassicLink = "EnableVpcClassicLink" // EnableVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the EnableVpcClassicLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16919,7 +16919,7 @@ const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport" // EnableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the EnableVpcClassicLinkDnsSupport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16999,7 +16999,7 @@ const opGetConsoleOutput = "GetConsoleOutput" // GetConsoleOutputRequest generates a "aws/request.Request" representing the // client's request for the GetConsoleOutput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17089,7 +17089,7 @@ const opGetConsoleScreenshot = "GetConsoleScreenshot" // GetConsoleScreenshotRequest generates a "aws/request.Request" representing the // client's request for the GetConsoleScreenshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17165,7 +17165,7 @@ const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview" // GetHostReservationPurchasePreviewRequest generates a "aws/request.Request" representing the // client's request for the GetHostReservationPurchasePreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17244,7 +17244,7 @@ const opGetLaunchTemplateData = "GetLaunchTemplateData" // GetLaunchTemplateDataRequest generates a "aws/request.Request" representing the // client's request for the GetLaunchTemplateData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17319,7 +17319,7 @@ const opGetPasswordData = "GetPasswordData" // GetPasswordDataRequest generates a "aws/request.Request" representing the // client's request for the GetPasswordData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17410,7 +17410,7 @@ const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote" // GetReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the // client's request for the GetReservedInstancesExchangeQuote operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17487,7 +17487,7 @@ const opImportImage = "ImportImage" // ImportImageRequest generates a "aws/request.Request" representing the // client's request for the ImportImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17564,7 +17564,7 @@ const opImportInstance = "ImportInstance" // ImportInstanceRequest generates a "aws/request.Request" representing the // client's request for the ImportInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17644,7 +17644,7 @@ const opImportKeyPair = "ImportKeyPair" // ImportKeyPairRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17725,7 +17725,7 @@ const opImportSnapshot = "ImportSnapshot" // ImportSnapshotRequest generates a "aws/request.Request" representing the // client's request for the ImportSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17799,7 +17799,7 @@ const opImportVolume = "ImportVolume" // ImportVolumeRequest generates a "aws/request.Request" representing the // client's request for the ImportVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17877,7 +17877,7 @@ const opModifyFleet = "ModifyFleet" // ModifyFleetRequest generates a "aws/request.Request" representing the // client's request for the ModifyFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -17953,7 +17953,7 @@ const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute" // ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyFpgaImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18027,7 +18027,7 @@ const opModifyHosts = "ModifyHosts" // ModifyHostsRequest generates a "aws/request.Request" representing the // client's request for the ModifyHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18107,7 +18107,7 @@ const opModifyIdFormat = "ModifyIdFormat" // ModifyIdFormatRequest generates a "aws/request.Request" representing the // client's request for the ModifyIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18205,7 +18205,7 @@ const opModifyIdentityIdFormat = "ModifyIdentityIdFormat" // ModifyIdentityIdFormatRequest generates a "aws/request.Request" representing the // client's request for the ModifyIdentityIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18303,7 +18303,7 @@ const opModifyImageAttribute = "ModifyImageAttribute" // ModifyImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18388,7 +18388,7 @@ const opModifyInstanceAttribute = "ModifyInstanceAttribute" // ModifyInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18475,7 +18475,7 @@ const opModifyInstanceCreditSpecification = "ModifyInstanceCreditSpecification" // ModifyInstanceCreditSpecificationRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceCreditSpecification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18553,7 +18553,7 @@ const opModifyInstancePlacement = "ModifyInstancePlacement" // ModifyInstancePlacementRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstancePlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18648,7 +18648,7 @@ const opModifyLaunchTemplate = "ModifyLaunchTemplate" // ModifyLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the ModifyLaunchTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18724,7 +18724,7 @@ const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute" // ModifyNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyNetworkInterfaceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18801,7 +18801,7 @@ const opModifyReservedInstances = "ModifyReservedInstances" // ModifyReservedInstancesRequest generates a "aws/request.Request" representing the // client's request for the ModifyReservedInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18881,7 +18881,7 @@ const opModifySnapshotAttribute = "ModifySnapshotAttribute" // ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifySnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -18969,7 +18969,7 @@ const opModifySpotFleetRequest = "ModifySpotFleetRequest" // ModifySpotFleetRequestRequest generates a "aws/request.Request" representing the // client's request for the ModifySpotFleetRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19065,7 +19065,7 @@ const opModifySubnetAttribute = "ModifySubnetAttribute" // ModifySubnetAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifySubnetAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19141,7 +19141,7 @@ const opModifyVolume = "ModifyVolume" // ModifyVolumeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19246,7 +19246,7 @@ const opModifyVolumeAttribute = "ModifyVolumeAttribute" // ModifyVolumeAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVolumeAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19331,7 +19331,7 @@ const opModifyVpcAttribute = "ModifyVpcAttribute" // ModifyVpcAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19407,7 +19407,7 @@ const opModifyVpcEndpoint = "ModifyVpcEndpoint" // ModifyVpcEndpointRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19484,7 +19484,7 @@ const opModifyVpcEndpointConnectionNotification = "ModifyVpcEndpointConnectionNo // ModifyVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointConnectionNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19560,7 +19560,7 @@ const opModifyVpcEndpointServiceConfiguration = "ModifyVpcEndpointServiceConfigu // ModifyVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointServiceConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19637,7 +19637,7 @@ const opModifyVpcEndpointServicePermissions = "ModifyVpcEndpointServicePermissio // ModifyVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointServicePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19718,7 +19718,7 @@ const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions" // ModifyVpcPeeringConnectionOptionsRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcPeeringConnectionOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19811,7 +19811,7 @@ const opModifyVpcTenancy = "ModifyVpcTenancy" // ModifyVpcTenancyRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcTenancy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19894,7 +19894,7 @@ const opMonitorInstances = "MonitorInstances" // MonitorInstancesRequest generates a "aws/request.Request" representing the // client's request for the MonitorInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -19973,7 +19973,7 @@ const opMoveAddressToVpc = "MoveAddressToVpc" // MoveAddressToVpcRequest generates a "aws/request.Request" representing the // client's request for the MoveAddressToVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20053,7 +20053,7 @@ const opPurchaseHostReservation = "PurchaseHostReservation" // PurchaseHostReservationRequest generates a "aws/request.Request" representing the // client's request for the PurchaseHostReservation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20130,7 +20130,7 @@ const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering" // PurchaseReservedInstancesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedInstancesOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20213,7 +20213,7 @@ const opPurchaseScheduledInstances = "PurchaseScheduledInstances" // PurchaseScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the PurchaseScheduledInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20296,7 +20296,7 @@ const opRebootInstances = "RebootInstances" // RebootInstancesRequest generates a "aws/request.Request" representing the // client's request for the RebootInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20382,7 +20382,7 @@ const opRegisterImage = "RegisterImage" // RegisterImageRequest generates a "aws/request.Request" representing the // client's request for the RegisterImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20487,7 +20487,7 @@ const opRejectVpcEndpointConnections = "RejectVpcEndpointConnections" // RejectVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the RejectVpcEndpointConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20562,7 +20562,7 @@ const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection" // RejectVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the RejectVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20640,7 +20640,7 @@ const opReleaseAddress = "ReleaseAddress" // ReleaseAddressRequest generates a "aws/request.Request" representing the // client's request for the ReleaseAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20733,7 +20733,7 @@ const opReleaseHosts = "ReleaseHosts" // ReleaseHostsRequest generates a "aws/request.Request" representing the // client's request for the ReleaseHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20817,7 +20817,7 @@ const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssocia // ReplaceIamInstanceProfileAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceIamInstanceProfileAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20896,7 +20896,7 @@ const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation" // ReplaceNetworkAclAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceNetworkAclAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -20975,7 +20975,7 @@ const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry" // ReplaceNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the ReplaceNetworkAclEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21053,7 +21053,7 @@ const opReplaceRoute = "ReplaceRoute" // ReplaceRouteRequest generates a "aws/request.Request" representing the // client's request for the ReplaceRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21135,7 +21135,7 @@ const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation" // ReplaceRouteTableAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceRouteTableAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21217,7 +21217,7 @@ const opReportInstanceStatus = "ReportInstanceStatus" // ReportInstanceStatusRequest generates a "aws/request.Request" representing the // client's request for the ReportInstanceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21299,7 +21299,7 @@ const opRequestSpotFleet = "RequestSpotFleet" // RequestSpotFleetRequest generates a "aws/request.Request" representing the // client's request for the RequestSpotFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21397,7 +21397,7 @@ const opRequestSpotInstances = "RequestSpotInstances" // RequestSpotInstancesRequest generates a "aws/request.Request" representing the // client's request for the RequestSpotInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21474,7 +21474,7 @@ const opResetFpgaImageAttribute = "ResetFpgaImageAttribute" // ResetFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetFpgaImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21549,7 +21549,7 @@ const opResetImageAttribute = "ResetImageAttribute" // ResetImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21627,7 +21627,7 @@ const opResetInstanceAttribute = "ResetInstanceAttribute" // ResetInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetInstanceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21711,7 +21711,7 @@ const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute" // ResetNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetNetworkInterfaceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21788,7 +21788,7 @@ const opResetSnapshotAttribute = "ResetSnapshotAttribute" // ResetSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21868,7 +21868,7 @@ const opRestoreAddressToClassic = "RestoreAddressToClassic" // RestoreAddressToClassicRequest generates a "aws/request.Request" representing the // client's request for the RestoreAddressToClassic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -21945,7 +21945,7 @@ const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress" // RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the // client's request for the RevokeSecurityGroupEgress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22033,7 +22033,7 @@ const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress" // RevokeSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22124,7 +22124,7 @@ const opRunInstances = "RunInstances" // RunInstancesRequest generates a "aws/request.Request" representing the // client's request for the RunInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22251,7 +22251,7 @@ const opRunScheduledInstances = "RunScheduledInstances" // RunScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the RunScheduledInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22335,7 +22335,7 @@ const opStartInstances = "StartInstances" // StartInstancesRequest generates a "aws/request.Request" representing the // client's request for the StartInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22431,7 +22431,7 @@ const opStopInstances = "StopInstances" // StopInstancesRequest generates a "aws/request.Request" representing the // client's request for the StopInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22537,7 +22537,7 @@ const opTerminateInstances = "TerminateInstances" // TerminateInstancesRequest generates a "aws/request.Request" representing the // client's request for the TerminateInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22635,7 +22635,7 @@ const opUnassignIpv6Addresses = "UnassignIpv6Addresses" // UnassignIpv6AddressesRequest generates a "aws/request.Request" representing the // client's request for the UnassignIpv6Addresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22709,7 +22709,7 @@ const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses" // UnassignPrivateIpAddressesRequest generates a "aws/request.Request" representing the // client's request for the UnassignPrivateIpAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22785,7 +22785,7 @@ const opUnmonitorInstances = "UnmonitorInstances" // UnmonitorInstancesRequest generates a "aws/request.Request" representing the // client's request for the UnmonitorInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22861,7 +22861,7 @@ const opUpdateSecurityGroupRuleDescriptionsEgress = "UpdateSecurityGroupRuleDesc // UpdateSecurityGroupRuleDescriptionsEgressRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityGroupRuleDescriptionsEgress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -22941,7 +22941,7 @@ const opUpdateSecurityGroupRuleDescriptionsIngress = "UpdateSecurityGroupRuleDes // UpdateSecurityGroupRuleDescriptionsIngressRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityGroupRuleDescriptionsIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -71054,6 +71054,9 @@ const ( // InstanceTypeG316xlarge is a InstanceType enum value InstanceTypeG316xlarge = "g3.16xlarge" + // InstanceTypeG3sXlarge is a InstanceType enum value + InstanceTypeG3sXlarge = "g3s.xlarge" + // InstanceTypeCg14xlarge is a InstanceType enum value InstanceTypeCg14xlarge = "cg1.4xlarge" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index e7b467d3409..ef61f6e8e53 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -15,7 +15,7 @@ const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability" // BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the BatchCheckLayerAvailability operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -107,7 +107,7 @@ const opBatchDeleteImage = "BatchDeleteImage" // BatchDeleteImageRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -202,7 +202,7 @@ const opBatchGetImage = "BatchGetImage" // BatchGetImageRequest generates a "aws/request.Request" representing the // client's request for the BatchGetImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -290,7 +290,7 @@ const opCompleteLayerUpload = "CompleteLayerUpload" // CompleteLayerUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteLayerUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -400,7 +400,7 @@ const opCreateRepository = "CreateRepository" // CreateRepositoryRequest generates a "aws/request.Request" representing the // client's request for the CreateRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -492,7 +492,7 @@ const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -582,7 +582,7 @@ const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -674,7 +674,7 @@ const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy" // DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepositoryPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -765,7 +765,7 @@ const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -917,7 +917,7 @@ const opDescribeRepositories = "DescribeRepositories" // DescribeRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRepositories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1060,7 +1060,7 @@ const opGetAuthorizationToken = "GetAuthorizationToken" // GetAuthorizationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizationToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1150,7 +1150,7 @@ const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer" // GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the // client's request for the GetDownloadUrlForLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1250,7 +1250,7 @@ const opGetLifecyclePolicy = "GetLifecyclePolicy" // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1340,7 +1340,7 @@ const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview" // GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicyPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1430,7 +1430,7 @@ const opGetRepositoryPolicy = "GetRepositoryPolicy" // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetRepositoryPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1521,7 +1521,7 @@ const opInitiateLayerUpload = "InitiateLayerUpload" // InitiateLayerUploadRequest generates a "aws/request.Request" representing the // client's request for the InitiateLayerUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1612,7 +1612,7 @@ const opListImages = "ListImages" // ListImagesRequest generates a "aws/request.Request" representing the // client's request for the ListImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1761,7 +1761,7 @@ const opPutImage = "PutImage" // PutImageRequest generates a "aws/request.Request" representing the // client's request for the PutImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1866,7 +1866,7 @@ const opPutLifecyclePolicy = "PutLifecyclePolicy" // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1954,7 +1954,7 @@ const opSetRepositoryPolicy = "SetRepositoryPolicy" // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetRepositoryPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2041,7 +2041,7 @@ const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview" // StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the // client's request for the StartLifecyclePolicyPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2136,7 +2136,7 @@ const opUploadLayerPart = "UploadLayerPart" // UploadLayerPartRequest generates a "aws/request.Request" representing the // client's request for the UploadLayerPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 5060627b0b5..468c4d455ea 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -16,7 +16,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -114,7 +114,7 @@ const opCreateService = "CreateService" // CreateServiceRequest generates a "aws/request.Request" representing the // client's request for the CreateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -281,7 +281,7 @@ const opDeleteAttributes = "DeleteAttributes" // DeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -370,7 +370,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -477,7 +477,7 @@ const opDeleteService = "DeleteService" // DeleteServiceRequest generates a "aws/request.Request" representing the // client's request for the DeleteService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -589,7 +589,7 @@ const opDeregisterContainerInstance = "DeregisterContainerInstance" // DeregisterContainerInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterContainerInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -695,7 +695,7 @@ const opDeregisterTaskDefinition = "DeregisterTaskDefinition" // DeregisterTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTaskDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -797,7 +797,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -885,7 +885,7 @@ const opDescribeContainerInstances = "DescribeContainerInstances" // DescribeContainerInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeContainerInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -978,7 +978,7 @@ const opDescribeServices = "DescribeServices" // DescribeServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1070,7 +1070,7 @@ const opDescribeTaskDefinition = "DescribeTaskDefinition" // DescribeTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DescribeTaskDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1163,7 +1163,7 @@ const opDescribeTasks = "DescribeTasks" // DescribeTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1255,7 +1255,7 @@ const opDiscoverPollEndpoint = "DiscoverPollEndpoint" // DiscoverPollEndpointRequest generates a "aws/request.Request" representing the // client's request for the DiscoverPollEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1342,7 +1342,7 @@ const opListAttributes = "ListAttributes" // ListAttributesRequest generates a "aws/request.Request" representing the // client's request for the ListAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1432,7 +1432,7 @@ const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1576,7 +1576,7 @@ const opListContainerInstances = "ListContainerInstances" // ListContainerInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListContainerInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1728,7 +1728,7 @@ const opListServices = "ListServices" // ListServicesRequest generates a "aws/request.Request" representing the // client's request for the ListServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1876,7 +1876,7 @@ const opListTaskDefinitionFamilies = "ListTaskDefinitionFamilies" // ListTaskDefinitionFamiliesRequest generates a "aws/request.Request" representing the // client's request for the ListTaskDefinitionFamilies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2026,7 +2026,7 @@ const opListTaskDefinitions = "ListTaskDefinitions" // ListTaskDefinitionsRequest generates a "aws/request.Request" representing the // client's request for the ListTaskDefinitions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2172,7 +2172,7 @@ const opListTasks = "ListTasks" // ListTasksRequest generates a "aws/request.Request" representing the // client's request for the ListTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2329,7 +2329,7 @@ const opPutAttributes = "PutAttributes" // PutAttributesRequest generates a "aws/request.Request" representing the // client's request for the PutAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2427,7 +2427,7 @@ const opRegisterContainerInstance = "RegisterContainerInstance" // RegisterContainerInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterContainerInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2519,7 +2519,7 @@ const opRegisterTaskDefinition = "RegisterTaskDefinition" // RegisterTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the RegisterTaskDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2627,7 +2627,7 @@ const opRunTask = "RunTask" // RunTaskRequest generates a "aws/request.Request" representing the // client's request for the RunTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2765,7 +2765,7 @@ const opStartTask = "StartTask" // StartTaskRequest generates a "aws/request.Request" representing the // client's request for the StartTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2862,7 +2862,7 @@ const opStopTask = "StopTask" // StopTaskRequest generates a "aws/request.Request" representing the // client's request for the StopTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2965,7 +2965,7 @@ const opSubmitContainerStateChange = "SubmitContainerStateChange" // SubmitContainerStateChangeRequest generates a "aws/request.Request" representing the // client's request for the SubmitContainerStateChange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3055,7 +3055,7 @@ const opSubmitTaskStateChange = "SubmitTaskStateChange" // SubmitTaskStateChangeRequest generates a "aws/request.Request" representing the // client's request for the SubmitTaskStateChange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3145,7 +3145,7 @@ const opUpdateContainerAgent = "UpdateContainerAgent" // UpdateContainerAgentRequest generates a "aws/request.Request" representing the // client's request for the UpdateContainerAgent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3265,7 +3265,7 @@ const opUpdateContainerInstancesState = "UpdateContainerInstancesState" // UpdateContainerInstancesStateRequest generates a "aws/request.Request" representing the // client's request for the UpdateContainerInstancesState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3400,7 +3400,7 @@ const opUpdateService = "UpdateService" // UpdateServiceRequest generates a "aws/request.Request" representing the // client's request for the UpdateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index cc40d16918c..f24886fa39b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -18,7 +18,7 @@ const opCreateFileSystem = "CreateFileSystem" // CreateFileSystemRequest generates a "aws/request.Request" representing the // client's request for the CreateFileSystem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -165,7 +165,7 @@ const opCreateMountTarget = "CreateMountTarget" // CreateMountTargetRequest generates a "aws/request.Request" representing the // client's request for the CreateMountTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -382,7 +382,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -477,7 +477,7 @@ const opDeleteFileSystem = "DeleteFileSystem" // DeleteFileSystemRequest generates a "aws/request.Request" representing the // client's request for the DeleteFileSystem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -584,7 +584,7 @@ const opDeleteMountTarget = "DeleteMountTarget" // DeleteMountTargetRequest generates a "aws/request.Request" representing the // client's request for the DeleteMountTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -701,7 +701,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -797,7 +797,7 @@ const opDescribeFileSystems = "DescribeFileSystems" // DescribeFileSystemsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFileSystems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -909,7 +909,7 @@ const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups" // DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMountTargetSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1009,7 +1009,7 @@ const opDescribeMountTargets = "DescribeMountTargets" // DescribeMountTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMountTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1106,7 +1106,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1198,7 +1198,7 @@ const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups" // ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the ModifyMountTargetSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1313,7 +1313,7 @@ const opUpdateFileSystem = "UpdateFileSystem" // UpdateFileSystemRequest generates a "aws/request.Request" representing the // client's request for the UpdateFileSystem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go index bb1cefd8892..a4fd7cd4935 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go @@ -15,7 +15,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -139,7 +139,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -240,7 +240,7 @@ const opDescribeCluster = "DescribeCluster" // DescribeClusterRequest generates a "aws/request.Request" representing the // client's request for the DescribeCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -339,7 +339,7 @@ const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index 7adb50822e8..20d01f6dfce 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -18,7 +18,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -118,7 +118,7 @@ const opAuthorizeCacheSecurityGroupIngress = "AuthorizeCacheSecurityGroupIngress // AuthorizeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeCacheSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -216,7 +216,7 @@ const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopySnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -376,7 +376,7 @@ const opCreateCacheCluster = "CreateCacheCluster" // CreateCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -506,7 +506,7 @@ const opCreateCacheParameterGroup = "CreateCacheParameterGroup" // CreateCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -612,7 +612,7 @@ const opCreateCacheSecurityGroup = "CreateCacheSecurityGroup" // CreateCacheSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -707,7 +707,7 @@ const opCreateCacheSubnetGroup = "CreateCacheSubnetGroup" // CreateCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -801,7 +801,7 @@ const opCreateReplicationGroup = "CreateReplicationGroup" // CreateReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -955,7 +955,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1070,7 +1070,7 @@ const opDecreaseReplicaCount = "DecreaseReplicaCount" // DecreaseReplicaCountRequest generates a "aws/request.Request" representing the // client's request for the DecreaseReplicaCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1190,7 +1190,7 @@ const opDeleteCacheCluster = "DeleteCacheCluster" // DeleteCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1305,7 +1305,7 @@ const opDeleteCacheParameterGroup = "DeleteCacheParameterGroup" // DeleteCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1398,7 +1398,7 @@ const opDeleteCacheSecurityGroup = "DeleteCacheSecurityGroup" // DeleteCacheSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1491,7 +1491,7 @@ const opDeleteCacheSubnetGroup = "DeleteCacheSubnetGroup" // DeleteCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1578,7 +1578,7 @@ const opDeleteReplicationGroup = "DeleteReplicationGroup" // DeleteReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1694,7 +1694,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1787,7 +1787,7 @@ const opDescribeCacheClusters = "DescribeCacheClusters" // DescribeCacheClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1949,7 +1949,7 @@ const opDescribeCacheEngineVersions = "DescribeCacheEngineVersions" // DescribeCacheEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheEngineVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2079,7 +2079,7 @@ const opDescribeCacheParameterGroups = "DescribeCacheParameterGroups" // DescribeCacheParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2223,7 +2223,7 @@ const opDescribeCacheParameters = "DescribeCacheParameters" // DescribeCacheParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2365,7 +2365,7 @@ const opDescribeCacheSecurityGroups = "DescribeCacheSecurityGroups" // DescribeCacheSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2508,7 +2508,7 @@ const opDescribeCacheSubnetGroups = "DescribeCacheSubnetGroups" // DescribeCacheSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2645,7 +2645,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2784,7 +2784,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2927,7 +2927,7 @@ const opDescribeReplicationGroups = "DescribeReplicationGroups" // DescribeReplicationGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3072,7 +3072,7 @@ const opDescribeReservedCacheNodes = "DescribeReservedCacheNodes" // DescribeReservedCacheNodesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedCacheNodes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3214,7 +3214,7 @@ const opDescribeReservedCacheNodesOfferings = "DescribeReservedCacheNodesOfferin // DescribeReservedCacheNodesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedCacheNodesOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3355,7 +3355,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3504,7 +3504,7 @@ const opIncreaseReplicaCount = "IncreaseReplicaCount" // IncreaseReplicaCountRequest generates a "aws/request.Request" representing the // client's request for the IncreaseReplicaCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3621,7 +3621,7 @@ const opListAllowedNodeTypeModifications = "ListAllowedNodeTypeModifications" // ListAllowedNodeTypeModificationsRequest generates a "aws/request.Request" representing the // client's request for the ListAllowedNodeTypeModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3714,7 +3714,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3808,7 +3808,7 @@ const opModifyCacheCluster = "ModifyCacheCluster" // ModifyCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3924,7 +3924,7 @@ const opModifyCacheParameterGroup = "ModifyCacheParameterGroup" // ModifyCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4016,7 +4016,7 @@ const opModifyCacheSubnetGroup = "ModifyCacheSubnetGroup" // ModifyCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4106,7 +4106,7 @@ const opModifyReplicationGroup = "ModifyReplicationGroup" // ModifyReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4239,7 +4239,7 @@ const opModifyReplicationGroupShardConfiguration = "ModifyReplicationGroupShardC // ModifyReplicationGroupShardConfigurationRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationGroupShardConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4347,7 +4347,7 @@ const opPurchaseReservedCacheNodesOffering = "PurchaseReservedCacheNodesOffering // PurchaseReservedCacheNodesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedCacheNodesOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4439,7 +4439,7 @@ const opRebootCacheCluster = "RebootCacheCluster" // RebootCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the RebootCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4537,7 +4537,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4625,7 +4625,7 @@ const opResetCacheParameterGroup = "ResetCacheParameterGroup" // ResetCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4718,7 +4718,7 @@ const opRevokeCacheSecurityGroupIngress = "RevokeCacheSecurityGroupIngress" // RevokeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeCacheSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4812,7 +4812,7 @@ const opTestFailover = "TestFailover" // TestFailoverRequest generates a "aws/request.Request" representing the // client's request for the TestFailover operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index c6971eead26..1f3a76b0426 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -18,7 +18,7 @@ const opAbortEnvironmentUpdate = "AbortEnvironmentUpdate" // AbortEnvironmentUpdateRequest generates a "aws/request.Request" representing the // client's request for the AbortEnvironmentUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -101,7 +101,7 @@ const opApplyEnvironmentManagedAction = "ApplyEnvironmentManagedAction" // ApplyEnvironmentManagedActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyEnvironmentManagedAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -185,7 +185,7 @@ const opCheckDNSAvailability = "CheckDNSAvailability" // CheckDNSAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the CheckDNSAvailability operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -259,7 +259,7 @@ const opComposeEnvironments = "ComposeEnvironments" // ComposeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the ComposeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -348,7 +348,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -428,7 +428,7 @@ const opCreateApplicationVersion = "CreateApplicationVersion" // CreateApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateApplicationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -543,7 +543,7 @@ const opCreateConfigurationTemplate = "CreateConfigurationTemplate" // CreateConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -642,7 +642,7 @@ const opCreateEnvironment = "CreateEnvironment" // CreateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the CreateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -726,7 +726,7 @@ const opCreatePlatformVersion = "CreatePlatformVersion" // CreatePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -813,7 +813,7 @@ const opCreateStorageLocation = "CreateStorageLocation" // CreateStorageLocationRequest generates a "aws/request.Request" representing the // client's request for the CreateStorageLocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -903,7 +903,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -989,7 +989,7 @@ const opDeleteApplicationVersion = "DeleteApplicationVersion" // DeleteApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplicationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1092,7 +1092,7 @@ const opDeleteConfigurationTemplate = "DeleteConfigurationTemplate" // DeleteConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1178,7 +1178,7 @@ const opDeleteEnvironmentConfiguration = "DeleteEnvironmentConfiguration" // DeleteEnvironmentConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironmentConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1261,7 +1261,7 @@ const opDeletePlatformVersion = "DeletePlatformVersion" // DeletePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePlatformVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1352,7 +1352,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1435,7 +1435,7 @@ const opDescribeApplicationVersions = "DescribeApplicationVersions" // DescribeApplicationVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApplicationVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1509,7 +1509,7 @@ const opDescribeApplications = "DescribeApplications" // DescribeApplicationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1583,7 +1583,7 @@ const opDescribeConfigurationOptions = "DescribeConfigurationOptions" // DescribeConfigurationOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1666,7 +1666,7 @@ const opDescribeConfigurationSettings = "DescribeConfigurationSettings" // DescribeConfigurationSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1757,7 +1757,7 @@ const opDescribeEnvironmentHealth = "DescribeEnvironmentHealth" // DescribeEnvironmentHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1842,7 +1842,7 @@ const opDescribeEnvironmentManagedActionHistory = "DescribeEnvironmentManagedAct // DescribeEnvironmentManagedActionHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentManagedActionHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1921,7 +1921,7 @@ const opDescribeEnvironmentManagedActions = "DescribeEnvironmentManagedActions" // DescribeEnvironmentManagedActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentManagedActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2000,7 +2000,7 @@ const opDescribeEnvironmentResources = "DescribeEnvironmentResources" // DescribeEnvironmentResourcesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2080,7 +2080,7 @@ const opDescribeEnvironments = "DescribeEnvironments" // DescribeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2154,7 +2154,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2286,7 +2286,7 @@ const opDescribeInstancesHealth = "DescribeInstancesHealth" // DescribeInstancesHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancesHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2370,7 +2370,7 @@ const opDescribePlatformVersion = "DescribePlatformVersion" // DescribePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the DescribePlatformVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2453,7 +2453,7 @@ const opListAvailableSolutionStacks = "ListAvailableSolutionStacks" // ListAvailableSolutionStacksRequest generates a "aws/request.Request" representing the // client's request for the ListAvailableSolutionStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2528,7 +2528,7 @@ const opListPlatformVersions = "ListPlatformVersions" // ListPlatformVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPlatformVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2611,7 +2611,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2703,7 +2703,7 @@ const opRebuildEnvironment = "RebuildEnvironment" // RebuildEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the RebuildEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2786,7 +2786,7 @@ const opRequestEnvironmentInfo = "RequestEnvironmentInfo" // RequestEnvironmentInfoRequest generates a "aws/request.Request" representing the // client's request for the RequestEnvironmentInfo operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2876,7 +2876,7 @@ const opRestartAppServer = "RestartAppServer" // RestartAppServerRequest generates a "aws/request.Request" representing the // client's request for the RestartAppServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2953,7 +2953,7 @@ const opRetrieveEnvironmentInfo = "RetrieveEnvironmentInfo" // RetrieveEnvironmentInfoRequest generates a "aws/request.Request" representing the // client's request for the RetrieveEnvironmentInfo operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3031,7 +3031,7 @@ const opSwapEnvironmentCNAMEs = "SwapEnvironmentCNAMEs" // SwapEnvironmentCNAMEsRequest generates a "aws/request.Request" representing the // client's request for the SwapEnvironmentCNAMEs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3107,7 +3107,7 @@ const opTerminateEnvironment = "TerminateEnvironment" // TerminateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the TerminateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3187,7 +3187,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3264,7 +3264,7 @@ const opUpdateApplicationResourceLifecycle = "UpdateApplicationResourceLifecycle // UpdateApplicationResourceLifecycleRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplicationResourceLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3344,7 +3344,7 @@ const opUpdateApplicationVersion = "UpdateApplicationVersion" // UpdateApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplicationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3421,7 +3421,7 @@ const opUpdateConfigurationTemplate = "UpdateConfigurationTemplate" // UpdateConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3512,7 +3512,7 @@ const opUpdateEnvironment = "UpdateEnvironment" // UpdateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3605,7 +3605,7 @@ const opUpdateTagsForResource = "UpdateTagsForResource" // UpdateTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3723,7 +3723,7 @@ const opValidateConfigurationSettings = "ValidateConfigurationSettings" // ValidateConfigurationSettingsRequest generates a "aws/request.Request" representing the // client's request for the ValidateConfigurationSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index 5df6dcd9b49..c4915fbd8be 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -18,7 +18,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -106,12 +106,103 @@ func (c *ElasticsearchService) AddTagsWithContext(ctx aws.Context, input *AddTag return out, req.Send() } +const opCancelElasticsearchServiceSoftwareUpdate = "CancelElasticsearchServiceSoftwareUpdate" + +// CancelElasticsearchServiceSoftwareUpdateRequest generates a "aws/request.Request" representing the +// client's request for the CancelElasticsearchServiceSoftwareUpdate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelElasticsearchServiceSoftwareUpdate for more information on using the CancelElasticsearchServiceSoftwareUpdate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelElasticsearchServiceSoftwareUpdateRequest method. +// req, resp := client.CancelElasticsearchServiceSoftwareUpdateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdateRequest(input *CancelElasticsearchServiceSoftwareUpdateInput) (req *request.Request, output *CancelElasticsearchServiceSoftwareUpdateOutput) { + op := &request.Operation{ + Name: opCancelElasticsearchServiceSoftwareUpdate, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/es/serviceSoftwareUpdate/cancel", + } + + if input == nil { + input = &CancelElasticsearchServiceSoftwareUpdateInput{} + } + + output = &CancelElasticsearchServiceSoftwareUpdateOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelElasticsearchServiceSoftwareUpdate API operation for Amazon Elasticsearch Service. +// +// Cancels a scheduled service software update for an Amazon ES domain. You +// can only perform this operation before the AutomatedUpdateDate and when the +// UpdateStatus is in the PENDING_UPDATE state. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation CancelElasticsearchServiceSoftwareUpdate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdate(input *CancelElasticsearchServiceSoftwareUpdateInput) (*CancelElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.CancelElasticsearchServiceSoftwareUpdateRequest(input) + return out, req.Send() +} + +// CancelElasticsearchServiceSoftwareUpdateWithContext is the same as CancelElasticsearchServiceSoftwareUpdate with the addition of +// the ability to pass a context and additional request options. +// +// See CancelElasticsearchServiceSoftwareUpdate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdateWithContext(ctx aws.Context, input *CancelElasticsearchServiceSoftwareUpdateInput, opts ...request.Option) (*CancelElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.CancelElasticsearchServiceSoftwareUpdateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateElasticsearchDomain = "CreateElasticsearchDomain" // CreateElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -214,7 +305,7 @@ const opDeleteElasticsearchDomain = "DeleteElasticsearchDomain" // DeleteElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -304,7 +395,7 @@ const opDeleteElasticsearchServiceRole = "DeleteElasticsearchServiceRole" // DeleteElasticsearchServiceRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteElasticsearchServiceRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -395,7 +486,7 @@ const opDescribeElasticsearchDomain = "DescribeElasticsearchDomain" // DescribeElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -485,7 +576,7 @@ const opDescribeElasticsearchDomainConfig = "DescribeElasticsearchDomainConfig" // DescribeElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomainConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -576,7 +667,7 @@ const opDescribeElasticsearchDomains = "DescribeElasticsearchDomains" // DescribeElasticsearchDomainsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -662,7 +753,7 @@ const opDescribeElasticsearchInstanceTypeLimits = "DescribeElasticsearchInstance // DescribeElasticsearchInstanceTypeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchInstanceTypeLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -761,7 +852,7 @@ const opDescribeReservedElasticsearchInstanceOfferings = "DescribeReservedElasti // DescribeReservedElasticsearchInstanceOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedElasticsearchInstanceOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -907,7 +998,7 @@ const opDescribeReservedElasticsearchInstances = "DescribeReservedElasticsearchI // DescribeReservedElasticsearchInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedElasticsearchInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1053,7 +1144,7 @@ const opGetCompatibleElasticsearchVersions = "GetCompatibleElasticsearchVersions // GetCompatibleElasticsearchVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetCompatibleElasticsearchVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1148,7 +1239,7 @@ const opGetUpgradeHistory = "GetUpgradeHistory" // GetUpgradeHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetUpgradeHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1298,7 +1389,7 @@ const opGetUpgradeStatus = "GetUpgradeStatus" // GetUpgradeStatusRequest generates a "aws/request.Request" representing the // client's request for the GetUpgradeStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1392,7 +1483,7 @@ const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the ListDomainNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1473,7 +1564,7 @@ const opListElasticsearchInstanceTypes = "ListElasticsearchInstanceTypes" // ListElasticsearchInstanceTypesRequest generates a "aws/request.Request" representing the // client's request for the ListElasticsearchInstanceTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1618,7 +1709,7 @@ const opListElasticsearchVersions = "ListElasticsearchVersions" // ListElasticsearchVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListElasticsearchVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1763,7 +1854,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1852,7 +1943,7 @@ const opPurchaseReservedElasticsearchInstanceOffering = "PurchaseReservedElastic // PurchaseReservedElasticsearchInstanceOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedElasticsearchInstanceOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1950,7 +2041,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2032,12 +2123,101 @@ func (c *ElasticsearchService) RemoveTagsWithContext(ctx aws.Context, input *Rem return out, req.Send() } +const opStartElasticsearchServiceSoftwareUpdate = "StartElasticsearchServiceSoftwareUpdate" + +// StartElasticsearchServiceSoftwareUpdateRequest generates a "aws/request.Request" representing the +// client's request for the StartElasticsearchServiceSoftwareUpdate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartElasticsearchServiceSoftwareUpdate for more information on using the StartElasticsearchServiceSoftwareUpdate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartElasticsearchServiceSoftwareUpdateRequest method. +// req, resp := client.StartElasticsearchServiceSoftwareUpdateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdateRequest(input *StartElasticsearchServiceSoftwareUpdateInput) (req *request.Request, output *StartElasticsearchServiceSoftwareUpdateOutput) { + op := &request.Operation{ + Name: opStartElasticsearchServiceSoftwareUpdate, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/es/serviceSoftwareUpdate/start", + } + + if input == nil { + input = &StartElasticsearchServiceSoftwareUpdateInput{} + } + + output = &StartElasticsearchServiceSoftwareUpdateOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartElasticsearchServiceSoftwareUpdate API operation for Amazon Elasticsearch Service. +// +// Schedules a service software update for an Amazon ES domain. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elasticsearch Service's +// API operation StartElasticsearchServiceSoftwareUpdate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdate(input *StartElasticsearchServiceSoftwareUpdateInput) (*StartElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.StartElasticsearchServiceSoftwareUpdateRequest(input) + return out, req.Send() +} + +// StartElasticsearchServiceSoftwareUpdateWithContext is the same as StartElasticsearchServiceSoftwareUpdate with the addition of +// the ability to pass a context and additional request options. +// +// See StartElasticsearchServiceSoftwareUpdate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdateWithContext(ctx aws.Context, input *StartElasticsearchServiceSoftwareUpdateInput, opts ...request.Option) (*StartElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.StartElasticsearchServiceSoftwareUpdateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateElasticsearchDomainConfig = "UpdateElasticsearchDomainConfig" // UpdateElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateElasticsearchDomainConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2135,7 +2315,7 @@ const opUpgradeElasticsearchDomain = "UpgradeElasticsearchDomain" // UpgradeElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the UpgradeElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2435,6 +2615,76 @@ func (s *AdvancedOptionsStatus) SetStatus(v *OptionStatus) *AdvancedOptionsStatu return s } +// Container for the parameters to the CancelElasticsearchServiceSoftwareUpdate +// operation. Specifies the name of the Elasticsearch domain that you wish to +// cancel a service software update on. +type CancelElasticsearchServiceSoftwareUpdateInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to stop the latest service software + // update on. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelElasticsearchServiceSoftwareUpdateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelElasticsearchServiceSoftwareUpdateInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CancelElasticsearchServiceSoftwareUpdateInput) SetDomainName(v string) *CancelElasticsearchServiceSoftwareUpdateInput { + s.DomainName = &v + return s +} + +// The result of a CancelElasticsearchServiceSoftwareUpdate operation. Contains +// the status of the update. +type CancelElasticsearchServiceSoftwareUpdateOutput struct { + _ struct{} `type:"structure"` + + // The current status of the Elasticsearch service software update. + ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` +} + +// String returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateOutput) GoString() string { + return s.String() +} + +// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. +func (s *CancelElasticsearchServiceSoftwareUpdateOutput) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *CancelElasticsearchServiceSoftwareUpdateOutput { + s.ServiceSoftwareOptions = v + return s +} + // Options to specify the Cognito user and identity pools for Kibana authentication. // For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). type CognitoOptions struct { @@ -3746,6 +3996,9 @@ type ElasticsearchDomainStatus struct { // active. Processing *bool `type:"boolean"` + // The current status of the Elasticsearch domain's service software. + ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` + // Specifies the status of the SnapshotOptions SnapshotOptions *SnapshotOptions `type:"structure"` @@ -3870,6 +4123,12 @@ func (s *ElasticsearchDomainStatus) SetProcessing(v bool) *ElasticsearchDomainSt return s } +// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. +func (s *ElasticsearchDomainStatus) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *ElasticsearchDomainStatus { + s.ServiceSoftwareOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *ElasticsearchDomainStatus) SetSnapshotOptions(v *SnapshotOptions) *ElasticsearchDomainStatus { s.SnapshotOptions = v @@ -5303,6 +5562,88 @@ func (s *ReservedElasticsearchInstanceOffering) SetUsagePrice(v float64) *Reserv return s } +// The current options of an Elasticsearch domain service software options. +type ServiceSoftwareOptions struct { + _ struct{} `type:"structure"` + + // Timestamp, in Epoch time, until which you can manually request a service + // software update. After this date, we automatically update your service software. + AutomatedUpdateDate *time.Time `type:"timestamp"` + + // True if you are able to cancel your service software version update. False + // if you are not able to cancel your service software version. + Cancellable *bool `type:"boolean"` + + // The current service software version that is present on the domain. + CurrentVersion *string `type:"string"` + + // The description of the UpdateStatus. + Description *string `type:"string"` + + // The new service software version if one is available. + NewVersion *string `type:"string"` + + // True if you are able to update you service software version. False if you + // are not able to update your service software version. + UpdateAvailable *bool `type:"boolean"` + + // The status of your service software update. This field can take the following + // values: ELIGIBLE, PENDING_UPDATE, IN_PROGRESS, COMPLETED, and NOT_ELIGIBLE. + UpdateStatus *string `type:"string" enum:"DeploymentStatus"` +} + +// String returns the string representation +func (s ServiceSoftwareOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceSoftwareOptions) GoString() string { + return s.String() +} + +// SetAutomatedUpdateDate sets the AutomatedUpdateDate field's value. +func (s *ServiceSoftwareOptions) SetAutomatedUpdateDate(v time.Time) *ServiceSoftwareOptions { + s.AutomatedUpdateDate = &v + return s +} + +// SetCancellable sets the Cancellable field's value. +func (s *ServiceSoftwareOptions) SetCancellable(v bool) *ServiceSoftwareOptions { + s.Cancellable = &v + return s +} + +// SetCurrentVersion sets the CurrentVersion field's value. +func (s *ServiceSoftwareOptions) SetCurrentVersion(v string) *ServiceSoftwareOptions { + s.CurrentVersion = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ServiceSoftwareOptions) SetDescription(v string) *ServiceSoftwareOptions { + s.Description = &v + return s +} + +// SetNewVersion sets the NewVersion field's value. +func (s *ServiceSoftwareOptions) SetNewVersion(v string) *ServiceSoftwareOptions { + s.NewVersion = &v + return s +} + +// SetUpdateAvailable sets the UpdateAvailable field's value. +func (s *ServiceSoftwareOptions) SetUpdateAvailable(v bool) *ServiceSoftwareOptions { + s.UpdateAvailable = &v + return s +} + +// SetUpdateStatus sets the UpdateStatus field's value. +func (s *ServiceSoftwareOptions) SetUpdateStatus(v string) *ServiceSoftwareOptions { + s.UpdateStatus = &v + return s +} + // Specifies the time, in UTC format, when the service takes a daily automated // snapshot of the specified Elasticsearch domain. Default value is 0 hours. type SnapshotOptions struct { @@ -5366,6 +5707,75 @@ func (s *SnapshotOptionsStatus) SetStatus(v *OptionStatus) *SnapshotOptionsStatu return s } +// Container for the parameters to the StartElasticsearchServiceSoftwareUpdate +// operation. Specifies the name of the Elasticsearch domain that you wish to +// schedule a service software update on. +type StartElasticsearchServiceSoftwareUpdateInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to update to the latest service software. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartElasticsearchServiceSoftwareUpdateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartElasticsearchServiceSoftwareUpdateInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *StartElasticsearchServiceSoftwareUpdateInput) SetDomainName(v string) *StartElasticsearchServiceSoftwareUpdateInput { + s.DomainName = &v + return s +} + +// The result of a StartElasticsearchServiceSoftwareUpdate operation. Contains +// the status of the update. +type StartElasticsearchServiceSoftwareUpdateOutput struct { + _ struct{} `type:"structure"` + + // The current status of the Elasticsearch service software update. + ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` +} + +// String returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateOutput) GoString() string { + return s.String() +} + +// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. +func (s *StartElasticsearchServiceSoftwareUpdateOutput) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *StartElasticsearchServiceSoftwareUpdateOutput { + s.ServiceSoftwareOptions = v + return s +} + // StorageTypes represents the list of storage related types and their attributes // that are available for given InstanceType. type StorageType struct { @@ -6032,6 +6442,23 @@ func (s *VPCOptions) SetSubnetIds(v []*string) *VPCOptions { return s } +const ( + // DeploymentStatusPendingUpdate is a DeploymentStatus enum value + DeploymentStatusPendingUpdate = "PENDING_UPDATE" + + // DeploymentStatusInProgress is a DeploymentStatus enum value + DeploymentStatusInProgress = "IN_PROGRESS" + + // DeploymentStatusCompleted is a DeploymentStatus enum value + DeploymentStatusCompleted = "COMPLETED" + + // DeploymentStatusNotEligible is a DeploymentStatus enum value + DeploymentStatusNotEligible = "NOT_ELIGIBLE" + + // DeploymentStatusEligible is a DeploymentStatus enum value + DeploymentStatusEligible = "ELIGIBLE" +) + const ( // ESPartitionInstanceTypeM3MediumElasticsearch is a ESPartitionInstanceType enum value ESPartitionInstanceTypeM3MediumElasticsearch = "m3.medium.elasticsearch" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go index 0b044bcbcad..05c07b9f6df 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go @@ -15,7 +15,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -113,7 +113,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -213,7 +213,7 @@ const opCreatePipeline = "CreatePipeline" // CreatePipelineRequest generates a "aws/request.Request" representing the // client's request for the CreatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -307,7 +307,7 @@ const opCreatePreset = "CreatePreset" // CreatePresetRequest generates a "aws/request.Request" representing the // client's request for the CreatePreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -410,7 +410,7 @@ const opDeletePipeline = "DeletePipeline" // DeletePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeletePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -508,7 +508,7 @@ const opDeletePreset = "DeletePreset" // DeletePresetRequest generates a "aws/request.Request" representing the // client's request for the DeletePreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -600,7 +600,7 @@ const opListJobsByPipeline = "ListJobsByPipeline" // ListJobsByPipelineRequest generates a "aws/request.Request" representing the // client's request for the ListJobsByPipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -750,7 +750,7 @@ const opListJobsByStatus = "ListJobsByStatus" // ListJobsByStatusRequest generates a "aws/request.Request" representing the // client's request for the ListJobsByStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -898,7 +898,7 @@ const opListPipelines = "ListPipelines" // ListPipelinesRequest generates a "aws/request.Request" representing the // client's request for the ListPipelines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1040,7 +1040,7 @@ const opListPresets = "ListPresets" // ListPresetsRequest generates a "aws/request.Request" representing the // client's request for the ListPresets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1182,7 +1182,7 @@ const opReadJob = "ReadJob" // ReadJobRequest generates a "aws/request.Request" representing the // client's request for the ReadJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1272,7 +1272,7 @@ const opReadPipeline = "ReadPipeline" // ReadPipelineRequest generates a "aws/request.Request" representing the // client's request for the ReadPipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1362,7 +1362,7 @@ const opReadPreset = "ReadPreset" // ReadPresetRequest generates a "aws/request.Request" representing the // client's request for the ReadPreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1452,7 +1452,7 @@ const opTestRole = "TestRole" // TestRoleRequest generates a "aws/request.Request" representing the // client's request for the TestRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1557,7 +1557,7 @@ const opUpdatePipeline = "UpdatePipeline" // UpdatePipelineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1656,7 +1656,7 @@ const opUpdatePipelineNotifications = "UpdatePipelineNotifications" // UpdatePipelineNotificationsRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipelineNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1754,7 +1754,7 @@ const opUpdatePipelineStatus = "UpdatePipelineStatus" // UpdatePipelineStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipelineStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index bb3af054023..ea0bc5937be 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -16,7 +16,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -109,7 +109,7 @@ const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer" // ApplySecurityGroupsToLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the ApplySecurityGroupsToLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -199,7 +199,7 @@ const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets" // AttachLoadBalancerToSubnetsRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerToSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -293,7 +293,7 @@ const opConfigureHealthCheck = "ConfigureHealthCheck" // ConfigureHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the ConfigureHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -377,7 +377,7 @@ const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy" // CreateAppCookieStickinessPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateAppCookieStickinessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -479,7 +479,7 @@ const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy" // CreateLBCookieStickinessPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateLBCookieStickinessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -583,7 +583,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -712,7 +712,7 @@ const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners" // CreateLoadBalancerListenersRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerListeners operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -813,7 +813,7 @@ const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy" // CreateLoadBalancerPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -908,7 +908,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -991,7 +991,7 @@ const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners" // DeleteLoadBalancerListenersRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerListeners operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1070,7 +1070,7 @@ const opDeleteLoadBalancerPolicy = "DeleteLoadBalancerPolicy" // DeleteLoadBalancerPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1153,7 +1153,7 @@ const opDeregisterInstancesFromLoadBalancer = "DeregisterInstancesFromLoadBalanc // DeregisterInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstancesFromLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1243,7 +1243,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1321,7 +1321,7 @@ const opDescribeInstanceHealth = "DescribeInstanceHealth" // DescribeInstanceHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1408,7 +1408,7 @@ const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" // DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1490,7 +1490,7 @@ const opDescribeLoadBalancerPolicies = "DescribeLoadBalancerPolicies" // DescribeLoadBalancerPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1579,7 +1579,7 @@ const opDescribeLoadBalancerPolicyTypes = "DescribeLoadBalancerPolicyTypes" // DescribeLoadBalancerPolicyTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerPolicyTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1669,7 +1669,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1809,7 +1809,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1888,7 +1888,7 @@ const opDetachLoadBalancerFromSubnets = "DetachLoadBalancerFromSubnets" // DetachLoadBalancerFromSubnetsRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancerFromSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1975,7 +1975,7 @@ const opDisableAvailabilityZonesForLoadBalancer = "DisableAvailabilityZonesForLo // DisableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DisableAvailabilityZonesForLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2069,7 +2069,7 @@ const opEnableAvailabilityZonesForLoadBalancer = "EnableAvailabilityZonesForLoad // EnableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the EnableAvailabilityZonesForLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2156,7 +2156,7 @@ const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2256,7 +2256,7 @@ const opRegisterInstancesWithLoadBalancer = "RegisterInstancesWithLoadBalancer" // RegisterInstancesWithLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstancesWithLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2360,7 +2360,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2439,7 +2439,7 @@ const opSetLoadBalancerListenerSSLCertificate = "SetLoadBalancerListenerSSLCerti // SetLoadBalancerListenerSSLCertificateRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerListenerSSLCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2539,7 +2539,7 @@ const opSetLoadBalancerPoliciesForBackendServer = "SetLoadBalancerPoliciesForBac // SetLoadBalancerPoliciesForBackendServerRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerPoliciesForBackendServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2639,7 +2639,7 @@ const opSetLoadBalancerPoliciesOfListener = "SetLoadBalancerPoliciesOfListener" // SetLoadBalancerPoliciesOfListenerRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerPoliciesOfListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index b821105c51b..68b905d3fd0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -16,7 +16,7 @@ const opAddListenerCertificates = "AddListenerCertificates" // AddListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the AddListenerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -107,7 +107,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -203,7 +203,7 @@ const opCreateListener = "CreateListener" // CreateListenerRequest generates a "aws/request.Request" representing the // client's request for the CreateListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -339,7 +339,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -475,7 +475,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -602,7 +602,7 @@ const opCreateTargetGroup = "CreateTargetGroup" // CreateTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateTargetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -706,7 +706,7 @@ const opDeleteListener = "DeleteListener" // DeleteListenerRequest generates a "aws/request.Request" representing the // client's request for the DeleteListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -788,7 +788,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -882,7 +882,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -964,7 +964,7 @@ const opDeleteTargetGroup = "DeleteTargetGroup" // DeleteTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteTargetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1046,7 +1046,7 @@ const opDeregisterTargets = "DeregisterTargets" // DeregisterTargetsRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1131,7 +1131,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1211,7 +1211,7 @@ const opDescribeListenerCertificates = "DescribeListenerCertificates" // DescribeListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeListenerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1290,7 +1290,7 @@ const opDescribeListeners = "DescribeListeners" // DescribeListenersRequest generates a "aws/request.Request" representing the // client's request for the DescribeListeners operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1433,7 +1433,7 @@ const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" // DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1517,7 +1517,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1655,7 +1655,7 @@ const opDescribeRules = "DescribeRules" // DescribeRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1741,7 +1741,7 @@ const opDescribeSSLPolicies = "DescribeSSLPolicies" // DescribeSSLPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSSLPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1823,7 +1823,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1913,7 +1913,7 @@ const opDescribeTargetGroupAttributes = "DescribeTargetGroupAttributes" // DescribeTargetGroupAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetGroupAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1996,7 +1996,7 @@ const opDescribeTargetGroups = "DescribeTargetGroups" // DescribeTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2140,7 +2140,7 @@ const opDescribeTargetHealth = "DescribeTargetHealth" // DescribeTargetHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2227,7 +2227,7 @@ const opModifyListener = "ModifyListener" // ModifyListenerRequest generates a "aws/request.Request" representing the // client's request for the ModifyListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2354,7 +2354,7 @@ const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2441,7 +2441,7 @@ const opModifyRule = "ModifyRule" // ModifyRuleRequest generates a "aws/request.Request" representing the // client's request for the ModifyRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2552,7 +2552,7 @@ const opModifyTargetGroup = "ModifyTargetGroup" // ModifyTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyTargetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2637,7 +2637,7 @@ const opModifyTargetGroupAttributes = "ModifyTargetGroupAttributes" // ModifyTargetGroupAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyTargetGroupAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2719,7 +2719,7 @@ const opRegisterTargets = "RegisterTargets" // RegisterTargetsRequest generates a "aws/request.Request" representing the // client's request for the RegisterTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2824,7 +2824,7 @@ const opRemoveListenerCertificates = "RemoveListenerCertificates" // RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the RemoveListenerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2911,7 +2911,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3004,7 +3004,7 @@ const opSetIpAddressType = "SetIpAddressType" // SetIpAddressTypeRequest generates a "aws/request.Request" representing the // client's request for the SetIpAddressType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3092,7 +3092,7 @@ const opSetRulePriorities = "SetRulePriorities" // SetRulePrioritiesRequest generates a "aws/request.Request" representing the // client's request for the SetRulePriorities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3181,7 +3181,7 @@ const opSetSecurityGroups = "SetSecurityGroups" // SetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the SetSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3270,7 +3270,7 @@ const opSetSubnets = "SetSubnets" // SetSubnetsRequest generates a "aws/request.Request" representing the // client's request for the SetSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index 7ca8a0e7292..66e46254eeb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -18,7 +18,7 @@ const opAddInstanceFleet = "AddInstanceFleet" // AddInstanceFleetRequest generates a "aws/request.Request" representing the // client's request for the AddInstanceFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -103,7 +103,7 @@ const opAddInstanceGroups = "AddInstanceGroups" // AddInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the AddInstanceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -183,7 +183,7 @@ const opAddJobFlowSteps = "AddJobFlowSteps" // AddJobFlowStepsRequest generates a "aws/request.Request" representing the // client's request for the AddJobFlowSteps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -285,7 +285,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -369,7 +369,7 @@ const opCancelSteps = "CancelSteps" // CancelStepsRequest generates a "aws/request.Request" representing the // client's request for the CancelSteps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -456,7 +456,7 @@ const opCreateSecurityConfiguration = "CreateSecurityConfiguration" // CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -539,7 +539,7 @@ const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" // DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -621,7 +621,7 @@ const opDescribeCluster = "DescribeCluster" // DescribeClusterRequest generates a "aws/request.Request" representing the // client's request for the DescribeCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -704,7 +704,7 @@ const opDescribeJobFlows = "DescribeJobFlows" // DescribeJobFlowsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobFlows operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -812,7 +812,7 @@ const opDescribeSecurityConfiguration = "DescribeSecurityConfiguration" // DescribeSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -895,7 +895,7 @@ const opDescribeStep = "DescribeStep" // DescribeStepRequest generates a "aws/request.Request" representing the // client's request for the DescribeStep operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -977,7 +977,7 @@ const opListBootstrapActions = "ListBootstrapActions" // ListBootstrapActionsRequest generates a "aws/request.Request" representing the // client's request for the ListBootstrapActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1115,7 +1115,7 @@ const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1257,7 +1257,7 @@ const opListInstanceFleets = "ListInstanceFleets" // ListInstanceFleetsRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1398,7 +1398,7 @@ const opListInstanceGroups = "ListInstanceGroups" // ListInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1536,7 +1536,7 @@ const opListInstances = "ListInstances" // ListInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1677,7 +1677,7 @@ const opListSecurityConfigurations = "ListSecurityConfigurations" // ListSecurityConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListSecurityConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1762,7 +1762,7 @@ const opListSteps = "ListSteps" // ListStepsRequest generates a "aws/request.Request" representing the // client's request for the ListSteps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1901,7 +1901,7 @@ const opModifyInstanceFleet = "ModifyInstanceFleet" // ModifyInstanceFleetRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1990,7 +1990,7 @@ const opModifyInstanceGroups = "ModifyInstanceGroups" // ModifyInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2075,7 +2075,7 @@ const opPutAutoScalingPolicy = "PutAutoScalingPolicy" // PutAutoScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutAutoScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2152,7 +2152,7 @@ const opRemoveAutoScalingPolicy = "RemoveAutoScalingPolicy" // RemoveAutoScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the RemoveAutoScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2227,7 +2227,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2313,7 +2313,7 @@ const opRunJobFlow = "RunJobFlow" // RunJobFlowRequest generates a "aws/request.Request" representing the // client's request for the RunJobFlow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2419,7 +2419,7 @@ const opSetTerminationProtection = "SetTerminationProtection" // SetTerminationProtectionRequest generates a "aws/request.Request" representing the // client's request for the SetTerminationProtection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2517,7 +2517,7 @@ const opSetVisibleToAllUsers = "SetVisibleToAllUsers" // SetVisibleToAllUsersRequest generates a "aws/request.Request" representing the // client's request for the SetVisibleToAllUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2604,7 +2604,7 @@ const opTerminateJobFlows = "TerminateJobFlows" // TerminateJobFlowsRequest generates a "aws/request.Request" representing the // client's request for the TerminateJobFlows operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index 5c11bf73a4f..cf22e9cc78e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -16,7 +16,7 @@ const opCreateDeliveryStream = "CreateDeliveryStream" // CreateDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -154,7 +154,7 @@ const opDeleteDeliveryStream = "DeleteDeliveryStream" // DeleteDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -247,7 +247,7 @@ const opDescribeDeliveryStream = "DescribeDeliveryStream" // DescribeDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -329,7 +329,7 @@ const opListDeliveryStreams = "ListDeliveryStreams" // ListDeliveryStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListDeliveryStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -411,7 +411,7 @@ const opListTagsForDeliveryStream = "ListTagsForDeliveryStream" // ListTagsForDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -497,7 +497,7 @@ const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the // client's request for the PutRecord operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -618,7 +618,7 @@ const opPutRecordBatch = "PutRecordBatch" // PutRecordBatchRequest generates a "aws/request.Request" representing the // client's request for the PutRecordBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -763,7 +763,7 @@ const opTagDeliveryStream = "TagDeliveryStream" // TagDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the TagDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -862,7 +862,7 @@ const opUntagDeliveryStream = "UntagDeliveryStream" // UntagDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the UntagDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -955,7 +955,7 @@ const opUpdateDestination = "UpdateDestination" // UpdateDestinationRequest generates a "aws/request.Request" representing the // client's request for the UpdateDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go index 86436aab389..16eb63e6ffa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -18,7 +18,7 @@ const opAssociateAdminAccount = "AssociateAdminAccount" // AssociateAdminAccountRequest generates a "aws/request.Request" representing the // client's request for the AssociateAdminAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -118,7 +118,7 @@ const opDeleteNotificationChannel = "DeleteNotificationChannel" // DeleteNotificationChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotificationChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -210,7 +210,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -300,7 +300,7 @@ const opDisassociateAdminAccount = "DisassociateAdminAccount" // DisassociateAdminAccountRequest generates a "aws/request.Request" representing the // client's request for the DisassociateAdminAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -392,7 +392,7 @@ const opGetAdminAccount = "GetAdminAccount" // GetAdminAccountRequest generates a "aws/request.Request" representing the // client's request for the GetAdminAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -481,7 +481,7 @@ const opGetComplianceDetail = "GetComplianceDetail" // GetComplianceDetailRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -567,7 +567,7 @@ const opGetNotificationChannel = "GetNotificationChannel" // GetNotificationChannelRequest generates a "aws/request.Request" representing the // client's request for the GetNotificationChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -656,7 +656,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -747,7 +747,7 @@ const opListComplianceStatus = "ListComplianceStatus" // ListComplianceStatusRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -832,7 +832,7 @@ const opListMemberAccounts = "ListMemberAccounts" // ListMemberAccountsRequest generates a "aws/request.Request" representing the // client's request for the ListMemberAccounts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -919,7 +919,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1013,7 +1013,7 @@ const opPutNotificationChannel = "PutNotificationChannel" // PutNotificationChannelRequest generates a "aws/request.Request" representing the // client's request for the PutNotificationChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1104,7 +1104,7 @@ const opPutPolicy = "PutPolicy" // PutPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go index 138c469c495..d77230940b3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go @@ -18,7 +18,7 @@ const opAcceptMatch = "AcceptMatch" // AcceptMatchRequest generates a "aws/request.Request" representing the // client's request for the AcceptMatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -143,7 +143,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -272,7 +272,7 @@ const opCreateBuild = "CreateBuild" // CreateBuildRequest generates a "aws/request.Request" representing the // client's request for the CreateBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -413,7 +413,7 @@ const opCreateFleet = "CreateFleet" // CreateFleetRequest generates a "aws/request.Request" representing the // client's request for the CreateFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -603,7 +603,7 @@ const opCreateGameSession = "CreateGameSession" // CreateGameSessionRequest generates a "aws/request.Request" representing the // client's request for the CreateGameSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -775,7 +775,7 @@ const opCreateGameSessionQueue = "CreateGameSessionQueue" // CreateGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateGameSessionQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -906,7 +906,7 @@ const opCreateMatchmakingConfiguration = "CreateMatchmakingConfiguration" // CreateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateMatchmakingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1045,7 +1045,7 @@ const opCreateMatchmakingRuleSet = "CreateMatchmakingRuleSet" // CreateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CreateMatchmakingRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1169,7 +1169,7 @@ const opCreatePlayerSession = "CreatePlayerSession" // CreatePlayerSessionRequest generates a "aws/request.Request" representing the // client's request for the CreatePlayerSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1302,7 +1302,7 @@ const opCreatePlayerSessions = "CreatePlayerSessions" // CreatePlayerSessionsRequest generates a "aws/request.Request" representing the // client's request for the CreatePlayerSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1436,7 +1436,7 @@ const opCreateVpcPeeringAuthorization = "CreateVpcPeeringAuthorization" // CreateVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1569,7 +1569,7 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" // CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1697,7 +1697,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1807,7 +1807,7 @@ const opDeleteBuild = "DeleteBuild" // DeleteBuildRequest generates a "aws/request.Request" representing the // client's request for the DeleteBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1918,7 +1918,7 @@ const opDeleteFleet = "DeleteFleet" // DeleteFleetRequest generates a "aws/request.Request" representing the // client's request for the DeleteFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2061,7 +2061,7 @@ const opDeleteGameSessionQueue = "DeleteGameSessionQueue" // DeleteGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteGameSessionQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2165,7 +2165,7 @@ const opDeleteMatchmakingConfiguration = "DeleteMatchmakingConfiguration" // DeleteMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteMatchmakingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2275,7 +2275,7 @@ const opDeleteScalingPolicy = "DeleteScalingPolicy" // DeleteScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2396,7 +2396,7 @@ const opDeleteVpcPeeringAuthorization = "DeleteVpcPeeringAuthorization" // DeleteVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2504,7 +2504,7 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" // DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2618,7 +2618,7 @@ const opDescribeAlias = "DescribeAlias" // DescribeAliasRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2728,7 +2728,7 @@ const opDescribeBuild = "DescribeBuild" // DescribeBuildRequest generates a "aws/request.Request" representing the // client's request for the DescribeBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2833,7 +2833,7 @@ const opDescribeEC2InstanceLimits = "DescribeEC2InstanceLimits" // DescribeEC2InstanceLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEC2InstanceLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2969,7 +2969,7 @@ const opDescribeFleetAttributes = "DescribeFleetAttributes" // DescribeFleetAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3111,7 +3111,7 @@ const opDescribeFleetCapacity = "DescribeFleetCapacity" // DescribeFleetCapacityRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3254,7 +3254,7 @@ const opDescribeFleetEvents = "DescribeFleetEvents" // DescribeFleetEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3389,7 +3389,7 @@ const opDescribeFleetPortSettings = "DescribeFleetPortSettings" // DescribeFleetPortSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetPortSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3526,7 +3526,7 @@ const opDescribeFleetUtilization = "DescribeFleetUtilization" // DescribeFleetUtilizationRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetUtilization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3667,7 +3667,7 @@ const opDescribeGameSessionDetails = "DescribeGameSessionDetails" // DescribeGameSessionDetailsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3798,7 +3798,7 @@ const opDescribeGameSessionPlacement = "DescribeGameSessionPlacement" // DescribeGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionPlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3914,7 +3914,7 @@ const opDescribeGameSessionQueues = "DescribeGameSessionQueues" // DescribeGameSessionQueuesRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4020,7 +4020,7 @@ const opDescribeGameSessions = "DescribeGameSessions" // DescribeGameSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4152,7 +4152,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4251,7 +4251,7 @@ const opDescribeMatchmaking = "DescribeMatchmaking" // DescribeMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmaking operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4362,7 +4362,7 @@ const opDescribeMatchmakingConfigurations = "DescribeMatchmakingConfigurations" // DescribeMatchmakingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmakingConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4473,7 +4473,7 @@ const opDescribeMatchmakingRuleSets = "DescribeMatchmakingRuleSets" // DescribeMatchmakingRuleSetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmakingRuleSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4585,7 +4585,7 @@ const opDescribePlayerSessions = "DescribePlayerSessions" // DescribePlayerSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePlayerSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4705,7 +4705,7 @@ const opDescribeRuntimeConfiguration = "DescribeRuntimeConfiguration" // DescribeRuntimeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeRuntimeConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4839,7 +4839,7 @@ const opDescribeScalingPolicies = "DescribeScalingPolicies" // DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4963,7 +4963,7 @@ const opDescribeVpcPeeringAuthorizations = "DescribeVpcPeeringAuthorizations" // DescribeVpcPeeringAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringAuthorizations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5067,7 +5067,7 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" // DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5180,7 +5180,7 @@ const opGetGameSessionLogUrl = "GetGameSessionLogUrl" // GetGameSessionLogUrlRequest generates a "aws/request.Request" representing the // client's request for the GetGameSessionLogUrl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5301,7 +5301,7 @@ const opGetInstanceAccess = "GetInstanceAccess" // GetInstanceAccessRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5408,7 +5408,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5514,7 +5514,7 @@ const opListBuilds = "ListBuilds" // ListBuildsRequest generates a "aws/request.Request" representing the // client's request for the ListBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5619,7 +5619,7 @@ const opListFleets = "ListFleets" // ListFleetsRequest generates a "aws/request.Request" representing the // client's request for the ListFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5755,7 +5755,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5942,7 +5942,7 @@ const opRequestUploadCredentials = "RequestUploadCredentials" // RequestUploadCredentialsRequest generates a "aws/request.Request" representing the // client's request for the RequestUploadCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6040,7 +6040,7 @@ const opResolveAlias = "ResolveAlias" // ResolveAliasRequest generates a "aws/request.Request" representing the // client's request for the ResolveAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6153,7 +6153,7 @@ const opSearchGameSessions = "SearchGameSessions" // SearchGameSessionsRequest generates a "aws/request.Request" representing the // client's request for the SearchGameSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6322,7 +6322,7 @@ const opStartFleetActions = "StartFleetActions" // StartFleetActionsRequest generates a "aws/request.Request" representing the // client's request for the StartFleetActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6443,7 +6443,7 @@ const opStartGameSessionPlacement = "StartGameSessionPlacement" // StartGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the StartGameSessionPlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6597,7 +6597,7 @@ const opStartMatchBackfill = "StartMatchBackfill" // StartMatchBackfillRequest generates a "aws/request.Request" representing the // client's request for the StartMatchBackfill operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6725,7 +6725,7 @@ const opStartMatchmaking = "StartMatchmaking" // StartMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the StartMatchmaking operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6889,7 +6889,7 @@ const opStopFleetActions = "StopFleetActions" // StopFleetActionsRequest generates a "aws/request.Request" representing the // client's request for the StopFleetActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6990,7 +6990,7 @@ const opStopGameSessionPlacement = "StopGameSessionPlacement" // StopGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the StopGameSessionPlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7106,7 +7106,7 @@ const opStopMatchmaking = "StopMatchmaking" // StopMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the StopMatchmaking operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7212,7 +7212,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7321,7 +7321,7 @@ const opUpdateBuild = "UpdateBuild" // UpdateBuildRequest generates a "aws/request.Request" representing the // client's request for the UpdateBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7428,7 +7428,7 @@ const opUpdateFleetAttributes = "UpdateFleetAttributes" // UpdateFleetAttributesRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7576,7 +7576,7 @@ const opUpdateFleetCapacity = "UpdateFleetCapacity" // UpdateFleetCapacityRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7737,7 +7737,7 @@ const opUpdateFleetPortSettings = "UpdateFleetPortSettings" // UpdateFleetPortSettingsRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetPortSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7888,7 +7888,7 @@ const opUpdateGameSession = "UpdateGameSession" // UpdateGameSessionRequest generates a "aws/request.Request" representing the // client's request for the UpdateGameSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8018,7 +8018,7 @@ const opUpdateGameSessionQueue = "UpdateGameSessionQueue" // UpdateGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateGameSessionQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8123,7 +8123,7 @@ const opUpdateMatchmakingConfiguration = "UpdateMatchmakingConfiguration" // UpdateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateMatchmakingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8232,7 +8232,7 @@ const opUpdateRuntimeConfiguration = "UpdateRuntimeConfiguration" // UpdateRuntimeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuntimeConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8384,7 +8384,7 @@ const opValidateMatchmakingRuleSet = "ValidateMatchmakingRuleSet" // ValidateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the // client's request for the ValidateMatchmakingRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go index 34050f7ce88..09929920d12 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go @@ -18,7 +18,7 @@ const opAbortMultipartUpload = "AbortMultipartUpload" // AbortMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the AbortMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -125,7 +125,7 @@ const opAbortVaultLock = "AbortVaultLock" // AbortVaultLockRequest generates a "aws/request.Request" representing the // client's request for the AbortVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -228,7 +228,7 @@ const opAddTagsToVault = "AddTagsToVault" // AddTagsToVaultRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -324,7 +324,7 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload" // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -453,7 +453,7 @@ const opCompleteVaultLock = "CompleteVaultLock" // CompleteVaultLockRequest generates a "aws/request.Request" representing the // client's request for the CompleteVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -555,7 +555,7 @@ const opCreateVault = "CreateVault" // CreateVaultRequest generates a "aws/request.Request" representing the // client's request for the CreateVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -663,7 +663,7 @@ const opDeleteArchive = "DeleteArchive" // DeleteArchiveRequest generates a "aws/request.Request" representing the // client's request for the DeleteArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -775,7 +775,7 @@ const opDeleteVault = "DeleteVault" // DeleteVaultRequest generates a "aws/request.Request" representing the // client's request for the DeleteVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -885,7 +885,7 @@ const opDeleteVaultAccessPolicy = "DeleteVaultAccessPolicy" // DeleteVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteVaultAccessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -982,7 +982,7 @@ const opDeleteVaultNotifications = "DeleteVaultNotifications" // DeleteVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVaultNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1084,7 +1084,7 @@ const opDescribeJob = "DescribeJob" // DescribeJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1191,7 +1191,7 @@ const opDescribeVault = "DescribeVault" // DescribeVaultRequest generates a "aws/request.Request" representing the // client's request for the DescribeVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1296,7 +1296,7 @@ const opGetDataRetrievalPolicy = "GetDataRetrievalPolicy" // GetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetDataRetrievalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1380,7 +1380,7 @@ const opGetJobOutput = "GetJobOutput" // GetJobOutputRequest generates a "aws/request.Request" representing the // client's request for the GetJobOutput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1509,7 +1509,7 @@ const opGetVaultAccessPolicy = "GetVaultAccessPolicy" // GetVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetVaultAccessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1600,7 +1600,7 @@ const opGetVaultLock = "GetVaultLock" // GetVaultLockRequest generates a "aws/request.Request" representing the // client's request for the GetVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1705,7 +1705,7 @@ const opGetVaultNotifications = "GetVaultNotifications" // GetVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the GetVaultNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1809,7 +1809,7 @@ const opInitiateJob = "InitiateJob" // InitiateJobRequest generates a "aws/request.Request" representing the // client's request for the InitiateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1907,7 +1907,7 @@ const opInitiateMultipartUpload = "InitiateMultipartUpload" // InitiateMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the InitiateMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2027,7 +2027,7 @@ const opInitiateVaultLock = "InitiateVaultLock" // InitiateVaultLockRequest generates a "aws/request.Request" representing the // client's request for the InitiateVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2141,7 +2141,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2318,7 +2318,7 @@ const opListMultipartUploads = "ListMultipartUploads" // ListMultipartUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListMultipartUploads operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2489,7 +2489,7 @@ const opListParts = "ListParts" // ListPartsRequest generates a "aws/request.Request" representing the // client's request for the ListParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2654,7 +2654,7 @@ const opListProvisionedCapacity = "ListProvisionedCapacity" // ListProvisionedCapacityRequest generates a "aws/request.Request" representing the // client's request for the ListProvisionedCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2737,7 +2737,7 @@ const opListTagsForVault = "ListTagsForVault" // ListTagsForVaultRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2825,7 +2825,7 @@ const opListVaults = "ListVaults" // ListVaultsRequest generates a "aws/request.Request" representing the // client's request for the ListVaults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2987,7 +2987,7 @@ const opPurchaseProvisionedCapacity = "PurchaseProvisionedCapacity" // PurchaseProvisionedCapacityRequest generates a "aws/request.Request" representing the // client's request for the PurchaseProvisionedCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3072,7 +3072,7 @@ const opRemoveTagsFromVault = "RemoveTagsFromVault" // RemoveTagsFromVaultRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3164,7 +3164,7 @@ const opSetDataRetrievalPolicy = "SetDataRetrievalPolicy" // SetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetDataRetrievalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3254,7 +3254,7 @@ const opSetVaultAccessPolicy = "SetVaultAccessPolicy" // SetVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetVaultAccessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3348,7 +3348,7 @@ const opSetVaultNotifications = "SetVaultNotifications" // SetVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the SetVaultNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3467,7 +3467,7 @@ const opUploadArchive = "UploadArchive" // UploadArchiveRequest generates a "aws/request.Request" representing the // client's request for the UploadArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3592,7 +3592,7 @@ const opUploadMultipartPart = "UploadMultipartPart" // UploadMultipartPartRequest generates a "aws/request.Request" representing the // client's request for the UploadMultipartPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index 83d1890b739..93bfbb1eec6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -16,7 +16,7 @@ const opBatchCreatePartition = "BatchCreatePartition" // BatchCreatePartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchCreatePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -113,7 +113,7 @@ const opBatchDeleteConnection = "BatchDeleteConnection" // BatchDeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -195,7 +195,7 @@ const opBatchDeletePartition = "BatchDeletePartition" // BatchDeletePartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeletePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -283,7 +283,7 @@ const opBatchDeleteTable = "BatchDeleteTable" // BatchDeleteTableRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -380,7 +380,7 @@ const opBatchDeleteTableVersion = "BatchDeleteTableVersion" // BatchDeleteTableVersionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteTableVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -468,7 +468,7 @@ const opBatchGetPartition = "BatchGetPartition" // BatchGetPartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchGetPartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -559,7 +559,7 @@ const opBatchStopJobRun = "BatchStopJobRun" // BatchStopJobRunRequest generates a "aws/request.Request" representing the // client's request for the BatchStopJobRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -644,7 +644,7 @@ const opCreateClassifier = "CreateClassifier" // CreateClassifierRequest generates a "aws/request.Request" representing the // client's request for the CreateClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -731,7 +731,7 @@ const opCreateConnection = "CreateConnection" // CreateConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -822,7 +822,7 @@ const opCreateCrawler = "CreateCrawler" // CreateCrawlerRequest generates a "aws/request.Request" representing the // client's request for the CreateCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -912,7 +912,7 @@ const opCreateDatabase = "CreateDatabase" // CreateDatabaseRequest generates a "aws/request.Request" representing the // client's request for the CreateDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1006,7 +1006,7 @@ const opCreateDevEndpoint = "CreateDevEndpoint" // CreateDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1106,7 +1106,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1203,7 +1203,7 @@ const opCreatePartition = "CreatePartition" // CreatePartitionRequest generates a "aws/request.Request" representing the // client's request for the CreatePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1300,7 +1300,7 @@ const opCreateScript = "CreateScript" // CreateScriptRequest generates a "aws/request.Request" representing the // client's request for the CreateScript operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1385,7 +1385,7 @@ const opCreateSecurityConfiguration = "CreateSecurityConfiguration" // CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1476,7 +1476,7 @@ const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the // client's request for the CreateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1573,7 +1573,7 @@ const opCreateTrigger = "CreateTrigger" // CreateTriggerRequest generates a "aws/request.Request" representing the // client's request for the CreateTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1670,7 +1670,7 @@ const opCreateUserDefinedFunction = "CreateUserDefinedFunction" // CreateUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the CreateUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1767,7 +1767,7 @@ const opDeleteClassifier = "DeleteClassifier" // DeleteClassifierRequest generates a "aws/request.Request" representing the // client's request for the DeleteClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1849,7 +1849,7 @@ const opDeleteConnection = "DeleteConnection" // DeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1931,7 +1931,7 @@ const opDeleteCrawler = "DeleteCrawler" // DeleteCrawlerRequest generates a "aws/request.Request" representing the // client's request for the DeleteCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2020,7 +2020,7 @@ const opDeleteDatabase = "DeleteDatabase" // DeleteDatabaseRequest generates a "aws/request.Request" representing the // client's request for the DeleteDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2119,7 +2119,7 @@ const opDeleteDevEndpoint = "DeleteDevEndpoint" // DeleteDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2207,7 +2207,7 @@ const opDeleteJob = "DeleteJob" // DeleteJobRequest generates a "aws/request.Request" representing the // client's request for the DeleteJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2293,7 +2293,7 @@ const opDeletePartition = "DeletePartition" // DeletePartitionRequest generates a "aws/request.Request" representing the // client's request for the DeletePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2381,7 +2381,7 @@ const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" // DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2469,7 +2469,7 @@ const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2566,7 +2566,7 @@ const opDeleteTableVersion = "DeleteTableVersion" // DeleteTableVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteTableVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2654,7 +2654,7 @@ const opDeleteTrigger = "DeleteTrigger" // DeleteTriggerRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2743,7 +2743,7 @@ const opDeleteUserDefinedFunction = "DeleteUserDefinedFunction" // DeleteUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2831,7 +2831,7 @@ const opGetCatalogImportStatus = "GetCatalogImportStatus" // GetCatalogImportStatusRequest generates a "aws/request.Request" representing the // client's request for the GetCatalogImportStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2913,7 +2913,7 @@ const opGetClassifier = "GetClassifier" // GetClassifierRequest generates a "aws/request.Request" representing the // client's request for the GetClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2995,7 +2995,7 @@ const opGetClassifiers = "GetClassifiers" // GetClassifiersRequest generates a "aws/request.Request" representing the // client's request for the GetClassifiers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3130,7 +3130,7 @@ const opGetConnection = "GetConnection" // GetConnectionRequest generates a "aws/request.Request" representing the // client's request for the GetConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3218,7 +3218,7 @@ const opGetConnections = "GetConnections" // GetConnectionsRequest generates a "aws/request.Request" representing the // client's request for the GetConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3362,7 +3362,7 @@ const opGetCrawler = "GetCrawler" // GetCrawlerRequest generates a "aws/request.Request" representing the // client's request for the GetCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3444,7 +3444,7 @@ const opGetCrawlerMetrics = "GetCrawlerMetrics" // GetCrawlerMetricsRequest generates a "aws/request.Request" representing the // client's request for the GetCrawlerMetrics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3579,7 +3579,7 @@ const opGetCrawlers = "GetCrawlers" // GetCrawlersRequest generates a "aws/request.Request" representing the // client's request for the GetCrawlers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3714,7 +3714,7 @@ const opGetDataCatalogEncryptionSettings = "GetDataCatalogEncryptionSettings" // GetDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetDataCatalogEncryptionSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3799,7 +3799,7 @@ const opGetDatabase = "GetDatabase" // GetDatabaseRequest generates a "aws/request.Request" representing the // client's request for the GetDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3890,7 +3890,7 @@ const opGetDatabases = "GetDatabases" // GetDatabasesRequest generates a "aws/request.Request" representing the // client's request for the GetDatabases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4034,7 +4034,7 @@ const opGetDataflowGraph = "GetDataflowGraph" // GetDataflowGraphRequest generates a "aws/request.Request" representing the // client's request for the GetDataflowGraph operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4119,7 +4119,7 @@ const opGetDevEndpoint = "GetDevEndpoint" // GetDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the GetDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4207,7 +4207,7 @@ const opGetDevEndpoints = "GetDevEndpoints" // GetDevEndpointsRequest generates a "aws/request.Request" representing the // client's request for the GetDevEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4351,7 +4351,7 @@ const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4439,7 +4439,7 @@ const opGetJobRun = "GetJobRun" // GetJobRunRequest generates a "aws/request.Request" representing the // client's request for the GetJobRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4527,7 +4527,7 @@ const opGetJobRuns = "GetJobRuns" // GetJobRunsRequest generates a "aws/request.Request" representing the // client's request for the GetJobRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4671,7 +4671,7 @@ const opGetJobs = "GetJobs" // GetJobsRequest generates a "aws/request.Request" representing the // client's request for the GetJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4815,7 +4815,7 @@ const opGetMapping = "GetMapping" // GetMappingRequest generates a "aws/request.Request" representing the // client's request for the GetMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4903,7 +4903,7 @@ const opGetPartition = "GetPartition" // GetPartitionRequest generates a "aws/request.Request" representing the // client's request for the GetPartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4994,7 +4994,7 @@ const opGetPartitions = "GetPartitions" // GetPartitionsRequest generates a "aws/request.Request" representing the // client's request for the GetPartitions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5141,7 +5141,7 @@ const opGetPlan = "GetPlan" // GetPlanRequest generates a "aws/request.Request" representing the // client's request for the GetPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5226,7 +5226,7 @@ const opGetSecurityConfiguration = "GetSecurityConfiguration" // GetSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5314,7 +5314,7 @@ const opGetSecurityConfigurations = "GetSecurityConfigurations" // GetSecurityConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the GetSecurityConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5402,7 +5402,7 @@ const opGetTable = "GetTable" // GetTableRequest generates a "aws/request.Request" representing the // client's request for the GetTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5493,7 +5493,7 @@ const opGetTableVersion = "GetTableVersion" // GetTableVersionRequest generates a "aws/request.Request" representing the // client's request for the GetTableVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5584,7 +5584,7 @@ const opGetTableVersions = "GetTableVersions" // GetTableVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetTableVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5732,7 +5732,7 @@ const opGetTables = "GetTables" // GetTablesRequest generates a "aws/request.Request" representing the // client's request for the GetTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5879,7 +5879,7 @@ const opGetTrigger = "GetTrigger" // GetTriggerRequest generates a "aws/request.Request" representing the // client's request for the GetTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5967,7 +5967,7 @@ const opGetTriggers = "GetTriggers" // GetTriggersRequest generates a "aws/request.Request" representing the // client's request for the GetTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6111,7 +6111,7 @@ const opGetUserDefinedFunction = "GetUserDefinedFunction" // GetUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the GetUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6202,7 +6202,7 @@ const opGetUserDefinedFunctions = "GetUserDefinedFunctions" // GetUserDefinedFunctionsRequest generates a "aws/request.Request" representing the // client's request for the GetUserDefinedFunctions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6349,7 +6349,7 @@ const opImportCatalogToGlue = "ImportCatalogToGlue" // ImportCatalogToGlueRequest generates a "aws/request.Request" representing the // client's request for the ImportCatalogToGlue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6431,7 +6431,7 @@ const opPutDataCatalogEncryptionSettings = "PutDataCatalogEncryptionSettings" // PutDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the // client's request for the PutDataCatalogEncryptionSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6518,7 +6518,7 @@ const opResetJobBookmark = "ResetJobBookmark" // ResetJobBookmarkRequest generates a "aws/request.Request" representing the // client's request for the ResetJobBookmark operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6606,7 +6606,7 @@ const opStartCrawler = "StartCrawler" // StartCrawlerRequest generates a "aws/request.Request" representing the // client's request for the StartCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6692,7 +6692,7 @@ const opStartCrawlerSchedule = "StartCrawlerSchedule" // StartCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the StartCrawlerSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6784,7 +6784,7 @@ const opStartJobRun = "StartJobRun" // StartJobRunRequest generates a "aws/request.Request" representing the // client's request for the StartJobRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6878,7 +6878,7 @@ const opStartTrigger = "StartTrigger" // StartTriggerRequest generates a "aws/request.Request" representing the // client's request for the StartTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6973,7 +6973,7 @@ const opStopCrawler = "StopCrawler" // StopCrawlerRequest generates a "aws/request.Request" representing the // client's request for the StopCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7061,7 +7061,7 @@ const opStopCrawlerSchedule = "StopCrawlerSchedule" // StopCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the StopCrawlerSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7150,7 +7150,7 @@ const opStopTrigger = "StopTrigger" // StopTriggerRequest generates a "aws/request.Request" representing the // client's request for the StopTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7241,7 +7241,7 @@ const opUpdateClassifier = "UpdateClassifier" // UpdateClassifierRequest generates a "aws/request.Request" representing the // client's request for the UpdateClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7330,7 +7330,7 @@ const opUpdateConnection = "UpdateConnection" // UpdateConnectionRequest generates a "aws/request.Request" representing the // client's request for the UpdateConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7421,7 +7421,7 @@ const opUpdateCrawler = "UpdateCrawler" // UpdateCrawlerRequest generates a "aws/request.Request" representing the // client's request for the UpdateCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7513,7 +7513,7 @@ const opUpdateCrawlerSchedule = "UpdateCrawlerSchedule" // UpdateCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the UpdateCrawlerSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7604,7 +7604,7 @@ const opUpdateDatabase = "UpdateDatabase" // UpdateDatabaseRequest generates a "aws/request.Request" representing the // client's request for the UpdateDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7695,7 +7695,7 @@ const opUpdateDevEndpoint = "UpdateDevEndpoint" // UpdateDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7786,7 +7786,7 @@ const opUpdateJob = "UpdateJob" // UpdateJobRequest generates a "aws/request.Request" representing the // client's request for the UpdateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7877,7 +7877,7 @@ const opUpdatePartition = "UpdatePartition" // UpdatePartitionRequest generates a "aws/request.Request" representing the // client's request for the UpdatePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7968,7 +7968,7 @@ const opUpdateTable = "UpdateTable" // UpdateTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8065,7 +8065,7 @@ const opUpdateTrigger = "UpdateTrigger" // UpdateTriggerRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8156,7 +8156,7 @@ const opUpdateUserDefinedFunction = "UpdateUserDefinedFunction" // UpdateUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index 0356a188e6a..88975389ba8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -15,7 +15,7 @@ const opAcceptInvitation = "AcceptInvitation" // AcceptInvitationRequest generates a "aws/request.Request" representing the // client's request for the AcceptInvitation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -97,7 +97,7 @@ const opArchiveFindings = "ArchiveFindings" // ArchiveFindingsRequest generates a "aws/request.Request" representing the // client's request for the ArchiveFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -179,7 +179,7 @@ const opCreateDetector = "CreateDetector" // CreateDetectorRequest generates a "aws/request.Request" representing the // client's request for the CreateDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -263,7 +263,7 @@ const opCreateFilter = "CreateFilter" // CreateFilterRequest generates a "aws/request.Request" representing the // client's request for the CreateFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -345,7 +345,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -428,7 +428,7 @@ const opCreateMembers = "CreateMembers" // CreateMembersRequest generates a "aws/request.Request" representing the // client's request for the CreateMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -512,7 +512,7 @@ const opCreateSampleFindings = "CreateSampleFindings" // CreateSampleFindingsRequest generates a "aws/request.Request" representing the // client's request for the CreateSampleFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -596,7 +596,7 @@ const opCreateThreatIntelSet = "CreateThreatIntelSet" // CreateThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the CreateThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -679,7 +679,7 @@ const opDeclineInvitations = "DeclineInvitations" // DeclineInvitationsRequest generates a "aws/request.Request" representing the // client's request for the DeclineInvitations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -762,7 +762,7 @@ const opDeleteDetector = "DeleteDetector" // DeleteDetectorRequest generates a "aws/request.Request" representing the // client's request for the DeleteDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -844,7 +844,7 @@ const opDeleteFilter = "DeleteFilter" // DeleteFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -926,7 +926,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1008,7 +1008,7 @@ const opDeleteInvitations = "DeleteInvitations" // DeleteInvitationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteInvitations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1091,7 +1091,7 @@ const opDeleteMembers = "DeleteMembers" // DeleteMembersRequest generates a "aws/request.Request" representing the // client's request for the DeleteMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1174,7 +1174,7 @@ const opDeleteThreatIntelSet = "DeleteThreatIntelSet" // DeleteThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1256,7 +1256,7 @@ const opDisassociateFromMasterAccount = "DisassociateFromMasterAccount" // DisassociateFromMasterAccountRequest generates a "aws/request.Request" representing the // client's request for the DisassociateFromMasterAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1338,7 +1338,7 @@ const opDisassociateMembers = "DisassociateMembers" // DisassociateMembersRequest generates a "aws/request.Request" representing the // client's request for the DisassociateMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1421,7 +1421,7 @@ const opGetDetector = "GetDetector" // GetDetectorRequest generates a "aws/request.Request" representing the // client's request for the GetDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1503,7 +1503,7 @@ const opGetFilter = "GetFilter" // GetFilterRequest generates a "aws/request.Request" representing the // client's request for the GetFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1585,7 +1585,7 @@ const opGetFindings = "GetFindings" // GetFindingsRequest generates a "aws/request.Request" representing the // client's request for the GetFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1667,7 +1667,7 @@ const opGetFindingsStatistics = "GetFindingsStatistics" // GetFindingsStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetFindingsStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1749,7 +1749,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1831,7 +1831,7 @@ const opGetInvitationsCount = "GetInvitationsCount" // GetInvitationsCountRequest generates a "aws/request.Request" representing the // client's request for the GetInvitationsCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1914,7 +1914,7 @@ const opGetMasterAccount = "GetMasterAccount" // GetMasterAccountRequest generates a "aws/request.Request" representing the // client's request for the GetMasterAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1997,7 +1997,7 @@ const opGetMembers = "GetMembers" // GetMembersRequest generates a "aws/request.Request" representing the // client's request for the GetMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2080,7 +2080,7 @@ const opGetThreatIntelSet = "GetThreatIntelSet" // GetThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the GetThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2162,7 +2162,7 @@ const opInviteMembers = "InviteMembers" // InviteMembersRequest generates a "aws/request.Request" representing the // client's request for the InviteMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2247,7 +2247,7 @@ const opListDetectors = "ListDetectors" // ListDetectorsRequest generates a "aws/request.Request" representing the // client's request for the ListDetectors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2385,7 +2385,7 @@ const opListFilters = "ListFilters" // ListFiltersRequest generates a "aws/request.Request" representing the // client's request for the ListFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2523,7 +2523,7 @@ const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2661,7 +2661,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2799,7 +2799,7 @@ const opListInvitations = "ListInvitations" // ListInvitationsRequest generates a "aws/request.Request" representing the // client's request for the ListInvitations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2938,7 +2938,7 @@ const opListMembers = "ListMembers" // ListMembersRequest generates a "aws/request.Request" representing the // client's request for the ListMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3077,7 +3077,7 @@ const opListThreatIntelSets = "ListThreatIntelSets" // ListThreatIntelSetsRequest generates a "aws/request.Request" representing the // client's request for the ListThreatIntelSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3216,7 +3216,7 @@ const opStartMonitoringMembers = "StartMonitoringMembers" // StartMonitoringMembersRequest generates a "aws/request.Request" representing the // client's request for the StartMonitoringMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3300,7 +3300,7 @@ const opStopMonitoringMembers = "StopMonitoringMembers" // StopMonitoringMembersRequest generates a "aws/request.Request" representing the // client's request for the StopMonitoringMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3385,7 +3385,7 @@ const opUnarchiveFindings = "UnarchiveFindings" // UnarchiveFindingsRequest generates a "aws/request.Request" representing the // client's request for the UnarchiveFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3467,7 +3467,7 @@ const opUpdateDetector = "UpdateDetector" // UpdateDetectorRequest generates a "aws/request.Request" representing the // client's request for the UpdateDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3549,7 +3549,7 @@ const opUpdateFilter = "UpdateFilter" // UpdateFilterRequest generates a "aws/request.Request" representing the // client's request for the UpdateFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3631,7 +3631,7 @@ const opUpdateFindingsFeedback = "UpdateFindingsFeedback" // UpdateFindingsFeedbackRequest generates a "aws/request.Request" representing the // client's request for the UpdateFindingsFeedback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3713,7 +3713,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3795,7 +3795,7 @@ const opUpdateThreatIntelSet = "UpdateThreatIntelSet" // UpdateThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 875df512f41..cb3280a7971 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -18,7 +18,7 @@ const opAddClientIDToOpenIDConnectProvider = "AddClientIDToOpenIDConnectProvider // AddClientIDToOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the AddClientIDToOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -116,7 +116,7 @@ const opAddRoleToInstanceProfile = "AddRoleToInstanceProfile" // AddRoleToInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -230,7 +230,7 @@ const opAddUserToGroup = "AddUserToGroup" // AddUserToGroupRequest generates a "aws/request.Request" representing the // client's request for the AddUserToGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -320,7 +320,7 @@ const opAttachGroupPolicy = "AttachGroupPolicy" // AttachGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -425,7 +425,7 @@ const opAttachRolePolicy = "AttachRolePolicy" // AttachRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -540,7 +540,7 @@ const opAttachUserPolicy = "AttachUserPolicy" // AttachUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -645,7 +645,7 @@ const opChangePassword = "ChangePassword" // ChangePasswordRequest generates a "aws/request.Request" representing the // client's request for the ChangePassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -754,7 +754,7 @@ const opCreateAccessKey = "CreateAccessKey" // CreateAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateAccessKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -859,7 +859,7 @@ const opCreateAccountAlias = "CreateAccountAlias" // CreateAccountAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAccountAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -951,7 +951,7 @@ const opCreateGroup = "CreateGroup" // CreateGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1047,7 +1047,7 @@ const opCreateInstanceProfile = "CreateInstanceProfile" // CreateInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1140,7 +1140,7 @@ const opCreateLoginProfile = "CreateLoginProfile" // CreateLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1239,7 +1239,7 @@ const opCreateOpenIDConnectProvider = "CreateOpenIDConnectProvider" // CreateOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1352,7 +1352,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1457,7 +1457,7 @@ const opCreatePolicyVersion = "CreatePolicyVersion" // CreatePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1564,7 +1564,7 @@ const opCreateRole = "CreateRole" // CreateRoleRequest generates a "aws/request.Request" representing the // client's request for the CreateRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1664,7 +1664,7 @@ const opCreateSAMLProvider = "CreateSAMLProvider" // CreateSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1777,7 +1777,7 @@ const opCreateServiceLinkedRole = "CreateServiceLinkedRole" // CreateServiceLinkedRoleRequest generates a "aws/request.Request" representing the // client's request for the CreateServiceLinkedRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1882,7 +1882,7 @@ const opCreateServiceSpecificCredential = "CreateServiceSpecificCredential" // CreateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the CreateServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1982,7 +1982,7 @@ const opCreateUser = "CreateUser" // CreateUserRequest generates a "aws/request.Request" representing the // client's request for the CreateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2078,7 +2078,7 @@ const opCreateVirtualMFADevice = "CreateVirtualMFADevice" // CreateVirtualMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the CreateVirtualMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2179,7 +2179,7 @@ const opDeactivateMFADevice = "DeactivateMFADevice" // DeactivateMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the DeactivateMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2280,7 +2280,7 @@ const opDeleteAccessKey = "DeleteAccessKey" // DeleteAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccessKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2376,7 +2376,7 @@ const opDeleteAccountAlias = "DeleteAccountAlias" // DeleteAccountAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2468,7 +2468,7 @@ const opDeleteAccountPasswordPolicy = "DeleteAccountPasswordPolicy" // DeleteAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountPasswordPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2558,7 +2558,7 @@ const opDeleteGroup = "DeleteGroup" // DeleteGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2653,7 +2653,7 @@ const opDeleteGroupPolicy = "DeleteGroupPolicy" // DeleteGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2749,7 +2749,7 @@ const opDeleteInstanceProfile = "DeleteInstanceProfile" // DeleteInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2852,7 +2852,7 @@ const opDeleteLoginProfile = "DeleteLoginProfile" // DeleteLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2954,7 +2954,7 @@ const opDeleteOpenIDConnectProvider = "DeleteOpenIDConnectProvider" // DeleteOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3051,7 +3051,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3171,7 +3171,7 @@ const opDeletePolicyVersion = "DeletePolicyVersion" // DeletePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3277,7 +3277,7 @@ const opDeleteRole = "DeleteRole" // DeleteRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3383,7 +3383,7 @@ const opDeleteRolePermissionsBoundary = "DeleteRolePermissionsBoundary" // DeleteRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRolePermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3479,7 +3479,7 @@ const opDeleteRolePolicy = "DeleteRolePolicy" // DeleteRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3581,7 +3581,7 @@ const opDeleteSAMLProvider = "DeleteSAMLProvider" // DeleteSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3682,7 +3682,7 @@ const opDeleteSSHPublicKey = "DeleteSSHPublicKey" // DeleteSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3770,7 +3770,7 @@ const opDeleteServerCertificate = "DeleteServerCertificate" // DeleteServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3879,7 +3879,7 @@ const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole" // DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteServiceLinkedRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3986,7 +3986,7 @@ const opDeleteServiceSpecificCredential = "DeleteServiceSpecificCredential" // DeleteServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the DeleteServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4068,7 +4068,7 @@ const opDeleteSigningCertificate = "DeleteSigningCertificate" // DeleteSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4164,7 +4164,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4259,7 +4259,7 @@ const opDeleteUserPermissionsBoundary = "DeleteUserPermissionsBoundary" // DeleteUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4349,7 +4349,7 @@ const opDeleteUserPolicy = "DeleteUserPolicy" // DeleteUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4445,7 +4445,7 @@ const opDeleteVirtualMFADevice = "DeleteVirtualMFADevice" // DeleteVirtualMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the DeleteVirtualMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4542,7 +4542,7 @@ const opDetachGroupPolicy = "DetachGroupPolicy" // DetachGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4641,7 +4641,7 @@ const opDetachRolePolicy = "DetachRolePolicy" // DetachRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4746,7 +4746,7 @@ const opDetachUserPolicy = "DetachUserPolicy" // DetachUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4845,7 +4845,7 @@ const opEnableMFADevice = "EnableMFADevice" // EnableMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the EnableMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4951,7 +4951,7 @@ const opGenerateCredentialReport = "GenerateCredentialReport" // GenerateCredentialReportRequest generates a "aws/request.Request" representing the // client's request for the GenerateCredentialReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5037,7 +5037,7 @@ const opGetAccessKeyLastUsed = "GetAccessKeyLastUsed" // GetAccessKeyLastUsedRequest generates a "aws/request.Request" representing the // client's request for the GetAccessKeyLastUsed operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5120,7 +5120,7 @@ const opGetAccountAuthorizationDetails = "GetAccountAuthorizationDetails" // GetAccountAuthorizationDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountAuthorizationDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5268,7 +5268,7 @@ const opGetAccountPasswordPolicy = "GetAccountPasswordPolicy" // GetAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetAccountPasswordPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5353,7 +5353,7 @@ const opGetAccountSummary = "GetAccountSummary" // GetAccountSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5437,7 +5437,7 @@ const opGetContextKeysForCustomPolicy = "GetContextKeysForCustomPolicy" // GetContextKeysForCustomPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContextKeysForCustomPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5526,7 +5526,7 @@ const opGetContextKeysForPrincipalPolicy = "GetContextKeysForPrincipalPolicy" // GetContextKeysForPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContextKeysForPrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5626,7 +5626,7 @@ const opGetCredentialReport = "GetCredentialReport" // GetCredentialReportRequest generates a "aws/request.Request" representing the // client's request for the GetCredentialReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5722,7 +5722,7 @@ const opGetGroup = "GetGroup" // GetGroupRequest generates a "aws/request.Request" representing the // client's request for the GetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5863,7 +5863,7 @@ const opGetGroupPolicy = "GetGroupPolicy" // GetGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5963,7 +5963,7 @@ const opGetInstanceProfile = "GetInstanceProfile" // GetInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6050,7 +6050,7 @@ const opGetLoginProfile = "GetLoginProfile" // GetLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the GetLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6136,7 +6136,7 @@ const opGetOpenIDConnectProvider = "GetOpenIDConnectProvider" // GetOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6225,7 +6225,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6326,7 +6326,7 @@ const opGetPolicyVersion = "GetPolicyVersion" // GetPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the GetPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6435,7 +6435,7 @@ const opGetRole = "GetRole" // GetRoleRequest generates a "aws/request.Request" representing the // client's request for the GetRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6527,7 +6527,7 @@ const opGetRolePolicy = "GetRolePolicy" // GetRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6630,7 +6630,7 @@ const opGetSAMLProvider = "GetSAMLProvider" // GetSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the GetSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6721,7 +6721,7 @@ const opGetSSHPublicKey = "GetSSHPublicKey" // GetSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the GetSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6811,7 +6811,7 @@ const opGetServerCertificate = "GetServerCertificate" // GetServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6900,7 +6900,7 @@ const opGetServiceLinkedRoleDeletionStatus = "GetServiceLinkedRoleDeletionStatus // GetServiceLinkedRoleDeletionStatusRequest generates a "aws/request.Request" representing the // client's request for the GetServiceLinkedRoleDeletionStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6993,7 +6993,7 @@ const opGetUser = "GetUser" // GetUserRequest generates a "aws/request.Request" representing the // client's request for the GetUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7081,7 +7081,7 @@ const opGetUserPolicy = "GetUserPolicy" // GetUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7181,7 +7181,7 @@ const opListAccessKeys = "ListAccessKeys" // ListAccessKeysRequest generates a "aws/request.Request" representing the // client's request for the ListAccessKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7334,7 +7334,7 @@ const opListAccountAliases = "ListAccountAliases" // ListAccountAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAccountAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7473,7 +7473,7 @@ const opListAttachedGroupPolicies = "ListAttachedGroupPolicies" // ListAttachedGroupPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedGroupPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7628,7 +7628,7 @@ const opListAttachedRolePolicies = "ListAttachedRolePolicies" // ListAttachedRolePoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedRolePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7783,7 +7783,7 @@ const opListAttachedUserPolicies = "ListAttachedUserPolicies" // ListAttachedUserPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedUserPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7938,7 +7938,7 @@ const opListEntitiesForPolicy = "ListEntitiesForPolicy" // ListEntitiesForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListEntitiesForPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8090,7 +8090,7 @@ const opListGroupPolicies = "ListGroupPolicies" // ListGroupPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListGroupPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8241,7 +8241,7 @@ const opListGroups = "ListGroups" // ListGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8379,7 +8379,7 @@ const opListGroupsForUser = "ListGroupsForUser" // ListGroupsForUserRequest generates a "aws/request.Request" representing the // client's request for the ListGroupsForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8521,7 +8521,7 @@ const opListInstanceProfiles = "ListInstanceProfiles" // ListInstanceProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8661,7 +8661,7 @@ const opListInstanceProfilesForRole = "ListInstanceProfilesForRole" // ListInstanceProfilesForRoleRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfilesForRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8805,7 +8805,7 @@ const opListMFADevices = "ListMFADevices" // ListMFADevicesRequest generates a "aws/request.Request" representing the // client's request for the ListMFADevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8950,7 +8950,7 @@ const opListOpenIDConnectProviders = "ListOpenIDConnectProviders" // ListOpenIDConnectProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListOpenIDConnectProviders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9031,7 +9031,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9179,7 +9179,7 @@ const opListPolicyVersions = "ListPolicyVersions" // ListPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9328,7 +9328,7 @@ const opListRolePolicies = "ListRolePolicies" // ListRolePoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListRolePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9478,7 +9478,7 @@ const opListRoles = "ListRoles" // ListRolesRequest generates a "aws/request.Request" representing the // client's request for the ListRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9618,7 +9618,7 @@ const opListSAMLProviders = "ListSAMLProviders" // ListSAMLProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListSAMLProviders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9700,7 +9700,7 @@ const opListSSHPublicKeys = "ListSSHPublicKeys" // ListSSHPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListSSHPublicKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9846,7 +9846,7 @@ const opListServerCertificates = "ListServerCertificates" // ListServerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListServerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9990,7 +9990,7 @@ const opListServiceSpecificCredentials = "ListServiceSpecificCredentials" // ListServiceSpecificCredentialsRequest generates a "aws/request.Request" representing the // client's request for the ListServiceSpecificCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10079,7 +10079,7 @@ const opListSigningCertificates = "ListSigningCertificates" // ListSigningCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListSigningCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10229,7 +10229,7 @@ const opListUserPolicies = "ListUserPolicies" // ListUserPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListUserPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10378,7 +10378,7 @@ const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10518,7 +10518,7 @@ const opListVirtualMFADevices = "ListVirtualMFADevices" // ListVirtualMFADevicesRequest generates a "aws/request.Request" representing the // client's request for the ListVirtualMFADevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10653,7 +10653,7 @@ const opPutGroupPolicy = "PutGroupPolicy" // PutGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10763,7 +10763,7 @@ const opPutRolePermissionsBoundary = "PutRolePermissionsBoundary" // PutRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the PutRolePermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10875,7 +10875,7 @@ const opPutRolePolicy = "PutRolePolicy" // PutRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10997,7 +10997,7 @@ const opPutUserPermissionsBoundary = "PutUserPermissionsBoundary" // PutUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the PutUserPermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11101,7 +11101,7 @@ const opPutUserPolicy = "PutUserPolicy" // PutUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11211,7 +11211,7 @@ const opRemoveClientIDFromOpenIDConnectProvider = "RemoveClientIDFromOpenIDConne // RemoveClientIDFromOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the RemoveClientIDFromOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11306,7 +11306,7 @@ const opRemoveRoleFromInstanceProfile = "RemoveRoleFromInstanceProfile" // RemoveRoleFromInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the RemoveRoleFromInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11411,7 +11411,7 @@ const opRemoveUserFromGroup = "RemoveUserFromGroup" // RemoveUserFromGroupRequest generates a "aws/request.Request" representing the // client's request for the RemoveUserFromGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11501,7 +11501,7 @@ const opResetServiceSpecificCredential = "ResetServiceSpecificCredential" // ResetServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the ResetServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11584,7 +11584,7 @@ const opResyncMFADevice = "ResyncMFADevice" // ResyncMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the ResyncMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11683,7 +11683,7 @@ const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" // SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11786,7 +11786,7 @@ const opSimulateCustomPolicy = "SimulateCustomPolicy" // SimulateCustomPolicyRequest generates a "aws/request.Request" representing the // client's request for the SimulateCustomPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11942,7 +11942,7 @@ const opSimulatePrincipalPolicy = "SimulatePrincipalPolicy" // SimulatePrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the SimulatePrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12112,7 +12112,7 @@ const opUpdateAccessKey = "UpdateAccessKey" // UpdateAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccessKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12213,7 +12213,7 @@ const opUpdateAccountPasswordPolicy = "UpdateAccountPasswordPolicy" // UpdateAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccountPasswordPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12318,7 +12318,7 @@ const opUpdateAssumeRolePolicy = "UpdateAssumeRolePolicy" // UpdateAssumeRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssumeRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12421,7 +12421,7 @@ const opUpdateGroup = "UpdateGroup" // UpdateGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12526,7 +12526,7 @@ const opUpdateLoginProfile = "UpdateLoginProfile" // UpdateLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12630,7 +12630,7 @@ const opUpdateOpenIDConnectProviderThumbprint = "UpdateOpenIDConnectProviderThum // UpdateOpenIDConnectProviderThumbprintRequest generates a "aws/request.Request" representing the // client's request for the UpdateOpenIDConnectProviderThumbprint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12733,7 +12733,7 @@ const opUpdateRole = "UpdateRole" // UpdateRoleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12823,7 +12823,7 @@ const opUpdateRoleDescription = "UpdateRoleDescription" // UpdateRoleDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateRoleDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12916,7 +12916,7 @@ const opUpdateSAMLProvider = "UpdateSAMLProvider" // UpdateSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the UpdateSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13010,7 +13010,7 @@ const opUpdateSSHPublicKey = "UpdateSSHPublicKey" // UpdateSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13101,7 +13101,7 @@ const opUpdateServerCertificate = "UpdateServerCertificate" // UpdateServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13214,7 +13214,7 @@ const opUpdateServiceSpecificCredential = "UpdateServiceSpecificCredential" // UpdateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the UpdateServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13299,7 +13299,7 @@ const opUpdateSigningCertificate = "UpdateSigningCertificate" // UpdateSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13397,7 +13397,7 @@ const opUpdateUser = "UpdateUser" // UpdateUserRequest generates a "aws/request.Request" representing the // client's request for the UpdateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13508,7 +13508,7 @@ const opUploadSSHPublicKey = "UploadSSHPublicKey" // UploadSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UploadSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13610,7 +13610,7 @@ const opUploadServerCertificate = "UploadServerCertificate" // UploadServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the UploadServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13731,7 +13731,7 @@ const opUploadSigningCertificate = "UploadSigningCertificate" // UploadSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the UploadSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index d5698b18caf..9d5c5ce9ed7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -18,7 +18,7 @@ const opAddAttributesToFindings = "AddAttributesToFindings" // AddAttributesToFindingsRequest generates a "aws/request.Request" representing the // client's request for the AddAttributesToFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -112,7 +112,7 @@ const opCreateAssessmentTarget = "CreateAssessmentTarget" // CreateAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the CreateAssessmentTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -221,7 +221,7 @@ const opCreateAssessmentTemplate = "CreateAssessmentTemplate" // CreateAssessmentTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateAssessmentTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -322,7 +322,7 @@ const opCreateExclusionsPreview = "CreateExclusionsPreview" // CreateExclusionsPreviewRequest generates a "aws/request.Request" representing the // client's request for the CreateExclusionsPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -421,7 +421,7 @@ const opCreateResourceGroup = "CreateResourceGroup" // CreateResourceGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -517,7 +517,7 @@ const opDeleteAssessmentRun = "DeleteAssessmentRun" // DeleteAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -617,7 +617,7 @@ const opDeleteAssessmentTarget = "DeleteAssessmentTarget" // DeleteAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -717,7 +717,7 @@ const opDeleteAssessmentTemplate = "DeleteAssessmentTemplate" // DeleteAssessmentTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -817,7 +817,7 @@ const opDescribeAssessmentRuns = "DescribeAssessmentRuns" // DescribeAssessmentRunsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -901,7 +901,7 @@ const opDescribeAssessmentTargets = "DescribeAssessmentTargets" // DescribeAssessmentTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -985,7 +985,7 @@ const opDescribeAssessmentTemplates = "DescribeAssessmentTemplates" // DescribeAssessmentTemplatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1069,7 +1069,7 @@ const opDescribeCrossAccountAccessRole = "DescribeCrossAccountAccessRole" // DescribeCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the // client's request for the DescribeCrossAccountAccessRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1148,7 +1148,7 @@ const opDescribeExclusions = "DescribeExclusions" // DescribeExclusionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeExclusions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1231,7 +1231,7 @@ const opDescribeFindings = "DescribeFindings" // DescribeFindingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1314,7 +1314,7 @@ const opDescribeResourceGroups = "DescribeResourceGroups" // DescribeResourceGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1398,7 +1398,7 @@ const opDescribeRulesPackages = "DescribeRulesPackages" // DescribeRulesPackagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRulesPackages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1482,7 +1482,7 @@ const opGetAssessmentReport = "GetAssessmentReport" // GetAssessmentReportRequest generates a "aws/request.Request" representing the // client's request for the GetAssessmentReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1587,7 +1587,7 @@ const opGetExclusionsPreview = "GetExclusionsPreview" // GetExclusionsPreviewRequest generates a "aws/request.Request" representing the // client's request for the GetExclusionsPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1735,7 +1735,7 @@ const opGetTelemetryMetadata = "GetTelemetryMetadata" // GetTelemetryMetadataRequest generates a "aws/request.Request" representing the // client's request for the GetTelemetryMetadata operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1826,7 +1826,7 @@ const opListAssessmentRunAgents = "ListAssessmentRunAgents" // ListAssessmentRunAgentsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentRunAgents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1973,7 +1973,7 @@ const opListAssessmentRuns = "ListAssessmentRuns" // ListAssessmentRunsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2120,7 +2120,7 @@ const opListAssessmentTargets = "ListAssessmentTargets" // ListAssessmentTargetsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2264,7 +2264,7 @@ const opListAssessmentTemplates = "ListAssessmentTemplates" // ListAssessmentTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2411,7 +2411,7 @@ const opListEventSubscriptions = "ListEventSubscriptions" // ListEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the ListEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2559,7 +2559,7 @@ const opListExclusions = "ListExclusions" // ListExclusionsRequest generates a "aws/request.Request" representing the // client's request for the ListExclusions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2705,7 +2705,7 @@ const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2852,7 +2852,7 @@ const opListRulesPackages = "ListRulesPackages" // ListRulesPackagesRequest generates a "aws/request.Request" representing the // client's request for the ListRulesPackages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2994,7 +2994,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3084,7 +3084,7 @@ const opPreviewAgents = "PreviewAgents" // PreviewAgentsRequest generates a "aws/request.Request" representing the // client's request for the PreviewAgents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3235,7 +3235,7 @@ const opRegisterCrossAccountAccessRole = "RegisterCrossAccountAccessRole" // RegisterCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the // client's request for the RegisterCrossAccountAccessRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3331,7 +3331,7 @@ const opRemoveAttributesFromFindings = "RemoveAttributesFromFindings" // RemoveAttributesFromFindingsRequest generates a "aws/request.Request" representing the // client's request for the RemoveAttributesFromFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3426,7 +3426,7 @@ const opSetTagsForResource = "SetTagsForResource" // SetTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the SetTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3522,7 +3522,7 @@ const opStartAssessmentRun = "StartAssessmentRun" // StartAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the StartAssessmentRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3629,7 +3629,7 @@ const opStopAssessmentRun = "StopAssessmentRun" // StopAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the StopAssessmentRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3724,7 +3724,7 @@ const opSubscribeToEvent = "SubscribeToEvent" // SubscribeToEventRequest generates a "aws/request.Request" representing the // client's request for the SubscribeToEvent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3824,7 +3824,7 @@ const opUnsubscribeFromEvent = "UnsubscribeFromEvent" // UnsubscribeFromEventRequest generates a "aws/request.Request" representing the // client's request for the UnsubscribeFromEvent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3920,7 +3920,7 @@ const opUpdateAssessmentTarget = "UpdateAssessmentTarget" // UpdateAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssessmentTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index bbecfc05950..b388b6cc463 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -18,7 +18,7 @@ const opAcceptCertificateTransfer = "AcceptCertificateTransfer" // AcceptCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the AcceptCertificateTransfer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -119,7 +119,7 @@ const opAddThingToThingGroup = "AddThingToThingGroup" // AddThingToThingGroupRequest generates a "aws/request.Request" representing the // client's request for the AddThingToThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -204,7 +204,7 @@ const opAssociateTargetsWithJob = "AssociateTargetsWithJob" // AssociateTargetsWithJobRequest generates a "aws/request.Request" representing the // client's request for the AssociateTargetsWithJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -300,7 +300,7 @@ const opAttachPolicy = "AttachPolicy" // AttachPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -396,7 +396,7 @@ const opAttachPrincipalPolicy = "AttachPrincipalPolicy" // AttachPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -504,7 +504,7 @@ const opAttachSecurityProfile = "AttachSecurityProfile" // AttachSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the AttachSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -598,7 +598,7 @@ const opAttachThingPrincipal = "AttachThingPrincipal" // AttachThingPrincipalRequest generates a "aws/request.Request" representing the // client's request for the AttachThingPrincipal operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -689,7 +689,7 @@ const opCancelAuditTask = "CancelAuditTask" // CancelAuditTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelAuditTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -776,7 +776,7 @@ const opCancelCertificateTransfer = "CancelCertificateTransfer" // CancelCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the CancelCertificateTransfer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -882,7 +882,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -967,7 +967,7 @@ const opCancelJobExecution = "CancelJobExecution" // CancelJobExecutionRequest generates a "aws/request.Request" representing the // client's request for the CancelJobExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1063,7 +1063,7 @@ const opClearDefaultAuthorizer = "ClearDefaultAuthorizer" // ClearDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the ClearDefaultAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1154,7 +1154,7 @@ const opCreateAuthorizer = "CreateAuthorizer" // CreateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the CreateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1248,7 +1248,7 @@ const opCreateCertificateFromCsr = "CreateCertificateFromCsr" // CreateCertificateFromCsrRequest generates a "aws/request.Request" representing the // client's request for the CreateCertificateFromCsr operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1377,7 +1377,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1468,7 +1468,7 @@ const opCreateKeysAndCertificate = "CreateKeysAndCertificate" // CreateKeysAndCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateKeysAndCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1560,7 +1560,7 @@ const opCreateOTAUpdate = "CreateOTAUpdate" // CreateOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the CreateOTAUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1657,7 +1657,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1755,7 +1755,7 @@ const opCreatePolicyVersion = "CreatePolicyVersion" // CreatePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1859,7 +1859,7 @@ const opCreateRoleAlias = "CreateRoleAlias" // CreateRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1953,7 +1953,7 @@ const opCreateScheduledAudit = "CreateScheduledAudit" // CreateScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the CreateScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2038,7 +2038,7 @@ const opCreateSecurityProfile = "CreateSecurityProfile" // CreateSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2123,7 +2123,7 @@ const opCreateStream = "CreateStream" // CreateStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2226,7 +2226,7 @@ const opCreateThing = "CreateThing" // CreateThingRequest generates a "aws/request.Request" representing the // client's request for the CreateThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2323,7 +2323,7 @@ const opCreateThingGroup = "CreateThingGroup" // CreateThingGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2411,7 +2411,7 @@ const opCreateThingType = "CreateThingType" // CreateThingTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2502,7 +2502,7 @@ const opCreateTopicRule = "CreateTopicRule" // CreateTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2594,7 +2594,7 @@ const opDeleteAccountAuditConfiguration = "DeleteAccountAuditConfiguration" // DeleteAccountAuditConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountAuditConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2681,7 +2681,7 @@ const opDeleteAuthorizer = "DeleteAuthorizer" // DeleteAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DeleteAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2775,7 +2775,7 @@ const opDeleteCACertificate = "DeleteCACertificate" // DeleteCACertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2869,7 +2869,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2973,7 +2973,7 @@ const opDeleteJob = "DeleteJob" // DeleteJobRequest generates a "aws/request.Request" representing the // client's request for the DeleteJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3077,7 +3077,7 @@ const opDeleteJobExecution = "DeleteJobExecution" // DeleteJobExecutionRequest generates a "aws/request.Request" representing the // client's request for the DeleteJobExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3169,7 +3169,7 @@ const opDeleteOTAUpdate = "DeleteOTAUpdate" // DeleteOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the DeleteOTAUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3264,7 +3264,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3370,7 +3370,7 @@ const opDeletePolicyVersion = "DeletePolicyVersion" // DeletePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3469,7 +3469,7 @@ const opDeleteRegistrationCode = "DeleteRegistrationCode" // DeleteRegistrationCodeRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegistrationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3557,7 +3557,7 @@ const opDeleteRoleAlias = "DeleteRoleAlias" // DeleteRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3651,7 +3651,7 @@ const opDeleteScheduledAudit = "DeleteScheduledAudit" // DeleteScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3736,7 +3736,7 @@ const opDeleteSecurityProfile = "DeleteSecurityProfile" // DeleteSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3822,7 +3822,7 @@ const opDeleteStream = "DeleteStream" // DeleteStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3916,7 +3916,7 @@ const opDeleteThing = "DeleteThing" // DeleteThingRequest generates a "aws/request.Request" representing the // client's request for the DeleteThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4011,7 +4011,7 @@ const opDeleteThingGroup = "DeleteThingGroup" // DeleteThingGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4097,7 +4097,7 @@ const opDeleteThingType = "DeleteThingType" // DeleteThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4192,7 +4192,7 @@ const opDeleteTopicRule = "DeleteTopicRule" // DeleteTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4279,7 +4279,7 @@ const opDeleteV2LoggingLevel = "DeleteV2LoggingLevel" // DeleteV2LoggingLevelRequest generates a "aws/request.Request" representing the // client's request for the DeleteV2LoggingLevel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4363,7 +4363,7 @@ const opDeprecateThingType = "DeprecateThingType" // DeprecateThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4455,7 +4455,7 @@ const opDescribeAccountAuditConfiguration = "DescribeAccountAuditConfiguration" // DescribeAccountAuditConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAuditConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4536,7 +4536,7 @@ const opDescribeAuditTask = "DescribeAuditTask" // DescribeAuditTaskRequest generates a "aws/request.Request" representing the // client's request for the DescribeAuditTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4621,7 +4621,7 @@ const opDescribeAuthorizer = "DescribeAuthorizer" // DescribeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DescribeAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4712,7 +4712,7 @@ const opDescribeCACertificate = "DescribeCACertificate" // DescribeCACertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4803,7 +4803,7 @@ const opDescribeCertificate = "DescribeCertificate" // DescribeCertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4894,7 +4894,7 @@ const opDescribeDefaultAuthorizer = "DescribeDefaultAuthorizer" // DescribeDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4985,7 +4985,7 @@ const opDescribeEndpoint = "DescribeEndpoint" // DescribeEndpointRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5070,7 +5070,7 @@ const opDescribeEventConfigurations = "DescribeEventConfigurations" // DescribeEventConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5149,7 +5149,7 @@ const opDescribeIndex = "DescribeIndex" // DescribeIndexRequest generates a "aws/request.Request" representing the // client's request for the DescribeIndex operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5240,7 +5240,7 @@ const opDescribeJob = "DescribeJob" // DescribeJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5325,7 +5325,7 @@ const opDescribeJobExecution = "DescribeJobExecution" // DescribeJobExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5410,7 +5410,7 @@ const opDescribeRoleAlias = "DescribeRoleAlias" // DescribeRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the DescribeRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5501,7 +5501,7 @@ const opDescribeScheduledAudit = "DescribeScheduledAudit" // DescribeScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5586,7 +5586,7 @@ const opDescribeSecurityProfile = "DescribeSecurityProfile" // DescribeSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5671,7 +5671,7 @@ const opDescribeStream = "DescribeStream" // DescribeStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5762,7 +5762,7 @@ const opDescribeThing = "DescribeThing" // DescribeThingRequest generates a "aws/request.Request" representing the // client's request for the DescribeThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5853,7 +5853,7 @@ const opDescribeThingGroup = "DescribeThingGroup" // DescribeThingGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5938,7 +5938,7 @@ const opDescribeThingRegistrationTask = "DescribeThingRegistrationTask" // DescribeThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingRegistrationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6026,7 +6026,7 @@ const opDescribeThingType = "DescribeThingType" // DescribeThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6117,7 +6117,7 @@ const opDetachPolicy = "DetachPolicy" // DetachPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6210,7 +6210,7 @@ const opDetachPrincipalPolicy = "DetachPrincipalPolicy" // DetachPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6314,7 +6314,7 @@ const opDetachSecurityProfile = "DetachSecurityProfile" // DetachSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the DetachSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6400,7 +6400,7 @@ const opDetachThingPrincipal = "DetachThingPrincipal" // DetachThingPrincipalRequest generates a "aws/request.Request" representing the // client's request for the DetachThingPrincipal operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6491,7 +6491,7 @@ const opDisableTopicRule = "DisableTopicRule" // DisableTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the DisableTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6578,7 +6578,7 @@ const opEnableTopicRule = "EnableTopicRule" // EnableTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the EnableTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6665,7 +6665,7 @@ const opGetEffectivePolicies = "GetEffectivePolicies" // GetEffectivePoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetEffectivePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6760,7 +6760,7 @@ const opGetIndexingConfiguration = "GetIndexingConfiguration" // GetIndexingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetIndexingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6848,7 +6848,7 @@ const opGetJobDocument = "GetJobDocument" // GetJobDocumentRequest generates a "aws/request.Request" representing the // client's request for the GetJobDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6933,7 +6933,7 @@ const opGetLoggingOptions = "GetLoggingOptions" // GetLoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7017,7 +7017,7 @@ const opGetOTAUpdate = "GetOTAUpdate" // GetOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the GetOTAUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7108,7 +7108,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7200,7 +7200,7 @@ const opGetPolicyVersion = "GetPolicyVersion" // GetPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the GetPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7291,7 +7291,7 @@ const opGetRegistrationCode = "GetRegistrationCode" // GetRegistrationCodeRequest generates a "aws/request.Request" representing the // client's request for the GetRegistrationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7379,7 +7379,7 @@ const opGetTopicRule = "GetTopicRule" // GetTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the GetTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7464,7 +7464,7 @@ const opGetV2LoggingOptions = "GetV2LoggingOptions" // GetV2LoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the GetV2LoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7546,7 +7546,7 @@ const opListActiveViolations = "ListActiveViolations" // ListActiveViolationsRequest generates a "aws/request.Request" representing the // client's request for the ListActiveViolations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7631,7 +7631,7 @@ const opListAttachedPolicies = "ListAttachedPolicies" // ListAttachedPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7725,7 +7725,7 @@ const opListAuditFindings = "ListAuditFindings" // ListAuditFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListAuditFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7809,7 +7809,7 @@ const opListAuditTasks = "ListAuditTasks" // ListAuditTasksRequest generates a "aws/request.Request" representing the // client's request for the ListAuditTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7892,7 +7892,7 @@ const opListAuthorizers = "ListAuthorizers" // ListAuthorizersRequest generates a "aws/request.Request" representing the // client's request for the ListAuthorizers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7980,7 +7980,7 @@ const opListCACertificates = "ListCACertificates" // ListCACertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCACertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8071,7 +8071,7 @@ const opListCertificates = "ListCertificates" // ListCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8162,7 +8162,7 @@ const opListCertificatesByCA = "ListCertificatesByCA" // ListCertificatesByCARequest generates a "aws/request.Request" representing the // client's request for the ListCertificatesByCA operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8250,7 +8250,7 @@ const opListIndices = "ListIndices" // ListIndicesRequest generates a "aws/request.Request" representing the // client's request for the ListIndices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8338,7 +8338,7 @@ const opListJobExecutionsForJob = "ListJobExecutionsForJob" // ListJobExecutionsForJobRequest generates a "aws/request.Request" representing the // client's request for the ListJobExecutionsForJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8423,7 +8423,7 @@ const opListJobExecutionsForThing = "ListJobExecutionsForThing" // ListJobExecutionsForThingRequest generates a "aws/request.Request" representing the // client's request for the ListJobExecutionsForThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8508,7 +8508,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8593,7 +8593,7 @@ const opListOTAUpdates = "ListOTAUpdates" // ListOTAUpdatesRequest generates a "aws/request.Request" representing the // client's request for the ListOTAUpdates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8681,7 +8681,7 @@ const opListOutgoingCertificates = "ListOutgoingCertificates" // ListOutgoingCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListOutgoingCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8769,7 +8769,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8857,7 +8857,7 @@ const opListPolicyPrincipals = "ListPolicyPrincipals" // ListPolicyPrincipalsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyPrincipals operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8959,7 +8959,7 @@ const opListPolicyVersions = "ListPolicyVersions" // ListPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9050,7 +9050,7 @@ const opListPrincipalPolicies = "ListPrincipalPolicies" // ListPrincipalPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9153,7 +9153,7 @@ const opListPrincipalThings = "ListPrincipalThings" // ListPrincipalThingsRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalThings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9244,7 +9244,7 @@ const opListRoleAliases = "ListRoleAliases" // ListRoleAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListRoleAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9332,7 +9332,7 @@ const opListScheduledAudits = "ListScheduledAudits" // ListScheduledAuditsRequest generates a "aws/request.Request" representing the // client's request for the ListScheduledAudits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9414,7 +9414,7 @@ const opListSecurityProfiles = "ListSecurityProfiles" // ListSecurityProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListSecurityProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9498,7 +9498,7 @@ const opListSecurityProfilesForTarget = "ListSecurityProfilesForTarget" // ListSecurityProfilesForTargetRequest generates a "aws/request.Request" representing the // client's request for the ListSecurityProfilesForTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9583,7 +9583,7 @@ const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9671,7 +9671,7 @@ const opListTargetsForPolicy = "ListTargetsForPolicy" // ListTargetsForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9765,7 +9765,7 @@ const opListTargetsForSecurityProfile = "ListTargetsForSecurityProfile" // ListTargetsForSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9851,7 +9851,7 @@ const opListThingGroups = "ListThingGroups" // ListThingGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListThingGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9933,7 +9933,7 @@ const opListThingGroupsForThing = "ListThingGroupsForThing" // ListThingGroupsForThingRequest generates a "aws/request.Request" representing the // client's request for the ListThingGroupsForThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10015,7 +10015,7 @@ const opListThingPrincipals = "ListThingPrincipals" // ListThingPrincipalsRequest generates a "aws/request.Request" representing the // client's request for the ListThingPrincipals operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10106,7 +10106,7 @@ const opListThingRegistrationTaskReports = "ListThingRegistrationTaskReports" // ListThingRegistrationTaskReportsRequest generates a "aws/request.Request" representing the // client's request for the ListThingRegistrationTaskReports operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10191,7 +10191,7 @@ const opListThingRegistrationTasks = "ListThingRegistrationTasks" // ListThingRegistrationTasksRequest generates a "aws/request.Request" representing the // client's request for the ListThingRegistrationTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10276,7 +10276,7 @@ const opListThingTypes = "ListThingTypes" // ListThingTypesRequest generates a "aws/request.Request" representing the // client's request for the ListThingTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10364,7 +10364,7 @@ const opListThings = "ListThings" // ListThingsRequest generates a "aws/request.Request" representing the // client's request for the ListThings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10455,7 +10455,7 @@ const opListThingsInThingGroup = "ListThingsInThingGroup" // ListThingsInThingGroupRequest generates a "aws/request.Request" representing the // client's request for the ListThingsInThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10537,7 +10537,7 @@ const opListTopicRules = "ListTopicRules" // ListTopicRulesRequest generates a "aws/request.Request" representing the // client's request for the ListTopicRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10619,7 +10619,7 @@ const opListV2LoggingLevels = "ListV2LoggingLevels" // ListV2LoggingLevelsRequest generates a "aws/request.Request" representing the // client's request for the ListV2LoggingLevels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10704,7 +10704,7 @@ const opListViolationEvents = "ListViolationEvents" // ListViolationEventsRequest generates a "aws/request.Request" representing the // client's request for the ListViolationEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10788,7 +10788,7 @@ const opRegisterCACertificate = "RegisterCACertificate" // RegisterCACertificateRequest generates a "aws/request.Request" representing the // client's request for the RegisterCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10894,7 +10894,7 @@ const opRegisterCertificate = "RegisterCertificate" // RegisterCertificateRequest generates a "aws/request.Request" representing the // client's request for the RegisterCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10998,7 +10998,7 @@ const opRegisterThing = "RegisterThing" // RegisterThingRequest generates a "aws/request.Request" representing the // client's request for the RegisterThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11093,7 +11093,7 @@ const opRejectCertificateTransfer = "RejectCertificateTransfer" // RejectCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the RejectCertificateTransfer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11198,7 +11198,7 @@ const opRemoveThingFromThingGroup = "RemoveThingFromThingGroup" // RemoveThingFromThingGroupRequest generates a "aws/request.Request" representing the // client's request for the RemoveThingFromThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11283,7 +11283,7 @@ const opReplaceTopicRule = "ReplaceTopicRule" // ReplaceTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the ReplaceTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11375,7 +11375,7 @@ const opSearchIndex = "SearchIndex" // SearchIndexRequest generates a "aws/request.Request" representing the // client's request for the SearchIndex operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11472,7 +11472,7 @@ const opSetDefaultAuthorizer = "SetDefaultAuthorizer" // SetDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11567,7 +11567,7 @@ const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" // SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11663,7 +11663,7 @@ const opSetLoggingOptions = "SetLoggingOptions" // SetLoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the SetLoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11749,7 +11749,7 @@ const opSetV2LoggingLevel = "SetV2LoggingLevel" // SetV2LoggingLevelRequest generates a "aws/request.Request" representing the // client's request for the SetV2LoggingLevel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11836,7 +11836,7 @@ const opSetV2LoggingOptions = "SetV2LoggingOptions" // SetV2LoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the SetV2LoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -11920,7 +11920,7 @@ const opStartOnDemandAuditTask = "StartOnDemandAuditTask" // StartOnDemandAuditTaskRequest generates a "aws/request.Request" representing the // client's request for the StartOnDemandAuditTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12005,7 +12005,7 @@ const opStartThingRegistrationTask = "StartThingRegistrationTask" // StartThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the StartThingRegistrationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12090,7 +12090,7 @@ const opStopThingRegistrationTask = "StopThingRegistrationTask" // StopThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the StopThingRegistrationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12178,7 +12178,7 @@ const opTestAuthorization = "TestAuthorization" // TestAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the TestAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12274,7 +12274,7 @@ const opTestInvokeAuthorizer = "TestInvokeAuthorizer" // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12370,7 +12370,7 @@ const opTransferCertificate = "TransferCertificate" // TransferCertificateRequest generates a "aws/request.Request" representing the // client's request for the TransferCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12479,7 +12479,7 @@ const opUpdateAccountAuditConfiguration = "UpdateAccountAuditConfiguration" // UpdateAccountAuditConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccountAuditConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12563,7 +12563,7 @@ const opUpdateAuthorizer = "UpdateAuthorizer" // UpdateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12657,7 +12657,7 @@ const opUpdateCACertificate = "UpdateCACertificate" // UpdateCACertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12750,7 +12750,7 @@ const opUpdateCertificate = "UpdateCertificate" // UpdateCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12852,7 +12852,7 @@ const opUpdateEventConfigurations = "UpdateEventConfigurations" // UpdateEventConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the UpdateEventConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12934,7 +12934,7 @@ const opUpdateIndexingConfiguration = "UpdateIndexingConfiguration" // UpdateIndexingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateIndexingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13022,7 +13022,7 @@ const opUpdateRoleAlias = "UpdateRoleAlias" // UpdateRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13113,7 +13113,7 @@ const opUpdateScheduledAudit = "UpdateScheduledAudit" // UpdateScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the UpdateScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13199,7 +13199,7 @@ const opUpdateSecurityProfile = "UpdateSecurityProfile" // UpdateSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13288,7 +13288,7 @@ const opUpdateStream = "UpdateStream" // UpdateStreamRequest generates a "aws/request.Request" representing the // client's request for the UpdateStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13379,7 +13379,7 @@ const opUpdateThing = "UpdateThing" // UpdateThingRequest generates a "aws/request.Request" representing the // client's request for the UpdateThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13474,7 +13474,7 @@ const opUpdateThingGroup = "UpdateThingGroup" // UpdateThingGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13563,7 +13563,7 @@ const opUpdateThingGroupsForThing = "UpdateThingGroupsForThing" // UpdateThingGroupsForThingRequest generates a "aws/request.Request" representing the // client's request for the UpdateThingGroupsForThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -13648,7 +13648,7 @@ const opValidateSecurityProfileBehaviors = "ValidateSecurityProfileBehaviors" // ValidateSecurityProfileBehaviorsRequest generates a "aws/request.Request" representing the // client's request for the ValidateSecurityProfileBehaviors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -16675,6 +16675,12 @@ type CreateJobInput struct { // // Targets is a required field Targets []*string `locationName:"targets" min:"1" type:"list" required:"true"` + + // Specifies the amount of time each device has to finish its execution of the + // job. The timer is started when the job execution status is set to IN_PROGRESS. + // If the job execution status is not set to another terminal state before the + // time expires, it will be automatically set to TIMED_OUT. + TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` } // String returns the string representation @@ -16770,6 +16776,12 @@ func (s *CreateJobInput) SetTargets(v []*string) *CreateJobInput { return s } +// SetTimeoutConfig sets the TimeoutConfig field's value. +func (s *CreateJobInput) SetTimeoutConfig(v *TimeoutConfig) *CreateJobInput { + s.TimeoutConfig = v + return s +} + type CreateJobOutput struct { _ struct{} `type:"structure"` @@ -19937,7 +19949,16 @@ func (s *DescribeDefaultAuthorizerOutput) SetAuthorizerDescription(v *Authorizer type DescribeEndpointInput struct { _ struct{} `type:"structure"` - // The endpoint type (such as iot:Data, iot:CredentialProvider and iot:Jobs). + // The endpoint type. Valid endpoint types include: + // + // * iot:Data - Returns a VeriSign signed data endpoint. + // + // * iot:Data-ATS - Returns an ATS signed data endpoint. + // + // * iot:CredentialProvider - Returns an AWS IoT credentials provider API + // endpoint. + // + // * iot:Jobs - Returns an AWS IoT device management Jobs API endpoint. EndpointType *string `location:"querystring" locationName:"endpointType" type:"string"` } @@ -22988,7 +23009,8 @@ type Job struct { // Configuration for pre-signed S3 URLs. PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` - // The status of the job, one of IN_PROGRESS, CANCELED, or COMPLETED. + // The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS + // or COMPLETED. Status *string `locationName:"status" type:"string" enum:"JobStatus"` // Specifies whether the job will continue to run (CONTINUOUS), or will be complete @@ -23001,6 +23023,12 @@ type Job struct { // A list of IoT things and thing groups to which the job should be sent. Targets []*string `locationName:"targets" min:"1" type:"list"` + + // Specifies the amount of time each device has to finish its execution of the + // job. A timer is started when the job execution status is set to IN_PROGRESS. + // If the job execution status is not set to another terminal state before the + // timer expires, it will be automatically set to TIMED_OUT. + TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` } // String returns the string representation @@ -23097,11 +23125,21 @@ func (s *Job) SetTargets(v []*string) *Job { return s } +// SetTimeoutConfig sets the TimeoutConfig field's value. +func (s *Job) SetTimeoutConfig(v *TimeoutConfig) *Job { + s.TimeoutConfig = v + return s +} + // The job execution object represents the execution of a job on a particular // device. type JobExecution struct { _ struct{} `type:"structure"` + // The estimated number of seconds that remain before the job execution status + // will be changed to TIMED_OUT. + ApproximateSecondsBeforeTimedOut *int64 `locationName:"approximateSecondsBeforeTimedOut" type:"long"` + // A string (consisting of the digits "0" through "9") which identifies this // particular job execution on this particular device. It can be used in commands // which return or update job execution information. @@ -23124,8 +23162,8 @@ type JobExecution struct { // The time, in milliseconds since the epoch, when the job execution started. StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` - // The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCESS, CANCELED, - // or REJECTED). + // The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, + // TIMED_OUT, CANCELED, or REJECTED). Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"` // A collection of name/value pairs that describe the status of the job execution. @@ -23149,6 +23187,12 @@ func (s JobExecution) GoString() string { return s.String() } +// SetApproximateSecondsBeforeTimedOut sets the ApproximateSecondsBeforeTimedOut field's value. +func (s *JobExecution) SetApproximateSecondsBeforeTimedOut(v int64) *JobExecution { + s.ApproximateSecondsBeforeTimedOut = &v + return s +} + // SetExecutionNumber sets the ExecutionNumber field's value. func (s *JobExecution) SetExecutionNumber(v int64) *JobExecution { s.ExecutionNumber = &v @@ -23427,6 +23471,9 @@ type JobProcessDetails struct { // The number of things which successfully completed the job. NumberOfSucceededThings *int64 `locationName:"numberOfSucceededThings" type:"integer"` + // The number of things whose job execution status is TIMED_OUT. + NumberOfTimedOutThings *int64 `locationName:"numberOfTimedOutThings" type:"integer"` + // The target devices to which the job execution is being rolled out. This value // will be null after the job execution has finished rolling out to all the // target devices. @@ -23485,6 +23532,12 @@ func (s *JobProcessDetails) SetNumberOfSucceededThings(v int64) *JobProcessDetai return s } +// SetNumberOfTimedOutThings sets the NumberOfTimedOutThings field's value. +func (s *JobProcessDetails) SetNumberOfTimedOutThings(v int64) *JobProcessDetails { + s.NumberOfTimedOutThings = &v + return s +} + // SetProcessingTargets sets the ProcessingTargets field's value. func (s *JobProcessDetails) SetProcessingTargets(v []*string) *JobProcessDetails { s.ProcessingTargets = v @@ -31357,6 +31410,41 @@ func (s *ThingTypeProperties) SetThingTypeDescription(v string) *ThingTypeProper return s } +// Specifies the amount of time each device has to finish its execution of the +// job. A timer is started when the job execution status is set to IN_PROGRESS. +// If the job execution status is not set to another terminal state before the +// timer expires, it will be automatically set to TIMED_OUT. +type TimeoutConfig struct { + _ struct{} `type:"structure"` + + // Specifies the amount of time, in minutes, this device has to finish execution + // of this job. A timer is started, or restarted, whenever this job's execution + // status is specified as IN_PROGRESS with this field populated. If the job + // execution status is not set to a terminal state before the timer expires, + // or before another job execution status update is sent with this field populated, + // the status will be automatically set to TIMED_OUT. Note that setting/resetting + // this timer has no effect on the job execution timeout timer which may have + // been specified when the job was created (CreateJobExecution using the field + // timeoutConfig). + InProgressTimeoutInMinutes *int64 `locationName:"inProgressTimeoutInMinutes" type:"long"` +} + +// String returns the string representation +func (s TimeoutConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimeoutConfig) GoString() string { + return s.String() +} + +// SetInProgressTimeoutInMinutes sets the InProgressTimeoutInMinutes field's value. +func (s *TimeoutConfig) SetInProgressTimeoutInMinutes(v int64) *TimeoutConfig { + s.InProgressTimeoutInMinutes = &v + return s +} + // Describes a rule. type TopicRule struct { _ struct{} `type:"structure"` @@ -33514,6 +33602,9 @@ const ( // JobExecutionStatusFailed is a JobExecutionStatus enum value JobExecutionStatusFailed = "FAILED" + // JobExecutionStatusTimedOut is a JobExecutionStatus enum value + JobExecutionStatusTimedOut = "TIMED_OUT" + // JobExecutionStatusRejected is a JobExecutionStatus enum value JobExecutionStatusRejected = "REJECTED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go index b5689138327..7b3cdcf2639 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go @@ -18,7 +18,7 @@ const opAddTagsToStream = "AddTagsToStream" // AddTagsToStreamRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -120,7 +120,7 @@ const opCreateStream = "CreateStream" // CreateStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -248,7 +248,7 @@ const opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod" // DecreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the DecreaseStreamRetentionPeriod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -348,7 +348,7 @@ const opDeleteStream = "DeleteStream" // DeleteStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -457,7 +457,7 @@ const opDeregisterStreamConsumer = "DeregisterStreamConsumer" // DeregisterStreamConsumerRequest generates a "aws/request.Request" representing the // client's request for the DeregisterStreamConsumer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -556,7 +556,7 @@ const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -641,7 +641,7 @@ const opDescribeStream = "DescribeStream" // DescribeStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -799,7 +799,7 @@ const opDescribeStreamConsumer = "DescribeStreamConsumer" // DescribeStreamConsumerRequest generates a "aws/request.Request" representing the // client's request for the DescribeStreamConsumer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -895,7 +895,7 @@ const opDescribeStreamSummary = "DescribeStreamSummary" // DescribeStreamSummaryRequest generates a "aws/request.Request" representing the // client's request for the DescribeStreamSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -984,7 +984,7 @@ const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring" // DisableEnhancedMonitoringRequest generates a "aws/request.Request" representing the // client's request for the DisableEnhancedMonitoring operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1076,7 +1076,7 @@ const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring" // EnableEnhancedMonitoringRequest generates a "aws/request.Request" representing the // client's request for the EnableEnhancedMonitoring operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1168,7 +1168,7 @@ const opGetRecords = "GetRecords" // GetRecordsRequest generates a "aws/request.Request" representing the // client's request for the GetRecords operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1344,7 +1344,7 @@ const opGetShardIterator = "GetShardIterator" // GetShardIteratorRequest generates a "aws/request.Request" representing the // client's request for the GetShardIterator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1474,7 +1474,7 @@ const opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod" // IncreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the IncreaseStreamRetentionPeriod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1578,7 +1578,7 @@ const opListShards = "ListShards" // ListShardsRequest generates a "aws/request.Request" representing the // client's request for the ListShards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1680,7 +1680,7 @@ const opListStreamConsumers = "ListStreamConsumers" // ListStreamConsumersRequest generates a "aws/request.Request" representing the // client's request for the ListStreamConsumers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1834,7 +1834,7 @@ const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1985,7 +1985,7 @@ const opListTagsForStream = "ListTagsForStream" // ListTagsForStreamRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2074,7 +2074,7 @@ const opMergeShards = "MergeShards" // MergeShardsRequest generates a "aws/request.Request" representing the // client's request for the MergeShards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2203,7 +2203,7 @@ const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the // client's request for the PutRecord operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2359,7 +2359,7 @@ const opPutRecords = "PutRecords" // PutRecordsRequest generates a "aws/request.Request" representing the // client's request for the PutRecords operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2535,7 +2535,7 @@ const opRegisterStreamConsumer = "RegisterStreamConsumer" // RegisterStreamConsumerRequest generates a "aws/request.Request" representing the // client's request for the RegisterStreamConsumer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2635,7 +2635,7 @@ const opRemoveTagsFromStream = "RemoveTagsFromStream" // RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2734,7 +2734,7 @@ const opSplitShard = "SplitShard" // SplitShardRequest generates a "aws/request.Request" representing the // client's request for the SplitShard operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2873,7 +2873,7 @@ const opStartStreamEncryption = "StartStreamEncryption" // StartStreamEncryptionRequest generates a "aws/request.Request" representing the // client's request for the StartStreamEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3011,7 +3011,7 @@ const opStopStreamEncryption = "StopStreamEncryption" // StopStreamEncryptionRequest generates a "aws/request.Request" representing the // client's request for the StopStreamEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3122,7 +3122,7 @@ const opUpdateShardCount = "UpdateShardCount" // UpdateShardCountRequest generates a "aws/request.Request" representing the // client's request for the UpdateShardCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go index 1ab3a0614be..49bab98efb9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go @@ -16,7 +16,7 @@ const opAddApplicationCloudWatchLoggingOption = "AddApplicationCloudWatchLogging // AddApplicationCloudWatchLoggingOptionRequest generates a "aws/request.Request" representing the // client's request for the AddApplicationCloudWatchLoggingOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -108,7 +108,7 @@ const opAddApplicationInput = "AddApplicationInput" // AddApplicationInputRequest generates a "aws/request.Request" representing the // client's request for the AddApplicationInput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -214,7 +214,7 @@ const opAddApplicationInputProcessingConfiguration = "AddApplicationInputProcess // AddApplicationInputProcessingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the AddApplicationInputProcessingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -306,7 +306,7 @@ const opAddApplicationOutput = "AddApplicationOutput" // AddApplicationOutputRequest generates a "aws/request.Request" representing the // client's request for the AddApplicationOutput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -418,7 +418,7 @@ const opAddApplicationReferenceDataSource = "AddApplicationReferenceDataSource" // AddApplicationReferenceDataSourceRequest generates a "aws/request.Request" representing the // client's request for the AddApplicationReferenceDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -522,7 +522,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -635,7 +635,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -727,7 +727,7 @@ const opDeleteApplicationCloudWatchLoggingOption = "DeleteApplicationCloudWatchL // DeleteApplicationCloudWatchLoggingOptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplicationCloudWatchLoggingOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -819,7 +819,7 @@ const opDeleteApplicationInputProcessingConfiguration = "DeleteApplicationInputP // DeleteApplicationInputProcessingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplicationInputProcessingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -909,7 +909,7 @@ const opDeleteApplicationOutput = "DeleteApplicationOutput" // DeleteApplicationOutputRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplicationOutput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1004,7 +1004,7 @@ const opDeleteApplicationReferenceDataSource = "DeleteApplicationReferenceDataSo // DeleteApplicationReferenceDataSourceRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplicationReferenceDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1102,7 +1102,7 @@ const opDescribeApplication = "DescribeApplication" // DescribeApplicationRequest generates a "aws/request.Request" representing the // client's request for the DescribeApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1188,7 +1188,7 @@ const opDiscoverInputSchema = "DiscoverInputSchema" // DiscoverInputSchemaRequest generates a "aws/request.Request" representing the // client's request for the DiscoverInputSchema operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1293,7 +1293,7 @@ const opListApplications = "ListApplications" // ListApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1377,7 +1377,7 @@ const opStartApplication = "StartApplication" // StartApplicationRequest generates a "aws/request.Request" representing the // client's request for the StartApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1479,7 +1479,7 @@ const opStopApplication = "StopApplication" // StopApplicationRequest generates a "aws/request.Request" representing the // client's request for the StopApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1568,7 +1568,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index 98ff5293892..540480c7c9f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -18,7 +18,7 @@ const opCancelKeyDeletion = "CancelKeyDeletion" // CancelKeyDeletionRequest generates a "aws/request.Request" representing the // client's request for the CancelKeyDeletion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -128,7 +128,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -264,7 +264,7 @@ const opCreateGrant = "CreateGrant" // CreateGrantRequest generates a "aws/request.Request" representing the // client's request for the CreateGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -385,7 +385,7 @@ const opCreateKey = "CreateKey" // CreateKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -500,7 +500,7 @@ const opDecrypt = "Decrypt" // DecryptRequest generates a "aws/request.Request" representing the // client's request for the Decrypt operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -630,7 +630,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -738,7 +738,7 @@ const opDeleteImportedKeyMaterial = "DeleteImportedKeyMaterial" // DeleteImportedKeyMaterialRequest generates a "aws/request.Request" representing the // client's request for the DeleteImportedKeyMaterial operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -857,7 +857,7 @@ const opDescribeKey = "DescribeKey" // DescribeKeyRequest generates a "aws/request.Request" representing the // client's request for the DescribeKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -956,7 +956,7 @@ const opDisableKey = "DisableKey" // DisableKeyRequest generates a "aws/request.Request" representing the // client's request for the DisableKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1067,7 +1067,7 @@ const opDisableKeyRotation = "DisableKeyRotation" // DisableKeyRotationRequest generates a "aws/request.Request" representing the // client's request for the DisableKeyRotation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1181,7 +1181,7 @@ const opEnableKey = "EnableKey" // EnableKeyRequest generates a "aws/request.Request" representing the // client's request for the EnableKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1293,7 +1293,7 @@ const opEnableKeyRotation = "EnableKeyRotation" // EnableKeyRotationRequest generates a "aws/request.Request" representing the // client's request for the EnableKeyRotation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1407,7 +1407,7 @@ const opEncrypt = "Encrypt" // EncryptRequest generates a "aws/request.Request" representing the // client's request for the Encrypt operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1542,7 +1542,7 @@ const opGenerateDataKey = "GenerateDataKey" // GenerateDataKeyRequest generates a "aws/request.Request" representing the // client's request for the GenerateDataKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1700,7 +1700,7 @@ const opGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext" // GenerateDataKeyWithoutPlaintextRequest generates a "aws/request.Request" representing the // client's request for the GenerateDataKeyWithoutPlaintext operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1831,7 +1831,7 @@ const opGenerateRandom = "GenerateRandom" // GenerateRandomRequest generates a "aws/request.Request" representing the // client's request for the GenerateRandom operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1919,7 +1919,7 @@ const opGetKeyPolicy = "GetKeyPolicy" // GetKeyPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetKeyPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2019,7 +2019,7 @@ const opGetKeyRotationStatus = "GetKeyRotationStatus" // GetKeyRotationStatusRequest generates a "aws/request.Request" representing the // client's request for the GetKeyRotationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2139,7 +2139,7 @@ const opGetParametersForImport = "GetParametersForImport" // GetParametersForImportRequest generates a "aws/request.Request" representing the // client's request for the GetParametersForImport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2262,7 +2262,7 @@ const opImportKeyMaterial = "ImportKeyMaterial" // ImportKeyMaterialRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyMaterial operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2423,7 +2423,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2582,7 +2582,7 @@ const opListGrants = "ListGrants" // ListGrantsRequest generates a "aws/request.Request" representing the // client's request for the ListGrants operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2744,7 +2744,7 @@ const opListKeyPolicies = "ListKeyPolicies" // ListKeyPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListKeyPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2902,7 +2902,7 @@ const opListKeys = "ListKeys" // ListKeysRequest generates a "aws/request.Request" representing the // client's request for the ListKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3047,7 +3047,7 @@ const opListResourceTags = "ListResourceTags" // ListResourceTagsRequest generates a "aws/request.Request" representing the // client's request for the ListResourceTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3140,7 +3140,7 @@ const opListRetirableGrants = "ListRetirableGrants" // ListRetirableGrantsRequest generates a "aws/request.Request" representing the // client's request for the ListRetirableGrants operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3239,7 +3239,7 @@ const opPutKeyPolicy = "PutKeyPolicy" // PutKeyPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutKeyPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3357,7 +3357,7 @@ const opReEncrypt = "ReEncrypt" // ReEncryptRequest generates a "aws/request.Request" representing the // client's request for the ReEncrypt operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3488,7 +3488,7 @@ const opRetireGrant = "RetireGrant" // RetireGrantRequest generates a "aws/request.Request" representing the // client's request for the RetireGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3610,7 +3610,7 @@ const opRevokeGrant = "RevokeGrant" // RevokeGrantRequest generates a "aws/request.Request" representing the // client's request for the RevokeGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3718,7 +3718,7 @@ const opScheduleKeyDeletion = "ScheduleKeyDeletion" // ScheduleKeyDeletionRequest generates a "aws/request.Request" representing the // client's request for the ScheduleKeyDeletion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3838,7 +3838,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3958,7 +3958,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4066,7 +4066,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4187,7 +4187,7 @@ const opUpdateKeyDescription = "UpdateKeyDescription" // UpdateKeyDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateKeyDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index f5fd4eeacc4..995cfd6d6cf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -18,7 +18,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -133,7 +133,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -230,7 +230,7 @@ const opCreateEventSourceMapping = "CreateEventSourceMapping" // CreateEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSourceMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -344,7 +344,7 @@ const opCreateFunction = "CreateFunction" // CreateFunctionRequest generates a "aws/request.Request" representing the // client's request for the CreateFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -449,7 +449,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -540,7 +540,7 @@ const opDeleteEventSourceMapping = "DeleteEventSourceMapping" // DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSourceMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -639,7 +639,7 @@ const opDeleteFunction = "DeleteFunction" // DeleteFunctionRequest generates a "aws/request.Request" representing the // client's request for the DeleteFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -746,7 +746,7 @@ const opDeleteFunctionConcurrency = "DeleteFunctionConcurrency" // DeleteFunctionConcurrencyRequest generates a "aws/request.Request" representing the // client's request for the DeleteFunctionConcurrency operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -839,7 +839,7 @@ const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -926,7 +926,7 @@ const opGetAlias = "GetAlias" // GetAliasRequest generates a "aws/request.Request" representing the // client's request for the GetAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1020,7 +1020,7 @@ const opGetEventSourceMapping = "GetEventSourceMapping" // GetEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the GetEventSourceMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1113,7 +1113,7 @@ const opGetFunction = "GetFunction" // GetFunctionRequest generates a "aws/request.Request" representing the // client's request for the GetFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1215,7 +1215,7 @@ const opGetFunctionConfiguration = "GetFunctionConfiguration" // GetFunctionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetFunctionConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1317,7 +1317,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1414,7 +1414,7 @@ const opInvoke = "Invoke" // InvokeRequest generates a "aws/request.Request" representing the // client's request for the Invoke operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1580,7 +1580,7 @@ const opInvokeAsync = "InvokeAsync" // InvokeAsyncRequest generates a "aws/request.Request" representing the // client's request for the InvokeAsync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1684,7 +1684,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1779,7 +1779,7 @@ const opListEventSourceMappings = "ListEventSourceMappings" // ListEventSourceMappingsRequest generates a "aws/request.Request" representing the // client's request for the ListEventSourceMappings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1937,7 +1937,7 @@ const opListFunctions = "ListFunctions" // ListFunctionsRequest generates a "aws/request.Request" representing the // client's request for the ListFunctions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2087,7 +2087,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2180,7 +2180,7 @@ const opListVersionsByFunction = "ListVersionsByFunction" // ListVersionsByFunctionRequest generates a "aws/request.Request" representing the // client's request for the ListVersionsByFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2271,7 +2271,7 @@ const opPublishVersion = "PublishVersion" // PublishVersionRequest generates a "aws/request.Request" representing the // client's request for the PublishVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2373,7 +2373,7 @@ const opPutFunctionConcurrency = "PutFunctionConcurrency" // PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the // client's request for the PutFunctionConcurrency operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2468,7 +2468,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2577,7 +2577,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2673,7 +2673,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2767,7 +2767,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2866,7 +2866,7 @@ const opUpdateEventSourceMapping = "UpdateEventSourceMapping" // UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the UpdateEventSourceMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2980,7 +2980,7 @@ const opUpdateFunctionCode = "UpdateFunctionCode" // UpdateFunctionCodeRequest generates a "aws/request.Request" representing the // client's request for the UpdateFunctionCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3086,7 +3086,7 @@ const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration" // UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateFunctionConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go index 121beb2d739..fd12663b8e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go @@ -18,7 +18,7 @@ const opCreateBotVersion = "CreateBotVersion" // CreateBotVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateBotVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -125,7 +125,7 @@ const opCreateIntentVersion = "CreateIntentVersion" // CreateIntentVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateIntentVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -234,7 +234,7 @@ const opCreateSlotTypeVersion = "CreateSlotTypeVersion" // CreateSlotTypeVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateSlotTypeVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -342,7 +342,7 @@ const opDeleteBot = "DeleteBot" // DeleteBotRequest generates a "aws/request.Request" representing the // client's request for the DeleteBot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -459,7 +459,7 @@ const opDeleteBotAlias = "DeleteBotAlias" // DeleteBotAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -575,7 +575,7 @@ const opDeleteBotChannelAssociation = "DeleteBotChannelAssociation" // DeleteBotChannelAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotChannelAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -673,7 +673,7 @@ const opDeleteBotVersion = "DeleteBotVersion" // DeleteBotVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -784,7 +784,7 @@ const opDeleteIntent = "DeleteIntent" // DeleteIntentRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -905,7 +905,7 @@ const opDeleteIntentVersion = "DeleteIntentVersion" // DeleteIntentVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntentVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1016,7 +1016,7 @@ const opDeleteSlotType = "DeleteSlotType" // DeleteSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteSlotType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1139,7 +1139,7 @@ const opDeleteSlotTypeVersion = "DeleteSlotTypeVersion" // DeleteSlotTypeVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteSlotTypeVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1250,7 +1250,7 @@ const opDeleteUtterances = "DeleteUtterances" // DeleteUtterancesRequest generates a "aws/request.Request" representing the // client's request for the DeleteUtterances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1352,7 +1352,7 @@ const opGetBot = "GetBot" // GetBotRequest generates a "aws/request.Request" representing the // client's request for the GetBot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1445,7 +1445,7 @@ const opGetBotAlias = "GetBotAlias" // GetBotAliasRequest generates a "aws/request.Request" representing the // client's request for the GetBotAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1538,7 +1538,7 @@ const opGetBotAliases = "GetBotAliases" // GetBotAliasesRequest generates a "aws/request.Request" representing the // client's request for the GetBotAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1682,7 +1682,7 @@ const opGetBotChannelAssociation = "GetBotChannelAssociation" // GetBotChannelAssociationRequest generates a "aws/request.Request" representing the // client's request for the GetBotChannelAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1776,7 +1776,7 @@ const opGetBotChannelAssociations = "GetBotChannelAssociations" // GetBotChannelAssociationsRequest generates a "aws/request.Request" representing the // client's request for the GetBotChannelAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1921,7 +1921,7 @@ const opGetBotVersions = "GetBotVersions" // GetBotVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetBotVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2077,7 +2077,7 @@ const opGetBots = "GetBots" // GetBotsRequest generates a "aws/request.Request" representing the // client's request for the GetBots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2232,7 +2232,7 @@ const opGetBuiltinIntent = "GetBuiltinIntent" // GetBuiltinIntentRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2324,7 +2324,7 @@ const opGetBuiltinIntents = "GetBuiltinIntents" // GetBuiltinIntentsRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinIntents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2468,7 +2468,7 @@ const opGetBuiltinSlotTypes = "GetBuiltinSlotTypes" // GetBuiltinSlotTypesRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinSlotTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2615,7 +2615,7 @@ const opGetExport = "GetExport" // GetExportRequest generates a "aws/request.Request" representing the // client's request for the GetExport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2705,7 +2705,7 @@ const opGetImport = "GetImport" // GetImportRequest generates a "aws/request.Request" representing the // client's request for the GetImport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2795,7 +2795,7 @@ const opGetIntent = "GetIntent" // GetIntentRequest generates a "aws/request.Request" representing the // client's request for the GetIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2888,7 +2888,7 @@ const opGetIntentVersions = "GetIntentVersions" // GetIntentVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetIntentVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3044,7 +3044,7 @@ const opGetIntents = "GetIntents" // GetIntentsRequest generates a "aws/request.Request" representing the // client's request for the GetIntents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3198,7 +3198,7 @@ const opGetSlotType = "GetSlotType" // GetSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the GetSlotType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3291,7 +3291,7 @@ const opGetSlotTypeVersions = "GetSlotTypeVersions" // GetSlotTypeVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetSlotTypeVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3447,7 +3447,7 @@ const opGetSlotTypes = "GetSlotTypes" // GetSlotTypesRequest generates a "aws/request.Request" representing the // client's request for the GetSlotTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3601,7 +3601,7 @@ const opGetUtterancesView = "GetUtterancesView" // GetUtterancesViewRequest generates a "aws/request.Request" representing the // client's request for the GetUtterancesView operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3707,7 +3707,7 @@ const opPutBot = "PutBot" // PutBotRequest generates a "aws/request.Request" representing the // client's request for the PutBot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3813,7 +3813,7 @@ const opPutBotAlias = "PutBotAlias" // PutBotAliasRequest generates a "aws/request.Request" representing the // client's request for the PutBotAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3910,7 +3910,7 @@ const opPutIntent = "PutIntent" // PutIntentRequest generates a "aws/request.Request" representing the // client's request for the PutIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4048,7 +4048,7 @@ const opPutSlotType = "PutSlotType" // PutSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the PutSlotType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4154,7 +4154,7 @@ const opStartImport = "StartImport" // StartImportRequest generates a "aws/request.Request" representing the // client's request for the StartImport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 8e8583195f2..708ce92e420 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -15,7 +15,7 @@ const opAllocateStaticIp = "AllocateStaticIp" // AllocateStaticIpRequest generates a "aws/request.Request" representing the // client's request for the AllocateStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -119,7 +119,7 @@ const opAttachDisk = "AttachDisk" // AttachDiskRequest generates a "aws/request.Request" representing the // client's request for the AttachDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -224,7 +224,7 @@ const opAttachInstancesToLoadBalancer = "AttachInstancesToLoadBalancer" // AttachInstancesToLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the AttachInstancesToLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -331,7 +331,7 @@ const opAttachLoadBalancerTlsCertificate = "AttachLoadBalancerTlsCertificate" // AttachLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerTlsCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -442,7 +442,7 @@ const opAttachStaticIp = "AttachStaticIp" // AttachStaticIpRequest generates a "aws/request.Request" representing the // client's request for the AttachStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -546,7 +546,7 @@ const opCloseInstancePublicPorts = "CloseInstancePublicPorts" // CloseInstancePublicPortsRequest generates a "aws/request.Request" representing the // client's request for the CloseInstancePublicPorts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -650,7 +650,7 @@ const opCreateDisk = "CreateDisk" // CreateDiskRequest generates a "aws/request.Request" representing the // client's request for the CreateDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -757,7 +757,7 @@ const opCreateDiskFromSnapshot = "CreateDiskFromSnapshot" // CreateDiskFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDiskFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -864,7 +864,7 @@ const opCreateDiskSnapshot = "CreateDiskSnapshot" // CreateDiskSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDiskSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -981,7 +981,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1085,7 +1085,7 @@ const opCreateDomainEntry = "CreateDomainEntry" // CreateDomainEntryRequest generates a "aws/request.Request" representing the // client's request for the CreateDomainEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1190,7 +1190,7 @@ const opCreateInstanceSnapshot = "CreateInstanceSnapshot" // CreateInstanceSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1295,7 +1295,7 @@ const opCreateInstances = "CreateInstances" // CreateInstancesRequest generates a "aws/request.Request" representing the // client's request for the CreateInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1399,7 +1399,7 @@ const opCreateInstancesFromSnapshot = "CreateInstancesFromSnapshot" // CreateInstancesFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateInstancesFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1504,7 +1504,7 @@ const opCreateKeyPair = "CreateKeyPair" // CreateKeyPairRequest generates a "aws/request.Request" representing the // client's request for the CreateKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1608,7 +1608,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1719,7 +1719,7 @@ const opCreateLoadBalancerTlsCertificate = "CreateLoadBalancerTlsCertificate" // CreateLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerTlsCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1825,7 +1825,7 @@ const opDeleteDisk = "DeleteDisk" // DeleteDiskRequest generates a "aws/request.Request" representing the // client's request for the DeleteDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1932,7 +1932,7 @@ const opDeleteDiskSnapshot = "DeleteDiskSnapshot" // DeleteDiskSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDiskSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2043,7 +2043,7 @@ const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2147,7 +2147,7 @@ const opDeleteDomainEntry = "DeleteDomainEntry" // DeleteDomainEntryRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomainEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2251,7 +2251,7 @@ const opDeleteInstance = "DeleteInstance" // DeleteInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2355,7 +2355,7 @@ const opDeleteInstanceSnapshot = "DeleteInstanceSnapshot" // DeleteInstanceSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstanceSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2459,7 +2459,7 @@ const opDeleteKeyPair = "DeleteKeyPair" // DeleteKeyPairRequest generates a "aws/request.Request" representing the // client's request for the DeleteKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2563,7 +2563,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2669,7 +2669,7 @@ const opDeleteLoadBalancerTlsCertificate = "DeleteLoadBalancerTlsCertificate" // DeleteLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerTlsCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2773,7 +2773,7 @@ const opDetachDisk = "DetachDisk" // DetachDiskRequest generates a "aws/request.Request" representing the // client's request for the DetachDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2879,7 +2879,7 @@ const opDetachInstancesFromLoadBalancer = "DetachInstancesFromLoadBalancer" // DetachInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DetachInstancesFromLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2986,7 +2986,7 @@ const opDetachStaticIp = "DetachStaticIp" // DetachStaticIpRequest generates a "aws/request.Request" representing the // client's request for the DetachStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3090,7 +3090,7 @@ const opDownloadDefaultKeyPair = "DownloadDefaultKeyPair" // DownloadDefaultKeyPairRequest generates a "aws/request.Request" representing the // client's request for the DownloadDefaultKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3194,7 +3194,7 @@ const opGetActiveNames = "GetActiveNames" // GetActiveNamesRequest generates a "aws/request.Request" representing the // client's request for the GetActiveNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3298,7 +3298,7 @@ const opGetBlueprints = "GetBlueprints" // GetBlueprintsRequest generates a "aws/request.Request" representing the // client's request for the GetBlueprints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3405,7 +3405,7 @@ const opGetBundles = "GetBundles" // GetBundlesRequest generates a "aws/request.Request" representing the // client's request for the GetBundles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3510,7 +3510,7 @@ const opGetDisk = "GetDisk" // GetDiskRequest generates a "aws/request.Request" representing the // client's request for the GetDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3614,7 +3614,7 @@ const opGetDiskSnapshot = "GetDiskSnapshot" // GetDiskSnapshotRequest generates a "aws/request.Request" representing the // client's request for the GetDiskSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3718,7 +3718,7 @@ const opGetDiskSnapshots = "GetDiskSnapshots" // GetDiskSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the GetDiskSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3827,7 +3827,7 @@ const opGetDisks = "GetDisks" // GetDisksRequest generates a "aws/request.Request" representing the // client's request for the GetDisks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3936,7 +3936,7 @@ const opGetDomain = "GetDomain" // GetDomainRequest generates a "aws/request.Request" representing the // client's request for the GetDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4040,7 +4040,7 @@ const opGetDomains = "GetDomains" // GetDomainsRequest generates a "aws/request.Request" representing the // client's request for the GetDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4144,7 +4144,7 @@ const opGetInstance = "GetInstance" // GetInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4249,7 +4249,7 @@ const opGetInstanceAccessDetails = "GetInstanceAccessDetails" // GetInstanceAccessDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceAccessDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4354,7 +4354,7 @@ const opGetInstanceMetricData = "GetInstanceMetricData" // GetInstanceMetricDataRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4459,7 +4459,7 @@ const opGetInstancePortStates = "GetInstancePortStates" // GetInstancePortStatesRequest generates a "aws/request.Request" representing the // client's request for the GetInstancePortStates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4563,7 +4563,7 @@ const opGetInstanceSnapshot = "GetInstanceSnapshot" // GetInstanceSnapshotRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4667,7 +4667,7 @@ const opGetInstanceSnapshots = "GetInstanceSnapshots" // GetInstanceSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4771,7 +4771,7 @@ const opGetInstanceState = "GetInstanceState" // GetInstanceStateRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4875,7 +4875,7 @@ const opGetInstances = "GetInstances" // GetInstancesRequest generates a "aws/request.Request" representing the // client's request for the GetInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4980,7 +4980,7 @@ const opGetKeyPair = "GetKeyPair" // GetKeyPairRequest generates a "aws/request.Request" representing the // client's request for the GetKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5084,7 +5084,7 @@ const opGetKeyPairs = "GetKeyPairs" // GetKeyPairsRequest generates a "aws/request.Request" representing the // client's request for the GetKeyPairs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5188,7 +5188,7 @@ const opGetLoadBalancer = "GetLoadBalancer" // GetLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5292,7 +5292,7 @@ const opGetLoadBalancerMetricData = "GetLoadBalancerMetricData" // GetLoadBalancerMetricDataRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancerMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5396,7 +5396,7 @@ const opGetLoadBalancerTlsCertificates = "GetLoadBalancerTlsCertificates" // GetLoadBalancerTlsCertificatesRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancerTlsCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5506,7 +5506,7 @@ const opGetLoadBalancers = "GetLoadBalancers" // GetLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the GetLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5614,7 +5614,7 @@ const opGetOperation = "GetOperation" // GetOperationRequest generates a "aws/request.Request" representing the // client's request for the GetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5720,7 +5720,7 @@ const opGetOperations = "GetOperations" // GetOperationsRequest generates a "aws/request.Request" representing the // client's request for the GetOperations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5828,7 +5828,7 @@ const opGetOperationsForResource = "GetOperationsForResource" // GetOperationsForResourceRequest generates a "aws/request.Request" representing the // client's request for the GetOperationsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5932,7 +5932,7 @@ const opGetRegions = "GetRegions" // GetRegionsRequest generates a "aws/request.Request" representing the // client's request for the GetRegions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6037,7 +6037,7 @@ const opGetStaticIp = "GetStaticIp" // GetStaticIpRequest generates a "aws/request.Request" representing the // client's request for the GetStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6141,7 +6141,7 @@ const opGetStaticIps = "GetStaticIps" // GetStaticIpsRequest generates a "aws/request.Request" representing the // client's request for the GetStaticIps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6245,7 +6245,7 @@ const opImportKeyPair = "ImportKeyPair" // ImportKeyPairRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6349,7 +6349,7 @@ const opIsVpcPeered = "IsVpcPeered" // IsVpcPeeredRequest generates a "aws/request.Request" representing the // client's request for the IsVpcPeered operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6453,7 +6453,7 @@ const opOpenInstancePublicPorts = "OpenInstancePublicPorts" // OpenInstancePublicPortsRequest generates a "aws/request.Request" representing the // client's request for the OpenInstancePublicPorts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6557,7 +6557,7 @@ const opPeerVpc = "PeerVpc" // PeerVpcRequest generates a "aws/request.Request" representing the // client's request for the PeerVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6661,7 +6661,7 @@ const opPutInstancePublicPorts = "PutInstancePublicPorts" // PutInstancePublicPortsRequest generates a "aws/request.Request" representing the // client's request for the PutInstancePublicPorts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6766,7 +6766,7 @@ const opRebootInstance = "RebootInstance" // RebootInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6873,7 +6873,7 @@ const opReleaseStaticIp = "ReleaseStaticIp" // ReleaseStaticIpRequest generates a "aws/request.Request" representing the // client's request for the ReleaseStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6977,7 +6977,7 @@ const opStartInstance = "StartInstance" // StartInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7082,7 +7082,7 @@ const opStopInstance = "StopInstance" // StopInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7186,7 +7186,7 @@ const opUnpeerVpc = "UnpeerVpc" // UnpeerVpcRequest generates a "aws/request.Request" representing the // client's request for the UnpeerVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7290,7 +7290,7 @@ const opUpdateDomainEntry = "UpdateDomainEntry" // UpdateDomainEntryRequest generates a "aws/request.Request" representing the // client's request for the UpdateDomainEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7394,7 +7394,7 @@ const opUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" // UpdateLoadBalancerAttributeRequest generates a "aws/request.Request" representing the // client's request for the UpdateLoadBalancerAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go index 62a12b0c1a7..f17f888c084 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go @@ -17,7 +17,7 @@ const opAssociateMemberAccount = "AssociateMemberAccount" // AssociateMemberAccountRequest generates a "aws/request.Request" representing the // client's request for the AssociateMemberAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -106,7 +106,7 @@ const opAssociateS3Resources = "AssociateS3Resources" // AssociateS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the AssociateS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -200,7 +200,7 @@ const opDisassociateMemberAccount = "DisassociateMemberAccount" // DisassociateMemberAccountRequest generates a "aws/request.Request" representing the // client's request for the DisassociateMemberAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -285,7 +285,7 @@ const opDisassociateS3Resources = "DisassociateS3Resources" // DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the DisassociateS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -374,7 +374,7 @@ const opListMemberAccounts = "ListMemberAccounts" // ListMemberAccountsRequest generates a "aws/request.Request" representing the // client's request for the ListMemberAccounts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -514,7 +514,7 @@ const opListS3Resources = "ListS3Resources" // ListS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -660,7 +660,7 @@ const opUpdateS3Resources = "UpdateS3Resources" // UpdateS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the UpdateS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go index 25ec4f84ea9..45e643c59c1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go @@ -16,7 +16,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -105,7 +105,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -194,7 +194,7 @@ const opCreateJobTemplate = "CreateJobTemplate" // CreateJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateJobTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -283,7 +283,7 @@ const opCreatePreset = "CreatePreset" // CreatePresetRequest generates a "aws/request.Request" representing the // client's request for the CreatePreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -372,7 +372,7 @@ const opCreateQueue = "CreateQueue" // CreateQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -461,7 +461,7 @@ const opDeleteJobTemplate = "DeleteJobTemplate" // DeleteJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteJobTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -549,7 +549,7 @@ const opDeletePreset = "DeletePreset" // DeletePresetRequest generates a "aws/request.Request" representing the // client's request for the DeletePreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -637,7 +637,7 @@ const opDeleteQueue = "DeleteQueue" // DeleteQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -725,7 +725,7 @@ const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -751,6 +751,12 @@ func (c *MediaConvert) DescribeEndpointsRequest(input *DescribeEndpointsInput) ( Name: opDescribeEndpoints, HTTPMethod: "POST", HTTPPath: "/2017-08-29/endpoints", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -809,12 +815,62 @@ func (c *MediaConvert) DescribeEndpointsWithContext(ctx aws.Context, input *Desc return out, req.Send() } +// DescribeEndpointsPages iterates over the pages of a DescribeEndpoints operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEndpoints method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeEndpoints operation. +// pageNum := 0 +// err := client.DescribeEndpointsPages(params, +// func(page *DescribeEndpointsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) DescribeEndpointsPages(input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool) error { + return c.DescribeEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeEndpointsPagesWithContext same as DescribeEndpointsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) DescribeEndpointsPagesWithContext(ctx aws.Context, input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeEndpointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEndpointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -902,7 +958,7 @@ const opGetJobTemplate = "GetJobTemplate" // GetJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetJobTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -990,7 +1046,7 @@ const opGetPreset = "GetPreset" // GetPresetRequest generates a "aws/request.Request" representing the // client's request for the GetPreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1078,7 +1134,7 @@ const opGetQueue = "GetQueue" // GetQueueRequest generates a "aws/request.Request" representing the // client's request for the GetQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1166,7 +1222,7 @@ const opListJobTemplates = "ListJobTemplates" // ListJobTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListJobTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1192,6 +1248,12 @@ func (c *MediaConvert) ListJobTemplatesRequest(input *ListJobTemplatesInput) (re Name: opListJobTemplates, HTTPMethod: "GET", HTTPPath: "/2017-08-29/jobTemplates", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1251,12 +1313,62 @@ func (c *MediaConvert) ListJobTemplatesWithContext(ctx aws.Context, input *ListJ return out, req.Send() } +// ListJobTemplatesPages iterates over the pages of a ListJobTemplates operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListJobTemplates method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListJobTemplates operation. +// pageNum := 0 +// err := client.ListJobTemplatesPages(params, +// func(page *ListJobTemplatesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListJobTemplatesPages(input *ListJobTemplatesInput, fn func(*ListJobTemplatesOutput, bool) bool) error { + return c.ListJobTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListJobTemplatesPagesWithContext same as ListJobTemplatesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListJobTemplatesPagesWithContext(ctx aws.Context, input *ListJobTemplatesInput, fn func(*ListJobTemplatesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListJobTemplatesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListJobTemplatesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListJobTemplatesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1282,6 +1394,12 @@ func (c *MediaConvert) ListJobsRequest(input *ListJobsInput) (req *request.Reque Name: opListJobs, HTTPMethod: "GET", HTTPPath: "/2017-08-29/jobs", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1342,12 +1460,62 @@ func (c *MediaConvert) ListJobsWithContext(ctx aws.Context, input *ListJobsInput return out, req.Send() } +// ListJobsPages iterates over the pages of a ListJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListJobs operation. +// pageNum := 0 +// err := client.ListJobsPages(params, +// func(page *ListJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListJobsPages(input *ListJobsInput, fn func(*ListJobsOutput, bool) bool) error { + return c.ListJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListJobsPagesWithContext same as ListJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, fn func(*ListJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListPresets = "ListPresets" // ListPresetsRequest generates a "aws/request.Request" representing the // client's request for the ListPresets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1373,6 +1541,12 @@ func (c *MediaConvert) ListPresetsRequest(input *ListPresetsInput) (req *request Name: opListPresets, HTTPMethod: "GET", HTTPPath: "/2017-08-29/presets", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1432,12 +1606,62 @@ func (c *MediaConvert) ListPresetsWithContext(ctx aws.Context, input *ListPreset return out, req.Send() } +// ListPresetsPages iterates over the pages of a ListPresets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPresets method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListPresets operation. +// pageNum := 0 +// err := client.ListPresetsPages(params, +// func(page *ListPresetsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListPresetsPages(input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool) error { + return c.ListPresetsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPresetsPagesWithContext same as ListPresetsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListPresetsPagesWithContext(ctx aws.Context, input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPresetsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPresetsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListQueues = "ListQueues" // ListQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1463,6 +1687,12 @@ func (c *MediaConvert) ListQueuesRequest(input *ListQueuesInput) (req *request.R Name: opListQueues, HTTPMethod: "GET", HTTPPath: "/2017-08-29/queues", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1522,12 +1752,62 @@ func (c *MediaConvert) ListQueuesWithContext(ctx aws.Context, input *ListQueuesI return out, req.Send() } +// ListQueuesPages iterates over the pages of a ListQueues operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListQueues method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListQueues operation. +// pageNum := 0 +// err := client.ListQueuesPages(params, +// func(page *ListQueuesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListQueuesPages(input *ListQueuesInput, fn func(*ListQueuesOutput, bool) bool) error { + return c.ListQueuesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListQueuesPagesWithContext same as ListQueuesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListQueuesPagesWithContext(ctx aws.Context, input *ListQueuesInput, fn func(*ListQueuesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListQueuesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListQueuesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListQueuesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1615,7 +1895,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1704,7 +1984,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1793,7 +2073,7 @@ const opUpdateJobTemplate = "UpdateJobTemplate" // UpdateJobTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateJobTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1881,7 +2161,7 @@ const opUpdatePreset = "UpdatePreset" // UpdatePresetRequest generates a "aws/request.Request" representing the // client's request for the UpdatePreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1969,7 +2249,7 @@ const opUpdateQueue = "UpdateQueue" // UpdateQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go index 289da76a7f0..57c016bfe61 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go @@ -15,7 +15,7 @@ const opBatchUpdateSchedule = "BatchUpdateSchedule" // BatchUpdateScheduleRequest generates a "aws/request.Request" representing the // client's request for the BatchUpdateSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -107,7 +107,7 @@ const opCreateChannel = "CreateChannel" // CreateChannelRequest generates a "aws/request.Request" representing the // client's request for the CreateChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -199,7 +199,7 @@ const opCreateInput = "CreateInput" // CreateInputRequest generates a "aws/request.Request" representing the // client's request for the CreateInput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -287,7 +287,7 @@ const opCreateInputSecurityGroup = "CreateInputSecurityGroup" // CreateInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateInputSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -375,7 +375,7 @@ const opDeleteChannel = "DeleteChannel" // DeleteChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -467,7 +467,7 @@ const opDeleteInput = "DeleteInput" // DeleteInputRequest generates a "aws/request.Request" representing the // client's request for the DeleteInput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -559,7 +559,7 @@ const opDeleteInputSecurityGroup = "DeleteInputSecurityGroup" // DeleteInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteInputSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -649,7 +649,7 @@ const opDeleteReservation = "DeleteReservation" // DeleteReservationRequest generates a "aws/request.Request" representing the // client's request for the DeleteReservation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -741,7 +741,7 @@ const opDescribeChannel = "DescribeChannel" // DescribeChannelRequest generates a "aws/request.Request" representing the // client's request for the DescribeChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -831,7 +831,7 @@ const opDescribeInput = "DescribeInput" // DescribeInputRequest generates a "aws/request.Request" representing the // client's request for the DescribeInput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -921,7 +921,7 @@ const opDescribeInputSecurityGroup = "DescribeInputSecurityGroup" // DescribeInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeInputSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1011,7 +1011,7 @@ const opDescribeOffering = "DescribeOffering" // DescribeOfferingRequest generates a "aws/request.Request" representing the // client's request for the DescribeOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1101,7 +1101,7 @@ const opDescribeReservation = "DescribeReservation" // DescribeReservationRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1191,7 +1191,7 @@ const opDescribeSchedule = "DescribeSchedule" // DescribeScheduleRequest generates a "aws/request.Request" representing the // client's request for the DescribeSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1337,7 +1337,7 @@ const opListChannels = "ListChannels" // ListChannelsRequest generates a "aws/request.Request" representing the // client's request for the ListChannels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1481,7 +1481,7 @@ const opListInputSecurityGroups = "ListInputSecurityGroups" // ListInputSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListInputSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1625,7 +1625,7 @@ const opListInputs = "ListInputs" // ListInputsRequest generates a "aws/request.Request" representing the // client's request for the ListInputs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1769,7 +1769,7 @@ const opListOfferings = "ListOfferings" // ListOfferingsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1913,7 +1913,7 @@ const opListReservations = "ListReservations" // ListReservationsRequest generates a "aws/request.Request" representing the // client's request for the ListReservations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2057,7 +2057,7 @@ const opPurchaseOffering = "PurchaseOffering" // PurchaseOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2149,7 +2149,7 @@ const opStartChannel = "StartChannel" // StartChannelRequest generates a "aws/request.Request" representing the // client's request for the StartChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2241,7 +2241,7 @@ const opStopChannel = "StopChannel" // StopChannelRequest generates a "aws/request.Request" representing the // client's request for the StopChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2333,7 +2333,7 @@ const opUpdateChannel = "UpdateChannel" // UpdateChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2423,7 +2423,7 @@ const opUpdateInput = "UpdateInput" // UpdateInputRequest generates a "aws/request.Request" representing the // client's request for the UpdateInput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2513,7 +2513,7 @@ const opUpdateInputSecurityGroup = "UpdateInputSecurityGroup" // UpdateInputSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateInputSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go index 935d8c8074a..71c179cad99 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go @@ -15,7 +15,7 @@ const opCreateChannel = "CreateChannel" // CreateChannelRequest generates a "aws/request.Request" representing the // client's request for the CreateChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -103,7 +103,7 @@ const opCreateOriginEndpoint = "CreateOriginEndpoint" // CreateOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateOriginEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -191,7 +191,7 @@ const opDeleteChannel = "DeleteChannel" // DeleteChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -279,7 +279,7 @@ const opDeleteOriginEndpoint = "DeleteOriginEndpoint" // DeleteOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteOriginEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -367,7 +367,7 @@ const opDescribeChannel = "DescribeChannel" // DescribeChannelRequest generates a "aws/request.Request" representing the // client's request for the DescribeChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -455,7 +455,7 @@ const opDescribeOriginEndpoint = "DescribeOriginEndpoint" // DescribeOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the DescribeOriginEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -543,7 +543,7 @@ const opListChannels = "ListChannels" // ListChannelsRequest generates a "aws/request.Request" representing the // client's request for the ListChannels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -687,7 +687,7 @@ const opListOriginEndpoints = "ListOriginEndpoints" // ListOriginEndpointsRequest generates a "aws/request.Request" representing the // client's request for the ListOriginEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -831,7 +831,7 @@ const opRotateChannelCredentials = "RotateChannelCredentials" // RotateChannelCredentialsRequest generates a "aws/request.Request" representing the // client's request for the RotateChannelCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -929,7 +929,7 @@ const opRotateIngestEndpointCredentials = "RotateIngestEndpointCredentials" // RotateIngestEndpointCredentialsRequest generates a "aws/request.Request" representing the // client's request for the RotateIngestEndpointCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1018,7 +1018,7 @@ const opUpdateChannel = "UpdateChannel" // UpdateChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1106,7 +1106,7 @@ const opUpdateOriginEndpoint = "UpdateOriginEndpoint" // UpdateOriginEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateOriginEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go index 5d6baf7edd2..4ee35c42e5a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go @@ -15,7 +15,7 @@ const opCreateContainer = "CreateContainer" // CreateContainerRequest generates a "aws/request.Request" representing the // client's request for the CreateContainer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -101,7 +101,7 @@ const opDeleteContainer = "DeleteContainer" // DeleteContainerRequest generates a "aws/request.Request" representing the // client's request for the DeleteContainer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -188,7 +188,7 @@ const opDeleteContainerPolicy = "DeleteContainerPolicy" // DeleteContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteContainerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -276,7 +276,7 @@ const opDeleteCorsPolicy = "DeleteCorsPolicy" // DeleteCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteCorsPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -369,7 +369,7 @@ const opDescribeContainer = "DescribeContainer" // DescribeContainerRequest generates a "aws/request.Request" representing the // client's request for the DescribeContainer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -456,7 +456,7 @@ const opGetContainerPolicy = "GetContainerPolicy" // GetContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContainerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -546,7 +546,7 @@ const opGetCorsPolicy = "GetCorsPolicy" // GetCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetCorsPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -639,7 +639,7 @@ const opListContainers = "ListContainers" // ListContainersRequest generates a "aws/request.Request" representing the // client's request for the ListContainers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -727,7 +727,7 @@ const opPutContainerPolicy = "PutContainerPolicy" // PutContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutContainerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -819,7 +819,7 @@ const opPutCorsPolicy = "PutCorsPolicy" // PutCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutCorsPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go index 8a719cdde32..e7049c480f3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go @@ -17,7 +17,7 @@ const opDeleteObject = "DeleteObject" // DeleteObjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -102,7 +102,7 @@ const opDescribeObject = "DescribeObject" // DescribeObjectRequest generates a "aws/request.Request" representing the // client's request for the DescribeObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -187,7 +187,7 @@ const opGetObject = "GetObject" // GetObjectRequest generates a "aws/request.Request" representing the // client's request for the GetObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -275,7 +275,7 @@ const opListItems = "ListItems" // ListItemsRequest generates a "aws/request.Request" representing the // client's request for the ListItems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -358,7 +358,7 @@ const opPutObject = "PutObject" // PutObjectRequest generates a "aws/request.Request" representing the // client's request for the PutObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go index f86489fa103..b92e1e8dfa5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go @@ -15,7 +15,7 @@ const opCreateBroker = "CreateBroker" // CreateBrokerRequest generates a "aws/request.Request" representing the // client's request for the CreateBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -106,7 +106,7 @@ const opCreateConfiguration = "CreateConfiguration" // CreateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -195,7 +195,7 @@ const opCreateUser = "CreateUser" // CreateUserRequest generates a "aws/request.Request" representing the // client's request for the CreateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -286,7 +286,7 @@ const opDeleteBroker = "DeleteBroker" // DeleteBrokerRequest generates a "aws/request.Request" representing the // client's request for the DeleteBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -374,7 +374,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -462,7 +462,7 @@ const opDescribeBroker = "DescribeBroker" // DescribeBrokerRequest generates a "aws/request.Request" representing the // client's request for the DescribeBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -550,7 +550,7 @@ const opDescribeConfiguration = "DescribeConfiguration" // DescribeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -638,7 +638,7 @@ const opDescribeConfigurationRevision = "DescribeConfigurationRevision" // DescribeConfigurationRevisionRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -726,7 +726,7 @@ const opDescribeUser = "DescribeUser" // DescribeUserRequest generates a "aws/request.Request" representing the // client's request for the DescribeUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -814,7 +814,7 @@ const opListBrokers = "ListBrokers" // ListBrokersRequest generates a "aws/request.Request" representing the // client's request for the ListBrokers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -899,7 +899,7 @@ const opListConfigurationRevisions = "ListConfigurationRevisions" // ListConfigurationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurationRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -987,7 +987,7 @@ const opListConfigurations = "ListConfigurations" // ListConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1072,7 +1072,7 @@ const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1160,7 +1160,7 @@ const opRebootBroker = "RebootBroker" // RebootBrokerRequest generates a "aws/request.Request" representing the // client's request for the RebootBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1248,7 +1248,7 @@ const opUpdateBroker = "UpdateBroker" // UpdateBrokerRequest generates a "aws/request.Request" representing the // client's request for the UpdateBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1339,7 +1339,7 @@ const opUpdateConfiguration = "UpdateConfiguration" // UpdateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1430,7 +1430,7 @@ const opUpdateUser = "UpdateUser" // UpdateUserRequest generates a "aws/request.Request" representing the // client's request for the UpdateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go index be502aa9094..f6209f4273b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go @@ -18,7 +18,7 @@ const opAddRoleToDBCluster = "AddRoleToDBCluster" // AddRoleToDBClusterRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -111,7 +111,7 @@ const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" // AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the AddSourceIdentifierToSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -191,7 +191,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -281,7 +281,7 @@ const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" // ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyPendingMaintenanceAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -361,7 +361,7 @@ const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" // CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -447,7 +447,7 @@ const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" // CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -595,7 +595,7 @@ const opCopyDBParameterGroup = "CopyDBParameterGroup" // CopyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -681,7 +681,7 @@ const opCreateDBCluster = "CreateDBCluster" // CreateDBClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -815,7 +815,7 @@ const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" // CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -922,7 +922,7 @@ const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" // CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1013,7 +1013,7 @@ const opCreateDBInstance = "CreateDBInstance" // CreateDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1151,7 +1151,7 @@ const opCreateDBParameterGroup = "CreateDBParameterGroup" // CreateDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1254,7 +1254,7 @@ const opCreateDBSubnetGroup = "CreateDBSubnetGroup" // CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1349,7 +1349,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1458,7 +1458,7 @@ const opDeleteDBCluster = "DeleteDBCluster" // DeleteDBClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1552,7 +1552,7 @@ const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" // DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1639,7 +1639,7 @@ const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" // DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1724,7 +1724,7 @@ const opDeleteDBInstance = "DeleteDBInstance" // DeleteDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1839,7 +1839,7 @@ const opDeleteDBParameterGroup = "DeleteDBParameterGroup" // DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1926,7 +1926,7 @@ const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" // DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2015,7 +2015,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2095,7 +2095,7 @@ const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" // DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2176,7 +2176,7 @@ const opDescribeDBClusterParameters = "DescribeDBClusterParameters" // DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2256,7 +2256,7 @@ const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttribut // DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2346,7 +2346,7 @@ const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" // DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2426,7 +2426,7 @@ const opDescribeDBClusters = "DescribeDBClusters" // DescribeDBClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2505,7 +2505,7 @@ const opDescribeDBEngineVersions = "DescribeDBEngineVersions" // DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBEngineVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2635,7 +2635,7 @@ const opDescribeDBInstances = "DescribeDBInstances" // DescribeDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2770,7 +2770,7 @@ const opDescribeDBParameterGroups = "DescribeDBParameterGroups" // DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2907,7 +2907,7 @@ const opDescribeDBParameters = "DescribeDBParameters" // DescribeDBParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3042,7 +3042,7 @@ const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" // DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3180,7 +3180,7 @@ const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterPa // DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3255,7 +3255,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3386,7 +3386,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3461,7 +3461,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3599,7 +3599,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3733,7 +3733,7 @@ const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions // DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3863,7 +3863,7 @@ const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" // DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingMaintenanceActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3943,7 +3943,7 @@ const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModificat // DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeValidDBInstanceModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4027,7 +4027,7 @@ const opFailoverDBCluster = "FailoverDBCluster" // FailoverDBClusterRequest generates a "aws/request.Request" representing the // client's request for the FailoverDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4122,7 +4122,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4207,7 +4207,7 @@ const opModifyDBCluster = "ModifyDBCluster" // ModifyDBClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4321,7 +4321,7 @@ const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" // ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4422,7 +4422,7 @@ const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" // ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4524,7 +4524,7 @@ const opModifyDBInstance = "ModifyDBInstance" // ModifyDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4657,7 +4657,7 @@ const opModifyDBParameterGroup = "ModifyDBParameterGroup" // ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4758,7 +4758,7 @@ const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" // ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4853,7 +4853,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4947,7 +4947,7 @@ const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" // PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplicaDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5029,7 +5029,7 @@ const opRebootDBInstance = "RebootDBInstance" // RebootDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5118,7 +5118,7 @@ const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" // RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the // client's request for the RemoveRoleFromDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5206,7 +5206,7 @@ const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubs // RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5286,7 +5286,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5373,7 +5373,7 @@ const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" // ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5466,7 +5466,7 @@ const opResetDBParameterGroup = "ResetDBParameterGroup" // ResetDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5556,7 +5556,7 @@ const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" // RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5697,7 +5697,7 @@ const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" // RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go index 9fac484cfee..8ca5b1407de 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go @@ -17,7 +17,7 @@ const opAssignInstance = "AssignInstance" // AssignInstanceRequest generates a "aws/request.Request" representing the // client's request for the AssignInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -113,7 +113,7 @@ const opAssignVolume = "AssignVolume" // AssignVolumeRequest generates a "aws/request.Request" representing the // client's request for the AssignVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -206,7 +206,7 @@ const opAssociateElasticIp = "AssociateElasticIp" // AssociateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the AssociateElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -297,7 +297,7 @@ const opAttachElasticLoadBalancer = "AttachElasticLoadBalancer" // AttachElasticLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the AttachElasticLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -393,7 +393,7 @@ const opCloneStack = "CloneStack" // CloneStackRequest generates a "aws/request.Request" representing the // client's request for the CloneStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -481,7 +481,7 @@ const opCreateApp = "CreateApp" // CreateAppRequest generates a "aws/request.Request" representing the // client's request for the CreateApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -569,7 +569,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -658,7 +658,7 @@ const opCreateInstance = "CreateInstance" // CreateInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -746,7 +746,7 @@ const opCreateLayer = "CreateLayer" // CreateLayerRequest generates a "aws/request.Request" representing the // client's request for the CreateLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -840,7 +840,7 @@ const opCreateStack = "CreateStack" // CreateStackRequest generates a "aws/request.Request" representing the // client's request for the CreateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -923,7 +923,7 @@ const opCreateUserProfile = "CreateUserProfile" // CreateUserProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1006,7 +1006,7 @@ const opDeleteApp = "DeleteApp" // DeleteAppRequest generates a "aws/request.Request" representing the // client's request for the DeleteApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1095,7 +1095,7 @@ const opDeleteInstance = "DeleteInstance" // DeleteInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1187,7 +1187,7 @@ const opDeleteLayer = "DeleteLayer" // DeleteLayerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1278,7 +1278,7 @@ const opDeleteStack = "DeleteStack" // DeleteStackRequest generates a "aws/request.Request" representing the // client's request for the DeleteStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1369,7 +1369,7 @@ const opDeleteUserProfile = "DeleteUserProfile" // DeleteUserProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1457,7 +1457,7 @@ const opDeregisterEcsCluster = "DeregisterEcsCluster" // DeregisterEcsClusterRequest generates a "aws/request.Request" representing the // client's request for the DeregisterEcsCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1547,7 +1547,7 @@ const opDeregisterElasticIp = "DeregisterElasticIp" // DeregisterElasticIpRequest generates a "aws/request.Request" representing the // client's request for the DeregisterElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1637,7 +1637,7 @@ const opDeregisterInstance = "DeregisterInstance" // DeregisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1728,7 +1728,7 @@ const opDeregisterRdsDbInstance = "DeregisterRdsDbInstance" // DeregisterRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterRdsDbInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1817,7 +1817,7 @@ const opDeregisterVolume = "DeregisterVolume" // DeregisterVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeregisterVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1907,7 +1907,7 @@ const opDescribeAgentVersions = "DescribeAgentVersions" // DescribeAgentVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAgentVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1991,7 +1991,7 @@ const opDescribeApps = "DescribeApps" // DescribeAppsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2080,7 +2080,7 @@ const opDescribeCommands = "DescribeCommands" // DescribeCommandsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCommands operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2169,7 +2169,7 @@ const opDescribeDeployments = "DescribeDeployments" // DescribeDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeployments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2258,7 +2258,7 @@ const opDescribeEcsClusters = "DescribeEcsClusters" // DescribeEcsClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEcsClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2406,7 +2406,7 @@ const opDescribeElasticIps = "DescribeElasticIps" // DescribeElasticIpsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticIps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2495,7 +2495,7 @@ const opDescribeElasticLoadBalancers = "DescribeElasticLoadBalancers" // DescribeElasticLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2584,7 +2584,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2673,7 +2673,7 @@ const opDescribeLayers = "DescribeLayers" // DescribeLayersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLayers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2762,7 +2762,7 @@ const opDescribeLoadBasedAutoScaling = "DescribeLoadBasedAutoScaling" // DescribeLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2851,7 +2851,7 @@ const opDescribeMyUserProfile = "DescribeMyUserProfile" // DescribeMyUserProfileRequest generates a "aws/request.Request" representing the // client's request for the DescribeMyUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2929,7 +2929,7 @@ const opDescribeOperatingSystems = "DescribeOperatingSystems" // DescribeOperatingSystemsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOperatingSystems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3003,7 +3003,7 @@ const opDescribePermissions = "DescribePermissions" // DescribePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3090,7 +3090,7 @@ const opDescribeRaidArrays = "DescribeRaidArrays" // DescribeRaidArraysRequest generates a "aws/request.Request" representing the // client's request for the DescribeRaidArrays operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3179,7 +3179,7 @@ const opDescribeRdsDbInstances = "DescribeRdsDbInstances" // DescribeRdsDbInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRdsDbInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3268,7 +3268,7 @@ const opDescribeServiceErrors = "DescribeServiceErrors" // DescribeServiceErrorsRequest generates a "aws/request.Request" representing the // client's request for the DescribeServiceErrors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3357,7 +3357,7 @@ const opDescribeStackProvisioningParameters = "DescribeStackProvisioningParamete // DescribeStackProvisioningParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackProvisioningParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3444,7 +3444,7 @@ const opDescribeStackSummary = "DescribeStackSummary" // DescribeStackSummaryRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3532,7 +3532,7 @@ const opDescribeStacks = "DescribeStacks" // DescribeStacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3619,7 +3619,7 @@ const opDescribeTimeBasedAutoScaling = "DescribeTimeBasedAutoScaling" // DescribeTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the DescribeTimeBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3708,7 +3708,7 @@ const opDescribeUserProfiles = "DescribeUserProfiles" // DescribeUserProfilesRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3794,7 +3794,7 @@ const opDescribeVolumes = "DescribeVolumes" // DescribeVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3883,7 +3883,7 @@ const opDetachElasticLoadBalancer = "DetachElasticLoadBalancer" // DetachElasticLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DetachElasticLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3969,7 +3969,7 @@ const opDisassociateElasticIp = "DisassociateElasticIp" // DisassociateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the DisassociateElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4060,7 +4060,7 @@ const opGetHostnameSuggestion = "GetHostnameSuggestion" // GetHostnameSuggestionRequest generates a "aws/request.Request" representing the // client's request for the GetHostnameSuggestion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4148,7 +4148,7 @@ const opGrantAccess = "GrantAccess" // GrantAccessRequest generates a "aws/request.Request" representing the // client's request for the GrantAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4232,7 +4232,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4314,7 +4314,7 @@ const opRebootInstance = "RebootInstance" // RebootInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4404,7 +4404,7 @@ const opRegisterEcsCluster = "RegisterEcsCluster" // RegisterEcsClusterRequest generates a "aws/request.Request" representing the // client's request for the RegisterEcsCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4493,7 +4493,7 @@ const opRegisterElasticIp = "RegisterElasticIp" // RegisterElasticIpRequest generates a "aws/request.Request" representing the // client's request for the RegisterElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4583,7 +4583,7 @@ const opRegisterInstance = "RegisterInstance" // RegisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4684,7 +4684,7 @@ const opRegisterRdsDbInstance = "RegisterRdsDbInstance" // RegisterRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterRdsDbInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4773,7 +4773,7 @@ const opRegisterVolume = "RegisterVolume" // RegisterVolumeRequest generates a "aws/request.Request" representing the // client's request for the RegisterVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4863,7 +4863,7 @@ const opSetLoadBasedAutoScaling = "SetLoadBasedAutoScaling" // SetLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4959,7 +4959,7 @@ const opSetPermission = "SetPermission" // SetPermissionRequest generates a "aws/request.Request" representing the // client's request for the SetPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5049,7 +5049,7 @@ const opSetTimeBasedAutoScaling = "SetTimeBasedAutoScaling" // SetTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the SetTimeBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5140,7 +5140,7 @@ const opStartInstance = "StartInstance" // StartInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5230,7 +5230,7 @@ const opStartStack = "StartStack" // StartStackRequest generates a "aws/request.Request" representing the // client's request for the StartStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5319,7 +5319,7 @@ const opStopInstance = "StopInstance" // StopInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5411,7 +5411,7 @@ const opStopStack = "StopStack" // StopStackRequest generates a "aws/request.Request" representing the // client's request for the StopStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5500,7 +5500,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5586,7 +5586,7 @@ const opUnassignInstance = "UnassignInstance" // UnassignInstanceRequest generates a "aws/request.Request" representing the // client's request for the UnassignInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5678,7 +5678,7 @@ const opUnassignVolume = "UnassignVolume" // UnassignVolumeRequest generates a "aws/request.Request" representing the // client's request for the UnassignVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5768,7 +5768,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5852,7 +5852,7 @@ const opUpdateApp = "UpdateApp" // UpdateAppRequest generates a "aws/request.Request" representing the // client's request for the UpdateApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5941,7 +5941,7 @@ const opUpdateElasticIp = "UpdateElasticIp" // UpdateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the UpdateElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6031,7 +6031,7 @@ const opUpdateInstance = "UpdateInstance" // UpdateInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6120,7 +6120,7 @@ const opUpdateLayer = "UpdateLayer" // UpdateLayerRequest generates a "aws/request.Request" representing the // client's request for the UpdateLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6209,7 +6209,7 @@ const opUpdateMyUserProfile = "UpdateMyUserProfile" // UpdateMyUserProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateMyUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6294,7 +6294,7 @@ const opUpdateRdsDbInstance = "UpdateRdsDbInstance" // UpdateRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateRdsDbInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6383,7 +6383,7 @@ const opUpdateStack = "UpdateStack" // UpdateStackRequest generates a "aws/request.Request" representing the // client's request for the UpdateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6472,7 +6472,7 @@ const opUpdateUserProfile = "UpdateUserProfile" // UpdateUserProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6560,7 +6560,7 @@ const opUpdateVolume = "UpdateVolume" // UpdateVolumeRequest generates a "aws/request.Request" representing the // client's request for the UpdateVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go index 9873d5e510c..974cf99b39c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go @@ -17,7 +17,7 @@ const opAcceptHandshake = "AcceptHandshake" // AcceptHandshakeRequest generates a "aws/request.Request" representing the // client's request for the AcceptHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -261,7 +261,7 @@ const opAttachPolicy = "AttachPolicy" // AttachPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -568,7 +568,7 @@ const opCancelHandshake = "CancelHandshake" // CancelHandshakeRequest generates a "aws/request.Request" representing the // client's request for the CancelHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -742,7 +742,7 @@ const opCreateAccount = "CreateAccount" // CreateAccountRequest generates a "aws/request.Request" representing the // client's request for the CreateAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1051,7 +1051,7 @@ const opCreateOrganization = "CreateOrganization" // CreateOrganizationRequest generates a "aws/request.Request" representing the // client's request for the CreateOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1320,7 +1320,7 @@ const opCreateOrganizationalUnit = "CreateOrganizationalUnit" // CreateOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the CreateOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1586,7 +1586,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1859,7 +1859,7 @@ const opDeclineHandshake = "DeclineHandshake" // DeclineHandshakeRequest generates a "aws/request.Request" representing the // client's request for the DeclineHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2034,7 +2034,7 @@ const opDeleteOrganization = "DeleteOrganization" // DeleteOrganizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2199,7 +2199,7 @@ const opDeleteOrganizationalUnit = "DeleteOrganizationalUnit" // DeleteOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2369,7 +2369,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2540,7 +2540,7 @@ const opDescribeAccount = "DescribeAccount" // DescribeAccountRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2701,7 +2701,7 @@ const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus" // DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeCreateAccountStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2861,7 +2861,7 @@ const opDescribeHandshake = "DescribeHandshake" // DescribeHandshakeRequest generates a "aws/request.Request" representing the // client's request for the DescribeHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3026,7 +3026,7 @@ const opDescribeOrganization = "DescribeOrganization" // DescribeOrganizationRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3132,7 +3132,7 @@ const opDescribeOrganizationalUnit = "DescribeOrganizationalUnit" // DescribeOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3291,7 +3291,7 @@ const opDescribePolicy = "DescribePolicy" // DescribePolicyRequest generates a "aws/request.Request" representing the // client's request for the DescribePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3450,7 +3450,7 @@ const opDetachPolicy = "DetachPolicy" // DetachPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3726,7 +3726,7 @@ const opDisableAWSServiceAccess = "DisableAWSServiceAccess" // DisableAWSServiceAccessRequest generates a "aws/request.Request" representing the // client's request for the DisableAWSServiceAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4001,7 +4001,7 @@ const opDisablePolicyType = "DisablePolicyType" // DisablePolicyTypeRequest generates a "aws/request.Request" representing the // client's request for the DisablePolicyType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4273,7 +4273,7 @@ const opEnableAWSServiceAccess = "EnableAWSServiceAccess" // EnableAWSServiceAccessRequest generates a "aws/request.Request" representing the // client's request for the EnableAWSServiceAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4545,7 +4545,7 @@ const opEnableAllFeatures = "EnableAllFeatures" // EnableAllFeaturesRequest generates a "aws/request.Request" representing the // client's request for the EnableAllFeatures operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4774,7 +4774,7 @@ const opEnablePolicyType = "EnablePolicyType" // EnablePolicyTypeRequest generates a "aws/request.Request" representing the // client's request for the EnablePolicyType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5049,7 +5049,7 @@ const opInviteAccountToOrganization = "InviteAccountToOrganization" // InviteAccountToOrganizationRequest generates a "aws/request.Request" representing the // client's request for the InviteAccountToOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5285,7 +5285,7 @@ const opLeaveOrganization = "LeaveOrganization" // LeaveOrganizationRequest generates a "aws/request.Request" representing the // client's request for the LeaveOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5576,7 +5576,7 @@ const opListAWSServiceAccessForOrganization = "ListAWSServiceAccessForOrganizati // ListAWSServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the // client's request for the ListAWSServiceAccessForOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5889,7 +5889,7 @@ const opListAccounts = "ListAccounts" // ListAccountsRequest generates a "aws/request.Request" representing the // client's request for the ListAccounts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6108,7 +6108,7 @@ const opListAccountsForParent = "ListAccountsForParent" // ListAccountsForParentRequest generates a "aws/request.Request" representing the // client's request for the ListAccountsForParent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6333,7 +6333,7 @@ const opListChildren = "ListChildren" // ListChildrenRequest generates a "aws/request.Request" representing the // client's request for the ListChildren operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6555,7 +6555,7 @@ const opListCreateAccountStatus = "ListCreateAccountStatus" // ListCreateAccountStatusRequest generates a "aws/request.Request" representing the // client's request for the ListCreateAccountStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6773,7 +6773,7 @@ const opListHandshakesForAccount = "ListHandshakesForAccount" // ListHandshakesForAccountRequest generates a "aws/request.Request" representing the // client's request for the ListHandshakesForAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6995,7 +6995,7 @@ const opListHandshakesForOrganization = "ListHandshakesForOrganization" // ListHandshakesForOrganizationRequest generates a "aws/request.Request" representing the // client's request for the ListHandshakesForOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7223,7 +7223,7 @@ const opListOrganizationalUnitsForParent = "ListOrganizationalUnitsForParent" // ListOrganizationalUnitsForParentRequest generates a "aws/request.Request" representing the // client's request for the ListOrganizationalUnitsForParent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7443,7 +7443,7 @@ const opListParents = "ListParents" // ListParentsRequest generates a "aws/request.Request" representing the // client's request for the ListParents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7668,7 +7668,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7885,7 +7885,7 @@ const opListPoliciesForTarget = "ListPoliciesForTarget" // ListPoliciesForTargetRequest generates a "aws/request.Request" representing the // client's request for the ListPoliciesForTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8107,7 +8107,7 @@ const opListRoots = "ListRoots" // ListRootsRequest generates a "aws/request.Request" representing the // client's request for the ListRoots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8330,7 +8330,7 @@ const opListTargetsForPolicy = "ListTargetsForPolicy" // ListTargetsForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8551,7 +8551,7 @@ const opMoveAccount = "MoveAccount" // MoveAccountRequest generates a "aws/request.Request" representing the // client's request for the MoveAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8729,7 +8729,7 @@ const opRemoveAccountFromOrganization = "RemoveAccountFromOrganization" // RemoveAccountFromOrganizationRequest generates a "aws/request.Request" representing the // client's request for the RemoveAccountFromOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9016,7 +9016,7 @@ const opUpdateOrganizationalUnit = "UpdateOrganizationalUnit" // UpdateOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the UpdateOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9184,7 +9184,7 @@ const opUpdatePolicy = "UpdatePolicy" // UpdatePolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go index 2346c28e555..1b9e3df5ac6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -13,7 +13,7 @@ const opCreateApp = "CreateApp" // CreateAppRequest generates a "aws/request.Request" representing the // client's request for the CreateApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -107,7 +107,7 @@ const opCreateCampaign = "CreateCampaign" // CreateCampaignRequest generates a "aws/request.Request" representing the // client's request for the CreateCampaign operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -201,7 +201,7 @@ const opCreateExportJob = "CreateExportJob" // CreateExportJobRequest generates a "aws/request.Request" representing the // client's request for the CreateExportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -295,7 +295,7 @@ const opCreateImportJob = "CreateImportJob" // CreateImportJobRequest generates a "aws/request.Request" representing the // client's request for the CreateImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -389,7 +389,7 @@ const opCreateSegment = "CreateSegment" // CreateSegmentRequest generates a "aws/request.Request" representing the // client's request for the CreateSegment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -483,7 +483,7 @@ const opDeleteAdmChannel = "DeleteAdmChannel" // DeleteAdmChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteAdmChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -577,7 +577,7 @@ const opDeleteApnsChannel = "DeleteApnsChannel" // DeleteApnsChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteApnsChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -671,7 +671,7 @@ const opDeleteApnsSandboxChannel = "DeleteApnsSandboxChannel" // DeleteApnsSandboxChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteApnsSandboxChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -765,7 +765,7 @@ const opDeleteApnsVoipChannel = "DeleteApnsVoipChannel" // DeleteApnsVoipChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteApnsVoipChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -859,7 +859,7 @@ const opDeleteApnsVoipSandboxChannel = "DeleteApnsVoipSandboxChannel" // DeleteApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteApnsVoipSandboxChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -953,7 +953,7 @@ const opDeleteApp = "DeleteApp" // DeleteAppRequest generates a "aws/request.Request" representing the // client's request for the DeleteApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1047,7 +1047,7 @@ const opDeleteBaiduChannel = "DeleteBaiduChannel" // DeleteBaiduChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteBaiduChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1141,7 +1141,7 @@ const opDeleteCampaign = "DeleteCampaign" // DeleteCampaignRequest generates a "aws/request.Request" representing the // client's request for the DeleteCampaign operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1235,7 +1235,7 @@ const opDeleteEmailChannel = "DeleteEmailChannel" // DeleteEmailChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteEmailChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1329,7 +1329,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1423,7 +1423,7 @@ const opDeleteEventStream = "DeleteEventStream" // DeleteEventStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1517,7 +1517,7 @@ const opDeleteGcmChannel = "DeleteGcmChannel" // DeleteGcmChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteGcmChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1611,7 +1611,7 @@ const opDeleteSegment = "DeleteSegment" // DeleteSegmentRequest generates a "aws/request.Request" representing the // client's request for the DeleteSegment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1705,7 +1705,7 @@ const opDeleteSmsChannel = "DeleteSmsChannel" // DeleteSmsChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteSmsChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1799,7 +1799,7 @@ const opDeleteUserEndpoints = "DeleteUserEndpoints" // DeleteUserEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1893,7 +1893,7 @@ const opGetAdmChannel = "GetAdmChannel" // GetAdmChannelRequest generates a "aws/request.Request" representing the // client's request for the GetAdmChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1987,7 +1987,7 @@ const opGetApnsChannel = "GetApnsChannel" // GetApnsChannelRequest generates a "aws/request.Request" representing the // client's request for the GetApnsChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2081,7 +2081,7 @@ const opGetApnsSandboxChannel = "GetApnsSandboxChannel" // GetApnsSandboxChannelRequest generates a "aws/request.Request" representing the // client's request for the GetApnsSandboxChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2175,7 +2175,7 @@ const opGetApnsVoipChannel = "GetApnsVoipChannel" // GetApnsVoipChannelRequest generates a "aws/request.Request" representing the // client's request for the GetApnsVoipChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2269,7 +2269,7 @@ const opGetApnsVoipSandboxChannel = "GetApnsVoipSandboxChannel" // GetApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the // client's request for the GetApnsVoipSandboxChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2363,7 +2363,7 @@ const opGetApp = "GetApp" // GetAppRequest generates a "aws/request.Request" representing the // client's request for the GetApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2457,7 +2457,7 @@ const opGetApplicationSettings = "GetApplicationSettings" // GetApplicationSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetApplicationSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2551,7 +2551,7 @@ const opGetApps = "GetApps" // GetAppsRequest generates a "aws/request.Request" representing the // client's request for the GetApps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2645,7 +2645,7 @@ const opGetBaiduChannel = "GetBaiduChannel" // GetBaiduChannelRequest generates a "aws/request.Request" representing the // client's request for the GetBaiduChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2739,7 +2739,7 @@ const opGetCampaign = "GetCampaign" // GetCampaignRequest generates a "aws/request.Request" representing the // client's request for the GetCampaign operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2833,7 +2833,7 @@ const opGetCampaignActivities = "GetCampaignActivities" // GetCampaignActivitiesRequest generates a "aws/request.Request" representing the // client's request for the GetCampaignActivities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2927,7 +2927,7 @@ const opGetCampaignVersion = "GetCampaignVersion" // GetCampaignVersionRequest generates a "aws/request.Request" representing the // client's request for the GetCampaignVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3021,7 +3021,7 @@ const opGetCampaignVersions = "GetCampaignVersions" // GetCampaignVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetCampaignVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3115,7 +3115,7 @@ const opGetCampaigns = "GetCampaigns" // GetCampaignsRequest generates a "aws/request.Request" representing the // client's request for the GetCampaigns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3209,7 +3209,7 @@ const opGetChannels = "GetChannels" // GetChannelsRequest generates a "aws/request.Request" representing the // client's request for the GetChannels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3303,7 +3303,7 @@ const opGetEmailChannel = "GetEmailChannel" // GetEmailChannelRequest generates a "aws/request.Request" representing the // client's request for the GetEmailChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3397,7 +3397,7 @@ const opGetEndpoint = "GetEndpoint" // GetEndpointRequest generates a "aws/request.Request" representing the // client's request for the GetEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3491,7 +3491,7 @@ const opGetEventStream = "GetEventStream" // GetEventStreamRequest generates a "aws/request.Request" representing the // client's request for the GetEventStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3585,7 +3585,7 @@ const opGetExportJob = "GetExportJob" // GetExportJobRequest generates a "aws/request.Request" representing the // client's request for the GetExportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3679,7 +3679,7 @@ const opGetExportJobs = "GetExportJobs" // GetExportJobsRequest generates a "aws/request.Request" representing the // client's request for the GetExportJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3773,7 +3773,7 @@ const opGetGcmChannel = "GetGcmChannel" // GetGcmChannelRequest generates a "aws/request.Request" representing the // client's request for the GetGcmChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3867,7 +3867,7 @@ const opGetImportJob = "GetImportJob" // GetImportJobRequest generates a "aws/request.Request" representing the // client's request for the GetImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3961,7 +3961,7 @@ const opGetImportJobs = "GetImportJobs" // GetImportJobsRequest generates a "aws/request.Request" representing the // client's request for the GetImportJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4055,7 +4055,7 @@ const opGetSegment = "GetSegment" // GetSegmentRequest generates a "aws/request.Request" representing the // client's request for the GetSegment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4149,7 +4149,7 @@ const opGetSegmentExportJobs = "GetSegmentExportJobs" // GetSegmentExportJobsRequest generates a "aws/request.Request" representing the // client's request for the GetSegmentExportJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4243,7 +4243,7 @@ const opGetSegmentImportJobs = "GetSegmentImportJobs" // GetSegmentImportJobsRequest generates a "aws/request.Request" representing the // client's request for the GetSegmentImportJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4337,7 +4337,7 @@ const opGetSegmentVersion = "GetSegmentVersion" // GetSegmentVersionRequest generates a "aws/request.Request" representing the // client's request for the GetSegmentVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4431,7 +4431,7 @@ const opGetSegmentVersions = "GetSegmentVersions" // GetSegmentVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetSegmentVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4525,7 +4525,7 @@ const opGetSegments = "GetSegments" // GetSegmentsRequest generates a "aws/request.Request" representing the // client's request for the GetSegments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4619,7 +4619,7 @@ const opGetSmsChannel = "GetSmsChannel" // GetSmsChannelRequest generates a "aws/request.Request" representing the // client's request for the GetSmsChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4713,7 +4713,7 @@ const opGetUserEndpoints = "GetUserEndpoints" // GetUserEndpointsRequest generates a "aws/request.Request" representing the // client's request for the GetUserEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4807,7 +4807,7 @@ const opPhoneNumberValidate = "PhoneNumberValidate" // PhoneNumberValidateRequest generates a "aws/request.Request" representing the // client's request for the PhoneNumberValidate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4901,7 +4901,7 @@ const opPutEventStream = "PutEventStream" // PutEventStreamRequest generates a "aws/request.Request" representing the // client's request for the PutEventStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4995,7 +4995,7 @@ const opPutEvents = "PutEvents" // PutEventsRequest generates a "aws/request.Request" representing the // client's request for the PutEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5090,7 +5090,7 @@ const opRemoveAttributes = "RemoveAttributes" // RemoveAttributesRequest generates a "aws/request.Request" representing the // client's request for the RemoveAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5184,7 +5184,7 @@ const opSendMessages = "SendMessages" // SendMessagesRequest generates a "aws/request.Request" representing the // client's request for the SendMessages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5278,7 +5278,7 @@ const opSendUsersMessages = "SendUsersMessages" // SendUsersMessagesRequest generates a "aws/request.Request" representing the // client's request for the SendUsersMessages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5372,7 +5372,7 @@ const opUpdateAdmChannel = "UpdateAdmChannel" // UpdateAdmChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateAdmChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5466,7 +5466,7 @@ const opUpdateApnsChannel = "UpdateApnsChannel" // UpdateApnsChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateApnsChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5560,7 +5560,7 @@ const opUpdateApnsSandboxChannel = "UpdateApnsSandboxChannel" // UpdateApnsSandboxChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateApnsSandboxChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5654,7 +5654,7 @@ const opUpdateApnsVoipChannel = "UpdateApnsVoipChannel" // UpdateApnsVoipChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateApnsVoipChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5748,7 +5748,7 @@ const opUpdateApnsVoipSandboxChannel = "UpdateApnsVoipSandboxChannel" // UpdateApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateApnsVoipSandboxChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5842,7 +5842,7 @@ const opUpdateApplicationSettings = "UpdateApplicationSettings" // UpdateApplicationSettingsRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplicationSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5936,7 +5936,7 @@ const opUpdateBaiduChannel = "UpdateBaiduChannel" // UpdateBaiduChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateBaiduChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6030,7 +6030,7 @@ const opUpdateCampaign = "UpdateCampaign" // UpdateCampaignRequest generates a "aws/request.Request" representing the // client's request for the UpdateCampaign operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6124,7 +6124,7 @@ const opUpdateEmailChannel = "UpdateEmailChannel" // UpdateEmailChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateEmailChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6218,7 +6218,7 @@ const opUpdateEndpoint = "UpdateEndpoint" // UpdateEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6312,7 +6312,7 @@ const opUpdateEndpointsBatch = "UpdateEndpointsBatch" // UpdateEndpointsBatchRequest generates a "aws/request.Request" representing the // client's request for the UpdateEndpointsBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6406,7 +6406,7 @@ const opUpdateGcmChannel = "UpdateGcmChannel" // UpdateGcmChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateGcmChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6500,7 +6500,7 @@ const opUpdateSegment = "UpdateSegment" // UpdateSegmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateSegment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6594,7 +6594,7 @@ const opUpdateSmsChannel = "UpdateSmsChannel" // UpdateSmsChannelRequest generates a "aws/request.Request" representing the // client's request for the UpdateSmsChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go index f5be2db265a..395d8c6e50d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go @@ -15,7 +15,7 @@ const opDescribeServices = "DescribeServices" // DescribeServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -168,7 +168,7 @@ const opGetAttributeValues = "GetAttributeValues" // GetAttributeValuesRequest generates a "aws/request.Request" representing the // client's request for the GetAttributeValues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -319,7 +319,7 @@ const opGetProducts = "GetProducts" // GetProductsRequest generates a "aws/request.Request" representing the // client's request for the GetProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 1d699dc9468..ff97407c848 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -18,7 +18,7 @@ const opAddRoleToDBCluster = "AddRoleToDBCluster" // AddRoleToDBClusterRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -113,7 +113,7 @@ const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" // AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the AddSourceIdentifierToSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -195,7 +195,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -287,7 +287,7 @@ const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" // ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyPendingMaintenanceAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -373,7 +373,7 @@ const opAuthorizeDBSecurityGroupIngress = "AuthorizeDBSecurityGroupIngress" // AuthorizeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeDBSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -474,7 +474,7 @@ const opBacktrackDBCluster = "BacktrackDBCluster" // BacktrackDBClusterRequest generates a "aws/request.Request" representing the // client's request for the BacktrackDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -560,7 +560,7 @@ const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" // CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -646,7 +646,7 @@ const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" // CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -801,7 +801,7 @@ const opCopyDBParameterGroup = "CopyDBParameterGroup" // CopyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -887,7 +887,7 @@ const opCopyDBSnapshot = "CopyDBSnapshot" // CopyDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -986,7 +986,7 @@ const opCopyOptionGroup = "CopyOptionGroup" // CopyOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyOptionGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1071,7 +1071,7 @@ const opCreateDBCluster = "CreateDBCluster" // CreateDBClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1208,7 +1208,7 @@ const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" // CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1318,7 +1318,7 @@ const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" // CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1411,7 +1411,7 @@ const opCreateDBInstance = "CreateDBInstance" // CreateDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1552,7 +1552,7 @@ const opCreateDBInstanceReadReplica = "CreateDBInstanceReadReplica" // CreateDBInstanceReadReplicaRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstanceReadReplica operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1702,7 +1702,7 @@ const opCreateDBParameterGroup = "CreateDBParameterGroup" // CreateDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1805,7 +1805,7 @@ const opCreateDBSecurityGroup = "CreateDBSecurityGroup" // CreateDBSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1896,7 +1896,7 @@ const opCreateDBSnapshot = "CreateDBSnapshot" // CreateDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1984,7 +1984,7 @@ const opCreateDBSubnetGroup = "CreateDBSubnetGroup" // CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2080,7 +2080,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2194,7 +2194,7 @@ const opCreateOptionGroup = "CreateOptionGroup" // CreateOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateOptionGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2276,7 +2276,7 @@ const opDeleteDBCluster = "DeleteDBCluster" // DeleteDBClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2372,7 +2372,7 @@ const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" // DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2462,7 +2462,7 @@ const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" // DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2550,7 +2550,7 @@ const opDeleteDBInstance = "DeleteDBInstance" // DeleteDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2665,7 +2665,7 @@ const opDeleteDBParameterGroup = "DeleteDBParameterGroup" // DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2752,7 +2752,7 @@ const opDeleteDBSecurityGroup = "DeleteDBSecurityGroup" // DeleteDBSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2838,7 +2838,7 @@ const opDeleteDBSnapshot = "DeleteDBSnapshot" // DeleteDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2923,7 +2923,7 @@ const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" // DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3012,7 +3012,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3095,7 +3095,7 @@ const opDeleteOptionGroup = "DeleteOptionGroup" // DeleteOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteOptionGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3179,7 +3179,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3258,7 +3258,7 @@ const opDescribeCertificates = "DescribeCertificates" // DescribeCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3337,7 +3337,7 @@ const opDescribeDBClusterBacktracks = "DescribeDBClusterBacktracks" // DescribeDBClusterBacktracksRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterBacktracks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3422,7 +3422,7 @@ const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" // DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3506,7 +3506,7 @@ const opDescribeDBClusterParameters = "DescribeDBClusterParameters" // DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3589,7 +3589,7 @@ const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttribut // DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3679,7 +3679,7 @@ const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" // DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3762,7 +3762,7 @@ const opDescribeDBClusters = "DescribeDBClusters" // DescribeDBClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3901,7 +3901,7 @@ const opDescribeDBEngineVersions = "DescribeDBEngineVersions" // DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBEngineVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4031,7 +4031,7 @@ const opDescribeDBInstances = "DescribeDBInstances" // DescribeDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4166,7 +4166,7 @@ const opDescribeDBLogFiles = "DescribeDBLogFiles" // DescribeDBLogFilesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBLogFiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4301,7 +4301,7 @@ const opDescribeDBParameterGroups = "DescribeDBParameterGroups" // DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4438,7 +4438,7 @@ const opDescribeDBParameters = "DescribeDBParameters" // DescribeDBParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4573,7 +4573,7 @@ const opDescribeDBSecurityGroups = "DescribeDBSecurityGroups" // DescribeDBSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4710,7 +4710,7 @@ const opDescribeDBSnapshotAttributes = "DescribeDBSnapshotAttributes" // DescribeDBSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSnapshotAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4800,7 +4800,7 @@ const opDescribeDBSnapshots = "DescribeDBSnapshots" // DescribeDBSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4935,7 +4935,7 @@ const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" // DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5073,7 +5073,7 @@ const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterPa // DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5151,7 +5151,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5282,7 +5282,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5359,7 +5359,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5498,7 +5498,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5632,7 +5632,7 @@ const opDescribeOptionGroupOptions = "DescribeOptionGroupOptions" // DescribeOptionGroupOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOptionGroupOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5762,7 +5762,7 @@ const opDescribeOptionGroups = "DescribeOptionGroups" // DescribeOptionGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOptionGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5897,7 +5897,7 @@ const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions // DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6027,7 +6027,7 @@ const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" // DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingMaintenanceActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6107,7 +6107,7 @@ const opDescribeReservedDBInstances = "DescribeReservedDBInstances" // DescribeReservedDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedDBInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6243,7 +6243,7 @@ const opDescribeReservedDBInstancesOfferings = "DescribeReservedDBInstancesOffer // DescribeReservedDBInstancesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedDBInstancesOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6378,7 +6378,7 @@ const opDescribeSourceRegions = "DescribeSourceRegions" // DescribeSourceRegionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSourceRegions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6454,7 +6454,7 @@ const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModificat // DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeValidDBInstanceModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6538,7 +6538,7 @@ const opDownloadDBLogFilePortion = "DownloadDBLogFilePortion" // DownloadDBLogFilePortionRequest generates a "aws/request.Request" representing the // client's request for the DownloadDBLogFilePortion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6676,7 +6676,7 @@ const opFailoverDBCluster = "FailoverDBCluster" // FailoverDBClusterRequest generates a "aws/request.Request" representing the // client's request for the FailoverDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6774,7 +6774,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6863,7 +6863,7 @@ const opModifyCurrentDBClusterCapacity = "ModifyCurrentDBClusterCapacity" // ModifyCurrentDBClusterCapacityRequest generates a "aws/request.Request" representing the // client's request for the ModifyCurrentDBClusterCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6968,7 +6968,7 @@ const opModifyDBCluster = "ModifyDBCluster" // ModifyDBClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7085,7 +7085,7 @@ const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" // ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7189,7 +7189,7 @@ const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" // ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7291,7 +7291,7 @@ const opModifyDBInstance = "ModifyDBInstance" // ModifyDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7427,7 +7427,7 @@ const opModifyDBParameterGroup = "ModifyDBParameterGroup" // ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7528,7 +7528,7 @@ const opModifyDBSnapshot = "ModifyDBSnapshot" // ModifyDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7610,7 +7610,7 @@ const opModifyDBSnapshotAttribute = "ModifyDBSnapshotAttribute" // ModifyDBSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7712,7 +7712,7 @@ const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" // ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7807,7 +7807,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7909,7 +7909,7 @@ const opModifyOptionGroup = "ModifyOptionGroup" // ModifyOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyOptionGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7991,7 +7991,7 @@ const opPromoteReadReplica = "PromoteReadReplica" // PromoteReadReplicaRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplica operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8083,7 +8083,7 @@ const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" // PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplicaDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8165,7 +8165,7 @@ const opPurchaseReservedDBInstancesOffering = "PurchaseReservedDBInstancesOfferi // PurchaseReservedDBInstancesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedDBInstancesOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8250,7 +8250,7 @@ const opRebootDBInstance = "RebootDBInstance" // RebootDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8342,7 +8342,7 @@ const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" // RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the // client's request for the RemoveRoleFromDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8433,7 +8433,7 @@ const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubs // RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8515,7 +8515,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8606,7 +8606,7 @@ const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" // ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8702,7 +8702,7 @@ const opResetDBParameterGroup = "ResetDBParameterGroup" // ResetDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8792,7 +8792,7 @@ const opRestoreDBClusterFromS3 = "RestoreDBClusterFromS3" // RestoreDBClusterFromS3Request generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromS3 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8920,7 +8920,7 @@ const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" // RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9069,7 +9069,7 @@ const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" // RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9217,7 +9217,7 @@ const opRestoreDBInstanceFromDBSnapshot = "RestoreDBInstanceFromDBSnapshot" // RestoreDBInstanceFromDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceFromDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9382,7 +9382,7 @@ const opRestoreDBInstanceFromS3 = "RestoreDBInstanceFromS3" // RestoreDBInstanceFromS3Request generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceFromS3 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9525,7 +9525,7 @@ const opRestoreDBInstanceToPointInTime = "RestoreDBInstanceToPointInTime" // RestoreDBInstanceToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9687,7 +9687,7 @@ const opRevokeDBSecurityGroupIngress = "RevokeDBSecurityGroupIngress" // RevokeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeDBSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9779,7 +9779,7 @@ const opStartDBCluster = "StartDBCluster" // StartDBClusterRequest generates a "aws/request.Request" representing the // client's request for the StartDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9868,7 +9868,7 @@ const opStartDBInstance = "StartDBInstance" // StartDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9993,7 +9993,7 @@ const opStopDBCluster = "StopDBCluster" // StopDBClusterRequest generates a "aws/request.Request" representing the // client's request for the StopDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10084,7 +10084,7 @@ const opStopDBInstance = "StopDBInstance" // StopDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index c57085cf463..ebd22cb9045 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -17,7 +17,7 @@ const opAcceptReservedNodeExchange = "AcceptReservedNodeExchange" // AcceptReservedNodeExchangeRequest generates a "aws/request.Request" representing the // client's request for the AcceptReservedNodeExchange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -117,7 +117,7 @@ const opAuthorizeClusterSecurityGroupIngress = "AuthorizeClusterSecurityGroupIng // AuthorizeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeClusterSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -226,7 +226,7 @@ const opAuthorizeSnapshotAccess = "AuthorizeSnapshotAccess" // AuthorizeSnapshotAccessRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSnapshotAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -327,7 +327,7 @@ const opCopyClusterSnapshot = "CopyClusterSnapshot" // CopyClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -430,7 +430,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -583,7 +583,7 @@ const opCreateClusterParameterGroup = "CreateClusterParameterGroup" // CreateClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -685,7 +685,7 @@ const opCreateClusterSecurityGroup = "CreateClusterSecurityGroup" // CreateClusterSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -782,7 +782,7 @@ const opCreateClusterSnapshot = "CreateClusterSnapshot" // CreateClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -884,7 +884,7 @@ const opCreateClusterSubnetGroup = "CreateClusterSubnetGroup" // CreateClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -999,7 +999,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1140,7 +1140,7 @@ const opCreateHsmClientCertificate = "CreateHsmClientCertificate" // CreateHsmClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateHsmClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1240,7 +1240,7 @@ const opCreateHsmConfiguration = "CreateHsmConfiguration" // CreateHsmConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateHsmConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1341,7 +1341,7 @@ const opCreateSnapshotCopyGrant = "CreateSnapshotCopyGrant" // CreateSnapshotCopyGrantRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshotCopyGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1445,7 +1445,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1539,7 +1539,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1645,7 +1645,7 @@ const opDeleteClusterParameterGroup = "DeleteClusterParameterGroup" // DeleteClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1733,7 +1733,7 @@ const opDeleteClusterSecurityGroup = "DeleteClusterSecurityGroup" // DeleteClusterSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1825,7 +1825,7 @@ const opDeleteClusterSnapshot = "DeleteClusterSnapshot" // DeleteClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1915,7 +1915,7 @@ const opDeleteClusterSubnetGroup = "DeleteClusterSubnetGroup" // DeleteClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2003,7 +2003,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2089,7 +2089,7 @@ const opDeleteHsmClientCertificate = "DeleteHsmClientCertificate" // DeleteHsmClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteHsmClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2174,7 +2174,7 @@ const opDeleteHsmConfiguration = "DeleteHsmConfiguration" // DeleteHsmConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteHsmConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2259,7 +2259,7 @@ const opDeleteSnapshotCopyGrant = "DeleteSnapshotCopyGrant" // DeleteSnapshotCopyGrantRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshotCopyGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2345,7 +2345,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2430,7 +2430,7 @@ const opDescribeClusterDbRevisions = "DescribeClusterDbRevisions" // DescribeClusterDbRevisionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterDbRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2509,7 +2509,7 @@ const opDescribeClusterParameterGroups = "DescribeClusterParameterGroups" // DescribeClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2665,7 +2665,7 @@ const opDescribeClusterParameters = "DescribeClusterParameters" // DescribeClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2811,7 +2811,7 @@ const opDescribeClusterSecurityGroups = "DescribeClusterSecurityGroups" // DescribeClusterSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2966,7 +2966,7 @@ const opDescribeClusterSnapshots = "DescribeClusterSnapshots" // DescribeClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3121,7 +3121,7 @@ const opDescribeClusterSubnetGroups = "DescribeClusterSubnetGroups" // DescribeClusterSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3272,7 +3272,7 @@ const opDescribeClusterTracks = "DescribeClusterTracks" // DescribeClusterTracksRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterTracks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3354,7 +3354,7 @@ const opDescribeClusterVersions = "DescribeClusterVersions" // DescribeClusterVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3488,7 +3488,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3639,7 +3639,7 @@ const opDescribeDefaultClusterParameters = "DescribeDefaultClusterParameters" // DescribeDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3773,7 +3773,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3849,7 +3849,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4000,7 +4000,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4133,7 +4133,7 @@ const opDescribeHsmClientCertificates = "DescribeHsmClientCertificates" // DescribeHsmClientCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeHsmClientCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4283,7 +4283,7 @@ const opDescribeHsmConfigurations = "DescribeHsmConfigurations" // DescribeHsmConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHsmConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4433,7 +4433,7 @@ const opDescribeLoggingStatus = "DescribeLoggingStatus" // DescribeLoggingStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoggingStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4513,7 +4513,7 @@ const opDescribeOrderableClusterOptions = "DescribeOrderableClusterOptions" // DescribeOrderableClusterOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableClusterOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4651,7 +4651,7 @@ const opDescribeReservedNodeOfferings = "DescribeReservedNodeOfferings" // DescribeReservedNodeOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedNodeOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4802,7 +4802,7 @@ const opDescribeReservedNodes = "DescribeReservedNodes" // DescribeReservedNodesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedNodes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4941,7 +4941,7 @@ const opDescribeResize = "DescribeResize" // DescribeResizeRequest generates a "aws/request.Request" representing the // client's request for the DescribeResize operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5029,7 +5029,7 @@ const opDescribeSnapshotCopyGrants = "DescribeSnapshotCopyGrants" // DescribeSnapshotCopyGrantsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotCopyGrants operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5117,7 +5117,7 @@ const opDescribeTableRestoreStatus = "DescribeTableRestoreStatus" // DescribeTableRestoreStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeTableRestoreStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5203,7 +5203,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5307,7 +5307,7 @@ const opDisableLogging = "DisableLogging" // DisableLoggingRequest generates a "aws/request.Request" representing the // client's request for the DisableLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5387,7 +5387,7 @@ const opDisableSnapshotCopy = "DisableSnapshotCopy" // DisableSnapshotCopyRequest generates a "aws/request.Request" representing the // client's request for the DisableSnapshotCopy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5480,7 +5480,7 @@ const opEnableLogging = "EnableLogging" // EnableLoggingRequest generates a "aws/request.Request" representing the // client's request for the EnableLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5576,7 +5576,7 @@ const opEnableSnapshotCopy = "EnableSnapshotCopy" // EnableSnapshotCopyRequest generates a "aws/request.Request" representing the // client's request for the EnableSnapshotCopy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5685,7 +5685,7 @@ const opGetClusterCredentials = "GetClusterCredentials" // GetClusterCredentialsRequest generates a "aws/request.Request" representing the // client's request for the GetClusterCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5790,7 +5790,7 @@ const opGetReservedNodeExchangeOfferings = "GetReservedNodeExchangeOfferings" // GetReservedNodeExchangeOfferingsRequest generates a "aws/request.Request" representing the // client's request for the GetReservedNodeExchangeOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5886,7 +5886,7 @@ const opModifyCluster = "ModifyCluster" // ModifyClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6032,7 +6032,7 @@ const opModifyClusterDbRevision = "ModifyClusterDbRevision" // ModifyClusterDbRevisionRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterDbRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6118,7 +6118,7 @@ const opModifyClusterIamRoles = "ModifyClusterIamRoles" // ModifyClusterIamRolesRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterIamRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6203,7 +6203,7 @@ const opModifyClusterParameterGroup = "ModifyClusterParameterGroup" // ModifyClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6291,7 +6291,7 @@ const opModifyClusterSubnetGroup = "ModifyClusterSubnetGroup" // ModifyClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6393,7 +6393,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6504,7 +6504,7 @@ const opModifySnapshotCopyRetentionPeriod = "ModifySnapshotCopyRetentionPeriod" // ModifySnapshotCopyRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the ModifySnapshotCopyRetentionPeriod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6593,7 +6593,7 @@ const opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" // PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedNodeOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6691,7 +6691,7 @@ const opRebootCluster = "RebootCluster" // RebootClusterRequest generates a "aws/request.Request" representing the // client's request for the RebootCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6779,7 +6779,7 @@ const opResetClusterParameterGroup = "ResetClusterParameterGroup" // ResetClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6866,7 +6866,7 @@ const opResizeCluster = "ResizeCluster" // ResizeClusterRequest generates a "aws/request.Request" representing the // client's request for the ResizeCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6989,7 +6989,7 @@ const opRestoreFromClusterSnapshot = "RestoreFromClusterSnapshot" // RestoreFromClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreFromClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7157,7 +7157,7 @@ const opRestoreTableFromClusterSnapshot = "RestoreTableFromClusterSnapshot" // RestoreTableFromClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableFromClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7269,7 +7269,7 @@ const opRevokeClusterSecurityGroupIngress = "RevokeClusterSecurityGroupIngress" // RevokeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeClusterSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7360,7 +7360,7 @@ const opRevokeSnapshotAccess = "RevokeSnapshotAccess" // RevokeSnapshotAccessRequest generates a "aws/request.Request" representing the // client's request for the RevokeSnapshotAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7453,7 +7453,7 @@ const opRotateEncryptionKey = "RotateEncryptionKey" // RotateEncryptionKeyRequest generates a "aws/request.Request" representing the // client's request for the RotateEncryptionKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index 97351a76f05..dce53c7f244 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -16,7 +16,7 @@ const opAssociateVPCWithHostedZone = "AssociateVPCWithHostedZone" // AssociateVPCWithHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the AssociateVPCWithHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -147,7 +147,7 @@ const opChangeResourceRecordSets = "ChangeResourceRecordSets" // ChangeResourceRecordSetsRequest generates a "aws/request.Request" representing the // client's request for the ChangeResourceRecordSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -322,7 +322,7 @@ const opChangeTagsForResource = "ChangeTagsForResource" // ChangeTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ChangeTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -422,7 +422,7 @@ const opCreateHealthCheck = "CreateHealthCheck" // CreateHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the CreateHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -558,7 +558,7 @@ const opCreateHostedZone = "CreateHostedZone" // CreateHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the CreateHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -732,7 +732,7 @@ const opCreateQueryLoggingConfig = "CreateQueryLoggingConfig" // CreateQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateQueryLoggingConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -933,7 +933,7 @@ const opCreateReusableDelegationSet = "CreateReusableDelegationSet" // CreateReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the CreateReusableDelegationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1085,7 +1085,7 @@ const opCreateTrafficPolicy = "CreateTrafficPolicy" // CreateTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1185,7 +1185,7 @@ const opCreateTrafficPolicyInstance = "CreateTrafficPolicyInstance" // CreateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1290,7 +1290,7 @@ const opCreateTrafficPolicyVersion = "CreateTrafficPolicyVersion" // CreateTrafficPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1397,7 +1397,7 @@ const opCreateVPCAssociationAuthorization = "CreateVPCAssociationAuthorization" // CreateVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the CreateVPCAssociationAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1503,7 +1503,7 @@ const opDeleteHealthCheck = "DeleteHealthCheck" // DeleteHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the DeleteHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1597,7 +1597,7 @@ const opDeleteHostedZone = "DeleteHostedZone" // DeleteHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the DeleteHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1721,7 +1721,7 @@ const opDeleteQueryLoggingConfig = "DeleteQueryLoggingConfig" // DeleteQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueryLoggingConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1811,7 +1811,7 @@ const opDeleteReusableDelegationSet = "DeleteReusableDelegationSet" // DeleteReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteReusableDelegationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1907,7 +1907,7 @@ const opDeleteTrafficPolicy = "DeleteTrafficPolicy" // DeleteTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrafficPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1997,7 +1997,7 @@ const opDeleteTrafficPolicyInstance = "DeleteTrafficPolicyInstance" // DeleteTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2090,7 +2090,7 @@ const opDeleteVPCAssociationAuthorization = "DeleteVPCAssociationAuthorization" // DeleteVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVPCAssociationAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2193,7 +2193,7 @@ const opDisassociateVPCFromHostedZone = "DisassociateVPCFromHostedZone" // DisassociateVPCFromHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the DisassociateVPCFromHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2293,7 +2293,7 @@ const opGetAccountLimit = "GetAccountLimit" // GetAccountLimitRequest generates a "aws/request.Request" representing the // client's request for the GetAccountLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2377,7 +2377,7 @@ const opGetChange = "GetChange" // GetChangeRequest generates a "aws/request.Request" representing the // client's request for the GetChange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2467,7 +2467,7 @@ const opGetCheckerIpRanges = "GetCheckerIpRanges" // GetCheckerIpRangesRequest generates a "aws/request.Request" representing the // client's request for the GetCheckerIpRanges operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2544,7 +2544,7 @@ const opGetGeoLocation = "GetGeoLocation" // GetGeoLocationRequest generates a "aws/request.Request" representing the // client's request for the GetGeoLocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2643,7 +2643,7 @@ const opGetHealthCheck = "GetHealthCheck" // GetHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2730,7 +2730,7 @@ const opGetHealthCheckCount = "GetHealthCheckCount" // GetHealthCheckCountRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2805,7 +2805,7 @@ const opGetHealthCheckLastFailureReason = "GetHealthCheckLastFailureReason" // GetHealthCheckLastFailureReasonRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckLastFailureReason operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2888,7 +2888,7 @@ const opGetHealthCheckStatus = "GetHealthCheckStatus" // GetHealthCheckStatusRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2971,7 +2971,7 @@ const opGetHostedZone = "GetHostedZone" // GetHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3054,7 +3054,7 @@ const opGetHostedZoneCount = "GetHostedZoneCount" // GetHostedZoneCountRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZoneCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3134,7 +3134,7 @@ const opGetHostedZoneLimit = "GetHostedZoneLimit" // GetHostedZoneLimitRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZoneLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3224,7 +3224,7 @@ const opGetQueryLoggingConfig = "GetQueryLoggingConfig" // GetQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the GetQueryLoggingConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3309,7 +3309,7 @@ const opGetReusableDelegationSet = "GetReusableDelegationSet" // GetReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the GetReusableDelegationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3395,7 +3395,7 @@ const opGetReusableDelegationSetLimit = "GetReusableDelegationSetLimit" // GetReusableDelegationSetLimitRequest generates a "aws/request.Request" representing the // client's request for the GetReusableDelegationSetLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3482,7 +3482,7 @@ const opGetTrafficPolicy = "GetTrafficPolicy" // GetTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3564,7 +3564,7 @@ const opGetTrafficPolicyInstance = "GetTrafficPolicyInstance" // GetTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3654,7 +3654,7 @@ const opGetTrafficPolicyInstanceCount = "GetTrafficPolicyInstanceCount" // GetTrafficPolicyInstanceCountRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicyInstanceCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3729,7 +3729,7 @@ const opListGeoLocations = "ListGeoLocations" // ListGeoLocationsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoLocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3813,7 +3813,7 @@ const opListHealthChecks = "ListHealthChecks" // ListHealthChecksRequest generates a "aws/request.Request" representing the // client's request for the ListHealthChecks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3953,7 +3953,7 @@ const opListHostedZones = "ListHostedZones" // ListHostedZonesRequest generates a "aws/request.Request" representing the // client's request for the ListHostedZones operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4100,7 +4100,7 @@ const opListHostedZonesByName = "ListHostedZonesByName" // ListHostedZonesByNameRequest generates a "aws/request.Request" representing the // client's request for the ListHostedZonesByName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4231,7 +4231,7 @@ const opListQueryLoggingConfigs = "ListQueryLoggingConfigs" // ListQueryLoggingConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListQueryLoggingConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4324,7 +4324,7 @@ const opListResourceRecordSets = "ListResourceRecordSets" // ListResourceRecordSetsRequest generates a "aws/request.Request" representing the // client's request for the ListResourceRecordSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4500,7 +4500,7 @@ const opListReusableDelegationSets = "ListReusableDelegationSets" // ListReusableDelegationSetsRequest generates a "aws/request.Request" representing the // client's request for the ListReusableDelegationSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4580,7 +4580,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4680,7 +4680,7 @@ const opListTagsForResources = "ListTagsForResources" // ListTagsForResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4780,7 +4780,7 @@ const opListTrafficPolicies = "ListTrafficPolicies" // ListTrafficPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4861,7 +4861,7 @@ const opListTrafficPolicyInstances = "ListTrafficPolicyInstances" // ListTrafficPolicyInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4953,7 +4953,7 @@ const opListTrafficPolicyInstancesByHostedZone = "ListTrafficPolicyInstancesByHo // ListTrafficPolicyInstancesByHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstancesByHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5048,7 +5048,7 @@ const opListTrafficPolicyInstancesByPolicy = "ListTrafficPolicyInstancesByPolicy // ListTrafficPolicyInstancesByPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstancesByPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5143,7 +5143,7 @@ const opListTrafficPolicyVersions = "ListTrafficPolicyVersions" // ListTrafficPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5227,7 +5227,7 @@ const opListVPCAssociationAuthorizations = "ListVPCAssociationAuthorizations" // ListVPCAssociationAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the ListVPCAssociationAuthorizations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5318,7 +5318,7 @@ const opTestDNSAnswer = "TestDNSAnswer" // TestDNSAnswerRequest generates a "aws/request.Request" representing the // client's request for the TestDNSAnswer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5402,7 +5402,7 @@ const opUpdateHealthCheck = "UpdateHealthCheck" // UpdateHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the UpdateHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5493,7 +5493,7 @@ const opUpdateHostedZoneComment = "UpdateHostedZoneComment" // UpdateHostedZoneCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateHostedZoneComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5575,7 +5575,7 @@ const opUpdateTrafficPolicyComment = "UpdateTrafficPolicyComment" // UpdateTrafficPolicyCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrafficPolicyComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5661,7 +5661,7 @@ const opUpdateTrafficPolicyInstance = "UpdateTrafficPolicyInstance" // UpdateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 10436195009..d5d617722e4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -27,7 +27,7 @@ const opAbortMultipartUpload = "AbortMultipartUpload" // AbortMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the AbortMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -110,7 +110,7 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload" // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -184,7 +184,7 @@ const opCopyObject = "CopyObject" // CopyObjectRequest generates a "aws/request.Request" representing the // client's request for the CopyObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -264,7 +264,7 @@ const opCreateBucket = "CreateBucket" // CreateBucketRequest generates a "aws/request.Request" representing the // client's request for the CreateBucket operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -346,7 +346,7 @@ const opCreateMultipartUpload = "CreateMultipartUpload" // CreateMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CreateMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -426,7 +426,7 @@ const opDeleteBucket = "DeleteBucket" // DeleteBucketRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucket operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -503,7 +503,7 @@ const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -580,7 +580,7 @@ const opDeleteBucketCors = "DeleteBucketCors" // DeleteBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketCors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -656,7 +656,7 @@ const opDeleteBucketEncryption = "DeleteBucketEncryption" // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -732,7 +732,7 @@ const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -809,7 +809,7 @@ const opDeleteBucketLifecycle = "DeleteBucketLifecycle" // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -885,7 +885,7 @@ const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration" // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -962,7 +962,7 @@ const opDeleteBucketPolicy = "DeleteBucketPolicy" // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1038,7 +1038,7 @@ const opDeleteBucketReplication = "DeleteBucketReplication" // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketReplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1114,7 +1114,7 @@ const opDeleteBucketTagging = "DeleteBucketTagging" // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1190,7 +1190,7 @@ const opDeleteBucketWebsite = "DeleteBucketWebsite" // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketWebsite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1266,7 +1266,7 @@ const opDeleteObject = "DeleteObject" // DeleteObjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1342,7 +1342,7 @@ const opDeleteObjectTagging = "DeleteObjectTagging" // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the DeleteObjectTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1416,7 +1416,7 @@ const opDeleteObjects = "DeleteObjects" // DeleteObjectsRequest generates a "aws/request.Request" representing the // client's request for the DeleteObjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1491,7 +1491,7 @@ const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration" // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAccelerateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1565,7 +1565,7 @@ const opGetBucketAcl = "GetBucketAcl" // GetBucketAclRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1639,7 +1639,7 @@ const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration" // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1714,7 +1714,7 @@ const opGetBucketCors = "GetBucketCors" // GetBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the GetBucketCors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1788,7 +1788,7 @@ const opGetBucketEncryption = "GetBucketEncryption" // GetBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the GetBucketEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1862,7 +1862,7 @@ const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration" // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketInventoryConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1937,7 +1937,7 @@ const opGetBucketLifecycle = "GetBucketLifecycle" // GetBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2020,7 +2020,7 @@ const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration" // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLifecycleConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2094,7 +2094,7 @@ const opGetBucketLocation = "GetBucketLocation" // GetBucketLocationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2168,7 +2168,7 @@ const opGetBucketLogging = "GetBucketLogging" // GetBucketLoggingRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2243,7 +2243,7 @@ const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration" // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketMetricsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2318,7 +2318,7 @@ const opGetBucketNotification = "GetBucketNotification" // GetBucketNotificationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2401,7 +2401,7 @@ const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2475,7 +2475,7 @@ const opGetBucketPolicy = "GetBucketPolicy" // GetBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetBucketPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2549,7 +2549,7 @@ const opGetBucketReplication = "GetBucketReplication" // GetBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketReplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2623,7 +2623,7 @@ const opGetBucketRequestPayment = "GetBucketRequestPayment" // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the // client's request for the GetBucketRequestPayment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2697,7 +2697,7 @@ const opGetBucketTagging = "GetBucketTagging" // GetBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the GetBucketTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2771,7 +2771,7 @@ const opGetBucketVersioning = "GetBucketVersioning" // GetBucketVersioningRequest generates a "aws/request.Request" representing the // client's request for the GetBucketVersioning operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2845,7 +2845,7 @@ const opGetBucketWebsite = "GetBucketWebsite" // GetBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the GetBucketWebsite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2919,7 +2919,7 @@ const opGetObject = "GetObject" // GetObjectRequest generates a "aws/request.Request" representing the // client's request for the GetObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2998,7 +2998,7 @@ const opGetObjectAcl = "GetObjectAcl" // GetObjectAclRequest generates a "aws/request.Request" representing the // client's request for the GetObjectAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3077,7 +3077,7 @@ const opGetObjectTagging = "GetObjectTagging" // GetObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the GetObjectTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3151,7 +3151,7 @@ const opGetObjectTorrent = "GetObjectTorrent" // GetObjectTorrentRequest generates a "aws/request.Request" representing the // client's request for the GetObjectTorrent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3225,7 +3225,7 @@ const opHeadBucket = "HeadBucket" // HeadBucketRequest generates a "aws/request.Request" representing the // client's request for the HeadBucket operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3307,7 +3307,7 @@ const opHeadObject = "HeadObject" // HeadObjectRequest generates a "aws/request.Request" representing the // client's request for the HeadObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3386,7 +3386,7 @@ const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations" // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3460,7 +3460,7 @@ const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations" // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListBucketInventoryConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3534,7 +3534,7 @@ const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations" // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListBucketMetricsConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3608,7 +3608,7 @@ const opListBuckets = "ListBuckets" // ListBucketsRequest generates a "aws/request.Request" representing the // client's request for the ListBuckets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3682,7 +3682,7 @@ const opListMultipartUploads = "ListMultipartUploads" // ListMultipartUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListMultipartUploads operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3812,7 +3812,7 @@ const opListObjectVersions = "ListObjectVersions" // ListObjectVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListObjectVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3942,7 +3942,7 @@ const opListObjects = "ListObjects" // ListObjectsRequest generates a "aws/request.Request" representing the // client's request for the ListObjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4079,7 +4079,7 @@ const opListObjectsV2 = "ListObjectsV2" // ListObjectsV2Request generates a "aws/request.Request" representing the // client's request for the ListObjectsV2 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4217,7 +4217,7 @@ const opListParts = "ListParts" // ListPartsRequest generates a "aws/request.Request" representing the // client's request for the ListParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4347,7 +4347,7 @@ const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration" // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAccelerateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4423,7 +4423,7 @@ const opPutBucketAcl = "PutBucketAcl" // PutBucketAclRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4499,7 +4499,7 @@ const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration" // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4576,7 +4576,7 @@ const opPutBucketCors = "PutBucketCors" // PutBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the PutBucketCors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4652,7 +4652,7 @@ const opPutBucketEncryption = "PutBucketEncryption" // PutBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the PutBucketEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4729,7 +4729,7 @@ const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration" // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketInventoryConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4806,7 +4806,7 @@ const opPutBucketLifecycle = "PutBucketLifecycle" // PutBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4891,7 +4891,7 @@ const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration" // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLifecycleConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4968,7 +4968,7 @@ const opPutBucketLogging = "PutBucketLogging" // PutBucketLoggingRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5046,7 +5046,7 @@ const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration" // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketMetricsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5123,7 +5123,7 @@ const opPutBucketNotification = "PutBucketNotification" // PutBucketNotificationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5208,7 +5208,7 @@ const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5284,7 +5284,7 @@ const opPutBucketPolicy = "PutBucketPolicy" // PutBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutBucketPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5361,7 +5361,7 @@ const opPutBucketReplication = "PutBucketReplication" // PutBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketReplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5439,7 +5439,7 @@ const opPutBucketRequestPayment = "PutBucketRequestPayment" // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the // client's request for the PutBucketRequestPayment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5519,7 +5519,7 @@ const opPutBucketTagging = "PutBucketTagging" // PutBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the PutBucketTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5595,7 +5595,7 @@ const opPutBucketVersioning = "PutBucketVersioning" // PutBucketVersioningRequest generates a "aws/request.Request" representing the // client's request for the PutBucketVersioning operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5672,7 +5672,7 @@ const opPutBucketWebsite = "PutBucketWebsite" // PutBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the PutBucketWebsite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5748,7 +5748,7 @@ const opPutObject = "PutObject" // PutObjectRequest generates a "aws/request.Request" representing the // client's request for the PutObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5822,7 +5822,7 @@ const opPutObjectAcl = "PutObjectAcl" // PutObjectAclRequest generates a "aws/request.Request" representing the // client's request for the PutObjectAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5902,7 +5902,7 @@ const opPutObjectTagging = "PutObjectTagging" // PutObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the PutObjectTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5976,7 +5976,7 @@ const opRestoreObject = "RestoreObject" // RestoreObjectRequest generates a "aws/request.Request" representing the // client's request for the RestoreObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6055,7 +6055,7 @@ const opSelectObjectContent = "SelectObjectContent" // SelectObjectContentRequest generates a "aws/request.Request" representing the // client's request for the SelectObjectContent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6137,7 +6137,7 @@ const opUploadPart = "UploadPart" // UploadPartRequest generates a "aws/request.Request" representing the // client's request for the UploadPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6217,7 +6217,7 @@ const opUploadPartCopy = "UploadPartCopy" // UploadPartCopyRequest generates a "aws/request.Request" representing the // client's request for the UploadPartCopy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go index b070e16e246..7a42fa893aa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go @@ -18,7 +18,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -99,7 +99,7 @@ const opCreateEndpoint = "CreateEndpoint" // CreateEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -206,7 +206,7 @@ const opCreateEndpointConfig = "CreateEndpointConfig" // CreateEndpointConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateEndpointConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -304,7 +304,7 @@ const opCreateHyperParameterTuningJob = "CreateHyperParameterTuningJob" // CreateHyperParameterTuningJobRequest generates a "aws/request.Request" representing the // client's request for the CreateHyperParameterTuningJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -387,7 +387,7 @@ const opCreateModel = "CreateModel" // CreateModelRequest generates a "aws/request.Request" representing the // client's request for the CreateModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -493,7 +493,7 @@ const opCreateNotebookInstance = "CreateNotebookInstance" // CreateNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateNotebookInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -609,7 +609,7 @@ const opCreateNotebookInstanceLifecycleConfig = "CreateNotebookInstanceLifecycle // CreateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateNotebookInstanceLifecycleConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -705,7 +705,7 @@ const opCreatePresignedNotebookInstanceUrl = "CreatePresignedNotebookInstanceUrl // CreatePresignedNotebookInstanceUrlRequest generates a "aws/request.Request" representing the // client's request for the CreatePresignedNotebookInstanceUrl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -792,7 +792,7 @@ const opCreateTrainingJob = "CreateTrainingJob" // CreateTrainingJobRequest generates a "aws/request.Request" representing the // client's request for the CreateTrainingJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -910,7 +910,7 @@ const opCreateTransformJob = "CreateTransformJob" // CreateTransformJobRequest generates a "aws/request.Request" representing the // client's request for the CreateTransformJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1018,7 +1018,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1099,7 +1099,7 @@ const opDeleteEndpointConfig = "DeleteEndpointConfig" // DeleteEndpointConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpointConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1177,7 +1177,7 @@ const opDeleteModel = "DeleteModel" // DeleteModelRequest generates a "aws/request.Request" representing the // client's request for the DeleteModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1256,7 +1256,7 @@ const opDeleteNotebookInstance = "DeleteNotebookInstance" // DeleteNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotebookInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1337,7 +1337,7 @@ const opDeleteNotebookInstanceLifecycleConfig = "DeleteNotebookInstanceLifecycle // DeleteNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotebookInstanceLifecycleConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1413,7 +1413,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1489,7 +1489,7 @@ const opDescribeEndpoint = "DescribeEndpoint" // DescribeEndpointRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1563,7 +1563,7 @@ const opDescribeEndpointConfig = "DescribeEndpointConfig" // DescribeEndpointConfigRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpointConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1638,7 +1638,7 @@ const opDescribeHyperParameterTuningJob = "DescribeHyperParameterTuningJob" // DescribeHyperParameterTuningJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeHyperParameterTuningJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1717,7 +1717,7 @@ const opDescribeModel = "DescribeModel" // DescribeModelRequest generates a "aws/request.Request" representing the // client's request for the DescribeModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1791,7 +1791,7 @@ const opDescribeNotebookInstance = "DescribeNotebookInstance" // DescribeNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotebookInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1865,7 +1865,7 @@ const opDescribeNotebookInstanceLifecycleConfig = "DescribeNotebookInstanceLifec // DescribeNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotebookInstanceLifecycleConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1941,7 +1941,7 @@ const opDescribeTrainingJob = "DescribeTrainingJob" // DescribeTrainingJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeTrainingJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2020,7 +2020,7 @@ const opDescribeTransformJob = "DescribeTransformJob" // DescribeTransformJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeTransformJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2099,7 +2099,7 @@ const opListEndpointConfigs = "ListEndpointConfigs" // ListEndpointConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListEndpointConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2229,7 +2229,7 @@ const opListEndpoints = "ListEndpoints" // ListEndpointsRequest generates a "aws/request.Request" representing the // client's request for the ListEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2359,7 +2359,7 @@ const opListHyperParameterTuningJobs = "ListHyperParameterTuningJobs" // ListHyperParameterTuningJobsRequest generates a "aws/request.Request" representing the // client's request for the ListHyperParameterTuningJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2490,7 +2490,7 @@ const opListModels = "ListModels" // ListModelsRequest generates a "aws/request.Request" representing the // client's request for the ListModels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2621,7 +2621,7 @@ const opListNotebookInstanceLifecycleConfigs = "ListNotebookInstanceLifecycleCon // ListNotebookInstanceLifecycleConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListNotebookInstanceLifecycleConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2752,7 +2752,7 @@ const opListNotebookInstances = "ListNotebookInstances" // ListNotebookInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListNotebookInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2883,7 +2883,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3013,7 +3013,7 @@ const opListTrainingJobs = "ListTrainingJobs" // ListTrainingJobsRequest generates a "aws/request.Request" representing the // client's request for the ListTrainingJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3143,7 +3143,7 @@ const opListTrainingJobsForHyperParameterTuningJob = "ListTrainingJobsForHyperPa // ListTrainingJobsForHyperParameterTuningJobRequest generates a "aws/request.Request" representing the // client's request for the ListTrainingJobsForHyperParameterTuningJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3279,7 +3279,7 @@ const opListTransformJobs = "ListTransformJobs" // ListTransformJobsRequest generates a "aws/request.Request" representing the // client's request for the ListTransformJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3409,7 +3409,7 @@ const opStartNotebookInstance = "StartNotebookInstance" // StartNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartNotebookInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3495,7 +3495,7 @@ const opStopHyperParameterTuningJob = "StopHyperParameterTuningJob" // StopHyperParameterTuningJobRequest generates a "aws/request.Request" representing the // client's request for the StopHyperParameterTuningJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3582,7 +3582,7 @@ const opStopNotebookInstance = "StopNotebookInstance" // StopNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopNotebookInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3665,7 +3665,7 @@ const opStopTrainingJob = "StopTrainingJob" // StopTrainingJobRequest generates a "aws/request.Request" representing the // client's request for the StopTrainingJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3758,7 +3758,7 @@ const opStopTransformJob = "StopTransformJob" // StopTransformJobRequest generates a "aws/request.Request" representing the // client's request for the StopTransformJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3844,7 +3844,7 @@ const opUpdateEndpoint = "UpdateEndpoint" // UpdateEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3934,7 +3934,7 @@ const opUpdateEndpointWeightsAndCapacities = "UpdateEndpointWeightsAndCapacities // UpdateEndpointWeightsAndCapacitiesRequest generates a "aws/request.Request" representing the // client's request for the UpdateEndpointWeightsAndCapacities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4019,7 +4019,7 @@ const opUpdateNotebookInstance = "UpdateNotebookInstance" // UpdateNotebookInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateNotebookInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4102,7 +4102,7 @@ const opUpdateNotebookInstanceLifecycleConfig = "UpdateNotebookInstanceLifecycle // UpdateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateNotebookInstanceLifecycleConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index eece96bf3b6..de553415649 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -18,7 +18,7 @@ const opCancelRotateSecret = "CancelRotateSecret" // CancelRotateSecretRequest generates a "aws/request.Request" representing the // client's request for the CancelRotateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -157,7 +157,7 @@ const opCreateSecret = "CreateSecret" // CreateSecretRequest generates a "aws/request.Request" representing the // client's request for the CreateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -342,7 +342,7 @@ const opDeleteResourcePolicy = "DeleteResourcePolicy" // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -452,7 +452,7 @@ const opDeleteSecret = "DeleteSecret" // DeleteSecretRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -585,7 +585,7 @@ const opDescribeSecret = "DescribeSecret" // DescribeSecretRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -685,7 +685,7 @@ const opGetRandomPassword = "GetRandomPassword" // GetRandomPasswordRequest generates a "aws/request.Request" representing the // client's request for the GetRandomPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -789,7 +789,7 @@ const opGetResourcePolicy = "GetResourcePolicy" // GetResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -902,7 +902,7 @@ const opGetSecretValue = "GetSecretValue" // GetSecretValueRequest generates a "aws/request.Request" representing the // client's request for the GetSecretValue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1022,7 +1022,7 @@ const opListSecretVersionIds = "ListSecretVersionIds" // ListSecretVersionIdsRequest generates a "aws/request.Request" representing the // client's request for the ListSecretVersionIds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1182,7 +1182,7 @@ const opListSecrets = "ListSecrets" // ListSecretsRequest generates a "aws/request.Request" representing the // client's request for the ListSecrets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1342,7 +1342,7 @@ const opPutResourcePolicy = "PutResourcePolicy" // PutResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1468,7 +1468,7 @@ const opPutSecretValue = "PutSecretValue" // PutSecretValueRequest generates a "aws/request.Request" representing the // client's request for the PutSecretValue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1647,7 +1647,7 @@ const opRestoreSecret = "RestoreSecret" // RestoreSecretRequest generates a "aws/request.Request" representing the // client's request for the RestoreSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1756,7 +1756,7 @@ const opRotateSecret = "RotateSecret" // RotateSecretRequest generates a "aws/request.Request" representing the // client's request for the RotateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1909,7 +1909,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2051,7 +2051,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2172,7 +2172,7 @@ const opUpdateSecret = "UpdateSecret" // UpdateSecretRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2351,7 +2351,7 @@ const opUpdateSecretVersionStage = "UpdateSecretVersionStage" // UpdateSecretVersionStageRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecretVersionStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go index 5149d9052e0..519bc56217a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go @@ -17,7 +17,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -111,7 +111,7 @@ const opCreateApplicationVersion = "CreateApplicationVersion" // CreateApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateApplicationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -204,7 +204,7 @@ const opCreateCloudFormationChangeSet = "CreateCloudFormationChangeSet" // CreateCloudFormationChangeSetRequest generates a "aws/request.Request" representing the // client's request for the CreateCloudFormationChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -294,7 +294,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -393,7 +393,7 @@ const opGetApplication = "GetApplication" // GetApplicationRequest generates a "aws/request.Request" representing the // client's request for the GetApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -487,7 +487,7 @@ const opGetApplicationPolicy = "GetApplicationPolicy" // GetApplicationPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetApplicationPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -581,7 +581,7 @@ const opListApplicationVersions = "ListApplicationVersions" // ListApplicationVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListApplicationVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -731,7 +731,7 @@ const opListApplications = "ListApplications" // ListApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -877,7 +877,7 @@ const opPutApplicationPolicy = "PutApplicationPolicy" // PutApplicationPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutApplicationPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -973,7 +973,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index 79d3abf8abb..75d03c5acc1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -16,7 +16,7 @@ const opAcceptPortfolioShare = "AcceptPortfolioShare" // AcceptPortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the AcceptPortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -103,7 +103,7 @@ const opAssociatePrincipalWithPortfolio = "AssociatePrincipalWithPortfolio" // AssociatePrincipalWithPortfolioRequest generates a "aws/request.Request" representing the // client's request for the AssociatePrincipalWithPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -190,7 +190,7 @@ const opAssociateProductWithPortfolio = "AssociateProductWithPortfolio" // AssociateProductWithPortfolioRequest generates a "aws/request.Request" representing the // client's request for the AssociateProductWithPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -277,7 +277,7 @@ const opAssociateTagOptionWithResource = "AssociateTagOptionWithResource" // AssociateTagOptionWithResourceRequest generates a "aws/request.Request" representing the // client's request for the AssociateTagOptionWithResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -377,7 +377,7 @@ const opCopyProduct = "CopyProduct" // CopyProductRequest generates a "aws/request.Request" representing the // client's request for the CopyProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -466,7 +466,7 @@ const opCreateConstraint = "CreateConstraint" // CreateConstraintRequest generates a "aws/request.Request" representing the // client's request for the CreateConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -556,7 +556,7 @@ const opCreatePortfolio = "CreatePortfolio" // CreatePortfolioRequest generates a "aws/request.Request" representing the // client's request for the CreatePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -645,7 +645,7 @@ const opCreatePortfolioShare = "CreatePortfolioShare" // CreatePortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the CreatePortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -732,7 +732,7 @@ const opCreateProduct = "CreateProduct" // CreateProductRequest generates a "aws/request.Request" representing the // client's request for the CreateProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -821,7 +821,7 @@ const opCreateProvisionedProductPlan = "CreateProvisionedProductPlan" // CreateProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the CreateProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -916,7 +916,7 @@ const opCreateProvisioningArtifact = "CreateProvisioningArtifact" // CreateProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the CreateProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1007,7 +1007,7 @@ const opCreateTagOption = "CreateTagOption" // CreateTagOptionRequest generates a "aws/request.Request" representing the // client's request for the CreateTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1096,7 +1096,7 @@ const opDeleteConstraint = "DeleteConstraint" // DeleteConstraintRequest generates a "aws/request.Request" representing the // client's request for the DeleteConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1178,7 +1178,7 @@ const opDeletePortfolio = "DeletePortfolio" // DeletePortfolioRequest generates a "aws/request.Request" representing the // client's request for the DeletePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1272,7 +1272,7 @@ const opDeletePortfolioShare = "DeletePortfolioShare" // DeletePortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the DeletePortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1351,7 +1351,7 @@ const opDeleteProduct = "DeleteProduct" // DeleteProductRequest generates a "aws/request.Request" representing the // client's request for the DeleteProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1445,7 +1445,7 @@ const opDeleteProvisionedProductPlan = "DeleteProvisionedProductPlan" // DeleteProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the DeleteProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1527,7 +1527,7 @@ const opDeleteProvisioningArtifact = "DeleteProvisioningArtifact" // DeleteProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the DeleteProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1618,7 +1618,7 @@ const opDeleteTagOption = "DeleteTagOption" // DeleteTagOptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1708,7 +1708,7 @@ const opDescribeConstraint = "DescribeConstraint" // DescribeConstraintRequest generates a "aws/request.Request" representing the // client's request for the DescribeConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1787,7 +1787,7 @@ const opDescribeCopyProductStatus = "DescribeCopyProductStatus" // DescribeCopyProductStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeCopyProductStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1866,7 +1866,7 @@ const opDescribePortfolio = "DescribePortfolio" // DescribePortfolioRequest generates a "aws/request.Request" representing the // client's request for the DescribePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1945,7 +1945,7 @@ const opDescribeProduct = "DescribeProduct" // DescribeProductRequest generates a "aws/request.Request" representing the // client's request for the DescribeProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2027,7 +2027,7 @@ const opDescribeProductAsAdmin = "DescribeProductAsAdmin" // DescribeProductAsAdminRequest generates a "aws/request.Request" representing the // client's request for the DescribeProductAsAdmin operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2107,7 +2107,7 @@ const opDescribeProductView = "DescribeProductView" // DescribeProductViewRequest generates a "aws/request.Request" representing the // client's request for the DescribeProductView operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2189,7 +2189,7 @@ const opDescribeProvisionedProduct = "DescribeProvisionedProduct" // DescribeProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisionedProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2268,7 +2268,7 @@ const opDescribeProvisionedProductPlan = "DescribeProvisionedProductPlan" // DescribeProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2350,7 +2350,7 @@ const opDescribeProvisioningArtifact = "DescribeProvisioningArtifact" // DescribeProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2430,7 +2430,7 @@ const opDescribeProvisioningParameters = "DescribeProvisioningParameters" // DescribeProvisioningParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisioningParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2520,7 +2520,7 @@ const opDescribeRecord = "DescribeRecord" // DescribeRecordRequest generates a "aws/request.Request" representing the // client's request for the DescribeRecord operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2602,7 +2602,7 @@ const opDescribeTagOption = "DescribeTagOption" // DescribeTagOptionRequest generates a "aws/request.Request" representing the // client's request for the DescribeTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2686,7 +2686,7 @@ const opDisassociatePrincipalFromPortfolio = "DisassociatePrincipalFromPortfolio // DisassociatePrincipalFromPortfolioRequest generates a "aws/request.Request" representing the // client's request for the DisassociatePrincipalFromPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2768,7 +2768,7 @@ const opDisassociateProductFromPortfolio = "DisassociateProductFromPortfolio" // DisassociateProductFromPortfolioRequest generates a "aws/request.Request" representing the // client's request for the DisassociateProductFromPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2854,7 +2854,7 @@ const opDisassociateTagOptionFromResource = "DisassociateTagOptionFromResource" // DisassociateTagOptionFromResourceRequest generates a "aws/request.Request" representing the // client's request for the DisassociateTagOptionFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2938,7 +2938,7 @@ const opExecuteProvisionedProductPlan = "ExecuteProvisionedProductPlan" // ExecuteProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the ExecuteProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3026,7 +3026,7 @@ const opListAcceptedPortfolioShares = "ListAcceptedPortfolioShares" // ListAcceptedPortfolioSharesRequest generates a "aws/request.Request" representing the // client's request for the ListAcceptedPortfolioShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3161,7 +3161,7 @@ const opListConstraintsForPortfolio = "ListConstraintsForPortfolio" // ListConstraintsForPortfolioRequest generates a "aws/request.Request" representing the // client's request for the ListConstraintsForPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3299,7 +3299,7 @@ const opListLaunchPaths = "ListLaunchPaths" // ListLaunchPathsRequest generates a "aws/request.Request" representing the // client's request for the ListLaunchPaths operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3439,7 +3439,7 @@ const opListPortfolioAccess = "ListPortfolioAccess" // ListPortfolioAccessRequest generates a "aws/request.Request" representing the // client's request for the ListPortfolioAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3518,7 +3518,7 @@ const opListPortfolios = "ListPortfolios" // ListPortfoliosRequest generates a "aws/request.Request" representing the // client's request for the ListPortfolios operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3653,7 +3653,7 @@ const opListPortfoliosForProduct = "ListPortfoliosForProduct" // ListPortfoliosForProductRequest generates a "aws/request.Request" representing the // client's request for the ListPortfoliosForProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3791,7 +3791,7 @@ const opListPrincipalsForPortfolio = "ListPrincipalsForPortfolio" // ListPrincipalsForPortfolioRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalsForPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3929,7 +3929,7 @@ const opListProvisionedProductPlans = "ListProvisionedProductPlans" // ListProvisionedProductPlansRequest generates a "aws/request.Request" representing the // client's request for the ListProvisionedProductPlans operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4012,7 +4012,7 @@ const opListProvisioningArtifacts = "ListProvisioningArtifacts" // ListProvisioningArtifactsRequest generates a "aws/request.Request" representing the // client's request for the ListProvisioningArtifacts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4095,7 +4095,7 @@ const opListRecordHistory = "ListRecordHistory" // ListRecordHistoryRequest generates a "aws/request.Request" representing the // client's request for the ListRecordHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4174,7 +4174,7 @@ const opListResourcesForTagOption = "ListResourcesForTagOption" // ListResourcesForTagOptionRequest generates a "aws/request.Request" representing the // client's request for the ListResourcesForTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4317,7 +4317,7 @@ const opListTagOptions = "ListTagOptions" // ListTagOptionsRequest generates a "aws/request.Request" representing the // client's request for the ListTagOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4457,7 +4457,7 @@ const opProvisionProduct = "ProvisionProduct" // ProvisionProductRequest generates a "aws/request.Request" representing the // client's request for the ProvisionProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4552,7 +4552,7 @@ const opRejectPortfolioShare = "RejectPortfolioShare" // RejectPortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the RejectPortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4631,7 +4631,7 @@ const opScanProvisionedProducts = "ScanProvisionedProducts" // ScanProvisionedProductsRequest generates a "aws/request.Request" representing the // client's request for the ScanProvisionedProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4712,7 +4712,7 @@ const opSearchProducts = "SearchProducts" // SearchProductsRequest generates a "aws/request.Request" representing the // client's request for the SearchProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4847,7 +4847,7 @@ const opSearchProductsAsAdmin = "SearchProductsAsAdmin" // SearchProductsAsAdminRequest generates a "aws/request.Request" representing the // client's request for the SearchProductsAsAdmin operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4985,7 +4985,7 @@ const opSearchProvisionedProducts = "SearchProvisionedProducts" // SearchProvisionedProductsRequest generates a "aws/request.Request" representing the // client's request for the SearchProvisionedProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5120,7 +5120,7 @@ const opTerminateProvisionedProduct = "TerminateProvisionedProduct" // TerminateProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the TerminateProvisionedProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5204,7 +5204,7 @@ const opUpdateConstraint = "UpdateConstraint" // UpdateConstraintRequest generates a "aws/request.Request" representing the // client's request for the UpdateConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5286,7 +5286,7 @@ const opUpdatePortfolio = "UpdatePortfolio" // UpdatePortfolioRequest generates a "aws/request.Request" representing the // client's request for the UpdatePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5380,7 +5380,7 @@ const opUpdateProduct = "UpdateProduct" // UpdateProductRequest generates a "aws/request.Request" representing the // client's request for the UpdateProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5467,7 +5467,7 @@ const opUpdateProvisionedProduct = "UpdateProvisionedProduct" // UpdateProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the UpdateProvisionedProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5556,7 +5556,7 @@ const opUpdateProvisioningArtifact = "UpdateProvisioningArtifact" // UpdateProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the UpdateProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5642,7 +5642,7 @@ const opUpdateTagOption = "UpdateTagOption" // UpdateTagOptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go index d5410ec6ea9..c9d272a6615 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go @@ -18,7 +18,7 @@ const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace" // CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePrivateDnsNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -114,7 +114,7 @@ const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace" // CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicDnsNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -210,7 +210,7 @@ const opCreateService = "CreateService" // CreateServiceRequest generates a "aws/request.Request" representing the // client's request for the CreateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -314,7 +314,7 @@ const opDeleteNamespace = "DeleteNamespace" // DeleteNamespaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -405,7 +405,7 @@ const opDeleteService = "DeleteService" // DeleteServiceRequest generates a "aws/request.Request" representing the // client's request for the DeleteService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -493,7 +493,7 @@ const opDeregisterInstance = "DeregisterInstance" // DeregisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -588,7 +588,7 @@ const opGetInstance = "GetInstance" // GetInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -675,7 +675,7 @@ const opGetInstancesHealthStatus = "GetInstancesHealthStatus" // GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the // client's request for the GetInstancesHealthStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -822,7 +822,7 @@ const opGetNamespace = "GetNamespace" // GetNamespaceRequest generates a "aws/request.Request" representing the // client's request for the GetNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -905,7 +905,7 @@ const opGetOperation = "GetOperation" // GetOperationRequest generates a "aws/request.Request" representing the // client's request for the GetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -987,7 +987,7 @@ const opGetService = "GetService" // GetServiceRequest generates a "aws/request.Request" representing the // client's request for the GetService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1070,7 +1070,7 @@ const opListInstances = "ListInstances" // ListInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1210,7 +1210,7 @@ const opListNamespaces = "ListNamespaces" // ListNamespacesRequest generates a "aws/request.Request" representing the // client's request for the ListNamespaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1347,7 +1347,7 @@ const opListOperations = "ListOperations" // ListOperationsRequest generates a "aws/request.Request" representing the // client's request for the ListOperations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1483,7 +1483,7 @@ const opListServices = "ListServices" // ListServicesRequest generates a "aws/request.Request" representing the // client's request for the ListServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1620,7 +1620,7 @@ const opRegisterInstance = "RegisterInstance" // RegisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1746,7 +1746,7 @@ const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus" // UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1835,7 +1835,7 @@ const opUpdateService = "UpdateService" // UpdateServiceRequest generates a "aws/request.Request" representing the // client's request for the UpdateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index c18664b354d..70f02210530 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -18,7 +18,7 @@ const opCloneReceiptRuleSet = "CloneReceiptRuleSet" // CloneReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CloneReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -111,7 +111,7 @@ const opCreateConfigurationSet = "CreateConfigurationSet" // CreateConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -204,7 +204,7 @@ const opCreateConfigurationSetEventDestination = "CreateConfigurationSetEventDes // CreateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSetEventDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -313,7 +313,7 @@ const opCreateConfigurationSetTrackingOptions = "CreateConfigurationSetTrackingO // CreateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSetTrackingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -410,7 +410,7 @@ const opCreateCustomVerificationEmailTemplate = "CreateCustomVerificationEmailTe // CreateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -510,7 +510,7 @@ const opCreateReceiptFilter = "CreateReceiptFilter" // CreateReceiptFilterRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -598,7 +598,7 @@ const opCreateReceiptRule = "CreateReceiptRule" // CreateReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -709,7 +709,7 @@ const opCreateReceiptRuleSet = "CreateReceiptRuleSet" // CreateReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -797,7 +797,7 @@ const opCreateTemplate = "CreateTemplate" // CreateTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -888,7 +888,7 @@ const opDeleteConfigurationSet = "DeleteConfigurationSet" // DeleteConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -971,7 +971,7 @@ const opDeleteConfigurationSetEventDestination = "DeleteConfigurationSetEventDes // DeleteConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSetEventDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1058,7 +1058,7 @@ const opDeleteConfigurationSetTrackingOptions = "DeleteConfigurationSetTrackingO // DeleteConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSetTrackingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1150,7 +1150,7 @@ const opDeleteCustomVerificationEmailTemplate = "DeleteCustomVerificationEmailTe // DeleteCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1232,7 +1232,7 @@ const opDeleteIdentity = "DeleteIdentity" // DeleteIdentityRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1309,7 +1309,7 @@ const opDeleteIdentityPolicy = "DeleteIdentityPolicy" // DeleteIdentityPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1394,7 +1394,7 @@ const opDeleteReceiptFilter = "DeleteReceiptFilter" // DeleteReceiptFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1473,7 +1473,7 @@ const opDeleteReceiptRule = "DeleteReceiptRule" // DeleteReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1557,7 +1557,7 @@ const opDeleteReceiptRuleSet = "DeleteReceiptRuleSet" // DeleteReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1643,7 +1643,7 @@ const opDeleteTemplate = "DeleteTemplate" // DeleteTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1719,7 +1719,7 @@ const opDeleteVerifiedEmailAddress = "DeleteVerifiedEmailAddress" // DeleteVerifiedEmailAddressRequest generates a "aws/request.Request" representing the // client's request for the DeleteVerifiedEmailAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1796,7 +1796,7 @@ const opDescribeActiveReceiptRuleSet = "DescribeActiveReceiptRuleSet" // DescribeActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeActiveReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1876,7 +1876,7 @@ const opDescribeConfigurationSet = "DescribeConfigurationSet" // DescribeConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1958,7 +1958,7 @@ const opDescribeReceiptRule = "DescribeReceiptRule" // DescribeReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2045,7 +2045,7 @@ const opDescribeReceiptRuleSet = "DescribeReceiptRuleSet" // DescribeReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2129,7 +2129,7 @@ const opGetAccountSendingEnabled = "GetAccountSendingEnabled" // GetAccountSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSendingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2206,7 +2206,7 @@ const opGetCustomVerificationEmailTemplate = "GetCustomVerificationEmailTemplate // GetCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2293,7 +2293,7 @@ const opGetIdentityDkimAttributes = "GetIdentityDkimAttributes" // GetIdentityDkimAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityDkimAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2388,7 +2388,7 @@ const opGetIdentityMailFromDomainAttributes = "GetIdentityMailFromDomainAttribut // GetIdentityMailFromDomainAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityMailFromDomainAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2466,7 +2466,7 @@ const opGetIdentityNotificationAttributes = "GetIdentityNotificationAttributes" // GetIdentityNotificationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityNotificationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2547,7 +2547,7 @@ const opGetIdentityPolicies = "GetIdentityPolicies" // GetIdentityPoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2633,7 +2633,7 @@ const opGetIdentityVerificationAttributes = "GetIdentityVerificationAttributes" // GetIdentityVerificationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityVerificationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2728,7 +2728,7 @@ const opGetSendQuota = "GetSendQuota" // GetSendQuotaRequest generates a "aws/request.Request" representing the // client's request for the GetSendQuota operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2804,7 +2804,7 @@ const opGetSendStatistics = "GetSendStatistics" // GetSendStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetSendStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2882,7 +2882,7 @@ const opGetTemplate = "GetTemplate" // GetTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2965,7 +2965,7 @@ const opListConfigurationSets = "ListConfigurationSets" // ListConfigurationSetsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurationSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3049,7 +3049,7 @@ const opListCustomVerificationEmailTemplates = "ListCustomVerificationEmailTempl // ListCustomVerificationEmailTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListCustomVerificationEmailTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3186,7 +3186,7 @@ const opListIdentities = "ListIdentities" // ListIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3320,7 +3320,7 @@ const opListIdentityPolicies = "ListIdentityPolicies" // ListIdentityPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3405,7 +3405,7 @@ const opListReceiptFilters = "ListReceiptFilters" // ListReceiptFiltersRequest generates a "aws/request.Request" representing the // client's request for the ListReceiptFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3485,7 +3485,7 @@ const opListReceiptRuleSets = "ListReceiptRuleSets" // ListReceiptRuleSetsRequest generates a "aws/request.Request" representing the // client's request for the ListReceiptRuleSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3567,7 +3567,7 @@ const opListTemplates = "ListTemplates" // ListTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3644,7 +3644,7 @@ const opListVerifiedEmailAddresses = "ListVerifiedEmailAddresses" // ListVerifiedEmailAddressesRequest generates a "aws/request.Request" representing the // client's request for the ListVerifiedEmailAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3719,7 +3719,7 @@ const opPutIdentityPolicy = "PutIdentityPolicy" // PutIdentityPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutIdentityPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3809,7 +3809,7 @@ const opReorderReceiptRuleSet = "ReorderReceiptRuleSet" // ReorderReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the ReorderReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3900,7 +3900,7 @@ const opSendBounce = "SendBounce" // SendBounceRequest generates a "aws/request.Request" representing the // client's request for the SendBounce operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3990,7 +3990,7 @@ const opSendBulkTemplatedEmail = "SendBulkTemplatedEmail" // SendBulkTemplatedEmailRequest generates a "aws/request.Request" representing the // client's request for the SendBulkTemplatedEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4127,7 +4127,7 @@ const opSendCustomVerificationEmail = "SendCustomVerificationEmail" // SendCustomVerificationEmailRequest generates a "aws/request.Request" representing the // client's request for the SendCustomVerificationEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4232,7 +4232,7 @@ const opSendEmail = "SendEmail" // SendEmailRequest generates a "aws/request.Request" representing the // client's request for the SendEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4365,7 +4365,7 @@ const opSendRawEmail = "SendRawEmail" // SendRawEmailRequest generates a "aws/request.Request" representing the // client's request for the SendRawEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4546,7 +4546,7 @@ const opSendTemplatedEmail = "SendTemplatedEmail" // SendTemplatedEmailRequest generates a "aws/request.Request" representing the // client's request for the SendTemplatedEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4690,7 +4690,7 @@ const opSetActiveReceiptRuleSet = "SetActiveReceiptRuleSet" // SetActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the SetActiveReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4777,7 +4777,7 @@ const opSetIdentityDkimEnabled = "SetIdentityDkimEnabled" // SetIdentityDkimEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityDkimEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4868,7 +4868,7 @@ const opSetIdentityFeedbackForwardingEnabled = "SetIdentityFeedbackForwardingEna // SetIdentityFeedbackForwardingEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityFeedbackForwardingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4953,7 +4953,7 @@ const opSetIdentityHeadersInNotificationsEnabled = "SetIdentityHeadersInNotifica // SetIdentityHeadersInNotificationsEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityHeadersInNotificationsEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5034,7 +5034,7 @@ const opSetIdentityMailFromDomain = "SetIdentityMailFromDomain" // SetIdentityMailFromDomainRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityMailFromDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5116,7 +5116,7 @@ const opSetIdentityNotificationTopic = "SetIdentityNotificationTopic" // SetIdentityNotificationTopicRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityNotificationTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5200,7 +5200,7 @@ const opSetReceiptRulePosition = "SetReceiptRulePosition" // SetReceiptRulePositionRequest generates a "aws/request.Request" representing the // client's request for the SetReceiptRulePosition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5287,7 +5287,7 @@ const opTestRenderTemplate = "TestRenderTemplate" // TestRenderTemplateRequest generates a "aws/request.Request" representing the // client's request for the TestRenderTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5379,7 +5379,7 @@ const opUpdateAccountSendingEnabled = "UpdateAccountSendingEnabled" // UpdateAccountSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccountSendingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5461,7 +5461,7 @@ const opUpdateConfigurationSetEventDestination = "UpdateConfigurationSetEventDes // UpdateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetEventDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5566,7 +5566,7 @@ const opUpdateConfigurationSetReputationMetricsEnabled = "UpdateConfigurationSet // UpdateConfigurationSetReputationMetricsEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetReputationMetricsEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5653,7 +5653,7 @@ const opUpdateConfigurationSetSendingEnabled = "UpdateConfigurationSetSendingEna // UpdateConfigurationSetSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetSendingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5740,7 +5740,7 @@ const opUpdateConfigurationSetTrackingOptions = "UpdateConfigurationSetTrackingO // UpdateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetTrackingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5836,7 +5836,7 @@ const opUpdateCustomVerificationEmailTemplate = "UpdateCustomVerificationEmailTe // UpdateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5932,7 +5932,7 @@ const opUpdateReceiptRule = "UpdateReceiptRule" // UpdateReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6040,7 +6040,7 @@ const opUpdateTemplate = "UpdateTemplate" // UpdateTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6128,7 +6128,7 @@ const opVerifyDomainDkim = "VerifyDomainDkim" // VerifyDomainDkimRequest generates a "aws/request.Request" representing the // client's request for the VerifyDomainDkim operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6216,7 +6216,7 @@ const opVerifyDomainIdentity = "VerifyDomainIdentity" // VerifyDomainIdentityRequest generates a "aws/request.Request" representing the // client's request for the VerifyDomainIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6295,7 +6295,7 @@ const opVerifyEmailAddress = "VerifyEmailAddress" // VerifyEmailAddressRequest generates a "aws/request.Request" representing the // client's request for the VerifyEmailAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6371,7 +6371,7 @@ const opVerifyEmailIdentity = "VerifyEmailIdentity" // VerifyEmailIdentityRequest generates a "aws/request.Request" representing the // client's request for the VerifyEmailIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go index 9a1b78af775..52da5bab516 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go @@ -15,7 +15,7 @@ const opCreateActivity = "CreateActivity" // CreateActivityRequest generates a "aws/request.Request" representing the // client's request for the CreateActivity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -103,7 +103,7 @@ const opCreateStateMachine = "CreateStateMachine" // CreateStateMachineRequest generates a "aws/request.Request" representing the // client's request for the CreateStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -202,7 +202,7 @@ const opDeleteActivity = "DeleteActivity" // DeleteActivityRequest generates a "aws/request.Request" representing the // client's request for the DeleteActivity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -281,7 +281,7 @@ const opDeleteStateMachine = "DeleteStateMachine" // DeleteStateMachineRequest generates a "aws/request.Request" representing the // client's request for the DeleteStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -365,7 +365,7 @@ const opDescribeActivity = "DescribeActivity" // DescribeActivityRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -447,7 +447,7 @@ const opDescribeExecution = "DescribeExecution" // DescribeExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -529,7 +529,7 @@ const opDescribeStateMachine = "DescribeStateMachine" // DescribeStateMachineRequest generates a "aws/request.Request" representing the // client's request for the DescribeStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -611,7 +611,7 @@ const opDescribeStateMachineForExecution = "DescribeStateMachineForExecution" // DescribeStateMachineForExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeStateMachineForExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -693,7 +693,7 @@ const opGetActivityTask = "GetActivityTask" // GetActivityTaskRequest generates a "aws/request.Request" representing the // client's request for the GetActivityTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -788,7 +788,7 @@ const opGetExecutionHistory = "GetExecutionHistory" // GetExecutionHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetExecutionHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -935,7 +935,7 @@ const opListActivities = "ListActivities" // ListActivitiesRequest generates a "aws/request.Request" representing the // client's request for the ListActivities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1074,7 +1074,7 @@ const opListExecutions = "ListExecutions" // ListExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1219,7 +1219,7 @@ const opListStateMachines = "ListStateMachines" // ListStateMachinesRequest generates a "aws/request.Request" representing the // client's request for the ListStateMachines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1358,7 +1358,7 @@ const opSendTaskFailure = "SendTaskFailure" // SendTaskFailureRequest generates a "aws/request.Request" representing the // client's request for the SendTaskFailure operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1441,7 +1441,7 @@ const opSendTaskHeartbeat = "SendTaskHeartbeat" // SendTaskHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the SendTaskHeartbeat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1536,7 +1536,7 @@ const opSendTaskSuccess = "SendTaskSuccess" // SendTaskSuccessRequest generates a "aws/request.Request" representing the // client's request for the SendTaskSuccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1623,7 +1623,7 @@ const opStartExecution = "StartExecution" // StartExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1723,7 +1723,7 @@ const opStopExecution = "StopExecution" // StopExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1805,7 +1805,7 @@ const opUpdateStateMachine = "UpdateStateMachine" // UpdateStateMachineRequest generates a "aws/request.Request" representing the // client's request for the UpdateStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go index ea395b956e9..372e87e3ef7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go @@ -17,7 +17,7 @@ const opBatchDeleteAttributes = "BatchDeleteAttributes" // BatchDeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -113,7 +113,7 @@ const opBatchPutAttributes = "BatchPutAttributes" // BatchPutAttributesRequest generates a "aws/request.Request" representing the // client's request for the BatchPutAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -257,7 +257,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -349,7 +349,7 @@ const opDeleteAttributes = "DeleteAttributes" // DeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -446,7 +446,7 @@ const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -529,7 +529,7 @@ const opDomainMetadata = "DomainMetadata" // DomainMetadataRequest generates a "aws/request.Request" representing the // client's request for the DomainMetadata operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -610,7 +610,7 @@ const opGetAttributes = "GetAttributes" // GetAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -701,7 +701,7 @@ const opListDomains = "ListDomains" // ListDomainsRequest generates a "aws/request.Request" representing the // client's request for the ListDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -841,7 +841,7 @@ const opPutAttributes = "PutAttributes" // PutAttributesRequest generates a "aws/request.Request" representing the // client's request for the PutAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -967,7 +967,7 @@ const opSelect = "Select" // SelectRequest generates a "aws/request.Request" representing the // client's request for the Select operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go index b69a5ed8a14..43d3f9160ef 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go @@ -17,7 +17,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -108,7 +108,7 @@ const opCheckIfPhoneNumberIsOptedOut = "CheckIfPhoneNumberIsOptedOut" // CheckIfPhoneNumberIsOptedOutRequest generates a "aws/request.Request" representing the // client's request for the CheckIfPhoneNumberIsOptedOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -202,7 +202,7 @@ const opConfirmSubscription = "ConfirmSubscription" // ConfirmSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ConfirmSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -297,7 +297,7 @@ const opCreatePlatformApplication = "CreatePlatformApplication" // CreatePlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -407,7 +407,7 @@ const opCreatePlatformEndpoint = "CreatePlatformEndpoint" // CreatePlatformEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -508,7 +508,7 @@ const opCreateTopic = "CreateTopic" // CreateTopicRequest generates a "aws/request.Request" representing the // client's request for the CreateTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -600,7 +600,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -692,7 +692,7 @@ const opDeletePlatformApplication = "DeletePlatformApplication" // DeletePlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeletePlatformApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -781,7 +781,7 @@ const opDeleteTopic = "DeleteTopic" // DeleteTopicRequest generates a "aws/request.Request" representing the // client's request for the DeleteTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -874,7 +874,7 @@ const opGetEndpointAttributes = "GetEndpointAttributes" // GetEndpointAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetEndpointAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -964,7 +964,7 @@ const opGetPlatformApplicationAttributes = "GetPlatformApplicationAttributes" // GetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetPlatformApplicationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1054,7 +1054,7 @@ const opGetSMSAttributes = "GetSMSAttributes" // GetSMSAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetSMSAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1145,7 +1145,7 @@ const opGetSubscriptionAttributes = "GetSubscriptionAttributes" // GetSubscriptionAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetSubscriptionAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1233,7 +1233,7 @@ const opGetTopicAttributes = "GetTopicAttributes" // GetTopicAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetTopicAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1322,7 +1322,7 @@ const opListEndpointsByPlatformApplication = "ListEndpointsByPlatformApplication // ListEndpointsByPlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the ListEndpointsByPlatformApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1475,7 +1475,7 @@ const opListPhoneNumbersOptedOut = "ListPhoneNumbersOptedOut" // ListPhoneNumbersOptedOutRequest generates a "aws/request.Request" representing the // client's request for the ListPhoneNumbersOptedOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1572,7 +1572,7 @@ const opListPlatformApplications = "ListPlatformApplications" // ListPlatformApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListPlatformApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1722,7 +1722,7 @@ const opListSubscriptions = "ListSubscriptions" // ListSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1868,7 +1868,7 @@ const opListSubscriptionsByTopic = "ListSubscriptionsByTopic" // ListSubscriptionsByTopicRequest generates a "aws/request.Request" representing the // client's request for the ListSubscriptionsByTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2017,7 +2017,7 @@ const opListTopics = "ListTopics" // ListTopicsRequest generates a "aws/request.Request" representing the // client's request for the ListTopics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2162,7 +2162,7 @@ const opOptInPhoneNumber = "OptInPhoneNumber" // OptInPhoneNumberRequest generates a "aws/request.Request" representing the // client's request for the OptInPhoneNumber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2254,7 +2254,7 @@ const opPublish = "Publish" // PublishRequest generates a "aws/request.Request" representing the // client's request for the Publish operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2367,7 +2367,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2457,7 +2457,7 @@ const opSetEndpointAttributes = "SetEndpointAttributes" // SetEndpointAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetEndpointAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2549,7 +2549,7 @@ const opSetPlatformApplicationAttributes = "SetPlatformApplicationAttributes" // SetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetPlatformApplicationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2643,7 +2643,7 @@ const opSetSMSAttributes = "SetSMSAttributes" // SetSMSAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetSMSAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2738,7 +2738,7 @@ const opSetSubscriptionAttributes = "SetSubscriptionAttributes" // SetSubscriptionAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetSubscriptionAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2834,7 +2834,7 @@ const opSetTopicAttributes = "SetTopicAttributes" // SetTopicAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetTopicAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2924,7 +2924,7 @@ const opSubscribe = "Subscribe" // SubscribeRequest generates a "aws/request.Request" representing the // client's request for the Subscribe operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3025,7 +3025,7 @@ const opUnsubscribe = "Unsubscribe" // UnsubscribeRequest generates a "aws/request.Request" representing the // client's request for the Unsubscribe operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go index 3cded93215a..df375a7026a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go @@ -17,7 +17,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -128,7 +128,7 @@ const opChangeMessageVisibility = "ChangeMessageVisibility" // ChangeMessageVisibilityRequest generates a "aws/request.Request" representing the // client's request for the ChangeMessageVisibility operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -244,7 +244,7 @@ const opChangeMessageVisibilityBatch = "ChangeMessageVisibilityBatch" // ChangeMessageVisibilityBatchRequest generates a "aws/request.Request" representing the // client's request for the ChangeMessageVisibilityBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -347,7 +347,7 @@ const opCreateQueue = "CreateQueue" // CreateQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -475,7 +475,7 @@ const opDeleteMessage = "DeleteMessage" // DeleteMessageRequest generates a "aws/request.Request" representing the // client's request for the DeleteMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -578,7 +578,7 @@ const opDeleteMessageBatch = "DeleteMessageBatch" // DeleteMessageBatchRequest generates a "aws/request.Request" representing the // client's request for the DeleteMessageBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -680,7 +680,7 @@ const opDeleteQueue = "DeleteQueue" // DeleteQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -772,7 +772,7 @@ const opGetQueueAttributes = "GetQueueAttributes" // GetQueueAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetQueueAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -862,7 +862,7 @@ const opGetQueueUrl = "GetQueueUrl" // GetQueueUrlRequest generates a "aws/request.Request" representing the // client's request for the GetQueueUrl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -948,7 +948,7 @@ const opListDeadLetterSourceQueues = "ListDeadLetterSourceQueues" // ListDeadLetterSourceQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListDeadLetterSourceQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1032,7 +1032,7 @@ const opListQueueTags = "ListQueueTags" // ListQueueTagsRequest generates a "aws/request.Request" representing the // client's request for the ListQueueTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1130,7 +1130,7 @@ const opListQueues = "ListQueues" // ListQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1210,7 +1210,7 @@ const opPurgeQueue = "PurgeQueue" // PurgeQueueRequest generates a "aws/request.Request" representing the // client's request for the PurgeQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1308,7 +1308,7 @@ const opReceiveMessage = "ReceiveMessage" // ReceiveMessageRequest generates a "aws/request.Request" representing the // client's request for the ReceiveMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1436,7 +1436,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1519,7 +1519,7 @@ const opSendMessage = "SendMessage" // SendMessageRequest generates a "aws/request.Request" representing the // client's request for the SendMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1609,7 +1609,7 @@ const opSendMessageBatch = "SendMessageBatch" // SendMessageBatchRequest generates a "aws/request.Request" representing the // client's request for the SendMessageBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1733,7 +1733,7 @@ const opSetQueueAttributes = "SetQueueAttributes" // SetQueueAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetQueueAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1825,7 +1825,7 @@ const opTagQueue = "TagQueue" // TagQueueRequest generates a "aws/request.Request" representing the // client's request for the TagQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1925,7 +1925,7 @@ const opUntagQueue = "UntagQueue" // UntagQueueRequest generates a "aws/request.Request" representing the // client's request for the UntagQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index aac5679835a..5c88b431470 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -16,7 +16,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -130,7 +130,7 @@ const opCancelCommand = "CancelCommand" // CancelCommandRequest generates a "aws/request.Request" representing the // client's request for the CancelCommand operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -225,12 +225,100 @@ func (c *SSM) CancelCommandWithContext(ctx aws.Context, input *CancelCommandInpu return out, req.Send() } +const opCancelMaintenanceWindowExecution = "CancelMaintenanceWindowExecution" + +// CancelMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the +// client's request for the CancelMaintenanceWindowExecution operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelMaintenanceWindowExecution for more information on using the CancelMaintenanceWindowExecution +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelMaintenanceWindowExecutionRequest method. +// req, resp := client.CancelMaintenanceWindowExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution +func (c *SSM) CancelMaintenanceWindowExecutionRequest(input *CancelMaintenanceWindowExecutionInput) (req *request.Request, output *CancelMaintenanceWindowExecutionOutput) { + op := &request.Operation{ + Name: opCancelMaintenanceWindowExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelMaintenanceWindowExecutionInput{} + } + + output = &CancelMaintenanceWindowExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelMaintenanceWindowExecution API operation for Amazon Simple Systems Manager (SSM). +// +// Stops a Maintenance Window execution that is already in progress and cancels +// any tasks in the window that have not already starting running. (Tasks already +// in progress will continue to completion.) +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation CancelMaintenanceWindowExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeDoesNotExistException "DoesNotExistException" +// Error returned when the ID specified for a resource, such as a Maintenance +// Window or Patch baseline, doesn't exist. +// +// For information about resource limits in Systems Manager, see AWS Systems +// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution +func (c *SSM) CancelMaintenanceWindowExecution(input *CancelMaintenanceWindowExecutionInput) (*CancelMaintenanceWindowExecutionOutput, error) { + req, out := c.CancelMaintenanceWindowExecutionRequest(input) + return out, req.Send() +} + +// CancelMaintenanceWindowExecutionWithContext is the same as CancelMaintenanceWindowExecution with the addition of +// the ability to pass a context and additional request options. +// +// See CancelMaintenanceWindowExecution for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) CancelMaintenanceWindowExecutionWithContext(ctx aws.Context, input *CancelMaintenanceWindowExecutionInput, opts ...request.Option) (*CancelMaintenanceWindowExecutionOutput, error) { + req, out := c.CancelMaintenanceWindowExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateActivation = "CreateActivation" // CreateActivationRequest generates a "aws/request.Request" representing the // client's request for the CreateActivation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -313,7 +401,7 @@ const opCreateAssociation = "CreateAssociation" // CreateAssociationRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -446,7 +534,7 @@ const opCreateAssociationBatch = "CreateAssociationBatch" // CreateAssociationBatchRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociationBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -579,7 +667,7 @@ const opCreateDocument = "CreateDocument" // CreateDocumentRequest generates a "aws/request.Request" representing the // client's request for the CreateDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -676,7 +764,7 @@ const opCreateMaintenanceWindow = "CreateMaintenanceWindow" // CreateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the CreateMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -766,7 +854,7 @@ const opCreatePatchBaseline = "CreatePatchBaseline" // CreatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the CreatePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -859,7 +947,7 @@ const opCreateResourceDataSync = "CreateResourceDataSync" // CreateResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -957,7 +1045,7 @@ const opDeleteActivation = "DeleteActivation" // DeleteActivationRequest generates a "aws/request.Request" representing the // client's request for the DeleteActivation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1051,7 +1139,7 @@ const opDeleteAssociation = "DeleteAssociation" // DeleteAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1160,7 +1248,7 @@ const opDeleteDocument = "DeleteDocument" // DeleteDocumentRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1254,7 +1342,7 @@ const opDeleteInventory = "DeleteInventory" // DeleteInventoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteInventory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1349,7 +1437,7 @@ const opDeleteMaintenanceWindow = "DeleteMaintenanceWindow" // DeleteMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeleteMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1428,7 +1516,7 @@ const opDeleteParameter = "DeleteParameter" // DeleteParameterRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1510,7 +1598,7 @@ const opDeleteParameters = "DeleteParameters" // DeleteParametersRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1590,7 +1678,7 @@ const opDeletePatchBaseline = "DeletePatchBaseline" // DeletePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DeletePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1673,7 +1761,7 @@ const opDeleteResourceDataSync = "DeleteResourceDataSync" // DeleteResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1758,7 +1846,7 @@ const opDeregisterManagedInstance = "DeregisterManagedInstance" // DeregisterManagedInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterManagedInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1854,7 +1942,7 @@ const opDeregisterPatchBaselineForPatchGroup = "DeregisterPatchBaselineForPatchG // DeregisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DeregisterPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1937,7 +2025,7 @@ const opDeregisterTargetFromMaintenanceWindow = "DeregisterTargetFromMaintenance // DeregisterTargetFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTargetFromMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2027,7 +2115,7 @@ const opDeregisterTaskFromMaintenanceWindow = "DeregisterTaskFromMaintenanceWind // DeregisterTaskFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTaskFromMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2113,7 +2201,7 @@ const opDescribeActivations = "DescribeActivations" // DescribeActivationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2257,7 +2345,7 @@ const opDescribeAssociation = "DescribeAssociation" // DescribeAssociationRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2366,7 +2454,7 @@ const opDescribeAssociationExecutionTargets = "DescribeAssociationExecutionTarge // DescribeAssociationExecutionTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociationExecutionTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2455,7 +2543,7 @@ const opDescribeAssociationExecutions = "DescribeAssociationExecutions" // DescribeAssociationExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociationExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2540,7 +2628,7 @@ const opDescribeAutomationExecutions = "DescribeAutomationExecutions" // DescribeAutomationExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2628,7 +2716,7 @@ const opDescribeAutomationStepExecutions = "DescribeAutomationStepExecutions" // DescribeAutomationStepExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationStepExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2721,7 +2809,7 @@ const opDescribeAvailablePatches = "DescribeAvailablePatches" // DescribeAvailablePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailablePatches operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2800,7 +2888,7 @@ const opDescribeDocument = "DescribeDocument" // DescribeDocumentRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2885,7 +2973,7 @@ const opDescribeDocumentPermission = "DescribeDocumentPermission" // DescribeDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocumentPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2973,7 +3061,7 @@ const opDescribeEffectiveInstanceAssociations = "DescribeEffectiveInstanceAssoci // DescribeEffectiveInstanceAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectiveInstanceAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3070,7 +3158,7 @@ const opDescribeEffectivePatchesForPatchBaseline = "DescribeEffectivePatchesForP // DescribeEffectivePatchesForPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectivePatchesForPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3167,7 +3255,7 @@ const opDescribeInstanceAssociationsStatus = "DescribeInstanceAssociationsStatus // DescribeInstanceAssociationsStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceAssociationsStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3264,7 +3352,7 @@ const opDescribeInstanceInformation = "DescribeInstanceInformation" // DescribeInstanceInformationRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceInformation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3432,7 +3520,7 @@ const opDescribeInstancePatchStates = "DescribeInstancePatchStates" // DescribeInstancePatchStatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3514,7 +3602,7 @@ const opDescribeInstancePatchStatesForPatchGroup = "DescribeInstancePatchStatesF // DescribeInstancePatchStatesForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStatesForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3601,7 +3689,7 @@ const opDescribeInstancePatches = "DescribeInstancePatches" // DescribeInstancePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatches operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3703,7 +3791,7 @@ const opDescribeInventoryDeletions = "DescribeInventoryDeletions" // DescribeInventoryDeletionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInventoryDeletions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3789,7 +3877,7 @@ const opDescribeMaintenanceWindowExecutionTaskInvocations = "DescribeMaintenance // DescribeMaintenanceWindowExecutionTaskInvocationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTaskInvocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3876,7 +3964,7 @@ const opDescribeMaintenanceWindowExecutionTasks = "DescribeMaintenanceWindowExec // DescribeMaintenanceWindowExecutionTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3962,7 +4050,7 @@ const opDescribeMaintenanceWindowExecutions = "DescribeMaintenanceWindowExecutio // DescribeMaintenanceWindowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4038,12 +4126,98 @@ func (c *SSM) DescribeMaintenanceWindowExecutionsWithContext(ctx aws.Context, in return out, req.Send() } +const opDescribeMaintenanceWindowSchedule = "DescribeMaintenanceWindowSchedule" + +// DescribeMaintenanceWindowScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMaintenanceWindowSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeMaintenanceWindowSchedule for more information on using the DescribeMaintenanceWindowSchedule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeMaintenanceWindowScheduleRequest method. +// req, resp := client.DescribeMaintenanceWindowScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule +func (c *SSM) DescribeMaintenanceWindowScheduleRequest(input *DescribeMaintenanceWindowScheduleInput) (req *request.Request, output *DescribeMaintenanceWindowScheduleOutput) { + op := &request.Operation{ + Name: opDescribeMaintenanceWindowSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeMaintenanceWindowScheduleInput{} + } + + output = &DescribeMaintenanceWindowScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeMaintenanceWindowSchedule API operation for Amazon Simple Systems Manager (SSM). +// +// Retrieves information about upcoming executions of a Maintenance Window. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DescribeMaintenanceWindowSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeDoesNotExistException "DoesNotExistException" +// Error returned when the ID specified for a resource, such as a Maintenance +// Window or Patch baseline, doesn't exist. +// +// For information about resource limits in Systems Manager, see AWS Systems +// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule +func (c *SSM) DescribeMaintenanceWindowSchedule(input *DescribeMaintenanceWindowScheduleInput) (*DescribeMaintenanceWindowScheduleOutput, error) { + req, out := c.DescribeMaintenanceWindowScheduleRequest(input) + return out, req.Send() +} + +// DescribeMaintenanceWindowScheduleWithContext is the same as DescribeMaintenanceWindowSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeMaintenanceWindowSchedule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DescribeMaintenanceWindowScheduleWithContext(ctx aws.Context, input *DescribeMaintenanceWindowScheduleInput, opts ...request.Option) (*DescribeMaintenanceWindowScheduleOutput, error) { + req, out := c.DescribeMaintenanceWindowScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeMaintenanceWindowTargets = "DescribeMaintenanceWindowTargets" // DescribeMaintenanceWindowTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4129,7 +4303,7 @@ const opDescribeMaintenanceWindowTasks = "DescribeMaintenanceWindowTasks" // DescribeMaintenanceWindowTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4215,7 +4389,7 @@ const opDescribeMaintenanceWindows = "DescribeMaintenanceWindows" // DescribeMaintenanceWindowsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindows operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4289,12 +4463,92 @@ func (c *SSM) DescribeMaintenanceWindowsWithContext(ctx aws.Context, input *Desc return out, req.Send() } +const opDescribeMaintenanceWindowsForTarget = "DescribeMaintenanceWindowsForTarget" + +// DescribeMaintenanceWindowsForTargetRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMaintenanceWindowsForTarget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeMaintenanceWindowsForTarget for more information on using the DescribeMaintenanceWindowsForTarget +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeMaintenanceWindowsForTargetRequest method. +// req, resp := client.DescribeMaintenanceWindowsForTargetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget +func (c *SSM) DescribeMaintenanceWindowsForTargetRequest(input *DescribeMaintenanceWindowsForTargetInput) (req *request.Request, output *DescribeMaintenanceWindowsForTargetOutput) { + op := &request.Operation{ + Name: opDescribeMaintenanceWindowsForTarget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeMaintenanceWindowsForTargetInput{} + } + + output = &DescribeMaintenanceWindowsForTargetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeMaintenanceWindowsForTarget API operation for Amazon Simple Systems Manager (SSM). +// +// Retrieves information about the Maintenance Windows targets or tasks that +// an instance is associated with. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Systems Manager (SSM)'s +// API operation DescribeMaintenanceWindowsForTarget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget +func (c *SSM) DescribeMaintenanceWindowsForTarget(input *DescribeMaintenanceWindowsForTargetInput) (*DescribeMaintenanceWindowsForTargetOutput, error) { + req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) + return out, req.Send() +} + +// DescribeMaintenanceWindowsForTargetWithContext is the same as DescribeMaintenanceWindowsForTarget with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeMaintenanceWindowsForTarget for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SSM) DescribeMaintenanceWindowsForTargetWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsForTargetInput, opts ...request.Option) (*DescribeMaintenanceWindowsForTargetOutput, error) { + req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4450,7 +4704,7 @@ const opDescribePatchBaselines = "DescribePatchBaselines" // DescribePatchBaselinesRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchBaselines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4529,7 +4783,7 @@ const opDescribePatchGroupState = "DescribePatchGroupState" // DescribePatchGroupStateRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroupState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4611,7 +4865,7 @@ const opDescribePatchGroups = "DescribePatchGroups" // DescribePatchGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4690,7 +4944,7 @@ const opDescribeSessions = "DescribeSessions" // DescribeSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4776,7 +5030,7 @@ const opGetAutomationExecution = "GetAutomationExecution" // GetAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4859,7 +5113,7 @@ const opGetCommandInvocation = "GetCommandInvocation" // GetCommandInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetCommandInvocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4963,7 +5217,7 @@ const opGetConnectionStatus = "GetConnectionStatus" // GetConnectionStatusRequest generates a "aws/request.Request" representing the // client's request for the GetConnectionStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5043,7 +5297,7 @@ const opGetDefaultPatchBaseline = "GetDefaultPatchBaseline" // GetDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetDefaultPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5127,7 +5381,7 @@ const opGetDeployablePatchSnapshotForInstance = "GetDeployablePatchSnapshotForIn // GetDeployablePatchSnapshotForInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeployablePatchSnapshotForInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5212,7 +5466,7 @@ const opGetDocument = "GetDocument" // GetDocumentRequest generates a "aws/request.Request" representing the // client's request for the GetDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5297,7 +5551,7 @@ const opGetInventory = "GetInventory" // GetInventoryRequest generates a "aws/request.Request" representing the // client's request for the GetInventory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5396,7 +5650,7 @@ const opGetInventorySchema = "GetInventorySchema" // GetInventorySchemaRequest generates a "aws/request.Request" representing the // client's request for the GetInventorySchema operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5482,7 +5736,7 @@ const opGetMaintenanceWindow = "GetMaintenanceWindow" // GetMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5568,7 +5822,7 @@ const opGetMaintenanceWindowExecution = "GetMaintenanceWindowExecution" // GetMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5655,7 +5909,7 @@ const opGetMaintenanceWindowExecutionTask = "GetMaintenanceWindowExecutionTask" // GetMaintenanceWindowExecutionTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5742,7 +5996,7 @@ const opGetMaintenanceWindowExecutionTaskInvocation = "GetMaintenanceWindowExecu // GetMaintenanceWindowExecutionTaskInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTaskInvocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5829,7 +6083,7 @@ const opGetMaintenanceWindowTask = "GetMaintenanceWindowTask" // GetMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5915,7 +6169,7 @@ const opGetParameter = "GetParameter" // GetParameterRequest generates a "aws/request.Request" representing the // client's request for the GetParameter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6005,7 +6259,7 @@ const opGetParameterHistory = "GetParameterHistory" // GetParameterHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetParameterHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6149,7 +6403,7 @@ const opGetParameters = "GetParameters" // GetParametersRequest generates a "aws/request.Request" representing the // client's request for the GetParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6232,7 +6486,7 @@ const opGetParametersByPath = "GetParametersByPath" // GetParametersByPathRequest generates a "aws/request.Request" representing the // client's request for the GetParametersByPath operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6395,7 +6649,7 @@ const opGetPatchBaseline = "GetPatchBaseline" // GetPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6485,7 +6739,7 @@ const opGetPatchBaselineForPatchGroup = "GetPatchBaselineForPatchGroup" // GetPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6565,7 +6819,7 @@ const opLabelParameterVersion = "LabelParameterVersion" // LabelParameterVersionRequest generates a "aws/request.Request" representing the // client's request for the LabelParameterVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6686,7 +6940,7 @@ const opListAssociationVersions = "ListAssociationVersions" // ListAssociationVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociationVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6771,7 +7025,7 @@ const opListAssociations = "ListAssociations" // ListAssociationsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6909,7 +7163,7 @@ const opListCommandInvocations = "ListCommandInvocations" // ListCommandInvocationsRequest generates a "aws/request.Request" representing the // client's request for the ListCommandInvocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7071,7 +7325,7 @@ const opListCommands = "ListCommands" // ListCommandsRequest generates a "aws/request.Request" representing the // client's request for the ListCommands operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7229,7 +7483,7 @@ const opListComplianceItems = "ListComplianceItems" // ListComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceItems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7326,7 +7580,7 @@ const opListComplianceSummaries = "ListComplianceSummaries" // ListComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceSummaries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7414,7 +7668,7 @@ const opListDocumentVersions = "ListDocumentVersions" // ListDocumentVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListDocumentVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7499,7 +7753,7 @@ const opListDocuments = "ListDocuments" // ListDocumentsRequest generates a "aws/request.Request" representing the // client's request for the ListDocuments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7640,7 +7894,7 @@ const opListInventoryEntries = "ListInventoryEntries" // ListInventoryEntriesRequest generates a "aws/request.Request" representing the // client's request for the ListInventoryEntries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7744,7 +7998,7 @@ const opListResourceComplianceSummaries = "ListResourceComplianceSummaries" // ListResourceComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListResourceComplianceSummaries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7832,7 +8086,7 @@ const opListResourceDataSync = "ListResourceDataSync" // ListResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the ListResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7923,7 +8177,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8010,7 +8264,7 @@ const opModifyDocumentPermission = "ModifyDocumentPermission" // ModifyDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the ModifyDocumentPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8107,7 +8361,7 @@ const opPutComplianceItems = "PutComplianceItems" // PutComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the PutComplianceItems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8248,7 +8502,7 @@ const opPutInventory = "PutInventory" // PutInventoryRequest generates a "aws/request.Request" representing the // client's request for the PutInventory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8380,7 +8634,7 @@ const opPutParameter = "PutParameter" // PutParameterRequest generates a "aws/request.Request" representing the // client's request for the PutParameter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8495,7 +8749,7 @@ const opRegisterDefaultPatchBaseline = "RegisterDefaultPatchBaseline" // RegisterDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the RegisterDefaultPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8585,7 +8839,7 @@ const opRegisterPatchBaselineForPatchGroup = "RegisterPatchBaselineForPatchGroup // RegisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the RegisterPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8686,7 +8940,7 @@ const opRegisterTargetWithMaintenanceWindow = "RegisterTargetWithMaintenanceWind // RegisterTargetWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTargetWithMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8783,7 +9037,7 @@ const opRegisterTaskWithMaintenanceWindow = "RegisterTaskWithMaintenanceWindow" // RegisterTaskWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTaskWithMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8884,7 +9138,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8975,7 +9229,7 @@ const opResumeSession = "ResumeSession" // ResumeSessionRequest generates a "aws/request.Request" representing the // client's request for the ResumeSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9065,7 +9319,7 @@ const opSendAutomationSignal = "SendAutomationSignal" // SendAutomationSignalRequest generates a "aws/request.Request" representing the // client's request for the SendAutomationSignal operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9156,7 +9410,7 @@ const opSendCommand = "SendCommand" // SendCommandRequest generates a "aws/request.Request" representing the // client's request for the SendCommand operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9285,7 +9539,7 @@ const opStartAssociationsOnce = "StartAssociationsOnce" // StartAssociationsOnceRequest generates a "aws/request.Request" representing the // client's request for the StartAssociationsOnce operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9368,7 +9622,7 @@ const opStartAutomationExecution = "StartAutomationExecution" // StartAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9470,7 +9724,7 @@ const opStartSession = "StartSession" // StartSessionRequest generates a "aws/request.Request" representing the // client's request for the StartSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9566,7 +9820,7 @@ const opStopAutomationExecution = "StopAutomationExecution" // StopAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9652,7 +9906,7 @@ const opTerminateSession = "TerminateSession" // TerminateSessionRequest generates a "aws/request.Request" representing the // client's request for the TerminateSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9740,7 +9994,7 @@ const opUpdateAssociation = "UpdateAssociation" // UpdateAssociationRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9860,7 +10114,7 @@ const opUpdateAssociationStatus = "UpdateAssociationStatus" // UpdateAssociationStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9968,7 +10222,7 @@ const opUpdateDocument = "UpdateDocument" // UpdateDocumentRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10070,7 +10324,7 @@ const opUpdateDocumentDefaultVersion = "UpdateDocumentDefaultVersion" // UpdateDocumentDefaultVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentDefaultVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10158,7 +10412,7 @@ const opUpdateMaintenanceWindow = "UpdateMaintenanceWindow" // UpdateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10244,7 +10498,7 @@ const opUpdateMaintenanceWindowTarget = "UpdateMaintenanceWindowTarget" // UpdateMaintenanceWindowTargetRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10346,7 +10600,7 @@ const opUpdateMaintenanceWindowTask = "UpdateMaintenanceWindowTask" // UpdateMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10451,7 +10705,7 @@ const opUpdateManagedInstanceRole = "UpdateManagedInstanceRole" // UpdateManagedInstanceRoleRequest generates a "aws/request.Request" representing the // client's request for the UpdateManagedInstanceRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -10546,7 +10800,7 @@ const opUpdatePatchBaseline = "UpdatePatchBaseline" // UpdatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -12272,6 +12526,70 @@ func (s CancelCommandOutput) GoString() string { return s.String() } +type CancelMaintenanceWindowExecutionInput struct { + _ struct{} `type:"structure"` + + // The ID of the Maintenance Window execution to stop. + // + // WindowExecutionId is a required field + WindowExecutionId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelMaintenanceWindowExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelMaintenanceWindowExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelMaintenanceWindowExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelMaintenanceWindowExecutionInput"} + if s.WindowExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) + } + if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWindowExecutionId sets the WindowExecutionId field's value. +func (s *CancelMaintenanceWindowExecutionInput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionInput { + s.WindowExecutionId = &v + return s +} + +type CancelMaintenanceWindowExecutionOutput struct { + _ struct{} `type:"structure"` + + // The ID of the Maintenance Window execution that has been stopped. + WindowExecutionId *string `min:"36" type:"string"` +} + +// String returns the string representation +func (s CancelMaintenanceWindowExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelMaintenanceWindowExecutionOutput) GoString() string { + return s.String() +} + +// SetWindowExecutionId sets the WindowExecutionId field's value. +func (s *CancelMaintenanceWindowExecutionOutput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionOutput { + s.WindowExecutionId = &v + return s +} + // Configuration options for sending command output to CloudWatch Logs. type CloudWatchOutputConfig struct { _ struct{} `type:"structure"` @@ -14114,6 +14432,11 @@ type CreateMaintenanceWindowInput struct { // Duration is a required field Duration *int64 `min:"1" type:"integer" required:"true"` + // The date and time, in ISO-8601 Extended format, for when you want the Maintenance + // Window to become inactive. EndDate allows you to set a date and time in the + // future when the Maintenance Window will no longer run. + EndDate *string `type:"string"` + // The name of the Maintenance Window. // // Name is a required field @@ -14123,6 +14446,17 @@ type CreateMaintenanceWindowInput struct { // // Schedule is a required field Schedule *string `min:"1" type:"string" required:"true"` + + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when you want the Maintenance + // Window to become active. StartDate allows you to delay activation of the + // Maintenance Window until the specified future date. + StartDate *string `type:"string"` } // String returns the string representation @@ -14205,6 +14539,12 @@ func (s *CreateMaintenanceWindowInput) SetDuration(v int64) *CreateMaintenanceWi return s } +// SetEndDate sets the EndDate field's value. +func (s *CreateMaintenanceWindowInput) SetEndDate(v string) *CreateMaintenanceWindowInput { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *CreateMaintenanceWindowInput) SetName(v string) *CreateMaintenanceWindowInput { s.Name = &v @@ -14217,6 +14557,18 @@ func (s *CreateMaintenanceWindowInput) SetSchedule(v string) *CreateMaintenanceW return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *CreateMaintenanceWindowInput) SetScheduleTimezone(v string) *CreateMaintenanceWindowInput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *CreateMaintenanceWindowInput) SetStartDate(v string) *CreateMaintenanceWindowInput { + s.StartDate = &v + return s +} + type CreateMaintenanceWindowOutput struct { _ struct{} `type:"structure"` @@ -17635,11 +17987,155 @@ func (s *DescribeMaintenanceWindowExecutionsOutput) SetWindowExecutions(v []*Mai return s } -type DescribeMaintenanceWindowTargetsInput struct { +type DescribeMaintenanceWindowScheduleInput struct { _ struct{} `type:"structure"` - // Optional filters that can be used to narrow down the scope of the returned - // window targets. The supported filter keys are Type, WindowTargetId and OwnerInformation. + // Filters used to limit the range of results. For example, you can limit Maintenance + // Window executions to only those scheduled before or after a certain date + // and time. + Filters []*PatchOrchestratorFilter `type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // The type of resource you want to retrieve information about. For example, + // "INSTANCE". + ResourceType *string `type:"string" enum:"MaintenanceWindowResourceType"` + + // The instance ID or key/value pair to retrieve information about. + Targets []*Target `type:"list"` + + // The ID of the Maintenance Window to retrieve information about. + WindowId *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMaintenanceWindowScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowScheduleInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.WindowId != nil && len(*s.WindowId) < 20 { + invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Targets != nil { + for i, v := range s.Targets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeMaintenanceWindowScheduleInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetMaxResults(v int64) *DescribeMaintenanceWindowScheduleInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleInput { + s.NextToken = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetResourceType(v string) *DescribeMaintenanceWindowScheduleInput { + s.ResourceType = &v + return s +} + +// SetTargets sets the Targets field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetTargets(v []*Target) *DescribeMaintenanceWindowScheduleInput { + s.Targets = v + return s +} + +// SetWindowId sets the WindowId field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetWindowId(v string) *DescribeMaintenanceWindowScheduleInput { + s.WindowId = &v + return s +} + +type DescribeMaintenanceWindowScheduleOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. (You use this token in the + // next call.) + NextToken *string `type:"string"` + + // Information about Maintenance Window executions scheduled for the specified + // time range. + ScheduledWindowExecutions []*ScheduledWindowExecution `type:"list"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowScheduleOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowScheduleOutput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleOutput { + s.NextToken = &v + return s +} + +// SetScheduledWindowExecutions sets the ScheduledWindowExecutions field's value. +func (s *DescribeMaintenanceWindowScheduleOutput) SetScheduledWindowExecutions(v []*ScheduledWindowExecution) *DescribeMaintenanceWindowScheduleOutput { + s.ScheduledWindowExecutions = v + return s +} + +type DescribeMaintenanceWindowTargetsInput struct { + _ struct{} `type:"structure"` + + // Optional filters that can be used to narrow down the scope of the returned + // window targets. The supported filter keys are Type, WindowTargetId and OwnerInformation. Filters []*MaintenanceWindowFilter `type:"list"` // The maximum number of items to return for this call. The call also returns @@ -17871,6 +18367,127 @@ func (s *DescribeMaintenanceWindowTasksOutput) SetTasks(v []*MaintenanceWindowTa return s } +type DescribeMaintenanceWindowsForTargetInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // The type of resource you want to retrieve information about. For example, + // "INSTANCE". + // + // ResourceType is a required field + ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` + + // The instance ID or key/value pair to retrieve information about. + // + // Targets is a required field + Targets []*Target `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowsForTargetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowsForTargetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMaintenanceWindowsForTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowsForTargetInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.Targets == nil { + invalidParams.Add(request.NewErrParamRequired("Targets")) + } + if s.Targets != nil { + for i, v := range s.Targets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetMaxResults(v int64) *DescribeMaintenanceWindowsForTargetInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetInput { + s.NextToken = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetResourceType(v string) *DescribeMaintenanceWindowsForTargetInput { + s.ResourceType = &v + return s +} + +// SetTargets sets the Targets field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetTargets(v []*Target) *DescribeMaintenanceWindowsForTargetInput { + s.Targets = v + return s +} + +type DescribeMaintenanceWindowsForTargetOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. (You use this token in the + // next call.) + NextToken *string `type:"string"` + + // Information about the Maintenance Window targets and tasks an instance is + // associated with. + WindowIdentities []*MaintenanceWindowIdentityForTarget `type:"list"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowsForTargetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowsForTargetOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowsForTargetOutput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetOutput { + s.NextToken = &v + return s +} + +// SetWindowIdentities sets the WindowIdentities field's value. +func (s *DescribeMaintenanceWindowsForTargetOutput) SetWindowIdentities(v []*MaintenanceWindowIdentityForTarget) *DescribeMaintenanceWindowsForTargetOutput { + s.WindowIdentities = v + return s +} + type DescribeMaintenanceWindowsInput struct { _ struct{} `type:"structure"` @@ -20782,15 +21399,35 @@ type GetMaintenanceWindowOutput struct { // Whether the Maintenance Windows is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become inactive. The Maintenance Window will not run + // after this specified time. + EndDate *string `type:"string"` + // The date the Maintenance Window was last modified. ModifiedDate *time.Time `type:"timestamp"` // The name of the Maintenance Window. Name *string `min:"3" type:"string"` + // The next time the Maintenance Window will actually run, taking into account + // any specified times for the Maintenance Window to become active or inactive. + NextExecutionTime *string `type:"string"` + // The schedule of the Maintenance Window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become active. The Maintenance Window will not run + // before this specified time. + StartDate *string `type:"string"` + // The ID of the created Maintenance Window. WindowId *string `min:"20" type:"string"` } @@ -20841,6 +21478,12 @@ func (s *GetMaintenanceWindowOutput) SetEnabled(v bool) *GetMaintenanceWindowOut return s } +// SetEndDate sets the EndDate field's value. +func (s *GetMaintenanceWindowOutput) SetEndDate(v string) *GetMaintenanceWindowOutput { + s.EndDate = &v + return s +} + // SetModifiedDate sets the ModifiedDate field's value. func (s *GetMaintenanceWindowOutput) SetModifiedDate(v time.Time) *GetMaintenanceWindowOutput { s.ModifiedDate = &v @@ -20853,12 +21496,30 @@ func (s *GetMaintenanceWindowOutput) SetName(v string) *GetMaintenanceWindowOutp return s } +// SetNextExecutionTime sets the NextExecutionTime field's value. +func (s *GetMaintenanceWindowOutput) SetNextExecutionTime(v string) *GetMaintenanceWindowOutput { + s.NextExecutionTime = &v + return s +} + // SetSchedule sets the Schedule field's value. func (s *GetMaintenanceWindowOutput) SetSchedule(v string) *GetMaintenanceWindowOutput { s.Schedule = &v return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *GetMaintenanceWindowOutput) SetScheduleTimezone(v string) *GetMaintenanceWindowOutput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *GetMaintenanceWindowOutput) SetStartDate(v string) *GetMaintenanceWindowOutput { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *GetMaintenanceWindowOutput) SetWindowId(v string) *GetMaintenanceWindowOutput { s.WindowId = &v @@ -25169,7 +25830,7 @@ func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetWindowTargetId(v s return s } -// Filter used in the request. +// Filter used in the request. Supported filter keys are Name and Enabled. type MaintenanceWindowFilter struct { _ struct{} `type:"structure"` @@ -25232,9 +25893,28 @@ type MaintenanceWindowIdentity struct { // Whether the Maintenance Window is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become inactive. + EndDate *string `type:"string"` + // The name of the Maintenance Window. Name *string `min:"3" type:"string"` + // The next time the Maintenance Window will actually run, taking into account + // any specified times for the Maintenance Window to become active or inactive. + NextExecutionTime *string `type:"string"` + + // The schedule of the Maintenance Window in the form of a cron or rate expression. + Schedule *string `min:"1" type:"string"` + + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become active. + StartDate *string `type:"string"` + // The ID of the Maintenance Window. WindowId *string `min:"20" type:"string"` } @@ -25273,18 +25953,81 @@ func (s *MaintenanceWindowIdentity) SetEnabled(v bool) *MaintenanceWindowIdentit return s } +// SetEndDate sets the EndDate field's value. +func (s *MaintenanceWindowIdentity) SetEndDate(v string) *MaintenanceWindowIdentity { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *MaintenanceWindowIdentity) SetName(v string) *MaintenanceWindowIdentity { s.Name = &v return s } +// SetNextExecutionTime sets the NextExecutionTime field's value. +func (s *MaintenanceWindowIdentity) SetNextExecutionTime(v string) *MaintenanceWindowIdentity { + s.NextExecutionTime = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *MaintenanceWindowIdentity) SetSchedule(v string) *MaintenanceWindowIdentity { + s.Schedule = &v + return s +} + +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *MaintenanceWindowIdentity) SetScheduleTimezone(v string) *MaintenanceWindowIdentity { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *MaintenanceWindowIdentity) SetStartDate(v string) *MaintenanceWindowIdentity { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *MaintenanceWindowIdentity) SetWindowId(v string) *MaintenanceWindowIdentity { s.WindowId = &v return s } +// The Maintenance Window to which the specified target belongs. +type MaintenanceWindowIdentityForTarget struct { + _ struct{} `type:"structure"` + + // The name of the Maintenance Window. + Name *string `min:"3" type:"string"` + + // The ID of the Maintenance Window. + WindowId *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s MaintenanceWindowIdentityForTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MaintenanceWindowIdentityForTarget) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *MaintenanceWindowIdentityForTarget) SetName(v string) *MaintenanceWindowIdentityForTarget { + s.Name = &v + return s +} + +// SetWindowId sets the WindowId field's value. +func (s *MaintenanceWindowIdentityForTarget) SetWindowId(v string) *MaintenanceWindowIdentityForTarget { + s.WindowId = &v + return s +} + // The parameters for a LAMBDA task type. // // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow @@ -29292,6 +30035,49 @@ func (s *S3OutputUrl) SetOutputUrl(v string) *S3OutputUrl { return s } +// Information about a scheduled execution for a Maintenance Window. +type ScheduledWindowExecution struct { + _ struct{} `type:"structure"` + + // The time, in ISO-8601 Extended format, that the Maintenance Window is scheduled + // to be run. + ExecutionTime *string `type:"string"` + + // The name of the Maintenance Window to be run. + Name *string `min:"3" type:"string"` + + // The ID of the Maintenance Window to be run. + WindowId *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s ScheduledWindowExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduledWindowExecution) GoString() string { + return s.String() +} + +// SetExecutionTime sets the ExecutionTime field's value. +func (s *ScheduledWindowExecution) SetExecutionTime(v string) *ScheduledWindowExecution { + s.ExecutionTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *ScheduledWindowExecution) SetName(v string) *ScheduledWindowExecution { + s.Name = &v + return s +} + +// SetWindowId sets the WindowId field's value. +func (s *ScheduledWindowExecution) SetWindowId(v string) *ScheduledWindowExecution { + s.WindowId = &v + return s +} + type SendAutomationSignalInput struct { _ struct{} `type:"structure"` @@ -29418,7 +30204,7 @@ type SendCommandInput struct { // The instance IDs where the command should execute. You can specify a maximum // of 50 IDs. If you prefer not to list individual instance IDs, you can instead // send commands to a fleet of instances using the Targets parameter, which - // accepts EC2 tags. For more information about how to use Targets, see Sending + // accepts EC2 tags. For more information about how to use targets, see Sending // Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the AWS Systems Manager User Guide. InstanceIds []*string `type:"list"` @@ -29461,7 +30247,7 @@ type SendCommandInput struct { // (Optional) An array of search criteria that targets instances using a Key,Value // combination that you specify. Targets is required if you don't provide one - // or more instance IDs in the call. For more information about how to use Targets, + // or more instance IDs in the call. For more information about how to use targets, // see Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the AWS Systems Manager User Guide. Targets []*Target `type:"list"` @@ -30050,7 +30836,7 @@ type StartAutomationExecutionInput struct { TargetMaps []map[string][]*string `type:"list"` // The name of the parameter used as the target resource for the rate-controlled - // execution. Required if you specify Targets. + // execution. Required if you specify targets. TargetParameterName *string `min:"1" type:"string"` // A key-value mapping to target resources. Required if you specify TargetParameterName. @@ -31263,6 +32049,11 @@ type UpdateMaintenanceWindowInput struct { // Whether the Maintenance Window is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when you want the Maintenance + // Window to become inactive. EndDate allows you to set a date and time in the + // future when the Maintenance Window will no longer run. + EndDate *string `type:"string"` + // The name of the Maintenance Window. Name *string `min:"3" type:"string"` @@ -31274,6 +32065,18 @@ type UpdateMaintenanceWindowInput struct { // The schedule of the Maintenance Window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + StartDate *string `type:"string"` + // The ID of the Maintenance Window to update. // // WindowId is a required field @@ -31348,6 +32151,12 @@ func (s *UpdateMaintenanceWindowInput) SetEnabled(v bool) *UpdateMaintenanceWind return s } +// SetEndDate sets the EndDate field's value. +func (s *UpdateMaintenanceWindowInput) SetEndDate(v string) *UpdateMaintenanceWindowInput { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowInput) SetName(v string) *UpdateMaintenanceWindowInput { s.Name = &v @@ -31366,6 +32175,18 @@ func (s *UpdateMaintenanceWindowInput) SetSchedule(v string) *UpdateMaintenanceW return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *UpdateMaintenanceWindowInput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowInput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *UpdateMaintenanceWindowInput) SetStartDate(v string) *UpdateMaintenanceWindowInput { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowInput) SetWindowId(v string) *UpdateMaintenanceWindowInput { s.WindowId = &v @@ -31392,12 +32213,28 @@ type UpdateMaintenanceWindowOutput struct { // Whether the Maintenance Window is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become inactive. The Maintenance Window will not run + // after this specified time. + EndDate *string `type:"string"` + // The name of the Maintenance Window. Name *string `min:"3" type:"string"` // The schedule of the Maintenance Window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become active. The Maintenance Window will not run + // before this specified time. + StartDate *string `type:"string"` + // The ID of the created Maintenance Window. WindowId *string `min:"20" type:"string"` } @@ -31442,6 +32279,12 @@ func (s *UpdateMaintenanceWindowOutput) SetEnabled(v bool) *UpdateMaintenanceWin return s } +// SetEndDate sets the EndDate field's value. +func (s *UpdateMaintenanceWindowOutput) SetEndDate(v string) *UpdateMaintenanceWindowOutput { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowOutput) SetName(v string) *UpdateMaintenanceWindowOutput { s.Name = &v @@ -31454,6 +32297,18 @@ func (s *UpdateMaintenanceWindowOutput) SetSchedule(v string) *UpdateMaintenance return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *UpdateMaintenanceWindowOutput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowOutput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *UpdateMaintenanceWindowOutput) SetStartDate(v string) *UpdateMaintenanceWindowOutput { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowOutput) SetWindowId(v string) *UpdateMaintenanceWindowOutput { s.WindowId = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go index 0774a49207f..8556f852a71 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -16,7 +16,7 @@ const opActivateGateway = "ActivateGateway" // ActivateGatewayRequest generates a "aws/request.Request" representing the // client's request for the ActivateGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -107,7 +107,7 @@ const opAddCache = "AddCache" // AddCacheRequest generates a "aws/request.Request" representing the // client's request for the AddCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -197,7 +197,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -294,7 +294,7 @@ const opAddUploadBuffer = "AddUploadBuffer" // AddUploadBufferRequest generates a "aws/request.Request" representing the // client's request for the AddUploadBuffer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -384,7 +384,7 @@ const opAddWorkingStorage = "AddWorkingStorage" // AddWorkingStorageRequest generates a "aws/request.Request" representing the // client's request for the AddWorkingStorage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -478,7 +478,7 @@ const opCancelArchival = "CancelArchival" // CancelArchivalRequest generates a "aws/request.Request" representing the // client's request for the CancelArchival operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -564,7 +564,7 @@ const opCancelRetrieval = "CancelRetrieval" // CancelRetrievalRequest generates a "aws/request.Request" representing the // client's request for the CancelRetrieval operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -650,7 +650,7 @@ const opCreateCachediSCSIVolume = "CreateCachediSCSIVolume" // CreateCachediSCSIVolumeRequest generates a "aws/request.Request" representing the // client's request for the CreateCachediSCSIVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -750,7 +750,7 @@ const opCreateNFSFileShare = "CreateNFSFileShare" // CreateNFSFileShareRequest generates a "aws/request.Request" representing the // client's request for the CreateNFSFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -846,7 +846,7 @@ const opCreateSMBFileShare = "CreateSMBFileShare" // CreateSMBFileShareRequest generates a "aws/request.Request" representing the // client's request for the CreateSMBFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -942,7 +942,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1053,7 +1053,7 @@ const opCreateSnapshotFromVolumeRecoveryPoint = "CreateSnapshotFromVolumeRecover // CreateSnapshotFromVolumeRecoveryPointRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshotFromVolumeRecoveryPoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1157,7 +1157,7 @@ const opCreateStorediSCSIVolume = "CreateStorediSCSIVolume" // CreateStorediSCSIVolumeRequest generates a "aws/request.Request" representing the // client's request for the CreateStorediSCSIVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1253,7 +1253,7 @@ const opCreateTapeWithBarcode = "CreateTapeWithBarcode" // CreateTapeWithBarcodeRequest generates a "aws/request.Request" representing the // client's request for the CreateTapeWithBarcode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1343,7 +1343,7 @@ const opCreateTapes = "CreateTapes" // CreateTapesRequest generates a "aws/request.Request" representing the // client's request for the CreateTapes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1432,7 +1432,7 @@ const opDeleteBandwidthRateLimit = "DeleteBandwidthRateLimit" // DeleteBandwidthRateLimitRequest generates a "aws/request.Request" representing the // client's request for the DeleteBandwidthRateLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1520,7 +1520,7 @@ const opDeleteChapCredentials = "DeleteChapCredentials" // DeleteChapCredentialsRequest generates a "aws/request.Request" representing the // client's request for the DeleteChapCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1605,7 +1605,7 @@ const opDeleteFileShare = "DeleteFileShare" // DeleteFileShareRequest generates a "aws/request.Request" representing the // client's request for the DeleteFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1690,7 +1690,7 @@ const opDeleteGateway = "DeleteGateway" // DeleteGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1789,7 +1789,7 @@ const opDeleteSnapshotSchedule = "DeleteSnapshotSchedule" // DeleteSnapshotScheduleRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1883,7 +1883,7 @@ const opDeleteTape = "DeleteTape" // DeleteTapeRequest generates a "aws/request.Request" representing the // client's request for the DeleteTape operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1968,7 +1968,7 @@ const opDeleteTapeArchive = "DeleteTapeArchive" // DeleteTapeArchiveRequest generates a "aws/request.Request" representing the // client's request for the DeleteTapeArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2053,7 +2053,7 @@ const opDeleteVolume = "DeleteVolume" // DeleteVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeleteVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2151,7 +2151,7 @@ const opDescribeBandwidthRateLimit = "DescribeBandwidthRateLimit" // DescribeBandwidthRateLimitRequest generates a "aws/request.Request" representing the // client's request for the DescribeBandwidthRateLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2241,7 +2241,7 @@ const opDescribeCache = "DescribeCache" // DescribeCacheRequest generates a "aws/request.Request" representing the // client's request for the DescribeCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2329,7 +2329,7 @@ const opDescribeCachediSCSIVolumes = "DescribeCachediSCSIVolumes" // DescribeCachediSCSIVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCachediSCSIVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2418,7 +2418,7 @@ const opDescribeChapCredentials = "DescribeChapCredentials" // DescribeChapCredentialsRequest generates a "aws/request.Request" representing the // client's request for the DescribeChapCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2503,7 +2503,7 @@ const opDescribeGatewayInformation = "DescribeGatewayInformation" // DescribeGatewayInformationRequest generates a "aws/request.Request" representing the // client's request for the DescribeGatewayInformation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2590,7 +2590,7 @@ const opDescribeMaintenanceStartTime = "DescribeMaintenanceStartTime" // DescribeMaintenanceStartTimeRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceStartTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2675,7 +2675,7 @@ const opDescribeNFSFileShares = "DescribeNFSFileShares" // DescribeNFSFileSharesRequest generates a "aws/request.Request" representing the // client's request for the DescribeNFSFileShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2760,7 +2760,7 @@ const opDescribeSMBFileShares = "DescribeSMBFileShares" // DescribeSMBFileSharesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSMBFileShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2845,7 +2845,7 @@ const opDescribeSMBSettings = "DescribeSMBSettings" // DescribeSMBSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSMBSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2930,7 +2930,7 @@ const opDescribeSnapshotSchedule = "DescribeSnapshotSchedule" // DescribeSnapshotScheduleRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3017,7 +3017,7 @@ const opDescribeStorediSCSIVolumes = "DescribeStorediSCSIVolumes" // DescribeStorediSCSIVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeStorediSCSIVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3104,7 +3104,7 @@ const opDescribeTapeArchives = "DescribeTapeArchives" // DescribeTapeArchivesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTapeArchives operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3248,7 +3248,7 @@ const opDescribeTapeRecoveryPoints = "DescribeTapeRecoveryPoints" // DescribeTapeRecoveryPointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTapeRecoveryPoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3394,7 +3394,7 @@ const opDescribeTapes = "DescribeTapes" // DescribeTapesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTapes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3537,7 +3537,7 @@ const opDescribeUploadBuffer = "DescribeUploadBuffer" // DescribeUploadBufferRequest generates a "aws/request.Request" representing the // client's request for the DescribeUploadBuffer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3625,7 +3625,7 @@ const opDescribeVTLDevices = "DescribeVTLDevices" // DescribeVTLDevicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVTLDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3768,7 +3768,7 @@ const opDescribeWorkingStorage = "DescribeWorkingStorage" // DescribeWorkingStorageRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkingStorage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3860,7 +3860,7 @@ const opDisableGateway = "DisableGateway" // DisableGatewayRequest generates a "aws/request.Request" representing the // client's request for the DisableGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3951,7 +3951,7 @@ const opJoinDomain = "JoinDomain" // JoinDomainRequest generates a "aws/request.Request" representing the // client's request for the JoinDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4036,7 +4036,7 @@ const opListFileShares = "ListFileShares" // ListFileSharesRequest generates a "aws/request.Request" representing the // client's request for the ListFileShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4122,7 +4122,7 @@ const opListGateways = "ListGateways" // ListGatewaysRequest generates a "aws/request.Request" representing the // client's request for the ListGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4272,7 +4272,7 @@ const opListLocalDisks = "ListLocalDisks" // ListLocalDisksRequest generates a "aws/request.Request" representing the // client's request for the ListLocalDisks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4365,7 +4365,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4450,7 +4450,7 @@ const opListTapes = "ListTapes" // ListTapesRequest generates a "aws/request.Request" representing the // client's request for the ListTapes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4544,7 +4544,7 @@ const opListVolumeInitiators = "ListVolumeInitiators" // ListVolumeInitiatorsRequest generates a "aws/request.Request" representing the // client's request for the ListVolumeInitiators operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4630,7 +4630,7 @@ const opListVolumeRecoveryPoints = "ListVolumeRecoveryPoints" // ListVolumeRecoveryPointsRequest generates a "aws/request.Request" representing the // client's request for the ListVolumeRecoveryPoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4721,7 +4721,7 @@ const opListVolumes = "ListVolumes" // ListVolumesRequest generates a "aws/request.Request" representing the // client's request for the ListVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4872,7 +4872,7 @@ const opNotifyWhenUploaded = "NotifyWhenUploaded" // NotifyWhenUploadedRequest generates a "aws/request.Request" representing the // client's request for the NotifyWhenUploaded operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4969,7 +4969,7 @@ const opRefreshCache = "RefreshCache" // RefreshCacheRequest generates a "aws/request.Request" representing the // client's request for the RefreshCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5058,7 +5058,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5143,7 +5143,7 @@ const opResetCache = "ResetCache" // ResetCacheRequest generates a "aws/request.Request" representing the // client's request for the ResetCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5238,7 +5238,7 @@ const opRetrieveTapeArchive = "RetrieveTapeArchive" // RetrieveTapeArchiveRequest generates a "aws/request.Request" representing the // client's request for the RetrieveTapeArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5331,7 +5331,7 @@ const opRetrieveTapeRecoveryPoint = "RetrieveTapeRecoveryPoint" // RetrieveTapeRecoveryPointRequest generates a "aws/request.Request" representing the // client's request for the RetrieveTapeRecoveryPoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5424,7 +5424,7 @@ const opSetLocalConsolePassword = "SetLocalConsolePassword" // SetLocalConsolePasswordRequest generates a "aws/request.Request" representing the // client's request for the SetLocalConsolePassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5511,7 +5511,7 @@ const opSetSMBGuestPassword = "SetSMBGuestPassword" // SetSMBGuestPasswordRequest generates a "aws/request.Request" representing the // client's request for the SetSMBGuestPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5596,7 +5596,7 @@ const opShutdownGateway = "ShutdownGateway" // ShutdownGatewayRequest generates a "aws/request.Request" representing the // client's request for the ShutdownGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5700,7 +5700,7 @@ const opStartGateway = "StartGateway" // StartGatewayRequest generates a "aws/request.Request" representing the // client's request for the StartGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5795,7 +5795,7 @@ const opUpdateBandwidthRateLimit = "UpdateBandwidthRateLimit" // UpdateBandwidthRateLimitRequest generates a "aws/request.Request" representing the // client's request for the UpdateBandwidthRateLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5888,7 +5888,7 @@ const opUpdateChapCredentials = "UpdateChapCredentials" // UpdateChapCredentialsRequest generates a "aws/request.Request" representing the // client's request for the UpdateChapCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5977,7 +5977,7 @@ const opUpdateGatewayInformation = "UpdateGatewayInformation" // UpdateGatewayInformationRequest generates a "aws/request.Request" representing the // client's request for the UpdateGatewayInformation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6067,7 +6067,7 @@ const opUpdateGatewaySoftwareNow = "UpdateGatewaySoftwareNow" // UpdateGatewaySoftwareNowRequest generates a "aws/request.Request" representing the // client's request for the UpdateGatewaySoftwareNow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6165,7 +6165,7 @@ const opUpdateMaintenanceStartTime = "UpdateMaintenanceStartTime" // UpdateMaintenanceStartTimeRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceStartTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6251,7 +6251,7 @@ const opUpdateNFSFileShare = "UpdateNFSFileShare" // UpdateNFSFileShareRequest generates a "aws/request.Request" representing the // client's request for the UpdateNFSFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6354,7 +6354,7 @@ const opUpdateSMBFileShare = "UpdateSMBFileShare" // UpdateSMBFileShareRequest generates a "aws/request.Request" representing the // client's request for the UpdateSMBFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6450,7 +6450,7 @@ const opUpdateSnapshotSchedule = "UpdateSnapshotSchedule" // UpdateSnapshotScheduleRequest generates a "aws/request.Request" representing the // client's request for the UpdateSnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6543,7 +6543,7 @@ const opUpdateVTLDeviceType = "UpdateVTLDeviceType" // UpdateVTLDeviceTypeRequest generates a "aws/request.Request" representing the // client's request for the UpdateVTLDeviceType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index 6f89a796e5e..ee908f9167b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -15,7 +15,7 @@ const opAssumeRole = "AssumeRole" // AssumeRoleRequest generates a "aws/request.Request" representing the // client's request for the AssumeRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -209,7 +209,7 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML" // AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithSAML operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -391,7 +391,7 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" // AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithWebIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -602,7 +602,7 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" // DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the // client's request for the DecodeAuthorizationMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -714,7 +714,7 @@ const opGetCallerIdentity = "GetCallerIdentity" // GetCallerIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCallerIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -789,7 +789,7 @@ const opGetFederationToken = "GetFederationToken" // GetFederationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetFederationToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -958,7 +958,7 @@ const opGetSessionToken = "GetSessionToken" // GetSessionTokenRequest generates a "aws/request.Request" representing the // client's request for the GetSessionToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go index 66ac2df999b..aba3cc7303e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go @@ -18,7 +18,7 @@ const opCountClosedWorkflowExecutions = "CountClosedWorkflowExecutions" // CountClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the CountClosedWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -130,7 +130,7 @@ const opCountOpenWorkflowExecutions = "CountOpenWorkflowExecutions" // CountOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the CountOpenWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -242,7 +242,7 @@ const opCountPendingActivityTasks = "CountPendingActivityTasks" // CountPendingActivityTasksRequest generates a "aws/request.Request" representing the // client's request for the CountPendingActivityTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -348,7 +348,7 @@ const opCountPendingDecisionTasks = "CountPendingDecisionTasks" // CountPendingDecisionTasksRequest generates a "aws/request.Request" representing the // client's request for the CountPendingDecisionTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -454,7 +454,7 @@ const opDeprecateActivityType = "DeprecateActivityType" // DeprecateActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateActivityType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -570,7 +570,7 @@ const opDeprecateDomain = "DeprecateDomain" // DeprecateDomainRequest generates a "aws/request.Request" representing the // client's request for the DeprecateDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -684,7 +684,7 @@ const opDeprecateWorkflowType = "DeprecateWorkflowType" // DeprecateWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateWorkflowType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -801,7 +801,7 @@ const opDescribeActivityType = "DescribeActivityType" // DescribeActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivityType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -909,7 +909,7 @@ const opDescribeDomain = "DescribeDomain" // DescribeDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1011,7 +1011,7 @@ const opDescribeWorkflowExecution = "DescribeWorkflowExecution" // DescribeWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1116,7 +1116,7 @@ const opDescribeWorkflowType = "DescribeWorkflowType" // DescribeWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkflowType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1224,7 +1224,7 @@ const opGetWorkflowExecutionHistory = "GetWorkflowExecutionHistory" // GetWorkflowExecutionHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetWorkflowExecutionHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1386,7 +1386,7 @@ const opListActivityTypes = "ListActivityTypes" // ListActivityTypesRequest generates a "aws/request.Request" representing the // client's request for the ListActivityTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1547,7 +1547,7 @@ const opListClosedWorkflowExecutions = "ListClosedWorkflowExecutions" // ListClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListClosedWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1717,7 +1717,7 @@ const opListDomains = "ListDomains" // ListDomainsRequest generates a "aws/request.Request" representing the // client's request for the ListDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1875,7 +1875,7 @@ const opListOpenWorkflowExecutions = "ListOpenWorkflowExecutions" // ListOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListOpenWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2045,7 +2045,7 @@ const opListWorkflowTypes = "ListWorkflowTypes" // ListWorkflowTypesRequest generates a "aws/request.Request" representing the // client's request for the ListWorkflowTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2204,7 +2204,7 @@ const opPollForActivityTask = "PollForActivityTask" // PollForActivityTaskRequest generates a "aws/request.Request" representing the // client's request for the PollForActivityTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2322,7 +2322,7 @@ const opPollForDecisionTask = "PollForDecisionTask" // PollForDecisionTaskRequest generates a "aws/request.Request" representing the // client's request for the PollForDecisionTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2506,7 +2506,7 @@ const opRecordActivityTaskHeartbeat = "RecordActivityTaskHeartbeat" // RecordActivityTaskHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the RecordActivityTaskHeartbeat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2632,7 +2632,7 @@ const opRegisterActivityType = "RegisterActivityType" // RegisterActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the RegisterActivityType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2758,7 +2758,7 @@ const opRegisterDomain = "RegisterDomain" // RegisterDomainRequest generates a "aws/request.Request" representing the // client's request for the RegisterDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2866,7 +2866,7 @@ const opRegisterWorkflowType = "RegisterWorkflowType" // RegisterWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the RegisterWorkflowType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2995,7 +2995,7 @@ const opRequestCancelWorkflowExecution = "RequestCancelWorkflowExecution" // RequestCancelWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the RequestCancelWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3109,7 +3109,7 @@ const opRespondActivityTaskCanceled = "RespondActivityTaskCanceled" // RespondActivityTaskCanceledRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskCanceled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3226,7 +3226,7 @@ const opRespondActivityTaskCompleted = "RespondActivityTaskCompleted" // RespondActivityTaskCompletedRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskCompleted operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3342,7 +3342,7 @@ const opRespondActivityTaskFailed = "RespondActivityTaskFailed" // RespondActivityTaskFailedRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskFailed operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3453,7 +3453,7 @@ const opRespondDecisionTaskCompleted = "RespondDecisionTaskCompleted" // RespondDecisionTaskCompletedRequest generates a "aws/request.Request" representing the // client's request for the RespondDecisionTaskCompleted operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3553,7 +3553,7 @@ const opSignalWorkflowExecution = "SignalWorkflowExecution" // SignalWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the SignalWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3665,7 +3665,7 @@ const opStartWorkflowExecution = "StartWorkflowExecution" // StartWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3811,7 +3811,7 @@ const opTerminateWorkflowExecution = "TerminateWorkflowExecution" // TerminateWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the TerminateWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index 0d9abe4d7f3..56c16743cba 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -16,7 +16,7 @@ const opCreateByteMatchSet = "CreateByteMatchSet" // CreateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -163,7 +163,7 @@ const opCreateGeoMatchSet = "CreateGeoMatchSet" // CreateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -309,7 +309,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -456,7 +456,7 @@ const opCreateRateBasedRule = "CreateRateBasedRule" // CreateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -638,7 +638,7 @@ const opCreateRegexMatchSet = "CreateRegexMatchSet" // CreateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -753,7 +753,7 @@ const opCreateRegexPatternSet = "CreateRegexPatternSet" // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -864,7 +864,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1021,7 +1021,7 @@ const opCreateRuleGroup = "CreateRuleGroup" // CreateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1127,7 +1127,7 @@ const opCreateSizeConstraintSet = "CreateSizeConstraintSet" // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1275,7 +1275,7 @@ const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1419,7 +1419,7 @@ const opCreateWebACL = "CreateWebACL" // CreateWebACLRequest generates a "aws/request.Request" representing the // client's request for the CreateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1575,7 +1575,7 @@ const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1720,7 +1720,7 @@ const opDeleteByteMatchSet = "DeleteByteMatchSet" // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1847,7 +1847,7 @@ const opDeleteGeoMatchSet = "DeleteGeoMatchSet" // DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1973,7 +1973,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2099,7 +2099,7 @@ const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" // DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2186,7 +2186,7 @@ const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2275,7 +2275,7 @@ const opDeleteRateBasedRule = "DeleteRateBasedRule" // DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2403,7 +2403,7 @@ const opDeleteRegexMatchSet = "DeleteRegexMatchSet" // DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2530,7 +2530,7 @@ const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2645,7 +2645,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2771,7 +2771,7 @@ const opDeleteRuleGroup = "DeleteRuleGroup" // DeleteRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2910,7 +2910,7 @@ const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3037,7 +3037,7 @@ const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3165,7 +3165,7 @@ const opDeleteWebACL = "DeleteWebACL" // DeleteWebACLRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3288,7 +3288,7 @@ const opDeleteXssMatchSet = "DeleteXssMatchSet" // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3415,7 +3415,7 @@ const opGetByteMatchSet = "GetByteMatchSet" // GetByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3502,7 +3502,7 @@ const opGetChangeToken = "GetChangeToken" // GetChangeTokenRequest generates a "aws/request.Request" representing the // client's request for the GetChangeToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3596,7 +3596,7 @@ const opGetChangeTokenStatus = "GetChangeTokenStatus" // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the // client's request for the GetChangeTokenStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3689,7 +3689,7 @@ const opGetGeoMatchSet = "GetGeoMatchSet" // GetGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3776,7 +3776,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3863,7 +3863,7 @@ const opGetLoggingConfiguration = "GetLoggingConfiguration" // GetLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3946,7 +3946,7 @@ const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4029,7 +4029,7 @@ const opGetRateBasedRule = "GetRateBasedRule" // GetRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4117,7 +4117,7 @@ const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" // GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRuleManagedKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4236,7 +4236,7 @@ const opGetRegexMatchSet = "GetRegexMatchSet" // GetRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4323,7 +4323,7 @@ const opGetRegexPatternSet = "GetRegexPatternSet" // GetRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4410,7 +4410,7 @@ const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4498,7 +4498,7 @@ const opGetRuleGroup = "GetRuleGroup" // GetRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the GetRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4584,7 +4584,7 @@ const opGetSampledRequests = "GetSampledRequests" // GetSampledRequestsRequest generates a "aws/request.Request" representing the // client's request for the GetSampledRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4677,7 +4677,7 @@ const opGetSizeConstraintSet = "GetSizeConstraintSet" // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the GetSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4764,7 +4764,7 @@ const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4851,7 +4851,7 @@ const opGetWebACL = "GetWebACL" // GetWebACLRequest generates a "aws/request.Request" representing the // client's request for the GetWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4938,7 +4938,7 @@ const opGetXssMatchSet = "GetXssMatchSet" // GetXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5025,7 +5025,7 @@ const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" // ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the ListActivatedRulesInRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5137,7 +5137,7 @@ const opListByteMatchSets = "ListByteMatchSets" // ListByteMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListByteMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5221,7 +5221,7 @@ const opListGeoMatchSets = "ListGeoMatchSets" // ListGeoMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5305,7 +5305,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5389,7 +5389,7 @@ const opListLoggingConfigurations = "ListLoggingConfigurations" // ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListLoggingConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5501,7 +5501,7 @@ const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRateBasedRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5585,7 +5585,7 @@ const opListRegexMatchSets = "ListRegexMatchSets" // ListRegexMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5669,7 +5669,7 @@ const opListRegexPatternSets = "ListRegexPatternSets" // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexPatternSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5753,7 +5753,7 @@ const opListRuleGroups = "ListRuleGroups" // ListRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5833,7 +5833,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5917,7 +5917,7 @@ const opListSizeConstraintSets = "ListSizeConstraintSets" // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSizeConstraintSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6001,7 +6001,7 @@ const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSqlInjectionMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6085,7 +6085,7 @@ const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" // ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscribedRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6168,7 +6168,7 @@ const opListWebACLs = "ListWebACLs" // ListWebACLsRequest generates a "aws/request.Request" representing the // client's request for the ListWebACLs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6252,7 +6252,7 @@ const opListXssMatchSets = "ListXssMatchSets" // ListXssMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListXssMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6336,7 +6336,7 @@ const opPutLoggingConfiguration = "PutLoggingConfiguration" // PutLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6438,7 +6438,7 @@ const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6575,7 +6575,7 @@ const opUpdateByteMatchSet = "UpdateByteMatchSet" // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6771,7 +6771,7 @@ const opUpdateGeoMatchSet = "UpdateGeoMatchSet" // UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6966,7 +6966,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7185,7 +7185,7 @@ const opUpdateRateBasedRule = "UpdateRateBasedRule" // UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7390,7 +7390,7 @@ const opUpdateRegexMatchSet = "UpdateRegexMatchSet" // UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7557,7 +7557,7 @@ const opUpdateRegexPatternSet = "UpdateRegexPatternSet" // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7721,7 +7721,7 @@ const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7921,7 +7921,7 @@ const opUpdateRuleGroup = "UpdateRuleGroup" // UpdateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8099,7 +8099,7 @@ const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8307,7 +8307,7 @@ const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8501,7 +8501,7 @@ const opUpdateWebACL = "UpdateWebACL" // UpdateWebACLRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8719,7 +8719,7 @@ const opUpdateXssMatchSet = "UpdateXssMatchSet" // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go index 470cefe4995..bce6f2cc848 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go @@ -14,7 +14,7 @@ const opAssociateWebACL = "AssociateWebACL" // AssociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the AssociateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -134,7 +134,7 @@ const opCreateByteMatchSet = "CreateByteMatchSet" // CreateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -281,7 +281,7 @@ const opCreateGeoMatchSet = "CreateGeoMatchSet" // CreateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -427,7 +427,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -574,7 +574,7 @@ const opCreateRateBasedRule = "CreateRateBasedRule" // CreateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -756,7 +756,7 @@ const opCreateRegexMatchSet = "CreateRegexMatchSet" // CreateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -871,7 +871,7 @@ const opCreateRegexPatternSet = "CreateRegexPatternSet" // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -982,7 +982,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1139,7 +1139,7 @@ const opCreateRuleGroup = "CreateRuleGroup" // CreateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1245,7 +1245,7 @@ const opCreateSizeConstraintSet = "CreateSizeConstraintSet" // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1393,7 +1393,7 @@ const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1537,7 +1537,7 @@ const opCreateWebACL = "CreateWebACL" // CreateWebACLRequest generates a "aws/request.Request" representing the // client's request for the CreateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1693,7 +1693,7 @@ const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1838,7 +1838,7 @@ const opDeleteByteMatchSet = "DeleteByteMatchSet" // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1965,7 +1965,7 @@ const opDeleteGeoMatchSet = "DeleteGeoMatchSet" // DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2091,7 +2091,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2217,7 +2217,7 @@ const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" // DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2304,7 +2304,7 @@ const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2393,7 +2393,7 @@ const opDeleteRateBasedRule = "DeleteRateBasedRule" // DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2521,7 +2521,7 @@ const opDeleteRegexMatchSet = "DeleteRegexMatchSet" // DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2648,7 +2648,7 @@ const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2763,7 +2763,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2889,7 +2889,7 @@ const opDeleteRuleGroup = "DeleteRuleGroup" // DeleteRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3028,7 +3028,7 @@ const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3155,7 +3155,7 @@ const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3283,7 +3283,7 @@ const opDeleteWebACL = "DeleteWebACL" // DeleteWebACLRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3406,7 +3406,7 @@ const opDeleteXssMatchSet = "DeleteXssMatchSet" // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3533,7 +3533,7 @@ const opDisassociateWebACL = "DisassociateWebACL" // DisassociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the DisassociateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3649,7 +3649,7 @@ const opGetByteMatchSet = "GetByteMatchSet" // GetByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3736,7 +3736,7 @@ const opGetChangeToken = "GetChangeToken" // GetChangeTokenRequest generates a "aws/request.Request" representing the // client's request for the GetChangeToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3830,7 +3830,7 @@ const opGetChangeTokenStatus = "GetChangeTokenStatus" // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the // client's request for the GetChangeTokenStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -3923,7 +3923,7 @@ const opGetGeoMatchSet = "GetGeoMatchSet" // GetGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4010,7 +4010,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4097,7 +4097,7 @@ const opGetLoggingConfiguration = "GetLoggingConfiguration" // GetLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4180,7 +4180,7 @@ const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4263,7 +4263,7 @@ const opGetRateBasedRule = "GetRateBasedRule" // GetRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4351,7 +4351,7 @@ const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" // GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRuleManagedKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4470,7 +4470,7 @@ const opGetRegexMatchSet = "GetRegexMatchSet" // GetRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4557,7 +4557,7 @@ const opGetRegexPatternSet = "GetRegexPatternSet" // GetRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4644,7 +4644,7 @@ const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4732,7 +4732,7 @@ const opGetRuleGroup = "GetRuleGroup" // GetRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the GetRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4818,7 +4818,7 @@ const opGetSampledRequests = "GetSampledRequests" // GetSampledRequestsRequest generates a "aws/request.Request" representing the // client's request for the GetSampledRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4911,7 +4911,7 @@ const opGetSizeConstraintSet = "GetSizeConstraintSet" // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the GetSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -4998,7 +4998,7 @@ const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5085,7 +5085,7 @@ const opGetWebACL = "GetWebACL" // GetWebACLRequest generates a "aws/request.Request" representing the // client's request for the GetWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5172,7 +5172,7 @@ const opGetWebACLForResource = "GetWebACLForResource" // GetWebACLForResourceRequest generates a "aws/request.Request" representing the // client's request for the GetWebACLForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5292,7 +5292,7 @@ const opGetXssMatchSet = "GetXssMatchSet" // GetXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5379,7 +5379,7 @@ const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" // ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the ListActivatedRulesInRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5491,7 +5491,7 @@ const opListByteMatchSets = "ListByteMatchSets" // ListByteMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListByteMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5575,7 +5575,7 @@ const opListGeoMatchSets = "ListGeoMatchSets" // ListGeoMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5659,7 +5659,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5743,7 +5743,7 @@ const opListLoggingConfigurations = "ListLoggingConfigurations" // ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListLoggingConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5855,7 +5855,7 @@ const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRateBasedRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -5939,7 +5939,7 @@ const opListRegexMatchSets = "ListRegexMatchSets" // ListRegexMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6023,7 +6023,7 @@ const opListRegexPatternSets = "ListRegexPatternSets" // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexPatternSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6107,7 +6107,7 @@ const opListResourcesForWebACL = "ListResourcesForWebACL" // ListResourcesForWebACLRequest generates a "aws/request.Request" representing the // client's request for the ListResourcesForWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6194,7 +6194,7 @@ const opListRuleGroups = "ListRuleGroups" // ListRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6274,7 +6274,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6358,7 +6358,7 @@ const opListSizeConstraintSets = "ListSizeConstraintSets" // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSizeConstraintSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6442,7 +6442,7 @@ const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSqlInjectionMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6526,7 +6526,7 @@ const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" // ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscribedRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6609,7 +6609,7 @@ const opListWebACLs = "ListWebACLs" // ListWebACLsRequest generates a "aws/request.Request" representing the // client's request for the ListWebACLs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6693,7 +6693,7 @@ const opListXssMatchSets = "ListXssMatchSets" // ListXssMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListXssMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6777,7 +6777,7 @@ const opPutLoggingConfiguration = "PutLoggingConfiguration" // PutLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -6879,7 +6879,7 @@ const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7016,7 +7016,7 @@ const opUpdateByteMatchSet = "UpdateByteMatchSet" // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7212,7 +7212,7 @@ const opUpdateGeoMatchSet = "UpdateGeoMatchSet" // UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7407,7 +7407,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7626,7 +7626,7 @@ const opUpdateRateBasedRule = "UpdateRateBasedRule" // UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7831,7 +7831,7 @@ const opUpdateRegexMatchSet = "UpdateRegexMatchSet" // UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -7998,7 +7998,7 @@ const opUpdateRegexPatternSet = "UpdateRegexPatternSet" // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8162,7 +8162,7 @@ const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8362,7 +8362,7 @@ const opUpdateRuleGroup = "UpdateRuleGroup" // UpdateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8540,7 +8540,7 @@ const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8748,7 +8748,7 @@ const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -8942,7 +8942,7 @@ const opUpdateWebACL = "UpdateWebACL" // UpdateWebACLRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -9160,7 +9160,7 @@ const opUpdateXssMatchSet = "UpdateXssMatchSet" // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go index 989ecd5b29c..e2e4418c4c9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go @@ -16,7 +16,7 @@ const opAssociateIpGroups = "AssociateIpGroups" // AssociateIpGroupsRequest generates a "aws/request.Request" representing the // client's request for the AssociateIpGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -110,7 +110,7 @@ const opAuthorizeIpRules = "AuthorizeIpRules" // AuthorizeIpRulesRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeIpRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -204,7 +204,7 @@ const opCreateIpGroup = "CreateIpGroup" // CreateIpGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateIpGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -307,7 +307,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -392,7 +392,7 @@ const opCreateWorkspaces = "CreateWorkspaces" // CreateWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the CreateWorkspaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -476,7 +476,7 @@ const opDeleteIpGroup = "DeleteIpGroup" // DeleteIpGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteIpGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -566,7 +566,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -648,7 +648,7 @@ const opDescribeIpGroups = "DescribeIpGroups" // DescribeIpGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeIpGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -730,7 +730,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -809,7 +809,7 @@ const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles" // DescribeWorkspaceBundlesRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspaceBundles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -946,7 +946,7 @@ const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories" // DescribeWorkspaceDirectoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspaceDirectories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1082,7 +1082,7 @@ const opDescribeWorkspaces = "DescribeWorkspaces" // DescribeWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1223,7 +1223,7 @@ const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus // DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkspacesConnectionStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1302,7 +1302,7 @@ const opDisassociateIpGroups = "DisassociateIpGroups" // DisassociateIpGroupsRequest generates a "aws/request.Request" representing the // client's request for the DisassociateIpGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1390,7 +1390,7 @@ const opModifyWorkspaceProperties = "ModifyWorkspaceProperties" // ModifyWorkspacePropertiesRequest generates a "aws/request.Request" representing the // client's request for the ModifyWorkspaceProperties operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1489,7 +1489,7 @@ const opModifyWorkspaceState = "ModifyWorkspaceState" // ModifyWorkspaceStateRequest generates a "aws/request.Request" representing the // client's request for the ModifyWorkspaceState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1579,7 +1579,7 @@ const opRebootWorkspaces = "RebootWorkspaces" // RebootWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the RebootWorkspaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1657,7 +1657,7 @@ const opRebuildWorkspaces = "RebuildWorkspaces" // RebuildWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the RebuildWorkspaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1739,7 +1739,7 @@ const opRevokeIpRules = "RevokeIpRules" // RevokeIpRulesRequest generates a "aws/request.Request" representing the // client's request for the RevokeIpRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1827,7 +1827,7 @@ const opStartWorkspaces = "StartWorkspaces" // StartWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the StartWorkspaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1904,7 +1904,7 @@ const opStopWorkspaces = "StopWorkspaces" // StopWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the StopWorkspaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -1981,7 +1981,7 @@ const opTerminateWorkspaces = "TerminateWorkspaces" // TerminateWorkspacesRequest generates a "aws/request.Request" representing the // client's request for the TerminateWorkspaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. @@ -2064,7 +2064,7 @@ const opUpdateRulesOfIpGroup = "UpdateRulesOfIpGroup" // UpdateRulesOfIpGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRulesOfIpGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. diff --git a/vendor/vendor.json b/vendor/vendor.json index eb0ba816928..85b15947d71 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -47,1036 +47,1036 @@ "versionExact": "v1.0.0" }, { - "checksumSHA1": "9M7a1EMfg6ydB14Vnd3DZVHsJfE=", + "checksumSHA1": "knP3bfGgAQa0v2GFZvfbXTU7PPQ=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "I87y3G8r14yKZQ5NlkupFUJ5jW0=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "1pENtl2K9hG7qoB7R6J7dAHa82g=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "BJte7rLt3vZUYkd455WNUUyCdxY=", + "checksumSHA1": "KZylhHa5CQP8deDHphHMU2tUr3o=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "ga8NLl3uroITvUgioRFFgSnSBt0=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "mYqgKOMSGvLmrt0CoBNbqdcTM3c=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "WGg5z1n2JGCf7YIwtwlhn30svbo=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "+pDu3wk2/RDNjelVs3KE+03GqII=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "zx1mZCdOwgbjBV3jMfb0kyDd//Q=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "gQ1sGIVnPqvvxa9Ww2g/PGkk16M=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "QvKGojx+wCHTDfXQ1aoOYzH3Y88=", "path": "github.com/aws/aws-sdk-go/internal/s3err", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", "path": "github.com/aws/aws-sdk-go/internal/sdkuri", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "NHfa9brYkChSmKiBcKe+xMaJzlc=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "0cZnOaE1EcFUuiu4bdHV2k7slQg=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "tXRIRarT7qepHconxydtO7mXod4=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "v2c4B7IgTyjl7ShytqbTOqhCIoM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "lj56XJFI2OSp+hEOrFZ+eiEi/yM=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "S7NJNuKPbT+a9/zk9qC1/zZAHLM=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "ZZgzuZoMphxAf8wwz9QqpSQdBGc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "soXVJWQ/xvEB72Mo6FresaQIxLg=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "4xFqSOZkwDKot6FJQQgKjhJFoQw=", + "checksumSHA1": "V5YPKdVv7D3cpcfO2gecYoB4+0E=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "3e/4A/8NqTOSXEtJ6KhYAqqWnuY=", + "checksumSHA1": "TekD25t+ErY7ep0VSZU1RbOuAhg=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "kdceIGL8qOxtpHrnLYgpCL1a3lw=", + "checksumSHA1": "QwCxwPjJNN4q4nhym3RcX80AHW4=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "K/ynSj/L2OzW+9Zqs2PRe8NzYUc=", + "checksumSHA1": "AAv5tgpGyzpzwfftoAJnudq2334=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "owhfVKeKxjXt4P5KO6PSIjnMLIA=", + "checksumSHA1": "4GehXfXvsfsv903OjmzEQskC2Z4=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "3JN52M5wxJMazxQWXB4epL78LNQ=", + "checksumSHA1": "62J/tLeZX36VfFPh5+gCrH9kh/E=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "P2+Mby00TG2KXcfhiVoNoqIT1Kc=", + "checksumSHA1": "zuBvjLwdQ32/GXiMN8tbB6sX+Jk=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "42OCpXRErVgOtgPsuTrdg7y++TA=", + "checksumSHA1": "n4HcNMas1d6LTxYVWwzamt9e/JY=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "kPYTVg109H4HL8CKEf1yQvwKMw4=", + "checksumSHA1": "QggGqwfJU9p9vk0Rc2GdQL5MwMk=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "GhANcrglYWrhNSR/NzxNe3jClMk=", + "checksumSHA1": "VatUlbTYWJxikHDG/XnfIgejXtI=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "HmZRIixQ6u+zMz2Qt0iTU42WVZU=", + "checksumSHA1": "GwbK865fFiarZoSSzSbVqcJwuL4=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "mPxC6/GzboWRsRI3AtzKAn5eTxQ=", + "checksumSHA1": "PZHlzkNYMSasi//Us6Eguq/rz48=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "H5MA8wWENhj36kHuNzegai4auhg=", + "checksumSHA1": "36H7Vj7tRy/x0zvKjXZxuOhZ4zk=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "1uyTJ/RTr7c8uL2Kbrp+60PE40M=", + "checksumSHA1": "tOw80eNTNpvIpMRVBr9oRjLcQ58=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "XTJxEnVVUOosPxVNHYHpkJ7Cexo=", + "checksumSHA1": "0+BXzUdQBJAAjbVujdr/f2QPtY0=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "kwJggEX9qSkmOwfXZxrx/7PzsGI=", + "checksumSHA1": "YsLO1gRTLh3f+c3TdsYs0WqHUKo=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "bbsROEsQ5BI5F2k8qiArbrpgH94=", + "checksumSHA1": "Np97rnL0sh65BKa/nnoAi0UMb1U=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "UyVuwts5ZE8rw9jGeubOLvvQaI8=", + "checksumSHA1": "9Cxvnmqh2j0dX5OFoHOu5cePz1Y=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "nDYTId3c5d7jQN/Rw61z8+7Y2mM=", + "checksumSHA1": "FKWSs5Dezkgw45cO9tXo+n1D+2w=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "yiad1NfELR15bjNikj554SOYdJg=", + "checksumSHA1": "9uVTrIQWdmX4oWxLYOB6QHf7mdo=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "GvjVVg5btXuEFEHqyoe19BZogGw=", + "checksumSHA1": "zJdKvz7MomKCn752Wizv3OkecrI=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "vklitYIK0AiOXA0obSTq0c04pc4=", + "checksumSHA1": "Rj1HnUmX+z8y0dCh1c0QpMwAq38=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "rL0O6L1zSJ/UQE0kEWUoCOOFDog=", + "checksumSHA1": "cJY0EMAnPPjmLHW6BepTS4yrI/g=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "gkmRw2ZP/uU+V3b9v7CQM0CA0xs=", + "checksumSHA1": "s2S+xgdxmt4yjviWgRzgX8Tk2pE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "ZKsjHOyH5z0PuKFcNtwlbhxwHFg=", + "checksumSHA1": "ZyFu15gDzimylooj/DMnKc9PmUc=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "RmFFvwnIx0l3buDtcoQ3PWkW7+g=", + "checksumSHA1": "9BbhiZSlvXF8toLc1hjfa9SMU6M=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "8HtVtWQbsP6XJeiaBGHfZ3NH+PA=", + "checksumSHA1": "af9EdSqDMCYQElRwv6JyhNIusQo=", "path": "github.com/aws/aws-sdk-go/service/datapipeline", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "TWva9VAs3zgU/FQjJkiUvY3wIXw=", + "checksumSHA1": "E2PzR2gdjvKrUoxFlf5Recjd604=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "LfJ0Owy9HyaulKTvDEgCdkChMG8=", + "checksumSHA1": "4bC9kZGFPtYITOw8jTdVFpJPNkM=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "zblSxBuyR1S5z7oSouEdCXoCUuE=", + "checksumSHA1": "d2cEBjI/sgDnWEzHtwkTqu7NS5Y=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "RZ0tw1iDGZfl6ns7xkHTSUJeW3A=", + "checksumSHA1": "SMFibYGCd4yJfI7cV6m5hsA0DdU=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "xoFqND2spsYdyoui+wKepfGQS8c=", + "checksumSHA1": "Sry+6J6O/Vi5Z6RvL40uu6Kb9KM=", "path": "github.com/aws/aws-sdk-go/service/dlm", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "42xYT0wxX/R9vu4C9+cHtBZkvxY=", + "checksumSHA1": "Ca+Lj+lYT1bFPmFqRFse3jtH1QA=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "TWuInGtqa8MFpVL63wj3sV3qWBo=", + "checksumSHA1": "Cr+HUNBOotDvCYRZOjQJl/vg0yg=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "VD7bAh0n/UgOwRBPe5y38Ow/dHU=", + "checksumSHA1": "Ib0Plp1+0bdv4RlTvyTjJY38drE=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "1oG37V7l0otp9pqbyWXcPJv3O/8=", + "checksumSHA1": "4QRd6sbMxvfIit9c1408cXvYoPA=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "NDrEwIZeUSlHgENwBzVdy0KcCCY=", + "checksumSHA1": "8ea7fZjeKLrp8d0H2oPJt+CmAEk=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "dSndJIyIFwpciskUn2ZmUvIdR+c=", + "checksumSHA1": "zvWXQTNt4mA58PUlswztK+aniv0=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "lILFc3A1a60Sv2sbdmqmp+YyK1A=", + "checksumSHA1": "UR7K4m62MzrSPEB4KLLEQOsJ4mw=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "G1BmSThB0eTjq8gSfjA+PnB9zs0=", + "checksumSHA1": "iRZ8TBVI03KJhe3usx8HZH+hz7Q=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "V6KcC3YquAo1VcT4OoEX/QQyFUA=", + "checksumSHA1": "Xv5k/JHJ+CsuyUCc5SoENm2r8w4=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "k5QQzIkQYnAOnRYLcZwHAOyXCtQ=", + "checksumSHA1": "apL29Unu7vIxb5VgA+HWW0nm1v0=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "SnJVGrH1gX3X7pfugBZ5dWhQM6E=", + "checksumSHA1": "f5/ev7DpX3Fn2Qg12TG8+aXX8Ek=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "wIiqI9GFAV2AQ32o2kEYHNyqVig=", + "checksumSHA1": "SozrDFhzpIRmVf6xcx2OgsNSONE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "7cq3bZMJV152e3ocGW8mbI657J0=", + "checksumSHA1": "Kv3fpVUq/lOmilTffzAnRQ/5yPk=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "VO+EdD/iXQVzjiuIeCQhVAsm9SI=", + "checksumSHA1": "BSlqxRfmXlzZyImxHw7UHGUuSj0=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "2/b8QVWYIBGbDNK9nYVLcRo9hRg=", + "checksumSHA1": "lAJmnDWbMBwbWp2LNj+EgoK44Gw=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "J1SHh0J6kX8JBD0+TQCFP+1Kij4=", + "checksumSHA1": "VOSOe2McOhEVDSfRAz7OM5stigI=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "BB3/VzUU5Rg4KgrezJ17D4kCnwA=", + "checksumSHA1": "BkSoTPbLpV9Ov9iVpuBRJv9j8+s=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "AAUMH/fZ2DnwQez6LZJC0P7oQc4=", + "checksumSHA1": "c7np8hnSiXMs/bPuMFV/w7KYcOg=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "Rrxph0Z8twAYUQoSwHwMTBN1N5E=", + "checksumSHA1": "a8UUqzlic1ljsDtjTH97ShjzFIY=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "ae+jhUirSvN0IXPVU7X7xc+EbFE=", + "checksumSHA1": "xke6oymAAPvAuHxEm2eWp+mdaaw=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "39yMWxFP9XB+8wWWCZX4vkNWmxU=", + "checksumSHA1": "dCgpJF6pCWT7O0Q+VW2MKFXA5FU=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "wAWGvZ95XguL4gT8AEYNtum2eZM=", + "checksumSHA1": "HSvJfXlGnhV+mKWxQaoJWnjFk1E=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "q9HZ/0/lBSRKtjHXMegmcRcazPo=", + "checksumSHA1": "BqFgvuCkO8U2SOLpzBEWAwkSwL0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "nUdxsOW9jg+m+sWZYPu7oX9rZo8=", + "checksumSHA1": "o92noObpHXdSONAKlSCjmheNal0=", "path": "github.com/aws/aws-sdk-go/service/kinesisanalytics", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "vaMnUnRVDkpHp/e4f3dFX20JblM=", + "checksumSHA1": "ac/mCyWnYF9Br3WPYQcAOYGxCFc=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "5dqI6y+bI5brPj7ReZT/NJSGzrM=", + "checksumSHA1": "rRVn5APpAtnjk3lLWhGxDi812sE=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "nMklVJilxMmhlmnnquFJB97isMk=", + "checksumSHA1": "R8gYQx1m4W1Z8GXwFz10Y9eFkpc=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "ROCCysE4/I6Tu5OCs6fuc0uTXBo=", + "checksumSHA1": "5BcOlcEph0K5MlSm/0DGWYpa1B8=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "+l6bA5aVzmBXH2Isj1xZkd5RKNY=", + "checksumSHA1": "RVGzBxEeU2U6tmIWIsK4HNCYOig=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "3LGus2oZnUFXIC8xUzmRJVQakgs=", + "checksumSHA1": "u4Z65p7SrBA7407CU/4tKzpDPBA=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "PE3129yEUwSvn0rg3P86Pxqnnps=", + "checksumSHA1": "Y7nzN30rW1YS5GdDEB1iu9NtcMk=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "7/SSsXiRqnukDTUDeEg1ToMD6nQ=", + "checksumSHA1": "rzfEIwVWz0hJQB9Mzl9y4s/TWpk=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "9NU6dJOvKvcgnl/4eUdwy4YD5ss=", + "checksumSHA1": "PI4HQYFv1c30dZh4O4CpuxC1sc8=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "qyIVtaN5mzPq4d7BDj9YpYtifKs=", + "checksumSHA1": "+0XY+KB+iYfpkMAFLq2ufccYTxk=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "phr1ne9QdLPLvgpEvQe0RUgi4PY=", + "checksumSHA1": "QzXXaK3Wp4dyew5yPBf6vvthDrU=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "44C523Sshu3BkoWwmXxawrUF2LQ=", + "checksumSHA1": "y1mGrPJlPShO/yOagp/iFRyHMtg=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "x3PsW91a7fh+Q466y3WM3fdtnGg=", + "checksumSHA1": "ZkfCVW7M7hCcVhk4wUPOhIhfKm0=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "fwGuLMKZjqpwaxsDvIiZUwWtYhM=", + "checksumSHA1": "jbeiGywfS9eq+sgkpYdTSG1+6OY=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "e5v4Cc9/0H2ngQNuvVyj2Mt0vi0=", + "checksumSHA1": "W19YWtdLN9JEwQD9ZZhRY/1JpEE=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "j1i1tZ94/kDvvzgpv5xqxwNvgyY=", + "checksumSHA1": "xKY1N27xgmGIfx4qRKsuPRzhY4Q=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "pmp2+MdhNNkBKUy9dkoeoXOE2sg=", + "checksumSHA1": "yVThETnmxmHrsI0rMHxTC49/0Oo=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "QocMd7m30oMSTWvEWoqytggtMno=", + "checksumSHA1": "Xx8T0QmW/MaImDRDsPEwCGNZhOA=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "KlM6azZ5G09MmPg+lzEizW2qaLA=", + "checksumSHA1": "vlVK2K/SLM4CXTxnpMK9MDVGjrg=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "NXv9DhErqsUxxIt0MyFcX6wpyOs=", + "checksumSHA1": "yDbIw+lVcsmjyom0xI+8khZNy6o=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "/UV5z5HrJXaiXlYjxYZ2DbSDV5U=", + "checksumSHA1": "XLR/Cf875+1mFrioTjpObEsQaM0=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "oNAtM8zoP0W/lZxCSaHqKDPgoOI=", + "checksumSHA1": "z61JVAuqczhmLFSS/p/TYlEPyyI=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "Y29bmjwKXcPg0d0WvZNFGdhd4+E=", + "checksumSHA1": "8fuk2Uppm5zHqEYhOsVmaW4MKKw=", "path": "github.com/aws/aws-sdk-go/service/serverlessapplicationrepository", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "T8dOJ1jjEBdogUE03oRPRJCOY3k=", + "checksumSHA1": "2W6qPyMta0zplxhPSITXahH6YU0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "UhJ0RdPXzdMOUEBWREB5Zi9lgmY=", + "checksumSHA1": "+EZbk9VlvYV1bAT3NNHu3krvlvg=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "n8Omv6QJc5ONFl/rJwFhEeBL4YQ=", + "checksumSHA1": "pq0s/7ZYvscjU6DHFxrasIIcu/o=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "1rJbvLXRsCzWhTihruRq/i0Zawg=", + "checksumSHA1": "/Ln2ZFfKCZq8hqfr613XO8ZpnRs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "hliWYTmov/HswyMpYq93zJtdkk0=", + "checksumSHA1": "g6KVAXiGpvaHGM6bOf5OBkvWRb4=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "bW9FW0Qe3VURaSoY305kA/wCFrM=", + "checksumSHA1": "nQ9M0Vf1QD+1fV9btS7o8SXZ2Bw=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "wuarbZJVYFXWlZiuJNSXp8WvyfQ=", + "checksumSHA1": "5nHvnLQSvF4JOtXu/hi+iZOVfak=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "7aInqCR/kL90BMUsauh3xl4Xe6M=", + "checksumSHA1": "rjhyLklllbyziCrIcimq8CIJKiE=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "cpIgqhy1NNc4TFuknIBbseKhEu0=", + "checksumSHA1": "+oRYFnGRYOqZGZcQ0hrOONtGH/k=", "path": "github.com/aws/aws-sdk-go/service/storagegateway", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "UhIVLDgQc19wjrPj8pP7Fu2UwWc=", + "checksumSHA1": "35a/vm5R/P68l/hQD55GqviO6bg=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "zSqEhiGtEK6ll3f1Rlf2tuDKQA8=", + "checksumSHA1": "hTDzNXqoUUS81wwttkD8My6MstI=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "N/w20GqQBU7sVFbshxOA3AWAvDU=", + "checksumSHA1": "PR55l/umJd2tTXH03wDMA65g1gA=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "ocF/2t8BOrkUpc62h6kHH0WtfTg=", + "checksumSHA1": "ySJkBXUzoWccGDdjChs4MLB1L0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { - "checksumSHA1": "oe8l2ibuhzz7fWM3f64cWnHwFy8=", + "checksumSHA1": "uhOc1/uS+mzb/LbLgu6U/tr4ofg=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "3c7ce80a3b6d9b952022a6c5e5dd758486ff4de1", - "revisionTime": "2018-10-04T21:55:48Z", - "version": "v1.15.48", - "versionExact": "v1.15.48" + "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", + "revisionTime": "2018-10-11T22:25:41Z", + "version": "v1.15.53", + "versionExact": "v1.15.53" }, { "checksumSHA1": "yBBHqv7DvZNsZdF00SO8PbEQAKU=", From 2cab2c6f6aa0b1b339415aeb930ed4ac6010316e Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Fri, 12 Oct 2018 08:21:57 -0700 Subject: [PATCH 2848/3316] Early return if an encryption key isn't passed into the HCL. --- aws/resource_aws_athena_database.go | 34 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index cc46bcebafc..54f66433ca6 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -60,31 +60,37 @@ func resourceAwsAthenaDatabase() *schema.Resource { } func getResultConfig(d *schema.ResourceData) (*athena.ResultConfiguration, error) { + resultConfig := athena.ResultConfiguration{ + OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), + } + e := d.Get("encryption_key").([]interface{}) + if len(e) <= 0 { + return &resultConfig + } + data := e[0].(map[string]interface{}) keyType := data["type"].(string) keyID := data["id"].(string) - resultConfig := athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), + if len(keyType) <= 0 { + return fmt.Errorf("An encryption key type is required") } - if len(keyType) > 0 { - if strings.HasSuffix(keyType, "_KMS") && len(keyID) <= 0 { - return nil, fmt.Errorf("Key type %s requires a valid KMS key ID", keyType) - } - - encryptionConfig := athena.EncryptionConfiguration{ - EncryptionOption: aws.String(keyType), - } + if strings.HasSuffix(keyType, "_KMS") && len(keyID) <= 0 { + return nil, fmt.Errorf("Key type %s requires a valid KMS key ID", keyType) + } - if len(keyID) > 0 { - encryptionConfig.KmsKey = aws.String(keyID) - } + encryptionConfig := athena.EncryptionConfiguration{ + EncryptionOption: aws.String(keyType), + } - resultConfig.EncryptionConfiguration = &encryptionConfig + if len(keyID) > 0 { + encryptionConfig.KmsKey = aws.String(keyID) } + resultConfig.EncryptionConfiguration = &encryptionConfig + return &resultConfig, nil } From edac8e3f9cbb46f986dfb7435eff71b59bf5ec23 Mon Sep 17 00:00:00 2001 From: KY Date: Sat, 13 Oct 2018 10:46:07 +0800 Subject: [PATCH 2849/3316] resource/aws_codebuild_project: Support `NO_SOURCE` as source's type --- aws/resource_aws_codebuild_project.go | 16 ++++- aws/resource_aws_codebuild_project_test.go | 78 ++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codebuild_project.go b/aws/resource_aws_codebuild_project.go index 43afd135a46..0bf048092d6 100644 --- a/aws/resource_aws_codebuild_project.go +++ b/aws/resource_aws_codebuild_project.go @@ -356,6 +356,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { codebuild.SourceTypeS3, codebuild.SourceTypeBitbucket, codebuild.SourceTypeGithubEnterprise, + codebuild.SourceTypeNoSource, }, false), }, "git_clone_depth": { @@ -453,6 +454,16 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) projectSecondaryArtifacts := expandProjectSecondaryArtifacts(d) projectSecondarySources := expandProjectSecondarySources(d) + if aws.StringValue(projectSource.Type) == codebuild.SourceTypeNoSource { + if aws.StringValue(projectSource.Buildspec) == "" { + return fmt.Errorf("`build_spec` must be set when source's `type` is `NO_SOURCE`") + } + + if aws.StringValue(projectSource.Location) != "" { + return fmt.Errorf("`location` must be empty when source's `type` is `NO_SOURCE`") + } + } + params := &codebuild.CreateProjectInput{ Environment: projectEnv, Name: aws.String(d.Get("name").(string)), @@ -705,7 +716,6 @@ func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSourc Buildspec: aws.String(data["buildspec"].(string)), GitCloneDepth: aws.Int64(int64(data["git_clone_depth"].(int))), InsecureSsl: aws.Bool(data["insecure_ssl"].(bool)), - Location: aws.String(data["location"].(string)), Type: aws.String(sourceType), } @@ -713,6 +723,10 @@ func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSourc projectSource.SourceIdentifier = aws.String(data["source_identifier"].(string)) } + if data["location"].(string) != "" { + projectSource.Location = aws.String(data["location"].(string)) + } + // Only valid for GITHUB source type, e.g. // InvalidInputException: Source type GITHUB_ENTERPRISE does not support ReportBuildStatus if sourceType == codebuild.SourceTypeGithub { diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 4107ab63058..63f7719e98c 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -525,6 +525,59 @@ func TestAccAWSCodeBuildProject_Source_Type_S3(t *testing.T) { }) } +func TestAccAWSCodeBuildProject_Source_Type_NoSource(t *testing.T) { + var project codebuild.Project + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_codebuild_project.test" + rBuildspec := ` +version: 0.2 +phases: + build: + commands: + - rspec hello_world_spec.rb` + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_NoSource(rName, "", rBuildspec), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodeBuildProjectExists(resourceName, &project), + resource.TestCheckResourceAttr(resourceName, "source.2726343112.type", "NO_SOURCE"), + ), + }, + }, + }) +} + +func TestAccAWSCodeBuildProject_Source_Type_NoSourceInvalid(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + rBuildspec := ` +version: 0.2 +phases: + build: + commands: + - rspec hello_world_spec.rb` + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_NoSource(rName, "", ""), + ExpectError: regexp.MustCompile("`build_spec` must be set when source's `type` is `NO_SOURCE`"), + }, + { + Config: testAccAWSCodeBuildProjectConfig_Source_Type_NoSource(rName, "location", rBuildspec), + ExpectError: regexp.MustCompile("`location` must be empty when source's `type` is `NO_SOURCE`"), + }, + }, + }) +} + func TestAccAWSCodeBuildProject_Tags(t *testing.T) { var project codebuild.Project rName := acctest.RandomWithPrefix("tf-acc-test") @@ -1303,6 +1356,31 @@ resource "aws_codebuild_project" "test" { `, rName) } +func testAccAWSCodeBuildProjectConfig_Source_Type_NoSource(rName string, rLocation string, rBuildspec string) string { + return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` +resource "aws_codebuild_project" "test" { + name = %q + service_role = "${aws_iam_role.test.arn}" + + artifacts { + type = "NO_ARTIFACTS" + } + + environment { + compute_type = "BUILD_GENERAL1_SMALL" + image = "2" + type = "LINUX_CONTAINER" + } + + source { + type = "NO_SOURCE" + location = "%s" + buildspec = %q + } +} +`, rName, rLocation, rBuildspec) +} + func testAccAWSCodeBuildProjectConfig_Tags(rName, tagKey, tagValue string) string { return testAccAWSCodeBuildProjectConfig_Base_ServiceRole(rName) + fmt.Sprintf(` resource "aws_codebuild_project" "test" { From 5298e481ff5f93a5f9866cee16fe6349842eb81d Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Fri, 12 Oct 2018 22:47:26 -0500 Subject: [PATCH 2850/3316] resource/aws_dx_private_virtual_interface: Update resource to support MTU param --- aws/resource_aws_dx_private_virtual_interface.go | 11 +++++++++++ aws/resource_aws_dx_private_virtual_interface_test.go | 3 +++ .../docs/r/dx_private_virtual_interface.html.markdown | 1 + 3 files changed, 15 insertions(+) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index cd92f28b626..e60d237bf04 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -84,6 +84,12 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Computed: true, ForceNew: true, }, + "mtu": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, "tags": tagsSchema(), }, @@ -111,6 +117,7 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int Vlan: aws.Int64(int64(d.Get("vlan").(int))), Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), AddressFamily: aws.String(d.Get("address_family").(string)), + Mtu: aws.Int64(int64(d.Get("mtu").(int))), }, } if vgwOk && vgwIdRaw.(string) != "" { @@ -128,6 +135,9 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) } + if v, ok := d.GetOk("mtu"); ok && v.(int) != 0 { + req.NewPrivateVirtualInterface.Mtu = aws.Int64(v.(int64)) + } log.Printf("[DEBUG] Creating Direct Connect private virtual interface: %#v", req) resp, err := conn.CreatePrivateVirtualInterface(req) @@ -175,6 +185,7 @@ func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta inter d.Set("amazon_address", vif.AmazonAddress) d.Set("vpn_gateway_id", vif.VirtualGatewayId) d.Set("dx_gateway_id", vif.DirectConnectGatewayId) + d.Set("mtu", vif.Mtu) if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index cb5b9bee73b..caa22884544 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -131,6 +131,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d + mtu = 9100 } `, n, cid, n, bgpAsn) } @@ -151,6 +152,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d + mtu = 9100 tags { Environment = "test" @@ -174,6 +176,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d + mtu = 9100 } `, n, amzAsn, cid, n, bgpAsn) } diff --git a/website/docs/r/dx_private_virtual_interface.html.markdown b/website/docs/r/dx_private_virtual_interface.html.markdown index 2503eb17fa0..db11fb2d745 100644 --- a/website/docs/r/dx_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_private_virtual_interface.html.markdown @@ -33,6 +33,7 @@ The following arguments are supported: * `name` - (Required) The name for the virtual interface. * `vlan` - (Required) The VLAN ID. * `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. +* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. * `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. From d549990aeb63d709f8de7c9caca4fe621750e366 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Fri, 12 Oct 2018 23:31:16 -0500 Subject: [PATCH 2851/3316] fixing mtu int handling --- aws/resource_aws_dx_private_virtual_interface.go | 4 ++-- aws/resource_aws_dx_private_virtual_interface_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index e60d237bf04..d20a91eebb5 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -85,7 +85,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { ForceNew: true, }, "mtu": { - Type: schema.TypeString, + Type: schema.TypeInt, Optional: true, Computed: true, ForceNew: true, @@ -136,7 +136,7 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) } if v, ok := d.GetOk("mtu"); ok && v.(int) != 0 { - req.NewPrivateVirtualInterface.Mtu = aws.Int64(v.(int64)) + req.NewPrivateVirtualInterface.Mtu = aws.Int64(int64(v.(int))) } log.Printf("[DEBUG] Creating Direct Connect private virtual interface: %#v", req) diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index caa22884544..85e29cc8614 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -131,7 +131,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9100 + mtu = 9001 } `, n, cid, n, bgpAsn) } @@ -152,7 +152,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9100 + mtu = 9001 tags { Environment = "test" @@ -176,7 +176,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9100 + mtu = 9001 } `, n, amzAsn, cid, n, bgpAsn) } From 8b4ed8936a1b0ac30334591f89eab2cbca5e3ecf Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Fri, 12 Oct 2018 23:57:25 -0500 Subject: [PATCH 2852/3316] resource/aws_dx_hosted_private_virtual_interface: Update resource to support MTU param --- ...esource_aws_dx_hosted_private_virtual_interface.go | 11 +++++++++++ ...ce_aws_dx_hosted_private_virtual_interface_test.go | 1 + .../dx_hosted_private_virtual_interface.html.markdown | 1 + 3 files changed, 13 insertions(+) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index f0ce581ff78..16f6940c1bb 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -77,6 +77,12 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { ForceNew: true, ValidateFunc: validateAwsAccountId, }, + "mtu": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, }, Timeouts: &schema.ResourceTimeout{ @@ -97,6 +103,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me Vlan: aws.Int64(int64(d.Get("vlan").(int))), Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), AddressFamily: aws.String(d.Get("address_family").(string)), + Mtu: aws.Int64(int64(d.Get("mtu").(int))), }, } if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { @@ -108,6 +115,9 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterfaceAllocation.AmazonAddress = aws.String(v.(string)) } + if v, ok := d.GetOk("mtu"); ok && v.(int) != 0 { + req.NewPrivateVirtualInterfaceAllocation.Mtu = aws.Int64(int64(v.(int))) + } log.Printf("[DEBUG] Creating Direct Connect hosted private virtual interface: %#v", req) resp, err := conn.AllocatePrivateVirtualInterface(req) @@ -154,6 +164,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta d.Set("customer_address", vif.CustomerAddress) d.Set("amazon_address", vif.AmazonAddress) d.Set("owner_account_id", vif.OwnerAccount) + d.Set("mtu", vif.Mtu) return nil } diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index a7ddff6003f..abe501ea76f 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -94,6 +94,7 @@ resource "aws_dx_hosted_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d + mtu = 9001 } `, cid, ownerAcctId, n, bgpAsn) } diff --git a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown index ebecd6d428a..1e7ec8ae233 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown @@ -35,6 +35,7 @@ The following arguments are supported: * `owner_account_id` - (Required) The AWS account that will own the new virtual interface. * `vlan` - (Required) The VLAN ID. * `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. +* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. From b5f9c8244f94600d1ca4ccf7aecdf2f13e45aff5 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 00:21:15 -0500 Subject: [PATCH 2853/3316] exporting value of jumbo frames param --- aws/resource_aws_dx_private_virtual_interface.go | 5 +++++ website/docs/r/dx_private_virtual_interface.html.markdown | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index d20a91eebb5..6269af6fb50 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -90,6 +90,10 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Computed: true, ForceNew: true, }, + "jumbo_frame_enabled": { + Type: schema.TypeBool, + Computed: true, + }, "tags": tagsSchema(), }, @@ -186,6 +190,7 @@ func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta inter d.Set("vpn_gateway_id", vif.VirtualGatewayId) d.Set("dx_gateway_id", vif.DirectConnectGatewayId) d.Set("mtu", vif.Mtu) + d.Set("jumbo_frame_capable", vif.JumboFrameCapable) if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } diff --git a/website/docs/r/dx_private_virtual_interface.html.markdown b/website/docs/r/dx_private_virtual_interface.html.markdown index db11fb2d745..68a84721244 100644 --- a/website/docs/r/dx_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_private_virtual_interface.html.markdown @@ -33,7 +33,7 @@ The following arguments are supported: * `name` - (Required) The name for the virtual interface. * `vlan` - (Required) The VLAN ID. * `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. -* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. +* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. `jumbo_frame_capable` will be exported as `true` if jumbo frames have been enabled. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. * `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. From 6282f060ac0444ba325f8bcba945f729af5c7dcf Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 00:26:27 -0500 Subject: [PATCH 2854/3316] exporting value of jumbo frames param --- aws/resource_aws_dx_hosted_private_virtual_interface.go | 5 +++++ .../docs/r/dx_hosted_private_virtual_interface.html.markdown | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index 16f6940c1bb..50ffdd2775e 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -83,6 +83,10 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { Computed: true, ForceNew: true, }, + "jumbo_frame_enabled": { + Type: schema.TypeBool, + Computed: true, + }, }, Timeouts: &schema.ResourceTimeout{ @@ -165,6 +169,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta d.Set("amazon_address", vif.AmazonAddress) d.Set("owner_account_id", vif.OwnerAccount) d.Set("mtu", vif.Mtu) + d.Set("jumbo_frame_capable", vif.JumboFrameCapable) return nil } diff --git a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown index 1e7ec8ae233..331d1c56c9d 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown @@ -35,7 +35,7 @@ The following arguments are supported: * `owner_account_id` - (Required) The AWS account that will own the new virtual interface. * `vlan` - (Required) The VLAN ID. * `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. -* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. +* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. `jumbo_frame_capable` will be exported as `true` if jumbo frames have been enabled. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. From 6e68ad9a2a9ac8dc3de290644787d1d37859588e Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 00:58:31 -0500 Subject: [PATCH 2855/3316] resource/aws_dx_connection: Export bool value of new MTU parameter --- aws/resource_aws_dx_connection.go | 5 +++++ website/docs/r/dx_connection.html.markdown | 1 + 2 files changed, 6 insertions(+) diff --git a/aws/resource_aws_dx_connection.go b/aws/resource_aws_dx_connection.go index 82e2718eefd..f2d9d698849 100644 --- a/aws/resource_aws_dx_connection.go +++ b/aws/resource_aws_dx_connection.go @@ -43,6 +43,10 @@ func resourceAwsDxConnection() *schema.Resource { Required: true, ForceNew: true, }, + "jumbo_frame_capable": { + Type: schema.TypeBool, + Computed: true, + }, "tags": tagsSchema(), }, } @@ -111,6 +115,7 @@ func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error d.Set("name", connection.ConnectionName) d.Set("bandwidth", connection.Bandwidth) d.Set("location", connection.Location) + d.Set("jumbo_frame_capable", connection.JumboFrameCapable) if err := getTagsDX(conn, d, arn); err != nil { return err diff --git a/website/docs/r/dx_connection.html.markdown b/website/docs/r/dx_connection.html.markdown index 73fdc6ef85a..e3ed3c5036b 100644 --- a/website/docs/r/dx_connection.html.markdown +++ b/website/docs/r/dx_connection.html.markdown @@ -35,6 +35,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the connection. * `arn` - The ARN of the connection. +* `jumbo_frame_capable` - Boolean value representing if jumbo frames have been enabled for this connection. ## Import From cdecb241b9de040225164299373d70987b886d40 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 08:01:29 -0500 Subject: [PATCH 2856/3316] adding acc test for mtu --- ...e_aws_dx_private_virtual_interface_test.go | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 85e29cc8614..548e7324c80 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -43,6 +43,15 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "tags.Environment", "test"), ), }, + { + Config: testAccDxPrivateVirtualInterfaceConfig_mtuCapable(connectionId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), + ), + }, // Test import. { ResourceName: "aws_dx_private_virtual_interface.foo", @@ -131,7 +140,6 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9001 } `, n, cid, n, bgpAsn) } @@ -152,7 +160,6 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9001 tags { Environment = "test" @@ -176,7 +183,27 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9001 } `, n, amzAsn, cid, n, bgpAsn) } + +func testAccDxPrivateVirtualInterfaceConfig_mtuCapable(cid, n string, bgpAsn int) string { + return fmt.Sprintf(` +resource "aws_vpn_gateway" "foo" { + tags { + Name = "%s" + } +} + +resource "aws_dx_private_virtual_interface" "foo" { + connection_id = "%s" + + vpn_gateway_id = "${aws_vpn_gateway.foo.id}" + name = "%s" + vlan = 4094 + address_family = "ipv4" + bgp_asn = %d + mtu = 9001 +} +`, n, cid, n, bgpAsn) +} From 4b3d2f0e3130506267f110802b520f91bf2b4e93 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 08:04:01 -0500 Subject: [PATCH 2857/3316] correcting exported value name --- aws/resource_aws_dx_private_virtual_interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 6269af6fb50..47905e78bb2 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -90,7 +90,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Computed: true, ForceNew: true, }, - "jumbo_frame_enabled": { + "jumbo_frame_capable": { Type: schema.TypeBool, Computed: true, }, From 7a1f9b8ad822bf49785b1eae81e891675ce58078 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 08:12:00 -0500 Subject: [PATCH 2858/3316] adding acc test for mtu --- ...aws_dx_hosted_private_virtual_interface.go | 2 +- ...x_hosted_private_virtual_interface_test.go | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index 50ffdd2775e..a7d81264af9 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -83,7 +83,7 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { Computed: true, ForceNew: true, }, - "jumbo_frame_enabled": { + "jumbo_frame_capable": { Type: schema.TypeBool, Computed: true, }, diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index abe501ea76f..402ad867cd6 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -38,6 +38,15 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), ), }, + { + Config: testAccDxHostedPrivateVirtualInterfaceConfig_mtuCapable(connectionId, ownerAccountId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "mtu", "9001"), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "jumbo_frame_capable", "1"), + ), + }, // Test import. { ResourceName: "aws_dx_hosted_private_virtual_interface.foo", @@ -90,6 +99,20 @@ resource "aws_dx_hosted_private_virtual_interface" "foo" { connection_id = "%s" owner_account_id = "%s" + name = "%s" + vlan = 4094 + address_family = "ipv4" + bgp_asn = %d +} +`, cid, ownerAcctId, n, bgpAsn) +} + +func testAccDxHostedPrivateVirtualInterfaceConfig_mtuCapable(cid, ownerAcctId, n string, bgpAsn int) string { + return fmt.Sprintf(` +resource "aws_dx_hosted_private_virtual_interface" "foo" { + connection_id = "%s" + owner_account_id = "%s" + name = "%s" vlan = 4094 address_family = "ipv4" From c4593ccbf5ca106d14bb28614546836f6a7a3240 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 08:41:03 -0500 Subject: [PATCH 2859/3316] setting default for mtu --- aws/resource_aws_dx_private_virtual_interface.go | 2 +- aws/resource_aws_dx_private_virtual_interface_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 47905e78bb2..dc4ac4bfd61 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -86,8 +86,8 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { }, "mtu": { Type: schema.TypeInt, + Default: 1500, Optional: true, - Computed: true, ForceNew: true, }, "jumbo_frame_capable": { diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 548e7324c80..4a56bf352ed 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -203,7 +203,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9001 + mtu = 9001 } `, n, cid, n, bgpAsn) } From c6c438e7cdbe86fac032612ab13424d1de4ecead Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sat, 13 Oct 2018 08:44:49 -0500 Subject: [PATCH 2860/3316] setting default for mtu --- aws/resource_aws_dx_hosted_private_virtual_interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index a7d81264af9..62ba63c4573 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -79,8 +79,8 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { }, "mtu": { Type: schema.TypeInt, + Default: 1500, Optional: true, - Computed: true, ForceNew: true, }, "jumbo_frame_capable": { From 9966f13a317bed52e1e4f53c1be50766403a051e Mon Sep 17 00:00:00 2001 From: Alastair Munro Date: Sat, 13 Oct 2018 21:15:46 +0100 Subject: [PATCH 2861/3316] Allow task dynamic host port mapping so you can have more than one container deployed per ec2 instance. Make the ecs service definition use a variable for number of instances. --- examples/ecs-alb/main.tf | 6 +++--- examples/ecs-alb/task-definition.json | 2 +- examples/ecs-alb/variables.tf | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/ecs-alb/main.tf b/examples/ecs-alb/main.tf index 5f7e9b7dc25..dc16aca7ec4 100644 --- a/examples/ecs-alb/main.tf +++ b/examples/ecs-alb/main.tf @@ -143,8 +143,8 @@ resource "aws_security_group" "instance_sg" { ingress { protocol = "tcp" - from_port = 8080 - to_port = 8080 + from_port = 32768 + to_port = 61000 security_groups = [ "${aws_security_group.lb_sg.id}", @@ -185,7 +185,7 @@ resource "aws_ecs_service" "test" { name = "tf-example-ecs-ghost" cluster = "${aws_ecs_cluster.main.id}" task_definition = "${aws_ecs_task_definition.ghost.arn}" - desired_count = 1 + desired_count = "${var.service_desired}" iam_role = "${aws_iam_role.ecs_service.name}" load_balancer { diff --git a/examples/ecs-alb/task-definition.json b/examples/ecs-alb/task-definition.json index 184e454151e..aae57890bd8 100644 --- a/examples/ecs-alb/task-definition.json +++ b/examples/ecs-alb/task-definition.json @@ -8,7 +8,7 @@ "portMappings": [ { "containerPort": 2368, - "hostPort": 8080 + "hostPort": 0 } ], "logConfiguration": { diff --git a/examples/ecs-alb/variables.tf b/examples/ecs-alb/variables.tf index aec42571cf1..b40d8758115 100644 --- a/examples/ecs-alb/variables.tf +++ b/examples/ecs-alb/variables.tf @@ -32,6 +32,11 @@ variable "asg_desired" { default = "1" } +variable "service_desired" { + description = "Desired numbers of instances in the ecs service" + default = "1" +} + variable "admin_cidr_ingress" { description = "CIDR to allow tcp/22 ingress to EC2 instance" } From afa142bdadbd8e6ec4b35179acdc0efcb1af77fc Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Sat, 13 Oct 2018 16:42:36 -0400 Subject: [PATCH 2862/3316] redshift event subscription resource --- aws/import_aws_redshift_event_subscription.go | 17 + aws/provider.go | 579 +++++++++--------- ...esource_aws_redshift_event_subscription.go | 268 ++++++++ ...ce_aws_redshift_event_subscription_test.go | 395 ++++++++++++ website/aws.erb | 4 + .../redshift_event_subscription.html.markdown | 75 +++ 6 files changed, 1049 insertions(+), 289 deletions(-) create mode 100644 aws/import_aws_redshift_event_subscription.go create mode 100644 aws/resource_aws_redshift_event_subscription.go create mode 100644 aws/resource_aws_redshift_event_subscription_test.go create mode 100644 website/docs/r/redshift_event_subscription.html.markdown diff --git a/aws/import_aws_redshift_event_subscription.go b/aws/import_aws_redshift_event_subscription.go new file mode 100644 index 00000000000..1506381b985 --- /dev/null +++ b/aws/import_aws_redshift_event_subscription.go @@ -0,0 +1,17 @@ +package aws + +import "github.com/hashicorp/terraform/helper/schema" + +func resourceAwsRedshiftEventSubscriptionImport( + d *schema.ResourceData, + meta interface{}) ([]*schema.ResourceData, error) { + + // The db event subscription Read function only needs the "name" of the event subscription + // in order to populate the necessary values. This takes the "id" from the supplied StateFunc + // and sets it as the "name" attribute, as described in the import documentation. This allows + // the Read function to actually succeed and set the ID of the resource + results := make([]*schema.ResourceData, 1, 1) + d.Set("name", d.Id()) + results[0] = d + return results, nil +} diff --git a/aws/provider.go b/aws/provider.go index ad0540834e0..fc4eb671dd1 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -393,295 +393,296 @@ func Provider() terraform.ResourceProvider { "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), - "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ec2_fleet": resourceAwsEc2Fleet(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_eks_cluster": resourceAwsEksCluster(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), - "aws_glue_classifier": resourceAwsGlueClassifier(), - "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_crawler": resourceAwsGlueCrawler(), - "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_trigger": resourceAwsGlueTrigger(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), - "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_launch_template": resourceAwsLaunchTemplate(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), - "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_neptune_cluster": resourceAwsNeptuneCluster(), - "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), - "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), - "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), - "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), - "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), - "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_organizations_policy": resourceAwsOrganizationsPolicy(), - "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), - "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), - "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), - "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), - "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), - "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), - "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_swf_domain": resourceAwsSwfDomain(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), - "aws_pinpoint_app": resourceAwsPinpointApp(), - "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), - "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), - "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), - "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), - "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), - "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), + "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), + "aws_dynamodb_table": resourceAwsDynamoDbTable(), + "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), + "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ec2_fleet": resourceAwsEc2Fleet(), + "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), + "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), + "aws_ecr_repository": resourceAwsEcrRepository(), + "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), + "aws_ecs_cluster": resourceAwsEcsCluster(), + "aws_ecs_service": resourceAwsEcsService(), + "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_mount_target": resourceAwsEfsMountTarget(), + "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), + "aws_eip": resourceAwsEip(), + "aws_eip_association": resourceAwsEipAssociation(), + "aws_eks_cluster": resourceAwsEksCluster(), + "aws_elasticache_cluster": resourceAwsElasticacheCluster(), + "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), + "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), + "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), + "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), + "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), + "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), + "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), + "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), + "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), + "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), + "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), + "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), + "aws_elb": resourceAwsElb(), + "aws_elb_attachment": resourceAwsElbAttachment(), + "aws_emr_cluster": resourceAwsEMRCluster(), + "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), + "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), + "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), + "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), + "aws_glue_classifier": resourceAwsGlueClassifier(), + "aws_glue_connection": resourceAwsGlueConnection(), + "aws_glue_crawler": resourceAwsGlueCrawler(), + "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_trigger": resourceAwsGlueTrigger(), + "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), + "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), + "aws_iam_access_key": resourceAwsIamAccessKey(), + "aws_iam_account_alias": resourceAwsIamAccountAlias(), + "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), + "aws_iam_group_policy": resourceAwsIamGroupPolicy(), + "aws_iam_group": resourceAwsIamGroup(), + "aws_iam_group_membership": resourceAwsIamGroupMembership(), + "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), + "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), + "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), + "aws_iam_policy": resourceAwsIamPolicy(), + "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), + "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), + "aws_iam_role_policy": resourceAwsIamRolePolicy(), + "aws_iam_role": resourceAwsIamRole(), + "aws_iam_saml_provider": resourceAwsIamSamlProvider(), + "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), + "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), + "aws_iam_user_policy": resourceAwsIamUserPolicy(), + "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), + "aws_iam_user": resourceAwsIamUser(), + "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), + "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), + "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), + "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), + "aws_instance": resourceAwsInstance(), + "aws_internet_gateway": resourceAwsInternetGateway(), + "aws_iot_certificate": resourceAwsIotCertificate(), + "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_type": resourceAwsIotThingType(), + "aws_iot_topic_rule": resourceAwsIotTopicRule(), + "aws_key_pair": resourceAwsKeyPair(), + "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), + "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kms_alias": resourceAwsKmsAlias(), + "aws_kms_grant": resourceAwsKmsGrant(), + "aws_kms_key": resourceAwsKmsKey(), + "aws_lambda_function": resourceAwsLambdaFunction(), + "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), + "aws_lambda_alias": resourceAwsLambdaAlias(), + "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_lightsail_domain": resourceAwsLightsailDomain(), + "aws_lightsail_instance": resourceAwsLightsailInstance(), + "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), + "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), + "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), + "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), + "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), + "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), + "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), + "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), + "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), + "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), + "aws_mq_broker": resourceAwsMqBroker(), + "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), + "aws_nat_gateway": resourceAwsNatGateway(), + "aws_network_acl": resourceAwsNetworkAcl(), + "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), + "aws_neptune_cluster": resourceAwsNeptuneCluster(), + "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), + "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), + "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), + "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), + "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), + "aws_network_acl_rule": resourceAwsNetworkAclRule(), + "aws_network_interface": resourceAwsNetworkInterface(), + "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), + "aws_opsworks_application": resourceAwsOpsworksApplication(), + "aws_opsworks_stack": resourceAwsOpsworksStack(), + "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), + "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), + "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), + "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), + "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), + "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), + "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), + "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), + "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), + "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), + "aws_opsworks_instance": resourceAwsOpsworksInstance(), + "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), + "aws_opsworks_permission": resourceAwsOpsworksPermission(), + "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), + "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), + "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), + "aws_placement_group": resourceAwsPlacementGroup(), + "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), + "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_redshift_cluster": resourceAwsRedshiftCluster(), + "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), + "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), + "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), + "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), + "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), + "aws_route53_query_log": resourceAwsRoute53QueryLog(), + "aws_route53_record": resourceAwsRoute53Record(), + "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), + "aws_route53_zone": resourceAwsRoute53Zone(), + "aws_route53_health_check": resourceAwsRoute53HealthCheck(), + "aws_route": resourceAwsRoute(), + "aws_route_table": resourceAwsRouteTable(), + "aws_default_route_table": resourceAwsDefaultRouteTable(), + "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), + "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), + "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), + "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), + "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), + "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), + "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), + "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), + "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_bucket": resourceAwsS3Bucket(), + "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_object": resourceAwsS3BucketObject(), + "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), + "aws_security_group": resourceAwsSecurityGroup(), + "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), + "aws_default_security_group": resourceAwsDefaultSecurityGroup(), + "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), + "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), + "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), + "aws_simpledb_domain": resourceAwsSimpleDBDomain(), + "aws_ssm_activation": resourceAwsSsmActivation(), + "aws_ssm_association": resourceAwsSsmAssociation(), + "aws_ssm_document": resourceAwsSsmDocument(), + "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), + "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), + "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), + "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), + "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), + "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), + "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), + "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), + "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), + "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), + "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), + "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), + "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), + "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), + "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), + "aws_sqs_queue": resourceAwsSqsQueue(), + "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), + "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), + "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), + "aws_sns_topic": resourceAwsSnsTopic(), + "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), + "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), + "aws_sfn_activity": resourceAwsSfnActivity(), + "aws_sfn_state_machine": resourceAwsSfnStateMachine(), + "aws_default_subnet": resourceAwsDefaultSubnet(), + "aws_subnet": resourceAwsSubnet(), + "aws_swf_domain": resourceAwsSwfDomain(), + "aws_volume_attachment": resourceAwsVolumeAttachment(), + "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), + "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), + "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), + "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), + "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), + "aws_default_vpc": resourceAwsDefaultVpc(), + "aws_vpc": resourceAwsVpc(), + "aws_vpc_endpoint": resourceAwsVpcEndpoint(), + "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), + "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), + "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), + "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), + "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), + "aws_vpn_connection": resourceAwsVpnConnection(), + "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), + "aws_vpn_gateway": resourceAwsVpnGateway(), + "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), + "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), + "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), + "aws_waf_ipset": resourceAwsWafIPSet(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), + "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), + "aws_waf_web_acl": resourceAwsWafWebAcl(), + "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), + "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), + "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), + "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), + "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), + "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), + "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_pinpoint_app": resourceAwsPinpointApp(), + "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), + "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), + "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), + "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), + "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point diff --git a/aws/resource_aws_redshift_event_subscription.go b/aws/resource_aws_redshift_event_subscription.go new file mode 100644 index 00000000000..8fc296f2983 --- /dev/null +++ b/aws/resource_aws_redshift_event_subscription.go @@ -0,0 +1,268 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsRedshiftEventSubscription() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsRedshiftEventSubscriptionCreate, + Read: resourceAwsRedshiftEventSubscriptionRead, + Update: resourceAwsRedshiftEventSubscriptionUpdate, + Delete: resourceAwsRedshiftEventSubscriptionDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsRedshiftEventSubscriptionImport, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(40 * time.Minute), + Delete: schema.DefaultTimeout(40 * time.Minute), + Update: schema.DefaultTimeout(40 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "sns_topic": { + Type: schema.TypeString, + Required: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "event_categories": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "source_ids": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "source_type": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "severity": { + Type: schema.TypeString, + Optional: true, + }, + "customer_aws_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsRedshiftEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + var name string + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else { + name = resource.UniqueId() + } + + tags := tagsFromMapRedshift(d.Get("tags").(map[string]interface{})) + + sourceIdsSet := d.Get("source_ids").(*schema.Set) + sourceIds := make([]*string, sourceIdsSet.Len()) + for i, sourceId := range sourceIdsSet.List() { + sourceIds[i] = aws.String(sourceId.(string)) + } + + eventCategoriesSet := d.Get("event_categories").(*schema.Set) + eventCategories := make([]*string, eventCategoriesSet.Len()) + for i, eventCategory := range eventCategoriesSet.List() { + eventCategories[i] = aws.String(eventCategory.(string)) + } + + request := &redshift.CreateEventSubscriptionInput{ + SubscriptionName: aws.String(name), + SnsTopicArn: aws.String(d.Get("sns_topic").(string)), + Enabled: aws.Bool(d.Get("enabled").(bool)), + SourceIds: sourceIds, + SourceType: aws.String(d.Get("source_type").(string)), + Severity: aws.String(d.Get("severity").(string)), + EventCategories: eventCategories, + Tags: tags, + } + + log.Println("[DEBUG] Create Redshift Event Subscription:", request) + + output, err := conn.CreateEventSubscription(request) + if err != nil || output.EventSubscription == nil { + return fmt.Errorf("Error creating Redshift Event Subscription %s: %s", name, err) + } + + d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId)) + + return resourceAwsRedshiftEventSubscriptionRead(d, meta) +} + +func resourceAwsRedshiftEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + sub, err := resourceAwsRedshiftEventSubscriptionRetrieve(d.Id(), conn) + if err != nil { + return fmt.Errorf("Error retrieving Redshift Event Subscription %s: %s", d.Id(), err) + } + if sub == nil { + log.Printf("[WARN] Redshift Event Subscription (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err := d.Set("name", sub.CustSubscriptionId); err != nil { + return err + } + if err := d.Set("sns_topic", sub.SnsTopicArn); err != nil { + return err + } + if err := d.Set("status", sub.Status); err != nil { + return err + } + if err := d.Set("source_type", sub.SourceType); err != nil { + return err + } + if err := d.Set("severity", sub.Severity); err != nil { + return err + } + if err := d.Set("enabled", sub.Enabled); err != nil { + return err + } + if err := d.Set("source_ids", flattenStringList(sub.SourceIdsList)); err != nil { + return err + } + if err := d.Set("event_categories", flattenStringList(sub.EventCategoriesList)); err != nil { + return err + } + if err := d.Set("customer_aws_id", sub.CustomerAwsId); err != nil { + return err + } + if err := d.Set("tags", tagsToMapRedshift(sub.Tags)); err != nil { + return err + } + + return nil +} + +func resourceAwsRedshiftEventSubscriptionRetrieve(name string, conn *redshift.Redshift) (*redshift.EventSubscription, error) { + + request := &redshift.DescribeEventSubscriptionsInput{ + SubscriptionName: aws.String(name), + } + + describeResp, err := conn.DescribeEventSubscriptions(request) + if err != nil { + if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { + log.Printf("[WARN] No Redshift Event Subscription by name (%s) found", name) + return nil, nil + } + return nil, fmt.Errorf("Error reading Redshift Event Subscription %s: %s", name, err) + } + + if len(describeResp.EventSubscriptionsList) != 1 { + return nil, fmt.Errorf("Unable to find Redshift Event Subscription: %#v", describeResp.EventSubscriptionsList) + } + + return describeResp.EventSubscriptionsList[0], nil +} + +func resourceAwsRedshiftEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + requestUpdate := false + + req := &redshift.ModifyEventSubscriptionInput{ + SubscriptionName: aws.String(d.Id()), + } + + eventCategoriesSet := d.Get("event_categories").(*schema.Set) + req.EventCategories = make([]*string, eventCategoriesSet.Len()) + for i, eventCategory := range eventCategoriesSet.List() { + req.EventCategories[i] = aws.String(eventCategory.(string)) + } + if d.HasChange("event_categories") { + requestUpdate = true + } + + req.Enabled = aws.Bool(d.Get("enabled").(bool)) + if d.HasChange("enabled") { + requestUpdate = true + } + + req.SnsTopicArn = aws.String(d.Get("sns_topic").(string)) + if d.HasChange("sns_topic") { + requestUpdate = true + } + + req.SourceType = aws.String(d.Get("source_type").(string)) + if d.HasChange("source_type") { + requestUpdate = true + } + + req.Severity = aws.String(d.Get("severity").(string)) + if d.HasChange("severity") { + requestUpdate = true + } + + sourceIdsSet := d.Get("source_ids").(*schema.Set) + req.SourceIds = make([]*string, sourceIdsSet.Len()) + for i, sourceId := range sourceIdsSet.List() { + req.SourceIds[i] = aws.String(sourceId.(string)) + } + if d.HasChange("source_ids") { + requestUpdate = true + } + + log.Printf("[DEBUG] Should send Redshift Event Subscription modification request: %#v", requestUpdate) + if requestUpdate { + log.Printf("[DEBUG] Redshift Event Subscription modification request: %#v", req) + _, err := conn.ModifyEventSubscription(req) + if err != nil { + return fmt.Errorf("Modifying Redshift Event Subscription %s failed: %s", d.Id(), err) + } + } + + return nil +} + +func resourceAwsRedshiftEventSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + deleteOpts := redshift.DeleteEventSubscriptionInput{ + SubscriptionName: aws.String(d.Id()), + } + + if _, err := conn.DeleteEventSubscription(&deleteOpts); err != nil { + if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { + return nil + } + return fmt.Errorf("Error deleting Redshift Event Subscription %s: %s", d.Id(), err) + } + + return nil +} diff --git a/aws/resource_aws_redshift_event_subscription_test.go b/aws/resource_aws_redshift_event_subscription_test.go new file mode 100644 index 00000000000..71e47059da7 --- /dev/null +++ b/aws/resource_aws_redshift_event_subscription_test.go @@ -0,0 +1,395 @@ +package aws + +import ( + "fmt" + "regexp" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSRedshiftEventSubscription_importBasic(t *testing.T) { + resourceName := "aws_redshift_event_subscription.bar" + rInt := acctest.RandInt() + subscriptionName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRedshiftEventSubscriptionConfig(rInt), + }, + + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateId: subscriptionName, + }, + }, + }) +} + +func TestAccAWSRedshiftEventSubscription_basicUpdate(t *testing.T) { + var v redshift.EventSubscription + rInt := acctest.RandInt() + rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRedshiftEventSubscriptionConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "source_type", "cluster"), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "name", rName), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "tags.Name", "name"), + ), + }, + { + Config: testAccAWSRedshiftEventSubscriptionConfigUpdate(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "enabled", "false"), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "source_type", "cluster-snapshot"), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "tags.%", "1"), + resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "tags.Name", "new-name"), + ), + }, + }, + }) +} + +func TestAccAWSRedshiftEventSubscription_withPrefix(t *testing.T) { + var v redshift.EventSubscription + rInt := acctest.RandInt() + startsWithPrefix := regexp.MustCompile("^tf-acc-test-redshift-event-subs-") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRedshiftEventSubscriptionConfigWithPrefix(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "source_type", "cluster"), + resource.TestMatchResourceAttr( + "aws_redshift_event_subscription.bar", "name", startsWithPrefix), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "tags.Name", "name"), + ), + }, + }, + }) +} + +func TestAccAWSRedshiftEventSubscription_withSourceIds(t *testing.T) { + var v redshift.EventSubscription + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRedshiftEventSubscriptionConfigWithSourceIds(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "source_type", "cluster-parameter-group"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "name", fmt.Sprintf("tf-acc-test-redshift-event-subs-with-ids-%d", rInt)), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "source_ids.#", "1"), + ), + }, + { + Config: testAccAWSRedshiftEventSubscriptionConfigUpdateSourceIds(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "source_type", "cluster-parameter-group"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "name", fmt.Sprintf("tf-acc-test-redshift-event-subs-with-ids-%d", rInt)), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "source_ids.#", "2"), + ), + }, + }, + }) +} + +func TestAccAWSRedshiftEventSubscription_categoryUpdate(t *testing.T) { + var v redshift.EventSubscription + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSRedshiftEventSubscriptionConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "source_type", "cluster"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "name", fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt)), + ), + }, + { + Config: testAccAWSRedshiftEventSubscriptionConfigUpdateCategories(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "enabled", "true"), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "source_type", "cluster"), + ), + }, + }, + }) +} + +func testAccCheckAWSRedshiftEventSubscriptionExists(n string, v *redshift.EventSubscription) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Redshift Event Subscription is set") + } + + conn := testAccProvider.Meta().(*AWSClient).redshiftconn + + opts := redshift.DescribeEventSubscriptionsInput{ + SubscriptionName: aws.String(rs.Primary.ID), + } + + resp, err := conn.DescribeEventSubscriptions(&opts) + + if err != nil { + return err + } + + if len(resp.EventSubscriptionsList) != 1 || + *resp.EventSubscriptionsList[0].CustSubscriptionId != rs.Primary.ID { + return fmt.Errorf("Redshift Event Subscription not found") + } + + *v = *resp.EventSubscriptionsList[0] + return nil + } +} + +func testAccCheckAWSRedshiftEventSubscriptionDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).redshiftconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_redshift_event_subscription" { + continue + } + + var err error + resp, err := conn.DescribeEventSubscriptions( + &redshift.DescribeEventSubscriptionsInput{ + SubscriptionName: aws.String(rs.Primary.ID), + }) + + if ae, ok := err.(awserr.Error); ok && ae.Code() == "SubscriptionNotFound" { + continue + } + + if err == nil { + if len(resp.EventSubscriptionsList) != 0 && + *resp.EventSubscriptionsList[0].CustSubscriptionId == rs.Primary.ID { + return fmt.Errorf("Event Subscription still exists") + } + } + + // Verify the error + newerr, ok := err.(awserr.Error) + if !ok { + return err + } + if newerr.Code() != "SubscriptionNotFound" { + return err + } + } + + return nil +} + +func testAccAWSRedshiftEventSubscriptionConfig(rInt int) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "aws_sns_topic" { + name = "tf-acc-test-redshift-event-subs-sns-topic-%d" +} + +resource "aws_redshift_event_subscription" "bar" { + name = "tf-acc-test-redshift-event-subs-%d" + sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + source_type = "cluster" + severity = "INFO" + event_categories = [ + "configuration", + "management", + "monitoring", + "security", + ] + tags { + Name = "name" + } +}`, rInt, rInt) +} + +func testAccAWSRedshiftEventSubscriptionConfigWithPrefix(rInt int) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "aws_sns_topic" { + name = "tf-acc-test-redshift-event-subs-sns-topic-%d" +} + +resource "aws_redshift_event_subscription" "bar" { + name = "tf-acc-test-redshift-event-subs-%d" + sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + source_type = "cluster" + severity = "INFO" + event_categories = [ + "configuration", + "management", + "monitoring", + "security", + ] + tags { + Name = "name" + } +}`, rInt, rInt) +} + +func testAccAWSRedshiftEventSubscriptionConfigUpdate(rInt int) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "aws_sns_topic" { + name = "tf-acc-test-redshift-event-subs-sns-topic-%d" +} + +resource "aws_redshift_event_subscription" "bar" { + name = "tf-acc-test-redshift-event-subs-%d" + sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + enabled = false + source_type = "cluster-snapshot" + severity = "INFO" + event_categories = [ + "monitoring", + ] + tags { + Name = "new-name" + } +}`, rInt, rInt) +} + +func testAccAWSRedshiftEventSubscriptionConfigWithSourceIds(rInt int) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "aws_sns_topic" { + name = "tf-acc-test-redshift-event-subs-sns-topic-%d" +} + +resource "aws_redshift_parameter_group" "bar" { + name = "redshift-parameter-group-event-%d" + family = "redshift-1.0" + description = "Test parameter group for terraform" +} + +resource "aws_redshift_event_subscription" "bar" { + name = "tf-acc-test-redshift-event-subs-with-ids-%d" + sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + source_type = "cluster-parameter-group" + severity = "INFO" + source_ids = ["${aws_redshift_parameter_group.bar.id}"] + event_categories = [ + "configuration", + ] + tags { + Name = "name" + } +}`, rInt, rInt, rInt) +} + +func testAccAWSRedshiftEventSubscriptionConfigUpdateSourceIds(rInt int) string { + return fmt.Sprintf(` + resource "aws_sns_topic" "aws_sns_topic" { + name = "tf-acc-test-redshift-event-subs-sns-topic-%d" + } + + resource "aws_redshift_parameter_group" "bar" { + name = "redshift-parameter-group-event-%d" + family = "redshift-1.0" + description = "Test parameter group for terraform" + } + + resource "aws_redshift_parameter_group" "foo" { + name = "redshift-parameter-group-event-2-%d" + family = "redshift-1.0" + description = "Test parameter group for terraform" + } + + resource "aws_redshift_event_subscription" "bar" { + name = "tf-acc-test-redshift-event-subs-with-ids-%d" + sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + source_type = "cluster-parameter-group" + severity = "INFO" + source_ids = ["${aws_redshift_parameter_group.bar.id}","${aws_redshift_parameter_group.foo.id}"] + event_categories = [ + "configuration", + ] + tags { + Name = "name" + } + }`, rInt, rInt, rInt, rInt) +} + +func testAccAWSRedshiftEventSubscriptionConfigUpdateCategories(rInt int) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "aws_sns_topic" { + name = "tf-acc-test-redshift-event-subs-sns-topic-%d" +} + +resource "aws_redshift_event_subscription" "bar" { + name = "tf-acc-test-redshift-event-subs-%d" + sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + source_type = "cluster" + severity = "INFO" + event_categories = [ + "monitoring", + ] + tags { + Name = "name" + } +}`, rInt, rInt) +} diff --git a/website/aws.erb b/website/aws.erb index 78f2d856558..7281a193c34 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1801,6 +1801,10 @@ aws_redshift_cluster + > + aws_redshift_event_subscription + + > aws_redshift_parameter_group diff --git a/website/docs/r/redshift_event_subscription.html.markdown b/website/docs/r/redshift_event_subscription.html.markdown new file mode 100644 index 00000000000..d2f44a1fb26 --- /dev/null +++ b/website/docs/r/redshift_event_subscription.html.markdown @@ -0,0 +1,75 @@ +--- +layout: "aws" +page_title: "AWS: aws_redshift_event_subscription" +sidebar_current: "docs-aws-resource-redshift-event-subscription" +description: |- + Provides a Redshift event subscription resource. +--- + +# aws_redshift_event_subscription + +Provides a Redshift event subscription resource. + +## Example Usage + +```hcl +resource "aws_redshift_cluster" "default" { + cluster_identifier = "default" + database_name = "default" + node_type = "dc1.large" + cluster_type = "single-node" + master_username = "default" + master_password = "default" + + ... +} + +resource "aws_sns_topic" "default" { + name = "redshift-events" +} + +resource "aws_redshift_event_subscription" "default" { + name = "redshift-event-sub" + sns_topic = "${aws_sns_topic.default.arn}" + + source_type = "cluster" + source_ids = ["${aws_redshift_cluster.default.id}"] + + severity = "INFO" + event_categories = [ + "configuration", + "management", + "monitoring", + "security", + ] + tags { + Name = "default" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (rEquired) The name of the Redshift event subscription. +* `sns_topic` - (Required) The SNS topic to send events to. +* `source_ids` - (Optional) A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. +* `source_type` - (Optional) The type of source that will be generating the events. Valid options are `cluster`, `cluster-parameter-group`, ``, `cluster-security-group`, or` cluster-snapshot`. If not set, all sources will be subscribed to. +* `severity` - (Optional) The event severity to be published by the notification subscription. Valid options are `INFO` or `ERROR`. +* `event_categories` - (Optional) A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run `aws redshift describe-event-categories`. +* `enabled` - (Optional) A boolean flag to enable/disable the subscription. Defaults to true. +* `tags` - (Optional) A mapping of tags to assign to the resource. + +## Attributes + +The following additional atttributes are provided: + +* `id` - The name of the Redshift event notification subscription +* `customer_aws_id` - The AWS customer account associated with the Redshift event notification subscription + +Redshift Event Subscriptions can be imported using the `name`, e.g. + +``` +$ terraform import aws_redshift_event_subscription.default redshift-event-sub +``` From 0d461f14ea5dbd73bb57d998a8ffbe516ff753c7 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sat, 13 Oct 2018 16:09:13 -0700 Subject: [PATCH 2863/3316] Work around tagging limitation in dynamodb-local. --- aws/resource_aws_dynamodb_table.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/aws/resource_aws_dynamodb_table.go b/aws/resource_aws_dynamodb_table.go index 74997b1c3e3..cd1c8cd0816 100644 --- a/aws/resource_aws_dynamodb_table.go +++ b/aws/resource_aws_dynamodb_table.go @@ -9,6 +9,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/hashcode" @@ -688,6 +689,16 @@ func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]stri output, err := conn.ListTagsOfResource(&dynamodb.ListTagsOfResourceInput{ ResourceArn: aws.String(arn), }) + + // Do not fail when interfacing with dynamodb-local + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + if aerr.Message() == "Tagging is not currently supported in DynamoDB Local." { + err = nil + } + } + } + if err != nil { return nil, fmt.Errorf("Error reading tags from dynamodb resource: %s", err) } From 213d9649736bf378572ccb8503d018f9a3e630b4 Mon Sep 17 00:00:00 2001 From: Matt Schurenko Date: Sat, 13 Oct 2018 22:09:06 -0700 Subject: [PATCH 2864/3316] enabling MinimumHealthyPercent for DAEMON --- aws/resource_aws_ecs_service.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index a5ef84bc0a9..b8d38b37a23 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -106,12 +106,6 @@ func resourceAwsEcsService() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 100, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { - return true - } - return false - }, }, "load_balancer": { @@ -354,7 +348,7 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.SchedulingStrategy = aws.String(schedulingStrategy) if schedulingStrategy == ecs.SchedulingStrategyDaemon { // unset these if DAEMON - input.DeploymentConfiguration = nil + input.DeploymentConfiguration.MaximumPercent = aws.Int64(100) input.DesiredCount = nil } @@ -767,13 +761,20 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error input.TaskDefinition = aws.String(n.(string)) } - if schedulingStrategy != ecs.SchedulingStrategyDaemon && (d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent")) { + if schedulingStrategy == ecs.SchedulingStrategyReplica && (d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent")) { input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), } } + if schedulingStrategy == ecs.SchedulingStrategyDaemon && d.HasChange("deployment_minimum_healthy_percent") { + input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ + MaximumPercent: aws.Int64(100), + MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), + } + } + if d.HasChange("network_configuration") { input.NetworkConfiguration = expandEcsNetworkConfiguration(d.Get("network_configuration").([]interface{})) } From 3985d60a20b7f5927cc9a02464c1f4666a9df8aa Mon Sep 17 00:00:00 2001 From: Matt Schurenko Date: Sat, 13 Oct 2018 22:09:24 -0700 Subject: [PATCH 2865/3316] setting deployment_minimum_healthy_percent in test --- aws/resource_aws_ecs_service_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index b21839b2f1f..aea5193f93f 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -2092,6 +2092,7 @@ resource "aws_ecs_service" "ghost" { cluster = "${aws_ecs_cluster.default.id}" task_definition = "${aws_ecs_task_definition.ghost.family}:${aws_ecs_task_definition.ghost.revision}" scheduling_strategy = "DAEMON" + deployment_minimum_healthy_percent = "50" } `, clusterName, tdName, svcName) } From 1626ab174578166348625a0f50a86b15e2f61a85 Mon Sep 17 00:00:00 2001 From: KY Date: Sun, 14 Oct 2018 19:39:44 +0800 Subject: [PATCH 2866/3316] resource/aws_cloudwatch_metric_alarm: Validate alarm actions --- aws/resource_aws_cloudwatch_metric_alarm.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_cloudwatch_metric_alarm.go b/aws/resource_aws_cloudwatch_metric_alarm.go index f15aa1b2e49..06b5e7a39fc 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/aws/resource_aws_cloudwatch_metric_alarm.go @@ -72,8 +72,11 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { "alarm_actions": { Type: schema.TypeSet, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validateArn, + }, + Set: schema.HashString, }, "alarm_description": { Type: schema.TypeString, From acd62c2af1096f501a64c297897ef25c8b4ff504 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 10:34:41 -0500 Subject: [PATCH 2867/3316] Fix a few returns. --- aws/resource_aws_athena_database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index 54f66433ca6..6f0e99ece9f 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -66,7 +66,7 @@ func getResultConfig(d *schema.ResourceData) (*athena.ResultConfiguration, error e := d.Get("encryption_key").([]interface{}) if len(e) <= 0 { - return &resultConfig + return &resultConfig, nil } data := e[0].(map[string]interface{}) @@ -74,7 +74,7 @@ func getResultConfig(d *schema.ResourceData) (*athena.ResultConfiguration, error keyID := data["id"].(string) if len(keyType) <= 0 { - return fmt.Errorf("An encryption key type is required") + return nil, fmt.Errorf("An encryption key type is required") } if strings.HasSuffix(keyType, "_KMS") && len(keyID) <= 0 { From 4ab3b0fae782c093ce4262aca5e652583020fbec Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 13:24:19 -0500 Subject: [PATCH 2868/3316] Add a test and fix bugs surfaced. --- aws/resource_aws_codepipeline_webhook.go | 113 +++++++--- aws/resource_aws_codepipeline_webhook_test.go | 196 ++++++++++++++++++ 2 files changed, 275 insertions(+), 34 deletions(-) create mode 100644 aws/resource_aws_codepipeline_webhook_test.go diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 9f77dc2bc80..61c164d977a 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -19,8 +19,10 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Schema: map[string]*schema.Schema{ "auth": { - Type: schema.TypeMap, - Optional: true, + Type: schema.TypeList, + MaxItems: 1, + MinItems: 1, + Required: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -33,8 +35,7 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Optional: true, }, "allowed_ip_range": { - Type: schema.TypeList, - Default: "0.0.0.0/0", + Type: schema.TypeString, Optional: true, }, }, @@ -44,6 +45,7 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Type: schema.TypeSet, Optional: true, ForceNew: true, + MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "json_path": { @@ -64,8 +66,10 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { ForceNew: true, }, "target": { - Type: schema.TypeMap, - Optional: true, + Type: schema.TypeList, + MaxItems: 1, + MinItems: 1, + Required: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -84,11 +88,33 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { } } +func flattenWebhookAttr(d *schema.ResourceData, attr string) (map[string]interface{}, error) { + if v, ok := d.GetOk(attr); ok { + l := v.([]interface{}) + if len(l) <= 0 { + return nil, fmt.Errorf("Attribute %s is missing", attr) + } + + data := l[0].(map[string]interface{}) + return data, nil + } + + return nil, fmt.Errorf("Could not find attribute %s", attr) +} + func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn - auth := d.Get("auth").(map[string]interface{}) - target := d.Get("target").(map[string]interface{}) + auth, err := flattenWebhookAttr(d, "auth") + if err != nil { + return err + } + + target, err := flattenWebhookAttr(d, "target") + if err != nil { + return err + } + filters := d.Get("filter").(*schema.Set) var rules []*codepipeline.WebhookFilterRule @@ -103,24 +129,27 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface rules = append(rules, &filter) } - request := &codepipeline.PutWebhookInput{ - Webhook: &codepipeline.WebhookDefinition{ - Authentication: aws.String(auth["type"].(string)), - Filters: rules, - Name: aws.String(d.Get("name").(string)), - TargetAction: aws.String(target["action"].(string)), - TargetPipeline: aws.String(target["pipeline"].(string)), - }, + if len(rules) <= 0 { + return fmt.Errorf("One or more webhook filter rule is required (%d rules from %d filter blocks)", len(rules), len(filters.List())) } var authConfig codepipeline.WebhookAuthConfiguration - switch auth["type"] { + switch auth["type"].(string) { case "IP": ipRange := auth["allowed_ip_range"].(string) + if ipRange == "" { + return fmt.Errorf("An IP range must be set when using IP-based auth") + } + authConfig.AllowedIPRange = &ipRange + break case "GITHUB_HMAC": secretToken := auth["secret_token"].(string) + if secretToken == "" { + return fmt.Errorf("Secret token must be set when using GITHUB_HMAC") + } + authConfig.SecretToken = &secretToken break case "UNAUTHENTICATED": @@ -129,6 +158,16 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface return fmt.Errorf("Invalid authentication type %s", auth["type"]) } + request := &codepipeline.PutWebhookInput{ + Webhook: &codepipeline.WebhookDefinition{ + Authentication: aws.String(auth["type"].(string)), + Filters: rules, + Name: aws.String(d.Get("name").(string)), + TargetAction: aws.String(target["action"].(string)), + TargetPipeline: aws.String(target["pipeline"].(string)), + }, + } + request.Webhook.AuthenticationConfiguration = &authConfig webhook, err := conn.PutWebhook(request) if err != nil { @@ -170,12 +209,12 @@ func getAllCodePipelineWebhooks(conn *codepipeline.CodePipeline) ([]*codepipelin return webhooks, nil } -func setFilters(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { +func setCodePipelineWebhookFilters(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { filters := []interface{}{} for _, filter := range webhook.Filters { f := map[string]interface{}{ - "json_path": filter.JsonPath, - "match_equals": filter.MatchEquals, + "json_path": *filter.JsonPath, + "match_equals": *filter.MatchEquals, } filters = append(filters, f) } @@ -187,22 +226,26 @@ func setFilters(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) return nil } -func setAuthentication(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { - auth := map[string]interface{}{ - "type": webhook.Authentication, - } +func setCodePipelineWebhookAuthentication(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { + var result []interface{} + + auth := map[string]interface{}{} + + authType := *webhook.Authentication + auth["type"] = authType - ipRange := *webhook.AuthenticationConfiguration.AllowedIPRange - if ipRange != "" { + if webhook.AuthenticationConfiguration.AllowedIPRange != nil { + ipRange := *webhook.AuthenticationConfiguration.AllowedIPRange auth["allowed_ip_range"] = ipRange } - secretToken := *webhook.AuthenticationConfiguration.SecretToken - if secretToken != "" { + if webhook.AuthenticationConfiguration.SecretToken != nil { + secretToken := *webhook.AuthenticationConfiguration.SecretToken auth["secret_token"] = secretToken } - if err := d.Set("auth", auth); err != nil { + result = append(result, auth) + if err := d.Set("auth", result); err != nil { return err } @@ -237,20 +280,22 @@ func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{} d.Set("name", name) - if err = setAuthentication(found, d); err != nil { + if err = setCodePipelineWebhookAuthentication(found, d); err != nil { return err } - if err = setFilters(found, d); err != nil { + if err = setCodePipelineWebhookFilters(found, d); err != nil { return err } + var t []interface{} target := map[string]interface{}{ - "action": found.TargetAction, - "pipeline": found.TargetPipeline, + "action": *found.TargetAction, + "pipeline": *found.TargetPipeline, } + t = append(t, target) - if err := d.Set("target", target); err != nil { + if err := d.Set("target", t); err != nil { return err } diff --git a/aws/resource_aws_codepipeline_webhook_test.go b/aws/resource_aws_codepipeline_webhook_test.go new file mode 100644 index 00000000000..14096b1bbcf --- /dev/null +++ b/aws/resource_aws_codepipeline_webhook_test.go @@ -0,0 +1,196 @@ +package aws + +import ( + "fmt" + "os" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSCodePipelineWebhook_basic(t *testing.T) { + if os.Getenv("GITHUB_TOKEN") == "" { + t.Skip("Environment variable GITHUB_TOKEN is not set") + } + + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineWebhookConfig_basic(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), + testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), + resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), + ), + }, + }, + }) +} + +func testAccCheckAWSCodePipelineWebhookExists(n string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No webhook ARN is set as ID") + } + + conn := testAccProvider.Meta().(*AWSClient).codepipelineconn + + webhooks, err := getAllCodePipelineWebhooks(conn) + if err != nil { + return err + } + + var arn string + for _, hook := range webhooks { + arn = *hook.Arn + if rs.Primary.ID == arn { + return nil + } + } + + return fmt.Errorf("Webhook %s not found", rs.Primary.ID) + } +} + +func testAccAWSCodePipelineWebhookConfig_basic(rName string) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "foo" { + bucket = "tf-test-pipeline-%s" + acl = "private" +} + +resource "aws_iam_role" "codepipeline_role" { + name = "codepipeline-role-%s" + + assume_role_policy = < Date: Sun, 14 Oct 2018 14:24:30 -0400 Subject: [PATCH 2869/3316] Add eventual consistent read for elbv2 listener rule. --- aws/resource_aws_lb_listener_rule.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_lb_listener_rule.go b/aws/resource_aws_lb_listener_rule.go index cbfab8d8458..5f44fa8c887 100644 --- a/aws/resource_aws_lb_listener_rule.go +++ b/aws/resource_aws_lb_listener_rule.go @@ -508,9 +508,24 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - resp, err := elbconn.DescribeRules(&elbv2.DescribeRulesInput{ + var resp *elbv2.DescribeRulesOutput + var req = &elbv2.DescribeRulesInput{ RuleArns: []*string{aws.String(d.Id())}, + } + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = elbconn.DescribeRules(req) + if err != nil { + if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeRuleNotFoundException, "") { + return resource.RetryableError(err) + } else { + return resource.NonRetryableError(err) + } + } + return nil }) + if err != nil { if isAWSErr(err, elbv2.ErrCodeRuleNotFoundException, "") { log.Printf("[WARN] DescribeRules - removing %s from state", d.Id()) From e34f6fb34a64448699783b4e5ff1f2ebba7e793f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sun, 14 Oct 2018 14:30:32 -0400 Subject: [PATCH 2870/3316] Update CHANGELOG for #6143 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f52b4baa2..590da45364e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/aws_dx_connection: Add `jumbo_frame_capable` attribute [GH-6143] * resource/aws_lb_listener: Allow `default_action` `order` to be based on Terraform configuration ordering [GH-6124] * resource/aws_lb_listener_rule: Allow `action` `order` to be based on Terraform configuration ordering [GH-6124] From 86a6826230384c928ae0a8ba34030f4fdcb42a6b Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 13:45:06 -0500 Subject: [PATCH 2871/3316] Add docs. --- website/docs/r/codepipeline_webhook.markdown | 138 +++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 website/docs/r/codepipeline_webhook.markdown diff --git a/website/docs/r/codepipeline_webhook.markdown b/website/docs/r/codepipeline_webhook.markdown new file mode 100644 index 00000000000..0fc834e15e3 --- /dev/null +++ b/website/docs/r/codepipeline_webhook.markdown @@ -0,0 +1,138 @@ +--- +layout: "aws" +page_title: "AWS: aws_codepipeline_webhook" +sidebar_current: "docs-aws-resource-codepipeline-webhook" +description: |- + Provides a CodePipeline Webhook +--- + +# aws_codepipeline_webhook + +Provides a CodePipeline Webhook. + +## Example Usage + +```hcl +resource "aws_codepipeline" "bar" { + name = "tf-test-pipeline" + role_arn = "${aws_iam_role.bar.arn}" + + artifact_store { + location = "${aws_s3_bucket.bar.bucket}" + type = "S3" + encryption_key { + id = "${data.aws_kms_alias.s3kmskey.arn}" + type = "KMS" + } + } + + stage { + name = "Source" + + action { + name = "Source" + category = "Source" + owner = "ThirdParty" + provider = "GitHub" + version = "1" + output_artifacts = ["test"] + + configuration { + Owner = "my-organization" + Repo = "test" + Branch = "master" + } + } + } + + stage { + name = "Build" + + action { + name = "Build" + category = "Build" + owner = "AWS" + provider = "CodeBuild" + input_artifacts = ["test"] + version = "1" + + configuration { + ProjectName = "test" + } + } + } +} + +# A shared secret between GitHub and AWS that allows AWS +# CodePipeline to authenticate the request came from GitHub. +# Would probably be better to pull this from the environment +# or something like SSM Parameter Store. +locals { + webhook_secret = "super-secret" +} + +resource "aws_codepipeline_webhook" "bar" { + name = "test-webhook-github-bar" + + auth { + type = "GITHUB_HMAC" + secret_token = "${local.webhook_secret}" + } + + filter { + json_path = "$.ref" + match_equals = "refs/heads/{Branch}" + } + + target { + action = "Source" + pipeline = "${aws_codepipeline.bar.name}" + } +} + +# Wire the CodePipeline webhook into a GitHub repository. +resource "github_repository_webhook" "bar" { + repository = "${github_repository.repo.name}" + + name = "web" + + configuration { + url = "${aws_codepipeline_webhook.bar.url}" + content_type = "form" + insecure_ssl = true + secret = "${local.webhook_secret}" + } + events = ["push"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the webhook. +* `auth` - (Required) An `auth` block. Auth blocks are documented below. +* `filter` (Required) One or more `filter` blocks. Filter blocks are documented below. +* `target` (Required) A `target` block. Target blocks are documented below. + +An `auth` block supports the following arguments: + +* `type` - (Required) The type of the filter. One of `IP`, `GITHUB_HMAC`, or `UNAUTHENTICATED`. +* `secret_token` - (Optional) The shared secret for the GitHub repository webhook. Set this as `secret` in your `github_repository_webhook`'s `configuration` block. Required for `GITHUB_HMAC`. +* `allowed_ip_range` - (Optional) A valid CIDR block for `IP` filtering. Required for `IP`. + +A `filter` block supports the following arguments: + +* `json_path` - (Required) The [JSON path](https://github.com/json-path/JsonPath) to filter on. +* `match_equals` - (Required) The value to match on (e.g. `refs/heads/{Branch}`). See [AWS docs](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_WebhookFilterRule.html) for details. + +A `target` block supports the following arguments: + +* `action` - (Required) The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline. +* `pipeline` - (Required) The name of the pipeline. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The CodePipeline webhook's ARN. From d6fbc080f238f48a5bd1b8969ac66ceec39d471c Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 13:46:09 -0500 Subject: [PATCH 2872/3316] Add aws_codepipeline_webhook to the sidebar. --- website/aws.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/aws.erb b/website/aws.erb index 78f2d856558..5926dabcf04 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -698,6 +698,11 @@ aws_codepipeline + + > + aws_codepipeline_webhook + + From 00bf4af13c97bb44b1c966f4e11759a8e90c24ce Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sun, 14 Oct 2018 12:10:40 -0700 Subject: [PATCH 2873/3316] Use isAWSErr. --- aws/resource_aws_dynamodb_table.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/aws/resource_aws_dynamodb_table.go b/aws/resource_aws_dynamodb_table.go index cd1c8cd0816..f264de0520d 100644 --- a/aws/resource_aws_dynamodb_table.go +++ b/aws/resource_aws_dynamodb_table.go @@ -9,7 +9,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/hashcode" @@ -690,16 +689,8 @@ func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]stri ResourceArn: aws.String(arn), }) - // Do not fail when interfacing with dynamodb-local - if err != nil { - if aerr, ok := err.(awserr.Error); ok { - if aerr.Message() == "Tagging is not currently supported in DynamoDB Local." { - err = nil - } - } - } - - if err != nil { + // Do not fail if interfacing with dynamodb-local + if err != nil && !isAWSErr(err, "UnknownOperationException", "Tagging is not currently supported in DynamoDB Local.") { return nil, fmt.Errorf("Error reading tags from dynamodb resource: %s", err) } From 6e1b0f58620b70b06c6b712e0d0b3e14d8d121a3 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sun, 14 Oct 2018 15:32:43 -0400 Subject: [PATCH 2874/3316] Update CHANGELOG for #6140 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 590da45364e..4dbb52c2583 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` [GH-6140] * resource/aws_dx_connection: Add `jumbo_frame_capable` attribute [GH-6143] * resource/aws_lb_listener: Allow `default_action` `order` to be based on Terraform configuration ordering [GH-6124] * resource/aws_lb_listener_rule: Allow `action` `order` to be based on Terraform configuration ordering [GH-6124] From d0790ba44d8f74457236e3d1cbdf545fd73fc8ae Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sun, 14 Oct 2018 16:04:52 -0400 Subject: [PATCH 2875/3316] Update CHANGELOG for #6154 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dbb52c2583..4868bf17b6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ BUG FIXES: * resource/aws_lb_listener: Prevent unconfigured `default_action` `order` from showing difference [GH-6119] * resource/aws_lb_listener_rule: Prevent unconfigured `action` `order` from showing difference [GH-6119] +* resource/aws_lb_listener_rule: Retry read for eventual consistency after resource creation [GH-6154] ## 1.40.0 (October 10, 2018) From 88083c82e46962e3ef160fde15cd82f96ebcb15d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sun, 14 Oct 2018 16:10:05 -0400 Subject: [PATCH 2876/3316] Update CHANGELOG for #6149 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4868bf17b6b..029b538fd54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ENHANCEMENTS: * resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` [GH-6140] * resource/aws_dx_connection: Add `jumbo_frame_capable` attribute [GH-6143] +* resource/aws_dynamodb_table: Prevent error `UnknownOperationException: Tagging is not currently supported in DynamoDB Local` [GH-6149] * resource/aws_lb_listener: Allow `default_action` `order` to be based on Terraform configuration ordering [GH-6124] * resource/aws_lb_listener_rule: Allow `action` `order` to be based on Terraform configuration ordering [GH-6124] From 20d812683445cf1f6dfe6dcc6cd31c8e14e0a9b9 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 15:29:10 -0500 Subject: [PATCH 2877/3316] Finish integration testing to verify everything works IRL. --- aws/resource_aws_codepipeline_webhook.go | 9 +++++++++ aws/resource_aws_codepipeline_webhook_test.go | 1 + website/docs/r/codepipeline_webhook.markdown | 1 + 3 files changed, 11 insertions(+) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 61c164d977a..9c467d5bddf 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -65,6 +65,12 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Required: true, ForceNew: true, }, + + "url": { + Type: schema.TypeString, + Computed: true, + }, + "target": { Type: schema.TypeList, MaxItems: 1, @@ -177,6 +183,9 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface arn := *webhook.Webhook.Arn d.SetId(arn) + url := *webhook.Webhook.Url + d.Set("url", url) + return resourceAwsCodePipelineWebhookRead(d, meta) } diff --git a/aws/resource_aws_codepipeline_webhook_test.go b/aws/resource_aws_codepipeline_webhook_test.go index 14096b1bbcf..230abcd506e 100644 --- a/aws/resource_aws_codepipeline_webhook_test.go +++ b/aws/resource_aws_codepipeline_webhook_test.go @@ -28,6 +28,7 @@ func TestAccAWSCodePipelineWebhook_basic(t *testing.T) { testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), + resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "url"), ), }, }, diff --git a/website/docs/r/codepipeline_webhook.markdown b/website/docs/r/codepipeline_webhook.markdown index 0fc834e15e3..9af0bd52ad0 100644 --- a/website/docs/r/codepipeline_webhook.markdown +++ b/website/docs/r/codepipeline_webhook.markdown @@ -136,3 +136,4 @@ A `target` block supports the following arguments: In addition to all arguments above, the following attributes are exported: * `id` - The CodePipeline webhook's ARN. +* `url` - The CodePipeline webhook's URL. Send events to this endpoint to trigger the target. From 80fd89407b243e98dcfe40442e7fb997081bf76e Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 17:33:39 -0500 Subject: [PATCH 2878/3316] SetId to remove from state --- aws/resource_aws_codebuild_webhook.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/resource_aws_codebuild_webhook.go b/aws/resource_aws_codebuild_webhook.go index 6022d4fd167..ab3d44a3bd2 100644 --- a/aws/resource_aws_codebuild_webhook.go +++ b/aws/resource_aws_codebuild_webhook.go @@ -130,5 +130,7 @@ func resourceAwsCodeBuildWebhookDelete(d *schema.ResourceData, meta interface{}) return err } + d.SetId("") + return nil } From d033e03867a4f52f28b1cd4e087ee44321d97de7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sun, 14 Oct 2018 18:33:57 -0400 Subject: [PATCH 2879/3316] Update CHANGELOG for #6151 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 029b538fd54..50918d16478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ENHANCEMENTS: +* resource/aws_cloudwatch_metric_alarm: Validate `alarm_actions` [GH-6151] * resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` [GH-6140] * resource/aws_dx_connection: Add `jumbo_frame_capable` attribute [GH-6143] * resource/aws_dynamodb_table: Prevent error `UnknownOperationException: Tagging is not currently supported in DynamoDB Local` [GH-6149] From e97acb330221c1b93fad72f58a88052759c42a2c Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 17:34:56 -0500 Subject: [PATCH 2880/3316] Revert "SetId to remove from state" This reverts commit 80fd89407b243e98dcfe40442e7fb997081bf76e. --- aws/resource_aws_codebuild_webhook.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/aws/resource_aws_codebuild_webhook.go b/aws/resource_aws_codebuild_webhook.go index ab3d44a3bd2..6022d4fd167 100644 --- a/aws/resource_aws_codebuild_webhook.go +++ b/aws/resource_aws_codebuild_webhook.go @@ -130,7 +130,5 @@ func resourceAwsCodeBuildWebhookDelete(d *schema.ResourceData, meta interface{}) return err } - d.SetId("") - return nil } From 8363b528830fc85294f96d1049c7b9b80758d344 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 17:35:51 -0500 Subject: [PATCH 2881/3316] SetId to blank to remove from state. --- aws/resource_aws_codepipeline_webhook.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 9c467d5bddf..84d031980c4 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -324,5 +324,7 @@ func resourceAwsCodePipelineWebhookDelete(d *schema.ResourceData, meta interface return fmt.Errorf("Could not delete webhook: %s", err) } + d.SetId("") + return nil } From d3899335922e94d5e8cadade5db1f1dcd349f8bc Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Sun, 14 Oct 2018 19:12:23 -0500 Subject: [PATCH 2882/3316] Address PR comments. --- aws/resource_aws_athena_database.go | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index 6f0e99ece9f..fe5e7b80a7c 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -51,6 +51,11 @@ func resourceAwsAthenaDatabase() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + athena.EncryptionOptionCseKms, + athena.EncryptionOptionSseKms, + athena.EncryptionOptionSseS3, + }, false), }, }, }, @@ -59,28 +64,19 @@ func resourceAwsAthenaDatabase() *schema.Resource { } } -func getResultConfig(d *schema.ResourceData) (*athena.ResultConfiguration, error) { +func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList []interface{}) (*athena.ResultConfiguration, error) { resultConfig := athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), + OutputLocation: aws.String("s3://" + bucket), } - e := d.Get("encryption_key").([]interface{}) - if len(e) <= 0 { + if len(encryptionConfigurationList) <= 0 { return &resultConfig, nil } - data := e[0].(map[string]interface{}) + data := encryptionConfigurationList[0].(map[string]interface{}) keyType := data["type"].(string) keyID := data["id"].(string) - if len(keyType) <= 0 { - return nil, fmt.Errorf("An encryption key type is required") - } - - if strings.HasSuffix(keyType, "_KMS") && len(keyID) <= 0 { - return nil, fmt.Errorf("Key type %s requires a valid KMS key ID", keyType) - } - encryptionConfig := athena.EncryptionConfiguration{ EncryptionOption: aws.String(keyType), } @@ -97,7 +93,7 @@ func getResultConfig(d *schema.ResourceData) (*athena.ResultConfiguration, error func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn - resultConfig, err := getResultConfig(d) + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_key").([]interface{})) if err != nil { return err } @@ -122,7 +118,7 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn - resultConfig, err := getResultConfig(d) + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_key").([]interface{})) if err != nil { return err } @@ -150,7 +146,7 @@ func resourceAwsAthenaDatabaseUpdate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn - resultConfig, err := getResultConfig(d) + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_key").([]interface{})) if err != nil { return err } From 636db337c04b1857b964896ea83102db87c3b088 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Sun, 14 Oct 2018 22:06:25 -0500 Subject: [PATCH 2883/3316] validating mtu input & adding expanding vif update function --- aws/dx_vif.go | 18 +++++++++++++ ...source_aws_dx_private_virtual_interface.go | 27 ++++++++++++++++--- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index ea659c7b6c9..b56dd6a0e67 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -26,6 +26,24 @@ func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*dire func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + req := &directconnect.UpdateVirtualInterfaceAttributesInput{ + VirtualInterfaceId: aws.String(d.Id()), + } + + requestUpdate := false + if d.HasChange("mtu") { + req.Mtu = aws.Int64(int64(d.Get("mtu").(int))) + requestUpdate = true + } + + if requestUpdate { + log.Printf("[DEBUG] Modifying Virtual Interface attributes (%s), opts:\n%s", d.Id(), req) + _, err := conn.UpdateVirtualInterfaceAttributes(req) + if err != nil { + return fmt.Errorf("Error updating Virtual Interface attributes (%s), error: %s", d.Id(), err) + } + } + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index dc4ac4bfd61..3b99ff24cbd 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -85,10 +85,10 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { ForceNew: true, }, "mtu": { - Type: schema.TypeInt, - Default: 1500, - Optional: true, - ForceNew: true, + Type: schema.TypeInt, + Default: 1500, + Optional: true, + ValidateFunc: IntInSlice([]int{1500, 9001}), }, "jumbo_frame_capable": { Type: schema.TypeBool, @@ -235,3 +235,22 @@ func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *d directconnect.VirtualInterfaceStateDown, }) } + +func IntInSlice(valid []int) schema.SchemaValidateFunc { + return func(i interface{}, k string) (s []string, es []error) { + v, ok := i.(int) + if !ok { + es = append(es, fmt.Errorf("expected type of %s to be int", k)) + return + } + + for _, in := range valid { + if v == in { + return + } + } + + es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v)) + return + } +} From c8aae5dd08a586ad77ea882521909360e7fab7bf Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Sun, 14 Oct 2018 19:28:50 -0400 Subject: [PATCH 2884/3316] provider: Replace validateRFC3339TimeString usage with upstream validation.ValidateRFC3339TimeString --- aws/resource_aws_spot_fleet_request.go | 4 +- aws/resource_aws_spot_instance_request.go | 4 +- aws/resource_aws_ssm_activation.go | 3 +- aws/validators.go | 9 --- aws/validators_test.go | 72 ----------------------- 5 files changed, 6 insertions(+), 86 deletions(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index 95cdc9354a2..4dbd1e6e270 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -317,13 +317,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "valid_until": { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "fleet_type": { Type: schema.TypeString, diff --git a/aws/resource_aws_spot_instance_request.go b/aws/resource_aws_spot_instance_request.go index d336db6c101..5ac18f65c8a 100644 --- a/aws/resource_aws_spot_instance_request.go +++ b/aws/resource_aws_spot_instance_request.go @@ -94,14 +94,14 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, Computed: true, } s["valid_until"] = &schema.Schema{ Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, Computed: true, } return s diff --git a/aws/resource_aws_ssm_activation.go b/aws/resource_aws_ssm_activation.go index fa3cc6181f3..95ed6d41ff4 100644 --- a/aws/resource_aws_ssm_activation.go +++ b/aws/resource_aws_ssm_activation.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/ssm" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSsmActivation() *schema.Resource { @@ -36,7 +37,7 @@ func resourceAwsSsmActivation() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "iam_role": { Type: schema.TypeString, diff --git a/aws/validators.go b/aws/validators.go index 3d064ea0de5..8768cbdbe22 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -23,15 +23,6 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) -// When released, replace all usage with upstream validation function: -// https://github.com/hashicorp/terraform/pull/17484 -func validateRFC3339TimeString(v interface{}, k string) (ws []string, errors []error) { - if _, err := time.Parse(time.RFC3339, v.(string)); err != nil { - errors = append(errors, fmt.Errorf("%q: %s", k, err)) - } - return -} - // validateTypeStringNullableBoolean provides custom error messaging for TypeString booleans // Some arguments require three values: true, false, and "" (unspecified). // This ValidateFunc returns a custom message since the message with diff --git a/aws/validators_test.go b/aws/validators_test.go index 8ea201bfdd4..76a5f324112 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -9,78 +9,6 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentity" ) -func TestValidateRFC3339TimeString(t *testing.T) { - testCases := []struct { - val interface{} - expectedErr *regexp.Regexp - }{ - { - val: "2018-03-01T00:00:00Z", - }, - { - val: "2018-03-01T00:00:00-05:00", - }, - { - val: "2018-03-01T00:00:00+05:00", - }, - { - val: "03/01/2018", - expectedErr: regexp.MustCompile(regexp.QuoteMeta(`cannot parse "1/2018" as "2006"`)), - }, - { - val: "03-01-2018", - expectedErr: regexp.MustCompile(regexp.QuoteMeta(`cannot parse "1-2018" as "2006"`)), - }, - { - val: "2018-03-01", - expectedErr: regexp.MustCompile(regexp.QuoteMeta(`cannot parse "" as "T"`)), - }, - { - val: "2018-03-01T", - expectedErr: regexp.MustCompile(regexp.QuoteMeta(`cannot parse "" as "15"`)), - }, - { - val: "2018-03-01T00:00:00", - expectedErr: regexp.MustCompile(regexp.QuoteMeta(`cannot parse "" as "Z07:00"`)), - }, - { - val: "2018-03-01T00:00:00Z05:00", - expectedErr: regexp.MustCompile(regexp.QuoteMeta(`extra text: 05:00`)), - }, - { - val: "2018-03-01T00:00:00Z-05:00", - expectedErr: regexp.MustCompile(regexp.QuoteMeta(`extra text: -05:00`)), - }, - } - - matchErr := func(errs []error, r *regexp.Regexp) bool { - // err must match one provided - for _, err := range errs { - if r.MatchString(err.Error()) { - return true - } - } - - return false - } - - for i, tc := range testCases { - _, errs := validateRFC3339TimeString(tc.val, "test_property") - - if len(errs) == 0 && tc.expectedErr == nil { - continue - } - - if len(errs) != 0 && tc.expectedErr == nil { - t.Fatalf("expected test case %d to produce no errors, got %v", i, errs) - } - - if !matchErr(errs, tc.expectedErr) { - t.Fatalf("expected test case %d to produce error matching \"%s\", got %v", i, tc.expectedErr, errs) - } - } -} - func TestValidateTypeStringNullableBoolean(t *testing.T) { testCases := []struct { val interface{} From 49d3b2637868fa79f696e27c16504940dde6803c Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Mon, 15 Oct 2018 11:15:57 -0400 Subject: [PATCH 2885/3316] fixes per @bflad --- aws/import_aws_redshift_event_subscription.go | 17 - aws/provider.go | 580 +++++++++--------- ...esource_aws_redshift_event_subscription.go | 101 +-- ...ce_aws_redshift_event_subscription_test.go | 98 ++- .../redshift_event_subscription.html.markdown | 14 +- 5 files changed, 354 insertions(+), 456 deletions(-) delete mode 100644 aws/import_aws_redshift_event_subscription.go diff --git a/aws/import_aws_redshift_event_subscription.go b/aws/import_aws_redshift_event_subscription.go deleted file mode 100644 index 1506381b985..00000000000 --- a/aws/import_aws_redshift_event_subscription.go +++ /dev/null @@ -1,17 +0,0 @@ -package aws - -import "github.com/hashicorp/terraform/helper/schema" - -func resourceAwsRedshiftEventSubscriptionImport( - d *schema.ResourceData, - meta interface{}) ([]*schema.ResourceData, error) { - - // The db event subscription Read function only needs the "name" of the event subscription - // in order to populate the necessary values. This takes the "id" from the supplied StateFunc - // and sets it as the "name" attribute, as described in the import documentation. This allows - // the Read function to actually succeed and set the ID of the resource - results := make([]*schema.ResourceData, 1, 1) - d.Set("name", d.Id()) - results[0] = d - return results, nil -} diff --git a/aws/provider.go b/aws/provider.go index fc4eb671dd1..6f97120a810 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -393,296 +393,296 @@ func Provider() terraform.ResourceProvider { "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), - "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ec2_fleet": resourceAwsEc2Fleet(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_eks_cluster": resourceAwsEksCluster(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), - "aws_glue_classifier": resourceAwsGlueClassifier(), - "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_crawler": resourceAwsGlueCrawler(), - "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_trigger": resourceAwsGlueTrigger(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), - "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_launch_template": resourceAwsLaunchTemplate(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), - "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_neptune_cluster": resourceAwsNeptuneCluster(), - "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), - "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), - "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), - "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), - "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), - "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_organizations_policy": resourceAwsOrganizationsPolicy(), - "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), - "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), - "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), - "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), - "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), - "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), - "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), - "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_swf_domain": resourceAwsSwfDomain(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), - "aws_pinpoint_app": resourceAwsPinpointApp(), - "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), - "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), - "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), - "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), - "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), - "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), + "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), + "aws_dynamodb_table": resourceAwsDynamoDbTable(), + "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), + "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ec2_fleet": resourceAwsEc2Fleet(), + "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), + "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), + "aws_ecr_repository": resourceAwsEcrRepository(), + "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), + "aws_ecs_cluster": resourceAwsEcsCluster(), + "aws_ecs_service": resourceAwsEcsService(), + "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_mount_target": resourceAwsEfsMountTarget(), + "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), + "aws_eip": resourceAwsEip(), + "aws_eip_association": resourceAwsEipAssociation(), + "aws_eks_cluster": resourceAwsEksCluster(), + "aws_elasticache_cluster": resourceAwsElasticacheCluster(), + "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), + "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), + "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), + "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), + "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), + "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), + "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), + "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), + "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), + "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), + "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), + "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), + "aws_elb": resourceAwsElb(), + "aws_elb_attachment": resourceAwsElbAttachment(), + "aws_emr_cluster": resourceAwsEMRCluster(), + "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), + "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), + "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), + "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), + "aws_glue_classifier": resourceAwsGlueClassifier(), + "aws_glue_connection": resourceAwsGlueConnection(), + "aws_glue_crawler": resourceAwsGlueCrawler(), + "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_trigger": resourceAwsGlueTrigger(), + "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), + "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), + "aws_iam_access_key": resourceAwsIamAccessKey(), + "aws_iam_account_alias": resourceAwsIamAccountAlias(), + "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), + "aws_iam_group_policy": resourceAwsIamGroupPolicy(), + "aws_iam_group": resourceAwsIamGroup(), + "aws_iam_group_membership": resourceAwsIamGroupMembership(), + "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), + "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), + "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), + "aws_iam_policy": resourceAwsIamPolicy(), + "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), + "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), + "aws_iam_role_policy": resourceAwsIamRolePolicy(), + "aws_iam_role": resourceAwsIamRole(), + "aws_iam_saml_provider": resourceAwsIamSamlProvider(), + "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), + "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), + "aws_iam_user_policy": resourceAwsIamUserPolicy(), + "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), + "aws_iam_user": resourceAwsIamUser(), + "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), + "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), + "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), + "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), + "aws_instance": resourceAwsInstance(), + "aws_internet_gateway": resourceAwsInternetGateway(), + "aws_iot_certificate": resourceAwsIotCertificate(), + "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_type": resourceAwsIotThingType(), + "aws_iot_topic_rule": resourceAwsIotTopicRule(), + "aws_key_pair": resourceAwsKeyPair(), + "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), + "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kms_alias": resourceAwsKmsAlias(), + "aws_kms_grant": resourceAwsKmsGrant(), + "aws_kms_key": resourceAwsKmsKey(), + "aws_lambda_function": resourceAwsLambdaFunction(), + "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), + "aws_lambda_alias": resourceAwsLambdaAlias(), + "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_lightsail_domain": resourceAwsLightsailDomain(), + "aws_lightsail_instance": resourceAwsLightsailInstance(), + "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), + "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), + "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), + "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), + "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), + "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), + "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), + "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), + "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), + "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), + "aws_mq_broker": resourceAwsMqBroker(), + "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), + "aws_nat_gateway": resourceAwsNatGateway(), + "aws_network_acl": resourceAwsNetworkAcl(), + "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), + "aws_neptune_cluster": resourceAwsNeptuneCluster(), + "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), + "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), + "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), + "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), + "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), + "aws_network_acl_rule": resourceAwsNetworkAclRule(), + "aws_network_interface": resourceAwsNetworkInterface(), + "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), + "aws_opsworks_application": resourceAwsOpsworksApplication(), + "aws_opsworks_stack": resourceAwsOpsworksStack(), + "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), + "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), + "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), + "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), + "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), + "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), + "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), + "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), + "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), + "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), + "aws_opsworks_instance": resourceAwsOpsworksInstance(), + "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), + "aws_opsworks_permission": resourceAwsOpsworksPermission(), + "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), + "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), + "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), + "aws_placement_group": resourceAwsPlacementGroup(), + "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), + "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_redshift_cluster": resourceAwsRedshiftCluster(), + "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), + "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), + "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), + "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), + "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), + "aws_route53_query_log": resourceAwsRoute53QueryLog(), + "aws_route53_record": resourceAwsRoute53Record(), + "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), + "aws_route53_zone": resourceAwsRoute53Zone(), + "aws_route53_health_check": resourceAwsRoute53HealthCheck(), + "aws_route": resourceAwsRoute(), + "aws_route_table": resourceAwsRouteTable(), + "aws_default_route_table": resourceAwsDefaultRouteTable(), + "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), + "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), + "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), + "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), + "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), + "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), + "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), + "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), + "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_bucket": resourceAwsS3Bucket(), + "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_object": resourceAwsS3BucketObject(), + "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), + "aws_security_group": resourceAwsSecurityGroup(), + "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), + "aws_default_security_group": resourceAwsDefaultSecurityGroup(), + "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), + "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), + "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), + "aws_simpledb_domain": resourceAwsSimpleDBDomain(), + "aws_ssm_activation": resourceAwsSsmActivation(), + "aws_ssm_association": resourceAwsSsmAssociation(), + "aws_ssm_document": resourceAwsSsmDocument(), + "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), + "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), + "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), + "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), + "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), + "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), + "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), + "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), + "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), + "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), + "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), + "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), + "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), + "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), + "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), + "aws_sqs_queue": resourceAwsSqsQueue(), + "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), + "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), + "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), + "aws_sns_topic": resourceAwsSnsTopic(), + "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), + "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), + "aws_sfn_activity": resourceAwsSfnActivity(), + "aws_sfn_state_machine": resourceAwsSfnStateMachine(), + "aws_default_subnet": resourceAwsDefaultSubnet(), + "aws_subnet": resourceAwsSubnet(), + "aws_swf_domain": resourceAwsSwfDomain(), + "aws_volume_attachment": resourceAwsVolumeAttachment(), + "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), + "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), + "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), + "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), + "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), + "aws_default_vpc": resourceAwsDefaultVpc(), + "aws_vpc": resourceAwsVpc(), + "aws_vpc_endpoint": resourceAwsVpcEndpoint(), + "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), + "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), + "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), + "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), + "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), + "aws_vpn_connection": resourceAwsVpnConnection(), + "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), + "aws_vpn_gateway": resourceAwsVpnGateway(), + "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), + "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), + "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), + "aws_waf_ipset": resourceAwsWafIPSet(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), + "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), + "aws_waf_web_acl": resourceAwsWafWebAcl(), + "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), + "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), + "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), + "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), + "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), + "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), + "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_pinpoint_app": resourceAwsPinpointApp(), + "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), + "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), + "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), + "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), + "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point diff --git a/aws/resource_aws_redshift_event_subscription.go b/aws/resource_aws_redshift_event_subscription.go index 8fc296f2983..8704ba6fb83 100644 --- a/aws/resource_aws_redshift_event_subscription.go +++ b/aws/resource_aws_redshift_event_subscription.go @@ -7,7 +7,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/redshift" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -18,7 +17,7 @@ func resourceAwsRedshiftEventSubscription() *schema.Resource { Update: resourceAwsRedshiftEventSubscriptionUpdate, Delete: resourceAwsRedshiftEventSubscriptionDelete, Importer: &schema.ResourceImporter{ - State: resourceAwsRedshiftEventSubscriptionImport, + State: schema.ImportStatePassthrough, }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(40 * time.Minute), @@ -31,9 +30,10 @@ func resourceAwsRedshiftEventSubscription() *schema.Resource { Required: true, ForceNew: true, }, - "sns_topic": { - Type: schema.TypeString, - Required: true, + "sns_topic_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, }, "status": { Type: schema.TypeString, @@ -79,43 +79,23 @@ func resourceAwsRedshiftEventSubscription() *schema.Resource { func resourceAwsRedshiftEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - var name string - if v, ok := d.GetOk("name"); ok { - name = v.(string) - } else { - name = resource.UniqueId() - } - - tags := tagsFromMapRedshift(d.Get("tags").(map[string]interface{})) - - sourceIdsSet := d.Get("source_ids").(*schema.Set) - sourceIds := make([]*string, sourceIdsSet.Len()) - for i, sourceId := range sourceIdsSet.List() { - sourceIds[i] = aws.String(sourceId.(string)) - } - - eventCategoriesSet := d.Get("event_categories").(*schema.Set) - eventCategories := make([]*string, eventCategoriesSet.Len()) - for i, eventCategory := range eventCategoriesSet.List() { - eventCategories[i] = aws.String(eventCategory.(string)) - } request := &redshift.CreateEventSubscriptionInput{ - SubscriptionName: aws.String(name), - SnsTopicArn: aws.String(d.Get("sns_topic").(string)), + SubscriptionName: aws.String(d.Get("name").(string)), + SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), Enabled: aws.Bool(d.Get("enabled").(bool)), - SourceIds: sourceIds, + SourceIds: expandStringSet(d.Get("source_ids").(*schema.Set)), SourceType: aws.String(d.Get("source_type").(string)), Severity: aws.String(d.Get("severity").(string)), - EventCategories: eventCategories, - Tags: tags, + EventCategories: expandStringSet(d.Get("event_categories").(*schema.Set)), + Tags: tagsFromMapRedshift(d.Get("tags").(map[string]interface{})), } log.Println("[DEBUG] Create Redshift Event Subscription:", request) output, err := conn.CreateEventSubscription(request) if err != nil || output.EventSubscription == nil { - return fmt.Errorf("Error creating Redshift Event Subscription %s: %s", name, err) + return fmt.Errorf("Error creating Redshift Event Subscription %s: %s", d.Get("name").(string), err) } d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId)) @@ -139,7 +119,7 @@ func resourceAwsRedshiftEventSubscriptionRead(d *schema.ResourceData, meta inter if err := d.Set("name", sub.CustSubscriptionId); err != nil { return err } - if err := d.Set("sns_topic", sub.SnsTopicArn); err != nil { + if err := d.Set("sns_topic_arn", sub.SnsTopicArn); err != nil { return err } if err := d.Set("status", sub.Status); err != nil { @@ -195,57 +175,20 @@ func resourceAwsRedshiftEventSubscriptionRetrieve(name string, conn *redshift.Re func resourceAwsRedshiftEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).redshiftconn - requestUpdate := false - req := &redshift.ModifyEventSubscriptionInput{ SubscriptionName: aws.String(d.Id()), + SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), + Enabled: aws.Bool(d.Get("enabled").(bool)), + SourceIds: expandStringSet(d.Get("source_ids").(*schema.Set)), + SourceType: aws.String(d.Get("source_type").(string)), + Severity: aws.String(d.Get("severity").(string)), + EventCategories: expandStringSet(d.Get("event_categories").(*schema.Set)), } - eventCategoriesSet := d.Get("event_categories").(*schema.Set) - req.EventCategories = make([]*string, eventCategoriesSet.Len()) - for i, eventCategory := range eventCategoriesSet.List() { - req.EventCategories[i] = aws.String(eventCategory.(string)) - } - if d.HasChange("event_categories") { - requestUpdate = true - } - - req.Enabled = aws.Bool(d.Get("enabled").(bool)) - if d.HasChange("enabled") { - requestUpdate = true - } - - req.SnsTopicArn = aws.String(d.Get("sns_topic").(string)) - if d.HasChange("sns_topic") { - requestUpdate = true - } - - req.SourceType = aws.String(d.Get("source_type").(string)) - if d.HasChange("source_type") { - requestUpdate = true - } - - req.Severity = aws.String(d.Get("severity").(string)) - if d.HasChange("severity") { - requestUpdate = true - } - - sourceIdsSet := d.Get("source_ids").(*schema.Set) - req.SourceIds = make([]*string, sourceIdsSet.Len()) - for i, sourceId := range sourceIdsSet.List() { - req.SourceIds[i] = aws.String(sourceId.(string)) - } - if d.HasChange("source_ids") { - requestUpdate = true - } - - log.Printf("[DEBUG] Should send Redshift Event Subscription modification request: %#v", requestUpdate) - if requestUpdate { - log.Printf("[DEBUG] Redshift Event Subscription modification request: %#v", req) - _, err := conn.ModifyEventSubscription(req) - if err != nil { - return fmt.Errorf("Modifying Redshift Event Subscription %s failed: %s", d.Id(), err) - } + log.Printf("[DEBUG] Redshift Event Subscription modification request: %#v", req) + _, err := conn.ModifyEventSubscription(req) + if err != nil { + return fmt.Errorf("Modifying Redshift Event Subscription %s failed: %s", d.Id(), err) } return nil diff --git a/aws/resource_aws_redshift_event_subscription_test.go b/aws/resource_aws_redshift_event_subscription_test.go index 71e47059da7..46715046793 100644 --- a/aws/resource_aws_redshift_event_subscription_test.go +++ b/aws/resource_aws_redshift_event_subscription_test.go @@ -2,7 +2,6 @@ package aws import ( "fmt" - "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -13,30 +12,6 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSRedshiftEventSubscription_importBasic(t *testing.T) { - resourceName := "aws_redshift_event_subscription.bar" - rInt := acctest.RandInt() - subscriptionName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSRedshiftEventSubscriptionConfig(rInt), - }, - - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateId: subscriptionName, - }, - }, - }) -} - func TestAccAWSRedshiftEventSubscription_basicUpdate(t *testing.T) { var v redshift.EventSubscription rInt := acctest.RandInt() @@ -68,6 +43,11 @@ func TestAccAWSRedshiftEventSubscription_basicUpdate(t *testing.T) { resource.TestCheckResourceAttr("aws_redshift_event_subscription.bar", "tags.Name", "new-name"), ), }, + { + ResourceName: "aws_redshift_event_subscription.bar", + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -75,7 +55,7 @@ func TestAccAWSRedshiftEventSubscription_basicUpdate(t *testing.T) { func TestAccAWSRedshiftEventSubscription_withPrefix(t *testing.T) { var v redshift.EventSubscription rInt := acctest.RandInt() - startsWithPrefix := regexp.MustCompile("^tf-acc-test-redshift-event-subs-") + rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -83,19 +63,24 @@ func TestAccAWSRedshiftEventSubscription_withPrefix(t *testing.T) { CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSRedshiftEventSubscriptionConfigWithPrefix(rInt), + Config: testAccAWSRedshiftEventSubscriptionConfig(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSRedshiftEventSubscriptionExists("aws_redshift_event_subscription.bar", &v), resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "enabled", "true"), resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "source_type", "cluster"), - resource.TestMatchResourceAttr( - "aws_redshift_event_subscription.bar", "name", startsWithPrefix), + resource.TestCheckResourceAttr( + "aws_redshift_event_subscription.bar", "name", rName), resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "tags.Name", "name"), ), }, + { + ResourceName: "aws_redshift_event_subscription.bar", + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -103,6 +88,7 @@ func TestAccAWSRedshiftEventSubscription_withPrefix(t *testing.T) { func TestAccAWSRedshiftEventSubscription_withSourceIds(t *testing.T) { var v redshift.EventSubscription rInt := acctest.RandInt() + rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-with-ids-%d", rInt) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -118,7 +104,7 @@ func TestAccAWSRedshiftEventSubscription_withSourceIds(t *testing.T) { resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "source_type", "cluster-parameter-group"), resource.TestCheckResourceAttr( - "aws_redshift_event_subscription.bar", "name", fmt.Sprintf("tf-acc-test-redshift-event-subs-with-ids-%d", rInt)), + "aws_redshift_event_subscription.bar", "name", rName), resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "source_ids.#", "1"), ), @@ -132,11 +118,16 @@ func TestAccAWSRedshiftEventSubscription_withSourceIds(t *testing.T) { resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "source_type", "cluster-parameter-group"), resource.TestCheckResourceAttr( - "aws_redshift_event_subscription.bar", "name", fmt.Sprintf("tf-acc-test-redshift-event-subs-with-ids-%d", rInt)), + "aws_redshift_event_subscription.bar", "name", rName), resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "source_ids.#", "2"), ), }, + { + ResourceName: "aws_redshift_event_subscription.bar", + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -144,6 +135,7 @@ func TestAccAWSRedshiftEventSubscription_withSourceIds(t *testing.T) { func TestAccAWSRedshiftEventSubscription_categoryUpdate(t *testing.T) { var v redshift.EventSubscription rInt := acctest.RandInt() + rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -159,7 +151,7 @@ func TestAccAWSRedshiftEventSubscription_categoryUpdate(t *testing.T) { resource.TestCheckResourceAttr( "aws_redshift_event_subscription.bar", "source_type", "cluster"), resource.TestCheckResourceAttr( - "aws_redshift_event_subscription.bar", "name", fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt)), + "aws_redshift_event_subscription.bar", "name", rName), ), }, { @@ -172,6 +164,11 @@ func TestAccAWSRedshiftEventSubscription_categoryUpdate(t *testing.T) { "aws_redshift_event_subscription.bar", "source_type", "cluster"), ), }, + { + ResourceName: "aws_redshift_event_subscription.bar", + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -255,30 +252,7 @@ resource "aws_sns_topic" "aws_sns_topic" { resource "aws_redshift_event_subscription" "bar" { name = "tf-acc-test-redshift-event-subs-%d" - sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" - source_type = "cluster" - severity = "INFO" - event_categories = [ - "configuration", - "management", - "monitoring", - "security", - ] - tags { - Name = "name" - } -}`, rInt, rInt) -} - -func testAccAWSRedshiftEventSubscriptionConfigWithPrefix(rInt int) string { - return fmt.Sprintf(` -resource "aws_sns_topic" "aws_sns_topic" { - name = "tf-acc-test-redshift-event-subs-sns-topic-%d" -} - -resource "aws_redshift_event_subscription" "bar" { - name = "tf-acc-test-redshift-event-subs-%d" - sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + sns_topic_arn = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "cluster" severity = "INFO" event_categories = [ @@ -301,7 +275,7 @@ resource "aws_sns_topic" "aws_sns_topic" { resource "aws_redshift_event_subscription" "bar" { name = "tf-acc-test-redshift-event-subs-%d" - sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + sns_topic_arn = "${aws_sns_topic.aws_sns_topic.arn}" enabled = false source_type = "cluster-snapshot" severity = "INFO" @@ -328,7 +302,7 @@ resource "aws_redshift_parameter_group" "bar" { resource "aws_redshift_event_subscription" "bar" { name = "tf-acc-test-redshift-event-subs-with-ids-%d" - sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + sns_topic_arn = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "cluster-parameter-group" severity = "INFO" source_ids = ["${aws_redshift_parameter_group.bar.id}"] @@ -348,20 +322,20 @@ func testAccAWSRedshiftEventSubscriptionConfigUpdateSourceIds(rInt int) string { } resource "aws_redshift_parameter_group" "bar" { - name = "redshift-parameter-group-event-%d" + name = "tf-acc-redshift-parameter-group-event-%d" family = "redshift-1.0" description = "Test parameter group for terraform" } resource "aws_redshift_parameter_group" "foo" { - name = "redshift-parameter-group-event-2-%d" + name = "tf-acc-redshift-parameter-group-event-2-%d" family = "redshift-1.0" description = "Test parameter group for terraform" } resource "aws_redshift_event_subscription" "bar" { name = "tf-acc-test-redshift-event-subs-with-ids-%d" - sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + sns_topic_arn = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "cluster-parameter-group" severity = "INFO" source_ids = ["${aws_redshift_parameter_group.bar.id}","${aws_redshift_parameter_group.foo.id}"] @@ -382,7 +356,7 @@ resource "aws_sns_topic" "aws_sns_topic" { resource "aws_redshift_event_subscription" "bar" { name = "tf-acc-test-redshift-event-subs-%d" - sns_topic = "${aws_sns_topic.aws_sns_topic.arn}" + sns_topic_arn = "${aws_sns_topic.aws_sns_topic.arn}" source_type = "cluster" severity = "INFO" event_categories = [ diff --git a/website/docs/r/redshift_event_subscription.html.markdown b/website/docs/r/redshift_event_subscription.html.markdown index d2f44a1fb26..affb14402a5 100644 --- a/website/docs/r/redshift_event_subscription.html.markdown +++ b/website/docs/r/redshift_event_subscription.html.markdown @@ -16,12 +16,8 @@ Provides a Redshift event subscription resource. resource "aws_redshift_cluster" "default" { cluster_identifier = "default" database_name = "default" - node_type = "dc1.large" - cluster_type = "single-node" - master_username = "default" - master_password = "default" - ... + # ... } resource "aws_sns_topic" "default" { @@ -52,10 +48,10 @@ resource "aws_redshift_event_subscription" "default" { The following arguments are supported: -* `name` - (rEquired) The name of the Redshift event subscription. -* `sns_topic` - (Required) The SNS topic to send events to. +* `name` - (Required) The name of the Redshift event subscription. +* `sns_topic_arn` - (Required) The ARN of the SNS topic to send events to. * `source_ids` - (Optional) A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified. -* `source_type` - (Optional) The type of source that will be generating the events. Valid options are `cluster`, `cluster-parameter-group`, ``, `cluster-security-group`, or` cluster-snapshot`. If not set, all sources will be subscribed to. +* `source_type` - (Optional) The type of source that will be generating the events. Valid options are `cluster`, `cluster-parameter-group`, `cluster-security-group`, or `cluster-snapshot`. If not set, all sources will be subscribed to. * `severity` - (Optional) The event severity to be published by the notification subscription. Valid options are `INFO` or `ERROR`. * `event_categories` - (Optional) A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run `aws redshift describe-event-categories`. * `enabled` - (Optional) A boolean flag to enable/disable the subscription. Defaults to true. @@ -68,6 +64,8 @@ The following additional atttributes are provided: * `id` - The name of the Redshift event notification subscription * `customer_aws_id` - The AWS customer account associated with the Redshift event notification subscription +## Import + Redshift Event Subscriptions can be imported using the `name`, e.g. ``` From 81be831bc504ba4f1d56baadbcd9168d4615809d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 15 Oct 2018 12:09:27 -0400 Subject: [PATCH 2886/3316] Update CHANGELOG for #6146 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50918d16478..7a1c578da83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.41.0 (Unreleased) +FEATURES: + +* **New Resource:** `aws_redshift_event_subscription` [GH-6146] + ENHANCEMENTS: * resource/aws_cloudwatch_metric_alarm: Validate `alarm_actions` [GH-6151] From ae54dc45078655daa8394364aa4441ad9230403c Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 11:12:00 -0500 Subject: [PATCH 2887/3316] Update PR based on @bflad's feedback on my Athena PR. --- GNUmakefile | 2 +- aws/resource_aws_codepipeline_webhook.go | 89 +++++++++++++++--------- 2 files changed, 56 insertions(+), 35 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index eec5686780d..b448b890bf8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,7 +16,7 @@ sweep: test: fmtcheck go test $(TEST) -timeout=30s -parallel=4 -testacc: fmtcheck +testacc: TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m fmt: diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 84d031980c4..8ebe995038f 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -94,7 +94,7 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { } } -func flattenWebhookAttr(d *schema.ResourceData, attr string) (map[string]interface{}, error) { +func extractCodePipelineWebhookAttr(d *schema.ResourceData, attr string) (map[string]interface{}, error) { if v, ok := d.GetOk(attr); ok { l := v.([]interface{}) if len(l) <= 0 { @@ -108,21 +108,7 @@ func flattenWebhookAttr(d *schema.ResourceData, attr string) (map[string]interfa return nil, fmt.Errorf("Could not find attribute %s", attr) } -func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).codepipelineconn - - auth, err := flattenWebhookAttr(d, "auth") - if err != nil { - return err - } - - target, err := flattenWebhookAttr(d, "target") - if err != nil { - return err - } - - filters := d.Get("filter").(*schema.Set) - +func extractCodePipelineWebhookRules(filters *schema.Set) ([]*codepipeline.WebhookFilterRule, error) { var rules []*codepipeline.WebhookFilterRule for _, f := range filters.List() { @@ -136,15 +122,19 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface } if len(rules) <= 0 { - return fmt.Errorf("One or more webhook filter rule is required (%d rules from %d filter blocks)", len(rules), len(filters.List())) + return nil, fmt.Errorf("One or more webhook filter rule is required (%d rules from %d filter blocks)", len(rules), len(filters.List())) } + return rules, nil +} + +func extractCodePipelineWebhookAuthConfig(auth map[string]interface{}) (*codepipeline.WebhookAuthConfiguration, error) { var authConfig codepipeline.WebhookAuthConfiguration switch auth["type"].(string) { case "IP": ipRange := auth["allowed_ip_range"].(string) if ipRange == "" { - return fmt.Errorf("An IP range must be set when using IP-based auth") + return nil, fmt.Errorf("An IP range must be set when using IP-based auth") } authConfig.AllowedIPRange = &ipRange @@ -153,7 +143,7 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface case "GITHUB_HMAC": secretToken := auth["secret_token"].(string) if secretToken == "" { - return fmt.Errorf("Secret token must be set when using GITHUB_HMAC") + return nil, fmt.Errorf("Secret token must be set when using GITHUB_HMAC") } authConfig.SecretToken = &secretToken @@ -161,20 +151,43 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface case "UNAUTHENTICATED": break default: - return fmt.Errorf("Invalid authentication type %s", auth["type"]) + return nil, fmt.Errorf("Invalid authentication type %s", auth["type"]) + } + + return &authConfig, nil +} + +func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + + auth, err := extractCodePipelineWebhookAttr(d, "auth") + if err != nil { + return err + } + + target, err := extractCodePipelineWebhookAttr(d, "target") + if err != nil { + return err } + rules, err := extractCodePipelineWebhookRules(d.Get("filter").(*schema.Set)) + if err != nil { + return err + } + + authConfig, err := extractCodePipelineWebhookAuthConfig(auth) + request := &codepipeline.PutWebhookInput{ Webhook: &codepipeline.WebhookDefinition{ - Authentication: aws.String(auth["type"].(string)), - Filters: rules, - Name: aws.String(d.Get("name").(string)), - TargetAction: aws.String(target["action"].(string)), - TargetPipeline: aws.String(target["pipeline"].(string)), + Authentication: aws.String(auth["type"].(string)), + Filters: rules, + Name: aws.String(d.Get("name").(string)), + TargetAction: aws.String(target["action"].(string)), + TargetPipeline: aws.String(target["pipeline"].(string)), + AuthenticationConfiguration: authConfig, }, } - request.Webhook.AuthenticationConfiguration = &authConfig webhook, err := conn.PutWebhook(request) if err != nil { return fmt.Errorf("Error creating webhook: %s", err) @@ -261,6 +274,21 @@ func setCodePipelineWebhookAuthentication(webhook codepipeline.WebhookDefinition return nil } +func setCodePipelineWebhookTarget(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { + var t []interface{} + target := map[string]interface{}{ + "action": *webhook.TargetAction, + "pipeline": *webhook.TargetPipeline, + } + t = append(t, target) + + if err := d.Set("target", t); err != nil { + return err + } + + return nil +} + func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn arn := d.Id() @@ -297,14 +325,7 @@ func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{} return err } - var t []interface{} - target := map[string]interface{}{ - "action": *found.TargetAction, - "pipeline": *found.TargetPipeline, - } - t = append(t, target) - - if err := d.Set("target", t); err != nil { + if err = setCodePipelineWebhookTarget(found, d); err != nil { return err } From 9bc1688fa3e46bd9771400155c0b9360cbfaba61 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 11:26:38 -0500 Subject: [PATCH 2888/3316] Add validator functions and convert auth type to the AWS SDK's constants. --- aws/resource_aws_codepipeline_webhook.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 8ebe995038f..80e2049de47 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codepipeline" @@ -29,14 +30,20 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { "type": { Type: schema.TypeString, Required: true, + ValidateFunc: validation.StringInSlice([]string{ + codepipeline.WebhookAuthenticationTypeGithubHmac, + codepipeline.WebhookAuthenticationTypeIp, + codepipeline.WebhookAuthenticationTypeUnauthenticated, + }, false), }, "secret_token": { Type: schema.TypeString, Optional: true, }, "allowed_ip_range": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.CIDRNetwork(0, 32), }, }, }, @@ -131,7 +138,7 @@ func extractCodePipelineWebhookRules(filters *schema.Set) ([]*codepipeline.Webho func extractCodePipelineWebhookAuthConfig(auth map[string]interface{}) (*codepipeline.WebhookAuthConfiguration, error) { var authConfig codepipeline.WebhookAuthConfiguration switch auth["type"].(string) { - case "IP": + case codepipeline.WebhookAuthenticationTypeIp: ipRange := auth["allowed_ip_range"].(string) if ipRange == "" { return nil, fmt.Errorf("An IP range must be set when using IP-based auth") @@ -140,7 +147,7 @@ func extractCodePipelineWebhookAuthConfig(auth map[string]interface{}) (*codepip authConfig.AllowedIPRange = &ipRange break - case "GITHUB_HMAC": + case codepipeline.WebhookAuthenticationTypeGithubHmac: secretToken := auth["secret_token"].(string) if secretToken == "" { return nil, fmt.Errorf("Secret token must be set when using GITHUB_HMAC") @@ -148,7 +155,7 @@ func extractCodePipelineWebhookAuthConfig(auth map[string]interface{}) (*codepip authConfig.SecretToken = &secretToken break - case "UNAUTHENTICATED": + case codepipeline.WebhookAuthenticationTypeUnauthenticated: break default: return nil, fmt.Errorf("Invalid authentication type %s", auth["type"]) From 84bcb524d4c70e8c0e41461ecdc93eee1aebdc28 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 11:45:49 -0500 Subject: [PATCH 2889/3316] Make this required since AWS requires at least 1. --- aws/resource_aws_codepipeline_webhook.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 80e2049de47..392d1cc4b55 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -50,7 +50,7 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { }, "filter": { Type: schema.TypeSet, - Optional: true, + Required: true, ForceNew: true, MinItems: 1, Elem: &schema.Resource{ @@ -128,10 +128,6 @@ func extractCodePipelineWebhookRules(filters *schema.Set) ([]*codepipeline.Webho rules = append(rules, &filter) } - if len(rules) <= 0 { - return nil, fmt.Errorf("One or more webhook filter rule is required (%d rules from %d filter blocks)", len(rules), len(filters.List())) - } - return rules, nil } From bf6966e048427ab37062fd55aa0860caaaaba0b6 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 11:49:03 -0500 Subject: [PATCH 2890/3316] Back out fmtcheck revert. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index b448b890bf8..eec5686780d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,7 +16,7 @@ sweep: test: fmtcheck go test $(TEST) -timeout=30s -parallel=4 -testacc: +testacc: fmtcheck TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m fmt: From 2ef5e57ad19c73690ed65ea6f015d5fa34b04a69 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 11:54:46 -0500 Subject: [PATCH 2891/3316] Address lint issue. --- aws/resource_aws_codepipeline_webhook.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 392d1cc4b55..fcabf2fd648 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -179,6 +179,9 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface } authConfig, err := extractCodePipelineWebhookAuthConfig(auth) + if err != nil { + return err + } request := &codepipeline.PutWebhookInput{ Webhook: &codepipeline.WebhookDefinition{ From 257a94ad24e6fb69edc4d7e5d0bcc66a95408d6c Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Mon, 15 Oct 2018 11:55:19 -0500 Subject: [PATCH 2892/3316] adding acc test for updating mtu --- ...e_aws_dx_private_virtual_interface_test.go | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 4a56bf352ed..93f64a4b6d2 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -88,6 +88,55 @@ func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { }) } +func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { + key := "DX_CONNECTION_ID" + connectionId := os.Getenv(key) + if connectionId == "" { + t.Skipf("Environment variable %s is not set", key) + } + vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + bgpAsn := randIntRange(64512, 65534) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + ), + }, + { + Config: testAccDxPrivateVirtualInterfaceConfig_mtuCapable(connectionId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), + ), + }, + { + Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "0"), + ), + }, + // Test import. + { + ResourceName: "aws_dx_private_virtual_interface.foo", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAwsDxPrivateVirtualInterfaceDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).dxconn From 659633dfbfc4b7afe9159734934f0353a1c5b6b4 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 13:48:49 -0500 Subject: [PATCH 2893/3316] Make HCL look like AWS API structs. --- aws/resource_aws_athena_database.go | 16 ++++++++-------- aws/resource_aws_athena_database_test.go | 8 ++++---- website/docs/r/athena_database.html.markdown | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index fe5e7b80a7c..e62cf330a60 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -38,17 +38,17 @@ func resourceAwsAthenaDatabase() *schema.Resource { Optional: true, Default: false, }, - "encryption_key": { + "encryption_configuration": { Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "id": { + "kms_key": { Type: schema.TypeString, Optional: true, }, - "type": { + "encryption_option": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ @@ -74,8 +74,8 @@ func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList } data := encryptionConfigurationList[0].(map[string]interface{}) - keyType := data["type"].(string) - keyID := data["id"].(string) + keyType := data["encryption_option"].(string) + keyID := data["kms_key"].(string) encryptionConfig := athena.EncryptionConfiguration{ EncryptionOption: aws.String(keyType), @@ -93,7 +93,7 @@ func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn - resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_key").([]interface{})) + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) if err != nil { return err } @@ -118,7 +118,7 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn - resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_key").([]interface{})) + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) if err != nil { return err } @@ -146,7 +146,7 @@ func resourceAwsAthenaDatabaseUpdate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn - resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_key").([]interface{})) + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) if err != nil { return err } diff --git a/aws/resource_aws_athena_database_test.go b/aws/resource_aws_athena_database_test.go index 0916290a450..6c353814b14 100644 --- a/aws/resource_aws_athena_database_test.go +++ b/aws/resource_aws_athena_database_test.go @@ -43,7 +43,7 @@ func TestAccAWSAthenaDatabase_encryption(t *testing.T) { Config: testAccAthenaDatabaseWithKMSConfig(rInt, dbName, false), Check: resource.ComposeTestCheckFunc( testAccCheckAWSAthenaDatabaseExists("aws_athena_database.hoge"), - resource.TestCheckResourceAttr("aws_athena_database.hoge", "encryption_key.0.type", "SSE_KMS"), + resource.TestCheckResourceAttr("aws_athena_database.hoge", "encryption_configuration.0.encryption_option", "SSE_KMS"), ), }, }, @@ -378,9 +378,9 @@ resource "aws_athena_database" "hoge" { bucket = "${aws_s3_bucket.hoge.bucket}" force_destroy = %[3]t - encryption_key { - type = "SSE_KMS" - id = "${aws_kms_key.hoge.arn}" + encryption_configuration { + encryption_option = "SSE_KMS" + kms_key = "${aws_kms_key.hoge.arn}" } } `, randInt, dbName, forceDestroy) diff --git a/website/docs/r/athena_database.html.markdown b/website/docs/r/athena_database.html.markdown index f323398971e..192327e74b1 100644 --- a/website/docs/r/athena_database.html.markdown +++ b/website/docs/r/athena_database.html.markdown @@ -29,13 +29,13 @@ The following arguments are supported: * `name` - (Required) Name of the database to create. * `bucket` - (Required) Name of s3 bucket to save the results of the query execution. -* `encryption_key` - (Optional) The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An `encryption_key` block is documented below. +* `encryption_configuration` - (Optional) The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An `encryption_key` block is documented below. * `force_destroy` - (Optional, Default: false) A boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are *not* recoverable. An `encryption_key` block supports the following arguments: -* `type` - (Required) The type of key; one of `SSE_S3`, `SSE_KMS`, `CSE_KMS` -* `id` - (Optional) The KMS key ARN or ID; required for key types `SSE_KMS` and `CSE_KMS`. +* `encryption_option` - (Required) The type of key; one of `SSE_S3`, `SSE_KMS`, `CSE_KMS` +* `kms_key` - (Optional) The KMS key ARN or ID; required for key types `SSE_KMS` and `CSE_KMS`. ~> **NOTE:** When Athena queries are executed, result files may be created in the specified bucket. Consider using `force_destroy` on the bucket too in order to avoid any problems when destroying the bucket. From 5e115c2c8e5b3e76b401a555994dded8c3f87947 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 13:57:03 -0500 Subject: [PATCH 2894/3316] Add a few notes about naming for resources, attributes, and arguments. --- .github/CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index bedb27756ff..6f5d9222eb1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -237,6 +237,13 @@ existing resources, but you still get to implement something completely new. covering their behavior. See [Writing Acceptance Tests](#writing-acceptance-tests) below for a detailed guide on how to approach these. + - [ ] __Naming__: Resources should be named `aws__` where + `service` is the AWS short service name and `name` is a short, preferably + single word, description of the resource. Use `_` as a separator. + resources. We therefore encourage you to only submit **1 resource at a time**. + - [ ] __Arguments_and_Attributes__: The HCL for Arguments and attributes should + mimic the types and structs presented by the AWS API. API arguments should be + converted from `CamelCase` to `camel_case`. - [ ] __Documentation__: Each resource gets a page in the Terraform documentation. The [Terraform website][website] source is in this repo and includes instructions for getting a local copy of the site up and From 5b26b77a3af2d4ecfcfef16df25faf3edf568649 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 13:58:31 -0500 Subject: [PATCH 2895/3316] Formatting. --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6f5d9222eb1..9a116626f86 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -241,7 +241,7 @@ existing resources, but you still get to implement something completely new. `service` is the AWS short service name and `name` is a short, preferably single word, description of the resource. Use `_` as a separator. resources. We therefore encourage you to only submit **1 resource at a time**. - - [ ] __Arguments_and_Attributes__: The HCL for Arguments and attributes should + - [ ] __Arguments_and_Attributes__: The HCL for arguments and attributes should mimic the types and structs presented by the AWS API. API arguments should be converted from `CamelCase` to `camel_case`. - [ ] __Documentation__: Each resource gets a page in the Terraform From ec24ddec03a0ce98969d1f197dafbb154cf6ef52 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Mon, 15 Oct 2018 15:02:32 -0500 Subject: [PATCH 2896/3316] Fix two typos in docs. --- website/docs/r/athena_database.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/athena_database.html.markdown b/website/docs/r/athena_database.html.markdown index 192327e74b1..7054f42a3f2 100644 --- a/website/docs/r/athena_database.html.markdown +++ b/website/docs/r/athena_database.html.markdown @@ -29,10 +29,10 @@ The following arguments are supported: * `name` - (Required) Name of the database to create. * `bucket` - (Required) Name of s3 bucket to save the results of the query execution. -* `encryption_configuration` - (Optional) The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An `encryption_key` block is documented below. +* `encryption_configuration` - (Optional) The encryption key block AWS Athena uses to decrypt the data in S3, such as an AWS Key Management Service (AWS KMS) key. An `encryption_configuration` block is documented below. * `force_destroy` - (Optional, Default: false) A boolean that indicates all tables should be deleted from the database so that the database can be destroyed without error. The tables are *not* recoverable. -An `encryption_key` block supports the following arguments: +An `encryption_configuration` block supports the following arguments: * `encryption_option` - (Required) The type of key; one of `SSE_S3`, `SSE_KMS`, `CSE_KMS` * `kms_key` - (Optional) The KMS key ARN or ID; required for key types `SSE_KMS` and `CSE_KMS`. From b1af788f7299e34b73f9769eb3ce225630325742 Mon Sep 17 00:00:00 2001 From: jwr Date: Mon, 15 Oct 2018 16:29:51 -0400 Subject: [PATCH 2897/3316] cloudformation parameter is a map, not a list --- website/docs/r/cloudformation_stack.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/cloudformation_stack.html.markdown b/website/docs/r/cloudformation_stack.html.markdown index 9c45f435be5..8cefd9ffda0 100644 --- a/website/docs/r/cloudformation_stack.html.markdown +++ b/website/docs/r/cloudformation_stack.html.markdown @@ -59,7 +59,7 @@ The following arguments are supported: * `notification_arns` - (Optional) A list of SNS topic ARNs to publish stack related events. * `on_failure` - (Optional) Action to be taken if stack creation fails. This must be one of: `DO_NOTHING`, `ROLLBACK`, or `DELETE`. Conflicts with `disable_rollback`. -* `parameters` - (Optional) A list of Parameter structures that specify input parameters for the stack. +* `parameters` - (Optional) A map of Parameter structures that specify input parameters for the stack. * `policy_body` - (Optional) Structure containing the stack policy body. Conflicts w/ `policy_url`. * `policy_url` - (Optional) Location of a file containing the stack policy. @@ -93,4 +93,4 @@ $ terraform import aws_cloudformation_stack.stack networking-stack - `create` - (Default `30 minutes`) Used for Creating Stacks - `update` - (Default `30 minutes`) Used for Stack modifications -- `delete` - (Default `30 minutes`) Used for destroying stacks. \ No newline at end of file +- `delete` - (Default `30 minutes`) Used for destroying stacks. From 763e34ee76ef3c89365f3f2aba8681b0675f6a26 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 15 Oct 2018 16:39:59 -0400 Subject: [PATCH 2898/3316] vendor: hashicorp/terraform@v0.11.9-beta1 Updated via: `govendor fetch github.com/hashicorp/terraform/...@v0.11.9-beta1` --- .../terraform/helper/resource/testing.go | 12 + .../terraform/helper/schema/resource_data.go | 1 + .../terraform/helper/schema/resource_diff.go | 26 +- .../terraform/helper/schema/schema.go | 2 +- .../terraform/terraform/test_failure | 9 - .../hashicorp/terraform/version/version.go | 4 +- vendor/vendor.json | 264 +++++++++--------- 7 files changed, 167 insertions(+), 151 deletions(-) delete mode 100644 vendor/github.com/hashicorp/terraform/terraform/test_failure diff --git a/vendor/github.com/hashicorp/terraform/helper/resource/testing.go b/vendor/github.com/hashicorp/terraform/helper/resource/testing.go index af3d2dda41f..b97673fdf5d 100644 --- a/vendor/github.com/hashicorp/terraform/helper/resource/testing.go +++ b/vendor/github.com/hashicorp/terraform/helper/resource/testing.go @@ -418,6 +418,17 @@ func LogOutput(t TestT) (logOutput io.Writer, err error) { return } +// ParallelTest performs an acceptance test on a resource, allowing concurrency +// with other ParallelTest. +// +// Tests will fail if they do not properly handle conditions to allow multiple +// tests to occur against the same resource or service (e.g. random naming). +// All other requirements of the Test function also apply to this function. +func ParallelTest(t TestT, c TestCase) { + t.Parallel() + Test(t, c) +} + // Test performs an acceptance test on a resource. // // Tests are not run unless an environmental variable "TF_ACC" is @@ -1128,6 +1139,7 @@ type TestT interface { Fatal(args ...interface{}) Skip(args ...interface{}) Name() string + Parallel() } // This is set to true by unit tests to alter some behavior diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go index 22d57a5ee06..6cc01ee0bd4 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go @@ -315,6 +315,7 @@ func (d *ResourceData) State() *terraform.InstanceState { mapW := &MapFieldWriter{Schema: d.schema} if err := mapW.WriteField(nil, rawMap); err != nil { + log.Printf("[ERR] Error writing fields: %s", err) return nil } diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go index 92b891fc5b3..7db3decc5f2 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource_diff.go @@ -231,7 +231,7 @@ func (d *ResourceDiff) UpdatedKeys() []string { // Note that this does not wipe an override. This function is only allowed on // computed keys. func (d *ResourceDiff) Clear(key string) error { - if err := d.checkKey(key, "Clear"); err != nil { + if err := d.checkKey(key, "Clear", true); err != nil { return err } @@ -287,7 +287,7 @@ func (d *ResourceDiff) diffChange(key string) (interface{}, interface{}, bool, b // // This function is only allowed on computed attributes. func (d *ResourceDiff) SetNew(key string, value interface{}) error { - if err := d.checkKey(key, "SetNew"); err != nil { + if err := d.checkKey(key, "SetNew", false); err != nil { return err } @@ -299,7 +299,7 @@ func (d *ResourceDiff) SetNew(key string, value interface{}) error { // // This function is only allowed on computed attributes. func (d *ResourceDiff) SetNewComputed(key string) error { - if err := d.checkKey(key, "SetNewComputed"); err != nil { + if err := d.checkKey(key, "SetNewComputed", false); err != nil { return err } @@ -535,12 +535,24 @@ func childAddrOf(child, parent string) bool { } // checkKey checks the key to make sure it exists and is computed. -func (d *ResourceDiff) checkKey(key, caller string) error { - s, ok := d.schema[key] - if !ok { +func (d *ResourceDiff) checkKey(key, caller string, nested bool) error { + var schema *Schema + if nested { + keyParts := strings.Split(key, ".") + schemaL := addrToSchema(keyParts, d.schema) + if len(schemaL) > 0 { + schema = schemaL[len(schemaL)-1] + } + } else { + s, ok := d.schema[key] + if ok { + schema = s + } + } + if schema == nil { return fmt.Errorf("%s: invalid key: %s", caller, key) } - if !s.Computed { + if !schema.Computed { return fmt.Errorf("%s only operates on computed keys - %s is not one", caller, key) } return nil diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/schema.go b/vendor/github.com/hashicorp/terraform/helper/schema/schema.go index f44010ea52e..0ea5aad5585 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/schema.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/schema.go @@ -199,7 +199,7 @@ type Schema struct { Sensitive bool } -// SchemaDiffSuppresFunc is a function which can be used to determine +// SchemaDiffSuppressFunc is a function which can be used to determine // whether a detected diff on a schema element is "valid" or not, and // suppress it from the plan if necessary. // diff --git a/vendor/github.com/hashicorp/terraform/terraform/test_failure b/vendor/github.com/hashicorp/terraform/terraform/test_failure deleted file mode 100644 index 5d3ad1ac4ed..00000000000 --- a/vendor/github.com/hashicorp/terraform/terraform/test_failure +++ /dev/null @@ -1,9 +0,0 @@ ---- FAIL: TestContext2Plan_moduleProviderInherit (0.01s) - context_plan_test.go:552: bad: []string{"child"} -map[string]dag.Vertex{} -"module.middle.null" -map[string]dag.Vertex{} -"module.middle.module.inner.null" -map[string]dag.Vertex{} -"aws" -FAIL diff --git a/vendor/github.com/hashicorp/terraform/version/version.go b/vendor/github.com/hashicorp/terraform/version/version.go index 996bfa9aaf3..90a9b52dc87 100644 --- a/vendor/github.com/hashicorp/terraform/version/version.go +++ b/vendor/github.com/hashicorp/terraform/version/version.go @@ -11,12 +11,12 @@ import ( ) // The main version number that is being run at the moment. -const Version = "0.11.8" +const Version = "0.11.9" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. -var Prerelease = "" +var Prerelease = "beta1" // SemVer is an instance of version.Version. This has the secondary // benefit of verifying during tests and init time that our version is a diff --git a/vendor/vendor.json b/vendor/vendor.json index 85b15947d71..4d1fd61c0ba 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1357,258 +1357,258 @@ { "checksumSHA1": "MpMvoeVDNxeoOQTI+hUxt+0bHdY=", "path": "github.com/hashicorp/terraform/config", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "WzQP2WfiCYlaALKZVqEFsxZsG1o=", "path": "github.com/hashicorp/terraform/config/configschema", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "3V7300kyZF+AGy/cOKV0+P6M3LY=", "path": "github.com/hashicorp/terraform/config/hcl2shim", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "/5UEeukyNbbP/j80Jht10AZ+Law=", "path": "github.com/hashicorp/terraform/config/module", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "mPbjVPD2enEey45bP4M83W2AxlY=", "path": "github.com/hashicorp/terraform/dag", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "P8gNPDuOzmiK4Lz9xG7OBy4Rlm8=", "path": "github.com/hashicorp/terraform/flatmap", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "zx5DLo5aV0xDqxGTzSibXg7HHAA=", "path": "github.com/hashicorp/terraform/helper/acctest", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "uT6Q9RdSRAkDjyUgQlJ2XKJRab4=", "path": "github.com/hashicorp/terraform/helper/config", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "qVmQPoZmJ2w2OnaxIheWfuwun6g=", "path": "github.com/hashicorp/terraform/helper/customdiff", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "FH5eOEHfHgdxPC/JnfmCeSBk66U=", "path": "github.com/hashicorp/terraform/helper/encryption", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "KNvbU1r5jv0CBeQLnEtDoL3dRtc=", "path": "github.com/hashicorp/terraform/helper/hashcode", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "B267stWNQd0/pBTXHfI/tJsxzfc=", "path": "github.com/hashicorp/terraform/helper/hilmapstructure", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "j8XqkwLh2W3r3i6wnCRmve07BgI=", "path": "github.com/hashicorp/terraform/helper/logging", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "twkFd4x71kBnDfrdqO5nhs8dMOY=", "path": "github.com/hashicorp/terraform/helper/mutexkv", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "ImyqbHM/xe3eAT2moIjLI8ksuks=", "path": "github.com/hashicorp/terraform/helper/pathorcontents", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { - "checksumSHA1": "3ml5nA9mNVoK30lE2W0DxQIPWiw=", + "checksumSHA1": "ejnz+70aL76+An9FZymcUcg0lUU=", "path": "github.com/hashicorp/terraform/helper/resource", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { - "checksumSHA1": "zA2C6Pg+7DII0K3M0g49R/nRLvc=", + "checksumSHA1": "OOwTGBTHcUmQTPBdyscTMkjApbI=", "path": "github.com/hashicorp/terraform/helper/schema", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "Fzbv+N7hFXOtrR6E7ZcHT3jEE9s=", "path": "github.com/hashicorp/terraform/helper/structure", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "nEC56vB6M60BJtGPe+N9rziHqLg=", "path": "github.com/hashicorp/terraform/helper/validation", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "kD1ayilNruf2cES1LDfNZjYRscQ=", "path": "github.com/hashicorp/terraform/httpclient", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "yFWmdS6yEJZpRJzUqd/mULqCYGk=", "path": "github.com/hashicorp/terraform/moduledeps", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "DqaoG++NXRCfvH/OloneLWrM+3k=", "path": "github.com/hashicorp/terraform/plugin", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "tx5xrdiUWdAHqoRV5aEfALgT1aU=", "path": "github.com/hashicorp/terraform/plugin/discovery", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "dD3uZ27A7V6r2ZcXabXbUwOxD2E=", "path": "github.com/hashicorp/terraform/registry", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "cR87P4V5aiEfvF+1qoBi2JQyQS4=", "path": "github.com/hashicorp/terraform/registry/regsrc", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "y9IXgIJQq9XNy1zIYUV2Kc0KsnA=", "path": "github.com/hashicorp/terraform/registry/response", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "VXlzRRDVOqeMvnnrbUcR9H64OA4=", "path": "github.com/hashicorp/terraform/svchost", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "o6CMncmy6Q2F+r13sEOeT6R9GF8=", "path": "github.com/hashicorp/terraform/svchost/auth", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "uEzjKyPvbd8k5VGdgn4b/2rDDi0=", "path": "github.com/hashicorp/terraform/svchost/disco", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { - "checksumSHA1": "lHCKONqlaHsn5cEaYltad7dvRq8=", + "checksumSHA1": "SJ9F1euNPxacFDFaic/Ks4SUUzw=", "path": "github.com/hashicorp/terraform/terraform", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "+K+oz9mMTmQMxIA3KVkGRfjvm9I=", "path": "github.com/hashicorp/terraform/tfdiags", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { - "checksumSHA1": "Q4ecxPd9vFU2UX32HtqsZDSS9Po=", + "checksumSHA1": "WJiYLbmIspnkzrhPRAHB6H9JE7g=", "path": "github.com/hashicorp/terraform/version", - "revision": "6dfc4d748de9cda23835bc5704307ed45e839622", - "revisionTime": "2018-08-15T22:00:39Z", - "version": "v0.11.8", - "versionExact": "v0.11.8" + "revision": "48c1ae62b3e1f5e5bc1c2e9ab3e64c7b4b86a6a1", + "revisionTime": "2018-10-15T19:04:37Z", + "version": "v0.11.9-beta1", + "versionExact": "v0.11.9-beta1" }, { "checksumSHA1": "bSdPFOHaTwEvM4PIvn0PZfn75jM=", From f8e3c38e0121b5ce153fe2698d8296312b010488 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 15 Oct 2018 18:02:33 -0400 Subject: [PATCH 2899/3316] vendor: aws/aws-sdk-go@v1.15.55 Updated via: `govendor fetch github.com/aws/aws-sdk-go/...@v1.15.55` --- .../aws/aws-sdk-go/aws/defaults/defaults.go | 6 +- .../aws/aws-sdk-go/aws/session/session.go | 117 +- .../aws-sdk-go/aws/session/shared_config.go | 44 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../internal/shareddefaults/ecs_container.go | 12 + .../aws/aws-sdk-go/service/cloudtrail/api.go | 247 +- .../aws-sdk-go/service/cloudtrail/errors.go | 15 +- .../aws/aws-sdk-go/service/lambda/api.go | 1018 ++--- .../aws/aws-sdk-go/service/lambda/errors.go | 6 +- .../aws/aws-sdk-go/service/rds/api.go | 229 +- .../aws-sdk-go/service/servicecatalog/api.go | 3347 +++++++++++++++-- vendor/vendor.json | 1048 +++--- 12 files changed, 4549 insertions(+), 1542 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 6cd84cd96de..23bb639e018 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -24,6 +24,7 @@ import ( "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/shareddefaults" ) // A Defaults provides a collection of default values for SDK clients. @@ -114,7 +115,6 @@ func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Pro const ( httpProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN" httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" - ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" ) // RemoteCredProvider returns a credentials provider for the default remote @@ -124,8 +124,8 @@ func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.P return localHTTPCredProvider(cfg, handlers, u) } - if uri := os.Getenv(ecsCredsProviderEnvVar); len(uri) > 0 { - u := fmt.Sprintf("http://169.254.170.2%s", uri) + if uri := os.Getenv(shareddefaults.ECSCredsProviderEnvVar); len(uri) > 0 { + u := fmt.Sprintf("%s%s", shareddefaults.ECSContainerCredentialsURI, uri) return httpCredProvider(cfg, handlers, u) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 51f30556301..5d7b289501b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -19,8 +19,26 @@ import ( "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/shareddefaults" ) +const ( + // ErrCodeSharedConfig represents an error that occurs in the shared + // configuration logic + ErrCodeSharedConfig = "SharedConfigErr" +) + +// ErrSharedConfigSourceCollision will be returned if a section contains both +// source_profile and credential_source +var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only source profile or credential source can be specified, not both", nil) + +// ErrSharedConfigECSContainerEnvVarEmpty will be returned if the environment +// variables are empty and Environment was set as the credential source +var ErrSharedConfigECSContainerEnvVarEmpty = awserr.New(ErrCodeSharedConfig, "EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set", nil) + +// ErrSharedConfigInvalidCredSource will be returned if an invalid credential source was provided +var ErrSharedConfigInvalidCredSource = awserr.New(ErrCodeSharedConfig, "credential source values must be EcsContainer, Ec2InstanceMetadata, or Environment", nil) + // A Session provides a central location to create service clients from and // store configurations and request handlers for those services. // @@ -436,6 +454,57 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share // Configure credentials if not already set if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil { + + // inspect the profile to see if a credential source has been specified. + if envCfg.EnableSharedConfig && len(sharedCfg.AssumeRole.CredentialSource) > 0 { + + // if both credential_source and source_profile have been set, return an error + // as this is undefined behavior. + if len(sharedCfg.AssumeRole.SourceProfile) > 0 { + return ErrSharedConfigSourceCollision + } + + // valid credential source values + const ( + credSourceEc2Metadata = "Ec2InstanceMetadata" + credSourceEnvironment = "Environment" + credSourceECSContainer = "EcsContainer" + ) + + switch sharedCfg.AssumeRole.CredentialSource { + case credSourceEc2Metadata: + cfgCp := *cfg + p := defaults.RemoteCredProvider(cfgCp, handlers) + cfgCp.Credentials = credentials.NewCredentials(p) + + if len(sharedCfg.AssumeRole.MFASerial) > 0 && sessOpts.AssumeRoleTokenProvider == nil { + // AssumeRole Token provider is required if doing Assume Role + // with MFA. + return AssumeRoleTokenProviderNotSetError{} + } + + cfg.Credentials = assumeRoleCredentials(cfgCp, handlers, sharedCfg, sessOpts) + case credSourceEnvironment: + cfg.Credentials = credentials.NewStaticCredentialsFromCreds( + envCfg.Creds, + ) + case credSourceECSContainer: + if len(os.Getenv(shareddefaults.ECSCredsProviderEnvVar)) == 0 { + return ErrSharedConfigECSContainerEnvVarEmpty + } + + cfgCp := *cfg + p := defaults.RemoteCredProvider(cfgCp, handlers) + creds := credentials.NewCredentials(p) + + cfg.Credentials = creds + default: + return ErrSharedConfigInvalidCredSource + } + + return nil + } + if len(envCfg.Creds.AccessKeyID) > 0 { cfg.Credentials = credentials.NewStaticCredentialsFromCreds( envCfg.Creds, @@ -445,32 +514,14 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share cfgCp.Credentials = credentials.NewStaticCredentialsFromCreds( sharedCfg.AssumeRoleSource.Creds, ) + if len(sharedCfg.AssumeRole.MFASerial) > 0 && sessOpts.AssumeRoleTokenProvider == nil { // AssumeRole Token provider is required if doing Assume Role // with MFA. return AssumeRoleTokenProviderNotSetError{} } - cfg.Credentials = stscreds.NewCredentials( - &Session{ - Config: &cfgCp, - Handlers: handlers.Copy(), - }, - sharedCfg.AssumeRole.RoleARN, - func(opt *stscreds.AssumeRoleProvider) { - opt.RoleSessionName = sharedCfg.AssumeRole.RoleSessionName - - // Assume role with external ID - if len(sharedCfg.AssumeRole.ExternalID) > 0 { - opt.ExternalID = aws.String(sharedCfg.AssumeRole.ExternalID) - } - - // Assume role with MFA - if len(sharedCfg.AssumeRole.MFASerial) > 0 { - opt.SerialNumber = aws.String(sharedCfg.AssumeRole.MFASerial) - opt.TokenProvider = sessOpts.AssumeRoleTokenProvider - } - }, - ) + + cfg.Credentials = assumeRoleCredentials(cfgCp, handlers, sharedCfg, sessOpts) } else if len(sharedCfg.Creds.AccessKeyID) > 0 { cfg.Credentials = credentials.NewStaticCredentialsFromCreds( sharedCfg.Creds, @@ -493,6 +544,30 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share return nil } +func assumeRoleCredentials(cfg aws.Config, handlers request.Handlers, sharedCfg sharedConfig, sessOpts Options) *credentials.Credentials { + return stscreds.NewCredentials( + &Session{ + Config: &cfg, + Handlers: handlers.Copy(), + }, + sharedCfg.AssumeRole.RoleARN, + func(opt *stscreds.AssumeRoleProvider) { + opt.RoleSessionName = sharedCfg.AssumeRole.RoleSessionName + + // Assume role with external ID + if len(sharedCfg.AssumeRole.ExternalID) > 0 { + opt.ExternalID = aws.String(sharedCfg.AssumeRole.ExternalID) + } + + // Assume role with MFA + if len(sharedCfg.AssumeRole.MFASerial) > 0 { + opt.SerialNumber = aws.String(sharedCfg.AssumeRole.MFASerial) + opt.TokenProvider = sessOpts.AssumeRoleTokenProvider + } + }, + ) +} + // AssumeRoleTokenProviderNotSetError is an error returned when creating a session when the // MFAToken option is not set when shared config is configured load assume a // role with an MFA token. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go index 09c8e5bc7ab..565a0b79508 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go @@ -16,11 +16,12 @@ const ( sessionTokenKey = `aws_session_token` // optional // Assume Role Credentials group - roleArnKey = `role_arn` // group required - sourceProfileKey = `source_profile` // group required - externalIDKey = `external_id` // optional - mfaSerialKey = `mfa_serial` // optional - roleSessionNameKey = `role_session_name` // optional + roleArnKey = `role_arn` // group required + sourceProfileKey = `source_profile` // group required (or credential_source) + credentialSourceKey = `credential_source` // group required (or source_profile) + externalIDKey = `external_id` // optional + mfaSerialKey = `mfa_serial` // optional + roleSessionNameKey = `role_session_name` // optional // Additional Config fields regionKey = `region` @@ -32,11 +33,12 @@ const ( ) type assumeRoleConfig struct { - RoleARN string - SourceProfile string - ExternalID string - MFASerial string - RoleSessionName string + RoleARN string + SourceProfile string + CredentialSource string + ExternalID string + MFASerial string + RoleSessionName string } // sharedConfig represents the configuration fields of the SDK config files. @@ -127,6 +129,13 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { func (cfg *sharedConfig) setAssumeRoleSource(origProfile string, files []sharedConfigFile) error { var assumeRoleSrc sharedConfig + if len(cfg.AssumeRole.CredentialSource) > 0 { + // setAssumeRoleSource is only called when source_profile is found. + // If both source_profile and credential_source are set, then + // ErrSharedConfigSourceCollision will be returned + return ErrSharedConfigSourceCollision + } + // Multiple level assume role chains are not support if cfg.AssumeRole.SourceProfile == origProfile { assumeRoleSrc = *cfg @@ -195,13 +204,16 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile) e // Assume Role roleArn := section.Key(roleArnKey).String() srcProfile := section.Key(sourceProfileKey).String() - if len(roleArn) > 0 && len(srcProfile) > 0 { + credentialSource := section.Key(credentialSourceKey).String() + hasSource := len(srcProfile) > 0 || len(credentialSource) > 0 + if len(roleArn) > 0 && hasSource { cfg.AssumeRole = assumeRoleConfig{ - RoleARN: roleArn, - SourceProfile: srcProfile, - ExternalID: section.Key(externalIDKey).String(), - MFASerial: section.Key(mfaSerialKey).String(), - RoleSessionName: section.Key(roleSessionNameKey).String(), + RoleARN: roleArn, + SourceProfile: srcProfile, + CredentialSource: credentialSource, + ExternalID: section.Key(externalIDKey).String(), + MFASerial: section.Key(mfaSerialKey).String(), + RoleSessionName: section.Key(roleSessionNameKey).String(), } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index d5da73b1181..7a7b37f3734 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.15.53" +const SDKVersion = "1.15.55" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go new file mode 100644 index 00000000000..b63e4c2639b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go @@ -0,0 +1,12 @@ +package shareddefaults + +const ( + // ECSCredsProviderEnvVar is an environmental variable key used to + // determine which path needs to be hit. + ECSCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" +) + +// ECSContainerCredentialsURI is the endpoint to retrieve container +// credentials. This can be overriden to test to ensure the credential process +// is behaving correctly. +var ECSContainerCredentialsURI = "http://169.254.170.2" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index 155ea1d2c00..4ce19ade045 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -77,7 +77,7 @@ func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // -// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail +// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" // This exception is thrown when the specified resource type is not supported @@ -524,12 +524,13 @@ func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (re // Describes the settings for the event selectors that you configured for your // trail. The information returned for your event selectors includes the following: // -// * The S3 objects that you are logging for data events. +// * If your event selector includes read-only events, write-only events, +// or all events. This applies to both management events and data events. // // * If your event selector includes management events. // -// * If your event selector includes read-only events, write-only events, -// or all. +// * If your event selector includes data events, the Amazon S3 objects or +// AWS Lambda functions that you are logging for data events. // // For more information, see Logging Data and Management Events for Trails // (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) @@ -846,7 +847,7 @@ func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // -// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail +// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" // This exception is thrown when the specified resource type is not supported @@ -949,10 +950,11 @@ func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request // LookupEvents API operation for AWS CloudTrail. // -// Looks up API activity events captured by CloudTrail that create, update, -// or delete resources in your account. Events for a region can be looked up -// for the times in which you had CloudTrail turned on in that region during -// the last seven days. Lookup supports the following attributes: +// Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events) +// captured by CloudTrail. Events for a region can be looked up in that region +// during the last 90 days. Lookup supports the following attributes: +// +// * AWS access key // // * Event ID // @@ -960,13 +962,15 @@ func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request // // * Event source // +// * Read only +// // * Resource name // // * Resource type // // * User name // -// All attributes are optional. The default number of results returned is 10, +// All attributes are optional. The default number of results returned is 50, // with a maximum of 50 possible. The response includes a token that you can // use to get the next page of results. // @@ -1114,10 +1118,13 @@ func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (re // PutEventSelectors API operation for AWS CloudTrail. // -// Configures an event selector for your trail. Use event selectors to specify -// whether you want your trail to log management and/or data events. When an -// event occurs in your account, CloudTrail evaluates the event selectors in -// all trails. For each trail, if the event matches any event selector, the +// Configures an event selector for your trail. Use event selectors to further +// specify the management and data event settings for your trail. By default, +// trails created without specific event selectors will be configured to log +// all read and write management events, and no data events. +// +// When an event occurs in your account, CloudTrail evaluates the event selectors +// in all trails. For each trail, if the event matches any event selector, the // trail processes and logs the event. If the event doesn't match any event // selector, the trail doesn't log the event. // @@ -1141,6 +1148,7 @@ func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (re // // You can configure up to five event selectors for each trail. For more information, // see Logging Data and Management Events for Trails (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) +// and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) // in the AWS CloudTrail User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1176,12 +1184,21 @@ func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (re // // * ErrCodeInvalidEventSelectorsException "InvalidEventSelectorsException" // This exception is thrown when the PutEventSelectors operation is called with -// an invalid number of event selectors, data resources, or an invalid value -// for a parameter: +// a number of event selectors or data resources that is not valid. The combination +// of event selectors and data resources is not valid. A trail can have up to +// 5 event selectors. A trail is limited to 250 data resources. These data resources +// can be distributed across event selectors, but the overall total cannot exceed +// 250. +// +// You can: // // * Specify a valid number of event selectors (1 to 5) for a trail. // // * Specify a valid number of data resources (1 to 250) for an event selector. +// The limit of number of resources on an individual event selector is configurable +// up to 250. However, this upper limit is allowed only if the total number +// of data resources does not exceed 250 across all event selectors for a +// trail. // // * Specify a valid value for a parameter. For example, specifying the ReadWriteType // parameter with a value of read-only is invalid. @@ -1275,7 +1292,7 @@ func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Req // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // -// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail +// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" // This exception is thrown when the specified resource type is not supported @@ -1706,7 +1723,7 @@ type AddTagsInput struct { // Specifies the ARN of the trail to which one or more tags will be added. The // format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` @@ -1818,9 +1835,9 @@ type CreateTrailInput struct { // // * alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName + // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 // // * 12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` @@ -1968,7 +1985,7 @@ type CreateTrailOutput struct { // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. // The value is a fully specified ARN to a KMS key in the format: // - // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` // Specifies whether log file integrity validation is enabled. @@ -1989,7 +2006,7 @@ type CreateTrailOutput struct { // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications // when log files are delivered. The format of a topic ARN is: // - // arn:aws:sns:us-east-1:123456789012:MyTopic + // arn:aws:sns:us-east-2:123456789012:MyTopic SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. @@ -2000,7 +2017,7 @@ type CreateTrailOutput struct { // Specifies the ARN of the trail that was created. The format of a trail ARN // is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -2086,41 +2103,93 @@ func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput { return s } -// The Amazon S3 objects that you specify in your event selectors for your trail -// to log data events. Data events are object-level API operations that access -// S3 objects, such as GetObject, DeleteObject, and PutObject. You can specify -// up to 250 S3 buckets and object prefixes for a trail. +// The Amazon S3 buckets or AWS Lambda functions that you specify in your event +// selectors for your trail to log data events. Data events provide insight +// into the resource operations performed on or within a resource itself. These +// are also known as data plane operations. You can specify up to 250 data resources +// for a trail. // -// Example +// The total number of allowed data resources is 250. This number can be distributed +// between 1 and 5 event selectors, but the total cannot exceed 250 across all +// selectors. +// +// The following example demonstrates how logging works when you configure logging +// of all data events for an S3 bucket named bucket-1. In this example, the +// CloudTrail user spcified an empty prefix, and the option to log both Read +// and Write data events. // -// You create an event selector for a trail and specify an S3 bucket and an -// empty prefix, such as arn:aws:s3:::bucket-1/. +// A user uploads an image file to bucket-1. // -// You upload an image file to bucket-1. +// The PutObject API operation is an Amazon S3 object-level API. It is recorded +// as a data event in CloudTrail. Because the CloudTrail user specified an S3 +// bucket with an empty prefix, events that occur on any object in that bucket +// are logged. The trail processes and logs the event. // -// The PutObject API operation occurs on an object in the S3 bucket that you -// specified in the event selector. The trail processes and logs the event. +// A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2. // -// You upload another image file to a different S3 bucket named arn:aws:s3:::bucket-2. +// The PutObject API operation occurred for an object in an S3 bucket that the +// CloudTrail user didn't specify for the trail. The trail doesn’t log the event. // -// The event occurs on an object in an S3 bucket that you didn't specify in -// the event selector. The trail doesn’t log the event. +// The following example demonstrates how logging works when you configure logging +// of AWS Lambda data events for a Lambda function named MyLambdaFunction, but +// not for all AWS Lambda functions. +// +// A user runs a script that includes a call to the MyLambdaFunction function +// and the MyOtherLambdaFunction function. +// +// The Invoke API operation on MyLambdaFunction is an AWS Lambda API. It is +// recorded as a data event in CloudTrail. Because the CloudTrail user specified +// logging data events for MyLambdaFunction, any invocations of that function +// are logged. The trail processes and logs the event. +// +// The Invoke API operation on MyOtherLambdaFunction is an AWS Lambda API. Because +// the CloudTrail user did not specify logging data events for all Lambda functions, +// the Invoke operation for MyOtherLambdaFunction does not match the function +// specified for the trail. The trail doesn’t log the event. type DataResource struct { _ struct{} `type:"structure"` - // The resource type in which you want to log data events. You can specify only - // the following value: AWS::S3::Object. + // The resource type in which you want to log data events. You can specify AWS::S3::Object + // or AWS::Lambda::Function resources. Type *string `type:"string"` - // A list of ARN-like strings for the specified S3 objects. + // An array of Amazon Resource Name (ARN) strings or partial ARN strings for + // the specified objects. + // + // * To log data events for all objects in all S3 buckets in your AWS account, + // specify the prefix as arn:aws:s3:::. + // + // This will also enable logging of data event activity performed by any user + // or role in your AWS account, even if that activity is performed on a bucket + // that belongs to another AWS account. + // + // * To log data events for all objects in all S3 buckets that include my-bucket + // in their names, specify the prefix as aws:s3:::my-bucket. The trail logs + // data events for all objects in all buckets whose name contains a match + // for my-bucket. + // + // * To log data events for all objects in an S3 bucket, specify the bucket + // and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs + // data events for all objects in this S3 bucket. // - // To log data events for all objects in an S3 bucket, specify the bucket and - // an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs data - // events for all objects in this S3 bucket. + // * To log data events for specific objects, specify the S3 bucket and object + // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data + // events for objects in this S3 bucket that match the prefix. // - // To log data events for specific objects, specify the S3 bucket and object - // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data - // events for objects in this S3 bucket that match the prefix. + // * To log data events for all functions in your AWS account, specify the + // prefix as arn:aws:lambda. + // + // This will also enable logging of Invoke activity performed by any user or + // role in your AWS account, even if that activity is performed on a function + // that belongs to another AWS account. + // + // * To log data eents for a specific Lambda function, specify the function + // ARN. + // + // Lambda function ARNs are exact. Unlike S3, you cannot use matching. For example, + // if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, + // data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld. + // They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2. Values []*string `type:"list"` } @@ -2151,7 +2220,7 @@ type DeleteTrailInput struct { _ struct{} `type:"structure"` // Specifies the name or the CloudTrail ARN of the trail to be deleted. The - // format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -2214,7 +2283,7 @@ type DescribeTrailsInput struct { // Specifies a list of trail names, trail ARNs, or both, of the trails to describe. // The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // If an empty list is specified, information for the trail in the current region // is returned. @@ -2285,6 +2354,11 @@ func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput { type Event struct { _ struct{} `type:"structure"` + // The AWS access key ID that was used to sign the request. If the request was + // made with temporary security credentials, this is the access key ID of the + // temporary credentials. + AccessKeyId *string `type:"string"` + // A JSON string that contains a representation of the event returned. CloudTrailEvent *string `type:"string"` @@ -2300,6 +2374,9 @@ type Event struct { // The date and time of the event returned. EventTime *time.Time `type:"timestamp"` + // Information about whether the event is a write event or a read event. + ReadOnly *string `type:"string"` + // A list of resources referenced by the event returned. Resources []*Resource `type:"list"` @@ -2318,6 +2395,12 @@ func (s Event) GoString() string { return s.String() } +// SetAccessKeyId sets the AccessKeyId field's value. +func (s *Event) SetAccessKeyId(v string) *Event { + s.AccessKeyId = &v + return s +} + // SetCloudTrailEvent sets the CloudTrailEvent field's value. func (s *Event) SetCloudTrailEvent(v string) *Event { s.CloudTrailEvent = &v @@ -2348,6 +2431,12 @@ func (s *Event) SetEventTime(v time.Time) *Event { return s } +// SetReadOnly sets the ReadOnly field's value. +func (s *Event) SetReadOnly(v string) *Event { + s.ReadOnly = &v + return s +} + // SetResources sets the Resources field's value. func (s *Event) SetResources(v []*Resource) *Event { s.Resources = v @@ -2360,20 +2449,26 @@ func (s *Event) SetUsername(v string) *Event { return s } -// Use event selectors to specify whether you want your trail to log management -// and/or data events. When an event occurs in your account, CloudTrail evaluates -// the event selector for all trails. For each trail, if the event matches any -// event selector, the trail processes and logs the event. If the event doesn't -// match any event selector, the trail doesn't log the event. +// Use event selectors to further specify the management and data event settings +// for your trail. By default, trails created without specific event selectors +// will be configured to log all read and write management events, and no data +// events. When an event occurs in your account, CloudTrail evaluates the event +// selector for all trails. For each trail, if the event matches any event selector, +// the trail processes and logs the event. If the event doesn't match any event +// selector, the trail doesn't log the event. // // You can configure up to five event selectors for a trail. type EventSelector struct { _ struct{} `type:"structure"` - // CloudTrail supports logging only data events for S3 objects. You can specify - // up to 250 S3 buckets and object prefixes for a trail. + // CloudTrail supports data event logging for Amazon S3 objects and AWS Lambda + // functions. You can specify up to 250 resources for an individual event selector, + // but the total number of data resources cannot exceed 250 across all event + // selectors in a trail. This limit does not apply if you configure resource + // logging for all data events. // // For more information, see Data Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events) + // and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) // in the AWS CloudTrail User Guide. DataResources []*DataResource `type:"list"` @@ -2436,13 +2531,13 @@ type GetEventSelectorsInput struct { // * Be between 3 and 128 characters // // * Have no adjacent periods, underscores or dashes. Names like my-_namespace - // and my--namespace are invalid. + // and my--namespace are not valid. // // * Not be in IP address format (for example, 192.168.5.4) // // If you specify a trail ARN, it must be in the format: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // TrailName is a required field TrailName *string `type:"string" required:"true"` @@ -2517,7 +2612,7 @@ type GetTrailStatusInput struct { // status. To get the status of a shadow trail (a replication of the trail in // another region), you must specify its ARN. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -2837,7 +2932,7 @@ type ListTagsInput struct { // Specifies a list of trail ARNs whose tags will be listed. The list has a // limit of 20 ARNs. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // ResourceIdList is a required field ResourceIdList []*string `type:"list" required:"true"` @@ -2979,7 +3074,7 @@ type LookupEventsInput struct { LookupAttributes []*LookupAttribute `type:"list"` // The number of events to return. Possible values are 1 through 50. The default - // is 10. + // is 50. MaxResults *int64 `min:"1" type:"integer"` // The token to use to get the next page of results after a previous API call. @@ -3176,7 +3271,7 @@ type PutEventSelectorsInput struct { // // If you specify a trail ARN, it must be in the format: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // TrailName is a required field TrailName *string `type:"string" required:"true"` @@ -3229,7 +3324,7 @@ type PutEventSelectorsOutput struct { // Specifies the ARN of the trail that was updated with event selectors. The // format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -3262,7 +3357,7 @@ type RemoveTagsInput struct { // Specifies the ARN of the trail from which tags should be removed. The format // of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` @@ -3412,7 +3507,7 @@ type StartLoggingInput struct { // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail // logs AWS API calls. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -3471,7 +3566,7 @@ type StopLoggingInput struct { // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail // will stop logging AWS API calls. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -3600,7 +3695,7 @@ type Trail struct { // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. // The value is a fully specified ARN to a KMS key in the format: // - // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` // Specifies whether log file validation is enabled. @@ -3622,7 +3717,7 @@ type Trail struct { // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications // when log files are delivered. The format of a topic ARN is: // - // arn:aws:sns:us-east-1:123456789012:MyTopic + // arn:aws:sns:us-east-2:123456789012:MyTopic SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. @@ -3632,7 +3727,7 @@ type Trail struct { // Specifies the ARN of the trail. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -3775,9 +3870,9 @@ type UpdateTrailInput struct { // // * alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName + // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 // // * 12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` @@ -3799,7 +3894,7 @@ type UpdateTrailInput struct { // // If Name is a trail ARN, it must be in the format: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -3925,7 +4020,7 @@ type UpdateTrailOutput struct { // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. // The value is a fully specified ARN to a KMS key in the format: // - // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` // Specifies whether log file integrity validation is enabled. @@ -3946,7 +4041,7 @@ type UpdateTrailOutput struct { // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications // when log files are delivered. The format of a topic ARN is: // - // arn:aws:sns:us-east-1:123456789012:MyTopic + // arn:aws:sns:us-east-2:123456789012:MyTopic SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. @@ -3957,7 +4052,7 @@ type UpdateTrailOutput struct { // Specifies the ARN of the trail that was updated. The format of a trail ARN // is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -4050,6 +4145,9 @@ const ( // LookupAttributeKeyEventName is a LookupAttributeKey enum value LookupAttributeKeyEventName = "EventName" + // LookupAttributeKeyReadOnly is a LookupAttributeKey enum value + LookupAttributeKeyReadOnly = "ReadOnly" + // LookupAttributeKeyUsername is a LookupAttributeKey enum value LookupAttributeKeyUsername = "Username" @@ -4061,6 +4159,9 @@ const ( // LookupAttributeKeyEventSource is a LookupAttributeKey enum value LookupAttributeKeyEventSource = "EventSource" + + // LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value + LookupAttributeKeyAccessKeyId = "AccessKeyId" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go index 0ee616cbe2d..b1246dca2e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go @@ -10,7 +10,7 @@ const ( // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail ErrCodeARNInvalidException = "CloudTrailARNInvalidException" // ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code @@ -54,12 +54,21 @@ const ( // "InvalidEventSelectorsException". // // This exception is thrown when the PutEventSelectors operation is called with - // an invalid number of event selectors, data resources, or an invalid value - // for a parameter: + // a number of event selectors or data resources that is not valid. The combination + // of event selectors and data resources is not valid. A trail can have up to + // 5 event selectors. A trail is limited to 250 data resources. These data resources + // can be distributed across event selectors, but the overall total cannot exceed + // 250. + // + // You can: // // * Specify a valid number of event selectors (1 to 5) for a trail. // // * Specify a valid number of data resources (1 to 250) for an event selector. + // The limit of number of resources on an individual event selector is configurable + // up to 250. However, this upper limit is allowed only if the total number + // of data resources does not exceed 250 across all event selectors for a + // trail. // // * Specify a valid value for a parameter. For example, specifying the ReadWriteType // parameter with a value of read-only is invalid. diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index 995cfd6d6cf..2bea0f2faf2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -59,17 +59,16 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // // Adds a permission to the resource policy associated with the specified AWS // Lambda function. You use resource policies to grant permissions to event -// sources that use push model. In a push model, event sources (such as Amazon -// S3 and custom applications) invoke your Lambda function. Each permission -// you add to the resource policy allows an event source, permission to invoke +// sources that use the push model. In a push model, event sources (such as +// Amazon S3 and custom applications) invoke your Lambda function. Each permission +// you add to the resource policy allows an event source permission to invoke // the Lambda function. // -// For information about the push model, see Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html). -// -// If you are using versioning, the permissions you add are specific to the -// Lambda function version or alias you specify in the AddPermission request -// via the Qualifier parameter. For more information about versioning, see AWS -// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, +// which can be unqualified (the unpublished version of the function), or include +// a version or alias. If a client uses a version or alias to invoke a function, +// use the Qualifier parameter to apply permissions to that ARN. For more information +// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // This operation requires permission for the lambda:AddPermission action. // @@ -100,6 +99,7 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // Lambda function access policy is limited to 20 KB. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -202,6 +202,7 @@ func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) { @@ -270,8 +271,8 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // CreateEventSourceMapping API operation for AWS Lambda. // // Identifies a poll-based event source for a Lambda function. It can be either -// an Amazon Kinesis or DynamoDB stream, or an Amazon SQS queue. AWS Lambda -// invokes the specified function when records are posted to the event source. +// an Amazon Kinesis or DynamoDB stream. AWS Lambda invokes the specified function +// when records are posted to the event source. // // This association between a poll-based source and a Lambda function is called // the event source mapping. @@ -285,6 +286,9 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // sources for a single Lambda function, but an SQS queue can be mapped only // to a single Lambda function. // +// You can configure an SQS queue in an account separate from your Lambda function's +// account. Also the queue needs to reside in the same AWS region as your function. +// // If you are using versioning, you can specify a specific function version // or an alias via the function name parameter. For more information about versioning, // see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). @@ -312,6 +316,7 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // The resource already exists. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The resource (for example, a Lambda function or access policy statement) @@ -383,14 +388,9 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request // CreateFunction API operation for AWS Lambda. // -// Creates a new Lambda function. The function metadata is created from the -// request parameters, and the code for the function is provided by a .zip file -// in the request body. If the function name already exists, the operation will -// fail. Note that the function name is case-sensitive. -// -// If you are using versioning, you can also publish a version of the Lambda -// function you are creating using the Publish parameter. For more information -// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Creates a new Lambda function. The function configuration is created from +// the request parameters, and the code for the function is provided by a .zip +// file. The function name is case-sensitive. // // This operation requires permission for the lambda:CreateFunction action. // @@ -418,6 +418,7 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request // The resource already exists. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) @@ -512,6 +513,7 @@ func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { @@ -606,6 +608,7 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeResourceInUseException "ResourceInUseException" // The operation conflicts with the resource's availability. For example, you @@ -680,17 +683,9 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request // DeleteFunction API operation for AWS Lambda. // -// Deletes the specified Lambda function code and configuration. -// -// If you are using the versioning feature and you don't specify a function -// version in your DeleteFunction request, AWS Lambda will delete the function, -// including all its versions, and any aliases pointing to the function versions. -// To delete a specific function version, you must provide the function version -// via the Qualifier parameter. For information about function versioning, see -// AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// When you delete a function the associated resource policy is also deleted. -// You will need to delete the event source mappings explicitly. +// Deletes a Lambda function. To delete a specific function version, use the +// Qualifier parameter. Otherwise, all versions and aliases are deleted. Event +// source mappings are not deleted. // // This operation requires permission for the lambda:DeleteFunction action. // @@ -710,6 +705,7 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -788,7 +784,7 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren // DeleteFunctionConcurrency API operation for AWS Lambda. // // Removes concurrent execution limits from this function. For more information, -// see concurrent-executions. +// see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -806,6 +802,7 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -878,13 +875,8 @@ func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req // GetAccountSettings API operation for AWS Lambda. // -// Returns a customer's account settings. -// -// You can use this operation to retrieve Lambda limits information, such as -// code size and concurrency limits. For more information about limits, see -// AWS Lambda Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). -// You can also retrieve resource usage statistics, such as code storage usage -// and function count. +// Retrieves details about your account's limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) +// and usage in a region. // // 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 @@ -895,6 +887,7 @@ func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req // // Returned Error Codes: // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. @@ -992,6 +985,7 @@ 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" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) { @@ -1085,6 +1079,7 @@ func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { @@ -1158,11 +1153,9 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque // information is the same information you provided as parameters when uploading // the function. // -// Using the optional Qualifier parameter, you can specify a specific function -// version for which you want this information. If you don't specify this parameter, -// the API uses unqualified function ARN which return information about the -// $LATEST version of the Lambda function. For more information, see AWS Lambda -// Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Use the Qualifier parameter to retrieve a published version of the function. +// Otherwise, returns the unpublished version ($LATEST). For more information, +// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // This operation requires permission for the lambda:GetFunction action. // @@ -1182,6 +1175,7 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1284,6 +1278,7 @@ func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfiguration // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1358,12 +1353,7 @@ func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, // // Returns the resource policy associated with the specified Lambda function. // -// If you are using the versioning feature, you can get the resource policy -// associated with the specific Lambda function version or alias by specifying -// the version or alias name using the Qualifier parameter. For more information -// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// You need permission for the lambda:GetPolicy action. +// This action requires permission for the lambda:GetPolicy action. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1381,6 +1371,7 @@ func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1453,16 +1444,22 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // Invoke API operation for AWS Lambda. // -// Invokes a specific Lambda function. For an example, see Create the Lambda -// Function and Test It Manually (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually). +// Invokes a Lambda function. For an example, see Create the Lambda Function +// and Test It Manually (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually). // -// If you are using the versioning feature, you can invoke the specific function -// version by providing function version or alias name that is pointing to the -// function version using the Qualifier parameter in the request. If you don't -// provide the Qualifier parameter, the $LATEST version of the Lambda function -// is invoked. Invocations occur at least once in response to an event and functions -// must be idempotent to handle this. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Specify just a function name to invoke the latest version of the function. +// To invoke a published version, use the Qualifier parameter to specify a version +// or alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// +// If you use the RequestResponse (synchronous) invocation option, the function +// will be invoked only once. If you use the Event (asynchronous) invocation +// option, the function will be invoked at least once in response to an event +// and the function must be idempotent to handle this. +// +// For functions with a long timeout, your client may be disconnected during +// synchronous invocation while it waits for a response. Configure your HTTP +// client, SDK, firewall, proxy, or operating system to allow for long connections +// with timeout or keep-alive settings. // // This operation requires permission for the lambda:InvokeFunction action. // @@ -1499,6 +1496,7 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // The content type of the Invoke request body is not JSON. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1523,6 +1521,7 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // using the execution role provided for the Lambda function. // // * ErrCodeEC2AccessDeniedException "EC2AccessDeniedException" +// Need additional permissions to configure VPC settings. // // * ErrCodeInvalidSubnetIDException "InvalidSubnetIDException" // The Subnet ID provided in the Lambda function VPC configuration is invalid. @@ -1532,7 +1531,7 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // invalid. // // * ErrCodeInvalidZipFileException "InvalidZipFileException" -// AWS Lambda could not unzip the function zip file. +// AWS Lambda could not unzip the deployment package. // // * ErrCodeKMSDisabledException "KMSDisabledException" // Lambda was unable to decrypt the environment variables because the KMS key @@ -1624,7 +1623,7 @@ func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Reque // InvokeAsync API operation for AWS Lambda. // -// This API is deprecated. We recommend you use Invoke API (see Invoke). +// For asynchronous function invocation, use Invoke. // // Submits an invocation request to AWS Lambda. Upon receiving the request, // Lambda executes the specified function asynchronously. To see the logs generated @@ -1751,6 +1750,7 @@ func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { @@ -1830,11 +1830,6 @@ func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsIn // For each mapping, the API returns configuration information. You can optionally // specify filters to retrieve specific event source mappings. // -// If you are using the versioning feature, you can get list of event source -// mappings for a specific Lambda function version or an alias as described -// in the FunctionName parameter. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// // This operation requires permission for the lambda:ListEventSourceMappings // action. // @@ -1859,6 +1854,7 @@ func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsIn // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) { @@ -2004,6 +2000,7 @@ func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.R // The AWS Lambda service encountered an internal error. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -2152,6 +2149,7 @@ 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" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { @@ -2219,8 +2217,8 @@ func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInpu // ListVersionsByFunction API operation for AWS Lambda. // -// List all versions of a function. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Lists all versions of a function. For information about versioning, see AWS +// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2243,6 +2241,7 @@ func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInpu // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) { @@ -2337,6 +2336,7 @@ func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) @@ -2417,7 +2417,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. For more information, see concurrent-executions. +// functions. For more information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2440,6 +2440,7 @@ func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInpu // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) { @@ -2509,17 +2510,17 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req // RemovePermission API operation for AWS Lambda. // -// You can remove individual permissions from an resource policy associated -// with a Lambda function by providing a statement ID that you provided when -// you added the permission. -// -// If you are using versioning, the permissions you remove are specific to the -// Lambda function version or alias you specify in the AddPermission request -// via the Qualifier parameter. For more information about versioning, see AWS -// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Removes permissions from a function. You can remove individual permissions +// from an resource policy associated with a Lambda function by providing a +// statement ID that you provided when you added the permission. When you remove +// permissions, disable the event source mapping or trigger configuration first +// to avoid errors. // -// Note that removal of a permission will cause an active event source to lose -// permission to the function. +// Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, +// which can be unqualified (the unpublished version of the function), or include +// a version or alias. If a client uses a version or alias to invoke a function, +// use the Qualifier parameter to apply permissions to that ARN. For more information +// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // You need permission for the lambda:RemovePermission action. // @@ -2544,6 +2545,7 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -2645,6 +2647,7 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { @@ -2739,6 +2742,7 @@ func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.R // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { @@ -2833,6 +2837,7 @@ func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -2910,11 +2915,6 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // stream. You can change which function will receive the stream records, but // to change the stream itself, you must create a new mapping. // -// If you are using the versioning feature, you can update the event source -// mapping to map to a specific Lambda function version or alias as described -// in the FunctionName parameter. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// // If you disable the event source mapping, AWS Lambda stops polling. If you // enable again, it will resume polling from the time it had stopped polling, // so you don't lose processing of any records. However, if you delete event @@ -2944,6 +2944,7 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. @@ -3050,6 +3051,7 @@ func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) @@ -3158,6 +3160,7 @@ func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigu // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. @@ -3190,7 +3193,8 @@ func (c *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input * } // Provides limits of code size and concurrency associated with the current -// account and region. +// account and region. For more information or to request a limit increase for +// concurrent executions, see Lambda Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). type AccountLimit struct { _ struct{} `type:"structure"` @@ -3203,10 +3207,8 @@ type AccountLimit struct { // larger files. Default limit is 50 MB. CodeSizeZipped *int64 `type:"long"` - // Number of simultaneous executions of your function per region. For more information - // or to request a limit increase for concurrent executions, see Lambda Function - // Concurrent Executions (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). - // The default limit is 1000. + // Number of simultaneous executions of your function per region. The default + // limit is 1000. ConcurrentExecutions *int64 `type:"integer"` // Maximum size, in bytes, of a code package you can upload per region. The @@ -3214,7 +3216,7 @@ type AccountLimit struct { TotalCodeSize *int64 `type:"long"` // The number of concurrent executions available to functions that do not have - // concurrency limits set. For more information, see concurrent-executions. + // concurrency limits set. For more information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). UnreservedConcurrentExecutions *int64 `type:"integer"` } @@ -3307,52 +3309,40 @@ type AddPermissionInput struct { // This is currently only used for Alexa Smart Home functions. EventSourceToken *string `type:"string"` - // Name of the Lambda function whose resource policy you are updating by adding - // a new permission. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // The principal who is getting this permission. It can be Amazon S3 service - // Principal (s3.amazonaws.com) if you want Amazon S3 to invoke the function, - // an AWS account ID if you are granting cross-account permission, or any valid - // AWS service principal such as sns.amazonaws.com. For example, you might want - // to allow a custom application in another AWS account to push events to AWS - // Lambda by invoking your function. + // The principal who is getting this permission. The principal can be an AWS + // service (e.g. s3.amazonaws.com or sns.amazonaws.com) for service triggers, + // or an account ID for cross-account access. If you specify a service as a + // principal, use the SourceArn parameter to limit who can invoke the function + // through that service. // // Principal is a required field Principal *string `type:"string" required:"true"` - // You can use this optional query parameter to describe a qualified ARN using - // a function version or an alias name. The permission will then apply to the - // specific qualified ARN. For example, if you specify function version 2 as - // the qualifier, then permission applies only when request is made using qualified - // function ARN: - // - // arn:aws:lambda:aws-region:acct-id:function:function-name:2 - // - // If you specify an alias name, for example PROD, then the permission is valid - // only for requests made using the alias ARN: - // - // arn:aws:lambda:aws-region:acct-id:function:function-name:PROD - // - // If the qualifier is not specified, the permission is valid only when requests - // is made using unqualified function ARN. - // - // arn:aws:lambda:aws-region:acct-id:function:function-name + // Specify a version or alias to add permissions to a published version of the + // function. 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 . + // using either GetFunction or GetAlias RevisionId *string `type:"string"` // This parameter is used for S3 and SES. The AWS account ID (without a hyphen) @@ -3364,14 +3354,11 @@ type AddPermissionInput struct { // you don't specify the SourceArn) owned by a specific account. SourceAccount *string `type:"string"` - // This is optional; however, when granting permission to invoke your function, - // you should specify this field with the Amazon Resource Name (ARN) as its - // value. This ensures that only events generated from the specified source - // can invoke the function. + // The Amazon Resource Name of the invoker. // - // If you add a permission without providing the source ARN, any AWS account - // that creates a mapping to your function ARN can send events to invoke your - // Lambda function. + // If you add a permission to a service principal without providing the source + // ARN, any AWS account that creates a mapping to your function ARN can invoke + // your Lambda function. SourceArn *string `type:"string"` // A unique statement identifier. @@ -3522,8 +3509,7 @@ type AliasConfiguration struct { 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. + // to dictate what percentage of traffic will invoke each version. RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -3573,14 +3559,13 @@ func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *Ali return s } -// The parent object that implements what percentage of traffic will invoke -// each function version. For more information, see lambda-traffic-shifting-using-aliases. +// The alias's traffic shifting (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) +// configuration. type AliasRoutingConfiguration struct { _ struct{} `type:"structure"` - // 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. + // The name of the second alias, and the percentage of traffic that is routed + // to it. AdditionalVersionWeights map[string]*float64 `type:"map"` } @@ -3606,9 +3591,18 @@ type CreateAliasInput struct { // Description of the alias. Description *string `type:"string"` - // Name of the Lambda function for which you want to create an alias. Note that - // the length constraint applies only to the ARN. If you specify only the function - // name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -3625,7 +3619,7 @@ type CreateAliasInput struct { // 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. + // see Traffic Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -3703,36 +3697,32 @@ type CreateEventSourceMappingInput struct { // The largest number of records that AWS Lambda will retrieve from your event // source at the time of invoking your function. Your function receives an event // with all the retrieved records. The default for Amazon Kinesis and Amazon - // DynamoDB is 100 records. For SQS, the default is 1. + // DynamoDB is 100 records. Both the default and maximum for Amazon SQS are + // 10 messages. BatchSize *int64 `min:"1" type:"integer"` - // Indicates whether AWS Lambda should begin polling the event source. By default, - // Enabled is true. + // Set to false to disable the event source upon creation. Enabled *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the event source. Any record added to this - // source could cause AWS Lambda to invoke your Lambda function, it depends - // on the BatchSize. AWS Lambda POSTs the event's records to your Lambda function - // as JSON. + // The Amazon Resource Name (ARN) of the event source. // // EventSourceArn is a required field EventSourceArn *string `type:"string" required:"true"` - // The Lambda function to invoke when AWS Lambda detects an event on the stream. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). For - // more information about versioning, see AWS Lambda Function Versioning and - // Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) + // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. // - // AWS Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). + // * Partial ARN - 123456789012:function:MyFunction. // - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `min:"1" type:"string" required:"true"` @@ -3824,76 +3814,62 @@ func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time type CreateFunctionInput struct { _ struct{} `type:"structure"` - // The code for the Lambda function. + // The code for the function. // // Code is a required field Code *FunctionCode `type:"structure" required:"true"` - // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. + // A dead letter queue configuration that specifies the queue or topic where + // Lambda sends asynchronous events when they fail processing. For more information, + // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). DeadLetterConfig *DeadLetterConfig `type:"structure"` - // A short, user-defined function description. Lambda does not use this value. - // Assign a meaningful description as you see fit. + // A description of the function. Description *string `type:"string"` - // The parent object that contains your environment's configuration settings. + // Environment variables that are accessible from function code during execution. Environment *Environment `type:"structure"` - // The name you want to assign to the function you are uploading. The function - // names appear in the console and are returned in the ListFunctions API. Function - // names are used to specify functions to other AWS Lambda API operations, such - // as Invoke. Note that the length constraint applies only to the ARN. If you - // specify only the function name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `min:"1" type:"string" required:"true"` - // The function within your code that Lambda calls to begin execution. For Node.js, - // it is the module-name.export value in your function. For Java, it can be - // package.class-name::handler or package.class-name. For more information, - // see Lambda Function Handler (Java) (http://docs.aws.amazon.com/lambda/latest/dg/java-programming-model-handler-types.html). + // The name of the method within your code that Lambda calls to execute your + // function. For more information, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). // // Handler is a required field Handler *string `type:"string" required:"true"` - // The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's - // environment variables. If not provided, AWS Lambda will use a default service - // key. + // The ARN of the KMS key used to encrypt your function's environment variables. + // If not provided, AWS Lambda will use a default service key. KMSKeyArn *string `type:"string"` - // The amount of memory, in MB, your Lambda function is given. Lambda uses this - // memory size to infer the amount of CPU and memory allocated to your function. - // Your function use-case determines your CPU and memory requirements. For example, - // a database operation might need less memory compared to an image processing - // function. The default value is 128 MB. The value must be a multiple of 64 - // MB. + // The amount of memory that your function has access to. Increasing the function's + // memory also increases it's CPU allocation. The default value is 128 MB. The + // value must be a multiple of 64 MB. MemorySize *int64 `min:"128" type:"integer"` - // This boolean parameter can be used to request AWS Lambda to create the Lambda - // function and publish a version as an atomic operation. + // Set to true to publish the first version of the function during creation. Publish *bool `type:"boolean"` - // 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. - // For more information, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html). + // The Amazon Resource Name (ARN) of the function's execution role (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role). // // Role is a required field Role *string `type:"string" required:"true"` - // The runtime environment for the Lambda function you are uploading. - // - // To use the Python runtime v3.6, set the value to "python3.6". To use the - // Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime - // v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set - // the value to "nodejs4.3". To use the .NET Core runtime v1.0, set the value - // to "dotnetcore1.0". To use the .NET Core runtime v2.0, set the value to "dotnetcore2.0". - // - // 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 - // 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. + // The runtime version for the function. // // Runtime is a required field Runtime *string `type:"string" required:"true" enum:"Runtime"` @@ -3903,12 +3879,12 @@ type CreateFunctionInput struct { // in the AWS Lambda Developer Guide. Tags map[string]*string `type:"map"` - // The function execution time at which Lambda should terminate the function. - // Because the execution time has cost implications, we recommend you set this - // value based on your expected execution time. The default is 3 seconds. + // The amount of time that Lambda allows a function to run before terminating + // it. The default is 3 seconds. The maximum allowed value is 900 seconds. Timeout *int64 `min:"1" type:"integer"` - // The parent object that contains your function's tracing settings. + // Set Mode to Active to sample and trace a subset of incoming requests with + // AWS X-Ray. TracingConfig *TracingConfig `type:"structure"` // If your Lambda function accesses resources in a VPC, you provide this parameter @@ -4057,14 +4033,12 @@ func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput { return s } -// The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic -// you specify as your Dead Letter Queue (DLQ). For more information, see dlq. +// The dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html) +// for failed asynchronous invocations. type DeadLetterConfig struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic - // you specify as your Dead Letter Queue (DLQ). dlq. For more information, see - // dlq. + // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic. TargetArn *string `type:"string"` } @@ -4087,10 +4061,18 @@ func (s *DeadLetterConfig) SetTargetArn(v string) *DeadLetterConfig { type DeleteAliasInput struct { _ struct{} `type:"structure"` - // The Lambda function name for which the alias is created. Deleting an alias - // does not delete the function version to which it is pointing. Note that the - // length constraint applies only to the ARN. If you specify only the function - // name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -4200,8 +4182,18 @@ func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMapp type DeleteFunctionConcurrencyInput struct { _ struct{} `type:"structure"` - // The name of the function you are removing concurrent execution limits from. - // For more information, see concurrent-executions. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -4256,33 +4248,24 @@ func (s DeleteFunctionConcurrencyOutput) GoString() string { type DeleteFunctionInput struct { _ struct{} `type:"structure"` - // The Lambda function to delete. + // The name of the lambda function. // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). AWS - // Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Using this optional parameter you can specify a function version (but not - // the $LATEST version) to direct AWS Lambda to delete a specific function version. - // If the function version has one or more aliases pointing to it, you will - // get an error because you cannot have aliases pointing to it. You can delete - // any function version but not the $LATEST, that is, you cannot specify $LATEST - // as the value of this parameter. The $LATEST version can be deleted only when - // you want to delete all the function versions and aliases. - // - // You can only specify a function version, not an alias name, using this parameter. - // You cannot delete a function version using its alias. - // - // If you don't specify this parameter, AWS Lambda will delete the function, - // including all of its versions and aliases. + // Specify a version to delete. You cannot delete a version that is referenced + // by an alias. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -4341,11 +4324,11 @@ func (s DeleteFunctionOutput) GoString() string { return s.String() } -// The parent object that contains your environment's configuration settings. +// A function's environment variable settings. type Environment struct { _ struct{} `type:"structure"` - // The key-value pairs that represent your environment's configuration settings. + // Environment variable key-value pairs. Variables map[string]*string `type:"map"` } @@ -4365,15 +4348,14 @@ func (s *Environment) SetVariables(v map[string]*string) *Environment { return s } -// The parent object that contains error information associated with your configuration -// settings. +// Error messages for environment variables that could not be applied. type EnvironmentError struct { _ struct{} `type:"structure"` - // The error code returned by the environment error object. + // The error code. ErrorCode *string `type:"string"` - // The message returned by the environment error object. + // The error message. Message *string `type:"string"` } @@ -4399,17 +4381,14 @@ func (s *EnvironmentError) SetMessage(v string) *EnvironmentError { return s } -// The parent object returned that contains your environment's configuration -// settings or any error information associated with your configuration settings. +// The results of a configuration update that applied environment variables. type EnvironmentResponse struct { _ struct{} `type:"structure"` - // The parent object that contains error information associated with your configuration - // settings. + // Error messages for environment variables that could not be applied. Error *EnvironmentError `type:"structure"` - // The key-value pairs returned that represent your environment's configuration - // settings or error information. + // Environment variable key-value pairs. Variables map[string]*string `type:"map"` } @@ -4435,8 +4414,8 @@ func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentRes return s } -// Describes mapping between an Amazon Kinesis or DynamoDB stream or an Amazon -// SQS queue and a Lambda function. +// Describes mapping between an Amazon Kinesis or DynamoDB stream and a Lambda +// function. type EventSourceMappingConfiguration struct { _ struct{} `type:"structure"` @@ -4445,8 +4424,8 @@ type EventSourceMappingConfiguration struct { // with all the retrieved records. BatchSize *int64 `min:"1" type:"integer"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream or - // the SQS queue that is the source of events. + // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream that + // is the source of events. EventSourceArn *string `type:"string"` // The Lambda function to invoke when AWS Lambda detects an event on the poll-based @@ -4456,7 +4435,8 @@ type EventSourceMappingConfiguration struct { // The UTC time string indicating the last time the event mapping was updated. LastModified *time.Time `type:"timestamp"` - // The result of the last AWS Lambda invocation of your Lambda function. + // The result of the last AWS Lambda invocation of your Lambda function. This + // value will be null if an SQS queue is the event source. LastProcessingResult *string `type:"string"` // The state of the event source mapping. It can be Creating, Enabled, Disabled, @@ -4529,27 +4509,22 @@ func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingC return s } -// The code for the Lambda function. +// The code for the Lambda function. You can specify either an S3 location, +// or upload a deployment package directly. type FunctionCode struct { _ struct{} `type:"structure"` - // 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. + // An Amazon S3 bucket in the same region as your function. S3Bucket *string `min:"3" type:"string"` - // The Amazon S3 object (the deployment package) key name you want to upload. + // The Amazon S3 key of the deployment package. S3Key *string `min:"1" type:"string"` - // The Amazon S3 object (the deployment package) version you want to upload. + // For versioned objects, the version of the deployment package object to use. S3ObjectVersion *string `min:"1" type:"string"` - // The contents of your zip file containing your deployment package. If you - // are using the web API directly, the contents of the zip file must be base64-encoded. - // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the - // encoding for you. For more information about creating a .zip file, see Execution - // Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html) - // in the AWS Lambda Developer Guide. + // The base64-encoded contents of your zip file containing your deployment package. + // AWS SDK and AWS CLI clients handle the encoding for you. // // ZipFile is automatically base64 encoded/decoded by the SDK. ZipFile []byte `type:"blob"` @@ -4642,77 +4617,68 @@ func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation return s } -// A complex type that describes function metadata. +// A Lambda function's configuration settings. type FunctionConfiguration struct { _ struct{} `type:"structure"` - // It is the SHA256 hash of your function deployment package. + // The SHA256 hash of the function's deployment package. CodeSha256 *string `type:"string"` - // The size, in bytes, of the function .zip file you uploaded. + // The size of the function's deployment package in bytes. CodeSize *int64 `type:"long"` - // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. + // The function's dead letter queue. DeadLetterConfig *DeadLetterConfig `type:"structure"` - // The user-provided description. + // The function's description. Description *string `type:"string"` - // The parent object that contains your environment's configuration settings. + // The function's environment variables. Environment *EnvironmentResponse `type:"structure"` - // The Amazon Resource Name (ARN) assigned to the function. + // The function's Amazon Resource Name. FunctionArn *string `type:"string"` - // The name of the function. Note that the length constraint applies only to - // the ARN. If you specify only the function name, it is limited to 64 characters - // in length. + // The name of the function. FunctionName *string `min:"1" type:"string"` // The function Lambda calls to begin executing your function. Handler *string `type:"string"` - // The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's - // environment variables. If empty, it means you are using the AWS Lambda default - // service key. + // The KMS key used to encrypt the function's environment variables. Only returned + // if you've configured a customer managed CMK. KMSKeyArn *string `type:"string"` - // The time stamp of the last time you updated the function. The time stamp - // is conveyed as a string complying with ISO-8601 in this way YYYY-MM-DDThh:mm:ssTZD - // (e.g., 1997-07-16T19:20:30+01:00). For more information, see Date and Time - // Formats (https://www.w3.org/TR/NOTE-datetime). + // The date and time that the function was last updated, in ISO-8601 format + // (https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ssTZD). LastModified *string `type:"string"` - // Returns the ARN (Amazon Resource Name) of the master function. + // The ARN of the master function. MasterArn *string `type:"string"` - // The memory size, in MB, you configured for the function. Must be a multiple - // of 64 MB. + // The memory allocated to the function 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. + // The function's execution role. Role *string `type:"string"` // The runtime environment for the Lambda function. Runtime *string `type:"string" enum:"Runtime"` - // The function execution time at which Lambda should terminate the function. - // Because the execution time has cost implications, we recommend you set this - // value based on your expected execution time. The default is 3 seconds. + // The amount of time that Lambda allows a function to run before terminating + // it. Timeout *int64 `min:"1" type:"integer"` - // The parent object that contains your function's tracing settings. + // The function's AWS X-Ray tracing configuration. TracingConfig *TracingConfigResponse `type:"structure"` // The version of the Lambda function. Version *string `min:"1" type:"string"` - // VPC configuration associated with your Lambda function. + // The function's networking configuration. VpcConfig *VpcConfigResponse `type:"structure"` } @@ -4857,12 +4823,10 @@ func (s GetAccountSettingsInput) GoString() string { type GetAccountSettingsOutput struct { _ struct{} `type:"structure"` - // Provides limits of code size and concurrency associated with the current - // account and region. + // Limits related to concurrency and code storage. AccountLimit *AccountLimit `type:"structure"` - // Provides code size usage and function count associated with the current account - // and region. + // The number of functions and amount of storage in use. AccountUsage *AccountUsage `type:"structure"` } @@ -4891,11 +4855,18 @@ func (s *GetAccountSettingsOutput) SetAccountUsage(v *AccountUsage) *GetAccountS type GetAliasInput struct { _ struct{} `type:"structure"` - // Function name for which the alias is created. An alias is a subresource that - // exists only in the context of an existing Lambda function so you must specify - // the function name. Note that the length constraint applies only to the ARN. - // If you specify only the function name, it is limited to 64 characters in - // length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -4991,26 +4962,24 @@ func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInp type GetFunctionConfigurationInput struct { _ struct{} `type:"structure"` - // The name of the Lambda function for which you want to retrieve the configuration - // information. + // The name of the lambda function. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Using this optional parameter you can specify a function version or an alias - // name. If you specify function version, the API uses qualified function ARN - // and returns information about the specific function version. If you specify - // an alias name, the API uses the alias ARN and returns information about the - // function version to which the alias points. - // - // If you don't specify this parameter, the API uses unqualified function ARN, - // and returns information about the $LATEST function version. + // Specify a version or alias to get details about a published version of the + // function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -5058,24 +5027,24 @@ func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfi type GetFunctionInput struct { _ struct{} `type:"structure"` - // The Lambda function name. + // The name of the lambda function. + // + // Name formats // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Use this optional parameter to specify a function version or an alias name. - // If you specify function version, the API uses qualified function ARN for - // the request and returns information about the specific Lambda function version. - // If you specify an alias name, the API uses the alias ARN and returns information - // about the function version to which the alias points. If you don't provide - // this parameter, the API uses unqualified function ARN and returns information - // about the $LATEST version of the Lambda function. + // Specify a version or alias to get details about a published version of the + // function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -5124,14 +5093,14 @@ func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput { type GetFunctionOutput struct { _ struct{} `type:"structure"` - // The object for the Lambda function location. + // The function's code. Code *FunctionCodeLocation `type:"structure"` // The concurrent execution limit set for this function. For more information, - // see concurrent-executions. + // see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). Concurrency *PutFunctionConcurrencyOutput `type:"structure"` - // A complex type that describes function metadata. + // The function's configuration. Configuration *FunctionConfiguration `type:"structure"` // Returns the list of tags associated with the function. For more information, @@ -5177,16 +5146,18 @@ func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput { type GetPolicyInput struct { _ struct{} `type:"structure"` - // Function name whose resource policy you want to retrieve. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). AWS - // Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5277,9 +5248,18 @@ func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput { type InvokeAsyncInput struct { _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"` - // The Lambda function name. Note that the length constraint applies only to - // the ARN. If you specify only the function name, it is limited to 64 characters - // in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5368,26 +5348,37 @@ type InvokeInput struct { // // The ClientContext JSON must be base64-encoded and has a maximum size of 3583 // bytes. + // + // ClientContext information is returned only if you use the synchronous (RequestResponse) + // invocation type. ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"` - // The Lambda function name. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // By default, the Invoke API assumes RequestResponse invocation type. You can - // optionally request asynchronous execution by specifying Event as the InvocationType. - // You can also use this parameter to request AWS Lambda to not execute the - // function but do some verification, such as if the caller is authorized to - // invoke the function and if the inputs are valid. You request this by specifying - // DryRun as the InvocationType. This is useful in a cross-account scenario - // when you want to verify access to a function without running it. + // Choose from the following options. + // + // * RequestResponse (default) - Invoke the function synchronously. Keep + // the connection open until the function returns a response or times out. + // + // * Event - Invoke the function asynchronously. Send events that fail multiple + // times to the function's dead-letter queue (if configured). + // + // * DryRun - Validate parameter values and verify that the user or role + // has permission to invoke the function. InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"` // You can set this optional parameter to Tail in the request only if you specify @@ -5399,14 +5390,7 @@ type InvokeInput struct { // JSON that you want to provide to your Lambda function as input. Payload []byte `type:"blob"` - // You can use this optional parameter to specify a Lambda function version - // or alias name. If you specify a function version, the API uses the qualified - // function ARN to invoke a specific Lambda function. If you specify an alias - // name, the API uses the alias ARN to invoke the Lambda function version to - // which the alias points. - // - // If you don't provide this parameter, then the API uses unqualified function - // ARN which results in invocation of the $LATEST version. + // Specify a version or alias to invoke a published version of the function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -5480,7 +5464,8 @@ 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. For more information, see lambda-traffic-shifting-using-aliases. + // if the invocation type is RequestResponse. For more information, see Traffic + // Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"` // Indicates whether an error occurred while executing the Lambda function. @@ -5554,9 +5539,18 @@ func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { type ListAliasesInput struct { _ struct{} `type:"structure"` - // Lambda function name for which the alias is created. Note that the length - // constraint applies only to the ARN. If you specify only the function name, - // it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5666,20 +5660,24 @@ func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { type ListEventSourceMappingsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream, - // or an SQS queue. (This parameter is optional.) + // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream. + // (This parameter is optional.) EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"` - // The name of the Lambda function. + // The name of the lambda function. + // + // Name formats // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). AWS - // Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"` // Optional string. An opaque pagination token returned from a previous ListEventSourceMappings @@ -5778,33 +5776,22 @@ func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSource type ListFunctionsInput struct { _ struct{} `type:"structure"` - // Optional string. If not specified, only the unqualified functions ARNs (Amazon - // Resource Names) will be returned. - // - // Valid value: - // - // ALL: Will return all versions, including $LATEST which will have fully qualified - // ARNs (Amazon Resource Names). + // Set to ALL to list all published versions. If not specified, only the latest + // unpublished version ARN is returned. FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" type:"string" enum:"FunctionVersion"` // Optional string. An opaque pagination token returned from a previous ListFunctions // operation. If present, indicates where to continue the listing. Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // Optional string. If not specified, will return only regular function versions - // (i.e., non-replicated versions). - // - // Valid values are: - // - // The region from which the functions are replicated. For example, if you specify - // us-east-1, only functions replicated from that region will be returned. - // - // ALL: Will return all functions from any region. If specified, you also must - // specify a valid FunctionVersion parameter. + // Specify a region (e.g. us-east-2) to only list functions that were created + // in that region, or ALL to include functions replicated from any region. If + // specified, you also must specify the FunctionVersion. MasterRegion *string `location:"querystring" locationName:"MasterRegion" type:"string"` // Optional integer. Specifies the maximum number of AWS Lambda functions to - // return in response. This parameter value must be greater than 0. + // return in response. This parameter value must be greater than 0. The absolute + // maximum of AWS Lambda functions that can be returned is 50. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` } @@ -5855,7 +5842,7 @@ func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput { return s } -// Contains a list of AWS Lambda function configurations (see FunctionConfiguration. +// A list of Lambda functions. type ListFunctionsOutput struct { _ struct{} `type:"structure"` @@ -5956,12 +5943,18 @@ func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { type ListVersionsByFunctionInput struct { _ struct{} `type:"structure"` - // Function name whose versions to list. You can specify a function name (for - // example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the - // function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6068,12 +6061,18 @@ type PublishVersionInput struct { // Lambda copies the description from the $LATEST version. Description *string `type:"string"` - // The Lambda function name. You can specify a function name (for example, Thumbnail) - // or you can specify Amazon Resource Name (ARN) of the function (for example, - // arn:aws:lambda:us-west-2:account-id:function:ThumbNail). AWS Lambda also - // allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6081,8 +6080,8 @@ type PublishVersionInput struct { // 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 . + // message, advising you retrieve the latest function version or alias RevisionID + // using either GetFunction or GetAlias. RevisionId *string `type:"string"` } @@ -6139,14 +6138,23 @@ func (s *PublishVersionInput) SetRevisionId(v string) *PublishVersionInput { type PutFunctionConcurrencyInput struct { _ struct{} `type:"structure"` - // The name of the function you are setting concurrent execution limits on. - // For more information, see concurrent-executions. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // 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. For more information, - // see concurrent-executions. + // The concurrent execution limit reserved for this function. // // ReservedConcurrentExecutions is a required field ReservedConcurrentExecutions *int64 `type:"integer" required:"true"` @@ -6197,7 +6205,7 @@ type PutFunctionConcurrencyOutput struct { _ struct{} `type:"structure"` // The number of concurrent executions reserved for this function. For more - // information, see concurrent-executions. + // information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). ReservedConcurrentExecutions *int64 `type:"integer"` } @@ -6220,28 +6228,31 @@ func (s *PutFunctionConcurrencyOutput) SetReservedConcurrentExecutions(v int64) type RemovePermissionInput struct { _ struct{} `type:"structure"` - // Lambda function whose resource policy you want to remove a permission from. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // You can specify this optional parameter to remove permission associated with - // a specific function version or function alias. If you don't specify this - // parameter, the API removes permission associated with the unqualified function - // ARN. + // Specify a version or alias to remove permissions from a published version + // of the function. 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 . + // using either GetFunction or GetAlias. RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` // Statement ID of the permission to remove. @@ -6393,15 +6404,11 @@ func (s TagResourceOutput) GoString() string { return s.String() } -// The parent object that contains your function's tracing settings. +// The function's AWS X-Ray tracing configuration. type TracingConfig struct { _ struct{} `type:"structure"` - // Can be either PassThrough or Active. If PassThrough, Lambda will only trace - // the request from an upstream service if it contains a tracing header with - // "sampled=1". If Active, Lambda will respect any tracing header it receives - // from an upstream service. If no tracing header is received, Lambda will call - // X-Ray for a tracing decision. + // The tracing mode. Mode *string `type:"string" enum:"TracingMode"` } @@ -6421,11 +6428,11 @@ func (s *TracingConfig) SetMode(v string) *TracingConfig { return s } -// Parent object of the tracing information associated with your Lambda function. +// The function's AWS X-Ray tracing configuration. type TracingConfigResponse struct { _ struct{} `type:"structure"` - // The tracing mode associated with your Lambda function. + // The tracing mode. Mode *string `type:"string" enum:"TracingMode"` } @@ -6521,9 +6528,18 @@ type UpdateAliasInput struct { // You can change the description of the alias using this parameter. Description *string `type:"string"` - // The function name for which the alias is created. Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6540,13 +6556,13 @@ type UpdateAliasInput struct { // 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 . + // message, advising you retrieve the latest function version or alias RevisionID + // using either GetFunction or GetAlias. 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. + // see Traffic Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -6624,29 +6640,29 @@ func (s *UpdateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *Updat type UpdateEventSourceMappingInput struct { _ struct{} `type:"structure"` - // The maximum number of stream records that can be sent to your Lambda function - // for a single invocation. + // The largest number of records that AWS Lambda will retrieve from your event + // source at the time of invoking your function. Your function receives an event + // with all the retrieved records. BatchSize *int64 `min:"1" type:"integer"` // Specifies whether AWS Lambda should actively poll the stream or not. If disabled, // AWS Lambda will not poll the stream. Enabled *bool `type:"boolean"` - // The Lambda function to which you want the stream records sent. + // The name of the lambda function. + // + // Name formats // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Function name - MyFunction. // - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). For - // more information about versioning, see AWS Lambda Function Versioning and - // Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 character in length. + // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. FunctionName *string `min:"1" type:"string"` // The event source mapping identifier. @@ -6719,13 +6735,18 @@ type UpdateFunctionCodeInput struct { // returned in the response. DryRun *bool `type:"boolean"` - // The existing Lambda function name whose code you want to replace. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6738,7 +6759,7 @@ type UpdateFunctionCodeInput struct { // 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 . + // using either using using either GetFunction or GetAlias. RevisionId *string `type:"string"` // Amazon S3 bucket name where the .zip file containing your deployment package @@ -6848,8 +6869,9 @@ func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput type UpdateFunctionConfigurationInput struct { _ struct{} `type:"structure"` - // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. + // A dead letter queue configuration that specifies the queue or topic where + // Lambda sends asynchronous events when they fail processing. For more information, + // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). DeadLetterConfig *DeadLetterConfig `type:"structure"` // A short user-defined function description. AWS Lambda does not use this value. @@ -6859,13 +6881,18 @@ type UpdateFunctionConfigurationInput struct { // The parent object that contains your environment's configuration settings. Environment *Environment `type:"structure"` - // The name of the Lambda function. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 character in length. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6891,40 +6918,26 @@ type UpdateFunctionConfigurationInput struct { // 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 . + // using either GetFunction or GetAlias. 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"` - // The runtime environment for the Lambda function. - // - // To use the Python runtime v3.6, set the value to "python3.6". To use the - // Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime - // v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set - // the value to "nodejs4.3". To use the .NET Core runtime v1.0, set the value - // to "dotnetcore1.0". To use the .NET Core runtime v2.0, set the value to "dotnetcore2.0". - // - // 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 - // 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. + // The runtime version for the function. Runtime *string `type:"string" enum:"Runtime"` - // The function execution time at which AWS Lambda should terminate the function. - // Because the execution time has cost implications, we recommend you set this - // value based on your expected execution time. The default is 3 seconds. + // The amount of time that Lambda allows a function to run before terminating + // it. The default is 3 seconds. The maximum allowed value is 900 seconds. Timeout *int64 `min:"1" type:"integer"` - // The parent object that contains your function's tracing settings. + // Set Mode to Active to sample and trace a subset of incoming requests with + // AWS X-Ray. TracingConfig *TracingConfig `type:"structure"` - // If your Lambda function accesses resources in a VPC, you provide this parameter - // identifying the list of security group IDs and subnet IDs. These must belong - // to the same VPC. You must provide at least one security group and one subnet - // ID. + // Specify security groups and subnets in a VPC to which your Lambda function + // needs access. VpcConfig *VpcConfig `type:"structure"` } @@ -7038,17 +7051,14 @@ func (s *UpdateFunctionConfigurationInput) SetVpcConfig(v *VpcConfig) *UpdateFun return s } -// If your Lambda function accesses resources in a VPC, you provide this parameter -// identifying the list of security group IDs and subnet IDs. These must belong -// to the same VPC. You must provide at least one security group and one subnet -// ID. +// The VPC security groups and subnets attached to a Lambda function. type VpcConfig struct { _ struct{} `type:"structure"` - // A list of one or more security groups IDs in your VPC. + // A list of VPC security groups IDs. SecurityGroupIds []*string `type:"list"` - // A list of one or more subnet IDs in your VPC. + // A list of VPC subnet IDs. SubnetIds []*string `type:"list"` } @@ -7074,17 +7084,17 @@ func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig { return s } -// VPC configuration associated with your Lambda function. +// The VPC security groups and subnets attached to a Lambda function. type VpcConfigResponse struct { _ struct{} `type:"structure"` - // A list of security group IDs associated with the Lambda function. + // A list of VPC security groups IDs. SecurityGroupIds []*string `type:"list"` - // A list of subnet IDs associated with the Lambda function. + // A list of VPC subnet IDs. SubnetIds []*string `type:"list"` - // The VPC ID associated with you Lambda function. + // The ID of the VPC. VpcId *string `type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go index 447b49ed1a9..4e12ca08f76 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go @@ -12,6 +12,8 @@ const ( // ErrCodeEC2AccessDeniedException for service response error code // "EC2AccessDeniedException". + // + // Need additional permissions to configure VPC settings. ErrCodeEC2AccessDeniedException = "EC2AccessDeniedException" // ErrCodeEC2ThrottledException for service response error code @@ -72,7 +74,7 @@ const ( // ErrCodeInvalidZipFileException for service response error code // "InvalidZipFileException". // - // AWS Lambda could not unzip the function zip file. + // AWS Lambda could not unzip the deployment package. ErrCodeInvalidZipFileException = "InvalidZipFileException" // ErrCodeKMSAccessDeniedException for service response error code @@ -160,6 +162,8 @@ const ( // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". + // + // Request throughput limit exceeded ErrCodeTooManyRequestsException = "TooManyRequestsException" // ErrCodeUnsupportedMediaTypeException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index ff97407c848..76c0855135d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -10749,7 +10749,7 @@ type BacktrackDBClusterInput struct { // // * Must contain a valid ISO 8601 timestamp. // - // * Cannot contain a timestamp set in the future. + // * Can't contain a timestamp set in the future. // // Example: 2017-07-08T18:00Z // @@ -10765,7 +10765,7 @@ type BacktrackDBClusterInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1 // @@ -11092,13 +11092,13 @@ type CopyDBClusterParameterGroupInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-cluster-param-group1 // @@ -11289,7 +11289,7 @@ type CopyDBClusterSnapshotInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster-snapshot2 // @@ -11427,13 +11427,13 @@ type CopyDBParameterGroupInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-db-parameter-group // @@ -11643,13 +11643,13 @@ type CopyDBSnapshotInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-db-snapshot // @@ -11796,13 +11796,13 @@ type CopyOptionGroupInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-option-group // @@ -11927,7 +11927,7 @@ type CreateDBClusterInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1 // @@ -11939,7 +11939,8 @@ type CreateDBClusterInput struct { // // Constraints: // - // * If supplied, must match the name of an existing DBClusterParameterGroup. + // * If supplied, must match the name of an existing DB cluster parameter + // group. DBClusterParameterGroupName *string `type:"string"` // A DB subnet group to associate with this DB cluster. @@ -12036,7 +12037,7 @@ type CreateDBClusterInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. MasterUsername *string `type:"string"` // A value that indicates that the DB cluster should be associated with the @@ -12374,7 +12375,7 @@ type CreateDBClusterParameterGroupInput struct { // // Constraints: // - // * Must match the name of an existing DBClusterParameterGroup. + // * Must match the name of an existing DB cluster parameter group. // // This value is stored as a lowercase string. // @@ -12510,7 +12511,7 @@ type CreateDBClusterSnapshotInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1-snapshot1 // @@ -12702,7 +12703,7 @@ type CreateDBInstanceInput struct { // // * Must be a value from 0 to 35 // - // * Cannot be set to 0 if the DB instance is a source to Read Replicas + // * Can't be set to 0 if the DB instance is a source to Read Replicas BackupRetentionPeriod *int64 `type:"integer"` // For supported engines, indicates that the DB instance should be associated @@ -12742,7 +12743,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: mydbinstance // @@ -12763,7 +12764,7 @@ type CreateDBInstanceInput struct { // // * Must contain 1 to 64 letters or numbers. // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine // // MariaDB // @@ -12774,7 +12775,7 @@ type CreateDBInstanceInput struct { // // * Must contain 1 to 64 letters or numbers. // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine // // PostgreSQL // @@ -12789,7 +12790,7 @@ type CreateDBInstanceInput struct { // * Must begin with a letter or an underscore. Subsequent characters can // be letters, underscores, or digits (0-9). // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine // // Oracle // @@ -12801,7 +12802,7 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Cannot be longer than 8 characters + // * Can't be longer than 8 characters // // SQL Server // @@ -12817,7 +12818,7 @@ type CreateDBInstanceInput struct { // // * Must contain 1 to 64 letters or numbers. // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine DBName *string `type:"string"` // The name of the DB parameter group to associate with this DB instance. If @@ -12830,7 +12831,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens DBParameterGroupName *string `type:"string"` // A list of DB security groups to associate with this DB instance. @@ -12969,9 +12970,7 @@ type CreateDBInstanceInput struct { // in the Amazon RDS User Guide. // // Constraints: Must be a multiple between 1 and 50 of the storage amount for - // the DB instance. Must also be an integer multiple of 1000. For example, if - // the size of your DB instance is 500 GiB, then your Iops value can be 2000, - // 3000, 4000, or 5000. + // the DB instance. Iops *int64 `type:"integer"` // The AWS KMS key identifier for an encrypted DB instance. @@ -13041,7 +13040,7 @@ type CreateDBInstanceInput struct { // // * Must be 1 to 16 letters or numbers. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // Microsoft SQL Server // @@ -13053,7 +13052,7 @@ type CreateDBInstanceInput struct { // // * The first character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // MySQL // @@ -13065,7 +13064,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // Oracle // @@ -13077,7 +13076,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // PostgreSQL // @@ -13089,7 +13088,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. MasterUsername *string `type:"string"` // The interval, in seconds, between points when Enhanced Monitoring metrics @@ -14148,7 +14147,7 @@ type CreateDBParameterGroupInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // This value is stored as a lowercase string. // @@ -14260,7 +14259,7 @@ type CreateDBSecurityGroupInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // * Must not be "Default" // @@ -14360,13 +14359,13 @@ type CreateDBSnapshotInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-snapshot-id // @@ -14737,7 +14736,7 @@ type CreateOptionGroupInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: myoptiongroup // @@ -15438,7 +15437,7 @@ type DBClusterParameterGroupNameMessage struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // This value is stored as a lowercase string. DBClusterParameterGroupName *string `type:"string"` @@ -17285,7 +17284,7 @@ type DeleteDBClusterInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens FinalDBSnapshotIdentifier *string `type:"string"` // Determines whether a final DB cluster snapshot is created before the DB cluster @@ -17377,7 +17376,7 @@ type DeleteDBClusterParameterGroupInput struct { // // * You can't delete a default DB cluster parameter group. // - // * Cannot be associated with any DB clusters. + // * Can't be associated with any DB clusters. // // DBClusterParameterGroupName is a required field DBClusterParameterGroupName *string `type:"string" required:"true"` @@ -17518,9 +17517,9 @@ type DeleteDBInstanceInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // - // * Cannot be specified when deleting a Read Replica. + // * Can't be specified when deleting a Read Replica. FinalDBSnapshotIdentifier *string `type:"string"` // Determines whether a final DB snapshot is created before the DB instance @@ -17617,7 +17616,7 @@ type DeleteDBParameterGroupInput struct { // // * You can't delete a default DB parameter group // - // * Cannot be associated with any DB instances + // * Can't be associated with any DB instances // // DBParameterGroupName is a required field DBParameterGroupName *string `type:"string" required:"true"` @@ -17679,7 +17678,7 @@ type DeleteDBSecurityGroupInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // * Must not be "Default" // @@ -18155,7 +18154,7 @@ type DescribeDBClusterBacktracksInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1 // @@ -20628,7 +20627,7 @@ type DescribeEventsInput struct { // // * If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. SourceIdentifier *string `type:"string"` // The event source to retrieve events for. If no value is specified, all events @@ -20918,7 +20917,7 @@ type DescribeOptionGroupsInput struct { // Constraints: Minimum 20, maximum 100. MaxRecords *int64 `type:"integer"` - // The name of the option group to describe. Cannot be supplied together with + // The name of the option group to describe. Can't be supplied together with // EngineName or MajorEngineVersion. OptionGroupName *string `type:"string"` } @@ -22962,7 +22961,7 @@ type ModifyDBClusterInput struct { // // * The first character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-cluster2 NewDBClusterIdentifier *string `type:"string"` @@ -23422,7 +23421,7 @@ type ModifyDBInstanceInput struct { // * Can be specified for a PostgreSQL Read Replica only if the source is // running PostgreSQL 9.3.5 // - // * Cannot be set to 0 if the DB instance is a source to Read Replicas + // * Can't be set to 0 if the DB instance is a source to Read Replicas BackupRetentionPeriod *int64 `type:"integer"` // Indicates the certificate that needs to be associated with the instance. @@ -23706,7 +23705,7 @@ type ModifyDBInstanceInput struct { // // * The first character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: mydbinstance NewDBInstanceIdentifier *string `type:"string"` @@ -27233,7 +27232,7 @@ type RestoreDBClusterFromS3Input struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1 // @@ -27322,7 +27321,7 @@ type RestoreDBClusterFromS3Input struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // MasterUsername is a required field MasterUsername *string `type:"string" required:"true"` @@ -27663,8 +27662,8 @@ func (s *RestoreDBClusterFromS3Output) SetDBCluster(v *DBCluster) *RestoreDBClus type RestoreDBClusterFromSnapshotInput struct { _ struct{} `type:"structure"` - // Provides the list of EC2 Availability Zones that instances in the restored - // DB cluster can be created in. + // Provides the list of Amazon EC2 Availability Zones that instances in the + // restored DB cluster can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` // The target backtrack window, in seconds. To disable backtracking, set this @@ -27687,16 +27686,32 @@ type RestoreDBClusterFromSnapshotInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-snapshot-id // // DBClusterIdentifier is a required field DBClusterIdentifier *string `type:"string" required:"true"` + // The name of the DB cluster parameter group to associate with this DB cluster. + // If this argument is omitted, the default DB cluster parameter group for the + // specified engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing default DB cluster parameter + // group. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBClusterParameterGroupName *string `type:"string"` + // The name of the DB subnet group to use for the new DB cluster. // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. + // Constraints: If supplied, must match the name of an existing DB subnet group. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -27709,7 +27724,7 @@ type RestoreDBClusterFromSnapshotInput struct { // false. DeletionProtection *bool `type:"boolean"` - // The list of logs that the restored DB cluster is to export to CloudWatch + // The list of logs that the restored DB cluster is to export to Amazon CloudWatch // Logs. The values in the list depend on the DB engine being used. For more // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) // in the Amazon Aurora User Guide. @@ -27745,8 +27760,8 @@ type RestoreDBClusterFromSnapshotInput struct { // the KMS encryption key used to encrypt the new DB cluster, then you can use // the KMS key alias instead of the ARN for the KMS encryption key. // - // If you do not specify a value for the KmsKeyId parameter, then the following - // will occur: + // If you don't specify a value for the KmsKeyId parameter, then the following + // occurs: // // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, // then the restored DB cluster is encrypted using the KMS key that was used @@ -27761,7 +27776,7 @@ type RestoreDBClusterFromSnapshotInput struct { // The port number on which the new DB cluster accepts connections. // - // Constraints: Value must be 1150-65535 + // Constraints: This value must be 1150-65535 // // Default: The same port as the original DB cluster. Port *int64 `type:"integer"` @@ -27837,6 +27852,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *Re return s } +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterParameterGroupName(v string) *RestoreDBClusterFromSnapshotInput { + s.DBClusterParameterGroupName = &v + return s +} + // SetDBSubnetGroupName sets the DBSubnetGroupName field's value. func (s *RestoreDBClusterFromSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBClusterFromSnapshotInput { s.DBSubnetGroupName = &v @@ -27975,11 +27996,27 @@ type RestoreDBClusterToPointInTimeInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // DBClusterIdentifier is a required field DBClusterIdentifier *string `type:"string" required:"true"` + // The name of the DB cluster parameter group to associate with this DB cluster. + // If this argument is omitted, the default DB cluster parameter group for the + // specified engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DB cluster parameter + // group. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBClusterParameterGroupName *string `type:"string"` + // The DB subnet group name to use for the new DB cluster. // // Constraints: If supplied, must match the name of an existing DBSubnetGroup. @@ -28017,8 +28054,8 @@ type RestoreDBClusterToPointInTimeInput struct { // cluster. The new DB cluster is encrypted with the KMS key identified by the // KmsKeyId parameter. // - // If you do not specify a value for the KmsKeyId parameter, then the following - // will occur: + // If you don't specify a value for the KmsKeyId parameter, then the following + // occurs: // // * If the DB cluster is encrypted, then the restored DB cluster is encrypted // using the KMS key that was used to encrypt the source DB cluster. @@ -28050,9 +28087,9 @@ type RestoreDBClusterToPointInTimeInput struct { // // * Must be specified if UseLatestRestorableTime parameter is not provided // - // * Cannot be specified if UseLatestRestorableTime parameter is true + // * Can't be specified if UseLatestRestorableTime parameter is true // - // * Cannot be specified if RestoreType parameter is copy-on-write + // * Can't be specified if RestoreType parameter is copy-on-write // // Example: 2015-03-07T23:45:00Z RestoreToTime *time.Time `type:"timestamp"` @@ -28091,7 +28128,7 @@ type RestoreDBClusterToPointInTimeInput struct { // // Default: false // - // Constraints: Cannot be specified if RestoreToTime parameter is provided. + // Constraints: Can't be specified if RestoreToTime parameter is provided. UseLatestRestorableTime *bool `type:"boolean"` // A list of VPC security groups that the new DB cluster belongs to. @@ -28136,6 +28173,12 @@ func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *R return s } +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterParameterGroupName(v string) *RestoreDBClusterToPointInTimeInput { + s.DBClusterParameterGroupName = &v + return s +} + // SetDBSubnetGroupName sets the DBSubnetGroupName field's value. func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBClusterToPointInTimeInput { s.DBSubnetGroupName = &v @@ -28279,7 +28322,7 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-snapshot-id // @@ -28291,6 +28334,21 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // This parameter doesn't apply to the MySQL, PostgreSQL, or MariaDB engines. DBName *string `type:"string"` + // The name of the DB parameter group to associate with this DB instance. If + // this argument is omitted, the default DBParameterGroup for the specified + // engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBParameterGroup. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBParameterGroupName *string `type:"string"` + // The identifier for the DB snapshot to restore from. // // Constraints: @@ -28512,6 +28570,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBName(v string) *RestoreDBIns return s } +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBParameterGroupName(v string) *RestoreDBInstanceFromDBSnapshotInput { + s.DBParameterGroupName = &v + return s +} + // SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBSnapshotIdentifier(v string) *RestoreDBInstanceFromDBSnapshotInput { s.DBSnapshotIdentifier = &v @@ -28720,7 +28784,7 @@ type RestoreDBInstanceFromS3Input struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: mydbinstance // @@ -28815,7 +28879,7 @@ type RestoreDBInstanceFromS3Input struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. MasterUsername *string `type:"string"` // The interval, in seconds, between points when Enhanced Monitoring metrics @@ -29323,6 +29387,21 @@ type RestoreDBInstanceToPointInTimeInput struct { // This parameter is not used for the MySQL or MariaDB engines. DBName *string `type:"string"` + // The name of the DB parameter group to associate with this DB instance. If + // this argument is omitted, the default DBParameterGroup for the specified + // engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBParameterGroup. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBParameterGroupName *string `type:"string"` + // The DB subnet group name to use for the new instance. // // Constraints: If supplied, must match the name of an existing DBSubnetGroup. @@ -29447,7 +29526,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // * Must be before the latest restorable time for the DB instance // - // * Cannot be specified if UseLatestRestorableTime parameter is true + // * Can't be specified if UseLatestRestorableTime parameter is true // // Example: 2009-09-07T23:45:00Z RestoreTime *time.Time `type:"timestamp"` @@ -29482,7 +29561,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // TargetDBInstanceIdentifier is a required field TargetDBInstanceIdentifier *string `type:"string" required:"true"` @@ -29503,7 +29582,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // Default: false // - // Constraints: Cannot be specified if RestoreTime parameter is provided. + // Constraints: Can't be specified if RestoreTime parameter is provided. UseLatestRestorableTime *bool `type:"boolean"` } @@ -29563,6 +29642,12 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetDBName(v string) *RestoreDBInst return s } +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetDBParameterGroupName(v string) *RestoreDBInstanceToPointInTimeInput { + s.DBParameterGroupName = &v + return s +} + // SetDBSubnetGroupName sets the DBSubnetGroupName field's value. func (s *RestoreDBInstanceToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBInstanceToPointInTimeInput { s.DBSubnetGroupName = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index 75d03c5acc1..79a4a3a896e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -272,6 +272,93 @@ func (c *ServiceCatalog) AssociateProductWithPortfolioWithContext(ctx aws.Contex return out, req.Send() } +const opAssociateServiceActionWithProvisioningArtifact = "AssociateServiceActionWithProvisioningArtifact" + +// AssociateServiceActionWithProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the AssociateServiceActionWithProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateServiceActionWithProvisioningArtifact for more information on using the AssociateServiceActionWithProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateServiceActionWithProvisioningArtifactRequest method. +// req, resp := client.AssociateServiceActionWithProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifactRequest(input *AssociateServiceActionWithProvisioningArtifactInput) (req *request.Request, output *AssociateServiceActionWithProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opAssociateServiceActionWithProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateServiceActionWithProvisioningArtifactInput{} + } + + output = &AssociateServiceActionWithProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateServiceActionWithProvisioningArtifact API operation for AWS Service Catalog. +// +// Associates a self-service action with a provisioning artifact. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation AssociateServiceActionWithProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Decrease your resource use or increase your service limits and retry the +// operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifact(input *AssociateServiceActionWithProvisioningArtifactInput) (*AssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.AssociateServiceActionWithProvisioningArtifactRequest(input) + return out, req.Send() +} + +// AssociateServiceActionWithProvisioningArtifactWithContext is the same as AssociateServiceActionWithProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateServiceActionWithProvisioningArtifact for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifactWithContext(ctx aws.Context, input *AssociateServiceActionWithProvisioningArtifactInput, opts ...request.Option) (*AssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.AssociateServiceActionWithProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssociateTagOptionWithResource = "AssociateTagOptionWithResource" // AssociateTagOptionWithResourceRequest generates a "aws/request.Request" representing the @@ -372,6 +459,165 @@ func (c *ServiceCatalog) AssociateTagOptionWithResourceWithContext(ctx aws.Conte return out, req.Send() } +const opBatchAssociateServiceActionWithProvisioningArtifact = "BatchAssociateServiceActionWithProvisioningArtifact" + +// BatchAssociateServiceActionWithProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the BatchAssociateServiceActionWithProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchAssociateServiceActionWithProvisioningArtifact for more information on using the BatchAssociateServiceActionWithProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchAssociateServiceActionWithProvisioningArtifactRequest method. +// req, resp := client.BatchAssociateServiceActionWithProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchAssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifactRequest(input *BatchAssociateServiceActionWithProvisioningArtifactInput) (req *request.Request, output *BatchAssociateServiceActionWithProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opBatchAssociateServiceActionWithProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchAssociateServiceActionWithProvisioningArtifactInput{} + } + + output = &BatchAssociateServiceActionWithProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchAssociateServiceActionWithProvisioningArtifact API operation for AWS Service Catalog. +// +// Associates multiple self-service actions with provisioning artifacts. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation BatchAssociateServiceActionWithProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchAssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifact(input *BatchAssociateServiceActionWithProvisioningArtifactInput) (*BatchAssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.BatchAssociateServiceActionWithProvisioningArtifactRequest(input) + return out, req.Send() +} + +// BatchAssociateServiceActionWithProvisioningArtifactWithContext is the same as BatchAssociateServiceActionWithProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See BatchAssociateServiceActionWithProvisioningArtifact for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifactWithContext(ctx aws.Context, input *BatchAssociateServiceActionWithProvisioningArtifactInput, opts ...request.Option) (*BatchAssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.BatchAssociateServiceActionWithProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchDisassociateServiceActionFromProvisioningArtifact = "BatchDisassociateServiceActionFromProvisioningArtifact" + +// BatchDisassociateServiceActionFromProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the BatchDisassociateServiceActionFromProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchDisassociateServiceActionFromProvisioningArtifact for more information on using the BatchDisassociateServiceActionFromProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchDisassociateServiceActionFromProvisioningArtifactRequest method. +// req, resp := client.BatchDisassociateServiceActionFromProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchDisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifactRequest(input *BatchDisassociateServiceActionFromProvisioningArtifactInput) (req *request.Request, output *BatchDisassociateServiceActionFromProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opBatchDisassociateServiceActionFromProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchDisassociateServiceActionFromProvisioningArtifactInput{} + } + + output = &BatchDisassociateServiceActionFromProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchDisassociateServiceActionFromProvisioningArtifact API operation for AWS Service Catalog. +// +// Disassociates a batch of self-service actions from the specified provisioning +// artifact. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation BatchDisassociateServiceActionFromProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchDisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifact(input *BatchDisassociateServiceActionFromProvisioningArtifactInput) (*BatchDisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.BatchDisassociateServiceActionFromProvisioningArtifactRequest(input) + return out, req.Send() +} + +// BatchDisassociateServiceActionFromProvisioningArtifactWithContext is the same as BatchDisassociateServiceActionFromProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See BatchDisassociateServiceActionFromProvisioningArtifact for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifactWithContext(ctx aws.Context, input *BatchDisassociateServiceActionFromProvisioningArtifactInput, opts ...request.Option) (*BatchDisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.BatchDisassociateServiceActionFromProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCopyProduct = "CopyProduct" // CopyProductRequest generates a "aws/request.Request" representing the @@ -1002,6 +1248,90 @@ func (c *ServiceCatalog) CreateProvisioningArtifactWithContext(ctx aws.Context, return out, req.Send() } +const opCreateServiceAction = "CreateServiceAction" + +// CreateServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the CreateServiceAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateServiceAction for more information on using the CreateServiceAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateServiceActionRequest method. +// req, resp := client.CreateServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateServiceAction +func (c *ServiceCatalog) CreateServiceActionRequest(input *CreateServiceActionInput) (req *request.Request, output *CreateServiceActionOutput) { + op := &request.Operation{ + Name: opCreateServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateServiceActionInput{} + } + + output = &CreateServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateServiceAction API operation for AWS Service Catalog. +// +// Creates a self-service action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation CreateServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Decrease your resource use or increase your service limits and retry the +// operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateServiceAction +func (c *ServiceCatalog) CreateServiceAction(input *CreateServiceActionInput) (*CreateServiceActionOutput, error) { + req, out := c.CreateServiceActionRequest(input) + return out, req.Send() +} + +// CreateServiceActionWithContext is the same as CreateServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See CreateServiceAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) CreateServiceActionWithContext(ctx aws.Context, input *CreateServiceActionInput, opts ...request.Option) (*CreateServiceActionOutput, error) { + req, out := c.CreateServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateTagOption = "CreateTagOption" // CreateTagOptionRequest generates a "aws/request.Request" representing the @@ -1613,44 +1943,127 @@ func (c *ServiceCatalog) DeleteProvisioningArtifactWithContext(ctx aws.Context, return out, req.Send() } -const opDeleteTagOption = "DeleteTagOption" +const opDeleteServiceAction = "DeleteServiceAction" -// DeleteTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTagOption operation. The "output" return +// DeleteServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteServiceAction operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteTagOption for more information on using the DeleteTagOption +// See DeleteServiceAction for more information on using the DeleteServiceAction // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DeleteTagOptionRequest method. -// req, resp := client.DeleteTagOptionRequest(params) +// // Example sending a request using the DeleteServiceActionRequest method. +// req, resp := client.DeleteServiceActionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteTagOption -func (c *ServiceCatalog) DeleteTagOptionRequest(input *DeleteTagOptionInput) (req *request.Request, output *DeleteTagOptionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteServiceAction +func (c *ServiceCatalog) DeleteServiceActionRequest(input *DeleteServiceActionInput) (req *request.Request, output *DeleteServiceActionOutput) { op := &request.Operation{ - Name: opDeleteTagOption, + Name: opDeleteServiceAction, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteTagOptionInput{} + input = &DeleteServiceActionInput{} } - output = &DeleteTagOptionOutput{} + output = &DeleteServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteServiceAction API operation for AWS Service Catalog. +// +// Deletes a self-service action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DeleteServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// A resource that is currently in use. Ensure that the resource is not in use +// and retry the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteServiceAction +func (c *ServiceCatalog) DeleteServiceAction(input *DeleteServiceActionInput) (*DeleteServiceActionOutput, error) { + req, out := c.DeleteServiceActionRequest(input) + return out, req.Send() +} + +// DeleteServiceActionWithContext is the same as DeleteServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteServiceAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) DeleteServiceActionWithContext(ctx aws.Context, input *DeleteServiceActionInput, opts ...request.Option) (*DeleteServiceActionOutput, error) { + req, out := c.DeleteServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTagOption = "DeleteTagOption" + +// DeleteTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTagOption operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTagOption for more information on using the DeleteTagOption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTagOptionRequest method. +// req, resp := client.DeleteTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteTagOption +func (c *ServiceCatalog) DeleteTagOptionRequest(input *DeleteTagOptionInput) (req *request.Request, output *DeleteTagOptionOutput) { + op := &request.Operation{ + Name: opDeleteTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTagOptionInput{} + } + + output = &DeleteTagOptionOutput{} req = c.newRequest(op, input, output) return } @@ -2597,6 +3010,85 @@ func (c *ServiceCatalog) DescribeRecordWithContext(ctx aws.Context, input *Descr return out, req.Send() } +const opDescribeServiceAction = "DescribeServiceAction" + +// DescribeServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the DescribeServiceAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeServiceAction for more information on using the DescribeServiceAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeServiceActionRequest method. +// req, resp := client.DescribeServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeServiceAction +func (c *ServiceCatalog) DescribeServiceActionRequest(input *DescribeServiceActionInput) (req *request.Request, output *DescribeServiceActionOutput) { + op := &request.Operation{ + Name: opDescribeServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeServiceActionInput{} + } + + output = &DescribeServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeServiceAction API operation for AWS Service Catalog. +// +// Describes a self-service action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DescribeServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeServiceAction +func (c *ServiceCatalog) DescribeServiceAction(input *DescribeServiceActionInput) (*DescribeServiceActionOutput, error) { + req, out := c.DescribeServiceActionRequest(input) + return out, req.Send() +} + +// DescribeServiceActionWithContext is the same as DescribeServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeServiceAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) DescribeServiceActionWithContext(ctx aws.Context, input *DescribeServiceActionInput, opts ...request.Option) (*DescribeServiceActionOutput, error) { + req, out := c.DescribeServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeTagOption = "DescribeTagOption" // DescribeTagOptionRequest generates a "aws/request.Request" representing the @@ -2849,6 +3341,86 @@ func (c *ServiceCatalog) DisassociateProductFromPortfolioWithContext(ctx aws.Con return out, req.Send() } +const opDisassociateServiceActionFromProvisioningArtifact = "DisassociateServiceActionFromProvisioningArtifact" + +// DisassociateServiceActionFromProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateServiceActionFromProvisioningArtifact operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateServiceActionFromProvisioningArtifact for more information on using the DisassociateServiceActionFromProvisioningArtifact +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateServiceActionFromProvisioningArtifactRequest method. +// req, resp := client.DisassociateServiceActionFromProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifactRequest(input *DisassociateServiceActionFromProvisioningArtifactInput) (req *request.Request, output *DisassociateServiceActionFromProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opDisassociateServiceActionFromProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateServiceActionFromProvisioningArtifactInput{} + } + + output = &DisassociateServiceActionFromProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateServiceActionFromProvisioningArtifact API operation for AWS Service Catalog. +// +// Disassociates the specified self-service action association from the specified +// provisioning artifact. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation DisassociateServiceActionFromProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifact(input *DisassociateServiceActionFromProvisioningArtifactInput) (*DisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.DisassociateServiceActionFromProvisioningArtifactRequest(input) + return out, req.Send() +} + +// DisassociateServiceActionFromProvisioningArtifactWithContext is the same as DisassociateServiceActionFromProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateServiceActionFromProvisioningArtifact for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifactWithContext(ctx aws.Context, input *DisassociateServiceActionFromProvisioningArtifactInput, opts ...request.Option) (*DisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.DisassociateServiceActionFromProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateTagOptionFromResource = "DisassociateTagOptionFromResource" // DisassociateTagOptionFromResourceRequest generates a "aws/request.Request" representing the @@ -3021,6 +3593,93 @@ func (c *ServiceCatalog) ExecuteProvisionedProductPlanWithContext(ctx aws.Contex return out, req.Send() } +const opExecuteProvisionedProductServiceAction = "ExecuteProvisionedProductServiceAction" + +// ExecuteProvisionedProductServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the ExecuteProvisionedProductServiceAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ExecuteProvisionedProductServiceAction for more information on using the ExecuteProvisionedProductServiceAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ExecuteProvisionedProductServiceActionRequest method. +// req, resp := client.ExecuteProvisionedProductServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductServiceAction +func (c *ServiceCatalog) ExecuteProvisionedProductServiceActionRequest(input *ExecuteProvisionedProductServiceActionInput) (req *request.Request, output *ExecuteProvisionedProductServiceActionOutput) { + op := &request.Operation{ + Name: opExecuteProvisionedProductServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExecuteProvisionedProductServiceActionInput{} + } + + output = &ExecuteProvisionedProductServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExecuteProvisionedProductServiceAction API operation for AWS Service Catalog. +// +// Executes a self-service action against a provisioned product. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ExecuteProvisionedProductServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// An attempt was made to modify a resource that is in a state that is not valid. +// Check your resources to ensure that they are in valid states before retrying +// the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductServiceAction +func (c *ServiceCatalog) ExecuteProvisionedProductServiceAction(input *ExecuteProvisionedProductServiceActionInput) (*ExecuteProvisionedProductServiceActionOutput, error) { + req, out := c.ExecuteProvisionedProductServiceActionRequest(input) + return out, req.Send() +} + +// ExecuteProvisionedProductServiceActionWithContext is the same as ExecuteProvisionedProductServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See ExecuteProvisionedProductServiceAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) ExecuteProvisionedProductServiceActionWithContext(ctx aws.Context, input *ExecuteProvisionedProductServiceActionInput, opts ...request.Option) (*ExecuteProvisionedProductServiceActionOutput, error) { + req, out := c.ExecuteProvisionedProductServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAcceptedPortfolioShares = "ListAcceptedPortfolioShares" // ListAcceptedPortfolioSharesRequest generates a "aws/request.Request" representing the @@ -4090,7 +4749,146 @@ func (c *ServiceCatalog) ListProvisioningArtifactsWithContext(ctx aws.Context, i return out, req.Send() } -const opListRecordHistory = "ListRecordHistory" +const opListProvisioningArtifactsForServiceAction = "ListProvisioningArtifactsForServiceAction" + +// ListProvisioningArtifactsForServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the ListProvisioningArtifactsForServiceAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListProvisioningArtifactsForServiceAction for more information on using the ListProvisioningArtifactsForServiceAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListProvisioningArtifactsForServiceActionRequest method. +// req, resp := client.ListProvisioningArtifactsForServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsForServiceAction +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionRequest(input *ListProvisioningArtifactsForServiceActionInput) (req *request.Request, output *ListProvisioningArtifactsForServiceActionOutput) { + op := &request.Operation{ + Name: opListProvisioningArtifactsForServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListProvisioningArtifactsForServiceActionInput{} + } + + output = &ListProvisioningArtifactsForServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListProvisioningArtifactsForServiceAction API operation for AWS Service Catalog. +// +// Lists all provisioning artifacts (also known as versions) for the specified +// self-service action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListProvisioningArtifactsForServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsForServiceAction +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceAction(input *ListProvisioningArtifactsForServiceActionInput) (*ListProvisioningArtifactsForServiceActionOutput, error) { + req, out := c.ListProvisioningArtifactsForServiceActionRequest(input) + return out, req.Send() +} + +// ListProvisioningArtifactsForServiceActionWithContext is the same as ListProvisioningArtifactsForServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See ListProvisioningArtifactsForServiceAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionWithContext(ctx aws.Context, input *ListProvisioningArtifactsForServiceActionInput, opts ...request.Option) (*ListProvisioningArtifactsForServiceActionOutput, error) { + req, out := c.ListProvisioningArtifactsForServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListProvisioningArtifactsForServiceActionPages iterates over the pages of a ListProvisioningArtifactsForServiceAction operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListProvisioningArtifactsForServiceAction method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListProvisioningArtifactsForServiceAction operation. +// pageNum := 0 +// err := client.ListProvisioningArtifactsForServiceActionPages(params, +// func(page *ListProvisioningArtifactsForServiceActionOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionPages(input *ListProvisioningArtifactsForServiceActionInput, fn func(*ListProvisioningArtifactsForServiceActionOutput, bool) bool) error { + return c.ListProvisioningArtifactsForServiceActionPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListProvisioningArtifactsForServiceActionPagesWithContext same as ListProvisioningArtifactsForServiceActionPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionPagesWithContext(ctx aws.Context, input *ListProvisioningArtifactsForServiceActionInput, fn func(*ListProvisioningArtifactsForServiceActionOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListProvisioningArtifactsForServiceActionInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListProvisioningArtifactsForServiceActionRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListProvisioningArtifactsForServiceActionOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListRecordHistory = "ListRecordHistory" // ListRecordHistoryRequest generates a "aws/request.Request" representing the // client's request for the ListRecordHistory operation. The "output" return @@ -4312,133 +5110,128 @@ func (c *ServiceCatalog) ListResourcesForTagOptionPagesWithContext(ctx aws.Conte return p.Err() } -const opListTagOptions = "ListTagOptions" +const opListServiceActions = "ListServiceActions" -// ListTagOptionsRequest generates a "aws/request.Request" representing the -// client's request for the ListTagOptions operation. The "output" return +// ListServiceActionsRequest generates a "aws/request.Request" representing the +// client's request for the ListServiceActions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagOptions for more information on using the ListTagOptions +// See ListServiceActions for more information on using the ListServiceActions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListTagOptionsRequest method. -// req, resp := client.ListTagOptionsRequest(params) +// // Example sending a request using the ListServiceActionsRequest method. +// req, resp := client.ListServiceActionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions -func (c *ServiceCatalog) ListTagOptionsRequest(input *ListTagOptionsInput) (req *request.Request, output *ListTagOptionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActions +func (c *ServiceCatalog) ListServiceActionsRequest(input *ListServiceActionsInput) (req *request.Request, output *ListServiceActionsOutput) { op := &request.Operation{ - Name: opListTagOptions, + Name: opListServiceActions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"PageToken"}, - OutputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, LimitToken: "PageSize", TruncationToken: "", }, } if input == nil { - input = &ListTagOptionsInput{} + input = &ListServiceActionsInput{} } - output = &ListTagOptionsOutput{} + output = &ListServiceActionsOutput{} req = c.newRequest(op, input, output) return } -// ListTagOptions API operation for AWS Service Catalog. +// ListServiceActions API operation for AWS Service Catalog. // -// Lists the specified TagOptions or all TagOptions. +// Lists all self-service actions. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Service Catalog's -// API operation ListTagOptions for usage and error information. +// API operation ListServiceActions for usage and error information. // // Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// // * ErrCodeInvalidParametersException "InvalidParametersException" // One or more parameters provided to the operation are not valid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions -func (c *ServiceCatalog) ListTagOptions(input *ListTagOptionsInput) (*ListTagOptionsOutput, error) { - req, out := c.ListTagOptionsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActions +func (c *ServiceCatalog) ListServiceActions(input *ListServiceActionsInput) (*ListServiceActionsOutput, error) { + req, out := c.ListServiceActionsRequest(input) return out, req.Send() } -// ListTagOptionsWithContext is the same as ListTagOptions with the addition of +// ListServiceActionsWithContext is the same as ListServiceActions with the addition of // the ability to pass a context and additional request options. // -// See ListTagOptions for details on how to use this API operation. +// See ListServiceActions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ServiceCatalog) ListTagOptionsWithContext(ctx aws.Context, input *ListTagOptionsInput, opts ...request.Option) (*ListTagOptionsOutput, error) { - req, out := c.ListTagOptionsRequest(input) +func (c *ServiceCatalog) ListServiceActionsWithContext(ctx aws.Context, input *ListServiceActionsInput, opts ...request.Option) (*ListServiceActionsOutput, error) { + req, out := c.ListServiceActionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListTagOptionsPages iterates over the pages of a ListTagOptions operation, +// ListServiceActionsPages iterates over the pages of a ListServiceActions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListTagOptions method for more information on how to use this operation. +// See ListServiceActions method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a ListTagOptions operation. +// // Example iterating over at most 3 pages of a ListServiceActions operation. // pageNum := 0 -// err := client.ListTagOptionsPages(params, -// func(page *ListTagOptionsOutput, lastPage bool) bool { +// err := client.ListServiceActionsPages(params, +// func(page *ListServiceActionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *ServiceCatalog) ListTagOptionsPages(input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool) error { - return c.ListTagOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *ServiceCatalog) ListServiceActionsPages(input *ListServiceActionsInput, fn func(*ListServiceActionsOutput, bool) bool) error { + return c.ListServiceActionsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListTagOptionsPagesWithContext same as ListTagOptionsPages except +// ListServiceActionsPagesWithContext same as ListServiceActionsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool, opts ...request.Option) error { +func (c *ServiceCatalog) ListServiceActionsPagesWithContext(ctx aws.Context, input *ListServiceActionsInput, fn func(*ListServiceActionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListTagOptionsInput + var inCpy *ListServiceActionsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListTagOptionsRequest(inCpy) + req, _ := c.ListServiceActionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -4447,144 +5240,423 @@ func (c *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input * cont := true for p.Next() && cont { - cont = fn(p.Page().(*ListTagOptionsOutput), !p.HasNextPage()) + cont = fn(p.Page().(*ListServiceActionsOutput), !p.HasNextPage()) } return p.Err() } -const opProvisionProduct = "ProvisionProduct" +const opListServiceActionsForProvisioningArtifact = "ListServiceActionsForProvisioningArtifact" -// ProvisionProductRequest generates a "aws/request.Request" representing the -// client's request for the ProvisionProduct operation. The "output" return +// ListServiceActionsForProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the ListServiceActionsForProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ProvisionProduct for more information on using the ProvisionProduct +// See ListServiceActionsForProvisioningArtifact for more information on using the ListServiceActionsForProvisioningArtifact // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ProvisionProductRequest method. -// req, resp := client.ProvisionProductRequest(params) +// // Example sending a request using the ListServiceActionsForProvisioningArtifactRequest method. +// req, resp := client.ListServiceActionsForProvisioningArtifactRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct -func (c *ServiceCatalog) ProvisionProductRequest(input *ProvisionProductInput) (req *request.Request, output *ProvisionProductOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActionsForProvisioningArtifact +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactRequest(input *ListServiceActionsForProvisioningArtifactInput) (req *request.Request, output *ListServiceActionsForProvisioningArtifactOutput) { op := &request.Operation{ - Name: opProvisionProduct, + Name: opListServiceActionsForProvisioningArtifact, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, } if input == nil { - input = &ProvisionProductInput{} + input = &ListServiceActionsForProvisioningArtifactInput{} } - output = &ProvisionProductOutput{} + output = &ListServiceActionsForProvisioningArtifactOutput{} req = c.newRequest(op, input, output) return } -// ProvisionProduct API operation for AWS Service Catalog. -// -// Provisions the specified product. -// -// A provisioned product is a resourced instance of a product. For example, -// provisioning a product based on a CloudFormation template launches a CloudFormation -// stack and its underlying resources. You can check the status of this request -// using DescribeRecord. +// ListServiceActionsForProvisioningArtifact API operation for AWS Service Catalog. // -// If the request contains a tag key with an empty list of values, there is -// a tag conflict for that key. Do not include conflicted keys as tags, or this -// causes the error "Parameter validation failed: Missing required parameter -// in Tags[N]:Value". +// Returns a paginated list of self-service actions associated with the specified +// Product ID and Provisioning Artifact ID. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Service Catalog's -// API operation ProvisionProduct for usage and error information. +// API operation ListServiceActionsForProvisioningArtifact for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidParametersException "InvalidParametersException" -// One or more parameters provided to the operation are not valid. -// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource was not found. // -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct -func (c *ServiceCatalog) ProvisionProduct(input *ProvisionProductInput) (*ProvisionProductOutput, error) { - req, out := c.ProvisionProductRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActionsForProvisioningArtifact +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifact(input *ListServiceActionsForProvisioningArtifactInput) (*ListServiceActionsForProvisioningArtifactOutput, error) { + req, out := c.ListServiceActionsForProvisioningArtifactRequest(input) return out, req.Send() } -// ProvisionProductWithContext is the same as ProvisionProduct with the addition of +// ListServiceActionsForProvisioningArtifactWithContext is the same as ListServiceActionsForProvisioningArtifact with the addition of // the ability to pass a context and additional request options. // -// See ProvisionProduct for details on how to use this API operation. +// See ListServiceActionsForProvisioningArtifact for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *ServiceCatalog) ProvisionProductWithContext(ctx aws.Context, input *ProvisionProductInput, opts ...request.Option) (*ProvisionProductOutput, error) { - req, out := c.ProvisionProductRequest(input) +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactWithContext(ctx aws.Context, input *ListServiceActionsForProvisioningArtifactInput, opts ...request.Option) (*ListServiceActionsForProvisioningArtifactOutput, error) { + req, out := c.ListServiceActionsForProvisioningArtifactRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRejectPortfolioShare = "RejectPortfolioShare" +// ListServiceActionsForProvisioningArtifactPages iterates over the pages of a ListServiceActionsForProvisioningArtifact operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListServiceActionsForProvisioningArtifact method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListServiceActionsForProvisioningArtifact operation. +// pageNum := 0 +// err := client.ListServiceActionsForProvisioningArtifactPages(params, +// func(page *ListServiceActionsForProvisioningArtifactOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactPages(input *ListServiceActionsForProvisioningArtifactInput, fn func(*ListServiceActionsForProvisioningArtifactOutput, bool) bool) error { + return c.ListServiceActionsForProvisioningArtifactPagesWithContext(aws.BackgroundContext(), input, fn) +} -// RejectPortfolioShareRequest generates a "aws/request.Request" representing the -// client's request for the RejectPortfolioShare operation. The "output" return +// ListServiceActionsForProvisioningArtifactPagesWithContext same as ListServiceActionsForProvisioningArtifactPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactPagesWithContext(ctx aws.Context, input *ListServiceActionsForProvisioningArtifactInput, fn func(*ListServiceActionsForProvisioningArtifactOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListServiceActionsForProvisioningArtifactInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListServiceActionsForProvisioningArtifactRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListServiceActionsForProvisioningArtifactOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTagOptions = "ListTagOptions" + +// ListTagOptionsRequest generates a "aws/request.Request" representing the +// client's request for the ListTagOptions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RejectPortfolioShare for more information on using the RejectPortfolioShare +// See ListTagOptions for more information on using the ListTagOptions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RejectPortfolioShareRequest method. -// req, resp := client.RejectPortfolioShareRequest(params) +// // Example sending a request using the ListTagOptionsRequest method. +// req, resp := client.ListTagOptionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShare -func (c *ServiceCatalog) RejectPortfolioShareRequest(input *RejectPortfolioShareInput) (req *request.Request, output *RejectPortfolioShareOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions +func (c *ServiceCatalog) ListTagOptionsRequest(input *ListTagOptionsInput) (req *request.Request, output *ListTagOptionsOutput) { op := &request.Operation{ - Name: opRejectPortfolioShare, + Name: opListTagOptions, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"PageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, } if input == nil { - input = &RejectPortfolioShareInput{} + input = &ListTagOptionsInput{} } - output = &RejectPortfolioShareOutput{} + output = &ListTagOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagOptions API operation for AWS Service Catalog. +// +// Lists the specified TagOptions or all TagOptions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ListTagOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions +func (c *ServiceCatalog) ListTagOptions(input *ListTagOptionsInput) (*ListTagOptionsOutput, error) { + req, out := c.ListTagOptionsRequest(input) + return out, req.Send() +} + +// ListTagOptionsWithContext is the same as ListTagOptions with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagOptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) ListTagOptionsWithContext(ctx aws.Context, input *ListTagOptionsInput, opts ...request.Option) (*ListTagOptionsOutput, error) { + req, out := c.ListTagOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTagOptionsPages iterates over the pages of a ListTagOptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTagOptions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTagOptions operation. +// pageNum := 0 +// err := client.ListTagOptionsPages(params, +// func(page *ListTagOptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListTagOptionsPages(input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool) error { + return c.ListTagOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagOptionsPagesWithContext same as ListTagOptionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagOptionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagOptionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTagOptionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opProvisionProduct = "ProvisionProduct" + +// ProvisionProductRequest generates a "aws/request.Request" representing the +// client's request for the ProvisionProduct operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ProvisionProduct for more information on using the ProvisionProduct +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ProvisionProductRequest method. +// req, resp := client.ProvisionProductRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct +func (c *ServiceCatalog) ProvisionProductRequest(input *ProvisionProductInput) (req *request.Request, output *ProvisionProductOutput) { + op := &request.Operation{ + Name: opProvisionProduct, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ProvisionProductInput{} + } + + output = &ProvisionProductOutput{} + req = c.newRequest(op, input, output) + return +} + +// ProvisionProduct API operation for AWS Service Catalog. +// +// Provisions the specified product. +// +// A provisioned product is a resourced instance of a product. For example, +// provisioning a product based on a CloudFormation template launches a CloudFormation +// stack and its underlying resources. You can check the status of this request +// using DescribeRecord. +// +// If the request contains a tag key with an empty list of values, there is +// a tag conflict for that key. Do not include conflicted keys as tags, or this +// causes the error "Parameter validation failed: Missing required parameter +// in Tags[N]:Value". +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation ProvisionProduct for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ProvisionProduct +func (c *ServiceCatalog) ProvisionProduct(input *ProvisionProductInput) (*ProvisionProductOutput, error) { + req, out := c.ProvisionProductRequest(input) + return out, req.Send() +} + +// ProvisionProductWithContext is the same as ProvisionProduct with the addition of +// the ability to pass a context and additional request options. +// +// See ProvisionProduct for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) ProvisionProductWithContext(ctx aws.Context, input *ProvisionProductInput, opts ...request.Option) (*ProvisionProductOutput, error) { + req, out := c.ProvisionProductRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRejectPortfolioShare = "RejectPortfolioShare" + +// RejectPortfolioShareRequest generates a "aws/request.Request" representing the +// client's request for the RejectPortfolioShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RejectPortfolioShare for more information on using the RejectPortfolioShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RejectPortfolioShareRequest method. +// req, resp := client.RejectPortfolioShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/RejectPortfolioShare +func (c *ServiceCatalog) RejectPortfolioShareRequest(input *RejectPortfolioShareInput) (req *request.Request, output *RejectPortfolioShareOutput) { + op := &request.Operation{ + Name: opRejectPortfolioShare, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RejectPortfolioShareInput{} + } + + output = &RejectPortfolioShareOutput{} req = c.newRequest(op, input, output) return } @@ -5637,81 +6709,163 @@ func (c *ServiceCatalog) UpdateProvisioningArtifactWithContext(ctx aws.Context, return out, req.Send() } -const opUpdateTagOption = "UpdateTagOption" +const opUpdateServiceAction = "UpdateServiceAction" -// UpdateTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTagOption operation. The "output" return +// UpdateServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateServiceAction operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateTagOption for more information on using the UpdateTagOption +// See UpdateServiceAction for more information on using the UpdateServiceAction // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateTagOptionRequest method. -// req, resp := client.UpdateTagOptionRequest(params) +// // Example sending a request using the UpdateServiceActionRequest method. +// req, resp := client.UpdateServiceActionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption -func (c *ServiceCatalog) UpdateTagOptionRequest(input *UpdateTagOptionInput) (req *request.Request, output *UpdateTagOptionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateServiceAction +func (c *ServiceCatalog) UpdateServiceActionRequest(input *UpdateServiceActionInput) (req *request.Request, output *UpdateServiceActionOutput) { op := &request.Operation{ - Name: opUpdateTagOption, + Name: opUpdateServiceAction, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateTagOptionInput{} + input = &UpdateServiceActionInput{} } - output = &UpdateTagOptionOutput{} + output = &UpdateServiceActionOutput{} req = c.newRequest(op, input, output) return } -// UpdateTagOption API operation for AWS Service Catalog. +// UpdateServiceAction API operation for AWS Service Catalog. // -// Updates the specified TagOption. +// Updates a self-service action. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS Service Catalog's -// API operation UpdateTagOption for usage and error information. +// API operation UpdateServiceAction for usage and error information. // // Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource was not found. // -// * ErrCodeDuplicateResourceException "DuplicateResourceException" -// The specified resource is a duplicate. -// // * ErrCodeInvalidParametersException "InvalidParametersException" // One or more parameters provided to the operation are not valid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption -func (c *ServiceCatalog) UpdateTagOption(input *UpdateTagOptionInput) (*UpdateTagOptionOutput, error) { - req, out := c.UpdateTagOptionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateServiceAction +func (c *ServiceCatalog) UpdateServiceAction(input *UpdateServiceActionInput) (*UpdateServiceActionOutput, error) { + req, out := c.UpdateServiceActionRequest(input) return out, req.Send() } -// UpdateTagOptionWithContext is the same as UpdateTagOption with the addition of +// UpdateServiceActionWithContext is the same as UpdateServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateServiceAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServiceCatalog) UpdateServiceActionWithContext(ctx aws.Context, input *UpdateServiceActionInput, opts ...request.Option) (*UpdateServiceActionOutput, error) { + req, out := c.UpdateServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTagOption = "UpdateTagOption" + +// UpdateTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTagOption operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateTagOption for more information on using the UpdateTagOption +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateTagOptionRequest method. +// req, resp := client.UpdateTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption +func (c *ServiceCatalog) UpdateTagOptionRequest(input *UpdateTagOptionInput) (req *request.Request, output *UpdateTagOptionOutput) { + op := &request.Operation{ + Name: opUpdateTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTagOptionInput{} + } + + output = &UpdateTagOptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTagOption API operation for AWS Service Catalog. +// +// Updates the specified TagOption. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Service Catalog's +// API operation UpdateTagOption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption +func (c *ServiceCatalog) UpdateTagOption(input *UpdateTagOptionInput) (*UpdateTagOptionOutput, error) { + req, out := c.UpdateTagOptionRequest(input) + return out, req.Send() +} + +// UpdateTagOptionWithContext is the same as UpdateTagOption with the addition of // the ability to pass a context and additional request options. // // See UpdateTagOption for details on how to use this API operation. @@ -5911,33 +7065,305 @@ func (s *AssociatePrincipalWithPortfolioInput) SetPortfolioId(v string) *Associa return s } -// SetPrincipalARN sets the PrincipalARN field's value. -func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalARN(v string) *AssociatePrincipalWithPortfolioInput { - s.PrincipalARN = &v +// SetPrincipalARN sets the PrincipalARN field's value. +func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalARN(v string) *AssociatePrincipalWithPortfolioInput { + s.PrincipalARN = &v + return s +} + +// SetPrincipalType sets the PrincipalType field's value. +func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalType(v string) *AssociatePrincipalWithPortfolioInput { + s.PrincipalType = &v + return s +} + +type AssociatePrincipalWithPortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociatePrincipalWithPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociatePrincipalWithPortfolioOutput) GoString() string { + return s.String() +} + +type AssociateProductWithPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The portfolio identifier. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the source portfolio. + SourcePortfolioId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s AssociateProductWithPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateProductWithPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateProductWithPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateProductWithPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.SourcePortfolioId != nil && len(*s.SourcePortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourcePortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *AssociateProductWithPortfolioInput) SetAcceptLanguage(v string) *AssociateProductWithPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *AssociateProductWithPortfolioInput) SetPortfolioId(v string) *AssociateProductWithPortfolioInput { + s.PortfolioId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *AssociateProductWithPortfolioInput) SetProductId(v string) *AssociateProductWithPortfolioInput { + s.ProductId = &v + return s +} + +// SetSourcePortfolioId sets the SourcePortfolioId field's value. +func (s *AssociateProductWithPortfolioInput) SetSourcePortfolioId(v string) *AssociateProductWithPortfolioInput { + s.SourcePortfolioId = &v + return s +} + +type AssociateProductWithPortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateProductWithPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateProductWithPortfolioOutput) GoString() string { + return s.String() +} + +type AssociateServiceActionWithProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateServiceActionWithProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateServiceActionWithProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetAcceptLanguage(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetProductId(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetProvisioningArtifactId(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.ProvisioningArtifactId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetServiceActionId(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.ServiceActionId = &v + return s +} + +type AssociateServiceActionWithProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactOutput) GoString() string { + return s.String() +} + +type AssociateTagOptionWithResourceInput struct { + _ struct{} `type:"structure"` + + // The resource identifier. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // The TagOption identifier. + // + // TagOptionId is a required field + TagOptionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateTagOptionWithResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateTagOptionWithResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateTagOptionWithResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateTagOptionWithResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagOptionId == nil { + invalidParams.Add(request.NewErrParamRequired("TagOptionId")) + } + if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *AssociateTagOptionWithResourceInput) SetResourceId(v string) *AssociateTagOptionWithResourceInput { + s.ResourceId = &v return s } -// SetPrincipalType sets the PrincipalType field's value. -func (s *AssociatePrincipalWithPortfolioInput) SetPrincipalType(v string) *AssociatePrincipalWithPortfolioInput { - s.PrincipalType = &v +// SetTagOptionId sets the TagOptionId field's value. +func (s *AssociateTagOptionWithResourceInput) SetTagOptionId(v string) *AssociateTagOptionWithResourceInput { + s.TagOptionId = &v return s } -type AssociatePrincipalWithPortfolioOutput struct { +type AssociateTagOptionWithResourceOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s AssociatePrincipalWithPortfolioOutput) String() string { +func (s AssociateTagOptionWithResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AssociatePrincipalWithPortfolioOutput) GoString() string { +func (s AssociateTagOptionWithResourceOutput) GoString() string { return s.String() } -type AssociateProductWithPortfolioInput struct { +type BatchAssociateServiceActionWithProvisioningArtifactInput struct { _ struct{} `type:"structure"` // The language code. @@ -5949,47 +7375,41 @@ type AssociateProductWithPortfolioInput struct { // * zh - Chinese AcceptLanguage *string `type:"string"` - // The portfolio identifier. - // - // PortfolioId is a required field - PortfolioId *string `min:"1" type:"string" required:"true"` - - // The product identifier. + // One or more associations, each consisting of the Action ID, the Product ID, + // and the Provisioning Artifact ID. // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` - - // The identifier of the source portfolio. - SourcePortfolioId *string `min:"1" type:"string"` + // ServiceActionAssociations is a required field + ServiceActionAssociations []*ServiceActionAssociation `min:"1" type:"list" required:"true"` } // String returns the string representation -func (s AssociateProductWithPortfolioInput) String() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AssociateProductWithPortfolioInput) GoString() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateProductWithPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateProductWithPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) +func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchAssociateServiceActionWithProvisioningArtifactInput"} + if s.ServiceActionAssociations == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionAssociations")) } - if s.ProductId == nil { - invalidParams.Add(request.NewErrParamRequired("ProductId")) - } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + if s.ServiceActionAssociations != nil && len(s.ServiceActionAssociations) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionAssociations", 1)) } - if s.SourcePortfolioId != nil && len(*s.SourcePortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourcePortfolioId", 1)) + if s.ServiceActionAssociations != nil { + for i, v := range s.ServiceActionAssociations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ServiceActionAssociations", i), err.(request.ErrInvalidParams)) + } + } } if invalidParams.Len() > 0 { @@ -5999,78 +7419,88 @@ func (s *AssociateProductWithPortfolioInput) Validate() error { } // SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *AssociateProductWithPortfolioInput) SetAcceptLanguage(v string) *AssociateProductWithPortfolioInput { +func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) SetAcceptLanguage(v string) *BatchAssociateServiceActionWithProvisioningArtifactInput { s.AcceptLanguage = &v return s } -// SetPortfolioId sets the PortfolioId field's value. -func (s *AssociateProductWithPortfolioInput) SetPortfolioId(v string) *AssociateProductWithPortfolioInput { - s.PortfolioId = &v - return s -} - -// SetProductId sets the ProductId field's value. -func (s *AssociateProductWithPortfolioInput) SetProductId(v string) *AssociateProductWithPortfolioInput { - s.ProductId = &v - return s -} - -// SetSourcePortfolioId sets the SourcePortfolioId field's value. -func (s *AssociateProductWithPortfolioInput) SetSourcePortfolioId(v string) *AssociateProductWithPortfolioInput { - s.SourcePortfolioId = &v +// SetServiceActionAssociations sets the ServiceActionAssociations field's value. +func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) SetServiceActionAssociations(v []*ServiceActionAssociation) *BatchAssociateServiceActionWithProvisioningArtifactInput { + s.ServiceActionAssociations = v return s } -type AssociateProductWithPortfolioOutput struct { +type BatchAssociateServiceActionWithProvisioningArtifactOutput struct { _ struct{} `type:"structure"` + + // An object that contains a list of errors, along with information to help + // you identify the self-service action. + FailedServiceActionAssociations []*FailedServiceActionAssociation `type:"list"` } // String returns the string representation -func (s AssociateProductWithPortfolioOutput) String() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AssociateProductWithPortfolioOutput) GoString() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactOutput) GoString() string { return s.String() } -type AssociateTagOptionWithResourceInput struct { +// SetFailedServiceActionAssociations sets the FailedServiceActionAssociations field's value. +func (s *BatchAssociateServiceActionWithProvisioningArtifactOutput) SetFailedServiceActionAssociations(v []*FailedServiceActionAssociation) *BatchAssociateServiceActionWithProvisioningArtifactOutput { + s.FailedServiceActionAssociations = v + return s +} + +type BatchDisassociateServiceActionFromProvisioningArtifactInput struct { _ struct{} `type:"structure"` - // The resource identifier. + // The language code. // - // ResourceId is a required field - ResourceId *string `type:"string" required:"true"` + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` - // The TagOption identifier. + // One or more associations, each consisting of the Action ID, the Product ID, + // and the Provisioning Artifact ID. // - // TagOptionId is a required field - TagOptionId *string `min:"1" type:"string" required:"true"` + // ServiceActionAssociations is a required field + ServiceActionAssociations []*ServiceActionAssociation `min:"1" type:"list" required:"true"` } // String returns the string representation -func (s AssociateTagOptionWithResourceInput) String() string { +func (s BatchDisassociateServiceActionFromProvisioningArtifactInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AssociateTagOptionWithResourceInput) GoString() string { +func (s BatchDisassociateServiceActionFromProvisioningArtifactInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateTagOptionWithResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateTagOptionWithResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) +func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchDisassociateServiceActionFromProvisioningArtifactInput"} + if s.ServiceActionAssociations == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionAssociations")) } - if s.TagOptionId == nil { - invalidParams.Add(request.NewErrParamRequired("TagOptionId")) + if s.ServiceActionAssociations != nil && len(s.ServiceActionAssociations) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionAssociations", 1)) } - if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) + if s.ServiceActionAssociations != nil { + for i, v := range s.ServiceActionAssociations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ServiceActionAssociations", i), err.(request.ErrInvalidParams)) + } + } } if invalidParams.Len() > 0 { @@ -6079,32 +7509,42 @@ func (s *AssociateTagOptionWithResourceInput) Validate() error { return nil } -// SetResourceId sets the ResourceId field's value. -func (s *AssociateTagOptionWithResourceInput) SetResourceId(v string) *AssociateTagOptionWithResourceInput { - s.ResourceId = &v +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) SetAcceptLanguage(v string) *BatchDisassociateServiceActionFromProvisioningArtifactInput { + s.AcceptLanguage = &v return s } -// SetTagOptionId sets the TagOptionId field's value. -func (s *AssociateTagOptionWithResourceInput) SetTagOptionId(v string) *AssociateTagOptionWithResourceInput { - s.TagOptionId = &v +// SetServiceActionAssociations sets the ServiceActionAssociations field's value. +func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) SetServiceActionAssociations(v []*ServiceActionAssociation) *BatchDisassociateServiceActionFromProvisioningArtifactInput { + s.ServiceActionAssociations = v return s } -type AssociateTagOptionWithResourceOutput struct { +type BatchDisassociateServiceActionFromProvisioningArtifactOutput struct { _ struct{} `type:"structure"` + + // An object that contains a list of errors, along with information to help + // you identify the self-service action. + FailedServiceActionAssociations []*FailedServiceActionAssociation `type:"list"` } // String returns the string representation -func (s AssociateTagOptionWithResourceOutput) String() string { +func (s BatchDisassociateServiceActionFromProvisioningArtifactOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AssociateTagOptionWithResourceOutput) GoString() string { +func (s BatchDisassociateServiceActionFromProvisioningArtifactOutput) GoString() string { return s.String() } +// SetFailedServiceActionAssociations sets the FailedServiceActionAssociations field's value. +func (s *BatchDisassociateServiceActionFromProvisioningArtifactOutput) SetFailedServiceActionAssociations(v []*FailedServiceActionAssociation) *BatchDisassociateServiceActionFromProvisioningArtifactOutput { + s.FailedServiceActionAssociations = v + return s +} + // Information about a CloudWatch dashboard. type CloudWatchDashboard struct { _ struct{} `type:"structure"` @@ -7330,13 +8770,171 @@ func (s *CreateProvisioningArtifactInput) Validate() error { if s.ProductId == nil { invalidParams.Add(request.NewErrParamRequired("ProductId")) } - if s.ProductId != nil && len(*s.ProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.Parameters != nil { + if err := s.Parameters.Validate(); err != nil { + invalidParams.AddNested("Parameters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CreateProvisioningArtifactInput) SetAcceptLanguage(v string) *CreateProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateProvisioningArtifactInput) SetIdempotencyToken(v string) *CreateProvisioningArtifactInput { + s.IdempotencyToken = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *CreateProvisioningArtifactInput) SetParameters(v *ProvisioningArtifactProperties) *CreateProvisioningArtifactInput { + s.Parameters = v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *CreateProvisioningArtifactInput) SetProductId(v string) *CreateProvisioningArtifactInput { + s.ProductId = &v + return s +} + +type CreateProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` + + // The URL of the CloudFormation template in Amazon S3, in JSON format. + Info map[string]*string `min:"1" type:"map"` + + // Information about the provisioning artifact. + ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` + + // The status of the current request. + Status *string `type:"string" enum:"Status"` +} + +// String returns the string representation +func (s CreateProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateProvisioningArtifactOutput) GoString() string { + return s.String() +} + +// SetInfo sets the Info field's value. +func (s *CreateProvisioningArtifactOutput) SetInfo(v map[string]*string) *CreateProvisioningArtifactOutput { + s.Info = v + return s +} + +// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. +func (s *CreateProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *CreateProvisioningArtifactOutput { + s.ProvisioningArtifactDetail = v + return s +} + +// SetStatus sets the Status field's value. +func (s *CreateProvisioningArtifactOutput) SetStatus(v string) *CreateProvisioningArtifactOutput { + s.Status = &v + return s +} + +type CreateServiceActionInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The self-service action definition. Can be one of the following: + // + // NameThe name of the AWS Systems Manager Document. For example, AWS-RestartEC2Instance. + // + // VersionThe AWS Systems Manager automation document version. For example, + // "Version": "1" + // + // AssumeRoleThe Amazon Resource Name (ARN) of the role that performs the self-service + // actions on your behalf. For example, "AssumeRole": "arn:aws:iam::12345678910:role/ActionRole". + // + // To reuse the provisioned product launch role, set to "AssumeRole": "LAUNCH_ROLE". + // + // ParametersThe list of parameters in JSON format. + // + // For example: [{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]. + // + // Definition is a required field + Definition map[string]*string `min:"1" type:"map" required:"true"` + + // The service action definition type. For example, SSM_AUTOMATION. + // + // DefinitionType is a required field + DefinitionType *string `type:"string" required:"true" enum:"ServiceActionDefinitionType"` + + // The self-service action description. + Description *string `type:"string"` + + // A unique identifier that you provide to ensure idempotency. If multiple requests + // differ only by the idempotency token, the same response is returned for each + // repeated request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // The self-service action name. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateServiceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateServiceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateServiceActionInput"} + if s.Definition == nil { + invalidParams.Add(request.NewErrParamRequired("Definition")) + } + if s.Definition != nil && len(s.Definition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) + } + if s.DefinitionType == nil { + invalidParams.Add(request.NewErrParamRequired("DefinitionType")) + } + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.Parameters != nil { - if err := s.Parameters.Validate(); err != nil { - invalidParams.AddNested("Parameters", err.(request.ErrInvalidParams)) - } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { @@ -7346,67 +8944,61 @@ func (s *CreateProvisioningArtifactInput) Validate() error { } // SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *CreateProvisioningArtifactInput) SetAcceptLanguage(v string) *CreateProvisioningArtifactInput { +func (s *CreateServiceActionInput) SetAcceptLanguage(v string) *CreateServiceActionInput { s.AcceptLanguage = &v return s } -// SetIdempotencyToken sets the IdempotencyToken field's value. -func (s *CreateProvisioningArtifactInput) SetIdempotencyToken(v string) *CreateProvisioningArtifactInput { - s.IdempotencyToken = &v +// SetDefinition sets the Definition field's value. +func (s *CreateServiceActionInput) SetDefinition(v map[string]*string) *CreateServiceActionInput { + s.Definition = v return s } -// SetParameters sets the Parameters field's value. -func (s *CreateProvisioningArtifactInput) SetParameters(v *ProvisioningArtifactProperties) *CreateProvisioningArtifactInput { - s.Parameters = v +// SetDefinitionType sets the DefinitionType field's value. +func (s *CreateServiceActionInput) SetDefinitionType(v string) *CreateServiceActionInput { + s.DefinitionType = &v return s } -// SetProductId sets the ProductId field's value. -func (s *CreateProvisioningArtifactInput) SetProductId(v string) *CreateProvisioningArtifactInput { - s.ProductId = &v +// SetDescription sets the Description field's value. +func (s *CreateServiceActionInput) SetDescription(v string) *CreateServiceActionInput { + s.Description = &v return s } -type CreateProvisioningArtifactOutput struct { - _ struct{} `type:"structure"` +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateServiceActionInput) SetIdempotencyToken(v string) *CreateServiceActionInput { + s.IdempotencyToken = &v + return s +} - // The URL of the CloudFormation template in Amazon S3, in JSON format. - Info map[string]*string `min:"1" type:"map"` +// SetName sets the Name field's value. +func (s *CreateServiceActionInput) SetName(v string) *CreateServiceActionInput { + s.Name = &v + return s +} - // Information about the provisioning artifact. - ProvisioningArtifactDetail *ProvisioningArtifactDetail `type:"structure"` +type CreateServiceActionOutput struct { + _ struct{} `type:"structure"` - // The status of the current request. - Status *string `type:"string" enum:"Status"` + // An object containing information about the self-service action. + ServiceActionDetail *ServiceActionDetail `type:"structure"` } // String returns the string representation -func (s CreateProvisioningArtifactOutput) String() string { +func (s CreateServiceActionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateProvisioningArtifactOutput) GoString() string { +func (s CreateServiceActionOutput) GoString() string { return s.String() } -// SetInfo sets the Info field's value. -func (s *CreateProvisioningArtifactOutput) SetInfo(v map[string]*string) *CreateProvisioningArtifactOutput { - s.Info = v - return s -} - -// SetProvisioningArtifactDetail sets the ProvisioningArtifactDetail field's value. -func (s *CreateProvisioningArtifactOutput) SetProvisioningArtifactDetail(v *ProvisioningArtifactDetail) *CreateProvisioningArtifactOutput { - s.ProvisioningArtifactDetail = v - return s -} - -// SetStatus sets the Status field's value. -func (s *CreateProvisioningArtifactOutput) SetStatus(v string) *CreateProvisioningArtifactOutput { - s.Status = &v +// SetServiceActionDetail sets the ServiceActionDetail field's value. +func (s *CreateServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *CreateServiceActionOutput { + s.ServiceActionDetail = v return s } @@ -7952,6 +9544,76 @@ func (s DeleteProvisioningArtifactOutput) GoString() string { return s.String() } +type DeleteServiceActionInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteServiceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServiceActionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DeleteServiceActionInput) SetAcceptLanguage(v string) *DeleteServiceActionInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DeleteServiceActionInput) SetId(v string) *DeleteServiceActionInput { + s.Id = &v + return s +} + +type DeleteServiceActionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceActionOutput) GoString() string { + return s.String() +} + type DeleteTagOptionInput struct { _ struct{} `type:"structure"` @@ -9167,6 +10829,85 @@ func (s *DescribeRecordOutput) SetRecordOutputs(v []*RecordOutput) *DescribeReco return s } +type DescribeServiceActionInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The self-service action identifier. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeServiceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServiceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeServiceActionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeServiceActionInput) SetAcceptLanguage(v string) *DescribeServiceActionInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeServiceActionInput) SetId(v string) *DescribeServiceActionInput { + s.Id = &v + return s +} + +type DescribeServiceActionOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about the self-service action. + ServiceActionDetail *ServiceActionDetail `type:"structure"` +} + +// String returns the string representation +func (s DescribeServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServiceActionOutput) GoString() string { + return s.String() +} + +// SetServiceActionDetail sets the ServiceActionDetail field's value. +func (s *DescribeServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *DescribeServiceActionOutput { + s.ServiceActionDetail = v + return s +} + type DescribeTagOptionInput struct { _ struct{} `type:"structure"` @@ -9335,37 +11076,135 @@ type DisassociateProductFromPortfolioInput struct { // PortfolioId is a required field PortfolioId *string `min:"1" type:"string" required:"true"` - // The product identifier. + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateProductFromPortfolioInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateProductFromPortfolioInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateProductFromPortfolioInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateProductFromPortfolioInput"} + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DisassociateProductFromPortfolioInput) SetAcceptLanguage(v string) *DisassociateProductFromPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *DisassociateProductFromPortfolioInput) SetPortfolioId(v string) *DisassociateProductFromPortfolioInput { + s.PortfolioId = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *DisassociateProductFromPortfolioInput) SetProductId(v string) *DisassociateProductFromPortfolioInput { + s.ProductId = &v + return s +} + +type DisassociateProductFromPortfolioOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateProductFromPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateProductFromPortfolioOutput) GoString() string { + return s.String() +} + +type DisassociateServiceActionFromProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. // // ProductId is a required field ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s DisassociateProductFromPortfolioInput) String() string { +func (s DisassociateServiceActionFromProvisioningArtifactInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateProductFromPortfolioInput) GoString() string { +func (s DisassociateServiceActionFromProvisioningArtifactInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateProductFromPortfolioInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateProductFromPortfolioInput"} - if s.PortfolioId == nil { - invalidParams.Add(request.NewErrParamRequired("PortfolioId")) - } - if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) - } +func (s *DisassociateServiceActionFromProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateServiceActionFromProvisioningArtifactInput"} if s.ProductId == nil { invalidParams.Add(request.NewErrParamRequired("ProductId")) } if s.ProductId != nil && len(*s.ProductId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9374,34 +11213,40 @@ func (s *DisassociateProductFromPortfolioInput) Validate() error { } // SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *DisassociateProductFromPortfolioInput) SetAcceptLanguage(v string) *DisassociateProductFromPortfolioInput { +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetAcceptLanguage(v string) *DisassociateServiceActionFromProvisioningArtifactInput { s.AcceptLanguage = &v return s } -// SetPortfolioId sets the PortfolioId field's value. -func (s *DisassociateProductFromPortfolioInput) SetPortfolioId(v string) *DisassociateProductFromPortfolioInput { - s.PortfolioId = &v +// SetProductId sets the ProductId field's value. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetProductId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { + s.ProductId = &v return s } -// SetProductId sets the ProductId field's value. -func (s *DisassociateProductFromPortfolioInput) SetProductId(v string) *DisassociateProductFromPortfolioInput { - s.ProductId = &v +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetProvisioningArtifactId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { + s.ProvisioningArtifactId = &v return s } -type DisassociateProductFromPortfolioOutput struct { +// SetServiceActionId sets the ServiceActionId field's value. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetServiceActionId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { + s.ServiceActionId = &v + return s +} + +type DisassociateServiceActionFromProvisioningArtifactOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DisassociateProductFromPortfolioOutput) String() string { +func (s DisassociateServiceActionFromProvisioningArtifactOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateProductFromPortfolioOutput) GoString() string { +func (s DisassociateServiceActionFromProvisioningArtifactOutput) GoString() string { return s.String() } @@ -9572,6 +11417,181 @@ func (s *ExecuteProvisionedProductPlanOutput) SetRecordDetail(v *RecordDetail) * return s } +type ExecuteProvisionedProductServiceActionInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // An idempotency token that uniquely identifies the execute request. + // + // ExecuteToken is a required field + ExecuteToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + + // The identifier of the provisioned product. + // + // ProvisionedProductId is a required field + ProvisionedProductId *string `min:"1" type:"string" required:"true"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ExecuteProvisionedProductServiceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExecuteProvisionedProductServiceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExecuteProvisionedProductServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExecuteProvisionedProductServiceActionInput"} + if s.ExecuteToken == nil { + invalidParams.Add(request.NewErrParamRequired("ExecuteToken")) + } + if s.ExecuteToken != nil && len(*s.ExecuteToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExecuteToken", 1)) + } + if s.ProvisionedProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionedProductId")) + } + if s.ProvisionedProductId != nil && len(*s.ProvisionedProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetAcceptLanguage(v string) *ExecuteProvisionedProductServiceActionInput { + s.AcceptLanguage = &v + return s +} + +// SetExecuteToken sets the ExecuteToken field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetExecuteToken(v string) *ExecuteProvisionedProductServiceActionInput { + s.ExecuteToken = &v + return s +} + +// SetProvisionedProductId sets the ProvisionedProductId field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetProvisionedProductId(v string) *ExecuteProvisionedProductServiceActionInput { + s.ProvisionedProductId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetServiceActionId(v string) *ExecuteProvisionedProductServiceActionInput { + s.ServiceActionId = &v + return s +} + +type ExecuteProvisionedProductServiceActionOutput struct { + _ struct{} `type:"structure"` + + // An object containing detailed information about the result of provisioning + // the product. + RecordDetail *RecordDetail `type:"structure"` +} + +// String returns the string representation +func (s ExecuteProvisionedProductServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExecuteProvisionedProductServiceActionOutput) GoString() string { + return s.String() +} + +// SetRecordDetail sets the RecordDetail field's value. +func (s *ExecuteProvisionedProductServiceActionOutput) SetRecordDetail(v *RecordDetail) *ExecuteProvisionedProductServiceActionOutput { + s.RecordDetail = v + return s +} + +// An object containing information about the error, along with identifying +// information about the self-service action and its associations. +type FailedServiceActionAssociation struct { + _ struct{} `type:"structure"` + + // The error code. Valid values are listed below. + ErrorCode *string `type:"string" enum:"ServiceActionAssociationErrorCode"` + + // A text description of the error. + ErrorMessage *string `min:"1" type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + ProductId *string `min:"1" type:"string"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + ProvisioningArtifactId *string `min:"1" type:"string"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + ServiceActionId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s FailedServiceActionAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedServiceActionAssociation) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *FailedServiceActionAssociation) SetErrorCode(v string) *FailedServiceActionAssociation { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *FailedServiceActionAssociation) SetErrorMessage(v string) *FailedServiceActionAssociation { + s.ErrorMessage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *FailedServiceActionAssociation) SetProductId(v string) *FailedServiceActionAssociation { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *FailedServiceActionAssociation) SetProvisioningArtifactId(v string) *FailedServiceActionAssociation { + s.ProvisioningArtifactId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *FailedServiceActionAssociation) SetServiceActionId(v string) *FailedServiceActionAssociation { + s.ServiceActionId = &v + return s +} + // Summary information about a product path for a user. type LaunchPathSummary struct { _ struct{} `type:"structure"` @@ -10275,63 +12295,175 @@ func (s *ListPrincipalsForPortfolioInput) Validate() error { } // SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListPrincipalsForPortfolioInput) SetAcceptLanguage(v string) *ListPrincipalsForPortfolioInput { +func (s *ListPrincipalsForPortfolioInput) SetAcceptLanguage(v string) *ListPrincipalsForPortfolioInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListPrincipalsForPortfolioInput) SetPageSize(v int64) *ListPrincipalsForPortfolioInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListPrincipalsForPortfolioInput) SetPageToken(v string) *ListPrincipalsForPortfolioInput { + s.PageToken = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *ListPrincipalsForPortfolioInput) SetPortfolioId(v string) *ListPrincipalsForPortfolioInput { + s.PortfolioId = &v + return s +} + +type ListPrincipalsForPortfolioOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` + + // The IAM principals (users or roles) associated with the portfolio. + Principals []*Principal `type:"list"` +} + +// String returns the string representation +func (s ListPrincipalsForPortfolioOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPrincipalsForPortfolioOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListPrincipalsForPortfolioOutput) SetNextPageToken(v string) *ListPrincipalsForPortfolioOutput { + s.NextPageToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *ListPrincipalsForPortfolioOutput) SetPrincipals(v []*Principal) *ListPrincipalsForPortfolioOutput { + s.Principals = v + return s +} + +type ListProvisionedProductPlansInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The access level to use to obtain results. The default is User. + AccessLevelFilter *AccessLevelFilter `type:"structure"` + + // The maximum number of items to return with this call. + PageSize *int64 `type:"integer"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` + + // The product identifier. + ProvisionProductId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListProvisionedProductPlansInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListProvisionedProductPlansInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListProvisionedProductPlansInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProvisionedProductPlansInput"} + if s.ProvisionProductId != nil && len(*s.ProvisionProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionProductId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListProvisionedProductPlansInput) SetAcceptLanguage(v string) *ListProvisionedProductPlansInput { s.AcceptLanguage = &v return s } +// SetAccessLevelFilter sets the AccessLevelFilter field's value. +func (s *ListProvisionedProductPlansInput) SetAccessLevelFilter(v *AccessLevelFilter) *ListProvisionedProductPlansInput { + s.AccessLevelFilter = v + return s +} + // SetPageSize sets the PageSize field's value. -func (s *ListPrincipalsForPortfolioInput) SetPageSize(v int64) *ListPrincipalsForPortfolioInput { +func (s *ListProvisionedProductPlansInput) SetPageSize(v int64) *ListProvisionedProductPlansInput { s.PageSize = &v return s } // SetPageToken sets the PageToken field's value. -func (s *ListPrincipalsForPortfolioInput) SetPageToken(v string) *ListPrincipalsForPortfolioInput { +func (s *ListProvisionedProductPlansInput) SetPageToken(v string) *ListProvisionedProductPlansInput { s.PageToken = &v return s } -// SetPortfolioId sets the PortfolioId field's value. -func (s *ListPrincipalsForPortfolioInput) SetPortfolioId(v string) *ListPrincipalsForPortfolioInput { - s.PortfolioId = &v +// SetProvisionProductId sets the ProvisionProductId field's value. +func (s *ListProvisionedProductPlansInput) SetProvisionProductId(v string) *ListProvisionedProductPlansInput { + s.ProvisionProductId = &v return s } -type ListPrincipalsForPortfolioOutput struct { +type ListProvisionedProductPlansOutput struct { _ struct{} `type:"structure"` // The page token to use to retrieve the next set of results. If there are no // additional results, this value is null. NextPageToken *string `type:"string"` - // The IAM principals (users or roles) associated with the portfolio. - Principals []*Principal `type:"list"` + // Information about the plans. + ProvisionedProductPlans []*ProvisionedProductPlanSummary `type:"list"` } // String returns the string representation -func (s ListPrincipalsForPortfolioOutput) String() string { +func (s ListProvisionedProductPlansOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListPrincipalsForPortfolioOutput) GoString() string { +func (s ListProvisionedProductPlansOutput) GoString() string { return s.String() } // SetNextPageToken sets the NextPageToken field's value. -func (s *ListPrincipalsForPortfolioOutput) SetNextPageToken(v string) *ListPrincipalsForPortfolioOutput { +func (s *ListProvisionedProductPlansOutput) SetNextPageToken(v string) *ListProvisionedProductPlansOutput { s.NextPageToken = &v return s } -// SetPrincipals sets the Principals field's value. -func (s *ListPrincipalsForPortfolioOutput) SetPrincipals(v []*Principal) *ListPrincipalsForPortfolioOutput { - s.Principals = v +// SetProvisionedProductPlans sets the ProvisionedProductPlans field's value. +func (s *ListProvisionedProductPlansOutput) SetProvisionedProductPlans(v []*ProvisionedProductPlanSummary) *ListProvisionedProductPlansOutput { + s.ProvisionedProductPlans = v return s } -type ListProvisionedProductPlansInput struct { +type ListProvisioningArtifactsForServiceActionInput struct { _ struct{} `type:"structure"` // The language code. @@ -10343,9 +12475,6 @@ type ListProvisionedProductPlansInput struct { // * zh - Chinese AcceptLanguage *string `type:"string"` - // The access level to use to obtain results. The default is User. - AccessLevelFilter *AccessLevelFilter `type:"structure"` - // The maximum number of items to return with this call. PageSize *int64 `type:"integer"` @@ -10353,25 +12482,30 @@ type ListProvisionedProductPlansInput struct { // results, use null. PageToken *string `type:"string"` - // The product identifier. - ProvisionProductId *string `min:"1" type:"string"` + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s ListProvisionedProductPlansInput) String() string { +func (s ListProvisioningArtifactsForServiceActionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListProvisionedProductPlansInput) GoString() string { +func (s ListProvisioningArtifactsForServiceActionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListProvisionedProductPlansInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProvisionedProductPlansInput"} - if s.ProvisionProductId != nil && len(*s.ProvisionProductId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ProvisionProductId", 1)) +func (s *ListProvisioningArtifactsForServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProvisioningArtifactsForServiceActionInput"} + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) } if invalidParams.Len() > 0 { @@ -10381,65 +12515,60 @@ func (s *ListProvisionedProductPlansInput) Validate() error { } // SetAcceptLanguage sets the AcceptLanguage field's value. -func (s *ListProvisionedProductPlansInput) SetAcceptLanguage(v string) *ListProvisionedProductPlansInput { +func (s *ListProvisioningArtifactsForServiceActionInput) SetAcceptLanguage(v string) *ListProvisioningArtifactsForServiceActionInput { s.AcceptLanguage = &v return s } -// SetAccessLevelFilter sets the AccessLevelFilter field's value. -func (s *ListProvisionedProductPlansInput) SetAccessLevelFilter(v *AccessLevelFilter) *ListProvisionedProductPlansInput { - s.AccessLevelFilter = v - return s -} - // SetPageSize sets the PageSize field's value. -func (s *ListProvisionedProductPlansInput) SetPageSize(v int64) *ListProvisionedProductPlansInput { +func (s *ListProvisioningArtifactsForServiceActionInput) SetPageSize(v int64) *ListProvisioningArtifactsForServiceActionInput { s.PageSize = &v return s } // SetPageToken sets the PageToken field's value. -func (s *ListProvisionedProductPlansInput) SetPageToken(v string) *ListProvisionedProductPlansInput { +func (s *ListProvisioningArtifactsForServiceActionInput) SetPageToken(v string) *ListProvisioningArtifactsForServiceActionInput { s.PageToken = &v return s } -// SetProvisionProductId sets the ProvisionProductId field's value. -func (s *ListProvisionedProductPlansInput) SetProvisionProductId(v string) *ListProvisionedProductPlansInput { - s.ProvisionProductId = &v +// SetServiceActionId sets the ServiceActionId field's value. +func (s *ListProvisioningArtifactsForServiceActionInput) SetServiceActionId(v string) *ListProvisioningArtifactsForServiceActionInput { + s.ServiceActionId = &v return s } -type ListProvisionedProductPlansOutput struct { +type ListProvisioningArtifactsForServiceActionOutput struct { _ struct{} `type:"structure"` // The page token to use to retrieve the next set of results. If there are no // additional results, this value is null. NextPageToken *string `type:"string"` - // Information about the plans. - ProvisionedProductPlans []*ProvisionedProductPlanSummary `type:"list"` + // An array of objects with information about product views and provisioning + // artifacts. + ProvisioningArtifactViews []*ProvisioningArtifactView `type:"list"` } // String returns the string representation -func (s ListProvisionedProductPlansOutput) String() string { +func (s ListProvisioningArtifactsForServiceActionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListProvisionedProductPlansOutput) GoString() string { +func (s ListProvisioningArtifactsForServiceActionOutput) GoString() string { return s.String() } // SetNextPageToken sets the NextPageToken field's value. -func (s *ListProvisionedProductPlansOutput) SetNextPageToken(v string) *ListProvisionedProductPlansOutput { +func (s *ListProvisioningArtifactsForServiceActionOutput) SetNextPageToken(v string) *ListProvisioningArtifactsForServiceActionOutput { s.NextPageToken = &v return s } -// SetProvisionedProductPlans sets the ProvisionedProductPlans field's value. -func (s *ListProvisionedProductPlansOutput) SetProvisionedProductPlans(v []*ProvisionedProductPlanSummary) *ListProvisionedProductPlansOutput { - s.ProvisionedProductPlans = v +// SetProvisioningArtifactViews sets the ProvisioningArtifactViews field's value. +func (s *ListProvisioningArtifactsForServiceActionOutput) SetProvisioningArtifactViews(v []*ProvisioningArtifactView) *ListProvisioningArtifactsForServiceActionOutput { + s.ProvisioningArtifactViews = v return s } @@ -10754,24 +12883,232 @@ type ListResourcesForTagOptionOutput struct { } // String returns the string representation -func (s ListResourcesForTagOptionOutput) String() string { +func (s ListResourcesForTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourcesForTagOptionOutput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *ListResourcesForTagOptionOutput) SetPageToken(v string) *ListResourcesForTagOptionOutput { + s.PageToken = &v + return s +} + +// SetResourceDetails sets the ResourceDetails field's value. +func (s *ListResourcesForTagOptionOutput) SetResourceDetails(v []*ResourceDetail) *ListResourcesForTagOptionOutput { + s.ResourceDetails = v + return s +} + +type ListServiceActionsForProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return with this call. + PageSize *int64 `type:"integer"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListServiceActionsForProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListServiceActionsForProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListServiceActionsForProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListServiceActionsForProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetAcceptLanguage(v string) *ListServiceActionsForProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetPageSize(v int64) *ListServiceActionsForProvisioningArtifactInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetPageToken(v string) *ListServiceActionsForProvisioningArtifactInput { + s.PageToken = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetProductId(v string) *ListServiceActionsForProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetProvisioningArtifactId(v string) *ListServiceActionsForProvisioningArtifactInput { + s.ProvisioningArtifactId = &v + return s +} + +type ListServiceActionsForProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` + + // An object containing information about the self-service actions associated + // with the provisioning artifact. + ServiceActionSummaries []*ServiceActionSummary `type:"list"` +} + +// String returns the string representation +func (s ListServiceActionsForProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListServiceActionsForProvisioningArtifactOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListServiceActionsForProvisioningArtifactOutput) SetNextPageToken(v string) *ListServiceActionsForProvisioningArtifactOutput { + s.NextPageToken = &v + return s +} + +// SetServiceActionSummaries sets the ServiceActionSummaries field's value. +func (s *ListServiceActionsForProvisioningArtifactOutput) SetServiceActionSummaries(v []*ServiceActionSummary) *ListServiceActionsForProvisioningArtifactOutput { + s.ServiceActionSummaries = v + return s +} + +type ListServiceActionsInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return with this call. + PageSize *int64 `type:"integer"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` +} + +// String returns the string representation +func (s ListServiceActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListServiceActionsInput) GoString() string { + return s.String() +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListServiceActionsInput) SetAcceptLanguage(v string) *ListServiceActionsInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListServiceActionsInput) SetPageSize(v int64) *ListServiceActionsInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListServiceActionsInput) SetPageToken(v string) *ListServiceActionsInput { + s.PageToken = &v + return s +} + +type ListServiceActionsOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` + + // An object containing information about the service actions associated with + // the provisioning artifact. + ServiceActionSummaries []*ServiceActionSummary `type:"list"` +} + +// String returns the string representation +func (s ListServiceActionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListResourcesForTagOptionOutput) GoString() string { +func (s ListServiceActionsOutput) GoString() string { return s.String() } -// SetPageToken sets the PageToken field's value. -func (s *ListResourcesForTagOptionOutput) SetPageToken(v string) *ListResourcesForTagOptionOutput { - s.PageToken = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListServiceActionsOutput) SetNextPageToken(v string) *ListServiceActionsOutput { + s.NextPageToken = &v return s } -// SetResourceDetails sets the ResourceDetails field's value. -func (s *ListResourcesForTagOptionOutput) SetResourceDetails(v []*ResourceDetail) *ListResourcesForTagOptionOutput { - s.ResourceDetails = v +// SetServiceActionSummaries sets the ServiceActionSummaries field's value. +func (s *ListServiceActionsOutput) SetServiceActionSummaries(v []*ServiceActionSummary) *ListServiceActionsOutput { + s.ServiceActionSummaries = v return s } @@ -11650,6 +13987,12 @@ type ProvisionedProductDetail struct { // The user-friendly name of the provisioned product. Name *string `min:"1" type:"string"` + // The product identifier. For example, prod-abcdzk7xy33qa. + ProductId *string `min:"1" type:"string"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + ProvisioningArtifactId *string `min:"1" type:"string"` + // The current status of the provisioned product. // // * AVAILABLE - Stable state, ready to perform any operation. The most recent @@ -11721,6 +14064,18 @@ func (s *ProvisionedProductDetail) SetName(v string) *ProvisionedProductDetail { return s } +// SetProductId sets the ProductId field's value. +func (s *ProvisionedProductDetail) SetProductId(v string) *ProvisionedProductDetail { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *ProvisionedProductDetail) SetProvisioningArtifactId(v string) *ProvisionedProductDetail { + s.ProvisioningArtifactId = &v + return s +} + // SetStatus sets the Status field's value. func (s *ProvisionedProductDetail) SetStatus(v string) *ProvisionedProductDetail { s.Status = &v @@ -12304,6 +14659,41 @@ func (s *ProvisioningArtifactSummary) SetProvisioningArtifactMetadata(v map[stri return s } +// An object that contains summary information about a product view and a provisioning +// artifact. +type ProvisioningArtifactView struct { + _ struct{} `type:"structure"` + + // Summary information about a product view. + ProductViewSummary *ProductViewSummary `type:"structure"` + + // Information about a provisioning artifact. A provisioning artifact is also + // known as a product version. + ProvisioningArtifact *ProvisioningArtifact `type:"structure"` +} + +// String returns the string representation +func (s ProvisioningArtifactView) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifactView) GoString() string { + return s.String() +} + +// SetProductViewSummary sets the ProductViewSummary field's value. +func (s *ProvisioningArtifactView) SetProductViewSummary(v *ProductViewSummary) *ProvisioningArtifactView { + s.ProductViewSummary = v + return s +} + +// SetProvisioningArtifact sets the ProvisioningArtifact field's value. +func (s *ProvisioningArtifactView) SetProvisioningArtifact(v *ProvisioningArtifact) *ProvisioningArtifactView { + s.ProvisioningArtifact = v + return s +} + // Information about a parameter used to provision a product. type ProvisioningParameter struct { _ struct{} `type:"structure"` @@ -13389,6 +15779,167 @@ func (s *SearchProvisionedProductsOutput) SetTotalResultsCount(v int64) *SearchP return s } +// A self-service action association consisting of the Action ID, the Product +// ID, and the Provisioning Artifact ID. +type ServiceActionAssociation struct { + _ struct{} `type:"structure"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ServiceActionAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceActionAssociation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ServiceActionAssociation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ServiceActionAssociation"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProductId sets the ProductId field's value. +func (s *ServiceActionAssociation) SetProductId(v string) *ServiceActionAssociation { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *ServiceActionAssociation) SetProvisioningArtifactId(v string) *ServiceActionAssociation { + s.ProvisioningArtifactId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *ServiceActionAssociation) SetServiceActionId(v string) *ServiceActionAssociation { + s.ServiceActionId = &v + return s +} + +// An object containing detailed information about the self-service action. +type ServiceActionDetail struct { + _ struct{} `type:"structure"` + + // A map that defines the self-service action. + Definition map[string]*string `min:"1" type:"map"` + + // Summary information about the self-service action. + ServiceActionSummary *ServiceActionSummary `type:"structure"` +} + +// String returns the string representation +func (s ServiceActionDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceActionDetail) GoString() string { + return s.String() +} + +// SetDefinition sets the Definition field's value. +func (s *ServiceActionDetail) SetDefinition(v map[string]*string) *ServiceActionDetail { + s.Definition = v + return s +} + +// SetServiceActionSummary sets the ServiceActionSummary field's value. +func (s *ServiceActionDetail) SetServiceActionSummary(v *ServiceActionSummary) *ServiceActionDetail { + s.ServiceActionSummary = v + return s +} + +// Detailed information about the self-service action. +type ServiceActionSummary struct { + _ struct{} `type:"structure"` + + // The self-service action definition type. For example, SSM_AUTOMATION. + DefinitionType *string `type:"string" enum:"ServiceActionDefinitionType"` + + // The self-service action description. + Description *string `type:"string"` + + // The self-service action identifier. + Id *string `min:"1" type:"string"` + + // The self-service action name. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ServiceActionSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceActionSummary) GoString() string { + return s.String() +} + +// SetDefinitionType sets the DefinitionType field's value. +func (s *ServiceActionSummary) SetDefinitionType(v string) *ServiceActionSummary { + s.DefinitionType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ServiceActionSummary) SetDescription(v string) *ServiceActionSummary { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *ServiceActionSummary) SetId(v string) *ServiceActionSummary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ServiceActionSummary) SetName(v string) *ServiceActionSummary { + s.Name = &v + return s +} + // Information about a tag. A tag is a key-value pair. Tags are propagated to // the resources created when provisioning a product. type Tag struct { @@ -14442,6 +16993,118 @@ func (s *UpdateProvisioningParameter) SetValue(v string) *UpdateProvisioningPara return s } +type UpdateServiceActionInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // A map that defines the self-service action. + Definition map[string]*string `min:"1" type:"map"` + + // The self-service action description. + Description *string `type:"string"` + + // The self-service action identifier. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // The self-service action name. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateServiceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateServiceActionInput"} + if s.Definition != nil && len(s.Definition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *UpdateServiceActionInput) SetAcceptLanguage(v string) *UpdateServiceActionInput { + s.AcceptLanguage = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *UpdateServiceActionInput) SetDefinition(v map[string]*string) *UpdateServiceActionInput { + s.Definition = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateServiceActionInput) SetDescription(v string) *UpdateServiceActionInput { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateServiceActionInput) SetId(v string) *UpdateServiceActionInput { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateServiceActionInput) SetName(v string) *UpdateServiceActionInput { + s.Name = &v + return s +} + +type UpdateServiceActionOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about the self-service action. + ServiceActionDetail *ServiceActionDetail `type:"structure"` +} + +// String returns the string representation +func (s UpdateServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceActionOutput) GoString() string { + return s.String() +} + +// SetServiceActionDetail sets the ServiceActionDetail field's value. +func (s *UpdateServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *UpdateServiceActionOutput { + s.ServiceActionDetail = v + return s +} + type UpdateTagOptionInput struct { _ struct{} `type:"structure"` @@ -14779,6 +17442,42 @@ const ( ResourceAttributeTags = "TAGS" ) +const ( + // ServiceActionAssociationErrorCodeDuplicateResource is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeDuplicateResource = "DUPLICATE_RESOURCE" + + // ServiceActionAssociationErrorCodeInternalFailure is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeInternalFailure = "INTERNAL_FAILURE" + + // ServiceActionAssociationErrorCodeLimitExceeded is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeLimitExceeded = "LIMIT_EXCEEDED" + + // ServiceActionAssociationErrorCodeResourceNotFound is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeResourceNotFound = "RESOURCE_NOT_FOUND" + + // ServiceActionAssociationErrorCodeThrottling is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeThrottling = "THROTTLING" +) + +const ( + // ServiceActionDefinitionKeyName is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyName = "Name" + + // ServiceActionDefinitionKeyVersion is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyVersion = "Version" + + // ServiceActionDefinitionKeyAssumeRole is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyAssumeRole = "AssumeRole" + + // ServiceActionDefinitionKeyParameters is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyParameters = "Parameters" +) + +const ( + // ServiceActionDefinitionTypeSsmAutomation is a ServiceActionDefinitionType enum value + ServiceActionDefinitionTypeSsmAutomation = "SSM_AUTOMATION" +) + const ( // SortOrderAscending is a SortOrder enum value SortOrderAscending = "ASCENDING" diff --git a/vendor/vendor.json b/vendor/vendor.json index 85b15947d71..af7c9a68f78 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -47,1036 +47,1036 @@ "versionExact": "v1.0.0" }, { - "checksumSHA1": "knP3bfGgAQa0v2GFZvfbXTU7PPQ=", + "checksumSHA1": "NTMpg2d3Yl053jP8gt+Qk7qq9UU=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "I87y3G8r14yKZQ5NlkupFUJ5jW0=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "1pENtl2K9hG7qoB7R6J7dAHa82g=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "KZylhHa5CQP8deDHphHMU2tUr3o=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { - "checksumSHA1": "ga8NLl3uroITvUgioRFFgSnSBt0=", + "checksumSHA1": "7AmyyJXVkMdmy8dphC3Nalx5XkI=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "mYqgKOMSGvLmrt0CoBNbqdcTM3c=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "WGg5z1n2JGCf7YIwtwlhn30svbo=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "+pDu3wk2/RDNjelVs3KE+03GqII=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { - "checksumSHA1": "zx1mZCdOwgbjBV3jMfb0kyDd//Q=", + "checksumSHA1": "Y7aklChDDsoRKhEIX/ACPnarw28=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "gQ1sGIVnPqvvxa9Ww2g/PGkk16M=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "QvKGojx+wCHTDfXQ1aoOYzH3Y88=", "path": "github.com/aws/aws-sdk-go/internal/s3err", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", "path": "github.com/aws/aws-sdk-go/internal/sdkuri", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { - "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=", + "checksumSHA1": "LjfJ5ydXdiSuQixC+HrmSZjW3NU=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "NHfa9brYkChSmKiBcKe+xMaJzlc=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "0cZnOaE1EcFUuiu4bdHV2k7slQg=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "tXRIRarT7qepHconxydtO7mXod4=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "v2c4B7IgTyjl7ShytqbTOqhCIoM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "lj56XJFI2OSp+hEOrFZ+eiEi/yM=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "S7NJNuKPbT+a9/zk9qC1/zZAHLM=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "ZZgzuZoMphxAf8wwz9QqpSQdBGc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "soXVJWQ/xvEB72Mo6FresaQIxLg=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "V5YPKdVv7D3cpcfO2gecYoB4+0E=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "TekD25t+ErY7ep0VSZU1RbOuAhg=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "QwCxwPjJNN4q4nhym3RcX80AHW4=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "AAv5tgpGyzpzwfftoAJnudq2334=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "4GehXfXvsfsv903OjmzEQskC2Z4=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "62J/tLeZX36VfFPh5+gCrH9kh/E=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "zuBvjLwdQ32/GXiMN8tbB6sX+Jk=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "n4HcNMas1d6LTxYVWwzamt9e/JY=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "QggGqwfJU9p9vk0Rc2GdQL5MwMk=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "VatUlbTYWJxikHDG/XnfIgejXtI=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "GwbK865fFiarZoSSzSbVqcJwuL4=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "PZHlzkNYMSasi//Us6Eguq/rz48=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "36H7Vj7tRy/x0zvKjXZxuOhZ4zk=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "tOw80eNTNpvIpMRVBr9oRjLcQ58=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { - "checksumSHA1": "0+BXzUdQBJAAjbVujdr/f2QPtY0=", + "checksumSHA1": "qWajWS3eZiZUIW1c2C3nH4tC+TI=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "YsLO1gRTLh3f+c3TdsYs0WqHUKo=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Np97rnL0sh65BKa/nnoAi0UMb1U=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "9Cxvnmqh2j0dX5OFoHOu5cePz1Y=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "FKWSs5Dezkgw45cO9tXo+n1D+2w=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "9uVTrIQWdmX4oWxLYOB6QHf7mdo=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "zJdKvz7MomKCn752Wizv3OkecrI=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Rj1HnUmX+z8y0dCh1c0QpMwAq38=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "cJY0EMAnPPjmLHW6BepTS4yrI/g=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "s2S+xgdxmt4yjviWgRzgX8Tk2pE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "ZyFu15gDzimylooj/DMnKc9PmUc=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "9BbhiZSlvXF8toLc1hjfa9SMU6M=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "af9EdSqDMCYQElRwv6JyhNIusQo=", "path": "github.com/aws/aws-sdk-go/service/datapipeline", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "E2PzR2gdjvKrUoxFlf5Recjd604=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "4bC9kZGFPtYITOw8jTdVFpJPNkM=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "d2cEBjI/sgDnWEzHtwkTqu7NS5Y=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "SMFibYGCd4yJfI7cV6m5hsA0DdU=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Sry+6J6O/Vi5Z6RvL40uu6Kb9KM=", "path": "github.com/aws/aws-sdk-go/service/dlm", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Ca+Lj+lYT1bFPmFqRFse3jtH1QA=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Cr+HUNBOotDvCYRZOjQJl/vg0yg=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Ib0Plp1+0bdv4RlTvyTjJY38drE=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "4QRd6sbMxvfIit9c1408cXvYoPA=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "8ea7fZjeKLrp8d0H2oPJt+CmAEk=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "zvWXQTNt4mA58PUlswztK+aniv0=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "UR7K4m62MzrSPEB4KLLEQOsJ4mw=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "iRZ8TBVI03KJhe3usx8HZH+hz7Q=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Xv5k/JHJ+CsuyUCc5SoENm2r8w4=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "apL29Unu7vIxb5VgA+HWW0nm1v0=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "f5/ev7DpX3Fn2Qg12TG8+aXX8Ek=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "SozrDFhzpIRmVf6xcx2OgsNSONE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Kv3fpVUq/lOmilTffzAnRQ/5yPk=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "BSlqxRfmXlzZyImxHw7UHGUuSj0=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "lAJmnDWbMBwbWp2LNj+EgoK44Gw=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "VOSOe2McOhEVDSfRAz7OM5stigI=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "BkSoTPbLpV9Ov9iVpuBRJv9j8+s=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "c7np8hnSiXMs/bPuMFV/w7KYcOg=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "a8UUqzlic1ljsDtjTH97ShjzFIY=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "xke6oymAAPvAuHxEm2eWp+mdaaw=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "dCgpJF6pCWT7O0Q+VW2MKFXA5FU=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "HSvJfXlGnhV+mKWxQaoJWnjFk1E=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "BqFgvuCkO8U2SOLpzBEWAwkSwL0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "o92noObpHXdSONAKlSCjmheNal0=", "path": "github.com/aws/aws-sdk-go/service/kinesisanalytics", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "ac/mCyWnYF9Br3WPYQcAOYGxCFc=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { - "checksumSHA1": "rRVn5APpAtnjk3lLWhGxDi812sE=", + "checksumSHA1": "S/ofAFO461yHy/kcnkxDWRxN/5g=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "R8gYQx1m4W1Z8GXwFz10Y9eFkpc=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "5BcOlcEph0K5MlSm/0DGWYpa1B8=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "RVGzBxEeU2U6tmIWIsK4HNCYOig=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "u4Z65p7SrBA7407CU/4tKzpDPBA=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Y7nzN30rW1YS5GdDEB1iu9NtcMk=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "rzfEIwVWz0hJQB9Mzl9y4s/TWpk=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "PI4HQYFv1c30dZh4O4CpuxC1sc8=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "+0XY+KB+iYfpkMAFLq2ufccYTxk=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "QzXXaK3Wp4dyew5yPBf6vvthDrU=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "y1mGrPJlPShO/yOagp/iFRyHMtg=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "ZkfCVW7M7hCcVhk4wUPOhIhfKm0=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "jbeiGywfS9eq+sgkpYdTSG1+6OY=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "W19YWtdLN9JEwQD9ZZhRY/1JpEE=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "xKY1N27xgmGIfx4qRKsuPRzhY4Q=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { - "checksumSHA1": "yVThETnmxmHrsI0rMHxTC49/0Oo=", + "checksumSHA1": "NFVVns8ZmIdoU33y0tjbMEYZ6Y8=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "Xx8T0QmW/MaImDRDsPEwCGNZhOA=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "vlVK2K/SLM4CXTxnpMK9MDVGjrg=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "yDbIw+lVcsmjyom0xI+8khZNy6o=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "XLR/Cf875+1mFrioTjpObEsQaM0=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "z61JVAuqczhmLFSS/p/TYlEPyyI=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "8fuk2Uppm5zHqEYhOsVmaW4MKKw=", "path": "github.com/aws/aws-sdk-go/service/serverlessapplicationrepository", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { - "checksumSHA1": "2W6qPyMta0zplxhPSITXahH6YU0=", + "checksumSHA1": "4ezrsNPbLKvC7R7CRRdxkfqEXa0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "+EZbk9VlvYV1bAT3NNHu3krvlvg=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "pq0s/7ZYvscjU6DHFxrasIIcu/o=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "/Ln2ZFfKCZq8hqfr613XO8ZpnRs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "g6KVAXiGpvaHGM6bOf5OBkvWRb4=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "nQ9M0Vf1QD+1fV9btS7o8SXZ2Bw=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "5nHvnLQSvF4JOtXu/hi+iZOVfak=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "rjhyLklllbyziCrIcimq8CIJKiE=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "+oRYFnGRYOqZGZcQ0hrOONtGH/k=", "path": "github.com/aws/aws-sdk-go/service/storagegateway", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "35a/vm5R/P68l/hQD55GqviO6bg=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "hTDzNXqoUUS81wwttkD8My6MstI=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "PR55l/umJd2tTXH03wDMA65g1gA=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "ySJkBXUzoWccGDdjChs4MLB1L0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "uhOc1/uS+mzb/LbLgu6U/tr4ofg=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "4b4fb865e4e4a972645dba0b9677e623dd83a8a8", - "revisionTime": "2018-10-11T22:25:41Z", - "version": "v1.15.53", - "versionExact": "v1.15.53" + "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", + "revisionTime": "2018-10-15T21:27:18Z", + "version": "v1.15.55", + "versionExact": "v1.15.55" }, { "checksumSHA1": "yBBHqv7DvZNsZdF00SO8PbEQAKU=", From aa983bff70e50695d9865281085c452aa8919d43 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 15 Oct 2018 19:42:45 -0400 Subject: [PATCH 2900/3316] Update CHANGELOG for #6117 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a1c578da83..8f3bd722bbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: ENHANCEMENTS: +* resource/aws_athena_database: Add `encryption_configuration` argument [GH-6117] * resource/aws_cloudwatch_metric_alarm: Validate `alarm_actions` [GH-6151] * resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` [GH-6140] * resource/aws_dx_connection: Add `jumbo_frame_capable` attribute [GH-6143] From 4275b66590ea6358d67549b85768a6611e818d8b Mon Sep 17 00:00:00 2001 From: Paul Tyng Date: Mon, 15 Oct 2018 12:36:49 -0400 Subject: [PATCH 2901/3316] Add copy about inter-region VPC peering limitations Fixes #6044 --- website/docs/r/vpc_peering.html.markdown | 6 ++++-- website/docs/r/vpc_peering_options.html.markdown | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/website/docs/r/vpc_peering.html.markdown b/website/docs/r/vpc_peering.html.markdown index 29ae3b5e8e0..63a39f728e6 100644 --- a/website/docs/r/vpc_peering.html.markdown +++ b/website/docs/r/vpc_peering.html.markdown @@ -126,8 +126,10 @@ must have support for the DNS hostnames enabled. This can be done using the [`en (vpc.html#enable_dns_hostnames) attribute in the [`aws_vpc`](vpc.html) resource. See [Using DNS with Your VPC] (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.html) user guide for more information. -* `allow_remote_vpc_dns_resolution` - (Optional) Allow a local VPC to resolve public DNS hostnames to private -IP addresses when queried from instances in the peer VPC. +* `allow_remote_vpc_dns_resolution` - (Optional) Allow a local VPC to resolve public DNS hostnames to +private IP addresses when queried from instances in the peer VPC. This is +[not supported](https://docs.aws.amazon.com/vpc/latest/peering/modify-peering-connections.html) for +inter-region VPC peering. * `allow_classic_link_to_remote_vpc` - (Optional) Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. diff --git a/website/docs/r/vpc_peering_options.html.markdown b/website/docs/r/vpc_peering_options.html.markdown index 8a27857a80a..ca5d74c6470 100644 --- a/website/docs/r/vpc_peering_options.html.markdown +++ b/website/docs/r/vpc_peering_options.html.markdown @@ -154,8 +154,10 @@ must have support for the DNS hostnames enabled. This can be done using the [`en (vpc.html#enable_dns_hostnames) attribute in the [`aws_vpc`](vpc.html) resource. See [Using DNS with Your VPC] (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.html) user guide for more information. -* `allow_remote_vpc_dns_resolution` - (Optional) Allow a local VPC to resolve public DNS hostnames to private -IP addresses when queried from instances in the peer VPC. +* `allow_remote_vpc_dns_resolution` - (Optional) Allow a local VPC to resolve public DNS hostnames to +private IP addresses when queried from instances in the peer VPC. This is +[not supported](https://docs.aws.amazon.com/vpc/latest/peering/modify-peering-connections.html) for +inter-region VPC peering. * `allow_classic_link_to_remote_vpc` - (Optional) Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. This enables an outbound communication from the local ClassicLink connection to the remote VPC. From 0fdaefe4ab85b9423db6a10e16d444167630ef81 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Tue, 16 Oct 2018 18:17:55 +0400 Subject: [PATCH 2902/3316] add validations for name --- aws/resource_aws_lb_target_group.go | 4 +- aws/validators.go | 39 +++++++++++++++++++ aws/validators_test.go | 58 +++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_lb_target_group.go b/aws/resource_aws_lb_target_group.go index 79b8daf2516..0130949d86e 100644 --- a/aws/resource_aws_lb_target_group.go +++ b/aws/resource_aws_lb_target_group.go @@ -45,14 +45,14 @@ func resourceAwsLbTargetGroup() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validation.StringLenBetween(0, 32), + ValidateFunc: validateLbTargetGroupName, }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: validation.StringLenBetween(0, 32-resource.UniqueIDSuffixLength), + ValidateFunc: validateLbTargetGroupNamePrefix, }, "port": { diff --git a/aws/validators.go b/aws/validators.go index 3d064ea0de5..538d04e8dd0 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -2040,3 +2040,42 @@ func validateCloudFrontPublicKeyNamePrefix(v interface{}, k string) (ws []string } return } + +func validateLbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 32 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 32 characters", k)) + } + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q", k)) + } + if regexp.MustCompile(`^-`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot begin with a hyphen", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + return +} + +func validateLbTargetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + prefixMaxLength := 32 - resource.UniqueIDSuffixLength + if len(value) > prefixMaxLength { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than %d characters", k, prefixMaxLength)) + } + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q", k)) + } + if regexp.MustCompile(`^-`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot begin with a hyphen", k)) + } + return +} diff --git a/aws/validators_test.go b/aws/validators_test.go index 8ea201bfdd4..a4acca2e38b 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -3014,3 +3014,61 @@ func TestValidateDxConnectionBandWidth(t *testing.T) { } } } + +func TestValidateLbTargetGroupName(t *testing.T) { + cases := []struct { + Value string + ErrCount int + }{ + { + Value: "tf.test.elb.target.1", + ErrCount: 1, + }, + { + Value: "-tf-test-target", + ErrCount: 1, + }, + { + Value: "tf-test-target-", + ErrCount: 1, + }, + { + Value: randomString(33), + ErrCount: 1, + }, + } + + for _, tc := range cases { + _, errors := validateLbTargetGroupName(tc.Value, "aws_lb_target_group") + if len(errors) != tc.ErrCount { + t.Fatalf("Expected the AWS LB Target Group Name to trigger a validation error for %q", tc.Value) + } + } +} + +func TestValidateLbTargetGroupNamePrefix(t *testing.T) { + cases := []struct { + Value string + ErrCount int + }{ + { + Value: "tf.lb", + ErrCount: 1, + }, + { + Value: "-tf-lb", + ErrCount: 1, + }, + { + Value: randomString(32), + ErrCount: 1, + }, + } + + for _, tc := range cases { + _, errors := validateLbTargetGroupNamePrefix(tc.Value, "aws_lb_target_group") + if len(errors) != tc.ErrCount { + t.Fatalf("Expected the AWS LB Target Group Name to trigger a validation error for %q", tc.Value) + } + } +} From 4e677cc9721c9d82aba4627c2b5b8059b0e6d3db Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Tue, 16 Oct 2018 11:05:52 -0500 Subject: [PATCH 2903/3316] Update the HCL to mimic the API structs. --- aws/resource_aws_codepipeline_webhook.go | 132 +++++++----------- aws/resource_aws_codepipeline_webhook_test.go | 13 +- website/docs/r/codepipeline_webhook.markdown | 29 ++-- 3 files changed, 70 insertions(+), 104 deletions(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index fcabf2fd648..13f89ee8c92 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -19,7 +19,17 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { SchemaVersion: 1, Schema: map[string]*schema.Schema{ - "auth": { + "authentication": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + codepipeline.WebhookAuthenticationTypeGithubHmac, + codepipeline.WebhookAuthenticationTypeIp, + codepipeline.WebhookAuthenticationTypeUnauthenticated, + }, false), + }, + "authentication_configuration": { Type: schema.TypeList, MaxItems: 1, MinItems: 1, @@ -27,15 +37,6 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "type": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - codepipeline.WebhookAuthenticationTypeGithubHmac, - codepipeline.WebhookAuthenticationTypeIp, - codepipeline.WebhookAuthenticationTypeUnauthenticated, - }, false), - }, "secret_token": { Type: schema.TypeString, Optional: true, @@ -50,8 +51,8 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { }, "filter": { Type: schema.TypeSet, - Required: true, ForceNew: true, + Required: true, MinItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -78,24 +79,15 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Computed: true, }, - "target": { - Type: schema.TypeList, - MaxItems: 1, - MinItems: 1, + "target_action": { + Type: schema.TypeString, + ForceNew: true, Required: true, + }, + "target_pipeline": { + Type: schema.TypeString, ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "action": { - Type: schema.TypeString, - Required: true, - }, - "pipeline": { - Type: schema.TypeString, - Required: true, - }, - }, - }, + Required: true, }, }, } @@ -131,44 +123,40 @@ func extractCodePipelineWebhookRules(filters *schema.Set) ([]*codepipeline.Webho return rules, nil } -func extractCodePipelineWebhookAuthConfig(auth map[string]interface{}) (*codepipeline.WebhookAuthConfiguration, error) { - var authConfig codepipeline.WebhookAuthConfiguration - switch auth["type"].(string) { +func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string]interface{}) (*codepipeline.WebhookAuthConfiguration, error) { + var conf codepipeline.WebhookAuthConfiguration + switch authType { case codepipeline.WebhookAuthenticationTypeIp: - ipRange := auth["allowed_ip_range"].(string) + ipRange := authConfig["allowed_ip_range"].(string) if ipRange == "" { return nil, fmt.Errorf("An IP range must be set when using IP-based auth") } - authConfig.AllowedIPRange = &ipRange + conf.AllowedIPRange = &ipRange break case codepipeline.WebhookAuthenticationTypeGithubHmac: - secretToken := auth["secret_token"].(string) + secretToken := authConfig["secret_token"].(string) if secretToken == "" { return nil, fmt.Errorf("Secret token must be set when using GITHUB_HMAC") } - authConfig.SecretToken = &secretToken + conf.SecretToken = &secretToken break case codepipeline.WebhookAuthenticationTypeUnauthenticated: break default: - return nil, fmt.Errorf("Invalid authentication type %s", auth["type"]) + return nil, fmt.Errorf("Invalid authentication type %s", authType) } - return &authConfig, nil + return &conf, nil } func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn + authType := d.Get("authentication").(string) - auth, err := extractCodePipelineWebhookAttr(d, "auth") - if err != nil { - return err - } - - target, err := extractCodePipelineWebhookAttr(d, "target") + authConfig, err := extractCodePipelineWebhookAttr(d, "authentication_configuration") if err != nil { return err } @@ -178,19 +166,19 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface return err } - authConfig, err := extractCodePipelineWebhookAuthConfig(auth) + conf, err := extractCodePipelineWebhookAuthConfig(authType, authConfig) if err != nil { return err } request := &codepipeline.PutWebhookInput{ Webhook: &codepipeline.WebhookDefinition{ - Authentication: aws.String(auth["type"].(string)), + Authentication: aws.String(authType), Filters: rules, Name: aws.String(d.Get("name").(string)), - TargetAction: aws.String(target["action"].(string)), - TargetPipeline: aws.String(target["pipeline"].(string)), - AuthenticationConfiguration: authConfig, + TargetAction: aws.String(d.Get("target_action").(string)), + TargetPipeline: aws.String(d.Get("target_pipeline").(string)), + AuthenticationConfiguration: conf, }, } @@ -254,43 +242,20 @@ func setCodePipelineWebhookFilters(webhook codepipeline.WebhookDefinition, d *sc return nil } -func setCodePipelineWebhookAuthentication(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { +func setCodePipelineWebhookAuthenticationConfiguration(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { var result []interface{} - - auth := map[string]interface{}{} - - authType := *webhook.Authentication - auth["type"] = authType - + conf := map[string]interface{}{} if webhook.AuthenticationConfiguration.AllowedIPRange != nil { ipRange := *webhook.AuthenticationConfiguration.AllowedIPRange - auth["allowed_ip_range"] = ipRange + conf["allowed_ip_range"] = ipRange } if webhook.AuthenticationConfiguration.SecretToken != nil { secretToken := *webhook.AuthenticationConfiguration.SecretToken - auth["secret_token"] = secretToken - } - - result = append(result, auth) - if err := d.Set("auth", result); err != nil { - return err - } - - return nil -} - -func setCodePipelineWebhookTarget(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { - var t []interface{} - target := map[string]interface{}{ - "action": *webhook.TargetAction, - "pipeline": *webhook.TargetPipeline, + conf["secret_token"] = secretToken } - t = append(t, target) - if err := d.Set("target", t); err != nil { - return err - } + result = append(result, conf) return nil } @@ -323,15 +288,26 @@ func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{} d.Set("name", name) - if err = setCodePipelineWebhookAuthentication(found, d); err != nil { + targetAction := *found.TargetAction + if err := d.Set("target_action", targetAction); err != nil { return err } - if err = setCodePipelineWebhookFilters(found, d); err != nil { + targetPipeline := *found.TargetPipeline + if err := d.Set("target_pipeline", targetPipeline); err != nil { return err } - if err = setCodePipelineWebhookTarget(found, d); err != nil { + authType := *found.Authentication + if err := d.Set("authentication", authType); err != nil { + return err + } + + if err = setCodePipelineWebhookAuthenticationConfiguration(found, d); err != nil { + return err + } + + if err = setCodePipelineWebhookFilters(found, d); err != nil { return err } diff --git a/aws/resource_aws_codepipeline_webhook_test.go b/aws/resource_aws_codepipeline_webhook_test.go index 230abcd506e..91dd46d8e17 100644 --- a/aws/resource_aws_codepipeline_webhook_test.go +++ b/aws/resource_aws_codepipeline_webhook_test.go @@ -176,10 +176,12 @@ resource "aws_codepipeline" "bar" { } resource "aws_codepipeline_webhook" "bar" { - name = "test-webhook-%s" + name = "test-webhook-%s" + authentication = "GITHUB_HMAC" + target_action = "Source" + target_pipeline = "${aws_codepipeline.bar.name}" - auth { - type = "GITHUB_HMAC" + authentication_configuration { secret_token = "super-secret" } @@ -187,11 +189,6 @@ resource "aws_codepipeline_webhook" "bar" { json_path = "$.ref" match_equals = "refs/head/{Branch}" } - - target { - action = "Source" - pipeline = "${aws_codepipeline.bar.name}" - } } `, rName, rName, rName, rName) } diff --git a/website/docs/r/codepipeline_webhook.markdown b/website/docs/r/codepipeline_webhook.markdown index 9af0bd52ad0..a1a86534fc2 100644 --- a/website/docs/r/codepipeline_webhook.markdown +++ b/website/docs/r/codepipeline_webhook.markdown @@ -72,10 +72,12 @@ locals { } resource "aws_codepipeline_webhook" "bar" { - name = "test-webhook-github-bar" + name = "test-webhook-github-bar" + authentication = "GITHUB_HMAC" + target_action = "Source" + target_pipeline = "${aws_codepipeline.bar.name}" - auth { - type = "GITHUB_HMAC" + authentication_configuration { secret_token = "${local.webhook_secret}" } @@ -83,11 +85,6 @@ resource "aws_codepipeline_webhook" "bar" { json_path = "$.ref" match_equals = "refs/heads/{Branch}" } - - target { - action = "Source" - pipeline = "${aws_codepipeline.bar.name}" - } } # Wire the CodePipeline webhook into a GitHub repository. @@ -111,13 +108,14 @@ resource "github_repository_webhook" "bar" { The following arguments are supported: * `name` - (Required) The name of the webhook. -* `auth` - (Required) An `auth` block. Auth blocks are documented below. +* `authentication` - (Required) The type of authentication to use. One of `IP`, `GITHUB_HMAC`, or `UNAUTHENTICATED`. +* `authentication_configuration` - (Required) An `auth` block. Auth blocks are documented below. * `filter` (Required) One or more `filter` blocks. Filter blocks are documented below. -* `target` (Required) A `target` block. Target blocks are documented below. +* `target_action` - (Required) The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline. +* `target_pipeline` - (Required) The name of the pipeline. -An `auth` block supports the following arguments: +An `authentication_configuration` block supports the following arguments: -* `type` - (Required) The type of the filter. One of `IP`, `GITHUB_HMAC`, or `UNAUTHENTICATED`. * `secret_token` - (Optional) The shared secret for the GitHub repository webhook. Set this as `secret` in your `github_repository_webhook`'s `configuration` block. Required for `GITHUB_HMAC`. * `allowed_ip_range` - (Optional) A valid CIDR block for `IP` filtering. Required for `IP`. @@ -126,14 +124,9 @@ A `filter` block supports the following arguments: * `json_path` - (Required) The [JSON path](https://github.com/json-path/JsonPath) to filter on. * `match_equals` - (Required) The value to match on (e.g. `refs/heads/{Branch}`). See [AWS docs](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_WebhookFilterRule.html) for details. -A `target` block supports the following arguments: - -* `action` - (Required) The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline. -* `pipeline` - (Required) The name of the pipeline. - ## Attributes Reference In addition to all arguments above, the following attributes are exported: * `id` - The CodePipeline webhook's ARN. -* `url` - The CodePipeline webhook's URL. Send events to this endpoint to trigger the target. +* `url` - The CodePipeline webhook's URL. POST events to this endpoint to trigger the target. From d837c232278a7c071b7d38279ec74ac4fee6b38f Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Tue, 16 Oct 2018 12:06:26 -0500 Subject: [PATCH 2904/3316] Fix linting issue and make the test slightly more robust. --- aws/resource_aws_codepipeline_webhook.go | 5 ++++- aws/resource_aws_codepipeline_webhook_test.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 13f89ee8c92..f3af1b44389 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -243,7 +243,6 @@ func setCodePipelineWebhookFilters(webhook codepipeline.WebhookDefinition, d *sc } func setCodePipelineWebhookAuthenticationConfiguration(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { - var result []interface{} conf := map[string]interface{}{} if webhook.AuthenticationConfiguration.AllowedIPRange != nil { ipRange := *webhook.AuthenticationConfiguration.AllowedIPRange @@ -255,7 +254,11 @@ func setCodePipelineWebhookAuthenticationConfiguration(webhook codepipeline.Webh conf["secret_token"] = secretToken } + var result []interface{} result = append(result, conf) + if err := d.Set("authentication_configuration", result); err != nil { + return err + } return nil } diff --git a/aws/resource_aws_codepipeline_webhook_test.go b/aws/resource_aws_codepipeline_webhook_test.go index 91dd46d8e17..8972e6594fd 100644 --- a/aws/resource_aws_codepipeline_webhook_test.go +++ b/aws/resource_aws_codepipeline_webhook_test.go @@ -29,6 +29,7 @@ func TestAccAWSCodePipelineWebhook_basic(t *testing.T) { testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "url"), + resource.TestCheckResourceAttr("aws_codepipeline_webhook.bar", "authentication_configuration.0.secret_token", "super-secret"), ), }, }, From 16424ce60b9edfc44454823d3b0a6f763a007379 Mon Sep 17 00:00:00 2001 From: Jan Alfred Richter Date: Wed, 17 Oct 2018 08:26:24 +1300 Subject: [PATCH 2905/3316] backup_retention_period allowed range --- website/docs/r/db_instance.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/db_instance.html.markdown b/website/docs/r/db_instance.html.markdown index acae8e1d7c3..ce6b244b40b 100644 --- a/website/docs/r/db_instance.html.markdown +++ b/website/docs/r/db_instance.html.markdown @@ -72,7 +72,7 @@ will be applied automatically to the DB instance during the maintenance window. Defaults to true. * `availability_zone` - (Optional) The AZ for the RDS instance. * `backup_retention_period` - (Optional) The days to retain backups for. Must be -`1` or greater to be a source for a [Read Replica][1]. +between `0` and `35`. When creating a Read Replica the value must be greater than `0`. [See Read Replica][1]. * `backup_window` - (Optional) The daily time range (in UTC) during which automated backups are created if they are enabled. Example: "09:46-10:16". Must not overlap with `maintenance_window`. From 735daeec3dbf4e1771f92a2d232365dab57fbdf2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 16 Oct 2018 16:06:57 -0400 Subject: [PATCH 2906/3316] tests: Switch majority of acceptance testing from resource.Test() to resource.ParallelTest() Skipping over: * Explicitly serialized testing * Acceptance test functions that have multiple resource.Test() calls (would cause a panic to call t.Parallel() multiple times) Defaults Make target to 20 parallelism to match TeamCity configuration. --- .github/CONTRIBUTING.md | 6 +- GNUmakefile | 2 +- aws/core_acceptance_test.go | 2 +- aws/data_source_aws_acm_certificate_test.go | 6 +- ...e_aws_acmpca_certificate_authority_test.go | 2 +- aws/data_source_aws_ami_ids_test.go | 6 +- aws/data_source_aws_ami_test.go | 12 +- ...ta_source_aws_api_gateway_resource_test.go | 2 +- ...ta_source_aws_api_gateway_rest_api_test.go | 2 +- aws/data_source_aws_arn_test.go | 2 +- ...data_source_aws_autoscaling_groups_test.go | 2 +- aws/data_source_aws_availability_zone_test.go | 2 +- ...data_source_aws_availability_zones_test.go | 4 +- ...urce_aws_batch_compute_environment_test.go | 2 +- aws/data_source_aws_batch_job_queue_test.go | 2 +- ...source_aws_billing_service_account_test.go | 2 +- aws/data_source_aws_caller_identity_test.go | 4 +- aws/data_source_aws_canonical_user_id_test.go | 2 +- ...a_source_aws_cloudformation_export_test.go | 2 +- ...ta_source_aws_cloudformation_stack_test.go | 4 +- ...rce_aws_cloudtrail_service_account_test.go | 2 +- ...ta_source_aws_cloudwatch_log_group_test.go | 2 +- ...a_source_aws_codecommit_repository_test.go | 2 +- ...data_source_aws_cognito_user_pools_test.go | 2 +- ...ata_source_aws_db_cluster_snapshot_test.go | 6 +- ...ata_source_aws_db_event_categories_test.go | 4 +- aws/data_source_aws_db_instance_test.go | 4 +- aws/data_source_aws_db_snapshot_test.go | 2 +- aws/data_source_aws_dx_gateway_test.go | 2 +- aws/data_source_aws_dynamodb_table_test.go | 2 +- aws/data_source_aws_ebs_snapshot_ids_test.go | 6 +- aws/data_source_aws_ebs_snapshot_test.go | 4 +- aws/data_source_aws_ebs_volume_test.go | 4 +- aws/data_source_aws_ecr_repository_test.go | 2 +- aws/data_source_aws_ecs_cluster_test.go | 2 +- ...ource_aws_ecs_container_definition_test.go | 2 +- aws/data_source_aws_ecs_service_test.go | 2 +- ...ata_source_aws_ecs_task_definition_test.go | 2 +- aws/data_source_aws_efs_file_system_test.go | 2 +- aws/data_source_aws_efs_mount_target_test.go | 2 +- aws/data_source_aws_eip_test.go | 2 +- aws/data_source_aws_eks_cluster_test.go | 2 +- ..._aws_elastic_beanstalk_hosted_zone_test.go | 2 +- ...s_elastic_beanstalk_solution_stack_test.go | 2 +- ...ata_source_aws_elasticache_cluster_test.go | 2 +- ..._aws_elasticache_replication_group_test.go | 4 +- ...data_source_aws_elb_hosted_zone_id_test.go | 2 +- ...ata_source_aws_elb_service_account_test.go | 2 +- aws/data_source_aws_elb_test.go | 2 +- aws/data_source_aws_glue_script_test.go | 4 +- aws/data_source_aws_iam_group_test.go | 2 +- ...ta_source_aws_iam_instance_profile_test.go | 2 +- ...ata_source_aws_iam_policy_document_test.go | 12 +- aws/data_source_aws_iam_policy_test.go | 2 +- aws/data_source_aws_iam_role_test.go | 2 +- ..._source_aws_iam_server_certificate_test.go | 6 +- aws/data_source_aws_iam_user_test.go | 2 +- ...ource_aws_inspector_rules_packages_test.go | 2 +- aws/data_source_aws_instance_test.go | 30 ++--- aws/data_source_aws_instances_test.go | 6 +- aws/data_source_aws_internet_gateway_test.go | 2 +- aws/data_source_aws_iot_endpoint_test.go | 2 +- aws/data_source_aws_ip_ranges_test.go | 2 +- aws/data_source_aws_kinesis_stream_test.go | 2 +- aws/data_source_aws_kms_alias_test.go | 4 +- aws/data_source_aws_kms_ciphertext_test.go | 6 +- aws/data_source_aws_kms_key_test.go | 2 +- aws/data_source_aws_lambda_function_test.go | 10 +- aws/data_source_aws_lambda_invocation_test.go | 6 +- ...ta_source_aws_launch_configuration_test.go | 4 +- aws/data_source_aws_launch_template_test.go | 2 +- aws/data_source_aws_lb_listener_test.go | 6 +- aws/data_source_aws_lb_target_group_test.go | 4 +- aws/data_source_aws_lb_test.go | 4 +- aws/data_source_aws_mq_broker_test.go | 2 +- aws/data_source_aws_nat_gateway_test.go | 2 +- aws/data_source_aws_network_acls_test.go | 8 +- aws/data_source_aws_network_interface_test.go | 4 +- ...data_source_aws_network_interfaces_test.go | 4 +- aws/data_source_aws_partition_test.go | 2 +- aws/data_source_aws_prefix_list_test.go | 2 +- aws/data_source_aws_pricing_product_test.go | 4 +- aws/data_source_aws_rds_cluster_test.go | 2 +- aws/data_source_aws_redshift_cluster_test.go | 6 +- ...ource_aws_redshift_service_account_test.go | 2 +- aws/data_source_aws_region_test.go | 8 +- aws/data_source_aws_route53_zone_test.go | 2 +- aws/data_source_aws_route_table_test.go | 4 +- aws/data_source_aws_route_tables_test.go | 2 +- aws/data_source_aws_route_test.go | 2 +- aws/data_source_aws_s3_bucket_object_test.go | 8 +- aws/data_source_aws_s3_bucket_test.go | 4 +- ...a_source_aws_secretsmanager_secret_test.go | 8 +- ..._aws_secretsmanager_secret_version_test.go | 6 +- aws/data_source_aws_security_group_test.go | 2 +- aws/data_source_aws_security_groups_test.go | 4 +- aws/data_source_aws_sns_test.go | 2 +- aws/data_source_aws_sqs_queue_test.go | 2 +- aws/data_source_aws_ssm_parameter_test.go | 4 +- ...urce_aws_storagegateway_local_disk_test.go | 4 +- aws/data_source_aws_subnet_ids_test.go | 4 +- aws/data_source_aws_subnet_test.go | 6 +- aws/data_source_aws_vpc_dhcp_options_test.go | 4 +- ...ta_source_aws_vpc_endpoint_service_test.go | 6 +- aws/data_source_aws_vpc_endpoint_test.go | 8 +- ..._source_aws_vpc_peering_connection_test.go | 2 +- aws/data_source_aws_vpc_test.go | 6 +- aws/data_source_aws_vpcs_test.go | 6 +- aws/data_source_aws_vpn_gateway_test.go | 4 +- aws/data_source_aws_workspaces_bundle_test.go | 2 +- aws/import_aws_route_table_test.go | 4 +- aws/resource_aws_acm_certificate_test.go | 18 +-- ...rce_aws_acm_certificate_validation_test.go | 16 +-- ...e_aws_acmpca_certificate_authority_test.go | 12 +- aws/resource_aws_alb_target_group_test.go | 22 ++-- aws/resource_aws_ami_copy_test.go | 4 +- aws/resource_aws_ami_from_instance_test.go | 2 +- ...resource_aws_ami_launch_permission_test.go | 22 ++-- aws/resource_aws_ami_test.go | 4 +- aws/resource_aws_api_gateway_account_test.go | 4 +- aws/resource_aws_api_gateway_api_key_test.go | 4 +- ...esource_aws_api_gateway_authorizer_test.go | 8 +- ..._aws_api_gateway_base_path_mapping_test.go | 4 +- ...aws_api_gateway_client_certificate_test.go | 4 +- ...esource_aws_api_gateway_deployment_test.go | 4 +- ...aws_api_gateway_documentation_part_test.go | 8 +- ..._api_gateway_documentation_version_test.go | 8 +- ...source_aws_api_gateway_domain_name_test.go | 8 +- ...e_aws_api_gateway_gateway_response_test.go | 2 +- ...s_api_gateway_integration_response_test.go | 2 +- ...source_aws_api_gateway_integration_test.go | 8 +- ...ce_aws_api_gateway_method_response_test.go | 2 +- ...ce_aws_api_gateway_method_settings_test.go | 2 +- aws/resource_aws_api_gateway_method_test.go | 8 +- aws/resource_aws_api_gateway_model_test.go | 2 +- ..._aws_api_gateway_request_validator_test.go | 2 +- aws/resource_aws_api_gateway_resource_test.go | 4 +- aws/resource_aws_api_gateway_rest_api_test.go | 12 +- aws/resource_aws_api_gateway_stage_test.go | 4 +- ...rce_aws_api_gateway_usage_plan_key_test.go | 2 +- ...esource_aws_api_gateway_usage_plan_test.go | 16 +-- aws/resource_aws_api_gateway_vpc_link_test.go | 4 +- ...e_aws_app_cookie_stickiness_policy_test.go | 6 +- ...resource_aws_appautoscaling_policy_test.go | 14 +-- ...ws_appautoscaling_scheduled_action_test.go | 8 +- ...resource_aws_appautoscaling_target_test.go | 10 +- aws/resource_aws_appsync_api_key_test.go | 6 +- aws/resource_aws_appsync_datasource_test.go | 10 +- aws/resource_aws_appsync_graphql_api_test.go | 8 +- aws/resource_aws_athena_database_test.go | 12 +- aws/resource_aws_athena_named_query_test.go | 4 +- ...esource_aws_autoscaling_attachment_test.go | 4 +- aws/resource_aws_autoscaling_group_test.go | 42 +++---- ...rce_aws_autoscaling_lifecycle_hook_test.go | 4 +- ...ource_aws_autoscaling_notification_test.go | 6 +- aws/resource_aws_autoscaling_policy_test.go | 14 +-- aws/resource_aws_autoscaling_schedule_test.go | 10 +- ...urce_aws_batch_compute_environment_test.go | 22 ++-- aws/resource_aws_batch_job_definition_test.go | 4 +- aws/resource_aws_batch_job_queue_test.go | 6 +- aws/resource_aws_budgets_budget_test.go | 4 +- ...esource_aws_cloud9_environment_ec2_test.go | 6 +- aws/resource_aws_cloudformation_stack_test.go | 18 +-- ...source_aws_cloudfront_distribution_test.go | 24 ++-- ..._cloudfront_origin_access_identity_test.go | 6 +- ...resource_aws_cloudfront_public_key_test.go | 6 +- aws/resource_aws_cloudwatch_dashboard_test.go | 6 +- ...ce_aws_cloudwatch_event_permission_test.go | 8 +- ...resource_aws_cloudwatch_event_rule_test.go | 10 +- ...source_aws_cloudwatch_event_target_test.go | 18 +-- ..._cloudwatch_log_destination_policy_test.go | 4 +- ...rce_aws_cloudwatch_log_destination_test.go | 4 +- aws/resource_aws_cloudwatch_log_group_test.go | 20 +-- ...e_aws_cloudwatch_log_metric_filter_test.go | 2 +- ...aws_cloudwatch_log_resource_policy_test.go | 4 +- ...resource_aws_cloudwatch_log_stream_test.go | 4 +- ...cloudwatch_log_subscription_filter_test.go | 4 +- ...source_aws_cloudwatch_metric_alarm_test.go | 14 +-- aws/resource_aws_codebuild_project_test.go | 52 ++++---- aws/resource_aws_codebuild_webhook_test.go | 6 +- ...resource_aws_codecommit_repository_test.go | 10 +- aws/resource_aws_codecommit_trigger_test.go | 2 +- aws/resource_aws_codedeploy_app_test.go | 6 +- ...e_aws_codedeploy_deployment_config_test.go | 6 +- ...ce_aws_codedeploy_deployment_group_test.go | 62 +++++----- aws/resource_aws_codepipeline_test.go | 8 +- ...ito_identity_pool_roles_attachment_test.go | 10 +- ...resource_aws_cognito_identity_pool_test.go | 12 +- ...urce_aws_cognito_identity_provider_test.go | 2 +- ...source_aws_cognito_resource_server_test.go | 4 +- aws/resource_aws_cognito_user_group_test.go | 8 +- ...ource_aws_cognito_user_pool_client_test.go | 10 +- ...ource_aws_cognito_user_pool_domain_test.go | 4 +- aws/resource_aws_cognito_user_pool_test.go | 32 ++--- ...aws_config_aggregate_authorization_test.go | 2 +- ...ws_config_configuration_aggregator_test.go | 6 +- aws/resource_aws_customer_gateway_test.go | 8 +- aws/resource_aws_dax_cluster_test.go | 10 +- aws/resource_aws_dax_parameter_group_test.go | 4 +- aws/resource_aws_dax_subnet_group_test.go | 2 +- aws/resource_aws_db_cluster_snapshot_test.go | 2 +- ...resource_aws_db_event_subscription_test.go | 10 +- aws/resource_aws_db_instance_test.go | 114 ++++++++--------- aws/resource_aws_db_option_group_test.go | 24 ++-- aws/resource_aws_db_parameter_group_test.go | 18 +-- aws/resource_aws_db_security_group_test.go | 4 +- aws/resource_aws_db_snapshot_test.go | 2 +- aws/resource_aws_db_subnet_group_test.go | 12 +- aws/resource_aws_default_network_acl_test.go | 12 +- aws/resource_aws_default_route_table_test.go | 6 +- ...esource_aws_default_security_group_test.go | 4 +- aws/resource_aws_default_subnet_test.go | 4 +- ...ource_aws_default_vpc_dhcp_options_test.go | 2 +- aws/resource_aws_default_vpc_test.go | 2 +- aws/resource_aws_devicefarm_project_test.go | 2 +- ...tory_service_conditional_forwarder_test.go | 2 +- ...ce_aws_directory_service_directory_test.go | 14 +-- aws/resource_aws_dms_certificate_test.go | 2 +- aws/resource_aws_dms_endpoint_test.go | 8 +- ...ource_aws_dms_replication_instance_test.go | 26 ++-- ...e_aws_dms_replication_subnet_group_test.go | 2 +- aws/resource_aws_dms_replication_task_test.go | 2 +- aws/resource_aws_dx_bgp_peer_test.go | 2 +- ...urce_aws_dx_connection_association_test.go | 4 +- aws/resource_aws_dx_connection_test.go | 6 +- ...esource_aws_dx_gateway_association_test.go | 4 +- aws/resource_aws_dx_gateway_test.go | 6 +- ...x_hosted_private_virtual_interface_test.go | 2 +- ...dx_hosted_public_virtual_interface_test.go | 2 +- aws/resource_aws_dx_lag_test.go | 6 +- ...e_aws_dx_private_virtual_interface_test.go | 4 +- ...ce_aws_dx_public_virtual_interface_test.go | 2 +- ...resource_aws_dynamodb_global_table_test.go | 6 +- aws/resource_aws_dynamodb_table_item_test.go | 10 +- aws/resource_aws_dynamodb_table_test.go | 32 ++--- aws/resource_aws_ebs_snapshot_copy_test.go | 8 +- aws/resource_aws_ebs_snapshot_test.go | 6 +- aws/resource_aws_ebs_volume_test.go | 18 +-- aws/resource_aws_ec2_fleet_test.go | 52 ++++---- aws/resource_aws_ecr_lifecycle_policy_test.go | 4 +- ...resource_aws_ecr_repository_policy_test.go | 4 +- aws/resource_aws_ecr_repository_test.go | 2 +- aws/resource_aws_ecs_cluster_test.go | 4 +- aws/resource_aws_ecs_service_test.go | 40 +++--- aws/resource_aws_ecs_task_definition_test.go | 28 ++--- aws/resource_aws_efs_file_system_test.go | 14 +-- aws/resource_aws_efs_mount_target_test.go | 6 +- ...e_aws_egress_only_internet_gateway_test.go | 2 +- aws/resource_aws_eip_association_test.go | 12 +- aws/resource_aws_eip_test.go | 22 ++-- aws/resource_aws_eks_cluster_test.go | 6 +- ..._aws_elastic_beanstalk_application_test.go | 6 +- ...stic_beanstalk_application_version_test.go | 4 +- ...c_beanstalk_configuration_template_test.go | 6 +- ..._aws_elastic_beanstalk_environment_test.go | 28 ++--- ...ce_aws_elastic_transcoder_pipeline_test.go | 10 +- ...urce_aws_elastic_transcoder_preset_test.go | 2 +- aws/resource_aws_elasticache_cluster_test.go | 44 +++---- ...ce_aws_elasticache_parameter_group_test.go | 10 +- ..._aws_elasticache_replication_group_test.go | 38 +++--- ...rce_aws_elasticache_security_group_test.go | 4 +- ...ource_aws_elasticache_subnet_group_test.go | 6 +- ...ce_aws_elasticsearch_domain_policy_test.go | 2 +- aws/resource_aws_elasticsearch_domain_test.go | 38 +++--- aws/resource_aws_elb_attachment_test.go | 4 +- aws/resource_aws_elb_test.go | 44 +++---- aws/resource_aws_emr_cluster_test.go | 34 ++--- aws/resource_aws_emr_instance_group_test.go | 6 +- ...rce_aws_emr_security_configuration_test.go | 4 +- aws/resource_aws_flow_log_test.go | 6 +- aws/resource_aws_gamelift_alias_test.go | 6 +- aws/resource_aws_gamelift_build_test.go | 2 +- aws/resource_aws_gamelift_fleet_test.go | 4 +- aws/resource_aws_glacier_vault_test.go | 8 +- ...resource_aws_glue_catalog_database_test.go | 6 +- aws/resource_aws_glue_catalog_table_test.go | 10 +- aws/resource_aws_glue_classifier_test.go | 10 +- aws/resource_aws_glue_connection_test.go | 8 +- aws/resource_aws_glue_crawler_test.go | 28 ++--- aws/resource_aws_glue_job_test.go | 16 +-- aws/resource_aws_glue_trigger_test.go | 10 +- aws/resource_aws_iam_access_key_test.go | 4 +- ...ce_aws_iam_account_password_policy_test.go | 4 +- aws/resource_aws_iam_group_membership_test.go | 4 +- ...ce_aws_iam_group_policy_attachment_test.go | 2 +- aws/resource_aws_iam_group_policy_test.go | 6 +- aws/resource_aws_iam_group_test.go | 4 +- aws/resource_aws_iam_instance_profile_test.go | 10 +- ...ce_aws_iam_openid_connect_provider_test.go | 6 +- ...resource_aws_iam_policy_attachment_test.go | 4 +- aws/resource_aws_iam_policy_test.go | 10 +- ...rce_aws_iam_role_policy_attachment_test.go | 2 +- aws/resource_aws_iam_role_policy_test.go | 10 +- aws/resource_aws_iam_role_test.go | 20 +-- aws/resource_aws_iam_saml_provider_test.go | 2 +- ...esource_aws_iam_server_certificate_test.go | 10 +- ...source_aws_iam_service_linked_role_test.go | 6 +- ...urce_aws_iam_user_group_membership_test.go | 2 +- ...esource_aws_iam_user_login_profile_test.go | 10 +- ...rce_aws_iam_user_policy_attachment_test.go | 2 +- aws/resource_aws_iam_user_policy_test.go | 10 +- aws/resource_aws_iam_user_ssh_key_test.go | 4 +- aws/resource_aws_iam_user_test.go | 12 +- ...ce_aws_inspector_assessment_target_test.go | 2 +- ..._aws_inspector_assessment_template_test.go | 2 +- ...ource_aws_inspector_resource_group_test.go | 2 +- aws/resource_aws_instance_test.go | 116 +++++++++--------- aws/resource_aws_internet_gateway_test.go | 8 +- aws/resource_aws_iot_certificate_test.go | 2 +- aws/resource_aws_iot_policy_test.go | 4 +- aws/resource_aws_iot_thing_test.go | 6 +- aws/resource_aws_iot_thing_type_test.go | 6 +- aws/resource_aws_iot_topic_rule_test.go | 26 ++-- aws/resource_aws_key_pair_test.go | 6 +- ...s_kinesis_firehose_delivery_stream_test.go | 42 +++---- aws/resource_aws_kinesis_stream_test.go | 18 +-- aws/resource_aws_kms_alias_test.go | 12 +- aws/resource_aws_kms_grant_test.go | 20 +-- aws/resource_aws_kms_key_test.go | 12 +- aws/resource_aws_lambda_alias_test.go | 6 +- ...ce_aws_lambda_event_source_mapping_test.go | 16 +-- aws/resource_aws_lambda_function_test.go | 64 +++++----- aws/resource_aws_lambda_permission_test.go | 16 +-- aws/resource_aws_launch_configuration_test.go | 22 ++-- aws/resource_aws_launch_template_test.go | 34 ++--- ...ce_aws_lb_cookie_stickiness_policy_test.go | 6 +- ...source_aws_lb_listener_certificate_test.go | 4 +- aws/resource_aws_lb_listener_rule_test.go | 22 ++-- aws/resource_aws_lb_listener_test.go | 16 +-- ...urce_aws_lb_ssl_negotiation_policy_test.go | 4 +- ...rce_aws_lb_target_group_attachment_test.go | 8 +- aws/resource_aws_lb_target_group_test.go | 36 +++--- aws/resource_aws_lb_test.go | 34 ++--- aws/resource_aws_lightsail_domain_test.go | 4 +- aws/resource_aws_lightsail_instance_test.go | 6 +- aws/resource_aws_lightsail_key_pair_test.go | 8 +- ...aws_lightsail_static_ip_attachment_test.go | 4 +- aws/resource_aws_lightsail_static_ip_test.go | 4 +- ...oad_balancer_backend_server_policy_test.go | 2 +- ..._aws_load_balancer_listener_policy_test.go | 2 +- aws/resource_aws_load_balancer_policy_test.go | 6 +- ...s_macie_member_account_association_test.go | 4 +- ...ce_aws_macie_s3_bucket_association_test.go | 4 +- ...e_aws_main_route_table_association_test.go | 2 +- ...e_aws_media_store_container_policy_test.go | 4 +- ...resource_aws_media_store_container_test.go | 4 +- aws/resource_aws_mq_broker_test.go | 8 +- aws/resource_aws_mq_configuration_test.go | 4 +- aws/resource_aws_nat_gateway_test.go | 6 +- ...ource_aws_neptune_cluster_instance_test.go | 12 +- ...ws_neptune_cluster_parameter_group_test.go | 12 +- ...ource_aws_neptune_cluster_snapshot_test.go | 2 +- aws/resource_aws_neptune_cluster_test.go | 18 +-- ...rce_aws_neptune_event_subscription_test.go | 8 +- ...source_aws_neptune_parameter_group_test.go | 8 +- aws/resource_aws_neptune_subnet_group_test.go | 8 +- aws/resource_aws_network_acl_rule_test.go | 10 +- aws/resource_aws_network_acl_test.go | 24 ++-- ...e_aws_network_interface_attachment_test.go | 2 +- ...ws_network_interface_sg_attachment_test.go | 10 +- aws/resource_aws_network_interface_test.go | 16 +-- aws/resource_aws_opsworks_application_test.go | 2 +- ...resource_aws_opsworks_custom_layer_test.go | 4 +- aws/resource_aws_opsworks_instance_test.go | 6 +- aws/resource_aws_opsworks_permission_test.go | 2 +- ...ource_aws_opsworks_rails_app_layer_test.go | 2 +- ...ource_aws_opsworks_rds_db_instance_test.go | 2 +- aws/resource_aws_opsworks_stack_test.go | 12 +- ...resource_aws_opsworks_user_profile_test.go | 2 +- aws/resource_aws_pinpoint_adm_channel_test.go | 2 +- aws/resource_aws_pinpoint_app_test.go | 8 +- ...esource_aws_pinpoint_baidu_channel_test.go | 2 +- ...esource_aws_pinpoint_email_channel_test.go | 2 +- ...resource_aws_pinpoint_event_stream_test.go | 2 +- aws/resource_aws_pinpoint_gcm_channel_test.go | 2 +- aws/resource_aws_pinpoint_sms_channel_test.go | 4 +- aws/resource_aws_placement_group_test.go | 2 +- ...resource_aws_proxy_protocol_policy_test.go | 2 +- aws/resource_aws_rds_cluster_instance_test.go | 20 +-- ...ce_aws_rds_cluster_parameter_group_test.go | 12 +- aws/resource_aws_rds_cluster_test.go | 64 +++++----- aws/resource_aws_redshift_cluster_test.go | 30 ++--- ...ce_aws_redshift_event_subscription_test.go | 8 +- ...ource_aws_redshift_parameter_group_test.go | 6 +- ...source_aws_redshift_security_group_test.go | 10 +- ...e_aws_redshift_snapshot_copy_grant_test.go | 2 +- ...resource_aws_redshift_subnet_group_test.go | 10 +- ...esource_aws_route53_delegation_set_test.go | 6 +- aws/resource_aws_route53_health_check_test.go | 16 +-- aws/resource_aws_route53_query_log_test.go | 4 +- aws/resource_aws_route53_record_test.go | 48 ++++---- ...ource_aws_route53_zone_association_test.go | 4 +- aws/resource_aws_route53_zone_test.go | 12 +- ...source_aws_route_table_association_test.go | 2 +- aws/resource_aws_route_table_test.go | 14 +-- aws/resource_aws_route_test.go | 20 +-- aws/resource_aws_s3_bucket_inventory_test.go | 6 +- aws/resource_aws_s3_bucket_metric_test.go | 12 +- ...esource_aws_s3_bucket_notification_test.go | 4 +- aws/resource_aws_s3_bucket_object_test.go | 22 ++-- aws/resource_aws_s3_bucket_policy_test.go | 4 +- aws/resource_aws_s3_bucket_test.go | 58 ++++----- ...resource_aws_secretsmanager_secret_test.go | 16 +-- ..._aws_secretsmanager_secret_version_test.go | 6 +- aws/resource_aws_security_group_rule_test.go | 40 +++--- aws/resource_aws_security_group_test.go | 78 ++++++------ ...ce_discovery_private_dns_namespace_test.go | 4 +- ...ice_discovery_public_dns_namespace_test.go | 4 +- ...urce_aws_service_discovery_service_test.go | 6 +- ...ource_aws_servicecatalog_portfolio_test.go | 6 +- ...ce_aws_ses_active_receipt_rule_set_test.go | 2 +- ...resource_aws_ses_configuration_set_test.go | 2 +- aws/resource_aws_ses_domain_dkim_test.go | 2 +- aws/resource_aws_ses_domain_identity_test.go | 4 +- ...s_ses_domain_identity_verification_test.go | 6 +- aws/resource_aws_ses_domain_mail_from_test.go | 4 +- ...resource_aws_ses_event_destination_test.go | 2 +- ...ws_ses_identity_notification_topic_test.go | 2 +- aws/resource_aws_ses_receipt_filter_test.go | 2 +- aws/resource_aws_ses_receipt_rule_set_test.go | 2 +- aws/resource_aws_ses_receipt_rule_test.go | 8 +- aws/resource_aws_ses_template_test.go | 6 +- aws/resource_aws_sfn_activity_test.go | 4 +- aws/resource_aws_sfn_state_machine_test.go | 2 +- aws/resource_aws_simpledb_domain_test.go | 4 +- ..._snapshot_create_volume_permission_test.go | 2 +- ...ource_aws_sns_platform_application_test.go | 8 +- aws/resource_aws_sns_topic_policy_test.go | 2 +- ...esource_aws_sns_topic_subscription_test.go | 12 +- aws/resource_aws_sns_topic_test.go | 18 +-- aws/resource_aws_spot_fleet_request_test.go | 40 +++--- ...resource_aws_spot_instance_request_test.go | 22 ++-- aws/resource_aws_sqs_queue_policy_test.go | 4 +- aws/resource_aws_sqs_queue_test.go | 32 ++--- aws/resource_aws_ssm_activation_test.go | 4 +- aws/resource_aws_ssm_association_test.go | 16 +-- aws/resource_aws_ssm_document_test.go | 20 +-- ..._aws_ssm_maintenance_window_target_test.go | 4 +- ...ce_aws_ssm_maintenance_window_task_test.go | 4 +- ...esource_aws_ssm_maintenance_window_test.go | 4 +- aws/resource_aws_ssm_parameter_test.go | 20 +-- aws/resource_aws_ssm_patch_baseline_test.go | 6 +- aws/resource_aws_ssm_patch_group_test.go | 2 +- ...esource_aws_ssm_resource_data_sync_test.go | 4 +- aws/resource_aws_storagegateway_cache_test.go | 4 +- ...storagegateway_cached_iscsi_volume_test.go | 6 +- ...esource_aws_storagegateway_gateway_test.go | 16 +-- ..._aws_storagegateway_nfs_file_share_test.go | 22 ++-- ..._aws_storagegateway_smb_file_share_test.go | 22 ++-- ...e_aws_storagegateway_upload_buffer_test.go | 2 +- ...aws_storagegateway_working_storage_test.go | 2 +- aws/resource_aws_subnet_test.go | 8 +- aws/resource_aws_swf_domain_test.go | 8 +- aws/resource_aws_volume_attachment_test.go | 8 +- ...e_aws_vpc_dhcp_options_association_test.go | 2 +- aws/resource_aws_vpc_dhcp_options_test.go | 6 +- ...c_endpoint_connection_notification_test.go | 4 +- ...c_endpoint_route_table_association_test.go | 2 +- ...endpoint_service_allowed_principal_test.go | 2 +- aws/resource_aws_vpc_endpoint_service_test.go | 6 +- ...ws_vpc_endpoint_subnet_association_test.go | 4 +- aws/resource_aws_vpc_endpoint_test.go | 14 +-- ...ws_vpc_ipv4_cidr_block_association_test.go | 2 +- ...ws_vpc_peering_connection_accepter_test.go | 4 +- ...aws_vpc_peering_connection_options_test.go | 4 +- ...esource_aws_vpc_peering_connection_test.go | 16 +-- aws/resource_aws_vpc_test.go | 22 ++-- aws/resource_aws_vpn_connection_route_test.go | 2 +- aws/resource_aws_vpn_connection_test.go | 10 +- ...esource_aws_vpn_gateway_attachment_test.go | 4 +- ..._aws_vpn_gateway_route_propagation_test.go | 2 +- aws/resource_aws_vpn_gateway_test.go | 16 +-- aws/resource_aws_waf_byte_match_set_test.go | 10 +- aws/resource_aws_waf_geo_match_set_test.go | 10 +- aws/resource_aws_waf_ipset_test.go | 12 +- aws/resource_aws_waf_rate_based_rule_test.go | 10 +- aws/resource_aws_waf_rule_group_test.go | 10 +- aws/resource_aws_waf_rule_test.go | 12 +- ...source_aws_waf_size_constraint_set_test.go | 10 +- ...ce_aws_waf_sql_injection_match_set_test.go | 10 +- aws/resource_aws_waf_web_acl_test.go | 10 +- aws/resource_aws_waf_xss_match_set_test.go | 10 +- ...rce_aws_wafregional_byte_match_set_test.go | 10 +- ...urce_aws_wafregional_geo_match_set_test.go | 10 +- aws/resource_aws_wafregional_ipset_test.go | 12 +- ...ce_aws_wafregional_rate_based_rule_test.go | 12 +- ...esource_aws_wafregional_rule_group_test.go | 10 +- aws/resource_aws_wafregional_rule_test.go | 10 +- ...ws_wafregional_size_constraint_set_test.go | 10 +- ...afregional_sql_injection_match_set_test.go | 10 +- ...ws_wafregional_web_acl_association_test.go | 4 +- aws/resource_aws_wafregional_web_acl_test.go | 16 +-- ...urce_aws_wafregional_xss_match_set_test.go | 10 +- 493 files changed, 2249 insertions(+), 2249 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 9a116626f86..087406b56f3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -396,7 +396,7 @@ ok github.com/terraform-providers/terraform-provider-aws/aws 55.619s Terraform has a framework for writing acceptance tests which minimises the amount of boilerplate code necessary to use common testing patterns. The entry -point to the framework is the `resource.Test()` function. +point to the framework is the `resource.ParallelTest()` function. Tests are divided into `TestStep`s. Each `TestStep` proceeds by applying some Terraform configuration using the provider under test, and then verifying that @@ -410,14 +410,14 @@ to a single resource. Most tests follow a similar structure. to running acceptance tests. This is common to all tests exercising a single provider. -Each `TestStep` is defined in the call to `resource.Test()`. Most assertion +Each `TestStep` is defined in the call to `resource.ParallelTest()`. Most assertion functions are defined out of band with the tests. This keeps the tests readable, and allows reuse of assertion functions across different tests of the same type of resource. The definition of a complete test looks like this: ```go func TestAccAzureRMPublicIpStatic_update(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testCheckAzureRMPublicIpDestroy, diff --git a/GNUmakefile b/GNUmakefile index eec5686780d..84c42671f46 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -17,7 +17,7 @@ test: fmtcheck go test $(TEST) -timeout=30s -parallel=4 testacc: fmtcheck - TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m + TF_ACC=1 go test $(TEST) -v -parallel 20 $(TESTARGS) -timeout 120m fmt: @echo "==> Fixing source code with gofmt..." diff --git a/aws/core_acceptance_test.go b/aws/core_acceptance_test.go index 515ac2f1718..2082c066d22 100644 --- a/aws/core_acceptance_test.go +++ b/aws/core_acceptance_test.go @@ -10,7 +10,7 @@ import ( func TestAccAWSVpc_coreMismatchedDiffs(t *testing.T) { var vpc ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, diff --git a/aws/data_source_aws_acm_certificate_test.go b/aws/data_source_aws_acm_certificate_test.go index c6745c167ce..87e7c0c87de 100644 --- a/aws/data_source_aws_acm_certificate_test.go +++ b/aws/data_source_aws_acm_certificate_test.go @@ -34,7 +34,7 @@ func TestAccAWSAcmCertificateDataSource_singleIssued(t *testing.T) { resourceName := "data.aws_acm_certificate.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -100,7 +100,7 @@ func TestAccAWSAcmCertificateDataSource_multipleIssued(t *testing.T) { resourceName := "data.aws_acm_certificate.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -145,7 +145,7 @@ func TestAccAWSAcmCertificateDataSource_noMatchReturnsError(t *testing.T) { domain := fmt.Sprintf("tf-acc-nonexistent.%s", os.Getenv("ACM_CERTIFICATE_ROOT_DOMAIN")) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_acmpca_certificate_authority_test.go b/aws/data_source_aws_acmpca_certificate_authority_test.go index b35cf3d31dc..431cdffe300 100644 --- a/aws/data_source_aws_acmpca_certificate_authority_test.go +++ b/aws/data_source_aws_acmpca_certificate_authority_test.go @@ -13,7 +13,7 @@ func TestAccDataSourceAwsAcmpcaCertificateAuthority_Basic(t *testing.T) { resourceName := "aws_acmpca_certificate_authority.test" datasourceName := "data.aws_acmpca_certificate_authority.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ami_ids_test.go b/aws/data_source_aws_ami_ids_test.go index d41e7c2b621..1a38b56c6af 100644 --- a/aws/data_source_aws_ami_ids_test.go +++ b/aws/data_source_aws_ami_ids_test.go @@ -8,7 +8,7 @@ import ( ) func TestAccDataSourceAwsAmiIds_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -23,7 +23,7 @@ func TestAccDataSourceAwsAmiIds_basic(t *testing.T) { } func TestAccDataSourceAwsAmiIds_sorted(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -59,7 +59,7 @@ func TestAccDataSourceAwsAmiIds_sorted(t *testing.T) { } func TestAccDataSourceAwsAmiIds_empty(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ami_test.go b/aws/data_source_aws_ami_test.go index 703c4052e01..54d196b875e 100644 --- a/aws/data_source_aws_ami_test.go +++ b/aws/data_source_aws_ami_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccAWSAmiDataSource_natInstance(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -54,7 +54,7 @@ func TestAccAWSAmiDataSource_natInstance(t *testing.T) { }) } func TestAccAWSAmiDataSource_windowsInstance(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -93,7 +93,7 @@ func TestAccAWSAmiDataSource_windowsInstance(t *testing.T) { } func TestAccAWSAmiDataSource_instanceStore(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -128,7 +128,7 @@ func TestAccAWSAmiDataSource_instanceStore(t *testing.T) { } func TestAccAWSAmiDataSource_owners(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -144,7 +144,7 @@ func TestAccAWSAmiDataSource_owners(t *testing.T) { // Acceptance test for: https://github.com/hashicorp/terraform/issues/10758 func TestAccAWSAmiDataSource_ownersEmpty(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -159,7 +159,7 @@ func TestAccAWSAmiDataSource_ownersEmpty(t *testing.T) { } func TestAccAWSAmiDataSource_localNameFilter(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_api_gateway_resource_test.go b/aws/data_source_aws_api_gateway_resource_test.go index 7811f746623..ebbb6a97fca 100644 --- a/aws/data_source_aws_api_gateway_resource_test.go +++ b/aws/data_source_aws_api_gateway_resource_test.go @@ -15,7 +15,7 @@ func TestAccDataSourceAwsApiGatewayResource(t *testing.T) { resourceName2 := "aws_api_gateway_resource.example_v1_endpoint" dataSourceName2 := "data.aws_api_gateway_resource.example_v1_endpoint" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_api_gateway_rest_api_test.go b/aws/data_source_aws_api_gateway_rest_api_test.go index 90fa0a1ad39..bfa89d0efe6 100644 --- a/aws/data_source_aws_api_gateway_rest_api_test.go +++ b/aws/data_source_aws_api_gateway_rest_api_test.go @@ -11,7 +11,7 @@ import ( func TestAccDataSourceAwsApiGatewayRestApi(t *testing.T) { rName := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_arn_test.go b/aws/data_source_aws_arn_test.go index 3ee69dd33fe..68c7ac7c0ad 100644 --- a/aws/data_source_aws_arn_test.go +++ b/aws/data_source_aws_arn_test.go @@ -11,7 +11,7 @@ import ( func TestAccDataSourceAwsArn_basic(t *testing.T) { resourceName := "data.aws_arn.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_autoscaling_groups_test.go b/aws/data_source_aws_autoscaling_groups_test.go index a6f8c0306ca..b4a787b1ad3 100644 --- a/aws/data_source_aws_autoscaling_groups_test.go +++ b/aws/data_source_aws_autoscaling_groups_test.go @@ -13,7 +13,7 @@ import ( ) func TestAccAWSAutoscalingGroups_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_availability_zone_test.go b/aws/data_source_aws_availability_zone_test.go index 18a2b4ce10c..e06f2f57d76 100644 --- a/aws/data_source_aws_availability_zone_test.go +++ b/aws/data_source_aws_availability_zone_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsAvailabilityZone(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_availability_zones_test.go b/aws/data_source_aws_availability_zones_test.go index 7f2bf00b7cf..9a3be5cbeba 100644 --- a/aws/data_source_aws_availability_zones_test.go +++ b/aws/data_source_aws_availability_zones_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSAvailabilityZones_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -27,7 +27,7 @@ func TestAccAWSAvailabilityZones_basic(t *testing.T) { } func TestAccAWSAvailabilityZones_stateFilter(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_batch_compute_environment_test.go b/aws/data_source_aws_batch_compute_environment_test.go index 36abb02f272..919c1584a1f 100644 --- a/aws/data_source_aws_batch_compute_environment_test.go +++ b/aws/data_source_aws_batch_compute_environment_test.go @@ -14,7 +14,7 @@ func TestAccDataSourceAwsBatchComputeEnvironment(t *testing.T) { resourceName := "aws_batch_compute_environment.test" datasourceName := "data.aws_batch_compute_environment.by_name" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_batch_job_queue_test.go b/aws/data_source_aws_batch_job_queue_test.go index d7480f6cd3a..b6d1fb674ed 100644 --- a/aws/data_source_aws_batch_job_queue_test.go +++ b/aws/data_source_aws_batch_job_queue_test.go @@ -14,7 +14,7 @@ func TestAccDataSourceAwsBatchJobQueue(t *testing.T) { resourceName := "aws_batch_job_queue.test" datasourceName := "data.aws_batch_job_queue.by_name" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_billing_service_account_test.go b/aws/data_source_aws_billing_service_account_test.go index 53f9c2df89f..fbac4a95ea3 100644 --- a/aws/data_source_aws_billing_service_account_test.go +++ b/aws/data_source_aws_billing_service_account_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccAWSBillingServiceAccount_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_caller_identity_test.go b/aws/data_source_aws_caller_identity_test.go index b0a36e76b64..50e47a53f76 100644 --- a/aws/data_source_aws_caller_identity_test.go +++ b/aws/data_source_aws_caller_identity_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSCallerIdentity_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -26,7 +26,7 @@ func TestAccAWSCallerIdentity_basic(t *testing.T) { // Protects against a panic in the AWS Provider configuration. // See https://github.com/terraform-providers/terraform-provider-aws/pull/1227 func TestAccAWSCallerIdentity_basic_panic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_canonical_user_id_test.go b/aws/data_source_aws_canonical_user_id_test.go index 31e7d50397f..88a6320c71c 100644 --- a/aws/data_source_aws_canonical_user_id_test.go +++ b/aws/data_source_aws_canonical_user_id_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsCanonicalUserId_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_cloudformation_export_test.go b/aws/data_source_aws_cloudformation_export_test.go index e76f91e20b0..a0775928260 100644 --- a/aws/data_source_aws_cloudformation_export_test.go +++ b/aws/data_source_aws_cloudformation_export_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSCloudformationExportDataSource_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_cloudformation_stack_test.go b/aws/data_source_aws_cloudformation_stack_test.go index 03cba304e4f..d17dfecfc0c 100644 --- a/aws/data_source_aws_cloudformation_stack_test.go +++ b/aws/data_source_aws_cloudformation_stack_test.go @@ -13,7 +13,7 @@ func TestAccAWSCloudFormationStack_dataSource_basic(t *testing.T) { rString := acctest.RandString(8) stackName := fmt.Sprintf("tf-acc-ds-basic-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -88,7 +88,7 @@ func TestAccAWSCloudFormationStack_dataSource_yaml(t *testing.T) { rString := acctest.RandString(8) stackName := fmt.Sprintf("tf-acc-ds-yaml-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_cloudtrail_service_account_test.go b/aws/data_source_aws_cloudtrail_service_account_test.go index 2d4026adb80..6eb9ea90221 100644 --- a/aws/data_source_aws_cloudtrail_service_account_test.go +++ b/aws/data_source_aws_cloudtrail_service_account_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccAWSCloudTrailServiceAccount_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_cloudwatch_log_group_test.go b/aws/data_source_aws_cloudwatch_log_group_test.go index 05b624f3529..53a13c1587c 100644 --- a/aws/data_source_aws_cloudwatch_log_group_test.go +++ b/aws/data_source_aws_cloudwatch_log_group_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSCloudwatchLogGroupDataSource(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_codecommit_repository_test.go b/aws/data_source_aws_codecommit_repository_test.go index 0a8fb07cfc3..76e438035b3 100644 --- a/aws/data_source_aws_codecommit_repository_test.go +++ b/aws/data_source_aws_codecommit_repository_test.go @@ -13,7 +13,7 @@ func TestAccAWSCodeCommitRepositoryDataSource_basic(t *testing.T) { resourceName := "aws_codecommit_repository.default" datasourceName := "data.aws_codecommit_repository.default" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_cognito_user_pools_test.go b/aws/data_source_aws_cognito_user_pools_test.go index a8bdd1ae142..d75c356ee4e 100644 --- a/aws/data_source_aws_cognito_user_pools_test.go +++ b/aws/data_source_aws_cognito_user_pools_test.go @@ -11,7 +11,7 @@ import ( func TestAccDataSourceAwsCognitoUserPools_basic(t *testing.T) { rName := fmt.Sprintf("tf_acc_ds_cognito_user_pools_%s", acctest.RandString(7)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_db_cluster_snapshot_test.go b/aws/data_source_aws_db_cluster_snapshot_test.go index 0330952a7ce..fd76c25d2db 100644 --- a/aws/data_source_aws_db_cluster_snapshot_test.go +++ b/aws/data_source_aws_db_cluster_snapshot_test.go @@ -14,7 +14,7 @@ func TestAccAWSDbClusterSnapshotDataSource_DbClusterSnapshotIdentifier(t *testin dataSourceName := "data.aws_db_cluster_snapshot.test" resourceName := "aws_db_cluster_snapshot.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -49,7 +49,7 @@ func TestAccAWSDbClusterSnapshotDataSource_DbClusterIdentifier(t *testing.T) { dataSourceName := "data.aws_db_cluster_snapshot.test" resourceName := "aws_db_cluster_snapshot.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -84,7 +84,7 @@ func TestAccAWSDbClusterSnapshotDataSource_MostRecent(t *testing.T) { dataSourceName := "data.aws_db_cluster_snapshot.test" resourceName := "aws_db_cluster_snapshot.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_db_event_categories_test.go b/aws/data_source_aws_db_event_categories_test.go index 6eefd161ccb..859977fc5b9 100644 --- a/aws/data_source_aws_db_event_categories_test.go +++ b/aws/data_source_aws_db_event_categories_test.go @@ -13,7 +13,7 @@ import ( ) func TestAccAWSDbEventCategories_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -29,7 +29,7 @@ func TestAccAWSDbEventCategories_basic(t *testing.T) { } func TestAccAWSDbEventCategories_sourceType(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_db_instance_test.go b/aws/data_source_aws_db_instance_test.go index 3299d69bb8d..75e721af55c 100644 --- a/aws/data_source_aws_db_instance_test.go +++ b/aws/data_source_aws_db_instance_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSDbInstanceDataSource_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -43,7 +43,7 @@ func TestAccAWSDbInstanceDataSource_ec2Classic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_db_snapshot_test.go b/aws/data_source_aws_db_snapshot_test.go index c0a0255d902..dd6620d64e2 100644 --- a/aws/data_source_aws_db_snapshot_test.go +++ b/aws/data_source_aws_db_snapshot_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSDbSnapshotDataSource_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_dx_gateway_test.go b/aws/data_source_aws_dx_gateway_test.go index 1521fac9e44..b73bca3b56b 100644 --- a/aws/data_source_aws_dx_gateway_test.go +++ b/aws/data_source_aws_dx_gateway_test.go @@ -14,7 +14,7 @@ func TestAccDataSourceAwsDxGateway_Basic(t *testing.T) { resourceName := "aws_dx_gateway.test" datasourceName := "data.aws_dx_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_dynamodb_table_test.go b/aws/data_source_aws_dynamodb_table_test.go index 1f90d59dae4..211ad4f1fbd 100644 --- a/aws/data_source_aws_dynamodb_table_test.go +++ b/aws/data_source_aws_dynamodb_table_test.go @@ -11,7 +11,7 @@ import ( func TestAccDataSourceAwsDynamoDbTable_basic(t *testing.T) { tableName := fmt.Sprintf("testaccawsdynamodbtable-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ebs_snapshot_ids_test.go b/aws/data_source_aws_ebs_snapshot_ids_test.go index c713a27b062..c0e112848b3 100644 --- a/aws/data_source_aws_ebs_snapshot_ids_test.go +++ b/aws/data_source_aws_ebs_snapshot_ids_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsEbsSnapshotIds_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -26,7 +26,7 @@ func TestAccDataSourceAwsEbsSnapshotIds_basic(t *testing.T) { func TestAccDataSourceAwsEbsSnapshotIds_sorted(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -55,7 +55,7 @@ func TestAccDataSourceAwsEbsSnapshotIds_sorted(t *testing.T) { } func TestAccDataSourceAwsEbsSnapshotIds_empty(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ebs_snapshot_test.go b/aws/data_source_aws_ebs_snapshot_test.go index b9113a65453..91be8d4e905 100644 --- a/aws/data_source_aws_ebs_snapshot_test.go +++ b/aws/data_source_aws_ebs_snapshot_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSEbsSnapshotDataSource_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -26,7 +26,7 @@ func TestAccAWSEbsSnapshotDataSource_basic(t *testing.T) { } func TestAccAWSEbsSnapshotDataSource_multipleFilters(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ebs_volume_test.go b/aws/data_source_aws_ebs_volume_test.go index f60cad79785..31f359569a4 100644 --- a/aws/data_source_aws_ebs_volume_test.go +++ b/aws/data_source_aws_ebs_volume_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSEbsVolumeDataSource_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -28,7 +28,7 @@ func TestAccAWSEbsVolumeDataSource_basic(t *testing.T) { } func TestAccAWSEbsVolumeDataSource_multipleFilters(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ecr_repository_test.go b/aws/data_source_aws_ecr_repository_test.go index b8280c406a2..4c2f049a00b 100644 --- a/aws/data_source_aws_ecr_repository_test.go +++ b/aws/data_source_aws_ecr_repository_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccAWSEcrDataSource_ecrRepository(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ecs_cluster_test.go b/aws/data_source_aws_ecs_cluster_test.go index 3060b0715bc..53caa633702 100644 --- a/aws/data_source_aws_ecs_cluster_test.go +++ b/aws/data_source_aws_ecs_cluster_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSEcsDataSource_ecsCluster(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ecs_container_definition_test.go b/aws/data_source_aws_ecs_container_definition_test.go index 0e2ff9d1f9e..a9196d1ec0d 100644 --- a/aws/data_source_aws_ecs_container_definition_test.go +++ b/aws/data_source_aws_ecs_container_definition_test.go @@ -14,7 +14,7 @@ func TestAccAWSEcsDataSource_ecsContainerDefinition(t *testing.T) { svcName := fmt.Sprintf("tf_acc_svc_td_ds_ecs_containter_definition_%s", rString) tdName := fmt.Sprintf("tf_acc_td_ds_ecs_containter_definition_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ecs_service_test.go b/aws/data_source_aws_ecs_service_test.go index 24d89fd25d3..b295bb44447 100644 --- a/aws/data_source_aws_ecs_service_test.go +++ b/aws/data_source_aws_ecs_service_test.go @@ -12,7 +12,7 @@ func TestAccAWSEcsServiceDataSource_basic(t *testing.T) { dataSourceName := "data.aws_ecs_service.test" resourceName := "aws_ecs_service.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ecs_task_definition_test.go b/aws/data_source_aws_ecs_task_definition_test.go index 7cf92534ed8..c93effe01f3 100644 --- a/aws/data_source_aws_ecs_task_definition_test.go +++ b/aws/data_source_aws_ecs_task_definition_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSEcsDataSource_ecsTaskDefinition(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_efs_file_system_test.go b/aws/data_source_aws_efs_file_system_test.go index bd3ff969b46..fc28034bf10 100644 --- a/aws/data_source_aws_efs_file_system_test.go +++ b/aws/data_source_aws_efs_file_system_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccDataSourceAwsEfsFileSystem(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_efs_mount_target_test.go b/aws/data_source_aws_efs_mount_target_test.go index bdb8b2b63d5..9227c381550 100644 --- a/aws/data_source_aws_efs_mount_target_test.go +++ b/aws/data_source_aws_efs_mount_target_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsEfsMountTargetByMountTargetId(t *testing.T) { rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_eip_test.go b/aws/data_source_aws_eip_test.go index f9293807a23..465ea4de1f3 100644 --- a/aws/data_source_aws_eip_test.go +++ b/aws/data_source_aws_eip_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsEip_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_eks_cluster_test.go b/aws/data_source_aws_eks_cluster_test.go index 5153e89e420..90e65622365 100644 --- a/aws/data_source_aws_eks_cluster_test.go +++ b/aws/data_source_aws_eks_cluster_test.go @@ -14,7 +14,7 @@ func TestAccAWSEksClusterDataSource_basic(t *testing.T) { dataSourceResourceName := "data.aws_eks_cluster.test" resourceName := "aws_eks_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEksClusterDestroy, diff --git a/aws/data_source_aws_elastic_beanstalk_hosted_zone_test.go b/aws/data_source_aws_elastic_beanstalk_hosted_zone_test.go index 69597ae52f7..0f5ef941425 100644 --- a/aws/data_source_aws_elastic_beanstalk_hosted_zone_test.go +++ b/aws/data_source_aws_elastic_beanstalk_hosted_zone_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSDataSourceElasticBeanstalkHostedZone(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_elastic_beanstalk_solution_stack_test.go b/aws/data_source_aws_elastic_beanstalk_solution_stack_test.go index d32364c6961..e97b9df2b1e 100644 --- a/aws/data_source_aws_elastic_beanstalk_solution_stack_test.go +++ b/aws/data_source_aws_elastic_beanstalk_solution_stack_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccAWSElasticBeanstalkSolutionStackDataSource(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_elasticache_cluster_test.go b/aws/data_source_aws_elasticache_cluster_test.go index 57791cf05cb..d567f6cede4 100644 --- a/aws/data_source_aws_elasticache_cluster_test.go +++ b/aws/data_source_aws_elasticache_cluster_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSDataElasticacheCluster_basic(t *testing.T) { rInt := acctest.RandInt() rString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_elasticache_replication_group_test.go b/aws/data_source_aws_elasticache_replication_group_test.go index 409b2fd4259..3df1b52696a 100644 --- a/aws/data_source_aws_elasticache_replication_group_test.go +++ b/aws/data_source_aws_elasticache_replication_group_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsElasticacheReplicationGroup_basic(t *testing.T) { rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -35,7 +35,7 @@ func TestAccDataSourceAwsElasticacheReplicationGroup_basic(t *testing.T) { func TestAccDataSourceAwsElasticacheReplicationGroup_ClusterMode(t *testing.T) { rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_elb_hosted_zone_id_test.go b/aws/data_source_aws_elb_hosted_zone_id_test.go index e7fe326a0e3..af3195673f3 100644 --- a/aws/data_source_aws_elb_hosted_zone_id_test.go +++ b/aws/data_source_aws_elb_hosted_zone_id_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccAWSElbHostedZoneId_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_elb_service_account_test.go b/aws/data_source_aws_elb_service_account_test.go index 551d7df4614..c43de3b7ab5 100644 --- a/aws/data_source_aws_elb_service_account_test.go +++ b/aws/data_source_aws_elb_service_account_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccAWSElbServiceAccount_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_elb_test.go b/aws/data_source_aws_elb_test.go index 5516a2bcd47..3e44825e7de 100644 --- a/aws/data_source_aws_elb_test.go +++ b/aws/data_source_aws_elb_test.go @@ -12,7 +12,7 @@ func TestAccDataSourceAWSELB_basic(t *testing.T) { // Must be less than 32 characters for ELB name rName := fmt.Sprintf("TestAccDataSourceAWSELB-%s", acctest.RandStringFromCharSet(5, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_glue_script_test.go b/aws/data_source_aws_glue_script_test.go index 05dd26da7b1..f7449cc3e16 100644 --- a/aws/data_source_aws_glue_script_test.go +++ b/aws/data_source_aws_glue_script_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAWSGlueScript_Language_Python(t *testing.T) { dataSourceName := "data.aws_glue_script.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -27,7 +27,7 @@ func TestAccDataSourceAWSGlueScript_Language_Python(t *testing.T) { func TestAccDataSourceAWSGlueScript_Language_Scala(t *testing.T) { dataSourceName := "data.aws_glue_script.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_iam_group_test.go b/aws/data_source_aws_iam_group_test.go index 8485fa30430..e79ae7fe35d 100644 --- a/aws/data_source_aws_iam_group_test.go +++ b/aws/data_source_aws_iam_group_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSDataSourceIAMGroup_basic(t *testing.T) { groupName := fmt.Sprintf("test-datasource-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_iam_instance_profile_test.go b/aws/data_source_aws_iam_instance_profile_test.go index c334b04c92a..b957eaf5e56 100644 --- a/aws/data_source_aws_iam_instance_profile_test.go +++ b/aws/data_source_aws_iam_instance_profile_test.go @@ -13,7 +13,7 @@ func TestAccAWSDataSourceIAMInstanceProfile_basic(t *testing.T) { roleName := fmt.Sprintf("tf-acc-ds-instance-profile-role-%d", acctest.RandInt()) profileName := fmt.Sprintf("tf-acc-ds-instance-profile-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_iam_policy_document_test.go b/aws/data_source_aws_iam_policy_document_test.go index 0148207df40..abceafbfad5 100644 --- a/aws/data_source_aws_iam_policy_document_test.go +++ b/aws/data_source_aws_iam_policy_document_test.go @@ -12,7 +12,7 @@ func TestAccAWSDataSourceIAMPolicyDocument_basic(t *testing.T) { // This really ought to be able to be a unit test rather than an // acceptance test, but just instantiating the AWS provider requires // some AWS API calls, and so this needs valid AWS credentials to work. - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -32,7 +32,7 @@ func TestAccAWSDataSourceIAMPolicyDocument_source(t *testing.T) { // This really ought to be able to be a unit test rather than an // acceptance test, but just instantiating the AWS provider requires // some AWS API calls, and so this needs valid AWS credentials to work. - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -57,7 +57,7 @@ func TestAccAWSDataSourceIAMPolicyDocument_source(t *testing.T) { } func TestAccAWSDataSourceIAMPolicyDocument_sourceConflicting(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -74,7 +74,7 @@ func TestAccAWSDataSourceIAMPolicyDocument_sourceConflicting(t *testing.T) { } func TestAccAWSDataSourceIAMPolicyDocument_override(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -91,7 +91,7 @@ func TestAccAWSDataSourceIAMPolicyDocument_override(t *testing.T) { } func TestAccAWSDataSourceIAMPolicyDocument_noStatementMerge(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -108,7 +108,7 @@ func TestAccAWSDataSourceIAMPolicyDocument_noStatementMerge(t *testing.T) { } func TestAccAWSDataSourceIAMPolicyDocument_noStatementOverride(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_iam_policy_test.go b/aws/data_source_aws_iam_policy_test.go index a8f5c753e5d..cd63298684b 100644 --- a/aws/data_source_aws_iam_policy_test.go +++ b/aws/data_source_aws_iam_policy_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSDataSourceIAMPolicy_basic(t *testing.T) { policyName := fmt.Sprintf("test-policy-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_iam_role_test.go b/aws/data_source_aws_iam_role_test.go index ffdd10cc451..ead7f4263d1 100644 --- a/aws/data_source_aws_iam_role_test.go +++ b/aws/data_source_aws_iam_role_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSDataSourceIAMRole_basic(t *testing.T) { roleName := fmt.Sprintf("test-role-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_iam_server_certificate_test.go b/aws/data_source_aws_iam_server_certificate_test.go index 88370209547..c1c55da6589 100644 --- a/aws/data_source_aws_iam_server_certificate_test.go +++ b/aws/data_source_aws_iam_server_certificate_test.go @@ -41,7 +41,7 @@ func TestResourceSortByExpirationDate(t *testing.T) { func TestAccAWSDataSourceIAMServerCertificate_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckIAMServerCertificateDestroy, @@ -64,7 +64,7 @@ func TestAccAWSDataSourceIAMServerCertificate_basic(t *testing.T) { } func TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMServerCertificateDestroy, @@ -82,7 +82,7 @@ func TestAccAWSDataSourceIAMServerCertificate_path(t *testing.T) { path := "/test-path/" pathPrefix := "/test-path/" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckIAMServerCertificateDestroy, diff --git a/aws/data_source_aws_iam_user_test.go b/aws/data_source_aws_iam_user_test.go index 7c2015b1c5b..5af9809e493 100644 --- a/aws/data_source_aws_iam_user_test.go +++ b/aws/data_source_aws_iam_user_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSDataSourceIAMUser_basic(t *testing.T) { userName := fmt.Sprintf("test-datasource-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_inspector_rules_packages_test.go b/aws/data_source_aws_inspector_rules_packages_test.go index 159f8defc29..31bdb5b688a 100644 --- a/aws/data_source_aws_inspector_rules_packages_test.go +++ b/aws/data_source_aws_inspector_rules_packages_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccAWSInspectorRulesPackages_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_instance_test.go b/aws/data_source_aws_instance_test.go index d68cb0796d3..a0014d4aa2a 100644 --- a/aws/data_source_aws_instance_test.go +++ b/aws/data_source_aws_instance_test.go @@ -11,7 +11,7 @@ import ( ) func TestAccAWSInstanceDataSource_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -30,7 +30,7 @@ func TestAccAWSInstanceDataSource_basic(t *testing.T) { func TestAccAWSInstanceDataSource_tags(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -47,7 +47,7 @@ func TestAccAWSInstanceDataSource_tags(t *testing.T) { } func TestAccAWSInstanceDataSource_AzUserData(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -66,7 +66,7 @@ func TestAccAWSInstanceDataSource_AzUserData(t *testing.T) { } func TestAccAWSInstanceDataSource_gp2IopsDevice(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -86,7 +86,7 @@ func TestAccAWSInstanceDataSource_gp2IopsDevice(t *testing.T) { } func TestAccAWSInstanceDataSource_blockDevices(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -107,7 +107,7 @@ func TestAccAWSInstanceDataSource_blockDevices(t *testing.T) { } func TestAccAWSInstanceDataSource_rootInstanceStore(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -126,7 +126,7 @@ func TestAccAWSInstanceDataSource_rootInstanceStore(t *testing.T) { } func TestAccAWSInstanceDataSource_privateIP(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -144,7 +144,7 @@ func TestAccAWSInstanceDataSource_privateIP(t *testing.T) { func TestAccAWSInstanceDataSource_keyPair(t *testing.T) { rName := fmt.Sprintf("tf-test-key-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -162,7 +162,7 @@ func TestAccAWSInstanceDataSource_keyPair(t *testing.T) { } func TestAccAWSInstanceDataSource_VPC(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -183,7 +183,7 @@ func TestAccAWSInstanceDataSource_VPC(t *testing.T) { func TestAccAWSInstanceDataSource_PlacementGroup(t *testing.T) { rStr := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -199,7 +199,7 @@ func TestAccAWSInstanceDataSource_PlacementGroup(t *testing.T) { func TestAccAWSInstanceDataSource_SecurityGroups(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -218,7 +218,7 @@ func TestAccAWSInstanceDataSource_SecurityGroups(t *testing.T) { } func TestAccAWSInstanceDataSource_VPCSecurityGroups(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -238,7 +238,7 @@ func TestAccAWSInstanceDataSource_VPCSecurityGroups(t *testing.T) { func TestAccAWSInstanceDataSource_getPasswordData_trueToFalse(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -263,7 +263,7 @@ func TestAccAWSInstanceDataSource_getPasswordData_trueToFalse(t *testing.T) { func TestAccAWSInstanceDataSource_getPasswordData_falseToTrue(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -286,7 +286,7 @@ func TestAccAWSInstanceDataSource_getPasswordData_falseToTrue(t *testing.T) { } func TestAccAWSInstanceDataSource_creditSpecification(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_instances_test.go b/aws/data_source_aws_instances_test.go index a886e3b68af..a5d734c8c42 100644 --- a/aws/data_source_aws_instances_test.go +++ b/aws/data_source_aws_instances_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSInstancesDataSource_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -27,7 +27,7 @@ func TestAccAWSInstancesDataSource_basic(t *testing.T) { func TestAccAWSInstancesDataSource_tags(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -45,7 +45,7 @@ func TestAccAWSInstancesDataSource_tags(t *testing.T) { func TestAccAWSInstancesDataSource_instance_state_names(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_internet_gateway_test.go b/aws/data_source_aws_internet_gateway_test.go index 2fa4bbcfc79..a5af5e53527 100644 --- a/aws/data_source_aws_internet_gateway_test.go +++ b/aws/data_source_aws_internet_gateway_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsInternetGateway_typical(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_iot_endpoint_test.go b/aws/data_source_aws_iot_endpoint_test.go index bcf11d6a0d8..d1cd4a1fbf3 100644 --- a/aws/data_source_aws_iot_endpoint_test.go +++ b/aws/data_source_aws_iot_endpoint_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccAWSIotEndpointDataSource(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ip_ranges_test.go b/aws/data_source_aws_ip_ranges_test.go index b66a16ab470..2b54869adc0 100644 --- a/aws/data_source_aws_ip_ranges_test.go +++ b/aws/data_source_aws_ip_ranges_test.go @@ -14,7 +14,7 @@ import ( ) func TestAccAWSIPRanges(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_kinesis_stream_test.go b/aws/data_source_aws_kinesis_stream_test.go index 49108d846ec..9103e33aeb6 100644 --- a/aws/data_source_aws_kinesis_stream_test.go +++ b/aws/data_source_aws_kinesis_stream_test.go @@ -32,7 +32,7 @@ func TestAccAWSKinesisStreamDataSource(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, diff --git a/aws/data_source_aws_kms_alias_test.go b/aws/data_source_aws_kms_alias_test.go index 9a4f8bca4c0..20c1936a939 100644 --- a/aws/data_source_aws_kms_alias_test.go +++ b/aws/data_source_aws_kms_alias_test.go @@ -15,7 +15,7 @@ func TestAccDataSourceAwsKmsAlias_AwsService(t *testing.T) { name := "alias/aws/s3" resourceName := "data.aws_kms_alias.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -38,7 +38,7 @@ func TestAccDataSourceAwsKmsAlias_CMK(t *testing.T) { aliasResourceName := "aws_kms_alias.test" datasourceAliasResourceName := "data.aws_kms_alias.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_kms_ciphertext_test.go b/aws/data_source_aws_kms_ciphertext_test.go index f871acc0340..4703d176e64 100644 --- a/aws/data_source_aws_kms_ciphertext_test.go +++ b/aws/data_source_aws_kms_ciphertext_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccDataSourceAwsKmsCiphertext_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -23,7 +23,7 @@ func TestAccDataSourceAwsKmsCiphertext_basic(t *testing.T) { } func TestAccDataSourceAwsKmsCiphertext_validate(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -43,7 +43,7 @@ func TestAccDataSourceAwsKmsCiphertext_validate(t *testing.T) { } func TestAccDataSourceAwsKmsCiphertext_validate_withContext(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_kms_key_test.go b/aws/data_source_aws_kms_key_test.go index e52e3c25192..cdf9eed13fd 100644 --- a/aws/data_source_aws_kms_key_test.go +++ b/aws/data_source_aws_kms_key_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccDataSourceAwsKmsKey_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_lambda_function_test.go b/aws/data_source_aws_lambda_function_test.go index 0d59e35d76f..50198777eeb 100644 --- a/aws/data_source_aws_lambda_function_test.go +++ b/aws/data_source_aws_lambda_function_test.go @@ -15,7 +15,7 @@ func TestAccDataSourceAWSLambdaFunction_basic(t *testing.T) { sgName := fmt.Sprintf("tf-acctest-d-lambda-function-basic-sg-%s", rString) funcName := fmt.Sprintf("tf-acctest-d-lambda-function-basic-func-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -54,7 +54,7 @@ func TestAccDataSourceAWSLambdaFunction_version(t *testing.T) { sgName := fmt.Sprintf("tf-acctest-d-lambda-function-version-sg-%s", rString) funcName := fmt.Sprintf("tf-acctest-d-lambda-function-version-func-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -78,7 +78,7 @@ func TestAccDataSourceAWSLambdaFunction_alias(t *testing.T) { sgName := fmt.Sprintf("tf-acctest-d-lambda-function-alias-sg-%s", rString) funcName := fmt.Sprintf("tf-acctest-d-lambda-function-alias-func-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -102,7 +102,7 @@ func TestAccDataSourceAWSLambdaFunction_vpc(t *testing.T) { sgName := fmt.Sprintf("tf-acctest-d-lambda-function-vpc-sg-%s", rString) funcName := fmt.Sprintf("tf-acctest-d-lambda-function-vpc-func-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -126,7 +126,7 @@ func TestAccDataSourceAWSLambdaFunction_environment(t *testing.T) { sgName := fmt.Sprintf("tf-acctest-d-lambda-function-environment-sg-%s", rString) funcName := fmt.Sprintf("tf-acctest-d-lambda-function-environment-func-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_lambda_invocation_test.go b/aws/data_source_aws_lambda_invocation_test.go index 56a1bd655e5..849d725031f 100644 --- a/aws/data_source_aws_lambda_invocation_test.go +++ b/aws/data_source_aws_lambda_invocation_test.go @@ -38,7 +38,7 @@ func TestAccDataSourceAwsLambdaInvocation_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") testData := "value3" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -60,7 +60,7 @@ func TestAccDataSourceAwsLambdaInvocation_qualifier(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") testData := "value3" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -81,7 +81,7 @@ func TestAccDataSourceAwsLambdaInvocation_complex(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") testData := "value3" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_launch_configuration_test.go b/aws/data_source_aws_launch_configuration_test.go index 880e842e134..f9018760853 100644 --- a/aws/data_source_aws_launch_configuration_test.go +++ b/aws/data_source_aws_launch_configuration_test.go @@ -12,7 +12,7 @@ func TestAccAWSLaunchConfigurationDataSource_basic(t *testing.T) { rInt := acctest.RandInt() rName := "data.aws_launch_configuration.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -35,7 +35,7 @@ func TestAccAWSLaunchConfigurationDataSource_securityGroups(t *testing.T) { rInt := acctest.RandInt() rName := "data.aws_launch_configuration.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_launch_template_test.go b/aws/data_source_aws_launch_template_test.go index 35bf2cd8a7d..d79c7cc8a7e 100644 --- a/aws/data_source_aws_launch_template_test.go +++ b/aws/data_source_aws_launch_template_test.go @@ -13,7 +13,7 @@ func TestAccAWSLaunchTemplateDataSource_basic(t *testing.T) { dataSourceName := "data.aws_launch_template.test" resourceName := "aws_launch_template.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, diff --git a/aws/data_source_aws_lb_listener_test.go b/aws/data_source_aws_lb_listener_test.go index 6dc12ec00cf..930b9dbab9e 100644 --- a/aws/data_source_aws_lb_listener_test.go +++ b/aws/data_source_aws_lb_listener_test.go @@ -12,7 +12,7 @@ func TestAccDataSourceAWSLBListener_basic(t *testing.T) { lbName := fmt.Sprintf("testlistener-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -43,7 +43,7 @@ func TestAccDataSourceAWSLBListenerBackwardsCompatibility(t *testing.T) { lbName := fmt.Sprintf("testlistener-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -74,7 +74,7 @@ func TestAccDataSourceAWSLBListener_https(t *testing.T) { lbName := fmt.Sprintf("testlistener-https-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_lb_target_group_test.go b/aws/data_source_aws_lb_target_group_test.go index 5e200d0735c..db984eb9915 100644 --- a/aws/data_source_aws_lb_target_group_test.go +++ b/aws/data_source_aws_lb_target_group_test.go @@ -12,7 +12,7 @@ func TestAccDataSourceAWSALBTargetGroup_basic(t *testing.T) { lbName := fmt.Sprintf("testlb-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -69,7 +69,7 @@ func TestAccDataSourceAWSLBTargetGroupBackwardsCompatibility(t *testing.T) { lbName := fmt.Sprintf("testlb-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_lb_test.go b/aws/data_source_aws_lb_test.go index b87cdb01566..3308bb33a6a 100644 --- a/aws/data_source_aws_lb_test.go +++ b/aws/data_source_aws_lb_test.go @@ -11,7 +11,7 @@ import ( func TestAccDataSourceAWSLB_basic(t *testing.T) { lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -51,7 +51,7 @@ func TestAccDataSourceAWSLB_basic(t *testing.T) { func TestAccDataSourceAWSLBBackwardsCompatibility(t *testing.T) { lbName := fmt.Sprintf("testaccawsalb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_mq_broker_test.go b/aws/data_source_aws_mq_broker_test.go index d05c204e24e..3ca16cd97f7 100644 --- a/aws/data_source_aws_mq_broker_test.go +++ b/aws/data_source_aws_mq_broker_test.go @@ -13,7 +13,7 @@ func TestAccDataSourceAWSMqBroker_basic(t *testing.T) { prefix := "tf-acctest-d-mq-broker" brokerName := fmt.Sprintf("%s-%s", prefix, rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_nat_gateway_test.go b/aws/data_source_aws_nat_gateway_test.go index 3d21a1f1fbc..2b2393f07aa 100644 --- a/aws/data_source_aws_nat_gateway_test.go +++ b/aws/data_source_aws_nat_gateway_test.go @@ -12,7 +12,7 @@ func TestAccDataSourceAwsNatGateway(t *testing.T) { // This is used as a portion of CIDR network addresses. rInt := acctest.RandIntRange(4, 254) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_network_acls_test.go b/aws/data_source_aws_network_acls_test.go index 3aae0175291..63de06b487b 100644 --- a/aws/data_source_aws_network_acls_test.go +++ b/aws/data_source_aws_network_acls_test.go @@ -11,7 +11,7 @@ import ( func TestAccDataSourceAwsNetworkAcls_basic(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -33,7 +33,7 @@ func TestAccDataSourceAwsNetworkAcls_basic(t *testing.T) { func TestAccDataSourceAwsNetworkAcls_Filter(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -50,7 +50,7 @@ func TestAccDataSourceAwsNetworkAcls_Filter(t *testing.T) { func TestAccDataSourceAwsNetworkAcls_Tags(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -67,7 +67,7 @@ func TestAccDataSourceAwsNetworkAcls_Tags(t *testing.T) { func TestAccDataSourceAwsNetworkAcls_VpcID(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, diff --git a/aws/data_source_aws_network_interface_test.go b/aws/data_source_aws_network_interface_test.go index 933c6225ea3..6c1dba33e4f 100644 --- a/aws/data_source_aws_network_interface_test.go +++ b/aws/data_source_aws_network_interface_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsNetworkInterface_basic(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -64,7 +64,7 @@ data "aws_network_interface" "test" { func TestAccDataSourceAwsNetworkInterface_filters(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_network_interfaces_test.go b/aws/data_source_aws_network_interfaces_test.go index 826c6bf6814..8b693615cc0 100644 --- a/aws/data_source_aws_network_interfaces_test.go +++ b/aws/data_source_aws_network_interfaces_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsNetworkInterfaces_Filter(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -27,7 +27,7 @@ func TestAccDataSourceAwsNetworkInterfaces_Filter(t *testing.T) { func TestAccDataSourceAwsNetworkInterfaces_Tags(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, diff --git a/aws/data_source_aws_partition_test.go b/aws/data_source_aws_partition_test.go index 5610a0b968e..57c0ab2bfbb 100644 --- a/aws/data_source_aws_partition_test.go +++ b/aws/data_source_aws_partition_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSPartition_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_prefix_list_test.go b/aws/data_source_aws_prefix_list_test.go index cc199d5f74c..0839788bd53 100644 --- a/aws/data_source_aws_prefix_list_test.go +++ b/aws/data_source_aws_prefix_list_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccDataSourceAwsPrefixList(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_pricing_product_test.go b/aws/data_source_aws_pricing_product_test.go index 17e9d278a65..d4d6993995c 100644 --- a/aws/data_source_aws_pricing_product_test.go +++ b/aws/data_source_aws_pricing_product_test.go @@ -14,7 +14,7 @@ func TestAccDataSourceAwsPricingProduct_ec2(t *testing.T) { oldRegion := os.Getenv("AWS_DEFAULT_REGION") os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldRegion) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -33,7 +33,7 @@ func TestAccDataSourceAwsPricingProduct_redshift(t *testing.T) { oldRegion := os.Getenv("AWS_DEFAULT_REGION") os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldRegion) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_rds_cluster_test.go b/aws/data_source_aws_rds_cluster_test.go index 5a4a8cc58e7..7d0355486f7 100644 --- a/aws/data_source_aws_rds_cluster_test.go +++ b/aws/data_source_aws_rds_cluster_test.go @@ -13,7 +13,7 @@ func TestAccDataSourceAWSRDSCluster_basic(t *testing.T) { dataSourceName := "data.aws_rds_cluster.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_redshift_cluster_test.go b/aws/data_source_aws_redshift_cluster_test.go index 7568c547330..d3b28dd49c0 100644 --- a/aws/data_source_aws_redshift_cluster_test.go +++ b/aws/data_source_aws_redshift_cluster_test.go @@ -10,7 +10,7 @@ import ( func TestAccAWSDataSourceRedshiftCluster_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -43,7 +43,7 @@ func TestAccAWSDataSourceRedshiftCluster_basic(t *testing.T) { func TestAccAWSDataSourceRedshiftCluster_vpc(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -62,7 +62,7 @@ func TestAccAWSDataSourceRedshiftCluster_vpc(t *testing.T) { func TestAccAWSDataSourceRedshiftCluster_logging(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_redshift_service_account_test.go b/aws/data_source_aws_redshift_service_account_test.go index 6caa1388bc3..9501960ff7a 100644 --- a/aws/data_source_aws_redshift_service_account_test.go +++ b/aws/data_source_aws_redshift_service_account_test.go @@ -7,7 +7,7 @@ import ( ) func TestAccAWSRedshiftServiceAccount_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_region_test.go b/aws/data_source_aws_region_test.go index d0c1f0e597b..ed80e9760e5 100644 --- a/aws/data_source_aws_region_test.go +++ b/aws/data_source_aws_region_test.go @@ -82,7 +82,7 @@ func TestAccDataSourceAwsRegion_basic(t *testing.T) { resourceName := "data.aws_region.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -114,7 +114,7 @@ func TestAccDataSourceAwsRegion_endpoint(t *testing.T) { description2 := "US East (Ohio)" resourceName := "data.aws_region.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -160,7 +160,7 @@ func TestAccDataSourceAwsRegion_endpointAndName(t *testing.T) { description2 := "US East (Ohio)" resourceName := "data.aws_region.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -220,7 +220,7 @@ func TestAccDataSourceAwsRegion_name(t *testing.T) { description2 := "US East (Ohio)" resourceName := "data.aws_region.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_route53_zone_test.go b/aws/data_source_aws_route53_zone_test.go index 9bed9a303ff..c2da728aa18 100644 --- a/aws/data_source_aws_route53_zone_test.go +++ b/aws/data_source_aws_route53_zone_test.go @@ -16,7 +16,7 @@ func TestAccDataSourceAwsRoute53Zone(t *testing.T) { privateResourceName := "aws_route53_zone.test_private" privateDomain := fmt.Sprintf("test.acc-%d.", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53ZoneDestroy, diff --git a/aws/data_source_aws_route_table_test.go b/aws/data_source_aws_route_table_test.go index d3c7e30f795..594cfc565b0 100644 --- a/aws/data_source_aws_route_table_test.go +++ b/aws/data_source_aws_route_table_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsRouteTable_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -28,7 +28,7 @@ func TestAccDataSourceAwsRouteTable_basic(t *testing.T) { } func TestAccDataSourceAwsRouteTable_main(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_route_tables_test.go b/aws/data_source_aws_route_tables_test.go index 8d5ae449afa..951c2fd5b3b 100644 --- a/aws/data_source_aws_route_tables_test.go +++ b/aws/data_source_aws_route_tables_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsRouteTables(t *testing.T) { rInt := acctest.RandIntRange(0, 256) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, diff --git a/aws/data_source_aws_route_test.go b/aws/data_source_aws_route_test.go index ecd69f9a1ce..3ea69c5f8f7 100644 --- a/aws/data_source_aws_route_test.go +++ b/aws/data_source_aws_route_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsRoute_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_s3_bucket_object_test.go b/aws/data_source_aws_s3_bucket_object_test.go index 3d71abb77a3..ce6b87bf1f7 100644 --- a/aws/data_source_aws_s3_bucket_object_test.go +++ b/aws/data_source_aws_s3_bucket_object_test.go @@ -19,7 +19,7 @@ func TestAccDataSourceAWSS3BucketObject_basic(t *testing.T) { var rObj s3.GetObjectOutput var dsObj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, PreventPostDestroyRefresh: true, @@ -53,7 +53,7 @@ func TestAccDataSourceAWSS3BucketObject_readableBody(t *testing.T) { var rObj s3.GetObjectOutput var dsObj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, PreventPostDestroyRefresh: true, @@ -87,7 +87,7 @@ func TestAccDataSourceAWSS3BucketObject_kmsEncrypted(t *testing.T) { var rObj s3.GetObjectOutput var dsObj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, PreventPostDestroyRefresh: true, @@ -124,7 +124,7 @@ func TestAccDataSourceAWSS3BucketObject_allParams(t *testing.T) { var rObj s3.GetObjectOutput var dsObj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, PreventPostDestroyRefresh: true, diff --git a/aws/data_source_aws_s3_bucket_test.go b/aws/data_source_aws_s3_bucket_test.go index 03c09c0824d..1858affaec6 100644 --- a/aws/data_source_aws_s3_bucket_test.go +++ b/aws/data_source_aws_s3_bucket_test.go @@ -15,7 +15,7 @@ func TestAccDataSourceS3Bucket_basic(t *testing.T) { region := testAccGetRegion() hostedZoneID, _ := HostedZoneIDForRegion(region) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -40,7 +40,7 @@ func TestAccDataSourceS3Bucket_website(t *testing.T) { rInt := acctest.RandInt() region := testAccGetRegion() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_secretsmanager_secret_test.go b/aws/data_source_aws_secretsmanager_secret_test.go index 55accf3ce2f..224dc025c04 100644 --- a/aws/data_source_aws_secretsmanager_secret_test.go +++ b/aws/data_source_aws_secretsmanager_secret_test.go @@ -11,7 +11,7 @@ import ( ) func TestAccDataSourceAwsSecretsManagerSecret_Basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -36,7 +36,7 @@ func TestAccDataSourceAwsSecretsManagerSecret_ARN(t *testing.T) { resourceName := "aws_secretsmanager_secret.test" datasourceName := "data.aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -55,7 +55,7 @@ func TestAccDataSourceAwsSecretsManagerSecret_Name(t *testing.T) { resourceName := "aws_secretsmanager_secret.test" datasourceName := "data.aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -74,7 +74,7 @@ func TestAccDataSourceAwsSecretsManagerSecret_Policy(t *testing.T) { resourceName := "aws_secretsmanager_secret.test" datasourceName := "data.aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_secretsmanager_secret_version_test.go b/aws/data_source_aws_secretsmanager_secret_version_test.go index f650e359829..85e7651983c 100644 --- a/aws/data_source_aws_secretsmanager_secret_version_test.go +++ b/aws/data_source_aws_secretsmanager_secret_version_test.go @@ -15,7 +15,7 @@ func TestAccDataSourceAwsSecretsManagerSecretVersion_Basic(t *testing.T) { resourceName := "aws_secretsmanager_secret_version.test" datasourceName := "data.aws_secretsmanager_secret_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -38,7 +38,7 @@ func TestAccDataSourceAwsSecretsManagerSecretVersion_VersionID(t *testing.T) { resourceName := "aws_secretsmanager_secret_version.test" datasourceName := "data.aws_secretsmanager_secret_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -57,7 +57,7 @@ func TestAccDataSourceAwsSecretsManagerSecretVersion_VersionStage(t *testing.T) resourceName := "aws_secretsmanager_secret_version.test" datasourceName := "data.aws_secretsmanager_secret_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_security_group_test.go b/aws/data_source_aws_security_group_test.go index d619ccc9fda..de85fa38882 100644 --- a/aws/data_source_aws_security_group_test.go +++ b/aws/data_source_aws_security_group_test.go @@ -13,7 +13,7 @@ import ( func TestAccDataSourceAwsSecurityGroup_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_security_groups_test.go b/aws/data_source_aws_security_groups_test.go index 25adf5f34db..627aabcf556 100644 --- a/aws/data_source_aws_security_groups_test.go +++ b/aws/data_source_aws_security_groups_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsSecurityGroups_tag(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -27,7 +27,7 @@ func TestAccDataSourceAwsSecurityGroups_tag(t *testing.T) { func TestAccDataSourceAwsSecurityGroups_filter(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_sns_test.go b/aws/data_source_aws_sns_test.go index 39d4e7f8e12..60c09a853dc 100644 --- a/aws/data_source_aws_sns_test.go +++ b/aws/data_source_aws_sns_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsSnsTopic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_sqs_queue_test.go b/aws/data_source_aws_sqs_queue_test.go index 01aa4bcf953..70008181981 100644 --- a/aws/data_source_aws_sqs_queue_test.go +++ b/aws/data_source_aws_sqs_queue_test.go @@ -14,7 +14,7 @@ func TestAccDataSourceAwsSqsQueue(t *testing.T) { resourceName := "aws_sqs_queue.test" datasourceName := "data.aws_sqs_queue.by_name" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_ssm_parameter_test.go b/aws/data_source_aws_ssm_parameter_test.go index 5d77b3844d2..3d6ba4edb04 100644 --- a/aws/data_source_aws_ssm_parameter_test.go +++ b/aws/data_source_aws_ssm_parameter_test.go @@ -12,7 +12,7 @@ func TestAccAWSSsmParameterDataSource_basic(t *testing.T) { resourceName := "data.aws_ssm_parameter.test" name := "test.parameter" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -48,7 +48,7 @@ func TestAccAWSSsmParameterDataSource_fullPath(t *testing.T) { resourceName := "data.aws_ssm_parameter.test" name := "/path/parameter" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/data_source_aws_storagegateway_local_disk_test.go b/aws/data_source_aws_storagegateway_local_disk_test.go index d2cb7f806f2..38dff768a8f 100644 --- a/aws/data_source_aws_storagegateway_local_disk_test.go +++ b/aws/data_source_aws_storagegateway_local_disk_test.go @@ -14,7 +14,7 @@ func TestAccAWSStorageGatewayLocalDiskDataSource_DiskNode(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") dataSourceName := "data.aws_storagegateway_local_disk.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -37,7 +37,7 @@ func TestAccAWSStorageGatewayLocalDiskDataSource_DiskPath(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") dataSourceName := "data.aws_storagegateway_local_disk.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_subnet_ids_test.go b/aws/data_source_aws_subnet_ids_test.go index 3702c3cf47f..9d022588261 100644 --- a/aws/data_source_aws_subnet_ids_test.go +++ b/aws/data_source_aws_subnet_ids_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsSubnetIDs(t *testing.T) { rInt := acctest.RandIntRange(0, 256) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -33,7 +33,7 @@ func TestAccDataSourceAwsSubnetIDs_filter(t *testing.T) { rInt := acctest.RandIntRange(0, 256) rName := "data.aws_subnet_ids.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, diff --git a/aws/data_source_aws_subnet_test.go b/aws/data_source_aws_subnet_test.go index e7f6e9be0a0..c8d12335250 100644 --- a/aws/data_source_aws_subnet_test.go +++ b/aws/data_source_aws_subnet_test.go @@ -13,7 +13,7 @@ import ( func TestAccDataSourceAwsSubnet_basic(t *testing.T) { rInt := acctest.RandIntRange(0, 256) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -34,7 +34,7 @@ func TestAccDataSourceAwsSubnet_basic(t *testing.T) { func TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter(t *testing.T) { rInt := acctest.RandIntRange(0, 256) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -56,7 +56,7 @@ func TestAccDataSourceAwsSubnet_ipv6ByIpv6Filter(t *testing.T) { func TestAccDataSourceAwsSubnet_ipv6ByIpv6CidrBlock(t *testing.T) { rInt := acctest.RandIntRange(0, 256) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_vpc_dhcp_options_test.go b/aws/data_source_aws_vpc_dhcp_options_test.go index f6838a355af..5fd7cea9de2 100644 --- a/aws/data_source_aws_vpc_dhcp_options_test.go +++ b/aws/data_source_aws_vpc_dhcp_options_test.go @@ -13,7 +13,7 @@ func TestAccDataSourceAwsVpcDhcpOptions_basic(t *testing.T) { resourceName := "aws_vpc_dhcp_options.test" datasourceName := "data.aws_vpc_dhcp_options.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -47,7 +47,7 @@ func TestAccDataSourceAwsVpcDhcpOptions_Filter(t *testing.T) { resourceName := "aws_vpc_dhcp_options.test" datasourceName := "data.aws_vpc_dhcp_options.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_vpc_endpoint_service_test.go b/aws/data_source_aws_vpc_endpoint_service_test.go index 842afe501c6..8a5af21e563 100644 --- a/aws/data_source_aws_vpc_endpoint_service_test.go +++ b/aws/data_source_aws_vpc_endpoint_service_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccDataSourceAwsVpcEndpointService_gateway(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -48,7 +48,7 @@ func TestAccDataSourceAwsVpcEndpointService_gateway(t *testing.T) { } func TestAccDataSourceAwsVpcEndpointService_interface(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -88,7 +88,7 @@ func TestAccDataSourceAwsVpcEndpointService_interface(t *testing.T) { func TestAccDataSourceAwsVpcEndpointService_custom(t *testing.T) { lbName := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_vpc_endpoint_test.go b/aws/data_source_aws_vpc_endpoint_test.go index 1dd2d7ac4e5..9925ef29765 100644 --- a/aws/data_source_aws_vpc_endpoint_test.go +++ b/aws/data_source_aws_vpc_endpoint_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsVpcEndpoint_gatewayBasic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -32,7 +32,7 @@ func TestAccDataSourceAwsVpcEndpoint_gatewayBasic(t *testing.T) { } func TestAccDataSourceAwsVpcEndpoint_byId(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -47,7 +47,7 @@ func TestAccDataSourceAwsVpcEndpoint_byId(t *testing.T) { } func TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTable(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -66,7 +66,7 @@ func TestAccDataSourceAwsVpcEndpoint_gatewayWithRouteTable(t *testing.T) { } func TestAccDataSourceAwsVpcEndpoint_interface(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_vpc_peering_connection_test.go b/aws/data_source_aws_vpc_peering_connection_test.go index fec136a1ecf..867ca87889b 100644 --- a/aws/data_source_aws_vpc_peering_connection_test.go +++ b/aws/data_source_aws_vpc_peering_connection_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccDataSourceAwsVpcPeeringConnection_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_vpc_test.go b/aws/data_source_aws_vpc_test.go index 106e6bd3082..83fb76b8dbd 100644 --- a/aws/data_source_aws_vpc_test.go +++ b/aws/data_source_aws_vpc_test.go @@ -15,7 +15,7 @@ func TestAccDataSourceAwsVpc_basic(t *testing.T) { rInt := rand.Intn(16) cidr := fmt.Sprintf("172.%d.0.0/16", rInt) tag := fmt.Sprintf("terraform-testacc-vpc-data-source-basic-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -43,7 +43,7 @@ func TestAccDataSourceAwsVpc_ipv6Associated(t *testing.T) { rInt := rand.Intn(16) cidr := fmt.Sprintf("172.%d.0.0/16", rInt) tag := fmt.Sprintf("terraform-testacc-vpc-data-source-ipv6-associated-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -65,7 +65,7 @@ func TestAccDataSourceAwsVpc_multipleCidr(t *testing.T) { rInt := rand.Intn(16) rName := "data.aws_vpc.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, diff --git a/aws/data_source_aws_vpcs_test.go b/aws/data_source_aws_vpcs_test.go index 06ddfd808b8..6cd0fce4a4d 100644 --- a/aws/data_source_aws_vpcs_test.go +++ b/aws/data_source_aws_vpcs_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccDataSourceAwsVpcs_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -26,7 +26,7 @@ func TestAccDataSourceAwsVpcs_basic(t *testing.T) { func TestAccDataSourceAwsVpcs_tags(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -43,7 +43,7 @@ func TestAccDataSourceAwsVpcs_tags(t *testing.T) { func TestAccDataSourceAwsVpcs_filters(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_vpn_gateway_test.go b/aws/data_source_aws_vpn_gateway_test.go index 37846c8cc41..3591b2dbdbd 100644 --- a/aws/data_source_aws_vpn_gateway_test.go +++ b/aws/data_source_aws_vpn_gateway_test.go @@ -12,7 +12,7 @@ import ( func TestAccDataSourceAwsVpnGateway_unattached(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -41,7 +41,7 @@ func TestAccDataSourceAwsVpnGateway_unattached(t *testing.T) { func TestAccDataSourceAwsVpnGateway_attached(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/data_source_aws_workspaces_bundle_test.go b/aws/data_source_aws_workspaces_bundle_test.go index e4e8b7d1156..95ac48dd1a7 100644 --- a/aws/data_source_aws_workspaces_bundle_test.go +++ b/aws/data_source_aws_workspaces_bundle_test.go @@ -10,7 +10,7 @@ import ( func TestAccDataSourceAwsWorkspaceBundle_basic(t *testing.T) { dataSourceName := "data.aws_workspaces_bundle.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/import_aws_route_table_test.go b/aws/import_aws_route_table_test.go index b70f91c8ddf..05f326fc2aa 100644 --- a/aws/import_aws_route_table_test.go +++ b/aws/import_aws_route_table_test.go @@ -18,7 +18,7 @@ func TestAccAWSRouteTable_importBasic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableDestroy, @@ -46,7 +46,7 @@ func TestAccAWSRouteTable_complex(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableDestroy, diff --git a/aws/resource_aws_acm_certificate_test.go b/aws/resource_aws_acm_certificate_test.go index 631938689f6..89214144020 100644 --- a/aws/resource_aws_acm_certificate_test.go +++ b/aws/resource_aws_acm_certificate_test.go @@ -38,7 +38,7 @@ func TestAccAWSAcmCertificate_emailValidation(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -71,7 +71,7 @@ func TestAccAWSAcmCertificate_dnsValidation(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -103,7 +103,7 @@ func TestAccAWSAcmCertificate_dnsValidation(t *testing.T) { func TestAccAWSAcmCertificate_root(t *testing.T) { rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -136,7 +136,7 @@ func TestAccAWSAcmCertificate_rootAndWildcardSan(t *testing.T) { rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) wildcardDomain := fmt.Sprintf("*.%s", rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -178,7 +178,7 @@ func TestAccAWSAcmCertificate_san_single(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) sanDomain := fmt.Sprintf("tf-acc-%d-san.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -221,7 +221,7 @@ func TestAccAWSAcmCertificate_san_multiple(t *testing.T) { sanDomain1 := fmt.Sprintf("tf-acc-%d-san1.%s", rInt1, rootDomain) sanDomain2 := fmt.Sprintf("tf-acc-%d-san2.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -264,7 +264,7 @@ func TestAccAWSAcmCertificate_wildcard(t *testing.T) { rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) wildcardDomain := fmt.Sprintf("*.%s", rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -297,7 +297,7 @@ func TestAccAWSAcmCertificate_wildcardAndRootSan(t *testing.T) { rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) wildcardDomain := fmt.Sprintf("*.%s", rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -338,7 +338,7 @@ func TestAccAWSAcmCertificate_tags(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, diff --git a/aws/resource_aws_acm_certificate_validation_test.go b/aws/resource_aws_acm_certificate_validation_test.go index 9857443ae39..07dcadbebc4 100644 --- a/aws/resource_aws_acm_certificate_validation_test.go +++ b/aws/resource_aws_acm_certificate_validation_test.go @@ -18,7 +18,7 @@ func TestAccAWSAcmCertificateValidation_basic(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -41,7 +41,7 @@ func TestAccAWSAcmCertificateValidation_timeout(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -61,7 +61,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdns(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -90,7 +90,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdns(t *testing.T) { func TestAccAWSAcmCertificateValidation_validationRecordFqdnsRoot(t *testing.T) { rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -109,7 +109,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsRootAndWildcard(t * rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) wildcardDomain := fmt.Sprintf("*.%s", rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -132,7 +132,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsSan(t *testing.T) { domain := fmt.Sprintf("tf-acc-%d.%s", rInt1, rootDomain) sanDomain := fmt.Sprintf("tf-acc-%d-san.%s", rInt1, rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -151,7 +151,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsWildcard(t *testing rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) wildcardDomain := fmt.Sprintf("*.%s", rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, @@ -170,7 +170,7 @@ func TestAccAWSAcmCertificateValidation_validationRecordFqdnsWildcardAndRoot(t * rootDomain := testAccAwsAcmCertificateDomainFromEnv(t) wildcardDomain := fmt.Sprintf("*.%s", rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAcmCertificateDestroy, diff --git a/aws/resource_aws_acmpca_certificate_authority_test.go b/aws/resource_aws_acmpca_certificate_authority_test.go index 8dc93fb7c6b..75759468f1b 100644 --- a/aws/resource_aws_acmpca_certificate_authority_test.go +++ b/aws/resource_aws_acmpca_certificate_authority_test.go @@ -63,7 +63,7 @@ func TestAccAwsAcmpcaCertificateAuthority_Basic(t *testing.T) { var certificateAuthority acmpca.CertificateAuthority resourceName := "aws_acmpca_certificate_authority.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, @@ -109,7 +109,7 @@ func TestAccAwsAcmpcaCertificateAuthority_Enabled(t *testing.T) { // error updating ACMPCA Certificate Authority: InvalidStateException: The certificate authority must be in the Active or DISABLED state to be updated t.Skip("We need to fully sign the certificate authority CSR from another CA in order to test this functionality, which requires another resource") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, @@ -144,7 +144,7 @@ func TestAccAwsAcmpcaCertificateAuthority_RevocationConfiguration_CrlConfigurati rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_acmpca_certificate_authority.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, @@ -226,7 +226,7 @@ func TestAccAwsAcmpcaCertificateAuthority_RevocationConfiguration_CrlConfigurati rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_acmpca_certificate_authority.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, @@ -292,7 +292,7 @@ func TestAccAwsAcmpcaCertificateAuthority_RevocationConfiguration_CrlConfigurati rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_acmpca_certificate_authority.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, @@ -346,7 +346,7 @@ func TestAccAwsAcmpcaCertificateAuthority_Tags(t *testing.T) { var certificateAuthority acmpca.CertificateAuthority resourceName := "aws_acmpca_certificate_authority.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAcmpcaCertificateAuthorityDestroy, diff --git a/aws/resource_aws_alb_target_group_test.go b/aws/resource_aws_alb_target_group_test.go index 99a073c41f0..60fc45fc968 100644 --- a/aws/resource_aws_alb_target_group_test.go +++ b/aws/resource_aws_alb_target_group_test.go @@ -48,7 +48,7 @@ func TestAccAWSALBTargetGroup_basic(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -90,7 +90,7 @@ func TestAccAWSALBTargetGroup_basic(t *testing.T) { func TestAccAWSALBTargetGroup_namePrefix(t *testing.T) { var conf elbv2.TargetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -110,7 +110,7 @@ func TestAccAWSALBTargetGroup_namePrefix(t *testing.T) { func TestAccAWSALBTargetGroup_generatedName(t *testing.T) { var conf elbv2.TargetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -131,7 +131,7 @@ func TestAccAWSALBTargetGroup_changeNameForceNew(t *testing.T) { targetGroupNameBefore := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) targetGroupNameAfter := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(4, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -159,7 +159,7 @@ func TestAccAWSALBTargetGroup_changeProtocolForceNew(t *testing.T) { var before, after elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -187,7 +187,7 @@ func TestAccAWSALBTargetGroup_changePortForceNew(t *testing.T) { var before, after elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -215,7 +215,7 @@ func TestAccAWSALBTargetGroup_changeVpcForceNew(t *testing.T) { var before, after elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -241,7 +241,7 @@ func TestAccAWSALBTargetGroup_tags(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -272,7 +272,7 @@ func TestAccAWSALBTargetGroup_updateHealthCheck(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -334,7 +334,7 @@ func TestAccAWSALBTargetGroup_updateSticknessEnabled(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -419,7 +419,7 @@ func TestAccAWSALBTargetGroup_setAndUpdateSlowStart(t *testing.T) { var before, after elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, diff --git a/aws/resource_aws_ami_copy_test.go b/aws/resource_aws_ami_copy_test.go index 71e3958a37f..7e16ba66d9d 100644 --- a/aws/resource_aws_ami_copy_test.go +++ b/aws/resource_aws_ami_copy_test.go @@ -15,7 +15,7 @@ func TestAccAWSAMICopy_basic(t *testing.T) { var image ec2.Image resourceName := "aws_ami_copy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAMICopyDestroy, @@ -36,7 +36,7 @@ func TestAccAWSAMICopy_EnaSupport(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_ami_copy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAMICopyDestroy, diff --git a/aws/resource_aws_ami_from_instance_test.go b/aws/resource_aws_ami_from_instance_test.go index e130a6cbc5a..acbdfa509ae 100644 --- a/aws/resource_aws_ami_from_instance_test.go +++ b/aws/resource_aws_ami_from_instance_test.go @@ -19,7 +19,7 @@ func TestAccAWSAMIFromInstance(t *testing.T) { snapshots := []string{} rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_ami_launch_permission_test.go b/aws/resource_aws_ami_launch_permission_test.go index 691c3724368..94b49f4e631 100644 --- a/aws/resource_aws_ami_launch_permission_test.go +++ b/aws/resource_aws_ami_launch_permission_test.go @@ -7,7 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - r "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) @@ -15,7 +15,7 @@ func TestAccAWSAMILaunchPermission_Basic(t *testing.T) { imageID := "" accountID := os.Getenv("AWS_ACCOUNT_ID") - r.Test(t, r.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) if os.Getenv("AWS_ACCOUNT_ID") == "" { @@ -23,11 +23,11 @@ func TestAccAWSAMILaunchPermission_Basic(t *testing.T) { } }, Providers: testAccProviders, - Steps: []r.TestStep{ + Steps: []resource.TestStep{ // Scaffold everything { Config: testAccAWSAMILaunchPermissionConfig(accountID, true), - Check: r.ComposeTestCheckFunc( + Check: resource.ComposeTestCheckFunc( testCheckResourceGetAttr("aws_ami_copy.test", "id", &imageID), testAccAWSAMILaunchPermissionExists(accountID, &imageID), ), @@ -35,14 +35,14 @@ func TestAccAWSAMILaunchPermission_Basic(t *testing.T) { // Drop just launch permission to test destruction { Config: testAccAWSAMILaunchPermissionConfig(accountID, false), - Check: r.ComposeTestCheckFunc( + Check: resource.ComposeTestCheckFunc( testAccAWSAMILaunchPermissionDestroyed(accountID, &imageID), ), }, // Re-add everything so we can test when AMI disappears { Config: testAccAWSAMILaunchPermissionConfig(accountID, true), - Check: r.ComposeTestCheckFunc( + Check: resource.ComposeTestCheckFunc( testCheckResourceGetAttr("aws_ami_copy.test", "id", &imageID), testAccAWSAMILaunchPermissionExists(accountID, &imageID), ), @@ -51,7 +51,7 @@ func TestAccAWSAMILaunchPermission_Basic(t *testing.T) { // should not error. { Config: testAccAWSAMILaunchPermissionConfig(accountID, true), - Check: r.ComposeTestCheckFunc( + Check: resource.ComposeTestCheckFunc( testAccAWSAMIDisappears(&imageID), ), ExpectNonEmptyPlan: true, @@ -60,7 +60,7 @@ func TestAccAWSAMILaunchPermission_Basic(t *testing.T) { }) } -func testCheckResourceGetAttr(name, key string, value *string) r.TestCheckFunc { +func testCheckResourceGetAttr(name, key string, value *string) resource.TestCheckFunc { return func(s *terraform.State) error { ms := s.RootModule() rs, ok := ms.Resources[name] @@ -78,7 +78,7 @@ func testCheckResourceGetAttr(name, key string, value *string) r.TestCheckFunc { } } -func testAccAWSAMILaunchPermissionExists(accountID string, imageID *string) r.TestCheckFunc { +func testAccAWSAMILaunchPermissionExists(accountID string, imageID *string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn if has, err := hasLaunchPermission(conn, *imageID, accountID); err != nil { @@ -90,7 +90,7 @@ func testAccAWSAMILaunchPermissionExists(accountID string, imageID *string) r.Te } } -func testAccAWSAMILaunchPermissionDestroyed(accountID string, imageID *string) r.TestCheckFunc { +func testAccAWSAMILaunchPermissionDestroyed(accountID string, imageID *string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn if has, err := hasLaunchPermission(conn, *imageID, accountID); err != nil { @@ -105,7 +105,7 @@ func testAccAWSAMILaunchPermissionDestroyed(accountID string, imageID *string) r // testAccAWSAMIDisappears is technically a "test check function" but really it // exists to perform a side effect of deleting an AMI out from under a resource // so we can test that Terraform will react properly -func testAccAWSAMIDisappears(imageID *string) r.TestCheckFunc { +func testAccAWSAMIDisappears(imageID *string) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).ec2conn req := &ec2.DeregisterImageInput{ diff --git a/aws/resource_aws_ami_test.go b/aws/resource_aws_ami_test.go index 619473ebf4c..ef16a7f8d04 100644 --- a/aws/resource_aws_ami_test.go +++ b/aws/resource_aws_ami_test.go @@ -20,7 +20,7 @@ func TestAccAWSAMI_basic(t *testing.T) { resourceName := "aws_ami.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAmiDestroy, @@ -57,7 +57,7 @@ func TestAccAWSAMI_snapshotSize(t *testing.T) { VolumeType: aws.String("standard"), } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAmiDestroy, diff --git a/aws/resource_aws_api_gateway_account_test.go b/aws/resource_aws_api_gateway_account_test.go index cd1147643f7..948603179c6 100644 --- a/aws/resource_aws_api_gateway_account_test.go +++ b/aws/resource_aws_api_gateway_account_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayAccount_importBasic(t *testing.T) { resourceName := "aws_api_gateway_account.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayAccountDestroy, @@ -42,7 +42,7 @@ func TestAccAWSAPIGatewayAccount_basic(t *testing.T) { expectedRoleArn_first := regexp.MustCompile(":role/" + firstName + "$") expectedRoleArn_second := regexp.MustCompile(":role/" + secondName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayAccountDestroy, diff --git a/aws/resource_aws_api_gateway_api_key_test.go b/aws/resource_aws_api_gateway_api_key_test.go index 535ae2af588..29a534e5826 100644 --- a/aws/resource_aws_api_gateway_api_key_test.go +++ b/aws/resource_aws_api_gateway_api_key_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSAPIGatewayApiKey_importBasic(t *testing.T) { resourceName := "aws_api_gateway_api_key.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayApiKeyDestroy, @@ -36,7 +36,7 @@ func TestAccAWSAPIGatewayApiKey_importBasic(t *testing.T) { func TestAccAWSAPIGatewayApiKey_basic(t *testing.T) { var conf apigateway.ApiKey - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayApiKeyDestroy, diff --git a/aws/resource_aws_api_gateway_authorizer_test.go b/aws/resource_aws_api_gateway_authorizer_test.go index 2c311018b62..42835dcdfe6 100644 --- a/aws/resource_aws_api_gateway_authorizer_test.go +++ b/aws/resource_aws_api_gateway_authorizer_test.go @@ -24,7 +24,7 @@ func TestAccAWSAPIGatewayAuthorizer_basic(t *testing.T) { "arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:" + lambdaName + "/invocations") expectedCreds := regexp.MustCompile("arn:aws:iam::[0-9]{12}:role/" + apiGatewayName + "_auth_invocation_role") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayAuthorizerDestroy, @@ -79,7 +79,7 @@ func TestAccAWSAPIGatewayAuthorizer_cognito(t *testing.T) { authorizerName := "tf-acctest-igw-authorizer-" + rString cognitoName := "tf-acctest-cognito-user-pool-" + rString - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayAuthorizerDestroy, @@ -113,7 +113,7 @@ func TestAccAWSAPIGatewayAuthorizer_switchAuthType(t *testing.T) { "arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:" + lambdaName + "/invocations") expectedCreds := regexp.MustCompile("arn:aws:iam::[0-9]{12}:role/" + apiGatewayName + "_auth_invocation_role") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayAuthorizerDestroy, @@ -155,7 +155,7 @@ func TestAccAWSAPIGatewayAuthorizer_authTypeValidation(t *testing.T) { cognitoName := "tf-acctest-cognito-user-pool-" + rString lambdaName := "tf-acctest-igw-auth-lambda-" + rString - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayAuthorizerDestroy, diff --git a/aws/resource_aws_api_gateway_base_path_mapping_test.go b/aws/resource_aws_api_gateway_base_path_mapping_test.go index 849ead6c61d..ca58efb35ae 100644 --- a/aws/resource_aws_api_gateway_base_path_mapping_test.go +++ b/aws/resource_aws_api_gateway_base_path_mapping_test.go @@ -70,7 +70,7 @@ func TestAccAWSAPIGatewayBasePathMapping_basic(t *testing.T) { // Our test cert is for a wildcard on this domain name := fmt.Sprintf("tf-acc-%s.terraformtest.com", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSAPIGatewayBasePathDestroy(name), @@ -97,7 +97,7 @@ func TestAccAWSAPIGatewayBasePathMapping_BasePath_Empty(t *testing.T) { // Our test cert is for a wildcard on this domain name := fmt.Sprintf("tf-acc-%s.terraformtest.com", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSAPIGatewayBasePathDestroy(name), diff --git a/aws/resource_aws_api_gateway_client_certificate_test.go b/aws/resource_aws_api_gateway_client_certificate_test.go index 94b0003b85b..4f75de94531 100644 --- a/aws/resource_aws_api_gateway_client_certificate_test.go +++ b/aws/resource_aws_api_gateway_client_certificate_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayClientCertificate_basic(t *testing.T) { var conf apigateway.ClientCertificate - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayClientCertificateDestroy, @@ -40,7 +40,7 @@ func TestAccAWSAPIGatewayClientCertificate_basic(t *testing.T) { func TestAccAWSAPIGatewayClientCertificate_importBasic(t *testing.T) { resourceName := "aws_api_gateway_client_certificate.cow" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayClientCertificateDestroy, diff --git a/aws/resource_aws_api_gateway_deployment_test.go b/aws/resource_aws_api_gateway_deployment_test.go index 466482122d6..183f19706cd 100644 --- a/aws/resource_aws_api_gateway_deployment_test.go +++ b/aws/resource_aws_api_gateway_deployment_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayDeployment_basic(t *testing.T) { var conf apigateway.Deployment - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDeploymentDestroy, @@ -41,7 +41,7 @@ func TestAccAWSAPIGatewayDeployment_createBeforeDestoryUpdate(t *testing.T) { var conf apigateway.Deployment var stage apigateway.Stage - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDeploymentDestroy, diff --git a/aws/resource_aws_api_gateway_documentation_part_test.go b/aws/resource_aws_api_gateway_documentation_part_test.go index 9aa530b5a1f..fb1cf8543b3 100644 --- a/aws/resource_aws_api_gateway_documentation_part_test.go +++ b/aws/resource_aws_api_gateway_documentation_part_test.go @@ -22,7 +22,7 @@ func TestAccAWSAPIGatewayDocumentationPart_basic(t *testing.T) { resourceName := "aws_api_gateway_documentation_part.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationPartDestroy, @@ -61,7 +61,7 @@ func TestAccAWSAPIGatewayDocumentationPart_method(t *testing.T) { resourceName := "aws_api_gateway_documentation_part.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationPartDestroy, @@ -104,7 +104,7 @@ func TestAccAWSAPIGatewayDocumentationPart_responseHeader(t *testing.T) { resourceName := "aws_api_gateway_documentation_part.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationPartDestroy, @@ -150,7 +150,7 @@ func TestAccAWSAPIGatewayDocumentationPart_importBasic(t *testing.T) { resourceName := "aws_api_gateway_documentation_part.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationPartDestroy, diff --git a/aws/resource_aws_api_gateway_documentation_version_test.go b/aws/resource_aws_api_gateway_documentation_version_test.go index 352b89f0b52..b856e19d9b0 100644 --- a/aws/resource_aws_api_gateway_documentation_version_test.go +++ b/aws/resource_aws_api_gateway_documentation_version_test.go @@ -20,7 +20,7 @@ func TestAccAWSAPIGatewayDocumentationVersion_basic(t *testing.T) { resourceName := "aws_api_gateway_documentation_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationVersionDestroy, @@ -49,7 +49,7 @@ func TestAccAWSAPIGatewayDocumentationVersion_allFields(t *testing.T) { resourceName := "aws_api_gateway_documentation_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationVersionDestroy, @@ -83,7 +83,7 @@ func TestAccAWSAPIGatewayDocumentationVersion_importBasic(t *testing.T) { resourceName := "aws_api_gateway_documentation_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationVersionDestroy, @@ -109,7 +109,7 @@ func TestAccAWSAPIGatewayDocumentationVersion_importAllFields(t *testing.T) { resourceName := "aws_api_gateway_documentation_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayDocumentationVersionDestroy, diff --git a/aws/resource_aws_api_gateway_domain_name_test.go b/aws/resource_aws_api_gateway_domain_name_test.go index 7adde92bf3c..92bf731b5e3 100644 --- a/aws/resource_aws_api_gateway_domain_name_test.go +++ b/aws/resource_aws_api_gateway_domain_name_test.go @@ -33,7 +33,7 @@ func TestAccAWSAPIGatewayDomainName_CertificateArn(t *testing.T) { resourceName := "aws_api_gateway_domain_name.test" rName := fmt.Sprintf("tf-acc-%s.terraformtest.com", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSAPIGatewayDomainNameDestroy, @@ -61,7 +61,7 @@ func TestAccAWSAPIGatewayDomainName_CertificateName(t *testing.T) { certRe := regexp.MustCompile("^-----BEGIN CERTIFICATE-----\n") keyRe := regexp.MustCompile("^-----BEGIN RSA PRIVATE KEY-----\n") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSAPIGatewayDomainNameDestroy, @@ -119,7 +119,7 @@ func TestAccAWSAPIGatewayDomainName_RegionalCertificateArn(t *testing.T) { resourceName := "aws_api_gateway_domain_name.test" rName := fmt.Sprintf("tf-acc-%s.terraformtest.com", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSAPIGatewayDomainNameDestroy, @@ -159,7 +159,7 @@ func TestAccAWSAPIGatewayDomainName_RegionalCertificateName(t *testing.T) { certRe := regexp.MustCompile("^-----BEGIN CERTIFICATE-----\n") keyRe := regexp.MustCompile("^-----BEGIN RSA PRIVATE KEY-----\n") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSAPIGatewayDomainNameDestroy, diff --git a/aws/resource_aws_api_gateway_gateway_response_test.go b/aws/resource_aws_api_gateway_gateway_response_test.go index 6cb99ae7552..6d19dbfaeb0 100644 --- a/aws/resource_aws_api_gateway_gateway_response_test.go +++ b/aws/resource_aws_api_gateway_gateway_response_test.go @@ -17,7 +17,7 @@ func TestAccAWSAPIGatewayGatewayResponse_basic(t *testing.T) { rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayGatewayResponseDestroy, diff --git a/aws/resource_aws_api_gateway_integration_response_test.go b/aws/resource_aws_api_gateway_integration_response_test.go index 3dd2f3dcd58..5756787a1ab 100644 --- a/aws/resource_aws_api_gateway_integration_response_test.go +++ b/aws/resource_aws_api_gateway_integration_response_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayIntegrationResponse_basic(t *testing.T) { var conf apigateway.IntegrationResponse - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayIntegrationResponseDestroy, diff --git a/aws/resource_aws_api_gateway_integration_test.go b/aws/resource_aws_api_gateway_integration_test.go index 0fa217f08d6..a919d4c0ff7 100644 --- a/aws/resource_aws_api_gateway_integration_test.go +++ b/aws/resource_aws_api_gateway_integration_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSAPIGatewayIntegration_basic(t *testing.T) { var conf apigateway.Integration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayIntegrationDestroy, @@ -128,7 +128,7 @@ func TestAccAWSAPIGatewayIntegration_basic(t *testing.T) { func TestAccAWSAPIGatewayIntegration_contentHandling(t *testing.T) { var conf apigateway.Integration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayIntegrationDestroy, @@ -202,7 +202,7 @@ func TestAccAWSAPIGatewayIntegration_contentHandling(t *testing.T) { func TestAccAWSAPIGatewayIntegration_cache_key_parameters(t *testing.T) { var conf apigateway.Integration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayIntegrationDestroy, @@ -244,7 +244,7 @@ func TestAccAWSAPIGatewayIntegration_integrationType(t *testing.T) { rName := fmt.Sprintf("tf-acctest-apigw-int-%s", acctest.RandString(7)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayIntegrationDestroy, diff --git a/aws/resource_aws_api_gateway_method_response_test.go b/aws/resource_aws_api_gateway_method_response_test.go index 9df60fd8a70..43f982b424b 100644 --- a/aws/resource_aws_api_gateway_method_response_test.go +++ b/aws/resource_aws_api_gateway_method_response_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayMethodResponse_basic(t *testing.T) { var conf apigateway.MethodResponse - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayMethodResponseDestroy, diff --git a/aws/resource_aws_api_gateway_method_settings_test.go b/aws/resource_aws_api_gateway_method_settings_test.go index 9372a6748cc..30633ff2b11 100644 --- a/aws/resource_aws_api_gateway_method_settings_test.go +++ b/aws/resource_aws_api_gateway_method_settings_test.go @@ -16,7 +16,7 @@ func TestAccAWSAPIGatewayMethodSettings_basic(t *testing.T) { var stage apigateway.Stage rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayMethodSettingsDestroy, diff --git a/aws/resource_aws_api_gateway_method_test.go b/aws/resource_aws_api_gateway_method_test.go index 67af7e5061d..e699d387348 100644 --- a/aws/resource_aws_api_gateway_method_test.go +++ b/aws/resource_aws_api_gateway_method_test.go @@ -17,7 +17,7 @@ func TestAccAWSAPIGatewayMethod_basic(t *testing.T) { var conf apigateway.Method rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayMethodDestroy, @@ -57,7 +57,7 @@ func TestAccAWSAPIGatewayMethod_customauthorizer(t *testing.T) { var conf apigateway.Method rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayMethodDestroy, @@ -103,7 +103,7 @@ func TestAccAWSAPIGatewayMethod_cognitoauthorizer(t *testing.T) { var conf apigateway.Method rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayMethodDestroy, @@ -155,7 +155,7 @@ func TestAccAWSAPIGatewayMethod_customrequestvalidator(t *testing.T) { var conf apigateway.Method rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayMethodDestroy, diff --git a/aws/resource_aws_api_gateway_model_test.go b/aws/resource_aws_api_gateway_model_test.go index 132573779c2..7481f1f327e 100644 --- a/aws/resource_aws_api_gateway_model_test.go +++ b/aws/resource_aws_api_gateway_model_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayModel_basic(t *testing.T) { var conf apigateway.Model - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayModelDestroy, diff --git a/aws/resource_aws_api_gateway_request_validator_test.go b/aws/resource_aws_api_gateway_request_validator_test.go index da78e70ef18..087fd89bc12 100644 --- a/aws/resource_aws_api_gateway_request_validator_test.go +++ b/aws/resource_aws_api_gateway_request_validator_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayRequestValidator_basic(t *testing.T) { var conf apigateway.UpdateRequestValidatorOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayRequestValidatorDestroy, diff --git a/aws/resource_aws_api_gateway_resource_test.go b/aws/resource_aws_api_gateway_resource_test.go index 501a77c585c..e0b08427b33 100644 --- a/aws/resource_aws_api_gateway_resource_test.go +++ b/aws/resource_aws_api_gateway_resource_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAPIGatewayResource_basic(t *testing.T) { var conf apigateway.Resource - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayResourceDestroy, @@ -43,7 +43,7 @@ func TestAccAWSAPIGatewayResource_basic(t *testing.T) { func TestAccAWSAPIGatewayResource_update(t *testing.T) { var conf apigateway.Resource - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayResourceDestroy, diff --git a/aws/resource_aws_api_gateway_rest_api_test.go b/aws/resource_aws_api_gateway_rest_api_test.go index 7162062ca65..e169a3b4023 100644 --- a/aws/resource_aws_api_gateway_rest_api_test.go +++ b/aws/resource_aws_api_gateway_rest_api_test.go @@ -85,7 +85,7 @@ func testSweepAPIGatewayRestApis(region string) error { func TestAccAWSAPIGatewayRestApi_basic(t *testing.T) { var conf apigateway.RestApi - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, @@ -145,7 +145,7 @@ func TestAccAWSAPIGatewayRestApi_EndpointConfiguration(t *testing.T) { var restApi apigateway.RestApi rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, @@ -219,7 +219,7 @@ func TestAccAWSAPIGatewayRestApi_EndpointConfiguration_Private(t *testing.T) { var restApi apigateway.RestApi rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, @@ -270,7 +270,7 @@ func TestAccAWSAPIGatewayRestApi_EndpointConfiguration_Private(t *testing.T) { func TestAccAWSAPIGatewayRestApi_api_key_source(t *testing.T) { expectedAPIKeySource := "HEADER" expectedUpdateAPIKeySource := "AUTHORIZER" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, @@ -305,7 +305,7 @@ func TestAccAWSAPIGatewayRestApi_api_key_source(t *testing.T) { func TestAccAWSAPIGatewayRestApi_policy(t *testing.T) { expectedPolicyText := `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"*"},"Action":"execute-api:Invoke","Resource":"*","Condition":{"IpAddress":{"aws:SourceIp":"123.123.123.123/32"}}}]}` expectedUpdatePolicyText := `{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Principal":{"AWS":"*"},"Action":"execute-api:Invoke","Resource":"*"}]}` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, @@ -340,7 +340,7 @@ func TestAccAWSAPIGatewayRestApi_policy(t *testing.T) { func TestAccAWSAPIGatewayRestApi_openapi(t *testing.T) { var conf apigateway.RestApi - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayRestAPIDestroy, diff --git a/aws/resource_aws_api_gateway_stage_test.go b/aws/resource_aws_api_gateway_stage_test.go index dc9dfd72bbb..bdc520d14a7 100644 --- a/aws/resource_aws_api_gateway_stage_test.go +++ b/aws/resource_aws_api_gateway_stage_test.go @@ -17,7 +17,7 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) { var conf apigateway.Stage rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayStageDestroy, @@ -77,7 +77,7 @@ func TestAccAWSAPIGatewayStage_accessLogSettings(t *testing.T) { xml := ` $context.identity.sourceIp $context.identity.caller $context.identity.user $context.requestTime $context.httpMethod $context.resourcePath $context.status $context.protocol $context.responseLength ` csv := `$context.identity.sourceIp,$context.identity.caller,$context.identity.user,$context.requestTime,$context.httpMethod,$context.resourcePath,$context.protocol,$context.status,$context.responseLength,$context.requestId` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayStageDestroy, diff --git a/aws/resource_aws_api_gateway_usage_plan_key_test.go b/aws/resource_aws_api_gateway_usage_plan_key_test.go index 608a88fd2a4..740ad8ed011 100644 --- a/aws/resource_aws_api_gateway_usage_plan_key_test.go +++ b/aws/resource_aws_api_gateway_usage_plan_key_test.go @@ -18,7 +18,7 @@ func TestAccAWSAPIGatewayUsagePlanKey_basic(t *testing.T) { name := acctest.RandString(10) updatedName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanKeyDestroy, diff --git a/aws/resource_aws_api_gateway_usage_plan_test.go b/aws/resource_aws_api_gateway_usage_plan_test.go index 35f6250cc10..91f851a7123 100644 --- a/aws/resource_aws_api_gateway_usage_plan_test.go +++ b/aws/resource_aws_api_gateway_usage_plan_test.go @@ -16,7 +16,7 @@ func TestAccAWSAPIGatewayUsagePlan_importBasic(t *testing.T) { resourceName := "aws_api_gateway_usage_plan.main" rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, @@ -39,7 +39,7 @@ func TestAccAWSAPIGatewayUsagePlan_basic(t *testing.T) { name := acctest.RandString(10) updatedName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, @@ -75,7 +75,7 @@ func TestAccAWSAPIGatewayUsagePlan_description(t *testing.T) { var conf apigateway.UsagePlan name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, @@ -122,7 +122,7 @@ func TestAccAWSAPIGatewayUsagePlan_productCode(t *testing.T) { var conf apigateway.UsagePlan name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, @@ -169,7 +169,7 @@ func TestAccAWSAPIGatewayUsagePlan_throttling(t *testing.T) { var conf apigateway.UsagePlan name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, @@ -217,7 +217,7 @@ func TestAccAWSAPIGatewayUsagePlan_throttlingInitialRateLimit(t *testing.T) { var conf apigateway.UsagePlan name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, @@ -237,7 +237,7 @@ func TestAccAWSAPIGatewayUsagePlan_quota(t *testing.T) { var conf apigateway.UsagePlan name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, @@ -286,7 +286,7 @@ func TestAccAWSAPIGatewayUsagePlan_apiStages(t *testing.T) { var conf apigateway.UsagePlan name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayUsagePlanDestroy, diff --git a/aws/resource_aws_api_gateway_vpc_link_test.go b/aws/resource_aws_api_gateway_vpc_link_test.go index 43947837cda..fddfa65824a 100644 --- a/aws/resource_aws_api_gateway_vpc_link_test.go +++ b/aws/resource_aws_api_gateway_vpc_link_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSAPIGatewayVpcLink_basic(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAPIGatewayVpcLinkDestroy, @@ -44,7 +44,7 @@ func TestAccAWSAPIGatewayVpcLink_importBasic(t *testing.T) { rName := acctest.RandString(5) resourceName := "aws_api_gateway_vpc_link.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_app_cookie_stickiness_policy_test.go b/aws/resource_aws_app_cookie_stickiness_policy_test.go index cee8d772299..ef07e1574a6 100644 --- a/aws/resource_aws_app_cookie_stickiness_policy_test.go +++ b/aws/resource_aws_app_cookie_stickiness_policy_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSAppCookieStickinessPolicy_basic(t *testing.T) { lbName := fmt.Sprintf("tf-test-lb-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAppCookieStickinessPolicyDestroy, @@ -57,7 +57,7 @@ func TestAccAWSAppCookieStickinessPolicy_missingLB(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAppCookieStickinessPolicyDestroy, @@ -159,7 +159,7 @@ func TestAccAWSAppCookieStickinessPolicy_drift(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAppCookieStickinessPolicyDestroy, diff --git a/aws/resource_aws_appautoscaling_policy_test.go b/aws/resource_aws_appautoscaling_policy_test.go index dcd6f71678c..2b6f77f1c5a 100644 --- a/aws/resource_aws_appautoscaling_policy_test.go +++ b/aws/resource_aws_appautoscaling_policy_test.go @@ -17,7 +17,7 @@ func TestAccAWSAppautoScalingPolicy_basic(t *testing.T) { randClusterName := fmt.Sprintf("cluster%s", acctest.RandString(10)) randPolicyName := fmt.Sprintf("terraform-test-foobar-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, @@ -48,7 +48,7 @@ func TestAccAWSAppautoScalingPolicy_nestedSchema(t *testing.T) { randClusterName := fmt.Sprintf("cluster%s", acctest.RandString(10)) randPolicyName := fmt.Sprintf("terraform-test-foobar-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, @@ -80,7 +80,7 @@ func TestAccAWSAppautoScalingPolicy_scaleOutAndIn(t *testing.T) { randClusterName := fmt.Sprintf("cluster%s", acctest.RandString(10)) randPolicyNamePrefix := fmt.Sprintf("terraform-test-foobar-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, @@ -135,7 +135,7 @@ func TestAccAWSAppautoScalingPolicy_spotFleetRequest(t *testing.T) { randPolicyName := fmt.Sprintf("test-appautoscaling-policy-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, @@ -160,7 +160,7 @@ func TestAccAWSAppautoScalingPolicy_dynamoDb(t *testing.T) { randPolicyName := fmt.Sprintf("test-appautoscaling-policy-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, @@ -186,7 +186,7 @@ func TestAccAWSAppautoScalingPolicy_multiplePoliciesSameName(t *testing.T) { tableName2 := fmt.Sprintf("tf-autoscaled-table-%s", acctest.RandString(5)) namePrefix := fmt.Sprintf("tf-appautoscaling-policy-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, @@ -218,7 +218,7 @@ func TestAccAWSAppautoScalingPolicy_multiplePoliciesSameResource(t *testing.T) { tableName := fmt.Sprintf("tf-autoscaled-table-%s", acctest.RandString(5)) namePrefix := fmt.Sprintf("tf-appautoscaling-policy-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingPolicyDestroy, diff --git a/aws/resource_aws_appautoscaling_scheduled_action_test.go b/aws/resource_aws_appautoscaling_scheduled_action_test.go index da4999d4133..0b6fb50c7e4 100644 --- a/aws/resource_aws_appautoscaling_scheduled_action_test.go +++ b/aws/resource_aws_appautoscaling_scheduled_action_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAppautoscalingScheduledAction_dynamo(t *testing.T) { ts := time.Now().AddDate(0, 0, 1).Format("2006-01-02T15:04:05") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppautoscalingScheduledActionDestroy, @@ -31,7 +31,7 @@ func TestAccAWSAppautoscalingScheduledAction_dynamo(t *testing.T) { func TestAccAWSAppautoscalingScheduledAction_ECS(t *testing.T) { ts := time.Now().AddDate(0, 0, 1).Format("2006-01-02T15:04:05") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppautoscalingScheduledActionDestroy, @@ -48,7 +48,7 @@ func TestAccAWSAppautoscalingScheduledAction_ECS(t *testing.T) { func TestAccAWSAppautoscalingScheduledAction_EMR(t *testing.T) { ts := time.Now().AddDate(0, 0, 1).Format("2006-01-02T15:04:05") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppautoscalingScheduledActionDestroy, @@ -65,7 +65,7 @@ func TestAccAWSAppautoscalingScheduledAction_EMR(t *testing.T) { func TestAccAWSAppautoscalingScheduledAction_SpotFleet(t *testing.T) { ts := time.Now().AddDate(0, 0, 1).Format("2006-01-02T15:04:05") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppautoscalingScheduledActionDestroy, diff --git a/aws/resource_aws_appautoscaling_target_test.go b/aws/resource_aws_appautoscaling_target_test.go index a2ac598a54e..162cea210a8 100644 --- a/aws/resource_aws_appautoscaling_target_test.go +++ b/aws/resource_aws_appautoscaling_target_test.go @@ -18,7 +18,7 @@ func TestAccAWSAppautoScalingTarget_basic(t *testing.T) { randClusterName := fmt.Sprintf("cluster-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_appautoscaling_target.bar", Providers: testAccProviders, @@ -50,7 +50,7 @@ func TestAccAWSAppautoScalingTarget_basic(t *testing.T) { func TestAccAWSAppautoScalingTarget_spotFleetRequest(t *testing.T) { var target applicationautoscaling.ScalableTarget - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_appautoscaling_target.test", Providers: testAccProviders, @@ -72,7 +72,7 @@ func TestAccAWSAppautoScalingTarget_emrCluster(t *testing.T) { var target applicationautoscaling.ScalableTarget rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingTargetDestroy, @@ -96,7 +96,7 @@ func TestAccAWSAppautoScalingTarget_multipleTargets(t *testing.T) { rInt := acctest.RandInt() tableName := fmt.Sprintf("tf_acc_test_table_%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingTargetDestroy, @@ -131,7 +131,7 @@ func TestAccAWSAppautoScalingTarget_optionalRoleArn(t *testing.T) { r, _ := regexp.Compile("arn:aws:iam::.*:role/aws-service-role/dynamodb.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_DynamoDBTable") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAppautoscalingTargetDestroy, diff --git a/aws/resource_aws_appsync_api_key_test.go b/aws/resource_aws_appsync_api_key_test.go index 716a1dee711..7f918751268 100644 --- a/aws/resource_aws_appsync_api_key_test.go +++ b/aws/resource_aws_appsync_api_key_test.go @@ -19,7 +19,7 @@ func TestAccAWSAppsyncApiKey_basic(t *testing.T) { resourceName := "aws_appsync_api_key.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, @@ -47,7 +47,7 @@ func TestAccAWSAppsyncApiKey_Description(t *testing.T) { resourceName := "aws_appsync_api_key.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, @@ -82,7 +82,7 @@ func TestAccAWSAppsyncApiKey_Expires(t *testing.T) { resourceName := "aws_appsync_api_key.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncApiKeyDestroy, diff --git a/aws/resource_aws_appsync_datasource_test.go b/aws/resource_aws_appsync_datasource_test.go index e109f13586d..55b32188a1b 100644 --- a/aws/resource_aws_appsync_datasource_test.go +++ b/aws/resource_aws_appsync_datasource_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAwsAppsyncDatasource_ddb(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, @@ -29,7 +29,7 @@ func TestAccAwsAppsyncDatasource_ddb(t *testing.T) { } func TestAccAwsAppsyncDatasource_es(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, @@ -47,7 +47,7 @@ func TestAccAwsAppsyncDatasource_es(t *testing.T) { func TestAccAwsAppsyncDatasource_lambda(t *testing.T) { Desc := "appsync datasource" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, @@ -65,7 +65,7 @@ func TestAccAwsAppsyncDatasource_lambda(t *testing.T) { func TestAccAwsAppsyncDatasource_update(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, @@ -94,7 +94,7 @@ func TestAccAwsAppsyncDatasource_update(t *testing.T) { func TestAccAwsAppsyncDatasource_updateDescription(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, diff --git a/aws/resource_aws_appsync_graphql_api_test.go b/aws/resource_aws_appsync_graphql_api_test.go index 161aae14520..16d147bfb81 100644 --- a/aws/resource_aws_appsync_graphql_api_test.go +++ b/aws/resource_aws_appsync_graphql_api_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSAppsyncGraphqlApi_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, @@ -29,7 +29,7 @@ func TestAccAWSAppsyncGraphqlApi_basic(t *testing.T) { } func TestAccAWSAppsyncGraphqlApi_iam(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, @@ -46,7 +46,7 @@ func TestAccAWSAppsyncGraphqlApi_iam(t *testing.T) { } func TestAccAWSAppsyncGraphqlApi_cognito(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, @@ -65,7 +65,7 @@ func TestAccAWSAppsyncGraphqlApi_cognito(t *testing.T) { func TestAccAWSAppsyncGraphqlApi_import(t *testing.T) { resourceName := "aws_appsync_graphql_api.test_apikey" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, diff --git a/aws/resource_aws_athena_database_test.go b/aws/resource_aws_athena_database_test.go index 6c353814b14..f5ec357646d 100644 --- a/aws/resource_aws_athena_database_test.go +++ b/aws/resource_aws_athena_database_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSAthenaDatabase_basic(t *testing.T) { rInt := acctest.RandInt() dbName := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, @@ -34,7 +34,7 @@ func TestAccAWSAthenaDatabase_basic(t *testing.T) { func TestAccAWSAthenaDatabase_encryption(t *testing.T) { rInt := acctest.RandInt() dbName := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, @@ -53,7 +53,7 @@ func TestAccAWSAthenaDatabase_encryption(t *testing.T) { func TestAccAWSAthenaDatabase_nameStartsWithUnderscore(t *testing.T) { rInt := acctest.RandInt() dbName := "_" + acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, @@ -72,7 +72,7 @@ func TestAccAWSAthenaDatabase_nameStartsWithUnderscore(t *testing.T) { func TestAccAWSAthenaDatabase_nameCantHaveUppercase(t *testing.T) { rInt := acctest.RandInt() dbName := "A" + acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, @@ -88,7 +88,7 @@ func TestAccAWSAthenaDatabase_nameCantHaveUppercase(t *testing.T) { func TestAccAWSAthenaDatabase_destroyFailsIfTablesExist(t *testing.T) { rInt := acctest.RandInt() dbName := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, @@ -109,7 +109,7 @@ func TestAccAWSAthenaDatabase_destroyFailsIfTablesExist(t *testing.T) { func TestAccAWSAthenaDatabase_forceDestroyAlwaysSucceeds(t *testing.T) { rInt := acctest.RandInt() dbName := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaDatabaseDestroy, diff --git a/aws/resource_aws_athena_named_query_test.go b/aws/resource_aws_athena_named_query_test.go index 33180c5cc34..7aa7646bea5 100644 --- a/aws/resource_aws_athena_named_query_test.go +++ b/aws/resource_aws_athena_named_query_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSAthenaNamedQuery_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaNamedQueryDestroy, @@ -30,7 +30,7 @@ func TestAccAWSAthenaNamedQuery_basic(t *testing.T) { func TestAccAWSAthenaNamedQuery_import(t *testing.T) { resourceName := "aws_athena_named_query.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAthenaNamedQueryDestroy, diff --git a/aws/resource_aws_autoscaling_attachment_test.go b/aws/resource_aws_autoscaling_attachment_test.go index dde109216e5..c7a9df4fe58 100644 --- a/aws/resource_aws_autoscaling_attachment_test.go +++ b/aws/resource_aws_autoscaling_attachment_test.go @@ -15,7 +15,7 @@ func TestAccAWSAutoscalingAttachment_elb(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -57,7 +57,7 @@ func TestAccAWSAutoscalingAttachment_albTargetGroup(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_autoscaling_group_test.go b/aws/resource_aws_autoscaling_group_test.go index c8fa2653016..2c77db3648b 100644 --- a/aws/resource_aws_autoscaling_group_test.go +++ b/aws/resource_aws_autoscaling_group_test.go @@ -95,7 +95,7 @@ func TestAccAWSAutoScalingGroup_importBasic(t *testing.T) { resourceName := "aws_autoscaling_group.bar" randName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -121,7 +121,7 @@ func TestAccAWSAutoScalingGroup_basic(t *testing.T) { randName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_autoscaling_group.bar", IDRefreshIgnore: []string{"force_delete", "metrics_granularity", "wait_for_capacity_timeout"}, @@ -194,7 +194,7 @@ func TestAccAWSAutoScalingGroup_basic(t *testing.T) { func TestAccAWSAutoScalingGroup_namePrefix(t *testing.T) { nameRegexp := regexp.MustCompile("^tf-test-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -215,7 +215,7 @@ func TestAccAWSAutoScalingGroup_namePrefix(t *testing.T) { func TestAccAWSAutoScalingGroup_autoGeneratedName(t *testing.T) { asgNameRegexp := regexp.MustCompile("^tf-asg-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -234,7 +234,7 @@ func TestAccAWSAutoScalingGroup_autoGeneratedName(t *testing.T) { } func TestAccAWSAutoScalingGroup_terminationPolicies(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -283,7 +283,7 @@ func TestAccAWSAutoScalingGroup_tags(t *testing.T) { randName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -333,7 +333,7 @@ func TestAccAWSAutoScalingGroup_tags(t *testing.T) { func TestAccAWSAutoScalingGroup_VpcUpdates(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -371,7 +371,7 @@ func TestAccAWSAutoScalingGroup_VpcUpdates(t *testing.T) { func TestAccAWSAutoScalingGroup_WithLoadBalancer(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -391,7 +391,7 @@ func TestAccAWSAutoScalingGroup_withPlacementGroup(t *testing.T) { var group autoscaling.Group randName := fmt.Sprintf("tf-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -412,7 +412,7 @@ func TestAccAWSAutoScalingGroup_enablingMetrics(t *testing.T) { var group autoscaling.Group randName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -442,7 +442,7 @@ func TestAccAWSAutoScalingGroup_suspendingProcesses(t *testing.T) { var group autoscaling.Group randName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -478,7 +478,7 @@ func TestAccAWSAutoScalingGroup_suspendingProcesses(t *testing.T) { func TestAccAWSAutoScalingGroup_withMetrics(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -507,7 +507,7 @@ func TestAccAWSAutoScalingGroup_withMetrics(t *testing.T) { func TestAccAWSAutoScalingGroup_serviceLinkedRoleARN(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -551,7 +551,7 @@ func TestAccAWSAutoScalingGroup_ALB_TargetGroups(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -597,7 +597,7 @@ func TestAccAWSAutoScalingGroup_initialLifecycleHook(t *testing.T) { randName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_autoscaling_group.bar", IDRefreshIgnore: []string{"force_delete", "metrics_granularity", "wait_for_capacity_timeout"}, @@ -629,7 +629,7 @@ func TestAccAWSAutoScalingGroup_ALB_TargetGroups_ELBCapacity(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -891,7 +891,7 @@ func testAccCheckAWSALBTargetGroupHealthy(res *elbv2.TargetGroup) resource.TestC func TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_autoscaling_group.test", Providers: testAccProviders, @@ -911,7 +911,7 @@ func TestAccAWSAutoScalingGroup_classicVpcZoneIdentifier(t *testing.T) { func TestAccAWSAutoScalingGroup_emptyAvailabilityZones(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_autoscaling_group.test", Providers: testAccProviders, @@ -931,7 +931,7 @@ func TestAccAWSAutoScalingGroup_emptyAvailabilityZones(t *testing.T) { func TestAccAWSAutoScalingGroup_launchTemplate(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -951,7 +951,7 @@ func TestAccAWSAutoScalingGroup_launchTemplate(t *testing.T) { func TestAccAWSAutoScalingGroup_launchTemplate_update(t *testing.T) { var group autoscaling.Group - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, @@ -1017,7 +1017,7 @@ func TestAccAWSAutoScalingGroup_LaunchTemplate_IAMInstanceProfile(t *testing.T) resourceName := "aws_autoscaling_group.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, diff --git a/aws/resource_aws_autoscaling_lifecycle_hook_test.go b/aws/resource_aws_autoscaling_lifecycle_hook_test.go index 580c2ed55f3..30eedf0151f 100644 --- a/aws/resource_aws_autoscaling_lifecycle_hook_test.go +++ b/aws/resource_aws_autoscaling_lifecycle_hook_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSAutoscalingLifecycleHook_basic(t *testing.T) { resourceName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingLifecycleHookDestroy, @@ -36,7 +36,7 @@ func TestAccAWSAutoscalingLifecycleHook_basic(t *testing.T) { func TestAccAWSAutoscalingLifecycleHook_omitDefaultResult(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingLifecycleHookDestroy, diff --git a/aws/resource_aws_autoscaling_notification_test.go b/aws/resource_aws_autoscaling_notification_test.go index 385d40d373a..ff059eaa65c 100644 --- a/aws/resource_aws_autoscaling_notification_test.go +++ b/aws/resource_aws_autoscaling_notification_test.go @@ -17,7 +17,7 @@ func TestAccAWSASGNotification_basic(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckASGNDestroy, @@ -38,7 +38,7 @@ func TestAccAWSASGNotification_update(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckASGNDestroy, @@ -65,7 +65,7 @@ func TestAccAWSASGNotification_update(t *testing.T) { func TestAccAWSASGNotification_Pagination(t *testing.T) { var asgn autoscaling.DescribeNotificationConfigurationsOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckASGNDestroy, diff --git a/aws/resource_aws_autoscaling_policy_test.go b/aws/resource_aws_autoscaling_policy_test.go index 6333cf96a54..60229d9b3bc 100644 --- a/aws/resource_aws_autoscaling_policy_test.go +++ b/aws/resource_aws_autoscaling_policy_test.go @@ -20,7 +20,7 @@ func TestAccAWSAutoscalingPolicy_basic(t *testing.T) { name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, @@ -82,7 +82,7 @@ func TestAccAWSAutoscalingPolicy_disappears(t *testing.T) { name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, @@ -142,7 +142,7 @@ func TestAccAWSAutoscalingPolicy_upgrade(t *testing.T) { name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, @@ -173,7 +173,7 @@ func TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment(t *testing.T) { name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, @@ -195,7 +195,7 @@ func TestAccAWSAutoscalingPolicy_TargetTrack_Predefined(t *testing.T) { name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, @@ -215,7 +215,7 @@ func TestAccAWSAutoscalingPolicy_TargetTrack_Custom(t *testing.T) { name := fmt.Sprintf("terraform-testacc-asp-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, @@ -234,7 +234,7 @@ func TestAccAWSAutoscalingPolicy_zerovalue(t *testing.T) { var simplepolicy autoscaling.ScalingPolicy var steppolicy autoscaling.ScalingPolicy - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingPolicyDestroy, diff --git a/aws/resource_aws_autoscaling_schedule_test.go b/aws/resource_aws_autoscaling_schedule_test.go index c84b526480e..c84a1d8090a 100644 --- a/aws/resource_aws_autoscaling_schedule_test.go +++ b/aws/resource_aws_autoscaling_schedule_test.go @@ -18,7 +18,7 @@ func TestAccAWSAutoscalingSchedule_basic(t *testing.T) { start := testAccAWSAutoscalingScheduleValidStart(t) end := testAccAWSAutoscalingScheduleValidEnd(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingScheduleDestroy, @@ -39,7 +39,7 @@ func TestAccAWSAutoscalingSchedule_disappears(t *testing.T) { start := testAccAWSAutoscalingScheduleValidStart(t) end := testAccAWSAutoscalingScheduleValidEnd(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingScheduleDestroy, @@ -74,7 +74,7 @@ func TestAccAWSAutoscalingSchedule_recurrence(t *testing.T) { var schedule autoscaling.ScheduledUpdateGroupAction rName := fmt.Sprintf("tf-test-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingScheduleDestroy, @@ -97,7 +97,7 @@ func TestAccAWSAutoscalingSchedule_zeroValues(t *testing.T) { start := testAccAWSAutoscalingScheduleValidStart(t) end := testAccAWSAutoscalingScheduleValidEnd(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingScheduleDestroy, @@ -119,7 +119,7 @@ func TestAccAWSAutoscalingSchedule_negativeOne(t *testing.T) { start := testAccAWSAutoscalingScheduleValidStart(t) end := testAccAWSAutoscalingScheduleValidEnd(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAutoscalingScheduleDestroy, diff --git a/aws/resource_aws_batch_compute_environment_test.go b/aws/resource_aws_batch_compute_environment_test.go index b4bcb54fe56..9fa10c61cd6 100644 --- a/aws/resource_aws_batch_compute_environment_test.go +++ b/aws/resource_aws_batch_compute_environment_test.go @@ -78,7 +78,7 @@ func testSweepBatchComputeEnvironments(region string) error { func TestAccAWSBatchComputeEnvironment_createEc2(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -96,7 +96,7 @@ func TestAccAWSBatchComputeEnvironment_createEc2(t *testing.T) { func TestAccAWSBatchComputeEnvironment_createEc2WithTags(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -116,7 +116,7 @@ func TestAccAWSBatchComputeEnvironment_createEc2WithTags(t *testing.T) { func TestAccAWSBatchComputeEnvironment_createSpot(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -134,7 +134,7 @@ func TestAccAWSBatchComputeEnvironment_createSpot(t *testing.T) { func TestAccAWSBatchComputeEnvironment_createUnmanaged(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -152,7 +152,7 @@ func TestAccAWSBatchComputeEnvironment_createUnmanaged(t *testing.T) { func TestAccAWSBatchComputeEnvironment_updateMaxvCpus(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -178,7 +178,7 @@ func TestAccAWSBatchComputeEnvironment_updateMaxvCpus(t *testing.T) { func TestAccAWSBatchComputeEnvironment_updateInstanceType(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -206,7 +206,7 @@ func TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName(t *testing.T expectedName := fmt.Sprintf("tf_acc_test_%d", rInt) expectedUpdatedName := fmt.Sprintf("tf_acc_test_updated_%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -232,7 +232,7 @@ func TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName(t *testing.T func TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -248,7 +248,7 @@ func TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources(t *testi func TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -267,7 +267,7 @@ func TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources(t *te func TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, @@ -283,7 +283,7 @@ func TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage(t *testing func TestAccAWSBatchComputeEnvironment_updateState(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchComputeEnvironmentDestroy, diff --git a/aws/resource_aws_batch_job_definition_test.go b/aws/resource_aws_batch_job_definition_test.go index 293bc6fb813..6f03de72a94 100644 --- a/aws/resource_aws_batch_job_definition_test.go +++ b/aws/resource_aws_batch_job_definition_test.go @@ -51,7 +51,7 @@ func TestAccAWSBatchJobDefinition_basic(t *testing.T) { } ri := acctest.RandInt() config := fmt.Sprintf(testAccBatchJobDefinitionBaseConfig, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchJobDefinitionDestroy, @@ -73,7 +73,7 @@ func TestAccAWSBatchJobDefinition_updateForcesNewResource(t *testing.T) { ri := acctest.RandInt() config := fmt.Sprintf(testAccBatchJobDefinitionBaseConfig, ri) updateConfig := fmt.Sprintf(testAccBatchJobDefinitionUpdateConfig, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchJobDefinitionDestroy, diff --git a/aws/resource_aws_batch_job_queue_test.go b/aws/resource_aws_batch_job_queue_test.go index c114bfacfbc..f9b82201f78 100644 --- a/aws/resource_aws_batch_job_queue_test.go +++ b/aws/resource_aws_batch_job_queue_test.go @@ -76,7 +76,7 @@ func TestAccAWSBatchJobQueue_basic(t *testing.T) { var jq batch.JobQueueDetail ri := acctest.RandInt() config := fmt.Sprintf(testAccBatchJobQueueBasic, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchJobQueueDestroy, @@ -97,7 +97,7 @@ func TestAccAWSBatchJobQueue_disappears(t *testing.T) { resourceName := "aws_batch_job_queue.test_queue" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -119,7 +119,7 @@ func TestAccAWSBatchJobQueue_update(t *testing.T) { ri := acctest.RandInt() config := fmt.Sprintf(testAccBatchJobQueueBasic, ri) updateConfig := fmt.Sprintf(testAccBatchJobQueueUpdate, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBatchJobQueueDestroy, diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index 11c9a2b8a28..afc8d17c536 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -23,7 +23,7 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { accountID := "012345678910" configBasicUpdate := testAccAWSBudgetsBudgetConfigUpdate(name) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccAWSBudgetsBudgetDestroy, @@ -69,7 +69,7 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { configBasicDefaults := testAccAWSBudgetsBudgetConfigDefaults(name) configBasicUpdate := testAccAWSBudgetsBudgetConfigUpdate(name) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccAWSBudgetsBudgetDestroy, diff --git a/aws/resource_aws_cloud9_environment_ec2_test.go b/aws/resource_aws_cloud9_environment_ec2_test.go index 1792a071d7d..aacfbb1b1f8 100644 --- a/aws/resource_aws_cloud9_environment_ec2_test.go +++ b/aws/resource_aws_cloud9_environment_ec2_test.go @@ -21,7 +21,7 @@ func TestAccAWSCloud9EnvironmentEc2_basic(t *testing.T) { resourceName := "aws_cloud9_environment_ec2.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloud9EnvironmentEc2Destroy, @@ -62,7 +62,7 @@ func TestAccAWSCloud9EnvironmentEc2_allFields(t *testing.T) { resourceName := "aws_cloud9_environment_ec2.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloud9EnvironmentEc2Destroy, @@ -99,7 +99,7 @@ func TestAccAWSCloud9EnvironmentEc2_importBasic(t *testing.T) { resourceName := "aws_cloud9_environment_ec2.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloud9EnvironmentEc2Destroy, diff --git a/aws/resource_aws_cloudformation_stack_test.go b/aws/resource_aws_cloudformation_stack_test.go index 25a243a40d9..315d2baee0f 100644 --- a/aws/resource_aws_cloudformation_stack_test.go +++ b/aws/resource_aws_cloudformation_stack_test.go @@ -16,7 +16,7 @@ func TestAccAWSCloudFormationStack_importBasic(t *testing.T) { resourceName := "aws_cloudformation_stack.network" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -37,7 +37,7 @@ func TestAccAWSCloudFormationStack_basic(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-basic-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -56,7 +56,7 @@ func TestAccAWSCloudFormationStack_yaml(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-yaml-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -75,7 +75,7 @@ func TestAccAWSCloudFormationStack_defaultParams(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-default-params-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -95,7 +95,7 @@ func TestAccAWSCloudFormationStack_allAttributes(t *testing.T) { stackName := fmt.Sprintf("tf-acc-test-all-attributes-%s", acctest.RandString(10)) expectedPolicyBody := "{\"Statement\":[{\"Action\":\"Update:*\",\"Effect\":\"Deny\",\"Principal\":\"*\",\"Resource\":\"LogicalResourceId/StaticVPC\"},{\"Action\":\"Update:*\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Resource\":\"*\"}]}" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -145,7 +145,7 @@ func TestAccAWSCloudFormationStack_withParams(t *testing.T) { var stack cloudformation.Stack stackName := fmt.Sprintf("tf-acc-test-with-params-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -171,7 +171,7 @@ func TestAccAWSCloudFormationStack_withUrl_withParams(t *testing.T) { var stack cloudformation.Stack rName := fmt.Sprintf("tf-acc-test-with-url-and-params-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -196,7 +196,7 @@ func TestAccAWSCloudFormationStack_withUrl_withParams_withYaml(t *testing.T) { var stack cloudformation.Stack rName := fmt.Sprintf("tf-acc-test-with-params-and-yaml-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, @@ -216,7 +216,7 @@ func TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate(t *testing.T) { var stack cloudformation.Stack rName := fmt.Sprintf("tf-acc-test-with-params-no-update-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudFormationDestroy, diff --git a/aws/resource_aws_cloudfront_distribution_test.go b/aws/resource_aws_cloudfront_distribution_test.go index bed749a9fe8..0bbce3033f7 100644 --- a/aws/resource_aws_cloudfront_distribution_test.go +++ b/aws/resource_aws_cloudfront_distribution_test.go @@ -83,7 +83,7 @@ func TestAccAWSCloudFrontDistribution_importBasic(t *testing.T) { resourceName := "aws_cloudfront_distribution.s3_distribution" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -108,7 +108,7 @@ func TestAccAWSCloudFrontDistribution_importBasic(t *testing.T) { func TestAccAWSCloudFrontDistribution_S3Origin(t *testing.T) { ri := acctest.RandInt() testConfig := fmt.Sprintf(testAccAWSCloudFrontDistributionS3Config, ri, originBucket, logBucket, testAccAWSCloudFrontDistributionRetainConfig()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -135,7 +135,7 @@ func TestAccAWSCloudFrontDistribution_S3OriginWithTags(t *testing.T) { preConfig := fmt.Sprintf(testAccAWSCloudFrontDistributionS3ConfigWithTags, ri, originBucket, logBucket, testAccAWSCloudFrontDistributionRetainConfig()) postConfig := fmt.Sprintf(testAccAWSCloudFrontDistributionS3ConfigWithTagsUpdated, ri, originBucket, logBucket, testAccAWSCloudFrontDistributionRetainConfig()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -176,7 +176,7 @@ func TestAccAWSCloudFrontDistribution_S3OriginWithTags(t *testing.T) { // If you are testing manually and can't wait for deletion, set the // TF_TEST_CLOUDFRONT_RETAIN environment variable. func TestAccAWSCloudFrontDistribution_customOrigin(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -200,7 +200,7 @@ func TestAccAWSCloudFrontDistribution_customOrigin(t *testing.T) { // TF_TEST_CLOUDFRONT_RETAIN environment variable. func TestAccAWSCloudFrontDistribution_multiOrigin(t *testing.T) { resourceName := "aws_cloudfront_distribution.multi_origin_distribution" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -226,7 +226,7 @@ func TestAccAWSCloudFrontDistribution_multiOrigin(t *testing.T) { // TF_TEST_CLOUDFRONT_RETAIN environment variable. func TestAccAWSCloudFrontDistribution_orderedCacheBehavior(t *testing.T) { resourceName := "aws_cloudfront_distribution.main" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -252,7 +252,7 @@ func TestAccAWSCloudFrontDistribution_orderedCacheBehavior(t *testing.T) { } func TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -266,7 +266,7 @@ func TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName(t *testing.T) { } func TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -286,7 +286,7 @@ func TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID(t *testing.T) { // TF_TEST_CLOUDFRONT_RETAIN environment variable. func TestAccAWSCloudFrontDistribution_noOptionalItemsConfig(t *testing.T) { resourceName := "aws_cloudfront_distribution.no_optional_items" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -370,7 +370,7 @@ func TestAccAWSCloudFrontDistribution_noOptionalItemsConfig(t *testing.T) { // If you are testing manually and can't wait for deletion, set the // TF_TEST_CLOUDFRONT_RETAIN environment variable. func TestAccAWSCloudFrontDistribution_HTTP11Config(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -388,7 +388,7 @@ func TestAccAWSCloudFrontDistribution_HTTP11Config(t *testing.T) { } func TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, @@ -408,7 +408,7 @@ func TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig(t *testing.T) { } func TestAccAWSCloudFrontDistribution_noCustomErrorResponseConfig(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontDistributionDestroy, diff --git a/aws/resource_aws_cloudfront_origin_access_identity_test.go b/aws/resource_aws_cloudfront_origin_access_identity_test.go index 8e678ed878c..547f61a1877 100644 --- a/aws/resource_aws_cloudfront_origin_access_identity_test.go +++ b/aws/resource_aws_cloudfront_origin_access_identity_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSCloudFrontOriginAccessIdentity_importBasic(t *testing.T) { resourceName := "aws_cloudfront_origin_access_identity.origin_access_identity" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontOriginAccessIdentityDestroy, @@ -33,7 +33,7 @@ func TestAccAWSCloudFrontOriginAccessIdentity_importBasic(t *testing.T) { } func TestAccAWSCloudFrontOriginAccessIdentity_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontOriginAccessIdentityDestroy, @@ -62,7 +62,7 @@ func TestAccAWSCloudFrontOriginAccessIdentity_basic(t *testing.T) { } func TestAccAWSCloudFrontOriginAccessIdentity_noComment(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontOriginAccessIdentityDestroy, diff --git a/aws/resource_aws_cloudfront_public_key_test.go b/aws/resource_aws_cloudfront_public_key_test.go index cf3c38fde84..8dc59aa36c0 100644 --- a/aws/resource_aws_cloudfront_public_key_test.go +++ b/aws/resource_aws_cloudfront_public_key_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSCloudFrontPublicKey_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontPublicKeyDestroy, @@ -38,7 +38,7 @@ func TestAccAWSCloudFrontPublicKey_basic(t *testing.T) { func TestAccAWSCloudFrontPublicKey_namePrefix(t *testing.T) { startsWithPrefix := regexp.MustCompile("^tf-acc-test-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontPublicKeyDestroy, @@ -57,7 +57,7 @@ func TestAccAWSCloudFrontPublicKey_namePrefix(t *testing.T) { func TestAccAWSCloudFrontPublicKey_update(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudFrontPublicKeyDestroy, diff --git a/aws/resource_aws_cloudwatch_dashboard_test.go b/aws/resource_aws_cloudwatch_dashboard_test.go index ffb1fae69de..749d1594eca 100644 --- a/aws/resource_aws_cloudwatch_dashboard_test.go +++ b/aws/resource_aws_cloudwatch_dashboard_test.go @@ -18,7 +18,7 @@ func TestAccAWSCloudWatchDashboard_importBasic(t *testing.T) { resourceName := "aws_cloudwatch_dashboard.foobar" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchDashboardDestroy, @@ -38,7 +38,7 @@ func TestAccAWSCloudWatchDashboard_importBasic(t *testing.T) { func TestAccAWSCloudWatchDashboard_basic(t *testing.T) { var dashboard cloudwatch.GetDashboardOutput rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchDashboardDestroy, @@ -57,7 +57,7 @@ func TestAccAWSCloudWatchDashboard_basic(t *testing.T) { func TestAccAWSCloudWatchDashboard_update(t *testing.T) { var dashboard cloudwatch.GetDashboardOutput rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchDashboardDestroy, diff --git a/aws/resource_aws_cloudwatch_event_permission_test.go b/aws/resource_aws_cloudwatch_event_permission_test.go index a971fb6bddc..ee3dcb9ccb8 100644 --- a/aws/resource_aws_cloudwatch_event_permission_test.go +++ b/aws/resource_aws_cloudwatch_event_permission_test.go @@ -78,7 +78,7 @@ func TestAccAWSCloudWatchEventPermission_Basic(t *testing.T) { statementID := acctest.RandomWithPrefix(t.Name()) resourceName := "aws_cloudwatch_event_permission.test1" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -136,7 +136,7 @@ func TestAccAWSCloudWatchEventPermission_Action(t *testing.T) { statementID := acctest.RandomWithPrefix(t.Name()) resourceName := "aws_cloudwatch_event_permission.test1" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -173,7 +173,7 @@ func TestAccAWSCloudWatchEventPermission_Import(t *testing.T) { statementID := acctest.RandomWithPrefix(t.Name()) resourceName := "aws_cloudwatch_event_permission.test1" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudWatchEventPermissionDestroy, @@ -202,7 +202,7 @@ func TestAccAWSCloudWatchEventPermission_Multiple(t *testing.T) { resourceName1 := "aws_cloudwatch_event_permission.test1" resourceName2 := "aws_cloudwatch_event_permission.test2" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, diff --git a/aws/resource_aws_cloudwatch_event_rule_test.go b/aws/resource_aws_cloudwatch_event_rule_test.go index c403d826423..1c4b061155b 100644 --- a/aws/resource_aws_cloudwatch_event_rule_test.go +++ b/aws/resource_aws_cloudwatch_event_rule_test.go @@ -73,7 +73,7 @@ func testSweepCloudWatchEventRules(region string) error { func TestAccAWSCloudWatchEventRule_importBasic(t *testing.T) { resourceName := "aws_cloudwatch_event_rule.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventRuleDestroy, @@ -95,7 +95,7 @@ func TestAccAWSCloudWatchEventRule_importBasic(t *testing.T) { func TestAccAWSCloudWatchEventRule_basic(t *testing.T) { var rule events.DescribeRuleOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventRuleDestroy, @@ -122,7 +122,7 @@ func TestAccAWSCloudWatchEventRule_prefix(t *testing.T) { var rule events.DescribeRuleOutput startsWithPrefix := regexp.MustCompile("^tf-acc-cw-event-rule-prefix-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventRuleDestroy, @@ -141,7 +141,7 @@ func TestAccAWSCloudWatchEventRule_prefix(t *testing.T) { func TestAccAWSCloudWatchEventRule_full(t *testing.T) { var rule events.DescribeRuleOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventRuleDestroy, @@ -165,7 +165,7 @@ func TestAccAWSCloudWatchEventRule_full(t *testing.T) { func TestAccAWSCloudWatchEventRule_enable(t *testing.T) { var rule events.DescribeRuleOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventRuleDestroy, diff --git a/aws/resource_aws_cloudwatch_event_target_test.go b/aws/resource_aws_cloudwatch_event_target_test.go index 8e5267c87de..96955c17d4c 100644 --- a/aws/resource_aws_cloudwatch_event_target_test.go +++ b/aws/resource_aws_cloudwatch_event_target_test.go @@ -21,7 +21,7 @@ func TestAccAWSCloudWatchEventTarget_basic(t *testing.T) { targetID1 := fmt.Sprintf("tf-acc-cw-target-%s", rName1) targetID2 := fmt.Sprintf("tf-acc-cw-target-%s", rName2) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -56,7 +56,7 @@ func TestAccAWSCloudWatchEventTarget_missingTargetId(t *testing.T) { ruleName := fmt.Sprintf("tf-acc-cw-event-rule-missing-target-id-%s", rName) snsTopicName := fmt.Sprintf("tf-acc-%s", rName) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -81,7 +81,7 @@ func TestAccAWSCloudWatchEventTarget_full(t *testing.T) { ssmDocumentName := acctest.RandomWithPrefix("tf_ssm_Document") targetID := fmt.Sprintf("tf-acc-cw-target-full-%s", rName) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -106,7 +106,7 @@ func TestAccAWSCloudWatchEventTarget_ssmDocument(t *testing.T) { var target events.Target rName := acctest.RandomWithPrefix("tf_ssm_Document") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -125,7 +125,7 @@ func TestAccAWSCloudWatchEventTarget_ecs(t *testing.T) { var target events.Target rName := acctest.RandomWithPrefix("tf_ecs_target") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -144,7 +144,7 @@ func TestAccAWSCloudWatchEventTarget_batch(t *testing.T) { var target events.Target rName := acctest.RandomWithPrefix("tf_batch_target") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -163,7 +163,7 @@ func TestAccAWSCloudWatchEventTarget_kinesis(t *testing.T) { var target events.Target rName := acctest.RandomWithPrefix("tf_kinesis_target") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -182,7 +182,7 @@ func TestAccAWSCloudWatchEventTarget_sqs(t *testing.T) { var target events.Target rName := acctest.RandomWithPrefix("tf_sqs_target") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, @@ -201,7 +201,7 @@ func TestAccAWSCloudWatchEventTarget_input_transformer(t *testing.T) { var target events.Target rName := acctest.RandomWithPrefix("tf_input_transformer") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, diff --git a/aws/resource_aws_cloudwatch_log_destination_policy_test.go b/aws/resource_aws_cloudwatch_log_destination_policy_test.go index a2a4cc437b9..0234b659826 100644 --- a/aws/resource_aws_cloudwatch_log_destination_policy_test.go +++ b/aws/resource_aws_cloudwatch_log_destination_policy_test.go @@ -15,7 +15,7 @@ func TestAccAWSCloudwatchLogDestinationPolicy_importBasic(t *testing.T) { rstring := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudwatchLogDestinationPolicyDestroy, @@ -38,7 +38,7 @@ func TestAccAWSCloudwatchLogDestinationPolicy_basic(t *testing.T) { rstring := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudwatchLogDestinationPolicyDestroy, diff --git a/aws/resource_aws_cloudwatch_log_destination_test.go b/aws/resource_aws_cloudwatch_log_destination_test.go index 682dbcc4ad9..32f6eb3be2e 100644 --- a/aws/resource_aws_cloudwatch_log_destination_test.go +++ b/aws/resource_aws_cloudwatch_log_destination_test.go @@ -15,7 +15,7 @@ func TestAccAWSCloudwatchLogDestination_importBasic(t *testing.T) { rstring := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudwatchLogDestinationDestroy, @@ -38,7 +38,7 @@ func TestAccAWSCloudwatchLogDestination_basic(t *testing.T) { rstring := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudwatchLogDestinationDestroy, diff --git a/aws/resource_aws_cloudwatch_log_group_test.go b/aws/resource_aws_cloudwatch_log_group_test.go index ab7914f014d..73f1751f304 100644 --- a/aws/resource_aws_cloudwatch_log_group_test.go +++ b/aws/resource_aws_cloudwatch_log_group_test.go @@ -15,7 +15,7 @@ func TestAccAWSCloudWatchLogGroup_importBasic(t *testing.T) { resourceName := "aws_cloudwatch_log_group.foobar" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -38,7 +38,7 @@ func TestAccAWSCloudWatchLogGroup_basic(t *testing.T) { var lg cloudwatchlogs.LogGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -57,7 +57,7 @@ func TestAccAWSCloudWatchLogGroup_basic(t *testing.T) { func TestAccAWSCloudWatchLogGroup_namePrefix(t *testing.T) { var lg cloudwatchlogs.LogGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -77,7 +77,7 @@ func TestAccAWSCloudWatchLogGroup_namePrefix_retention(t *testing.T) { var lg cloudwatchlogs.LogGroup rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -105,7 +105,7 @@ func TestAccAWSCloudWatchLogGroup_namePrefix_retention(t *testing.T) { func TestAccAWSCloudWatchLogGroup_generatedName(t *testing.T) { var lg cloudwatchlogs.LogGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -124,7 +124,7 @@ func TestAccAWSCloudWatchLogGroup_retentionPolicy(t *testing.T) { var lg cloudwatchlogs.LogGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -151,7 +151,7 @@ func TestAccAWSCloudWatchLogGroup_multiple(t *testing.T) { var lg cloudwatchlogs.LogGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -175,7 +175,7 @@ func TestAccAWSCloudWatchLogGroup_disappears(t *testing.T) { var lg cloudwatchlogs.LogGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -196,7 +196,7 @@ func TestAccAWSCloudWatchLogGroup_tagging(t *testing.T) { var lg cloudwatchlogs.LogGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, @@ -251,7 +251,7 @@ func TestAccAWSCloudWatchLogGroup_kmsKey(t *testing.T) { var lg cloudwatchlogs.LogGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy, diff --git a/aws/resource_aws_cloudwatch_log_metric_filter_test.go b/aws/resource_aws_cloudwatch_log_metric_filter_test.go index 8a955648d81..031eacd453d 100644 --- a/aws/resource_aws_cloudwatch_log_metric_filter_test.go +++ b/aws/resource_aws_cloudwatch_log_metric_filter_test.go @@ -15,7 +15,7 @@ func TestAccAWSCloudWatchLogMetricFilter_basic(t *testing.T) { var mf cloudwatchlogs.MetricFilter rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogMetricFilterDestroy, diff --git a/aws/resource_aws_cloudwatch_log_resource_policy_test.go b/aws/resource_aws_cloudwatch_log_resource_policy_test.go index c5f8bf2aa3d..fa48a720211 100644 --- a/aws/resource_aws_cloudwatch_log_resource_policy_test.go +++ b/aws/resource_aws_cloudwatch_log_resource_policy_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSCloudWatchLogResourcePolicy_Basic(t *testing.T) { name := acctest.RandString(5) var resourcePolicy cloudwatchlogs.ResourcePolicy - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudWatchLogResourcePolicyDestroy, @@ -44,7 +44,7 @@ func TestAccAWSCloudWatchLogResourcePolicy_Import(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudWatchLogResourcePolicyDestroy, diff --git a/aws/resource_aws_cloudwatch_log_stream_test.go b/aws/resource_aws_cloudwatch_log_stream_test.go index 9e39b1cd210..4c2c16c64ba 100644 --- a/aws/resource_aws_cloudwatch_log_stream_test.go +++ b/aws/resource_aws_cloudwatch_log_stream_test.go @@ -15,7 +15,7 @@ func TestAccAWSCloudWatchLogStream_basic(t *testing.T) { var ls cloudwatchlogs.LogStream rName := acctest.RandString(15) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogStreamDestroy, @@ -34,7 +34,7 @@ func TestAccAWSCloudWatchLogStream_disappears(t *testing.T) { var ls cloudwatchlogs.LogStream rName := acctest.RandString(15) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchLogStreamDestroy, diff --git a/aws/resource_aws_cloudwatch_log_subscription_filter_test.go b/aws/resource_aws_cloudwatch_log_subscription_filter_test.go index 68ab207fad9..de346daded3 100644 --- a/aws/resource_aws_cloudwatch_log_subscription_filter_test.go +++ b/aws/resource_aws_cloudwatch_log_subscription_filter_test.go @@ -16,7 +16,7 @@ func TestAccAWSCloudwatchLogSubscriptionFilter_basic(t *testing.T) { rstring := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudwatchLogSubscriptionFilterDestroy, @@ -43,7 +43,7 @@ func TestAccAWSCloudwatchLogSubscriptionFilter_subscriptionFilterDisappears(t *t var filter cloudwatchlogs.SubscriptionFilter rstring := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCloudwatchLogSubscriptionFilterDestroy, diff --git a/aws/resource_aws_cloudwatch_metric_alarm_test.go b/aws/resource_aws_cloudwatch_metric_alarm_test.go index 51526bf0fa8..e366ce401cf 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm_test.go +++ b/aws/resource_aws_cloudwatch_metric_alarm_test.go @@ -16,7 +16,7 @@ func TestAccAWSCloudWatchMetricAlarm_importBasic(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_cloudwatch_metric_alarm.foobar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, @@ -37,7 +37,7 @@ func TestAccAWSCloudWatchMetricAlarm_importBasic(t *testing.T) { func TestAccAWSCloudWatchMetricAlarm_basic(t *testing.T) { var alarm cloudwatch.MetricAlarm rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, @@ -62,7 +62,7 @@ func TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm(t *testing.T) { var alarm cloudwatch.MetricAlarm rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, @@ -82,7 +82,7 @@ func TestAccAWSCloudWatchMetricAlarm_treatMissingData(t *testing.T) { var alarm cloudwatch.MetricAlarm rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, @@ -109,7 +109,7 @@ func TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles(t *testin var alarm cloudwatch.MetricAlarm rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, @@ -136,7 +136,7 @@ func TestAccAWSCloudWatchMetricAlarm_extendedStatistic(t *testing.T) { var alarm cloudwatch.MetricAlarm rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, @@ -154,7 +154,7 @@ func TestAccAWSCloudWatchMetricAlarm_extendedStatistic(t *testing.T) { func TestAccAWSCloudWatchMetricAlarm_missingStatistic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, diff --git a/aws/resource_aws_codebuild_project_test.go b/aws/resource_aws_codebuild_project_test.go index 63f7719e98c..6c2f691a5da 100644 --- a/aws/resource_aws_codebuild_project_test.go +++ b/aws/resource_aws_codebuild_project_test.go @@ -29,7 +29,7 @@ func TestAccAWSCodeBuildProject_importBasic(t *testing.T) { resourceName := "aws_codebuild_project.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -51,7 +51,7 @@ func TestAccAWSCodeBuildProject_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -102,7 +102,7 @@ func TestAccAWSCodeBuildProject_BadgeEnabled(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -124,7 +124,7 @@ func TestAccAWSCodeBuildProject_BuildTimeout(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -152,7 +152,7 @@ func TestAccAWSCodeBuildProject_Cache(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -212,7 +212,7 @@ func TestAccAWSCodeBuildProject_Description(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -240,7 +240,7 @@ func TestAccAWSCodeBuildProject_EncryptionKey(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -261,7 +261,7 @@ func TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type(t *testing. rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -293,7 +293,7 @@ func TestAccAWSCodeBuildProject_Environment_Certificate(t *testing.T) { oName := "certificate.pem" resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -314,7 +314,7 @@ func TestAccAWSCodeBuildProject_Source_Auth(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -341,7 +341,7 @@ func TestAccAWSCodeBuildProject_Source_GitCloneDepth(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -369,7 +369,7 @@ func TestAccAWSCodeBuildProject_Source_InsecureSSL(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -397,7 +397,7 @@ func TestAccAWSCodeBuildProject_Source_ReportBuildStatus(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -425,7 +425,7 @@ func TestAccAWSCodeBuildProject_Source_Type_Bitbucket(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -446,7 +446,7 @@ func TestAccAWSCodeBuildProject_Source_Type_CodeCommit(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -467,7 +467,7 @@ func TestAccAWSCodeBuildProject_Source_Type_CodePipeline(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -488,7 +488,7 @@ func TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -509,7 +509,7 @@ func TestAccAWSCodeBuildProject_Source_Type_S3(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -536,7 +536,7 @@ phases: commands: - rspec hello_world_spec.rb` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -561,7 +561,7 @@ phases: commands: - rspec hello_world_spec.rb` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -583,7 +583,7 @@ func TestAccAWSCodeBuildProject_Tags(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -615,7 +615,7 @@ func TestAccAWSCodeBuildProject_VpcConfig(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -656,7 +656,7 @@ func TestAccAWSCodeBuildProject_WindowsContainer(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -683,7 +683,7 @@ func TestAccAWSCodeBuildProject_Artifacts_EncryptionDisabled(t *testing.T) { bName := acctest.RandomWithPrefix("tf-acc-test-bucket") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -706,7 +706,7 @@ func TestAccAWSCodeBuildProject_SecondaryArtifacts(t *testing.T) { bName := acctest.RandomWithPrefix("tf-acc-test-bucket") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, @@ -729,7 +729,7 @@ func TestAccAWSCodeBuildProject_SecondarySources_CodeCommit(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_project.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildProjectDestroy, diff --git a/aws/resource_aws_codebuild_webhook_test.go b/aws/resource_aws_codebuild_webhook_test.go index 4af84743f01..2d8e6150c28 100644 --- a/aws/resource_aws_codebuild_webhook_test.go +++ b/aws/resource_aws_codebuild_webhook_test.go @@ -17,7 +17,7 @@ func TestAccAWSCodeBuildWebhook_GitHub(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_webhook.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildWebhookDestroy, @@ -48,7 +48,7 @@ func TestAccAWSCodeBuildWebhook_GitHubEnterprise(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_webhook.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildWebhookDestroy, @@ -96,7 +96,7 @@ func TestAccAWSCodeBuildWebhook_BranchFilter(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codebuild_webhook.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeBuildWebhookDestroy, diff --git a/aws/resource_aws_codecommit_repository_test.go b/aws/resource_aws_codecommit_repository_test.go index 577d111a6b4..935797c5ea6 100644 --- a/aws/resource_aws_codecommit_repository_test.go +++ b/aws/resource_aws_codecommit_repository_test.go @@ -16,7 +16,7 @@ func TestAccAWSCodeCommitRepository_importBasic(t *testing.T) { resName := "aws_codecommit_repository.test" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCodeCommitRepositoryDestroy, @@ -35,7 +35,7 @@ func TestAccAWSCodeCommitRepository_importBasic(t *testing.T) { func TestAccAWSCodeCommitRepository_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCodeCommitRepositoryDestroy, @@ -52,7 +52,7 @@ func TestAccAWSCodeCommitRepository_basic(t *testing.T) { func TestAccAWSCodeCommitRepository_withChanges(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCodeCommitRepositoryDestroy, @@ -79,7 +79,7 @@ func TestAccAWSCodeCommitRepository_withChanges(t *testing.T) { func TestAccAWSCodeCommitRepository_create_default_branch(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCodeCommitRepositoryDestroy, @@ -98,7 +98,7 @@ func TestAccAWSCodeCommitRepository_create_default_branch(t *testing.T) { func TestAccAWSCodeCommitRepository_create_and_update_default_branch(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCodeCommitRepositoryDestroy, diff --git a/aws/resource_aws_codecommit_trigger_test.go b/aws/resource_aws_codecommit_trigger_test.go index 3efd1245d18..0c02c75243d 100644 --- a/aws/resource_aws_codecommit_trigger_test.go +++ b/aws/resource_aws_codecommit_trigger_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSCodeCommitTrigger_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCodeCommitTriggerDestroy, diff --git a/aws/resource_aws_codedeploy_app_test.go b/aws/resource_aws_codedeploy_app_test.go index 357a341c05f..d10319f3369 100644 --- a/aws/resource_aws_codedeploy_app_test.go +++ b/aws/resource_aws_codedeploy_app_test.go @@ -17,7 +17,7 @@ func TestAccAWSCodeDeployApp_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codedeploy_app.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployAppDestroy, @@ -52,7 +52,7 @@ func TestAccAWSCodeDeployApp_computePlatform(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codedeploy_app.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployAppDestroy, @@ -87,7 +87,7 @@ func TestAccAWSCodeDeployApp_name(t *testing.T) { rName2 := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_codedeploy_app.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployAppDestroy, diff --git a/aws/resource_aws_codedeploy_deployment_config_test.go b/aws/resource_aws_codedeploy_deployment_config_test.go index 37428ae30e9..2132009d000 100644 --- a/aws/resource_aws_codedeploy_deployment_config_test.go +++ b/aws/resource_aws_codedeploy_deployment_config_test.go @@ -17,7 +17,7 @@ func TestAccAWSCodeDeployDeploymentConfig_basic(t *testing.T) { resourceName := "aws_codedeploy_deployment_config.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentConfigDestroy, @@ -43,7 +43,7 @@ func TestAccAWSCodeDeployDeploymentConfig_fleetPercent(t *testing.T) { resourceName := "aws_codedeploy_deployment_config.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentConfigDestroy, @@ -81,7 +81,7 @@ func TestAccAWSCodeDeployDeploymentConfig_hostCount(t *testing.T) { resourceName := "aws_codedeploy_deployment_config.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentConfigDestroy, diff --git a/aws/resource_aws_codedeploy_deployment_group_test.go b/aws/resource_aws_codedeploy_deployment_group_test.go index 2ecc64b052f..f35bb7be888 100644 --- a/aws/resource_aws_codedeploy_deployment_group_test.go +++ b/aws/resource_aws_codedeploy_deployment_group_test.go @@ -23,7 +23,7 @@ func TestAccAWSCodeDeployDeploymentGroup_basic(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -109,7 +109,7 @@ func TestAccAWSCodeDeployDeploymentGroup_basic_tagSet(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -199,7 +199,7 @@ func TestAccAWSCodeDeployDeploymentGroup_onPremiseTag(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -239,7 +239,7 @@ func TestAccAWSCodeDeployDeploymentGroup_disappears(t *testing.T) { var group codedeploy.DeploymentGroupInfo rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -261,7 +261,7 @@ func TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_basic(t *testing.T rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -308,7 +308,7 @@ func TestAccAWSCodeDeployDeploymentGroup_triggerConfiguration_multiple(t *testin rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -367,7 +367,7 @@ func TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_create(t *tes rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -409,7 +409,7 @@ func TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_update(t *tes rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -459,7 +459,7 @@ func TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_delete(t *tes rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -501,7 +501,7 @@ func TestAccAWSCodeDeployDeploymentGroup_autoRollbackConfiguration_disable(t *te rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -549,7 +549,7 @@ func TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_create(t *testing.T) rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -593,7 +593,7 @@ func TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_update(t *testing.T) rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -647,7 +647,7 @@ func TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_delete(t *testing.T) rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -691,7 +691,7 @@ func TestAccAWSCodeDeployDeploymentGroup_alarmConfiguration_disable(t *testing.T rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -744,7 +744,7 @@ func TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_default(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -776,7 +776,7 @@ func TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_create(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -827,7 +827,7 @@ func TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_update(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -873,7 +873,7 @@ func TestAccAWSCodeDeployDeploymentGroup_deploymentStyle_delete(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -917,7 +917,7 @@ func TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_create(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -957,7 +957,7 @@ func TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_update(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1003,7 +1003,7 @@ func TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_delete(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1043,7 +1043,7 @@ func TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_create rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1084,7 +1084,7 @@ func TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_update rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1128,7 +1128,7 @@ func TestAccAWSCodeDeployDeploymentGroup_loadBalancerInfo_targetGroupInfo_delete rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1168,7 +1168,7 @@ func TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_contro rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1221,7 +1221,7 @@ func TestAccAWSCodeDeployDeploymentGroup_in_place_deployment_with_traffic_contro rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1294,7 +1294,7 @@ func TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_create rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1349,7 +1349,7 @@ func TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1415,7 +1415,7 @@ func TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_update rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1481,7 +1481,7 @@ func TestAccAWSCodeDeployDeploymentGroup_blueGreenDeploymentConfiguration_delete rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, @@ -1536,7 +1536,7 @@ func TestAccAWSCodeDeployDeploymentGroup_blueGreenDeployment_complete(t *testing rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodeDeployDeploymentGroupDestroy, diff --git a/aws/resource_aws_codepipeline_test.go b/aws/resource_aws_codepipeline_test.go index ff3a70abd8d..762637c696a 100644 --- a/aws/resource_aws_codepipeline_test.go +++ b/aws/resource_aws_codepipeline_test.go @@ -20,7 +20,7 @@ func TestAccAWSCodePipeline_Import_basic(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodePipelineDestroy, @@ -45,7 +45,7 @@ func TestAccAWSCodePipeline_basic(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodePipelineDestroy, @@ -81,7 +81,7 @@ func TestAccAWSCodePipeline_emptyArtifacts(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodePipelineDestroy, @@ -115,7 +115,7 @@ func TestAccAWSCodePipeline_deployWithServiceRole(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCodePipelineDestroy, diff --git a/aws/resource_aws_cognito_identity_pool_roles_attachment_test.go b/aws/resource_aws_cognito_identity_pool_roles_attachment_test.go index 8d0a9ba5fee..6a98cb6597e 100644 --- a/aws/resource_aws_cognito_identity_pool_roles_attachment_test.go +++ b/aws/resource_aws_cognito_identity_pool_roles_attachment_test.go @@ -18,7 +18,7 @@ func TestAccAWSCognitoIdentityPoolRolesAttachment_basic(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) updatedName := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolRolesAttachmentDestroy, @@ -46,7 +46,7 @@ func TestAccAWSCognitoIdentityPoolRolesAttachment_basic(t *testing.T) { func TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolRolesAttachmentDestroy, @@ -94,7 +94,7 @@ func TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings(t *testing.T) { func TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolRolesAttachmentDestroy, @@ -110,7 +110,7 @@ func TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleR func TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolRolesAttachmentDestroy, @@ -126,7 +126,7 @@ func TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError func TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolRolesAttachmentDestroy, diff --git a/aws/resource_aws_cognito_identity_pool_test.go b/aws/resource_aws_cognito_identity_pool_test.go index 20b4e2be24a..685c234f9fd 100644 --- a/aws/resource_aws_cognito_identity_pool_test.go +++ b/aws/resource_aws_cognito_identity_pool_test.go @@ -18,7 +18,7 @@ func TestAccAWSCognitoIdentityPool_importBasic(t *testing.T) { resourceName := "aws_cognito_identity_pool.main" rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAPIGatewayAccountDestroy, @@ -40,7 +40,7 @@ func TestAccAWSCognitoIdentityPool_basic(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) updatedName := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolDestroy, @@ -69,7 +69,7 @@ func TestAccAWSCognitoIdentityPool_basic(t *testing.T) { func TestAccAWSCognitoIdentityPool_supportedLoginProviders(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolDestroy, @@ -105,7 +105,7 @@ func TestAccAWSCognitoIdentityPool_supportedLoginProviders(t *testing.T) { func TestAccAWSCognitoIdentityPool_openidConnectProviderArns(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolDestroy, @@ -140,7 +140,7 @@ func TestAccAWSCognitoIdentityPool_openidConnectProviderArns(t *testing.T) { func TestAccAWSCognitoIdentityPool_samlProviderArns(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolDestroy, @@ -176,7 +176,7 @@ func TestAccAWSCognitoIdentityPool_samlProviderArns(t *testing.T) { func TestAccAWSCognitoIdentityPool_cognitoIdentityProviders(t *testing.T) { name := fmt.Sprintf("%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityPoolDestroy, diff --git a/aws/resource_aws_cognito_identity_provider_test.go b/aws/resource_aws_cognito_identity_provider_test.go index bf8170c39b4..84aab1794dc 100644 --- a/aws/resource_aws_cognito_identity_provider_test.go +++ b/aws/resource_aws_cognito_identity_provider_test.go @@ -14,7 +14,7 @@ func TestAccAWSCognitoIdentityProvider_basic(t *testing.T) { var identityProvider cognitoidentityprovider.IdentityProviderType resourceName := "aws_cognito_identity_provider.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoIdentityProviderDestroy, diff --git a/aws/resource_aws_cognito_resource_server_test.go b/aws/resource_aws_cognito_resource_server_test.go index fc70501bb97..83e9b7611ae 100644 --- a/aws/resource_aws_cognito_resource_server_test.go +++ b/aws/resource_aws_cognito_resource_server_test.go @@ -20,7 +20,7 @@ func TestAccAWSCognitoResourceServer_basic(t *testing.T) { poolName := fmt.Sprintf("tf-acc-test-pool-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) resourceName := "aws_cognito_resource_server.main" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoResourceServerDestroy, @@ -61,7 +61,7 @@ func TestAccAWSCognitoResourceServer_scope(t *testing.T) { poolName := fmt.Sprintf("tf-acc-test-pool-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) resourceName := "aws_cognito_resource_server.main" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoResourceServerDestroy, diff --git a/aws/resource_aws_cognito_user_group_test.go b/aws/resource_aws_cognito_user_group_test.go index 6a84c759a29..6b2765cddb2 100644 --- a/aws/resource_aws_cognito_user_group_test.go +++ b/aws/resource_aws_cognito_user_group_test.go @@ -18,7 +18,7 @@ func TestAccAWSCognitoUserGroup_basic(t *testing.T) { groupName := fmt.Sprintf("tf-acc-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) updatedGroupName := fmt.Sprintf("tf-acc-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserGroupDestroy, @@ -46,7 +46,7 @@ func TestAccAWSCognitoUserGroup_complex(t *testing.T) { groupName := fmt.Sprintf("tf-acc-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) updatedGroupName := fmt.Sprintf("tf-acc-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserGroupDestroy, @@ -79,7 +79,7 @@ func TestAccAWSCognitoUserGroup_RoleArn(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc") resourceName := "aws_cognito_user_group.main" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserGroupDestroy, @@ -107,7 +107,7 @@ func TestAccAWSCognitoUserGroup_importBasic(t *testing.T) { poolName := fmt.Sprintf("tf-acc-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) groupName := fmt.Sprintf("tf-acc-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserGroupDestroy, diff --git a/aws/resource_aws_cognito_user_pool_client_test.go b/aws/resource_aws_cognito_user_pool_client_test.go index c501f95bf96..a3fab781ebd 100644 --- a/aws/resource_aws_cognito_user_pool_client_test.go +++ b/aws/resource_aws_cognito_user_pool_client_test.go @@ -17,7 +17,7 @@ func TestAccAWSCognitoUserPoolClient_basic(t *testing.T) { userPoolName := fmt.Sprintf("tf-acc-cognito-user-pool-%s", acctest.RandString(7)) clientName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolClientDestroy, @@ -70,7 +70,7 @@ func TestAccAWSCognitoUserPoolClient_importBasic(t *testing.T) { return fmt.Sprintf("%s/%s", userPoolId, clientId), nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -91,7 +91,7 @@ func TestAccAWSCognitoUserPoolClient_importBasic(t *testing.T) { func TestAccAWSCognitoUserPoolClient_RefreshTokenValidity(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolClientDestroy, @@ -118,7 +118,7 @@ func TestAccAWSCognitoUserPoolClient_allFields(t *testing.T) { userPoolName := fmt.Sprintf("tf-acc-cognito-user-pool-%s", acctest.RandString(7)) clientName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolClientDestroy, @@ -164,7 +164,7 @@ func TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField(t *testing.T) { userPoolName := fmt.Sprintf("tf-acc-cognito-user-pool-%s", acctest.RandString(7)) clientName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolClientDestroy, diff --git a/aws/resource_aws_cognito_user_pool_domain_test.go b/aws/resource_aws_cognito_user_pool_domain_test.go index eef019df2f7..678b782865f 100644 --- a/aws/resource_aws_cognito_user_pool_domain_test.go +++ b/aws/resource_aws_cognito_user_pool_domain_test.go @@ -16,7 +16,7 @@ func TestAccAWSCognitoUserPoolDomain_basic(t *testing.T) { domainName := fmt.Sprintf("tf-acc-test-domain-%d", acctest.RandInt()) poolName := fmt.Sprintf("tf-acc-test-pool-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDomainDestroy, @@ -41,7 +41,7 @@ func TestAccAWSCognitoUserPoolDomain_import(t *testing.T) { domainName := fmt.Sprintf("tf-acc-test-domain-%d", acctest.RandInt()) poolName := fmt.Sprintf("tf-acc-test-pool-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDomainDestroy, diff --git a/aws/resource_aws_cognito_user_pool_test.go b/aws/resource_aws_cognito_user_pool_test.go index 9927f3f7cfc..7245affeb62 100644 --- a/aws/resource_aws_cognito_user_pool_test.go +++ b/aws/resource_aws_cognito_user_pool_test.go @@ -78,7 +78,7 @@ func TestAccAWSCognitoUserPool_importBasic(t *testing.T) { resourceName := "aws_cognito_user_pool.pool" name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchDashboardDestroy, @@ -98,7 +98,7 @@ func TestAccAWSCognitoUserPool_importBasic(t *testing.T) { func TestAccAWSCognitoUserPool_basic(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -123,7 +123,7 @@ func TestAccAWSCognitoUserPool_basic(t *testing.T) { func TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -156,7 +156,7 @@ func TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration(t *testing.T) { func TestAccAWSCognitoUserPool_withDeviceConfiguration(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -187,7 +187,7 @@ func TestAccAWSCognitoUserPool_withEmailVerificationMessage(t *testing.T) { message := fmt.Sprintf("%s {####}", acctest.RandString(10)) upatedMessage := fmt.Sprintf("%s {####}", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -218,7 +218,7 @@ func TestAccAWSCognitoUserPool_withSmsVerificationMessage(t *testing.T) { verificationMessage := fmt.Sprintf("%s {####}", acctest.RandString(10)) upatedVerificationMessage := fmt.Sprintf("%s {####}", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -245,7 +245,7 @@ func TestAccAWSCognitoUserPool_withSmsVerificationMessage(t *testing.T) { func TestAccAWSCognitoUserPool_withEmailConfiguration(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -272,7 +272,7 @@ func TestAccAWSCognitoUserPool_withEmailConfiguration(t *testing.T) { func TestAccAWSCognitoUserPool_withSmsConfiguration(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -293,7 +293,7 @@ func TestAccAWSCognitoUserPool_withSmsConfiguration(t *testing.T) { func TestAccAWSCognitoUserPool_withSmsConfigurationUpdated(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -320,7 +320,7 @@ func TestAccAWSCognitoUserPool_withSmsConfigurationUpdated(t *testing.T) { func TestAccAWSCognitoUserPool_withTags(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -346,7 +346,7 @@ func TestAccAWSCognitoUserPool_withTags(t *testing.T) { func TestAccAWSCognitoUserPool_withAliasAttributes(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -377,7 +377,7 @@ func TestAccAWSCognitoUserPool_withAliasAttributes(t *testing.T) { func TestAccAWSCognitoUserPool_withPasswordPolicy(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -412,7 +412,7 @@ func TestAccAWSCognitoUserPool_withPasswordPolicy(t *testing.T) { func TestAccAWSCognitoUserPool_withLambdaConfig(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -457,7 +457,7 @@ func TestAccAWSCognitoUserPool_withLambdaConfig(t *testing.T) { func TestAccAWSCognitoUserPool_withSchemaAttributes(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -530,7 +530,7 @@ func TestAccAWSCognitoUserPool_withSchemaAttributes(t *testing.T) { func TestAccAWSCognitoUserPool_withVerificationMessageTemplate(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, @@ -564,7 +564,7 @@ func TestAccAWSCognitoUserPool_update(t *testing.T) { authenticationMessage := fmt.Sprintf("%s {####}", acctest.RandString(10)) updatedAuthenticationMessage := fmt.Sprintf("%s {####}", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCognitoUserPoolDestroy, diff --git a/aws/resource_aws_config_aggregate_authorization_test.go b/aws/resource_aws_config_aggregate_authorization_test.go index 703b7345959..2c95b2202fe 100644 --- a/aws/resource_aws_config_aggregate_authorization_test.go +++ b/aws/resource_aws_config_aggregate_authorization_test.go @@ -60,7 +60,7 @@ func testSweepConfigAggregateAuthorizations(region string) error { func TestAccAWSConfigAggregateAuthorization_basic(t *testing.T) { rString := acctest.RandStringFromCharSet(12, "0123456789") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSConfigAggregateAuthorizationDestroy, diff --git a/aws/resource_aws_config_configuration_aggregator_test.go b/aws/resource_aws_config_configuration_aggregator_test.go index 8f47fcecc98..748c4c4c186 100644 --- a/aws/resource_aws_config_configuration_aggregator_test.go +++ b/aws/resource_aws_config_configuration_aggregator_test.go @@ -67,7 +67,7 @@ func TestAccAWSConfigConfigurationAggregator_account(t *testing.T) { rString := acctest.RandString(10) expectedName := fmt.Sprintf("tf-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSConfigConfigurationAggregatorDestroy, @@ -99,7 +99,7 @@ func TestAccAWSConfigConfigurationAggregator_organization(t *testing.T) { rString := acctest.RandString(10) expectedName := fmt.Sprintf("tf-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSConfigConfigurationAggregatorDestroy, @@ -127,7 +127,7 @@ func TestAccAWSConfigConfigurationAggregator_organization(t *testing.T) { func TestAccAWSConfigConfigurationAggregator_switch(t *testing.T) { rString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccOrganizationsAccountPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSConfigConfigurationAggregatorDestroy, diff --git a/aws/resource_aws_customer_gateway_test.go b/aws/resource_aws_customer_gateway_test.go index d8b2db30d4c..f1b9983307d 100644 --- a/aws/resource_aws_customer_gateway_test.go +++ b/aws/resource_aws_customer_gateway_test.go @@ -20,7 +20,7 @@ func TestAccAWSCustomerGateway_importBasic(t *testing.T) { rInt := acctest.RandInt() rBgpAsn := acctest.RandIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCustomerGatewayDestroy, @@ -42,7 +42,7 @@ func TestAccAWSCustomerGateway_basic(t *testing.T) { var gateway ec2.CustomerGateway rBgpAsn := acctest.RandIntRange(64512, 65534) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_customer_gateway.foo", Providers: testAccProviders, @@ -74,7 +74,7 @@ func TestAccAWSCustomerGateway_similarAlreadyExists(t *testing.T) { var gateway ec2.CustomerGateway rInt := acctest.RandInt() rBgpAsn := acctest.RandIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_customer_gateway.foo", Providers: testAccProviders, @@ -98,7 +98,7 @@ func TestAccAWSCustomerGateway_disappears(t *testing.T) { rInt := acctest.RandInt() rBgpAsn := acctest.RandIntRange(64512, 65534) var gateway ec2.CustomerGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckCustomerGatewayDestroy, diff --git a/aws/resource_aws_dax_cluster_test.go b/aws/resource_aws_dax_cluster_test.go index 1374e0a9cf4..edf5ee46e0d 100644 --- a/aws/resource_aws_dax_cluster_test.go +++ b/aws/resource_aws_dax_cluster_test.go @@ -67,7 +67,7 @@ func TestAccAWSDAXCluster_importBasic(t *testing.T) { resourceName := "aws_dax_cluster.test" rString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDAXClusterDestroy, @@ -88,7 +88,7 @@ func TestAccAWSDAXCluster_importBasic(t *testing.T) { func TestAccAWSDAXCluster_basic(t *testing.T) { var dc dax.Cluster rString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDAXClusterDestroy, @@ -136,7 +136,7 @@ func TestAccAWSDAXCluster_basic(t *testing.T) { func TestAccAWSDAXCluster_resize(t *testing.T) { var dc dax.Cluster rString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDAXClusterDestroy, @@ -172,7 +172,7 @@ func TestAccAWSDAXCluster_resize(t *testing.T) { func TestAccAWSDAXCluster_encryption_disabled(t *testing.T) { var dc dax.Cluster rString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDAXClusterDestroy, @@ -198,7 +198,7 @@ func TestAccAWSDAXCluster_encryption_disabled(t *testing.T) { func TestAccAWSDAXCluster_encryption_enabled(t *testing.T) { var dc dax.Cluster rString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDAXClusterDestroy, diff --git a/aws/resource_aws_dax_parameter_group_test.go b/aws/resource_aws_dax_parameter_group_test.go index 32aaa74b20a..912e1f310ee 100644 --- a/aws/resource_aws_dax_parameter_group_test.go +++ b/aws/resource_aws_dax_parameter_group_test.go @@ -13,7 +13,7 @@ import ( func TestAccAwsDaxParameterGroup_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDaxParameterGroupDestroy, @@ -40,7 +40,7 @@ func TestAccAwsDaxParameterGroup_import(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_dax_parameter_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDaxParameterGroupDestroy, diff --git a/aws/resource_aws_dax_subnet_group_test.go b/aws/resource_aws_dax_subnet_group_test.go index b9b1006567a..288d3a3280b 100644 --- a/aws/resource_aws_dax_subnet_group_test.go +++ b/aws/resource_aws_dax_subnet_group_test.go @@ -15,7 +15,7 @@ func TestAccAwsDaxSubnetGroup_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_dax_subnet_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDaxSubnetGroupDestroy, diff --git a/aws/resource_aws_db_cluster_snapshot_test.go b/aws/resource_aws_db_cluster_snapshot_test.go index e05c523f057..3e4518dbd3b 100644 --- a/aws/resource_aws_db_cluster_snapshot_test.go +++ b/aws/resource_aws_db_cluster_snapshot_test.go @@ -17,7 +17,7 @@ func TestAccAWSDBClusterSnapshot_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_db_cluster_snapshot.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDbClusterSnapshotDestroy, diff --git a/aws/resource_aws_db_event_subscription_test.go b/aws/resource_aws_db_event_subscription_test.go index 53583168823..fa306256407 100644 --- a/aws/resource_aws_db_event_subscription_test.go +++ b/aws/resource_aws_db_event_subscription_test.go @@ -18,7 +18,7 @@ func TestAccAWSDBEventSubscription_importBasic(t *testing.T) { rInt := acctest.RandInt() subscriptionName := fmt.Sprintf("tf-acc-test-rds-event-subs-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBEventSubscriptionDestroy, @@ -42,7 +42,7 @@ func TestAccAWSDBEventSubscription_basicUpdate(t *testing.T) { rInt := acctest.RandInt() rName := fmt.Sprintf("tf-acc-test-rds-event-subs-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBEventSubscriptionDestroy, @@ -78,7 +78,7 @@ func TestAccAWSDBEventSubscription_withPrefix(t *testing.T) { rInt := acctest.RandInt() startsWithPrefix := regexp.MustCompile("^tf-acc-test-rds-event-subs-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBEventSubscriptionDestroy, @@ -105,7 +105,7 @@ func TestAccAWSDBEventSubscription_withSourceIds(t *testing.T) { var v rds.EventSubscription rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBEventSubscriptionDestroy, @@ -146,7 +146,7 @@ func TestAccAWSDBEventSubscription_categoryUpdate(t *testing.T) { var v rds.EventSubscription rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBEventSubscriptionDestroy, diff --git a/aws/resource_aws_db_instance_test.go b/aws/resource_aws_db_instance_test.go index 2ef06c88a63..ea156a16cbd 100644 --- a/aws/resource_aws_db_instance_test.go +++ b/aws/resource_aws_db_instance_test.go @@ -85,7 +85,7 @@ func TestAccAWSDBInstance_basic(t *testing.T) { var dbInstance1 rds.DBInstance resourceName := "aws_db_instance.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -143,7 +143,7 @@ func TestAccAWSDBInstance_basic(t *testing.T) { func TestAccAWSDBInstance_namePrefix(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -164,7 +164,7 @@ func TestAccAWSDBInstance_namePrefix(t *testing.T) { func TestAccAWSDBInstance_generatedName(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -187,7 +187,7 @@ func TestAccAWSDBInstance_kmsKey(t *testing.T) { ri := acctest.RandInt() config := fmt.Sprintf(testAccAWSDBInstanceConfigKmsKeyId, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -209,7 +209,7 @@ func TestAccAWSDBInstance_subnetGroup(t *testing.T) { var v rds.DBInstance rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -239,7 +239,7 @@ func TestAccAWSDBInstance_optionGroup(t *testing.T) { rName := fmt.Sprintf("tf-option-test-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -260,7 +260,7 @@ func TestAccAWSDBInstance_optionGroup(t *testing.T) { func TestAccAWSDBInstance_iamAuth(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -284,7 +284,7 @@ func TestAccAWSDBInstance_DeletionProtection(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -322,7 +322,7 @@ func TestAccAWSDBInstance_FinalSnapshotIdentifier(t *testing.T) { var snap rds.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, // testAccCheckAWSDBInstanceSnapshot verifies a database snapshot is @@ -342,7 +342,7 @@ func TestAccAWSDBInstance_FinalSnapshotIdentifier(t *testing.T) { func TestAccAWSDBInstance_FinalSnapshotIdentifier_SkipFinalSnapshot(t *testing.T) { var snap rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceNoSnapshot, @@ -363,7 +363,7 @@ func TestAccAWSDBInstance_IsAlreadyBeingDeleted(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -401,7 +401,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -425,7 +425,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorage(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -450,7 +450,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_AutoMinorVersionUpgrade(t *testing.T sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -475,7 +475,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_AvailabilityZone(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -499,7 +499,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_BackupRetentionPeriod(t *testing.T) sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -524,7 +524,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_BackupWindow(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -561,7 +561,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_DeletionProtection(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -596,7 +596,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_IamDatabaseAuthenticationEnabled(t * sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -621,7 +621,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_MaintenanceWindow(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -646,7 +646,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_Monitoring(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -671,7 +671,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_MultiAZ(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -696,7 +696,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_ParameterGroupName(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -722,7 +722,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_Port(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -747,7 +747,7 @@ func TestAccAWSDBInstance_ReplicateSourceDb_VpcSecurityGroupIds(t *testing.T) { sourceResourceName := "aws_db_instance.source" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -771,7 +771,7 @@ func TestAccAWSDBInstance_S3Import(t *testing.T) { uniqueId := acctest.RandomWithPrefix("tf-acc-s3-import-test") bucketPrefix := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -795,7 +795,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -821,7 +821,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_AllocatedStorage(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -848,7 +848,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_AutoMinorVersionUpgrade(t *testing. snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -875,7 +875,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_AvailabilityZone(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -901,7 +901,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod(t *testing.T) snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -928,7 +928,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod_Unset(t *test snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -955,7 +955,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -982,7 +982,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_DeletionProtection(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1019,7 +1019,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_IamDatabaseAuthenticationEnabled(t snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1046,7 +1046,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_MaintenanceWindow(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1073,7 +1073,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_Monitoring(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1100,7 +1100,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1127,7 +1127,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ_SQLServer(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1154,7 +1154,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1182,7 +1182,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_Port(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1209,7 +1209,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_Tags(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1241,7 +1241,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_Tags_Unset(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1268,7 +1268,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds(t *testing.T) { snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1298,7 +1298,7 @@ func TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds_Tags(t *testing snapshotResourceName := "aws_db_snapshot.test" resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1321,7 +1321,7 @@ func TestAccAWSDBInstance_enhancedMonitoring(t *testing.T) { var dbInstance rds.DBInstance rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1346,7 +1346,7 @@ func TestAccAWSDBInstance_separate_iops_update(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1375,7 +1375,7 @@ func TestAccAWSDBInstance_portUpdate(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1405,7 +1405,7 @@ func TestAccAWSDBInstance_MSSQL_TZ(t *testing.T) { var v rds.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1441,7 +1441,7 @@ func TestAccAWSDBInstance_MSSQL_Domain(t *testing.T) { var vBefore, vAfter rds.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1476,7 +1476,7 @@ func TestAccAWSDBInstance_MSSQL_DomainSnapshotRestore(t *testing.T) { var v, vRestoredInstance rds.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1500,7 +1500,7 @@ func TestAccAWSDBInstance_MSSQL_DomainSnapshotRestore(t *testing.T) { func TestAccAWSDBInstance_MinorVersion(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1520,7 +1520,7 @@ func TestAccAWSDBInstance_diffSuppressInitialState(t *testing.T) { var v rds.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1544,7 +1544,7 @@ func TestAccAWSDBInstance_ec2Classic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1564,7 +1564,7 @@ func TestAccAWSDBInstance_cloudwatchLogsExportConfiguration(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1590,7 +1590,7 @@ func TestAccAWSDBInstance_cloudwatchLogsExportConfigurationUpdate(t *testing.T) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -1647,7 +1647,7 @@ func TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Oracle(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_db_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, diff --git a/aws/resource_aws_db_option_group_test.go b/aws/resource_aws_db_option_group_test.go index 6e959f03168..9fd7093a56d 100644 --- a/aws/resource_aws_db_option_group_test.go +++ b/aws/resource_aws_db_option_group_test.go @@ -80,7 +80,7 @@ func TestAccAWSDBOptionGroup_importBasic(t *testing.T) { resourceName := "aws_db_option_group.bar" rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -102,7 +102,7 @@ func TestAccAWSDBOptionGroup_basic(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -125,7 +125,7 @@ func TestAccAWSDBOptionGroup_timeoutBlock(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -146,7 +146,7 @@ func TestAccAWSDBOptionGroup_timeoutBlock(t *testing.T) { func TestAccAWSDBOptionGroup_namePrefix(t *testing.T) { var v rds.OptionGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -167,7 +167,7 @@ func TestAccAWSDBOptionGroup_namePrefix(t *testing.T) { func TestAccAWSDBOptionGroup_generatedName(t *testing.T) { var v rds.OptionGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -186,7 +186,7 @@ func TestAccAWSDBOptionGroup_generatedName(t *testing.T) { func TestAccAWSDBOptionGroup_defaultDescription(t *testing.T) { var v rds.OptionGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -206,7 +206,7 @@ func TestAccAWSDBOptionGroup_defaultDescription(t *testing.T) { func TestAccAWSDBOptionGroup_basicDestroyWithInstance(t *testing.T) { rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -222,7 +222,7 @@ func TestAccAWSDBOptionGroup_OptionSettings(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -259,7 +259,7 @@ func TestAccAWSDBOptionGroup_OptionSettingsIAMRole(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -283,7 +283,7 @@ func TestAccAWSDBOptionGroup_sqlServerOptionsUpdate(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -315,7 +315,7 @@ func TestAccAWSDBOptionGroup_OracleOptionsUpdate(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, @@ -351,7 +351,7 @@ func TestAccAWSDBOptionGroup_multipleOptions(t *testing.T) { var v rds.OptionGroup rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, diff --git a/aws/resource_aws_db_parameter_group_test.go b/aws/resource_aws_db_parameter_group_test.go index 2256b795e70..4102746b9e8 100644 --- a/aws/resource_aws_db_parameter_group_test.go +++ b/aws/resource_aws_db_parameter_group_test.go @@ -19,7 +19,7 @@ func TestAccAWSDBParameterGroup_importBasic(t *testing.T) { resourceName := "aws_db_parameter_group.bar" groupName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -42,7 +42,7 @@ func TestAccAWSDBParameterGroup_limit(t *testing.T) { groupName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -242,7 +242,7 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) { groupName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -320,7 +320,7 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) { func TestAccAWSDBParameterGroup_Disappears(t *testing.T) { var v rds.DBParameterGroup groupName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -340,7 +340,7 @@ func TestAccAWSDBParameterGroup_Disappears(t *testing.T) { func TestAccAWSDBParameterGroup_namePrefix(t *testing.T) { var v rds.DBParameterGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -360,7 +360,7 @@ func TestAccAWSDBParameterGroup_namePrefix(t *testing.T) { func TestAccAWSDBParameterGroup_generatedName(t *testing.T) { var v rds.DBParameterGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -380,7 +380,7 @@ func TestAccAWSDBParameterGroup_withApplyMethod(t *testing.T) { groupName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -418,7 +418,7 @@ func TestAccAWSDBParameterGroup_Only(t *testing.T) { var v rds.DBParameterGroup groupName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, @@ -442,7 +442,7 @@ func TestAccAWSDBParameterGroup_MatchDefault(t *testing.T) { var v rds.DBParameterGroup groupName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBParameterGroupDestroy, diff --git a/aws/resource_aws_db_security_group_test.go b/aws/resource_aws_db_security_group_test.go index 0333751c517..02d53526141 100644 --- a/aws/resource_aws_db_security_group_test.go +++ b/aws/resource_aws_db_security_group_test.go @@ -22,7 +22,7 @@ func TestAccAWSDBSecurityGroup_importBasic(t *testing.T) { rName := fmt.Sprintf("tf-acc-%s", acctest.RandString(5)) resourceName := "aws_db_security_group.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBSecurityGroupDestroy, @@ -49,7 +49,7 @@ func TestAccAWSDBSecurityGroup_basic(t *testing.T) { rName := fmt.Sprintf("tf-acc-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBSecurityGroupDestroy, diff --git a/aws/resource_aws_db_snapshot_test.go b/aws/resource_aws_db_snapshot_test.go index 97c857b2850..e7b0d62c77e 100644 --- a/aws/resource_aws_db_snapshot_test.go +++ b/aws/resource_aws_db_snapshot_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSDBSnapshot_basic(t *testing.T) { var v rds.DBSnapshot rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_db_subnet_group_test.go b/aws/resource_aws_db_subnet_group_test.go index f7572e76c60..7522b206ec8 100644 --- a/aws/resource_aws_db_subnet_group_test.go +++ b/aws/resource_aws_db_subnet_group_test.go @@ -18,7 +18,7 @@ func TestAccAWSDBSubnetGroup_importBasic(t *testing.T) { resourceName := "aws_db_subnet_group.foo" rName := fmt.Sprintf("tf-test-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDBSubnetGroupDestroy, @@ -47,7 +47,7 @@ func TestAccAWSDBSubnetGroup_basic(t *testing.T) { rName := fmt.Sprintf("tf-test-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDBSubnetGroupDestroy, @@ -73,7 +73,7 @@ func TestAccAWSDBSubnetGroup_basic(t *testing.T) { func TestAccAWSDBSubnetGroup_namePrefix(t *testing.T) { var v rds.DBSubnetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDBSubnetGroupDestroy, @@ -94,7 +94,7 @@ func TestAccAWSDBSubnetGroup_namePrefix(t *testing.T) { func TestAccAWSDBSubnetGroup_generatedName(t *testing.T) { var v rds.DBSubnetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDBSubnetGroupDestroy, @@ -119,7 +119,7 @@ func TestAccAWSDBSubnetGroup_withUndocumentedCharacters(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDBSubnetGroupDestroy, @@ -144,7 +144,7 @@ func TestAccAWSDBSubnetGroup_updateDescription(t *testing.T) { var v rds.DBSubnetGroup rName := fmt.Sprintf("tf-test-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDBSubnetGroupDestroy, diff --git a/aws/resource_aws_default_network_acl_test.go b/aws/resource_aws_default_network_acl_test.go index e22902c71e9..fac6d15a00f 100644 --- a/aws/resource_aws_default_network_acl_test.go +++ b/aws/resource_aws_default_network_acl_test.go @@ -28,7 +28,7 @@ var ipv6IngressAcl = &ec2.NetworkAclEntry{ func TestAccAWSDefaultNetworkAcl_basic(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultNetworkAclDestroy, @@ -47,7 +47,7 @@ func TestAccAWSDefaultNetworkAcl_basic(t *testing.T) { func TestAccAWSDefaultNetworkAcl_basicIpv6Vpc(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultNetworkAclDestroy, @@ -69,7 +69,7 @@ func TestAccAWSDefaultNetworkAcl_deny_ingress(t *testing.T) { // additional Egress. var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultNetworkAclDestroy, @@ -88,7 +88,7 @@ func TestAccAWSDefaultNetworkAcl_deny_ingress(t *testing.T) { func TestAccAWSDefaultNetworkAcl_withIpv6Ingress(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultNetworkAclDestroy, @@ -107,7 +107,7 @@ func TestAccAWSDefaultNetworkAcl_withIpv6Ingress(t *testing.T) { func TestAccAWSDefaultNetworkAcl_SubnetRemoval(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultNetworkAclDestroy, @@ -138,7 +138,7 @@ func TestAccAWSDefaultNetworkAcl_SubnetRemoval(t *testing.T) { func TestAccAWSDefaultNetworkAcl_SubnetReassign(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultNetworkAclDestroy, diff --git a/aws/resource_aws_default_route_table_test.go b/aws/resource_aws_default_route_table_test.go index 55e1d9d0cc8..c6953d13d4b 100644 --- a/aws/resource_aws_default_route_table_test.go +++ b/aws/resource_aws_default_route_table_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSDefaultRouteTable_basic(t *testing.T) { var v ec2.RouteTable - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_default_route_table.foo", Providers: testAccProviders, @@ -34,7 +34,7 @@ func TestAccAWSDefaultRouteTable_basic(t *testing.T) { func TestAccAWSDefaultRouteTable_swap(t *testing.T) { var v ec2.RouteTable - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_default_route_table.foo", Providers: testAccProviders, @@ -68,7 +68,7 @@ func TestAccAWSDefaultRouteTable_swap(t *testing.T) { func TestAccAWSDefaultRouteTable_vpc_endpoint(t *testing.T) { var v ec2.RouteTable - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_default_route_table.foo", Providers: testAccProviders, diff --git a/aws/resource_aws_default_security_group_test.go b/aws/resource_aws_default_security_group_test.go index a365b570445..860fe5c0375 100644 --- a/aws/resource_aws_default_security_group_test.go +++ b/aws/resource_aws_default_security_group_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSDefaultSecurityGroup_basic(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_default_security_group.web", Providers: testAccProviders, @@ -46,7 +46,7 @@ func TestAccAWSDefaultSecurityGroup_basic(t *testing.T) { func TestAccAWSDefaultSecurityGroup_classic(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_default_security_group.web", Providers: testAccProviders, diff --git a/aws/resource_aws_default_subnet_test.go b/aws/resource_aws_default_subnet_test.go index fd8bb98ffee..fb078426bb6 100644 --- a/aws/resource_aws_default_subnet_test.go +++ b/aws/resource_aws_default_subnet_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSDefaultSubnet_basic(t *testing.T) { var v ec2.Subnet - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultSubnetDestroy, @@ -37,7 +37,7 @@ func TestAccAWSDefaultSubnet_basic(t *testing.T) { func TestAccAWSDefaultSubnet_publicIp(t *testing.T) { var v ec2.Subnet - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultSubnetDestroy, diff --git a/aws/resource_aws_default_vpc_dhcp_options_test.go b/aws/resource_aws_default_vpc_dhcp_options_test.go index 110d2e8c726..12db0cd7aea 100644 --- a/aws/resource_aws_default_vpc_dhcp_options_test.go +++ b/aws/resource_aws_default_vpc_dhcp_options_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSDefaultVpcDhcpOptions_basic(t *testing.T) { var d ec2.DhcpOptions - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultVpcDhcpOptionsDestroy, diff --git a/aws/resource_aws_default_vpc_test.go b/aws/resource_aws_default_vpc_test.go index e9887eb7013..0d93ba90d11 100644 --- a/aws/resource_aws_default_vpc_test.go +++ b/aws/resource_aws_default_vpc_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSDefaultVpc_basic(t *testing.T) { var vpc ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDefaultVpcDestroy, diff --git a/aws/resource_aws_devicefarm_project_test.go b/aws/resource_aws_devicefarm_project_test.go index dc3a92c0412..0a765ff9f07 100644 --- a/aws/resource_aws_devicefarm_project_test.go +++ b/aws/resource_aws_devicefarm_project_test.go @@ -17,7 +17,7 @@ func TestAccAWSDeviceFarmProject_basic(t *testing.T) { beforeInt := acctest.RandInt() afterInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDeviceFarmProjectDestroy, diff --git a/aws/resource_aws_directory_service_conditional_forwarder_test.go b/aws/resource_aws_directory_service_conditional_forwarder_test.go index a6eaa332ad0..dd2ec407fdf 100644 --- a/aws/resource_aws_directory_service_conditional_forwarder_test.go +++ b/aws/resource_aws_directory_service_conditional_forwarder_test.go @@ -16,7 +16,7 @@ func TestAccAWSDirectoryServiceConditionForwarder_basic(t *testing.T) { ip1, ip2, ip3 := "8.8.8.8", "1.1.1.1", "8.8.4.4" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDirectoryServiceConditionalForwarderDestroy, diff --git a/aws/resource_aws_directory_service_directory_test.go b/aws/resource_aws_directory_service_directory_test.go index 8978a0a7444..11346e24636 100644 --- a/aws/resource_aws_directory_service_directory_test.go +++ b/aws/resource_aws_directory_service_directory_test.go @@ -133,7 +133,7 @@ func TestDiffTagsDirectoryService(t *testing.T) { func TestAccAWSDirectoryServiceDirectory_importBasic(t *testing.T) { resourceName := "aws_directory_service_directory.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, @@ -154,7 +154,7 @@ func TestAccAWSDirectoryServiceDirectory_importBasic(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, @@ -171,7 +171,7 @@ func TestAccAWSDirectoryServiceDirectory_basic(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_tags(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, @@ -188,7 +188,7 @@ func TestAccAWSDirectoryServiceDirectory_tags(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_microsoft(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, @@ -205,7 +205,7 @@ func TestAccAWSDirectoryServiceDirectory_microsoft(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_microsoftStandard(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, @@ -222,7 +222,7 @@ func TestAccAWSDirectoryServiceDirectory_microsoftStandard(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_connector(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, @@ -238,7 +238,7 @@ func TestAccAWSDirectoryServiceDirectory_connector(t *testing.T) { } func TestAccAWSDirectoryServiceDirectory_withAliasAndSso(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDirectoryServiceDirectoryDestroy, diff --git a/aws/resource_aws_dms_certificate_test.go b/aws/resource_aws_dms_certificate_test.go index df0a0c0587b..5a2b193cff2 100644 --- a/aws/resource_aws_dms_certificate_test.go +++ b/aws/resource_aws_dms_certificate_test.go @@ -16,7 +16,7 @@ func TestAccAWSDmsCertificateBasic(t *testing.T) { resourceName := "aws_dms_certificate.dms_certificate" randId := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dmsCertificateDestroy, diff --git a/aws/resource_aws_dms_endpoint_test.go b/aws/resource_aws_dms_endpoint_test.go index 9dfb301544e..8c58172c991 100644 --- a/aws/resource_aws_dms_endpoint_test.go +++ b/aws/resource_aws_dms_endpoint_test.go @@ -15,7 +15,7 @@ func TestAccAwsDmsEndpointBasic(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-basic" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dmsEndpointDestroy, @@ -54,7 +54,7 @@ func TestAccAwsDmsEndpointS3(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-s3" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dmsEndpointDestroy, @@ -100,7 +100,7 @@ func TestAccAwsDmsEndpointDynamoDb(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-dynamodb" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dmsEndpointDestroy, @@ -132,7 +132,7 @@ func TestAccAwsDmsEndpointMongoDb(t *testing.T) { resourceName := "aws_dms_endpoint.dms_endpoint" randId := acctest.RandString(8) + "-mongodb" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dmsEndpointDestroy, diff --git a/aws/resource_aws_dms_replication_instance_test.go b/aws/resource_aws_dms_replication_instance_test.go index ee0360e8949..adfddd80e14 100644 --- a/aws/resource_aws_dms_replication_instance_test.go +++ b/aws/resource_aws_dms_replication_instance_test.go @@ -15,7 +15,7 @@ func TestAccAWSDmsReplicationInstance_Basic(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -53,7 +53,7 @@ func TestAccAWSDmsReplicationInstance_AllocatedStorage(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -86,7 +86,7 @@ func TestAccAWSDmsReplicationInstance_AutoMinorVersionUpgrade(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -127,7 +127,7 @@ func TestAccAWSDmsReplicationInstance_AvailabilityZone(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -153,7 +153,7 @@ func TestAccAWSDmsReplicationInstance_EngineVersion(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -187,7 +187,7 @@ func TestAccAWSDmsReplicationInstance_KmsKeyArn(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -213,7 +213,7 @@ func TestAccAWSDmsReplicationInstance_MultiAz(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -253,7 +253,7 @@ func TestAccAWSDmsReplicationInstance_PreferredMaintenanceWindow(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -286,7 +286,7 @@ func TestAccAWSDmsReplicationInstance_PubliclyAccessible(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -313,7 +313,7 @@ func TestAccAWSDmsReplicationInstance_ReplicationInstanceClass(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -347,7 +347,7 @@ func TestAccAWSDmsReplicationInstance_ReplicationSubnetGroupId(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -373,7 +373,7 @@ func TestAccAWSDmsReplicationInstance_Tags(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, @@ -417,7 +417,7 @@ func TestAccAWSDmsReplicationInstance_VpcSecurityGroupIds(t *testing.T) { resourceName := "aws_dms_replication_instance.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDmsReplicationInstanceDestroy, diff --git a/aws/resource_aws_dms_replication_subnet_group_test.go b/aws/resource_aws_dms_replication_subnet_group_test.go index 769c6c0c194..127563d61b5 100644 --- a/aws/resource_aws_dms_replication_subnet_group_test.go +++ b/aws/resource_aws_dms_replication_subnet_group_test.go @@ -16,7 +16,7 @@ func TestAccAWSDmsReplicationSubnetGroupBasic(t *testing.T) { resourceName := "aws_dms_replication_subnet_group.dms_replication_subnet_group" randId := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dmsReplicationSubnetGroupDestroy, diff --git a/aws/resource_aws_dms_replication_task_test.go b/aws/resource_aws_dms_replication_task_test.go index 337aa73487c..e15c901a3d1 100644 --- a/aws/resource_aws_dms_replication_task_test.go +++ b/aws/resource_aws_dms_replication_task_test.go @@ -15,7 +15,7 @@ func TestAccAWSDmsReplicationTaskBasic(t *testing.T) { resourceName := "aws_dms_replication_task.dms_replication_task" randId := acctest.RandString(8) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dmsReplicationTaskDestroy, diff --git a/aws/resource_aws_dx_bgp_peer_test.go b/aws/resource_aws_dx_bgp_peer_test.go index f1921f092a7..006c8aa48a8 100644 --- a/aws/resource_aws_dx_bgp_peer_test.go +++ b/aws/resource_aws_dx_bgp_peer_test.go @@ -20,7 +20,7 @@ func TestAccAwsDxBgpPeer_basic(t *testing.T) { } bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxBgpPeerDestroy, diff --git a/aws/resource_aws_dx_connection_association_test.go b/aws/resource_aws_dx_connection_association_test.go index 7942ad4d354..3fd5158809a 100644 --- a/aws/resource_aws_dx_connection_association_test.go +++ b/aws/resource_aws_dx_connection_association_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSDxConnectionAssociation_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxConnectionAssociationDestroy, @@ -28,7 +28,7 @@ func TestAccAWSDxConnectionAssociation_basic(t *testing.T) { } func TestAccAWSDxConnectionAssociation_multiConns(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxConnectionAssociationDestroy, diff --git a/aws/resource_aws_dx_connection_test.go b/aws/resource_aws_dx_connection_test.go index d260d4bda74..8f86186713f 100644 --- a/aws/resource_aws_dx_connection_test.go +++ b/aws/resource_aws_dx_connection_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSDxConnection_importBasic(t *testing.T) { resourceName := "aws_dx_connection.hoge" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxConnectionDestroy, @@ -35,7 +35,7 @@ func TestAccAWSDxConnection_importBasic(t *testing.T) { func TestAccAWSDxConnection_basic(t *testing.T) { connectionName := fmt.Sprintf("tf-dx-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxConnectionDestroy, @@ -57,7 +57,7 @@ func TestAccAWSDxConnection_basic(t *testing.T) { func TestAccAWSDxConnection_tags(t *testing.T) { connectionName := fmt.Sprintf("tf-dx-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxConnectionDestroy, diff --git a/aws/resource_aws_dx_gateway_association_test.go b/aws/resource_aws_dx_gateway_association_test.go index 9501acddb56..02563c41991 100644 --- a/aws/resource_aws_dx_gateway_association_test.go +++ b/aws/resource_aws_dx_gateway_association_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAwsDxGatewayAssociation_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, @@ -28,7 +28,7 @@ func TestAccAwsDxGatewayAssociation_basic(t *testing.T) { } func TestAccAwsDxGatewayAssociation_multiVgws(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxGatewayAssociationDestroy, diff --git a/aws/resource_aws_dx_gateway_test.go b/aws/resource_aws_dx_gateway_test.go index 647363a4c55..18a9feebe4a 100644 --- a/aws/resource_aws_dx_gateway_test.go +++ b/aws/resource_aws_dx_gateway_test.go @@ -16,7 +16,7 @@ import ( func TestAccAwsDxGateway_importBasic(t *testing.T) { resourceName := "aws_dx_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxGatewayDestroy, @@ -42,7 +42,7 @@ func TestAccAwsDxGateway_importComplex(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxGatewayDestroy, @@ -62,7 +62,7 @@ func TestAccAwsDxGateway_importComplex(t *testing.T) { } func TestAccAwsDxGateway_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxGatewayDestroy, diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index a7ddff6003f..0de23aa9ed4 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -26,7 +26,7 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy, diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go index 59a865cbb49..8246595fc25 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go @@ -26,7 +26,7 @@ func TestAccAwsDxHostedPublicVirtualInterface_basic(t *testing.T) { vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxHostedPublicVirtualInterfaceDestroy, diff --git a/aws/resource_aws_dx_lag_test.go b/aws/resource_aws_dx_lag_test.go index 8d4aa84ab15..e8d21862d20 100644 --- a/aws/resource_aws_dx_lag_test.go +++ b/aws/resource_aws_dx_lag_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSDxLag_importBasic(t *testing.T) { resourceName := "aws_dx_lag.hoge" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxLagDestroy, @@ -37,7 +37,7 @@ func TestAccAWSDxLag_basic(t *testing.T) { lagName1 := fmt.Sprintf("tf-dx-lag-%s", acctest.RandString(5)) lagName2 := fmt.Sprintf("tf-dx-lag-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxLagDestroy, @@ -69,7 +69,7 @@ func TestAccAWSDxLag_basic(t *testing.T) { func TestAccAWSDxLag_tags(t *testing.T) { lagName := fmt.Sprintf("tf-dx-lag-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxLagDestroy, diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index cb5b9bee73b..760d8126b84 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -21,7 +21,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, @@ -63,7 +63,7 @@ func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { amzAsn := randIntRange(64512, 65534) bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, diff --git a/aws/resource_aws_dx_public_virtual_interface_test.go b/aws/resource_aws_dx_public_virtual_interface_test.go index e498651cbb8..b05bd8bd134 100644 --- a/aws/resource_aws_dx_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_public_virtual_interface_test.go @@ -21,7 +21,7 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxPublicVirtualInterfaceDestroy, diff --git a/aws/resource_aws_dynamodb_global_table_test.go b/aws/resource_aws_dynamodb_global_table_test.go index 052934e1c87..6eedb381982 100644 --- a/aws/resource_aws_dynamodb_global_table_test.go +++ b/aws/resource_aws_dynamodb_global_table_test.go @@ -16,7 +16,7 @@ func TestAccAWSDynamoDbGlobalTable_basic(t *testing.T) { resourceName := "aws_dynamodb_global_table.test" tableName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDynamoDbGlobalTableDestroy, @@ -51,7 +51,7 @@ func TestAccAWSDynamoDbGlobalTable_multipleRegions(t *testing.T) { resourceName := "aws_dynamodb_global_table.test" tableName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDynamoDbGlobalTableDestroy, @@ -93,7 +93,7 @@ func TestAccAWSDynamoDbGlobalTable_import(t *testing.T) { resourceName := "aws_dynamodb_global_table.test" tableName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSesTemplateDestroy, diff --git a/aws/resource_aws_dynamodb_table_item_test.go b/aws/resource_aws_dynamodb_table_item_test.go index 1c493abe61c..152e7fb84eb 100644 --- a/aws/resource_aws_dynamodb_table_item_test.go +++ b/aws/resource_aws_dynamodb_table_item_test.go @@ -24,7 +24,7 @@ func TestAccAWSDynamoDbTableItem_basic(t *testing.T) { "four": {"N": "44444"} }` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbItemDestroy, @@ -58,7 +58,7 @@ func TestAccAWSDynamoDbTableItem_rangeKey(t *testing.T) { "four": {"N": "44444"} }` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbItemDestroy, @@ -101,7 +101,7 @@ func TestAccAWSDynamoDbTableItem_withMultipleItems(t *testing.T) { "four": {"S": "four"} }` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbItemDestroy, @@ -148,7 +148,7 @@ func TestAccAWSDynamoDbTableItem_update(t *testing.T) { "new": {"S": "shiny new one"} }` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbItemDestroy, @@ -195,7 +195,7 @@ func TestAccAWSDynamoDbTableItem_updateWithRangeKey(t *testing.T) { "value": {"S": "valueAfter"} }` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbItemDestroy, diff --git a/aws/resource_aws_dynamodb_table_test.go b/aws/resource_aws_dynamodb_table_test.go index 7bdd42f6f47..af533962902 100644 --- a/aws/resource_aws_dynamodb_table_test.go +++ b/aws/resource_aws_dynamodb_table_test.go @@ -335,7 +335,7 @@ func TestAccAWSDynamoDbTable_importBasic(t *testing.T) { resourceName := "aws_dynamodb_table.basic-dynamodb-table" rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -356,7 +356,7 @@ func TestAccAWSDynamoDbTable_importBasic(t *testing.T) { func TestAccAWSDynamoDbTable_importTags(t *testing.T) { resourceName := "aws_dynamodb_table.basic-dynamodb-table" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -378,7 +378,7 @@ func TestAccAWSDynamoDbTable_importTimeToLive(t *testing.T) { resourceName := "aws_dynamodb_table.basic-dynamodb-table" rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -401,7 +401,7 @@ func TestAccAWSDynamoDbTable_basic(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -426,7 +426,7 @@ func TestAccAWSDynamoDbTable_extended(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -453,7 +453,7 @@ func TestAccAWSDynamoDbTable_enablePitr(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -482,7 +482,7 @@ func TestAccAWSDynamoDbTable_streamSpecification(t *testing.T) { tableName := fmt.Sprintf("TerraformTestStreamTable-%s", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -512,7 +512,7 @@ func TestAccAWSDynamoDbTable_streamSpecification(t *testing.T) { } func TestAccAWSDynamoDbTable_streamSpecificationValidation(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -528,7 +528,7 @@ func TestAccAWSDynamoDbTable_streamSpecificationValidation(t *testing.T) { func TestAccAWSDynamoDbTable_tags(t *testing.T) { var conf dynamodb.DescribeTableOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -551,7 +551,7 @@ func TestAccAWSDynamoDbTable_gsiUpdateCapacity(t *testing.T) { var conf dynamodb.DescribeTableOutput name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -590,7 +590,7 @@ func TestAccAWSDynamoDbTable_gsiUpdateOtherAttributes(t *testing.T) { var conf dynamodb.DescribeTableOutput name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -661,7 +661,7 @@ func TestAccAWSDynamoDbTable_gsiUpdateNonKeyAttributes(t *testing.T) { var conf dynamodb.DescribeTableOutput name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -734,7 +734,7 @@ func TestAccAWSDynamoDbTable_ttl(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -760,7 +760,7 @@ func TestAccAWSDynamoDbTable_attributeUpdate(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -796,7 +796,7 @@ func TestAccAWSDynamoDbTable_attributeUpdate(t *testing.T) { func TestAccAWSDynamoDbTable_attributeUpdateValidation(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, @@ -858,7 +858,7 @@ func TestAccAWSDynamoDbTable_encryption(t *testing.T) { rName := acctest.RandomWithPrefix("TerraformTestTable-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDynamoDbTableDestroy, diff --git a/aws/resource_aws_ebs_snapshot_copy_test.go b/aws/resource_aws_ebs_snapshot_copy_test.go index 965a00a283a..b1aee2370ac 100644 --- a/aws/resource_aws_ebs_snapshot_copy_test.go +++ b/aws/resource_aws_ebs_snapshot_copy_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSEbsSnapshotCopy_basic(t *testing.T) { var v ec2.Snapshot - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -31,7 +31,7 @@ func TestAccAWSEbsSnapshotCopy_basic(t *testing.T) { func TestAccAWSEbsSnapshotCopy_withDescription(t *testing.T) { var v ec2.Snapshot - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -60,7 +60,7 @@ func TestAccAWSEbsSnapshotCopy_withRegions(t *testing.T) { }, } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: providerFactories, Steps: []resource.TestStep{ @@ -77,7 +77,7 @@ func TestAccAWSEbsSnapshotCopy_withRegions(t *testing.T) { func TestAccAWSEbsSnapshotCopy_withKms(t *testing.T) { var v ec2.Snapshot - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_ebs_snapshot_test.go b/aws/resource_aws_ebs_snapshot_test.go index df713f335f1..2bfa0c683b8 100644 --- a/aws/resource_aws_ebs_snapshot_test.go +++ b/aws/resource_aws_ebs_snapshot_test.go @@ -39,7 +39,7 @@ func TestAccAWSEBSSnapshot_basic(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEbsSnapshotDestroy, @@ -67,7 +67,7 @@ func TestAccAWSEBSSnapshot_withDescription(t *testing.T) { var v ec2.Snapshot rName := fmt.Sprintf("tf-acc-ebs-snapshot-desc-%s", acctest.RandString(7)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEbsSnapshotDestroy, @@ -87,7 +87,7 @@ func TestAccAWSEBSSnapshot_withKms(t *testing.T) { var v ec2.Snapshot rName := fmt.Sprintf("tf-acc-ebs-snapshot-kms-%s", acctest.RandString(7)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEbsSnapshotDestroy, diff --git a/aws/resource_aws_ebs_volume_test.go b/aws/resource_aws_ebs_volume_test.go index 709fe8765e0..db343a82de5 100644 --- a/aws/resource_aws_ebs_volume_test.go +++ b/aws/resource_aws_ebs_volume_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSEBSVolume_importBasic(t *testing.T) { resourceName := "aws_ebs_volume.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -35,7 +35,7 @@ func TestAccAWSEBSVolume_importBasic(t *testing.T) { func TestAccAWSEBSVolume_basic(t *testing.T) { var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_ebs_volume.test", Providers: testAccProviders, @@ -53,7 +53,7 @@ func TestAccAWSEBSVolume_basic(t *testing.T) { func TestAccAWSEBSVolume_updateAttachedEbsVolume(t *testing.T) { var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_ebs_volume.test", Providers: testAccProviders, @@ -78,7 +78,7 @@ func TestAccAWSEBSVolume_updateAttachedEbsVolume(t *testing.T) { func TestAccAWSEBSVolume_updateSize(t *testing.T) { var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_ebs_volume.test", Providers: testAccProviders, @@ -103,7 +103,7 @@ func TestAccAWSEBSVolume_updateSize(t *testing.T) { func TestAccAWSEBSVolume_updateType(t *testing.T) { var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_ebs_volume.test", Providers: testAccProviders, @@ -128,7 +128,7 @@ func TestAccAWSEBSVolume_updateType(t *testing.T) { func TestAccAWSEBSVolume_updateIops(t *testing.T) { var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_ebs_volume.test", Providers: testAccProviders, @@ -157,7 +157,7 @@ func TestAccAWSEBSVolume_kmsKey(t *testing.T) { config := fmt.Sprintf(testAccAwsEbsVolumeConfigWithKmsKey, ri) keyRegex := regexp.MustCompile("^arn:aws[\\w-]*:([a-zA-Z0-9\\-])+:([a-z-]+-\\d{1})?:(\\d{12})?:(.*)$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_ebs_volume.test", Providers: testAccProviders, @@ -176,7 +176,7 @@ func TestAccAWSEBSVolume_kmsKey(t *testing.T) { func TestAccAWSEBSVolume_NoIops(t *testing.T) { var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -192,7 +192,7 @@ func TestAccAWSEBSVolume_NoIops(t *testing.T) { func TestAccAWSEBSVolume_withTags(t *testing.T) { var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_ebs_volume.tags_test", Providers: testAccProviders, diff --git a/aws/resource_aws_ec2_fleet_test.go b/aws/resource_aws_ec2_fleet_test.go index 61aa0111922..9238d91c004 100644 --- a/aws/resource_aws_ec2_fleet_test.go +++ b/aws/resource_aws_ec2_fleet_test.go @@ -18,7 +18,7 @@ func TestAccAWSEc2Fleet_basic(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -64,7 +64,7 @@ func TestAccAWSEc2Fleet_disappears(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -86,7 +86,7 @@ func TestAccAWSEc2Fleet_ExcessCapacityTerminationPolicy(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -123,7 +123,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_LaunchT resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -166,7 +166,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_LaunchT resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -209,7 +209,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_Version resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -257,7 +257,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_AvailabilityZone(t *testin resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -296,7 +296,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_InstanceType(t *testing.T) resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -337,7 +337,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_MaxPrice(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -376,7 +376,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_Priority(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -415,7 +415,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_Priority_Multiple(t *testi resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -458,7 +458,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_SubnetId(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -497,7 +497,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_WeightedCapacity(t *testin resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -536,7 +536,7 @@ func TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_WeightedCapacity_Multiple( resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -577,7 +577,7 @@ func TestAccAWSEc2Fleet_OnDemandOptions_AllocationStrategy(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -614,7 +614,7 @@ func TestAccAWSEc2Fleet_ReplaceUnhealthyInstances(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -649,7 +649,7 @@ func TestAccAWSEc2Fleet_SpotOptions_AllocationStrategy(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -686,7 +686,7 @@ func TestAccAWSEc2Fleet_SpotOptions_InstanceInterruptionBehavior(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -723,7 +723,7 @@ func TestAccAWSEc2Fleet_SpotOptions_InstancePoolsToUseCount(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -760,7 +760,7 @@ func TestAccAWSEc2Fleet_Tags(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -797,7 +797,7 @@ func TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType(t resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -828,7 +828,7 @@ func TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_On resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -856,7 +856,7 @@ func TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_Sp resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -884,7 +884,7 @@ func TestAccAWSEc2Fleet_TargetCapacitySpecification_TotalTargetCapacity(t *testi resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -921,7 +921,7 @@ func TestAccAWSEc2Fleet_TerminateInstancesWithExpiration(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, @@ -956,7 +956,7 @@ func TestAccAWSEc2Fleet_Type(t *testing.T) { resourceName := "aws_ec2_fleet.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEc2FleetDestroy, diff --git a/aws/resource_aws_ecr_lifecycle_policy_test.go b/aws/resource_aws_ecr_lifecycle_policy_test.go index aab2f8a0b9c..fa6b2864c31 100644 --- a/aws/resource_aws_ecr_lifecycle_policy_test.go +++ b/aws/resource_aws_ecr_lifecycle_policy_test.go @@ -15,7 +15,7 @@ func TestAccAWSEcrLifecyclePolicy_basic(t *testing.T) { randString := acctest.RandString(10) rName := fmt.Sprintf("tf-acc-test-lifecycle-%s", randString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcrLifecyclePolicyDestroy, @@ -35,7 +35,7 @@ func TestAccAWSEcrLifecyclePolicy_import(t *testing.T) { randString := acctest.RandString(10) rName := fmt.Sprintf("tf-acc-test-lifecycle-%s", randString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcrLifecyclePolicyDestroy, diff --git a/aws/resource_aws_ecr_repository_policy_test.go b/aws/resource_aws_ecr_repository_policy_test.go index 13e07192775..8b3313a7070 100644 --- a/aws/resource_aws_ecr_repository_policy_test.go +++ b/aws/resource_aws_ecr_repository_policy_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSEcrRepositoryPolicy_basic(t *testing.T) { randString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcrRepositoryPolicyDestroy, @@ -33,7 +33,7 @@ func TestAccAWSEcrRepositoryPolicy_basic(t *testing.T) { func TestAccAWSEcrRepositoryPolicy_iam(t *testing.T) { randString := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcrRepositoryPolicyDestroy, diff --git a/aws/resource_aws_ecr_repository_test.go b/aws/resource_aws_ecr_repository_test.go index 5d4dbcda05d..85dbfa2a616 100644 --- a/aws/resource_aws_ecr_repository_test.go +++ b/aws/resource_aws_ecr_repository_test.go @@ -15,7 +15,7 @@ func TestAccAWSEcrRepository_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_ecr_repository.default" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcrRepositoryDestroy, diff --git a/aws/resource_aws_ecs_cluster_test.go b/aws/resource_aws_ecs_cluster_test.go index 9159b84fbec..92b182de5f0 100644 --- a/aws/resource_aws_ecs_cluster_test.go +++ b/aws/resource_aws_ecs_cluster_test.go @@ -16,7 +16,7 @@ func TestAccAWSEcsCluster_basic(t *testing.T) { rString := acctest.RandString(8) clusterName := fmt.Sprintf("tf-acc-cluster-basic-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsClusterDestroy, @@ -39,7 +39,7 @@ func TestAccAWSEcsCluster_importBasic(t *testing.T) { resourceName := "aws_ecs_cluster.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsClusterDestroy, diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index b21839b2f1f..ce9d298c364 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -93,7 +93,7 @@ func TestAccAWSEcsService_withARN(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-arn-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-arn-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -130,7 +130,7 @@ func TestAccAWSEcsService_basicImport(t *testing.T) { resourceName := "aws_ecs_service.jenkins" importInput := fmt.Sprintf("%s/%s", clusterName, svcName) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -168,7 +168,7 @@ func TestAccAWSEcsService_disappears(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-arn-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-arn-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -193,7 +193,7 @@ func TestAccAWSEcsService_withUnnormalizedPlacementStrategy(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-ups-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-ups-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -216,7 +216,7 @@ func TestAccAWSEcsService_withFamilyAndRevision(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-far-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-far-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -253,7 +253,7 @@ func TestAccAWSEcsService_withRenamedCluster(t *testing.T) { modifiedRegexp := regexp.MustCompile( "^arn:aws:ecs:[^:]+:[0-9]+:cluster/" + uClusterName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -293,7 +293,7 @@ func TestAccAWSEcsService_healthCheckGracePeriodSeconds(t *testing.T) { resourceName := "aws_ecs_service.with_alb" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -338,7 +338,7 @@ func TestAccAWSEcsService_withIamRole(t *testing.T) { policyName := fmt.Sprintf("tf-acc-policy-svc-w-iam-role-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-iam-role-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -361,7 +361,7 @@ func TestAccAWSEcsService_withDeploymentValues(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-dv-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-dv-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -391,7 +391,7 @@ func TestAccAWSEcsService_withLbChanges(t *testing.T) { policyName := fmt.Sprintf("tf-acc-policy-svc-w-lbc-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-lbc-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -421,7 +421,7 @@ func TestAccAWSEcsService_withEcsClusterName(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-cluster-name-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-cluster-name-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -449,7 +449,7 @@ func TestAccAWSEcsService_withAlb(t *testing.T) { lbName := fmt.Sprintf("tf-acc-lb-svc-w-alb-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-alb-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -473,7 +473,7 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-ps-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-ps-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -517,7 +517,7 @@ func TestAccAWSEcsService_withPlacementConstraints(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-pc-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-pc-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -541,7 +541,7 @@ func TestAccAWSEcsService_withPlacementConstraints_emptyExpression(t *testing.T) tdName := fmt.Sprintf("tf-acc-td-svc-w-pc-ee-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-pc-ee-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -624,7 +624,7 @@ func TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration(t *testing.T) tdName := fmt.Sprintf("tf-acc-td-svc-w-nc-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-nc-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -659,7 +659,7 @@ func TestAccAWSEcsService_withDaemonSchedulingStrategy(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-ss-daemon-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-ss-daemon-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -683,7 +683,7 @@ func TestAccAWSEcsService_withReplicaSchedulingStrategy(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-ss-replica-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-ss-replica-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -707,7 +707,7 @@ func TestAccAWSEcsService_withServiceRegistries(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-ups-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-ups-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, @@ -731,7 +731,7 @@ func TestAccAWSEcsService_withServiceRegistries_container(t *testing.T) { tdName := fmt.Sprintf("tf-acc-td-svc-w-ups-%s", rString) svcName := fmt.Sprintf("tf-acc-svc-w-ups-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsServiceDestroy, diff --git a/aws/resource_aws_ecs_task_definition_test.go b/aws/resource_aws_ecs_task_definition_test.go index eb62d1c950c..e3c7cdb3db1 100644 --- a/aws/resource_aws_ecs_task_definition_test.go +++ b/aws/resource_aws_ecs_task_definition_test.go @@ -17,7 +17,7 @@ func TestAccAWSEcsTaskDefinition_basic(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_basic_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -45,7 +45,7 @@ func TestAccAWSEcsTaskDefinition_withScratchVolume(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_with_scratch_volume_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -66,7 +66,7 @@ func TestAccAWSEcsTaskDefinition_withDockerVolume(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_with_docker_volume_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -109,7 +109,7 @@ func TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_with_docker_volume_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -138,7 +138,7 @@ func TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_with_docker_volume_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -172,7 +172,7 @@ func TestAccAWSEcsTaskDefinition_withEcsService(t *testing.T) { svcName := fmt.Sprintf("tf_acc_td_with_ecs_service_%s", rString) tdName := fmt.Sprintf("tf_acc_td_with_ecs_service_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -203,7 +203,7 @@ func TestAccAWSEcsTaskDefinition_withTaskRoleArn(t *testing.T) { policyName := fmt.Sprintf("tf-acc-policy-ecs-td-with-task-role-arn-%s", rString) tdName := fmt.Sprintf("tf_acc_td_with_task_role_arn_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -226,7 +226,7 @@ func TestAccAWSEcsTaskDefinition_withNetworkMode(t *testing.T) { policyName := fmt.Sprintf("tf_acc_ecs_td_with_network_mode_%s", rString) tdName := fmt.Sprintf("tf_acc_td_with_network_mode_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -249,7 +249,7 @@ func TestAccAWSEcsTaskDefinition_constraint(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_constraint_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -273,7 +273,7 @@ func TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_change_vol_forces_new_resource_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -302,7 +302,7 @@ func TestAccAWSEcsTaskDefinition_arrays(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_arrays_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -323,7 +323,7 @@ func TestAccAWSEcsTaskDefinition_Fargate(t *testing.T) { rString := acctest.RandString(8) tdName := fmt.Sprintf("tf_acc_td_fargate_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -354,7 +354,7 @@ func TestAccAWSEcsTaskDefinition_ExecutionRole(t *testing.T) { policyName := fmt.Sprintf("tf-acc-policy-ecs-td-execution-role-%s", rString) tdName := fmt.Sprintf("tf_acc_td_execution_role_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, @@ -383,7 +383,7 @@ func TestAccAWSEcsTaskDefinition_Inactive(t *testing.T) { }) } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEcsTaskDefinitionDestroy, diff --git a/aws/resource_aws_efs_file_system_test.go b/aws/resource_aws_efs_file_system_test.go index 9382471c375..b693d12feab 100644 --- a/aws/resource_aws_efs_file_system_test.go +++ b/aws/resource_aws_efs_file_system_test.go @@ -58,7 +58,7 @@ func TestAccAWSEFSFileSystem_importBasic(t *testing.T) { resourceName := "aws_efs_file_system.foo-with-tags" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsFileSystemDestroy, @@ -79,7 +79,7 @@ func TestAccAWSEFSFileSystem_importBasic(t *testing.T) { func TestAccAWSEFSFileSystem_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsFileSystemDestroy, @@ -150,7 +150,7 @@ func TestAccAWSEFSFileSystem_basic(t *testing.T) { func TestAccAWSEFSFileSystem_pagedTags(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsFileSystemDestroy, @@ -178,7 +178,7 @@ func TestAccAWSEFSFileSystem_pagedTags(t *testing.T) { func TestAccAWSEFSFileSystem_kmsKey(t *testing.T) { rInt := acctest.RandInt() keyRegex := regexp.MustCompile("^arn:aws:([a-zA-Z0-9\\-])+:([a-z]{2}-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsFileSystemDestroy, @@ -197,7 +197,7 @@ func TestAccAWSEFSFileSystem_kmsKey(t *testing.T) { func TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsFileSystemDestroy, @@ -213,7 +213,7 @@ func TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption(t *testing.T) { func TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps(t *testing.T) { resourceName := "aws_efs_file_system.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsFileSystemDestroy, @@ -247,7 +247,7 @@ func TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps(t *testing.T) { func TestAccAWSEFSFileSystem_ThroughputMode(t *testing.T) { resourceName := "aws_efs_file_system.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsFileSystemDestroy, diff --git a/aws/resource_aws_efs_mount_target_test.go b/aws/resource_aws_efs_mount_target_test.go index 6d18c0bcf7a..9b2a4d55375 100644 --- a/aws/resource_aws_efs_mount_target_test.go +++ b/aws/resource_aws_efs_mount_target_test.go @@ -19,7 +19,7 @@ func TestAccAWSEFSMountTarget_importBasic(t *testing.T) { resourceName := "aws_efs_mount_target.alpha" ct := fmt.Sprintf("createtoken-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsMountTargetDestroy, @@ -41,7 +41,7 @@ func TestAccAWSEFSMountTarget_basic(t *testing.T) { var mount efs.MountTargetDescription ct := fmt.Sprintf("createtoken-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEfsMountTargetDestroy, @@ -92,7 +92,7 @@ func TestAccAWSEFSMountTarget_disappears(t *testing.T) { ct := fmt.Sprintf("createtoken-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpnGatewayDestroy, diff --git a/aws/resource_aws_egress_only_internet_gateway_test.go b/aws/resource_aws_egress_only_internet_gateway_test.go index d81ff6b5742..f1c10bbdb49 100644 --- a/aws/resource_aws_egress_only_internet_gateway_test.go +++ b/aws/resource_aws_egress_only_internet_gateway_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSEgressOnlyInternetGateway_basic(t *testing.T) { var igw ec2.EgressOnlyInternetGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEgressOnlyInternetGatewayDestroy, diff --git a/aws/resource_aws_eip_association_test.go b/aws/resource_aws_eip_association_test.go index 362bfba13c1..536bc412f11 100644 --- a/aws/resource_aws_eip_association_test.go +++ b/aws/resource_aws_eip_association_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSEIPAssociation_importInstance(t *testing.T) { resourceName := "aws_eip_association.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPAssociationDestroy, @@ -35,7 +35,7 @@ func TestAccAWSEIPAssociation_importInstance(t *testing.T) { func TestAccAWSEIPAssociation_importNetworkInterface(t *testing.T) { resourceName := "aws_eip_association.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPAssociationDestroy, @@ -55,7 +55,7 @@ func TestAccAWSEIPAssociation_importNetworkInterface(t *testing.T) { func TestAccAWSEIPAssociation_basic(t *testing.T) { var a ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPAssociationDestroy, @@ -88,7 +88,7 @@ func TestAccAWSEIPAssociation_ec2Classic(t *testing.T) { os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldvar) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPAssociationDestroy, @@ -111,7 +111,7 @@ func TestAccAWSEIPAssociation_spotInstance(t *testing.T) { var a ec2.Address rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPAssociationDestroy, @@ -132,7 +132,7 @@ func TestAccAWSEIPAssociation_spotInstance(t *testing.T) { func TestAccAWSEIPAssociation_disappears(t *testing.T) { var a ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPAssociationDestroy, diff --git a/aws/resource_aws_eip_test.go b/aws/resource_aws_eip_test.go index d5293da4165..6bb7b21988d 100644 --- a/aws/resource_aws_eip_test.go +++ b/aws/resource_aws_eip_test.go @@ -21,7 +21,7 @@ func TestAccAWSEIP_importEc2Classic(t *testing.T) { resourceName := "aws_eip.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPDestroy, @@ -41,7 +41,7 @@ func TestAccAWSEIP_importEc2Classic(t *testing.T) { func TestAccAWSEIP_importVpc(t *testing.T) { resourceName := "aws_eip.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPDestroy, @@ -61,7 +61,7 @@ func TestAccAWSEIP_importVpc(t *testing.T) { func TestAccAWSEIP_basic(t *testing.T) { var conf ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_eip.bar", Providers: testAccProviders, @@ -81,7 +81,7 @@ func TestAccAWSEIP_basic(t *testing.T) { func TestAccAWSEIP_instance(t *testing.T) { var conf ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_eip.bar", Providers: testAccProviders, @@ -109,7 +109,7 @@ func TestAccAWSEIP_instance(t *testing.T) { func TestAccAWSEIP_network_interface(t *testing.T) { var conf ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_eip.bar", Providers: testAccProviders, @@ -130,7 +130,7 @@ func TestAccAWSEIP_network_interface(t *testing.T) { func TestAccAWSEIP_twoEIPsOneNetworkInterface(t *testing.T) { var one, two ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_eip.one", Providers: testAccProviders, @@ -156,7 +156,7 @@ func TestAccAWSEIP_twoEIPsOneNetworkInterface(t *testing.T) { func TestAccAWSEIP_associated_user_private_ip(t *testing.T) { var one ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_eip.bar", Providers: testAccProviders, @@ -190,7 +190,7 @@ func TestAccAWSEIP_classic_disassociate(t *testing.T) { os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldvar) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPDestroy, @@ -224,7 +224,7 @@ func TestAccAWSEIP_classic_disassociate(t *testing.T) { func TestAccAWSEIP_disappears(t *testing.T) { var conf ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEIPDestroy, @@ -244,7 +244,7 @@ func TestAccAWSEIP_disappears(t *testing.T) { func TestAccAWSEIPAssociate_not_associated(t *testing.T) { var conf ec2.Address - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_eip.bar", Providers: testAccProviders, @@ -276,7 +276,7 @@ func TestAccAWSEIP_tags(t *testing.T) { rName1 := fmt.Sprintf("%s-%d", t.Name(), acctest.RandInt()) rName2 := fmt.Sprintf("%s-%d", t.Name(), acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_eip.bar", Providers: testAccProviders, diff --git a/aws/resource_aws_eks_cluster_test.go b/aws/resource_aws_eks_cluster_test.go index 8d63b870ec8..dd5312d0c93 100644 --- a/aws/resource_aws_eks_cluster_test.go +++ b/aws/resource_aws_eks_cluster_test.go @@ -81,7 +81,7 @@ func TestAccAWSEksCluster_basic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_eks_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEksClusterDestroy, @@ -119,7 +119,7 @@ func TestAccAWSEksCluster_Version(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_eks_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEksClusterDestroy, @@ -146,7 +146,7 @@ func TestAccAWSEksCluster_VpcConfig_SecurityGroupIds(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_eks_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEksClusterDestroy, diff --git a/aws/resource_aws_elastic_beanstalk_application_test.go b/aws/resource_aws_elastic_beanstalk_application_test.go index 6d0a1dcabce..0d8a875bd17 100644 --- a/aws/resource_aws_elastic_beanstalk_application_test.go +++ b/aws/resource_aws_elastic_beanstalk_application_test.go @@ -83,7 +83,7 @@ func TestAWSElasticBeanstalkApplication_importBasic(t *testing.T) { resourceName := "aws_elastic_beanstalk_application.tftest" config := fmt.Sprintf("tf-test-name-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkAppDestroy, @@ -112,7 +112,7 @@ func TestAccAWSBeanstalkApp_basic(t *testing.T) { var app elasticbeanstalk.ApplicationDescription rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkAppDestroy, @@ -131,7 +131,7 @@ func TestAccAWSBeanstalkApp_appversionlifecycle(t *testing.T) { var app elasticbeanstalk.ApplicationDescription rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkAppDestroy, diff --git a/aws/resource_aws_elastic_beanstalk_application_version_test.go b/aws/resource_aws_elastic_beanstalk_application_version_test.go index 4b55d38a52d..81c5eeb6fcb 100644 --- a/aws/resource_aws_elastic_beanstalk_application_version_test.go +++ b/aws/resource_aws_elastic_beanstalk_application_version_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSBeanstalkAppVersion_basic(t *testing.T) { var appVersion elasticbeanstalk.ApplicationVersionDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckApplicationVersionDestroy, @@ -35,7 +35,7 @@ func TestAccAWSBeanstalkAppVersion_duplicateLabels(t *testing.T) { var firstAppVersion elasticbeanstalk.ApplicationVersionDescription var secondAppVersion elasticbeanstalk.ApplicationVersionDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckApplicationVersionDestroy, diff --git a/aws/resource_aws_elastic_beanstalk_configuration_template_test.go b/aws/resource_aws_elastic_beanstalk_configuration_template_test.go index 9af7123046b..a258ea0c724 100644 --- a/aws/resource_aws_elastic_beanstalk_configuration_template_test.go +++ b/aws/resource_aws_elastic_beanstalk_configuration_template_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSBeanstalkConfigurationTemplate_basic(t *testing.T) { var config elasticbeanstalk.ConfigurationSettingsDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkConfigurationTemplateDestroy, @@ -33,7 +33,7 @@ func TestAccAWSBeanstalkConfigurationTemplate_basic(t *testing.T) { func TestAccAWSBeanstalkConfigurationTemplate_VPC(t *testing.T) { var config elasticbeanstalk.ConfigurationSettingsDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkConfigurationTemplateDestroy, @@ -51,7 +51,7 @@ func TestAccAWSBeanstalkConfigurationTemplate_VPC(t *testing.T) { func TestAccAWSBeanstalkConfigurationTemplate_Setting(t *testing.T) { var config elasticbeanstalk.ConfigurationSettingsDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkConfigurationTemplateDestroy, diff --git a/aws/resource_aws_elastic_beanstalk_environment_test.go b/aws/resource_aws_elastic_beanstalk_environment_test.go index a411d1ff53a..3bbb568538f 100644 --- a/aws/resource_aws_elastic_beanstalk_environment_test.go +++ b/aws/resource_aws_elastic_beanstalk_environment_test.go @@ -119,7 +119,7 @@ func TestAWSElasticBeanstalkEnvironment_importBasic(t *testing.T) { applicationName := fmt.Sprintf("tf-test-name-%d", acctest.RandInt()) environmentName := fmt.Sprintf("tf-test-env-name-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkAppDestroy, @@ -157,7 +157,7 @@ func TestAccAWSBeanstalkEnv_basic(t *testing.T) { appName := fmt.Sprintf("tf_acc_app_env_basic_%s", rString) envName := fmt.Sprintf("tf-acc-env-basic-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -186,7 +186,7 @@ func TestAccAWSBeanstalkEnv_tier(t *testing.T) { appName := fmt.Sprintf("tf_acc_app_env_tier_%s", rString) envName := fmt.Sprintf("tf-acc-env-tier-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -215,7 +215,7 @@ func TestAccAWSBeanstalkEnv_outputs(t *testing.T) { appName := fmt.Sprintf("tf_acc_app_env_outputs_%s", rString) envName := fmt.Sprintf("tf-acc-env-outputs-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -248,7 +248,7 @@ func TestAccAWSBeanstalkEnv_cname_prefix(t *testing.T) { beanstalkCnameRegexp := regexp.MustCompile("^" + cnamePrefix + ".+?elasticbeanstalk.com$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -273,7 +273,7 @@ func TestAccAWSBeanstalkEnv_config(t *testing.T) { envName := fmt.Sprintf("tf-acc-env-config-%s", rString) cfgTplName := fmt.Sprintf("tf_acc_cfg_tpl_config_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -312,7 +312,7 @@ func TestAccAWSBeanstalkEnv_resource(t *testing.T) { appName := fmt.Sprintf("tf_acc_app_env_resource_%s", rString) envName := fmt.Sprintf("tf-acc-env-resource-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -334,7 +334,7 @@ func TestAccAWSBeanstalkEnv_tags(t *testing.T) { appName := fmt.Sprintf("tf_acc_app_env_resource_%s", rString) envName := fmt.Sprintf("tf-acc-env-resource-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -382,7 +382,7 @@ func TestAccAWSBeanstalkEnv_vpc(t *testing.T) { appName := fmt.Sprintf("tf_acc_app_env_vpc_%s", rString) envName := fmt.Sprintf("tf-acc-env-vpc-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -407,7 +407,7 @@ func TestAccAWSBeanstalkEnv_template_change(t *testing.T) { envName := fmt.Sprintf("tf-acc-env-tpl-change-%s", rString) cfgTplName := fmt.Sprintf("tf_acc_tpl_env_tpl_change_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -443,7 +443,7 @@ func TestAccAWSBeanstalkEnv_basic_settings_update(t *testing.T) { appName := fmt.Sprintf("tf_acc_app_env_basic_settings_upd_%s", rString) envName := fmt.Sprintf("tf-acc-env-basic-settings-upd-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -490,7 +490,7 @@ func TestAccAWSBeanstalkEnv_version_label(t *testing.T) { uAppVersionName := fmt.Sprintf("tf_acc_version_env_version_label_v2_%s", rString) envName := fmt.Sprintf("tf-acc-env-version-label-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -523,7 +523,7 @@ func TestAccAWSBeanstalkEnv_settingWithJsonValue(t *testing.T) { policyName := fmt.Sprintf("tf-acc-policy-beanstalk-env-setting-w-json-value-%s", rString) envName := fmt.Sprintf("tf-acc-env-setting-w-json-value-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, @@ -546,7 +546,7 @@ func TestAccAWSBeanstalkEnv_platformArn(t *testing.T) { envName := fmt.Sprintf("tf-acc-env-platform-arn-%s", rString) platformArn := "arn:aws:elasticbeanstalk:us-east-1::platform/Go 1 running on 64bit Amazon Linux/2.9.0" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckBeanstalkEnvDestroy, diff --git a/aws/resource_aws_elastic_transcoder_pipeline_test.go b/aws/resource_aws_elastic_transcoder_pipeline_test.go index d2e5f420ab4..3c7d5033315 100644 --- a/aws/resource_aws_elastic_transcoder_pipeline_test.go +++ b/aws/resource_aws_elastic_transcoder_pipeline_test.go @@ -19,7 +19,7 @@ import ( func TestAccAWSElasticTranscoderPipeline_basic(t *testing.T) { pipeline := &elastictranscoder.Pipeline{} - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elastictranscoder_pipeline.bar", Providers: testAccProviders, @@ -41,7 +41,7 @@ func TestAccAWSElasticTranscoderPipeline_kmsKey(t *testing.T) { config := fmt.Sprintf(awsElasticTranscoderPipelineConfigKmsKey, ri, ri, ri) keyRegex := regexp.MustCompile("^arn:aws:([a-zA-Z0-9\\-])+:([a-z]{2}-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elastictranscoder_pipeline.bar", Providers: testAccProviders, @@ -63,7 +63,7 @@ func TestAccAWSElasticTranscoderPipeline_notifications(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elastictranscoder_pipeline.bar", Providers: testAccProviders, @@ -128,7 +128,7 @@ func TestAccAWSElasticTranscoderPipeline_withContentConfig(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elastictranscoder_pipeline.bar", Providers: testAccProviders, @@ -155,7 +155,7 @@ func TestAccAWSElasticTranscoderPipeline_withPermissions(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elastictranscoder_pipeline.baz", Providers: testAccProviders, diff --git a/aws/resource_aws_elastic_transcoder_preset_test.go b/aws/resource_aws_elastic_transcoder_preset_test.go index 8877d9eebd0..94bd8410c71 100644 --- a/aws/resource_aws_elastic_transcoder_preset_test.go +++ b/aws/resource_aws_elastic_transcoder_preset_test.go @@ -53,7 +53,7 @@ func TestAccAWSElasticTranscoderPreset_basic(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckElasticTranscoderPresetDestroy, diff --git a/aws/resource_aws_elasticache_cluster_test.go b/aws/resource_aws_elasticache_cluster_test.go index c1f9d228f28..6482dc0f7bc 100644 --- a/aws/resource_aws_elasticache_cluster_test.go +++ b/aws/resource_aws_elasticache_cluster_test.go @@ -92,7 +92,7 @@ func TestAccAWSElasticacheCluster_Engine_Memcached_Ec2Classic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -126,7 +126,7 @@ func TestAccAWSElasticacheCluster_Engine_Redis_Ec2Classic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -154,7 +154,7 @@ func TestAccAWSElasticacheCluster_ParameterGroupName_Default(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -187,7 +187,7 @@ func TestAccAWSElasticacheCluster_Port_Ec2Classic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -214,7 +214,7 @@ func TestAccAWSElasticacheCluster_Port_Ec2Classic(t *testing.T) { func TestAccAWSElasticacheCluster_SecurityGroup(t *testing.T) { var ec elasticache.CacheCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -241,7 +241,7 @@ func TestAccAWSElasticacheCluster_snapshotsWithUpdates(t *testing.T) { preConfig := fmt.Sprintf(testAccAWSElasticacheClusterConfig_snapshots, ri, ri, acctest.RandString(10)) postConfig := fmt.Sprintf(testAccAWSElasticacheClusterConfig_snapshotsUpdated, ri, ri, acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -278,7 +278,7 @@ func TestAccAWSElasticacheCluster_NumCacheNodes_Decrease(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -306,7 +306,7 @@ func TestAccAWSElasticacheCluster_NumCacheNodes_Increase(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -334,7 +334,7 @@ func TestAccAWSElasticacheCluster_NumCacheNodes_IncreaseWithPreferredAvailabilit rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -362,7 +362,7 @@ func TestAccAWSElasticacheCluster_NumCacheNodes_IncreaseWithPreferredAvailabilit func TestAccAWSElasticacheCluster_vpc(t *testing.T) { var csg elasticache.CacheSubnetGroup var ec elasticache.CacheCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -384,7 +384,7 @@ func TestAccAWSElasticacheCluster_vpc(t *testing.T) { func TestAccAWSElasticacheCluster_multiAZInVpc(t *testing.T) { var csg elasticache.CacheSubnetGroup var ec elasticache.CacheCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -411,7 +411,7 @@ func TestAccAWSElasticacheCluster_AZMode_Memcached_Ec2Classic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -448,7 +448,7 @@ func TestAccAWSElasticacheCluster_AZMode_Redis_Ec2Classic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -481,7 +481,7 @@ func TestAccAWSElasticacheCluster_EngineVersion_Memcached_Ec2Classic(t *testing. rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -522,7 +522,7 @@ func TestAccAWSElasticacheCluster_EngineVersion_Redis_Ec2Classic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -563,7 +563,7 @@ func TestAccAWSElasticacheCluster_NodeTypeResize_Memcached_Ec2Classic(t *testing rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -596,7 +596,7 @@ func TestAccAWSElasticacheCluster_NodeTypeResize_Redis_Ec2Classic(t *testing.T) rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) resourceName := "aws_elasticache_cluster.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -627,7 +627,7 @@ func TestAccAWSElasticacheCluster_NumCacheNodes_Redis_Ec2Classic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -647,7 +647,7 @@ func TestAccAWSElasticacheCluster_ReplicationGroupID_InvalidAttributes(t *testin rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -735,7 +735,7 @@ func TestAccAWSElasticacheCluster_ReplicationGroupID_AvailabilityZone_Ec2Classic clusterResourceName := "aws_elasticache_cluster.replica" replicationGroupResourceName := "aws_elasticache_replication_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -763,7 +763,7 @@ func TestAccAWSElasticacheCluster_ReplicationGroupID_SingleReplica_Ec2Classic(t clusterResourceName := "aws_elasticache_cluster.replica" replicationGroupResourceName := "aws_elasticache_replication_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, @@ -795,7 +795,7 @@ func TestAccAWSElasticacheCluster_ReplicationGroupID_MultipleReplica_Ec2Classic( clusterResourceName2 := "aws_elasticache_cluster.replica.1" replicationGroupResourceName := "aws_elasticache_replication_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheClusterDestroy, diff --git a/aws/resource_aws_elasticache_parameter_group_test.go b/aws/resource_aws_elasticache_parameter_group_test.go index 98d93243b72..e3c992bea78 100644 --- a/aws/resource_aws_elasticache_parameter_group_test.go +++ b/aws/resource_aws_elasticache_parameter_group_test.go @@ -16,7 +16,7 @@ func TestAccAWSElasticacheParameterGroup_importBasic(t *testing.T) { resourceName := "aws_elasticache_parameter_group.bar" rName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheParameterGroupDestroy, @@ -38,7 +38,7 @@ func TestAccAWSElasticacheParameterGroup_basic(t *testing.T) { var v elasticache.CacheParameterGroup rName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheParameterGroupDestroy, @@ -89,7 +89,7 @@ func TestAccAWSElasticacheParameterGroup_only(t *testing.T) { var v elasticache.CacheParameterGroup rName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheParameterGroupDestroy, @@ -114,7 +114,7 @@ func TestAccAWSElasticacheParameterGroup_removeParam(t *testing.T) { var v elasticache.CacheParameterGroup rName := fmt.Sprintf("parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheParameterGroupDestroy, @@ -150,7 +150,7 @@ func TestAccAWSElasticacheParameterGroup_UppercaseName(t *testing.T) { rInt := acctest.RandInt() rName := fmt.Sprintf("TF-ELASTIPG-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheParameterGroupDestroy, diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index 3601a0c5ac2..0c05a4fb975 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -83,7 +83,7 @@ func TestAccAWSElasticacheReplicationGroup_importBasic(t *testing.T) { resourceName := "aws_elasticache_replication_group.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -105,7 +105,7 @@ func TestAccAWSElasticacheReplicationGroup_importBasic(t *testing.T) { func TestAccAWSElasticacheReplicationGroup_basic(t *testing.T) { var rg elasticache.ReplicationGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -132,7 +132,7 @@ func TestAccAWSElasticacheReplicationGroup_Uppercase(t *testing.T) { var rg elasticache.ReplicationGroup rStr := acctest.RandString(5) rgName := fmt.Sprintf("TF-ELASTIRG-%s", rStr) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -152,7 +152,7 @@ func TestAccAWSElasticacheReplicationGroup_Uppercase(t *testing.T) { func TestAccAWSElasticacheReplicationGroup_updateDescription(t *testing.T) { var rg elasticache.ReplicationGroup rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -189,7 +189,7 @@ func TestAccAWSElasticacheReplicationGroup_updateDescription(t *testing.T) { func TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow(t *testing.T) { var rg elasticache.ReplicationGroup rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -217,7 +217,7 @@ func TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow(t *testing.T) func TestAccAWSElasticacheReplicationGroup_updateNodeSize(t *testing.T) { var rg elasticache.ReplicationGroup rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -252,7 +252,7 @@ func TestAccAWSElasticacheReplicationGroup_updateParameterGroup(t *testing.T) { var rg elasticache.ReplicationGroup rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -280,7 +280,7 @@ func TestAccAWSElasticacheReplicationGroup_updateParameterGroup(t *testing.T) { func TestAccAWSElasticacheReplicationGroup_vpc(t *testing.T) { var rg elasticache.ReplicationGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -301,7 +301,7 @@ func TestAccAWSElasticacheReplicationGroup_vpc(t *testing.T) { func TestAccAWSElasticacheReplicationGroup_multiAzInVpc(t *testing.T) { var rg elasticache.ReplicationGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -328,7 +328,7 @@ func TestAccAWSElasticacheReplicationGroup_multiAzInVpc(t *testing.T) { func TestAccAWSElasticacheReplicationGroup_redisClusterInVpc2(t *testing.T) { var rg elasticache.ReplicationGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -358,7 +358,7 @@ func TestAccAWSElasticacheReplicationGroup_ClusterMode_Basic(t *testing.T) { rName := acctest.RandString(10) resourceName := "aws_elasticache_replication_group.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -384,7 +384,7 @@ func TestAccAWSElasticacheReplicationGroup_ClusterMode_NumNodeGroups(t *testing. rName := acctest.RandString(10) resourceName := "aws_elasticache_replication_group.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -427,7 +427,7 @@ func TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError(t rInt := acctest.RandInt() rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -444,7 +444,7 @@ func TestAccAWSElasticacheReplicationGroup_enableSnapshotting(t *testing.T) { var rg elasticache.ReplicationGroup rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -472,7 +472,7 @@ func TestAccAWSElasticacheReplicationGroup_enableSnapshotting(t *testing.T) { func TestAccAWSElasticacheReplicationGroup_enableAuthTokenTransitEncryption(t *testing.T) { var rg elasticache.ReplicationGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -491,7 +491,7 @@ func TestAccAWSElasticacheReplicationGroup_enableAuthTokenTransitEncryption(t *t func TestAccAWSElasticacheReplicationGroup_enableAtRestEncryption(t *testing.T) { var rg elasticache.ReplicationGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -513,7 +513,7 @@ func TestAccAWSElasticacheReplicationGroup_NumberCacheClusters(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(4)) resourceName := "aws_elasticache_replication_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -551,7 +551,7 @@ func TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFail rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(4)) resourceName := "aws_elasticache_replication_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, @@ -596,7 +596,7 @@ func TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFail rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(4)) resourceName := "aws_elasticache_replication_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheReplicationDestroy, diff --git a/aws/resource_aws_elasticache_security_group_test.go b/aws/resource_aws_elasticache_security_group_test.go index 4d41241454b..4b918024ec8 100644 --- a/aws/resource_aws_elasticache_security_group_test.go +++ b/aws/resource_aws_elasticache_security_group_test.go @@ -79,7 +79,7 @@ func testSweepElasticacheCacheSecurityGroups(region string) error { } func TestAccAWSElasticacheSecurityGroup_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheSecurityGroupDestroy, @@ -102,7 +102,7 @@ func TestAccAWSElasticacheSecurityGroup_Import(t *testing.T) { os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldRegion) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheSecurityGroupDestroy, diff --git a/aws/resource_aws_elasticache_subnet_group_test.go b/aws/resource_aws_elasticache_subnet_group_test.go index 30b504a79cf..c7cbcb5f9d1 100644 --- a/aws/resource_aws_elasticache_subnet_group_test.go +++ b/aws/resource_aws_elasticache_subnet_group_test.go @@ -16,7 +16,7 @@ func TestAccAWSElasticacheSubnetGroup_importBasic(t *testing.T) { resourceName := "aws_elasticache_subnet_group.bar" config := fmt.Sprintf(testAccAWSElasticacheSubnetGroupConfig, acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheSubnetGroupDestroy, @@ -40,7 +40,7 @@ func TestAccAWSElasticacheSubnetGroup_basic(t *testing.T) { var csg elasticache.CacheSubnetGroup config := fmt.Sprintf(testAccAWSElasticacheSubnetGroupConfig, acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheSubnetGroupDestroy, @@ -64,7 +64,7 @@ func TestAccAWSElasticacheSubnetGroup_update(t *testing.T) { preConfig := fmt.Sprintf(testAccAWSElasticacheSubnetGroupUpdateConfigPre, ri) postConfig := fmt.Sprintf(testAccAWSElasticacheSubnetGroupUpdateConfigPost, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSElasticacheSubnetGroupDestroy, diff --git a/aws/resource_aws_elasticsearch_domain_policy_test.go b/aws/resource_aws_elasticsearch_domain_policy_test.go index edf55b8b2d3..3e995234341 100644 --- a/aws/resource_aws_elasticsearch_domain_policy_test.go +++ b/aws/resource_aws_elasticsearch_domain_policy_test.go @@ -43,7 +43,7 @@ func TestAccAWSElasticSearchDomainPolicy_basic(t *testing.T) { }` name := fmt.Sprintf("tf-test-%d", ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, diff --git a/aws/resource_aws_elasticsearch_domain_test.go b/aws/resource_aws_elasticsearch_domain_test.go index cfa15a81cc9..aa9bddfc42e 100644 --- a/aws/resource_aws_elasticsearch_domain_test.go +++ b/aws/resource_aws_elasticsearch_domain_test.go @@ -76,7 +76,7 @@ func TestAccAWSElasticSearchDomain_basic(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -98,7 +98,7 @@ func TestAccAWSElasticSearchDomain_withDedicatedMaster(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -130,7 +130,7 @@ func TestAccAWSElasticSearchDomain_duplicate(t *testing.T) { ri := acctest.RandInt() name := fmt.Sprintf("tf-test-%d", ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: func(s *terraform.State) error { @@ -178,7 +178,7 @@ func TestAccAWSElasticSearchDomain_importBasic(t *testing.T) { ri := acctest.RandInt() resourceId := fmt.Sprintf("tf-test-%d", ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -200,7 +200,7 @@ func TestAccAWSElasticSearchDomain_v23(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -221,7 +221,7 @@ func TestAccAWSElasticSearchDomain_complex(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -240,7 +240,7 @@ func TestAccAWSElasticSearchDomain_vpc(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -259,7 +259,7 @@ func TestAccAWSElasticSearchDomain_vpc_update(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -286,7 +286,7 @@ func TestAccAWSElasticSearchDomain_internetToVpcEndpoint(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -309,7 +309,7 @@ func TestAccAWSElasticSearchDomain_internetToVpcEndpoint(t *testing.T) { func TestAccAWSElasticSearchDomain_LogPublishingOptions(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -328,7 +328,7 @@ func TestAccAWSElasticSearchDomain_CognitoOptionsCreateAndRemove(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -355,7 +355,7 @@ func TestAccAWSElasticSearchDomain_CognitoOptionsUpdate(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -391,7 +391,7 @@ func testAccCheckESNumberOfSecurityGroups(numberOfSecurityGroups int, status *el func TestAccAWSElasticSearchDomain_policy(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -409,7 +409,7 @@ func TestAccAWSElasticSearchDomain_policy(t *testing.T) { func TestAccAWSElasticSearchDomain_encrypt_at_rest_default_key(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -428,7 +428,7 @@ func TestAccAWSElasticSearchDomain_encrypt_at_rest_default_key(t *testing.T) { func TestAccAWSElasticSearchDomain_encrypt_at_rest_specify_key(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -447,7 +447,7 @@ func TestAccAWSElasticSearchDomain_encrypt_at_rest_specify_key(t *testing.T) { func TestAccAWSElasticSearchDomain_NodeToNodeEncryption(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -468,7 +468,7 @@ func TestAccAWSElasticSearchDomain_tags(t *testing.T) { var td elasticsearch.ListTagsOutput ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSELBDestroy, @@ -497,7 +497,7 @@ func TestAccAWSElasticSearchDomain_update(t *testing.T) { var input elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, @@ -525,7 +525,7 @@ func TestAccAWSElasticSearchDomain_update_volume_type(t *testing.T) { var input elasticsearch.ElasticsearchDomainStatus ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckESDomainDestroy, diff --git a/aws/resource_aws_elb_attachment_test.go b/aws/resource_aws_elb_attachment_test.go index d3c15b391e3..b699c4b6eed 100644 --- a/aws/resource_aws_elb_attachment_test.go +++ b/aws/resource_aws_elb_attachment_test.go @@ -22,7 +22,7 @@ func TestAccAWSELBAttachment_basic(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -93,7 +93,7 @@ func TestAccAWSELBAttachment_drift(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, diff --git a/aws/resource_aws_elb_test.go b/aws/resource_aws_elb_test.go index e7ecd62f638..f0abe4aac12 100644 --- a/aws/resource_aws_elb_test.go +++ b/aws/resource_aws_elb_test.go @@ -84,7 +84,7 @@ func testSweepELBs(region string) error { func TestAccAWSELB_importBasic(t *testing.T) { resourceName := "aws_elb.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSELBDestroy, @@ -105,7 +105,7 @@ func TestAccAWSELB_importBasic(t *testing.T) { func TestAccAWSELB_basic(t *testing.T) { var conf elb.LoadBalancerDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -148,7 +148,7 @@ func TestAccAWSELB_disappears(t *testing.T) { var loadBalancer elb.LoadBalancerDescription resourceName := "aws_elb.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSELBDestroy, @@ -170,7 +170,7 @@ func TestAccAWSELB_fullCharacterRange(t *testing.T) { lbName := fmt.Sprintf("Tf-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.foo", Providers: testAccProviders, @@ -193,7 +193,7 @@ func TestAccAWSELB_AccessLogs_enabled(t *testing.T) { rName := fmt.Sprintf("terraform-access-logs-bucket-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.foo", Providers: testAccProviders, @@ -238,7 +238,7 @@ func TestAccAWSELB_AccessLogs_disabled(t *testing.T) { rName := fmt.Sprintf("terraform-access-logs-bucket-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.foo", Providers: testAccProviders, @@ -282,7 +282,7 @@ func TestAccAWSELB_namePrefix(t *testing.T) { var conf elb.LoadBalancerDescription nameRegex := regexp.MustCompile("^test-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.test", Providers: testAccProviders, @@ -304,7 +304,7 @@ func TestAccAWSELB_generatedName(t *testing.T) { var conf elb.LoadBalancerDescription generatedNameRegexp := regexp.MustCompile("^tf-lb-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.foo", Providers: testAccProviders, @@ -326,7 +326,7 @@ func TestAccAWSELB_generatesNameForZeroValue(t *testing.T) { var conf elb.LoadBalancerDescription generatedNameRegexp := regexp.MustCompile("^tf-lb-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.foo", Providers: testAccProviders, @@ -347,7 +347,7 @@ func TestAccAWSELB_generatesNameForZeroValue(t *testing.T) { func TestAccAWSELB_availabilityZones(t *testing.T) { var conf elb.LoadBalancerDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -388,7 +388,7 @@ func TestAccAWSELB_tags(t *testing.T) { var conf elb.LoadBalancerDescription var td elb.TagDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -432,7 +432,7 @@ func TestAccAWSELB_Listener_SSLCertificateID_IAMServerCertificate(t *testing.T) return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSELBDestroy, @@ -459,7 +459,7 @@ func TestAccAWSELB_Listener_SSLCertificateID_IAMServerCertificate(t *testing.T) func TestAccAWSELB_swap_subnets(t *testing.T) { var conf elb.LoadBalancerDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.ourapp", Providers: testAccProviders, @@ -516,7 +516,7 @@ func TestAccAWSELB_InstanceAttaching(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -545,7 +545,7 @@ func TestAccAWSELB_listener(t *testing.T) { var conf elb.LoadBalancerDescription resourceName := "aws_elb.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, @@ -657,7 +657,7 @@ func TestAccAWSELB_listener(t *testing.T) { func TestAccAWSELB_HealthCheck(t *testing.T) { var conf elb.LoadBalancerDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -685,7 +685,7 @@ func TestAccAWSELB_HealthCheck(t *testing.T) { } func TestAccAWSELBUpdate_HealthCheck(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -712,7 +712,7 @@ func TestAccAWSELBUpdate_HealthCheck(t *testing.T) { func TestAccAWSELB_Timeout(t *testing.T) { var conf elb.LoadBalancerDescription - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -732,7 +732,7 @@ func TestAccAWSELB_Timeout(t *testing.T) { } func TestAccAWSELBUpdate_Timeout(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -759,7 +759,7 @@ func TestAccAWSELBUpdate_Timeout(t *testing.T) { } func TestAccAWSELB_ConnectionDraining(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -781,7 +781,7 @@ func TestAccAWSELB_ConnectionDraining(t *testing.T) { } func TestAccAWSELBUpdate_ConnectionDraining(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, @@ -822,7 +822,7 @@ func TestAccAWSELBUpdate_ConnectionDraining(t *testing.T) { } func TestAccAWSELB_SecurityGroups(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_elb.bar", Providers: testAccProviders, diff --git a/aws/resource_aws_emr_cluster_test.go b/aws/resource_aws_emr_cluster_test.go index 4084c559d7d..ae2961fcb3c 100644 --- a/aws/resource_aws_emr_cluster_test.go +++ b/aws/resource_aws_emr_cluster_test.go @@ -18,7 +18,7 @@ import ( func TestAccAWSEMRCluster_basic(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -38,7 +38,7 @@ func TestAccAWSEMRCluster_basic(t *testing.T) { func TestAccAWSEMRCluster_additionalInfo(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -58,7 +58,7 @@ func TestAccAWSEMRCluster_additionalInfo(t *testing.T) { func TestAccAWSEMRCluster_configurationsJson(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -78,7 +78,7 @@ func TestAccAWSEMRCluster_configurationsJson(t *testing.T) { func TestAccAWSEMRCluster_instance_group(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -98,7 +98,7 @@ func TestAccAWSEMRCluster_instance_group(t *testing.T) { func TestAccAWSEMRCluster_instance_group_EBSVolumeType_st1(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -120,7 +120,7 @@ func TestAccAWSEMRCluster_Kerberos_ClusterDedicatedKdc(t *testing.T) { r := acctest.RandInt() password := fmt.Sprintf("NeverKeepPasswordsInPlainText%d!", r) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -141,7 +141,7 @@ func TestAccAWSEMRCluster_Kerberos_ClusterDedicatedKdc(t *testing.T) { func TestAccAWSEMRCluster_security_config(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -159,7 +159,7 @@ func TestAccAWSEMRCluster_Step_Basic(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_emr_cluster.tf-test-cluster" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -186,7 +186,7 @@ func TestAccAWSEMRCluster_Step_Multiple(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_emr_cluster.tf-test-cluster" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -233,7 +233,7 @@ func TestAccAWSEMRCluster_bootstrap_ordering(t *testing.T) { "echo running on master node", } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -252,7 +252,7 @@ func TestAccAWSEMRCluster_bootstrap_ordering(t *testing.T) { func TestAccAWSEMRCluster_terminationProtected(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -289,7 +289,7 @@ func TestAccAWSEMRCluster_terminationProtected(t *testing.T) { func TestAccAWSEMRCluster_keepJob(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -309,7 +309,7 @@ func TestAccAWSEMRCluster_keepJob(t *testing.T) { func TestAccAWSEMRCluster_visibleToAllUsers(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -339,7 +339,7 @@ func TestAccAWSEMRCluster_s3Logging(t *testing.T) { r := acctest.RandInt() bucketName := fmt.Sprintf("s3n://tf-acc-test-%d/", r) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -358,7 +358,7 @@ func TestAccAWSEMRCluster_s3Logging(t *testing.T) { func TestAccAWSEMRCluster_tags(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -397,7 +397,7 @@ func TestAccAWSEMRCluster_tags(t *testing.T) { func TestAccAWSEMRCluster_root_volume_size(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, @@ -423,7 +423,7 @@ func TestAccAWSEMRCluster_root_volume_size(t *testing.T) { func TestAccAWSEMRCluster_custom_ami_id(t *testing.T) { var cluster emr.Cluster r := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrDestroy, diff --git a/aws/resource_aws_emr_instance_group_test.go b/aws/resource_aws_emr_instance_group_test.go index 1c63208dfb6..a492ee662a9 100644 --- a/aws/resource_aws_emr_instance_group_test.go +++ b/aws/resource_aws_emr_instance_group_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSEMRInstanceGroup_basic(t *testing.T) { var ig emr.InstanceGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrInstanceGroupDestroy, @@ -33,7 +33,7 @@ func TestAccAWSEMRInstanceGroup_basic(t *testing.T) { func TestAccAWSEMRInstanceGroup_zero_count(t *testing.T) { var ig emr.InstanceGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrInstanceGroupDestroy, @@ -53,7 +53,7 @@ func TestAccAWSEMRInstanceGroup_zero_count(t *testing.T) { func TestAccAWSEMRInstanceGroup_ebsBasic(t *testing.T) { var ig emr.InstanceGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSEmrInstanceGroupDestroy, diff --git a/aws/resource_aws_emr_security_configuration_test.go b/aws/resource_aws_emr_security_configuration_test.go index 7db333dcc65..71ae7cc8436 100644 --- a/aws/resource_aws_emr_security_configuration_test.go +++ b/aws/resource_aws_emr_security_configuration_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSEmrSecurityConfiguration_importBasic(t *testing.T) { resourceName := "aws_emr_security_configuration.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEmrSecurityConfigurationDestroy, @@ -32,7 +32,7 @@ func TestAccAWSEmrSecurityConfiguration_importBasic(t *testing.T) { } func TestAccAWSEmrSecurityConfiguration_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckEmrSecurityConfigurationDestroy, diff --git a/aws/resource_aws_flow_log_test.go b/aws/resource_aws_flow_log_test.go index 14e4bf98ecf..c6f1da505f1 100644 --- a/aws/resource_aws_flow_log_test.go +++ b/aws/resource_aws_flow_log_test.go @@ -16,7 +16,7 @@ func TestAccAWSFlowLog_importBasic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckFlowLogDestroy, @@ -39,7 +39,7 @@ func TestAccAWSFlowLog_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_flow_log.test_flow_log", Providers: testAccProviders, @@ -61,7 +61,7 @@ func TestAccAWSFlowLog_subnet(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_flow_log.test_flow_log_subnet", Providers: testAccProviders, diff --git a/aws/resource_aws_gamelift_alias_test.go b/aws/resource_aws_gamelift_alias_test.go index 2b72854269d..f370f735940 100644 --- a/aws/resource_aws_gamelift_alias_test.go +++ b/aws/resource_aws_gamelift_alias_test.go @@ -94,7 +94,7 @@ func TestAccAWSGameliftAlias_basic(t *testing.T) { uDescription := fmt.Sprintf("tf test updated description %s", rString) uMessage := fmt.Sprintf("tf test updated message %s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGameliftAliasDestroy, @@ -134,7 +134,7 @@ func TestAccAWSGameliftAlias_importBasic(t *testing.T) { description := fmt.Sprintf("tf test description %s", rString) message := fmt.Sprintf("tf test message %s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGameliftAliasDestroy, @@ -175,7 +175,7 @@ func TestAccAWSGameliftAlias_fleetRouting(t *testing.T) { launchPath := g.LaunchPath params := g.Parameters(33435) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGameliftAliasDestroy, diff --git a/aws/resource_aws_gamelift_build_test.go b/aws/resource_aws_gamelift_build_test.go index a8fc84464d1..a5595155250 100644 --- a/aws/resource_aws_gamelift_build_test.go +++ b/aws/resource_aws_gamelift_build_test.go @@ -82,7 +82,7 @@ func TestAccAWSGameliftBuild_basic(t *testing.T) { roleArn := *loc.RoleArn key := *loc.Key - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGameliftBuildDestroy, diff --git a/aws/resource_aws_gamelift_fleet_test.go b/aws/resource_aws_gamelift_fleet_test.go index fbc710690b1..72d36f0015b 100644 --- a/aws/resource_aws_gamelift_fleet_test.go +++ b/aws/resource_aws_gamelift_fleet_test.go @@ -263,7 +263,7 @@ func TestAccAWSGameliftFleet_basic(t *testing.T) { launchPath := g.LaunchPath params := g.Parameters(33435) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGameliftFleetDestroy, @@ -340,7 +340,7 @@ func TestAccAWSGameliftFleet_allFields(t *testing.T) { g.Parameters(33436), } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGameliftFleetDestroy, diff --git a/aws/resource_aws_glacier_vault_test.go b/aws/resource_aws_glacier_vault_test.go index b6614458fb3..5aa8621af8c 100644 --- a/aws/resource_aws_glacier_vault_test.go +++ b/aws/resource_aws_glacier_vault_test.go @@ -18,7 +18,7 @@ func TestAccAWSGlacierVault_importBasic(t *testing.T) { resourceName := "aws_glacier_vault.full" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlacierVaultDestroy, @@ -38,7 +38,7 @@ func TestAccAWSGlacierVault_importBasic(t *testing.T) { func TestAccAWSGlacierVault_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlacierVaultDestroy, @@ -55,7 +55,7 @@ func TestAccAWSGlacierVault_basic(t *testing.T) { func TestAccAWSGlacierVault_full(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlacierVaultDestroy, @@ -72,7 +72,7 @@ func TestAccAWSGlacierVault_full(t *testing.T) { func TestAccAWSGlacierVault_RemoveNotifications(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlacierVaultDestroy, diff --git a/aws/resource_aws_glue_catalog_database_test.go b/aws/resource_aws_glue_catalog_database_test.go index b049e4f8923..0eefd001098 100644 --- a/aws/resource_aws_glue_catalog_database_test.go +++ b/aws/resource_aws_glue_catalog_database_test.go @@ -16,7 +16,7 @@ func TestAccAWSGlueCatalogDatabase_importBasic(t *testing.T) { resourceName := "aws_glue_catalog_database.test" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueDatabaseDestroy, @@ -35,7 +35,7 @@ func TestAccAWSGlueCatalogDatabase_importBasic(t *testing.T) { func TestAccAWSGlueCatalogDatabase_full(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueDatabaseDestroy, @@ -138,7 +138,7 @@ func TestAccAWSGlueCatalogDatabase_recreates(t *testing.T) { resourceName := "aws_glue_catalog_database.test" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueDatabaseDestroy, diff --git a/aws/resource_aws_glue_catalog_table_test.go b/aws/resource_aws_glue_catalog_table_test.go index ce03ed4de43..014afa7b2b9 100644 --- a/aws/resource_aws_glue_catalog_table_test.go +++ b/aws/resource_aws_glue_catalog_table_test.go @@ -16,7 +16,7 @@ func TestAccAWSGlueCatalogTable_importBasic(t *testing.T) { resourceName := "aws_glue_catalog_table.test" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueTableDestroy, @@ -37,7 +37,7 @@ func TestAccAWSGlueCatalogTable_basic(t *testing.T) { rInt := acctest.RandInt() tableName := "aws_glue_catalog_table.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueTableDestroy, @@ -68,7 +68,7 @@ func TestAccAWSGlueCatalogTable_full(t *testing.T) { description := "A test table from terraform" tableName := "aws_glue_catalog_table.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueTableDestroy, @@ -126,7 +126,7 @@ func TestAccAWSGlueCatalogTable_update_addValues(t *testing.T) { description := "A test table from terraform" tableName := "aws_glue_catalog_table.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueTableDestroy, @@ -201,7 +201,7 @@ func TestAccAWSGlueCatalogTable_update_replaceValues(t *testing.T) { description := "A test table from terraform" tableName := "aws_glue_catalog_table.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckGlueTableDestroy, diff --git a/aws/resource_aws_glue_classifier_test.go b/aws/resource_aws_glue_classifier_test.go index 70b76c786bb..1d4b091d679 100644 --- a/aws/resource_aws_glue_classifier_test.go +++ b/aws/resource_aws_glue_classifier_test.go @@ -89,7 +89,7 @@ func TestAccAWSGlueClassifier_GrokClassifier(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_classifier.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueClassifierDestroy, @@ -135,7 +135,7 @@ func TestAccAWSGlueClassifier_GrokClassifier_CustomPatterns(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_classifier.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueClassifierDestroy, @@ -181,7 +181,7 @@ func TestAccAWSGlueClassifier_JsonClassifier(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_classifier.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueClassifierDestroy, @@ -223,7 +223,7 @@ func TestAccAWSGlueClassifier_TypeChange(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_classifier.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueClassifierDestroy, @@ -287,7 +287,7 @@ func TestAccAWSGlueClassifier_XmlClassifier(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_classifier.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueClassifierDestroy, diff --git a/aws/resource_aws_glue_connection_test.go b/aws/resource_aws_glue_connection_test.go index a2f15b2a2b2..85eda1e3042 100644 --- a/aws/resource_aws_glue_connection_test.go +++ b/aws/resource_aws_glue_connection_test.go @@ -79,7 +79,7 @@ func TestAccAWSGlueConnection_Basic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_connection.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueConnectionDestroy, @@ -111,7 +111,7 @@ func TestAccAWSGlueConnection_Description(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_connection.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueConnectionDestroy, @@ -145,7 +145,7 @@ func TestAccAWSGlueConnection_MatchCriteria(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_connection.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueConnectionDestroy, @@ -194,7 +194,7 @@ func TestAccAWSGlueConnection_PhysicalConnectionRequirements(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_connection.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueConnectionDestroy, diff --git a/aws/resource_aws_glue_crawler_test.go b/aws/resource_aws_glue_crawler_test.go index 0be52c41333..1d243965784 100644 --- a/aws/resource_aws_glue_crawler_test.go +++ b/aws/resource_aws_glue_crawler_test.go @@ -69,7 +69,7 @@ func TestAccAWSGlueCrawler_DynamodbTarget(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -130,7 +130,7 @@ func TestAccAWSGlueCrawler_JdbcTarget(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -195,7 +195,7 @@ func TestAccAWSGlueCrawler_JdbcTarget_Exclusions(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -233,7 +233,7 @@ func TestAccAWSGlueCrawler_JdbcTarget_Multiple(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -288,7 +288,7 @@ func TestAccAWSGlueCrawler_S3Target(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -351,7 +351,7 @@ func TestAccAWSGlueCrawler_S3Target_Exclusions(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -389,7 +389,7 @@ func TestAccAWSGlueCrawler_S3Target_Multiple(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -439,7 +439,7 @@ func TestAccAWSGlueCrawler_recreates(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -475,7 +475,7 @@ func TestAccAWSGlueCrawler_Classifiers(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -521,7 +521,7 @@ func TestAccAWSGlueCrawler_Configuration(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -554,7 +554,7 @@ func TestAccAWSGlueCrawler_Description(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -587,7 +587,7 @@ func TestAccAWSGlueCrawler_Schedule(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -620,7 +620,7 @@ func TestAccAWSGlueCrawler_SchemaChangePolicy(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, @@ -657,7 +657,7 @@ func TestAccAWSGlueCrawler_TablePrefix(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_glue_crawler.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueCrawlerDestroy, diff --git a/aws/resource_aws_glue_job_test.go b/aws/resource_aws_glue_job_test.go index 1872afe59ca..502edd78b6d 100644 --- a/aws/resource_aws_glue_job_test.go +++ b/aws/resource_aws_glue_job_test.go @@ -77,7 +77,7 @@ func TestAccAWSGlueJob_Basic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, @@ -109,7 +109,7 @@ func TestAccAWSGlueJob_AllocatedCapacity(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, @@ -147,7 +147,7 @@ func TestAccAWSGlueJob_Command(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, @@ -183,7 +183,7 @@ func TestAccAWSGlueJob_DefaultArguments(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, @@ -221,7 +221,7 @@ func TestAccAWSGlueJob_Description(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, @@ -255,7 +255,7 @@ func TestAccAWSGlueJob_ExecutionProperty(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, @@ -295,7 +295,7 @@ func TestAccAWSGlueJob_MaxRetries(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, @@ -333,7 +333,7 @@ func TestAccAWSGlueJob_Timeout(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_job.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueJobDestroy, diff --git a/aws/resource_aws_glue_trigger_test.go b/aws/resource_aws_glue_trigger_test.go index 36ecfaa9617..2e6e624c403 100644 --- a/aws/resource_aws_glue_trigger_test.go +++ b/aws/resource_aws_glue_trigger_test.go @@ -76,7 +76,7 @@ func TestAccAWSGlueTrigger_Basic(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_trigger.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueTriggerDestroy, @@ -110,7 +110,7 @@ func TestAccAWSGlueTrigger_Description(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_trigger.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueTriggerDestroy, @@ -144,7 +144,7 @@ func TestAccAWSGlueTrigger_Enabled(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_trigger.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueTriggerDestroy, @@ -185,7 +185,7 @@ func TestAccAWSGlueTrigger_Predicate(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_trigger.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueTriggerDestroy, @@ -227,7 +227,7 @@ func TestAccAWSGlueTrigger_Schedule(t *testing.T) { rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) resourceName := "aws_glue_trigger.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGlueTriggerDestroy, diff --git a/aws/resource_aws_iam_access_key_test.go b/aws/resource_aws_iam_access_key_test.go index ec7e7584429..877a9f7d287 100644 --- a/aws/resource_aws_iam_access_key_test.go +++ b/aws/resource_aws_iam_access_key_test.go @@ -19,7 +19,7 @@ func TestAccAWSAccessKey_basic(t *testing.T) { var conf iam.AccessKeyMetadata rName := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAccessKeyDestroy, @@ -40,7 +40,7 @@ func TestAccAWSAccessKey_encrypted(t *testing.T) { var conf iam.AccessKeyMetadata rName := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSAccessKeyDestroy, diff --git a/aws/resource_aws_iam_account_password_policy_test.go b/aws/resource_aws_iam_account_password_policy_test.go index 162b930e325..af11ae4a24b 100644 --- a/aws/resource_aws_iam_account_password_policy_test.go +++ b/aws/resource_aws_iam_account_password_policy_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSIAMAccountPasswordPolicy_importBasic(t *testing.T) { resourceName := "aws_iam_account_password_policy.default" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIAMAccountPasswordPolicyDestroy, @@ -34,7 +34,7 @@ func TestAccAWSIAMAccountPasswordPolicy_importBasic(t *testing.T) { func TestAccAWSIAMAccountPasswordPolicy_basic(t *testing.T) { var policy iam.GetAccountPasswordPolicyOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIAMAccountPasswordPolicyDestroy, diff --git a/aws/resource_aws_iam_group_membership_test.go b/aws/resource_aws_iam_group_membership_test.go index d4fa653234c..b6cab75e39a 100644 --- a/aws/resource_aws_iam_group_membership_test.go +++ b/aws/resource_aws_iam_group_membership_test.go @@ -23,7 +23,7 @@ func TestAccAWSGroupMembership_basic(t *testing.T) { userName3 := fmt.Sprintf("tf-acc-user-gm-basic-three-%s", rString) membershipName := fmt.Sprintf("tf-acc-membership-gm-basic-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGroupMembershipDestroy, @@ -63,7 +63,7 @@ func TestAccAWSGroupMembership_paginatedUserList(t *testing.T) { membershipName := fmt.Sprintf("tf-acc-membership-gm-pul-%s", rString) userNamePrefix := fmt.Sprintf("tf-acc-user-gm-pul-%s-", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGroupMembershipDestroy, diff --git a/aws/resource_aws_iam_group_policy_attachment_test.go b/aws/resource_aws_iam_group_policy_attachment_test.go index 9adbc6da5c0..7f2561c72d1 100644 --- a/aws/resource_aws_iam_group_policy_attachment_test.go +++ b/aws/resource_aws_iam_group_policy_attachment_test.go @@ -21,7 +21,7 @@ func TestAccAWSIAMGroupPolicyAttachment_basic(t *testing.T) { policyName2 := fmt.Sprintf("tf-acc-policy-gpa-basic-2-%s", rString) policyName3 := fmt.Sprintf("tf-acc-policy-gpa-basic-3-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGroupPolicyAttachmentDestroy, diff --git a/aws/resource_aws_iam_group_policy_test.go b/aws/resource_aws_iam_group_policy_test.go index a341f79aa53..9a24dd7167d 100644 --- a/aws/resource_aws_iam_group_policy_test.go +++ b/aws/resource_aws_iam_group_policy_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSIAMGroupPolicy_basic(t *testing.T) { var groupPolicy1, groupPolicy2 iam.GetGroupPolicyOutput rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMGroupPolicyDestroy, @@ -49,7 +49,7 @@ func TestAccAWSIAMGroupPolicy_basic(t *testing.T) { func TestAccAWSIAMGroupPolicy_namePrefix(t *testing.T) { var groupPolicy1, groupPolicy2 iam.GetGroupPolicyOutput rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_iam_group_policy.test", Providers: testAccProviders, @@ -83,7 +83,7 @@ func TestAccAWSIAMGroupPolicy_namePrefix(t *testing.T) { func TestAccAWSIAMGroupPolicy_generatedName(t *testing.T) { var groupPolicy1, groupPolicy2 iam.GetGroupPolicyOutput rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_iam_group_policy.test", Providers: testAccProviders, diff --git a/aws/resource_aws_iam_group_test.go b/aws/resource_aws_iam_group_test.go index 8a5324db398..35b0ef223c8 100644 --- a/aws/resource_aws_iam_group_test.go +++ b/aws/resource_aws_iam_group_test.go @@ -56,7 +56,7 @@ func TestAccAWSIAMGroup_importBasic(t *testing.T) { rString := acctest.RandString(8) groupName := fmt.Sprintf("tf-acc-group-import-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGroupDestroy, @@ -81,7 +81,7 @@ func TestAccAWSIAMGroup_basic(t *testing.T) { groupName := fmt.Sprintf("tf-acc-group-basic-%s", rString) groupName2 := fmt.Sprintf("tf-acc-group-basic-2-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSGroupDestroy, diff --git a/aws/resource_aws_iam_instance_profile_test.go b/aws/resource_aws_iam_instance_profile_test.go index f60c4584fbc..ca840b25b56 100644 --- a/aws/resource_aws_iam_instance_profile_test.go +++ b/aws/resource_aws_iam_instance_profile_test.go @@ -18,7 +18,7 @@ func TestAccAWSIAMInstanceProfile_importBasic(t *testing.T) { resourceName := "aws_iam_instance_profile.test" rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSInstanceProfileDestroy, @@ -41,7 +41,7 @@ func TestAccAWSIAMInstanceProfile_basic(t *testing.T) { var conf iam.GetInstanceProfileOutput rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -59,7 +59,7 @@ func TestAccAWSIAMInstanceProfile_withRoleNotRoles(t *testing.T) { var conf iam.GetInstanceProfileOutput rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -75,7 +75,7 @@ func TestAccAWSIAMInstanceProfile_withRoleNotRoles(t *testing.T) { func TestAccAWSIAMInstanceProfile_missingRoleThrowsError(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -91,7 +91,7 @@ func TestAccAWSIAMInstanceProfile_namePrefix(t *testing.T) { var conf iam.GetInstanceProfileOutput rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_iam_instance_profile.test", IDRefreshIgnore: []string{"name_prefix"}, diff --git a/aws/resource_aws_iam_openid_connect_provider_test.go b/aws/resource_aws_iam_openid_connect_provider_test.go index 0b9626b35c9..be2b8237b08 100644 --- a/aws/resource_aws_iam_openid_connect_provider_test.go +++ b/aws/resource_aws_iam_openid_connect_provider_test.go @@ -16,7 +16,7 @@ func TestAccAWSIAMOpenIDConnectProvider_basic(t *testing.T) { rString := acctest.RandString(5) url := "accounts.google.com/" + rString - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMOpenIDConnectProviderDestroy, @@ -53,7 +53,7 @@ func TestAccAWSIAMOpenIDConnectProvider_importBasic(t *testing.T) { resourceName := "aws_iam_openid_connect_provider.goog" rString := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMOpenIDConnectProviderDestroy, @@ -74,7 +74,7 @@ func TestAccAWSIAMOpenIDConnectProvider_importBasic(t *testing.T) { func TestAccAWSIAMOpenIDConnectProvider_disappears(t *testing.T) { rString := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMOpenIDConnectProviderDestroy, diff --git a/aws/resource_aws_iam_policy_attachment_test.go b/aws/resource_aws_iam_policy_attachment_test.go index 338c6464f2a..198006ef630 100644 --- a/aws/resource_aws_iam_policy_attachment_test.go +++ b/aws/resource_aws_iam_policy_attachment_test.go @@ -27,7 +27,7 @@ func TestAccAWSIAMPolicyAttachment_basic(t *testing.T) { policyName := fmt.Sprintf("tf-acc-policy-pa-basic-%s", rString) attachmentName := fmt.Sprintf("tf-acc-attachment-pa-basic-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSPolicyAttachmentDestroy, @@ -62,7 +62,7 @@ func TestAccAWSIAMPolicyAttachment_paginatedEntities(t *testing.T) { policyName := fmt.Sprintf("tf-acc-policy-pa-pe-%s-", rString) attachmentName := fmt.Sprintf("tf-acc-attachment-pa-pe-%s-", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSPolicyAttachmentDestroy, diff --git a/aws/resource_aws_iam_policy_test.go b/aws/resource_aws_iam_policy_test.go index 88da6113d29..59b069b8e91 100644 --- a/aws/resource_aws_iam_policy_test.go +++ b/aws/resource_aws_iam_policy_test.go @@ -17,7 +17,7 @@ func TestAccAWSIAMPolicy_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_iam_policy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIAMPolicyDestroy, @@ -47,7 +47,7 @@ func TestAccAWSIAMPolicy_description(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_iam_policy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIAMPolicyDestroy, @@ -73,7 +73,7 @@ func TestAccAWSIAMPolicy_namePrefix(t *testing.T) { namePrefix := "tf-acc-test-" resourceName := "aws_iam_policy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIAMPolicyDestroy, @@ -100,7 +100,7 @@ func TestAccAWSIAMPolicy_path(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_iam_policy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIAMPolicyDestroy, @@ -128,7 +128,7 @@ func TestAccAWSIAMPolicy_policy(t *testing.T) { policy1 := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"ec2:Describe*\"],\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" policy2 := "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"ec2:*\"],\"Effect\":\"Allow\",\"Resource\":\"*\"}]}" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIAMPolicyDestroy, diff --git a/aws/resource_aws_iam_role_policy_attachment_test.go b/aws/resource_aws_iam_role_policy_attachment_test.go index 11c1c66aefe..6f0918629fd 100644 --- a/aws/resource_aws_iam_role_policy_attachment_test.go +++ b/aws/resource_aws_iam_role_policy_attachment_test.go @@ -19,7 +19,7 @@ func TestAccAWSRolePolicyAttachment_basic(t *testing.T) { testPolicy2 := fmt.Sprintf("tf-acctest2-%d", rInt) testPolicy3 := fmt.Sprintf("tf-acctest3-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRolePolicyAttachmentDestroy, diff --git a/aws/resource_aws_iam_role_policy_test.go b/aws/resource_aws_iam_role_policy_test.go index 15a683c3255..32c2cd969f8 100644 --- a/aws/resource_aws_iam_role_policy_test.go +++ b/aws/resource_aws_iam_role_policy_test.go @@ -18,7 +18,7 @@ func TestAccAWSIAMRolePolicy_importBasic(t *testing.T) { suffix := randomString(10) resourceName := fmt.Sprintf("aws_iam_role_policy.foo_%s", suffix) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMRolePolicyDestroy, @@ -42,7 +42,7 @@ func TestAccAWSIAMRolePolicy_basic(t *testing.T) { policy1 := acctest.RandString(10) policy2 := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMRolePolicyDestroy, @@ -82,7 +82,7 @@ func TestAccAWSIAMRolePolicy_namePrefix(t *testing.T) { var rolePolicy1, rolePolicy2 iam.GetRolePolicyOutput role := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_iam_role_policy.test", Providers: testAccProviders, @@ -117,7 +117,7 @@ func TestAccAWSIAMRolePolicy_generatedName(t *testing.T) { var rolePolicy1, rolePolicy2 iam.GetRolePolicyOutput role := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_iam_role_policy.test", Providers: testAccProviders, @@ -151,7 +151,7 @@ func TestAccAWSIAMRolePolicy_generatedName(t *testing.T) { func TestAccAWSIAMRolePolicy_invalidJSON(t *testing.T) { role := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMRolePolicyDestroy, diff --git a/aws/resource_aws_iam_role_test.go b/aws/resource_aws_iam_role_test.go index 9dc5234058f..0c2bfc4cbe8 100644 --- a/aws/resource_aws_iam_role_test.go +++ b/aws/resource_aws_iam_role_test.go @@ -19,7 +19,7 @@ func TestAccAWSIAMRole_importBasic(t *testing.T) { resourceName := "aws_iam_role.role" rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -41,7 +41,7 @@ func TestAccAWSIAMRole_basic(t *testing.T) { var conf iam.GetRoleOutput rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -62,7 +62,7 @@ func TestAccAWSIAMRole_basicWithDescription(t *testing.T) { var conf iam.GetRoleOutput rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -99,7 +99,7 @@ func TestAccAWSIAMRole_namePrefix(t *testing.T) { var conf iam.GetRoleOutput rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_iam_role.role", IDRefreshIgnore: []string{"name_prefix"}, @@ -122,7 +122,7 @@ func TestAccAWSIAMRole_testNameChange(t *testing.T) { var conf iam.GetRoleOutput rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -147,7 +147,7 @@ func TestAccAWSIAMRole_testNameChange(t *testing.T) { func TestAccAWSIAMRole_badJSON(t *testing.T) { rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -166,7 +166,7 @@ func TestAccAWSIAMRole_disappears(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_iam_role.role" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -187,7 +187,7 @@ func TestAccAWSIAMRole_force_detach_policies(t *testing.T) { var conf iam.GetRoleOutput rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -208,7 +208,7 @@ func TestAccAWSIAMRole_MaxSessionDuration(t *testing.T) { rName := acctest.RandString(10) resourceName := "aws_iam_role.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRoleDestroy, @@ -253,7 +253,7 @@ func TestAccAWSIAMRole_PermissionsBoundary(t *testing.T) { permissionsBoundary1 := fmt.Sprintf("arn:%s:iam::aws:policy/AdministratorAccess", testAccGetPartition()) permissionsBoundary2 := fmt.Sprintf("arn:%s:iam::aws:policy/ReadOnlyAccess", testAccGetPartition()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserDestroy, diff --git a/aws/resource_aws_iam_saml_provider_test.go b/aws/resource_aws_iam_saml_provider_test.go index d3fe2064f3c..cb929eb7d9d 100644 --- a/aws/resource_aws_iam_saml_provider_test.go +++ b/aws/resource_aws_iam_saml_provider_test.go @@ -15,7 +15,7 @@ func TestAccAWSIAMSamlProvider_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_iam_saml_provider.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMSamlProviderDestroy, diff --git a/aws/resource_aws_iam_server_certificate_test.go b/aws/resource_aws_iam_server_certificate_test.go index c8a324306bd..15dcdbc0a6f 100644 --- a/aws/resource_aws_iam_server_certificate_test.go +++ b/aws/resource_aws_iam_server_certificate_test.go @@ -73,7 +73,7 @@ func TestAccAWSIAMServerCertificate_importBasic(t *testing.T) { rInt := acctest.RandInt() resourceId := fmt.Sprintf("terraform-test-cert-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckIAMServerCertificateDestroy, @@ -98,7 +98,7 @@ func TestAccAWSIAMServerCertificate_basic(t *testing.T) { rInt := acctest.RandInt() var certBody string - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckIAMServerCertificateDestroy, @@ -120,7 +120,7 @@ func TestAccAWSIAMServerCertificate_name_prefix(t *testing.T) { var certBody string rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckIAMServerCertificateDestroy, @@ -155,7 +155,7 @@ func TestAccAWSIAMServerCertificate_disappears(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckIAMServerCertificateDestroy, @@ -179,7 +179,7 @@ func TestAccAWSIAMServerCertificate_file(t *testing.T) { unixFile := "test-fixtures/iam-ssl-unix-line-endings.pem" winFile := "test-fixtures/iam-ssl-windows-line-endings.pem.winfile" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMServerCertificateDestroy, diff --git a/aws/resource_aws_iam_service_linked_role_test.go b/aws/resource_aws_iam_service_linked_role_test.go index a2781f8d114..c7aa3ed119a 100644 --- a/aws/resource_aws_iam_service_linked_role_test.go +++ b/aws/resource_aws_iam_service_linked_role_test.go @@ -131,7 +131,7 @@ func TestAccAWSIAMServiceLinkedRole_basic(t *testing.T) { name := "AWSServiceRoleForElasticBeanstalk" path := fmt.Sprintf("/aws-service-role/%s/", awsServiceName) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -182,7 +182,7 @@ func TestAccAWSIAMServiceLinkedRole_CustomSuffix(t *testing.T) { name := fmt.Sprintf("AWSServiceRoleForAutoScaling_%s", customSuffix) path := fmt.Sprintf("/aws-service-role/%s/", awsServiceName) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -211,7 +211,7 @@ func TestAccAWSIAMServiceLinkedRole_Description(t *testing.T) { awsServiceName := "autoscaling.amazonaws.com" customSuffix := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_iam_user_group_membership_test.go b/aws/resource_aws_iam_user_group_membership_test.go index a0138df09e7..30661d68ba0 100644 --- a/aws/resource_aws_iam_user_group_membership_test.go +++ b/aws/resource_aws_iam_user_group_membership_test.go @@ -22,7 +22,7 @@ func TestAccAWSUserGroupMembership_basic(t *testing.T) { usersAndGroupsConfig := testAccAWSUserGroupMembershipConfigUsersAndGroups(userName1, userName2, groupName1, groupName2, groupName3) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccAWSUserGroupMembershipDestroy, diff --git a/aws/resource_aws_iam_user_login_profile_test.go b/aws/resource_aws_iam_user_login_profile_test.go index b4013af7424..5030b19bd6d 100644 --- a/aws/resource_aws_iam_user_login_profile_test.go +++ b/aws/resource_aws_iam_user_login_profile_test.go @@ -60,7 +60,7 @@ func TestAccAWSUserLoginProfile_basic(t *testing.T) { username := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, @@ -81,7 +81,7 @@ func TestAccAWSUserLoginProfile_keybase(t *testing.T) { username := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, @@ -101,7 +101,7 @@ func TestAccAWSUserLoginProfile_keybase(t *testing.T) { func TestAccAWSUserLoginProfile_keybaseDoesntExist(t *testing.T) { username := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, @@ -118,7 +118,7 @@ func TestAccAWSUserLoginProfile_keybaseDoesntExist(t *testing.T) { func TestAccAWSUserLoginProfile_notAKey(t *testing.T) { username := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, @@ -137,7 +137,7 @@ func TestAccAWSUserLoginProfile_PasswordLength(t *testing.T) { username := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserLoginProfileDestroy, diff --git a/aws/resource_aws_iam_user_policy_attachment_test.go b/aws/resource_aws_iam_user_policy_attachment_test.go index 8958b5c7167..eeff653d6d7 100644 --- a/aws/resource_aws_iam_user_policy_attachment_test.go +++ b/aws/resource_aws_iam_user_policy_attachment_test.go @@ -19,7 +19,7 @@ func TestAccAWSUserPolicyAttachment_basic(t *testing.T) { policyName2 := fmt.Sprintf("test-policy-%s", acctest.RandString(10)) policyName3 := fmt.Sprintf("test-policy-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserPolicyAttachmentDestroy, diff --git a/aws/resource_aws_iam_user_policy_test.go b/aws/resource_aws_iam_user_policy_test.go index 8b398dad960..a72db023107 100644 --- a/aws/resource_aws_iam_user_policy_test.go +++ b/aws/resource_aws_iam_user_policy_test.go @@ -18,7 +18,7 @@ func TestAccAWSIAMUserPolicy_importBasic(t *testing.T) { suffix := randomString(10) resourceName := fmt.Sprintf("aws_iam_user_policy.foo_%s", suffix) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMUserPolicyDestroy, @@ -45,7 +45,7 @@ func TestAccAWSIAMUserPolicy_basic(t *testing.T) { userResourceName := "aws_iam_user.user" userName := fmt.Sprintf("test_user_%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMUserPolicyDestroy, @@ -86,7 +86,7 @@ func TestAccAWSIAMUserPolicy_namePrefix(t *testing.T) { userResourceName := "aws_iam_user.user" userName := fmt.Sprintf("test_user_%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: policyResourceName, Providers: testAccProviders, @@ -122,7 +122,7 @@ func TestAccAWSIAMUserPolicy_generatedName(t *testing.T) { userResourceName := "aws_iam_user.user" userName := fmt.Sprintf("test_user_%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: policyResourceName, Providers: testAccProviders, @@ -159,7 +159,7 @@ func TestAccAWSIAMUserPolicy_multiplePolicies(t *testing.T) { policyResourceName2 := "aws_iam_user_policy.bar" userResourceName := "aws_iam_user.user" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckIAMUserPolicyDestroy, diff --git a/aws/resource_aws_iam_user_ssh_key_test.go b/aws/resource_aws_iam_user_ssh_key_test.go index b17b78ac10a..f2e4b3034a8 100644 --- a/aws/resource_aws_iam_user_ssh_key_test.go +++ b/aws/resource_aws_iam_user_ssh_key_test.go @@ -18,7 +18,7 @@ func TestAccAWSUserSSHKey_basic(t *testing.T) { ri := acctest.RandInt() config := fmt.Sprintf(testAccAWSSSHKeyConfig_sshEncoding, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserSSHKeyDestroy, @@ -39,7 +39,7 @@ func TestAccAWSUserSSHKey_pemEncoding(t *testing.T) { ri := acctest.RandInt() config := fmt.Sprintf(testAccAWSSSHKeyConfig_pemEncoding, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserSSHKeyDestroy, diff --git a/aws/resource_aws_iam_user_test.go b/aws/resource_aws_iam_user_test.go index 87663c22f9b..2a38e81f32d 100644 --- a/aws/resource_aws_iam_user_test.go +++ b/aws/resource_aws_iam_user_test.go @@ -53,7 +53,7 @@ func TestAccAWSUser_importBasic(t *testing.T) { n := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserDestroy, @@ -81,7 +81,7 @@ func TestAccAWSUser_basic(t *testing.T) { path1 := "/" path2 := "/path2/" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserDestroy, @@ -110,7 +110,7 @@ func TestAccAWSUser_disappears(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_iam_user.user" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserDestroy, @@ -134,7 +134,7 @@ func TestAccAWSUser_nameChange(t *testing.T) { name2 := fmt.Sprintf("test-user-%d", acctest.RandInt()) path := "/" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserDestroy, @@ -162,7 +162,7 @@ func TestAccAWSUser_pathChange(t *testing.T) { path1 := "/" path2 := "/updated/" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserDestroy, @@ -192,7 +192,7 @@ func TestAccAWSUser_permissionsBoundary(t *testing.T) { permissionsBoundary1 := fmt.Sprintf("arn:%s:iam::aws:policy/AdministratorAccess", testAccGetPartition()) permissionsBoundary2 := fmt.Sprintf("arn:%s:iam::aws:policy/ReadOnlyAccess", testAccGetPartition()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSUserDestroy, diff --git a/aws/resource_aws_inspector_assessment_target_test.go b/aws/resource_aws_inspector_assessment_target_test.go index 5f8f019e8b2..378a1c41688 100644 --- a/aws/resource_aws_inspector_assessment_target_test.go +++ b/aws/resource_aws_inspector_assessment_target_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSInspectorTarget_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSInspectorTargetAssessmentDestroy, diff --git a/aws/resource_aws_inspector_assessment_template_test.go b/aws/resource_aws_inspector_assessment_template_test.go index 6b915eb674a..ae47c6f767e 100644 --- a/aws/resource_aws_inspector_assessment_template_test.go +++ b/aws/resource_aws_inspector_assessment_template_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSInspectorTemplate_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSInspectorTemplateDestroy, diff --git a/aws/resource_aws_inspector_resource_group_test.go b/aws/resource_aws_inspector_resource_group_test.go index 57c954c2153..655fa2e42be 100644 --- a/aws/resource_aws_inspector_resource_group_test.go +++ b/aws/resource_aws_inspector_resource_group_test.go @@ -9,7 +9,7 @@ import ( ) func TestAccAWSInspectorResourceGroup_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_instance_test.go b/aws/resource_aws_instance_test.go index a32328e067d..fcb2471edc9 100644 --- a/aws/resource_aws_instance_test.go +++ b/aws/resource_aws_instance_test.go @@ -143,7 +143,7 @@ func TestFetchRootDevice(t *testing.T) { func TestAccAWSInstance_importBasic(t *testing.T) { resourceName := "aws_instance.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -166,7 +166,7 @@ func TestAccAWSInstance_importInDefaultVpcBySgName(t *testing.T) { resourceName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -188,7 +188,7 @@ func TestAccAWSInstance_importInDefaultVpcBySgId(t *testing.T) { resourceName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -215,7 +215,7 @@ func TestAccAWSInstance_importInEc2Classic(t *testing.T) { os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldvar) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -258,7 +258,7 @@ func TestAccAWSInstance_basic(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -334,7 +334,7 @@ func TestAccAWSInstance_userDataBase64(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -376,7 +376,7 @@ func TestAccAWSInstance_GP2IopsDevice(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"ephemeral_block_device", "user_data"}, @@ -406,7 +406,7 @@ func TestAccAWSInstance_GP2IopsDevice(t *testing.T) { func TestAccAWSInstance_GP2WithIopsValue(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"ephemeral_block_device", "user_data"}, @@ -462,7 +462,7 @@ func TestAccAWSInstance_blockDevices(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"ephemeral_block_device"}, @@ -524,7 +524,7 @@ func TestAccAWSInstance_blockDevices(t *testing.T) { func TestAccAWSInstance_rootInstanceStore(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -591,7 +591,7 @@ func TestAccAWSInstance_noAMIEphemeralDevices(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"ephemeral_block_device"}, @@ -669,7 +669,7 @@ func TestAccAWSInstance_sourceDestCheck(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -723,7 +723,7 @@ func TestAccAWSInstance_disableApiTermination(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -751,7 +751,7 @@ func TestAccAWSInstance_disableApiTermination(t *testing.T) { func TestAccAWSInstance_vpc(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"associate_public_ip_address"}, @@ -777,7 +777,7 @@ func TestAccAWSInstance_placementGroup(t *testing.T) { var v ec2.Instance rStr := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"associate_public_ip_address"}, @@ -802,7 +802,7 @@ func TestAccAWSInstance_placementGroup(t *testing.T) { func TestAccAWSInstance_ipv6_supportAddressCount(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -824,7 +824,7 @@ func TestAccAWSInstance_ipv6_supportAddressCount(t *testing.T) { func TestAccAWSInstance_ipv6AddressCountAndSingleAddressCausesError(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -840,7 +840,7 @@ func TestAccAWSInstance_ipv6AddressCountAndSingleAddressCausesError(t *testing.T func TestAccAWSInstance_ipv6_supportAddressCountWithIpv4(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -867,7 +867,7 @@ func TestAccAWSInstance_multipleRegions(t *testing.T) { // check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories(&providers), CheckDestroy: testAccCheckWithProviders(testAccCheckInstanceDestroyWithProvider, &providers), @@ -890,7 +890,7 @@ func TestAccAWSInstance_NetworkInstanceSecurityGroups(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo_instance", IDRefreshIgnore: []string{"associate_public_ip_address"}, @@ -913,7 +913,7 @@ func TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo_instance", Providers: testAccProviders, @@ -951,7 +951,7 @@ func TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo_instance", Providers: testAccProviders, @@ -975,7 +975,7 @@ func TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs(t *testing.T) { func TestAccAWSInstance_tags(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1004,7 +1004,7 @@ func TestAccAWSInstance_tags(t *testing.T) { func TestAccAWSInstance_volumeTags(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1054,7 +1054,7 @@ func TestAccAWSInstance_volumeTags(t *testing.T) { func TestAccAWSInstance_volumeTagsComputed(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1084,7 +1084,7 @@ func TestAccAWSInstance_instanceProfileChange(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -1121,7 +1121,7 @@ func TestAccAWSInstance_withIamInstanceProfile(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -1151,7 +1151,7 @@ func TestAccAWSInstance_privateIP(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -1181,7 +1181,7 @@ func TestAccAWSInstance_associatePublicIPAndPrivateIP(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"associate_public_ip_address"}, @@ -1219,7 +1219,7 @@ func TestAccAWSInstance_keyPairCheck(t *testing.T) { keyPairName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", IDRefreshIgnore: []string{"source_dest_check"}, @@ -1240,7 +1240,7 @@ func TestAccAWSInstance_keyPairCheck(t *testing.T) { func TestAccAWSInstance_rootBlockDeviceMismatch(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1269,7 +1269,7 @@ func TestAccAWSInstance_rootBlockDeviceMismatch(t *testing.T) { func TestAccAWSInstance_forceNewAndTagsDrift(t *testing.T) { var v ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_instance.foo", Providers: testAccProviders, @@ -1297,7 +1297,7 @@ func TestAccAWSInstance_changeInstanceType(t *testing.T) { var before ec2.Instance var after ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1324,7 +1324,7 @@ func TestAccAWSInstance_primaryNetworkInterface(t *testing.T) { var instance ec2.Instance var ini ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1345,7 +1345,7 @@ func TestAccAWSInstance_primaryNetworkInterfaceSourceDestCheck(t *testing.T) { var instance ec2.Instance var ini ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1368,7 +1368,7 @@ func TestAccAWSInstance_addSecondaryInterface(t *testing.T) { var iniPrimary ec2.NetworkInterface var iniSecondary ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1398,7 +1398,7 @@ func TestAccAWSInstance_addSecurityGroupNetworkInterface(t *testing.T) { var before ec2.Instance var after ec2.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1427,7 +1427,7 @@ func TestAccAWSInstance_associatePublic_defaultPrivate(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1450,7 +1450,7 @@ func TestAccAWSInstance_associatePublic_defaultPublic(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1473,7 +1473,7 @@ func TestAccAWSInstance_associatePublic_explicitPublic(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1496,7 +1496,7 @@ func TestAccAWSInstance_associatePublic_explicitPrivate(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1519,7 +1519,7 @@ func TestAccAWSInstance_associatePublic_overridePublic(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1542,7 +1542,7 @@ func TestAccAWSInstance_associatePublic_overridePrivate(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1564,7 +1564,7 @@ func TestAccAWSInstance_getPasswordData_falseToTrue(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1595,7 +1595,7 @@ func TestAccAWSInstance_getPasswordData_trueToFalse(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1626,7 +1626,7 @@ func TestAccAWSInstance_creditSpecification_unspecifiedDefaultsToStandard(t *tes resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1648,7 +1648,7 @@ func TestAccAWSInstance_creditSpecification_standardCpuCredits(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1678,7 +1678,7 @@ func TestAccAWSInstance_creditSpecification_unlimitedCpuCredits(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1708,7 +1708,7 @@ func TestAccAWSInstance_creditSpecification_updateCpuCredits(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1746,7 +1746,7 @@ func TestAccAWSInstance_creditSpecification_isNotAppliedToNonBurstable(t *testin resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1766,7 +1766,7 @@ func TestAccAWSInstance_creditSpecificationT3_unspecifiedDefaultsToUnlimited(t * resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1788,7 +1788,7 @@ func TestAccAWSInstance_creditSpecificationT3_standardCpuCredits(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1818,7 +1818,7 @@ func TestAccAWSInstance_creditSpecificationT3_unlimitedCpuCredits(t *testing.T) resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1848,7 +1848,7 @@ func TestAccAWSInstance_creditSpecificationT3_updateCpuCredits(t *testing.T) { resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1886,7 +1886,7 @@ func TestAccAWSInstance_creditSpecification_standardCpuCredits_t2Tot3Taint(t *te resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1917,7 +1917,7 @@ func TestAccAWSInstance_creditSpecification_unlimitedCpuCredits_t2Tot3Taint(t *t resName := "aws_instance.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1948,7 +1948,7 @@ func TestAccAWSInstance_UserData_EmptyStringToUnspecified(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, @@ -1974,7 +1974,7 @@ func TestAccAWSInstance_UserData_UnspecifiedToEmptyString(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInstanceDestroy, diff --git a/aws/resource_aws_internet_gateway_test.go b/aws/resource_aws_internet_gateway_test.go index e34cfe2ad2f..af22de9cab5 100644 --- a/aws/resource_aws_internet_gateway_test.go +++ b/aws/resource_aws_internet_gateway_test.go @@ -96,7 +96,7 @@ func testSweepInternetGateways(region string) error { func TestAccAWSInternetGateway_importBasic(t *testing.T) { resourceName := "aws_internet_gateway.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckInternetGatewayDestroy, @@ -134,7 +134,7 @@ func TestAccAWSInternetGateway_basic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_internet_gateway.foo", Providers: testAccProviders, @@ -173,7 +173,7 @@ func TestAccAWSInternetGateway_delete(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_internet_gateway.foo", Providers: testAccProviders, @@ -195,7 +195,7 @@ func TestAccAWSInternetGateway_delete(t *testing.T) { func TestAccAWSInternetGateway_tags(t *testing.T) { var v ec2.InternetGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_internet_gateway.foo", Providers: testAccProviders, diff --git a/aws/resource_aws_iot_certificate_test.go b/aws/resource_aws_iot_certificate_test.go index b94def17033..8a504b737ba 100644 --- a/aws/resource_aws_iot_certificate_test.go +++ b/aws/resource_aws_iot_certificate_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSIoTCertificate_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTCertificateDestroy_basic, diff --git a/aws/resource_aws_iot_policy_test.go b/aws/resource_aws_iot_policy_test.go index c159737a8bb..6e321a9788f 100644 --- a/aws/resource_aws_iot_policy_test.go +++ b/aws/resource_aws_iot_policy_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSIoTPolicy_basic(t *testing.T) { rName := acctest.RandomWithPrefix("PubSubToAnyTopic-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTPolicyDestroy_basic, @@ -37,7 +37,7 @@ func TestAccAWSIoTPolicy_basic(t *testing.T) { func TestAccAWSIoTPolicy_invalidJson(t *testing.T) { rName := acctest.RandomWithPrefix("PubSubToAnyTopic-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTPolicyDestroy_basic, diff --git a/aws/resource_aws_iot_thing_test.go b/aws/resource_aws_iot_thing_test.go index b497fde2021..2cece4a6b8f 100644 --- a/aws/resource_aws_iot_thing_test.go +++ b/aws/resource_aws_iot_thing_test.go @@ -16,7 +16,7 @@ func TestAccAWSIotThing_basic(t *testing.T) { rString := acctest.RandString(8) thingName := fmt.Sprintf("tf_acc_thing_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIotThingDestroy, @@ -43,7 +43,7 @@ func TestAccAWSIotThing_full(t *testing.T) { thingName := fmt.Sprintf("tf_acc_thing_%s", rString) typeName := fmt.Sprintf("tf_acc_type_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIotThingDestroy, @@ -99,7 +99,7 @@ func TestAccAWSIotThing_importBasic(t *testing.T) { rString := acctest.RandString(8) thingName := fmt.Sprintf("tf_acc_thing_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIotThingTypeDestroy, diff --git a/aws/resource_aws_iot_thing_type_test.go b/aws/resource_aws_iot_thing_type_test.go index ed4186dfa45..c22bdb805b7 100644 --- a/aws/resource_aws_iot_thing_type_test.go +++ b/aws/resource_aws_iot_thing_type_test.go @@ -15,7 +15,7 @@ func TestAccAWSIotThingType_importBasic(t *testing.T) { resourceName := "aws_iot_thing_type.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIotThingTypeDestroy, @@ -35,7 +35,7 @@ func TestAccAWSIotThingType_importBasic(t *testing.T) { func TestAccAWSIotThingType_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIotThingTypeDestroy, @@ -54,7 +54,7 @@ func TestAccAWSIotThingType_basic(t *testing.T) { func TestAccAWSIotThingType_full(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIotThingTypeDestroy, diff --git a/aws/resource_aws_iot_topic_rule_test.go b/aws/resource_aws_iot_topic_rule_test.go index 061b9f977b4..c007ec82100 100644 --- a/aws/resource_aws_iot_topic_rule_test.go +++ b/aws/resource_aws_iot_topic_rule_test.go @@ -14,7 +14,7 @@ func TestAccAWSIoTTopicRule_importbasic(t *testing.T) { resourceName := "aws_iot_topic_rule.rule" rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -34,7 +34,7 @@ func TestAccAWSIoTTopicRule_importbasic(t *testing.T) { func TestAccAWSIoTTopicRule_basic(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -57,7 +57,7 @@ func TestAccAWSIoTTopicRule_basic(t *testing.T) { func TestAccAWSIoTTopicRule_cloudwatchalarm(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -75,7 +75,7 @@ func TestAccAWSIoTTopicRule_cloudwatchalarm(t *testing.T) { func TestAccAWSIoTTopicRule_cloudwatchmetric(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -93,7 +93,7 @@ func TestAccAWSIoTTopicRule_cloudwatchmetric(t *testing.T) { func TestAccAWSIoTTopicRule_elasticsearch(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -111,7 +111,7 @@ func TestAccAWSIoTTopicRule_elasticsearch(t *testing.T) { func TestAccAWSIoTTopicRule_firehose(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -129,7 +129,7 @@ func TestAccAWSIoTTopicRule_firehose(t *testing.T) { func TestAccAWSIoTTopicRule_firehose_separator(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -153,7 +153,7 @@ func TestAccAWSIoTTopicRule_firehose_separator(t *testing.T) { func TestAccAWSIoTTopicRule_kinesis(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -171,7 +171,7 @@ func TestAccAWSIoTTopicRule_kinesis(t *testing.T) { func TestAccAWSIoTTopicRule_lambda(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -189,7 +189,7 @@ func TestAccAWSIoTTopicRule_lambda(t *testing.T) { func TestAccAWSIoTTopicRule_republish(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -207,7 +207,7 @@ func TestAccAWSIoTTopicRule_republish(t *testing.T) { func TestAccAWSIoTTopicRule_s3(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -225,7 +225,7 @@ func TestAccAWSIoTTopicRule_s3(t *testing.T) { func TestAccAWSIoTTopicRule_sns(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, @@ -243,7 +243,7 @@ func TestAccAWSIoTTopicRule_sns(t *testing.T) { func TestAccAWSIoTTopicRule_sqs(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSIoTTopicRuleDestroy, diff --git a/aws/resource_aws_key_pair_test.go b/aws/resource_aws_key_pair_test.go index f6014ec641a..5f8152cf424 100644 --- a/aws/resource_aws_key_pair_test.go +++ b/aws/resource_aws_key_pair_test.go @@ -64,7 +64,7 @@ func TestAccAWSKeyPair_basic(t *testing.T) { fingerprint := "d7:ff:a6:63:18:64:9c:57:a1:ee:ca:a4:ad:c2:81:62" resourceName := "aws_key_pair.a_key_pair" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKeyPairDestroy, @@ -92,7 +92,7 @@ func TestAccAWSKeyPair_generatedName(t *testing.T) { var keyPair ec2.KeyPairInfo resourceName := "aws_key_pair.a_key_pair" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKeyPairDestroy, @@ -119,7 +119,7 @@ func TestAccAWSKeyPair_namePrefix(t *testing.T) { var keyPair ec2.KeyPairInfo resourceName := "aws_key_pair.a_key_pair" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_key_pair.a_key_pair", IDRefreshIgnore: []string{"key_name_prefix"}, diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index bbbd7bb7cd6..58b7fc1b217 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -27,7 +27,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_importBasic(t *testing.T) { fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_extendedS3basic, rInt, rInt, rInt, rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -63,7 +63,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_s3basic(t *testing.T) { config := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_s3basic, ri, ri, ri, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -85,7 +85,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource(t *testing.T) config := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_s3KinesisStreamSource, ri, ri, ri, ri, ri, ri, ri, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -105,7 +105,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging(t *testing. var stream firehose.DeliveryStreamDescription ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -137,7 +137,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates(t *testing.T) { }, } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -173,7 +173,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic(t *testing.T) { fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_extendedS3basic, ri, ri, ri, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -195,7 +195,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConf rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -233,7 +233,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConf rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -270,7 +270,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConf rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -301,7 +301,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConf rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -332,7 +332,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConf rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -363,7 +363,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConf rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -394,7 +394,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConf rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_kinesis_firehose_delivery_stream.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -438,7 +438,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn(t *testing.T) { fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_extendedS3KmsKeyArn, ri, ri, ri, ri, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -466,7 +466,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidProcessorType(t *t fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_extendedS3InvalidProcessorType, ri, ri, ri, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -490,7 +490,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidParameterName(t *t fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_extendedS3InvalidParameterName, ri, ri, ri, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -541,7 +541,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates(t *testing.T) { S3BackupMode: aws.String("Enabled"), } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy_ExtendedS3, @@ -599,7 +599,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates(t *testing.T) }, } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -659,7 +659,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates(t *testing.T) { }, } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -717,7 +717,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates(t *testi }, } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, @@ -745,7 +745,7 @@ func TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration(t *t var stream firehose.DeliveryStreamDescription ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, diff --git a/aws/resource_aws_kinesis_stream_test.go b/aws/resource_aws_kinesis_stream_test.go index 485c94d1cb6..6b9983fe0cf 100644 --- a/aws/resource_aws_kinesis_stream_test.go +++ b/aws/resource_aws_kinesis_stream_test.go @@ -20,7 +20,7 @@ func TestAccAWSKinesisStream_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -41,7 +41,7 @@ func TestAccAWSKinesisStream_createMultipleConcurrentStreams(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -78,7 +78,7 @@ func TestAccAWSKinesisStream_createMultipleConcurrentStreams(t *testing.T) { func TestAccAWSKinesisStream_encryptionWithoutKmsKeyThrowsError(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -95,7 +95,7 @@ func TestAccAWSKinesisStream_encryption(t *testing.T) { var stream kinesis.StreamDescription rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -133,7 +133,7 @@ func TestAccAWSKinesisStream_importBasic(t *testing.T) { resourceName := "aws_kinesis_stream.test_stream" streamName := fmt.Sprintf("terraform-kinesis-test-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -167,7 +167,7 @@ func TestAccAWSKinesisStream_shardCount(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -201,7 +201,7 @@ func TestAccAWSKinesisStream_retentionPeriod(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -244,7 +244,7 @@ func TestAccAWSKinesisStream_shardLevelMetrics(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, @@ -288,7 +288,7 @@ func TestAccAWSKinesisStream_Tags(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckKinesisStreamDestroy, diff --git a/aws/resource_aws_kms_alias_test.go b/aws/resource_aws_kms_alias_test.go index 422e1199e22..8406d2cbaa7 100644 --- a/aws/resource_aws_kms_alias_test.go +++ b/aws/resource_aws_kms_alias_test.go @@ -15,7 +15,7 @@ func TestAccAWSKmsAlias_importBasic(t *testing.T) { rInt := acctest.RandInt() kmsAliasTimestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsAliasDestroy, @@ -36,7 +36,7 @@ func TestAccAWSKmsAlias_importBasic(t *testing.T) { func TestAccAWSKmsAlias_basic(t *testing.T) { rInt := acctest.RandInt() kmsAliasTimestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsAliasDestroy, @@ -61,7 +61,7 @@ func TestAccAWSKmsAlias_basic(t *testing.T) { func TestAccAWSKmsAlias_name_prefix(t *testing.T) { rInt := acctest.RandInt() kmsAliasTimestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsAliasDestroy, @@ -80,7 +80,7 @@ func TestAccAWSKmsAlias_name_prefix(t *testing.T) { func TestAccAWSKmsAlias_no_name(t *testing.T) { rInt := acctest.RandInt() kmsAliasTimestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsAliasDestroy, @@ -99,7 +99,7 @@ func TestAccAWSKmsAlias_no_name(t *testing.T) { func TestAccAWSKmsAlias_multiple(t *testing.T) { rInt := acctest.RandInt() kmsAliasTimestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsAliasDestroy, @@ -120,7 +120,7 @@ func TestAccAWSKmsAlias_multiple(t *testing.T) { func TestAccAWSKmsAlias_ArnDiffSuppress(t *testing.T) { rInt := acctest.RandInt() kmsAliasTimestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsAliasDestroy, diff --git a/aws/resource_aws_kms_grant_test.go b/aws/resource_aws_kms_grant_test.go index 406d5c774fd..212cc7980ca 100644 --- a/aws/resource_aws_kms_grant_test.go +++ b/aws/resource_aws_kms_grant_test.go @@ -9,10 +9,10 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAWSKmsGrant_Basic(t *testing.T) { +func TestAccAWSKmsGrant_Basic(t *testing.T) { timestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsGrantDestroy, @@ -33,10 +33,10 @@ func TestAWSKmsGrant_Basic(t *testing.T) { }) } -func TestAWSKmsGrant_withConstraints(t *testing.T) { +func TestAccAWSKmsGrant_withConstraints(t *testing.T) { timestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsGrantDestroy, @@ -69,10 +69,10 @@ func TestAWSKmsGrant_withConstraints(t *testing.T) { }) } -func TestAWSKmsGrant_withRetiringPrincipal(t *testing.T) { +func TestAccAWSKmsGrant_withRetiringPrincipal(t *testing.T) { timestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsGrantDestroy, @@ -88,10 +88,10 @@ func TestAWSKmsGrant_withRetiringPrincipal(t *testing.T) { }) } -func TestAWSKmsGrant_bare(t *testing.T) { +func TestAccAWSKmsGrant_bare(t *testing.T) { timestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsGrantDestroy, @@ -109,10 +109,10 @@ func TestAWSKmsGrant_bare(t *testing.T) { }) } -func TestAWSKmsGrant_ARN(t *testing.T) { +func TestAccAWSKmsGrant_ARN(t *testing.T) { timestamp := time.Now().Format(time.RFC1123) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsGrantDestroy, diff --git a/aws/resource_aws_kms_key_test.go b/aws/resource_aws_kms_key_test.go index 7ec4ee19133..5d7fa49582a 100644 --- a/aws/resource_aws_kms_key_test.go +++ b/aws/resource_aws_kms_key_test.go @@ -93,7 +93,7 @@ func TestAccAWSKmsKey_importBasic(t *testing.T) { resourceName := "aws_kms_key.foo" rName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsKeyDestroy, @@ -116,7 +116,7 @@ func TestAccAWSKmsKey_basic(t *testing.T) { var keyBefore, keyAfter kms.KeyMetadata rName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsKeyDestroy, @@ -141,7 +141,7 @@ func TestAccAWSKmsKey_disappears(t *testing.T) { var key kms.KeyMetadata rName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsKeyDestroy, @@ -166,7 +166,7 @@ func TestAccAWSKmsKey_policy(t *testing.T) { rName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) expectedPolicyText := `{"Version":"2012-10-17","Id":"kms-tf-1","Statement":[{"Sid":"Enable IAM User Permissions","Effect":"Allow","Principal":{"AWS":"*"},"Action":"kms:*","Resource":"*"}]}` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsKeyDestroy, @@ -186,7 +186,7 @@ func TestAccAWSKmsKey_isEnabled(t *testing.T) { var key1, key2, key3 kms.KeyMetadata rName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsKeyDestroy, @@ -226,7 +226,7 @@ func TestAccAWSKmsKey_tags(t *testing.T) { var keyBefore kms.KeyMetadata rName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSKmsKeyDestroy, diff --git a/aws/resource_aws_lambda_alias_test.go b/aws/resource_aws_lambda_alias_test.go index 6a6113700d4..3addc4bb28a 100644 --- a/aws/resource_aws_lambda_alias_test.go +++ b/aws/resource_aws_lambda_alias_test.go @@ -22,7 +22,7 @@ func TestAccAWSLambdaAlias_basic(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_func_alias_basic_%s", rString) aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsLambdaAliasDestroy, @@ -52,7 +52,7 @@ func TestAccAWSLambdaAlias_nameupdate(t *testing.T) { aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) aliasNameUpdate := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", acctest.RandString(8)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsLambdaAliasDestroy, @@ -89,7 +89,7 @@ func TestAccAWSLambdaAlias_routingconfig(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_func_alias_basic_%s", rString) aliasName := fmt.Sprintf("tf_acc_lambda_alias_basic_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsLambdaAliasDestroy, diff --git a/aws/resource_aws_lambda_event_source_mapping_test.go b/aws/resource_aws_lambda_event_source_mapping_test.go index bb94d590409..062d2181380 100644 --- a/aws/resource_aws_lambda_event_source_mapping_test.go +++ b/aws/resource_aws_lambda_event_source_mapping_test.go @@ -29,7 +29,7 @@ func TestAccAWSLambdaEventSourceMapping_kinesis_basic(t *testing.T) { uFuncName := fmt.Sprintf("tf_acc_lambda_esm_basic_updated_%s", rString) uFuncArnRe := regexp.MustCompile(":" + uFuncName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, @@ -72,7 +72,7 @@ func TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_esm_basic_%s", rString) uFuncName := fmt.Sprintf("tf_acc_lambda_esm_basic_updated_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, @@ -111,7 +111,7 @@ func TestAccAWSLambdaEventSourceMapping_sqs_basic(t *testing.T) { uFuncName := fmt.Sprintf("tf_acc_lambda_sqs_basic_updated_%s", rString) uFuncArnRe := regexp.MustCompile(":" + uFuncName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, @@ -152,7 +152,7 @@ func TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_sqs_basic_%s", rString) funcArnRe := regexp.MustCompile(":" + funcName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, @@ -182,7 +182,7 @@ func TestAccAWSLambdaEventSourceMapping_kinesis_import(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_esm_import_%s", rString) uFuncName := fmt.Sprintf("tf_acc_lambda_esm_import_updated_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, @@ -212,7 +212,7 @@ func TestAccAWSLambdaEventSourceMapping_kinesis_disappears(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_esm_import_%s", rString) uFuncName := fmt.Sprintf("tf_acc_lambda_esm_import_updated_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, @@ -240,7 +240,7 @@ func TestAccAWSLambdaEventSourceMapping_sqsDisappears(t *testing.T) { funcName := fmt.Sprintf("tf_acc_lambda_sqs_import_%s", rString) uFuncName := fmt.Sprintf("tf_acc_lambda_sqs_import_updated_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaEventSourceMappingDestroy, @@ -268,7 +268,7 @@ func TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected(t *testing.T funcName := fmt.Sprintf("tf_acc_lambda_sqs_import_%s", rString) uFuncName := fmt.Sprintf("tf_acc_lambda_sqs_import_updated_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_lambda_function_test.go b/aws/resource_aws_lambda_function_test.go index 1dc648476f5..a766f686a9e 100644 --- a/aws/resource_aws_lambda_function_test.go +++ b/aws/resource_aws_lambda_function_test.go @@ -81,7 +81,7 @@ func TestAccAWSLambdaFunction_importLocalFile(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_import_local_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_import_local_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -109,7 +109,7 @@ func TestAccAWSLambdaFunction_importLocalFile_VPC(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_import_vpc_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_import_vpc_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -136,7 +136,7 @@ func TestAccAWSLambdaFunction_importS3(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_import_s3_%s", rString) funcName := fmt.Sprintf("tf_acc_lambda_func_import_s3_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -164,7 +164,7 @@ func TestAccAWSLambdaFunction_basic(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_basic_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_basic_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -191,7 +191,7 @@ func TestAccAWSLambdaFunction_concurrency(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_concurrency_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_concurrency_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -227,7 +227,7 @@ func TestAccAWSLambdaFunction_concurrencyCycle(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_concurrency_cycle_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_concurrency_cycle_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -272,7 +272,7 @@ func TestAccAWSLambdaFunction_updateRuntime(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_update_runtime_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_update_runtime_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -302,7 +302,7 @@ func TestAccAWSLambdaFunction_expectFilenameAndS3Attributes(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_expect_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_expect_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -324,7 +324,7 @@ func TestAccAWSLambdaFunction_envVariables(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_env_vars_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_env_vars_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -381,7 +381,7 @@ func TestAccAWSLambdaFunction_encryptedEnvVariables(t *testing.T) { sgName := fmt.Sprintf("tf_acc_sg_lambda_func_encrypted_env_%s", rString) keyRegex := regexp.MustCompile("^arn:aws[\\w-]*:kms:") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -419,7 +419,7 @@ func TestAccAWSLambdaFunction_versioned(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_versioned_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_versioned_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -457,7 +457,7 @@ func TestAccAWSLambdaFunction_versionedUpdate(t *testing.T) { var timeBeforeUpdate time.Time - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -502,7 +502,7 @@ func TestAccAWSLambdaFunction_DeadLetterConfig(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_dlconfig_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_dlconfig_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -553,7 +553,7 @@ func TestAccAWSLambdaFunction_DeadLetterConfigUpdated(t *testing.T) { topic1Name := fmt.Sprintf("tf_acc_topic_lambda_func_dlcfg_upd_%s", rString) topic2Name := fmt.Sprintf("tf_acc_topic_lambda_func_dlcfg_upd_2_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -586,7 +586,7 @@ func TestAccAWSLambdaFunction_nilDeadLetterConfig(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_nil_dlcfg_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_nil_dlcfg_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -613,7 +613,7 @@ func TestAccAWSLambdaFunction_tracingConfig(t *testing.T) { t.Skip("Lambda tracing config is not supported in GovCloud partition") } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -649,7 +649,7 @@ func TestAccAWSLambdaFunction_VPC(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_vpc_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_vpc_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -677,7 +677,7 @@ func TestAccAWSLambdaFunction_VPCRemoval(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_lambda_function.lambda_function_test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -710,7 +710,7 @@ func TestAccAWSLambdaFunction_VPCUpdate(t *testing.T) { sgName := fmt.Sprintf("tf_acc_sg_lambda_func_vpc_upd_%s", rString) sgName2 := fmt.Sprintf("tf_acc_sg_lambda_func_2nd_vpc_upd_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -754,7 +754,7 @@ func TestAccAWSLambdaFunction_VPC_withInvocation(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_vpc_w_invc_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_vpc_w_invc_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -779,7 +779,7 @@ func TestAccAWSLambdaFunction_EmptyVpcConfig(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_empty_vpc_config_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_empty_vpc_config_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -803,7 +803,7 @@ func TestAccAWSLambdaFunction_s3(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_s3_%s", rString) funcName := fmt.Sprintf("tf_acc_lambda_func_s3_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -836,7 +836,7 @@ func TestAccAWSLambdaFunction_localUpdate(t *testing.T) { var timeBeforeUpdate time.Time - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -892,7 +892,7 @@ func TestAccAWSLambdaFunction_localUpdate_nameOnly(t *testing.T) { } defer os.Remove(updatedPath) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -941,7 +941,7 @@ func TestAccAWSLambdaFunction_s3Update_basic(t *testing.T) { key := "lambda-func.zip" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -993,7 +993,7 @@ func TestAccAWSLambdaFunction_s3Update_unversioned(t *testing.T) { key := "lambda-func.zip" key2 := "lambda-func-modified.zip" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -1036,7 +1036,7 @@ func TestAccAWSLambdaFunction_runtimeValidation_noRuntime(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_runtime_valid_no_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_runtime_valid_no_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -1059,7 +1059,7 @@ func TestAccAWSLambdaFunction_runtimeValidation_nodeJs43(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_runtime_valid_node43_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_runtime_valid_node43_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -1085,7 +1085,7 @@ func TestAccAWSLambdaFunction_runtimeValidation_python27(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_runtime_valid_p27_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_runtime_valid_p27_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -1111,7 +1111,7 @@ func TestAccAWSLambdaFunction_runtimeValidation_java8(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_runtime_valid_j8_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_runtime_valid_j8_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -1137,7 +1137,7 @@ func TestAccAWSLambdaFunction_tags(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_tags_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_tags_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, @@ -1188,7 +1188,7 @@ func TestAccAWSLambdaFunction_runtimeValidation_python36(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_func_runtime_valid_p36_%s", rString) sgName := fmt.Sprintf("tf_acc_sg_lambda_func_runtime_valid_p36_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLambdaFunctionDestroy, diff --git a/aws/resource_aws_lambda_permission_test.go b/aws/resource_aws_lambda_permission_test.go index 682e9d054b3..e79ccc9af53 100644 --- a/aws/resource_aws_lambda_permission_test.go +++ b/aws/resource_aws_lambda_permission_test.go @@ -171,7 +171,7 @@ func TestAccAWSLambdaPermission_basic(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_perm_basic_%s", rString) funcArnRe := regexp.MustCompile(":function:" + funcName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, @@ -200,7 +200,7 @@ func TestAccAWSLambdaPermission_withRawFunctionName(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_perm_w_raw_fname_%s", rString) funcArnRe := regexp.MustCompile(":function:" + funcName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, @@ -225,7 +225,7 @@ func TestAccAWSLambdaPermission_withStatementIdPrefix(t *testing.T) { endsWithFuncName := regexp.MustCompile(":function:lambda_function_name_perm$") startsWithPrefix := regexp.MustCompile("^AllowExecutionWithStatementIdPrefix-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, @@ -253,7 +253,7 @@ func TestAccAWSLambdaPermission_withQualifier(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_perm_w_qualifier_%s", rString) funcArnRe := regexp.MustCompile(":function:" + funcName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, @@ -285,7 +285,7 @@ func TestAccAWSLambdaPermission_multiplePerms(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_perm_multi_%s", rString) funcArnRe := regexp.MustCompile(":function:" + funcName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, @@ -343,7 +343,7 @@ func TestAccAWSLambdaPermission_withS3(t *testing.T) { roleName := fmt.Sprintf("tf_acc_role_lambda_perm_w_s3_%s", rString) funcArnRe := regexp.MustCompile(":function:" + funcName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, @@ -375,7 +375,7 @@ func TestAccAWSLambdaPermission_withSNS(t *testing.T) { funcArnRe := regexp.MustCompile(":function:" + funcName + "$") topicArnRe := regexp.MustCompile(":" + topicName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, @@ -404,7 +404,7 @@ func TestAccAWSLambdaPermission_withIAMRole(t *testing.T) { funcArnRe := regexp.MustCompile(":function:" + funcName + "$") roleArnRe := regexp.MustCompile("/" + roleName + "$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLambdaPermissionDestroy, diff --git a/aws/resource_aws_launch_configuration_test.go b/aws/resource_aws_launch_configuration_test.go index fad22468444..0b43f207ce5 100644 --- a/aws/resource_aws_launch_configuration_test.go +++ b/aws/resource_aws_launch_configuration_test.go @@ -83,7 +83,7 @@ func testSweepLaunchConfigurations(region string) error { func TestAccAWSLaunchConfiguration_importBasic(t *testing.T) { resourceName := "aws_launch_configuration.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -105,7 +105,7 @@ func TestAccAWSLaunchConfiguration_importBasic(t *testing.T) { func TestAccAWSLaunchConfiguration_basic(t *testing.T) { var conf autoscaling.LaunchConfiguration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -131,7 +131,7 @@ func TestAccAWSLaunchConfiguration_basic(t *testing.T) { func TestAccAWSLaunchConfiguration_withBlockDevices(t *testing.T) { var conf autoscaling.LaunchConfiguration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -155,7 +155,7 @@ func TestAccAWSLaunchConfiguration_updateRootBlockDevice(t *testing.T) { var conf autoscaling.LaunchConfiguration rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -181,7 +181,7 @@ func TestAccAWSLaunchConfiguration_updateRootBlockDevice(t *testing.T) { func TestAccAWSLaunchConfiguration_withSpotPrice(t *testing.T) { var conf autoscaling.LaunchConfiguration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -203,7 +203,7 @@ func TestAccAWSLaunchConfiguration_withVpcClassicLink(t *testing.T) { var conf autoscaling.LaunchConfiguration rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -229,7 +229,7 @@ func TestAccAWSLaunchConfiguration_withIAMProfile(t *testing.T) { var conf autoscaling.LaunchConfiguration rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -273,7 +273,7 @@ func testAccCheckAWSLaunchConfigurationWithEncryption(conf *autoscaling.LaunchCo func TestAccAWSLaunchConfiguration_withEncryption(t *testing.T) { var conf autoscaling.LaunchConfiguration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -292,7 +292,7 @@ func TestAccAWSLaunchConfiguration_withEncryption(t *testing.T) { func TestAccAWSLaunchConfiguration_updateEbsBlockDevices(t *testing.T) { var conf autoscaling.LaunchConfiguration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -319,7 +319,7 @@ func TestAccAWSLaunchConfiguration_ebs_noDevice(t *testing.T) { var conf autoscaling.LaunchConfiguration rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, @@ -339,7 +339,7 @@ func TestAccAWSLaunchConfiguration_ebs_noDevice(t *testing.T) { func TestAccAWSLaunchConfiguration_userData(t *testing.T) { var conf autoscaling.LaunchConfiguration - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchConfigurationDestroy, diff --git a/aws/resource_aws_launch_template_test.go b/aws/resource_aws_launch_template_test.go index 01a4cb5f99e..1f09bbd3f54 100644 --- a/aws/resource_aws_launch_template_test.go +++ b/aws/resource_aws_launch_template_test.go @@ -17,7 +17,7 @@ func TestAccAWSLaunchTemplate_importBasic(t *testing.T) { resName := "aws_launch_template.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -38,7 +38,7 @@ func TestAccAWSLaunchTemplate_importData(t *testing.T) { resName := "aws_launch_template.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -60,7 +60,7 @@ func TestAccAWSLaunchTemplate_basic(t *testing.T) { resName := "aws_launch_template.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -84,7 +84,7 @@ func TestAccAWSLaunchTemplate_disappears(t *testing.T) { resourceName := "aws_launch_template.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -106,7 +106,7 @@ func TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_launch_template.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -135,7 +135,7 @@ func TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination(t *tes rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_launch_template.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -176,7 +176,7 @@ func TestAccAWSLaunchTemplate_EbsOptimized(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_launch_template.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -230,7 +230,7 @@ func TestAccAWSLaunchTemplate_data(t *testing.T) { resName := "aws_launch_template.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -267,7 +267,7 @@ func TestAccAWSLaunchTemplate_update(t *testing.T) { var template ec2.LaunchTemplate resName := "aws_launch_template.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -302,7 +302,7 @@ func TestAccAWSLaunchTemplate_tags(t *testing.T) { resName := "aws_launch_template.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -331,7 +331,7 @@ func TestAccAWSLaunchTemplate_creditSpecification_nonBurstable(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resName := "aws_launch_template.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -351,7 +351,7 @@ func TestAccAWSLaunchTemplate_creditSpecification_t2(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resName := "aws_launch_template.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -373,7 +373,7 @@ func TestAccAWSLaunchTemplate_creditSpecification_t3(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resName := "aws_launch_template.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -394,7 +394,7 @@ func TestAccAWSLaunchTemplate_networkInterface(t *testing.T) { var template ec2.LaunchTemplate resName := "aws_launch_template.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -417,7 +417,7 @@ func TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses(t *testing.T) { var template ec2.LaunchTemplate resName := "aws_launch_template.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -439,7 +439,7 @@ func TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount(t *testing.T) { resName := "aws_launch_template.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, @@ -462,7 +462,7 @@ func TestAccAWSLaunchTemplate_instanceMarketOptions(t *testing.T) { templateName := "aws_launch_template.test" groupName := "aws_autoscaling_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLaunchTemplateDestroy, diff --git a/aws/resource_aws_lb_cookie_stickiness_policy_test.go b/aws/resource_aws_lb_cookie_stickiness_policy_test.go index 594b08383e3..f0a72b31097 100644 --- a/aws/resource_aws_lb_cookie_stickiness_policy_test.go +++ b/aws/resource_aws_lb_cookie_stickiness_policy_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSLBCookieStickinessPolicy_basic(t *testing.T) { lbName := fmt.Sprintf("tf-test-lb-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLBCookieStickinessPolicyDestroy, @@ -121,7 +121,7 @@ func TestAccAWSLBCookieStickinessPolicy_drift(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLBCookieStickinessPolicyDestroy, @@ -163,7 +163,7 @@ func TestAccAWSLBCookieStickinessPolicy_missingLB(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckLBCookieStickinessPolicyDestroy, diff --git a/aws/resource_aws_lb_listener_certificate_test.go b/aws/resource_aws_lb_listener_certificate_test.go index 35b8a4d4771..590c237e74a 100644 --- a/aws/resource_aws_lb_listener_certificate_test.go +++ b/aws/resource_aws_lb_listener_certificate_test.go @@ -13,7 +13,7 @@ import ( ) func TestAccAwsLbListenerCertificate_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsLbListenerCertificateDestroy, @@ -40,7 +40,7 @@ func TestAccAwsLbListenerCertificate_cycle(t *testing.T) { rName := acctest.RandString(5) suffix := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsLbListenerCertificateDestroy, diff --git a/aws/resource_aws_lb_listener_rule_test.go b/aws/resource_aws_lb_listener_rule_test.go index 70519cc506c..d7a215e403e 100644 --- a/aws/resource_aws_lb_listener_rule_test.go +++ b/aws/resource_aws_lb_listener_rule_test.go @@ -59,7 +59,7 @@ func TestAccAWSLBListenerRule_basic(t *testing.T) { lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.static", Providers: testAccProviders, @@ -93,7 +93,7 @@ func TestAccAWSLBListenerRuleBackwardsCompatibility(t *testing.T) { lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_listener_rule.static", Providers: testAccProviders, @@ -126,7 +126,7 @@ func TestAccAWSLBListenerRule_redirect(t *testing.T) { var conf elbv2.Rule lbName := fmt.Sprintf("testrule-redirect-%s", acctest.RandStringFromCharSet(14, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.static", Providers: testAccProviders, @@ -165,7 +165,7 @@ func TestAccAWSLBListenerRule_fixedResponse(t *testing.T) { var conf elbv2.Rule lbName := fmt.Sprintf("testrule-fixedresponse-%s", acctest.RandStringFromCharSet(9, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.static", Providers: testAccProviders, @@ -202,7 +202,7 @@ func TestAccAWSLBListenerRule_updateRulePriority(t *testing.T) { lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.static", Providers: testAccProviders, @@ -231,7 +231,7 @@ func TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew(t *testing.T) { lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.static", Providers: testAccProviders, @@ -258,7 +258,7 @@ func TestAccAWSLBListenerRule_multipleConditionThrowsError(t *testing.T) { lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, @@ -276,7 +276,7 @@ func TestAccAWSLBListenerRule_priority(t *testing.T) { lbName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.first", Providers: testAccProviders, @@ -352,7 +352,7 @@ func TestAccAWSLBListenerRule_cognito(t *testing.T) { certificateName := fmt.Sprintf("testcert-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) cognitoPrefix := fmt.Sprintf("testcog-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.cognito", Providers: testAccProvidersWithTLS, @@ -392,7 +392,7 @@ func TestAccAWSLBListenerRule_oidc(t *testing.T) { targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) certificateName := fmt.Sprintf("testcert-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener_rule.oidc", Providers: testAccProvidersWithTLS, @@ -434,7 +434,7 @@ func TestAccAWSLBListenerRule_Action_Order(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_lb_listener_rule.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSLBListenerRuleDestroy, diff --git a/aws/resource_aws_lb_listener_test.go b/aws/resource_aws_lb_listener_test.go index dfd4631af00..ee72aa7d877 100644 --- a/aws/resource_aws_lb_listener_test.go +++ b/aws/resource_aws_lb_listener_test.go @@ -17,7 +17,7 @@ func TestAccAWSLBListener_basic(t *testing.T) { lbName := fmt.Sprintf("testlistener-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener.front_end", Providers: testAccProviders, @@ -48,7 +48,7 @@ func TestAccAWSLBListenerBackwardsCompatibility(t *testing.T) { lbName := fmt.Sprintf("testlistener-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_listener.front_end", Providers: testAccProviders, @@ -79,7 +79,7 @@ func TestAccAWSLBListener_https(t *testing.T) { lbName := fmt.Sprintf("testlistener-https-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum)) targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener.front_end", Providers: testAccProvidersWithTLS, @@ -111,7 +111,7 @@ func TestAccAWSLBListener_redirect(t *testing.T) { var conf elbv2.Listener lbName := fmt.Sprintf("testlistener-redirect-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener.front_end", Providers: testAccProviders, @@ -147,7 +147,7 @@ func TestAccAWSLBListener_fixedResponse(t *testing.T) { var conf elbv2.Listener lbName := fmt.Sprintf("testlistener-fixedresponse-%s", acctest.RandStringFromCharSet(5, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener.front_end", Providers: testAccProviders, @@ -180,7 +180,7 @@ func TestAccAWSLBListener_cognito(t *testing.T) { var conf elbv2.Listener rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener.test", Providers: testAccProvidersWithTLS, @@ -215,7 +215,7 @@ func TestAccAWSLBListener_oidc(t *testing.T) { var conf elbv2.Listener rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_listener.test", Providers: testAccProvidersWithTLS, @@ -254,7 +254,7 @@ func TestAccAWSLBListener_DefaultAction_Order(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_lb_listener.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckAWSLBListenerDestroy, diff --git a/aws/resource_aws_lb_ssl_negotiation_policy_test.go b/aws/resource_aws_lb_ssl_negotiation_policy_test.go index fd4baead44f..128435c739d 100644 --- a/aws/resource_aws_lb_ssl_negotiation_policy_test.go +++ b/aws/resource_aws_lb_ssl_negotiation_policy_test.go @@ -14,7 +14,7 @@ import ( ) func TestAccAWSLBSSLNegotiationPolicy_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckLBSSLNegotiationPolicyDestroy, @@ -49,7 +49,7 @@ func TestAccAWSLBSSLNegotiationPolicy_missingLB(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProvidersWithTLS, CheckDestroy: testAccCheckLBSSLNegotiationPolicyDestroy, diff --git a/aws/resource_aws_lb_target_group_attachment_test.go b/aws/resource_aws_lb_target_group_attachment_test.go index 44fb76c86f1..0cb548af6a7 100644 --- a/aws/resource_aws_lb_target_group_attachment_test.go +++ b/aws/resource_aws_lb_target_group_attachment_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSLBTargetGroupAttachment_basic(t *testing.T) { targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -35,7 +35,7 @@ func TestAccAWSLBTargetGroupAttachment_basic(t *testing.T) { func TestAccAWSLBTargetGroupAttachmentBackwardsCompatibility(t *testing.T) { targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -54,7 +54,7 @@ func TestAccAWSLBTargetGroupAttachmentBackwardsCompatibility(t *testing.T) { func TestAccAWSLBTargetGroupAttachment_withoutPort(t *testing.T) { targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -73,7 +73,7 @@ func TestAccAWSLBTargetGroupAttachment_withoutPort(t *testing.T) { func TestAccAWSALBTargetGroupAttachment_ipAddress(t *testing.T) { targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, diff --git a/aws/resource_aws_lb_target_group_test.go b/aws/resource_aws_lb_target_group_test.go index 19c8f05df3d..6948ebb3906 100644 --- a/aws/resource_aws_lb_target_group_test.go +++ b/aws/resource_aws_lb_target_group_test.go @@ -113,7 +113,7 @@ func TestAccAWSLBTargetGroup_basic(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -155,7 +155,7 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) { var confBefore, confAfter elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -230,7 +230,7 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroupWithProxy(t *testing.T) { var confBefore, confAfter elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -259,7 +259,7 @@ func TestAccAWSLBTargetGroup_TCP_HTTPHealthCheck(t *testing.T) { rString := acctest.RandString(8) targetGroupName := fmt.Sprintf("test-tg-tcp-http-hc-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -325,7 +325,7 @@ func TestAccAWSLBTargetGroupBackwardsCompatibility(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb_target_group.test", Providers: testAccProviders, @@ -366,7 +366,7 @@ func TestAccAWSLBTargetGroupBackwardsCompatibility(t *testing.T) { func TestAccAWSLBTargetGroup_namePrefix(t *testing.T) { var conf elbv2.TargetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -386,7 +386,7 @@ func TestAccAWSLBTargetGroup_namePrefix(t *testing.T) { func TestAccAWSLBTargetGroup_generatedName(t *testing.T) { var conf elbv2.TargetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -407,7 +407,7 @@ func TestAccAWSLBTargetGroup_changeNameForceNew(t *testing.T) { targetGroupNameBefore := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) targetGroupNameAfter := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(4, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -435,7 +435,7 @@ func TestAccAWSLBTargetGroup_changeProtocolForceNew(t *testing.T) { var before, after elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -463,7 +463,7 @@ func TestAccAWSLBTargetGroup_changePortForceNew(t *testing.T) { var before, after elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -491,7 +491,7 @@ func TestAccAWSLBTargetGroup_changeVpcForceNew(t *testing.T) { var before, after elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -517,7 +517,7 @@ func TestAccAWSLBTargetGroup_tags(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -548,7 +548,7 @@ func TestAccAWSLBTargetGroup_updateHealthCheck(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -616,7 +616,7 @@ func TestAccAWSLBTargetGroup_updateSticknessEnabled(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -701,7 +701,7 @@ func TestAccAWSLBTargetGroup_defaults_application(t *testing.T) { var conf elbv2.TargetGroup targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -760,7 +760,7 @@ func TestAccAWSLBTargetGroup_defaults_network(t *testing.T) { protocol = "TCP" ` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -807,7 +807,7 @@ func TestAccAWSLBTargetGroup_defaults_network(t *testing.T) { func TestAccAWSLBTargetGroup_stickinessWithTCPDisabled(t *testing.T) { var conf elbv2.TargetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb_target_group.test", Providers: testAccProviders, @@ -828,7 +828,7 @@ func TestAccAWSLBTargetGroup_stickinessWithTCPDisabled(t *testing.T) { } func TestAccAWSLBTargetGroup_stickinessWithTCPEnabledShouldError(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_lb_test.go b/aws/resource_aws_lb_test.go index 74f45b508c2..6a5972eaa5d 100644 --- a/aws/resource_aws_lb_test.go +++ b/aws/resource_aws_lb_test.go @@ -111,7 +111,7 @@ func TestAccAWSLB_basic(t *testing.T) { var conf elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -145,7 +145,7 @@ func TestAccAWSLB_networkLoadbalancerBasic(t *testing.T) { var conf elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -175,7 +175,7 @@ func TestAccAWSLB_networkLoadbalancerEIP(t *testing.T) { var conf elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLBDestroy, @@ -203,7 +203,7 @@ func TestAccAWSLBBackwardsCompatibility(t *testing.T) { var conf elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_alb.lb_test", Providers: testAccProviders, @@ -236,7 +236,7 @@ func TestAccAWSLBBackwardsCompatibility(t *testing.T) { func TestAccAWSLB_generatedName(t *testing.T) { var conf elbv2.LoadBalancer - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -256,7 +256,7 @@ func TestAccAWSLB_generatedName(t *testing.T) { func TestAccAWSLB_generatesNameForZeroValue(t *testing.T) { var conf elbv2.LoadBalancer - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -276,7 +276,7 @@ func TestAccAWSLB_generatesNameForZeroValue(t *testing.T) { func TestAccAWSLB_namePrefix(t *testing.T) { var conf elbv2.LoadBalancer - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -299,7 +299,7 @@ func TestAccAWSLB_tags(t *testing.T) { var conf elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -330,7 +330,7 @@ func TestAccAWSLB_networkLoadbalancer_updateCrossZone(t *testing.T) { var pre, mid, post elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-nlbcz-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -370,7 +370,7 @@ func TestAccAWSLB_applicationLoadBalancer_updateHttp2(t *testing.T) { var pre, mid, post elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawsalb-http2-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -410,7 +410,7 @@ func TestAccAWSLB_applicationLoadBalancer_updateDeletionProtection(t *testing.T) var pre, mid, post elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawsalb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -450,7 +450,7 @@ func TestAccAWSLB_updatedSecurityGroups(t *testing.T) { var pre, post elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -479,7 +479,7 @@ func TestAccAWSLB_updatedSubnets(t *testing.T) { var pre, post elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -508,7 +508,7 @@ func TestAccAWSLB_updatedIpAddressType(t *testing.T) { var pre, post elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -539,7 +539,7 @@ func TestAccAWSLB_noSecurityGroup(t *testing.T) { var conf elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-nosg-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -572,7 +572,7 @@ func TestAccAWSLB_accesslogs(t *testing.T) { lbName := fmt.Sprintf("testaccawslbaccesslog-%s", acctest.RandStringFromCharSet(4, acctest.CharSetAlpha)) bucketPrefix := "testAccAWSALBConfig_accessLogs" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, @@ -685,7 +685,7 @@ func TestAccAWSLB_networkLoadbalancer_subnet_change(t *testing.T) { var conf elbv2.LoadBalancer lbName := fmt.Sprintf("testaccawslb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lb.lb_test", Providers: testAccProviders, diff --git a/aws/resource_aws_lightsail_domain_test.go b/aws/resource_aws_lightsail_domain_test.go index 64716900b21..a08e1875b1a 100644 --- a/aws/resource_aws_lightsail_domain_test.go +++ b/aws/resource_aws_lightsail_domain_test.go @@ -17,7 +17,7 @@ func TestAccAWSLightsailDomain_basic(t *testing.T) { var domain lightsail.Domain lightsailDomainName := fmt.Sprintf("tf-test-lightsail-%s.com", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailDomainDestroy, @@ -50,7 +50,7 @@ func TestAccAWSLightsailDomain_disappears(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailDomainDestroy, diff --git a/aws/resource_aws_lightsail_instance_test.go b/aws/resource_aws_lightsail_instance_test.go index da7bc3b2e54..87a1f044602 100644 --- a/aws/resource_aws_lightsail_instance_test.go +++ b/aws/resource_aws_lightsail_instance_test.go @@ -18,7 +18,7 @@ func TestAccAWSLightsailInstance_basic(t *testing.T) { var conf lightsail.Instance lightsailName := fmt.Sprintf("tf-test-lightsail-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lightsail_instance.lightsail_instance_test", Providers: testAccProviders, @@ -42,7 +42,7 @@ func TestAccAWSLightsailInstance_euRegion(t *testing.T) { var conf lightsail.Instance lightsailName := fmt.Sprintf("tf-test-lightsail-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_lightsail_instance.lightsail_instance_test", Providers: testAccProviders, @@ -83,7 +83,7 @@ func TestAccAWSLightsailInstance_disapear(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailInstanceDestroy, diff --git a/aws/resource_aws_lightsail_key_pair_test.go b/aws/resource_aws_lightsail_key_pair_test.go index 539e9c5ac39..bd56c20e272 100644 --- a/aws/resource_aws_lightsail_key_pair_test.go +++ b/aws/resource_aws_lightsail_key_pair_test.go @@ -17,7 +17,7 @@ func TestAccAWSLightsailKeyPair_basic(t *testing.T) { var conf lightsail.KeyPair lightsailName := fmt.Sprintf("tf-test-lightsail-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailKeyPairDestroy, @@ -40,7 +40,7 @@ func TestAccAWSLightsailKeyPair_imported(t *testing.T) { var conf lightsail.KeyPair lightsailName := fmt.Sprintf("tf-test-lightsail-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailKeyPairDestroy, @@ -65,7 +65,7 @@ func TestAccAWSLightsailKeyPair_encrypted(t *testing.T) { var conf lightsail.KeyPair lightsailName := fmt.Sprintf("tf-test-lightsail-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailKeyPairDestroy, @@ -89,7 +89,7 @@ func TestAccAWSLightsailKeyPair_encrypted(t *testing.T) { func TestAccAWSLightsailKeyPair_nameprefix(t *testing.T) { var conf1, conf2 lightsail.KeyPair - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailKeyPairDestroy, diff --git a/aws/resource_aws_lightsail_static_ip_attachment_test.go b/aws/resource_aws_lightsail_static_ip_attachment_test.go index bf0aa0898f7..0ae89589cb0 100644 --- a/aws/resource_aws_lightsail_static_ip_attachment_test.go +++ b/aws/resource_aws_lightsail_static_ip_attachment_test.go @@ -19,7 +19,7 @@ func TestAccAWSLightsailStaticIpAttachment_basic(t *testing.T) { instanceName := fmt.Sprintf("tf-test-lightsail-%s", acctest.RandString(5)) keypairName := fmt.Sprintf("tf-test-lightsail-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailStaticIpAttachmentDestroy, @@ -53,7 +53,7 @@ func TestAccAWSLightsailStaticIpAttachment_disappears(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailStaticIpAttachmentDestroy, diff --git a/aws/resource_aws_lightsail_static_ip_test.go b/aws/resource_aws_lightsail_static_ip_test.go index fa1d3d325fe..441126bceda 100644 --- a/aws/resource_aws_lightsail_static_ip_test.go +++ b/aws/resource_aws_lightsail_static_ip_test.go @@ -75,7 +75,7 @@ func TestAccAWSLightsailStaticIp_basic(t *testing.T) { var staticIp lightsail.StaticIp staticIpName := fmt.Sprintf("tf-test-lightsail-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailStaticIpDestroy, @@ -107,7 +107,7 @@ func TestAccAWSLightsailStaticIp_disappears(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLightsailStaticIpDestroy, diff --git a/aws/resource_aws_load_balancer_backend_server_policy_test.go b/aws/resource_aws_load_balancer_backend_server_policy_test.go index 548d121e617..9f9073ae16b 100644 --- a/aws/resource_aws_load_balancer_backend_server_policy_test.go +++ b/aws/resource_aws_load_balancer_backend_server_policy_test.go @@ -17,7 +17,7 @@ func TestAccAWSLoadBalancerBackendServerPolicy_basic(t *testing.T) { rString := acctest.RandString(8) lbName := fmt.Sprintf("tf-acc-lb-bsp-basic-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: map[string]terraform.ResourceProvider{ "aws": testAccProvider, diff --git a/aws/resource_aws_load_balancer_listener_policy_test.go b/aws/resource_aws_load_balancer_listener_policy_test.go index 4eb9a68137d..3ddae9af654 100644 --- a/aws/resource_aws_load_balancer_listener_policy_test.go +++ b/aws/resource_aws_load_balancer_listener_policy_test.go @@ -18,7 +18,7 @@ func TestAccAWSLoadBalancerListenerPolicy_basic(t *testing.T) { rChar := acctest.RandStringFromCharSet(6, acctest.CharSetAlpha) lbName := fmt.Sprintf("%s", rChar) mcName := fmt.Sprintf("%s", rChar) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLoadBalancerListenerPolicyDestroy, diff --git a/aws/resource_aws_load_balancer_policy_test.go b/aws/resource_aws_load_balancer_policy_test.go index 183bdee72f9..77cbe7b9999 100644 --- a/aws/resource_aws_load_balancer_policy_test.go +++ b/aws/resource_aws_load_balancer_policy_test.go @@ -21,7 +21,7 @@ func TestAccAWSLoadBalancerPolicy_basic(t *testing.T) { resourceName := "aws_load_balancer_policy.test-policy" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLoadBalancerPolicyDestroy, @@ -44,7 +44,7 @@ func TestAccAWSLoadBalancerPolicy_disappears(t *testing.T) { resourceName := "aws_load_balancer_policy.test-policy" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLoadBalancerPolicyDestroy, @@ -77,7 +77,7 @@ func TestAccAWSLoadBalancerPolicy_updateWhileAssigned(t *testing.T) { resourceName := "aws_load_balancer_policy.test-policy" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSLoadBalancerPolicyDestroy, diff --git a/aws/resource_aws_macie_member_account_association_test.go b/aws/resource_aws_macie_member_account_association_test.go index 4694703872b..fe781e6d9d1 100644 --- a/aws/resource_aws_macie_member_account_association_test.go +++ b/aws/resource_aws_macie_member_account_association_test.go @@ -18,7 +18,7 @@ func TestAccAWSMacieMemberAccountAssociation_basic(t *testing.T) { t.Skipf("Environment variable %s is not set", key) } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSMacieMemberAccountAssociationDestroy, @@ -34,7 +34,7 @@ func TestAccAWSMacieMemberAccountAssociation_basic(t *testing.T) { } func TestAccAWSMacieMemberAccountAssociation_self(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_macie_s3_bucket_association_test.go b/aws/resource_aws_macie_s3_bucket_association_test.go index 9d09b06efac..304a780bd0d 100644 --- a/aws/resource_aws_macie_s3_bucket_association_test.go +++ b/aws/resource_aws_macie_s3_bucket_association_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSMacieS3BucketAssociation_basic(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSMacieS3BucketAssociationDestroy, @@ -42,7 +42,7 @@ func TestAccAWSMacieS3BucketAssociation_basic(t *testing.T) { func TestAccAWSMacieS3BucketAssociation_accountIdAndPrefix(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSMacieS3BucketAssociationDestroy, diff --git a/aws/resource_aws_main_route_table_association_test.go b/aws/resource_aws_main_route_table_association_test.go index dec1f36ded5..5639c3e6aad 100644 --- a/aws/resource_aws_main_route_table_association_test.go +++ b/aws/resource_aws_main_route_table_association_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccAWSMainRouteTableAssociation_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckMainRouteTableAssociationDestroy, diff --git a/aws/resource_aws_media_store_container_policy_test.go b/aws/resource_aws_media_store_container_policy_test.go index 5b8efb09c4b..6bfe95ff190 100644 --- a/aws/resource_aws_media_store_container_policy_test.go +++ b/aws/resource_aws_media_store_container_policy_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSMediaStoreContainerPolicy_basic(t *testing.T) { rname := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMediaStoreContainerPolicyDestroy, @@ -42,7 +42,7 @@ func TestAccAWSMediaStoreContainerPolicy_basic(t *testing.T) { func TestAccAWSMediaStoreContainerPolicy_import(t *testing.T) { resourceName := "aws_media_store_container_policy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMediaStoreContainerPolicyDestroy, diff --git a/aws/resource_aws_media_store_container_test.go b/aws/resource_aws_media_store_container_test.go index 5a906b99655..3f0e772258c 100644 --- a/aws/resource_aws_media_store_container_test.go +++ b/aws/resource_aws_media_store_container_test.go @@ -12,7 +12,7 @@ import ( ) func TestAccAWSMediaStoreContainer_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMediaStoreContainerDestroy, @@ -30,7 +30,7 @@ func TestAccAWSMediaStoreContainer_basic(t *testing.T) { func TestAccAWSMediaStoreContainer_import(t *testing.T) { resourceName := "aws_media_store_container.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMediaStoreContainerDestroy, diff --git a/aws/resource_aws_mq_broker_test.go b/aws/resource_aws_mq_broker_test.go index ed8b4c1314d..0239f23c104 100644 --- a/aws/resource_aws_mq_broker_test.go +++ b/aws/resource_aws_mq_broker_test.go @@ -241,7 +241,7 @@ func TestAccAWSMqBroker_basic(t *testing.T) { sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMqBrokerDestroy, @@ -308,7 +308,7 @@ func TestAccAWSMqBroker_allFieldsDefaultVpc(t *testing.T) { ` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMqBrokerDestroy, @@ -414,7 +414,7 @@ func TestAccAWSMqBroker_allFieldsCustomVpc(t *testing.T) { ` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMqBrokerDestroy, @@ -506,7 +506,7 @@ func TestAccAWSMqBroker_updateUsers(t *testing.T) { sgName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) brokerName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMqBrokerDestroy, diff --git a/aws/resource_aws_mq_configuration_test.go b/aws/resource_aws_mq_configuration_test.go index b81db954250..18868146278 100644 --- a/aws/resource_aws_mq_configuration_test.go +++ b/aws/resource_aws_mq_configuration_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSMqConfiguration_basic(t *testing.T) { configurationName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMqConfigurationDestroy, @@ -50,7 +50,7 @@ func TestAccAWSMqConfiguration_basic(t *testing.T) { func TestAccAWSMqConfiguration_withData(t *testing.T) { configurationName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsMqConfigurationDestroy, diff --git a/aws/resource_aws_nat_gateway_test.go b/aws/resource_aws_nat_gateway_test.go index 68318c208a0..c2db6fb1bfd 100644 --- a/aws/resource_aws_nat_gateway_test.go +++ b/aws/resource_aws_nat_gateway_test.go @@ -69,7 +69,7 @@ func testSweepNatGateways(region string) error { func TestAccAWSNatGateway_importBasic(t *testing.T) { resourceName := "aws_nat_gateway.gateway" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNatGatewayDestroy, @@ -90,7 +90,7 @@ func TestAccAWSNatGateway_importBasic(t *testing.T) { func TestAccAWSNatGateway_basic(t *testing.T) { var natGateway ec2.NatGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_nat_gateway.gateway", Providers: testAccProviders, @@ -109,7 +109,7 @@ func TestAccAWSNatGateway_basic(t *testing.T) { func TestAccAWSNatGateway_tags(t *testing.T) { var natGateway ec2.NatGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNatGatewayDestroy, diff --git a/aws/resource_aws_neptune_cluster_instance_test.go b/aws/resource_aws_neptune_cluster_instance_test.go index 35c6d7253c5..a40eb9fc171 100644 --- a/aws/resource_aws_neptune_cluster_instance_test.go +++ b/aws/resource_aws_neptune_cluster_instance_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSNeptuneClusterInstance_basic(t *testing.T) { var v neptune.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -65,7 +65,7 @@ func TestAccAWSNeptuneClusterInstance_basic(t *testing.T) { func TestAccAWSNeptuneClusterInstance_withaz(t *testing.T) { var v neptune.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -86,7 +86,7 @@ func TestAccAWSNeptuneClusterInstance_namePrefix(t *testing.T) { var v neptune.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -108,7 +108,7 @@ func TestAccAWSNeptuneClusterInstance_withSubnetGroup(t *testing.T) { var v neptune.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -129,7 +129,7 @@ func TestAccAWSNeptuneClusterInstance_withSubnetGroup(t *testing.T) { func TestAccAWSNeptuneClusterInstance_generatedName(t *testing.T) { var v neptune.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -151,7 +151,7 @@ func TestAccAWSNeptuneClusterInstance_kmsKey(t *testing.T) { var v neptune.DBInstance keyRegex := regexp.MustCompile("^arn:aws:kms:") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, diff --git a/aws/resource_aws_neptune_cluster_parameter_group_test.go b/aws/resource_aws_neptune_cluster_parameter_group_test.go index 70285fd321f..19167cdf3f5 100644 --- a/aws/resource_aws_neptune_cluster_parameter_group_test.go +++ b/aws/resource_aws_neptune_cluster_parameter_group_test.go @@ -18,7 +18,7 @@ func TestAccAWSNeptuneClusterParameterGroup_basic(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterParameterGroupDestroy, @@ -52,7 +52,7 @@ func TestAccAWSNeptuneClusterParameterGroup_basic(t *testing.T) { func TestAccAWSNeptuneClusterParameterGroup_namePrefix(t *testing.T) { var v neptune.DBClusterParameterGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterParameterGroupDestroy, @@ -78,7 +78,7 @@ func TestAccAWSNeptuneClusterParameterGroup_namePrefix(t *testing.T) { func TestAccAWSNeptuneClusterParameterGroup_generatedName(t *testing.T) { var v neptune.DBClusterParameterGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterParameterGroupDestroy, @@ -103,7 +103,7 @@ func TestAccAWSNeptuneClusterParameterGroup_Description(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterParameterGroupDestroy, @@ -130,7 +130,7 @@ func TestAccAWSNeptuneClusterParameterGroup_Parameter(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-tf-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterParameterGroupDestroy, @@ -171,7 +171,7 @@ func TestAccAWSNeptuneClusterParameterGroup_Tags(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-tf-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterParameterGroupDestroy, diff --git a/aws/resource_aws_neptune_cluster_snapshot_test.go b/aws/resource_aws_neptune_cluster_snapshot_test.go index c088eb1e905..dc2180d2464 100644 --- a/aws/resource_aws_neptune_cluster_snapshot_test.go +++ b/aws/resource_aws_neptune_cluster_snapshot_test.go @@ -17,7 +17,7 @@ func TestAccAWSNeptuneClusterSnapshot_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_neptune_cluster_snapshot.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNeptuneClusterSnapshotDestroy, diff --git a/aws/resource_aws_neptune_cluster_test.go b/aws/resource_aws_neptune_cluster_test.go index 0746fc46755..098e51832d9 100644 --- a/aws/resource_aws_neptune_cluster_test.go +++ b/aws/resource_aws_neptune_cluster_test.go @@ -21,7 +21,7 @@ func TestAccAWSNeptuneCluster_basic(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_neptune_cluster.default" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -52,7 +52,7 @@ func TestAccAWSNeptuneCluster_basic(t *testing.T) { func TestAccAWSNeptuneCluster_namePrefix(t *testing.T) { var v neptune.DBCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -79,7 +79,7 @@ func TestAccAWSNeptuneCluster_takeFinalSnapshot(t *testing.T) { var v neptune.DBCluster rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterSnapshot(rInt), @@ -104,7 +104,7 @@ func TestAccAWSNeptuneCluster_updateTags(t *testing.T) { var v neptune.DBCluster ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -139,7 +139,7 @@ func TestAccAWSNeptuneCluster_updateIamRoles(t *testing.T) { var v neptune.DBCluster ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -180,7 +180,7 @@ func TestAccAWSNeptuneCluster_kmsKey(t *testing.T) { var v neptune.DBCluster keyRegex := regexp.MustCompile("^arn:aws:kms:") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -206,7 +206,7 @@ func TestAccAWSNeptuneCluster_kmsKey(t *testing.T) { func TestAccAWSNeptuneCluster_encrypted(t *testing.T) { var v neptune.DBCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -233,7 +233,7 @@ func TestAccAWSNeptuneCluster_backupsUpdate(t *testing.T) { var v neptune.DBCluster ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, @@ -275,7 +275,7 @@ func TestAccAWSNeptuneCluster_backupsUpdate(t *testing.T) { func TestAccAWSNeptuneCluster_iamAuth(t *testing.T) { var v neptune.DBCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneClusterDestroy, diff --git a/aws/resource_aws_neptune_event_subscription_test.go b/aws/resource_aws_neptune_event_subscription_test.go index 30a56c99ca9..ffcf4e74938 100644 --- a/aws/resource_aws_neptune_event_subscription_test.go +++ b/aws/resource_aws_neptune_event_subscription_test.go @@ -18,7 +18,7 @@ func TestAccAWSNeptuneEventSubscription_basic(t *testing.T) { rInt := acctest.RandInt() rName := fmt.Sprintf("tf-acc-test-neptune-event-subs-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneEventSubscriptionDestroy, @@ -59,7 +59,7 @@ func TestAccAWSNeptuneEventSubscription_withPrefix(t *testing.T) { rInt := acctest.RandInt() startsWithPrefix := regexp.MustCompile("^tf-acc-test-neptune-event-subs-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneEventSubscriptionDestroy, @@ -86,7 +86,7 @@ func TestAccAWSNeptuneEventSubscription_withSourceIds(t *testing.T) { var v neptune.EventSubscription rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneEventSubscriptionDestroy, @@ -124,7 +124,7 @@ func TestAccAWSNeptuneEventSubscription_withCategories(t *testing.T) { var v neptune.EventSubscription rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneEventSubscriptionDestroy, diff --git a/aws/resource_aws_neptune_parameter_group_test.go b/aws/resource_aws_neptune_parameter_group_test.go index 7d39917124b..a04afea8672 100644 --- a/aws/resource_aws_neptune_parameter_group_test.go +++ b/aws/resource_aws_neptune_parameter_group_test.go @@ -17,7 +17,7 @@ func TestAccAWSNeptuneParameterGroup_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_neptune_parameter_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneParameterGroupDestroy, @@ -49,7 +49,7 @@ func TestAccAWSNeptuneParameterGroup_Description(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_neptune_parameter_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneParameterGroupDestroy, @@ -76,7 +76,7 @@ func TestAccAWSNeptuneParameterGroup_Parameter(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_neptune_parameter_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneParameterGroupDestroy, @@ -121,7 +121,7 @@ func TestAccAWSNeptuneParameterGroup_Tags(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_neptune_parameter_group.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNeptuneParameterGroupDestroy, diff --git a/aws/resource_aws_neptune_subnet_group_test.go b/aws/resource_aws_neptune_subnet_group_test.go index e75969b8e4e..c6e55a4920b 100644 --- a/aws/resource_aws_neptune_subnet_group_test.go +++ b/aws/resource_aws_neptune_subnet_group_test.go @@ -19,7 +19,7 @@ func TestAccAWSNeptuneSubnetGroup_basic(t *testing.T) { rName := fmt.Sprintf("tf-test-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNeptuneSubnetGroupDestroy, @@ -47,7 +47,7 @@ func TestAccAWSNeptuneSubnetGroup_basic(t *testing.T) { func TestAccAWSNeptuneSubnetGroup_namePrefix(t *testing.T) { var v neptune.DBSubnetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNeptuneSubnetGroupDestroy, @@ -74,7 +74,7 @@ func TestAccAWSNeptuneSubnetGroup_namePrefix(t *testing.T) { func TestAccAWSNeptuneSubnetGroup_generatedName(t *testing.T) { var v neptune.DBSubnetGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNeptuneSubnetGroupDestroy, @@ -99,7 +99,7 @@ func TestAccAWSNeptuneSubnetGroup_updateDescription(t *testing.T) { var v neptune.DBSubnetGroup rName := fmt.Sprintf("tf-test-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckNeptuneSubnetGroupDestroy, diff --git a/aws/resource_aws_network_acl_rule_test.go b/aws/resource_aws_network_acl_rule_test.go index 217dc78fb36..c3cb7a86e96 100644 --- a/aws/resource_aws_network_acl_rule_test.go +++ b/aws/resource_aws_network_acl_rule_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSNetworkAclRule_basic(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkAclRuleDestroy, @@ -35,7 +35,7 @@ func TestAccAWSNetworkAclRule_basic(t *testing.T) { func TestAccAWSNetworkAclRule_missingParam(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkAclRuleDestroy, @@ -51,7 +51,7 @@ func TestAccAWSNetworkAclRule_missingParam(t *testing.T) { func TestAccAWSNetworkAclRule_ipv6(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkAclRuleDestroy, @@ -68,7 +68,7 @@ func TestAccAWSNetworkAclRule_ipv6(t *testing.T) { func TestAccAWSNetworkAclRule_allProtocol(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkAclRuleDestroy, @@ -140,7 +140,7 @@ func TestResourceAWSNetworkAclRule_validateICMPArgumentValue(t *testing.T) { func TestAccAWSNetworkAclRule_deleteRule(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkAclRuleDestroy, diff --git a/aws/resource_aws_network_acl_test.go b/aws/resource_aws_network_acl_test.go index d6d36152952..9700b3f5993 100644 --- a/aws/resource_aws_network_acl_test.go +++ b/aws/resource_aws_network_acl_test.go @@ -111,7 +111,7 @@ func testSweepNetworkAcls(region string) error { } func TestAccAWSNetworkAcl_importBasic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkAclDestroy, @@ -132,7 +132,7 @@ func TestAccAWSNetworkAcl_importBasic(t *testing.T) { func TestAccAWSNetworkAcl_EgressAndIngressRules(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.bar", Providers: testAccProviders, @@ -175,7 +175,7 @@ func TestAccAWSNetworkAcl_EgressAndIngressRules(t *testing.T) { func TestAccAWSNetworkAcl_OnlyIngressRules_basic(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.foos", Providers: testAccProviders, @@ -206,7 +206,7 @@ func TestAccAWSNetworkAcl_OnlyIngressRules_basic(t *testing.T) { func TestAccAWSNetworkAcl_OnlyIngressRules_update(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.foos", Providers: testAccProviders, @@ -261,7 +261,7 @@ func TestAccAWSNetworkAcl_OnlyIngressRules_update(t *testing.T) { func TestAccAWSNetworkAcl_CaseSensitivityNoChanges(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.foos", Providers: testAccProviders, @@ -280,7 +280,7 @@ func TestAccAWSNetworkAcl_CaseSensitivityNoChanges(t *testing.T) { func TestAccAWSNetworkAcl_OnlyEgressRules(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.bond", Providers: testAccProviders, @@ -300,7 +300,7 @@ func TestAccAWSNetworkAcl_OnlyEgressRules(t *testing.T) { func TestAccAWSNetworkAcl_SubnetChange(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.bar", Providers: testAccProviders, @@ -339,7 +339,7 @@ func TestAccAWSNetworkAcl_Subnets(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.bar", Providers: testAccProviders, @@ -382,7 +382,7 @@ func TestAccAWSNetworkAcl_SubnetsDelete(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.bar", Providers: testAccProviders, @@ -413,7 +413,7 @@ func TestAccAWSNetworkAcl_SubnetsDelete(t *testing.T) { func TestAccAWSNetworkAcl_ipv6Rules(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.foos", Providers: testAccProviders, @@ -446,7 +446,7 @@ func TestAccAWSNetworkAcl_ipv6Rules(t *testing.T) { func TestAccAWSNetworkAcl_ipv6VpcRules(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.foos", Providers: testAccProviders, @@ -469,7 +469,7 @@ func TestAccAWSNetworkAcl_ipv6VpcRules(t *testing.T) { func TestAccAWSNetworkAcl_espProtocol(t *testing.T) { var networkAcl ec2.NetworkAcl - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_acl.testesp", Providers: testAccProviders, diff --git a/aws/resource_aws_network_interface_attachment_test.go b/aws/resource_aws_network_interface_attachment_test.go index 7d5d7f73d9a..c207987bf25 100644 --- a/aws/resource_aws_network_interface_attachment_test.go +++ b/aws/resource_aws_network_interface_attachment_test.go @@ -13,7 +13,7 @@ func TestAccAWSNetworkInterfaceAttachment_basic(t *testing.T) { var conf ec2.NetworkInterface rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_interface.bar", Providers: testAccProviders, diff --git a/aws/resource_aws_network_interface_sg_attachment_test.go b/aws/resource_aws_network_interface_sg_attachment_test.go index afc7c79cd64..97c353370f0 100644 --- a/aws/resource_aws_network_interface_sg_attachment_test.go +++ b/aws/resource_aws_network_interface_sg_attachment_test.go @@ -17,7 +17,7 @@ func TestAccAWSNetworkInterfaceSGAttachment_basic(t *testing.T) { resourceName := "aws_network_interface_sg_attachment.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkInterfaceSGAttachmentDestroy, @@ -39,7 +39,7 @@ func TestAccAWSNetworkInterfaceSGAttachment_disappears(t *testing.T) { resourceName := "aws_network_interface_sg_attachment.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkInterfaceSGAttachmentDestroy, @@ -71,7 +71,7 @@ func TestAccAWSNetworkInterfaceSGAttachment_Instance(t *testing.T) { resourceName := "aws_network_interface_sg_attachment.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkInterfaceSGAttachmentDestroy, @@ -95,7 +95,7 @@ func TestAccAWSNetworkInterfaceSGAttachment_DataSource(t *testing.T) { resourceName := "aws_network_interface_sg_attachment.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkInterfaceSGAttachmentDestroy, @@ -125,7 +125,7 @@ func TestAccAWSNetworkInterfaceSGAttachment_Multiple(t *testing.T) { resourceName4 := "aws_network_interface_sg_attachment.test.3" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSNetworkInterfaceSGAttachmentDestroy, diff --git a/aws/resource_aws_network_interface_test.go b/aws/resource_aws_network_interface_test.go index 3093cf5dbbf..c0b29c4cadc 100644 --- a/aws/resource_aws_network_interface_test.go +++ b/aws/resource_aws_network_interface_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSENI_importBasic(t *testing.T) { resourceName := "aws_network_interface.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSENIDestroy, @@ -35,7 +35,7 @@ func TestAccAWSENI_importBasic(t *testing.T) { func TestAccAWSENI_basic(t *testing.T) { var conf ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_interface.bar", Providers: testAccProviders, @@ -64,7 +64,7 @@ func TestAccAWSENI_disappears(t *testing.T) { var networkInterface ec2.NetworkInterface resourceName := "aws_network_interface.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSENIDestroy, @@ -84,7 +84,7 @@ func TestAccAWSENI_disappears(t *testing.T) { func TestAccAWSENI_updatedDescription(t *testing.T) { var conf ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_interface.bar", Providers: testAccProviders, @@ -114,7 +114,7 @@ func TestAccAWSENI_updatedDescription(t *testing.T) { func TestAccAWSENI_attached(t *testing.T) { var conf ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_interface.bar", Providers: testAccProviders, @@ -138,7 +138,7 @@ func TestAccAWSENI_attached(t *testing.T) { func TestAccAWSENI_ignoreExternalAttachment(t *testing.T) { var conf ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_interface.bar", Providers: testAccProviders, @@ -159,7 +159,7 @@ func TestAccAWSENI_ignoreExternalAttachment(t *testing.T) { func TestAccAWSENI_sourceDestCheck(t *testing.T) { var conf ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_interface.bar", Providers: testAccProviders, @@ -180,7 +180,7 @@ func TestAccAWSENI_sourceDestCheck(t *testing.T) { func TestAccAWSENI_computedIPs(t *testing.T) { var conf ec2.NetworkInterface - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_network_interface.bar", Providers: testAccProviders, diff --git a/aws/resource_aws_opsworks_application_test.go b/aws/resource_aws_opsworks_application_test.go index 37d2df0b32c..e23f73c9821 100644 --- a/aws/resource_aws_opsworks_application_test.go +++ b/aws/resource_aws_opsworks_application_test.go @@ -19,7 +19,7 @@ func TestAccAWSOpsworksApplication(t *testing.T) { rInt := acctest.RandInt() name := fmt.Sprintf("tf-ops-acc-application-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksApplicationDestroy, diff --git a/aws/resource_aws_opsworks_custom_layer_test.go b/aws/resource_aws_opsworks_custom_layer_test.go index 74a0da50498..bec52b57cbf 100644 --- a/aws/resource_aws_opsworks_custom_layer_test.go +++ b/aws/resource_aws_opsworks_custom_layer_test.go @@ -21,7 +21,7 @@ func TestAccAWSOpsworksCustomLayer_importBasic(t *testing.T) { resourceName := "aws_opsworks_custom_layer.tf-acc" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, @@ -42,7 +42,7 @@ func TestAccAWSOpsworksCustomLayer_importBasic(t *testing.T) { func TestAccAWSOpsworksCustomLayer_basic(t *testing.T) { stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) var opslayer opsworks.Layer - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, diff --git a/aws/resource_aws_opsworks_instance_test.go b/aws/resource_aws_opsworks_instance_test.go index 8b7b0d2866b..315724c7fae 100644 --- a/aws/resource_aws_opsworks_instance_test.go +++ b/aws/resource_aws_opsworks_instance_test.go @@ -16,7 +16,7 @@ func TestAccAWSOpsworksInstance_importBasic(t *testing.T) { stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) resourceName := "aws_opsworks_instance.tf-acc" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksInstanceDestroy, @@ -38,7 +38,7 @@ func TestAccAWSOpsworksInstance_importBasic(t *testing.T) { func TestAccAWSOpsworksInstance(t *testing.T) { stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) var opsinst opsworks.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksInstanceDestroy, @@ -112,7 +112,7 @@ func TestAccAWSOpsworksInstance_UpdateHostNameForceNew(t *testing.T) { stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) var before, after opsworks.Instance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksInstanceDestroy, diff --git a/aws/resource_aws_opsworks_permission_test.go b/aws/resource_aws_opsworks_permission_test.go index 9ff9c7e6e25..cf239f538c0 100644 --- a/aws/resource_aws_opsworks_permission_test.go +++ b/aws/resource_aws_opsworks_permission_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSOpsworksPermission(t *testing.T) { sName := fmt.Sprintf("tf-ops-perm-%d", acctest.RandInt()) var opsperm opsworks.Permission - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksPermissionDestroy, diff --git a/aws/resource_aws_opsworks_rails_app_layer_test.go b/aws/resource_aws_opsworks_rails_app_layer_test.go index 710d88312af..d2d169d8a22 100644 --- a/aws/resource_aws_opsworks_rails_app_layer_test.go +++ b/aws/resource_aws_opsworks_rails_app_layer_test.go @@ -17,7 +17,7 @@ import ( func TestAccAWSOpsworksRailsAppLayer(t *testing.T) { stackName := fmt.Sprintf("tf-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksRailsAppLayerDestroy, diff --git a/aws/resource_aws_opsworks_rds_db_instance_test.go b/aws/resource_aws_opsworks_rds_db_instance_test.go index 1b6be820474..ff2ac0fdc65 100644 --- a/aws/resource_aws_opsworks_rds_db_instance_test.go +++ b/aws/resource_aws_opsworks_rds_db_instance_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSOpsworksRdsDbInstance(t *testing.T) { sName := fmt.Sprintf("test-db-instance-%d", acctest.RandInt()) var opsdb opsworks.RdsDbInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksRdsDbDestroy, diff --git a/aws/resource_aws_opsworks_stack_test.go b/aws/resource_aws_opsworks_stack_test.go index f13fe4e2bb4..3d17ec366c8 100644 --- a/aws/resource_aws_opsworks_stack_test.go +++ b/aws/resource_aws_opsworks_stack_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksStackImportBasic(t *testing.T) { resourceName := "aws_opsworks_stack.tf-acc" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, @@ -43,7 +43,7 @@ func TestAccAWSOpsworksStackImportBasic(t *testing.T) { func TestAccAWSOpsworksStackNoVpc(t *testing.T) { stackName := fmt.Sprintf("tf-opsworks-acc-%d", acctest.RandInt()) var opsstack opsworks.Stack - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, @@ -66,7 +66,7 @@ func TestAccAWSOpsworksStackNoVpc(t *testing.T) { func TestAccAWSOpsworksStackNoVpcChangeServiceRoleForceNew(t *testing.T) { stackName := fmt.Sprintf("tf-opsworks-acc-%d", acctest.RandInt()) var before, after opsworks.Stack - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, @@ -93,7 +93,7 @@ func TestAccAWSOpsworksStackNoVpcChangeServiceRoleForceNew(t *testing.T) { func TestAccAWSOpsworksStackVpc(t *testing.T) { stackName := fmt.Sprintf("tf-opsworks-acc-%d", acctest.RandInt()) var opsstack opsworks.Stack - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, @@ -127,7 +127,7 @@ func TestAccAWSOpsworksStackVpc(t *testing.T) { func TestAccAWSOpsworksStackNoVpcCreateTags(t *testing.T) { stackName := fmt.Sprintf("tf-opsworks-acc-%d", acctest.RandInt()) var opsstack opsworks.Stack - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, @@ -161,7 +161,7 @@ func TestAccAWSOpsWorksStack_classic_endpoints(t *testing.T) { stackName := fmt.Sprintf("tf-opsworks-acc-%d", acctest.RandInt()) rInt := acctest.RandInt() var opsstack opsworks.Stack - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, diff --git a/aws/resource_aws_opsworks_user_profile_test.go b/aws/resource_aws_opsworks_user_profile_test.go index d9f719d0b1c..546ec2b9538 100644 --- a/aws/resource_aws_opsworks_user_profile_test.go +++ b/aws/resource_aws_opsworks_user_profile_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSOpsworksUserProfile(t *testing.T) { rName := fmt.Sprintf("test-user-%d", acctest.RandInt()) updateRName := fmt.Sprintf("test-user-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksUserProfileDestroy, diff --git a/aws/resource_aws_pinpoint_adm_channel_test.go b/aws/resource_aws_pinpoint_adm_channel_test.go index 2a4525fab6a..bdf168d3c27 100644 --- a/aws/resource_aws_pinpoint_adm_channel_test.go +++ b/aws/resource_aws_pinpoint_adm_channel_test.go @@ -52,7 +52,7 @@ func TestAccAWSPinpointADMChannel_basic(t *testing.T) { config := testAccAwsPinpointADMChannelConfigurationFromEnv(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, diff --git a/aws/resource_aws_pinpoint_app_test.go b/aws/resource_aws_pinpoint_app_test.go index 035769ebdd9..da585b59cd9 100644 --- a/aws/resource_aws_pinpoint_app_test.go +++ b/aws/resource_aws_pinpoint_app_test.go @@ -20,7 +20,7 @@ func TestAccAWSPinpointApp_basic(t *testing.T) { var application pinpoint.ApplicationResponse resourceName := "aws_pinpoint_app.test_app" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, @@ -51,7 +51,7 @@ func TestAccAWSPinpointApp_CampaignHookLambda(t *testing.T) { appName := "terraform-test-pinpointapp-campaignhooklambda" lambdaName := "test-pinpoint-lambda" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_pinpoint_app.test_app", Providers: testAccProviders, @@ -82,7 +82,7 @@ func TestAccAWSPinpointApp_Limits(t *testing.T) { var application pinpoint.ApplicationResponse resourceName := "aws_pinpoint_app.test_app" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_pinpoint_app.test_app", Providers: testAccProviders, @@ -113,7 +113,7 @@ func TestAccAWSPinpointApp_QuietTime(t *testing.T) { var application pinpoint.ApplicationResponse resourceName := "aws_pinpoint_app.test_app" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_pinpoint_app.test_app", Providers: testAccProviders, diff --git a/aws/resource_aws_pinpoint_baidu_channel_test.go b/aws/resource_aws_pinpoint_baidu_channel_test.go index 8292de37b5e..4bd939e691f 100644 --- a/aws/resource_aws_pinpoint_baidu_channel_test.go +++ b/aws/resource_aws_pinpoint_baidu_channel_test.go @@ -24,7 +24,7 @@ func TestAccAWSPinpointBaiduChannel_basic(t *testing.T) { apikeyUpdated := "234" secretKey := "456" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, diff --git a/aws/resource_aws_pinpoint_email_channel_test.go b/aws/resource_aws_pinpoint_email_channel_test.go index 51befc34f71..e458c138075 100644 --- a/aws/resource_aws_pinpoint_email_channel_test.go +++ b/aws/resource_aws_pinpoint_email_channel_test.go @@ -20,7 +20,7 @@ func TestAccAWSPinpointEmailChannel_basic(t *testing.T) { var channel pinpoint.EmailChannelResponse resourceName := "aws_pinpoint_email_channel.test_email_channel" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, diff --git a/aws/resource_aws_pinpoint_event_stream_test.go b/aws/resource_aws_pinpoint_event_stream_test.go index 5884366b456..8a8c338b83a 100644 --- a/aws/resource_aws_pinpoint_event_stream_test.go +++ b/aws/resource_aws_pinpoint_event_stream_test.go @@ -20,7 +20,7 @@ func TestAccAWSPinpointEventStream_basic(t *testing.T) { var stream pinpoint.EventStream resourceName := "aws_pinpoint_event_stream.test_event_stream" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, diff --git a/aws/resource_aws_pinpoint_gcm_channel_test.go b/aws/resource_aws_pinpoint_gcm_channel_test.go index 16eaf0b0b16..a444d1be53b 100644 --- a/aws/resource_aws_pinpoint_gcm_channel_test.go +++ b/aws/resource_aws_pinpoint_gcm_channel_test.go @@ -32,7 +32,7 @@ func TestAccAWSPinpointGCMChannel_basic(t *testing.T) { apiKey := os.Getenv("GCM_API_KEY") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, diff --git a/aws/resource_aws_pinpoint_sms_channel_test.go b/aws/resource_aws_pinpoint_sms_channel_test.go index 304f1607318..3e45faaca28 100644 --- a/aws/resource_aws_pinpoint_sms_channel_test.go +++ b/aws/resource_aws_pinpoint_sms_channel_test.go @@ -20,7 +20,7 @@ func TestAccAWSPinpointSMSChannel_basic(t *testing.T) { var channel pinpoint.SMSChannelResponse resourceName := "aws_pinpoint_sms_channel.test_sms_channel" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, @@ -59,7 +59,7 @@ func TestAccAWSPinpointSMSChannel_full(t *testing.T) { shortCode := "5678" newShortCode := "7890" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: resourceName, Providers: testAccProviders, diff --git a/aws/resource_aws_placement_group_test.go b/aws/resource_aws_placement_group_test.go index 84a397a65fa..b8336c5c53a 100644 --- a/aws/resource_aws_placement_group_test.go +++ b/aws/resource_aws_placement_group_test.go @@ -16,7 +16,7 @@ func TestAccAWSPlacementGroup_basic(t *testing.T) { resourceName := "aws_placement_group.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSPlacementGroupDestroy, diff --git a/aws/resource_aws_proxy_protocol_policy_test.go b/aws/resource_aws_proxy_protocol_policy_test.go index 674ba8993fd..1b487bfec88 100644 --- a/aws/resource_aws_proxy_protocol_policy_test.go +++ b/aws/resource_aws_proxy_protocol_policy_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSProxyProtocolPolicy_basic(t *testing.T) { lbName := fmt.Sprintf("tf-test-lb-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckProxyProtocolPolicyDestroy, diff --git a/aws/resource_aws_rds_cluster_instance_test.go b/aws/resource_aws_rds_cluster_instance_test.go index 28269f0f723..f4b3de67a66 100644 --- a/aws/resource_aws_rds_cluster_instance_test.go +++ b/aws/resource_aws_rds_cluster_instance_test.go @@ -19,7 +19,7 @@ import ( func TestAccAWSRDSClusterInstance_importBasic(t *testing.T) { resourceName := "aws_rds_cluster_instance.cluster_instances" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -40,7 +40,7 @@ func TestAccAWSRDSClusterInstance_importBasic(t *testing.T) { func TestAccAWSRDSClusterInstance_basic(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -75,7 +75,7 @@ func TestAccAWSRDSClusterInstance_basic(t *testing.T) { func TestAccAWSRDSClusterInstance_az(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -96,7 +96,7 @@ func TestAccAWSRDSClusterInstance_namePrefix(t *testing.T) { var v rds.DBInstance rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -119,7 +119,7 @@ func TestAccAWSRDSClusterInstance_namePrefix(t *testing.T) { func TestAccAWSRDSClusterInstance_generatedName(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -141,7 +141,7 @@ func TestAccAWSRDSClusterInstance_kmsKey(t *testing.T) { var v rds.DBInstance keyRegex := regexp.MustCompile("^arn:aws:kms:") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -162,7 +162,7 @@ func TestAccAWSRDSClusterInstance_kmsKey(t *testing.T) { func TestAccAWSRDSClusterInstance_disappears(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -185,7 +185,7 @@ func TestAccAWSRDSClusterInstance_PubliclyAccessible(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_rds_cluster_instance.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -291,7 +291,7 @@ func testAccCheckAWSClusterInstanceExists(n string, v *rds.DBInstance) resource. func TestAccAWSRDSClusterInstance_withInstanceEnhancedMonitor(t *testing.T) { var v rds.DBInstance - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -311,7 +311,7 @@ func TestAccAWSRDSClusterInstance_withInstancePerformanceInsights(t *testing.T) var v rds.DBInstance keyRegex := regexp.MustCompile("^arn:aws:kms:") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, diff --git a/aws/resource_aws_rds_cluster_parameter_group_test.go b/aws/resource_aws_rds_cluster_parameter_group_test.go index e3e76f380af..6a5c9295930 100644 --- a/aws/resource_aws_rds_cluster_parameter_group_test.go +++ b/aws/resource_aws_rds_cluster_parameter_group_test.go @@ -20,7 +20,7 @@ func TestAccAWSDBClusterParameterGroup_importBasic(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, @@ -43,7 +43,7 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, @@ -118,7 +118,7 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) { func TestAccAWSDBClusterParameterGroup_namePrefix(t *testing.T) { var v rds.DBClusterParameterGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, @@ -138,7 +138,7 @@ func TestAccAWSDBClusterParameterGroup_namePrefix(t *testing.T) { func TestAccAWSDBClusterParameterGroup_generatedName(t *testing.T) { var v rds.DBClusterParameterGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, @@ -158,7 +158,7 @@ func TestAccAWSDBClusterParameterGroup_disappears(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-terraform-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, @@ -180,7 +180,7 @@ func TestAccAWSDBClusterParameterGroupOnly(t *testing.T) { parameterGroupName := fmt.Sprintf("cluster-parameter-group-test-tf-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy, diff --git a/aws/resource_aws_rds_cluster_test.go b/aws/resource_aws_rds_cluster_test.go index b2a1956c8e6..3fb032f772c 100644 --- a/aws/resource_aws_rds_cluster_test.go +++ b/aws/resource_aws_rds_cluster_test.go @@ -21,7 +21,7 @@ func TestAccAWSRDSCluster_importBasic(t *testing.T) { resourceName := "aws_rds_cluster.default" ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -46,7 +46,7 @@ func TestAccAWSRDSCluster_basic(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_rds_cluster.default" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -79,7 +79,7 @@ func TestAccAWSRDSCluster_BacktrackWindow(t *testing.T) { var dbCluster rds.DBCluster resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -116,7 +116,7 @@ func TestAccAWSRDSCluster_BacktrackWindow(t *testing.T) { func TestAccAWSRDSCluster_namePrefix(t *testing.T) { var v rds.DBCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -140,7 +140,7 @@ func TestAccAWSRDSCluster_s3Restore(t *testing.T) { uniqueId := acctest.RandomWithPrefix("tf-acc-s3-import-test") bucketPrefix := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -159,7 +159,7 @@ func TestAccAWSRDSCluster_s3Restore(t *testing.T) { func TestAccAWSRDSCluster_generatedName(t *testing.T) { var v rds.DBCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -180,7 +180,7 @@ func TestAccAWSRDSCluster_takeFinalSnapshot(t *testing.T) { var v rds.DBCluster rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterSnapshot(rInt), @@ -198,7 +198,7 @@ func TestAccAWSRDSCluster_takeFinalSnapshot(t *testing.T) { /// This is a regression test to make sure that we always cover the scenario as hightlighted in /// https://github.com/hashicorp/terraform/issues/11568 func TestAccAWSRDSCluster_missingUserNameCausesError(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -215,7 +215,7 @@ func TestAccAWSRDSCluster_updateTags(t *testing.T) { var v rds.DBCluster ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -244,7 +244,7 @@ func TestAccAWSRDSCluster_updateCloudwatchLogsExports(t *testing.T) { var v rds.DBCluster ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -277,7 +277,7 @@ func TestAccAWSRDSCluster_updateIamRoles(t *testing.T) { var v rds.DBCluster ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -312,7 +312,7 @@ func TestAccAWSRDSCluster_kmsKey(t *testing.T) { var v rds.DBCluster keyRegex := regexp.MustCompile("^arn:aws:kms:") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -332,7 +332,7 @@ func TestAccAWSRDSCluster_kmsKey(t *testing.T) { func TestAccAWSRDSCluster_encrypted(t *testing.T) { var v rds.DBCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -359,7 +359,7 @@ func TestAccAWSRDSCluster_EncryptedCrossRegionReplication(t *testing.T) { // check for the cluster in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories(&providers), CheckDestroy: testAccCheckWithProviders(testAccCheckAWSClusterDestroyWithProvider, &providers), @@ -381,7 +381,7 @@ func TestAccAWSRDSCluster_backupsUpdate(t *testing.T) { var v rds.DBCluster ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -418,7 +418,7 @@ func TestAccAWSRDSCluster_backupsUpdate(t *testing.T) { func TestAccAWSRDSCluster_iamAuth(t *testing.T) { var v rds.DBCluster - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -440,7 +440,7 @@ func TestAccAWSRDSCluster_DeletionProtection(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -481,7 +481,7 @@ func TestAccAWSRDSCluster_EngineMode(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -535,7 +535,7 @@ func TestAccAWSRDSCluster_EngineMode_ParallelQuery(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -568,7 +568,7 @@ func TestAccAWSRDSCluster_EngineVersion(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -594,7 +594,7 @@ func TestAccAWSRDSCluster_EngineVersionWithPrimaryInstance(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -624,7 +624,7 @@ func TestAccAWSRDSCluster_Port(t *testing.T) { rInt := acctest.RandInt() resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -654,7 +654,7 @@ func TestAccAWSRDSCluster_ScalingConfiguration(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSClusterDestroy, @@ -706,7 +706,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier(t *testing.T) { snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -732,7 +732,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_DeletionProtection(t *testing.T) { snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -781,7 +781,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_ParallelQuery(t *testing snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -820,7 +820,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_Provisioned(t *testing.T snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -863,7 +863,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_Serverless(t *testing.T) snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -902,7 +902,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_Tags(t *testing.T) { snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -930,7 +930,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds(t *testing.T) { snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -960,7 +960,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds_Tags(t *testing snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, @@ -990,7 +990,7 @@ func TestAccAWSRDSCluster_SnapshotIdentifier_EncryptedRestore(t *testing.T) { snapshotResourceName := "aws_db_cluster_snapshot.test" resourceName := "aws_rds_cluster.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBInstanceDestroy, diff --git a/aws/resource_aws_redshift_cluster_test.go b/aws/resource_aws_redshift_cluster_test.go index 85837dcd198..61626910144 100644 --- a/aws/resource_aws_redshift_cluster_test.go +++ b/aws/resource_aws_redshift_cluster_test.go @@ -103,7 +103,7 @@ func TestAccAWSRedshiftCluster_importBasic(t *testing.T) { resourceName := "aws_redshift_cluster.default" config := testAccAWSRedshiftClusterConfig_basic(acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -128,7 +128,7 @@ func TestAccAWSRedshiftCluster_basic(t *testing.T) { ri := acctest.RandInt() config := testAccAWSRedshiftClusterConfig_basic(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -153,7 +153,7 @@ func TestAccAWSRedshiftCluster_withFinalSnapshot(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterSnapshot(rInt), @@ -175,7 +175,7 @@ func TestAccAWSRedshiftCluster_kmsKey(t *testing.T) { config := testAccAWSRedshiftClusterConfig_kmsKey(ri) keyRegex := regexp.MustCompile("^arn:aws:([a-zA-Z0-9\\-])+:([a-z]{2}-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -202,7 +202,7 @@ func TestAccAWSRedshiftCluster_enhancedVpcRoutingEnabled(t *testing.T) { preConfig := testAccAWSRedshiftClusterConfig_enhancedVpcRoutingEnabled(ri) postConfig := testAccAWSRedshiftClusterConfig_enhancedVpcRoutingDisabled(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -231,7 +231,7 @@ func TestAccAWSRedshiftCluster_loggingEnabledDeprecated(t *testing.T) { var v redshift.Cluster rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -263,7 +263,7 @@ func TestAccAWSRedshiftCluster_loggingEnabled(t *testing.T) { var v redshift.Cluster rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -295,7 +295,7 @@ func TestAccAWSRedshiftCluster_snapshotCopy(t *testing.T) { var v redshift.Cluster rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -329,7 +329,7 @@ func TestAccAWSRedshiftCluster_iamRoles(t *testing.T) { preConfig := testAccAWSRedshiftClusterConfig_iamRoles(ri) postConfig := testAccAWSRedshiftClusterConfig_updateIamRoles(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -359,7 +359,7 @@ func TestAccAWSRedshiftCluster_publiclyAccessible(t *testing.T) { var v redshift.Cluster rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -392,7 +392,7 @@ func TestAccAWSRedshiftCluster_updateNodeCount(t *testing.T) { preConfig := testAccAWSRedshiftClusterConfig_basic(ri) postConfig := testAccAWSRedshiftClusterConfig_updateNodeCount(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -429,7 +429,7 @@ func TestAccAWSRedshiftCluster_updateNodeType(t *testing.T) { preConfig := testAccAWSRedshiftClusterConfig_basic(ri) postConfig := testAccAWSRedshiftClusterConfig_updateNodeType(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -466,7 +466,7 @@ func TestAccAWSRedshiftCluster_tags(t *testing.T) { preConfig := testAccAWSRedshiftClusterConfig_tags(ri) postConfig := testAccAWSRedshiftClusterConfig_updatedTags(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -501,7 +501,7 @@ func TestAccAWSRedshiftCluster_forceNewUsername(t *testing.T) { preConfig := testAccAWSRedshiftClusterConfig_basic(ri) postConfig := testAccAWSRedshiftClusterConfig_updatedUsername(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, @@ -534,7 +534,7 @@ func TestAccAWSRedshiftCluster_changeAvailabilityZone(t *testing.T) { preConfig := testAccAWSRedshiftClusterConfig_basic(ri) postConfig := testAccAWSRedshiftClusterConfig_updatedAvailabilityZone(ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftClusterDestroy, diff --git a/aws/resource_aws_redshift_event_subscription_test.go b/aws/resource_aws_redshift_event_subscription_test.go index 46715046793..edb1e0c6d84 100644 --- a/aws/resource_aws_redshift_event_subscription_test.go +++ b/aws/resource_aws_redshift_event_subscription_test.go @@ -17,7 +17,7 @@ func TestAccAWSRedshiftEventSubscription_basicUpdate(t *testing.T) { rInt := acctest.RandInt() rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, @@ -57,7 +57,7 @@ func TestAccAWSRedshiftEventSubscription_withPrefix(t *testing.T) { rInt := acctest.RandInt() rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, @@ -90,7 +90,7 @@ func TestAccAWSRedshiftEventSubscription_withSourceIds(t *testing.T) { rInt := acctest.RandInt() rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-with-ids-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, @@ -137,7 +137,7 @@ func TestAccAWSRedshiftEventSubscription_categoryUpdate(t *testing.T) { rInt := acctest.RandInt() rName := fmt.Sprintf("tf-acc-test-redshift-event-subs-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftEventSubscriptionDestroy, diff --git a/aws/resource_aws_redshift_parameter_group_test.go b/aws/resource_aws_redshift_parameter_group_test.go index 809e35302b8..b6659546b82 100644 --- a/aws/resource_aws_redshift_parameter_group_test.go +++ b/aws/resource_aws_redshift_parameter_group_test.go @@ -16,7 +16,7 @@ func TestAccAWSRedshiftParameterGroup_importBasic(t *testing.T) { resourceName := "aws_redshift_parameter_group.bar" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftParameterGroupDestroy, @@ -38,7 +38,7 @@ func TestAccAWSRedshiftParameterGroup_withParameters(t *testing.T) { var v redshift.ClusterParameterGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftParameterGroupDestroy, @@ -75,7 +75,7 @@ func TestAccAWSRedshiftParameterGroup_withoutParameters(t *testing.T) { var v redshift.ClusterParameterGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftParameterGroupDestroy, diff --git a/aws/resource_aws_redshift_security_group_test.go b/aws/resource_aws_redshift_security_group_test.go index 73de97a2ac6..0f39e673467 100644 --- a/aws/resource_aws_redshift_security_group_test.go +++ b/aws/resource_aws_redshift_security_group_test.go @@ -21,7 +21,7 @@ func TestAccAWSRedshiftSecurityGroup_importBasic(t *testing.T) { resourceName := "aws_redshift_security_group.bar" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, @@ -43,7 +43,7 @@ func TestAccAWSRedshiftSecurityGroup_ingressCidr(t *testing.T) { var v redshift.ClusterSecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, @@ -70,7 +70,7 @@ func TestAccAWSRedshiftSecurityGroup_updateIngressCidr(t *testing.T) { var v redshift.ClusterSecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, @@ -109,7 +109,7 @@ func TestAccAWSRedshiftSecurityGroup_ingressSecurityGroup(t *testing.T) { var v redshift.ClusterSecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, @@ -134,7 +134,7 @@ func TestAccAWSRedshiftSecurityGroup_updateIngressSecurityGroup(t *testing.T) { var v redshift.ClusterSecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, diff --git a/aws/resource_aws_redshift_snapshot_copy_grant_test.go b/aws/resource_aws_redshift_snapshot_copy_grant_test.go index f9f3f4fafee..fe34e1de360 100644 --- a/aws/resource_aws_redshift_snapshot_copy_grant_test.go +++ b/aws/resource_aws_redshift_snapshot_copy_grant_test.go @@ -15,7 +15,7 @@ func TestAccAWSRedshiftSnapshotCopyGrant_Basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSnapshotCopyGrantDestroy, diff --git a/aws/resource_aws_redshift_subnet_group_test.go b/aws/resource_aws_redshift_subnet_group_test.go index 726d52e6383..cb18589a73b 100644 --- a/aws/resource_aws_redshift_subnet_group_test.go +++ b/aws/resource_aws_redshift_subnet_group_test.go @@ -16,7 +16,7 @@ func TestAccAWSRedshiftSubnetGroup_importBasic(t *testing.T) { resourceName := "aws_redshift_subnet_group.foo" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRedshiftSubnetGroupDestroy, @@ -40,7 +40,7 @@ func TestAccAWSRedshiftSubnetGroup_basic(t *testing.T) { var v redshift.ClusterSubnetGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRedshiftSubnetGroupDestroy, @@ -63,7 +63,7 @@ func TestAccAWSRedshiftSubnetGroup_updateDescription(t *testing.T) { var v redshift.ClusterSubnetGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRedshiftSubnetGroupDestroy, @@ -93,7 +93,7 @@ func TestAccAWSRedshiftSubnetGroup_updateSubnetIds(t *testing.T) { var v redshift.ClusterSubnetGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRedshiftSubnetGroupDestroy, @@ -123,7 +123,7 @@ func TestAccAWSRedshiftSubnetGroup_tags(t *testing.T) { var v redshift.ClusterSubnetGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRedshiftSubnetGroupDestroy, diff --git a/aws/resource_aws_route53_delegation_set_test.go b/aws/resource_aws_route53_delegation_set_test.go index 634de89e730..ef6874455c1 100644 --- a/aws/resource_aws_route53_delegation_set_test.go +++ b/aws/resource_aws_route53_delegation_set_test.go @@ -18,7 +18,7 @@ func TestAccAWSRoute53DelegationSet_importBasic(t *testing.T) { resourceName := "aws_route53_delegation_set.test" refName := acctest.RandStringFromCharSet(15, acctest.CharSetAlphaNum) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -40,7 +40,7 @@ func TestAccAWSRoute53DelegationSet_basic(t *testing.T) { rString := acctest.RandString(8) refName := fmt.Sprintf("tf_acc_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_delegation_set.test", IDRefreshIgnore: []string{"reference_name"}, @@ -65,7 +65,7 @@ func TestAccAWSRoute53DelegationSet_withZones(t *testing.T) { zoneName1 := fmt.Sprintf("%s-primary.terraformtest.com", rString) zoneName2 := fmt.Sprintf("%s-secondary.terraformtest.com", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_delegation_set.main", IDRefreshIgnore: []string{"reference_name"}, diff --git a/aws/resource_aws_route53_health_check_test.go b/aws/resource_aws_route53_health_check_test.go index 47721ce2a18..43c64cf522a 100644 --- a/aws/resource_aws_route53_health_check_test.go +++ b/aws/resource_aws_route53_health_check_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSRoute53HealthCheck_importBasic(t *testing.T) { resourceName := "aws_route53_health_check.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53HealthCheckDestroy, @@ -32,7 +32,7 @@ func TestAccAWSRoute53HealthCheck_importBasic(t *testing.T) { } func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_health_check.foo", Providers: testAccProviders, @@ -63,7 +63,7 @@ func TestAccAWSRoute53HealthCheck_basic(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withSearchString(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_health_check.foo", Providers: testAccProviders, @@ -94,7 +94,7 @@ func TestAccAWSRoute53HealthCheck_withSearchString(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53HealthCheckDestroy, @@ -110,7 +110,7 @@ func TestAccAWSRoute53HealthCheck_withChildHealthChecks(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withHealthCheckRegions(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53HealthCheckDestroy, @@ -128,7 +128,7 @@ func TestAccAWSRoute53HealthCheck_withHealthCheckRegions(t *testing.T) { } func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53HealthCheckDestroy, @@ -144,7 +144,7 @@ func TestAccAWSRoute53HealthCheck_IpConfig(t *testing.T) { } func TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53HealthCheckDestroy, @@ -162,7 +162,7 @@ func TestAccAWSRoute53HealthCheck_CloudWatchAlarmCheck(t *testing.T) { } func TestAccAWSRoute53HealthCheck_withSNI(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_health_check.foo", Providers: testAccProviders, diff --git a/aws/resource_aws_route53_query_log_test.go b/aws/resource_aws_route53_query_log_test.go index 14ebe0b054d..de9b72b802e 100644 --- a/aws/resource_aws_route53_query_log_test.go +++ b/aws/resource_aws_route53_query_log_test.go @@ -25,7 +25,7 @@ func TestAccAWSRoute53QueryLog_Basic(t *testing.T) { rName := fmt.Sprintf("%s-%s", t.Name(), acctest.RandString(5)) var queryLoggingConfig route53.QueryLoggingConfig - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53QueryLogDestroy, @@ -53,7 +53,7 @@ func TestAccAWSRoute53QueryLog_Import(t *testing.T) { resourceName := "aws_route53_query_log.test" rName := fmt.Sprintf("%s-%s", t.Name(), acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53QueryLogDestroy, diff --git a/aws/resource_aws_route53_record_test.go b/aws/resource_aws_route53_record_test.go index 4cd07b4d47f..b0763841f20 100644 --- a/aws/resource_aws_route53_record_test.go +++ b/aws/resource_aws_route53_record_test.go @@ -108,7 +108,7 @@ func TestParseRecordId(t *testing.T) { func TestAccAWSRoute53Record_importBasic(t *testing.T) { resourceName := "aws_route53_record.default" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53RecordDestroy, @@ -129,7 +129,7 @@ func TestAccAWSRoute53Record_importBasic(t *testing.T) { func TestAccAWSRoute53Record_importUnderscored(t *testing.T) { resourceName := "aws_route53_record.underscore" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53RecordDestroy, @@ -148,7 +148,7 @@ func TestAccAWSRoute53Record_importUnderscored(t *testing.T) { } func TestAccAWSRoute53Record_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.default", Providers: testAccProviders, @@ -165,7 +165,7 @@ func TestAccAWSRoute53Record_basic(t *testing.T) { } func TestAccAWSRoute53Record_basic_fqdn(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.default", Providers: testAccProviders, @@ -195,7 +195,7 @@ func TestAccAWSRoute53Record_basic_fqdn(t *testing.T) { } func TestAccAWSRoute53Record_txtSupport(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.default", IDRefreshIgnore: []string{"zone_id"}, // just for this test @@ -213,7 +213,7 @@ func TestAccAWSRoute53Record_txtSupport(t *testing.T) { } func TestAccAWSRoute53Record_spfSupport(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.default", Providers: testAccProviders, @@ -232,7 +232,7 @@ func TestAccAWSRoute53Record_spfSupport(t *testing.T) { } func TestAccAWSRoute53Record_caaSupport(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.default", Providers: testAccProviders, @@ -251,7 +251,7 @@ func TestAccAWSRoute53Record_caaSupport(t *testing.T) { } func TestAccAWSRoute53Record_generatesSuffix(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.default", Providers: testAccProviders, @@ -268,7 +268,7 @@ func TestAccAWSRoute53Record_generatesSuffix(t *testing.T) { } func TestAccAWSRoute53Record_wildcard(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.wildcard", Providers: testAccProviders, @@ -293,7 +293,7 @@ func TestAccAWSRoute53Record_wildcard(t *testing.T) { } func TestAccAWSRoute53Record_failover(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.www-primary", Providers: testAccProviders, @@ -311,7 +311,7 @@ func TestAccAWSRoute53Record_failover(t *testing.T) { } func TestAccAWSRoute53Record_weighted_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.www-live", Providers: testAccProviders, @@ -332,7 +332,7 @@ func TestAccAWSRoute53Record_weighted_basic(t *testing.T) { func TestAccAWSRoute53Record_alias(t *testing.T) { rs := acctest.RandString(10) config := fmt.Sprintf(testAccRoute53ElbAliasRecord, rs) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.alias", Providers: testAccProviders, @@ -351,7 +351,7 @@ func TestAccAWSRoute53Record_alias(t *testing.T) { func TestAccAWSRoute53Record_aliasUppercase(t *testing.T) { rs := acctest.RandString(10) config := fmt.Sprintf(testAccRoute53ElbAliasRecordUppercase, rs) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.alias", Providers: testAccProviders, @@ -368,7 +368,7 @@ func TestAccAWSRoute53Record_aliasUppercase(t *testing.T) { } func TestAccAWSRoute53Record_s3_alias(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53RecordDestroy, @@ -384,7 +384,7 @@ func TestAccAWSRoute53Record_s3_alias(t *testing.T) { } func TestAccAWSRoute53Record_weighted_alias(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.elb_weighted_alias_live", Providers: testAccProviders, @@ -412,7 +412,7 @@ func TestAccAWSRoute53Record_weighted_alias(t *testing.T) { } func TestAccAWSRoute53Record_geolocation_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53RecordDestroy, @@ -431,7 +431,7 @@ func TestAccAWSRoute53Record_geolocation_basic(t *testing.T) { } func TestAccAWSRoute53Record_latency_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53RecordDestroy, @@ -449,7 +449,7 @@ func TestAccAWSRoute53Record_latency_basic(t *testing.T) { } func TestAccAWSRoute53Record_TypeChange(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.sample", Providers: testAccProviders, @@ -474,7 +474,7 @@ func TestAccAWSRoute53Record_TypeChange(t *testing.T) { } func TestAccAWSRoute53Record_SetIdentiferChange(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.basic_to_weighted", Providers: testAccProviders, @@ -499,7 +499,7 @@ func TestAccAWSRoute53Record_SetIdentiferChange(t *testing.T) { } func TestAccAWSRoute53Record_AliasChange(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.elb_alias_change", Providers: testAccProviders, @@ -524,7 +524,7 @@ func TestAccAWSRoute53Record_AliasChange(t *testing.T) { } func TestAccAWSRoute53Record_empty(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.empty", Providers: testAccProviders, @@ -542,7 +542,7 @@ func TestAccAWSRoute53Record_empty(t *testing.T) { // Regression test for https://github.com/hashicorp/terraform/issues/8423 func TestAccAWSRoute53Record_longTXTrecord(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_record.long_txt", Providers: testAccProviders, @@ -559,7 +559,7 @@ func TestAccAWSRoute53Record_longTXTrecord(t *testing.T) { } func TestAccAWSRoute53Record_multivalue_answer_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53RecordDestroy, @@ -576,7 +576,7 @@ func TestAccAWSRoute53Record_multivalue_answer_basic(t *testing.T) { } func TestAccAWSRoute53Record_allowOverwrite(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53RecordDestroy, diff --git a/aws/resource_aws_route53_zone_association_test.go b/aws/resource_aws_route53_zone_association_test.go index 395a0c38ddf..a1e6bf56492 100644 --- a/aws/resource_aws_route53_zone_association_test.go +++ b/aws/resource_aws_route53_zone_association_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSRoute53ZoneAssociation_basic(t *testing.T) { var zone route53.HostedZone - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53ZoneAssociationDestroy, @@ -37,7 +37,7 @@ func TestAccAWSRoute53ZoneAssociation_region(t *testing.T) { // check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories(&providers), CheckDestroy: testAccCheckWithProviders(testAccCheckRoute53ZoneAssociationDestroyWithProvider, &providers), diff --git a/aws/resource_aws_route53_zone_test.go b/aws/resource_aws_route53_zone_test.go index 87d37625fa1..775b2d05428 100644 --- a/aws/resource_aws_route53_zone_test.go +++ b/aws/resource_aws_route53_zone_test.go @@ -71,7 +71,7 @@ func TestAccAWSRoute53Zone_importBasic(t *testing.T) { rString := acctest.RandString(8) zoneName := fmt.Sprintf("%s.terraformtest.com", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRoute53ZoneDestroy, @@ -97,7 +97,7 @@ func TestAccAWSRoute53Zone_basic(t *testing.T) { rString := acctest.RandString(8) zoneName := fmt.Sprintf("%s.terraformtest.com", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_zone.main", Providers: testAccProviders, @@ -141,7 +141,7 @@ func TestAccAWSRoute53Zone_forceDestroy(t *testing.T) { // check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_zone.destroyable", ProviderFactories: testAccProviderFactories(&providers), @@ -178,7 +178,7 @@ func TestAccAWSRoute53Zone_updateComment(t *testing.T) { rString := acctest.RandString(8) zoneName := fmt.Sprintf("%s.terraformtest.com", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_zone.main", Providers: testAccProviders, @@ -214,7 +214,7 @@ func TestAccAWSRoute53Zone_private_basic(t *testing.T) { rString := acctest.RandString(8) zoneName := fmt.Sprintf("%s.terraformtest.com", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_zone.main", Providers: testAccProviders, @@ -241,7 +241,7 @@ func TestAccAWSRoute53Zone_private_region(t *testing.T) { // check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route53_zone.main", ProviderFactories: testAccProviderFactories(&providers), diff --git a/aws/resource_aws_route_table_association_test.go b/aws/resource_aws_route_table_association_test.go index 2d1d5c57562..a7298966e20 100644 --- a/aws/resource_aws_route_table_association_test.go +++ b/aws/resource_aws_route_table_association_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSRouteTableAssociation_basic(t *testing.T) { var v, v2 ec2.RouteTable - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableAssociationDestroy, diff --git a/aws/resource_aws_route_table_test.go b/aws/resource_aws_route_table_test.go index e7ff22053ee..00163f61381 100644 --- a/aws/resource_aws_route_table_test.go +++ b/aws/resource_aws_route_table_test.go @@ -125,7 +125,7 @@ func TestAccAWSRouteTable_basic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route_table.foo", Providers: testAccProviders, @@ -175,7 +175,7 @@ func TestAccAWSRouteTable_instance(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route_table.foo", Providers: testAccProviders, @@ -205,7 +205,7 @@ func TestAccAWSRouteTable_ipv6(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route_table.foo", Providers: testAccProviders, @@ -225,7 +225,7 @@ func TestAccAWSRouteTable_ipv6(t *testing.T) { func TestAccAWSRouteTable_tags(t *testing.T) { var route_table ec2.RouteTable - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route_table.foo", Providers: testAccProviders, @@ -253,7 +253,7 @@ func TestAccAWSRouteTable_tags(t *testing.T) { // For GH-13545, Fixes panic on an empty route config block func TestAccAWSRouteTable_panicEmptyRoute(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_route_table.foo", Providers: testAccProviders, @@ -352,7 +352,7 @@ func TestAccAWSRouteTable_vpcPeering(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckRouteTableDestroy, @@ -390,7 +390,7 @@ func TestAccAWSRouteTable_vgwRoutePropagation(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: resource.ComposeTestCheckFunc( diff --git a/aws/resource_aws_route_test.go b/aws/resource_aws_route_test.go index b0c50247d04..25e05e50ee0 100644 --- a/aws/resource_aws_route_test.go +++ b/aws/resource_aws_route_test.go @@ -31,7 +31,7 @@ func TestAccAWSRoute_basic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -74,7 +74,7 @@ func TestAccAWSRoute_ipv6Support(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -101,7 +101,7 @@ func TestAccAWSRoute_ipv6Support(t *testing.T) { func TestAccAWSRoute_ipv6ToInternetGateway(t *testing.T) { var route ec2.Route - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -127,7 +127,7 @@ func TestAccAWSRoute_ipv6ToInternetGateway(t *testing.T) { func TestAccAWSRoute_ipv6ToInstance(t *testing.T) { var route ec2.Route - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -153,7 +153,7 @@ func TestAccAWSRoute_ipv6ToInstance(t *testing.T) { func TestAccAWSRoute_ipv6ToNetworkInterface(t *testing.T) { var route ec2.Route - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -179,7 +179,7 @@ func TestAccAWSRoute_ipv6ToNetworkInterface(t *testing.T) { func TestAccAWSRoute_ipv6ToPeeringConnection(t *testing.T) { var route ec2.Route - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -206,7 +206,7 @@ func TestAccAWSRoute_changeRouteTable(t *testing.T) { var before ec2.Route var after ec2.Route - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -280,7 +280,7 @@ func TestAccAWSRoute_changeCidr(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -324,7 +324,7 @@ func TestAccAWSRoute_noopdiff(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -359,7 +359,7 @@ func TestAccAWSRoute_noopdiff(t *testing.T) { func TestAccAWSRoute_doesNotCrashWithVPCEndpoint(t *testing.T) { var route ec2.Route - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRouteDestroy, diff --git a/aws/resource_aws_s3_bucket_inventory_test.go b/aws/resource_aws_s3_bucket_inventory_test.go index 2730e92dfc7..d24893cd1ce 100644 --- a/aws/resource_aws_s3_bucket_inventory_test.go +++ b/aws/resource_aws_s3_bucket_inventory_test.go @@ -22,7 +22,7 @@ func TestAccAWSS3BucketInventory_basic(t *testing.T) { bucketName := fmt.Sprintf("tf-acc-bucket-inventory-%s", rString) inventoryName := t.Name() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketInventoryDestroy, @@ -67,7 +67,7 @@ func TestAccAWSS3BucketInventory_encryptWithSSES3(t *testing.T) { bucketName := fmt.Sprintf("tf-acc-bucket-inventory-%s", rString) inventoryName := t.Name() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketInventoryDestroy, @@ -96,7 +96,7 @@ func TestAccAWSS3BucketInventory_encryptWithSSEKMS(t *testing.T) { bucketName := fmt.Sprintf("tf-acc-bucket-inventory-%s", rString) inventoryName := t.Name() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketInventoryDestroy, diff --git a/aws/resource_aws_s3_bucket_metric_test.go b/aws/resource_aws_s3_bucket_metric_test.go index 0b181d7651e..e5171d8b4bd 100644 --- a/aws/resource_aws_s3_bucket_metric_test.go +++ b/aws/resource_aws_s3_bucket_metric_test.go @@ -269,7 +269,7 @@ func TestAccAWSS3BucketMetric_basic(t *testing.T) { bucketName := fmt.Sprintf("tf-acc-%d", rInt) metricName := t.Name() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketMetricDestroy, @@ -302,7 +302,7 @@ func TestAccAWSS3BucketMetric_WithFilterPrefix(t *testing.T) { prefix := fmt.Sprintf("prefix-%d/", rInt) prefixUpdate := fmt.Sprintf("prefix-update-%d/", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketMetricDestroy, @@ -348,7 +348,7 @@ func TestAccAWSS3BucketMetric_WithFilterPrefixAndMultipleTags(t *testing.T) { tag2 := fmt.Sprintf("tag2-%d", rInt) tag2Update := fmt.Sprintf("tag2-update-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketMetricDestroy, @@ -396,7 +396,7 @@ func TestAccAWSS3BucketMetric_WithFilterPrefixAndSingleTag(t *testing.T) { tag1 := fmt.Sprintf("tag-%d", rInt) tag1Update := fmt.Sprintf("tag-update-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketMetricDestroy, @@ -442,7 +442,7 @@ func TestAccAWSS3BucketMetric_WithFilterMultipleTags(t *testing.T) { tag2 := fmt.Sprintf("tag2-%d", rInt) tag2Update := fmt.Sprintf("tag2-update-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketMetricDestroy, @@ -488,7 +488,7 @@ func TestAccAWSS3BucketMetric_WithFilterSingleTag(t *testing.T) { tag1 := fmt.Sprintf("tag-%d", rInt) tag1Update := fmt.Sprintf("tag-update-%d", rInt) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketMetricDestroy, diff --git a/aws/resource_aws_s3_bucket_notification_test.go b/aws/resource_aws_s3_bucket_notification_test.go index a298c7e5977..67563ce5551 100644 --- a/aws/resource_aws_s3_bucket_notification_test.go +++ b/aws/resource_aws_s3_bucket_notification_test.go @@ -88,7 +88,7 @@ func TestAccAWSS3BucketNotification_basic(t *testing.T) { roleName := fmt.Sprintf("tf-acc-role-s3-b-notification-%s", rString) lambdaFuncName := fmt.Sprintf("tf-acc-lambda-func-s3-b-notification-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketNotificationDestroy, @@ -186,7 +186,7 @@ func TestAccAWSS3BucketNotification_withoutFilter(t *testing.T) { topicName := fmt.Sprintf("tf-acc-topic-s3-b-notification-wo-f-%s", rString) bucketName := fmt.Sprintf("tf-acc-bucket-notification-wo-f-%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketNotificationDestroy, diff --git a/aws/resource_aws_s3_bucket_object_test.go b/aws/resource_aws_s3_bucket_object_test.go index 66f0cfd6bcd..b99f8acda68 100644 --- a/aws/resource_aws_s3_bucket_object_test.go +++ b/aws/resource_aws_s3_bucket_object_test.go @@ -31,7 +31,7 @@ func TestAccAWSS3BucketObject_source(t *testing.T) { } var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -48,7 +48,7 @@ func TestAccAWSS3BucketObject_content(t *testing.T) { rInt := acctest.RandInt() var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -81,7 +81,7 @@ func TestAccAWSS3BucketObject_contentBase64(t *testing.T) { rInt := acctest.RandInt() var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -126,7 +126,7 @@ func TestAccAWSS3BucketObject_withContentCharacteristics(t *testing.T) { var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -159,7 +159,7 @@ func TestAccAWSS3BucketObject_updates(t *testing.T) { } var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -203,7 +203,7 @@ func TestAccAWSS3BucketObject_updatesWithVersioning(t *testing.T) { var originalObj, modifiedObj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -320,7 +320,7 @@ func TestAccAWSS3BucketObject_kms(t *testing.T) { rInt := acctest.RandInt() var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -350,7 +350,7 @@ func TestAccAWSS3BucketObject_sse(t *testing.T) { rInt := acctest.RandInt() var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -375,7 +375,7 @@ func TestAccAWSS3BucketObject_acl(t *testing.T) { rInt := acctest.RandInt() var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -445,7 +445,7 @@ func TestAccAWSS3BucketObject_storageClass(t *testing.T) { rInt := acctest.RandInt() var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, @@ -547,7 +547,7 @@ func TestAccAWSS3BucketObject_tags(t *testing.T) { rInt := acctest.RandInt() var obj s3.GetObjectOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketObjectDestroy, diff --git a/aws/resource_aws_s3_bucket_policy_test.go b/aws/resource_aws_s3_bucket_policy_test.go index f7c92ff5dcf..b1ed29119df 100644 --- a/aws/resource_aws_s3_bucket_policy_test.go +++ b/aws/resource_aws_s3_bucket_policy_test.go @@ -27,7 +27,7 @@ func TestAccAWSS3BucketPolicy_basic(t *testing.T) { }] }`, partition, name, partition, name) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -69,7 +69,7 @@ func TestAccAWSS3BucketPolicy_policyUpdate(t *testing.T) { }] }`, partition, name, partition, name) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index 55ff6c17129..569973d13f3 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -26,7 +26,7 @@ func TestAccAWSS3Bucket_importBasic(t *testing.T) { resourceName := "aws_s3_bucket.bucket" rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -72,7 +72,7 @@ func TestAccAWSS3Bucket_importWithPolicy(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -96,7 +96,7 @@ func TestAccAWSS3Bucket_basic(t *testing.T) { region := testAccGetRegion() hostedZoneID, _ := HostedZoneIDForRegion(region) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, /* IDRefreshName: "aws_s3_bucket.bucket", @@ -131,7 +131,7 @@ func TestAccAWSS3Bucket_basic(t *testing.T) { func TestAccAWSS3MultiBucket_withTags(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -144,7 +144,7 @@ func TestAccAWSS3MultiBucket_withTags(t *testing.T) { } func TestAccAWSS3Bucket_namePrefix(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -162,7 +162,7 @@ func TestAccAWSS3Bucket_namePrefix(t *testing.T) { } func TestAccAWSS3Bucket_generatedName(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -180,7 +180,7 @@ func TestAccAWSS3Bucket_generatedName(t *testing.T) { func TestAccAWSS3Bucket_region(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) testAccMultipleRegionsPreCheck(t) @@ -202,7 +202,7 @@ func TestAccAWSS3Bucket_region(t *testing.T) { func TestAccAWSS3Bucket_acceleration(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) testAccHasServicePreCheck("cloudfront", t) @@ -233,7 +233,7 @@ func TestAccAWSS3Bucket_acceleration(t *testing.T) { func TestAccAWSS3Bucket_RequestPayer(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -272,7 +272,7 @@ func TestAccAWSS3Bucket_Policy(t *testing.T) { rInt := acctest.RandInt() partition := testAccGetPartition() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -310,7 +310,7 @@ func TestAccAWSS3Bucket_UpdateAcl(t *testing.T) { preConfig := fmt.Sprintf(testAccAWSS3BucketConfigWithAcl, ri) postConfig := fmt.Sprintf(testAccAWSS3BucketConfigWithAclUpdate, ri) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -338,7 +338,7 @@ func TestAccAWSS3Bucket_UpdateAcl(t *testing.T) { func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { rInt := acctest.RandInt() region := testAccGetRegion() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -380,7 +380,7 @@ func TestAccAWSS3Bucket_Website_Simple(t *testing.T) { func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { rInt := acctest.RandInt() region := testAccGetRegion() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -422,7 +422,7 @@ func TestAccAWSS3Bucket_WebsiteRedirect(t *testing.T) { func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { rInt := acctest.RandInt() region := testAccGetRegion() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -467,7 +467,7 @@ func TestAccAWSS3Bucket_WebsiteRoutingRules(t *testing.T) { func TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -489,7 +489,7 @@ func TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical(t *testing.T) { func TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -511,7 +511,7 @@ func TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed(t *testing.T) { func TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -538,7 +538,7 @@ func TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled( // See https://github.com/hashicorp/terraform/pull/2925 func TestAccAWSS3Bucket_shouldFailNotFound(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -557,7 +557,7 @@ func TestAccAWSS3Bucket_shouldFailNotFound(t *testing.T) { func TestAccAWSS3Bucket_Versioning(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -620,7 +620,7 @@ func TestAccAWSS3Bucket_Cors_Update(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -688,7 +688,7 @@ func TestAccAWSS3Bucket_Cors_Delete(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -708,7 +708,7 @@ func TestAccAWSS3Bucket_Cors_Delete(t *testing.T) { func TestAccAWSS3Bucket_Cors_EmptyOrigin(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -737,7 +737,7 @@ func TestAccAWSS3Bucket_Cors_EmptyOrigin(t *testing.T) { func TestAccAWSS3Bucket_Logging(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -756,7 +756,7 @@ func TestAccAWSS3Bucket_Logging(t *testing.T) { func TestAccAWSS3Bucket_Lifecycle(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -869,7 +869,7 @@ func TestAccAWSS3Bucket_Lifecycle(t *testing.T) { func TestAccAWSS3Bucket_LifecycleExpireMarkerOnly(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSS3BucketDestroy, @@ -908,7 +908,7 @@ func TestAccAWSS3Bucket_Replication(t *testing.T) { // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) testAccMultipleRegionsPreCheck(t) @@ -993,7 +993,7 @@ func TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlT // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) testAccMultipleRegionsPreCheck(t) @@ -1077,7 +1077,7 @@ func TestAccAWSS3Bucket_ReplicationWithoutStorageClass(t *testing.T) { // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) testAccMultipleRegionsPreCheck(t) @@ -1102,7 +1102,7 @@ func TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError(t *testing.T) // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) testAccMultipleRegionsPreCheck(t) diff --git a/aws/resource_aws_secretsmanager_secret_test.go b/aws/resource_aws_secretsmanager_secret_test.go index 836545ea8d2..c991202d5c9 100644 --- a/aws/resource_aws_secretsmanager_secret_test.go +++ b/aws/resource_aws_secretsmanager_secret_test.go @@ -73,7 +73,7 @@ func TestAccAwsSecretsManagerSecret_Basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, @@ -108,7 +108,7 @@ func TestAccAwsSecretsManagerSecret_Description(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, @@ -142,7 +142,7 @@ func TestAccAwsSecretsManagerSecret_KmsKeyID(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, @@ -176,7 +176,7 @@ func TestAccAwsSecretsManagerSecret_RecoveryWindowInDays_Recreate(t *testing.T) rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, @@ -211,7 +211,7 @@ func TestAccAwsSecretsManagerSecret_RotationLambdaARN(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, @@ -263,7 +263,7 @@ func TestAccAwsSecretsManagerSecret_RotationRules(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, @@ -317,7 +317,7 @@ func TestAccAwsSecretsManagerSecret_Tags(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, @@ -371,7 +371,7 @@ func TestAccAwsSecretsManagerSecret_policy(t *testing.T) { resourceName := "aws_secretsmanager_secret.test" expectedPolicyText := `{"Version":"2012-10-17","Statement":[{"Sid":"EnableAllPermissions","Effect":"Allow","Principal":{"AWS":"*"},"Action":"secretsmanager:GetSecretValue","Resource":"*"}]}` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretDestroy, diff --git a/aws/resource_aws_secretsmanager_secret_version_test.go b/aws/resource_aws_secretsmanager_secret_version_test.go index 21250ee4370..9b95b08626e 100644 --- a/aws/resource_aws_secretsmanager_secret_version_test.go +++ b/aws/resource_aws_secretsmanager_secret_version_test.go @@ -17,7 +17,7 @@ func TestAccAwsSecretsManagerSecretVersion_BasicString(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, @@ -48,7 +48,7 @@ func TestAccAwsSecretsManagerSecretVersion_Base64Binary(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, @@ -79,7 +79,7 @@ func TestAccAwsSecretsManagerSecretVersion_VersionStages(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_secretsmanager_secret_version.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSecretsManagerSecretVersionDestroy, diff --git a/aws/resource_aws_security_group_rule_test.go b/aws/resource_aws_security_group_rule_test.go index 20b46c09d9c..4c5421f11a9 100644 --- a/aws/resource_aws_security_group_rule_test.go +++ b/aws/resource_aws_security_group_rule_test.go @@ -129,7 +129,7 @@ func TestAccAWSSecurityGroupRule_Ingress_VPC(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -172,7 +172,7 @@ func TestAccAWSSecurityGroupRule_Ingress_Protocol(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -221,7 +221,7 @@ func TestAccAWSSecurityGroupRule_Ingress_Ipv6(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -262,7 +262,7 @@ func TestAccAWSSecurityGroupRule_Ingress_Classic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -311,7 +311,7 @@ func TestAccAWSSecurityGroupRule_MultiIngress(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -337,7 +337,7 @@ func TestAccAWSSecurityGroupRule_Egress(t *testing.T) { var group ec2.SecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -362,7 +362,7 @@ func TestAccAWSSecurityGroupRule_Egress(t *testing.T) { func TestAccAWSSecurityGroupRule_SelfReference(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -385,7 +385,7 @@ func TestAccAWSSecurityGroupRule_SelfReference(t *testing.T) { func TestAccAWSSecurityGroupRule_ExpectInvalidTypeError(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -400,7 +400,7 @@ func TestAccAWSSecurityGroupRule_ExpectInvalidTypeError(t *testing.T) { func TestAccAWSSecurityGroupRule_ExpectInvalidCIDR(t *testing.T) { rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -442,7 +442,7 @@ func TestAccAWSSecurityGroupRule_PartialMatching_basic(t *testing.T) { }, } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -504,7 +504,7 @@ func TestAccAWSSecurityGroupRule_PartialMatching_Source(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -531,7 +531,7 @@ func TestAccAWSSecurityGroupRule_PartialMatching_Source(t *testing.T) { func TestAccAWSSecurityGroupRule_Issue5310(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -555,7 +555,7 @@ func TestAccAWSSecurityGroupRule_Issue5310(t *testing.T) { func TestAccAWSSecurityGroupRule_Race(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -574,7 +574,7 @@ func TestAccAWSSecurityGroupRule_SelfSource(t *testing.T) { var group ec2.SecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -634,7 +634,7 @@ func TestAccAWSSecurityGroupRule_PrefixListEgress(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -664,7 +664,7 @@ func TestAccAWSSecurityGroupRule_IngressDescription(t *testing.T) { var group ec2.SecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -691,7 +691,7 @@ func TestAccAWSSecurityGroupRule_EgressDescription(t *testing.T) { var group ec2.SecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -718,7 +718,7 @@ func TestAccAWSSecurityGroupRule_IngressDescription_updates(t *testing.T) { var group ec2.SecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -754,7 +754,7 @@ func TestAccAWSSecurityGroupRule_EgressDescription_updates(t *testing.T) { var group ec2.SecurityGroup rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, @@ -870,7 +870,7 @@ func TestAccAWSSecurityGroupRule_MultiDescription(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupRuleDestroy, diff --git a/aws/resource_aws_security_group_test.go b/aws/resource_aws_security_group_test.go index f6839c2d821..4a88ea68ab7 100644 --- a/aws/resource_aws_security_group_test.go +++ b/aws/resource_aws_security_group_test.go @@ -565,7 +565,7 @@ func TestAccAWSSecurityGroup_importBasic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -594,7 +594,7 @@ func TestAccAWSSecurityGroup_importIpv6(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -613,7 +613,7 @@ func TestAccAWSSecurityGroup_importIpv6(t *testing.T) { } func TestAccAWSSecurityGroup_importSelf(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -633,7 +633,7 @@ func TestAccAWSSecurityGroup_importSelf(t *testing.T) { } func TestAccAWSSecurityGroup_importSourceSecurityGroup(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -662,7 +662,7 @@ func TestAccAWSSecurityGroup_importIPRangeAndSecurityGroupWithSameRules(t *testi return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -690,7 +690,7 @@ func TestAccAWSSecurityGroup_importIPRangesWithSameRules(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -718,7 +718,7 @@ func TestAccAWSSecurityGroup_importPrefixList(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -739,7 +739,7 @@ func TestAccAWSSecurityGroup_importPrefixList(t *testing.T) { func TestAccAWSSecurityGroup_basic(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -773,7 +773,7 @@ func TestAccAWSSecurityGroup_ruleGathering(t *testing.T) { var group ec2.SecurityGroup sgName := fmt.Sprintf("tf-acc-security-group-%s", acctest.RandString(7)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -969,7 +969,7 @@ func TestAccAWSSecurityGroup_forceRevokeRules_true(t *testing.T) { // Remove the rules that created the cycle; Terraform/AWS can now destroy them testRemoveCycle := testRemoveRuleCycle(&primary, &secondary) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1040,7 +1040,7 @@ func TestAccAWSSecurityGroup_forceRevokeRules_false(t *testing.T) { // Remove the rules that created the cycle; Terraform/AWS can now destroy them testRemoveCycle := testRemoveRuleCycle(&primary, &secondary) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1086,7 +1086,7 @@ func TestAccAWSSecurityGroup_forceRevokeRules_false(t *testing.T) { func TestAccAWSSecurityGroup_ipv6(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1127,7 +1127,7 @@ func TestAccAWSSecurityGroup_ipv6(t *testing.T) { func TestAccAWSSecurityGroup_namePrefix(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.baz", IDRefreshIgnore: []string{"name_prefix"}, @@ -1163,7 +1163,7 @@ func TestAccAWSSecurityGroup_self(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1197,7 +1197,7 @@ func TestAccAWSSecurityGroup_vpc(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1250,7 +1250,7 @@ func TestAccAWSSecurityGroup_vpcNegOneIngress(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1292,7 +1292,7 @@ func TestAccAWSSecurityGroup_vpcProtoNumIngress(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1325,7 +1325,7 @@ func TestAccAWSSecurityGroup_vpcProtoNumIngress(t *testing.T) { func TestAccAWSSecurityGroup_MultiIngress(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1344,7 +1344,7 @@ func TestAccAWSSecurityGroup_MultiIngress(t *testing.T) { func TestAccAWSSecurityGroup_Change(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1370,7 +1370,7 @@ func TestAccAWSSecurityGroup_Change(t *testing.T) { func TestAccAWSSecurityGroup_RuleDescription(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1463,7 +1463,7 @@ func TestAccAWSSecurityGroup_RuleDescription(t *testing.T) { func TestAccAWSSecurityGroup_generatedName(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1493,7 +1493,7 @@ func TestAccAWSSecurityGroup_generatedName(t *testing.T) { func TestAccAWSSecurityGroup_DefaultEgress_VPC(t *testing.T) { // VPC - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_security_group.worker", Providers: testAccProviders, @@ -1516,7 +1516,7 @@ func TestAccAWSSecurityGroup_DefaultEgress_Classic(t *testing.T) { os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldvar) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, IDRefreshName: "aws_security_group.web", Providers: testAccProviders, @@ -1535,7 +1535,7 @@ func TestAccAWSSecurityGroup_DefaultEgress_Classic(t *testing.T) { // Testing drift detection with groups containing the same port and types func TestAccAWSSecurityGroup_drift(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1574,7 +1574,7 @@ func TestAccAWSSecurityGroup_drift(t *testing.T) { func TestAccAWSSecurityGroup_drift_complex(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1631,7 +1631,7 @@ func TestAccAWSSecurityGroup_drift_complex(t *testing.T) { } func TestAccAWSSecurityGroup_invalidCIDRBlock(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1804,7 +1804,7 @@ func testAccCheckAWSSecurityGroupAttributesNegOneProtocol(group *ec2.SecurityGro func TestAccAWSSecurityGroup_tags(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1833,7 +1833,7 @@ func TestAccAWSSecurityGroup_tags(t *testing.T) { func TestAccAWSSecurityGroup_CIDRandGroups(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1852,7 +1852,7 @@ func TestAccAWSSecurityGroup_CIDRandGroups(t *testing.T) { func TestAccAWSSecurityGroup_ingressWithCidrAndSGs(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1896,7 +1896,7 @@ func TestAccAWSSecurityGroup_ingressWithCidrAndSGs_classic(t *testing.T) { os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldvar) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccEC2ClassicPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1926,7 +1926,7 @@ func TestAccAWSSecurityGroup_ingressWithCidrAndSGs_classic(t *testing.T) { func TestAccAWSSecurityGroup_egressWithPrefixList(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1947,7 +1947,7 @@ func TestAccAWSSecurityGroup_egressWithPrefixList(t *testing.T) { func TestAccAWSSecurityGroup_ingressWithPrefixList(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -1968,7 +1968,7 @@ func TestAccAWSSecurityGroup_ingressWithPrefixList(t *testing.T) { func TestAccAWSSecurityGroup_ipv4andipv6Egress(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -2212,7 +2212,7 @@ func testAccCheckAWSSecurityGroupExistsWithoutDefault(n string) resource.TestChe func TestAccAWSSecurityGroup_failWithDiffMismatch(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -2233,7 +2233,7 @@ func TestAccAWSSecurityGroup_ruleLimitExceededAppend(t *testing.T) { ruleLimit := testAccAWSSecurityGroupRulesPerGroupLimitFromEnv() var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -2274,7 +2274,7 @@ func TestAccAWSSecurityGroup_ruleLimitCidrBlockExceededAppend(t *testing.T) { ruleLimit := testAccAWSSecurityGroupRulesPerGroupLimitFromEnv() var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -2339,7 +2339,7 @@ func TestAccAWSSecurityGroup_ruleLimitExceededPrepend(t *testing.T) { ruleLimit := testAccAWSSecurityGroupRulesPerGroupLimitFromEnv() var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -2380,7 +2380,7 @@ func TestAccAWSSecurityGroup_ruleLimitExceededAllNew(t *testing.T) { ruleLimit := testAccAWSSecurityGroupRulesPerGroupLimitFromEnv() var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, @@ -2420,7 +2420,7 @@ func TestAccAWSSecurityGroup_ruleLimitExceededAllNew(t *testing.T) { func TestAccAWSSecurityGroup_rulesDropOnError(t *testing.T) { var group ec2.SecurityGroup - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSecurityGroupDestroy, diff --git a/aws/resource_aws_service_discovery_private_dns_namespace_test.go b/aws/resource_aws_service_discovery_private_dns_namespace_test.go index 33e062b158b..31d7e956c15 100644 --- a/aws/resource_aws_service_discovery_private_dns_namespace_test.go +++ b/aws/resource_aws_service_discovery_private_dns_namespace_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic(t *testing.T) { rName := acctest.RandString(5) + ".example.com" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsServiceDiscoveryPrivateDnsNamespaceDestroy, @@ -34,7 +34,7 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic(t *testing.T) { func TestAccAWSServiceDiscoveryPrivateDnsNamespace_longname(t *testing.T) { rName := acctest.RandString(64-len("example.com")) + ".example.com" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsServiceDiscoveryPrivateDnsNamespaceDestroy, diff --git a/aws/resource_aws_service_discovery_public_dns_namespace_test.go b/aws/resource_aws_service_discovery_public_dns_namespace_test.go index 6d01abe09a8..82a73db6505 100644 --- a/aws/resource_aws_service_discovery_public_dns_namespace_test.go +++ b/aws/resource_aws_service_discovery_public_dns_namespace_test.go @@ -15,7 +15,7 @@ func TestAccAWSServiceDiscoveryPublicDnsNamespace_basic(t *testing.T) { resourceName := "aws_service_discovery_public_dns_namespace.test" rName := acctest.RandStringFromCharSet(5, acctest.CharSetAlpha) + ".terraformtesting.com" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsServiceDiscoveryPublicDnsNamespaceDestroy, @@ -41,7 +41,7 @@ func TestAccAWSServiceDiscoveryPublicDnsNamespace_longname(t *testing.T) { resourceName := "aws_service_discovery_public_dns_namespace.test" rName := acctest.RandStringFromCharSet(64-len("terraformtesting.com"), acctest.CharSetAlpha) + ".terraformtesting.com" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsServiceDiscoveryPublicDnsNamespaceDestroy, diff --git a/aws/resource_aws_service_discovery_service_test.go b/aws/resource_aws_service_discovery_service_test.go index 7dbfc6d587c..4b380054cad 100644 --- a/aws/resource_aws_service_discovery_service_test.go +++ b/aws/resource_aws_service_discovery_service_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSServiceDiscoveryService_private(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy, @@ -48,7 +48,7 @@ func TestAccAWSServiceDiscoveryService_private(t *testing.T) { func TestAccAWSServiceDiscoveryService_public(t *testing.T) { rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy, @@ -81,7 +81,7 @@ func TestAccAWSServiceDiscoveryService_public(t *testing.T) { func TestAccAWSServiceDiscoveryService_import(t *testing.T) { resourceName := "aws_service_discovery_service.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy, diff --git a/aws/resource_aws_servicecatalog_portfolio_test.go b/aws/resource_aws_servicecatalog_portfolio_test.go index 79cb1630bcb..f405ff34033 100644 --- a/aws/resource_aws_servicecatalog_portfolio_test.go +++ b/aws/resource_aws_servicecatalog_portfolio_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSServiceCatalogPortfolioBasic(t *testing.T) { name := acctest.RandString(5) var dpo servicecatalog.DescribePortfolioOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckServiceCatlaogPortfolioDestroy, @@ -68,7 +68,7 @@ func TestAccAWSServiceCatalogPortfolioBasic(t *testing.T) { func TestAccAWSServiceCatalogPortfolioDisappears(t *testing.T) { name := acctest.RandString(5) var dpo servicecatalog.DescribePortfolioOutput - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckServiceCatlaogPortfolioDestroy, @@ -90,7 +90,7 @@ func TestAccAWSServiceCatalogPortfolioImport(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckServiceCatlaogPortfolioDestroy, diff --git a/aws/resource_aws_ses_active_receipt_rule_set_test.go b/aws/resource_aws_ses_active_receipt_rule_set_test.go index c036ea3378b..c96f339720e 100644 --- a/aws/resource_aws_ses_active_receipt_rule_set_test.go +++ b/aws/resource_aws_ses_active_receipt_rule_set_test.go @@ -10,7 +10,7 @@ import ( ) func TestAccAWSSESActiveReceiptRuleSet_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_ses_configuration_set_test.go b/aws/resource_aws_ses_configuration_set_test.go index bcce375875d..2c455fc0048 100644 --- a/aws/resource_aws_ses_configuration_set_test.go +++ b/aws/resource_aws_ses_configuration_set_test.go @@ -11,7 +11,7 @@ import ( ) func TestAccAWSSESConfigurationSet_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_ses_domain_dkim_test.go b/aws/resource_aws_ses_domain_dkim_test.go index bf5569e1ff1..5679ba2c9d2 100644 --- a/aws/resource_aws_ses_domain_dkim_test.go +++ b/aws/resource_aws_ses_domain_dkim_test.go @@ -18,7 +18,7 @@ func TestAccAWSSESDomainDkim_basic(t *testing.T) { "%s.terraformtesting.com", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_ses_domain_identity_test.go b/aws/resource_aws_ses_domain_identity_test.go index 2dea4b8544c..ec4284dd392 100644 --- a/aws/resource_aws_ses_domain_identity_test.go +++ b/aws/resource_aws_ses_domain_identity_test.go @@ -18,7 +18,7 @@ func TestAccAWSSESDomainIdentity_basic(t *testing.T) { "%s.terraformtesting.com", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, @@ -39,7 +39,7 @@ func TestAccAWSSESDomainIdentity_trailingPeriod(t *testing.T) { "%s.terraformtesting.com.", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, diff --git a/aws/resource_aws_ses_domain_identity_verification_test.go b/aws/resource_aws_ses_domain_identity_verification_test.go index 82611abcccf..0f3a9f76f59 100644 --- a/aws/resource_aws_ses_domain_identity_verification_test.go +++ b/aws/resource_aws_ses_domain_identity_verification_test.go @@ -29,7 +29,7 @@ func TestAccAwsSesDomainIdentityVerification_basic(t *testing.T) { rootDomain := testAccAwsSesDomainIdentityDomainFromEnv(t) domain := fmt.Sprintf("tf-acc-%d.%s", acctest.RandInt(), rootDomain) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, @@ -47,7 +47,7 @@ func TestAccAwsSesDomainIdentityVerification_timeout(t *testing.T) { "%s.terraformtesting.com", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, @@ -65,7 +65,7 @@ func TestAccAwsSesDomainIdentityVerification_nonexistent(t *testing.T) { "%s.terraformtesting.com", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsSESDomainIdentityDestroy, diff --git a/aws/resource_aws_ses_domain_mail_from_test.go b/aws/resource_aws_ses_domain_mail_from_test.go index babb583096e..d421a97b34d 100644 --- a/aws/resource_aws_ses_domain_mail_from_test.go +++ b/aws/resource_aws_ses_domain_mail_from_test.go @@ -19,7 +19,7 @@ func TestAccAWSSESDomainMailFrom_basic(t *testing.T) { mailFromDomain2 := fmt.Sprintf("bounce2.%s", domain) resourceName := "aws_ses_domain_mail_from.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSESDomainMailFromDestroy, @@ -57,7 +57,7 @@ func TestAccAWSSESDomainMailFrom_behaviorOnMxFailure(t *testing.T) { acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) resourceName := "aws_ses_domain_mail_from.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSESDomainMailFromDestroy, diff --git a/aws/resource_aws_ses_event_destination_test.go b/aws/resource_aws_ses_event_destination_test.go index 13662c2c83e..3bd689a37fc 100644 --- a/aws/resource_aws_ses_event_destination_test.go +++ b/aws/resource_aws_ses_event_destination_test.go @@ -23,7 +23,7 @@ func TestAccAWSSESEventDestination_basic(t *testing.T) { sesEventDstNameCw := fmt.Sprintf("tf_acc_event_dst_cloudwatch_%s", rString) sesEventDstNameSns := fmt.Sprintf("tf_acc_event_dst_sns_%s", rString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_ses_identity_notification_topic_test.go b/aws/resource_aws_ses_identity_notification_topic_test.go index 68666e1d3e1..8eafd947cbc 100644 --- a/aws/resource_aws_ses_identity_notification_topic_test.go +++ b/aws/resource_aws_ses_identity_notification_topic_test.go @@ -18,7 +18,7 @@ func TestAccAwsSESIdentityNotificationTopic_basic(t *testing.T) { acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) topicName := fmt.Sprintf("test-topic-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_ses_receipt_filter_test.go b/aws/resource_aws_ses_receipt_filter_test.go index adf3d6ad5ec..044e9819f6a 100644 --- a/aws/resource_aws_ses_receipt_filter_test.go +++ b/aws/resource_aws_ses_receipt_filter_test.go @@ -15,7 +15,7 @@ func TestAccAWSSESReceiptFilter_basic(t *testing.T) { resourceName := "aws_ses_receipt_filter.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSESReceiptFilterDestroy, diff --git a/aws/resource_aws_ses_receipt_rule_set_test.go b/aws/resource_aws_ses_receipt_rule_set_test.go index 16d52d7b090..76623ce9646 100644 --- a/aws/resource_aws_ses_receipt_rule_set_test.go +++ b/aws/resource_aws_ses_receipt_rule_set_test.go @@ -15,7 +15,7 @@ func TestAccAWSSESReceiptRuleSet_basic(t *testing.T) { resourceName := "aws_ses_receipt_rule_set.test" rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSESReceiptRuleSetDestroy, diff --git a/aws/resource_aws_ses_receipt_rule_test.go b/aws/resource_aws_ses_receipt_rule_test.go index c9c6badd8d0..4b97ea02dcc 100644 --- a/aws/resource_aws_ses_receipt_rule_test.go +++ b/aws/resource_aws_ses_receipt_rule_test.go @@ -14,7 +14,7 @@ import ( ) func TestAccAWSSESReceiptRule_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -32,7 +32,7 @@ func TestAccAWSSESReceiptRule_basic(t *testing.T) { } func TestAccAWSSESReceiptRule_s3Action(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -50,7 +50,7 @@ func TestAccAWSSESReceiptRule_s3Action(t *testing.T) { } func TestAccAWSSESReceiptRule_order(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -68,7 +68,7 @@ func TestAccAWSSESReceiptRule_order(t *testing.T) { } func TestAccAWSSESReceiptRule_actions(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_ses_template_test.go b/aws/resource_aws_ses_template_test.go index f14154d284a..81ee1735345 100644 --- a/aws/resource_aws_ses_template_test.go +++ b/aws/resource_aws_ses_template_test.go @@ -17,7 +17,7 @@ import ( func TestAccAWSSesTemplate_Basic(t *testing.T) { name := acctest.RandString(5) var template ses.Template - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSesTemplateDestroy, @@ -40,7 +40,7 @@ func TestAccAWSSesTemplate_Update(t *testing.T) { t.Skipf("Skip due to SES.UpdateTemplate eventual consistency issues") name := acctest.RandString(5) var template ses.Template - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSesTemplateDestroy, @@ -84,7 +84,7 @@ func TestAccAWSSesTemplate_Import(t *testing.T) { name := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSesTemplateDestroy, diff --git a/aws/resource_aws_sfn_activity_test.go b/aws/resource_aws_sfn_activity_test.go index f8b1c91781e..f78d4c813f8 100644 --- a/aws/resource_aws_sfn_activity_test.go +++ b/aws/resource_aws_sfn_activity_test.go @@ -17,7 +17,7 @@ func TestAccAWSSfnActivity_importBasic(t *testing.T) { resourceName := "aws_sfn_activity.foo" rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSfnActivityDestroy, @@ -38,7 +38,7 @@ func TestAccAWSSfnActivity_importBasic(t *testing.T) { func TestAccAWSSfnActivity_basic(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSfnActivityDestroy, diff --git a/aws/resource_aws_sfn_state_machine_test.go b/aws/resource_aws_sfn_state_machine_test.go index 7e3da1a0a40..0cda0ebdf68 100644 --- a/aws/resource_aws_sfn_state_machine_test.go +++ b/aws/resource_aws_sfn_state_machine_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSSfnStateMachine_createUpdate(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSfnStateMachineDestroy, diff --git a/aws/resource_aws_simpledb_domain_test.go b/aws/resource_aws_simpledb_domain_test.go index 492ebc3b192..5a35eb116a8 100644 --- a/aws/resource_aws_simpledb_domain_test.go +++ b/aws/resource_aws_simpledb_domain_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSSimpleDBDomain_importBasic(t *testing.T) { resourceName := "aws_simpledb_domain.test_domain" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSimpleDBDomainDestroy, @@ -33,7 +33,7 @@ func TestAccAWSSimpleDBDomain_importBasic(t *testing.T) { } func TestAccAWSSimpleDBDomain_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSimpleDBDomainDestroy, diff --git a/aws/resource_aws_snapshot_create_volume_permission_test.go b/aws/resource_aws_snapshot_create_volume_permission_test.go index c71f32c8049..fbebe821025 100644 --- a/aws/resource_aws_snapshot_create_volume_permission_test.go +++ b/aws/resource_aws_snapshot_create_volume_permission_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSSnapshotCreateVolumePermission_Basic(t *testing.T) { var snapshotId, accountId string - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ Providers: testAccProviders, Steps: []resource.TestStep{ // Scaffold everything diff --git a/aws/resource_aws_sns_platform_application_test.go b/aws/resource_aws_sns_platform_application_test.go index c44dce38956..164e9f3df3b 100644 --- a/aws/resource_aws_sns_platform_application_test.go +++ b/aws/resource_aws_sns_platform_application_test.go @@ -158,7 +158,7 @@ func TestAccAWSSnsPlatformApplication_basic(t *testing.T) { } t.Run(platform.Name, func(*testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSPlatformApplicationDestroy, @@ -224,7 +224,7 @@ func TestAccAWSSnsPlatformApplication_basicAttributes(t *testing.T) { t.Run(fmt.Sprintf("%s/%s", platform.Name, tc.AttributeKey), func(*testing.T) { name := fmt.Sprintf("tf-acc-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSPlatformApplicationDestroy, @@ -274,7 +274,7 @@ func TestAccAWSSnsPlatformApplication_iamRoleAttributes(t *testing.T) { iamRoleName2 := fmt.Sprintf("tf-acc-%d", acctest.RandInt()) name := fmt.Sprintf("tf-acc-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSPlatformApplicationDestroy, @@ -326,7 +326,7 @@ func TestAccAWSSnsPlatformApplication_snsTopicAttributes(t *testing.T) { snsTopicName2 := fmt.Sprintf("tf-acc-%d", acctest.RandInt()) name := fmt.Sprintf("tf-acc-%d", acctest.RandInt()) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSPlatformApplicationDestroy, diff --git a/aws/resource_aws_sns_topic_policy_test.go b/aws/resource_aws_sns_topic_policy_test.go index 3f5f4b3727f..b24643280f4 100644 --- a/aws/resource_aws_sns_topic_policy_test.go +++ b/aws/resource_aws_sns_topic_policy_test.go @@ -10,7 +10,7 @@ import ( func TestAccAWSSNSTopicPolicy_basic(t *testing.T) { attributes := make(map[string]string) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicDestroy, diff --git a/aws/resource_aws_sns_topic_subscription_test.go b/aws/resource_aws_sns_topic_subscription_test.go index 3633d3533ad..7704a71ccf8 100644 --- a/aws/resource_aws_sns_topic_subscription_test.go +++ b/aws/resource_aws_sns_topic_subscription_test.go @@ -62,7 +62,7 @@ func TestAccAWSSNSTopicSubscription_basic(t *testing.T) { resourceName := "aws_sns_topic_subscription.test_subscription" ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, @@ -100,7 +100,7 @@ func TestAccAWSSNSTopicSubscription_filterPolicy(t *testing.T) { filterPolicy1 := `{"key1": ["val1"], "key2": ["val2"]}` filterPolicy2 := `{"key3": ["val3"], "key4": ["val4"]}` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, @@ -146,7 +146,7 @@ func TestAccAWSSNSTopicSubscription_deliveryPolicy(t *testing.T) { resourceName := "aws_sns_topic_subscription.test_subscription" ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, @@ -204,7 +204,7 @@ func TestAccAWSSNSTopicSubscription_rawMessageDelivery(t *testing.T) { resourceName := "aws_sns_topic_subscription.test_subscription" ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, @@ -250,7 +250,7 @@ func TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint(t *testing.T) { resourceName := "aws_sns_topic_subscription.test_subscription" ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, @@ -279,7 +279,7 @@ func TestAccAWSSNSTopicSubscription_autoConfirmingSecuredEndpoint(t *testing.T) resourceName := "aws_sns_topic_subscription.test_subscription" ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicSubscriptionDestroy, diff --git a/aws/resource_aws_sns_topic_test.go b/aws/resource_aws_sns_topic_test.go index cb3dfa3deaa..1c586e8ceea 100644 --- a/aws/resource_aws_sns_topic_test.go +++ b/aws/resource_aws_sns_topic_test.go @@ -18,7 +18,7 @@ func TestAccAWSSNSTopic_importBasic(t *testing.T) { resourceName := "aws_sns_topic.test_topic" rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSNSTopicDestroy, @@ -39,7 +39,7 @@ func TestAccAWSSNSTopic_importBasic(t *testing.T) { func TestAccAWSSNSTopic_basic(t *testing.T) { attributes := make(map[string]string) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, @@ -60,7 +60,7 @@ func TestAccAWSSNSTopic_name(t *testing.T) { rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, @@ -81,7 +81,7 @@ func TestAccAWSSNSTopic_namePrefix(t *testing.T) { startsWithPrefix := regexp.MustCompile("^terraform-test-topic-") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, @@ -103,7 +103,7 @@ func TestAccAWSSNSTopic_policy(t *testing.T) { rName := acctest.RandString(10) expectedPolicy := `{"Statement":[{"Sid":"Stmt1445931846145","Effect":"Allow","Principal":{"AWS":"*"},"Action":"sns:Publish","Resource":"arn:aws:sns:us-west-2::example"}],"Version":"2012-10-17","Id":"Policy1445931846145"}` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, @@ -124,7 +124,7 @@ func TestAccAWSSNSTopic_withIAMRole(t *testing.T) { attributes := make(map[string]string) rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, @@ -142,7 +142,7 @@ func TestAccAWSSNSTopic_withIAMRole(t *testing.T) { func TestAccAWSSNSTopic_withFakeIAMRole(t *testing.T) { rName := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, @@ -161,7 +161,7 @@ func TestAccAWSSNSTopic_withDeliveryPolicy(t *testing.T) { rName := acctest.RandString(10) expectedPolicy := `{"http":{"defaultHealthyRetryPolicy": {"minDelayTarget": 20,"maxDelayTarget": 20,"numMaxDelayRetries": 0,"numRetries": 3,"numNoDelayRetries": 0,"numMinDelayRetries": 0,"backoffFunction": "linear"},"disableSubscriptionOverrides": false}}` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, @@ -198,7 +198,7 @@ func TestAccAWSSNSTopic_deliveryStatus(t *testing.T) { "SQSSuccessFeedbackSampleRate": regexp.MustCompile(`^70$`), } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_sns_topic.test_topic", Providers: testAccProviders, diff --git a/aws/resource_aws_spot_fleet_request_test.go b/aws/resource_aws_spot_fleet_request_test.go index 407be271777..f29234c7199 100644 --- a/aws/resource_aws_spot_fleet_request_test.go +++ b/aws/resource_aws_spot_fleet_request_test.go @@ -61,7 +61,7 @@ func TestAccAWSSpotFleetRequest_associatePublicIpAddress(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -88,7 +88,7 @@ func TestAccAWSSpotFleetRequest_instanceInterruptionBehavior(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -113,7 +113,7 @@ func TestAccAWSSpotFleetRequest_fleetType(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -138,7 +138,7 @@ func TestAccAWSSpotFleetRequest_iamInstanceProfileArn(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -162,7 +162,7 @@ func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -203,7 +203,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -228,7 +228,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -257,7 +257,7 @@ func TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -282,7 +282,7 @@ func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -315,7 +315,7 @@ func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet(t *testing.T) rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -340,7 +340,7 @@ func TestAccAWSSpotFleetRequest_overriddingSpotPrice(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -375,7 +375,7 @@ func TestAccAWSSpotFleetRequest_withoutSpotPrice(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -400,7 +400,7 @@ func TestAccAWSSpotFleetRequest_diversifiedAllocation(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -427,7 +427,7 @@ func TestAccAWSSpotFleetRequest_multipleInstancePools(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -470,7 +470,7 @@ func TestAccAWSSpotFleetRequest_withWeightedCapacity(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -504,7 +504,7 @@ func TestAccAWSSpotFleetRequest_withEBSDisk(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -527,7 +527,7 @@ func TestAccAWSSpotFleetRequest_withTags(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -550,7 +550,7 @@ func TestAccAWSSpotFleetRequest_placementTenancy(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -684,7 +684,7 @@ func TestAccAWSSpotFleetRequest_WithELBs(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, @@ -734,7 +734,7 @@ func TestAccAWSSpotFleetRequest_WithTargetGroups(t *testing.T) { rName := acctest.RandString(10) rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy, diff --git a/aws/resource_aws_spot_instance_request_test.go b/aws/resource_aws_spot_instance_request_test.go index 09d82f71e48..c5065fbcb3e 100644 --- a/aws/resource_aws_spot_instance_request_test.go +++ b/aws/resource_aws_spot_instance_request_test.go @@ -17,7 +17,7 @@ func TestAccAWSSpotInstanceRequest_basic(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -45,7 +45,7 @@ func TestAccAWSSpotInstanceRequest_withLaunchGroup(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -73,7 +73,7 @@ func TestAccAWSSpotInstanceRequest_withBlockDuration(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -101,7 +101,7 @@ func TestAccAWSSpotInstanceRequest_vpc(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -129,7 +129,7 @@ func TestAccAWSSpotInstanceRequest_validUntil(t *testing.T) { rInt := acctest.RandInt() validUntil := testAccAWSSpotInstanceRequestValidUntil(t) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -156,7 +156,7 @@ func TestAccAWSSpotInstanceRequest_withoutSpotPrice(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -181,7 +181,7 @@ func TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -204,7 +204,7 @@ func TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -228,7 +228,7 @@ func TestAccAWSSpotInstanceRequest_getPasswordData(t *testing.T) { var sir ec2.SpotInstanceRequest rInt := acctest.RandInt() - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -482,7 +482,7 @@ func testAccCheckAWSSpotInstanceRequestAttributesVPC( func TestAccAWSSpotInstanceRequestInterruptStop(t *testing.T) { var sir ec2.SpotInstanceRequest - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, @@ -507,7 +507,7 @@ func TestAccAWSSpotInstanceRequestInterruptStop(t *testing.T) { func TestAccAWSSpotInstanceRequestInterruptHibernate(t *testing.T) { var sir ec2.SpotInstanceRequest - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSpotInstanceRequestDestroy, diff --git a/aws/resource_aws_sqs_queue_policy_test.go b/aws/resource_aws_sqs_queue_policy_test.go index 091087a229b..7dfb9129627 100644 --- a/aws/resource_aws_sqs_queue_policy_test.go +++ b/aws/resource_aws_sqs_queue_policy_test.go @@ -13,7 +13,7 @@ func TestAccAWSSQSQueuePolicy_basic(t *testing.T) { var queueAttributes map[string]*string queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -35,7 +35,7 @@ func TestAccAWSSQSQueuePolicy_import(t *testing.T) { queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5)) resourceName := "aws_sqs_queue_policy.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, diff --git a/aws/resource_aws_sqs_queue_test.go b/aws/resource_aws_sqs_queue_test.go index 5b19c46a812..5856abbb153 100644 --- a/aws/resource_aws_sqs_queue_test.go +++ b/aws/resource_aws_sqs_queue_test.go @@ -18,7 +18,7 @@ func TestAccAWSSQSQueue_importBasic(t *testing.T) { resourceName := "aws_sqs_queue.queue" queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -42,7 +42,7 @@ func TestAccAWSSQSQueue_importFifo(t *testing.T) { resourceName := "aws_sqs_queue.queue" queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -66,7 +66,7 @@ func TestAccAWSSQSQueue_importEncryption(t *testing.T) { resourceName := "aws_sqs_queue.queue" queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -90,7 +90,7 @@ func TestAccAWSSQSQueue_basic(t *testing.T) { var queueAttributes map[string]*string queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -124,7 +124,7 @@ func TestAccAWSSQSQueue_tags(t *testing.T) { var queueAttributes map[string]*string queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -163,7 +163,7 @@ func TestAccAWSSQSQueue_namePrefix(t *testing.T) { var queueAttributes map[string]*string prefix := "acctest-sqs-queue" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -184,7 +184,7 @@ func TestAccAWSSQSQueue_namePrefix_fifo(t *testing.T) { var queueAttributes map[string]*string prefix := "acctest-sqs-queue" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -211,7 +211,7 @@ func TestAccAWSSQSQueue_policy(t *testing.T) { `{"Version": "2012-10-17","Id": "sqspolicy","Statement":[{"Sid": "Stmt1451501026839","Effect": "Allow","Principal":"*","Action":"sqs:SendMessage","Resource":"arn:aws:sqs:us-west-2:470663696735:%s","Condition":{"ArnEquals":{"aws:SourceArn":"arn:aws:sns:us-west-2:470663696735:%s"}}}]}`, topicName, queueName) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -231,7 +231,7 @@ func TestAccAWSSQSQueue_queueDeletedRecently(t *testing.T) { var queueAttributes map[string]*string queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -258,7 +258,7 @@ func TestAccAWSSQSQueue_queueDeletedRecently(t *testing.T) { func TestAccAWSSQSQueue_redrivePolicy(t *testing.T) { var queueAttributes map[string]*string - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -280,7 +280,7 @@ func TestAccAWSSQSQueue_Policybasic(t *testing.T) { queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(10)) topicName := fmt.Sprintf("sns-topic-%s", acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -299,7 +299,7 @@ func TestAccAWSSQSQueue_Policybasic(t *testing.T) { func TestAccAWSSQSQueue_FIFO(t *testing.T) { var queueAttributes map[string]*string - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -316,7 +316,7 @@ func TestAccAWSSQSQueue_FIFO(t *testing.T) { } func TestAccAWSSQSQueue_FIFOExpectNameError(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -332,7 +332,7 @@ func TestAccAWSSQSQueue_FIFOExpectNameError(t *testing.T) { func TestAccAWSSQSQueue_FIFOWithContentBasedDeduplication(t *testing.T) { var queueAttributes map[string]*string - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -350,7 +350,7 @@ func TestAccAWSSQSQueue_FIFOWithContentBasedDeduplication(t *testing.T) { } func TestAccAWSSQSQueue_ExpectContentBasedDeduplicationError(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, @@ -366,7 +366,7 @@ func TestAccAWSSQSQueue_ExpectContentBasedDeduplicationError(t *testing.T) { func TestAccAWSSQSQueue_Encryption(t *testing.T) { var queueAttributes map[string]*string - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSQSQueueDestroy, diff --git a/aws/resource_aws_ssm_activation_test.go b/aws/resource_aws_ssm_activation_test.go index b41f09c6c5a..dc7f00ba6f0 100644 --- a/aws/resource_aws_ssm_activation_test.go +++ b/aws/resource_aws_ssm_activation_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSSSMActivation_basic(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMActivationDestroy, @@ -37,7 +37,7 @@ func TestAccAWSSSMActivation_expirationDate(t *testing.T) { expirationDateS := expirationTime.Format(time.RFC3339) resourceName := "aws_ssm_activation.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMActivationDestroy, diff --git a/aws/resource_aws_ssm_association_test.go b/aws/resource_aws_ssm_association_test.go index 8ee770fc660..a5b47151703 100644 --- a/aws/resource_aws_ssm_association_test.go +++ b/aws/resource_aws_ssm_association_test.go @@ -45,7 +45,7 @@ func TestAccAWSSSMAssociation_basic(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, @@ -83,7 +83,7 @@ func TestAccAWSSSMAssociation_withTargets(t *testing.T) { key = "tag:ExtraName" values = ["acceptanceTest"] }` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, @@ -134,7 +134,7 @@ func TestAccAWSSSMAssociation_withTargets(t *testing.T) { func TestAccAWSSSMAssociation_withParameters(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, @@ -163,7 +163,7 @@ func TestAccAWSSSMAssociation_withAssociationName(t *testing.T) { assocName1 := acctest.RandString(10) assocName2 := acctest.RandString(10) rName := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, @@ -195,7 +195,7 @@ func TestAccAWSSSMAssociation_withAssociationNameAndScheduleExpression(t *testin scheduleExpression1 := "cron(0 16 ? * TUE *)" scheduleExpression2 := "cron(0 16 ? * WED *)" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, @@ -222,7 +222,7 @@ func TestAccAWSSSMAssociation_withAssociationNameAndScheduleExpression(t *testin func TestAccAWSSSMAssociation_withDocumentVersion(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, @@ -241,7 +241,7 @@ func TestAccAWSSSMAssociation_withDocumentVersion(t *testing.T) { func TestAccAWSSSMAssociation_withOutputLocation(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, @@ -282,7 +282,7 @@ func TestAccAWSSSMAssociation_withOutputLocation(t *testing.T) { func TestAccAWSSSMAssociation_withScheduleExpression(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMAssociationDestroy, diff --git a/aws/resource_aws_ssm_document_test.go b/aws/resource_aws_ssm_document_test.go index 2385eac10e7..91fab3f3456 100644 --- a/aws/resource_aws_ssm_document_test.go +++ b/aws/resource_aws_ssm_document_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSSSMDocument_basic(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -36,7 +36,7 @@ func TestAccAWSSSMDocument_basic(t *testing.T) { func TestAccAWSSSMDocument_update(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -69,7 +69,7 @@ func TestAccAWSSSMDocument_update(t *testing.T) { func TestAccAWSSSMDocument_permission_public(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -91,7 +91,7 @@ func TestAccAWSSSMDocument_permission_public(t *testing.T) { func TestAccAWSSSMDocument_permission_private(t *testing.T) { name := acctest.RandString(10) ids := "123456789012" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -113,7 +113,7 @@ func TestAccAWSSSMDocument_permission_change(t *testing.T) { idsInitial := "123456789012,123456789013" idsRemove := "123456789012" idsAdd := "123456789012,123456789014" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -151,7 +151,7 @@ func TestAccAWSSSMDocument_permission_change(t *testing.T) { func TestAccAWSSSMDocument_params(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -180,7 +180,7 @@ func TestAccAWSSSMDocument_params(t *testing.T) { func TestAccAWSSSMDocument_automation(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -199,7 +199,7 @@ func TestAccAWSSSMDocument_automation(t *testing.T) { func TestAccAWSSSMDocument_session(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -240,7 +240,7 @@ mainSteps: runCommand: - Get-Process ` - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, @@ -269,7 +269,7 @@ func TestAccAWSSSMDocument_Tags(t *testing.T) { rName := acctest.RandString(10) resourceName := "aws_ssm_document.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMDocumentDestroy, diff --git a/aws/resource_aws_ssm_maintenance_window_target_test.go b/aws/resource_aws_ssm_maintenance_window_target_test.go index f14c56e07fe..11882ec8c83 100644 --- a/aws/resource_aws_ssm_maintenance_window_target_test.go +++ b/aws/resource_aws_ssm_maintenance_window_target_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSSSMMaintenanceWindowTarget_basic(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, @@ -38,7 +38,7 @@ func TestAccAWSSSMMaintenanceWindowTarget_basic(t *testing.T) { func TestAccAWSSSMMaintenanceWindowTarget_update(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTargetDestroy, diff --git a/aws/resource_aws_ssm_maintenance_window_task_test.go b/aws/resource_aws_ssm_maintenance_window_task_test.go index ecb466953eb..6a866d0fa23 100644 --- a/aws/resource_aws_ssm_maintenance_window_task_test.go +++ b/aws/resource_aws_ssm_maintenance_window_task_test.go @@ -16,7 +16,7 @@ func TestAccAWSSSMMaintenanceWindowTask_basic(t *testing.T) { var task ssm.MaintenanceWindowTask name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTaskDestroy, @@ -34,7 +34,7 @@ func TestAccAWSSSMMaintenanceWindowTask_basic(t *testing.T) { func TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource(t *testing.T) { var before, after ssm.MaintenanceWindowTask name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowTaskDestroy, diff --git a/aws/resource_aws_ssm_maintenance_window_test.go b/aws/resource_aws_ssm_maintenance_window_test.go index 068f47667dd..54486781702 100644 --- a/aws/resource_aws_ssm_maintenance_window_test.go +++ b/aws/resource_aws_ssm_maintenance_window_test.go @@ -15,7 +15,7 @@ func TestAccAWSSSMMaintenanceWindow_basic(t *testing.T) { var winId ssm.MaintenanceWindowIdentity name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowDestroy, @@ -61,7 +61,7 @@ func TestAccAWSSSMMaintenanceWindow_disappears(t *testing.T) { name := acctest.RandString(10) resourceName := "aws_ssm_maintenance_window.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMMaintenanceWindowDestroy, diff --git a/aws/resource_aws_ssm_parameter_test.go b/aws/resource_aws_ssm_parameter_test.go index 221ab6faa00..5f544937c2e 100644 --- a/aws/resource_aws_ssm_parameter_test.go +++ b/aws/resource_aws_ssm_parameter_test.go @@ -17,7 +17,7 @@ func TestAccAWSSSMParameter_importBasic(t *testing.T) { randName := acctest.RandString(5) randValue := acctest.RandString(5) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -40,7 +40,7 @@ func TestAccAWSSSMParameter_basic(t *testing.T) { var param ssm.Parameter name := fmt.Sprintf("%s_%s", t.Name(), acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -63,7 +63,7 @@ func TestAccAWSSSMParameter_disappears(t *testing.T) { var param ssm.Parameter name := fmt.Sprintf("%s_%s", t.Name(), acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -84,7 +84,7 @@ func TestAccAWSSSMParameter_update(t *testing.T) { var param ssm.Parameter name := fmt.Sprintf("%s_%s", t.Name(), acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -108,7 +108,7 @@ func TestAccAWSSSMParameter_updateDescription(t *testing.T) { var param ssm.Parameter name := fmt.Sprintf("%s_%s", t.Name(), acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -132,7 +132,7 @@ func TestAccAWSSSMParameter_changeNameForcesNew(t *testing.T) { before := fmt.Sprintf("%s_%s", t.Name(), acctest.RandString(10)) after := fmt.Sprintf("%s_%s", t.Name(), acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -158,7 +158,7 @@ func TestAccAWSSSMParameter_fullPath(t *testing.T) { var param ssm.Parameter name := fmt.Sprintf("/path/%s_%s", t.Name(), acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -181,7 +181,7 @@ func TestAccAWSSSMParameter_secure(t *testing.T) { var param ssm.Parameter name := fmt.Sprintf("%s_%s", t.Name(), acctest.RandString(10)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -204,7 +204,7 @@ func TestAccAWSSSMParameter_secure_with_key(t *testing.T) { randString := acctest.RandString(10) name := fmt.Sprintf("%s_%s", t.Name(), randString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, @@ -227,7 +227,7 @@ func TestAccAWSSSMParameter_secure_keyUpdate(t *testing.T) { randString := acctest.RandString(10) name := fmt.Sprintf("%s_%s", t.Name(), randString) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMParameterDestroy, diff --git a/aws/resource_aws_ssm_patch_baseline_test.go b/aws/resource_aws_ssm_patch_baseline_test.go index 3ac36b80977..91a215b080c 100644 --- a/aws/resource_aws_ssm_patch_baseline_test.go +++ b/aws/resource_aws_ssm_patch_baseline_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSSSMPatchBaseline_basic(t *testing.T) { var before, after ssm.PatchBaselineIdentity name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMPatchBaselineDestroy, @@ -68,7 +68,7 @@ func TestAccAWSSSMPatchBaseline_disappears(t *testing.T) { name := acctest.RandString(10) resourceName := "aws_ssm_patch_baseline.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMPatchBaselineDestroy, @@ -88,7 +88,7 @@ func TestAccAWSSSMPatchBaseline_disappears(t *testing.T) { func TestAccAWSSSMPatchBaselineWithOperatingSystem(t *testing.T) { var before, after ssm.PatchBaselineIdentity name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMPatchBaselineDestroy, diff --git a/aws/resource_aws_ssm_patch_group_test.go b/aws/resource_aws_ssm_patch_group_test.go index a244beb2373..b2dfcae91eb 100644 --- a/aws/resource_aws_ssm_patch_group_test.go +++ b/aws/resource_aws_ssm_patch_group_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSSSMPatchGroup_basic(t *testing.T) { name := acctest.RandString(10) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSSMPatchGroupDestroy, diff --git a/aws/resource_aws_ssm_resource_data_sync_test.go b/aws/resource_aws_ssm_resource_data_sync_test.go index 0c31481b79d..ec9a3f545b6 100644 --- a/aws/resource_aws_ssm_resource_data_sync_test.go +++ b/aws/resource_aws_ssm_resource_data_sync_test.go @@ -11,7 +11,7 @@ import ( ) func TestAccAWSSsmResourceDataSync_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSsmResourceDataSyncDestroy, @@ -29,7 +29,7 @@ func TestAccAWSSsmResourceDataSync_basic(t *testing.T) { func TestAccAWSSsmResourceDataSync_import(t *testing.T) { resourceName := "aws_ssm_resource_data_sync.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSSsmResourceDataSyncDestroy, diff --git a/aws/resource_aws_storagegateway_cache_test.go b/aws/resource_aws_storagegateway_cache_test.go index 9acce6e6cbc..5bd5860f18f 100644 --- a/aws/resource_aws_storagegateway_cache_test.go +++ b/aws/resource_aws_storagegateway_cache_test.go @@ -72,7 +72,7 @@ func TestAccAWSStorageGatewayCache_FileGateway(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_cache.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, // Storage Gateway API does not support removing caches @@ -99,7 +99,7 @@ func TestAccAWSStorageGatewayCache_TapeAndVolumeGateway(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_cache.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, // Storage Gateway API does not support removing caches diff --git a/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go b/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go index ef387155e38..53e3f6e1e22 100644 --- a/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go +++ b/aws/resource_aws_storagegateway_cached_iscsi_volume_test.go @@ -73,7 +73,7 @@ func TestAccAWSStorageGatewayCachedIscsiVolume_Basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_cached_iscsi_volume.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayCachedIscsiVolumeDestroy, @@ -110,7 +110,7 @@ func TestAccAWSStorageGatewayCachedIscsiVolume_SnapshotId(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_cached_iscsi_volume.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayCachedIscsiVolumeDestroy, @@ -148,7 +148,7 @@ func TestAccAWSStorageGatewayCachedIscsiVolume_SourceVolumeArn(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_cached_iscsi_volume.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayCachedIscsiVolumeDestroy, diff --git a/aws/resource_aws_storagegateway_gateway_test.go b/aws/resource_aws_storagegateway_gateway_test.go index ec425c64dfc..fc9af605088 100644 --- a/aws/resource_aws_storagegateway_gateway_test.go +++ b/aws/resource_aws_storagegateway_gateway_test.go @@ -71,7 +71,7 @@ func TestAccAWSStorageGatewayGateway_GatewayType_Cached(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, @@ -106,7 +106,7 @@ func TestAccAWSStorageGatewayGateway_GatewayType_FileS3(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, @@ -141,7 +141,7 @@ func TestAccAWSStorageGatewayGateway_GatewayType_Stored(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, @@ -176,7 +176,7 @@ func TestAccAWSStorageGatewayGateway_GatewayType_Vtl(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, @@ -212,7 +212,7 @@ func TestAccAWSStorageGatewayGateway_GatewayName(t *testing.T) { rName2 := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, @@ -246,7 +246,7 @@ func TestAccAWSStorageGatewayGateway_GatewayTimezone(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, @@ -280,7 +280,7 @@ func TestAccAWSStorageGatewayGateway_SmbActiveDirectorySettings(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, @@ -308,7 +308,7 @@ func TestAccAWSStorageGatewayGateway_SmbGuestPassword(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_gateway.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayGatewayDestroy, diff --git a/aws/resource_aws_storagegateway_nfs_file_share_test.go b/aws/resource_aws_storagegateway_nfs_file_share_test.go index a086f10f232..5d78a1c85c4 100644 --- a/aws/resource_aws_storagegateway_nfs_file_share_test.go +++ b/aws/resource_aws_storagegateway_nfs_file_share_test.go @@ -17,7 +17,7 @@ func TestAccAWSStorageGatewayNfsFileShare_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -58,7 +58,7 @@ func TestAccAWSStorageGatewayNfsFileShare_ClientList(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -98,7 +98,7 @@ func TestAccAWSStorageGatewayNfsFileShare_DefaultStorageClass(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -131,7 +131,7 @@ func TestAccAWSStorageGatewayNfsFileShare_GuessMIMETypeEnabled(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -164,7 +164,7 @@ func TestAccAWSStorageGatewayNfsFileShare_KMSEncrypted(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -194,7 +194,7 @@ func TestAccAWSStorageGatewayNfsFileShare_KMSKeyArn(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -236,7 +236,7 @@ func TestAccAWSStorageGatewayNfsFileShare_NFSFileShareDefaults(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -277,7 +277,7 @@ func TestAccAWSStorageGatewayNfsFileShare_ObjectACL(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -310,7 +310,7 @@ func TestAccAWSStorageGatewayNfsFileShare_ReadOnly(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -343,7 +343,7 @@ func TestAccAWSStorageGatewayNfsFileShare_RequesterPays(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, @@ -376,7 +376,7 @@ func TestAccAWSStorageGatewayNfsFileShare_Squash(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_nfs_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewayNfsFileShareDestroy, diff --git a/aws/resource_aws_storagegateway_smb_file_share_test.go b/aws/resource_aws_storagegateway_smb_file_share_test.go index aebbe1b0ff3..14366463370 100644 --- a/aws/resource_aws_storagegateway_smb_file_share_test.go +++ b/aws/resource_aws_storagegateway_smb_file_share_test.go @@ -17,7 +17,7 @@ func TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory(t *test rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -57,7 +57,7 @@ func TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess(t *testing. rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -97,7 +97,7 @@ func TestAccAWSStorageGatewaySmbFileShare_DefaultStorageClass(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -130,7 +130,7 @@ func TestAccAWSStorageGatewaySmbFileShare_GuessMIMETypeEnabled(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -163,7 +163,7 @@ func TestAccAWSStorageGatewaySmbFileShare_InvalidUserList(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -203,7 +203,7 @@ func TestAccAWSStorageGatewaySmbFileShare_KMSEncrypted(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -233,7 +233,7 @@ func TestAccAWSStorageGatewaySmbFileShare_KMSKeyArn(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -275,7 +275,7 @@ func TestAccAWSStorageGatewaySmbFileShare_ObjectACL(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -308,7 +308,7 @@ func TestAccAWSStorageGatewaySmbFileShare_ReadOnly(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -341,7 +341,7 @@ func TestAccAWSStorageGatewaySmbFileShare_RequesterPays(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, @@ -374,7 +374,7 @@ func TestAccAWSStorageGatewaySmbFileShare_ValidUserList(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_smb_file_share.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSStorageGatewaySmbFileShareDestroy, diff --git a/aws/resource_aws_storagegateway_upload_buffer_test.go b/aws/resource_aws_storagegateway_upload_buffer_test.go index 9af32c83214..2f5ae28c6e1 100644 --- a/aws/resource_aws_storagegateway_upload_buffer_test.go +++ b/aws/resource_aws_storagegateway_upload_buffer_test.go @@ -72,7 +72,7 @@ func TestAccAWSStorageGatewayUploadBuffer_Basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_upload_buffer.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, // Storage Gateway API does not support removing upload buffers diff --git a/aws/resource_aws_storagegateway_working_storage_test.go b/aws/resource_aws_storagegateway_working_storage_test.go index 7351cfa46cf..770d5d1f1d5 100644 --- a/aws/resource_aws_storagegateway_working_storage_test.go +++ b/aws/resource_aws_storagegateway_working_storage_test.go @@ -72,7 +72,7 @@ func TestAccAWSStorageGatewayWorkingStorage_Basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_storagegateway_working_storage.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, // Storage Gateway API does not support removing working storages diff --git a/aws/resource_aws_subnet_test.go b/aws/resource_aws_subnet_test.go index 3ddc7167c51..c365f38fe7c 100644 --- a/aws/resource_aws_subnet_test.go +++ b/aws/resource_aws_subnet_test.go @@ -90,7 +90,7 @@ func testSweepSubnets(region string) error { func TestAccAWSSubnet_importBasic(t *testing.T) { resourceName := "aws_subnet.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSubnetDestroy, @@ -123,7 +123,7 @@ func TestAccAWSSubnet_basic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_subnet.foo", Providers: testAccProviders, @@ -148,7 +148,7 @@ func TestAccAWSSubnet_basic(t *testing.T) { func TestAccAWSSubnet_ipv6(t *testing.T) { var before, after ec2.Subnet - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_subnet.foo", Providers: testAccProviders, @@ -186,7 +186,7 @@ func TestAccAWSSubnet_ipv6(t *testing.T) { func TestAccAWSSubnet_enableIpv6(t *testing.T) { var subnet ec2.Subnet - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_subnet.foo", Providers: testAccProviders, diff --git a/aws/resource_aws_swf_domain_test.go b/aws/resource_aws_swf_domain_test.go index 91a4a603fff..33b3771bc01 100644 --- a/aws/resource_aws_swf_domain_test.go +++ b/aws/resource_aws_swf_domain_test.go @@ -16,7 +16,7 @@ func TestAccAWSSwfDomain_basic(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_swf_domain.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -43,7 +43,7 @@ func TestAccAWSSwfDomain_basic(t *testing.T) { func TestAccAWSSwfDomain_NamePrefix(t *testing.T) { resourceName := "aws_swf_domain.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -70,7 +70,7 @@ func TestAccAWSSwfDomain_NamePrefix(t *testing.T) { func TestAccAWSSwfDomain_GeneratedName(t *testing.T) { resourceName := "aws_swf_domain.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -96,7 +96,7 @@ func TestAccAWSSwfDomain_Description(t *testing.T) { rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_swf_domain.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, diff --git a/aws/resource_aws_volume_attachment_test.go b/aws/resource_aws_volume_attachment_test.go index 323db79d32c..8a23102f09e 100644 --- a/aws/resource_aws_volume_attachment_test.go +++ b/aws/resource_aws_volume_attachment_test.go @@ -16,7 +16,7 @@ func TestAccAWSVolumeAttachment_basic(t *testing.T) { var i ec2.Instance var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeAttachmentDestroy, @@ -42,7 +42,7 @@ func TestAccAWSVolumeAttachment_skipDestroy(t *testing.T) { var i ec2.Instance var v ec2.Volume - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeAttachmentDestroy, @@ -93,7 +93,7 @@ func TestAccAWSVolumeAttachment_attachStopped(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeAttachmentDestroy, @@ -124,7 +124,7 @@ func TestAccAWSVolumeAttachment_attachStopped(t *testing.T) { } func TestAccAWSVolumeAttachment_update(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeAttachmentDestroy, diff --git a/aws/resource_aws_vpc_dhcp_options_association_test.go b/aws/resource_aws_vpc_dhcp_options_association_test.go index 3870405f262..c0648d1f095 100644 --- a/aws/resource_aws_vpc_dhcp_options_association_test.go +++ b/aws/resource_aws_vpc_dhcp_options_association_test.go @@ -13,7 +13,7 @@ func TestAccAWSDHCPOptionsAssociation_basic(t *testing.T) { var v ec2.Vpc var d ec2.DhcpOptions - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDHCPOptionsAssociationDestroy, diff --git a/aws/resource_aws_vpc_dhcp_options_test.go b/aws/resource_aws_vpc_dhcp_options_test.go index d59bf3847df..948f34b371e 100644 --- a/aws/resource_aws_vpc_dhcp_options_test.go +++ b/aws/resource_aws_vpc_dhcp_options_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSDHCPOptions_importBasic(t *testing.T) { resourceName := "aws_vpc_dhcp_options.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ @@ -34,7 +34,7 @@ func TestAccAWSDHCPOptions_importBasic(t *testing.T) { func TestAccAWSDHCPOptions_basic(t *testing.T) { var d ec2.DhcpOptions - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDHCPOptionsDestroy, @@ -59,7 +59,7 @@ func TestAccAWSDHCPOptions_basic(t *testing.T) { func TestAccAWSDHCPOptions_deleteOptions(t *testing.T) { var d ec2.DhcpOptions - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckDHCPOptionsDestroy, diff --git a/aws/resource_aws_vpc_endpoint_connection_notification_test.go b/aws/resource_aws_vpc_endpoint_connection_notification_test.go index 2e9795a4146..5219136905e 100644 --- a/aws/resource_aws_vpc_endpoint_connection_notification_test.go +++ b/aws/resource_aws_vpc_endpoint_connection_notification_test.go @@ -17,7 +17,7 @@ func TestAccAWSVpcEndpointConnectionNotification_importBasic(t *testing.T) { lbName := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) resourceName := "aws_vpc_endpoint_connection_notification.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointConnectionNotificationDestroy, @@ -38,7 +38,7 @@ func TestAccAWSVpcEndpointConnectionNotification_importBasic(t *testing.T) { func TestAccAWSVpcEndpointConnectionNotification_basic(t *testing.T) { lbName := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_endpoint_connection_notification.foo", Providers: testAccProviders, diff --git a/aws/resource_aws_vpc_endpoint_route_table_association_test.go b/aws/resource_aws_vpc_endpoint_route_table_association_test.go index 7e632398478..050d7df541a 100644 --- a/aws/resource_aws_vpc_endpoint_route_table_association_test.go +++ b/aws/resource_aws_vpc_endpoint_route_table_association_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSVpcEndpointRouteTableAssociation_basic(t *testing.T) { var vpce ec2.VpcEndpoint - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointRouteTableAssociationDestroy, diff --git a/aws/resource_aws_vpc_endpoint_service_allowed_principal_test.go b/aws/resource_aws_vpc_endpoint_service_allowed_principal_test.go index 235eaf51b95..b8ef66cc86c 100644 --- a/aws/resource_aws_vpc_endpoint_service_allowed_principal_test.go +++ b/aws/resource_aws_vpc_endpoint_service_allowed_principal_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSVpcEndpointServiceAllowedPrincipal_basic(t *testing.T) { lbName := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointServiceAllowedPrincipalDestroy, diff --git a/aws/resource_aws_vpc_endpoint_service_test.go b/aws/resource_aws_vpc_endpoint_service_test.go index 5ca4d47218b..6e14c37e8f1 100644 --- a/aws/resource_aws_vpc_endpoint_service_test.go +++ b/aws/resource_aws_vpc_endpoint_service_test.go @@ -17,7 +17,7 @@ func TestAccAWSVpcEndpointService_importBasic(t *testing.T) { lbName := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) resourceName := "aws_vpc_endpoint_service.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointServiceDestroy, @@ -40,7 +40,7 @@ func TestAccAWSVpcEndpointService_basic(t *testing.T) { lb1Name := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) lb2Name := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_endpoint_service.foo", Providers: testAccProviders, @@ -84,7 +84,7 @@ func TestAccAWSVpcEndpointService_removed(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointServiceDestroy, diff --git a/aws/resource_aws_vpc_endpoint_subnet_association_test.go b/aws/resource_aws_vpc_endpoint_subnet_association_test.go index d8f0b984955..80a7d9bee59 100644 --- a/aws/resource_aws_vpc_endpoint_subnet_association_test.go +++ b/aws/resource_aws_vpc_endpoint_subnet_association_test.go @@ -14,7 +14,7 @@ import ( func TestAccAWSVpcEndpointSubnetAssociation_basic(t *testing.T) { var vpce ec2.VpcEndpoint - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointSubnetAssociationDestroy, @@ -33,7 +33,7 @@ func TestAccAWSVpcEndpointSubnetAssociation_basic(t *testing.T) { func TestAccAWSVpcEndpointSubnetAssociation_multiple(t *testing.T) { var vpce ec2.VpcEndpoint - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointSubnetAssociationDestroy, diff --git a/aws/resource_aws_vpc_endpoint_test.go b/aws/resource_aws_vpc_endpoint_test.go index 5700d2d40f2..ef17dd910f5 100644 --- a/aws/resource_aws_vpc_endpoint_test.go +++ b/aws/resource_aws_vpc_endpoint_test.go @@ -18,7 +18,7 @@ import ( func TestAccAWSVpcEndpoint_importBasic(t *testing.T) { resourceName := "aws_vpc_endpoint.s3" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointDestroy, @@ -39,7 +39,7 @@ func TestAccAWSVpcEndpoint_importBasic(t *testing.T) { func TestAccAWSVpcEndpoint_gatewayBasic(t *testing.T) { var endpoint ec2.VpcEndpoint - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_endpoint.s3", Providers: testAccProviders, @@ -66,7 +66,7 @@ func TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicy(t *testing.T) { var endpoint ec2.VpcEndpoint var routeTable ec2.RouteTable - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_endpoint.s3", Providers: testAccProviders, @@ -105,7 +105,7 @@ func TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicy(t *testing.T) { func TestAccAWSVpcEndpoint_interfaceBasic(t *testing.T) { var endpoint ec2.VpcEndpoint - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_endpoint.ec2", Providers: testAccProviders, @@ -131,7 +131,7 @@ func TestAccAWSVpcEndpoint_interfaceBasic(t *testing.T) { func TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup(t *testing.T) { var endpoint ec2.VpcEndpoint - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_endpoint.ec2", Providers: testAccProviders, @@ -169,7 +169,7 @@ func TestAccAWSVpcEndpoint_interfaceNonAWSService(t *testing.T) { lbName := fmt.Sprintf("testaccawsnlb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) var endpoint ec2.VpcEndpoint - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_endpoint.foo", Providers: testAccProviders, @@ -207,7 +207,7 @@ func TestAccAWSVpcEndpoint_removed(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcEndpointDestroy, diff --git a/aws/resource_aws_vpc_ipv4_cidr_block_association_test.go b/aws/resource_aws_vpc_ipv4_cidr_block_association_test.go index 4095ec5af9a..bc574fa7868 100644 --- a/aws/resource_aws_vpc_ipv4_cidr_block_association_test.go +++ b/aws/resource_aws_vpc_ipv4_cidr_block_association_test.go @@ -14,7 +14,7 @@ import ( func TestAccAwsVpcIpv4CidrBlockAssociation_basic(t *testing.T) { var associationSecondary, associationTertiary ec2.VpcCidrBlockAssociation - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsVpcIpv4CidrBlockAssociationDestroy, diff --git a/aws/resource_aws_vpc_peering_connection_accepter_test.go b/aws/resource_aws_vpc_peering_connection_accepter_test.go index 1355b710567..d2e678349b7 100644 --- a/aws/resource_aws_vpc_peering_connection_accepter_test.go +++ b/aws/resource_aws_vpc_peering_connection_accepter_test.go @@ -12,7 +12,7 @@ import ( func TestAccAWSVPCPeeringConnectionAccepter_sameRegion(t *testing.T) { var connection ec2.VpcPeeringConnection - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccAwsVPCPeeringConnectionAccepterDestroy, @@ -37,7 +37,7 @@ func TestAccAWSVPCPeeringConnectionAccepter_differentRegion(t *testing.T) { var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProviderFactories: testAccProviderFactories(&providers), CheckDestroy: testAccAwsVPCPeeringConnectionAccepterDestroy, diff --git a/aws/resource_aws_vpc_peering_connection_options_test.go b/aws/resource_aws_vpc_peering_connection_options_test.go index 1fcc5d67b7e..e1197ee9fea 100644 --- a/aws/resource_aws_vpc_peering_connection_options_test.go +++ b/aws/resource_aws_vpc_peering_connection_options_test.go @@ -11,7 +11,7 @@ import ( func TestAccAWSVpcPeeringConnectionOptions_importBasic(t *testing.T) { resourceName := "aws_vpc_peering_connection_options.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, @@ -30,7 +30,7 @@ func TestAccAWSVpcPeeringConnectionOptions_importBasic(t *testing.T) { } func TestAccAWSVpcPeeringConnectionOptions_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, diff --git a/aws/resource_aws_vpc_peering_connection_test.go b/aws/resource_aws_vpc_peering_connection_test.go index eccfc73528d..47838c60d85 100644 --- a/aws/resource_aws_vpc_peering_connection_test.go +++ b/aws/resource_aws_vpc_peering_connection_test.go @@ -17,7 +17,7 @@ import ( func TestAccAWSVPCPeeringConnection_importBasic(t *testing.T) { resourceName := "aws_vpc_peering_connection.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSVpcPeeringConnectionDestroy, @@ -40,7 +40,7 @@ func TestAccAWSVPCPeeringConnection_importBasic(t *testing.T) { func TestAccAWSVPCPeeringConnection_basic(t *testing.T) { var connection ec2.VpcPeeringConnection - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_peering_connection.foo", IDRefreshIgnore: []string{"auto_accept"}, @@ -77,7 +77,7 @@ func TestAccAWSVPCPeeringConnection_plan(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshIgnore: []string{"auto_accept"}, Providers: testAccProviders, @@ -100,7 +100,7 @@ func TestAccAWSVPCPeeringConnection_plan(t *testing.T) { func TestAccAWSVPCPeeringConnection_tags(t *testing.T) { var connection ec2.VpcPeeringConnection - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_peering_connection.foo", IDRefreshIgnore: []string{"auto_accept"}, @@ -141,7 +141,7 @@ func TestAccAWSVPCPeeringConnection_options(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_peering_connection.foo", IDRefreshIgnore: []string{"auto_accept"}, @@ -216,7 +216,7 @@ func TestAccAWSVPCPeeringConnection_options(t *testing.T) { } func TestAccAWSVPCPeeringConnection_failedState(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshIgnore: []string{"auto_accept"}, Providers: testAccProviders, @@ -340,7 +340,7 @@ func testAccCheckAWSVpcPeeringConnectionOptions(n, block string, options *ec2.Vp } func TestAccAWSVPCPeeringConnection_peerRegionAndAutoAccept(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshIgnore: []string{"auto_accept"}, Providers: testAccProviders, @@ -359,7 +359,7 @@ func TestAccAWSVPCPeeringConnection_region(t *testing.T) { var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpc_peering_connection.foo", IDRefreshIgnore: []string{"auto_accept"}, diff --git a/aws/resource_aws_vpc_test.go b/aws/resource_aws_vpc_test.go index f771f172a02..f07602b3581 100644 --- a/aws/resource_aws_vpc_test.go +++ b/aws/resource_aws_vpc_test.go @@ -91,7 +91,7 @@ func testSweepVPCs(region string) error { func TestAccAWSVpc_importBasic(t *testing.T) { resourceName := "aws_vpc.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -112,7 +112,7 @@ func TestAccAWSVpc_importBasic(t *testing.T) { func TestAccAWSVpc_basic(t *testing.T) { var vpc ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -141,7 +141,7 @@ func TestAccAWSVpc_basic(t *testing.T) { func TestAccAWSVpc_enableIpv6(t *testing.T) { var vpc ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -194,7 +194,7 @@ func TestAccAWSVpc_enableIpv6(t *testing.T) { func TestAccAWSVpc_dedicatedTenancy(t *testing.T) { var vpc ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -215,7 +215,7 @@ func TestAccAWSVpc_modifyTenancy(t *testing.T) { var vpcDedicated ec2.Vpc var vpcDefault ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -253,7 +253,7 @@ func TestAccAWSVpc_modifyTenancy(t *testing.T) { func TestAccAWSVpc_tags(t *testing.T) { var vpc ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -284,7 +284,7 @@ func TestAccAWSVpc_tags(t *testing.T) { func TestAccAWSVpc_update(t *testing.T) { var vpc ec2.Vpc - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -406,7 +406,7 @@ func testAccCheckVpcExists(n string, vpc *ec2.Vpc) resource.TestCheckFunc { // https://github.com/hashicorp/terraform/issues/1301 func TestAccAWSVpc_bothDnsOptionsSet(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -426,7 +426,7 @@ func TestAccAWSVpc_bothDnsOptionsSet(t *testing.T) { // https://github.com/hashicorp/terraform/issues/10168 func TestAccAWSVpc_DisabledDnsSupport(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -443,7 +443,7 @@ func TestAccAWSVpc_DisabledDnsSupport(t *testing.T) { } func TestAccAWSVpc_classiclinkOptionSet(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, @@ -460,7 +460,7 @@ func TestAccAWSVpc_classiclinkOptionSet(t *testing.T) { } func TestAccAWSVpc_classiclinkDnsSupportOptionSet(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpcDestroy, diff --git a/aws/resource_aws_vpn_connection_route_test.go b/aws/resource_aws_vpn_connection_route_test.go index 4c4a5ace79c..121df3223ec 100644 --- a/aws/resource_aws_vpn_connection_route_test.go +++ b/aws/resource_aws_vpn_connection_route_test.go @@ -15,7 +15,7 @@ import ( func TestAccAWSVpnConnectionRoute_basic(t *testing.T) { rBgpAsn := acctest.RandIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccAwsVpnConnectionRouteDestroy, diff --git a/aws/resource_aws_vpn_connection_test.go b/aws/resource_aws_vpn_connection_test.go index c0c10e30d0d..a93c4502b84 100644 --- a/aws/resource_aws_vpn_connection_test.go +++ b/aws/resource_aws_vpn_connection_test.go @@ -19,7 +19,7 @@ func TestAccAWSVpnConnection_importBasic(t *testing.T) { resourceName := "aws_vpn_connection.foo" rBgpAsn := acctest.RandIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccAwsVpnConnectionDestroy, @@ -41,7 +41,7 @@ func TestAccAWSVpnConnection_basic(t *testing.T) { rBgpAsn := acctest.RandIntRange(64512, 65534) var vpn ec2.VpnConnection - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_connection.foo", Providers: testAccProviders, @@ -79,7 +79,7 @@ func TestAccAWSVpnConnection_tunnelOptions(t *testing.T) { rBgpAsn := acctest.RandIntRange(64512, 65534) var vpn ec2.VpnConnection - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_connection.foo", Providers: testAccProviders, @@ -175,7 +175,7 @@ func TestAccAWSVpnConnection_withoutStaticRoutes(t *testing.T) { rBgpAsn := acctest.RandIntRange(64512, 65534) var vpn ec2.VpnConnection - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_connection.foo", Providers: testAccProviders, @@ -202,7 +202,7 @@ func TestAccAWSVpnConnection_disappears(t *testing.T) { rBgpAsn := acctest.RandIntRange(64512, 65534) var vpn ec2.VpnConnection - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccAwsVpnConnectionDestroy, diff --git a/aws/resource_aws_vpn_gateway_attachment_test.go b/aws/resource_aws_vpn_gateway_attachment_test.go index 07b87ca4f6f..3255d7333a5 100644 --- a/aws/resource_aws_vpn_gateway_attachment_test.go +++ b/aws/resource_aws_vpn_gateway_attachment_test.go @@ -14,7 +14,7 @@ func TestAccAWSVpnGatewayAttachment_basic(t *testing.T) { var vpc ec2.Vpc var vgw ec2.VpnGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_gateway_attachment.test", Providers: testAccProviders, @@ -52,7 +52,7 @@ func TestAccAWSVpnGatewayAttachment_deleted(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_gateway_attachment.test", Providers: testAccProviders, diff --git a/aws/resource_aws_vpn_gateway_route_propagation_test.go b/aws/resource_aws_vpn_gateway_route_propagation_test.go index dd0f07c6f00..769fc2295f9 100644 --- a/aws/resource_aws_vpn_gateway_route_propagation_test.go +++ b/aws/resource_aws_vpn_gateway_route_propagation_test.go @@ -13,7 +13,7 @@ import ( func TestAccAWSVPNGatewayRoutePropagation_basic(t *testing.T) { var rtID, gwID string - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_gateway_route_propagation.foo", Providers: testAccProviders, diff --git a/aws/resource_aws_vpn_gateway_test.go b/aws/resource_aws_vpn_gateway_test.go index 72a79a48a36..287a42d82f8 100644 --- a/aws/resource_aws_vpn_gateway_test.go +++ b/aws/resource_aws_vpn_gateway_test.go @@ -96,7 +96,7 @@ func testSweepVPNGateways(region string) error { func TestAccAWSVpnGateway_importBasic(t *testing.T) { resourceName := "aws_vpn_gateway.foo" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpnGatewayDestroy, @@ -134,7 +134,7 @@ func TestAccAWSVpnGateway_basic(t *testing.T) { return nil } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_gateway.foo", Providers: testAccProviders, @@ -163,7 +163,7 @@ func TestAccAWSVpnGateway_basic(t *testing.T) { func TestAccAWSVpnGateway_withAvailabilityZoneSetToState(t *testing.T) { var v ec2.VpnGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpnGatewayDestroy, @@ -182,7 +182,7 @@ func TestAccAWSVpnGateway_withAvailabilityZoneSetToState(t *testing.T) { func TestAccAWSVpnGateway_withAmazonSideAsnSetToState(t *testing.T) { var v ec2.VpnGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpnGatewayDestroy, @@ -202,7 +202,7 @@ func TestAccAWSVpnGateway_withAmazonSideAsnSetToState(t *testing.T) { func TestAccAWSVpnGateway_disappears(t *testing.T) { var v ec2.VpnGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckVpnGatewayDestroy, @@ -257,7 +257,7 @@ func TestAccAWSVpnGateway_reattach(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_gateway.foo", Providers: testAccProviders, @@ -315,7 +315,7 @@ func TestAccAWSVpnGateway_delete(t *testing.T) { } } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_gateway.foo", Providers: testAccProviders, @@ -337,7 +337,7 @@ func TestAccAWSVpnGateway_delete(t *testing.T) { func TestAccAWSVpnGateway_tags(t *testing.T) { var v ec2.VpnGateway - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, IDRefreshName: "aws_vpn_gateway.foo", Providers: testAccProviders, diff --git a/aws/resource_aws_waf_byte_match_set_test.go b/aws/resource_aws_waf_byte_match_set_test.go index a11b12db6e1..32524ff6304 100644 --- a/aws/resource_aws_waf_byte_match_set_test.go +++ b/aws/resource_aws_waf_byte_match_set_test.go @@ -17,7 +17,7 @@ func TestAccAWSWafByteMatchSet_basic(t *testing.T) { var v waf.ByteMatchSet byteMatchSet := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, @@ -51,7 +51,7 @@ func TestAccAWSWafByteMatchSet_changeNameForceNew(t *testing.T) { byteMatchSet := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) byteMatchSetNewName := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, @@ -84,7 +84,7 @@ func TestAccAWSWafByteMatchSet_changeTuples(t *testing.T) { var before, after waf.ByteMatchSet byteMatchSetName := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, @@ -137,7 +137,7 @@ func TestAccAWSWafByteMatchSet_noTuples(t *testing.T) { var byteSet waf.ByteMatchSet byteMatchSetName := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, @@ -160,7 +160,7 @@ func TestAccAWSWafByteMatchSet_disappears(t *testing.T) { var v waf.ByteMatchSet byteMatchSet := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafByteMatchSetDestroy, diff --git a/aws/resource_aws_waf_geo_match_set_test.go b/aws/resource_aws_waf_geo_match_set_test.go index 495e7488768..2ea3dcbf5c8 100644 --- a/aws/resource_aws_waf_geo_match_set_test.go +++ b/aws/resource_aws_waf_geo_match_set_test.go @@ -16,7 +16,7 @@ func TestAccAWSWafGeoMatchSet_basic(t *testing.T) { var v waf.GeoMatchSet geoMatchSet := fmt.Sprintf("geoMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, @@ -48,7 +48,7 @@ func TestAccAWSWafGeoMatchSet_changeNameForceNew(t *testing.T) { geoMatchSet := fmt.Sprintf("geoMatchSet-%s", acctest.RandString(5)) geoMatchSetNewName := fmt.Sprintf("geoMatchSetNewName-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, @@ -81,7 +81,7 @@ func TestAccAWSWafGeoMatchSet_disappears(t *testing.T) { var v waf.GeoMatchSet geoMatchSet := fmt.Sprintf("geoMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, @@ -102,7 +102,7 @@ func TestAccAWSWafGeoMatchSet_changeConstraints(t *testing.T) { var before, after waf.GeoMatchSet setName := fmt.Sprintf("geoMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, @@ -151,7 +151,7 @@ func TestAccAWSWafGeoMatchSet_noConstraints(t *testing.T) { var ipset waf.GeoMatchSet setName := fmt.Sprintf("geoMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafGeoMatchSetDestroy, diff --git a/aws/resource_aws_waf_ipset_test.go b/aws/resource_aws_waf_ipset_test.go index f369fe50acc..0a7cab6c556 100644 --- a/aws/resource_aws_waf_ipset_test.go +++ b/aws/resource_aws_waf_ipset_test.go @@ -21,7 +21,7 @@ func TestAccAWSWafIPSet_basic(t *testing.T) { var v waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, @@ -52,7 +52,7 @@ func TestAccAWSWafIPSet_basic(t *testing.T) { func TestAccAWSWafIPSet_disappears(t *testing.T) { var v waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, @@ -74,7 +74,7 @@ func TestAccAWSWafIPSet_changeNameForceNew(t *testing.T) { ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) ipsetNewName := fmt.Sprintf("ip-set-new-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, @@ -111,7 +111,7 @@ func TestAccAWSWafIPSet_changeDescriptors(t *testing.T) { var before, after waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, @@ -152,7 +152,7 @@ func TestAccAWSWafIPSet_noDescriptors(t *testing.T) { var ipset waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, @@ -195,7 +195,7 @@ func TestAccAWSWafIPSet_IpSetDescriptors_1000UpdateLimit(t *testing.T) { ipSetDescriptors = append(ipSetDescriptors, fmt.Sprintf("ip_set_descriptors {\ntype=\"IPV4\"\nvalue=\"%s/32\"\n}", ip)) } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, diff --git a/aws/resource_aws_waf_rate_based_rule_test.go b/aws/resource_aws_waf_rate_based_rule_test.go index 99a878bc3f6..8b969293781 100644 --- a/aws/resource_aws_waf_rate_based_rule_test.go +++ b/aws/resource_aws_waf_rate_based_rule_test.go @@ -17,7 +17,7 @@ import ( func TestAccAWSWafRateBasedRule_basic(t *testing.T) { var v waf.RateBasedRule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRateBasedRuleDestroy, @@ -43,7 +43,7 @@ func TestAccAWSWafRateBasedRule_changeNameForceNew(t *testing.T) { wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) wafRuleNewName := fmt.Sprintf("wafrulenew%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, @@ -79,7 +79,7 @@ func TestAccAWSWafRateBasedRule_changeNameForceNew(t *testing.T) { func TestAccAWSWafRateBasedRule_disappears(t *testing.T) { var v waf.RateBasedRule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRateBasedRuleDestroy, @@ -104,7 +104,7 @@ func TestAccAWSWafRateBasedRule_changePredicates(t *testing.T) { var idx int ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleDestroy, @@ -179,7 +179,7 @@ func TestAccAWSWafRateBasedRule_noPredicates(t *testing.T) { var rule waf.RateBasedRule ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRateBasedRuleDestroy, diff --git a/aws/resource_aws_waf_rule_group_test.go b/aws/resource_aws_waf_rule_group_test.go index 924adf8abe1..46253c39d3c 100644 --- a/aws/resource_aws_waf_rule_group_test.go +++ b/aws/resource_aws_waf_rule_group_test.go @@ -72,7 +72,7 @@ func TestAccAWSWafRuleGroup_basic(t *testing.T) { ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, @@ -102,7 +102,7 @@ func TestAccAWSWafRuleGroup_changeNameForceNew(t *testing.T) { groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) newGroupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, @@ -134,7 +134,7 @@ func TestAccAWSWafRuleGroup_disappears(t *testing.T) { ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, @@ -161,7 +161,7 @@ func TestAccAWSWafRuleGroup_changeActivatedRules(t *testing.T) { ruleName2 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) ruleName3 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, @@ -237,7 +237,7 @@ func TestAccAWSWafRuleGroup_noActivatedRules(t *testing.T) { var group waf.RuleGroup groupName := fmt.Sprintf("test%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleGroupDestroy, diff --git a/aws/resource_aws_waf_rule_test.go b/aws/resource_aws_waf_rule_test.go index 6d56c5e8e77..25153bcdd7e 100644 --- a/aws/resource_aws_waf_rule_test.go +++ b/aws/resource_aws_waf_rule_test.go @@ -17,7 +17,7 @@ import ( func TestAccAWSWafRule_basic(t *testing.T) { var v waf.Rule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleDestroy, @@ -43,7 +43,7 @@ func TestAccAWSWafRule_changeNameForceNew(t *testing.T) { wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) wafRuleNewName := fmt.Sprintf("wafrulenew%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafIPSetDestroy, @@ -79,7 +79,7 @@ func TestAccAWSWafRule_changeNameForceNew(t *testing.T) { func TestAccAWSWafRule_disappears(t *testing.T) { var v waf.Rule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleDestroy, @@ -104,7 +104,7 @@ func TestAccAWSWafRule_changePredicates(t *testing.T) { var idx int ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleDestroy, @@ -144,7 +144,7 @@ func TestAccAWSWafRule_geoMatchSetPredicate(t *testing.T) { var idx int ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleDestroy, @@ -232,7 +232,7 @@ func TestAccAWSWafRule_noPredicates(t *testing.T) { var rule waf.Rule ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleDestroy, diff --git a/aws/resource_aws_waf_size_constraint_set_test.go b/aws/resource_aws_waf_size_constraint_set_test.go index b72208b00c7..1023c8129ec 100644 --- a/aws/resource_aws_waf_size_constraint_set_test.go +++ b/aws/resource_aws_waf_size_constraint_set_test.go @@ -17,7 +17,7 @@ func TestAccAWSWafSizeConstraintSet_basic(t *testing.T) { var v waf.SizeConstraintSet sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, @@ -53,7 +53,7 @@ func TestAccAWSWafSizeConstraintSet_changeNameForceNew(t *testing.T) { sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) sizeConstraintSetNewName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, @@ -86,7 +86,7 @@ func TestAccAWSWafSizeConstraintSet_disappears(t *testing.T) { var v waf.SizeConstraintSet sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, @@ -107,7 +107,7 @@ func TestAccAWSWafSizeConstraintSet_changeConstraints(t *testing.T) { var before, after waf.SizeConstraintSet setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, @@ -164,7 +164,7 @@ func TestAccAWSWafSizeConstraintSet_noConstraints(t *testing.T) { var contraints waf.SizeConstraintSet setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSizeConstraintSetDestroy, diff --git a/aws/resource_aws_waf_sql_injection_match_set_test.go b/aws/resource_aws_waf_sql_injection_match_set_test.go index e196f4925b2..cb6a1641fa6 100644 --- a/aws/resource_aws_waf_sql_injection_match_set_test.go +++ b/aws/resource_aws_waf_sql_injection_match_set_test.go @@ -17,7 +17,7 @@ func TestAccAWSWafSqlInjectionMatchSet_basic(t *testing.T) { var v waf.SqlInjectionMatchSet sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, @@ -49,7 +49,7 @@ func TestAccAWSWafSqlInjectionMatchSet_changeNameForceNew(t *testing.T) { sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) sqlInjectionMatchSetNewName := fmt.Sprintf("sqlInjectionMatchSetNewName-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, @@ -82,7 +82,7 @@ func TestAccAWSWafSqlInjectionMatchSet_disappears(t *testing.T) { var v waf.SqlInjectionMatchSet sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, @@ -103,7 +103,7 @@ func TestAccAWSWafSqlInjectionMatchSet_changeTuples(t *testing.T) { var before, after waf.SqlInjectionMatchSet setName := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, @@ -152,7 +152,7 @@ func TestAccAWSWafSqlInjectionMatchSet_noTuples(t *testing.T) { var ipset waf.SqlInjectionMatchSet setName := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafSqlInjectionMatchSetDestroy, diff --git a/aws/resource_aws_waf_web_acl_test.go b/aws/resource_aws_waf_web_acl_test.go index a34314f4293..18b6532ec21 100644 --- a/aws/resource_aws_waf_web_acl_test.go +++ b/aws/resource_aws_waf_web_acl_test.go @@ -16,7 +16,7 @@ func TestAccAWSWafWebAcl_basic(t *testing.T) { rName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) resourceName := "aws_waf_web_acl.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafWebAclDestroy, @@ -47,7 +47,7 @@ func TestAccAWSWafWebAcl_changeNameForceNew(t *testing.T) { rName2 := fmt.Sprintf("wafacl%s", acctest.RandString(5)) resourceName := "aws_waf_web_acl.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafWebAclDestroy, @@ -88,7 +88,7 @@ func TestAccAWSWafWebAcl_DefaultAction(t *testing.T) { rName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) resourceName := "aws_waf_web_acl.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafWebAclDestroy, @@ -123,7 +123,7 @@ func TestAccAWSWafWebAcl_Rules(t *testing.T) { rName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) resourceName := "aws_waf_web_acl.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafWebAclDestroy, @@ -167,7 +167,7 @@ func TestAccAWSWafWebAcl_disappears(t *testing.T) { rName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) resourceName := "aws_waf_web_acl.test" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafWebAclDestroy, diff --git a/aws/resource_aws_waf_xss_match_set_test.go b/aws/resource_aws_waf_xss_match_set_test.go index 2e58314aae0..e6d72784fb3 100644 --- a/aws/resource_aws_waf_xss_match_set_test.go +++ b/aws/resource_aws_waf_xss_match_set_test.go @@ -17,7 +17,7 @@ func TestAccAWSWafXssMatchSet_basic(t *testing.T) { var v waf.XssMatchSet xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, @@ -57,7 +57,7 @@ func TestAccAWSWafXssMatchSet_changeNameForceNew(t *testing.T) { xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) xssMatchSetNewName := fmt.Sprintf("xssMatchSetNewName-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, @@ -90,7 +90,7 @@ func TestAccAWSWafXssMatchSet_disappears(t *testing.T) { var v waf.XssMatchSet xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, @@ -111,7 +111,7 @@ func TestAccAWSWafXssMatchSet_changeTuples(t *testing.T) { var before, after waf.XssMatchSet setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, @@ -176,7 +176,7 @@ func TestAccAWSWafXssMatchSet_noTuples(t *testing.T) { var ipset waf.XssMatchSet setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafXssMatchSetDestroy, diff --git a/aws/resource_aws_wafregional_byte_match_set_test.go b/aws/resource_aws_wafregional_byte_match_set_test.go index 1c8228b5a80..bbac5c8bb38 100644 --- a/aws/resource_aws_wafregional_byte_match_set_test.go +++ b/aws/resource_aws_wafregional_byte_match_set_test.go @@ -16,7 +16,7 @@ func TestAccAWSWafRegionalByteMatchSet_basic(t *testing.T) { var v waf.ByteMatchSet byteMatchSet := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, @@ -64,7 +64,7 @@ func TestAccAWSWafRegionalByteMatchSet_changeNameForceNew(t *testing.T) { byteMatchSet := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) byteMatchSetNewName := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, @@ -145,7 +145,7 @@ func TestAccAWSWafRegionalByteMatchSet_changeByteMatchTuples(t *testing.T) { var before, after waf.ByteMatchSet byteMatchSetName := fmt.Sprintf("byte-batch-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, @@ -222,7 +222,7 @@ func TestAccAWSWafRegionalByteMatchSet_noByteMatchTuples(t *testing.T) { var byteMatchSet waf.ByteMatchSet byteMatchSetName := fmt.Sprintf("byte-batch-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, @@ -243,7 +243,7 @@ func TestAccAWSWafRegionalByteMatchSet_disappears(t *testing.T) { var v waf.ByteMatchSet byteMatchSet := fmt.Sprintf("byteMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalByteMatchSetDestroy, diff --git a/aws/resource_aws_wafregional_geo_match_set_test.go b/aws/resource_aws_wafregional_geo_match_set_test.go index 14217124390..1ce52e573c0 100644 --- a/aws/resource_aws_wafregional_geo_match_set_test.go +++ b/aws/resource_aws_wafregional_geo_match_set_test.go @@ -15,7 +15,7 @@ func TestAccAWSWafRegionalGeoMatchSet_basic(t *testing.T) { var v waf.GeoMatchSet geoMatchSet := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, @@ -47,7 +47,7 @@ func TestAccAWSWafRegionalGeoMatchSet_changeNameForceNew(t *testing.T) { geoMatchSet := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) geoMatchSetNewName := fmt.Sprintf("geoMatchSetNewName-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, @@ -81,7 +81,7 @@ func TestAccAWSWafRegionalGeoMatchSet_disappears(t *testing.T) { var v waf.GeoMatchSet geoMatchSet := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, @@ -102,7 +102,7 @@ func TestAccAWSWafRegionalGeoMatchSet_changeConstraints(t *testing.T) { var before, after waf.GeoMatchSet setName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, @@ -151,7 +151,7 @@ func TestAccAWSWafRegionalGeoMatchSet_noConstraints(t *testing.T) { var ipset waf.GeoMatchSet setName := fmt.Sprintf("tfacc-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalGeoMatchSetDestroy, diff --git a/aws/resource_aws_wafregional_ipset_test.go b/aws/resource_aws_wafregional_ipset_test.go index 530e95de2b7..32e12a94cb7 100644 --- a/aws/resource_aws_wafregional_ipset_test.go +++ b/aws/resource_aws_wafregional_ipset_test.go @@ -22,7 +22,7 @@ func TestAccAWSWafRegionalIPSet_basic(t *testing.T) { var v waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, @@ -48,7 +48,7 @@ func TestAccAWSWafRegionalIPSet_basic(t *testing.T) { func TestAccAWSWafRegionalIPSet_disappears(t *testing.T) { var v waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, @@ -70,7 +70,7 @@ func TestAccAWSWafRegionalIPSet_changeNameForceNew(t *testing.T) { ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) ipsetNewName := fmt.Sprintf("ip-set-new-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, @@ -107,7 +107,7 @@ func TestAccAWSWafRegionalIPSet_changeDescriptors(t *testing.T) { var before, after waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, @@ -168,7 +168,7 @@ func TestAccAWSWafRegionalIPSet_IpSetDescriptors_1000UpdateLimit(t *testing.T) { ipSetDescriptors = append(ipSetDescriptors, fmt.Sprintf("ip_set_descriptor {\ntype=\"IPV4\"\nvalue=\"%s/32\"\n}", ip)) } - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, @@ -188,7 +188,7 @@ func TestAccAWSWafRegionalIPSet_noDescriptors(t *testing.T) { var ipset waf.IPSet ipsetName := fmt.Sprintf("ip-set-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, diff --git a/aws/resource_aws_wafregional_rate_based_rule_test.go b/aws/resource_aws_wafregional_rate_based_rule_test.go index 049133084bc..e014f78bb6f 100644 --- a/aws/resource_aws_wafregional_rate_based_rule_test.go +++ b/aws/resource_aws_wafregional_rate_based_rule_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSWafRegionalRateBasedRule_basic(t *testing.T) { var v waf.RateBasedRule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, @@ -42,7 +42,7 @@ func TestAccAWSWafRegionalRateBasedRule_changeNameForceNew(t *testing.T) { wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) wafRuleNewName := fmt.Sprintf("wafrulenew%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, @@ -79,7 +79,7 @@ func TestAccAWSWafRegionalRateBasedRule_changeNameForceNew(t *testing.T) { func TestAccAWSWafRegionalRateBasedRule_disappears(t *testing.T) { var v waf.RateBasedRule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, @@ -104,7 +104,7 @@ func TestAccAWSWafRegionalRateBasedRule_changePredicates(t *testing.T) { var idx int ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, @@ -143,7 +143,7 @@ func TestAccAWSWafRegionalRateBasedRule_changeRateLimit(t *testing.T) { rateLimitBefore := "2000" rateLimitAfter := "2001" - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, @@ -210,7 +210,7 @@ func TestAccAWSWafRegionalRateBasedRule_noPredicates(t *testing.T) { var rule waf.RateBasedRule ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRateBasedRuleDestroy, diff --git a/aws/resource_aws_wafregional_rule_group_test.go b/aws/resource_aws_wafregional_rule_group_test.go index c58ea20f5ee..269fa24c235 100644 --- a/aws/resource_aws_wafregional_rule_group_test.go +++ b/aws/resource_aws_wafregional_rule_group_test.go @@ -72,7 +72,7 @@ func TestAccAWSWafRegionalRuleGroup_basic(t *testing.T) { ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, @@ -102,7 +102,7 @@ func TestAccAWSWafRegionalRuleGroup_changeNameForceNew(t *testing.T) { groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) newGroupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, @@ -134,7 +134,7 @@ func TestAccAWSWafRegionalRuleGroup_disappears(t *testing.T) { ruleName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, @@ -161,7 +161,7 @@ func TestAccAWSWafRegionalRuleGroup_changeActivatedRules(t *testing.T) { ruleName2 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) ruleName3 := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, @@ -213,7 +213,7 @@ func TestAccAWSWafRegionalRuleGroup_noActivatedRules(t *testing.T) { var group waf.RuleGroup groupName := fmt.Sprintf("tfacc%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleGroupDestroy, diff --git a/aws/resource_aws_wafregional_rule_test.go b/aws/resource_aws_wafregional_rule_test.go index bc3237d3ead..f0fcfd29dc4 100644 --- a/aws/resource_aws_wafregional_rule_test.go +++ b/aws/resource_aws_wafregional_rule_test.go @@ -16,7 +16,7 @@ import ( func TestAccAWSWafRegionalRule_basic(t *testing.T) { var v waf.Rule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleDestroy, @@ -42,7 +42,7 @@ func TestAccAWSWafRegionalRule_changeNameForceNew(t *testing.T) { wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) wafRuleNewName := fmt.Sprintf("wafrulenew%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalIPSetDestroy, @@ -78,7 +78,7 @@ func TestAccAWSWafRegionalRule_changeNameForceNew(t *testing.T) { func TestAccAWSWafRegionalRule_disappears(t *testing.T) { var v waf.Rule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleDestroy, @@ -98,7 +98,7 @@ func TestAccAWSWafRegionalRule_disappears(t *testing.T) { func TestAccAWSWafRegionalRule_noPredicates(t *testing.T) { var v waf.Rule wafRuleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalRuleDestroy, @@ -125,7 +125,7 @@ func TestAccAWSWafRegionalRule_changePredicates(t *testing.T) { var idx int ruleName := fmt.Sprintf("wafrule%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRuleDestroy, diff --git a/aws/resource_aws_wafregional_size_constraint_set_test.go b/aws/resource_aws_wafregional_size_constraint_set_test.go index 41ea4b5482b..c364f846665 100644 --- a/aws/resource_aws_wafregional_size_constraint_set_test.go +++ b/aws/resource_aws_wafregional_size_constraint_set_test.go @@ -17,7 +17,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_basic(t *testing.T) { var constraints waf.SizeConstraintSet sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, @@ -53,7 +53,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_changeNameForceNew(t *testing.T) { sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) sizeConstraintSetNewName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, @@ -86,7 +86,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_disappears(t *testing.T) { var constraints waf.SizeConstraintSet sizeConstraintSet := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, @@ -107,7 +107,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_changeConstraints(t *testing.T) { var before, after waf.SizeConstraintSet setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, @@ -164,7 +164,7 @@ func TestAccAWSWafRegionalSizeConstraintSet_noConstraints(t *testing.T) { var constraints waf.SizeConstraintSet setName := fmt.Sprintf("sizeConstraintSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSizeConstraintSetDestroy, diff --git a/aws/resource_aws_wafregional_sql_injection_match_set_test.go b/aws/resource_aws_wafregional_sql_injection_match_set_test.go index 2da002d2e50..a0a0f07764e 100644 --- a/aws/resource_aws_wafregional_sql_injection_match_set_test.go +++ b/aws/resource_aws_wafregional_sql_injection_match_set_test.go @@ -16,7 +16,7 @@ func TestAccAWSWafRegionalSqlInjectionMatchSet_basic(t *testing.T) { var v waf.SqlInjectionMatchSet sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, @@ -48,7 +48,7 @@ func TestAccAWSWafRegionalSqlInjectionMatchSet_changeNameForceNew(t *testing.T) sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) sqlInjectionMatchSetNewName := fmt.Sprintf("sqlInjectionMatchSetNewName-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, @@ -81,7 +81,7 @@ func TestAccAWSWafRegionalSqlInjectionMatchSet_disappears(t *testing.T) { var v waf.SqlInjectionMatchSet sqlInjectionMatchSet := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, @@ -102,7 +102,7 @@ func TestAccAWSWafRegionalSqlInjectionMatchSet_changeTuples(t *testing.T) { var before, after waf.SqlInjectionMatchSet setName := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, @@ -151,7 +151,7 @@ func TestAccAWSWafRegionalSqlInjectionMatchSet_noTuples(t *testing.T) { var ipset waf.SqlInjectionMatchSet setName := fmt.Sprintf("sqlInjectionMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalSqlInjectionMatchSetDestroy, diff --git a/aws/resource_aws_wafregional_web_acl_association_test.go b/aws/resource_aws_wafregional_web_acl_association_test.go index 694146dcbb2..5d47bce6490 100644 --- a/aws/resource_aws_wafregional_web_acl_association_test.go +++ b/aws/resource_aws_wafregional_web_acl_association_test.go @@ -13,7 +13,7 @@ import ( ) func TestAccAWSWafRegionalWebAclAssociation_basic(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckWafRegionalWebAclAssociationDestroy, @@ -29,7 +29,7 @@ func TestAccAWSWafRegionalWebAclAssociation_basic(t *testing.T) { } func TestAccAWSWafRegionalWebAclAssociation_multipleAssociations(t *testing.T) { - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckWafRegionalWebAclAssociationDestroy, diff --git a/aws/resource_aws_wafregional_web_acl_test.go b/aws/resource_aws_wafregional_web_acl_test.go index 5f2c7fa9ab9..ec7457e3cac 100644 --- a/aws/resource_aws_wafregional_web_acl_test.go +++ b/aws/resource_aws_wafregional_web_acl_test.go @@ -18,7 +18,7 @@ func TestAccAWSWafRegionalWebAcl_basic(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, @@ -47,7 +47,7 @@ func TestAccAWSWafRegionalWebAcl_createRateBased(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, @@ -76,7 +76,7 @@ func TestAccAWSWafRegionalWebAcl_createGroup(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, @@ -106,7 +106,7 @@ func TestAccAWSWafRegionalWebAcl_changeNameForceNew(t *testing.T) { wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) wafAclNewName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, @@ -152,7 +152,7 @@ func TestAccAWSWafRegionalWebAcl_changeDefaultAction(t *testing.T) { wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) wafAclNewName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, @@ -197,7 +197,7 @@ func TestAccAWSWafRegionalWebAcl_disappears(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, @@ -218,7 +218,7 @@ func TestAccAWSWafRegionalWebAcl_noRules(t *testing.T) { var v waf.WebACL wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, @@ -247,7 +247,7 @@ func TestAccAWSWafRegionalWebAcl_changeRules(t *testing.T) { var idx int wafAclName := fmt.Sprintf("wafacl%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalWebAclDestroy, diff --git a/aws/resource_aws_wafregional_xss_match_set_test.go b/aws/resource_aws_wafregional_xss_match_set_test.go index a109927f78c..a20953337c4 100644 --- a/aws/resource_aws_wafregional_xss_match_set_test.go +++ b/aws/resource_aws_wafregional_xss_match_set_test.go @@ -16,7 +16,7 @@ func TestAccAWSWafRegionalXssMatchSet_basic(t *testing.T) { var v waf.XssMatchSet xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, @@ -56,7 +56,7 @@ func TestAccAWSWafRegionalXssMatchSet_changeNameForceNew(t *testing.T) { xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) xssMatchSetNewName := fmt.Sprintf("xssMatchSetNewName-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, @@ -89,7 +89,7 @@ func TestAccAWSWafRegionalXssMatchSet_disappears(t *testing.T) { var v waf.XssMatchSet xssMatchSet := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, @@ -110,7 +110,7 @@ func TestAccAWSWafRegionalXssMatchSet_changeTuples(t *testing.T) { var before, after waf.XssMatchSet setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, @@ -175,7 +175,7 @@ func TestAccAWSWafRegionalXssMatchSet_noTuples(t *testing.T) { var ipset waf.XssMatchSet setName := fmt.Sprintf("xssMatchSet-%s", acctest.RandString(5)) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSWafRegionalXssMatchSetDestroy, From 5c06fc26561e75400c582aaf4701b5f2b6083593 Mon Sep 17 00:00:00 2001 From: Indradhanush Gupta Date: Wed, 3 Oct 2018 19:38:00 +0200 Subject: [PATCH 2907/3316] readme: Add link to docs page of AWS provider --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06877f7a9b7..28dfaee8682 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ $ make build Using the provider ---------------------- -If you're building the provider, follow the instructions to [install it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-a-plugin) After placing it into your plugins directory, run `terraform init` to initialize it. +If you're building the provider, follow the instructions to [install it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-a-plugin) After placing it into your plugins directory, run `terraform init` to initialize it. Documentation about the provider specific configuration options can be found on the [provider's website](https://www.terraform.io/docs/providers/aws/index.html). Developing the Provider --------------------------- From 1d6f97f545d89ce5f994d099a7c81ab78b1621c6 Mon Sep 17 00:00:00 2001 From: Jeremy Jackins Date: Tue, 16 Oct 2018 13:38:23 -0700 Subject: [PATCH 2908/3316] Fix "random" ECS task placement strategy --- aws/resource_aws_ecs_service.go | 54 +++++++++++++++++----------- aws/resource_aws_ecs_service_test.go | 42 ++++++++++++++++++++++ aws/validators.go | 7 ++-- 3 files changed, 81 insertions(+), 22 deletions(-) diff --git a/aws/resource_aws_ecs_service.go b/aws/resource_aws_ecs_service.go index a5ef84bc0a9..83715e1b46f 100644 --- a/aws/resource_aws_ecs_service.go +++ b/aws/resource_aws_ecs_service.go @@ -648,11 +648,14 @@ func flattenPlacementStrategyDeprecated(pss []*ecs.PlacementStrategy) []map[stri for _, ps := range pss { c := make(map[string]interface{}) c["type"] = *ps.Type - c["field"] = *ps.Field - // for some fields the API requires lowercase for creation but will return uppercase on query - if *ps.Field == "MEMORY" || *ps.Field == "CPU" { - c["field"] = strings.ToLower(*ps.Field) + if ps.Field != nil { + c["field"] = *ps.Field + + // for some fields the API requires lowercase for creation but will return uppercase on query + if *ps.Field == "MEMORY" || *ps.Field == "CPU" { + c["field"] = strings.ToLower(*ps.Field) + } } results = append(results, c) @@ -664,7 +667,7 @@ func expandPlacementStrategy(s []interface{}) ([]*ecs.PlacementStrategy, error) if len(s) == 0 { return nil, nil } - ps := make([]*ecs.PlacementStrategy, 0) + pss := make([]*ecs.PlacementStrategy, 0) for _, raw := range s { p := raw.(map[string]interface{}) t := p["type"].(string) @@ -672,19 +675,23 @@ func expandPlacementStrategy(s []interface{}) ([]*ecs.PlacementStrategy, error) if err := validateAwsEcsPlacementStrategy(t, f); err != nil { return nil, err } - ps = append(ps, &ecs.PlacementStrategy{ - Type: aws.String(t), - Field: aws.String(f), - }) + ps := &ecs.PlacementStrategy{ + Type: aws.String(t), + } + if f != "" { + // Field must be omitted (i.e. not empty string) for random strategy + ps.Field = aws.String(f) + } + pss = append(pss, ps) } - return ps, nil + return pss, nil } func expandPlacementStrategyDeprecated(s *schema.Set) ([]*ecs.PlacementStrategy, error) { if len(s.List()) == 0 { return nil, nil } - ps := make([]*ecs.PlacementStrategy, 0) + pss := make([]*ecs.PlacementStrategy, 0) for _, raw := range s.List() { p := raw.(map[string]interface{}) t := p["type"].(string) @@ -692,12 +699,16 @@ func expandPlacementStrategyDeprecated(s *schema.Set) ([]*ecs.PlacementStrategy, if err := validateAwsEcsPlacementStrategy(t, f); err != nil { return nil, err } - ps = append(ps, &ecs.PlacementStrategy{ - Type: aws.String(t), - Field: aws.String(f), - }) + ps := &ecs.PlacementStrategy{ + Type: aws.String(t), + } + if f != "" { + // Field must be omitted (i.e. not empty string) for random strategy + ps.Field = aws.String(f) + } + pss = append(pss, ps) } - return ps, nil + return pss, nil } func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []interface{} { @@ -708,11 +719,14 @@ func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []interface{} { for _, ps := range pss { c := make(map[string]interface{}) c["type"] = *ps.Type - c["field"] = *ps.Field - // for some fields the API requires lowercase for creation but will return uppercase on query - if *ps.Field == "MEMORY" || *ps.Field == "CPU" { - c["field"] = strings.ToLower(*ps.Field) + if ps.Field != nil { + c["field"] = *ps.Field + + // for some fields the API requires lowercase for creation but will return uppercase on query + if *ps.Field == "MEMORY" || *ps.Field == "CPU" { + c["field"] = strings.ToLower(*ps.Field) + } } results = append(results, c) diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index b21839b2f1f..d5482ec09b6 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -494,6 +494,15 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field", "memory"), ), }, + { + Config: testAccAWSEcsServiceWithRandomPlacementStrategy(clusterName, tdName, svcName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "1"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.type", "random"), + resource.TestCheckNoResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field"), + ), + }, { Config: testAccAWSEcsServiceWithMultiPlacementStrategy(clusterName, tdName, svcName), Check: resource.ComposeTestCheckFunc( @@ -997,6 +1006,39 @@ resource "aws_ecs_service" "mongo" { `, clusterName, tdName, svcName) } +func testAccAWSEcsServiceWithRandomPlacementStrategy(clusterName, tdName, svcName string) string { + return fmt.Sprintf(` +resource "aws_ecs_cluster" "default" { + name = "%s" +} + +resource "aws_ecs_task_definition" "mongo" { + family = "%s" + container_definitions = < Date: Tue, 16 Oct 2018 16:36:38 -0700 Subject: [PATCH 2909/3316] Fix acceptance test --- aws/resource_aws_ecs_service_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_ecs_service_test.go b/aws/resource_aws_ecs_service_test.go index d5482ec09b6..f395474a7cb 100644 --- a/aws/resource_aws_ecs_service_test.go +++ b/aws/resource_aws_ecs_service_test.go @@ -500,7 +500,7 @@ func TestAccAWSEcsService_withPlacementStrategy(t *testing.T) { testAccCheckAWSEcsServiceExists("aws_ecs_service.mongo", &service), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.#", "1"), resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.type", "random"), - resource.TestCheckNoResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field"), + resource.TestCheckResourceAttr("aws_ecs_service.mongo", "ordered_placement_strategy.0.field", ""), ), }, { From a5f0a13679484c06907612b19efcf420cfd0224d Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Tue, 16 Oct 2018 21:02:39 -0500 Subject: [PATCH 2910/3316] Address PR comments --- aws/resource_aws_codepipeline_webhook.go | 157 ++++++------------ aws/resource_aws_codepipeline_webhook_test.go | 137 ++++++++++++--- 2 files changed, 165 insertions(+), 129 deletions(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index f3af1b44389..fc9a3055cd1 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -12,11 +13,10 @@ import ( func resourceAwsCodePipelineWebhook() *schema.Resource { return &schema.Resource{ - Create: resourceAwsCodePipelineWebhookCreate, - Read: resourceAwsCodePipelineWebhookRead, - Update: nil, - Delete: resourceAwsCodePipelineWebhookDelete, - SchemaVersion: 1, + Create: resourceAwsCodePipelineWebhookCreate, + Read: resourceAwsCodePipelineWebhookRead, + Update: nil, + Delete: resourceAwsCodePipelineWebhookDelete, Schema: map[string]*schema.Schema{ "authentication": { @@ -33,13 +33,14 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Type: schema.TypeList, MaxItems: 1, MinItems: 1, - Required: true, + Optional: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "secret_token": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Sensitive: true, }, "allowed_ip_range": { Type: schema.TypeString, @@ -93,20 +94,6 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { } } -func extractCodePipelineWebhookAttr(d *schema.ResourceData, attr string) (map[string]interface{}, error) { - if v, ok := d.GetOk(attr); ok { - l := v.([]interface{}) - if len(l) <= 0 { - return nil, fmt.Errorf("Attribute %s is missing", attr) - } - - data := l[0].(map[string]interface{}) - return data, nil - } - - return nil, fmt.Errorf("Could not find attribute %s", attr) -} - func extractCodePipelineWebhookRules(filters *schema.Set) ([]*codepipeline.WebhookFilterRule, error) { var rules []*codepipeline.WebhookFilterRule @@ -127,26 +114,11 @@ func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string var conf codepipeline.WebhookAuthConfiguration switch authType { case codepipeline.WebhookAuthenticationTypeIp: - ipRange := authConfig["allowed_ip_range"].(string) - if ipRange == "" { - return nil, fmt.Errorf("An IP range must be set when using IP-based auth") - } - - conf.AllowedIPRange = &ipRange - + conf.AllowedIPRange = aws.String(authConfig["allowed_ip_range"].(string)) break case codepipeline.WebhookAuthenticationTypeGithubHmac: - secretToken := authConfig["secret_token"].(string) - if secretToken == "" { - return nil, fmt.Errorf("Secret token must be set when using GITHUB_HMAC") - } - - conf.SecretToken = &secretToken + conf.SecretToken = aws.String(authConfig["secret_token"].(string)) break - case codepipeline.WebhookAuthenticationTypeUnauthenticated: - break - default: - return nil, fmt.Errorf("Invalid authentication type %s", authType) } return &conf, nil @@ -156,9 +128,10 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface conn := meta.(*AWSClient).codepipelineconn authType := d.Get("authentication").(string) - authConfig, err := extractCodePipelineWebhookAttr(d, "authentication_configuration") - if err != nil { - return err + var authConfig map[string]interface{} + if v, ok := d.GetOk("authentication_configuration"); ok { + l := v.([]interface{}) + authConfig = l[0].(map[string]interface{}) } rules, err := extractCodePipelineWebhookRules(d.Get("filter").(*schema.Set)) @@ -187,17 +160,12 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface return fmt.Errorf("Error creating webhook: %s", err) } - arn := *webhook.Webhook.Arn - d.SetId(arn) - - url := *webhook.Webhook.Url - d.Set("url", url) + d.SetId(aws.StringValue(webhook.Webhook.Arn)) return resourceAwsCodePipelineWebhookRead(d, meta) } -func getAllCodePipelineWebhooks(conn *codepipeline.CodePipeline) ([]*codepipeline.ListWebhookItem, error) { - var webhooks []*codepipeline.ListWebhookItem +func getCodePipelineWebhook(conn *codepipeline.CodePipeline, arn string) (*codepipeline.ListWebhookItem, error) { var nextToken string for { @@ -210,10 +178,14 @@ func getAllCodePipelineWebhooks(conn *codepipeline.CodePipeline) ([]*codepipelin out, err := conn.ListWebhooks(input) if err != nil { - return webhooks, err + return nil, err } - webhooks = append(webhooks, out.Webhooks...) + for _, w := range out.Webhooks { + if arn == aws.StringValue(w.Arn) { + return w, nil + } + } if out.NextToken == nil { break @@ -222,96 +194,77 @@ func getAllCodePipelineWebhooks(conn *codepipeline.CodePipeline) ([]*codepipelin nextToken = aws.StringValue(out.NextToken) } - return webhooks, nil + return nil, fmt.Errorf("No webhook with ARN %s found", arn) } -func setCodePipelineWebhookFilters(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { - filters := []interface{}{} - for _, filter := range webhook.Filters { +func flattenCodePipelineWebhookFilters(filters []*codepipeline.WebhookFilterRule) []interface{} { + results := []interface{}{} + for _, filter := range filters { f := map[string]interface{}{ - "json_path": *filter.JsonPath, - "match_equals": *filter.MatchEquals, + "json_path": aws.StringValue(filter.JsonPath), + "match_equals": aws.StringValue(filter.MatchEquals), } - filters = append(filters, f) - } - - if err := d.Set("filter", filters); err != nil { - return err + results = append(results, f) } - return nil + return results } -func setCodePipelineWebhookAuthenticationConfiguration(webhook codepipeline.WebhookDefinition, d *schema.ResourceData) error { +func flattenCodePipelineWebhookAuthenticationConfiguration(authConfig *codepipeline.WebhookAuthConfiguration) []interface{} { conf := map[string]interface{}{} - if webhook.AuthenticationConfiguration.AllowedIPRange != nil { - ipRange := *webhook.AuthenticationConfiguration.AllowedIPRange - conf["allowed_ip_range"] = ipRange + if authConfig.AllowedIPRange != nil { + conf["allowed_ip_range"] = aws.StringValue(authConfig.AllowedIPRange) } - if webhook.AuthenticationConfiguration.SecretToken != nil { - secretToken := *webhook.AuthenticationConfiguration.SecretToken - conf["secret_token"] = secretToken + if authConfig.SecretToken != nil { + conf["secret_token"] = aws.StringValue(authConfig.SecretToken) } - var result []interface{} - result = append(result, conf) - if err := d.Set("authentication_configuration", result); err != nil { - return err + var results []interface{} + if len(conf) > 0 { + results = append(results, conf) } - return nil + return results } func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn + arn := d.Id() - webhooks, err := getAllCodePipelineWebhooks(conn) + webhook, err := getCodePipelineWebhook(conn, arn) if err != nil { - return fmt.Errorf("Error fetching webhooks: %s", err) + log.Printf("[WARN] CodePipeline Webhook (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } - if len(webhooks) == 0 { - return fmt.Errorf("No webhooks returned!") - } - - var found codepipeline.WebhookDefinition - for _, w := range webhooks { - a := *w.Arn - if a == arn { - found = *w.Definition - break - } - } - - name := *found.Name + name := aws.StringValue(webhook.Definition.Name) if name == "" { return fmt.Errorf("Webhook not found: %s", arn) } d.Set("name", name) + d.Set("url", aws.StringValue(webhook.Url)) - targetAction := *found.TargetAction - if err := d.Set("target_action", targetAction); err != nil { + if err := d.Set("target_action", aws.StringValue(webhook.Definition.TargetAction)); err != nil { return err } - targetPipeline := *found.TargetPipeline - if err := d.Set("target_pipeline", targetPipeline); err != nil { + if err := d.Set("target_pipeline", aws.StringValue(webhook.Definition.TargetPipeline)); err != nil { return err } - authType := *found.Authentication - if err := d.Set("authentication", authType); err != nil { + if err := d.Set("authentication", aws.StringValue(webhook.Definition.Authentication)); err != nil { return err } - if err = setCodePipelineWebhookAuthenticationConfiguration(found, d); err != nil { - return err + if err := d.Set("authentication_configuration", flattenCodePipelineWebhookAuthenticationConfiguration(webhook.Definition.AuthenticationConfiguration)); err != nil { + return fmt.Errorf("error setting filter: %s", err) } - if err = setCodePipelineWebhookFilters(found, d); err != nil { - return err + if err := d.Set("filter", flattenCodePipelineWebhookFilters(webhook.Definition.Filters)); err != nil { + return fmt.Errorf("error setting filter: %s", err) } return nil @@ -330,7 +283,5 @@ func resourceAwsCodePipelineWebhookDelete(d *schema.ResourceData, meta interface return fmt.Errorf("Could not delete webhook: %s", err) } - d.SetId("") - return nil } diff --git a/aws/resource_aws_codepipeline_webhook_test.go b/aws/resource_aws_codepipeline_webhook_test.go index 8972e6594fd..4bfbade6bf1 100644 --- a/aws/resource_aws_codepipeline_webhook_test.go +++ b/aws/resource_aws_codepipeline_webhook_test.go @@ -36,6 +36,57 @@ func TestAccAWSCodePipelineWebhook_basic(t *testing.T) { }) } +func TestAccAWSCodePipelineWebhook_ipAuth(t *testing.T) { + if os.Getenv("GITHUB_TOKEN") == "" { + t.Skip("Environment variable GITHUB_TOKEN is not set") + } + + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineWebhookConfig_ipAuth(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), + testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), + resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), + resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "url"), + resource.TestCheckResourceAttr("aws_codepipeline_webhook.bar", "authentication_configuration.0.allowed_ip_range", "0.0.0.0/0"), + ), + }, + }, + }) +} + +func TestAccAWSCodePipelineWebhook_unauthenticated(t *testing.T) { + if os.Getenv("GITHUB_TOKEN") == "" { + t.Skip("Environment variable GITHUB_TOKEN is not set") + } + + name := acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCodePipelineDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCodePipelineWebhookConfig_unauthenticated(name), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), + testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), + resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), + resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "url"), + ), + }, + }, + }) +} + func testAccCheckAWSCodePipelineWebhookExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] @@ -49,24 +100,72 @@ func testAccCheckAWSCodePipelineWebhookExists(n string) resource.TestCheckFunc { conn := testAccProvider.Meta().(*AWSClient).codepipelineconn - webhooks, err := getAllCodePipelineWebhooks(conn) + _, err := getCodePipelineWebhook(conn, rs.Primary.ID) if err != nil { return err } - var arn string - for _, hook := range webhooks { - arn = *hook.Arn - if rs.Primary.ID == arn { - return nil - } - } - - return fmt.Errorf("Webhook %s not found", rs.Primary.ID) + return nil } } func testAccAWSCodePipelineWebhookConfig_basic(rName string) string { + return testAccAWSCodePipelineWebhookConfig_codePipeline(rName, fmt.Sprintf(` +resource "aws_codepipeline_webhook" "bar" { + name = "test-webhook-%s" + authentication = "GITHUB_HMAC" + target_action = "Source" + target_pipeline = "${aws_codepipeline.bar.name}" + + authentication_configuration { + secret_token = "super-secret" + } + + filter { + json_path = "$.ref" + match_equals = "refs/head/{Branch}" + } +} +`, rName)) +} + +func testAccAWSCodePipelineWebhookConfig_ipAuth(rName string) string { + return testAccAWSCodePipelineWebhookConfig_codePipeline(rName, fmt.Sprintf(` +resource "aws_codepipeline_webhook" "bar" { + name = "test-webhook-%s" + authentication = "IP" + target_action = "Source" + target_pipeline = "${aws_codepipeline.bar.name}" + + authentication_configuration { + allowed_ip_range = "0.0.0.0/0" + } + + filter { + json_path = "$.ref" + match_equals = "refs/head/{Branch}" + } +} +`, rName)) +} + +func testAccAWSCodePipelineWebhookConfig_unauthenticated(rName string) string { + return testAccAWSCodePipelineWebhookConfig_codePipeline(rName, fmt.Sprintf(` +resource "aws_codepipeline_webhook" "bar" { + name = "test-webhook-%s" + authentication = "UNAUTHENTICATED" + target_action = "Source" + target_pipeline = "${aws_codepipeline.bar.name}" + + filter { + json_path = "$.ref" + match_equals = "refs/head/{Branch}" + } +} +`, rName)) +} + +func testAccAWSCodePipelineWebhookConfig_codePipeline(rName string, webhook string) string { return fmt.Sprintf(` resource "aws_s3_bucket" "foo" { bucket = "tf-test-pipeline-%s" @@ -176,20 +275,6 @@ resource "aws_codepipeline" "bar" { } } -resource "aws_codepipeline_webhook" "bar" { - name = "test-webhook-%s" - authentication = "GITHUB_HMAC" - target_action = "Source" - target_pipeline = "${aws_codepipeline.bar.name}" - - authentication_configuration { - secret_token = "super-secret" - } - - filter { - json_path = "$.ref" - match_equals = "refs/head/{Branch}" - } -} -`, rName, rName, rName, rName) +%s +`, rName, rName, rName, webhook) } From 4f87d2d980ca50521d2602f34560ba9a20e9e5f0 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Tue, 16 Oct 2018 21:23:56 -0500 Subject: [PATCH 2911/3316] Clarify authentication_configuration docs. --- website/docs/r/codepipeline_webhook.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/codepipeline_webhook.markdown b/website/docs/r/codepipeline_webhook.markdown index a1a86534fc2..516fef840f7 100644 --- a/website/docs/r/codepipeline_webhook.markdown +++ b/website/docs/r/codepipeline_webhook.markdown @@ -109,7 +109,7 @@ The following arguments are supported: * `name` - (Required) The name of the webhook. * `authentication` - (Required) The type of authentication to use. One of `IP`, `GITHUB_HMAC`, or `UNAUTHENTICATED`. -* `authentication_configuration` - (Required) An `auth` block. Auth blocks are documented below. +* `authentication_configuration` - (Optional) An `auth` block. Required for `IP` and `GITHUB_HMAC`. Auth blocks are documented below. * `filter` (Required) One or more `filter` blocks. Filter blocks are documented below. * `target_action` - (Required) The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline. * `target_pipeline` - (Required) The name of the pipeline. From b8185ce53989336e5cc490107573eb87d62bade3 Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Tue, 16 Oct 2018 21:44:13 -0500 Subject: [PATCH 2912/3316] Fix error output for field. --- aws/resource_aws_codepipeline_webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index fc9a3055cd1..d217bffaf3e 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -260,7 +260,7 @@ func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{} } if err := d.Set("authentication_configuration", flattenCodePipelineWebhookAuthenticationConfiguration(webhook.Definition.AuthenticationConfiguration)); err != nil { - return fmt.Errorf("error setting filter: %s", err) + return fmt.Errorf("error setting authentication_configuration: %s", err) } if err := d.Set("filter", flattenCodePipelineWebhookFilters(webhook.Definition.Filters)); err != nil { From eb3d136e497ce015271f5e01000c82ada25bfd12 Mon Sep 17 00:00:00 2001 From: Gideon Seyetik Date: Wed, 17 Oct 2018 08:29:12 -0400 Subject: [PATCH 2913/3316] Adjust egress only internet gateway eventual consistency login. --- ...source_aws_egress_only_internet_gateway.go | 72 ++++++------------- 1 file changed, 22 insertions(+), 50 deletions(-) diff --git a/aws/resource_aws_egress_only_internet_gateway.go b/aws/resource_aws_egress_only_internet_gateway.go index 4954acbd6e3..682b4837800 100644 --- a/aws/resource_aws_egress_only_internet_gateway.go +++ b/aws/resource_aws_egress_only_internet_gateway.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -40,18 +39,6 @@ func resourceAwsEgressOnlyInternetGatewayCreate(d *schema.ResourceData, meta int d.SetId(*resp.EgressOnlyInternetGateway.EgressOnlyInternetGatewayId) - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - igRaw, _, err := EIGWStateRefreshFunc(conn, d.Id())() - if igRaw != nil { - return nil - } - if err == nil { - return resource.RetryableError(err) - } else { - return resource.NonRetryableError(err) - } - }) - if err != nil { return fmt.Errorf("%s", err) } @@ -59,50 +46,35 @@ func resourceAwsEgressOnlyInternetGatewayCreate(d *schema.ResourceData, meta int return resourceAwsEgressOnlyInternetGatewayRead(d, meta) } -func EIGWStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeEgressOnlyInternetGateways(&ec2.DescribeEgressOnlyInternetGatewaysInput{ - EgressOnlyInternetGatewayIds: []*string{aws.String(id)}, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidEgressInternetGatewayID.NotFound" { - resp = nil - } else { - log.Printf("[ERROR] Error on EIGWStateRefreshFunc: %s", err) - return nil, "", err - } - } - if len(resp.EgressOnlyInternetGateways) < 1 { - resp = nil - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - ig := resp.EgressOnlyInternetGateways[0] - return ig, "available", nil - } -} - func resourceAwsEgressOnlyInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - resp, err := conn.DescribeEgressOnlyInternetGateways(&ec2.DescribeEgressOnlyInternetGatewaysInput{ + var found bool + var req = &ec2.DescribeEgressOnlyInternetGatewaysInput{ EgressOnlyInternetGatewayIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - return fmt.Errorf("Error describing egress internet gateway: %s", err) } - found := false - for _, igw := range resp.EgressOnlyInternetGateways { - if *igw.EgressOnlyInternetGatewayId == d.Id() { - found = true + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + resp, err := conn.DescribeEgressOnlyInternetGateways(req) + if err != nil { + return resource.NonRetryableError(err) + } + if resp != nil && len(resp.EgressOnlyInternetGateways) > 0 { + for _, igw := range resp.EgressOnlyInternetGateways { + if *igw.EgressOnlyInternetGatewayId == d.Id() { + found = true + break + } + } + } + if d.IsNewResource() && !found { + return resource.RetryableError(nil) } + return nil + }) + + if err != nil { + return fmt.Errorf("Error describing egress internet gateway: %s", err) } if !found { From c730291f867491350b4376bc0287d941474879d2 Mon Sep 17 00:00:00 2001 From: "greg.gajda@digital.hmrc.gov.uk" Date: Wed, 17 Oct 2018 14:23:36 +0100 Subject: [PATCH 2914/3316] Merging with master and making changes after PR review --- aws/data_source_aws_cloudhsm2_cluster.go | 47 +- aws/data_source_aws_cloudhsm2_cluster_test.go | 10 +- aws/provider.go | 580 +++++++++--------- aws/resource_aws_cloudhsm2_cluster.go | 4 +- aws/resource_aws_cloudhsm2_cluster_test.go | 21 +- aws/resource_aws_cloudhsm2_hsm.go | 37 +- aws/resource_aws_cloudhsm2_hsm_test.go | 31 +- .../docs/d/cloudhsm_v2_cluster.html.markdown | 5 +- 8 files changed, 379 insertions(+), 356 deletions(-) diff --git a/aws/data_source_aws_cloudhsm2_cluster.go b/aws/data_source_aws_cloudhsm2_cluster.go index a8e9f10c4b4..7aaeda5fc34 100644 --- a/aws/data_source_aws_cloudhsm2_cluster.go +++ b/aws/data_source_aws_cloudhsm2_cluster.go @@ -78,7 +78,7 @@ func dataSourceCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) er clusterId := d.Get("cluster_id").(string) filters := []*string{&clusterId} - log.Printf("[DEBUG] Reading CloudHSMv2 Cluster %s", clusterId) + log.Printf("[DEBUG] Reading CloudHSM v2 Cluster %s", clusterId) result := int64(1) input := &cloudhsmv2.DescribeClustersInput{ Filters: map[string][]*string{ @@ -94,35 +94,38 @@ func dataSourceCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) er out, err := conn.DescribeClusters(input) if err != nil { - return err + return fmt.Errorf("error describing CloudHSM v2 Cluster: %s", err) } var cluster *cloudhsmv2.Cluster for _, c := range out.Clusters { - if aws.StringValue(c.ClusterId) != clusterId { - continue + if aws.StringValue(c.ClusterId) == clusterId { + cluster = c + break } - cluster = c } - if cluster != nil { - d.SetId(clusterId) - d.Set("vpc_id", cluster.VpcId) - d.Set("security_group_id", cluster.SecurityGroup) - d.Set("cluster_state", cluster.State) - certs := readCloudHsm2ClusterCertificates(cluster) - if err := d.Set("cluster_certificates", certs); err != nil { - return err - } - var subnets []string - for _, sn := range cluster.SubnetMapping { - subnets = append(subnets, *sn) - } - if err := d.Set("subnet_ids", subnets); err != nil { - return fmt.Errorf("[DEBUG] Error saving Subnet IDs to state for CloudHSMv2 Cluster (%s): %s", d.Id(), err) - } - } else { + if cluster == nil { return fmt.Errorf("cluster with id %s not found", clusterId) } + + d.SetId(clusterId) + d.Set("vpc_id", cluster.VpcId) + d.Set("security_group_id", cluster.SecurityGroup) + d.Set("cluster_state", cluster.State) + certs := readCloudHsm2ClusterCertificates(cluster) + if err := d.Set("cluster_certificates", certs); err != nil { + return err + } + + var subnets []string + for _, sn := range cluster.SubnetMapping { + subnets = append(subnets, *sn) + } + + if err := d.Set("subnet_ids", subnets); err != nil { + return fmt.Errorf("[DEBUG] Error saving Subnet IDs to state for CloudHSM v2 Cluster (%s): %s", d.Id(), err) + } + return nil } diff --git a/aws/data_source_aws_cloudhsm2_cluster_test.go b/aws/data_source_aws_cloudhsm2_cluster_test.go index bbaa8124feb..d9b608eeed8 100644 --- a/aws/data_source_aws_cloudhsm2_cluster_test.go +++ b/aws/data_source_aws_cloudhsm2_cluster_test.go @@ -9,6 +9,9 @@ import ( ) func TestAccDataSourceCloudHsm2Cluster_basic(t *testing.T) { + resourceName := "aws_cloudhsm_v2_cluster.cluster" + dataSourceName := "data.aws_cloudhsm_v2_cluster.default" + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -16,7 +19,12 @@ func TestAccDataSourceCloudHsm2Cluster_basic(t *testing.T) { { Config: testAccCheckCloudHsm2ClusterDataSourceConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.aws_cloudhsm_v2_cluster.default", "cluster_state", "UNINITIALIZED"), + resource.TestCheckResourceAttr(dataSourceName, "cluster_state", "UNINITIALIZED"), + resource.TestCheckResourceAttrPair(dataSourceName, "cluster_id", resourceName, "cluster_id"), + resource.TestCheckResourceAttrPair(dataSourceName, "cluster_state", resourceName, "cluster_state"), + resource.TestCheckResourceAttrPair(dataSourceName, "security_group_id", resourceName, "security_group_id"), + resource.TestCheckResourceAttrPair(dataSourceName, "subnet_ids.#", resourceName, "subnet_ids.#"), + resource.TestCheckResourceAttrPair(dataSourceName, "vpc_id", resourceName, "vpc_id"), ), }, }, diff --git a/aws/provider.go b/aws/provider.go index 5fa47763f0e..c8443b0e92a 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -396,296 +396,296 @@ func Provider() terraform.ResourceProvider { "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), - "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ec2_fleet": resourceAwsEc2Fleet(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_eks_cluster": resourceAwsEksCluster(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), - "aws_glue_classifier": resourceAwsGlueClassifier(), - "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_crawler": resourceAwsGlueCrawler(), - "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_trigger": resourceAwsGlueTrigger(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), - "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_launch_template": resourceAwsLaunchTemplate(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), - "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_neptune_cluster": resourceAwsNeptuneCluster(), - "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), - "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), - "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), - "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), - "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), - "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_organizations_policy": resourceAwsOrganizationsPolicy(), - "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), - "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), - "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), - "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), - "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), - "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), - "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), - "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_swf_domain": resourceAwsSwfDomain(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), - "aws_pinpoint_app": resourceAwsPinpointApp(), - "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), - "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), - "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), - "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), - "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), - "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), + "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), + "aws_dynamodb_table": resourceAwsDynamoDbTable(), + "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), + "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ec2_fleet": resourceAwsEc2Fleet(), + "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), + "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), + "aws_ecr_repository": resourceAwsEcrRepository(), + "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), + "aws_ecs_cluster": resourceAwsEcsCluster(), + "aws_ecs_service": resourceAwsEcsService(), + "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_mount_target": resourceAwsEfsMountTarget(), + "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), + "aws_eip": resourceAwsEip(), + "aws_eip_association": resourceAwsEipAssociation(), + "aws_eks_cluster": resourceAwsEksCluster(), + "aws_elasticache_cluster": resourceAwsElasticacheCluster(), + "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), + "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), + "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), + "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), + "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), + "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), + "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), + "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), + "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), + "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), + "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), + "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), + "aws_elb": resourceAwsElb(), + "aws_elb_attachment": resourceAwsElbAttachment(), + "aws_emr_cluster": resourceAwsEMRCluster(), + "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), + "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), + "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), + "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), + "aws_glue_classifier": resourceAwsGlueClassifier(), + "aws_glue_connection": resourceAwsGlueConnection(), + "aws_glue_crawler": resourceAwsGlueCrawler(), + "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_trigger": resourceAwsGlueTrigger(), + "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), + "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), + "aws_iam_access_key": resourceAwsIamAccessKey(), + "aws_iam_account_alias": resourceAwsIamAccountAlias(), + "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), + "aws_iam_group_policy": resourceAwsIamGroupPolicy(), + "aws_iam_group": resourceAwsIamGroup(), + "aws_iam_group_membership": resourceAwsIamGroupMembership(), + "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), + "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), + "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), + "aws_iam_policy": resourceAwsIamPolicy(), + "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), + "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), + "aws_iam_role_policy": resourceAwsIamRolePolicy(), + "aws_iam_role": resourceAwsIamRole(), + "aws_iam_saml_provider": resourceAwsIamSamlProvider(), + "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), + "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), + "aws_iam_user_policy": resourceAwsIamUserPolicy(), + "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), + "aws_iam_user": resourceAwsIamUser(), + "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), + "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), + "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), + "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), + "aws_instance": resourceAwsInstance(), + "aws_internet_gateway": resourceAwsInternetGateway(), + "aws_iot_certificate": resourceAwsIotCertificate(), + "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_type": resourceAwsIotThingType(), + "aws_iot_topic_rule": resourceAwsIotTopicRule(), + "aws_key_pair": resourceAwsKeyPair(), + "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), + "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kms_alias": resourceAwsKmsAlias(), + "aws_kms_grant": resourceAwsKmsGrant(), + "aws_kms_key": resourceAwsKmsKey(), + "aws_lambda_function": resourceAwsLambdaFunction(), + "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), + "aws_lambda_alias": resourceAwsLambdaAlias(), + "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_lightsail_domain": resourceAwsLightsailDomain(), + "aws_lightsail_instance": resourceAwsLightsailInstance(), + "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), + "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), + "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), + "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), + "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), + "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), + "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), + "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), + "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), + "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), + "aws_mq_broker": resourceAwsMqBroker(), + "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), + "aws_nat_gateway": resourceAwsNatGateway(), + "aws_network_acl": resourceAwsNetworkAcl(), + "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), + "aws_neptune_cluster": resourceAwsNeptuneCluster(), + "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), + "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), + "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), + "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), + "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), + "aws_network_acl_rule": resourceAwsNetworkAclRule(), + "aws_network_interface": resourceAwsNetworkInterface(), + "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), + "aws_opsworks_application": resourceAwsOpsworksApplication(), + "aws_opsworks_stack": resourceAwsOpsworksStack(), + "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), + "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), + "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), + "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), + "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), + "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), + "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), + "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), + "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), + "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), + "aws_opsworks_instance": resourceAwsOpsworksInstance(), + "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), + "aws_opsworks_permission": resourceAwsOpsworksPermission(), + "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), + "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), + "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), + "aws_placement_group": resourceAwsPlacementGroup(), + "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), + "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_redshift_cluster": resourceAwsRedshiftCluster(), + "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), + "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), + "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), + "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), + "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), + "aws_route53_query_log": resourceAwsRoute53QueryLog(), + "aws_route53_record": resourceAwsRoute53Record(), + "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), + "aws_route53_zone": resourceAwsRoute53Zone(), + "aws_route53_health_check": resourceAwsRoute53HealthCheck(), + "aws_route": resourceAwsRoute(), + "aws_route_table": resourceAwsRouteTable(), + "aws_default_route_table": resourceAwsDefaultRouteTable(), + "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), + "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), + "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), + "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), + "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), + "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), + "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), + "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), + "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_bucket": resourceAwsS3Bucket(), + "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_object": resourceAwsS3BucketObject(), + "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), + "aws_security_group": resourceAwsSecurityGroup(), + "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), + "aws_default_security_group": resourceAwsDefaultSecurityGroup(), + "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), + "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), + "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), + "aws_simpledb_domain": resourceAwsSimpleDBDomain(), + "aws_ssm_activation": resourceAwsSsmActivation(), + "aws_ssm_association": resourceAwsSsmAssociation(), + "aws_ssm_document": resourceAwsSsmDocument(), + "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), + "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), + "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), + "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), + "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), + "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), + "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), + "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), + "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), + "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), + "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), + "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), + "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), + "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), + "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), + "aws_sqs_queue": resourceAwsSqsQueue(), + "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), + "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), + "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), + "aws_sns_topic": resourceAwsSnsTopic(), + "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), + "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), + "aws_sfn_activity": resourceAwsSfnActivity(), + "aws_sfn_state_machine": resourceAwsSfnStateMachine(), + "aws_default_subnet": resourceAwsDefaultSubnet(), + "aws_subnet": resourceAwsSubnet(), + "aws_swf_domain": resourceAwsSwfDomain(), + "aws_volume_attachment": resourceAwsVolumeAttachment(), + "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), + "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), + "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), + "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), + "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), + "aws_default_vpc": resourceAwsDefaultVpc(), + "aws_vpc": resourceAwsVpc(), + "aws_vpc_endpoint": resourceAwsVpcEndpoint(), + "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), + "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), + "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), + "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), + "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), + "aws_vpn_connection": resourceAwsVpnConnection(), + "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), + "aws_vpn_gateway": resourceAwsVpnGateway(), + "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), + "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), + "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), + "aws_waf_ipset": resourceAwsWafIPSet(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), + "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), + "aws_waf_web_acl": resourceAwsWafWebAcl(), + "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), + "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), + "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), + "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), + "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), + "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), + "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_pinpoint_app": resourceAwsPinpointApp(), + "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), + "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), + "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), + "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), + "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point diff --git a/aws/resource_aws_cloudhsm2_cluster.go b/aws/resource_aws_cloudhsm2_cluster.go index f6bf0be7d86..51d7a838678 100644 --- a/aws/resource_aws_cloudhsm2_cluster.go +++ b/aws/resource_aws_cloudhsm2_cluster.go @@ -131,7 +131,7 @@ func describeCloudHsm2Cluster(clusterId string, meta interface{}) (*cloudhsmv2.C var cluster *cloudhsmv2.Cluster for _, c := range out.Clusters { - if *c.ClusterId == clusterId { + if aws.StringValue(c.ClusterId) == clusterId { cluster = c } } @@ -322,7 +322,7 @@ func setTagsAwsCloudHsm2Cluster(conn *cloudhsmv2.CloudHSMV2, d *schema.ResourceD if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) keys := make([]*string, 0, len(remove)) - for k, _ := range remove { + for k := range remove { keys = append(keys, aws.String(k)) } diff --git a/aws/resource_aws_cloudhsm2_cluster_test.go b/aws/resource_aws_cloudhsm2_cluster_test.go index 440813a71d3..928a42d3948 100644 --- a/aws/resource_aws_cloudhsm2_cluster_test.go +++ b/aws/resource_aws_cloudhsm2_cluster_test.go @@ -16,7 +16,7 @@ func TestAccAWSCloudHsm2Cluster_basic(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudHsm2ClusterDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSCloudHsm2Cluster(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCloudHsm2ClusterExists("aws_cloudhsm_v2_cluster.cluster"), @@ -30,6 +30,25 @@ func TestAccAWSCloudHsm2Cluster_basic(t *testing.T) { }) } +func TestAccAWSCloudHsm2Cluster_importBasic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCloudHsm2ClusterDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudHsm2Cluster(), + }, + { + ResourceName: "aws_cloudhsm_v2_cluster.cluster", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster_certificates", "tags"}, + }, + }, + }) +} + func testAccAWSCloudHsm2Cluster() string { return fmt.Sprintf(` variable "subnets" { diff --git a/aws/resource_aws_cloudhsm2_hsm.go b/aws/resource_aws_cloudhsm2_hsm.go index 673f777902a..57a364edf19 100644 --- a/aws/resource_aws_cloudhsm2_hsm.go +++ b/aws/resource_aws_cloudhsm2_hsm.go @@ -79,37 +79,20 @@ func resourceAwsCloudHsm2HsmImport( return []*schema.ResourceData{d}, nil } -func describeHsm(d *schema.ResourceData, meta interface{}) (*cloudhsmv2.Hsm, error) { - conn := meta.(*AWSClient).cloudhsmv2conn - - clusterId := d.Get("cluster_id").(string) - hsmId := d.Id() - filters := []*string{&clusterId} - result := int64(1) - out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{ - Filters: map[string][]*string{ - "clusterIds": filters, - }, - MaxResults: &result, - }) +func describeHsm(id string, conn *cloudhsmv2.CloudHSMV2) (*cloudhsmv2.Hsm, error) { + out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{}) if err != nil { - log.Printf("[WARN] Error on retrieving CloudHSMv2 Cluster (%s) when waiting: %s", d.Id(), err) + log.Printf("[WARN] Error on descibing CloudHSM v2 Cluster: %s", err) return nil, err } - var cluster *cloudhsmv2.Cluster + var hsm *cloudhsmv2.Hsm for _, c := range out.Clusters { - if *c.ClusterId == clusterId { - cluster = c - } - } - - var hsm *cloudhsmv2.Hsm - if cluster != nil { - for _, h := range cluster.Hsms { - if *h.HsmId == hsmId { + for _, h := range c.Hsms { + if *h.HsmId == id { hsm = h + break } } } @@ -120,7 +103,7 @@ func describeHsm(d *schema.ResourceData, meta interface{}) (*cloudhsmv2.Hsm, err func resourceAwsCloudHsm2HsmRefreshFunc( d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { return func() (interface{}, string, error) { - hsm, err := describeHsm(d, meta) + hsm, err := describeHsm(d.Id(), meta.(*AWSClient).cloudhsmv2conn) if hsm == nil { return 42, "destroyed", nil @@ -150,7 +133,7 @@ func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) err if len(availabilityZone) == 0 { subnetId := d.Get("subnet_id").(string) for az, sn := range cluster.SubnetMapping { - if *sn == subnetId { + if aws.StringValue(sn) == subnetId { availabilityZone = az } } @@ -211,7 +194,7 @@ func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsCloudHsm2HsmRead(d *schema.ResourceData, meta interface{}) error { - hsm, err := describeHsm(d, meta) + hsm, err := describeHsm(d.Id(), meta.(*AWSClient).cloudhsmv2conn) if hsm == nil { log.Printf("[WARN] CloudHSMv2 HSM (%s) not found", d.Id()) diff --git a/aws/resource_aws_cloudhsm2_hsm_test.go b/aws/resource_aws_cloudhsm2_hsm_test.go index 6b316898fca..4f094836636 100644 --- a/aws/resource_aws_cloudhsm2_hsm_test.go +++ b/aws/resource_aws_cloudhsm2_hsm_test.go @@ -5,7 +5,6 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudhsmv2" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" @@ -17,7 +16,7 @@ func TestAccAWSCloudHsm2Hsm_basic(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudHsm2HsmDestroy, Steps: []resource.TestStep{ - resource.TestStep{ + { Config: testAccAWSCloudHsm2Hsm(), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCloudHsm2HsmExists("aws_cloudhsm_v2_hsm.hsm"), @@ -31,6 +30,24 @@ func TestAccAWSCloudHsm2Hsm_basic(t *testing.T) { }) } +func TestAccAWSCloudHsm2Hsm_importBasic(t *testing.T) { + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCloudHsm2HsmDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudHsm2Hsm(), + }, + { + ResourceName: "aws_cloudhsm_v2_hsm.hsm", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccAWSCloudHsm2Hsm() string { return fmt.Sprintf(` variable "subnets" { @@ -83,15 +100,7 @@ func testAccCheckAWSCloudHsm2HsmDestroy(s *terraform.State) error { continue } - var hsm *cloudhsmv2.Hsm - out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{}) - for _, c := range out.Clusters { - for _, h := range c.Hsms { - if aws.StringValue(h.HsmId) == rs.Primary.ID { - hsm = h - } - } - } + hsm, err := describeHsm(rs.Primary.ID, conn) if err != nil { return err diff --git a/website/docs/d/cloudhsm_v2_cluster.html.markdown b/website/docs/d/cloudhsm_v2_cluster.html.markdown index 0ddc8567eae..acac1fa122d 100644 --- a/website/docs/d/cloudhsm_v2_cluster.html.markdown +++ b/website/docs/d/cloudhsm_v2_cluster.html.markdown @@ -30,10 +30,11 @@ The following attributes are exported: * `vpc_id` - The id of the VPC that the CloudHSM cluster resides in. * `security_group_id` - The ID of the security group associated with the CloudHSM cluster. -* `cluster_certificates` - The list of cluster certificates. +* `subnet_ids` - The IDs of subnets in which cluster operates. +* `cluster_certificates` - The set of cluster certificates. * `cluster_certificates.#.cluster_certificate` - The cluster certificate issued (signed) by the issuing certificate authority (CA) of the cluster's owner. * `cluster_certificates.#.cluster_csr` - The certificate signing request (CSR). Available only in UNINITIALIZED state. * `cluster_certificates.#.aws_hardware_certificate` - The HSM hardware certificate issued (signed) by AWS CloudHSM. * `cluster_certificates.#.hsm_certificate` - The HSM certificate issued (signed) by the HSM hardware. * `cluster_certificates.#.manufacturer_hardware_certificate` - The HSM hardware certificate issued (signed) by the hardware manufacturer. -* `subnet_ids` - The IDs of subnets in which cluster operates. \ No newline at end of file +The number of available cluster certificates may vary depending on state of the cluster. \ No newline at end of file From a3e73c57a9176a5152eb2a81418c20b01c6b6a36 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 17 Oct 2018 09:55:57 -0400 Subject: [PATCH 2915/3316] docs/service/waf: Clarify web ACL rules as global versus regional --- website/docs/r/waf_web_acl.html.markdown | 2 +- website/docs/r/wafregional_web_acl.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/waf_web_acl.html.markdown b/website/docs/r/waf_web_acl.html.markdown index 08396ce6f3e..ca03b1b1496 100644 --- a/website/docs/r/waf_web_acl.html.markdown +++ b/website/docs/r/waf_web_acl.html.markdown @@ -85,7 +85,7 @@ See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ActivatedRule. * `type` - (Required) valid values are: `NONE` or `COUNT` * `priority` - (Required) Specifies the order in which the rules in a WebACL are evaluated. Rules with a lower value are evaluated before rules with a higher value. -* `rule_id` - (Required) ID of the associated [rule](/docs/providers/aws/r/waf_rule.html) +* `rule_id` - (Required) ID of the associated WAF (Global) rule (e.g. [`aws_waf_rule`](/docs/providers/aws/r/waf_rule.html)). WAF (Regional) rules cannot be used. * `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html), or `GROUP`, as defined by [RuleGroup](https://docs.aws.amazon.com/waf/latest/APIReference/API_RuleGroup.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. If you add a GROUP rule, you need to set `type` as `GROUP`. ## Attributes Reference diff --git a/website/docs/r/wafregional_web_acl.html.markdown b/website/docs/r/wafregional_web_acl.html.markdown index 0e27eb13983..e9c0e1f92c7 100644 --- a/website/docs/r/wafregional_web_acl.html.markdown +++ b/website/docs/r/wafregional_web_acl.html.markdown @@ -74,7 +74,7 @@ See [docs](https://docs.aws.amazon.com/waf/latest/APIReference/API_regional_Acti * `override_action` - (Required) Override the action that a group requests CloudFront or AWS WAF takes when a web request matches the conditions in the rule. Only used if `type` is `GROUP`. * `priority` - (Required) Specifies the order in which the rules in a WebACL are evaluated. Rules with a lower value are evaluated before rules with a higher value. -* `rule_id` - (Required) ID of the associated [rule](/docs/providers/aws/r/wafregional_rule.html) +* `rule_id` - (Required) ID of the associated WAF (Regional) rule (e.g. [`aws_wafregional_rule`](/docs/providers/aws/r/wafregional_rule.html)). WAF (Global) rules cannot be used. * `type` - (Optional) The rule type, either `REGULAR`, as defined by [Rule](http://docs.aws.amazon.com/waf/latest/APIReference/API_Rule.html), `RATE_BASED`, as defined by [RateBasedRule](http://docs.aws.amazon.com/waf/latest/APIReference/API_RateBasedRule.html), or `GROUP`, as defined by [RuleGroup](https://docs.aws.amazon.com/waf/latest/APIReference/API_RuleGroup.html). The default is REGULAR. If you add a RATE_BASED rule, you need to set `type` as `RATE_BASED`. If you add a GROUP rule, you need to set `type` as `GROUP`. ### `default_action` / `action` From 351c21c42e788a3bb4b081135c1e8a167fd1814b Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 17 Oct 2018 10:13:27 -0400 Subject: [PATCH 2916/3316] Remove unused 'validateVpcEndpointType'. --- aws/validators.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/aws/validators.go b/aws/validators.go index 8768cbdbe22..157ce12a223 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -14,7 +14,6 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentity" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" - "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform/helper/resource" @@ -1763,10 +1762,6 @@ func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { return nil } -func validateVpcEndpointType(v interface{}, k string) (ws []string, errors []error) { - return validateStringIn(ec2.VpcEndpointTypeGateway, ec2.VpcEndpointTypeInterface)(v, k) -} - func validateStringIn(validValues ...string) schema.SchemaValidateFunc { return func(v interface{}, k string) (ws []string, errors []error) { value := v.(string) From cc155bc3867325b126cdfeaa96144fb3a7fa2d1e Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 17 Oct 2018 10:19:16 -0400 Subject: [PATCH 2917/3316] Replace 'validateStringIn' with 'validation.StringInSlice'. --- aws/resource_aws_service_discovery_service.go | 13 +++++++------ aws/validators.go | 15 --------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/aws/resource_aws_service_discovery_service.go b/aws/resource_aws_service_discovery_service.go index 25a8553e5eb..efaeacef4b4 100644 --- a/aws/resource_aws_service_discovery_service.go +++ b/aws/resource_aws_service_discovery_service.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsServiceDiscoveryService() *schema.Resource { @@ -55,12 +56,12 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateStringIn( + ValidateFunc: validation.StringInSlice([]string{ servicediscovery.RecordTypeSrv, servicediscovery.RecordTypeA, servicediscovery.RecordTypeAaaa, servicediscovery.RecordTypeCname, - ), + }, false), }, }, }, @@ -70,10 +71,10 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Optional: true, ForceNew: true, Default: servicediscovery.RoutingPolicyMultivalue, - ValidateFunc: validateStringIn( + ValidateFunc: validation.StringInSlice([]string{ servicediscovery.RoutingPolicyMultivalue, servicediscovery.RoutingPolicyWeighted, - ), + }, false), }, }, }, @@ -96,11 +97,11 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateStringIn( + ValidateFunc: validation.StringInSlice([]string{ servicediscovery.HealthCheckTypeHttp, servicediscovery.HealthCheckTypeHttps, servicediscovery.HealthCheckTypeTcp, - ), + }, false), }, }, }, diff --git a/aws/validators.go b/aws/validators.go index 157ce12a223..533b33657ba 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1762,21 +1762,6 @@ func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { return nil } -func validateStringIn(validValues ...string) schema.SchemaValidateFunc { - return func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - for _, s := range validValues { - if value == s { - return - } - } - errors = append(errors, fmt.Errorf( - "%q contains an invalid value %q. Valid values are %q.", - k, value, validValues)) - return - } -} - func validateVpnGatewayAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { value := v.(string) From 212d441757e26096a4c61be0f9563ee59b9a6243 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 17 Oct 2018 10:38:16 -0400 Subject: [PATCH 2918/3316] Replace our 'validateJsonString' with 'validation.ValidateJsonString'. --- aws/data_source_aws_lambda_invocation.go | 3 +- aws/resource_aws_api_gateway_rest_api.go | 2 +- aws/resource_aws_cloudformation_stack.go | 3 +- aws/resource_aws_cloudwatch_dashboard.go | 3 +- aws/resource_aws_config_config_rule.go | 2 +- aws/resource_aws_dms_replication_task.go | 4 +- aws/resource_aws_ecr_lifecycle_policy.go | 3 +- aws/resource_aws_elasticsearch_domain.go | 2 +- aws/resource_aws_emr_cluster.go | 6 +- ...resource_aws_emr_security_configuration.go | 2 +- aws/resource_aws_glacier_vault.go | 3 +- aws/resource_aws_glue_crawler.go | 2 +- aws/resource_aws_iam_role.go | 2 +- aws/resource_aws_kms_key.go | 2 +- aws/resource_aws_organizations_policy.go | 2 +- aws/resource_aws_s3_bucket.go | 4 +- aws/resource_aws_s3_bucket_policy.go | 3 +- aws/resource_aws_secretsmanager_secret.go | 3 +- aws/resource_aws_sns_topic.go | 4 +- aws/resource_aws_sns_topic_policy.go | 3 +- aws/resource_aws_sns_topic_subscription.go | 4 +- aws/resource_aws_sqs_queue.go | 11 ++-- aws/resource_aws_sqs_queue_policy.go | 3 +- aws/validators.go | 7 --- aws/validators_test.go | 55 ------------------- 25 files changed, 42 insertions(+), 96 deletions(-) diff --git a/aws/data_source_aws_lambda_invocation.go b/aws/data_source_aws_lambda_invocation.go index 6e532686fa9..f21b99af688 100644 --- a/aws/data_source_aws_lambda_invocation.go +++ b/aws/data_source_aws_lambda_invocation.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/lambda" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsLambdaInvocation() *schema.Resource { @@ -33,7 +34,7 @@ func dataSourceAwsLambdaInvocation() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "result": { diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index 5922f7f82e5..f1134e26073 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -45,7 +45,7 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, diff --git a/aws/resource_aws_cloudformation_stack.go b/aws/resource_aws_cloudformation_stack.go index 8dc1a5a3e8a..50fb922575b 100644 --- a/aws/resource_aws_cloudformation_stack.go +++ b/aws/resource_aws_cloudformation_stack.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudFormationStack() *schema.Resource { @@ -86,7 +87,7 @@ func resourceAwsCloudFormationStack() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_cloudwatch_dashboard.go b/aws/resource_aws_cloudwatch_dashboard.go index d203aead4b1..2a60e595fd1 100644 --- a/aws/resource_aws_cloudwatch_dashboard.go +++ b/aws/resource_aws_cloudwatch_dashboard.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudwatch" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudWatchDashboard() *schema.Resource { @@ -33,7 +34,7 @@ func resourceAwsCloudWatchDashboard() *schema.Resource { "dashboard_body": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_config_config_rule.go b/aws/resource_aws_config_config_rule.go index c3ee13d1b49..50d4df7d32a 100644 --- a/aws/resource_aws_config_config_rule.go +++ b/aws/resource_aws_config_config_rule.go @@ -49,7 +49,7 @@ func resourceAwsConfigConfigRule() *schema.Resource { "input_parameters": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "maximum_execution_frequency": { Type: schema.TypeString, diff --git a/aws/resource_aws_dms_replication_task.go b/aws/resource_aws_dms_replication_task.go index d44b30c81eb..8b7574f0407 100644 --- a/aws/resource_aws_dms_replication_task.go +++ b/aws/resource_aws_dms_replication_task.go @@ -59,7 +59,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "replication_task_settings": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "source_endpoint_arn": { @@ -71,7 +71,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "table_mappings": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "tags": { diff --git a/aws/resource_aws_ecr_lifecycle_policy.go b/aws/resource_aws_ecr_lifecycle_policy.go index 6a2be9110f9..31b73e64889 100644 --- a/aws/resource_aws_ecr_lifecycle_policy.go +++ b/aws/resource_aws_ecr_lifecycle_policy.go @@ -4,6 +4,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecr" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsEcrLifecyclePolicy() *schema.Resource { @@ -26,7 +27,7 @@ func resourceAwsEcrLifecyclePolicy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "registry_id": { diff --git a/aws/resource_aws_elasticsearch_domain.go b/aws/resource_aws_elasticsearch_domain.go index a5520b12b6a..8f48643041f 100644 --- a/aws/resource_aws_elasticsearch_domain.go +++ b/aws/resource_aws_elasticsearch_domain.go @@ -32,7 +32,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "advanced_options": { diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index 4b74d5adbdf..0c614e914de 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -47,7 +47,7 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -237,7 +237,7 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: suppressEquivalentJsonDiffs, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { jsonString, _ := structure.NormalizeJsonString(v) return jsonString @@ -357,7 +357,7 @@ func resourceAwsEMRCluster() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"configurations"}, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_emr_security_configuration.go b/aws/resource_aws_emr_security_configuration.go index caaca37889c..caad7eed7d2 100644 --- a/aws/resource_aws_emr_security_configuration.go +++ b/aws/resource_aws_emr_security_configuration.go @@ -40,7 +40,7 @@ func resourceAwsEMRSecurityConfiguration() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "creation_date": { diff --git a/aws/resource_aws_glacier_vault.go b/aws/resource_aws_glacier_vault.go index 44e97da7bab..587402f228f 100644 --- a/aws/resource_aws_glacier_vault.go +++ b/aws/resource_aws_glacier_vault.go @@ -12,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/glacier" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsGlacierVault() *schema.Resource { @@ -57,7 +58,7 @@ func resourceAwsGlacierVault() *schema.Resource { "access_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_glue_crawler.go b/aws/resource_aws_glue_crawler.go index 957ba41a095..d75035505e1 100644 --- a/aws/resource_aws_glue_crawler.go +++ b/aws/resource_aws_glue_crawler.go @@ -151,7 +151,7 @@ func resourceAwsGlueCrawler() *schema.Resource { json, _ := structure.NormalizeJsonString(v) return json }, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, }, } diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index a4e2bc42f1b..777eb3d9782 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -100,7 +100,7 @@ func resourceAwsIamRole() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "force_detach_policies": { diff --git a/aws/resource_aws_kms_key.go b/aws/resource_aws_kms_key.go index e27ea971b77..477ac628ca6 100644 --- a/aws/resource_aws_kms_key.go +++ b/aws/resource_aws_kms_key.go @@ -54,7 +54,7 @@ func resourceAwsKmsKey() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "is_enabled": { diff --git a/aws/resource_aws_organizations_policy.go b/aws/resource_aws_organizations_policy.go index dcad1d3784b..715e6bf93b6 100644 --- a/aws/resource_aws_organizations_policy.go +++ b/aws/resource_aws_organizations_policy.go @@ -31,7 +31,7 @@ func resourceAwsOrganizationsPolicy() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "description": { Type: schema.TypeString, diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 62fe9b2da14..d59ef9be429 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -72,7 +72,7 @@ func resourceAwsS3Bucket() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, @@ -137,7 +137,7 @@ func resourceAwsS3Bucket() *schema.Resource { "routing_rules": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_s3_bucket_policy.go b/aws/resource_aws_s3_bucket_policy.go index b7f7fed8f43..d0f74cef0ce 100644 --- a/aws/resource_aws_s3_bucket_policy.go +++ b/aws/resource_aws_s3_bucket_policy.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsS3BucketPolicy() *schema.Resource { @@ -29,7 +30,7 @@ func resourceAwsS3BucketPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_secretsmanager_secret.go b/aws/resource_aws_secretsmanager_secret.go index 1d7c153b8aa..947d2668779 100644 --- a/aws/resource_aws_secretsmanager_secret.go +++ b/aws/resource_aws_secretsmanager_secret.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSecretsManagerSecret() *schema.Resource { @@ -43,7 +44,7 @@ func resourceAwsSecretsManagerSecret() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "recovery_window_in_days": { diff --git a/aws/resource_aws_sns_topic.go b/aws/resource_aws_sns_topic.go index be5d2bfcc8e..933ca17ebe2 100644 --- a/aws/resource_aws_sns_topic.go +++ b/aws/resource_aws_sns_topic.go @@ -65,7 +65,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -76,7 +76,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: false, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_sns_topic_policy.go b/aws/resource_aws_sns_topic_policy.go index 5f8241b0060..f2c6ee54e19 100644 --- a/aws/resource_aws_sns_topic_policy.go +++ b/aws/resource_aws_sns_topic_policy.go @@ -6,6 +6,7 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -28,7 +29,7 @@ func resourceAwsSnsTopicPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_sns_topic_subscription.go b/aws/resource_aws_sns_topic_subscription.go index e20ea2b9d8d..2607007f7d9 100644 --- a/aws/resource_aws_sns_topic_subscription.go +++ b/aws/resource_aws_sns_topic_subscription.go @@ -71,7 +71,7 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { "delivery_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentSnsTopicSubscriptionDeliveryPolicy, }, "raw_message_delivery": { @@ -86,7 +86,7 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { "filter_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_sqs_queue.go b/aws/resource_aws_sqs_queue.go index 1c55109d4be..0bfe29f4b0f 100644 --- a/aws/resource_aws_sqs_queue.go +++ b/aws/resource_aws_sqs_queue.go @@ -5,17 +5,16 @@ import ( "log" "net/url" "strconv" - "time" - - "github.com/hashicorp/terraform/helper/schema" - "strings" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/sqs" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) var sqsQueueAttributeMap = map[string]string{ @@ -90,13 +89,13 @@ func resourceAwsSqsQueue() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "redrive_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_sqs_queue_policy.go b/aws/resource_aws_sqs_queue_policy.go index 277afc2e787..0459e7c209a 100644 --- a/aws/resource_aws_sqs_queue_policy.go +++ b/aws/resource_aws_sqs_queue_policy.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/sqs" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/jen20/awspolicyequivalence" ) @@ -34,7 +35,7 @@ func resourceAwsSqsQueuePolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/validators.go b/aws/validators.go index 533b33657ba..173a73fd3b8 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -633,13 +633,6 @@ func validateDbEventSubscriptionName(v interface{}, k string) (ws []string, erro return } -func validateJsonString(v interface{}, k string) (ws []string, errors []error) { - if _, err := structure.NormalizeJsonString(v); err != nil { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON: %s", k, err)) - } - return -} - func validateIAMPolicyJson(v interface{}, k string) (ws []string, errors []error) { // IAM Policy documents need to be valid JSON, and pass legacy parsing value := v.(string) diff --git a/aws/validators_test.go b/aws/validators_test.go index 76a5f324112..efa43bb8cc2 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -649,61 +649,6 @@ func TestValidateDbEventSubscriptionName(t *testing.T) { } } -func TestValidateJsonString(t *testing.T) { - type testCases struct { - Value string - ErrCount int - } - - invalidCases := []testCases{ - { - Value: `{0:"1"}`, - ErrCount: 1, - }, - { - Value: `{'abc':1}`, - ErrCount: 1, - }, - { - Value: `{"def":}`, - ErrCount: 1, - }, - { - Value: `{"xyz":[}}`, - ErrCount: 1, - }, - } - - for _, tc := range invalidCases { - _, errors := validateJsonString(tc.Value, "json") - if len(errors) != tc.ErrCount { - t.Fatalf("Expected %q to trigger a validation error.", tc.Value) - } - } - - validCases := []testCases{ - { - Value: ``, - ErrCount: 0, - }, - { - Value: `{}`, - ErrCount: 0, - }, - { - Value: `{"abc":["1","2"]}`, - ErrCount: 0, - }, - } - - for _, tc := range validCases { - _, errors := validateJsonString(tc.Value, "json") - if len(errors) != tc.ErrCount { - t.Fatalf("Expected %q not to trigger a validation error.", tc.Value) - } - } -} - func TestValidateIAMPolicyJsonString(t *testing.T) { type testCases struct { Value string From 28ac4d8460d260fad09db954a7a36192cafa18a2 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 17 Oct 2018 11:00:50 -0400 Subject: [PATCH 2919/3316] Replace 'validateIntegerInRange' with 'validation.IntBetween'. --- aws/resource_aws_api_gateway_rest_api.go | 2 +- ...ce_aws_kinesis_firehose_delivery_stream.go | 4 ++-- aws/validators.go | 15 -------------- aws/validators_test.go | 20 ------------------- 4 files changed, 3 insertions(+), 38 deletions(-) diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index f1134e26073..7f304c8d7ff 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -64,7 +64,7 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: -1, - ValidateFunc: validateIntegerInRange(-1, 10485760), + ValidateFunc: validation.IntBetween(-1, 10485760), }, "root_resource_id": { diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream.go b/aws/resource_aws_kinesis_firehose_delivery_stream.go index 2e09eafb476..2f3c34f9bd6 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -1234,7 +1234,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 180, - ValidateFunc: validateIntegerInRange(180, 600), + ValidateFunc: validation.IntBetween(180, 600), }, "hec_endpoint": { @@ -1279,7 +1279,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 3600, - ValidateFunc: validateIntegerInRange(0, 7200), + ValidateFunc: validation.IntBetween(0, 7200), }, "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), diff --git a/aws/validators.go b/aws/validators.go index 173a73fd3b8..e572ae4909b 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -340,21 +340,6 @@ func validateCloudWatchLogResourcePolicyDocument(v interface{}, k string) (ws [] return } -func validateIntegerInRange(min, max int) schema.SchemaValidateFunc { - return func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value < min { - errors = append(errors, fmt.Errorf( - "%q cannot be lower than %d: %d", k, min, value)) - } - if value > max { - errors = append(errors, fmt.Errorf( - "%q cannot be higher than %d: %d", k, max, value)) - } - return - } -} - func validateCloudWatchEventTargetId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 64 { diff --git a/aws/validators_test.go b/aws/validators_test.go index efa43bb8cc2..3d233c5f9c9 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -556,26 +556,6 @@ func TestValidateS3BucketLifecycleTimestamp(t *testing.T) { } } -func TestValidateIntegerInRange(t *testing.T) { - validIntegers := []int{-259, 0, 1, 5, 999} - min := -259 - max := 999 - for _, v := range validIntegers { - _, errors := validateIntegerInRange(min, max)(v, "name") - if len(errors) != 0 { - t.Fatalf("%q should be an integer in range (%d, %d): %q", v, min, max, errors) - } - } - - invalidIntegers := []int{-260, -99999, 1000, 25678} - for _, v := range invalidIntegers { - _, errors := validateIntegerInRange(min, max)(v, "name") - if len(errors) == 0 { - t.Fatalf("%q should be an integer outside range (%d, %d)", v, min, max) - } - } -} - func TestResourceAWSElastiCacheClusterIdValidation(t *testing.T) { cases := []struct { Value string From 901ecc089413d81c837be13f04ec41e3f9c53cca Mon Sep 17 00:00:00 2001 From: Antoine Delamarre Date: Wed, 17 Oct 2018 17:14:12 +0200 Subject: [PATCH 2920/3316] Add the custom domain name feature --- aws/resource_aws_cognito_user_pool_domain.go | 24 ++++++- ...ource_aws_cognito_user_pool_domain_test.go | 68 +++++++++++++++++++ 2 files changed, 89 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_cognito_user_pool_domain.go b/aws/resource_aws_cognito_user_pool_domain.go index 08c70a478fd..79fcd58f7fb 100644 --- a/aws/resource_aws_cognito_user_pool_domain.go +++ b/aws/resource_aws_cognito_user_pool_domain.go @@ -22,10 +22,15 @@ func resourceAwsCognitoUserPoolDomain() *schema.Resource { Schema: map[string]*schema.Schema{ "domain": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "certificate_arn": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, - ValidateFunc: validateCognitoUserPoolDomain, + ValidateFunc: validateArn, }, "user_pool_id": { Type: schema.TypeString, @@ -57,10 +62,21 @@ func resourceAwsCognitoUserPoolDomainCreate(d *schema.ResourceData, meta interfa domain := d.Get("domain").(string) + timeout := 1 * time.Minute //Default timeout for a basic domain + params := &cognitoidentityprovider.CreateUserPoolDomainInput{ Domain: aws.String(domain), UserPoolId: aws.String(d.Get("user_pool_id").(string)), } + + if v, ok := d.GetOk("certificate_arn"); ok { + customDomainConfig := &cognitoidentityprovider.CustomDomainConfigType{ + CertificateArn: aws.String(v.(string)), + } + params.CustomDomainConfig = customDomainConfig + timeout = 60 * time.Minute //Custom domains take more time to become active + } + log.Printf("[DEBUG] Creating Cognito User Pool Domain: %s", params) _, err := conn.CreateUserPoolDomain(params) @@ -78,7 +94,8 @@ func resourceAwsCognitoUserPoolDomainCreate(d *schema.ResourceData, meta interfa Target: []string{ cognitoidentityprovider.DomainStatusTypeActive, }, - Timeout: 1 * time.Minute, + MinTimeout: 1 * time.Minute, + Timeout: timeout, Refresh: func() (interface{}, string, error) { domain, err := conn.DescribeUserPoolDomain(&cognitoidentityprovider.DescribeUserPoolDomainInput{ Domain: aws.String(d.Get("domain").(string)), @@ -119,6 +136,7 @@ func resourceAwsCognitoUserPoolDomainRead(d *schema.ResourceData, meta interface desc := domain.DomainDescription d.Set("domain", d.Id()) + d.Set("certificate_arn", desc.CustomDomainConfig.CertificateArn) d.Set("aws_account_id", desc.AWSAccountId) d.Set("cloudfront_distribution_arn", desc.CloudFrontDistribution) d.Set("s3_bucket", desc.S3Bucket) diff --git a/aws/resource_aws_cognito_user_pool_domain_test.go b/aws/resource_aws_cognito_user_pool_domain_test.go index 678b782865f..d86d9a16120 100644 --- a/aws/resource_aws_cognito_user_pool_domain_test.go +++ b/aws/resource_aws_cognito_user_pool_domain_test.go @@ -3,6 +3,7 @@ package aws import ( "errors" "fmt" + "os" "testing" "github.com/aws/aws-sdk-go/aws" @@ -37,6 +38,54 @@ func TestAccAWSCognitoUserPoolDomain_basic(t *testing.T) { }) } +func TestAccAWSCognitoUserPoolDomain_custom(t *testing.T) { + poolName := fmt.Sprintf("tf-acc-test-pool-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) + // This test must always run in us-east-1 + // BadRequestException: Invalid certificate ARN: arn:aws:acm:us-west-2:123456789012:certificate/xxxxx. Certificate must be in 'us-east-1'. + oldvar := os.Getenv("AWS_DEFAULT_REGION") + os.Setenv("AWS_DEFAULT_REGION", "us-east-1") + defer os.Setenv("AWS_DEFAULT_REGION", oldvar) + + customDomainName := os.Getenv("AWS_COGNITO_USER_POOL_DOMAIN_ROOT_DOMAIN") + if customDomainName == "" { + t.Skip( + "Environment variable AWS_COGNITO_USER_POOL_DOMAIN_ROOT_DOMAIN is not set. " + + "This environment variable must be set to the fqdn of " + + "an ISSUED ACM certificate in us-east-1 to enable this test.") + } + + customSubDomainName := fmt.Sprintf("%s.%s", fmt.Sprintf("tf-acc-test-domain-%d", acctest.RandInt()), customDomainName) + // For now, use an environment variable to limit running this test + certificateArn := os.Getenv("AWS_COGNITO_USER_POOL_DOMAIN_CERTIFICATE_ARN") + if certificateArn == "" { + t.Skip( + "Environment variable AWS_COGNITO_USER_POOL_DOMAIN_CERTIFICATE_ARN is not set. " + + "This environment variable must be set to the ARN of " + + "an ISSUED ACM certificate in us-east-1 to enable this test.") + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCognitoUserPoolDomainDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCognitoUserPoolDomainConfig_custom(customDomainName, poolName, certificateArn, customSubDomainName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckAWSCognitoUserPoolDomainExists("aws_cognito_user_pool_domain.main"), + resource.TestCheckResourceAttr("aws_cognito_user_pool_domain.main", "domain", customSubDomainName), + resource.TestCheckResourceAttr("aws_cognito_user_pool_domain.main", "certificate_arn", certificateArn), + resource.TestCheckResourceAttr("aws_cognito_user_pool.main", "name", poolName), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool_domain.main", "aws_account_id"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool_domain.main", "cloudfront_distribution_arn"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool_domain.main", "s3_bucket"), + resource.TestCheckResourceAttrSet("aws_cognito_user_pool_domain.main", "version"), + ), + }, + }, + }) +} + func TestAccAWSCognitoUserPoolDomain_import(t *testing.T) { domainName := fmt.Sprintf("tf-acc-test-domain-%d", acctest.RandInt()) poolName := fmt.Sprintf("tf-acc-test-pool-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)) @@ -118,3 +167,22 @@ resource "aws_cognito_user_pool" "main" { } `, domainName, poolName) } + +func testAccAWSCognitoUserPoolDomainConfig_custom(customDomainName, poolName, certificateArn, customSubDomainName string) string { + return fmt.Sprintf(` + +data "aws_route53_zone" "tf-zone" { + name = "%s" +} + +resource "aws_cognito_user_pool_domain" "main" { + domain = "%s" + user_pool_id = "${aws_cognito_user_pool.main.id}" + certificate_arn = "%s" +} + +resource "aws_cognito_user_pool" "main" { + name = "%s" +} +`, customDomainName, customSubDomainName, certificateArn, poolName) +} From 24d32fb8685c458a09289e0b57aa2e9dbe73c17d Mon Sep 17 00:00:00 2001 From: Antoine Delamarre Date: Wed, 17 Oct 2018 18:10:42 +0200 Subject: [PATCH 2921/3316] Reflect the change in the documentation --- website/docs/r/cognito_user_pool_domain.markdown | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/website/docs/r/cognito_user_pool_domain.markdown b/website/docs/r/cognito_user_pool_domain.markdown index 178e6e119a5..d052d3888c0 100644 --- a/website/docs/r/cognito_user_pool_domain.markdown +++ b/website/docs/r/cognito_user_pool_domain.markdown @@ -12,6 +12,7 @@ Provides a Cognito User Pool Domain resource. ## Example Usage +### Amazon Cognito domain ```hcl resource "aws_cognito_user_pool_domain" "main" { domain = "example-domain" @@ -22,6 +23,20 @@ resource "aws_cognito_user_pool" "example" { name = "example-pool" } ``` +### Custom Cognito domain +```hcl +resource "aws_cognito_user_pool_domain" "main" { + domain = "example-domain.exemple.com" + certificate_arn = "${aws_acm_certificate.cert.arn}" + user_pool_id = "${aws_cognito_user_pool.example.id}" +} + +resource "aws_cognito_user_pool" "example" { + name = "example-pool" +} +``` + + ## Argument Reference @@ -29,6 +44,7 @@ The following arguments are supported: * `domain` - (Required) The domain string. * `user_pool_id` - (Required) The user pool ID. +* `certificate_arn` - (Optional) The ARN of an ISSUED ACM certificate in us-east-1 for a custom domain. ## Attribute Reference From 2bc2b08fb1e49055fbef86eff00be0f4f375ab08 Mon Sep 17 00:00:00 2001 From: Antoine Delamarre Date: Wed, 17 Oct 2018 18:42:06 +0200 Subject: [PATCH 2922/3316] Remove unnecessary zone data source in the test configuration --- aws/resource_aws_cognito_user_pool_domain_test.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_cognito_user_pool_domain_test.go b/aws/resource_aws_cognito_user_pool_domain_test.go index d86d9a16120..78439f42cf8 100644 --- a/aws/resource_aws_cognito_user_pool_domain_test.go +++ b/aws/resource_aws_cognito_user_pool_domain_test.go @@ -70,7 +70,7 @@ func TestAccAWSCognitoUserPoolDomain_custom(t *testing.T) { CheckDestroy: testAccCheckAWSCognitoUserPoolDomainDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCognitoUserPoolDomainConfig_custom(customDomainName, poolName, certificateArn, customSubDomainName), + Config: testAccAWSCognitoUserPoolDomainConfig_custom(customSubDomainName, poolName, certificateArn), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckAWSCognitoUserPoolDomainExists("aws_cognito_user_pool_domain.main"), resource.TestCheckResourceAttr("aws_cognito_user_pool_domain.main", "domain", customSubDomainName), @@ -168,13 +168,8 @@ resource "aws_cognito_user_pool" "main" { `, domainName, poolName) } -func testAccAWSCognitoUserPoolDomainConfig_custom(customDomainName, poolName, certificateArn, customSubDomainName string) string { +func testAccAWSCognitoUserPoolDomainConfig_custom(customSubDomainName, poolName, certificateArn string) string { return fmt.Sprintf(` - -data "aws_route53_zone" "tf-zone" { - name = "%s" -} - resource "aws_cognito_user_pool_domain" "main" { domain = "%s" user_pool_id = "${aws_cognito_user_pool.main.id}" @@ -184,5 +179,5 @@ resource "aws_cognito_user_pool_domain" "main" { resource "aws_cognito_user_pool" "main" { name = "%s" } -`, customDomainName, customSubDomainName, certificateArn, poolName) +`, customSubDomainName, certificateArn, poolName) } From 353f83f74f93c3034b817ce6c4e17fbac6f9ca82 Mon Sep 17 00:00:00 2001 From: Jan Alfred Richter Date: Thu, 18 Oct 2018 12:35:52 +1300 Subject: [PATCH 2923/3316] Load balancer formatting --- website/docs/r/ecs_service.html.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/r/ecs_service.html.markdown b/website/docs/r/ecs_service.html.markdown index 809dbda6901..ca9b79a060f 100644 --- a/website/docs/r/ecs_service.html.markdown +++ b/website/docs/r/ecs_service.html.markdown @@ -94,15 +94,17 @@ The following arguments are supported: * `network_configuration` - (Optional) The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. * `service_registries` - (Optional) The service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. --> **Note:** As a result of an AWS limitation, a single `load_balancer` can be attached to the ECS service at most. See [related docs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html#load-balancing-concepts). +## load_balancer -Load balancers support the following: +`load_balancer` supports the following: * `elb_name` - (Required for ELB Classic) The name of the ELB (Classic) to associate with the service. * `target_group_arn` - (Required for ALB/NLB) The ARN of the Load Balancer target group to associate with the service. * `container_name` - (Required) The name of the container to associate with the load balancer (as it appears in a container definition). * `container_port` - (Required) The port on the container to associate with the load balancer. +-> **Note:** As a result of an AWS limitation, a single `load_balancer` can be attached to the ECS service at most. See [related docs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html#load-balancing-concepts). + ## ordered_placement_strategy `ordered_placement_strategy` supports the following: From 0a768f609aeab20f4bdefe255bdc224f306a92c7 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Wed, 17 Oct 2018 14:07:44 +0200 Subject: [PATCH 2924/3316] resource/aws_pinpoint_apns_channel --- aws/provider.go | 1 + aws/resource_aws_pinpoint_apns_channel.go | 159 ++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_channel.go diff --git a/aws/provider.go b/aws/provider.go index 6f97120a810..2ee88205339 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -678,6 +678,7 @@ func Provider() terraform.ResourceProvider { "aws_batch_job_queue": resourceAwsBatchJobQueue(), "aws_pinpoint_app": resourceAwsPinpointApp(), "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_apns_channel": resourceAwsPinpointAPNSChannel(), "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), diff --git a/aws/resource_aws_pinpoint_apns_channel.go b/aws/resource_aws_pinpoint_apns_channel.go new file mode 100644 index 00000000000..95949cb14e0 --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSChannelUpsert, + Read: resourceAwsPinpointAPNSChannelRead, + Update: resourceAwsPinpointAPNSChannelUpsert, + Delete: resourceAwsPinpointAPNSChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsChannelInput{ + ApplicationId: aws.String(applicationId), + APNSChannelRequest: params, + } + + _, err := conn.UpdateApnsChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Channel for Application %s", d.Id()) + + output, err := conn.GetApnsChannel(&pinpoint.GetApnsChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Channel: %s", d.Id()) + _, err := conn.DeleteApnsChannel(&pinpoint.DeleteApnsChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Channel for Application %s: %s", d.Id(), err) + } + return nil +} From c1e739b8bfd4c0fbfee91427cd63399aee5a380f Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Thu, 18 Oct 2018 11:06:56 +0200 Subject: [PATCH 2925/3316] resource/aws_pinpoint_apns_channel: docs + tests --- ...resource_aws_pinpoint_apns_channel_test.go | 257 ++++++++++++++++++ website/aws.erb | 3 + website/docs/r/pinpoint_apns_channel.markdown | 59 ++++ 3 files changed, 319 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_channel_test.go create mode 100644 website/docs/r/pinpoint_apns_channel.markdown diff --git a/aws/resource_aws_pinpoint_apns_channel_test.go b/aws/resource_aws_pinpoint_apns_channel_test.go new file mode 100644 index 00000000000..0a5427ef076 --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_channel_test.go @@ -0,0 +1,257 @@ +package aws + +import ( + "fmt" + "os" + "strconv" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +/** + Before running this test, one of the following two ENV variables set must be defined. See here for details: + https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-mobile-manage.html + + * Key Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns ) + APNS_BUNDLE_ID - APNs Bundle ID + APNS_TEAM_ID - APNs Team ID + APNS_TOKEN_KEY - Token key file content (.p8 file) + APNS_TOKEN_KEY_ID - APNs Token Key ID + + * Certificate Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns ) + APNS_CERTIFICATE - APNs Certificate content (.pem file content) + APNS_CERTIFICATE_PRIVATE_KEY - APNs Certificate Private Key File content +**/ + +type testAccAwsPinpointAPNSChannelCertConfiguration struct { + Certificate string + PrivateKey string +} + +type testAccAwsPinpointAPNSChannelTokenConfiguration struct { + BundleId string + TeamId string + TokenKey string + TokenKeyId string +} + +func testAccAwsPinpointAPNSChannelCertConfigurationFromEnv(t *testing.T) *testAccAwsPinpointAPNSChannelCertConfiguration { + var conf *testAccAwsPinpointAPNSChannelCertConfiguration + if os.Getenv("APNS_CERTIFICATE") != "" { + if os.Getenv("APNS_CERTIFICATE_PRIVATE_KEY") == "" { + t.Fatalf("APNS_CERTIFICATE set but missing APNS_CERTIFICATE_PRIVATE_KEY") + } + + conf = &testAccAwsPinpointAPNSChannelCertConfiguration{ + Certificate: fmt.Sprintf("<> aws_pinpoint_adm_channel + > + aws_pinpoint_apns_channel + > aws_pinpoint_baidu_channel diff --git a/website/docs/r/pinpoint_apns_channel.markdown b/website/docs/r/pinpoint_apns_channel.markdown new file mode 100644 index 00000000000..91462829050 --- /dev/null +++ b/website/docs/r/pinpoint_apns_channel.markdown @@ -0,0 +1,59 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_apns_channel" +sidebar_current: "docs-aws-resource-pinpoint-apns-channel" +description: |- + Provides a Pinpoint APNs Channel resource. +--- + +# aws_pinpoint_apns_channel + +Provides a Pinpoint APNs Channel resource. + +~> **Note:** All arguments, including certificates and tokens, will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). + +## Example Usage + +```hcl +resource "aws_pinpoint_apns_channel" "apns" { + application_id = "${aws_pinpoint_app.app.application_id}" + + certificate = "${file("./certificate.pem")}" + private_key = "${file("./private_key.key")}" +} + +resource "aws_pinpoint_app" "app" {} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `enabled` - (Optional) Whether the channel is enabled or disabled. Defaults to `true`. +* `default_authentication_method` - (Optional) The default authentication method used for APNs. + __NOTE__: Amazon Pinpoint uses this default for every APNs push notification that you send using the console. + You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK. + If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type. + +One of the following sets of credentials is also required. + +If you choose to use __Certificate credentials__ you will have to provide: +* `certificate` - (Required) The pem encoded TLS Certificate from Apple. +* `private_key` - (Required) The Certificate Private Key file (ie. `.key` file). + +If you choose to use __Key credentials__ you will have to provide: +* `bundle_id` - (Required) The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app. +* `team_id` - (Required) The ID assigned to your Apple developer account team. This value is provided on the Membership page. +* `token_key` - (Required) The `.p8` file that you download from your Apple developer account when you create an authentication key. +* `token_key_id` - (Required) The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section. + +## Import + +Pinpoint APNs Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_apns_channel.apns application-id +``` From 896adcbb8fa33f35ee300591f94c1c7582b5570b Mon Sep 17 00:00:00 2001 From: "greg.gajda@digital.hmrc.gov.uk" Date: Thu, 18 Oct 2018 11:34:28 +0100 Subject: [PATCH 2926/3316] Post PR review updates --- aws/data_source_aws_cloudhsm2_cluster.go | 8 +- aws/provider.go | 580 +++++++++--------- aws/resource_aws_cloudhsm2_cluster.go | 73 +-- aws/resource_aws_cloudhsm2_cluster_test.go | 26 +- aws/resource_aws_cloudhsm2_hsm.go | 31 +- aws/resource_aws_cloudhsm2_hsm_test.go | 24 +- .../docs/d/cloudhsm_v2_cluster.html.markdown | 12 +- .../docs/r/cloudhsm_v2_cluster.html.markdown | 12 +- 8 files changed, 363 insertions(+), 403 deletions(-) diff --git a/aws/data_source_aws_cloudhsm2_cluster.go b/aws/data_source_aws_cloudhsm2_cluster.go index 7aaeda5fc34..57535f2c7cd 100644 --- a/aws/data_source_aws_cloudhsm2_cluster.go +++ b/aws/data_source_aws_cloudhsm2_cluster.go @@ -36,7 +36,8 @@ func dataSourceCloudHsm2Cluster() *schema.Resource { }, "cluster_certificates": { - Type: schema.TypeSet, + Type: schema.TypeList, + MaxItems: 1, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -113,9 +114,8 @@ func dataSourceCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) er d.Set("vpc_id", cluster.VpcId) d.Set("security_group_id", cluster.SecurityGroup) d.Set("cluster_state", cluster.State) - certs := readCloudHsm2ClusterCertificates(cluster) - if err := d.Set("cluster_certificates", certs); err != nil { - return err + if err := d.Set("cluster_certificates", readCloudHsm2ClusterCertificates(cluster)); err != nil { + return fmt.Errorf("error setting cluster_certificates: %s", err) } var subnets []string diff --git a/aws/provider.go b/aws/provider.go index c8443b0e92a..5fa47763f0e 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -396,296 +396,296 @@ func Provider() terraform.ResourceProvider { "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), - "aws_dx_lag": resourceAwsDxLag(), - "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), - "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), - "aws_dynamodb_table": resourceAwsDynamoDbTable(), - "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), - "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), - "aws_ec2_fleet": resourceAwsEc2Fleet(), - "aws_ebs_snapshot": resourceAwsEbsSnapshot(), - "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), - "aws_ebs_volume": resourceAwsEbsVolume(), - "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), - "aws_ecr_repository": resourceAwsEcrRepository(), - "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), - "aws_ecs_cluster": resourceAwsEcsCluster(), - "aws_ecs_service": resourceAwsEcsService(), - "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), - "aws_efs_file_system": resourceAwsEfsFileSystem(), - "aws_efs_mount_target": resourceAwsEfsMountTarget(), - "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), - "aws_eip": resourceAwsEip(), - "aws_eip_association": resourceAwsEipAssociation(), - "aws_eks_cluster": resourceAwsEksCluster(), - "aws_elasticache_cluster": resourceAwsElasticacheCluster(), - "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), - "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), - "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), - "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), - "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), - "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), - "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), - "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), - "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), - "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), - "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), - "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), - "aws_elb": resourceAwsElb(), - "aws_elb_attachment": resourceAwsElbAttachment(), - "aws_emr_cluster": resourceAwsEMRCluster(), - "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), - "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), - "aws_flow_log": resourceAwsFlowLog(), - "aws_gamelift_alias": resourceAwsGameliftAlias(), - "aws_gamelift_build": resourceAwsGameliftBuild(), - "aws_gamelift_fleet": resourceAwsGameliftFleet(), - "aws_glacier_vault": resourceAwsGlacierVault(), - "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), - "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), - "aws_glue_classifier": resourceAwsGlueClassifier(), - "aws_glue_connection": resourceAwsGlueConnection(), - "aws_glue_crawler": resourceAwsGlueCrawler(), - "aws_glue_job": resourceAwsGlueJob(), - "aws_glue_trigger": resourceAwsGlueTrigger(), - "aws_guardduty_detector": resourceAwsGuardDutyDetector(), - "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), - "aws_guardduty_member": resourceAwsGuardDutyMember(), - "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), - "aws_iam_access_key": resourceAwsIamAccessKey(), - "aws_iam_account_alias": resourceAwsIamAccountAlias(), - "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), - "aws_iam_group_policy": resourceAwsIamGroupPolicy(), - "aws_iam_group": resourceAwsIamGroup(), - "aws_iam_group_membership": resourceAwsIamGroupMembership(), - "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), - "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), - "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), - "aws_iam_policy": resourceAwsIamPolicy(), - "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), - "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), - "aws_iam_role_policy": resourceAwsIamRolePolicy(), - "aws_iam_role": resourceAwsIamRole(), - "aws_iam_saml_provider": resourceAwsIamSamlProvider(), - "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), - "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), - "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), - "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), - "aws_iam_user_policy": resourceAwsIamUserPolicy(), - "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), - "aws_iam_user": resourceAwsIamUser(), - "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), - "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), - "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), - "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), - "aws_instance": resourceAwsInstance(), - "aws_internet_gateway": resourceAwsInternetGateway(), - "aws_iot_certificate": resourceAwsIotCertificate(), - "aws_iot_policy": resourceAwsIotPolicy(), - "aws_iot_thing": resourceAwsIotThing(), - "aws_iot_thing_type": resourceAwsIotThingType(), - "aws_iot_topic_rule": resourceAwsIotTopicRule(), - "aws_key_pair": resourceAwsKeyPair(), - "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), - "aws_kinesis_stream": resourceAwsKinesisStream(), - "aws_kms_alias": resourceAwsKmsAlias(), - "aws_kms_grant": resourceAwsKmsGrant(), - "aws_kms_key": resourceAwsKmsKey(), - "aws_lambda_function": resourceAwsLambdaFunction(), - "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), - "aws_lambda_alias": resourceAwsLambdaAlias(), - "aws_lambda_permission": resourceAwsLambdaPermission(), - "aws_launch_configuration": resourceAwsLaunchConfiguration(), - "aws_launch_template": resourceAwsLaunchTemplate(), - "aws_lightsail_domain": resourceAwsLightsailDomain(), - "aws_lightsail_instance": resourceAwsLightsailInstance(), - "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), - "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), - "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), - "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), - "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), - "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), - "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), - "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), - "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), - "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), - "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), - "aws_mq_broker": resourceAwsMqBroker(), - "aws_mq_configuration": resourceAwsMqConfiguration(), - "aws_media_store_container": resourceAwsMediaStoreContainer(), - "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), - "aws_nat_gateway": resourceAwsNatGateway(), - "aws_network_acl": resourceAwsNetworkAcl(), - "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), - "aws_neptune_cluster": resourceAwsNeptuneCluster(), - "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), - "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), - "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), - "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), - "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), - "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), - "aws_network_acl_rule": resourceAwsNetworkAclRule(), - "aws_network_interface": resourceAwsNetworkInterface(), - "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), - "aws_opsworks_application": resourceAwsOpsworksApplication(), - "aws_opsworks_stack": resourceAwsOpsworksStack(), - "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), - "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), - "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), - "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), - "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), - "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), - "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), - "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), - "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), - "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), - "aws_opsworks_instance": resourceAwsOpsworksInstance(), - "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), - "aws_opsworks_permission": resourceAwsOpsworksPermission(), - "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), - "aws_organizations_organization": resourceAwsOrganizationsOrganization(), - "aws_organizations_account": resourceAwsOrganizationsAccount(), - "aws_organizations_policy": resourceAwsOrganizationsPolicy(), - "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), - "aws_placement_group": resourceAwsPlacementGroup(), - "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), - "aws_rds_cluster": resourceAwsRDSCluster(), - "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), - "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), - "aws_redshift_cluster": resourceAwsRedshiftCluster(), - "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), - "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), - "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), - "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), - "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), - "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), - "aws_route53_query_log": resourceAwsRoute53QueryLog(), - "aws_route53_record": resourceAwsRoute53Record(), - "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), - "aws_route53_zone": resourceAwsRoute53Zone(), - "aws_route53_health_check": resourceAwsRoute53HealthCheck(), - "aws_route": resourceAwsRoute(), - "aws_route_table": resourceAwsRouteTable(), - "aws_default_route_table": resourceAwsDefaultRouteTable(), - "aws_route_table_association": resourceAwsRouteTableAssociation(), - "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), - "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), - "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), - "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), - "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), - "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), - "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), - "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), - "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), - "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), - "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), - "aws_ses_event_destination": resourceAwsSesEventDestination(), - "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), - "aws_ses_template": resourceAwsSesTemplate(), - "aws_s3_bucket": resourceAwsS3Bucket(), - "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), - "aws_s3_bucket_object": resourceAwsS3BucketObject(), - "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), - "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), - "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), - "aws_security_group": resourceAwsSecurityGroup(), - "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), - "aws_default_security_group": resourceAwsDefaultSecurityGroup(), - "aws_security_group_rule": resourceAwsSecurityGroupRule(), - "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), - "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), - "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), - "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), - "aws_simpledb_domain": resourceAwsSimpleDBDomain(), - "aws_ssm_activation": resourceAwsSsmActivation(), - "aws_ssm_association": resourceAwsSsmAssociation(), - "aws_ssm_document": resourceAwsSsmDocument(), - "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), - "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), - "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), - "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), - "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), - "aws_ssm_parameter": resourceAwsSsmParameter(), - "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), - "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), - "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), - "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), - "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), - "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), - "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), - "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), - "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), - "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), - "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), - "aws_sqs_queue": resourceAwsSqsQueue(), - "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), - "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), - "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), - "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), - "aws_sns_topic": resourceAwsSnsTopic(), - "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), - "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), - "aws_sfn_activity": resourceAwsSfnActivity(), - "aws_sfn_state_machine": resourceAwsSfnStateMachine(), - "aws_default_subnet": resourceAwsDefaultSubnet(), - "aws_subnet": resourceAwsSubnet(), - "aws_swf_domain": resourceAwsSwfDomain(), - "aws_volume_attachment": resourceAwsVolumeAttachment(), - "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), - "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), - "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), - "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), - "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), - "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), - "aws_default_vpc": resourceAwsDefaultVpc(), - "aws_vpc": resourceAwsVpc(), - "aws_vpc_endpoint": resourceAwsVpcEndpoint(), - "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), - "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), - "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), - "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), - "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), - "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), - "aws_vpn_connection": resourceAwsVpnConnection(), - "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), - "aws_vpn_gateway": resourceAwsVpnGateway(), - "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), - "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), - "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), - "aws_waf_ipset": resourceAwsWafIPSet(), - "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), - "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), - "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), - "aws_waf_rule": resourceAwsWafRule(), - "aws_waf_rule_group": resourceAwsWafRuleGroup(), - "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), - "aws_waf_web_acl": resourceAwsWafWebAcl(), - "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), - "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), - "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), - "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), - "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), - "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), - "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), - "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), - "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), - "aws_wafregional_rule": resourceAwsWafRegionalRule(), - "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), - "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), - "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), - "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), - "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), - "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), - "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), - "aws_batch_job_definition": resourceAwsBatchJobDefinition(), - "aws_batch_job_queue": resourceAwsBatchJobQueue(), - "aws_pinpoint_app": resourceAwsPinpointApp(), - "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), - "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), - "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), - "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), - "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), - "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), + "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), + "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), + "aws_dynamodb_table": resourceAwsDynamoDbTable(), + "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), + "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ec2_fleet": resourceAwsEc2Fleet(), + "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), + "aws_ebs_volume": resourceAwsEbsVolume(), + "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), + "aws_ecr_repository": resourceAwsEcrRepository(), + "aws_ecr_repository_policy": resourceAwsEcrRepositoryPolicy(), + "aws_ecs_cluster": resourceAwsEcsCluster(), + "aws_ecs_service": resourceAwsEcsService(), + "aws_ecs_task_definition": resourceAwsEcsTaskDefinition(), + "aws_efs_file_system": resourceAwsEfsFileSystem(), + "aws_efs_mount_target": resourceAwsEfsMountTarget(), + "aws_egress_only_internet_gateway": resourceAwsEgressOnlyInternetGateway(), + "aws_eip": resourceAwsEip(), + "aws_eip_association": resourceAwsEipAssociation(), + "aws_eks_cluster": resourceAwsEksCluster(), + "aws_elasticache_cluster": resourceAwsElasticacheCluster(), + "aws_elasticache_parameter_group": resourceAwsElasticacheParameterGroup(), + "aws_elasticache_replication_group": resourceAwsElasticacheReplicationGroup(), + "aws_elasticache_security_group": resourceAwsElasticacheSecurityGroup(), + "aws_elasticache_subnet_group": resourceAwsElasticacheSubnetGroup(), + "aws_elastic_beanstalk_application": resourceAwsElasticBeanstalkApplication(), + "aws_elastic_beanstalk_application_version": resourceAwsElasticBeanstalkApplicationVersion(), + "aws_elastic_beanstalk_configuration_template": resourceAwsElasticBeanstalkConfigurationTemplate(), + "aws_elastic_beanstalk_environment": resourceAwsElasticBeanstalkEnvironment(), + "aws_elasticsearch_domain": resourceAwsElasticSearchDomain(), + "aws_elasticsearch_domain_policy": resourceAwsElasticSearchDomainPolicy(), + "aws_elastictranscoder_pipeline": resourceAwsElasticTranscoderPipeline(), + "aws_elastictranscoder_preset": resourceAwsElasticTranscoderPreset(), + "aws_elb": resourceAwsElb(), + "aws_elb_attachment": resourceAwsElbAttachment(), + "aws_emr_cluster": resourceAwsEMRCluster(), + "aws_emr_instance_group": resourceAwsEMRInstanceGroup(), + "aws_emr_security_configuration": resourceAwsEMRSecurityConfiguration(), + "aws_flow_log": resourceAwsFlowLog(), + "aws_gamelift_alias": resourceAwsGameliftAlias(), + "aws_gamelift_build": resourceAwsGameliftBuild(), + "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), + "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), + "aws_glue_classifier": resourceAwsGlueClassifier(), + "aws_glue_connection": resourceAwsGlueConnection(), + "aws_glue_crawler": resourceAwsGlueCrawler(), + "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_trigger": resourceAwsGlueTrigger(), + "aws_guardduty_detector": resourceAwsGuardDutyDetector(), + "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), + "aws_guardduty_member": resourceAwsGuardDutyMember(), + "aws_guardduty_threatintelset": resourceAwsGuardDutyThreatintelset(), + "aws_iam_access_key": resourceAwsIamAccessKey(), + "aws_iam_account_alias": resourceAwsIamAccountAlias(), + "aws_iam_account_password_policy": resourceAwsIamAccountPasswordPolicy(), + "aws_iam_group_policy": resourceAwsIamGroupPolicy(), + "aws_iam_group": resourceAwsIamGroup(), + "aws_iam_group_membership": resourceAwsIamGroupMembership(), + "aws_iam_group_policy_attachment": resourceAwsIamGroupPolicyAttachment(), + "aws_iam_instance_profile": resourceAwsIamInstanceProfile(), + "aws_iam_openid_connect_provider": resourceAwsIamOpenIDConnectProvider(), + "aws_iam_policy": resourceAwsIamPolicy(), + "aws_iam_policy_attachment": resourceAwsIamPolicyAttachment(), + "aws_iam_role_policy_attachment": resourceAwsIamRolePolicyAttachment(), + "aws_iam_role_policy": resourceAwsIamRolePolicy(), + "aws_iam_role": resourceAwsIamRole(), + "aws_iam_saml_provider": resourceAwsIamSamlProvider(), + "aws_iam_server_certificate": resourceAwsIAMServerCertificate(), + "aws_iam_service_linked_role": resourceAwsIamServiceLinkedRole(), + "aws_iam_user_group_membership": resourceAwsIamUserGroupMembership(), + "aws_iam_user_policy_attachment": resourceAwsIamUserPolicyAttachment(), + "aws_iam_user_policy": resourceAwsIamUserPolicy(), + "aws_iam_user_ssh_key": resourceAwsIamUserSshKey(), + "aws_iam_user": resourceAwsIamUser(), + "aws_iam_user_login_profile": resourceAwsIamUserLoginProfile(), + "aws_inspector_assessment_target": resourceAWSInspectorAssessmentTarget(), + "aws_inspector_assessment_template": resourceAWSInspectorAssessmentTemplate(), + "aws_inspector_resource_group": resourceAWSInspectorResourceGroup(), + "aws_instance": resourceAwsInstance(), + "aws_internet_gateway": resourceAwsInternetGateway(), + "aws_iot_certificate": resourceAwsIotCertificate(), + "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_type": resourceAwsIotThingType(), + "aws_iot_topic_rule": resourceAwsIotTopicRule(), + "aws_key_pair": resourceAwsKeyPair(), + "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), + "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kms_alias": resourceAwsKmsAlias(), + "aws_kms_grant": resourceAwsKmsGrant(), + "aws_kms_key": resourceAwsKmsKey(), + "aws_lambda_function": resourceAwsLambdaFunction(), + "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), + "aws_lambda_alias": resourceAwsLambdaAlias(), + "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_launch_configuration": resourceAwsLaunchConfiguration(), + "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_lightsail_domain": resourceAwsLightsailDomain(), + "aws_lightsail_instance": resourceAwsLightsailInstance(), + "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), + "aws_lightsail_static_ip": resourceAwsLightsailStaticIp(), + "aws_lightsail_static_ip_attachment": resourceAwsLightsailStaticIpAttachment(), + "aws_lb_cookie_stickiness_policy": resourceAwsLBCookieStickinessPolicy(), + "aws_load_balancer_policy": resourceAwsLoadBalancerPolicy(), + "aws_load_balancer_backend_server_policy": resourceAwsLoadBalancerBackendServerPolicies(), + "aws_load_balancer_listener_policy": resourceAwsLoadBalancerListenerPolicies(), + "aws_lb_ssl_negotiation_policy": resourceAwsLBSSLNegotiationPolicy(), + "aws_macie_member_account_association": resourceAwsMacieMemberAccountAssociation(), + "aws_macie_s3_bucket_association": resourceAwsMacieS3BucketAssociation(), + "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), + "aws_mq_broker": resourceAwsMqBroker(), + "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_store_container": resourceAwsMediaStoreContainer(), + "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), + "aws_nat_gateway": resourceAwsNatGateway(), + "aws_network_acl": resourceAwsNetworkAcl(), + "aws_default_network_acl": resourceAwsDefaultNetworkAcl(), + "aws_neptune_cluster": resourceAwsNeptuneCluster(), + "aws_neptune_cluster_instance": resourceAwsNeptuneClusterInstance(), + "aws_neptune_cluster_parameter_group": resourceAwsNeptuneClusterParameterGroup(), + "aws_neptune_cluster_snapshot": resourceAwsNeptuneClusterSnapshot(), + "aws_neptune_event_subscription": resourceAwsNeptuneEventSubscription(), + "aws_neptune_parameter_group": resourceAwsNeptuneParameterGroup(), + "aws_neptune_subnet_group": resourceAwsNeptuneSubnetGroup(), + "aws_network_acl_rule": resourceAwsNetworkAclRule(), + "aws_network_interface": resourceAwsNetworkInterface(), + "aws_network_interface_attachment": resourceAwsNetworkInterfaceAttachment(), + "aws_opsworks_application": resourceAwsOpsworksApplication(), + "aws_opsworks_stack": resourceAwsOpsworksStack(), + "aws_opsworks_java_app_layer": resourceAwsOpsworksJavaAppLayer(), + "aws_opsworks_haproxy_layer": resourceAwsOpsworksHaproxyLayer(), + "aws_opsworks_static_web_layer": resourceAwsOpsworksStaticWebLayer(), + "aws_opsworks_php_app_layer": resourceAwsOpsworksPhpAppLayer(), + "aws_opsworks_rails_app_layer": resourceAwsOpsworksRailsAppLayer(), + "aws_opsworks_nodejs_app_layer": resourceAwsOpsworksNodejsAppLayer(), + "aws_opsworks_memcached_layer": resourceAwsOpsworksMemcachedLayer(), + "aws_opsworks_mysql_layer": resourceAwsOpsworksMysqlLayer(), + "aws_opsworks_ganglia_layer": resourceAwsOpsworksGangliaLayer(), + "aws_opsworks_custom_layer": resourceAwsOpsworksCustomLayer(), + "aws_opsworks_instance": resourceAwsOpsworksInstance(), + "aws_opsworks_user_profile": resourceAwsOpsworksUserProfile(), + "aws_opsworks_permission": resourceAwsOpsworksPermission(), + "aws_opsworks_rds_db_instance": resourceAwsOpsworksRdsDbInstance(), + "aws_organizations_organization": resourceAwsOrganizationsOrganization(), + "aws_organizations_account": resourceAwsOrganizationsAccount(), + "aws_organizations_policy": resourceAwsOrganizationsPolicy(), + "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), + "aws_placement_group": resourceAwsPlacementGroup(), + "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_rds_cluster": resourceAwsRDSCluster(), + "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), + "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_redshift_cluster": resourceAwsRedshiftCluster(), + "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), + "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), + "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), + "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), + "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), + "aws_route53_query_log": resourceAwsRoute53QueryLog(), + "aws_route53_record": resourceAwsRoute53Record(), + "aws_route53_zone_association": resourceAwsRoute53ZoneAssociation(), + "aws_route53_zone": resourceAwsRoute53Zone(), + "aws_route53_health_check": resourceAwsRoute53HealthCheck(), + "aws_route": resourceAwsRoute(), + "aws_route_table": resourceAwsRouteTable(), + "aws_default_route_table": resourceAwsDefaultRouteTable(), + "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), + "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), + "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), + "aws_ses_domain_identity": resourceAwsSesDomainIdentity(), + "aws_ses_domain_identity_verification": resourceAwsSesDomainIdentityVerification(), + "aws_ses_domain_dkim": resourceAwsSesDomainDkim(), + "aws_ses_domain_mail_from": resourceAwsSesDomainMailFrom(), + "aws_ses_receipt_filter": resourceAwsSesReceiptFilter(), + "aws_ses_receipt_rule": resourceAwsSesReceiptRule(), + "aws_ses_receipt_rule_set": resourceAwsSesReceiptRuleSet(), + "aws_ses_configuration_set": resourceAwsSesConfigurationSet(), + "aws_ses_event_destination": resourceAwsSesEventDestination(), + "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), + "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_bucket": resourceAwsS3Bucket(), + "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_object": resourceAwsS3BucketObject(), + "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), + "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), + "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), + "aws_security_group": resourceAwsSecurityGroup(), + "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), + "aws_default_security_group": resourceAwsDefaultSecurityGroup(), + "aws_security_group_rule": resourceAwsSecurityGroupRule(), + "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), + "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), + "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), + "aws_simpledb_domain": resourceAwsSimpleDBDomain(), + "aws_ssm_activation": resourceAwsSsmActivation(), + "aws_ssm_association": resourceAwsSsmAssociation(), + "aws_ssm_document": resourceAwsSsmDocument(), + "aws_ssm_maintenance_window": resourceAwsSsmMaintenanceWindow(), + "aws_ssm_maintenance_window_target": resourceAwsSsmMaintenanceWindowTarget(), + "aws_ssm_maintenance_window_task": resourceAwsSsmMaintenanceWindowTask(), + "aws_ssm_patch_baseline": resourceAwsSsmPatchBaseline(), + "aws_ssm_patch_group": resourceAwsSsmPatchGroup(), + "aws_ssm_parameter": resourceAwsSsmParameter(), + "aws_ssm_resource_data_sync": resourceAwsSsmResourceDataSync(), + "aws_storagegateway_cache": resourceAwsStorageGatewayCache(), + "aws_storagegateway_cached_iscsi_volume": resourceAwsStorageGatewayCachedIscsiVolume(), + "aws_storagegateway_gateway": resourceAwsStorageGatewayGateway(), + "aws_storagegateway_nfs_file_share": resourceAwsStorageGatewayNfsFileShare(), + "aws_storagegateway_smb_file_share": resourceAwsStorageGatewaySmbFileShare(), + "aws_storagegateway_upload_buffer": resourceAwsStorageGatewayUploadBuffer(), + "aws_storagegateway_working_storage": resourceAwsStorageGatewayWorkingStorage(), + "aws_spot_datafeed_subscription": resourceAwsSpotDataFeedSubscription(), + "aws_spot_instance_request": resourceAwsSpotInstanceRequest(), + "aws_spot_fleet_request": resourceAwsSpotFleetRequest(), + "aws_sqs_queue": resourceAwsSqsQueue(), + "aws_sqs_queue_policy": resourceAwsSqsQueuePolicy(), + "aws_snapshot_create_volume_permission": resourceAwsSnapshotCreateVolumePermission(), + "aws_sns_platform_application": resourceAwsSnsPlatformApplication(), + "aws_sns_sms_preferences": resourceAwsSnsSmsPreferences(), + "aws_sns_topic": resourceAwsSnsTopic(), + "aws_sns_topic_policy": resourceAwsSnsTopicPolicy(), + "aws_sns_topic_subscription": resourceAwsSnsTopicSubscription(), + "aws_sfn_activity": resourceAwsSfnActivity(), + "aws_sfn_state_machine": resourceAwsSfnStateMachine(), + "aws_default_subnet": resourceAwsDefaultSubnet(), + "aws_subnet": resourceAwsSubnet(), + "aws_swf_domain": resourceAwsSwfDomain(), + "aws_volume_attachment": resourceAwsVolumeAttachment(), + "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), + "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), + "aws_vpc_dhcp_options": resourceAwsVpcDhcpOptions(), + "aws_vpc_peering_connection": resourceAwsVpcPeeringConnection(), + "aws_vpc_peering_connection_accepter": resourceAwsVpcPeeringConnectionAccepter(), + "aws_vpc_peering_connection_options": resourceAwsVpcPeeringConnectionOptions(), + "aws_default_vpc": resourceAwsDefaultVpc(), + "aws_vpc": resourceAwsVpc(), + "aws_vpc_endpoint": resourceAwsVpcEndpoint(), + "aws_vpc_endpoint_connection_notification": resourceAwsVpcEndpointConnectionNotification(), + "aws_vpc_endpoint_route_table_association": resourceAwsVpcEndpointRouteTableAssociation(), + "aws_vpc_endpoint_subnet_association": resourceAwsVpcEndpointSubnetAssociation(), + "aws_vpc_endpoint_service": resourceAwsVpcEndpointService(), + "aws_vpc_endpoint_service_allowed_principal": resourceAwsVpcEndpointServiceAllowedPrincipal(), + "aws_vpc_ipv4_cidr_block_association": resourceAwsVpcIpv4CidrBlockAssociation(), + "aws_vpn_connection": resourceAwsVpnConnection(), + "aws_vpn_connection_route": resourceAwsVpnConnectionRoute(), + "aws_vpn_gateway": resourceAwsVpnGateway(), + "aws_vpn_gateway_attachment": resourceAwsVpnGatewayAttachment(), + "aws_vpn_gateway_route_propagation": resourceAwsVpnGatewayRoutePropagation(), + "aws_waf_byte_match_set": resourceAwsWafByteMatchSet(), + "aws_waf_ipset": resourceAwsWafIPSet(), + "aws_waf_rate_based_rule": resourceAwsWafRateBasedRule(), + "aws_waf_regex_match_set": resourceAwsWafRegexMatchSet(), + "aws_waf_regex_pattern_set": resourceAwsWafRegexPatternSet(), + "aws_waf_rule": resourceAwsWafRule(), + "aws_waf_rule_group": resourceAwsWafRuleGroup(), + "aws_waf_size_constraint_set": resourceAwsWafSizeConstraintSet(), + "aws_waf_web_acl": resourceAwsWafWebAcl(), + "aws_waf_xss_match_set": resourceAwsWafXssMatchSet(), + "aws_waf_sql_injection_match_set": resourceAwsWafSqlInjectionMatchSet(), + "aws_waf_geo_match_set": resourceAwsWafGeoMatchSet(), + "aws_wafregional_byte_match_set": resourceAwsWafRegionalByteMatchSet(), + "aws_wafregional_geo_match_set": resourceAwsWafRegionalGeoMatchSet(), + "aws_wafregional_ipset": resourceAwsWafRegionalIPSet(), + "aws_wafregional_rate_based_rule": resourceAwsWafRegionalRateBasedRule(), + "aws_wafregional_regex_match_set": resourceAwsWafRegionalRegexMatchSet(), + "aws_wafregional_regex_pattern_set": resourceAwsWafRegionalRegexPatternSet(), + "aws_wafregional_rule": resourceAwsWafRegionalRule(), + "aws_wafregional_rule_group": resourceAwsWafRegionalRuleGroup(), + "aws_wafregional_size_constraint_set": resourceAwsWafRegionalSizeConstraintSet(), + "aws_wafregional_sql_injection_match_set": resourceAwsWafRegionalSqlInjectionMatchSet(), + "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), + "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), + "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), + "aws_batch_job_definition": resourceAwsBatchJobDefinition(), + "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_pinpoint_app": resourceAwsPinpointApp(), + "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), + "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), + "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), + "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), + "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point diff --git a/aws/resource_aws_cloudhsm2_cluster.go b/aws/resource_aws_cloudhsm2_cluster.go index 51d7a838678..be666fef0de 100644 --- a/aws/resource_aws_cloudhsm2_cluster.go +++ b/aws/resource_aws_cloudhsm2_cluster.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "github.com/hashicorp/terraform/helper/validation" "log" "time" @@ -19,7 +20,7 @@ func resourceAwsCloudHsm2Cluster() *schema.Resource { Update: resourceAwsCloudHsm2ClusterUpdate, Delete: resourceAwsCloudHsm2ClusterDelete, Importer: &schema.ResourceImporter{ - State: resourceAwsCloudHsm2ClusterImport, + State: schema.ImportStatePassthrough, }, Timeouts: &schema.ResourceTimeout{ @@ -29,19 +30,18 @@ func resourceAwsCloudHsm2Cluster() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "backup_identifier": { + "source_backup_identifier": { Type: schema.TypeString, Computed: false, Optional: true, ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, }, "hsm_type": { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateCloudHsm2HsmType, + ValidateFunc: validation.StringInSlice([]string{"hsm1.medium"}, false), }, "subnet_ids": { @@ -63,7 +63,8 @@ func resourceAwsCloudHsm2Cluster() *schema.Resource { }, "cluster_certificates": { - Type: schema.TypeSet, + Type: schema.TypeList, + MaxItems: 1, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -106,15 +107,7 @@ func resourceAwsCloudHsm2Cluster() *schema.Resource { } } -func resourceAwsCloudHsm2ClusterImport( - d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - d.Set("cluster_id", d.Id()) - return []*schema.ResourceData{d}, nil -} - -func describeCloudHsm2Cluster(clusterId string, meta interface{}) (*cloudhsmv2.Cluster, error) { - conn := meta.(*AWSClient).cloudhsmv2conn - +func describeCloudHsm2Cluster(conn *cloudhsmv2.CloudHSMV2, clusterId string) (*cloudhsmv2.Cluster, error) { filters := []*string{&clusterId} result := int64(1) out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{ @@ -133,43 +126,37 @@ func describeCloudHsm2Cluster(clusterId string, meta interface{}) (*cloudhsmv2.C for _, c := range out.Clusters { if aws.StringValue(c.ClusterId) == clusterId { cluster = c + break } } return cluster, nil } -func resourceAwsCloudHsm2ClusterRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { +func resourceAwsCloudHsm2ClusterRefreshFunc(conn *cloudhsmv2.CloudHSMV2, clusterId string) resource.StateRefreshFunc { return func() (interface{}, string, error) { - cluster, err := describeCloudHsm2Cluster(d.Id(), meta) + cluster, err := describeCloudHsm2Cluster(conn, clusterId) if cluster == nil { return 42, "destroyed", nil } if cluster.State != nil { - log.Printf("[DEBUG] CloudHSMv2 Cluster status (%s): %s", d.Id(), *cluster.State) + log.Printf("[DEBUG] CloudHSMv2 Cluster status (%s): %s", clusterId, *cluster.State) } - return cluster, *cluster.State, err + return cluster, aws.StringValue(cluster.State), err } } func resourceAwsCloudHsm2ClusterCreate(d *schema.ResourceData, meta interface{}) error { cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn - subnetIdsSet := d.Get("subnet_ids").(*schema.Set) - subnetIds := make([]*string, subnetIdsSet.Len()) - for i, subnetId := range subnetIdsSet.List() { - subnetIds[i] = aws.String(subnetId.(string)) - } - input := &cloudhsmv2.CreateClusterInput{ HsmType: aws.String(d.Get("hsm_type").(string)), - SubnetIds: subnetIds, + SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), } - backupId := d.Get("backup_identifier").(string) + backupId := d.Get("source_backup_identifier").(string) if len(backupId) != 0 { input.SourceBackupId = aws.String(backupId) } @@ -192,7 +179,7 @@ func resourceAwsCloudHsm2ClusterCreate(d *schema.ResourceData, meta interface{}) }) if err != nil { - return err + return fmt.Errorf("error creating CloudHSMv2 Cluster: %s", err) } d.SetId(aws.StringValue(output.Cluster.ClusterId)) @@ -207,7 +194,7 @@ func resourceAwsCloudHsm2ClusterCreate(d *schema.ResourceData, meta interface{}) stateConf := &resource.StateChangeConf{ Pending: []string{cloudhsmv2.ClusterStateCreateInProgress, cloudhsmv2.ClusterStateInitializeInProgress}, Target: []string{targetState}, - Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(d, meta), + Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(cloudhsm2, d.Id()), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 30 * time.Second, Delay: 30 * time.Second, @@ -232,7 +219,7 @@ func resourceAwsCloudHsm2ClusterCreate(d *schema.ResourceData, meta interface{}) func resourceAwsCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) error { - cluster, err := describeCloudHsm2Cluster(d.Id(), meta) + cluster, err := describeCloudHsm2Cluster(meta.(*AWSClient).cloudhsmv2conn, d.Id()) if cluster == nil { log.Printf("[WARN] CloudHSMv2 Cluster (%s) not found", d.Id()) @@ -246,16 +233,18 @@ func resourceAwsCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) e d.Set("cluster_state", cluster.State) d.Set("security_group_id", cluster.SecurityGroup) d.Set("vpc_id", cluster.VpcId) - d.Set("backup_identifier", cluster.SourceBackupId) + d.Set("source_backup_identifier", cluster.SourceBackupId) d.Set("hsm_type", cluster.HsmType) - d.Set("cluster_certificate", readCloudHsm2ClusterCertificates(cluster)) + if err := d.Set("cluster_certificates", readCloudHsm2ClusterCertificates(cluster)); err != nil { + return fmt.Errorf("error setting cluster_certificates: %s", err) + } var subnets []string for _, sn := range cluster.SubnetMapping { - subnets = append(subnets, *sn) + subnets = append(subnets, aws.StringValue(sn)) } if err := d.Set("subnet_ids", subnets); err != nil { - return fmt.Errorf("[DEBUG] Error saving Subnet IDs to state for CloudHSMv2 Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error saving Subnet IDs to state for CloudHSMv2 Cluster (%s): %s", d.Id(), err) } return nil @@ -274,11 +263,10 @@ func resourceAwsCloudHsm2ClusterUpdate(d *schema.ResourceData, meta interface{}) func resourceAwsCloudHsm2ClusterDelete(d *schema.ResourceData, meta interface{}) error { cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn - var output *cloudhsmv2.DeleteClusterOutput log.Printf("[DEBUG] CloudHSMv2 Delete cluster: %s", d.Id()) err := resource.Retry(180*time.Second, func() *resource.RetryError { var err error - output, err = cloudhsm2.DeleteCluster(&cloudhsmv2.DeleteClusterInput{ + _, err = cloudhsm2.DeleteCluster(&cloudhsmv2.DeleteClusterInput{ ClusterId: aws.String(d.Id()), }) if err != nil { @@ -299,7 +287,7 @@ func resourceAwsCloudHsm2ClusterDelete(d *schema.ResourceData, meta interface{}) stateConf := &resource.StateChangeConf{ Pending: []string{cloudhsmv2.ClusterStateDeleteInProgress}, Target: []string{cloudhsmv2.ClusterStateDeleted}, - Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(d, meta), + Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(cloudhsm2, d.Id()), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 30 * time.Second, Delay: 30 * time.Second, @@ -308,7 +296,7 @@ func resourceAwsCloudHsm2ClusterDelete(d *schema.ResourceData, meta interface{}) // Wait, catching any errors _, errWait := stateConf.WaitForState() if errWait != nil { - return fmt.Errorf("[WARN] Error waiting for CloudHSMv2 Cluster state to be \"DELETED\": %s", errWait) + return fmt.Errorf("Error waiting for CloudHSMv2 Cluster state to be \"DELETED\": %s", errWait) } return nil @@ -356,15 +344,6 @@ func setTagsAwsCloudHsm2Cluster(conn *cloudhsmv2.CloudHSMV2, d *schema.ResourceD return nil } -func validateCloudHsm2HsmType(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - hsmType := "hsm1.medium" - if value != hsmType { - errors = append(errors, fmt.Errorf("there is only %s HSM type available", hsmType)) - } - return -} - func readCloudHsm2ClusterCertificates(cluster *cloudhsmv2.Cluster) []map[string]interface{} { certs := map[string]interface{}{} if cluster.Certificates != nil { diff --git a/aws/resource_aws_cloudhsm2_cluster_test.go b/aws/resource_aws_cloudhsm2_cluster_test.go index 928a42d3948..917310ca05a 100644 --- a/aws/resource_aws_cloudhsm2_cluster_test.go +++ b/aws/resource_aws_cloudhsm2_cluster_test.go @@ -26,19 +26,6 @@ func TestAccAWSCloudHsm2Cluster_basic(t *testing.T) { resource.TestCheckResourceAttrSet("aws_cloudhsm_v2_cluster.cluster", "cluster_state"), ), }, - }, - }) -} - -func TestAccAWSCloudHsm2Cluster_importBasic(t *testing.T) { - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCloudHsm2ClusterDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSCloudHsm2Cluster(), - }, { ResourceName: "aws_cloudhsm_v2_cluster.cluster", ImportState: true, @@ -93,14 +80,14 @@ func testAccCheckAWSCloudHsm2ClusterDestroy(s *terraform.State) error { if rs.Type != "aws_cloudhsm_v2_cluster" { continue } - cluster, err := describeCloudHsm2Cluster(rs.Primary.ID, testAccProvider.Meta()) + cluster, err := describeCloudHsm2Cluster(testAccProvider.Meta().(*AWSClient).cloudhsmv2conn, rs.Primary.ID) if err != nil { return err } if cluster != nil && aws.StringValue(cluster.State) != "DELETED" { - return fmt.Errorf("CloudHSM cluster still exists:\n%s", cluster) + return fmt.Errorf("CloudHSM cluster still exists %s", cluster) } } @@ -109,11 +96,18 @@ func testAccCheckAWSCloudHsm2ClusterDestroy(s *terraform.State) error { func testAccCheckAWSCloudHsm2ClusterExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + conn := testAccProvider.Meta().(*AWSClient).cloudhsmv2conn + it, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } + _, err := describeCloudHsm2Cluster(conn, it.Primary.ID) + + if err != nil { + return fmt.Errorf("CloudHSM cluster not found: %s", err) + } + return nil } } diff --git a/aws/resource_aws_cloudhsm2_hsm.go b/aws/resource_aws_cloudhsm2_hsm.go index 57a364edf19..0bb93ff97ec 100644 --- a/aws/resource_aws_cloudhsm2_hsm.go +++ b/aws/resource_aws_cloudhsm2_hsm.go @@ -16,7 +16,6 @@ func resourceAwsCloudHsm2Hsm() *schema.Resource { return &schema.Resource{ Create: resourceAwsCloudHsm2HsmCreate, Read: resourceAwsCloudHsm2HsmRead, - Update: resourceAwsCloudHsm2HsmUpdate, Delete: resourceAwsCloudHsm2HsmDelete, Importer: &schema.ResourceImporter{ State: resourceAwsCloudHsm2HsmImport, @@ -39,6 +38,7 @@ func resourceAwsCloudHsm2Hsm() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, + ForceNew: true, }, "availability_zone": { @@ -79,7 +79,7 @@ func resourceAwsCloudHsm2HsmImport( return []*schema.ResourceData{d}, nil } -func describeHsm(id string, conn *cloudhsmv2.CloudHSMV2) (*cloudhsmv2.Hsm, error) { +func describeHsm(conn *cloudhsmv2.CloudHSMV2, hsmId string) (*cloudhsmv2.Hsm, error) { out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{}) if err != nil { log.Printf("[WARN] Error on descibing CloudHSM v2 Cluster: %s", err) @@ -90,7 +90,7 @@ func describeHsm(id string, conn *cloudhsmv2.CloudHSMV2) (*cloudhsmv2.Hsm, error for _, c := range out.Clusters { for _, h := range c.Hsms { - if *h.HsmId == id { + if aws.StringValue(h.HsmId) == hsmId { hsm = h break } @@ -103,7 +103,7 @@ func describeHsm(id string, conn *cloudhsmv2.CloudHSMV2) (*cloudhsmv2.Hsm, error func resourceAwsCloudHsm2HsmRefreshFunc( d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { return func() (interface{}, string, error) { - hsm, err := describeHsm(d.Id(), meta.(*AWSClient).cloudhsmv2conn) + hsm, err := describeHsm(meta.(*AWSClient).cloudhsmv2conn, d.Id()) if hsm == nil { return 42, "destroyed", nil @@ -113,7 +113,7 @@ func resourceAwsCloudHsm2HsmRefreshFunc( log.Printf("[DEBUG] CloudHSMv2 Cluster status (%s): %s", d.Id(), *hsm.State) } - return hsm, *hsm.State, err + return hsm, aws.StringValue(hsm.State), err } } @@ -122,7 +122,7 @@ func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) err clusterId := d.Get("cluster_id").(string) - cluster, err := describeCloudHsm2Cluster(clusterId, meta) + cluster, err := describeCloudHsm2Cluster(cloudhsm2, clusterId) if cluster == nil { log.Printf("[WARN] Error on retrieving CloudHSMv2 Cluster: %s %s", clusterId, err) @@ -167,7 +167,7 @@ func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) err }) if errRetry != nil { - return errRetry + return fmt.Errorf("error creating CloudHSM v2 HSM module: %s", errRetry) } d.SetId(aws.StringValue(output.Hsm.HsmId)) @@ -186,7 +186,7 @@ func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) err // Wait, catching any errors _, errWait := stateConf.WaitForState() if errWait != nil { - return fmt.Errorf("[WARN] Error waiting for CloudHSMv2 HSM state to be \"ACTIVE\": %s", errWait) + return fmt.Errorf("Error waiting for CloudHSMv2 HSM state to be \"ACTIVE\": %s", errWait) } return resourceAwsCloudHsm2HsmRead(d, meta) @@ -194,7 +194,7 @@ func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) err func resourceAwsCloudHsm2HsmRead(d *schema.ResourceData, meta interface{}) error { - hsm, err := describeHsm(d.Id(), meta.(*AWSClient).cloudhsmv2conn) + hsm, err := describeHsm(meta.(*AWSClient).cloudhsmv2conn, d.Id()) if hsm == nil { log.Printf("[WARN] CloudHSMv2 HSM (%s) not found", d.Id()) @@ -215,22 +215,15 @@ func resourceAwsCloudHsm2HsmRead(d *schema.ResourceData, meta interface{}) error return nil } -func resourceAwsCloudHsm2HsmUpdate(d *schema.ResourceData, meta interface{}) error { - //nothing to update in here - return resourceAwsCloudHsm2HsmRead(d, meta) -} - func resourceAwsCloudHsm2HsmDelete(d *schema.ResourceData, meta interface{}) error { cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn clusterId := d.Get("cluster_id").(string) log.Printf("[DEBUG] CloudHSMv2 HSM delete %s %s", clusterId, d.Id()) - var output *cloudhsmv2.DeleteHsmOutput - errRetry := resource.Retry(180*time.Second, func() *resource.RetryError { var err error - output, err = cloudhsm2.DeleteHsm(&cloudhsmv2.DeleteHsmInput{ + _, err = cloudhsm2.DeleteHsm(&cloudhsmv2.DeleteHsmInput{ ClusterId: aws.String(clusterId), HsmId: aws.String(d.Id()), }) @@ -245,7 +238,7 @@ func resourceAwsCloudHsm2HsmDelete(d *schema.ResourceData, meta interface{}) err }) if errRetry != nil { - return errRetry + return fmt.Errorf("error deleting CloudHSM v2 HSM module (%s): %s", d.Id(), errRetry) } log.Println("[INFO] Waiting for CloudHSMv2 HSM to be deleted") @@ -261,7 +254,7 @@ func resourceAwsCloudHsm2HsmDelete(d *schema.ResourceData, meta interface{}) err // Wait, catching any errors _, errWait := stateConf.WaitForState() if errWait != nil { - return fmt.Errorf("[WARN] Error waiting for CloudHSMv2 HSM state to be \"DELETED\": %s", errWait) + return fmt.Errorf("Error waiting for CloudHSMv2 HSM state to be \"DELETED\": %s", errWait) } return nil diff --git a/aws/resource_aws_cloudhsm2_hsm_test.go b/aws/resource_aws_cloudhsm2_hsm_test.go index 4f094836636..310d8169f59 100644 --- a/aws/resource_aws_cloudhsm2_hsm_test.go +++ b/aws/resource_aws_cloudhsm2_hsm_test.go @@ -26,19 +26,6 @@ func TestAccAWSCloudHsm2Hsm_basic(t *testing.T) { resource.TestCheckResourceAttrSet("aws_cloudhsm_v2_hsm.hsm", "ip_address"), ), }, - }, - }) -} - -func TestAccAWSCloudHsm2Hsm_importBasic(t *testing.T) { - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSCloudHsm2HsmDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSCloudHsm2Hsm(), - }, { ResourceName: "aws_cloudhsm_v2_hsm.hsm", ImportState: true, @@ -100,7 +87,7 @@ func testAccCheckAWSCloudHsm2HsmDestroy(s *terraform.State) error { continue } - hsm, err := describeHsm(rs.Primary.ID, conn) + hsm, err := describeHsm(conn, rs.Primary.ID) if err != nil { return err @@ -116,11 +103,18 @@ func testAccCheckAWSCloudHsm2HsmDestroy(s *terraform.State) error { func testAccCheckAWSCloudHsm2HsmExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + conn := testAccProvider.Meta().(*AWSClient).cloudhsmv2conn + + it, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } + _, err := describeHsm(conn, it.Primary.ID) + if err != nil { + return fmt.Errorf("CloudHSM cluster not found: %s", err) + } + return nil } } diff --git a/website/docs/d/cloudhsm_v2_cluster.html.markdown b/website/docs/d/cloudhsm_v2_cluster.html.markdown index acac1fa122d..ef4ae3f2ed0 100644 --- a/website/docs/d/cloudhsm_v2_cluster.html.markdown +++ b/website/docs/d/cloudhsm_v2_cluster.html.markdown @@ -31,10 +31,10 @@ The following attributes are exported: * `vpc_id` - The id of the VPC that the CloudHSM cluster resides in. * `security_group_id` - The ID of the security group associated with the CloudHSM cluster. * `subnet_ids` - The IDs of subnets in which cluster operates. -* `cluster_certificates` - The set of cluster certificates. - * `cluster_certificates.#.cluster_certificate` - The cluster certificate issued (signed) by the issuing certificate authority (CA) of the cluster's owner. - * `cluster_certificates.#.cluster_csr` - The certificate signing request (CSR). Available only in UNINITIALIZED state. - * `cluster_certificates.#.aws_hardware_certificate` - The HSM hardware certificate issued (signed) by AWS CloudHSM. - * `cluster_certificates.#.hsm_certificate` - The HSM certificate issued (signed) by the HSM hardware. - * `cluster_certificates.#.manufacturer_hardware_certificate` - The HSM hardware certificate issued (signed) by the hardware manufacturer. +* `cluster_certificates` - The list of cluster certificates. + * `cluster_certificates.0.cluster_certificate` - The cluster certificate issued (signed) by the issuing certificate authority (CA) of the cluster's owner. + * `cluster_certificates.0.cluster_csr` - The certificate signing request (CSR). Available only in UNINITIALIZED state. + * `cluster_certificates.0.aws_hardware_certificate` - The HSM hardware certificate issued (signed) by AWS CloudHSM. + * `cluster_certificates.0.hsm_certificate` - The HSM certificate issued (signed) by the HSM hardware. + * `cluster_certificates.0.manufacturer_hardware_certificate` - The HSM hardware certificate issued (signed) by the hardware manufacturer. The number of available cluster certificates may vary depending on state of the cluster. \ No newline at end of file diff --git a/website/docs/r/cloudhsm_v2_cluster.html.markdown b/website/docs/r/cloudhsm_v2_cluster.html.markdown index f95c54a11eb..e8af59357ea 100644 --- a/website/docs/r/cloudhsm_v2_cluster.html.markdown +++ b/website/docs/r/cloudhsm_v2_cluster.html.markdown @@ -62,7 +62,7 @@ resource "aws_cloudhsm_v2_cluster" "cloudhsm_v2_cluster" { The following arguments are supported: -* `backup_identifier` - (Optional) The id of Cloud HSM v2 cluster backup to be restored. +* `source_backup_identifier` - (Optional) The id of Cloud HSM v2 cluster backup to be restored. * `hsm_type` - (Required) The type of HSM module in the cluster. Currently, only hsm1.medium is supported. * `subnet_ids` - (Required) The IDs of subnets in which cluster will operate. @@ -75,11 +75,11 @@ The following attributes are exported: * `vpc_id` - The id of the VPC that the CloudHSM cluster resides in. * `security_group_id` - The ID of the security group associated with the CloudHSM cluster. * `cluster_certificates` - The list of cluster certificates. - * `cluster_certificates.#.cluster_certificate` - The cluster certificate issued (signed) by the issuing certificate authority (CA) of the cluster's owner. - * `cluster_certificates.#.cluster_csr` - The certificate signing request (CSR). Available only in UNINITIALIZED state. - * `cluster_certificates.#.aws_hardware_certificate` - The HSM hardware certificate issued (signed) by AWS CloudHSM. - * `cluster_certificates.#.hsm_certificate` - The HSM certificate issued (signed) by the HSM hardware. - * `cluster_certificates.#.manufacturer_hardware_certificate` - The HSM hardware certificate issued (signed) by the hardware manufacturer. + * `cluster_certificates.0.cluster_certificate` - The cluster certificate issued (signed) by the issuing certificate authority (CA) of the cluster's owner. + * `cluster_certificates.0.cluster_csr` - The certificate signing request (CSR). Available only in UNINITIALIZED state. + * `cluster_certificates.0.aws_hardware_certificate` - The HSM hardware certificate issued (signed) by AWS CloudHSM. + * `cluster_certificates.0.hsm_certificate` - The HSM certificate issued (signed) by the HSM hardware. + * `cluster_certificates.0.manufacturer_hardware_certificate` - The HSM hardware certificate issued (signed) by the hardware manufacturer. [1]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/introduction.html [2]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/Welcome.html \ No newline at end of file From 233fd58cb53db5bb2851323a0eab614362a2fa3b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 12 Oct 2018 12:40:33 -0400 Subject: [PATCH 2927/3316] resource/aws_appsync_graphql_api: Various enhancements and properly handle updates * Support logging configuration * Support `OPENID_CONNECT` authentication * Make Cognito User Pool AWS Region configuration optional * Add `uris` attribute * Properly handle updates by passing all parameters ``` $ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppsyncGraphqlApi_' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSAppsyncGraphqlApi_ -timeout 120m === RUN TestAccAWSAppsyncGraphqlApi_basic --- PASS: TestAccAWSAppsyncGraphqlApi_basic (10.12s) === RUN TestAccAWSAppsyncGraphqlApi_AuthenticationType --- PASS: TestAccAWSAppsyncGraphqlApi_AuthenticationType (14.83s) === RUN TestAccAWSAppsyncGraphqlApi_AuthenticationType_APIKey --- PASS: TestAccAWSAppsyncGraphqlApi_AuthenticationType_APIKey (11.27s) === RUN TestAccAWSAppsyncGraphqlApi_AuthenticationType_AWSIAM --- PASS: TestAccAWSAppsyncGraphqlApi_AuthenticationType_AWSIAM (8.65s) === RUN TestAccAWSAppsyncGraphqlApi_AuthenticationType_AmazonCognitoUserPools --- PASS: TestAccAWSAppsyncGraphqlApi_AuthenticationType_AmazonCognitoUserPools (13.12s) === RUN TestAccAWSAppsyncGraphqlApi_AuthenticationType_OpenIDConnect --- PASS: TestAccAWSAppsyncGraphqlApi_AuthenticationType_OpenIDConnect (9.29s) === RUN TestAccAWSAppsyncGraphqlApi_LogConfig --- PASS: TestAccAWSAppsyncGraphqlApi_LogConfig (11.77s) === RUN TestAccAWSAppsyncGraphqlApi_LogConfig_FieldLogLevel --- PASS: TestAccAWSAppsyncGraphqlApi_LogConfig_FieldLogLevel (23.29s) === RUN TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_AuthTTL --- PASS: TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_AuthTTL (21.16s) === RUN TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_ClientID --- PASS: TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_ClientID (16.24s) === RUN TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_IatTTL --- PASS: TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_IatTTL (16.75s) === RUN TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_Issuer --- PASS: TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_Issuer (15.49s) === RUN TestAccAWSAppsyncGraphqlApi_Name --- PASS: TestAccAWSAppsyncGraphqlApi_Name (15.78s) === RUN TestAccAWSAppsyncGraphqlApi_UserPoolConfig_AwsRegion --- PASS: TestAccAWSAppsyncGraphqlApi_UserPoolConfig_AwsRegion (22.30s) === RUN TestAccAWSAppsyncGraphqlApi_UserPoolConfig_DefaultAction --- PASS: TestAccAWSAppsyncGraphqlApi_UserPoolConfig_DefaultAction (18.79s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 231.295s ``` --- aws/resource_aws_appsync_graphql_api.go | 223 ++++++- aws/resource_aws_appsync_graphql_api_test.go | 604 +++++++++++++++++- .../docs/r/appsync_graphql_api.html.markdown | 101 ++- 3 files changed, 863 insertions(+), 65 deletions(-) diff --git a/aws/resource_aws_appsync_graphql_api.go b/aws/resource_aws_appsync_graphql_api.go index 5a6b8a1e5fa..74d962eb6a2 100644 --- a/aws/resource_aws_appsync_graphql_api.go +++ b/aws/resource_aws_appsync_graphql_api.go @@ -30,6 +30,7 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { appsync.AuthenticationTypeApiKey, appsync.AuthenticationTypeAwsIam, appsync.AuthenticationTypeAmazonCognitoUserPools, + appsync.AuthenticationTypeOpenidConnect, }, false), }, "name": { @@ -43,6 +44,53 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { return }, }, + "log_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cloudwatch_logs_role_arn": { + Type: schema.TypeString, + Required: true, + }, + "field_log_level": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + appsync.FieldLogLevelAll, + appsync.FieldLogLevelError, + appsync.FieldLogLevelNone, + }, false), + }, + }, + }, + }, + "openid_connect_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auth_ttl": { + Type: schema.TypeInt, + Optional: true, + }, + "client_id": { + Type: schema.TypeString, + Optional: true, + }, + "iat_ttl": { + Type: schema.TypeInt, + Optional: true, + }, + "issuer": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "user_pool_config": { Type: schema.TypeList, Optional: true, @@ -55,7 +103,8 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { }, "aws_region": { Type: schema.TypeString, - Required: true, + Optional: true, + Computed: true, }, "default_action": { Type: schema.TypeString, @@ -76,6 +125,11 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "uris": { + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, } } @@ -88,8 +142,16 @@ func resourceAwsAppsyncGraphqlApiCreate(d *schema.ResourceData, meta interface{} Name: aws.String(d.Get("name").(string)), } + if v, ok := d.GetOk("log_config"); ok { + input.LogConfig = expandAppsyncGraphqlApiLogConfig(v.([]interface{})) + } + + if v, ok := d.GetOk("openid_connect_config"); ok { + input.OpenIDConnectConfig = expandAppsyncGraphqlApiOpenIDConnectConfig(v.([]interface{})) + } + if v, ok := d.GetOk("user_pool_config"); ok { - input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{})) + input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{}), meta.(*AWSClient).region) } resp, err := conn.CreateGraphqlApi(input) @@ -98,8 +160,8 @@ func resourceAwsAppsyncGraphqlApiCreate(d *schema.ResourceData, meta interface{} } d.SetId(*resp.GraphqlApi.ApiId) - d.Set("arn", resp.GraphqlApi.Arn) - return nil + + return resourceAwsAppsyncGraphqlApiRead(d, meta) } func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) error { @@ -119,10 +181,26 @@ func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) return err } + d.Set("arn", resp.GraphqlApi.Arn) d.Set("authentication_type", resp.GraphqlApi.AuthenticationType) d.Set("name", resp.GraphqlApi.Name) - d.Set("user_pool_config", flattenAppsyncGraphqlApiUserPoolConfig(resp.GraphqlApi.UserPoolConfig)) - d.Set("arn", resp.GraphqlApi.Arn) + + if err := d.Set("log_config", flattenAppsyncGraphqlApiLogConfig(resp.GraphqlApi.LogConfig)); err != nil { + return fmt.Errorf("error setting log_config: %s", err) + } + + if err := d.Set("openid_connect_config", flattenAppsyncGraphqlApiOpenIDConnectConfig(resp.GraphqlApi.OpenIDConnectConfig)); err != nil { + return fmt.Errorf("error setting openid_connect_config: %s", err) + } + + if err := d.Set("user_pool_config", flattenAppsyncGraphqlApiUserPoolConfig(resp.GraphqlApi.UserPoolConfig)); err != nil { + return fmt.Errorf("error setting user_pool_config: %s", err) + } + + if err := d.Set("uris", aws.StringValueMap(resp.GraphqlApi.Uris)); err != nil { + return fmt.Errorf("error setting uris") + } + return nil } @@ -130,15 +208,21 @@ func resourceAwsAppsyncGraphqlApiUpdate(d *schema.ResourceData, meta interface{} conn := meta.(*AWSClient).appsyncconn input := &appsync.UpdateGraphqlApiInput{ - ApiId: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(d.Id()), + AuthenticationType: aws.String(d.Get("authentication_type").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("log_config"); ok { + input.LogConfig = expandAppsyncGraphqlApiLogConfig(v.([]interface{})) } - if d.HasChange("authentication_type") { - input.AuthenticationType = aws.String(d.Get("authentication_type").(string)) + if v, ok := d.GetOk("openid_connect_config"); ok { + input.OpenIDConnectConfig = expandAppsyncGraphqlApiOpenIDConnectConfig(v.([]interface{})) } - if d.HasChange("user_pool_config") { - input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(d.Get("user_pool_config").([]interface{})) + + if v, ok := d.GetOk("user_pool_config"); ok { + input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{}), meta.(*AWSClient).region) } _, err := conn.UpdateGraphqlApi(input) @@ -166,33 +250,112 @@ func resourceAwsAppsyncGraphqlApiDelete(d *schema.ResourceData, meta interface{} return nil } -func expandAppsyncGraphqlApiUserPoolConfig(config []interface{}) *appsync.UserPoolConfig { - if len(config) < 1 { +func expandAppsyncGraphqlApiLogConfig(l []interface{}) *appsync.LogConfig { + if len(l) < 1 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + logConfig := &appsync.LogConfig{ + CloudWatchLogsRoleArn: aws.String(m["cloudwatch_logs_role_arn"].(string)), + FieldLogLevel: aws.String(m["field_log_level"].(string)), + } + + return logConfig +} + +func expandAppsyncGraphqlApiOpenIDConnectConfig(l []interface{}) *appsync.OpenIDConnectConfig { + if len(l) < 1 || l[0] == nil { return nil } - cg := config[0].(map[string]interface{}) - upc := &appsync.UserPoolConfig{ - AwsRegion: aws.String(cg["aws_region"].(string)), - DefaultAction: aws.String(cg["default_action"].(string)), - UserPoolId: aws.String(cg["user_pool_id"].(string)), + + m := l[0].(map[string]interface{}) + + openIDConnectConfig := &appsync.OpenIDConnectConfig{ + Issuer: aws.String(m["issuer"].(string)), + } + + if v, ok := m["auth_ttl"].(int); ok && v != 0 { + openIDConnectConfig.AuthTTL = aws.Int64(int64(v)) + } + + if v, ok := m["client_id"].(string); ok && v != "" { + openIDConnectConfig.ClientId = aws.String(v) } - if v, ok := cg["app_id_client_regex"].(string); ok && v != "" { - upc.AppIdClientRegex = aws.String(v) + + if v, ok := m["iat_ttl"].(int); ok && v != 0 { + openIDConnectConfig.IatTTL = aws.Int64(int64(v)) } - return upc + + return openIDConnectConfig } -func flattenAppsyncGraphqlApiUserPoolConfig(upc *appsync.UserPoolConfig) []interface{} { - if upc == nil { +func expandAppsyncGraphqlApiUserPoolConfig(l []interface{}, currentRegion string) *appsync.UserPoolConfig { + if len(l) < 1 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + userPoolConfig := &appsync.UserPoolConfig{ + AwsRegion: aws.String(currentRegion), + DefaultAction: aws.String(m["default_action"].(string)), + UserPoolId: aws.String(m["user_pool_id"].(string)), + } + + if v, ok := m["app_id_client_regex"].(string); ok && v != "" { + userPoolConfig.AppIdClientRegex = aws.String(v) + } + + if v, ok := m["aws_region"].(string); ok && v != "" { + userPoolConfig.AwsRegion = aws.String(v) + } + + return userPoolConfig +} + +func flattenAppsyncGraphqlApiLogConfig(logConfig *appsync.LogConfig) []interface{} { + if logConfig == nil { return []interface{}{} } - m := make(map[string]interface{}, 1) - m["aws_region"] = *upc.AwsRegion - m["default_action"] = *upc.DefaultAction - m["user_pool_id"] = *upc.UserPoolId - if upc.AppIdClientRegex != nil { - m["app_id_client_regex"] = *upc.AppIdClientRegex + m := map[string]interface{}{ + "cloudwatch_logs_role_arn": aws.StringValue(logConfig.CloudWatchLogsRoleArn), + "field_log_level": aws.StringValue(logConfig.FieldLogLevel), + } + + return []interface{}{m} +} + +func flattenAppsyncGraphqlApiOpenIDConnectConfig(openIDConnectConfig *appsync.OpenIDConnectConfig) []interface{} { + if openIDConnectConfig == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "auth_ttl": aws.Int64Value(openIDConnectConfig.AuthTTL), + "client_id": aws.StringValue(openIDConnectConfig.ClientId), + "iat_ttl": aws.Int64Value(openIDConnectConfig.IatTTL), + "issuer": aws.StringValue(openIDConnectConfig.Issuer), + } + + return []interface{}{m} +} + +func flattenAppsyncGraphqlApiUserPoolConfig(userPoolConfig *appsync.UserPoolConfig) []interface{} { + if userPoolConfig == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "aws_region": aws.StringValue(userPoolConfig.AwsRegion), + "default_action": aws.StringValue(userPoolConfig.DefaultAction), + "user_pool_id": aws.StringValue(userPoolConfig.UserPoolId), + } + + if userPoolConfig.AppIdClientRegex != nil { + m["app_id_client_regex"] = aws.StringValue(userPoolConfig.AppIdClientRegex) } return []interface{}{m} diff --git a/aws/resource_aws_appsync_graphql_api_test.go b/aws/resource_aws_appsync_graphql_api_test.go index 16d147bfb81..4b565116c9b 100644 --- a/aws/resource_aws_appsync_graphql_api_test.go +++ b/aws/resource_aws_appsync_graphql_api_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -12,58 +13,212 @@ import ( ) func TestAccAWSAppsyncGraphqlApi_basic(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_AuthenticationType(rName, "API_KEY"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "appsync", regexp.MustCompile(`apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "API_KEY"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "log_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.#", "0"), + resource.TestCheckResourceAttrSet(resourceName, "uris.%"), + resource.TestCheckResourceAttrSet(resourceName, "uris.GRAPHQL"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_AuthenticationType(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_AuthenticationType(rName, "API_KEY"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "API_KEY"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_AuthenticationType(rName, "AWS_IAM"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "AWS_IAM"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_AuthenticationType_APIKey(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_AuthenticationType(rName, "API_KEY"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "appsync", regexp.MustCompile(`apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "API_KEY"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_AuthenticationType_AWSIAM(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_AuthenticationType(rName, "AWS_IAM"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "appsync", regexp.MustCompile(`apis/.+`)), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "AWS_IAM"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_AuthenticationType_AmazonCognitoUserPools(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + cognitoUserPoolResourceName := "aws_cognito_user_pool.test" + resourceName := "aws_appsync_graphql_api.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncGraphqlApiConfig_apikey(acctest.RandString(5)), + Config: testAccAppsyncGraphqlApiConfig_UserPoolConfig_DefaultAction(rName, "ALLOW"), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncGraphqlApiExists("aws_appsync_graphql_api.test_apikey"), - resource.TestCheckResourceAttrSet("aws_appsync_graphql_api.test_apikey", "arn"), + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "AMAZON_COGNITO_USER_POOLS"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.aws_region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.default_action", "ALLOW"), + resource.TestCheckResourceAttrPair(resourceName, "user_pool_config.0.user_pool_id", cognitoUserPoolResourceName, "id"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAWSAppsyncGraphqlApi_iam(t *testing.T) { +func TestAccAWSAppsyncGraphqlApi_AuthenticationType_OpenIDConnect(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncGraphqlApiConfig_iam(acctest.RandString(5)), + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_Issuer(rName, "https://example.com"), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncGraphqlApiExists("aws_appsync_graphql_api.test_iam"), - resource.TestCheckResourceAttrSet("aws_appsync_graphql_api.test_iam", "arn"), + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAWSAppsyncGraphqlApi_cognito(t *testing.T) { +func TestAccAWSAppsyncGraphqlApi_LogConfig(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + iamRoleResourceName := "aws_iam_role.test" + resourceName := "aws_appsync_graphql_api.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncGraphqlApiConfig_cognito(acctest.RandString(5)), + Config: testAccAppsyncGraphqlApiConfig_LogConfig_FieldLogLevel(rName, "ALL"), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncGraphqlApiExists("aws_appsync_graphql_api.test_cognito"), - resource.TestCheckResourceAttrSet("aws_appsync_graphql_api.test_cognito", "arn"), + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ALL"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAWSAppsyncGraphqlApi_import(t *testing.T) { - resourceName := "aws_appsync_graphql_api.test_apikey" +func TestAccAWSAppsyncGraphqlApi_LogConfig_FieldLogLevel(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + iamRoleResourceName := "aws_iam_role.test" + resourceName := "aws_appsync_graphql_api.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -71,7 +226,291 @@ func TestAccAWSAppsyncGraphqlApi_import(t *testing.T) { CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncGraphqlApiConfig_apikey(acctest.RandString(5)), + Config: testAccAppsyncGraphqlApiConfig_LogConfig_FieldLogLevel(rName, "ALL"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ALL"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_LogConfig_FieldLogLevel(rName, "ERROR"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "ERROR"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_LogConfig_FieldLogLevel(rName, "NONE"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "log_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "log_config.0.cloudwatch_logs_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_config.0.field_log_level", "NONE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_AuthTTL(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_AuthTTL(rName, 1000), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.auth_ttl", "1000"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_AuthTTL(rName, 2000), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.auth_ttl", "2000"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_ClientID(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_ClientID(rName, "ClientID1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.client_id", "ClientID1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_ClientID(rName, "ClientID2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.client_id", "ClientID2"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_IatTTL(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_IatTTL(rName, 1000), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.iat_ttl", "1000"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_IatTTL(rName, 2000), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.iat_ttl", "2000"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_OpenIDConnectConfig_Issuer(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_Issuer(rName, "https://example.com"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.com"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_OpenIDConnectConfig_Issuer(rName, "https://example.org"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "OPENID_CONNECT"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "openid_connect_config.0.issuer", "https://example.org"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_Name(t *testing.T) { + rName1 := acctest.RandomWithPrefix("tf-acc-test") + rName2 := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_AuthenticationType(rName1, "API_KEY"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName1), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_AuthenticationType(rName2, "API_KEY"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "name", rName2), + ), + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_UserPoolConfig_AwsRegion(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + cognitoUserPoolResourceName := "aws_cognito_user_pool.test" + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_UserPoolConfig_AwsRegion(rName, testAccGetRegion()), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "AMAZON_COGNITO_USER_POOLS"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.aws_region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.default_action", "ALLOW"), + resource.TestCheckResourceAttrPair(resourceName, "user_pool_config.0.user_pool_id", cognitoUserPoolResourceName, "id"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_UserPoolConfig_DefaultAction(rName, "ALLOW"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "AMAZON_COGNITO_USER_POOLS"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.aws_region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.default_action", "ALLOW"), + resource.TestCheckResourceAttrPair(resourceName, "user_pool_config.0.user_pool_id", cognitoUserPoolResourceName, "id"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSAppsyncGraphqlApi_UserPoolConfig_DefaultAction(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + cognitoUserPoolResourceName := "aws_cognito_user_pool.test" + resourceName := "aws_appsync_graphql_api.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncGraphqlApiDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncGraphqlApiConfig_UserPoolConfig_DefaultAction(rName, "ALLOW"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "AMAZON_COGNITO_USER_POOLS"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.aws_region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.default_action", "ALLOW"), + resource.TestCheckResourceAttrPair(resourceName, "user_pool_config.0.user_pool_id", cognitoUserPoolResourceName, "id"), + ), + }, + { + Config: testAccAppsyncGraphqlApiConfig_UserPoolConfig_DefaultAction(rName, "DENY"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncGraphqlApiExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "authentication_type", "AMAZON_COGNITO_USER_POOLS"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.aws_region", testAccGetRegion()), + resource.TestCheckResourceAttr(resourceName, "user_pool_config.0.default_action", "DENY"), + resource.TestCheckResourceAttrPair(resourceName, "user_pool_config.0.user_pool_id", cognitoUserPoolResourceName, "id"), + ), }, { ResourceName: resourceName, @@ -126,42 +565,143 @@ func testAccCheckAwsAppsyncGraphqlApiExists(name string) resource.TestCheckFunc } } -func testAccAppsyncGraphqlApiConfig_apikey(rName string) string { +func testAccAppsyncGraphqlApiConfig_AuthenticationType(rName, authenticationType string) string { return fmt.Sprintf(` -resource "aws_appsync_graphql_api" "test_apikey" { +resource "aws_appsync_graphql_api" "test" { + authentication_type = %q + name = %q +} +`, authenticationType, rName) +} + +func testAccAppsyncGraphqlApiConfig_LogConfig_FieldLogLevel(rName, fieldLogLevel string) string { + return fmt.Sprintf(` +data "aws_partition" "current" {} + +resource "aws_iam_role" "test" { + name = %q + + assume_role_policy = < Date: Thu, 18 Oct 2018 09:24:59 -0400 Subject: [PATCH 2928/3316] Update CHANGELOG for #6138 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3bd722bbd..931b16503af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ FEATURES: ENHANCEMENTS: +* resource/aws_appsync_graphql_api: Add `log_config` argument [GH-6138] +* resource/aws_appsync_graphql_api: Add `openid_connect_config` argument [GH-6138] +* resource/aws_appsync_graphql_api: Add `uris` attribute [GH-6138] +* resource/aws_appsync_graphql_api: Make `user_pool_config` `aws_region` configuration optional based on resource current region [GH-6138] * resource/aws_athena_database: Add `encryption_configuration` argument [GH-6117] * resource/aws_cloudwatch_metric_alarm: Validate `alarm_actions` [GH-6151] * resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` [GH-6140] @@ -16,6 +20,7 @@ ENHANCEMENTS: BUG FIXES: +* resource/aws_appsync_graphql_api: Properly handle updates by passing all parameters [GH-6138] * resource/aws_lb_listener: Prevent unconfigured `default_action` `order` from showing difference [GH-6119] * resource/aws_lb_listener_rule: Prevent unconfigured `action` `order` from showing difference [GH-6119] * resource/aws_lb_listener_rule: Retry read for eventual consistency after resource creation [GH-6154] From bdbf42c7e1f3fed65b20adba8a325ea7a9e4c96c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 12 Oct 2018 14:46:49 -0400 Subject: [PATCH 2929/3316] resource/aws_appsync_datasource: Various enhancements * Support resource import * Support HTTP type * Make region optional for dynamodb_config and elasticsearch_config ``` --- PASS: TestAccAwsAppsyncDatasource_basic (11.88s) --- PASS: TestAccAwsAppsyncDatasource_Description (48.21s) --- PASS: TestAccAwsAppsyncDatasource_DynamoDBConfig_Region (121.27s) --- PASS: TestAccAwsAppsyncDatasource_DynamoDBConfig_UseCallerCredentials (121.21s) --- PASS: TestAccAwsAppsyncDatasource_ElasticsearchConfig_Region (720.27s) --- PASS: TestAccAwsAppsyncDatasource_HTTPConfig_Endpoint (18.03s) --- PASS: TestAccAwsAppsyncDatasource_Type (17.29s) --- PASS: TestAccAwsAppsyncDatasource_Type_DynamoDB (110.94s) --- PASS: TestAccAwsAppsyncDatasource_Type_Elasticsearch (773.89s) --- PASS: TestAccAwsAppsyncDatasource_Type_HTTP (11.83s) --- PASS: TestAccAwsAppsyncDatasource_Type_Lambda (30.19s) --- PASS: TestAccAwsAppsyncDatasource_Type_None (11.14s) ``` --- aws/resource_aws_appsync_datasource.go | 232 +++++-- aws/resource_aws_appsync_datasource_test.go | 651 +++++++++++++++--- .../docs/r/appsync_datasource.html.markdown | 37 +- 3 files changed, 745 insertions(+), 175 deletions(-) diff --git a/aws/resource_aws_appsync_datasource.go b/aws/resource_aws_appsync_datasource.go index 72163d29ffe..5fdce8b9b2e 100644 --- a/aws/resource_aws_appsync_datasource.go +++ b/aws/resource_aws_appsync_datasource.go @@ -18,6 +18,9 @@ func resourceAwsAppsyncDatasource() *schema.Resource { Read: resourceAwsAppsyncDatasourceRead, Update: resourceAwsAppsyncDatasourceUpdate, Delete: resourceAwsAppsyncDatasourceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "api_id": { @@ -42,6 +45,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { appsync.DataSourceTypeAwsLambda, appsync.DataSourceTypeAmazonDynamodb, appsync.DataSourceTypeAmazonElasticsearch, + appsync.DataSourceTypeHttp, appsync.DataSourceTypeNone, }, true), StateFunc: func(v interface{}) string { @@ -60,7 +64,8 @@ func resourceAwsAppsyncDatasource() *schema.Resource { Schema: map[string]*schema.Schema{ "region": { Type: schema.TypeString, - Required: true, + Optional: true, + Computed: true, }, "table_name": { Type: schema.TypeString, @@ -72,7 +77,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { }, }, }, - ConflictsWith: []string{"elasticsearch_config", "lambda_config"}, + ConflictsWith: []string{"elasticsearch_config", "http_config", "lambda_config"}, }, "elasticsearch_config": { Type: schema.TypeList, @@ -81,16 +86,31 @@ func resourceAwsAppsyncDatasource() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "region": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "endpoint": { Type: schema.TypeString, Required: true, }, + }, + }, + ConflictsWith: []string{"dynamodb_config", "http_config", "lambda_config"}, + }, + "http_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ "endpoint": { Type: schema.TypeString, Required: true, }, }, }, - ConflictsWith: []string{"dynamodb_config", "lambda_config"}, + ConflictsWith: []string{"dynamodb_config", "elasticsearch_config", "lambda_config"}, }, "lambda_config": { Type: schema.TypeList, @@ -104,7 +124,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { }, }, }, - ConflictsWith: []string{"dynamodb_config", "elasticsearch_config"}, + ConflictsWith: []string{"dynamodb_config", "elasticsearch_config", "http_config"}, }, "service_role_arn": { Type: schema.TypeString, @@ -120,6 +140,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { func resourceAwsAppsyncDatasourceCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + region := meta.(*AWSClient).region input := &appsync.CreateDataSourceInput{ ApiId: aws.String(d.Get("api_id").(string)), @@ -131,39 +152,48 @@ func resourceAwsAppsyncDatasourceCreate(d *schema.ResourceData, meta interface{} input.Description = aws.String(v.(string)) } - if v, ok := d.GetOk("service_role_arn"); ok { - input.ServiceRoleArn = aws.String(v.(string)) + if v, ok := d.GetOk("dynamodb_config"); ok { + input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(v.([]interface{}), region) } - ddbconfig := d.Get("dynamodb_config").([]interface{}) - if len(ddbconfig) > 0 { - input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(ddbconfig[0].(map[string]interface{})) + if v, ok := d.GetOk("elasticsearch_config"); ok { + input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(v.([]interface{}), region) } - esconfig := d.Get("elasticsearch_config").([]interface{}) - if len(esconfig) > 0 { - input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(esconfig[0].(map[string]interface{})) + + if v, ok := d.GetOk("http_config"); ok { + input.HttpConfig = expandAppsyncHTTPDataSourceConfig(v.([]interface{})) } - lambdaconfig := d.Get("lambda_config").([]interface{}) - if len(lambdaconfig) > 0 { - input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(lambdaconfig[0].(map[string]interface{})) + + if v, ok := d.GetOk("lambda_config"); ok { + input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(v.([]interface{})) } - resp, err := conn.CreateDataSource(input) + if v, ok := d.GetOk("service_role_arn"); ok { + input.ServiceRoleArn = aws.String(v.(string)) + } + + _, err := conn.CreateDataSource(input) if err != nil { return err } d.SetId(d.Get("api_id").(string) + "-" + d.Get("name").(string)) - d.Set("arn", resp.DataSource.DataSourceArn) - return nil + + return resourceAwsAppsyncDatasourceRead(d, meta) } func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + apiID, name, err := decodeAppsyncDataSourceID(d.Id()) + + if err != nil { + return err + } + input := &appsync.GetDataSourceInput{ - ApiId: aws.String(d.Get("api_id").(string)), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(apiID), + Name: aws.String(name), } resp, err := conn.GetDataSource(input) @@ -176,11 +206,26 @@ func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) return err } + d.Set("api_id", apiID) d.Set("arn", resp.DataSource.DataSourceArn) d.Set("description", resp.DataSource.Description) - d.Set("dynamodb_config", flattenAppsyncDynamodbDataSourceConfig(resp.DataSource.DynamodbConfig)) - d.Set("elasticsearch_config", flattenAppsyncElasticsearchDataSourceConfig(resp.DataSource.ElasticsearchConfig)) - d.Set("lambda_config", flattenAppsyncLambdaDataSourceConfig(resp.DataSource.LambdaConfig)) + + if err := d.Set("dynamodb_config", flattenAppsyncDynamodbDataSourceConfig(resp.DataSource.DynamodbConfig)); err != nil { + return fmt.Errorf("error setting dynamodb_config: %s", err) + } + + if err := d.Set("elasticsearch_config", flattenAppsyncElasticsearchDataSourceConfig(resp.DataSource.ElasticsearchConfig)); err != nil { + return fmt.Errorf("error setting elasticsearch_config: %s", err) + } + + if err := d.Set("http_config", flattenAppsyncHTTPDataSourceConfig(resp.DataSource.HttpConfig)); err != nil { + return fmt.Errorf("error setting http_config: %s", err) + } + + if err := d.Set("lambda_config", flattenAppsyncLambdaDataSourceConfig(resp.DataSource.LambdaConfig)); err != nil { + return fmt.Errorf("error setting lambda_config: %s", err) + } + d.Set("name", resp.DataSource.Name) d.Set("service_role_arn", resp.DataSource.ServiceRoleArn) d.Set("type", resp.DataSource.Type) @@ -190,10 +235,17 @@ func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) func resourceAwsAppsyncDatasourceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + region := meta.(*AWSClient).region + + apiID, name, err := decodeAppsyncDataSourceID(d.Id()) + + if err != nil { + return err + } input := &appsync.UpdateDataSourceInput{ - ApiId: aws.String(d.Get("api_id").(string)), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(apiID), + Name: aws.String(name), Type: aws.String(d.Get("type").(string)), } @@ -201,24 +253,27 @@ func resourceAwsAppsyncDatasourceUpdate(d *schema.ResourceData, meta interface{} input.Description = aws.String(v.(string)) } - if v, ok := d.GetOk("service_role_arn"); ok { - input.ServiceRoleArn = aws.String(v.(string)) + if v, ok := d.GetOk("dynamodb_config"); ok { + input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(v.([]interface{}), region) } - ddbconfig := d.Get("dynamodb_config").([]interface{}) - if len(ddbconfig) > 0 { - input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(ddbconfig[0].(map[string]interface{})) + if v, ok := d.GetOk("elasticsearch_config"); ok { + input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(v.([]interface{}), region) } - esconfig := d.Get("elasticsearch_config").([]interface{}) - if len(esconfig) > 0 { - input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(esconfig[0].(map[string]interface{})) + + if v, ok := d.GetOk("http_config"); ok { + input.HttpConfig = expandAppsyncHTTPDataSourceConfig(v.([]interface{})) } - lambdaconfig := d.Get("lambda_config").([]interface{}) - if len(lambdaconfig) > 0 { - input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(lambdaconfig[0].(map[string]interface{})) + + if v, ok := d.GetOk("lambda_config"); ok { + input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(v.([]interface{})) } - _, err := conn.UpdateDataSource(input) + if v, ok := d.GetOk("service_role_arn"); ok { + input.ServiceRoleArn = aws.String(v.(string)) + } + + _, err = conn.UpdateDataSource(input) if err != nil { return err } @@ -228,12 +283,18 @@ func resourceAwsAppsyncDatasourceUpdate(d *schema.ResourceData, meta interface{} func resourceAwsAppsyncDatasourceDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + apiID, name, err := decodeAppsyncDataSourceID(d.Id()) + + if err != nil { + return err + } + input := &appsync.DeleteDataSourceInput{ - ApiId: aws.String(d.Get("api_id").(string)), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(apiID), + Name: aws.String(name), } - _, err := conn.DeleteDataSource(input) + _, err = conn.DeleteDataSource(input) if err != nil { if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { return nil @@ -244,12 +305,30 @@ func resourceAwsAppsyncDatasourceDelete(d *schema.ResourceData, meta interface{} return nil } -func expandAppsyncDynamodbDataSourceConfig(configured map[string]interface{}) *appsync.DynamodbDataSourceConfig { +func decodeAppsyncDataSourceID(id string) (string, string, error) { + idParts := strings.SplitN(id, "-", 2) + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format ApiID-DataSourceName, received: %s", id) + } + return idParts[0], idParts[1], nil +} + +func expandAppsyncDynamodbDataSourceConfig(l []interface{}, currentRegion string) *appsync.DynamodbDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) + result := &appsync.DynamodbDataSourceConfig{ - AwsRegion: aws.String(configured["region"].(string)), + AwsRegion: aws.String(currentRegion), TableName: aws.String(configured["table_name"].(string)), } + if v, ok := configured["region"]; ok && v.(string) != "" { + result.AwsRegion = aws.String(v.(string)) + } + if v, ok := configured["use_caller_credentials"]; ok { result.UseCallerCredentials = aws.Bool(v.(bool)) } @@ -262,23 +341,34 @@ func flattenAppsyncDynamodbDataSourceConfig(config *appsync.DynamodbDataSourceCo return nil } - result := map[string]interface{}{} + result := map[string]interface{}{ + "region": aws.StringValue(config.AwsRegion), + "table_name": aws.StringValue(config.TableName), + } - result["region"] = *config.AwsRegion - result["table_name"] = *config.TableName if config.UseCallerCredentials != nil { - result["use_caller_credentials"] = *config.UseCallerCredentials + result["use_caller_credentials"] = aws.BoolValue(config.UseCallerCredentials) } return []map[string]interface{}{result} } -func expandAppsyncElasticsearchDataSourceConfig(configured map[string]interface{}) *appsync.ElasticsearchDataSourceConfig { +func expandAppsyncElasticsearchDataSourceConfig(l []interface{}, currentRegion string) *appsync.ElasticsearchDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) + result := &appsync.ElasticsearchDataSourceConfig{ - AwsRegion: aws.String(configured["region"].(string)), + AwsRegion: aws.String(currentRegion), Endpoint: aws.String(configured["endpoint"].(string)), } + if v, ok := configured["region"]; ok && v.(string) != "" { + result.AwsRegion = aws.String(v.(string)) + } + return result } @@ -287,15 +377,47 @@ func flattenAppsyncElasticsearchDataSourceConfig(config *appsync.ElasticsearchDa return nil } - result := map[string]interface{}{} + result := map[string]interface{}{ + "endpoint": aws.StringValue(config.Endpoint), + "region": aws.StringValue(config.AwsRegion), + } + + return []map[string]interface{}{result} +} + +func expandAppsyncHTTPDataSourceConfig(l []interface{}) *appsync.HttpDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) + + result := &appsync.HttpDataSourceConfig{ + Endpoint: aws.String(configured["endpoint"].(string)), + } + + return result +} - result["region"] = *config.AwsRegion - result["endpoint"] = *config.Endpoint +func flattenAppsyncHTTPDataSourceConfig(config *appsync.HttpDataSourceConfig) []map[string]interface{} { + if config == nil { + return nil + } + + result := map[string]interface{}{ + "endpoint": aws.StringValue(config.Endpoint), + } return []map[string]interface{}{result} } -func expandAppsyncLambdaDataSourceConfig(configured map[string]interface{}) *appsync.LambdaDataSourceConfig { +func expandAppsyncLambdaDataSourceConfig(l []interface{}) *appsync.LambdaDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) + result := &appsync.LambdaDataSourceConfig{ LambdaFunctionArn: aws.String(configured["function_arn"].(string)), } @@ -308,9 +430,9 @@ func flattenAppsyncLambdaDataSourceConfig(config *appsync.LambdaDataSourceConfig return nil } - result := map[string]interface{}{} - - result["function_arn"] = *config.LambdaFunctionArn + result := map[string]interface{}{ + "function_arn": aws.StringValue(config.LambdaFunctionArn), + } return []map[string]interface{}{result} } diff --git a/aws/resource_aws_appsync_datasource_test.go b/aws/resource_aws_appsync_datasource_test.go index 55b32188a1b..5e09d4850b7 100644 --- a/aws/resource_aws_appsync_datasource_test.go +++ b/aws/resource_aws_appsync_datasource_test.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "regexp" "testing" "github.com/aws/aws-sdk-go/aws" @@ -11,108 +12,374 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAwsAppsyncDatasource_ddb(t *testing.T) { +func TestAccAwsAppsyncDatasource_basic(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncDatasourceConfig_ddb(acctest.RandString(5)), + Config: testAccAppsyncDatasourceConfig_Type_None(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), - resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + testAccCheckAwsAppsyncDatasourceExists(resourceName), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "appsync", regexp.MustCompile(fmt.Sprintf("apis/.+/datasources/%s", rName))), + resource.TestCheckResourceAttr(resourceName, "description", ""), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "http_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "lambda_config.#", "0"), + resource.TestCheckResourceAttr(resourceName, "name", rName), + resource.TestCheckResourceAttr(resourceName, "type", "NONE"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAwsAppsyncDatasource_es(t *testing.T) { +func TestAccAwsAppsyncDatasource_Description(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncDatasourceConfig_es(acctest.RandString(5)), + Config: testAccAppsyncDatasourceConfig_Description(rName, "description1"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "description1"), + ), + }, + { + Config: testAccAppsyncDatasourceConfig_Description(rName, "description2"), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), - resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "description2"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAwsAppsyncDatasource_lambda(t *testing.T) { - Desc := "appsync datasource" +func TestAccAwsAppsyncDatasource_DynamoDBConfig_Region(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncDatasourceConfig_lambda(acctest.RandString(5), Desc), + Config: testAccAppsyncDatasourceConfig_DynamoDBConfig_Region(rName, testAccGetRegion()), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.0.region", testAccGetRegion()), + ), + }, + { + Config: testAccAppsyncDatasourceConfig_Type_DynamoDB(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), - resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.0.region", testAccGetRegion()), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAwsAppsyncDatasource_update(t *testing.T) { - rName := acctest.RandString(5) +func TestAccAwsAppsyncDatasource_DynamoDBConfig_UseCallerCredentials(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncDatasourceConfig_ddb(rName), + Config: testAccAppsyncDatasourceConfig_DynamoDBConfig_UseCallerCredentials(rName, true), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), - resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), - resource.TestCheckResourceAttr("aws_appsync_datasource.test", "type", "AMAZON_DYNAMODB"), - resource.TestCheckResourceAttr("aws_appsync_datasource.test", "description", "appsync datasource"), + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.0.use_caller_credentials", "true"), ), }, { - Config: testAccAppsyncDatasourceConfig_lambda(rName, "appsync datasource"), + Config: testAccAppsyncDatasourceConfig_DynamoDBConfig_UseCallerCredentials(rName, false), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), - resource.TestCheckResourceAttrSet("aws_appsync_datasource.test", "arn"), - resource.TestCheckResourceAttr("aws_appsync_datasource.test", "type", "AWS_LAMBDA"), - resource.TestCheckResourceAttr("aws_appsync_datasource.test", "description", "appsync datasource"), + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.0.use_caller_credentials", "false"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAwsAppsyncDatasource_updateDescription(t *testing.T) { - rName := acctest.RandString(5) +func TestAccAwsAppsyncDatasource_ElasticsearchConfig_Region(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, Steps: []resource.TestStep{ { - Config: testAccAppsyncDatasourceConfig_lambda(rName, "appsync datasource"), + Config: testAccAppsyncDatasourceConfig_ElasticsearchConfig_Region(rName, testAccGetRegion()), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), - resource.TestCheckResourceAttr("aws_appsync_datasource.test", "description", "appsync datasource"), + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_config.0.region", testAccGetRegion()), ), }, { - Config: testAccAppsyncDatasourceConfig_lambda(rName, "appsync datasource v1"), + Config: testAccAppsyncDatasourceConfig_Type_Elasticsearch(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsAppsyncDatasourceExists("aws_appsync_datasource.test"), - resource.TestCheckResourceAttr("aws_appsync_datasource.test", "description", "appsync datasource v1"), + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_config.0.region", testAccGetRegion()), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_HTTPConfig_Endpoint(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_HTTPConfig_Endpoint(rName, "http://example.com"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "http_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "http_config.0.endpoint", "http://example.com"), + resource.TestCheckResourceAttr(resourceName, "type", "HTTP"), + ), + }, + { + Config: testAccAppsyncDatasourceConfig_HTTPConfig_Endpoint(rName, "http://example.org"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "http_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "http_config.0.endpoint", "http://example.org"), + resource.TestCheckResourceAttr(resourceName, "type", "HTTP"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_Type(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_Type_None(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "type", "NONE"), + ), + }, + { + Config: testAccAppsyncDatasourceConfig_Type_HTTP(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "type", "HTTP"), + ), + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_Type_DynamoDB(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + dynamodbTableResourceName := "aws_dynamodb_table.test" + iamRoleResourceName := "aws_iam_role.test" + resourceName := "aws_appsync_datasource.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_Type_DynamoDB(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "dynamodb_config.0.table_name", dynamodbTableResourceName, "name"), + resource.TestCheckResourceAttr(resourceName, "dynamodb_config.0.region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(resourceName, "service_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "type", "AMAZON_DYNAMODB"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_Type_Elasticsearch(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + iamRoleResourceName := "aws_iam_role.test" + resourceName := "aws_appsync_datasource.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_Type_Elasticsearch(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_config.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "elasticsearch_config.0.endpoint"), + resource.TestCheckResourceAttr(resourceName, "elasticsearch_config.0.region", testAccGetRegion()), + resource.TestCheckResourceAttrPair(resourceName, "service_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "type", "AMAZON_ELASTICSEARCH"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_Type_HTTP(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_Type_HTTP(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "http_config.#", "1"), + resource.TestCheckResourceAttr(resourceName, "http_config.0.endpoint", "http://example.com"), + resource.TestCheckResourceAttr(resourceName, "type", "HTTP"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_Type_Lambda(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + iamRoleResourceName := "aws_iam_role.test" + lambdaFunctionResourceName := "aws_lambda_function.test" + resourceName := "aws_appsync_datasource.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_Type_Lambda(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "lambda_config.#", "1"), + resource.TestCheckResourceAttrPair(resourceName, "lambda_config.0.function_arn", lambdaFunctionResourceName, "arn"), + resource.TestCheckResourceAttrPair(resourceName, "service_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "type", "AWS_LAMBDA"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAwsAppsyncDatasource_Type_None(t *testing.T) { + rName := fmt.Sprintf("tfacctest%d", acctest.RandInt()) + resourceName := "aws_appsync_datasource.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsAppsyncDatasourceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAppsyncDatasourceConfig_Type_None(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsAppsyncDatasourceExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "type", "NONE"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -124,12 +391,18 @@ func testAccCheckAwsAppsyncDatasourceDestroy(s *terraform.State) error { continue } + apiID, name, err := decodeAppsyncDataSourceID(rs.Primary.ID) + + if err != nil { + return err + } + input := &appsync.GetDataSourceInput{ - ApiId: aws.String(rs.Primary.Attributes["api_id"]), - Name: aws.String(rs.Primary.Attributes["name"]), + ApiId: aws.String(apiID), + Name: aws.String(name), } - _, err := conn.GetDataSource(input) + _, err = conn.GetDataSource(input) if err != nil { if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { return nil @@ -142,29 +415,41 @@ func testAccCheckAwsAppsyncDatasourceDestroy(s *terraform.State) error { func testAccCheckAwsAppsyncDatasourceExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } + if rs.Primary.ID == "" { + return fmt.Errorf("Resource has no ID: %s", name) + } - return nil - } -} + apiID, name, err := decodeAppsyncDataSourceID(rs.Primary.ID) -func testAccAppsyncDatasourceConfig_ddb(rName string) string { - return fmt.Sprintf(` -data "aws_region" "current" {} + if err != nil { + return err + } -resource "aws_appsync_graphql_api" "test" { - authentication_type = "API_KEY" - name = "tf_appsync_%s" + conn := testAccProvider.Meta().(*AWSClient).appsyncconn + + input := &appsync.GetDataSourceInput{ + ApiId: aws.String(apiID), + Name: aws.String(name), + } + + _, err = conn.GetDataSource(input) + + return err + } } +func testAccAppsyncDatasourceConfig_base_DynamoDB(rName string) string { + return fmt.Sprintf(` resource "aws_dynamodb_table" "test" { - name = "tf-ddb-%s" + hash_key = "UserId" + name = %q read_capacity = 1 write_capacity = 1 - hash_key = "UserId" + attribute { name = "UserId" type = "S" @@ -172,7 +457,7 @@ resource "aws_dynamodb_table" "test" { } resource "aws_iam_role" "test" { - name = "tf-role-%s" + name = %q assume_role_policy = < Date: Thu, 18 Oct 2018 09:50:35 -0400 Subject: [PATCH 2930/3316] Update CHANGELOG for #6139 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 931b16503af..d6eb725d2b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ FEATURES: ENHANCEMENTS: +* resource/aws_appsync_datasource: Support resource import [GH-6139] +* resource/aws_appsync_datasource: Support `HTTP` `type` and add `http_config` argument [GH-6139] +* resource/aws_appsync_datasource: Make `dynamodb_config` and `elasticsearch_config` `region` configuration optional based on resource current region [GH-6139] * resource/aws_appsync_graphql_api: Add `log_config` argument [GH-6138] * resource/aws_appsync_graphql_api: Add `openid_connect_config` argument [GH-6138] * resource/aws_appsync_graphql_api: Add `uris` attribute [GH-6138] From a3317fb703b39810101c5b2815d32f1731e1b847 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 09:52:54 -0400 Subject: [PATCH 2931/3316] Update CHANGELOG for #6194 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6eb725d2b7..615444de716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Resource:** `aws_redshift_event_subscription` [GH-6146] +* **New Resource:** `aws_pinpoint_apns_channel` [GH-6194] ENHANCEMENTS: From 9213b7f8a4eb431b39dced4a4d011fd35863f0e8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 09:53:27 -0400 Subject: [PATCH 2932/3316] CHANGELOG ordering :) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 615444de716..a34d6413da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ FEATURES: -* **New Resource:** `aws_redshift_event_subscription` [GH-6146] * **New Resource:** `aws_pinpoint_apns_channel` [GH-6194] +* **New Resource:** `aws_redshift_event_subscription` [GH-6146] ENHANCEMENTS: From 766b8ee9c94d4ae059ef77410b26a2d5078e44a4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 11:05:54 -0400 Subject: [PATCH 2933/3316] Update CHANGELOG for #4125 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a34d6413da8..2bff7c2487b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ FEATURES: +* **New Data Source:** `aws_cloudhsm_v2_cluster` [GH-4125] +* **New Resource:** `aws_cloudhsm_v2_cluster` [GH-4125] +* **New Resource:** `aws_cloudhsm_v2_hsm` [GH-4125] * **New Resource:** `aws_pinpoint_apns_channel` [GH-6194] * **New Resource:** `aws_redshift_event_subscription` [GH-6146] From fb73c1c97cd9287da2270267aeba52755473abaa Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 11:47:45 -0400 Subject: [PATCH 2934/3316] Update CHANGELOG for #6176 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bff7c2487b..673f53b8bfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_appsync_graphql_api: Properly handle updates by passing all parameters [GH-6138] +* resource/aws_ecs_service: Properly handle `random` placement strategy [GH-6176] * resource/aws_lb_listener: Prevent unconfigured `default_action` `order` from showing difference [GH-6119] * resource/aws_lb_listener_rule: Prevent unconfigured `action` `order` from showing difference [GH-6119] * resource/aws_lb_listener_rule: Retry read for eventual consistency after resource creation [GH-6154] From 4eb14bf745865471fbd21518aa7682abb28bbd56 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Thu, 18 Oct 2018 22:12:33 +0400 Subject: [PATCH 2935/3316] set rds parameter group in snapshot restore input --- aws/resource_aws_db_instance.go | 4 +--- aws/resource_aws_rds_cluster.go | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aws/resource_aws_db_instance.go b/aws/resource_aws_db_instance.go index f465b3e3ea1..b7cd598ca24 100644 --- a/aws/resource_aws_db_instance.go +++ b/aws/resource_aws_db_instance.go @@ -858,9 +858,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } if attr, ok := d.GetOk("parameter_group_name"); ok { - modifyDbInstanceInput.DBParameterGroupName = aws.String(attr.(string)) - requiresModifyDbInstance = true - requiresRebootDbInstance = true + opts.DBParameterGroupName = aws.String(attr.(string)) } if attr, ok := d.GetOk("password"); ok { diff --git a/aws/resource_aws_rds_cluster.go b/aws/resource_aws_rds_cluster.go index ec798917da3..4d1782a3bbc 100644 --- a/aws/resource_aws_rds_cluster.go +++ b/aws/resource_aws_rds_cluster.go @@ -466,8 +466,8 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error opts.VpcSecurityGroupIds = expandStringList(attr.List()) } - if _, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - clusterUpdate = true + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + opts.DBClusterParameterGroupName = aws.String(attr.(string)) } if _, ok := d.GetOk("backup_retention_period"); ok { @@ -490,7 +490,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } if clusterUpdate { - log.Printf("[INFO] RDS Cluster is restoring from snapshot with default db_cluster_parameter_group_name, backup_retention_period and vpc_security_group_ids" + + log.Printf("[INFO] RDS Cluster is restoring from snapshot with default backup_retention_period and vpc_security_group_ids" + "but custom values should be set, will now update after snapshot is restored!") d.SetId(identifier) From 7daadea7ee310abaf2011cbf101c917ad6387c9a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 14:32:05 -0400 Subject: [PATCH 2936/3316] resource/aws_codepipeline_webhook: Address PR #5875 feedback * Remove extraneous error returns from extractCodePipelineWebhookRules and extractCodePipelineWebhookAuthConfig * Use resource.NotFoundError in getCodePipelineWebhook --- aws/resource_aws_codepipeline_webhook.go | 35 ++++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index d217bffaf3e..4acb2bce033 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -4,6 +4,8 @@ import ( "fmt" "log" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -94,7 +96,7 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { } } -func extractCodePipelineWebhookRules(filters *schema.Set) ([]*codepipeline.WebhookFilterRule, error) { +func extractCodePipelineWebhookRules(filters *schema.Set) []*codepipeline.WebhookFilterRule { var rules []*codepipeline.WebhookFilterRule for _, f := range filters.List() { @@ -107,10 +109,10 @@ func extractCodePipelineWebhookRules(filters *schema.Set) ([]*codepipeline.Webho rules = append(rules, &filter) } - return rules, nil + return rules } -func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string]interface{}) (*codepipeline.WebhookAuthConfiguration, error) { +func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string]interface{}) *codepipeline.WebhookAuthConfiguration { var conf codepipeline.WebhookAuthConfiguration switch authType { case codepipeline.WebhookAuthenticationTypeIp: @@ -121,7 +123,7 @@ func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string break } - return &conf, nil + return &conf } func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { @@ -134,24 +136,14 @@ func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface authConfig = l[0].(map[string]interface{}) } - rules, err := extractCodePipelineWebhookRules(d.Get("filter").(*schema.Set)) - if err != nil { - return err - } - - conf, err := extractCodePipelineWebhookAuthConfig(authType, authConfig) - if err != nil { - return err - } - request := &codepipeline.PutWebhookInput{ Webhook: &codepipeline.WebhookDefinition{ Authentication: aws.String(authType), - Filters: rules, + Filters: extractCodePipelineWebhookRules(d.Get("filter").(*schema.Set)), Name: aws.String(d.Get("name").(string)), TargetAction: aws.String(d.Get("target_action").(string)), TargetPipeline: aws.String(d.Get("target_pipeline").(string)), - AuthenticationConfiguration: conf, + AuthenticationConfiguration: extractCodePipelineWebhookAuthConfig(authType, authConfig), }, } @@ -194,7 +186,9 @@ func getCodePipelineWebhook(conn *codepipeline.CodePipeline, arn string) (*codep nextToken = aws.StringValue(out.NextToken) } - return nil, fmt.Errorf("No webhook with ARN %s found", arn) + return nil, &resource.NotFoundError{ + Message: fmt.Sprintf("No webhook with ARN %s found", arn), + } } func flattenCodePipelineWebhookFilters(filters []*codepipeline.WebhookFilterRule) []interface{} { @@ -233,12 +227,17 @@ func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{} arn := d.Id() webhook, err := getCodePipelineWebhook(conn, arn) - if err != nil { + + if isResourceNotFoundError(err) { log.Printf("[WARN] CodePipeline Webhook (%s) not found, removing from state", d.Id()) d.SetId("") return nil } + if err != nil { + return fmt.Errorf("error getting CodePipeline Webhook (%s): %s", d.Id(), err) + } + name := aws.StringValue(webhook.Definition.Name) if name == "" { return fmt.Errorf("Webhook not found: %s", arn) From 298485a969f21c007d18fdd431c12c7307b9d33d Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 14:42:10 -0400 Subject: [PATCH 2937/3316] Update CHANGELOG for #5875 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 673f53b8bfe..3fe54456f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ FEATURES: * **New Data Source:** `aws_cloudhsm_v2_cluster` [GH-4125] * **New Resource:** `aws_cloudhsm_v2_cluster` [GH-4125] * **New Resource:** `aws_cloudhsm_v2_hsm` [GH-4125] +* **New Resource:** `aws_codepipeline_webhook` [GH-5875] * **New Resource:** `aws_pinpoint_apns_channel` [GH-6194] * **New Resource:** `aws_redshift_event_subscription` [GH-6146] From f40d3485a32f2ec9e41f81f165c80cabaebed8a1 Mon Sep 17 00:00:00 2001 From: Jesse Mandel Date: Thu, 18 Oct 2018 11:47:29 -0700 Subject: [PATCH 2938/3316] Update s3_bucket.html.markdown `days = 15` isn't valid, AWS requires at least 30. Additionally the example of transitioning from `ONEZONE_IA` to `STANDARD_IA` doesn't make sense. --- website/docs/r/s3_bucket.html.markdown | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/docs/r/s3_bucket.html.markdown b/website/docs/r/s3_bucket.html.markdown index 13c20f2f4df..3c1ebefb875 100644 --- a/website/docs/r/s3_bucket.html.markdown +++ b/website/docs/r/s3_bucket.html.markdown @@ -118,14 +118,9 @@ resource "aws_s3_bucket" "bucket" { "autoclean" = "true" } - transition { - days = 15 - storage_class = "ONEZONE_IA" - } - transition { days = 30 - storage_class = "STANDARD_IA" + storage_class = "STANDARD_IA" # or "ONEZONE_IA" } transition { From 29a4a2eca4eaff60f6af4344160a7fbdbd39d342 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 14:59:39 -0400 Subject: [PATCH 2939/3316] Update CHANGELOG for #6200 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe54456f78..794468b2f88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,10 +21,12 @@ ENHANCEMENTS: * resource/aws_athena_database: Add `encryption_configuration` argument [GH-6117] * resource/aws_cloudwatch_metric_alarm: Validate `alarm_actions` [GH-6151] * resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` [GH-6140] +* resource/aws_db_instance: Directly restore snapshot with `parameter_group_name` set [GH-6200] * resource/aws_dx_connection: Add `jumbo_frame_capable` attribute [GH-6143] * resource/aws_dynamodb_table: Prevent error `UnknownOperationException: Tagging is not currently supported in DynamoDB Local` [GH-6149] * resource/aws_lb_listener: Allow `default_action` `order` to be based on Terraform configuration ordering [GH-6124] * resource/aws_lb_listener_rule: Allow `action` `order` to be based on Terraform configuration ordering [GH-6124] +* resource/aws_rds_cluster: Directly restore snapshot with `db_cluster_parameter_group_name` set [GH-6200] BUG FIXES: From 398798635490d69a7275fd989089db3f305e30c6 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Thu, 18 Oct 2018 19:10:56 +0000 Subject: [PATCH 2940/3316] v1.41.0 --- CHANGELOG.md | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 794468b2f88..fd12ec6e5b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,40 +1,40 @@ -## 1.41.0 (Unreleased) +## 1.41.0 (October 18, 2018) FEATURES: -* **New Data Source:** `aws_cloudhsm_v2_cluster` [GH-4125] -* **New Resource:** `aws_cloudhsm_v2_cluster` [GH-4125] -* **New Resource:** `aws_cloudhsm_v2_hsm` [GH-4125] -* **New Resource:** `aws_codepipeline_webhook` [GH-5875] -* **New Resource:** `aws_pinpoint_apns_channel` [GH-6194] -* **New Resource:** `aws_redshift_event_subscription` [GH-6146] +* **New Data Source:** `aws_cloudhsm_v2_cluster` ([#4125](https://github.com/terraform-providers/terraform-provider-aws/issues/4125)) +* **New Resource:** `aws_cloudhsm_v2_cluster` ([#4125](https://github.com/terraform-providers/terraform-provider-aws/issues/4125)) +* **New Resource:** `aws_cloudhsm_v2_hsm` ([#4125](https://github.com/terraform-providers/terraform-provider-aws/issues/4125)) +* **New Resource:** `aws_codepipeline_webhook` ([#5875](https://github.com/terraform-providers/terraform-provider-aws/issues/5875)) +* **New Resource:** `aws_pinpoint_apns_channel` ([#6194](https://github.com/terraform-providers/terraform-provider-aws/issues/6194)) +* **New Resource:** `aws_redshift_event_subscription` ([#6146](https://github.com/terraform-providers/terraform-provider-aws/issues/6146)) ENHANCEMENTS: -* resource/aws_appsync_datasource: Support resource import [GH-6139] -* resource/aws_appsync_datasource: Support `HTTP` `type` and add `http_config` argument [GH-6139] -* resource/aws_appsync_datasource: Make `dynamodb_config` and `elasticsearch_config` `region` configuration optional based on resource current region [GH-6139] -* resource/aws_appsync_graphql_api: Add `log_config` argument [GH-6138] -* resource/aws_appsync_graphql_api: Add `openid_connect_config` argument [GH-6138] -* resource/aws_appsync_graphql_api: Add `uris` attribute [GH-6138] -* resource/aws_appsync_graphql_api: Make `user_pool_config` `aws_region` configuration optional based on resource current region [GH-6138] -* resource/aws_athena_database: Add `encryption_configuration` argument [GH-6117] -* resource/aws_cloudwatch_metric_alarm: Validate `alarm_actions` [GH-6151] -* resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` [GH-6140] -* resource/aws_db_instance: Directly restore snapshot with `parameter_group_name` set [GH-6200] -* resource/aws_dx_connection: Add `jumbo_frame_capable` attribute [GH-6143] -* resource/aws_dynamodb_table: Prevent error `UnknownOperationException: Tagging is not currently supported in DynamoDB Local` [GH-6149] -* resource/aws_lb_listener: Allow `default_action` `order` to be based on Terraform configuration ordering [GH-6124] -* resource/aws_lb_listener_rule: Allow `action` `order` to be based on Terraform configuration ordering [GH-6124] -* resource/aws_rds_cluster: Directly restore snapshot with `db_cluster_parameter_group_name` set [GH-6200] +* resource/aws_appsync_datasource: Support resource import ([#6139](https://github.com/terraform-providers/terraform-provider-aws/issues/6139)) +* resource/aws_appsync_datasource: Support `HTTP` `type` and add `http_config` argument ([#6139](https://github.com/terraform-providers/terraform-provider-aws/issues/6139)) +* resource/aws_appsync_datasource: Make `dynamodb_config` and `elasticsearch_config` `region` configuration optional based on resource current region ([#6139](https://github.com/terraform-providers/terraform-provider-aws/issues/6139)) +* resource/aws_appsync_graphql_api: Add `log_config` argument ([#6138](https://github.com/terraform-providers/terraform-provider-aws/issues/6138)) +* resource/aws_appsync_graphql_api: Add `openid_connect_config` argument ([#6138](https://github.com/terraform-providers/terraform-provider-aws/issues/6138)) +* resource/aws_appsync_graphql_api: Add `uris` attribute ([#6138](https://github.com/terraform-providers/terraform-provider-aws/issues/6138)) +* resource/aws_appsync_graphql_api: Make `user_pool_config` `aws_region` configuration optional based on resource current region ([#6138](https://github.com/terraform-providers/terraform-provider-aws/issues/6138)) +* resource/aws_athena_database: Add `encryption_configuration` argument ([#6117](https://github.com/terraform-providers/terraform-provider-aws/issues/6117)) +* resource/aws_cloudwatch_metric_alarm: Validate `alarm_actions` ([#6151](https://github.com/terraform-providers/terraform-provider-aws/issues/6151)) +* resource/aws_codebuild_project: Support `NO_SOURCE` in `source` `type` ([#6140](https://github.com/terraform-providers/terraform-provider-aws/issues/6140)) +* resource/aws_db_instance: Directly restore snapshot with `parameter_group_name` set ([#6200](https://github.com/terraform-providers/terraform-provider-aws/issues/6200)) +* resource/aws_dx_connection: Add `jumbo_frame_capable` attribute ([#6143](https://github.com/terraform-providers/terraform-provider-aws/issues/6143)) +* resource/aws_dynamodb_table: Prevent error `UnknownOperationException: Tagging is not currently supported in DynamoDB Local` ([#6149](https://github.com/terraform-providers/terraform-provider-aws/issues/6149)) +* resource/aws_lb_listener: Allow `default_action` `order` to be based on Terraform configuration ordering ([#6124](https://github.com/terraform-providers/terraform-provider-aws/issues/6124)) +* resource/aws_lb_listener_rule: Allow `action` `order` to be based on Terraform configuration ordering ([#6124](https://github.com/terraform-providers/terraform-provider-aws/issues/6124)) +* resource/aws_rds_cluster: Directly restore snapshot with `db_cluster_parameter_group_name` set ([#6200](https://github.com/terraform-providers/terraform-provider-aws/issues/6200)) BUG FIXES: -* resource/aws_appsync_graphql_api: Properly handle updates by passing all parameters [GH-6138] -* resource/aws_ecs_service: Properly handle `random` placement strategy [GH-6176] -* resource/aws_lb_listener: Prevent unconfigured `default_action` `order` from showing difference [GH-6119] -* resource/aws_lb_listener_rule: Prevent unconfigured `action` `order` from showing difference [GH-6119] -* resource/aws_lb_listener_rule: Retry read for eventual consistency after resource creation [GH-6154] +* resource/aws_appsync_graphql_api: Properly handle updates by passing all parameters ([#6138](https://github.com/terraform-providers/terraform-provider-aws/issues/6138)) +* resource/aws_ecs_service: Properly handle `random` placement strategy ([#6176](https://github.com/terraform-providers/terraform-provider-aws/issues/6176)) +* resource/aws_lb_listener: Prevent unconfigured `default_action` `order` from showing difference ([#6119](https://github.com/terraform-providers/terraform-provider-aws/issues/6119)) +* resource/aws_lb_listener_rule: Prevent unconfigured `action` `order` from showing difference ([#6119](https://github.com/terraform-providers/terraform-provider-aws/issues/6119)) +* resource/aws_lb_listener_rule: Retry read for eventual consistency after resource creation ([#6154](https://github.com/terraform-providers/terraform-provider-aws/issues/6154)) ## 1.40.0 (October 10, 2018) From f8a16c15e59da689877edd98b7b35ae01ba01175 Mon Sep 17 00:00:00 2001 From: tf-release-bot Date: Thu, 18 Oct 2018 19:19:21 +0000 Subject: [PATCH 2941/3316] Cleanup after v1.41.0 release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd12ec6e5b7..733f664f06d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## 1.42.0 (Unreleased) ## 1.41.0 (October 18, 2018) FEATURES: From a851a4fc687e9d8484f4b68f31cb787761efbdb7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 16:01:41 -0400 Subject: [PATCH 2942/3316] resource/aws_codepipeline_webhook: Support resource import --- aws/resource_aws_codepipeline_webhook.go | 9 ++-- aws/resource_aws_codepipeline_webhook_test.go | 42 ++++++++++++++----- website/docs/r/codepipeline_webhook.markdown | 8 ++++ 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/aws/resource_aws_codepipeline_webhook.go b/aws/resource_aws_codepipeline_webhook.go index 4acb2bce033..99357ca1bba 100644 --- a/aws/resource_aws_codepipeline_webhook.go +++ b/aws/resource_aws_codepipeline_webhook.go @@ -4,13 +4,11 @@ import ( "fmt" "log" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codepipeline" "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/codepipeline" ) func resourceAwsCodePipelineWebhook() *schema.Resource { @@ -19,6 +17,9 @@ func resourceAwsCodePipelineWebhook() *schema.Resource { Read: resourceAwsCodePipelineWebhookRead, Update: nil, Delete: resourceAwsCodePipelineWebhookDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "authentication": { diff --git a/aws/resource_aws_codepipeline_webhook_test.go b/aws/resource_aws_codepipeline_webhook_test.go index 4bfbade6bf1..33d317ac664 100644 --- a/aws/resource_aws_codepipeline_webhook_test.go +++ b/aws/resource_aws_codepipeline_webhook_test.go @@ -15,6 +15,7 @@ func TestAccAWSCodePipelineWebhook_basic(t *testing.T) { t.Skip("Environment variable GITHUB_TOKEN is not set") } + resourceName := "aws_codepipeline_webhook.bar" name := acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -26,12 +27,18 @@ func TestAccAWSCodePipelineWebhook_basic(t *testing.T) { Config: testAccAWSCodePipelineWebhookConfig_basic(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), - testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), - resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), - resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "url"), - resource.TestCheckResourceAttr("aws_codepipeline_webhook.bar", "authentication_configuration.0.secret_token", "super-secret"), + testAccCheckAWSCodePipelineWebhookExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "url"), + resource.TestCheckResourceAttr(resourceName, "authentication_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "authentication_configuration.0.secret_token", "super-secret"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -41,6 +48,7 @@ func TestAccAWSCodePipelineWebhook_ipAuth(t *testing.T) { t.Skip("Environment variable GITHUB_TOKEN is not set") } + resourceName := "aws_codepipeline_webhook.bar" name := acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -52,12 +60,18 @@ func TestAccAWSCodePipelineWebhook_ipAuth(t *testing.T) { Config: testAccAWSCodePipelineWebhookConfig_ipAuth(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), - testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), - resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), - resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "url"), - resource.TestCheckResourceAttr("aws_codepipeline_webhook.bar", "authentication_configuration.0.allowed_ip_range", "0.0.0.0/0"), + testAccCheckAWSCodePipelineWebhookExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "url"), + resource.TestCheckResourceAttr(resourceName, "authentication_configuration.#", "1"), + resource.TestCheckResourceAttr(resourceName, "authentication_configuration.0.allowed_ip_range", "0.0.0.0/0"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -67,6 +81,7 @@ func TestAccAWSCodePipelineWebhook_unauthenticated(t *testing.T) { t.Skip("Environment variable GITHUB_TOKEN is not set") } + resourceName := "aws_codepipeline_webhook.bar" name := acctest.RandString(10) resource.Test(t, resource.TestCase{ @@ -78,11 +93,16 @@ func TestAccAWSCodePipelineWebhook_unauthenticated(t *testing.T) { Config: testAccAWSCodePipelineWebhookConfig_unauthenticated(name), Check: resource.ComposeTestCheckFunc( testAccCheckAWSCodePipelineExists("aws_codepipeline.bar"), - testAccCheckAWSCodePipelineWebhookExists("aws_codepipeline_webhook.bar"), - resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "id"), - resource.TestCheckResourceAttrSet("aws_codepipeline_webhook.bar", "url"), + testAccCheckAWSCodePipelineWebhookExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttrSet(resourceName, "url"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/website/docs/r/codepipeline_webhook.markdown b/website/docs/r/codepipeline_webhook.markdown index 516fef840f7..0b4f1719f38 100644 --- a/website/docs/r/codepipeline_webhook.markdown +++ b/website/docs/r/codepipeline_webhook.markdown @@ -130,3 +130,11 @@ In addition to all arguments above, the following attributes are exported: * `id` - The CodePipeline webhook's ARN. * `url` - The CodePipeline webhook's URL. POST events to this endpoint to trigger the target. + +## Import + +CodePipeline Webhooks can be imported by their ARN, e.g. + +``` +$ terraform import aws_codepipeline_webhook.example arn:aws:codepipeline:us-west-2:123456789012:webhook:example +``` From 52853a20e64a2b592d35641b071d5931566e8d07 Mon Sep 17 00:00:00 2001 From: Michael Jalkio Date: Thu, 18 Oct 2018 16:44:25 -0700 Subject: [PATCH 2943/3316] Fix typo on replication_subnet_group_id --- website/docs/r/dms_replication_instance.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/dms_replication_instance.html.markdown b/website/docs/r/dms_replication_instance.html.markdown index 4265bc900fc..05fbe644fdc 100644 --- a/website/docs/r/dms_replication_instance.html.markdown +++ b/website/docs/r/dms_replication_instance.html.markdown @@ -26,7 +26,7 @@ resource "aws_dms_replication_instance" "test" { publicly_accessible = true replication_instance_class = "dms.t2.micro" replication_instance_id = "test-dms-replication-instance-tf" - replication_subnet_group_id = "${aws_dms_replication_subnet_group.test-dms-replication-subnet-group-tf}" + replication_subnet_group_id = "${aws_dms_replication_subnet_group.test-dms-replication-subnet-group-tf.id}" tags { Name = "test" From f8a8f7c6bb30fcb8c7dabc458fe2bc8fe5d2bb7b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 18 Oct 2018 20:30:18 -0400 Subject: [PATCH 2944/3316] resource/aws_cloudwatch_metric_alarm: Allow EC2 Automate ARNs with alarm_actions Previously: ``` --- FAIL: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (5.65s) testing.go:538: Step 0 error: Error planning: 1 error occurred: * aws_cloudwatch_metric_alarm.test: "alarm_actions.0" doesn't look like a valid ARN ("^arn:[\\w-]+:([a-zA-Z0-9\\-])+:([a-z]{2}-(gov-)?[a-z]+-\\d{1})?:(\\d{12})?:(.*)$"): "arn:aws:automate:us-west-2:ec2:recover" ``` Output from acceptance testing: ``` --- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (3.93s) --- PASS: TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm (10.93s) --- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (10.98s) --- PASS: TestAccAWSCloudWatchMetricAlarm_basic (12.42s) --- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction (14.00s) --- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic (14.27s) --- PASS: TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (17.89s) --- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (17.93s) --- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (137.37s) ``` --- aws/resource_aws_cloudwatch_metric_alarm.go | 7 +- ...source_aws_cloudwatch_metric_alarm_test.go | 210 +++++++++++++++++- aws/validators.go | 33 +++ aws/validators_test.go | 100 +++++++++ 4 files changed, 336 insertions(+), 14 deletions(-) diff --git a/aws/resource_aws_cloudwatch_metric_alarm.go b/aws/resource_aws_cloudwatch_metric_alarm.go index 06b5e7a39fc..efdf80feb00 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/aws/resource_aws_cloudwatch_metric_alarm.go @@ -73,8 +73,11 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { Type: schema.TypeSet, Optional: true, Elem: &schema.Schema{ - Type: schema.TypeString, - ValidateFunc: validateArn, + Type: schema.TypeString, + ValidateFunc: validateAny( + validateArn, + validateEC2AutomateARN, + ), }, Set: schema.HashString, }, diff --git a/aws/resource_aws_cloudwatch_metric_alarm_test.go b/aws/resource_aws_cloudwatch_metric_alarm_test.go index e366ce401cf..0e6799dcfef 100644 --- a/aws/resource_aws_cloudwatch_metric_alarm_test.go +++ b/aws/resource_aws_cloudwatch_metric_alarm_test.go @@ -12,9 +12,10 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSCloudWatchMetricAlarm_importBasic(t *testing.T) { - rInt := acctest.RandInt() +func TestAccAWSCloudWatchMetricAlarm_basic(t *testing.T) { + var alarm cloudwatch.MetricAlarm resourceName := "aws_cloudwatch_metric_alarm.foobar" + rInt := acctest.RandInt() resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -23,8 +24,42 @@ func TestAccAWSCloudWatchMetricAlarm_importBasic(t *testing.T) { Steps: []resource.TestStep{ { Config: testAccAWSCloudWatchMetricAlarmConfig(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudWatchMetricAlarmExists(resourceName, &alarm), + resource.TestCheckResourceAttr(resourceName, "metric_name", "CPUUtilization"), + resource.TestCheckResourceAttr(resourceName, "statistic", "Average"), + resource.TestMatchResourceAttr(resourceName, "arn", + regexp.MustCompile(`^arn:[\w-]+:cloudwatch:[^:]+:\d{12}:alarm:.+$`)), + testAccCheckCloudWatchMetricAlarmDimension( + resourceName, "InstanceId", "i-abc123"), + ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate(t *testing.T) { + var alarm cloudwatch.MetricAlarm + resourceName := "aws_cloudwatch_metric_alarm.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudWatchMetricAlarmConfigAlarmActionsEC2Automate(rName, "recover"), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudWatchMetricAlarmExists(resourceName, &alarm), + resource.TestCheckResourceAttr(resourceName, "alarm_actions.#", "1"), + ), + }, { ResourceName: resourceName, ImportState: true, @@ -34,26 +69,54 @@ func TestAccAWSCloudWatchMetricAlarm_importBasic(t *testing.T) { }) } -func TestAccAWSCloudWatchMetricAlarm_basic(t *testing.T) { +func TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic(t *testing.T) { var alarm cloudwatch.MetricAlarm - rInt := acctest.RandInt() + resourceName := "aws_cloudwatch_metric_alarm.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, Steps: []resource.TestStep{ { - Config: testAccAWSCloudWatchMetricAlarmConfig(rInt), + Config: testAccAWSCloudWatchMetricAlarmConfigAlarmActionsSNSTopic(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckCloudWatchMetricAlarmExists("aws_cloudwatch_metric_alarm.foobar", &alarm), - resource.TestCheckResourceAttr("aws_cloudwatch_metric_alarm.foobar", "metric_name", "CPUUtilization"), - resource.TestCheckResourceAttr("aws_cloudwatch_metric_alarm.foobar", "statistic", "Average"), - resource.TestMatchResourceAttr("aws_cloudwatch_metric_alarm.foobar", "arn", - regexp.MustCompile(`^arn:[\w-]+:cloudwatch:[^:]+:\d{12}:alarm:.+$`)), - testAccCheckCloudWatchMetricAlarmDimension( - "aws_cloudwatch_metric_alarm.foobar", "InstanceId", "i-abc123"), + testAccCheckCloudWatchMetricAlarmExists(resourceName, &alarm), + resource.TestCheckResourceAttr(resourceName, "alarm_actions.#", "1"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction(t *testing.T) { + var alarm cloudwatch.MetricAlarm + resourceName := "aws_cloudwatch_metric_alarm.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCloudWatchMetricAlarmDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudWatchMetricAlarmConfigAlarmActionsSWFAction(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudWatchMetricAlarmExists(resourceName, &alarm), + resource.TestCheckResourceAttr(resourceName, "alarm_actions.#", "1"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -389,3 +452,126 @@ resource "aws_cloudwatch_metric_alarm" "foobar" { } }`, rInt) } + +// EC2 Automate requires a valid EC2 instance +// ValidationError: Invalid use of EC2 'Recover' action. i-abc123 is not a valid EC2 instance. +func testAccAWSCloudWatchMetricAlarmConfigAlarmActionsEC2Automate(rName, action string) string { + return fmt.Sprintf(` +data "aws_ami" "amzn-ami-minimal-hvm-ebs" { + most_recent = true + owners = ["amazon"] + + filter { + name = "name" + values = ["amzn-ami-minimal-hvm-*"] + } + filter { + name = "root-device-type" + values = ["ebs"] + } +} + +data "aws_partition" "current" {} + +data "aws_region" "current" {} + +resource "aws_vpc" "test" { + cidr_block = "172.16.0.0/16" + + tags { + Name = %q + } +} + +resource "aws_subnet" "test" { + vpc_id = "${aws_vpc.test.id}" + cidr_block = "172.16.0.0/24" + + tags { + Name = %q + } +} + +resource "aws_instance" "test" { + ami = "${data.aws_ami.amzn-ami-minimal-hvm-ebs.id}" + instance_type = "t2.micro" + subnet_id = "${aws_subnet.test.id}" + + tags { + Name = %q + } +} + +resource "aws_cloudwatch_metric_alarm" "test" { + alarm_actions = ["arn:${data.aws_partition.current.partition}:automate:${data.aws_region.current.name}:ec2:%s"] + alarm_description = "Status checks have failed for system" + alarm_name = %q + comparison_operator = "GreaterThanThreshold" + evaluation_periods = "2" + metric_name = "StatusCheckFailed_System" + namespace = "AWS/EC2" + period = "60" + statistic = "Minimum" + threshold = "0" + unit = "Count" + + dimensions { + InstanceId = "${aws_instance.test.id}" + } +} +`, rName, rName, rName, action, rName) +} + +func testAccAWSCloudWatchMetricAlarmConfigAlarmActionsSNSTopic(rName string) string { + return fmt.Sprintf(` +resource "aws_sns_topic" "test" { + name = %q +} + +resource "aws_cloudwatch_metric_alarm" "test" { + alarm_actions = ["${aws_sns_topic.test.arn}"] + alarm_description = "Status checks have failed for system" + alarm_name = %q + comparison_operator = "GreaterThanThreshold" + evaluation_periods = "2" + metric_name = "StatusCheckFailed_System" + namespace = "AWS/EC2" + period = "60" + statistic = "Minimum" + threshold = "0" + unit = "Count" + + dimensions { + InstanceId = "i-abc123" + } +} +`, rName, rName) +} + +func testAccAWSCloudWatchMetricAlarmConfigAlarmActionsSWFAction(rName string) string { + return fmt.Sprintf(` +data "aws_caller_identity" "current" {} + +data "aws_partition" "current" {} + +data "aws_region" "current" {} + +resource "aws_cloudwatch_metric_alarm" "test" { + alarm_actions = ["arn:${data.aws_partition.current.partition}:swf:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0"] + alarm_description = "Status checks have failed, rebooting system." + alarm_name = %q + comparison_operator = "GreaterThanThreshold" + evaluation_periods = "5" + metric_name = "StatusCheckFailed_Instance" + namespace = "AWS/EC2" + period = "60" + statistic = "Minimum" + threshold = "0" + unit = "Count" + + dimensions { + InstanceId = "i-abc123" + } +} +`, rName) +} diff --git a/aws/validators.go b/aws/validators.go index 6eb63cd78ea..1ea5d80b0bd 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -22,6 +22,25 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) +// validateAny returns a SchemaValidateFunc which tests if the provided value +// passes any of the provided SchemaValidateFunc +// Temporarily added into AWS provider, but will be submitted upstream into provider SDK +func validateAny(validators ...schema.SchemaValidateFunc) schema.SchemaValidateFunc { + return func(i interface{}, k string) ([]string, []error) { + var allErrors []error + var allWarnings []string + for _, validator := range validators { + validatorWarnings, validatorErrors := validator(i, k) + if len(validatorWarnings) == 0 && len(validatorErrors) == 0 { + return []string{}, []error{} + } + allWarnings = append(allWarnings, validatorWarnings...) + allErrors = append(allErrors, validatorErrors...) + } + return allWarnings, allErrors + } +} + // validateTypeStringNullableBoolean provides custom error messaging for TypeString booleans // Some arguments require three values: true, false, and "" (unspecified). // This ValidateFunc returns a custom message since the message with @@ -456,6 +475,20 @@ func validateArn(v interface{}, k string) (ws []string, errors []error) { return } +func validateEC2AutomateARN(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + // https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html + pattern := `^arn:[\w-]+:automate:[\w-]+:ec2:(recover|stop|terminate)$` + if !regexp.MustCompile(pattern).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q does not match EC2 automation ARN (%q): %q", + k, pattern, value)) + } + + return +} + func validatePolicyStatementId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) diff --git a/aws/validators_test.go b/aws/validators_test.go index 3d233c5f9c9..31501cb8265 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -7,8 +7,75 @@ import ( "testing" "github.com/aws/aws-sdk-go/service/cognitoidentity" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) +func TestValidationAny(t *testing.T) { + testCases := []struct { + val interface{} + f schema.SchemaValidateFunc + expectedErr *regexp.Regexp + }{ + { + val: "valid", + f: validateAny( + validation.StringLenBetween(5, 42), + validation.StringMatch(regexp.MustCompile(`[a-zA-Z0-9]+`), "value must be alphanumeric"), + ), + }, + { + val: "foo", + f: validateAny( + validation.StringLenBetween(5, 42), + validation.StringMatch(regexp.MustCompile(`[a-zA-Z0-9]+`), "value must be alphanumeric"), + ), + }, + { + val: "!!!!!", + f: validateAny( + validation.StringLenBetween(5, 42), + validation.StringMatch(regexp.MustCompile(`[a-zA-Z0-9]+`), "value must be alphanumeric"), + ), + }, + { + val: "!!!", + f: validateAny( + validation.StringLenBetween(5, 42), + validation.StringMatch(regexp.MustCompile(`[a-zA-Z0-9]+`), "value must be alphanumeric"), + ), + expectedErr: regexp.MustCompile("value must be alphanumeric"), + }, + } + + matchErr := func(errs []error, r *regexp.Regexp) bool { + // err must match one provided + for _, err := range errs { + if r.MatchString(err.Error()) { + return true + } + } + + return false + } + + for i, tc := range testCases { + _, errs := tc.f(tc.val, "test_property") + + if len(errs) == 0 && tc.expectedErr == nil { + continue + } + + if len(errs) != 0 && tc.expectedErr == nil { + t.Fatalf("expected test case %d to produce no errors, got %v", i, errs) + } + + if !matchErr(errs, tc.expectedErr) { + t.Fatalf("expected test case %d to produce error matching \"%s\", got %v", i, tc.expectedErr, errs) + } + } +} + func TestValidateTypeStringNullableBoolean(t *testing.T) { testCases := []struct { val interface{} @@ -340,6 +407,39 @@ func TestValidateArn(t *testing.T) { } } +func TestValidateEC2AutomateARN(t *testing.T) { + validNames := []string{ + "arn:aws:automate:us-east-1:ec2:recover", + "arn:aws:automate:us-east-1:ec2:stop", + "arn:aws:automate:us-east-1:ec2:terminate", + } + for _, v := range validNames { + _, errors := validateEC2AutomateARN(v, "test_property") + if len(errors) != 0 { + t.Fatalf("%q should be a valid ARN: %q", v, errors) + } + } + + invalidNames := []string{ + "", + "arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment", // Beanstalk + "arn:aws:iam::123456789012:user/David", // IAM User + "arn:aws:rds:eu-west-1:123456789012:db:mysql-db", // RDS + "arn:aws:s3:::my_corporate_bucket/exampleobject.png", // S3 object + "arn:aws:events:us-east-1:319201112229:rule/rule_name", // CloudWatch Rule + "arn:aws:lambda:eu-west-1:319201112229:function:myCustomFunction", // Lambda function + "arn:aws:lambda:eu-west-1:319201112229:function:myCustomFunction:Qualifier", // Lambda func qualifier + "arn:aws-us-gov:s3:::corp_bucket/object.png", // GovCloud ARN + "arn:aws-us-gov:kms:us-gov-west-1:123456789012:key/some-uuid-abc123", // GovCloud KMS ARN + } + for _, v := range invalidNames { + _, errors := validateEC2AutomateARN(v, "test_property") + if len(errors) == 0 { + t.Fatalf("%q should be an invalid ARN", v) + } + } +} + func TestValidatePolicyStatementId(t *testing.T) { validNames := []string{ "YadaHereAndThere", From 7eb4731637cf24f26f87c894dd4063d7901dcc1e Mon Sep 17 00:00:00 2001 From: "David J. Felix" Date: Thu, 18 Oct 2018 23:29:36 -0400 Subject: [PATCH 2945/3316] docs: fix example code elastic_transcoder_preset --- .../docs/r/elastic_transcoder_preset.html.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/docs/r/elastic_transcoder_preset.html.markdown b/website/docs/r/elastic_transcoder_preset.html.markdown index 1240fbd1fcc..f71a0f8c6b1 100644 --- a/website/docs/r/elastic_transcoder_preset.html.markdown +++ b/website/docs/r/elastic_transcoder_preset.html.markdown @@ -18,7 +18,7 @@ resource "aws_elastictranscoder_preset" "bar" { description = "Sample Preset" name = "sample_preset" - audio = { + audio { audio_packing_mode = "SingleTrack" bit_rate = 96 channels = 2 @@ -26,11 +26,11 @@ resource "aws_elastictranscoder_preset" "bar" { sample_rate = 44100 } - audio_codec_options = { + audio_codec_options { profile = "AAC-LC" } - video = { + video { bit_rate = "1600" codec = "H.264" display_aspect_ratio = "16:9" @@ -44,7 +44,7 @@ resource "aws_elastictranscoder_preset" "bar" { sizing_policy = "Fit" } - video_codec_options = { + video_codec_options { Profile = "main" Level = "2.2" MaxReferenceFrames = 3 @@ -52,7 +52,7 @@ resource "aws_elastictranscoder_preset" "bar" { ColorSpaceConversionMode = "None" } - video_watermarks = { + video_watermarks { id = "Terraform Test" max_width = "20%" max_height = "20%" @@ -65,7 +65,7 @@ resource "aws_elastictranscoder_preset" "bar" { target = "Content" } - thumbnails = { + thumbnails { format = "png" interval = 120 max_width = "auto" From 8678304b3247393008dadcd2c7735986e5f00a9c Mon Sep 17 00:00:00 2001 From: "David J. Felix" Date: Thu, 18 Oct 2018 23:44:28 -0400 Subject: [PATCH 2946/3316] docs: fix example docs for transcoder pipeline --- website/docs/r/elastic_transcoder_pipeline.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/elastic_transcoder_pipeline.html.markdown b/website/docs/r/elastic_transcoder_pipeline.html.markdown index bc5478b877d..20bce694ae3 100644 --- a/website/docs/r/elastic_transcoder_pipeline.html.markdown +++ b/website/docs/r/elastic_transcoder_pipeline.html.markdown @@ -18,12 +18,12 @@ resource "aws_elastictranscoder_pipeline" "bar" { name = "aws_elastictranscoder_pipeline_tf_test_" role = "${aws_iam_role.test_role.arn}" - content_config = { + content_config { bucket = "${aws_s3_bucket.content_bucket.bucket}" storage_class = "Standard" } - thumbnail_config = { + thumbnail_config { bucket = "${aws_s3_bucket.thumb_bucket.bucket}" storage_class = "Standard" } From 367cfc12b63f6b5ca57253a7b41bc71a9618d463 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 19 Oct 2018 10:26:02 -0400 Subject: [PATCH 2947/3316] data-source/aws_iot_endpoint: Add endpoint_type argument ``` --- PASS: TestAccAWSIotEndpointDataSource_EndpointType_IOTJobs (9.57s) --- PASS: TestAccAWSIotEndpointDataSource_EndpointType_IOTCredentialProvider (9.64s) --- PASS: TestAccAWSIotEndpointDataSource_basic (9.73s) --- PASS: TestAccAWSIotEndpointDataSource_EndpointType_IOTDataATS (9.78s) --- PASS: TestAccAWSIotEndpointDataSource_EndpointType_IOTData (9.95s) ``` --- aws/data_source_aws_iot_endpoint.go | 15 ++++ aws/data_source_aws_iot_endpoint_test.go | 86 ++++++++++++++++++++++- website/docs/d/iot_endpoint.html.markdown | 9 ++- 3 files changed, 105 insertions(+), 5 deletions(-) diff --git a/aws/data_source_aws_iot_endpoint.go b/aws/data_source_aws_iot_endpoint.go index e9938bf8eef..2c5e943726e 100644 --- a/aws/data_source_aws_iot_endpoint.go +++ b/aws/data_source_aws_iot_endpoint.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsIotEndpoint() *schema.Resource { @@ -16,6 +17,16 @@ func dataSourceAwsIotEndpoint() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "endpoint_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + "iot:CredentialProvider", + "iot:Data", + "iot:Data-ATS", + "iot:Jobs", + }, false), + }, }, } } @@ -24,6 +35,10 @@ func dataSourceAwsIotEndpointRead(d *schema.ResourceData, meta interface{}) erro conn := meta.(*AWSClient).iotconn input := &iot.DescribeEndpointInput{} + if v, ok := d.GetOk("endpoint_type"); ok { + input.EndpointType = aws.String(v.(string)) + } + output, err := conn.DescribeEndpoint(input) if err != nil { return fmt.Errorf("error while describing iot endpoint: %s", err) diff --git a/aws/data_source_aws_iot_endpoint_test.go b/aws/data_source_aws_iot_endpoint_test.go index d1cd4a1fbf3..6dfca1658a9 100644 --- a/aws/data_source_aws_iot_endpoint_test.go +++ b/aws/data_source_aws_iot_endpoint_test.go @@ -1,12 +1,16 @@ package aws import ( + "fmt" + "regexp" "testing" "github.com/hashicorp/terraform/helper/resource" ) -func TestAccAWSIotEndpointDataSource(t *testing.T) { +func TestAccAWSIotEndpointDataSource_basic(t *testing.T) { + dataSourceName := "data.aws_iot_endpoint.test" + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -14,7 +18,75 @@ func TestAccAWSIotEndpointDataSource(t *testing.T) { { Config: testAccAWSIotEndpointConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet("data.aws_iot_endpoint.example", "endpoint_address"), + resource.TestMatchResourceAttr(dataSourceName, "endpoint_address", regexp.MustCompile(fmt.Sprintf("^[a-z0-9]+(-ats)?.iot.%s.amazonaws.com$", testAccGetRegion()))), + ), + }, + }, + }) +} + +func TestAccAWSIotEndpointDataSource_EndpointType_IOTCredentialProvider(t *testing.T) { + dataSourceName := "data.aws_iot_endpoint.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSIotEndpointConfigEndpointType("iot:CredentialProvider"), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "endpoint_address", regexp.MustCompile(fmt.Sprintf("^[a-z0-9]+.credentials.iot.%s.amazonaws.com$", testAccGetRegion()))), + ), + }, + }, + }) +} + +func TestAccAWSIotEndpointDataSource_EndpointType_IOTData(t *testing.T) { + dataSourceName := "data.aws_iot_endpoint.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSIotEndpointConfigEndpointType("iot:Data"), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "endpoint_address", regexp.MustCompile(fmt.Sprintf("^[a-z0-9]+.iot.%s.amazonaws.com$", testAccGetRegion()))), + ), + }, + }, + }) +} + +func TestAccAWSIotEndpointDataSource_EndpointType_IOTDataATS(t *testing.T) { + dataSourceName := "data.aws_iot_endpoint.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSIotEndpointConfigEndpointType("iot:Data-ATS"), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "endpoint_address", regexp.MustCompile(fmt.Sprintf("^[a-z0-9]+-ats.iot.%s.amazonaws.com$", testAccGetRegion()))), + ), + }, + }, + }) +} + +func TestAccAWSIotEndpointDataSource_EndpointType_IOTJobs(t *testing.T) { + dataSourceName := "data.aws_iot_endpoint.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccAWSIotEndpointConfigEndpointType("iot:Jobs"), + Check: resource.ComposeTestCheckFunc( + resource.TestMatchResourceAttr(dataSourceName, "endpoint_address", regexp.MustCompile(fmt.Sprintf("^[a-z0-9]+.jobs.iot.%s.amazonaws.com$", testAccGetRegion()))), ), }, }, @@ -22,5 +94,13 @@ func TestAccAWSIotEndpointDataSource(t *testing.T) { } const testAccAWSIotEndpointConfig = ` -data "aws_iot_endpoint" "example" {} +data "aws_iot_endpoint" "test" {} ` + +func testAccAWSIotEndpointConfigEndpointType(endpointType string) string { + return fmt.Sprintf(` +data "aws_iot_endpoint" "test" { + endpoint_type = %q +} +`, endpointType) +} diff --git a/website/docs/d/iot_endpoint.html.markdown b/website/docs/d/iot_endpoint.html.markdown index 1b698b38a41..23c0d386158 100644 --- a/website/docs/d/iot_endpoint.html.markdown +++ b/website/docs/d/iot_endpoint.html.markdown @@ -37,8 +37,13 @@ resource "kubernetes_pod" "agent" { ## Argument Reference -N/A +* `endpoint_type` - (Optional) Endpoint type. Valid values: `iot:CredentialProvider`, `iot:Data`, `iot:Data-ATS`, `iot:Job`. ## Attributes Reference -* `endpoint_address` - The endpoint. The format of the endpoint is as follows: `IDENTIFIER.iot.REGION.amazonaws.com`. +* `endpoint_address` - The endpoint based on `endpoint_type`: + * No `endpoint_type`: Either `iot:Data` or `iot:Data-ATS` [depending on region](https://aws.amazon.com/blogs/iot/aws-iot-core-ats-endpoints/) + * `iot:CredentialsProvider`: `IDENTIFIER.credentials.iot.REGION.amazonaws.com` + * `iot:Data`: `IDENTIFIER.iot.REGION.amazonaws.com` + * `iot:Data-ATS`: `IDENTIFIER-ats.iot.REGION.amazonaws.com` + * `iot:Job`: `IDENTIFIER.jobs.iot.REGION.amazonaws.com` From c6206e1cb328d678b33692785263b3def8eba1d5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 19 Oct 2018 10:58:18 -0400 Subject: [PATCH 2948/3316] docs/resource/aws_ecr_lifecycle_policy: Add note that only one resource can be used with the same ECR repository --- website/docs/r/ecr_lifecycle_policy.html.markdown | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/website/docs/r/ecr_lifecycle_policy.html.markdown b/website/docs/r/ecr_lifecycle_policy.html.markdown index aba24dc337a..869c9554d50 100644 --- a/website/docs/r/ecr_lifecycle_policy.html.markdown +++ b/website/docs/r/ecr_lifecycle_policy.html.markdown @@ -3,12 +3,16 @@ layout: "aws" page_title: "AWS: aws_ecr_lifecycle_policy" sidebar_current: "docs-aws-resource-ecr-lifecycle-policy" description: |- - Provides an ECR Lifecycle Policy. + Manages an ECR repository lifecycle policy. --- # aws_ecr_lifecycle_policy -Provides an ECR lifecycle policy. +Manages an ECR repository lifecycle policy. + +~> **NOTE:** Only one `aws_ecr_lifecycle_policy` resource can be used with the same ECR repository. To apply multiple rules, they must be combined in the `policy` JSON. + +~> **NOTE:** The AWS ECR API seems to reorder rules based on `rulePriority`. If you define multiple rules that are not sorted in ascending `rulePriority` order in the Terraform code, the resource will be flagged for recreation every `terraform plan`. ## Example Usage @@ -83,8 +87,6 @@ The following arguments are supported: * `repository` - (Required) Name of the repository to apply the policy. * `policy` - (Required) The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs. For more information about building IAM policy documents with Terraform, see the [AWS IAM Policy Document Guide](/docs/providers/aws/guides/iam-policy-documents.html). -~> **NOTE:** The AWS ECR API seems to reorder rules based on `rulePriority`. If you define multiple rules that are not sorted ascending in the TF code will be flagged for recreation every `terraform plan`. - ## Attributes Reference In addition to all arguments above, the following attributes are exported: From bc5008bb2f897a60d85f4ec115f41d3acd2edd54 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 19 Oct 2018 16:20:31 -0400 Subject: [PATCH 2949/3316] resource/aws_ami_launch_permission: Prevent panic reading permissions --- aws/resource_aws_ami_launch_permission.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_ami_launch_permission.go b/aws/resource_aws_ami_launch_permission.go index cbc6d1447ed..9d075c3a424 100644 --- a/aws/resource_aws_ami_launch_permission.go +++ b/aws/resource_aws_ami_launch_permission.go @@ -106,7 +106,7 @@ func hasLaunchPermission(conn *ec2.EC2, image_id string, account_id string) (boo } for _, lp := range attrs.LaunchPermissions { - if *lp.UserId == account_id { + if aws.StringValue(lp.UserId) == account_id { return true, nil } } From f38bf13157f20bc650a6a3dce7fd3c329180a919 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 15 Oct 2018 10:21:36 -0400 Subject: [PATCH 2950/3316] resource/aws_flow_log: Support S3 logging * Add `log_destination` and `log_destination_type` arguments * Deprecate `log_group_name` and conflict it with `log_destination` * Mark `iam_role_arn` as Optional ``` $ make testacc TEST=./aws TESTARGS='-run=TestAccAWSFlowLog_' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -run=TestAccAWSFlowLog_ -timeout 120m === RUN TestAccAWSFlowLog_VPCID --- PASS: TestAccAWSFlowLog_VPCID (75.46s) === RUN TestAccAWSFlowLog_SubnetID --- PASS: TestAccAWSFlowLog_SubnetID (28.62s) === RUN TestAccAWSFlowLog_LogDestinationType_CloudWatchLogs --- PASS: TestAccAWSFlowLog_LogDestinationType_CloudWatchLogs (28.68s) === RUN TestAccAWSFlowLog_LogDestinationType_S3 --- PASS: TestAccAWSFlowLog_LogDestinationType_S3 (153.81s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 287.945s ``` --- aws/resource_aws_flow_log.go | 53 ++++- aws/resource_aws_flow_log_test.go | 279 +++++++++++++++++++------- website/docs/r/flow_log.html.markdown | 55 +++-- 3 files changed, 284 insertions(+), 103 deletions(-) diff --git a/aws/resource_aws_flow_log.go b/aws/resource_aws_flow_log.go index e67b5b418f0..8414d9a4765 100644 --- a/aws/resource_aws_flow_log.go +++ b/aws/resource_aws_flow_log.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsFlowLog() *schema.Resource { @@ -22,14 +23,37 @@ func resourceAwsFlowLog() *schema.Resource { Schema: map[string]*schema.Schema{ "iam_role_arn": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, }, - "log_group_name": { + "log_destination": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"log_group_name"}, + ValidateFunc: validateArn, + }, + + "log_destination_type": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, + Default: ec2.LogDestinationTypeCloudWatchLogs, + ValidateFunc: validation.StringInSlice([]string{ + ec2.LogDestinationTypeCloudWatchLogs, + ec2.LogDestinationTypeS3, + }, false), + }, + + "log_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"log_destination"}, + Deprecated: "use 'log_destination' argument instead", }, "vpc_id": { @@ -89,11 +113,22 @@ func resourceAwsLogFlowCreate(d *schema.ResourceData, meta interface{}) error { } opts := &ec2.CreateFlowLogsInput{ - DeliverLogsPermissionArn: aws.String(d.Get("iam_role_arn").(string)), - LogGroupName: aws.String(d.Get("log_group_name").(string)), - ResourceIds: []*string{aws.String(resourceId)}, - ResourceType: aws.String(resourceType), - TrafficType: aws.String(d.Get("traffic_type").(string)), + LogDestinationType: aws.String(d.Get("log_destination_type").(string)), + ResourceIds: []*string{aws.String(resourceId)}, + ResourceType: aws.String(resourceType), + TrafficType: aws.String(d.Get("traffic_type").(string)), + } + + if v, ok := d.GetOk("iam_role_arn"); ok && v != "" { + opts.DeliverLogsPermissionArn = aws.String(v.(string)) + } + + if v, ok := d.GetOk("log_destination"); ok && v != "" { + opts.LogDestination = aws.String(v.(string)) + } + + if v, ok := d.GetOk("log_group_name"); ok && v != "" { + opts.LogGroupName = aws.String(v.(string)) } log.Printf( @@ -134,6 +169,8 @@ func resourceAwsLogFlowRead(d *schema.ResourceData, meta interface{}) error { fl := resp.FlowLogs[0] d.Set("traffic_type", fl.TrafficType) + d.Set("log_destination", fl.LogDestination) + d.Set("log_destination_type", fl.LogDestinationType) d.Set("log_group_name", fl.LogGroupName) d.Set("iam_role_arn", fl.DeliverLogsPermissionArn) diff --git a/aws/resource_aws_flow_log_test.go b/aws/resource_aws_flow_log_test.go index c6f1da505f1..fc6a9b880f7 100644 --- a/aws/resource_aws_flow_log_test.go +++ b/aws/resource_aws_flow_log_test.go @@ -11,10 +11,13 @@ import ( "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSFlowLog_importBasic(t *testing.T) { - resourceName := "aws_flow_log.test_flow_log" - - rInt := acctest.RandInt() +func TestAccAWSFlowLog_VPCID(t *testing.T) { + var flowLog ec2.FlowLog + cloudwatchLogGroupResourceName := "aws_cloudwatch_log_group.test" + iamRoleResourceName := "aws_iam_role.test" + resourceName := "aws_flow_log.test" + vpcResourceName := "aws_vpc.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -22,58 +25,122 @@ func TestAccAWSFlowLog_importBasic(t *testing.T) { CheckDestroy: testAccCheckFlowLogDestroy, Steps: []resource.TestStep{ { - Config: testAccFlowLogConfig_basic(rInt), + Config: testAccFlowLogConfig_VPCID(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckFlowLogExists(resourceName, &flowLog), + testAccCheckAWSFlowLogAttributes(&flowLog), + resource.TestCheckResourceAttrPair(resourceName, "iam_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_destination", ""), + resource.TestCheckResourceAttr(resourceName, "log_destination_type", "cloud-watch-logs"), + resource.TestCheckResourceAttrPair(resourceName, "log_group_name", cloudwatchLogGroupResourceName, "name"), + resource.TestCheckResourceAttr(resourceName, "traffic_type", "ALL"), + resource.TestCheckResourceAttrPair(resourceName, "vpc_id", vpcResourceName, "id"), + ), }, - { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, + { + Config: testAccFlowLogConfig_LogDestinationType_CloudWatchLogs(rName), + ExpectNonEmptyPlan: false, + }, }, }) } -func TestAccAWSFlowLog_basic(t *testing.T) { +func TestAccAWSFlowLog_SubnetID(t *testing.T) { var flowLog ec2.FlowLog + cloudwatchLogGroupResourceName := "aws_cloudwatch_log_group.test" + iamRoleResourceName := "aws_iam_role.test" + resourceName := "aws_flow_log.test" + subnetResourceName := "aws_subnet.test" + rName := acctest.RandomWithPrefix("tf-acc-test") - rInt := acctest.RandInt() - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_flow_log.test_flow_log", - Providers: testAccProviders, - CheckDestroy: testAccCheckFlowLogDestroy, + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckFlowLogDestroy, Steps: []resource.TestStep{ { - Config: testAccFlowLogConfig_basic(rInt), + Config: testAccFlowLogConfig_SubnetID(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckFlowLogExists("aws_flow_log.test_flow_log", &flowLog), + testAccCheckFlowLogExists(resourceName, &flowLog), testAccCheckAWSFlowLogAttributes(&flowLog), + resource.TestCheckResourceAttrPair(resourceName, "iam_role_arn", iamRoleResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_destination", ""), + resource.TestCheckResourceAttr(resourceName, "log_destination_type", "cloud-watch-logs"), + resource.TestCheckResourceAttrPair(resourceName, "log_group_name", cloudwatchLogGroupResourceName, "name"), + resource.TestCheckResourceAttrPair(resourceName, "subnet_id", subnetResourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "traffic_type", "ALL"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } -func TestAccAWSFlowLog_subnet(t *testing.T) { +func TestAccAWSFlowLog_LogDestinationType_CloudWatchLogs(t *testing.T) { var flowLog ec2.FlowLog + cloudwatchLogGroupResourceName := "aws_cloudwatch_log_group.test" + resourceName := "aws_flow_log.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckFlowLogDestroy, + Steps: []resource.TestStep{ + { + Config: testAccFlowLogConfig_LogDestinationType_CloudWatchLogs(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckFlowLogExists(resourceName, &flowLog), + testAccCheckAWSFlowLogAttributes(&flowLog), + resource.TestCheckResourceAttrPair(resourceName, "log_destination", cloudwatchLogGroupResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_destination_type", "cloud-watch-logs"), + resource.TestCheckResourceAttr(resourceName, "log_group_name", fmt.Sprintf("%s:*", rName)), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} - rInt := acctest.RandInt() +func TestAccAWSFlowLog_LogDestinationType_S3(t *testing.T) { + var flowLog ec2.FlowLog + s3ResourceName := "aws_s3_bucket.test" + resourceName := "aws_flow_log.test" + rName := acctest.RandomWithPrefix("tf-acc-test") - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "aws_flow_log.test_flow_log_subnet", - Providers: testAccProviders, - CheckDestroy: testAccCheckFlowLogDestroy, + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckFlowLogDestroy, Steps: []resource.TestStep{ { - Config: testAccFlowLogConfig_subnet(rInt), + Config: testAccFlowLogConfig_LogDestinationType_S3(rName), Check: resource.ComposeTestCheckFunc( - testAccCheckFlowLogExists("aws_flow_log.test_flow_log_subnet", &flowLog), + testAccCheckFlowLogExists(resourceName, &flowLog), testAccCheckAWSFlowLogAttributes(&flowLog), + resource.TestCheckResourceAttrPair(resourceName, "log_destination", s3ResourceName, "arn"), + resource.TestCheckResourceAttr(resourceName, "log_destination_type", "s3"), + resource.TestCheckResourceAttr(resourceName, "log_group_name", ""), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -131,27 +198,19 @@ func testAccCheckFlowLogDestroy(s *terraform.State) error { return nil } -func testAccFlowLogConfig_basic(rInt int) string { +func testAccFlowLogConfig_LogDestinationType_CloudWatchLogs(rName string) string { return fmt.Sprintf(` -resource "aws_vpc" "default" { - cidr_block = "10.0.0.0/16" - tags { - Name = "terraform-testacc-flow-log-basic" - } -} - -resource "aws_subnet" "test_subnet" { - vpc_id = "${aws_vpc.default.id}" - cidr_block = "10.0.1.0/24" +resource "aws_vpc" "test" { + cidr_block = "10.0.0.0/16" - tags { - Name = "tf-acc-flow-log-basic" - } + tags { + Name = %q + } } -resource "aws_iam_role" "test_role" { - name = "tf_test_flow_log_basic_%d" - assume_role_policy = < **NOTE:** One of `eni_id`, `subnet_id`, or `vpc_id` must be specified. + The following arguments are supported: -* `log_group_name` - (Required) The name of the CloudWatch log group -* `iam_role_arn` - (Required) The ARN for the IAM role that's used to post flow - logs to a CloudWatch Logs log group -* `vpc_id` - (Optional) VPC ID to attach to -* `subnet_id` - (Optional) Subnet ID to attach to +* `traffic_type` - (Required) The type of traffic to capture. Valid values: `ACCEPT`,`REJECT`, `ALL`. * `eni_id` - (Optional) Elastic Network Interface ID to attach to -* `traffic_type` - (Required) The type of traffic to capture. Valid values: - `ACCEPT`,`REJECT`, `ALL` +* `iam_role_arn` - (Optional) The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs log group +* `log_destination_type` - (Optional) The type of the logging destination. Valid values: `cloud-watch-logs`, `s3`. Default: `cloud-watch-logs`. +* `log_destination` - (Optional) The ARN of the logging destination. +* `log_group_name` - (Optional) *Deprecated:* Use `log_destination` instead. The name of the CloudWatch log group. +* `subnet_id` - (Optional) Subnet ID to attach to +* `vpc_id` - (Optional) VPC ID to attach to ## Attributes Reference From 55872b8fe59fcc8aec96256f8f55d9f61a1f2f32 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 19 Oct 2018 18:26:06 -0400 Subject: [PATCH 2951/3316] tests/resource/aws_ami_launch_permission: Add testing to cover userId omission panic Also parallelizes other cases of removing launch permissions and AMI. Previously: ``` === CONT TestAccAWSAMILaunchPermission_Disappears_LaunchPermission_Public panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2abb7a7] goroutine 1240 [running]: github.com/terraform-providers/terraform-provider-aws/aws.hasLaunchPermission(0xc00000e1e0, 0xc0009a2240, 0x15, 0xc0007aa480, 0xc, 0xc0005c8000, 0xc00099b700, 0x1870888) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go:109 +0x137 github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsAmiLaunchPermissionExists(0xc0005c8000, 0x3e0b7e0, 0xc000c26300, 0xc0005c8000, 0x0, 0x0) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go:41 +0x101 ``` Now: ``` --- PASS: TestAccAWSAMILaunchPermission_Disappears_LaunchPermission (335.48s) --- PASS: TestAccAWSAMILaunchPermission_Disappears_LaunchPermission_Public (345.99s) --- PASS: TestAccAWSAMILaunchPermission_Basic (346.17s) --- PASS: TestAccAWSAMILaunchPermission_Disappears_AMI (353.34s) ``` --- ...resource_aws_ami_launch_permission_test.go | 234 ++++++++++++++---- 1 file changed, 190 insertions(+), 44 deletions(-) diff --git a/aws/resource_aws_ami_launch_permission_test.go b/aws/resource_aws_ami_launch_permission_test.go index 94b49f4e631..d33fb81b7a4 100644 --- a/aws/resource_aws_ami_launch_permission_test.go +++ b/aws/resource_aws_ami_launch_permission_test.go @@ -2,56 +2,101 @@ package aws import ( "fmt" - "os" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAccAWSAMILaunchPermission_Basic(t *testing.T) { - imageID := "" - accountID := os.Getenv("AWS_ACCOUNT_ID") + resourceName := "aws_ami_launch_permission.test" + rName := acctest.RandomWithPrefix("tf-acc-test") resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - if os.Getenv("AWS_ACCOUNT_ID") == "" { - t.Fatal("AWS_ACCOUNT_ID must be set") - } + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAMILaunchPermissionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSAMILaunchPermissionConfig(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSAMILaunchPermissionExists(resourceName), + ), + }, }, - Providers: testAccProviders, + }) +} + +func TestAccAWSAMILaunchPermission_Disappears_LaunchPermission(t *testing.T) { + resourceName := "aws_ami_launch_permission.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAMILaunchPermissionDestroy, Steps: []resource.TestStep{ - // Scaffold everything { - Config: testAccAWSAMILaunchPermissionConfig(accountID, true), + Config: testAccAWSAMILaunchPermissionConfig(rName), Check: resource.ComposeTestCheckFunc( - testCheckResourceGetAttr("aws_ami_copy.test", "id", &imageID), - testAccAWSAMILaunchPermissionExists(accountID, &imageID), + testAccCheckAWSAMILaunchPermissionExists(resourceName), + testAccCheckAWSAMILaunchPermissionDisappears(resourceName), ), + ExpectNonEmptyPlan: true, }, - // Drop just launch permission to test destruction + }, + }) +} + +// Bug reference: https://github.com/terraform-providers/terraform-provider-aws/issues/6222 +// Images with all will not have and can cause a panic +func TestAccAWSAMILaunchPermission_Disappears_LaunchPermission_Public(t *testing.T) { + resourceName := "aws_ami_launch_permission.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAMILaunchPermissionDestroy, + Steps: []resource.TestStep{ { - Config: testAccAWSAMILaunchPermissionConfig(accountID, false), + Config: testAccAWSAMILaunchPermissionConfig(rName), Check: resource.ComposeTestCheckFunc( - testAccAWSAMILaunchPermissionDestroyed(accountID, &imageID), + testAccCheckAWSAMILaunchPermissionExists(resourceName), + testAccCheckAWSAMILaunchPermissionAddPublic(resourceName), + testAccCheckAWSAMILaunchPermissionDisappears(resourceName), ), + ExpectNonEmptyPlan: true, }, - // Re-add everything so we can test when AMI disappears + }, + }) +} + +func TestAccAWSAMILaunchPermission_Disappears_AMI(t *testing.T) { + imageID := "" + resourceName := "aws_ami_launch_permission.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSAMILaunchPermissionDestroy, + Steps: []resource.TestStep{ { - Config: testAccAWSAMILaunchPermissionConfig(accountID, true), + Config: testAccAWSAMILaunchPermissionConfig(rName), Check: resource.ComposeTestCheckFunc( - testCheckResourceGetAttr("aws_ami_copy.test", "id", &imageID), - testAccAWSAMILaunchPermissionExists(accountID, &imageID), + testAccCheckAWSAMILaunchPermissionExists(resourceName), ), }, // Here we delete the AMI to verify the follow-on refresh after this step // should not error. { - Config: testAccAWSAMILaunchPermissionConfig(accountID, true), + Config: testAccAWSAMILaunchPermissionConfig(rName), Check: resource.ComposeTestCheckFunc( + testCheckResourceGetAttr("aws_ami_copy.test", "id", &imageID), testAccAWSAMIDisappears(&imageID), ), ExpectNonEmptyPlan: true, @@ -78,26 +123,115 @@ func testCheckResourceGetAttr(name, key string, value *string) resource.TestChec } } -func testAccAWSAMILaunchPermissionExists(accountID string, imageID *string) resource.TestCheckFunc { +func testAccCheckAWSAMILaunchPermissionExists(resourceName string) resource.TestCheckFunc { return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No resource ID is set") + } + conn := testAccProvider.Meta().(*AWSClient).ec2conn - if has, err := hasLaunchPermission(conn, *imageID, accountID); err != nil { + accountID := rs.Primary.Attributes["account_id"] + imageID := rs.Primary.Attributes["image_id"] + + if has, err := hasLaunchPermission(conn, imageID, accountID); err != nil { return err } else if !has { - return fmt.Errorf("launch permission does not exist for '%s' on '%s'", accountID, *imageID) + return fmt.Errorf("launch permission does not exist for '%s' on '%s'", accountID, imageID) } return nil } } -func testAccAWSAMILaunchPermissionDestroyed(accountID string, imageID *string) resource.TestCheckFunc { - return func(s *terraform.State) error { +func testAccCheckAWSAMILaunchPermissionDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_ami_launch_permission" { + continue + } + conn := testAccProvider.Meta().(*AWSClient).ec2conn - if has, err := hasLaunchPermission(conn, *imageID, accountID); err != nil { + accountID := rs.Primary.Attributes["account_id"] + imageID := rs.Primary.Attributes["image_id"] + + if has, err := hasLaunchPermission(conn, imageID, accountID); err != nil { return err } else if has { - return fmt.Errorf("launch permission still exists for '%s' on '%s'", accountID, *imageID) + return fmt.Errorf("launch permission still exists for '%s' on '%s'", accountID, imageID) + } + } + + return nil +} + +func testAccCheckAWSAMILaunchPermissionAddPublic(resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No resource ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + imageID := rs.Primary.Attributes["image_id"] + + input := &ec2.ModifyImageAttributeInput{ + ImageId: aws.String(imageID), + Attribute: aws.String("launchPermission"), + LaunchPermission: &ec2.LaunchPermissionModifications{ + Add: []*ec2.LaunchPermission{ + {Group: aws.String("all")}, + }, + }, + } + + _, err := conn.ModifyImageAttribute(input) + + if err != nil { + return err + } + + return nil + } +} + +func testAccCheckAWSAMILaunchPermissionDisappears(resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("Not found: %s", resourceName) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No resource ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).ec2conn + accountID := rs.Primary.Attributes["account_id"] + imageID := rs.Primary.Attributes["image_id"] + + input := &ec2.ModifyImageAttributeInput{ + ImageId: aws.String(imageID), + Attribute: aws.String("launchPermission"), + LaunchPermission: &ec2.LaunchPermissionModifications{ + Remove: []*ec2.LaunchPermission{ + {UserId: aws.String(accountID)}, + }, + }, + } + + _, err := conn.ModifyImageAttribute(input) + + if err != nil { + return err } + return nil } } @@ -124,24 +258,36 @@ func testAccAWSAMIDisappears(imageID *string) resource.TestCheckFunc { } } -func testAccAWSAMILaunchPermissionConfig(accountID string, includeLaunchPermission bool) string { - base := ` -resource "aws_ami_copy" "test" { - name = "launch-permission-test" - description = "Launch Permission Test Copy" - source_ami_id = "ami-7172b611" - source_ami_region = "us-west-2" +func testAccAWSAMILaunchPermissionConfig(rName string) string { + return fmt.Sprintf(` +data "aws_ami" "amzn-ami-minimal-hvm" { + most_recent = true + owners = ["amazon"] + + filter { + name = "name" + values = ["amzn-ami-minimal-hvm-*"] + } + filter { + name = "root-device-type" + values = ["ebs"] + } } -` - if !includeLaunchPermission { - return base - } +data "aws_caller_identity" "current" {} + +data "aws_region" "current" {} + +resource "aws_ami_copy" "test" { + description = %q + name = %q + source_ami_id = "${data.aws_ami.amzn-ami-minimal-hvm.id}" + source_ami_region = "${data.aws_region.current.name}" +} - return base + fmt.Sprintf(` -resource "aws_ami_launch_permission" "self-test" { - image_id = "${aws_ami_copy.test.id}" - account_id = "%s" +resource "aws_ami_launch_permission" "test" { + account_id = "${data.aws_caller_identity.current.account_id}" + image_id = "${aws_ami_copy.test.id}" } -`, accountID) +`, rName, rName) } From 1041dfd10614dd18689eca4cde7b68ade4bd2923 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 19 Oct 2018 18:51:31 -0400 Subject: [PATCH 2952/3316] tests/resource/aws_nat_gateway: Perform import testing in all acceptance tests --- aws/resource_aws_nat_gateway_test.go | 39 +++++++++++----------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/aws/resource_aws_nat_gateway_test.go b/aws/resource_aws_nat_gateway_test.go index c2db6fb1bfd..8fd9ccef778 100644 --- a/aws/resource_aws_nat_gateway_test.go +++ b/aws/resource_aws_nat_gateway_test.go @@ -66,29 +66,9 @@ func testSweepNatGateways(region string) error { return nil } -func TestAccAWSNatGateway_importBasic(t *testing.T) { - resourceName := "aws_nat_gateway.gateway" - - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckNatGatewayDestroy, - Steps: []resource.TestStep{ - { - Config: testAccNatGatewayConfig, - }, - - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - func TestAccAWSNatGateway_basic(t *testing.T) { var natGateway ec2.NatGateway + resourceName := "aws_nat_gateway.gateway" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -99,15 +79,21 @@ func TestAccAWSNatGateway_basic(t *testing.T) { { Config: testAccNatGatewayConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckNatGatewayExists("aws_nat_gateway.gateway", &natGateway), + testAccCheckNatGatewayExists(resourceName, &natGateway), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } func TestAccAWSNatGateway_tags(t *testing.T) { var natGateway ec2.NatGateway + resourceName := "aws_nat_gateway.gateway" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -117,7 +103,7 @@ func TestAccAWSNatGateway_tags(t *testing.T) { { Config: testAccNatGatewayConfigTags, Check: resource.ComposeTestCheckFunc( - testAccCheckNatGatewayExists("aws_nat_gateway.gateway", &natGateway), + testAccCheckNatGatewayExists(resourceName, &natGateway), testAccCheckTags(&natGateway.Tags, "Name", "terraform-testacc-nat-gw-tags"), testAccCheckTags(&natGateway.Tags, "foo", "bar"), ), @@ -126,12 +112,17 @@ func TestAccAWSNatGateway_tags(t *testing.T) { { Config: testAccNatGatewayConfigTagsUpdate, Check: resource.ComposeTestCheckFunc( - testAccCheckNatGatewayExists("aws_nat_gateway.gateway", &natGateway), + testAccCheckNatGatewayExists(resourceName, &natGateway), testAccCheckTags(&natGateway.Tags, "Name", "terraform-testacc-nat-gw-tags"), testAccCheckTags(&natGateway.Tags, "foo", ""), testAccCheckTags(&natGateway.Tags, "bar", "baz"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } From a90bc6122d0943c004b45219d4a5aaceb1ab1caa Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 19 Oct 2018 18:47:59 -0400 Subject: [PATCH 2953/3316] resource/aws_nat_gateway: Remove network_interface_id, private_ip, and public_ip as configurable The API nor the resource actually support configuring these attributes. --- aws/resource_aws_nat_gateway.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/aws/resource_aws_nat_gateway.go b/aws/resource_aws_nat_gateway.go index 52f7f457166..d227ca2f917 100644 --- a/aws/resource_aws_nat_gateway.go +++ b/aws/resource_aws_nat_gateway.go @@ -38,19 +38,16 @@ func resourceAwsNatGateway() *schema.Resource { "network_interface_id": { Type: schema.TypeString, - Optional: true, Computed: true, }, "private_ip": { Type: schema.TypeString, - Optional: true, Computed: true, }, "public_ip": { Type: schema.TypeString, - Optional: true, Computed: true, }, From 02249b66d2162475f71a869c3f548c453293aa21 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 19 Oct 2018 19:14:12 -0400 Subject: [PATCH 2954/3316] resource/aws_budgets_budget: Support resource import The support was documented, but never implemented. ``` --- PASS: TestAccAWSBudgetsBudget_prefix (18.37s) --- PASS: TestAccAWSBudgetsBudget_basic (20.81s) ``` --- aws/resource_aws_budgets_budget.go | 7 +++++-- aws/resource_aws_budgets_budget_test.go | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_budgets_budget.go b/aws/resource_aws_budgets_budget.go index b38dc19bc38..d4c368d2736 100644 --- a/aws/resource_aws_budgets_budget.go +++ b/aws/resource_aws_budgets_budget.go @@ -135,6 +135,9 @@ func resourceAwsBudgetsBudget() *schema.Resource { Read: resourceAwsBudgetsBudgetRead, Update: resourceAwsBudgetsBudgetUpdate, Delete: resourceAwsBudgetsBudgetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, } } @@ -221,8 +224,8 @@ func resourceAwsBudgetsBudgetRead(d *schema.ResourceData, meta interface{}) erro d.Set("name", budget.BudgetName) if budget.TimePeriod != nil { - d.Set("time_period_end", budget.TimePeriod.End) - d.Set("time_period_start", budget.TimePeriod.Start) + d.Set("time_period_end", aws.TimeValue(budget.TimePeriod.End).Format("2006-01-02_15:04")) + d.Set("time_period_start", aws.TimeValue(budget.TimePeriod.Start).Format("2006-01-02_15:04")) } d.Set("time_unit", budget.TimeUnit) diff --git a/aws/resource_aws_budgets_budget_test.go b/aws/resource_aws_budgets_budget_test.go index afc8d17c536..e6ffc951374 100644 --- a/aws/resource_aws_budgets_budget_test.go +++ b/aws/resource_aws_budgets_budget_test.go @@ -59,6 +59,12 @@ func TestAccAWSBudgetsBudget_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", *configBasicUpdate.TimeUnit), ), }, + { + ResourceName: "aws_budgets_budget.foo", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name_prefix"}, + }, }, }) } @@ -101,6 +107,13 @@ func TestAccAWSBudgetsBudget_prefix(t *testing.T) { resource.TestCheckResourceAttr("aws_budgets_budget.foo", "time_unit", *configBasicUpdate.TimeUnit), ), }, + + { + ResourceName: "aws_budgets_budget.foo", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name_prefix"}, + }, }, }) } From 9bb80d00535138e6db4ff7e89ef16f10b6c344ba Mon Sep 17 00:00:00 2001 From: vroad Date: Sat, 20 Oct 2018 14:11:31 +0900 Subject: [PATCH 2955/3316] Fix non-alphanumeric VPC name in aws_cloudformation_stack example usage --- website/docs/r/cloudformation_stack.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/cloudformation_stack.html.markdown b/website/docs/r/cloudformation_stack.html.markdown index 8cefd9ffda0..a9b5ca40931 100644 --- a/website/docs/r/cloudformation_stack.html.markdown +++ b/website/docs/r/cloudformation_stack.html.markdown @@ -30,7 +30,7 @@ resource "aws_cloudformation_stack" "network" { } }, "Resources" : { - "my-vpc": { + "myVpc": { "Type" : "AWS::EC2::VPC", "Properties" : { "CidrBlock" : { "Ref" : "VPCCidr" }, From eac7388d9a27b7f532b5acae2e4a8e1d8d58581e Mon Sep 17 00:00:00 2001 From: Florian Sellmayr Date: Sat, 20 Oct 2018 14:36:53 +0700 Subject: [PATCH 2956/3316] d/nat_gateway: Fix formatting when describing filter arguments --- website/docs/d/nat_gateway.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/d/nat_gateway.html.markdown b/website/docs/d/nat_gateway.html.markdown index f8fd3a8a48d..afae8babd6d 100644 --- a/website/docs/d/nat_gateway.html.markdown +++ b/website/docs/d/nat_gateway.html.markdown @@ -43,8 +43,10 @@ Nat Gateway whose data will be exported as attributes. * `vpc_id` - (Optional) The id of the VPC that the Nat Gateway resides in. * `state` - (Optional) The state of the NAT gateway (pending | failed | available | deleting | deleted ). * `filter` - (Optional) Custom filter block as described below. + More complex filters can be expressed using one or more `filter` sub-blocks, which take the following arguments: + * `name` - (Required) The name of the field to filter by, as defined by [the underlying AWS API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeNatGateways.html). * `values` - (Required) Set of values that are accepted for the given field. From eb32cdf2f05d00396623585677d13dfaea26b9c1 Mon Sep 17 00:00:00 2001 From: Florian Sellmayr Date: Sat, 20 Oct 2018 15:22:04 +0700 Subject: [PATCH 2957/3316] d/aws_nat_gateway: Fix filtering and reading of tags --- aws/data_source_aws_nat_gateway.go | 7 +++++++ aws/data_source_aws_nat_gateway_test.go | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/aws/data_source_aws_nat_gateway.go b/aws/data_source_aws_nat_gateway.go index 98947f397c2..a805694473d 100644 --- a/aws/data_source_aws_nat_gateway.go +++ b/aws/data_source_aws_nat_gateway.go @@ -89,6 +89,12 @@ func dataSourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error )...) } + if tags, ok := d.GetOk("tags"); ok { + req.Filter = append(req.Filter, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + req.Filter = append(req.Filter, buildEC2CustomFilterList( d.Get("filter").(*schema.Set), )...) @@ -116,6 +122,7 @@ func dataSourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error d.Set("state", ngw.State) d.Set("subnet_id", ngw.SubnetId) d.Set("vpc_id", ngw.VpcId) + d.Set("tags", tagsToMap(ngw.Tags)) for _, address := range ngw.NatGatewayAddresses { if *address.AllocationId != "" { diff --git a/aws/data_source_aws_nat_gateway_test.go b/aws/data_source_aws_nat_gateway_test.go index 2b2393f07aa..92cad96d391 100644 --- a/aws/data_source_aws_nat_gateway_test.go +++ b/aws/data_source_aws_nat_gateway_test.go @@ -25,12 +25,16 @@ func TestAccDataSourceAwsNatGateway(t *testing.T) { resource.TestCheckResourceAttrPair( "data.aws_nat_gateway.test_by_subnet_id", "subnet_id", "aws_nat_gateway.test", "subnet_id"), + resource.TestCheckResourceAttrPair( + "data.aws_nat_gateway.test_by_tags", "tags.Name", + "aws_nat_gateway.test", "tags.Name"), resource.TestCheckResourceAttrSet("data.aws_nat_gateway.test_by_id", "state"), resource.TestCheckResourceAttrSet("data.aws_nat_gateway.test_by_id", "allocation_id"), resource.TestCheckResourceAttrSet("data.aws_nat_gateway.test_by_id", "network_interface_id"), resource.TestCheckResourceAttrSet("data.aws_nat_gateway.test_by_id", "public_ip"), resource.TestCheckResourceAttrSet("data.aws_nat_gateway.test_by_id", "private_ip"), resource.TestCheckNoResourceAttr("data.aws_nat_gateway.test_by_id", "attached_vpc_id"), + resource.TestCheckResourceAttrSet("data.aws_nat_gateway.test_by_id", "tags.OtherTag"), ), }, }, @@ -73,13 +77,13 @@ resource "aws_internet_gateway" "test" { } } -# NGWs are not taggable, either resource "aws_nat_gateway" "test" { subnet_id = "${aws_subnet.test.id}" allocation_id = "${aws_eip.test.id}" tags { - Name = "terraform-testacc-nat-gw-data-source" + Name = "terraform-testacc-nat-gw-data-source-%d" + OtherTag = "some-value" } depends_on = ["aws_internet_gateway.test"] @@ -93,5 +97,11 @@ data "aws_nat_gateway" "test_by_subnet_id" { subnet_id = "${aws_nat_gateway.test.subnet_id}" } -`, rInt, rInt, rInt) +data "aws_nat_gateway" "test_by_tags" { + tags { + Name = "${aws_nat_gateway.test.tags["Name"]}" + } +} + +`, rInt, rInt, rInt, rInt) } From 2ffd01316c0cb940d9f59f77756df3bf87f06c33 Mon Sep 17 00:00:00 2001 From: Florian Sellmayr Date: Sat, 20 Oct 2018 15:31:01 +0700 Subject: [PATCH 2958/3316] d/aws_nat_gateway: Add tags to list arguments in documentation --- website/docs/d/nat_gateway.html.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/d/nat_gateway.html.markdown b/website/docs/d/nat_gateway.html.markdown index f8fd3a8a48d..e4320f8ffaa 100644 --- a/website/docs/d/nat_gateway.html.markdown +++ b/website/docs/d/nat_gateway.html.markdown @@ -42,6 +42,8 @@ Nat Gateway whose data will be exported as attributes. * `subnet_id` - (Optional) The id of subnet that the Nat Gateway resides in. * `vpc_id` - (Optional) The id of the VPC that the Nat Gateway resides in. * `state` - (Optional) The state of the NAT gateway (pending | failed | available | deleting | deleted ). +* `tags` - (Optional) A mapping of tags, each pair of which must exactly match + a pair on the desired Nat Gateway. * `filter` - (Optional) Custom filter block as described below. More complex filters can be expressed using one or more `filter` sub-blocks, which take the following arguments: From bc66f1f519cc7fde847c18c0b1769e9ed268f29e Mon Sep 17 00:00:00 2001 From: "David J. Felix" Date: Sat, 20 Oct 2018 13:24:49 -0400 Subject: [PATCH 2959/3316] docs: put the equals back for video codec options --- website/docs/r/elastic_transcoder_preset.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/elastic_transcoder_preset.html.markdown b/website/docs/r/elastic_transcoder_preset.html.markdown index f71a0f8c6b1..bca4291e784 100644 --- a/website/docs/r/elastic_transcoder_preset.html.markdown +++ b/website/docs/r/elastic_transcoder_preset.html.markdown @@ -44,7 +44,7 @@ resource "aws_elastictranscoder_preset" "bar" { sizing_policy = "Fit" } - video_codec_options { + video_codec_options = { Profile = "main" Level = "2.2" MaxReferenceFrames = 3 From 0c2a0e646da1af7e463da1585242cf11843540bb Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Sat, 20 Oct 2018 21:17:59 +0200 Subject: [PATCH 2960/3316] r/resource_aws_iot_policy_attachment return more informative errors, add destruction check in tests --- aws/resource_aws_iot_policy_attachment.go | 50 +++++++----- ...resource_aws_iot_policy_attachment_test.go | 76 ++++++++++++------- 2 files changed, 82 insertions(+), 44 deletions(-) diff --git a/aws/resource_aws_iot_policy_attachment.go b/aws/resource_aws_iot_policy_attachment.go index 392820187d5..eba80e6fecc 100644 --- a/aws/resource_aws_iot_policy_attachment.go +++ b/aws/resource_aws_iot_policy_attachment.go @@ -41,18 +41,17 @@ func resourceAwsIotPolicyAttachmentCreate(d *schema.ResourceData, meta interface }) if err != nil { - log.Printf("[ERROR] Error attaching policy %s to target %s: %s", policyName, target, err) - return err + return fmt.Errorf("error attaching policy %s to target %s: %s", policyName, target, err) } d.SetId(fmt.Sprintf("%s|%s", policyName, target)) return resourceAwsIotPolicyAttachmentRead(d, meta) } -func listIotPolicyAttachmentPages(c *iot.IoT, input *iot.ListAttachedPoliciesInput, +func listIotPolicyAttachmentPages(conn *iot.IoT, input *iot.ListAttachedPoliciesInput, fn func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool) error { for { - page, err := c.ListAttachedPolicies(input) + page, err := conn.ListAttachedPolicies(input) if err != nil { return err } @@ -67,22 +66,18 @@ func listIotPolicyAttachmentPages(c *iot.IoT, input *iot.ListAttachedPoliciesInp return nil } -func resourceAwsIotPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - policyName := d.Get("policy").(string) - target := d.Get("target").(string) - +func getIotPolicyAttachment(conn *iot.IoT, target, policyName string) (*iot.Policy, error) { var policy *iot.Policy - err := listIotPolicyAttachmentPages(conn, &iot.ListAttachedPoliciesInput{ + input := &iot.ListAttachedPoliciesInput{ PageSize: aws.Int64(250), Recursive: aws.Bool(false), Target: aws.String(target), - }, func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool { + } + + err := listIotPolicyAttachmentPages(conn, input, func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool { for _, att := range out.Policies { - name := aws.StringValue(att.PolicyName) - if name == policyName { + if policyName == aws.StringValue(att.PolicyName) { policy = att return false } @@ -90,12 +85,25 @@ func resourceAwsIotPolicyAttachmentRead(d *schema.ResourceData, meta interface{} return true }) + return policy, err +} + +func resourceAwsIotPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + policyName := d.Get("policy").(string) + target := d.Get("target").(string) + + var policy *iot.Policy + + policy, err := getIotPolicyAttachment(conn, target, policyName) + if err != nil { - log.Printf("[ERROR] Error listing policy attachments for target %s: %s", target, err) - return err + return fmt.Errorf("error listing policy attachments for target %s: %s", target, err) } if policy == nil { + log.Printf("[WARN] IOT Policy Attachment (%s) not found, removing from state", d.Id()) d.SetId("") return nil } @@ -114,9 +122,15 @@ func resourceAwsIotPolicyAttachmentDelete(d *schema.ResourceData, meta interface Target: aws.String(target), }) + // DetachPolicy doesn't return an error if the policy doesn't exist, + // but it returns an error if the Target is not found. + if isAWSErr(err, iot.ErrCodeInvalidRequestException, "Invalid Target") { + log.Printf("[WARN] IOT target (%s) not found, removing attachment to policy (%s) from state", target, policyName) + return nil + } + if err != nil { - log.Printf("[ERROR] Error detaching policy %s from target %s: %s", policyName, target, err) - return err + return fmt.Errorf("error detaching policy %s from target %s: %s", policyName, target, err) } return nil diff --git a/aws/resource_aws_iot_policy_attachment_test.go b/aws/resource_aws_iot_policy_attachment_test.go index bb991210079..d402e086693 100644 --- a/aws/resource_aws_iot_policy_attachment_test.go +++ b/aws/resource_aws_iot_policy_attachment_test.go @@ -18,35 +18,35 @@ func TestAccAWSIotPolicyAttachment_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, - CheckDestroy: testAccCheckAWSIotPolicyAttchmentDestroy_basic, + CheckDestroy: testAccCheckAWSIotPolicyAttchmentDestroy, Steps: []resource.TestStep{ { Config: testAccAWSIotPolicyAttachmentConfig(policyName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att", 1), + testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att"), testAccCheckAWSIotPolicyAttachmentCertStatus("aws_iot_certificate.cert", []string{policyName}), ), }, { Config: testAccAWSIotPolicyAttachmentConfigUpdate1(policyName, policyName2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att", 2), - testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att2", 2), + testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att"), + testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att2"), testAccCheckAWSIotPolicyAttachmentCertStatus("aws_iot_certificate.cert", []string{policyName, policyName2}), ), }, { Config: testAccAWSIotPolicyAttachmentConfigUpdate2(policyName2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att2", 1), + testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att2"), testAccCheckAWSIotPolicyAttachmentCertStatus("aws_iot_certificate.cert", []string{policyName2}), ), }, { Config: testAccAWSIotPolicyAttachmentConfigUpdate3(policyName2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att2", 1), - testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att3", 1), + testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att2"), + testAccCheckAWSIotPolicyAttachmentExists("aws_iot_policy_attachment.att3"), testAccCheckAWSIotPolicyAttachmentCertStatus("aws_iot_certificate.cert", []string{policyName2}), testAccCheckAWSIotPolicyAttachmentCertStatus("aws_iot_certificate.cert2", []string{policyName2}), ), @@ -56,11 +56,49 @@ func TestAccAWSIotPolicyAttachment_basic(t *testing.T) { } -func testAccCheckAWSIotPolicyAttchmentDestroy_basic(s *terraform.State) error { +func testAccCheckAWSIotPolicyAttchmentDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).iotconn + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_iot_policy_attachment" { + continue + } + + target := rs.Primary.Attributes["target"] + policyName := rs.Primary.Attributes["policy"] + + input := &iot.ListAttachedPoliciesInput{ + PageSize: aws.Int64(250), + Recursive: aws.Bool(false), + Target: aws.String(target), + } + + var policy *iot.Policy + err := listIotPolicyAttachmentPages(conn, input, func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool { + for _, att := range out.Policies { + if policyName == aws.StringValue(att.PolicyName) { + policy = att + return false + } + } + return true + }) + + if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "The certificate given in the principal does not exist.") { + continue + } else if err != nil { + return err + } + + if policy == nil { + continue + } + + return fmt.Errorf("IOT Policy Attachment (%s) still exists", rs.Primary.Attributes["id"]) + } return nil } -func testAccCheckAWSIotPolicyAttachmentExists(n string, c int) resource.TestCheckFunc { +func testAccCheckAWSIotPolicyAttachmentExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -75,27 +113,13 @@ func testAccCheckAWSIotPolicyAttachmentExists(n string, c int) resource.TestChec target := rs.Primary.Attributes["target"] policyName := rs.Primary.Attributes["policy"] - out, err := conn.ListAttachedPolicies(&iot.ListAttachedPoliciesInput{ - Target: aws.String(target), - PageSize: aws.Int64(250), - }) + policy, err := getIotPolicyAttachment(conn, target, policyName) if err != nil { - return fmt.Errorf("Error: Failed to get attached policies for target %s (%s)", target, n) - } - if len(out.Policies) != c { - return fmt.Errorf("Error: Target (%s) has wrong number of policies attached on initial creation", target) - } - - found := false - for _, p := range out.Policies { - if policyName == aws.StringValue(p.PolicyName) { - found = true - break - } + return fmt.Errorf("Error: Failed to get attached policies for target %s (%s): %s", target, n, err) } - if !found { + if policy == nil { return fmt.Errorf("Error: Policy %s is not attached to target (%s)", policyName, target) } From 6ac7474d648365a6871b8e7c6d8bc7ee6959b545 Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Sat, 20 Oct 2018 22:05:30 +0200 Subject: [PATCH 2961/3316] r/aws_iot_thing_principal_attachment return more informative errors, add destruction check in tests --- ...urce_aws_iot_thing_principal_attachment.go | 41 +++++++------ ...aws_iot_thing_principal_attachment_test.go | 61 +++++++++++-------- 2 files changed, 59 insertions(+), 43 deletions(-) diff --git a/aws/resource_aws_iot_thing_principal_attachment.go b/aws/resource_aws_iot_thing_principal_attachment.go index cb0412d1b00..4cc9e939524 100644 --- a/aws/resource_aws_iot_thing_principal_attachment.go +++ b/aws/resource_aws_iot_thing_principal_attachment.go @@ -42,41 +42,47 @@ func resourceAwsIotThingPrincipalAttachmentCreate(d *schema.ResourceData, meta i }) if err != nil { - log.Printf("[ERROR] Error attaching principal %s to thing %s: %s", principal, thing, err) - return err + return fmt.Errorf("error attaching principal %s to thing %s: %s", principal, thing, err) } d.SetId(fmt.Sprintf("%s|%s", thing, principal)) return resourceAwsIotThingPrincipalAttachmentRead(d, meta) } -func resourceAwsIotThingPrincipalAttachmentRead(d *schema.ResourceData, meta interface{}) error { - conn := meta.(*AWSClient).iotconn - - principal := d.Get("principal").(string) - thing := d.Get("thing").(string) - +func getIoTThingPricipalAttachment(conn *iot.IoT, thing, principal string) (bool, error) { out, err := conn.ListThingPrincipals(&iot.ListThingPrincipalsInput{ ThingName: aws.String(thing), }) - - if err != nil { - log.Printf("[ERROR] Error listing principals for thing %s: %s", thing, err) - return err + if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { + return false, nil + } else if err != nil { + return false, err } - found := false - for _, name := range out.Principals { if principal == aws.StringValue(name) { found = true break } } + return found, nil +} + +func resourceAwsIotThingPrincipalAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + principal := d.Get("principal").(string) + thing := d.Get("thing").(string) + + found, err := getIoTThingPricipalAttachment(conn, thing, principal) + + if err != nil { + return fmt.Errorf("error listing principals for thing %s: %s", thing, err) + } if !found { + log.Printf("[WARN] IoT Thing Principal Attachment (%s) not found, removing from state", d.Id()) d.SetId("") - return nil } return nil @@ -94,10 +100,9 @@ func resourceAwsIotThingPrincipalAttachmentDelete(d *schema.ResourceData, meta i }) if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] IoT Principal %s or Thing %s not found - removing from state", principal, thing) + log.Printf("[WARN] IoT Principal %s or Thing %s not found, removing from state", principal, thing) } else if err != nil { - log.Printf("[ERROR] Error detaching principal %s from thing %s: %s", principal, thing, err) - return err + return fmt.Errorf("error detaching principal %s from thing %s: %s", principal, thing, err) } return nil diff --git a/aws/resource_aws_iot_thing_principal_attachment_test.go b/aws/resource_aws_iot_thing_principal_attachment_test.go index d87b6afffd5..bebc86ff089 100644 --- a/aws/resource_aws_iot_thing_principal_attachment_test.go +++ b/aws/resource_aws_iot_thing_principal_attachment_test.go @@ -18,20 +18,20 @@ func TestAccAWSIotThingPrincipalAttachment_basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, - CheckDestroy: testAccCheckAWSIotThingPrincipalAttachmentDestroy_basic, + CheckDestroy: testAccCheckAWSIotThingPrincipalAttachmentDestroy, Steps: []resource.TestStep{ { Config: testAccAWSIotThingPrincipalAttachmentConfig(thingName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att", 1), + testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att"), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName, true, []string{"aws_iot_certificate.cert"}), ), }, { Config: testAccAWSIotThingPrincipalAttachmentConfigUpdate1(thingName, thingName2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att", 1), - testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att2", 1), + testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att"), + testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att2"), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName, true, []string{"aws_iot_certificate.cert"}), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName2, true, []string{"aws_iot_certificate.cert"}), ), @@ -39,7 +39,7 @@ func TestAccAWSIotThingPrincipalAttachment_basic(t *testing.T) { { Config: testAccAWSIotThingPrincipalAttachmentConfigUpdate2(thingName, thingName2), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att", 1), + testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att"), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName, true, []string{"aws_iot_certificate.cert"}), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName2, true, []string{}), ), @@ -47,7 +47,8 @@ func TestAccAWSIotThingPrincipalAttachment_basic(t *testing.T) { { Config: testAccAWSIotThingPrincipalAttachmentConfigUpdate3(thingName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att", 2), + testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att"), + testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att2"), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName, true, []string{"aws_iot_certificate.cert", "aws_iot_certificate.cert2"}), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName2, false, []string{}), ), @@ -55,7 +56,7 @@ func TestAccAWSIotThingPrincipalAttachment_basic(t *testing.T) { { Config: testAccAWSIotThingPrincipalAttachmentConfigUpdate4(thingName), Check: resource.ComposeTestCheckFunc( - testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att2", 1), + testAccCheckAWSIotThingPrincipalAttachmentExists("aws_iot_thing_principal_attachment.att2"), testAccCheckAWSIotThingPrincipalAttachmentStatus(thingName, true, []string{"aws_iot_certificate.cert2"}), ), }, @@ -63,11 +64,34 @@ func TestAccAWSIotThingPrincipalAttachment_basic(t *testing.T) { }) } -func testAccCheckAWSIotThingPrincipalAttachmentDestroy_basic(s *terraform.State) error { +func testAccCheckAWSIotThingPrincipalAttachmentDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).iotconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_iot_thing_principal_attachment" { + continue + } + + principal := rs.Primary.Attributes["principal"] + thing := rs.Primary.Attributes["thing"] + + found, err := getIoTThingPricipalAttachment(conn, thing, principal) + + if err != nil { + return fmt.Errorf("Error: Failed listing principals for thing (%s): %s", thing, err) + } + + if !found { + continue + } + + return fmt.Errorf("IOT Thing Principal Attachment (%s) still exists", rs.Primary.Attributes["id"]) + } + return nil } -func testAccCheckAWSIotThingPrincipalAttachmentExists(n string, c int) resource.TestCheckFunc { +func testAccCheckAWSIotThingPrincipalAttachmentExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] if !ok { @@ -82,27 +106,14 @@ func testAccCheckAWSIotThingPrincipalAttachmentExists(n string, c int) resource. thing := rs.Primary.Attributes["thing"] principal := rs.Primary.Attributes["principal"] - res, err := conn.ListThingPrincipals(&iot.ListThingPrincipalsInput{ - ThingName: aws.String(thing), - }) + found, err := getIoTThingPricipalAttachment(conn, thing, principal) if err != nil { - return fmt.Errorf("Error: Failed to get principals for thing %s (%s)", thing, n) - } - - if len(res.Principals) != c { - return fmt.Errorf("Error: Thing (%s) has wrong number of principals attached on initial creation", thing) - } - - found := false - for _, p := range res.Principals { - if principal == aws.StringValue(p) { - found = true - } + return fmt.Errorf("Error: Failed listing principals for thing (%s), resource (%s): %s", thing, n, err) } if !found { - return fmt.Errorf("Error: Principal %s is not attached to thing %s", thing, principal) + return fmt.Errorf("Error: Principal (%s) is not attached to thing (%s), resource (%s)", principal, thing, n) } return nil From 64608225a852f9eca5a8051af270c38a000d275f Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 28 Sep 2018 14:55:47 -0400 Subject: [PATCH 2962/3316] Support S3 Cross-Region Replication filtering based on S3 object tags. --- aws/resource_aws_s3_bucket.go | 104 ++++++- aws/resource_aws_s3_bucket_test.go | 379 +++++++++++++++++++++++++ aws/tags.go | 22 ++ aws/tags_test.go | 44 +++ website/docs/r/s3_bucket.html.markdown | 17 +- 5 files changed, 558 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index d59ef9be429..784523543f8 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -449,7 +449,7 @@ func resourceAwsS3Bucket() *schema.Resource { }, "prefix": { Type: schema.TypeString, - Required: true, + Optional: true, ValidateFunc: validation.StringLenBetween(0, 1024), }, "status": { @@ -460,6 +460,26 @@ func resourceAwsS3Bucket() *schema.Resource { s3.ReplicationRuleStatusDisabled, }, false), }, + "priority": { + Type: schema.TypeInt, + Optional: true, + }, + "filter": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "prefix": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 1024), + }, + "tags": tagsSchema(), + }, + }, + }, }, }, }, @@ -1754,14 +1774,19 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. rules := []*s3.ReplicationRule{} for _, v := range rcRules { rr := v.(map[string]interface{}) - rcRule := &s3.ReplicationRule{ - Prefix: aws.String(rr["prefix"].(string)), - Status: aws.String(rr["status"].(string)), + rcRule := &s3.ReplicationRule{} + if status, ok := rr["status"]; ok && status != "" { + rcRule.Status = aws.String(status.(string)) + } else { + continue } - if rrid, ok := rr["id"]; ok { + if rrid, ok := rr["id"]; ok && rrid != "" { rcRule.ID = aws.String(rrid.(string)) } + if prefix, ok := rr["prefix"]; ok && prefix != "" { + rcRule.Prefix = aws.String(prefix.(string)) + } ruleDestination := &s3.Destination{} if dest, ok := rr["destination"].(*schema.Set); ok && dest.Len() > 0 { @@ -1807,6 +1832,26 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. } rcRule.SourceSelectionCriteria = ruleSsc } + + if f, ok := rr["filter"].([]interface{}); ok && len(f) > 0 { + // XML schema V2. + rcRule.Priority = aws.Int64(int64(rr["priority"].(int))) + rcRule.Filter = &s3.ReplicationRuleFilter{} + filter := f[0].(map[string]interface{}) + tags := filter["tags"].(map[string]interface{}) + if len(tags) > 0 { + rcRule.Filter.And = &s3.ReplicationRuleAndOperator{ + Prefix: aws.String(filter["prefix"].(string)), + Tags: tagsFromMapS3(tags), + } + } else { + rcRule.Filter.Prefix = aws.String(filter["prefix"].(string)) + } + rcRule.DeleteMarkerReplication = &s3.DeleteMarkerReplication{ + Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), + } + } + rules = append(rules, rcRule) } @@ -1817,8 +1862,15 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. } log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketReplication(i) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + if _, err := s3conn.PutBucketReplication(i); err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || + isAWSErr(err, "InvalidRequest", "Versioning must be 'Enabled' on the bucket") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil }) if err != nil { return fmt.Errorf("Error putting S3 replication configuration: %s", err) @@ -2068,6 +2120,26 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) } t["source_selection_criteria"] = schema.NewSet(sourceSelectionCriteriaHash, []interface{}{tssc}) } + + if v.Priority != nil { + t["priority"] = int(aws.Int64Value(v.Priority)) + } + + if f := v.Filter; f != nil { + m := map[string]interface{}{} + if f.Prefix != nil { + m["prefix"] = aws.StringValue(f.Prefix) + } + if t := f.Tag; t != nil { + m["tags"] = tagsMapToRaw(tagsToMapS3([]*s3.Tag{t})) + } + if a := f.And; a != nil { + m["prefix"] = aws.StringValue(a.Prefix) + m["tags"] = tagsMapToRaw(tagsToMapS3(a.Tags)) + } + t["filter"] = []interface{}{m} + } + rules = append(rules, t) } m["rules"] = schema.NewSet(rulesHash, rules) @@ -2213,6 +2285,24 @@ func rulesHash(v interface{}) int { if v, ok := m["source_selection_criteria"].(*schema.Set); ok && v.Len() > 0 && v.List()[0] != nil { buf.WriteString(fmt.Sprintf("%d-", sourceSelectionCriteriaHash(v.List()[0]))) } + if v, ok := m["priority"]; ok { + buf.WriteString(fmt.Sprintf("%d-", v.(int))) + } + if v, ok := m["filter"].([]interface{}); ok && len(v) > 0 && v[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", replicationRuleFilterHash(v[0]))) + } + return hashcode.String(buf.String()) +} + +func replicationRuleFilterHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + if v, ok := m["prefix"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + if v, ok := m["tags"]; ok { + buf.WriteString(fmt.Sprintf("%d-", tagsMapToHash(v.(map[string]interface{})))) + } return hashcode.String(buf.String()) } diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index 569973d13f3..245c44a5504 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -6,6 +6,7 @@ import ( "fmt" "reflect" "regexp" + "sort" "strconv" "testing" "text/template" @@ -1118,6 +1119,186 @@ func TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError(t *testing.T) }) } +func TestAccAWSS3Bucket_ReplicationSchemaV2(t *testing.T) { + rInt := acctest.RandInt() + region := testAccGetRegion() + partition := testAccGetPartition() + + // record the initialized providers so that we can use them to check for the instances in each region + var providers []*schema.Provider + + resource.Test(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckWithProviders(testAccCheckAWSS3BucketDestroyWithProvider, &providers), + Steps: []resource.TestStep{ + { + Config: testAccAWSS3BucketConfigReplicationWithV2ConfigurationNoTags(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws[\\w-]*:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), + testAccCheckAWSS3BucketReplicationRules( + "aws_s3_bucket.bucket", + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + }, + Status: aws.String(s3.ReplicationRuleStatusEnabled), + Filter: &s3.ReplicationRuleFilter{ + Prefix: aws.String("foo"), + }, + Priority: aws.Int64(0), + DeleteMarkerReplication: &s3.DeleteMarkerReplication{ + Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), + }, + }, + }, + ), + ), + }, + { + Config: testAccAWSS3BucketConfigReplicationWithV2ConfigurationOnlyOneTag(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws[\\w-]*:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), + testAccCheckAWSS3BucketReplicationRules( + "aws_s3_bucket.bucket", + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + }, + Status: aws.String(s3.ReplicationRuleStatusEnabled), + Filter: &s3.ReplicationRuleFilter{ + And: &s3.ReplicationRuleAndOperator{ + Prefix: aws.String(""), + Tags: []*s3.Tag{ + { + Key: aws.String("ReplicateMe"), + Value: aws.String("Yes"), + }, + }, + }, + }, + Priority: aws.Int64(42), + DeleteMarkerReplication: &s3.DeleteMarkerReplication{ + Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), + }, + }, + }, + ), + ), + }, + { + Config: testAccAWSS3BucketConfigReplicationWithV2ConfigurationPrefixAndTags(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws[\\w-]*:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), + testAccCheckAWSS3BucketReplicationRules( + "aws_s3_bucket.bucket", + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + }, + Status: aws.String(s3.ReplicationRuleStatusEnabled), + Filter: &s3.ReplicationRuleFilter{ + And: &s3.ReplicationRuleAndOperator{ + Prefix: aws.String("foo"), + Tags: []*s3.Tag{ + { + Key: aws.String("ReplicateMe"), + Value: aws.String("Yes"), + }, + { + Key: aws.String("AnotherTag"), + Value: aws.String("OK"), + }, + }, + }, + }, + Priority: aws.Int64(41), + DeleteMarkerReplication: &s3.DeleteMarkerReplication{ + Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), + }, + }, + }, + ), + ), + }, + { + Config: testAccAWSS3BucketConfigReplicationWithV2ConfigurationMultipleTags(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.#", "1"), + resource.TestMatchResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.role", regexp.MustCompile(fmt.Sprintf("^arn:aws[\\w-]*:iam::[\\d+]+:role/tf-iam-role-replication-%d", rInt))), + resource.TestCheckResourceAttr("aws_s3_bucket.bucket", "replication_configuration.0.rules.#", "1"), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), + testAccCheckAWSS3BucketReplicationRules( + "aws_s3_bucket.bucket", + testAccAwsRegionProviderFunc(region, &providers), + []*s3.ReplicationRule{ + { + ID: aws.String("foobar"), + Destination: &s3.Destination{ + Bucket: aws.String(fmt.Sprintf("arn:%s:s3:::tf-test-bucket-destination-%d", partition, rInt)), + StorageClass: aws.String(s3.ObjectStorageClassStandard), + }, + Status: aws.String(s3.ReplicationRuleStatusEnabled), + Filter: &s3.ReplicationRuleFilter{ + And: &s3.ReplicationRuleAndOperator{ + Prefix: aws.String(""), + Tags: []*s3.Tag{ + { + Key: aws.String("ReplicateMe"), + Value: aws.String("Yes"), + }, + { + Key: aws.String("AnotherTag"), + Value: aws.String("OK"), + }, + { + Key: aws.String("Foo"), + Value: aws.String("Bar"), + }, + }, + }, + }, + Priority: aws.Int64(0), + DeleteMarkerReplication: &s3.DeleteMarkerReplication{ + Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), + }, + }, + }, + ), + ), + }, + }, + }) +} + func TestAWSS3BucketName(t *testing.T) { validDnsNames := []string{ "foobar", @@ -1577,6 +1758,14 @@ func testAccCheckAWSS3BucketReplicationRules(n string, providerF func() *schema. } } } + // Sort filter tags by key. + if filter := rule.Filter; filter != nil { + if and := filter.And; and != nil { + if tags := and.Tags; tags != nil { + sort.Slice(tags, func(i, j int) bool { return *tags[i].Key < *tags[j].Key }) + } + } + } } provider := providerF() @@ -1594,6 +1783,17 @@ func testAccCheckAWSS3BucketReplicationRules(n string, providerF func() *schema. } return fmt.Errorf("GetReplicationConfiguration error: %v", err) } + + for _, rule := range out.ReplicationConfiguration.Rules { + // Sort filter tags by key. + if filter := rule.Filter; filter != nil { + if and := filter.And; and != nil { + if tags := and.Tags; tags != nil { + sort.Slice(tags, func(i, j int) bool { return *tags[i].Key < *tags[j].Key }) + } + } + } + } if !reflect.DeepEqual(out.ReplicationConfiguration.Rules, rules) { return fmt.Errorf("bad replication rules, expected: %v, got %v", rules, out.ReplicationConfiguration.Rules) } @@ -2474,6 +2674,185 @@ resource "aws_s3_bucket" "destination" { `, randInt, randInt, randInt) } +func testAccAWSS3BucketConfigReplicationWithV2ConfigurationNoTags(randInt int) string { + return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` +resource "aws_s3_bucket" "bucket" { + provider = "aws.uswest2" + bucket = "tf-test-bucket-%d" + acl = "private" + + versioning { + enabled = true + } + + replication_configuration { + role = "${aws_iam_role.role.arn}" + rules { + id = "foobar" + status = "Enabled" + + filter { + prefix = "foo" + } + + destination { + bucket = "${aws_s3_bucket.destination.arn}" + storage_class = "STANDARD" + } + } + } +} + +resource "aws_s3_bucket" "destination" { + provider = "aws.euwest" + bucket = "tf-test-bucket-destination-%d" + region = "eu-west-1" + + versioning { + enabled = true + } +} +`, randInt, randInt, randInt) +} + +func testAccAWSS3BucketConfigReplicationWithV2ConfigurationOnlyOneTag(randInt int) string { + return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` +resource "aws_s3_bucket" "bucket" { + provider = "aws.uswest2" + bucket = "tf-test-bucket-%d" + acl = "private" + + versioning { + enabled = true + } + + replication_configuration { + role = "${aws_iam_role.role.arn}" + rules { + id = "foobar" + status = "Enabled" + + priority = 42 + + filter { + tags { + ReplicateMe = "Yes" + } + } + + destination { + bucket = "${aws_s3_bucket.destination.arn}" + storage_class = "STANDARD" + } + } + } +} + +resource "aws_s3_bucket" "destination" { + provider = "aws.euwest" + bucket = "tf-test-bucket-destination-%d" + region = "eu-west-1" + + versioning { + enabled = true + } +} +`, randInt, randInt, randInt) +} + +func testAccAWSS3BucketConfigReplicationWithV2ConfigurationPrefixAndTags(randInt int) string { + return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` +resource "aws_s3_bucket" "bucket" { + provider = "aws.uswest2" + bucket = "tf-test-bucket-%d" + acl = "private" + + versioning { + enabled = true + } + + replication_configuration { + role = "${aws_iam_role.role.arn}" + rules { + id = "foobar" + status = "Enabled" + + priority = 41 + + filter { + prefix = "foo" + + tags { + AnotherTag = "OK" + ReplicateMe = "Yes" + } + } + + destination { + bucket = "${aws_s3_bucket.destination.arn}" + storage_class = "STANDARD" + } + } + } +} + +resource "aws_s3_bucket" "destination" { + provider = "aws.euwest" + bucket = "tf-test-bucket-destination-%d" + region = "eu-west-1" + + versioning { + enabled = true + } +} +`, randInt, randInt, randInt) +} + +func testAccAWSS3BucketConfigReplicationWithV2ConfigurationMultipleTags(randInt int) string { + return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` +resource "aws_s3_bucket" "bucket" { + provider = "aws.uswest2" + bucket = "tf-test-bucket-%d" + acl = "private" + + versioning { + enabled = true + } + + replication_configuration { + role = "${aws_iam_role.role.arn}" + rules { + id = "foobar" + status = "Enabled" + + filter { + tags { + AnotherTag = "OK" + Foo = "Bar" + ReplicateMe = "Yes" + } + } + + destination { + bucket = "${aws_s3_bucket.destination.arn}" + storage_class = "STANDARD" + } + } + } +} + +resource "aws_s3_bucket" "destination" { + provider = "aws.euwest" + bucket = "tf-test-bucket-destination-%d" + region = "eu-west-1" + + versioning { + enabled = true + } +} +`, randInt, randInt, randInt) +} + const testAccAWSS3BucketConfig_namePrefix = ` resource "aws_s3_bucket" "test" { bucket_prefix = "tf-test-" diff --git a/aws/tags.go b/aws/tags.go index 7a4bfdef174..b2293ba9e17 100644 --- a/aws/tags.go +++ b/aws/tags.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "regexp" "strings" @@ -11,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -401,3 +403,23 @@ func diffTagsDynamoDb(oldTags, newTags []*dynamodb.Tag) ([]*dynamodb.Tag, []*str } return tagsFromMapDynamoDb(create), remove } + +// tagsMapToHash returns a stable hash value for a raw tags map. +// The returned value map be negative (i.e. not suitable for a 'Set' function). +func tagsMapToHash(tags map[string]interface{}) int { + total := 0 + for k, v := range tags { + total = total ^ hashcode.String(fmt.Sprintf("%s-%s", k, v)) + } + return total +} + +// tagsMapToRaw converts a tags map to its "raw" type. +func tagsMapToRaw(m map[string]string) map[string]interface{} { + raw := make(map[string]interface{}) + for k, v := range m { + raw[k] = v + } + + return raw +} diff --git a/aws/tags_test.go b/aws/tags_test.go index 1777c376408..bfe4d35d898 100644 --- a/aws/tags_test.go +++ b/aws/tags_test.go @@ -80,6 +80,50 @@ func TestIgnoringTags(t *testing.T) { } } +func TestTagsMapToHash(t *testing.T) { + cases := []struct { + Left, Right map[string]interface{} + MustBeEqual bool + }{ + { + Left: map[string]interface{}{}, + Right: map[string]interface{}{}, + MustBeEqual: true, + }, + { + Left: map[string]interface{}{ + "foo": "bar", + "bar": "baz", + }, + Right: map[string]interface{}{ + "bar": "baz", + "foo": "bar", + }, + MustBeEqual: true, + }, + { + Left: map[string]interface{}{ + "foo": "bar", + }, + Right: map[string]interface{}{ + "bar": "baz", + }, + MustBeEqual: false, + }, + } + + for i, tc := range cases { + l := tagsMapToHash(tc.Left) + r := tagsMapToHash(tc.Right) + if tc.MustBeEqual && (l != r) { + t.Fatalf("%d: Hashes don't match", i) + } + if !tc.MustBeEqual && (l == r) { + t.Logf("%d: Hashes match", i) + } + } +} + // testAccCheckTags can be used to check the tags on a resource. func testAccCheckTags( ts *[]*ec2.Tag, key string, value string) resource.TestCheckFunc { diff --git a/website/docs/r/s3_bucket.html.markdown b/website/docs/r/s3_bucket.html.markdown index 3c1ebefb875..290fecba85f 100644 --- a/website/docs/r/s3_bucket.html.markdown +++ b/website/docs/r/s3_bucket.html.markdown @@ -404,10 +404,19 @@ The `replication_configuration` object supports the following: The `rules` object supports the following: * `id` - (Optional) Unique identifier for the rule. +* `priority` - (Optional) The priority associated with the rule. * `destination` - (Required) Specifies the destination for the rule (documented below). * `source_selection_criteria` - (Optional) Specifies special object selection criteria (documented below). -* `prefix` - (Required) Object keyname prefix identifying one or more objects to which the rule applies. Set as an empty string to replicate the whole bucket. +* `prefix` - (Optional) Object keyname prefix identifying one or more objects to which the rule applies. * `status` - (Required) The status of the rule. Either `Enabled` or `Disabled`. The rule is ignored if status is not Enabled. +* `filter` - (Optional) Filter that identifies subset of objects to which the replication rule applies (documented below). + +~> **NOTE on `prefix` and `filter`:** Amazon S3's latest version of the replication configuration is V2, which includes the `filter` attribute for replication rules. +With the `filter` attribute, you can specify object filters based on the object key prefix, tags, or both to scope the objects that the rule applies to. +Replication configuration V1 supports filtering based on only the `prefix` attribute. For backwards compatibility, Amazon S3 continues to support the V1 configuration. +* For a specific rule, `prefix` conflicts with `filter` +* If any rule has `filter` specified then they all must +* `priority` is optional (with a default value of `0`) but must be unique between multiple rules The `destination` object supports the following: @@ -427,6 +436,12 @@ The `sse_kms_encrypted_objects` object supports the following: * `enabled` - (Required) Boolean which indicates if this criteria is enabled. +The `filter` object supports the following: + +* `prefix` - (Optional) Object keyname prefix that identifies subset of objects to which the rule applies. +* `tags` - (Optional) A mapping of tags that identifies subset of objects to which the rule applies. +The rule applies only to objects having all the tags in its tagset. + The `server_side_encryption_configuration` object supports the following: * `rule` - (required) A single object for server-side encryption by default configuration. (documented below) From b62a2caf51e9dd6773dae6e138e3833952dd1f86 Mon Sep 17 00:00:00 2001 From: Matthew Swain Date: Sun, 21 Oct 2018 11:44:00 +0100 Subject: [PATCH 2963/3316] Add support for security_configuration property on resource aws_glue_job. --- aws/resource_aws_glue_job.go | 15 ++++++++ aws/resource_aws_glue_job_test.go | 52 +++++++++++++++++++++++++++ website/docs/r/glue_job.html.markdown | 1 + 3 files changed, 68 insertions(+) diff --git a/aws/resource_aws_glue_job.go b/aws/resource_aws_glue_job.go index 5fd1df86376..3a296c393b7 100644 --- a/aws/resource_aws_glue_job.go +++ b/aws/resource_aws_glue_job.go @@ -95,6 +95,10 @@ func resourceAwsGlueJob() *schema.Resource { Optional: true, Default: 2880, }, + "security_configuration": { + Type: schema.TypeString, + Optional: true, + }, }, } } @@ -140,6 +144,10 @@ func resourceAwsGlueJobCreate(d *schema.ResourceData, meta interface{}) error { input.MaxRetries = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("security_configuration"); ok { + input.SecurityConfiguration = aws.String(v.(string)) + } + log.Printf("[DEBUG] Creating Glue Job: %s", input) _, err := conn.CreateJob(input) if err != nil { @@ -194,6 +202,9 @@ func resourceAwsGlueJobRead(d *schema.ResourceData, meta interface{}) error { d.Set("name", job.Name) d.Set("role_arn", job.Role) d.Set("timeout", int(aws.Int64Value(job.Timeout))) + if err := d.Set("security_configuration", job.SecurityConfiguration); err != nil { + return fmt.Errorf("error setting security_configuration: %s", err) + } return nil } @@ -237,6 +248,10 @@ func resourceAwsGlueJobUpdate(d *schema.ResourceData, meta interface{}) error { jobUpdate.MaxRetries = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("security_configuration"); ok { + jobUpdate.SecurityConfiguration = aws.String(v.(string)) + } + input := &glue.UpdateJobInput{ JobName: aws.String(d.Id()), JobUpdate: jobUpdate, diff --git a/aws/resource_aws_glue_job_test.go b/aws/resource_aws_glue_job_test.go index 502edd78b6d..aa12b0c6f7e 100644 --- a/aws/resource_aws_glue_job_test.go +++ b/aws/resource_aws_glue_job_test.go @@ -361,6 +361,40 @@ func TestAccAWSGlueJob_Timeout(t *testing.T) { }) } +func TestAccAWSGlueJob_SecurityConfiguration(t *testing.T) { + var job glue.Job + + rName := fmt.Sprintf("tf-acc-test-%s", acctest.RandString(5)) + resourceName := "aws_glue_job.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSGlueJobDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSGlueJobConfig_SecurityConfiguration(rName, "default_encryption"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "security_configuration", "default_encryption"), + ), + }, + { + Config: testAccAWSGlueJobConfig_SecurityConfiguration(rName, "custom_encryption2"), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSGlueJobExists(resourceName, &job), + resource.TestCheckResourceAttr(resourceName, "security_configuration", "custom_encryption2"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testAccCheckAWSGlueJobExists(resourceName string, job *glue.Job) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[resourceName] @@ -605,3 +639,21 @@ resource "aws_glue_job" "test" { } `, testAccAWSGlueJobConfig_Base(rName), rName, timeout) } + +func testAccAWSGlueJobConfig_SecurityConfiguration(rName string, securityConfiguration string) string { + return fmt.Sprintf(` +%s + +resource "aws_glue_job" "test" { + name = "%s" + role_arn = "${aws_iam_role.test.arn}" + security_configuration = "%s" + + command { + script_location = "testscriptlocation" + } + + depends_on = ["aws_iam_role_policy_attachment.test"] +} +`, testAccAWSGlueJobConfig_Base(rName), rName, securityConfiguration) +} diff --git a/website/docs/r/glue_job.html.markdown b/website/docs/r/glue_job.html.markdown index 598bb1c922c..1e280de8bd2 100644 --- a/website/docs/r/glue_job.html.markdown +++ b/website/docs/r/glue_job.html.markdown @@ -56,6 +56,7 @@ The following arguments are supported: * `name` – (Required) The name you assign to this job. It must be unique in your account. * `role_arn` – (Required) The ARN of the IAM role associated with this job. * `timeout` – (Optional) The job timeout in minutes. The default is 2880 minutes (48 hours). +* `security_configuration` - (Optional) The name of the Security Configuration to be associated with the job. ### command Argument Reference From 4cff326fbc451a48d04871f28ffef8f761d4c884 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Sun, 21 Oct 2018 17:49:22 -0400 Subject: [PATCH 2964/3316] 'IntInSlice' -> 'validateIntegerInSlice'. --- ...source_aws_dx_private_virtual_interface.go | 21 +------- aws/validators.go | 19 +++++++ aws/validators_test.go | 51 +++++++++++++++++++ 3 files changed, 71 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 3b99ff24cbd..d013acc8fc2 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -88,7 +88,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Type: schema.TypeInt, Default: 1500, Optional: true, - ValidateFunc: IntInSlice([]int{1500, 9001}), + ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), }, "jumbo_frame_capable": { Type: schema.TypeBool, @@ -235,22 +235,3 @@ func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *d directconnect.VirtualInterfaceStateDown, }) } - -func IntInSlice(valid []int) schema.SchemaValidateFunc { - return func(i interface{}, k string) (s []string, es []error) { - v, ok := i.(int) - if !ok { - es = append(es, fmt.Errorf("expected type of %s to be int", k)) - return - } - - for _, in := range valid { - if v == in { - return - } - } - - es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v)) - return - } -} diff --git a/aws/validators.go b/aws/validators.go index 3d064ea0de5..f16a0f887c3 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -365,6 +365,25 @@ func validateIntegerInRange(min, max int) schema.SchemaValidateFunc { } } +func validateIntegerInSlice(valid []int) schema.SchemaValidateFunc { + return func(i interface{}, k string) (s []string, es []error) { + v, ok := i.(int) + if !ok { + es = append(es, fmt.Errorf("expected type of %s to be int", k)) + return + } + + for _, in := range valid { + if v == in { + return + } + } + + es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v)) + return + } +} + func validateCloudWatchEventTargetId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 64 { diff --git a/aws/validators_test.go b/aws/validators_test.go index 8ea201bfdd4..bb5349b5873 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/aws/aws-sdk-go/service/cognitoidentity" + "github.com/hashicorp/terraform/helper/schema" ) func TestValidateRFC3339TimeString(t *testing.T) { @@ -648,6 +649,56 @@ func TestValidateIntegerInRange(t *testing.T) { } } +func TestValidateIntegerInSlice(t *testing.T) { + cases := []struct { + val interface{} + f schema.SchemaValidateFunc + expectedErr *regexp.Regexp + }{ + { + val: 42, + f: validateIntegerInSlice([]int{2, 4, 42, 420}), + }, + { + val: 42, + f: validateIntegerInSlice([]int{0, 43}), + expectedErr: regexp.MustCompile("expected [\\w]+ to be one of \\[0 43\\], got 42"), + }, + { + val: "42", + f: validateIntegerInSlice([]int{0, 42}), + expectedErr: regexp.MustCompile("expected type of [\\w]+ to be int"), + }, + } + + matchErr := func(errs []error, r *regexp.Regexp) bool { + // err must match one provided + for _, err := range errs { + if r.MatchString(err.Error()) { + return true + } + } + + return false + } + + for i, tc := range cases { + _, errs := tc.f(tc.val, "test_property") + + if len(errs) == 0 && tc.expectedErr == nil { + continue + } + + if len(errs) != 0 && tc.expectedErr == nil { + t.Fatalf("expected test case %d to produce no errors, got %v", i, errs) + } + + if !matchErr(errs, tc.expectedErr) { + t.Fatalf("expected test case %d to produce error matching \"%s\", got %v", i, tc.expectedErr, errs) + } + } +} + func TestResourceAWSElastiCacheClusterIdValidation(t *testing.T) { cases := []struct { Value string From 0cf60abce654fb32cba7666b6c2e4d687e97ea15 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Sun, 21 Oct 2018 18:27:51 -0400 Subject: [PATCH 2965/3316] Add Update timeout to r/aws_dx_private_virtual_interface. --- aws/dx_vif.go | 12 ++++----- ...aws_dx_hosted_private_virtual_interface.go | 7 +++--- ...sted_private_virtual_interface_accepter.go | 7 +++--- ..._aws_dx_hosted_public_virtual_interface.go | 7 +++--- ...osted_public_virtual_interface_accepter.go | 7 +++--- ...source_aws_dx_private_virtual_interface.go | 15 ++++++----- ...e_aws_dx_private_virtual_interface_test.go | 25 ++++--------------- ...esource_aws_dx_public_virtual_interface.go | 7 +++--- ...dx_private_virtual_interface.html.markdown | 5 +++- 9 files changed, 44 insertions(+), 48 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index b56dd6a0e67..ebf0a54e045 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -37,10 +37,10 @@ func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { } if requestUpdate { - log.Printf("[DEBUG] Modifying Virtual Interface attributes (%s), opts:\n%s", d.Id(), req) + log.Printf("[DEBUG] Modifying Direct Connect virtual interface attributes: %#v", req) _, err := conn.UpdateVirtualInterfaceAttributes(req) if err != nil { - return fmt.Errorf("Error updating Virtual Interface attributes (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error modifying Direct Connect virtual interface (%s) attributes, error: %s", d.Id(), err) } } @@ -115,17 +115,17 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str } } -func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { +func dxVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration, pending, target []string) error { stateConf := &resource.StateChangeConf{ Pending: pending, Target: target, - Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), + Refresh: dxVirtualInterfaceStateRefresh(conn, vifId), + Timeout: timeout, Delay: 10 * time.Second, MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", vifId, err) } return nil diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index f0ce581ff78..c03bcccf808 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -125,7 +125,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me }.String() d.Set("arn", arn) - if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -175,10 +175,11 @@ func resourceAwsDxHostedPrivateVirtualInterfaceImport(d *schema.ResourceData, me return []*schema.ResourceData{d}, nil } -func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index 855061c9eef..87ed7673b19 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -90,7 +90,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.Resource }.String() d.Set("arn", arn) - if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -153,10 +153,11 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport(d *schema.Resource return []*schema.ResourceData{d}, nil } -func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStateConfirming, directconnect.VirtualInterfaceStatePending, diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface.go b/aws/resource_aws_dx_hosted_public_virtual_interface.go index a8cede3c7bb..850acd898f4 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface.go @@ -147,7 +147,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, met }.String() d.Set("arn", arn) - if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -198,10 +198,11 @@ func resourceAwsDxHostedPublicVirtualInterfaceImport(d *schema.ResourceData, met return []*schema.ResourceData{d}, nil } -func dxHostedPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPublicVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go index 46bafff5917..b3cfc696358 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -65,7 +65,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceD }.String() d.Set("arn", arn) - if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -127,10 +127,11 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterImport(d *schema.ResourceD return []*schema.ResourceData{d}, nil } -func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStateConfirming, directconnect.VirtualInterfaceStatePending, diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index d013acc8fc2..f5851bd9da4 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -99,6 +99,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), Delete: schema.DefaultTimeout(10 * time.Minute), }, } @@ -139,9 +140,6 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) } - if v, ok := d.GetOk("mtu"); ok && v.(int) != 0 { - req.NewPrivateVirtualInterface.Mtu = aws.Int64(int64(v.(int))) - } log.Printf("[DEBUG] Creating Direct Connect private virtual interface: %#v", req) resp, err := conn.CreatePrivateVirtualInterface(req) @@ -159,7 +157,7 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int }.String() d.Set("arn", arn) - if err := dxPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -203,6 +201,10 @@ func resourceAwsDxPrivateVirtualInterfaceUpdate(d *schema.ResourceData, meta int return err } + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(meta.(*AWSClient).dxconn, d.Id(), d.Timeout(schema.TimeoutUpdate)); err != nil { + return err + } + return resourceAwsDxPrivateVirtualInterfaceRead(d, meta) } @@ -223,10 +225,11 @@ func resourceAwsDxPrivateVirtualInterfaceImport(d *schema.ResourceData, meta int return []*schema.ResourceData{d}, nil } -func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 93f64a4b6d2..a8c1496c0a4 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -43,15 +43,6 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "tags.Environment", "test"), ), }, - { - Config: testAccDxPrivateVirtualInterfaceConfig_mtuCapable(connectionId, vifName, bgpAsn), - Check: resource.ComposeTestCheckFunc( - testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), - ), - }, // Test import. { ResourceName: "aws_dx_private_virtual_interface.foo", @@ -107,15 +98,16 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), ), }, { - Config: testAccDxPrivateVirtualInterfaceConfig_mtuCapable(connectionId, vifName, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_jumboFrames(connectionId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), ), }, { @@ -124,15 +116,8 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "0"), ), }, - // Test import. - { - ResourceName: "aws_dx_private_virtual_interface.foo", - ImportState: true, - ImportStateVerify: true, - }, }, }) } @@ -236,7 +221,7 @@ resource "aws_dx_private_virtual_interface" "foo" { `, n, amzAsn, cid, n, bgpAsn) } -func testAccDxPrivateVirtualInterfaceConfig_mtuCapable(cid, n string, bgpAsn int) string { +func testAccDxPrivateVirtualInterfaceConfig_jumboFrames(cid, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { @@ -252,7 +237,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9001 + mtu = 9001 } `, n, cid, n, bgpAsn) } diff --git a/aws/resource_aws_dx_public_virtual_interface.go b/aws/resource_aws_dx_public_virtual_interface.go index bc072fe6d0d..26d3cb3a1a3 100644 --- a/aws/resource_aws_dx_public_virtual_interface.go +++ b/aws/resource_aws_dx_public_virtual_interface.go @@ -131,7 +131,7 @@ func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta inte }.String() d.Set("arn", arn) - if err := dxPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxPublicVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -208,10 +208,11 @@ func resourceAwsDxPublicVirtualInterfaceCustomizeDiff(diff *schema.ResourceDiff, return nil } -func dxPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxPublicVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/website/docs/r/dx_private_virtual_interface.html.markdown b/website/docs/r/dx_private_virtual_interface.html.markdown index 68a84721244..10ffd4219f2 100644 --- a/website/docs/r/dx_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_private_virtual_interface.html.markdown @@ -33,7 +33,8 @@ The following arguments are supported: * `name` - (Required) The name for the virtual interface. * `vlan` - (Required) The VLAN ID. * `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. -* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. `jumbo_frame_capable` will be exported as `true` if jumbo frames have been enabled. +* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. +The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. * `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. @@ -46,6 +47,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. +* `jumbo_frame_capable` - Indicates whether jumbo frames (9001 MTU) are supported. ## Timeouts @@ -53,6 +55,7 @@ In addition to all arguments above, the following attributes are exported: [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `create` - (Default `10 minutes`) Used for creating virtual interface +- `update` - (Default `10 minutes`) Used for virtual interface modifications - `delete` - (Default `10 minutes`) Used for destroying virtual interface ## Import From 5d4493eae0e583c33471e26a00b5adada0311898 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 22 Oct 2018 10:35:33 +0200 Subject: [PATCH 2966/3316] resource/aws_pinpoint_apns_sandbox_channel --- aws/provider.go | 1 + ...ource_aws_pinpoint_apns_sandbox_channel.go | 159 ++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_sandbox_channel.go diff --git a/aws/provider.go b/aws/provider.go index d6e8ac73f7e..368d77a6cf4 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -683,6 +683,7 @@ func Provider() terraform.ResourceProvider { "aws_pinpoint_app": resourceAwsPinpointApp(), "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), "aws_pinpoint_apns_channel": resourceAwsPinpointAPNSChannel(), + "aws_pinpoint_apns_sandbox_channel": resourceAwsPinpointAPNSSandboxChannel(), "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), diff --git a/aws/resource_aws_pinpoint_apns_sandbox_channel.go b/aws/resource_aws_pinpoint_apns_sandbox_channel.go new file mode 100644 index 00000000000..e20a9a63288 --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_sandbox_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSSandboxChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSSandboxChannelUpsert, + Read: resourceAwsPinpointAPNSSandboxChannelRead, + Update: resourceAwsPinpointAPNSSandboxChannelUpsert, + Delete: resourceAwsPinpointAPNSSandboxChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSSandboxChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSSandboxChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsSandboxChannelInput{ + ApplicationId: aws.String(applicationId), + APNSSandboxChannelRequest: params, + } + + _, err := conn.UpdateApnsSandboxChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Sandbox Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSSandboxChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSSandboxChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Channel for Application %s", d.Id()) + + output, err := conn.GetApnsSandboxChannel(&pinpoint.GetApnsSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Sandbox Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Sandbox Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSSandboxChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSSandboxChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSSandboxChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSSandboxChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Sandbox Channel: %s", d.Id()) + _, err := conn.DeleteApnsSandboxChannel(&pinpoint.DeleteApnsSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Sandbox Channel for Application %s: %s", d.Id(), err) + } + return nil +} From 37df2f109c6a6e4adf82d95f76cce00d4e00da4d Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 22 Oct 2018 12:39:42 +0200 Subject: [PATCH 2967/3316] resource/aws_pinpoint_apns_sandbox_channel: docs + tests --- ..._aws_pinpoint_apns_sandbox_channel_test.go | 257 ++++++++++++++++++ website/aws.erb | 3 + .../r/pinpoint_apns_sandbox_channel.markdown | 59 ++++ 3 files changed, 319 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_sandbox_channel_test.go create mode 100644 website/docs/r/pinpoint_apns_sandbox_channel.markdown diff --git a/aws/resource_aws_pinpoint_apns_sandbox_channel_test.go b/aws/resource_aws_pinpoint_apns_sandbox_channel_test.go new file mode 100644 index 00000000000..438aa237099 --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_sandbox_channel_test.go @@ -0,0 +1,257 @@ +package aws + +import ( + "fmt" + "os" + "strconv" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +/** + Before running this test, one of the following two ENV variables set must be defined. See here for details: + https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-mobile-manage.html + + * Key Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns ) + APNS_SANDBOX_BUNDLE_ID - APNs Bundle ID + APNS_SANDBOX_TEAM_ID - APNs Team ID + APNS_SANDBOX_TOKEN_KEY - Token key file content (.p8 file) + APNS_SANDBOX_TOKEN_KEY_ID - APNs Token Key ID + + * Certificate Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns ) + APNS_SANDBOX_CERTIFICATE - APNs Certificate content (.pem file content) + APNS_SANDBOX_CERTIFICATE_PRIVATE_KEY - APNs Certificate Private Key File content +**/ + +type testAccAwsPinpointAPNSSandboxChannelCertConfiguration struct { + Certificate string + PrivateKey string +} + +type testAccAwsPinpointAPNSSandboxChannelTokenConfiguration struct { + BundleId string + TeamId string + TokenKey string + TokenKeyId string +} + +func testAccAwsPinpointAPNSSandboxChannelCertConfigurationFromEnv(t *testing.T) *testAccAwsPinpointAPNSSandboxChannelCertConfiguration { + var conf *testAccAwsPinpointAPNSSandboxChannelCertConfiguration + if os.Getenv("APNS_SANDBOX_CERTIFICATE") != "" { + if os.Getenv("APNS_SANDBOX_CERTIFICATE_PRIVATE_KEY") == "" { + t.Fatalf("APNS_SANDBOX_CERTIFICATE set but missing APNS_SANDBOX_CERTIFICATE_PRIVATE_KEY") + } + + conf = &testAccAwsPinpointAPNSSandboxChannelCertConfiguration{ + Certificate: fmt.Sprintf("<> aws_pinpoint_apns_channel + > + aws_pinpoint_apns_sandbox_channel + > aws_pinpoint_baidu_channel diff --git a/website/docs/r/pinpoint_apns_sandbox_channel.markdown b/website/docs/r/pinpoint_apns_sandbox_channel.markdown new file mode 100644 index 00000000000..ea671bacc18 --- /dev/null +++ b/website/docs/r/pinpoint_apns_sandbox_channel.markdown @@ -0,0 +1,59 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_apns_sandbox_channel" +sidebar_current: "docs-aws-resource-pinpoint-apns_sandbox-channel" +description: |- + Provides a Pinpoint APNs Sandbox Channel resource. +--- + +# aws_pinpoint_apns_sandbox_channel + +Provides a Pinpoint APNs Sandbox Channel resource. + +~> **Note:** All arguments, including certificates and tokens, will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). + +## Example Usage + +```hcl +resource "aws_pinpoint_apns_sandbox_channel" "apns_sandbox" { + application_id = "${aws_pinpoint_app.app.application_id}" + + certificate = "${file("./certificate.pem")}" + private_key = "${file("./private_key.key")}" +} + +resource "aws_pinpoint_app" "app" {} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `enabled` - (Optional) Whether the channel is enabled or disabled. Defaults to `true`. +* `default_authentication_method` - (Optional) The default authentication method used for APNs Sandbox. + __NOTE__: Amazon Pinpoint uses this default for every APNs push notification that you send using the console. + You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK. + If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type. + +One of the following sets of credentials is also required. + +If you choose to use __Certificate credentials__ you will have to provide: +* `certificate` - (Required) The pem encoded TLS Certificate from Apple. +* `private_key` - (Required) The Certificate Private Key file (ie. `.key` file). + +If you choose to use __Key credentials__ you will have to provide: +* `bundle_id` - (Required) The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app. +* `team_id` - (Required) The ID assigned to your Apple developer account team. This value is provided on the Membership page. +* `token_key` - (Required) The `.p8` file that you download from your Apple developer account when you create an authentication key. +* `token_key_id` - (Required) The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section. + +## Import + +Pinpoint APNs Sandbox Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_apns_sandbox_channel.apns_sandbox application-id +``` From 430fad0b89d254d924d529c98d143d9a70e9615d Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 22 Oct 2018 14:05:57 +0200 Subject: [PATCH 2968/3316] resource/pinpoint_apns_voip_channel --- aws/provider.go | 1 + ...resource_aws_pinpoint_apns_voip_channel.go | 159 ++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_voip_channel.go diff --git a/aws/provider.go b/aws/provider.go index d6e8ac73f7e..81753ffb6f4 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -683,6 +683,7 @@ func Provider() terraform.ResourceProvider { "aws_pinpoint_app": resourceAwsPinpointApp(), "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), "aws_pinpoint_apns_channel": resourceAwsPinpointAPNSChannel(), + "aws_pinpoint_apns_voip_channel": resourceAwsPinpointAPNSVoipChannel(), "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), diff --git a/aws/resource_aws_pinpoint_apns_voip_channel.go b/aws/resource_aws_pinpoint_apns_voip_channel.go new file mode 100644 index 00000000000..0663b95be7f --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_voip_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSVoipChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSVoipChannelUpsert, + Read: resourceAwsPinpointAPNSVoipChannelRead, + Update: resourceAwsPinpointAPNSVoipChannelUpsert, + Delete: resourceAwsPinpointAPNSVoipChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSVoipChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSVoipChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsVoipChannelInput{ + ApplicationId: aws.String(applicationId), + APNSVoipChannelRequest: params, + } + + _, err := conn.UpdateApnsVoipChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Voip Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSVoipChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSVoipChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Voip Channel for Application %s", d.Id()) + + output, err := conn.GetApnsVoipChannel(&pinpoint.GetApnsVoipChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Voip Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Voip Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSVoipChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSVoipChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSVoipChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSVoipChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Voip Channel: %s", d.Id()) + _, err := conn.DeleteApnsVoipChannel(&pinpoint.DeleteApnsVoipChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Voip Channel for Application %s: %s", d.Id(), err) + } + return nil +} From c92c78d400b3531d106bae7c101dfe65ec4d71df Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 22 Oct 2018 14:06:32 +0200 Subject: [PATCH 2969/3316] resource/aws_pinpoint_apns_voip_channel: docs + tests --- ...rce_aws_pinpoint_apns_voip_channel_test.go | 257 ++++++++++++++++++ website/aws.erb | 3 + .../r/pinpoint_apns_voip_channel.markdown | 59 ++++ 3 files changed, 319 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_voip_channel_test.go create mode 100644 website/docs/r/pinpoint_apns_voip_channel.markdown diff --git a/aws/resource_aws_pinpoint_apns_voip_channel_test.go b/aws/resource_aws_pinpoint_apns_voip_channel_test.go new file mode 100644 index 00000000000..42e327e4838 --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_voip_channel_test.go @@ -0,0 +1,257 @@ +package aws + +import ( + "fmt" + "os" + "strconv" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +/** + Before running this test, one of the following two ENV variables set must be defined. See here for details: + https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-mobile-manage.html + + * Key Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns ) + APNS_VOIP_BUNDLE_ID - APNs Bundle ID + APNS_VOIP_TEAM_ID - APNs Team ID + APNS_VOIP_TOKEN_KEY - Token key file content (.p8 file) + APNS_VOIP_TOKEN_KEY_ID - APNs Token Key ID + + * Certificate Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns - Select "VoIP Services Certificate" ) + APNS_VOIP_CERTIFICATE - APNs Certificate content (.pem file content) + APNS_VOIP_CERTIFICATE_PRIVATE_KEY - APNs Certificate Private Key File content +**/ + +type testAccAwsPinpointAPNSVoipChannelCertConfiguration struct { + Certificate string + PrivateKey string +} + +type testAccAwsPinpointAPNSVoipChannelTokenConfiguration struct { + BundleId string + TeamId string + TokenKey string + TokenKeyId string +} + +func testAccAwsPinpointAPNSVoipChannelCertConfigurationFromEnv(t *testing.T) *testAccAwsPinpointAPNSVoipChannelCertConfiguration { + var conf *testAccAwsPinpointAPNSVoipChannelCertConfiguration + if os.Getenv("APNS_VOIP_CERTIFICATE") != "" { + if os.Getenv("APNS_VOIP_CERTIFICATE_PRIVATE_KEY") == "" { + t.Fatalf("APNS_VOIP_CERTIFICATE set but missing APNS_VOIP_CERTIFICATE_PRIVATE_KEY") + } + + conf = &testAccAwsPinpointAPNSVoipChannelCertConfiguration{ + Certificate: fmt.Sprintf("<> aws_pinpoint_apns_channel + > + aws_pinpoint_apns_voip_channel + > aws_pinpoint_baidu_channel diff --git a/website/docs/r/pinpoint_apns_voip_channel.markdown b/website/docs/r/pinpoint_apns_voip_channel.markdown new file mode 100644 index 00000000000..ef3bbed8dc4 --- /dev/null +++ b/website/docs/r/pinpoint_apns_voip_channel.markdown @@ -0,0 +1,59 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_apns_voip_channel" +sidebar_current: "docs-aws-resource-pinpoint-apns-voip-channel" +description: |- + Provides a Pinpoint APNs VoIP Channel resource. +--- + +# aws_pinpoint_apns_voip_channel + +Provides a Pinpoint APNs VoIP Channel resource. + +~> **Note:** All arguments, including certificates and tokens, will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). + +## Example Usage + +```hcl +resource "aws_pinpoint_apns_voip_channel" "apns_voip" { + application_id = "${aws_pinpoint_app.app.application_id}" + + certificate = "${file("./certificate.pem")}" + private_key = "${file("./private_key.key")}" +} + +resource "aws_pinpoint_app" "app" {} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `enabled` - (Optional) Whether the channel is enabled or disabled. Defaults to `true`. +* `default_authentication_method` - (Optional) The default authentication method used for APNs. + __NOTE__: Amazon Pinpoint uses this default for every APNs push notification that you send using the console. + You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK. + If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type. + +One of the following sets of credentials is also required. + +If you choose to use __Certificate credentials__ you will have to provide: +* `certificate` - (Required) The pem encoded TLS Certificate from Apple. +* `private_key` - (Required) The Certificate Private Key file (ie. `.key` file). + +If you choose to use __Key credentials__ you will have to provide: +* `bundle_id` - (Required) The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app. +* `team_id` - (Required) The ID assigned to your Apple developer account team. This value is provided on the Membership page. +* `token_key` - (Required) The `.p8` file that you download from your Apple developer account when you create an authentication key. +* `token_key_id` - (Required) The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section. + +## Import + +Pinpoint APNs VoIP Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_apns_voip_channel.apns_voip application-id +``` From 42b87c127f766ac4f65cd07754967405dbfb8ba7 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 22 Oct 2018 14:20:10 +0200 Subject: [PATCH 2970/3316] resource/aws_pinpoint_apns_voip_sandbox_channel --- aws/provider.go | 1 + ..._aws_pinpoint_apns_voip_sandbox_channel.go | 159 ++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go diff --git a/aws/provider.go b/aws/provider.go index d6e8ac73f7e..6dee80d1a54 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -683,6 +683,7 @@ func Provider() terraform.ResourceProvider { "aws_pinpoint_app": resourceAwsPinpointApp(), "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), "aws_pinpoint_apns_channel": resourceAwsPinpointAPNSChannel(), + "aws_pinpoint_apns_voip_sandbox_channel": resourceAwsPinpointAPNSVoipSandboxChannel(), "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), diff --git a/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go b/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go new file mode 100644 index 00000000000..44a7203a90f --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSVoipSandboxChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSVoipSandboxChannelUpsert, + Read: resourceAwsPinpointAPNSVoipSandboxChannelRead, + Update: resourceAwsPinpointAPNSVoipSandboxChannelUpsert, + Delete: resourceAwsPinpointAPNSVoipSandboxChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSVoipSandboxChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSVoipSandboxChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsVoipSandboxChannelInput{ + ApplicationId: aws.String(applicationId), + APNSVoipSandboxChannelRequest: params, + } + + _, err := conn.UpdateApnsVoipSandboxChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Voip Sandbox Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSVoipSandboxChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSVoipSandboxChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Voip Sandbox Channel for Application %s", d.Id()) + + output, err := conn.GetApnsVoipSandboxChannel(&pinpoint.GetApnsVoipSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Voip Sandbox Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Voip Sandbox Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSVoipSandboxChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSVoipSandboxChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSVoipSandboxChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSVoipSandboxChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Voip Sandbox Channel: %s", d.Id()) + _, err := conn.DeleteApnsVoipSandboxChannel(&pinpoint.DeleteApnsVoipSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Voip Sandbox Channel for Application %s: %s", d.Id(), err) + } + return nil +} From 6f51fffa8970c7a8650ca68aace5bf9569d75134 Mon Sep 17 00:00:00 2001 From: Marco Reni Date: Mon, 22 Oct 2018 14:21:16 +0200 Subject: [PATCH 2971/3316] resource/aws_pinpoint_apns_voip_sandbox_channel: docs + tests --- ...pinpoint_apns_voip_sandbox_channel_test.go | 257 ++++++++++++++++++ website/aws.erb | 3 + ...inpoint_apns_voip_sandbox_channel.markdown | 59 ++++ 3 files changed, 319 insertions(+) create mode 100644 aws/resource_aws_pinpoint_apns_voip_sandbox_channel_test.go create mode 100644 website/docs/r/pinpoint_apns_voip_sandbox_channel.markdown diff --git a/aws/resource_aws_pinpoint_apns_voip_sandbox_channel_test.go b/aws/resource_aws_pinpoint_apns_voip_sandbox_channel_test.go new file mode 100644 index 00000000000..f59894ad0c1 --- /dev/null +++ b/aws/resource_aws_pinpoint_apns_voip_sandbox_channel_test.go @@ -0,0 +1,257 @@ +package aws + +import ( + "fmt" + "os" + "strconv" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/service/pinpoint" + + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +/** + Before running this test, one of the following two ENV variables set must be defined. See here for details: + https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-mobile-manage.html + + * Key Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns ) + APNS_VOIP_BUNDLE_ID - APNs Bundle ID + APNS_VOIP_TEAM_ID - APNs Team ID + APNS_VOIP_TOKEN_KEY - Token key file content (.p8 file) + APNS_VOIP_TOKEN_KEY_ID - APNs Token Key ID + + * Certificate Configuration (ref. https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns - Select "VoIP Services Certificate" ) + APNS_VOIP_CERTIFICATE - APNs Certificate content (.pem file content) + APNS_VOIP_CERTIFICATE_PRIVATE_KEY - APNs Certificate Private Key File content +**/ + +type testAccAwsPinpointAPNSVoipSandboxChannelCertConfiguration struct { + Certificate string + PrivateKey string +} + +type testAccAwsPinpointAPNSVoipSandboxChannelTokenConfiguration struct { + BundleId string + TeamId string + TokenKey string + TokenKeyId string +} + +func testAccAwsPinpointAPNSVoipSandboxChannelCertConfigurationFromEnv(t *testing.T) *testAccAwsPinpointAPNSVoipSandboxChannelCertConfiguration { + var conf *testAccAwsPinpointAPNSVoipSandboxChannelCertConfiguration + if os.Getenv("APNS_VOIP_CERTIFICATE") != "" { + if os.Getenv("APNS_VOIP_CERTIFICATE_PRIVATE_KEY") == "" { + t.Fatalf("APNS_VOIP_CERTIFICATE set but missing APNS_VOIP_CERTIFICATE_PRIVATE_KEY") + } + + conf = &testAccAwsPinpointAPNSVoipSandboxChannelCertConfiguration{ + Certificate: fmt.Sprintf("<> aws_pinpoint_apns_channel + > + aws_pinpoint_apns_voip_sandbox_channel + > aws_pinpoint_baidu_channel diff --git a/website/docs/r/pinpoint_apns_voip_sandbox_channel.markdown b/website/docs/r/pinpoint_apns_voip_sandbox_channel.markdown new file mode 100644 index 00000000000..641350a96ee --- /dev/null +++ b/website/docs/r/pinpoint_apns_voip_sandbox_channel.markdown @@ -0,0 +1,59 @@ +--- +layout: "aws" +page_title: "AWS: aws_pinpoint_apns_voip_sandbox_channel" +sidebar_current: "docs-aws-resource-pinpoint-apns-voip-sandbox-channel" +description: |- + Provides a Pinpoint APNs VoIP Sandbox Channel resource. +--- + +# aws_pinpoint_apns_voip_sandbox_channel + +Provides a Pinpoint APNs VoIP Sandbox Channel resource. + +~> **Note:** All arguments, including certificates and tokens, will be stored in the raw state as plain-text. +[Read more about sensitive data in state](/docs/state/sensitive-data.html). + +## Example Usage + +```hcl +resource "aws_pinpoint_apns_voip_sandbox_channel" "apns_voip_sandbox" { + application_id = "${aws_pinpoint_app.app.application_id}" + + certificate = "${file("./certificate.pem")}" + private_key = "${file("./private_key.key")}" +} + +resource "aws_pinpoint_app" "app" {} +``` + + +## Argument Reference + +The following arguments are supported: + +* `application_id` - (Required) The application ID. +* `enabled` - (Optional) Whether the channel is enabled or disabled. Defaults to `true`. +* `default_authentication_method` - (Optional) The default authentication method used for APNs. + __NOTE__: Amazon Pinpoint uses this default for every APNs push notification that you send using the console. + You can override the default when you send a message programmatically using the Amazon Pinpoint API, the AWS CLI, or an AWS SDK. + If your default authentication type fails, Amazon Pinpoint doesn't attempt to use the other authentication type. + +One of the following sets of credentials is also required. + +If you choose to use __Certificate credentials__ you will have to provide: +* `certificate` - (Required) The pem encoded TLS Certificate from Apple. +* `private_key` - (Required) The Certificate Private Key file (ie. `.key` file). + +If you choose to use __Key credentials__ you will have to provide: +* `bundle_id` - (Required) The ID assigned to your iOS app. To find this value, choose Certificates, IDs & Profiles, choose App IDs in the Identifiers section, and choose your app. +* `team_id` - (Required) The ID assigned to your Apple developer account team. This value is provided on the Membership page. +* `token_key` - (Required) The `.p8` file that you download from your Apple developer account when you create an authentication key. +* `token_key_id` - (Required) The ID assigned to your signing key. To find this value, choose Certificates, IDs & Profiles, and choose your key in the Keys section. + +## Import + +Pinpoint APNs VoIP Sandbox Channel can be imported using the `application-id`, e.g. + +``` +$ terraform import aws_pinpoint_apns_voip_sandbox_channel.apns_voip_sandbox application-id +``` From 1fb5a10828056c0cafcdb9d493bc91228476a50a Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Mon, 22 Oct 2018 09:39:27 -0400 Subject: [PATCH 2972/3316] Add import for aws_ses_receipt_rule --- aws/resource_aws_ses_receipt_rule.go | 20 +++++++++++++++++++ aws/resource_aws_ses_receipt_rule_test.go | 16 +++++++++++++++ website/docs/r/ses_receipt_rule.html.markdown | 8 ++++++++ 3 files changed, 44 insertions(+) diff --git a/aws/resource_aws_ses_receipt_rule.go b/aws/resource_aws_ses_receipt_rule.go index 383ab5b4ef3..e4ad91d84e6 100644 --- a/aws/resource_aws_ses_receipt_rule.go +++ b/aws/resource_aws_ses_receipt_rule.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "sort" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -20,6 +21,9 @@ func resourceAwsSesReceiptRule() *schema.Resource { Update: resourceAwsSesReceiptRuleUpdate, Read: resourceAwsSesReceiptRuleRead, Delete: resourceAwsSesReceiptRuleDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsSesReceiptRuleImport, + }, Schema: map[string]*schema.Schema{ "name": { @@ -356,6 +360,22 @@ func resourceAwsSesReceiptRule() *schema.Resource { } } +func resourceAwsSesReceiptRuleImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf("unexpected format of ID (%q), expected :", d.Id()) + } + + ruleSetName := idParts[0] + ruleName := idParts[1] + + d.Set("rule_set_name", ruleSetName) + d.Set("name", ruleName) + d.SetId(ruleName) + + return []*schema.ResourceData{d}, nil +} + func resourceAwsSesReceiptRuleCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sesConn diff --git a/aws/resource_aws_ses_receipt_rule_test.go b/aws/resource_aws_ses_receipt_rule_test.go index 4b97ea02dcc..b409f0247d3 100644 --- a/aws/resource_aws_ses_receipt_rule_test.go +++ b/aws/resource_aws_ses_receipt_rule_test.go @@ -27,6 +27,11 @@ func TestAccAWSSESReceiptRule_basic(t *testing.T) { testAccCheckAwsSESReceiptRuleExists("aws_ses_receipt_rule.basic"), ), }, + { + ResourceName: "aws_ses_receipt_rule.basic", + ImportState: true, + ImportStateIdFunc: testAccAwsSesReceiptRuleImportStateIdFunc("aws_ses_receipt_rule.basic"), + }, }, }) } @@ -158,6 +163,17 @@ func testAccCheckAwsSESReceiptRuleExists(n string) resource.TestCheckFunc { } } +func testAccAwsSesReceiptRuleImportStateIdFunc(resourceName string) resource.ImportStateIdFunc { + return func(s *terraform.State) (string, error) { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return "", fmt.Errorf("Not Found: %s", resourceName) + } + + return fmt.Sprintf("%s:%s", rs.Primary.Attributes["rule_set_name"], rs.Primary.Attributes["name"]) + } +} + func testAccCheckAwsSESReceiptRuleOrder(n string) resource.TestCheckFunc { return func(s *terraform.State) error { rs, ok := s.RootModule().Resources[n] diff --git a/website/docs/r/ses_receipt_rule.html.markdown b/website/docs/r/ses_receipt_rule.html.markdown index dd65a579b2d..2256c5a09b5 100644 --- a/website/docs/r/ses_receipt_rule.html.markdown +++ b/website/docs/r/ses_receipt_rule.html.markdown @@ -97,3 +97,11 @@ WorkMail actions support the following: * `organization_arn` - (Required) The ARN of the WorkMail organization * `topic_arn` - (Optional) The ARN of an SNS topic to notify * `position` - (Required) The position of the action in the receipt rule + +## Import + +SES receipt rules can be imported using the ruleset name and rule name separated by `:`. + +``` +$ terraform import aws_ses_receipt_rule.my_rule my_rule_set:my_rule +``` From bd5798b3f942f7f36da671cb3917ba2d6b86fcbf Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Mon, 22 Oct 2018 10:24:33 -0500 Subject: [PATCH 2973/3316] pulling in ewbankkit changes --- ...source_aws_dx_private_virtual_interface.go | 36 ++++++------------- ...e_aws_dx_private_virtual_interface_test.go | 29 ++++----------- ...dx_private_virtual_interface.html.markdown | 5 ++- 3 files changed, 21 insertions(+), 49 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 3b99ff24cbd..f5851bd9da4 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -88,7 +88,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Type: schema.TypeInt, Default: 1500, Optional: true, - ValidateFunc: IntInSlice([]int{1500, 9001}), + ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), }, "jumbo_frame_capable": { Type: schema.TypeBool, @@ -99,6 +99,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), Delete: schema.DefaultTimeout(10 * time.Minute), }, } @@ -139,9 +140,6 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterface.AmazonAddress = aws.String(v.(string)) } - if v, ok := d.GetOk("mtu"); ok && v.(int) != 0 { - req.NewPrivateVirtualInterface.Mtu = aws.Int64(int64(v.(int))) - } log.Printf("[DEBUG] Creating Direct Connect private virtual interface: %#v", req) resp, err := conn.CreatePrivateVirtualInterface(req) @@ -159,7 +157,7 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int }.String() d.Set("arn", arn) - if err := dxPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -203,6 +201,10 @@ func resourceAwsDxPrivateVirtualInterfaceUpdate(d *schema.ResourceData, meta int return err } + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(meta.(*AWSClient).dxconn, d.Id(), d.Timeout(schema.TimeoutUpdate)); err != nil { + return err + } + return resourceAwsDxPrivateVirtualInterfaceRead(d, meta) } @@ -223,10 +225,11 @@ func resourceAwsDxPrivateVirtualInterfaceImport(d *schema.ResourceData, meta int return []*schema.ResourceData{d}, nil } -func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, @@ -235,22 +238,3 @@ func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *d directconnect.VirtualInterfaceStateDown, }) } - -func IntInSlice(valid []int) schema.SchemaValidateFunc { - return func(i interface{}, k string) (s []string, es []error) { - v, ok := i.(int) - if !ok { - es = append(es, fmt.Errorf("expected type of %s to be int", k)) - return - } - - for _, in := range valid { - if v == in { - return - } - } - - es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v)) - return - } -} diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 93f64a4b6d2..850a2fc8222 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -21,7 +21,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, @@ -43,15 +43,6 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "tags.Environment", "test"), ), }, - { - Config: testAccDxPrivateVirtualInterfaceConfig_mtuCapable(connectionId, vifName, bgpAsn), - Check: resource.ComposeTestCheckFunc( - testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), - ), - }, // Test import. { ResourceName: "aws_dx_private_virtual_interface.foo", @@ -72,7 +63,7 @@ func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { amzAsn := randIntRange(64512, 65534) bgpAsn := randIntRange(64512, 65534) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, @@ -107,15 +98,16 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), ), }, { - Config: testAccDxPrivateVirtualInterfaceConfig_mtuCapable(connectionId, vifName, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_jumboFrames(connectionId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), ), }, { @@ -124,15 +116,8 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "0"), ), }, - // Test import. - { - ResourceName: "aws_dx_private_virtual_interface.foo", - ImportState: true, - ImportStateVerify: true, - }, }, }) } @@ -236,7 +221,7 @@ resource "aws_dx_private_virtual_interface" "foo" { `, n, amzAsn, cid, n, bgpAsn) } -func testAccDxPrivateVirtualInterfaceConfig_mtuCapable(cid, n string, bgpAsn int) string { +func testAccDxPrivateVirtualInterfaceConfig_jumboFrames(cid, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { @@ -252,7 +237,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vlan = 4094 address_family = "ipv4" bgp_asn = %d - mtu = 9001 + mtu = 9001 } `, n, cid, n, bgpAsn) } diff --git a/website/docs/r/dx_private_virtual_interface.html.markdown b/website/docs/r/dx_private_virtual_interface.html.markdown index 68a84721244..10ffd4219f2 100644 --- a/website/docs/r/dx_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_private_virtual_interface.html.markdown @@ -33,7 +33,8 @@ The following arguments are supported: * `name` - (Required) The name for the virtual interface. * `vlan` - (Required) The VLAN ID. * `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. -* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. `jumbo_frame_capable` will be exported as `true` if jumbo frames have been enabled. +* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. +The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. * `dx_gateway_id` - (Optional) The ID of the Direct Connect gateway to which to connect the virtual interface. @@ -46,6 +47,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. +* `jumbo_frame_capable` - Indicates whether jumbo frames (9001 MTU) are supported. ## Timeouts @@ -53,6 +55,7 @@ In addition to all arguments above, the following attributes are exported: [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `create` - (Default `10 minutes`) Used for creating virtual interface +- `update` - (Default `10 minutes`) Used for virtual interface modifications - `delete` - (Default `10 minutes`) Used for destroying virtual interface ## Import From 4c2e4161184ae6558f60d54d904df258ff05c464 Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Mon, 22 Oct 2018 13:06:33 -0400 Subject: [PATCH 2974/3316] add import docs for ses_receipt_rule_set and ses_domain_identity --- website/docs/r/ses_domain_identity.html.markdown | 7 +++++++ website/docs/r/ses_receipt_rule_set.html.markdown | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/website/docs/r/ses_domain_identity.html.markdown b/website/docs/r/ses_domain_identity.html.markdown index ce1b7bb5180..8f05885be75 100644 --- a/website/docs/r/ses_domain_identity.html.markdown +++ b/website/docs/r/ses_domain_identity.html.markdown @@ -46,3 +46,10 @@ resource "aws_route53_record" "example_amazonses_verification_record" { } ``` +## Import + +SES domain identities can be imported using the domain name. + +``` +$ terraform import aws_ses_domain_identity.example example.com +``` diff --git a/website/docs/r/ses_receipt_rule_set.html.markdown b/website/docs/r/ses_receipt_rule_set.html.markdown index 1e834d19972..ba03bd58643 100644 --- a/website/docs/r/ses_receipt_rule_set.html.markdown +++ b/website/docs/r/ses_receipt_rule_set.html.markdown @@ -23,3 +23,11 @@ resource "aws_ses_receipt_rule_set" "main" { The following arguments are supported: * `rule_set_name` - (Required) The name of the rule set + +## Import + +SES receipt rule sets can be imported using the rule set name. + +``` +$ terraform import aws_ses_receipt_rule_set.my_rule_set my_rule_set_name +``` From 1d7542874cecd0fddbe023e86334d53f2dbcd337 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Mon, 22 Oct 2018 12:38:53 -0500 Subject: [PATCH 2975/3316] forgot a missing file from previous commit --- aws/dx_vif.go | 12 ++++++------ aws/resource_aws_dx_private_virtual_interface.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index b56dd6a0e67..ebf0a54e045 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -37,10 +37,10 @@ func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { } if requestUpdate { - log.Printf("[DEBUG] Modifying Virtual Interface attributes (%s), opts:\n%s", d.Id(), req) + log.Printf("[DEBUG] Modifying Direct Connect virtual interface attributes: %#v", req) _, err := conn.UpdateVirtualInterfaceAttributes(req) if err != nil { - return fmt.Errorf("Error updating Virtual Interface attributes (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error modifying Direct Connect virtual interface (%s) attributes, error: %s", d.Id(), err) } } @@ -115,17 +115,17 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str } } -func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { +func dxVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration, pending, target []string) error { stateConf := &resource.StateChangeConf{ Pending: pending, Target: target, - Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), + Refresh: dxVirtualInterfaceStateRefresh(conn, vifId), + Timeout: timeout, Delay: 10 * time.Second, MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", vifId, err) } return nil diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index f5851bd9da4..50417cbd079 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -88,7 +88,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Type: schema.TypeInt, Default: 1500, Optional: true, - ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), + ValidateFunc: validateIntInSlice([]int{1500, 9001}), }, "jumbo_frame_capable": { Type: schema.TypeBool, From c3f984f8deeed1ef33a6239c81377c98e29d4832 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Mon, 22 Oct 2018 15:39:14 -0400 Subject: [PATCH 2976/3316] resource/aws_security_group_rule: Fix bad examples in docs --- website/docs/r/security_group_rule.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/security_group_rule.html.markdown b/website/docs/r/security_group_rule.html.markdown index 371ea60f5a2..cbea35b84d5 100644 --- a/website/docs/r/security_group_rule.html.markdown +++ b/website/docs/r/security_group_rule.html.markdown @@ -125,11 +125,11 @@ $ terraform import aws_security_group_rule.egress sg-62726f6479_egress_tcp_8000_ Import a rule applicable to all protocols and ports with a security group source: ```console -$ example: sg-7472697374616e_ingress_all_0_65536_sg-6176657279 +$ terraform import aws_security_group_rule.ingress_rule sg-7472697374616e_ingress_all_0_65536_sg-6176657279 ``` Import a rule that has itself and an IPv6 CIDR block as sources: ```console -$ example: sg-656c65616e6f72_ingress_tcp_80_80_self_2001:db8::/48 +$ terraform import aws_security_group_rule.rule_name sg-656c65616e6f72_ingress_tcp_80_80_self_2001:db8::/48 ``` From 77e465a12cc1000f6bac27dcb4f271d9099885c1 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Mon, 22 Oct 2018 17:09:22 -0500 Subject: [PATCH 2977/3316] removing conflict cruft --- aws/resource_aws_dx_private_virtual_interface.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/aws/resource_aws_dx_private_virtual_interface.go b/aws/resource_aws_dx_private_virtual_interface.go index 11b42e26c4a..f5851bd9da4 100644 --- a/aws/resource_aws_dx_private_virtual_interface.go +++ b/aws/resource_aws_dx_private_virtual_interface.go @@ -88,11 +88,7 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Type: schema.TypeInt, Default: 1500, Optional: true, -<<<<<<< HEAD - ValidateFunc: validateIntInSlice([]int{1500, 9001}), -======= ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), ->>>>>>> exbankkit/slapula-dx-private-virtual-interface-mtu }, "jumbo_frame_capable": { Type: schema.TypeBool, From da69517c8d918611b8ab9599b7e82ee1445c8be4 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Tue, 23 Oct 2018 08:35:11 -0500 Subject: [PATCH 2978/3316] changing 1 to true --- aws/resource_aws_dx_private_virtual_interface_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 850a2fc8222..17214c4acc7 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -99,7 +99,7 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "1"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "true"), ), }, { From 2478fba0fc1dee7aa2918799e309f7127cee5939 Mon Sep 17 00:00:00 2001 From: "Aaron J. Smith" Date: Tue, 23 Oct 2018 09:49:17 -0500 Subject: [PATCH 2979/3316] adding improvements from dx-private-virtual-interfarce-mtu branch --- aws/dx_vif.go | 26 ++++++-- ...aws_dx_hosted_private_virtual_interface.go | 17 +++--- ...sted_private_virtual_interface_accepter.go | 7 ++- ...x_hosted_private_virtual_interface_test.go | 59 +++++++++++++++---- aws/validators.go | 17 ++++++ aws/validators_test.go | 45 ++++++++++++++ ...ed_private_virtual_interface.html.markdown | 4 +- 7 files changed, 150 insertions(+), 25 deletions(-) diff --git a/aws/dx_vif.go b/aws/dx_vif.go index ea659c7b6c9..ebf0a54e045 100644 --- a/aws/dx_vif.go +++ b/aws/dx_vif.go @@ -26,6 +26,24 @@ func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*dire func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + req := &directconnect.UpdateVirtualInterfaceAttributesInput{ + VirtualInterfaceId: aws.String(d.Id()), + } + + requestUpdate := false + if d.HasChange("mtu") { + req.Mtu = aws.Int64(int64(d.Get("mtu").(int))) + requestUpdate = true + } + + if requestUpdate { + log.Printf("[DEBUG] Modifying Direct Connect virtual interface attributes: %#v", req) + _, err := conn.UpdateVirtualInterfaceAttributes(req) + if err != nil { + return fmt.Errorf("Error modifying Direct Connect virtual interface (%s) attributes, error: %s", d.Id(), err) + } + } + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -97,17 +115,17 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str } } -func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { +func dxVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration, pending, target []string) error { stateConf := &resource.StateChangeConf{ Pending: pending, Target: target, - Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), + Refresh: dxVirtualInterfaceStateRefresh(conn, vifId), + Timeout: timeout, Delay: 10 * time.Second, MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", vifId, err) } return nil diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface.go b/aws/resource_aws_dx_hosted_private_virtual_interface.go index 62ba63c4573..56fc6f85a60 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -78,10 +78,11 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { ValidateFunc: validateAwsAccountId, }, "mtu": { - Type: schema.TypeInt, - Default: 1500, - Optional: true, - ForceNew: true, + Type: schema.TypeInt, + Default: 1500, + Optional: true, + ForceNew: true, + ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), }, "jumbo_frame_capable": { Type: schema.TypeBool, @@ -91,6 +92,7 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), Delete: schema.DefaultTimeout(10 * time.Minute), }, } @@ -139,7 +141,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me }.String() d.Set("arn", arn) - if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -191,10 +193,11 @@ func resourceAwsDxHostedPrivateVirtualInterfaceImport(d *schema.ResourceData, me return []*schema.ResourceData{d}, nil } -func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index 855061c9eef..87ed7673b19 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -90,7 +90,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.Resource }.String() d.Set("arn", arn) - if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -153,10 +153,11 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport(d *schema.Resource return []*schema.ResourceData{d}, nil } -func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStateConfirming, directconnect.VirtualInterfaceStatePending, diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index 80665816fac..924021050f9 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -38,15 +38,6 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), ), }, - { - Config: testAccDxHostedPrivateVirtualInterfaceConfig_mtuCapable(connectionId, ownerAccountId, vifName, bgpAsn), - Check: resource.ComposeTestCheckFunc( - testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), - resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), - resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "mtu", "9001"), - resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "jumbo_frame_capable", "1"), - ), - }, // Test import. { ResourceName: "aws_dx_hosted_private_virtual_interface.foo", @@ -57,6 +48,54 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { }) } +func TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate(t *testing.T) { + key := "DX_CONNECTION_ID" + connectionId := os.Getenv(key) + if connectionId == "" { + t.Skipf("Environment variable %s is not set", key) + } + key = "DX_HOSTED_VIF_OWNER_ACCOUNT" + ownerAccountId := os.Getenv(key) + if ownerAccountId == "" { + t.Skipf("Environment variable %s is not set", key) + } + vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) + bgpAsn := randIntRange(64512, 65534) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "true"), + ), + }, + { + Config: testAccDxHostedPrivateVirtualInterfaceConfig_JumboFrames(connectionId, ownerAccountId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), + ), + }, + { + Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), + ), + }, + }, + }) +} + func testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).dxconn @@ -107,7 +146,7 @@ resource "aws_dx_hosted_private_virtual_interface" "foo" { `, cid, ownerAcctId, n, bgpAsn) } -func testAccDxHostedPrivateVirtualInterfaceConfig_mtuCapable(cid, ownerAcctId, n string, bgpAsn int) string { +func testAccDxHostedPrivateVirtualInterfaceConfig_JumboFrames(cid, ownerAcctId, n string, bgpAsn int) string { return fmt.Sprintf(` resource "aws_dx_hosted_private_virtual_interface" "foo" { connection_id = "%s" diff --git a/aws/validators.go b/aws/validators.go index 6eb63cd78ea..5318aeb7e3f 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -340,6 +340,23 @@ func validateCloudWatchLogResourcePolicyDocument(v interface{}, k string) (ws [] return } +func validateIntegerInSlice(valid []int) schema.SchemaValidateFunc { + return func(i interface{}, k string) (s []string, es []error) { + v, ok := i.(int) + if !ok { + es = append(es, fmt.Errorf("expected type of %s to be int", k)) + return + } + for _, in := range valid { + if v == in { + return + } + } + es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v)) + return + } +} + func validateCloudWatchEventTargetId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 64 { diff --git a/aws/validators_test.go b/aws/validators_test.go index 3d233c5f9c9..7260d35b1b8 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/aws/aws-sdk-go/service/cognitoidentity" + "github.com/hashicorp/terraform/helper/schema" ) func TestValidateTypeStringNullableBoolean(t *testing.T) { @@ -556,6 +557,50 @@ func TestValidateS3BucketLifecycleTimestamp(t *testing.T) { } } +func TestValidateIntegerInSlice(t *testing.T) { + cases := []struct { + val interface{} + f schema.SchemaValidateFunc + expectedErr *regexp.Regexp + }{ + { + val: 42, + f: validateIntegerInSlice([]int{2, 4, 42, 420}), + }, + { + val: 42, + f: validateIntegerInSlice([]int{0, 43}), + expectedErr: regexp.MustCompile("expected [\\w]+ to be one of \\[0 43\\], got 42"), + }, + { + val: "42", + f: validateIntegerInSlice([]int{0, 42}), + expectedErr: regexp.MustCompile("expected type of [\\w]+ to be int"), + }, + } + matchErr := func(errs []error, r *regexp.Regexp) bool { + // err must match one provided + for _, err := range errs { + if r.MatchString(err.Error()) { + return true + } + } + return false + } + for i, tc := range cases { + _, errs := tc.f(tc.val, "test_property") + if len(errs) == 0 && tc.expectedErr == nil { + continue + } + if len(errs) != 0 && tc.expectedErr == nil { + t.Fatalf("expected test case %d to produce no errors, got %v", i, errs) + } + if !matchErr(errs, tc.expectedErr) { + t.Fatalf("expected test case %d to produce error matching \"%s\", got %v", i, tc.expectedErr, errs) + } + } +} + func TestResourceAWSElastiCacheClusterIdValidation(t *testing.T) { cases := []struct { Value string diff --git a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown index 331d1c56c9d..a3973acfabf 100644 --- a/website/docs/r/dx_hosted_private_virtual_interface.html.markdown +++ b/website/docs/r/dx_hosted_private_virtual_interface.html.markdown @@ -35,7 +35,7 @@ The following arguments are supported: * `owner_account_id` - (Required) The AWS account that will own the new virtual interface. * `vlan` - (Required) The VLAN ID. * `amazon_address` - (Optional) The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers. -* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either 1500 or 9001 (jumbo frames). Default is 1500. `jumbo_frame_capable` will be exported as `true` if jumbo frames have been enabled. +* `mtu` - (Optional) The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`. * `bgp_auth_key` - (Optional) The authentication key for BGP configuration. * `customer_address` - (Optional) The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers. @@ -45,6 +45,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the virtual interface. * `arn` - The ARN of the virtual interface. +* `jumbo_frame_capable` - Indicates whether jumbo frames (9001 MTU) are supported. ## Timeouts @@ -52,6 +53,7 @@ In addition to all arguments above, the following attributes are exported: [Timeouts](/docs/configuration/resources.html#timeouts) configuration options: - `create` - (Default `10 minutes`) Used for creating virtual interface +- `update` - (Default `10 minutes`) Used for virtual interface modifications - `delete` - (Default `10 minutes`) Used for destroying virtual interface ## Import From 0089b9fae2b65015aa93e3b1d0f2e7f6b7a648dc Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 23 Oct 2018 13:16:11 -0400 Subject: [PATCH 2980/3316] Fix typos in acceptance tests. --- ...x_hosted_private_virtual_interface_test.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index 924021050f9..990bd8b9cb3 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -70,26 +70,26 @@ func TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate(t *testing.T) { { Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "jumbo_frame_capable", "true"), + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "mtu", "1500"), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "jumbo_frame_capable", "true"), ), }, { Config: testAccDxHostedPrivateVirtualInterfaceConfig_JumboFrames(connectionId, ownerAccountId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "9001"), + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "mtu", "9001"), ), }, { Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), Check: resource.ComposeTestCheckFunc( - testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), - resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "mtu", "1500"), + testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), + resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "mtu", "1500"), ), }, }, From afcdc62f4236c1ba0786b89acc9dd3e487a85099 Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Tue, 23 Oct 2018 14:29:05 -0400 Subject: [PATCH 2981/3316] resouce/aws_waf_rule: add import ability --- aws/resource_aws_waf_rule.go | 3 +++ aws/resource_aws_waf_rule_test.go | 5 +++++ website/docs/r/waf_rule.html.markdown | 10 ++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_waf_rule.go b/aws/resource_aws_waf_rule.go index f210138e1f4..cd22babb94e 100644 --- a/aws/resource_aws_waf_rule.go +++ b/aws/resource_aws_waf_rule.go @@ -17,6 +17,9 @@ func resourceAwsWafRule() *schema.Resource { Read: resourceAwsWafRuleRead, Update: resourceAwsWafRuleUpdate, Delete: resourceAwsWafRuleDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { diff --git a/aws/resource_aws_waf_rule_test.go b/aws/resource_aws_waf_rule_test.go index 25153bcdd7e..290c7b1bcc7 100644 --- a/aws/resource_aws_waf_rule_test.go +++ b/aws/resource_aws_waf_rule_test.go @@ -34,6 +34,11 @@ func TestAccAWSWafRule_basic(t *testing.T) { "aws_waf_rule.wafrule", "metric_name", wafRuleName), ), }, + { + ResourceName: "aws_waf_rule.wafrule", + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/website/docs/r/waf_rule.html.markdown b/website/docs/r/waf_rule.html.markdown index d352b8e0023..f81edfe0456 100644 --- a/website/docs/r/waf_rule.html.markdown +++ b/website/docs/r/waf_rule.html.markdown @@ -58,10 +58,16 @@ See the [WAF Documentation](https://docs.aws.amazon.com/waf/latest/APIReference/ * `data_id` - (Required) A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID. * `type` - (Required) The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`. -## Remarks - ## Attributes Reference In addition to all arguments above, the following attributes are exported: * `id` - The ID of the WAF rule. + +## Import + +WAF rules can be imported using the id, e.g. + +``` +$ terraform import aws_waf_rule.example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc +``` From b9cc02fabada6751427e96871cfabb7fc6b8787c Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 24 Oct 2018 07:22:49 -0400 Subject: [PATCH 2982/3316] Bump AWS SDK to v1.15.61. --- .../shared_credentials_provider.go | 30 +- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 52 +- .../aws-sdk-go/aws/session/shared_config.go | 47 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/internal/ini/ast.go | 120 + .../aws-sdk-go/internal/ini/comma_token.go | 11 + .../aws-sdk-go/internal/ini/comment_token.go | 39 + .../aws/aws-sdk-go/internal/ini/doc.go | 30 + .../aws-sdk-go/internal/ini/empty_token.go | 4 + .../aws/aws-sdk-go/internal/ini/expression.go | 24 + .../aws/aws-sdk-go/internal/ini/fuzz.go | 17 + .../aws/aws-sdk-go/internal/ini/ini.go | 51 + .../aws/aws-sdk-go/internal/ini/ini_lexer.go | 165 + .../aws/aws-sdk-go/internal/ini/ini_parser.go | 312 + .../aws-sdk-go/internal/ini/literal_tokens.go | 317 + .../aws-sdk-go/internal/ini/newline_token.go | 30 + .../aws-sdk-go/internal/ini/number_helper.go | 152 + .../aws/aws-sdk-go/internal/ini/op_tokens.go | 39 + .../aws-sdk-go/internal/ini/parse_error.go | 43 + .../aws-sdk-go/internal/ini/parse_stack.go | 60 + .../aws/aws-sdk-go/internal/ini/sep_tokens.go | 41 + .../aws/aws-sdk-go/internal/ini/skipper.go | 42 + .../aws/aws-sdk-go/internal/ini/statement.go | 36 + .../aws/aws-sdk-go/internal/ini/value_util.go | 284 + .../aws/aws-sdk-go/internal/ini/visitor.go | 161 + .../aws/aws-sdk-go/internal/ini/walker.go | 25 + .../aws/aws-sdk-go/internal/ini/ws_token.go | 24 + .../aws/aws-sdk-go/service/apigateway/api.go | 248 +- .../service/cloudwatchevents/api.go | 120 +- .../aws/aws-sdk-go/service/ec2/api.go | 1368 +- .../aws/aws-sdk-go/service/glue/api.go | 624 +- .../aws/aws-sdk-go/service/glue/errors.go | 6 + .../aws/aws-sdk-go/service/inspector/api.go | 198 + .../aws/aws-sdk-go/service/lightsail/api.go | 14411 +++++++++++----- .../aws/aws-sdk-go/service/medialive/api.go | 336 +- .../aws/aws-sdk-go/service/route53/api.go | 1216 +- .../aws/aws-sdk-go/service/route53/errors.go | 13 +- .../aws/aws-sdk-go/service/ssm/api.go | 222 +- .../aws/aws-sdk-go/service/workspaces/api.go | 6 + vendor/vendor.json | 1066 +- 40 files changed, 16050 insertions(+), 5942 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go index 51e21e0f38f..e1551495812 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go @@ -4,9 +4,8 @@ import ( "fmt" "os" - "github.com/go-ini/ini" - "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/internal/ini" "github.com/aws/aws-sdk-go/internal/shareddefaults" ) @@ -77,36 +76,37 @@ func (p *SharedCredentialsProvider) IsExpired() bool { // The credentials retrieved from the profile will be returned or error. Error will be // returned if it fails to read from the file, or the data is invalid. func loadProfile(filename, profile string) (Value, error) { - config, err := ini.Load(filename) + config, err := ini.OpenFile(filename) if err != nil { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to load shared credentials file", err) } - iniProfile, err := config.GetSection(profile) - if err != nil { - return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to get profile", err) + + iniProfile, ok := config.GetSection(profile) + if !ok { + return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to get profile", nil) } - id, err := iniProfile.GetKey("aws_access_key_id") - if err != nil { + id := iniProfile.String("aws_access_key_id") + if len(id) == 0 { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsAccessKey", fmt.Sprintf("shared credentials %s in %s did not contain aws_access_key_id", profile, filename), - err) + nil) } - secret, err := iniProfile.GetKey("aws_secret_access_key") - if err != nil { + secret := iniProfile.String("aws_secret_access_key") + if len(secret) == 0 { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsSecret", fmt.Sprintf("shared credentials %s in %s did not contain aws_secret_access_key", profile, filename), nil) } // Default to empty string if not found - token := iniProfile.Key("aws_session_token") + token := iniProfile.String("aws_session_token") return Value{ - AccessKeyID: id.String(), - SecretAccessKey: secret.String(), - SessionToken: token.String(), + AccessKeyID: id, + SecretAccessKey: secret, + SessionToken: token, ProviderName: SharedCredsProviderName, }, nil } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 4bd182ab2e5..311277ebc58 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -761,6 +761,7 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -777,6 +778,7 @@ var awsPartition = partition{ "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -1282,7 +1284,6 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1598,6 +1599,7 @@ var awsPartition = partition{ "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1702,6 +1704,12 @@ var awsPartition = partition{ Region: "eu-west-1", }, }, + "eu-west-2": endpoint{ + Hostname: "rds.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, "us-east-1": endpoint{ Hostname: "rds.us-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2101,9 +2109,33 @@ var awsPartition = partition{ "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "servicecatalog-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "servicecatalog-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "servicecatalog-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "servicecatalog-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "servicediscovery": service{ @@ -2952,6 +2984,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "api.sagemaker": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "apigateway": service{ Endpoints: endpoints{ @@ -3212,6 +3250,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "runtime.sagemaker": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "s3": service{ Defaults: endpoint{ SignatureVersions: []string{"s3", "s3v4"}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go index 565a0b79508..efe17ed366a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go @@ -2,11 +2,11 @@ package session import ( "fmt" - "io/ioutil" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/go-ini/ini" + + "github.com/aws/aws-sdk-go/internal/ini" ) const ( @@ -66,7 +66,7 @@ type sharedConfig struct { type sharedConfigFile struct { Filename string - IniData *ini.File + IniData ini.Sections } // loadSharedConfig retrieves the configuration from the list of files @@ -107,19 +107,16 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { files := make([]sharedConfigFile, 0, len(filenames)) for _, filename := range filenames { - b, err := ioutil.ReadFile(filename) - if err != nil { + sections, err := ini.OpenFile(filename) + if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ini.ErrCodeUnableToReadFile { // Skip files which can't be opened and read for whatever reason continue - } - - f, err := ini.Load(b) - if err != nil { + } else if err != nil { return nil, SharedConfigLoadError{Filename: filename, Err: err} } files = append(files, sharedConfigFile{ - Filename: filename, IniData: f, + Filename: filename, IniData: sections, }) } @@ -180,45 +177,45 @@ func (cfg *sharedConfig) setFromIniFiles(profile string, files []sharedConfigFil // if a config file only includes aws_access_key_id but no aws_secret_access_key // the aws_access_key_id will be ignored. func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile) error { - section, err := file.IniData.GetSection(profile) - if err != nil { + section, ok := file.IniData.GetSection(profile) + if !ok { // Fallback to to alternate profile name: profile - section, err = file.IniData.GetSection(fmt.Sprintf("profile %s", profile)) - if err != nil { - return SharedConfigProfileNotExistsError{Profile: profile, Err: err} + section, ok = file.IniData.GetSection(fmt.Sprintf("profile %s", profile)) + if !ok { + return SharedConfigProfileNotExistsError{Profile: profile, Err: nil} } } // Shared Credentials - akid := section.Key(accessKeyIDKey).String() - secret := section.Key(secretAccessKey).String() + akid := section.String(accessKeyIDKey) + secret := section.String(secretAccessKey) if len(akid) > 0 && len(secret) > 0 { cfg.Creds = credentials.Value{ AccessKeyID: akid, SecretAccessKey: secret, - SessionToken: section.Key(sessionTokenKey).String(), + SessionToken: section.String(sessionTokenKey), ProviderName: fmt.Sprintf("SharedConfigCredentials: %s", file.Filename), } } // Assume Role - roleArn := section.Key(roleArnKey).String() - srcProfile := section.Key(sourceProfileKey).String() - credentialSource := section.Key(credentialSourceKey).String() + roleArn := section.String(roleArnKey) + srcProfile := section.String(sourceProfileKey) + credentialSource := section.String(credentialSourceKey) hasSource := len(srcProfile) > 0 || len(credentialSource) > 0 if len(roleArn) > 0 && hasSource { cfg.AssumeRole = assumeRoleConfig{ RoleARN: roleArn, SourceProfile: srcProfile, CredentialSource: credentialSource, - ExternalID: section.Key(externalIDKey).String(), - MFASerial: section.Key(mfaSerialKey).String(), - RoleSessionName: section.Key(roleSessionNameKey).String(), + ExternalID: section.String(externalIDKey), + MFASerial: section.String(mfaSerialKey), + RoleSessionName: section.String(roleSessionNameKey), } } // Region - if v := section.Key(regionKey).String(); len(v) > 0 { + if v := section.String(regionKey); len(v) > 0 { cfg.Region = v } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 7a7b37f3734..08af180490d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.15.55" +const SDKVersion = "1.15.61" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go new file mode 100644 index 00000000000..e83a99886bc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go @@ -0,0 +1,120 @@ +package ini + +// ASTKind represents different states in the parse table +// and the type of AST that is being constructed +type ASTKind int + +// ASTKind* is used in the parse table to transition between +// the different states +const ( + ASTKindNone = ASTKind(iota) + ASTKindStart + ASTKindExpr + ASTKindEqualExpr + ASTKindStatement + ASTKindSkipStatement + ASTKindExprStatement + ASTKindSectionStatement + ASTKindNestedSectionStatement + ASTKindCompletedNestedSectionStatement + ASTKindCommentStatement + ASTKindCompletedSectionStatement +) + +func (k ASTKind) String() string { + switch k { + case ASTKindNone: + return "none" + case ASTKindStart: + return "start" + case ASTKindExpr: + return "expr" + case ASTKindStatement: + return "stmt" + case ASTKindSectionStatement: + return "section_stmt" + case ASTKindExprStatement: + return "expr_stmt" + case ASTKindCommentStatement: + return "comment" + case ASTKindNestedSectionStatement: + return "nested_section_stmt" + case ASTKindCompletedSectionStatement: + return "completed_stmt" + case ASTKindSkipStatement: + return "skip" + default: + return "" + } +} + +// AST interface allows us to determine what kind of node we +// are on and casting may not need to be necessary. +// +// The root is always the first node in Children +type AST struct { + Kind ASTKind + Root Token + RootToken bool + Children []AST +} + +func newAST(kind ASTKind, root AST, children ...AST) AST { + return AST{ + Kind: kind, + Children: append([]AST{root}, children...), + } +} + +func newASTWithRootToken(kind ASTKind, root Token, children ...AST) AST { + return AST{ + Kind: kind, + Root: root, + RootToken: true, + Children: children, + } +} + +// AppendChild will append to the list of children an AST has. +func (a *AST) AppendChild(child AST) { + a.Children = append(a.Children, child) +} + +// GetRoot will return the root AST which can be the first entry +// in the children list or a token. +func (a *AST) GetRoot() AST { + if a.RootToken { + return *a + } + + if len(a.Children) == 0 { + return AST{} + } + + return a.Children[0] +} + +// GetChildren will return the current AST's list of children +func (a *AST) GetChildren() []AST { + if len(a.Children) == 0 { + return []AST{} + } + + if a.RootToken { + return a.Children + } + + return a.Children[1:] +} + +// SetChildren will set and override all children of the AST. +func (a *AST) SetChildren(children []AST) { + if a.RootToken { + a.Children = children + } else { + a.Children = append(a.Children[:1], children...) + } +} + +// Start is used to indicate the starting state of the parse table. +var Start = newAST(ASTKindStart, AST{}) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go new file mode 100644 index 00000000000..0895d53cbe6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go @@ -0,0 +1,11 @@ +package ini + +var commaRunes = []rune(",") + +func isComma(b rune) bool { + return b == ',' +} + +func newCommaToken() Token { + return newToken(TokenComma, commaRunes, NoneType) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go new file mode 100644 index 00000000000..8d03fd3d3e1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go @@ -0,0 +1,39 @@ +package ini + +// isComment will return whether or not the next byte(s) is a +// comment. +func isComment(b []rune) bool { + if len(b) == 0 { + return false + } + + switch b[0] { + case ';': + return true + case '#': + return true + case '/': + if len(b) > 1 { + return b[1] == '/' + } + } + + return false +} + +// newCommentToken will create a comment token and +// return how many bytes were read. +func newCommentToken(b []rune) (Token, int, error) { + i := 0 + for ; i < len(b); i++ { + if b[i] == '\n' { + break + } + + if len(b)-i > 2 && b[i] == '\r' && b[i+1] == '\n' { + break + } + } + + return newToken(TokenComment, b[:i], NoneType), i, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go new file mode 100644 index 00000000000..445b503ca33 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go @@ -0,0 +1,30 @@ +// Package ini is an LL(1) parser for configuration files. +// +// Example: +// sections, err := ini.OpenFile("/path/to/file") +// if err != nil { +// panic(err) +// } +// +// profile := "foo" +// section, ok := sections.GetSection(profile) +// if !ok { +// fmt.Printf("section %q could not be found", profile) +// } +// +// Below is the BNF that describes this parser +// Grammar: +// stmt -> value stmt' +// stmt' -> epsilon | op stmt +// value -> number | string | boolean | quoted_string +// +// section -> [ section' +// section' -> value section_close +// section_close -> ] +// +// SkipState will skip (NL WS)+ +// +// comment -> # comment' | ; comment' | / comment_slash +// comment_slash -> / comment' +// comment' -> epsilon | value +package ini diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go new file mode 100644 index 00000000000..04345a54c20 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go @@ -0,0 +1,4 @@ +package ini + +// emptyToken is used to satisfy the Token interface +var emptyToken = newToken(TokenNone, []rune{}, NoneType) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go new file mode 100644 index 00000000000..91ba2a59dd5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go @@ -0,0 +1,24 @@ +package ini + +// newExpression will return an expression AST. +// Expr represents an expression +// +// grammar: +// expr -> string | number +func newExpression(tok Token) AST { + return newASTWithRootToken(ASTKindExpr, tok) +} + +func newEqualExpr(left AST, tok Token) AST { + return newASTWithRootToken(ASTKindEqualExpr, tok, left) +} + +// EqualExprKey will return a LHS value in the equal expr +func EqualExprKey(ast AST) string { + children := ast.GetChildren() + if len(children) == 0 || ast.Kind != ASTKindEqualExpr { + return "" + } + + return string(children[0].Root.Raw()) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go new file mode 100644 index 00000000000..8d462f77e24 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go @@ -0,0 +1,17 @@ +// +build gofuzz + +package ini + +import ( + "bytes" +) + +func Fuzz(data []byte) int { + b := bytes.NewReader(data) + + if _, err := Parse(b); err != nil { + return 0 + } + + return 1 +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go new file mode 100644 index 00000000000..3b0ca7afe3b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go @@ -0,0 +1,51 @@ +package ini + +import ( + "io" + "os" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +// OpenFile takes a path to a given file, and will open and parse +// that file. +func OpenFile(path string) (Sections, error) { + f, err := os.Open(path) + if err != nil { + return Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err) + } + defer f.Close() + + return Parse(f) +} + +// Parse will parse the given file using the shared config +// visitor. +func Parse(f io.Reader) (Sections, error) { + tree, err := ParseAST(f) + if err != nil { + return Sections{}, err + } + + v := NewDefaultVisitor() + if err = Walk(tree, v); err != nil { + return Sections{}, err + } + + return v.Sections, nil +} + +// ParseBytes will parse the given bytes and return the parsed sections. +func ParseBytes(b []byte) (Sections, error) { + tree, err := ParseASTBytes(b) + if err != nil { + return Sections{}, err + } + + v := NewDefaultVisitor() + if err = Walk(tree, v); err != nil { + return Sections{}, err + } + + return v.Sections, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go new file mode 100644 index 00000000000..582c024ad15 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go @@ -0,0 +1,165 @@ +package ini + +import ( + "bytes" + "io" + "io/ioutil" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +const ( + // ErrCodeUnableToReadFile is used when a file is failed to be + // opened or read from. + ErrCodeUnableToReadFile = "FailedRead" +) + +// TokenType represents the various different tokens types +type TokenType int + +func (t TokenType) String() string { + switch t { + case TokenNone: + return "none" + case TokenLit: + return "literal" + case TokenSep: + return "sep" + case TokenOp: + return "op" + case TokenWS: + return "ws" + case TokenNL: + return "newline" + case TokenComment: + return "comment" + case TokenComma: + return "comma" + default: + return "" + } +} + +// TokenType enums +const ( + TokenNone = TokenType(iota) + TokenLit + TokenSep + TokenComma + TokenOp + TokenWS + TokenNL + TokenComment +) + +type iniLexer struct{} + +// Tokenize will return a list of tokens during lexical analysis of the +// io.Reader. +func (l *iniLexer) Tokenize(r io.Reader) ([]Token, error) { + b, err := ioutil.ReadAll(r) + if err != nil { + return nil, awserr.New(ErrCodeUnableToReadFile, "unable to read file", err) + } + + return l.tokenize(b) +} + +func (l *iniLexer) tokenize(b []byte) ([]Token, error) { + runes := bytes.Runes(b) + var err error + n := 0 + tokenAmount := countTokens(runes) + tokens := make([]Token, tokenAmount) + count := 0 + + for len(runes) > 0 && count < tokenAmount { + switch { + case isWhitespace(runes[0]): + tokens[count], n, err = newWSToken(runes) + case isComma(runes[0]): + tokens[count], n = newCommaToken(), 1 + case isComment(runes): + tokens[count], n, err = newCommentToken(runes) + case isNewline(runes): + tokens[count], n, err = newNewlineToken(runes) + case isSep(runes): + tokens[count], n, err = newSepToken(runes) + case isOp(runes): + tokens[count], n, err = newOpToken(runes) + default: + tokens[count], n, err = newLitToken(runes) + } + + if err != nil { + return nil, err + } + + count++ + + runes = runes[n:] + } + + return tokens[:count], nil +} + +func countTokens(runes []rune) int { + count, n := 0, 0 + var err error + + for len(runes) > 0 { + switch { + case isWhitespace(runes[0]): + _, n, err = newWSToken(runes) + case isComma(runes[0]): + _, n = newCommaToken(), 1 + case isComment(runes): + _, n, err = newCommentToken(runes) + case isNewline(runes): + _, n, err = newNewlineToken(runes) + case isSep(runes): + _, n, err = newSepToken(runes) + case isOp(runes): + _, n, err = newOpToken(runes) + default: + _, n, err = newLitToken(runes) + } + + if err != nil { + return 0 + } + + count++ + runes = runes[n:] + } + + return count + 1 +} + +// Token indicates a metadata about a given value. +type Token struct { + t TokenType + ValueType ValueType + base int + raw []rune +} + +var emptyValue = Value{} + +func newToken(t TokenType, raw []rune, v ValueType) Token { + return Token{ + t: t, + raw: raw, + ValueType: v, + } +} + +// Raw return the raw runes that were consumed +func (tok Token) Raw() []rune { + return tok.raw +} + +// Type returns the token type +func (tok Token) Type() TokenType { + return tok.t +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go new file mode 100644 index 00000000000..3bf43902850 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go @@ -0,0 +1,312 @@ +package ini + +import ( + "fmt" + "io" +) + +// State enums for the parse table +const ( + InvalidState = iota + // stmt -> value stmt' + StatementState + // stmt' -> MarkComplete | op stmt + StatementPrimeState + // value -> number | string | boolean | quoted_string + ValueState + // section -> [ section' + OpenScopeState + // section' -> value section_close + SectionState + // section_close -> ] + CloseScopeState + // SkipState will skip (NL WS)+ + SkipState + // SkipTokenState will skip any token and push the previous + // state onto the stack. + SkipTokenState + // comment -> # comment' | ; comment' | / comment_slash + // comment_slash -> / comment' + // comment' -> MarkComplete | value + CommentState + // MarkComplete state will complete statements and move that + // to the completed AST list + MarkCompleteState + // TerminalState signifies that the tokens have been fully parsed + TerminalState +) + +// parseTable is a state machine to dictate the grammar above. +var parseTable = map[ASTKind]map[TokenType]int{ + ASTKindStart: map[TokenType]int{ + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: TerminalState, + }, + ASTKindCommentStatement: map[TokenType]int{ + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindExpr: map[TokenType]int{ + TokenOp: StatementPrimeState, + TokenLit: ValueState, + TokenSep: OpenScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindEqualExpr: map[TokenType]int{ + TokenLit: ValueState, + TokenWS: SkipTokenState, + TokenNL: SkipState, + }, + ASTKindStatement: map[TokenType]int{ + TokenLit: SectionState, + TokenSep: CloseScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindExprStatement: map[TokenType]int{ + TokenLit: ValueState, + TokenSep: OpenScopeState, + TokenOp: ValueState, + TokenWS: ValueState, + TokenNL: MarkCompleteState, + TokenComment: CommentState, + TokenNone: TerminalState, + TokenComma: SkipState, + }, + ASTKindSectionStatement: map[TokenType]int{ + TokenLit: SectionState, + TokenSep: CloseScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + }, + ASTKindCompletedSectionStatement: map[TokenType]int{ + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindSkipStatement: map[TokenType]int{ + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: TerminalState, + }, +} + +// ParseAST will parse input from an io.Reader using +// an LL(1) parser. +func ParseAST(r io.Reader) ([]AST, error) { + lexer := iniLexer{} + tokens, err := lexer.Tokenize(r) + if err != nil { + return []AST{}, err + } + + return parse(tokens) +} + +// ParseASTBytes will parse input from a byte slice using +// an LL(1) parser. +func ParseASTBytes(b []byte) ([]AST, error) { + lexer := iniLexer{} + tokens, err := lexer.tokenize(b) + if err != nil { + return []AST{}, err + } + + return parse(tokens) +} + +func parse(tokens []Token) ([]AST, error) { + start := Start + stack := newParseStack(3, len(tokens)) + + stack.Push(start) + s := newSkipper() + +loop: + for stack.Len() > 0 { + k := stack.Pop() + + var tok Token + if len(tokens) == 0 { + // this occurs when all the tokens have been processed + // but reduction of what's left on the stack needs to + // occur. + tok = emptyToken + } else { + tok = tokens[0] + } + + step := parseTable[k.Kind][tok.Type()] + if s.ShouldSkip(tok) { + step = SkipTokenState + } + + switch step { + case TerminalState: + // Finished parsing. Push what should be the last + // statement to the stack. If there is anything left + // on the stack, an error in parsing has occurred. + if k.Kind != ASTKindStart { + stack.MarkComplete(k) + } + break loop + case SkipTokenState: + // When skipping a token, the previous state was popped off the stack. + // To maintain the correct state, the previous state will be pushed + // onto the stack. + stack.Push(k) + case StatementState: + if k.Kind != ASTKindStart { + stack.MarkComplete(k) + } + expr := newExpression(tok) + stack.Push(expr) + case StatementPrimeState: + if tok.Type() != TokenOp { + stack.MarkComplete(k) + continue + } + + if k.Kind != ASTKindExpr { + return nil, NewParseError( + fmt.Sprintf("invalid expression: expected Expr type, but found %T type", k), + ) + } + + expr := newEqualExpr(k, tok) + stack.Push(expr) + case ValueState: + // ValueState requires the previous state to either be an equal expression + // or an expression statement. + // + // This grammar occurs when the RHS is a number, word, or quoted string. + // equal_expr -> lit op equal_expr' + // equal_expr' -> number | string | quoted_string + // quoted_string -> " quoted_string' + // quoted_string' -> string quoted_string_end + // quoted_string_end -> " + // + // otherwise + // expr_stmt -> equal_expr (expr_stmt')* + // expr_stmt' -> ws S | op S | MarkComplete + // S -> equal_expr' expr_stmt' + switch k.Kind { + case ASTKindEqualExpr: + // assiging a value to some key + k.AppendChild(newExpression(tok)) + stack.Push(newExprStatement(k)) + case ASTKindExprStatement: + root := k.GetRoot() + children := root.GetChildren() + if len(children) == 0 { + return nil, NewParseError( + fmt.Sprintf("invalid expression: AST contains no children %s", k.Kind), + ) + } + + rhs := children[len(children)-1] + + if rhs.Root.ValueType != QuotedStringType { + rhs.Root.ValueType = StringType + rhs.Root.raw = append(rhs.Root.raw, tok.Raw()...) + + } + + children[len(children)-1] = rhs + k.SetChildren(children) + + stack.Push(k) + } + case OpenScopeState: + if !runeCompare(tok.Raw(), openBrace) { + return nil, NewParseError("expected '['") + } + + stmt := newStatement() + stack.Push(stmt) + case CloseScopeState: + if !runeCompare(tok.Raw(), closeBrace) { + return nil, NewParseError("expected ']'") + } + + stack.Push(newCompletedSectionStatement(k)) + case SectionState: + var stmt AST + + switch k.Kind { + case ASTKindStatement: + // If there are multiple literals inside of a scope declaration, + // then the current token's raw value will be appended to the Name. + // + // This handles cases like [ profile default ] + // + // k will represent a SectionStatement with the children representing + // the label of the section + stmt = newSectionStatement(tok) + case ASTKindSectionStatement: + k.Root.raw = append(k.Root.raw, ' ') + k.Root.raw = append(k.Root.raw, tok.Raw()...) + stmt = k + default: + return nil, NewParseError( + fmt.Sprintf("invalid statement: expected statement: %v", k.Kind), + ) + } + + stack.Push(stmt) + case MarkCompleteState: + if k.Kind != ASTKindStart { + stack.MarkComplete(k) + } + + if stack.Len() == 0 { + stack.Push(start) + } + case SkipState: + stack.Push(newSkipStatement(k)) + s.Skip() + case CommentState: + if k.Kind == ASTKindStart { + stack.Push(k) + } else { + stack.MarkComplete(k) + } + + stmt := newCommentStatement(tok) + stack.Push(stmt) + default: + return nil, NewParseError(fmt.Sprintf("invalid state with ASTKind %v and TokenType %v", k, tok)) + } + + if len(tokens) > 0 { + tokens = tokens[1:] + } + } + + // this occurs when a statement has not been completed + if stack.top > 1 { + return nil, NewParseError(fmt.Sprintf("incomplete expression: %v", stack.container)) + } + + // returns a sublist which exludes the start symbol + return stack.List(), nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go new file mode 100644 index 00000000000..61754c88dae --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go @@ -0,0 +1,317 @@ +package ini + +import ( + "fmt" + "strconv" + "strings" +) + +var ( + runesTrue = []rune("true") + runesFalse = []rune("false") +) + +var literalValues = [][]rune{ + runesTrue, + runesFalse, +} + +func isBoolValue(b []rune) bool { + for _, lv := range literalValues { + if isLitValue(lv, b) { + return true + } + } + return false +} + +func isLitValue(want, have []rune) bool { + if len(have) < len(want) { + return false + } + + for i := 0; i < len(want); i++ { + if want[i] != have[i] { + return false + } + } + + return true +} + +// isNumberValue will return whether not the leading characters in +// a byte slice is a number. A number is delimited by whitespace or +// the newline token. +// +// A number is defined to be in a binary, octal, decimal (int | float), hex format, +// or in scientific notation. +func isNumberValue(b []rune) bool { + negativeIndex := 0 + helper := numberHelper{} + needDigit := false + + for i := 0; i < len(b); i++ { + negativeIndex++ + + switch b[i] { + case '-': + if helper.IsNegative() || negativeIndex != 1 { + return false + } + helper.Determine(b[i]) + needDigit = true + continue + case 'e', 'E': + if err := helper.Determine(b[i]); err != nil { + return false + } + negativeIndex = 0 + needDigit = true + continue + case 'b': + if helper.numberFormat == hex { + break + } + fallthrough + case 'o', 'x': + needDigit = true + if i == 0 { + return false + } + + fallthrough + case '.': + if err := helper.Determine(b[i]); err != nil { + return false + } + needDigit = true + continue + } + + if i > 0 && (isNewline(b[i:]) || isWhitespace(b[i])) { + return !needDigit + } + + if !helper.CorrectByte(b[i]) { + return false + } + needDigit = false + } + + return !needDigit +} + +func isValid(b []rune) (bool, int, error) { + if len(b) == 0 { + // TODO: should probably return an error + return false, 0, nil + } + + return isValidRune(b[0]), 1, nil +} + +func isValidRune(r rune) bool { + return r != ':' && r != '=' && r != '[' && r != ']' && r != ' ' && r != '\n' +} + +// ValueType is an enum that will signify what type +// the Value is +type ValueType int + +func (v ValueType) String() string { + switch v { + case NoneType: + return "NONE" + case DecimalType: + return "FLOAT" + case IntegerType: + return "INT" + case StringType: + return "STRING" + case BoolType: + return "BOOL" + } + + return "" +} + +// ValueType enums +const ( + NoneType = ValueType(iota) + DecimalType + IntegerType + StringType + QuotedStringType + BoolType +) + +// Value is a union container +type Value struct { + Type ValueType + raw []rune + + integer int64 + decimal float64 + boolean bool + str string +} + +func newValue(t ValueType, base int, raw []rune) (Value, error) { + v := Value{ + Type: t, + raw: raw, + } + var err error + + switch t { + case DecimalType: + v.decimal, err = strconv.ParseFloat(string(raw), 64) + if err != nil { + panic(err) + } + case IntegerType: + if base != 10 { + raw = raw[2:] + } + + v.integer, err = strconv.ParseInt(string(raw), base, 64) + case StringType: + v.str = string(raw) + case QuotedStringType: + v.str = string(raw[1 : len(raw)-1]) + case BoolType: + v.boolean = runeCompare(v.raw, runesTrue) + } + + return v, err +} + +// Append will append values and change the type to a string +// type. +func (v *Value) Append(tok Token) { + r := tok.Raw() + if v.Type != QuotedStringType { + v.Type = StringType + r = tok.raw[1 : len(tok.raw)-1] + } + if tok.Type() != TokenLit { + v.raw = append(v.raw, tok.Raw()...) + } else { + v.raw = append(v.raw, r...) + } +} + +func (v Value) String() string { + switch v.Type { + case DecimalType: + return fmt.Sprintf("decimal: %f", v.decimal) + case IntegerType: + return fmt.Sprintf("integer: %d", v.integer) + case StringType: + return fmt.Sprintf("string: %s", string(v.raw)) + case QuotedStringType: + return fmt.Sprintf("quoted string: %s", string(v.raw)) + case BoolType: + return fmt.Sprintf("bool: %t", v.boolean) + default: + return "union not set" + } +} + +func newLitToken(b []rune) (Token, int, error) { + n := 0 + var err error + + token := Token{} + if b[0] == '"' { + n, err = getStringValue(b) + if err != nil { + return token, n, err + } + + token = newToken(TokenLit, b[:n], QuotedStringType) + } else if isNumberValue(b) { + var base int + base, n, err = getNumericalValue(b) + if err != nil { + return token, 0, err + } + + value := b[:n] + vType := IntegerType + if contains(value, '.') || hasExponent(value) { + vType = DecimalType + } + token = newToken(TokenLit, value, vType) + token.base = base + } else if isBoolValue(b) { + n, err = getBoolValue(b) + + token = newToken(TokenLit, b[:n], BoolType) + } else { + n, err = getValue(b) + token = newToken(TokenLit, b[:n], StringType) + } + + return token, n, err +} + +// IntValue returns an integer value +func (v Value) IntValue() int64 { + return v.integer +} + +// FloatValue returns a float value +func (v Value) FloatValue() float64 { + return v.decimal +} + +// BoolValue returns a bool value +func (v Value) BoolValue() bool { + return v.boolean +} + +func isTrimmable(r rune) bool { + switch r { + case '\n', ' ': + return true + } + return false +} + +// StringValue returns the string value +func (v Value) StringValue() string { + switch v.Type { + case StringType: + return strings.TrimFunc(string(v.raw), isTrimmable) + case QuotedStringType: + // preserve all characters in the quotes + return string(removeEscapedCharacters(v.raw[1 : len(v.raw)-1])) + default: + return strings.TrimFunc(string(v.raw), isTrimmable) + } +} + +func contains(runes []rune, c rune) bool { + for i := 0; i < len(runes); i++ { + if runes[i] == c { + return true + } + } + + return false +} + +func runeCompare(v1 []rune, v2 []rune) bool { + if len(v1) != len(v2) { + return false + } + + for i := 0; i < len(v1); i++ { + if v1[i] != v2[i] { + return false + } + } + + return true +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go new file mode 100644 index 00000000000..e52ac399f17 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go @@ -0,0 +1,30 @@ +package ini + +func isNewline(b []rune) bool { + if len(b) == 0 { + return false + } + + if b[0] == '\n' { + return true + } + + if len(b) < 2 { + return false + } + + return b[0] == '\r' && b[1] == '\n' +} + +func newNewlineToken(b []rune) (Token, int, error) { + i := 1 + if b[0] == '\r' && isNewline(b[1:]) { + i++ + } + + if !isNewline([]rune(b[:i])) { + return emptyToken, 0, NewParseError("invalid new line token") + } + + return newToken(TokenNL, b[:i], NoneType), i, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go new file mode 100644 index 00000000000..a45c0bc5662 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go @@ -0,0 +1,152 @@ +package ini + +import ( + "bytes" + "fmt" + "strconv" +) + +const ( + none = numberFormat(iota) + binary + octal + decimal + hex + exponent +) + +type numberFormat int + +// numberHelper is used to dictate what format a number is in +// and what to do for negative values. Since -1e-4 is a valid +// number, we cannot just simply check for duplicate negatives. +type numberHelper struct { + numberFormat numberFormat + + negative bool + negativeExponent bool +} + +func (b numberHelper) Exists() bool { + return b.numberFormat != none +} + +func (b numberHelper) IsNegative() bool { + return b.negative || b.negativeExponent +} + +func (b *numberHelper) Determine(c rune) error { + if b.Exists() { + return NewParseError(fmt.Sprintf("multiple number formats: 0%v", string(c))) + } + + switch c { + case 'b': + b.numberFormat = binary + case 'o': + b.numberFormat = octal + case 'x': + b.numberFormat = hex + case 'e', 'E': + b.numberFormat = exponent + case '-': + if b.numberFormat != exponent { + b.negative = true + } else { + b.negativeExponent = true + } + case '.': + b.numberFormat = decimal + default: + return NewParseError(fmt.Sprintf("invalid number character: %v", string(c))) + } + + return nil +} + +func (b numberHelper) CorrectByte(c rune) bool { + switch { + case b.numberFormat == binary: + if !isBinaryByte(c) { + return false + } + case b.numberFormat == octal: + if !isOctalByte(c) { + return false + } + case b.numberFormat == hex: + if !isHexByte(c) { + return false + } + case b.numberFormat == decimal: + if !isDigit(c) { + return false + } + case b.numberFormat == exponent: + if !isDigit(c) { + return false + } + case b.negativeExponent: + if !isDigit(c) { + return false + } + case b.negative: + if !isDigit(c) { + return false + } + default: + if !isDigit(c) { + return false + } + } + + return true +} + +func (b numberHelper) Base() int { + switch b.numberFormat { + case binary: + return 2 + case octal: + return 8 + case hex: + return 16 + default: + return 10 + } +} + +func (b numberHelper) String() string { + buf := bytes.Buffer{} + i := 0 + + switch b.numberFormat { + case binary: + i++ + buf.WriteString(strconv.Itoa(i) + ": binary format\n") + case octal: + i++ + buf.WriteString(strconv.Itoa(i) + ": octal format\n") + case hex: + i++ + buf.WriteString(strconv.Itoa(i) + ": hex format\n") + case exponent: + i++ + buf.WriteString(strconv.Itoa(i) + ": exponent format\n") + default: + i++ + buf.WriteString(strconv.Itoa(i) + ": integer format\n") + } + + if b.negative { + i++ + buf.WriteString(strconv.Itoa(i) + ": negative format\n") + } + + if b.negativeExponent { + i++ + buf.WriteString(strconv.Itoa(i) + ": negative exponent format\n") + } + + return buf.String() +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go new file mode 100644 index 00000000000..8a84c7cbe08 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go @@ -0,0 +1,39 @@ +package ini + +import ( + "fmt" +) + +var ( + equalOp = []rune("=") + equalColonOp = []rune(":") +) + +func isOp(b []rune) bool { + if len(b) == 0 { + return false + } + + switch b[0] { + case '=': + return true + case ':': + return true + default: + return false + } +} + +func newOpToken(b []rune) (Token, int, error) { + tok := Token{} + + switch b[0] { + case '=': + tok = newToken(TokenOp, equalOp, NoneType) + case ':': + tok = newToken(TokenOp, equalColonOp, NoneType) + default: + return tok, 0, NewParseError(fmt.Sprintf("unexpected op type, %v", b[0])) + } + return tok, 1, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go new file mode 100644 index 00000000000..45728701931 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go @@ -0,0 +1,43 @@ +package ini + +import "fmt" + +const ( + // ErrCodeParseError is returned when a parsing error + // has occurred. + ErrCodeParseError = "INIParseError" +) + +// ParseError is an error which is returned during any part of +// the parsing process. +type ParseError struct { + msg string +} + +// NewParseError will return a new ParseError where message +// is the description of the error. +func NewParseError(message string) *ParseError { + return &ParseError{ + msg: message, + } +} + +// Code will return the ErrCodeParseError +func (err *ParseError) Code() string { + return ErrCodeParseError +} + +// Message returns the error's message +func (err *ParseError) Message() string { + return err.msg +} + +// OrigError return nothing since there will never be any +// original error. +func (err *ParseError) OrigError() error { + return nil +} + +func (err *ParseError) Error() string { + return fmt.Sprintf("%s: %s", err.Code(), err.Message()) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go new file mode 100644 index 00000000000..7f01cf7c703 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go @@ -0,0 +1,60 @@ +package ini + +import ( + "bytes" + "fmt" +) + +// ParseStack is a stack that contains a container, the stack portion, +// and the list which is the list of ASTs that have been successfully +// parsed. +type ParseStack struct { + top int + container []AST + list []AST + index int +} + +func newParseStack(sizeContainer, sizeList int) ParseStack { + return ParseStack{ + container: make([]AST, sizeContainer), + list: make([]AST, sizeList), + } +} + +// Pop will return and truncate the last container element. +func (s *ParseStack) Pop() AST { + s.top-- + return s.container[s.top] +} + +// Push will add the new AST to the container +func (s *ParseStack) Push(ast AST) { + s.container[s.top] = ast + s.top++ +} + +// MarkComplete will append the AST to the list of completed statements +func (s *ParseStack) MarkComplete(ast AST) { + s.list[s.index] = ast + s.index++ +} + +// List will return the completed statements +func (s ParseStack) List() []AST { + return s.list[:s.index] +} + +// Len will return the length of the container +func (s *ParseStack) Len() int { + return s.top +} + +func (s ParseStack) String() string { + buf := bytes.Buffer{} + for i, node := range s.list { + buf.WriteString(fmt.Sprintf("%d: %v\n", i+1, node)) + } + + return buf.String() +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go new file mode 100644 index 00000000000..f82095ba259 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go @@ -0,0 +1,41 @@ +package ini + +import ( + "fmt" +) + +var ( + emptyRunes = []rune{} +) + +func isSep(b []rune) bool { + if len(b) == 0 { + return false + } + + switch b[0] { + case '[', ']': + return true + default: + return false + } +} + +var ( + openBrace = []rune("[") + closeBrace = []rune("]") +) + +func newSepToken(b []rune) (Token, int, error) { + tok := Token{} + + switch b[0] { + case '[': + tok = newToken(TokenSep, openBrace, NoneType) + case ']': + tok = newToken(TokenSep, closeBrace, NoneType) + default: + return tok, 0, NewParseError(fmt.Sprintf("unexpected sep type, %v", b[0])) + } + return tok, 1, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go new file mode 100644 index 00000000000..b72ea2fcee9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go @@ -0,0 +1,42 @@ +package ini + +// skipper is used to skip certain blocks of an ini file. +// Currently skipper is used to skip nested blocks of ini +// files. See example below +// +// [ foo ] +// nested = // this section will be skipped +// a=b +// c=d +// bar=baz // this will be included +type skipper struct { + shouldSkip bool + TokenSet bool + prevTok Token +} + +func newSkipper() skipper { + return skipper{ + prevTok: emptyToken, + } +} + +func (s *skipper) ShouldSkip(tok Token) bool { + if s.shouldSkip && s.prevTok.Type() == TokenNL && tok.Type() != TokenWS { + s.Continue() + return false + } + s.prevTok = tok + + return s.shouldSkip +} + +func (s *skipper) Skip() { + s.shouldSkip = true + s.prevTok = emptyToken +} + +func (s *skipper) Continue() { + s.shouldSkip = false + s.prevTok = emptyToken +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go new file mode 100644 index 00000000000..ea86fea858b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go @@ -0,0 +1,36 @@ +package ini + +// Statement is an empty AST mostly used for transitioning states. +func newStatement() AST { + return newAST(ASTKindStatement, AST{}) +} + +// SectionStatement represents a section AST +func newSectionStatement(tok Token) AST { + return newASTWithRootToken(ASTKindSectionStatement, tok) +} + +// ExprStatement represents a completed expression AST +func newExprStatement(ast AST) AST { + return newAST(ASTKindExprStatement, ast) +} + +// CommentStatement represents a comment in the ini defintion. +// +// grammar: +// comment -> #comment' | ;comment' | /comment_slash +// comment_slash -> /comment' +// comment' -> value +func newCommentStatement(tok Token) AST { + return newAST(ASTKindCommentStatement, newExpression(tok)) +} + +// CompletedSectionStatement represents a completed section +func newCompletedSectionStatement(ast AST) AST { + return newAST(ASTKindCompletedSectionStatement, ast) +} + +// SkipStatement is used to skip whole statements +func newSkipStatement(ast AST) AST { + return newAST(ASTKindSkipStatement, ast) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go new file mode 100644 index 00000000000..305999d29be --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go @@ -0,0 +1,284 @@ +package ini + +import ( + "fmt" +) + +// getStringValue will return a quoted string and the amount +// of bytes read +// +// an error will be returned if the string is not properly formatted +func getStringValue(b []rune) (int, error) { + if b[0] != '"' { + return 0, NewParseError("strings must start with '\"'") + } + + endQuote := false + i := 1 + + for ; i < len(b) && !endQuote; i++ { + if escaped := isEscaped(b[:i], b[i]); b[i] == '"' && !escaped { + endQuote = true + break + } else if escaped { + /*c, err := getEscapedByte(b[i]) + if err != nil { + return 0, err + } + + b[i-1] = c + b = append(b[:i], b[i+1:]...) + i--*/ + + continue + } + } + + if !endQuote { + return 0, NewParseError("missing '\"' in string value") + } + + return i + 1, nil +} + +// getBoolValue will return a boolean and the amount +// of bytes read +// +// an error will be returned if the boolean is not of a correct +// value +func getBoolValue(b []rune) (int, error) { + if len(b) < 4 { + return 0, NewParseError("invalid boolean value") + } + + n := 0 + for _, lv := range literalValues { + if len(lv) > len(b) { + continue + } + + if isLitValue(lv, b) { + n = len(lv) + } + } + + if n == 0 { + return 0, NewParseError("invalid boolean value") + } + + return n, nil +} + +// getNumericalValue will return a numerical string, the amount +// of bytes read, and the base of the number +// +// an error will be returned if the number is not of a correct +// value +func getNumericalValue(b []rune) (int, int, error) { + if !isDigit(b[0]) { + return 0, 0, NewParseError("invalid digit value") + } + + i := 0 + helper := numberHelper{} + +loop: + for negativeIndex := 0; i < len(b); i++ { + negativeIndex++ + + if !isDigit(b[i]) { + switch b[i] { + case '-': + if helper.IsNegative() || negativeIndex != 1 { + return 0, 0, NewParseError("parse error '-'") + } + + n := getNegativeNumber(b[i:]) + i += (n - 1) + helper.Determine(b[i]) + continue + case '.': + if err := helper.Determine(b[i]); err != nil { + return 0, 0, err + } + case 'e', 'E': + if err := helper.Determine(b[i]); err != nil { + return 0, 0, err + } + + negativeIndex = 0 + case 'b': + if helper.numberFormat == hex { + break + } + fallthrough + case 'o', 'x': + if i == 0 && b[i] != '0' { + return 0, 0, NewParseError("incorrect base format, expected leading '0'") + } + + if i != 1 { + return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i)) + } + + if err := helper.Determine(b[i]); err != nil { + return 0, 0, err + } + default: + if isWhitespace(b[i]) { + break loop + } + + if isNewline(b[i:]) { + break loop + } + + if !(helper.numberFormat == hex && isHexByte(b[i])) { + if i+2 < len(b) && !isNewline(b[i:i+2]) { + return 0, 0, NewParseError("invalid numerical character") + } else if !isNewline([]rune{b[i]}) { + return 0, 0, NewParseError("invalid numerical character") + } + + break loop + } + } + } + } + + return helper.Base(), i, nil +} + +// isDigit will return whether or not something is an integer +func isDigit(b rune) bool { + return b >= '0' && b <= '9' +} + +func hasExponent(v []rune) bool { + return contains(v, 'e') || contains(v, 'E') +} + +func isBinaryByte(b rune) bool { + switch b { + case '0', '1': + return true + default: + return false + } +} + +func isOctalByte(b rune) bool { + switch b { + case '0', '1', '2', '3', '4', '5', '6', '7': + return true + default: + return false + } +} + +func isHexByte(b rune) bool { + if isDigit(b) { + return true + } + return (b >= 'A' && b <= 'F') || + (b >= 'a' && b <= 'f') +} + +func getValue(b []rune) (int, error) { + i := 0 + + for i < len(b) { + if isNewline(b[i:]) { + break + } + + if isOp(b[i:]) { + break + } + + valid, n, err := isValid(b[i:]) + if err != nil { + return 0, err + } + + if !valid { + break + } + + i += n + } + + return i, nil +} + +// getNegativeNumber will return a negative number from a +// byte slice. This will iterate through all characters until +// a non-digit has been found. +func getNegativeNumber(b []rune) int { + if b[0] != '-' { + return 0 + } + + i := 1 + for ; i < len(b); i++ { + if !isDigit(b[i]) { + return i + } + } + + return i +} + +// isEscaped will return whether or not the character is an escaped +// character. +func isEscaped(value []rune, b rune) bool { + if len(value) == 0 { + return false + } + + switch b { + case '\'': // single quote + case '"': // quote + case 'n': // newline + case 't': // tab + case '\\': // backslash + default: + return false + } + + return value[len(value)-1] == '\\' +} + +func getEscapedByte(b rune) (rune, error) { + switch b { + case '\'': // single quote + return '\'', nil + case '"': // quote + return '"', nil + case 'n': // newline + return '\n', nil + case 't': // table + return '\t', nil + case '\\': // backslash + return '\\', nil + default: + return b, NewParseError(fmt.Sprintf("invalid escaped character %c", b)) + } +} + +func removeEscapedCharacters(b []rune) []rune { + for i := 0; i < len(b); i++ { + if isEscaped(b[:i], b[i]) { + c, err := getEscapedByte(b[i]) + if err != nil { + return b + } + + b[i-1] = c + b = append(b[:i], b[i+1:]...) + i-- + } + } + + return b +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go new file mode 100644 index 00000000000..99d4f19b2c7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go @@ -0,0 +1,161 @@ +package ini + +import ( + "fmt" + "sort" +) + +// Visitor is an interface used by walkers that will +// traverse an array of ASTs. +type Visitor interface { + VisitExpr(AST) error + VisitStatement(AST) error +} + +// DefaultVisitor is used to visit statements and expressions +// and ensure that they are both of the correct format. +// In addition, upon visiting this will build sections and populate +// the Sections field which can be used to retrieve profile +// configuration. +type DefaultVisitor struct { + scope string + Sections Sections +} + +// NewDefaultVisitor return a DefaultVisitor +func NewDefaultVisitor() *DefaultVisitor { + return &DefaultVisitor{ + Sections: Sections{ + container: map[string]Section{}, + }, + } +} + +// VisitExpr visits expressions... +func (v *DefaultVisitor) VisitExpr(expr AST) error { + t := v.Sections.container[v.scope] + if t.values == nil { + t.values = values{} + } + + switch expr.Kind { + case ASTKindExprStatement: + opExpr := expr.GetRoot() + switch opExpr.Kind { + case ASTKindEqualExpr: + children := opExpr.GetChildren() + if len(children) <= 1 { + return NewParseError("unexpected token type") + } + + rhs := children[1] + + if rhs.Root.Type() != TokenLit { + return NewParseError("unexpected token type") + } + + key := EqualExprKey(opExpr) + v, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw()) + if err != nil { + return err + } + + t.values[key] = v + default: + return NewParseError(fmt.Sprintf("unsupported expression %v", expr)) + } + default: + return NewParseError(fmt.Sprintf("unsupported expression %v", expr)) + } + + v.Sections.container[v.scope] = t + return nil +} + +// VisitStatement visits statements... +func (v *DefaultVisitor) VisitStatement(stmt AST) error { + switch stmt.Kind { + case ASTKindCompletedSectionStatement: + child := stmt.GetRoot() + if child.Kind != ASTKindSectionStatement { + return NewParseError(fmt.Sprintf("unsupported child statement: %T", child)) + } + + name := string(child.Root.Raw()) + v.Sections.container[name] = Section{} + v.scope = name + default: + return NewParseError(fmt.Sprintf("unsupported statement: %s", stmt.Kind)) + } + + return nil +} + +// Sections is a map of Section structures that represent +// a configuration. +type Sections struct { + container map[string]Section +} + +// GetSection will return section p. If section p does not exist, +// false will be returned in the second parameter. +func (t Sections) GetSection(p string) (Section, bool) { + v, ok := t.container[p] + return v, ok +} + +// values represents a map of union values. +type values map[string]Value + +// List will return a list of all sections that were successfully +// parsed. +func (t Sections) List() []string { + keys := make([]string, len(t.container)) + i := 0 + for k := range t.container { + keys[i] = k + i++ + } + + sort.Strings(keys) + return keys +} + +// Section contains a name and values. This represent +// a sectioned entry in a configuration file. +type Section struct { + Name string + values values +} + +// Has will return whether or not an entry exists in a given section +func (t Section) Has(k string) bool { + _, ok := t.values[k] + return ok +} + +// ValueType will returned what type the union is set to. If +// k was not found, the NoneType will be returned. +func (t Section) ValueType(k string) (ValueType, bool) { + v, ok := t.values[k] + return v.Type, ok +} + +// Int returns an integer value at k +func (t Section) Int(k string) int64 { + return t.values[k].IntValue() +} + +// Float64 returns a float value at k +func (t Section) Float64(k string) float64 { + return t.values[k].FloatValue() +} + +// String returns the string value at k +func (t Section) String(k string) string { + _, ok := t.values[k] + if !ok { + return "" + } + return t.values[k].StringValue() +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go new file mode 100644 index 00000000000..99915f7f777 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go @@ -0,0 +1,25 @@ +package ini + +// Walk will traverse the AST using the v, the Visitor. +func Walk(tree []AST, v Visitor) error { + for _, node := range tree { + switch node.Kind { + case ASTKindExpr, + ASTKindExprStatement: + + if err := v.VisitExpr(node); err != nil { + return err + } + case ASTKindStatement, + ASTKindCompletedSectionStatement, + ASTKindNestedSectionStatement, + ASTKindCompletedNestedSectionStatement: + + if err := v.VisitStatement(node); err != nil { + return err + } + } + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go new file mode 100644 index 00000000000..7ffb4ae06ff --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go @@ -0,0 +1,24 @@ +package ini + +import ( + "unicode" +) + +// isWhitespace will return whether or not the character is +// a whitespace character. +// +// Whitespace is defined as a space or tab. +func isWhitespace(c rune) bool { + return unicode.IsSpace(c) && c != '\n' && c != '\r' +} + +func newWSToken(b []rune) (Token, int, error) { + i := 0 + for ; i < len(b); i++ { + if !isWhitespace(b[i]) { + break + } + } + + return newToken(TokenWS, b[:i], NoneType), i, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index 6241df6056c..835699c19a4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -56,7 +56,7 @@ func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request // // Create an ApiKey resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/create-api-key.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/create-api-key.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -152,7 +152,7 @@ func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req // // Adds a new Authorizer resource to an existing RestApi resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/create-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/create-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1526,7 +1526,7 @@ func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req // // Deletes an existing Authorizer resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/delete-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/delete-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3912,7 +3912,7 @@ func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *reque // // Describe an existing Authorizer resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3997,7 +3997,7 @@ func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *req // // Describe an existing Authorizers resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-authorizers.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizers.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9120,7 +9120,7 @@ func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInpu // Simulate the execution of an Authorizer in your RestApi with headers, parameters, // and an incoming request body. // -// Enable custom authorizers ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorizers (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -9568,7 +9568,7 @@ func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req // // Updates an existing Authorizer resource. // -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/update-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-authorizer.html) // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -11338,7 +11338,7 @@ type AccessLogSettings struct { DestinationArn *string `locationName:"destinationArn" type:"string"` // A single line format of the access logs of data, as specified by selected - // $context variables ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). + // $context variables (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). // The format must include at least $context.requestId. Format *string `locationName:"format" type:"string"` } @@ -11377,7 +11377,7 @@ func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { // NotFoundException // TooManyRequestsException // For detailed error code information, including the corresponding HTTP Status -// Codes, see API Gateway Error Codes ([[AwsDocsUrlPrefix]]/apigateway/api-reference/handling-errors/#api-error-codes) +// Codes, see API Gateway Error Codes (https://docs.aws.amazon.com/apigateway/api-reference/handling-errors/#api-error-codes) // // Example: Get the information about an account. // @@ -11391,16 +11391,16 @@ func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { // The successful response returns a 200 OK status code and a payload similar // to the following: // -// { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/account-apigateway-{rel}.html", +// { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", // "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": // { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", // "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } } // In addition to making the REST API call directly, you can use the AWS CLI // and an AWS SDK to access this resource. // -// API Gateway Limits ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-limits.html)Developer -// Guide ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/welcome.html), -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-account.html) +// API Gateway Limits (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-limits.html)Developer +// Guide (https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html), +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-account.html) type Account struct { _ struct{} `type:"structure"` @@ -11457,7 +11457,7 @@ func (s *Account) SetThrottleSettings(v *ThrottleSettings) *Account { // which indicates that the callers with the API key can make requests to that // stage. // -// Use API Keys ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-api-keys.html) +// Use API Keys (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) type ApiKey struct { _ struct{} `type:"structure"` @@ -11600,11 +11600,11 @@ func (s *ApiStage) SetThrottle(v map[string]*ThrottleSettings) *ApiStage { // Represents an authorization layer for methods. If enabled on a method, API // Gateway will activate the authorizer when a client calls the method. // -// Enable custom authorization ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorization (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) type Authorizer struct { _ struct{} `type:"structure"` - // Optional customer-defined field, used in Swagger imports and exports without + // Optional customer-defined field, used in OpenAPI imports and exports without // functional impact. AuthType *string `locationName:"authType" type:"string"` @@ -11750,7 +11750,7 @@ func (s *Authorizer) SetType(v string) *Authorizer { // // A custom domain name plus a BasePathMapping specification identifies a deployed // RestApi in a given stage of the owner Account. -// Use Custom Domain Names ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Custom Domain Names (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type BasePathMapping struct { _ struct{} `type:"structure"` @@ -11853,7 +11853,7 @@ func (s *CanarySettings) SetUseStageCache(v bool) *CanarySettings { // Client certificates are used to authenticate an API by the backend server. // To authenticate an API client (or user), use IAM roles and policies, a custom // Authorizer or an Amazon Cognito user pool. -// Use Client-Side Certificate ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) +// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) type ClientCertificate struct { _ struct{} `type:"structure"` @@ -11998,7 +11998,7 @@ func (s *CreateApiKeyInput) SetValue(v string) *CreateApiKeyInput { type CreateAuthorizerInput struct { _ struct{} `type:"structure"` - // Optional customer-defined field, used in Swagger imports and exports without + // Optional customer-defined field, used in OpenAPI imports and exports without // functional impact. AuthType *string `locationName:"authType" type:"string"` @@ -12366,7 +12366,7 @@ type CreateDocumentationPartInput struct { Location *DocumentationPartLocation `locationName:"location" type:"structure" required:"true"` // [Required] The new documentation content map of the targeted API entity. - // Enclosed key-value pairs are API-specific, but only Swagger-compliant key-value + // Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value // pairs can be exported and, hence, published. // // Properties is a required field @@ -12650,7 +12650,7 @@ type CreateModelInput struct { RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` // The schema for the model. For application/json models, this should be JSON - // schema draft 4 ([[JsonSchemaUrl]]) model. + // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Schema *string `locationName:"schema" type:"string"` } @@ -14765,8 +14765,8 @@ func (s DeleteVpcLinkOutput) GoString() string { // To view, update, or delete a deployment, call GET, PATCH, or DELETE on the // specified deployment resource (/restapis/{restapi_id}/deployments/{deployment_id}). // -// RestApi, Deployments, Stage, AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs ([[AwsAmazonUrlPrefix]]/tools/) +// RestApi, Deployments, Stage, AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), +// AWS SDKs (https://aws.amazon.com/tools/) type Deployment struct { _ struct{} `type:"structure"` @@ -14874,11 +14874,11 @@ func (s *DeploymentCanarySettings) SetUseStageCache(v bool) *DeploymentCanarySet // on the API entity type. All valid fields are not required. // // The content map is a JSON string of API-specific key-value pairs. Although -// an API can use any shape for the content map, only the Swagger-compliant +// an API can use any shape for the content map, only the OpenAPI-compliant // documentation fields will be injected into the associated API entity definition -// in the exported Swagger definition file. +// in the exported OpenAPI definition file. // -// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationParts type DocumentationPart struct { _ struct{} `type:"structure"` @@ -14896,10 +14896,10 @@ type DocumentationPart struct { // A content map of API-specific key-value pairs describing the targeted API // entity. The map must be encoded as a JSON string, e.g., "{ \"description\": - // \"The API does ...\" }". Only Swagger-compliant documentation-related fields + // \"The API does ...\" }". Only OpenAPI-compliant documentation-related fields // from the properties map are exported and, hence, published as part of the // API entity definitions, while the original documentation parts are exported - // in a Swagger extension of x-amazon-apigateway-documentation. + // in a OpenAPI extension of x-amazon-apigateway-documentation. Properties *string `locationName:"properties" type:"string"` } @@ -15034,9 +15034,9 @@ func (s *DocumentationPartLocation) SetType(v string) *DocumentationPartLocation // // Publishing API documentation involves creating a documentation version associated // with an API stage and exporting the versioned documentation to an external -// (e.g., Swagger) file. +// (e.g., OpenAPI) file. // -// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationPart, DocumentationVersions type DocumentationVersion struct { _ struct{} `type:"structure"` @@ -15090,7 +15090,7 @@ func (s *DocumentationVersion) SetVersion(v string) *DocumentationVersion { // where myApi is the base path mapping (BasePathMapping) of your API under // the custom domain name. // -// Set a Custom Host Name for an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) +// Set a Custom Host Name for an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type DomainName struct { _ struct{} `type:"structure"` @@ -15111,13 +15111,13 @@ type DomainName struct { // custom domain name for an edge-optimized endpoint. You set up this association // when adding a DNS record pointing the custom domain name to this distribution // name. For more information about CloudFront distributions, see the Amazon - // CloudFront documentation ([[AwsAmazonUrlPrefix]]/documentation/cloudfront/). + // CloudFront documentation (https://aws.amazon.com/documentation/cloudfront/). DistributionDomainName *string `locationName:"distributionDomainName" type:"string"` // The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized // endpoint. The valid value is Z2FDTNDATAQYW2 for all the regions. For more - // information, see Set up a Regional Custom Domain Name ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway ([[AwsDocsUrlPrefix]]/general/latest/gr/rande.html#apigateway_region). + // information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) + // and AWS Regions and Endpoints for API Gateway (https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). DistributionHostedZoneId *string `locationName:"distributionHostedZoneId" type:"string"` // The custom domain name as an API host name, for example, my-api.example.com. @@ -15142,8 +15142,8 @@ type DomainName struct { RegionalDomainName *string `locationName:"regionalDomainName" type:"string"` // The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. - // For more information, see Set up a Regional Custom Domain Name ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway ([[AwsDocsUrlPrefix]]/general/latest/gr/rande.html#apigateway_region). + // For more information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) + // and AWS Regions and Endpoints for API Gateway (https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). RegionalHostedZoneId *string `locationName:"regionalHostedZoneId" type:"string"` } @@ -15538,7 +15538,7 @@ func (s *GetApiKeysInput) SetPosition(v string) *GetApiKeysInput { // Represents a collection of API keys as represented by an ApiKeys resource. // -// Use API Keys ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-api-keys.html) +// Use API Keys (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) type GetApiKeysOutput struct { _ struct{} `type:"structure"` @@ -15693,7 +15693,7 @@ func (s *GetAuthorizersInput) SetRestApiId(v string) *GetAuthorizersInput { // Represents a collection of Authorizer resources. // -// Enable custom authorization ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorization (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) type GetAuthorizersOutput struct { _ struct{} `type:"structure"` @@ -15841,7 +15841,7 @@ func (s *GetBasePathMappingsInput) SetPosition(v string) *GetBasePathMappingsInp // Represents a collection of BasePathMapping resources. // -// Use Custom Domain Names ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Custom Domain Names (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type GetBasePathMappingsOutput struct { _ struct{} `type:"structure"` @@ -15948,7 +15948,7 @@ func (s *GetClientCertificatesInput) SetPosition(v string) *GetClientCertificate // Represents a collection of ClientCertificate resources. // -// Use Client-Side Certificate ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) +// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) type GetClientCertificatesOutput struct { _ struct{} `type:"structure"` @@ -16115,9 +16115,9 @@ func (s *GetDeploymentsInput) SetRestApiId(v string) *GetDeploymentsInput { // resource. To view, update, or delete an existing deployment, make a GET, // PATCH, or DELETE request, respectively, on a specified Deployment resource. // -// Deploying an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-deploy-api.html), -// AWS CLI ([[AwsDocsUrlPrefix]]/cli/latest/reference/apigateway/get-deployment.html), -// AWS SDKs ([[AwsAmazonUrlPrefix]]/tools/) +// Deploying an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html), +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), +// AWS SDKs (https://aws.amazon.com/tools/) type GetDeploymentsOutput struct { _ struct{} `type:"structure"` @@ -16301,7 +16301,7 @@ func (s *GetDocumentationPartsInput) SetType(v string) *GetDocumentationPartsInp // The collection of documentation parts of an API. // -// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart type GetDocumentationPartsOutput struct { _ struct{} `type:"structure"` @@ -16449,7 +16449,7 @@ func (s *GetDocumentationVersionsInput) SetRestApiId(v string) *GetDocumentation // Use the DocumentationVersions to manage documentation snapshots associated // with various API stages. // -// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationPart, DocumentationVersion type GetDocumentationVersionsOutput struct { _ struct{} `type:"structure"` @@ -16557,7 +16557,7 @@ func (s *GetDomainNamesInput) SetPosition(v string) *GetDomainNamesInput { // Represents a collection of DomainName resources. // -// Use Client-Side Certificate ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type GetDomainNamesOutput struct { _ struct{} `type:"structure"` @@ -16594,18 +16594,19 @@ type GetExportInput struct { _ struct{} `type:"structure"` // The content-type of the export, for example application/json. Currently application/json - // and application/yaml are supported for exportType of swagger. This should - // be specified in the Accept header for direct API requests. + // and application/yaml are supported for exportType ofoas30 and swagger. This + // should be specified in the Accept header for direct API requests. Accepts *string `location:"header" locationName:"Accept" type:"string"` - // [Required] The type of export. Currently only 'swagger' is supported. + // [Required] The type of export. Acceptable values are 'oas30' for OpenAPI + // 3.0.x and 'swagger' for Swagger/OpenAPI 2.0. // // ExportType is a required field ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"` // A key-value map of query string parameters that specify properties of the - // export, depending on the requested exportType. For exportTypeswagger, any - // combination of the following parameters are supported: extensions='integrations' + // export, depending on the requested exportType. For exportTypeoas30 and swagger, + // any combination of the following parameters are supported: extensions='integrations' // or extensions='apigateway' will export the API with x-amazon-apigateway-integration // extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer // extensions. postman will export the API with Postman extensions, allowing @@ -16866,7 +16867,7 @@ func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesIn // this collection. // // For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: +// Types Supported by API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: // Get the collection of gateway responses of an API // // Request @@ -17020,7 +17021,7 @@ func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesIn // { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": // "AUTHORIZER_FAILURE", "statusCode": "500" } ] } } // -// Customize Gateway Responses ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/customize-gateway-responses.html) +// Customize Gateway Responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) type GetGatewayResponsesOutput struct { _ struct{} `type:"structure"` @@ -17467,12 +17468,12 @@ func (s *GetModelTemplateInput) SetRestApiId(v string) *GetModelTemplateInput { // Represents a mapping template used to transform a payload. // -// Mapping Templates ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) +// Mapping Templates (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) type GetModelTemplateOutput struct { _ struct{} `type:"structure"` - // The Apache Velocity Template Language (VTL) ([[ApacheVtlUrl]]) template content - // used for the template resource. + // The Apache Velocity Template Language (VTL) (https://velocity.apache.org/engine/devel/vtl-reference-guide.html) + // template content used for the template resource. Value *string `locationName:"value" type:"string"` } @@ -17552,7 +17553,7 @@ func (s *GetModelsInput) SetRestApiId(v string) *GetModelsInput { // Represents a collection of Model resources. // -// Method, MethodResponse, Models and Mappings ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/models-mappings.html) +// Method, MethodResponse, Models and Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) type GetModelsOutput struct { _ struct{} `type:"structure"` @@ -17697,11 +17698,11 @@ func (s *GetRequestValidatorsInput) SetRestApiId(v string) *GetRequestValidators // A collection of RequestValidator resources of a given RestApi. // -// In Swagger, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators -// ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.html) +// In OpenAPI, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators +// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.html) // extension. // -// Enable Basic Request Validation in API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-method-request-validation.html) +// Enable Basic Request Validation in API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) type GetRequestValidatorsOutput struct { _ struct{} `type:"structure"` @@ -17874,7 +17875,7 @@ func (s *GetResourcesInput) SetRestApiId(v string) *GetResourcesInput { // Represents a collection of Resource resources. // -// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type GetResourcesOutput struct { _ struct{} `type:"structure"` @@ -17982,7 +17983,7 @@ func (s *GetRestApisInput) SetPosition(v string) *GetRestApisInput { // Contains references to your APIs and links that guide you in how to interact // with your collection. A collection offers a paginated view of your APIs. // -// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type GetRestApisOutput struct { _ struct{} `type:"structure"` @@ -18345,7 +18346,7 @@ func (s *GetStagesInput) SetRestApiId(v string) *GetStagesInput { // A list of Stage resources that are associated with the ApiKey resource. // -// Deploying API in Stages ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/stages.html) +// Deploying API in Stages (https://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html) type GetStagesOutput struct { _ struct{} `type:"structure"` @@ -18715,7 +18716,7 @@ func (s *GetUsagePlanKeysInput) SetUsagePlanId(v string) *GetUsagePlanKeysInput // Represents the collection of usage plan keys added to usage plans for the // associated API keys and, possibly, other types of keys. // -// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type GetUsagePlanKeysOutput struct { _ struct{} `type:"structure"` @@ -18792,7 +18793,7 @@ func (s *GetUsagePlansInput) SetPosition(v string) *GetUsagePlansInput { // Represents a collection of usage plans for an AWS account. // -// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type GetUsagePlansOutput struct { _ struct{} `type:"structure"` @@ -18900,8 +18901,8 @@ func (s *GetVpcLinksInput) SetPosition(v string) *GetVpcLinksInput { // The collection of VPC links under the caller's account in a region. // -// Getting Started with Private Integrations ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/getting-started-with-private-integration.html), -// Set up Private Integrations ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/set-up-private-integration.html) +// Getting Started with Private Integrations (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html), +// Set up Private Integrations (https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-private-integration.html) type GetVpcLinksOutput struct { _ struct{} `type:"structure"` @@ -18939,7 +18940,7 @@ type ImportApiKeysInput struct { _ struct{} `type:"structure" payload:"Body"` // The payload of the POST request to import API keys. For the payload format, - // see API Key File Format ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-key-file-format.html). + // see API Key File Format (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html). // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19032,12 +19033,12 @@ func (s *ImportApiKeysOutput) SetWarnings(v []*string) *ImportApiKeysOutput { return s } -// Import documentation parts from an external (e.g., Swagger) definition file. +// Import documentation parts from an external (e.g., OpenAPI) definition file. type ImportDocumentationPartsInput struct { _ struct{} `type:"structure" payload:"Body"` // [Required] Raw byte array representing the to-be-imported documentation parts. - // To import from a Swagger file, this is a JSON object. + // To import from an OpenAPI file, this is a JSON object. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19111,9 +19112,9 @@ func (s *ImportDocumentationPartsInput) SetRestApiId(v string) *ImportDocumentat // A collection of the imported DocumentationPart identifiers. // // This is used to return the result when documentation parts in an external -// (e.g., Swagger) file are imported into API Gateway -// Documenting an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// documentationpart:import ([[AwsDocsUrlPrefix]]/apigateway/api-reference/link-relation/documentationpart-import/), +// (e.g., OpenAPI) file are imported into API Gateway +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// documentationpart:import (https://docs.aws.amazon.com/apigateway/api-reference/link-relation/documentationpart-import/), // DocumentationPart type ImportDocumentationPartsOutput struct { _ struct{} `type:"structure"` @@ -19153,8 +19154,8 @@ type ImportRestApiInput struct { _ struct{} `type:"structure" payload:"Body"` // [Required] The POST request body containing external API definitions. Currently, - // only Swagger definition JSON files are supported. The maximum size of the - // API definition file is 2MB. + // only OpenAPI definition JSON/YAML files are supported. The maximum size of + // the API definition file is 2MB. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19233,7 +19234,7 @@ func (s *ImportRestApiInput) SetParameters(v map[string]*string) *ImportRestApiI // // In the API Gateway console, the built-in Lambda integration is an AWS integration. // -// Creating an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) +// Creating an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type Integration struct { _ struct{} `type:"structure"` @@ -19243,7 +19244,7 @@ type Integration struct { // Specifies the integration's cache namespace. CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - // The (id ([[AwsDocsUrlPrefix]]/apigateway/api-reference/resource/vpc-link/#id)) + // The (id (https://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) // of the VpcLink used for the integration when connectionType=VPC_LINK and // undefined, otherwise. ConnectionId *string `locationName:"connectionId" type:"string"` @@ -19292,7 +19293,7 @@ type Integration struct { // // The successful response returns 200 OKstatus and a payload as follows: // - // { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", // "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", // "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" @@ -19385,7 +19386,7 @@ type Integration struct { // Alternatively, path can be used for an AWS service path-based API. The // ensuing service_api refers to the path to an AWS service resource, including // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject ([[AwsDocsUrlPrefix]]/AmazonS3/latest/API/RESTObjectGET.html), + // for integration with the S3 API of GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} Uri *string `locationName:"uri" type:"string"` @@ -19489,7 +19490,7 @@ func (s *Integration) SetUri(v string) *Integration { // MethodResponse, and parameters and templates can be used to transform the // back-end response. // -// Creating an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) +// Creating an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type IntegrationResponse struct { _ struct{} `type:"structure"` @@ -19605,10 +19606,10 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { // The successful response returns a 200 OK status code and a payload similar // to the following: // -// { "_links": { "curies": [ { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", -// "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", -// "name": "integrationresponse", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-{rel}.html", -// "name": "method", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", +// { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", +// "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", +// "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", +// "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" @@ -19645,10 +19646,10 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { // In the example above, the response template for the 200 OK response maps // the JSON output from the ListStreams action in the back end to an XML output. // The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E -// and the output is decoded using the $util.urlDecode() ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference) +// and the output is decoded using the $util.urlDecode() (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference) // helper function. // -// MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-method-settings.html) +// MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings.html) type Method struct { _ struct{} `type:"structure"` @@ -19694,8 +19695,8 @@ type Method struct { // // The successful response returns a 200 OKstatus code and a payload similar to the following: // - // { "_links": { "curies": [ { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", + // "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", // "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" // }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" // }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", @@ -19740,7 +19741,7 @@ type Method struct { // The successful response returns a 200 OK status code and a payload similar // to the following: // - // { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", + // { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", // "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" // }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" @@ -19752,7 +19753,7 @@ type Method struct { // A human-friendly operation identifier for the method. For example, you can // assign the operationName of ListPets for the GET /pets method in PetStore - // ([[PetstoreDemoUrl]]) example. + // (https://petstore-demo-endpoint.execute-api.com/petstore/pets) example. OperationName *string `locationName:"operationName" type:"string"` // A key-value map specifying data schemas, represented by Model resources, @@ -19868,7 +19869,7 @@ func (s *Method) SetRequestValidatorId(v string) *Method { // // The successful response returns 200 OK status and a payload as follows: // -// { "_links": { "curies": { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", +// { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", // "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" // }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" @@ -20100,7 +20101,7 @@ func (s *MethodSnapshot) SetAuthorizationType(v string) *MethodSnapshot { // A model is used for generating an API's SDK, validating the input request // body, and creating a skeletal mapping template. // -// Method, MethodResponse, Models and Mappings ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/models-mappings.html) +// Method, MethodResponse, Models and Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) type Model struct { _ struct{} `type:"structure"` @@ -20117,11 +20118,11 @@ type Model struct { Name *string `locationName:"name" type:"string"` // The schema for the model. For application/json models, this should be JSON - // schema draft 4 ([[JsonSchemaUrl]]) model. Do not include "\*/" characters - // in the description of any properties because such "\*/" characters may be - // interpreted as the closing marker for comments in some languages, such as - // Java or JavaScript, causing the installation of your API's SDK generated - // by API Gateway to fail. + // schema draft 4 (https://tools.ietf.org/html/draft-zyp-json-schema-04) model. + // Do not include "\*/" characters in the description of any properties because + // such "\*/" characters may be interpreted as the closing marker for comments + // in some languages, such as Java or JavaScript, causing the installation of + // your API's SDK generated by API Gateway to fail. Schema *string `locationName:"schema" type:"string"` } @@ -20185,7 +20186,7 @@ type PatchOperation struct { // an error message. Op *string `locationName:"op" type:"string" enum:"Op"` - // The op operation's target, as identified by a JSON Pointer ([[JsonPointerRefUrl]]) + // The op operation's target, as identified by a JSON Pointer (https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08) // value that references a location within the targeted resource. For example, // if the target resource has an updateable property of {"name":"value"}, the // path for this property is /name. If the name property value is a JSON object @@ -20198,7 +20199,7 @@ type PatchOperation struct { // The new target value of the update operation. It is applicable for the add // or replace operation. When using AWS CLI to update a property of a JSON value, // enclose the JSON object with a pair of single quotes in a Linux shell, e.g., - // '{"a": ...}'. In a Windows shell, see Using JSON for Parameters ([[AwsDocsUrlPrefix]]/cli/latest/userguide/cli-using-param.html#cli-using-param-json). + // '{"a": ...}'. In a Windows shell, see Using JSON for Parameters (https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). Value *string `locationName:"value" type:"string"` } @@ -20349,7 +20350,7 @@ type PutIntegrationInput struct { // Specifies a put integration input's cache namespace. CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - // The (id ([[AwsDocsUrlPrefix]]/apigateway/api-reference/resource/vpc-link/#id)) + // The (id (https://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) // of the VpcLink used for the integration when connectionType=VPC_LINK and // undefined, otherwise. ConnectionId *string `locationName:"connectionId" type:"string"` @@ -20454,7 +20455,7 @@ type PutIntegrationInput struct { // Alternatively, path can be used for an AWS service path-based API. The // ensuing service_api refers to the path to an AWS service resource, including // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject ([[AwsDocsUrlPrefix]]/AmazonS3/latest/API/RESTObjectGET.html), + // for integration with the S3 API of GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} Uri *string `locationName:"uri" type:"string"` @@ -20761,7 +20762,7 @@ type PutMethodInput struct { // A human-friendly operation identifier for the method. For example, you can // assign the operationName of ListPets for the GET /pets method in PetStore - // ([[PetstoreDemoUrl]]) example. + // (https://petstore-demo-endpoint.execute-api.com/petstore/pets) example. OperationName *string `locationName:"operationName" type:"string"` // Specifies the Model resources used for the request's content type. Request @@ -21008,8 +21009,8 @@ type PutRestApiInput struct { _ struct{} `type:"structure" payload:"Body"` // [Required] The PUT request body containing external API definitions. Currently, - // only Swagger definition JSON files are supported. The maximum size of the - // API definition file is 2MB. + // only OpenAPI definition JSON/YAML files are supported. The maximum size of + // the API definition file is 2MB. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -21136,7 +21137,7 @@ func (s *QuotaSettings) SetPeriod(v string) *QuotaSettings { // Represents an API resource. // -// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type Resource struct { _ struct{} `type:"structure"` @@ -21169,10 +21170,10 @@ type Resource struct { // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} // Response // - // { "_links": { "curies": [ { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", - // "name": "integrationresponse", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-{rel}.html", - // "name": "method", "templated": true }, { "href": "[[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/restapi-method-response-{rel}.html", + // { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", + // "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", + // "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" @@ -21254,7 +21255,7 @@ func (s *Resource) SetResourceMethods(v map[string]*Method) *Resource { // Represents a REST API. // -// Create an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type RestApi struct { _ struct{} `type:"structure"` @@ -21496,7 +21497,7 @@ func (s *SdkType) SetId(v string) *SdkType { // Represents a unique identifier for a version of a deployed RestApi that is // callable by users. // -// Deploy an API ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-deploy-api.html) +// Deploy an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html) type Stage struct { _ struct{} `type:"structure"` @@ -21883,8 +21884,9 @@ type TestInvokeAuthorizerOutput struct { Authorization map[string][]*string `locationName:"authorization" type:"map"` - // The open identity claims ([[OpenIdClaimsUrl]]), with any supported custom - // attributes, returned from the Cognito Your User Pool configured for the API. + // The open identity claims (https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims), + // with any supported custom attributes, returned from the Cognito Your User + // Pool configured for the API. Claims map[string]*string `locationName:"claims" type:"map"` // The HTTP status code that the client would have received. Value is 0 if the @@ -22084,7 +22086,7 @@ func (s *TestInvokeMethodInput) SetStageVariables(v map[string]*string) *TestInv // Represents the response of the test invoke request in the HTTP method. // -// Test API using the API Gateway console ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) +// Test API using the API Gateway console (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) type TestInvokeMethodOutput struct { _ struct{} `type:"structure"` @@ -22831,7 +22833,7 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon // response parameters and mapping templates. // // For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: +// Types Supported by API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: // Get a Gateway Response of a given response type // // Request @@ -22867,7 +22869,7 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon // \"statusCode\": \"'404'\"\n}" }, "responseType": "MISSING_AUTHENTICATION_TOKEN", // "statusCode": "404" } // -// Customize Gateway Responses ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/customize-gateway-responses.html) +// Customize Gateway Responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) type UpdateGatewayResponseOutput struct { _ struct{} `type:"structure"` @@ -23415,13 +23417,13 @@ func (s *UpdateRequestValidatorInput) SetRestApiId(v string) *UpdateRequestValid // A set of validation rules for incoming Method requests. // -// In Swagger, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator -// ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.requestValidator.html) +// In OpenAPI, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator +// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.requestValidator.html) // object. It the referenced using the x-amazon-apigateway-request-validator -// ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validator) +// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validator) // property. // -// Enable Basic Request Validation in API Gateway ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-method-request-validation.html) +// Enable Basic Request Validation in API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) type UpdateRequestValidatorOutput struct { _ struct{} `type:"structure"` @@ -23897,7 +23899,7 @@ func (s *UpdateVpcLinkOutput) SetTargetArns(v []*string) *UpdateVpcLinkOutput { // Represents the usage data of a usage plan. // -// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) type Usage struct { _ struct{} `type:"structure"` @@ -23967,7 +23969,7 @@ func (s *Usage) SetUsagePlanId(v string) *Usage { // name of the specified API. You add plan customers by adding API keys to the // plan. // -// Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type UsagePlan struct { _ struct{} `type:"structure"` @@ -24051,7 +24053,7 @@ func (s *UsagePlan) SetThrottle(v *ThrottleSettings) *UsagePlan { // To associate an API stage with a selected API key in a usage plan, you must // create a UsagePlanKey resource to represent the selected ApiKey. // -// " Create and Use Usage Plans ([[AwsDocsUrlPrefix]]/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// " Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type UsagePlanKey struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 74817d4b599..8aa112f101b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -824,16 +824,20 @@ func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req // PutPermission API operation for Amazon CloudWatch Events. // -// Running PutPermission permits the specified AWS account to put events to -// your account's default event bus. CloudWatch Events rules in your account -// are triggered by these events arriving to your default event bus. +// Running PutPermission permits the specified AWS account or AWS organization +// to put events to your account's default event bus. CloudWatch Events rules +// in your account are triggered by these events arriving to your default event +// bus. // // For another account to send events to your account, that external account // must have a CloudWatch Events rule with your account's default event bus // as a target. // // To enable multiple AWS accounts to put events to your default event bus, -// run PutPermission once for each of these accounts. +// run PutPermission once for each of these accounts. Or, if all the accounts +// are members of the same AWS organization, you can run PutPermission once +// specifying Principal as "*" and specifying the AWS organization ID in Condition, +// to grant permissions to all accounts in that organization. // // The permission policy on the default event bus cannot exceed 10 KB in size. // @@ -1642,6 +1646,80 @@ func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { return s } +// A JSON string which you can use to limit the event bus permissions you are +// granting to only accounts that fulfill the condition. Currently, the only +// supported condition is membership in a certain AWS organization. The string +// must contain Type, Key, and Value fields. The Value field specifies the ID +// of the AWS organization. Following is an example value for Condition: +// +// '{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' +type Condition struct { + _ struct{} `type:"structure"` + + // Specifies the key for the condition. Currently the only supported key is + // aws:PrincipalOrgID. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // Specifies the type of condition. Currently the only supported value is StringEquals. + // + // Type is a required field + Type *string `type:"string" required:"true"` + + // Specifies the value for the key. Currently, this must be the ID of the organization. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Condition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Condition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Condition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Condition"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Condition) SetKey(v string) *Condition { + s.Key = &v + return s +} + +// SetType sets the Type field's value. +func (s *Condition) SetType(v string) *Condition { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Condition) SetValue(v string) *Condition { + s.Value = &v + return s +} + type DeleteRuleInput struct { _ struct{} `type:"structure"` @@ -2754,15 +2832,28 @@ type PutPermissionInput struct { // Action is a required field Action *string `min:"1" type:"string" required:"true"` + // This parameter enables you to limit the permission to accounts that fulfill + // a certain condition, such as being a member of a certain AWS organization. + // For more information about AWS Organizations, see What Is AWS Organizations + // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) + // in the AWS Organizations User Guide. + // + // If you specify Condition with an AWS organization ID, and specify "*" as + // the value for Principal, you grant permission to all the accounts in the + // named organization. + // + // The Condition is a JSON string which must contain Type, Key, and Value fields. + Condition *Condition `type:"structure"` + // The 12-digit AWS account ID that you are permitting to put events to your // default event bus. Specify "*" to permit any account to put events to your // default event bus. // - // If you specify "*", avoid creating rules that may match undesirable events. - // To create more secure rules, make sure that the event pattern for each rule - // contains an account field with a specific account ID from which to receive - // events. Rules with an account field do not match any events sent from other - // accounts. + // If you specify "*" without specifying Condition, avoid creating rules that + // may match undesirable events. To create more secure rules, make sure that + // the event pattern for each rule contains an account field with a specific + // account ID from which to receive events. Rules with an account field do not + // match any events sent from other accounts. // // Principal is a required field Principal *string `min:"1" type:"string" required:"true"` @@ -2806,6 +2897,11 @@ func (s *PutPermissionInput) Validate() error { if s.StatementId != nil && len(*s.StatementId) < 1 { invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) } + if s.Condition != nil { + if err := s.Condition.Validate(); err != nil { + invalidParams.AddNested("Condition", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2819,6 +2915,12 @@ func (s *PutPermissionInput) SetAction(v string) *PutPermissionInput { return s } +// SetCondition sets the Condition field's value. +func (s *PutPermissionInput) SetCondition(v *Condition) *PutPermissionInput { + s.Condition = v + return s +} + // SetPrincipal sets the Principal field's value. func (s *PutPermissionInput) SetPrincipal(v string) *PutPermissionInput { s.Principal = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index bc96eea579a..1ab41e65aac 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -243,6 +243,95 @@ func (c *EC2) AcceptVpcPeeringConnectionWithContext(ctx aws.Context, input *Acce return out, req.Send() } +const opAdvertiseByoipCidr = "AdvertiseByoipCidr" + +// AdvertiseByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the AdvertiseByoipCidr operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AdvertiseByoipCidr for more information on using the AdvertiseByoipCidr +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AdvertiseByoipCidrRequest method. +// req, resp := client.AdvertiseByoipCidrRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AdvertiseByoipCidr +func (c *EC2) AdvertiseByoipCidrRequest(input *AdvertiseByoipCidrInput) (req *request.Request, output *AdvertiseByoipCidrOutput) { + op := &request.Operation{ + Name: opAdvertiseByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AdvertiseByoipCidrInput{} + } + + output = &AdvertiseByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// AdvertiseByoipCidr API operation for Amazon Elastic Compute Cloud. +// +// Advertises an IPv4 address range that is provisioned for use with your AWS +// resources through bring your own IP addresses (BYOIP). +// +// You can perform this operation at most once every 10 seconds, even if you +// specify different address ranges each time. +// +// We recommend that you stop advertising the BYOIP CIDR from other locations +// when you advertise it from AWS. To minimize down time, you can configure +// your AWS resources to use an address from a BYOIP CIDR before it is advertised, +// and then simultaneously stop advertising it from the current location and +// start advertising it through AWS. +// +// It can take a few minutes before traffic to the specified addresses starts +// routing to AWS because of BGP propagation delays. +// +// To stop advertising the BYOIP CIDR, use WithdrawByoipCidr. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation AdvertiseByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AdvertiseByoipCidr +func (c *EC2) AdvertiseByoipCidr(input *AdvertiseByoipCidrInput) (*AdvertiseByoipCidrOutput, error) { + req, out := c.AdvertiseByoipCidrRequest(input) + return out, req.Send() +} + +// AdvertiseByoipCidrWithContext is the same as AdvertiseByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See AdvertiseByoipCidr for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) AdvertiseByoipCidrWithContext(ctx aws.Context, input *AdvertiseByoipCidrInput, opts ...request.Option) (*AdvertiseByoipCidrOutput, error) { + req, out := c.AdvertiseByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAllocateAddress = "AllocateAddress" // AllocateAddressRequest generates a "aws/request.Request" representing the @@ -292,6 +381,13 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request. // After you release an Elastic IP address, it is released to the IP address // pool and can be allocated to a different AWS account. // +// You can allocate an Elastic IP address from an address pool owned by AWS +// or from an address pool created from a public IPv4 address range that you +// have brought to AWS for use with your AWS resources using bring your own +// IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses +// (BYOIP) (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) +// in the Amazon Elastic Compute Cloud User Guide. +// // [EC2-VPC] If you release an Elastic IP address, you might be able to recover // it. You cannot recover an Elastic IP address that you released after it is // allocated to another AWS account. You cannot recover an Elastic IP address @@ -536,16 +632,23 @@ func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInp // AssignPrivateIpAddresses API operation for Amazon Elastic Compute Cloud. // // Assigns one or more secondary private IP addresses to the specified network -// interface. You can specify one or more specific secondary IP addresses, or -// you can specify the number of secondary IP addresses to be automatically -// assigned within the subnet's CIDR block range. The number of secondary IP -// addresses that you can assign to an instance varies by instance type. For -// information about instance types, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) +// interface. +// +// You can specify one or more specific secondary IP addresses, or you can specify +// the number of secondary IP addresses to be automatically assigned within +// the subnet's CIDR block range. The number of secondary IP addresses that +// you can assign to an instance varies by instance type. For information about +// instance types, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) // in the Amazon Elastic Compute Cloud User Guide. For more information about // Elastic IP addresses, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) // in the Amazon Elastic Compute Cloud User Guide. // -// AssignPrivateIpAddresses is available only in EC2-VPC. +// When you move a secondary private IP address to another network interface, +// any Elastic IP address that is associated with the IP address is also moved. +// +// Remapping an IP address is an asynchronous operation. When you move an IP +// address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s +// in the instance metadata to confirm that the remapping is complete. // // 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 @@ -8309,6 +8412,86 @@ func (c *EC2) DeleteVpnGatewayWithContext(ctx aws.Context, input *DeleteVpnGatew return out, req.Send() } +const opDeprovisionByoipCidr = "DeprovisionByoipCidr" + +// DeprovisionByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the DeprovisionByoipCidr operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeprovisionByoipCidr for more information on using the DeprovisionByoipCidr +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeprovisionByoipCidrRequest method. +// req, resp := client.DeprovisionByoipCidrRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeprovisionByoipCidr +func (c *EC2) DeprovisionByoipCidrRequest(input *DeprovisionByoipCidrInput) (req *request.Request, output *DeprovisionByoipCidrOutput) { + op := &request.Operation{ + Name: opDeprovisionByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeprovisionByoipCidrInput{} + } + + output = &DeprovisionByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeprovisionByoipCidr API operation for Amazon Elastic Compute Cloud. +// +// Releases the specified address range that you provisioned for use with your +// AWS resources through bring your own IP addresses (BYOIP) and deletes the +// corresponding address pool. +// +// Before you can release an address range, you must stop advertising it using +// WithdrawByoipCidr and you must not have any IP addresses allocated from its +// address range. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeprovisionByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeprovisionByoipCidr +func (c *EC2) DeprovisionByoipCidr(input *DeprovisionByoipCidrInput) (*DeprovisionByoipCidrOutput, error) { + req, out := c.DeprovisionByoipCidrRequest(input) + return out, req.Send() +} + +// DeprovisionByoipCidrWithContext is the same as DeprovisionByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See DeprovisionByoipCidr for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeprovisionByoipCidrWithContext(ctx aws.Context, input *DeprovisionByoipCidrInput, opts ...request.Option) (*DeprovisionByoipCidrOutput, error) { + req, out := c.DeprovisionByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeregisterImage = "DeregisterImage" // DeregisterImageRequest generates a "aws/request.Request" representing the @@ -8810,6 +8993,83 @@ func (c *EC2) DescribeBundleTasksWithContext(ctx aws.Context, input *DescribeBun return out, req.Send() } +const opDescribeByoipCidrs = "DescribeByoipCidrs" + +// DescribeByoipCidrsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeByoipCidrs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeByoipCidrs for more information on using the DescribeByoipCidrs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeByoipCidrsRequest method. +// req, resp := client.DescribeByoipCidrsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeByoipCidrs +func (c *EC2) DescribeByoipCidrsRequest(input *DescribeByoipCidrsInput) (req *request.Request, output *DescribeByoipCidrsOutput) { + op := &request.Operation{ + Name: opDescribeByoipCidrs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeByoipCidrsInput{} + } + + output = &DescribeByoipCidrsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeByoipCidrs API operation for Amazon Elastic Compute Cloud. +// +// Describes the IP address ranges that were specified in calls to ProvisionByoipCidr. +// +// To describe the address pools that were created when you provisioned the +// address ranges, use DescribePublicIpv4Pools. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeByoipCidrs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeByoipCidrs +func (c *EC2) DescribeByoipCidrs(input *DescribeByoipCidrsInput) (*DescribeByoipCidrsOutput, error) { + req, out := c.DescribeByoipCidrsRequest(input) + return out, req.Send() +} + +// DescribeByoipCidrsWithContext is the same as DescribeByoipCidrs with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeByoipCidrs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeByoipCidrsWithContext(ctx aws.Context, input *DescribeByoipCidrsInput, opts ...request.Option) (*DescribeByoipCidrsOutput, error) { + req, out := c.DescribeByoipCidrsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances" // DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the @@ -12161,6 +12421,80 @@ func (c *EC2) DescribePrincipalIdFormatWithContext(ctx aws.Context, input *Descr return out, req.Send() } +const opDescribePublicIpv4Pools = "DescribePublicIpv4Pools" + +// DescribePublicIpv4PoolsRequest generates a "aws/request.Request" representing the +// client's request for the DescribePublicIpv4Pools operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribePublicIpv4Pools for more information on using the DescribePublicIpv4Pools +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribePublicIpv4PoolsRequest method. +// req, resp := client.DescribePublicIpv4PoolsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePublicIpv4Pools +func (c *EC2) DescribePublicIpv4PoolsRequest(input *DescribePublicIpv4PoolsInput) (req *request.Request, output *DescribePublicIpv4PoolsOutput) { + op := &request.Operation{ + Name: opDescribePublicIpv4Pools, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePublicIpv4PoolsInput{} + } + + output = &DescribePublicIpv4PoolsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePublicIpv4Pools API operation for Amazon Elastic Compute Cloud. +// +// Describes the specified IPv4 address pools. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribePublicIpv4Pools for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePublicIpv4Pools +func (c *EC2) DescribePublicIpv4Pools(input *DescribePublicIpv4PoolsInput) (*DescribePublicIpv4PoolsOutput, error) { + req, out := c.DescribePublicIpv4PoolsRequest(input) + return out, req.Send() +} + +// DescribePublicIpv4PoolsWithContext is the same as DescribePublicIpv4Pools with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePublicIpv4Pools for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribePublicIpv4PoolsWithContext(ctx aws.Context, input *DescribePublicIpv4PoolsInput, opts ...request.Option) (*DescribePublicIpv4PoolsOutput, error) { + req, out := c.DescribePublicIpv4PoolsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeRegions = "DescribeRegions" // DescribeRegionsRequest generates a "aws/request.Request" representing the @@ -13533,7 +13867,7 @@ func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetReq // // Spot Fleet events are delayed by up to 30 seconds before they can be described. // This ensures that you can query by the last evaluated time and not miss a -// recorded event. +// recorded event. Spot Fleet events are available for 48 hours. // // 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 @@ -20048,6 +20382,96 @@ func (c *EC2) MoveAddressToVpcWithContext(ctx aws.Context, input *MoveAddressToV return out, req.Send() } +const opProvisionByoipCidr = "ProvisionByoipCidr" + +// ProvisionByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the ProvisionByoipCidr operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ProvisionByoipCidr for more information on using the ProvisionByoipCidr +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ProvisionByoipCidrRequest method. +// req, resp := client.ProvisionByoipCidrRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionByoipCidr +func (c *EC2) ProvisionByoipCidrRequest(input *ProvisionByoipCidrInput) (req *request.Request, output *ProvisionByoipCidrOutput) { + op := &request.Operation{ + Name: opProvisionByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ProvisionByoipCidrInput{} + } + + output = &ProvisionByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// ProvisionByoipCidr API operation for Amazon Elastic Compute Cloud. +// +// Provisions an address range for use with your AWS resources through bring +// your own IP addresses (BYOIP) and creates a corresponding address pool. After +// the address range is provisioned, it is ready to be advertised using AdvertiseByoipCidr. +// +// AWS verifies that you own the address range and are authorized to advertise +// it. You must ensure that the address range is registered to you and that +// you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise +// the address range. For more information, see Bring Your Own IP Addresses +// (BYOIP) (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) +// in the Amazon Elastic Compute Cloud User Guide. +// +// Provisioning an address range is an asynchronous operation, so the call returns +// immediately, but the address range is not ready to use until its status changes +// from pending-provision to provisioned. To monitor the status of an address +// range, use DescribeByoipCidrs. To allocate an Elastic IP address from your +// address pool, use AllocateAddress with either the specific address from the +// address pool or the ID of the address pool. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ProvisionByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionByoipCidr +func (c *EC2) ProvisionByoipCidr(input *ProvisionByoipCidrInput) (*ProvisionByoipCidrOutput, error) { + req, out := c.ProvisionByoipCidrRequest(input) + return out, req.Send() +} + +// ProvisionByoipCidrWithContext is the same as ProvisionByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See ProvisionByoipCidr for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ProvisionByoipCidrWithContext(ctx aws.Context, input *ProvisionByoipCidrInput, opts ...request.Option) (*ProvisionByoipCidrOutput, error) { + req, out := c.ProvisionByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPurchaseHostReservation = "PurchaseHostReservation" // PurchaseHostReservationRequest generates a "aws/request.Request" representing the @@ -23016,6 +23440,87 @@ func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngressWithContext(ctx aws.Cont return out, req.Send() } +const opWithdrawByoipCidr = "WithdrawByoipCidr" + +// WithdrawByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the WithdrawByoipCidr operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See WithdrawByoipCidr for more information on using the WithdrawByoipCidr +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the WithdrawByoipCidrRequest method. +// req, resp := client.WithdrawByoipCidrRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/WithdrawByoipCidr +func (c *EC2) WithdrawByoipCidrRequest(input *WithdrawByoipCidrInput) (req *request.Request, output *WithdrawByoipCidrOutput) { + op := &request.Operation{ + Name: opWithdrawByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &WithdrawByoipCidrInput{} + } + + output = &WithdrawByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// WithdrawByoipCidr API operation for Amazon Elastic Compute Cloud. +// +// Stops advertising an IPv4 address range that is provisioned as an address +// pool. +// +// You can perform this operation at most once every 10 seconds, even if you +// specify different address ranges each time. +// +// It can take a few minutes before traffic to the specified addresses stops +// routing to AWS because of BGP propagation delays. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation WithdrawByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/WithdrawByoipCidr +func (c *EC2) WithdrawByoipCidr(input *WithdrawByoipCidrInput) (*WithdrawByoipCidrOutput, error) { + req, out := c.WithdrawByoipCidrRequest(input) + return out, req.Send() +} + +// WithdrawByoipCidrWithContext is the same as WithdrawByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See WithdrawByoipCidr for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) WithdrawByoipCidrWithContext(ctx aws.Context, input *WithdrawByoipCidrInput, opts ...request.Option) (*WithdrawByoipCidrOutput, error) { + req, out := c.WithdrawByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // Contains the parameters for accepting the quote. type AcceptReservedInstancesExchangeQuoteInput struct { _ struct{} `type:"structure"` @@ -23398,6 +23903,9 @@ type Address struct { // The Elastic IP address. PublicIp *string `locationName:"publicIp" type:"string"` + // The ID of an address pool. + PublicIpv4Pool *string `locationName:"publicIpv4Pool" type:"string"` + // Any tags assigned to the Elastic IP address. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -23460,17 +23968,96 @@ func (s *Address) SetPublicIp(v string) *Address { return s } +// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. +func (s *Address) SetPublicIpv4Pool(v string) *Address { + s.PublicIpv4Pool = &v + return s +} + // SetTags sets the Tags field's value. func (s *Address) SetTags(v []*Tag) *Address { s.Tags = v return s } -// Contains the parameters for AllocateAddress. +type AdvertiseByoipCidrInput struct { + _ struct{} `type:"structure"` + + // The IPv4 address range, in CIDR notation. + // + // Cidr is a required field + Cidr *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s AdvertiseByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AdvertiseByoipCidrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AdvertiseByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AdvertiseByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCidr sets the Cidr field's value. +func (s *AdvertiseByoipCidrInput) SetCidr(v string) *AdvertiseByoipCidrInput { + s.Cidr = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AdvertiseByoipCidrInput) SetDryRun(v bool) *AdvertiseByoipCidrInput { + s.DryRun = &v + return s +} + +type AdvertiseByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address range. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s AdvertiseByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AdvertiseByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *AdvertiseByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *AdvertiseByoipCidrOutput { + s.ByoipCidr = v + return s +} + type AllocateAddressInput struct { _ struct{} `type:"structure"` - // [EC2-VPC] The Elastic IP address to recover. + // [EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address + // pool. Address *string `type:"string"` // Set to vpc to allocate the address for use with instances in a VPC. @@ -23483,6 +24070,11 @@ type AllocateAddressInput struct { // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of an address pool that you own. Use this parameter to let Amazon + // EC2 select an address from the address pool. To specify a specific address + // from the address pool, use the Address parameter instead. + PublicIpv4Pool *string `type:"string"` } // String returns the string representation @@ -23513,7 +24105,12 @@ func (s *AllocateAddressInput) SetDryRun(v bool) *AllocateAddressInput { return s } -// Contains the output of AllocateAddress. +// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. +func (s *AllocateAddressInput) SetPublicIpv4Pool(v string) *AllocateAddressInput { + s.PublicIpv4Pool = &v + return s +} + type AllocateAddressOutput struct { _ struct{} `type:"structure"` @@ -23527,6 +24124,9 @@ type AllocateAddressOutput struct { // The Elastic IP address. PublicIp *string `locationName:"publicIp" type:"string"` + + // The ID of an address pool. + PublicIpv4Pool *string `locationName:"publicIpv4Pool" type:"string"` } // String returns the string representation @@ -23557,6 +24157,12 @@ func (s *AllocateAddressOutput) SetPublicIp(v string) *AllocateAddressOutput { return s } +// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. +func (s *AllocateAddressOutput) SetPublicIpv4Pool(v string) *AllocateAddressOutput { + s.PublicIpv4Pool = &v + return s +} + type AllocateHostsInput struct { _ struct{} `type:"structure"` @@ -23894,7 +24500,6 @@ func (s AssignPrivateIpAddressesOutput) GoString() string { return s.String() } -// Contains the parameters for AssociateAddress. type AssociateAddressInput struct { _ struct{} `type:"structure"` @@ -23986,7 +24591,6 @@ func (s *AssociateAddressInput) SetPublicIp(v string) *AssociateAddressInput { return s } -// Contains the output of AssociateAddress. type AssociateAddressOutput struct { _ struct{} `type:"structure"` @@ -25626,6 +26230,59 @@ func (s *BundleTaskError) SetMessage(v string) *BundleTaskError { return s } +// Information about an address range that is provisioned for use with your +// AWS resources through bring your own IP addresses (BYOIP). +type ByoipCidr struct { + _ struct{} `type:"structure"` + + // The public IPv4 address range, in CIDR notation. + Cidr *string `locationName:"cidr" type:"string"` + + // The description of the address range. + Description *string `locationName:"description" type:"string"` + + // The state of the address pool. + State *string `locationName:"state" type:"string" enum:"ByoipCidrState"` + + // Upon success, contains the ID of the address pool. Otherwise, contains an + // error message. + StatusMessage *string `locationName:"statusMessage" type:"string"` +} + +// String returns the string representation +func (s ByoipCidr) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ByoipCidr) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *ByoipCidr) SetCidr(v string) *ByoipCidr { + s.Cidr = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ByoipCidr) SetDescription(v string) *ByoipCidr { + s.Description = &v + return s +} + +// SetState sets the State field's value. +func (s *ByoipCidr) SetState(v string) *ByoipCidr { + s.State = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ByoipCidr) SetStatusMessage(v string) *ByoipCidr { + s.StatusMessage = &v + return s +} + // Contains the parameters for CancelBundleTask. type CancelBundleTaskInput struct { _ struct{} `type:"structure"` @@ -26307,6 +26964,60 @@ func (s *CancelledSpotInstanceRequest) SetState(v string) *CancelledSpotInstance return s } +// Provides authorization for Amazon to bring a specific IP address range to +// a specific AWS account using bring your own IP addresses (BYOIP). +type CidrAuthorizationContext struct { + _ struct{} `type:"structure"` + + // The plain-text authorization message for the prefix and account. + // + // Message is a required field + Message *string `type:"string" required:"true"` + + // The signed authorization message for the prefix and account. + // + // Signature is a required field + Signature *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CidrAuthorizationContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CidrAuthorizationContext) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CidrAuthorizationContext) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CidrAuthorizationContext"} + if s.Message == nil { + invalidParams.Add(request.NewErrParamRequired("Message")) + } + if s.Signature == nil { + invalidParams.Add(request.NewErrParamRequired("Signature")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMessage sets the Message field's value. +func (s *CidrAuthorizationContext) SetMessage(v string) *CidrAuthorizationContext { + s.Message = &v + return s +} + +// SetSignature sets the Signature field's value. +func (s *CidrAuthorizationContext) SetSignature(v string) *CidrAuthorizationContext { + s.Signature = &v + return s +} + // Describes an IPv4 CIDR block. type CidrBlock struct { _ struct{} `type:"structure"` @@ -28989,8 +29700,8 @@ type CreateNetworkAclEntryInput struct { // Egress is a required field Egress *bool `locationName:"egress" type:"boolean" required:"true"` - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the - // ICMP protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block. + // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol + // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64). @@ -29001,16 +29712,17 @@ type CreateNetworkAclEntryInput struct { // NetworkAclId is a required field NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` - // TCP or UDP protocols: The range of ports the rule applies to. + // TCP or UDP protocols: The range of ports the rule applies to. Required if + // specifying protocol 6 (TCP) or 17 (UDP). PortRange *PortRange `locationName:"portRange" type:"structure"` - // The protocol. A value of -1 or all means all protocols. If you specify all, - // -1, or a protocol number other than 6 (tcp), 17 (udp), or 1 (icmp), traffic - // on all ports is allowed, regardless of any ports or ICMP types or codes that - // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR - // block, traffic for all ICMP types and codes allowed, regardless of any that - // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR - // block, you must specify an ICMP type and code. + // The protocol number. A value of "-1" means all protocols. If you specify + // "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), + // traffic on all ports is allowed, regardless of any ports or ICMP types or + // codes that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless + // of any that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv6 CIDR block, you must specify an ICMP type and code. // // Protocol is a required field Protocol *string `locationName:"protocol" type:"string" required:"true"` @@ -30268,7 +30980,7 @@ type CreateTagsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The IDs of one or more resources to tag. For example, ami-1a2b3c4d. + // The IDs of one or more resources, separated by spaces. // // Resources is a required field Resources []*string `locationName:"ResourceId" type:"list" required:"true"` @@ -33371,7 +34083,7 @@ type DeleteTagsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The IDs of one or more resources. + // The IDs of one or more resources, separated by spaces. // // Resources is a required field Resources []*string `locationName:"resourceId" type:"list" required:"true"` @@ -34062,6 +34774,80 @@ func (s DeleteVpnGatewayOutput) GoString() string { return s.String() } +type DeprovisionByoipCidrInput struct { + _ struct{} `type:"structure"` + + // The public IPv4 address range, in CIDR notation. The prefix must be the same + // prefix that you specified when you provisioned the address range. + // + // Cidr is a required field + Cidr *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeprovisionByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprovisionByoipCidrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeprovisionByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeprovisionByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCidr sets the Cidr field's value. +func (s *DeprovisionByoipCidrInput) SetCidr(v string) *DeprovisionByoipCidrInput { + s.Cidr = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DeprovisionByoipCidrInput) SetDryRun(v bool) *DeprovisionByoipCidrInput { + s.DryRun = &v + return s +} + +type DeprovisionByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address range. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s DeprovisionByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeprovisionByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *DeprovisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *DeprovisionByoipCidrOutput { + s.ByoipCidr = v + return s +} + // Contains the parameters for DeregisterImage. type DeregisterImageInput struct { _ struct{} `type:"structure"` @@ -34187,7 +34973,6 @@ func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttri return s } -// Contains the parameters for DescribeAddresses. type DescribeAddressesInput struct { _ struct{} `type:"structure"` @@ -34275,7 +35060,6 @@ func (s *DescribeAddressesInput) SetPublicIps(v []*string) *DescribeAddressesInp return s } -// Contains the output of DescribeAddresses. type DescribeAddressesOutput struct { _ struct{} `type:"structure"` @@ -34531,6 +35315,105 @@ func (s *DescribeBundleTasksOutput) SetBundleTasks(v []*BundleTask) *DescribeBun return s } +type DescribeByoipCidrsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + // + // MaxResults is a required field + MaxResults *int64 `min:"5" type:"integer" required:"true"` + + // The token for the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeByoipCidrsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeByoipCidrsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeByoipCidrsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeByoipCidrsInput"} + if s.MaxResults == nil { + invalidParams.Add(request.NewErrParamRequired("MaxResults")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeByoipCidrsInput) SetDryRun(v bool) *DescribeByoipCidrsInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeByoipCidrsInput) SetMaxResults(v int64) *DescribeByoipCidrsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeByoipCidrsInput) SetNextToken(v string) *DescribeByoipCidrsInput { + s.NextToken = &v + return s +} + +type DescribeByoipCidrsOutput struct { + _ struct{} `type:"structure"` + + // Information about your address ranges. + ByoipCidrs []*ByoipCidr `locationName:"byoipCidrSet" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeByoipCidrsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeByoipCidrsOutput) GoString() string { + return s.String() +} + +// SetByoipCidrs sets the ByoipCidrs field's value. +func (s *DescribeByoipCidrsOutput) SetByoipCidrs(v []*ByoipCidr) *DescribeByoipCidrsOutput { + s.ByoipCidrs = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeByoipCidrsOutput) SetNextToken(v string) *DescribeByoipCidrsOutput { + s.NextToken = &v + return s +} + type DescribeClassicLinkInstancesInput struct { _ struct{} `type:"structure"` @@ -38220,7 +39103,6 @@ func (s *DescribeLaunchTemplatesOutput) SetNextToken(v string) *DescribeLaunchTe return s } -// Contains the parameters for DescribeMovingAddresses. type DescribeMovingAddressesInput struct { _ struct{} `type:"structure"` @@ -38244,7 +39126,7 @@ type DescribeMovingAddressesInput struct { // Default: If no value is provided, the default is 1000. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token to use to retrieve the next page of results. + // The token for the next page of results. NextToken *string `locationName:"nextToken" type:"string"` // One or more Elastic IP addresses. @@ -38291,7 +39173,6 @@ func (s *DescribeMovingAddressesInput) SetPublicIps(v []*string) *DescribeMoving return s } -// Contains the output of DescribeMovingAddresses. type DescribeMovingAddressesOutput struct { _ struct{} `type:"structure"` @@ -39247,6 +40128,97 @@ func (s *DescribePrincipalIdFormatOutput) SetPrincipals(v []*PrincipalIdFormat) return s } +type DescribePublicIpv4PoolsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `min:"1" type:"string"` + + // The IDs of the address pools. + PoolIds []*string `locationName:"PoolId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePublicIpv4PoolsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePublicIpv4PoolsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePublicIpv4PoolsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePublicIpv4PoolsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribePublicIpv4PoolsInput) SetMaxResults(v int64) *DescribePublicIpv4PoolsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePublicIpv4PoolsInput) SetNextToken(v string) *DescribePublicIpv4PoolsInput { + s.NextToken = &v + return s +} + +// SetPoolIds sets the PoolIds field's value. +func (s *DescribePublicIpv4PoolsInput) SetPoolIds(v []*string) *DescribePublicIpv4PoolsInput { + s.PoolIds = v + return s +} + +type DescribePublicIpv4PoolsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the address pools. + PublicIpv4Pools []*PublicIpv4Pool `locationName:"publicIpv4PoolSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePublicIpv4PoolsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePublicIpv4PoolsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePublicIpv4PoolsOutput) SetNextToken(v string) *DescribePublicIpv4PoolsOutput { + s.NextToken = &v + return s +} + +// SetPublicIpv4Pools sets the PublicIpv4Pools field's value. +func (s *DescribePublicIpv4PoolsOutput) SetPublicIpv4Pools(v []*PublicIpv4Pool) *DescribePublicIpv4PoolsOutput { + s.PublicIpv4Pools = v + return s +} + // Contains the parameters for DescribeRegions. type DescribeRegionsInput struct { _ struct{} `type:"structure"` @@ -44450,7 +45422,6 @@ func (s *DisableVpcClassicLinkOutput) SetReturn(v bool) *DisableVpcClassicLinkOu return s } -// Contains the parameters for DisassociateAddress. type DisassociateAddressInput struct { _ struct{} `type:"structure"` @@ -56153,7 +57124,6 @@ func (s *Monitoring) SetState(v string) *Monitoring { return s } -// Contains the parameters for MoveAddressToVpc. type MoveAddressToVpcInput struct { _ struct{} `type:"structure"` @@ -56204,7 +57174,6 @@ func (s *MoveAddressToVpcInput) SetPublicIp(v string) *MoveAddressToVpcInput { return s } -// Contains the output of MoveAddressToVpc. type MoveAddressToVpcOutput struct { _ struct{} `type:"structure"` @@ -56608,7 +57577,7 @@ type NetworkAclEntry struct { // TCP or UDP protocols: The range of ports the rule applies to. PortRange *PortRange `locationName:"portRange" type:"structure"` - // The protocol. A value of -1 means all protocols. + // The protocol number. A value of "-1" means all protocols. Protocol *string `locationName:"protocol" type:"string"` // Indicates whether to allow or deny the traffic that matches the rule. @@ -57944,6 +58913,105 @@ func (s *PropagatingVgw) SetGatewayId(v string) *PropagatingVgw { return s } +type ProvisionByoipCidrInput struct { + _ struct{} `type:"structure"` + + // The public IPv4 address range, in CIDR notation. The most specific prefix + // that you can specify is /24. The address range cannot overlap with another + // address range that you've brought to this or another region. + // + // Cidr is a required field + Cidr *string `type:"string" required:"true"` + + // A signed document that proves that you are authorized to bring the specified + // IP address range to Amazon using BYOIP. + CidrAuthorizationContext *CidrAuthorizationContext `type:"structure"` + + // A description for the address range and the address pool. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s ProvisionByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisionByoipCidrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisionByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisionByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) + } + if s.CidrAuthorizationContext != nil { + if err := s.CidrAuthorizationContext.Validate(); err != nil { + invalidParams.AddNested("CidrAuthorizationContext", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCidr sets the Cidr field's value. +func (s *ProvisionByoipCidrInput) SetCidr(v string) *ProvisionByoipCidrInput { + s.Cidr = &v + return s +} + +// SetCidrAuthorizationContext sets the CidrAuthorizationContext field's value. +func (s *ProvisionByoipCidrInput) SetCidrAuthorizationContext(v *CidrAuthorizationContext) *ProvisionByoipCidrInput { + s.CidrAuthorizationContext = v + return s +} + +// SetDescription sets the Description field's value. +func (s *ProvisionByoipCidrInput) SetDescription(v string) *ProvisionByoipCidrInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ProvisionByoipCidrInput) SetDryRun(v bool) *ProvisionByoipCidrInput { + s.DryRun = &v + return s +} + +type ProvisionByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address pool. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s ProvisionByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisionByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *ProvisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *ProvisionByoipCidrOutput { + s.ByoipCidr = v + return s +} + // Reserved. If you need to sustain traffic greater than the documented limits // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), // contact us through the Support Center (https://console.aws.amazon.com/support/home?). @@ -58016,6 +59084,117 @@ func (s *ProvisionedBandwidth) SetStatus(v string) *ProvisionedBandwidth { return s } +// Describes an address pool. +type PublicIpv4Pool struct { + _ struct{} `type:"structure"` + + // A description of the address pool. + Description *string `locationName:"description" type:"string"` + + // The address ranges. + PoolAddressRanges []*PublicIpv4PoolRange `locationName:"poolAddressRangeSet" locationNameList:"item" type:"list"` + + // The ID of the IPv4 address pool. + PoolId *string `locationName:"poolId" type:"string"` + + // The total number of addresses. + TotalAddressCount *int64 `locationName:"totalAddressCount" type:"integer"` + + // The total number of available addresses. + TotalAvailableAddressCount *int64 `locationName:"totalAvailableAddressCount" type:"integer"` +} + +// String returns the string representation +func (s PublicIpv4Pool) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicIpv4Pool) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *PublicIpv4Pool) SetDescription(v string) *PublicIpv4Pool { + s.Description = &v + return s +} + +// SetPoolAddressRanges sets the PoolAddressRanges field's value. +func (s *PublicIpv4Pool) SetPoolAddressRanges(v []*PublicIpv4PoolRange) *PublicIpv4Pool { + s.PoolAddressRanges = v + return s +} + +// SetPoolId sets the PoolId field's value. +func (s *PublicIpv4Pool) SetPoolId(v string) *PublicIpv4Pool { + s.PoolId = &v + return s +} + +// SetTotalAddressCount sets the TotalAddressCount field's value. +func (s *PublicIpv4Pool) SetTotalAddressCount(v int64) *PublicIpv4Pool { + s.TotalAddressCount = &v + return s +} + +// SetTotalAvailableAddressCount sets the TotalAvailableAddressCount field's value. +func (s *PublicIpv4Pool) SetTotalAvailableAddressCount(v int64) *PublicIpv4Pool { + s.TotalAvailableAddressCount = &v + return s +} + +// Describes an address range of an IPv4 address pool. +type PublicIpv4PoolRange struct { + _ struct{} `type:"structure"` + + // The number of addresses in the range. + AddressCount *int64 `locationName:"addressCount" type:"integer"` + + // The number of available addresses in the range. + AvailableAddressCount *int64 `locationName:"availableAddressCount" type:"integer"` + + // The first IP address in the range. + FirstAddress *string `locationName:"firstAddress" type:"string"` + + // The last IP address in the range. + LastAddress *string `locationName:"lastAddress" type:"string"` +} + +// String returns the string representation +func (s PublicIpv4PoolRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicIpv4PoolRange) GoString() string { + return s.String() +} + +// SetAddressCount sets the AddressCount field's value. +func (s *PublicIpv4PoolRange) SetAddressCount(v int64) *PublicIpv4PoolRange { + s.AddressCount = &v + return s +} + +// SetAvailableAddressCount sets the AvailableAddressCount field's value. +func (s *PublicIpv4PoolRange) SetAvailableAddressCount(v int64) *PublicIpv4PoolRange { + s.AvailableAddressCount = &v + return s +} + +// SetFirstAddress sets the FirstAddress field's value. +func (s *PublicIpv4PoolRange) SetFirstAddress(v string) *PublicIpv4PoolRange { + s.FirstAddress = &v + return s +} + +// SetLastAddress sets the LastAddress field's value. +func (s *PublicIpv4PoolRange) SetLastAddress(v string) *PublicIpv4PoolRange { + s.LastAddress = &v + return s +} + // Describes the result of the purchase. type Purchase struct { _ struct{} `type:"structure"` @@ -58992,7 +60171,6 @@ func (s *RejectVpcPeeringConnectionOutput) SetReturn(v bool) *RejectVpcPeeringCo return s } -// Contains the parameters for ReleaseAddress. type ReleaseAddressInput struct { _ struct{} `type:"structure"` @@ -59304,8 +60482,8 @@ type ReplaceNetworkAclEntryInput struct { // Egress is a required field Egress *bool `locationName:"egress" type:"boolean" required:"true"` - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the - // ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block. + // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol + // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64). @@ -59317,16 +60495,16 @@ type ReplaceNetworkAclEntryInput struct { NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` // TCP or UDP protocols: The range of ports the rule applies to. Required if - // specifying TCP (6) or UDP (17) for the protocol. + // specifying protocol 6 (TCP) or 17 (UDP). PortRange *PortRange `locationName:"portRange" type:"structure"` - // The IP protocol. You can specify all or -1 to mean all protocols. If you - // specify all, -1, or a protocol number other than tcp, udp, or icmp, traffic - // on all ports is allowed, regardless of any ports or ICMP types or codes you - // that specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR - // block, traffic for all ICMP types and codes allowed, regardless of any that - // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR - // block, you must specify an ICMP type and code. + // The protocol number. A value of "-1" means all protocols. If you specify + // "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), + // traffic on all ports is allowed, regardless of any ports or ICMP types or + // codes that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless + // of any that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv6 CIDR block, you must specify an ICMP type and code. // // Protocol is a required field Protocol *string `locationName:"protocol" type:"string" required:"true"` @@ -62041,7 +63219,6 @@ func (s *ResponseLaunchTemplateData) SetUserData(v string) *ResponseLaunchTempla return s } -// Contains the parameters for RestoreAddressToClassic. type RestoreAddressToClassicInput struct { _ struct{} `type:"structure"` @@ -62092,7 +63269,6 @@ func (s *RestoreAddressToClassicInput) SetPublicIp(v string) *RestoreAddressToCl return s } -// Contains the output of RestoreAddressToClassic. type RestoreAddressToClassicOutput struct { _ struct{} `type:"structure"` @@ -65557,7 +66733,7 @@ type SpotFleetRequestConfigData struct { ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` // The number of units fulfilled by this request compared to the set target - // capacity. + // capacity. You cannot set this value. FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` // Grants the Spot Fleet permission to terminate Spot Instances on your behalf @@ -67096,7 +68272,7 @@ type TagDescription struct { // The tag key. Key *string `locationName:"key" type:"string"` - // The ID of the resource. For example, ami-1a2b3c4d. + // The ID of the resource. ResourceId *string `locationName:"resourceId" type:"string"` // The resource type. @@ -70073,6 +71249,79 @@ func (s *VpnTunnelOptionsSpecification) SetTunnelInsideCidr(v string) *VpnTunnel return s } +type WithdrawByoipCidrInput struct { + _ struct{} `type:"structure"` + + // The public IPv4 address range, in CIDR notation. + // + // Cidr is a required field + Cidr *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s WithdrawByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WithdrawByoipCidrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WithdrawByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WithdrawByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCidr sets the Cidr field's value. +func (s *WithdrawByoipCidrInput) SetCidr(v string) *WithdrawByoipCidrInput { + s.Cidr = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *WithdrawByoipCidrInput) SetDryRun(v bool) *WithdrawByoipCidrInput { + s.DryRun = &v + return s +} + +type WithdrawByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address pool. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s WithdrawByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WithdrawByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *WithdrawByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *WithdrawByoipCidrOutput { + s.ByoipCidr = v + return s +} + const ( // AccountAttributeNameSupportedPlatforms is a AccountAttributeName enum value AccountAttributeNameSupportedPlatforms = "supported-platforms" @@ -70218,6 +71467,29 @@ const ( BundleTaskStateFailed = "failed" ) +const ( + // ByoipCidrStateAdvertised is a ByoipCidrState enum value + ByoipCidrStateAdvertised = "advertised" + + // ByoipCidrStateDeprovisioned is a ByoipCidrState enum value + ByoipCidrStateDeprovisioned = "deprovisioned" + + // ByoipCidrStateFailedDeprovision is a ByoipCidrState enum value + ByoipCidrStateFailedDeprovision = "failed-deprovision" + + // ByoipCidrStateFailedProvision is a ByoipCidrState enum value + ByoipCidrStateFailedProvision = "failed-provision" + + // ByoipCidrStatePendingDeprovision is a ByoipCidrState enum value + ByoipCidrStatePendingDeprovision = "pending-deprovision" + + // ByoipCidrStatePendingProvision is a ByoipCidrState enum value + ByoipCidrStatePendingProvision = "pending-provision" + + // ByoipCidrStateProvisioned is a ByoipCidrState enum value + ByoipCidrStateProvisioned = "provisioned" +) + const ( // CancelBatchErrorCodeFleetRequestIdDoesNotExist is a CancelBatchErrorCode enum value CancelBatchErrorCodeFleetRequestIdDoesNotExist = "fleetRequestIdDoesNotExist" diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index 93bfbb1eec6..4847a246d8f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -2376,6 +2376,97 @@ func (c *Glue) DeletePartitionWithContext(ctx aws.Context, input *DeletePartitio return out, req.Send() } +const opDeleteResourcePolicy = "DeleteResourcePolicy" + +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteResourcePolicy +func (c *Glue) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { + op := &request.Operation{ + Name: opDeleteResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResourcePolicyInput{} + } + + output = &DeleteResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResourcePolicy API operation for AWS Glue. +// +// Deletes a specified policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation DeleteResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeConditionCheckFailureException "ConditionCheckFailureException" +// A specified condition was not satisfied. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteResourcePolicy +func (c *Glue) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + return out, req.Send() +} + +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" // DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the @@ -4160,6 +4251,11 @@ func (c *Glue) GetDevEndpointRequest(input *GetDevEndpointInput) (req *request.R // // Retrieves information about a specified DevEndpoint. // +// When you create a development endpoint in a virtual private cloud (VPC), +// AWS Glue returns only a private IP address, and the public IP address field +// is not populated. When you create a non-VPC development endpoint, AWS Glue +// returns only a public IP address. +// // 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. @@ -4254,6 +4350,11 @@ func (c *Glue) GetDevEndpointsRequest(input *GetDevEndpointsInput) (req *request // // Retrieves all the DevEndpoints in this AWS account. // +// When you create a development endpoint in a virtual private cloud (VPC), +// AWS Glue returns only a private IP address and the public IP address field +// is not populated. When you create a non-VPC development endpoint, AWS Glue +// returns only a public IP address. +// // 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. @@ -5221,6 +5322,94 @@ func (c *Glue) GetPlanWithContext(ctx aws.Context, input *GetPlanInput, opts ... return out, req.Send() } +const opGetResourcePolicy = "GetResourcePolicy" + +// GetResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourcePolicy for more information on using the GetResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourcePolicyRequest method. +// req, resp := client.GetResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetResourcePolicy +func (c *Glue) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { + op := &request.Operation{ + Name: opGetResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResourcePolicyInput{} + } + + output = &GetResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourcePolicy API operation for AWS Glue. +// +// Retrieves a specified resource policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation GetResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetResourcePolicy +func (c *Glue) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + return out, req.Send() +} + +// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetSecurityConfiguration = "GetSecurityConfiguration" // GetSecurityConfigurationRequest generates a "aws/request.Request" representing the @@ -6513,6 +6702,97 @@ func (c *Glue) PutDataCatalogEncryptionSettingsWithContext(ctx aws.Context, inpu return out, req.Send() } +const opPutResourcePolicy = "PutResourcePolicy" + +// PutResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutResourcePolicy for more information on using the PutResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutResourcePolicyRequest method. +// req, resp := client.PutResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutResourcePolicy +func (c *Glue) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { + op := &request.Operation{ + Name: opPutResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutResourcePolicyInput{} + } + + output = &PutResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutResourcePolicy API operation for AWS Glue. +// +// Sets the Data Catalog resource policy for access control. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation PutResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeConditionCheckFailureException "ConditionCheckFailureException" +// A specified condition was not satisfied. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutResourcePolicy +func (c *Glue) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + return out, req.Send() +} + +// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Glue) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opResetJobBookmark = "ResetJobBookmark" // ResetJobBookmarkRequest generates a "aws/request.Request" representing the @@ -8770,7 +9050,8 @@ type BatchDeleteTableVersionInput struct { // TableName is a required field TableName *string `min:"1" type:"string" required:"true"` - // A list of the IDs of versions to be deleted. + // A list of the IDs of versions to be deleted. A VersionId is a string representation + // of an integer. Each version is incremented by 1. // // VersionIds is a required field VersionIds []*string `type:"list" required:"true"` @@ -9687,7 +9968,8 @@ type Connection struct { // * PORT - The port number, between 1024 and 65535, of the port on which // the database host is listening for database connections. // - // * USER_NAME - The name under which to log in to the database. + // * USER_NAME - The name under which to log in to the database. The value + // string for USER_NAME is "USERNAME". // // * PASSWORD - A password, if one is used, for the user name. // @@ -9940,15 +10222,8 @@ type Crawler struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // If the crawler is running, contains the total time elapsed since the last @@ -10401,15 +10676,8 @@ type CreateCrawlerInput struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The name of the SecurityConfiguration structure to be used by this Crawler. @@ -12610,6 +12878,56 @@ func (s DeletePartitionOutput) GoString() string { return s.String() } +type DeleteResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // The hash value returned when this policy was set. + PolicyHashCondition *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} + if s.PolicyHashCondition != nil && len(*s.PolicyHashCondition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyHashCondition", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyHashCondition sets the PolicyHashCondition field's value. +func (s *DeleteResourcePolicyInput) SetPolicyHashCondition(v string) *DeleteResourcePolicyInput { + s.PolicyHashCondition = &v + return s +} + +type DeleteResourcePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyOutput) GoString() string { + return s.String() +} + type DeleteSecurityConfigurationInput struct { _ struct{} `type:"structure"` @@ -12770,7 +13088,8 @@ type DeleteTableVersionInput struct { // TableName is a required field TableName *string `min:"1" type:"string" required:"true"` - // The ID of the table version to be deleted. + // The ID of the table version to be deleted. A VersionID is a string representation + // of an integer. Each version is incremented by 1. // // VersionId is a required field VersionId *string `min:"1" type:"string" required:"true"` @@ -13045,11 +13364,13 @@ type DevEndpoint struct { // The number of AWS Glue Data Processing Units (DPUs) allocated to this DevEndpoint. NumberOfNodes *int64 `type:"integer"` - // A private DNS to access the DevEndpoint within a VPC, if the DevEndpoint - // is created within one. + // A private IP address to access the DevEndpoint within a VPC, if the DevEndpoint + // is created within one. The PrivateAddress field is present only when you + // create the DevEndpoint within your virtual private cloud (VPC). PrivateAddress *string `type:"string"` - // The public VPC address used by this DevEndpoint. + // The public IP address used by this DevEndpoint. The PublicAddress field is + // present only when you create a non-VPC (virtual private cloud) DevEndpoint. PublicAddress *string `type:"string"` // The public key to be used by this DevEndpoint for authentication. This attribute @@ -15060,6 +15381,76 @@ type GetPartitionsInput struct { DatabaseName *string `min:"1" type:"string" required:"true"` // An expression filtering the partitions to be returned. + // + // The expression uses SQL syntax similar to the SQL WHERE filter clause. The + // SQL statement parser JSQLParser (http://jsqlparser.sourceforge.net/home.php) + // parses the expression. + // + // Operators: The following are the operators that you can use in the Expression + // API call: + // + // =Checks if the values of the two operands are equal or not; if yes, then + // the condition becomes true. + // + // Example: Assume 'variable a' holds 10 and 'variable b' holds 20. + // + // (a = b) is not true. + // + // < >Checks if the values of two operands are equal or not; if the values are + // not equal, then the condition becomes true. + // + // Example: (a < > b) is true. + // + // >Checks if the value of the left operand is greater than the value of the + // right operand; if yes, then the condition becomes true. + // + // Example: (a > b) is not true. + // + // =Checks if the value of the left operand is greater than or equal to the + // value of the right operand; if yes, then the condition becomes true. + // + // Example: (a >= b) is not true. + // + // <=Checks if the value of the left operand is less than or equal to the value + // of the right operand; if yes, then the condition becomes true. + // + // Example: (a <= b) is true. + // + // AND, OR, IN, BETWEEN, LIKE, NOT, IS NULLLogical operators. + // + // Supported Partition Key Types: The following are the the supported partition + // keys. + // + // * string + // + // * date + // + // * timestamp + // + // * int + // + // * bigint + // + // * long + // + // * tinyint + // + // * smallint + // + // * decimal + // + // If an invalid type is encountered, an exception is thrown. + // + // The following list shows the valid operators on each type. When you define + // a crawler, the partitionKey type is created as a STRING, to be compatible + // with the catalog partitions. + // + // Sample API Call: Expression *string `type:"string"` // The maximum number of partitions to return in a single response. @@ -15326,6 +15717,70 @@ func (s *GetPlanOutput) SetScalaCode(v string) *GetPlanOutput { return s } +type GetResourcePolicyInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyInput) GoString() string { + return s.String() +} + +type GetResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The date and time at which the policy was created. + CreateTime *time.Time `type:"timestamp"` + + // Contains the hash value associated with this policy. + PolicyHash *string `min:"1" type:"string"` + + // Contains the requested policy document, in JSON format. + PolicyInJson *string `min:"2" type:"string"` + + // The date and time at which the policy was last updated. + UpdateTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s GetResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetCreateTime sets the CreateTime field's value. +func (s *GetResourcePolicyOutput) SetCreateTime(v time.Time) *GetResourcePolicyOutput { + s.CreateTime = &v + return s +} + +// SetPolicyHash sets the PolicyHash field's value. +func (s *GetResourcePolicyOutput) SetPolicyHash(v string) *GetResourcePolicyOutput { + s.PolicyHash = &v + return s +} + +// SetPolicyInJson sets the PolicyInJson field's value. +func (s *GetResourcePolicyOutput) SetPolicyInJson(v string) *GetResourcePolicyOutput { + s.PolicyInJson = &v + return s +} + +// SetUpdateTime sets the UpdateTime field's value. +func (s *GetResourcePolicyOutput) SetUpdateTime(v time.Time) *GetResourcePolicyOutput { + s.UpdateTime = &v + return s +} + type GetSecurityConfigurationInput struct { _ struct{} `type:"structure"` @@ -15581,7 +16036,8 @@ type GetTableVersionInput struct { // TableName is a required field TableName *string `min:"1" type:"string" required:"true"` - // The ID value of the table version to be retrieved. + // The ID value of the table version to be retrieved. A VersionID is a string + // representation of an integer. Each version is incremented by 1. VersionId *string `min:"1" type:"string"` } @@ -17962,6 +18418,96 @@ func (s PutDataCatalogEncryptionSettingsOutput) GoString() string { return s.String() } +type PutResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // A value of MUST_EXIST is used to update a policy. A value of NOT_EXIST is + // used to create a new policy. If a value of NONE or a null value is used, + // the call will not depend on the existence of a policy. + PolicyExistsCondition *string `type:"string" enum:"ExistCondition"` + + // This is the hash value returned when the previous policy was set using PutResourcePolicy. + // Its purpose is to prevent concurrent modifications of a policy. Do not use + // this parameter if no previous policy has been set. + PolicyHashCondition *string `min:"1" type:"string"` + + // Contains the policy document to set, in JSON format. + // + // PolicyInJson is a required field + PolicyInJson *string `min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} + if s.PolicyHashCondition != nil && len(*s.PolicyHashCondition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyHashCondition", 1)) + } + if s.PolicyInJson == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyInJson")) + } + if s.PolicyInJson != nil && len(*s.PolicyInJson) < 2 { + invalidParams.Add(request.NewErrParamMinLen("PolicyInJson", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyExistsCondition sets the PolicyExistsCondition field's value. +func (s *PutResourcePolicyInput) SetPolicyExistsCondition(v string) *PutResourcePolicyInput { + s.PolicyExistsCondition = &v + return s +} + +// SetPolicyHashCondition sets the PolicyHashCondition field's value. +func (s *PutResourcePolicyInput) SetPolicyHashCondition(v string) *PutResourcePolicyInput { + s.PolicyHashCondition = &v + return s +} + +// SetPolicyInJson sets the PolicyInJson field's value. +func (s *PutResourcePolicyInput) SetPolicyInJson(v string) *PutResourcePolicyInput { + s.PolicyInJson = &v + return s +} + +type PutResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // A hash of the policy that has just been set. This must be included in a subsequent + // call that overwrites or updates this policy. + PolicyHash *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetPolicyHash sets the PolicyHash field's value. +func (s *PutResourcePolicyOutput) SetPolicyHash(v string) *PutResourcePolicyOutput { + s.PolicyHash = &v + return s +} + type ResetJobBookmarkInput struct { _ struct{} `type:"structure"` @@ -19439,7 +19985,8 @@ type TableVersion struct { // The table in question Table *Table `type:"structure"` - // The ID value that identifies this table version. + // The ID value that identifies this table version. A VersionId is a string + // representation of an integer. Each version is incremented by 1. VersionId *string `min:"1" type:"string"` } @@ -19475,7 +20022,8 @@ type TableVersionError struct { // The name of the table in question. TableName *string `min:"1" type:"string"` - // The ID value of the version in question. + // The ID value of the version in question. A VersionID is a string representation + // of an integer. Each version is incremented by 1. VersionId *string `min:"1" type:"string"` } @@ -19865,15 +20413,8 @@ type UpdateCrawlerInput struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The name of the SecurityConfiguration structure to be used by this Crawler. @@ -21266,6 +21807,17 @@ const ( DeleteBehaviorDeprecateInDatabase = "DEPRECATE_IN_DATABASE" ) +const ( + // ExistConditionMustExist is a ExistCondition enum value + ExistConditionMustExist = "MUST_EXIST" + + // ExistConditionNotExist is a ExistCondition enum value + ExistConditionNotExist = "NOT_EXIST" + + // ExistConditionNone is a ExistCondition enum value + ExistConditionNone = "NONE" +) + const ( // JobBookmarksEncryptionModeDisabled is a JobBookmarksEncryptionMode enum value JobBookmarksEncryptionModeDisabled = "DISABLED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go index 6de7b4f0e72..a1e9b4d4d6b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go @@ -28,6 +28,12 @@ const ( // Too many jobs are being run concurrently. ErrCodeConcurrentRunsExceededException = "ConcurrentRunsExceededException" + // ErrCodeConditionCheckFailureException for service response error code + // "ConditionCheckFailureException". + // + // A specified condition was not satisfied. + ErrCodeConditionCheckFailureException = "ConditionCheckFailureException" + // ErrCodeCrawlerNotRunningException for service response error code // "CrawlerNotRunningException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index 9d5c5ce9ed7..5c91f542d3c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -5105,10 +5105,17 @@ type AssetAttributes struct { // The list of IP v4 addresses of the EC2 instance where the finding is generated. Ipv4Addresses []*string `locationName:"ipv4Addresses" type:"list"` + // An array of the network interfaces interacting with the EC2 instance where + // the finding is generated. + NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` + // The schema version of this data type. // // SchemaVersion is a required field SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"` + + // The tags related to the EC2 instance where the finding is generated. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -5151,12 +5158,24 @@ func (s *AssetAttributes) SetIpv4Addresses(v []*string) *AssetAttributes { return s } +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *AssetAttributes) SetNetworkInterfaces(v []*NetworkInterface) *AssetAttributes { + s.NetworkInterfaces = v + return s +} + // SetSchemaVersion sets the SchemaVersion field's value. func (s *AssetAttributes) SetSchemaVersion(v int64) *AssetAttributes { s.SchemaVersion = &v return s } +// SetTags sets the Tags field's value. +func (s *AssetAttributes) SetTags(v []*Tag) *AssetAttributes { + s.Tags = v + return s +} + // This data type is used as a request parameter in the AddAttributesToFindings // and CreateAssessmentTemplate actions. type Attribute struct { @@ -8216,6 +8235,115 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput return s } +// Contains information about the network interfaces interacting with an EC2 +// instance. This data type is used as one of the elements of the AssetAttributes +// data type. +type NetworkInterface struct { + _ struct{} `type:"structure"` + + // The IP addresses associated with the network interface. + Ipv6Addresses []*string `locationName:"ipv6Addresses" type:"list"` + + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // The name of a private DNS associated with the network interface. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + + // The private IP address associated with the network interface. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + + // A list of the private IP addresses associated with the network interface. + // Includes the privateDnsName and privateIpAddress. + PrivateIpAddresses []*PrivateIp `locationName:"privateIpAddresses" type:"list"` + + // The name of a public DNS associated with the network interface. + PublicDnsName *string `locationName:"publicDnsName" type:"string"` + + // The public IP address from which the network interface is reachable. + PublicIp *string `locationName:"publicIp" type:"string"` + + // A list of the security groups associated with the network interface. Includes + // the groupId and groupName. + SecurityGroups []*SecurityGroup `locationName:"securityGroups" type:"list"` + + // The ID of a subnet associated with the network interface. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The ID of a VPC associated with the network interface. + VpcId *string `locationName:"vpcId" type:"string"` +} + +// String returns the string representation +func (s NetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterface) GoString() string { + return s.String() +} + +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *NetworkInterface) SetIpv6Addresses(v []*string) *NetworkInterface { + s.Ipv6Addresses = v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { + s.NetworkInterfaceId = &v + return s +} + +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { + s.PrivateDnsName = &v + return s +} + +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *NetworkInterface) SetPrivateIpAddress(v string) *NetworkInterface { + s.PrivateIpAddress = &v + return s +} + +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *NetworkInterface) SetPrivateIpAddresses(v []*PrivateIp) *NetworkInterface { + s.PrivateIpAddresses = v + return s +} + +// SetPublicDnsName sets the PublicDnsName field's value. +func (s *NetworkInterface) SetPublicDnsName(v string) *NetworkInterface { + s.PublicDnsName = &v + return s +} + +// SetPublicIp sets the PublicIp field's value. +func (s *NetworkInterface) SetPublicIp(v string) *NetworkInterface { + s.PublicIp = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *NetworkInterface) SetSecurityGroups(v []*SecurityGroup) *NetworkInterface { + s.SecurityGroups = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { + s.SubnetId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { + s.VpcId = &v + return s +} + type PreviewAgentsInput struct { _ struct{} `type:"structure"` @@ -8319,6 +8447,41 @@ func (s *PreviewAgentsOutput) SetNextToken(v string) *PreviewAgentsOutput { return s } +// Contains information about a private IP address associated with a network +// interface. This data type is used as a response element in the DescribeFindings +// action. +type PrivateIp struct { + _ struct{} `type:"structure"` + + // The DNS name of the private IP address. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + + // The full IP address of the network inteface. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` +} + +// String returns the string representation +func (s PrivateIp) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PrivateIp) GoString() string { + return s.String() +} + +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *PrivateIp) SetPrivateDnsName(v string) *PrivateIp { + s.PrivateDnsName = &v + return s +} + +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *PrivateIp) SetPrivateIpAddress(v string) *PrivateIp { + s.PrivateIpAddress = &v + return s +} + type RegisterCrossAccountAccessRoleInput struct { _ struct{} `type:"structure"` @@ -8664,6 +8827,41 @@ func (s *Scope) SetValue(v string) *Scope { return s } +// Contains information about a security group associated with a network interface. +// This data type is used as one of the elements of the NetworkInterface data +// type. +type SecurityGroup struct { + _ struct{} `type:"structure"` + + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` + + // The name of the security group. + GroupName *string `locationName:"groupName" type:"string"` +} + +// String returns the string representation +func (s SecurityGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroup) GoString() string { + return s.String() +} + +// SetGroupId sets the GroupId field's value. +func (s *SecurityGroup) SetGroupId(v string) *SecurityGroup { + s.GroupId = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { + s.GroupName = &v + return s +} + // This data type is used in the Finding data type. type ServiceAttributes struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 708ce92e420..5341cd83fcd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -1335,6 +1335,11 @@ func (c *Lightsail) CreateInstancesRequest(input *CreateInstancesInput) (req *re // CreateInstances API operation for Amazon Lightsail. // // Creates one or more Amazon Lightsail virtual private servers, or instances. +// Create instances using active blueprints. Inactive blueprints are listed +// to support customers with existing instances but are not necessarily available +// for launch of new instances. Blueprints are marked inactive when they become +// outdated due to operating system updates or new application releases. Use +// the get blueprints operation to return a list of available blueprints. // // 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 @@ -1543,7 +1548,7 @@ func (c *Lightsail) CreateKeyPairRequest(input *CreateKeyPairInput) (req *reques // CreateKeyPair API operation for Amazon Lightsail. // -// Creates sn SSH key pair. +// Creates an SSH key pair. // // 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 @@ -1820,6 +1825,324 @@ func (c *Lightsail) CreateLoadBalancerTlsCertificateWithContext(ctx aws.Context, return out, req.Send() } +const opCreateRelationalDatabase = "CreateRelationalDatabase" + +// CreateRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the CreateRelationalDatabase operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRelationalDatabase for more information on using the CreateRelationalDatabase +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRelationalDatabaseRequest method. +// req, resp := client.CreateRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabase +func (c *Lightsail) CreateRelationalDatabaseRequest(input *CreateRelationalDatabaseInput) (req *request.Request, output *CreateRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opCreateRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRelationalDatabaseInput{} + } + + output = &CreateRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRelationalDatabase API operation for Amazon Lightsail. +// +// Creates a new database in Amazon Lightsail. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation CreateRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabase +func (c *Lightsail) CreateRelationalDatabase(input *CreateRelationalDatabaseInput) (*CreateRelationalDatabaseOutput, error) { + req, out := c.CreateRelationalDatabaseRequest(input) + return out, req.Send() +} + +// CreateRelationalDatabaseWithContext is the same as CreateRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRelationalDatabase for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) CreateRelationalDatabaseWithContext(ctx aws.Context, input *CreateRelationalDatabaseInput, opts ...request.Option) (*CreateRelationalDatabaseOutput, error) { + req, out := c.CreateRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateRelationalDatabaseFromSnapshot = "CreateRelationalDatabaseFromSnapshot" + +// CreateRelationalDatabaseFromSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateRelationalDatabaseFromSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRelationalDatabaseFromSnapshot for more information on using the CreateRelationalDatabaseFromSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRelationalDatabaseFromSnapshotRequest method. +// req, resp := client.CreateRelationalDatabaseFromSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseFromSnapshot +func (c *Lightsail) CreateRelationalDatabaseFromSnapshotRequest(input *CreateRelationalDatabaseFromSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseFromSnapshotOutput) { + op := &request.Operation{ + Name: opCreateRelationalDatabaseFromSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRelationalDatabaseFromSnapshotInput{} + } + + output = &CreateRelationalDatabaseFromSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRelationalDatabaseFromSnapshot API operation for Amazon Lightsail. +// +// Creates a new database from an existing database snapshot in Amazon Lightsail. +// +// You can create a new database from a snapshot in if something goes wrong +// with your original database, or to change it to a different plan, such as +// a high availability or standard plan. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation CreateRelationalDatabaseFromSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseFromSnapshot +func (c *Lightsail) CreateRelationalDatabaseFromSnapshot(input *CreateRelationalDatabaseFromSnapshotInput) (*CreateRelationalDatabaseFromSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseFromSnapshotRequest(input) + return out, req.Send() +} + +// CreateRelationalDatabaseFromSnapshotWithContext is the same as CreateRelationalDatabaseFromSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRelationalDatabaseFromSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) CreateRelationalDatabaseFromSnapshotWithContext(ctx aws.Context, input *CreateRelationalDatabaseFromSnapshotInput, opts ...request.Option) (*CreateRelationalDatabaseFromSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseFromSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateRelationalDatabaseSnapshot = "CreateRelationalDatabaseSnapshot" + +// CreateRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateRelationalDatabaseSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRelationalDatabaseSnapshot for more information on using the CreateRelationalDatabaseSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRelationalDatabaseSnapshotRequest method. +// req, resp := client.CreateRelationalDatabaseSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseSnapshot +func (c *Lightsail) CreateRelationalDatabaseSnapshotRequest(input *CreateRelationalDatabaseSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseSnapshotOutput) { + op := &request.Operation{ + Name: opCreateRelationalDatabaseSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRelationalDatabaseSnapshotInput{} + } + + output = &CreateRelationalDatabaseSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRelationalDatabaseSnapshot API operation for Amazon Lightsail. +// +// Creates a snapshot of your database in Amazon Lightsail. You can use snapshots +// for backups, to make copies of a database, and to save data before deleting +// a database. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation CreateRelationalDatabaseSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseSnapshot +func (c *Lightsail) CreateRelationalDatabaseSnapshot(input *CreateRelationalDatabaseSnapshotInput) (*CreateRelationalDatabaseSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseSnapshotRequest(input) + return out, req.Send() +} + +// CreateRelationalDatabaseSnapshotWithContext is the same as CreateRelationalDatabaseSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRelationalDatabaseSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) CreateRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *CreateRelationalDatabaseSnapshotInput, opts ...request.Option) (*CreateRelationalDatabaseSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDisk = "DeleteDisk" // DeleteDiskRequest generates a "aws/request.Request" representing the @@ -2768,25 +3091,233 @@ func (c *Lightsail) DeleteLoadBalancerTlsCertificateWithContext(ctx aws.Context, return out, req.Send() } -const opDetachDisk = "DetachDisk" +const opDeleteRelationalDatabase = "DeleteRelationalDatabase" -// DetachDiskRequest generates a "aws/request.Request" representing the -// client's request for the DetachDisk operation. The "output" return +// DeleteRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRelationalDatabase operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DetachDisk for more information on using the DetachDisk +// See DeleteRelationalDatabase for more information on using the DeleteRelationalDatabase // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DetachDiskRequest method. -// req, resp := client.DetachDiskRequest(params) +// // Example sending a request using the DeleteRelationalDatabaseRequest method. +// req, resp := client.DeleteRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabase +func (c *Lightsail) DeleteRelationalDatabaseRequest(input *DeleteRelationalDatabaseInput) (req *request.Request, output *DeleteRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opDeleteRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRelationalDatabaseInput{} + } + + output = &DeleteRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRelationalDatabase API operation for Amazon Lightsail. +// +// Deletes a database in Amazon Lightsail. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation DeleteRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabase +func (c *Lightsail) DeleteRelationalDatabase(input *DeleteRelationalDatabaseInput) (*DeleteRelationalDatabaseOutput, error) { + req, out := c.DeleteRelationalDatabaseRequest(input) + return out, req.Send() +} + +// DeleteRelationalDatabaseWithContext is the same as DeleteRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRelationalDatabase for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) DeleteRelationalDatabaseWithContext(ctx aws.Context, input *DeleteRelationalDatabaseInput, opts ...request.Option) (*DeleteRelationalDatabaseOutput, error) { + req, out := c.DeleteRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteRelationalDatabaseSnapshot = "DeleteRelationalDatabaseSnapshot" + +// DeleteRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRelationalDatabaseSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRelationalDatabaseSnapshot for more information on using the DeleteRelationalDatabaseSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRelationalDatabaseSnapshotRequest method. +// req, resp := client.DeleteRelationalDatabaseSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabaseSnapshot +func (c *Lightsail) DeleteRelationalDatabaseSnapshotRequest(input *DeleteRelationalDatabaseSnapshotInput) (req *request.Request, output *DeleteRelationalDatabaseSnapshotOutput) { + op := &request.Operation{ + Name: opDeleteRelationalDatabaseSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRelationalDatabaseSnapshotInput{} + } + + output = &DeleteRelationalDatabaseSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteRelationalDatabaseSnapshot API operation for Amazon Lightsail. +// +// Deletes a database snapshot in Amazon Lightsail. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation DeleteRelationalDatabaseSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabaseSnapshot +func (c *Lightsail) DeleteRelationalDatabaseSnapshot(input *DeleteRelationalDatabaseSnapshotInput) (*DeleteRelationalDatabaseSnapshotOutput, error) { + req, out := c.DeleteRelationalDatabaseSnapshotRequest(input) + return out, req.Send() +} + +// DeleteRelationalDatabaseSnapshotWithContext is the same as DeleteRelationalDatabaseSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRelationalDatabaseSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) DeleteRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *DeleteRelationalDatabaseSnapshotInput, opts ...request.Option) (*DeleteRelationalDatabaseSnapshotOutput, error) { + req, out := c.DeleteRelationalDatabaseSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDetachDisk = "DetachDisk" + +// DetachDiskRequest generates a "aws/request.Request" representing the +// client's request for the DetachDisk operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DetachDisk for more information on using the DetachDisk +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DetachDiskRequest method. +// req, resp := client.DetachDiskRequest(params) // // err := req.Send() // if err == nil { // resp is now filled @@ -5972,7 +6503,7 @@ func (c *Lightsail) GetRegionsRequest(input *GetRegionsInput) (req *request.Requ // GetRegions API operation for Amazon Lightsail. // // Returns a list of all valid regions for Amazon Lightsail. Use the include -// availability zones parameter to also return the availability zones in a region. +// availability zones parameter to also return the Availability Zones in a region. // // 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 @@ -6032,58 +6563,58 @@ func (c *Lightsail) GetRegionsWithContext(ctx aws.Context, input *GetRegionsInpu return out, req.Send() } -const opGetStaticIp = "GetStaticIp" +const opGetRelationalDatabase = "GetRelationalDatabase" -// GetStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the GetStaticIp operation. The "output" return +// GetRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabase operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetStaticIp for more information on using the GetStaticIp +// See GetRelationalDatabase for more information on using the GetRelationalDatabase // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetStaticIpRequest method. -// req, resp := client.GetStaticIpRequest(params) +// // Example sending a request using the GetRelationalDatabaseRequest method. +// req, resp := client.GetRelationalDatabaseRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp -func (c *Lightsail) GetStaticIpRequest(input *GetStaticIpInput) (req *request.Request, output *GetStaticIpOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabase +func (c *Lightsail) GetRelationalDatabaseRequest(input *GetRelationalDatabaseInput) (req *request.Request, output *GetRelationalDatabaseOutput) { op := &request.Operation{ - Name: opGetStaticIp, + Name: opGetRelationalDatabase, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetStaticIpInput{} + input = &GetRelationalDatabaseInput{} } - output = &GetStaticIpOutput{} + output = &GetRelationalDatabaseOutput{} req = c.newRequest(op, input, output) return } -// GetStaticIp API operation for Amazon Lightsail. +// GetRelationalDatabase API operation for Amazon Lightsail. // -// Returns information about a specific static IP. +// Returns information about a specific database in Amazon Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation GetStaticIp for usage and error information. +// API operation GetRelationalDatabase for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6114,80 +6645,84 @@ func (c *Lightsail) GetStaticIpRequest(input *GetStaticIpInput) (req *request.Re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp -func (c *Lightsail) GetStaticIp(input *GetStaticIpInput) (*GetStaticIpOutput, error) { - req, out := c.GetStaticIpRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabase +func (c *Lightsail) GetRelationalDatabase(input *GetRelationalDatabaseInput) (*GetRelationalDatabaseOutput, error) { + req, out := c.GetRelationalDatabaseRequest(input) return out, req.Send() } -// GetStaticIpWithContext is the same as GetStaticIp with the addition of +// GetRelationalDatabaseWithContext is the same as GetRelationalDatabase with the addition of // the ability to pass a context and additional request options. // -// See GetStaticIp for details on how to use this API operation. +// See GetRelationalDatabase for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) GetStaticIpWithContext(ctx aws.Context, input *GetStaticIpInput, opts ...request.Option) (*GetStaticIpOutput, error) { - req, out := c.GetStaticIpRequest(input) +func (c *Lightsail) GetRelationalDatabaseWithContext(ctx aws.Context, input *GetRelationalDatabaseInput, opts ...request.Option) (*GetRelationalDatabaseOutput, error) { + req, out := c.GetRelationalDatabaseRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetStaticIps = "GetStaticIps" +const opGetRelationalDatabaseBlueprints = "GetRelationalDatabaseBlueprints" -// GetStaticIpsRequest generates a "aws/request.Request" representing the -// client's request for the GetStaticIps operation. The "output" return +// GetRelationalDatabaseBlueprintsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseBlueprints operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetStaticIps for more information on using the GetStaticIps +// See GetRelationalDatabaseBlueprints for more information on using the GetRelationalDatabaseBlueprints // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetStaticIpsRequest method. -// req, resp := client.GetStaticIpsRequest(params) +// // Example sending a request using the GetRelationalDatabaseBlueprintsRequest method. +// req, resp := client.GetRelationalDatabaseBlueprintsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps -func (c *Lightsail) GetStaticIpsRequest(input *GetStaticIpsInput) (req *request.Request, output *GetStaticIpsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBlueprints +func (c *Lightsail) GetRelationalDatabaseBlueprintsRequest(input *GetRelationalDatabaseBlueprintsInput) (req *request.Request, output *GetRelationalDatabaseBlueprintsOutput) { op := &request.Operation{ - Name: opGetStaticIps, + Name: opGetRelationalDatabaseBlueprints, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetStaticIpsInput{} + input = &GetRelationalDatabaseBlueprintsInput{} } - output = &GetStaticIpsOutput{} + output = &GetRelationalDatabaseBlueprintsOutput{} req = c.newRequest(op, input, output) return } -// GetStaticIps API operation for Amazon Lightsail. +// GetRelationalDatabaseBlueprints API operation for Amazon Lightsail. // -// Returns information about all static IPs in the user's account. +// Returns a list of available database blueprints in Amazon Lightsail. A blueprint +// describes the major engine version of a database. +// +// You can use a blueprint ID to create a new database that runs a specific +// database engine. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation GetStaticIps for usage and error information. +// API operation GetRelationalDatabaseBlueprints for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6218,80 +6753,84 @@ func (c *Lightsail) GetStaticIpsRequest(input *GetStaticIpsInput) (req *request. // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps -func (c *Lightsail) GetStaticIps(input *GetStaticIpsInput) (*GetStaticIpsOutput, error) { - req, out := c.GetStaticIpsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBlueprints +func (c *Lightsail) GetRelationalDatabaseBlueprints(input *GetRelationalDatabaseBlueprintsInput) (*GetRelationalDatabaseBlueprintsOutput, error) { + req, out := c.GetRelationalDatabaseBlueprintsRequest(input) return out, req.Send() } -// GetStaticIpsWithContext is the same as GetStaticIps with the addition of +// GetRelationalDatabaseBlueprintsWithContext is the same as GetRelationalDatabaseBlueprints with the addition of // the ability to pass a context and additional request options. // -// See GetStaticIps for details on how to use this API operation. +// See GetRelationalDatabaseBlueprints for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) GetStaticIpsWithContext(ctx aws.Context, input *GetStaticIpsInput, opts ...request.Option) (*GetStaticIpsOutput, error) { - req, out := c.GetStaticIpsRequest(input) +func (c *Lightsail) GetRelationalDatabaseBlueprintsWithContext(ctx aws.Context, input *GetRelationalDatabaseBlueprintsInput, opts ...request.Option) (*GetRelationalDatabaseBlueprintsOutput, error) { + req, out := c.GetRelationalDatabaseBlueprintsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opImportKeyPair = "ImportKeyPair" +const opGetRelationalDatabaseBundles = "GetRelationalDatabaseBundles" -// ImportKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the ImportKeyPair operation. The "output" return +// GetRelationalDatabaseBundlesRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseBundles operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ImportKeyPair for more information on using the ImportKeyPair +// See GetRelationalDatabaseBundles for more information on using the GetRelationalDatabaseBundles // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ImportKeyPairRequest method. -// req, resp := client.ImportKeyPairRequest(params) +// // Example sending a request using the GetRelationalDatabaseBundlesRequest method. +// req, resp := client.GetRelationalDatabaseBundlesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair -func (c *Lightsail) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBundles +func (c *Lightsail) GetRelationalDatabaseBundlesRequest(input *GetRelationalDatabaseBundlesInput) (req *request.Request, output *GetRelationalDatabaseBundlesOutput) { op := &request.Operation{ - Name: opImportKeyPair, + Name: opGetRelationalDatabaseBundles, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ImportKeyPairInput{} + input = &GetRelationalDatabaseBundlesInput{} } - output = &ImportKeyPairOutput{} + output = &GetRelationalDatabaseBundlesOutput{} req = c.newRequest(op, input, output) return } -// ImportKeyPair API operation for Amazon Lightsail. +// GetRelationalDatabaseBundles API operation for Amazon Lightsail. // -// Imports a public SSH key from a specific key pair. +// Returns the list of bundles that are available in Amazon Lightsail. A bundle +// describes the performance specifications for a database. +// +// You can use a bundle ID to create a new database with explicit performance +// specifications. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation ImportKeyPair for usage and error information. +// API operation GetRelationalDatabaseBundles for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6322,80 +6861,80 @@ func (c *Lightsail) ImportKeyPairRequest(input *ImportKeyPairInput) (req *reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair -func (c *Lightsail) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBundles +func (c *Lightsail) GetRelationalDatabaseBundles(input *GetRelationalDatabaseBundlesInput) (*GetRelationalDatabaseBundlesOutput, error) { + req, out := c.GetRelationalDatabaseBundlesRequest(input) return out, req.Send() } -// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of +// GetRelationalDatabaseBundlesWithContext is the same as GetRelationalDatabaseBundles with the addition of // the ability to pass a context and additional request options. // -// See ImportKeyPair for details on how to use this API operation. +// See GetRelationalDatabaseBundles for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) +func (c *Lightsail) GetRelationalDatabaseBundlesWithContext(ctx aws.Context, input *GetRelationalDatabaseBundlesInput, opts ...request.Option) (*GetRelationalDatabaseBundlesOutput, error) { + req, out := c.GetRelationalDatabaseBundlesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opIsVpcPeered = "IsVpcPeered" +const opGetRelationalDatabaseEvents = "GetRelationalDatabaseEvents" -// IsVpcPeeredRequest generates a "aws/request.Request" representing the -// client's request for the IsVpcPeered operation. The "output" return +// GetRelationalDatabaseEventsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See IsVpcPeered for more information on using the IsVpcPeered +// See GetRelationalDatabaseEvents for more information on using the GetRelationalDatabaseEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the IsVpcPeeredRequest method. -// req, resp := client.IsVpcPeeredRequest(params) +// // Example sending a request using the GetRelationalDatabaseEventsRequest method. +// req, resp := client.GetRelationalDatabaseEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered -func (c *Lightsail) IsVpcPeeredRequest(input *IsVpcPeeredInput) (req *request.Request, output *IsVpcPeeredOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseEvents +func (c *Lightsail) GetRelationalDatabaseEventsRequest(input *GetRelationalDatabaseEventsInput) (req *request.Request, output *GetRelationalDatabaseEventsOutput) { op := &request.Operation{ - Name: opIsVpcPeered, + Name: opGetRelationalDatabaseEvents, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &IsVpcPeeredInput{} + input = &GetRelationalDatabaseEventsInput{} } - output = &IsVpcPeeredOutput{} + output = &GetRelationalDatabaseEventsOutput{} req = c.newRequest(op, input, output) return } -// IsVpcPeered API operation for Amazon Lightsail. +// GetRelationalDatabaseEvents API operation for Amazon Lightsail. // -// Returns a Boolean value indicating whether your Lightsail VPC is peered. +// Returns a list of events for a specific database in Amazon Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation IsVpcPeered for usage and error information. +// API operation GetRelationalDatabaseEvents for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6426,80 +6965,80 @@ func (c *Lightsail) IsVpcPeeredRequest(input *IsVpcPeeredInput) (req *request.Re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered -func (c *Lightsail) IsVpcPeered(input *IsVpcPeeredInput) (*IsVpcPeeredOutput, error) { - req, out := c.IsVpcPeeredRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseEvents +func (c *Lightsail) GetRelationalDatabaseEvents(input *GetRelationalDatabaseEventsInput) (*GetRelationalDatabaseEventsOutput, error) { + req, out := c.GetRelationalDatabaseEventsRequest(input) return out, req.Send() } -// IsVpcPeeredWithContext is the same as IsVpcPeered with the addition of +// GetRelationalDatabaseEventsWithContext is the same as GetRelationalDatabaseEvents with the addition of // the ability to pass a context and additional request options. // -// See IsVpcPeered for details on how to use this API operation. +// See GetRelationalDatabaseEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) IsVpcPeeredWithContext(ctx aws.Context, input *IsVpcPeeredInput, opts ...request.Option) (*IsVpcPeeredOutput, error) { - req, out := c.IsVpcPeeredRequest(input) +func (c *Lightsail) GetRelationalDatabaseEventsWithContext(ctx aws.Context, input *GetRelationalDatabaseEventsInput, opts ...request.Option) (*GetRelationalDatabaseEventsOutput, error) { + req, out := c.GetRelationalDatabaseEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opOpenInstancePublicPorts = "OpenInstancePublicPorts" +const opGetRelationalDatabaseLogEvents = "GetRelationalDatabaseLogEvents" -// OpenInstancePublicPortsRequest generates a "aws/request.Request" representing the -// client's request for the OpenInstancePublicPorts operation. The "output" return +// GetRelationalDatabaseLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseLogEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See OpenInstancePublicPorts for more information on using the OpenInstancePublicPorts +// See GetRelationalDatabaseLogEvents for more information on using the GetRelationalDatabaseLogEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the OpenInstancePublicPortsRequest method. -// req, resp := client.OpenInstancePublicPortsRequest(params) +// // Example sending a request using the GetRelationalDatabaseLogEventsRequest method. +// req, resp := client.GetRelationalDatabaseLogEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts -func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPortsInput) (req *request.Request, output *OpenInstancePublicPortsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogEvents +func (c *Lightsail) GetRelationalDatabaseLogEventsRequest(input *GetRelationalDatabaseLogEventsInput) (req *request.Request, output *GetRelationalDatabaseLogEventsOutput) { op := &request.Operation{ - Name: opOpenInstancePublicPorts, + Name: opGetRelationalDatabaseLogEvents, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &OpenInstancePublicPortsInput{} + input = &GetRelationalDatabaseLogEventsInput{} } - output = &OpenInstancePublicPortsOutput{} + output = &GetRelationalDatabaseLogEventsOutput{} req = c.newRequest(op, input, output) return } -// OpenInstancePublicPorts API operation for Amazon Lightsail. +// GetRelationalDatabaseLogEvents API operation for Amazon Lightsail. // -// Adds public ports to an Amazon Lightsail instance. +// Returns a list of log events for a database in Amazon Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation OpenInstancePublicPorts for usage and error information. +// API operation GetRelationalDatabaseLogEvents for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6530,80 +7069,81 @@ func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPort // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts -func (c *Lightsail) OpenInstancePublicPorts(input *OpenInstancePublicPortsInput) (*OpenInstancePublicPortsOutput, error) { - req, out := c.OpenInstancePublicPortsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogEvents +func (c *Lightsail) GetRelationalDatabaseLogEvents(input *GetRelationalDatabaseLogEventsInput) (*GetRelationalDatabaseLogEventsOutput, error) { + req, out := c.GetRelationalDatabaseLogEventsRequest(input) return out, req.Send() } -// OpenInstancePublicPortsWithContext is the same as OpenInstancePublicPorts with the addition of +// GetRelationalDatabaseLogEventsWithContext is the same as GetRelationalDatabaseLogEvents with the addition of // the ability to pass a context and additional request options. // -// See OpenInstancePublicPorts for details on how to use this API operation. +// See GetRelationalDatabaseLogEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) OpenInstancePublicPortsWithContext(ctx aws.Context, input *OpenInstancePublicPortsInput, opts ...request.Option) (*OpenInstancePublicPortsOutput, error) { - req, out := c.OpenInstancePublicPortsRequest(input) +func (c *Lightsail) GetRelationalDatabaseLogEventsWithContext(ctx aws.Context, input *GetRelationalDatabaseLogEventsInput, opts ...request.Option) (*GetRelationalDatabaseLogEventsOutput, error) { + req, out := c.GetRelationalDatabaseLogEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPeerVpc = "PeerVpc" +const opGetRelationalDatabaseLogStreams = "GetRelationalDatabaseLogStreams" -// PeerVpcRequest generates a "aws/request.Request" representing the -// client's request for the PeerVpc operation. The "output" return +// GetRelationalDatabaseLogStreamsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseLogStreams operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PeerVpc for more information on using the PeerVpc +// See GetRelationalDatabaseLogStreams for more information on using the GetRelationalDatabaseLogStreams // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PeerVpcRequest method. -// req, resp := client.PeerVpcRequest(params) +// // Example sending a request using the GetRelationalDatabaseLogStreamsRequest method. +// req, resp := client.GetRelationalDatabaseLogStreamsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc -func (c *Lightsail) PeerVpcRequest(input *PeerVpcInput) (req *request.Request, output *PeerVpcOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogStreams +func (c *Lightsail) GetRelationalDatabaseLogStreamsRequest(input *GetRelationalDatabaseLogStreamsInput) (req *request.Request, output *GetRelationalDatabaseLogStreamsOutput) { op := &request.Operation{ - Name: opPeerVpc, + Name: opGetRelationalDatabaseLogStreams, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PeerVpcInput{} + input = &GetRelationalDatabaseLogStreamsInput{} } - output = &PeerVpcOutput{} + output = &GetRelationalDatabaseLogStreamsOutput{} req = c.newRequest(op, input, output) return } -// PeerVpc API operation for Amazon Lightsail. +// GetRelationalDatabaseLogStreams API operation for Amazon Lightsail. // -// Tries to peer the Lightsail VPC with the user's default VPC. +// Returns a list of available log streams for a specific database in Amazon +// Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation PeerVpc for usage and error information. +// API operation GetRelationalDatabaseLogStreams for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6634,81 +7174,81 @@ func (c *Lightsail) PeerVpcRequest(input *PeerVpcInput) (req *request.Request, o // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc -func (c *Lightsail) PeerVpc(input *PeerVpcInput) (*PeerVpcOutput, error) { - req, out := c.PeerVpcRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogStreams +func (c *Lightsail) GetRelationalDatabaseLogStreams(input *GetRelationalDatabaseLogStreamsInput) (*GetRelationalDatabaseLogStreamsOutput, error) { + req, out := c.GetRelationalDatabaseLogStreamsRequest(input) return out, req.Send() } -// PeerVpcWithContext is the same as PeerVpc with the addition of +// GetRelationalDatabaseLogStreamsWithContext is the same as GetRelationalDatabaseLogStreams with the addition of // the ability to pass a context and additional request options. // -// See PeerVpc for details on how to use this API operation. +// See GetRelationalDatabaseLogStreams for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) PeerVpcWithContext(ctx aws.Context, input *PeerVpcInput, opts ...request.Option) (*PeerVpcOutput, error) { - req, out := c.PeerVpcRequest(input) +func (c *Lightsail) GetRelationalDatabaseLogStreamsWithContext(ctx aws.Context, input *GetRelationalDatabaseLogStreamsInput, opts ...request.Option) (*GetRelationalDatabaseLogStreamsOutput, error) { + req, out := c.GetRelationalDatabaseLogStreamsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutInstancePublicPorts = "PutInstancePublicPorts" +const opGetRelationalDatabaseMasterUserPassword = "GetRelationalDatabaseMasterUserPassword" -// PutInstancePublicPortsRequest generates a "aws/request.Request" representing the -// client's request for the PutInstancePublicPorts operation. The "output" return +// GetRelationalDatabaseMasterUserPasswordRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseMasterUserPassword operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutInstancePublicPorts for more information on using the PutInstancePublicPorts +// See GetRelationalDatabaseMasterUserPassword for more information on using the GetRelationalDatabaseMasterUserPassword // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PutInstancePublicPortsRequest method. -// req, resp := client.PutInstancePublicPortsRequest(params) +// // Example sending a request using the GetRelationalDatabaseMasterUserPasswordRequest method. +// req, resp := client.GetRelationalDatabaseMasterUserPasswordRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts -func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsInput) (req *request.Request, output *PutInstancePublicPortsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMasterUserPassword +func (c *Lightsail) GetRelationalDatabaseMasterUserPasswordRequest(input *GetRelationalDatabaseMasterUserPasswordInput) (req *request.Request, output *GetRelationalDatabaseMasterUserPasswordOutput) { op := &request.Operation{ - Name: opPutInstancePublicPorts, + Name: opGetRelationalDatabaseMasterUserPassword, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutInstancePublicPortsInput{} + input = &GetRelationalDatabaseMasterUserPasswordInput{} } - output = &PutInstancePublicPortsOutput{} + output = &GetRelationalDatabaseMasterUserPasswordOutput{} req = c.newRequest(op, input, output) return } -// PutInstancePublicPorts API operation for Amazon Lightsail. +// GetRelationalDatabaseMasterUserPassword API operation for Amazon Lightsail. // -// Sets the specified open ports for an Amazon Lightsail instance, and closes -// all ports for every protocol not included in the current request. +// Returns the current, previous, or pending versions of the master user password +// for a Lightsail database. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation PutInstancePublicPorts for usage and error information. +// API operation GetRelationalDatabaseMasterUserPassword for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6739,83 +7279,81 @@ func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsI // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts -func (c *Lightsail) PutInstancePublicPorts(input *PutInstancePublicPortsInput) (*PutInstancePublicPortsOutput, error) { - req, out := c.PutInstancePublicPortsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMasterUserPassword +func (c *Lightsail) GetRelationalDatabaseMasterUserPassword(input *GetRelationalDatabaseMasterUserPasswordInput) (*GetRelationalDatabaseMasterUserPasswordOutput, error) { + req, out := c.GetRelationalDatabaseMasterUserPasswordRequest(input) return out, req.Send() } -// PutInstancePublicPortsWithContext is the same as PutInstancePublicPorts with the addition of +// GetRelationalDatabaseMasterUserPasswordWithContext is the same as GetRelationalDatabaseMasterUserPassword with the addition of // the ability to pass a context and additional request options. // -// See PutInstancePublicPorts for details on how to use this API operation. +// See GetRelationalDatabaseMasterUserPassword for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) PutInstancePublicPortsWithContext(ctx aws.Context, input *PutInstancePublicPortsInput, opts ...request.Option) (*PutInstancePublicPortsOutput, error) { - req, out := c.PutInstancePublicPortsRequest(input) +func (c *Lightsail) GetRelationalDatabaseMasterUserPasswordWithContext(ctx aws.Context, input *GetRelationalDatabaseMasterUserPasswordInput, opts ...request.Option) (*GetRelationalDatabaseMasterUserPasswordOutput, error) { + req, out := c.GetRelationalDatabaseMasterUserPasswordRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRebootInstance = "RebootInstance" +const opGetRelationalDatabaseMetricData = "GetRelationalDatabaseMetricData" -// RebootInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootInstance operation. The "output" return +// GetRelationalDatabaseMetricDataRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseMetricData operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RebootInstance for more information on using the RebootInstance +// See GetRelationalDatabaseMetricData for more information on using the GetRelationalDatabaseMetricData // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RebootInstanceRequest method. -// req, resp := client.RebootInstanceRequest(params) +// // Example sending a request using the GetRelationalDatabaseMetricDataRequest method. +// req, resp := client.GetRelationalDatabaseMetricDataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance -func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *request.Request, output *RebootInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMetricData +func (c *Lightsail) GetRelationalDatabaseMetricDataRequest(input *GetRelationalDatabaseMetricDataInput) (req *request.Request, output *GetRelationalDatabaseMetricDataOutput) { op := &request.Operation{ - Name: opRebootInstance, + Name: opGetRelationalDatabaseMetricData, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RebootInstanceInput{} + input = &GetRelationalDatabaseMetricDataInput{} } - output = &RebootInstanceOutput{} + output = &GetRelationalDatabaseMetricDataOutput{} req = c.newRequest(op, input, output) return } -// RebootInstance API operation for Amazon Lightsail. +// GetRelationalDatabaseMetricData API operation for Amazon Lightsail. // -// Restarts a specific instance. When your Amazon Lightsail instance is finished -// rebooting, Lightsail assigns a new public IP address. To use the same IP -// address after restarting, create a static IP address and attach it to the -// instance. +// Returns the data points of the specified metric for a database in Amazon +// Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation RebootInstance for usage and error information. +// API operation GetRelationalDatabaseMetricData for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6846,80 +7384,86 @@ func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance -func (c *Lightsail) RebootInstance(input *RebootInstanceInput) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMetricData +func (c *Lightsail) GetRelationalDatabaseMetricData(input *GetRelationalDatabaseMetricDataInput) (*GetRelationalDatabaseMetricDataOutput, error) { + req, out := c.GetRelationalDatabaseMetricDataRequest(input) return out, req.Send() } -// RebootInstanceWithContext is the same as RebootInstance with the addition of +// GetRelationalDatabaseMetricDataWithContext is the same as GetRelationalDatabaseMetricData with the addition of // the ability to pass a context and additional request options. // -// See RebootInstance for details on how to use this API operation. +// See GetRelationalDatabaseMetricData for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) RebootInstanceWithContext(ctx aws.Context, input *RebootInstanceInput, opts ...request.Option) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) +func (c *Lightsail) GetRelationalDatabaseMetricDataWithContext(ctx aws.Context, input *GetRelationalDatabaseMetricDataInput, opts ...request.Option) (*GetRelationalDatabaseMetricDataOutput, error) { + req, out := c.GetRelationalDatabaseMetricDataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opReleaseStaticIp = "ReleaseStaticIp" +const opGetRelationalDatabaseParameters = "GetRelationalDatabaseParameters" -// ReleaseStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the ReleaseStaticIp operation. The "output" return +// GetRelationalDatabaseParametersRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseParameters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ReleaseStaticIp for more information on using the ReleaseStaticIp +// See GetRelationalDatabaseParameters for more information on using the GetRelationalDatabaseParameters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ReleaseStaticIpRequest method. -// req, resp := client.ReleaseStaticIpRequest(params) +// // Example sending a request using the GetRelationalDatabaseParametersRequest method. +// req, resp := client.GetRelationalDatabaseParametersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp -func (c *Lightsail) ReleaseStaticIpRequest(input *ReleaseStaticIpInput) (req *request.Request, output *ReleaseStaticIpOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseParameters +func (c *Lightsail) GetRelationalDatabaseParametersRequest(input *GetRelationalDatabaseParametersInput) (req *request.Request, output *GetRelationalDatabaseParametersOutput) { op := &request.Operation{ - Name: opReleaseStaticIp, + Name: opGetRelationalDatabaseParameters, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ReleaseStaticIpInput{} + input = &GetRelationalDatabaseParametersInput{} } - output = &ReleaseStaticIpOutput{} + output = &GetRelationalDatabaseParametersOutput{} req = c.newRequest(op, input, output) return } -// ReleaseStaticIp API operation for Amazon Lightsail. +// GetRelationalDatabaseParameters API operation for Amazon Lightsail. // -// Deletes a specific static IP from your account. +// Returns all of the runtime parameters offered by the underlying database +// software, or engine, for a specific database in Amazon Lightsail. +// +// In addition to the parameter names and values, this operation returns other +// information about each parameter. This information includes whether changes +// require a reboot, whether the parameter is modifiable, the allowed values, +// and the data types. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation ReleaseStaticIp for usage and error information. +// API operation GetRelationalDatabaseParameters for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6950,81 +7494,80 @@ func (c *Lightsail) ReleaseStaticIpRequest(input *ReleaseStaticIpInput) (req *re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp -func (c *Lightsail) ReleaseStaticIp(input *ReleaseStaticIpInput) (*ReleaseStaticIpOutput, error) { - req, out := c.ReleaseStaticIpRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseParameters +func (c *Lightsail) GetRelationalDatabaseParameters(input *GetRelationalDatabaseParametersInput) (*GetRelationalDatabaseParametersOutput, error) { + req, out := c.GetRelationalDatabaseParametersRequest(input) return out, req.Send() } -// ReleaseStaticIpWithContext is the same as ReleaseStaticIp with the addition of +// GetRelationalDatabaseParametersWithContext is the same as GetRelationalDatabaseParameters with the addition of // the ability to pass a context and additional request options. // -// See ReleaseStaticIp for details on how to use this API operation. +// See GetRelationalDatabaseParameters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) ReleaseStaticIpWithContext(ctx aws.Context, input *ReleaseStaticIpInput, opts ...request.Option) (*ReleaseStaticIpOutput, error) { - req, out := c.ReleaseStaticIpRequest(input) +func (c *Lightsail) GetRelationalDatabaseParametersWithContext(ctx aws.Context, input *GetRelationalDatabaseParametersInput, opts ...request.Option) (*GetRelationalDatabaseParametersOutput, error) { + req, out := c.GetRelationalDatabaseParametersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStartInstance = "StartInstance" +const opGetRelationalDatabaseSnapshot = "GetRelationalDatabaseSnapshot" -// StartInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StartInstance operation. The "output" return +// GetRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseSnapshot operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartInstance for more information on using the StartInstance +// See GetRelationalDatabaseSnapshot for more information on using the GetRelationalDatabaseSnapshot // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StartInstanceRequest method. -// req, resp := client.StartInstanceRequest(params) +// // Example sending a request using the GetRelationalDatabaseSnapshotRequest method. +// req, resp := client.GetRelationalDatabaseSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance -func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *request.Request, output *StartInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshot +func (c *Lightsail) GetRelationalDatabaseSnapshotRequest(input *GetRelationalDatabaseSnapshotInput) (req *request.Request, output *GetRelationalDatabaseSnapshotOutput) { op := &request.Operation{ - Name: opStartInstance, + Name: opGetRelationalDatabaseSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartInstanceInput{} + input = &GetRelationalDatabaseSnapshotInput{} } - output = &StartInstanceOutput{} + output = &GetRelationalDatabaseSnapshotOutput{} req = c.newRequest(op, input, output) return } -// StartInstance API operation for Amazon Lightsail. +// GetRelationalDatabaseSnapshot API operation for Amazon Lightsail. // -// Starts a specific Amazon Lightsail instance from a stopped state. To restart -// an instance, use the reboot instance operation. +// Returns information about a specific database snapshot in Amazon Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation StartInstance for usage and error information. +// API operation GetRelationalDatabaseSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7055,80 +7598,80 @@ func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance -func (c *Lightsail) StartInstance(input *StartInstanceInput) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshot +func (c *Lightsail) GetRelationalDatabaseSnapshot(input *GetRelationalDatabaseSnapshotInput) (*GetRelationalDatabaseSnapshotOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotRequest(input) return out, req.Send() } -// StartInstanceWithContext is the same as StartInstance with the addition of +// GetRelationalDatabaseSnapshotWithContext is the same as GetRelationalDatabaseSnapshot with the addition of // the ability to pass a context and additional request options. // -// See StartInstance for details on how to use this API operation. +// See GetRelationalDatabaseSnapshot for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) StartInstanceWithContext(ctx aws.Context, input *StartInstanceInput, opts ...request.Option) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) +func (c *Lightsail) GetRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *GetRelationalDatabaseSnapshotInput, opts ...request.Option) (*GetRelationalDatabaseSnapshotOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopInstance = "StopInstance" +const opGetRelationalDatabaseSnapshots = "GetRelationalDatabaseSnapshots" -// StopInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StopInstance operation. The "output" return +// GetRelationalDatabaseSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseSnapshots operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopInstance for more information on using the StopInstance +// See GetRelationalDatabaseSnapshots for more information on using the GetRelationalDatabaseSnapshots // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StopInstanceRequest method. -// req, resp := client.StopInstanceRequest(params) +// // Example sending a request using the GetRelationalDatabaseSnapshotsRequest method. +// req, resp := client.GetRelationalDatabaseSnapshotsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance -func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request.Request, output *StopInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshots +func (c *Lightsail) GetRelationalDatabaseSnapshotsRequest(input *GetRelationalDatabaseSnapshotsInput) (req *request.Request, output *GetRelationalDatabaseSnapshotsOutput) { op := &request.Operation{ - Name: opStopInstance, + Name: opGetRelationalDatabaseSnapshots, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StopInstanceInput{} + input = &GetRelationalDatabaseSnapshotsInput{} } - output = &StopInstanceOutput{} + output = &GetRelationalDatabaseSnapshotsOutput{} req = c.newRequest(op, input, output) return } -// StopInstance API operation for Amazon Lightsail. +// GetRelationalDatabaseSnapshots API operation for Amazon Lightsail. // -// Stops a specific Amazon Lightsail instance that is currently running. +// Returns information about all of your database snapshots in Amazon Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation StopInstance for usage and error information. +// API operation GetRelationalDatabaseSnapshots for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7159,80 +7702,80 @@ func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request. // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance -func (c *Lightsail) StopInstance(input *StopInstanceInput) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshots +func (c *Lightsail) GetRelationalDatabaseSnapshots(input *GetRelationalDatabaseSnapshotsInput) (*GetRelationalDatabaseSnapshotsOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotsRequest(input) return out, req.Send() } -// StopInstanceWithContext is the same as StopInstance with the addition of +// GetRelationalDatabaseSnapshotsWithContext is the same as GetRelationalDatabaseSnapshots with the addition of // the ability to pass a context and additional request options. // -// See StopInstance for details on how to use this API operation. +// See GetRelationalDatabaseSnapshots for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) StopInstanceWithContext(ctx aws.Context, input *StopInstanceInput, opts ...request.Option) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) +func (c *Lightsail) GetRelationalDatabaseSnapshotsWithContext(ctx aws.Context, input *GetRelationalDatabaseSnapshotsInput, opts ...request.Option) (*GetRelationalDatabaseSnapshotsOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUnpeerVpc = "UnpeerVpc" +const opGetRelationalDatabases = "GetRelationalDatabases" -// UnpeerVpcRequest generates a "aws/request.Request" representing the -// client's request for the UnpeerVpc operation. The "output" return +// GetRelationalDatabasesRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabases operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UnpeerVpc for more information on using the UnpeerVpc +// See GetRelationalDatabases for more information on using the GetRelationalDatabases // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UnpeerVpcRequest method. -// req, resp := client.UnpeerVpcRequest(params) +// // Example sending a request using the GetRelationalDatabasesRequest method. +// req, resp := client.GetRelationalDatabasesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc -func (c *Lightsail) UnpeerVpcRequest(input *UnpeerVpcInput) (req *request.Request, output *UnpeerVpcOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabases +func (c *Lightsail) GetRelationalDatabasesRequest(input *GetRelationalDatabasesInput) (req *request.Request, output *GetRelationalDatabasesOutput) { op := &request.Operation{ - Name: opUnpeerVpc, + Name: opGetRelationalDatabases, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UnpeerVpcInput{} + input = &GetRelationalDatabasesInput{} } - output = &UnpeerVpcOutput{} + output = &GetRelationalDatabasesOutput{} req = c.newRequest(op, input, output) return } -// UnpeerVpc API operation for Amazon Lightsail. +// GetRelationalDatabases API operation for Amazon Lightsail. // -// Attempts to unpeer the Lightsail VPC from the user's default VPC. +// Returns information about all of your databases in Amazon Lightsail. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation UnpeerVpc for usage and error information. +// API operation GetRelationalDatabases for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7263,80 +7806,80 @@ func (c *Lightsail) UnpeerVpcRequest(input *UnpeerVpcInput) (req *request.Reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc -func (c *Lightsail) UnpeerVpc(input *UnpeerVpcInput) (*UnpeerVpcOutput, error) { - req, out := c.UnpeerVpcRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabases +func (c *Lightsail) GetRelationalDatabases(input *GetRelationalDatabasesInput) (*GetRelationalDatabasesOutput, error) { + req, out := c.GetRelationalDatabasesRequest(input) return out, req.Send() } -// UnpeerVpcWithContext is the same as UnpeerVpc with the addition of +// GetRelationalDatabasesWithContext is the same as GetRelationalDatabases with the addition of // the ability to pass a context and additional request options. // -// See UnpeerVpc for details on how to use this API operation. +// See GetRelationalDatabases for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) UnpeerVpcWithContext(ctx aws.Context, input *UnpeerVpcInput, opts ...request.Option) (*UnpeerVpcOutput, error) { - req, out := c.UnpeerVpcRequest(input) +func (c *Lightsail) GetRelationalDatabasesWithContext(ctx aws.Context, input *GetRelationalDatabasesInput, opts ...request.Option) (*GetRelationalDatabasesOutput, error) { + req, out := c.GetRelationalDatabasesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateDomainEntry = "UpdateDomainEntry" +const opGetStaticIp = "GetStaticIp" -// UpdateDomainEntryRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDomainEntry operation. The "output" return +// GetStaticIpRequest generates a "aws/request.Request" representing the +// client's request for the GetStaticIp operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateDomainEntry for more information on using the UpdateDomainEntry +// See GetStaticIp for more information on using the GetStaticIp // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateDomainEntryRequest method. -// req, resp := client.UpdateDomainEntryRequest(params) +// // Example sending a request using the GetStaticIpRequest method. +// req, resp := client.GetStaticIpRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry -func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req *request.Request, output *UpdateDomainEntryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp +func (c *Lightsail) GetStaticIpRequest(input *GetStaticIpInput) (req *request.Request, output *GetStaticIpOutput) { op := &request.Operation{ - Name: opUpdateDomainEntry, + Name: opGetStaticIp, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateDomainEntryInput{} + input = &GetStaticIpInput{} } - output = &UpdateDomainEntryOutput{} + output = &GetStaticIpOutput{} req = c.newRequest(op, input, output) return } -// UpdateDomainEntry API operation for Amazon Lightsail. +// GetStaticIp API operation for Amazon Lightsail. // -// Updates a domain recordset after it is created. +// Returns information about a specific static IP. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation UpdateDomainEntry for usage and error information. +// API operation GetStaticIp for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7367,81 +7910,80 @@ func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry -func (c *Lightsail) UpdateDomainEntry(input *UpdateDomainEntryInput) (*UpdateDomainEntryOutput, error) { - req, out := c.UpdateDomainEntryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp +func (c *Lightsail) GetStaticIp(input *GetStaticIpInput) (*GetStaticIpOutput, error) { + req, out := c.GetStaticIpRequest(input) return out, req.Send() } -// UpdateDomainEntryWithContext is the same as UpdateDomainEntry with the addition of +// GetStaticIpWithContext is the same as GetStaticIp with the addition of // the ability to pass a context and additional request options. // -// See UpdateDomainEntry for details on how to use this API operation. +// See GetStaticIp for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) UpdateDomainEntryWithContext(ctx aws.Context, input *UpdateDomainEntryInput, opts ...request.Option) (*UpdateDomainEntryOutput, error) { - req, out := c.UpdateDomainEntryRequest(input) +func (c *Lightsail) GetStaticIpWithContext(ctx aws.Context, input *GetStaticIpInput, opts ...request.Option) (*GetStaticIpOutput, error) { + req, out := c.GetStaticIpRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" +const opGetStaticIps = "GetStaticIps" -// UpdateLoadBalancerAttributeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLoadBalancerAttribute operation. The "output" return +// GetStaticIpsRequest generates a "aws/request.Request" representing the +// client's request for the GetStaticIps operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateLoadBalancerAttribute for more information on using the UpdateLoadBalancerAttribute +// See GetStaticIps for more information on using the GetStaticIps // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateLoadBalancerAttributeRequest method. -// req, resp := client.UpdateLoadBalancerAttributeRequest(params) +// // Example sending a request using the GetStaticIpsRequest method. +// req, resp := client.GetStaticIpsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute -func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancerAttributeInput) (req *request.Request, output *UpdateLoadBalancerAttributeOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps +func (c *Lightsail) GetStaticIpsRequest(input *GetStaticIpsInput) (req *request.Request, output *GetStaticIpsOutput) { op := &request.Operation{ - Name: opUpdateLoadBalancerAttribute, + Name: opGetStaticIps, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateLoadBalancerAttributeInput{} + input = &GetStaticIpsInput{} } - output = &UpdateLoadBalancerAttributeOutput{} + output = &GetStaticIpsOutput{} req = c.newRequest(op, input, output) return } -// UpdateLoadBalancerAttribute API operation for Amazon Lightsail. +// GetStaticIps API operation for Amazon Lightsail. // -// Updates the specified attribute for a load balancer. You can only update -// one attribute at a time. +// Returns information about all static IPs in the user's account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation UpdateLoadBalancerAttribute for usage and error information. +// API operation GetStaticIps for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7472,52 +8014,4119 @@ func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancer // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute -func (c *Lightsail) UpdateLoadBalancerAttribute(input *UpdateLoadBalancerAttributeInput) (*UpdateLoadBalancerAttributeOutput, error) { - req, out := c.UpdateLoadBalancerAttributeRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps +func (c *Lightsail) GetStaticIps(input *GetStaticIpsInput) (*GetStaticIpsOutput, error) { + req, out := c.GetStaticIpsRequest(input) return out, req.Send() } -// UpdateLoadBalancerAttributeWithContext is the same as UpdateLoadBalancerAttribute with the addition of +// GetStaticIpsWithContext is the same as GetStaticIps with the addition of // the ability to pass a context and additional request options. // -// See UpdateLoadBalancerAttribute for details on how to use this API operation. +// See GetStaticIps for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Lightsail) UpdateLoadBalancerAttributeWithContext(ctx aws.Context, input *UpdateLoadBalancerAttributeInput, opts ...request.Option) (*UpdateLoadBalancerAttributeOutput, error) { - req, out := c.UpdateLoadBalancerAttributeRequest(input) +func (c *Lightsail) GetStaticIpsWithContext(ctx aws.Context, input *GetStaticIpsInput, opts ...request.Option) (*GetStaticIpsOutput, error) { + req, out := c.GetStaticIpsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opImportKeyPair = "ImportKeyPair" + +// ImportKeyPairRequest generates a "aws/request.Request" representing the +// client's request for the ImportKeyPair operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ImportKeyPair for more information on using the ImportKeyPair +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ImportKeyPairRequest method. +// req, resp := client.ImportKeyPairRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair +func (c *Lightsail) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) { + op := &request.Operation{ + Name: opImportKeyPair, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportKeyPairInput{} + } + + output = &ImportKeyPairOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportKeyPair API operation for Amazon Lightsail. +// +// Imports a public SSH key from a specific key pair. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation ImportKeyPair for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair +func (c *Lightsail) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) { + req, out := c.ImportKeyPairRequest(input) + return out, req.Send() +} + +// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of +// the ability to pass a context and additional request options. +// +// See ImportKeyPair for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) { + req, out := c.ImportKeyPairRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opIsVpcPeered = "IsVpcPeered" + +// IsVpcPeeredRequest generates a "aws/request.Request" representing the +// client's request for the IsVpcPeered operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See IsVpcPeered for more information on using the IsVpcPeered +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the IsVpcPeeredRequest method. +// req, resp := client.IsVpcPeeredRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered +func (c *Lightsail) IsVpcPeeredRequest(input *IsVpcPeeredInput) (req *request.Request, output *IsVpcPeeredOutput) { + op := &request.Operation{ + Name: opIsVpcPeered, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IsVpcPeeredInput{} + } + + output = &IsVpcPeeredOutput{} + req = c.newRequest(op, input, output) + return +} + +// IsVpcPeered API operation for Amazon Lightsail. +// +// Returns a Boolean value indicating whether your Lightsail VPC is peered. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation IsVpcPeered for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered +func (c *Lightsail) IsVpcPeered(input *IsVpcPeeredInput) (*IsVpcPeeredOutput, error) { + req, out := c.IsVpcPeeredRequest(input) + return out, req.Send() +} + +// IsVpcPeeredWithContext is the same as IsVpcPeered with the addition of +// the ability to pass a context and additional request options. +// +// See IsVpcPeered for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) IsVpcPeeredWithContext(ctx aws.Context, input *IsVpcPeeredInput, opts ...request.Option) (*IsVpcPeeredOutput, error) { + req, out := c.IsVpcPeeredRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -type AllocateStaticIpInput struct { +const opOpenInstancePublicPorts = "OpenInstancePublicPorts" + +// OpenInstancePublicPortsRequest generates a "aws/request.Request" representing the +// client's request for the OpenInstancePublicPorts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See OpenInstancePublicPorts for more information on using the OpenInstancePublicPorts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the OpenInstancePublicPortsRequest method. +// req, resp := client.OpenInstancePublicPortsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts +func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPortsInput) (req *request.Request, output *OpenInstancePublicPortsOutput) { + op := &request.Operation{ + Name: opOpenInstancePublicPorts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &OpenInstancePublicPortsInput{} + } + + output = &OpenInstancePublicPortsOutput{} + req = c.newRequest(op, input, output) + return +} + +// OpenInstancePublicPorts API operation for Amazon Lightsail. +// +// Adds public ports to an Amazon Lightsail instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation OpenInstancePublicPorts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts +func (c *Lightsail) OpenInstancePublicPorts(input *OpenInstancePublicPortsInput) (*OpenInstancePublicPortsOutput, error) { + req, out := c.OpenInstancePublicPortsRequest(input) + return out, req.Send() +} + +// OpenInstancePublicPortsWithContext is the same as OpenInstancePublicPorts with the addition of +// the ability to pass a context and additional request options. +// +// See OpenInstancePublicPorts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) OpenInstancePublicPortsWithContext(ctx aws.Context, input *OpenInstancePublicPortsInput, opts ...request.Option) (*OpenInstancePublicPortsOutput, error) { + req, out := c.OpenInstancePublicPortsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPeerVpc = "PeerVpc" + +// PeerVpcRequest generates a "aws/request.Request" representing the +// client's request for the PeerVpc operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PeerVpc for more information on using the PeerVpc +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PeerVpcRequest method. +// req, resp := client.PeerVpcRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc +func (c *Lightsail) PeerVpcRequest(input *PeerVpcInput) (req *request.Request, output *PeerVpcOutput) { + op := &request.Operation{ + Name: opPeerVpc, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PeerVpcInput{} + } + + output = &PeerVpcOutput{} + req = c.newRequest(op, input, output) + return +} + +// PeerVpc API operation for Amazon Lightsail. +// +// Tries to peer the Lightsail VPC with the user's default VPC. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation PeerVpc for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc +func (c *Lightsail) PeerVpc(input *PeerVpcInput) (*PeerVpcOutput, error) { + req, out := c.PeerVpcRequest(input) + return out, req.Send() +} + +// PeerVpcWithContext is the same as PeerVpc with the addition of +// the ability to pass a context and additional request options. +// +// See PeerVpc for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) PeerVpcWithContext(ctx aws.Context, input *PeerVpcInput, opts ...request.Option) (*PeerVpcOutput, error) { + req, out := c.PeerVpcRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutInstancePublicPorts = "PutInstancePublicPorts" + +// PutInstancePublicPortsRequest generates a "aws/request.Request" representing the +// client's request for the PutInstancePublicPorts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutInstancePublicPorts for more information on using the PutInstancePublicPorts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutInstancePublicPortsRequest method. +// req, resp := client.PutInstancePublicPortsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts +func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsInput) (req *request.Request, output *PutInstancePublicPortsOutput) { + op := &request.Operation{ + Name: opPutInstancePublicPorts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutInstancePublicPortsInput{} + } + + output = &PutInstancePublicPortsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutInstancePublicPorts API operation for Amazon Lightsail. +// +// Sets the specified open ports for an Amazon Lightsail instance, and closes +// all ports for every protocol not included in the current request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation PutInstancePublicPorts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts +func (c *Lightsail) PutInstancePublicPorts(input *PutInstancePublicPortsInput) (*PutInstancePublicPortsOutput, error) { + req, out := c.PutInstancePublicPortsRequest(input) + return out, req.Send() +} + +// PutInstancePublicPortsWithContext is the same as PutInstancePublicPorts with the addition of +// the ability to pass a context and additional request options. +// +// See PutInstancePublicPorts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) PutInstancePublicPortsWithContext(ctx aws.Context, input *PutInstancePublicPortsInput, opts ...request.Option) (*PutInstancePublicPortsOutput, error) { + req, out := c.PutInstancePublicPortsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootInstance = "RebootInstance" + +// RebootInstanceRequest generates a "aws/request.Request" representing the +// client's request for the RebootInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RebootInstance for more information on using the RebootInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RebootInstanceRequest method. +// req, resp := client.RebootInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance +func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *request.Request, output *RebootInstanceOutput) { + op := &request.Operation{ + Name: opRebootInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootInstanceInput{} + } + + output = &RebootInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootInstance API operation for Amazon Lightsail. +// +// Restarts a specific instance. When your Amazon Lightsail instance is finished +// rebooting, Lightsail assigns a new public IP address. To use the same IP +// address after restarting, create a static IP address and attach it to the +// instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation RebootInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance +func (c *Lightsail) RebootInstance(input *RebootInstanceInput) (*RebootInstanceOutput, error) { + req, out := c.RebootInstanceRequest(input) + return out, req.Send() +} + +// RebootInstanceWithContext is the same as RebootInstance with the addition of +// the ability to pass a context and additional request options. +// +// See RebootInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) RebootInstanceWithContext(ctx aws.Context, input *RebootInstanceInput, opts ...request.Option) (*RebootInstanceOutput, error) { + req, out := c.RebootInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootRelationalDatabase = "RebootRelationalDatabase" + +// RebootRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the RebootRelationalDatabase operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RebootRelationalDatabase for more information on using the RebootRelationalDatabase +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RebootRelationalDatabaseRequest method. +// req, resp := client.RebootRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootRelationalDatabase +func (c *Lightsail) RebootRelationalDatabaseRequest(input *RebootRelationalDatabaseInput) (req *request.Request, output *RebootRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opRebootRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootRelationalDatabaseInput{} + } + + output = &RebootRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootRelationalDatabase API operation for Amazon Lightsail. +// +// Restarts a specific database in Amazon Lightsail. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation RebootRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootRelationalDatabase +func (c *Lightsail) RebootRelationalDatabase(input *RebootRelationalDatabaseInput) (*RebootRelationalDatabaseOutput, error) { + req, out := c.RebootRelationalDatabaseRequest(input) + return out, req.Send() +} + +// RebootRelationalDatabaseWithContext is the same as RebootRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See RebootRelationalDatabase for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) RebootRelationalDatabaseWithContext(ctx aws.Context, input *RebootRelationalDatabaseInput, opts ...request.Option) (*RebootRelationalDatabaseOutput, error) { + req, out := c.RebootRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opReleaseStaticIp = "ReleaseStaticIp" + +// ReleaseStaticIpRequest generates a "aws/request.Request" representing the +// client's request for the ReleaseStaticIp operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ReleaseStaticIp for more information on using the ReleaseStaticIp +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ReleaseStaticIpRequest method. +// req, resp := client.ReleaseStaticIpRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp +func (c *Lightsail) ReleaseStaticIpRequest(input *ReleaseStaticIpInput) (req *request.Request, output *ReleaseStaticIpOutput) { + op := &request.Operation{ + Name: opReleaseStaticIp, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ReleaseStaticIpInput{} + } + + output = &ReleaseStaticIpOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReleaseStaticIp API operation for Amazon Lightsail. +// +// Deletes a specific static IP from your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation ReleaseStaticIp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp +func (c *Lightsail) ReleaseStaticIp(input *ReleaseStaticIpInput) (*ReleaseStaticIpOutput, error) { + req, out := c.ReleaseStaticIpRequest(input) + return out, req.Send() +} + +// ReleaseStaticIpWithContext is the same as ReleaseStaticIp with the addition of +// the ability to pass a context and additional request options. +// +// See ReleaseStaticIp for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) ReleaseStaticIpWithContext(ctx aws.Context, input *ReleaseStaticIpInput, opts ...request.Option) (*ReleaseStaticIpOutput, error) { + req, out := c.ReleaseStaticIpRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartInstance = "StartInstance" + +// StartInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StartInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartInstance for more information on using the StartInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartInstanceRequest method. +// req, resp := client.StartInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance +func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *request.Request, output *StartInstanceOutput) { + op := &request.Operation{ + Name: opStartInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartInstanceInput{} + } + + output = &StartInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartInstance API operation for Amazon Lightsail. +// +// Starts a specific Amazon Lightsail instance from a stopped state. To restart +// an instance, use the reboot instance operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation StartInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance +func (c *Lightsail) StartInstance(input *StartInstanceInput) (*StartInstanceOutput, error) { + req, out := c.StartInstanceRequest(input) + return out, req.Send() +} + +// StartInstanceWithContext is the same as StartInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StartInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) StartInstanceWithContext(ctx aws.Context, input *StartInstanceInput, opts ...request.Option) (*StartInstanceOutput, error) { + req, out := c.StartInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartRelationalDatabase = "StartRelationalDatabase" + +// StartRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the StartRelationalDatabase operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartRelationalDatabase for more information on using the StartRelationalDatabase +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartRelationalDatabaseRequest method. +// req, resp := client.StartRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartRelationalDatabase +func (c *Lightsail) StartRelationalDatabaseRequest(input *StartRelationalDatabaseInput) (req *request.Request, output *StartRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opStartRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartRelationalDatabaseInput{} + } + + output = &StartRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartRelationalDatabase API operation for Amazon Lightsail. +// +// Starts a specific database from a stopped state in Amazon Lightsail. To restart +// a database, use the reboot relational database operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation StartRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartRelationalDatabase +func (c *Lightsail) StartRelationalDatabase(input *StartRelationalDatabaseInput) (*StartRelationalDatabaseOutput, error) { + req, out := c.StartRelationalDatabaseRequest(input) + return out, req.Send() +} + +// StartRelationalDatabaseWithContext is the same as StartRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See StartRelationalDatabase for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) StartRelationalDatabaseWithContext(ctx aws.Context, input *StartRelationalDatabaseInput, opts ...request.Option) (*StartRelationalDatabaseOutput, error) { + req, out := c.StartRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopInstance = "StopInstance" + +// StopInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StopInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopInstance for more information on using the StopInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopInstanceRequest method. +// req, resp := client.StopInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance +func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request.Request, output *StopInstanceOutput) { + op := &request.Operation{ + Name: opStopInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopInstanceInput{} + } + + output = &StopInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopInstance API operation for Amazon Lightsail. +// +// Stops a specific Amazon Lightsail instance that is currently running. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation StopInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance +func (c *Lightsail) StopInstance(input *StopInstanceInput) (*StopInstanceOutput, error) { + req, out := c.StopInstanceRequest(input) + return out, req.Send() +} + +// StopInstanceWithContext is the same as StopInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StopInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) StopInstanceWithContext(ctx aws.Context, input *StopInstanceInput, opts ...request.Option) (*StopInstanceOutput, error) { + req, out := c.StopInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopRelationalDatabase = "StopRelationalDatabase" + +// StopRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the StopRelationalDatabase operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopRelationalDatabase for more information on using the StopRelationalDatabase +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopRelationalDatabaseRequest method. +// req, resp := client.StopRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopRelationalDatabase +func (c *Lightsail) StopRelationalDatabaseRequest(input *StopRelationalDatabaseInput) (req *request.Request, output *StopRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opStopRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopRelationalDatabaseInput{} + } + + output = &StopRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopRelationalDatabase API operation for Amazon Lightsail. +// +// Stops a specific database that is currently running in Amazon Lightsail. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation StopRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopRelationalDatabase +func (c *Lightsail) StopRelationalDatabase(input *StopRelationalDatabaseInput) (*StopRelationalDatabaseOutput, error) { + req, out := c.StopRelationalDatabaseRequest(input) + return out, req.Send() +} + +// StopRelationalDatabaseWithContext is the same as StopRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See StopRelationalDatabase for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) StopRelationalDatabaseWithContext(ctx aws.Context, input *StopRelationalDatabaseInput, opts ...request.Option) (*StopRelationalDatabaseOutput, error) { + req, out := c.StopRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUnpeerVpc = "UnpeerVpc" + +// UnpeerVpcRequest generates a "aws/request.Request" representing the +// client's request for the UnpeerVpc operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UnpeerVpc for more information on using the UnpeerVpc +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UnpeerVpcRequest method. +// req, resp := client.UnpeerVpcRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc +func (c *Lightsail) UnpeerVpcRequest(input *UnpeerVpcInput) (req *request.Request, output *UnpeerVpcOutput) { + op := &request.Operation{ + Name: opUnpeerVpc, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UnpeerVpcInput{} + } + + output = &UnpeerVpcOutput{} + req = c.newRequest(op, input, output) + return +} + +// UnpeerVpc API operation for Amazon Lightsail. +// +// Attempts to unpeer the Lightsail VPC from the user's default VPC. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation UnpeerVpc for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc +func (c *Lightsail) UnpeerVpc(input *UnpeerVpcInput) (*UnpeerVpcOutput, error) { + req, out := c.UnpeerVpcRequest(input) + return out, req.Send() +} + +// UnpeerVpcWithContext is the same as UnpeerVpc with the addition of +// the ability to pass a context and additional request options. +// +// See UnpeerVpc for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) UnpeerVpcWithContext(ctx aws.Context, input *UnpeerVpcInput, opts ...request.Option) (*UnpeerVpcOutput, error) { + req, out := c.UnpeerVpcRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDomainEntry = "UpdateDomainEntry" + +// UpdateDomainEntryRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDomainEntry operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDomainEntry for more information on using the UpdateDomainEntry +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDomainEntryRequest method. +// req, resp := client.UpdateDomainEntryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry +func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req *request.Request, output *UpdateDomainEntryOutput) { + op := &request.Operation{ + Name: opUpdateDomainEntry, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDomainEntryInput{} + } + + output = &UpdateDomainEntryOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDomainEntry API operation for Amazon Lightsail. +// +// Updates a domain recordset after it is created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation UpdateDomainEntry for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry +func (c *Lightsail) UpdateDomainEntry(input *UpdateDomainEntryInput) (*UpdateDomainEntryOutput, error) { + req, out := c.UpdateDomainEntryRequest(input) + return out, req.Send() +} + +// UpdateDomainEntryWithContext is the same as UpdateDomainEntry with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDomainEntry for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) UpdateDomainEntryWithContext(ctx aws.Context, input *UpdateDomainEntryInput, opts ...request.Option) (*UpdateDomainEntryOutput, error) { + req, out := c.UpdateDomainEntryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" + +// UpdateLoadBalancerAttributeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLoadBalancerAttribute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateLoadBalancerAttribute for more information on using the UpdateLoadBalancerAttribute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateLoadBalancerAttributeRequest method. +// req, resp := client.UpdateLoadBalancerAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute +func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancerAttributeInput) (req *request.Request, output *UpdateLoadBalancerAttributeOutput) { + op := &request.Operation{ + Name: opUpdateLoadBalancerAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateLoadBalancerAttributeInput{} + } + + output = &UpdateLoadBalancerAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateLoadBalancerAttribute API operation for Amazon Lightsail. +// +// Updates the specified attribute for a load balancer. You can only update +// one attribute at a time. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation UpdateLoadBalancerAttribute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute +func (c *Lightsail) UpdateLoadBalancerAttribute(input *UpdateLoadBalancerAttributeInput) (*UpdateLoadBalancerAttributeOutput, error) { + req, out := c.UpdateLoadBalancerAttributeRequest(input) + return out, req.Send() +} + +// UpdateLoadBalancerAttributeWithContext is the same as UpdateLoadBalancerAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLoadBalancerAttribute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) UpdateLoadBalancerAttributeWithContext(ctx aws.Context, input *UpdateLoadBalancerAttributeInput, opts ...request.Option) (*UpdateLoadBalancerAttributeOutput, error) { + req, out := c.UpdateLoadBalancerAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRelationalDatabase = "UpdateRelationalDatabase" + +// UpdateRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRelationalDatabase operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRelationalDatabase for more information on using the UpdateRelationalDatabase +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRelationalDatabaseRequest method. +// req, resp := client.UpdateRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabase +func (c *Lightsail) UpdateRelationalDatabaseRequest(input *UpdateRelationalDatabaseInput) (req *request.Request, output *UpdateRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opUpdateRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRelationalDatabaseInput{} + } + + output = &UpdateRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRelationalDatabase API operation for Amazon Lightsail. +// +// Allows the update of one or more attributes of a database in Amazon Lightsail. +// +// Updates are applied immediately, or in cases where the updates could result +// in an outage, are applied during the database's predefined maintenance window. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation UpdateRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabase +func (c *Lightsail) UpdateRelationalDatabase(input *UpdateRelationalDatabaseInput) (*UpdateRelationalDatabaseOutput, error) { + req, out := c.UpdateRelationalDatabaseRequest(input) + return out, req.Send() +} + +// UpdateRelationalDatabaseWithContext is the same as UpdateRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRelationalDatabase for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) UpdateRelationalDatabaseWithContext(ctx aws.Context, input *UpdateRelationalDatabaseInput, opts ...request.Option) (*UpdateRelationalDatabaseOutput, error) { + req, out := c.UpdateRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRelationalDatabaseParameters = "UpdateRelationalDatabaseParameters" + +// UpdateRelationalDatabaseParametersRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRelationalDatabaseParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRelationalDatabaseParameters for more information on using the UpdateRelationalDatabaseParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRelationalDatabaseParametersRequest method. +// req, resp := client.UpdateRelationalDatabaseParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabaseParameters +func (c *Lightsail) UpdateRelationalDatabaseParametersRequest(input *UpdateRelationalDatabaseParametersInput) (req *request.Request, output *UpdateRelationalDatabaseParametersOutput) { + op := &request.Operation{ + Name: opUpdateRelationalDatabaseParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRelationalDatabaseParametersInput{} + } + + output = &UpdateRelationalDatabaseParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRelationalDatabaseParameters API operation for Amazon Lightsail. +// +// Allows the update of one or more parameters of a database in Amazon Lightsail. +// +// Parameter updates don't cause outages; therefore, their application is not +// subject to the preferred maintenance window. However, there are two ways +// in which paramater updates are applied: dynamic or pending-reboot. Parameters +// marked with a dynamic apply type are applied immediately. Parameters marked +// with a pending-reboot apply type are applied only after the database is rebooted +// using the reboot relational database operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Lightsail's +// API operation UpdateRelationalDatabaseParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabaseParameters +func (c *Lightsail) UpdateRelationalDatabaseParameters(input *UpdateRelationalDatabaseParametersInput) (*UpdateRelationalDatabaseParametersOutput, error) { + req, out := c.UpdateRelationalDatabaseParametersRequest(input) + return out, req.Send() +} + +// UpdateRelationalDatabaseParametersWithContext is the same as UpdateRelationalDatabaseParameters with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRelationalDatabaseParameters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Lightsail) UpdateRelationalDatabaseParametersWithContext(ctx aws.Context, input *UpdateRelationalDatabaseParametersInput, opts ...request.Option) (*UpdateRelationalDatabaseParametersOutput, error) { + req, out := c.UpdateRelationalDatabaseParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AllocateStaticIpInput struct { + _ struct{} `type:"structure"` + + // The name of the static IP address. + // + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AllocateStaticIpInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateStaticIpInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllocateStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllocateStaticIpInput"} + if s.StaticIpName == nil { + invalidParams.Add(request.NewErrParamRequired("StaticIpName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStaticIpName sets the StaticIpName field's value. +func (s *AllocateStaticIpInput) SetStaticIpName(v string) *AllocateStaticIpInput { + s.StaticIpName = &v + return s +} + +type AllocateStaticIpOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the static IP address + // you allocated. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AllocateStaticIpOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateStaticIpOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AllocateStaticIpOutput) SetOperations(v []*Operation) *AllocateStaticIpOutput { + s.Operations = v + return s +} + +type AttachDiskInput struct { + _ struct{} `type:"structure"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The disk path to expose to the instance (e.g., /dev/xvdf). + // + // DiskPath is a required field + DiskPath *string `locationName:"diskPath" type:"string" required:"true"` + + // The name of the Lightsail instance where you want to utilize the storage + // disk. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskPath == nil { + invalidParams.Add(request.NewErrParamRequired("DiskPath")) + } + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *AttachDiskInput) SetDiskName(v string) *AttachDiskInput { + s.DiskName = &v + return s +} + +// SetDiskPath sets the DiskPath field's value. +func (s *AttachDiskInput) SetDiskPath(v string) *AttachDiskInput { + s.DiskPath = &v + return s +} + +// SetInstanceName sets the InstanceName field's value. +func (s *AttachDiskInput) SetInstanceName(v string) *AttachDiskInput { + s.InstanceName = &v + return s +} + +type AttachDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachDiskOutput) SetOperations(v []*Operation) *AttachDiskOutput { + s.Operations = v + return s +} + +type AttachInstancesToLoadBalancerInput struct { + _ struct{} `type:"structure"` + + // An array of strings representing the instance name(s) you want to attach + // to your load balancer. + // + // An instance must be running before you can attach it to your load balancer. + // + // There are no additional limits on the number of instances you can attach + // to your load balancer, aside from the limit of Lightsail instances you can + // create in your account (20). + // + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + + // The name of the load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachInstancesToLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInstancesToLoadBalancerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachInstancesToLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachInstancesToLoadBalancerInput"} + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceNames sets the InstanceNames field's value. +func (s *AttachInstancesToLoadBalancerInput) SetInstanceNames(v []*string) *AttachInstancesToLoadBalancerInput { + s.InstanceNames = v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *AttachInstancesToLoadBalancerInput) SetLoadBalancerName(v string) *AttachInstancesToLoadBalancerInput { + s.LoadBalancerName = &v + return s +} + +type AttachInstancesToLoadBalancerOutput struct { + _ struct{} `type:"structure"` + + // An object representing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachInstancesToLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInstancesToLoadBalancerOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachInstancesToLoadBalancerOutput) SetOperations(v []*Operation) *AttachInstancesToLoadBalancerOutput { + s.Operations = v + return s +} + +type AttachLoadBalancerTlsCertificateInput struct { + _ struct{} `type:"structure"` + + // The name of your SSL/TLS certificate. + // + // CertificateName is a required field + CertificateName *string `locationName:"certificateName" type:"string" required:"true"` + + // The name of the load balancer to which you want to associate the SSL/TLS + // certificate. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachLoadBalancerTlsCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancerTlsCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachLoadBalancerTlsCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTlsCertificateInput"} + if s.CertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateName")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateName sets the CertificateName field's value. +func (s *AttachLoadBalancerTlsCertificateInput) SetCertificateName(v string) *AttachLoadBalancerTlsCertificateInput { + s.CertificateName = &v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *AttachLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *AttachLoadBalancerTlsCertificateInput { + s.LoadBalancerName = &v + return s +} + +type AttachLoadBalancerTlsCertificateOutput struct { + _ struct{} `type:"structure"` + + // An object representing the API operations. + // + // These SSL/TLS certificates are only usable by Lightsail load balancers. You + // can't get the certificate and use it for another purpose. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachLoadBalancerTlsCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancerTlsCertificateOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *AttachLoadBalancerTlsCertificateOutput { + s.Operations = v + return s +} + +type AttachStaticIpInput struct { + _ struct{} `type:"structure"` + + // The instance name to which you want to attach the static IP address. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // The name of the static IP. + // + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachStaticIpInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachStaticIpInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachStaticIpInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.StaticIpName == nil { + invalidParams.Add(request.NewErrParamRequired("StaticIpName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *AttachStaticIpInput) SetInstanceName(v string) *AttachStaticIpInput { + s.InstanceName = &v + return s +} + +// SetStaticIpName sets the StaticIpName field's value. +func (s *AttachStaticIpInput) SetStaticIpName(v string) *AttachStaticIpInput { + s.StaticIpName = &v + return s +} + +type AttachStaticIpOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about your API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachStaticIpOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachStaticIpOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachStaticIpOutput) SetOperations(v []*Operation) *AttachStaticIpOutput { + s.Operations = v + return s +} + +// Describes an Availability Zone. +type AvailabilityZone struct { + _ struct{} `type:"structure"` + + // The state of the Availability Zone. + State *string `locationName:"state" type:"string"` + + // The name of the Availability Zone. The format is us-east-2a (case-sensitive). + ZoneName *string `locationName:"zoneName" type:"string"` +} + +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *AvailabilityZone) SetState(v string) *AvailabilityZone { + s.State = &v + return s +} + +// SetZoneName sets the ZoneName field's value. +func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { + s.ZoneName = &v + return s +} + +// Describes a blueprint (a virtual private server image). +type Blueprint struct { + _ struct{} `type:"structure"` + + // The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). + BlueprintId *string `locationName:"blueprintId" type:"string"` + + // The description of the blueprint. + Description *string `locationName:"description" type:"string"` + + // The group name of the blueprint (e.g., amazon-linux). + Group *string `locationName:"group" type:"string"` + + // A Boolean value indicating whether the blueprint is active. Inactive blueprints + // are listed to support customers with existing instances but are not necessarily + // available for launch of new instances. Blueprints are marked inactive when + // they become outdated due to operating system updates or new application releases. + IsActive *bool `locationName:"isActive" type:"boolean"` + + // The end-user license agreement URL for the image or blueprint. + LicenseUrl *string `locationName:"licenseUrl" type:"string"` + + // The minimum bundle power required to run this blueprint. For example, you + // need a bundle with a power value of 500 or more to create an instance that + // uses a blueprint with a minimum power value of 500. 0 indicates that the + // blueprint runs on all instance sizes. + MinPower *int64 `locationName:"minPower" type:"integer"` + + // The friendly name of the blueprint (e.g., Amazon Linux). + Name *string `locationName:"name" type:"string"` + + // The operating system platform (either Linux/Unix-based or Windows Server-based) + // of the blueprint. + Platform *string `locationName:"platform" type:"string" enum:"InstancePlatform"` + + // The product URL to learn more about the image or blueprint. + ProductUrl *string `locationName:"productUrl" type:"string"` + + // The type of the blueprint (e.g., os or app). + Type *string `locationName:"type" type:"string" enum:"BlueprintType"` + + // The version number of the operating system, application, or stack (e.g., + // 2016.03.0). + Version *string `locationName:"version" type:"string"` + + // The version code. + VersionCode *string `locationName:"versionCode" type:"string"` +} + +// String returns the string representation +func (s Blueprint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Blueprint) GoString() string { + return s.String() +} + +// SetBlueprintId sets the BlueprintId field's value. +func (s *Blueprint) SetBlueprintId(v string) *Blueprint { + s.BlueprintId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Blueprint) SetDescription(v string) *Blueprint { + s.Description = &v + return s +} + +// SetGroup sets the Group field's value. +func (s *Blueprint) SetGroup(v string) *Blueprint { + s.Group = &v + return s +} + +// SetIsActive sets the IsActive field's value. +func (s *Blueprint) SetIsActive(v bool) *Blueprint { + s.IsActive = &v + return s +} + +// SetLicenseUrl sets the LicenseUrl field's value. +func (s *Blueprint) SetLicenseUrl(v string) *Blueprint { + s.LicenseUrl = &v + return s +} + +// SetMinPower sets the MinPower field's value. +func (s *Blueprint) SetMinPower(v int64) *Blueprint { + s.MinPower = &v + return s +} + +// SetName sets the Name field's value. +func (s *Blueprint) SetName(v string) *Blueprint { + s.Name = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *Blueprint) SetPlatform(v string) *Blueprint { + s.Platform = &v + return s +} + +// SetProductUrl sets the ProductUrl field's value. +func (s *Blueprint) SetProductUrl(v string) *Blueprint { + s.ProductUrl = &v + return s +} + +// SetType sets the Type field's value. +func (s *Blueprint) SetType(v string) *Blueprint { + s.Type = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *Blueprint) SetVersion(v string) *Blueprint { + s.Version = &v + return s +} + +// SetVersionCode sets the VersionCode field's value. +func (s *Blueprint) SetVersionCode(v string) *Blueprint { + s.VersionCode = &v + return s +} + +// Describes a bundle, which is a set of specs describing your virtual private +// server (or instance). +type Bundle struct { + _ struct{} `type:"structure"` + + // The bundle ID (e.g., micro_1_0). + BundleId *string `locationName:"bundleId" type:"string"` + + // The number of vCPUs included in the bundle (e.g., 2). + CpuCount *int64 `locationName:"cpuCount" type:"integer"` + + // The size of the SSD (e.g., 30). + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` + + // The Amazon EC2 instance type (e.g., t2.micro). + InstanceType *string `locationName:"instanceType" type:"string"` + + // A Boolean value indicating whether the bundle is active. + IsActive *bool `locationName:"isActive" type:"boolean"` + + // A friendly name for the bundle (e.g., Micro). + Name *string `locationName:"name" type:"string"` + + // A numeric value that represents the power of the bundle (e.g., 500). You + // can use the bundle's power value in conjunction with a blueprint's minimum + // power value to determine whether the blueprint will run on the bundle. For + // example, you need a bundle with a power value of 500 or more to create an + // instance that uses a blueprint with a minimum power value of 500. + Power *int64 `locationName:"power" type:"integer"` + + // The price in US dollars (e.g., 5.0). + Price *float64 `locationName:"price" type:"float"` + + // The amount of RAM in GB (e.g., 2.0). + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` + + // The operating system platform (Linux/Unix-based or Windows Server-based) + // that the bundle supports. You can only launch a WINDOWS bundle on a blueprint + // that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX + // bundle. + SupportedPlatforms []*string `locationName:"supportedPlatforms" type:"list"` + + // The data transfer rate per month in GB (e.g., 2000). + TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` +} + +// String returns the string representation +func (s Bundle) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Bundle) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *Bundle) SetBundleId(v string) *Bundle { + s.BundleId = &v + return s +} + +// SetCpuCount sets the CpuCount field's value. +func (s *Bundle) SetCpuCount(v int64) *Bundle { + s.CpuCount = &v + return s +} + +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *Bundle) SetDiskSizeInGb(v int64) *Bundle { + s.DiskSizeInGb = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *Bundle) SetInstanceType(v string) *Bundle { + s.InstanceType = &v + return s +} + +// SetIsActive sets the IsActive field's value. +func (s *Bundle) SetIsActive(v bool) *Bundle { + s.IsActive = &v + return s +} + +// SetName sets the Name field's value. +func (s *Bundle) SetName(v string) *Bundle { + s.Name = &v + return s +} + +// SetPower sets the Power field's value. +func (s *Bundle) SetPower(v int64) *Bundle { + s.Power = &v + return s +} + +// SetPrice sets the Price field's value. +func (s *Bundle) SetPrice(v float64) *Bundle { + s.Price = &v + return s +} + +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *Bundle) SetRamSizeInGb(v float64) *Bundle { + s.RamSizeInGb = &v + return s +} + +// SetSupportedPlatforms sets the SupportedPlatforms field's value. +func (s *Bundle) SetSupportedPlatforms(v []*string) *Bundle { + s.SupportedPlatforms = v + return s +} + +// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. +func (s *Bundle) SetTransferPerMonthInGb(v int64) *Bundle { + s.TransferPerMonthInGb = &v + return s +} + +type CloseInstancePublicPortsInput struct { + _ struct{} `type:"structure"` + + // The name of the instance on which you're attempting to close the public ports. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // Information about the public port you are trying to close. + // + // PortInfo is a required field + PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CloseInstancePublicPortsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloseInstancePublicPortsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloseInstancePublicPortsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloseInstancePublicPortsInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.PortInfo == nil { + invalidParams.Add(request.NewErrParamRequired("PortInfo")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *CloseInstancePublicPortsInput) SetInstanceName(v string) *CloseInstancePublicPortsInput { + s.InstanceName = &v + return s +} + +// SetPortInfo sets the PortInfo field's value. +func (s *CloseInstancePublicPortsInput) SetPortInfo(v *PortInfo) *CloseInstancePublicPortsInput { + s.PortInfo = v + return s +} + +type CloseInstancePublicPortsOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs that contains information about the operation. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s CloseInstancePublicPortsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloseInstancePublicPortsOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *CloseInstancePublicPortsOutput) SetOperation(v *Operation) *CloseInstancePublicPortsOutput { + s.Operation = v + return s +} + +type CreateDiskFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you want to create the disk (e.g., us-east-2a). + // Choose the same Availability Zone as the Lightsail instance where you want + // to create the disk. + // + // Use the GetRegions operation to list the Availability Zones where Lightsail + // is currently available. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The name of the disk snapshot (e.g., my-snapshot) from which to create the + // new storage disk. + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + + // The size of the disk in GB (e.g., 32). + // + // SizeInGb is a required field + SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` +} + +// String returns the string representation +func (s CreateDiskFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskFromSnapshotInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + if s.SizeInGb == nil { + invalidParams.Add(request.NewErrParamRequired("SizeInGb")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDiskFromSnapshotInput) SetAvailabilityZone(v string) *CreateDiskFromSnapshotInput { + s.AvailabilityZone = &v + return s +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskFromSnapshotInput) SetDiskName(v string) *CreateDiskFromSnapshotInput { + s.DiskName = &v + return s +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *CreateDiskFromSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskFromSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *CreateDiskFromSnapshotInput) SetSizeInGb(v int64) *CreateDiskFromSnapshotInput { + s.SizeInGb = &v + return s +} + +type CreateDiskFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskFromSnapshotOutput) SetOperations(v []*Operation) *CreateDiskFromSnapshotOutput { + s.Operations = v + return s +} + +type CreateDiskInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you want to create the disk (e.g., us-east-2a). + // Choose the same Availability Zone as the Lightsail instance where you want + // to create the disk. + // + // Use the GetRegions operation to list the Availability Zones where Lightsail + // is currently available. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The size of the disk in GB (e.g., 32). + // + // SizeInGb is a required field + SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` +} + +// String returns the string representation +func (s CreateDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.SizeInGb == nil { + invalidParams.Add(request.NewErrParamRequired("SizeInGb")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDiskInput) SetAvailabilityZone(v string) *CreateDiskInput { + s.AvailabilityZone = &v + return s +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskInput) SetDiskName(v string) *CreateDiskInput { + s.DiskName = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *CreateDiskInput) SetSizeInGb(v int64) *CreateDiskInput { + s.SizeInGb = &v + return s +} + +type CreateDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskOutput) SetOperations(v []*Operation) *CreateDiskOutput { + s.Operations = v + return s +} + +type CreateDiskSnapshotInput struct { + _ struct{} `type:"structure"` + + // The unique name of the source disk (e.g., my-source-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The name of the destination disk snapshot (e.g., my-disk-snapshot) based + // on the source disk. + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDiskSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskSnapshotInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskSnapshotInput) SetDiskName(v string) *CreateDiskSnapshotInput { + s.DiskName = &v + return s +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +type CreateDiskSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskSnapshotOutput) SetOperations(v []*Operation) *CreateDiskSnapshotOutput { + s.Operations = v + return s +} + +type CreateDomainEntryInput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the domain entry + // request. + // + // DomainEntry is a required field + DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` + + // The domain name (e.g., example.com) for which you want to create the domain + // entry. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDomainEntryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainEntryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDomainEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDomainEntryInput"} + if s.DomainEntry == nil { + invalidParams.Add(request.NewErrParamRequired("DomainEntry")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainEntry sets the DomainEntry field's value. +func (s *CreateDomainEntryInput) SetDomainEntry(v *DomainEntry) *CreateDomainEntryInput { + s.DomainEntry = v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateDomainEntryInput) SetDomainName(v string) *CreateDomainEntryInput { + s.DomainName = &v + return s +} + +type CreateDomainEntryOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the operation. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s CreateDomainEntryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainEntryOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *CreateDomainEntryOutput) SetOperation(v *Operation) *CreateDomainEntryOutput { + s.Operation = v + return s +} + +type CreateDomainInput struct { + _ struct{} `type:"structure"` + + // The domain name to manage (e.g., example.com). + // + // You cannot register a new domain name using Lightsail. You must register + // a domain name using Amazon Route 53 or another domain name registrar. If + // you have already registered your domain, you can enter its name in this parameter + // to manage the DNS records for that domain. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { + s.DomainName = &v + return s +} + +type CreateDomainOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the domain resource + // you created. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s CreateDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *CreateDomainOutput) SetOperation(v *Operation) *CreateDomainOutput { + s.Operation = v + return s +} + +type CreateInstanceSnapshotInput struct { + _ struct{} `type:"structure"` + + // The Lightsail instance on which to base your snapshot. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // The name for your new snapshot. + // + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateInstanceSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstanceSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceSnapshotInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *CreateInstanceSnapshotInput) SetInstanceName(v string) *CreateInstanceSnapshotInput { + s.InstanceName = &v + return s +} + +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *CreateInstanceSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstanceSnapshotInput { + s.InstanceSnapshotName = &v + return s +} + +type CreateInstanceSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create instances snapshot request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateInstanceSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateInstanceSnapshotOutput) SetOperations(v []*Operation) *CreateInstanceSnapshotOutput { + s.Operations = v + return s +} + +type CreateInstancesFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // An object containing information about one or more disk mappings. + AttachedDiskMapping map[string][]*DiskMap `locationName:"attachedDiskMapping" type:"map"` + + // The Availability Zone where you want to create your instances. Use the following + // formatting: us-east-2a (case sensitive). You can get a list of Availability + // Zones by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) + // operation. Be sure to add the include Availability Zones parameter to your + // request. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The bundle of specification information for your virtual private server (or + // instance), including the pricing plan (e.g., micro_1_0). + // + // BundleId is a required field + BundleId *string `locationName:"bundleId" type:"string" required:"true"` + + // The names for your new instances. + // + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + + // The name of the instance snapshot on which you are basing your new instances. + // Use the get instance snapshots operation to return information about your + // existing snapshots. + // + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + + // The name for your key pair. + KeyPairName *string `locationName:"keyPairName" type:"string"` + + // You can create a launch script that configures a server with additional user + // data. For example, apt-get -y update. + // + // Depending on the machine image you choose, the command to get software on + // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu + // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide + // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). + UserData *string `locationName:"userData" type:"string"` +} + +// String returns the string representation +func (s CreateInstancesFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstancesFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstancesFromSnapshotInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.BundleId == nil { + invalidParams.Add(request.NewErrParamRequired("BundleId")) + } + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttachedDiskMapping sets the AttachedDiskMapping field's value. +func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput { + s.AttachedDiskMapping = v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateInstancesFromSnapshotInput) SetAvailabilityZone(v string) *CreateInstancesFromSnapshotInput { + s.AvailabilityZone = &v + return s +} + +// SetBundleId sets the BundleId field's value. +func (s *CreateInstancesFromSnapshotInput) SetBundleId(v string) *CreateInstancesFromSnapshotInput { + s.BundleId = &v + return s +} + +// SetInstanceNames sets the InstanceNames field's value. +func (s *CreateInstancesFromSnapshotInput) SetInstanceNames(v []*string) *CreateInstancesFromSnapshotInput { + s.InstanceNames = v + return s +} + +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *CreateInstancesFromSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstancesFromSnapshotInput { + s.InstanceSnapshotName = &v + return s +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *CreateInstancesFromSnapshotInput) SetKeyPairName(v string) *CreateInstancesFromSnapshotInput { + s.KeyPairName = &v + return s +} + +// SetUserData sets the UserData field's value. +func (s *CreateInstancesFromSnapshotInput) SetUserData(v string) *CreateInstancesFromSnapshotInput { + s.UserData = &v + return s +} + +type CreateInstancesFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create instances from snapshot request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateInstancesFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateInstancesFromSnapshotOutput) SetOperations(v []*Operation) *CreateInstancesFromSnapshotOutput { + s.Operations = v + return s +} + +type CreateInstancesInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create your instance. Use the following + // format: us-east-2a (case sensitive). You can get a list of Availability Zones + // by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) + // operation. Be sure to add the include Availability Zones parameter to your + // request. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). + // Use the get blueprints operation to return a list of available images (or + // blueprints). + // + // BlueprintId is a required field + BlueprintId *string `locationName:"blueprintId" type:"string" required:"true"` + + // The bundle of specification information for your virtual private server (or + // instance), including the pricing plan (e.g., micro_1_0). + // + // BundleId is a required field + BundleId *string `locationName:"bundleId" type:"string" required:"true"` + + // (Deprecated) The name for your custom image. + // + // In releases prior to June 12, 2017, this parameter was ignored by the API. + // It is now deprecated. + // + // Deprecated: CustomImageName has been deprecated + CustomImageName *string `locationName:"customImageName" deprecated:"true" type:"string"` + + // The names to use for your new Lightsail instances. Separate multiple values + // using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"] + // + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + + // The name of your key pair. + KeyPairName *string `locationName:"keyPairName" type:"string"` + + // A launch script you can create that configures a server with additional user + // data. For example, you might want to run apt-get -y update. + // + // Depending on the machine image you choose, the command to get software on + // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu + // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide + // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). + UserData *string `locationName:"userData" type:"string"` +} + +// String returns the string representation +func (s CreateInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstancesInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.BlueprintId == nil { + invalidParams.Add(request.NewErrParamRequired("BlueprintId")) + } + if s.BundleId == nil { + invalidParams.Add(request.NewErrParamRequired("BundleId")) + } + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateInstancesInput) SetAvailabilityZone(v string) *CreateInstancesInput { + s.AvailabilityZone = &v + return s +} + +// SetBlueprintId sets the BlueprintId field's value. +func (s *CreateInstancesInput) SetBlueprintId(v string) *CreateInstancesInput { + s.BlueprintId = &v + return s +} + +// SetBundleId sets the BundleId field's value. +func (s *CreateInstancesInput) SetBundleId(v string) *CreateInstancesInput { + s.BundleId = &v + return s +} + +// SetCustomImageName sets the CustomImageName field's value. +func (s *CreateInstancesInput) SetCustomImageName(v string) *CreateInstancesInput { + s.CustomImageName = &v + return s +} + +// SetInstanceNames sets the InstanceNames field's value. +func (s *CreateInstancesInput) SetInstanceNames(v []*string) *CreateInstancesInput { + s.InstanceNames = v + return s +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *CreateInstancesInput) SetKeyPairName(v string) *CreateInstancesInput { + s.KeyPairName = &v + return s +} + +// SetUserData sets the UserData field's value. +func (s *CreateInstancesInput) SetUserData(v string) *CreateInstancesInput { + s.UserData = &v + return s +} + +type CreateInstancesOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create instances request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateInstancesOutput) SetOperations(v []*Operation) *CreateInstancesOutput { + s.Operations = v + return s +} + +type CreateKeyPairInput struct { + _ struct{} `type:"structure"` + + // The name for your new key pair. + // + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateKeyPairInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *CreateKeyPairInput) SetKeyPairName(v string) *CreateKeyPairInput { + s.KeyPairName = &v + return s +} + +type CreateKeyPairOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the new key pair + // you just created. + KeyPair *KeyPair `locationName:"keyPair" type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create key pair request. + Operation *Operation `locationName:"operation" type:"structure"` + + // A base64-encoded RSA private key. + PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` + + // A base64-encoded public key of the ssh-rsa type. + PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` +} + +// String returns the string representation +func (s CreateKeyPairOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateKeyPairOutput) GoString() string { + return s.String() +} + +// SetKeyPair sets the KeyPair field's value. +func (s *CreateKeyPairOutput) SetKeyPair(v *KeyPair) *CreateKeyPairOutput { + s.KeyPair = v + return s +} + +// SetOperation sets the Operation field's value. +func (s *CreateKeyPairOutput) SetOperation(v *Operation) *CreateKeyPairOutput { + s.Operation = v + return s +} + +// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. +func (s *CreateKeyPairOutput) SetPrivateKeyBase64(v string) *CreateKeyPairOutput { + s.PrivateKeyBase64 = &v + return s +} + +// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. +func (s *CreateKeyPairOutput) SetPublicKeyBase64(v string) *CreateKeyPairOutput { + s.PublicKeyBase64 = &v + return s +} + +type CreateLoadBalancerInput struct { + _ struct{} `type:"structure"` + + // The optional alternative domains and subdomains to use with your SSL/TLS + // certificate (e.g., www.example.com, example.com, m.example.com, blog.example.com). + CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` + + // The domain name with which your certificate is associated (e.g., example.com). + // + // If you specify certificateDomainName, then certificateName is required (and + // vice-versa). + CertificateDomainName *string `locationName:"certificateDomainName" type:"string"` + + // The name of the SSL/TLS certificate. + // + // If you specify certificateName, then certificateDomainName is required (and + // vice-versa). + CertificateName *string `locationName:"certificateName" type:"string"` + + // The path you provided to perform the load balancer health check. If you didn't + // specify a health check path, Lightsail uses the root path of your website + // (e.g., "/"). + // + // You may want to specify a custom health check path other than the root of + // your application if your home page loads slowly or has a lot of media or + // scripting on it. + HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` + + // The instance port where you're creating your load balancer. + // + // InstancePort is a required field + InstancePort *int64 `locationName:"instancePort" type:"integer" required:"true"` + + // The name of your load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} + if s.InstancePort == nil { + invalidParams.Add(request.NewErrParamRequired("InstancePort")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. +func (s *CreateLoadBalancerInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerInput { + s.CertificateAlternativeNames = v + return s +} + +// SetCertificateDomainName sets the CertificateDomainName field's value. +func (s *CreateLoadBalancerInput) SetCertificateDomainName(v string) *CreateLoadBalancerInput { + s.CertificateDomainName = &v + return s +} + +// SetCertificateName sets the CertificateName field's value. +func (s *CreateLoadBalancerInput) SetCertificateName(v string) *CreateLoadBalancerInput { + s.CertificateName = &v + return s +} + +// SetHealthCheckPath sets the HealthCheckPath field's value. +func (s *CreateLoadBalancerInput) SetHealthCheckPath(v string) *CreateLoadBalancerInput { + s.HealthCheckPath = &v + return s +} + +// SetInstancePort sets the InstancePort field's value. +func (s *CreateLoadBalancerInput) SetInstancePort(v int64) *CreateLoadBalancerInput { + s.InstancePort = &v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalancerInput { + s.LoadBalancerName = &v + return s +} + +type CreateLoadBalancerOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateLoadBalancerOutput) SetOperations(v []*Operation) *CreateLoadBalancerOutput { + s.Operations = v + return s +} + +type CreateLoadBalancerTlsCertificateInput struct { + _ struct{} `type:"structure"` + + // An array of strings listing alternative domains and subdomains for your SSL/TLS + // certificate. Lightsail will de-dupe the names for you. You can have a maximum + // of 9 alternative names (in addition to the 1 primary domain). We do not support + // wildcards (e.g., *.example.com). + CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` + + // The domain name (e.g., example.com) for your SSL/TLS certificate. + // + // CertificateDomainName is a required field + CertificateDomainName *string `locationName:"certificateDomainName" type:"string" required:"true"` + + // The SSL/TLS certificate name. + // + // You can have up to 10 certificates in your account at one time. Each Lightsail + // load balancer can have up to 2 certificates associated with it at one time. + // There is also an overall limit to the number of certificates that can be + // issue in a 365-day period. For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). + // + // CertificateName is a required field + CertificateName *string `locationName:"certificateName" type:"string" required:"true"` + + // The load balancer name where you want to create the SSL/TLS certificate. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateLoadBalancerTlsCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerTlsCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoadBalancerTlsCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerTlsCertificateInput"} + if s.CertificateDomainName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateDomainName")) + } + if s.CertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateName")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerTlsCertificateInput { + s.CertificateAlternativeNames = v + return s +} + +// SetCertificateDomainName sets the CertificateDomainName field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateDomainName(v string) *CreateLoadBalancerTlsCertificateInput { + s.CertificateDomainName = &v + return s +} + +// SetCertificateName sets the CertificateName field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateName(v string) *CreateLoadBalancerTlsCertificateInput { + s.CertificateName = &v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *CreateLoadBalancerTlsCertificateInput { + s.LoadBalancerName = &v + return s +} + +type CreateLoadBalancerTlsCertificateOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateLoadBalancerTlsCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerTlsCertificateOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *CreateLoadBalancerTlsCertificateOutput { + s.Operations = v + return s +} + +type CreateRelationalDatabaseFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create your new database. Use the us-east-2a + // case-sensitive format. + // + // You can get a list of Availability Zones by using the get regions operation. + // Be sure to add the include relational database Availability Zones parameter + // to your request. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // Specifies the accessibility options for your new database. A value of true + // specifies a database that is available to resources outside of your Lightsail + // account. A value of false specifies a database that is available only to + // your Lightsail resources in the same region as your database. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` + + // The bundle ID for your new database. A bundle describes the performance specifications + // for your database. + // + // You can get a list of database bundle IDs by using the get relational database + // bundles operation. + // + // When creating a new database from a snapshot, you cannot choose a bundle + // that is smaller than the bundle of the source database. + RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string"` + + // The name to use for your new database. + // + // Constraints: + // + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The name of the database snapshot from which to create your new database. + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string"` + + // The date and time to restore your database from. + // + // Constraints: + // + // * Must be before the latest restorable time for the database. + // + // * Cannot be specified if the use latest restorable time parameter is true. + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use a restore time of October 1, 2018, at 8 PM + // UTC, then you input 1538424000 as the restore time. + RestoreTime *time.Time `locationName:"restoreTime" type:"timestamp"` + + // The name of the source database. + SourceRelationalDatabaseName *string `locationName:"sourceRelationalDatabaseName" type:"string"` + + // Specifies whether your database is restored from the latest backup time. + // A value of true restores from the latest backup time. + // + // Default: false + // + // Constraints: Cannot be specified if the restore time parameter is provided. + UseLatestRestorableTime *bool `locationName:"useLatestRestorableTime" type:"boolean"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRelationalDatabaseFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseFromSnapshotInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetAvailabilityZone(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.AvailabilityZone = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetPubliclyAccessible(v bool) *CreateRelationalDatabaseFromSnapshotInput { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseBundleId(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.RelationalDatabaseBundleId = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.RelationalDatabaseName = &v + return s +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +// SetRestoreTime sets the RestoreTime field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRestoreTime(v time.Time) *CreateRelationalDatabaseFromSnapshotInput { + s.RestoreTime = &v + return s +} + +// SetSourceRelationalDatabaseName sets the SourceRelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetSourceRelationalDatabaseName(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.SourceRelationalDatabaseName = &v + return s +} + +// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetUseLatestRestorableTime(v bool) *CreateRelationalDatabaseFromSnapshotInput { + s.UseLatestRestorableTime = &v + return s +} + +type CreateRelationalDatabaseFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your create relational database from snapshot + // request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateRelationalDatabaseFromSnapshotOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseFromSnapshotOutput { + s.Operations = v + return s +} + +type CreateRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create your new database. Use the us-east-2a + // case-sensitive format. + // + // You can get a list of Availability Zones by using the get regions operation. + // Be sure to add the include relational database Availability Zones parameter + // to your request. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The name of the master database created when the Lightsail database resource + // is created. + // + // Constraints: + // + // * Must contain from 1 to 64 alphanumeric characters. + // + // * Cannot be a word reserved by the specified database engine + // + // MasterDatabaseName is a required field + MasterDatabaseName *string `locationName:"masterDatabaseName" type:"string" required:"true"` + + // The password for the master user of your new database. The password can include + // any printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain 8 to 41 characters. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string"` + + // The master user name for your new database. + // + // Constraints: + // + // * Master user name is required. + // + // * Must contain from 1 to 16 alphanumeric characters. + // + // * The first character must be a letter. + // + // * Cannot be a reserved word for the database engine you choose. + // + // For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords + // and Reserved Words articles for MySQL 5.6 (https://dev.mysql.com/doc/refman/5.6/en/keywords.html) + // or MySQL 5.7 (https://dev.mysql.com/doc/refman/5.7/en/keywords.html) respectively. + // + // MasterUsername is a required field + MasterUsername *string `locationName:"masterUsername" type:"string" required:"true"` + + // The daily time range during which automated backups are created for your + // new database if automated backups are enabled. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region. For more information about the preferred backup + // window time blocks for each region, see the Working With Backups (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) + // guide in the Amazon Relational Database Service (Amazon RDS) documentation. + // + // Constraints: + // + // * Must be in the hh24:mi-hh24:mi format. + // + // Example: 16:00-16:30 + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` + + // The weekly time range during which system maintenance can occur on your new + // database. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Constraints: + // + // * Must be in the ddd:hh24:mi-ddd:hh24:mi format. + // + // * Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. + // + // * Must be at least 30 minutes. + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Example: Tue:17:00-Tue:17:30 + PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` + + // Specifies the accessibility options for your new database. A value of true + // specifies a database that is available to resources outside of your Lightsail + // account. A value of false specifies a database that is available only to + // your Lightsail resources in the same region as your database. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` + + // The blueprint ID for your new database. A blueprint describes the major engine + // version of a database. + // + // You can get a list of database blueprints IDs by using the get relational + // database blueprints operation. + // + // RelationalDatabaseBlueprintId is a required field + RelationalDatabaseBlueprintId *string `locationName:"relationalDatabaseBlueprintId" type:"string" required:"true"` + + // The bundle ID for your new database. A bundle describes the performance specifications + // for your database. + // + // You can get a list of database bundle IDs by using the get relational database + // bundles operation. + // + // RelationalDatabaseBundleId is a required field + RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string" required:"true"` + + // The name to use for your new database. + // + // Constraints: + // + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseInput"} + if s.MasterDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("MasterDatabaseName")) + } + if s.MasterUsername == nil { + invalidParams.Add(request.NewErrParamRequired("MasterUsername")) + } + if s.RelationalDatabaseBlueprintId == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseBlueprintId")) + } + if s.RelationalDatabaseBundleId == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseBundleId")) + } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateRelationalDatabaseInput) SetAvailabilityZone(v string) *CreateRelationalDatabaseInput { + s.AvailabilityZone = &v + return s +} + +// SetMasterDatabaseName sets the MasterDatabaseName field's value. +func (s *CreateRelationalDatabaseInput) SetMasterDatabaseName(v string) *CreateRelationalDatabaseInput { + s.MasterDatabaseName = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *CreateRelationalDatabaseInput) SetMasterUserPassword(v string) *CreateRelationalDatabaseInput { + s.MasterUserPassword = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *CreateRelationalDatabaseInput) SetMasterUsername(v string) *CreateRelationalDatabaseInput { + s.MasterUsername = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *CreateRelationalDatabaseInput) SetPreferredBackupWindow(v string) *CreateRelationalDatabaseInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateRelationalDatabaseInput) SetPreferredMaintenanceWindow(v string) *CreateRelationalDatabaseInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *CreateRelationalDatabaseInput) SetPubliclyAccessible(v bool) *CreateRelationalDatabaseInput { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseBlueprintId sets the RelationalDatabaseBlueprintId field's value. +func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseBlueprintId(v string) *CreateRelationalDatabaseInput { + s.RelationalDatabaseBlueprintId = &v + return s +} + +// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. +func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseBundleId(v string) *CreateRelationalDatabaseInput { + s.RelationalDatabaseBundleId = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +type CreateRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your create relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateRelationalDatabaseOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseOutput { + s.Operations = v + return s +} + +type CreateRelationalDatabaseSnapshotInput struct { _ struct{} `type:"structure"` - // The name of the static IP address. + // The name of the database on which to base your new snapshot. // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The name for your new database snapshot. + // + // Constraints: + // + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + // + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s AllocateStaticIpInput) String() string { +func (s CreateRelationalDatabaseSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AllocateStaticIpInput) GoString() string { +func (s CreateRelationalDatabaseSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AllocateStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocateStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) +func (s *CreateRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) } if invalidParams.Len() > 0 { @@ -7526,78 +12135,67 @@ func (s *AllocateStaticIpInput) Validate() error { return nil } -// SetStaticIpName sets the StaticIpName field's value. -func (s *AllocateStaticIpInput) SetStaticIpName(v string) *AllocateStaticIpInput { - s.StaticIpName = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseSnapshotInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseSnapshotInput { + s.RelationalDatabaseName = &v return s } -type AllocateStaticIpOutput struct { +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *CreateRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *CreateRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +type CreateRelationalDatabaseSnapshotOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the static IP address - // you allocated. + // An object describing the result of your create relational database snapshot + // request. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s AllocateStaticIpOutput) String() string { +func (s CreateRelationalDatabaseSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AllocateStaticIpOutput) GoString() string { +func (s CreateRelationalDatabaseSnapshotOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AllocateStaticIpOutput) SetOperations(v []*Operation) *AllocateStaticIpOutput { +func (s *CreateRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseSnapshotOutput { s.Operations = v return s } -type AttachDiskInput struct { +type DeleteDiskInput struct { _ struct{} `type:"structure"` - // The unique Lightsail disk name (e.g., my-disk). + // The unique name of the disk you want to delete (e.g., my-disk). // // DiskName is a required field DiskName *string `locationName:"diskName" type:"string" required:"true"` - - // The disk path to expose to the instance (e.g., /dev/xvdf). - // - // DiskPath is a required field - DiskPath *string `locationName:"diskPath" type:"string" required:"true"` - - // The name of the Lightsail instance where you want to utilize the storage - // disk. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s AttachDiskInput) String() string { +func (s DeleteDiskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachDiskInput) GoString() string { +func (s DeleteDiskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachDiskInput"} +func (s *DeleteDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDiskInput"} if s.DiskName == nil { invalidParams.Add(request.NewErrParamRequired("DiskName")) } - if s.DiskPath == nil { - invalidParams.Add(request.NewErrParamRequired("DiskPath")) - } - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } if invalidParams.Len() > 0 { return invalidParams @@ -7606,24 +12204,73 @@ func (s *AttachDiskInput) Validate() error { } // SetDiskName sets the DiskName field's value. -func (s *AttachDiskInput) SetDiskName(v string) *AttachDiskInput { +func (s *DeleteDiskInput) SetDiskName(v string) *DeleteDiskInput { s.DiskName = &v return s } -// SetDiskPath sets the DiskPath field's value. -func (s *AttachDiskInput) SetDiskPath(v string) *AttachDiskInput { - s.DiskPath = &v +type DeleteDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteDiskOutput) SetOperations(v []*Operation) *DeleteDiskOutput { + s.Operations = v return s } -// SetInstanceName sets the InstanceName field's value. -func (s *AttachDiskInput) SetInstanceName(v string) *AttachDiskInput { - s.InstanceName = &v +type DeleteDiskSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the disk snapshot you want to delete (e.g., my-disk-snapshot). + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDiskSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDiskSnapshotInput"} + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *DeleteDiskSnapshotInput) SetDiskSnapshotName(v string) *DeleteDiskSnapshotInput { + s.DiskSnapshotName = &v return s } -type AttachDiskOutput struct { +type DeleteDiskSnapshotOutput struct { _ struct{} `type:"structure"` // An object describing the API operations. @@ -7631,60 +12278,53 @@ type AttachDiskOutput struct { } // String returns the string representation -func (s AttachDiskOutput) String() string { +func (s DeleteDiskSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachDiskOutput) GoString() string { +func (s DeleteDiskSnapshotOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AttachDiskOutput) SetOperations(v []*Operation) *AttachDiskOutput { +func (s *DeleteDiskSnapshotOutput) SetOperations(v []*Operation) *DeleteDiskSnapshotOutput { s.Operations = v return s } -type AttachInstancesToLoadBalancerInput struct { +type DeleteDomainEntryInput struct { _ struct{} `type:"structure"` - // An array of strings representing the instance name(s) you want to attach - // to your load balancer. - // - // An instance must be running before you can attach it to your load balancer. - // - // There are no additional limits on the number of instances you can attach - // to your load balancer, aside from the limit of Lightsail instances you can - // create in your account (20). + // An array of key-value pairs containing information about your domain entries. // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + // DomainEntry is a required field + DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` - // The name of the load balancer. + // The name of the domain entry to delete. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` } // String returns the string representation -func (s AttachInstancesToLoadBalancerInput) String() string { +func (s DeleteDomainEntryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachInstancesToLoadBalancerInput) GoString() string { +func (s DeleteDomainEntryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachInstancesToLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachInstancesToLoadBalancerInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) +func (s *DeleteDomainEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDomainEntryInput"} + if s.DomainEntry == nil { + invalidParams.Add(request.NewErrParamRequired("DomainEntry")) } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { @@ -7693,74 +12333,66 @@ func (s *AttachInstancesToLoadBalancerInput) Validate() error { return nil } -// SetInstanceNames sets the InstanceNames field's value. -func (s *AttachInstancesToLoadBalancerInput) SetInstanceNames(v []*string) *AttachInstancesToLoadBalancerInput { - s.InstanceNames = v +// SetDomainEntry sets the DomainEntry field's value. +func (s *DeleteDomainEntryInput) SetDomainEntry(v *DomainEntry) *DeleteDomainEntryInput { + s.DomainEntry = v return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachInstancesToLoadBalancerInput) SetLoadBalancerName(v string) *AttachInstancesToLoadBalancerInput { - s.LoadBalancerName = &v +// SetDomainName sets the DomainName field's value. +func (s *DeleteDomainEntryInput) SetDomainName(v string) *DeleteDomainEntryInput { + s.DomainName = &v return s } -type AttachInstancesToLoadBalancerOutput struct { +type DeleteDomainEntryOutput struct { _ struct{} `type:"structure"` - // An object representing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the results of your + // delete domain entry request. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s AttachInstancesToLoadBalancerOutput) String() string { +func (s DeleteDomainEntryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachInstancesToLoadBalancerOutput) GoString() string { +func (s DeleteDomainEntryOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *AttachInstancesToLoadBalancerOutput) SetOperations(v []*Operation) *AttachInstancesToLoadBalancerOutput { - s.Operations = v +// SetOperation sets the Operation field's value. +func (s *DeleteDomainEntryOutput) SetOperation(v *Operation) *DeleteDomainEntryOutput { + s.Operation = v return s } -type AttachLoadBalancerTlsCertificateInput struct { +type DeleteDomainInput struct { _ struct{} `type:"structure"` - // The name of your SSL/TLS certificate. - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // The name of the load balancer to which you want to associate the SSL/TLS - // certificate. + // The specific domain name to delete. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` } // String returns the string representation -func (s AttachLoadBalancerTlsCertificateInput) String() string { +func (s DeleteDomainInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachLoadBalancerTlsCertificateInput) GoString() string { +func (s DeleteDomainInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTlsCertificateInput"} - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *DeleteDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { @@ -7769,77 +12401,61 @@ func (s *AttachLoadBalancerTlsCertificateInput) Validate() error { return nil } -// SetCertificateName sets the CertificateName field's value. -func (s *AttachLoadBalancerTlsCertificateInput) SetCertificateName(v string) *AttachLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *AttachLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v +// SetDomainName sets the DomainName field's value. +func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { + s.DomainName = &v return s } -type AttachLoadBalancerTlsCertificateOutput struct { +type DeleteDomainOutput struct { _ struct{} `type:"structure"` - // An object representing the API operations. - // - // These SSL/TLS certificates are only usable by Lightsail load balancers. You - // can't get the certificate and use it for another purpose. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the results of your + // delete domain request. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s AttachLoadBalancerTlsCertificateOutput) String() string { +func (s DeleteDomainOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachLoadBalancerTlsCertificateOutput) GoString() string { +func (s DeleteDomainOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *AttachLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *AttachLoadBalancerTlsCertificateOutput { - s.Operations = v +// SetOperation sets the Operation field's value. +func (s *DeleteDomainOutput) SetOperation(v *Operation) *DeleteDomainOutput { + s.Operation = v return s } -type AttachStaticIpInput struct { +type DeleteInstanceInput struct { _ struct{} `type:"structure"` - // The instance name to which you want to attach the static IP address. + // The name of the instance to delete. // // InstanceName is a required field InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The name of the static IP. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` } // String returns the string representation -func (s AttachStaticIpInput) String() string { +func (s DeleteInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachStaticIpInput) GoString() string { +func (s DeleteInstanceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachStaticIpInput"} +func (s *DeleteInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceInput"} if s.InstanceName == nil { invalidParams.Add(request.NewErrParamRequired("InstanceName")) } - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } if invalidParams.Len() > 0 { return invalidParams @@ -7848,357 +12464,259 @@ func (s *AttachStaticIpInput) Validate() error { } // SetInstanceName sets the InstanceName field's value. -func (s *AttachStaticIpInput) SetInstanceName(v string) *AttachStaticIpInput { +func (s *DeleteInstanceInput) SetInstanceName(v string) *DeleteInstanceInput { s.InstanceName = &v return s } -// SetStaticIpName sets the StaticIpName field's value. -func (s *AttachStaticIpInput) SetStaticIpName(v string) *AttachStaticIpInput { - s.StaticIpName = &v - return s -} - -type AttachStaticIpOutput struct { +type DeleteInstanceOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your API operations. + // An array of key-value pairs containing information about the results of your + // delete instance request. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s AttachStaticIpOutput) String() string { +func (s DeleteInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachStaticIpOutput) GoString() string { +func (s DeleteInstanceOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AttachStaticIpOutput) SetOperations(v []*Operation) *AttachStaticIpOutput { +func (s *DeleteInstanceOutput) SetOperations(v []*Operation) *DeleteInstanceOutput { s.Operations = v return s } -// Describes an Availability Zone. -type AvailabilityZone struct { +type DeleteInstanceSnapshotInput struct { _ struct{} `type:"structure"` - // The state of the Availability Zone. - State *string `locationName:"state" type:"string"` - - // The name of the Availability Zone. The format is us-east-2a (case-sensitive). - ZoneName *string `locationName:"zoneName" type:"string"` + // The name of the snapshot to delete. + // + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s AvailabilityZone) String() string { +func (s DeleteInstanceSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AvailabilityZone) GoString() string { +func (s DeleteInstanceSnapshotInput) GoString() string { return s.String() } -// SetState sets the State field's value. -func (s *AvailabilityZone) SetState(v string) *AvailabilityZone { - s.State = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInstanceSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceSnapshotInput"} + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetZoneName sets the ZoneName field's value. -func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { - s.ZoneName = &v +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *DeleteInstanceSnapshotInput) SetInstanceSnapshotName(v string) *DeleteInstanceSnapshotInput { + s.InstanceSnapshotName = &v return s } -// Describes a blueprint (a virtual private server image). -type Blueprint struct { +type DeleteInstanceSnapshotOutput struct { _ struct{} `type:"structure"` - // The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). - BlueprintId *string `locationName:"blueprintId" type:"string"` - - // The description of the blueprint. - Description *string `locationName:"description" type:"string"` - - // The group name of the blueprint (e.g., amazon-linux). - Group *string `locationName:"group" type:"string"` - - // A Boolean value indicating whether the blueprint is active. When you update - // your blueprints, you will inactivate old blueprints and keep the most recent - // versions active. - IsActive *bool `locationName:"isActive" type:"boolean"` - - // The end-user license agreement URL for the image or blueprint. - LicenseUrl *string `locationName:"licenseUrl" type:"string"` - - // The minimum bundle power required to run this blueprint. For example, you - // need a bundle with a power value of 500 or more to create an instance that - // uses a blueprint with a minimum power value of 500. 0 indicates that the - // blueprint runs on all instance sizes. - MinPower *int64 `locationName:"minPower" type:"integer"` - - // The friendly name of the blueprint (e.g., Amazon Linux). - Name *string `locationName:"name" type:"string"` - - // The operating system platform (either Linux/Unix-based or Windows Server-based) - // of the blueprint. - Platform *string `locationName:"platform" type:"string" enum:"InstancePlatform"` - - // The product URL to learn more about the image or blueprint. - ProductUrl *string `locationName:"productUrl" type:"string"` - - // The type of the blueprint (e.g., os or app). - Type *string `locationName:"type" type:"string" enum:"BlueprintType"` - - // The version number of the operating system, application, or stack (e.g., - // 2016.03.0). - Version *string `locationName:"version" type:"string"` - - // The version code. - VersionCode *string `locationName:"versionCode" type:"string"` + // An array of key-value pairs containing information about the results of your + // delete instance snapshot request. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s Blueprint) String() string { +func (s DeleteInstanceSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Blueprint) GoString() string { +func (s DeleteInstanceSnapshotOutput) GoString() string { return s.String() } -// SetBlueprintId sets the BlueprintId field's value. -func (s *Blueprint) SetBlueprintId(v string) *Blueprint { - s.BlueprintId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Blueprint) SetDescription(v string) *Blueprint { - s.Description = &v - return s -} - -// SetGroup sets the Group field's value. -func (s *Blueprint) SetGroup(v string) *Blueprint { - s.Group = &v - return s -} - -// SetIsActive sets the IsActive field's value. -func (s *Blueprint) SetIsActive(v bool) *Blueprint { - s.IsActive = &v - return s -} - -// SetLicenseUrl sets the LicenseUrl field's value. -func (s *Blueprint) SetLicenseUrl(v string) *Blueprint { - s.LicenseUrl = &v +// SetOperations sets the Operations field's value. +func (s *DeleteInstanceSnapshotOutput) SetOperations(v []*Operation) *DeleteInstanceSnapshotOutput { + s.Operations = v return s } -// SetMinPower sets the MinPower field's value. -func (s *Blueprint) SetMinPower(v int64) *Blueprint { - s.MinPower = &v - return s -} +type DeleteKeyPairInput struct { + _ struct{} `type:"structure"` -// SetName sets the Name field's value. -func (s *Blueprint) SetName(v string) *Blueprint { - s.Name = &v - return s + // The name of the key pair to delete. + // + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` } -// SetPlatform sets the Platform field's value. -func (s *Blueprint) SetPlatform(v string) *Blueprint { - s.Platform = &v - return s +// String returns the string representation +func (s DeleteKeyPairInput) String() string { + return awsutil.Prettify(s) } -// SetProductUrl sets the ProductUrl field's value. -func (s *Blueprint) SetProductUrl(v string) *Blueprint { - s.ProductUrl = &v - return s +// GoString returns the string representation +func (s DeleteKeyPairInput) GoString() string { + return s.String() } -// SetType sets the Type field's value. -func (s *Blueprint) SetType(v string) *Blueprint { - s.Type = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } -// SetVersion sets the Version field's value. -func (s *Blueprint) SetVersion(v string) *Blueprint { - s.Version = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetVersionCode sets the VersionCode field's value. -func (s *Blueprint) SetVersionCode(v string) *Blueprint { - s.VersionCode = &v +// SetKeyPairName sets the KeyPairName field's value. +func (s *DeleteKeyPairInput) SetKeyPairName(v string) *DeleteKeyPairInput { + s.KeyPairName = &v return s } -// Describes a bundle, which is a set of specs describing your virtual private -// server (or instance). -type Bundle struct { - _ struct{} `type:"structure"` - - // The bundle ID (e.g., micro_1_0). - BundleId *string `locationName:"bundleId" type:"string"` - - // The number of vCPUs included in the bundle (e.g., 2). - CpuCount *int64 `locationName:"cpuCount" type:"integer"` - - // The size of the SSD (e.g., 30). - DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` - - // The Amazon EC2 instance type (e.g., t2.micro). - InstanceType *string `locationName:"instanceType" type:"string"` - - // A Boolean value indicating whether the bundle is active. - IsActive *bool `locationName:"isActive" type:"boolean"` - - // A friendly name for the bundle (e.g., Micro). - Name *string `locationName:"name" type:"string"` - - // A numeric value that represents the power of the bundle (e.g., 500). You - // can use the bundle's power value in conjunction with a blueprint's minimum - // power value to determine whether the blueprint will run on the bundle. For - // example, you need a bundle with a power value of 500 or more to create an - // instance that uses a blueprint with a minimum power value of 500. - Power *int64 `locationName:"power" type:"integer"` - - // The price in US dollars (e.g., 5.0). - Price *float64 `locationName:"price" type:"float"` - - // The amount of RAM in GB (e.g., 2.0). - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` - - // The operating system platform (Linux/Unix-based or Windows Server-based) - // that the bundle supports. You can only launch a WINDOWS bundle on a blueprint - // that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX - // bundle. - SupportedPlatforms []*string `locationName:"supportedPlatforms" type:"list"` +type DeleteKeyPairOutput struct { + _ struct{} `type:"structure"` - // The data transfer rate per month in GB (e.g., 2000). - TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` + // An array of key-value pairs containing information about the results of your + // delete key pair request. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s Bundle) String() string { +func (s DeleteKeyPairOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Bundle) GoString() string { +func (s DeleteKeyPairOutput) GoString() string { return s.String() } -// SetBundleId sets the BundleId field's value. -func (s *Bundle) SetBundleId(v string) *Bundle { - s.BundleId = &v +// SetOperation sets the Operation field's value. +func (s *DeleteKeyPairOutput) SetOperation(v *Operation) *DeleteKeyPairOutput { + s.Operation = v return s } -// SetCpuCount sets the CpuCount field's value. -func (s *Bundle) SetCpuCount(v int64) *Bundle { - s.CpuCount = &v - return s -} +type DeleteLoadBalancerInput struct { + _ struct{} `type:"structure"` -// SetDiskSizeInGb sets the DiskSizeInGb field's value. -func (s *Bundle) SetDiskSizeInGb(v int64) *Bundle { - s.DiskSizeInGb = &v - return s + // The name of the load balancer you want to delete. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } -// SetInstanceType sets the InstanceType field's value. -func (s *Bundle) SetInstanceType(v string) *Bundle { - s.InstanceType = &v - return s +// String returns the string representation +func (s DeleteLoadBalancerInput) String() string { + return awsutil.Prettify(s) } -// SetIsActive sets the IsActive field's value. -func (s *Bundle) SetIsActive(v bool) *Bundle { - s.IsActive = &v - return s +// GoString returns the string representation +func (s DeleteLoadBalancerInput) GoString() string { + return s.String() } -// SetName sets the Name field's value. -func (s *Bundle) SetName(v string) *Bundle { - s.Name = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetPower sets the Power field's value. -func (s *Bundle) SetPower(v int64) *Bundle { - s.Power = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *DeleteLoadBalancerInput) SetLoadBalancerName(v string) *DeleteLoadBalancerInput { + s.LoadBalancerName = &v return s } -// SetPrice sets the Price field's value. -func (s *Bundle) SetPrice(v float64) *Bundle { - s.Price = &v - return s +type DeleteLoadBalancerOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` } -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *Bundle) SetRamSizeInGb(v float64) *Bundle { - s.RamSizeInGb = &v - return s +// String returns the string representation +func (s DeleteLoadBalancerOutput) String() string { + return awsutil.Prettify(s) } -// SetSupportedPlatforms sets the SupportedPlatforms field's value. -func (s *Bundle) SetSupportedPlatforms(v []*string) *Bundle { - s.SupportedPlatforms = v - return s +// GoString returns the string representation +func (s DeleteLoadBalancerOutput) GoString() string { + return s.String() } -// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. -func (s *Bundle) SetTransferPerMonthInGb(v int64) *Bundle { - s.TransferPerMonthInGb = &v +// SetOperations sets the Operations field's value. +func (s *DeleteLoadBalancerOutput) SetOperations(v []*Operation) *DeleteLoadBalancerOutput { + s.Operations = v return s } -type CloseInstancePublicPortsInput struct { +type DeleteLoadBalancerTlsCertificateInput struct { _ struct{} `type:"structure"` - // The name of the instance on which you're attempting to close the public ports. + // The SSL/TLS certificate name. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // CertificateName is a required field + CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - // Information about the public port you are trying to close. + // When true, forces the deletion of an SSL/TLS certificate. // - // PortInfo is a required field - PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` + // There can be two certificates associated with a Lightsail load balancer: + // the primary and the backup. The force parameter is required when the primary + // SSL/TLS certificate is in use by an instance attached to the load balancer. + Force *bool `locationName:"force" type:"boolean"` + + // The load balancer name. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } // String returns the string representation -func (s CloseInstancePublicPortsInput) String() string { +func (s DeleteLoadBalancerTlsCertificateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CloseInstancePublicPortsInput) GoString() string { +func (s DeleteLoadBalancerTlsCertificateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CloseInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloseInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *DeleteLoadBalancerTlsCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerTlsCertificateInput"} + if s.CertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateName")) } - if s.PortInfo == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfo")) + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) } if invalidParams.Len() > 0 { @@ -8207,95 +12725,94 @@ func (s *CloseInstancePublicPortsInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *CloseInstancePublicPortsInput) SetInstanceName(v string) *CloseInstancePublicPortsInput { - s.InstanceName = &v +// SetCertificateName sets the CertificateName field's value. +func (s *DeleteLoadBalancerTlsCertificateInput) SetCertificateName(v string) *DeleteLoadBalancerTlsCertificateInput { + s.CertificateName = &v return s } -// SetPortInfo sets the PortInfo field's value. -func (s *CloseInstancePublicPortsInput) SetPortInfo(v *PortInfo) *CloseInstancePublicPortsInput { - s.PortInfo = v +// SetForce sets the Force field's value. +func (s *DeleteLoadBalancerTlsCertificateInput) SetForce(v bool) *DeleteLoadBalancerTlsCertificateInput { + s.Force = &v return s } -type CloseInstancePublicPortsOutput struct { +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *DeleteLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *DeleteLoadBalancerTlsCertificateInput { + s.LoadBalancerName = &v + return s +} + +type DeleteLoadBalancerTlsCertificateOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs that contains information about the operation. - Operation *Operation `locationName:"operation" type:"structure"` + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s CloseInstancePublicPortsOutput) String() string { +func (s DeleteLoadBalancerTlsCertificateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CloseInstancePublicPortsOutput) GoString() string { +func (s DeleteLoadBalancerTlsCertificateOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *CloseInstancePublicPortsOutput) SetOperation(v *Operation) *CloseInstancePublicPortsOutput { - s.Operation = v +// SetOperations sets the Operations field's value. +func (s *DeleteLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *DeleteLoadBalancerTlsCertificateOutput { + s.Operations = v return s } -type CreateDiskFromSnapshotInput struct { +type DeleteRelationalDatabaseInput struct { _ struct{} `type:"structure"` - // The Availability Zone where you want to create the disk (e.g., us-east-2a). - // Choose the same Availability Zone as the Lightsail instance where you want - // to create the disk. + // The name of the database snapshot created if skip final snapshot is false, + // which is the default value for that parameter. // - // Use the GetRegions operation to list the Availability Zones where Lightsail - // is currently available. + // Specifying this parameter and also specifying the skip final snapshot parameter + // to true results in an error. // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The unique Lightsail disk name (e.g., my-disk). + // Constraints: // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + FinalRelationalDatabaseSnapshotName *string `locationName:"finalRelationalDatabaseSnapshotName" type:"string"` - // The name of the disk snapshot (e.g., my-snapshot) from which to create the - // new storage disk. + // The name of the database that you are deleting. // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` - // The size of the disk in GB (e.g., 32). + // Determines whether a final database snapshot is created before your database + // is deleted. If true is specified, no database snapshot is created. If false + // is specified, a database snapshot is created before your database is deleted. // - // SizeInGb is a required field - SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` + // You must specify the final relational database snapshot name parameter if + // the skip final snapshot parameter is false. + // + // Default: false + SkipFinalSnapshot *bool `locationName:"skipFinalSnapshot" type:"boolean"` } // String returns the string representation -func (s CreateDiskFromSnapshotInput) String() string { +func (s DeleteRelationalDatabaseInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskFromSnapshotInput) GoString() string { +func (s DeleteRelationalDatabaseInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskFromSnapshotInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - if s.SizeInGb == nil { - invalidParams.Add(request.NewErrParamRequired("SizeInGb")) +func (s *DeleteRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -8304,99 +12821,135 @@ func (s *CreateDiskFromSnapshotInput) Validate() error { return nil } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDiskFromSnapshotInput) SetAvailabilityZone(v string) *CreateDiskFromSnapshotInput { - s.AvailabilityZone = &v +// SetFinalRelationalDatabaseSnapshotName sets the FinalRelationalDatabaseSnapshotName field's value. +func (s *DeleteRelationalDatabaseInput) SetFinalRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseInput { + s.FinalRelationalDatabaseSnapshotName = &v return s } -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskFromSnapshotInput) SetDiskName(v string) *CreateDiskFromSnapshotInput { - s.DiskName = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *DeleteRelationalDatabaseInput) SetRelationalDatabaseName(v string) *DeleteRelationalDatabaseInput { + s.RelationalDatabaseName = &v return s } -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *CreateDiskFromSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskFromSnapshotInput { - s.DiskSnapshotName = &v +// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. +func (s *DeleteRelationalDatabaseInput) SetSkipFinalSnapshot(v bool) *DeleteRelationalDatabaseInput { + s.SkipFinalSnapshot = &v return s } -// SetSizeInGb sets the SizeInGb field's value. -func (s *CreateDiskFromSnapshotInput) SetSizeInGb(v int64) *CreateDiskFromSnapshotInput { - s.SizeInGb = &v +type DeleteRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your delete relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteRelationalDatabaseOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseOutput { + s.Operations = v return s } -type CreateDiskFromSnapshotOutput struct { +type DeleteRelationalDatabaseSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the database snapshot that you are deleting. + // + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRelationalDatabaseSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRelationalDatabaseSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *DeleteRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +type DeleteRelationalDatabaseSnapshotOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. + // An object describing the result of your delete relational database snapshot + // request. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s CreateDiskFromSnapshotOutput) String() string { +func (s DeleteRelationalDatabaseSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskFromSnapshotOutput) GoString() string { +func (s DeleteRelationalDatabaseSnapshotOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *CreateDiskFromSnapshotOutput) SetOperations(v []*Operation) *CreateDiskFromSnapshotOutput { +func (s *DeleteRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseSnapshotOutput { s.Operations = v return s } -type CreateDiskInput struct { +type DetachDiskInput struct { _ struct{} `type:"structure"` - // The Availability Zone where you want to create the disk (e.g., us-east-2a). - // Choose the same Availability Zone as the Lightsail instance where you want - // to create the disk. - // - // Use the GetRegions operation to list the Availability Zones where Lightsail - // is currently available. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The unique Lightsail disk name (e.g., my-disk). + // The unique name of the disk you want to detach from your instance (e.g., + // my-disk). // // DiskName is a required field DiskName *string `locationName:"diskName" type:"string" required:"true"` - - // The size of the disk in GB (e.g., 32). - // - // SizeInGb is a required field - SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` } // String returns the string representation -func (s CreateDiskInput) String() string { +func (s DetachDiskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskInput) GoString() string { +func (s DetachDiskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } +func (s *DetachDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachDiskInput"} if s.DiskName == nil { invalidParams.Add(request.NewErrParamRequired("DiskName")) } - if s.SizeInGb == nil { - invalidParams.Add(request.NewErrParamRequired("SizeInGb")) - } if invalidParams.Len() > 0 { return invalidParams @@ -8404,25 +12957,13 @@ func (s *CreateDiskInput) Validate() error { return nil } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDiskInput) SetAvailabilityZone(v string) *CreateDiskInput { - s.AvailabilityZone = &v - return s -} - // SetDiskName sets the DiskName field's value. -func (s *CreateDiskInput) SetDiskName(v string) *CreateDiskInput { +func (s *DetachDiskInput) SetDiskName(v string) *DetachDiskInput { s.DiskName = &v return s } -// SetSizeInGb sets the SizeInGb field's value. -func (s *CreateDiskInput) SetSizeInGb(v int64) *CreateDiskInput { - s.SizeInGb = &v - return s -} - -type CreateDiskOutput struct { +type DetachDiskOutput struct { _ struct{} `type:"structure"` // An object describing the API operations. @@ -8430,54 +12971,54 @@ type CreateDiskOutput struct { } // String returns the string representation -func (s CreateDiskOutput) String() string { +func (s DetachDiskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskOutput) GoString() string { +func (s DetachDiskOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *CreateDiskOutput) SetOperations(v []*Operation) *CreateDiskOutput { +func (s *DetachDiskOutput) SetOperations(v []*Operation) *DetachDiskOutput { s.Operations = v return s } -type CreateDiskSnapshotInput struct { +type DetachInstancesFromLoadBalancerInput struct { _ struct{} `type:"structure"` - // The unique name of the source disk (e.g., my-source-disk). + // An array of strings containing the names of the instances you want to detach + // from the load balancer. // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - // The name of the destination disk snapshot (e.g., my-disk-snapshot) based - // on the source disk. + // The name of the Lightsail load balancer. // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } // String returns the string representation -func (s CreateDiskSnapshotInput) String() string { +func (s DetachInstancesFromLoadBalancerInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskSnapshotInput) GoString() string { +func (s DetachInstancesFromLoadBalancerInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskSnapshotInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) +func (s *DetachInstancesFromLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachInstancesFromLoadBalancerInput"} + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) } - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) } if invalidParams.Len() > 0 { @@ -8486,19 +13027,19 @@ func (s *CreateDiskSnapshotInput) Validate() error { return nil } -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskSnapshotInput) SetDiskName(v string) *CreateDiskSnapshotInput { - s.DiskName = &v +// SetInstanceNames sets the InstanceNames field's value. +func (s *DetachInstancesFromLoadBalancerInput) SetInstanceNames(v []*string) *DetachInstancesFromLoadBalancerInput { + s.InstanceNames = v return s } -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnapshotInput { - s.DiskSnapshotName = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *DetachInstancesFromLoadBalancerInput) SetLoadBalancerName(v string) *DetachInstancesFromLoadBalancerInput { + s.LoadBalancerName = &v return s } -type CreateDiskSnapshotOutput struct { +type DetachInstancesFromLoadBalancerOutput struct { _ struct{} `type:"structure"` // An object describing the API operations. @@ -8506,55 +13047,45 @@ type CreateDiskSnapshotOutput struct { } // String returns the string representation -func (s CreateDiskSnapshotOutput) String() string { +func (s DetachInstancesFromLoadBalancerOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskSnapshotOutput) GoString() string { +func (s DetachInstancesFromLoadBalancerOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *CreateDiskSnapshotOutput) SetOperations(v []*Operation) *CreateDiskSnapshotOutput { +func (s *DetachInstancesFromLoadBalancerOutput) SetOperations(v []*Operation) *DetachInstancesFromLoadBalancerOutput { s.Operations = v return s } -type CreateDomainEntryInput struct { +type DetachStaticIpInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the domain entry - // request. - // - // DomainEntry is a required field - DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` - - // The domain name (e.g., example.com) for which you want to create the domain - // entry. + // The name of the static IP to detach from the instance. // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` } // String returns the string representation -func (s CreateDomainEntryInput) String() string { +func (s DetachStaticIpInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDomainEntryInput) GoString() string { +func (s DetachStaticIpInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainEntryInput"} - if s.DomainEntry == nil { - invalidParams.Add(request.NewErrParamRequired("DomainEntry")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) +func (s *DetachStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachStaticIpInput"} + if s.StaticIpName == nil { + invalidParams.Add(request.NewErrParamRequired("StaticIpName")) } if invalidParams.Len() > 0 { @@ -8563,526 +13094,527 @@ func (s *CreateDomainEntryInput) Validate() error { return nil } -// SetDomainEntry sets the DomainEntry field's value. -func (s *CreateDomainEntryInput) SetDomainEntry(v *DomainEntry) *CreateDomainEntryInput { - s.DomainEntry = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainEntryInput) SetDomainName(v string) *CreateDomainEntryInput { - s.DomainName = &v +// SetStaticIpName sets the StaticIpName field's value. +func (s *DetachStaticIpInput) SetStaticIpName(v string) *DetachStaticIpInput { + s.StaticIpName = &v return s } -type CreateDomainEntryOutput struct { +type DetachStaticIpOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the operation. - Operation *Operation `locationName:"operation" type:"structure"` + // An array of key-value pairs containing information about the results of your + // detach static IP request. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s CreateDomainEntryOutput) String() string { +func (s DetachStaticIpOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDomainEntryOutput) GoString() string { +func (s DetachStaticIpOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *CreateDomainEntryOutput) SetOperation(v *Operation) *CreateDomainEntryOutput { - s.Operation = v +// SetOperations sets the Operations field's value. +func (s *DetachStaticIpOutput) SetOperations(v []*Operation) *DetachStaticIpOutput { + s.Operations = v return s } -type CreateDomainInput struct { +// Describes a system disk or an block storage disk. +type Disk struct { _ struct{} `type:"structure"` - // The domain name to manage (e.g., example.com). + // The Amazon Resource Name (ARN) of the disk. + Arn *string `locationName:"arn" type:"string"` + + // The resources to which the disk is attached. + AttachedTo *string `locationName:"attachedTo" type:"string"` + + // (Deprecated) The attachment state of the disk. // - // You cannot register a new domain name using Lightsail. You must register - // a domain name using Amazon Route 53 or another domain name registrar. If - // you have already registered your domain, you can enter its name in this parameter - // to manage the DNS records for that domain. + // In releases prior to November 14, 2017, this parameter returned attached + // for system disks in the API response. It is now deprecated, but still included + // in the response. Use isAttached instead. // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // Deprecated: AttachmentState has been deprecated + AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` + + // The date when the disk was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // (Deprecated) The number of GB in use by the disk. + // + // In releases prior to November 14, 2017, this parameter was not included in + // the API response. It is now deprecated. + // + // Deprecated: GbInUse has been deprecated + GbInUse *int64 `locationName:"gbInUse" deprecated:"true" type:"integer"` + + // The input/output operations per second (IOPS) of the disk. + Iops *int64 `locationName:"iops" type:"integer"` + + // A Boolean value indicating whether the disk is attached. + IsAttached *bool `locationName:"isAttached" type:"boolean"` + + // A Boolean value indicating whether this disk is a system disk (has an operating + // system loaded on it). + IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` + + // The AWS Region and Availability Zone where the disk is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The unique name of the disk. + Name *string `locationName:"name" type:"string"` + + // The disk path. + Path *string `locationName:"path" type:"string"` + + // The Lightsail resource type (e.g., Disk). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The size of the disk in GB. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + + // Describes the status of the disk. + State *string `locationName:"state" type:"string" enum:"DiskState"` + + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s CreateDomainInput) String() string { +func (s Disk) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDomainInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +func (s Disk) GoString() string { + return s.String() } -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { - s.DomainName = &v +// SetArn sets the Arn field's value. +func (s *Disk) SetArn(v string) *Disk { + s.Arn = &v return s } -type CreateDomainOutput struct { - _ struct{} `type:"structure"` +// SetAttachedTo sets the AttachedTo field's value. +func (s *Disk) SetAttachedTo(v string) *Disk { + s.AttachedTo = &v + return s +} - // An array of key-value pairs containing information about the domain resource - // you created. - Operation *Operation `locationName:"operation" type:"structure"` +// SetAttachmentState sets the AttachmentState field's value. +func (s *Disk) SetAttachmentState(v string) *Disk { + s.AttachmentState = &v + return s } -// String returns the string representation -func (s CreateDomainOutput) String() string { - return awsutil.Prettify(s) +// SetCreatedAt sets the CreatedAt field's value. +func (s *Disk) SetCreatedAt(v time.Time) *Disk { + s.CreatedAt = &v + return s } -// GoString returns the string representation -func (s CreateDomainOutput) GoString() string { - return s.String() +// SetGbInUse sets the GbInUse field's value. +func (s *Disk) SetGbInUse(v int64) *Disk { + s.GbInUse = &v + return s } -// SetOperation sets the Operation field's value. -func (s *CreateDomainOutput) SetOperation(v *Operation) *CreateDomainOutput { - s.Operation = v +// SetIops sets the Iops field's value. +func (s *Disk) SetIops(v int64) *Disk { + s.Iops = &v return s } -type CreateInstanceSnapshotInput struct { - _ struct{} `type:"structure"` +// SetIsAttached sets the IsAttached field's value. +func (s *Disk) SetIsAttached(v bool) *Disk { + s.IsAttached = &v + return s +} - // The Lightsail instance on which to base your snapshot. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` +// SetIsSystemDisk sets the IsSystemDisk field's value. +func (s *Disk) SetIsSystemDisk(v bool) *Disk { + s.IsSystemDisk = &v + return s +} - // The name for your new snapshot. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` +// SetLocation sets the Location field's value. +func (s *Disk) SetLocation(v *ResourceLocation) *Disk { + s.Location = v + return s } -// String returns the string representation -func (s CreateInstanceSnapshotInput) String() string { - return awsutil.Prettify(s) +// SetName sets the Name field's value. +func (s *Disk) SetName(v string) *Disk { + s.Name = &v + return s } -// GoString returns the string representation -func (s CreateInstanceSnapshotInput) GoString() string { - return s.String() +// SetPath sets the Path field's value. +func (s *Disk) SetPath(v string) *Disk { + s.Path = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceSnapshotInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } +// SetResourceType sets the ResourceType field's value. +func (s *Disk) SetResourceType(v string) *Disk { + s.ResourceType = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetSizeInGb sets the SizeInGb field's value. +func (s *Disk) SetSizeInGb(v int64) *Disk { + s.SizeInGb = &v + return s } -// SetInstanceName sets the InstanceName field's value. -func (s *CreateInstanceSnapshotInput) SetInstanceName(v string) *CreateInstanceSnapshotInput { - s.InstanceName = &v +// SetState sets the State field's value. +func (s *Disk) SetState(v string) *Disk { + s.State = &v return s } -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *CreateInstanceSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstanceSnapshotInput { - s.InstanceSnapshotName = &v +// SetSupportCode sets the SupportCode field's value. +func (s *Disk) SetSupportCode(v string) *Disk { + s.SupportCode = &v return s } -type CreateInstanceSnapshotOutput struct { +// Describes a block storage disk mapping. +type DiskMap struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // create instances snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` + // The new disk name (e.g., my-new-disk). + NewDiskName *string `locationName:"newDiskName" type:"string"` + + // The original disk path exposed to the instance (for example, /dev/sdh). + OriginalDiskPath *string `locationName:"originalDiskPath" type:"string"` } // String returns the string representation -func (s CreateInstanceSnapshotOutput) String() string { +func (s DiskMap) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstanceSnapshotOutput) GoString() string { +func (s DiskMap) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateInstanceSnapshotOutput) SetOperations(v []*Operation) *CreateInstanceSnapshotOutput { - s.Operations = v +// SetNewDiskName sets the NewDiskName field's value. +func (s *DiskMap) SetNewDiskName(v string) *DiskMap { + s.NewDiskName = &v return s } -type CreateInstancesFromSnapshotInput struct { +// SetOriginalDiskPath sets the OriginalDiskPath field's value. +func (s *DiskMap) SetOriginalDiskPath(v string) *DiskMap { + s.OriginalDiskPath = &v + return s +} + +// Describes a block storage disk snapshot. +type DiskSnapshot struct { _ struct{} `type:"structure"` - // An object containing information about one or more disk mappings. - AttachedDiskMapping map[string][]*DiskMap `locationName:"attachedDiskMapping" type:"map"` + // The Amazon Resource Name (ARN) of the disk snapshot. + Arn *string `locationName:"arn" type:"string"` - // The Availability Zone where you want to create your instances. Use the following - // formatting: us-east-2a (case sensitive). You can get a list of availability - // zones by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) - // operation. Be sure to add the include availability zones parameter to your - // request. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + // The date when the disk snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0). - // - // BundleId is a required field - BundleId *string `locationName:"bundleId" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the source disk from which you are creating + // the disk snapshot. + FromDiskArn *string `locationName:"fromDiskArn" type:"string"` - // The names for your new instances. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + // The unique name of the source disk from which you are creating the disk snapshot. + FromDiskName *string `locationName:"fromDiskName" type:"string"` - // The name of the instance snapshot on which you are basing your new instances. - // Use the get instance snapshots operation to return information about your - // existing snapshots. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + // The AWS Region and Availability Zone where the disk snapshot was created. + Location *ResourceLocation `locationName:"location" type:"structure"` - // The name for your key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` + // The name of the disk snapshot (e.g., my-disk-snapshot). + Name *string `locationName:"name" type:"string"` - // You can create a launch script that configures a server with additional user - // data. For example, apt-get -y update. - // - // Depending on the machine image you choose, the command to get software on - // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu - // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide - // (http://lightsail.aws.amazon.com/ls/docs/getting-started/articles/pre-installed-apps). - UserData *string `locationName:"userData" type:"string"` + // The progress of the disk snapshot operation. + Progress *string `locationName:"progress" type:"string"` + + // The Lightsail resource type (e.g., DiskSnapshot). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The size of the disk in GB. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + + // The status of the disk snapshot operation. + State *string `locationName:"state" type:"string" enum:"DiskSnapshotState"` + + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s CreateInstancesFromSnapshotInput) String() string { +func (s DiskSnapshot) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstancesFromSnapshotInput) GoString() string { +func (s DiskSnapshot) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstancesFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstancesFromSnapshotInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttachedDiskMapping sets the AttachedDiskMapping field's value. -func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput { - s.AttachedDiskMapping = v +// SetArn sets the Arn field's value. +func (s *DiskSnapshot) SetArn(v string) *DiskSnapshot { + s.Arn = &v return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateInstancesFromSnapshotInput) SetAvailabilityZone(v string) *CreateInstancesFromSnapshotInput { - s.AvailabilityZone = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *DiskSnapshot) SetCreatedAt(v time.Time) *DiskSnapshot { + s.CreatedAt = &v return s } -// SetBundleId sets the BundleId field's value. -func (s *CreateInstancesFromSnapshotInput) SetBundleId(v string) *CreateInstancesFromSnapshotInput { - s.BundleId = &v +// SetFromDiskArn sets the FromDiskArn field's value. +func (s *DiskSnapshot) SetFromDiskArn(v string) *DiskSnapshot { + s.FromDiskArn = &v return s } -// SetInstanceNames sets the InstanceNames field's value. -func (s *CreateInstancesFromSnapshotInput) SetInstanceNames(v []*string) *CreateInstancesFromSnapshotInput { - s.InstanceNames = v +// SetFromDiskName sets the FromDiskName field's value. +func (s *DiskSnapshot) SetFromDiskName(v string) *DiskSnapshot { + s.FromDiskName = &v return s } -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *CreateInstancesFromSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstancesFromSnapshotInput { - s.InstanceSnapshotName = &v +// SetLocation sets the Location field's value. +func (s *DiskSnapshot) SetLocation(v *ResourceLocation) *DiskSnapshot { + s.Location = v return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateInstancesFromSnapshotInput) SetKeyPairName(v string) *CreateInstancesFromSnapshotInput { - s.KeyPairName = &v +// SetName sets the Name field's value. +func (s *DiskSnapshot) SetName(v string) *DiskSnapshot { + s.Name = &v return s } -// SetUserData sets the UserData field's value. -func (s *CreateInstancesFromSnapshotInput) SetUserData(v string) *CreateInstancesFromSnapshotInput { - s.UserData = &v +// SetProgress sets the Progress field's value. +func (s *DiskSnapshot) SetProgress(v string) *DiskSnapshot { + s.Progress = &v return s } -type CreateInstancesFromSnapshotOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the results of your - // create instances from snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` +// SetResourceType sets the ResourceType field's value. +func (s *DiskSnapshot) SetResourceType(v string) *DiskSnapshot { + s.ResourceType = &v + return s } -// String returns the string representation -func (s CreateInstancesFromSnapshotOutput) String() string { - return awsutil.Prettify(s) +// SetSizeInGb sets the SizeInGb field's value. +func (s *DiskSnapshot) SetSizeInGb(v int64) *DiskSnapshot { + s.SizeInGb = &v + return s } -// GoString returns the string representation -func (s CreateInstancesFromSnapshotOutput) GoString() string { - return s.String() +// SetState sets the State field's value. +func (s *DiskSnapshot) SetState(v string) *DiskSnapshot { + s.State = &v + return s } -// SetOperations sets the Operations field's value. -func (s *CreateInstancesFromSnapshotOutput) SetOperations(v []*Operation) *CreateInstancesFromSnapshotOutput { - s.Operations = v +// SetSupportCode sets the SupportCode field's value. +func (s *DiskSnapshot) SetSupportCode(v string) *DiskSnapshot { + s.SupportCode = &v return s } -type CreateInstancesInput struct { +// Describes a domain where you are storing recordsets in Lightsail. +type Domain struct { _ struct{} `type:"structure"` - // The Availability Zone in which to create your instance. Use the following - // format: us-east-2a (case sensitive). You can get a list of availability zones - // by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) - // operation. Be sure to add the include availability zones parameter to your - // request. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). + Arn *string `locationName:"arn" type:"string"` - // The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). - // Use the get blueprints operation to return a list of available images (or - // blueprints). - // - // BlueprintId is a required field - BlueprintId *string `locationName:"blueprintId" type:"string" required:"true"` + // The date when the domain recordset was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0). - // - // BundleId is a required field - BundleId *string `locationName:"bundleId" type:"string" required:"true"` + // An array of key-value pairs containing information about the domain entries. + DomainEntries []*DomainEntry `locationName:"domainEntries" type:"list"` - // (Deprecated) The name for your custom image. - // - // In releases prior to June 12, 2017, this parameter was ignored by the API. - // It is now deprecated. - // - // Deprecated: CustomImageName has been deprecated - CustomImageName *string `locationName:"customImageName" deprecated:"true" type:"string"` + // The AWS Region and Availability Zones where the domain recordset was created. + Location *ResourceLocation `locationName:"location" type:"structure"` - // The names to use for your new Lightsail instances. Separate multiple values - // using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"] - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + // The name of the domain. + Name *string `locationName:"name" type:"string"` - // The name of your key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // A launch script you can create that configures a server with additional user - // data. For example, you might want to run apt-get -y update. - // - // Depending on the machine image you choose, the command to get software on - // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu - // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide - // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). - UserData *string `locationName:"userData" type:"string"` + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s CreateInstancesInput) String() string { +func (s Domain) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstancesInput) GoString() string { +func (s Domain) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstancesInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.BlueprintId == nil { - invalidParams.Add(request.NewErrParamRequired("BlueprintId")) - } - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateInstancesInput) SetAvailabilityZone(v string) *CreateInstancesInput { - s.AvailabilityZone = &v +// SetArn sets the Arn field's value. +func (s *Domain) SetArn(v string) *Domain { + s.Arn = &v return s } -// SetBlueprintId sets the BlueprintId field's value. -func (s *CreateInstancesInput) SetBlueprintId(v string) *CreateInstancesInput { - s.BlueprintId = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *Domain) SetCreatedAt(v time.Time) *Domain { + s.CreatedAt = &v return s } -// SetBundleId sets the BundleId field's value. -func (s *CreateInstancesInput) SetBundleId(v string) *CreateInstancesInput { - s.BundleId = &v +// SetDomainEntries sets the DomainEntries field's value. +func (s *Domain) SetDomainEntries(v []*DomainEntry) *Domain { + s.DomainEntries = v return s } -// SetCustomImageName sets the CustomImageName field's value. -func (s *CreateInstancesInput) SetCustomImageName(v string) *CreateInstancesInput { - s.CustomImageName = &v +// SetLocation sets the Location field's value. +func (s *Domain) SetLocation(v *ResourceLocation) *Domain { + s.Location = v return s } -// SetInstanceNames sets the InstanceNames field's value. -func (s *CreateInstancesInput) SetInstanceNames(v []*string) *CreateInstancesInput { - s.InstanceNames = v +// SetName sets the Name field's value. +func (s *Domain) SetName(v string) *Domain { + s.Name = &v return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateInstancesInput) SetKeyPairName(v string) *CreateInstancesInput { - s.KeyPairName = &v +// SetResourceType sets the ResourceType field's value. +func (s *Domain) SetResourceType(v string) *Domain { + s.ResourceType = &v return s } -// SetUserData sets the UserData field's value. -func (s *CreateInstancesInput) SetUserData(v string) *CreateInstancesInput { - s.UserData = &v +// SetSupportCode sets the SupportCode field's value. +func (s *Domain) SetSupportCode(v string) *Domain { + s.SupportCode = &v return s } -type CreateInstancesOutput struct { +// Describes a domain recordset entry. +type DomainEntry struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // create instances request. - Operations []*Operation `locationName:"operations" type:"list"` + // The ID of the domain recordset entry. + Id *string `locationName:"id" type:"string"` + + // When true, specifies whether the domain entry is an alias used by the Lightsail + // load balancer. You can include an alias (A type) record in your request, + // which points to a load balancer DNS name and routes traffic to your load + // balancer + IsAlias *bool `locationName:"isAlias" type:"boolean"` + + // The name of the domain. + Name *string `locationName:"name" type:"string"` + + // (Deprecated) The options for the domain entry. + // + // In releases prior to November 29, 2017, this parameter was not included in + // the API response. It is now deprecated. + // + // Deprecated: Options has been deprecated + Options map[string]*string `locationName:"options" deprecated:"true" type:"map"` + + // The target AWS name server (e.g., ns-111.awsdns-22.com.). + // + // For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com. + // Be sure to also set isAlias to true when setting up an A record for a load + // balancer. + Target *string `locationName:"target" type:"string"` + + // The type of domain entry (e.g., SOA or NS). + Type *string `locationName:"type" type:"string"` } // String returns the string representation -func (s CreateInstancesOutput) String() string { +func (s DomainEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstancesOutput) GoString() string { +func (s DomainEntry) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateInstancesOutput) SetOperations(v []*Operation) *CreateInstancesOutput { - s.Operations = v +// SetId sets the Id field's value. +func (s *DomainEntry) SetId(v string) *DomainEntry { + s.Id = &v return s } -type CreateKeyPairInput struct { - _ struct{} `type:"structure"` - - // The name for your new key pair. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` +// SetIsAlias sets the IsAlias field's value. +func (s *DomainEntry) SetIsAlias(v bool) *DomainEntry { + s.IsAlias = &v + return s } -// String returns the string representation -func (s CreateKeyPairInput) String() string { - return awsutil.Prettify(s) +// SetName sets the Name field's value. +func (s *DomainEntry) SetName(v string) *DomainEntry { + s.Name = &v + return s } -// GoString returns the string representation -func (s CreateKeyPairInput) GoString() string { - return s.String() +// SetOptions sets the Options field's value. +func (s *DomainEntry) SetOptions(v map[string]*string) *DomainEntry { + s.Options = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetTarget sets the Target field's value. +func (s *DomainEntry) SetTarget(v string) *DomainEntry { + s.Target = &v + return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateKeyPairInput) SetKeyPairName(v string) *CreateKeyPairInput { - s.KeyPairName = &v +// SetType sets the Type field's value. +func (s *DomainEntry) SetType(v string) *DomainEntry { + s.Type = &v return s } -type CreateKeyPairOutput struct { +type DownloadDefaultKeyPairInput struct { _ struct{} `type:"structure"` +} - // An array of key-value pairs containing information about the new key pair - // you just created. - KeyPair *KeyPair `locationName:"keyPair" type:"structure"` +// String returns the string representation +func (s DownloadDefaultKeyPairInput) String() string { + return awsutil.Prettify(s) +} - // An array of key-value pairs containing information about the results of your - // create key pair request. - Operation *Operation `locationName:"operation" type:"structure"` +// GoString returns the string representation +func (s DownloadDefaultKeyPairInput) GoString() string { + return s.String() +} + +type DownloadDefaultKeyPairOutput struct { + _ struct{} `type:"structure"` // A base64-encoded RSA private key. PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` @@ -9092,291 +13624,240 @@ type CreateKeyPairOutput struct { } // String returns the string representation -func (s CreateKeyPairOutput) String() string { +func (s DownloadDefaultKeyPairOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateKeyPairOutput) GoString() string { +func (s DownloadDefaultKeyPairOutput) GoString() string { return s.String() } -// SetKeyPair sets the KeyPair field's value. -func (s *CreateKeyPairOutput) SetKeyPair(v *KeyPair) *CreateKeyPairOutput { - s.KeyPair = v - return s -} - -// SetOperation sets the Operation field's value. -func (s *CreateKeyPairOutput) SetOperation(v *Operation) *CreateKeyPairOutput { - s.Operation = v - return s -} - // SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. -func (s *CreateKeyPairOutput) SetPrivateKeyBase64(v string) *CreateKeyPairOutput { +func (s *DownloadDefaultKeyPairOutput) SetPrivateKeyBase64(v string) *DownloadDefaultKeyPairOutput { s.PrivateKeyBase64 = &v return s } // SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *CreateKeyPairOutput) SetPublicKeyBase64(v string) *CreateKeyPairOutput { +func (s *DownloadDefaultKeyPairOutput) SetPublicKeyBase64(v string) *DownloadDefaultKeyPairOutput { s.PublicKeyBase64 = &v return s } -type CreateLoadBalancerInput struct { +type GetActiveNamesInput struct { _ struct{} `type:"structure"` - // The optional alternative domains and subdomains to use with your SSL/TLS - // certificate (e.g., www.example.com, example.com, m.example.com, blog.example.com). - CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` - - // The domain name with which your certificate is associated (e.g., example.com). - // - // If you specify certificateDomainName, then certificateName is required (and - // vice-versa). - CertificateDomainName *string `locationName:"certificateDomainName" type:"string"` - - // The name of the SSL/TLS certificate. - // - // If you specify certificateName, then certificateDomainName is required (and - // vice-versa). - CertificateName *string `locationName:"certificateName" type:"string"` - - // The path you provided to perform the load balancer health check. If you didn't - // specify a health check path, Lightsail uses the root path of your website - // (e.g., "/"). - // - // You may want to specify a custom health check path other than the root of - // your application if your home page loads slowly or has a lot of media or - // scripting on it. - HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` - - // The instance port where you're creating your load balancer. - // - // InstancePort is a required field - InstancePort *int64 `locationName:"instancePort" type:"integer" required:"true"` - - // The name of your load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // A token used for paginating results from your get active names request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s CreateLoadBalancerInput) String() string { +func (s GetActiveNamesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerInput) GoString() string { +func (s GetActiveNamesInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} - if s.InstancePort == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePort")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. -func (s *CreateLoadBalancerInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerInput { - s.CertificateAlternativeNames = v +// SetPageToken sets the PageToken field's value. +func (s *GetActiveNamesInput) SetPageToken(v string) *GetActiveNamesInput { + s.PageToken = &v return s } -// SetCertificateDomainName sets the CertificateDomainName field's value. -func (s *CreateLoadBalancerInput) SetCertificateDomainName(v string) *CreateLoadBalancerInput { - s.CertificateDomainName = &v - return s +type GetActiveNamesOutput struct { + _ struct{} `type:"structure"` + + // The list of active names returned by the get active names request. + ActiveNames []*string `locationName:"activeNames" type:"list"` + + // A token used for advancing to the next page of results from your get active + // names request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } -// SetCertificateName sets the CertificateName field's value. -func (s *CreateLoadBalancerInput) SetCertificateName(v string) *CreateLoadBalancerInput { - s.CertificateName = &v - return s +// String returns the string representation +func (s GetActiveNamesOutput) String() string { + return awsutil.Prettify(s) } -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *CreateLoadBalancerInput) SetHealthCheckPath(v string) *CreateLoadBalancerInput { - s.HealthCheckPath = &v - return s +// GoString returns the string representation +func (s GetActiveNamesOutput) GoString() string { + return s.String() } -// SetInstancePort sets the InstancePort field's value. -func (s *CreateLoadBalancerInput) SetInstancePort(v int64) *CreateLoadBalancerInput { - s.InstancePort = &v +// SetActiveNames sets the ActiveNames field's value. +func (s *GetActiveNamesOutput) SetActiveNames(v []*string) *GetActiveNamesOutput { + s.ActiveNames = v return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalancerInput { - s.LoadBalancerName = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetActiveNamesOutput) SetNextPageToken(v string) *GetActiveNamesOutput { + s.NextPageToken = &v return s } -type CreateLoadBalancerOutput struct { +type GetBlueprintsInput struct { _ struct{} `type:"structure"` - // An object containing information about the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // A Boolean value indicating whether to include inactive results in your request. + IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` + + // A token used for advancing to the next page of results from your get blueprints + // request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s CreateLoadBalancerOutput) String() string { +func (s GetBlueprintsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerOutput) GoString() string { +func (s GetBlueprintsInput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateLoadBalancerOutput) SetOperations(v []*Operation) *CreateLoadBalancerOutput { - s.Operations = v +// SetIncludeInactive sets the IncludeInactive field's value. +func (s *GetBlueprintsInput) SetIncludeInactive(v bool) *GetBlueprintsInput { + s.IncludeInactive = &v return s } -type CreateLoadBalancerTlsCertificateInput struct { - _ struct{} `type:"structure"` - - // An array of strings listing alternative domains and subdomains for your SSL/TLS - // certificate. Lightsail will de-dupe the names for you. You can have a maximum - // of 9 alternative names (in addition to the 1 primary domain). We do not support - // wildcards (e.g., *.example.com). - CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` +// SetPageToken sets the PageToken field's value. +func (s *GetBlueprintsInput) SetPageToken(v string) *GetBlueprintsInput { + s.PageToken = &v + return s +} - // The domain name (e.g., example.com) for your SSL/TLS certificate. - // - // CertificateDomainName is a required field - CertificateDomainName *string `locationName:"certificateDomainName" type:"string" required:"true"` +type GetBlueprintsOutput struct { + _ struct{} `type:"structure"` - // The SSL/TLS certificate name. - // - // You can have up to 10 certificates in your account at one time. Each Lightsail - // load balancer can have up to 2 certificates associated with it at one time. - // There is also an overall limit to the number of certificates that can be - // issue in a 365-day period. For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` + // An array of key-value pairs that contains information about the available + // blueprints. + Blueprints []*Blueprint `locationName:"blueprints" type:"list"` - // The load balancer name where you want to create the SSL/TLS certificate. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // A token used for advancing to the next page of results from your get blueprints + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s CreateLoadBalancerTlsCertificateInput) String() string { +func (s GetBlueprintsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerTlsCertificateInput) GoString() string { +func (s GetBlueprintsOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerTlsCertificateInput"} - if s.CertificateDomainName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateDomainName")) - } - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetBlueprints sets the Blueprints field's value. +func (s *GetBlueprintsOutput) SetBlueprints(v []*Blueprint) *GetBlueprintsOutput { + s.Blueprints = v + return s } -// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateAlternativeNames = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetBlueprintsOutput) SetNextPageToken(v string) *GetBlueprintsOutput { + s.NextPageToken = &v return s } -// SetCertificateDomainName sets the CertificateDomainName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateDomainName(v string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateDomainName = &v - return s +type GetBundlesInput struct { + _ struct{} `type:"structure"` + + // A Boolean value that indicates whether to include inactive bundle results + // in your request. + IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` + + // A token used for advancing to the next page of results from your get bundles + // request. + PageToken *string `locationName:"pageToken" type:"string"` +} + +// String returns the string representation +func (s GetBundlesInput) String() string { + return awsutil.Prettify(s) } -// SetCertificateName sets the CertificateName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateName(v string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateName = &v +// GoString returns the string representation +func (s GetBundlesInput) GoString() string { + return s.String() +} + +// SetIncludeInactive sets the IncludeInactive field's value. +func (s *GetBundlesInput) SetIncludeInactive(v bool) *GetBundlesInput { + s.IncludeInactive = &v return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *CreateLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetBundlesInput) SetPageToken(v string) *GetBundlesInput { + s.PageToken = &v return s } -type CreateLoadBalancerTlsCertificateOutput struct { +type GetBundlesOutput struct { _ struct{} `type:"structure"` - // An object containing information about the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs that contains information about the available + // bundles. + Bundles []*Bundle `locationName:"bundles" type:"list"` + + // A token used for advancing to the next page of results from your get active + // names request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s CreateLoadBalancerTlsCertificateOutput) String() string { +func (s GetBundlesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerTlsCertificateOutput) GoString() string { +func (s GetBundlesOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *CreateLoadBalancerTlsCertificateOutput { - s.Operations = v +// SetBundles sets the Bundles field's value. +func (s *GetBundlesOutput) SetBundles(v []*Bundle) *GetBundlesOutput { + s.Bundles = v return s } -type DeleteDiskInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetBundlesOutput) SetNextPageToken(v string) *GetBundlesOutput { + s.NextPageToken = &v + return s +} + +type GetDiskInput struct { _ struct{} `type:"structure"` - // The unique name of the disk you want to delete (e.g., my-disk). + // The name of the disk (e.g., my-disk). // // DiskName is a required field DiskName *string `locationName:"diskName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteDiskInput) String() string { +func (s GetDiskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskInput) GoString() string { +func (s GetDiskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDiskInput"} +func (s *GetDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDiskInput"} if s.DiskName == nil { invalidParams.Add(request.NewErrParamRequired("DiskName")) } @@ -9388,56 +13869,56 @@ func (s *DeleteDiskInput) Validate() error { } // SetDiskName sets the DiskName field's value. -func (s *DeleteDiskInput) SetDiskName(v string) *DeleteDiskInput { +func (s *GetDiskInput) SetDiskName(v string) *GetDiskInput { s.DiskName = &v return s } -type DeleteDiskOutput struct { +type GetDiskOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An object containing information about the disk. + Disk *Disk `locationName:"disk" type:"structure"` } // String returns the string representation -func (s DeleteDiskOutput) String() string { +func (s GetDiskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskOutput) GoString() string { +func (s GetDiskOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteDiskOutput) SetOperations(v []*Operation) *DeleteDiskOutput { - s.Operations = v +// SetDisk sets the Disk field's value. +func (s *GetDiskOutput) SetDisk(v *Disk) *GetDiskOutput { + s.Disk = v return s } -type DeleteDiskSnapshotInput struct { +type GetDiskSnapshotInput struct { _ struct{} `type:"structure"` - // The name of the disk snapshot you want to delete (e.g., my-disk-snapshot). + // The name of the disk snapshot (e.g., my-disk-snapshot). // // DiskSnapshotName is a required field DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteDiskSnapshotInput) String() string { +func (s GetDiskSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskSnapshotInput) GoString() string { +func (s GetDiskSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDiskSnapshotInput"} +func (s *GetDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDiskSnapshotInput"} if s.DiskSnapshotName == nil { invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) } @@ -9449,64 +13930,170 @@ func (s *DeleteDiskSnapshotInput) Validate() error { } // SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *DeleteDiskSnapshotInput) SetDiskSnapshotName(v string) *DeleteDiskSnapshotInput { +func (s *GetDiskSnapshotInput) SetDiskSnapshotName(v string) *GetDiskSnapshotInput { s.DiskSnapshotName = &v return s } -type DeleteDiskSnapshotOutput struct { +type GetDiskSnapshotOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An object containing information about the disk snapshot. + DiskSnapshot *DiskSnapshot `locationName:"diskSnapshot" type:"structure"` } // String returns the string representation -func (s DeleteDiskSnapshotOutput) String() string { +func (s GetDiskSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskSnapshotOutput) GoString() string { +func (s GetDiskSnapshotOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteDiskSnapshotOutput) SetOperations(v []*Operation) *DeleteDiskSnapshotOutput { - s.Operations = v +// SetDiskSnapshot sets the DiskSnapshot field's value. +func (s *GetDiskSnapshotOutput) SetDiskSnapshot(v *DiskSnapshot) *GetDiskSnapshotOutput { + s.DiskSnapshot = v return s } -type DeleteDomainEntryInput struct { +type GetDiskSnapshotsInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your domain entries. - // - // DomainEntry is a required field - DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` + // A token used for advancing to the next page of results from your GetDiskSnapshots + // request. + PageToken *string `locationName:"pageToken" type:"string"` +} - // The name of the domain entry to delete. +// String returns the string representation +func (s GetDiskSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskSnapshotsInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetDiskSnapshotsInput) SetPageToken(v string) *GetDiskSnapshotsInput { + s.PageToken = &v + return s +} + +type GetDiskSnapshotsOutput struct { + _ struct{} `type:"structure"` + + // An array of objects containing information about all block storage disk snapshots. + DiskSnapshots []*DiskSnapshot `locationName:"diskSnapshots" type:"list"` + + // A token used for advancing to the next page of results from your GetDiskSnapshots + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetDiskSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskSnapshotsOutput) GoString() string { + return s.String() +} + +// SetDiskSnapshots sets the DiskSnapshots field's value. +func (s *GetDiskSnapshotsOutput) SetDiskSnapshots(v []*DiskSnapshot) *GetDiskSnapshotsOutput { + s.DiskSnapshots = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDiskSnapshotsOutput) SetNextPageToken(v string) *GetDiskSnapshotsOutput { + s.NextPageToken = &v + return s +} + +type GetDisksInput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to the next page of results from your GetDisks + // request. + PageToken *string `locationName:"pageToken" type:"string"` +} + +// String returns the string representation +func (s GetDisksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDisksInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetDisksInput) SetPageToken(v string) *GetDisksInput { + s.PageToken = &v + return s +} + +type GetDisksOutput struct { + _ struct{} `type:"structure"` + + // An array of objects containing information about all block storage disks. + Disks []*Disk `locationName:"disks" type:"list"` + + // A token used for advancing to the next page of results from your GetDisks + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetDisksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDisksOutput) GoString() string { + return s.String() +} + +// SetDisks sets the Disks field's value. +func (s *GetDisksOutput) SetDisks(v []*Disk) *GetDisksOutput { + s.Disks = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDisksOutput) SetNextPageToken(v string) *GetDisksOutput { + s.NextPageToken = &v + return s +} + +type GetDomainInput struct { + _ struct{} `type:"structure"` + + // The domain name for which your want to return information about. // // DomainName is a required field DomainName *string `locationName:"domainName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteDomainEntryInput) String() string { +func (s GetDomainInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainEntryInput) GoString() string { +func (s GetDomainInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainEntryInput"} - if s.DomainEntry == nil { - invalidParams.Add(request.NewErrParamRequired("DomainEntry")) - } +func (s *GetDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDomainInput"} if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } @@ -9517,126 +14104,119 @@ func (s *DeleteDomainEntryInput) Validate() error { return nil } -// SetDomainEntry sets the DomainEntry field's value. -func (s *DeleteDomainEntryInput) SetDomainEntry(v *DomainEntry) *DeleteDomainEntryInput { - s.DomainEntry = v - return s -} - // SetDomainName sets the DomainName field's value. -func (s *DeleteDomainEntryInput) SetDomainName(v string) *DeleteDomainEntryInput { +func (s *GetDomainInput) SetDomainName(v string) *GetDomainInput { s.DomainName = &v return s } -type DeleteDomainEntryOutput struct { +type GetDomainOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete domain entry request. - Operation *Operation `locationName:"operation" type:"structure"` + // An array of key-value pairs containing information about your get domain + // request. + Domain *Domain `locationName:"domain" type:"structure"` } // String returns the string representation -func (s DeleteDomainEntryOutput) String() string { +func (s GetDomainOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainEntryOutput) GoString() string { +func (s GetDomainOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *DeleteDomainEntryOutput) SetOperation(v *Operation) *DeleteDomainEntryOutput { - s.Operation = v +// SetDomain sets the Domain field's value. +func (s *GetDomainOutput) SetDomain(v *Domain) *GetDomainOutput { + s.Domain = v return s } -type DeleteDomainInput struct { +type GetDomainsInput struct { _ struct{} `type:"structure"` - // The specific domain name to delete. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // A token used for advancing to the next page of results from your get domains + // request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DeleteDomainInput) String() string { +func (s GetDomainsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainInput) GoString() string { +func (s GetDomainsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { - s.DomainName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetDomainsInput) SetPageToken(v string) *GetDomainsInput { + s.PageToken = &v return s } -type DeleteDomainOutput struct { +type GetDomainsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete domain request. - Operation *Operation `locationName:"operation" type:"structure"` + // An array of key-value pairs containing information about each of the domain + // entries in the user's account. + Domains []*Domain `locationName:"domains" type:"list"` + + // A token used for advancing to the next page of results from your get active + // names request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DeleteDomainOutput) String() string { +func (s GetDomainsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainOutput) GoString() string { +func (s GetDomainsOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *DeleteDomainOutput) SetOperation(v *Operation) *DeleteDomainOutput { - s.Operation = v +// SetDomains sets the Domains field's value. +func (s *GetDomainsOutput) SetDomains(v []*Domain) *GetDomainsOutput { + s.Domains = v return s } -type DeleteInstanceInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDomainsOutput) SetNextPageToken(v string) *GetDomainsOutput { + s.NextPageToken = &v + return s +} + +type GetInstanceAccessDetailsInput struct { _ struct{} `type:"structure"` - // The name of the instance to delete. + // The name of the instance to access. // // InstanceName is a required field InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // The protocol to use to connect to your instance. Defaults to ssh. + Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` } // String returns the string representation -func (s DeleteInstanceInput) String() string { +func (s GetInstanceAccessDetailsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInstanceInput) GoString() string { +func (s GetInstanceAccessDetailsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceInput"} +func (s *GetInstanceAccessDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceAccessDetailsInput"} if s.InstanceName == nil { invalidParams.Add(request.NewErrParamRequired("InstanceName")) } @@ -9648,59 +14228,65 @@ func (s *DeleteInstanceInput) Validate() error { } // SetInstanceName sets the InstanceName field's value. -func (s *DeleteInstanceInput) SetInstanceName(v string) *DeleteInstanceInput { +func (s *GetInstanceAccessDetailsInput) SetInstanceName(v string) *GetInstanceAccessDetailsInput { s.InstanceName = &v return s } -type DeleteInstanceOutput struct { +// SetProtocol sets the Protocol field's value. +func (s *GetInstanceAccessDetailsInput) SetProtocol(v string) *GetInstanceAccessDetailsInput { + s.Protocol = &v + return s +} + +type GetInstanceAccessDetailsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete instance request. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about a get instance access + // request. + AccessDetails *InstanceAccessDetails `locationName:"accessDetails" type:"structure"` } // String returns the string representation -func (s DeleteInstanceOutput) String() string { +func (s GetInstanceAccessDetailsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInstanceOutput) GoString() string { +func (s GetInstanceAccessDetailsOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteInstanceOutput) SetOperations(v []*Operation) *DeleteInstanceOutput { - s.Operations = v +// SetAccessDetails sets the AccessDetails field's value. +func (s *GetInstanceAccessDetailsOutput) SetAccessDetails(v *InstanceAccessDetails) *GetInstanceAccessDetailsOutput { + s.AccessDetails = v return s } -type DeleteInstanceSnapshotInput struct { +type GetInstanceInput struct { _ struct{} `type:"structure"` - // The name of the snapshot to delete. + // The name of the instance. // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteInstanceSnapshotInput) String() string { +func (s GetInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInstanceSnapshotInput) GoString() string { +func (s GetInstanceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceSnapshotInput"} - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) +func (s *GetInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) } if invalidParams.Len() > 0 { @@ -9709,60 +14295,87 @@ func (s *DeleteInstanceSnapshotInput) Validate() error { return nil } -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *DeleteInstanceSnapshotInput) SetInstanceSnapshotName(v string) *DeleteInstanceSnapshotInput { - s.InstanceSnapshotName = &v +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstanceInput) SetInstanceName(v string) *GetInstanceInput { + s.InstanceName = &v return s } -type DeleteInstanceSnapshotOutput struct { +type GetInstanceMetricDataInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete instance snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` -} + // The end time of the time period. + // + // EndTime is a required field + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` -// String returns the string representation -func (s DeleteInstanceSnapshotOutput) String() string { - return awsutil.Prettify(s) -} + // The name of the instance for which you want to get metrics data. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -// GoString returns the string representation -func (s DeleteInstanceSnapshotOutput) GoString() string { - return s.String() -} + // The metric name to get data about. + // + // MetricName is a required field + MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"InstanceMetricName"` -// SetOperations sets the Operations field's value. -func (s *DeleteInstanceSnapshotOutput) SetOperations(v []*Operation) *DeleteInstanceSnapshotOutput { - s.Operations = v - return s -} + // The granularity, in seconds, of the returned data points. + // + // Period is a required field + Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` -type DeleteKeyPairInput struct { - _ struct{} `type:"structure"` + // The start time of the time period. + // + // StartTime is a required field + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - // The name of the key pair to delete. + // The instance statistics. // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + // Statistics is a required field + Statistics []*string `locationName:"statistics" type:"list" required:"true"` + + // The unit. The list of valid values is below. + // + // Unit is a required field + Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` } // String returns the string representation -func (s DeleteKeyPairInput) String() string { +func (s GetInstanceMetricDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteKeyPairInput) GoString() string { +func (s GetInstanceMetricDataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) +func (s *GetInstanceMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceMetricDataInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.Period == nil { + invalidParams.Add(request.NewErrParamRequired("Period")) + } + if s.Period != nil && *s.Period < 60 { + invalidParams.Add(request.NewErrParamMinValue("Period", 60)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + if s.Statistics == nil { + invalidParams.Add(request.NewErrParamRequired("Statistics")) + } + if s.Unit == nil { + invalidParams.Add(request.NewErrParamRequired("Unit")) } if invalidParams.Len() > 0 { @@ -9771,136 +14384,128 @@ func (s *DeleteKeyPairInput) Validate() error { return nil } -// SetKeyPairName sets the KeyPairName field's value. -func (s *DeleteKeyPairInput) SetKeyPairName(v string) *DeleteKeyPairInput { - s.KeyPairName = &v +// SetEndTime sets the EndTime field's value. +func (s *GetInstanceMetricDataInput) SetEndTime(v time.Time) *GetInstanceMetricDataInput { + s.EndTime = &v return s } -type DeleteKeyPairOutput struct { - _ struct{} `type:"structure"` +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstanceMetricDataInput) SetInstanceName(v string) *GetInstanceMetricDataInput { + s.InstanceName = &v + return s +} - // An array of key-value pairs containing information about the results of your - // delete key pair request. - Operation *Operation `locationName:"operation" type:"structure"` +// SetMetricName sets the MetricName field's value. +func (s *GetInstanceMetricDataInput) SetMetricName(v string) *GetInstanceMetricDataInput { + s.MetricName = &v + return s } -// String returns the string representation -func (s DeleteKeyPairOutput) String() string { - return awsutil.Prettify(s) +// SetPeriod sets the Period field's value. +func (s *GetInstanceMetricDataInput) SetPeriod(v int64) *GetInstanceMetricDataInput { + s.Period = &v + return s } -// GoString returns the string representation -func (s DeleteKeyPairOutput) GoString() string { - return s.String() +// SetStartTime sets the StartTime field's value. +func (s *GetInstanceMetricDataInput) SetStartTime(v time.Time) *GetInstanceMetricDataInput { + s.StartTime = &v + return s +} + +// SetStatistics sets the Statistics field's value. +func (s *GetInstanceMetricDataInput) SetStatistics(v []*string) *GetInstanceMetricDataInput { + s.Statistics = v + return s } -// SetOperation sets the Operation field's value. -func (s *DeleteKeyPairOutput) SetOperation(v *Operation) *DeleteKeyPairOutput { - s.Operation = v +// SetUnit sets the Unit field's value. +func (s *GetInstanceMetricDataInput) SetUnit(v string) *GetInstanceMetricDataInput { + s.Unit = &v return s } -type DeleteLoadBalancerInput struct { +type GetInstanceMetricDataOutput struct { _ struct{} `type:"structure"` - // The name of the load balancer you want to delete. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // An array of key-value pairs containing information about the results of your + // get instance metric data request. + MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` + + // The metric name to return data for. + MetricName *string `locationName:"metricName" type:"string" enum:"InstanceMetricName"` } // String returns the string representation -func (s DeleteLoadBalancerInput) String() string { +func (s GetInstanceMetricDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerInput) GoString() string { +func (s GetInstanceMetricDataOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMetricData sets the MetricData field's value. +func (s *GetInstanceMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetInstanceMetricDataOutput { + s.MetricData = v + return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerInput) SetLoadBalancerName(v string) *DeleteLoadBalancerInput { - s.LoadBalancerName = &v +// SetMetricName sets the MetricName field's value. +func (s *GetInstanceMetricDataOutput) SetMetricName(v string) *GetInstanceMetricDataOutput { + s.MetricName = &v return s } -type DeleteLoadBalancerOutput struct { +type GetInstanceOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the specified instance. + Instance *Instance `locationName:"instance" type:"structure"` } // String returns the string representation -func (s DeleteLoadBalancerOutput) String() string { +func (s GetInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerOutput) GoString() string { +func (s GetInstanceOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteLoadBalancerOutput) SetOperations(v []*Operation) *DeleteLoadBalancerOutput { - s.Operations = v +// SetInstance sets the Instance field's value. +func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { + s.Instance = v return s } -type DeleteLoadBalancerTlsCertificateInput struct { +type GetInstancePortStatesInput struct { _ struct{} `type:"structure"` - // The SSL/TLS certificate name. - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // When true, forces the deletion of an SSL/TLS certificate. - // - // There can be two certificates associated with a Lightsail load balancer: - // the primary and the backup. The force parameter is required when the primary - // SSL/TLS certificate is in use by an instance attached to the load balancer. - Force *bool `locationName:"force" type:"boolean"` - - // The load balancer name. + // The name of the instance. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteLoadBalancerTlsCertificateInput) String() string { +func (s GetInstancePortStatesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerTlsCertificateInput) GoString() string { +func (s GetInstancePortStatesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerTlsCertificateInput"} - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *GetInstancePortStatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstancePortStatesInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) } if invalidParams.Len() > 0 { @@ -9909,72 +14514,59 @@ func (s *DeleteLoadBalancerTlsCertificateInput) Validate() error { return nil } -// SetCertificateName sets the CertificateName field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetCertificateName(v string) *DeleteLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetForce(v bool) *DeleteLoadBalancerTlsCertificateInput { - s.Force = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *DeleteLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstancePortStatesInput) SetInstanceName(v string) *GetInstancePortStatesInput { + s.InstanceName = &v return s } -type DeleteLoadBalancerTlsCertificateOutput struct { +type GetInstancePortStatesOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // Information about the port states resulting from your request. + PortStates []*InstancePortState `locationName:"portStates" type:"list"` } // String returns the string representation -func (s DeleteLoadBalancerTlsCertificateOutput) String() string { +func (s GetInstancePortStatesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerTlsCertificateOutput) GoString() string { +func (s GetInstancePortStatesOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *DeleteLoadBalancerTlsCertificateOutput { - s.Operations = v +// SetPortStates sets the PortStates field's value. +func (s *GetInstancePortStatesOutput) SetPortStates(v []*InstancePortState) *GetInstancePortStatesOutput { + s.PortStates = v return s } -type DetachDiskInput struct { +type GetInstanceSnapshotInput struct { _ struct{} `type:"structure"` - // The unique name of the disk you want to detach from your instance (e.g., - // my-disk). + // The name of the snapshot for which you are requesting information. // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s DetachDiskInput) String() string { +func (s GetInstanceSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachDiskInput) GoString() string { +func (s GetInstanceSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DetachDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) +func (s *GetInstanceSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceSnapshotInput"} + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) } if invalidParams.Len() > 0 { @@ -9983,135 +14575,118 @@ func (s *DetachDiskInput) Validate() error { return nil } -// SetDiskName sets the DiskName field's value. -func (s *DetachDiskInput) SetDiskName(v string) *DetachDiskInput { - s.DiskName = &v +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *GetInstanceSnapshotInput) SetInstanceSnapshotName(v string) *GetInstanceSnapshotInput { + s.InstanceSnapshotName = &v return s } -type DetachDiskOutput struct { +type GetInstanceSnapshotOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the results of your + // get instance snapshot request. + InstanceSnapshot *InstanceSnapshot `locationName:"instanceSnapshot" type:"structure"` } // String returns the string representation -func (s DetachDiskOutput) String() string { +func (s GetInstanceSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachDiskOutput) GoString() string { +func (s GetInstanceSnapshotOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DetachDiskOutput) SetOperations(v []*Operation) *DetachDiskOutput { - s.Operations = v +// SetInstanceSnapshot sets the InstanceSnapshot field's value. +func (s *GetInstanceSnapshotOutput) SetInstanceSnapshot(v *InstanceSnapshot) *GetInstanceSnapshotOutput { + s.InstanceSnapshot = v return s } -type DetachInstancesFromLoadBalancerInput struct { +type GetInstanceSnapshotsInput struct { _ struct{} `type:"structure"` - // An array of strings containing the names of the instances you want to detach - // from the load balancer. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The name of the Lightsail load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // A token used for advancing to the next page of results from your get instance + // snapshots request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DetachInstancesFromLoadBalancerInput) String() string { +func (s GetInstanceSnapshotsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachInstancesFromLoadBalancerInput) GoString() string { +func (s GetInstanceSnapshotsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachInstancesFromLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachInstancesFromLoadBalancerInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *DetachInstancesFromLoadBalancerInput) SetInstanceNames(v []*string) *DetachInstancesFromLoadBalancerInput { - s.InstanceNames = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DetachInstancesFromLoadBalancerInput) SetLoadBalancerName(v string) *DetachInstancesFromLoadBalancerInput { - s.LoadBalancerName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetInstanceSnapshotsInput) SetPageToken(v string) *GetInstanceSnapshotsInput { + s.PageToken = &v return s } -type DetachInstancesFromLoadBalancerOutput struct { +type GetInstanceSnapshotsOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the results of your + // get instance snapshots request. + InstanceSnapshots []*InstanceSnapshot `locationName:"instanceSnapshots" type:"list"` + + // A token used for advancing to the next page of results from your get instance + // snapshots request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DetachInstancesFromLoadBalancerOutput) String() string { +func (s GetInstanceSnapshotsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachInstancesFromLoadBalancerOutput) GoString() string { +func (s GetInstanceSnapshotsOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DetachInstancesFromLoadBalancerOutput) SetOperations(v []*Operation) *DetachInstancesFromLoadBalancerOutput { - s.Operations = v +// SetInstanceSnapshots sets the InstanceSnapshots field's value. +func (s *GetInstanceSnapshotsOutput) SetInstanceSnapshots(v []*InstanceSnapshot) *GetInstanceSnapshotsOutput { + s.InstanceSnapshots = v return s } -type DetachStaticIpInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetInstanceSnapshotsOutput) SetNextPageToken(v string) *GetInstanceSnapshotsOutput { + s.NextPageToken = &v + return s +} + +type GetInstanceStateInput struct { _ struct{} `type:"structure"` - // The name of the static IP to detach from the instance. + // The name of the instance to get state information about. // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s DetachStaticIpInput) String() string { +func (s GetInstanceStateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachStaticIpInput) GoString() string { +func (s GetInstanceStateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DetachStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) +func (s *GetInstanceStateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceStateInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) } if invalidParams.Len() > 0 { @@ -10120,1008 +14695,1234 @@ func (s *DetachStaticIpInput) Validate() error { return nil } -// SetStaticIpName sets the StaticIpName field's value. -func (s *DetachStaticIpInput) SetStaticIpName(v string) *DetachStaticIpInput { - s.StaticIpName = &v +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstanceStateInput) SetInstanceName(v string) *GetInstanceStateInput { + s.InstanceName = &v return s } -type DetachStaticIpOutput struct { +type GetInstanceStateOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // detach static IP request. - Operations []*Operation `locationName:"operations" type:"list"` + // The state of the instance. + State *InstanceState `locationName:"state" type:"structure"` } // String returns the string representation -func (s DetachStaticIpOutput) String() string { +func (s GetInstanceStateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachStaticIpOutput) GoString() string { +func (s GetInstanceStateOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DetachStaticIpOutput) SetOperations(v []*Operation) *DetachStaticIpOutput { - s.Operations = v +// SetState sets the State field's value. +func (s *GetInstanceStateOutput) SetState(v *InstanceState) *GetInstanceStateOutput { + s.State = v return s } -// Describes a system disk or an block storage disk. -type Disk struct { +type GetInstancesInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the disk. - Arn *string `locationName:"arn" type:"string"` - - // The resources to which the disk is attached. - AttachedTo *string `locationName:"attachedTo" type:"string"` - - // (Deprecated) The attachment state of the disk. - // - // In releases prior to November 14, 2017, this parameter returned attached - // for system disks in the API response. It is now deprecated, but still included - // in the response. Use isAttached instead. - // - // Deprecated: AttachmentState has been deprecated - AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` + // A token used for advancing to the next page of results from your get instances + // request. + PageToken *string `locationName:"pageToken" type:"string"` +} - // The date when the disk was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` +// String returns the string representation +func (s GetInstancesInput) String() string { + return awsutil.Prettify(s) +} - // (Deprecated) The number of GB in use by the disk. - // - // In releases prior to November 14, 2017, this parameter was not included in - // the API response. It is now deprecated. - // - // Deprecated: GbInUse has been deprecated - GbInUse *int64 `locationName:"gbInUse" deprecated:"true" type:"integer"` +// GoString returns the string representation +func (s GetInstancesInput) GoString() string { + return s.String() +} - // The input/output operations per second (IOPS) of the disk. - Iops *int64 `locationName:"iops" type:"integer"` +// SetPageToken sets the PageToken field's value. +func (s *GetInstancesInput) SetPageToken(v string) *GetInstancesInput { + s.PageToken = &v + return s +} - // A Boolean value indicating whether the disk is attached. - IsAttached *bool `locationName:"isAttached" type:"boolean"` +type GetInstancesOutput struct { + _ struct{} `type:"structure"` - // A Boolean value indicating whether this disk is a system disk (has an operating - // system loaded on it). - IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` + // An array of key-value pairs containing information about your instances. + Instances []*Instance `locationName:"instances" type:"list"` - // The AWS Region and Availability Zone where the disk is located. - Location *ResourceLocation `locationName:"location" type:"structure"` + // A token used for advancing to the next page of results from your get instances + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} - // The unique name of the disk. - Name *string `locationName:"name" type:"string"` +// String returns the string representation +func (s GetInstancesOutput) String() string { + return awsutil.Prettify(s) +} - // The disk path. - Path *string `locationName:"path" type:"string"` +// GoString returns the string representation +func (s GetInstancesOutput) GoString() string { + return s.String() +} - // The Lightsail resource type (e.g., Disk). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +// SetInstances sets the Instances field's value. +func (s *GetInstancesOutput) SetInstances(v []*Instance) *GetInstancesOutput { + s.Instances = v + return s +} - // The size of the disk in GB. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetInstancesOutput) SetNextPageToken(v string) *GetInstancesOutput { + s.NextPageToken = &v + return s +} - // Describes the status of the disk. - State *string `locationName:"state" type:"string" enum:"DiskState"` +type GetKeyPairInput struct { + _ struct{} `type:"structure"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The name of the key pair for which you are requesting information. + // + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` } // String returns the string representation -func (s Disk) String() string { +func (s GetKeyPairInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Disk) GoString() string { +func (s GetKeyPairInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Disk) SetArn(v string) *Disk { - s.Arn = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetAttachedTo sets the AttachedTo field's value. -func (s *Disk) SetAttachedTo(v string) *Disk { - s.AttachedTo = &v +// SetKeyPairName sets the KeyPairName field's value. +func (s *GetKeyPairInput) SetKeyPairName(v string) *GetKeyPairInput { + s.KeyPairName = &v return s } -// SetAttachmentState sets the AttachmentState field's value. -func (s *Disk) SetAttachmentState(v string) *Disk { - s.AttachmentState = &v - return s +type GetKeyPairOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the key pair. + KeyPair *KeyPair `locationName:"keyPair" type:"structure"` } -// SetCreatedAt sets the CreatedAt field's value. -func (s *Disk) SetCreatedAt(v time.Time) *Disk { - s.CreatedAt = &v - return s +// String returns the string representation +func (s GetKeyPairOutput) String() string { + return awsutil.Prettify(s) } -// SetGbInUse sets the GbInUse field's value. -func (s *Disk) SetGbInUse(v int64) *Disk { - s.GbInUse = &v - return s +// GoString returns the string representation +func (s GetKeyPairOutput) GoString() string { + return s.String() } -// SetIops sets the Iops field's value. -func (s *Disk) SetIops(v int64) *Disk { - s.Iops = &v +// SetKeyPair sets the KeyPair field's value. +func (s *GetKeyPairOutput) SetKeyPair(v *KeyPair) *GetKeyPairOutput { + s.KeyPair = v return s } -// SetIsAttached sets the IsAttached field's value. -func (s *Disk) SetIsAttached(v bool) *Disk { - s.IsAttached = &v - return s +type GetKeyPairsInput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to the next page of results from your get key + // pairs request. + PageToken *string `locationName:"pageToken" type:"string"` } -// SetIsSystemDisk sets the IsSystemDisk field's value. -func (s *Disk) SetIsSystemDisk(v bool) *Disk { - s.IsSystemDisk = &v - return s +// String returns the string representation +func (s GetKeyPairsInput) String() string { + return awsutil.Prettify(s) } -// SetLocation sets the Location field's value. -func (s *Disk) SetLocation(v *ResourceLocation) *Disk { - s.Location = v - return s +// GoString returns the string representation +func (s GetKeyPairsInput) GoString() string { + return s.String() } -// SetName sets the Name field's value. -func (s *Disk) SetName(v string) *Disk { - s.Name = &v +// SetPageToken sets the PageToken field's value. +func (s *GetKeyPairsInput) SetPageToken(v string) *GetKeyPairsInput { + s.PageToken = &v return s } -// SetPath sets the Path field's value. -func (s *Disk) SetPath(v string) *Disk { - s.Path = &v - return s +type GetKeyPairsOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the key pairs. + KeyPairs []*KeyPair `locationName:"keyPairs" type:"list"` + + // A token used for advancing to the next page of results from your get key + // pairs request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } -// SetResourceType sets the ResourceType field's value. -func (s *Disk) SetResourceType(v string) *Disk { - s.ResourceType = &v - return s +// String returns the string representation +func (s GetKeyPairsOutput) String() string { + return awsutil.Prettify(s) } -// SetSizeInGb sets the SizeInGb field's value. -func (s *Disk) SetSizeInGb(v int64) *Disk { - s.SizeInGb = &v - return s +// GoString returns the string representation +func (s GetKeyPairsOutput) GoString() string { + return s.String() } -// SetState sets the State field's value. -func (s *Disk) SetState(v string) *Disk { - s.State = &v +// SetKeyPairs sets the KeyPairs field's value. +func (s *GetKeyPairsOutput) SetKeyPairs(v []*KeyPair) *GetKeyPairsOutput { + s.KeyPairs = v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *Disk) SetSupportCode(v string) *Disk { - s.SupportCode = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetKeyPairsOutput) SetNextPageToken(v string) *GetKeyPairsOutput { + s.NextPageToken = &v return s } -// Describes a block storage disk mapping. -type DiskMap struct { +type GetLoadBalancerInput struct { _ struct{} `type:"structure"` - // The new disk name (e.g., my-new-disk). - NewDiskName *string `locationName:"newDiskName" type:"string"` - - // The original disk path exposed to the instance (for example, /dev/sdh). - OriginalDiskPath *string `locationName:"originalDiskPath" type:"string"` + // The name of the load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } // String returns the string representation -func (s DiskMap) String() string { +func (s GetLoadBalancerInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DiskMap) GoString() string { +func (s GetLoadBalancerInput) GoString() string { return s.String() } -// SetNewDiskName sets the NewDiskName field's value. -func (s *DiskMap) SetNewDiskName(v string) *DiskMap { - s.NewDiskName = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetOriginalDiskPath sets the OriginalDiskPath field's value. -func (s *DiskMap) SetOriginalDiskPath(v string) *DiskMap { - s.OriginalDiskPath = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *GetLoadBalancerInput) SetLoadBalancerName(v string) *GetLoadBalancerInput { + s.LoadBalancerName = &v return s } -// Describes a block storage disk snapshot. -type DiskSnapshot struct { +type GetLoadBalancerMetricDataInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the disk snapshot. - Arn *string `locationName:"arn" type:"string"` - - // The date when the disk snapshot was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The Amazon Resource Name (ARN) of the source disk from which you are creating - // the disk snapshot. - FromDiskArn *string `locationName:"fromDiskArn" type:"string"` - - // The unique name of the source disk from which you are creating the disk snapshot. - FromDiskName *string `locationName:"fromDiskName" type:"string"` - - // The AWS Region and Availability Zone where the disk snapshot was created. - Location *ResourceLocation `locationName:"location" type:"structure"` + // The end time of the period. + // + // EndTime is a required field + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` - // The name of the disk snapshot (e.g., my-disk-snapshot). - Name *string `locationName:"name" type:"string"` + // The name of the load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` - // The progress of the disk snapshot operation. - Progress *string `locationName:"progress" type:"string"` + // The metric about which you want to return information. Valid values are listed + // below, along with the most useful statistics to include in your request. + // + // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated + // by the client that did not establish a session with the load balancer. + // Possible causes include a mismatch of ciphers or protocols. + // + // Statistics: The most useful statistic is Sum. + // + // * HealthyHostCount - The number of target instances that are considered + // healthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * UnhealthyHostCount - The number of target instances that are considered + // unhealthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that + // originate from the load balancer. Client errors are generated when requests + // are malformed or incomplete. These requests have not been received by + // the target instance. This count does not include any response codes generated + // by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that + // originate from the load balancer. This count does not include any response + // codes generated by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. Note that Minimum, Maximum, and Average all + // return 1. + // + // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * InstanceResponseTime - The time elapsed, in seconds, after the request + // leaves the load balancer until a response from the target instance is + // received. + // + // Statistics: The most useful statistic is Average. + // + // * RejectedConnectionCount - The number of connections that were rejected + // because the load balancer had reached its maximum number of connections. + // + // Statistics: The most useful statistic is Sum. + // + // * RequestCount - The number of requests processed over IPv4. This count + // includes only the requests with a response generated by a target instance + // of the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // MetricName is a required field + MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"LoadBalancerMetricName"` - // The Lightsail resource type (e.g., DiskSnapshot). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + // The granularity, in seconds, of the returned data points. + // + // Period is a required field + Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` - // The size of the disk in GB. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + // The start time of the period. + // + // StartTime is a required field + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - // The status of the disk snapshot operation. - State *string `locationName:"state" type:"string" enum:"DiskSnapshotState"` + // An array of statistics that you want to request metrics for. Valid values + // are listed below. + // + // * SampleCount - The count (number) of data points used for the statistical + // calculation. + // + // * Average - The value of Sum / SampleCount during the specified period. + // By comparing this statistic with the Minimum and Maximum, you can determine + // the full scope of a metric and how close the average use is to the Minimum + // and Maximum. This comparison helps you to know when to increase or decrease + // your resources as needed. + // + // * Sum - All values submitted for the matching metric added together. This + // statistic can be useful for determining the total volume of a metric. + // + // * Minimum - The lowest value observed during the specified period. You + // can use this value to determine low volumes of activity for your application. + // + // * Maximum - The highest value observed during the specified period. You + // can use this value to determine high volumes of activity for your application. + // + // Statistics is a required field + Statistics []*string `locationName:"statistics" type:"list" required:"true"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The unit for the time period request. Valid values are listed below. + // + // Unit is a required field + Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` } // String returns the string representation -func (s DiskSnapshot) String() string { +func (s GetLoadBalancerMetricDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DiskSnapshot) GoString() string { +func (s GetLoadBalancerMetricDataInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *DiskSnapshot) SetArn(v string) *DiskSnapshot { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *DiskSnapshot) SetCreatedAt(v time.Time) *DiskSnapshot { - s.CreatedAt = &v - return s -} - -// SetFromDiskArn sets the FromDiskArn field's value. -func (s *DiskSnapshot) SetFromDiskArn(v string) *DiskSnapshot { - s.FromDiskArn = &v - return s -} - -// SetFromDiskName sets the FromDiskName field's value. -func (s *DiskSnapshot) SetFromDiskName(v string) *DiskSnapshot { - s.FromDiskName = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoadBalancerMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerMetricDataInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.Period == nil { + invalidParams.Add(request.NewErrParamRequired("Period")) + } + if s.Period != nil && *s.Period < 60 { + invalidParams.Add(request.NewErrParamMinValue("Period", 60)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + if s.Statistics == nil { + invalidParams.Add(request.NewErrParamRequired("Statistics")) + } + if s.Unit == nil { + invalidParams.Add(request.NewErrParamRequired("Unit")) + } -// SetLocation sets the Location field's value. -func (s *DiskSnapshot) SetLocation(v *ResourceLocation) *DiskSnapshot { - s.Location = v + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *GetLoadBalancerMetricDataInput) SetEndTime(v time.Time) *GetLoadBalancerMetricDataInput { + s.EndTime = &v return s } -// SetName sets the Name field's value. -func (s *DiskSnapshot) SetName(v string) *DiskSnapshot { - s.Name = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *GetLoadBalancerMetricDataInput) SetLoadBalancerName(v string) *GetLoadBalancerMetricDataInput { + s.LoadBalancerName = &v return s } -// SetProgress sets the Progress field's value. -func (s *DiskSnapshot) SetProgress(v string) *DiskSnapshot { - s.Progress = &v +// SetMetricName sets the MetricName field's value. +func (s *GetLoadBalancerMetricDataInput) SetMetricName(v string) *GetLoadBalancerMetricDataInput { + s.MetricName = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *DiskSnapshot) SetResourceType(v string) *DiskSnapshot { - s.ResourceType = &v +// SetPeriod sets the Period field's value. +func (s *GetLoadBalancerMetricDataInput) SetPeriod(v int64) *GetLoadBalancerMetricDataInput { + s.Period = &v return s } -// SetSizeInGb sets the SizeInGb field's value. -func (s *DiskSnapshot) SetSizeInGb(v int64) *DiskSnapshot { - s.SizeInGb = &v +// SetStartTime sets the StartTime field's value. +func (s *GetLoadBalancerMetricDataInput) SetStartTime(v time.Time) *GetLoadBalancerMetricDataInput { + s.StartTime = &v return s } -// SetState sets the State field's value. -func (s *DiskSnapshot) SetState(v string) *DiskSnapshot { - s.State = &v +// SetStatistics sets the Statistics field's value. +func (s *GetLoadBalancerMetricDataInput) SetStatistics(v []*string) *GetLoadBalancerMetricDataInput { + s.Statistics = v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *DiskSnapshot) SetSupportCode(v string) *DiskSnapshot { - s.SupportCode = &v +// SetUnit sets the Unit field's value. +func (s *GetLoadBalancerMetricDataInput) SetUnit(v string) *GetLoadBalancerMetricDataInput { + s.Unit = &v return s } -// Describes a domain where you are storing recordsets in Lightsail. -type Domain struct { +type GetLoadBalancerMetricDataOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The date when the domain recordset was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // An array of key-value pairs containing information about the domain entries. - DomainEntries []*DomainEntry `locationName:"domainEntries" type:"list"` - - // The AWS Region and Availability Zones where the domain recordset was created. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the domain. - Name *string `locationName:"name" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + // An array of metric datapoint objects. + MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The metric about which you are receiving information. Valid values are listed + // below, along with the most useful statistics to include in your request. + // + // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated + // by the client that did not establish a session with the load balancer. + // Possible causes include a mismatch of ciphers or protocols. + // + // Statistics: The most useful statistic is Sum. + // + // * HealthyHostCount - The number of target instances that are considered + // healthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * UnhealthyHostCount - The number of target instances that are considered + // unhealthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that + // originate from the load balancer. Client errors are generated when requests + // are malformed or incomplete. These requests have not been received by + // the target instance. This count does not include any response codes generated + // by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that + // originate from the load balancer. This count does not include any response + // codes generated by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. Note that Minimum, Maximum, and Average all + // return 1. + // + // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * InstanceResponseTime - The time elapsed, in seconds, after the request + // leaves the load balancer until a response from the target instance is + // received. + // + // Statistics: The most useful statistic is Average. + // + // * RejectedConnectionCount - The number of connections that were rejected + // because the load balancer had reached its maximum number of connections. + // + // Statistics: The most useful statistic is Sum. + // + // * RequestCount - The number of requests processed over IPv4. This count + // includes only the requests with a response generated by a target instance + // of the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + MetricName *string `locationName:"metricName" type:"string" enum:"LoadBalancerMetricName"` } // String returns the string representation -func (s Domain) String() string { +func (s GetLoadBalancerMetricDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Domain) GoString() string { +func (s GetLoadBalancerMetricDataOutput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Domain) SetArn(v string) *Domain { - s.Arn = &v +// SetMetricData sets the MetricData field's value. +func (s *GetLoadBalancerMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetLoadBalancerMetricDataOutput { + s.MetricData = v return s } -// SetCreatedAt sets the CreatedAt field's value. -func (s *Domain) SetCreatedAt(v time.Time) *Domain { - s.CreatedAt = &v +// SetMetricName sets the MetricName field's value. +func (s *GetLoadBalancerMetricDataOutput) SetMetricName(v string) *GetLoadBalancerMetricDataOutput { + s.MetricName = &v return s } -// SetDomainEntries sets the DomainEntries field's value. -func (s *Domain) SetDomainEntries(v []*DomainEntry) *Domain { - s.DomainEntries = v - return s -} +type GetLoadBalancerOutput struct { + _ struct{} `type:"structure"` -// SetLocation sets the Location field's value. -func (s *Domain) SetLocation(v *ResourceLocation) *Domain { - s.Location = v - return s + // An object containing information about your load balancer. + LoadBalancer *LoadBalancer `locationName:"loadBalancer" type:"structure"` } -// SetName sets the Name field's value. -func (s *Domain) SetName(v string) *Domain { - s.Name = &v - return s +// String returns the string representation +func (s GetLoadBalancerOutput) String() string { + return awsutil.Prettify(s) } -// SetResourceType sets the ResourceType field's value. -func (s *Domain) SetResourceType(v string) *Domain { - s.ResourceType = &v - return s +// GoString returns the string representation +func (s GetLoadBalancerOutput) GoString() string { + return s.String() } -// SetSupportCode sets the SupportCode field's value. -func (s *Domain) SetSupportCode(v string) *Domain { - s.SupportCode = &v +// SetLoadBalancer sets the LoadBalancer field's value. +func (s *GetLoadBalancerOutput) SetLoadBalancer(v *LoadBalancer) *GetLoadBalancerOutput { + s.LoadBalancer = v return s } -// Describes a domain recordset entry. -type DomainEntry struct { +type GetLoadBalancerTlsCertificatesInput struct { _ struct{} `type:"structure"` - // The ID of the domain recordset entry. - Id *string `locationName:"id" type:"string"` - - // When true, specifies whether the domain entry is an alias used by the Lightsail - // load balancer. You can include an alias (A type) record in your request, - // which points to a load balancer DNS name and routes traffic to your load - // balancer - IsAlias *bool `locationName:"isAlias" type:"boolean"` - - // The name of the domain. - Name *string `locationName:"name" type:"string"` - - // (Deprecated) The options for the domain entry. - // - // In releases prior to November 29, 2017, this parameter was not included in - // the API response. It is now deprecated. - // - // Deprecated: Options has been deprecated - Options map[string]*string `locationName:"options" deprecated:"true" type:"map"` - - // The target AWS name server (e.g., ns-111.awsdns-22.com.). + // The name of the load balancer you associated with your SSL/TLS certificate. // - // For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com. - // Be sure to also set isAlias to true when setting up an A record for a load - // balancer. - Target *string `locationName:"target" type:"string"` - - // The type of domain entry (e.g., SOA or NS). - Type *string `locationName:"type" type:"string"` + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } // String returns the string representation -func (s DomainEntry) String() string { +func (s GetLoadBalancerTlsCertificatesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DomainEntry) GoString() string { +func (s GetLoadBalancerTlsCertificatesInput) GoString() string { return s.String() } -// SetId sets the Id field's value. -func (s *DomainEntry) SetId(v string) *DomainEntry { - s.Id = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoadBalancerTlsCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerTlsCertificatesInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetIsAlias sets the IsAlias field's value. -func (s *DomainEntry) SetIsAlias(v bool) *DomainEntry { - s.IsAlias = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *GetLoadBalancerTlsCertificatesInput) SetLoadBalancerName(v string) *GetLoadBalancerTlsCertificatesInput { + s.LoadBalancerName = &v return s } -// SetName sets the Name field's value. -func (s *DomainEntry) SetName(v string) *DomainEntry { - s.Name = &v - return s +type GetLoadBalancerTlsCertificatesOutput struct { + _ struct{} `type:"structure"` + + // An array of LoadBalancerTlsCertificate objects describing your SSL/TLS certificates. + TlsCertificates []*LoadBalancerTlsCertificate `locationName:"tlsCertificates" type:"list"` } -// SetOptions sets the Options field's value. -func (s *DomainEntry) SetOptions(v map[string]*string) *DomainEntry { - s.Options = v - return s +// String returns the string representation +func (s GetLoadBalancerTlsCertificatesOutput) String() string { + return awsutil.Prettify(s) } -// SetTarget sets the Target field's value. -func (s *DomainEntry) SetTarget(v string) *DomainEntry { - s.Target = &v - return s +// GoString returns the string representation +func (s GetLoadBalancerTlsCertificatesOutput) GoString() string { + return s.String() } -// SetType sets the Type field's value. -func (s *DomainEntry) SetType(v string) *DomainEntry { - s.Type = &v +// SetTlsCertificates sets the TlsCertificates field's value. +func (s *GetLoadBalancerTlsCertificatesOutput) SetTlsCertificates(v []*LoadBalancerTlsCertificate) *GetLoadBalancerTlsCertificatesOutput { + s.TlsCertificates = v return s } -type DownloadDefaultKeyPairInput struct { +type GetLoadBalancersInput struct { _ struct{} `type:"structure"` + + // A token used for paginating the results from your GetLoadBalancers request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DownloadDefaultKeyPairInput) String() string { +func (s GetLoadBalancersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DownloadDefaultKeyPairInput) GoString() string { +func (s GetLoadBalancersInput) GoString() string { return s.String() } -type DownloadDefaultKeyPairOutput struct { +// SetPageToken sets the PageToken field's value. +func (s *GetLoadBalancersInput) SetPageToken(v string) *GetLoadBalancersInput { + s.PageToken = &v + return s +} + +type GetLoadBalancersOutput struct { _ struct{} `type:"structure"` - // A base64-encoded RSA private key. - PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` + // An array of LoadBalancer objects describing your load balancers. + LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` - // A base64-encoded public key of the ssh-rsa type. - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` + // A token used for advancing to the next page of results from your GetLoadBalancers + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DownloadDefaultKeyPairOutput) String() string { +func (s GetLoadBalancersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DownloadDefaultKeyPairOutput) GoString() string { +func (s GetLoadBalancersOutput) GoString() string { return s.String() } -// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. -func (s *DownloadDefaultKeyPairOutput) SetPrivateKeyBase64(v string) *DownloadDefaultKeyPairOutput { - s.PrivateKeyBase64 = &v +// SetLoadBalancers sets the LoadBalancers field's value. +func (s *GetLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *GetLoadBalancersOutput { + s.LoadBalancers = v return s } -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *DownloadDefaultKeyPairOutput) SetPublicKeyBase64(v string) *DownloadDefaultKeyPairOutput { - s.PublicKeyBase64 = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetLoadBalancersOutput) SetNextPageToken(v string) *GetLoadBalancersOutput { + s.NextPageToken = &v return s } -type GetActiveNamesInput struct { +type GetOperationInput struct { _ struct{} `type:"structure"` - // A token used for paginating results from your get active names request. - PageToken *string `locationName:"pageToken" type:"string"` + // A GUID used to identify the operation. + // + // OperationId is a required field + OperationId *string `locationName:"operationId" type:"string" required:"true"` } // String returns the string representation -func (s GetActiveNamesInput) String() string { +func (s GetOperationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetActiveNamesInput) GoString() string { +func (s GetOperationInput) GoString() string { return s.String() } -// SetPageToken sets the PageToken field's value. -func (s *GetActiveNamesInput) SetPageToken(v string) *GetActiveNamesInput { - s.PageToken = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOperationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} + if s.OperationId == nil { + invalidParams.Add(request.NewErrParamRequired("OperationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOperationId sets the OperationId field's value. +func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { + s.OperationId = &v return s } -type GetActiveNamesOutput struct { +type GetOperationOutput struct { _ struct{} `type:"structure"` - // The list of active names returned by the get active names request. - ActiveNames []*string `locationName:"activeNames" type:"list"` - - // A token used for advancing to the next page of results from your get active - // names request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // An array of key-value pairs containing information about the results of your + // get operation request. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s GetActiveNamesOutput) String() string { +func (s GetOperationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetActiveNamesOutput) GoString() string { +func (s GetOperationOutput) GoString() string { return s.String() } -// SetActiveNames sets the ActiveNames field's value. -func (s *GetActiveNamesOutput) SetActiveNames(v []*string) *GetActiveNamesOutput { - s.ActiveNames = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetActiveNamesOutput) SetNextPageToken(v string) *GetActiveNamesOutput { - s.NextPageToken = &v +// SetOperation sets the Operation field's value. +func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { + s.Operation = v return s } -type GetBlueprintsInput struct { +type GetOperationsForResourceInput struct { _ struct{} `type:"structure"` - // A Boolean value indicating whether to include inactive results in your request. - IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` - - // A token used for advancing to the next page of results from your get blueprints - // request. + // A token used for advancing to the next page of results from your get operations + // for resource request. PageToken *string `locationName:"pageToken" type:"string"` + + // The name of the resource for which you are requesting information. + // + // ResourceName is a required field + ResourceName *string `locationName:"resourceName" type:"string" required:"true"` } // String returns the string representation -func (s GetBlueprintsInput) String() string { +func (s GetOperationsForResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBlueprintsInput) GoString() string { +func (s GetOperationsForResourceInput) GoString() string { return s.String() } -// SetIncludeInactive sets the IncludeInactive field's value. -func (s *GetBlueprintsInput) SetIncludeInactive(v bool) *GetBlueprintsInput { - s.IncludeInactive = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOperationsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOperationsForResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetPageToken sets the PageToken field's value. -func (s *GetBlueprintsInput) SetPageToken(v string) *GetBlueprintsInput { +func (s *GetOperationsForResourceInput) SetPageToken(v string) *GetOperationsForResourceInput { s.PageToken = &v return s } -type GetBlueprintsOutput struct { +// SetResourceName sets the ResourceName field's value. +func (s *GetOperationsForResourceInput) SetResourceName(v string) *GetOperationsForResourceInput { + s.ResourceName = &v + return s +} + +type GetOperationsForResourceOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs that contains information about the available - // blueprints. - Blueprints []*Blueprint `locationName:"blueprints" type:"list"` + // (Deprecated) Returns the number of pages of results that remain. + // + // In releases prior to June 12, 2017, this parameter returned null by the API. + // It is now deprecated, and the API returns the next page token parameter instead. + // + // Deprecated: NextPageCount has been deprecated + NextPageCount *string `locationName:"nextPageCount" deprecated:"true" type:"string"` - // A token used for advancing to the next page of results from your get blueprints - // request. + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An array of key-value pairs containing information about the results of your + // get operations for resource request. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s GetBlueprintsOutput) String() string { +func (s GetOperationsForResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBlueprintsOutput) GoString() string { +func (s GetOperationsForResourceOutput) GoString() string { return s.String() } -// SetBlueprints sets the Blueprints field's value. -func (s *GetBlueprintsOutput) SetBlueprints(v []*Blueprint) *GetBlueprintsOutput { - s.Blueprints = v +// SetNextPageCount sets the NextPageCount field's value. +func (s *GetOperationsForResourceOutput) SetNextPageCount(v string) *GetOperationsForResourceOutput { + s.NextPageCount = &v return s } // SetNextPageToken sets the NextPageToken field's value. -func (s *GetBlueprintsOutput) SetNextPageToken(v string) *GetBlueprintsOutput { +func (s *GetOperationsForResourceOutput) SetNextPageToken(v string) *GetOperationsForResourceOutput { s.NextPageToken = &v return s } -type GetBundlesInput struct { - _ struct{} `type:"structure"` +// SetOperations sets the Operations field's value. +func (s *GetOperationsForResourceOutput) SetOperations(v []*Operation) *GetOperationsForResourceOutput { + s.Operations = v + return s +} - // A Boolean value that indicates whether to include inactive bundle results - // in your request. - IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` +type GetOperationsInput struct { + _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get bundles + // A token used for advancing to the next page of results from your get operations // request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetBundlesInput) String() string { +func (s GetOperationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBundlesInput) GoString() string { +func (s GetOperationsInput) GoString() string { return s.String() } -// SetIncludeInactive sets the IncludeInactive field's value. -func (s *GetBundlesInput) SetIncludeInactive(v bool) *GetBundlesInput { - s.IncludeInactive = &v - return s -} - // SetPageToken sets the PageToken field's value. -func (s *GetBundlesInput) SetPageToken(v string) *GetBundlesInput { +func (s *GetOperationsInput) SetPageToken(v string) *GetOperationsInput { s.PageToken = &v return s } -type GetBundlesOutput struct { +type GetOperationsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs that contains information about the available - // bundles. - Bundles []*Bundle `locationName:"bundles" type:"list"` - - // A token used for advancing to the next page of results from your get active - // names request. + // A token used for advancing to the next page of results from your get operations + // request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An array of key-value pairs containing information about the results of your + // get operations request. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s GetBundlesOutput) String() string { +func (s GetOperationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBundlesOutput) GoString() string { +func (s GetOperationsOutput) GoString() string { return s.String() } -// SetBundles sets the Bundles field's value. -func (s *GetBundlesOutput) SetBundles(v []*Bundle) *GetBundlesOutput { - s.Bundles = v - return s -} - // SetNextPageToken sets the NextPageToken field's value. -func (s *GetBundlesOutput) SetNextPageToken(v string) *GetBundlesOutput { +func (s *GetOperationsOutput) SetNextPageToken(v string) *GetOperationsOutput { s.NextPageToken = &v return s } -type GetDiskInput struct { +// SetOperations sets the Operations field's value. +func (s *GetOperationsOutput) SetOperations(v []*Operation) *GetOperationsOutput { + s.Operations = v + return s +} + +type GetRegionsInput struct { _ struct{} `type:"structure"` - // The name of the disk (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // A Boolean value indicating whether to also include Availability Zones in + // your get regions request. Availability Zones are indicated with a letter: + // e.g., us-east-2a. + IncludeAvailabilityZones *bool `locationName:"includeAvailabilityZones" type:"boolean"` + + // >A Boolean value indicating whether to also include Availability Zones for + // databases in your get regions request. Availability Zones are indicated with + // a letter (e.g., us-east-2a). + IncludeRelationalDatabaseAvailabilityZones *bool `locationName:"includeRelationalDatabaseAvailabilityZones" type:"boolean"` } // String returns the string representation -func (s GetDiskInput) String() string { +func (s GetRegionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskInput) GoString() string { +func (s GetRegionsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetIncludeAvailabilityZones sets the IncludeAvailabilityZones field's value. +func (s *GetRegionsInput) SetIncludeAvailabilityZones(v bool) *GetRegionsInput { + s.IncludeAvailabilityZones = &v + return s } -// SetDiskName sets the DiskName field's value. -func (s *GetDiskInput) SetDiskName(v string) *GetDiskInput { - s.DiskName = &v +// SetIncludeRelationalDatabaseAvailabilityZones sets the IncludeRelationalDatabaseAvailabilityZones field's value. +func (s *GetRegionsInput) SetIncludeRelationalDatabaseAvailabilityZones(v bool) *GetRegionsInput { + s.IncludeRelationalDatabaseAvailabilityZones = &v return s } -type GetDiskOutput struct { +type GetRegionsOutput struct { _ struct{} `type:"structure"` - // An object containing information about the disk. - Disk *Disk `locationName:"disk" type:"structure"` + // An array of key-value pairs containing information about your get regions + // request. + Regions []*Region `locationName:"regions" type:"list"` } // String returns the string representation -func (s GetDiskOutput) String() string { +func (s GetRegionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskOutput) GoString() string { +func (s GetRegionsOutput) GoString() string { return s.String() } -// SetDisk sets the Disk field's value. -func (s *GetDiskOutput) SetDisk(v *Disk) *GetDiskOutput { - s.Disk = v +// SetRegions sets the Regions field's value. +func (s *GetRegionsOutput) SetRegions(v []*Region) *GetRegionsOutput { + s.Regions = v return s } -type GetDiskSnapshotInput struct { +type GetRelationalDatabaseBlueprintsInput struct { _ struct{} `type:"structure"` - // The name of the disk snapshot (e.g., my-disk-snapshot). - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // A token used for advancing to a specific page of results for your get relational + // database blueprints request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotInput) String() string { +func (s GetRelationalDatabaseBlueprintsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotInput) GoString() string { +func (s GetRelationalDatabaseBlueprintsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDiskSnapshotInput"} - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *GetDiskSnapshotInput) SetDiskSnapshotName(v string) *GetDiskSnapshotInput { - s.DiskSnapshotName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseBlueprintsInput) SetPageToken(v string) *GetRelationalDatabaseBlueprintsInput { + s.PageToken = &v return s } -type GetDiskSnapshotOutput struct { +type GetRelationalDatabaseBlueprintsOutput struct { _ struct{} `type:"structure"` - // An object containing information about the disk snapshot. - DiskSnapshot *DiskSnapshot `locationName:"diskSnapshot" type:"structure"` + // An object describing the result of your get relational database blueprints + // request. + Blueprints []*RelationalDatabaseBlueprint `locationName:"blueprints" type:"list"` + + // A token used for advancing to the next page of results of your get relational + // database blueprints request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotOutput) String() string { +func (s GetRelationalDatabaseBlueprintsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotOutput) GoString() string { +func (s GetRelationalDatabaseBlueprintsOutput) GoString() string { return s.String() } -// SetDiskSnapshot sets the DiskSnapshot field's value. -func (s *GetDiskSnapshotOutput) SetDiskSnapshot(v *DiskSnapshot) *GetDiskSnapshotOutput { - s.DiskSnapshot = v +// SetBlueprints sets the Blueprints field's value. +func (s *GetRelationalDatabaseBlueprintsOutput) SetBlueprints(v []*RelationalDatabaseBlueprint) *GetRelationalDatabaseBlueprintsOutput { + s.Blueprints = v return s } -type GetDiskSnapshotsInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseBlueprintsOutput) SetNextPageToken(v string) *GetRelationalDatabaseBlueprintsOutput { + s.NextPageToken = &v + return s +} + +type GetRelationalDatabaseBundlesInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your GetDiskSnapshots - // request. + // A token used for advancing to a specific page of results for your get relational + // database bundles request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotsInput) String() string { +func (s GetRelationalDatabaseBundlesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotsInput) GoString() string { +func (s GetRelationalDatabaseBundlesInput) GoString() string { return s.String() } // SetPageToken sets the PageToken field's value. -func (s *GetDiskSnapshotsInput) SetPageToken(v string) *GetDiskSnapshotsInput { +func (s *GetRelationalDatabaseBundlesInput) SetPageToken(v string) *GetRelationalDatabaseBundlesInput { s.PageToken = &v return s } -type GetDiskSnapshotsOutput struct { +type GetRelationalDatabaseBundlesOutput struct { _ struct{} `type:"structure"` - // An array of objects containing information about all block storage disk snapshots. - DiskSnapshots []*DiskSnapshot `locationName:"diskSnapshots" type:"list"` + // An object describing the result of your get relational database bundles request. + Bundles []*RelationalDatabaseBundle `locationName:"bundles" type:"list"` - // A token used for advancing to the next page of results from your GetDiskSnapshots - // request. + // A token used for advancing to the next page of results of your get relational + // database bundles request. NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotsOutput) String() string { +func (s GetRelationalDatabaseBundlesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotsOutput) GoString() string { +func (s GetRelationalDatabaseBundlesOutput) GoString() string { return s.String() } -// SetDiskSnapshots sets the DiskSnapshots field's value. -func (s *GetDiskSnapshotsOutput) SetDiskSnapshots(v []*DiskSnapshot) *GetDiskSnapshotsOutput { - s.DiskSnapshots = v +// SetBundles sets the Bundles field's value. +func (s *GetRelationalDatabaseBundlesOutput) SetBundles(v []*RelationalDatabaseBundle) *GetRelationalDatabaseBundlesOutput { + s.Bundles = v return s } // SetNextPageToken sets the NextPageToken field's value. -func (s *GetDiskSnapshotsOutput) SetNextPageToken(v string) *GetDiskSnapshotsOutput { +func (s *GetRelationalDatabaseBundlesOutput) SetNextPageToken(v string) *GetRelationalDatabaseBundlesOutput { s.NextPageToken = &v return s } -type GetDisksInput struct { +type GetRelationalDatabaseEventsInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your GetDisks - // request. + // The number of minutes in the past from which to retrieve events. For example, + // to get all events from the past 2 hours, enter 120. + // + // Default: 60 + // + // The minimum is 1 and the maximum is 14 days (20160 minutes). + DurationInMinutes *int64 `locationName:"durationInMinutes" type:"integer"` + + // A token used for advancing to a specific page of results from for get relational + // database events request. PageToken *string `locationName:"pageToken" type:"string"` + + // The name of the database from which to get events. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetDisksInput) String() string { +func (s GetRelationalDatabaseEventsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDisksInput) GoString() string { +func (s GetRelationalDatabaseEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseEventsInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDurationInMinutes sets the DurationInMinutes field's value. +func (s *GetRelationalDatabaseEventsInput) SetDurationInMinutes(v int64) *GetRelationalDatabaseEventsInput { + s.DurationInMinutes = &v + return s +} + // SetPageToken sets the PageToken field's value. -func (s *GetDisksInput) SetPageToken(v string) *GetDisksInput { +func (s *GetRelationalDatabaseEventsInput) SetPageToken(v string) *GetRelationalDatabaseEventsInput { s.PageToken = &v return s } -type GetDisksOutput struct { - _ struct{} `type:"structure"` +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseEventsInput { + s.RelationalDatabaseName = &v + return s +} - // An array of objects containing information about all block storage disks. - Disks []*Disk `locationName:"disks" type:"list"` +type GetRelationalDatabaseEventsOutput struct { + _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your GetDisks - // request. + // A token used for advancing to the next page of results from your get relational + // database events request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An object describing the result of your get relational database events request. + RelationalDatabaseEvents []*RelationalDatabaseEvent `locationName:"relationalDatabaseEvents" type:"list"` } // String returns the string representation -func (s GetDisksOutput) String() string { +func (s GetRelationalDatabaseEventsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDisksOutput) GoString() string { +func (s GetRelationalDatabaseEventsOutput) GoString() string { return s.String() } -// SetDisks sets the Disks field's value. -func (s *GetDisksOutput) SetDisks(v []*Disk) *GetDisksOutput { - s.Disks = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseEventsOutput) SetNextPageToken(v string) *GetRelationalDatabaseEventsOutput { + s.NextPageToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetDisksOutput) SetNextPageToken(v string) *GetDisksOutput { - s.NextPageToken = &v +// SetRelationalDatabaseEvents sets the RelationalDatabaseEvents field's value. +func (s *GetRelationalDatabaseEventsOutput) SetRelationalDatabaseEvents(v []*RelationalDatabaseEvent) *GetRelationalDatabaseEventsOutput { + s.RelationalDatabaseEvents = v return s } -type GetDomainInput struct { +type GetRelationalDatabaseInput struct { _ struct{} `type:"structure"` - // The domain name for which your want to return information about. + // The name of the database that you are looking up. // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetDomainInput) String() string { +func (s GetRelationalDatabaseInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDomainInput) GoString() string { +func (s GetRelationalDatabaseInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) +func (s *GetRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -11130,121 +15931,194 @@ func (s *GetDomainInput) Validate() error { return nil } -// SetDomainName sets the DomainName field's value. -func (s *GetDomainInput) SetDomainName(v string) *GetDomainInput { - s.DomainName = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseInput { + s.RelationalDatabaseName = &v return s } -type GetDomainOutput struct { +type GetRelationalDatabaseLogEventsInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your get domain - // request. - Domain *Domain `locationName:"domain" type:"structure"` + // The end of the time interval from which to get log events. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, + // then you input 1538424000 as the end time. + EndTime *time.Time `locationName:"endTime" type:"timestamp"` + + // The name of the log stream. + // + // Use the get relational database log streams operation to get a list of available + // log streams. + // + // LogStreamName is a required field + LogStreamName *string `locationName:"logStreamName" type:"string" required:"true"` + + // A token used for advancing to a specific page of results for your get relational + // database log events request. + PageToken *string `locationName:"pageToken" type:"string"` + + // The name of your database for which to get log events. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // Parameter to specify if the log should start from head or tail. If true is + // specified, the log event starts from the head of the log. If false is specified, + // the log event starts from the tail of the log. + // + // Default: false + StartFromHead *bool `locationName:"startFromHead" type:"boolean"` + + // The start of the time interval from which to get log events. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use a start time of October 1, 2018, at 8 PM + // UTC, then you input 1538424000 as the start time. + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation -func (s GetDomainOutput) String() string { +func (s GetRelationalDatabaseLogEventsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDomainOutput) GoString() string { +func (s GetRelationalDatabaseLogEventsInput) GoString() string { return s.String() } -// SetDomain sets the Domain field's value. -func (s *GetDomainOutput) SetDomain(v *Domain) *GetDomainOutput { - s.Domain = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseLogEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseLogEventsInput"} + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetEndTime(v time.Time) *GetRelationalDatabaseLogEventsInput { + s.EndTime = &v return s } -type GetDomainsInput struct { - _ struct{} `type:"structure"` +// SetLogStreamName sets the LogStreamName field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetLogStreamName(v string) *GetRelationalDatabaseLogEventsInput { + s.LogStreamName = &v + return s +} - // A token used for advancing to the next page of results from your get domains - // request. - PageToken *string `locationName:"pageToken" type:"string"` +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetPageToken(v string) *GetRelationalDatabaseLogEventsInput { + s.PageToken = &v + return s } -// String returns the string representation -func (s GetDomainsInput) String() string { - return awsutil.Prettify(s) +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogEventsInput { + s.RelationalDatabaseName = &v + return s } -// GoString returns the string representation -func (s GetDomainsInput) GoString() string { - return s.String() +// SetStartFromHead sets the StartFromHead field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetStartFromHead(v bool) *GetRelationalDatabaseLogEventsInput { + s.StartFromHead = &v + return s } -// SetPageToken sets the PageToken field's value. -func (s *GetDomainsInput) SetPageToken(v string) *GetDomainsInput { - s.PageToken = &v +// SetStartTime sets the StartTime field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetStartTime(v time.Time) *GetRelationalDatabaseLogEventsInput { + s.StartTime = &v return s } -type GetDomainsOutput struct { +type GetRelationalDatabaseLogEventsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about each of the domain - // entries in the user's account. - Domains []*Domain `locationName:"domains" type:"list"` + // A token used for advancing to the previous page of results from your get + // relational database log events request. + NextBackwardToken *string `locationName:"nextBackwardToken" type:"string"` - // A token used for advancing to the next page of results from your get active - // names request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // A token used for advancing to the next page of results from your get relational + // database log events request. + NextForwardToken *string `locationName:"nextForwardToken" type:"string"` + + // An object describing the result of your get relational database log events + // request. + ResourceLogEvents []*LogEvent `locationName:"resourceLogEvents" type:"list"` } // String returns the string representation -func (s GetDomainsOutput) String() string { +func (s GetRelationalDatabaseLogEventsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDomainsOutput) GoString() string { +func (s GetRelationalDatabaseLogEventsOutput) GoString() string { return s.String() } -// SetDomains sets the Domains field's value. -func (s *GetDomainsOutput) SetDomains(v []*Domain) *GetDomainsOutput { - s.Domains = v +// SetNextBackwardToken sets the NextBackwardToken field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetNextBackwardToken(v string) *GetRelationalDatabaseLogEventsOutput { + s.NextBackwardToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetDomainsOutput) SetNextPageToken(v string) *GetDomainsOutput { - s.NextPageToken = &v +// SetNextForwardToken sets the NextForwardToken field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetNextForwardToken(v string) *GetRelationalDatabaseLogEventsOutput { + s.NextForwardToken = &v return s } -type GetInstanceAccessDetailsInput struct { +// SetResourceLogEvents sets the ResourceLogEvents field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetResourceLogEvents(v []*LogEvent) *GetRelationalDatabaseLogEventsOutput { + s.ResourceLogEvents = v + return s +} + +type GetRelationalDatabaseLogStreamsInput struct { _ struct{} `type:"structure"` - // The name of the instance to access. + // The name of your database for which to get log streams. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The protocol to use to connect to your instance. Defaults to ssh. - Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceAccessDetailsInput) String() string { +func (s GetRelationalDatabaseLogStreamsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceAccessDetailsInput) GoString() string { +func (s GetRelationalDatabaseLogStreamsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceAccessDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceAccessDetailsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *GetRelationalDatabaseLogStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseLogStreamsInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -11253,66 +16127,70 @@ func (s *GetInstanceAccessDetailsInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceAccessDetailsInput) SetInstanceName(v string) *GetInstanceAccessDetailsInput { - s.InstanceName = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *GetInstanceAccessDetailsInput) SetProtocol(v string) *GetInstanceAccessDetailsInput { - s.Protocol = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseLogStreamsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogStreamsInput { + s.RelationalDatabaseName = &v return s } -type GetInstanceAccessDetailsOutput struct { +type GetRelationalDatabaseLogStreamsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about a get instance access + // An object describing the result of your get relational database log streams // request. - AccessDetails *InstanceAccessDetails `locationName:"accessDetails" type:"structure"` + LogStreams []*string `locationName:"logStreams" type:"list"` } // String returns the string representation -func (s GetInstanceAccessDetailsOutput) String() string { +func (s GetRelationalDatabaseLogStreamsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceAccessDetailsOutput) GoString() string { +func (s GetRelationalDatabaseLogStreamsOutput) GoString() string { return s.String() } -// SetAccessDetails sets the AccessDetails field's value. -func (s *GetInstanceAccessDetailsOutput) SetAccessDetails(v *InstanceAccessDetails) *GetInstanceAccessDetailsOutput { - s.AccessDetails = v +// SetLogStreams sets the LogStreams field's value. +func (s *GetRelationalDatabaseLogStreamsOutput) SetLogStreams(v []*string) *GetRelationalDatabaseLogStreamsOutput { + s.LogStreams = v return s } -type GetInstanceInput struct { +type GetRelationalDatabaseMasterUserPasswordInput struct { _ struct{} `type:"structure"` - // The name of the instance. + // The password version to return. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // Specifying CURRENT or PREVIOUS returns the current or previous passwords + // respectively. Specifying PENDING returns the newest version of the password + // that will rotate to CURRENT. After the PENDING password rotates to CURRENT, + // the PENDING password is no longer available. + // + // Default: CURRENT + PasswordVersion *string `locationName:"passwordVersion" type:"string" enum:"RelationalDatabasePasswordVersion"` + + // The name of your database for which to get the master user password. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceInput) String() string { +func (s GetRelationalDatabaseMasterUserPasswordInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceInput) GoString() string { +func (s GetRelationalDatabaseMasterUserPasswordInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *GetRelationalDatabaseMasterUserPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMasterUserPasswordInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -11321,70 +16199,124 @@ func (s *GetInstanceInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceInput) SetInstanceName(v string) *GetInstanceInput { - s.InstanceName = &v +// SetPasswordVersion sets the PasswordVersion field's value. +func (s *GetRelationalDatabaseMasterUserPasswordInput) SetPasswordVersion(v string) *GetRelationalDatabaseMasterUserPasswordInput { + s.PasswordVersion = &v return s } -type GetInstanceMetricDataInput struct { +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseMasterUserPasswordInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseMasterUserPasswordInput { + s.RelationalDatabaseName = &v + return s +} + +type GetRelationalDatabaseMasterUserPasswordOutput struct { _ struct{} `type:"structure"` - // The end time of the time period. + // The timestamp when the specified version of the master user password was + // created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The master user password for the password version specified. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string"` +} + +// String returns the string representation +func (s GetRelationalDatabaseMasterUserPasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseMasterUserPasswordOutput) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetCreatedAt(v time.Time) *GetRelationalDatabaseMasterUserPasswordOutput { + s.CreatedAt = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetMasterUserPassword(v string) *GetRelationalDatabaseMasterUserPasswordOutput { + s.MasterUserPassword = &v + return s +} + +type GetRelationalDatabaseMetricDataInput struct { + _ struct{} `type:"structure"` + + // The end of the time interval from which to get metric data. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, + // then you input 1538424000 as the end time. // // EndTime is a required field EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` - // The name of the instance for which you want to get metrics data. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The metric name to get data about. + // The name of the metric data to return. // // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"InstanceMetricName"` + MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"RelationalDatabaseMetricName"` - // The time period for which you are requesting data. + // The granularity, in seconds, of the returned data points. // // Period is a required field Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` - // The start time of the time period. + // The name of your database from which to get metric data. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The start of the time interval from which to get metric data. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use a start time of October 1, 2018, at 8 PM + // UTC, then you input 1538424000 as the start time. // // StartTime is a required field StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - // The instance statistics. + // The array of statistics for your metric data request. // // Statistics is a required field Statistics []*string `locationName:"statistics" type:"list" required:"true"` - // The unit. The list of valid values is below. + // The unit for the metric data request. // // Unit is a required field Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` } // String returns the string representation -func (s GetInstanceMetricDataInput) String() string { +func (s GetRelationalDatabaseMetricDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceMetricDataInput) GoString() string { +func (s GetRelationalDatabaseMetricDataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceMetricDataInput"} +func (s *GetRelationalDatabaseMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMetricDataInput"} if s.EndTime == nil { invalidParams.Add(request.NewErrParamRequired("EndTime")) } - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } if s.MetricName == nil { invalidParams.Add(request.NewErrParamRequired("MetricName")) } @@ -11394,6 +16326,9 @@ func (s *GetInstanceMetricDataInput) Validate() error { if s.Period != nil && *s.Period < 60 { invalidParams.Add(request.NewErrParamMinValue("Period", 60)) } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } if s.StartTime == nil { invalidParams.Add(request.NewErrParamRequired("StartTime")) } @@ -11411,308 +16346,209 @@ func (s *GetInstanceMetricDataInput) Validate() error { } // SetEndTime sets the EndTime field's value. -func (s *GetInstanceMetricDataInput) SetEndTime(v time.Time) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetEndTime(v time.Time) *GetRelationalDatabaseMetricDataInput { s.EndTime = &v return s } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceMetricDataInput) SetInstanceName(v string) *GetInstanceMetricDataInput { - s.InstanceName = &v - return s -} - // SetMetricName sets the MetricName field's value. -func (s *GetInstanceMetricDataInput) SetMetricName(v string) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetMetricName(v string) *GetRelationalDatabaseMetricDataInput { s.MetricName = &v return s } // SetPeriod sets the Period field's value. -func (s *GetInstanceMetricDataInput) SetPeriod(v int64) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetPeriod(v int64) *GetRelationalDatabaseMetricDataInput { s.Period = &v return s } +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseMetricDataInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseMetricDataInput { + s.RelationalDatabaseName = &v + return s +} + // SetStartTime sets the StartTime field's value. -func (s *GetInstanceMetricDataInput) SetStartTime(v time.Time) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetStartTime(v time.Time) *GetRelationalDatabaseMetricDataInput { s.StartTime = &v return s } // SetStatistics sets the Statistics field's value. -func (s *GetInstanceMetricDataInput) SetStatistics(v []*string) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetStatistics(v []*string) *GetRelationalDatabaseMetricDataInput { s.Statistics = v return s } // SetUnit sets the Unit field's value. -func (s *GetInstanceMetricDataInput) SetUnit(v string) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetUnit(v string) *GetRelationalDatabaseMetricDataInput { s.Unit = &v return s } -type GetInstanceMetricDataOutput struct { +type GetRelationalDatabaseMetricDataOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // get instance metric data request. + // An object describing the result of your get relational database metric data + // request. MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - // The metric name to return data for. - MetricName *string `locationName:"metricName" type:"string" enum:"InstanceMetricName"` + // The name of the metric. + MetricName *string `locationName:"metricName" type:"string" enum:"RelationalDatabaseMetricName"` } // String returns the string representation -func (s GetInstanceMetricDataOutput) String() string { +func (s GetRelationalDatabaseMetricDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceMetricDataOutput) GoString() string { +func (s GetRelationalDatabaseMetricDataOutput) GoString() string { return s.String() } // SetMetricData sets the MetricData field's value. -func (s *GetInstanceMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetInstanceMetricDataOutput { +func (s *GetRelationalDatabaseMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetRelationalDatabaseMetricDataOutput { s.MetricData = v return s } // SetMetricName sets the MetricName field's value. -func (s *GetInstanceMetricDataOutput) SetMetricName(v string) *GetInstanceMetricDataOutput { +func (s *GetRelationalDatabaseMetricDataOutput) SetMetricName(v string) *GetRelationalDatabaseMetricDataOutput { s.MetricName = &v return s } -type GetInstanceOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the specified instance. - Instance *Instance `locationName:"instance" type:"structure"` -} - -// String returns the string representation -func (s GetInstanceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceOutput) GoString() string { - return s.String() -} - -// SetInstance sets the Instance field's value. -func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { - s.Instance = v - return s -} - -type GetInstancePortStatesInput struct { - _ struct{} `type:"structure"` - - // The name of the instance. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstancePortStatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancePortStatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstancePortStatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstancePortStatesInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstancePortStatesInput) SetInstanceName(v string) *GetInstancePortStatesInput { - s.InstanceName = &v - return s -} - -type GetInstancePortStatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the port states resulting from your request. - PortStates []*InstancePortState `locationName:"portStates" type:"list"` -} - -// String returns the string representation -func (s GetInstancePortStatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstancePortStatesOutput) GoString() string { - return s.String() -} - -// SetPortStates sets the PortStates field's value. -func (s *GetInstancePortStatesOutput) SetPortStates(v []*InstancePortState) *GetInstancePortStatesOutput { - s.PortStates = v - return s -} - -type GetInstanceSnapshotInput struct { - _ struct{} `type:"structure"` - - // The name of the snapshot for which you are requesting information. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceSnapshotInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceSnapshotInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceSnapshotInput"} - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *GetInstanceSnapshotInput) SetInstanceSnapshotName(v string) *GetInstanceSnapshotInput { - s.InstanceSnapshotName = &v - return s -} - -type GetInstanceSnapshotOutput struct { +type GetRelationalDatabaseOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // get instance snapshot request. - InstanceSnapshot *InstanceSnapshot `locationName:"instanceSnapshot" type:"structure"` + // An object describing the specified database. + RelationalDatabase *RelationalDatabase `locationName:"relationalDatabase" type:"structure"` } // String returns the string representation -func (s GetInstanceSnapshotOutput) String() string { +func (s GetRelationalDatabaseOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceSnapshotOutput) GoString() string { +func (s GetRelationalDatabaseOutput) GoString() string { return s.String() } -// SetInstanceSnapshot sets the InstanceSnapshot field's value. -func (s *GetInstanceSnapshotOutput) SetInstanceSnapshot(v *InstanceSnapshot) *GetInstanceSnapshotOutput { - s.InstanceSnapshot = v +// SetRelationalDatabase sets the RelationalDatabase field's value. +func (s *GetRelationalDatabaseOutput) SetRelationalDatabase(v *RelationalDatabase) *GetRelationalDatabaseOutput { + s.RelationalDatabase = v return s } -type GetInstanceSnapshotsInput struct { +type GetRelationalDatabaseParametersInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get instance - // snapshots request. + // A token used for advancing to a specific page of results for your get relational + // database parameters request. PageToken *string `locationName:"pageToken" type:"string"` + + // The name of your database for which to get parameters. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceSnapshotsInput) String() string { +func (s GetRelationalDatabaseParametersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceSnapshotsInput) GoString() string { +func (s GetRelationalDatabaseParametersInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseParametersInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetPageToken sets the PageToken field's value. -func (s *GetInstanceSnapshotsInput) SetPageToken(v string) *GetInstanceSnapshotsInput { +func (s *GetRelationalDatabaseParametersInput) SetPageToken(v string) *GetRelationalDatabaseParametersInput { s.PageToken = &v return s } -type GetInstanceSnapshotsOutput struct { - _ struct{} `type:"structure"` +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseParametersInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseParametersInput { + s.RelationalDatabaseName = &v + return s +} - // An array of key-value pairs containing information about the results of your - // get instance snapshots request. - InstanceSnapshots []*InstanceSnapshot `locationName:"instanceSnapshots" type:"list"` +type GetRelationalDatabaseParametersOutput struct { + _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get instance - // snapshots request. + // A token used for advancing to the next page of results from your get static + // IPs request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An object describing the result of your get relational database parameters + // request. + Parameters []*RelationalDatabaseParameter `locationName:"parameters" type:"list"` } // String returns the string representation -func (s GetInstanceSnapshotsOutput) String() string { +func (s GetRelationalDatabaseParametersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceSnapshotsOutput) GoString() string { +func (s GetRelationalDatabaseParametersOutput) GoString() string { return s.String() } -// SetInstanceSnapshots sets the InstanceSnapshots field's value. -func (s *GetInstanceSnapshotsOutput) SetInstanceSnapshots(v []*InstanceSnapshot) *GetInstanceSnapshotsOutput { - s.InstanceSnapshots = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseParametersOutput) SetNextPageToken(v string) *GetRelationalDatabaseParametersOutput { + s.NextPageToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetInstanceSnapshotsOutput) SetNextPageToken(v string) *GetInstanceSnapshotsOutput { - s.NextPageToken = &v +// SetParameters sets the Parameters field's value. +func (s *GetRelationalDatabaseParametersOutput) SetParameters(v []*RelationalDatabaseParameter) *GetRelationalDatabaseParametersOutput { + s.Parameters = v return s } -type GetInstanceStateInput struct { +type GetRelationalDatabaseSnapshotInput struct { _ struct{} `type:"structure"` - // The name of the instance to get state information about. + // The name of the database snapshot for which to get information. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceStateInput) String() string { +func (s GetRelationalDatabaseSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceStateInput) GoString() string { +func (s GetRelationalDatabaseSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceStateInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *GetRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) } if invalidParams.Len() > 0 { @@ -11721,116 +16557,174 @@ func (s *GetInstanceStateInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceStateInput) SetInstanceName(v string) *GetInstanceStateInput { - s.InstanceName = &v +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *GetRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *GetRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v return s } -type GetInstanceStateOutput struct { +type GetRelationalDatabaseSnapshotOutput struct { _ struct{} `type:"structure"` - // The state of the instance. - State *InstanceState `locationName:"state" type:"structure"` + // An object describing the specified database snapshot. + RelationalDatabaseSnapshot *RelationalDatabaseSnapshot `locationName:"relationalDatabaseSnapshot" type:"structure"` } // String returns the string representation -func (s GetInstanceStateOutput) String() string { +func (s GetRelationalDatabaseSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceStateOutput) GoString() string { +func (s GetRelationalDatabaseSnapshotOutput) GoString() string { return s.String() } -// SetState sets the State field's value. -func (s *GetInstanceStateOutput) SetState(v *InstanceState) *GetInstanceStateOutput { - s.State = v +// SetRelationalDatabaseSnapshot sets the RelationalDatabaseSnapshot field's value. +func (s *GetRelationalDatabaseSnapshotOutput) SetRelationalDatabaseSnapshot(v *RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotOutput { + s.RelationalDatabaseSnapshot = v return s } -type GetInstancesInput struct { +type GetRelationalDatabaseSnapshotsInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get instances - // request. + // A token used for advancing to a specific page of results for your get relational + // database snapshots request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetInstancesInput) String() string { +func (s GetRelationalDatabaseSnapshotsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstancesInput) GoString() string { +func (s GetRelationalDatabaseSnapshotsInput) GoString() string { return s.String() } // SetPageToken sets the PageToken field's value. -func (s *GetInstancesInput) SetPageToken(v string) *GetInstancesInput { +func (s *GetRelationalDatabaseSnapshotsInput) SetPageToken(v string) *GetRelationalDatabaseSnapshotsInput { s.PageToken = &v return s } -type GetInstancesOutput struct { +type GetRelationalDatabaseSnapshotsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your instances. - Instances []*Instance `locationName:"instances" type:"list"` + // A token used for advancing to the next page of results from your get relational + // database snapshots request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` - // A token used for advancing to the next page of results from your get instances + // An object describing the result of your get relational database snapshots // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + RelationalDatabaseSnapshots []*RelationalDatabaseSnapshot `locationName:"relationalDatabaseSnapshots" type:"list"` } // String returns the string representation -func (s GetInstancesOutput) String() string { +func (s GetRelationalDatabaseSnapshotsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstancesOutput) GoString() string { +func (s GetRelationalDatabaseSnapshotsOutput) GoString() string { return s.String() } -// SetInstances sets the Instances field's value. -func (s *GetInstancesOutput) SetInstances(v []*Instance) *GetInstancesOutput { - s.Instances = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseSnapshotsOutput) SetNextPageToken(v string) *GetRelationalDatabaseSnapshotsOutput { + s.NextPageToken = &v + return s +} + +// SetRelationalDatabaseSnapshots sets the RelationalDatabaseSnapshots field's value. +func (s *GetRelationalDatabaseSnapshotsOutput) SetRelationalDatabaseSnapshots(v []*RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotsOutput { + s.RelationalDatabaseSnapshots = v + return s +} + +type GetRelationalDatabasesInput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to a specific page of results for your get relational + // database request. + PageToken *string `locationName:"pageToken" type:"string"` +} + +// String returns the string representation +func (s GetRelationalDatabasesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabasesInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabasesInput) SetPageToken(v string) *GetRelationalDatabasesInput { + s.PageToken = &v return s } +type GetRelationalDatabasesOutput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to the next page of results from your get relational + // databases request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An object describing the result of your get relational databases request. + RelationalDatabases []*RelationalDatabase `locationName:"relationalDatabases" type:"list"` +} + +// String returns the string representation +func (s GetRelationalDatabasesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabasesOutput) GoString() string { + return s.String() +} + // SetNextPageToken sets the NextPageToken field's value. -func (s *GetInstancesOutput) SetNextPageToken(v string) *GetInstancesOutput { +func (s *GetRelationalDatabasesOutput) SetNextPageToken(v string) *GetRelationalDatabasesOutput { s.NextPageToken = &v return s } -type GetKeyPairInput struct { +// SetRelationalDatabases sets the RelationalDatabases field's value. +func (s *GetRelationalDatabasesOutput) SetRelationalDatabases(v []*RelationalDatabase) *GetRelationalDatabasesOutput { + s.RelationalDatabases = v + return s +} + +type GetStaticIpInput struct { _ struct{} `type:"structure"` - // The name of the key pair for which you are requesting information. + // The name of the static IP in Lightsail. // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` } // String returns the string representation -func (s GetKeyPairInput) String() string { +func (s GetStaticIpInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairInput) GoString() string { +func (s GetStaticIpInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) +func (s *GetStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStaticIpInput"} + if s.StaticIpName == nil { + invalidParams.Add(request.NewErrParamRequired("StaticIpName")) } if invalidParams.Len() > 0 { @@ -11839,3205 +16733,3268 @@ func (s *GetKeyPairInput) Validate() error { return nil } -// SetKeyPairName sets the KeyPairName field's value. -func (s *GetKeyPairInput) SetKeyPairName(v string) *GetKeyPairInput { - s.KeyPairName = &v +// SetStaticIpName sets the StaticIpName field's value. +func (s *GetStaticIpInput) SetStaticIpName(v string) *GetStaticIpInput { + s.StaticIpName = &v return s } -type GetKeyPairOutput struct { +type GetStaticIpOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the key pair. - KeyPair *KeyPair `locationName:"keyPair" type:"structure"` + // An array of key-value pairs containing information about the requested static + // IP. + StaticIp *StaticIp `locationName:"staticIp" type:"structure"` } // String returns the string representation -func (s GetKeyPairOutput) String() string { +func (s GetStaticIpOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairOutput) GoString() string { +func (s GetStaticIpOutput) GoString() string { return s.String() } -// SetKeyPair sets the KeyPair field's value. -func (s *GetKeyPairOutput) SetKeyPair(v *KeyPair) *GetKeyPairOutput { - s.KeyPair = v +// SetStaticIp sets the StaticIp field's value. +func (s *GetStaticIpOutput) SetStaticIp(v *StaticIp) *GetStaticIpOutput { + s.StaticIp = v return s } -type GetKeyPairsInput struct { +type GetStaticIpsInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get key - // pairs request. + // A token used for advancing to the next page of results from your get static + // IPs request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetKeyPairsInput) String() string { +func (s GetStaticIpsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairsInput) GoString() string { +func (s GetStaticIpsInput) GoString() string { return s.String() } // SetPageToken sets the PageToken field's value. -func (s *GetKeyPairsInput) SetPageToken(v string) *GetKeyPairsInput { +func (s *GetStaticIpsInput) SetPageToken(v string) *GetStaticIpsInput { s.PageToken = &v return s } -type GetKeyPairsOutput struct { +type GetStaticIpsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the key pairs. - KeyPairs []*KeyPair `locationName:"keyPairs" type:"list"` - - // A token used for advancing to the next page of results from your get key - // pairs request. + // A token used for advancing to the next page of results from your get static + // IPs request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An array of key-value pairs containing information about your get static + // IPs request. + StaticIps []*StaticIp `locationName:"staticIps" type:"list"` } // String returns the string representation -func (s GetKeyPairsOutput) String() string { +func (s GetStaticIpsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairsOutput) GoString() string { +func (s GetStaticIpsOutput) GoString() string { return s.String() } -// SetKeyPairs sets the KeyPairs field's value. -func (s *GetKeyPairsOutput) SetKeyPairs(v []*KeyPair) *GetKeyPairsOutput { - s.KeyPairs = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetStaticIpsOutput) SetNextPageToken(v string) *GetStaticIpsOutput { + s.NextPageToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetKeyPairsOutput) SetNextPageToken(v string) *GetKeyPairsOutput { - s.NextPageToken = &v +// SetStaticIps sets the StaticIps field's value. +func (s *GetStaticIpsOutput) SetStaticIps(v []*StaticIp) *GetStaticIpsOutput { + s.StaticIps = v + return s +} + +type ImportKeyPairInput struct { + _ struct{} `type:"structure"` + + // The name of the key pair for which you want to import the public key. + // + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + + // A base64-encoded public key of the ssh-rsa type. + // + // PublicKeyBase64 is a required field + PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string" required:"true"` +} + +// String returns the string representation +func (s ImportKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportKeyPairInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } + if s.PublicKeyBase64 == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKeyBase64")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *ImportKeyPairInput) SetKeyPairName(v string) *ImportKeyPairInput { + s.KeyPairName = &v + return s +} + +// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. +func (s *ImportKeyPairInput) SetPublicKeyBase64(v string) *ImportKeyPairInput { + s.PublicKeyBase64 = &v return s } -type GetLoadBalancerInput struct { +type ImportKeyPairOutput struct { _ struct{} `type:"structure"` - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // An array of key-value pairs containing information about the request operation. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s GetLoadBalancerInput) String() string { +func (s ImportKeyPairOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancerInput) GoString() string { +func (s ImportKeyPairOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerInput) SetLoadBalancerName(v string) *GetLoadBalancerInput { - s.LoadBalancerName = &v +// SetOperation sets the Operation field's value. +func (s *ImportKeyPairOutput) SetOperation(v *Operation) *ImportKeyPairOutput { + s.Operation = v return s } -type GetLoadBalancerMetricDataInput struct { +// Describes an instance (a virtual private server). +type Instance struct { _ struct{} `type:"structure"` - // The end time of the period. - // - // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` + // The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). + Arn *string `locationName:"arn" type:"string"` - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // The blueprint ID (e.g., os_amlinux_2016_03). + BlueprintId *string `locationName:"blueprintId" type:"string"` - // The metric about which you want to return information. Valid values are listed - // below, along with the most useful statistics to include in your request. - // - // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated - // by the client that did not establish a session with the load balancer. - // Possible causes include a mismatch of ciphers or protocols. - // - // Statistics: The most useful statistic is Sum. - // - // * HealthyHostCount - The number of target instances that are considered - // healthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * UnhealthyHostCount - The number of target instances that are considered - // unhealthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that - // originate from the load balancer. Client errors are generated when requests - // are malformed or incomplete. These requests have not been received by - // the target instance. This count does not include any response codes generated - // by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that - // originate from the load balancer. This count does not include any response - // codes generated by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. Note that Minimum, Maximum, and Average all - // return 1. - // - // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * InstanceResponseTime - The time elapsed, in seconds, after the request - // leaves the load balancer until a response from the target instance is - // received. - // - // Statistics: The most useful statistic is Average. - // - // * RejectedConnectionCount - The number of connections that were rejected - // because the load balancer had reached its maximum number of connections. - // - // Statistics: The most useful statistic is Sum. - // - // * RequestCount - The number of requests processed over IPv4. This count - // includes only the requests with a response generated by a target instance - // of the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"LoadBalancerMetricName"` + // The friendly name of the blueprint (e.g., Amazon Linux). + BlueprintName *string `locationName:"blueprintName" type:"string"` - // The time period duration for your health data request. - // - // Period is a required field - Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` + // The bundle for the instance (e.g., micro_1_0). + BundleId *string `locationName:"bundleId" type:"string"` - // The start time of the period. - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` + // The timestamp when the instance was created (e.g., 1479734909.17). + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // An array of statistics that you want to request metrics for. Valid values - // are listed below. - // - // * SampleCount - The count (number) of data points used for the statistical - // calculation. - // - // * Average - The value of Sum / SampleCount during the specified period. - // By comparing this statistic with the Minimum and Maximum, you can determine - // the full scope of a metric and how close the average use is to the Minimum - // and Maximum. This comparison helps you to know when to increase or decrease - // your resources as needed. - // - // * Sum - All values submitted for the matching metric added together. This - // statistic can be useful for determining the total volume of a metric. - // - // * Minimum - The lowest value observed during the specified period. You - // can use this value to determine low volumes of activity for your application. - // - // * Maximum - The highest value observed during the specified period. You - // can use this value to determine high volumes of activity for your application. - // - // Statistics is a required field - Statistics []*string `locationName:"statistics" type:"list" required:"true"` + // The size of the vCPU and the amount of RAM for the instance. + Hardware *InstanceHardware `locationName:"hardware" type:"structure"` - // The unit for the time period request. Valid values are listed below. - // - // Unit is a required field - Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` + // The IPv6 address of the instance. + Ipv6Address *string `locationName:"ipv6Address" type:"string"` + + // A Boolean value indicating whether this instance has a static IP assigned + // to it. + IsStaticIp *bool `locationName:"isStaticIp" type:"boolean"` + + // The region name and Availability Zone where the instance is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1). + Name *string `locationName:"name" type:"string"` + + // Information about the public ports and monthly data transfer rates for the + // instance. + Networking *InstanceNetworking `locationName:"networking" type:"structure"` + + // The private IP address of the instance. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + + // The public IP address of the instance. + PublicIpAddress *string `locationName:"publicIpAddress" type:"string"` + + // The type of resource (usually Instance). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair). + SshKeyName *string `locationName:"sshKeyName" type:"string"` + + // The status code and the state (e.g., running) for the instance. + State *InstanceState `locationName:"state" type:"structure"` + + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` + + // The user name for connecting to the instance (e.g., ec2-user). + Username *string `locationName:"username" type:"string"` } // String returns the string representation -func (s GetLoadBalancerMetricDataInput) String() string { +func (s Instance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancerMetricDataInput) GoString() string { +func (s Instance) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerMetricDataInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Period != nil && *s.Period < 60 { - invalidParams.Add(request.NewErrParamMinValue("Period", 60)) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.Statistics == nil { - invalidParams.Add(request.NewErrParamRequired("Statistics")) - } - if s.Unit == nil { - invalidParams.Add(request.NewErrParamRequired("Unit")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetArn sets the Arn field's value. +func (s *Instance) SetArn(v string) *Instance { + s.Arn = &v + return s } -// SetEndTime sets the EndTime field's value. -func (s *GetLoadBalancerMetricDataInput) SetEndTime(v time.Time) *GetLoadBalancerMetricDataInput { - s.EndTime = &v +// SetBlueprintId sets the BlueprintId field's value. +func (s *Instance) SetBlueprintId(v string) *Instance { + s.BlueprintId = &v return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerMetricDataInput) SetLoadBalancerName(v string) *GetLoadBalancerMetricDataInput { - s.LoadBalancerName = &v +// SetBlueprintName sets the BlueprintName field's value. +func (s *Instance) SetBlueprintName(v string) *Instance { + s.BlueprintName = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *GetLoadBalancerMetricDataInput) SetMetricName(v string) *GetLoadBalancerMetricDataInput { - s.MetricName = &v +// SetBundleId sets the BundleId field's value. +func (s *Instance) SetBundleId(v string) *Instance { + s.BundleId = &v return s } -// SetPeriod sets the Period field's value. -func (s *GetLoadBalancerMetricDataInput) SetPeriod(v int64) *GetLoadBalancerMetricDataInput { - s.Period = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *Instance) SetCreatedAt(v time.Time) *Instance { + s.CreatedAt = &v return s } -// SetStartTime sets the StartTime field's value. -func (s *GetLoadBalancerMetricDataInput) SetStartTime(v time.Time) *GetLoadBalancerMetricDataInput { - s.StartTime = &v +// SetHardware sets the Hardware field's value. +func (s *Instance) SetHardware(v *InstanceHardware) *Instance { + s.Hardware = v return s } -// SetStatistics sets the Statistics field's value. -func (s *GetLoadBalancerMetricDataInput) SetStatistics(v []*string) *GetLoadBalancerMetricDataInput { - s.Statistics = v +// SetIpv6Address sets the Ipv6Address field's value. +func (s *Instance) SetIpv6Address(v string) *Instance { + s.Ipv6Address = &v return s } -// SetUnit sets the Unit field's value. -func (s *GetLoadBalancerMetricDataInput) SetUnit(v string) *GetLoadBalancerMetricDataInput { - s.Unit = &v +// SetIsStaticIp sets the IsStaticIp field's value. +func (s *Instance) SetIsStaticIp(v bool) *Instance { + s.IsStaticIp = &v return s } -type GetLoadBalancerMetricDataOutput struct { - _ struct{} `type:"structure"` - - // An array of metric datapoint objects. - MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - - // The metric about which you are receiving information. Valid values are listed - // below, along with the most useful statistics to include in your request. - // - // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated - // by the client that did not establish a session with the load balancer. - // Possible causes include a mismatch of ciphers or protocols. - // - // Statistics: The most useful statistic is Sum. - // - // * HealthyHostCount - The number of target instances that are considered - // healthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * UnhealthyHostCount - The number of target instances that are considered - // unhealthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that - // originate from the load balancer. Client errors are generated when requests - // are malformed or incomplete. These requests have not been received by - // the target instance. This count does not include any response codes generated - // by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that - // originate from the load balancer. This count does not include any response - // codes generated by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. Note that Minimum, Maximum, and Average all - // return 1. - // - // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * InstanceResponseTime - The time elapsed, in seconds, after the request - // leaves the load balancer until a response from the target instance is - // received. - // - // Statistics: The most useful statistic is Average. - // - // * RejectedConnectionCount - The number of connections that were rejected - // because the load balancer had reached its maximum number of connections. - // - // Statistics: The most useful statistic is Sum. - // - // * RequestCount - The number of requests processed over IPv4. This count - // includes only the requests with a response generated by a target instance - // of the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - MetricName *string `locationName:"metricName" type:"string" enum:"LoadBalancerMetricName"` +// SetLocation sets the Location field's value. +func (s *Instance) SetLocation(v *ResourceLocation) *Instance { + s.Location = v + return s } -// String returns the string representation -func (s GetLoadBalancerMetricDataOutput) String() string { - return awsutil.Prettify(s) +// SetName sets the Name field's value. +func (s *Instance) SetName(v string) *Instance { + s.Name = &v + return s } -// GoString returns the string representation -func (s GetLoadBalancerMetricDataOutput) GoString() string { - return s.String() +// SetNetworking sets the Networking field's value. +func (s *Instance) SetNetworking(v *InstanceNetworking) *Instance { + s.Networking = v + return s } -// SetMetricData sets the MetricData field's value. -func (s *GetLoadBalancerMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetLoadBalancerMetricDataOutput { - s.MetricData = v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *Instance) SetPrivateIpAddress(v string) *Instance { + s.PrivateIpAddress = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *GetLoadBalancerMetricDataOutput) SetMetricName(v string) *GetLoadBalancerMetricDataOutput { - s.MetricName = &v +// SetPublicIpAddress sets the PublicIpAddress field's value. +func (s *Instance) SetPublicIpAddress(v string) *Instance { + s.PublicIpAddress = &v return s } -type GetLoadBalancerOutput struct { - _ struct{} `type:"structure"` +// SetResourceType sets the ResourceType field's value. +func (s *Instance) SetResourceType(v string) *Instance { + s.ResourceType = &v + return s +} - // An object containing information about your load balancer. - LoadBalancer *LoadBalancer `locationName:"loadBalancer" type:"structure"` +// SetSshKeyName sets the SshKeyName field's value. +func (s *Instance) SetSshKeyName(v string) *Instance { + s.SshKeyName = &v + return s } -// String returns the string representation -func (s GetLoadBalancerOutput) String() string { - return awsutil.Prettify(s) +// SetState sets the State field's value. +func (s *Instance) SetState(v *InstanceState) *Instance { + s.State = v + return s } -// GoString returns the string representation -func (s GetLoadBalancerOutput) GoString() string { - return s.String() +// SetSupportCode sets the SupportCode field's value. +func (s *Instance) SetSupportCode(v string) *Instance { + s.SupportCode = &v + return s } -// SetLoadBalancer sets the LoadBalancer field's value. -func (s *GetLoadBalancerOutput) SetLoadBalancer(v *LoadBalancer) *GetLoadBalancerOutput { - s.LoadBalancer = v +// SetUsername sets the Username field's value. +func (s *Instance) SetUsername(v string) *Instance { + s.Username = &v return s } -type GetLoadBalancerTlsCertificatesInput struct { +// The parameters for gaining temporary access to one of your Amazon Lightsail +// instances. +type InstanceAccessDetails struct { _ struct{} `type:"structure"` - // The name of the load balancer you associated with your SSL/TLS certificate. + // For SSH access, the public key to use when accessing your instance For OpenSSH + // clients (e.g., command line SSH), you should save this value to tempkey-cert.pub. + CertKey *string `locationName:"certKey" type:"string"` + + // For SSH access, the date on which the temporary keys expire. + ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` + + // The name of this Amazon Lightsail instance. + InstanceName *string `locationName:"instanceName" type:"string"` + + // The public IP address of the Amazon Lightsail instance. + IpAddress *string `locationName:"ipAddress" type:"string"` + + // For RDP access, the password for your Amazon Lightsail instance. Password + // will be an empty string if the password for your new instance is not ready + // yet. When you create an instance, it can take up to 15 minutes for the instance + // to be ready. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // If you create an instance using any key pair other than the default (LightsailDefaultKeyPair), + // password will always be an empty string. + // + // If you change the Administrator password on the instance, Lightsail will + // continue to return the original password value. When accessing the instance + // using RDP, you need to manually enter the Administrator password after changing + // it from the default. + Password *string `locationName:"password" type:"string"` + + // For a Windows Server-based instance, an object with the data you can use + // to retrieve your password. This is only needed if password is empty and the + // instance is not new (and therefore the password is not ready yet). When you + // create an instance, it can take up to 15 minutes for the instance to be ready. + PasswordData *PasswordData `locationName:"passwordData" type:"structure"` + + // For SSH access, the temporary private key. For OpenSSH clients (e.g., command + // line SSH), you should save this value to tempkey). + PrivateKey *string `locationName:"privateKey" type:"string"` + + // The protocol for these Amazon Lightsail instance access details. + Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` + + // The user name to use when logging in to the Amazon Lightsail instance. + Username *string `locationName:"username" type:"string"` } // String returns the string representation -func (s GetLoadBalancerTlsCertificatesInput) String() string { +func (s InstanceAccessDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancerTlsCertificatesInput) GoString() string { +func (s InstanceAccessDetails) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerTlsCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerTlsCertificatesInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerTlsCertificatesInput) SetLoadBalancerName(v string) *GetLoadBalancerTlsCertificatesInput { - s.LoadBalancerName = &v +// SetCertKey sets the CertKey field's value. +func (s *InstanceAccessDetails) SetCertKey(v string) *InstanceAccessDetails { + s.CertKey = &v return s } -type GetLoadBalancerTlsCertificatesOutput struct { - _ struct{} `type:"structure"` - - // An array of LoadBalancerTlsCertificate objects describing your SSL/TLS certificates. - TlsCertificates []*LoadBalancerTlsCertificate `locationName:"tlsCertificates" type:"list"` +// SetExpiresAt sets the ExpiresAt field's value. +func (s *InstanceAccessDetails) SetExpiresAt(v time.Time) *InstanceAccessDetails { + s.ExpiresAt = &v + return s } -// String returns the string representation -func (s GetLoadBalancerTlsCertificatesOutput) String() string { - return awsutil.Prettify(s) +// SetInstanceName sets the InstanceName field's value. +func (s *InstanceAccessDetails) SetInstanceName(v string) *InstanceAccessDetails { + s.InstanceName = &v + return s } -// GoString returns the string representation -func (s GetLoadBalancerTlsCertificatesOutput) GoString() string { - return s.String() +// SetIpAddress sets the IpAddress field's value. +func (s *InstanceAccessDetails) SetIpAddress(v string) *InstanceAccessDetails { + s.IpAddress = &v + return s } -// SetTlsCertificates sets the TlsCertificates field's value. -func (s *GetLoadBalancerTlsCertificatesOutput) SetTlsCertificates(v []*LoadBalancerTlsCertificate) *GetLoadBalancerTlsCertificatesOutput { - s.TlsCertificates = v +// SetPassword sets the Password field's value. +func (s *InstanceAccessDetails) SetPassword(v string) *InstanceAccessDetails { + s.Password = &v return s } -type GetLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // A token used for paginating the results from your GetLoadBalancers request. - PageToken *string `locationName:"pageToken" type:"string"` +// SetPasswordData sets the PasswordData field's value. +func (s *InstanceAccessDetails) SetPasswordData(v *PasswordData) *InstanceAccessDetails { + s.PasswordData = v + return s } -// String returns the string representation -func (s GetLoadBalancersInput) String() string { - return awsutil.Prettify(s) +// SetPrivateKey sets the PrivateKey field's value. +func (s *InstanceAccessDetails) SetPrivateKey(v string) *InstanceAccessDetails { + s.PrivateKey = &v + return s } -// GoString returns the string representation -func (s GetLoadBalancersInput) GoString() string { - return s.String() +// SetProtocol sets the Protocol field's value. +func (s *InstanceAccessDetails) SetProtocol(v string) *InstanceAccessDetails { + s.Protocol = &v + return s } -// SetPageToken sets the PageToken field's value. -func (s *GetLoadBalancersInput) SetPageToken(v string) *GetLoadBalancersInput { - s.PageToken = &v +// SetUsername sets the Username field's value. +func (s *InstanceAccessDetails) SetUsername(v string) *InstanceAccessDetails { + s.Username = &v return s } -type GetLoadBalancersOutput struct { +// Describes the hardware for the instance. +type InstanceHardware struct { _ struct{} `type:"structure"` - // An array of LoadBalancer objects describing your load balancers. - LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` + // The number of vCPUs the instance has. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` - // A token used for advancing to the next page of results from your GetLoadBalancers - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // The disks attached to the instance. + Disks []*Disk `locationName:"disks" type:"list"` + + // The amount of RAM in GB on the instance (e.g., 1.0). + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` } // String returns the string representation -func (s GetLoadBalancersOutput) String() string { +func (s InstanceHardware) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancersOutput) GoString() string { +func (s InstanceHardware) GoString() string { return s.String() } -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *GetLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *GetLoadBalancersOutput { - s.LoadBalancers = v +// SetCpuCount sets the CpuCount field's value. +func (s *InstanceHardware) SetCpuCount(v int64) *InstanceHardware { + s.CpuCount = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetLoadBalancersOutput) SetNextPageToken(v string) *GetLoadBalancersOutput { - s.NextPageToken = &v +// SetDisks sets the Disks field's value. +func (s *InstanceHardware) SetDisks(v []*Disk) *InstanceHardware { + s.Disks = v return s } -type GetOperationInput struct { +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *InstanceHardware) SetRamSizeInGb(v float64) *InstanceHardware { + s.RamSizeInGb = &v + return s +} + +// Describes information about the health of the instance. +type InstanceHealthSummary struct { _ struct{} `type:"structure"` - // A GUID used to identify the operation. + // Describes the overall instance health. Valid values are below. + InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthState"` + + // More information about the instance health. If the instanceHealth is healthy, + // then an instanceHealthReason value is not provided. // - // OperationId is a required field - OperationId *string `locationName:"operationId" type:"string" required:"true"` + // If instanceHealth is initial, the instanceHealthReason value can be one of + // the following: + // + // * Lb.RegistrationInProgress - The target instance is in the process of + // being registered with the load balancer. + // + // * Lb.InitialHealthChecking - The Lightsail load balancer is still sending + // the target instance the minimum number of health checks required to determine + // its health status. + // + // If instanceHealth is unhealthy, the instanceHealthReason value can be one + // of the following: + // + // * Instance.ResponseCodeMismatch - The health checks did not return an + // expected HTTP code. + // + // * Instance.Timeout - The health check requests timed out. + // + // * Instance.FailedHealthChecks - The health checks failed because the connection + // to the target instance timed out, the target instance response was malformed, + // or the target instance failed the health check for an unknown reason. + // + // * Lb.InternalError - The health checks failed due to an internal error. + // + // If instanceHealth is unused, the instanceHealthReason value can be one of + // the following: + // + // * Instance.NotRegistered - The target instance is not registered with + // the target group. + // + // * Instance.NotInUse - The target group is not used by any load balancer, + // or the target instance is in an Availability Zone that is not enabled + // for its load balancer. + // + // * Instance.IpUnusable - The target IP address is reserved for use by a + // Lightsail load balancer. + // + // * Instance.InvalidState - The target is in the stopped or terminated state. + // + // If instanceHealth is draining, the instanceHealthReason value can be one + // of the following: + // + // * Instance.DeregistrationInProgress - The target instance is in the process + // of being deregistered and the deregistration delay period has not expired. + InstanceHealthReason *string `locationName:"instanceHealthReason" type:"string" enum:"InstanceHealthReason"` + + // The name of the Lightsail instance for which you are requesting health check + // data. + InstanceName *string `locationName:"instanceName" type:"string"` } // String returns the string representation -func (s GetOperationInput) String() string { +func (s InstanceHealthSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationInput) GoString() string { +func (s InstanceHealthSummary) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOperationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} - if s.OperationId == nil { - invalidParams.Add(request.NewErrParamRequired("OperationId")) - } +// SetInstanceHealth sets the InstanceHealth field's value. +func (s *InstanceHealthSummary) SetInstanceHealth(v string) *InstanceHealthSummary { + s.InstanceHealth = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetInstanceHealthReason sets the InstanceHealthReason field's value. +func (s *InstanceHealthSummary) SetInstanceHealthReason(v string) *InstanceHealthSummary { + s.InstanceHealthReason = &v + return s } -// SetOperationId sets the OperationId field's value. -func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { - s.OperationId = &v +// SetInstanceName sets the InstanceName field's value. +func (s *InstanceHealthSummary) SetInstanceName(v string) *InstanceHealthSummary { + s.InstanceName = &v return s } -type GetOperationOutput struct { +// Describes monthly data transfer rates and port information for an instance. +type InstanceNetworking struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // get operation request. - Operation *Operation `locationName:"operation" type:"structure"` + // The amount of data in GB allocated for monthly data transfers. + MonthlyTransfer *MonthlyTransfer `locationName:"monthlyTransfer" type:"structure"` + + // An array of key-value pairs containing information about the ports on the + // instance. + Ports []*InstancePortInfo `locationName:"ports" type:"list"` } // String returns the string representation -func (s GetOperationOutput) String() string { +func (s InstanceNetworking) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationOutput) GoString() string { +func (s InstanceNetworking) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { - s.Operation = v +// SetMonthlyTransfer sets the MonthlyTransfer field's value. +func (s *InstanceNetworking) SetMonthlyTransfer(v *MonthlyTransfer) *InstanceNetworking { + s.MonthlyTransfer = v return s } -type GetOperationsForResourceInput struct { +// SetPorts sets the Ports field's value. +func (s *InstanceNetworking) SetPorts(v []*InstancePortInfo) *InstanceNetworking { + s.Ports = v + return s +} + +// Describes information about the instance ports. +type InstancePortInfo struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get operations - // for resource request. - PageToken *string `locationName:"pageToken" type:"string"` + // The access direction (inbound or outbound). + AccessDirection *string `locationName:"accessDirection" type:"string" enum:"AccessDirection"` - // The name of the resource for which you are requesting information. + // The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)). + AccessFrom *string `locationName:"accessFrom" type:"string"` + + // The type of access (Public or Private). + AccessType *string `locationName:"accessType" type:"string" enum:"PortAccessType"` + + // The common name. + CommonName *string `locationName:"commonName" type:"string"` + + // The first port in the range. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The protocol being used. Can be one of the following. // - // ResourceName is a required field - ResourceName *string `locationName:"resourceName" type:"string" required:"true"` + // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, + // and error-checked delivery of streamed data between applications running + // on hosts communicating by an IP network. If you have an application that + // doesn't require reliable data stream service, use UDP instead. + // + // * all - All transport layer protocol types. For more general information, + // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on + // Wikipedia. + // + // * udp - With User Datagram Protocol (UDP), computer applications can send + // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. + // Prior communications are not required to set up transmission channels + // or data paths. Applications that don't require reliable data stream service + // can use UDP, which provides a connectionless datagram service that emphasizes + // reduced latency over reliability. If you do require reliable data stream + // service, use TCP instead. + Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` + + // The last port in the range. + ToPort *int64 `locationName:"toPort" type:"integer"` } // String returns the string representation -func (s GetOperationsForResourceInput) String() string { +func (s InstancePortInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationsForResourceInput) GoString() string { +func (s InstancePortInfo) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOperationsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOperationsForResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } +// SetAccessDirection sets the AccessDirection field's value. +func (s *InstancePortInfo) SetAccessDirection(v string) *InstancePortInfo { + s.AccessDirection = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAccessFrom sets the AccessFrom field's value. +func (s *InstancePortInfo) SetAccessFrom(v string) *InstancePortInfo { + s.AccessFrom = &v + return s } -// SetPageToken sets the PageToken field's value. -func (s *GetOperationsForResourceInput) SetPageToken(v string) *GetOperationsForResourceInput { - s.PageToken = &v +// SetAccessType sets the AccessType field's value. +func (s *InstancePortInfo) SetAccessType(v string) *InstancePortInfo { + s.AccessType = &v return s } -// SetResourceName sets the ResourceName field's value. -func (s *GetOperationsForResourceInput) SetResourceName(v string) *GetOperationsForResourceInput { - s.ResourceName = &v +// SetCommonName sets the CommonName field's value. +func (s *InstancePortInfo) SetCommonName(v string) *InstancePortInfo { + s.CommonName = &v return s } -type GetOperationsForResourceOutput struct { +// SetFromPort sets the FromPort field's value. +func (s *InstancePortInfo) SetFromPort(v int64) *InstancePortInfo { + s.FromPort = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *InstancePortInfo) SetProtocol(v string) *InstancePortInfo { + s.Protocol = &v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *InstancePortInfo) SetToPort(v int64) *InstancePortInfo { + s.ToPort = &v + return s +} + +// Describes the port state. +type InstancePortState struct { _ struct{} `type:"structure"` - // (Deprecated) Returns the number of pages of results that remain. + // The first port in the range. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The protocol being used. Can be one of the following. // - // In releases prior to June 12, 2017, this parameter returned null by the API. - // It is now deprecated, and the API returns the nextPageToken parameter instead. + // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, + // and error-checked delivery of streamed data between applications running + // on hosts communicating by an IP network. If you have an application that + // doesn't require reliable data stream service, use UDP instead. // - // Deprecated: NextPageCount has been deprecated - NextPageCount *string `locationName:"nextPageCount" deprecated:"true" type:"string"` + // * all - All transport layer protocol types. For more general information, + // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on + // Wikipedia. + // + // * udp - With User Datagram Protocol (UDP), computer applications can send + // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. + // Prior communications are not required to set up transmission channels + // or data paths. Applications that don't require reliable data stream service + // can use UDP, which provides a connectionless datagram service that emphasizes + // reduced latency over reliability. If you do require reliable data stream + // service, use TCP instead. + Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // Specifies whether the instance port is open or closed. + State *string `locationName:"state" type:"string" enum:"PortState"` - // An array of key-value pairs containing information about the results of your - // get operations for resource request. - Operations []*Operation `locationName:"operations" type:"list"` + // The last port in the range. + ToPort *int64 `locationName:"toPort" type:"integer"` } // String returns the string representation -func (s GetOperationsForResourceOutput) String() string { +func (s InstancePortState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationsForResourceOutput) GoString() string { +func (s InstancePortState) GoString() string { return s.String() } -// SetNextPageCount sets the NextPageCount field's value. -func (s *GetOperationsForResourceOutput) SetNextPageCount(v string) *GetOperationsForResourceOutput { - s.NextPageCount = &v +// SetFromPort sets the FromPort field's value. +func (s *InstancePortState) SetFromPort(v int64) *InstancePortState { + s.FromPort = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetOperationsForResourceOutput) SetNextPageToken(v string) *GetOperationsForResourceOutput { - s.NextPageToken = &v +// SetProtocol sets the Protocol field's value. +func (s *InstancePortState) SetProtocol(v string) *InstancePortState { + s.Protocol = &v return s } -// SetOperations sets the Operations field's value. -func (s *GetOperationsForResourceOutput) SetOperations(v []*Operation) *GetOperationsForResourceOutput { - s.Operations = v +// SetState sets the State field's value. +func (s *InstancePortState) SetState(v string) *InstancePortState { + s.State = &v return s } -type GetOperationsInput struct { +// SetToPort sets the ToPort field's value. +func (s *InstancePortState) SetToPort(v int64) *InstancePortState { + s.ToPort = &v + return s +} + +// Describes the snapshot of the virtual private server, or instance. +type InstanceSnapshot struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get operations - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} + // The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). + Arn *string `locationName:"arn" type:"string"` -// String returns the string representation -func (s GetOperationsInput) String() string { - return awsutil.Prettify(s) -} + // The timestamp when the snapshot was created (e.g., 1479907467.024). + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` -// GoString returns the string representation -func (s GetOperationsInput) GoString() string { - return s.String() -} + // An array of disk objects containing information about all block storage disks. + FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` -// SetPageToken sets the PageToken field's value. -func (s *GetOperationsInput) SetPageToken(v string) *GetOperationsInput { - s.PageToken = &v - return s -} + // The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). + // A blueprint is a virtual private server (or instance) image used to create + // instances quickly. + FromBlueprintId *string `locationName:"fromBlueprintId" type:"string"` -type GetOperationsOutput struct { - _ struct{} `type:"structure"` + // The bundle ID from which you created the snapshot (e.g., micro_1_0). + FromBundleId *string `locationName:"fromBundleId" type:"string"` - // A token used for advancing to the next page of results from your get operations - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // The Amazon Resource Name (ARN) of the instance from which the snapshot was + // created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). + FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` - // An array of key-value pairs containing information about the results of your - // get operations request. - Operations []*Operation `locationName:"operations" type:"list"` + // The instance from which the snapshot was created. + FromInstanceName *string `locationName:"fromInstanceName" type:"string"` + + // The region name and Availability Zone where you created the snapshot. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the snapshot. + Name *string `locationName:"name" type:"string"` + + // The progress of the snapshot. + Progress *string `locationName:"progress" type:"string"` + + // The type of resource (usually InstanceSnapshot). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The size in GB of the SSD. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + + // The state the snapshot is in. + State *string `locationName:"state" type:"string" enum:"InstanceSnapshotState"` + + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s GetOperationsOutput) String() string { +func (s InstanceSnapshot) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationsOutput) GoString() string { +func (s InstanceSnapshot) GoString() string { return s.String() } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetOperationsOutput) SetNextPageToken(v string) *GetOperationsOutput { - s.NextPageToken = &v +// SetArn sets the Arn field's value. +func (s *InstanceSnapshot) SetArn(v string) *InstanceSnapshot { + s.Arn = &v return s } -// SetOperations sets the Operations field's value. -func (s *GetOperationsOutput) SetOperations(v []*Operation) *GetOperationsOutput { - s.Operations = v +// SetCreatedAt sets the CreatedAt field's value. +func (s *InstanceSnapshot) SetCreatedAt(v time.Time) *InstanceSnapshot { + s.CreatedAt = &v return s } -type GetRegionsInput struct { - _ struct{} `type:"structure"` +// SetFromAttachedDisks sets the FromAttachedDisks field's value. +func (s *InstanceSnapshot) SetFromAttachedDisks(v []*Disk) *InstanceSnapshot { + s.FromAttachedDisks = v + return s +} - // A Boolean value indicating whether to also include Availability Zones in - // your get regions request. Availability Zones are indicated with a letter: - // e.g., us-east-2a. - IncludeAvailabilityZones *bool `locationName:"includeAvailabilityZones" type:"boolean"` +// SetFromBlueprintId sets the FromBlueprintId field's value. +func (s *InstanceSnapshot) SetFromBlueprintId(v string) *InstanceSnapshot { + s.FromBlueprintId = &v + return s } -// String returns the string representation -func (s GetRegionsInput) String() string { - return awsutil.Prettify(s) +// SetFromBundleId sets the FromBundleId field's value. +func (s *InstanceSnapshot) SetFromBundleId(v string) *InstanceSnapshot { + s.FromBundleId = &v + return s } -// GoString returns the string representation -func (s GetRegionsInput) GoString() string { - return s.String() +// SetFromInstanceArn sets the FromInstanceArn field's value. +func (s *InstanceSnapshot) SetFromInstanceArn(v string) *InstanceSnapshot { + s.FromInstanceArn = &v + return s } -// SetIncludeAvailabilityZones sets the IncludeAvailabilityZones field's value. -func (s *GetRegionsInput) SetIncludeAvailabilityZones(v bool) *GetRegionsInput { - s.IncludeAvailabilityZones = &v +// SetFromInstanceName sets the FromInstanceName field's value. +func (s *InstanceSnapshot) SetFromInstanceName(v string) *InstanceSnapshot { + s.FromInstanceName = &v return s } -type GetRegionsOutput struct { - _ struct{} `type:"structure"` +// SetLocation sets the Location field's value. +func (s *InstanceSnapshot) SetLocation(v *ResourceLocation) *InstanceSnapshot { + s.Location = v + return s +} + +// SetName sets the Name field's value. +func (s *InstanceSnapshot) SetName(v string) *InstanceSnapshot { + s.Name = &v + return s +} + +// SetProgress sets the Progress field's value. +func (s *InstanceSnapshot) SetProgress(v string) *InstanceSnapshot { + s.Progress = &v + return s +} - // An array of key-value pairs containing information about your get regions - // request. - Regions []*Region `locationName:"regions" type:"list"` +// SetResourceType sets the ResourceType field's value. +func (s *InstanceSnapshot) SetResourceType(v string) *InstanceSnapshot { + s.ResourceType = &v + return s } -// String returns the string representation -func (s GetRegionsOutput) String() string { - return awsutil.Prettify(s) +// SetSizeInGb sets the SizeInGb field's value. +func (s *InstanceSnapshot) SetSizeInGb(v int64) *InstanceSnapshot { + s.SizeInGb = &v + return s } -// GoString returns the string representation -func (s GetRegionsOutput) GoString() string { - return s.String() +// SetState sets the State field's value. +func (s *InstanceSnapshot) SetState(v string) *InstanceSnapshot { + s.State = &v + return s } -// SetRegions sets the Regions field's value. -func (s *GetRegionsOutput) SetRegions(v []*Region) *GetRegionsOutput { - s.Regions = v +// SetSupportCode sets the SupportCode field's value. +func (s *InstanceSnapshot) SetSupportCode(v string) *InstanceSnapshot { + s.SupportCode = &v return s } -type GetStaticIpInput struct { +// Describes the virtual private server (or instance) status. +type InstanceState struct { _ struct{} `type:"structure"` - // The name of the static IP in Lightsail. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` + // The status code for the instance. + Code *int64 `locationName:"code" type:"integer"` + + // The state of the instance (e.g., running or pending). + Name *string `locationName:"name" type:"string"` } // String returns the string representation -func (s GetStaticIpInput) String() string { +func (s InstanceState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStaticIpInput) GoString() string { +func (s InstanceState) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCode sets the Code field's value. +func (s *InstanceState) SetCode(v int64) *InstanceState { + s.Code = &v + return s } -// SetStaticIpName sets the StaticIpName field's value. -func (s *GetStaticIpInput) SetStaticIpName(v string) *GetStaticIpInput { - s.StaticIpName = &v +// SetName sets the Name field's value. +func (s *InstanceState) SetName(v string) *InstanceState { + s.Name = &v return s } -type GetStaticIpOutput struct { +type IsVpcPeeredInput struct { _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the requested static - // IP. - StaticIp *StaticIp `locationName:"staticIp" type:"structure"` } // String returns the string representation -func (s GetStaticIpOutput) String() string { +func (s IsVpcPeeredInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStaticIpOutput) GoString() string { +func (s IsVpcPeeredInput) GoString() string { return s.String() } -// SetStaticIp sets the StaticIp field's value. -func (s *GetStaticIpOutput) SetStaticIp(v *StaticIp) *GetStaticIpOutput { - s.StaticIp = v - return s -} - -type GetStaticIpsInput struct { +type IsVpcPeeredOutput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get static - // IPs request. - PageToken *string `locationName:"pageToken" type:"string"` + // Returns true if the Lightsail VPC is peered; otherwise, false. + IsPeered *bool `locationName:"isPeered" type:"boolean"` } // String returns the string representation -func (s GetStaticIpsInput) String() string { +func (s IsVpcPeeredOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStaticIpsInput) GoString() string { +func (s IsVpcPeeredOutput) GoString() string { return s.String() } -// SetPageToken sets the PageToken field's value. -func (s *GetStaticIpsInput) SetPageToken(v string) *GetStaticIpsInput { - s.PageToken = &v +// SetIsPeered sets the IsPeered field's value. +func (s *IsVpcPeeredOutput) SetIsPeered(v bool) *IsVpcPeeredOutput { + s.IsPeered = &v return s } -type GetStaticIpsOutput struct { +// Describes the SSH key pair. +type KeyPair struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get static - // IPs request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` - - // An array of key-value pairs containing information about your get static - // IPs request. - StaticIps []*StaticIp `locationName:"staticIps" type:"list"` -} - -// String returns the string representation -func (s GetStaticIpsOutput) String() string { - return awsutil.Prettify(s) -} + // The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). + Arn *string `locationName:"arn" type:"string"` -// GoString returns the string representation -func (s GetStaticIpsOutput) GoString() string { - return s.String() -} + // The timestamp when the key pair was created (e.g., 1479816991.349). + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetStaticIpsOutput) SetNextPageToken(v string) *GetStaticIpsOutput { - s.NextPageToken = &v - return s -} + // The RSA fingerprint of the key pair. + Fingerprint *string `locationName:"fingerprint" type:"string"` -// SetStaticIps sets the StaticIps field's value. -func (s *GetStaticIpsOutput) SetStaticIps(v []*StaticIp) *GetStaticIpsOutput { - s.StaticIps = v - return s -} + // The region name and Availability Zone where the key pair was created. + Location *ResourceLocation `locationName:"location" type:"structure"` -type ImportKeyPairInput struct { - _ struct{} `type:"structure"` + // The friendly name of the SSH key pair. + Name *string `locationName:"name" type:"string"` - // The name of the key pair for which you want to import the public key. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + // The resource type (usually KeyPair). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // A base64-encoded public key of the ssh-rsa type. - // - // PublicKeyBase64 is a required field - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string" required:"true"` + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s ImportKeyPairInput) String() string { +func (s KeyPair) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportKeyPairInput) GoString() string { +func (s KeyPair) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - if s.PublicKeyBase64 == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyBase64")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetArn sets the Arn field's value. +func (s *KeyPair) SetArn(v string) *KeyPair { + s.Arn = &v + return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *ImportKeyPairInput) SetKeyPairName(v string) *ImportKeyPairInput { - s.KeyPairName = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *KeyPair) SetCreatedAt(v time.Time) *KeyPair { + s.CreatedAt = &v return s } -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *ImportKeyPairInput) SetPublicKeyBase64(v string) *ImportKeyPairInput { - s.PublicKeyBase64 = &v +// SetFingerprint sets the Fingerprint field's value. +func (s *KeyPair) SetFingerprint(v string) *KeyPair { + s.Fingerprint = &v return s } -type ImportKeyPairOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` +// SetLocation sets the Location field's value. +func (s *KeyPair) SetLocation(v *ResourceLocation) *KeyPair { + s.Location = v + return s } -// String returns the string representation -func (s ImportKeyPairOutput) String() string { - return awsutil.Prettify(s) +// SetName sets the Name field's value. +func (s *KeyPair) SetName(v string) *KeyPair { + s.Name = &v + return s } -// GoString returns the string representation -func (s ImportKeyPairOutput) GoString() string { - return s.String() +// SetResourceType sets the ResourceType field's value. +func (s *KeyPair) SetResourceType(v string) *KeyPair { + s.ResourceType = &v + return s } -// SetOperation sets the Operation field's value. -func (s *ImportKeyPairOutput) SetOperation(v *Operation) *ImportKeyPairOutput { - s.Operation = v +// SetSupportCode sets the SupportCode field's value. +func (s *KeyPair) SetSupportCode(v string) *KeyPair { + s.SupportCode = &v return s } -// Describes an instance (a virtual private server). -type Instance struct { +// Describes the Lightsail load balancer. +type LoadBalancer struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). + // The Amazon Resource Name (ARN) of the load balancer. Arn *string `locationName:"arn" type:"string"` - // The blueprint ID (e.g., os_amlinux_2016_03). - BlueprintId *string `locationName:"blueprintId" type:"string"` - - // The friendly name of the blueprint (e.g., Amazon Linux). - BlueprintName *string `locationName:"blueprintName" type:"string"` - - // The bundle for the instance (e.g., micro_1_0). - BundleId *string `locationName:"bundleId" type:"string"` + // A string to string map of the configuration options for your load balancer. + // Valid values are listed below. + ConfigurationOptions map[string]*string `locationName:"configurationOptions" type:"map"` - // The timestamp when the instance was created (e.g., 1479734909.17). + // The date when your load balancer was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The size of the vCPU and the amount of RAM for the instance. - Hardware *InstanceHardware `locationName:"hardware" type:"structure"` + // The DNS name of your Lightsail load balancer. + DnsName *string `locationName:"dnsName" type:"string"` - // The IPv6 address of the instance. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` + // The path you specified to perform your health checks. If no path is specified, + // the load balancer tries to make a request to the default (root) page. + HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` - // A Boolean value indicating whether this instance has a static IP assigned - // to it. - IsStaticIp *bool `locationName:"isStaticIp" type:"boolean"` + // An array of InstanceHealthSummary objects describing the health of the load + // balancer. + InstanceHealthSummary []*InstanceHealthSummary `locationName:"instanceHealthSummary" type:"list"` + + // The port where the load balancer will direct traffic to your Lightsail instances. + // For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443. + InstancePort *int64 `locationName:"instancePort" type:"integer"` - // The region name and availability zone where the instance is located. + // The AWS Region where your load balancer was created (e.g., us-east-2a). Lightsail + // automatically creates your load balancer across Availability Zones. Location *ResourceLocation `locationName:"location" type:"structure"` - // The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1). + // The name of the load balancer (e.g., my-load-balancer). Name *string `locationName:"name" type:"string"` - // Information about the public ports and monthly data transfer rates for the - // instance. - Networking *InstanceNetworking `locationName:"networking" type:"structure"` - - // The private IP address of the instance. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The protocol you have enabled for your load balancer. Valid values are below. + // + // You can't just have HTTP_HTTPS, but you can have just HTTP. + Protocol *string `locationName:"protocol" type:"string" enum:"LoadBalancerProtocol"` - // The public IP address of the instance. - PublicIpAddress *string `locationName:"publicIpAddress" type:"string"` + // An array of public port settings for your load balancer. For HTTP, use port + // 80. For HTTPS, use port 443. + PublicPorts []*int64 `locationName:"publicPorts" type:"list"` - // The type of resource (usually Instance). + // The resource type (e.g., LoadBalancer. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair). - SshKeyName *string `locationName:"sshKeyName" type:"string"` - - // The status code and the state (e.g., running) for the instance. - State *InstanceState `locationName:"state" type:"structure"` + // The status of your load balancer. Valid values are below. + State *string `locationName:"state" type:"string" enum:"LoadBalancerState"` // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. + // questions about your Lightsail load balancer. This code enables our support + // team to look up your Lightsail information more easily. SupportCode *string `locationName:"supportCode" type:"string"` - // The user name for connecting to the instance (e.g., ec2-user). - Username *string `locationName:"username" type:"string"` + // An array of LoadBalancerTlsCertificateSummary objects that provide additional + // information about the SSL/TLS certificates. For example, if true, the certificate + // is attached to the load balancer. + TlsCertificateSummaries []*LoadBalancerTlsCertificateSummary `locationName:"tlsCertificateSummaries" type:"list"` } // String returns the string representation -func (s Instance) String() string { +func (s LoadBalancer) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Instance) GoString() string { +func (s LoadBalancer) GoString() string { return s.String() } // SetArn sets the Arn field's value. -func (s *Instance) SetArn(v string) *Instance { +func (s *LoadBalancer) SetArn(v string) *LoadBalancer { s.Arn = &v return s } -// SetBlueprintId sets the BlueprintId field's value. -func (s *Instance) SetBlueprintId(v string) *Instance { - s.BlueprintId = &v - return s -} - -// SetBlueprintName sets the BlueprintName field's value. -func (s *Instance) SetBlueprintName(v string) *Instance { - s.BlueprintName = &v +// SetConfigurationOptions sets the ConfigurationOptions field's value. +func (s *LoadBalancer) SetConfigurationOptions(v map[string]*string) *LoadBalancer { + s.ConfigurationOptions = v return s } -// SetBundleId sets the BundleId field's value. -func (s *Instance) SetBundleId(v string) *Instance { - s.BundleId = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *LoadBalancer) SetCreatedAt(v time.Time) *LoadBalancer { + s.CreatedAt = &v return s } -// SetCreatedAt sets the CreatedAt field's value. -func (s *Instance) SetCreatedAt(v time.Time) *Instance { - s.CreatedAt = &v +// SetDnsName sets the DnsName field's value. +func (s *LoadBalancer) SetDnsName(v string) *LoadBalancer { + s.DnsName = &v return s } -// SetHardware sets the Hardware field's value. -func (s *Instance) SetHardware(v *InstanceHardware) *Instance { - s.Hardware = v +// SetHealthCheckPath sets the HealthCheckPath field's value. +func (s *LoadBalancer) SetHealthCheckPath(v string) *LoadBalancer { + s.HealthCheckPath = &v return s } -// SetIpv6Address sets the Ipv6Address field's value. -func (s *Instance) SetIpv6Address(v string) *Instance { - s.Ipv6Address = &v +// SetInstanceHealthSummary sets the InstanceHealthSummary field's value. +func (s *LoadBalancer) SetInstanceHealthSummary(v []*InstanceHealthSummary) *LoadBalancer { + s.InstanceHealthSummary = v return s } -// SetIsStaticIp sets the IsStaticIp field's value. -func (s *Instance) SetIsStaticIp(v bool) *Instance { - s.IsStaticIp = &v +// SetInstancePort sets the InstancePort field's value. +func (s *LoadBalancer) SetInstancePort(v int64) *LoadBalancer { + s.InstancePort = &v return s } // SetLocation sets the Location field's value. -func (s *Instance) SetLocation(v *ResourceLocation) *Instance { +func (s *LoadBalancer) SetLocation(v *ResourceLocation) *LoadBalancer { s.Location = v return s } // SetName sets the Name field's value. -func (s *Instance) SetName(v string) *Instance { +func (s *LoadBalancer) SetName(v string) *LoadBalancer { s.Name = &v return s } -// SetNetworking sets the Networking field's value. -func (s *Instance) SetNetworking(v *InstanceNetworking) *Instance { - s.Networking = v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *Instance) SetPrivateIpAddress(v string) *Instance { - s.PrivateIpAddress = &v +// SetProtocol sets the Protocol field's value. +func (s *LoadBalancer) SetProtocol(v string) *LoadBalancer { + s.Protocol = &v return s } -// SetPublicIpAddress sets the PublicIpAddress field's value. -func (s *Instance) SetPublicIpAddress(v string) *Instance { - s.PublicIpAddress = &v +// SetPublicPorts sets the PublicPorts field's value. +func (s *LoadBalancer) SetPublicPorts(v []*int64) *LoadBalancer { + s.PublicPorts = v return s } // SetResourceType sets the ResourceType field's value. -func (s *Instance) SetResourceType(v string) *Instance { +func (s *LoadBalancer) SetResourceType(v string) *LoadBalancer { s.ResourceType = &v return s } -// SetSshKeyName sets the SshKeyName field's value. -func (s *Instance) SetSshKeyName(v string) *Instance { - s.SshKeyName = &v - return s -} - // SetState sets the State field's value. -func (s *Instance) SetState(v *InstanceState) *Instance { - s.State = v +func (s *LoadBalancer) SetState(v string) *LoadBalancer { + s.State = &v return s } // SetSupportCode sets the SupportCode field's value. -func (s *Instance) SetSupportCode(v string) *Instance { +func (s *LoadBalancer) SetSupportCode(v string) *LoadBalancer { s.SupportCode = &v return s } -// SetUsername sets the Username field's value. -func (s *Instance) SetUsername(v string) *Instance { - s.Username = &v +// SetTlsCertificateSummaries sets the TlsCertificateSummaries field's value. +func (s *LoadBalancer) SetTlsCertificateSummaries(v []*LoadBalancerTlsCertificateSummary) *LoadBalancer { + s.TlsCertificateSummaries = v return s } -// The parameters for gaining temporary access to one of your Amazon Lightsail -// instances. -type InstanceAccessDetails struct { +// Describes a load balancer SSL/TLS certificate. +// +// TLS is just an updated, more secure version of Secure Socket Layer (SSL). +type LoadBalancerTlsCertificate struct { _ struct{} `type:"structure"` - // For SSH access, the public key to use when accessing your instance For OpenSSH - // clients (e.g., command line SSH), you should save this value to tempkey-cert.pub. - CertKey *string `locationName:"certKey" type:"string"` - - // For SSH access, the date on which the temporary keys expire. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` - - // The name of this Amazon Lightsail instance. - InstanceName *string `locationName:"instanceName" type:"string"` - - // The public IP address of the Amazon Lightsail instance. - IpAddress *string `locationName:"ipAddress" type:"string"` - - // For RDP access, the password for your Amazon Lightsail instance. Password - // will be an empty string if the password for your new instance is not ready - // yet. When you create an instance, it can take up to 15 minutes for the instance - // to be ready. - // - // If you create an instance using any key pair other than the default (LightsailDefaultKeyPair), - // password will always be an empty string. - // - // If you change the Administrator password on the instance, Lightsail will - // continue to return the original password value. When accessing the instance - // using RDP, you need to manually enter the Administrator password after changing - // it from the default. - Password *string `locationName:"password" type:"string"` - - // For a Windows Server-based instance, an object with the data you can use - // to retrieve your password. This is only needed if password is empty and the - // instance is not new (and therefore the password is not ready yet). When you - // create an instance, it can take up to 15 minutes for the instance to be ready. - PasswordData *PasswordData `locationName:"passwordData" type:"structure"` - - // For SSH access, the temporary private key. For OpenSSH clients (e.g., command - // line SSH), you should save this value to tempkey). - PrivateKey *string `locationName:"privateKey" type:"string"` - - // The protocol for these Amazon Lightsail instance access details. - Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` - - // The user name to use when logging in to the Amazon Lightsail instance. - Username *string `locationName:"username" type:"string"` -} - -// String returns the string representation -func (s InstanceAccessDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceAccessDetails) GoString() string { - return s.String() -} - -// SetCertKey sets the CertKey field's value. -func (s *InstanceAccessDetails) SetCertKey(v string) *InstanceAccessDetails { - s.CertKey = &v - return s -} - -// SetExpiresAt sets the ExpiresAt field's value. -func (s *InstanceAccessDetails) SetExpiresAt(v time.Time) *InstanceAccessDetails { - s.ExpiresAt = &v - return s -} - -// SetInstanceName sets the InstanceName field's value. -func (s *InstanceAccessDetails) SetInstanceName(v string) *InstanceAccessDetails { - s.InstanceName = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *InstanceAccessDetails) SetIpAddress(v string) *InstanceAccessDetails { - s.IpAddress = &v - return s -} - -// SetPassword sets the Password field's value. -func (s *InstanceAccessDetails) SetPassword(v string) *InstanceAccessDetails { - s.Password = &v - return s -} - -// SetPasswordData sets the PasswordData field's value. -func (s *InstanceAccessDetails) SetPasswordData(v *PasswordData) *InstanceAccessDetails { - s.PasswordData = v - return s -} + // The Amazon Resource Name (ARN) of the SSL/TLS certificate. + Arn *string `locationName:"arn" type:"string"` -// SetPrivateKey sets the PrivateKey field's value. -func (s *InstanceAccessDetails) SetPrivateKey(v string) *InstanceAccessDetails { - s.PrivateKey = &v - return s -} + // The time when you created your SSL/TLS certificate. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` -// SetProtocol sets the Protocol field's value. -func (s *InstanceAccessDetails) SetProtocol(v string) *InstanceAccessDetails { - s.Protocol = &v - return s -} + // The domain name for your SSL/TLS certificate. + DomainName *string `locationName:"domainName" type:"string"` -// SetUsername sets the Username field's value. -func (s *InstanceAccessDetails) SetUsername(v string) *InstanceAccessDetails { - s.Username = &v - return s -} + // An array of LoadBalancerTlsCertificateDomainValidationRecord objects describing + // the records. + DomainValidationRecords []*LoadBalancerTlsCertificateDomainValidationRecord `locationName:"domainValidationRecords" type:"list"` -// Describes the hardware for the instance. -type InstanceHardware struct { - _ struct{} `type:"structure"` + // The reason for the SSL/TLS certificate validation failure. + FailureReason *string `locationName:"failureReason" type:"string" enum:"LoadBalancerTlsCertificateFailureReason"` - // The number of vCPUs the instance has. - CpuCount *int64 `locationName:"cpuCount" type:"integer"` + // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. + IsAttached *bool `locationName:"isAttached" type:"boolean"` - // The disks attached to the instance. - Disks []*Disk `locationName:"disks" type:"list"` + // The time when the SSL/TLS certificate was issued. + IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp"` - // The amount of RAM in GB on the instance (e.g., 1.0). - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` -} + // The issuer of the certificate. + Issuer *string `locationName:"issuer" type:"string"` -// String returns the string representation -func (s InstanceHardware) String() string { - return awsutil.Prettify(s) -} + // The algorithm that was used to generate the key pair (the public and private + // key). + KeyAlgorithm *string `locationName:"keyAlgorithm" type:"string"` -// GoString returns the string representation -func (s InstanceHardware) GoString() string { - return s.String() -} + // The load balancer name where your SSL/TLS certificate is attached. + LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` -// SetCpuCount sets the CpuCount field's value. -func (s *InstanceHardware) SetCpuCount(v int64) *InstanceHardware { - s.CpuCount = &v - return s -} + // The AWS Region and Availability Zone where you created your certificate. + Location *ResourceLocation `locationName:"location" type:"structure"` -// SetDisks sets the Disks field's value. -func (s *InstanceHardware) SetDisks(v []*Disk) *InstanceHardware { - s.Disks = v - return s -} + // The name of the SSL/TLS certificate (e.g., my-certificate). + Name *string `locationName:"name" type:"string"` -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *InstanceHardware) SetRamSizeInGb(v float64) *InstanceHardware { - s.RamSizeInGb = &v - return s -} + // The timestamp when the SSL/TLS certificate expires. + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` -// Describes information about the health of the instance. -type InstanceHealthSummary struct { - _ struct{} `type:"structure"` + // The timestamp when the SSL/TLS certificate is first valid. + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` - // Describes the overall instance health. Valid values are below. - InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthState"` + // An object containing information about the status of Lightsail's managed + // renewal for the certificate. + RenewalSummary *LoadBalancerTlsCertificateRenewalSummary `locationName:"renewalSummary" type:"structure"` - // More information about the instance health. If the instanceHealth is healthy, - // then an instanceHealthReason value is not provided. - // - // If instanceHealth is initial, the instanceHealthReason value can be one of - // the following: - // - // * Lb.RegistrationInProgress - The target instance is in the process of - // being registered with the load balancer. - // - // * Lb.InitialHealthChecking - The Lightsail load balancer is still sending - // the target instance the minimum number of health checks required to determine - // its health status. - // - // If instanceHealth is unhealthy, the instanceHealthReason value can be one - // of the following: - // - // * Instance.ResponseCodeMismatch - The health checks did not return an - // expected HTTP code. + // The resource type (e.g., LoadBalancerTlsCertificate). // - // * Instance.Timeout - The health check requests timed out. + // * Instance - A Lightsail instance (a virtual private server) // - // * Instance.FailedHealthChecks - The health checks failed because the connection - // to the target instance timed out, the target instance response was malformed, - // or the target instance failed the health check for an unknown reason. + // * StaticIp - A static IP address // - // * Lb.InternalError - The health checks failed due to an internal error. + // * KeyPair - The key pair used to connect to a Lightsail instance // - // If instanceHealth is unused, the instanceHealthReason value can be one of - // the following: + // * InstanceSnapshot - A Lightsail instance snapshot // - // * Instance.NotRegistered - The target instance is not registered with - // the target group. + // * Domain - A DNS zone // - // * Instance.NotInUse - The target group is not used by any load balancer, - // or the target instance is in an Availability Zone that is not enabled - // for its load balancer. + // * PeeredVpc - A peered VPC // - // * Instance.IpUnusable - The target IP address is reserved for use by a - // Lightsail load balancer. + // * LoadBalancer - A Lightsail load balancer // - // * Instance.InvalidState - The target is in the stopped or terminated state. + // * LoadBalancerTlsCertificate - An SSL/TLS certificate associated with + // a Lightsail load balancer // - // If instanceHealth is draining, the instanceHealthReason value can be one - // of the following: + // * Disk - A Lightsail block storage disk // - // * Instance.DeregistrationInProgress - The target instance is in the process - // of being deregistered and the deregistration delay period has not expired. - InstanceHealthReason *string `locationName:"instanceHealthReason" type:"string" enum:"InstanceHealthReason"` - - // The name of the Lightsail instance for which you are requesting health check - // data. - InstanceName *string `locationName:"instanceName" type:"string"` -} + // * DiskSnapshot - A block storage disk snapshot + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -// String returns the string representation -func (s InstanceHealthSummary) String() string { - return awsutil.Prettify(s) -} + // The reason the certificate was revoked. Valid values are below. + RevocationReason *string `locationName:"revocationReason" type:"string" enum:"LoadBalancerTlsCertificateRevocationReason"` -// GoString returns the string representation -func (s InstanceHealthSummary) GoString() string { - return s.String() -} + // The timestamp when the SSL/TLS certificate was revoked. + RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp"` -// SetInstanceHealth sets the InstanceHealth field's value. -func (s *InstanceHealthSummary) SetInstanceHealth(v string) *InstanceHealthSummary { - s.InstanceHealth = &v - return s -} + // The serial number of the certificate. + Serial *string `locationName:"serial" type:"string"` -// SetInstanceHealthReason sets the InstanceHealthReason field's value. -func (s *InstanceHealthSummary) SetInstanceHealthReason(v string) *InstanceHealthSummary { - s.InstanceHealthReason = &v - return s -} + // The algorithm that was used to sign the certificate. + SignatureAlgorithm *string `locationName:"signatureAlgorithm" type:"string"` -// SetInstanceName sets the InstanceName field's value. -func (s *InstanceHealthSummary) SetInstanceName(v string) *InstanceHealthSummary { - s.InstanceName = &v - return s -} + // The status of the SSL/TLS certificate. Valid values are below. + Status *string `locationName:"status" type:"string" enum:"LoadBalancerTlsCertificateStatus"` -// Describes monthly data transfer rates and port information for an instance. -type InstanceNetworking struct { - _ struct{} `type:"structure"` + // The name of the entity that is associated with the public key contained in + // the certificate. + Subject *string `locationName:"subject" type:"string"` - // The amount of data in GB allocated for monthly data transfers. - MonthlyTransfer *MonthlyTransfer `locationName:"monthlyTransfer" type:"structure"` + // One or more domains or subdomains included in the certificate. This list + // contains the domain names that are bound to the public key that is contained + // in the certificate. The subject alternative names include the canonical domain + // name (CNAME) of the certificate and additional domain names that can be used + // to connect to the website, such as example.com, www.example.com, or m.example.com. + SubjectAlternativeNames []*string `locationName:"subjectAlternativeNames" type:"list"` - // An array of key-value pairs containing information about the ports on the - // instance. - Ports []*InstancePortInfo `locationName:"ports" type:"list"` + // The support code. Include this code in your email to support when you have + // questions about your Lightsail load balancer or SSL/TLS certificate. This + // code enables our support team to look up your Lightsail information more + // easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s InstanceNetworking) String() string { +func (s LoadBalancerTlsCertificate) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceNetworking) GoString() string { +func (s LoadBalancerTlsCertificate) GoString() string { return s.String() } -// SetMonthlyTransfer sets the MonthlyTransfer field's value. -func (s *InstanceNetworking) SetMonthlyTransfer(v *MonthlyTransfer) *InstanceNetworking { - s.MonthlyTransfer = v +// SetArn sets the Arn field's value. +func (s *LoadBalancerTlsCertificate) SetArn(v string) *LoadBalancerTlsCertificate { + s.Arn = &v return s } -// SetPorts sets the Ports field's value. -func (s *InstanceNetworking) SetPorts(v []*InstancePortInfo) *InstanceNetworking { - s.Ports = v +// SetCreatedAt sets the CreatedAt field's value. +func (s *LoadBalancerTlsCertificate) SetCreatedAt(v time.Time) *LoadBalancerTlsCertificate { + s.CreatedAt = &v return s } -// Describes information about the instance ports. -type InstancePortInfo struct { - _ struct{} `type:"structure"` - - // The access direction (inbound or outbound). - AccessDirection *string `locationName:"accessDirection" type:"string" enum:"AccessDirection"` - - // The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)). - AccessFrom *string `locationName:"accessFrom" type:"string"` - - // The type of access (Public or Private). - AccessType *string `locationName:"accessType" type:"string" enum:"PortAccessType"` - - // The common name. - CommonName *string `locationName:"commonName" type:"string"` +// SetDomainName sets the DomainName field's value. +func (s *LoadBalancerTlsCertificate) SetDomainName(v string) *LoadBalancerTlsCertificate { + s.DomainName = &v + return s +} - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` +// SetDomainValidationRecords sets the DomainValidationRecords field's value. +func (s *LoadBalancerTlsCertificate) SetDomainValidationRecords(v []*LoadBalancerTlsCertificateDomainValidationRecord) *LoadBalancerTlsCertificate { + s.DomainValidationRecords = v + return s +} - // The protocol being used. Can be one of the following. - // - // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, - // and error-checked delivery of streamed data between applications running - // on hosts communicating by an IP network. If you have an application that - // doesn't require reliable data stream service, use UDP instead. - // - // * all - All transport layer protocol types. For more general information, - // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on - // Wikipedia. - // - // * udp - With User Datagram Protocol (UDP), computer applications can send - // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. - // Prior communications are not required to set up transmission channels - // or data paths. Applications that don't require reliable data stream service - // can use UDP, which provides a connectionless datagram service that emphasizes - // reduced latency over reliability. If you do require reliable data stream - // service, use TCP instead. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` +// SetFailureReason sets the FailureReason field's value. +func (s *LoadBalancerTlsCertificate) SetFailureReason(v string) *LoadBalancerTlsCertificate { + s.FailureReason = &v + return s +} - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` +// SetIsAttached sets the IsAttached field's value. +func (s *LoadBalancerTlsCertificate) SetIsAttached(v bool) *LoadBalancerTlsCertificate { + s.IsAttached = &v + return s } -// String returns the string representation -func (s InstancePortInfo) String() string { - return awsutil.Prettify(s) +// SetIssuedAt sets the IssuedAt field's value. +func (s *LoadBalancerTlsCertificate) SetIssuedAt(v time.Time) *LoadBalancerTlsCertificate { + s.IssuedAt = &v + return s } -// GoString returns the string representation -func (s InstancePortInfo) GoString() string { - return s.String() +// SetIssuer sets the Issuer field's value. +func (s *LoadBalancerTlsCertificate) SetIssuer(v string) *LoadBalancerTlsCertificate { + s.Issuer = &v + return s } -// SetAccessDirection sets the AccessDirection field's value. -func (s *InstancePortInfo) SetAccessDirection(v string) *InstancePortInfo { - s.AccessDirection = &v +// SetKeyAlgorithm sets the KeyAlgorithm field's value. +func (s *LoadBalancerTlsCertificate) SetKeyAlgorithm(v string) *LoadBalancerTlsCertificate { + s.KeyAlgorithm = &v return s } -// SetAccessFrom sets the AccessFrom field's value. -func (s *InstancePortInfo) SetAccessFrom(v string) *InstancePortInfo { - s.AccessFrom = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *LoadBalancerTlsCertificate) SetLoadBalancerName(v string) *LoadBalancerTlsCertificate { + s.LoadBalancerName = &v return s } -// SetAccessType sets the AccessType field's value. -func (s *InstancePortInfo) SetAccessType(v string) *InstancePortInfo { - s.AccessType = &v +// SetLocation sets the Location field's value. +func (s *LoadBalancerTlsCertificate) SetLocation(v *ResourceLocation) *LoadBalancerTlsCertificate { + s.Location = v return s } -// SetCommonName sets the CommonName field's value. -func (s *InstancePortInfo) SetCommonName(v string) *InstancePortInfo { - s.CommonName = &v +// SetName sets the Name field's value. +func (s *LoadBalancerTlsCertificate) SetName(v string) *LoadBalancerTlsCertificate { + s.Name = &v return s } -// SetFromPort sets the FromPort field's value. -func (s *InstancePortInfo) SetFromPort(v int64) *InstancePortInfo { - s.FromPort = &v +// SetNotAfter sets the NotAfter field's value. +func (s *LoadBalancerTlsCertificate) SetNotAfter(v time.Time) *LoadBalancerTlsCertificate { + s.NotAfter = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *InstancePortInfo) SetProtocol(v string) *InstancePortInfo { - s.Protocol = &v +// SetNotBefore sets the NotBefore field's value. +func (s *LoadBalancerTlsCertificate) SetNotBefore(v time.Time) *LoadBalancerTlsCertificate { + s.NotBefore = &v return s } -// SetToPort sets the ToPort field's value. -func (s *InstancePortInfo) SetToPort(v int64) *InstancePortInfo { - s.ToPort = &v +// SetRenewalSummary sets the RenewalSummary field's value. +func (s *LoadBalancerTlsCertificate) SetRenewalSummary(v *LoadBalancerTlsCertificateRenewalSummary) *LoadBalancerTlsCertificate { + s.RenewalSummary = v return s } -// Describes the port state. -type InstancePortState struct { - _ struct{} `type:"structure"` - - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The protocol being used. Can be one of the following. - // - // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, - // and error-checked delivery of streamed data between applications running - // on hosts communicating by an IP network. If you have an application that - // doesn't require reliable data stream service, use UDP instead. - // - // * all - All transport layer protocol types. For more general information, - // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on - // Wikipedia. - // - // * udp - With User Datagram Protocol (UDP), computer applications can send - // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. - // Prior communications are not required to set up transmission channels - // or data paths. Applications that don't require reliable data stream service - // can use UDP, which provides a connectionless datagram service that emphasizes - // reduced latency over reliability. If you do require reliable data stream - // service, use TCP instead. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` +// SetResourceType sets the ResourceType field's value. +func (s *LoadBalancerTlsCertificate) SetResourceType(v string) *LoadBalancerTlsCertificate { + s.ResourceType = &v + return s +} - // Specifies whether the instance port is open or closed. - State *string `locationName:"state" type:"string" enum:"PortState"` +// SetRevocationReason sets the RevocationReason field's value. +func (s *LoadBalancerTlsCertificate) SetRevocationReason(v string) *LoadBalancerTlsCertificate { + s.RevocationReason = &v + return s +} - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` +// SetRevokedAt sets the RevokedAt field's value. +func (s *LoadBalancerTlsCertificate) SetRevokedAt(v time.Time) *LoadBalancerTlsCertificate { + s.RevokedAt = &v + return s } -// String returns the string representation -func (s InstancePortState) String() string { - return awsutil.Prettify(s) +// SetSerial sets the Serial field's value. +func (s *LoadBalancerTlsCertificate) SetSerial(v string) *LoadBalancerTlsCertificate { + s.Serial = &v + return s } -// GoString returns the string representation -func (s InstancePortState) GoString() string { - return s.String() +// SetSignatureAlgorithm sets the SignatureAlgorithm field's value. +func (s *LoadBalancerTlsCertificate) SetSignatureAlgorithm(v string) *LoadBalancerTlsCertificate { + s.SignatureAlgorithm = &v + return s } -// SetFromPort sets the FromPort field's value. -func (s *InstancePortState) SetFromPort(v int64) *InstancePortState { - s.FromPort = &v +// SetStatus sets the Status field's value. +func (s *LoadBalancerTlsCertificate) SetStatus(v string) *LoadBalancerTlsCertificate { + s.Status = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *InstancePortState) SetProtocol(v string) *InstancePortState { - s.Protocol = &v +// SetSubject sets the Subject field's value. +func (s *LoadBalancerTlsCertificate) SetSubject(v string) *LoadBalancerTlsCertificate { + s.Subject = &v return s } -// SetState sets the State field's value. -func (s *InstancePortState) SetState(v string) *InstancePortState { - s.State = &v +// SetSubjectAlternativeNames sets the SubjectAlternativeNames field's value. +func (s *LoadBalancerTlsCertificate) SetSubjectAlternativeNames(v []*string) *LoadBalancerTlsCertificate { + s.SubjectAlternativeNames = v return s } -// SetToPort sets the ToPort field's value. -func (s *InstancePortState) SetToPort(v int64) *InstancePortState { - s.ToPort = &v +// SetSupportCode sets the SupportCode field's value. +func (s *LoadBalancerTlsCertificate) SetSupportCode(v string) *LoadBalancerTlsCertificate { + s.SupportCode = &v return s } -// Describes the snapshot of the virtual private server, or instance. -type InstanceSnapshot struct { +// Contains information about the domain names on an SSL/TLS certificate that +// you will use to validate domain ownership. +type LoadBalancerTlsCertificateDomainValidationOption struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` + // The fully qualified domain name in the certificate request. + DomainName *string `locationName:"domainName" type:"string"` - // The timestamp when the snapshot was created (e.g., 1479907467.024). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + // The status of the domain validation. Valid values are listed below. + ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` +} - // An array of disk objects containing information about all block storage disks. - FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` +// String returns the string representation +func (s LoadBalancerTlsCertificateDomainValidationOption) String() string { + return awsutil.Prettify(s) +} - // The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). - // A blueprint is a virtual private server (or instance) image used to create - // instances quickly. - FromBlueprintId *string `locationName:"fromBlueprintId" type:"string"` +// GoString returns the string representation +func (s LoadBalancerTlsCertificateDomainValidationOption) GoString() string { + return s.String() +} - // The bundle ID from which you created the snapshot (e.g., micro_1_0). - FromBundleId *string `locationName:"fromBundleId" type:"string"` +// SetDomainName sets the DomainName field's value. +func (s *LoadBalancerTlsCertificateDomainValidationOption) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationOption { + s.DomainName = &v + return s +} - // The Amazon Resource Name (ARN) of the instance from which the snapshot was - // created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). - FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` +// SetValidationStatus sets the ValidationStatus field's value. +func (s *LoadBalancerTlsCertificateDomainValidationOption) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationOption { + s.ValidationStatus = &v + return s +} - // The instance from which the snapshot was created. - FromInstanceName *string `locationName:"fromInstanceName" type:"string"` +// Describes the validation record of each domain name in the SSL/TLS certificate. +type LoadBalancerTlsCertificateDomainValidationRecord struct { + _ struct{} `type:"structure"` - // The region name and availability zone where you created the snapshot. - Location *ResourceLocation `locationName:"location" type:"structure"` + // The domain name against which your SSL/TLS certificate was validated. + DomainName *string `locationName:"domainName" type:"string"` - // The name of the snapshot. + // A fully qualified domain name in the certificate. For example, example.com. Name *string `locationName:"name" type:"string"` - // The progress of the snapshot. - Progress *string `locationName:"progress" type:"string"` - - // The type of resource (usually InstanceSnapshot). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The size in GB of the SSD. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + // The type of validation record. For example, CNAME for domain validation. + Type *string `locationName:"type" type:"string"` - // The state the snapshot is in. - State *string `locationName:"state" type:"string" enum:"InstanceSnapshotState"` + // The validation status. Valid values are listed below. + ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The value for that type. + Value *string `locationName:"value" type:"string"` } // String returns the string representation -func (s InstanceSnapshot) String() string { +func (s LoadBalancerTlsCertificateDomainValidationRecord) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceSnapshot) GoString() string { +func (s LoadBalancerTlsCertificateDomainValidationRecord) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *InstanceSnapshot) SetArn(v string) *InstanceSnapshot { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *InstanceSnapshot) SetCreatedAt(v time.Time) *InstanceSnapshot { - s.CreatedAt = &v - return s -} - -// SetFromAttachedDisks sets the FromAttachedDisks field's value. -func (s *InstanceSnapshot) SetFromAttachedDisks(v []*Disk) *InstanceSnapshot { - s.FromAttachedDisks = v +// SetDomainName sets the DomainName field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.DomainName = &v return s } -// SetFromBlueprintId sets the FromBlueprintId field's value. -func (s *InstanceSnapshot) SetFromBlueprintId(v string) *InstanceSnapshot { - s.FromBlueprintId = &v +// SetName sets the Name field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.Name = &v return s } -// SetFromBundleId sets the FromBundleId field's value. -func (s *InstanceSnapshot) SetFromBundleId(v string) *InstanceSnapshot { - s.FromBundleId = &v +// SetType sets the Type field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetType(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.Type = &v return s } -// SetFromInstanceArn sets the FromInstanceArn field's value. -func (s *InstanceSnapshot) SetFromInstanceArn(v string) *InstanceSnapshot { - s.FromInstanceArn = &v +// SetValidationStatus sets the ValidationStatus field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.ValidationStatus = &v return s } -// SetFromInstanceName sets the FromInstanceName field's value. -func (s *InstanceSnapshot) SetFromInstanceName(v string) *InstanceSnapshot { - s.FromInstanceName = &v +// SetValue sets the Value field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValue(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.Value = &v return s } -// SetLocation sets the Location field's value. -func (s *InstanceSnapshot) SetLocation(v *ResourceLocation) *InstanceSnapshot { - s.Location = v - return s -} +// Contains information about the status of Lightsail's managed renewal for +// the certificate. +type LoadBalancerTlsCertificateRenewalSummary struct { + _ struct{} `type:"structure"` -// SetName sets the Name field's value. -func (s *InstanceSnapshot) SetName(v string) *InstanceSnapshot { - s.Name = &v - return s -} + // Contains information about the validation of each domain name in the certificate, + // as it pertains to Lightsail's managed renewal. This is different from the + // initial validation that occurs as a result of the RequestCertificate request. + DomainValidationOptions []*LoadBalancerTlsCertificateDomainValidationOption `locationName:"domainValidationOptions" type:"list"` -// SetProgress sets the Progress field's value. -func (s *InstanceSnapshot) SetProgress(v string) *InstanceSnapshot { - s.Progress = &v - return s + // The status of Lightsail's managed renewal of the certificate. Valid values + // are listed below. + RenewalStatus *string `locationName:"renewalStatus" type:"string" enum:"LoadBalancerTlsCertificateRenewalStatus"` } -// SetResourceType sets the ResourceType field's value. -func (s *InstanceSnapshot) SetResourceType(v string) *InstanceSnapshot { - s.ResourceType = &v - return s +// String returns the string representation +func (s LoadBalancerTlsCertificateRenewalSummary) String() string { + return awsutil.Prettify(s) } -// SetSizeInGb sets the SizeInGb field's value. -func (s *InstanceSnapshot) SetSizeInGb(v int64) *InstanceSnapshot { - s.SizeInGb = &v - return s +// GoString returns the string representation +func (s LoadBalancerTlsCertificateRenewalSummary) GoString() string { + return s.String() } -// SetState sets the State field's value. -func (s *InstanceSnapshot) SetState(v string) *InstanceSnapshot { - s.State = &v +// SetDomainValidationOptions sets the DomainValidationOptions field's value. +func (s *LoadBalancerTlsCertificateRenewalSummary) SetDomainValidationOptions(v []*LoadBalancerTlsCertificateDomainValidationOption) *LoadBalancerTlsCertificateRenewalSummary { + s.DomainValidationOptions = v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *InstanceSnapshot) SetSupportCode(v string) *InstanceSnapshot { - s.SupportCode = &v +// SetRenewalStatus sets the RenewalStatus field's value. +func (s *LoadBalancerTlsCertificateRenewalSummary) SetRenewalStatus(v string) *LoadBalancerTlsCertificateRenewalSummary { + s.RenewalStatus = &v return s } -// Describes the virtual private server (or instance) status. -type InstanceState struct { +// Provides a summary of SSL/TLS certificate metadata. +type LoadBalancerTlsCertificateSummary struct { _ struct{} `type:"structure"` - // The status code for the instance. - Code *int64 `locationName:"code" type:"integer"` + // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. + IsAttached *bool `locationName:"isAttached" type:"boolean"` - // The state of the instance (e.g., running or pending). + // The name of the SSL/TLS certificate. Name *string `locationName:"name" type:"string"` } // String returns the string representation -func (s InstanceState) String() string { +func (s LoadBalancerTlsCertificateSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceState) GoString() string { +func (s LoadBalancerTlsCertificateSummary) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *InstanceState) SetCode(v int64) *InstanceState { - s.Code = &v +// SetIsAttached sets the IsAttached field's value. +func (s *LoadBalancerTlsCertificateSummary) SetIsAttached(v bool) *LoadBalancerTlsCertificateSummary { + s.IsAttached = &v return s } // SetName sets the Name field's value. -func (s *InstanceState) SetName(v string) *InstanceState { +func (s *LoadBalancerTlsCertificateSummary) SetName(v string) *LoadBalancerTlsCertificateSummary { s.Name = &v return s } -type IsVpcPeeredInput struct { +// Describes a database log event. +type LogEvent struct { _ struct{} `type:"structure"` + + // The timestamp when the database log event was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The message of the database log event. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s IsVpcPeeredInput) String() string { +func (s LogEvent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IsVpcPeeredInput) GoString() string { +func (s LogEvent) GoString() string { return s.String() } -type IsVpcPeeredOutput struct { +// SetCreatedAt sets the CreatedAt field's value. +func (s *LogEvent) SetCreatedAt(v time.Time) *LogEvent { + s.CreatedAt = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *LogEvent) SetMessage(v string) *LogEvent { + s.Message = &v + return s +} + +// Describes the metric data point. +type MetricDatapoint struct { _ struct{} `type:"structure"` - // Returns true if the Lightsail VPC is peered; otherwise, false. - IsPeered *bool `locationName:"isPeered" type:"boolean"` + // The average. + Average *float64 `locationName:"average" type:"double"` + + // The maximum. + Maximum *float64 `locationName:"maximum" type:"double"` + + // The minimum. + Minimum *float64 `locationName:"minimum" type:"double"` + + // The sample count. + SampleCount *float64 `locationName:"sampleCount" type:"double"` + + // The sum. + Sum *float64 `locationName:"sum" type:"double"` + + // The timestamp (e.g., 1479816991.349). + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` + + // The unit. + Unit *string `locationName:"unit" type:"string" enum:"MetricUnit"` } // String returns the string representation -func (s IsVpcPeeredOutput) String() string { +func (s MetricDatapoint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IsVpcPeeredOutput) GoString() string { +func (s MetricDatapoint) GoString() string { return s.String() } -// SetIsPeered sets the IsPeered field's value. -func (s *IsVpcPeeredOutput) SetIsPeered(v bool) *IsVpcPeeredOutput { - s.IsPeered = &v +// SetAverage sets the Average field's value. +func (s *MetricDatapoint) SetAverage(v float64) *MetricDatapoint { + s.Average = &v return s } -// Describes the SSH key pair. -type KeyPair struct { - _ struct{} `type:"structure"` +// SetMaximum sets the Maximum field's value. +func (s *MetricDatapoint) SetMaximum(v float64) *MetricDatapoint { + s.Maximum = &v + return s +} - // The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` +// SetMinimum sets the Minimum field's value. +func (s *MetricDatapoint) SetMinimum(v float64) *MetricDatapoint { + s.Minimum = &v + return s +} - // The timestamp when the key pair was created (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` +// SetSampleCount sets the SampleCount field's value. +func (s *MetricDatapoint) SetSampleCount(v float64) *MetricDatapoint { + s.SampleCount = &v + return s +} - // The RSA fingerprint of the key pair. - Fingerprint *string `locationName:"fingerprint" type:"string"` +// SetSum sets the Sum field's value. +func (s *MetricDatapoint) SetSum(v float64) *MetricDatapoint { + s.Sum = &v + return s +} - // The region name and Availability Zone where the key pair was created. - Location *ResourceLocation `locationName:"location" type:"structure"` +// SetTimestamp sets the Timestamp field's value. +func (s *MetricDatapoint) SetTimestamp(v time.Time) *MetricDatapoint { + s.Timestamp = &v + return s +} - // The friendly name of the SSH key pair. - Name *string `locationName:"name" type:"string"` +// SetUnit sets the Unit field's value. +func (s *MetricDatapoint) SetUnit(v string) *MetricDatapoint { + s.Unit = &v + return s +} - // The resource type (usually KeyPair). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +// Describes the monthly data transfer in and out of your virtual private server +// (or instance). +type MonthlyTransfer struct { + _ struct{} `type:"structure"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The amount allocated per month (in GB). + GbPerMonthAllocated *int64 `locationName:"gbPerMonthAllocated" type:"integer"` } // String returns the string representation -func (s KeyPair) String() string { +func (s MonthlyTransfer) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s KeyPair) GoString() string { +func (s MonthlyTransfer) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *KeyPair) SetArn(v string) *KeyPair { - s.Arn = &v +// SetGbPerMonthAllocated sets the GbPerMonthAllocated field's value. +func (s *MonthlyTransfer) SetGbPerMonthAllocated(v int64) *MonthlyTransfer { + s.GbPerMonthAllocated = &v return s } -// SetCreatedAt sets the CreatedAt field's value. -func (s *KeyPair) SetCreatedAt(v time.Time) *KeyPair { - s.CreatedAt = &v - return s +type OpenInstancePublicPortsInput struct { + _ struct{} `type:"structure"` + + // The name of the instance for which you want to open the public ports. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // An array of key-value pairs containing information about the port mappings. + // + // PortInfo is a required field + PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` } -// SetFingerprint sets the Fingerprint field's value. -func (s *KeyPair) SetFingerprint(v string) *KeyPair { - s.Fingerprint = &v - return s +// String returns the string representation +func (s OpenInstancePublicPortsInput) String() string { + return awsutil.Prettify(s) } -// SetLocation sets the Location field's value. -func (s *KeyPair) SetLocation(v *ResourceLocation) *KeyPair { - s.Location = v - return s +// GoString returns the string representation +func (s OpenInstancePublicPortsInput) GoString() string { + return s.String() } -// SetName sets the Name field's value. -func (s *KeyPair) SetName(v string) *KeyPair { - s.Name = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *OpenInstancePublicPortsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OpenInstancePublicPortsInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.PortInfo == nil { + invalidParams.Add(request.NewErrParamRequired("PortInfo")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetResourceType sets the ResourceType field's value. -func (s *KeyPair) SetResourceType(v string) *KeyPair { - s.ResourceType = &v +// SetInstanceName sets the InstanceName field's value. +func (s *OpenInstancePublicPortsInput) SetInstanceName(v string) *OpenInstancePublicPortsInput { + s.InstanceName = &v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *KeyPair) SetSupportCode(v string) *KeyPair { - s.SupportCode = &v +// SetPortInfo sets the PortInfo field's value. +func (s *OpenInstancePublicPortsInput) SetPortInfo(v *PortInfo) *OpenInstancePublicPortsInput { + s.PortInfo = v return s } -// Describes the Lightsail load balancer. -type LoadBalancer struct { +type OpenInstancePublicPortsOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the load balancer. - Arn *string `locationName:"arn" type:"string"` + // An array of key-value pairs containing information about the request operation. + Operation *Operation `locationName:"operation" type:"structure"` +} - // A string to string map of the configuration options for your load balancer. - // Valid values are listed below. - ConfigurationOptions map[string]*string `locationName:"configurationOptions" type:"map"` +// String returns the string representation +func (s OpenInstancePublicPortsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OpenInstancePublicPortsOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *OpenInstancePublicPortsOutput) SetOperation(v *Operation) *OpenInstancePublicPortsOutput { + s.Operation = v + return s +} + +// Describes the API operation. +type Operation struct { + _ struct{} `type:"structure"` - // The date when your load balancer was created. + // The timestamp when the operation was initialized (e.g., 1479816991.349). CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The DNS name of your Lightsail load balancer. - DnsName *string `locationName:"dnsName" type:"string"` + // The error code. + ErrorCode *string `locationName:"errorCode" type:"string"` - // The path you specified to perform your health checks. If no path is specified, - // the load balancer tries to make a request to the default (root) page. - HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` + // The error details. + ErrorDetails *string `locationName:"errorDetails" type:"string"` - // An array of InstanceHealthSummary objects describing the health of the load - // balancer. - InstanceHealthSummary []*InstanceHealthSummary `locationName:"instanceHealthSummary" type:"list"` + // The ID of the operation. + Id *string `locationName:"id" type:"string"` - // The port where the load balancer will direct traffic to your Lightsail instances. - // For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443. - InstancePort *int64 `locationName:"instancePort" type:"integer"` + // A Boolean value indicating whether the operation is terminal. + IsTerminal *bool `locationName:"isTerminal" type:"boolean"` - // The AWS Region where your load balancer was created (e.g., us-east-2a). Lightsail - // automatically creates your load balancer across Availability Zones. + // The region and Availability Zone. Location *ResourceLocation `locationName:"location" type:"structure"` - // The name of the load balancer (e.g., my-load-balancer). - Name *string `locationName:"name" type:"string"` + // Details about the operation (e.g., Debian-1GB-Ohio-1). + OperationDetails *string `locationName:"operationDetails" type:"string"` - // The protocol you have enabled for your load balancer. Valid values are below. - // - // You can't just have HTTP_HTTPS, but you can have just HTTP. - Protocol *string `locationName:"protocol" type:"string" enum:"LoadBalancerProtocol"` + // The type of operation. + OperationType *string `locationName:"operationType" type:"string" enum:"OperationType"` - // An array of public port settings for your load balancer. For HTTP, use port - // 80. For HTTPS, use port 443. - PublicPorts []*int64 `locationName:"publicPorts" type:"list"` + // The resource name. + ResourceName *string `locationName:"resourceName" type:"string"` - // The resource type (e.g., LoadBalancer. + // The resource type. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The status of your load balancer. Valid values are below. - State *string `locationName:"state" type:"string" enum:"LoadBalancerState"` - - // The support code. Include this code in your email to support when you have - // questions about your Lightsail load balancer. This code enables our support - // team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The status of the operation. + Status *string `locationName:"status" type:"string" enum:"OperationStatus"` - // An array of LoadBalancerTlsCertificateSummary objects that provide additional - // information about the SSL/TLS certificates. For example, if true, the certificate - // is attached to the load balancer. - TlsCertificateSummaries []*LoadBalancerTlsCertificateSummary `locationName:"tlsCertificateSummaries" type:"list"` + // The timestamp when the status was changed (e.g., 1479816991.349). + StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp"` } // String returns the string representation -func (s LoadBalancer) String() string { +func (s Operation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancer) GoString() string { +func (s Operation) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LoadBalancer) SetArn(v string) *LoadBalancer { - s.Arn = &v - return s -} - -// SetConfigurationOptions sets the ConfigurationOptions field's value. -func (s *LoadBalancer) SetConfigurationOptions(v map[string]*string) *LoadBalancer { - s.ConfigurationOptions = v - return s -} - // SetCreatedAt sets the CreatedAt field's value. -func (s *LoadBalancer) SetCreatedAt(v time.Time) *LoadBalancer { +func (s *Operation) SetCreatedAt(v time.Time) *Operation { s.CreatedAt = &v return s } -// SetDnsName sets the DnsName field's value. -func (s *LoadBalancer) SetDnsName(v string) *LoadBalancer { - s.DnsName = &v +// SetErrorCode sets the ErrorCode field's value. +func (s *Operation) SetErrorCode(v string) *Operation { + s.ErrorCode = &v return s } -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *LoadBalancer) SetHealthCheckPath(v string) *LoadBalancer { - s.HealthCheckPath = &v +// SetErrorDetails sets the ErrorDetails field's value. +func (s *Operation) SetErrorDetails(v string) *Operation { + s.ErrorDetails = &v return s } -// SetInstanceHealthSummary sets the InstanceHealthSummary field's value. -func (s *LoadBalancer) SetInstanceHealthSummary(v []*InstanceHealthSummary) *LoadBalancer { - s.InstanceHealthSummary = v +// SetId sets the Id field's value. +func (s *Operation) SetId(v string) *Operation { + s.Id = &v return s } -// SetInstancePort sets the InstancePort field's value. -func (s *LoadBalancer) SetInstancePort(v int64) *LoadBalancer { - s.InstancePort = &v +// SetIsTerminal sets the IsTerminal field's value. +func (s *Operation) SetIsTerminal(v bool) *Operation { + s.IsTerminal = &v return s } // SetLocation sets the Location field's value. -func (s *LoadBalancer) SetLocation(v *ResourceLocation) *LoadBalancer { +func (s *Operation) SetLocation(v *ResourceLocation) *Operation { s.Location = v return s } -// SetName sets the Name field's value. -func (s *LoadBalancer) SetName(v string) *LoadBalancer { - s.Name = &v +// SetOperationDetails sets the OperationDetails field's value. +func (s *Operation) SetOperationDetails(v string) *Operation { + s.OperationDetails = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *LoadBalancer) SetProtocol(v string) *LoadBalancer { - s.Protocol = &v +// SetOperationType sets the OperationType field's value. +func (s *Operation) SetOperationType(v string) *Operation { + s.OperationType = &v return s } -// SetPublicPorts sets the PublicPorts field's value. -func (s *LoadBalancer) SetPublicPorts(v []*int64) *LoadBalancer { - s.PublicPorts = v +// SetResourceName sets the ResourceName field's value. +func (s *Operation) SetResourceName(v string) *Operation { + s.ResourceName = &v return s } // SetResourceType sets the ResourceType field's value. -func (s *LoadBalancer) SetResourceType(v string) *LoadBalancer { +func (s *Operation) SetResourceType(v string) *Operation { s.ResourceType = &v return s } -// SetState sets the State field's value. -func (s *LoadBalancer) SetState(v string) *LoadBalancer { - s.State = &v - return s -} - -// SetSupportCode sets the SupportCode field's value. -func (s *LoadBalancer) SetSupportCode(v string) *LoadBalancer { - s.SupportCode = &v +// SetStatus sets the Status field's value. +func (s *Operation) SetStatus(v string) *Operation { + s.Status = &v return s } -// SetTlsCertificateSummaries sets the TlsCertificateSummaries field's value. -func (s *LoadBalancer) SetTlsCertificateSummaries(v []*LoadBalancerTlsCertificateSummary) *LoadBalancer { - s.TlsCertificateSummaries = v +// SetStatusChangedAt sets the StatusChangedAt field's value. +func (s *Operation) SetStatusChangedAt(v time.Time) *Operation { + s.StatusChangedAt = &v return s } -// Describes a load balancer SSL/TLS certificate. -// -// TLS is just an updated, more secure version of Secure Socket Layer (SSL). -type LoadBalancerTlsCertificate struct { +// The password data for the Windows Server-based instance, including the ciphertext +// and the key pair name. +type PasswordData struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the SSL/TLS certificate. - Arn *string `locationName:"arn" type:"string"` - - // The time when you created your SSL/TLS certificate. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The domain name for your SSL/TLS certificate. - DomainName *string `locationName:"domainName" type:"string"` - - // An array of LoadBalancerTlsCertificateDomainValidationRecord objects describing - // the records. - DomainValidationRecords []*LoadBalancerTlsCertificateDomainValidationRecord `locationName:"domainValidationRecords" type:"list"` - - // The reason for the SSL/TLS certificate validation failure. - FailureReason *string `locationName:"failureReason" type:"string" enum:"LoadBalancerTlsCertificateFailureReason"` - - // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // The time when the SSL/TLS certificate was issued. - IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp"` - - // The issuer of the certificate. - Issuer *string `locationName:"issuer" type:"string"` - - // The algorithm that was used to generate the key pair (the public and private - // key). - KeyAlgorithm *string `locationName:"keyAlgorithm" type:"string"` - - // The load balancer name where your SSL/TLS certificate is attached. - LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` - - // The AWS Region and Availability Zone where you created your certificate. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the SSL/TLS certificate (e.g., my-certificate). - Name *string `locationName:"name" type:"string"` - - // The timestamp when the SSL/TLS certificate expires. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` - - // The timestamp when the SSL/TLS certificate is first valid. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` - - // An object containing information about the status of Lightsail's managed - // renewal for the certificate. - RenewalSummary *LoadBalancerTlsCertificateRenewalSummary `locationName:"renewalSummary" type:"structure"` - - // The resource type (e.g., LoadBalancerTlsCertificate). - // - // * Instance - A Lightsail instance (a virtual private server) - // - // * StaticIp - A static IP address - // - // * KeyPair - The key pair used to connect to a Lightsail instance - // - // * InstanceSnapshot - A Lightsail instance snapshot - // - // * Domain - A DNS zone - // - // * PeeredVpc - A peered VPC - // - // * LoadBalancer - A Lightsail load balancer + // The encrypted password. Ciphertext will be an empty string if access to your + // new instance is not ready yet. When you create an instance, it can take up + // to 15 minutes for the instance to be ready. // - // * LoadBalancerTlsCertificate - An SSL/TLS certificate associated with - // a Lightsail load balancer + // If you use the default key pair (LightsailDefaultKeyPair), the decrypted + // password will be available in the password field. // - // * Disk - A Lightsail block storage disk + // If you are using a custom key pair, you need to use your own means of decryption. // - // * DiskSnapshot - A block storage disk snapshot - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The reason the certificate was revoked. Valid values are below. - RevocationReason *string `locationName:"revocationReason" type:"string" enum:"LoadBalancerTlsCertificateRevocationReason"` - - // The timestamp when the SSL/TLS certificate was revoked. - RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp"` - - // The serial number of the certificate. - Serial *string `locationName:"serial" type:"string"` - - // The algorithm that was used to sign the certificate. - SignatureAlgorithm *string `locationName:"signatureAlgorithm" type:"string"` - - // The status of the SSL/TLS certificate. Valid values are below. - Status *string `locationName:"status" type:"string" enum:"LoadBalancerTlsCertificateStatus"` - - // The name of the entity that is associated with the public key contained in - // the certificate. - Subject *string `locationName:"subject" type:"string"` - - // One or more domains or subdomains included in the certificate. This list - // contains the domain names that are bound to the public key that is contained - // in the certificate. The subject alternative names include the canonical domain - // name (CNAME) of the certificate and additional domain names that can be used - // to connect to the website, such as example.com, www.example.com, or m.example.com. - SubjectAlternativeNames []*string `locationName:"subjectAlternativeNames" type:"list"` - - // The support code. Include this code in your email to support when you have - // questions about your Lightsail load balancer or SSL/TLS certificate. This - // code enables our support team to look up your Lightsail information more - // easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // If you change the Administrator password on the instance, Lightsail will + // continue to return the original ciphertext value. When accessing the instance + // using RDP, you need to manually enter the Administrator password after changing + // it from the default. + Ciphertext *string `locationName:"ciphertext" type:"string"` + + // The name of the key pair that you used when creating your instance. If no + // key pair name was specified when creating the instance, Lightsail uses the + // default key pair (LightsailDefaultKeyPair). + // + // If you are using a custom key pair, you need to use your own means of decrypting + // your password using the ciphertext. Lightsail creates the ciphertext by encrypting + // your password with the public key part of this key pair. + KeyPairName *string `locationName:"keyPairName" type:"string"` } // String returns the string representation -func (s LoadBalancerTlsCertificate) String() string { +func (s PasswordData) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancerTlsCertificate) GoString() string { +func (s PasswordData) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LoadBalancerTlsCertificate) SetArn(v string) *LoadBalancerTlsCertificate { - s.Arn = &v +// SetCiphertext sets the Ciphertext field's value. +func (s *PasswordData) SetCiphertext(v string) *PasswordData { + s.Ciphertext = &v return s } -// SetCreatedAt sets the CreatedAt field's value. -func (s *LoadBalancerTlsCertificate) SetCreatedAt(v time.Time) *LoadBalancerTlsCertificate { - s.CreatedAt = &v +// SetKeyPairName sets the KeyPairName field's value. +func (s *PasswordData) SetKeyPairName(v string) *PasswordData { + s.KeyPairName = &v return s } -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificate) SetDomainName(v string) *LoadBalancerTlsCertificate { - s.DomainName = &v - return s +type PeerVpcInput struct { + _ struct{} `type:"structure"` } -// SetDomainValidationRecords sets the DomainValidationRecords field's value. -func (s *LoadBalancerTlsCertificate) SetDomainValidationRecords(v []*LoadBalancerTlsCertificateDomainValidationRecord) *LoadBalancerTlsCertificate { - s.DomainValidationRecords = v - return s +// String returns the string representation +func (s PeerVpcInput) String() string { + return awsutil.Prettify(s) } -// SetFailureReason sets the FailureReason field's value. -func (s *LoadBalancerTlsCertificate) SetFailureReason(v string) *LoadBalancerTlsCertificate { - s.FailureReason = &v - return s +// GoString returns the string representation +func (s PeerVpcInput) GoString() string { + return s.String() } -// SetIsAttached sets the IsAttached field's value. -func (s *LoadBalancerTlsCertificate) SetIsAttached(v bool) *LoadBalancerTlsCertificate { - s.IsAttached = &v - return s -} +type PeerVpcOutput struct { + _ struct{} `type:"structure"` -// SetIssuedAt sets the IssuedAt field's value. -func (s *LoadBalancerTlsCertificate) SetIssuedAt(v time.Time) *LoadBalancerTlsCertificate { - s.IssuedAt = &v - return s + // An array of key-value pairs containing information about the request operation. + Operation *Operation `locationName:"operation" type:"structure"` } -// SetIssuer sets the Issuer field's value. -func (s *LoadBalancerTlsCertificate) SetIssuer(v string) *LoadBalancerTlsCertificate { - s.Issuer = &v - return s +// String returns the string representation +func (s PeerVpcOutput) String() string { + return awsutil.Prettify(s) } -// SetKeyAlgorithm sets the KeyAlgorithm field's value. -func (s *LoadBalancerTlsCertificate) SetKeyAlgorithm(v string) *LoadBalancerTlsCertificate { - s.KeyAlgorithm = &v - return s +// GoString returns the string representation +func (s PeerVpcOutput) GoString() string { + return s.String() } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancerTlsCertificate) SetLoadBalancerName(v string) *LoadBalancerTlsCertificate { - s.LoadBalancerName = &v +// SetOperation sets the Operation field's value. +func (s *PeerVpcOutput) SetOperation(v *Operation) *PeerVpcOutput { + s.Operation = v return s } -// SetLocation sets the Location field's value. -func (s *LoadBalancerTlsCertificate) SetLocation(v *ResourceLocation) *LoadBalancerTlsCertificate { - s.Location = v - return s -} +// Describes a pending database maintenance action. +type PendingMaintenanceAction struct { + _ struct{} `type:"structure"` -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificate) SetName(v string) *LoadBalancerTlsCertificate { - s.Name = &v - return s -} + // The type of pending database maintenance action. + Action *string `locationName:"action" type:"string"` -// SetNotAfter sets the NotAfter field's value. -func (s *LoadBalancerTlsCertificate) SetNotAfter(v time.Time) *LoadBalancerTlsCertificate { - s.NotAfter = &v - return s + // The effective date of the pending database maintenance action. + CurrentApplyDate *time.Time `locationName:"currentApplyDate" type:"timestamp"` + + // Additional detail about the pending database maintenance action. + Description *string `locationName:"description" type:"string"` } -// SetNotBefore sets the NotBefore field's value. -func (s *LoadBalancerTlsCertificate) SetNotBefore(v time.Time) *LoadBalancerTlsCertificate { - s.NotBefore = &v - return s +// String returns the string representation +func (s PendingMaintenanceAction) String() string { + return awsutil.Prettify(s) } -// SetRenewalSummary sets the RenewalSummary field's value. -func (s *LoadBalancerTlsCertificate) SetRenewalSummary(v *LoadBalancerTlsCertificateRenewalSummary) *LoadBalancerTlsCertificate { - s.RenewalSummary = v - return s +// GoString returns the string representation +func (s PendingMaintenanceAction) GoString() string { + return s.String() } -// SetResourceType sets the ResourceType field's value. -func (s *LoadBalancerTlsCertificate) SetResourceType(v string) *LoadBalancerTlsCertificate { - s.ResourceType = &v +// SetAction sets the Action field's value. +func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { + s.Action = &v return s } -// SetRevocationReason sets the RevocationReason field's value. -func (s *LoadBalancerTlsCertificate) SetRevocationReason(v string) *LoadBalancerTlsCertificate { - s.RevocationReason = &v +// SetCurrentApplyDate sets the CurrentApplyDate field's value. +func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { + s.CurrentApplyDate = &v return s } -// SetRevokedAt sets the RevokedAt field's value. -func (s *LoadBalancerTlsCertificate) SetRevokedAt(v time.Time) *LoadBalancerTlsCertificate { - s.RevokedAt = &v +// SetDescription sets the Description field's value. +func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { + s.Description = &v return s } -// SetSerial sets the Serial field's value. -func (s *LoadBalancerTlsCertificate) SetSerial(v string) *LoadBalancerTlsCertificate { - s.Serial = &v - return s +// Describes a pending database value modification. +type PendingModifiedRelationalDatabaseValues struct { + _ struct{} `type:"structure"` + + // A Boolean value indicating whether automated backup retention is enabled. + BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` + + // The database engine version. + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // The password for the master user of the database. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string"` } -// SetSignatureAlgorithm sets the SignatureAlgorithm field's value. -func (s *LoadBalancerTlsCertificate) SetSignatureAlgorithm(v string) *LoadBalancerTlsCertificate { - s.SignatureAlgorithm = &v - return s +// String returns the string representation +func (s PendingModifiedRelationalDatabaseValues) String() string { + return awsutil.Prettify(s) } -// SetStatus sets the Status field's value. -func (s *LoadBalancerTlsCertificate) SetStatus(v string) *LoadBalancerTlsCertificate { - s.Status = &v - return s +// GoString returns the string representation +func (s PendingModifiedRelationalDatabaseValues) GoString() string { + return s.String() } -// SetSubject sets the Subject field's value. -func (s *LoadBalancerTlsCertificate) SetSubject(v string) *LoadBalancerTlsCertificate { - s.Subject = &v +// SetBackupRetentionEnabled sets the BackupRetentionEnabled field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetBackupRetentionEnabled(v bool) *PendingModifiedRelationalDatabaseValues { + s.BackupRetentionEnabled = &v return s } -// SetSubjectAlternativeNames sets the SubjectAlternativeNames field's value. -func (s *LoadBalancerTlsCertificate) SetSubjectAlternativeNames(v []*string) *LoadBalancerTlsCertificate { - s.SubjectAlternativeNames = v +// SetEngineVersion sets the EngineVersion field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetEngineVersion(v string) *PendingModifiedRelationalDatabaseValues { + s.EngineVersion = &v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *LoadBalancerTlsCertificate) SetSupportCode(v string) *LoadBalancerTlsCertificate { - s.SupportCode = &v +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetMasterUserPassword(v string) *PendingModifiedRelationalDatabaseValues { + s.MasterUserPassword = &v return s } -// Contains information about the domain names on an SSL/TLS certificate that -// you will use to validate domain ownership. -type LoadBalancerTlsCertificateDomainValidationOption struct { +// Describes information about the ports on your virtual private server (or +// instance). +type PortInfo struct { _ struct{} `type:"structure"` - // The fully qualified domain name in the certificate request. - DomainName *string `locationName:"domainName" type:"string"` + // The first port in the range. + FromPort *int64 `locationName:"fromPort" type:"integer"` - // The status of the domain validation. Valid values are listed below. - ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` + // The protocol. + Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` + + // The last port in the range. + ToPort *int64 `locationName:"toPort" type:"integer"` } // String returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationOption) String() string { +func (s PortInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationOption) GoString() string { +func (s PortInfo) GoString() string { return s.String() } -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificateDomainValidationOption) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationOption { - s.DomainName = &v +// SetFromPort sets the FromPort field's value. +func (s *PortInfo) SetFromPort(v int64) *PortInfo { + s.FromPort = &v return s } -// SetValidationStatus sets the ValidationStatus field's value. -func (s *LoadBalancerTlsCertificateDomainValidationOption) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationOption { - s.ValidationStatus = &v +// SetProtocol sets the Protocol field's value. +func (s *PortInfo) SetProtocol(v string) *PortInfo { + s.Protocol = &v return s } -// Describes the validation record of each domain name in the SSL/TLS certificate. -type LoadBalancerTlsCertificateDomainValidationRecord struct { - _ struct{} `type:"structure"` - - // The domain name against which your SSL/TLS certificate was validated. - DomainName *string `locationName:"domainName" type:"string"` - - // A fully qualified domain name in the certificate. For example, example.com. - Name *string `locationName:"name" type:"string"` +// SetToPort sets the ToPort field's value. +func (s *PortInfo) SetToPort(v int64) *PortInfo { + s.ToPort = &v + return s +} - // The type of validation record. For example, CNAME for domain validation. - Type *string `locationName:"type" type:"string"` +type PutInstancePublicPortsInput struct { + _ struct{} `type:"structure"` - // The validation status. Valid values are listed below. - ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` + // The Lightsail instance name of the public port(s) you are setting. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - // The value for that type. - Value *string `locationName:"value" type:"string"` + // Specifies information about the public port(s). + // + // PortInfos is a required field + PortInfos []*PortInfo `locationName:"portInfos" type:"list" required:"true"` } // String returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationRecord) String() string { +func (s PutInstancePublicPortsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationRecord) GoString() string { +func (s PutInstancePublicPortsInput) GoString() string { return s.String() } -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.DomainName = &v - return s -} - -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Name = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutInstancePublicPortsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutInstancePublicPortsInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.PortInfos == nil { + invalidParams.Add(request.NewErrParamRequired("PortInfos")) + } -// SetType sets the Type field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetType(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Type = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetValidationStatus sets the ValidationStatus field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.ValidationStatus = &v +// SetInstanceName sets the InstanceName field's value. +func (s *PutInstancePublicPortsInput) SetInstanceName(v string) *PutInstancePublicPortsInput { + s.InstanceName = &v return s } -// SetValue sets the Value field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValue(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Value = &v +// SetPortInfos sets the PortInfos field's value. +func (s *PutInstancePublicPortsInput) SetPortInfos(v []*PortInfo) *PutInstancePublicPortsInput { + s.PortInfos = v return s } -// Contains information about the status of Lightsail's managed renewal for -// the certificate. -type LoadBalancerTlsCertificateRenewalSummary struct { +type PutInstancePublicPortsOutput struct { _ struct{} `type:"structure"` - // Contains information about the validation of each domain name in the certificate, - // as it pertains to Lightsail's managed renewal. This is different from the - // initial validation that occurs as a result of the RequestCertificate request. - DomainValidationOptions []*LoadBalancerTlsCertificateDomainValidationOption `locationName:"domainValidationOptions" type:"list"` - - // The status of Lightsail's managed renewal of the certificate. Valid values - // are listed below. - RenewalStatus *string `locationName:"renewalStatus" type:"string" enum:"LoadBalancerTlsCertificateRenewalStatus"` + // Describes metadata about the operation you just executed. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s LoadBalancerTlsCertificateRenewalSummary) String() string { +func (s PutInstancePublicPortsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancerTlsCertificateRenewalSummary) GoString() string { +func (s PutInstancePublicPortsOutput) GoString() string { return s.String() } -// SetDomainValidationOptions sets the DomainValidationOptions field's value. -func (s *LoadBalancerTlsCertificateRenewalSummary) SetDomainValidationOptions(v []*LoadBalancerTlsCertificateDomainValidationOption) *LoadBalancerTlsCertificateRenewalSummary { - s.DomainValidationOptions = v - return s -} - -// SetRenewalStatus sets the RenewalStatus field's value. -func (s *LoadBalancerTlsCertificateRenewalSummary) SetRenewalStatus(v string) *LoadBalancerTlsCertificateRenewalSummary { - s.RenewalStatus = &v +// SetOperation sets the Operation field's value. +func (s *PutInstancePublicPortsOutput) SetOperation(v *Operation) *PutInstancePublicPortsOutput { + s.Operation = v return s } -// Provides a summary of SSL/TLS certificate metadata. -type LoadBalancerTlsCertificateSummary struct { +type RebootInstanceInput struct { _ struct{} `type:"structure"` - // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // The name of the SSL/TLS certificate. - Name *string `locationName:"name" type:"string"` + // The name of the instance to reboot. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s LoadBalancerTlsCertificateSummary) String() string { +func (s RebootInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancerTlsCertificateSummary) GoString() string { +func (s RebootInstanceInput) GoString() string { return s.String() } -// SetIsAttached sets the IsAttached field's value. -func (s *LoadBalancerTlsCertificateSummary) SetIsAttached(v bool) *LoadBalancerTlsCertificateSummary { - s.IsAttached = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificateSummary) SetName(v string) *LoadBalancerTlsCertificateSummary { - s.Name = &v +// SetInstanceName sets the InstanceName field's value. +func (s *RebootInstanceInput) SetInstanceName(v string) *RebootInstanceInput { + s.InstanceName = &v return s } -// Describes the metric data point. -type MetricDatapoint struct { +type RebootInstanceOutput struct { _ struct{} `type:"structure"` - // The average. - Average *float64 `locationName:"average" type:"double"` - - // The maximum. - Maximum *float64 `locationName:"maximum" type:"double"` - - // The minimum. - Minimum *float64 `locationName:"minimum" type:"double"` - - // The sample count. - SampleCount *float64 `locationName:"sampleCount" type:"double"` - - // The sum. - Sum *float64 `locationName:"sum" type:"double"` - - // The timestamp (e.g., 1479816991.349). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` - - // The unit. - Unit *string `locationName:"unit" type:"string" enum:"MetricUnit"` + // An array of key-value pairs containing information about the request operations. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s MetricDatapoint) String() string { +func (s RebootInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s MetricDatapoint) GoString() string { +func (s RebootInstanceOutput) GoString() string { return s.String() } -// SetAverage sets the Average field's value. -func (s *MetricDatapoint) SetAverage(v float64) *MetricDatapoint { - s.Average = &v +// SetOperations sets the Operations field's value. +func (s *RebootInstanceOutput) SetOperations(v []*Operation) *RebootInstanceOutput { + s.Operations = v return s } -// SetMaximum sets the Maximum field's value. -func (s *MetricDatapoint) SetMaximum(v float64) *MetricDatapoint { - s.Maximum = &v - return s -} +type RebootRelationalDatabaseInput struct { + _ struct{} `type:"structure"` -// SetMinimum sets the Minimum field's value. -func (s *MetricDatapoint) SetMinimum(v float64) *MetricDatapoint { - s.Minimum = &v - return s + // The name of your database to reboot. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } -// SetSampleCount sets the SampleCount field's value. -func (s *MetricDatapoint) SetSampleCount(v float64) *MetricDatapoint { - s.SampleCount = &v - return s +// String returns the string representation +func (s RebootRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) } -// SetSum sets the Sum field's value. -func (s *MetricDatapoint) SetSum(v float64) *MetricDatapoint { - s.Sum = &v - return s +// GoString returns the string representation +func (s RebootRelationalDatabaseInput) GoString() string { + return s.String() } -// SetTimestamp sets the Timestamp field's value. -func (s *MetricDatapoint) SetTimestamp(v time.Time) *MetricDatapoint { - s.Timestamp = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetUnit sets the Unit field's value. -func (s *MetricDatapoint) SetUnit(v string) *MetricDatapoint { - s.Unit = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *RebootRelationalDatabaseInput) SetRelationalDatabaseName(v string) *RebootRelationalDatabaseInput { + s.RelationalDatabaseName = &v return s } -// Describes the monthly data transfer in and out of your virtual private server -// (or instance). -type MonthlyTransfer struct { +type RebootRelationalDatabaseOutput struct { _ struct{} `type:"structure"` - // The amount allocated per month (in GB). - GbPerMonthAllocated *int64 `locationName:"gbPerMonthAllocated" type:"integer"` + // An object describing the result of your reboot relational database request. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s MonthlyTransfer) String() string { +func (s RebootRelationalDatabaseOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s MonthlyTransfer) GoString() string { +func (s RebootRelationalDatabaseOutput) GoString() string { return s.String() } -// SetGbPerMonthAllocated sets the GbPerMonthAllocated field's value. -func (s *MonthlyTransfer) SetGbPerMonthAllocated(v int64) *MonthlyTransfer { - s.GbPerMonthAllocated = &v +// SetOperations sets the Operations field's value. +func (s *RebootRelationalDatabaseOutput) SetOperations(v []*Operation) *RebootRelationalDatabaseOutput { + s.Operations = v return s } -type OpenInstancePublicPortsInput struct { +// Describes the AWS Region. +type Region struct { _ struct{} `type:"structure"` - // The name of the instance for which you want to open the public ports. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // The Availability Zones. Follows the format us-east-2a (case-sensitive). + AvailabilityZones []*AvailabilityZone `locationName:"availabilityZones" type:"list"` - // An array of key-value pairs containing information about the port mappings. - // - // PortInfo is a required field - PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` + // The continent code (e.g., NA, meaning North America). + ContinentCode *string `locationName:"continentCode" type:"string"` + + // The description of the AWS Region (e.g., This region is recommended to serve + // users in the eastern United States and eastern Canada). + Description *string `locationName:"description" type:"string"` + + // The display name (e.g., Ohio). + DisplayName *string `locationName:"displayName" type:"string"` + + // The region name (e.g., us-east-2). + Name *string `locationName:"name" type:"string" enum:"RegionName"` + + // The Availability Zones for databases. Follows the format us-east-2a (case-sensitive). + RelationalDatabaseAvailabilityZones []*AvailabilityZone `locationName:"relationalDatabaseAvailabilityZones" type:"list"` } // String returns the string representation -func (s OpenInstancePublicPortsInput) String() string { +func (s Region) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OpenInstancePublicPortsInput) GoString() string { +func (s Region) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *OpenInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OpenInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfo == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfo")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *OpenInstancePublicPortsInput) SetInstanceName(v string) *OpenInstancePublicPortsInput { - s.InstanceName = &v +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *Region) SetAvailabilityZones(v []*AvailabilityZone) *Region { + s.AvailabilityZones = v return s } -// SetPortInfo sets the PortInfo field's value. -func (s *OpenInstancePublicPortsInput) SetPortInfo(v *PortInfo) *OpenInstancePublicPortsInput { - s.PortInfo = v +// SetContinentCode sets the ContinentCode field's value. +func (s *Region) SetContinentCode(v string) *Region { + s.ContinentCode = &v return s } -type OpenInstancePublicPortsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` +// SetDescription sets the Description field's value. +func (s *Region) SetDescription(v string) *Region { + s.Description = &v + return s } -// String returns the string representation -func (s OpenInstancePublicPortsOutput) String() string { - return awsutil.Prettify(s) +// SetDisplayName sets the DisplayName field's value. +func (s *Region) SetDisplayName(v string) *Region { + s.DisplayName = &v + return s } -// GoString returns the string representation -func (s OpenInstancePublicPortsOutput) GoString() string { - return s.String() +// SetName sets the Name field's value. +func (s *Region) SetName(v string) *Region { + s.Name = &v + return s } -// SetOperation sets the Operation field's value. -func (s *OpenInstancePublicPortsOutput) SetOperation(v *Operation) *OpenInstancePublicPortsOutput { - s.Operation = v +// SetRelationalDatabaseAvailabilityZones sets the RelationalDatabaseAvailabilityZones field's value. +func (s *Region) SetRelationalDatabaseAvailabilityZones(v []*AvailabilityZone) *Region { + s.RelationalDatabaseAvailabilityZones = v return s } -// Describes the API operation. -type Operation struct { +// Describes a database. +type RelationalDatabase struct { _ struct{} `type:"structure"` - // The timestamp when the operation was initialized (e.g., 1479816991.349). + // The Amazon Resource Name (ARN) of the database. + Arn *string `locationName:"arn" type:"string"` + + // A Boolean value indicating whether automated backup retention is enabled + // for the database. + BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` + + // The timestamp when the database was created. Formatted in Unix time. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The error code. - ErrorCode *string `locationName:"errorCode" type:"string"` + // The database software (for example, MySQL). + Engine *string `locationName:"engine" type:"string"` + + // The database engine version (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // Describes the hardware of the database. + Hardware *RelationalDatabaseHardware `locationName:"hardware" type:"structure"` + + // The latest point in time to which the database can be restored. Formatted + // in Unix time. + LatestRestorableTime *time.Time `locationName:"latestRestorableTime" type:"timestamp"` + + // The Region name and Availability Zone where the database is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the master database created when the Lightsail database resource + // is created. + MasterDatabaseName *string `locationName:"masterDatabaseName" type:"string"` + + // The master endpoint for the database. + MasterEndpoint *RelationalDatabaseEndpoint `locationName:"masterEndpoint" type:"structure"` + + // The master user name of the database. + MasterUsername *string `locationName:"masterUsername" type:"string"` + + // The unique name of the database resource in Lightsail. + Name *string `locationName:"name" type:"string"` + + // The status of parameter updates for the database. + ParameterApplyStatus *string `locationName:"parameterApplyStatus" type:"string"` - // The error details. - ErrorDetails *string `locationName:"errorDetails" type:"string"` + // Describes the pending maintenance actions for the database. + PendingMaintenanceActions []*PendingMaintenanceAction `locationName:"pendingMaintenanceActions" type:"list"` - // The ID of the operation. - Id *string `locationName:"id" type:"string"` + // Describes pending database value modifications. + PendingModifiedValues *PendingModifiedRelationalDatabaseValues `locationName:"pendingModifiedValues" type:"structure"` - // A Boolean value indicating whether the operation is terminal. - IsTerminal *bool `locationName:"isTerminal" type:"boolean"` + // The daily time range during which automated backups are created for the database + // (for example, 16:00-16:30). + PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` - // The region and Availability Zone. - Location *ResourceLocation `locationName:"location" type:"structure"` + // The weekly time range during which system maintenance can occur on the database. + // + // In the format ddd:hh24:mi-ddd:hh24:mi. For example, Tue:17:00-Tue:17:30. + PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` - // Details about the operation (e.g., Debian-1GB-Ohio-1). - OperationDetails *string `locationName:"operationDetails" type:"string"` + // A Boolean value indicating whether the database is publicly accessible. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` - // The type of operation. - OperationType *string `locationName:"operationType" type:"string" enum:"OperationType"` + // The blueprint ID for the database. A blueprint describes the major engine + // version of a database. + RelationalDatabaseBlueprintId *string `locationName:"relationalDatabaseBlueprintId" type:"string"` - // The resource name. - ResourceName *string `locationName:"resourceName" type:"string"` + // The bundle ID for the database. A bundle describes the performance specifications + // for your database. + RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string"` - // The resource type. + // The Lightsail resource type for the database (for example, RelationalDatabase). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The status of the operation. - Status *string `locationName:"status" type:"string" enum:"OperationStatus"` + // Describes the secondary Availability Zone of a high availability database. + // + // The secondary database is used for failover support of a high availability + // database. + SecondaryAvailabilityZone *string `locationName:"secondaryAvailabilityZone" type:"string"` - // The timestamp when the status was changed (e.g., 1479816991.349). - StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp"` + // Describes the current state of the database. + State *string `locationName:"state" type:"string"` + + // The support code for the database. Include this code in your email to support + // when you have questions about a database in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s Operation) String() string { +func (s RelationalDatabase) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Operation) GoString() string { +func (s RelationalDatabase) GoString() string { return s.String() } +// SetArn sets the Arn field's value. +func (s *RelationalDatabase) SetArn(v string) *RelationalDatabase { + s.Arn = &v + return s +} + +// SetBackupRetentionEnabled sets the BackupRetentionEnabled field's value. +func (s *RelationalDatabase) SetBackupRetentionEnabled(v bool) *RelationalDatabase { + s.BackupRetentionEnabled = &v + return s +} + // SetCreatedAt sets the CreatedAt field's value. -func (s *Operation) SetCreatedAt(v time.Time) *Operation { +func (s *RelationalDatabase) SetCreatedAt(v time.Time) *RelationalDatabase { s.CreatedAt = &v return s } -// SetErrorCode sets the ErrorCode field's value. -func (s *Operation) SetErrorCode(v string) *Operation { - s.ErrorCode = &v +// SetEngine sets the Engine field's value. +func (s *RelationalDatabase) SetEngine(v string) *RelationalDatabase { + s.Engine = &v return s } -// SetErrorDetails sets the ErrorDetails field's value. -func (s *Operation) SetErrorDetails(v string) *Operation { - s.ErrorDetails = &v +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabase) SetEngineVersion(v string) *RelationalDatabase { + s.EngineVersion = &v return s } -// SetId sets the Id field's value. -func (s *Operation) SetId(v string) *Operation { - s.Id = &v +// SetHardware sets the Hardware field's value. +func (s *RelationalDatabase) SetHardware(v *RelationalDatabaseHardware) *RelationalDatabase { + s.Hardware = v return s } -// SetIsTerminal sets the IsTerminal field's value. -func (s *Operation) SetIsTerminal(v bool) *Operation { - s.IsTerminal = &v +// SetLatestRestorableTime sets the LatestRestorableTime field's value. +func (s *RelationalDatabase) SetLatestRestorableTime(v time.Time) *RelationalDatabase { + s.LatestRestorableTime = &v return s } // SetLocation sets the Location field's value. -func (s *Operation) SetLocation(v *ResourceLocation) *Operation { +func (s *RelationalDatabase) SetLocation(v *ResourceLocation) *RelationalDatabase { s.Location = v return s } -// SetOperationDetails sets the OperationDetails field's value. -func (s *Operation) SetOperationDetails(v string) *Operation { - s.OperationDetails = &v +// SetMasterDatabaseName sets the MasterDatabaseName field's value. +func (s *RelationalDatabase) SetMasterDatabaseName(v string) *RelationalDatabase { + s.MasterDatabaseName = &v return s } -// SetOperationType sets the OperationType field's value. -func (s *Operation) SetOperationType(v string) *Operation { - s.OperationType = &v +// SetMasterEndpoint sets the MasterEndpoint field's value. +func (s *RelationalDatabase) SetMasterEndpoint(v *RelationalDatabaseEndpoint) *RelationalDatabase { + s.MasterEndpoint = v return s } -// SetResourceName sets the ResourceName field's value. -func (s *Operation) SetResourceName(v string) *Operation { - s.ResourceName = &v +// SetMasterUsername sets the MasterUsername field's value. +func (s *RelationalDatabase) SetMasterUsername(v string) *RelationalDatabase { + s.MasterUsername = &v + return s +} + +// SetName sets the Name field's value. +func (s *RelationalDatabase) SetName(v string) *RelationalDatabase { + s.Name = &v + return s +} + +// SetParameterApplyStatus sets the ParameterApplyStatus field's value. +func (s *RelationalDatabase) SetParameterApplyStatus(v string) *RelationalDatabase { + s.ParameterApplyStatus = &v + return s +} + +// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. +func (s *RelationalDatabase) SetPendingMaintenanceActions(v []*PendingMaintenanceAction) *RelationalDatabase { + s.PendingMaintenanceActions = v + return s +} + +// SetPendingModifiedValues sets the PendingModifiedValues field's value. +func (s *RelationalDatabase) SetPendingModifiedValues(v *PendingModifiedRelationalDatabaseValues) *RelationalDatabase { + s.PendingModifiedValues = v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *RelationalDatabase) SetPreferredBackupWindow(v string) *RelationalDatabase { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *RelationalDatabase) SetPreferredMaintenanceWindow(v string) *RelationalDatabase { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *RelationalDatabase) SetPubliclyAccessible(v bool) *RelationalDatabase { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseBlueprintId sets the RelationalDatabaseBlueprintId field's value. +func (s *RelationalDatabase) SetRelationalDatabaseBlueprintId(v string) *RelationalDatabase { + s.RelationalDatabaseBlueprintId = &v + return s +} + +// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. +func (s *RelationalDatabase) SetRelationalDatabaseBundleId(v string) *RelationalDatabase { + s.RelationalDatabaseBundleId = &v return s } // SetResourceType sets the ResourceType field's value. -func (s *Operation) SetResourceType(v string) *Operation { +func (s *RelationalDatabase) SetResourceType(v string) *RelationalDatabase { s.ResourceType = &v return s } -// SetStatus sets the Status field's value. -func (s *Operation) SetStatus(v string) *Operation { - s.Status = &v +// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. +func (s *RelationalDatabase) SetSecondaryAvailabilityZone(v string) *RelationalDatabase { + s.SecondaryAvailabilityZone = &v return s } -// SetStatusChangedAt sets the StatusChangedAt field's value. -func (s *Operation) SetStatusChangedAt(v time.Time) *Operation { - s.StatusChangedAt = &v +// SetState sets the State field's value. +func (s *RelationalDatabase) SetState(v string) *RelationalDatabase { + s.State = &v return s } -// The password data for the Windows Server-based instance, including the ciphertext -// and the key pair name. -type PasswordData struct { +// SetSupportCode sets the SupportCode field's value. +func (s *RelationalDatabase) SetSupportCode(v string) *RelationalDatabase { + s.SupportCode = &v + return s +} + +// Describes a database image, or blueprint. A blueprint describes the major +// engine version of a database. +type RelationalDatabaseBlueprint struct { _ struct{} `type:"structure"` - // The encrypted password. Ciphertext will be an empty string if access to your - // new instance is not ready yet. When you create an instance, it can take up - // to 15 minutes for the instance to be ready. - // - // If you use the default key pair (LightsailDefaultKeyPair), the decrypted - // password will be available in the password field. - // - // If you are using a custom key pair, you need to use your own means of decryption. - // - // If you change the Administrator password on the instance, Lightsail will - // continue to return the original ciphertext value. When accessing the instance - // using RDP, you need to manually enter the Administrator password after changing - // it from the default. - Ciphertext *string `locationName:"ciphertext" type:"string"` + // The ID for the database blueprint. + BlueprintId *string `locationName:"blueprintId" type:"string"` - // The name of the key pair that you used when creating your instance. If no - // key pair name was specified when creating the instance, Lightsail uses the - // default key pair (LightsailDefaultKeyPair). - // - // If you are using a custom key pair, you need to use your own means of decrypting - // your password using the ciphertext. Lightsail creates the ciphertext by encrypting - // your password with the public key part of this key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` + // The database software of the database blueprint (for example, MySQL). + Engine *string `locationName:"engine" type:"string" enum:"RelationalDatabaseEngine"` + + // The description of the database engine for the database blueprint. + EngineDescription *string `locationName:"engineDescription" type:"string"` + + // The database engine version for the database blueprint (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // The description of the database engine version for the database blueprint. + EngineVersionDescription *string `locationName:"engineVersionDescription" type:"string"` + + // A Boolean value indicating whether the engine version is the default for + // the database blueprint. + IsEngineDefault *bool `locationName:"isEngineDefault" type:"boolean"` } // String returns the string representation -func (s PasswordData) String() string { +func (s RelationalDatabaseBlueprint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PasswordData) GoString() string { +func (s RelationalDatabaseBlueprint) GoString() string { return s.String() } -// SetCiphertext sets the Ciphertext field's value. -func (s *PasswordData) SetCiphertext(v string) *PasswordData { - s.Ciphertext = &v +// SetBlueprintId sets the BlueprintId field's value. +func (s *RelationalDatabaseBlueprint) SetBlueprintId(v string) *RelationalDatabaseBlueprint { + s.BlueprintId = &v return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *PasswordData) SetKeyPairName(v string) *PasswordData { - s.KeyPairName = &v +// SetEngine sets the Engine field's value. +func (s *RelationalDatabaseBlueprint) SetEngine(v string) *RelationalDatabaseBlueprint { + s.Engine = &v return s } -type PeerVpcInput struct { - _ struct{} `type:"structure"` +// SetEngineDescription sets the EngineDescription field's value. +func (s *RelationalDatabaseBlueprint) SetEngineDescription(v string) *RelationalDatabaseBlueprint { + s.EngineDescription = &v + return s } -// String returns the string representation -func (s PeerVpcInput) String() string { - return awsutil.Prettify(s) +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabaseBlueprint) SetEngineVersion(v string) *RelationalDatabaseBlueprint { + s.EngineVersion = &v + return s } -// GoString returns the string representation -func (s PeerVpcInput) GoString() string { - return s.String() +// SetEngineVersionDescription sets the EngineVersionDescription field's value. +func (s *RelationalDatabaseBlueprint) SetEngineVersionDescription(v string) *RelationalDatabaseBlueprint { + s.EngineVersionDescription = &v + return s } -type PeerVpcOutput struct { +// SetIsEngineDefault sets the IsEngineDefault field's value. +func (s *RelationalDatabaseBlueprint) SetIsEngineDefault(v bool) *RelationalDatabaseBlueprint { + s.IsEngineDefault = &v + return s +} + +// Describes a database bundle. A bundle describes the performance specifications +// of the database. +type RelationalDatabaseBundle struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` + // The ID for the database bundle. + BundleId *string `locationName:"bundleId" type:"string"` + + // The number of virtual CPUs (vCPUs) for the database bundle. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` + + // The size of the disk for the database bundle. + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` + + // A Boolean value indicating whether the database bundle is active. + IsActive *bool `locationName:"isActive" type:"boolean"` + + // A Boolean value indicating whether the database bundle is encrypted. + IsEncrypted *bool `locationName:"isEncrypted" type:"boolean"` + + // The name for the database bundle. + Name *string `locationName:"name" type:"string"` + + // The cost of the database bundle in US currency. + Price *float64 `locationName:"price" type:"float"` + + // The amount of RAM in GB (for example, 2.0) for the database bundle. + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` + + // The data transfer rate per month in GB for the database bundle. + TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` } // String returns the string representation -func (s PeerVpcOutput) String() string { +func (s RelationalDatabaseBundle) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PeerVpcOutput) GoString() string { +func (s RelationalDatabaseBundle) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *PeerVpcOutput) SetOperation(v *Operation) *PeerVpcOutput { - s.Operation = v +// SetBundleId sets the BundleId field's value. +func (s *RelationalDatabaseBundle) SetBundleId(v string) *RelationalDatabaseBundle { + s.BundleId = &v return s } -// Describes information about the ports on your virtual private server (or -// instance). -type PortInfo struct { - _ struct{} `type:"structure"` +// SetCpuCount sets the CpuCount field's value. +func (s *RelationalDatabaseBundle) SetCpuCount(v int64) *RelationalDatabaseBundle { + s.CpuCount = &v + return s +} - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *RelationalDatabaseBundle) SetDiskSizeInGb(v int64) *RelationalDatabaseBundle { + s.DiskSizeInGb = &v + return s +} - // The protocol. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` +// SetIsActive sets the IsActive field's value. +func (s *RelationalDatabaseBundle) SetIsActive(v bool) *RelationalDatabaseBundle { + s.IsActive = &v + return s +} - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` +// SetIsEncrypted sets the IsEncrypted field's value. +func (s *RelationalDatabaseBundle) SetIsEncrypted(v bool) *RelationalDatabaseBundle { + s.IsEncrypted = &v + return s +} + +// SetName sets the Name field's value. +func (s *RelationalDatabaseBundle) SetName(v string) *RelationalDatabaseBundle { + s.Name = &v + return s +} + +// SetPrice sets the Price field's value. +func (s *RelationalDatabaseBundle) SetPrice(v float64) *RelationalDatabaseBundle { + s.Price = &v + return s +} + +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *RelationalDatabaseBundle) SetRamSizeInGb(v float64) *RelationalDatabaseBundle { + s.RamSizeInGb = &v + return s +} + +// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. +func (s *RelationalDatabaseBundle) SetTransferPerMonthInGb(v int64) *RelationalDatabaseBundle { + s.TransferPerMonthInGb = &v + return s +} + +// Describes an endpoint for a database. +type RelationalDatabaseEndpoint struct { + _ struct{} `type:"structure"` + + // Specifies the DNS address of the database. + Address *string `locationName:"address" type:"string"` + + // Specifies the port that the database is listening on. + Port *int64 `locationName:"port" type:"integer"` } // String returns the string representation -func (s PortInfo) String() string { +func (s RelationalDatabaseEndpoint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PortInfo) GoString() string { +func (s RelationalDatabaseEndpoint) GoString() string { return s.String() } -// SetFromPort sets the FromPort field's value. -func (s *PortInfo) SetFromPort(v int64) *PortInfo { - s.FromPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *PortInfo) SetProtocol(v string) *PortInfo { - s.Protocol = &v +// SetAddress sets the Address field's value. +func (s *RelationalDatabaseEndpoint) SetAddress(v string) *RelationalDatabaseEndpoint { + s.Address = &v return s } -// SetToPort sets the ToPort field's value. -func (s *PortInfo) SetToPort(v int64) *PortInfo { - s.ToPort = &v +// SetPort sets the Port field's value. +func (s *RelationalDatabaseEndpoint) SetPort(v int64) *RelationalDatabaseEndpoint { + s.Port = &v return s } -type PutInstancePublicPortsInput struct { +// Describes an event for a database. +type RelationalDatabaseEvent struct { _ struct{} `type:"structure"` - // The Lightsail instance name of the public port(s) you are setting. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // Specifies information about the public port(s). - // - // PortInfos is a required field - PortInfos []*PortInfo `locationName:"portInfos" type:"list" required:"true"` + // The timestamp when the database event was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The category that the database event belongs to. + EventCategories []*string `locationName:"eventCategories" type:"list"` + + // The message of the database event. + Message *string `locationName:"message" type:"string"` + + // The database that the database event relates to. + Resource *string `locationName:"resource" type:"string"` } // String returns the string representation -func (s PutInstancePublicPortsInput) String() string { +func (s RelationalDatabaseEvent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PutInstancePublicPortsInput) GoString() string { +func (s RelationalDatabaseEvent) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfos == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfos")) - } +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabaseEvent) SetCreatedAt(v time.Time) *RelationalDatabaseEvent { + s.CreatedAt = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetEventCategories sets the EventCategories field's value. +func (s *RelationalDatabaseEvent) SetEventCategories(v []*string) *RelationalDatabaseEvent { + s.EventCategories = v + return s } -// SetInstanceName sets the InstanceName field's value. -func (s *PutInstancePublicPortsInput) SetInstanceName(v string) *PutInstancePublicPortsInput { - s.InstanceName = &v +// SetMessage sets the Message field's value. +func (s *RelationalDatabaseEvent) SetMessage(v string) *RelationalDatabaseEvent { + s.Message = &v return s } -// SetPortInfos sets the PortInfos field's value. -func (s *PutInstancePublicPortsInput) SetPortInfos(v []*PortInfo) *PutInstancePublicPortsInput { - s.PortInfos = v +// SetResource sets the Resource field's value. +func (s *RelationalDatabaseEvent) SetResource(v string) *RelationalDatabaseEvent { + s.Resource = &v return s } -type PutInstancePublicPortsOutput struct { +// Describes the hardware of a database. +type RelationalDatabaseHardware struct { _ struct{} `type:"structure"` - // Describes metadata about the operation you just executed. - Operation *Operation `locationName:"operation" type:"structure"` + // The number of vCPUs for the database. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` + + // The size of the disk for the database. + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` + + // The amount of RAM in GB for the database. + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` } // String returns the string representation -func (s PutInstancePublicPortsOutput) String() string { +func (s RelationalDatabaseHardware) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PutInstancePublicPortsOutput) GoString() string { +func (s RelationalDatabaseHardware) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *PutInstancePublicPortsOutput) SetOperation(v *Operation) *PutInstancePublicPortsOutput { - s.Operation = v +// SetCpuCount sets the CpuCount field's value. +func (s *RelationalDatabaseHardware) SetCpuCount(v int64) *RelationalDatabaseHardware { + s.CpuCount = &v return s } -type RebootInstanceInput struct { +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *RelationalDatabaseHardware) SetDiskSizeInGb(v int64) *RelationalDatabaseHardware { + s.DiskSizeInGb = &v + return s +} + +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *RelationalDatabaseHardware) SetRamSizeInGb(v float64) *RelationalDatabaseHardware { + s.RamSizeInGb = &v + return s +} + +// Describes the parameters of a database. +type RelationalDatabaseParameter struct { _ struct{} `type:"structure"` - // The name of the instance to reboot. + // Specifies the valid range of values for the parameter. + AllowedValues *string `locationName:"allowedValues" type:"string"` + + // Indicates when parameter updates are applied. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // Can be immediate or pending-reboot. + ApplyMethod *string `locationName:"applyMethod" type:"string"` + + // Specifies the engine-specific parameter type. + ApplyType *string `locationName:"applyType" type:"string"` + + // Specifies the valid data type for the parameter. + DataType *string `locationName:"dataType" type:"string"` + + // Provides a description of the parameter. + Description *string `locationName:"description" type:"string"` + + // A Boolean value indicating whether the parameter can be modified. + IsModifiable *bool `locationName:"isModifiable" type:"boolean"` + + // Specifies the name of the parameter. + ParameterName *string `locationName:"parameterName" type:"string"` + + // Specifies the value of the parameter. + ParameterValue *string `locationName:"parameterValue" type:"string"` } // String returns the string representation -func (s RebootInstanceInput) String() string { +func (s RelationalDatabaseParameter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RebootInstanceInput) GoString() string { +func (s RelationalDatabaseParameter) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } +// SetAllowedValues sets the AllowedValues field's value. +func (s *RelationalDatabaseParameter) SetAllowedValues(v string) *RelationalDatabaseParameter { + s.AllowedValues = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetApplyMethod sets the ApplyMethod field's value. +func (s *RelationalDatabaseParameter) SetApplyMethod(v string) *RelationalDatabaseParameter { + s.ApplyMethod = &v + return s } -// SetInstanceName sets the InstanceName field's value. -func (s *RebootInstanceInput) SetInstanceName(v string) *RebootInstanceInput { - s.InstanceName = &v +// SetApplyType sets the ApplyType field's value. +func (s *RelationalDatabaseParameter) SetApplyType(v string) *RelationalDatabaseParameter { + s.ApplyType = &v return s } -type RebootInstanceOutput struct { - _ struct{} `type:"structure"` +// SetDataType sets the DataType field's value. +func (s *RelationalDatabaseParameter) SetDataType(v string) *RelationalDatabaseParameter { + s.DataType = &v + return s +} - // An array of key-value pairs containing information about the request operations. - Operations []*Operation `locationName:"operations" type:"list"` +// SetDescription sets the Description field's value. +func (s *RelationalDatabaseParameter) SetDescription(v string) *RelationalDatabaseParameter { + s.Description = &v + return s } -// String returns the string representation -func (s RebootInstanceOutput) String() string { - return awsutil.Prettify(s) +// SetIsModifiable sets the IsModifiable field's value. +func (s *RelationalDatabaseParameter) SetIsModifiable(v bool) *RelationalDatabaseParameter { + s.IsModifiable = &v + return s } -// GoString returns the string representation -func (s RebootInstanceOutput) GoString() string { - return s.String() +// SetParameterName sets the ParameterName field's value. +func (s *RelationalDatabaseParameter) SetParameterName(v string) *RelationalDatabaseParameter { + s.ParameterName = &v + return s } -// SetOperations sets the Operations field's value. -func (s *RebootInstanceOutput) SetOperations(v []*Operation) *RebootInstanceOutput { - s.Operations = v +// SetParameterValue sets the ParameterValue field's value. +func (s *RelationalDatabaseParameter) SetParameterValue(v string) *RelationalDatabaseParameter { + s.ParameterValue = &v return s } -// Describes the AWS Region. -type Region struct { +// Describes a database snapshot. +type RelationalDatabaseSnapshot struct { _ struct{} `type:"structure"` - // The Availability Zones. Follows the format us-east-2a (case-sensitive). - AvailabilityZones []*AvailabilityZone `locationName:"availabilityZones" type:"list"` + // The Amazon Resource Name (ARN) of the database snapshot. + Arn *string `locationName:"arn" type:"string"` - // The continent code (e.g., NA, meaning North America). - ContinentCode *string `locationName:"continentCode" type:"string"` + // The timestamp when the database snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The description of the AWS Region (e.g., This region is recommended to serve - // users in the eastern United States and eastern Canada). - Description *string `locationName:"description" type:"string"` + // The software of the database snapshot (for example, MySQL) + Engine *string `locationName:"engine" type:"string"` - // The display name (e.g., Ohio). - DisplayName *string `locationName:"displayName" type:"string"` + // The database engine version for the database snapshot (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` - // The region name (e.g., us-east-2). - Name *string `locationName:"name" type:"string" enum:"RegionName"` + // The Amazon Resource Name (ARN) of the database from which the database snapshot + // was created. + FromRelationalDatabaseArn *string `locationName:"fromRelationalDatabaseArn" type:"string"` + + // The blueprint ID of the database from which the database snapshot was created. + // A blueprint describes the major engine version of a database. + FromRelationalDatabaseBlueprintId *string `locationName:"fromRelationalDatabaseBlueprintId" type:"string"` + + // The bundle ID of the database from which the database snapshot was created. + FromRelationalDatabaseBundleId *string `locationName:"fromRelationalDatabaseBundleId" type:"string"` + + // The name of the source database from which the database snapshot was created. + FromRelationalDatabaseName *string `locationName:"fromRelationalDatabaseName" type:"string"` + + // The Region name and Availability Zone where the database snapshot is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the database snapshot. + Name *string `locationName:"name" type:"string"` + + // The Lightsail resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The size of the disk in GB (for example, 32) for the database snapshot. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + + // The state of the database snapshot. + State *string `locationName:"state" type:"string"` + + // The support code for the database snapshot. Include this code in your email + // to support when you have questions about a database snapshot in Lightsail. + // This code enables our support team to look up your Lightsail information + // more easily. + SupportCode *string `locationName:"supportCode" type:"string"` } // String returns the string representation -func (s Region) String() string { +func (s RelationalDatabaseSnapshot) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Region) GoString() string { +func (s RelationalDatabaseSnapshot) GoString() string { return s.String() } -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *Region) SetAvailabilityZones(v []*AvailabilityZone) *Region { - s.AvailabilityZones = v +// SetArn sets the Arn field's value. +func (s *RelationalDatabaseSnapshot) SetArn(v string) *RelationalDatabaseSnapshot { + s.Arn = &v return s } -// SetContinentCode sets the ContinentCode field's value. -func (s *Region) SetContinentCode(v string) *Region { - s.ContinentCode = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabaseSnapshot) SetCreatedAt(v time.Time) *RelationalDatabaseSnapshot { + s.CreatedAt = &v return s } -// SetDescription sets the Description field's value. -func (s *Region) SetDescription(v string) *Region { - s.Description = &v +// SetEngine sets the Engine field's value. +func (s *RelationalDatabaseSnapshot) SetEngine(v string) *RelationalDatabaseSnapshot { + s.Engine = &v return s } -// SetDisplayName sets the DisplayName field's value. -func (s *Region) SetDisplayName(v string) *Region { - s.DisplayName = &v +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabaseSnapshot) SetEngineVersion(v string) *RelationalDatabaseSnapshot { + s.EngineVersion = &v + return s +} + +// SetFromRelationalDatabaseArn sets the FromRelationalDatabaseArn field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseArn(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseArn = &v + return s +} + +// SetFromRelationalDatabaseBlueprintId sets the FromRelationalDatabaseBlueprintId field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBlueprintId(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseBlueprintId = &v + return s +} + +// SetFromRelationalDatabaseBundleId sets the FromRelationalDatabaseBundleId field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBundleId(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseBundleId = &v + return s +} + +// SetFromRelationalDatabaseName sets the FromRelationalDatabaseName field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseName(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseName = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *RelationalDatabaseSnapshot) SetLocation(v *ResourceLocation) *RelationalDatabaseSnapshot { + s.Location = v return s } // SetName sets the Name field's value. -func (s *Region) SetName(v string) *Region { +func (s *RelationalDatabaseSnapshot) SetName(v string) *RelationalDatabaseSnapshot { s.Name = &v return s } +// SetResourceType sets the ResourceType field's value. +func (s *RelationalDatabaseSnapshot) SetResourceType(v string) *RelationalDatabaseSnapshot { + s.ResourceType = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *RelationalDatabaseSnapshot) SetSizeInGb(v int64) *RelationalDatabaseSnapshot { + s.SizeInGb = &v + return s +} + +// SetState sets the State field's value. +func (s *RelationalDatabaseSnapshot) SetState(v string) *RelationalDatabaseSnapshot { + s.State = &v + return s +} + +// SetSupportCode sets the SupportCode field's value. +func (s *RelationalDatabaseSnapshot) SetSupportCode(v string) *RelationalDatabaseSnapshot { + s.SupportCode = &v + return s +} + type ReleaseStaticIpInput struct { _ struct{} `type:"structure"` @@ -15106,56 +20063,117 @@ type ResourceLocation struct { // The Availability Zone. Follows the format us-east-2a (case-sensitive). AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The AWS Region name. - RegionName *string `locationName:"regionName" type:"string" enum:"RegionName"` + // The AWS Region name. + RegionName *string `locationName:"regionName" type:"string" enum:"RegionName"` +} + +// String returns the string representation +func (s ResourceLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceLocation) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ResourceLocation) SetAvailabilityZone(v string) *ResourceLocation { + s.AvailabilityZone = &v + return s +} + +// SetRegionName sets the RegionName field's value. +func (s *ResourceLocation) SetRegionName(v string) *ResourceLocation { + s.RegionName = &v + return s +} + +type StartInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the instance (a virtual private server) to start. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *StartInstanceInput) SetInstanceName(v string) *StartInstanceInput { + s.InstanceName = &v + return s +} + +type StartInstanceOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the request operation. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s ResourceLocation) String() string { +func (s StartInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResourceLocation) GoString() string { +func (s StartInstanceOutput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ResourceLocation) SetAvailabilityZone(v string) *ResourceLocation { - s.AvailabilityZone = &v - return s -} - -// SetRegionName sets the RegionName field's value. -func (s *ResourceLocation) SetRegionName(v string) *ResourceLocation { - s.RegionName = &v +// SetOperations sets the Operations field's value. +func (s *StartInstanceOutput) SetOperations(v []*Operation) *StartInstanceOutput { + s.Operations = v return s } -type StartInstanceInput struct { +type StartRelationalDatabaseInput struct { _ struct{} `type:"structure"` - // The name of the instance (a virtual private server) to start. + // The name of your database to start. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s StartInstanceInput) String() string { +func (s StartRelationalDatabaseInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StartInstanceInput) GoString() string { +func (s StartRelationalDatabaseInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *StartInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *StartRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -15164,31 +20182,31 @@ func (s *StartInstanceInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *StartInstanceInput) SetInstanceName(v string) *StartInstanceInput { - s.InstanceName = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *StartRelationalDatabaseInput) SetRelationalDatabaseName(v string) *StartRelationalDatabaseInput { + s.RelationalDatabaseName = &v return s } -type StartInstanceOutput struct { +type StartRelationalDatabaseOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the request operation. + // An object describing the result of your start relational database request. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s StartInstanceOutput) String() string { +func (s StartRelationalDatabaseOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StartInstanceOutput) GoString() string { +func (s StartRelationalDatabaseOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *StartInstanceOutput) SetOperations(v []*Operation) *StartInstanceOutput { +func (s *StartRelationalDatabaseOutput) SetOperations(v []*Operation) *StartRelationalDatabaseOutput { s.Operations = v return s } @@ -15366,6 +20384,77 @@ func (s *StopInstanceOutput) SetOperations(v []*Operation) *StopInstanceOutput { return s } +type StopRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of your database to stop. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The name of your new database snapshot to be created before stopping your + // database. + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string"` +} + +// String returns the string representation +func (s StopRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *StopRelationalDatabaseInput) SetRelationalDatabaseName(v string) *StopRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *StopRelationalDatabaseInput) SetRelationalDatabaseSnapshotName(v string) *StopRelationalDatabaseInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +type StopRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your stop relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s StopRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *StopRelationalDatabaseOutput) SetOperations(v []*Operation) *StopRelationalDatabaseOutput { + s.Operations = v + return s +} + type UnpeerVpcInput struct { _ struct{} `type:"structure"` } @@ -15570,6 +20659,266 @@ func (s *UpdateLoadBalancerAttributeOutput) SetOperations(v []*Operation) *Updat return s } +type UpdateRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // When true, applies changes immediately. When false, applies changes during + // the preferred maintenance window. Some changes may cause an outage. + // + // Default: false + ApplyImmediately *bool `locationName:"applyImmediately" type:"boolean"` + + // When true, disables automated backup retention for your database. + // + // Disabling backup retention deletes all automated database backups. Before + // disabling this, you may want to create a snapshot of your database using + // the create relational database snapshot operation. + // + // Updates are applied during the next maintenance window because this can result + // in an outage. + DisableBackupRetention *bool `locationName:"disableBackupRetention" type:"boolean"` + + // When true, enables automated backup retention for your database. + // + // Updates are applied during the next maintenance window because this can result + // in an outage. + EnableBackupRetention *bool `locationName:"enableBackupRetention" type:"boolean"` + + // The password for the master user of your database. The password can include + // any printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain 8 to 41 characters. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string"` + + // The daily time range during which automated backups are created for your + // database if automated backups are enabled. + // + // Constraints: + // + // * Must be in the hh24:mi-hh24:mi format. + // + // Example: 16:00-16:30 + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` + + // The weekly time range during which system maintenance can occur on your database. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Constraints: + // + // * Must be in the ddd:hh24:mi-ddd:hh24:mi format. + // + // * Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. + // + // * Must be at least 30 minutes. + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Example: Tue:17:00-Tue:17:30 + PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` + + // Specifies the accessibility options for your database. A value of true specifies + // a database that is available to resources outside of your Lightsail account. + // A value of false specifies a database that is available only to your Lightsail + // resources in the same region as your database. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` + + // The name of your database to update. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // When true, the master user password is changed to a new strong password generated + // by Lightsail. + // + // Use the get relational database master user password operation to get the + // new password. + RotateMasterUserPassword *bool `locationName:"rotateMasterUserPassword" type:"boolean"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *UpdateRelationalDatabaseInput) SetApplyImmediately(v bool) *UpdateRelationalDatabaseInput { + s.ApplyImmediately = &v + return s +} + +// SetDisableBackupRetention sets the DisableBackupRetention field's value. +func (s *UpdateRelationalDatabaseInput) SetDisableBackupRetention(v bool) *UpdateRelationalDatabaseInput { + s.DisableBackupRetention = &v + return s +} + +// SetEnableBackupRetention sets the EnableBackupRetention field's value. +func (s *UpdateRelationalDatabaseInput) SetEnableBackupRetention(v bool) *UpdateRelationalDatabaseInput { + s.EnableBackupRetention = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *UpdateRelationalDatabaseInput) SetMasterUserPassword(v string) *UpdateRelationalDatabaseInput { + s.MasterUserPassword = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *UpdateRelationalDatabaseInput) SetPreferredBackupWindow(v string) *UpdateRelationalDatabaseInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *UpdateRelationalDatabaseInput) SetPreferredMaintenanceWindow(v string) *UpdateRelationalDatabaseInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *UpdateRelationalDatabaseInput) SetPubliclyAccessible(v bool) *UpdateRelationalDatabaseInput { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *UpdateRelationalDatabaseInput) SetRelationalDatabaseName(v string) *UpdateRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +// SetRotateMasterUserPassword sets the RotateMasterUserPassword field's value. +func (s *UpdateRelationalDatabaseInput) SetRotateMasterUserPassword(v bool) *UpdateRelationalDatabaseInput { + s.RotateMasterUserPassword = &v + return s +} + +type UpdateRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your update relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *UpdateRelationalDatabaseOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseOutput { + s.Operations = v + return s +} + +type UpdateRelationalDatabaseParametersInput struct { + _ struct{} `type:"structure"` + + // The database parameters to update. + // + // Parameters is a required field + Parameters []*RelationalDatabaseParameter `locationName:"parameters" type:"list" required:"true"` + + // The name of your database for which to update parameters. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRelationalDatabaseParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRelationalDatabaseParametersInput"} + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParameters sets the Parameters field's value. +func (s *UpdateRelationalDatabaseParametersInput) SetParameters(v []*RelationalDatabaseParameter) *UpdateRelationalDatabaseParametersInput { + s.Parameters = v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *UpdateRelationalDatabaseParametersInput) SetRelationalDatabaseName(v string) *UpdateRelationalDatabaseParametersInput { + s.RelationalDatabaseName = &v + return s +} + +type UpdateRelationalDatabaseParametersOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your update relational database parameters + // request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseParametersOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *UpdateRelationalDatabaseParametersOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseParametersOutput { + s.Operations = v + return s +} + const ( // AccessDirectionInbound is a AccessDirection enum value AccessDirectionInbound = "inbound" @@ -16154,15 +21503,21 @@ const ( // RegionNameUsWest2 is a RegionName enum value RegionNameUsWest2 = "us-west-2" - // RegionNameEuCentral1 is a RegionName enum value - RegionNameEuCentral1 = "eu-central-1" - // RegionNameEuWest1 is a RegionName enum value RegionNameEuWest1 = "eu-west-1" // RegionNameEuWest2 is a RegionName enum value RegionNameEuWest2 = "eu-west-2" + // RegionNameEuWest3 is a RegionName enum value + RegionNameEuWest3 = "eu-west-3" + + // RegionNameEuCentral1 is a RegionName enum value + RegionNameEuCentral1 = "eu-central-1" + + // RegionNameCaCentral1 is a RegionName enum value + RegionNameCaCentral1 = "ca-central-1" + // RegionNameApSouth1 is a RegionName enum value RegionNameApSouth1 = "ap-south-1" @@ -16179,6 +21534,42 @@ const ( RegionNameApNortheast2 = "ap-northeast-2" ) +const ( + // RelationalDatabaseEngineMysql is a RelationalDatabaseEngine enum value + RelationalDatabaseEngineMysql = "mysql" +) + +const ( + // RelationalDatabaseMetricNameCpuutilization is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameCpuutilization = "CPUUtilization" + + // RelationalDatabaseMetricNameDatabaseConnections is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameDatabaseConnections = "DatabaseConnections" + + // RelationalDatabaseMetricNameDiskQueueDepth is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameDiskQueueDepth = "DiskQueueDepth" + + // RelationalDatabaseMetricNameFreeStorageSpace is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameFreeStorageSpace = "FreeStorageSpace" + + // RelationalDatabaseMetricNameNetworkReceiveThroughput is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameNetworkReceiveThroughput = "NetworkReceiveThroughput" + + // RelationalDatabaseMetricNameNetworkTransmitThroughput is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameNetworkTransmitThroughput = "NetworkTransmitThroughput" +) + +const ( + // RelationalDatabasePasswordVersionCurrent is a RelationalDatabasePasswordVersion enum value + RelationalDatabasePasswordVersionCurrent = "CURRENT" + + // RelationalDatabasePasswordVersionPrevious is a RelationalDatabasePasswordVersion enum value + RelationalDatabasePasswordVersionPrevious = "PREVIOUS" + + // RelationalDatabasePasswordVersionPending is a RelationalDatabasePasswordVersion enum value + RelationalDatabasePasswordVersionPending = "PENDING" +) + const ( // ResourceTypeInstance is a ResourceType enum value ResourceTypeInstance = "Instance" @@ -16209,4 +21600,10 @@ const ( // ResourceTypeDiskSnapshot is a ResourceType enum value ResourceTypeDiskSnapshot = "DiskSnapshot" + + // ResourceTypeRelationalDatabase is a ResourceType enum value + ResourceTypeRelationalDatabase = "RelationalDatabase" + + // ResourceTypeRelationalDatabaseSnapshot is a ResourceType enum value + ResourceTypeRelationalDatabaseSnapshot = "RelationalDatabaseSnapshot" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go index 57c016bfe61..05453aa9326 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go @@ -3485,7 +3485,7 @@ type AudioSelector struct { // identify this Selector. Selector names should be unique per input. // // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + Name *string `locationName:"name" min:"1" type:"string" required:"true"` // The audio selector settings. SelectorSettings *AudioSelectorSettings `locationName:"selectorSettings" type:"structure"` @@ -3507,6 +3507,9 @@ func (s *AudioSelector) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if s.SelectorSettings != nil { if err := s.SelectorSettings.Validate(); err != nil { invalidParams.AddNested("SelectorSettings", err.(request.ErrInvalidParams)) @@ -3718,7 +3721,8 @@ func (s *AvailSettings) SetScte35TimeSignalApos(v *Scte35TimeSignalApos) *AvailS return s } -// A list of schedule actions to create. +// A list of schedule actions to create (in a request) or that have been created +// (in a response). type BatchScheduleActionCreateRequest struct { _ struct{} `type:"structure"` @@ -3767,11 +3771,11 @@ func (s *BatchScheduleActionCreateRequest) SetScheduleActions(v []*ScheduleActio return s } -// Returned list of created schedule actions. +// List of actions that have been created in the schedule. type BatchScheduleActionCreateResult struct { _ struct{} `type:"structure"` - // Returned list of created schedule actions. + // List of actions that have been created in the schedule. // // ScheduleActions is a required field ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` @@ -3797,7 +3801,7 @@ func (s *BatchScheduleActionCreateResult) SetScheduleActions(v []*ScheduleAction type BatchScheduleActionDeleteRequest struct { _ struct{} `type:"structure"` - // A list of schedule actions to delete, identified by unique name. + // A list of schedule actions to delete. // // ActionNames is a required field ActionNames []*string `locationName:"actionNames" type:"list" required:"true"` @@ -3832,11 +3836,11 @@ func (s *BatchScheduleActionDeleteRequest) SetActionNames(v []*string) *BatchSch return s } -// Returned list of deleted schedule actions. +// List of actions that have been deleted from the schedule. type BatchScheduleActionDeleteResult struct { _ struct{} `type:"structure"` - // Returned list of deleted schedule actions. + // List of actions that have been deleted from the schedule. // // ScheduleActions is a required field ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` @@ -3858,7 +3862,8 @@ func (s *BatchScheduleActionDeleteResult) SetScheduleActions(v []*ScheduleAction return s } -// A schedule update, including actions to insert, and action names to delete. +// A request to create actions (add actions to the schedule), delete actions +// (remove actions from the schedule), or both create and delete actions. type BatchUpdateScheduleInput struct { _ struct{} `type:"structure"` @@ -3926,10 +3931,10 @@ func (s *BatchUpdateScheduleInput) SetDeletes(v *BatchScheduleActionDeleteReques type BatchUpdateScheduleOutput struct { _ struct{} `type:"structure"` - // Returned list of created schedule actions. + // List of actions that have been created in the schedule. Creates *BatchScheduleActionCreateResult `locationName:"creates" type:"structure"` - // Returned list of deleted schedule actions. + // List of actions that have been deleted from the schedule. Deletes *BatchScheduleActionDeleteResult `locationName:"deletes" type:"structure"` } @@ -4584,7 +4589,7 @@ type CaptionSelector struct { // within an event. // // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + Name *string `locationName:"name" min:"1" type:"string" required:"true"` // Caption selector settings. SelectorSettings *CaptionSelectorSettings `locationName:"selectorSettings" type:"structure"` @@ -4606,6 +4611,9 @@ func (s *CaptionSelector) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if s.SelectorSettings != nil { if err := s.SelectorSettings.Validate(); err != nil { invalidParams.AddNested("SelectorSettings", err.(request.ErrInvalidParams)) @@ -4996,6 +5004,7 @@ type CreateChannelInput struct { InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + // The log level the user wants for their channel. LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` Name *string `locationName:"name" type:"string"` @@ -5300,6 +5309,7 @@ type DeleteChannelOutput struct { InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + // The log level the user wants for their channel. LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` Name *string `locationName:"name" type:"string"` @@ -5736,6 +5746,7 @@ type DescribeChannelOutput struct { InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + // The log level the user wants for their channel. LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` Name *string `locationName:"name" type:"string"` @@ -7480,12 +7491,18 @@ func (s *FecOutputSettings) SetRowLength(v int64) *FecOutputSettings { return s } -// Fixed mode schedule action start settings +// Start time for the action. type FixedModeScheduleActionStartSettings struct { _ struct{} `type:"structure"` - // Fixed timestamp action start. Conforms to ISO-8601. - Time *string `locationName:"time" type:"string"` + // Start time for the action to start in the channel. (Not the time for the + // action to be added to the schedule: actions are always added to the schedule + // immediately.) UTC format: yyyy-mm-ddThh:mm:ss.nnnZ. All the letters are digits + // (for example, mm might be 01) except for the two constants "T" for time and + // "Z" for "UTC format". + // + // Time is a required field + Time *string `locationName:"time" type:"string" required:"true"` } // String returns the string representation @@ -7498,6 +7515,19 @@ func (s FixedModeScheduleActionStartSettings) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *FixedModeScheduleActionStartSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FixedModeScheduleActionStartSettings"} + if s.Time == nil { + invalidParams.Add(request.NewErrParamRequired("Time")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetTime sets the Time field's value. func (s *FixedModeScheduleActionStartSettings) SetTime(v string) *FixedModeScheduleActionStartSettings { s.Time = &v @@ -7510,12 +7540,10 @@ type GlobalConfiguration struct { // Value to set the initial audio gain for the Live Event. InitialAudioGain *int64 `locationName:"initialAudioGain" type:"integer"` - // Indicates the action to take when an input completes (e.g. end-of-file.) - // Options include immediately switching to the next sequential input (via "switchInput"), - // switching to the next input and looping back to the first input when last - // input ends (via "switchAndLoopInputs") or not switching inputs and instead - // transcoding black / color / slate images per the "Input Loss Behavior" configuration - // until an activateInput REST command is received (via "none"). + // Indicates the action to take when the input completes (e.g. end-of-file). + // Options include looping on the input (via "switchAndLoopInputs") or transcoding + // black / color / slate images per the "Input Loss Behavior" configuration + // (via "none"). InputEndAction *string `locationName:"inputEndAction" type:"string" enum:"GlobalConfigurationInputEndAction"` // Settings for system actions when input is lost. @@ -7670,7 +7698,8 @@ type H264Settings struct { // while high can produce better quality for certain content. LookAheadRateControl *string `locationName:"lookAheadRateControl" type:"string" enum:"H264LookAheadRateControl"` - // Maximum bitrate in bits/second (for VBR mode only). + // Maximum bitrate in bits/second (for VBR and QVBR modes only).Required when + // rateControlMode is "qvbr". MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` // Only meaningful if sceneChangeDetect is set to enabled. Enforces separation @@ -7702,13 +7731,23 @@ type H264Settings struct { // H.264 Profile. Profile *string `locationName:"profile" type:"string" enum:"H264Profile"` - // Rate control mode. + // Target quality value. Applicable only to QVBR mode. 1 is the lowest quality + // and 10 is thehighest and approaches lossless. Typical levels for content + // distribution are between 6 and 8. + QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` + + // Rate control mode. - CBR: Constant Bit Rate- VBR: Variable Bit Rate- QVBR: + // Encoder dynamically controls the bitrate to meet the desired quality (specifiedthrough + // the qvbrQualityLevel field). The bitrate will not exceed the bitrate specified + // inthe maxBitrate field and will not fall below the bitrate required to meet + // the desiredquality level. RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"H264RateControlMode"` // Sets the scan type of the output to progressive or top-field-first interlaced. ScanType *string `locationName:"scanType" type:"string" enum:"H264ScanType"` - // Scene change detection. Inserts I-frames on scene changes when enabled. + // Scene change detection.- On: inserts I-frames when scene change is detected.- + // Off: does not force an I-frame when scene change is detected. SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"H264SceneChangeDetect"` // Number of slices per picture. Must be less than or equal to the number of @@ -7764,6 +7803,9 @@ func (s *H264Settings) Validate() error { if s.ParDenominator != nil && *s.ParDenominator < 1 { invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) } + if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { + invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) + } if s.Slices != nil && *s.Slices < 1 { invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) } @@ -7930,6 +7972,12 @@ func (s *H264Settings) SetProfile(v string) *H264Settings { return s } +// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. +func (s *H264Settings) SetQvbrQualityLevel(v int64) *H264Settings { + s.QvbrQualityLevel = &v + return s +} + // SetRateControlMode sets the RateControlMode field's value. func (s *H264Settings) SetRateControlMode(v string) *H264Settings { s.RateControlMode = &v @@ -11003,15 +11051,7 @@ type MsSmoothGroupSettings struct { // set by the RAI markers from the input streams. SegmentationMode *string `locationName:"segmentationMode" type:"string" enum:"SmoothGroupSegmentationMode"` - // Outputs that are "output locked" can use this delay. Assign a delay to the - // output that is "secondary". Do not assign a delay to the "primary" output. - // The delay means that the primary output will always reach the downstream - // system before the secondary, which helps ensure that the downstream system - // always uses the primary output. (If there were no delay, the downstream system - // might flip-flop between whichever output happens to arrive first.) If the - // primary fails, the downstream system will switch to the secondary output. - // When the primary is restarted, the downstream system will switch back to - // the primary (because once again it is always arriving first) + // Number of milliseconds to delay the output from the second pipeline. SendDelayMs *int64 `locationName:"sendDelayMs" type:"integer"` // If set to scte35, use incoming SCTE-35 messages to generate a sparse track @@ -11800,7 +11840,8 @@ func (s PassThroughSettings) GoString() string { type PurchaseOfferingInput struct { _ struct{} `type:"structure"` - Count *int64 `locationName:"count" min:"1" type:"integer"` + // Count is a required field + Count *int64 `locationName:"count" min:"1" type:"integer" required:"true"` Name *string `locationName:"name" type:"string"` @@ -11808,6 +11849,8 @@ type PurchaseOfferingInput struct { OfferingId *string `location:"uri" locationName:"offeringId" type:"string" required:"true"` RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` + + Start *string `locationName:"start" type:"string"` } // String returns the string representation @@ -11823,6 +11866,9 @@ func (s PurchaseOfferingInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PurchaseOfferingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PurchaseOfferingInput"} + if s.Count == nil { + invalidParams.Add(request.NewErrParamRequired("Count")) + } if s.Count != nil && *s.Count < 1 { invalidParams.Add(request.NewErrParamMinValue("Count", 1)) } @@ -11860,6 +11906,12 @@ func (s *PurchaseOfferingInput) SetRequestId(v string) *PurchaseOfferingInput { return s } +// SetStart sets the Start field's value. +func (s *PurchaseOfferingInput) SetStart(v string) *PurchaseOfferingInput { + s.Start = &v + return s +} + type PurchaseOfferingOutput struct { _ struct{} `type:"structure"` @@ -12372,11 +12424,15 @@ func (s *RtmpOutputSettings) SetNumRetries(v int64) *RtmpOutputSettings { return s } -// A single schedule action. +// Contains information on a single schedule action. type ScheduleAction struct { _ struct{} `type:"structure"` - // The name of the action, must be unique within the schedule. + // The name of the action, must be unique within the schedule. This name provides + // the main reference to an action once it is added to the schedule. A name + // is unique if it is no longer in the schedule. The schedule is automatically + // cleaned up to remove actions with a start time of more than 1 hour ago (approximately) + // so at that point a name can be reused. // // ActionName is a required field ActionName *string `locationName:"actionName" type:"string" required:"true"` @@ -12386,7 +12442,7 @@ type ScheduleAction struct { // ScheduleActionSettings is a required field ScheduleActionSettings *ScheduleActionSettings `locationName:"scheduleActionSettings" type:"structure" required:"true"` - // When the action takes effect. + // The time for the action to start in the channel. // // ScheduleActionStartSettings is a required field ScheduleActionStartSettings *ScheduleActionStartSettings `locationName:"scheduleActionStartSettings" type:"structure" required:"true"` @@ -12419,6 +12475,11 @@ func (s *ScheduleAction) Validate() error { invalidParams.AddNested("ScheduleActionSettings", err.(request.ErrInvalidParams)) } } + if s.ScheduleActionStartSettings != nil { + if err := s.ScheduleActionStartSettings.Validate(); err != nil { + invalidParams.AddNested("ScheduleActionStartSettings", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -12444,23 +12505,23 @@ func (s *ScheduleAction) SetScheduleActionStartSettings(v *ScheduleActionStartSe return s } -// Settings for a single schedule action. +// Holds the settings for a single schedule action. type ScheduleActionSettings struct { _ struct{} `type:"structure"` - // SCTE-35 Return to Network Settings + // Settings for SCTE-35 return_to_network message Scte35ReturnToNetworkSettings *Scte35ReturnToNetworkScheduleActionSettings `locationName:"scte35ReturnToNetworkSettings" type:"structure"` - // SCTE-35 Splice Insert Settings + // Settings for SCTE-35 splice_insert message Scte35SpliceInsertSettings *Scte35SpliceInsertScheduleActionSettings `locationName:"scte35SpliceInsertSettings" type:"structure"` - // SCTE-35 Time Signal Settings + // Settings for SCTE-35 time_signal message Scte35TimeSignalSettings *Scte35TimeSignalScheduleActionSettings `locationName:"scte35TimeSignalSettings" type:"structure"` - // Static Image Activate + // Settings to activate a static image overlay StaticImageActivateSettings *StaticImageActivateScheduleActionSettings `locationName:"staticImageActivateSettings" type:"structure"` - // Static Image Deactivate + // Settings to deactivate a static image overlay StaticImageDeactivateSettings *StaticImageDeactivateScheduleActionSettings `locationName:"staticImageDeactivateSettings" type:"structure"` } @@ -12534,11 +12595,11 @@ func (s *ScheduleActionSettings) SetStaticImageDeactivateSettings(v *StaticImage return s } -// When the schedule action starts. +// Settings to specify the start time for an action. type ScheduleActionStartSettings struct { _ struct{} `type:"structure"` - // Fixed timestamp action start. Conforms to ISO-8601. + // Holds the start time for the action. FixedModeScheduleActionStartSettings *FixedModeScheduleActionStartSettings `locationName:"fixedModeScheduleActionStartSettings" type:"structure"` } @@ -12552,6 +12613,21 @@ func (s ScheduleActionStartSettings) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduleActionStartSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduleActionStartSettings"} + if s.FixedModeScheduleActionStartSettings != nil { + if err := s.FixedModeScheduleActionStartSettings.Validate(); err != nil { + invalidParams.AddNested("FixedModeScheduleActionStartSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetFixedModeScheduleActionStartSettings sets the FixedModeScheduleActionStartSettings field's value. func (s *ScheduleActionStartSettings) SetFixedModeScheduleActionStartSettings(v *FixedModeScheduleActionStartSettings) *ScheduleActionStartSettings { s.FixedModeScheduleActionStartSettings = v @@ -12676,26 +12752,28 @@ func (s *Scte27SourceSettings) SetPid(v int64) *Scte27SourceSettings { return s } -// SCTE-35 Delivery Restrictions. +// Corresponds to SCTE-35 delivery_not_restricted_flag parameter. To declare +// delivery restrictions, include this element and its four "restriction" flags. +// To declare that there are no restrictions, omit this element. type Scte35DeliveryRestrictions struct { _ struct{} `type:"structure"` - // SCTE-35 segmentation_descriptor archive_allowed_flag. + // Corresponds to SCTE-35 archive_allowed_flag. // // ArchiveAllowedFlag is a required field ArchiveAllowedFlag *string `locationName:"archiveAllowedFlag" type:"string" required:"true" enum:"Scte35ArchiveAllowedFlag"` - // SCTE-35 segmentation_descriptor web_delivery_allowed_flag. + // Corresponds to SCTE-35 device_restrictions parameter. // // DeviceRestrictions is a required field DeviceRestrictions *string `locationName:"deviceRestrictions" type:"string" required:"true" enum:"Scte35DeviceRestrictions"` - // SCTE-35 segmentation_descriptor no_regional_blackout_flag. + // Corresponds to SCTE-35 no_regional_blackout_flag parameter. // // NoRegionalBlackoutFlag is a required field NoRegionalBlackoutFlag *string `locationName:"noRegionalBlackoutFlag" type:"string" required:"true" enum:"Scte35NoRegionalBlackoutFlag"` - // SCTE-35 segmentation_descriptor web_delivery_allowed_flag. + // Corresponds to SCTE-35 web_delivery_allowed_flag parameter. // // WebDeliveryAllowedFlag is a required field WebDeliveryAllowedFlag *string `locationName:"webDeliveryAllowedFlag" type:"string" required:"true" enum:"Scte35WebDeliveryAllowedFlag"` @@ -12757,7 +12835,7 @@ func (s *Scte35DeliveryRestrictions) SetWebDeliveryAllowedFlag(v string) *Scte35 return s } -// SCTE-35 Descriptor. +// Holds one set of SCTE-35 Descriptor Settings. type Scte35Descriptor struct { _ struct{} `type:"structure"` @@ -12845,7 +12923,7 @@ func (s *Scte35DescriptorSettings) SetSegmentationDescriptorScte35DescriptorSett return s } -// SCTE-35 Return to Network Settings. +// Settings for a SCTE-35 return_to_network message. type Scte35ReturnToNetworkScheduleActionSettings struct { _ struct{} `type:"structure"` @@ -12884,46 +12962,64 @@ func (s *Scte35ReturnToNetworkScheduleActionSettings) SetSpliceEventId(v int64) return s } -// SCTE-35 Segmentation Descriptor. +// Corresponds to SCTE-35 segmentation_descriptor. type Scte35SegmentationDescriptor struct { _ struct{} `type:"structure"` - // SCTE-35 delivery restrictions. + // Holds the four SCTE-35 delivery restriction parameters. DeliveryRestrictions *Scte35DeliveryRestrictions `locationName:"deliveryRestrictions" type:"structure"` - // SCTE-35 segmentation_descriptor segment_num. + // Corresponds to SCTE-35 segment_num. A value that is valid for the specified + // segmentation_type_id. SegmentNum *int64 `locationName:"segmentNum" type:"integer"` - // SCTE-35 segmentation_descriptor segmentation_event_cancel_indicator. + // Corresponds to SCTE-35 segmentation_event_cancel_indicator. // // SegmentationCancelIndicator is a required field SegmentationCancelIndicator *string `locationName:"segmentationCancelIndicator" type:"string" required:"true" enum:"Scte35SegmentationCancelIndicator"` - // SCTE-35 segmentation_descriptor segmentation_duration specified in 90 KHz - // clock ticks. + // Corresponds to SCTE-35 segmentation_duration. Optional. The duration for + // the time_signal, in 90 KHz ticks. To convert seconds to ticks, multiple the + // seconds by 90,000. Enter time in 90 KHz clock ticks. If you do not enter + // a duration, the time_signal will continue until you insert a cancellation + // message. SegmentationDuration *int64 `locationName:"segmentationDuration" type:"long"` - // SCTE-35 segmentation_descriptor segmentation_event_id. + // Corresponds to SCTE-35 segmentation_event_id. // // SegmentationEventId is a required field SegmentationEventId *int64 `locationName:"segmentationEventId" type:"long" required:"true"` - // SCTE-35 segmentation_descriptor segmentation_type_id. + // Corresponds to SCTE-35 segmentation_type_id. One of the segmentation_type_id + // values listed in the SCTE-35 specification. On the console, enter the ID + // in decimal (for example, "52"). In the CLI, API, or an SDK, enter the ID + // in hex (for example, "0x34") or decimal (for example, "52"). SegmentationTypeId *int64 `locationName:"segmentationTypeId" type:"integer"` - // SCTE-35 segmentation_descriptor segmentation_upid as a hex string. + // Corresponds to SCTE-35 segmentation_upid. Enter a string containing the hexadecimal + // representation of the characters that make up the SCTE-35 segmentation_upid + // value. Must contain an even number of hex characters. Do not include spaces + // between each hex pair. For example, the ASCII "ADS Information" becomes hex + // "41445320496e666f726d6174696f6e. SegmentationUpid *string `locationName:"segmentationUpid" type:"string"` - // SCTE-35 segmentation_descriptor segmentation_upid_type. + // Corresponds to SCTE-35 segmentation_upid_type. On the console, enter one + // of the types listed in the SCTE-35 specification, converted to a decimal. + // For example, "0x0C" hex from the specification is "12" in decimal. In the + // CLI, API, or an SDK, enter one of the types listed in the SCTE-35 specification, + // in either hex (for example, "0x0C" ) or in decimal (for example, "12"). SegmentationUpidType *int64 `locationName:"segmentationUpidType" type:"integer"` - // SCTE-35 segmentation_descriptor segments_expected. + // Corresponds to SCTE-35 segments_expected. A value that is valid for the specified + // segmentation_type_id. SegmentsExpected *int64 `locationName:"segmentsExpected" type:"integer"` - // SCTE-35 segmentation_descriptor sub_segment_num. + // Corresponds to SCTE-35 sub_segment_num. A value that is valid for the specified + // segmentation_type_id. SubSegmentNum *int64 `locationName:"subSegmentNum" type:"integer"` - // SCTE-35 segmentation_descriptor sub_segments_expected. + // Corresponds to SCTE-35 sub_segments_expected. A value that is valid for the + // specified segmentation_type_id. SubSegmentsExpected *int64 `locationName:"subSegmentsExpected" type:"integer"` } @@ -13082,13 +13178,16 @@ func (s *Scte35SpliceInsert) SetWebDeliveryAllowedFlag(v string) *Scte35SpliceIn return s } -// SCTE-35 Splice Insert Settings. +// Settings for a SCTE-35 splice_insert message. type Scte35SpliceInsertScheduleActionSettings struct { _ struct{} `type:"structure"` - // The duration for the SCTE-35 splice_insert specified in 90KHz clock ticks. - // When duration is not specified the expectation is that a Scte35ReturnToNetwork - // action will be scheduled. + // Optional, the duration for the splice_insert, in 90 KHz ticks. To convert + // seconds to ticks, multiple the seconds by 90,000. If you enter a duration, + // there is an expectation that the downstream system can read the duration + // and cue in at that time. If you do not enter a duration, the splice_insert + // will continue indefinitely and there is an expectation that you will enter + // a return_to_network to end the splice_insert at the appropriate time. Duration *int64 `locationName:"duration" type:"long"` // The splice_event_id for the SCTE-35 splice_insert, as defined in SCTE-35. @@ -13190,7 +13289,7 @@ func (s *Scte35TimeSignalApos) SetWebDeliveryAllowedFlag(v string) *Scte35TimeSi return s } -// SCTE-35 Time Signal Settings. +// Settings for a SCTE-35 time_signal. type Scte35TimeSignalScheduleActionSettings struct { _ struct{} `type:"structure"` @@ -13354,6 +13453,7 @@ type StartChannelOutput struct { InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + // The log level the user wants for their channel. LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` Name *string `locationName:"name" type:"string"` @@ -13447,50 +13547,61 @@ func (s *StartChannelOutput) SetState(v string) *StartChannelOutput { return s } -// Static image activate. +// Settings for the action to activate a static image. type StaticImageActivateScheduleActionSettings struct { _ struct{} `type:"structure"` - // The duration in milliseconds for the image to remain in the video. If omitted - // or set to 0, duration is infinite and image will remain until explicitly - // deactivated. + // The duration in milliseconds for the image to remain on the video. If omitted + // or set to 0 the duration is unlimited and the image will remain until it + // is explicitly deactivated. Duration *int64 `locationName:"duration" type:"integer"` - // The time in milliseconds for the image to fade in. Defaults to 0. + // The time in milliseconds for the image to fade in. The fade-in starts at + // the start time of the overlay. Default is 0 (no fade-in). FadeIn *int64 `locationName:"fadeIn" type:"integer"` - // The time in milliseconds for the image to fade out. Defaults to 0. + // Applies only if a duration is specified. The time in milliseconds for the + // image to fade out. The fade-out starts when the duration time is hit, so + // it effectively extends the duration. Default is 0 (no fade-out). FadeOut *int64 `locationName:"fadeOut" type:"integer"` - // The height of the image when inserted into the video. Defaults to the native - // height of the image. + // The height of the image when inserted into the video, in pixels. The overlay + // will be scaled up or down to the specified height. Leave blank to use the + // native height of the overlay. Height *int64 `locationName:"height" min:"1" type:"integer"` - // The image to overlay on the video. Must be a 32 bit BMP, PNG, or TGA file. - // Must not be larger than the input video. + // The location and filename of the image file to overlay on the video. The + // file must be a 32-bit BMP, PNG, or TGA file, and must not be larger (in pixels) + // than the input video. // // Image is a required field Image *InputLocation `locationName:"image" type:"structure" required:"true"` - // Placement of the left edge of the image on the horizontal axis in pixels. - // 0 is the left edge of the frame. Defaults to 0. + // Placement of the left edge of the overlay relative to the left edge of the + // video frame, in pixels. 0 (the default) is the left edge of the frame. If + // the placement causes the overlay to extend beyond the right edge of the underlying + // video, then the overlay is cropped on the right. ImageX *int64 `locationName:"imageX" type:"integer"` - // Placement of the top edge of the image on the vertical axis in pixels. 0 - // is the top edge of the frame. Defaults to 0. + // Placement of the top edge of the overlay relative to the top edge of the + // video frame, in pixels. 0 (the default) is the top edge of the frame. If + // the placement causes the overlay to extend beyond the bottom edge of the + // underlying video, then the overlay is cropped on the bottom. ImageY *int64 `locationName:"imageY" type:"integer"` - // The Z order of the inserted image. Images with higher layer values will be - // inserted on top of images with lower layer values. Permitted values are 0-7 - // inclusive. Defaults to 0. + // The number of the layer, 0 to 7. There are 8 layers that can be overlaid + // on the video, each layer with a different image. The layers are in Z order, + // which means that overlays with higher values of layer are inserted on top + // of overlays with lower values of layer. Default is 0. Layer *int64 `locationName:"layer" type:"integer"` - // Opacity of image where 0 is transparent and 100 is fully opaque. Defaults - // to 100. + // Opacity of image where 0 is transparent and 100 is fully opaque. Default + // is 100. Opacity *int64 `locationName:"opacity" type:"integer"` - // The width of the image when inserted into the video. Defaults to the native - // width of the image. + // The width of the image when inserted into the video, in pixels. The overlay + // will be scaled up or down to the specified width. Leave blank to use the + // native width of the overlay. Width *int64 `locationName:"width" min:"1" type:"integer"` } @@ -13588,16 +13699,14 @@ func (s *StaticImageActivateScheduleActionSettings) SetWidth(v int64) *StaticIma return s } -// Static image deactivate. +// Settings for the action to deactivate the image in a specific layer. type StaticImageDeactivateScheduleActionSettings struct { _ struct{} `type:"structure"` - // The time in milliseconds for the image to fade out. Defaults to 0. + // The time in milliseconds for the image to fade out. Default is 0 (no fade-out). FadeOut *int64 `locationName:"fadeOut" type:"integer"` - // The Z order of the inserted image. Images with higher layer values will be - // inserted on top of images with lower layer values. Permitted values are 0-7 - // inclusive. Defaults to 0. + // The image overlay layer to deactivate, 0 to 7. Default is 0. Layer *int64 `locationName:"layer" type:"integer"` } @@ -13627,9 +13736,7 @@ type StaticKeySettings struct { _ struct{} `type:"structure"` // The URL of the license server used for protecting content. - // - // KeyProviderServer is a required field - KeyProviderServer *InputLocation `locationName:"keyProviderServer" type:"structure" required:"true"` + KeyProviderServer *InputLocation `locationName:"keyProviderServer" type:"structure"` // Static key value as a 32 character hexadecimal string. // @@ -13650,9 +13757,6 @@ func (s StaticKeySettings) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StaticKeySettings) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StaticKeySettings"} - if s.KeyProviderServer == nil { - invalidParams.Add(request.NewErrParamRequired("KeyProviderServer")) - } if s.StaticKeyValue == nil { invalidParams.Add(request.NewErrParamRequired("StaticKeyValue")) } @@ -13736,6 +13840,7 @@ type StopChannelOutput struct { InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + // The log level the user wants for their channel. LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` Name *string `locationName:"name" type:"string"` @@ -14041,7 +14146,7 @@ type UdpOutputSettings struct { // UDP output buffering in milliseconds. Larger values increase latency through // the transcoder but simultaneously assist the transcoder in maintaining a // constant, low-jitter UDP/RTP output while accommodating clock recovery, input - // switching, input disruptions, picture reordering, etc. + // disruptions, picture reordering, etc. BufferMsec *int64 `locationName:"bufferMsec" type:"integer"` // ContainerSettings is a required field @@ -14131,6 +14236,7 @@ type UpdateChannelInput struct { InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + // The log level the user wants for their channel. LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` Name *string `locationName:"name" type:"string"` @@ -15580,6 +15686,9 @@ const ( // H264RateControlModeCbr is a H264RateControlMode enum value H264RateControlModeCbr = "CBR" + // H264RateControlModeQvbr is a H264RateControlMode enum value + H264RateControlModeQvbr = "QVBR" + // H264RateControlModeVbr is a H264RateControlMode enum value H264RateControlModeVbr = "VBR" ) @@ -15954,6 +16063,7 @@ const ( InputTypeUrlPull = "URL_PULL" ) +// The log level the user wants for their channel. const ( // LogLevelError is a LogLevel enum value LogLevelError = "ERROR" @@ -16327,7 +16437,9 @@ const ( Scte35AposWebDeliveryAllowedBehaviorIgnore = "IGNORE" ) -// SCTE-35 segmentation_descriptor archive_allowed_flag. +// Corresponds to the archive_allowed parameter. A value of ARCHIVE_NOT_ALLOWED +// corresponds to 0 (false) in the SCTE-35 specification. If you include one +// of the "restriction" flags then you must include all four of them. const ( // Scte35ArchiveAllowedFlagArchiveNotAllowed is a Scte35ArchiveAllowedFlag enum value Scte35ArchiveAllowedFlagArchiveNotAllowed = "ARCHIVE_NOT_ALLOWED" @@ -16336,7 +16448,9 @@ const ( Scte35ArchiveAllowedFlagArchiveAllowed = "ARCHIVE_ALLOWED" ) -// SCTE-35 Device Restrictions. +// Corresponds to the device_restrictions parameter in a segmentation_descriptor. +// If you include one of the "restriction" flags then you must include all four +// of them. const ( // Scte35DeviceRestrictionsNone is a Scte35DeviceRestrictions enum value Scte35DeviceRestrictionsNone = "NONE" @@ -16351,7 +16465,9 @@ const ( Scte35DeviceRestrictionsRestrictGroup2 = "RESTRICT_GROUP2" ) -// SCTE-35 segmentation_descriptor no_regional_blackout_flag. +// Corresponds to the no_regional_blackout_flag parameter. A value of REGIONAL_BLACKOUT +// corresponds to 0 (false) in the SCTE-35 specification. If you include one +// of the "restriction" flags then you must include all four of them. const ( // Scte35NoRegionalBlackoutFlagRegionalBlackout is a Scte35NoRegionalBlackoutFlag enum value Scte35NoRegionalBlackoutFlagRegionalBlackout = "REGIONAL_BLACKOUT" @@ -16360,7 +16476,11 @@ const ( Scte35NoRegionalBlackoutFlagNoRegionalBlackout = "NO_REGIONAL_BLACKOUT" ) -// SCTE-35 segmentation_descriptor segmentation_event_cancel_indicator. +// Corresponds to SCTE-35 segmentation_event_cancel_indicator. SEGMENTATION_EVENT_NOT_CANCELED +// corresponds to 0 in the SCTE-35 specification and indicates that this is +// an insertion request. SEGMENTATION_EVENT_CANCELED corresponds to 1 in the +// SCTE-35 specification and indicates that this is a cancelation request, in +// which case complete this field and the existing event ID to cancel. const ( // Scte35SegmentationCancelIndicatorSegmentationEventNotCanceled is a Scte35SegmentationCancelIndicator enum value Scte35SegmentationCancelIndicatorSegmentationEventNotCanceled = "SEGMENTATION_EVENT_NOT_CANCELED" @@ -16385,7 +16505,9 @@ const ( Scte35SpliceInsertWebDeliveryAllowedBehaviorIgnore = "IGNORE" ) -// SCTE-35 segmentation_descriptor web_delivery_allowed_flag. +// Corresponds to the web_delivery_allowed_flag parameter. A value of WEB_DELIVERY_NOT_ALLOWED +// corresponds to 0 (false) in the SCTE-35 specification. If you include one +// of the "restriction" flags then you must include all four of them. const ( // Scte35WebDeliveryAllowedFlagWebDeliveryNotAllowed is a Scte35WebDeliveryAllowedFlag enum value Scte35WebDeliveryAllowedFlagWebDeliveryNotAllowed = "WEB_DELIVERY_NOT_ALLOWED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index dce53c7f244..7672212114e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -197,28 +197,28 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // The request body must include a document with a ChangeResourceRecordSetsRequest // element. The request body contains a list of change items, known as a change // batch. Change batches are considered transactional changes. When using the -// Amazon Route 53 API to change resource record sets, Amazon Route 53 either -// makes all or none of the changes in a change batch request. This ensures -// that Amazon Route 53 never partially implements the intended changes to the -// resource record sets in a hosted zone. +// Amazon Route 53 API to change resource record sets, Route 53 either makes +// all or none of the changes in a change batch request. This ensures that Route +// 53 never partially implements the intended changes to the resource record +// sets in a hosted zone. // // For example, a change batch request that deletes the CNAME record for www.example.com -// and creates an alias resource record set for www.example.com. Amazon Route -// 53 deletes the first resource record set and creates the second resource -// record set in a single operation. If either the DELETE or the CREATE action -// fails, then both changes (plus any other changes in the batch) fail, and -// the original CNAME record continues to exist. +// and creates an alias resource record set for www.example.com. Route 53 deletes +// the first resource record set and creates the second resource record set +// in a single operation. If either the DELETE or the CREATE action fails, then +// both changes (plus any other changes in the batch) fail, and the original +// CNAME record continues to exist. // // Due to the nature of transactional changes, you can't delete the same resource // record set more than once in a single change batch. If you attempt to delete -// the same change batch more than once, Amazon Route 53 returns an InvalidChangeBatch +// the same change batch more than once, Route 53 returns an InvalidChangeBatch // error. // // Traffic Flow // // To create resource record sets for complex routing configurations, use either -// the traffic flow visual editor in the Amazon Route 53 console or the API -// actions for traffic policies and traffic policy instances. Save the configuration +// the traffic flow visual editor in the Route 53 console or the API actions +// for traffic policies and traffic policy instances. Save the configuration // as a traffic policy, then associate the traffic policy with one or more domain // names (such as example.com) or subdomain names (such as www.example.com), // in the same hosted zone or in multiple hosted zones. You can roll back the @@ -236,8 +236,8 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // values. // // * UPSERT: If a resource record set does not already exist, AWS creates -// it. If a resource set does exist, Amazon Route 53 updates it with the -// values in the request. +// it. If a resource set does exist, Route 53 updates it with the values +// in the request. // // Syntaxes for Creating, Updating, and Deleting Resource Record Sets // @@ -251,14 +251,14 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // all of the elements for every kind of resource record set that you can create, // delete, or update by using ChangeResourceRecordSets. // -// Change Propagation to Amazon Route 53 DNS Servers +// Change Propagation to Route 53 DNS Servers // -// When you submit a ChangeResourceRecordSets request, Amazon Route 53 propagates -// your changes to all of the Amazon Route 53 authoritative DNS servers. While -// your changes are propagating, GetChange returns a status of PENDING. When -// propagation is complete, GetChange returns a status of INSYNC. Changes generally -// propagate to all Amazon Route 53 name servers within 60 seconds. For more -// information, see GetChange. +// When you submit a ChangeResourceRecordSets request, Route 53 propagates your +// changes to all of the Route 53 authoritative DNS servers. While your changes +// are propagating, GetChange returns a status of PENDING. When propagation +// is complete, GetChange returns a status of INSYNC. Changes generally propagate +// to all Route 53 name servers within 60 seconds. For more information, see +// GetChange. // // Limits on ChangeResourceRecordSets Requests // @@ -278,8 +278,7 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // No hosted zone exists with the ID that you specified. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidChangeBatch "InvalidChangeBatch" // This exception contains a list of messages that might contain one or more @@ -291,8 +290,8 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeResourceRecordSets @@ -379,8 +378,7 @@ func (c *Route53) ChangeTagsForResourceRequest(input *ChangeTagsForResourceInput // The input is not valid. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeNoSuchHostedZone "NoSuchHostedZone" // No hosted zone exists with the ID that you specified. @@ -388,8 +386,8 @@ func (c *Route53) ChangeTagsForResourceRequest(input *ChangeTagsForResourceInput // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeThrottlingException "ThrottlingException" @@ -471,17 +469,17 @@ func (c *Route53) CreateHealthCheckRequest(input *CreateHealthCheckInput) (req * // If you're registering EC2 instances with an Elastic Load Balancing (ELB) // load balancer, do not create Amazon Route 53 health checks for the EC2 instances. // When you register an EC2 instance with a load balancer, you configure settings -// for an ELB health check, which performs a similar function to an Amazon Route -// 53 health check. +// for an ELB health check, which performs a similar function to a Route 53 +// health check. // // Private Hosted Zones // // You can associate health checks with failover resource record sets in a private // hosted zone. Note the following: // -// * Amazon Route 53 health checkers are outside the VPC. To check the health -// of an endpoint within a VPC by IP address, you must assign a public IP -// address to the instance in the VPC. +// * Route 53 health checkers are outside the VPC. To check the health of +// an endpoint within a VPC by IP address, you must assign a public IP address +// to the instance in the VPC. // // * You can configure a health checker to check the health of an external // resource that the instance relies on, such as a database server. @@ -597,41 +595,45 @@ func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *re // CreateHostedZone API operation for Amazon Route 53. // -// Creates a new public hosted zone, which you use to specify how the Domain -// Name System (DNS) routes traffic on the Internet for a domain, such as example.com, -// and its subdomains. +// Creates a new public or private hosted zone. You create records in a public +// hosted zone to define how you want to route traffic on the internet for a +// domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). +// You create records in a private hosted zone to define how you want to route +// traffic for a domain and its subdomains within one or more Amazon Virtual +// Private Clouds (Amazon VPCs). // -// You can't convert a public hosted zones to a private hosted zone or vice -// versa. Instead, you must create a new hosted zone with the same name and -// create new resource record sets. +// You can't convert a public hosted zone to a private hosted zone or vice versa. +// Instead, you must create a new hosted zone with the same name and create +// new resource record sets. // // For more information about charges for hosted zones, see Amazon Route 53 // Pricing (http://aws.amazon.com/route53/pricing/). // // Note the following: // -// * You can't create a hosted zone for a top-level domain (TLD). +// * You can't create a hosted zone for a top-level domain (TLD) such as +// .com. // -// * Amazon Route 53 automatically creates a default SOA record and four -// NS records for the zone. For more information about SOA and NS records, -// see NS and SOA Records that Amazon Route 53 Creates for a Hosted Zone -// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) +// * For public hosted zones, Amazon Route 53 automatically creates a default +// SOA record and four NS records for the zone. For more information about +// SOA and NS records, see NS and SOA Records that Route 53 Creates for a +// Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) // in the Amazon Route 53 Developer Guide. // -// If you want to use the same name servers for multiple hosted zones, you can -// optionally associate a reusable delegation set with the hosted zone. See -// the DelegationSetId element. +// If you want to use the same name servers for multiple public hosted zones, +// you can optionally associate a reusable delegation set with the hosted +// zone. See the DelegationSetId element. // -// * If your domain is registered with a registrar other than Amazon Route -// 53, you must update the name servers with your registrar to make Amazon -// Route 53 your DNS service. For more information, see Configuring Amazon -// Route 53 as your DNS Service (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/creating-migrating.html) +// * If your domain is registered with a registrar other than Route 53, you +// must update the name servers with your registrar to make Route 53 the +// DNS service for the domain. For more information, see Migrating DNS Service +// for an Existing Domain to Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) // in the Amazon Route 53 Developer Guide. // // When you submit a CreateHostedZone request, the initial status of the hosted -// zone is PENDING. This means that the NS and SOA records are not yet available -// on all Amazon Route 53 DNS servers. When the NS and SOA records are available, -// the status of the zone changes to INSYNC. +// zone is PENDING. For public hosted zones, this means that the NS and SOA +// records are not yet available on all Route 53 DNS servers. When the NS and +// SOA records are available, the status of the zone changes to INSYNC. // // 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 @@ -678,8 +680,8 @@ func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *re // You can create a hosted zone that has the same name as an existing hosted // zone (example.com is common), but there is a limit to the number of hosted // zones that have the same name. If you get this error, Amazon Route 53 has -// reached that limit. If you own the domain name and Amazon Route 53 generates -// this error, contact Customer Support. +// reached that limit. If you own the domain name and Route 53 generates this +// error, contact Customer Support. // // * ErrCodeConflictingDomainExists "ConflictingDomainExists" // The cause of this error depends on whether you're trying to create a public @@ -775,10 +777,10 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // configuration, Amazon Route 53 begins to publish log data to an Amazon CloudWatch // Logs log group. // -// DNS query logs contain information about the queries that Amazon Route 53 -// receives for a specified public hosted zone, such as the following: +// DNS query logs contain information about the queries that Route 53 receives +// for a specified public hosted zone, such as the following: // -// * Amazon Route 53 edge location that responded to the DNS query +// * Route 53 edge location that responded to the DNS query // // * Domain or subdomain that was requested // @@ -789,8 +791,8 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // Log Group and Resource PolicyBefore you create a query logging configuration, // perform the following operations. // -// If you create a query logging configuration using the Amazon Route 53 console, -// Amazon Route 53 performs these operations automatically. +// If you create a query logging configuration using the Route 53 console, Route +// 53 performs these operations automatically. // // Create a CloudWatch Logs log group, and make note of the ARN, which you specify // when you create a query logging configuration. Note the following: @@ -806,30 +808,30 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // /aws/route53/hosted zone name // // In the next step, you'll create a resource policy, which controls access -// to one or more log groups and the associated AWS resources, such as Amazon -// Route 53 hosted zones. There's a limit on the number of resource policies -// that you can create, so we recommend that you use a consistent prefix so -// you can use the same resource policy for all the log groups that you create -// for query logging. +// to one or more log groups and the associated AWS resources, such as Route +// 53 hosted zones. There's a limit on the number of resource policies that +// you can create, so we recommend that you use a consistent prefix so you can +// use the same resource policy for all the log groups that you create for query +// logging. // // Create a CloudWatch Logs resource policy, and give it the permissions that -// Amazon Route 53 needs to create log streams and to send query logs to log -// streams. For the value of Resource, specify the ARN for the log group that -// you created in the previous step. To use the same resource policy for all -// the CloudWatch Logs log groups that you created for query logging configurations, -// replace the hosted zone name with *, for example: +// Route 53 needs to create log streams and to send query logs to log streams. +// For the value of Resource, specify the ARN for the log group that you created +// in the previous step. To use the same resource policy for all the CloudWatch +// Logs log groups that you created for query logging configurations, replace +// the hosted zone name with *, for example: // // arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/* // // You can't use the CloudWatch console to create or edit a resource policy. // You must use the CloudWatch API, one of the AWS SDKs, or the AWS CLI. // -// Log Streams and Edge LocationsWhen Amazon Route 53 finishes creating the -// configuration for DNS query logging, it does the following: +// Log Streams and Edge LocationsWhen Route 53 finishes creating the configuration +// for DNS query logging, it does the following: // // Creates a log stream for an edge location the first time that the edge location // responds to DNS queries for the specified hosted zone. That log stream is -// used to log all queries that Amazon Route 53 responds to for that edge location. +// used to log all queries that Route 53 responds to for that edge location. // // Begins to send query logs to the applicable log stream. // @@ -841,18 +843,17 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // number, for example, DFW3. The three-letter code typically corresponds with // the International Air Transport Association airport code for an airport near // the edge location. (These abbreviations might change in the future.) For -// a list of edge locations, see "The Amazon Route 53 Global Network" on the -// Amazon Route 53 Product Details (http://aws.amazon.com/route53/details/) -// page. +// a list of edge locations, see "The Route 53 Global Network" on the Route +// 53 Product Details (http://aws.amazon.com/route53/details/) page. // // Queries That Are LoggedQuery logs contain only the queries that DNS resolvers -// forward to Amazon Route 53. If a DNS resolver has already cached the response -// to a query (such as the IP address for a load balancer for example.com), -// the resolver will continue to return the cached response. It doesn't forward -// another query to Amazon Route 53 until the TTL for the corresponding resource -// record set expires. Depending on how many DNS queries are submitted for a -// resource record set, and depending on the TTL for that resource record set, -// query logs might contain information about only one query out of every several +// forward to Route 53. If a DNS resolver has already cached the response to +// a query (such as the IP address for a load balancer for example.com), the +// resolver will continue to return the cached response. It doesn't forward +// another query to Route 53 until the TTL for the corresponding resource record +// set expires. Depending on how many DNS queries are submitted for a resource +// record set, and depending on the TTL for that resource record set, query +// logs might contain information about only one query out of every several // thousand queries that are submitted to DNS. For more information about how // DNS works, see Routing Internet Traffic to Your Website or Web Application // (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html) @@ -865,9 +866,8 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // PricingFor information about charges for query logs, see Amazon CloudWatch // Pricing (http://aws.amazon.com/cloudwatch/pricing/). // -// How to Stop LoggingIf you want Amazon Route 53 to stop sending query logs -// to CloudWatch Logs, delete the query logging configuration. For more information, -// see DeleteQueryLoggingConfig. +// How to Stop LoggingIf you want Route 53 to stop sending query logs to CloudWatch +// Logs, delete the query logging configuration. For more information, see DeleteQueryLoggingConfig. // // 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 @@ -1052,8 +1052,8 @@ func (c *Route53) CreateReusableDelegationSetRequest(input *CreateReusableDelega // You can create a hosted zone that has the same name as an existing hosted // zone (example.com is common), but there is a limit to the number of hosted // zones that have the same name. If you get this error, Amazon Route 53 has -// reached that limit. If you own the domain name and Amazon Route 53 generates -// this error, contact Customer Support. +// reached that limit. If you own the domain name and Route 53 generates this +// error, contact Customer Support. // // * ErrCodeDelegationSetAlreadyReusable "DelegationSetAlreadyReusable" // The specified delegation set has already been marked as reusable. @@ -1561,8 +1561,7 @@ func (c *Route53) DeleteHealthCheckRequest(input *DeleteHealthCheckInput) (req * // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeHealthCheckInUse "HealthCheckInUse" // This error code is not in use. @@ -1656,8 +1655,8 @@ func (c *Route53) DeleteHostedZoneRequest(input *DeleteHostedZoneInput) (req *re // and NS resource record sets. If the hosted zone contains other resource record // sets, you must delete them before you can delete the hosted zone. If you // try to delete a hosted zone that contains other resource record sets, the -// request fails, and Amazon Route 53 returns a HostedZoneNotEmpty error. For -// information about deleting records from your hosted zone, see ChangeResourceRecordSets. +// request fails, and Route 53 returns a HostedZoneNotEmpty error. For information +// about deleting records from your hosted zone, see ChangeResourceRecordSets. // // To verify that the hosted zone has been deleted, do one of the following: // @@ -1684,8 +1683,8 @@ func (c *Route53) DeleteHostedZoneRequest(input *DeleteHostedZoneInput) (req *re // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeInvalidInput "InvalidInput" @@ -1761,8 +1760,8 @@ func (c *Route53) DeleteQueryLoggingConfigRequest(input *DeleteQueryLoggingConfi // DeleteQueryLoggingConfig API operation for Amazon Route 53. // // Deletes a configuration for DNS query logging. If you delete a configuration, -// Amazon Route 53 stops sending query logs to CloudWatch Logs. Amazon Route -// 53 doesn't delete any logs that are already in CloudWatch Logs. +// Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't +// delete any logs that are already in CloudWatch Logs. // // For more information about DNS query logs, see CreateQueryLoggingConfig. // @@ -2039,8 +2038,7 @@ func (c *Route53) DeleteTrafficPolicyInstanceRequest(input *DeleteTrafficPolicyI // Deletes a traffic policy instance and all of the resource record sets that // Amazon Route 53 created when you created the instance. // -// In the Amazon Route 53 console, traffic policy instances are known as policy -// records. +// In the Route 53 console, traffic policy instances are known as policy records. // // 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 @@ -2059,8 +2057,8 @@ func (c *Route53) DeleteTrafficPolicyInstanceRequest(input *DeleteTrafficPolicyI // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyInstance @@ -2232,13 +2230,16 @@ func (c *Route53) DisassociateVPCFromHostedZoneRequest(input *DisassociateVPCFro // DisassociateVPCFromHostedZone API operation for Amazon Route 53. // -// Disassociates a VPC from a Amazon Route 53 private hosted zone. +// Disassociates a VPC from a Amazon Route 53 private hosted zone. Note the +// following: +// +// * You can't disassociate the last VPC from a private hosted zone. // -// You can't disassociate the last VPC from a private hosted zone. +// * You can't convert a private hosted zone into a public hosted zone. // -// You can't disassociate a VPC from a private hosted zone when only one VPC -// is associated with the hosted zone. You also can't convert a private hosted -// zone into a public hosted zone. +// * You can submit a DisassociateVPCFromHostedZone request using either +// the account that created the hosted zone or the account that created the +// VPC. // // 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 @@ -2423,8 +2424,8 @@ func (c *Route53) GetChangeRequest(input *GetChangeInput) (req *request.Request, // to all Amazon Route 53 DNS servers. This is the initial status of all // change batch requests. // -// * INSYNC indicates that the changes have propagated to all Amazon Route -// 53 DNS servers. +// * INSYNC indicates that the changes have propagated to all Route 53 DNS +// servers. // // 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 @@ -2589,17 +2590,17 @@ func (c *Route53) GetGeoLocationRequest(input *GetGeoLocationInput) (req *reques // Use the following syntax to determine whether a continent is supported for // geolocation: // -// GET /2013-04-01/geolocation?ContinentCode=two-letter abbreviation for a continent +// GET /2013-04-01/geolocation?continentcode=two-letter abbreviation for a continent // // Use the following syntax to determine whether a country is supported for // geolocation: // -// GET /2013-04-01/geolocation?CountryCode=two-character country code +// GET /2013-04-01/geolocation?countrycode=two-character country code // // Use the following syntax to determine whether a subdivision of a country // is supported for geolocation: // -// GET /2013-04-01/geolocation?CountryCode=two-character country code&SubdivisionCode=subdivision +// GET /2013-04-01/geolocation?countrycode=two-character country code&subdivisioncode=subdivision // code // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2611,7 +2612,7 @@ func (c *Route53) GetGeoLocationRequest(input *GetGeoLocationInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchGeoLocation "NoSuchGeoLocation" -// Amazon Route 53 doesn't support the specified geolocation. +// Amazon Route 53 doesn't support the specified geographic location. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -2693,8 +2694,7 @@ func (c *Route53) GetHealthCheckRequest(input *GetHealthCheckInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -2855,8 +2855,7 @@ func (c *Route53) GetHealthCheckLastFailureReasonRequest(input *GetHealthCheckLa // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -2938,8 +2937,7 @@ func (c *Route53) GetHealthCheckStatusRequest(input *GetHealthCheckStatusInput) // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -3610,8 +3608,7 @@ func (c *Route53) GetTrafficPolicyInstanceRequest(input *GetTrafficPolicyInstanc // record sets that are specified in the traffic policy definition. For more // information, see the State response element. // -// In the Amazon Route 53 console, traffic policy instances are known as policy -// records. +// In the Route 53 console, traffic policy instances are known as policy records. // // 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 @@ -3768,7 +3765,7 @@ func (c *Route53) ListGeoLocationsRequest(input *ListGeoLocationsInput) (req *re // ListGeoLocations API operation for Amazon Route 53. // -// Retrieves a list of supported geo locations. +// Retrieves a list of supported geographic locations. // // Countries are listed first, and continents are listed last. If Amazon Route // 53 supports subdivisions for a country (for example, states or provinces), @@ -4163,10 +4160,10 @@ func (c *Route53) ListHostedZonesByNameRequest(input *ListHostedZonesByNameInput // domain names, see DNS Domain Name Format (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) // in the Amazon Route 53 Developer Guide. // -// Amazon Route 53 returns up to 100 items in each response. If you have a lot -// of hosted zones, use the MaxItems parameter to list them in groups of up -// to 100. The response includes values that help navigate from one group of -// MaxItems hosted zones to the next: +// Route 53 returns up to 100 items in each response. If you have a lot of hosted +// zones, use the MaxItems parameter to list them in groups of up to 100. The +// response includes values that help navigate from one group of MaxItems hosted +// zones to the next: // // * The DNSName and HostedZoneId elements in the response contain the values, // if any, specified for the dnsname and hostedzoneid parameters in the request @@ -4373,18 +4370,25 @@ func (c *Route53) ListResourceRecordSetsRequest(input *ListResourceRecordSetsInp // // ListResourceRecordSets returns up to 100 resource record sets at a time in // ASCII order, beginning at a position specified by the name and type elements. -// The action sorts results first by DNS name with the labels reversed, for -// example: +// +// Sort order +// +// ListResourceRecordSets sorts results first by DNS name with the labels reversed, +// for example: // // com.example.www. // -// Note the trailing dot, which can change the sort order in some circumstances. +// Note the trailing dot, which can change the sort order when the record name +// contains characters that appear before . (decimal 46) in the ASCII table. +// These characters include the following: ! " # $ % & ' ( ) * + , - +// +// When multiple records have the same DNS name, ListResourceRecordSets sorts +// results by the record type. // -// When multiple records have the same DNS name, the action sorts results by -// the record type. +// Specifying where to start listing records // -// You can use the name and type elements to adjust the beginning position of -// the list of resource record sets returned: +// You can use the name and type elements to specify the resource record set +// that the list begins with: // // If you do not specify Name or TypeThe results begin with the first resource // record set that the hosted zone contains. @@ -4399,9 +4403,13 @@ func (c *Route53) ListResourceRecordSetsRequest(input *ListResourceRecordSetsInp // record set in the list whose name is greater than or equal to Name, and whose // type is greater than or equal to Type. // +// Resource record sets that are PENDING +// // This action returns the most current version of the records. This includes -// records that are PENDING, and that are not yet available on all Amazon Route -// 53 DNS servers. +// records that are PENDING, and that are not yet available on all Route 53 +// DNS servers. +// +// Changing resource record sets // // To ensure that you get an accurate listing of the resource record sets for // a hosted zone at a point in time, do not submit a ChangeResourceRecordSets @@ -4409,6 +4417,14 @@ func (c *Route53) ListResourceRecordSetsRequest(input *ListResourceRecordSetsInp // request. If you do, some pages may display results without the latest changes // while other pages display results with the latest changes. // +// Displaying the next page of results +// +// If a ListResourceRecordSets command returns more than one page of results, +// the value of IsTruncated is true. To display the next page of results, get +// the values of NextRecordName, NextRecordType, and NextRecordIdentifier (if +// any) from the response. Then submit another ListResourceRecordSets request, +// and specify those values for StartRecordName, StartRecordType, and StartRecordIdentifier. +// // 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. @@ -4637,8 +4653,7 @@ func (c *Route53) ListTagsForResourceRequest(input *ListTagsForResourceInput) (r // The input is not valid. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeNoSuchHostedZone "NoSuchHostedZone" // No hosted zone exists with the ID that you specified. @@ -4646,8 +4661,8 @@ func (c *Route53) ListTagsForResourceRequest(input *ListTagsForResourceInput) (r // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeThrottlingException "ThrottlingException" @@ -4737,8 +4752,7 @@ func (c *Route53) ListTagsForResourcesRequest(input *ListTagsForResourcesInput) // The input is not valid. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeNoSuchHostedZone "NoSuchHostedZone" // No hosted zone exists with the ID that you specified. @@ -4746,8 +4760,8 @@ func (c *Route53) ListTagsForResourcesRequest(input *ListTagsForResourcesInput) // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeThrottlingException "ThrottlingException" @@ -4821,7 +4835,7 @@ func (c *Route53) ListTrafficPoliciesRequest(input *ListTrafficPoliciesInput) (r // // Gets information about the latest version for every traffic policy that is // associated with the current AWS account. Policies are listed in the order -// in which they were created. +// that they were created in. // // 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 @@ -4908,9 +4922,9 @@ func (c *Route53) ListTrafficPolicyInstancesRequest(input *ListTrafficPolicyInst // in the traffic policy definition. For more information, see the State response // element. // -// Amazon Route 53 returns a maximum of 100 items in each response. If you have -// a lot of traffic policy instances, you can use the MaxItems parameter to -// list them in groups of up to 100. +// Route 53 returns a maximum of 100 items in each response. If you have a lot +// of traffic policy instances, you can use the MaxItems parameter to list them +// in groups of up to 100. // // 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 @@ -5000,9 +5014,9 @@ func (c *Route53) ListTrafficPolicyInstancesByHostedZoneRequest(input *ListTraff // record sets that are specified in the traffic policy definition. For more // information, see the State response element. // -// Amazon Route 53 returns a maximum of 100 items in each response. If you have -// a lot of traffic policy instances, you can use the MaxItems parameter to -// list them in groups of up to 100. +// Route 53 returns a maximum of 100 items in each response. If you have a lot +// of traffic policy instances, you can use the MaxItems parameter to list them +// in groups of up to 100. // // 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 @@ -5095,9 +5109,9 @@ func (c *Route53) ListTrafficPolicyInstancesByPolicyRequest(input *ListTrafficPo // record sets that are specified in the traffic policy definition. For more // information, see the State response element. // -// Amazon Route 53 returns a maximum of 100 items in each response. If you have -// a lot of traffic policy instances, you can use the MaxItems parameter to -// list them in groups of up to 100. +// Route 53 returns a maximum of 100 items in each response. If you have a lot +// of traffic policy instances, you can use the MaxItems parameter to list them +// in groups of up to 100. // // 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 @@ -5456,8 +5470,7 @@ func (c *Route53) UpdateHealthCheckRequest(input *UpdateHealthCheckInput) (req * // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -5705,19 +5718,19 @@ func (c *Route53) UpdateTrafficPolicyInstanceRequest(input *UpdateTrafficPolicyI // // When you update a traffic policy instance, Amazon Route 53 continues to respond // to DNS queries for the root resource record set name (such as example.com) -// while it replaces one group of resource record sets with another. Amazon -// Route 53 performs the following operations: +// while it replaces one group of resource record sets with another. Route 53 +// performs the following operations: // -// Amazon Route 53 creates a new group of resource record sets based on the -// specified traffic policy. This is true regardless of how significant the -// differences are between the existing resource record sets and the new resource -// record sets. +// Route 53 creates a new group of resource record sets based on the specified +// traffic policy. This is true regardless of how significant the differences +// are between the existing resource record sets and the new resource record +// sets. // -// When all of the new resource record sets have been created, Amazon Route -// 53 starts to respond to DNS queries for the root resource record set name -// (such as example.com) by using the new resource record sets. +// When all of the new resource record sets have been created, Route 53 starts +// to respond to DNS queries for the root resource record set name (such as +// example.com) by using the new resource record sets. // -// Amazon Route 53 deletes the old group of resource record sets that are associated +// Route 53 deletes the old group of resource record sets that are associated // with the root resource record set name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5740,8 +5753,8 @@ func (c *Route53) UpdateTrafficPolicyInstanceRequest(input *UpdateTrafficPolicyI // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeConflictingTypes "ConflictingTypes" @@ -5827,20 +5840,29 @@ func (s *AccountLimit) SetValue(v int64) *AccountLimit { } // A complex type that identifies the CloudWatch alarm that you want Amazon -// Route 53 health checkers to use to determine whether this health check is -// healthy. +// Route 53 health checkers to use to determine whether the specified health +// check is healthy. type AlarmIdentifier struct { _ struct{} `type:"structure"` // The name of the CloudWatch alarm that you want Amazon Route 53 health checkers // to use to determine whether this health check is healthy. // + // Route 53 supports CloudWatch alarms with the following features: + // + // Standard-resolution metrics. High-resolution metrics aren't supported. For + // more information, see High-Resolution Metrics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) + // in the Amazon CloudWatch User Guide. + // + // Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended statistics + // aren't supported. + // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether this health check is - // healthy. + // For the CloudWatch alarm that you want Route 53 health checkers to use to + // determine whether this health check is healthy, the region that the alarm + // was created in. // // For the current list of CloudWatch regions, see Amazon CloudWatch (http://docs.aws.amazon.com/general/latest/gr/rande.html#cw_region) // in the AWS Regions and Endpoints chapter of the Amazon Web Services General @@ -5925,9 +5947,29 @@ type AliasTarget struct { // see Using Alternate Domain Names (CNAMEs) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html) // in the Amazon CloudFront Developer Guide. // - // Elastic Beanstalk environmentSpecify the CNAME attribute for the environment. - // (The environment must have a regionalized domain name.) You can use the following - // methods to get the value of the CNAME attribute: + // For failover alias records, you can't specify a CloudFront distribution for + // both the primary and secondary records. A distribution must include an alternate + // domain name that matches the name of the record. However, the primary and + // secondary records have the same name, and you can't include the same alternate + // domain name in more than one distribution. + // + // Elastic Beanstalk environmentIf the domain name for your Elastic Beanstalk + // environment includes the region that you deployed the environment in, you + // can create an alias record that routes traffic to the environment. For example, + // the domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized + // domain name. + // + // For environments that were created before early 2016, the domain name doesn't + // include the region. To route traffic to these environments, you must create + // a CNAME record instead of an alias record. Note that you can't create a CNAME + // record for the root domain name. For example, if your domain name is example.com, + // you can create a record that routes traffic for acme.example.com to your + // Elastic Beanstalk environment, but you can't create a record that routes + // traffic for example.com to your Elastic Beanstalk environment. + // + // For Elastic Beanstalk environments that have regionalized subdomains, specify + // the CNAME attribute for the environment. You can use the following methods + // to get the value of the CNAME attribute: // // AWS Management Console: For information about how to get the value by using // the console, see Using Custom Domains with AWS Elastic Beanstalk (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html) @@ -5965,7 +6007,7 @@ type AliasTarget struct { // Application and Network Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) // // Amazon S3 bucket that is configured as a static websiteSpecify the domain - // name of the Amazon S3 website endpoint in which you created the bucket, for + // name of the Amazon S3 website endpoint that you created the bucket in, for // example, s3-website-us-east-2.amazonaws.com. For more information about valid // values, see the table Amazon Simple Storage Service (S3) Website Endpoints // (http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the @@ -5973,8 +6015,14 @@ type AliasTarget struct { // buckets for websites, see Getting Started with Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) // in the Amazon Route 53 Developer Guide. // - // Another Amazon Route 53 resource record setSpecify the value of the Name - // element for a resource record set in the current hosted zone. + // Another Route 53 resource record setSpecify the value of the Name element + // for a resource record set in the current hosted zone. + // + // If you're creating an alias record that has the same name as the hosted zone + // (known as the zone apex), you can't specify the domain name for a record + // for which the value of Type is CNAME. This is because the alias record must + // have the same type as the record that you're routing traffic to, and creating + // a CNAME record for the zone apex isn't supported even for an alias record. // // DNSName is a required field DNSName *string `type:"string" required:"true"` @@ -5982,48 +6030,61 @@ type AliasTarget struct { // Applies only to alias, failover alias, geolocation alias, latency alias, // and weighted alias resource record sets: When EvaluateTargetHealth is true, // an alias resource record set inherits the health of the referenced AWS resource, - // such as an ELB load balancer, or the referenced resource record set. + // such as an ELB load balancer or another resource record set in the hosted + // zone. // // Note the following: // - // * You can't set EvaluateTargetHealth to true when the alias target is - // a CloudFront distribution. - // - // * If the AWS resource that you specify in AliasTarget is a resource record - // set or a group of resource record sets (for example, a group of weighted - // resource record sets), but it is not another alias resource record set, - // we recommend that you associate a health check with all of the resource - // record sets in the alias target. For more information, see What Happens - // When You Omit Health Checks? (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) - // in the Amazon Route 53 Developer Guide. - // - // * If you specify an Elastic Beanstalk environment in HostedZoneId and - // DNSName, and if the environment contains an ELB load balancer, Elastic - // Load Balancing routes queries only to the healthy Amazon EC2 instances - // that are registered with the load balancer. (An environment automatically - // contains an ELB load balancer if it includes more than one EC2 instance.) - // If you set EvaluateTargetHealth to true and either no EC2 instances are - // healthy or the load balancer itself is unhealthy, Amazon Route 53 routes - // queries to other available resources that are healthy, if any. - // - // If the environment contains a single EC2 instance, there are no special requirements. - // - // * If you specify an ELB load balancer in AliasTarget, ELB routes queries - // only to the healthy EC2 instances that are registered with the load balancer. - // If no EC2 instances are healthy or if the load balancer itself is unhealthy, - // and if EvaluateTargetHealth is true for the corresponding alias resource - // record set, Amazon Route 53 routes queries to other resources. When you - // create a load balancer, you configure settings for ELB health checks; - // they're not Amazon Route 53 health checks, but they perform a similar - // function. Do not create Amazon Route 53 health checks for the EC2 instances - // that you register with an ELB load balancer. - // - // For more information, see How Health Checks Work in More Complex Amazon Route - // 53 Configurations (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html) - // in the Amazon Route 53 Developer Guide. - // - // * We recommend that you set EvaluateTargetHealth to true only when you - // have enough idle capacity to handle the failure of one or more endpoints. + // CloudFront distributionsYou can't set EvaluateTargetHealth to true when the + // alias target is a CloudFront distribution. + // + // Elastic Beanstalk environments that have regionalized subdomainsIf you specify + // an Elastic Beanstalk environment in DNSName and the environment contains + // an ELB load balancer, Elastic Load Balancing routes queries only to the healthy + // Amazon EC2 instances that are registered with the load balancer. (An environment + // automatically contains an ELB load balancer if it includes more than one + // Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either + // no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, + // Route 53 routes queries to other available resources that are healthy, if + // any. + // + // If the environment contains a single Amazon EC2 instance, there are no special + // requirements. + // + // ELB load balancersHealth checking behavior depends on the type of load balancer: + // + // Classic Load Balancers: If you specify an ELB Classic Load Balancer in DNSName, + // Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances + // that are registered with the load balancer. If you set EvaluateTargetHealth + // to true and either no EC2 instances are healthy or the load balancer itself + // is unhealthy, Route 53 routes queries to other resources. + // + // Application and Network Load Balancers: If you specify an ELB Application + // or Network Load Balancer and you set EvaluateTargetHealth to true, Route + // 53 routes queries to the load balancer based on the health of the target + // groups that are associated with the load balancer: + // + // For an Application or Network Load Balancer to be considered healthy, every + // target group that contains targets must contain at least one healthy target. + // If any target group contains only unhealthy targets, the load balancer is + // considered unhealthy, and Route 53 routes queries to other resources. + // + // A target group that has no registered targets is considered healthy. + // + // When you create a load balancer, you configure settings for Elastic Load + // Balancing health checks; they're not Route 53 health checks, but they perform + // a similar function. Do not create Route 53 health checks for the EC2 instances + // that you register with an ELB load balancer. + // + // S3 bucketsThere are no special requirements for setting EvaluateTargetHealth + // to true when the alias target is an S3 bucket. + // + // Other records in the same hosted zoneIf the AWS resource that you specify + // in DNSName is a record or a group of records (for example, a group of weighted + // records) but is not another alias record, we recommend that you associate + // a health check with all of the records in the alias target. For more information, + // see What Happens When You Omit Health Checks? (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) + // in the Amazon Route 53 Developer Guide. // // For more information and examples, see Amazon Route 53 Health Checks and // DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) @@ -6039,8 +6100,8 @@ type AliasTarget struct { // // Alias resource record sets for CloudFront can't be created in a private zone. // - // Elastic Beanstalk environmentSpecify the hosted zone ID for the region in - // which you created the environment. The environment must have a regionalized + // Elastic Beanstalk environmentSpecify the hosted zone ID for the region that + // you created the environment in. The environment must have a regionalized // subdomain. For a list of regions and the corresponding hosted zone IDs, see // AWS Elastic Beanstalk (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) // in the "AWS Regions and Endpoints" chapter of the Amazon Web Services General @@ -6083,8 +6144,8 @@ type AliasTarget struct { // table in the "AWS Regions and Endpoints" chapter of the Amazon Web Services // General Reference. // - // Another Amazon Route 53 resource record set in your hosted zoneSpecify the - // hosted zone ID of your hosted zone. (An alias resource record set can't reference + // Another Route 53 resource record set in your hosted zoneSpecify the hosted + // zone ID of your hosted zone. (An alias resource record set can't reference // a resource record set in a different hosted zone.) // // HostedZoneId is a required field @@ -6251,13 +6312,13 @@ type Change struct { // To delete the resource record set that is associated with a traffic policy // instance, use DeleteTrafficPolicyInstance. Amazon Route 53 will delete // the resource record set automatically. If you delete the resource record - // set by using ChangeResourceRecordSets, Amazon Route 53 doesn't automatically + // set by using ChangeResourceRecordSets, Route 53 doesn't automatically // delete the traffic policy instance, and you'll continue to be charged // for it even though it's no longer in use. // - // * UPSERT: If a resource record set doesn't already exist, Amazon Route - // 53 creates it. If a resource record set does exist, Amazon Route 53 updates - // it with the values in the request. + // * UPSERT: If a resource record set doesn't already exist, Route 53 creates + // it. If a resource record set does exist, Route 53 updates it with the + // values in the request. // // Action is a required field Action *string `type:"string" required:"true" enum:"ChangeAction"` @@ -6752,24 +6813,24 @@ type CreateHealthCheckInput struct { // * If you send a CreateHealthCheck request with the same CallerReference // and settings as a previous request, and if the health check doesn't exist, // Amazon Route 53 creates the health check. If the health check does exist, - // Amazon Route 53 returns the settings for the existing health check. + // Route 53 returns the settings for the existing health check. // // * If you send a CreateHealthCheck request with the same CallerReference - // as a deleted health check, regardless of the settings, Amazon Route 53 - // returns a HealthCheckAlreadyExists error. + // as a deleted health check, regardless of the settings, Route 53 returns + // a HealthCheckAlreadyExists error. // // * If you send a CreateHealthCheck request with the same CallerReference - // as an existing health check but with different settings, Amazon Route - // 53 returns a HealthCheckAlreadyExists error. + // as an existing health check but with different settings, Route 53 returns + // a HealthCheckAlreadyExists error. // // * If you send a CreateHealthCheck request with a unique CallerReference - // but settings identical to an existing health check, Amazon Route 53 creates - // the health check. + // but settings identical to an existing health check, Route 53 creates the + // health check. // // CallerReference is a required field CallerReference *string `min:"1" type:"string" required:"true"` - // A complex type that contains the response to a CreateHealthCheck request. + // A complex type that contains settings for a new health check. // // HealthCheckConfig is a required field HealthCheckConfig *HealthCheckConfig `type:"structure" required:"true"` @@ -6858,8 +6919,8 @@ func (s *CreateHealthCheckOutput) SetLocation(v string) *CreateHealthCheckOutput return s } -// A complex type that contains information about the request to create a hosted -// zone. +// A complex type that contains information about the request to create a public +// or private hosted zone. type CreateHostedZoneInput struct { _ struct{} `locationName:"CreateHostedZoneRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` @@ -6888,16 +6949,15 @@ type CreateHostedZoneInput struct { // and the other elements. HostedZoneConfig *HostedZoneConfig `type:"structure"` - // The name of the domain. For resource record types that include a domain name, - // specify a fully qualified domain name, for example, www.example.com. The - // trailing dot is optional; Amazon Route 53 assumes that the domain name is - // fully qualified. This means that Amazon Route 53 treats www.example.com (without - // a trailing dot) and www.example.com. (with a trailing dot) as identical. + // The name of the domain. Specify a fully qualified domain name, for example, + // www.example.com. The trailing dot is optional; Amazon Route 53 assumes that + // the domain name is fully qualified. This means that Route 53 treats www.example.com + // (without a trailing dot) and www.example.com. (with a trailing dot) as identical. // // If you're creating a public hosted zone, this is the name you have registered // with your DNS registrar. If your domain name is registered with a registrar - // other than Amazon Route 53, change the name servers for your domain to the - // set of NameServers that CreateHostedZone returns in DelegationSet. + // other than Route 53, change the name servers for your domain to the set of + // NameServers that CreateHostedZone returns in DelegationSet. // // Name is a required field Name *string `type:"string" required:"true"` @@ -7303,15 +7363,15 @@ func (s *CreateTrafficPolicyInput) SetName(v string) *CreateTrafficPolicyInput { type CreateTrafficPolicyInstanceInput struct { _ struct{} `locationName:"CreateTrafficPolicyInstanceRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - // The ID of the hosted zone in which you want Amazon Route 53 to create resource - // record sets by using the configuration in a traffic policy. + // The ID of the hosted zone that you want Amazon Route 53 to create resource + // record sets in by using the configuration in a traffic policy. // // HostedZoneId is a required field HostedZoneId *string `type:"string" required:"true"` // The domain name (such as example.com) or subdomain name (such as www.example.com) // for which Amazon Route 53 responds to DNS queries by using the resource record - // sets that Amazon Route 53 creates for this traffic policy instance. + // sets that Route 53 creates for this traffic policy instance. // // Name is a required field Name *string `type:"string" required:"true"` @@ -8317,7 +8377,7 @@ func (s *DisassociateVPCFromHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *Disa return s } -// A complex type that contains information about a geo location. +// A complex type that contains information about a geographic location. type GeoLocation struct { _ struct{} `type:"structure"` @@ -8332,8 +8392,8 @@ type GeoLocation struct { // The two-letter code for the country. CountryCode *string `min:"1" type:"string"` - // The code for the subdivision, for example, a state in the United States or - // a province in Canada. + // The code for the subdivision. Route 53 currently supports only states in + // the United States. SubdivisionCode *string `min:"1" type:"string"` } @@ -8401,12 +8461,12 @@ type GeoLocationDetails struct { // The name of the country. CountryName *string `min:"1" type:"string"` - // The code for the subdivision, for example, a state in the United States or - // a province in Canada. + // The code for the subdivision. Route 53 currently supports only states in + // the United States. SubdivisionCode *string `min:"1" type:"string"` - // The full name of the subdivision, for example, a state in the United States - // or a province in Canada. + // The full name of the subdivision. Route 53 currently supports only states + // in the United States. SubdivisionName *string `min:"1" type:"string"` } @@ -8688,8 +8748,8 @@ type GetGeoLocationInput struct { // Amazon Route 53 uses the one- to three-letter subdivision codes that are // specified in ISO standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - // Amazon Route 53 doesn't support subdivision codes for all countries. If you - // specify SubdivisionCode, you must also specify CountryCode. + // Route 53 doesn't support subdivision codes for all countries. If you specify + // subdivisioncode, you must also specify countrycode. SubdivisionCode *string `location:"querystring" locationName:"subdivisioncode" min:"1" type:"string"` } @@ -9776,8 +9836,8 @@ type HealthCheckConfig struct { _ struct{} `type:"structure"` // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether this health check is - // healthy. + // Route 53 health checkers to use to determine whether the specified health + // check is healthy. AlarmIdentifier *AlarmIdentifier `type:"structure"` // (CALCULATED Health Checks Only) A complex type that contains one ChildHealthCheck @@ -9785,6 +9845,27 @@ type HealthCheckConfig struct { // health check. ChildHealthChecks []*string `locationNameList:"ChildHealthCheck" type:"list"` + // Stops Route 53 from performing health checks. When you disable a health check, + // here's what happens: + // + // * Health checks that check the health of endpoints: Route 53 stops submitting + // requests to your application, server, or other resource. + // + // * Calculated health checks: Route 53 stops aggregating the status of the + // referenced health checks. + // + // * Health checks that monitor CloudWatch alarms: Route 53 stops monitoring + // the corresponding CloudWatch metrics. + // + // After you disable a health check, Route 53 considers the status of the health + // check to always be healthy. If you configured DNS failover, Route 53 continues + // to route traffic to the corresponding resources. If you want to stop routing + // traffic to a resource, change the value of UpdateHealthCheckRequest$Inverted. + // + // Charges for a health check still apply when the health check is disabled. + // For more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/). + Disabled *bool `type:"boolean"` + // Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName // to the endpoint in the client_hello message during TLS negotiation. This // allows the endpoint to respond to HTTPS health check requests with the applicable @@ -9824,38 +9905,37 @@ type HealthCheckConfig struct { // Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 // address and passes the value of FullyQualifiedDomainName in the Host header // for all health checks except TCP health checks. This is typically the fully - // qualified DNS name of the endpoint on which you want Amazon Route 53 to perform + // qualified DNS name of the endpoint on which you want Route 53 to perform // health checks. // - // When Amazon Route 53 checks the health of an endpoint, here is how it constructs + // When Route 53 checks the health of an endpoint, here is how it constructs // the Host header: // // * If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for - // Type, Amazon Route 53 passes the value of FullyQualifiedDomainName to - // the endpoint in the Host header. + // Type, Route 53 passes the value of FullyQualifiedDomainName to the endpoint + // in the Host header. // // * If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH - // for Type, Amazon Route 53 passes the value of FullyQualifiedDomainName - // to the endpoint in the Host header. + // for Type, Route 53 passes the value of FullyQualifiedDomainName to the + // endpoint in the Host header. // // * If you specify another value for Port and any value except TCP for Type, - // Amazon Route 53 passes FullyQualifiedDomainName:Port to the endpoint in - // the Host header. + // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host + // header. // - // If you don't specify a value for FullyQualifiedDomainName, Amazon Route 53 - // substitutes the value of IPAddress in the Host header in each of the preceding - // cases. + // If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes + // the value of IPAddress in the Host header in each of the preceding cases. // // If you don't specify a value for IPAddress: // - // Amazon Route 53 sends a DNS request to the domain that you specify for FullyQualifiedDomainName + // Route 53 sends a DNS request to the domain that you specify for FullyQualifiedDomainName // at the interval that you specify for RequestInterval. Using an IPv4 address - // that DNS returns, Amazon Route 53 then checks the health of the endpoint. + // that DNS returns, Route 53 then checks the health of the endpoint. // - // If you don't specify a value for IPAddress, Amazon Route 53 uses only IPv4 - // to send health checks to the endpoint. If there's no resource record set - // with a type of A for the name that you specify for FullyQualifiedDomainName, - // the health check fails with a "DNS resolution failed" error. + // If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send + // health checks to the endpoint. If there's no resource record set with a type + // of A for the name that you specify for FullyQualifiedDomainName, the health + // check fails with a "DNS resolution failed" error. // // If you want to check the health of weighted, latency, or failover resource // record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, @@ -9871,9 +9951,9 @@ type HealthCheckConfig struct { // check results will be unpredictable. // // In addition, if the value that you specify for Type is HTTP, HTTPS, HTTP_STR_MATCH, - // or HTTPS_STR_MATCH, Amazon Route 53 passes the value of FullyQualifiedDomainName + // or HTTPS_STR_MATCH, Route 53 passes the value of FullyQualifiedDomainName // in the Host header, as it does when you specify a value for IPAddress. If - // the value of Type is TCP, Amazon Route 53 doesn't pass a Host header. + // the value of Type is TCP, Route 53 doesn't pass a Host header. FullyQualifiedDomainName *string `type:"string"` // The number of child health checks that are associated with a CALCULATED health @@ -9885,18 +9965,18 @@ type HealthCheckConfig struct { // Note the following: // // * If you specify a number greater than the number of child health checks, - // Amazon Route 53 always considers this health check to be unhealthy. + // Route 53 always considers this health check to be unhealthy. // - // * If you specify 0, Amazon Route 53 always considers this health check - // to be healthy. + // * If you specify 0, Route 53 always considers this health check to be + // healthy. HealthThreshold *int64 `type:"integer"` // The IPv4 or IPv6 IP address of the endpoint that you want Amazon Route 53 // to perform health checks on. If you don't specify a value for IPAddress, - // Amazon Route 53 sends a DNS request to resolve the domain name that you specify + // Route 53 sends a DNS request to resolve the domain name that you specify // in FullyQualifiedDomainName at the interval that you specify in RequestInterval. - // Using an IP address returned by DNS, Amazon Route 53 then checks the health - // of the endpoint. + // Using an IP address returned by DNS, Route 53 then checks the health of the + // endpoint. // // Use one of the following formats for the value of IPAddress: // @@ -9915,9 +9995,9 @@ type HealthCheckConfig struct { // // For more information, see HealthCheckConfig$FullyQualifiedDomainName. // - // Constraints: Amazon Route 53 can't check the health of endpoints for which - // the IP address is in local, private, non-routable, or multicast ranges. For - // more information about IP addresses for which you can't create health checks, + // Constraints: Route 53 can't check the health of endpoints for which the IP + // address is in local, private, non-routable, or multicast ranges. For more + // information about IP addresses for which you can't create health checks, // see the following documents: // // * RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) @@ -9932,14 +10012,14 @@ type HealthCheckConfig struct { // When CloudWatch has insufficient data about the metric to determine the alarm // state, the status that you want Amazon Route 53 to assign to the health check: // - // * Healthy: Amazon Route 53 considers the health check to be healthy. + // * Healthy: Route 53 considers the health check to be healthy. // - // * Unhealthy: Amazon Route 53 considers the health check to be unhealthy. + // * Unhealthy: Route 53 considers the health check to be unhealthy. // - // * LastKnownStatus: Amazon Route 53 uses the status of the health check - // from the last time that CloudWatch had sufficient data to determine the - // alarm state. For new health checks that have no last known status, the - // default status for the health check is healthy. + // * LastKnownStatus: Route 53 uses the status of the health check from the + // last time that CloudWatch had sufficient data to determine the alarm state. + // For new health checks that have no last known status, the default status + // for the health check is healthy. InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` // Specify whether you want Amazon Route 53 to invert the status of a health @@ -9949,7 +10029,7 @@ type HealthCheckConfig struct { // Specify whether you want Amazon Route 53 to measure the latency between health // checkers in multiple AWS regions and your endpoint, and to display CloudWatch - // latency graphs on the Health Checks page in the Amazon Route 53 console. + // latency graphs on the Health Checks page in the Route 53 console. // // You can't change the value of MeasureLatency after you create a health check. MeasureLatency *bool `type:"boolean"` @@ -9961,18 +10041,18 @@ type HealthCheckConfig struct { // A complex type that contains one Region element for each region from which // you want Amazon Route 53 health checkers to check the specified endpoint. // - // If you don't specify any regions, Amazon Route 53 health checkers automatically + // If you don't specify any regions, Route 53 health checkers automatically // performs checks from all of the regions that are listed under Valid Values. // // If you update a health check to remove a region that has been performing - // health checks, Amazon Route 53 will briefly continue to perform checks from - // that region to ensure that some health checkers are always checking the endpoint + // health checks, Route 53 will briefly continue to perform checks from that + // region to ensure that some health checkers are always checking the endpoint // (for example, if you replace three regions with four different regions). Regions []*string `locationNameList:"Region" min:"3" type:"list"` // The number of seconds between the time that Amazon Route 53 gets a response // from your endpoint and the time that it sends the next health check request. - // Each Amazon Route 53 health checker makes requests at this interval. + // Each Route 53 health checker makes requests at this interval. // // You can't change the value of RequestInterval after you create a health check. // @@ -9983,16 +10063,16 @@ type HealthCheckConfig struct { // The path, if any, that you want Amazon Route 53 to request when performing // health checks. The path can be any value for which your endpoint will return // an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example, - // the file /docs/route53-health-check.html. + // the file /docs/route53-health-check.html. You can also include query string + // parameters, for example, /welcome.html?language=jp&login=y. ResourcePath *string `type:"string"` // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that // you want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Amazon Route 53 considers + // resource. If the string appears in the response body, Route 53 considers // the resource healthy. // - // Amazon Route 53 considers case when searching for SearchString in the response - // body. + // Route 53 considers case when searching for SearchString in the response body. SearchString *string `type:"string"` // The type of health check that you want to create, which indicates how Amazon @@ -10002,28 +10082,26 @@ type HealthCheckConfig struct { // // You can create the following types of health checks: // - // * HTTP: Amazon Route 53 tries to establish a TCP connection. If successful, - // Amazon Route 53 submits an HTTP request and waits for an HTTP status code - // of 200 or greater and less than 400. + // * HTTP: Route 53 tries to establish a TCP connection. If successful, Route + // 53 submits an HTTP request and waits for an HTTP status code of 200 or + // greater and less than 400. // - // * HTTPS: Amazon Route 53 tries to establish a TCP connection. If successful, - // Amazon Route 53 submits an HTTPS request and waits for an HTTP status - // code of 200 or greater and less than 400. + // * HTTPS: Route 53 tries to establish a TCP connection. If successful, + // Route 53 submits an HTTPS request and waits for an HTTP status code of + // 200 or greater and less than 400. // // If you specify HTTPS for the value of Type, the endpoint must support TLS // v1.0 or later. // - // * HTTP_STR_MATCH: Amazon Route 53 tries to establish a TCP connection. - // If successful, Amazon Route 53 submits an HTTP request and searches the - // first 5,120 bytes of the response body for the string that you specify - // in SearchString. + // * HTTP_STR_MATCH: Route 53 tries to establish a TCP connection. If successful, + // Route 53 submits an HTTP request and searches the first 5,120 bytes of + // the response body for the string that you specify in SearchString. // - // * HTTPS_STR_MATCH: Amazon Route 53 tries to establish a TCP connection. - // If successful, Amazon Route 53 submits an HTTPS request and searches the - // first 5,120 bytes of the response body for the string that you specify - // in SearchString. + // * HTTPS_STR_MATCH: Route 53 tries to establish a TCP connection. If successful, + // Route 53 submits an HTTPS request and searches the first 5,120 bytes of + // the response body for the string that you specify in SearchString. // - // * TCP: Amazon Route 53 tries to establish a TCP connection. + // * TCP: Route 53 tries to establish a TCP connection. // // * CLOUDWATCH_METRIC: The health check is associated with a CloudWatch // alarm. If the state of the alarm is OK, the health check is considered @@ -10033,12 +10111,12 @@ type HealthCheckConfig struct { // Healthy, Unhealthy, or LastKnownStatus. // // * CALCULATED: For health checks that monitor the status of other health - // checks, Amazon Route 53 adds up the number of health checks that Amazon - // Route 53 health checkers consider to be healthy and compares that number - // with the value of HealthThreshold. + // checks, Route 53 adds up the number of health checks that Route 53 health + // checkers consider to be healthy and compares that number with the value + // of HealthThreshold. // - // For more information, see How Amazon Route 53 Determines Whether an Endpoint - // Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // For more information, see How Route 53 Determines Whether an Endpoint Is + // Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // in the Amazon Route 53 Developer Guide. // // Type is a required field @@ -10097,6 +10175,12 @@ func (s *HealthCheckConfig) SetChildHealthChecks(v []*string) *HealthCheckConfig return s } +// SetDisabled sets the Disabled field's value. +func (s *HealthCheckConfig) SetDisabled(v bool) *HealthCheckConfig { + s.Disabled = &v + return s +} + // SetEnableSNI sets the EnableSNI field's value. func (s *HealthCheckConfig) SetEnableSNI(v bool) *HealthCheckConfig { s.EnableSNI = &v @@ -10250,7 +10334,7 @@ type HostedZone struct { // If the hosted zone was created by another service, the service that created // the hosted zone. When a hosted zone is created by another service, you can't - // edit or delete it using Amazon Route 53. + // edit or delete it using Route 53. LinkedService *LinkedService `type:"structure"` // The name of the domain. For public hosted zones, this is the name that you @@ -10438,39 +10522,39 @@ type ListGeoLocationsInput struct { _ struct{} `type:"structure"` // (Optional) The maximum number of geolocations to be included in the response - // body for this request. If more than MaxItems geolocations remain to be listed, + // body for this request. If more than maxitems geolocations remain to be listed, // then the value of the IsTruncated element in the response is true. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` // The code for the continent with which you want to start listing locations - // that Amazon Route 53 supports for geolocation. If Amazon Route 53 has already - // returned a page or more of results, if IsTruncated is true, and if NextContinentCode - // from the previous response has a value, enter that value in StartContinentCode + // that Amazon Route 53 supports for geolocation. If Route 53 has already returned + // a page or more of results, if IsTruncated is true, and if NextContinentCode + // from the previous response has a value, enter that value in startcontinentcode // to return the next page of results. // - // Include StartContinentCode only if you want to list continents. Don't include - // StartContinentCode when you're listing countries or countries with their + // Include startcontinentcode only if you want to list continents. Don't include + // startcontinentcode when you're listing countries or countries with their // subdivisions. StartContinentCode *string `location:"querystring" locationName:"startcontinentcode" min:"2" type:"string"` // The code for the country with which you want to start listing locations that - // Amazon Route 53 supports for geolocation. If Amazon Route 53 has already - // returned a page or more of results, if IsTruncated is true, and if NextCountryCode - // from the previous response has a value, enter that value in StartCountryCode + // Amazon Route 53 supports for geolocation. If Route 53 has already returned + // a page or more of results, if IsTruncated is true, and if NextCountryCode + // from the previous response has a value, enter that value in startcountrycode // to return the next page of results. // - // Amazon Route 53 uses the two-letter country codes that are specified in ISO - // standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + // Route 53 uses the two-letter country codes that are specified in ISO standard + // 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). StartCountryCode *string `location:"querystring" locationName:"startcountrycode" min:"1" type:"string"` // The code for the subdivision (for example, state or province) with which // you want to start listing locations that Amazon Route 53 supports for geolocation. - // If Amazon Route 53 has already returned a page or more of results, if IsTruncated + // If Route 53 has already returned a page or more of results, if IsTruncated // is true, and if NextSubdivisionCode from the previous response has a value, - // enter that value in StartSubdivisionCode to return the next page of results. + // enter that value in startsubdivisioncode to return the next page of results. // - // To list subdivisions of a country, you must include both StartCountryCode - // and StartSubdivisionCode. + // To list subdivisions of a country, you must include both startcountrycode + // and startsubdivisioncode. StartSubdivisionCode *string `location:"querystring" locationName:"startsubdivisioncode" min:"1" type:"string"` } @@ -10540,8 +10624,8 @@ type ListGeoLocationsOutput struct { // A value that indicates whether more locations remain to be listed after the // last location in this response. If so, the value of IsTruncated is true. // To get more values, submit another request and include the values of NextContinentCode, - // NextCountryCode, and NextSubdivisionCode in the StartContinentCode, StartCountryCode, - // and StartSubdivisionCode, as applicable. + // NextCountryCode, and NextSubdivisionCode in the startcontinentcode, startcountrycode, + // and startsubdivisioncode, as applicable. // // IsTruncated is a required field IsTruncated *bool `type:"boolean" required:"true"` @@ -10552,17 +10636,17 @@ type ListGeoLocationsOutput struct { MaxItems *string `type:"string" required:"true"` // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextContinentCode in the StartContinentCode + // locations. Enter the value of NextContinentCode in the startcontinentcode // parameter in another ListGeoLocations request. NextContinentCode *string `min:"2" type:"string"` // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextCountryCode in the StartCountryCode parameter + // locations. Enter the value of NextCountryCode in the startcountrycode parameter // in another ListGeoLocations request. NextCountryCode *string `min:"1" type:"string"` // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextSubdivisionCode in the StartSubdivisionCode + // locations. Enter the value of NextSubdivisionCode in the startsubdivisioncode // parameter in another ListGeoLocations request. NextSubdivisionCode *string `min:"1" type:"string"` } @@ -10631,8 +10715,8 @@ type ListHealthChecksInput struct { // The maximum number of health checks that you want ListHealthChecks to return // in response to the current request. Amazon Route 53 returns a maximum of - // 100 items. If you set MaxItems to a value greater than 100, Amazon Route - // 53 returns only the first 100 health checks. + // 100 items. If you set MaxItems to a value greater than 100, Route 53 returns + // only the first 100 health checks. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` } @@ -10920,7 +11004,7 @@ type ListHostedZonesInput struct { // (Optional) The maximum number of hosted zones that you want Amazon Route // 53 to return. If you have more than maxitems hosted zones, the value of IsTruncated // in the response is true, and the value of NextMarker is the hosted zone ID - // of the first hosted zone that Amazon Route 53 will return if you submit another + // of the first hosted zone that Route 53 will return if you submit another // request. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` } @@ -11045,8 +11129,7 @@ type ListQueryLoggingConfigsInput struct { // AWS account has more than MaxResults configurations, use the value of ListQueryLoggingConfigsResponse$NextToken // in the response to get the next page of results. // - // If you don't specify a value for MaxResults, Amazon Route 53 returns up to - // 100 configurations. + // If you don't specify a value for MaxResults, Route 53 returns up to 100 configurations. MaxResults *string `location:"querystring" locationName:"maxresults" type:"string"` // (Optional) If the current AWS account has more than MaxResults query logging @@ -11163,8 +11246,8 @@ type ListResourceRecordSetsInput struct { // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | MX // | NAPTR | NS | PTR | SOA | SPF | SRV | TXT // - // Values for weighted, latency, geo, and failover resource record sets: A | - // AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT + // Values for weighted, latency, geolocation, and failover resource record sets: + // A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT // // Values for alias resource record sets: // @@ -11256,9 +11339,12 @@ type ListResourceRecordSetsOutput struct { // MaxItems is a required field MaxItems *string `type:"string" required:"true"` - // Weighted, latency, geolocation, and failover resource record sets only: If - // results were truncated for a given DNS name and type, the value of SetIdentifier + // Resource record sets that have a routing policy other than simple: If results + // were truncated for a given DNS name and type, the value of SetIdentifier // for the next resource record set that has the current DNS name and type. + // + // For information about routing policies, see Choosing a Routing Policy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) + // in the Amazon Route 53 Developer Guide. NextRecordIdentifier *string `min:"1" type:"string"` // If the results were truncated, the name of the next record in the list. @@ -11342,7 +11428,7 @@ type ListReusableDelegationSetsInput struct { // The number of reusable delegation sets that you want Amazon Route 53 to return // in the response to this request. If you specify a value greater than 100, - // Amazon Route 53 returns only the first 100 reusable delegation sets. + // Route 53 returns only the first 100 reusable delegation sets. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` } @@ -11626,7 +11712,7 @@ type ListTrafficPoliciesInput struct { // 53 to return in response to this request. If you have more than MaxItems // traffic policies, the value of IsTruncated in the response is true, and the // value of TrafficPolicyIdMarker is the ID of the first traffic policy that - // Amazon Route 53 will return if you submit another request. + // Route 53 will return if you submit another request. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` // (Conditional) For your first request to ListTrafficPolicies, don't include @@ -12207,8 +12293,8 @@ type ListTrafficPolicyInstancesOutput struct { _ struct{} `type:"structure"` // If IsTruncated is true, HostedZoneIdMarker is the ID of the hosted zone of - // the first traffic policy instance that Amazon Route 53 will return if you - // submit another ListTrafficPolicyInstances request. + // the first traffic policy instance that Route 53 will return if you submit + // another ListTrafficPolicyInstances request. HostedZoneIdMarker *string `type:"string"` // A flag that indicates whether there are more traffic policy instances to @@ -12227,8 +12313,8 @@ type ListTrafficPolicyInstancesOutput struct { MaxItems *string `type:"string" required:"true"` // If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance that Amazon Route 53 will return if you submit - // another ListTrafficPolicyInstances request. + // first traffic policy instance that Route 53 will return if you submit another + // ListTrafficPolicyInstances request. TrafficPolicyInstanceNameMarker *string `type:"string"` // If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of @@ -12305,8 +12391,7 @@ type ListTrafficPolicyVersionsInput struct { // 53 to include in the response body for this request. If the specified traffic // policy has more than MaxItems versions, the value of IsTruncated in the response // is true, and the value of the TrafficPolicyVersionMarker element is the ID - // of the first version that Amazon Route 53 will return if you submit another - // request. + // of the first version that Route 53 will return if you submit another request. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` // For your first request to ListTrafficPolicyVersions, don't include the TrafficPolicyVersionMarker @@ -12445,8 +12530,8 @@ type ListVPCAssociationAuthorizationsInput struct { HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` // Optional: An integer that specifies the maximum number of VPCs that you want - // Amazon Route 53 to return. If you don't specify a value for MaxResults, Amazon - // Route 53 returns up to 50 VPCs per page. + // Amazon Route 53 to return. If you don't specify a value for MaxResults, Route + // 53 returns up to 50 VPCs per page. MaxResults *string `location:"querystring" locationName:"maxresults" type:"string"` // Optional: If a response includes a NextToken element, there are more VPCs @@ -12682,23 +12767,22 @@ type ResourceRecordSet struct { // Except where noted, the following failover behaviors assume that you have // included the HealthCheckId element in both resource record sets: // - // * When the primary resource record set is healthy, Amazon Route 53 responds - // to DNS queries with the applicable value from the primary resource record + // * When the primary resource record set is healthy, Route 53 responds to + // DNS queries with the applicable value from the primary resource record // set regardless of the health of the secondary resource record set. // // * When the primary resource record set is unhealthy and the secondary - // resource record set is healthy, Amazon Route 53 responds to DNS queries - // with the applicable value from the secondary resource record set. + // resource record set is healthy, Route 53 responds to DNS queries with + // the applicable value from the secondary resource record set. // - // * When the secondary resource record set is unhealthy, Amazon Route 53 - // responds to DNS queries with the applicable value from the primary resource - // record set regardless of the health of the primary resource record set. + // * When the secondary resource record set is unhealthy, Route 53 responds + // to DNS queries with the applicable value from the primary resource record + // set regardless of the health of the primary resource record set. // // * If you omit the HealthCheckId element for the secondary resource record - // set, and if the primary resource record set is unhealthy, Amazon Route - // 53 always responds to DNS queries with the applicable value from the secondary - // resource record set. This is true regardless of the health of the associated - // endpoint. + // set, and if the primary resource record set is unhealthy, Route 53 always + // responds to DNS queries with the applicable value from the secondary resource + // record set. This is true regardless of the health of the associated endpoint. // // You can't create non-failover resource record sets that have the same values // for the Name and Type elements as failover resource record sets. @@ -12706,15 +12790,15 @@ type ResourceRecordSet struct { // For failover alias resource record sets, you must also include the EvaluateTargetHealth // element and set the value to true. // - // For more information about configuring failover for Amazon Route 53, see - // the following topics in the Amazon Route 53 Developer Guide: + // For more information about configuring failover for Route 53, see the following + // topics in the Amazon Route 53 Developer Guide: // - // * Amazon Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) // // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) Failover *string `type:"string" enum:"ResourceRecordSetFailover"` - // Geo location resource record sets only: A complex type that lets you control + // Geolocation resource record sets only: A complex type that lets you control // how Amazon Route 53 responds to DNS queries based on the geographic origin // of the query. For example, if you want all queries from Africa to be routed // to a web server with an IP address of 192.0.2.111, create a resource record @@ -12738,24 +12822,24 @@ type ResourceRecordSet struct { // // Geolocation works by mapping IP addresses to locations. However, some IP // addresses aren't mapped to geographic locations, so even if you create geolocation - // resource record sets that cover all seven continents, Amazon Route 53 will - // receive some DNS queries from locations that it can't identify. We recommend - // that you create a resource record set for which the value of CountryCode - // is *, which handles both queries that come from locations for which you haven't + // resource record sets that cover all seven continents, Route 53 will receive + // some DNS queries from locations that it can't identify. We recommend that + // you create a resource record set for which the value of CountryCode is *, + // which handles both queries that come from locations for which you haven't // created geolocation resource record sets and queries from IP addresses that // aren't mapped to a location. If you don't create a * resource record set, - // Amazon Route 53 returns a "no answer" response for queries from those locations. + // Route 53 returns a "no answer" response for queries from those locations. // // You can't create non-geolocation resource record sets that have the same // values for the Name and Type elements as geolocation resource record sets. GeoLocation *GeoLocation `type:"structure"` // If you want Amazon Route 53 to return this resource record set in response - // to a DNS query only when a health check is passing, include the HealthCheckId - // element and specify the ID of the applicable health check. + // to a DNS query only when the status of a health check is healthy, include + // the HealthCheckId element and specify the ID of the applicable health check. // - // Amazon Route 53 determines whether a resource record set is healthy based - // on one of the following: + // Route 53 determines whether a resource record set is healthy based on one + // of the following: // // * By periodically sending a request to the endpoint that is specified // in the health check @@ -12766,61 +12850,102 @@ type ResourceRecordSet struct { // * By determining the current state of a CloudWatch alarm (CloudWatch metric // health checks) // - // For more information, see How Amazon Route 53 Determines Whether an Endpoint - // Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html). - // - // The HealthCheckId element is only useful when Amazon Route 53 is choosing - // between two or more resource record sets to respond to a DNS query, and you - // want Amazon Route 53 to base the choice in part on the status of a health - // check. Configuring health checks only makes sense in the following configurations: - // - // * You're checking the health of the resource record sets in a group of - // weighted, latency, geolocation, or failover resource record sets, and - // you specify health check IDs for all of the resource record sets. If the - // health check for one resource record set specifies an endpoint that is - // not healthy, Amazon Route 53 stops responding to queries using the value - // for that resource record set. - // - // * You set EvaluateTargetHealth to true for the resource record sets in - // a group of alias, weighted alias, latency alias, geolocation alias, or - // failover alias resource record sets, and you specify health check IDs - // for all of the resource record sets that are referenced by the alias resource - // record sets. - // - // Amazon Route 53 doesn't check the health of the endpoint specified in the + // Route 53 doesn't check the health of the endpoint that is specified in the // resource record set, for example, the endpoint specified by the IP address // in the Value element. When you add a HealthCheckId element to a resource - // record set, Amazon Route 53 checks the health of the endpoint that you specified + // record set, Route 53 checks the health of the endpoint that you specified // in the health check. // - // For geolocation resource record sets, if an endpoint is unhealthy, Amazon - // Route 53 looks for a resource record set for the larger, associated geographic + // For more information, see the following topics in the Amazon Route 53 Developer + // Guide: + // + // * How Amazon Route 53 Determines Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // + // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // + // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // + // When to Specify HealthCheckId + // + // Specifying a value for HealthCheckId is useful only when Route 53 is choosing + // between two or more resource record sets to respond to a DNS query, and you + // want Route 53 to base the choice in part on the status of a health check. + // Configuring health checks makes sense only in the following configurations: + // + // * Non-alias resource record sets: You're checking the health of a group + // of non-alias resource record sets that have the same routing policy, name, + // and type (such as multiple weighted records named www.example.com with + // a type of A) and you specify health check IDs for all the resource record + // sets. + // + // If the health check status for a resource record set is healthy, Route 53 + // includes the record among the records that it responds to DNS queries + // with. + // + // If the health check status for a resource record set is unhealthy, Route + // 53 stops responding to DNS queries using the value for that resource record + // set. + // + // If the health check status for all resource record sets in the group is unhealthy, + // Route 53 considers all resource record sets in the group healthy and responds + // to DNS queries accordingly. + // + // * Alias resource record sets: You specify the following settings: + // + // You set EvaluateTargetHealth to true for an alias resource record set in + // a group of resource record sets that have the same routing policy, name, + // and type (such as multiple weighted records named www.example.com with + // a type of A). + // + // You configure the alias resource record set to route traffic to a non-alias + // resource record set in the same hosted zone. + // + // You specify a health check ID for the non-alias resource record set. + // + // If the health check status is healthy, Route 53 considers the alias resource + // record set to be healthy and includes the alias record among the records + // that it responds to DNS queries with. + // + // If the health check status is unhealthy, Route 53 stops responding to DNS + // queries using the alias resource record set. + // + // The alias resource record set can also route traffic to a group of non-alias + // resource record sets that have the same routing policy, name, and type. + // In that configuration, associate health checks with all of the resource + // record sets in the group of non-alias resource record sets. + // + // Geolocation Routing + // + // For geolocation resource record sets, if an endpoint is unhealthy, Route + // 53 looks for a resource record set for the larger, associated geographic // region. For example, suppose you have resource record sets for a state in - // the United States, for the United States, for North America, and for all + // the United States, for the entire United States, for North America, and a + // resource record set that has * for CountryCode is *, which applies to all // locations. If the endpoint for the state resource record set is unhealthy, - // Amazon Route 53 checks the resource record sets for the United States, for - // North America, and for all locations (a resource record set for which the - // value of CountryCode is *), in that order, until it finds a resource record - // set for which the endpoint is healthy. + // Route 53 checks for healthy resource record sets in the following order until + // it finds a resource record set for which the endpoint is healthy: + // + // * The United States + // + // * North America + // + // * The default resource record set + // + // Specifying the Health Check Endpoint by Domain Name // // If your health checks specify the endpoint only by domain name, we recommend // that you create a separate health check for each endpoint. For example, create // a health check for each HTTP server that is serving content for www.example.com. // For the value of FullyQualifiedDomainName, specify the domain name of the // server (such as us-east-2-www.example.com), not the name of the resource - // record sets (example.com). + // record sets (www.example.com). // - // n this configuration, if you create a health check for which the value of - // FullyQualifiedDomainName matches the name of the resource record sets and - // then associate the health check with those resource record sets, health check - // results will be unpredictable. - // - // For more information, see the following topics in the Amazon Route 53 Developer - // Guide: + // Health check results will be unpredictable if you do the following: // - // * Amazon Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // Create a health check that has the same value for FullyQualifiedDomainName + // as the name of a resource record set. // - // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // Associate that health check with the resource record set. HealthCheckId *string `type:"string"` // Multivalue answer resource record sets only: To route traffic approximately @@ -12833,17 +12958,17 @@ type ResourceRecordSet struct { // address only when the health check is healthy. // // * If you don't associate a health check with a multivalue answer record, - // Amazon Route 53 always considers the record to be healthy. + // Route 53 always considers the record to be healthy. // - // * Amazon Route 53 responds to DNS queries with up to eight healthy records; - // if you have eight or fewer healthy records, Amazon Route 53 responds to - // all DNS queries with all the healthy records. + // * Route 53 responds to DNS queries with up to eight healthy records; if + // you have eight or fewer healthy records, Route 53 responds to all DNS + // queries with all the healthy records. // - // * If you have more than eight healthy records, Amazon Route 53 responds - // to different DNS resolvers with different combinations of healthy records. + // * If you have more than eight healthy records, Route 53 responds to different + // DNS resolvers with different combinations of healthy records. // - // * When all records are unhealthy, Amazon Route 53 responds to DNS queries - // with up to eight unhealthy records. + // * When all records are unhealthy, Route 53 responds to DNS queries with + // up to eight unhealthy records. // // * If a resource becomes unavailable after a resolver caches a response, // client software typically tries another of the IP addresses in the response. @@ -12851,13 +12976,17 @@ type ResourceRecordSet struct { // You can't create multivalue answer alias records. MultiValueAnswer *bool `type:"boolean"` - // The name of the domain you want to perform the action on. + // For ChangeResourceRecordSets requests, the name of the record that you want + // to create, update, or delete. For ListResourceRecordSets responses, the name + // of a record in the specified hosted zone. + // + // ChangeResourceRecordSets Only // // Enter a fully qualified domain name, for example, www.example.com. You can // optionally include a trailing dot. If you omit the trailing dot, Amazon Route - // 53 still assumes that the domain name that you specify is fully qualified. - // This means that Amazon Route 53 treats www.example.com (without a trailing - // dot) and www.example.com. (with a trailing dot) as identical. + // 53 assumes that the domain name that you specify is fully qualified. This + // means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. + // (with a trailing dot) as identical. // // For information about how to specify characters other than a-z, 0-9, and // - (hyphen) and how to specify internationalized domain names, see DNS Domain @@ -12896,10 +13025,10 @@ type ResourceRecordSet struct { // zones is not supported. // // When Amazon Route 53 receives a DNS query for a domain name and type for - // which you have created latency resource record sets, Amazon Route 53 selects - // the latency resource record set that has the lowest latency between the end - // user and the associated Amazon EC2 Region. Amazon Route 53 then returns the - // value that is associated with the selected resource record set. + // which you have created latency resource record sets, Route 53 selects the + // latency resource record set that has the lowest latency between the end user + // and the associated Amazon EC2 Region. Route 53 then returns the value that + // is associated with the selected resource record set. // // Note the following: // @@ -12910,8 +13039,8 @@ type ResourceRecordSet struct { // EC2 Region. // // * You aren't required to create latency resource record sets for all Amazon - // EC2 Regions. Amazon Route 53 will choose the region with the best latency - // from among the regions that you create latency resource record sets for. + // EC2 Regions. Route 53 will choose the region with the best latency from + // among the regions that you create latency resource record sets for. // // * You can't create non-latency resource record sets that have the same // values for the Name and Type elements as latency resource record sets. @@ -12922,11 +13051,15 @@ type ResourceRecordSet struct { // If you're creating an alias resource record set, omit ResourceRecords. ResourceRecords []*ResourceRecord `locationNameList:"ResourceRecord" min:"1" type:"list"` - // Weighted, Latency, Geo, and Failover resource record sets only: An identifier + // Resource record sets that have a routing policy other than simple: An identifier // that differentiates among multiple resource record sets that have the same - // combination of DNS name and type. The value of SetIdentifier must be unique - // for each resource record set that has the same combination of DNS name and - // type. Omit SetIdentifier for any other types of record sets. + // combination of name and type, such as multiple weighted resource record sets + // named acme.example.com that have a type of A. In a group of resource record + // sets that have the same name and type, the value of SetIdentifier must be + // unique for each resource record set. + // + // For information about routing policies, see Choosing a Routing Policy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) + // in the Amazon Route 53 Developer Guide. SetIdentifier *string `min:"1" type:"string"` // The resource record cache time to live (TTL), in seconds. Note the following: @@ -12952,14 +13085,14 @@ type ResourceRecordSet struct { // When you create a traffic policy instance, Amazon Route 53 automatically // creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic - // policy instance that Amazon Route 53 created this resource record set for. + // policy instance that Route 53 created this resource record set for. // // To delete the resource record set that is associated with a traffic policy - // instance, use DeleteTrafficPolicyInstance. Amazon Route 53 will delete the - // resource record set automatically. If you delete the resource record set - // by using ChangeResourceRecordSets, Amazon Route 53 doesn't automatically - // delete the traffic policy instance, and you'll continue to be charged for - // it even though it's no longer in use. + // instance, use DeleteTrafficPolicyInstance. Route 53 will delete the resource + // record set automatically. If you delete the resource record set by using + // ChangeResourceRecordSets, Route 53 doesn't automatically delete the traffic + // policy instance, and you'll continue to be charged for it even though it's + // no longer in use. TrafficPolicyInstanceId *string `min:"1" type:"string"` // The DNS record type. For information about different record types and how @@ -13005,16 +13138,22 @@ type ResourceRecordSet struct { // the resource record set that you're creating the alias for. All values // are supported except NS and SOA. // + // If you're creating an alias record that has the same name as the hosted zone + // (known as the zone apex), you can't route traffic to a record for which + // the value of Type is CNAME. This is because the alias record must have + // the same type as the record you're routing traffic to, and creating a + // CNAME record for the zone apex isn't supported even for an alias record. + // // Type is a required field Type *string `type:"string" required:"true" enum:"RRType"` // Weighted resource record sets only: Among resource record sets that have // the same combination of DNS name and type, a value that determines the proportion // of DNS queries that Amazon Route 53 responds to using the current resource - // record set. Amazon Route 53 calculates the sum of the weights for the resource - // record sets that have the same combination of DNS name and type. Amazon Route - // 53 then responds to queries based on the ratio of a resource's weight to - // the total. Note the following: + // record set. Route 53 calculates the sum of the weights for the resource record + // sets that have the same combination of DNS name and type. Route 53 then responds + // to queries based on the ratio of a resource's weight to the total. Note the + // following: // // * You must specify a value for the Weight element for every weighted resource // record set. @@ -13030,16 +13169,14 @@ type ResourceRecordSet struct { // the same values for the Name and Type elements. // // * For weighted (but not weighted alias) resource record sets, if you set - // Weight to 0 for a resource record set, Amazon Route 53 never responds - // to queries with the applicable value for that resource record set. However, - // if you set Weight to 0 for all resource record sets that have the same - // combination of DNS name and type, traffic is routed to all resources with - // equal probability. + // Weight to 0 for a resource record set, Route 53 never responds to queries + // with the applicable value for that resource record set. However, if you + // set Weight to 0 for all resource record sets that have the same combination + // of DNS name and type, traffic is routed to all resources with equal probability. // // The effect of setting Weight to 0 is different when you associate health // checks with weighted resource record sets. For more information, see Options - // for Configuring Amazon Route 53 Active-Active and Active-Passive Failover - // (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) + // for Configuring Route 53 Active-Active and Active-Passive Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) // in the Amazon Route 53 Developer Guide. Weight *int64 `type:"long"` } @@ -13372,6 +13509,13 @@ type TestDNSAnswerInput struct { // and 24 for edns0clientsubnetmask, the checking tool will simulate a request // from 192.0.2.0/24. The default value is 24 bits for IPv4 addresses and 64 // bits for IPv6 addresses. + // + // The range of valid values depends on whether edns0clientsubnetip is an IPv4 + // or an IPv6 address: + // + // * IPv4: Specify a value between 0 and 32 + // + // * IPv6: Specify a value between 0 and 128 EDNS0ClientSubnetMask *string `location:"querystring" locationName:"edns0clientsubnetmask" type:"string"` // The ID of the hosted zone that you want Amazon Route 53 to simulate a query @@ -13665,14 +13809,14 @@ type TrafficPolicyInstance struct { // The value of State is one of the following values: // // AppliedAmazon Route 53 has finished creating resource record sets, and changes - // have propagated to all Amazon Route 53 edge locations. + // have propagated to all Route 53 edge locations. // - // CreatingAmazon Route 53 is creating the resource record sets. Use GetTrafficPolicyInstance + // CreatingRoute 53 is creating the resource record sets. Use GetTrafficPolicyInstance // to confirm that the CreateTrafficPolicyInstance request completed successfully. // - // FailedAmazon Route 53 wasn't able to create or update the resource record - // sets. When the value of State is Failed, see Message for an explanation of - // what caused the request to fail. + // FailedRoute 53 wasn't able to create or update the resource record sets. + // When the value of State is Failed, see Message for an explanation of what + // caused the request to fail. // // State is a required field State *string `type:"string" required:"true"` @@ -13845,14 +13989,35 @@ type UpdateHealthCheckInput struct { _ struct{} `locationName:"UpdateHealthCheckRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether this health check is - // healthy. + // Route 53 health checkers to use to determine whether the specified health + // check is healthy. AlarmIdentifier *AlarmIdentifier `type:"structure"` // A complex type that contains one ChildHealthCheck element for each health // check that you want to associate with a CALCULATED health check. ChildHealthChecks []*string `locationNameList:"ChildHealthCheck" type:"list"` + // Stops Route 53 from performing health checks. When you disable a health check, + // here's what happens: + // + // * Health checks that check the health of endpoints: Route 53 stops submitting + // requests to your application, server, or other resource. + // + // * Calculated health checks: Route 53 stops aggregating the status of the + // referenced health checks. + // + // * Health checks that monitor CloudWatch alarms: Route 53 stops monitoring + // the corresponding CloudWatch metrics. + // + // After you disable a health check, Route 53 considers the status of the health + // check to always be healthy. If you configured DNS failover, Route 53 continues + // to route traffic to the corresponding resources. If you want to stop routing + // traffic to a resource, change the value of UpdateHealthCheckRequest$Inverted. + // + // Charges for a health check still apply when the health check is disabled. + // For more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/). + Disabled *bool `type:"boolean"` + // Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName // to the endpoint in the client_hello message during TLS negotiation. This // allows the endpoint to respond to HTTPS health check requests with the applicable @@ -13893,42 +14058,40 @@ type UpdateHealthCheckInput struct { // // If you specify a value forIPAddress: // - // Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 - // address and passes the value of FullyQualifiedDomainName in the Host header - // for all health checks except TCP health checks. This is typically the fully - // qualified DNS name of the endpoint on which you want Amazon Route 53 to perform - // health checks. + // Route 53 sends health check requests to the specified IPv4 or IPv6 address + // and passes the value of FullyQualifiedDomainName in the Host header for all + // health checks except TCP health checks. This is typically the fully qualified + // DNS name of the endpoint on which you want Route 53 to perform health checks. // - // When Amazon Route 53 checks the health of an endpoint, here is how it constructs + // When Route 53 checks the health of an endpoint, here is how it constructs // the Host header: // // * If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for - // Type, Amazon Route 53 passes the value of FullyQualifiedDomainName to - // the endpoint in the Host header. + // Type, Route 53 passes the value of FullyQualifiedDomainName to the endpoint + // in the Host header. // // * If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH - // for Type, Amazon Route 53 passes the value of FullyQualifiedDomainName - // to the endpoint in the Host header. + // for Type, Route 53 passes the value of FullyQualifiedDomainName to the + // endpoint in the Host header. // // * If you specify another value for Port and any value except TCP for Type, - // Amazon Route 53 passes FullyQualifiedDomainName:Port to the endpoint in - // the Host header. + // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host + // header. // - // If you don't specify a value for FullyQualifiedDomainName, Amazon Route 53 - // substitutes the value of IPAddress in the Host header in each of the above - // cases. + // If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes + // the value of IPAddress in the Host header in each of the above cases. // // If you don't specify a value forIPAddress: // - // If you don't specify a value for IPAddress, Amazon Route 53 sends a DNS request + // If you don't specify a value for IPAddress, Route 53 sends a DNS request // to the domain that you specify in FullyQualifiedDomainName at the interval // you specify in RequestInterval. Using an IPv4 address that is returned by - // DNS, Amazon Route 53 then checks the health of the endpoint. + // DNS, Route 53 then checks the health of the endpoint. // - // If you don't specify a value for IPAddress, Amazon Route 53 uses only IPv4 - // to send health checks to the endpoint. If there's no resource record set - // with a type of A for the name that you specify for FullyQualifiedDomainName, - // the health check fails with a "DNS resolution failed" error. + // If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send + // health checks to the endpoint. If there's no resource record set with a type + // of A for the name that you specify for FullyQualifiedDomainName, the health + // check fails with a "DNS resolution failed" error. // // If you want to check the health of weighted, latency, or failover resource // record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, @@ -13943,9 +14106,9 @@ type UpdateHealthCheckInput struct { // with those resource record sets, health check results will be unpredictable. // // In addition, if the value of Type is HTTP, HTTPS, HTTP_STR_MATCH, or HTTPS_STR_MATCH, - // Amazon Route 53 passes the value of FullyQualifiedDomainName in the Host - // header, as it does when you specify a value for IPAddress. If the value of - // Type is TCP, Amazon Route 53 doesn't pass a Host header. + // Route 53 passes the value of FullyQualifiedDomainName in the Host header, + // as it does when you specify a value for IPAddress. If the value of Type is + // TCP, Route 53 doesn't pass a Host header. FullyQualifiedDomainName *string `type:"string"` // The ID for the health check for which you want detailed information. When @@ -13961,15 +14124,14 @@ type UpdateHealthCheckInput struct { // We recommend that you use GetHealthCheck or ListHealthChecks to get the current // value of HealthCheckVersion for the health check that you want to update, // and that you include that value in your UpdateHealthCheck request. This prevents - // Amazon Route 53 from overwriting an intervening update: + // Route 53 from overwriting an intervening update: // // * If the value in the UpdateHealthCheck request matches the value of HealthCheckVersion - // in the health check, Amazon Route 53 updates the health check with the - // new settings. + // in the health check, Route 53 updates the health check with the new settings. // // * If the value of HealthCheckVersion in the health check is greater, the - // health check was changed after you got the version number. Amazon Route - // 53 does not update the health check, and it returns a HealthCheckVersionMismatch + // health check was changed after you got the version number. Route 53 does + // not update the health check, and it returns a HealthCheckVersionMismatch // error. HealthCheckVersion *int64 `min:"1" type:"long"` @@ -13982,18 +14144,18 @@ type UpdateHealthCheckInput struct { // Note the following: // // * If you specify a number greater than the number of child health checks, - // Amazon Route 53 always considers this health check to be unhealthy. + // Route 53 always considers this health check to be unhealthy. // - // * If you specify 0, Amazon Route 53 always considers this health check - // to be healthy. + // * If you specify 0, Route 53 always considers this health check to be + // healthy. HealthThreshold *int64 `type:"integer"` // The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 // to perform health checks on. If you don't specify a value for IPAddress, - // Amazon Route 53 sends a DNS request to resolve the domain name that you specify + // Route 53 sends a DNS request to resolve the domain name that you specify // in FullyQualifiedDomainName at the interval that you specify in RequestInterval. - // Using an IP address that is returned by DNS, Amazon Route 53 then checks - // the health of the endpoint. + // Using an IP address that is returned by DNS, Route 53 then checks the health + // of the endpoint. // // Use one of the following formats for the value of IPAddress: // @@ -14022,9 +14184,9 @@ type UpdateHealthCheckInput struct { // // For more information, see UpdateHealthCheckRequest$FullyQualifiedDomainName. // - // Constraints: Amazon Route 53 can't check the health of endpoints for which - // the IP address is in local, private, non-routable, or multicast ranges. For - // more information about IP addresses for which you can't create health checks, + // Constraints: Route 53 can't check the health of endpoints for which the IP + // address is in local, private, non-routable, or multicast ranges. For more + // information about IP addresses for which you can't create health checks, // see the following documents: // // * RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) @@ -14037,14 +14199,14 @@ type UpdateHealthCheckInput struct { // When CloudWatch has insufficient data about the metric to determine the alarm // state, the status that you want Amazon Route 53 to assign to the health check: // - // * Healthy: Amazon Route 53 considers the health check to be healthy. + // * Healthy: Route 53 considers the health check to be healthy. // - // * Unhealthy: Amazon Route 53 considers the health check to be unhealthy. + // * Unhealthy: Route 53 considers the health check to be unhealthy. // - // * LastKnownStatus: Amazon Route 53 uses the status of the health check - // from the last time CloudWatch had sufficient data to determine the alarm - // state. For new health checks that have no last known status, the default - // status for the health check is healthy. + // * LastKnownStatus: Route 53 uses the status of the health check from the + // last time CloudWatch had sufficient data to determine the alarm state. + // For new health checks that have no last known status, the default status + // for the health check is healthy. InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` // Specify whether you want Amazon Route 53 to invert the status of a health @@ -14067,27 +14229,27 @@ type UpdateHealthCheckInput struct { // * ChildHealthChecks: Amazon Route 53 resets HealthCheckConfig$ChildHealthChecks // to null. // - // * FullyQualifiedDomainName: Amazon Route 53 resets HealthCheckConfig$FullyQualifiedDomainName + // * FullyQualifiedDomainName: Route 53 resets HealthCheckConfig$FullyQualifiedDomainName // to null. // - // * Regions: Amazon Route 53 resets the HealthCheckConfig$Regions list to - // the default set of regions. + // * Regions: Route 53 resets the HealthCheckConfig$Regions list to the default + // set of regions. // - // * ResourcePath: Amazon Route 53 resets HealthCheckConfig$ResourcePath - // to null. + // * ResourcePath: Route 53 resets HealthCheckConfig$ResourcePath to null. ResetElements []*string `locationNameList:"ResettableElementName" type:"list"` // The path that you want Amazon Route 53 to request when performing health // checks. The path can be any value for which your endpoint will return an // HTTP status code of 2xx or 3xx when the endpoint is healthy, for example - // the file /docs/route53-health-check.html. + // the file /docs/route53-health-check.html. You can also include query string + // parameters, for example, /welcome.html?language=jp&login=y. // // Specify this value only if you want to change it. ResourcePath *string `type:"string"` // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that // you want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Amazon Route 53 considers + // resource. If the string appears in the response body, Route 53 considers // the resource healthy. (You can't change the value of Type when you update // a health check.) SearchString *string `type:"string"` @@ -14145,6 +14307,12 @@ func (s *UpdateHealthCheckInput) SetChildHealthChecks(v []*string) *UpdateHealth return s } +// SetDisabled sets the Disabled field's value. +func (s *UpdateHealthCheckInput) SetDisabled(v bool) *UpdateHealthCheckInput { + s.Disabled = &v + return s +} + // SetEnableSNI sets the EnableSNI field's value. func (s *UpdateHealthCheckInput) SetEnableSNI(v bool) *UpdateHealthCheckInput { s.EnableSNI = &v @@ -14232,8 +14400,7 @@ func (s *UpdateHealthCheckInput) SetSearchString(v string) *UpdateHealthCheckInp type UpdateHealthCheckOutput struct { _ struct{} `type:"structure"` - // A complex type that contains information about one health check that is associated - // with the current AWS account. + // A complex type that contains the response to an UpdateHealthCheck request. // // HealthCheck is a required field HealthCheck *HealthCheck `type:"structure" required:"true"` @@ -14309,7 +14476,8 @@ func (s *UpdateHostedZoneCommentInput) SetId(v string) *UpdateHostedZoneCommentI type UpdateHostedZoneCommentOutput struct { _ struct{} `type:"structure"` - // A complex type that contains general information about the hosted zone. + // A complex type that contains the response to the UpdateHostedZoneComment + // request. // // HostedZone is a required field HostedZone *HostedZone `type:"structure" required:"true"` @@ -14562,7 +14730,7 @@ type VPC struct { // (Private hosted zones only) The ID of an Amazon VPC. VPCId *string `type:"string"` - // (Private hosted zones only) The region in which you created an Amazon VPC. + // (Private hosted zones only) The region that an Amazon VPC was created in. VPCRegion *string `min:"1" type:"string" enum:"VPCRegion"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go index d37e10cdebd..a2e70bfc622 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go @@ -66,8 +66,8 @@ const ( // You can create a hosted zone that has the same name as an existing hosted // zone (example.com is common), but there is a limit to the number of hosted // zones that have the same name. If you get this error, Amazon Route 53 has - // reached that limit. If you own the domain name and Amazon Route 53 generates - // this error, contact Customer Support. + // reached that limit. If you own the domain name and Route 53 generates this + // error, contact Customer Support. ErrCodeDelegationSetNotAvailable = "DelegationSetNotAvailable" // ErrCodeDelegationSetNotReusable for service response error code @@ -239,14 +239,13 @@ const ( // ErrCodeNoSuchGeoLocation for service response error code // "NoSuchGeoLocation". // - // Amazon Route 53 doesn't support the specified geolocation. + // Amazon Route 53 doesn't support the specified geographic location. ErrCodeNoSuchGeoLocation = "NoSuchGeoLocation" // ErrCodeNoSuchHealthCheck for service response error code // "NoSuchHealthCheck". // - // No health check exists with the ID that you specified in the DeleteHealthCheck - // request. + // No health check exists with the specified ID. ErrCodeNoSuchHealthCheck = "NoSuchHealthCheck" // ErrCodeNoSuchHostedZone for service response error code @@ -285,8 +284,8 @@ const ( // // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an - // HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly - // for the same request, we recommend that you wait, in intervals of increasing + // HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for + // the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. ErrCodePriorRequestNotComplete = "PriorRequestNotComplete" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index 5c88b431470..9a044eaf2de 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -11234,6 +11234,32 @@ type AssociationDescription struct { // The date when the association was last updated. LastUpdateAssociationDate *time.Time `type:"timestamp"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the Systems Manager document. Name *string `type:"string"` @@ -11320,6 +11346,18 @@ func (s *AssociationDescription) SetLastUpdateAssociationDate(v time.Time) *Asso return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *AssociationDescription) SetMaxConcurrency(v string) *AssociationDescription { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *AssociationDescription) SetMaxErrors(v string) *AssociationDescription { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *AssociationDescription) SetName(v string) *AssociationDescription { s.Name = &v @@ -11875,6 +11913,32 @@ type AssociationVersionInfo struct { // was created. DocumentVersion *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name specified when the association was created. Name *string `type:"string"` @@ -11934,6 +11998,18 @@ func (s *AssociationVersionInfo) SetDocumentVersion(v string) *AssociationVersio return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *AssociationVersionInfo) SetMaxConcurrency(v string) *AssociationVersionInfo { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *AssociationVersionInfo) SetMaxErrors(v string) *AssociationVersionInfo { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *AssociationVersionInfo) SetName(v string) *AssociationVersionInfo { s.Name = &v @@ -14028,6 +14104,32 @@ type CreateAssociationBatchRequestEntry struct { // The ID of the instance. InstanceId *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the configuration document. // // Name is a required field @@ -14059,6 +14161,12 @@ func (s CreateAssociationBatchRequestEntry) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAssociationBatchRequestEntry) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAssociationBatchRequestEntry"} + if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) + } + if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -14105,6 +14213,18 @@ func (s *CreateAssociationBatchRequestEntry) SetInstanceId(v string) *CreateAsso return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *CreateAssociationBatchRequestEntry) SetMaxConcurrency(v string) *CreateAssociationBatchRequestEntry { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *CreateAssociationBatchRequestEntry) SetMaxErrors(v string) *CreateAssociationBatchRequestEntry { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *CreateAssociationBatchRequestEntry) SetName(v string) *CreateAssociationBatchRequestEntry { s.Name = &v @@ -14148,6 +14268,32 @@ type CreateAssociationInput struct { // The instance ID. InstanceId *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the Systems Manager document. // // Name is a required field @@ -14179,6 +14325,12 @@ func (s CreateAssociationInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAssociationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAssociationInput"} + if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) + } + if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -14225,6 +14377,18 @@ func (s *CreateAssociationInput) SetInstanceId(v string) *CreateAssociationInput return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *CreateAssociationInput) SetMaxConcurrency(v string) *CreateAssociationInput { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *CreateAssociationInput) SetMaxErrors(v string) *CreateAssociationInput { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *CreateAssociationInput) SetName(v string) *CreateAssociationInput { s.Name = &v @@ -17048,6 +17212,7 @@ type DescribeInstanceInformationInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of instances. + // You can filter on Amazon EC2 tag. Specify tags by using a key-value mapping. Filters []*InstanceInformationStringFilter `type:"list"` // This is a legacy method. We recommend that you don't use this method. Instead, @@ -17485,8 +17650,7 @@ type DescribeInstancePatchesOutput struct { // // Severity (string) // - // State (string: "INSTALLED", "INSTALLED OTHER", "MISSING", "NOT APPLICABLE", - // "FAILED") + // State (string, such as "INSTALLED" or "FAILED") // // InstalledTime (DateTime) // @@ -18869,7 +19033,7 @@ type DescribePatchGroupStateOutput struct { InstancesWithInstalledPatches *int64 `type:"integer"` // The number of instances with patches installed that are specified in a RejectedPatches - // list. Patches with a status of InstalledRejected were typically installed + // list. Patches with a status of INSTALLED_REJECTED were typically installed // before they were added to a RejectedPatches list. // // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, @@ -27483,8 +27647,10 @@ type PatchComplianceData struct { // Severity is a required field Severity *string `type:"string" required:"true"` - // The state of the patch on the instance (INSTALLED, INSTALLED_OTHER, MISSING, - // NOT_APPLICABLE or FAILED). + // The state of the patch on the instance, such as INSTALLED or FAILED. + // + // For descriptions of each patch state, see About Patch Compliance (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch) + // in the AWS Systems Manager User Guide. // // State is a required field State *string `type:"string" required:"true" enum:"PatchComplianceDataState"` @@ -29398,7 +29564,7 @@ func (s *RegisterTaskWithMaintenanceWindowInput) SetWindowId(v string) *Register type RegisterTaskWithMaintenanceWindowOutput struct { _ struct{} `type:"structure"` - // The id of the task in the Maintenance Window. + // The ID of the task in the Maintenance Window. WindowTaskId *string `min:"36" type:"string"` } @@ -31618,6 +31784,32 @@ type UpdateAssociationInput struct { // The document version you want update for the association. DocumentVersion *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the association document. Name *string `type:"string"` @@ -31651,6 +31843,12 @@ func (s *UpdateAssociationInput) Validate() error { if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } + if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) + } + if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) + } if s.ScheduleExpression != nil && len(*s.ScheduleExpression) < 1 { invalidParams.Add(request.NewErrParamMinLen("ScheduleExpression", 1)) } @@ -31700,6 +31898,18 @@ func (s *UpdateAssociationInput) SetDocumentVersion(v string) *UpdateAssociation return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *UpdateAssociationInput) SetMaxConcurrency(v string) *UpdateAssociationInput { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *UpdateAssociationInput) SetMaxErrors(v string) *UpdateAssociationInput { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *UpdateAssociationInput) SetName(v string) *UpdateAssociationInput { s.Name = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go index e2e4418c4c9..a09a5748ec1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go @@ -5058,6 +5058,12 @@ const ( // ComputeGraphics is a Compute enum value ComputeGraphics = "GRAPHICS" + + // ComputePowerpro is a Compute enum value + ComputePowerpro = "POWERPRO" + + // ComputeGraphicspro is a Compute enum value + ComputeGraphicspro = "GRAPHICSPRO" ) const ( diff --git a/vendor/vendor.json b/vendor/vendor.json index 2b0f3b5e363..53eac700d5b 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -47,1036 +47,1042 @@ "versionExact": "v1.0.0" }, { - "checksumSHA1": "NTMpg2d3Yl053jP8gt+Qk7qq9UU=", + "checksumSHA1": "juV8cnBAi9LbkxcO5lZRfllVUVg=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "I87y3G8r14yKZQ5NlkupFUJ5jW0=", + "checksumSHA1": "LlEV33B7msty2K/j0VGLWhIg9pk=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "1pENtl2K9hG7qoB7R6J7dAHa82g=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "KZylhHa5CQP8deDHphHMU2tUr3o=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "7AmyyJXVkMdmy8dphC3Nalx5XkI=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "mYqgKOMSGvLmrt0CoBNbqdcTM3c=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "WGg5z1n2JGCf7YIwtwlhn30svbo=", + "checksumSHA1": "3MtxIK+7szCioe670uB7HlXt0lQ=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "+pDu3wk2/RDNjelVs3KE+03GqII=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "Y7aklChDDsoRKhEIX/ACPnarw28=", + "checksumSHA1": "0GuwwqMsJcLgs2fvnupT8CP8BP4=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "gQ1sGIVnPqvvxa9Ww2g/PGkk16M=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" + }, + { + "checksumSHA1": "2JuSiDJMqtkJMVzOvv6vCCaHWKo=", + "path": "github.com/aws/aws-sdk-go/internal/ini", + "revision": "027c0bda560ef6bae8e84a3fd91d9863129329a7", + "revisionTime": "2018-10-23T20:09:33Z" }, { "checksumSHA1": "QvKGojx+wCHTDfXQ1aoOYzH3Y88=", "path": "github.com/aws/aws-sdk-go/internal/s3err", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", "path": "github.com/aws/aws-sdk-go/internal/sdkuri", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "LjfJ5ydXdiSuQixC+HrmSZjW3NU=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "NHfa9brYkChSmKiBcKe+xMaJzlc=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "0cZnOaE1EcFUuiu4bdHV2k7slQg=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "tXRIRarT7qepHconxydtO7mXod4=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "v2c4B7IgTyjl7ShytqbTOqhCIoM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "lj56XJFI2OSp+hEOrFZ+eiEi/yM=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "S7NJNuKPbT+a9/zk9qC1/zZAHLM=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "ZZgzuZoMphxAf8wwz9QqpSQdBGc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "soXVJWQ/xvEB72Mo6FresaQIxLg=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "V5YPKdVv7D3cpcfO2gecYoB4+0E=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "TekD25t+ErY7ep0VSZU1RbOuAhg=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "QwCxwPjJNN4q4nhym3RcX80AHW4=", + "checksumSHA1": "Nqzsk16UhXLuwQYjWWLBiqc6yM4=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "AAv5tgpGyzpzwfftoAJnudq2334=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "4GehXfXvsfsv903OjmzEQskC2Z4=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "62J/tLeZX36VfFPh5+gCrH9kh/E=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "zuBvjLwdQ32/GXiMN8tbB6sX+Jk=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "n4HcNMas1d6LTxYVWwzamt9e/JY=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "QggGqwfJU9p9vk0Rc2GdQL5MwMk=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "VatUlbTYWJxikHDG/XnfIgejXtI=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "GwbK865fFiarZoSSzSbVqcJwuL4=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "PZHlzkNYMSasi//Us6Eguq/rz48=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "36H7Vj7tRy/x0zvKjXZxuOhZ4zk=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "tOw80eNTNpvIpMRVBr9oRjLcQ58=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "qWajWS3eZiZUIW1c2C3nH4tC+TI=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "YsLO1gRTLh3f+c3TdsYs0WqHUKo=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "Np97rnL0sh65BKa/nnoAi0UMb1U=", + "checksumSHA1": "OF5katFgWJVanCOPAwiIsAS/Fqs=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "9Cxvnmqh2j0dX5OFoHOu5cePz1Y=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "FKWSs5Dezkgw45cO9tXo+n1D+2w=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "9uVTrIQWdmX4oWxLYOB6QHf7mdo=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "zJdKvz7MomKCn752Wizv3OkecrI=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Rj1HnUmX+z8y0dCh1c0QpMwAq38=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "cJY0EMAnPPjmLHW6BepTS4yrI/g=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "s2S+xgdxmt4yjviWgRzgX8Tk2pE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "ZyFu15gDzimylooj/DMnKc9PmUc=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "9BbhiZSlvXF8toLc1hjfa9SMU6M=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "af9EdSqDMCYQElRwv6JyhNIusQo=", "path": "github.com/aws/aws-sdk-go/service/datapipeline", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "E2PzR2gdjvKrUoxFlf5Recjd604=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "4bC9kZGFPtYITOw8jTdVFpJPNkM=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "d2cEBjI/sgDnWEzHtwkTqu7NS5Y=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "SMFibYGCd4yJfI7cV6m5hsA0DdU=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Sry+6J6O/Vi5Z6RvL40uu6Kb9KM=", "path": "github.com/aws/aws-sdk-go/service/dlm", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Ca+Lj+lYT1bFPmFqRFse3jtH1QA=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "Cr+HUNBOotDvCYRZOjQJl/vg0yg=", + "checksumSHA1": "6Uy8wzYUhhAEBIFgGQZrL0xzPR0=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Ib0Plp1+0bdv4RlTvyTjJY38drE=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "4QRd6sbMxvfIit9c1408cXvYoPA=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "8ea7fZjeKLrp8d0H2oPJt+CmAEk=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "zvWXQTNt4mA58PUlswztK+aniv0=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "UR7K4m62MzrSPEB4KLLEQOsJ4mw=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "iRZ8TBVI03KJhe3usx8HZH+hz7Q=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Xv5k/JHJ+CsuyUCc5SoENm2r8w4=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "apL29Unu7vIxb5VgA+HWW0nm1v0=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "f5/ev7DpX3Fn2Qg12TG8+aXX8Ek=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "SozrDFhzpIRmVf6xcx2OgsNSONE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Kv3fpVUq/lOmilTffzAnRQ/5yPk=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "BSlqxRfmXlzZyImxHw7UHGUuSj0=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "lAJmnDWbMBwbWp2LNj+EgoK44Gw=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "VOSOe2McOhEVDSfRAz7OM5stigI=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "BkSoTPbLpV9Ov9iVpuBRJv9j8+s=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "c7np8hnSiXMs/bPuMFV/w7KYcOg=", + "checksumSHA1": "5kEA8EUoVwodknTHutskiCfu4+c=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "a8UUqzlic1ljsDtjTH97ShjzFIY=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "xke6oymAAPvAuHxEm2eWp+mdaaw=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "dCgpJF6pCWT7O0Q+VW2MKFXA5FU=", + "checksumSHA1": "0EmBq5ipRFEW1qSToFlBP6WmRyA=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "HSvJfXlGnhV+mKWxQaoJWnjFk1E=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "BqFgvuCkO8U2SOLpzBEWAwkSwL0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "o92noObpHXdSONAKlSCjmheNal0=", "path": "github.com/aws/aws-sdk-go/service/kinesisanalytics", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "ac/mCyWnYF9Br3WPYQcAOYGxCFc=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "S/ofAFO461yHy/kcnkxDWRxN/5g=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "R8gYQx1m4W1Z8GXwFz10Y9eFkpc=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "5BcOlcEph0K5MlSm/0DGWYpa1B8=", + "checksumSHA1": "cfjEDPewt2E9YL4o2VxVLVxI8qo=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "RVGzBxEeU2U6tmIWIsK4HNCYOig=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "u4Z65p7SrBA7407CU/4tKzpDPBA=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "Y7nzN30rW1YS5GdDEB1iu9NtcMk=", + "checksumSHA1": "s6ddzZb4HxhgfVLHPZS8MD2POEA=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "rzfEIwVWz0hJQB9Mzl9y4s/TWpk=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "PI4HQYFv1c30dZh4O4CpuxC1sc8=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "+0XY+KB+iYfpkMAFLq2ufccYTxk=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "QzXXaK3Wp4dyew5yPBf6vvthDrU=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "y1mGrPJlPShO/yOagp/iFRyHMtg=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "ZkfCVW7M7hCcVhk4wUPOhIhfKm0=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "jbeiGywfS9eq+sgkpYdTSG1+6OY=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "W19YWtdLN9JEwQD9ZZhRY/1JpEE=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "xKY1N27xgmGIfx4qRKsuPRzhY4Q=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "NFVVns8ZmIdoU33y0tjbMEYZ6Y8=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "Xx8T0QmW/MaImDRDsPEwCGNZhOA=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "vlVK2K/SLM4CXTxnpMK9MDVGjrg=", + "checksumSHA1": "vn3OhTeWgYQMFDZ+iRuNa1EzNg8=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "yDbIw+lVcsmjyom0xI+8khZNy6o=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "XLR/Cf875+1mFrioTjpObEsQaM0=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "z61JVAuqczhmLFSS/p/TYlEPyyI=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "8fuk2Uppm5zHqEYhOsVmaW4MKKw=", "path": "github.com/aws/aws-sdk-go/service/serverlessapplicationrepository", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "4ezrsNPbLKvC7R7CRRdxkfqEXa0=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "+EZbk9VlvYV1bAT3NNHu3krvlvg=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "pq0s/7ZYvscjU6DHFxrasIIcu/o=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "/Ln2ZFfKCZq8hqfr613XO8ZpnRs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "g6KVAXiGpvaHGM6bOf5OBkvWRb4=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "nQ9M0Vf1QD+1fV9btS7o8SXZ2Bw=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "5nHvnLQSvF4JOtXu/hi+iZOVfak=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "rjhyLklllbyziCrIcimq8CIJKiE=", + "checksumSHA1": "ktOnBd+1R6ZmpHfvOVqY12EZ4qU=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "+oRYFnGRYOqZGZcQ0hrOONtGH/k=", "path": "github.com/aws/aws-sdk-go/service/storagegateway", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "35a/vm5R/P68l/hQD55GqviO6bg=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "hTDzNXqoUUS81wwttkD8My6MstI=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "PR55l/umJd2tTXH03wDMA65g1gA=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "ySJkBXUzoWccGDdjChs4MLB1L0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { - "checksumSHA1": "uhOc1/uS+mzb/LbLgu6U/tr4ofg=", + "checksumSHA1": "qw268ecBeOnv8xhMUPzFTQ8uoYI=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "572272ee7c4503c8a32f79ec16b959c9e8a211c3", - "revisionTime": "2018-10-15T21:27:18Z", - "version": "v1.15.55", - "versionExact": "v1.15.55" + "revision": "9a79cc876234949427d966249a09fc98e7864bde", + "revisionTime": "2018-10-23T20:09:22Z", + "version": "v1.15.61", + "versionExact": "v1.15.61" }, { "checksumSHA1": "yBBHqv7DvZNsZdF00SO8PbEQAKU=", From 41c5c4b4c7e0060420a5945d41bbb40a4b0536d8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Wed, 24 Oct 2018 09:40:43 -0400 Subject: [PATCH 2983/3316] Use a single Amazon-side ASN validator. --- aws/resource_aws_dx_gateway.go | 2 +- aws/resource_aws_vpn_gateway.go | 2 +- aws/validators.go | 18 +------------ aws/validators_test.go | 46 +++------------------------------ 4 files changed, 6 insertions(+), 62 deletions(-) diff --git a/aws/resource_aws_dx_gateway.go b/aws/resource_aws_dx_gateway.go index c8c8cba21c3..aa33602be37 100644 --- a/aws/resource_aws_dx_gateway.go +++ b/aws/resource_aws_dx_gateway.go @@ -31,7 +31,7 @@ func resourceAwsDxGateway() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateDxGatewayAmazonSideAsn, + ValidateFunc: validateAmazonSideAsn, }, }, diff --git a/aws/resource_aws_vpn_gateway.go b/aws/resource_aws_vpn_gateway.go index 0a1ef959891..57ed8a58605 100644 --- a/aws/resource_aws_vpn_gateway.go +++ b/aws/resource_aws_vpn_gateway.go @@ -35,7 +35,7 @@ func resourceAwsVpnGateway() *schema.Resource { Optional: true, ForceNew: true, Computed: true, - ValidateFunc: validateVpnGatewayAmazonSideAsn, + ValidateFunc: validateAmazonSideAsn, }, "vpc_id": { diff --git a/aws/validators.go b/aws/validators.go index 6eb63cd78ea..789f3bfcbb3 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -1743,7 +1743,7 @@ func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { return nil } -func validateVpnGatewayAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { +func validateAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { value := v.(string) // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpnGateway.html @@ -1764,22 +1764,6 @@ func validateVpnGatewayAmazonSideAsn(v interface{}, k string) (ws []string, erro return } -func validateDxGatewayAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // https://docs.aws.amazon.com/directconnect/latest/APIReference/API_CreateDirectConnectGateway.html - asn, err := strconv.ParseInt(value, 10, 64) - if err != nil { - errors = append(errors, fmt.Errorf("%q (%q) must be a 64-bit integer", k, v)) - return - } - - if (asn < 64512) || (asn > 65534 && asn < 4200000000) || (asn > 4294967294) { - errors = append(errors, fmt.Errorf("%q (%q) must be in the range 64512 to 65534 or 4200000000 to 4294967294", k, v)) - } - return -} - func validateIotThingTypeName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`[a-zA-Z0-9:_-]+`).MatchString(value) { diff --git a/aws/validators_test.go b/aws/validators_test.go index 3d233c5f9c9..d7950d7548c 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -2544,7 +2544,7 @@ func TestValidateCognitoUserPoolId(t *testing.T) { } } -func TestValidateVpnGatewayAmazonSideAsn(t *testing.T) { +func TestValidateAmazonSideAsn(t *testing.T) { validAsns := []string{ "7224", "9059", @@ -2560,7 +2560,7 @@ func TestValidateVpnGatewayAmazonSideAsn(t *testing.T) { "4294967294", } for _, v := range validAsns { - _, errors := validateVpnGatewayAmazonSideAsn(v, "amazon_side_asn") + _, errors := validateAmazonSideAsn(v, "amazon_side_asn") if len(errors) != 0 { t.Fatalf("%q should be a valid ASN: %q", v, errors) } @@ -2581,47 +2581,7 @@ func TestValidateVpnGatewayAmazonSideAsn(t *testing.T) { "9999999999", } for _, v := range invalidAsns { - _, errors := validateVpnGatewayAmazonSideAsn(v, "amazon_side_asn") - if len(errors) == 0 { - t.Fatalf("%q should be an invalid ASN", v) - } - } -} - -func TestValidateDxGatewayAmazonSideAsn(t *testing.T) { - validAsns := []string{ - "64512", - "64513", - "65533", - "65534", - "4200000000", - "4200000001", - "4294967293", - "4294967294", - } - for _, v := range validAsns { - _, errors := validateDxGatewayAmazonSideAsn(v, "amazon_side_asn") - if len(errors) != 0 { - t.Fatalf("%q should be a valid ASN: %q", v, errors) - } - } - - invalidAsns := []string{ - "1", - "ABCDEFG", - "", - "7224", - "9059", - "10124", - "17493", - "64511", - "65535", - "4199999999", - "4294967295", - "9999999999", - } - for _, v := range invalidAsns { - _, errors := validateDxGatewayAmazonSideAsn(v, "amazon_side_asn") + _, errors := validateAmazonSideAsn(v, "amazon_side_asn") if len(errors) == 0 { t.Fatalf("%q should be an invalid ASN", v) } From 69fc856aba3bf94a9f1eae7cdc2b54192a25bc91 Mon Sep 17 00:00:00 2001 From: Kash Date: Thu, 2 Aug 2018 09:39:06 -0400 Subject: [PATCH 2984/3316] basic kinesis analytics application create and delete --- aws/config.go | 5 + aws/provider.go | 10 ++ ...ource_aws_kinesis_analytics_application.go | 160 ++++++++++++++++++ ..._aws_kinesis_analytics_application_test.go | 86 ++++++++++ 4 files changed, 261 insertions(+) create mode 100644 aws/resource_aws_kinesis_analytics_application.go create mode 100644 aws/resource_aws_kinesis_analytics_application_test.go diff --git a/aws/config.go b/aws/config.go index 2960400fef2..d0c7f4c8ca5 100644 --- a/aws/config.go +++ b/aws/config.go @@ -67,6 +67,7 @@ import ( "github.com/aws/aws-sdk-go/service/inspector" "github.com/aws/aws-sdk-go/service/iot" "github.com/aws/aws-sdk-go/service/kinesis" + "github.com/aws/aws-sdk-go/service/kinesisanalytics" "github.com/aws/aws-sdk-go/service/kms" "github.com/aws/aws-sdk-go/service/lambda" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" @@ -138,6 +139,7 @@ type Config struct { ElbEndpoint string IamEndpoint string KinesisEndpoint string + KinesisAnalyticsEndpoint string KmsEndpoint string LambdaEndpoint string RdsEndpoint string @@ -205,6 +207,7 @@ type AWSClient struct { rdsconn *rds.RDS iamconn *iam.IAM kinesisconn *kinesis.Kinesis + kinesisanalyticsconn *kinesisanalytics.KinesisAnalytics kmsconn *kms.KMS gameliftconn *gamelift.GameLift firehoseconn *firehose.Firehose @@ -416,6 +419,7 @@ func (c *Config) Client() (interface{}, error) { awsIamSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.IamEndpoint)}) awsLambdaSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.LambdaEndpoint)}) awsKinesisSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisEndpoint)}) + awsKinesisAnalyticsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisAnalyticsEndpoint)}) awsKmsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KmsEndpoint)}) awsRdsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.RdsEndpoint)}) awsS3Sess := sess.Copy(&aws.Config{Endpoint: aws.String(c.S3Endpoint)}) @@ -536,6 +540,7 @@ func (c *Config) Client() (interface{}, error) { client.guarddutyconn = guardduty.New(sess) client.iotconn = iot.New(sess) client.kinesisconn = kinesis.New(awsKinesisSess) + client.kinesisanalyticsconn = kinesisanalytics.New(awsKinesisAnalyticsSess) client.kmsconn = kms.New(awsKmsSess) client.lambdaconn = lambda.New(awsLambdaSess) client.lexmodelconn = lexmodelbuildingservice.New(sess) diff --git a/aws/provider.go b/aws/provider.go index d6e8ac73f7e..d092cdddb08 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -489,6 +489,7 @@ func Provider() terraform.ResourceProvider { "aws_key_pair": resourceAwsKeyPair(), "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kinesis_analytics_application": resourceAwsKinesisAnalyticsApplication(), "aws_kms_alias": resourceAwsKmsAlias(), "aws_kms_grant": resourceAwsKmsGrant(), "aws_kms_key": resourceAwsKmsKey(), @@ -754,6 +755,8 @@ func init() { "kinesis_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n" + "It's typically used to connect to kinesalite.", + "kinesis_analytics_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "kms_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "iam_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", @@ -879,6 +882,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.EsEndpoint = endpoints["es"].(string) config.IamEndpoint = endpoints["iam"].(string) config.KinesisEndpoint = endpoints["kinesis"].(string) + config.KinesisAnalyticsEndpoint = endpoints["kinesis_analytics"].(string) config.KmsEndpoint = endpoints["kms"].(string) config.LambdaEndpoint = endpoints["lambda"].(string) config.R53Endpoint = endpoints["r53"].(string) @@ -1053,6 +1057,12 @@ func endpointsSchema() *schema.Schema { Default: "", Description: descriptions["kinesis_endpoint"], }, + "kinesis_analytics": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["kinesis_analytics_endpoint"], + }, "kms": { Type: schema.TypeString, Optional: true, diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go new file mode 100644 index 00000000000..96d3e737b9c --- /dev/null +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -0,0 +1,160 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/kinesisanalytics" + "github.com/hashicorp/terraform/helper/schema" + "log" + "time" +) + +func resourceAwsKinesisAnalyticsApplication() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsKinesisAnalyticsApplicationCreate, + Read: resourceAwsKinesisAnalyticsApplicationRead, + Update: resourceAwsKinesisAnalyticsApplicationUpdate, + Delete: resourceAwsKinesisAnalyticsApplicationDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "code": { + Type: schema.TypeString, + Optional: true, + }, + + "create_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + }, + + "last_update_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + + "status": { + Type: schema.TypeString, + Computed: true, + }, + + "version": { + Type: schema.TypeInt, + Computed: true, + }, + + "cloudwatch_logging_options": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{}, + }, + }, + + "inputs": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{}, + }, + }, + + "outputs": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{}, + }, + }, + }, + } +} + +func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + createOpts := &kinesisanalytics.CreateApplicationInput{ + ApplicationName: aws.String(name), + } + + _, err := conn.CreateApplication(createOpts) + if err != nil { + return fmt.Errorf("Unable to create Kinesis Analytics Application: %s", err) + } + + return resourceAwsKinesisAnalyticsApplicationUpdate(d, meta) +} + +func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + + describeOpts := &kinesisanalytics.DescribeApplicationInput{ + ApplicationName: aws.String(name), + } + resp, err := conn.DescribeApplication(describeOpts) + if err != nil { + if awsErr, ok := err.(awserr.Error); ok { + if awsErr.Code() == "ResourceNotFoundException" { + d.SetId("") + return nil + } + return fmt.Errorf("[WARN] Error reading Kinesis Analytics Application: \"%s\", code: \"%s\"", awsErr.Message(), awsErr.Code()) + } + return err + } + + d.SetId(aws.StringValue(resp.ApplicationDetail.ApplicationARN)) + d.Set("name", aws.StringValue(resp.ApplicationDetail.ApplicationName)) + d.Set("arn", aws.StringValue(resp.ApplicationDetail.ApplicationARN)) + d.Set("code", aws.StringValue(resp.ApplicationDetail.ApplicationCode)) + d.Set("create_timestamp", aws.TimeValue(resp.ApplicationDetail.CreateTimestamp).Format(time.RFC3339)) + d.Set("description", aws.StringValue(resp.ApplicationDetail.ApplicationDescription)) + d.Set("last_update_timestamp", aws.TimeValue(resp.ApplicationDetail.LastUpdateTimestamp).Format(time.RFC3339)) + d.Set("status", aws.StringValue(resp.ApplicationDetail.ApplicationStatus)) + d.Set("version", int(aws.Int64Value(resp.ApplicationDetail.ApplicationVersionId))) + + return nil +} + +func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta interface{}) error { + return resourceAwsKinesisAnalyticsApplicationRead(d, meta) +} + +func resourceAwsKinesisAnalyticsApplicationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + createTimestamp, parseErr := time.Parse(time.RFC3339, d.Get("create_timestamp").(string)) + if parseErr != nil { + return parseErr + } + + log.Printf("[DEBUG] Kinesis Analytics Application destroy: %v", d.Id()) + deleteOpts := &kinesisanalytics.DeleteApplicationInput{ + ApplicationName: aws.String(name), + CreateTimestamp: aws.Time(createTimestamp), + } + _, deleteErr := conn.DeleteApplication(deleteOpts) + if deleteErr != nil { + return deleteErr + } + + log.Printf("[DEBUG] Kinesis Analytics Application deleted: %v", d.Id()) + return nil +} diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go new file mode 100644 index 00000000000..ff514d982a9 --- /dev/null +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -0,0 +1,86 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kinesisanalytics" + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSKinesisAnalyticsApplication_basic(t *testing.T) { + var application kinesisanalytics.ApplicationDetail + + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccKinesisAnalyticsApplication_basic(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists("aws_kinesis_analytics_application.test", &application), + ), + }, + }, + }) +} + +func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_kinesis_analytics_application" { + continue + } + conn := testAccProvider.Meta().(*AWSClient).kinesisanalyticsconn + describeOpts := &kinesisanalytics.DescribeApplicationInput{ + ApplicationName: aws.String(rs.Primary.Attributes["name"]), + } + resp, err := conn.DescribeApplication(describeOpts) + if err == nil { + if resp.ApplicationDetail != nil && *resp.ApplicationDetail.ApplicationStatus != "DELETING" { + return fmt.Errorf("Error: Application still exists") + } + } + return nil + } + return nil +} + +func testAccCheckKinesisAnalyticsApplicationExists(n string, application *kinesisanalytics.ApplicationDetail) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No Kinesis Analytics Application ID is set") + } + + conn := testAccProvider.Meta().(*AWSClient).kinesisanalyticsconn + describeOpts := &kinesisanalytics.DescribeApplicationInput{ + ApplicationName: aws.String(rs.Primary.Attributes["name"]), + } + resp, err := conn.DescribeApplication(describeOpts) + if err != nil { + return err + } + + *application = *resp.ApplicationDetail + + return nil + } +} + +func testAccKinesisAnalyticsApplication_basic(rInt int) string { + return fmt.Sprintf(` +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" +} +`, rInt) +} From 20442eae28eb1c16d93ba8cb05e40da6e5d3a158 Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 3 Aug 2018 08:31:48 -0400 Subject: [PATCH 2985/3316] update code --- ...ource_aws_kinesis_analytics_application.go | 33 +++++++++++++++++ ..._aws_kinesis_analytics_application_test.go | 35 ++++++++++++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 96d3e737b9c..1d17c48222d 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -134,6 +134,29 @@ func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta int } func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kinesisanalyticsconn + + if !d.IsNewResource() { + name := d.Get("name").(string) + version := d.Get("version").(int) + + updateApplicationOpts := &kinesisanalytics.UpdateApplicationInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + } + + applicationUpdate, err := createApplicationUpdateOpts(d) + if err != nil { + return err + } + + updateApplicationOpts.SetApplicationUpdate(applicationUpdate) + _, updateErr := conn.UpdateApplication(updateApplicationOpts) + if updateErr != nil { + return updateErr + } + } + return resourceAwsKinesisAnalyticsApplicationRead(d, meta) } @@ -158,3 +181,13 @@ func resourceAwsKinesisAnalyticsApplicationDelete(d *schema.ResourceData, meta i log.Printf("[DEBUG] Kinesis Analytics Application deleted: %v", d.Id()) return nil } + +func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { + applicationUpdate := &kinesisanalytics.ApplicationUpdate{} + + if v, ok := d.GetOk("code"); ok { + applicationUpdate.ApplicationCodeUpdate = aws.String(v.(string)) + } + + return applicationUpdate, nil +} diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index ff514d982a9..c8c48f2c89e 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -13,7 +13,6 @@ import ( func TestAccAWSKinesisAnalyticsApplication_basic(t *testing.T) { var application kinesisanalytics.ApplicationDetail - rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ @@ -31,6 +30,32 @@ func TestAccAWSKinesisAnalyticsApplication_basic(t *testing.T) { }) } +func TestAccAWSKinesisAnalyticsApplication_update(t *testing.T) { + var application kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: testAccKinesisAnalyticsApplication_basic(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + ), + }, + { + Config: testAccKinesisAnalyticsApplication_update(rInt), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resName, "code", "testCode\n"), + ), + }, + }, + }) +} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { @@ -84,3 +109,11 @@ resource "aws_kinesis_analytics_application" "test" { } `, rInt) } + +func testAccKinesisAnalyticsApplication_update(rInt int) string { + return fmt.Sprintf(` +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + code = "testCode\n" +}`, rInt) +} From e33bccc36d603c004533b8b64692f2ffe00fd2cb Mon Sep 17 00:00:00 2001 From: Kash Date: Fri, 3 Aug 2018 16:45:05 -0400 Subject: [PATCH 2986/3316] apply cloudwatch logging options --- ...ource_aws_kinesis_analytics_application.go | 106 ++++++++++++++++-- ..._aws_kinesis_analytics_application_test.go | 91 ++++++++++++++- 2 files changed, 184 insertions(+), 13 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 1d17c48222d..6cfd04663e8 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/kinesisanalytics" "github.com/hashicorp/terraform/helper/schema" "log" + "reflect" "time" ) @@ -62,8 +63,26 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "cloudwatch_logging_options": { Type: schema.TypeList, Optional: true, + MaxItems: 1, Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{}, + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "log_stream": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + + "role": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + }, }, }, @@ -93,12 +112,32 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i ApplicationName: aws.String(name), } + if v, ok := d.GetOk("code"); ok && v.(string) != "" { + createOpts.ApplicationCode = aws.String(v.(string)) + } + + if v, ok := d.GetOk("cloudwatch_logging_options"); ok { + var cloudwatchLoggingOptions []*kinesisanalytics.CloudWatchLoggingOption + clos := v.([]interface{}) + + if len(clos) > 0 { + clo := clos[0].(map[string]interface{}) + cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOption{ + LogStreamARN: aws.String(clo["log_stream"].(string)), + RoleARN: aws.String(clo["role"].(string)), + } + cloudwatchLoggingOptions = append(cloudwatchLoggingOptions, cloudwatchLoggingOption) + } + + createOpts.CloudWatchLoggingOptions = cloudwatchLoggingOptions + } + _, err := conn.CreateApplication(createOpts) if err != nil { return fmt.Errorf("Unable to create Kinesis Analytics Application: %s", err) } - return resourceAwsKinesisAnalyticsApplicationUpdate(d, meta) + return resourceAwsKinesisAnalyticsApplicationRead(d, meta) } func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta interface{}) error { @@ -130,6 +169,10 @@ func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta int d.Set("status", aws.StringValue(resp.ApplicationDetail.ApplicationStatus)) d.Set("version", int(aws.Int64Value(resp.ApplicationDetail.ApplicationVersionId))) + if err := d.Set("cloudwatch_logging_options", getCloudwatchLoggingOptions(resp.ApplicationDetail.CloudWatchLoggingOptionDescriptions)); err != nil { + return err + } + return nil } @@ -137,6 +180,7 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i conn := meta.(*AWSClient).kinesisanalyticsconn if !d.IsNewResource() { + applicationUpdate := &kinesisanalytics.ApplicationUpdate{} name := d.Get("name").(string) version := d.Get("version").(int) @@ -150,10 +194,30 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i return err } - updateApplicationOpts.SetApplicationUpdate(applicationUpdate) - _, updateErr := conn.UpdateApplication(updateApplicationOpts) - if updateErr != nil { - return updateErr + if !reflect.DeepEqual(applicationUpdate, &kinesisanalytics.ApplicationUpdate{}) { + updateApplicationOpts.SetApplicationUpdate(applicationUpdate) + _, updateErr := conn.UpdateApplication(updateApplicationOpts) + if updateErr != nil { + return updateErr + } + version = version + 1 + } + + oldLoggingOptions, newLoggingOptions := d.GetChange("cloudwatch_logging_options") + if len(oldLoggingOptions.([]interface{})) == 0 && len(newLoggingOptions.([]interface{})) > 0 { + if v, ok := d.GetOk("cloudwatch_logging_options"); ok { + clo := v.([]interface{})[0].(map[string]interface{}) + cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOption{ + LogStreamARN: aws.String(clo["log_stream"].(string)), + RoleARN: aws.String(clo["role"].(string)), + } + addOpts := &kinesisanalytics.AddApplicationCloudWatchLoggingOptionInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + CloudWatchLoggingOption: cloudwatchLoggingOption, + } + conn.AddApplicationCloudWatchLoggingOption(addOpts) + } } } @@ -185,9 +249,37 @@ func resourceAwsKinesisAnalyticsApplicationDelete(d *schema.ResourceData, meta i func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} - if v, ok := d.GetOk("code"); ok { + if v, ok := d.GetOk("code"); ok && v.(string) != "" { applicationUpdate.ApplicationCodeUpdate = aws.String(v.(string)) } + oldLoggingOptions, _ := d.GetChange("cloudwatch_logging_options") + if len(oldLoggingOptions.([]interface{})) > 0 { + if v, ok := d.GetOk("cloudwatch_logging_options"); ok { + var cloudwatchLoggingOptions []*kinesisanalytics.CloudWatchLoggingOptionUpdate + clo := v.([]interface{})[0].(map[string]interface{}) + cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOptionUpdate{ + CloudWatchLoggingOptionId: aws.String(clo["id"].(string)), + LogStreamARNUpdate: aws.String(clo["log_stream"].(string)), + RoleARNUpdate: aws.String(clo["role"].(string)), + } + cloudwatchLoggingOptions = append(cloudwatchLoggingOptions, cloudwatchLoggingOption) + applicationUpdate.CloudWatchLoggingOptionUpdates = cloudwatchLoggingOptions + } + } + return applicationUpdate, nil } + +func getCloudwatchLoggingOptions(options []*kinesisanalytics.CloudWatchLoggingOptionDescription) []interface{} { + s := []interface{}{} + for _, v := range options { + option := map[string]interface{}{ + "id": aws.StringValue(v.CloudWatchLoggingOptionId), + "log_stream": aws.StringValue(v.LogStreamARN), + "role": aws.StringValue(v.RoleARN), + } + s = append(s, option) + } + return s +} diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index c8c48f2c89e..2e6f4d2dfda 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -13,6 +13,7 @@ import ( func TestAccAWSKinesisAnalyticsApplication_basic(t *testing.T) { var application kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ @@ -23,7 +24,9 @@ func TestAccAWSKinesisAnalyticsApplication_basic(t *testing.T) { { Config: testAccKinesisAnalyticsApplication_basic(rInt), Check: resource.ComposeTestCheckFunc( - testAccCheckKinesisAnalyticsApplicationExists("aws_kinesis_analytics_application.test", &application), + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "code", "testCode\n"), ), }, }, @@ -49,13 +52,36 @@ func TestAccAWSKinesisAnalyticsApplication_update(t *testing.T) { { Config: testAccKinesisAnalyticsApplication_update(rInt), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resName, "code", "testCode\n"), + resource.TestCheckResourceAttr(resName, "code", "testCode2\n"), + resource.TestCheckResourceAttr(resName, "version", "3"), + resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), ), }, }, }) } +//func TestAccAWSKinesisAnalyticsApplication_cloudwatchLoggingOptions(t *testing.T) { +// var application kinesisanalytics.ApplicationDetail +// resName := "aws_kinesis_analytics_application.test" +// rInt := acctest.RandInt() +// +// resource.Test(t, resource.TestCase{ +// PreCheck: func() { testAccPreCheck(t) }, +// Providers: testAccProviders, +// CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, +// Steps: []resource.TestStep{ +// { +// Config: testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt), +// Check: resource.ComposeTestCheckFunc( +// testAccCheckKinesisAnalyticsApplicationExists(resName, &application), +// resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), +// ), +// }, +// }, +// }) +//} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { @@ -67,7 +93,7 @@ func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { } resp, err := conn.DescribeApplication(describeOpts) if err == nil { - if resp.ApplicationDetail != nil && *resp.ApplicationDetail.ApplicationStatus != "DELETING" { + if resp.ApplicationDetail != nil && *resp.ApplicationDetail.ApplicationStatus != kinesisanalytics.ApplicationStatusDeleting { return fmt.Errorf("Error: Application still exists") } } @@ -104,16 +130,69 @@ func testAccCheckKinesisAnalyticsApplicationExists(n string, application *kinesi func testAccKinesisAnalyticsApplication_basic(rInt int) string { return fmt.Sprintf(` +data "aws_iam_policy_document" "test" { + statement { + actions = ["sts:AssumeRole"] + principals { + type = "Service" + identifiers = ["kinesisanalytics.amazonaws.com"] + } + } +} + +resource "aws_cloudwatch_log_group" "test" { + name = "testAcc-%d" +} + +resource "aws_cloudwatch_log_stream" "test" { + name = "testAcc-%d" + log_group_name = "${aws_cloudwatch_log_group.test.name}" +} + +resource "aws_iam_role" "test" { + name = "testAcc-%d" + assume_role_policy = "${data.aws_iam_policy_document.test.json}" +} + resource "aws_kinesis_analytics_application" "test" { name = "testAcc-%d" + code = "testCode\n" } -`, rInt) +`, rInt, rInt, rInt, rInt) } func testAccKinesisAnalyticsApplication_update(rInt int) string { return fmt.Sprintf(` +data "aws_iam_policy_document" "test" { + statement { + actions = ["sts:AssumeRole"] + principals { + type = "Service" + identifiers = ["kinesisanalytics.amazonaws.com"] + } + } +} + +resource "aws_cloudwatch_log_group" "test" { + name = "testAcc-%d" +} + +resource "aws_cloudwatch_log_stream" "test" { + name = "testAcc-%d" + log_group_name = "${aws_cloudwatch_log_group.test.name}" +} + +resource "aws_iam_role" "test" { + name = "testAcc-%d" + assume_role_policy = "${data.aws_iam_policy_document.test.json}" +} + resource "aws_kinesis_analytics_application" "test" { name = "testAcc-%d" - code = "testCode\n" -}`, rInt) + code = "testCode2\n" + cloudwatch_logging_options { + log_stream = "${aws_cloudwatch_log_stream.test.arn}" + role = "${aws_iam_role.test.arn}" + } +}`, rInt, rInt, rInt, rInt) } From 05b3e3939b6b0266461c44378e15c15e03a4d774 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sat, 4 Aug 2018 08:59:12 -0400 Subject: [PATCH 2987/3316] only update when there are changes --- ...ource_aws_kinesis_analytics_application.go | 6 +- ..._aws_kinesis_analytics_application_test.go | 150 +++++++++++------- 2 files changed, 99 insertions(+), 57 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 6cfd04663e8..471ff215507 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -249,8 +249,10 @@ func resourceAwsKinesisAnalyticsApplicationDelete(d *schema.ResourceData, meta i func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} - if v, ok := d.GetOk("code"); ok && v.(string) != "" { - applicationUpdate.ApplicationCodeUpdate = aws.String(v.(string)) + if d.HasChange("code") { + if v, ok := d.GetOk("code"); ok && v.(string) != "" { + applicationUpdate.ApplicationCodeUpdate = aws.String(v.(string)) + } } oldLoggingOptions, _ := d.GetChange("cloudwatch_logging_options") diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index 2e6f4d2dfda..01c03cc136f 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -53,7 +53,41 @@ func TestAccAWSKinesisAnalyticsApplication_update(t *testing.T) { Config: testAccKinesisAnalyticsApplication_update(rInt), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resName, "code", "testCode2\n"), - resource.TestCheckResourceAttr(resName, "version", "3"), + resource.TestCheckResourceAttr(resName, "version", "2"), + ), + }, + }, + }) +} + +func TestAccAWSKinesisAnalyticsApplication_addCloudwatchLoggingOptions(t *testing.T) { + var application kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_basic(rInt) + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt, "testStream") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "1"), + ), + }, + { + Config: thirdStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "2"), resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), ), }, @@ -61,26 +95,41 @@ func TestAccAWSKinesisAnalyticsApplication_update(t *testing.T) { }) } -//func TestAccAWSKinesisAnalyticsApplication_cloudwatchLoggingOptions(t *testing.T) { -// var application kinesisanalytics.ApplicationDetail -// resName := "aws_kinesis_analytics_application.test" -// rInt := acctest.RandInt() -// -// resource.Test(t, resource.TestCase{ -// PreCheck: func() { testAccPreCheck(t) }, -// Providers: testAccProviders, -// CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, -// Steps: []resource.TestStep{ -// { -// Config: testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt), -// Check: resource.ComposeTestCheckFunc( -// testAccCheckKinesisAnalyticsApplicationExists(resName, &application), -// resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), -// ), -// }, -// }, -// }) -//} +func TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions(t *testing.T) { + var application kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt, "testStream") + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt, "testStream2") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), + ), + }, + { + Config: thirdStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), + ), + }, + }, + }) +} func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { @@ -130,38 +179,46 @@ func testAccCheckKinesisAnalyticsApplicationExists(n string, application *kinesi func testAccKinesisAnalyticsApplication_basic(rInt int) string { return fmt.Sprintf(` -data "aws_iam_policy_document" "test" { - statement { - actions = ["sts:AssumeRole"] - principals { - type = "Service" - identifiers = ["kinesisanalytics.amazonaws.com"] - } - } +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + code = "testCode\n" +} +`, rInt) } -resource "aws_cloudwatch_log_group" "test" { +func testAccKinesisAnalyticsApplication_update(rInt int) string { + return fmt.Sprintf(` +resource "aws_kinesis_analytics_application" "test" { name = "testAcc-%d" + code = "testCode2\n" +} +`, rInt) } -resource "aws_cloudwatch_log_stream" "test" { +func testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt int, streamName string) string { + return fmt.Sprintf(` +resource "aws_cloudwatch_log_group" "test" { name = "testAcc-%d" - log_group_name = "${aws_cloudwatch_log_group.test.name}" } -resource "aws_iam_role" "test" { - name = "testAcc-%d" - assume_role_policy = "${data.aws_iam_policy_document.test.json}" +resource "aws_cloudwatch_log_stream" "test" { + name = "testAcc-%s" + log_group_name = "${aws_cloudwatch_log_group.test.name}" } resource "aws_kinesis_analytics_application" "test" { name = "testAcc-%d" code = "testCode\n" + cloudwatch_logging_options { + log_stream = "${aws_cloudwatch_log_stream.test.arn}" + role = "${aws_iam_role.test.arn}" + } } -`, rInt, rInt, rInt, rInt) +`, rInt, streamName, rInt) } -func testAccKinesisAnalyticsApplication_update(rInt int) string { +// this is used to set up the IAM role +func testAccKinesisAnalyticsApplication_prereq(rInt int) string { return fmt.Sprintf(` data "aws_iam_policy_document" "test" { statement { @@ -173,26 +230,9 @@ data "aws_iam_policy_document" "test" { } } -resource "aws_cloudwatch_log_group" "test" { - name = "testAcc-%d" -} - -resource "aws_cloudwatch_log_stream" "test" { - name = "testAcc-%d" - log_group_name = "${aws_cloudwatch_log_group.test.name}" -} - resource "aws_iam_role" "test" { name = "testAcc-%d" assume_role_policy = "${data.aws_iam_policy_document.test.json}" } - -resource "aws_kinesis_analytics_application" "test" { - name = "testAcc-%d" - code = "testCode2\n" - cloudwatch_logging_options { - log_stream = "${aws_cloudwatch_log_stream.test.arn}" - role = "${aws_iam_role.test.arn}" - } -}`, rInt, rInt, rInt, rInt) +`, rInt) } From 1c26fb2e2ef12d28f9febc366275aee8bed5c243 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sat, 4 Aug 2018 09:59:52 -0400 Subject: [PATCH 2988/3316] add inputs resource schema --- ...ource_aws_kinesis_analytics_application.go | 186 +++++++++++++++++- 1 file changed, 185 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 471ff215507..4394bc6478e 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -90,7 +90,191 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{}, + Schema: map[string]*schema.Schema{ + "kinesis_firehose": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + + "role": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "kinesis_stream": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + + "role": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "name_prefix": { + Type: schema.TypeString, + Optional: true, + }, + + "parallelism": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "count": { + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + + "processing_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "lambda": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + + "role": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + }, + }, + }, + + "schema": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_columns": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping": { + Type: schema.TypeString, + Optional: true, + }, + + "name": { + Type: schema.TypeString, + Optional: true, + }, + + "sql_type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "record_encoding": { + Type: schema.TypeString, + Optional: true, + }, + + "record_format": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping_parameters": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "csv": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_column_delimiter": { + Type: schema.TypeString, + Optional: true, + }, + + "record_row_delimiter": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + + "json": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_row_path": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + + "record_format_type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + }, }, }, From 8e9c9efd5cf16f93a8756250cbb8a44b2609c64f Mon Sep 17 00:00:00 2001 From: kl4w Date: Sat, 4 Aug 2018 10:11:37 -0400 Subject: [PATCH 2989/3316] abstract function --- ...ource_aws_kinesis_analytics_application.go | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 4394bc6478e..08133bd4343 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -301,19 +301,9 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i } if v, ok := d.GetOk("cloudwatch_logging_options"); ok { - var cloudwatchLoggingOptions []*kinesisanalytics.CloudWatchLoggingOption - clos := v.([]interface{}) - - if len(clos) > 0 { - clo := clos[0].(map[string]interface{}) - cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOption{ - LogStreamARN: aws.String(clo["log_stream"].(string)), - RoleARN: aws.String(clo["role"].(string)), - } - cloudwatchLoggingOptions = append(cloudwatchLoggingOptions, cloudwatchLoggingOption) - } - - createOpts.CloudWatchLoggingOptions = cloudwatchLoggingOptions + clo := v.([]interface{})[0].(map[string]interface{}) + cloudwatchLoggingOption := createCloudwatchLoggingOption(clo) + createOpts.CloudWatchLoggingOptions = []*kinesisanalytics.CloudWatchLoggingOption{cloudwatchLoggingOption} } _, err := conn.CreateApplication(createOpts) @@ -391,10 +381,7 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i if len(oldLoggingOptions.([]interface{})) == 0 && len(newLoggingOptions.([]interface{})) > 0 { if v, ok := d.GetOk("cloudwatch_logging_options"); ok { clo := v.([]interface{})[0].(map[string]interface{}) - cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOption{ - LogStreamARN: aws.String(clo["log_stream"].(string)), - RoleARN: aws.String(clo["role"].(string)), - } + cloudwatchLoggingOption := createCloudwatchLoggingOption(clo) addOpts := &kinesisanalytics.AddApplicationCloudWatchLoggingOptionInput{ ApplicationName: aws.String(name), CurrentApplicationVersionId: aws.Int64(int64(version)), @@ -430,6 +417,14 @@ func resourceAwsKinesisAnalyticsApplicationDelete(d *schema.ResourceData, meta i return nil } +func createCloudwatchLoggingOption(clo map[string]interface{}) *kinesisanalytics.CloudWatchLoggingOption { + cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOption{ + LogStreamARN: aws.String(clo["log_stream"].(string)), + RoleARN: aws.String(clo["role"].(string)), + } + return cloudwatchLoggingOption +} + func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} From ee24cd02813ce62eef8c3fc6eaaf64bca4be909c Mon Sep 17 00:00:00 2001 From: kl4w Date: Sat, 4 Aug 2018 15:12:02 -0400 Subject: [PATCH 2990/3316] set inputs on create --- ...ource_aws_kinesis_analytics_application.go | 146 +++++++++++++++++- ..._aws_kinesis_analytics_application_test.go | 88 +++++++++++ 2 files changed, 231 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 08133bd4343..d56b29de2e1 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -2,13 +2,14 @@ package aws import ( "fmt" + "log" + "reflect" + "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/kinesisanalytics" "github.com/hashicorp/terraform/helper/schema" - "log" - "reflect" - "time" ) func resourceAwsKinesisAnalyticsApplication() *schema.Resource { @@ -89,6 +90,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "inputs": { Type: schema.TypeList, Optional: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "kinesis_firehose": { @@ -306,6 +308,12 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i createOpts.CloudWatchLoggingOptions = []*kinesisanalytics.CloudWatchLoggingOption{cloudwatchLoggingOption} } + if v, ok := d.GetOk("inputs"); ok { + i := v.([]interface{})[0].(map[string]interface{}) + inputs := createInputs(i) + createOpts.Inputs = []*kinesisanalytics.Input{inputs} + } + _, err := conn.CreateApplication(createOpts) if err != nil { return fmt.Errorf("Unable to create Kinesis Analytics Application: %s", err) @@ -347,6 +355,10 @@ func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta int return err } + if err := d.Set("inputs", getInputs(resp.ApplicationDetail.InputDescriptions)); err != nil { + return err + } + return nil } @@ -425,6 +437,123 @@ func createCloudwatchLoggingOption(clo map[string]interface{}) *kinesisanalytics return cloudwatchLoggingOption } +func createInputs(i map[string]interface{}) *kinesisanalytics.Input { + input := &kinesisanalytics.Input{} + + if v, ok := i["name_prefix"]; ok { + input.NamePrefix = aws.String(v.(string)) + } + + if v := i["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfi := &kinesisanalytics.KinesisFirehoseInput{ + ResourceARN: aws.String(kf["resource"].(string)), + RoleARN: aws.String(kf["role"].(string)), + } + input.KinesisFirehoseInput = kfi + } + + if v := i["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + ksi := &kinesisanalytics.KinesisStreamsInput{ + ResourceARN: aws.String(ks["resource"].(string)), + RoleARN: aws.String(ks["role"].(string)), + } + input.KinesisStreamsInput = ksi + } + + if v := i["parallelism"].([]interface{}); len(v) > 0 { + p := v[0].(map[string]interface{}) + + if c, ok := p["count"]; ok { + ip := &kinesisanalytics.InputParallelism{ + Count: aws.Int64(int64(c.(int))), + } + input.InputParallelism = ip + } + } + + if v := i["processing_configuration"].([]interface{}); len(v) > 0 { + pc := v[0].(map[string]interface{}) + + if l := pc["lambda"].([]interface{}); len(l) > 0 { + lp := l[0].(map[string]interface{}) + ipc := &kinesisanalytics.InputProcessingConfiguration{ + InputLambdaProcessor: &kinesisanalytics.InputLambdaProcessor{ + ResourceARN: aws.String(lp["resource"].(string)), + RoleARN: aws.String(lp["role"].(string)), + }, + } + input.InputProcessingConfiguration = ipc + } + } + + if v := i["schema"].([]interface{}); len(v) > 0 { + ss := &kinesisanalytics.SourceSchema{} + vL := v[0].(map[string]interface{}) + + if v := vL["record_columns"].([]interface{}); len(v) > 0 { + var rcs []*kinesisanalytics.RecordColumn + + for _, rc := range v { + rcD := rc.(map[string]interface{}) + rc := &kinesisanalytics.RecordColumn{ + Name: aws.String(rcD["name"].(string)), + SqlType: aws.String(rcD["sql_type"].(string)), + } + + if v, ok := rcD["mapping"]; ok { + rc.Mapping = aws.String(v.(string)) + } + + rcs = append(rcs, rc) + } + + ss.RecordColumns = rcs + } + + if v, ok := vL["record_encoding"]; ok && v.(string) != "" { + ss.RecordEncoding = aws.String(v.(string)) + } + + if v := vL["record_format"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + rf := &kinesisanalytics.RecordFormat{} + + if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + mp := &kinesisanalytics.MappingParameters{} + + if v := vL["csv"].([]interface{}); len(v) > 0 { + cL := v[0].(map[string]interface{}) + cmp := &kinesisanalytics.CSVMappingParameters{ + RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), + RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), + } + mp.CSVMappingParameters = cmp + rf.RecordFormatType = aws.String("CSV") + } + + if v := vL["json"].([]interface{}); len(v) > 0 { + jL := v[0].(map[string]interface{}) + jmp := &kinesisanalytics.JSONMappingParameters{ + RecordRowPath: aws.String(jL["record_row_path"].(string)), + } + mp.JSONMappingParameters = jmp + rf.RecordFormatType = aws.String("JSON") + } + rf.MappingParameters = mp + } + + ss.RecordFormat = rf + } + + input.InputSchema = ss + } + + return input +} + func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} @@ -464,3 +593,14 @@ func getCloudwatchLoggingOptions(options []*kinesisanalytics.CloudWatchLoggingOp } return s } + +func getInputs(inputs []*kinesisanalytics.InputDescription) []interface{} { + s := []interface{}{} + for _, v := range inputs { + input := map[string]interface{}{ + "name_prefix": aws.StringValue(v.NamePrefix), + } + s = append(s, input) + } + return s +} diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index 01c03cc136f..24d0b347317 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -2,7 +2,9 @@ package aws import ( "fmt" + "log" "testing" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kinesisanalytics" @@ -75,6 +77,9 @@ func TestAccAWSKinesisAnalyticsApplication_addCloudwatchLoggingOptions(t *testin Steps: []resource.TestStep{ { Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), }, { Config: secondStep, @@ -110,6 +115,9 @@ func TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions(t *tes Steps: []resource.TestStep{ { Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), }, { Config: secondStep, @@ -131,6 +139,36 @@ func TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions(t *tes }) } +func TestAccAWSKinesisAnalyticsApplication_inputsKinesisStream(t *testing.T) { + var application kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_inputsKinesisStream(rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "inputs.#", "1"), + ), + }, + }, + }) +} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { @@ -209,6 +247,7 @@ resource "aws_cloudwatch_log_stream" "test" { resource "aws_kinesis_analytics_application" "test" { name = "testAcc-%d" code = "testCode\n" + cloudwatch_logging_options { log_stream = "${aws_cloudwatch_log_stream.test.arn}" role = "${aws_iam_role.test.arn}" @@ -217,6 +256,55 @@ resource "aws_kinesis_analytics_application" "test" { `, rInt, streamName, rInt) } +func testAccKinesisAnalyticsApplication_inputsKinesisStream(rInt int) string { + return fmt.Sprintf(` +resource "aws_kinesis_stream" "test" { + name = "testAcc-%d" + shard_count = 1 +} + +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + code = "testCode\n" + + inputs { + name_prefix = "test_prefix" + kinesis_stream { + resource = "${aws_kinesis_stream.test.arn}" + role = "${aws_iam_role.test.arn}" + } + parallelism { + count = 1 + } + schema { + record_columns { + mapping = "$.test" + name = "test" + sql_type = "VARCHAR(8)" + } + record_encoding = "UTF-8" + record_format { + record_format_type = "JSON" + mapping_parameters { + json { + record_row_path = "$" + } + } + } + } + } +} +`, rInt, rInt) +} + +func fulfillSleep() resource.TestCheckFunc { + return func(s *terraform.State) error { + log.Print("[DEBUG] Test: Sleep to allow IAM to propagate") + time.Sleep(30 * time.Second) + return nil + } +} + // this is used to set up the IAM role func testAccKinesisAnalyticsApplication_prereq(rInt int) string { return fmt.Sprintf(` From 20f7735702776b66525823f2e2bac75393769c27 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sat, 4 Aug 2018 17:35:49 -0400 Subject: [PATCH 2991/3316] read inputs --- ...ource_aws_kinesis_analytics_application.go | 148 +++++++++++++++++- 1 file changed, 146 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index d56b29de2e1..08dd0158e0e 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -93,6 +93,11 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "kinesis_firehose": { Type: schema.TypeList, Optional: true, @@ -276,6 +281,25 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { }, }, }, + + "starting_position_configuration": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "starting_position": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + + "stream_names": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, }, }, @@ -596,10 +620,130 @@ func getCloudwatchLoggingOptions(options []*kinesisanalytics.CloudWatchLoggingOp func getInputs(inputs []*kinesisanalytics.InputDescription) []interface{} { s := []interface{}{} - for _, v := range inputs { + + if len(inputs) > 0 { + id := inputs[0] + input := map[string]interface{}{ - "name_prefix": aws.StringValue(v.NamePrefix), + "id": aws.StringValue(id.InputId), + "name_prefix": aws.StringValue(id.NamePrefix), + } + + list := schema.NewSet(schema.HashString, nil) + for _, sn := range id.InAppStreamNames { + list.Add(aws.StringValue(sn)) + } + input["stream_names"] = list + + if id.InputParallelism != nil { + input["parallelism"] = []interface{}{ + map[string]interface{}{ + "count": int(aws.Int64Value(id.InputParallelism.Count)), + }, + } + } + + if id.InputProcessingConfigurationDescription != nil { + ipcd := id.InputProcessingConfigurationDescription + + if ipcd.InputLambdaProcessorDescription != nil { + input["processing_configurations"] = []interface{}{ + map[string]interface{}{ + "lambda": []interface{}{ + map[string]interface{}{ + "resource": aws.StringValue(ipcd.InputLambdaProcessorDescription.ResourceARN), + "role": aws.StringValue(ipcd.InputLambdaProcessorDescription.RoleARN), + }, + }, + }, + } + } } + + if id.InputSchema != nil { + inputSchema := id.InputSchema + is := []interface{}{} + rcs := []interface{}{} + ss := map[string]interface{}{ + "record_encoding": aws.StringValue(inputSchema.RecordEncoding), + } + + for _, rc := range inputSchema.RecordColumns { + rcM := map[string]interface{}{ + "mapping": aws.StringValue(rc.Mapping), + "name": aws.StringValue(rc.Name), + "sql_type": aws.StringValue(rc.SqlType), + } + rcs = append(rcs, rcM) + } + ss["record_columns"] = rcs + + if inputSchema.RecordFormat != nil { + rf := inputSchema.RecordFormat + rfM := map[string]interface{}{ + "record_format_type": aws.StringValue(rf.RecordFormatType), + } + + if rf.MappingParameters != nil { + mps := []interface{}{} + if rf.MappingParameters.CSVMappingParameters != nil { + cmp := map[string]interface{}{ + "csv": []interface{}{ + map[string]interface{}{ + "record_column_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordColumnDelimiter), + "record_row_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordRowDelimiter), + }, + }, + } + mps = append(mps, cmp) + } + + if rf.MappingParameters.JSONMappingParameters != nil { + jmp := map[string]interface{}{ + "json": []interface{}{ + map[string]interface{}{ + "record_row_path": aws.StringValue(rf.MappingParameters.JSONMappingParameters.RecordRowPath), + }, + }, + } + mps = append(mps, jmp) + } + + rfM["mapping_parameters"] = mps + } + ss["record_format"] = []interface{}{rfM} + } + + is = append(is, ss) + input["schema"] = is + } + + if id.InputStartingPositionConfiguration != nil && id.InputStartingPositionConfiguration.InputStartingPosition != nil { + input["starting_position_configuration"] = []interface{}{ + map[string]interface{}{ + "starting_position": aws.StringValue(id.InputStartingPositionConfiguration.InputStartingPosition), + }, + } + } + + if id.KinesisFirehoseInputDescription != nil { + input["kinesis_firehose"] = []interface{}{ + map[string]interface{}{ + "resource": aws.StringValue(id.KinesisFirehoseInputDescription.ResourceARN), + "role": aws.StringValue(id.KinesisFirehoseInputDescription.RoleARN), + }, + } + } + + if id.KinesisStreamsInputDescription != nil { + input["kinesis_stream"] = []interface{}{ + map[string]interface{}{ + "resource": aws.StringValue(id.KinesisStreamsInputDescription.ResourceARN), + "role": aws.StringValue(id.KinesisStreamsInputDescription.RoleARN), + }, + } + } + s = append(s, input) } return s From e51bfb4de58aabcd08171489159b91b052378f9c Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 10:21:23 -0400 Subject: [PATCH 2992/3316] flag required attributes --- ...ource_aws_kinesis_analytics_application.go | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 08dd0158e0e..c3b38a30ebf 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -74,13 +74,13 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "log_stream": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, "role": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, }, @@ -106,13 +106,13 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Schema: map[string]*schema.Schema{ "resource": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, "role": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, }, @@ -127,13 +127,13 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Schema: map[string]*schema.Schema{ "resource": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, "role": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, }, @@ -142,7 +142,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "name_prefix": { Type: schema.TypeString, - Optional: true, + Required: true, }, "parallelism": { @@ -153,7 +153,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Schema: map[string]*schema.Schema{ "count": { Type: schema.TypeInt, - Optional: true, + Required: true, }, }, }, @@ -167,19 +167,19 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Schema: map[string]*schema.Schema{ "lambda": { Type: schema.TypeList, - Optional: true, + Required: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "resource": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, "role": { Type: schema.TypeString, - Optional: true, + Required: true, ValidateFunc: validateArn, }, }, @@ -191,13 +191,13 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "schema": { Type: schema.TypeList, - Optional: true, + Required: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "record_columns": { Type: schema.TypeList, - Optional: true, + Required: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "mapping": { @@ -207,12 +207,12 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "name": { Type: schema.TypeString, - Optional: true, + Required: true, }, "sql_type": { Type: schema.TypeString, - Optional: true, + Required: true, }, }, }, @@ -225,7 +225,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "record_format": { Type: schema.TypeList, - Optional: true, + Required: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -243,12 +243,12 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Schema: map[string]*schema.Schema{ "record_column_delimiter": { Type: schema.TypeString, - Optional: true, + Required: true, }, "record_row_delimiter": { Type: schema.TypeString, - Optional: true, + Required: true, }, }, }, @@ -262,7 +262,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Schema: map[string]*schema.Schema{ "record_row_path": { Type: schema.TypeString, - Optional: true, + Required: true, }, }, }, @@ -273,7 +273,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "record_format_type": { Type: schema.TypeString, - Optional: true, + Required: true, }, }, }, From 668f9dc80e310d2f62cb6b1ed66b910f0cac1441 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 11:56:57 -0400 Subject: [PATCH 2993/3316] update inputs --- ...ource_aws_kinesis_analytics_application.go | 130 +++++++++++++++++- ..._aws_kinesis_analytics_application_test.go | 104 +++++++++++++- 2 files changed, 226 insertions(+), 8 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index c3b38a30ebf..d83bd2167d5 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -273,7 +273,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "record_format_type": { Type: schema.TypeString, - Required: true, + Computed: true, }, }, }, @@ -587,18 +587,136 @@ func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.Appl } } - oldLoggingOptions, _ := d.GetChange("cloudwatch_logging_options") - if len(oldLoggingOptions.([]interface{})) > 0 { + oldLoggingOptions, newLoggingOptions := d.GetChange("cloudwatch_logging_options") + if len(oldLoggingOptions.([]interface{})) > 0 && len(newLoggingOptions.([]interface{})) > 0 { if v, ok := d.GetOk("cloudwatch_logging_options"); ok { - var cloudwatchLoggingOptions []*kinesisanalytics.CloudWatchLoggingOptionUpdate clo := v.([]interface{})[0].(map[string]interface{}) cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOptionUpdate{ CloudWatchLoggingOptionId: aws.String(clo["id"].(string)), LogStreamARNUpdate: aws.String(clo["log_stream"].(string)), RoleARNUpdate: aws.String(clo["role"].(string)), } - cloudwatchLoggingOptions = append(cloudwatchLoggingOptions, cloudwatchLoggingOption) - applicationUpdate.CloudWatchLoggingOptionUpdates = cloudwatchLoggingOptions + applicationUpdate.CloudWatchLoggingOptionUpdates = []*kinesisanalytics.CloudWatchLoggingOptionUpdate{cloudwatchLoggingOption} + } + } + + _, newInputs := d.GetChange("inputs") + if len(newInputs.([]interface{})) > 0 { + if v, ok := d.GetOk("inputs"); ok { + vL := v.([]interface{})[0].(map[string]interface{}) + inputUpdate := &kinesisanalytics.InputUpdate{ + InputId: aws.String(vL["id"].(string)), + NamePrefixUpdate: aws.String(vL["name_prefix"].(string)), + } + + if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfiu := &kinesisanalytics.KinesisFirehoseInputUpdate{ + ResourceARNUpdate: aws.String(kf["resource"].(string)), + RoleARNUpdate: aws.String(kf["role"].(string)), + } + inputUpdate.KinesisFirehoseInputUpdate = kfiu + } + + if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + ksiu := &kinesisanalytics.KinesisStreamsInputUpdate{ + ResourceARNUpdate: aws.String(ks["resource"].(string)), + RoleARNUpdate: aws.String(ks["role"].(string)), + } + inputUpdate.KinesisStreamsInputUpdate = ksiu + } + + if v := vL["parallelism"].([]interface{}); len(v) > 0 { + p := v[0].(map[string]interface{}) + + if c, ok := p["count"]; ok { + ipu := &kinesisanalytics.InputParallelismUpdate{ + CountUpdate: aws.Int64(int64(c.(int))), + } + inputUpdate.InputParallelismUpdate = ipu + } + } + + if v := vL["processing_configuration"].([]interface{}); len(v) > 0 { + pc := v[0].(map[string]interface{}) + + if l := pc["lambda"].([]interface{}); len(l) > 0 { + lp := l[0].(map[string]interface{}) + ipc := &kinesisanalytics.InputProcessingConfigurationUpdate{ + InputLambdaProcessorUpdate: &kinesisanalytics.InputLambdaProcessorUpdate{ + ResourceARNUpdate: aws.String(lp["resource"].(string)), + RoleARNUpdate: aws.String(lp["role"].(string)), + }, + } + inputUpdate.InputProcessingConfigurationUpdate = ipc + } + } + + if v := vL["schema"].([]interface{}); len(v) > 0 { + ss := &kinesisanalytics.InputSchemaUpdate{} + vL := v[0].(map[string]interface{}) + + if v := vL["record_columns"].([]interface{}); len(v) > 0 { + var rcs []*kinesisanalytics.RecordColumn + + for _, rc := range v { + rcD := rc.(map[string]interface{}) + rc := &kinesisanalytics.RecordColumn{ + Name: aws.String(rcD["name"].(string)), + SqlType: aws.String(rcD["sql_type"].(string)), + } + + if v, ok := rcD["mapping"]; ok { + rc.Mapping = aws.String(v.(string)) + } + + rcs = append(rcs, rc) + } + + ss.RecordColumnUpdates = rcs + } + + if v, ok := vL["record_encoding"]; ok && v.(string) != "" { + ss.RecordEncodingUpdate = aws.String(v.(string)) + } + + if v := vL["record_format"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + rf := &kinesisanalytics.RecordFormat{} + + if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + mp := &kinesisanalytics.MappingParameters{} + + if v := vL["csv"].([]interface{}); len(v) > 0 { + cL := v[0].(map[string]interface{}) + cmp := &kinesisanalytics.CSVMappingParameters{ + RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), + RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), + } + mp.CSVMappingParameters = cmp + rf.RecordFormatType = aws.String("CSV") + } + + if v := vL["json"].([]interface{}); len(v) > 0 { + jL := v[0].(map[string]interface{}) + jmp := &kinesisanalytics.JSONMappingParameters{ + RecordRowPath: aws.String(jL["record_row_path"].(string)), + } + mp.JSONMappingParameters = jmp + rf.RecordFormatType = aws.String("JSON") + } + rf.MappingParameters = mp + } + + ss.RecordFormatUpdate = rf + } + + inputUpdate.InputSchemaUpdate = ss + } + + applicationUpdate.InputUpdates = []*kinesisanalytics.InputUpdate{inputUpdate} } } diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index 24d0b347317..70a0ceec55b 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "regexp" "testing" "time" @@ -54,8 +55,8 @@ func TestAccAWSKinesisAnalyticsApplication_update(t *testing.T) { { Config: testAccKinesisAnalyticsApplication_update(rInt), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resName, "code", "testCode2\n"), resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "code", "testCode2\n"), ), }, }, @@ -69,6 +70,7 @@ func TestAccAWSKinesisAnalyticsApplication_addCloudwatchLoggingOptions(t *testin firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_basic(rInt) thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt, "testStream") + streamRe := regexp.MustCompile(fmt.Sprintf("^arn:.*:log-stream:testAcc-testStream$")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -94,6 +96,7 @@ func TestAccAWSKinesisAnalyticsApplication_addCloudwatchLoggingOptions(t *testin testAccCheckKinesisAnalyticsApplicationExists(resName, &application), resource.TestCheckResourceAttr(resName, "version", "2"), resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), + resource.TestMatchResourceAttr(resName, "cloudwatch_logging_options.0.log_stream", streamRe), ), }, }, @@ -107,6 +110,8 @@ func TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions(t *tes firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt, "testStream") thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_cloudwatchLoggingOptions(rInt, "testStream2") + beforeRe := regexp.MustCompile(fmt.Sprintf("^arn:.*:log-stream:testAcc-testStream$")) + afterRe := regexp.MustCompile(fmt.Sprintf("^arn:.*:log-stream:testAcc-testStream2$")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -125,6 +130,7 @@ func TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions(t *tes testAccCheckKinesisAnalyticsApplicationExists(resName, &application), resource.TestCheckResourceAttr(resName, "version", "1"), resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), + resource.TestMatchResourceAttr(resName, "cloudwatch_logging_options.0.log_stream", beforeRe), ), }, { @@ -133,6 +139,7 @@ func TestAccAWSKinesisAnalyticsApplication_updateCloudwatchLoggingOptions(t *tes testAccCheckKinesisAnalyticsApplicationExists(resName, &application), resource.TestCheckResourceAttr(resName, "version", "2"), resource.TestCheckResourceAttr(resName, "cloudwatch_logging_options.#", "1"), + resource.TestMatchResourceAttr(resName, "cloudwatch_logging_options.0.log_stream", afterRe), ), }, }, @@ -163,6 +170,59 @@ func TestAccAWSKinesisAnalyticsApplication_inputsKinesisStream(t *testing.T) { testAccCheckKinesisAnalyticsApplicationExists(resName, &application), resource.TestCheckResourceAttr(resName, "version", "1"), resource.TestCheckResourceAttr(resName, "inputs.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.name_prefix", "test_prefix"), + resource.TestCheckResourceAttr(resName, "inputs.0.kinesis_stream.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.parallelism.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_columns.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_format.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_format.0.mapping_parameters.0.json.#", "1"), + ), + }, + }, + }) +} + +func TestAccAWSKinesisAnalyticsApplication_inputUpdateKinesisStream(t *testing.T) { + var before, after kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_inputsKinesisStream(rInt) + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_inputUpdateKinesisStream(rInt, "test2") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &before), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "inputs.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.name_prefix", "test_prefix"), + resource.TestCheckResourceAttr(resName, "inputs.0.parallelism.0.count", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_format.0.mapping_parameters.0.json.#", "1"), + ), + }, + { + Config: thirdStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &after), + resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "inputs.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.name_prefix", "test_prefix2"), + resource.TestCheckResourceAttr(resName, "inputs.0.parallelism.0.count", "2"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_columns.0.name", "test2"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_format.0.mapping_parameters.0.csv.#", "1"), ), }, }, @@ -284,7 +344,6 @@ resource "aws_kinesis_analytics_application" "test" { } record_encoding = "UTF-8" record_format { - record_format_type = "JSON" mapping_parameters { json { record_row_path = "$" @@ -297,6 +356,47 @@ resource "aws_kinesis_analytics_application" "test" { `, rInt, rInt) } +func testAccKinesisAnalyticsApplication_inputUpdateKinesisStream(rInt int, streamName string) string { + return fmt.Sprintf(` +resource "aws_kinesis_stream" "test" { + name = "testAcc-%s" + shard_count = 1 +} + +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + code = "testCode\n" + + inputs { + name_prefix = "test_prefix2" + kinesis_stream { + resource = "${aws_kinesis_stream.test.arn}" + role = "${aws_iam_role.test.arn}" + } + parallelism { + count = 2 + } + schema { + record_columns { + mapping = "$.test2" + name = "test2" + sql_type = "VARCHAR(8)" + } + record_encoding = "UTF-8" + record_format { + mapping_parameters { + csv { + record_column_delimiter = "," + record_row_delimiter = "\n" + } + } + } + } + } +} +`, streamName, rInt) +} + func fulfillSleep() resource.TestCheckFunc { return func(s *terraform.State) error { log.Print("[DEBUG] Test: Sleep to allow IAM to propagate") From 83f20011cbd264c90a5f6ef212966f3d772a64a9 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 12:21:00 -0400 Subject: [PATCH 2994/3316] create outputs schema --- ...ource_aws_kinesis_analytics_application.go | 85 ++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index d83bd2167d5..c16956990d1 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -308,7 +308,90 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{}, + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "kinesis_firehose": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "kinesis_stream": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "lambda": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "name": { + Type: schema.TypeString, + Required: true, + }, + + "schema": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_format_type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, }, }, }, From 9e2e3ad405f4f8dfeaba0788c6c618a1f229f3d7 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 12:54:53 -0400 Subject: [PATCH 2995/3316] create with outputs --- ...ource_aws_kinesis_analytics_application.go | 55 +++++++++++++++-- ..._aws_kinesis_analytics_application_test.go | 59 +++++++++++++++++++ 2 files changed, 110 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index c16956990d1..96bfc788744 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -421,6 +421,12 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i createOpts.Inputs = []*kinesisanalytics.Input{inputs} } + if v, ok := d.GetOk("outputs"); ok { + o := v.([]interface{})[0].(map[string]interface{}) + outputs := createOutputs(o) + createOpts.Outputs = []*kinesisanalytics.Output{outputs} + } + _, err := conn.CreateApplication(createOpts) if err != nil { return fmt.Errorf("Unable to create Kinesis Analytics Application: %s", err) @@ -545,10 +551,8 @@ func createCloudwatchLoggingOption(clo map[string]interface{}) *kinesisanalytics } func createInputs(i map[string]interface{}) *kinesisanalytics.Input { - input := &kinesisanalytics.Input{} - - if v, ok := i["name_prefix"]; ok { - input.NamePrefix = aws.String(v.(string)) + input := &kinesisanalytics.Input{ + NamePrefix: aws.String(i["name_prefix"].(string)), } if v := i["kinesis_firehose"].([]interface{}); len(v) > 0 { @@ -661,6 +665,49 @@ func createInputs(i map[string]interface{}) *kinesisanalytics.Input { return input } +func createOutputs(o map[string]interface{}) *kinesisanalytics.Output { + output := &kinesisanalytics.Output{ + Name: aws.String(o["name"].(string)), + } + + if v := o["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfo := &kinesisanalytics.KinesisFirehoseOutput{ + ResourceARN: aws.String(kf["resource"].(string)), + RoleARN: aws.String(kf["role"].(string)), + } + output.KinesisFirehoseOutput = kfo + } + + if v := o["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + kso := &kinesisanalytics.KinesisStreamsOutput{ + ResourceARN: aws.String(ks["resource"].(string)), + RoleARN: aws.String(ks["role"].(string)), + } + output.KinesisStreamsOutput = kso + } + + if v := o["lambda"].([]interface{}); len(v) > 0 { + l := v[0].(map[string]interface{}) + lo := &kinesisanalytics.LambdaOutput{ + ResourceARN: aws.String(l["resource"].(string)), + RoleARN: aws.String(l["role"].(string)), + } + output.LambdaOutput = lo + } + + if v := o["schema"].([]interface{}); len(v) > 0 { + ds := v[0].(map[string]interface{}) + dso := &kinesisanalytics.DestinationSchema{ + RecordFormatType: aws.String(ds["record_format_type"].(string)), + } + output.DestinationSchema = dso + } + + return output +} + func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index 70a0ceec55b..d0bfde3c215 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -229,6 +229,40 @@ func TestAccAWSKinesisAnalyticsApplication_inputUpdateKinesisStream(t *testing.T }) } +func TestAccAWSKinesisAnalyticsApplication_outputsKinesisStream(t *testing.T) { + var application kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_outputsKinesisStream(rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "outputs.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.name", "test_name"), + resource.TestCheckResourceAttr(resName, "outputs.0.kinesis_stream.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.schema.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.schema.0.record_format_type", "JSON"), + ), + }, + }, + }) +} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { @@ -397,6 +431,31 @@ resource "aws_kinesis_analytics_application" "test" { `, streamName, rInt) } +func testAccKinesisAnalyticsApplication_outputsKinesisStream(rInt int) string { + return fmt.Sprintf(` +resource "aws_kinesis_stream" "test" { + name = "testAcc-%d" + shard_count = 1 +} + +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + code = "testCode\n" + + outputs { + name = "test_name" + kinesis_stream { + resource = "${aws_kinesis_stream.test.arn}" + role = "${aws_iam_role.test.arn}" + } + schema { + record_format_type = "JSON" + } + } +} +`, rInt, rInt) +} + func fulfillSleep() resource.TestCheckFunc { return func(s *terraform.State) error { log.Print("[DEBUG] Test: Sleep to allow IAM to propagate") From 3dea1a66bc8e9049ed8985daf2625cf9abd4568c Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 13:10:08 -0400 Subject: [PATCH 2996/3316] read outputs --- ...ource_aws_kinesis_analytics_application.go | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 96bfc788744..ee1d06b10b5 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -472,6 +472,10 @@ func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta int return err } + if err := d.Set("outputs", getOutputs(resp.ApplicationDetail.OutputDescriptions)); err != nil { + return err + } + return nil } @@ -996,3 +1000,55 @@ func getInputs(inputs []*kinesisanalytics.InputDescription) []interface{} { } return s } + +func getOutputs(outputs []*kinesisanalytics.OutputDescription) []interface{} { + s := []interface{}{} + + if len(outputs) > 0 { + id := outputs[0] + + output := map[string]interface{}{ + "id": aws.StringValue(id.OutputId), + "name": aws.StringValue(id.Name), + } + + if id.KinesisFirehoseOutputDescription != nil { + output["kinesis_firehose"] = []interface{}{ + map[string]interface{}{ + "resource": aws.StringValue(id.KinesisFirehoseOutputDescription.ResourceARN), + "role": aws.StringValue(id.KinesisFirehoseOutputDescription.RoleARN), + }, + } + } + + if id.KinesisStreamsOutputDescription != nil { + output["kinesis_stream"] = []interface{}{ + map[string]interface{}{ + "resource": aws.StringValue(id.KinesisStreamsOutputDescription.ResourceARN), + "role": aws.StringValue(id.KinesisStreamsOutputDescription.RoleARN), + }, + } + } + + if id.LambdaOutputDescription != nil { + output["lambda"] = []interface{}{ + map[string]interface{}{ + "resource": aws.StringValue(id.LambdaOutputDescription.ResourceARN), + "role": aws.StringValue(id.LambdaOutputDescription.RoleARN), + }, + } + } + + if id.DestinationSchema != nil { + output["schema"] = []interface{}{ + map[string]interface{}{ + "record_format_type": aws.StringValue(id.DestinationSchema.RecordFormatType), + }, + } + } + + s = append(s, output) + } + + return s +} From 3f1c4fa583e94d11eda549f733f393adaa3686b2 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 13:27:23 -0400 Subject: [PATCH 2997/3316] add new inputs separate call --- ...ource_aws_kinesis_analytics_application.go | 28 +++++++++-- ..._aws_kinesis_analytics_application_test.go | 48 ++++++++++++++++++- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index ee1d06b10b5..1afcdb8fa2b 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -516,7 +516,29 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i CurrentApplicationVersionId: aws.Int64(int64(version)), CloudWatchLoggingOption: cloudwatchLoggingOption, } - conn.AddApplicationCloudWatchLoggingOption(addOpts) + _, err := conn.AddApplicationCloudWatchLoggingOption(addOpts) + if err != nil { + return err + } + version = version + 1 + } + } + + oldInputs, newInputs := d.GetChange("inputs") + if len(oldInputs.([]interface{})) == 0 && len(newInputs.([]interface{})) > 0 { + if v, ok := d.GetOk("inputs"); ok { + i := v.([]interface{})[0].(map[string]interface{}) + input := createInputs(i) + addOpts := &kinesisanalytics.AddApplicationInputInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + Input: input, + } + _, err := conn.AddApplicationInput(addOpts) + if err != nil { + return err + } + version = version + 1 } } } @@ -734,8 +756,8 @@ func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.Appl } } - _, newInputs := d.GetChange("inputs") - if len(newInputs.([]interface{})) > 0 { + oldInputs, newInputs := d.GetChange("inputs") + if len(oldInputs.([]interface{})) > 0 && len(newInputs.([]interface{})) > 0 { if v, ok := d.GetOk("inputs"); ok { vL := v.([]interface{})[0].(map[string]interface{}) inputUpdate := &kinesisanalytics.InputUpdate{ diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index d0bfde3c215..a35ede20012 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -183,7 +183,53 @@ func TestAccAWSKinesisAnalyticsApplication_inputsKinesisStream(t *testing.T) { }) } -func TestAccAWSKinesisAnalyticsApplication_inputUpdateKinesisStream(t *testing.T) { +func TestAccAWSKinesisAnalyticsApplication_inputsAdd(t *testing.T) { + var before, after kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_basic(rInt) + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_inputsKinesisStream(rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &before), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "inputs.#", "0"), + ), + }, + { + Config: thirdStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &after), + resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "inputs.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.name_prefix", "test_prefix"), + resource.TestCheckResourceAttr(resName, "inputs.0.kinesis_stream.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.parallelism.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_columns.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_format.#", "1"), + resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_format.0.mapping_parameters.0.json.#", "1"), + ), + }, + }, + }) +} + +func TestAccAWSKinesisAnalyticsApplication_inputsUpdateKinesisStream(t *testing.T) { var before, after kinesisanalytics.ApplicationDetail resName := "aws_kinesis_analytics_application.test" rInt := acctest.RandInt() From b0a904d7c6e0c0237dd3afdd5e3d98acef4dd55d Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 13:36:52 -0400 Subject: [PATCH 2998/3316] add new outputs separate call --- ...ource_aws_kinesis_analytics_application.go | 18 ++++++++ ..._aws_kinesis_analytics_application_test.go | 42 +++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 1afcdb8fa2b..61273882023 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -541,6 +541,24 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i version = version + 1 } } + + oldOutputs, newOutputs := d.GetChange("outputs") + if len(oldOutputs.([]interface{})) == 0 && len(newOutputs.([]interface{})) > 0 { + if v, ok := d.GetOk("outputs"); ok { + o := v.([]interface{})[0].(map[string]interface{}) + output := createOutputs(o) + addOpts := &kinesisanalytics.AddApplicationOutputInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + Output: output, + } + _, err := conn.AddApplicationOutput(addOpts) + if err != nil { + return err + } + version = version + 1 + } + } } return resourceAwsKinesisAnalyticsApplicationRead(d, meta) diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index a35ede20012..3d6d0542ff3 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -309,6 +309,48 @@ func TestAccAWSKinesisAnalyticsApplication_outputsKinesisStream(t *testing.T) { }) } +func TestAccAWSKinesisAnalyticsApplication_outputsAdd(t *testing.T) { + var before, after kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_basic(rInt) + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_outputsKinesisStream(rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &before), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "outputs.#", "0"), + ), + }, + { + Config: thirdStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &after), + resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "outputs.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.name", "test_name"), + resource.TestCheckResourceAttr(resName, "outputs.0.kinesis_stream.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.schema.#", "1"), + ), + }, + }, + }) +} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { From 105c40742f8e55be8c3b49e92bce99c6a69b2378 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 13:39:18 -0400 Subject: [PATCH 2999/3316] abstract functions --- ...ource_aws_kinesis_analytics_application.go | 198 +++++++++--------- 1 file changed, 101 insertions(+), 97 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 61273882023..c1f79ead6e5 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -765,11 +765,7 @@ func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.Appl if len(oldLoggingOptions.([]interface{})) > 0 && len(newLoggingOptions.([]interface{})) > 0 { if v, ok := d.GetOk("cloudwatch_logging_options"); ok { clo := v.([]interface{})[0].(map[string]interface{}) - cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOptionUpdate{ - CloudWatchLoggingOptionId: aws.String(clo["id"].(string)), - LogStreamARNUpdate: aws.String(clo["log_stream"].(string)), - RoleARNUpdate: aws.String(clo["role"].(string)), - } + cloudwatchLoggingOption := createCloudwatchLoggingOptionUpdate(clo) applicationUpdate.CloudWatchLoggingOptionUpdates = []*kinesisanalytics.CloudWatchLoggingOptionUpdate{cloudwatchLoggingOption} } } @@ -778,123 +774,131 @@ func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.Appl if len(oldInputs.([]interface{})) > 0 && len(newInputs.([]interface{})) > 0 { if v, ok := d.GetOk("inputs"); ok { vL := v.([]interface{})[0].(map[string]interface{}) - inputUpdate := &kinesisanalytics.InputUpdate{ - InputId: aws.String(vL["id"].(string)), - NamePrefixUpdate: aws.String(vL["name_prefix"].(string)), - } + inputUpdate := createInputUpdate(vL) + applicationUpdate.InputUpdates = []*kinesisanalytics.InputUpdate{inputUpdate} + } + } - if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { - kf := v[0].(map[string]interface{}) - kfiu := &kinesisanalytics.KinesisFirehoseInputUpdate{ - ResourceARNUpdate: aws.String(kf["resource"].(string)), - RoleARNUpdate: aws.String(kf["role"].(string)), - } - inputUpdate.KinesisFirehoseInputUpdate = kfiu + return applicationUpdate, nil +} + +func createInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate { + inputUpdate := &kinesisanalytics.InputUpdate{ + InputId: aws.String(vL["id"].(string)), + NamePrefixUpdate: aws.String(vL["name_prefix"].(string)), + } + if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfiu := &kinesisanalytics.KinesisFirehoseInputUpdate{ + ResourceARNUpdate: aws.String(kf["resource"].(string)), + RoleARNUpdate: aws.String(kf["role"].(string)), + } + inputUpdate.KinesisFirehoseInputUpdate = kfiu + } + if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + ksiu := &kinesisanalytics.KinesisStreamsInputUpdate{ + ResourceARNUpdate: aws.String(ks["resource"].(string)), + RoleARNUpdate: aws.String(ks["role"].(string)), + } + inputUpdate.KinesisStreamsInputUpdate = ksiu + } + if v := vL["parallelism"].([]interface{}); len(v) > 0 { + p := v[0].(map[string]interface{}) + + if c, ok := p["count"]; ok { + ipu := &kinesisanalytics.InputParallelismUpdate{ + CountUpdate: aws.Int64(int64(c.(int))), } + inputUpdate.InputParallelismUpdate = ipu + } + } + if v := vL["processing_configuration"].([]interface{}); len(v) > 0 { + pc := v[0].(map[string]interface{}) - if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { - ks := v[0].(map[string]interface{}) - ksiu := &kinesisanalytics.KinesisStreamsInputUpdate{ - ResourceARNUpdate: aws.String(ks["resource"].(string)), - RoleARNUpdate: aws.String(ks["role"].(string)), - } - inputUpdate.KinesisStreamsInputUpdate = ksiu + if l := pc["lambda"].([]interface{}); len(l) > 0 { + lp := l[0].(map[string]interface{}) + ipc := &kinesisanalytics.InputProcessingConfigurationUpdate{ + InputLambdaProcessorUpdate: &kinesisanalytics.InputLambdaProcessorUpdate{ + ResourceARNUpdate: aws.String(lp["resource"].(string)), + RoleARNUpdate: aws.String(lp["role"].(string)), + }, } + inputUpdate.InputProcessingConfigurationUpdate = ipc + } + } + if v := vL["schema"].([]interface{}); len(v) > 0 { + ss := &kinesisanalytics.InputSchemaUpdate{} + vL := v[0].(map[string]interface{}) - if v := vL["parallelism"].([]interface{}); len(v) > 0 { - p := v[0].(map[string]interface{}) + if v := vL["record_columns"].([]interface{}); len(v) > 0 { + var rcs []*kinesisanalytics.RecordColumn - if c, ok := p["count"]; ok { - ipu := &kinesisanalytics.InputParallelismUpdate{ - CountUpdate: aws.Int64(int64(c.(int))), - } - inputUpdate.InputParallelismUpdate = ipu + for _, rc := range v { + rcD := rc.(map[string]interface{}) + rc := &kinesisanalytics.RecordColumn{ + Name: aws.String(rcD["name"].(string)), + SqlType: aws.String(rcD["sql_type"].(string)), } - } - if v := vL["processing_configuration"].([]interface{}); len(v) > 0 { - pc := v[0].(map[string]interface{}) - - if l := pc["lambda"].([]interface{}); len(l) > 0 { - lp := l[0].(map[string]interface{}) - ipc := &kinesisanalytics.InputProcessingConfigurationUpdate{ - InputLambdaProcessorUpdate: &kinesisanalytics.InputLambdaProcessorUpdate{ - ResourceARNUpdate: aws.String(lp["resource"].(string)), - RoleARNUpdate: aws.String(lp["role"].(string)), - }, - } - inputUpdate.InputProcessingConfigurationUpdate = ipc + if v, ok := rcD["mapping"]; ok { + rc.Mapping = aws.String(v.(string)) } + + rcs = append(rcs, rc) } - if v := vL["schema"].([]interface{}); len(v) > 0 { - ss := &kinesisanalytics.InputSchemaUpdate{} - vL := v[0].(map[string]interface{}) + ss.RecordColumnUpdates = rcs + } - if v := vL["record_columns"].([]interface{}); len(v) > 0 { - var rcs []*kinesisanalytics.RecordColumn + if v, ok := vL["record_encoding"]; ok && v.(string) != "" { + ss.RecordEncodingUpdate = aws.String(v.(string)) + } - for _, rc := range v { - rcD := rc.(map[string]interface{}) - rc := &kinesisanalytics.RecordColumn{ - Name: aws.String(rcD["name"].(string)), - SqlType: aws.String(rcD["sql_type"].(string)), - } + if v := vL["record_format"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + rf := &kinesisanalytics.RecordFormat{} - if v, ok := rcD["mapping"]; ok { - rc.Mapping = aws.String(v.(string)) - } + if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + mp := &kinesisanalytics.MappingParameters{} - rcs = append(rcs, rc) + if v := vL["csv"].([]interface{}); len(v) > 0 { + cL := v[0].(map[string]interface{}) + cmp := &kinesisanalytics.CSVMappingParameters{ + RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), + RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), } - - ss.RecordColumnUpdates = rcs - } - - if v, ok := vL["record_encoding"]; ok && v.(string) != "" { - ss.RecordEncodingUpdate = aws.String(v.(string)) + mp.CSVMappingParameters = cmp + rf.RecordFormatType = aws.String("CSV") } - if v := vL["record_format"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - rf := &kinesisanalytics.RecordFormat{} - - if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - mp := &kinesisanalytics.MappingParameters{} - - if v := vL["csv"].([]interface{}); len(v) > 0 { - cL := v[0].(map[string]interface{}) - cmp := &kinesisanalytics.CSVMappingParameters{ - RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), - RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), - } - mp.CSVMappingParameters = cmp - rf.RecordFormatType = aws.String("CSV") - } - - if v := vL["json"].([]interface{}); len(v) > 0 { - jL := v[0].(map[string]interface{}) - jmp := &kinesisanalytics.JSONMappingParameters{ - RecordRowPath: aws.String(jL["record_row_path"].(string)), - } - mp.JSONMappingParameters = jmp - rf.RecordFormatType = aws.String("JSON") - } - rf.MappingParameters = mp + if v := vL["json"].([]interface{}); len(v) > 0 { + jL := v[0].(map[string]interface{}) + jmp := &kinesisanalytics.JSONMappingParameters{ + RecordRowPath: aws.String(jL["record_row_path"].(string)), } - - ss.RecordFormatUpdate = rf + mp.JSONMappingParameters = jmp + rf.RecordFormatType = aws.String("JSON") } - - inputUpdate.InputSchemaUpdate = ss + rf.MappingParameters = mp } - applicationUpdate.InputUpdates = []*kinesisanalytics.InputUpdate{inputUpdate} + ss.RecordFormatUpdate = rf } + + inputUpdate.InputSchemaUpdate = ss } + return inputUpdate +} - return applicationUpdate, nil +func createCloudwatchLoggingOptionUpdate(clo map[string]interface{}) *kinesisanalytics.CloudWatchLoggingOptionUpdate { + cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOptionUpdate{ + CloudWatchLoggingOptionId: aws.String(clo["id"].(string)), + LogStreamARNUpdate: aws.String(clo["log_stream"].(string)), + RoleARNUpdate: aws.String(clo["role"].(string)), + } + return cloudwatchLoggingOption } func getCloudwatchLoggingOptions(options []*kinesisanalytics.CloudWatchLoggingOptionDescription) []interface{} { From 2a3fe2d5f5563176f28da2703c45c9a2c7c6cb23 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 14:17:32 -0400 Subject: [PATCH 3000/3316] update outputs --- ...ource_aws_kinesis_analytics_application.go | 61 +++++++++++++- ..._aws_kinesis_analytics_application_test.go | 80 ++++++++++++++++++- 2 files changed, 137 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index c1f79ead6e5..56791fe56d8 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -779,6 +779,15 @@ func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.Appl } } + oldOutputs, newOutputs := d.GetChange("outputs") + if len(oldOutputs.([]interface{})) > 0 && len(newOutputs.([]interface{})) > 0 { + if v, ok := d.GetOk("outputs"); ok { + vL := v.([]interface{})[0].(map[string]interface{}) + outputUpdate := createOutputUpdate(vL) + applicationUpdate.OutputUpdates = []*kinesisanalytics.OutputUpdate{outputUpdate} + } + } + return applicationUpdate, nil } @@ -787,6 +796,7 @@ func createInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate InputId: aws.String(vL["id"].(string)), NamePrefixUpdate: aws.String(vL["name_prefix"].(string)), } + if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { kf := v[0].(map[string]interface{}) kfiu := &kinesisanalytics.KinesisFirehoseInputUpdate{ @@ -795,6 +805,7 @@ func createInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate } inputUpdate.KinesisFirehoseInputUpdate = kfiu } + if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { ks := v[0].(map[string]interface{}) ksiu := &kinesisanalytics.KinesisStreamsInputUpdate{ @@ -803,6 +814,7 @@ func createInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate } inputUpdate.KinesisStreamsInputUpdate = ksiu } + if v := vL["parallelism"].([]interface{}); len(v) > 0 { p := v[0].(map[string]interface{}) @@ -813,6 +825,7 @@ func createInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate inputUpdate.InputParallelismUpdate = ipu } } + if v := vL["processing_configuration"].([]interface{}); len(v) > 0 { pc := v[0].(map[string]interface{}) @@ -827,6 +840,7 @@ func createInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate inputUpdate.InputProcessingConfigurationUpdate = ipc } } + if v := vL["schema"].([]interface{}); len(v) > 0 { ss := &kinesisanalytics.InputSchemaUpdate{} vL := v[0].(map[string]interface{}) @@ -883,15 +897,58 @@ func createInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate } rf.MappingParameters = mp } - ss.RecordFormatUpdate = rf } - inputUpdate.InputSchemaUpdate = ss } + return inputUpdate } +func createOutputUpdate(vL map[string]interface{}) *kinesisanalytics.OutputUpdate { + outputUpdate := &kinesisanalytics.OutputUpdate{ + OutputId: aws.String(vL["id"].(string)), + NameUpdate: aws.String(vL["name"].(string)), + } + + if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfou := &kinesisanalytics.KinesisFirehoseOutputUpdate{ + ResourceARNUpdate: aws.String(kf["resource"].(string)), + RoleARNUpdate: aws.String(kf["role"].(string)), + } + outputUpdate.KinesisFirehoseOutputUpdate = kfou + } + + if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + ksou := &kinesisanalytics.KinesisStreamsOutputUpdate{ + ResourceARNUpdate: aws.String(ks["resource"].(string)), + RoleARNUpdate: aws.String(ks["role"].(string)), + } + outputUpdate.KinesisStreamsOutputUpdate = ksou + } + + if v := vL["lambda"].([]interface{}); len(v) > 0 { + l := v[0].(map[string]interface{}) + lou := &kinesisanalytics.LambdaOutputUpdate{ + ResourceARNUpdate: aws.String(l["resource"].(string)), + RoleARNUpdate: aws.String(l["role"].(string)), + } + outputUpdate.LambdaOutputUpdate = lou + } + + if v := vL["schema"].([]interface{}); len(v) > 0 { + ds := v[0].(map[string]interface{}) + dsu := &kinesisanalytics.DestinationSchema{ + RecordFormatType: aws.String(ds["record_format_type"].(string)), + } + outputUpdate.DestinationSchemaUpdate = dsu + } + + return outputUpdate +} + func createCloudwatchLoggingOptionUpdate(clo map[string]interface{}) *kinesisanalytics.CloudWatchLoggingOptionUpdate { cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOptionUpdate{ CloudWatchLoggingOptionId: aws.String(clo["id"].(string)), diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index 3d6d0542ff3..ef9b3b266b7 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -235,7 +235,8 @@ func TestAccAWSKinesisAnalyticsApplication_inputsUpdateKinesisStream(t *testing. rInt := acctest.RandInt() firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_inputsKinesisStream(rInt) - thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_inputUpdateKinesisStream(rInt, "test2") + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_inputsUpdateKinesisStream(rInt, "testStream") + streamRe := regexp.MustCompile(fmt.Sprintf("^arn:.*:stream/testAcc-testStream$")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -266,6 +267,7 @@ func TestAccAWSKinesisAnalyticsApplication_inputsUpdateKinesisStream(t *testing. resource.TestCheckResourceAttr(resName, "version", "2"), resource.TestCheckResourceAttr(resName, "inputs.#", "1"), resource.TestCheckResourceAttr(resName, "inputs.0.name_prefix", "test_prefix2"), + resource.TestMatchResourceAttr(resName, "inputs.0.kinesis_stream.0.resource", streamRe), resource.TestCheckResourceAttr(resName, "inputs.0.parallelism.0.count", "2"), resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_columns.0.name", "test2"), resource.TestCheckResourceAttr(resName, "inputs.0.schema.0.record_format.0.mapping_parameters.0.csv.#", "1"), @@ -351,6 +353,55 @@ func TestAccAWSKinesisAnalyticsApplication_outputsAdd(t *testing.T) { }) } +func TestAccAWSKinesisAnalyticsApplication_outputsUpdateKinesisStream(t *testing.T) { + var before, after kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_outputsKinesisStream(rInt) + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_outputsUpdateKinesisStream(rInt, "testStream") + streamRe := regexp.MustCompile(fmt.Sprintf("^arn:.*:stream/testAcc-testStream$")) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &before), + resource.TestCheckResourceAttr(resName, "version", "1"), + resource.TestCheckResourceAttr(resName, "outputs.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.name", "test_name"), + resource.TestCheckResourceAttr(resName, "outputs.0.kinesis_stream.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.schema.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.schema.0.record_format_type", "JSON"), + ), + }, + { + Config: thirdStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &after), + resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "outputs.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.name", "test_name2"), + resource.TestCheckResourceAttr(resName, "outputs.0.kinesis_stream.#", "1"), + resource.TestMatchResourceAttr(resName, "outputs.0.kinesis_stream.0.resource", streamRe), + resource.TestCheckResourceAttr(resName, "outputs.0.schema.#", "1"), + resource.TestCheckResourceAttr(resName, "outputs.0.schema.0.record_format_type", "CSV"), + ), + }, + }, + }) +} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { @@ -478,7 +529,7 @@ resource "aws_kinesis_analytics_application" "test" { `, rInt, rInt) } -func testAccKinesisAnalyticsApplication_inputUpdateKinesisStream(rInt int, streamName string) string { +func testAccKinesisAnalyticsApplication_inputsUpdateKinesisStream(rInt int, streamName string) string { return fmt.Sprintf(` resource "aws_kinesis_stream" "test" { name = "testAcc-%s" @@ -544,6 +595,31 @@ resource "aws_kinesis_analytics_application" "test" { `, rInt, rInt) } +func testAccKinesisAnalyticsApplication_outputsUpdateKinesisStream(rInt int, streamName string) string { + return fmt.Sprintf(` +resource "aws_kinesis_stream" "test" { + name = "testAcc-%s" + shard_count = 1 +} + +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + code = "testCode\n" + + outputs { + name = "test_name2" + kinesis_stream { + resource = "${aws_kinesis_stream.test.arn}" + role = "${aws_iam_role.test.arn}" + } + schema { + record_format_type = "CSV" + } + } +} +`, streamName, rInt) +} + func fulfillSleep() resource.TestCheckFunc { return func(s *terraform.State) error { log.Print("[DEBUG] Test: Sleep to allow IAM to propagate") From 14ff440232752e8870726dfb6f0705563b8fd879 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 14:23:58 -0400 Subject: [PATCH 3001/3316] validate record_format_type --- aws/resource_aws_kinesis_analytics_application.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 56791fe56d8..4d9c9ece148 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/kinesisanalytics" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsKinesisAnalyticsApplication() *schema.Resource { @@ -387,6 +388,10 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "record_format_type": { Type: schema.TypeString, Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + kinesisanalytics.RecordFormatTypeCsv, + kinesisanalytics.RecordFormatTypeJson, + }, false), }, }, }, From 25d0d74f4d2f534905ac2cadd4751d86ee8f6a06 Mon Sep 17 00:00:00 2001 From: kl4w Date: Sun, 5 Aug 2018 14:41:03 -0400 Subject: [PATCH 3002/3316] create reference data source schema --- ...ource_aws_kinesis_analytics_application.go | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 4d9c9ece148..462226f7555 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -308,6 +308,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { "outputs": { Type: schema.TypeList, Optional: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "id": { @@ -399,6 +400,142 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource { }, }, }, + + "reference_data_sources": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "s3": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "file_key": { + Type: schema.TypeString, + Required: true, + }, + + "role": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "schema": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_columns": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping": { + Type: schema.TypeString, + Optional: true, + }, + + "name": { + Type: schema.TypeString, + Required: true, + }, + + "sql_type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "record_encoding": { + Type: schema.TypeString, + Optional: true, + }, + + "record_format": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping_parameters": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "csv": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_column_delimiter": { + Type: schema.TypeString, + Required: true, + }, + + "record_row_delimiter": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "json": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_row_path": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + }, + }, + + "record_format_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + + "table_name": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, } } From cb239af5b9b31886df5cde03467c3c49d0f5b6bc Mon Sep 17 00:00:00 2001 From: Kash Date: Mon, 6 Aug 2018 11:46:57 -0400 Subject: [PATCH 3003/3316] abstract creating source schema --- ...ource_aws_kinesis_analytics_application.go | 91 ++++++++++--------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 462226f7555..ad8742364c2 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -786,69 +786,72 @@ func createInputs(i map[string]interface{}) *kinesisanalytics.Input { } if v := i["schema"].([]interface{}); len(v) > 0 { - ss := &kinesisanalytics.SourceSchema{} vL := v[0].(map[string]interface{}) + ss := createSourceSchema(vL) + input.InputSchema = ss + } - if v := vL["record_columns"].([]interface{}); len(v) > 0 { - var rcs []*kinesisanalytics.RecordColumn + return input +} - for _, rc := range v { - rcD := rc.(map[string]interface{}) - rc := &kinesisanalytics.RecordColumn{ - Name: aws.String(rcD["name"].(string)), - SqlType: aws.String(rcD["sql_type"].(string)), - } +func createSourceSchema(vL map[string]interface{}) *kinesisanalytics.SourceSchema { + ss := &kinesisanalytics.SourceSchema{} + if v := vL["record_columns"].([]interface{}); len(v) > 0 { + var rcs []*kinesisanalytics.RecordColumn - if v, ok := rcD["mapping"]; ok { - rc.Mapping = aws.String(v.(string)) - } + for _, rc := range v { + rcD := rc.(map[string]interface{}) + rc := &kinesisanalytics.RecordColumn{ + Name: aws.String(rcD["name"].(string)), + SqlType: aws.String(rcD["sql_type"].(string)), + } - rcs = append(rcs, rc) + if v, ok := rcD["mapping"]; ok { + rc.Mapping = aws.String(v.(string)) } - ss.RecordColumns = rcs + rcs = append(rcs, rc) } - if v, ok := vL["record_encoding"]; ok && v.(string) != "" { - ss.RecordEncoding = aws.String(v.(string)) - } + ss.RecordColumns = rcs + } - if v := vL["record_format"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - rf := &kinesisanalytics.RecordFormat{} + if v, ok := vL["record_encoding"]; ok && v.(string) != "" { + ss.RecordEncoding = aws.String(v.(string)) + } - if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { - vL := v[0].(map[string]interface{}) - mp := &kinesisanalytics.MappingParameters{} + if v := vL["record_format"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + rf := &kinesisanalytics.RecordFormat{} - if v := vL["csv"].([]interface{}); len(v) > 0 { - cL := v[0].(map[string]interface{}) - cmp := &kinesisanalytics.CSVMappingParameters{ - RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), - RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), - } - mp.CSVMappingParameters = cmp - rf.RecordFormatType = aws.String("CSV") - } + if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + mp := &kinesisanalytics.MappingParameters{} - if v := vL["json"].([]interface{}); len(v) > 0 { - jL := v[0].(map[string]interface{}) - jmp := &kinesisanalytics.JSONMappingParameters{ - RecordRowPath: aws.String(jL["record_row_path"].(string)), - } - mp.JSONMappingParameters = jmp - rf.RecordFormatType = aws.String("JSON") + if v := vL["csv"].([]interface{}); len(v) > 0 { + cL := v[0].(map[string]interface{}) + cmp := &kinesisanalytics.CSVMappingParameters{ + RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), + RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), } - rf.MappingParameters = mp + mp.CSVMappingParameters = cmp + rf.RecordFormatType = aws.String("CSV") } - ss.RecordFormat = rf + if v := vL["json"].([]interface{}); len(v) > 0 { + jL := v[0].(map[string]interface{}) + jmp := &kinesisanalytics.JSONMappingParameters{ + RecordRowPath: aws.String(jL["record_row_path"].(string)), + } + mp.JSONMappingParameters = jmp + rf.RecordFormatType = aws.String("JSON") + } + rf.MappingParameters = mp } - input.InputSchema = ss + ss.RecordFormat = rf } - - return input + return ss } func createOutputs(o map[string]interface{}) *kinesisanalytics.Output { From 17d560aeceb8b7eae0b1311d7c9ad8d6ce6aa3f9 Mon Sep 17 00:00:00 2001 From: Kash Date: Mon, 6 Aug 2018 12:44:57 -0400 Subject: [PATCH 3004/3316] create with reference data --- ...ource_aws_kinesis_analytics_application.go | 55 +++++++++++++++- ..._aws_kinesis_analytics_application_test.go | 66 +++++++++++++++++++ 2 files changed, 118 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index ad8742364c2..9fc689f7130 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -574,7 +574,7 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i return fmt.Errorf("Unable to create Kinesis Analytics Application: %s", err) } - return resourceAwsKinesisAnalyticsApplicationRead(d, meta) + return resourceAwsKinesisAnalyticsApplicationUpdate(d, meta) } func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta interface{}) error { @@ -622,12 +622,18 @@ func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta int } func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta interface{}) error { + var version int conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + + if v, ok := d.GetOk("version"); ok { + version = v.(int) + } else { + version = 1 + } if !d.IsNewResource() { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} - name := d.Get("name").(string) - version := d.Get("version").(int) updateApplicationOpts := &kinesisanalytics.UpdateApplicationInput{ ApplicationName: aws.String(name), @@ -703,6 +709,26 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i } } + oldReferenceData, newReferenceData := d.GetChange("reference_data_sources") + if len(oldReferenceData.([]interface{})) == 0 && len(newReferenceData.([]interface{})) > 0 { + if v := d.Get("reference_data_sources").([]interface{}); len(v) > 0 { + for _, r := range v { + rd := r.(map[string]interface{}) + referenceData := createReferenceData(rd) + addOpts := &kinesisanalytics.AddApplicationReferenceDataSourceInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + ReferenceDataSource: referenceData, + } + _, err := conn.AddApplicationReferenceDataSource(addOpts) + if err != nil { + return err + } + version = version + 1 + } + } + } + return resourceAwsKinesisAnalyticsApplicationRead(d, meta) } @@ -897,6 +923,29 @@ func createOutputs(o map[string]interface{}) *kinesisanalytics.Output { return output } +func createReferenceData(rd map[string]interface{}) *kinesisanalytics.ReferenceDataSource { + referenceData := &kinesisanalytics.ReferenceDataSource{ + TableName: aws.String(rd["table_name"].(string)), + } + + if v := rd["s3"].([]interface{}); len(v) > 0 { + s3 := v[0].(map[string]interface{}) + s3rds := &kinesisanalytics.S3ReferenceDataSource{ + BucketARN: aws.String(s3["bucket"].(string)), + FileKey: aws.String(s3["file_key"].(string)), + ReferenceRoleARN: aws.String(s3["role"].(string)), + } + referenceData.S3ReferenceDataSource = s3rds + } + + if v := rd["schema"].([]interface{}); len(v) > 0 { + ss := createSourceSchema(v[0].(map[string]interface{})) + referenceData.ReferenceSchema = ss + } + + return referenceData +} + func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { applicationUpdate := &kinesisanalytics.ApplicationUpdate{} diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index ef9b3b266b7..664904cedc8 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -402,6 +402,36 @@ func TestAccAWSKinesisAnalyticsApplication_outputsUpdateKinesisStream(t *testing }) } +func TestAccAWSKinesisAnalyticsApplication_referenceDataSource(t *testing.T) { + var application kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_referenceDataSource(rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &application), + resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "reference_data_sources.#", "1"), + ), + }, + }, + }) +} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { @@ -620,6 +650,42 @@ resource "aws_kinesis_analytics_application" "test" { `, streamName, rInt) } +func testAccKinesisAnalyticsApplication_referenceDataSource(rInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "testacc-%d" +} + +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + + reference_data_sources { + table_name = "test_table" + s3 { + bucket = "${aws_s3_bucket.test.arn}" + file_key = "test_file_key" + role = "${aws_iam_role.test.arn}" + } + schema { + record_columns { + mapping = "$.test" + name = "test" + sql_type = "VARCHAR(8)" + } + record_encoding = "UTF-8" + record_format { + mapping_parameters { + json { + record_row_path = "$" + } + } + } + } + } +} +`, rInt, rInt) +} + func fulfillSleep() resource.TestCheckFunc { return func(s *terraform.State) error { log.Print("[DEBUG] Test: Sleep to allow IAM to propagate") From b7b0f11cfebd065c2e1d0e580ab54ada61f3619c Mon Sep 17 00:00:00 2001 From: Kash Date: Mon, 6 Aug 2018 15:37:21 -0400 Subject: [PATCH 3005/3316] read reference data sources --- ...ource_aws_kinesis_analytics_application.go | 87 +++++++++++++++++++ ..._aws_kinesis_analytics_application_test.go | 4 + 2 files changed, 91 insertions(+) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 9fc689f7130..89d76c575e5 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -618,6 +618,10 @@ func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta int return err } + if err := d.Set("reference_data_sources", getReferenceDataSources(resp.ApplicationDetail.ReferenceDataSourceDescriptions)); err != nil { + return err + } + return nil } @@ -1347,3 +1351,86 @@ func getOutputs(outputs []*kinesisanalytics.OutputDescription) []interface{} { return s } + +func getReferenceDataSources(dataSources []*kinesisanalytics.ReferenceDataSourceDescription) []interface{} { + s := []interface{}{} + + if len(dataSources) > 0 { + for _, ds := range dataSources { + dataSource := map[string]interface{}{ + "id": aws.StringValue(ds.ReferenceId), + "table_name": aws.StringValue(ds.TableName), + } + + if ds.S3ReferenceDataSourceDescription != nil { + dataSource["s3"] = []interface{}{ + map[string]interface{}{ + "bucket": aws.StringValue(ds.S3ReferenceDataSourceDescription.BucketARN), + "file_key": aws.StringValue(ds.S3ReferenceDataSourceDescription.FileKey), + "role": aws.StringValue(ds.S3ReferenceDataSourceDescription.ReferenceRoleARN), + }, + } + } + + if ds.ReferenceSchema != nil { + rs := ds.ReferenceSchema + rcs := []interface{}{} + ss := map[string]interface{}{ + "record_encoding": aws.StringValue(rs.RecordEncoding), + } + + for _, rc := range rs.RecordColumns { + rcM := map[string]interface{}{ + "mapping": aws.StringValue(rc.Mapping), + "name": aws.StringValue(rc.Name), + "sql_type": aws.StringValue(rc.SqlType), + } + rcs = append(rcs, rcM) + } + ss["record_columns"] = rcs + + if rs.RecordFormat != nil { + rf := rs.RecordFormat + rfM := map[string]interface{}{ + "record_format_type": aws.StringValue(rf.RecordFormatType), + } + + if rf.MappingParameters != nil { + mps := []interface{}{} + if rf.MappingParameters.CSVMappingParameters != nil { + cmp := map[string]interface{}{ + "csv": []interface{}{ + map[string]interface{}{ + "record_column_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordColumnDelimiter), + "record_row_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordRowDelimiter), + }, + }, + } + mps = append(mps, cmp) + } + + if rf.MappingParameters.JSONMappingParameters != nil { + jmp := map[string]interface{}{ + "json": []interface{}{ + map[string]interface{}{ + "record_row_path": aws.StringValue(rf.MappingParameters.JSONMappingParameters.RecordRowPath), + }, + }, + } + mps = append(mps, jmp) + } + + rfM["mapping_parameters"] = mps + } + ss["record_format"] = []interface{}{rfM} + } + + dataSource["schema"] = []interface{}{ss} + } + + s = append(s, dataSource) + } + } + + return s +} diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index 664904cedc8..f2fee679883 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -426,6 +426,10 @@ func TestAccAWSKinesisAnalyticsApplication_referenceDataSource(t *testing.T) { testAccCheckKinesisAnalyticsApplicationExists(resName, &application), resource.TestCheckResourceAttr(resName, "version", "2"), resource.TestCheckResourceAttr(resName, "reference_data_sources.#", "1"), + resource.TestCheckResourceAttr(resName, "reference_data_sources.0.schema.#", "1"), + resource.TestCheckResourceAttr(resName, "reference_data_sources.0.schema.0.record_columns.#", "1"), + resource.TestCheckResourceAttr(resName, "reference_data_sources.0.schema.0.record_format.#", "1"), + resource.TestCheckResourceAttr(resName, "reference_data_sources.0.schema.0.record_format.0.mapping_parameters.0.json.#", "1"), ), }, }, From 6d5bf0c0544deb60a91b3d71a186fa8ae6eafed6 Mon Sep 17 00:00:00 2001 From: Kash Date: Mon, 6 Aug 2018 15:41:00 -0400 Subject: [PATCH 3006/3316] update reference data sources --- ...ource_aws_kinesis_analytics_application.go | 33 ++++++++ ..._aws_kinesis_analytics_application_test.go | 76 +++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/aws/resource_aws_kinesis_analytics_application.go b/aws/resource_aws_kinesis_analytics_application.go index 89d76c575e5..1aadf4941b4 100644 --- a/aws/resource_aws_kinesis_analytics_application.go +++ b/aws/resource_aws_kinesis_analytics_application.go @@ -986,6 +986,39 @@ func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.Appl } } + oldReferenceData, newReferenceData := d.GetChange("reference_data_sources") + if len(oldReferenceData.([]interface{})) > 0 && len(newReferenceData.([]interface{})) > 0 { + if v := d.Get("reference_data_sources").([]interface{}); len(v) > 0 { + var rdsus []*kinesisanalytics.ReferenceDataSourceUpdate + for _, rd := range v { + rdL := rd.(map[string]interface{}) + rdsu := &kinesisanalytics.ReferenceDataSourceUpdate{ + ReferenceId: aws.String(rdL["id"].(string)), + TableNameUpdate: aws.String(rdL["table_name"].(string)), + } + + if v := rdL["s3"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + s3rdsu := &kinesisanalytics.S3ReferenceDataSourceUpdate{ + BucketARNUpdate: aws.String(vL["bucket"].(string)), + FileKeyUpdate: aws.String(vL["file_key"].(string)), + ReferenceRoleARNUpdate: aws.String(vL["role"].(string)), + } + rdsu.S3ReferenceDataSourceUpdate = s3rdsu + } + + if v := rdL["schema"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + ss := createSourceSchema(vL) + rdsu.ReferenceSchemaUpdate = ss + } + + rdsus = append(rdsus, rdsu) + } + applicationUpdate.ReferenceDataSourceUpdates = rdsus + } + } + return applicationUpdate, nil } diff --git a/aws/resource_aws_kinesis_analytics_application_test.go b/aws/resource_aws_kinesis_analytics_application_test.go index f2fee679883..9f9e05a7e7a 100644 --- a/aws/resource_aws_kinesis_analytics_application_test.go +++ b/aws/resource_aws_kinesis_analytics_application_test.go @@ -436,6 +436,45 @@ func TestAccAWSKinesisAnalyticsApplication_referenceDataSource(t *testing.T) { }) } +func TestAccAWSKinesisAnalyticsApplication_referenceDataSourceUpdate(t *testing.T) { + var before, after kinesisanalytics.ApplicationDetail + resName := "aws_kinesis_analytics_application.test" + rInt := acctest.RandInt() + firstStep := testAccKinesisAnalyticsApplication_prereq(rInt) + secondStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_referenceDataSource(rInt) + thirdStep := testAccKinesisAnalyticsApplication_prereq(rInt) + testAccKinesisAnalyticsApplication_referenceDataSourceUpdate(rInt) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisAnalyticsApplicationDestroy, + Steps: []resource.TestStep{ + { + Config: firstStep, + Check: resource.ComposeTestCheckFunc( + fulfillSleep(), + ), + }, + { + Config: secondStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &before), + resource.TestCheckResourceAttr(resName, "version", "2"), + resource.TestCheckResourceAttr(resName, "reference_data_sources.#", "1"), + ), + }, + { + Config: thirdStep, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisAnalyticsApplicationExists(resName, &after), + resource.TestCheckResourceAttr(resName, "version", "3"), + resource.TestCheckResourceAttr(resName, "reference_data_sources.#", "1"), + ), + }, + }, + }) +} + func testAccCheckKinesisAnalyticsApplicationDestroy(s *terraform.State) error { for _, rs := range s.RootModule().Resources { if rs.Type != "aws_kinesis_analytics_application" { @@ -690,6 +729,43 @@ resource "aws_kinesis_analytics_application" "test" { `, rInt, rInt) } +func testAccKinesisAnalyticsApplication_referenceDataSourceUpdate(rInt int) string { + return fmt.Sprintf(` +resource "aws_s3_bucket" "test" { + bucket = "testacc2-%d" +} + +resource "aws_kinesis_analytics_application" "test" { + name = "testAcc-%d" + + reference_data_sources { + table_name = "test_table2" + s3 { + bucket = "${aws_s3_bucket.test.arn}" + file_key = "test_file_key" + role = "${aws_iam_role.test.arn}" + } + schema { + record_columns { + mapping = "$.test2" + name = "test2" + sql_type = "VARCHAR(8)" + } + record_encoding = "UTF-8" + record_format { + mapping_parameters { + csv { + record_column_delimiter = "," + record_row_delimiter = "\n" + } + } + } + } + } +} +`, rInt, rInt) +} + func fulfillSleep() resource.TestCheckFunc { return func(s *terraform.State) error { log.Print("[DEBUG] Test: Sleep to allow IAM to propagate") From 93c13a48c0f2f71aeff9a3d1437017850aec6865 Mon Sep 17 00:00:00 2001 From: Kash Date: Tue, 7 Aug 2018 17:26:30 -0400 Subject: [PATCH 3007/3316] add documentation --- website/aws.erb | 4 + ...inesis_analytics_application.html.markdown | 251 ++++++++++++++++++ 2 files changed, 255 insertions(+) create mode 100644 website/docs/r/kinesis_analytics_application.html.markdown diff --git a/website/aws.erb b/website/aws.erb index 46b988c0ab9..5d34d8cc1ad 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1485,6 +1485,10 @@ Kinesis Resources From 90371ddf2e2080fbeff6f48efa3c497d084bf361 Mon Sep 17 00:00:00 2001 From: Pavel Platto Date: Fri, 2 Nov 2018 15:44:05 +0200 Subject: [PATCH 3147/3316] Fix gamelift_game_session_queue.name max length --- aws/resource_aws_gamelift_game_session_queue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_gamelift_game_session_queue.go b/aws/resource_aws_gamelift_game_session_queue.go index caaa39ace1e..f4a2446e7c2 100644 --- a/aws/resource_aws_gamelift_game_session_queue.go +++ b/aws/resource_aws_gamelift_game_session_queue.go @@ -26,7 +26,7 @@ func resourceAwsGameliftGameSessionQueue() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.StringLenBetween(1, 1024), + ValidateFunc: validation.StringLenBetween(1, 128), }, "player_latency_policy": { Type: schema.TypeList, From 9a656796cd7d9914c9dfbb57c4a7d0b33455d9fb Mon Sep 17 00:00:00 2001 From: Rick Burgess Date: Fri, 2 Nov 2018 15:02:32 +0100 Subject: [PATCH 3148/3316] Updated iam_user force delete to include public ssh keys. fixes #4176 --- aws/resource_aws_iam_user.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/aws/resource_aws_iam_user.go b/aws/resource_aws_iam_user.go index 7501bb0b589..0ba12dea5fc 100644 --- a/aws/resource_aws_iam_user.go +++ b/aws/resource_aws_iam_user.go @@ -229,6 +229,30 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { } } + var publicKeys []string + listSSHPublicKeys := &iam.ListSSHPublicKeysInput{ + UserName: aws.String(d.Id()), + } + pageOfListSSHPublicKeys := func(page *iam.ListSSHPublicKeysOutput, lastPage bool) (shouldContinue bool) { + for _, k := range page.SSHPublicKeys { + publicKeys = append(publicKeys, *k.SSHPublicKeyId) + } + return !lastPage + } + err = iamconn.ListSSHPublicKeysPages(listSSHPublicKeys, pageOfListSSHPublicKeys) + if err != nil { + return fmt.Errorf("Error removing public ssh keys of user %s: %s", d.Id(), err) + } + for _, k := range publicKeys { + _, err := iamconn.DeleteSSHPublicKey(&iam.DeleteSSHPublicKeyInput{ + UserName: aws.String(d.Id()), + SSHPublicKeyId: aws.String(k), + }) + if err != nil { + return fmt.Errorf("Error deleting access key %s: %s", k, err) + } + } + var MFADevices []string listMFADevices := &iam.ListMFADevicesInput{ UserName: aws.String(d.Id()), From e225279c8692497cb87b399a0a25aeb55fa89e6e Mon Sep 17 00:00:00 2001 From: Rick Burgess Date: Fri, 2 Nov 2018 15:32:10 +0100 Subject: [PATCH 3149/3316] fixed a copy paste error --- aws/resource_aws_iam_user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_iam_user.go b/aws/resource_aws_iam_user.go index 0ba12dea5fc..98fff704305 100644 --- a/aws/resource_aws_iam_user.go +++ b/aws/resource_aws_iam_user.go @@ -241,7 +241,7 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { } err = iamconn.ListSSHPublicKeysPages(listSSHPublicKeys, pageOfListSSHPublicKeys) if err != nil { - return fmt.Errorf("Error removing public ssh keys of user %s: %s", d.Id(), err) + return fmt.Errorf("Error removing public SSH keys of user %s: %s", d.Id(), err) } for _, k := range publicKeys { _, err := iamconn.DeleteSSHPublicKey(&iam.DeleteSSHPublicKeyInput{ @@ -249,7 +249,7 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { SSHPublicKeyId: aws.String(k), }) if err != nil { - return fmt.Errorf("Error deleting access key %s: %s", k, err) + return fmt.Errorf("Error deleting public SSH key %s: %s", k, err) } } From f7c0899ca731c70659eb6b8e40ea520d095ffb1c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 2 Nov 2018 11:52:49 -0400 Subject: [PATCH 3150/3316] tests/provider: Fix unparam Linting Issues and Enable in TravisCI Testing --- .gometalinter.json | 1 + aws/autoscaling_tags.go | 8 +-- aws/awserr.go | 9 ++- aws/config.go | 4 +- aws/ecs_task_definition_equivalency.go | 4 +- aws/ecs_task_definition_equivalency_test.go | 12 ++-- aws/resource_aws_api_gateway_stage.go | 5 +- aws/resource_aws_athena_database.go | 8 +-- aws/resource_aws_autoscaling_group.go | 4 +- aws/resource_aws_batch_job_queue.go | 12 ++-- aws/resource_aws_batch_job_queue_test.go | 9 ++- aws/resource_aws_cloudwatch_event_rule.go | 8 +-- ...resource_aws_cloudwatch_event_rule_test.go | 17 ++---- aws/resource_aws_codedeploy_app.go | 7 ++- ..._cognito_identity_pool_roles_attachment.go | 4 +- ...esource_aws_directory_service_directory.go | 6 +- ...ce_aws_directory_service_directory_test.go | 3 +- aws/resource_aws_ecs_task_definition.go | 2 +- ...esource_aws_elastic_transcoder_pipeline.go | 9 ++- aws/resource_aws_elasticache_cluster.go | 4 +- ...ource_aws_elasticache_replication_group.go | 14 ++--- ..._aws_elasticache_replication_group_test.go | 2 +- aws/resource_aws_emr_cluster.go | 55 +++++++++---------- aws/resource_aws_iam_policy_attachment.go | 12 ++-- aws/resource_aws_kms_grant.go | 8 +-- aws/resource_aws_launch_template.go | 6 +- aws/resource_aws_opsworks_instance.go | 41 +++++++------- aws/resource_aws_proxy_protocol_policy.go | 9 +-- aws/resource_aws_redshift_cluster.go | 11 ++-- aws/resource_aws_ses_receipt_rule.go | 6 +- aws/resource_aws_sqs_queue.go | 4 +- aws/resource_aws_vpn_gateway.go | 6 +- aws/resource_aws_waf_byte_match_set.go | 6 +- aws/resource_aws_waf_byte_match_set_test.go | 2 +- aws/resource_aws_waf_geo_match_set.go | 6 +- aws/resource_aws_waf_geo_match_set_test.go | 2 +- aws/resource_aws_waf_ipset.go | 6 +- aws/resource_aws_waf_ipset_test.go | 2 +- aws/resource_aws_waf_rate_based_rule.go | 6 +- aws/resource_aws_waf_rate_based_rule_test.go | 2 +- aws/resource_aws_waf_regex_match_set.go | 6 +- aws/resource_aws_waf_regex_match_set_test.go | 4 +- aws/resource_aws_waf_regex_pattern_set.go | 6 +- ...resource_aws_waf_regex_pattern_set_test.go | 2 +- aws/resource_aws_waf_rule.go | 6 +- aws/resource_aws_waf_rule_group.go | 6 +- aws/resource_aws_waf_rule_group_test.go | 2 +- aws/resource_aws_waf_rule_test.go | 2 +- aws/resource_aws_waf_size_constraint_set.go | 6 +- ...source_aws_waf_size_constraint_set_test.go | 2 +- ...esource_aws_waf_sql_injection_match_set.go | 6 +- ...ce_aws_waf_sql_injection_match_set_test.go | 2 +- aws/resource_aws_waf_web_acl.go | 8 +-- aws/resource_aws_waf_web_acl_test.go | 2 +- aws/resource_aws_waf_xss_match_set.go | 6 +- aws/resource_aws_waf_xss_match_set_test.go | 2 +- aws/s3_tags.go | 4 +- aws/structure.go | 19 +------ aws/validators.go | 9 ++- aws/validators_test.go | 20 +++---- aws/waf_token_handlers.go | 9 ++- 61 files changed, 230 insertions(+), 241 deletions(-) diff --git a/.gometalinter.json b/.gometalinter.json index 5bf665ba06b..3192049c4d2 100644 --- a/.gometalinter.json +++ b/.gometalinter.json @@ -9,6 +9,7 @@ "misspell", "structcheck", "unconvert", + "unparam", "unused", "varcheck", "vet" diff --git a/aws/autoscaling_tags.go b/aws/autoscaling_tags.go index ba320ba1961..d94eb4a9464 100644 --- a/aws/autoscaling_tags.go +++ b/aws/autoscaling_tags.go @@ -58,8 +58,8 @@ func setAutoscalingTags(conn *autoscaling.AutoScaling, d *schema.ResourceData) e if d.HasChange("tag") || d.HasChange("tags") { oraw, nraw := d.GetChange("tag") - o := setToMapByKey(oraw.(*schema.Set), "key") - n := setToMapByKey(nraw.(*schema.Set), "key") + o := setToMapByKey(oraw.(*schema.Set)) + n := setToMapByKey(nraw.(*schema.Set)) old, err := autoscalingTagsFromMap(o, resourceID) if err != nil { @@ -262,11 +262,11 @@ func autoscalingTagDescriptionsToSlice(ts []*autoscaling.TagDescription) []map[s return tags } -func setToMapByKey(s *schema.Set, key string) map[string]interface{} { +func setToMapByKey(s *schema.Set) map[string]interface{} { result := make(map[string]interface{}) for _, rawData := range s.List() { data := rawData.(map[string]interface{}) - result[data[key].(string)] = data + result[data["key"].(string)] = data } return result diff --git a/aws/awserr.go b/aws/awserr.go index ae3cfa242e8..7c944b923e0 100644 --- a/aws/awserr.go +++ b/aws/awserr.go @@ -19,12 +19,13 @@ func isAWSErr(err error, code string, message string) bool { return false } -// Returns true if the error matches all these conditions: +// IsAWSErrExtended returns true if the error matches all conditions // * err is of type awserr.Error // * Error.Code() matches code // * Error.Message() contains message // * Error.OrigErr() contains origErrMessage -func isAWSErrExtended(err error, code string, message string, origErrMessage string) bool { +// Note: This function will be moved out of the aws package in the future. +func IsAWSErrExtended(err error, code string, message string, origErrMessage string) bool { if !isAWSErr(err, code, message) { return false } @@ -48,7 +49,9 @@ func retryOnAwsCode(code string, f func() (interface{}, error)) (interface{}, er return resp, err } -func retryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error) { +// RetryOnAwsCodes retries AWS error codes for one minute +// Note: This function will be moved out of the aws package in the future. +func RetryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error) { var resp interface{} err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error diff --git a/aws/config.go b/aws/config.go index 2960400fef2..7e7f4e53cb1 100644 --- a/aws/config.go +++ b/aws/config.go @@ -380,13 +380,13 @@ func (c *Config) Client() (interface{}, error) { } // RequestError: send request failed // caused by: Post https://FQDN/: dial tcp: lookup FQDN: no such host - if isAWSErrExtended(r.Error, "RequestError", "send request failed", "no such host") { + if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "no such host") { log.Printf("[WARN] Disabling retries after next request due to networking issue") r.Retryable = aws.Bool(false) } // RequestError: send request failed // caused by: Post https://FQDN/: dial tcp IPADDRESS:443: connect: connection refused - if isAWSErrExtended(r.Error, "RequestError", "send request failed", "connection refused") { + if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "connection refused") { log.Printf("[WARN] Disabling retries after next request due to networking issue") r.Retryable = aws.Bool(false) } diff --git a/aws/ecs_task_definition_equivalency.go b/aws/ecs_task_definition_equivalency.go index 8dd5394a2d3..72791b76dd3 100644 --- a/aws/ecs_task_definition_equivalency.go +++ b/aws/ecs_task_definition_equivalency.go @@ -13,7 +13,9 @@ import ( "github.com/mitchellh/copystructure" ) -func ecsContainerDefinitionsAreEquivalent(def1, def2 string, isAWSVPC bool) (bool, error) { +// EcsContainerDefinitionsAreEquivalent determines equality between two ECS container definition JSON strings +// Note: This function will be moved out of the aws package in the future. +func EcsContainerDefinitionsAreEquivalent(def1, def2 string, isAWSVPC bool) (bool, error) { var obj1 containerDefinitions err := json.Unmarshal([]byte(def1), &obj1) if err != nil { diff --git a/aws/ecs_task_definition_equivalency_test.go b/aws/ecs_task_definition_equivalency_test.go index d128e647c1f..e2d4194a5b3 100644 --- a/aws/ecs_task_definition_equivalency_test.go +++ b/aws/ecs_task_definition_equivalency_test.go @@ -78,7 +78,7 @@ func TestAwsEcsContainerDefinitionsAreEquivalent_basic(t *testing.T) { } ]` - equal, err := ecsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) + equal, err := EcsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) if err != nil { t.Fatal(err) } @@ -125,7 +125,7 @@ func TestAwsEcsContainerDefinitionsAreEquivalent_portMappings(t *testing.T) { } ]` - equal, err := ecsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) + equal, err := EcsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) if err != nil { t.Fatal(err) } @@ -167,7 +167,7 @@ func TestAwsEcsContainerDefinitionsAreEquivalent_portMappingsIgnoreHostPort(t *t err error ) - equal, err = ecsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) + equal, err = EcsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) if err != nil { t.Fatal(err) } @@ -175,7 +175,7 @@ func TestAwsEcsContainerDefinitionsAreEquivalent_portMappingsIgnoreHostPort(t *t t.Fatal("Expected definitions to differ.") } - equal, err = ecsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, true) + equal, err = EcsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, true) if err != nil { t.Fatal(err) } @@ -428,7 +428,7 @@ func TestAwsEcsContainerDefinitionsAreEquivalent_arrays(t *testing.T) { ] ` - equal, err := ecsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) + equal, err := EcsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) if err != nil { t.Fatal(err) } @@ -466,7 +466,7 @@ func TestAwsEcsContainerDefinitionsAreEquivalent_negative(t *testing.T) { } ]` - equal, err := ecsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) + equal, err := EcsContainerDefinitionsAreEquivalent(cfgRepresention, apiRepresentation, false) if err != nil { t.Fatal(err) } diff --git a/aws/resource_aws_api_gateway_stage.go b/aws/resource_aws_api_gateway_stage.go index 627f57b28dd..a2c8e13479f 100644 --- a/aws/resource_aws_api_gateway_stage.go +++ b/aws/resource_aws_api_gateway_stage.go @@ -339,7 +339,7 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) o, n := d.GetChange("variables") oldV := o.(map[string]interface{}) newV := n.(map[string]interface{}) - operations = append(operations, diffVariablesOps("/variables/", oldV, newV)...) + operations = append(operations, diffVariablesOps(oldV, newV)...) } if d.HasChange("access_log_settings") { accessLogSettings := d.Get("access_log_settings").([]interface{}) @@ -411,8 +411,9 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) return resourceAwsApiGatewayStageRead(d, meta) } -func diffVariablesOps(prefix string, oldVars, newVars map[string]interface{}) []*apigateway.PatchOperation { +func diffVariablesOps(oldVars, newVars map[string]interface{}) []*apigateway.PatchOperation { ops := make([]*apigateway.PatchOperation, 0) + prefix := "/variables/" for k := range oldVars { if _, ok := newVars[k]; !ok { diff --git a/aws/resource_aws_athena_database.go b/aws/resource_aws_athena_database.go index e62cf330a60..f440bcd47bb 100644 --- a/aws/resource_aws_athena_database.go +++ b/aws/resource_aws_athena_database.go @@ -108,7 +108,7 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e return err } - if err := executeAndExpectNoRowsWhenCreate(*resp.QueryExecutionId, d, conn); err != nil { + if err := executeAndExpectNoRowsWhenCreate(*resp.QueryExecutionId, conn); err != nil { return err } d.SetId(d.Get("name").(string)) @@ -169,13 +169,13 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e return err } - if err := executeAndExpectNoRowsWhenDrop(*resp.QueryExecutionId, d, conn); err != nil { + if err := executeAndExpectNoRowsWhenDrop(*resp.QueryExecutionId, conn); err != nil { return err } return nil } -func executeAndExpectNoRowsWhenCreate(qeid string, d *schema.ResourceData, conn *athena.Athena) error { +func executeAndExpectNoRowsWhenCreate(qeid string, conn *athena.Athena) error { rs, err := queryExecutionResult(qeid, conn) if err != nil { return err @@ -201,7 +201,7 @@ func executeAndExpectMatchingRow(qeid string, dbName string, conn *athena.Athena return fmt.Errorf("Athena not found database: %s, query result: %s", dbName, flattenAthenaResultSet(rs)) } -func executeAndExpectNoRowsWhenDrop(qeid string, d *schema.ResourceData, conn *athena.Athena) error { +func executeAndExpectNoRowsWhenDrop(qeid string, conn *athena.Athena) error { rs, err := queryExecutionResult(qeid, conn) if err != nil { return err diff --git a/aws/resource_aws_autoscaling_group.go b/aws/resource_aws_autoscaling_group.go index c5c7a4ee44b..02a0b2d4c2c 100644 --- a/aws/resource_aws_autoscaling_group.go +++ b/aws/resource_aws_autoscaling_group.go @@ -410,7 +410,7 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) if v, ok := d.GetOk("tag"); ok { var err error createOpts.Tags, err = autoscalingTagsFromMap( - setToMapByKey(v.(*schema.Set), "key"), resourceID) + setToMapByKey(v.(*schema.Set)), resourceID) if err != nil { return err } @@ -566,7 +566,7 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e var v interface{} if v, tagOk = d.GetOk("tag"); tagOk { - tags := setToMapByKey(v.(*schema.Set), "key") + tags := setToMapByKey(v.(*schema.Set)) for _, t := range g.Tags { if _, ok := tags[*t.Key]; ok { tagList = append(tagList, t) diff --git a/aws/resource_aws_batch_job_queue.go b/aws/resource_aws_batch_job_queue.go index 4ab507914a2..74eb37d74a3 100644 --- a/aws/resource_aws_batch_job_queue.go +++ b/aws/resource_aws_batch_job_queue.go @@ -138,13 +138,13 @@ func resourceAwsBatchJobQueueDelete(d *schema.ResourceData, meta interface{}) er name := d.Get("name").(string) log.Printf("[DEBUG] Disabling Batch Job Queue %s", name) - err := disableBatchJobQueue(name, 10*time.Minute, conn) + err := disableBatchJobQueue(name, conn) if err != nil { return fmt.Errorf("error disabling Batch Job Queue (%s): %s", name, err) } log.Printf("[DEBUG] Deleting Batch Job Queue %s", name) - err = deleteBatchJobQueue(name, 10*time.Minute, conn) + err = deleteBatchJobQueue(name, conn) if err != nil { return fmt.Errorf("error deleting Batch Job Queue (%s): %s", name, err) } @@ -162,7 +162,7 @@ func createComputeEnvironmentOrder(order []interface{}) (envs []*batch.ComputeEn return } -func deleteBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Batch) error { +func deleteBatchJobQueue(jobQueue string, conn *batch.Batch) error { _, err := conn.DeleteJobQueue(&batch.DeleteJobQueueInput{ JobQueue: aws.String(jobQueue), }) @@ -174,7 +174,7 @@ func deleteBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Bat Pending: []string{batch.JQStateDisabled, batch.JQStatusDeleting}, Target: []string{batch.JQStatusDeleted}, Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), - Timeout: timeout, + Timeout: 10 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } @@ -183,7 +183,7 @@ func deleteBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Bat return err } -func disableBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Batch) error { +func disableBatchJobQueue(jobQueue string, conn *batch.Batch) error { _, err := conn.UpdateJobQueue(&batch.UpdateJobQueueInput{ JobQueue: aws.String(jobQueue), State: aws.String(batch.JQStateDisabled), @@ -196,7 +196,7 @@ func disableBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Ba Pending: []string{batch.JQStatusUpdating}, Target: []string{batch.JQStatusValid}, Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), - Timeout: timeout, + Timeout: 10 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } diff --git a/aws/resource_aws_batch_job_queue_test.go b/aws/resource_aws_batch_job_queue_test.go index f9b82201f78..423a2165bbb 100644 --- a/aws/resource_aws_batch_job_queue_test.go +++ b/aws/resource_aws_batch_job_queue_test.go @@ -6,7 +6,6 @@ import ( "strconv" "strings" "testing" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/batch" @@ -56,14 +55,14 @@ func testSweepBatchJobQueues(region string) error { } log.Printf("[INFO] Disabling Batch Job Queue: %s", *name) - err := disableBatchJobQueue(*name, 10*time.Minute, conn) + err := disableBatchJobQueue(*name, conn) if err != nil { log.Printf("[ERROR] Failed to disable Batch Job Queue %s: %s", *name, err) continue } log.Printf("[INFO] Deleting Batch Job Queue: %s", *name) - err = deleteBatchJobQueue(*name, 10*time.Minute, conn) + err = deleteBatchJobQueue(*name, conn) if err != nil { log.Printf("[ERROR] Failed to delete Batch Job Queue %s: %s", *name, err) } @@ -218,12 +217,12 @@ func testAccCheckBatchJobQueueDisappears(jobQueue *batch.JobQueueDetail) resourc conn := testAccProvider.Meta().(*AWSClient).batchconn name := aws.StringValue(jobQueue.JobQueueName) - err := disableBatchJobQueue(name, 10*time.Minute, conn) + err := disableBatchJobQueue(name, conn) if err != nil { return fmt.Errorf("error disabling Batch Job Queue (%s): %s", name, err) } - return deleteBatchJobQueue(name, 10*time.Minute, conn) + return deleteBatchJobQueue(name, conn) } } diff --git a/aws/resource_aws_cloudwatch_event_rule.go b/aws/resource_aws_cloudwatch_event_rule.go index fb99dbd2ce9..16977cb1f87 100644 --- a/aws/resource_aws_cloudwatch_event_rule.go +++ b/aws/resource_aws_cloudwatch_event_rule.go @@ -48,7 +48,7 @@ func resourceAwsCloudWatchEventRule() *schema.Resource { "event_pattern": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateEventPatternValue(2048), + ValidateFunc: validateEventPatternValue(), StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v.(string)) return json @@ -281,7 +281,7 @@ func getStringStateFromBoolean(isEnabled bool) string { return "DISABLED" } -func validateEventPatternValue(length int) schema.SchemaValidateFunc { +func validateEventPatternValue() schema.SchemaValidateFunc { return func(v interface{}, k string) (ws []string, errors []error) { json, err := structure.NormalizeJsonString(v) if err != nil { @@ -294,9 +294,9 @@ func validateEventPatternValue(length int) schema.SchemaValidateFunc { } // Check whether the normalized JSON is within the given length. - if len(json) > length { + if len(json) > 2048 { errors = append(errors, fmt.Errorf( - "%q cannot be longer than %d characters: %q", k, length, json)) + "%q cannot be longer than %d characters: %q", k, 2048, json)) } return } diff --git a/aws/resource_aws_cloudwatch_event_rule_test.go b/aws/resource_aws_cloudwatch_event_rule_test.go index 1c4b061155b..e2cc318385c 100644 --- a/aws/resource_aws_cloudwatch_event_rule_test.go +++ b/aws/resource_aws_cloudwatch_event_rule_test.go @@ -269,31 +269,27 @@ func testAccCheckAWSCloudWatchEventRuleDestroy(s *terraform.State) error { func TestResourceAWSCloudWatchEventRule_validateEventPatternValue(t *testing.T) { type testCases struct { - Length int Value string ErrCount int } invalidCases := []testCases{ { - Length: 8, - Value: acctest.RandString(16), + Value: acctest.RandString(2049), ErrCount: 1, }, { - Length: 123, - Value: `{"abc":}`, + Value: `not-json`, ErrCount: 1, }, { - Length: 1, - Value: `{"abc":["1","2"]}`, + Value: fmt.Sprintf("{%q:[1, 2]}", acctest.RandString(2049)), ErrCount: 1, }, } for _, tc := range invalidCases { - _, errors := validateEventPatternValue(tc.Length)(tc.Value, "event_pattern") + _, errors := validateEventPatternValue()(tc.Value, "event_pattern") if len(errors) != tc.ErrCount { t.Fatalf("Expected %q to trigger a validation error.", tc.Value) } @@ -301,24 +297,21 @@ func TestResourceAWSCloudWatchEventRule_validateEventPatternValue(t *testing.T) validCases := []testCases{ { - Length: 0, Value: ``, ErrCount: 0, }, { - Length: 2, Value: `{}`, ErrCount: 0, }, { - Length: 18, Value: `{"abc":["1","2"]}`, ErrCount: 0, }, } for _, tc := range validCases { - _, errors := validateEventPatternValue(tc.Length)(tc.Value, "event_pattern") + _, errors := validateEventPatternValue()(tc.Value, "event_pattern") if len(errors) != tc.ErrCount { t.Fatalf("Expected %q not to trigger a validation error.", tc.Value) } diff --git a/aws/resource_aws_codedeploy_app.go b/aws/resource_aws_codedeploy_app.go index afe29c81928..97a129c216c 100644 --- a/aws/resource_aws_codedeploy_app.go +++ b/aws/resource_aws_codedeploy_app.go @@ -109,7 +109,7 @@ func resourceAwsCodeDeployAppCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsCodeDeployAppRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codedeployconn - _, application := resourceAwsCodeDeployAppParseId(d.Id()) + application := resourceAwsCodeDeployAppParseId(d.Id()) log.Printf("[DEBUG] Reading CodeDeploy application %s", application) resp, err := conn.GetApplication(&codedeploy.GetApplicationInput{ ApplicationName: aws.String(application), @@ -167,7 +167,8 @@ func resourceAwsCodeDeployAppDelete(d *schema.ResourceData, meta interface{}) er return nil } -func resourceAwsCodeDeployAppParseId(id string) (string, string) { +func resourceAwsCodeDeployAppParseId(id string) string { parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] + // We currently omit the application ID as it is not currently used anywhere + return parts[1] } diff --git a/aws/resource_aws_cognito_identity_pool_roles_attachment.go b/aws/resource_aws_cognito_identity_pool_roles_attachment.go index f9e06d0724d..0b62891cd0b 100644 --- a/aws/resource_aws_cognito_identity_pool_roles_attachment.go +++ b/aws/resource_aws_cognito_identity_pool_roles_attachment.go @@ -118,7 +118,7 @@ func resourceAwsCognitoIdentityPoolRolesAttachmentCreate(d *schema.ResourceData, // Validates role keys to be either authenticated or unauthenticated, // since ValidateFunc validates only the value not the key. - if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{}), "roles"); len(errors) > 0 { + if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{})); len(errors) > 0 { return fmt.Errorf("Error validating Roles: %v", errors) } @@ -180,7 +180,7 @@ func resourceAwsCognitoIdentityPoolRolesAttachmentUpdate(d *schema.ResourceData, // Validates role keys to be either authenticated or unauthenticated, // since ValidateFunc validates only the value not the key. - if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{}), "roles"); len(errors) > 0 { + if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{})); len(errors) > 0 { return fmt.Errorf("Error validating Roles: %v", errors) } diff --git a/aws/resource_aws_directory_service_directory.go b/aws/resource_aws_directory_service_directory.go index bfc54c51b26..d440d126710 100644 --- a/aws/resource_aws_directory_service_directory.go +++ b/aws/resource_aws_directory_service_directory.go @@ -482,7 +482,7 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int } log.Printf("[DEBUG] Waiting for Directory Service Directory (%q) to be deleted", d.Id()) - err = waitForDirectoryServiceDirectoryDeletion(dsconn, d.Id(), 60*time.Minute) + err = waitForDirectoryServiceDirectoryDeletion(dsconn, d.Id()) if err != nil { return fmt.Errorf("error waiting for Directory Service (%s) to be deleted: %s", d.Id(), err) } @@ -490,7 +490,7 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int return nil } -func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectoryService, directoryID string, timeout time.Duration) error { +func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectoryService, directoryID string) error { stateConf := &resource.StateChangeConf{ Pending: []string{ directoryservice.DirectoryStageActive, @@ -516,7 +516,7 @@ func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectorySe log.Printf("[DEBUG] Deletion of Directory Service Directory %q is in following stage: %q.", directoryID, aws.StringValue(ds.Stage)) return ds, aws.StringValue(ds.Stage), nil }, - Timeout: timeout, + Timeout: 60 * time.Minute, } _, err := stateConf.WaitForState() diff --git a/aws/resource_aws_directory_service_directory_test.go b/aws/resource_aws_directory_service_directory_test.go index 11346e24636..dbbf0142ef2 100644 --- a/aws/resource_aws_directory_service_directory_test.go +++ b/aws/resource_aws_directory_service_directory_test.go @@ -5,7 +5,6 @@ import ( "log" "reflect" "testing" - "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -63,7 +62,7 @@ func testSweepDirectoryServiceDirectories(region string) error { } log.Printf("[INFO] Waiting for Directory Service Directory (%q) to be deleted", id) - err = waitForDirectoryServiceDirectoryDeletion(conn, id, 60*time.Minute) + err = waitForDirectoryServiceDirectoryDeletion(conn, id) if err != nil { return fmt.Errorf("error waiting for Directory Service (%s) to be deleted: %s", id, err) } diff --git a/aws/resource_aws_ecs_task_definition.go b/aws/resource_aws_ecs_task_definition.go index e815f86b862..df49791eb37 100644 --- a/aws/resource_aws_ecs_task_definition.go +++ b/aws/resource_aws_ecs_task_definition.go @@ -56,7 +56,7 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { networkMode, ok := d.GetOk("network_mode") isAWSVPC := ok && networkMode.(string) == ecs.NetworkModeAwsvpc - equal, _ := ecsContainerDefinitionsAreEquivalent(old, new, isAWSVPC) + equal, _ := EcsContainerDefinitionsAreEquivalent(old, new, isAWSVPC) return equal }, ValidateFunc: validateAwsEcsTaskDefinitionContainerDefinitions, diff --git a/aws/resource_aws_elastic_transcoder_pipeline.go b/aws/resource_aws_elastic_transcoder_pipeline.go index 1d290c925bc..c5712aca586 100644 --- a/aws/resource_aws_elastic_transcoder_pipeline.go +++ b/aws/resource_aws_elastic_transcoder_pipeline.go @@ -323,11 +323,18 @@ func expandETPermList(permissions *schema.Set) []*elastictranscoder.Permission { var perms []*elastictranscoder.Permission for _, p := range permissions.List() { + if p == nil { + continue + } + + m := p.(map[string]interface{}) + perm := &elastictranscoder.Permission{ - Access: getStringPtrList(p.(map[string]interface{}), "access"), + Access: expandStringList(m["access"].([]interface{})), Grantee: getStringPtr(p, "grantee"), GranteeType: getStringPtr(p, "grantee_type"), } + perms = append(perms, perm) } return perms diff --git a/aws/resource_aws_elasticache_cluster.go b/aws/resource_aws_elasticache_cluster.go index 0c31741fe38..5986e487ca5 100644 --- a/aws/resource_aws_elasticache_cluster.go +++ b/aws/resource_aws_elasticache_cluster.go @@ -576,7 +576,7 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ n := nraw.(int) if n < o { log.Printf("[INFO] Cluster %s is marked for Decreasing cache nodes from %d to %d", d.Id(), o, n) - nodesToRemove := getCacheNodesToRemove(d, o, o-n) + nodesToRemove := getCacheNodesToRemove(o, o-n) req.CacheNodeIdsToRemove = nodesToRemove } else { log.Printf("[INFO] Cluster %s is marked for increasing cache nodes from %d to %d", d.Id(), o, n) @@ -628,7 +628,7 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ return resourceAwsElasticacheClusterRead(d, meta) } -func getCacheNodesToRemove(d *schema.ResourceData, oldNumberOfNodes int, cacheNodesToRemove int) []*string { +func getCacheNodesToRemove(oldNumberOfNodes int, cacheNodesToRemove int) []*string { nodesIdsToRemove := []*string{} for i := oldNumberOfNodes; i > oldNumberOfNodes-cacheNodesToRemove && i > 0; i-- { s := fmt.Sprintf("%04d", i) diff --git a/aws/resource_aws_elasticache_replication_group.go b/aws/resource_aws_elasticache_replication_group.go index f269f86dde5..5a127aafd6c 100644 --- a/aws/resource_aws_elasticache_replication_group.go +++ b/aws/resource_aws_elasticache_replication_group.go @@ -350,7 +350,7 @@ func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta i stateConf := &resource.StateChangeConf{ Pending: pending, Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), + Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), pending), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, @@ -767,7 +767,7 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i func resourceAwsElasticacheReplicationGroupDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - err := deleteElasticacheReplicationGroup(d.Id(), 40*time.Minute, conn) + err := deleteElasticacheReplicationGroup(d.Id(), conn) if err != nil { return fmt.Errorf("error deleting Elasticache Replication Group (%s): %s", d.Id(), err) } @@ -775,7 +775,7 @@ func resourceAwsElasticacheReplicationGroupDelete(d *schema.ResourceData, meta i return nil } -func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replicationGroupId, givenState string, pending []string) resource.StateRefreshFunc { +func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replicationGroupId string, pending []string) resource.StateRefreshFunc { return func() (interface{}, string, error) { resp, err := conn.DescribeReplicationGroups(&elasticache.DescribeReplicationGroupsInput{ ReplicationGroupId: aws.String(replicationGroupId), @@ -822,7 +822,7 @@ func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replic } } -func deleteElasticacheReplicationGroup(replicationGroupID string, timeout time.Duration, conn *elasticache.ElastiCache) error { +func deleteElasticacheReplicationGroup(replicationGroupID string, conn *elasticache.ElastiCache) error { input := &elasticache.DeleteReplicationGroupInput{ ReplicationGroupId: aws.String(replicationGroupID), } @@ -851,8 +851,8 @@ func deleteElasticacheReplicationGroup(replicationGroupID string, timeout time.D stateConf := &resource.StateChangeConf{ Pending: []string{"creating", "available", "deleting"}, Target: []string{}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, "", []string{}), - Timeout: timeout, + Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, []string{}), + Timeout: 40 * time.Minute, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } @@ -885,7 +885,7 @@ func waitForModifyElasticacheReplicationGroup(conn *elasticache.ElastiCache, rep stateConf := &resource.StateChangeConf{ Pending: pending, Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, "available", pending), + Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, pending), Timeout: timeout, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, diff --git a/aws/resource_aws_elasticache_replication_group_test.go b/aws/resource_aws_elasticache_replication_group_test.go index 0c05a4fb975..2c89659dc52 100644 --- a/aws/resource_aws_elasticache_replication_group_test.go +++ b/aws/resource_aws_elasticache_replication_group_test.go @@ -57,7 +57,7 @@ func testSweepElasticacheReplicationGroups(region string) error { continue } log.Printf("[INFO] Deleting Elasticache Replication Group: %s", id) - err := deleteElasticacheReplicationGroup(id, 40*time.Minute, conn) + err := deleteElasticacheReplicationGroup(id, conn) if err != nil { log.Printf("[ERROR] Failed to delete Elasticache Replication Group (%s): %s", id, err) } diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index fca2d30da62..54b5f13a622 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -488,7 +488,13 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error } if v, ok := d.GetOk("instance_group"); ok { instanceGroupConfigs := v.(*schema.Set).List() - instanceConfig.InstanceGroups = expandInstanceGroupConfigs(instanceGroupConfigs) + instanceGroups, err := expandInstanceGroupConfigs(instanceGroupConfigs) + + if err != nil { + return fmt.Errorf("error parsing EMR instance groups configuration: %s", err) + } + + instanceConfig.InstanceGroups = instanceGroups } emrApps := expandApplications(applications) @@ -655,7 +661,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { instanceGroups, err := fetchAllEMRInstanceGroups(emrconn, d.Id()) if err == nil { - coreGroup := findGroup(instanceGroups, "CORE") + coreGroup := emrCoreInstanceGroup(instanceGroups) if coreGroup != nil { d.Set("core_instance_type", coreGroup.InstanceType) } @@ -765,7 +771,7 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error } coreInstanceCount := d.Get("core_instance_count").(int) - coreGroup := findGroup(groups, "CORE") + coreGroup := emrCoreInstanceGroup(groups) if coreGroup == nil { return fmt.Errorf("Error finding core group") } @@ -1093,12 +1099,10 @@ func flattenBootstrapArguments(actions []*emr.Command) []map[string]interface{} return result } -func findGroup(grps []*emr.InstanceGroup, typ string) *emr.InstanceGroup { +func emrCoreInstanceGroup(grps []*emr.InstanceGroup) *emr.InstanceGroup { for _, grp := range grps { - if grp.InstanceGroupType != nil { - if *grp.InstanceGroupType == typ { - return grp - } + if aws.StringValue(grp.InstanceGroupType) == emr.InstanceGroupTypeCore { + return grp } } return nil @@ -1280,7 +1284,7 @@ func expandEmrStepConfigs(l []interface{}) []*emr.StepConfig { return stepConfigs } -func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) []*emr.InstanceGroupConfig { +func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) ([]*emr.InstanceGroupConfig, error) { instanceGroupConfig := []*emr.InstanceGroupConfig{} for _, raw := range instanceGroupConfigs { @@ -1298,12 +1302,23 @@ func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) []*emr.Insta applyBidPrice(config, configAttributes) applyEbsConfig(configAttributes, config) - applyAutoScalingPolicy(configAttributes, config) + + if v, ok := configAttributes["autoscaling_policy"]; ok { + var autoScalingPolicy *emr.AutoScalingPolicy + + err := json.Unmarshal([]byte(v.(string)), &autoScalingPolicy) + + if err != nil { + return []*emr.InstanceGroupConfig{}, fmt.Errorf("error parsing EMR Auto Scaling Policy JSON: %s", err) + } + + config.AutoScalingPolicy = autoScalingPolicy + } instanceGroupConfig = append(instanceGroupConfig, config) } - return instanceGroupConfig + return instanceGroupConfig, nil } func applyBidPrice(config *emr.InstanceGroupConfig, configAttributes map[string]interface{}) { @@ -1342,24 +1357,6 @@ func applyEbsConfig(configAttributes map[string]interface{}, config *emr.Instanc } } -func applyAutoScalingPolicy(configAttributes map[string]interface{}, config *emr.InstanceGroupConfig) { - if rawAutoScalingPolicy, ok := configAttributes["autoscaling_policy"]; ok { - autoScalingConfig, _ := expandAutoScalingPolicy(rawAutoScalingPolicy.(string)) - config.AutoScalingPolicy = autoScalingConfig - } -} - -func expandAutoScalingPolicy(rawDefinitions string) (*emr.AutoScalingPolicy, error) { - var policy *emr.AutoScalingPolicy - - err := json.Unmarshal([]byte(rawDefinitions), &policy) - if err != nil { - return nil, fmt.Errorf("Error decoding JSON: %s", err) - } - - return policy, nil -} - func expandConfigurationJson(input string) ([]*emr.Configuration, error) { configsOut := []*emr.Configuration{} err := json.Unmarshal([]byte(input), &configsOut) diff --git a/aws/resource_aws_iam_policy_attachment.go b/aws/resource_aws_iam_policy_attachment.go index 9e432f3b546..5e1c922734d 100644 --- a/aws/resource_aws_iam_policy_attachment.go +++ b/aws/resource_aws_iam_policy_attachment.go @@ -146,13 +146,13 @@ func resourceAwsIamPolicyAttachmentUpdate(d *schema.ResourceData, meta interface var userErr, roleErr, groupErr error if d.HasChange("users") { - userErr = updateUsers(conn, d, meta) + userErr = updateUsers(conn, d) } if d.HasChange("roles") { - roleErr = updateRoles(conn, d, meta) + roleErr = updateRoles(conn, d) } if d.HasChange("groups") { - groupErr = updateGroups(conn, d, meta) + groupErr = updateGroups(conn, d) } if userErr != nil || roleErr != nil || groupErr != nil { return composeErrors(fmt.Sprint("[WARN] Error updating user, role, or group list from IAM Policy Attachment ", name, ":"), userErr, roleErr, groupErr) @@ -264,7 +264,7 @@ func attachPolicyToGroups(conn *iam.IAM, groups []*string, arn string) error { } return nil } -func updateUsers(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error { +func updateUsers(conn *iam.IAM, d *schema.ResourceData) error { arn := d.Get("policy_arn").(string) o, n := d.GetChange("users") if o == nil { @@ -286,7 +286,7 @@ func updateUsers(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error } return nil } -func updateRoles(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error { +func updateRoles(conn *iam.IAM, d *schema.ResourceData) error { arn := d.Get("policy_arn").(string) o, n := d.GetChange("roles") if o == nil { @@ -308,7 +308,7 @@ func updateRoles(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error } return nil } -func updateGroups(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error { +func updateGroups(conn *iam.IAM, d *schema.ResourceData) error { arn := d.Get("policy_arn").(string) o, n := d.GetChange("groups") if o == nil { diff --git a/aws/resource_aws_kms_grant.go b/aws/resource_aws_kms_grant.go index fe434f43d72..53054d961fb 100644 --- a/aws/resource_aws_kms_grant.go +++ b/aws/resource_aws_kms_grant.go @@ -468,13 +468,13 @@ func sortStringMapKeys(m map[string]*string) []string { // NB: For the constraint hash to be deterministic the order in which // print the keys and values of the encryption context maps needs to be // determistic, so sort them. -func sortedConcatStringMap(m map[string]*string, sep string) string { +func sortedConcatStringMap(m map[string]*string) string { var strList []string mapKeys := sortStringMapKeys(m) for _, key := range mapKeys { strList = append(strList, key, *m[key]) } - return strings.Join(strList, sep) + return strings.Join(strList, "-") } // The hash needs to encapsulate what type of constraint it is @@ -488,12 +488,12 @@ func resourceKmsGrantConstraintsHash(v interface{}) int { if v, ok := m["encryption_context_equals"]; ok { if len(v.(map[string]interface{})) > 0 { - buf.WriteString(fmt.Sprintf("encryption_context_equals-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{})), "-"))) + buf.WriteString(fmt.Sprintf("encryption_context_equals-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{}))))) } } if v, ok := m["encryption_context_subset"]; ok { if len(v.(map[string]interface{})) > 0 { - buf.WriteString(fmt.Sprintf("encryption_context_subset-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{})), "-"))) + buf.WriteString(fmt.Sprintf("encryption_context_subset-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{}))))) } } diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 5b25952abd8..4a118269fdb 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -494,7 +494,7 @@ func resourceAwsLaunchTemplateCreate(d *schema.ResourceData, meta interface{}) e ltName = resource.UniqueId() } - launchTemplateData, err := buildLaunchTemplateData(d, meta) + launchTemplateData, err := buildLaunchTemplateData(d) if err != nil { return err } @@ -650,7 +650,7 @@ func resourceAwsLaunchTemplateUpdate(d *schema.ResourceData, meta interface{}) e conn := meta.(*AWSClient).ec2conn if !d.IsNewResource() { - launchTemplateData, err := buildLaunchTemplateData(d, meta) + launchTemplateData, err := buildLaunchTemplateData(d) if err != nil { return err } @@ -925,7 +925,7 @@ func getTagSpecifications(t []*ec2.LaunchTemplateTagSpecification) []interface{} return s } -func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.RequestLaunchTemplateData, error) { +func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplateData, error) { opts := &ec2.RequestLaunchTemplateData{ UserData: aws.String(d.Get("user_data").(string)), } diff --git a/aws/resource_aws_opsworks_instance.go b/aws/resource_aws_opsworks_instance.go index 16241ad3470..ccbddadce14 100644 --- a/aws/resource_aws_opsworks_instance.go +++ b/aws/resource_aws_opsworks_instance.go @@ -531,7 +531,7 @@ func resourceAwsOpsworksInstanceRead(d *schema.ResourceData, meta interface{}) e for _, v := range instance.LayerIds { layerIds = append(layerIds, *v) } - layerIds, err = sortListBasedonTFFile(layerIds, d, "layer_ids") + layerIds, err = sortListBasedonTFFile(layerIds, d) if err != nil { return fmt.Errorf("Error sorting layer_ids attribute: %#v", err) } @@ -561,7 +561,7 @@ func resourceAwsOpsworksInstanceRead(d *schema.ResourceData, meta interface{}) e d.Set("virtualization_type", instance.VirtualizationType) // Read BlockDeviceMapping - ibds, err := readOpsworksBlockDevices(d, instance, meta) + ibds, err := readOpsworksBlockDevices(instance) if err != nil { return err } @@ -825,7 +825,7 @@ func resourceAwsOpsworksInstanceUpdate(d *schema.ResourceData, meta interface{}) } } else { if status != "stopped" && status != "stopping" && status != "shutting_down" { - err := stopOpsworksInstance(d, meta, true, d.Timeout(schema.TimeoutUpdate)) + err := stopOpsworksInstance(d, meta, d.Timeout(schema.TimeoutUpdate)) if err != nil { return err } @@ -840,7 +840,7 @@ func resourceAwsOpsworksInstanceDelete(d *schema.ResourceData, meta interface{}) client := meta.(*AWSClient).opsworksconn if v, ok := d.GetOk("status"); ok && v.(string) != "stopped" { - err := stopOpsworksInstance(d, meta, true, d.Timeout(schema.TimeoutDelete)) + err := stopOpsworksInstance(d, meta, d.Timeout(schema.TimeoutDelete)) if err != nil { return err } @@ -910,7 +910,7 @@ func startOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, return nil } -func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, timeout time.Duration) error { +func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, timeout time.Duration) error { client := meta.(*AWSClient).opsworksconn instanceId := d.Id() @@ -927,29 +927,26 @@ func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, t return err } - if wait { - log.Printf("[DEBUG] Waiting for instance (%s) to become stopped", instanceId) + log.Printf("[DEBUG] Waiting for instance (%s) to become stopped", instanceId) - stateConf := &resource.StateChangeConf{ - Pending: []string{"stopping", "terminating", "shutting_down", "terminated"}, - Target: []string{"stopped"}, - Refresh: OpsworksInstanceStateRefreshFunc(client, instanceId), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for instance (%s) to become stopped: %s", - instanceId, err) - } + stateConf := &resource.StateChangeConf{ + Pending: []string{"stopping", "terminating", "shutting_down", "terminated"}, + Target: []string{"stopped"}, + Refresh: OpsworksInstanceStateRefreshFunc(client, instanceId), + Timeout: timeout, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for instance (%s) to become stopped: %s", + instanceId, err) } return nil } -func readOpsworksBlockDevices(d *schema.ResourceData, instance *opsworks.Instance, meta interface{}) ( - map[string]interface{}, error) { +func readOpsworksBlockDevices(instance *opsworks.Instance) (map[string]interface{}, error) { blockDevices := make(map[string]interface{}) blockDevices["ebs"] = make([]map[string]interface{}, 0) diff --git a/aws/resource_aws_proxy_protocol_policy.go b/aws/resource_aws_proxy_protocol_policy.go index 5f14be6953d..094bfbc5b1b 100644 --- a/aws/resource_aws_proxy_protocol_policy.go +++ b/aws/resource_aws_proxy_protocol_policy.go @@ -117,7 +117,7 @@ func resourceAwsProxyProtocolPolicyUpdate(d *schema.ResourceData, meta interface } backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) - _, policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) + policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) d.Partial(true) if d.HasChange("instance_ports") { @@ -173,7 +173,7 @@ func resourceAwsProxyProtocolPolicyDelete(d *schema.ResourceData, meta interface backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) ports := d.Get("instance_ports").(*schema.Set).List() - _, policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) + policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) inputs, err := resourceAwsProxyProtocolPolicyRemove(policyName, ports, backends) if err != nil { @@ -259,7 +259,8 @@ func resourceAwsProxyProtocolPolicyAdd(policyName string, ports []interface{}, b // resourceAwsProxyProtocolPolicyParseId takes an ID and parses it into // it's constituent parts. You need two axes (LB name, policy name) // to create or identify a proxy protocol policy in AWS's API. -func resourceAwsProxyProtocolPolicyParseId(id string) (string, string) { +func resourceAwsProxyProtocolPolicyParseId(id string) string { parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] + // We currently omit the ELB name as it is not currently used anywhere + return parts[1] } diff --git a/aws/resource_aws_redshift_cluster.go b/aws/resource_aws_redshift_cluster.go index b19eb6ab081..285849cc25d 100644 --- a/aws/resource_aws_redshift_cluster.go +++ b/aws/resource_aws_redshift_cluster.go @@ -902,7 +902,7 @@ func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) } log.Printf("[DEBUG] Deleting Redshift Cluster: %s", deleteOpts) - _, err := deleteAwsRedshiftCluster(&deleteOpts, conn) + err := deleteAwsRedshiftCluster(&deleteOpts, conn) if err != nil { return err } @@ -912,7 +912,7 @@ func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) return nil } -func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift.Redshift) (interface{}, error) { +func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift.Redshift) error { id := *opts.ClusterIdentifier log.Printf("[INFO] Deleting Redshift Cluster %q", id) err := resource.Retry(15*time.Minute, func() *resource.RetryError { @@ -924,8 +924,7 @@ func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift. return resource.NonRetryableError(err) }) if err != nil { - return nil, fmt.Errorf("Error deleting Redshift Cluster (%s): %s", - id, err) + return fmt.Errorf("Error deleting Redshift Cluster (%s): %s", id, err) } stateConf := &resource.StateChangeConf{ @@ -936,7 +935,9 @@ func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift. MinTimeout: 5 * time.Second, } - return stateConf.WaitForState() + _, err = stateConf.WaitForState() + + return err } func resourceAwsRedshiftClusterStateRefreshFunc(id string, conn *redshift.Redshift) resource.StateRefreshFunc { diff --git a/aws/resource_aws_ses_receipt_rule.go b/aws/resource_aws_ses_receipt_rule.go index 383ab5b4ef3..07b781e9e40 100644 --- a/aws/resource_aws_ses_receipt_rule.go +++ b/aws/resource_aws_ses_receipt_rule.go @@ -360,7 +360,7 @@ func resourceAwsSesReceiptRuleCreate(d *schema.ResourceData, meta interface{}) e conn := meta.(*AWSClient).sesConn createOpts := &ses.CreateReceiptRuleInput{ - Rule: buildReceiptRule(d, meta), + Rule: buildReceiptRule(d), RuleSetName: aws.String(d.Get("rule_set_name").(string)), } @@ -382,7 +382,7 @@ func resourceAwsSesReceiptRuleUpdate(d *schema.ResourceData, meta interface{}) e conn := meta.(*AWSClient).sesConn updateOpts := &ses.UpdateReceiptRuleInput{ - Rule: buildReceiptRule(d, meta), + Rule: buildReceiptRule(d), RuleSetName: aws.String(d.Get("rule_set_name").(string)), } @@ -598,7 +598,7 @@ func resourceAwsSesReceiptRuleDelete(d *schema.ResourceData, meta interface{}) e return nil } -func buildReceiptRule(d *schema.ResourceData, meta interface{}) *ses.ReceiptRule { +func buildReceiptRule(d *schema.ResourceData) *ses.ReceiptRule { receiptRule := &ses.ReceiptRule{ Name: aws.String(d.Get("name").(string)), } diff --git a/aws/resource_aws_sqs_queue.go b/aws/resource_aws_sqs_queue.go index 0bfe29f4b0f..58b6a9d2384 100644 --- a/aws/resource_aws_sqs_queue.go +++ b/aws/resource_aws_sqs_queue.go @@ -151,11 +151,11 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error { cbd := d.Get("content_based_deduplication").(bool) if fq { - if errors := validateSQSFifoQueueName(name, "name"); len(errors) > 0 { + if errors := validateSQSFifoQueueName(name); len(errors) > 0 { return fmt.Errorf("Error validating the FIFO queue name: %v", errors) } } else { - if errors := validateSQSNonFifoQueueName(name, "name"); len(errors) > 0 { + if errors := validateSQSNonFifoQueueName(name); len(errors) > 0 { return fmt.Errorf("Error validating SQS queue name: %v", errors) } } diff --git a/aws/resource_aws_vpn_gateway.go b/aws/resource_aws_vpn_gateway.go index 57ed8a58605..ae9a5bba64b 100644 --- a/aws/resource_aws_vpn_gateway.go +++ b/aws/resource_aws_vpn_gateway.go @@ -218,7 +218,7 @@ func resourceAwsVpnGatewayAttach(d *schema.ResourceData, meta interface{}) error stateConf := &resource.StateChangeConf{ Pending: []string{"detached", "attaching"}, Target: []string{"attached"}, - Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id(), "available"), + Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id()), Timeout: 10 * time.Minute, } if _, err := stateConf.WaitForState(); err != nil { @@ -279,7 +279,7 @@ func resourceAwsVpnGatewayDetach(d *schema.ResourceData, meta interface{}) error stateConf := &resource.StateChangeConf{ Pending: []string{"attached", "detaching", "available"}, Target: []string{"detached"}, - Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id(), "detached"), + Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id()), Timeout: 10 * time.Minute, } if _, err := stateConf.WaitForState(); err != nil { @@ -293,7 +293,7 @@ func resourceAwsVpnGatewayDetach(d *schema.ResourceData, meta interface{}) error // vpnGatewayAttachStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch // the state of a VPN gateway's attachment -func vpnGatewayAttachStateRefreshFunc(conn *ec2.EC2, id string, expected string) resource.StateRefreshFunc { +func vpnGatewayAttachStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { var start time.Time return func() (interface{}, string, error) { if start.IsZero() { diff --git a/aws/resource_aws_waf_byte_match_set.go b/aws/resource_aws_waf_byte_match_set.go index 27f976075d2..3399f45f1b0 100644 --- a/aws/resource_aws_waf_byte_match_set.go +++ b/aws/resource_aws_waf_byte_match_set.go @@ -69,7 +69,7 @@ func resourceAwsWafByteMatchSetCreate(d *schema.ResourceData, meta interface{}) log.Printf("[INFO] Creating ByteMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateByteMatchSetInput{ ChangeToken: token, @@ -140,7 +140,7 @@ func resourceAwsWafByteMatchSetDelete(d *schema.ResourceData, meta interface{}) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteByteMatchSetInput{ ChangeToken: token, @@ -157,7 +157,7 @@ func resourceAwsWafByteMatchSetDelete(d *schema.ResourceData, meta interface{}) } func updateByteMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateByteMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_byte_match_set_test.go b/aws/resource_aws_waf_byte_match_set_test.go index 32524ff6304..941a87d6cb7 100644 --- a/aws/resource_aws_waf_byte_match_set_test.go +++ b/aws/resource_aws_waf_byte_match_set_test.go @@ -181,7 +181,7 @@ func testAccCheckAWSWafByteMatchSetDisappears(v *waf.ByteMatchSet) resource.Test return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateByteMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_geo_match_set.go b/aws/resource_aws_waf_geo_match_set.go index 021afbf63e9..dc5295b8429 100644 --- a/aws/resource_aws_waf_geo_match_set.go +++ b/aws/resource_aws_waf_geo_match_set.go @@ -47,7 +47,7 @@ func resourceAwsWafGeoMatchSetCreate(d *schema.ResourceData, meta interface{}) e log.Printf("[INFO] Creating GeoMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateGeoMatchSetInput{ ChangeToken: token, @@ -120,7 +120,7 @@ func resourceAwsWafGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) e } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteGeoMatchSetInput{ ChangeToken: token, @@ -137,7 +137,7 @@ func resourceAwsWafGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) e } func updateGeoMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateGeoMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_geo_match_set_test.go b/aws/resource_aws_waf_geo_match_set_test.go index 2ea3dcbf5c8..f480f9d440a 100644 --- a/aws/resource_aws_waf_geo_match_set_test.go +++ b/aws/resource_aws_waf_geo_match_set_test.go @@ -174,7 +174,7 @@ func testAccCheckAWSWafGeoMatchSetDisappears(v *waf.GeoMatchSet) resource.TestCh return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateGeoMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_ipset.go b/aws/resource_aws_waf_ipset.go index 4eebe1fd99f..9c4e1b47779 100644 --- a/aws/resource_aws_waf_ipset.go +++ b/aws/resource_aws_waf_ipset.go @@ -57,7 +57,7 @@ func resourceAwsWafIPSet() *schema.Resource { func resourceAwsWafIPSetCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateIPSetInput{ ChangeToken: token, @@ -145,7 +145,7 @@ func resourceAwsWafIPSetDelete(d *schema.ResourceData, meta interface{}) error { } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteIPSetInput{ ChangeToken: token, @@ -163,7 +163,7 @@ func resourceAwsWafIPSetDelete(d *schema.ResourceData, meta interface{}) error { func updateWafIpSetDescriptors(id string, oldD, newD []interface{}, conn *waf.WAF) error { for _, ipSetUpdates := range diffWafIpSetDescriptors(oldD, newD) { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateIPSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_ipset_test.go b/aws/resource_aws_waf_ipset_test.go index 0a7cab6c556..d907226c2cc 100644 --- a/aws/resource_aws_waf_ipset_test.go +++ b/aws/resource_aws_waf_ipset_test.go @@ -320,7 +320,7 @@ func testAccCheckAWSWafIPSetDisappears(v *waf.IPSet) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateIPSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_rate_based_rule.go b/aws/resource_aws_waf_rate_based_rule.go index b974e81ad79..2d3f5f5dada 100644 --- a/aws/resource_aws_waf_rate_based_rule.go +++ b/aws/resource_aws_waf_rate_based_rule.go @@ -68,7 +68,7 @@ func resourceAwsWafRateBasedRule() *schema.Resource { func resourceAwsWafRateBasedRuleCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRateBasedRuleInput{ ChangeToken: token, @@ -157,7 +157,7 @@ func resourceAwsWafRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRateBasedRuleInput{ ChangeToken: token, @@ -174,7 +174,7 @@ func resourceAwsWafRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) } func updateWafRateBasedRuleResource(id string, oldP, newP []interface{}, rateLimit interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRateBasedRuleInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_rate_based_rule_test.go b/aws/resource_aws_waf_rate_based_rule_test.go index 8b969293781..8758993ac75 100644 --- a/aws/resource_aws_waf_rate_based_rule_test.go +++ b/aws/resource_aws_waf_rate_based_rule_test.go @@ -202,7 +202,7 @@ func testAccCheckAWSWafRateBasedRuleDisappears(v *waf.RateBasedRule) resource.Te return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRateBasedRuleInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_regex_match_set.go b/aws/resource_aws_waf_regex_match_set.go index ed19133fa8a..9bfbee72be9 100644 --- a/aws/resource_aws_waf_regex_match_set.go +++ b/aws/resource_aws_waf_regex_match_set.go @@ -69,7 +69,7 @@ func resourceAwsWafRegexMatchSetCreate(d *schema.ResourceData, meta interface{}) log.Printf("[INFO] Creating WAF Regex Match Set: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRegexMatchSetInput{ ChangeToken: token, @@ -140,7 +140,7 @@ func resourceAwsWafRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRegexMatchSetInput{ ChangeToken: token, @@ -157,7 +157,7 @@ func resourceAwsWafRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) } func updateRegexMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRegexMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_regex_match_set_test.go b/aws/resource_aws_waf_regex_match_set_test.go index 70003d0d61d..bd1c43984d4 100644 --- a/aws/resource_aws_waf_regex_match_set_test.go +++ b/aws/resource_aws_waf_regex_match_set_test.go @@ -62,7 +62,7 @@ func testSweepWafRegexMatchSet(region string) error { return fmt.Errorf("Error updating WAF Regex Match Set: %s", err) } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRegexMatchSetInput{ ChangeToken: token, @@ -239,7 +239,7 @@ func testAccCheckAWSWafRegexMatchSetDisappears(set *waf.RegexMatchSet) resource. return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRegexMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_regex_pattern_set.go b/aws/resource_aws_waf_regex_pattern_set.go index 1ebbc58f69a..a09ba6ffcc0 100644 --- a/aws/resource_aws_waf_regex_pattern_set.go +++ b/aws/resource_aws_waf_regex_pattern_set.go @@ -36,7 +36,7 @@ func resourceAwsWafRegexPatternSetCreate(d *schema.ResourceData, meta interface{ log.Printf("[INFO] Creating WAF Regex Pattern Set: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRegexPatternSetInput{ ChangeToken: token, @@ -109,7 +109,7 @@ func resourceAwsWafRegexPatternSetDelete(d *schema.ResourceData, meta interface{ } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRegexPatternSetInput{ ChangeToken: token, @@ -126,7 +126,7 @@ func resourceAwsWafRegexPatternSetDelete(d *schema.ResourceData, meta interface{ } func updateWafRegexPatternSetPatternStrings(id string, oldPatterns, newPatterns []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRegexPatternSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_regex_pattern_set_test.go b/aws/resource_aws_waf_regex_pattern_set_test.go index d53b7cd7046..4a3ce953cbf 100644 --- a/aws/resource_aws_waf_regex_pattern_set_test.go +++ b/aws/resource_aws_waf_regex_pattern_set_test.go @@ -132,7 +132,7 @@ func testAccCheckAWSWafRegexPatternSetDisappears(set *waf.RegexPatternSet) resou return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRegexPatternSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_rule.go b/aws/resource_aws_waf_rule.go index cd22babb94e..fae17269a55 100644 --- a/aws/resource_aws_waf_rule.go +++ b/aws/resource_aws_waf_rule.go @@ -62,7 +62,7 @@ func resourceAwsWafRule() *schema.Resource { func resourceAwsWafRuleCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRuleInput{ ChangeToken: token, @@ -144,7 +144,7 @@ func resourceAwsWafRuleDelete(d *schema.ResourceData, meta interface{}) error { } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRuleInput{ ChangeToken: token, @@ -161,7 +161,7 @@ func resourceAwsWafRuleDelete(d *schema.ResourceData, meta interface{}) error { } func updateWafRuleResource(id string, oldP, newP []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRuleInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_rule_group.go b/aws/resource_aws_waf_rule_group.go index a6dd0aa921b..42fb960deda 100644 --- a/aws/resource_aws_waf_rule_group.go +++ b/aws/resource_aws_waf_rule_group.go @@ -69,7 +69,7 @@ func resourceAwsWafRuleGroup() *schema.Resource { func resourceAwsWafRuleGroupCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRuleGroupInput{ ChangeToken: token, @@ -156,7 +156,7 @@ func deleteWafRuleGroup(id string, oldRules []interface{}, conn *waf.WAF) error } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRuleGroupInput{ ChangeToken: token, @@ -172,7 +172,7 @@ func deleteWafRuleGroup(id string, oldRules []interface{}, conn *waf.WAF) error } func updateWafRuleGroupResource(id string, oldRules, newRules []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRuleGroupInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_rule_group_test.go b/aws/resource_aws_waf_rule_group_test.go index 46253c39d3c..86b431954d2 100644 --- a/aws/resource_aws_waf_rule_group_test.go +++ b/aws/resource_aws_waf_rule_group_test.go @@ -267,7 +267,7 @@ func testAccCheckAWSWafRuleGroupDisappears(group *waf.RuleGroup) resource.TestCh return fmt.Errorf("error listing activated rules in WAF Rule Group (%s): %s", aws.StringValue(group.RuleGroupId), err) } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err = wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRuleGroupInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_rule_test.go b/aws/resource_aws_waf_rule_test.go index 290c7b1bcc7..b2d97512c51 100644 --- a/aws/resource_aws_waf_rule_test.go +++ b/aws/resource_aws_waf_rule_test.go @@ -260,7 +260,7 @@ func testAccCheckAWSWafRuleDisappears(v *waf.Rule) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRuleInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_size_constraint_set.go b/aws/resource_aws_waf_size_constraint_set.go index 8fa4b8f327c..87575247332 100644 --- a/aws/resource_aws_waf_size_constraint_set.go +++ b/aws/resource_aws_waf_size_constraint_set.go @@ -26,7 +26,7 @@ func resourceAwsWafSizeConstraintSetCreate(d *schema.ResourceData, meta interfac log.Printf("[INFO] Creating SizeConstraintSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateSizeConstraintSetInput{ ChangeToken: token, @@ -98,7 +98,7 @@ func resourceAwsWafSizeConstraintSetDelete(d *schema.ResourceData, meta interfac } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteSizeConstraintSetInput{ ChangeToken: token, @@ -114,7 +114,7 @@ func resourceAwsWafSizeConstraintSetDelete(d *schema.ResourceData, meta interfac } func updateSizeConstraintSetResource(id string, oldS, newS []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSizeConstraintSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_size_constraint_set_test.go b/aws/resource_aws_waf_size_constraint_set_test.go index 1023c8129ec..ba9d72bc2b0 100644 --- a/aws/resource_aws_waf_size_constraint_set_test.go +++ b/aws/resource_aws_waf_size_constraint_set_test.go @@ -187,7 +187,7 @@ func testAccCheckAWSWafSizeConstraintSetDisappears(v *waf.SizeConstraintSet) res return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSizeConstraintSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_sql_injection_match_set.go b/aws/resource_aws_waf_sql_injection_match_set.go index e4884486d99..42c6458ccc9 100644 --- a/aws/resource_aws_waf_sql_injection_match_set.go +++ b/aws/resource_aws_waf_sql_injection_match_set.go @@ -61,7 +61,7 @@ func resourceAwsWafSqlInjectionMatchSetCreate(d *schema.ResourceData, meta inter log.Printf("[INFO] Creating SqlInjectionMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateSqlInjectionMatchSetInput{ ChangeToken: token, @@ -132,7 +132,7 @@ func resourceAwsWafSqlInjectionMatchSetDelete(d *schema.ResourceData, meta inter } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteSqlInjectionMatchSetInput{ ChangeToken: token, @@ -149,7 +149,7 @@ func resourceAwsWafSqlInjectionMatchSetDelete(d *schema.ResourceData, meta inter } func updateSqlInjectionMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSqlInjectionMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_sql_injection_match_set_test.go b/aws/resource_aws_waf_sql_injection_match_set_test.go index cb6a1641fa6..802e2894b52 100644 --- a/aws/resource_aws_waf_sql_injection_match_set_test.go +++ b/aws/resource_aws_waf_sql_injection_match_set_test.go @@ -175,7 +175,7 @@ func testAccCheckAWSWafSqlInjectionMatchSetDisappears(v *waf.SqlInjectionMatchSe return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSqlInjectionMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_web_acl.go b/aws/resource_aws_waf_web_acl.go index a4c130bd13b..03016238607 100644 --- a/aws/resource_aws_waf_web_acl.go +++ b/aws/resource_aws_waf_web_acl.go @@ -104,7 +104,7 @@ func resourceAwsWafWebAcl() *schema.Resource { func resourceAwsWafWebAclCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateWebACLInput{ ChangeToken: token, @@ -165,7 +165,7 @@ func resourceAwsWafWebAclUpdate(d *schema.ResourceData, meta interface{}) error o, n := d.GetChange("rules") oldR, newR := o.(*schema.Set).List(), n.(*schema.Set).List() - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateWebACLInput{ ChangeToken: token, @@ -189,7 +189,7 @@ func resourceAwsWafWebAclDelete(d *schema.ResourceData, meta interface{}) error // First, need to delete all rules rules := d.Get("rules").(*schema.Set).List() if len(rules) > 0 { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateWebACLInput{ ChangeToken: token, @@ -204,7 +204,7 @@ func resourceAwsWafWebAclDelete(d *schema.ResourceData, meta interface{}) error } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteWebACLInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_web_acl_test.go b/aws/resource_aws_waf_web_acl_test.go index 18b6532ec21..6db996e2981 100644 --- a/aws/resource_aws_waf_web_acl_test.go +++ b/aws/resource_aws_waf_web_acl_test.go @@ -188,7 +188,7 @@ func testAccCheckAWSWafWebAclDisappears(v *waf.WebACL) resource.TestCheckFunc { return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { opts := &waf.DeleteWebACLInput{ diff --git a/aws/resource_aws_waf_xss_match_set.go b/aws/resource_aws_waf_xss_match_set.go index af1864c08e5..7ecef45f6c4 100644 --- a/aws/resource_aws_waf_xss_match_set.go +++ b/aws/resource_aws_waf_xss_match_set.go @@ -61,7 +61,7 @@ func resourceAwsWafXssMatchSetCreate(d *schema.ResourceData, meta interface{}) e log.Printf("[INFO] Creating XssMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateXssMatchSetInput{ ChangeToken: token, @@ -132,7 +132,7 @@ func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) e } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteXssMatchSetInput{ ChangeToken: token, @@ -149,7 +149,7 @@ func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) e } func updateXssMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateXssMatchSetInput{ ChangeToken: token, diff --git a/aws/resource_aws_waf_xss_match_set_test.go b/aws/resource_aws_waf_xss_match_set_test.go index e6d72784fb3..89755198a13 100644 --- a/aws/resource_aws_waf_xss_match_set_test.go +++ b/aws/resource_aws_waf_xss_match_set_test.go @@ -199,7 +199,7 @@ func testAccCheckAWSWafXssMatchSetDisappears(v *waf.XssMatchSet) resource.TestCh return func(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateXssMatchSetInput{ ChangeToken: token, diff --git a/aws/s3_tags.go b/aws/s3_tags.go index 8de14fa3f56..2712fb155cc 100644 --- a/aws/s3_tags.go +++ b/aws/s3_tags.go @@ -22,7 +22,7 @@ func setTagsS3(conn *s3.S3, d *schema.ResourceData) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - _, err := retryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { + _, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { return conn.DeleteBucketTagging(&s3.DeleteBucketTaggingInput{ Bucket: aws.String(d.Get("bucket").(string)), }) @@ -40,7 +40,7 @@ func setTagsS3(conn *s3.S3, d *schema.ResourceData) error { }, } - _, err := retryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { + _, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { return conn.PutBucketTagging(req) }) if err != nil { diff --git a/aws/structure.go b/aws/structure.go index 825bab4e0c7..4fa0cbdbf82 100644 --- a/aws/structure.go +++ b/aws/structure.go @@ -1892,7 +1892,8 @@ func sortInterfaceSlice(in []interface{}) []interface{} { } // This function sorts List A to look like a list found in the tf file. -func sortListBasedonTFFile(in []string, d *schema.ResourceData, listName string) ([]string, error) { +func sortListBasedonTFFile(in []string, d *schema.ResourceData) ([]string, error) { + listName := "layer_ids" if attributeCount, ok := d.Get(listName + ".#").(int); ok { for i := 0; i < attributeCount; i++ { currAttributeId := d.Get(listName + "." + strconv.Itoa(i)) @@ -1963,22 +1964,6 @@ func getStringPtr(m interface{}, key string) *string { return nil } -// getStringPtrList returns a []*string version of the map value. If the key -// isn't present, getNilStringList returns nil. -func getStringPtrList(m map[string]interface{}, key string) []*string { - if v, ok := m[key]; ok { - var stringList []*string - for _, i := range v.([]interface{}) { - s := i.(string) - stringList = append(stringList, &s) - } - - return stringList - } - - return nil -} - // a convenience wrapper type for the schema.Set map[string]interface{} // Set operations only alter the underlying map if the value is not nil type setMap map[string]interface{} diff --git a/aws/validators.go b/aws/validators.go index bc71b7c2513..4cec1021ee3 100644 --- a/aws/validators.go +++ b/aws/validators.go @@ -694,7 +694,8 @@ func validateSQSQueueName(v interface{}, k string) (ws []string, errors []error) return } -func validateSQSNonFifoQueueName(v interface{}, k string) (errors []error) { +func validateSQSNonFifoQueueName(v interface{}) (errors []error) { + k := "name" value := v.(string) if len(value) > 80 { errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) @@ -706,7 +707,8 @@ func validateSQSNonFifoQueueName(v interface{}, k string) (errors []error) { return } -func validateSQSFifoQueueName(v interface{}, k string) (errors []error) { +func validateSQSFifoQueueName(v interface{}) (errors []error) { + k := "name" value := v.(string) if len(value) > 80 { @@ -1677,7 +1679,8 @@ func validateCognitoRoleMappingsRulesClaim(v interface{}, k string) (ws []string } // Validates that either authenticated or unauthenticated is defined -func validateCognitoRoles(v map[string]interface{}, k string) (errors []error) { +func validateCognitoRoles(v map[string]interface{}) (errors []error) { + k := "roles" _, hasAuthenticated := v["authenticated"].(string) _, hasUnauthenticated := v["unauthenticated"].(string) diff --git a/aws/validators_test.go b/aws/validators_test.go index f1a1411308d..c5accca70d3 100644 --- a/aws/validators_test.go +++ b/aws/validators_test.go @@ -850,11 +850,11 @@ func TestValidateSQSQueueName(t *testing.T) { strings.Repeat("W", 80), } for _, v := range validNames { - if _, errors := validateSQSQueueName(v, "name"); len(errors) > 0 { + if _, errors := validateSQSQueueName(v, "test_attribute"); len(errors) > 0 { t.Fatalf("%q should be a valid SQS queue Name", v) } - if errors := validateSQSNonFifoQueueName(v, "name"); len(errors) > 0 { + if errors := validateSQSNonFifoQueueName(v); len(errors) > 0 { t.Fatalf("%q should be a valid SQS non-fifo queue Name", v) } } @@ -871,11 +871,11 @@ func TestValidateSQSQueueName(t *testing.T) { strings.Repeat("W", 81), // length > 80 } for _, v := range invalidNames { - if _, errors := validateSQSQueueName(v, "name"); len(errors) == 0 { + if _, errors := validateSQSQueueName(v, "test_attribute"); len(errors) == 0 { t.Fatalf("%q should be an invalid SQS queue Name", v) } - if errors := validateSQSNonFifoQueueName(v, "name"); len(errors) == 0 { + if errors := validateSQSNonFifoQueueName(v); len(errors) == 0 { t.Fatalf("%q should be an invalid SQS non-fifo queue Name", v) } } @@ -894,11 +894,11 @@ func TestValidateSQSFifoQueueName(t *testing.T) { fmt.Sprintf("%s.fifo", strings.Repeat("W", 75)), } for _, v := range validNames { - if _, errors := validateSQSQueueName(v, "name"); len(errors) > 0 { + if _, errors := validateSQSQueueName(v, "test_attribute"); len(errors) > 0 { t.Fatalf("%q should be a valid SQS queue Name", v) } - if errors := validateSQSFifoQueueName(v, "name"); len(errors) > 0 { + if errors := validateSQSFifoQueueName(v); len(errors) > 0 { t.Fatalf("%q should be a valid SQS FIFO queue Name: %v", v, errors) } } @@ -916,11 +916,11 @@ func TestValidateSQSFifoQueueName(t *testing.T) { strings.Repeat("W", 81), // length > 80 } for _, v := range invalidNames { - if _, errors := validateSQSQueueName(v, "name"); len(errors) == 0 { + if _, errors := validateSQSQueueName(v, "test_attribute"); len(errors) == 0 { t.Fatalf("%q should be an invalid SQS queue Name", v) } - if errors := validateSQSFifoQueueName(v, "name"); len(errors) == 0 { + if errors := validateSQSFifoQueueName(v); len(errors) == 0 { t.Fatalf("%q should be an invalid SQS FIFO queue Name: %v", v, errors) } } @@ -2434,7 +2434,7 @@ func TestValidateCognitoRoles(t *testing.T) { } for _, s := range validValues { - errors := validateCognitoRoles(s, "roles") + errors := validateCognitoRoles(s) if len(errors) > 0 { t.Fatalf("%q should be a valid Cognito Roles: %v", s, errors) } @@ -2446,7 +2446,7 @@ func TestValidateCognitoRoles(t *testing.T) { } for _, s := range invalidValues { - errors := validateCognitoRoles(s, "roles") + errors := validateCognitoRoles(s) if len(errors) == 0 { t.Fatalf("%q should not be a valid Cognito Roles: %v", s, errors) } diff --git a/aws/waf_token_handlers.go b/aws/waf_token_handlers.go index 2b14b01bcae..3de972aa256 100644 --- a/aws/waf_token_handlers.go +++ b/aws/waf_token_handlers.go @@ -11,14 +11,13 @@ import ( type WafRetryer struct { Connection *waf.WAF - Region string } type withTokenFunc func(token *string) (interface{}, error) func (t *WafRetryer) RetryWithToken(f withTokenFunc) (interface{}, error) { - awsMutexKV.Lock(t.Region) - defer awsMutexKV.Unlock(t.Region) + awsMutexKV.Lock("WafRetryer") + defer awsMutexKV.Unlock("WafRetryer") var out interface{} err := resource.Retry(15*time.Minute, func() *resource.RetryError { @@ -44,6 +43,6 @@ func (t *WafRetryer) RetryWithToken(f withTokenFunc) (interface{}, error) { return out, err } -func newWafRetryer(conn *waf.WAF, region string) *WafRetryer { - return &WafRetryer{Connection: conn, Region: region} +func newWafRetryer(conn *waf.WAF) *WafRetryer { + return &WafRetryer{Connection: conn} } From f2cac73307360b101a353d3cf39a77b54084c7ff Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 2 Nov 2018 12:55:14 -0400 Subject: [PATCH 3151/3316] Allow parallel running of DX VIF acceptance tests. --- ...x_hosted_private_virtual_interface_test.go | 24 ++++++----- ...dx_hosted_public_virtual_interface_test.go | 9 ++-- ...e_aws_dx_private_virtual_interface_test.go | 41 ++++++++++--------- ...ce_aws_dx_public_virtual_interface_test.go | 17 ++++---- 4 files changed, 49 insertions(+), 42 deletions(-) diff --git a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go index 990bd8b9cb3..6817623d312 100644 --- a/aws/resource_aws_dx_hosted_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_private_virtual_interface_test.go @@ -25,6 +25,7 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) + vlan := randIntRange(2049, 4094) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -32,7 +33,7 @@ func TestAccAwsDxHostedPrivateVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), + Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), @@ -61,14 +62,15 @@ func TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate(t *testing.T) { } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) + vlan := randIntRange(2049, 4094) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxHostedPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), + Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), @@ -77,7 +79,7 @@ func TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate(t *testing.T) { ), }, { - Config: testAccDxHostedPrivateVirtualInterfaceConfig_JumboFrames(connectionId, ownerAccountId, vifName, bgpAsn), + Config: testAccDxHostedPrivateVirtualInterfaceConfig_JumboFrames(connectionId, ownerAccountId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), @@ -85,7 +87,7 @@ func TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate(t *testing.T) { ), }, { - Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), + Config: testAccDxHostedPrivateVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxHostedPrivateVirtualInterfaceExists("aws_dx_hosted_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_hosted_private_virtual_interface.foo", "name", vifName), @@ -132,31 +134,31 @@ func testAccCheckAwsDxHostedPrivateVirtualInterfaceExists(name string) resource. } } -func testAccDxHostedPrivateVirtualInterfaceConfig_basic(cid, ownerAcctId, n string, bgpAsn int) string { +func testAccDxHostedPrivateVirtualInterfaceConfig_basic(cid, ownerAcctId, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_dx_hosted_private_virtual_interface" "foo" { connection_id = "%s" owner_account_id = "%s" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d } -`, cid, ownerAcctId, n, bgpAsn) +`, cid, ownerAcctId, n, vlan, bgpAsn) } -func testAccDxHostedPrivateVirtualInterfaceConfig_JumboFrames(cid, ownerAcctId, n string, bgpAsn int) string { +func testAccDxHostedPrivateVirtualInterfaceConfig_JumboFrames(cid, ownerAcctId, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_dx_hosted_private_virtual_interface" "foo" { connection_id = "%s" owner_account_id = "%s" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d mtu = 9001 } -`, cid, ownerAcctId, n, bgpAsn) +`, cid, ownerAcctId, n, vlan, bgpAsn) } diff --git a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go index 8246595fc25..354e987e34e 100644 --- a/aws/resource_aws_dx_hosted_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_hosted_public_virtual_interface_test.go @@ -25,6 +25,7 @@ func TestAccAwsDxHostedPublicVirtualInterface_basic(t *testing.T) { } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) + vlan := randIntRange(2049, 4094) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -32,7 +33,7 @@ func TestAccAwsDxHostedPublicVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxHostedPublicVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxHostedPublicVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn), + Config: testAccDxHostedPublicVirtualInterfaceConfig_basic(connectionId, ownerAccountId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxHostedPublicVirtualInterfaceExists("aws_dx_hosted_public_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_hosted_public_virtual_interface.foo", "name", vifName), @@ -84,14 +85,14 @@ func testAccCheckAwsDxHostedPublicVirtualInterfaceExists(name string) resource.T } } -func testAccDxHostedPublicVirtualInterfaceConfig_basic(cid, ownerAcctId, n string, bgpAsn int) string { +func testAccDxHostedPublicVirtualInterfaceConfig_basic(cid, ownerAcctId, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_dx_hosted_public_virtual_interface" "foo" { connection_id = "%s" owner_account_id = "%s" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d @@ -102,5 +103,5 @@ resource "aws_dx_hosted_public_virtual_interface" "foo" { "175.45.176.0/22" ] } -`, cid, ownerAcctId, n, bgpAsn) +`, cid, ownerAcctId, n, vlan, bgpAsn) } diff --git a/aws/resource_aws_dx_private_virtual_interface_test.go b/aws/resource_aws_dx_private_virtual_interface_test.go index 17214c4acc7..8a9eba3584d 100644 --- a/aws/resource_aws_dx_private_virtual_interface_test.go +++ b/aws/resource_aws_dx_private_virtual_interface_test.go @@ -20,6 +20,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) + vlan := randIntRange(2049, 4094) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -27,7 +28,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -35,7 +36,7 @@ func TestAccAwsDxPrivateVirtualInterface_basic(t *testing.T) { ), }, { - Config: testAccDxPrivateVirtualInterfaceConfig_tags(connectionId, vifName, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_tags(connectionId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -62,6 +63,7 @@ func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) amzAsn := randIntRange(64512, 65534) bgpAsn := randIntRange(64512, 65534) + vlan := randIntRange(2049, 4094) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -69,7 +71,7 @@ func TestAccAwsDxPrivateVirtualInterface_dxGateway(t *testing.T) { CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxPrivateVirtualInterfaceConfig_dxGateway(connectionId, vifName, amzAsn, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_dxGateway(connectionId, vifName, amzAsn, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -87,14 +89,15 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) + vlan := randIntRange(2049, 4094) - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsDxPrivateVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -103,7 +106,7 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { ), }, { - Config: testAccDxPrivateVirtualInterfaceConfig_jumboFrames(connectionId, vifName, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_jumboFrames(connectionId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -111,7 +114,7 @@ func TestAccAwsDxPrivateVirtualInterface_mtuUpdate(t *testing.T) { ), }, { - Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), + Config: testAccDxPrivateVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPrivateVirtualInterfaceExists("aws_dx_private_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_private_virtual_interface.foo", "name", vifName), @@ -158,7 +161,7 @@ func testAccCheckAwsDxPrivateVirtualInterfaceExists(name string) resource.TestCh } } -func testAccDxPrivateVirtualInterfaceConfig_noTags(cid, n string, bgpAsn int) string { +func testAccDxPrivateVirtualInterfaceConfig_noTags(cid, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { @@ -171,14 +174,14 @@ resource "aws_dx_private_virtual_interface" "foo" { vpn_gateway_id = "${aws_vpn_gateway.foo.id}" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d } -`, n, cid, n, bgpAsn) +`, n, cid, n, vlan, bgpAsn) } -func testAccDxPrivateVirtualInterfaceConfig_tags(cid, n string, bgpAsn int) string { +func testAccDxPrivateVirtualInterfaceConfig_tags(cid, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { @@ -191,7 +194,7 @@ resource "aws_dx_private_virtual_interface" "foo" { vpn_gateway_id = "${aws_vpn_gateway.foo.id}" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d @@ -199,10 +202,10 @@ resource "aws_dx_private_virtual_interface" "foo" { Environment = "test" } } -`, n, cid, n, bgpAsn) +`, n, cid, n, vlan, bgpAsn) } -func testAccDxPrivateVirtualInterfaceConfig_dxGateway(cid, n string, amzAsn, bgpAsn int) string { +func testAccDxPrivateVirtualInterfaceConfig_dxGateway(cid, n string, amzAsn, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_dx_gateway" "foo" { name = "%s" @@ -214,14 +217,14 @@ resource "aws_dx_private_virtual_interface" "foo" { dx_gateway_id = "${aws_dx_gateway.foo.id}" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d } -`, n, amzAsn, cid, n, bgpAsn) +`, n, amzAsn, cid, n, vlan, bgpAsn) } -func testAccDxPrivateVirtualInterfaceConfig_jumboFrames(cid, n string, bgpAsn int) string { +func testAccDxPrivateVirtualInterfaceConfig_jumboFrames(cid, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_vpn_gateway" "foo" { tags { @@ -234,10 +237,10 @@ resource "aws_dx_private_virtual_interface" "foo" { vpn_gateway_id = "${aws_vpn_gateway.foo.id}" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d mtu = 9001 } -`, n, cid, n, bgpAsn) +`, n, cid, n, vlan, bgpAsn) } diff --git a/aws/resource_aws_dx_public_virtual_interface_test.go b/aws/resource_aws_dx_public_virtual_interface_test.go index b05bd8bd134..e9bf6b4bf04 100644 --- a/aws/resource_aws_dx_public_virtual_interface_test.go +++ b/aws/resource_aws_dx_public_virtual_interface_test.go @@ -20,6 +20,7 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { } vifName := fmt.Sprintf("terraform-testacc-dxvif-%s", acctest.RandString(5)) bgpAsn := randIntRange(64512, 65534) + vlan := randIntRange(2049, 4094) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -27,7 +28,7 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { CheckDestroy: testAccCheckAwsDxPublicVirtualInterfaceDestroy, Steps: []resource.TestStep{ { - Config: testAccDxPublicVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn), + Config: testAccDxPublicVirtualInterfaceConfig_noTags(connectionId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPublicVirtualInterfaceExists("aws_dx_public_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_public_virtual_interface.foo", "name", vifName), @@ -35,7 +36,7 @@ func TestAccAwsDxPublicVirtualInterface_basic(t *testing.T) { ), }, { - Config: testAccDxPublicVirtualInterfaceConfig_tags(connectionId, vifName, bgpAsn), + Config: testAccDxPublicVirtualInterfaceConfig_tags(connectionId, vifName, bgpAsn, vlan), Check: resource.ComposeTestCheckFunc( testAccCheckAwsDxPublicVirtualInterfaceExists("aws_dx_public_virtual_interface.foo"), resource.TestCheckResourceAttr("aws_dx_public_virtual_interface.foo", "name", vifName), @@ -89,13 +90,13 @@ func testAccCheckAwsDxPublicVirtualInterfaceExists(name string) resource.TestChe } } -func testAccDxPublicVirtualInterfaceConfig_noTags(cid, n string, bgpAsn int) string { +func testAccDxPublicVirtualInterfaceConfig_noTags(cid, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_dx_public_virtual_interface" "foo" { connection_id = "%s" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d @@ -106,16 +107,16 @@ resource "aws_dx_public_virtual_interface" "foo" { "175.45.176.0/22" ] } -`, cid, n, bgpAsn) +`, cid, n, vlan, bgpAsn) } -func testAccDxPublicVirtualInterfaceConfig_tags(cid, n string, bgpAsn int) string { +func testAccDxPublicVirtualInterfaceConfig_tags(cid, n string, bgpAsn, vlan int) string { return fmt.Sprintf(` resource "aws_dx_public_virtual_interface" "foo" { connection_id = "%s" name = "%s" - vlan = 4094 + vlan = %d address_family = "ipv4" bgp_asn = %d @@ -130,5 +131,5 @@ resource "aws_dx_public_virtual_interface" "foo" { Environment = "test" } } -`, cid, n, bgpAsn) +`, cid, n, vlan, bgpAsn) } From f3ef761bb8bf5265ce09961a04a0336b702f1a5e Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 2 Nov 2018 13:06:21 -0400 Subject: [PATCH 3152/3316] resource/aws_emr_cluster: Only pass autoscaling_policy through to JSON parser if non-empty string --- aws/resource_aws_emr_cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index 54b5f13a622..366b2ad7e75 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -1303,7 +1303,7 @@ func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) ([]*emr.Inst applyBidPrice(config, configAttributes) applyEbsConfig(configAttributes, config) - if v, ok := configAttributes["autoscaling_policy"]; ok { + if v, ok := configAttributes["autoscaling_policy"]; ok && v.(string) != "" { var autoScalingPolicy *emr.AutoScalingPolicy err := json.Unmarshal([]byte(v.(string)), &autoScalingPolicy) From 2ccd7b14b749aa2f47a964ee3bea554843467134 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 2 Nov 2018 14:46:19 -0400 Subject: [PATCH 3153/3316] Fix 'Error putting S3 replication configuration: MalformedXML' error. --- aws/resource_aws_s3_bucket.go | 6 +-- aws/resource_aws_s3_bucket_test.go | 66 +++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 4673dd194e1..d7ee14d00de 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -1783,9 +1783,6 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. if rrid, ok := rr["id"]; ok && rrid != "" { rcRule.ID = aws.String(rrid.(string)) } - if prefix, ok := rr["prefix"]; ok && prefix != "" { - rcRule.Prefix = aws.String(prefix.(string)) - } ruleDestination := &s3.Destination{} if dest, ok := rr["destination"].(*schema.Set); ok && dest.Len() > 0 { @@ -1849,6 +1846,9 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. rcRule.DeleteMarkerReplication = &s3.DeleteMarkerReplication{ Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), } + } else { + // XML schema V1. + rcRule.Prefix = aws.String(rr["prefix"].(string)) } rules = append(rules, rcRule) diff --git a/aws/resource_aws_s3_bucket_test.go b/aws/resource_aws_s3_bucket_test.go index 245c44a5504..615a4541e7f 100644 --- a/aws/resource_aws_s3_bucket_test.go +++ b/aws/resource_aws_s3_bucket_test.go @@ -1119,6 +1119,33 @@ func TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError(t *testing.T) }) } +// Prefix issue: https://github.com/terraform-providers/terraform-provider-aws/issues/6340 +func TestAccAWSS3Bucket_ReplicationWithoutPrefix(t *testing.T) { + rInt := acctest.RandInt() + region := testAccGetRegion() + + // record the initialized providers so that we can use them to check for the instances in each region + var providers []*schema.Provider + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + testAccPreCheck(t) + testAccMultipleRegionsPreCheck(t) + }, + ProviderFactories: testAccProviderFactories(&providers), + CheckDestroy: testAccCheckWithProviders(testAccCheckAWSS3BucketDestroyWithProvider, &providers), + Steps: []resource.TestStep{ + { + Config: testAccAWSS3BucketConfigReplicationWithoutPrefix(rInt), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.bucket", testAccAwsRegionProviderFunc(region, &providers)), + testAccCheckAWSS3BucketExistsWithProvider("aws_s3_bucket.destination", testAccAwsRegionProviderFunc("eu-west-1", &providers)), + ), + }, + }, + }) +} + func TestAccAWSS3Bucket_ReplicationSchemaV2(t *testing.T) { rInt := acctest.RandInt() region := testAccGetRegion() @@ -1127,7 +1154,7 @@ func TestAccAWSS3Bucket_ReplicationSchemaV2(t *testing.T) { // record the initialized providers so that we can use them to check for the instances in each region var providers []*schema.Provider - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) testAccMultipleRegionsPreCheck(t) @@ -2640,6 +2667,43 @@ resource "aws_s3_bucket" "destination" { `, randInt, randInt, randInt) } +func testAccAWSS3BucketConfigReplicationWithoutPrefix(randInt int) string { + return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` +resource "aws_s3_bucket" "bucket" { + provider = "aws.uswest2" + bucket = "tf-test-bucket-%d" + acl = "private" + + versioning { + enabled = true + } + + replication_configuration { + role = "${aws_iam_role.role.arn}" + rules { + id = "foobar" + status = "Enabled" + + destination { + bucket = "${aws_s3_bucket.destination.arn}" + storage_class = "STANDARD" + } + } + } +} + +resource "aws_s3_bucket" "destination" { + provider = "aws.euwest" + bucket = "tf-test-bucket-destination-%d" + region = "eu-west-1" + + versioning { + enabled = true + } +} +`, randInt, randInt, randInt) +} + func testAccAWSS3BucketConfigReplicationNoVersioning(randInt int) string { return fmt.Sprintf(testAccAWSS3BucketConfigReplicationBasic+` resource "aws_s3_bucket" "bucket" { From 07682c398094918af377f87d4d9a66bd3ed8de4f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 2 Nov 2018 16:33:18 -0400 Subject: [PATCH 3154/3316] deps: aws/aws-sdk-go@v1.15.68 Updated via: `govendor fetch github.com/aws/aws-sdk-go/...@v1.15.68` --- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/internal/ini/ini_parser.go | 24 +- vendor/vendor.json | 1052 ++++++++--------- 3 files changed, 549 insertions(+), 529 deletions(-) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index dc5134e28d6..e81b9018e92 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.15.67" +const SDKVersion = "1.15.68" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go index a43127df94d..3ea751a98f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go @@ -87,8 +87,9 @@ var parseTable = map[ASTKind]map[TokenType]int{ }, ASTKindSectionStatement: map[TokenType]int{ TokenLit: SectionState, + TokenOp: SectionState, TokenSep: CloseScopeState, - TokenWS: SkipTokenState, + TokenWS: SectionState, TokenNL: SkipTokenState, }, ASTKindCompletedSectionStatement: map[TokenType]int{ @@ -253,6 +254,26 @@ loop: return nil, NewParseError("expected ']'") } + // trim left hand side of spaces + for i := 0; i < len(k.Root.raw); i++ { + if !isWhitespace(k.Root.raw[i]) { + break + } + + k.Root.raw = k.Root.raw[1:] + i-- + } + + // trim right hand side of spaces + for i := len(k.Root.raw) - 1; i > 0; i-- { + if !isWhitespace(k.Root.raw[i]) { + break + } + + k.Root.raw = k.Root.raw[:len(k.Root.raw)-1] + i-- + } + stack.Push(newCompletedSectionStatement(k)) case SectionState: var stmt AST @@ -268,7 +289,6 @@ loop: // the label of the section stmt = newSectionStatement(tok) case ASTKindSectionStatement: - k.Root.raw = append(k.Root.raw, ' ') k.Root.raw = append(k.Root.raw, tok.Raw()...) stmt = k default: diff --git a/vendor/vendor.json b/vendor/vendor.json index 0a49f23a280..ce33942b468 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -47,1052 +47,1052 @@ "versionExact": "v1.0.0" }, { - "checksumSHA1": "aixEzuqVb4javd8+opBzx6eJeno=", + "checksumSHA1": "PdI4N7MHWRcnI+K2RozvpyTWekI=", "path": "github.com/aws/aws-sdk-go/aws", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "DtuTqKH29YnLjrIJkRYX0HQtXY0=", "path": "github.com/aws/aws-sdk-go/aws/arn", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=", "path": "github.com/aws/aws-sdk-go/aws/awserr", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=", "path": "github.com/aws/aws-sdk-go/aws/awsutil", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "EwL79Cq6euk+EV/t/n2E+jzPNmU=", "path": "github.com/aws/aws-sdk-go/aws/client", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "uEJU4I6dTKaraQKvrljlYKUZwoc=", "path": "github.com/aws/aws-sdk-go/aws/client/metadata", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "vVSUnICaD9IaBQisCfw0n8zLwig=", "path": "github.com/aws/aws-sdk-go/aws/corehandlers", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "21pBkDFjY5sDY1rAW+f8dDPcWhk=", "path": "github.com/aws/aws-sdk-go/aws/credentials", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "JTilCBYWVAfhbKSnrxCNhE8IFns=", "path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "1pENtl2K9hG7qoB7R6J7dAHa82g=", "path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=", "path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "KZylhHa5CQP8deDHphHMU2tUr3o=", "path": "github.com/aws/aws-sdk-go/aws/csm", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "7AmyyJXVkMdmy8dphC3Nalx5XkI=", "path": "github.com/aws/aws-sdk-go/aws/defaults", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "mYqgKOMSGvLmrt0CoBNbqdcTM3c=", "path": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "2A43/BvKiboLMfxnVeco/ciSiZg=", "path": "github.com/aws/aws-sdk-go/aws/endpoints", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "JQpL1G6Z8ri4zsuqzQTQK9YUcKw=", "path": "github.com/aws/aws-sdk-go/aws/request", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "0GuwwqMsJcLgs2fvnupT8CP8BP4=", "path": "github.com/aws/aws-sdk-go/aws/session", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "NI5Qu/tfh4S4st2RsI7W8Fces9Q=", "path": "github.com/aws/aws-sdk-go/aws/signer/v4", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { - "checksumSHA1": "xkyRjLN9DBLTWt+cIzE57lCf+mg=", + "checksumSHA1": "MX8pSH/zDC0kZbbvDSeeO5CsYm0=", "path": "github.com/aws/aws-sdk-go/internal/ini", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "QvKGojx+wCHTDfXQ1aoOYzH3Y88=", "path": "github.com/aws/aws-sdk-go/internal/s3err", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "wjxQlU1PYxrDRFoL1Vek8Wch7jk=", "path": "github.com/aws/aws-sdk-go/internal/sdkio", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "MYLldFRnsZh21TfCkgkXCT3maPU=", "path": "github.com/aws/aws-sdk-go/internal/sdkrand", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "tQVg7Sz2zv+KkhbiXxPH0mh9spg=", "path": "github.com/aws/aws-sdk-go/internal/sdkuri", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "LjfJ5ydXdiSuQixC+HrmSZjW3NU=", "path": "github.com/aws/aws-sdk-go/internal/shareddefaults", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "NHfa9brYkChSmKiBcKe+xMaJzlc=", "path": "github.com/aws/aws-sdk-go/private/protocol", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "0cZnOaE1EcFUuiu4bdHV2k7slQg=", "path": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "stsUCJVnZ5yMrmzSExbjbYp5tZ8=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "bOQjEfKXaTqe7dZhDDER/wZUzQc=", "path": "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "tXRIRarT7qepHconxydtO7mXod4=", "path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "v2c4B7IgTyjl7ShytqbTOqhCIoM=", "path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "lj56XJFI2OSp+hEOrFZ+eiEi/yM=", "path": "github.com/aws/aws-sdk-go/private/protocol/query", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "+O6A945eTP9plLpkEMZB0lwBAcg=", "path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "uRvmEPKcEdv7qc0Ep2zn0E3Xumc=", "path": "github.com/aws/aws-sdk-go/private/protocol/rest", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "S7NJNuKPbT+a9/zk9qC1/zZAHLM=", "path": "github.com/aws/aws-sdk-go/private/protocol/restjson", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "ZZgzuZoMphxAf8wwz9QqpSQdBGc=", "path": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "soXVJWQ/xvEB72Mo6FresaQIxLg=", "path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "F6mth+G7dXN1GI+nktaGo8Lx8aE=", "path": "github.com/aws/aws-sdk-go/private/signer/v2", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "V5YPKdVv7D3cpcfO2gecYoB4+0E=", "path": "github.com/aws/aws-sdk-go/service/acm", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "TekD25t+ErY7ep0VSZU1RbOuAhg=", "path": "github.com/aws/aws-sdk-go/service/acmpca", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Nqzsk16UhXLuwQYjWWLBiqc6yM4=", "path": "github.com/aws/aws-sdk-go/service/apigateway", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "AAv5tgpGyzpzwfftoAJnudq2334=", "path": "github.com/aws/aws-sdk-go/service/applicationautoscaling", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "4GehXfXvsfsv903OjmzEQskC2Z4=", "path": "github.com/aws/aws-sdk-go/service/appsync", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "62J/tLeZX36VfFPh5+gCrH9kh/E=", "path": "github.com/aws/aws-sdk-go/service/athena", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "zuBvjLwdQ32/GXiMN8tbB6sX+Jk=", "path": "github.com/aws/aws-sdk-go/service/autoscaling", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "n4HcNMas1d6LTxYVWwzamt9e/JY=", "path": "github.com/aws/aws-sdk-go/service/batch", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "QggGqwfJU9p9vk0Rc2GdQL5MwMk=", "path": "github.com/aws/aws-sdk-go/service/budgets", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "VatUlbTYWJxikHDG/XnfIgejXtI=", "path": "github.com/aws/aws-sdk-go/service/cloud9", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "GwbK865fFiarZoSSzSbVqcJwuL4=", "path": "github.com/aws/aws-sdk-go/service/cloudformation", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "PZHlzkNYMSasi//Us6Eguq/rz48=", "path": "github.com/aws/aws-sdk-go/service/cloudfront", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "36H7Vj7tRy/x0zvKjXZxuOhZ4zk=", "path": "github.com/aws/aws-sdk-go/service/cloudhsmv2", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "tOw80eNTNpvIpMRVBr9oRjLcQ58=", "path": "github.com/aws/aws-sdk-go/service/cloudsearch", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "qWajWS3eZiZUIW1c2C3nH4tC+TI=", "path": "github.com/aws/aws-sdk-go/service/cloudtrail", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "YsLO1gRTLh3f+c3TdsYs0WqHUKo=", "path": "github.com/aws/aws-sdk-go/service/cloudwatch", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "OF5katFgWJVanCOPAwiIsAS/Fqs=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchevents", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "9Cxvnmqh2j0dX5OFoHOu5cePz1Y=", "path": "github.com/aws/aws-sdk-go/service/cloudwatchlogs", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "FKWSs5Dezkgw45cO9tXo+n1D+2w=", "path": "github.com/aws/aws-sdk-go/service/codebuild", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "9uVTrIQWdmX4oWxLYOB6QHf7mdo=", "path": "github.com/aws/aws-sdk-go/service/codecommit", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "zJdKvz7MomKCn752Wizv3OkecrI=", "path": "github.com/aws/aws-sdk-go/service/codedeploy", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Rj1HnUmX+z8y0dCh1c0QpMwAq38=", "path": "github.com/aws/aws-sdk-go/service/codepipeline", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "cJY0EMAnPPjmLHW6BepTS4yrI/g=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentity", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "s2S+xgdxmt4yjviWgRzgX8Tk2pE=", "path": "github.com/aws/aws-sdk-go/service/cognitoidentityprovider", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "MYrIailhvTD9FcqQr8XZzov1yWw=", "path": "github.com/aws/aws-sdk-go/service/configservice", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "4dhDM2MvNxOvwBwL8ruhXppwRtM=", "path": "github.com/aws/aws-sdk-go/service/databasemigrationservice", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "af9EdSqDMCYQElRwv6JyhNIusQo=", "path": "github.com/aws/aws-sdk-go/service/datapipeline", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "E2PzR2gdjvKrUoxFlf5Recjd604=", "path": "github.com/aws/aws-sdk-go/service/dax", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "4bC9kZGFPtYITOw8jTdVFpJPNkM=", "path": "github.com/aws/aws-sdk-go/service/devicefarm", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "d2cEBjI/sgDnWEzHtwkTqu7NS5Y=", "path": "github.com/aws/aws-sdk-go/service/directconnect", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "SMFibYGCd4yJfI7cV6m5hsA0DdU=", "path": "github.com/aws/aws-sdk-go/service/directoryservice", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Sry+6J6O/Vi5Z6RvL40uu6Kb9KM=", "path": "github.com/aws/aws-sdk-go/service/dlm", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Ca+Lj+lYT1bFPmFqRFse3jtH1QA=", "path": "github.com/aws/aws-sdk-go/service/dynamodb", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "c+gtSNDz1TiatUZuGokVFIowv4w=", "path": "github.com/aws/aws-sdk-go/service/ec2", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Ib0Plp1+0bdv4RlTvyTjJY38drE=", "path": "github.com/aws/aws-sdk-go/service/ecr", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "4QRd6sbMxvfIit9c1408cXvYoPA=", "path": "github.com/aws/aws-sdk-go/service/ecs", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "8ea7fZjeKLrp8d0H2oPJt+CmAEk=", "path": "github.com/aws/aws-sdk-go/service/efs", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "zvWXQTNt4mA58PUlswztK+aniv0=", "path": "github.com/aws/aws-sdk-go/service/eks", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "UR7K4m62MzrSPEB4KLLEQOsJ4mw=", "path": "github.com/aws/aws-sdk-go/service/elasticache", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "iRZ8TBVI03KJhe3usx8HZH+hz7Q=", "path": "github.com/aws/aws-sdk-go/service/elasticbeanstalk", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Xv5k/JHJ+CsuyUCc5SoENm2r8w4=", "path": "github.com/aws/aws-sdk-go/service/elasticsearchservice", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "apL29Unu7vIxb5VgA+HWW0nm1v0=", "path": "github.com/aws/aws-sdk-go/service/elastictranscoder", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "f5/ev7DpX3Fn2Qg12TG8+aXX8Ek=", "path": "github.com/aws/aws-sdk-go/service/elb", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "SozrDFhzpIRmVf6xcx2OgsNSONE=", "path": "github.com/aws/aws-sdk-go/service/elbv2", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Kv3fpVUq/lOmilTffzAnRQ/5yPk=", "path": "github.com/aws/aws-sdk-go/service/emr", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "BSlqxRfmXlzZyImxHw7UHGUuSj0=", "path": "github.com/aws/aws-sdk-go/service/firehose", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "lAJmnDWbMBwbWp2LNj+EgoK44Gw=", "path": "github.com/aws/aws-sdk-go/service/fms", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "VOSOe2McOhEVDSfRAz7OM5stigI=", "path": "github.com/aws/aws-sdk-go/service/gamelift", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "BkSoTPbLpV9Ov9iVpuBRJv9j8+s=", "path": "github.com/aws/aws-sdk-go/service/glacier", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "5kEA8EUoVwodknTHutskiCfu4+c=", "path": "github.com/aws/aws-sdk-go/service/glue", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "a8UUqzlic1ljsDtjTH97ShjzFIY=", "path": "github.com/aws/aws-sdk-go/service/guardduty", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "xke6oymAAPvAuHxEm2eWp+mdaaw=", "path": "github.com/aws/aws-sdk-go/service/iam", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "0EmBq5ipRFEW1qSToFlBP6WmRyA=", "path": "github.com/aws/aws-sdk-go/service/inspector", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "HSvJfXlGnhV+mKWxQaoJWnjFk1E=", "path": "github.com/aws/aws-sdk-go/service/iot", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "BqFgvuCkO8U2SOLpzBEWAwkSwL0=", "path": "github.com/aws/aws-sdk-go/service/kinesis", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "o92noObpHXdSONAKlSCjmheNal0=", "path": "github.com/aws/aws-sdk-go/service/kinesisanalytics", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "ac/mCyWnYF9Br3WPYQcAOYGxCFc=", "path": "github.com/aws/aws-sdk-go/service/kms", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "S/ofAFO461yHy/kcnkxDWRxN/5g=", "path": "github.com/aws/aws-sdk-go/service/lambda", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "R8gYQx1m4W1Z8GXwFz10Y9eFkpc=", "path": "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "cfjEDPewt2E9YL4o2VxVLVxI8qo=", "path": "github.com/aws/aws-sdk-go/service/lightsail", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "RVGzBxEeU2U6tmIWIsK4HNCYOig=", "path": "github.com/aws/aws-sdk-go/service/macie", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "u4Z65p7SrBA7407CU/4tKzpDPBA=", "path": "github.com/aws/aws-sdk-go/service/mediaconvert", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "s6ddzZb4HxhgfVLHPZS8MD2POEA=", "path": "github.com/aws/aws-sdk-go/service/medialive", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "rzfEIwVWz0hJQB9Mzl9y4s/TWpk=", "path": "github.com/aws/aws-sdk-go/service/mediapackage", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "PI4HQYFv1c30dZh4O4CpuxC1sc8=", "path": "github.com/aws/aws-sdk-go/service/mediastore", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "kq99e0KCM51EmVJwJ2ycUdzwLWM=", "path": "github.com/aws/aws-sdk-go/service/mediastoredata", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "QzXXaK3Wp4dyew5yPBf6vvthDrU=", "path": "github.com/aws/aws-sdk-go/service/mq", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "y1mGrPJlPShO/yOagp/iFRyHMtg=", "path": "github.com/aws/aws-sdk-go/service/neptune", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "ZkfCVW7M7hCcVhk4wUPOhIhfKm0=", "path": "github.com/aws/aws-sdk-go/service/opsworks", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "jbeiGywfS9eq+sgkpYdTSG1+6OY=", "path": "github.com/aws/aws-sdk-go/service/organizations", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "W19YWtdLN9JEwQD9ZZhRY/1JpEE=", "path": "github.com/aws/aws-sdk-go/service/pinpoint", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "xKY1N27xgmGIfx4qRKsuPRzhY4Q=", "path": "github.com/aws/aws-sdk-go/service/pricing", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "iwcvPrH06I34xCzgQWzQ3mC+Vaw=", "path": "github.com/aws/aws-sdk-go/service/rds", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "Xx8T0QmW/MaImDRDsPEwCGNZhOA=", "path": "github.com/aws/aws-sdk-go/service/redshift", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "t0B6j5VfubV4rBgyjh/BC31beAE=", "path": "github.com/aws/aws-sdk-go/service/resourcegroups", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "vn3OhTeWgYQMFDZ+iRuNa1EzNg8=", "path": "github.com/aws/aws-sdk-go/service/route53", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "yDbIw+lVcsmjyom0xI+8khZNy6o=", "path": "github.com/aws/aws-sdk-go/service/s3", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "NRZKjpzYANfCN+jREHbHM1B+ws8=", "path": "github.com/aws/aws-sdk-go/service/sagemaker", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "JPCIldJju4peXDEB9QglS3aD/G0=", "path": "github.com/aws/aws-sdk-go/service/secretsmanager", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "8fuk2Uppm5zHqEYhOsVmaW4MKKw=", "path": "github.com/aws/aws-sdk-go/service/serverlessapplicationrepository", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "IPCugXhAsuqPN4+PQBN+aXC4FFg=", "path": "github.com/aws/aws-sdk-go/service/servicecatalog", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "+EZbk9VlvYV1bAT3NNHu3krvlvg=", "path": "github.com/aws/aws-sdk-go/service/servicediscovery", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "pq0s/7ZYvscjU6DHFxrasIIcu/o=", "path": "github.com/aws/aws-sdk-go/service/ses", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "/Ln2ZFfKCZq8hqfr613XO8ZpnRs=", "path": "github.com/aws/aws-sdk-go/service/sfn", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "g6KVAXiGpvaHGM6bOf5OBkvWRb4=", "path": "github.com/aws/aws-sdk-go/service/simpledb", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "nQ9M0Vf1QD+1fV9btS7o8SXZ2Bw=", "path": "github.com/aws/aws-sdk-go/service/sns", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "5nHvnLQSvF4JOtXu/hi+iZOVfak=", "path": "github.com/aws/aws-sdk-go/service/sqs", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "0R29aiW+KLuKbht7GPkAE/qHTrU=", "path": "github.com/aws/aws-sdk-go/service/ssm", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "+oRYFnGRYOqZGZcQ0hrOONtGH/k=", "path": "github.com/aws/aws-sdk-go/service/storagegateway", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "35a/vm5R/P68l/hQD55GqviO6bg=", "path": "github.com/aws/aws-sdk-go/service/sts", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "hTDzNXqoUUS81wwttkD8My6MstI=", "path": "github.com/aws/aws-sdk-go/service/swf", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "PR55l/umJd2tTXH03wDMA65g1gA=", "path": "github.com/aws/aws-sdk-go/service/waf", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "ySJkBXUzoWccGDdjChs4MLB1L0A=", "path": "github.com/aws/aws-sdk-go/service/wafregional", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "qw268ecBeOnv8xhMUPzFTQ8uoYI=", "path": "github.com/aws/aws-sdk-go/service/workspaces", - "revision": "97a47d14fbb0744966b484d5b089cdc9814b493b", - "revisionTime": "2018-11-01T22:32:55Z", - "version": "v1.15.67", - "versionExact": "v1.15.67" + "revision": "3264db248fe8d241f6949ed35e33b11c0aec3c93", + "revisionTime": "2018-11-02T20:11:48Z", + "version": "v1.15.68", + "versionExact": "v1.15.68" }, { "checksumSHA1": "yBBHqv7DvZNsZdF00SO8PbEQAKU=", From 3c3e1369697e14c180ca03bdc1048d800b7057dd Mon Sep 17 00:00:00 2001 From: Pavel Platto Date: Sat, 3 Nov 2018 09:21:17 +0200 Subject: [PATCH 3155/3316] gamelift_game_session_queue: Remove redundant second Name assignment --- aws/resource_aws_gamelift_game_session_queue.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/aws/resource_aws_gamelift_game_session_queue.go b/aws/resource_aws_gamelift_game_session_queue.go index f4a2446e7c2..37c6f86b90a 100644 --- a/aws/resource_aws_gamelift_game_session_queue.go +++ b/aws/resource_aws_gamelift_game_session_queue.go @@ -68,9 +68,6 @@ func resourceAwsGameliftGameSessionQueueCreate(d *schema.ResourceData, meta inte PlayerLatencyPolicies: expandGameliftGameSessionPlayerLatencyPolicies(d.Get("player_latency_policy").([]interface{})), TimeoutInSeconds: aws.Int64(int64(d.Get("timeout_in_seconds").(int))), } - if v, ok := d.GetOk("name"); ok { - input.Name = aws.String(v.(string)) - } log.Printf("[INFO] Creating Gamelift Session Queue: %s", input) out, err := conn.CreateGameSessionQueue(&input) if err != nil { From 51191b66cfa908c8aa1ac373c77b440503cb1264 Mon Sep 17 00:00:00 2001 From: Rick Burgess Date: Sat, 3 Nov 2018 08:29:42 +0100 Subject: [PATCH 3156/3316] added tests for force delete path --- aws/resource_aws_iam_user_test.go | 58 ++++++++++++++++++++++++++++ aws/test-fixtures/public-ssh-key.pub | 1 + 2 files changed, 59 insertions(+) create mode 100644 aws/test-fixtures/public-ssh-key.pub diff --git a/aws/resource_aws_iam_user_test.go b/aws/resource_aws_iam_user_test.go index 2a38e81f32d..c49c9ebe074 100644 --- a/aws/resource_aws_iam_user_test.go +++ b/aws/resource_aws_iam_user_test.go @@ -4,6 +4,8 @@ import ( "fmt" "testing" + "io/ioutil" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/acctest" @@ -368,3 +370,59 @@ resource "aws_iam_user" "user" { } `, rName, permissionsBoundary) } + +func TestAccAWSUser_ForceDestroy_SSHKey(t *testing.T) { + var user iam.GetUserOutput + + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_user.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSUserConfigForceDestroy(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + testAccCheckAWSUserUploadsSSHKey(&user), + ), + }, + }, + }) +} + +func testAccCheckAWSUserUploadsSSHKey(getUserOutput *iam.GetUserOutput) resource.TestCheckFunc { + + return func(s *terraform.State) error { + + sshKey, err := ioutil.ReadFile("./test-fixtures/public-ssh-key.pub") + if err != nil { + return fmt.Errorf("error reading SSH fixture: %s", err) + } + + iamconn := testAccProvider.Meta().(*AWSClient).iamconn + + input := &iam.UploadSSHPublicKeyInput{ + UserName: getUserOutput.User.UserName, + SSHPublicKeyBody: aws.String(string(sshKey)), + } + + _, err = iamconn.UploadSSHPublicKey(input) + if err != nil { + return fmt.Errorf("error uploading IAM User (%s) SSH key: %s", *getUserOutput.User.UserName, err) + } + + return nil + } +} + +func testAccAWSUserConfigForceDestroy(rName string) string { + return fmt.Sprintf(` +resource "aws_iam_user" "test" { + force_destroy = true + name = %q +} +`, rName) +} diff --git a/aws/test-fixtures/public-ssh-key.pub b/aws/test-fixtures/public-ssh-key.pub new file mode 100644 index 00000000000..70f18ecfd04 --- /dev/null +++ b/aws/test-fixtures/public-ssh-key.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtCk0lzMj1gPEOjdfQ37AIxCyETqJBubaMWuB4bgvGHp8LvEghr2YDl2bml1JrE1EOcZhPnIwgyucryXKA959sTUlgbvaFN7vmpVze56Q9tVU6BJQxOdaRoy5FcQMET9LB6SdbXk+V4CkDMsQNaFXezpg98HgCj+V7+bBWsfI6U63IESlWKK7kraCom8EWxkQk4mk9fizE2I+KrtiqN4xcah02LFG6IMnS+Xy3CDhcpZeYzWOV6zhcf675UJOdg/pLgQbUhhiwTOJFgRo8IcvE3iBrRMz508ppx6vLLr8J+3B8ujykc+/3ZSGfQfx6rO+OuSskhG5FLI6icbQBtBzf terraform-provider-aws@hashicorp.com From e4631a3b12372cd384415e02ae21d16e6b7d9bb1 Mon Sep 17 00:00:00 2001 From: Rick Burgess Date: Sun, 4 Nov 2018 10:23:14 +0100 Subject: [PATCH 3157/3316] Refactor: moved all delete behaviours into seperate functions This makes the force delete flow more obvious and allows for easier reordering or parallelisation of delete behaviours --- aws/resource_aws_iam_user.go | 205 +++++++++++++++++++++-------------- 1 file changed, 124 insertions(+), 81 deletions(-) diff --git a/aws/resource_aws_iam_user.go b/aws/resource_aws_iam_user.go index 98fff704305..830674ebe05 100644 --- a/aws/resource_aws_iam_user.go +++ b/aws/resource_aws_iam_user.go @@ -205,97 +205,25 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { // All access keys, MFA devices and login profile for the user must be removed if d.Get("force_destroy").(bool) { - var accessKeys []string - listAccessKeys := &iam.ListAccessKeysInput{ - UserName: aws.String(d.Id()), - } - pageOfAccessKeys := func(page *iam.ListAccessKeysOutput, lastPage bool) (shouldContinue bool) { - for _, k := range page.AccessKeyMetadata { - accessKeys = append(accessKeys, *k.AccessKeyId) - } - return !lastPage - } - err = iamconn.ListAccessKeysPages(listAccessKeys, pageOfAccessKeys) + + err = deleteAwsIamUserAccessKeys(iamconn, d.Id()) if err != nil { - return fmt.Errorf("Error removing access keys of user %s: %s", d.Id(), err) - } - for _, k := range accessKeys { - _, err := iamconn.DeleteAccessKey(&iam.DeleteAccessKeyInput{ - UserName: aws.String(d.Id()), - AccessKeyId: aws.String(k), - }) - if err != nil { - return fmt.Errorf("Error deleting access key %s: %s", k, err) - } + return err } - var publicKeys []string - listSSHPublicKeys := &iam.ListSSHPublicKeysInput{ - UserName: aws.String(d.Id()), - } - pageOfListSSHPublicKeys := func(page *iam.ListSSHPublicKeysOutput, lastPage bool) (shouldContinue bool) { - for _, k := range page.SSHPublicKeys { - publicKeys = append(publicKeys, *k.SSHPublicKeyId) - } - return !lastPage - } - err = iamconn.ListSSHPublicKeysPages(listSSHPublicKeys, pageOfListSSHPublicKeys) + err = deleteAwsIamUserSSHKeys(iamconn, d.Id()) if err != nil { - return fmt.Errorf("Error removing public SSH keys of user %s: %s", d.Id(), err) - } - for _, k := range publicKeys { - _, err := iamconn.DeleteSSHPublicKey(&iam.DeleteSSHPublicKeyInput{ - UserName: aws.String(d.Id()), - SSHPublicKeyId: aws.String(k), - }) - if err != nil { - return fmt.Errorf("Error deleting public SSH key %s: %s", k, err) - } + return err } - var MFADevices []string - listMFADevices := &iam.ListMFADevicesInput{ - UserName: aws.String(d.Id()), - } - pageOfMFADevices := func(page *iam.ListMFADevicesOutput, lastPage bool) (shouldContinue bool) { - for _, m := range page.MFADevices { - MFADevices = append(MFADevices, *m.SerialNumber) - } - return !lastPage - } - err = iamconn.ListMFADevicesPages(listMFADevices, pageOfMFADevices) + err = deleteAwsIamUserMFADevices(iamconn, d.Id()) if err != nil { - return fmt.Errorf("Error removing MFA devices of user %s: %s", d.Id(), err) - } - for _, m := range MFADevices { - _, err := iamconn.DeactivateMFADevice(&iam.DeactivateMFADeviceInput{ - UserName: aws.String(d.Id()), - SerialNumber: aws.String(m), - }) - if err != nil { - return fmt.Errorf("Error deactivating MFA device %s: %s", m, err) - } + return err } - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err = iamconn.DeleteLoginProfile(&iam.DeleteLoginProfileInput{ - UserName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. - if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - + err = deleteAwsIamUserLoginProfile(iamconn, d.Id()) if err != nil { - return fmt.Errorf("Error deleting Account Login Profile: %s", err) + return err } } @@ -324,3 +252,118 @@ func validateAwsIamUserName(v interface{}, k string) (ws []string, errors []erro } return } + +func deleteAwsIamUserSSHKeys(svc *iam.IAM, username string) error { + var publicKeys []string + var err error + + listSSHPublicKeys := &iam.ListSSHPublicKeysInput{ + UserName: aws.String(username), + } + pageOfListSSHPublicKeys := func(page *iam.ListSSHPublicKeysOutput, lastPage bool) (shouldContinue bool) { + for _, k := range page.SSHPublicKeys { + publicKeys = append(publicKeys, *k.SSHPublicKeyId) + } + return !lastPage + } + err = svc.ListSSHPublicKeysPages(listSSHPublicKeys, pageOfListSSHPublicKeys) + if err != nil { + return fmt.Errorf("Error removing public SSH keys of user %s: %s", username, err) + } + for _, k := range publicKeys { + _, err := svc.DeleteSSHPublicKey(&iam.DeleteSSHPublicKeyInput{ + UserName: aws.String(username), + SSHPublicKeyId: aws.String(k), + }) + if err != nil { + return fmt.Errorf("Error deleting public SSH key %s: %s", k, err) + } + } + + return nil +} + +func deleteAwsIamUserMFADevices(svc *iam.IAM, username string) error { + var MFADevices []string + var err error + + listMFADevices := &iam.ListMFADevicesInput{ + UserName: aws.String(username), + } + pageOfMFADevices := func(page *iam.ListMFADevicesOutput, lastPage bool) (shouldContinue bool) { + for _, m := range page.MFADevices { + MFADevices = append(MFADevices, *m.SerialNumber) + } + return !lastPage + } + err = svc.ListMFADevicesPages(listMFADevices, pageOfMFADevices) + if err != nil { + return fmt.Errorf("Error removing MFA devices of user %s: %s", username, err) + } + for _, m := range MFADevices { + _, err := svc.DeactivateMFADevice(&iam.DeactivateMFADeviceInput{ + UserName: aws.String(username), + SerialNumber: aws.String(m), + }) + if err != nil { + return fmt.Errorf("Error deactivating MFA device %s: %s", m, err) + } + } + + return nil +} + +func deleteAwsIamUserLoginProfile(svc *iam.IAM, username string) error { + var err error + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err = svc.DeleteLoginProfile(&iam.DeleteLoginProfileInput{ + UserName: aws.String(username), + }) + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. + if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return fmt.Errorf("Error deleting Account Login Profile: %s", err) + } + + return nil +} + +func deleteAwsIamUserAccessKeys(svc *iam.IAM, username string) error { + var accessKeys []string + var err error + listAccessKeys := &iam.ListAccessKeysInput{ + UserName: aws.String(username), + } + pageOfAccessKeys := func(page *iam.ListAccessKeysOutput, lastPage bool) (shouldContinue bool) { + for _, k := range page.AccessKeyMetadata { + accessKeys = append(accessKeys, *k.AccessKeyId) + } + return !lastPage + } + err = svc.ListAccessKeysPages(listAccessKeys, pageOfAccessKeys) + if err != nil { + return fmt.Errorf("Error removing access keys of user %s: %s", username, err) + } + for _, k := range accessKeys { + _, err := svc.DeleteAccessKey(&iam.DeleteAccessKeyInput{ + UserName: aws.String(username), + AccessKeyId: aws.String(k), + }) + if err != nil { + return fmt.Errorf("Error deleting access key %s: %s", k, err) + } + } + + return nil +} From 6e23bd2f095aac03bf0682e1698c36e12d9c6199 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 5 Nov 2018 09:39:51 -0500 Subject: [PATCH 3158/3316] docs/resource/aws_security_group*: Add note and link to AWS documentation about VPC peering restrictions --- website/docs/r/security_group.html.markdown | 2 ++ website/docs/r/security_group_rule.html.markdown | 2 ++ 2 files changed, 4 insertions(+) diff --git a/website/docs/r/security_group.html.markdown b/website/docs/r/security_group.html.markdown index afa560d1940..e8ed59f50df 100644 --- a/website/docs/r/security_group.html.markdown +++ b/website/docs/r/security_group.html.markdown @@ -17,6 +17,8 @@ defined in-line. At this time you cannot use a Security Group with in-line rules in conjunction with any Security Group Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules. +~> **NOTE:** Referencing Security Groups across VPC peering has certain restrictions. More information is available in the [VPC Peering User Guide](https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-security-groups.html). + ## Example Usage Basic usage diff --git a/website/docs/r/security_group_rule.html.markdown b/website/docs/r/security_group_rule.html.markdown index cbea35b84d5..84e92b6cef6 100644 --- a/website/docs/r/security_group_rule.html.markdown +++ b/website/docs/r/security_group_rule.html.markdown @@ -20,6 +20,8 @@ a conflict of rule settings and will overwrite rules. ~> **NOTE:** Setting `protocol = "all"` or `protocol = -1` with `from_port` and `to_port` will result in the EC2 API creating a security group rule with all ports open. This API behavior cannot be controlled by Terraform and may generate warnings in the future. +~> **NOTE:** Referencing Security Groups across VPC peering has certain restrictions. More information is available in the [VPC Peering User Guide](https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-security-groups.html). + ## Example Usage Basic usage From fa5808efd47f15c11666a188d38e0345a8c07025 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 5 Nov 2018 18:50:58 +0400 Subject: [PATCH 3159/3316] create new resource during short_name update --- aws/resource_aws_opsworks_application.go | 1 + 1 file changed, 1 insertion(+) diff --git a/aws/resource_aws_opsworks_application.go b/aws/resource_aws_opsworks_application.go index bfa11fa1b7b..e0ef1a26524 100644 --- a/aws/resource_aws_opsworks_application.go +++ b/aws/resource_aws_opsworks_application.go @@ -30,6 +30,7 @@ func resourceAwsOpsworksApplication() *schema.Resource { Type: schema.TypeString, Computed: true, Optional: true, + ForceNew: true, }, "type": { Type: schema.TypeString, From 3eb13601cedd7c620fe214b83f9077b3f919a7e6 Mon Sep 17 00:00:00 2001 From: Tom Elliff Date: Mon, 5 Nov 2018 15:53:08 +0000 Subject: [PATCH 3160/3316] Add DLM Lifecycle Policy resource Fixes #5176 --- aws/config.go | 3 + aws/provider.go | 1 + aws/resource_aws_dlm_lifecycle_policy.go | 344 ++++++++++++++++++ aws/resource_aws_dlm_lifecycle_policy_test.go | 292 +++++++++++++++ website/docs/r/dlm_lifecycle_policy.markdown | 113 ++++++ 5 files changed, 753 insertions(+) create mode 100644 aws/resource_aws_dlm_lifecycle_policy.go create mode 100644 aws/resource_aws_dlm_lifecycle_policy_test.go create mode 100644 website/docs/r/dlm_lifecycle_policy.markdown diff --git a/aws/config.go b/aws/config.go index 7e7f4e53cb1..d55d25e9619 100644 --- a/aws/config.go +++ b/aws/config.go @@ -44,6 +44,7 @@ import ( "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" + "github.com/aws/aws-sdk-go/service/dlm" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecr" @@ -171,6 +172,7 @@ type AWSClient struct { configconn *configservice.ConfigService daxconn *dax.DAX devicefarmconn *devicefarm.DeviceFarm + dlmconn *dlm.DLM dmsconn *databasemigrationservice.DatabaseMigrationService dsconn *directoryservice.DirectoryService dynamodbconn *dynamodb.DynamoDB @@ -514,6 +516,7 @@ func (c *Config) Client() (interface{}, error) { client.cognitoidpconn = cognitoidentityprovider.New(sess) client.codepipelineconn = codepipeline.New(sess) client.daxconn = dax.New(awsDynamoSess) + client.dlmconn = dlm.New(sess) client.dmsconn = databasemigrationservice.New(sess) client.dsconn = directoryservice.New(sess) client.dynamodbconn = dynamodb.New(awsDynamoSess) diff --git a/aws/provider.go b/aws/provider.go index 36d77a71951..ea06e64ab6c 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -383,6 +383,7 @@ func Provider() terraform.ResourceProvider { "aws_devicefarm_project": resourceAwsDevicefarmProject(), "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), + "aws_dlm_lifecycle_policy": resourceAwsDlmLifecyclePolicy(), "aws_dms_certificate": resourceAwsDmsCertificate(), "aws_dms_endpoint": resourceAwsDmsEndpoint(), "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), diff --git a/aws/resource_aws_dlm_lifecycle_policy.go b/aws/resource_aws_dlm_lifecycle_policy.go new file mode 100644 index 00000000000..d0722dcb920 --- /dev/null +++ b/aws/resource_aws_dlm_lifecycle_policy.go @@ -0,0 +1,344 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/dlm" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDlmLifecyclePolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDlmLifecyclePolicyCreate, + Read: resourceAwsDlmLifecyclePolicyRead, + Update: resourceAwsDlmLifecyclePolicyUpdate, + Delete: resourceAwsDlmLifecyclePolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^[0-9A-Za-z _-]+$"), "see https://docs.aws.amazon.com/cli/latest/reference/dlm/create-lifecycle-policy.html"), + // TODO: https://docs.aws.amazon.com/dlm/latest/APIReference/API_LifecyclePolicy.html#dlm-Type-LifecyclePolicy-Description says it has max length of 500 but doesn't mention the regex but SDK and CLI docs only mention the regex and not max length. Check this + }, + "execution_role_arn": { + // TODO: Make this not required and if it's not provided then use the default service role, creating it if necessary + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "policy_details": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_types": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "schedule": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "create_rule": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "interval": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validateIntegerInSlice([]int{ + 12, + 24, + }), + }, + "interval_unit": { + Type: schema.TypeString, + Optional: true, + Default: dlm.IntervalUnitValuesHours, + ValidateFunc: validation.StringInSlice([]string{ + dlm.IntervalUnitValuesHours, + }, false), + }, + "times": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"), "see https://docs.aws.amazon.com/dlm/latest/APIReference/API_CreateRule.html#dlm-Type-CreateRule-Times"), + }, + }, + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(0, 500), + }, + "retain_rule": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "count": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 1000), + }, + }, + }, + }, + "tags_to_add": { + Type: schema.TypeMap, + Optional: true, + }, + }, + }, + }, + "target_tags": { + Type: schema.TypeMap, + Required: true, + }, + }, + }, + }, + "state": { + Type: schema.TypeString, + Optional: true, + Default: dlm.SettablePolicyStateValuesEnabled, + ValidateFunc: validation.StringInSlice([]string{ + dlm.SettablePolicyStateValuesDisabled, + dlm.SettablePolicyStateValuesEnabled, + }, false), + }, + }, + } +} + +func resourceAwsDlmLifecyclePolicyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + input := dlm.CreateLifecyclePolicyInput{ + Description: aws.String(d.Get("description").(string)), + ExecutionRoleArn: aws.String(d.Get("execution_role_arn").(string)), + PolicyDetails: expandDlmPolicyDetails(d.Get("policy_details").([]interface{})), + State: aws.String(d.Get("state").(string)), + } + + log.Printf("[INFO] Creating DLM lifecycle policy: %s", input) + out, err := conn.CreateLifecyclePolicy(&input) + if err != nil { + return err + } + + d.SetId(*out.PolicyId) + + return resourceAwsDlmLifecyclePolicyRead(d, meta) +} + +func resourceAwsDlmLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + log.Printf("[INFO] Reading DLM lifecycle policy: %s", d.Id()) + out, err := conn.GetLifecyclePolicy(&dlm.GetLifecyclePolicyInput{ + PolicyId: aws.String(d.Id()), + }) + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" && !d.IsNewResource() { + d.SetId("") + return nil + } + return err + } + + d.Set("description", out.Policy.Description) + d.Set("execution_role_arn", out.Policy.ExecutionRoleArn) + d.Set("state", out.Policy.State) + if err := d.Set("policy_details", flattenDlmPolicyDetails(out.Policy.PolicyDetails)); err != nil { + return fmt.Errorf("error setting policy details %s", err) + } + + return nil +} + +func resourceAwsDlmLifecyclePolicyUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + input := dlm.UpdateLifecyclePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + if d.HasChange("description") { + input.Description = aws.String(d.Get("description").(string)) + } + if d.HasChange("execution_role_arn") { + input.ExecutionRoleArn = aws.String(d.Get("execution_role_arn").(string)) + } + if d.HasChange("state") { + input.State = aws.String(d.Get("state").(string)) + } + if d.HasChange("policy_details") { + input.PolicyDetails = expandDlmPolicyDetails(d.Get("policy_details").([]interface{})) + } + + log.Printf("[INFO] Updating lifecycle policy %s", d.Id()) + _, err := conn.UpdateLifecyclePolicy(&input) + if err != nil { + return err + } + + return resourceAwsDlmLifecyclePolicyRead(d, meta) +} + +func resourceAwsDlmLifecyclePolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + log.Printf("[INFO] Deleting DLM lifecycle policy: %s", d.Id()) + _, err := conn.DeleteLifecyclePolicy(&dlm.DeleteLifecyclePolicyInput{ + PolicyId: aws.String(d.Id()), + }) + if err != nil { + return err + } + + return nil +} + +func expandDlmPolicyDetails(cfg []interface{}) *dlm.PolicyDetails { + policyDetails := &dlm.PolicyDetails{} + m := cfg[0].(map[string]interface{}) + if v, ok := m["resource_types"]; ok { + policyDetails.ResourceTypes = expandStringList(v.([]interface{})) + } + if v, ok := m["schedule"]; ok { + policyDetails.Schedules = expandDlmSchedules(v.([]interface{})) + } + if v, ok := m["target_tags"]; ok { + policyDetails.TargetTags = expandDlmTags(v.(map[string]interface{})) + } + + return policyDetails +} + +func flattenDlmPolicyDetails(policyDetails *dlm.PolicyDetails) []map[string]interface{} { + result := make(map[string]interface{}, 0) + result["resource_types"] = flattenStringList(policyDetails.ResourceTypes) + result["schedule"] = flattenDlmSchedules(policyDetails.Schedules) + result["target_tags"] = flattenDlmTags(policyDetails.TargetTags) + + return []map[string]interface{}{result} +} + +func expandDlmSchedules(cfg []interface{}) []*dlm.Schedule { + schedules := make([]*dlm.Schedule, len(cfg)) + for i, c := range cfg { + schedule := &dlm.Schedule{} + m := c.(map[string]interface{}) + if v, ok := m["create_rule"]; ok { + schedule.CreateRule = expandDlmCreateRule(v.([]interface{})) + } + if v, ok := m["name"]; ok { + schedule.Name = aws.String(v.(string)) + } + if v, ok := m["retain_rule"]; ok { + schedule.RetainRule = expandDlmRetainRule(v.([]interface{})) + } + if v, ok := m["tags_to_add"]; ok { + schedule.TagsToAdd = expandDlmTags(v.(map[string]interface{})) + } + schedules[i] = schedule + } + + return schedules +} + +func flattenDlmSchedules(schedules []*dlm.Schedule) []map[string]interface{} { + result := make([]map[string]interface{}, len(schedules)) + for i, s := range schedules { + m := make(map[string]interface{}) + m["create_rule"] = flattenDlmCreateRule(s.CreateRule) + m["name"] = aws.StringValue(s.Name) + m["retain_rule"] = flattenDlmRetainRule(s.RetainRule) + m["tags_to_add"] = flattenDlmTags(s.TagsToAdd) + result[i] = m + } + + return result +} + +func expandDlmCreateRule(cfg []interface{}) *dlm.CreateRule { + c := cfg[0].(map[string]interface{}) + createRule := &dlm.CreateRule{ + Interval: aws.Int64(int64(c["interval"].(int))), + IntervalUnit: aws.String(c["interval_unit"].(string)), + } + if v, ok := c["times"]; ok { + createRule.Times = expandStringList(v.([]interface{})) + } + + return createRule +} + +func flattenDlmCreateRule(createRule *dlm.CreateRule) []map[string]interface{} { + if createRule == nil { + return []map[string]interface{}{} + } + + result := make(map[string]interface{}) + result["interval"] = aws.Int64Value(createRule.Interval) + result["interval_unit"] = aws.StringValue(createRule.IntervalUnit) + result["times"] = flattenStringList(createRule.Times) + + return []map[string]interface{}{result} +} + +func expandDlmRetainRule(cfg []interface{}) *dlm.RetainRule { + return &dlm.RetainRule{ + Count: aws.Int64(int64(cfg[0].(map[string]interface{})["count"].(int))), + } +} + +func flattenDlmRetainRule(retainRule *dlm.RetainRule) []map[string]interface{} { + result := make(map[string]interface{}) + result["count"] = aws.Int64Value(retainRule.Count) + + return []map[string]interface{}{result} +} + +func expandDlmTags(m map[string]interface{}) []*dlm.Tag { + var result []*dlm.Tag + for k, v := range m { + result = append(result, &dlm.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + }) + } + + return result +} + +func flattenDlmTags(tags []*dlm.Tag) map[string]string { + result := make(map[string]string) + for _, t := range tags { + result[*t.Key] = *t.Value + } + + return result +} diff --git a/aws/resource_aws_dlm_lifecycle_policy_test.go b/aws/resource_aws_dlm_lifecycle_policy_test.go new file mode 100644 index 00000000000..1693cfb6321 --- /dev/null +++ b/aws/resource_aws_dlm_lifecycle_policy_test.go @@ -0,0 +1,292 @@ +package aws + +import ( + "fmt" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/dlm" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccAWSDlmLifecyclePolicyBasic(t *testing.T) { + resourceName := "aws_dlm_lifecycle_policy.basic" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dlmLifecyclePolicyDestroy, + Steps: []resource.TestStep{ + { + Config: dlmLifecyclePolicyBasicConfig(), + Check: resource.ComposeTestCheckFunc( + checkDlmLifecyclePolicyExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "tf-acc-basic"), + resource.TestCheckResourceAttrSet(resourceName, "execution_role_arn"), + resource.TestCheckResourceAttr(resourceName, "state", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.resource_types.0", "VOLUME"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.name", "tf-acc-basic"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.interval", "12"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.interval_unit", "HOURS"), + resource.TestCheckResourceAttrSet(resourceName, "policy_details.0.schedule.0.create_rule.0.times.0"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.retain_rule.0.count", "10"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.target_tags.tf-acc-test", "basic"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAWSDlmLifecyclePolicyFull(t *testing.T) { + resourceName := "aws_dlm_lifecycle_policy.full" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: dlmLifecyclePolicyDestroy, + Steps: []resource.TestStep{ + { + Config: dlmLifecyclePolicyFullConfig(), + Check: resource.ComposeTestCheckFunc( + checkDlmLifecyclePolicyExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "tf-acc-full"), + resource.TestCheckResourceAttrSet(resourceName, "execution_role_arn"), + resource.TestCheckResourceAttr(resourceName, "state", "ENABLED"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.resource_types.0", "VOLUME"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.name", "tf-acc-full"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.interval", "12"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.interval_unit", "HOURS"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.times.0", "21:42"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.retain_rule.0.count", "10"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.tags_to_add.tf-acc-test-added", "full"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.target_tags.tf-acc-test", "full"), + ), + }, + { + Config: dlmLifecyclePolicyFullUpdateConfig(), + Check: resource.ComposeTestCheckFunc( + checkDlmLifecyclePolicyExists(resourceName), + resource.TestCheckResourceAttr(resourceName, "description", "tf-acc-full-updated"), + resource.TestCheckResourceAttrSet(resourceName, "execution_role_arn"), + resource.TestCheckResourceAttr(resourceName, "state", "DISABLED"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.resource_types.0", "VOLUME"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.name", "tf-acc-full-updated"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.interval", "24"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.interval_unit", "HOURS"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.times.0", "09:42"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.retain_rule.0.count", "100"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.tags_to_add.tf-acc-test-added", "full-updated"), + resource.TestCheckResourceAttr(resourceName, "policy_details.0.target_tags.tf-acc-test", "full-updated"), + ), + }, + }, + }) +} + +func dlmLifecyclePolicyDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).dlmconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_dlm_lifecycle_policy" { + continue + } + + input := dlm.GetLifecyclePolicyInput{ + PolicyId: aws.String(rs.Primary.Attributes["name"]), + } + + out, err := conn.GetLifecyclePolicy(&input) + + if err != nil { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { + return nil + } + return err + } + + if out.Policy != nil { + return fmt.Errorf("DLM lifecycle policy still exists: %#v", out) + } + } + + return nil +} + +func checkDlmLifecyclePolicyExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + _, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + return nil + } +} + +func dlmLifecyclePolicyBasicConfig() string { + return fmt.Sprint(` +resource "aws_iam_role" "dlm_lifecycle_role" { + name = "tf-acc-basic-dlm-lifecycle-role" + + assume_role_policy = < Note: You cannot have overlapping lifecycle policies that share the same `target_tags`. Terraform is unable to detect this at plan time but it will fail during apply. + +#### Schedule arguments + +* `create_rule` - (Required) See the [`create_rule`](#create-rule-arguments) block. Max of 1 per schedule. +* `name` - (Required) A name for the schedule. +* `retain_rule` - (Required) See the [`create_rule`](#create-rule-arguments) block. Max of 1 per schedule. +* `tags_to_add` - (Optional) A mapping of tag keys and their values. DLM lifecycle policies will already tag the snapshot with the tags on the volume. This configuration adds extra tags on top of these. + +#### Create Rule arguments + +* `interval` - (Required) How often this lifecycle policy should be evaluated. `12` or `24` are valid values. +* `interval_unit` - (Optional) The unit for how often the lifecycle policy should be evaluated. `HOURS` is currently the only allowed value and also the default value. +* `times` - (Optional) A list of times in 24 hour clock format that sets when the lifecycle policy should be evaluated. Max of 1. + +#### Retain Rule arguments + +* `count` - (Required) How many snapshots to keep. Must be an integer between 1 and 1000. + +## Attributes Reference + +All of the arguments above are exported as attributes. + +## Import + +DLM lifecyle policies can be imported by their policy ID: + +``` +$ terraform import aws_dlm_lifecycle_policy.example policy-abcdef12345678901 +``` \ No newline at end of file From 6fe22509e5f25c01320427c78ef27d89cd01db01 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 5 Nov 2018 11:32:17 -0500 Subject: [PATCH 3161/3316] tests/resource/aws_iam_user: Add coverage for force_destroy with Access Keys and Login Profiles ``` --- PASS: TestAccAWSUser_disappears (7.15s) --- PASS: TestAccAWSUser_ForceDestroy_SSHKey (9.38s) --- PASS: TestAccAWSUser_importBasic (9.49s) --- PASS: TestAccAWSUser_ForceDestroy_AccessKey (9.55s) --- PASS: TestAccAWSUser_ForceDestroy_LoginProfile (9.78s) --- PASS: TestAccAWSUser_pathChange (13.74s) --- PASS: TestAccAWSUser_nameChange (13.80s) --- PASS: TestAccAWSUser_basic (13.94s) --- PASS: TestAccAWSUser_permissionsBoundary (31.21s) ``` --- aws/resource_aws_iam_user_test.go | 195 +++++++++++++++++++++++++----- 1 file changed, 163 insertions(+), 32 deletions(-) diff --git a/aws/resource_aws_iam_user_test.go b/aws/resource_aws_iam_user_test.go index c49c9ebe074..1fa4a8d38f3 100644 --- a/aws/resource_aws_iam_user_test.go +++ b/aws/resource_aws_iam_user_test.go @@ -129,6 +129,95 @@ func TestAccAWSUser_disappears(t *testing.T) { }) } +func TestAccAWSUser_ForceDestroy_AccessKey(t *testing.T) { + var user iam.GetUserOutput + + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_user.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSUserConfigForceDestroy(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + testAccCheckAWSUserCreatesAccessKey(&user), + ), + }, + }, + }) +} + +func TestAccAWSUser_ForceDestroy_LoginProfile(t *testing.T) { + var user iam.GetUserOutput + + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_user.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSUserConfigForceDestroy(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + testAccCheckAWSUserCreatesLoginProfile(&user), + ), + }, + }, + }) +} + +func TestAccAWSUser_ForceDestroy_MFADevice(t *testing.T) { + t.Skip("Virtual MFA device creation is not currently implemented") + var user iam.GetUserOutput + + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_user.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSUserConfigForceDestroy(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + testAccCheckAWSUserCreatesMFADevice(&user), + ), + }, + }, + }) +} + +func TestAccAWSUser_ForceDestroy_SSHKey(t *testing.T) { + var user iam.GetUserOutput + + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_iam_user.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSUserDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSUserConfigForceDestroy(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAWSUserExists(resourceName, &user), + testAccCheckAWSUserUploadsSSHKey(&user), + ), + }, + }, + }) +} + func TestAccAWSUser_nameChange(t *testing.T) { var conf iam.GetUserOutput @@ -353,44 +442,68 @@ func testAccCheckAWSUserPermissionsBoundary(getUserOutput *iam.GetUserOutput, ex } } -func testAccAWSUserConfig(rName, path string) string { - return fmt.Sprintf(` -resource "aws_iam_user" "user" { - name = %q - path = %q -} -`, rName, path) -} +func testAccCheckAWSUserCreatesAccessKey(getUserOutput *iam.GetUserOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + iamconn := testAccProvider.Meta().(*AWSClient).iamconn -func testAccAWSUserConfig_permissionsBoundary(rName, permissionsBoundary string) string { - return fmt.Sprintf(` -resource "aws_iam_user" "user" { - name = %q - permissions_boundary = %q + input := &iam.CreateAccessKeyInput{ + UserName: getUserOutput.User.UserName, + } + + if _, err := iamconn.CreateAccessKey(input); err != nil { + return fmt.Errorf("error creating IAM User (%s) Access Key: %s", aws.StringValue(getUserOutput.User.UserName), err) + } + + return nil + } } -`, rName, permissionsBoundary) + +func testAccCheckAWSUserCreatesLoginProfile(getUserOutput *iam.GetUserOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + iamconn := testAccProvider.Meta().(*AWSClient).iamconn + + input := &iam.CreateLoginProfileInput{ + Password: aws.String(generateIAMPassword(32)), + UserName: getUserOutput.User.UserName, + } + + if _, err := iamconn.CreateLoginProfile(input); err != nil { + return fmt.Errorf("error creating IAM User (%s) Login Profile: %s", aws.StringValue(getUserOutput.User.UserName), err) + } + + return nil + } } -func TestAccAWSUser_ForceDestroy_SSHKey(t *testing.T) { - var user iam.GetUserOutput +func testAccCheckAWSUserCreatesMFADevice(getUserOutput *iam.GetUserOutput) resource.TestCheckFunc { + return func(s *terraform.State) error { + iamconn := testAccProvider.Meta().(*AWSClient).iamconn - rName := acctest.RandomWithPrefix("tf-acc-test") - resourceName := "aws_iam_user.test" + createVirtualMFADeviceInput := &iam.CreateVirtualMFADeviceInput{ + Path: getUserOutput.User.Path, + VirtualMFADeviceName: getUserOutput.User.UserName, + } - resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSUserDestroy, - Steps: []resource.TestStep{ - { - Config: testAccAWSUserConfigForceDestroy(rName), - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSUserExists(resourceName, &user), - testAccCheckAWSUserUploadsSSHKey(&user), - ), - }, - }, - }) + createVirtualMFADeviceOutput, err := iamconn.CreateVirtualMFADevice(createVirtualMFADeviceInput) + if err != nil { + return fmt.Errorf("error creating IAM User (%s) Virtual MFA Device: %s", aws.StringValue(getUserOutput.User.UserName), err) + } + + // To properly setup this acceptance test, we need to vendor an OTP library. + // InvalidAuthenticationCode: Authentication code for device is not valid. + enableVirtualMFADeviceInput := &iam.EnableMFADeviceInput{ + AuthenticationCode1: aws.String("123456"), + AuthenticationCode2: aws.String("654321"), + SerialNumber: createVirtualMFADeviceOutput.VirtualMFADevice.SerialNumber, + UserName: getUserOutput.User.UserName, + } + + if _, err := iamconn.EnableMFADevice(enableVirtualMFADeviceInput); err != nil { + return fmt.Errorf("error enabling IAM User (%s) Virtual MFA Device: %s", aws.StringValue(getUserOutput.User.UserName), err) + } + + return nil + } } func testAccCheckAWSUserUploadsSSHKey(getUserOutput *iam.GetUserOutput) resource.TestCheckFunc { @@ -418,6 +531,24 @@ func testAccCheckAWSUserUploadsSSHKey(getUserOutput *iam.GetUserOutput) resource } } +func testAccAWSUserConfig(rName, path string) string { + return fmt.Sprintf(` +resource "aws_iam_user" "user" { + name = %q + path = %q +} +`, rName, path) +} + +func testAccAWSUserConfig_permissionsBoundary(rName, permissionsBoundary string) string { + return fmt.Sprintf(` +resource "aws_iam_user" "user" { + name = %q + permissions_boundary = %q +} +`, rName, permissionsBoundary) +} + func testAccAWSUserConfigForceDestroy(rName string) string { return fmt.Sprintf(` resource "aws_iam_user" "test" { From 4148c39b055ecc393229b8ee3b2f350aa2b371fb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 5 Nov 2018 11:39:02 -0500 Subject: [PATCH 3162/3316] Update CHANGELOG for #6337 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08ee59c898d..318c32ed77a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_ecs_service: Continue supporting replica `deployment_minimum_healthy_percent = 0` and `deployment_maximum_percent = 100` [GH-6316] +* resource/aws_iam_user: Delete SSH keys with `force_delete` [GH-6337] * resource/aws_lb_listener: Prevent panics with actions deleted outside Terraform [GH-6319] * resource/aws_lb_listener_rule: Prevent panics with actions deleted outside Terraform [GH-6319] From 20d3dcdaa3b139d9f8f4249722d19c7a5d40fc4b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 5 Nov 2018 12:24:33 -0500 Subject: [PATCH 3163/3316] tests/resource/aws_iam_user: Enable TestAccAWSUser_ForceDestroy_MFADevice Changes: * `govendor fetch github.com/pquerna/otp/totp` * Implement MFA device code generation for acceptance testing ``` --- PASS: TestAccAWSUser_ForceDestroy_MFADevice (9.16s) ``` --- aws/resource_aws_iam_user_test.go | 19 +- vendor/github.com/boombuler/barcode/LICENSE | 21 + vendor/github.com/boombuler/barcode/README.md | 53 +++ .../github.com/boombuler/barcode/barcode.go | 42 ++ vendor/github.com/boombuler/barcode/go.mod | 1 + .../boombuler/barcode/qr/alphanumeric.go | 66 +++ .../boombuler/barcode/qr/automatic.go | 23 + .../github.com/boombuler/barcode/qr/blocks.go | 59 +++ .../boombuler/barcode/qr/encoder.go | 416 ++++++++++++++++++ .../boombuler/barcode/qr/errorcorrection.go | 29 ++ .../boombuler/barcode/qr/numeric.go | 56 +++ .../github.com/boombuler/barcode/qr/qrcode.go | 166 +++++++ .../boombuler/barcode/qr/unicode.go | 27 ++ .../boombuler/barcode/qr/versioninfo.go | 310 +++++++++++++ .../boombuler/barcode/scaledbarcode.go | 134 ++++++ .../boombuler/barcode/utils/base1dcode.go | 57 +++ .../boombuler/barcode/utils/bitlist.go | 119 +++++ .../boombuler/barcode/utils/galoisfield.go | 65 +++ .../boombuler/barcode/utils/gfpoly.go | 103 +++++ .../boombuler/barcode/utils/reedsolomon.go | 44 ++ .../boombuler/barcode/utils/runeint.go | 19 + vendor/github.com/pquerna/otp/LICENSE | 202 +++++++++ vendor/github.com/pquerna/otp/NOTICE | 5 + vendor/github.com/pquerna/otp/README.md | 60 +++ vendor/github.com/pquerna/otp/doc.go | 70 +++ vendor/github.com/pquerna/otp/hotp/hotp.go | 196 +++++++++ vendor/github.com/pquerna/otp/otp.go | 207 +++++++++ vendor/github.com/pquerna/otp/totp/totp.go | 193 ++++++++ vendor/vendor.json | 36 ++ 29 files changed, 2793 insertions(+), 5 deletions(-) create mode 100644 vendor/github.com/boombuler/barcode/LICENSE create mode 100644 vendor/github.com/boombuler/barcode/README.md create mode 100644 vendor/github.com/boombuler/barcode/barcode.go create mode 100644 vendor/github.com/boombuler/barcode/go.mod create mode 100644 vendor/github.com/boombuler/barcode/qr/alphanumeric.go create mode 100644 vendor/github.com/boombuler/barcode/qr/automatic.go create mode 100644 vendor/github.com/boombuler/barcode/qr/blocks.go create mode 100644 vendor/github.com/boombuler/barcode/qr/encoder.go create mode 100644 vendor/github.com/boombuler/barcode/qr/errorcorrection.go create mode 100644 vendor/github.com/boombuler/barcode/qr/numeric.go create mode 100644 vendor/github.com/boombuler/barcode/qr/qrcode.go create mode 100644 vendor/github.com/boombuler/barcode/qr/unicode.go create mode 100644 vendor/github.com/boombuler/barcode/qr/versioninfo.go create mode 100644 vendor/github.com/boombuler/barcode/scaledbarcode.go create mode 100644 vendor/github.com/boombuler/barcode/utils/base1dcode.go create mode 100644 vendor/github.com/boombuler/barcode/utils/bitlist.go create mode 100644 vendor/github.com/boombuler/barcode/utils/galoisfield.go create mode 100644 vendor/github.com/boombuler/barcode/utils/gfpoly.go create mode 100644 vendor/github.com/boombuler/barcode/utils/reedsolomon.go create mode 100644 vendor/github.com/boombuler/barcode/utils/runeint.go create mode 100644 vendor/github.com/pquerna/otp/LICENSE create mode 100644 vendor/github.com/pquerna/otp/NOTICE create mode 100644 vendor/github.com/pquerna/otp/README.md create mode 100644 vendor/github.com/pquerna/otp/doc.go create mode 100644 vendor/github.com/pquerna/otp/hotp/hotp.go create mode 100644 vendor/github.com/pquerna/otp/otp.go create mode 100644 vendor/github.com/pquerna/otp/totp/totp.go diff --git a/aws/resource_aws_iam_user_test.go b/aws/resource_aws_iam_user_test.go index 1fa4a8d38f3..7ff2d308a96 100644 --- a/aws/resource_aws_iam_user_test.go +++ b/aws/resource_aws_iam_user_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "testing" + "time" "io/ioutil" @@ -11,6 +12,7 @@ import ( "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" + "github.com/pquerna/otp/totp" ) func TestValidateIamUserName(t *testing.T) { @@ -174,7 +176,6 @@ func TestAccAWSUser_ForceDestroy_LoginProfile(t *testing.T) { } func TestAccAWSUser_ForceDestroy_MFADevice(t *testing.T) { - t.Skip("Virtual MFA device creation is not currently implemented") var user iam.GetUserOutput rName := acctest.RandomWithPrefix("tf-acc-test") @@ -489,11 +490,19 @@ func testAccCheckAWSUserCreatesMFADevice(getUserOutput *iam.GetUserOutput) resou return fmt.Errorf("error creating IAM User (%s) Virtual MFA Device: %s", aws.StringValue(getUserOutput.User.UserName), err) } - // To properly setup this acceptance test, we need to vendor an OTP library. - // InvalidAuthenticationCode: Authentication code for device is not valid. + secret := string(createVirtualMFADeviceOutput.VirtualMFADevice.Base32StringSeed) + authenticationCode1, err := totp.GenerateCode(secret, time.Now().Add(time.Duration(-30*time.Second))) + if err != nil { + return fmt.Errorf("error generating Virtual MFA Device authentication code 1: %s", err) + } + authenticationCode2, err := totp.GenerateCode(secret, time.Now()) + if err != nil { + return fmt.Errorf("error generating Virtual MFA Device authentication code 2: %s", err) + } + enableVirtualMFADeviceInput := &iam.EnableMFADeviceInput{ - AuthenticationCode1: aws.String("123456"), - AuthenticationCode2: aws.String("654321"), + AuthenticationCode1: aws.String(authenticationCode1), + AuthenticationCode2: aws.String(authenticationCode2), SerialNumber: createVirtualMFADeviceOutput.VirtualMFADevice.SerialNumber, UserName: getUserOutput.User.UserName, } diff --git a/vendor/github.com/boombuler/barcode/LICENSE b/vendor/github.com/boombuler/barcode/LICENSE new file mode 100644 index 00000000000..862b0ddcd7f --- /dev/null +++ b/vendor/github.com/boombuler/barcode/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Florian Sundermann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/boombuler/barcode/README.md b/vendor/github.com/boombuler/barcode/README.md new file mode 100644 index 00000000000..2a988db3999 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/README.md @@ -0,0 +1,53 @@ +[![Join the chat at https://gitter.im/golang-barcode/Lobby](https://badges.gitter.im/golang-barcode/Lobby.svg)](https://gitter.im/golang-barcode/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +## Introduction ## + +This is a package for GO which can be used to create different types of barcodes. + +## Supported Barcode Types ## +* 2 of 5 +* Aztec Code +* Codabar +* Code 128 +* Code 39 +* Code 93 +* Datamatrix +* EAN 13 +* EAN 8 +* PDF 417 +* QR Code + +## Example ## + +This is a simple example on how to create a QR-Code and write it to a png-file +```go +package main + +import ( + "image/png" + "os" + + "github.com/boombuler/barcode" + "github.com/boombuler/barcode/qr" +) + +func main() { + // Create the barcode + qrCode, _ := qr.Encode("Hello World", qr.M, qr.Auto) + + // Scale the barcode to 200x200 pixels + qrCode, _ = barcode.Scale(qrCode, 200, 200) + + // create the output file + file, _ := os.Create("qrcode.png") + defer file.Close() + + // encode the barcode as png + png.Encode(file, qrCode) +} +``` + +## Documentation ## +See [GoDoc](https://godoc.org/github.com/boombuler/barcode) + +To create a barcode use the Encode function from one of the subpackages. diff --git a/vendor/github.com/boombuler/barcode/barcode.go b/vendor/github.com/boombuler/barcode/barcode.go new file mode 100644 index 00000000000..25f4a693db0 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/barcode.go @@ -0,0 +1,42 @@ +package barcode + +import "image" + +const ( + TypeAztec = "Aztec" + TypeCodabar = "Codabar" + TypeCode128 = "Code 128" + TypeCode39 = "Code 39" + TypeCode93 = "Code 93" + TypeDataMatrix = "DataMatrix" + TypeEAN8 = "EAN 8" + TypeEAN13 = "EAN 13" + TypePDF = "PDF417" + TypeQR = "QR Code" + Type2of5 = "2 of 5" + Type2of5Interleaved = "2 of 5 (interleaved)" +) + +// Contains some meta information about a barcode +type Metadata struct { + // the name of the barcode kind + CodeKind string + // contains 1 for 1D barcodes or 2 for 2D barcodes + Dimensions byte +} + +// a rendered and encoded barcode +type Barcode interface { + image.Image + // returns some meta information about the barcode + Metadata() Metadata + // the data that was encoded in this barcode + Content() string +} + +// Additional interface that some barcodes might implement to provide +// the value of its checksum. +type BarcodeIntCS interface { + Barcode + CheckSum() int +} diff --git a/vendor/github.com/boombuler/barcode/go.mod b/vendor/github.com/boombuler/barcode/go.mod new file mode 100644 index 00000000000..ed53593b928 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/go.mod @@ -0,0 +1 @@ +module github.com/boombuler/barcode diff --git a/vendor/github.com/boombuler/barcode/qr/alphanumeric.go b/vendor/github.com/boombuler/barcode/qr/alphanumeric.go new file mode 100644 index 00000000000..4ded7c8e030 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/alphanumeric.go @@ -0,0 +1,66 @@ +package qr + +import ( + "errors" + "fmt" + "strings" + + "github.com/boombuler/barcode/utils" +) + +const charSet string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:" + +func stringToAlphaIdx(content string) <-chan int { + result := make(chan int) + go func() { + for _, r := range content { + idx := strings.IndexRune(charSet, r) + result <- idx + if idx < 0 { + break + } + } + close(result) + }() + + return result +} + +func encodeAlphaNumeric(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { + + contentLenIsOdd := len(content)%2 == 1 + contentBitCount := (len(content) / 2) * 11 + if contentLenIsOdd { + contentBitCount += 6 + } + vi := findSmallestVersionInfo(ecl, alphaNumericMode, contentBitCount) + if vi == nil { + return nil, nil, errors.New("To much data to encode") + } + + res := new(utils.BitList) + res.AddBits(int(alphaNumericMode), 4) + res.AddBits(len(content), vi.charCountBits(alphaNumericMode)) + + encoder := stringToAlphaIdx(content) + + for idx := 0; idx < len(content)/2; idx++ { + c1 := <-encoder + c2 := <-encoder + if c1 < 0 || c2 < 0 { + return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, AlphaNumeric) + } + res.AddBits(c1*45+c2, 11) + } + if contentLenIsOdd { + c := <-encoder + if c < 0 { + return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, AlphaNumeric) + } + res.AddBits(c, 6) + } + + addPaddingAndTerminator(res, vi) + + return res, vi, nil +} diff --git a/vendor/github.com/boombuler/barcode/qr/automatic.go b/vendor/github.com/boombuler/barcode/qr/automatic.go new file mode 100644 index 00000000000..e7c56013f16 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/automatic.go @@ -0,0 +1,23 @@ +package qr + +import ( + "fmt" + + "github.com/boombuler/barcode/utils" +) + +func encodeAuto(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { + bits, vi, _ := Numeric.getEncoder()(content, ecl) + if bits != nil && vi != nil { + return bits, vi, nil + } + bits, vi, _ = AlphaNumeric.getEncoder()(content, ecl) + if bits != nil && vi != nil { + return bits, vi, nil + } + bits, vi, _ = Unicode.getEncoder()(content, ecl) + if bits != nil && vi != nil { + return bits, vi, nil + } + return nil, nil, fmt.Errorf("No encoding found to encode \"%s\"", content) +} diff --git a/vendor/github.com/boombuler/barcode/qr/blocks.go b/vendor/github.com/boombuler/barcode/qr/blocks.go new file mode 100644 index 00000000000..d3173787f60 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/blocks.go @@ -0,0 +1,59 @@ +package qr + +type block struct { + data []byte + ecc []byte +} +type blockList []*block + +func splitToBlocks(data <-chan byte, vi *versionInfo) blockList { + result := make(blockList, vi.NumberOfBlocksInGroup1+vi.NumberOfBlocksInGroup2) + + for b := 0; b < int(vi.NumberOfBlocksInGroup1); b++ { + blk := new(block) + blk.data = make([]byte, vi.DataCodeWordsPerBlockInGroup1) + for cw := 0; cw < int(vi.DataCodeWordsPerBlockInGroup1); cw++ { + blk.data[cw] = <-data + } + blk.ecc = ec.calcECC(blk.data, vi.ErrorCorrectionCodewordsPerBlock) + result[b] = blk + } + + for b := 0; b < int(vi.NumberOfBlocksInGroup2); b++ { + blk := new(block) + blk.data = make([]byte, vi.DataCodeWordsPerBlockInGroup2) + for cw := 0; cw < int(vi.DataCodeWordsPerBlockInGroup2); cw++ { + blk.data[cw] = <-data + } + blk.ecc = ec.calcECC(blk.data, vi.ErrorCorrectionCodewordsPerBlock) + result[int(vi.NumberOfBlocksInGroup1)+b] = blk + } + + return result +} + +func (bl blockList) interleave(vi *versionInfo) []byte { + var maxCodewordCount int + if vi.DataCodeWordsPerBlockInGroup1 > vi.DataCodeWordsPerBlockInGroup2 { + maxCodewordCount = int(vi.DataCodeWordsPerBlockInGroup1) + } else { + maxCodewordCount = int(vi.DataCodeWordsPerBlockInGroup2) + } + resultLen := (vi.DataCodeWordsPerBlockInGroup1+vi.ErrorCorrectionCodewordsPerBlock)*vi.NumberOfBlocksInGroup1 + + (vi.DataCodeWordsPerBlockInGroup2+vi.ErrorCorrectionCodewordsPerBlock)*vi.NumberOfBlocksInGroup2 + + result := make([]byte, 0, resultLen) + for i := 0; i < maxCodewordCount; i++ { + for b := 0; b < len(bl); b++ { + if len(bl[b].data) > i { + result = append(result, bl[b].data[i]) + } + } + } + for i := 0; i < int(vi.ErrorCorrectionCodewordsPerBlock); i++ { + for b := 0; b < len(bl); b++ { + result = append(result, bl[b].ecc[i]) + } + } + return result +} diff --git a/vendor/github.com/boombuler/barcode/qr/encoder.go b/vendor/github.com/boombuler/barcode/qr/encoder.go new file mode 100644 index 00000000000..2c6ab2111ad --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/encoder.go @@ -0,0 +1,416 @@ +// Package qr can be used to create QR barcodes. +package qr + +import ( + "image" + + "github.com/boombuler/barcode" + "github.com/boombuler/barcode/utils" +) + +type encodeFn func(content string, eccLevel ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) + +// Encoding mode for QR Codes. +type Encoding byte + +const ( + // Auto will choose ths best matching encoding + Auto Encoding = iota + // Numeric encoding only encodes numbers [0-9] + Numeric + // AlphaNumeric encoding only encodes uppercase letters, numbers and [Space], $, %, *, +, -, ., /, : + AlphaNumeric + // Unicode encoding encodes the string as utf-8 + Unicode + // only for testing purpose + unknownEncoding +) + +func (e Encoding) getEncoder() encodeFn { + switch e { + case Auto: + return encodeAuto + case Numeric: + return encodeNumeric + case AlphaNumeric: + return encodeAlphaNumeric + case Unicode: + return encodeUnicode + } + return nil +} + +func (e Encoding) String() string { + switch e { + case Auto: + return "Auto" + case Numeric: + return "Numeric" + case AlphaNumeric: + return "AlphaNumeric" + case Unicode: + return "Unicode" + } + return "" +} + +// Encode returns a QR barcode with the given content, error correction level and uses the given encoding +func Encode(content string, level ErrorCorrectionLevel, mode Encoding) (barcode.Barcode, error) { + bits, vi, err := mode.getEncoder()(content, level) + if err != nil { + return nil, err + } + + blocks := splitToBlocks(bits.IterateBytes(), vi) + data := blocks.interleave(vi) + result := render(data, vi) + result.content = content + return result, nil +} + +func render(data []byte, vi *versionInfo) *qrcode { + dim := vi.modulWidth() + results := make([]*qrcode, 8) + for i := 0; i < 8; i++ { + results[i] = newBarcode(dim) + } + + occupied := newBarcode(dim) + + setAll := func(x int, y int, val bool) { + occupied.Set(x, y, true) + for i := 0; i < 8; i++ { + results[i].Set(x, y, val) + } + } + + drawFinderPatterns(vi, setAll) + drawAlignmentPatterns(occupied, vi, setAll) + + //Timing Pattern: + var i int + for i = 0; i < dim; i++ { + if !occupied.Get(i, 6) { + setAll(i, 6, i%2 == 0) + } + if !occupied.Get(6, i) { + setAll(6, i, i%2 == 0) + } + } + // Dark Module + setAll(8, dim-8, true) + + drawVersionInfo(vi, setAll) + drawFormatInfo(vi, -1, occupied.Set) + for i := 0; i < 8; i++ { + drawFormatInfo(vi, i, results[i].Set) + } + + // Write the data + var curBitNo int + + for pos := range iterateModules(occupied) { + var curBit bool + if curBitNo < len(data)*8 { + curBit = ((data[curBitNo/8] >> uint(7-(curBitNo%8))) & 1) == 1 + } else { + curBit = false + } + + for i := 0; i < 8; i++ { + setMasked(pos.X, pos.Y, curBit, i, results[i].Set) + } + curBitNo++ + } + + lowestPenalty := ^uint(0) + lowestPenaltyIdx := -1 + for i := 0; i < 8; i++ { + p := results[i].calcPenalty() + if p < lowestPenalty { + lowestPenalty = p + lowestPenaltyIdx = i + } + } + return results[lowestPenaltyIdx] +} + +func setMasked(x, y int, val bool, mask int, set func(int, int, bool)) { + switch mask { + case 0: + val = val != (((y + x) % 2) == 0) + break + case 1: + val = val != ((y % 2) == 0) + break + case 2: + val = val != ((x % 3) == 0) + break + case 3: + val = val != (((y + x) % 3) == 0) + break + case 4: + val = val != (((y/2 + x/3) % 2) == 0) + break + case 5: + val = val != (((y*x)%2)+((y*x)%3) == 0) + break + case 6: + val = val != ((((y*x)%2)+((y*x)%3))%2 == 0) + break + case 7: + val = val != ((((y+x)%2)+((y*x)%3))%2 == 0) + } + set(x, y, val) +} + +func iterateModules(occupied *qrcode) <-chan image.Point { + result := make(chan image.Point) + allPoints := make(chan image.Point) + go func() { + curX := occupied.dimension - 1 + curY := occupied.dimension - 1 + isUpward := true + + for true { + if isUpward { + allPoints <- image.Pt(curX, curY) + allPoints <- image.Pt(curX-1, curY) + curY-- + if curY < 0 { + curY = 0 + curX -= 2 + if curX == 6 { + curX-- + } + if curX < 0 { + break + } + isUpward = false + } + } else { + allPoints <- image.Pt(curX, curY) + allPoints <- image.Pt(curX-1, curY) + curY++ + if curY >= occupied.dimension { + curY = occupied.dimension - 1 + curX -= 2 + if curX == 6 { + curX-- + } + isUpward = true + if curX < 0 { + break + } + } + } + } + + close(allPoints) + }() + go func() { + for pt := range allPoints { + if !occupied.Get(pt.X, pt.Y) { + result <- pt + } + } + close(result) + }() + return result +} + +func drawFinderPatterns(vi *versionInfo, set func(int, int, bool)) { + dim := vi.modulWidth() + drawPattern := func(xoff int, yoff int) { + for x := -1; x < 8; x++ { + for y := -1; y < 8; y++ { + val := (x == 0 || x == 6 || y == 0 || y == 6 || (x > 1 && x < 5 && y > 1 && y < 5)) && (x <= 6 && y <= 6 && x >= 0 && y >= 0) + + if x+xoff >= 0 && x+xoff < dim && y+yoff >= 0 && y+yoff < dim { + set(x+xoff, y+yoff, val) + } + } + } + } + drawPattern(0, 0) + drawPattern(0, dim-7) + drawPattern(dim-7, 0) +} + +func drawAlignmentPatterns(occupied *qrcode, vi *versionInfo, set func(int, int, bool)) { + drawPattern := func(xoff int, yoff int) { + for x := -2; x <= 2; x++ { + for y := -2; y <= 2; y++ { + val := x == -2 || x == 2 || y == -2 || y == 2 || (x == 0 && y == 0) + set(x+xoff, y+yoff, val) + } + } + } + positions := vi.alignmentPatternPlacements() + + for _, x := range positions { + for _, y := range positions { + if occupied.Get(x, y) { + continue + } + drawPattern(x, y) + } + } +} + +var formatInfos = map[ErrorCorrectionLevel]map[int][]bool{ + L: { + 0: []bool{true, true, true, false, true, true, true, true, true, false, false, false, true, false, false}, + 1: []bool{true, true, true, false, false, true, false, true, true, true, true, false, false, true, true}, + 2: []bool{true, true, true, true, true, false, true, true, false, true, false, true, false, true, false}, + 3: []bool{true, true, true, true, false, false, false, true, false, false, true, true, true, false, true}, + 4: []bool{true, true, false, false, true, true, false, false, false, true, false, true, true, true, true}, + 5: []bool{true, true, false, false, false, true, true, false, false, false, true, true, false, false, false}, + 6: []bool{true, true, false, true, true, false, false, false, true, false, false, false, false, false, true}, + 7: []bool{true, true, false, true, false, false, true, false, true, true, true, false, true, true, false}, + }, + M: { + 0: []bool{true, false, true, false, true, false, false, false, false, false, true, false, false, true, false}, + 1: []bool{true, false, true, false, false, false, true, false, false, true, false, false, true, false, true}, + 2: []bool{true, false, true, true, true, true, false, false, true, true, true, true, true, false, false}, + 3: []bool{true, false, true, true, false, true, true, false, true, false, false, true, false, true, true}, + 4: []bool{true, false, false, false, true, false, true, true, true, true, true, true, false, false, true}, + 5: []bool{true, false, false, false, false, false, false, true, true, false, false, true, true, true, false}, + 6: []bool{true, false, false, true, true, true, true, true, false, false, true, false, true, true, true}, + 7: []bool{true, false, false, true, false, true, false, true, false, true, false, false, false, false, false}, + }, + Q: { + 0: []bool{false, true, true, false, true, false, true, false, true, false, true, true, true, true, true}, + 1: []bool{false, true, true, false, false, false, false, false, true, true, false, true, false, false, false}, + 2: []bool{false, true, true, true, true, true, true, false, false, true, true, false, false, false, true}, + 3: []bool{false, true, true, true, false, true, false, false, false, false, false, false, true, true, false}, + 4: []bool{false, true, false, false, true, false, false, true, false, true, true, false, true, false, false}, + 5: []bool{false, true, false, false, false, false, true, true, false, false, false, false, false, true, true}, + 6: []bool{false, true, false, true, true, true, false, true, true, false, true, true, false, true, false}, + 7: []bool{false, true, false, true, false, true, true, true, true, true, false, true, true, false, true}, + }, + H: { + 0: []bool{false, false, true, false, true, true, false, true, false, false, false, true, false, false, true}, + 1: []bool{false, false, true, false, false, true, true, true, false, true, true, true, true, true, false}, + 2: []bool{false, false, true, true, true, false, false, true, true, true, false, false, true, true, true}, + 3: []bool{false, false, true, true, false, false, true, true, true, false, true, false, false, false, false}, + 4: []bool{false, false, false, false, true, true, true, false, true, true, false, false, false, true, false}, + 5: []bool{false, false, false, false, false, true, false, false, true, false, true, false, true, false, true}, + 6: []bool{false, false, false, true, true, false, true, false, false, false, false, true, true, false, false}, + 7: []bool{false, false, false, true, false, false, false, false, false, true, true, true, false, true, true}, + }, +} + +func drawFormatInfo(vi *versionInfo, usedMask int, set func(int, int, bool)) { + var formatInfo []bool + + if usedMask == -1 { + formatInfo = []bool{true, true, true, true, true, true, true, true, true, true, true, true, true, true, true} // Set all to true cause -1 --> occupied mask. + } else { + formatInfo = formatInfos[vi.Level][usedMask] + } + + if len(formatInfo) == 15 { + dim := vi.modulWidth() + set(0, 8, formatInfo[0]) + set(1, 8, formatInfo[1]) + set(2, 8, formatInfo[2]) + set(3, 8, formatInfo[3]) + set(4, 8, formatInfo[4]) + set(5, 8, formatInfo[5]) + set(7, 8, formatInfo[6]) + set(8, 8, formatInfo[7]) + set(8, 7, formatInfo[8]) + set(8, 5, formatInfo[9]) + set(8, 4, formatInfo[10]) + set(8, 3, formatInfo[11]) + set(8, 2, formatInfo[12]) + set(8, 1, formatInfo[13]) + set(8, 0, formatInfo[14]) + + set(8, dim-1, formatInfo[0]) + set(8, dim-2, formatInfo[1]) + set(8, dim-3, formatInfo[2]) + set(8, dim-4, formatInfo[3]) + set(8, dim-5, formatInfo[4]) + set(8, dim-6, formatInfo[5]) + set(8, dim-7, formatInfo[6]) + set(dim-8, 8, formatInfo[7]) + set(dim-7, 8, formatInfo[8]) + set(dim-6, 8, formatInfo[9]) + set(dim-5, 8, formatInfo[10]) + set(dim-4, 8, formatInfo[11]) + set(dim-3, 8, formatInfo[12]) + set(dim-2, 8, formatInfo[13]) + set(dim-1, 8, formatInfo[14]) + } +} + +var versionInfoBitsByVersion = map[byte][]bool{ + 7: []bool{false, false, false, true, true, true, true, true, false, false, true, false, false, true, false, true, false, false}, + 8: []bool{false, false, true, false, false, false, false, true, false, true, true, false, true, true, true, true, false, false}, + 9: []bool{false, false, true, false, false, true, true, false, true, false, true, false, false, true, true, false, false, true}, + 10: []bool{false, false, true, false, true, false, false, true, false, false, true, true, false, true, false, false, true, true}, + 11: []bool{false, false, true, false, true, true, true, false, true, true, true, true, true, true, false, true, true, false}, + 12: []bool{false, false, true, true, false, false, false, true, true, true, false, true, true, false, false, false, true, false}, + 13: []bool{false, false, true, true, false, true, true, false, false, false, false, true, false, false, false, true, true, true}, + 14: []bool{false, false, true, true, true, false, false, true, true, false, false, false, false, false, true, true, false, true}, + 15: []bool{false, false, true, true, true, true, true, false, false, true, false, false, true, false, true, false, false, false}, + 16: []bool{false, true, false, false, false, false, true, false, true, true, false, true, true, true, true, false, false, false}, + 17: []bool{false, true, false, false, false, true, false, true, false, false, false, true, false, true, true, true, false, true}, + 18: []bool{false, true, false, false, true, false, true, false, true, false, false, false, false, true, false, true, true, true}, + 19: []bool{false, true, false, false, true, true, false, true, false, true, false, false, true, true, false, false, true, false}, + 20: []bool{false, true, false, true, false, false, true, false, false, true, true, false, true, false, false, true, true, false}, + 21: []bool{false, true, false, true, false, true, false, true, true, false, true, false, false, false, false, false, true, true}, + 22: []bool{false, true, false, true, true, false, true, false, false, false, true, true, false, false, true, false, false, true}, + 23: []bool{false, true, false, true, true, true, false, true, true, true, true, true, true, false, true, true, false, false}, + 24: []bool{false, true, true, false, false, false, true, true, true, false, true, true, false, false, false, true, false, false}, + 25: []bool{false, true, true, false, false, true, false, false, false, true, true, true, true, false, false, false, false, true}, + 26: []bool{false, true, true, false, true, false, true, true, true, true, true, false, true, false, true, false, true, true}, + 27: []bool{false, true, true, false, true, true, false, false, false, false, true, false, false, false, true, true, true, false}, + 28: []bool{false, true, true, true, false, false, true, true, false, false, false, false, false, true, true, false, true, false}, + 29: []bool{false, true, true, true, false, true, false, false, true, true, false, false, true, true, true, true, true, true}, + 30: []bool{false, true, true, true, true, false, true, true, false, true, false, true, true, true, false, true, false, true}, + 31: []bool{false, true, true, true, true, true, false, false, true, false, false, true, false, true, false, false, false, false}, + 32: []bool{true, false, false, false, false, false, true, false, false, true, true, true, false, true, false, true, false, true}, + 33: []bool{true, false, false, false, false, true, false, true, true, false, true, true, true, true, false, false, false, false}, + 34: []bool{true, false, false, false, true, false, true, false, false, false, true, false, true, true, true, false, true, false}, + 35: []bool{true, false, false, false, true, true, false, true, true, true, true, false, false, true, true, true, true, true}, + 36: []bool{true, false, false, true, false, false, true, false, true, true, false, false, false, false, true, false, true, true}, + 37: []bool{true, false, false, true, false, true, false, true, false, false, false, false, true, false, true, true, true, false}, + 38: []bool{true, false, false, true, true, false, true, false, true, false, false, true, true, false, false, true, false, false}, + 39: []bool{true, false, false, true, true, true, false, true, false, true, false, true, false, false, false, false, false, true}, + 40: []bool{true, false, true, false, false, false, true, true, false, false, false, true, true, false, true, false, false, true}, +} + +func drawVersionInfo(vi *versionInfo, set func(int, int, bool)) { + versionInfoBits, ok := versionInfoBitsByVersion[vi.Version] + + if ok && len(versionInfoBits) > 0 { + for i := 0; i < len(versionInfoBits); i++ { + x := (vi.modulWidth() - 11) + i%3 + y := i / 3 + set(x, y, versionInfoBits[len(versionInfoBits)-i-1]) + set(y, x, versionInfoBits[len(versionInfoBits)-i-1]) + } + } + +} + +func addPaddingAndTerminator(bl *utils.BitList, vi *versionInfo) { + for i := 0; i < 4 && bl.Len() < vi.totalDataBytes()*8; i++ { + bl.AddBit(false) + } + + for bl.Len()%8 != 0 { + bl.AddBit(false) + } + + for i := 0; bl.Len() < vi.totalDataBytes()*8; i++ { + if i%2 == 0 { + bl.AddByte(236) + } else { + bl.AddByte(17) + } + } +} diff --git a/vendor/github.com/boombuler/barcode/qr/errorcorrection.go b/vendor/github.com/boombuler/barcode/qr/errorcorrection.go new file mode 100644 index 00000000000..08ebf0ce62e --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/errorcorrection.go @@ -0,0 +1,29 @@ +package qr + +import ( + "github.com/boombuler/barcode/utils" +) + +type errorCorrection struct { + rs *utils.ReedSolomonEncoder +} + +var ec = newErrorCorrection() + +func newErrorCorrection() *errorCorrection { + fld := utils.NewGaloisField(285, 256, 0) + return &errorCorrection{utils.NewReedSolomonEncoder(fld)} +} + +func (ec *errorCorrection) calcECC(data []byte, eccCount byte) []byte { + dataInts := make([]int, len(data)) + for i := 0; i < len(data); i++ { + dataInts[i] = int(data[i]) + } + res := ec.rs.Encode(dataInts, int(eccCount)) + result := make([]byte, len(res)) + for i := 0; i < len(res); i++ { + result[i] = byte(res[i]) + } + return result +} diff --git a/vendor/github.com/boombuler/barcode/qr/numeric.go b/vendor/github.com/boombuler/barcode/qr/numeric.go new file mode 100644 index 00000000000..49b44cc45d3 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/numeric.go @@ -0,0 +1,56 @@ +package qr + +import ( + "errors" + "fmt" + "strconv" + + "github.com/boombuler/barcode/utils" +) + +func encodeNumeric(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { + contentBitCount := (len(content) / 3) * 10 + switch len(content) % 3 { + case 1: + contentBitCount += 4 + case 2: + contentBitCount += 7 + } + vi := findSmallestVersionInfo(ecl, numericMode, contentBitCount) + if vi == nil { + return nil, nil, errors.New("To much data to encode") + } + res := new(utils.BitList) + res.AddBits(int(numericMode), 4) + res.AddBits(len(content), vi.charCountBits(numericMode)) + + for pos := 0; pos < len(content); pos += 3 { + var curStr string + if pos+3 <= len(content) { + curStr = content[pos : pos+3] + } else { + curStr = content[pos:] + } + + i, err := strconv.Atoi(curStr) + if err != nil || i < 0 { + return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, Numeric) + } + var bitCnt byte + switch len(curStr) % 3 { + case 0: + bitCnt = 10 + case 1: + bitCnt = 4 + break + case 2: + bitCnt = 7 + break + } + + res.AddBits(i, bitCnt) + } + + addPaddingAndTerminator(res, vi) + return res, vi, nil +} diff --git a/vendor/github.com/boombuler/barcode/qr/qrcode.go b/vendor/github.com/boombuler/barcode/qr/qrcode.go new file mode 100644 index 00000000000..13607604bb8 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/qrcode.go @@ -0,0 +1,166 @@ +package qr + +import ( + "image" + "image/color" + "math" + + "github.com/boombuler/barcode" + "github.com/boombuler/barcode/utils" +) + +type qrcode struct { + dimension int + data *utils.BitList + content string +} + +func (qr *qrcode) Content() string { + return qr.content +} + +func (qr *qrcode) Metadata() barcode.Metadata { + return barcode.Metadata{barcode.TypeQR, 2} +} + +func (qr *qrcode) ColorModel() color.Model { + return color.Gray16Model +} + +func (qr *qrcode) Bounds() image.Rectangle { + return image.Rect(0, 0, qr.dimension, qr.dimension) +} + +func (qr *qrcode) At(x, y int) color.Color { + if qr.Get(x, y) { + return color.Black + } + return color.White +} + +func (qr *qrcode) Get(x, y int) bool { + return qr.data.GetBit(x*qr.dimension + y) +} + +func (qr *qrcode) Set(x, y int, val bool) { + qr.data.SetBit(x*qr.dimension+y, val) +} + +func (qr *qrcode) calcPenalty() uint { + return qr.calcPenaltyRule1() + qr.calcPenaltyRule2() + qr.calcPenaltyRule3() + qr.calcPenaltyRule4() +} + +func (qr *qrcode) calcPenaltyRule1() uint { + var result uint + for x := 0; x < qr.dimension; x++ { + checkForX := false + var cntX uint + checkForY := false + var cntY uint + + for y := 0; y < qr.dimension; y++ { + if qr.Get(x, y) == checkForX { + cntX++ + } else { + checkForX = !checkForX + if cntX >= 5 { + result += cntX - 2 + } + cntX = 1 + } + + if qr.Get(y, x) == checkForY { + cntY++ + } else { + checkForY = !checkForY + if cntY >= 5 { + result += cntY - 2 + } + cntY = 1 + } + } + + if cntX >= 5 { + result += cntX - 2 + } + if cntY >= 5 { + result += cntY - 2 + } + } + + return result +} + +func (qr *qrcode) calcPenaltyRule2() uint { + var result uint + for x := 0; x < qr.dimension-1; x++ { + for y := 0; y < qr.dimension-1; y++ { + check := qr.Get(x, y) + if qr.Get(x, y+1) == check && qr.Get(x+1, y) == check && qr.Get(x+1, y+1) == check { + result += 3 + } + } + } + return result +} + +func (qr *qrcode) calcPenaltyRule3() uint { + pattern1 := []bool{true, false, true, true, true, false, true, false, false, false, false} + pattern2 := []bool{false, false, false, false, true, false, true, true, true, false, true} + + var result uint + for x := 0; x <= qr.dimension-len(pattern1); x++ { + for y := 0; y < qr.dimension; y++ { + pattern1XFound := true + pattern2XFound := true + pattern1YFound := true + pattern2YFound := true + + for i := 0; i < len(pattern1); i++ { + iv := qr.Get(x+i, y) + if iv != pattern1[i] { + pattern1XFound = false + } + if iv != pattern2[i] { + pattern2XFound = false + } + iv = qr.Get(y, x+i) + if iv != pattern1[i] { + pattern1YFound = false + } + if iv != pattern2[i] { + pattern2YFound = false + } + } + if pattern1XFound || pattern2XFound { + result += 40 + } + if pattern1YFound || pattern2YFound { + result += 40 + } + } + } + + return result +} + +func (qr *qrcode) calcPenaltyRule4() uint { + totalNum := qr.data.Len() + trueCnt := 0 + for i := 0; i < totalNum; i++ { + if qr.data.GetBit(i) { + trueCnt++ + } + } + percDark := float64(trueCnt) * 100 / float64(totalNum) + floor := math.Abs(math.Floor(percDark/5) - 10) + ceil := math.Abs(math.Ceil(percDark/5) - 10) + return uint(math.Min(floor, ceil) * 10) +} + +func newBarcode(dim int) *qrcode { + res := new(qrcode) + res.dimension = dim + res.data = utils.NewBitList(dim * dim) + return res +} diff --git a/vendor/github.com/boombuler/barcode/qr/unicode.go b/vendor/github.com/boombuler/barcode/qr/unicode.go new file mode 100644 index 00000000000..a9135ab6d96 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/unicode.go @@ -0,0 +1,27 @@ +package qr + +import ( + "errors" + + "github.com/boombuler/barcode/utils" +) + +func encodeUnicode(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { + data := []byte(content) + + vi := findSmallestVersionInfo(ecl, byteMode, len(data)*8) + if vi == nil { + return nil, nil, errors.New("To much data to encode") + } + + // It's not correct to add the unicode bytes to the result directly but most readers can't handle the + // required ECI header... + res := new(utils.BitList) + res.AddBits(int(byteMode), 4) + res.AddBits(len(content), vi.charCountBits(byteMode)) + for _, b := range data { + res.AddByte(b) + } + addPaddingAndTerminator(res, vi) + return res, vi, nil +} diff --git a/vendor/github.com/boombuler/barcode/qr/versioninfo.go b/vendor/github.com/boombuler/barcode/qr/versioninfo.go new file mode 100644 index 00000000000..6852a5766ef --- /dev/null +++ b/vendor/github.com/boombuler/barcode/qr/versioninfo.go @@ -0,0 +1,310 @@ +package qr + +import "math" + +// ErrorCorrectionLevel indicates the amount of "backup data" stored in the QR code +type ErrorCorrectionLevel byte + +const ( + // L recovers 7% of data + L ErrorCorrectionLevel = iota + // M recovers 15% of data + M + // Q recovers 25% of data + Q + // H recovers 30% of data + H +) + +func (ecl ErrorCorrectionLevel) String() string { + switch ecl { + case L: + return "L" + case M: + return "M" + case Q: + return "Q" + case H: + return "H" + } + return "unknown" +} + +type encodingMode byte + +const ( + numericMode encodingMode = 1 + alphaNumericMode encodingMode = 2 + byteMode encodingMode = 4 + kanjiMode encodingMode = 8 +) + +type versionInfo struct { + Version byte + Level ErrorCorrectionLevel + ErrorCorrectionCodewordsPerBlock byte + NumberOfBlocksInGroup1 byte + DataCodeWordsPerBlockInGroup1 byte + NumberOfBlocksInGroup2 byte + DataCodeWordsPerBlockInGroup2 byte +} + +var versionInfos = []*versionInfo{ + &versionInfo{1, L, 7, 1, 19, 0, 0}, + &versionInfo{1, M, 10, 1, 16, 0, 0}, + &versionInfo{1, Q, 13, 1, 13, 0, 0}, + &versionInfo{1, H, 17, 1, 9, 0, 0}, + &versionInfo{2, L, 10, 1, 34, 0, 0}, + &versionInfo{2, M, 16, 1, 28, 0, 0}, + &versionInfo{2, Q, 22, 1, 22, 0, 0}, + &versionInfo{2, H, 28, 1, 16, 0, 0}, + &versionInfo{3, L, 15, 1, 55, 0, 0}, + &versionInfo{3, M, 26, 1, 44, 0, 0}, + &versionInfo{3, Q, 18, 2, 17, 0, 0}, + &versionInfo{3, H, 22, 2, 13, 0, 0}, + &versionInfo{4, L, 20, 1, 80, 0, 0}, + &versionInfo{4, M, 18, 2, 32, 0, 0}, + &versionInfo{4, Q, 26, 2, 24, 0, 0}, + &versionInfo{4, H, 16, 4, 9, 0, 0}, + &versionInfo{5, L, 26, 1, 108, 0, 0}, + &versionInfo{5, M, 24, 2, 43, 0, 0}, + &versionInfo{5, Q, 18, 2, 15, 2, 16}, + &versionInfo{5, H, 22, 2, 11, 2, 12}, + &versionInfo{6, L, 18, 2, 68, 0, 0}, + &versionInfo{6, M, 16, 4, 27, 0, 0}, + &versionInfo{6, Q, 24, 4, 19, 0, 0}, + &versionInfo{6, H, 28, 4, 15, 0, 0}, + &versionInfo{7, L, 20, 2, 78, 0, 0}, + &versionInfo{7, M, 18, 4, 31, 0, 0}, + &versionInfo{7, Q, 18, 2, 14, 4, 15}, + &versionInfo{7, H, 26, 4, 13, 1, 14}, + &versionInfo{8, L, 24, 2, 97, 0, 0}, + &versionInfo{8, M, 22, 2, 38, 2, 39}, + &versionInfo{8, Q, 22, 4, 18, 2, 19}, + &versionInfo{8, H, 26, 4, 14, 2, 15}, + &versionInfo{9, L, 30, 2, 116, 0, 0}, + &versionInfo{9, M, 22, 3, 36, 2, 37}, + &versionInfo{9, Q, 20, 4, 16, 4, 17}, + &versionInfo{9, H, 24, 4, 12, 4, 13}, + &versionInfo{10, L, 18, 2, 68, 2, 69}, + &versionInfo{10, M, 26, 4, 43, 1, 44}, + &versionInfo{10, Q, 24, 6, 19, 2, 20}, + &versionInfo{10, H, 28, 6, 15, 2, 16}, + &versionInfo{11, L, 20, 4, 81, 0, 0}, + &versionInfo{11, M, 30, 1, 50, 4, 51}, + &versionInfo{11, Q, 28, 4, 22, 4, 23}, + &versionInfo{11, H, 24, 3, 12, 8, 13}, + &versionInfo{12, L, 24, 2, 92, 2, 93}, + &versionInfo{12, M, 22, 6, 36, 2, 37}, + &versionInfo{12, Q, 26, 4, 20, 6, 21}, + &versionInfo{12, H, 28, 7, 14, 4, 15}, + &versionInfo{13, L, 26, 4, 107, 0, 0}, + &versionInfo{13, M, 22, 8, 37, 1, 38}, + &versionInfo{13, Q, 24, 8, 20, 4, 21}, + &versionInfo{13, H, 22, 12, 11, 4, 12}, + &versionInfo{14, L, 30, 3, 115, 1, 116}, + &versionInfo{14, M, 24, 4, 40, 5, 41}, + &versionInfo{14, Q, 20, 11, 16, 5, 17}, + &versionInfo{14, H, 24, 11, 12, 5, 13}, + &versionInfo{15, L, 22, 5, 87, 1, 88}, + &versionInfo{15, M, 24, 5, 41, 5, 42}, + &versionInfo{15, Q, 30, 5, 24, 7, 25}, + &versionInfo{15, H, 24, 11, 12, 7, 13}, + &versionInfo{16, L, 24, 5, 98, 1, 99}, + &versionInfo{16, M, 28, 7, 45, 3, 46}, + &versionInfo{16, Q, 24, 15, 19, 2, 20}, + &versionInfo{16, H, 30, 3, 15, 13, 16}, + &versionInfo{17, L, 28, 1, 107, 5, 108}, + &versionInfo{17, M, 28, 10, 46, 1, 47}, + &versionInfo{17, Q, 28, 1, 22, 15, 23}, + &versionInfo{17, H, 28, 2, 14, 17, 15}, + &versionInfo{18, L, 30, 5, 120, 1, 121}, + &versionInfo{18, M, 26, 9, 43, 4, 44}, + &versionInfo{18, Q, 28, 17, 22, 1, 23}, + &versionInfo{18, H, 28, 2, 14, 19, 15}, + &versionInfo{19, L, 28, 3, 113, 4, 114}, + &versionInfo{19, M, 26, 3, 44, 11, 45}, + &versionInfo{19, Q, 26, 17, 21, 4, 22}, + &versionInfo{19, H, 26, 9, 13, 16, 14}, + &versionInfo{20, L, 28, 3, 107, 5, 108}, + &versionInfo{20, M, 26, 3, 41, 13, 42}, + &versionInfo{20, Q, 30, 15, 24, 5, 25}, + &versionInfo{20, H, 28, 15, 15, 10, 16}, + &versionInfo{21, L, 28, 4, 116, 4, 117}, + &versionInfo{21, M, 26, 17, 42, 0, 0}, + &versionInfo{21, Q, 28, 17, 22, 6, 23}, + &versionInfo{21, H, 30, 19, 16, 6, 17}, + &versionInfo{22, L, 28, 2, 111, 7, 112}, + &versionInfo{22, M, 28, 17, 46, 0, 0}, + &versionInfo{22, Q, 30, 7, 24, 16, 25}, + &versionInfo{22, H, 24, 34, 13, 0, 0}, + &versionInfo{23, L, 30, 4, 121, 5, 122}, + &versionInfo{23, M, 28, 4, 47, 14, 48}, + &versionInfo{23, Q, 30, 11, 24, 14, 25}, + &versionInfo{23, H, 30, 16, 15, 14, 16}, + &versionInfo{24, L, 30, 6, 117, 4, 118}, + &versionInfo{24, M, 28, 6, 45, 14, 46}, + &versionInfo{24, Q, 30, 11, 24, 16, 25}, + &versionInfo{24, H, 30, 30, 16, 2, 17}, + &versionInfo{25, L, 26, 8, 106, 4, 107}, + &versionInfo{25, M, 28, 8, 47, 13, 48}, + &versionInfo{25, Q, 30, 7, 24, 22, 25}, + &versionInfo{25, H, 30, 22, 15, 13, 16}, + &versionInfo{26, L, 28, 10, 114, 2, 115}, + &versionInfo{26, M, 28, 19, 46, 4, 47}, + &versionInfo{26, Q, 28, 28, 22, 6, 23}, + &versionInfo{26, H, 30, 33, 16, 4, 17}, + &versionInfo{27, L, 30, 8, 122, 4, 123}, + &versionInfo{27, M, 28, 22, 45, 3, 46}, + &versionInfo{27, Q, 30, 8, 23, 26, 24}, + &versionInfo{27, H, 30, 12, 15, 28, 16}, + &versionInfo{28, L, 30, 3, 117, 10, 118}, + &versionInfo{28, M, 28, 3, 45, 23, 46}, + &versionInfo{28, Q, 30, 4, 24, 31, 25}, + &versionInfo{28, H, 30, 11, 15, 31, 16}, + &versionInfo{29, L, 30, 7, 116, 7, 117}, + &versionInfo{29, M, 28, 21, 45, 7, 46}, + &versionInfo{29, Q, 30, 1, 23, 37, 24}, + &versionInfo{29, H, 30, 19, 15, 26, 16}, + &versionInfo{30, L, 30, 5, 115, 10, 116}, + &versionInfo{30, M, 28, 19, 47, 10, 48}, + &versionInfo{30, Q, 30, 15, 24, 25, 25}, + &versionInfo{30, H, 30, 23, 15, 25, 16}, + &versionInfo{31, L, 30, 13, 115, 3, 116}, + &versionInfo{31, M, 28, 2, 46, 29, 47}, + &versionInfo{31, Q, 30, 42, 24, 1, 25}, + &versionInfo{31, H, 30, 23, 15, 28, 16}, + &versionInfo{32, L, 30, 17, 115, 0, 0}, + &versionInfo{32, M, 28, 10, 46, 23, 47}, + &versionInfo{32, Q, 30, 10, 24, 35, 25}, + &versionInfo{32, H, 30, 19, 15, 35, 16}, + &versionInfo{33, L, 30, 17, 115, 1, 116}, + &versionInfo{33, M, 28, 14, 46, 21, 47}, + &versionInfo{33, Q, 30, 29, 24, 19, 25}, + &versionInfo{33, H, 30, 11, 15, 46, 16}, + &versionInfo{34, L, 30, 13, 115, 6, 116}, + &versionInfo{34, M, 28, 14, 46, 23, 47}, + &versionInfo{34, Q, 30, 44, 24, 7, 25}, + &versionInfo{34, H, 30, 59, 16, 1, 17}, + &versionInfo{35, L, 30, 12, 121, 7, 122}, + &versionInfo{35, M, 28, 12, 47, 26, 48}, + &versionInfo{35, Q, 30, 39, 24, 14, 25}, + &versionInfo{35, H, 30, 22, 15, 41, 16}, + &versionInfo{36, L, 30, 6, 121, 14, 122}, + &versionInfo{36, M, 28, 6, 47, 34, 48}, + &versionInfo{36, Q, 30, 46, 24, 10, 25}, + &versionInfo{36, H, 30, 2, 15, 64, 16}, + &versionInfo{37, L, 30, 17, 122, 4, 123}, + &versionInfo{37, M, 28, 29, 46, 14, 47}, + &versionInfo{37, Q, 30, 49, 24, 10, 25}, + &versionInfo{37, H, 30, 24, 15, 46, 16}, + &versionInfo{38, L, 30, 4, 122, 18, 123}, + &versionInfo{38, M, 28, 13, 46, 32, 47}, + &versionInfo{38, Q, 30, 48, 24, 14, 25}, + &versionInfo{38, H, 30, 42, 15, 32, 16}, + &versionInfo{39, L, 30, 20, 117, 4, 118}, + &versionInfo{39, M, 28, 40, 47, 7, 48}, + &versionInfo{39, Q, 30, 43, 24, 22, 25}, + &versionInfo{39, H, 30, 10, 15, 67, 16}, + &versionInfo{40, L, 30, 19, 118, 6, 119}, + &versionInfo{40, M, 28, 18, 47, 31, 48}, + &versionInfo{40, Q, 30, 34, 24, 34, 25}, + &versionInfo{40, H, 30, 20, 15, 61, 16}, +} + +func (vi *versionInfo) totalDataBytes() int { + g1Data := int(vi.NumberOfBlocksInGroup1) * int(vi.DataCodeWordsPerBlockInGroup1) + g2Data := int(vi.NumberOfBlocksInGroup2) * int(vi.DataCodeWordsPerBlockInGroup2) + return (g1Data + g2Data) +} + +func (vi *versionInfo) charCountBits(m encodingMode) byte { + switch m { + case numericMode: + if vi.Version < 10 { + return 10 + } else if vi.Version < 27 { + return 12 + } + return 14 + + case alphaNumericMode: + if vi.Version < 10 { + return 9 + } else if vi.Version < 27 { + return 11 + } + return 13 + + case byteMode: + if vi.Version < 10 { + return 8 + } + return 16 + + case kanjiMode: + if vi.Version < 10 { + return 8 + } else if vi.Version < 27 { + return 10 + } + return 12 + default: + return 0 + } +} + +func (vi *versionInfo) modulWidth() int { + return ((int(vi.Version) - 1) * 4) + 21 +} + +func (vi *versionInfo) alignmentPatternPlacements() []int { + if vi.Version == 1 { + return make([]int, 0) + } + + first := 6 + last := vi.modulWidth() - 7 + space := float64(last - first) + count := int(math.Ceil(space/28)) + 1 + + result := make([]int, count) + result[0] = first + result[len(result)-1] = last + if count > 2 { + step := int(math.Ceil(float64(last-first) / float64(count-1))) + if step%2 == 1 { + frac := float64(last-first) / float64(count-1) + _, x := math.Modf(frac) + if x >= 0.5 { + frac = math.Ceil(frac) + } else { + frac = math.Floor(frac) + } + + if int(frac)%2 == 0 { + step-- + } else { + step++ + } + } + + for i := 1; i <= count-2; i++ { + result[i] = last - (step * (count - 1 - i)) + } + } + + return result +} + +func findSmallestVersionInfo(ecl ErrorCorrectionLevel, mode encodingMode, dataBits int) *versionInfo { + dataBits = dataBits + 4 // mode indicator + for _, vi := range versionInfos { + if vi.Level == ecl { + if (vi.totalDataBytes() * 8) >= (dataBits + int(vi.charCountBits(mode))) { + return vi + } + } + } + return nil +} diff --git a/vendor/github.com/boombuler/barcode/scaledbarcode.go b/vendor/github.com/boombuler/barcode/scaledbarcode.go new file mode 100644 index 00000000000..152b1801748 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/scaledbarcode.go @@ -0,0 +1,134 @@ +package barcode + +import ( + "errors" + "fmt" + "image" + "image/color" + "math" +) + +type wrapFunc func(x, y int) color.Color + +type scaledBarcode struct { + wrapped Barcode + wrapperFunc wrapFunc + rect image.Rectangle +} + +type intCSscaledBC struct { + scaledBarcode +} + +func (bc *scaledBarcode) Content() string { + return bc.wrapped.Content() +} + +func (bc *scaledBarcode) Metadata() Metadata { + return bc.wrapped.Metadata() +} + +func (bc *scaledBarcode) ColorModel() color.Model { + return bc.wrapped.ColorModel() +} + +func (bc *scaledBarcode) Bounds() image.Rectangle { + return bc.rect +} + +func (bc *scaledBarcode) At(x, y int) color.Color { + return bc.wrapperFunc(x, y) +} + +func (bc *intCSscaledBC) CheckSum() int { + if cs, ok := bc.wrapped.(BarcodeIntCS); ok { + return cs.CheckSum() + } + return 0 +} + +// Scale returns a resized barcode with the given width and height. +func Scale(bc Barcode, width, height int) (Barcode, error) { + switch bc.Metadata().Dimensions { + case 1: + return scale1DCode(bc, width, height) + case 2: + return scale2DCode(bc, width, height) + } + + return nil, errors.New("unsupported barcode format") +} + +func newScaledBC(wrapped Barcode, wrapperFunc wrapFunc, rect image.Rectangle) Barcode { + result := &scaledBarcode{ + wrapped: wrapped, + wrapperFunc: wrapperFunc, + rect: rect, + } + + if _, ok := wrapped.(BarcodeIntCS); ok { + return &intCSscaledBC{*result} + } + return result +} + +func scale2DCode(bc Barcode, width, height int) (Barcode, error) { + orgBounds := bc.Bounds() + orgWidth := orgBounds.Max.X - orgBounds.Min.X + orgHeight := orgBounds.Max.Y - orgBounds.Min.Y + + factor := int(math.Min(float64(width)/float64(orgWidth), float64(height)/float64(orgHeight))) + if factor <= 0 { + return nil, fmt.Errorf("can not scale barcode to an image smaller than %dx%d", orgWidth, orgHeight) + } + + offsetX := (width - (orgWidth * factor)) / 2 + offsetY := (height - (orgHeight * factor)) / 2 + + wrap := func(x, y int) color.Color { + if x < offsetX || y < offsetY { + return color.White + } + x = (x - offsetX) / factor + y = (y - offsetY) / factor + if x >= orgWidth || y >= orgHeight { + return color.White + } + return bc.At(x, y) + } + + return newScaledBC( + bc, + wrap, + image.Rect(0, 0, width, height), + ), nil +} + +func scale1DCode(bc Barcode, width, height int) (Barcode, error) { + orgBounds := bc.Bounds() + orgWidth := orgBounds.Max.X - orgBounds.Min.X + factor := int(float64(width) / float64(orgWidth)) + + if factor <= 0 { + return nil, fmt.Errorf("can not scale barcode to an image smaller than %dx1", orgWidth) + } + offsetX := (width - (orgWidth * factor)) / 2 + + wrap := func(x, y int) color.Color { + if x < offsetX { + return color.White + } + x = (x - offsetX) / factor + + if x >= orgWidth { + return color.White + } + return bc.At(x, 0) + } + + return newScaledBC( + bc, + wrap, + image.Rect(0, 0, width, height), + ), nil +} diff --git a/vendor/github.com/boombuler/barcode/utils/base1dcode.go b/vendor/github.com/boombuler/barcode/utils/base1dcode.go new file mode 100644 index 00000000000..75e50048c64 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/utils/base1dcode.go @@ -0,0 +1,57 @@ +// Package utils contain some utilities which are needed to create barcodes +package utils + +import ( + "image" + "image/color" + + "github.com/boombuler/barcode" +) + +type base1DCode struct { + *BitList + kind string + content string +} + +type base1DCodeIntCS struct { + base1DCode + checksum int +} + +func (c *base1DCode) Content() string { + return c.content +} + +func (c *base1DCode) Metadata() barcode.Metadata { + return barcode.Metadata{c.kind, 1} +} + +func (c *base1DCode) ColorModel() color.Model { + return color.Gray16Model +} + +func (c *base1DCode) Bounds() image.Rectangle { + return image.Rect(0, 0, c.Len(), 1) +} + +func (c *base1DCode) At(x, y int) color.Color { + if c.GetBit(x) { + return color.Black + } + return color.White +} + +func (c *base1DCodeIntCS) CheckSum() int { + return c.checksum +} + +// New1DCode creates a new 1D barcode where the bars are represented by the bits in the bars BitList +func New1DCodeIntCheckSum(codeKind, content string, bars *BitList, checksum int) barcode.BarcodeIntCS { + return &base1DCodeIntCS{base1DCode{bars, codeKind, content}, checksum} +} + +// New1DCode creates a new 1D barcode where the bars are represented by the bits in the bars BitList +func New1DCode(codeKind, content string, bars *BitList) barcode.Barcode { + return &base1DCode{bars, codeKind, content} +} diff --git a/vendor/github.com/boombuler/barcode/utils/bitlist.go b/vendor/github.com/boombuler/barcode/utils/bitlist.go new file mode 100644 index 00000000000..bb05e53b5d7 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/utils/bitlist.go @@ -0,0 +1,119 @@ +package utils + +// BitList is a list that contains bits +type BitList struct { + count int + data []int32 +} + +// NewBitList returns a new BitList with the given length +// all bits are initialize with false +func NewBitList(capacity int) *BitList { + bl := new(BitList) + bl.count = capacity + x := 0 + if capacity%32 != 0 { + x = 1 + } + bl.data = make([]int32, capacity/32+x) + return bl +} + +// Len returns the number of contained bits +func (bl *BitList) Len() int { + return bl.count +} + +func (bl *BitList) grow() { + growBy := len(bl.data) + if growBy < 128 { + growBy = 128 + } else if growBy >= 1024 { + growBy = 1024 + } + + nd := make([]int32, len(bl.data)+growBy) + copy(nd, bl.data) + bl.data = nd +} + +// AddBit appends the given bits to the end of the list +func (bl *BitList) AddBit(bits ...bool) { + for _, bit := range bits { + itmIndex := bl.count / 32 + for itmIndex >= len(bl.data) { + bl.grow() + } + bl.SetBit(bl.count, bit) + bl.count++ + } +} + +// SetBit sets the bit at the given index to the given value +func (bl *BitList) SetBit(index int, value bool) { + itmIndex := index / 32 + itmBitShift := 31 - (index % 32) + if value { + bl.data[itmIndex] = bl.data[itmIndex] | 1<> uint(itmBitShift)) & 1) == 1 +} + +// AddByte appends all 8 bits of the given byte to the end of the list +func (bl *BitList) AddByte(b byte) { + for i := 7; i >= 0; i-- { + bl.AddBit(((b >> uint(i)) & 1) == 1) + } +} + +// AddBits appends the last (LSB) 'count' bits of 'b' the the end of the list +func (bl *BitList) AddBits(b int, count byte) { + for i := int(count) - 1; i >= 0; i-- { + bl.AddBit(((b >> uint(i)) & 1) == 1) + } +} + +// GetBytes returns all bits of the BitList as a []byte +func (bl *BitList) GetBytes() []byte { + len := bl.count >> 3 + if (bl.count % 8) != 0 { + len++ + } + result := make([]byte, len) + for i := 0; i < len; i++ { + shift := (3 - (i % 4)) * 8 + result[i] = (byte)((bl.data[i/4] >> uint(shift)) & 0xFF) + } + return result +} + +// IterateBytes iterates through all bytes contained in the BitList +func (bl *BitList) IterateBytes() <-chan byte { + res := make(chan byte) + + go func() { + c := bl.count + shift := 24 + i := 0 + for c > 0 { + res <- byte((bl.data[i] >> uint(shift)) & 0xFF) + shift -= 8 + if shift < 0 { + shift = 24 + i++ + } + c -= 8 + } + close(res) + }() + + return res +} diff --git a/vendor/github.com/boombuler/barcode/utils/galoisfield.go b/vendor/github.com/boombuler/barcode/utils/galoisfield.go new file mode 100644 index 00000000000..68726fbfdef --- /dev/null +++ b/vendor/github.com/boombuler/barcode/utils/galoisfield.go @@ -0,0 +1,65 @@ +package utils + +// GaloisField encapsulates galois field arithmetics +type GaloisField struct { + Size int + Base int + ALogTbl []int + LogTbl []int +} + +// NewGaloisField creates a new galois field +func NewGaloisField(pp, fieldSize, b int) *GaloisField { + result := new(GaloisField) + + result.Size = fieldSize + result.Base = b + result.ALogTbl = make([]int, fieldSize) + result.LogTbl = make([]int, fieldSize) + + x := 1 + for i := 0; i < fieldSize; i++ { + result.ALogTbl[i] = x + x = x * 2 + if x >= fieldSize { + x = (x ^ pp) & (fieldSize - 1) + } + } + + for i := 0; i < fieldSize; i++ { + result.LogTbl[result.ALogTbl[i]] = int(i) + } + + return result +} + +func (gf *GaloisField) Zero() *GFPoly { + return NewGFPoly(gf, []int{0}) +} + +// AddOrSub add or substract two numbers +func (gf *GaloisField) AddOrSub(a, b int) int { + return a ^ b +} + +// Multiply multiplys two numbers +func (gf *GaloisField) Multiply(a, b int) int { + if a == 0 || b == 0 { + return 0 + } + return gf.ALogTbl[(gf.LogTbl[a]+gf.LogTbl[b])%(gf.Size-1)] +} + +// Divide divides two numbers +func (gf *GaloisField) Divide(a, b int) int { + if b == 0 { + panic("divide by zero") + } else if a == 0 { + return 0 + } + return gf.ALogTbl[(gf.LogTbl[a]-gf.LogTbl[b])%(gf.Size-1)] +} + +func (gf *GaloisField) Invers(num int) int { + return gf.ALogTbl[(gf.Size-1)-gf.LogTbl[num]] +} diff --git a/vendor/github.com/boombuler/barcode/utils/gfpoly.go b/vendor/github.com/boombuler/barcode/utils/gfpoly.go new file mode 100644 index 00000000000..c56bb40b9a9 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/utils/gfpoly.go @@ -0,0 +1,103 @@ +package utils + +type GFPoly struct { + gf *GaloisField + Coefficients []int +} + +func (gp *GFPoly) Degree() int { + return len(gp.Coefficients) - 1 +} + +func (gp *GFPoly) Zero() bool { + return gp.Coefficients[0] == 0 +} + +// GetCoefficient returns the coefficient of x ^ degree +func (gp *GFPoly) GetCoefficient(degree int) int { + return gp.Coefficients[gp.Degree()-degree] +} + +func (gp *GFPoly) AddOrSubstract(other *GFPoly) *GFPoly { + if gp.Zero() { + return other + } else if other.Zero() { + return gp + } + smallCoeff := gp.Coefficients + largeCoeff := other.Coefficients + if len(smallCoeff) > len(largeCoeff) { + largeCoeff, smallCoeff = smallCoeff, largeCoeff + } + sumDiff := make([]int, len(largeCoeff)) + lenDiff := len(largeCoeff) - len(smallCoeff) + copy(sumDiff, largeCoeff[:lenDiff]) + for i := lenDiff; i < len(largeCoeff); i++ { + sumDiff[i] = int(gp.gf.AddOrSub(int(smallCoeff[i-lenDiff]), int(largeCoeff[i]))) + } + return NewGFPoly(gp.gf, sumDiff) +} + +func (gp *GFPoly) MultByMonominal(degree int, coeff int) *GFPoly { + if coeff == 0 { + return gp.gf.Zero() + } + size := len(gp.Coefficients) + result := make([]int, size+degree) + for i := 0; i < size; i++ { + result[i] = int(gp.gf.Multiply(int(gp.Coefficients[i]), int(coeff))) + } + return NewGFPoly(gp.gf, result) +} + +func (gp *GFPoly) Multiply(other *GFPoly) *GFPoly { + if gp.Zero() || other.Zero() { + return gp.gf.Zero() + } + aCoeff := gp.Coefficients + aLen := len(aCoeff) + bCoeff := other.Coefficients + bLen := len(bCoeff) + product := make([]int, aLen+bLen-1) + for i := 0; i < aLen; i++ { + ac := int(aCoeff[i]) + for j := 0; j < bLen; j++ { + bc := int(bCoeff[j]) + product[i+j] = int(gp.gf.AddOrSub(int(product[i+j]), gp.gf.Multiply(ac, bc))) + } + } + return NewGFPoly(gp.gf, product) +} + +func (gp *GFPoly) Divide(other *GFPoly) (quotient *GFPoly, remainder *GFPoly) { + quotient = gp.gf.Zero() + remainder = gp + fld := gp.gf + denomLeadTerm := other.GetCoefficient(other.Degree()) + inversDenomLeadTerm := fld.Invers(int(denomLeadTerm)) + for remainder.Degree() >= other.Degree() && !remainder.Zero() { + degreeDiff := remainder.Degree() - other.Degree() + scale := int(fld.Multiply(int(remainder.GetCoefficient(remainder.Degree())), inversDenomLeadTerm)) + term := other.MultByMonominal(degreeDiff, scale) + itQuot := NewMonominalPoly(fld, degreeDiff, scale) + quotient = quotient.AddOrSubstract(itQuot) + remainder = remainder.AddOrSubstract(term) + } + return +} + +func NewMonominalPoly(field *GaloisField, degree int, coeff int) *GFPoly { + if coeff == 0 { + return field.Zero() + } + result := make([]int, degree+1) + result[0] = coeff + return NewGFPoly(field, result) +} + +func NewGFPoly(field *GaloisField, coefficients []int) *GFPoly { + for len(coefficients) > 1 && coefficients[0] == 0 { + coefficients = coefficients[1:] + } + return &GFPoly{field, coefficients} +} diff --git a/vendor/github.com/boombuler/barcode/utils/reedsolomon.go b/vendor/github.com/boombuler/barcode/utils/reedsolomon.go new file mode 100644 index 00000000000..53af91ad446 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/utils/reedsolomon.go @@ -0,0 +1,44 @@ +package utils + +import ( + "sync" +) + +type ReedSolomonEncoder struct { + gf *GaloisField + polynomes []*GFPoly + m *sync.Mutex +} + +func NewReedSolomonEncoder(gf *GaloisField) *ReedSolomonEncoder { + return &ReedSolomonEncoder{ + gf, []*GFPoly{NewGFPoly(gf, []int{1})}, new(sync.Mutex), + } +} + +func (rs *ReedSolomonEncoder) getPolynomial(degree int) *GFPoly { + rs.m.Lock() + defer rs.m.Unlock() + + if degree >= len(rs.polynomes) { + last := rs.polynomes[len(rs.polynomes)-1] + for d := len(rs.polynomes); d <= degree; d++ { + next := last.Multiply(NewGFPoly(rs.gf, []int{1, rs.gf.ALogTbl[d-1+rs.gf.Base]})) + rs.polynomes = append(rs.polynomes, next) + last = next + } + } + return rs.polynomes[degree] +} + +func (rs *ReedSolomonEncoder) Encode(data []int, eccCount int) []int { + generator := rs.getPolynomial(eccCount) + info := NewGFPoly(rs.gf, data) + info = info.MultByMonominal(eccCount, 1) + _, remainder := info.Divide(generator) + + result := make([]int, eccCount) + numZero := int(eccCount) - len(remainder.Coefficients) + copy(result[numZero:], remainder.Coefficients) + return result +} diff --git a/vendor/github.com/boombuler/barcode/utils/runeint.go b/vendor/github.com/boombuler/barcode/utils/runeint.go new file mode 100644 index 00000000000..d2e5e61e567 --- /dev/null +++ b/vendor/github.com/boombuler/barcode/utils/runeint.go @@ -0,0 +1,19 @@ +package utils + +// RuneToInt converts a rune between '0' and '9' to an integer between 0 and 9 +// If the rune is outside of this range -1 is returned. +func RuneToInt(r rune) int { + if r >= '0' && r <= '9' { + return int(r - '0') + } + return -1 +} + +// IntToRune converts a digit 0 - 9 to the rune '0' - '9'. If the given int is outside +// of this range 'F' is returned! +func IntToRune(i int) rune { + if i >= 0 && i <= 9 { + return rune(i + '0') + } + return 'F' +} diff --git a/vendor/github.com/pquerna/otp/LICENSE b/vendor/github.com/pquerna/otp/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/pquerna/otp/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/pquerna/otp/NOTICE b/vendor/github.com/pquerna/otp/NOTICE new file mode 100644 index 00000000000..50e2e75016e --- /dev/null +++ b/vendor/github.com/pquerna/otp/NOTICE @@ -0,0 +1,5 @@ +otp +Copyright (c) 2014, Paul Querna + +This product includes software developed by +Paul Querna (http://paul.querna.org/). diff --git a/vendor/github.com/pquerna/otp/README.md b/vendor/github.com/pquerna/otp/README.md new file mode 100644 index 00000000000..148e8980d6d --- /dev/null +++ b/vendor/github.com/pquerna/otp/README.md @@ -0,0 +1,60 @@ +# otp: One Time Password utilities Go / Golang + +[![GoDoc](https://godoc.org/github.com/pquerna/otp?status.svg)](https://godoc.org/github.com/pquerna/otp) [![Build Status](https://travis-ci.org/pquerna/otp.svg?branch=master)](https://travis-ci.org/pquerna/otp) + +# Why One Time Passwords? + +One Time Passwords (OTPs) are an mechanism to improve security over passwords alone. When a Time-based OTP (TOTP) is stored on a user's phone, and combined with something the user knows (Password), you have an easy on-ramp to [Multi-factor authentication](http://en.wikipedia.org/wiki/Multi-factor_authentication) without adding a dependency on a SMS provider. This Password and TOTP combination is used by many popular websites including Google, Github, Facebook, Salesforce and many others. + +The `otp` library enables you to easily add TOTPs to your own application, increasing your user's security against mass-password breaches and malware. + +Because TOTP is standardized and widely deployed, there are many [mobile clients and software implementations](http://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm#Client_implementations). + +## `otp` Supports: + +* Generating QR Code images for easy user enrollment. +* Time-based One-time Password Algorithm (TOTP) (RFC 6238): Time based OTP, the most commonly used method. +* HMAC-based One-time Password Algorithm (HOTP) (RFC 4226): Counter based OTP, which TOTP is based upon. +* Generation and Validation of codes for either algorithm. + +## Implementing TOTP in your application: + +### User Enrollment + +For an example of a working enrollment work flow, [Github has documented theirs](https://help.github.com/articles/configuring-two-factor-authentication-via-a-totp-mobile-app/ +), but the basics are: + +1. Generate new TOTP Key for a User. `key,_ := totp.Generate(...)`. +1. Display the Key's Secret and QR-Code for the User. `key.Secret()` and `key.Image(...)`. +1. Test that the user can successfully use their TOTP. `totp.Validate(...)`. +1. Store TOTP Secret for the User in your backend. `key.Secret()` +1. Provide the user with "recovery codes". (See Recovery Codes bellow) + +### Code Generation + +* In either TOTP or HOTP cases, use the `GenerateCode` function and a counter or + `time.Time` struct to generate a valid code compatible with most implementations. +* For uncommon or custom settings, or to catch unlikely errors, use `GenerateCodeCustom` + in either module. + +### Validation + +1. Prompt and validate User's password as normal. +1. If the user has TOTP enabled, prompt for TOTP passcode. +1. Retrieve the User's TOTP Secret from your backend. +1. Validate the user's passcode. `totp.Validate(...)` + + +### Recovery Codes + +When a user loses access to their TOTP device, they would no longer have access to their account. Because TOTPs are often configured on mobile devices that can be lost, stolen or damaged, this is a common problem. For this reason many providers give their users "backup codes" or "recovery codes". These are a set of one time use codes that can be used instead of the TOTP. These can simply be randomly generated strings that you store in your backend. [Github's documentation provides an overview of the user experience]( +https://help.github.com/articles/downloading-your-two-factor-authentication-recovery-codes/). + + +## Improvements, bugs, adding feature, etc: + +Please [open issues in Github](https://github.com/pquerna/otp/issues) for ideas, bugs, and general thoughts. Pull requests are of course preferred :) + +## License + +`otp` is licensed under the [Apache License, Version 2.0](./LICENSE) diff --git a/vendor/github.com/pquerna/otp/doc.go b/vendor/github.com/pquerna/otp/doc.go new file mode 100644 index 00000000000..b8b4c8cc193 --- /dev/null +++ b/vendor/github.com/pquerna/otp/doc.go @@ -0,0 +1,70 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package otp implements both HOTP and TOTP based +// one time passcodes in a Google Authenticator compatible manner. +// +// When adding a TOTP for a user, you must store the "secret" value +// persistently. It is recommend to store the secret in an encrypted field in your +// datastore. Due to how TOTP works, it is not possible to store a hash +// for the secret value like you would a password. +// +// To enroll a user, you must first generate an OTP for them. Google +// Authenticator supports using a QR code as an enrollment method: +// +// import ( +// "github.com/pquerna/otp/totp" +// +// "bytes" +// "image/png" +// ) +// +// key, err := totp.Generate(totp.GenerateOpts{ +// Issuer: "Example.com", +// AccountName: "alice@example.com", +// }) +// +// // Convert TOTP key into a QR code encoded as a PNG image. +// var buf bytes.Buffer +// img, err := key.Image(200, 200) +// png.Encode(&buf, img) +// +// // display the QR code to the user. +// display(buf.Bytes()) +// +// // Now Validate that the user's successfully added the passcode. +// passcode := promptForPasscode() +// valid := totp.Validate(passcode, key.Secret()) +// +// if valid { +// // User successfully used their TOTP, save it to your backend! +// storeSecret("alice@example.com", key.Secret()) +// } +// +// Validating a TOTP passcode is very easy, just prompt the user for a passcode +// and retrieve the associated user's previously stored secret. +// import "github.com/pquerna/otp/totp" +// +// passcode := promptForPasscode() +// secret := getSecret("alice@example.com") +// +// valid := totp.Validate(passcode, secret) +// +// if valid { +// // Success! continue login process. +// } +package otp diff --git a/vendor/github.com/pquerna/otp/hotp/hotp.go b/vendor/github.com/pquerna/otp/hotp/hotp.go new file mode 100644 index 00000000000..bc123c63afe --- /dev/null +++ b/vendor/github.com/pquerna/otp/hotp/hotp.go @@ -0,0 +1,196 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package hotp + +import ( + "github.com/pquerna/otp" + + "crypto/hmac" + "crypto/rand" + "crypto/subtle" + "encoding/base32" + "encoding/binary" + "fmt" + "math" + "net/url" + "strings" +) + +const debug = false + +// Validate a HOTP passcode given a counter and secret. +// This is a shortcut for ValidateCustom, with parameters that +// are compataible with Google-Authenticator. +func Validate(passcode string, counter uint64, secret string) bool { + rv, _ := ValidateCustom( + passcode, + counter, + secret, + ValidateOpts{ + Digits: otp.DigitsSix, + Algorithm: otp.AlgorithmSHA1, + }, + ) + return rv +} + +// ValidateOpts provides options for ValidateCustom(). +type ValidateOpts struct { + // Digits as part of the input. Defaults to 6. + Digits otp.Digits + // Algorithm to use for HMAC. Defaults to SHA1. + Algorithm otp.Algorithm +} + +// GenerateCode creates a HOTP passcode given a counter and secret. +// This is a shortcut for GenerateCodeCustom, with parameters that +// are compataible with Google-Authenticator. +func GenerateCode(secret string, counter uint64) (string, error) { + return GenerateCodeCustom(secret, counter, ValidateOpts{ + Digits: otp.DigitsSix, + Algorithm: otp.AlgorithmSHA1, + }) +} + +// GenerateCodeCustom uses a counter and secret value and options struct to +// create a passcode. +func GenerateCodeCustom(secret string, counter uint64, opts ValidateOpts) (passcode string, err error) { + // As noted in issue #10 and #17 this adds support for TOTP secrets that are + // missing their padding. + secret = strings.TrimSpace(secret) + if n := len(secret) % 8; n != 0 { + secret = secret + strings.Repeat("=", 8-n) + } + + // As noted in issue #24 Google has started producing base32 in lower case, + // but the StdEncoding (and the RFC), expect a dictionary of only upper case letters. + secret = strings.ToUpper(secret) + + secretBytes, err := base32.StdEncoding.DecodeString(secret) + if err != nil { + return "", otp.ErrValidateSecretInvalidBase32 + } + + buf := make([]byte, 8) + mac := hmac.New(opts.Algorithm.Hash, secretBytes) + binary.BigEndian.PutUint64(buf, counter) + if debug { + fmt.Printf("counter=%v\n", counter) + fmt.Printf("buf=%v\n", buf) + } + + mac.Write(buf) + sum := mac.Sum(nil) + + // "Dynamic truncation" in RFC 4226 + // http://tools.ietf.org/html/rfc4226#section-5.4 + offset := sum[len(sum)-1] & 0xf + value := int64(((int(sum[offset]) & 0x7f) << 24) | + ((int(sum[offset+1] & 0xff)) << 16) | + ((int(sum[offset+2] & 0xff)) << 8) | + (int(sum[offset+3]) & 0xff)) + + l := opts.Digits.Length() + mod := int32(value % int64(math.Pow10(l))) + + if debug { + fmt.Printf("offset=%v\n", offset) + fmt.Printf("value=%v\n", value) + fmt.Printf("mod'ed=%v\n", mod) + } + + return opts.Digits.Format(mod), nil +} + +// ValidateCustom validates an HOTP with customizable options. Most users should +// use Validate(). +func ValidateCustom(passcode string, counter uint64, secret string, opts ValidateOpts) (bool, error) { + passcode = strings.TrimSpace(passcode) + + if len(passcode) != opts.Digits.Length() { + return false, otp.ErrValidateInputInvalidLength + } + + otpstr, err := GenerateCodeCustom(secret, counter, opts) + if err != nil { + return false, err + } + + if subtle.ConstantTimeCompare([]byte(otpstr), []byte(passcode)) == 1 { + return true, nil + } + + return false, nil +} + +// GenerateOpts provides options for .Generate() +type GenerateOpts struct { + // Name of the issuing Organization/Company. + Issuer string + // Name of the User's Account (eg, email address) + AccountName string + // Size in size of the generated Secret. Defaults to 10 bytes. + SecretSize uint + // Digits to request. Defaults to 6. + Digits otp.Digits + // Algorithm to use for HMAC. Defaults to SHA1. + Algorithm otp.Algorithm +} + +// Generate creates a new HOTP Key. +func Generate(opts GenerateOpts) (*otp.Key, error) { + // url encode the Issuer/AccountName + if opts.Issuer == "" { + return nil, otp.ErrGenerateMissingIssuer + } + + if opts.AccountName == "" { + return nil, otp.ErrGenerateMissingAccountName + } + + if opts.SecretSize == 0 { + opts.SecretSize = 10 + } + + if opts.Digits == 0 { + opts.Digits = otp.DigitsSix + } + + // otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example + + v := url.Values{} + secret := make([]byte, opts.SecretSize) + _, err := rand.Read(secret) + if err != nil { + return nil, err + } + + v.Set("secret", strings.TrimRight(base32.StdEncoding.EncodeToString(secret), "=")) + v.Set("issuer", opts.Issuer) + v.Set("algorithm", opts.Algorithm.String()) + v.Set("digits", opts.Digits.String()) + + u := url.URL{ + Scheme: "otpauth", + Host: "hotp", + Path: "/" + opts.Issuer + ":" + opts.AccountName, + RawQuery: v.Encode(), + } + + return otp.NewKeyFromURL(u.String()) +} diff --git a/vendor/github.com/pquerna/otp/otp.go b/vendor/github.com/pquerna/otp/otp.go new file mode 100644 index 00000000000..5db93029cee --- /dev/null +++ b/vendor/github.com/pquerna/otp/otp.go @@ -0,0 +1,207 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package otp + +import ( + "github.com/boombuler/barcode" + "github.com/boombuler/barcode/qr" + + "crypto/md5" + "crypto/sha1" + "crypto/sha256" + "crypto/sha512" + "errors" + "fmt" + "hash" + "image" + "net/url" + "strings" +) + +// Error when attempting to convert the secret from base32 to raw bytes. +var ErrValidateSecretInvalidBase32 = errors.New("Decoding of secret as base32 failed.") + +// The user provided passcode length was not expected. +var ErrValidateInputInvalidLength = errors.New("Input length unexpected") + +// When generating a Key, the Issuer must be set. +var ErrGenerateMissingIssuer = errors.New("Issuer must be set") + +// When generating a Key, the Account Name must be set. +var ErrGenerateMissingAccountName = errors.New("AccountName must be set") + +// Key represents an TOTP or HTOP key. +type Key struct { + orig string + url *url.URL +} + +// NewKeyFromURL creates a new Key from an TOTP or HOTP url. +// +// The URL format is documented here: +// https://github.com/google/google-authenticator/wiki/Key-Uri-Format +// +func NewKeyFromURL(orig string) (*Key, error) { + s := strings.TrimSpace(orig) + + u, err := url.Parse(s) + + if err != nil { + return nil, err + } + + return &Key{ + orig: s, + url: u, + }, nil +} + +func (k *Key) String() string { + return k.orig +} + +// Image returns an QR-Code image of the specified width and height, +// suitable for use by many clients like Google-Authenricator +// to enroll a user's TOTP/HOTP key. +func (k *Key) Image(width int, height int) (image.Image, error) { + b, err := qr.Encode(k.orig, qr.M, qr.Auto) + + if err != nil { + return nil, err + } + + b, err = barcode.Scale(b, width, height) + + if err != nil { + return nil, err + } + + return b, nil +} + +// Type returns "hotp" or "totp". +func (k *Key) Type() string { + return k.url.Host +} + +// Issuer returns the name of the issuing organization. +func (k *Key) Issuer() string { + q := k.url.Query() + + issuer := q.Get("issuer") + + if issuer != "" { + return issuer + } + + p := strings.TrimPrefix(k.url.Path, "/") + i := strings.Index(p, ":") + + if i == -1 { + return "" + } + + return p[:i] +} + +// AccountName returns the name of the user's account. +func (k *Key) AccountName() string { + p := strings.TrimPrefix(k.url.Path, "/") + i := strings.Index(p, ":") + + if i == -1 { + return p + } + + return p[i+1:] +} + +// Secret returns the opaque secret for this Key. +func (k *Key) Secret() string { + q := k.url.Query() + + return q.Get("secret") +} + +// URL returns the OTP URL as a string +func (k *Key) URL() string { + return k.url.String() +} + +// Algorithm represents the hashing function to use in the HMAC +// operation needed for OTPs. +type Algorithm int + +const ( + AlgorithmSHA1 Algorithm = iota + AlgorithmSHA256 + AlgorithmSHA512 + AlgorithmMD5 +) + +func (a Algorithm) String() string { + switch a { + case AlgorithmSHA1: + return "SHA1" + case AlgorithmSHA256: + return "SHA256" + case AlgorithmSHA512: + return "SHA512" + case AlgorithmMD5: + return "MD5" + } + panic("unreached") +} + +func (a Algorithm) Hash() hash.Hash { + switch a { + case AlgorithmSHA1: + return sha1.New() + case AlgorithmSHA256: + return sha256.New() + case AlgorithmSHA512: + return sha512.New() + case AlgorithmMD5: + return md5.New() + } + panic("unreached") +} + +// Digits represents the number of digits present in the +// user's OTP passcode. Six and Eight are the most common values. +type Digits int + +const ( + DigitsSix Digits = 6 + DigitsEight Digits = 8 +) + +// Format converts an integer into the zero-filled size for this Digits. +func (d Digits) Format(in int32) string { + f := fmt.Sprintf("%%0%dd", d) + return fmt.Sprintf(f, in) +} + +// Length returns the number of characters for this Digits. +func (d Digits) Length() int { + return int(d) +} + +func (d Digits) String() string { + return fmt.Sprintf("%d", d) +} diff --git a/vendor/github.com/pquerna/otp/totp/totp.go b/vendor/github.com/pquerna/otp/totp/totp.go new file mode 100644 index 00000000000..60532d6197b --- /dev/null +++ b/vendor/github.com/pquerna/otp/totp/totp.go @@ -0,0 +1,193 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package totp + +import ( + "strings" + + "github.com/pquerna/otp" + "github.com/pquerna/otp/hotp" + + "crypto/rand" + "encoding/base32" + "math" + "net/url" + "strconv" + "time" +) + +// Validate a TOTP using the current time. +// A shortcut for ValidateCustom, Validate uses a configuration +// that is compatible with Google-Authenticator and most clients. +func Validate(passcode string, secret string) bool { + rv, _ := ValidateCustom( + passcode, + secret, + time.Now().UTC(), + ValidateOpts{ + Period: 30, + Skew: 1, + Digits: otp.DigitsSix, + Algorithm: otp.AlgorithmSHA1, + }, + ) + return rv +} + +// GenerateCode creates a TOTP token using the current time. +// A shortcut for GenerateCodeCustom, GenerateCode uses a configuration +// that is compatible with Google-Authenticator and most clients. +func GenerateCode(secret string, t time.Time) (string, error) { + return GenerateCodeCustom(secret, t, ValidateOpts{ + Period: 30, + Skew: 1, + Digits: otp.DigitsSix, + Algorithm: otp.AlgorithmSHA1, + }) +} + +// ValidateOpts provides options for ValidateCustom(). +type ValidateOpts struct { + // Number of seconds a TOTP hash is valid for. Defaults to 30 seconds. + Period uint + // Periods before or after the current time to allow. Value of 1 allows up to Period + // of either side of the specified time. Defaults to 0 allowed skews. Values greater + // than 1 are likely sketchy. + Skew uint + // Digits as part of the input. Defaults to 6. + Digits otp.Digits + // Algorithm to use for HMAC. Defaults to SHA1. + Algorithm otp.Algorithm +} + +// GenerateCodeCustom takes a timepoint and produces a passcode using a +// secret and the provided opts. (Under the hood, this is making an adapted +// call to hotp.GenerateCodeCustom) +func GenerateCodeCustom(secret string, t time.Time, opts ValidateOpts) (passcode string, err error) { + if opts.Period == 0 { + opts.Period = 30 + } + counter := uint64(math.Floor(float64(t.Unix()) / float64(opts.Period))) + passcode, err = hotp.GenerateCodeCustom(secret, counter, hotp.ValidateOpts{ + Digits: opts.Digits, + Algorithm: opts.Algorithm, + }) + if err != nil { + return "", err + } + return passcode, nil +} + +// ValidateCustom validates a TOTP given a user specified time and custom options. +// Most users should use Validate() to provide an interpolatable TOTP experience. +func ValidateCustom(passcode string, secret string, t time.Time, opts ValidateOpts) (bool, error) { + if opts.Period == 0 { + opts.Period = 30 + } + + counters := []uint64{} + counter := int64(math.Floor(float64(t.Unix()) / float64(opts.Period))) + + counters = append(counters, uint64(counter)) + for i := 1; i <= int(opts.Skew); i++ { + counters = append(counters, uint64(counter+int64(i))) + counters = append(counters, uint64(counter-int64(i))) + } + + for _, counter := range counters { + rv, err := hotp.ValidateCustom(passcode, counter, secret, hotp.ValidateOpts{ + Digits: opts.Digits, + Algorithm: opts.Algorithm, + }) + + if err != nil { + return false, err + } + + if rv == true { + return true, nil + } + } + + return false, nil +} + +// GenerateOpts provides options for Generate(). The default values +// are compatible with Google-Authenticator. +type GenerateOpts struct { + // Name of the issuing Organization/Company. + Issuer string + // Name of the User's Account (eg, email address) + AccountName string + // Number of seconds a TOTP hash is valid for. Defaults to 30 seconds. + Period uint + // Size in size of the generated Secret. Defaults to 20 bytes. + SecretSize uint + // Digits to request. Defaults to 6. + Digits otp.Digits + // Algorithm to use for HMAC. Defaults to SHA1. + Algorithm otp.Algorithm +} + +// Generate a new TOTP Key. +func Generate(opts GenerateOpts) (*otp.Key, error) { + // url encode the Issuer/AccountName + if opts.Issuer == "" { + return nil, otp.ErrGenerateMissingIssuer + } + + if opts.AccountName == "" { + return nil, otp.ErrGenerateMissingAccountName + } + + if opts.Period == 0 { + opts.Period = 30 + } + + if opts.SecretSize == 0 { + opts.SecretSize = 20 + } + + if opts.Digits == 0 { + opts.Digits = otp.DigitsSix + } + + // otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example + + v := url.Values{} + secret := make([]byte, opts.SecretSize) + _, err := rand.Read(secret) + if err != nil { + return nil, err + } + + v.Set("secret", strings.TrimRight(base32.StdEncoding.EncodeToString(secret), "=")) + v.Set("issuer", opts.Issuer) + v.Set("period", strconv.FormatUint(uint64(opts.Period), 10)) + v.Set("algorithm", opts.Algorithm.String()) + v.Set("digits", opts.Digits.String()) + + u := url.URL{ + Scheme: "otpauth", + Host: "totp", + Path: "/" + opts.Issuer + ":" + opts.AccountName, + RawQuery: v.Encode(), + } + + return otp.NewKeyFromURL(u.String()) +} diff --git a/vendor/vendor.json b/vendor/vendor.json index ce33942b468..56770df1f1d 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1124,6 +1124,24 @@ "version": "v3.5.1", "versionExact": "v3.5.1" }, + { + "checksumSHA1": "X/ezkFEECpsC9T8wf1m6jbJo3A4=", + "path": "github.com/boombuler/barcode", + "revision": "34fff276c74eba9c3506f0c6f4064dbaa67d8da3", + "revisionTime": "2018-08-09T05:23:37Z" + }, + { + "checksumSHA1": "jWsoIeAcg4+QlCJLZ8jXHiJ5a3s=", + "path": "github.com/boombuler/barcode/qr", + "revision": "34fff276c74eba9c3506f0c6f4064dbaa67d8da3", + "revisionTime": "2018-08-09T05:23:37Z" + }, + { + "checksumSHA1": "axe0OTdOjYa+XKDUYqzOv7FGaWo=", + "path": "github.com/boombuler/barcode/utils", + "revision": "34fff276c74eba9c3506f0c6f4064dbaa67d8da3", + "revisionTime": "2018-08-09T05:23:37Z" + }, { "checksumSHA1": "CSPbwbyzqA6sfORicn4HFtIhF/c=", "path": "github.com/davecgh/go-spew/spew", @@ -1815,6 +1833,24 @@ "revision": "f4461a52b6329c11190f11fe3384ec8aa964e21c", "revisionTime": "2017-07-30T19:30:24Z" }, + { + "checksumSHA1": "vCogt04lbcE8fUgvRCOaZQUo+Pk=", + "path": "github.com/pquerna/otp", + "revision": "be78767b3e392ce45ea73444451022a6fc32ad0d", + "revisionTime": "2018-08-13T14:46:49Z" + }, + { + "checksumSHA1": "Rpx/4T1X/tZgHG56AJ6G8nPk7Gw=", + "path": "github.com/pquerna/otp/hotp", + "revision": "be78767b3e392ce45ea73444451022a6fc32ad0d", + "revisionTime": "2018-08-13T14:46:49Z" + }, + { + "checksumSHA1": "OvSOUZb554+cPpvBOK4kEjv2ZpE=", + "path": "github.com/pquerna/otp/totp", + "revision": "be78767b3e392ce45ea73444451022a6fc32ad0d", + "revisionTime": "2018-08-13T14:46:49Z" + }, { "checksumSHA1": "EUR26b2t3XDPxiEMwDBtn8Ajp8A=", "path": "github.com/terraform-providers/terraform-provider-template/template", From 8b55c6cb8b6f26e8a15018a721b159c0424127a0 Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 6 Nov 2018 11:03:47 +0100 Subject: [PATCH 3164/3316] Update acmpca_certificate_authority.html.markdown Usage of wrong attribute of aws_s3_bucket --- website/docs/r/acmpca_certificate_authority.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/acmpca_certificate_authority.html.markdown b/website/docs/r/acmpca_certificate_authority.html.markdown index 36632e055cf..cd268a2b953 100644 --- a/website/docs/r/acmpca_certificate_authority.html.markdown +++ b/website/docs/r/acmpca_certificate_authority.html.markdown @@ -77,7 +77,7 @@ resource "aws_acmpca_certificate_authority" "example" { custom_cname = "crl.example.com" enabled = true expiration_in_days = 7 - s3_bucket_name = "${aws_s3_bucket.example.name}" + s3_bucket_name = "${aws_s3_bucket.example.id}" } } From b10f0748e42e09a693ce2862dc3ad640cdf2a3ec Mon Sep 17 00:00:00 2001 From: Fabian Breckle Date: Tue, 6 Nov 2018 11:22:34 +0100 Subject: [PATCH 3165/3316] Fix diffTags to actually create a diff instead of unnecessarily recreating existing tags. --- aws/tags.go | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/aws/tags.go b/aws/tags.go index b2293ba9e17..852fa0f3155 100644 --- a/aws/tags.go +++ b/aws/tags.go @@ -187,22 +187,47 @@ func setTags(conn *ec2.EC2, d *schema.ResourceData) error { // the set of tags that must be created, and the set of tags that must // be destroyed. func diffTags(oldTags, newTags []*ec2.Tag) ([]*ec2.Tag, []*ec2.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value + oldTagsMap := tagsToMap(oldTags) + newTagsMap := tagsToMap(newTags) + + // These maps will hold the Tags to create and remove, respectively + var create = make(map[string]interface{}) + var remove = make(map[string]interface{}) + + // For each new Tag, we check if an identical Tag (in key and value) already exists. + // If yes, we don't have to do anything with this Tag. + // Else, if the key was found with a different value, remove it and recreate it with the new value + // If the key was not found in the in the old Tags, just create it. + // Then, if one of the old Tags is no longer in the new Tags, delete the old Tag. + for key, newval := range newTagsMap { + oldval, found := oldTagsMap[key] + if found { + // New key exists in the old Tags already + // Check if the value is the same, too + if newval != oldval { + // If not, recreate the Tag with the new value + remove[key] = oldval + create[key] = newval + } else { + // If the key and value are the same, ignore the Tag + } + } else { + // If new Tag key is not in old Tags, create the new Tag + create[key] = newval + } } - // Build the list of what to remove - var remove []*ec2.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - remove = append(remove, t) + // Now we handled the new Tags and the Tags that need to be updated + // We still have to handle the Tags that have to be deleted + for key, oldval := range oldTagsMap { + _, found := newTagsMap[key] + // Delete old Tag if it is not found in the new Tags + if !found { + remove[key] = oldval } } - return tagsFromMap(create), remove + return tagsFromMap(create), tagsFromMap(remove) } // tagsFromMap returns the tags for the given map of data. From c558397226b1e4185191cc02a9c5fe575a34f583 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 6 Nov 2018 10:59:52 -0500 Subject: [PATCH 3166/3316] service/efs: Add File System ARN attributes Changes: * data-source/aws_efs_file_system: Add `arn` attribute * data-source/aws_efs_mount_target: Add `file_system_arn` attribute * resource/aws_efs_file_system: Add `arn` attribute * resource/aws_efs_mount_target: Add `file_system_arn` attribute Output from acceptance testing: ``` --- PASS: TestAccDataSourceAwsEfsFileSystem (23.38s) --- PASS: TestAccAWSEFSFileSystem_basic (47.76s) --- PASS: TestAccDataSourceAwsEfsMountTargetByMountTargetId (220.04s) --- PASS: TestAccAWSEFSMountTarget_basic (399.10s) ``` --- aws/data_source_aws_efs_file_system.go | 15 +++++++++++++++ aws/data_source_aws_efs_file_system_test.go | 1 + aws/data_source_aws_efs_mount_target.go | 16 +++++++++++++++- aws/data_source_aws_efs_mount_target_test.go | 1 + aws/resource_aws_efs_file_system.go | 14 ++++++++++++++ aws/resource_aws_efs_file_system_test.go | 1 + aws/resource_aws_efs_mount_target.go | 15 +++++++++++++++ aws/resource_aws_efs_mount_target_test.go | 1 + website/docs/d/efs_file_system.html.markdown | 1 + website/docs/d/efs_mount_target.html.markdown | 1 + website/docs/index.html.markdown | 4 ++++ website/docs/r/efs_file_system.html.markdown | 1 + website/docs/r/efs_mount_target.html.markdown | 1 + 13 files changed, 71 insertions(+), 1 deletion(-) diff --git a/aws/data_source_aws_efs_file_system.go b/aws/data_source_aws_efs_file_system.go index 7665c12e954..9f35dab93a7 100644 --- a/aws/data_source_aws_efs_file_system.go +++ b/aws/data_source_aws_efs_file_system.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/efs" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -15,6 +16,10 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { Read: dataSourceAwsEfsFileSystemRead, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "creation_token": { Type: schema.TypeString, Optional: true, @@ -120,6 +125,16 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er d.Set("creation_token", fs.CreationToken) d.Set("performance_mode", fs.PerformanceMode) + + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(fs.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("arn", fsARN) d.Set("file_system_id", fs.FileSystemId) d.Set("encrypted", fs.Encrypted) d.Set("kms_key_id", fs.KmsKeyId) diff --git a/aws/data_source_aws_efs_file_system_test.go b/aws/data_source_aws_efs_file_system_test.go index fc28034bf10..3545ac99ae6 100644 --- a/aws/data_source_aws_efs_file_system_test.go +++ b/aws/data_source_aws_efs_file_system_test.go @@ -17,6 +17,7 @@ func TestAccDataSourceAwsEfsFileSystem(t *testing.T) { { Config: testAccDataSourceAwsEfsFileSystemConfig, Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair("data.aws_efs_file_system.by_id", "arn", "aws_efs_file_system.test", "arn"), testAccDataSourceAwsEfsFileSystemCheck("data.aws_efs_file_system.by_creation_token"), testAccDataSourceAwsEfsFileSystemCheck("data.aws_efs_file_system.by_id"), resource.TestMatchResourceAttr("data.aws_efs_file_system.by_creation_token", "dns_name", regexp.MustCompile("^[^.]+.efs.([a-z]{2}-(gov-)?[a-z]+-\\d{1})?.amazonaws.com$")), diff --git a/aws/data_source_aws_efs_mount_target.go b/aws/data_source_aws_efs_mount_target.go index 21d40f1285b..88e4dcf8828 100644 --- a/aws/data_source_aws_efs_mount_target.go +++ b/aws/data_source_aws_efs_mount_target.go @@ -5,6 +5,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/efs" "github.com/hashicorp/terraform/helper/schema" ) @@ -19,7 +20,10 @@ func dataSourceAwsEfsMountTarget() *schema.Resource { Required: true, ForceNew: true, }, - + "file_system_arn": { + Type: schema.TypeString, + Computed: true, + }, "file_system_id": { Type: schema.TypeString, Computed: true, @@ -71,6 +75,16 @@ func dataSourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Found EFS mount target: %#v", mt) d.SetId(*mt.MountTargetId) + + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(mt.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("file_system_arn", fsARN) d.Set("file_system_id", mt.FileSystemId) d.Set("ip_address", mt.IpAddress) d.Set("subnet_id", mt.SubnetId) diff --git a/aws/data_source_aws_efs_mount_target_test.go b/aws/data_source_aws_efs_mount_target_test.go index 9227c381550..109b335fd1f 100644 --- a/aws/data_source_aws_efs_mount_target_test.go +++ b/aws/data_source_aws_efs_mount_target_test.go @@ -17,6 +17,7 @@ func TestAccDataSourceAwsEfsMountTargetByMountTargetId(t *testing.T) { { Config: testAccAwsEfsMountTargetConfigByMountTargetId(rName), Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair("data.aws_efs_mount_target.by_mount_target_id", "file_system_arn", "aws_efs_mount_target.alpha", "file_system_arn"), resource.TestCheckResourceAttrSet("data.aws_efs_mount_target.by_mount_target_id", "file_system_id"), resource.TestCheckResourceAttrSet("data.aws_efs_mount_target.by_mount_target_id", "ip_address"), resource.TestCheckResourceAttrSet("data.aws_efs_mount_target.by_mount_target_id", "subnet_id"), diff --git a/aws/resource_aws_efs_file_system.go b/aws/resource_aws_efs_file_system.go index 2caf27e1c50..4e06fe6e598 100644 --- a/aws/resource_aws_efs_file_system.go +++ b/aws/resource_aws_efs_file_system.go @@ -7,6 +7,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/efs" "github.com/hashicorp/terraform/helper/resource" @@ -26,6 +27,10 @@ func resourceAwsEfsFileSystem() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "creation_token": { Type: schema.TypeString, Optional: true, @@ -279,6 +284,15 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro return nil } + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(fs.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("arn", fsARN) d.Set("creation_token", fs.CreationToken) d.Set("encrypted", fs.Encrypted) d.Set("kms_key_id", fs.KmsKeyId) diff --git a/aws/resource_aws_efs_file_system_test.go b/aws/resource_aws_efs_file_system_test.go index b693d12feab..24245a7f3f5 100644 --- a/aws/resource_aws_efs_file_system_test.go +++ b/aws/resource_aws_efs_file_system_test.go @@ -87,6 +87,7 @@ func TestAccAWSEFSFileSystem_basic(t *testing.T) { { Config: testAccAWSEFSFileSystemConfig, Check: resource.ComposeTestCheckFunc( + testAccMatchResourceAttrRegionalARN("aws_efs_file_system.foo", "arn", "elasticfilesystem", regexp.MustCompile(`file-system/fs-.+`)), resource.TestCheckResourceAttr( "aws_efs_file_system.foo", "performance_mode", diff --git a/aws/resource_aws_efs_mount_target.go b/aws/resource_aws_efs_mount_target.go index fe1d87bf18d..ee1d8e0cb7f 100644 --- a/aws/resource_aws_efs_mount_target.go +++ b/aws/resource_aws_efs_mount_target.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/efs" @@ -25,6 +26,10 @@ func resourceAwsEfsMountTarget() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "file_system_arn": { + Type: schema.TypeString, + Computed: true, + }, "file_system_id": { Type: schema.TypeString, Required: true, @@ -182,6 +187,16 @@ func resourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) err log.Printf("[DEBUG] Found EFS mount target: %#v", mt) d.SetId(*mt.MountTargetId) + + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(mt.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("file_system_arn", fsARN) d.Set("file_system_id", mt.FileSystemId) d.Set("ip_address", mt.IpAddress) d.Set("subnet_id", mt.SubnetId) diff --git a/aws/resource_aws_efs_mount_target_test.go b/aws/resource_aws_efs_mount_target_test.go index 9b2a4d55375..fd1c79c84d2 100644 --- a/aws/resource_aws_efs_mount_target_test.go +++ b/aws/resource_aws_efs_mount_target_test.go @@ -49,6 +49,7 @@ func TestAccAWSEFSMountTarget_basic(t *testing.T) { { Config: testAccAWSEFSMountTargetConfig(ct), Check: resource.ComposeTestCheckFunc( + testAccMatchResourceAttrRegionalARN("aws_efs_mount_target.alpha", "file_system_arn", "elasticfilesystem", regexp.MustCompile(`file-system/fs-.+`)), testAccCheckEfsMountTarget( "aws_efs_mount_target.alpha", &mount, diff --git a/website/docs/d/efs_file_system.html.markdown b/website/docs/d/efs_file_system.html.markdown index 80c5510ad24..07dca5d6606 100644 --- a/website/docs/d/efs_file_system.html.markdown +++ b/website/docs/d/efs_file_system.html.markdown @@ -34,6 +34,7 @@ The following arguments are supported: In addition to all arguments above, the following attributes are exported: +* `arn` - Amazon Resource Name of the file system. * `performance_mode` - The PerformanceMode of the file system. * `tags` - The list of tags assigned to the file system. * `encrypted` - Whether EFS is encrypted. diff --git a/website/docs/d/efs_mount_target.html.markdown b/website/docs/d/efs_mount_target.html.markdown index 9dceb195527..5def4af6cab 100644 --- a/website/docs/d/efs_mount_target.html.markdown +++ b/website/docs/d/efs_mount_target.html.markdown @@ -33,6 +33,7 @@ The following arguments are supported: In addition to all arguments above, the following attributes are exported: +* `file_system_arn` - Amazon Resource Name of the file system for which the mount target is intended. * `file_system_id` - ID of the file system for which the mount target is intended. * `subnet_id` - ID of the mount target's subnet. * `ip_address` - Address at which the file system may be mounted via the mount target. diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 438d805358d..fd4528b2775 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -231,6 +231,10 @@ In addition to [generic `provider` arguments](https://www.terraform.io/docs/conf - [`aws_ebs_volume` data source](/docs/providers/aws/d/ebs_volume.html) - [`aws_ecs_cluster` resource (import)](/docs/providers/aws/r/ecs_cluster.html) - [`aws_ecs_service` resource (import)](/docs/providers/aws/r/ecs_service.html) + - [`aws_efs_file_system` data source](/docs/providers/aws/d/efs_file_system.html) + - [`aws_efs_file_system` resource](/docs/providers/aws/r/efs_file_system.html) + - [`aws_efs_mount_target` data source](/docs/providers/aws/d/efs_mount_target.html) + - [`aws_efs_mount_target` resource](/docs/providers/aws/r/efs_mount_target.html) - [`aws_elasticache_cluster` data source](/docs/providers/aws/d/elasticache_cluster.html) - [`aws_elasticache_cluster` resource](/docs/providers/aws/r/elasticache_cluster.html) - [`aws_elb` resource](/docs/providers/aws/r/elb.html) diff --git a/website/docs/r/efs_file_system.html.markdown b/website/docs/r/efs_file_system.html.markdown index 99c2dd79d04..de119bdcff9 100644 --- a/website/docs/r/efs_file_system.html.markdown +++ b/website/docs/r/efs_file_system.html.markdown @@ -47,6 +47,7 @@ default generated by Terraform. In addition to all arguments above, the following attributes are exported: +* `arn` - Amazon Resource Name of the file system. * `id` - The ID that identifies the file system (e.g. fs-ccfc0d65). * `dns_name` - The DNS name for the filesystem per [documented convention](http://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html). diff --git a/website/docs/r/efs_mount_target.html.markdown b/website/docs/r/efs_mount_target.html.markdown index ae7a17c0f0a..6f32914311f 100644 --- a/website/docs/r/efs_mount_target.html.markdown +++ b/website/docs/r/efs_mount_target.html.markdown @@ -50,6 +50,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the mount target. * `dns_name` - The DNS name for the given subnet/AZ per [documented convention](http://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html). +* `file_system_arn` - Amazon Resource Name of the file system. * `network_interface_id` - The ID of the network interface that Amazon EFS created when it created the mount target. ## Import From dc45f77438c0d96505860cbcf83eefa959843680 Mon Sep 17 00:00:00 2001 From: Tracy Holmes Date: Tue, 6 Nov 2018 12:00:56 -0600 Subject: [PATCH 3167/3316] fixed fmt errors --- website/docs/d/kms_secrets.html.markdown | 4 +- website/docs/d/vpcs.html.markdown | 6 ++- website/docs/index.html.markdown | 2 +- .../r/api_gateway_usage_plan.html.markdown | 2 +- .../api_gateway_usage_plan_key.html.markdown | 2 +- website/docs/r/budgets_budget.html.markdown | 11 +++-- website/docs/r/emr_cluster.html.markdown | 21 +++------- .../r/iam_user_policy_attachment.markdown | 7 ++-- .../docs/r/s3_bucket_inventory.html.markdown | 1 + .../r/ssm_resource_data_sync.html.markdown | 1 + ...oint_route_table_association.html.markdown | 41 ------------------- website/docs/r/vpc_peering.html.markdown | 2 +- 12 files changed, 25 insertions(+), 75 deletions(-) diff --git a/website/docs/d/kms_secrets.html.markdown b/website/docs/d/kms_secrets.html.markdown index 5ba5d5f9f9d..e7fca3ee630 100644 --- a/website/docs/d/kms_secrets.html.markdown +++ b/website/docs/d/kms_secrets.html.markdown @@ -41,9 +41,7 @@ data "aws_kms_secrets" "example" { secret { # ... potentially other configuration ... name = "master_username" - payload = "AQECAHgaPa0J8WadplGCqqVAr4HNvDaFSQ+NaiwIBhmm6qDSFwAAAGIwYAYJKoZI - hvcNAQcGoFMwUQIBADBMBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDI+LoLdvYv8l41OhAAIBEIAf - x49FFJCLeYrkfMfAw6XlnxP23MmDBdqP8dPp28OoAQ==" + payload =  "AQECAHgaPa0J8WadplGCqqVAr4HNvDaFSQNaiwIBhmm6qDSFwAAAGIwYAYJKoZIhvcNAQcGoFMwUQIBADBMBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDILoLdvYv8l41OhAAIBEIAfx49FFJCLeYrkfMfAw6XlnxP23MmDBdqP8dPp28OoAQ==" } } diff --git a/website/docs/d/vpcs.html.markdown b/website/docs/d/vpcs.html.markdown index 6fea8e3c47f..0beeecd2144 100644 --- a/website/docs/d/vpcs.html.markdown +++ b/website/docs/d/vpcs.html.markdown @@ -35,9 +35,11 @@ data "aws_vpcs" "foo" {} resource "aws_flow_log" "test_flow_log" { count = "${length(data.aws_vpcs.foo.ids)}" - ... + + # ... vpc_id = "${element(data.aws_vpcs.foo.ids, count.index)}" - ... + + # ... } output "foo" { diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 438d805358d..773043c34b4 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -72,7 +72,7 @@ provider "aws" {} Usage: -```hcl +``` $ export AWS_ACCESS_KEY_ID="anaccesskey" $ export AWS_SECRET_ACCESS_KEY="asecretkey" $ export AWS_DEFAULT_REGION="us-west-2" diff --git a/website/docs/r/api_gateway_usage_plan.html.markdown b/website/docs/r/api_gateway_usage_plan.html.markdown index 96565b182ff..afe338d0a50 100644 --- a/website/docs/r/api_gateway_usage_plan.html.markdown +++ b/website/docs/r/api_gateway_usage_plan.html.markdown @@ -17,7 +17,7 @@ resource "aws_api_gateway_rest_api" "myapi" { name = "MyDemoAPI" } -... +# ... resource "aws_api_gateway_deployment" "dev" { rest_api_id = "${aws_api_gateway_rest_api.myapi.id}" diff --git a/website/docs/r/api_gateway_usage_plan_key.html.markdown b/website/docs/r/api_gateway_usage_plan_key.html.markdown index 8aa05f59784..355f55d3212 100644 --- a/website/docs/r/api_gateway_usage_plan_key.html.markdown +++ b/website/docs/r/api_gateway_usage_plan_key.html.markdown @@ -17,7 +17,7 @@ resource "aws_api_gateway_rest_api" "test" { name = "MyDemoAPI" } -... +# ... resource "aws_api_gateway_usage_plan" "myusageplan" { name = "my_usage_plan" diff --git a/website/docs/r/budgets_budget.html.markdown b/website/docs/r/budgets_budget.html.markdown index 0dbf7512f60..e89488bc526 100644 --- a/website/docs/r/budgets_budget.html.markdown +++ b/website/docs/r/budgets_budget.html.markdown @@ -32,7 +32,7 @@ Create a budget for *$100*. ```hcl resource "aws_budgets_budget" "cost" { - ... + # ... budget_type = "COST" limit_amount = "100" limit_unit = "USD" @@ -43,7 +43,7 @@ Create a budget for s3 with a limit of *3 GB* of storage. ```hcl resource "aws_budgets_budget" "s3" { - ... + # ... budget_type = "USAGE" limit_amount = "3" limit_unit = "GB" @@ -64,7 +64,7 @@ The following arguments are supported: * `cost_filters` - (Optional) Map of [CostFilters](#CostFilters) key/value pairs to apply to the budget. * `cost_types` - (Optional) Object containing [CostTypes](#CostTypes) The types of cost included in a budget, such as tax and subscriptions.. * `limit_amount` - (Required) The amount of cost or usage being measured for a budget. -* `limit_unit` - (Required) The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend ](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation. +* `limit_unit` - (Required) The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation. * `time_period_end` - (Optional) The end of the time period covered by the budget. There are no restrictions on the end date. Format: `2017-01-01_12:00`. * `time_period_start` - (Required) The start of the time period covered by the budget. The start date must come before the end date. Format: `2017-01-01_12:00`. * `time_unit` - (Required) The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`. @@ -75,14 +75,13 @@ In addition to all arguments above, the following attributes are exported: * `id` - id of resource. - ### CostTypes Valid keys for `cost_types` parameter. -* `include_credit` - A boolean value whether to include credits in the cost budget. Defaults to `true` +* `include_credit` - A boolean value whether to include credits in the cost budget. Defaults to `true` * `include_discount` - Specifies whether a budget includes discounts. Defaults to `true` -* `include_other_subscription` - A boolean value whether to include other subscription costs in the cost budget. Defaults to `true` +* `include_other_subscription` - A boolean value whether to include other subscription costs in the cost budget. Defaults to `true` * `include_recurring` - A boolean value whether to include recurring costs in the cost budget. Defaults to `true` * `include_refund` - A boolean value whether to include refunds in the cost budget. Defaults to `true` * `include_subscription` - A boolean value whether to include subscriptions in the cost budget. Defaults to `true` diff --git a/website/docs/r/emr_cluster.html.markdown b/website/docs/r/emr_cluster.html.markdown index 173bb05743b..1afa758e0a1 100644 --- a/website/docs/r/emr_cluster.html.markdown +++ b/website/docs/r/emr_cluster.html.markdown @@ -175,25 +175,22 @@ The following arguments are supported: * `name` - (Required) The name of the job flow * `release_label` - (Required) The release label for the Amazon EMR release * `master_instance_type` - (Optional) The EC2 instance type of the master node. Exactly one of `master_instance_type` and `instance_group` must be specified. -* `scale_down_behavior` - (Optional) The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized. +* `scale_down_behavior` - (Optional) The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized. * `additional_info` - (Optional) A JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore Terraform cannot detect drift from the actual EMR cluster if its value is changed outside Terraform. * `service_role` - (Required) IAM role that will be assumed by the Amazon EMR service to access AWS resources * `security_configuration` - (Optional) The security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater * `core_instance_type` - (Optional) The EC2 instance type of the slave nodes. Cannot be specified if `instance_groups` is set * `core_instance_count` - (Optional) Number of Amazon EC2 instances used to execute the job flow. EMR will use one node as the cluster's master node and use the remainder of the nodes (`core_instance_count`-1) as core nodes. Cannot be specified if `instance_groups` is set. Default `1` * `instance_group` - (Optional) A list of `instance_group` objects for each instance group in the cluster. Exactly one of `master_instance_type` and `instance_group` must be specified. If `instance_group` is set, then it must contain a configuration block for at least the `MASTER` instance group type (as well as any additional instance groups). Defined below -* `log_uri` - (Optional) S3 bucket to write the log files of the job flow. If a value - is not provided, logs are not created +* `log_uri` - (Optional) S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created * `applications` - (Optional) A list of applications for the cluster. Valid values are: `Flink`, `Hadoop`, `Hive`, `Mahout`, `Pig`, `Spark`, and `JupyterHub` (as of EMR 5.14.0). Case insensitive * `termination_protection` - (Optional) Switch on/off termination protection (default is off) * `keep_job_flow_alive_when_no_steps` - (Optional) Switch on/off run cluster with no steps or when all steps are complete (default is on) -* `ec2_attributes` - (Optional) Attributes for the EC2 instances running the job -flow. Defined below +* `ec2_attributes` - (Optional) Attributes for the EC2 instances running the job flow. Defined below * `kerberos_attributes` - (Optional) Kerberos configuration for the cluster. Defined below * `ebs_root_volume_size` - (Optional) Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later. * `custom_ami_id` - (Optional) A custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later. -* `bootstrap_action` - (Optional) List of bootstrap actions that will be run before Hadoop is started on - the cluster nodes. Defined below +* `bootstrap_action` - (Optional) List of bootstrap actions that will be run before Hadoop is started on the cluster nodes. Defined below * `configurations` - (Optional) List of configurations supplied for the EMR cluster you are creating * `configurations_json` - (Optional) A JSON string for supplying list of configurations for the EMR cluster. @@ -224,15 +221,12 @@ EOF * `step` - (Optional) List of steps to run when creating the cluster. Defined below. It is highly recommended to utilize the [lifecycle configuration block](/docs/configuration/resources.html) with `ignore_changes` if other steps are being managed outside of Terraform. * `tags` - (Optional) list of tags to apply to the EMR Cluster - ## ec2_attributes Attributes for the Amazon EC2 instances running the job flow -* `key_name` - (Optional) Amazon EC2 key pair that can be used to ssh to the master - node as the user called `hadoop` -* `subnet_id` - (Optional) VPC subnet id where you want the job flow to launch. -Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC +* `key_name` - (Optional) Amazon EC2 key pair that can be used to ssh to the master node as the user called `hadoop` +* `subnet_id` - (Optional) VPC subnet id where you want the job flow to launch. Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC * `additional_master_security_groups` - (Optional) String containing a comma separated list of additional Amazon EC2 security group IDs for the master node * `additional_slave_security_groups` - (Optional) String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string * `emr_managed_master_security_group` - (Optional) Identifier of the Amazon EC2 EMR-Managed security group for the master node @@ -286,7 +280,6 @@ Attributes for the EBS volumes attached to each EC2 instance in the `instance_gr * `iops` - (Optional) The number of I/O operations per second (IOPS) that the volume supports * `volumes_per_instance` - (Optional) The number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1) - ## bootstrap_action * `name` - (Required) Name of the bootstrap action @@ -330,14 +323,12 @@ In addition to all arguments above, the following attributes are exported: * `visible_to_all_users` - Indicates whether the job flow is visible to all IAM users of the AWS account associated with the job flow. * `tags` - The list of tags associated with a cluster. - ## Example bootable config **NOTE:** This configuration demonstrates a minimal configuration needed to boot an example EMR Cluster. It is not meant to display best practices. Please use at your own risk. - ```hcl provider "aws" { region = "us-west-2" diff --git a/website/docs/r/iam_user_policy_attachment.markdown b/website/docs/r/iam_user_policy_attachment.markdown index 5d4b3274f3b..afe64f9bdca 100644 --- a/website/docs/r/iam_user_policy_attachment.markdown +++ b/website/docs/r/iam_user_policy_attachment.markdown @@ -10,7 +10,6 @@ description: |- Attaches a Managed IAM Policy to an IAM user - ## Example Usage ```hcl @@ -21,7 +20,7 @@ resource "aws_iam_user" "user" { resource "aws_iam_policy" "policy" { name = "test-policy" description = "A test policy" - policy = # omitted + policy = # omitted } resource "aws_iam_user_policy_attachment" "test-attach" { @@ -34,5 +33,5 @@ resource "aws_iam_user_policy_attachment" "test-attach" { The following arguments are supported: -* `user` (Required) - The user the policy should be applied to -* `policy_arn` (Required) - The ARN of the policy you want to apply +* `user` (Required) - The user the policy should be applied to +* `policy_arn` (Required) - The ARN of the policy you want to apply diff --git a/website/docs/r/s3_bucket_inventory.html.markdown b/website/docs/r/s3_bucket_inventory.html.markdown index 57278aaa4f9..d175ac55e24 100644 --- a/website/docs/r/s3_bucket_inventory.html.markdown +++ b/website/docs/r/s3_bucket_inventory.html.markdown @@ -38,6 +38,7 @@ resource "aws_s3_bucket_inventory" "test" { format = "ORC" bucket_arn = "${aws_s3_bucket.inventory.arn}" } + } } ``` diff --git a/website/docs/r/ssm_resource_data_sync.html.markdown b/website/docs/r/ssm_resource_data_sync.html.markdown index 87ef3e9fb1d..43dd8ab0e7e 100644 --- a/website/docs/r/ssm_resource_data_sync.html.markdown +++ b/website/docs/r/ssm_resource_data_sync.html.markdown @@ -50,6 +50,7 @@ resource "aws_s3_bucket_policy" "hoge" { ] } EOF +} resource "aws_ssm_resource_data_sync" "foo" { name = "foo" diff --git a/website/docs/r/vpc_endpoint_route_table_association.html.markdown b/website/docs/r/vpc_endpoint_route_table_association.html.markdown index 9d3c44dc582..e69de29bb2d 100644 --- a/website/docs/r/vpc_endpoint_route_table_association.html.markdown +++ b/website/docs/r/vpc_endpoint_route_table_association.html.markdown @@ -1,41 +0,0 @@ ---- -layout: "aws" -page_title: "AWS: aws_vpc_endpoint_route_table_association" -sidebar_current: "docs-aws-resource-vpc-endpoint-route-table-association" -description: |- - Provides a resource to create an association between a VPC endpoint and routing table. ---- - -# aws_vpc_endpoint_route_table_association - -Provides a resource to create an association between a VPC endpoint and routing table. - -~> **NOTE on VPC Endpoints and VPC Endpoint Route Table Associations:** Terraform provides -both a standalone VPC Endpoint Route Table Association (an association between a VPC endpoint -and a single `route_table_id`) and a [VPC Endpoint](vpc_endpoint.html) resource with a `route_table_ids` -attribute. Do not use the same route table ID in both a VPC Endpoint resource and a VPC Endpoint Route -Table Association resource. Doing so will cause a conflict of associations and will overwrite the association. - -## Example Usage - -Basic usage: - -```hcl -resource "aws_vpc_endpoint_route_table_association" "private_s3" { - vpc_endpoint_id = "${aws_vpc_endpoint.s3.id}" - route_table_id = "${aws_route_table.private.id}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `vpc_endpoint_id` - (Required) The ID of the VPC endpoint with which the routing table will be associated. -* `route_table_id` - (Required) The ID of the routing table to be associated with the VPC endpoint. - -## Attributes Reference - -In addition to all arguments above, the following attributes are exported: - -* `id` - The ID of the association. diff --git a/website/docs/r/vpc_peering.html.markdown b/website/docs/r/vpc_peering.html.markdown index 63a39f728e6..7501a6aabb6 100644 --- a/website/docs/r/vpc_peering.html.markdown +++ b/website/docs/r/vpc_peering.html.markdown @@ -164,7 +164,7 @@ or accept the connection manually using the AWS Management Console, AWS CLI, thr VPC Peering resources can be imported using the `vpc peering id`, e.g. -``` +```sh $ terraform import aws_vpc_peering_connection.test_connection pcx-111aaa111 ``` From 488b75832d2dc3437af0ed98d8d81eab04fedb56 Mon Sep 17 00:00:00 2001 From: Tracy Holmes Date: Tue, 6 Nov 2018 12:46:13 -0600 Subject: [PATCH 3168/3316] almost there `fmt` errors --- website/docs/r/iam_group_policy_attachment.markdown | 4 ++-- website/docs/r/iam_policy_attachment.html.markdown | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/website/docs/r/iam_group_policy_attachment.markdown b/website/docs/r/iam_group_policy_attachment.markdown index db9b288bb09..63de63bbfe4 100644 --- a/website/docs/r/iam_group_policy_attachment.markdown +++ b/website/docs/r/iam_group_policy_attachment.markdown @@ -33,5 +33,5 @@ resource "aws_iam_group_policy_attachment" "test-attach" { The following arguments are supported: -* `group` (Required) - The group the policy should be applied to -* `policy_arn` (Required) - The ARN of the policy you want to apply +* `group` (Required) - The group the policy should be applied to +* `policy_arn` (Required) - The ARN of the policy you want to apply diff --git a/website/docs/r/iam_policy_attachment.html.markdown b/website/docs/r/iam_policy_attachment.html.markdown index b768cc3ab68..55d3c59e71e 100644 --- a/website/docs/r/iam_policy_attachment.html.markdown +++ b/website/docs/r/iam_policy_attachment.html.markdown @@ -10,7 +10,7 @@ description: |- Attaches a Managed IAM Policy to user(s), role(s), and/or group(s) -!> **WARNING:** The aws_iam_policy_attachment resource creates **exclusive** attachments of IAM policies. Across the entire AWS account, all of the users/roles/groups to which a single policy is attached must be declared by a single aws_iam_policy_attachment resource. This means that even any users/roles/groups that have the attached policy via some mechanism other than Terraform will have that attached policy revoked by Terraform. Consider `aws_iam_role_policy_attachment`, `aws_iam_user_policy_attachment`, or `aws_iam_group_policy_attachment` instead. These resources do not enforce exclusive attachment of an IAM policy. +!> **WARNING:** The aws_iam_policy_attachment resource creates **exclusive** attachments of IAM policies. Across the entire AWS account, all of the users/roles/groups to which a single policy is attached must be declared by a single aws_iam_policy_attachment resource. This means that even any users/roles/groups that have the attached policy via some mechanism other than Terraform will have that attached policy revoked by Terraform. Consider `aws_iam_role_policy_attachment`, `aws_iam_user_policy_attachment`, or `aws_iam_group_policy_attachment` instead. These resources do not enforce exclusive attachment of an IAM policy. ## Example Usage @@ -46,11 +46,11 @@ resource "aws_iam_policy_attachment" "test-attach" { The following arguments are supported: -* `name` (Required) - The name of the attachment. This cannot be an empty string. -* `users` (Optional) - The user(s) the policy should be applied to -* `roles` (Optional) - The role(s) the policy should be applied to -* `groups` (Optional) - The group(s) the policy should be applied to -* `policy_arn` (Required) - The ARN of the policy you want to apply +* `name` (Required) - The name of the attachment. This cannot be an empty string. +* `users` (Optional) - The user(s) the policy should be applied to +* `roles` (Optional) - The role(s) the policy should be applied to +* `groups` (Optional) - The group(s) the policy should be applied to +* `policy_arn` (Required) - The ARN of the policy you want to apply ## Attributes Reference From 5185e5085c82f295659b61bb8932aae78939ddfb Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 6 Nov 2018 15:41:48 -0500 Subject: [PATCH 3169/3316] resource/aws_dlm_lifecycle_policy: Address #5558 PR feedback ``` --- PASS: TestAccAWSDlmLifecyclePolicy_Basic (15.16s) --- PASS: TestAccAWSDlmLifecyclePolicy_Full (20.28s) ``` --- aws/resource_aws_dlm_lifecycle_policy.go | 35 +++++++--- aws/resource_aws_dlm_lifecycle_policy_test.go | 67 ++++++++++++------- website/aws.erb | 9 +++ 3 files changed, 74 insertions(+), 37 deletions(-) diff --git a/aws/resource_aws_dlm_lifecycle_policy.go b/aws/resource_aws_dlm_lifecycle_policy.go index d0722dcb920..c3da953064a 100644 --- a/aws/resource_aws_dlm_lifecycle_policy.go +++ b/aws/resource_aws_dlm_lifecycle_policy.go @@ -6,7 +6,6 @@ import ( "regexp" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/dlm" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -145,7 +144,7 @@ func resourceAwsDlmLifecyclePolicyCreate(d *schema.ResourceData, meta interface{ log.Printf("[INFO] Creating DLM lifecycle policy: %s", input) out, err := conn.CreateLifecyclePolicy(&input) if err != nil { - return err + return fmt.Errorf("error creating DLM Lifecycle Policy: %s", err) } d.SetId(*out.PolicyId) @@ -160,12 +159,15 @@ func resourceAwsDlmLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) out, err := conn.GetLifecyclePolicy(&dlm.GetLifecyclePolicyInput{ PolicyId: aws.String(d.Id()), }) + + if isAWSErr(err, dlm.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] DLM Lifecycle Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" && !d.IsNewResource() { - d.SetId("") - return nil - } - return err + return fmt.Errorf("error reading DLM Lifecycle Policy (%s): %s", d.Id(), err) } d.Set("description", out.Policy.Description) @@ -201,7 +203,7 @@ func resourceAwsDlmLifecyclePolicyUpdate(d *schema.ResourceData, meta interface{ log.Printf("[INFO] Updating lifecycle policy %s", d.Id()) _, err := conn.UpdateLifecyclePolicy(&input) if err != nil { - return err + return fmt.Errorf("error updating DLM Lifecycle Policy (%s): %s", d.Id(), err) } return resourceAwsDlmLifecyclePolicyRead(d, meta) @@ -215,13 +217,17 @@ func resourceAwsDlmLifecyclePolicyDelete(d *schema.ResourceData, meta interface{ PolicyId: aws.String(d.Id()), }) if err != nil { - return err + return fmt.Errorf("error deleting DLM Lifecycle Policy (%s): %s", d.Id(), err) } return nil } func expandDlmPolicyDetails(cfg []interface{}) *dlm.PolicyDetails { + if len(cfg) == 0 || cfg[0] == nil { + return nil + } + policyDetails := &dlm.PolicyDetails{} m := cfg[0].(map[string]interface{}) if v, ok := m["resource_types"]; ok { @@ -284,6 +290,9 @@ func flattenDlmSchedules(schedules []*dlm.Schedule) []map[string]interface{} { } func expandDlmCreateRule(cfg []interface{}) *dlm.CreateRule { + if len(cfg) == 0 || cfg[0] == nil { + return nil + } c := cfg[0].(map[string]interface{}) createRule := &dlm.CreateRule{ Interval: aws.Int64(int64(c["interval"].(int))), @@ -310,8 +319,12 @@ func flattenDlmCreateRule(createRule *dlm.CreateRule) []map[string]interface{} { } func expandDlmRetainRule(cfg []interface{}) *dlm.RetainRule { + if len(cfg) == 0 || cfg[0] == nil { + return nil + } + m := cfg[0].(map[string]interface{}) return &dlm.RetainRule{ - Count: aws.Int64(int64(cfg[0].(map[string]interface{})["count"].(int))), + Count: aws.Int64(int64(m["count"].(int))), } } @@ -337,7 +350,7 @@ func expandDlmTags(m map[string]interface{}) []*dlm.Tag { func flattenDlmTags(tags []*dlm.Tag) map[string]string { result := make(map[string]string) for _, t := range tags { - result[*t.Key] = *t.Value + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) } return result diff --git a/aws/resource_aws_dlm_lifecycle_policy_test.go b/aws/resource_aws_dlm_lifecycle_policy_test.go index 1693cfb6321..9a1b337f9fb 100644 --- a/aws/resource_aws_dlm_lifecycle_policy_test.go +++ b/aws/resource_aws_dlm_lifecycle_policy_test.go @@ -5,22 +5,23 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/dlm" + "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) -func TestAccAWSDlmLifecyclePolicyBasic(t *testing.T) { +func TestAccAWSDlmLifecyclePolicy_Basic(t *testing.T) { resourceName := "aws_dlm_lifecycle_policy.basic" + rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dlmLifecyclePolicyDestroy, Steps: []resource.TestStep{ { - Config: dlmLifecyclePolicyBasicConfig(), + Config: dlmLifecyclePolicyBasicConfig(rName), Check: resource.ComposeTestCheckFunc( checkDlmLifecyclePolicyExists(resourceName), resource.TestCheckResourceAttr(resourceName, "description", "tf-acc-basic"), @@ -44,16 +45,17 @@ func TestAccAWSDlmLifecyclePolicyBasic(t *testing.T) { }) } -func TestAccAWSDlmLifecyclePolicyFull(t *testing.T) { +func TestAccAWSDlmLifecyclePolicy_Full(t *testing.T) { resourceName := "aws_dlm_lifecycle_policy.full" + rName := acctest.RandomWithPrefix("tf-acc-test") - resource.Test(t, resource.TestCase{ + resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: dlmLifecyclePolicyDestroy, Steps: []resource.TestStep{ { - Config: dlmLifecyclePolicyFullConfig(), + Config: dlmLifecyclePolicyFullConfig(rName), Check: resource.ComposeTestCheckFunc( checkDlmLifecyclePolicyExists(resourceName), resource.TestCheckResourceAttr(resourceName, "description", "tf-acc-full"), @@ -70,7 +72,7 @@ func TestAccAWSDlmLifecyclePolicyFull(t *testing.T) { ), }, { - Config: dlmLifecyclePolicyFullUpdateConfig(), + Config: dlmLifecyclePolicyFullUpdateConfig(rName), Check: resource.ComposeTestCheckFunc( checkDlmLifecyclePolicyExists(resourceName), resource.TestCheckResourceAttr(resourceName, "description", "tf-acc-full-updated"), @@ -99,16 +101,17 @@ func dlmLifecyclePolicyDestroy(s *terraform.State) error { } input := dlm.GetLifecyclePolicyInput{ - PolicyId: aws.String(rs.Primary.Attributes["name"]), + PolicyId: aws.String(rs.Primary.ID), } out, err := conn.GetLifecyclePolicy(&input) + if isAWSErr(err, dlm.ErrCodeResourceNotFoundException, "") { + return nil + } + if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { - return nil - } - return err + return fmt.Errorf("error getting DLM Lifecycle Policy (%s): %s", rs.Primary.ID, err) } if out.Policy != nil { @@ -121,19 +124,31 @@ func dlmLifecyclePolicyDestroy(s *terraform.State) error { func checkDlmLifecyclePolicyExists(name string) resource.TestCheckFunc { return func(s *terraform.State) error { - _, ok := s.RootModule().Resources[name] + rs, ok := s.RootModule().Resources[name] if !ok { return fmt.Errorf("Not found: %s", name) } + conn := testAccProvider.Meta().(*AWSClient).dlmconn + + input := dlm.GetLifecyclePolicyInput{ + PolicyId: aws.String(rs.Primary.ID), + } + + _, err := conn.GetLifecyclePolicy(&input) + + if err != nil { + return fmt.Errorf("error getting DLM Lifecycle Policy (%s): %s", rs.Primary.ID, err) + } + return nil } } -func dlmLifecyclePolicyBasicConfig() string { - return fmt.Sprint(` +func dlmLifecyclePolicyBasicConfig(rName string) string { + return fmt.Sprintf(` resource "aws_iam_role" "dlm_lifecycle_role" { - name = "tf-acc-basic-dlm-lifecycle-role" + name = %q assume_role_policy = < + > + Data Lifecycle Manager Resources + + + > Database Migration Service